diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK5.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK5.lean new file mode 100644 index 0000000000000000000000000000000000000000..522e021f846435db1a71b274914c08209b6b3376 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK5.lean @@ -0,0 +1,1162 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LayoutCertificate +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateMatrixChunks +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FastCertificateMatrix +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FastLayoutGraph + +namespace OAI + +namespace CycleClique.Construction.Certificates + +def k5t3p0 : LayoutCertificate 3 where + chains := [[0], [1], [2]] + clique := {0, 1, 2} + templates := [⟨0, 1, [], [], [], 1, 4⟩, + ⟨0, 2, [], [], [], 1, 4⟩, + ⟨1, 2, [], [], [], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (1, 2)}⟩ + + +private def k5t3p0_state_0 : ForbiddenMatrix 3 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 1 4], + #[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 ∅ + +private theorem k5t3p0_initial_eq_row_0 : ∀ j : Fin 3, (k5t3p0.initialMatrix 5) 0 j = k5t3p0_state_0 0 j := by decide + +private theorem k5t3p0_initial_eq_row_1 : ∀ j : Fin 3, (k5t3p0.initialMatrix 5) 1 j = k5t3p0_state_0 1 j := by decide + +private theorem k5t3p0_initial_eq_row_2 : ∀ j : Fin 3, (k5t3p0.initialMatrix 5) 2 j = k5t3p0_state_0 2 j := by decide + +private theorem k5t3p0_initial_eq : (k5t3p0.initialMatrix 5) = k5t3p0_state_0 := by + funext i j + fin_cases i + + · exact k5t3p0_initial_eq_row_0 j + + · exact k5t3p0_initial_eq_row_1 j + + · exact k5t3p0_initial_eq_row_2 j + +private theorem k5t3p0_closure_0 : ClosureCheck k5t3p0.graph k5t3p0_state_0 5 3 [] := by trivial + +private theorem k5t3p0_matrix_eq : k5t3p0.matrix 5 = k5t3p0_state_0 := by + change closureMatrix (k5t3p0.initialMatrix 5) _ = _ + rw [k5t3p0_initial_eq] + change closureMatrix k5t3p0_state_0 [] = _ + rfl + +private theorem k5t3p0_part_0 : k5t3p0.chains.flatten = List.finRange _ := by decide + +private theorem k5t3p0_part_1 : k5t3p0.chains.map List.length = ([[], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k5t3p0_part_2 : k5t3p0.chains.map (fun l => l.map (fun i => decide (i ∈ k5t3p0.clique))) = ([[], [], []] : List (List ℕ)).map profileMask := by decide + +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 + +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 + +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 + +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 + simp only [k5t3p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k5t3p0_templates_item_0, k5t3p0_templates_item_1, k5t3p0_templates_item_2⟩ + +private theorem k5t3p0_part_4 : ∀ p ∈ k5t3p0.required, p.Check k5t3p0.graph 5 := by decide + +private theorem k5t3p0_part_5 : ClosureCheck k5t3p0.graph (k5t3p0.initialMatrix 5) 5 3 k5t3p0.closure := by + rw [k5t3p0_initial_eq] + exact k5t3p0_closure_0 + +private theorem k5t3p0_part_6 : k5t3p0.bad.Check k5t3p0.graph (k5t3p0.matrix 5) 5 3 := by + rw [k5t3p0_matrix_eq] + decide + +theorem k5t3p0_check : k5t3p0.Check 5 3 [[], [], []] := + ⟨k5t3p0_part_0, k5t3p0_part_1, k5t3p0_part_2, k5t3p0_part_3, k5t3p0_part_4, k5t3p0_part_5, k5t3p0_part_6⟩ +private def k5t3p1_step_0_data : EdgeAttachmentData 4 := ⟨2, 0, [⟨0, 2, []⟩], ⟨none, {(0, 2), (2, 2), (1, 2)}⟩⟩ + +private def k5t3p1_step_0 : ClosureStep 4 := .edge k5t3p1_step_0_data + +def k5t3p1 : LayoutCertificate 4 where + chains := [[0], [1, 2, 3]] + clique := {0, 1, 3} + templates := [⟨0, 1, [], [], [], 2, 4⟩, + ⟨0, 1, [], [], [2, 3], 1, 2⟩, + ⟨0, 2, [], [], [1], 1, 3⟩, + ⟨0, 3, [], [], [2, 1], 1, 2⟩, + ⟨1, 2, [], [], [3], 1, 3⟩, + ⟨2, 3, [], [1], [], 1, 3⟩] + required := [⟨1, 2, []⟩] + closure := [k5t3p1_step_0] + bad := ⟨none, {(0, 1), (2, 1), (1, 2)}⟩ + + +private def k5t3p1_state_0 : ForbiddenMatrix 4 := + fun i j => ((#[#[∅, Finset.Icc 1 4, {1, 2, 3}, {1, 2}], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[{1, 2, 3}, Finset.Icc 1 4, ∅, {1, 2, 3}], + #[{1, 2}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k5t3p1_initial_eq_row_0 : ∀ j : Fin 4, (k5t3p1.initialMatrix 5) 0 j = k5t3p1_state_0 0 j := by decide + +private theorem k5t3p1_initial_eq_row_1 : ∀ j : Fin 4, (k5t3p1.initialMatrix 5) 1 j = k5t3p1_state_0 1 j := by decide + +private theorem k5t3p1_initial_eq_row_2 : ∀ j : Fin 4, (k5t3p1.initialMatrix 5) 2 j = k5t3p1_state_0 2 j := by decide + +private theorem k5t3p1_initial_eq_row_3 : ∀ j : Fin 4, (k5t3p1.initialMatrix 5) 3 j = k5t3p1_state_0 3 j := by decide + +private theorem k5t3p1_initial_eq : (k5t3p1.initialMatrix 5) = k5t3p1_state_0 := by + funext i j + fin_cases i + + · exact k5t3p1_initial_eq_row_0 j + + · exact k5t3p1_initial_eq_row_1 j + + · exact k5t3p1_initial_eq_row_2 j + + · exact k5t3p1_initial_eq_row_3 j + +private def k5t3p1_state_1 : ForbiddenMatrix 4 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 3, {1, 2}], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 0 3, Finset.Icc 1 4, ∅, {1, 2, 3}], + #[{1, 2}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k5t3p1_local_0 : ForbiddenMatrix 4 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2}], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, ∅, {1, 2, 3}], + #[{1, 2}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +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 + +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 + +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 + +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 + +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 + funext i j + fin_cases i + + · exact k5t3p1_local_0_eq_row_0 j + + · exact k5t3p1_local_0_eq_row_1 j + + · exact k5t3p1_local_0_eq_row_2 j + + · exact k5t3p1_local_0_eq_row_3 j + +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 + +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 + +private theorem k5t3p1_step_0_check : k5t3p1_step_0.Check k5t3p1.graph k5t3p1_state_0 5 3 := by + change k5t3p1_step_0_data.Check k5t3p1.graph k5t3p1_state_0 5 3 + refine ⟨k5t3p1_local_0_paths, ?_⟩ + rw [k5t3p1_local_0_eq] + exact k5t3p1_local_0_bad + +private theorem k5t3p1_update_0 : k5t3p1_step_0.apply k5t3p1_state_0 = k5t3p1_state_1 := by + have h : ∀ i j : Fin 4, k5t3p1_step_0.apply k5t3p1_state_0 i j = k5t3p1_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k5t3p1_closure_1 : ClosureCheck k5t3p1.graph k5t3p1_state_1 5 3 [] := by trivial + +private theorem k5t3p1_closure_0 : ClosureCheck k5t3p1.graph k5t3p1_state_0 5 3 [k5t3p1_step_0] := by + constructor + · exact k5t3p1_step_0_check + · rw [k5t3p1_update_0] + exact k5t3p1_closure_1 + +private theorem k5t3p1_matrix_eq : k5t3p1.matrix 5 = k5t3p1_state_1 := by + change closureMatrix (k5t3p1.initialMatrix 5) _ = _ + rw [k5t3p1_initial_eq] + change closureMatrix k5t3p1_state_0 [k5t3p1_step_0] = _ + simp only [closureMatrix] + rw [k5t3p1_update_0] + +private theorem k5t3p1_part_0 : k5t3p1.chains.flatten = List.finRange _ := by decide + +private theorem k5t3p1_part_1 : k5t3p1.chains.map List.length = ([[], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + simp only [k5t3p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + 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⟩ + +private theorem k5t3p1_required_item_0 : (⟨1, 2, []⟩ : RequiredPathData (Fin 4)).Check k5t3p1.graph 5 := by decide + +private theorem k5t3p1_part_4 : ∀ p ∈ k5t3p1.required, p.Check k5t3p1.graph 5 := by + simp only [k5t3p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact k5t3p1_required_item_0 + +private theorem k5t3p1_part_5 : ClosureCheck k5t3p1.graph (k5t3p1.initialMatrix 5) 5 3 k5t3p1.closure := by + rw [k5t3p1_initial_eq] + exact k5t3p1_closure_0 + +private theorem k5t3p1_part_6 : k5t3p1.bad.Check k5t3p1.graph (k5t3p1.matrix 5) 5 3 := by + rw [k5t3p1_matrix_eq] + decide + +theorem k5t3p1_check : k5t3p1.Check 5 3 [[], [1]] := + ⟨k5t3p1_part_0, k5t3p1_part_1, k5t3p1_part_2, k5t3p1_part_3, k5t3p1_part_4, k5t3p1_part_5, k5t3p1_part_6⟩ +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)}⟩⟩ + +private def k5t3p2_step_0 : ClosureStep 5 := .edge k5t3p2_step_0_data + +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)}⟩⟩ + +private def k5t3p2_step_1 : ClosureStep 5 := .edge k5t3p2_step_1_data + +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)}⟩⟩ + +private def k5t3p2_step_2 : ClosureStep 5 := .fresh k5t3p2_step_2_data + +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)}⟩⟩ + +private def k5t3p2_step_3 : ClosureStep 5 := .fresh k5t3p2_step_3_data + +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)}⟩⟩ + +private def k5t3p2_step_4 : ClosureStep 5 := .fresh k5t3p2_step_4_data + +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)}⟩⟩ + +private def k5t3p2_step_5 : ClosureStep 5 := .edge k5t3p2_step_5_data + +private def k5t3p2_step_6_data : EdgeAttachmentData 5 := ⟨3, 0, [⟨1, 0, [2, 3]⟩], ⟨none, {(1, 2), (0, 2), (3, 1), (2, 0)}⟩⟩ + +private def k5t3p2_step_6 : ClosureStep 5 := .edge k5t3p2_step_6_data + +def k5t3p2 : LayoutCertificate 5 where + chains := [[0], [1, 2, 3, 4]] + clique := {0, 1, 4} + templates := [⟨0, 1, [], [], [], 3, 4⟩, + ⟨0, 1, [], [], [2, 3, 4], 1, 1⟩, + ⟨0, 2, [], [], [1], 2, 3⟩, + ⟨0, 2, [], [], [3, 4], 1, 2⟩, + ⟨0, 3, [], [], [2, 1], 1, 2⟩, + ⟨0, 3, [], [], [4], 2, 3⟩, + ⟨0, 4, [], [], [], 3, 4⟩, + ⟨0, 4, [], [], [3, 2, 1], 1, 1⟩, + ⟨1, 2, [], [], [3, 4], 1, 2⟩, + ⟨1, 3, [], [], [4], 2, 3⟩, + ⟨2, 3, [], [1], [4], 1, 2⟩, + ⟨2, 4, [], [1], [], 2, 3⟩, + ⟨3, 4, [], [1, 2], [], 1, 2⟩] + required := [⟨1, 2, []⟩, + ⟨2, 3, []⟩] + closure := [k5t3p2_step_0, k5t3p2_step_1, k5t3p2_step_2, k5t3p2_step_3, k5t3p2_step_4, k5t3p2_step_5, k5t3p2_step_6] + bad := ⟨none, {(2, 1), (3, 1), (0, 1)}⟩ + + +private def k5t3p2_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, {1, 3, 4}, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}], + #[{1, 3, 4}, ∅, {1, 2, 4}, {2, 3}, ∅], + #[{1, 2, 3}, {1, 2, 4}, ∅, {1, 2, 4}, {2, 3}], + #[{1, 2, 3}, {2, 3}, {1, 2, 4}, ∅, {1, 2}], + #[{1, 3, 4}, ∅, {2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k5t3p2_initial_eq_row_0 : ∀ j : Fin 5, (k5t3p2.initialMatrix 5) 0 j = k5t3p2_state_0 0 j := by decide + +private theorem k5t3p2_initial_eq_row_1 : ∀ j : Fin 5, (k5t3p2.initialMatrix 5) 1 j = k5t3p2_state_0 1 j := by decide + +private theorem k5t3p2_initial_eq_row_2 : ∀ j : Fin 5, (k5t3p2.initialMatrix 5) 2 j = k5t3p2_state_0 2 j := by decide + +private theorem k5t3p2_initial_eq_row_3 : ∀ j : Fin 5, (k5t3p2.initialMatrix 5) 3 j = k5t3p2_state_0 3 j := by decide + +private theorem k5t3p2_initial_eq_row_4 : ∀ j : Fin 5, (k5t3p2.initialMatrix 5) 4 j = k5t3p2_state_0 4 j := by decide + +private theorem k5t3p2_initial_eq : (k5t3p2.initialMatrix 5) = k5t3p2_state_0 := by + funext i j + fin_cases i + + · exact k5t3p2_initial_eq_row_0 j + + · exact k5t3p2_initial_eq_row_1 j + + · exact k5t3p2_initial_eq_row_2 j + + · exact k5t3p2_initial_eq_row_3 j + + · exact k5t3p2_initial_eq_row_4 j + +private def k5t3p2_state_1 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, {1, 3, 4}, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}], + #[{1, 3, 4}, ∅, {1, 2, 4}, {0, 2, 3}, ∅], + #[{1, 2, 3}, {1, 2, 4}, ∅, {1, 2, 4}, {2, 3}], + #[{1, 2, 3}, {0, 2, 3}, {1, 2, 4}, ∅, {1, 2}], + #[{1, 3, 4}, ∅, {2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k5t3p2_local_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, {1, 3, 4}, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}], + #[{1, 3, 4}, ∅, {1, 2, 4}, {2, 3}, ∅], + #[{1, 2, 3}, {1, 2, 4}, ∅, Finset.Icc 1 4, {1, 2, 3}], + #[{1, 2, 3}, {2, 3}, Finset.Icc 1 4, ∅, {1, 2, 3}], + #[{1, 3, 4}, ∅, {1, 2, 3}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +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 + +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 + +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 + +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 + +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 + +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 + funext i j + fin_cases i + + · exact k5t3p2_local_0_eq_row_0 j + + · exact k5t3p2_local_0_eq_row_1 j + + · exact k5t3p2_local_0_eq_row_2 j + + · exact k5t3p2_local_0_eq_row_3 j + + · exact k5t3p2_local_0_eq_row_4 j + +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 + +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 + +private theorem k5t3p2_step_0_check : k5t3p2_step_0.Check k5t3p2.graph k5t3p2_state_0 5 3 := by + change k5t3p2_step_0_data.Check k5t3p2.graph k5t3p2_state_0 5 3 + refine ⟨k5t3p2_local_0_paths, ?_⟩ + rw [k5t3p2_local_0_eq] + exact k5t3p2_local_0_bad + +private theorem k5t3p2_update_0 : k5t3p2_step_0.apply k5t3p2_state_0 = k5t3p2_state_1 := by + have h : ∀ i j : Fin 5, k5t3p2_step_0.apply k5t3p2_state_0 i j = k5t3p2_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k5t3p2_state_2 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, {1, 3, 4}, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}], + #[{1, 3, 4}, ∅, {1, 2, 4}, {0, 2, 3}, ∅], + #[{1, 2, 3}, {1, 2, 4}, ∅, {1, 2, 4}, {0, 2, 3}], + #[{1, 2, 3}, {0, 2, 3}, {1, 2, 4}, ∅, {1, 2}], + #[{1, 3, 4}, ∅, {0, 2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k5t3p2_local_1 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 4, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 3, ∅], + #[{1, 2, 3}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2, 3}], + #[{1, 2, 3}, Finset.Icc 0 3, Finset.Icc 1 4, ∅, {1, 2}], + #[{1, 3, 4}, ∅, {2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +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 + +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 + +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 + +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 + +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 + +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 + funext i j + fin_cases i + + · exact k5t3p2_local_1_eq_row_0 j + + · exact k5t3p2_local_1_eq_row_1 j + + · exact k5t3p2_local_1_eq_row_2 j + + · exact k5t3p2_local_1_eq_row_3 j + + · exact k5t3p2_local_1_eq_row_4 j + +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 + +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 + +private theorem k5t3p2_step_1_check : k5t3p2_step_1.Check k5t3p2.graph k5t3p2_state_1 5 3 := by + change k5t3p2_step_1_data.Check k5t3p2.graph k5t3p2_state_1 5 3 + refine ⟨k5t3p2_local_1_paths, ?_⟩ + rw [k5t3p2_local_1_eq] + exact k5t3p2_local_1_bad + +private theorem k5t3p2_update_1 : k5t3p2_step_1.apply k5t3p2_state_1 = k5t3p2_state_2 := by + have h : ∀ i j : Fin 5, k5t3p2_step_1.apply k5t3p2_state_1 i j = k5t3p2_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k5t3p2_state_3 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, {1, 3, 4}, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}], + #[{1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, ∅], + #[{1, 2, 3}, {1, 2, 4}, ∅, {1, 2, 4}, {0, 2, 3}], + #[{1, 2, 3}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}], + #[{1, 3, 4}, ∅, {0, 2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k5t3p2_local_2 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {0}, ∅, {0, 1}, {1}, {0, 1}], + #[{0}, ∅, {1, 3, 4}, Finset.Icc 0 3, {1, 2, 3}, {1, 3, 4}], + #[∅, {1, 3, 4}, ∅, {1, 2, 4}, {0, 2, 3}, ∅], + #[{0, 1}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3], + #[{1}, {1, 2, 3}, {0, 2, 3}, {1, 2, 4}, ∅, {1, 2}], + #[{0, 1}, {1, 3, 4}, ∅, Finset.Icc 0 3, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +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 + +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 + +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 + +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 + +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 + +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 + +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 + funext i j + fin_cases i + + · exact k5t3p2_local_2_eq_row_0 j + + · exact k5t3p2_local_2_eq_row_1 j + + · exact k5t3p2_local_2_eq_row_2 j + + · exact k5t3p2_local_2_eq_row_3 j + + · exact k5t3p2_local_2_eq_row_4 j + + · exact k5t3p2_local_2_eq_row_5 j + +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 + +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 + +private theorem k5t3p2_step_2_check : k5t3p2_step_2.Check k5t3p2.graph k5t3p2_state_2 5 3 := by + change k5t3p2_step_2_data.Check k5t3p2.graph k5t3p2_state_2 5 3 + refine ⟨by decide, k5t3p2_local_2_paths, ?_⟩ + rw [k5t3p2_local_2_eq] + exact k5t3p2_local_2_bad + +private theorem k5t3p2_update_2 : k5t3p2_step_2.apply k5t3p2_state_2 = k5t3p2_state_3 := by + have h : ∀ i j : Fin 5, k5t3p2_step_2.apply k5t3p2_state_2 i j = k5t3p2_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k5t3p2_state_4 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, {1, 3, 4}, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}], + #[{1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, {1}], + #[{1, 2, 3}, {1, 2, 4}, ∅, {1, 2, 4}, {0, 2, 3}], + #[{1, 2, 3}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}], + #[{1, 3, 4}, {1}, {0, 2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k5t3p2_local_3 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {0}, ∅, {0}, {0}, ∅], + #[{0}, ∅, {1, 3, 4}, Finset.Icc 0 3, Finset.Icc 0 3, {1, 3, 4}], + #[∅, {1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, ∅], + #[{0}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2, 4}, {0, 2, 3}], + #[{0}, Finset.Icc 0 3, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}], + #[∅, {1, 3, 4}, ∅, {0, 2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +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 + +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 + +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 + +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 + +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 + +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 + +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 + funext i j + fin_cases i + + · exact k5t3p2_local_3_eq_row_0 j + + · exact k5t3p2_local_3_eq_row_1 j + + · exact k5t3p2_local_3_eq_row_2 j + + · exact k5t3p2_local_3_eq_row_3 j + + · exact k5t3p2_local_3_eq_row_4 j + + · exact k5t3p2_local_3_eq_row_5 j + +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 + +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 + +private theorem k5t3p2_step_3_check : k5t3p2_step_3.Check k5t3p2.graph k5t3p2_state_3 5 3 := by + change k5t3p2_step_3_data.Check k5t3p2.graph k5t3p2_state_3 5 3 + refine ⟨by decide, k5t3p2_local_3_paths, ?_⟩ + rw [k5t3p2_local_3_eq] + exact k5t3p2_local_3_bad + +private theorem k5t3p2_update_3 : k5t3p2_step_3.apply k5t3p2_state_3 = k5t3p2_state_4 := by + have h : ∀ i j : Fin 5, k5t3p2_step_3.apply k5t3p2_state_3 i j = k5t3p2_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k5t3p2_state_5 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, {1, 3, 4}, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}], + #[{1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, {1}], + #[{1, 2, 3}, {1, 2, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3], + #[{1, 2, 3}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}], + #[{1, 3, 4}, {1}, Finset.Icc 0 3, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k5t3p2_local_4 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {0}, {0, 1}, {1}, {0, 1}, ∅], + #[{0}, ∅, {1, 3, 4}, {1, 2, 3}, Finset.Icc 0 3, {1, 3, 4}], + #[{0, 1}, {1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, {1}], + #[{1}, {1, 2, 3}, {1, 2, 4}, ∅, {1, 2, 4}, {0, 2, 3}], + #[{0, 1}, Finset.Icc 0 3, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}], + #[∅, {1, 3, 4}, {1}, {0, 2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +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 + +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 + +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 + +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 + +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 + +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 + +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 + funext i j + fin_cases i + + · exact k5t3p2_local_4_eq_row_0 j + + · exact k5t3p2_local_4_eq_row_1 j + + · exact k5t3p2_local_4_eq_row_2 j + + · exact k5t3p2_local_4_eq_row_3 j + + · exact k5t3p2_local_4_eq_row_4 j + + · exact k5t3p2_local_4_eq_row_5 j + +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 + +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 + +private theorem k5t3p2_step_4_check : k5t3p2_step_4.Check k5t3p2.graph k5t3p2_state_4 5 3 := by + change k5t3p2_step_4_data.Check k5t3p2.graph k5t3p2_state_4 5 3 + refine ⟨by decide, k5t3p2_local_4_paths, ?_⟩ + rw [k5t3p2_local_4_eq] + exact k5t3p2_local_4_bad + +private theorem k5t3p2_update_4 : k5t3p2_step_4.apply k5t3p2_state_4 = k5t3p2_state_5 := by + have h : ∀ i j : Fin 5, k5t3p2_step_4.apply k5t3p2_state_4 i j = k5t3p2_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k5t3p2_state_6 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, {1, 3, 4}, Finset.Icc 0 3, {1, 2, 3}, {1, 3, 4}], + #[{1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, {1}], + #[Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3], + #[{1, 2, 3}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}], + #[{1, 3, 4}, {1}, Finset.Icc 0 3, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k5t3p2_local_5 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, {1, 3, 4}, Finset.Icc 1 4, {1, 2, 3}, Finset.Icc 1 4], + #[{1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, {1}], + #[Finset.Icc 1 4, {1, 2, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3], + #[{1, 2, 3}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}], + #[Finset.Icc 1 4, {1}, Finset.Icc 0 3, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +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 + +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 + +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 + +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 + +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 + +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 + funext i j + fin_cases i + + · exact k5t3p2_local_5_eq_row_0 j + + · exact k5t3p2_local_5_eq_row_1 j + + · exact k5t3p2_local_5_eq_row_2 j + + · exact k5t3p2_local_5_eq_row_3 j + + · exact k5t3p2_local_5_eq_row_4 j + +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 + +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 + +private theorem k5t3p2_step_5_check : k5t3p2_step_5.Check k5t3p2.graph k5t3p2_state_5 5 3 := by + change k5t3p2_step_5_data.Check k5t3p2.graph k5t3p2_state_5 5 3 + refine ⟨k5t3p2_local_5_paths, ?_⟩ + rw [k5t3p2_local_5_eq] + exact k5t3p2_local_5_bad + +private theorem k5t3p2_update_5 : k5t3p2_step_5.apply k5t3p2_state_5 = k5t3p2_state_6 := by + have h : ∀ i j : Fin 5, k5t3p2_step_5.apply k5t3p2_state_5 i j = k5t3p2_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k5t3p2_state_7 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, {1, 3, 4}, Finset.Icc 0 3, Finset.Icc 0 3, {1, 3, 4}], + #[{1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, {1}], + #[Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3], + #[Finset.Icc 0 3, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}], + #[{1, 3, 4}, {1}, Finset.Icc 0 3, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k5t3p2_local_6 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 3, {1, 2, 3}, {1, 3, 4}], + #[Finset.Icc 1 4, ∅, {1, 2, 4}, Finset.Icc 0 3, {1}], + #[Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3], + #[{1, 2, 3}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}], + #[{1, 3, 4}, {1}, Finset.Icc 0 3, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +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 + +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 + +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 + +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 + +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 + +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 + funext i j + fin_cases i + + · exact k5t3p2_local_6_eq_row_0 j + + · exact k5t3p2_local_6_eq_row_1 j + + · exact k5t3p2_local_6_eq_row_2 j + + · exact k5t3p2_local_6_eq_row_3 j + + · exact k5t3p2_local_6_eq_row_4 j + +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 + +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 + +private theorem k5t3p2_step_6_check : k5t3p2_step_6.Check k5t3p2.graph k5t3p2_state_6 5 3 := by + change k5t3p2_step_6_data.Check k5t3p2.graph k5t3p2_state_6 5 3 + refine ⟨k5t3p2_local_6_paths, ?_⟩ + rw [k5t3p2_local_6_eq] + exact k5t3p2_local_6_bad + +private theorem k5t3p2_update_6 : k5t3p2_step_6.apply k5t3p2_state_6 = k5t3p2_state_7 := by + have h : ∀ i j : Fin 5, k5t3p2_step_6.apply k5t3p2_state_6 i j = k5t3p2_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k5t3p2_closure_7 : ClosureCheck k5t3p2.graph k5t3p2_state_7 5 3 [] := by trivial + +private theorem k5t3p2_closure_6 : ClosureCheck k5t3p2.graph k5t3p2_state_6 5 3 [k5t3p2_step_6] := by + constructor + · exact k5t3p2_step_6_check + · rw [k5t3p2_update_6] + exact k5t3p2_closure_7 + +private theorem k5t3p2_closure_5 : ClosureCheck k5t3p2.graph k5t3p2_state_5 5 3 [k5t3p2_step_5, k5t3p2_step_6] := by + constructor + · exact k5t3p2_step_5_check + · rw [k5t3p2_update_5] + exact k5t3p2_closure_6 + +private theorem k5t3p2_closure_4 : ClosureCheck k5t3p2.graph k5t3p2_state_4 5 3 [k5t3p2_step_4, k5t3p2_step_5, k5t3p2_step_6] := by + constructor + · exact k5t3p2_step_4_check + · rw [k5t3p2_update_4] + exact k5t3p2_closure_5 + +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 + constructor + · exact k5t3p2_step_3_check + · rw [k5t3p2_update_3] + exact k5t3p2_closure_4 + +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 + constructor + · exact k5t3p2_step_2_check + · rw [k5t3p2_update_2] + exact k5t3p2_closure_3 + +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 + constructor + · exact k5t3p2_step_1_check + · rw [k5t3p2_update_1] + exact k5t3p2_closure_2 + +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 + constructor + · exact k5t3p2_step_0_check + · rw [k5t3p2_update_0] + exact k5t3p2_closure_1 + +private theorem k5t3p2_matrix_eq : k5t3p2.matrix 5 = k5t3p2_state_7 := by + change closureMatrix (k5t3p2.initialMatrix 5) _ = _ + rw [k5t3p2_initial_eq] + 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] = _ + simp only [closureMatrix] + rw [k5t3p2_update_0, k5t3p2_update_1, k5t3p2_update_2, k5t3p2_update_3, k5t3p2_update_4, k5t3p2_update_5, k5t3p2_update_6] + +private theorem k5t3p2_part_0 : k5t3p2.chains.flatten = List.finRange _ := by decide + +private theorem k5t3p2_part_1 : k5t3p2.chains.map List.length = ([[], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + simp only [k5t3p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + 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⟩ + +private theorem k5t3p2_required_item_0 : (⟨1, 2, []⟩ : RequiredPathData (Fin 5)).Check k5t3p2.graph 5 := by decide + +private theorem k5t3p2_required_item_1 : (⟨2, 3, []⟩ : RequiredPathData (Fin 5)).Check k5t3p2.graph 5 := by decide + +private theorem k5t3p2_part_4 : ∀ p ∈ k5t3p2.required, p.Check k5t3p2.graph 5 := by + simp only [k5t3p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k5t3p2_required_item_0, k5t3p2_required_item_1⟩ + +private theorem k5t3p2_part_5 : ClosureCheck k5t3p2.graph (k5t3p2.initialMatrix 5) 5 3 k5t3p2.closure := by + rw [k5t3p2_initial_eq] + exact k5t3p2_closure_0 + +private theorem k5t3p2_part_6 : k5t3p2.bad.Check k5t3p2.graph (k5t3p2.matrix 5) 5 3 := by + rw [k5t3p2_matrix_eq] + decide + +theorem k5t3p2_check : k5t3p2.Check 5 3 [[], [2]] := + ⟨k5t3p2_part_0, k5t3p2_part_1, k5t3p2_part_2, k5t3p2_part_3, k5t3p2_part_4, k5t3p2_part_5, k5t3p2_part_6⟩ +def k5t3p3 : LayoutCertificate 5 where + chains := [[0, 1, 2, 3, 4]] + clique := {0, 2, 4} + templates := [⟨0, 1, [], [], [2], 1, 3⟩, + ⟨0, 3, [], [], [2], 1, 3⟩, + ⟨0, 4, [], [], [], 2, 4⟩, + ⟨1, 3, [], [0], [2], 1, 2⟩, + ⟨1, 4, [], [0], [], 1, 3⟩, + ⟨3, 4, [], [2], [], 1, 3⟩] + required := [⟨0, 4, [1, 2, 3]⟩] + closure := [] + bad := ⟨none, {(1, 0), (0, 2), (4, 2), (3, 1)}⟩ + + +private def k5t3p3_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[{1, 2, 3}, ∅, ∅, {1, 2}, {1, 2, 3}], + #[∅, ∅, ∅, ∅, ∅], + #[{1, 2, 3}, {1, 2}, ∅, ∅, {1, 2, 3}], + #[Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k5t3p3_initial_eq_row_0 : ∀ j : Fin 5, (k5t3p3.initialMatrix 5) 0 j = k5t3p3_state_0 0 j := by decide + +private theorem k5t3p3_initial_eq_row_1 : ∀ j : Fin 5, (k5t3p3.initialMatrix 5) 1 j = k5t3p3_state_0 1 j := by decide + +private theorem k5t3p3_initial_eq_row_2 : ∀ j : Fin 5, (k5t3p3.initialMatrix 5) 2 j = k5t3p3_state_0 2 j := by decide + +private theorem k5t3p3_initial_eq_row_3 : ∀ j : Fin 5, (k5t3p3.initialMatrix 5) 3 j = k5t3p3_state_0 3 j := by decide + +private theorem k5t3p3_initial_eq_row_4 : ∀ j : Fin 5, (k5t3p3.initialMatrix 5) 4 j = k5t3p3_state_0 4 j := by decide + +private theorem k5t3p3_initial_eq : (k5t3p3.initialMatrix 5) = k5t3p3_state_0 := by + funext i j + fin_cases i + + · exact k5t3p3_initial_eq_row_0 j + + · exact k5t3p3_initial_eq_row_1 j + + · exact k5t3p3_initial_eq_row_2 j + + · exact k5t3p3_initial_eq_row_3 j + + · exact k5t3p3_initial_eq_row_4 j + +private theorem k5t3p3_closure_0 : ClosureCheck k5t3p3.graph k5t3p3_state_0 5 3 [] := by trivial + +private theorem k5t3p3_matrix_eq : k5t3p3.matrix 5 = k5t3p3_state_0 := by + change closureMatrix (k5t3p3.initialMatrix 5) _ = _ + rw [k5t3p3_initial_eq] + change closureMatrix k5t3p3_state_0 [] = _ + rfl + +private theorem k5t3p3_part_0 : k5t3p3.chains.flatten = List.finRange _ := by decide + +private theorem k5t3p3_part_1 : k5t3p3.chains.map List.length = ([[1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + simp only [k5t3p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + 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⟩ + +private theorem k5t3p3_required_item_0 : (⟨0, 4, [1, 2, 3]⟩ : RequiredPathData (Fin 5)).Check k5t3p3.graph 5 := by decide + +private theorem k5t3p3_part_4 : ∀ p ∈ k5t3p3.required, p.Check k5t3p3.graph 5 := by + simp only [k5t3p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact k5t3p3_required_item_0 + +private theorem k5t3p3_part_5 : ClosureCheck k5t3p3.graph (k5t3p3.initialMatrix 5) 5 3 k5t3p3.closure := by + rw [k5t3p3_initial_eq] + exact k5t3p3_closure_0 + +private theorem k5t3p3_part_6 : k5t3p3.bad.Check k5t3p3.graph (k5t3p3.matrix 5) 5 3 := by + rw [k5t3p3_matrix_eq] + decide + +theorem k5t3p3_check : k5t3p3.Check 5 3 [[1, 1]] := + ⟨k5t3p3_part_0, k5t3p3_part_1, k5t3p3_part_2, k5t3p3_part_3, k5t3p3_part_4, k5t3p3_part_5, k5t3p3_part_6⟩ +def k5t4p0 : LayoutCertificate 4 where + chains := [[0], [1], [2], [3]] + clique := {0, 1, 2, 3} + templates := [⟨0, 1, [], [], [], 1, 4⟩, + ⟨0, 2, [], [], [], 1, 4⟩, + ⟨0, 3, [], [], [], 1, 4⟩, + ⟨1, 2, [], [], [], 1, 4⟩, + ⟨1, 3, [], [], [], 1, 4⟩, + ⟨2, 3, [], [], [], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (1, 2), (2, 2)}⟩ + + +private def k5t4p0_state_0 : ForbiddenMatrix 4 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 4], + #[Finset.Icc 1 4, Finset.Icc 1 4, ∅, 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 ∅ + +private theorem k5t4p0_initial_eq_row_0 : ∀ j : Fin 4, (k5t4p0.initialMatrix 5) 0 j = k5t4p0_state_0 0 j := by decide + +private theorem k5t4p0_initial_eq_row_1 : ∀ j : Fin 4, (k5t4p0.initialMatrix 5) 1 j = k5t4p0_state_0 1 j := by decide + +private theorem k5t4p0_initial_eq_row_2 : ∀ j : Fin 4, (k5t4p0.initialMatrix 5) 2 j = k5t4p0_state_0 2 j := by decide + +private theorem k5t4p0_initial_eq_row_3 : ∀ j : Fin 4, (k5t4p0.initialMatrix 5) 3 j = k5t4p0_state_0 3 j := by decide + +private theorem k5t4p0_initial_eq : (k5t4p0.initialMatrix 5) = k5t4p0_state_0 := by + funext i j + fin_cases i + + · exact k5t4p0_initial_eq_row_0 j + + · exact k5t4p0_initial_eq_row_1 j + + · exact k5t4p0_initial_eq_row_2 j + + · exact k5t4p0_initial_eq_row_3 j + +private theorem k5t4p0_closure_0 : ClosureCheck k5t4p0.graph k5t4p0_state_0 5 4 [] := by trivial + +private theorem k5t4p0_matrix_eq : k5t4p0.matrix 5 = k5t4p0_state_0 := by + change closureMatrix (k5t4p0.initialMatrix 5) _ = _ + rw [k5t4p0_initial_eq] + change closureMatrix k5t4p0_state_0 [] = _ + rfl + +private theorem k5t4p0_part_0 : k5t4p0.chains.flatten = List.finRange _ := by decide + +private theorem k5t4p0_part_1 : k5t4p0.chains.map List.length = ([[], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k5t4p0_part_2 : k5t4p0.chains.map (fun l => l.map (fun i => decide (i ∈ k5t4p0.clique))) = ([[], [], [], []] : List (List ℕ)).map profileMask := by decide + +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 + +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 + +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 + +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 + +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 + +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 + +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 + simp only [k5t4p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + 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⟩ + +private theorem k5t4p0_part_4 : ∀ p ∈ k5t4p0.required, p.Check k5t4p0.graph 5 := by decide + +private theorem k5t4p0_part_5 : ClosureCheck k5t4p0.graph (k5t4p0.initialMatrix 5) 5 4 k5t4p0.closure := by + rw [k5t4p0_initial_eq] + exact k5t4p0_closure_0 + +private theorem k5t4p0_part_6 : k5t4p0.bad.Check k5t4p0.graph (k5t4p0.matrix 5) 5 4 := by + rw [k5t4p0_matrix_eq] + decide + +theorem k5t4p0_check : k5t4p0.Check 5 4 [[], [], [], []] := + ⟨k5t4p0_part_0, k5t4p0_part_1, k5t4p0_part_2, k5t4p0_part_3, k5t4p0_part_4, k5t4p0_part_5, k5t4p0_part_6⟩ +def k5t4p1 : LayoutCertificate 5 where + chains := [[0], [1], [2, 3, 4]] + clique := {0, 1, 2, 4} + templates := [⟨0, 1, [], [], [], 2, 4⟩, + ⟨0, 1, [[2, 3, 4]], [], [], 1, 1⟩, + ⟨0, 2, [], [], [], 2, 4⟩, + ⟨0, 2, [], [], [3, 4], 1, 2⟩, + ⟨0, 3, [], [], [2], 1, 3⟩, + ⟨0, 4, [], [], [], 2, 4⟩, + ⟨0, 4, [], [], [3, 2], 1, 2⟩, + ⟨1, 2, [], [], [], 2, 4⟩, + ⟨1, 2, [], [], [3, 4], 1, 2⟩, + ⟨1, 3, [], [], [2], 1, 3⟩, + ⟨2, 3, [], [], [4], 1, 3⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 1), (2, 1), (3, 0)}⟩ + + +private def k5t4p1_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 3}, Finset.Icc 1 4], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 4, {1, 2, 3}, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, ∅, {1, 2, 3}, ∅], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅], + #[Finset.Icc 1 4, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k5t4p1_initial_eq_row_0 : ∀ j : Fin 5, (k5t4p1.initialMatrix 5) 0 j = k5t4p1_state_0 0 j := by decide + +private theorem k5t4p1_initial_eq_row_1 : ∀ j : Fin 5, (k5t4p1.initialMatrix 5) 1 j = k5t4p1_state_0 1 j := by decide + +private theorem k5t4p1_initial_eq_row_2 : ∀ j : Fin 5, (k5t4p1.initialMatrix 5) 2 j = k5t4p1_state_0 2 j := by decide + +private theorem k5t4p1_initial_eq_row_3 : ∀ j : Fin 5, (k5t4p1.initialMatrix 5) 3 j = k5t4p1_state_0 3 j := by decide + +private theorem k5t4p1_initial_eq_row_4 : ∀ j : Fin 5, (k5t4p1.initialMatrix 5) 4 j = k5t4p1_state_0 4 j := by decide + +private theorem k5t4p1_initial_eq : (k5t4p1.initialMatrix 5) = k5t4p1_state_0 := by + funext i j + fin_cases i + + · exact k5t4p1_initial_eq_row_0 j + + · exact k5t4p1_initial_eq_row_1 j + + · exact k5t4p1_initial_eq_row_2 j + + · exact k5t4p1_initial_eq_row_3 j + + · exact k5t4p1_initial_eq_row_4 j + +private theorem k5t4p1_closure_0 : ClosureCheck k5t4p1.graph k5t4p1_state_0 5 4 [] := by trivial + +private theorem k5t4p1_matrix_eq : k5t4p1.matrix 5 = k5t4p1_state_0 := by + change closureMatrix (k5t4p1.initialMatrix 5) _ = _ + rw [k5t4p1_initial_eq] + change closureMatrix k5t4p1_state_0 [] = _ + rfl + +private theorem k5t4p1_part_0 : k5t4p1.chains.flatten = List.finRange _ := by decide + +private theorem k5t4p1_part_1 : k5t4p1.chains.map List.length = ([[], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + simp only [k5t4p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + 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⟩ + +private theorem k5t4p1_part_4 : ∀ p ∈ k5t4p1.required, p.Check k5t4p1.graph 5 := by decide + +private theorem k5t4p1_part_5 : ClosureCheck k5t4p1.graph (k5t4p1.initialMatrix 5) 5 4 k5t4p1.closure := by + rw [k5t4p1_initial_eq] + exact k5t4p1_closure_0 + +private theorem k5t4p1_part_6 : k5t4p1.bad.Check k5t4p1.graph (k5t4p1.matrix 5) 5 4 := by + rw [k5t4p1_matrix_eq] + decide + +theorem k5t4p1_check : k5t4p1.Check 5 4 [[], [], [1]] := + ⟨k5t4p1_part_0, k5t4p1_part_1, k5t4p1_part_2, k5t4p1_part_3, k5t4p1_part_4, k5t4p1_part_5, k5t4p1_part_6⟩ +def k5t5p0 : LayoutCertificate 5 where + chains := [[0], [1], [2], [3], [4]] + clique := {0, 1, 2, 3, 4} + templates := [⟨0, 1, [], [], [], 1, 4⟩, + ⟨0, 2, [], [], [], 1, 4⟩, + ⟨0, 3, [], [], [], 1, 4⟩, + ⟨0, 4, [], [], [], 1, 4⟩, + ⟨1, 2, [], [], [], 1, 4⟩, + ⟨1, 3, [], [], [], 1, 4⟩, + ⟨1, 4, [], [], [], 1, 4⟩, + ⟨2, 3, [], [], [], 1, 4⟩, + ⟨2, 4, [], [], [], 1, 4⟩, + ⟨3, 4, [], [], [], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 1), (1, 1), (2, 1), (3, 1), (4, 3)}⟩ + + +private def k5t5p0_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4], + #[Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 4], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[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 ∅ + +private theorem k5t5p0_initial_eq_row_0 : ∀ j : Fin 5, (k5t5p0.initialMatrix 5) 0 j = k5t5p0_state_0 0 j := by decide + +private theorem k5t5p0_initial_eq_row_1 : ∀ j : Fin 5, (k5t5p0.initialMatrix 5) 1 j = k5t5p0_state_0 1 j := by decide + +private theorem k5t5p0_initial_eq_row_2 : ∀ j : Fin 5, (k5t5p0.initialMatrix 5) 2 j = k5t5p0_state_0 2 j := by decide + +private theorem k5t5p0_initial_eq_row_3 : ∀ j : Fin 5, (k5t5p0.initialMatrix 5) 3 j = k5t5p0_state_0 3 j := by decide + +private theorem k5t5p0_initial_eq_row_4 : ∀ j : Fin 5, (k5t5p0.initialMatrix 5) 4 j = k5t5p0_state_0 4 j := by decide + +private theorem k5t5p0_initial_eq : (k5t5p0.initialMatrix 5) = k5t5p0_state_0 := by + funext i j + fin_cases i + + · exact k5t5p0_initial_eq_row_0 j + + · exact k5t5p0_initial_eq_row_1 j + + · exact k5t5p0_initial_eq_row_2 j + + · exact k5t5p0_initial_eq_row_3 j + + · exact k5t5p0_initial_eq_row_4 j + +private theorem k5t5p0_closure_0 : ClosureCheck k5t5p0.graph k5t5p0_state_0 5 5 [] := by trivial + +private theorem k5t5p0_matrix_eq : k5t5p0.matrix 5 = k5t5p0_state_0 := by + change closureMatrix (k5t5p0.initialMatrix 5) _ = _ + rw [k5t5p0_initial_eq] + change closureMatrix k5t5p0_state_0 [] = _ + rfl + +private theorem k5t5p0_part_0 : k5t5p0.chains.flatten = List.finRange _ := by decide + +private theorem k5t5p0_part_1 : k5t5p0.chains.map List.length = ([[], [], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k5t5p0_part_2 : k5t5p0.chains.map (fun l => l.map (fun i => decide (i ∈ k5t5p0.clique))) = ([[], [], [], [], []] : List (List ℕ)).map profileMask := by decide + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + simp only [k5t5p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + 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⟩ + +private theorem k5t5p0_part_4 : ∀ p ∈ k5t5p0.required, p.Check k5t5p0.graph 5 := by decide + +private theorem k5t5p0_part_5 : ClosureCheck k5t5p0.graph (k5t5p0.initialMatrix 5) 5 5 k5t5p0.closure := by + rw [k5t5p0_initial_eq] + exact k5t5p0_closure_0 + +private theorem k5t5p0_part_6 : k5t5p0.bad.Check k5t5p0.graph (k5t5p0.matrix 5) 5 5 := by + rw [k5t5p0_matrix_eq] + decide + +theorem k5t5p0_check : k5t5p0.Check 5 5 [[], [], [], [], []] := + ⟨k5t5p0_part_0, k5t5p0_part_1, k5t5p0_part_2, k5t5p0_part_3, k5t5p0_part_4, k5t5p0_part_5, k5t5p0_part_6⟩ +end CycleClique.Construction.Certificates + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK6.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK6.lean new file mode 100644 index 0000000000000000000000000000000000000000..3718abb122e76b380d672069fdf1ad5125ce219c --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK6.lean @@ -0,0 +1,3162 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LayoutCertificate +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateMatrixChunks +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FastCertificateMatrix +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FastLayoutGraph + +namespace OAI + +namespace CycleClique.Construction.Certificates + +def k6t3p0 : LayoutCertificate 3 where + chains := [[0], [1], [2]] + clique := {0, 1, 2} + templates := [⟨0, 1, [], [], [], 1, 5⟩, + ⟨0, 2, [], [], [], 1, 5⟩, + ⟨1, 2, [], [], [], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (1, 2), (2, 2)}⟩ + + +private def k6t3p0_state_0 : ForbiddenMatrix 3 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p0_initial_eq_row_0 : ∀ j : Fin 3, (k6t3p0.initialMatrix 6) 0 j = k6t3p0_state_0 0 j := by decide + +private theorem k6t3p0_initial_eq_row_1 : ∀ j : Fin 3, (k6t3p0.initialMatrix 6) 1 j = k6t3p0_state_0 1 j := by decide + +private theorem k6t3p0_initial_eq_row_2 : ∀ j : Fin 3, (k6t3p0.initialMatrix 6) 2 j = k6t3p0_state_0 2 j := by decide + +private theorem k6t3p0_initial_eq : (k6t3p0.initialMatrix 6) = k6t3p0_state_0 := by + funext i j + fin_cases i + + · exact k6t3p0_initial_eq_row_0 j + + · exact k6t3p0_initial_eq_row_1 j + + · exact k6t3p0_initial_eq_row_2 j + +private theorem k6t3p0_closure_0 : ClosureCheck k6t3p0.graph k6t3p0_state_0 6 3 [] := by trivial + +private theorem k6t3p0_matrix_eq : k6t3p0.matrix 6 = k6t3p0_state_0 := by + change closureMatrix (k6t3p0.initialMatrix 6) _ = _ + rw [k6t3p0_initial_eq] + change closureMatrix k6t3p0_state_0 [] = _ + rfl + +private theorem k6t3p0_part_0 : k6t3p0.chains.flatten = List.finRange _ := by decide + +private theorem k6t3p0_part_1 : k6t3p0.chains.map List.length = ([[], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k6t3p0_part_2 : k6t3p0.chains.map (fun l => l.map (fun i => decide (i ∈ k6t3p0.clique))) = ([[], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k6t3p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 5⟩ : TemplateData (Fin 3)).Check k6t3p0.graph k6t3p0.clique 6 (patternAmount ([[], [], []] : List (List ℕ))) (([[], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 5⟩ : TemplateData (Fin 3)).Check k6t3p0.graph k6t3p0.clique 6 (patternAmount ([[], [], []] : List (List ℕ))) (([[], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p0_templates_item_2 : (⟨1, 2, [], [], [], 1, 5⟩ : TemplateData (Fin 3)).Check k6t3p0.graph k6t3p0.clique 6 (patternAmount ([[], [], []] : List (List ℕ))) (([[], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p0_part_3 : ∀ T ∈ k6t3p0.templates, T.Check k6t3p0.graph k6t3p0.clique 6 (patternAmount ([[], [], []] : List (List ℕ))) (([[], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k6t3p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t3p0_templates_item_0, k6t3p0_templates_item_1, k6t3p0_templates_item_2⟩ + +private theorem k6t3p0_part_4 : ∀ p ∈ k6t3p0.required, p.Check k6t3p0.graph 6 := by decide + +private theorem k6t3p0_part_5 : ClosureCheck k6t3p0.graph (k6t3p0.initialMatrix 6) 6 3 k6t3p0.closure := by + rw [k6t3p0_initial_eq] + exact k6t3p0_closure_0 + +private theorem k6t3p0_part_6 : k6t3p0.bad.Check k6t3p0.graph (k6t3p0.matrix 6) 6 3 := by + rw [k6t3p0_matrix_eq] + decide + +theorem k6t3p0_check : k6t3p0.Check 6 3 [[], [], []] := + ⟨k6t3p0_part_0, k6t3p0_part_1, k6t3p0_part_2, k6t3p0_part_3, k6t3p0_part_4, k6t3p0_part_5, k6t3p0_part_6⟩ +def k6t3p1 : LayoutCertificate 4 where + chains := [[0], [1, 2, 3]] + clique := {0, 1, 3} + templates := [⟨0, 1, [], [], [], 2, 5⟩, + ⟨0, 1, [], [], [2, 3], 1, 3⟩, + ⟨0, 2, [], [], [1], 1, 4⟩, + ⟨0, 3, [], [], [2, 1], 1, 3⟩, + ⟨1, 2, [], [], [3], 1, 4⟩, + ⟨2, 3, [], [1], [], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (2, 2), (1, 2)}⟩ + + +private def k6t3p1_state_0 : ForbiddenMatrix 4 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p1_initial_eq_row_0 : ∀ j : Fin 4, (k6t3p1.initialMatrix 6) 0 j = k6t3p1_state_0 0 j := by decide + +private theorem k6t3p1_initial_eq_row_1 : ∀ j : Fin 4, (k6t3p1.initialMatrix 6) 1 j = k6t3p1_state_0 1 j := by decide + +private theorem k6t3p1_initial_eq_row_2 : ∀ j : Fin 4, (k6t3p1.initialMatrix 6) 2 j = k6t3p1_state_0 2 j := by decide + +private theorem k6t3p1_initial_eq_row_3 : ∀ j : Fin 4, (k6t3p1.initialMatrix 6) 3 j = k6t3p1_state_0 3 j := by decide + +private theorem k6t3p1_initial_eq : (k6t3p1.initialMatrix 6) = k6t3p1_state_0 := by + funext i j + fin_cases i + + · exact k6t3p1_initial_eq_row_0 j + + · exact k6t3p1_initial_eq_row_1 j + + · exact k6t3p1_initial_eq_row_2 j + + · exact k6t3p1_initial_eq_row_3 j + +private theorem k6t3p1_closure_0 : ClosureCheck k6t3p1.graph k6t3p1_state_0 6 3 [] := by trivial + +private theorem k6t3p1_matrix_eq : k6t3p1.matrix 6 = k6t3p1_state_0 := by + change closureMatrix (k6t3p1.initialMatrix 6) _ = _ + rw [k6t3p1_initial_eq] + change closureMatrix k6t3p1_state_0 [] = _ + rfl + +private theorem k6t3p1_part_0 : k6t3p1.chains.flatten = List.finRange _ := by decide + +private theorem k6t3p1_part_1 : k6t3p1.chains.map List.length = ([[], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k6t3p1_part_2 : k6t3p1.chains.map (fun l => l.map (fun i => decide (i ∈ k6t3p1.clique))) = ([[], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k6t3p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 5⟩ : TemplateData (Fin 4)).Check k6t3p1.graph k6t3p1.clique 6 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p1_templates_item_1 : (⟨0, 1, [], [], [2, 3], 1, 3⟩ : TemplateData (Fin 4)).Check k6t3p1.graph k6t3p1.clique 6 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p1_templates_item_2 : (⟨0, 2, [], [], [1], 1, 4⟩ : TemplateData (Fin 4)).Check k6t3p1.graph k6t3p1.clique 6 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p1_templates_item_3 : (⟨0, 3, [], [], [2, 1], 1, 3⟩ : TemplateData (Fin 4)).Check k6t3p1.graph k6t3p1.clique 6 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p1_templates_item_4 : (⟨1, 2, [], [], [3], 1, 4⟩ : TemplateData (Fin 4)).Check k6t3p1.graph k6t3p1.clique 6 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p1_templates_item_5 : (⟨2, 3, [], [1], [], 1, 4⟩ : TemplateData (Fin 4)).Check k6t3p1.graph k6t3p1.clique 6 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p1_part_3 : ∀ T ∈ k6t3p1.templates, T.Check k6t3p1.graph k6t3p1.clique 6 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k6t3p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t3p1_templates_item_0, k6t3p1_templates_item_1, k6t3p1_templates_item_2, k6t3p1_templates_item_3, k6t3p1_templates_item_4, k6t3p1_templates_item_5⟩ + +private theorem k6t3p1_part_4 : ∀ p ∈ k6t3p1.required, p.Check k6t3p1.graph 6 := by decide + +private theorem k6t3p1_part_5 : ClosureCheck k6t3p1.graph (k6t3p1.initialMatrix 6) 6 3 k6t3p1.closure := by + rw [k6t3p1_initial_eq] + exact k6t3p1_closure_0 + +private theorem k6t3p1_part_6 : k6t3p1.bad.Check k6t3p1.graph (k6t3p1.matrix 6) 6 3 := by + rw [k6t3p1_matrix_eq] + decide + +theorem k6t3p1_check : k6t3p1.Check 6 3 [[], [1]] := + ⟨k6t3p1_part_0, k6t3p1_part_1, k6t3p1_part_2, k6t3p1_part_3, k6t3p1_part_4, k6t3p1_part_5, k6t3p1_part_6⟩ +private def k6t3p2_step_0_data : EdgeAttachmentData 5 := ⟨2, 0, [⟨2, 1, [0]⟩], ⟨none, {(0, 2), (2, 2), (1, 3)}⟩⟩ + +private def k6t3p2_step_0 : ClosureStep 5 := .edge k6t3p2_step_0_data + +private def k6t3p2_step_1_data : EdgeAttachmentData 5 := ⟨3, 0, [⟨3, 4, [0]⟩], ⟨none, {(0, 2), (3, 2), (4, 3)}⟩⟩ + +private def k6t3p2_step_1 : ClosureStep 5 := .edge k6t3p2_step_1_data + +private def k6t3p2_step_2_data : EdgeAttachmentData 5 := ⟨3, 1, [⟨2, 1, [3]⟩], ⟨none, {(0, 2), (2, 2), (1, 3)}⟩⟩ + +private def k6t3p2_step_2 : ClosureStep 5 := .edge k6t3p2_step_2_data + +private def k6t3p2_step_3_data : EdgeAttachmentData 5 := ⟨4, 2, [⟨2, 1, [4]⟩], ⟨none, {(0, 2), (2, 2), (1, 3)}⟩⟩ + +private def k6t3p2_step_3 : ClosureStep 5 := .edge k6t3p2_step_3_data + +private def k6t3p2_step_4_data : FreshAttachmentData 5 := ⟨4, 2, [⟨1, 0, [2, 3, 4, 5]⟩, ⟨2, 0, [1, 5, 4, 3]⟩, ⟨2, 4, [1, 5, 0, 3]⟩, ⟨4, 0, [3, 2, 1, 5]⟩, ⟨4, 2, [3, 0, 5, 1]⟩], ⟨none, {(1, 2), (2, 2), (4, 2), (3, 0)}⟩⟩ + +private def k6t3p2_step_4 : ClosureStep 5 := .fresh k6t3p2_step_4_data + +def k6t3p2 : LayoutCertificate 5 where + chains := [[0], [1, 2, 3, 4]] + clique := {0, 1, 4} + templates := [⟨0, 1, [], [], [], 3, 5⟩, + ⟨0, 1, [], [], [2, 3, 4], 1, 2⟩, + ⟨0, 2, [], [], [1], 2, 4⟩, + ⟨0, 2, [], [], [3, 4], 1, 3⟩, + ⟨0, 3, [], [], [2, 1], 1, 3⟩, + ⟨0, 3, [], [], [4], 2, 4⟩, + ⟨0, 4, [], [], [], 3, 5⟩, + ⟨0, 4, [], [], [3, 2, 1], 1, 2⟩, + ⟨1, 2, [], [], [3, 4], 1, 3⟩, + ⟨1, 3, [], [], [4], 2, 4⟩, + ⟨2, 3, [], [1], [4], 1, 3⟩, + ⟨3, 4, [], [1, 2], [], 1, 3⟩] + required := [⟨1, 2, []⟩, + ⟨3, 4, []⟩] + closure := [k6t3p2_step_0, k6t3p2_step_1, k6t3p2_step_2, k6t3p2_step_3, k6t3p2_step_4] + bad := ⟨none, {(0, 2), (2, 2), (3, 1)}⟩ + + +private def k6t3p2_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, {1, 2, 3, 5}, {2, 3, 4}, ∅], + #[Finset.Icc 1 4, {1, 2, 3, 5}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3, 5}], + #[Finset.Icc 1 5, ∅, ∅, {1, 2, 3, 5}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p2_initial_eq_row_0 : ∀ j : Fin 5, (k6t3p2.initialMatrix 6) 0 j = k6t3p2_state_0 0 j := by decide + +private theorem k6t3p2_initial_eq_row_1 : ∀ j : Fin 5, (k6t3p2.initialMatrix 6) 1 j = k6t3p2_state_0 1 j := by decide + +private theorem k6t3p2_initial_eq_row_2 : ∀ j : Fin 5, (k6t3p2.initialMatrix 6) 2 j = k6t3p2_state_0 2 j := by decide + +private theorem k6t3p2_initial_eq_row_3 : ∀ j : Fin 5, (k6t3p2.initialMatrix 6) 3 j = k6t3p2_state_0 3 j := by decide + +private theorem k6t3p2_initial_eq_row_4 : ∀ j : Fin 5, (k6t3p2.initialMatrix 6) 4 j = k6t3p2_state_0 4 j := by decide + +private theorem k6t3p2_initial_eq : (k6t3p2.initialMatrix 6) = k6t3p2_state_0 := by + funext i j + fin_cases i + + · exact k6t3p2_initial_eq_row_0 j + + · exact k6t3p2_initial_eq_row_1 j + + · exact k6t3p2_initial_eq_row_2 j + + · exact k6t3p2_initial_eq_row_3 j + + · exact k6t3p2_initial_eq_row_4 j + +private def k6t3p2_state_1 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, {1, 2, 3, 5}, {2, 3, 4}, ∅], + #[Finset.Icc 0 4, {1, 2, 3, 5}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3, 5}], + #[Finset.Icc 1 5, ∅, ∅, {1, 2, 3, 5}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p2_local_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2, 3, 4}, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 5, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3, 5}], + #[Finset.Icc 1 5, ∅, ∅, {1, 2, 3, 5}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p2_local_0_eq_row_0 : ∀ j : Fin 5, (fun a b => k6t3p2_state_0 a b ∪ requiredMatrix 6 k6t3p2_step_0_data.required a b) 0 j = k6t3p2_local_0 0 j := by decide + +private theorem k6t3p2_local_0_eq_row_1 : ∀ j : Fin 5, (fun a b => k6t3p2_state_0 a b ∪ requiredMatrix 6 k6t3p2_step_0_data.required a b) 1 j = k6t3p2_local_0 1 j := by decide + +private theorem k6t3p2_local_0_eq_row_2 : ∀ j : Fin 5, (fun a b => k6t3p2_state_0 a b ∪ requiredMatrix 6 k6t3p2_step_0_data.required a b) 2 j = k6t3p2_local_0 2 j := by decide + +private theorem k6t3p2_local_0_eq_row_3 : ∀ j : Fin 5, (fun a b => k6t3p2_state_0 a b ∪ requiredMatrix 6 k6t3p2_step_0_data.required a b) 3 j = k6t3p2_local_0 3 j := by decide + +private theorem k6t3p2_local_0_eq_row_4 : ∀ j : Fin 5, (fun a b => k6t3p2_state_0 a b ∪ requiredMatrix 6 k6t3p2_step_0_data.required a b) 4 j = k6t3p2_local_0 4 j := by decide + +private theorem k6t3p2_local_0_eq : (fun a b => k6t3p2_state_0 a b ∪ requiredMatrix 6 k6t3p2_step_0_data.required a b) = k6t3p2_local_0 := by + funext i j + fin_cases i + + · exact k6t3p2_local_0_eq_row_0 j + + · exact k6t3p2_local_0_eq_row_1 j + + · exact k6t3p2_local_0_eq_row_2 j + + · exact k6t3p2_local_0_eq_row_3 j + + · exact k6t3p2_local_0_eq_row_4 j + +private theorem k6t3p2_local_0_paths : ∀ p ∈ k6t3p2_step_0_data.required, p.Check (addedEdgeGraph k6t3p2.graph k6t3p2_step_0_data.i k6t3p2_step_0_data.j) 6 := by decide + +private theorem k6t3p2_local_0_bad : k6t3p2_step_0_data.bad.Check (addedEdgeGraph k6t3p2.graph k6t3p2_step_0_data.i k6t3p2_step_0_data.j) k6t3p2_local_0 6 3 := by decide + +private theorem k6t3p2_step_0_check : k6t3p2_step_0.Check k6t3p2.graph k6t3p2_state_0 6 3 := by + change k6t3p2_step_0_data.Check k6t3p2.graph k6t3p2_state_0 6 3 + refine ⟨k6t3p2_local_0_paths, ?_⟩ + rw [k6t3p2_local_0_eq] + exact k6t3p2_local_0_bad + +private theorem k6t3p2_update_0 : k6t3p2_step_0.apply k6t3p2_state_0 = k6t3p2_state_1 := by + have h : ∀ i j : Fin 5, k6t3p2_step_0.apply k6t3p2_state_0 i j = k6t3p2_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t3p2_state_2 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, {1, 2, 3, 5}, {2, 3, 4}, ∅], + #[Finset.Icc 0 4, {1, 2, 3, 5}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 0 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3, 5}], + #[Finset.Icc 1 5, ∅, ∅, {1, 2, 3, 5}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p2_local_1 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, {1, 2, 3, 5}, {2, 3, 4}, ∅], + #[Finset.Icc 0 4, {1, 2, 3, 5}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p2_local_1_eq_row_0 : ∀ j : Fin 5, (fun a b => k6t3p2_state_1 a b ∪ requiredMatrix 6 k6t3p2_step_1_data.required a b) 0 j = k6t3p2_local_1 0 j := by decide + +private theorem k6t3p2_local_1_eq_row_1 : ∀ j : Fin 5, (fun a b => k6t3p2_state_1 a b ∪ requiredMatrix 6 k6t3p2_step_1_data.required a b) 1 j = k6t3p2_local_1 1 j := by decide + +private theorem k6t3p2_local_1_eq_row_2 : ∀ j : Fin 5, (fun a b => k6t3p2_state_1 a b ∪ requiredMatrix 6 k6t3p2_step_1_data.required a b) 2 j = k6t3p2_local_1 2 j := by decide + +private theorem k6t3p2_local_1_eq_row_3 : ∀ j : Fin 5, (fun a b => k6t3p2_state_1 a b ∪ requiredMatrix 6 k6t3p2_step_1_data.required a b) 3 j = k6t3p2_local_1 3 j := by decide + +private theorem k6t3p2_local_1_eq_row_4 : ∀ j : Fin 5, (fun a b => k6t3p2_state_1 a b ∪ requiredMatrix 6 k6t3p2_step_1_data.required a b) 4 j = k6t3p2_local_1 4 j := by decide + +private theorem k6t3p2_local_1_eq : (fun a b => k6t3p2_state_1 a b ∪ requiredMatrix 6 k6t3p2_step_1_data.required a b) = k6t3p2_local_1 := by + funext i j + fin_cases i + + · exact k6t3p2_local_1_eq_row_0 j + + · exact k6t3p2_local_1_eq_row_1 j + + · exact k6t3p2_local_1_eq_row_2 j + + · exact k6t3p2_local_1_eq_row_3 j + + · exact k6t3p2_local_1_eq_row_4 j + +private theorem k6t3p2_local_1_paths : ∀ p ∈ k6t3p2_step_1_data.required, p.Check (addedEdgeGraph k6t3p2.graph k6t3p2_step_1_data.i k6t3p2_step_1_data.j) 6 := by decide + +private theorem k6t3p2_local_1_bad : k6t3p2_step_1_data.bad.Check (addedEdgeGraph k6t3p2.graph k6t3p2_step_1_data.i k6t3p2_step_1_data.j) k6t3p2_local_1 6 3 := by decide + +private theorem k6t3p2_step_1_check : k6t3p2_step_1.Check k6t3p2.graph k6t3p2_state_1 6 3 := by + change k6t3p2_step_1_data.Check k6t3p2.graph k6t3p2_state_1 6 3 + refine ⟨k6t3p2_local_1_paths, ?_⟩ + rw [k6t3p2_local_1_eq] + exact k6t3p2_local_1_bad + +private theorem k6t3p2_update_1 : k6t3p2_step_1.apply k6t3p2_state_1 = k6t3p2_state_2 := by + have h : ∀ i j : Fin 5, k6t3p2_step_1.apply k6t3p2_state_1 i j = k6t3p2_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t3p2_state_3 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, {1, 2, 3, 5}, {0, 2, 3, 4}, ∅], + #[Finset.Icc 0 4, {1, 2, 3, 5}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 0 4, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3, 5}], + #[Finset.Icc 1 5, ∅, ∅, {1, 2, 3, 5}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p2_local_2 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2, 3, 4}, ∅], + #[Finset.Icc 0 4, Finset.Icc 1 5, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 0 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3, 5}], + #[Finset.Icc 1 5, ∅, ∅, {1, 2, 3, 5}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p2_local_2_eq_row_0 : ∀ j : Fin 5, (fun a b => k6t3p2_state_2 a b ∪ requiredMatrix 6 k6t3p2_step_2_data.required a b) 0 j = k6t3p2_local_2 0 j := by decide + +private theorem k6t3p2_local_2_eq_row_1 : ∀ j : Fin 5, (fun a b => k6t3p2_state_2 a b ∪ requiredMatrix 6 k6t3p2_step_2_data.required a b) 1 j = k6t3p2_local_2 1 j := by decide + +private theorem k6t3p2_local_2_eq_row_2 : ∀ j : Fin 5, (fun a b => k6t3p2_state_2 a b ∪ requiredMatrix 6 k6t3p2_step_2_data.required a b) 2 j = k6t3p2_local_2 2 j := by decide + +private theorem k6t3p2_local_2_eq_row_3 : ∀ j : Fin 5, (fun a b => k6t3p2_state_2 a b ∪ requiredMatrix 6 k6t3p2_step_2_data.required a b) 3 j = k6t3p2_local_2 3 j := by decide + +private theorem k6t3p2_local_2_eq_row_4 : ∀ j : Fin 5, (fun a b => k6t3p2_state_2 a b ∪ requiredMatrix 6 k6t3p2_step_2_data.required a b) 4 j = k6t3p2_local_2 4 j := by decide + +private theorem k6t3p2_local_2_eq : (fun a b => k6t3p2_state_2 a b ∪ requiredMatrix 6 k6t3p2_step_2_data.required a b) = k6t3p2_local_2 := by + funext i j + fin_cases i + + · exact k6t3p2_local_2_eq_row_0 j + + · exact k6t3p2_local_2_eq_row_1 j + + · exact k6t3p2_local_2_eq_row_2 j + + · exact k6t3p2_local_2_eq_row_3 j + + · exact k6t3p2_local_2_eq_row_4 j + +private theorem k6t3p2_local_2_paths : ∀ p ∈ k6t3p2_step_2_data.required, p.Check (addedEdgeGraph k6t3p2.graph k6t3p2_step_2_data.i k6t3p2_step_2_data.j) 6 := by decide + +private theorem k6t3p2_local_2_bad : k6t3p2_step_2_data.bad.Check (addedEdgeGraph k6t3p2.graph k6t3p2_step_2_data.i k6t3p2_step_2_data.j) k6t3p2_local_2 6 3 := by decide + +private theorem k6t3p2_step_2_check : k6t3p2_step_2.Check k6t3p2.graph k6t3p2_state_2 6 3 := by + change k6t3p2_step_2_data.Check k6t3p2.graph k6t3p2_state_2 6 3 + refine ⟨k6t3p2_local_2_paths, ?_⟩ + rw [k6t3p2_local_2_eq] + exact k6t3p2_local_2_bad + +private theorem k6t3p2_update_2 : k6t3p2_step_2.apply k6t3p2_state_2 = k6t3p2_state_3 := by + have h : ∀ i j : Fin 5, k6t3p2_step_2.apply k6t3p2_state_2 i j = k6t3p2_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t3p2_state_4 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, {1, 2, 3, 5}, {0, 2, 3, 4}, ∅], + #[Finset.Icc 0 4, {1, 2, 3, 5}, ∅, {1, 2, 3}, {0}], + #[Finset.Icc 0 4, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3, 5}], + #[Finset.Icc 1 5, ∅, {0}, {1, 2, 3, 5}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p2_local_3 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, {0, 2, 3, 4}, ∅], + #[Finset.Icc 0 4, Finset.Icc 1 5, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 0 4, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3, 5}], + #[Finset.Icc 1 5, ∅, ∅, {1, 2, 3, 5}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p2_local_3_eq_row_0 : ∀ j : Fin 5, (fun a b => k6t3p2_state_3 a b ∪ requiredMatrix 6 k6t3p2_step_3_data.required a b) 0 j = k6t3p2_local_3 0 j := by decide + +private theorem k6t3p2_local_3_eq_row_1 : ∀ j : Fin 5, (fun a b => k6t3p2_state_3 a b ∪ requiredMatrix 6 k6t3p2_step_3_data.required a b) 1 j = k6t3p2_local_3 1 j := by decide + +private theorem k6t3p2_local_3_eq_row_2 : ∀ j : Fin 5, (fun a b => k6t3p2_state_3 a b ∪ requiredMatrix 6 k6t3p2_step_3_data.required a b) 2 j = k6t3p2_local_3 2 j := by decide + +private theorem k6t3p2_local_3_eq_row_3 : ∀ j : Fin 5, (fun a b => k6t3p2_state_3 a b ∪ requiredMatrix 6 k6t3p2_step_3_data.required a b) 3 j = k6t3p2_local_3 3 j := by decide + +private theorem k6t3p2_local_3_eq_row_4 : ∀ j : Fin 5, (fun a b => k6t3p2_state_3 a b ∪ requiredMatrix 6 k6t3p2_step_3_data.required a b) 4 j = k6t3p2_local_3 4 j := by decide + +private theorem k6t3p2_local_3_eq : (fun a b => k6t3p2_state_3 a b ∪ requiredMatrix 6 k6t3p2_step_3_data.required a b) = k6t3p2_local_3 := by + funext i j + fin_cases i + + · exact k6t3p2_local_3_eq_row_0 j + + · exact k6t3p2_local_3_eq_row_1 j + + · exact k6t3p2_local_3_eq_row_2 j + + · exact k6t3p2_local_3_eq_row_3 j + + · exact k6t3p2_local_3_eq_row_4 j + +private theorem k6t3p2_local_3_paths : ∀ p ∈ k6t3p2_step_3_data.required, p.Check (addedEdgeGraph k6t3p2.graph k6t3p2_step_3_data.i k6t3p2_step_3_data.j) 6 := by decide + +private theorem k6t3p2_local_3_bad : k6t3p2_step_3_data.bad.Check (addedEdgeGraph k6t3p2.graph k6t3p2_step_3_data.i k6t3p2_step_3_data.j) k6t3p2_local_3 6 3 := by decide + +private theorem k6t3p2_step_3_check : k6t3p2_step_3.Check k6t3p2.graph k6t3p2_state_3 6 3 := by + change k6t3p2_step_3_data.Check k6t3p2.graph k6t3p2_state_3 6 3 + refine ⟨k6t3p2_local_3_paths, ?_⟩ + rw [k6t3p2_local_3_eq] + exact k6t3p2_local_3_bad + +private theorem k6t3p2_update_3 : k6t3p2_step_3.apply k6t3p2_state_3 = k6t3p2_state_4 := by + have h : ∀ i j : Fin 5, k6t3p2_step_3.apply k6t3p2_state_3 i j = k6t3p2_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t3p2_state_5 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, {1, 2, 3, 5}, {0, 2, 3, 4}, ∅], + #[Finset.Icc 0 4, {1, 2, 3, 5}, ∅, {1, 2, 3}, {0, 1}], + #[Finset.Icc 0 4, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3, 5}], + #[Finset.Icc 1 5, ∅, {0, 1}, {1, 2, 3, 5}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p2_local_4 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1}, {1}, ∅, {1}, ∅], + #[{1}, ∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[{1}, Finset.Icc 1 5, ∅, {1, 2, 3, 5}, Finset.Icc 0 4, ∅], + #[∅, Finset.Icc 0 4, {1, 2, 3, 5}, ∅, {1, 2, 3}, {0}], + #[{1}, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3, 5}], + #[∅, Finset.Icc 1 5, ∅, {0}, {1, 2, 3, 5}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p2_local_4_eq_row_0 : ∀ j : Fin 6, (fun a b => freshMatrix k6t3p2_state_4 a b ∪ requiredMatrix 6 k6t3p2_step_4_data.required a b) 0 j = k6t3p2_local_4 0 j := by decide + +private theorem k6t3p2_local_4_eq_row_1 : ∀ j : Fin 6, (fun a b => freshMatrix k6t3p2_state_4 a b ∪ requiredMatrix 6 k6t3p2_step_4_data.required a b) 1 j = k6t3p2_local_4 1 j := by decide + +private theorem k6t3p2_local_4_eq_row_2 : ∀ j : Fin 6, (fun a b => freshMatrix k6t3p2_state_4 a b ∪ requiredMatrix 6 k6t3p2_step_4_data.required a b) 2 j = k6t3p2_local_4 2 j := by decide + +private theorem k6t3p2_local_4_eq_row_3 : ∀ j : Fin 6, (fun a b => freshMatrix k6t3p2_state_4 a b ∪ requiredMatrix 6 k6t3p2_step_4_data.required a b) 3 j = k6t3p2_local_4 3 j := by decide + +private theorem k6t3p2_local_4_eq_row_4 : ∀ j : Fin 6, (fun a b => freshMatrix k6t3p2_state_4 a b ∪ requiredMatrix 6 k6t3p2_step_4_data.required a b) 4 j = k6t3p2_local_4 4 j := by decide + +private theorem k6t3p2_local_4_eq_row_5 : ∀ j : Fin 6, (fun a b => freshMatrix k6t3p2_state_4 a b ∪ requiredMatrix 6 k6t3p2_step_4_data.required a b) 5 j = k6t3p2_local_4 5 j := by decide + +private theorem k6t3p2_local_4_eq : (fun a b => freshMatrix k6t3p2_state_4 a b ∪ requiredMatrix 6 k6t3p2_step_4_data.required a b) = k6t3p2_local_4 := by + funext i j + fin_cases i + + · exact k6t3p2_local_4_eq_row_0 j + + · exact k6t3p2_local_4_eq_row_1 j + + · exact k6t3p2_local_4_eq_row_2 j + + · exact k6t3p2_local_4_eq_row_3 j + + · exact k6t3p2_local_4_eq_row_4 j + + · exact k6t3p2_local_4_eq_row_5 j + +private theorem k6t3p2_local_4_paths : ∀ p ∈ k6t3p2_step_4_data.required, p.Check (freshGraph k6t3p2.graph k6t3p2_step_4_data.i k6t3p2_step_4_data.j) 6 := by decide + +private theorem k6t3p2_local_4_bad : k6t3p2_step_4_data.bad.Check (freshGraph k6t3p2.graph k6t3p2_step_4_data.i k6t3p2_step_4_data.j) k6t3p2_local_4 6 3 := by decide + +private theorem k6t3p2_step_4_check : k6t3p2_step_4.Check k6t3p2.graph k6t3p2_state_4 6 3 := by + change k6t3p2_step_4_data.Check k6t3p2.graph k6t3p2_state_4 6 3 + refine ⟨by decide, k6t3p2_local_4_paths, ?_⟩ + rw [k6t3p2_local_4_eq] + exact k6t3p2_local_4_bad + +private theorem k6t3p2_update_4 : k6t3p2_step_4.apply k6t3p2_state_4 = k6t3p2_state_5 := by + have h : ∀ i j : Fin 5, k6t3p2_step_4.apply k6t3p2_state_4 i j = k6t3p2_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k6t3p2_closure_5 : ClosureCheck k6t3p2.graph k6t3p2_state_5 6 3 [] := by trivial + +private theorem k6t3p2_closure_4 : ClosureCheck k6t3p2.graph k6t3p2_state_4 6 3 [k6t3p2_step_4] := by + constructor + · exact k6t3p2_step_4_check + · rw [k6t3p2_update_4] + exact k6t3p2_closure_5 + +private theorem k6t3p2_closure_3 : ClosureCheck k6t3p2.graph k6t3p2_state_3 6 3 [k6t3p2_step_3, k6t3p2_step_4] := by + constructor + · exact k6t3p2_step_3_check + · rw [k6t3p2_update_3] + exact k6t3p2_closure_4 + +private theorem k6t3p2_closure_2 : ClosureCheck k6t3p2.graph k6t3p2_state_2 6 3 [k6t3p2_step_2, k6t3p2_step_3, k6t3p2_step_4] := by + constructor + · exact k6t3p2_step_2_check + · rw [k6t3p2_update_2] + exact k6t3p2_closure_3 + +private theorem k6t3p2_closure_1 : ClosureCheck k6t3p2.graph k6t3p2_state_1 6 3 [k6t3p2_step_1, k6t3p2_step_2, k6t3p2_step_3, k6t3p2_step_4] := by + constructor + · exact k6t3p2_step_1_check + · rw [k6t3p2_update_1] + exact k6t3p2_closure_2 + +private theorem k6t3p2_closure_0 : ClosureCheck k6t3p2.graph k6t3p2_state_0 6 3 [k6t3p2_step_0, k6t3p2_step_1, k6t3p2_step_2, k6t3p2_step_3, k6t3p2_step_4] := by + constructor + · exact k6t3p2_step_0_check + · rw [k6t3p2_update_0] + exact k6t3p2_closure_1 + +private theorem k6t3p2_matrix_eq : k6t3p2.matrix 6 = k6t3p2_state_5 := by + change closureMatrix (k6t3p2.initialMatrix 6) _ = _ + rw [k6t3p2_initial_eq] + change closureMatrix k6t3p2_state_0 [k6t3p2_step_0, k6t3p2_step_1, k6t3p2_step_2, k6t3p2_step_3, k6t3p2_step_4] = _ + simp only [closureMatrix] + rw [k6t3p2_update_0, k6t3p2_update_1, k6t3p2_update_2, k6t3p2_update_3, k6t3p2_update_4] + +private theorem k6t3p2_part_0 : k6t3p2.chains.flatten = List.finRange _ := by decide + +private theorem k6t3p2_part_1 : k6t3p2.chains.map List.length = ([[], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k6t3p2_part_2 : k6t3p2.chains.map (fun l => l.map (fun i => decide (i ∈ k6t3p2.clique))) = ([[], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k6t3p2_templates_item_0 : (⟨0, 1, [], [], [], 3, 5⟩ : TemplateData (Fin 5)).Check k6t3p2.graph k6t3p2.clique 6 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p2_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4], 1, 2⟩ : TemplateData (Fin 5)).Check k6t3p2.graph k6t3p2.clique 6 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p2_templates_item_2 : (⟨0, 2, [], [], [1], 2, 4⟩ : TemplateData (Fin 5)).Check k6t3p2.graph k6t3p2.clique 6 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p2_templates_item_3 : (⟨0, 2, [], [], [3, 4], 1, 3⟩ : TemplateData (Fin 5)).Check k6t3p2.graph k6t3p2.clique 6 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p2_templates_item_4 : (⟨0, 3, [], [], [2, 1], 1, 3⟩ : TemplateData (Fin 5)).Check k6t3p2.graph k6t3p2.clique 6 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p2_templates_item_5 : (⟨0, 3, [], [], [4], 2, 4⟩ : TemplateData (Fin 5)).Check k6t3p2.graph k6t3p2.clique 6 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p2_templates_item_6 : (⟨0, 4, [], [], [], 3, 5⟩ : TemplateData (Fin 5)).Check k6t3p2.graph k6t3p2.clique 6 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p2_templates_item_7 : (⟨0, 4, [], [], [3, 2, 1], 1, 2⟩ : TemplateData (Fin 5)).Check k6t3p2.graph k6t3p2.clique 6 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p2_templates_item_8 : (⟨1, 2, [], [], [3, 4], 1, 3⟩ : TemplateData (Fin 5)).Check k6t3p2.graph k6t3p2.clique 6 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p2_templates_item_9 : (⟨1, 3, [], [], [4], 2, 4⟩ : TemplateData (Fin 5)).Check k6t3p2.graph k6t3p2.clique 6 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p2_templates_item_10 : (⟨2, 3, [], [1], [4], 1, 3⟩ : TemplateData (Fin 5)).Check k6t3p2.graph k6t3p2.clique 6 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p2_templates_item_11 : (⟨3, 4, [], [1, 2], [], 1, 3⟩ : TemplateData (Fin 5)).Check k6t3p2.graph k6t3p2.clique 6 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p2_part_3 : ∀ T ∈ k6t3p2.templates, T.Check k6t3p2.graph k6t3p2.clique 6 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k6t3p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t3p2_templates_item_0, k6t3p2_templates_item_1, k6t3p2_templates_item_2, k6t3p2_templates_item_3, k6t3p2_templates_item_4, k6t3p2_templates_item_5, k6t3p2_templates_item_6, k6t3p2_templates_item_7, k6t3p2_templates_item_8, k6t3p2_templates_item_9, k6t3p2_templates_item_10, k6t3p2_templates_item_11⟩ + +private theorem k6t3p2_required_item_0 : (⟨1, 2, []⟩ : RequiredPathData (Fin 5)).Check k6t3p2.graph 6 := by decide + +private theorem k6t3p2_required_item_1 : (⟨3, 4, []⟩ : RequiredPathData (Fin 5)).Check k6t3p2.graph 6 := by decide + +private theorem k6t3p2_part_4 : ∀ p ∈ k6t3p2.required, p.Check k6t3p2.graph 6 := by + simp only [k6t3p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t3p2_required_item_0, k6t3p2_required_item_1⟩ + +private theorem k6t3p2_part_5 : ClosureCheck k6t3p2.graph (k6t3p2.initialMatrix 6) 6 3 k6t3p2.closure := by + rw [k6t3p2_initial_eq] + exact k6t3p2_closure_0 + +private theorem k6t3p2_part_6 : k6t3p2.bad.Check k6t3p2.graph (k6t3p2.matrix 6) 6 3 := by + rw [k6t3p2_matrix_eq] + decide + +theorem k6t3p2_check : k6t3p2.Check 6 3 [[], [2]] := + ⟨k6t3p2_part_0, k6t3p2_part_1, k6t3p2_part_2, k6t3p2_part_3, k6t3p2_part_4, k6t3p2_part_5, k6t3p2_part_6⟩ +private def k6t3p3_step_0_data : EdgeAttachmentData 6 := ⟨3, 0, [⟨0, 1, [3, 4, 5]⟩, ⟨2, 5, [1, 0, 3, 4]⟩, ⟨2, 4, [1, 5, 0, 3]⟩, ⟨4, 1, [3, 0, 5]⟩, ⟨4, 2, [3, 0, 5, 1]⟩, ⟨4, 1, [5, 0, 3, 2]⟩], ⟨none, {(0, 2), (2, 2), (4, 2), (1, 0)}⟩⟩ + +private def k6t3p3_step_0 : ClosureStep 6 := .edge k6t3p3_step_0_data + +private def k6t3p3_step_1_data : FreshAttachmentData 6 := ⟨3, 0, [⟨3, 0, [2, 1, 6, 5, 4]⟩, ⟨3, 0, [2, 1]⟩, ⟨3, 5, [2, 1, 0, 4]⟩, ⟨3, 6, [2, 1, 0, 4, 5]⟩, ⟨3, 0, [2, 6, 1]⟩, ⟨3, 5, [2, 6, 1, 0, 4]⟩, ⟨3, 0, [2, 6, 5, 4]⟩, ⟨3, 1, [2, 6, 5, 4, 0]⟩, ⟨3, 0, [4]⟩, ⟨3, 6, [4, 0, 1, 2]⟩, ⟨5, 0, [4, 3, 2, 1]⟩, ⟨5, 0, [4, 3, 2, 6, 1]⟩, ⟨5, 0, [4]⟩, ⟨5, 3, [4, 0, 1, 2]⟩, ⟨5, 2, [4, 0, 1, 6]⟩, ⟨5, 3, [4, 0, 1, 6, 2]⟩, ⟨5, 0, [6, 1]⟩, ⟨5, 2, [6, 1, 0, 4, 3]⟩, ⟨5, 0, [6, 2, 1]⟩, ⟨5, 1, [6, 2, 3, 4, 0]⟩, ⟨0, 5, [1, 2, 3, 4]⟩, ⟨0, 6, [1, 2, 3, 4, 5]⟩, ⟨0, 4, [1, 2, 6, 5]⟩, ⟨0, 3, [1, 2, 6, 5, 4]⟩, ⟨0, 5, [1, 6, 2, 3, 4]⟩, ⟨0, 3, [1, 6, 5, 4]⟩, ⟨0, 2, [1, 6, 5, 4, 3]⟩, ⟨0, 6, [4, 3, 2, 1]⟩, ⟨0, 1, [4, 3, 2, 6]⟩, ⟨0, 2, [4, 5, 6, 1]⟩], ⟨none, {(3, 2), (5, 2), (0, 2)}⟩⟩ + +private def k6t3p3_step_1 : ClosureStep 6 := .fresh k6t3p3_step_1_data + +private def k6t3p3_step_2_data : FreshAttachmentData 6 := ⟨3, 1, [⟨1, 0, [2, 3, 4]⟩, ⟨1, 0, [2, 6, 5, 4]⟩, ⟨1, 0, [6, 5, 4, 3, 2]⟩, ⟨1, 3, [6, 5, 4, 0, 2]⟩, ⟨3, 0, [2, 1, 6, 5, 4]⟩, ⟨3, 0, [2, 6, 5, 4]⟩, ⟨3, 1, [2, 0, 4, 5, 6]⟩, ⟨3, 5, [4, 0, 2, 1, 6]⟩, ⟨3, 5, [4, 0, 2, 6]⟩, ⟨5, 0, [4, 3, 2]⟩, ⟨5, 0, [6, 1, 2, 3, 4]⟩, ⟨5, 3, [6, 1, 2, 0, 4]⟩, ⟨5, 0, [6, 2, 3, 4]⟩, ⟨5, 3, [6, 2, 0, 4]⟩], ⟨none, {(3, 1), (5, 2), (1, 2), (0, 0)}⟩⟩ + +private def k6t3p3_step_2 : ClosureStep 6 := .fresh k6t3p3_step_2_data + +private def k6t3p3_step_3_data : FreshAttachmentData 6 := ⟨4, 1, [⟨1, 0, [2, 3, 4, 5]⟩, ⟨1, 0, [2, 6, 5]⟩, ⟨1, 0, [2]⟩, ⟨1, 0, [6, 2, 3, 4, 5]⟩, ⟨1, 0, [6, 2]⟩, ⟨1, 4, [6, 2, 0, 5]⟩, ⟨1, 3, [6, 2, 0, 5, 4]⟩, ⟨1, 4, [6, 5, 0, 2, 3]⟩, ⟨3, 0, [2, 1, 6, 5]⟩, ⟨3, 0, [2, 6, 5]⟩, ⟨3, 0, [2]⟩, ⟨3, 0, [4, 5, 6, 1, 2]⟩, ⟨3, 0, [4, 5]⟩, ⟨3, 6, [4, 5, 0, 2, 1]⟩, ⟨3, 6, [4, 5, 0, 2]⟩, ⟨3, 1, [4, 5, 0, 2, 6]⟩, ⟨0, 4, [2, 1, 6, 5]⟩, ⟨0, 3, [2, 1, 6, 5, 4]⟩, ⟨0, 6, [2, 3, 4, 5]⟩, ⟨0, 1, [2, 3, 4, 5, 6]⟩, ⟨0, 3, [2, 6, 5, 4]⟩, ⟨0, 1, [5, 4, 3, 2]⟩, ⟨0, 6, [5, 4, 3, 2, 1]⟩, ⟨0, 4, [5, 6, 1, 2, 3]⟩], ⟨none, {(3, 2), (1, 2), (0, 2)}⟩⟩ + +private def k6t3p3_step_3 : ClosureStep 6 := .fresh k6t3p3_step_3_data + +private def k6t3p3_step_4_data : FreshAttachmentData 6 := ⟨5, 2, [⟨1, 0, [2, 3, 4, 5, 6]⟩, ⟨1, 0, [2, 3]⟩, ⟨1, 4, [2, 3, 0, 6, 5]⟩, ⟨1, 4, [2, 6, 0, 3]⟩, ⟨1, 5, [2, 6, 0, 3, 4]⟩, ⟨1, 0, [6, 2, 3]⟩, ⟨1, 0, [6, 5, 4, 3]⟩, ⟨1, 0, [6]⟩, ⟨5, 0, [4, 3, 2, 1, 6]⟩, ⟨5, 0, [4, 3, 2, 6]⟩, ⟨5, 0, [4, 3]⟩, ⟨5, 2, [4, 3, 0, 6, 1]⟩, ⟨5, 2, [4, 3, 0, 6]⟩, ⟨5, 1, [4, 3, 0, 6, 2]⟩, ⟨5, 0, [6, 2, 3]⟩, ⟨5, 0, [6]⟩, ⟨0, 5, [3, 2, 1, 6]⟩, ⟨0, 4, [3, 2, 1, 6, 5]⟩, ⟨0, 4, [3, 2, 6, 5]⟩, ⟨0, 1, [3, 4, 5, 6]⟩, ⟨0, 2, [3, 4, 5, 6, 1]⟩, ⟨0, 2, [3, 4, 5, 6]⟩, ⟨0, 1, [3, 4, 5, 6, 2]⟩, ⟨0, 5, [6, 1, 2, 3, 4]⟩], ⟨none, {(5, 2), (1, 2), (0, 2)}⟩⟩ + +private def k6t3p3_step_4 : ClosureStep 6 := .fresh k6t3p3_step_4_data + +private def k6t3p3_step_5_data : FreshAttachmentData 6 := ⟨5, 3, [⟨1, 0, [2, 3, 4, 5, 6]⟩, ⟨1, 0, [2, 3, 4]⟩, ⟨1, 5, [2, 3, 4, 0, 6]⟩, ⟨1, 0, [2, 6, 5, 4]⟩, ⟨3, 0, [2, 1, 6, 5, 4]⟩, ⟨3, 0, [2, 1, 6]⟩, ⟨3, 5, [2, 1, 6, 0, 4]⟩, ⟨3, 0, [2, 6, 5, 4]⟩, ⟨3, 5, [2, 6, 0, 4]⟩, ⟨5, 0, [4, 3, 2, 1, 6]⟩, ⟨5, 0, [4, 3, 2, 6]⟩, ⟨5, 3, [4, 0, 6, 1, 2]⟩, ⟨5, 1, [6, 0, 4, 3, 2]⟩], ⟨none, {(3, 2), (5, 1), (1, 2), (0, 0)}⟩⟩ + +private def k6t3p3_step_5 : ClosureStep 6 := .fresh k6t3p3_step_5_data + +private def k6t3p3_step_6_data : EdgeAttachmentData 6 := ⟨2, 0, [⟨0, 5, [2, 1]⟩, ⟨0, 3, [2]⟩, ⟨0, 5, [2, 3, 4]⟩, ⟨5, 1, [4, 3, 2, 0]⟩], ⟨none, {(0, 2), (5, 2), (3, 2), (4, 0)}⟩⟩ + +private def k6t3p3_step_6 : ClosureStep 6 := .edge k6t3p3_step_6_data + +private def k6t3p3_step_7_data : EdgeAttachmentData 6 := ⟨3, 1, [⟨2, 4, [3, 1, 0, 5]⟩, ⟨4, 2, [5, 0, 1, 3]⟩], ⟨none, {(0, 2), (2, 2), (3, 0), (4, 2)}⟩⟩ + +private def k6t3p3_step_7 : ClosureStep 6 := .edge k6t3p3_step_7_data + +private def k6t3p3_step_8_data : EdgeAttachmentData 6 := ⟨4, 0, [⟨0, 3, [4]⟩, ⟨0, 1, [4, 3, 2]⟩, ⟨0, 1, [4, 5]⟩, ⟨1, 5, [2, 3, 4, 0]⟩], ⟨none, {(0, 2), (1, 2), (3, 2), (2, 0)}⟩⟩ + +private def k6t3p3_step_8 : ClosureStep 6 := .edge k6t3p3_step_8_data + +private def k6t3p3_step_9_data : EdgeAttachmentData 6 := ⟨5, 3, [⟨2, 4, [1, 0, 5, 3]⟩, ⟨4, 2, [3, 5, 0, 1]⟩], ⟨none, {(0, 2), (3, 0), (4, 2), (2, 2)}⟩⟩ + +private def k6t3p3_step_9 : ClosureStep 6 := .edge k6t3p3_step_9_data + +private def k6t3p3_step_10_data : EdgeAttachmentData 6 := ⟨4, 2, [⟨0, 1, [5, 4, 2]⟩], ⟨none, {(0, 1), (3, 2), (2, 0), (1, 1)}⟩⟩ + +private def k6t3p3_step_10 : ClosureStep 6 := .edge k6t3p3_step_10_data + +def k6t3p3 : LayoutCertificate 6 where + chains := [[0], [1, 2, 3, 4, 5]] + clique := {0, 1, 5} + templates := [⟨0, 1, [], [], [], 4, 5⟩, + ⟨0, 1, [], [], [2, 3, 4, 5], 1, 1⟩, + ⟨0, 2, [], [], [1], 3, 4⟩, + ⟨0, 2, [], [], [3, 4, 5], 1, 2⟩, + ⟨0, 3, [], [], [2, 1], 2, 3⟩, + ⟨0, 4, [], [], [3, 2, 1], 1, 2⟩, + ⟨0, 4, [], [], [5], 3, 4⟩, + ⟨0, 5, [], [], [], 4, 5⟩, + ⟨0, 5, [], [], [4, 3, 2, 1], 1, 1⟩, + ⟨1, 2, [], [], [3, 4, 5], 1, 2⟩, + ⟨1, 3, [], [], [4, 5], 2, 3⟩, + ⟨2, 3, [], [1], [4, 5], 1, 2⟩, + ⟨2, 4, [], [1], [5], 2, 3⟩, + ⟨3, 4, [], [1, 2], [5], 1, 2⟩, + ⟨3, 5, [], [1, 2], [], 2, 3⟩, + ⟨4, 5, [], [1, 2, 3], [], 1, 2⟩] + required := [⟨1, 3, [2]⟩, + ⟨2, 4, [3]⟩, + ⟨3, 5, [4]⟩] + closure := [k6t3p3_step_0, k6t3p3_step_1, k6t3p3_step_2, k6t3p3_step_3, k6t3p3_step_4, k6t3p3_step_5, k6t3p3_step_6, k6t3p3_step_7, k6t3p3_step_8, k6t3p3_step_9, k6t3p3_step_10] + bad := ⟨none, {(3, 2), (0, 1), (2, 0), (4, 0)}⟩ + + +private def k6t3p3_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 4, 5}, Finset.Icc 1 4, {2, 3}, Finset.Icc 1 4, {1, 4, 5}], + #[{1, 4, 5}, ∅, {1, 2}, {2, 3, 4}, ∅, ∅], + #[Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, ∅], + #[{2, 3}, {2, 3, 4}, {1, 2}, ∅, {1, 2}, {2, 3, 4}], + #[Finset.Icc 1 4, ∅, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, ∅, {2, 3, 4}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p3_initial_eq_row_0 : ∀ j : Fin 6, (k6t3p3.initialMatrix 6) 0 j = k6t3p3_state_0 0 j := by decide + +private theorem k6t3p3_initial_eq_row_1 : ∀ j : Fin 6, (k6t3p3.initialMatrix 6) 1 j = k6t3p3_state_0 1 j := by decide + +private theorem k6t3p3_initial_eq_row_2 : ∀ j : Fin 6, (k6t3p3.initialMatrix 6) 2 j = k6t3p3_state_0 2 j := by decide + +private theorem k6t3p3_initial_eq_row_3 : ∀ j : Fin 6, (k6t3p3.initialMatrix 6) 3 j = k6t3p3_state_0 3 j := by decide + +private theorem k6t3p3_initial_eq_row_4 : ∀ j : Fin 6, (k6t3p3.initialMatrix 6) 4 j = k6t3p3_state_0 4 j := by decide + +private theorem k6t3p3_initial_eq_row_5 : ∀ j : Fin 6, (k6t3p3.initialMatrix 6) 5 j = k6t3p3_state_0 5 j := by decide + +private theorem k6t3p3_initial_eq : (k6t3p3.initialMatrix 6) = k6t3p3_state_0 := by + funext i j + fin_cases i + + · exact k6t3p3_initial_eq_row_0 j + + · exact k6t3p3_initial_eq_row_1 j + + · exact k6t3p3_initial_eq_row_2 j + + · exact k6t3p3_initial_eq_row_3 j + + · exact k6t3p3_initial_eq_row_4 j + + · exact k6t3p3_initial_eq_row_5 j + +private def k6t3p3_state_1 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 4, 5}, Finset.Icc 1 4, {0, 2, 3}, Finset.Icc 1 4, {1, 4, 5}], + #[{1, 4, 5}, ∅, {1, 2}, {2, 3, 4}, ∅, ∅], + #[Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, ∅], + #[{0, 2, 3}, {2, 3, 4}, {1, 2}, ∅, {1, 2}, {2, 3, 4}], + #[Finset.Icc 1 4, ∅, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, ∅, {2, 3, 4}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p3_local_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5}, Finset.Icc 1 4, {2, 3}, Finset.Icc 1 4, {1, 4, 5}], + #[{1, 2, 4, 5}, ∅, {1, 2}, {2, 3, 4}, {1, 2}, ∅], + #[Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, Finset.Icc 1 4, {1}], + #[{2, 3}, {2, 3, 4}, {1, 2}, ∅, {1, 2}, {2, 3, 4}], + #[Finset.Icc 1 4, {1, 2}, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, {1}, {2, 3, 4}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p3_local_0_eq_row_0 : ∀ j : Fin 6, (fun a b => k6t3p3_state_0 a b ∪ requiredMatrix 6 k6t3p3_step_0_data.required a b) 0 j = k6t3p3_local_0 0 j := by decide + +private theorem k6t3p3_local_0_eq_row_1 : ∀ j : Fin 6, (fun a b => k6t3p3_state_0 a b ∪ requiredMatrix 6 k6t3p3_step_0_data.required a b) 1 j = k6t3p3_local_0 1 j := by decide + +private theorem k6t3p3_local_0_eq_row_2 : ∀ j : Fin 6, (fun a b => k6t3p3_state_0 a b ∪ requiredMatrix 6 k6t3p3_step_0_data.required a b) 2 j = k6t3p3_local_0 2 j := by decide + +private theorem k6t3p3_local_0_eq_row_3 : ∀ j : Fin 6, (fun a b => k6t3p3_state_0 a b ∪ requiredMatrix 6 k6t3p3_step_0_data.required a b) 3 j = k6t3p3_local_0 3 j := by decide + +private theorem k6t3p3_local_0_eq_row_4 : ∀ j : Fin 6, (fun a b => k6t3p3_state_0 a b ∪ requiredMatrix 6 k6t3p3_step_0_data.required a b) 4 j = k6t3p3_local_0 4 j := by decide + +private theorem k6t3p3_local_0_eq_row_5 : ∀ j : Fin 6, (fun a b => k6t3p3_state_0 a b ∪ requiredMatrix 6 k6t3p3_step_0_data.required a b) 5 j = k6t3p3_local_0 5 j := by decide + +private theorem k6t3p3_local_0_eq : (fun a b => k6t3p3_state_0 a b ∪ requiredMatrix 6 k6t3p3_step_0_data.required a b) = k6t3p3_local_0 := by + funext i j + fin_cases i + + · exact k6t3p3_local_0_eq_row_0 j + + · exact k6t3p3_local_0_eq_row_1 j + + · exact k6t3p3_local_0_eq_row_2 j + + · exact k6t3p3_local_0_eq_row_3 j + + · exact k6t3p3_local_0_eq_row_4 j + + · exact k6t3p3_local_0_eq_row_5 j + +private theorem k6t3p3_local_0_paths : ∀ p ∈ k6t3p3_step_0_data.required, p.Check (addedEdgeGraph k6t3p3.graph k6t3p3_step_0_data.i k6t3p3_step_0_data.j) 6 := by decide + +private theorem k6t3p3_local_0_bad : k6t3p3_step_0_data.bad.Check (addedEdgeGraph k6t3p3.graph k6t3p3_step_0_data.i k6t3p3_step_0_data.j) k6t3p3_local_0 6 3 := by decide + +private theorem k6t3p3_step_0_check : k6t3p3_step_0.Check k6t3p3.graph k6t3p3_state_0 6 3 := by + change k6t3p3_step_0_data.Check k6t3p3.graph k6t3p3_state_0 6 3 + refine ⟨k6t3p3_local_0_paths, ?_⟩ + rw [k6t3p3_local_0_eq] + exact k6t3p3_local_0_bad + +private theorem k6t3p3_update_0 : k6t3p3_step_0.apply k6t3p3_state_0 = k6t3p3_state_1 := by + have h : ∀ i j : Fin 6, k6t3p3_step_0.apply k6t3p3_state_0 i j = k6t3p3_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t3p3_state_2 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 4, 5}, Finset.Icc 1 4, Finset.Icc 0 3, Finset.Icc 1 4, {1, 4, 5}], + #[{1, 4, 5}, ∅, {1, 2}, {2, 3, 4}, ∅, ∅], + #[Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, ∅], + #[Finset.Icc 0 3, {2, 3, 4}, {1, 2}, ∅, {1, 2}, {2, 3, 4}], + #[Finset.Icc 1 4, ∅, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, ∅, {2, 3, 4}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p3_local_1 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {0, 1}, Finset.Icc 0 4, {1}, Finset.Icc 0 4, {0, 1}], + #[{1}, ∅, {1, 4, 5}, Finset.Icc 0 4, {0, 2, 3}, Finset.Icc 0 4, {1, 4, 5}], + #[{0, 1}, {1, 4, 5}, ∅, {1, 2}, {2, 3, 4}, {0, 1}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, Finset.Icc 0 4, {0, 1}], + #[{1}, {0, 2, 3}, {2, 3, 4}, {1, 2}, ∅, {1, 2}, {2, 3, 4}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, Finset.Icc 0 4, {1, 2}, ∅, {1, 2}], + #[{0, 1}, {1, 4, 5}, ∅, {0, 1}, {2, 3, 4}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p3_local_1_eq_row_0 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_1 a b ∪ requiredMatrix 6 k6t3p3_step_1_data.required a b) 0 j = k6t3p3_local_1 0 j := by decide + +private theorem k6t3p3_local_1_eq_row_1 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_1 a b ∪ requiredMatrix 6 k6t3p3_step_1_data.required a b) 1 j = k6t3p3_local_1 1 j := by decide + +private theorem k6t3p3_local_1_eq_row_2 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_1 a b ∪ requiredMatrix 6 k6t3p3_step_1_data.required a b) 2 j = k6t3p3_local_1 2 j := by decide + +private theorem k6t3p3_local_1_eq_row_3 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_1 a b ∪ requiredMatrix 6 k6t3p3_step_1_data.required a b) 3 j = k6t3p3_local_1 3 j := by decide + +private theorem k6t3p3_local_1_eq_row_4 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_1 a b ∪ requiredMatrix 6 k6t3p3_step_1_data.required a b) 4 j = k6t3p3_local_1 4 j := by decide + +private theorem k6t3p3_local_1_eq_row_5 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_1 a b ∪ requiredMatrix 6 k6t3p3_step_1_data.required a b) 5 j = k6t3p3_local_1 5 j := by decide + +private theorem k6t3p3_local_1_eq_row_6 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_1 a b ∪ requiredMatrix 6 k6t3p3_step_1_data.required a b) 6 j = k6t3p3_local_1 6 j := by decide + +private theorem k6t3p3_local_1_eq : (fun a b => freshMatrix k6t3p3_state_1 a b ∪ requiredMatrix 6 k6t3p3_step_1_data.required a b) = k6t3p3_local_1 := by + funext i j + fin_cases i + + · exact k6t3p3_local_1_eq_row_0 j + + · exact k6t3p3_local_1_eq_row_1 j + + · exact k6t3p3_local_1_eq_row_2 j + + · exact k6t3p3_local_1_eq_row_3 j + + · exact k6t3p3_local_1_eq_row_4 j + + · exact k6t3p3_local_1_eq_row_5 j + + · exact k6t3p3_local_1_eq_row_6 j + +private theorem k6t3p3_local_1_paths : ∀ p ∈ k6t3p3_step_1_data.required, p.Check (freshGraph k6t3p3.graph k6t3p3_step_1_data.i k6t3p3_step_1_data.j) 6 := by decide + +private theorem k6t3p3_local_1_bad : k6t3p3_step_1_data.bad.Check (freshGraph k6t3p3.graph k6t3p3_step_1_data.i k6t3p3_step_1_data.j) k6t3p3_local_1 6 3 := by decide + +private theorem k6t3p3_step_1_check : k6t3p3_step_1.Check k6t3p3.graph k6t3p3_state_1 6 3 := by + change k6t3p3_step_1_data.Check k6t3p3.graph k6t3p3_state_1 6 3 + refine ⟨by decide, k6t3p3_local_1_paths, ?_⟩ + rw [k6t3p3_local_1_eq] + exact k6t3p3_local_1_bad + +private theorem k6t3p3_update_1 : k6t3p3_step_1.apply k6t3p3_state_1 = k6t3p3_state_2 := by + have h : ∀ i j : Fin 6, k6t3p3_step_1.apply k6t3p3_state_1 i j = k6t3p3_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t3p3_state_3 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 4, 5}, Finset.Icc 1 4, Finset.Icc 0 3, Finset.Icc 1 4, {1, 4, 5}], + #[{1, 4, 5}, ∅, {1, 2}, Finset.Icc 1 4, ∅, ∅], + #[Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, ∅], + #[Finset.Icc 0 3, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}], + #[Finset.Icc 1 4, ∅, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, ∅, {2, 3, 4}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p3_local_2 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, {0, 1}, ∅, {0, 1, 2}, ∅], + #[{0, 1, 2}, ∅, {1, 4, 5}, Finset.Icc 0 4, Finset.Icc 0 3, Finset.Icc 1 4, {1, 4, 5}], + #[∅, {1, 4, 5}, ∅, {1, 2}, {2, 3, 4}, ∅, ∅], + #[{0, 1}, Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, Finset.Icc 0 4, ∅], + #[∅, Finset.Icc 0 3, {2, 3, 4}, {1, 2}, ∅, {1, 2}, {2, 3, 4}], + #[{0, 1, 2}, Finset.Icc 1 4, ∅, Finset.Icc 0 4, {1, 2}, ∅, {1, 2}], + #[∅, {1, 4, 5}, ∅, ∅, {2, 3, 4}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p3_local_2_eq_row_0 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_2 a b ∪ requiredMatrix 6 k6t3p3_step_2_data.required a b) 0 j = k6t3p3_local_2 0 j := by decide + +private theorem k6t3p3_local_2_eq_row_1 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_2 a b ∪ requiredMatrix 6 k6t3p3_step_2_data.required a b) 1 j = k6t3p3_local_2 1 j := by decide + +private theorem k6t3p3_local_2_eq_row_2 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_2 a b ∪ requiredMatrix 6 k6t3p3_step_2_data.required a b) 2 j = k6t3p3_local_2 2 j := by decide + +private theorem k6t3p3_local_2_eq_row_3 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_2 a b ∪ requiredMatrix 6 k6t3p3_step_2_data.required a b) 3 j = k6t3p3_local_2 3 j := by decide + +private theorem k6t3p3_local_2_eq_row_4 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_2 a b ∪ requiredMatrix 6 k6t3p3_step_2_data.required a b) 4 j = k6t3p3_local_2 4 j := by decide + +private theorem k6t3p3_local_2_eq_row_5 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_2 a b ∪ requiredMatrix 6 k6t3p3_step_2_data.required a b) 5 j = k6t3p3_local_2 5 j := by decide + +private theorem k6t3p3_local_2_eq_row_6 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_2 a b ∪ requiredMatrix 6 k6t3p3_step_2_data.required a b) 6 j = k6t3p3_local_2 6 j := by decide + +private theorem k6t3p3_local_2_eq : (fun a b => freshMatrix k6t3p3_state_2 a b ∪ requiredMatrix 6 k6t3p3_step_2_data.required a b) = k6t3p3_local_2 := by + funext i j + fin_cases i + + · exact k6t3p3_local_2_eq_row_0 j + + · exact k6t3p3_local_2_eq_row_1 j + + · exact k6t3p3_local_2_eq_row_2 j + + · exact k6t3p3_local_2_eq_row_3 j + + · exact k6t3p3_local_2_eq_row_4 j + + · exact k6t3p3_local_2_eq_row_5 j + + · exact k6t3p3_local_2_eq_row_6 j + +private theorem k6t3p3_local_2_paths : ∀ p ∈ k6t3p3_step_2_data.required, p.Check (freshGraph k6t3p3.graph k6t3p3_step_2_data.i k6t3p3_step_2_data.j) 6 := by decide + +private theorem k6t3p3_local_2_bad : k6t3p3_step_2_data.bad.Check (freshGraph k6t3p3.graph k6t3p3_step_2_data.i k6t3p3_step_2_data.j) k6t3p3_local_2 6 3 := by decide + +private theorem k6t3p3_step_2_check : k6t3p3_step_2.Check k6t3p3.graph k6t3p3_state_2 6 3 := by + change k6t3p3_step_2_data.Check k6t3p3.graph k6t3p3_state_2 6 3 + refine ⟨by decide, k6t3p3_local_2_paths, ?_⟩ + rw [k6t3p3_local_2_eq] + exact k6t3p3_local_2_bad + +private theorem k6t3p3_update_2 : k6t3p3_step_2.apply k6t3p3_state_2 = k6t3p3_state_3 := by + have h : ∀ i j : Fin 6, k6t3p3_step_2.apply k6t3p3_state_2 i j = k6t3p3_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t3p3_state_4 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 4, 5}, Finset.Icc 1 4, Finset.Icc 0 3, Finset.Icc 1 4, {1, 4, 5}], + #[{1, 4, 5}, ∅, {1, 2}, Finset.Icc 1 4, {1}, ∅], + #[Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, ∅], + #[Finset.Icc 0 3, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}], + #[Finset.Icc 1 4, {1}, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, ∅, {2, 3, 4}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p3_local_3 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 0 4, ∅, Finset.Icc 0 4, {0, 1}, ∅, {0, 1}], + #[Finset.Icc 0 4, ∅, {1, 4, 5}, Finset.Icc 0 4, Finset.Icc 0 3, Finset.Icc 1 4, {1, 4, 5}], + #[∅, {1, 4, 5}, ∅, {1, 2}, Finset.Icc 1 4, ∅, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, {0, 1}], + #[{0, 1}, Finset.Icc 0 3, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}], + #[∅, Finset.Icc 1 4, ∅, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[{0, 1}, {1, 4, 5}, ∅, {0, 1}, {2, 3, 4}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p3_local_3_eq_row_0 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_3 a b ∪ requiredMatrix 6 k6t3p3_step_3_data.required a b) 0 j = k6t3p3_local_3 0 j := by decide + +private theorem k6t3p3_local_3_eq_row_1 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_3 a b ∪ requiredMatrix 6 k6t3p3_step_3_data.required a b) 1 j = k6t3p3_local_3 1 j := by decide + +private theorem k6t3p3_local_3_eq_row_2 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_3 a b ∪ requiredMatrix 6 k6t3p3_step_3_data.required a b) 2 j = k6t3p3_local_3 2 j := by decide + +private theorem k6t3p3_local_3_eq_row_3 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_3 a b ∪ requiredMatrix 6 k6t3p3_step_3_data.required a b) 3 j = k6t3p3_local_3 3 j := by decide + +private theorem k6t3p3_local_3_eq_row_4 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_3 a b ∪ requiredMatrix 6 k6t3p3_step_3_data.required a b) 4 j = k6t3p3_local_3 4 j := by decide + +private theorem k6t3p3_local_3_eq_row_5 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_3 a b ∪ requiredMatrix 6 k6t3p3_step_3_data.required a b) 5 j = k6t3p3_local_3 5 j := by decide + +private theorem k6t3p3_local_3_eq_row_6 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_3 a b ∪ requiredMatrix 6 k6t3p3_step_3_data.required a b) 6 j = k6t3p3_local_3 6 j := by decide + +private theorem k6t3p3_local_3_eq : (fun a b => freshMatrix k6t3p3_state_3 a b ∪ requiredMatrix 6 k6t3p3_step_3_data.required a b) = k6t3p3_local_3 := by + funext i j + fin_cases i + + · exact k6t3p3_local_3_eq_row_0 j + + · exact k6t3p3_local_3_eq_row_1 j + + · exact k6t3p3_local_3_eq_row_2 j + + · exact k6t3p3_local_3_eq_row_3 j + + · exact k6t3p3_local_3_eq_row_4 j + + · exact k6t3p3_local_3_eq_row_5 j + + · exact k6t3p3_local_3_eq_row_6 j + +private theorem k6t3p3_local_3_paths : ∀ p ∈ k6t3p3_step_3_data.required, p.Check (freshGraph k6t3p3.graph k6t3p3_step_3_data.i k6t3p3_step_3_data.j) 6 := by decide + +private theorem k6t3p3_local_3_bad : k6t3p3_step_3_data.bad.Check (freshGraph k6t3p3.graph k6t3p3_step_3_data.i k6t3p3_step_3_data.j) k6t3p3_local_3 6 3 := by decide + +private theorem k6t3p3_step_3_check : k6t3p3_step_3.Check k6t3p3.graph k6t3p3_state_3 6 3 := by + change k6t3p3_step_3_data.Check k6t3p3.graph k6t3p3_state_3 6 3 + refine ⟨by decide, k6t3p3_local_3_paths, ?_⟩ + rw [k6t3p3_local_3_eq] + exact k6t3p3_local_3_bad + +private theorem k6t3p3_update_3 : k6t3p3_step_3.apply k6t3p3_state_3 = k6t3p3_state_4 := by + have h : ∀ i j : Fin 6, k6t3p3_step_3.apply k6t3p3_state_3 i j = k6t3p3_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t3p3_state_5 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 4, 5}, Finset.Icc 1 4, Finset.Icc 0 3, Finset.Icc 1 4, {1, 4, 5}], + #[{1, 4, 5}, ∅, {1, 2}, Finset.Icc 1 4, {1}, ∅], + #[Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, {1}], + #[Finset.Icc 0 3, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}], + #[Finset.Icc 1 4, {1}, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, {1}, {2, 3, 4}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p3_local_4 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0, 1}, ∅, {0, 1}, Finset.Icc 0 4, ∅], + #[Finset.Icc 0 4, ∅, {1, 4, 5}, Finset.Icc 1 4, Finset.Icc 0 3, Finset.Icc 0 4, {1, 4, 5}], + #[{0, 1}, {1, 4, 5}, ∅, {1, 2}, Finset.Icc 1 4, {0, 1}, ∅], + #[∅, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, ∅], + #[{0, 1}, Finset.Icc 0 3, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[∅, {1, 4, 5}, ∅, ∅, {2, 3, 4}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p3_local_4_eq_row_0 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_4 a b ∪ requiredMatrix 6 k6t3p3_step_4_data.required a b) 0 j = k6t3p3_local_4 0 j := by decide + +private theorem k6t3p3_local_4_eq_row_1 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_4 a b ∪ requiredMatrix 6 k6t3p3_step_4_data.required a b) 1 j = k6t3p3_local_4 1 j := by decide + +private theorem k6t3p3_local_4_eq_row_2 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_4 a b ∪ requiredMatrix 6 k6t3p3_step_4_data.required a b) 2 j = k6t3p3_local_4 2 j := by decide + +private theorem k6t3p3_local_4_eq_row_3 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_4 a b ∪ requiredMatrix 6 k6t3p3_step_4_data.required a b) 3 j = k6t3p3_local_4 3 j := by decide + +private theorem k6t3p3_local_4_eq_row_4 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_4 a b ∪ requiredMatrix 6 k6t3p3_step_4_data.required a b) 4 j = k6t3p3_local_4 4 j := by decide + +private theorem k6t3p3_local_4_eq_row_5 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_4 a b ∪ requiredMatrix 6 k6t3p3_step_4_data.required a b) 5 j = k6t3p3_local_4 5 j := by decide + +private theorem k6t3p3_local_4_eq_row_6 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_4 a b ∪ requiredMatrix 6 k6t3p3_step_4_data.required a b) 6 j = k6t3p3_local_4 6 j := by decide + +private theorem k6t3p3_local_4_eq : (fun a b => freshMatrix k6t3p3_state_4 a b ∪ requiredMatrix 6 k6t3p3_step_4_data.required a b) = k6t3p3_local_4 := by + funext i j + fin_cases i + + · exact k6t3p3_local_4_eq_row_0 j + + · exact k6t3p3_local_4_eq_row_1 j + + · exact k6t3p3_local_4_eq_row_2 j + + · exact k6t3p3_local_4_eq_row_3 j + + · exact k6t3p3_local_4_eq_row_4 j + + · exact k6t3p3_local_4_eq_row_5 j + + · exact k6t3p3_local_4_eq_row_6 j + +private theorem k6t3p3_local_4_paths : ∀ p ∈ k6t3p3_step_4_data.required, p.Check (freshGraph k6t3p3.graph k6t3p3_step_4_data.i k6t3p3_step_4_data.j) 6 := by decide + +private theorem k6t3p3_local_4_bad : k6t3p3_step_4_data.bad.Check (freshGraph k6t3p3.graph k6t3p3_step_4_data.i k6t3p3_step_4_data.j) k6t3p3_local_4 6 3 := by decide + +private theorem k6t3p3_step_4_check : k6t3p3_step_4.Check k6t3p3.graph k6t3p3_state_4 6 3 := by + change k6t3p3_step_4_data.Check k6t3p3.graph k6t3p3_state_4 6 3 + refine ⟨by decide, k6t3p3_local_4_paths, ?_⟩ + rw [k6t3p3_local_4_eq] + exact k6t3p3_local_4_bad + +private theorem k6t3p3_update_4 : k6t3p3_step_4.apply k6t3p3_state_4 = k6t3p3_state_5 := by + have h : ∀ i j : Fin 6, k6t3p3_step_4.apply k6t3p3_state_4 i j = k6t3p3_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t3p3_state_6 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 4, 5}, Finset.Icc 1 4, Finset.Icc 0 3, Finset.Icc 1 4, {1, 4, 5}], + #[{1, 4, 5}, ∅, {1, 2}, Finset.Icc 1 4, {1}, ∅], + #[Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, {1}], + #[Finset.Icc 0 3, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, Finset.Icc 1 4], + #[Finset.Icc 1 4, {1}, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, {1}, Finset.Icc 1 4, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p3_local_5 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, {0, 1, 2}, ∅, {0, 1}, ∅], + #[{0, 1, 2}, ∅, {1, 4, 5}, Finset.Icc 1 4, Finset.Icc 0 3, Finset.Icc 0 4, {1, 4, 5}], + #[∅, {1, 4, 5}, ∅, {1, 2}, Finset.Icc 1 4, {1}, ∅], + #[{0, 1, 2}, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, Finset.Icc 0 4, {1}], + #[∅, Finset.Icc 0 3, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}], + #[{0, 1}, Finset.Icc 0 4, {1}, Finset.Icc 0 4, {1, 2}, ∅, {1, 2}], + #[∅, {1, 4, 5}, ∅, {1}, {2, 3, 4}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p3_local_5_eq_row_0 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_5 a b ∪ requiredMatrix 6 k6t3p3_step_5_data.required a b) 0 j = k6t3p3_local_5 0 j := by decide + +private theorem k6t3p3_local_5_eq_row_1 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_5 a b ∪ requiredMatrix 6 k6t3p3_step_5_data.required a b) 1 j = k6t3p3_local_5 1 j := by decide + +private theorem k6t3p3_local_5_eq_row_2 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_5 a b ∪ requiredMatrix 6 k6t3p3_step_5_data.required a b) 2 j = k6t3p3_local_5 2 j := by decide + +private theorem k6t3p3_local_5_eq_row_3 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_5 a b ∪ requiredMatrix 6 k6t3p3_step_5_data.required a b) 3 j = k6t3p3_local_5 3 j := by decide + +private theorem k6t3p3_local_5_eq_row_4 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_5 a b ∪ requiredMatrix 6 k6t3p3_step_5_data.required a b) 4 j = k6t3p3_local_5 4 j := by decide + +private theorem k6t3p3_local_5_eq_row_5 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_5 a b ∪ requiredMatrix 6 k6t3p3_step_5_data.required a b) 5 j = k6t3p3_local_5 5 j := by decide + +private theorem k6t3p3_local_5_eq_row_6 : ∀ j : Fin 7, (fun a b => freshMatrix k6t3p3_state_5 a b ∪ requiredMatrix 6 k6t3p3_step_5_data.required a b) 6 j = k6t3p3_local_5 6 j := by decide + +private theorem k6t3p3_local_5_eq : (fun a b => freshMatrix k6t3p3_state_5 a b ∪ requiredMatrix 6 k6t3p3_step_5_data.required a b) = k6t3p3_local_5 := by + funext i j + fin_cases i + + · exact k6t3p3_local_5_eq_row_0 j + + · exact k6t3p3_local_5_eq_row_1 j + + · exact k6t3p3_local_5_eq_row_2 j + + · exact k6t3p3_local_5_eq_row_3 j + + · exact k6t3p3_local_5_eq_row_4 j + + · exact k6t3p3_local_5_eq_row_5 j + + · exact k6t3p3_local_5_eq_row_6 j + +private theorem k6t3p3_local_5_paths : ∀ p ∈ k6t3p3_step_5_data.required, p.Check (freshGraph k6t3p3.graph k6t3p3_step_5_data.i k6t3p3_step_5_data.j) 6 := by decide + +private theorem k6t3p3_local_5_bad : k6t3p3_step_5_data.bad.Check (freshGraph k6t3p3.graph k6t3p3_step_5_data.i k6t3p3_step_5_data.j) k6t3p3_local_5 6 3 := by decide + +private theorem k6t3p3_step_5_check : k6t3p3_step_5.Check k6t3p3.graph k6t3p3_state_5 6 3 := by + change k6t3p3_step_5_data.Check k6t3p3.graph k6t3p3_state_5 6 3 + refine ⟨by decide, k6t3p3_local_5_paths, ?_⟩ + rw [k6t3p3_local_5_eq] + exact k6t3p3_local_5_bad + +private theorem k6t3p3_update_5 : k6t3p3_step_5.apply k6t3p3_state_5 = k6t3p3_state_6 := by + have h : ∀ i j : Fin 6, k6t3p3_step_5.apply k6t3p3_state_5 i j = k6t3p3_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t3p3_state_7 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 4, 5}, Finset.Icc 0 4, Finset.Icc 0 3, Finset.Icc 1 4, {1, 4, 5}], + #[{1, 4, 5}, ∅, {1, 2}, Finset.Icc 1 4, {1}, ∅], + #[Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, {1}], + #[Finset.Icc 0 3, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, Finset.Icc 1 4], + #[Finset.Icc 1 4, {1}, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, {1}, Finset.Icc 1 4, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p3_local_6 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 4, 5}, Finset.Icc 1 4, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{1, 4, 5}, ∅, {1, 2}, Finset.Icc 1 4, {1}, {1}], + #[Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, {1}], + #[Finset.Icc 0 4, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, Finset.Icc 1 4], + #[Finset.Icc 1 4, {1}, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[Finset.Icc 1 5, {1}, {1}, Finset.Icc 1 4, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p3_local_6_eq_row_0 : ∀ j : Fin 6, (fun a b => k6t3p3_state_6 a b ∪ requiredMatrix 6 k6t3p3_step_6_data.required a b) 0 j = k6t3p3_local_6 0 j := by decide + +private theorem k6t3p3_local_6_eq_row_1 : ∀ j : Fin 6, (fun a b => k6t3p3_state_6 a b ∪ requiredMatrix 6 k6t3p3_step_6_data.required a b) 1 j = k6t3p3_local_6 1 j := by decide + +private theorem k6t3p3_local_6_eq_row_2 : ∀ j : Fin 6, (fun a b => k6t3p3_state_6 a b ∪ requiredMatrix 6 k6t3p3_step_6_data.required a b) 2 j = k6t3p3_local_6 2 j := by decide + +private theorem k6t3p3_local_6_eq_row_3 : ∀ j : Fin 6, (fun a b => k6t3p3_state_6 a b ∪ requiredMatrix 6 k6t3p3_step_6_data.required a b) 3 j = k6t3p3_local_6 3 j := by decide + +private theorem k6t3p3_local_6_eq_row_4 : ∀ j : Fin 6, (fun a b => k6t3p3_state_6 a b ∪ requiredMatrix 6 k6t3p3_step_6_data.required a b) 4 j = k6t3p3_local_6 4 j := by decide + +private theorem k6t3p3_local_6_eq_row_5 : ∀ j : Fin 6, (fun a b => k6t3p3_state_6 a b ∪ requiredMatrix 6 k6t3p3_step_6_data.required a b) 5 j = k6t3p3_local_6 5 j := by decide + +private theorem k6t3p3_local_6_eq : (fun a b => k6t3p3_state_6 a b ∪ requiredMatrix 6 k6t3p3_step_6_data.required a b) = k6t3p3_local_6 := by + funext i j + fin_cases i + + · exact k6t3p3_local_6_eq_row_0 j + + · exact k6t3p3_local_6_eq_row_1 j + + · exact k6t3p3_local_6_eq_row_2 j + + · exact k6t3p3_local_6_eq_row_3 j + + · exact k6t3p3_local_6_eq_row_4 j + + · exact k6t3p3_local_6_eq_row_5 j + +private theorem k6t3p3_local_6_paths : ∀ p ∈ k6t3p3_step_6_data.required, p.Check (addedEdgeGraph k6t3p3.graph k6t3p3_step_6_data.i k6t3p3_step_6_data.j) 6 := by decide + +private theorem k6t3p3_local_6_bad : k6t3p3_step_6_data.bad.Check (addedEdgeGraph k6t3p3.graph k6t3p3_step_6_data.i k6t3p3_step_6_data.j) k6t3p3_local_6 6 3 := by decide + +private theorem k6t3p3_step_6_check : k6t3p3_step_6.Check k6t3p3.graph k6t3p3_state_6 6 3 := by + change k6t3p3_step_6_data.Check k6t3p3.graph k6t3p3_state_6 6 3 + refine ⟨k6t3p3_local_6_paths, ?_⟩ + rw [k6t3p3_local_6_eq] + exact k6t3p3_local_6_bad + +private theorem k6t3p3_update_6 : k6t3p3_step_6.apply k6t3p3_state_6 = k6t3p3_state_7 := by + have h : ∀ i j : Fin 6, k6t3p3_step_6.apply k6t3p3_state_6 i j = k6t3p3_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t3p3_state_8 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 4, 5}, Finset.Icc 0 4, Finset.Icc 0 3, Finset.Icc 1 4, {1, 4, 5}], + #[{1, 4, 5}, ∅, {1, 2}, Finset.Icc 0 4, {1}, ∅], + #[Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, {1}], + #[Finset.Icc 0 3, Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, Finset.Icc 1 4], + #[Finset.Icc 1 4, {1}, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, {1}, Finset.Icc 1 4, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p3_local_7 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 4, 5}, Finset.Icc 0 4, Finset.Icc 0 3, Finset.Icc 1 4, {1, 4, 5}], + #[{1, 4, 5}, ∅, {1, 2}, Finset.Icc 1 4, {1}, ∅], + #[Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, Finset.Icc 1 4, {1}], + #[Finset.Icc 0 3, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}, Finset.Icc 1 4], + #[Finset.Icc 1 4, {1}, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, {1}, Finset.Icc 1 4, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p3_local_7_eq_row_0 : ∀ j : Fin 6, (fun a b => k6t3p3_state_7 a b ∪ requiredMatrix 6 k6t3p3_step_7_data.required a b) 0 j = k6t3p3_local_7 0 j := by decide + +private theorem k6t3p3_local_7_eq_row_1 : ∀ j : Fin 6, (fun a b => k6t3p3_state_7 a b ∪ requiredMatrix 6 k6t3p3_step_7_data.required a b) 1 j = k6t3p3_local_7 1 j := by decide + +private theorem k6t3p3_local_7_eq_row_2 : ∀ j : Fin 6, (fun a b => k6t3p3_state_7 a b ∪ requiredMatrix 6 k6t3p3_step_7_data.required a b) 2 j = k6t3p3_local_7 2 j := by decide + +private theorem k6t3p3_local_7_eq_row_3 : ∀ j : Fin 6, (fun a b => k6t3p3_state_7 a b ∪ requiredMatrix 6 k6t3p3_step_7_data.required a b) 3 j = k6t3p3_local_7 3 j := by decide + +private theorem k6t3p3_local_7_eq_row_4 : ∀ j : Fin 6, (fun a b => k6t3p3_state_7 a b ∪ requiredMatrix 6 k6t3p3_step_7_data.required a b) 4 j = k6t3p3_local_7 4 j := by decide + +private theorem k6t3p3_local_7_eq_row_5 : ∀ j : Fin 6, (fun a b => k6t3p3_state_7 a b ∪ requiredMatrix 6 k6t3p3_step_7_data.required a b) 5 j = k6t3p3_local_7 5 j := by decide + +private theorem k6t3p3_local_7_eq : (fun a b => k6t3p3_state_7 a b ∪ requiredMatrix 6 k6t3p3_step_7_data.required a b) = k6t3p3_local_7 := by + funext i j + fin_cases i + + · exact k6t3p3_local_7_eq_row_0 j + + · exact k6t3p3_local_7_eq_row_1 j + + · exact k6t3p3_local_7_eq_row_2 j + + · exact k6t3p3_local_7_eq_row_3 j + + · exact k6t3p3_local_7_eq_row_4 j + + · exact k6t3p3_local_7_eq_row_5 j + +private theorem k6t3p3_local_7_paths : ∀ p ∈ k6t3p3_step_7_data.required, p.Check (addedEdgeGraph k6t3p3.graph k6t3p3_step_7_data.i k6t3p3_step_7_data.j) 6 := by decide + +private theorem k6t3p3_local_7_bad : k6t3p3_step_7_data.bad.Check (addedEdgeGraph k6t3p3.graph k6t3p3_step_7_data.i k6t3p3_step_7_data.j) k6t3p3_local_7 6 3 := by decide + +private theorem k6t3p3_step_7_check : k6t3p3_step_7.Check k6t3p3.graph k6t3p3_state_7 6 3 := by + change k6t3p3_step_7_data.Check k6t3p3.graph k6t3p3_state_7 6 3 + refine ⟨k6t3p3_local_7_paths, ?_⟩ + rw [k6t3p3_local_7_eq] + exact k6t3p3_local_7_bad + +private theorem k6t3p3_update_7 : k6t3p3_step_7.apply k6t3p3_state_7 = k6t3p3_state_8 := by + have h : ∀ i j : Fin 6, k6t3p3_step_7.apply k6t3p3_state_7 i j = k6t3p3_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t3p3_state_9 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 4, 5}, Finset.Icc 0 4, Finset.Icc 0 3, Finset.Icc 0 4, {1, 4, 5}], + #[{1, 4, 5}, ∅, {1, 2}, Finset.Icc 0 4, {1}, ∅], + #[Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, {1}], + #[Finset.Icc 0 3, Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, Finset.Icc 1 4], + #[Finset.Icc 0 4, {1}, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, {1}, Finset.Icc 1 4, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p3_local_8 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, {1, 4, 5}], + #[Finset.Icc 1 5, ∅, {1, 2}, Finset.Icc 0 4, {1}, {1}], + #[Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, {1}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, Finset.Icc 1 4], + #[Finset.Icc 1 4, {1}, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, {1}, {1}, Finset.Icc 1 4, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p3_local_8_eq_row_0 : ∀ j : Fin 6, (fun a b => k6t3p3_state_8 a b ∪ requiredMatrix 6 k6t3p3_step_8_data.required a b) 0 j = k6t3p3_local_8 0 j := by decide + +private theorem k6t3p3_local_8_eq_row_1 : ∀ j : Fin 6, (fun a b => k6t3p3_state_8 a b ∪ requiredMatrix 6 k6t3p3_step_8_data.required a b) 1 j = k6t3p3_local_8 1 j := by decide + +private theorem k6t3p3_local_8_eq_row_2 : ∀ j : Fin 6, (fun a b => k6t3p3_state_8 a b ∪ requiredMatrix 6 k6t3p3_step_8_data.required a b) 2 j = k6t3p3_local_8 2 j := by decide + +private theorem k6t3p3_local_8_eq_row_3 : ∀ j : Fin 6, (fun a b => k6t3p3_state_8 a b ∪ requiredMatrix 6 k6t3p3_step_8_data.required a b) 3 j = k6t3p3_local_8 3 j := by decide + +private theorem k6t3p3_local_8_eq_row_4 : ∀ j : Fin 6, (fun a b => k6t3p3_state_8 a b ∪ requiredMatrix 6 k6t3p3_step_8_data.required a b) 4 j = k6t3p3_local_8 4 j := by decide + +private theorem k6t3p3_local_8_eq_row_5 : ∀ j : Fin 6, (fun a b => k6t3p3_state_8 a b ∪ requiredMatrix 6 k6t3p3_step_8_data.required a b) 5 j = k6t3p3_local_8 5 j := by decide + +private theorem k6t3p3_local_8_eq : (fun a b => k6t3p3_state_8 a b ∪ requiredMatrix 6 k6t3p3_step_8_data.required a b) = k6t3p3_local_8 := by + funext i j + fin_cases i + + · exact k6t3p3_local_8_eq_row_0 j + + · exact k6t3p3_local_8_eq_row_1 j + + · exact k6t3p3_local_8_eq_row_2 j + + · exact k6t3p3_local_8_eq_row_3 j + + · exact k6t3p3_local_8_eq_row_4 j + + · exact k6t3p3_local_8_eq_row_5 j + +private theorem k6t3p3_local_8_paths : ∀ p ∈ k6t3p3_step_8_data.required, p.Check (addedEdgeGraph k6t3p3.graph k6t3p3_step_8_data.i k6t3p3_step_8_data.j) 6 := by decide + +private theorem k6t3p3_local_8_bad : k6t3p3_step_8_data.bad.Check (addedEdgeGraph k6t3p3.graph k6t3p3_step_8_data.i k6t3p3_step_8_data.j) k6t3p3_local_8 6 3 := by decide + +private theorem k6t3p3_step_8_check : k6t3p3_step_8.Check k6t3p3.graph k6t3p3_state_8 6 3 := by + change k6t3p3_step_8_data.Check k6t3p3.graph k6t3p3_state_8 6 3 + refine ⟨k6t3p3_local_8_paths, ?_⟩ + rw [k6t3p3_local_8_eq] + exact k6t3p3_local_8_bad + +private theorem k6t3p3_update_8 : k6t3p3_step_8.apply k6t3p3_state_8 = k6t3p3_state_9 := by + have h : ∀ i j : Fin 6, k6t3p3_step_8.apply k6t3p3_state_8 i j = k6t3p3_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t3p3_state_10 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 4, 5}, Finset.Icc 0 4, Finset.Icc 0 3, Finset.Icc 0 4, {1, 4, 5}], + #[{1, 4, 5}, ∅, {1, 2}, Finset.Icc 0 4, {1}, ∅], + #[Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, {1}], + #[Finset.Icc 0 3, Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, Finset.Icc 0 4], + #[Finset.Icc 0 4, {1}, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, {1}, Finset.Icc 0 4, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p3_local_9 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 4, 5}, Finset.Icc 0 4, Finset.Icc 0 3, Finset.Icc 0 4, {1, 4, 5}], + #[{1, 4, 5}, ∅, {1, 2}, Finset.Icc 0 4, {1}, ∅], + #[Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, Finset.Icc 1 4, {1}], + #[Finset.Icc 0 3, Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, Finset.Icc 1 4], + #[Finset.Icc 0 4, {1}, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, {1}, Finset.Icc 1 4, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p3_local_9_eq_row_0 : ∀ j : Fin 6, (fun a b => k6t3p3_state_9 a b ∪ requiredMatrix 6 k6t3p3_step_9_data.required a b) 0 j = k6t3p3_local_9 0 j := by decide + +private theorem k6t3p3_local_9_eq_row_1 : ∀ j : Fin 6, (fun a b => k6t3p3_state_9 a b ∪ requiredMatrix 6 k6t3p3_step_9_data.required a b) 1 j = k6t3p3_local_9 1 j := by decide + +private theorem k6t3p3_local_9_eq_row_2 : ∀ j : Fin 6, (fun a b => k6t3p3_state_9 a b ∪ requiredMatrix 6 k6t3p3_step_9_data.required a b) 2 j = k6t3p3_local_9 2 j := by decide + +private theorem k6t3p3_local_9_eq_row_3 : ∀ j : Fin 6, (fun a b => k6t3p3_state_9 a b ∪ requiredMatrix 6 k6t3p3_step_9_data.required a b) 3 j = k6t3p3_local_9 3 j := by decide + +private theorem k6t3p3_local_9_eq_row_4 : ∀ j : Fin 6, (fun a b => k6t3p3_state_9 a b ∪ requiredMatrix 6 k6t3p3_step_9_data.required a b) 4 j = k6t3p3_local_9 4 j := by decide + +private theorem k6t3p3_local_9_eq_row_5 : ∀ j : Fin 6, (fun a b => k6t3p3_state_9 a b ∪ requiredMatrix 6 k6t3p3_step_9_data.required a b) 5 j = k6t3p3_local_9 5 j := by decide + +private theorem k6t3p3_local_9_eq : (fun a b => k6t3p3_state_9 a b ∪ requiredMatrix 6 k6t3p3_step_9_data.required a b) = k6t3p3_local_9 := by + funext i j + fin_cases i + + · exact k6t3p3_local_9_eq_row_0 j + + · exact k6t3p3_local_9_eq_row_1 j + + · exact k6t3p3_local_9_eq_row_2 j + + · exact k6t3p3_local_9_eq_row_3 j + + · exact k6t3p3_local_9_eq_row_4 j + + · exact k6t3p3_local_9_eq_row_5 j + +private theorem k6t3p3_local_9_paths : ∀ p ∈ k6t3p3_step_9_data.required, p.Check (addedEdgeGraph k6t3p3.graph k6t3p3_step_9_data.i k6t3p3_step_9_data.j) 6 := by decide + +private theorem k6t3p3_local_9_bad : k6t3p3_step_9_data.bad.Check (addedEdgeGraph k6t3p3.graph k6t3p3_step_9_data.i k6t3p3_step_9_data.j) k6t3p3_local_9 6 3 := by decide + +private theorem k6t3p3_step_9_check : k6t3p3_step_9.Check k6t3p3.graph k6t3p3_state_9 6 3 := by + change k6t3p3_step_9_data.Check k6t3p3.graph k6t3p3_state_9 6 3 + refine ⟨k6t3p3_local_9_paths, ?_⟩ + rw [k6t3p3_local_9_eq] + exact k6t3p3_local_9_bad + +private theorem k6t3p3_update_9 : k6t3p3_step_9.apply k6t3p3_state_9 = k6t3p3_state_10 := by + have h : ∀ i j : Fin 6, k6t3p3_step_9.apply k6t3p3_state_9 i j = k6t3p3_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t3p3_state_11 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 4, 5}, Finset.Icc 0 4, Finset.Icc 0 3, Finset.Icc 0 4, {1, 4, 5}], + #[{1, 4, 5}, ∅, {1, 2}, Finset.Icc 0 4, {1}, ∅], + #[Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, {0, 2, 3, 4}, {1}], + #[Finset.Icc 0 3, Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, Finset.Icc 0 4], + #[Finset.Icc 0 4, {1}, {0, 2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, {1}, Finset.Icc 0 4, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t3p3_local_10 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5}, Finset.Icc 0 4, Finset.Icc 0 3, Finset.Icc 0 4, {1, 4, 5}], + #[{1, 2, 4, 5}, ∅, {1, 2}, Finset.Icc 0 4, {1}, ∅], + #[Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, {2, 3, 4}, {1}], + #[Finset.Icc 0 3, Finset.Icc 0 4, {1, 2}, ∅, {1, 2}, Finset.Icc 0 4], + #[Finset.Icc 0 4, {1}, {2, 3, 4}, {1, 2}, ∅, {1, 2}], + #[{1, 4, 5}, ∅, {1}, Finset.Icc 0 4, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p3_local_10_eq_row_0 : ∀ j : Fin 6, (fun a b => k6t3p3_state_10 a b ∪ requiredMatrix 6 k6t3p3_step_10_data.required a b) 0 j = k6t3p3_local_10 0 j := by decide + +private theorem k6t3p3_local_10_eq_row_1 : ∀ j : Fin 6, (fun a b => k6t3p3_state_10 a b ∪ requiredMatrix 6 k6t3p3_step_10_data.required a b) 1 j = k6t3p3_local_10 1 j := by decide + +private theorem k6t3p3_local_10_eq_row_2 : ∀ j : Fin 6, (fun a b => k6t3p3_state_10 a b ∪ requiredMatrix 6 k6t3p3_step_10_data.required a b) 2 j = k6t3p3_local_10 2 j := by decide + +private theorem k6t3p3_local_10_eq_row_3 : ∀ j : Fin 6, (fun a b => k6t3p3_state_10 a b ∪ requiredMatrix 6 k6t3p3_step_10_data.required a b) 3 j = k6t3p3_local_10 3 j := by decide + +private theorem k6t3p3_local_10_eq_row_4 : ∀ j : Fin 6, (fun a b => k6t3p3_state_10 a b ∪ requiredMatrix 6 k6t3p3_step_10_data.required a b) 4 j = k6t3p3_local_10 4 j := by decide + +private theorem k6t3p3_local_10_eq_row_5 : ∀ j : Fin 6, (fun a b => k6t3p3_state_10 a b ∪ requiredMatrix 6 k6t3p3_step_10_data.required a b) 5 j = k6t3p3_local_10 5 j := by decide + +private theorem k6t3p3_local_10_eq : (fun a b => k6t3p3_state_10 a b ∪ requiredMatrix 6 k6t3p3_step_10_data.required a b) = k6t3p3_local_10 := by + funext i j + fin_cases i + + · exact k6t3p3_local_10_eq_row_0 j + + · exact k6t3p3_local_10_eq_row_1 j + + · exact k6t3p3_local_10_eq_row_2 j + + · exact k6t3p3_local_10_eq_row_3 j + + · exact k6t3p3_local_10_eq_row_4 j + + · exact k6t3p3_local_10_eq_row_5 j + +private theorem k6t3p3_local_10_paths : ∀ p ∈ k6t3p3_step_10_data.required, p.Check (addedEdgeGraph k6t3p3.graph k6t3p3_step_10_data.i k6t3p3_step_10_data.j) 6 := by decide + +private theorem k6t3p3_local_10_bad : k6t3p3_step_10_data.bad.Check (addedEdgeGraph k6t3p3.graph k6t3p3_step_10_data.i k6t3p3_step_10_data.j) k6t3p3_local_10 6 3 := by decide + +private theorem k6t3p3_step_10_check : k6t3p3_step_10.Check k6t3p3.graph k6t3p3_state_10 6 3 := by + change k6t3p3_step_10_data.Check k6t3p3.graph k6t3p3_state_10 6 3 + refine ⟨k6t3p3_local_10_paths, ?_⟩ + rw [k6t3p3_local_10_eq] + exact k6t3p3_local_10_bad + +private theorem k6t3p3_update_10 : k6t3p3_step_10.apply k6t3p3_state_10 = k6t3p3_state_11 := by + have h : ∀ i j : Fin 6, k6t3p3_step_10.apply k6t3p3_state_10 i j = k6t3p3_state_11 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k6t3p3_closure_11 : ClosureCheck k6t3p3.graph k6t3p3_state_11 6 3 [] := by trivial + +private theorem k6t3p3_closure_10 : ClosureCheck k6t3p3.graph k6t3p3_state_10 6 3 [k6t3p3_step_10] := by + constructor + · exact k6t3p3_step_10_check + · rw [k6t3p3_update_10] + exact k6t3p3_closure_11 + +private theorem k6t3p3_closure_9 : ClosureCheck k6t3p3.graph k6t3p3_state_9 6 3 [k6t3p3_step_9, k6t3p3_step_10] := by + constructor + · exact k6t3p3_step_9_check + · rw [k6t3p3_update_9] + exact k6t3p3_closure_10 + +private theorem k6t3p3_closure_8 : ClosureCheck k6t3p3.graph k6t3p3_state_8 6 3 [k6t3p3_step_8, k6t3p3_step_9, k6t3p3_step_10] := by + constructor + · exact k6t3p3_step_8_check + · rw [k6t3p3_update_8] + exact k6t3p3_closure_9 + +private theorem k6t3p3_closure_7 : ClosureCheck k6t3p3.graph k6t3p3_state_7 6 3 [k6t3p3_step_7, k6t3p3_step_8, k6t3p3_step_9, k6t3p3_step_10] := by + constructor + · exact k6t3p3_step_7_check + · rw [k6t3p3_update_7] + exact k6t3p3_closure_8 + +private theorem k6t3p3_closure_6 : ClosureCheck k6t3p3.graph k6t3p3_state_6 6 3 [k6t3p3_step_6, k6t3p3_step_7, k6t3p3_step_8, k6t3p3_step_9, k6t3p3_step_10] := by + constructor + · exact k6t3p3_step_6_check + · rw [k6t3p3_update_6] + exact k6t3p3_closure_7 + +private theorem k6t3p3_closure_5 : ClosureCheck k6t3p3.graph k6t3p3_state_5 6 3 [k6t3p3_step_5, k6t3p3_step_6, k6t3p3_step_7, k6t3p3_step_8, k6t3p3_step_9, k6t3p3_step_10] := by + constructor + · exact k6t3p3_step_5_check + · rw [k6t3p3_update_5] + exact k6t3p3_closure_6 + +private theorem k6t3p3_closure_4 : ClosureCheck k6t3p3.graph k6t3p3_state_4 6 3 [k6t3p3_step_4, k6t3p3_step_5, k6t3p3_step_6, k6t3p3_step_7, k6t3p3_step_8, k6t3p3_step_9, k6t3p3_step_10] := by + constructor + · exact k6t3p3_step_4_check + · rw [k6t3p3_update_4] + exact k6t3p3_closure_5 + +private theorem k6t3p3_closure_3 : ClosureCheck k6t3p3.graph k6t3p3_state_3 6 3 [k6t3p3_step_3, k6t3p3_step_4, k6t3p3_step_5, k6t3p3_step_6, k6t3p3_step_7, k6t3p3_step_8, k6t3p3_step_9, k6t3p3_step_10] := by + constructor + · exact k6t3p3_step_3_check + · rw [k6t3p3_update_3] + exact k6t3p3_closure_4 + +private theorem k6t3p3_closure_2 : ClosureCheck k6t3p3.graph k6t3p3_state_2 6 3 [k6t3p3_step_2, k6t3p3_step_3, k6t3p3_step_4, k6t3p3_step_5, k6t3p3_step_6, k6t3p3_step_7, k6t3p3_step_8, k6t3p3_step_9, k6t3p3_step_10] := by + constructor + · exact k6t3p3_step_2_check + · rw [k6t3p3_update_2] + exact k6t3p3_closure_3 + +private theorem k6t3p3_closure_1 : ClosureCheck k6t3p3.graph k6t3p3_state_1 6 3 [k6t3p3_step_1, k6t3p3_step_2, k6t3p3_step_3, k6t3p3_step_4, k6t3p3_step_5, k6t3p3_step_6, k6t3p3_step_7, k6t3p3_step_8, k6t3p3_step_9, k6t3p3_step_10] := by + constructor + · exact k6t3p3_step_1_check + · rw [k6t3p3_update_1] + exact k6t3p3_closure_2 + +private theorem k6t3p3_closure_0 : ClosureCheck k6t3p3.graph k6t3p3_state_0 6 3 [k6t3p3_step_0, k6t3p3_step_1, k6t3p3_step_2, k6t3p3_step_3, k6t3p3_step_4, k6t3p3_step_5, k6t3p3_step_6, k6t3p3_step_7, k6t3p3_step_8, k6t3p3_step_9, k6t3p3_step_10] := by + constructor + · exact k6t3p3_step_0_check + · rw [k6t3p3_update_0] + exact k6t3p3_closure_1 + +private theorem k6t3p3_matrix_eq : k6t3p3.matrix 6 = k6t3p3_state_11 := by + change closureMatrix (k6t3p3.initialMatrix 6) _ = _ + rw [k6t3p3_initial_eq] + change closureMatrix k6t3p3_state_0 [k6t3p3_step_0, k6t3p3_step_1, k6t3p3_step_2, k6t3p3_step_3, k6t3p3_step_4, k6t3p3_step_5, k6t3p3_step_6, k6t3p3_step_7, k6t3p3_step_8, k6t3p3_step_9, k6t3p3_step_10] = _ + simp only [closureMatrix] + rw [k6t3p3_update_0, k6t3p3_update_1, k6t3p3_update_2, k6t3p3_update_3, k6t3p3_update_4, k6t3p3_update_5, k6t3p3_update_6, k6t3p3_update_7, k6t3p3_update_8, k6t3p3_update_9, k6t3p3_update_10] + +private theorem k6t3p3_part_0 : k6t3p3.chains.flatten = List.finRange _ := by decide + +private theorem k6t3p3_part_1 : k6t3p3.chains.map List.length = ([[], [3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k6t3p3_part_2 : k6t3p3.chains.map (fun l => l.map (fun i => decide (i ∈ k6t3p3.clique))) = ([[], [3]] : List (List ℕ)).map profileMask := by decide + +private theorem k6t3p3_templates_item_0 : (⟨0, 1, [], [], [], 4, 5⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5], 1, 1⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_templates_item_2 : (⟨0, 2, [], [], [1], 3, 4⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_templates_item_3 : (⟨0, 2, [], [], [3, 4, 5], 1, 2⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_templates_item_4 : (⟨0, 3, [], [], [2, 1], 2, 3⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_templates_item_5 : (⟨0, 4, [], [], [3, 2, 1], 1, 2⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_templates_item_6 : (⟨0, 4, [], [], [5], 3, 4⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_templates_item_7 : (⟨0, 5, [], [], [], 4, 5⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_templates_item_8 : (⟨0, 5, [], [], [4, 3, 2, 1], 1, 1⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_templates_item_9 : (⟨1, 2, [], [], [3, 4, 5], 1, 2⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_templates_item_10 : (⟨1, 3, [], [], [4, 5], 2, 3⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_templates_item_11 : (⟨2, 3, [], [1], [4, 5], 1, 2⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_templates_item_12 : (⟨2, 4, [], [1], [5], 2, 3⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_templates_item_13 : (⟨3, 4, [], [1, 2], [5], 1, 2⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_templates_item_14 : (⟨3, 5, [], [1, 2], [], 2, 3⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_templates_item_15 : (⟨4, 5, [], [1, 2, 3], [], 1, 2⟩ : TemplateData (Fin 6)).Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p3_part_3 : ∀ T ∈ k6t3p3.templates, T.Check k6t3p3.graph k6t3p3.clique 6 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k6t3p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t3p3_templates_item_0, k6t3p3_templates_item_1, k6t3p3_templates_item_2, k6t3p3_templates_item_3, k6t3p3_templates_item_4, k6t3p3_templates_item_5, k6t3p3_templates_item_6, k6t3p3_templates_item_7, k6t3p3_templates_item_8, k6t3p3_templates_item_9, k6t3p3_templates_item_10, k6t3p3_templates_item_11, k6t3p3_templates_item_12, k6t3p3_templates_item_13, k6t3p3_templates_item_14, k6t3p3_templates_item_15⟩ + +private theorem k6t3p3_required_item_0 : (⟨1, 3, [2]⟩ : RequiredPathData (Fin 6)).Check k6t3p3.graph 6 := by decide + +private theorem k6t3p3_required_item_1 : (⟨2, 4, [3]⟩ : RequiredPathData (Fin 6)).Check k6t3p3.graph 6 := by decide + +private theorem k6t3p3_required_item_2 : (⟨3, 5, [4]⟩ : RequiredPathData (Fin 6)).Check k6t3p3.graph 6 := by decide + +private theorem k6t3p3_part_4 : ∀ p ∈ k6t3p3.required, p.Check k6t3p3.graph 6 := by + simp only [k6t3p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t3p3_required_item_0, k6t3p3_required_item_1, k6t3p3_required_item_2⟩ + +private theorem k6t3p3_part_5 : ClosureCheck k6t3p3.graph (k6t3p3.initialMatrix 6) 6 3 k6t3p3.closure := by + rw [k6t3p3_initial_eq] + exact k6t3p3_closure_0 + +private theorem k6t3p3_part_6 : k6t3p3.bad.Check k6t3p3.graph (k6t3p3.matrix 6) 6 3 := by + rw [k6t3p3_matrix_eq] + decide + +theorem k6t3p3_check : k6t3p3.Check 6 3 [[], [3]] := + ⟨k6t3p3_part_0, k6t3p3_part_1, k6t3p3_part_2, k6t3p3_part_3, k6t3p3_part_4, k6t3p3_part_5, k6t3p3_part_6⟩ +def k6t3p4 : LayoutCertificate 5 where + chains := [[0, 1, 2, 3, 4]] + clique := {0, 2, 4} + templates := [⟨0, 1, [], [], [2], 1, 4⟩, + ⟨0, 3, [], [], [2], 1, 4⟩, + ⟨1, 2, [], [0], [], 1, 4⟩, + ⟨1, 3, [], [0], [2], 1, 3⟩, + ⟨1, 4, [], [0], [], 1, 4⟩, + ⟨2, 3, [], [], [4], 1, 4⟩, + ⟨3, 4, [], [2], [], 1, 4⟩] + required := [⟨1, 2, []⟩, + ⟨1, 3, [2]⟩, + ⟨2, 3, []⟩] + closure := [] + bad := ⟨none, {(1, 2), (3, 2), (2, 3)}⟩ + + +private def k6t3p4_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4], + #[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5, ∅, Finset.Icc 1 4], + #[∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p4_initial_eq_row_0 : ∀ j : Fin 5, (k6t3p4.initialMatrix 6) 0 j = k6t3p4_state_0 0 j := by decide + +private theorem k6t3p4_initial_eq_row_1 : ∀ j : Fin 5, (k6t3p4.initialMatrix 6) 1 j = k6t3p4_state_0 1 j := by decide + +private theorem k6t3p4_initial_eq_row_2 : ∀ j : Fin 5, (k6t3p4.initialMatrix 6) 2 j = k6t3p4_state_0 2 j := by decide + +private theorem k6t3p4_initial_eq_row_3 : ∀ j : Fin 5, (k6t3p4.initialMatrix 6) 3 j = k6t3p4_state_0 3 j := by decide + +private theorem k6t3p4_initial_eq_row_4 : ∀ j : Fin 5, (k6t3p4.initialMatrix 6) 4 j = k6t3p4_state_0 4 j := by decide + +private theorem k6t3p4_initial_eq : (k6t3p4.initialMatrix 6) = k6t3p4_state_0 := by + funext i j + fin_cases i + + · exact k6t3p4_initial_eq_row_0 j + + · exact k6t3p4_initial_eq_row_1 j + + · exact k6t3p4_initial_eq_row_2 j + + · exact k6t3p4_initial_eq_row_3 j + + · exact k6t3p4_initial_eq_row_4 j + +private theorem k6t3p4_closure_0 : ClosureCheck k6t3p4.graph k6t3p4_state_0 6 3 [] := by trivial + +private theorem k6t3p4_matrix_eq : k6t3p4.matrix 6 = k6t3p4_state_0 := by + change closureMatrix (k6t3p4.initialMatrix 6) _ = _ + rw [k6t3p4_initial_eq] + change closureMatrix k6t3p4_state_0 [] = _ + rfl + +private theorem k6t3p4_part_0 : k6t3p4.chains.flatten = List.finRange _ := by decide + +private theorem k6t3p4_part_1 : k6t3p4.chains.map List.length = ([[1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k6t3p4_part_2 : k6t3p4.chains.map (fun l => l.map (fun i => decide (i ∈ k6t3p4.clique))) = ([[1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k6t3p4_templates_item_0 : (⟨0, 1, [], [], [2], 1, 4⟩ : TemplateData (Fin 5)).Check k6t3p4.graph k6t3p4.clique 6 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p4_templates_item_1 : (⟨0, 3, [], [], [2], 1, 4⟩ : TemplateData (Fin 5)).Check k6t3p4.graph k6t3p4.clique 6 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p4_templates_item_2 : (⟨1, 2, [], [0], [], 1, 4⟩ : TemplateData (Fin 5)).Check k6t3p4.graph k6t3p4.clique 6 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p4_templates_item_3 : (⟨1, 3, [], [0], [2], 1, 3⟩ : TemplateData (Fin 5)).Check k6t3p4.graph k6t3p4.clique 6 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p4_templates_item_4 : (⟨1, 4, [], [0], [], 1, 4⟩ : TemplateData (Fin 5)).Check k6t3p4.graph k6t3p4.clique 6 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p4_templates_item_5 : (⟨2, 3, [], [], [4], 1, 4⟩ : TemplateData (Fin 5)).Check k6t3p4.graph k6t3p4.clique 6 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p4_templates_item_6 : (⟨3, 4, [], [2], [], 1, 4⟩ : TemplateData (Fin 5)).Check k6t3p4.graph k6t3p4.clique 6 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p4_part_3 : ∀ T ∈ k6t3p4.templates, T.Check k6t3p4.graph k6t3p4.clique 6 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k6t3p4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t3p4_templates_item_0, k6t3p4_templates_item_1, k6t3p4_templates_item_2, k6t3p4_templates_item_3, k6t3p4_templates_item_4, k6t3p4_templates_item_5, k6t3p4_templates_item_6⟩ + +private theorem k6t3p4_required_item_0 : (⟨1, 2, []⟩ : RequiredPathData (Fin 5)).Check k6t3p4.graph 6 := by decide + +private theorem k6t3p4_required_item_1 : (⟨1, 3, [2]⟩ : RequiredPathData (Fin 5)).Check k6t3p4.graph 6 := by decide + +private theorem k6t3p4_required_item_2 : (⟨2, 3, []⟩ : RequiredPathData (Fin 5)).Check k6t3p4.graph 6 := by decide + +private theorem k6t3p4_part_4 : ∀ p ∈ k6t3p4.required, p.Check k6t3p4.graph 6 := by + simp only [k6t3p4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t3p4_required_item_0, k6t3p4_required_item_1, k6t3p4_required_item_2⟩ + +private theorem k6t3p4_part_5 : ClosureCheck k6t3p4.graph (k6t3p4.initialMatrix 6) 6 3 k6t3p4.closure := by + rw [k6t3p4_initial_eq] + exact k6t3p4_closure_0 + +private theorem k6t3p4_part_6 : k6t3p4.bad.Check k6t3p4.graph (k6t3p4.matrix 6) 6 3 := by + rw [k6t3p4_matrix_eq] + decide + +theorem k6t3p4_check : k6t3p4.Check 6 3 [[1, 1]] := + ⟨k6t3p4_part_0, k6t3p4_part_1, k6t3p4_part_2, k6t3p4_part_3, k6t3p4_part_4, k6t3p4_part_5, k6t3p4_part_6⟩ +def k6t3p5 : LayoutCertificate 6 where + chains := [[0, 1, 2, 3, 4, 5]] + clique := {0, 2, 5} + templates := [⟨0, 1, [], [], [2], 2, 4⟩, + ⟨0, 1, [], [], [2, 3, 4, 5], 1, 1⟩, + ⟨0, 3, [], [], [4, 5], 1, 3⟩, + ⟨0, 4, [], [], [3, 2], 1, 3⟩, + ⟨0, 5, [], [], [], 3, 5⟩, + ⟨0, 5, [], [], [4, 3, 2], 2, 2⟩, + ⟨1, 2, [], [0], [3, 4, 5], 1, 1⟩, + ⟨1, 3, [], [0], [2], 1, 3⟩, + ⟨1, 4, [], [0], [3, 2], 1, 2⟩, + ⟨1, 5, [], [0], [], 2, 4⟩, + ⟨1, 5, [], [0], [4, 3, 2], 1, 1⟩, + ⟨4, 5, [], [2, 3], [], 1, 3⟩] + required := [⟨0, 5, [1, 2, 3, 4]⟩] + closure := [] + bad := ⟨none, {(0, 2), (1, 2), (5, 2), (4, 0)}⟩ + + +private def k6t3p5_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 4, ∅, {1, 2, 3}, {1, 2, 3}, Finset.Icc 1 5], + #[Finset.Icc 1 4, ∅, {1}, {1, 2, 3}, {1, 2}, Finset.Icc 1 4], + #[∅, {1}, ∅, ∅, ∅, ∅], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, ∅], + #[{1, 2, 3}, {1, 2}, ∅, ∅, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 4, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t3p5_initial_eq_row_0 : ∀ j : Fin 6, (k6t3p5.initialMatrix 6) 0 j = k6t3p5_state_0 0 j := by decide + +private theorem k6t3p5_initial_eq_row_1 : ∀ j : Fin 6, (k6t3p5.initialMatrix 6) 1 j = k6t3p5_state_0 1 j := by decide + +private theorem k6t3p5_initial_eq_row_2 : ∀ j : Fin 6, (k6t3p5.initialMatrix 6) 2 j = k6t3p5_state_0 2 j := by decide + +private theorem k6t3p5_initial_eq_row_3 : ∀ j : Fin 6, (k6t3p5.initialMatrix 6) 3 j = k6t3p5_state_0 3 j := by decide + +private theorem k6t3p5_initial_eq_row_4 : ∀ j : Fin 6, (k6t3p5.initialMatrix 6) 4 j = k6t3p5_state_0 4 j := by decide + +private theorem k6t3p5_initial_eq_row_5 : ∀ j : Fin 6, (k6t3p5.initialMatrix 6) 5 j = k6t3p5_state_0 5 j := by decide + +private theorem k6t3p5_initial_eq : (k6t3p5.initialMatrix 6) = k6t3p5_state_0 := by + funext i j + fin_cases i + + · exact k6t3p5_initial_eq_row_0 j + + · exact k6t3p5_initial_eq_row_1 j + + · exact k6t3p5_initial_eq_row_2 j + + · exact k6t3p5_initial_eq_row_3 j + + · exact k6t3p5_initial_eq_row_4 j + + · exact k6t3p5_initial_eq_row_5 j + +private theorem k6t3p5_closure_0 : ClosureCheck k6t3p5.graph k6t3p5_state_0 6 3 [] := by trivial + +private theorem k6t3p5_matrix_eq : k6t3p5.matrix 6 = k6t3p5_state_0 := by + change closureMatrix (k6t3p5.initialMatrix 6) _ = _ + rw [k6t3p5_initial_eq] + change closureMatrix k6t3p5_state_0 [] = _ + rfl + +private theorem k6t3p5_part_0 : k6t3p5.chains.flatten = List.finRange _ := by decide + +private theorem k6t3p5_part_1 : k6t3p5.chains.map List.length = ([[1, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k6t3p5_part_2 : k6t3p5.chains.map (fun l => l.map (fun i => decide (i ∈ k6t3p5.clique))) = ([[1, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k6t3p5_templates_item_0 : (⟨0, 1, [], [], [2], 2, 4⟩ : TemplateData (Fin 6)).Check k6t3p5.graph k6t3p5.clique 6 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p5_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5], 1, 1⟩ : TemplateData (Fin 6)).Check k6t3p5.graph k6t3p5.clique 6 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p5_templates_item_2 : (⟨0, 3, [], [], [4, 5], 1, 3⟩ : TemplateData (Fin 6)).Check k6t3p5.graph k6t3p5.clique 6 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p5_templates_item_3 : (⟨0, 4, [], [], [3, 2], 1, 3⟩ : TemplateData (Fin 6)).Check k6t3p5.graph k6t3p5.clique 6 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p5_templates_item_4 : (⟨0, 5, [], [], [], 3, 5⟩ : TemplateData (Fin 6)).Check k6t3p5.graph k6t3p5.clique 6 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p5_templates_item_5 : (⟨0, 5, [], [], [4, 3, 2], 2, 2⟩ : TemplateData (Fin 6)).Check k6t3p5.graph k6t3p5.clique 6 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p5_templates_item_6 : (⟨1, 2, [], [0], [3, 4, 5], 1, 1⟩ : TemplateData (Fin 6)).Check k6t3p5.graph k6t3p5.clique 6 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p5_templates_item_7 : (⟨1, 3, [], [0], [2], 1, 3⟩ : TemplateData (Fin 6)).Check k6t3p5.graph k6t3p5.clique 6 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p5_templates_item_8 : (⟨1, 4, [], [0], [3, 2], 1, 2⟩ : TemplateData (Fin 6)).Check k6t3p5.graph k6t3p5.clique 6 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p5_templates_item_9 : (⟨1, 5, [], [0], [], 2, 4⟩ : TemplateData (Fin 6)).Check k6t3p5.graph k6t3p5.clique 6 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p5_templates_item_10 : (⟨1, 5, [], [0], [4, 3, 2], 1, 1⟩ : TemplateData (Fin 6)).Check k6t3p5.graph k6t3p5.clique 6 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p5_templates_item_11 : (⟨4, 5, [], [2, 3], [], 1, 3⟩ : TemplateData (Fin 6)).Check k6t3p5.graph k6t3p5.clique 6 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t3p5_part_3 : ∀ T ∈ k6t3p5.templates, T.Check k6t3p5.graph k6t3p5.clique 6 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k6t3p5, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t3p5_templates_item_0, k6t3p5_templates_item_1, k6t3p5_templates_item_2, k6t3p5_templates_item_3, k6t3p5_templates_item_4, k6t3p5_templates_item_5, k6t3p5_templates_item_6, k6t3p5_templates_item_7, k6t3p5_templates_item_8, k6t3p5_templates_item_9, k6t3p5_templates_item_10, k6t3p5_templates_item_11⟩ + +private theorem k6t3p5_required_item_0 : (⟨0, 5, [1, 2, 3, 4]⟩ : RequiredPathData (Fin 6)).Check k6t3p5.graph 6 := by decide + +private theorem k6t3p5_part_4 : ∀ p ∈ k6t3p5.required, p.Check k6t3p5.graph 6 := by + simp only [k6t3p5, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact k6t3p5_required_item_0 + +private theorem k6t3p5_part_5 : ClosureCheck k6t3p5.graph (k6t3p5.initialMatrix 6) 6 3 k6t3p5.closure := by + rw [k6t3p5_initial_eq] + exact k6t3p5_closure_0 + +private theorem k6t3p5_part_6 : k6t3p5.bad.Check k6t3p5.graph (k6t3p5.matrix 6) 6 3 := by + rw [k6t3p5_matrix_eq] + decide + +theorem k6t3p5_check : k6t3p5.Check 6 3 [[1, 2]] := + ⟨k6t3p5_part_0, k6t3p5_part_1, k6t3p5_part_2, k6t3p5_part_3, k6t3p5_part_4, k6t3p5_part_5, k6t3p5_part_6⟩ +def k6t4p0 : LayoutCertificate 4 where + chains := [[0], [1], [2], [3]] + clique := {0, 1, 2, 3} + templates := [⟨0, 1, [], [], [], 1, 5⟩, + ⟨0, 2, [], [], [], 1, 5⟩, + ⟨0, 3, [], [], [], 1, 5⟩, + ⟨1, 2, [], [], [], 1, 5⟩, + ⟨1, 3, [], [], [], 1, 5⟩, + ⟨2, 3, [], [], [], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (1, 2), (2, 2), (3, 2)}⟩ + + +private def k6t4p0_state_0 : ForbiddenMatrix 4 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t4p0_initial_eq_row_0 : ∀ j : Fin 4, (k6t4p0.initialMatrix 6) 0 j = k6t4p0_state_0 0 j := by decide + +private theorem k6t4p0_initial_eq_row_1 : ∀ j : Fin 4, (k6t4p0.initialMatrix 6) 1 j = k6t4p0_state_0 1 j := by decide + +private theorem k6t4p0_initial_eq_row_2 : ∀ j : Fin 4, (k6t4p0.initialMatrix 6) 2 j = k6t4p0_state_0 2 j := by decide + +private theorem k6t4p0_initial_eq_row_3 : ∀ j : Fin 4, (k6t4p0.initialMatrix 6) 3 j = k6t4p0_state_0 3 j := by decide + +private theorem k6t4p0_initial_eq : (k6t4p0.initialMatrix 6) = k6t4p0_state_0 := by + funext i j + fin_cases i + + · exact k6t4p0_initial_eq_row_0 j + + · exact k6t4p0_initial_eq_row_1 j + + · exact k6t4p0_initial_eq_row_2 j + + · exact k6t4p0_initial_eq_row_3 j + +private theorem k6t4p0_closure_0 : ClosureCheck k6t4p0.graph k6t4p0_state_0 6 4 [] := by trivial + +private theorem k6t4p0_matrix_eq : k6t4p0.matrix 6 = k6t4p0_state_0 := by + change closureMatrix (k6t4p0.initialMatrix 6) _ = _ + rw [k6t4p0_initial_eq] + change closureMatrix k6t4p0_state_0 [] = _ + rfl + +private theorem k6t4p0_part_0 : k6t4p0.chains.flatten = List.finRange _ := by decide + +private theorem k6t4p0_part_1 : k6t4p0.chains.map List.length = ([[], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k6t4p0_part_2 : k6t4p0.chains.map (fun l => l.map (fun i => decide (i ∈ k6t4p0.clique))) = ([[], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k6t4p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 5⟩ : TemplateData (Fin 4)).Check k6t4p0.graph k6t4p0.clique 6 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 5⟩ : TemplateData (Fin 4)).Check k6t4p0.graph k6t4p0.clique 6 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 5⟩ : TemplateData (Fin 4)).Check k6t4p0.graph k6t4p0.clique 6 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p0_templates_item_3 : (⟨1, 2, [], [], [], 1, 5⟩ : TemplateData (Fin 4)).Check k6t4p0.graph k6t4p0.clique 6 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p0_templates_item_4 : (⟨1, 3, [], [], [], 1, 5⟩ : TemplateData (Fin 4)).Check k6t4p0.graph k6t4p0.clique 6 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p0_templates_item_5 : (⟨2, 3, [], [], [], 1, 5⟩ : TemplateData (Fin 4)).Check k6t4p0.graph k6t4p0.clique 6 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p0_part_3 : ∀ T ∈ k6t4p0.templates, T.Check k6t4p0.graph k6t4p0.clique 6 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k6t4p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t4p0_templates_item_0, k6t4p0_templates_item_1, k6t4p0_templates_item_2, k6t4p0_templates_item_3, k6t4p0_templates_item_4, k6t4p0_templates_item_5⟩ + +private theorem k6t4p0_part_4 : ∀ p ∈ k6t4p0.required, p.Check k6t4p0.graph 6 := by decide + +private theorem k6t4p0_part_5 : ClosureCheck k6t4p0.graph (k6t4p0.initialMatrix 6) 6 4 k6t4p0.closure := by + rw [k6t4p0_initial_eq] + exact k6t4p0_closure_0 + +private theorem k6t4p0_part_6 : k6t4p0.bad.Check k6t4p0.graph (k6t4p0.matrix 6) 6 4 := by + rw [k6t4p0_matrix_eq] + decide + +theorem k6t4p0_check : k6t4p0.Check 6 4 [[], [], [], []] := + ⟨k6t4p0_part_0, k6t4p0_part_1, k6t4p0_part_2, k6t4p0_part_3, k6t4p0_part_4, k6t4p0_part_5, k6t4p0_part_6⟩ +def k6t4p1 : LayoutCertificate 5 where + chains := [[0], [1], [2, 3, 4]] + clique := {0, 1, 2, 4} + templates := [⟨0, 1, [], [], [], 2, 5⟩, + ⟨0, 1, [[2, 3, 4]], [], [], 1, 2⟩, + ⟨0, 2, [], [], [], 2, 5⟩, + ⟨0, 2, [], [], [3, 4], 1, 3⟩, + ⟨0, 3, [], [], [2], 1, 4⟩, + ⟨0, 4, [], [], [3, 2], 1, 3⟩, + ⟨1, 2, [], [], [], 2, 5⟩, + ⟨1, 2, [], [], [3, 4], 1, 3⟩, + ⟨1, 3, [], [], [2], 1, 4⟩, + ⟨1, 4, [], [], [3, 2], 1, 3⟩, + ⟨2, 3, [], [], [4], 1, 4⟩, + ⟨3, 4, [], [2], [], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (1, 2), (2, 2), (3, 2)}⟩ + + +private def k6t4p1_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t4p1_initial_eq_row_0 : ∀ j : Fin 5, (k6t4p1.initialMatrix 6) 0 j = k6t4p1_state_0 0 j := by decide + +private theorem k6t4p1_initial_eq_row_1 : ∀ j : Fin 5, (k6t4p1.initialMatrix 6) 1 j = k6t4p1_state_0 1 j := by decide + +private theorem k6t4p1_initial_eq_row_2 : ∀ j : Fin 5, (k6t4p1.initialMatrix 6) 2 j = k6t4p1_state_0 2 j := by decide + +private theorem k6t4p1_initial_eq_row_3 : ∀ j : Fin 5, (k6t4p1.initialMatrix 6) 3 j = k6t4p1_state_0 3 j := by decide + +private theorem k6t4p1_initial_eq_row_4 : ∀ j : Fin 5, (k6t4p1.initialMatrix 6) 4 j = k6t4p1_state_0 4 j := by decide + +private theorem k6t4p1_initial_eq : (k6t4p1.initialMatrix 6) = k6t4p1_state_0 := by + funext i j + fin_cases i + + · exact k6t4p1_initial_eq_row_0 j + + · exact k6t4p1_initial_eq_row_1 j + + · exact k6t4p1_initial_eq_row_2 j + + · exact k6t4p1_initial_eq_row_3 j + + · exact k6t4p1_initial_eq_row_4 j + +private theorem k6t4p1_closure_0 : ClosureCheck k6t4p1.graph k6t4p1_state_0 6 4 [] := by trivial + +private theorem k6t4p1_matrix_eq : k6t4p1.matrix 6 = k6t4p1_state_0 := by + change closureMatrix (k6t4p1.initialMatrix 6) _ = _ + rw [k6t4p1_initial_eq] + change closureMatrix k6t4p1_state_0 [] = _ + rfl + +private theorem k6t4p1_part_0 : k6t4p1.chains.flatten = List.finRange _ := by decide + +private theorem k6t4p1_part_1 : k6t4p1.chains.map List.length = ([[], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k6t4p1_part_2 : k6t4p1.chains.map (fun l => l.map (fun i => decide (i ∈ k6t4p1.clique))) = ([[], [], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k6t4p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 5⟩ : TemplateData (Fin 5)).Check k6t4p1.graph k6t4p1.clique 6 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p1_templates_item_1 : (⟨0, 1, [[2, 3, 4]], [], [], 1, 2⟩ : TemplateData (Fin 5)).Check k6t4p1.graph k6t4p1.clique 6 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p1_templates_item_2 : (⟨0, 2, [], [], [], 2, 5⟩ : TemplateData (Fin 5)).Check k6t4p1.graph k6t4p1.clique 6 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p1_templates_item_3 : (⟨0, 2, [], [], [3, 4], 1, 3⟩ : TemplateData (Fin 5)).Check k6t4p1.graph k6t4p1.clique 6 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p1_templates_item_4 : (⟨0, 3, [], [], [2], 1, 4⟩ : TemplateData (Fin 5)).Check k6t4p1.graph k6t4p1.clique 6 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p1_templates_item_5 : (⟨0, 4, [], [], [3, 2], 1, 3⟩ : TemplateData (Fin 5)).Check k6t4p1.graph k6t4p1.clique 6 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p1_templates_item_6 : (⟨1, 2, [], [], [], 2, 5⟩ : TemplateData (Fin 5)).Check k6t4p1.graph k6t4p1.clique 6 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p1_templates_item_7 : (⟨1, 2, [], [], [3, 4], 1, 3⟩ : TemplateData (Fin 5)).Check k6t4p1.graph k6t4p1.clique 6 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p1_templates_item_8 : (⟨1, 3, [], [], [2], 1, 4⟩ : TemplateData (Fin 5)).Check k6t4p1.graph k6t4p1.clique 6 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p1_templates_item_9 : (⟨1, 4, [], [], [3, 2], 1, 3⟩ : TemplateData (Fin 5)).Check k6t4p1.graph k6t4p1.clique 6 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p1_templates_item_10 : (⟨2, 3, [], [], [4], 1, 4⟩ : TemplateData (Fin 5)).Check k6t4p1.graph k6t4p1.clique 6 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p1_templates_item_11 : (⟨3, 4, [], [2], [], 1, 4⟩ : TemplateData (Fin 5)).Check k6t4p1.graph k6t4p1.clique 6 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p1_part_3 : ∀ T ∈ k6t4p1.templates, T.Check k6t4p1.graph k6t4p1.clique 6 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k6t4p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t4p1_templates_item_0, k6t4p1_templates_item_1, k6t4p1_templates_item_2, k6t4p1_templates_item_3, k6t4p1_templates_item_4, k6t4p1_templates_item_5, k6t4p1_templates_item_6, k6t4p1_templates_item_7, k6t4p1_templates_item_8, k6t4p1_templates_item_9, k6t4p1_templates_item_10, k6t4p1_templates_item_11⟩ + +private theorem k6t4p1_part_4 : ∀ p ∈ k6t4p1.required, p.Check k6t4p1.graph 6 := by decide + +private theorem k6t4p1_part_5 : ClosureCheck k6t4p1.graph (k6t4p1.initialMatrix 6) 6 4 k6t4p1.closure := by + rw [k6t4p1_initial_eq] + exact k6t4p1_closure_0 + +private theorem k6t4p1_part_6 : k6t4p1.bad.Check k6t4p1.graph (k6t4p1.matrix 6) 6 4 := by + rw [k6t4p1_matrix_eq] + decide + +theorem k6t4p1_check : k6t4p1.Check 6 4 [[], [], [1]] := + ⟨k6t4p1_part_0, k6t4p1_part_1, k6t4p1_part_2, k6t4p1_part_3, k6t4p1_part_4, k6t4p1_part_5, k6t4p1_part_6⟩ +private def k6t4p2_step_0_data : EdgeAttachmentData 6 := ⟨3, 0, [⟨0, 1, [3, 2, 5]⟩, ⟨2, 5, [0, 3, 4]⟩, ⟨2, 5, [1, 0, 3, 4]⟩, ⟨2, 4, [1, 5, 0, 3]⟩, ⟨5, 2, [4, 3, 0, 1]⟩], ⟨none, {(0, 2), (2, 2), (1, 2), (5, 2)}⟩⟩ + +private def k6t4p2_step_0 : ClosureStep 6 := .edge k6t4p2_step_0_data + +private def k6t4p2_step_1_data : EdgeAttachmentData 6 := ⟨3, 1, [⟨1, 0, [3, 2, 5]⟩, ⟨2, 5, [0, 1, 3, 4]⟩, ⟨2, 4, [0, 5, 1, 3]⟩, ⟨2, 5, [1, 3, 4]⟩, ⟨5, 2, [4, 3, 1, 0]⟩], ⟨none, {(1, 2), (2, 2), (0, 2), (5, 2)}⟩⟩ + +private def k6t4p2_step_1 : ClosureStep 6 := .edge k6t4p2_step_1_data + +private def k6t4p2_step_2_data : EdgeAttachmentData 6 := ⟨4, 0, [⟨0, 1, [4, 3, 2]⟩, ⟨2, 5, [3, 4, 0, 1]⟩, ⟨5, 2, [0, 4, 3]⟩, ⟨5, 2, [1, 0, 4, 3]⟩, ⟨5, 3, [1, 2, 0, 4]⟩], ⟨none, {(0, 2), (5, 2), (1, 2), (2, 2)}⟩⟩ + +private def k6t4p2_step_2 : ClosureStep 6 := .edge k6t4p2_step_2_data + +private def k6t4p2_step_3_data : EdgeAttachmentData 6 := ⟨4, 1, [⟨1, 0, [4, 3, 2]⟩, ⟨2, 5, [3, 4, 1, 0]⟩, ⟨5, 2, [0, 1, 4, 3]⟩, ⟨5, 3, [0, 2, 1, 4]⟩, ⟨5, 2, [1, 4, 3]⟩], ⟨none, {(1, 2), (5, 2), (0, 2), (2, 2)}⟩⟩ + +private def k6t4p2_step_3 : ClosureStep 6 := .edge k6t4p2_step_3_data + +private def k6t4p2_step_4_data : EdgeAttachmentData 6 := ⟨4, 2, [⟨0, 1, [2, 4, 5]⟩, ⟨3, 5, [4, 2, 0, 1]⟩, ⟨5, 3, [0, 1, 2, 4]⟩], ⟨none, {(0, 2), (1, 2), (5, 2), (3, 2)}⟩⟩ + +private def k6t4p2_step_4 : ClosureStep 6 := .edge k6t4p2_step_4_data + +private def k6t4p2_step_5_data : FreshAttachmentData 6 := ⟨4, 2, [⟨1, 0, [2, 3, 4, 5]⟩, ⟨1, 0, [2, 6, 3, 4, 5]⟩, ⟨1, 4, [2, 6, 3, 0, 5]⟩, ⟨4, 0, [3, 1, 2, 6, 5]⟩, ⟨4, 0, [3, 1, 6, 5]⟩, ⟨4, 0, [3, 6, 5]⟩, ⟨4, 2, [3, 0, 5, 6, 1]⟩, ⟨4, 1, [3, 0, 5, 6, 2]⟩, ⟨4, 6, [5, 0, 3, 1, 2]⟩, ⟨6, 0, [1, 2, 3, 4, 5]⟩, ⟨6, 0, [1, 2, 3]⟩, ⟨6, 4, [1, 2, 3, 0, 5]⟩, ⟨6, 0, [1, 3, 4, 5]⟩, ⟨6, 0, [1, 3]⟩, ⟨6, 4, [1, 3, 0, 5]⟩, ⟨0, 4, [3, 1, 2, 6, 5]⟩, ⟨0, 1, [3, 2]⟩, ⟨0, 1, [3, 2, 6]⟩, ⟨0, 1, [3, 4, 5, 6]⟩, ⟨0, 2, [3, 4, 5, 6, 1]⟩, ⟨0, 1, [3, 4, 5, 6, 2]⟩, ⟨0, 6, [5, 4, 3, 1, 2]⟩], ⟨none, {(6, 2), (4, 1), (0, 1), (1, 2)}⟩⟩ + +private def k6t4p2_step_5 : ClosureStep 6 := .fresh k6t4p2_step_5_data + +private def k6t4p2_step_6_data : FreshAttachmentData 6 := ⟨5, 2, [⟨1, 0, [2, 3, 4, 5, 6]⟩, ⟨1, 4, [2, 3, 0, 6, 5]⟩, ⟨1, 5, [2, 6, 0, 3, 4]⟩, ⟨1, 0, [3, 4, 5, 6]⟩, ⟨1, 2, [3, 0, 6]⟩, ⟨2, 0, [1, 3, 4, 5, 6]⟩, ⟨2, 4, [1, 3, 0, 6, 5]⟩, ⟨2, 5, [1, 6, 0, 3, 4]⟩, ⟨2, 0, [3, 4, 5, 6]⟩, ⟨4, 0, [3, 1, 2, 6]⟩, ⟨4, 0, [5, 6, 1, 2, 3]⟩, ⟨4, 2, [5, 6, 0, 3, 1]⟩, ⟨4, 1, [5, 6, 0, 3, 2]⟩, ⟨0, 2, [3, 1]⟩, ⟨0, 4, [3, 1, 2, 6, 5]⟩, ⟨0, 2, [3, 1, 6]⟩, ⟨0, 4, [3, 1, 6, 5]⟩, ⟨0, 1, [3, 2]⟩, ⟨0, 1, [3, 2, 6]⟩, ⟨0, 1, [3, 4, 5, 6]⟩, ⟨0, 2, [3, 4, 5, 6, 1]⟩, ⟨0, 2, [3, 4, 5, 6]⟩, ⟨0, 1, [3, 4, 5, 6, 2]⟩, ⟨0, 4, [3, 6, 5]⟩, ⟨0, 5, [6, 1, 2, 3, 4]⟩, ⟨0, 4, [6, 3]⟩], ⟨none, {(0, 1), (1, 2), (2, 2), (4, 2)}⟩⟩ + +private def k6t4p2_step_6 : ClosureStep 6 := .fresh k6t4p2_step_6_data + +private def k6t4p2_step_7_data : EdgeAttachmentData 6 := ⟨5, 3, [⟨0, 1, [2, 3, 5]⟩, ⟨2, 4, [0, 1, 5, 3]⟩, ⟨4, 2, [3, 5, 0, 1]⟩], ⟨none, {(0, 2), (1, 2), (2, 2), (4, 2)}⟩⟩ + +private def k6t4p2_step_7 : ClosureStep 6 := .edge k6t4p2_step_7_data + +def k6t4p2 : LayoutCertificate 6 where + chains := [[0], [1], [2, 3, 4, 5]] + clique := {0, 1, 2, 5} + templates := [⟨0, 1, [], [], [], 3, 5⟩, + ⟨0, 1, [[2, 3, 4, 5]], [], [], 1, 1⟩, + ⟨0, 2, [], [], [], 3, 5⟩, + ⟨0, 2, [], [], [3, 4, 5], 1, 2⟩, + ⟨0, 3, [], [], [2], 2, 4⟩, + ⟨0, 3, [], [], [4, 5], 1, 3⟩, + ⟨0, 4, [], [], [3, 2], 1, 3⟩, + ⟨0, 4, [], [], [5], 2, 4⟩, + ⟨0, 5, [], [], [], 3, 5⟩, + ⟨0, 5, [], [], [4, 3, 2], 1, 2⟩, + ⟨1, 2, [], [], [], 3, 5⟩, + ⟨1, 2, [], [], [3, 4, 5], 1, 2⟩, + ⟨1, 3, [], [], [2], 2, 4⟩, + ⟨1, 3, [], [], [4, 5], 1, 3⟩, + ⟨1, 4, [], [], [3, 2], 1, 3⟩, + ⟨1, 4, [], [], [5], 2, 4⟩, + ⟨1, 5, [], [], [], 3, 5⟩, + ⟨1, 5, [], [], [4, 3, 2], 1, 2⟩, + ⟨2, 3, [], [], [4, 5], 1, 3⟩, + ⟨2, 4, [], [], [5], 2, 4⟩, + ⟨2, 5, [], [], [], 3, 5⟩, + ⟨3, 4, [], [2], [5], 1, 3⟩, + ⟨3, 5, [], [2], [], 2, 4⟩, + ⟨4, 5, [], [2, 3], [], 1, 3⟩] + required := [] + closure := [k6t4p2_step_0, k6t4p2_step_1, k6t4p2_step_2, k6t4p2_step_3, k6t4p2_step_4, k6t4p2_step_5, k6t4p2_step_6, k6t4p2_step_7] + bad := ⟨none, {(3, 1), (4, 1), (0, 2), (2, 2)}⟩ + + +private def k6t4p2_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 3, 4, 5}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{1, 3, 4, 5}, ∅, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}], + #[Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 4, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, {3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t4p2_initial_eq_row_0 : ∀ j : Fin 6, (k6t4p2.initialMatrix 6) 0 j = k6t4p2_state_0 0 j := by decide + +private theorem k6t4p2_initial_eq_row_1 : ∀ j : Fin 6, (k6t4p2.initialMatrix 6) 1 j = k6t4p2_state_0 1 j := by decide + +private theorem k6t4p2_initial_eq_row_2 : ∀ j : Fin 6, (k6t4p2.initialMatrix 6) 2 j = k6t4p2_state_0 2 j := by decide + +private theorem k6t4p2_initial_eq_row_3 : ∀ j : Fin 6, (k6t4p2.initialMatrix 6) 3 j = k6t4p2_state_0 3 j := by decide + +private theorem k6t4p2_initial_eq_row_4 : ∀ j : Fin 6, (k6t4p2.initialMatrix 6) 4 j = k6t4p2_state_0 4 j := by decide + +private theorem k6t4p2_initial_eq_row_5 : ∀ j : Fin 6, (k6t4p2.initialMatrix 6) 5 j = k6t4p2_state_0 5 j := by decide + +private theorem k6t4p2_initial_eq : (k6t4p2.initialMatrix 6) = k6t4p2_state_0 := by + funext i j + fin_cases i + + · exact k6t4p2_initial_eq_row_0 j + + · exact k6t4p2_initial_eq_row_1 j + + · exact k6t4p2_initial_eq_row_2 j + + · exact k6t4p2_initial_eq_row_3 j + + · exact k6t4p2_initial_eq_row_4 j + + · exact k6t4p2_initial_eq_row_5 j + +private def k6t4p2_state_1 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 3, 4, 5}, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{1, 3, 4, 5}, ∅, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 4, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, {3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t4p2_local_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t4p2_local_0_eq_row_0 : ∀ j : Fin 6, (fun a b => k6t4p2_state_0 a b ∪ requiredMatrix 6 k6t4p2_step_0_data.required a b) 0 j = k6t4p2_local_0 0 j := by decide + +private theorem k6t4p2_local_0_eq_row_1 : ∀ j : Fin 6, (fun a b => k6t4p2_state_0 a b ∪ requiredMatrix 6 k6t4p2_step_0_data.required a b) 1 j = k6t4p2_local_0 1 j := by decide + +private theorem k6t4p2_local_0_eq_row_2 : ∀ j : Fin 6, (fun a b => k6t4p2_state_0 a b ∪ requiredMatrix 6 k6t4p2_step_0_data.required a b) 2 j = k6t4p2_local_0 2 j := by decide + +private theorem k6t4p2_local_0_eq_row_3 : ∀ j : Fin 6, (fun a b => k6t4p2_state_0 a b ∪ requiredMatrix 6 k6t4p2_step_0_data.required a b) 3 j = k6t4p2_local_0 3 j := by decide + +private theorem k6t4p2_local_0_eq_row_4 : ∀ j : Fin 6, (fun a b => k6t4p2_state_0 a b ∪ requiredMatrix 6 k6t4p2_step_0_data.required a b) 4 j = k6t4p2_local_0 4 j := by decide + +private theorem k6t4p2_local_0_eq_row_5 : ∀ j : Fin 6, (fun a b => k6t4p2_state_0 a b ∪ requiredMatrix 6 k6t4p2_step_0_data.required a b) 5 j = k6t4p2_local_0 5 j := by decide + +private theorem k6t4p2_local_0_eq : (fun a b => k6t4p2_state_0 a b ∪ requiredMatrix 6 k6t4p2_step_0_data.required a b) = k6t4p2_local_0 := by + funext i j + fin_cases i + + · exact k6t4p2_local_0_eq_row_0 j + + · exact k6t4p2_local_0_eq_row_1 j + + · exact k6t4p2_local_0_eq_row_2 j + + · exact k6t4p2_local_0_eq_row_3 j + + · exact k6t4p2_local_0_eq_row_4 j + + · exact k6t4p2_local_0_eq_row_5 j + +private theorem k6t4p2_local_0_paths : ∀ p ∈ k6t4p2_step_0_data.required, p.Check (addedEdgeGraph k6t4p2.graph k6t4p2_step_0_data.i k6t4p2_step_0_data.j) 6 := by decide + +private theorem k6t4p2_local_0_bad : k6t4p2_step_0_data.bad.Check (addedEdgeGraph k6t4p2.graph k6t4p2_step_0_data.i k6t4p2_step_0_data.j) k6t4p2_local_0 6 4 := by decide + +private theorem k6t4p2_step_0_check : k6t4p2_step_0.Check k6t4p2.graph k6t4p2_state_0 6 4 := by + change k6t4p2_step_0_data.Check k6t4p2.graph k6t4p2_state_0 6 4 + refine ⟨k6t4p2_local_0_paths, ?_⟩ + rw [k6t4p2_local_0_eq] + exact k6t4p2_local_0_bad + +private theorem k6t4p2_update_0 : k6t4p2_step_0.apply k6t4p2_state_0 = k6t4p2_state_1 := by + have h : ∀ i j : Fin 6, k6t4p2_step_0.apply k6t4p2_state_0 i j = k6t4p2_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t4p2_state_2 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 3, 4, 5}, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{1, 3, 4, 5}, ∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 4, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, {3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t4p2_local_1 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 0 4, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t4p2_local_1_eq_row_0 : ∀ j : Fin 6, (fun a b => k6t4p2_state_1 a b ∪ requiredMatrix 6 k6t4p2_step_1_data.required a b) 0 j = k6t4p2_local_1 0 j := by decide + +private theorem k6t4p2_local_1_eq_row_1 : ∀ j : Fin 6, (fun a b => k6t4p2_state_1 a b ∪ requiredMatrix 6 k6t4p2_step_1_data.required a b) 1 j = k6t4p2_local_1 1 j := by decide + +private theorem k6t4p2_local_1_eq_row_2 : ∀ j : Fin 6, (fun a b => k6t4p2_state_1 a b ∪ requiredMatrix 6 k6t4p2_step_1_data.required a b) 2 j = k6t4p2_local_1 2 j := by decide + +private theorem k6t4p2_local_1_eq_row_3 : ∀ j : Fin 6, (fun a b => k6t4p2_state_1 a b ∪ requiredMatrix 6 k6t4p2_step_1_data.required a b) 3 j = k6t4p2_local_1 3 j := by decide + +private theorem k6t4p2_local_1_eq_row_4 : ∀ j : Fin 6, (fun a b => k6t4p2_state_1 a b ∪ requiredMatrix 6 k6t4p2_step_1_data.required a b) 4 j = k6t4p2_local_1 4 j := by decide + +private theorem k6t4p2_local_1_eq_row_5 : ∀ j : Fin 6, (fun a b => k6t4p2_state_1 a b ∪ requiredMatrix 6 k6t4p2_step_1_data.required a b) 5 j = k6t4p2_local_1 5 j := by decide + +private theorem k6t4p2_local_1_eq : (fun a b => k6t4p2_state_1 a b ∪ requiredMatrix 6 k6t4p2_step_1_data.required a b) = k6t4p2_local_1 := by + funext i j + fin_cases i + + · exact k6t4p2_local_1_eq_row_0 j + + · exact k6t4p2_local_1_eq_row_1 j + + · exact k6t4p2_local_1_eq_row_2 j + + · exact k6t4p2_local_1_eq_row_3 j + + · exact k6t4p2_local_1_eq_row_4 j + + · exact k6t4p2_local_1_eq_row_5 j + +private theorem k6t4p2_local_1_paths : ∀ p ∈ k6t4p2_step_1_data.required, p.Check (addedEdgeGraph k6t4p2.graph k6t4p2_step_1_data.i k6t4p2_step_1_data.j) 6 := by decide + +private theorem k6t4p2_local_1_bad : k6t4p2_step_1_data.bad.Check (addedEdgeGraph k6t4p2.graph k6t4p2_step_1_data.i k6t4p2_step_1_data.j) k6t4p2_local_1 6 4 := by decide + +private theorem k6t4p2_step_1_check : k6t4p2_step_1.Check k6t4p2.graph k6t4p2_state_1 6 4 := by + change k6t4p2_step_1_data.Check k6t4p2.graph k6t4p2_state_1 6 4 + refine ⟨k6t4p2_local_1_paths, ?_⟩ + rw [k6t4p2_local_1_eq] + exact k6t4p2_local_1_bad + +private theorem k6t4p2_update_1 : k6t4p2_step_1.apply k6t4p2_state_1 = k6t4p2_state_2 := by + have h : ∀ i j : Fin 6, k6t4p2_step_1.apply k6t4p2_state_1 i j = k6t4p2_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t4p2_state_3 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 3, 4, 5}, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[{1, 3, 4, 5}, ∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 0 4, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, {3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t4p2_local_2 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 1 5], + #[Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[Finset.Icc 1 4, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t4p2_local_2_eq_row_0 : ∀ j : Fin 6, (fun a b => k6t4p2_state_2 a b ∪ requiredMatrix 6 k6t4p2_step_2_data.required a b) 0 j = k6t4p2_local_2 0 j := by decide + +private theorem k6t4p2_local_2_eq_row_1 : ∀ j : Fin 6, (fun a b => k6t4p2_state_2 a b ∪ requiredMatrix 6 k6t4p2_step_2_data.required a b) 1 j = k6t4p2_local_2 1 j := by decide + +private theorem k6t4p2_local_2_eq_row_2 : ∀ j : Fin 6, (fun a b => k6t4p2_state_2 a b ∪ requiredMatrix 6 k6t4p2_step_2_data.required a b) 2 j = k6t4p2_local_2 2 j := by decide + +private theorem k6t4p2_local_2_eq_row_3 : ∀ j : Fin 6, (fun a b => k6t4p2_state_2 a b ∪ requiredMatrix 6 k6t4p2_step_2_data.required a b) 3 j = k6t4p2_local_2 3 j := by decide + +private theorem k6t4p2_local_2_eq_row_4 : ∀ j : Fin 6, (fun a b => k6t4p2_state_2 a b ∪ requiredMatrix 6 k6t4p2_step_2_data.required a b) 4 j = k6t4p2_local_2 4 j := by decide + +private theorem k6t4p2_local_2_eq_row_5 : ∀ j : Fin 6, (fun a b => k6t4p2_state_2 a b ∪ requiredMatrix 6 k6t4p2_step_2_data.required a b) 5 j = k6t4p2_local_2 5 j := by decide + +private theorem k6t4p2_local_2_eq : (fun a b => k6t4p2_state_2 a b ∪ requiredMatrix 6 k6t4p2_step_2_data.required a b) = k6t4p2_local_2 := by + funext i j + fin_cases i + + · exact k6t4p2_local_2_eq_row_0 j + + · exact k6t4p2_local_2_eq_row_1 j + + · exact k6t4p2_local_2_eq_row_2 j + + · exact k6t4p2_local_2_eq_row_3 j + + · exact k6t4p2_local_2_eq_row_4 j + + · exact k6t4p2_local_2_eq_row_5 j + +private theorem k6t4p2_local_2_paths : ∀ p ∈ k6t4p2_step_2_data.required, p.Check (addedEdgeGraph k6t4p2.graph k6t4p2_step_2_data.i k6t4p2_step_2_data.j) 6 := by decide + +private theorem k6t4p2_local_2_bad : k6t4p2_step_2_data.bad.Check (addedEdgeGraph k6t4p2.graph k6t4p2_step_2_data.i k6t4p2_step_2_data.j) k6t4p2_local_2 6 4 := by decide + +private theorem k6t4p2_step_2_check : k6t4p2_step_2.Check k6t4p2.graph k6t4p2_state_2 6 4 := by + change k6t4p2_step_2_data.Check k6t4p2.graph k6t4p2_state_2 6 4 + refine ⟨k6t4p2_local_2_paths, ?_⟩ + rw [k6t4p2_local_2_eq] + exact k6t4p2_local_2_bad + +private theorem k6t4p2_update_2 : k6t4p2_step_2.apply k6t4p2_state_2 = k6t4p2_state_3 := by + have h : ∀ i j : Fin 6, k6t4p2_step_2.apply k6t4p2_state_2 i j = k6t4p2_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t4p2_state_4 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 3, 4, 5}, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[{1, 3, 4, 5}, ∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, {3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t4p2_local_3 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 1 5], + #[Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[Finset.Icc 0 4, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t4p2_local_3_eq_row_0 : ∀ j : Fin 6, (fun a b => k6t4p2_state_3 a b ∪ requiredMatrix 6 k6t4p2_step_3_data.required a b) 0 j = k6t4p2_local_3 0 j := by decide + +private theorem k6t4p2_local_3_eq_row_1 : ∀ j : Fin 6, (fun a b => k6t4p2_state_3 a b ∪ requiredMatrix 6 k6t4p2_step_3_data.required a b) 1 j = k6t4p2_local_3 1 j := by decide + +private theorem k6t4p2_local_3_eq_row_2 : ∀ j : Fin 6, (fun a b => k6t4p2_state_3 a b ∪ requiredMatrix 6 k6t4p2_step_3_data.required a b) 2 j = k6t4p2_local_3 2 j := by decide + +private theorem k6t4p2_local_3_eq_row_3 : ∀ j : Fin 6, (fun a b => k6t4p2_state_3 a b ∪ requiredMatrix 6 k6t4p2_step_3_data.required a b) 3 j = k6t4p2_local_3 3 j := by decide + +private theorem k6t4p2_local_3_eq_row_4 : ∀ j : Fin 6, (fun a b => k6t4p2_state_3 a b ∪ requiredMatrix 6 k6t4p2_step_3_data.required a b) 4 j = k6t4p2_local_3 4 j := by decide + +private theorem k6t4p2_local_3_eq_row_5 : ∀ j : Fin 6, (fun a b => k6t4p2_state_3 a b ∪ requiredMatrix 6 k6t4p2_step_3_data.required a b) 5 j = k6t4p2_local_3 5 j := by decide + +private theorem k6t4p2_local_3_eq : (fun a b => k6t4p2_state_3 a b ∪ requiredMatrix 6 k6t4p2_step_3_data.required a b) = k6t4p2_local_3 := by + funext i j + fin_cases i + + · exact k6t4p2_local_3_eq_row_0 j + + · exact k6t4p2_local_3_eq_row_1 j + + · exact k6t4p2_local_3_eq_row_2 j + + · exact k6t4p2_local_3_eq_row_3 j + + · exact k6t4p2_local_3_eq_row_4 j + + · exact k6t4p2_local_3_eq_row_5 j + +private theorem k6t4p2_local_3_paths : ∀ p ∈ k6t4p2_step_3_data.required, p.Check (addedEdgeGraph k6t4p2.graph k6t4p2_step_3_data.i k6t4p2_step_3_data.j) 6 := by decide + +private theorem k6t4p2_local_3_bad : k6t4p2_step_3_data.bad.Check (addedEdgeGraph k6t4p2.graph k6t4p2_step_3_data.i k6t4p2_step_3_data.j) k6t4p2_local_3 6 4 := by decide + +private theorem k6t4p2_step_3_check : k6t4p2_step_3.Check k6t4p2.graph k6t4p2_state_3 6 4 := by + change k6t4p2_step_3_data.Check k6t4p2.graph k6t4p2_state_3 6 4 + refine ⟨k6t4p2_local_3_paths, ?_⟩ + rw [k6t4p2_local_3_eq] + exact k6t4p2_local_3_bad + +private theorem k6t4p2_update_3 : k6t4p2_step_3.apply k6t4p2_state_3 = k6t4p2_state_4 := by + have h : ∀ i j : Fin 6, k6t4p2_step_3.apply k6t4p2_state_3 i j = k6t4p2_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t4p2_state_5 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 3, 4, 5}, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[{1, 3, 4, 5}, ∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, {0, 2, 3, 4}, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, {3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t4p2_local_4 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[Finset.Icc 0 4, Finset.Icc 0 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, {3, 4, 5}, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t4p2_local_4_eq_row_0 : ∀ j : Fin 6, (fun a b => k6t4p2_state_4 a b ∪ requiredMatrix 6 k6t4p2_step_4_data.required a b) 0 j = k6t4p2_local_4 0 j := by decide + +private theorem k6t4p2_local_4_eq_row_1 : ∀ j : Fin 6, (fun a b => k6t4p2_state_4 a b ∪ requiredMatrix 6 k6t4p2_step_4_data.required a b) 1 j = k6t4p2_local_4 1 j := by decide + +private theorem k6t4p2_local_4_eq_row_2 : ∀ j : Fin 6, (fun a b => k6t4p2_state_4 a b ∪ requiredMatrix 6 k6t4p2_step_4_data.required a b) 2 j = k6t4p2_local_4 2 j := by decide + +private theorem k6t4p2_local_4_eq_row_3 : ∀ j : Fin 6, (fun a b => k6t4p2_state_4 a b ∪ requiredMatrix 6 k6t4p2_step_4_data.required a b) 3 j = k6t4p2_local_4 3 j := by decide + +private theorem k6t4p2_local_4_eq_row_4 : ∀ j : Fin 6, (fun a b => k6t4p2_state_4 a b ∪ requiredMatrix 6 k6t4p2_step_4_data.required a b) 4 j = k6t4p2_local_4 4 j := by decide + +private theorem k6t4p2_local_4_eq_row_5 : ∀ j : Fin 6, (fun a b => k6t4p2_state_4 a b ∪ requiredMatrix 6 k6t4p2_step_4_data.required a b) 5 j = k6t4p2_local_4 5 j := by decide + +private theorem k6t4p2_local_4_eq : (fun a b => k6t4p2_state_4 a b ∪ requiredMatrix 6 k6t4p2_step_4_data.required a b) = k6t4p2_local_4 := by + funext i j + fin_cases i + + · exact k6t4p2_local_4_eq_row_0 j + + · exact k6t4p2_local_4_eq_row_1 j + + · exact k6t4p2_local_4_eq_row_2 j + + · exact k6t4p2_local_4_eq_row_3 j + + · exact k6t4p2_local_4_eq_row_4 j + + · exact k6t4p2_local_4_eq_row_5 j + +private theorem k6t4p2_local_4_paths : ∀ p ∈ k6t4p2_step_4_data.required, p.Check (addedEdgeGraph k6t4p2.graph k6t4p2_step_4_data.i k6t4p2_step_4_data.j) 6 := by decide + +private theorem k6t4p2_local_4_bad : k6t4p2_step_4_data.bad.Check (addedEdgeGraph k6t4p2.graph k6t4p2_step_4_data.i k6t4p2_step_4_data.j) k6t4p2_local_4 6 4 := by decide + +private theorem k6t4p2_step_4_check : k6t4p2_step_4.Check k6t4p2.graph k6t4p2_state_4 6 4 := by + change k6t4p2_step_4_data.Check k6t4p2.graph k6t4p2_state_4 6 4 + refine ⟨k6t4p2_local_4_paths, ?_⟩ + rw [k6t4p2_local_4_eq] + exact k6t4p2_local_4_bad + +private theorem k6t4p2_update_4 : k6t4p2_step_4.apply k6t4p2_state_4 = k6t4p2_state_5 := by + have h : ∀ i j : Fin 6, k6t4p2_step_4.apply k6t4p2_state_4 i j = k6t4p2_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t4p2_state_6 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 3, 4, 5}, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[{1, 3, 4, 5}, ∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, Finset.Icc 0 4, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, {3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t4p2_local_5 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 0 3, {0}, ∅, {0, 1, 2}, ∅, Finset.Icc 0 3], + #[Finset.Icc 0 3, ∅, {1, 3, 4, 5}, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[{0}, {1, 3, 4, 5}, ∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[∅, Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, {0, 2, 3, 4}, {3, 4, 5}], + #[{0, 1, 2}, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4], + #[∅, Finset.Icc 0 4, Finset.Icc 0 4, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 0 3, Finset.Icc 1 5, Finset.Icc 1 5, {3, 4, 5}, Finset.Icc 0 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t4p2_local_5_eq_row_0 : ∀ j : Fin 7, (fun a b => freshMatrix k6t4p2_state_5 a b ∪ requiredMatrix 6 k6t4p2_step_5_data.required a b) 0 j = k6t4p2_local_5 0 j := by decide + +private theorem k6t4p2_local_5_eq_row_1 : ∀ j : Fin 7, (fun a b => freshMatrix k6t4p2_state_5 a b ∪ requiredMatrix 6 k6t4p2_step_5_data.required a b) 1 j = k6t4p2_local_5 1 j := by decide + +private theorem k6t4p2_local_5_eq_row_2 : ∀ j : Fin 7, (fun a b => freshMatrix k6t4p2_state_5 a b ∪ requiredMatrix 6 k6t4p2_step_5_data.required a b) 2 j = k6t4p2_local_5 2 j := by decide + +private theorem k6t4p2_local_5_eq_row_3 : ∀ j : Fin 7, (fun a b => freshMatrix k6t4p2_state_5 a b ∪ requiredMatrix 6 k6t4p2_step_5_data.required a b) 3 j = k6t4p2_local_5 3 j := by decide + +private theorem k6t4p2_local_5_eq_row_4 : ∀ j : Fin 7, (fun a b => freshMatrix k6t4p2_state_5 a b ∪ requiredMatrix 6 k6t4p2_step_5_data.required a b) 4 j = k6t4p2_local_5 4 j := by decide + +private theorem k6t4p2_local_5_eq_row_5 : ∀ j : Fin 7, (fun a b => freshMatrix k6t4p2_state_5 a b ∪ requiredMatrix 6 k6t4p2_step_5_data.required a b) 5 j = k6t4p2_local_5 5 j := by decide + +private theorem k6t4p2_local_5_eq_row_6 : ∀ j : Fin 7, (fun a b => freshMatrix k6t4p2_state_5 a b ∪ requiredMatrix 6 k6t4p2_step_5_data.required a b) 6 j = k6t4p2_local_5 6 j := by decide + +private theorem k6t4p2_local_5_eq : (fun a b => freshMatrix k6t4p2_state_5 a b ∪ requiredMatrix 6 k6t4p2_step_5_data.required a b) = k6t4p2_local_5 := by + funext i j + fin_cases i + + · exact k6t4p2_local_5_eq_row_0 j + + · exact k6t4p2_local_5_eq_row_1 j + + · exact k6t4p2_local_5_eq_row_2 j + + · exact k6t4p2_local_5_eq_row_3 j + + · exact k6t4p2_local_5_eq_row_4 j + + · exact k6t4p2_local_5_eq_row_5 j + + · exact k6t4p2_local_5_eq_row_6 j + +private theorem k6t4p2_local_5_paths : ∀ p ∈ k6t4p2_step_5_data.required, p.Check (freshGraph k6t4p2.graph k6t4p2_step_5_data.i k6t4p2_step_5_data.j) 6 := by decide + +private theorem k6t4p2_local_5_bad : k6t4p2_step_5_data.bad.Check (freshGraph k6t4p2.graph k6t4p2_step_5_data.i k6t4p2_step_5_data.j) k6t4p2_local_5 6 4 := by decide + +private theorem k6t4p2_step_5_check : k6t4p2_step_5.Check k6t4p2.graph k6t4p2_state_5 6 4 := by + change k6t4p2_step_5_data.Check k6t4p2.graph k6t4p2_state_5 6 4 + refine ⟨by decide, k6t4p2_local_5_paths, ?_⟩ + rw [k6t4p2_local_5_eq] + exact k6t4p2_local_5_bad + +private theorem k6t4p2_update_5 : k6t4p2_step_5.apply k6t4p2_state_5 = k6t4p2_state_6 := by + have h : ∀ i j : Fin 6, k6t4p2_step_5.apply k6t4p2_state_5 i j = k6t4p2_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t4p2_state_7 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 3, 4, 5}, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[{1, 3, 4, 5}, ∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, Finset.Icc 0 4, {1, 3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, {1, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t4p2_local_6 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 0 3, Finset.Icc 0 3, ∅, Finset.Icc 0 3, {0}, ∅], + #[Finset.Icc 0 3, ∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 0 3, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[∅, Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, Finset.Icc 0 4, {3, 4, 5}], + #[Finset.Icc 0 3, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{0}, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, Finset.Icc 1 5, Finset.Icc 1 5, {3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t4p2_local_6_eq_row_0 : ∀ j : Fin 7, (fun a b => freshMatrix k6t4p2_state_6 a b ∪ requiredMatrix 6 k6t4p2_step_6_data.required a b) 0 j = k6t4p2_local_6 0 j := by decide + +private theorem k6t4p2_local_6_eq_row_1 : ∀ j : Fin 7, (fun a b => freshMatrix k6t4p2_state_6 a b ∪ requiredMatrix 6 k6t4p2_step_6_data.required a b) 1 j = k6t4p2_local_6 1 j := by decide + +private theorem k6t4p2_local_6_eq_row_2 : ∀ j : Fin 7, (fun a b => freshMatrix k6t4p2_state_6 a b ∪ requiredMatrix 6 k6t4p2_step_6_data.required a b) 2 j = k6t4p2_local_6 2 j := by decide + +private theorem k6t4p2_local_6_eq_row_3 : ∀ j : Fin 7, (fun a b => freshMatrix k6t4p2_state_6 a b ∪ requiredMatrix 6 k6t4p2_step_6_data.required a b) 3 j = k6t4p2_local_6 3 j := by decide + +private theorem k6t4p2_local_6_eq_row_4 : ∀ j : Fin 7, (fun a b => freshMatrix k6t4p2_state_6 a b ∪ requiredMatrix 6 k6t4p2_step_6_data.required a b) 4 j = k6t4p2_local_6 4 j := by decide + +private theorem k6t4p2_local_6_eq_row_5 : ∀ j : Fin 7, (fun a b => freshMatrix k6t4p2_state_6 a b ∪ requiredMatrix 6 k6t4p2_step_6_data.required a b) 5 j = k6t4p2_local_6 5 j := by decide + +private theorem k6t4p2_local_6_eq_row_6 : ∀ j : Fin 7, (fun a b => freshMatrix k6t4p2_state_6 a b ∪ requiredMatrix 6 k6t4p2_step_6_data.required a b) 6 j = k6t4p2_local_6 6 j := by decide + +private theorem k6t4p2_local_6_eq : (fun a b => freshMatrix k6t4p2_state_6 a b ∪ requiredMatrix 6 k6t4p2_step_6_data.required a b) = k6t4p2_local_6 := by + funext i j + fin_cases i + + · exact k6t4p2_local_6_eq_row_0 j + + · exact k6t4p2_local_6_eq_row_1 j + + · exact k6t4p2_local_6_eq_row_2 j + + · exact k6t4p2_local_6_eq_row_3 j + + · exact k6t4p2_local_6_eq_row_4 j + + · exact k6t4p2_local_6_eq_row_5 j + + · exact k6t4p2_local_6_eq_row_6 j + +private theorem k6t4p2_local_6_paths : ∀ p ∈ k6t4p2_step_6_data.required, p.Check (freshGraph k6t4p2.graph k6t4p2_step_6_data.i k6t4p2_step_6_data.j) 6 := by decide + +private theorem k6t4p2_local_6_bad : k6t4p2_step_6_data.bad.Check (freshGraph k6t4p2.graph k6t4p2_step_6_data.i k6t4p2_step_6_data.j) k6t4p2_local_6 6 4 := by decide + +private theorem k6t4p2_step_6_check : k6t4p2_step_6.Check k6t4p2.graph k6t4p2_state_6 6 4 := by + change k6t4p2_step_6_data.Check k6t4p2.graph k6t4p2_state_6 6 4 + refine ⟨by decide, k6t4p2_local_6_paths, ?_⟩ + rw [k6t4p2_local_6_eq] + exact k6t4p2_local_6_bad + +private theorem k6t4p2_update_6 : k6t4p2_step_6.apply k6t4p2_state_6 = k6t4p2_state_7 := by + have h : ∀ i j : Fin 6, k6t4p2_step_6.apply k6t4p2_state_6 i j = k6t4p2_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k6t4p2_state_8 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 3, 4, 5}, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[{1, 3, 4, 5}, ∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, Finset.Icc 0 4, {1, 3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4}], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, {1, 3, 4, 5}, {0, 2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k6t4p2_local_7 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, Finset.Icc 0 4, {1, 3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, {1, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t4p2_local_7_eq_row_0 : ∀ j : Fin 6, (fun a b => k6t4p2_state_7 a b ∪ requiredMatrix 6 k6t4p2_step_7_data.required a b) 0 j = k6t4p2_local_7 0 j := by decide + +private theorem k6t4p2_local_7_eq_row_1 : ∀ j : Fin 6, (fun a b => k6t4p2_state_7 a b ∪ requiredMatrix 6 k6t4p2_step_7_data.required a b) 1 j = k6t4p2_local_7 1 j := by decide + +private theorem k6t4p2_local_7_eq_row_2 : ∀ j : Fin 6, (fun a b => k6t4p2_state_7 a b ∪ requiredMatrix 6 k6t4p2_step_7_data.required a b) 2 j = k6t4p2_local_7 2 j := by decide + +private theorem k6t4p2_local_7_eq_row_3 : ∀ j : Fin 6, (fun a b => k6t4p2_state_7 a b ∪ requiredMatrix 6 k6t4p2_step_7_data.required a b) 3 j = k6t4p2_local_7 3 j := by decide + +private theorem k6t4p2_local_7_eq_row_4 : ∀ j : Fin 6, (fun a b => k6t4p2_state_7 a b ∪ requiredMatrix 6 k6t4p2_step_7_data.required a b) 4 j = k6t4p2_local_7 4 j := by decide + +private theorem k6t4p2_local_7_eq_row_5 : ∀ j : Fin 6, (fun a b => k6t4p2_state_7 a b ∪ requiredMatrix 6 k6t4p2_step_7_data.required a b) 5 j = k6t4p2_local_7 5 j := by decide + +private theorem k6t4p2_local_7_eq : (fun a b => k6t4p2_state_7 a b ∪ requiredMatrix 6 k6t4p2_step_7_data.required a b) = k6t4p2_local_7 := by + funext i j + fin_cases i + + · exact k6t4p2_local_7_eq_row_0 j + + · exact k6t4p2_local_7_eq_row_1 j + + · exact k6t4p2_local_7_eq_row_2 j + + · exact k6t4p2_local_7_eq_row_3 j + + · exact k6t4p2_local_7_eq_row_4 j + + · exact k6t4p2_local_7_eq_row_5 j + +private theorem k6t4p2_local_7_paths : ∀ p ∈ k6t4p2_step_7_data.required, p.Check (addedEdgeGraph k6t4p2.graph k6t4p2_step_7_data.i k6t4p2_step_7_data.j) 6 := by decide + +private theorem k6t4p2_local_7_bad : k6t4p2_step_7_data.bad.Check (addedEdgeGraph k6t4p2.graph k6t4p2_step_7_data.i k6t4p2_step_7_data.j) k6t4p2_local_7 6 4 := by decide + +private theorem k6t4p2_step_7_check : k6t4p2_step_7.Check k6t4p2.graph k6t4p2_state_7 6 4 := by + change k6t4p2_step_7_data.Check k6t4p2.graph k6t4p2_state_7 6 4 + refine ⟨k6t4p2_local_7_paths, ?_⟩ + rw [k6t4p2_local_7_eq] + exact k6t4p2_local_7_bad + +private theorem k6t4p2_update_7 : k6t4p2_step_7.apply k6t4p2_state_7 = k6t4p2_state_8 := by + have h : ∀ i j : Fin 6, k6t4p2_step_7.apply k6t4p2_state_7 i j = k6t4p2_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k6t4p2_closure_8 : ClosureCheck k6t4p2.graph k6t4p2_state_8 6 4 [] := by trivial + +private theorem k6t4p2_closure_7 : ClosureCheck k6t4p2.graph k6t4p2_state_7 6 4 [k6t4p2_step_7] := by + constructor + · exact k6t4p2_step_7_check + · rw [k6t4p2_update_7] + exact k6t4p2_closure_8 + +private theorem k6t4p2_closure_6 : ClosureCheck k6t4p2.graph k6t4p2_state_6 6 4 [k6t4p2_step_6, k6t4p2_step_7] := by + constructor + · exact k6t4p2_step_6_check + · rw [k6t4p2_update_6] + exact k6t4p2_closure_7 + +private theorem k6t4p2_closure_5 : ClosureCheck k6t4p2.graph k6t4p2_state_5 6 4 [k6t4p2_step_5, k6t4p2_step_6, k6t4p2_step_7] := by + constructor + · exact k6t4p2_step_5_check + · rw [k6t4p2_update_5] + exact k6t4p2_closure_6 + +private theorem k6t4p2_closure_4 : ClosureCheck k6t4p2.graph k6t4p2_state_4 6 4 [k6t4p2_step_4, k6t4p2_step_5, k6t4p2_step_6, k6t4p2_step_7] := by + constructor + · exact k6t4p2_step_4_check + · rw [k6t4p2_update_4] + exact k6t4p2_closure_5 + +private theorem k6t4p2_closure_3 : ClosureCheck k6t4p2.graph k6t4p2_state_3 6 4 [k6t4p2_step_3, k6t4p2_step_4, k6t4p2_step_5, k6t4p2_step_6, k6t4p2_step_7] := by + constructor + · exact k6t4p2_step_3_check + · rw [k6t4p2_update_3] + exact k6t4p2_closure_4 + +private theorem k6t4p2_closure_2 : ClosureCheck k6t4p2.graph k6t4p2_state_2 6 4 [k6t4p2_step_2, k6t4p2_step_3, k6t4p2_step_4, k6t4p2_step_5, k6t4p2_step_6, k6t4p2_step_7] := by + constructor + · exact k6t4p2_step_2_check + · rw [k6t4p2_update_2] + exact k6t4p2_closure_3 + +private theorem k6t4p2_closure_1 : ClosureCheck k6t4p2.graph k6t4p2_state_1 6 4 [k6t4p2_step_1, k6t4p2_step_2, k6t4p2_step_3, k6t4p2_step_4, k6t4p2_step_5, k6t4p2_step_6, k6t4p2_step_7] := by + constructor + · exact k6t4p2_step_1_check + · rw [k6t4p2_update_1] + exact k6t4p2_closure_2 + +private theorem k6t4p2_closure_0 : ClosureCheck k6t4p2.graph k6t4p2_state_0 6 4 [k6t4p2_step_0, k6t4p2_step_1, k6t4p2_step_2, k6t4p2_step_3, k6t4p2_step_4, k6t4p2_step_5, k6t4p2_step_6, k6t4p2_step_7] := by + constructor + · exact k6t4p2_step_0_check + · rw [k6t4p2_update_0] + exact k6t4p2_closure_1 + +private theorem k6t4p2_matrix_eq : k6t4p2.matrix 6 = k6t4p2_state_8 := by + change closureMatrix (k6t4p2.initialMatrix 6) _ = _ + rw [k6t4p2_initial_eq] + change closureMatrix k6t4p2_state_0 [k6t4p2_step_0, k6t4p2_step_1, k6t4p2_step_2, k6t4p2_step_3, k6t4p2_step_4, k6t4p2_step_5, k6t4p2_step_6, k6t4p2_step_7] = _ + simp only [closureMatrix] + rw [k6t4p2_update_0, k6t4p2_update_1, k6t4p2_update_2, k6t4p2_update_3, k6t4p2_update_4, k6t4p2_update_5, k6t4p2_update_6, k6t4p2_update_7] + +private theorem k6t4p2_part_0 : k6t4p2.chains.flatten = List.finRange _ := by decide + +private theorem k6t4p2_part_1 : k6t4p2.chains.map List.length = ([[], [], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k6t4p2_part_2 : k6t4p2.chains.map (fun l => l.map (fun i => decide (i ∈ k6t4p2.clique))) = ([[], [], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k6t4p2_templates_item_0 : (⟨0, 1, [], [], [], 3, 5⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_1 : (⟨0, 1, [[2, 3, 4, 5]], [], [], 1, 1⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_2 : (⟨0, 2, [], [], [], 3, 5⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_3 : (⟨0, 2, [], [], [3, 4, 5], 1, 2⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_4 : (⟨0, 3, [], [], [2], 2, 4⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_5 : (⟨0, 3, [], [], [4, 5], 1, 3⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_6 : (⟨0, 4, [], [], [3, 2], 1, 3⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_7 : (⟨0, 4, [], [], [5], 2, 4⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_8 : (⟨0, 5, [], [], [], 3, 5⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_9 : (⟨0, 5, [], [], [4, 3, 2], 1, 2⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_10 : (⟨1, 2, [], [], [], 3, 5⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_11 : (⟨1, 2, [], [], [3, 4, 5], 1, 2⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_12 : (⟨1, 3, [], [], [2], 2, 4⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_13 : (⟨1, 3, [], [], [4, 5], 1, 3⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_14 : (⟨1, 4, [], [], [3, 2], 1, 3⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_15 : (⟨1, 4, [], [], [5], 2, 4⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_16 : (⟨1, 5, [], [], [], 3, 5⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_17 : (⟨1, 5, [], [], [4, 3, 2], 1, 2⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_18 : (⟨2, 3, [], [], [4, 5], 1, 3⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_19 : (⟨2, 4, [], [], [5], 2, 4⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_20 : (⟨2, 5, [], [], [], 3, 5⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_21 : (⟨3, 4, [], [2], [5], 1, 3⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_22 : (⟨3, 5, [], [2], [], 2, 4⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_templates_item_23 : (⟨4, 5, [], [2, 3], [], 1, 3⟩ : TemplateData (Fin 6)).Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p2_part_3 : ∀ T ∈ k6t4p2.templates, T.Check k6t4p2.graph k6t4p2.clique 6 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k6t4p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t4p2_templates_item_0, k6t4p2_templates_item_1, k6t4p2_templates_item_2, k6t4p2_templates_item_3, k6t4p2_templates_item_4, k6t4p2_templates_item_5, k6t4p2_templates_item_6, k6t4p2_templates_item_7, k6t4p2_templates_item_8, k6t4p2_templates_item_9, k6t4p2_templates_item_10, k6t4p2_templates_item_11, k6t4p2_templates_item_12, k6t4p2_templates_item_13, k6t4p2_templates_item_14, k6t4p2_templates_item_15, k6t4p2_templates_item_16, k6t4p2_templates_item_17, k6t4p2_templates_item_18, k6t4p2_templates_item_19, k6t4p2_templates_item_20, k6t4p2_templates_item_21, k6t4p2_templates_item_22, k6t4p2_templates_item_23⟩ + +private theorem k6t4p2_part_4 : ∀ p ∈ k6t4p2.required, p.Check k6t4p2.graph 6 := by decide + +private theorem k6t4p2_part_5 : ClosureCheck k6t4p2.graph (k6t4p2.initialMatrix 6) 6 4 k6t4p2.closure := by + rw [k6t4p2_initial_eq] + exact k6t4p2_closure_0 + +private theorem k6t4p2_part_6 : k6t4p2.bad.Check k6t4p2.graph (k6t4p2.matrix 6) 6 4 := by + rw [k6t4p2_matrix_eq] + decide + +theorem k6t4p2_check : k6t4p2.Check 6 4 [[], [], [2]] := + ⟨k6t4p2_part_0, k6t4p2_part_1, k6t4p2_part_2, k6t4p2_part_3, k6t4p2_part_4, k6t4p2_part_5, k6t4p2_part_6⟩ +def k6t4p3 : LayoutCertificate 6 where + chains := [[0], [1, 2, 3, 4, 5]] + clique := {0, 1, 3, 5} + templates := [⟨0, 1, [], [], [], 2, 5⟩, + ⟨0, 1, [], [], [2, 3, 4, 5], 1, 1⟩, + ⟨0, 2, [], [], [1], 1, 4⟩, + ⟨0, 4, [], [], [3], 1, 4⟩, + ⟨0, 5, [], [], [4, 3, 2, 1], 1, 1⟩, + ⟨1, 2, [], [], [3], 1, 4⟩, + ⟨1, 4, [], [], [3], 1, 4⟩, + ⟨2, 3, [], [1], [], 1, 4⟩, + ⟨2, 4, [], [1], [3], 1, 3⟩, + ⟨2, 5, [], [1], [], 1, 4⟩, + ⟨3, 4, [], [], [5], 1, 4⟩, + ⟨4, 5, [], [3], [], 1, 4⟩] + required := [⟨2, 4, [3]⟩] + closure := [] + bad := ⟨none, {(0, 2), (2, 2), (4, 2), (1, 1)}⟩ + + +private def k6t4p3_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {1}], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4], + #[∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1}, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t4p3_initial_eq_row_0 : ∀ j : Fin 6, (k6t4p3.initialMatrix 6) 0 j = k6t4p3_state_0 0 j := by decide + +private theorem k6t4p3_initial_eq_row_1 : ∀ j : Fin 6, (k6t4p3.initialMatrix 6) 1 j = k6t4p3_state_0 1 j := by decide + +private theorem k6t4p3_initial_eq_row_2 : ∀ j : Fin 6, (k6t4p3.initialMatrix 6) 2 j = k6t4p3_state_0 2 j := by decide + +private theorem k6t4p3_initial_eq_row_3 : ∀ j : Fin 6, (k6t4p3.initialMatrix 6) 3 j = k6t4p3_state_0 3 j := by decide + +private theorem k6t4p3_initial_eq_row_4 : ∀ j : Fin 6, (k6t4p3.initialMatrix 6) 4 j = k6t4p3_state_0 4 j := by decide + +private theorem k6t4p3_initial_eq_row_5 : ∀ j : Fin 6, (k6t4p3.initialMatrix 6) 5 j = k6t4p3_state_0 5 j := by decide + +private theorem k6t4p3_initial_eq : (k6t4p3.initialMatrix 6) = k6t4p3_state_0 := by + funext i j + fin_cases i + + · exact k6t4p3_initial_eq_row_0 j + + · exact k6t4p3_initial_eq_row_1 j + + · exact k6t4p3_initial_eq_row_2 j + + · exact k6t4p3_initial_eq_row_3 j + + · exact k6t4p3_initial_eq_row_4 j + + · exact k6t4p3_initial_eq_row_5 j + +private theorem k6t4p3_closure_0 : ClosureCheck k6t4p3.graph k6t4p3_state_0 6 4 [] := by trivial + +private theorem k6t4p3_matrix_eq : k6t4p3.matrix 6 = k6t4p3_state_0 := by + change closureMatrix (k6t4p3.initialMatrix 6) _ = _ + rw [k6t4p3_initial_eq] + change closureMatrix k6t4p3_state_0 [] = _ + rfl + +private theorem k6t4p3_part_0 : k6t4p3.chains.flatten = List.finRange _ := by decide + +private theorem k6t4p3_part_1 : k6t4p3.chains.map List.length = ([[], [1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k6t4p3_part_2 : k6t4p3.chains.map (fun l => l.map (fun i => decide (i ∈ k6t4p3.clique))) = ([[], [1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k6t4p3_templates_item_0 : (⟨0, 1, [], [], [], 2, 5⟩ : TemplateData (Fin 6)).Check k6t4p3.graph k6t4p3.clique 6 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p3_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5], 1, 1⟩ : TemplateData (Fin 6)).Check k6t4p3.graph k6t4p3.clique 6 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p3_templates_item_2 : (⟨0, 2, [], [], [1], 1, 4⟩ : TemplateData (Fin 6)).Check k6t4p3.graph k6t4p3.clique 6 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p3_templates_item_3 : (⟨0, 4, [], [], [3], 1, 4⟩ : TemplateData (Fin 6)).Check k6t4p3.graph k6t4p3.clique 6 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p3_templates_item_4 : (⟨0, 5, [], [], [4, 3, 2, 1], 1, 1⟩ : TemplateData (Fin 6)).Check k6t4p3.graph k6t4p3.clique 6 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p3_templates_item_5 : (⟨1, 2, [], [], [3], 1, 4⟩ : TemplateData (Fin 6)).Check k6t4p3.graph k6t4p3.clique 6 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p3_templates_item_6 : (⟨1, 4, [], [], [3], 1, 4⟩ : TemplateData (Fin 6)).Check k6t4p3.graph k6t4p3.clique 6 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p3_templates_item_7 : (⟨2, 3, [], [1], [], 1, 4⟩ : TemplateData (Fin 6)).Check k6t4p3.graph k6t4p3.clique 6 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p3_templates_item_8 : (⟨2, 4, [], [1], [3], 1, 3⟩ : TemplateData (Fin 6)).Check k6t4p3.graph k6t4p3.clique 6 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p3_templates_item_9 : (⟨2, 5, [], [1], [], 1, 4⟩ : TemplateData (Fin 6)).Check k6t4p3.graph k6t4p3.clique 6 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p3_templates_item_10 : (⟨3, 4, [], [], [5], 1, 4⟩ : TemplateData (Fin 6)).Check k6t4p3.graph k6t4p3.clique 6 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p3_templates_item_11 : (⟨4, 5, [], [3], [], 1, 4⟩ : TemplateData (Fin 6)).Check k6t4p3.graph k6t4p3.clique 6 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p3_part_3 : ∀ T ∈ k6t4p3.templates, T.Check k6t4p3.graph k6t4p3.clique 6 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k6t4p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t4p3_templates_item_0, k6t4p3_templates_item_1, k6t4p3_templates_item_2, k6t4p3_templates_item_3, k6t4p3_templates_item_4, k6t4p3_templates_item_5, k6t4p3_templates_item_6, k6t4p3_templates_item_7, k6t4p3_templates_item_8, k6t4p3_templates_item_9, k6t4p3_templates_item_10, k6t4p3_templates_item_11⟩ + +private theorem k6t4p3_required_item_0 : (⟨2, 4, [3]⟩ : RequiredPathData (Fin 6)).Check k6t4p3.graph 6 := by decide + +private theorem k6t4p3_part_4 : ∀ p ∈ k6t4p3.required, p.Check k6t4p3.graph 6 := by + simp only [k6t4p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact k6t4p3_required_item_0 + +private theorem k6t4p3_part_5 : ClosureCheck k6t4p3.graph (k6t4p3.initialMatrix 6) 6 4 k6t4p3.closure := by + rw [k6t4p3_initial_eq] + exact k6t4p3_closure_0 + +private theorem k6t4p3_part_6 : k6t4p3.bad.Check k6t4p3.graph (k6t4p3.matrix 6) 6 4 := by + rw [k6t4p3_matrix_eq] + decide + +theorem k6t4p3_check : k6t4p3.Check 6 4 [[], [1, 1]] := + ⟨k6t4p3_part_0, k6t4p3_part_1, k6t4p3_part_2, k6t4p3_part_3, k6t4p3_part_4, k6t4p3_part_5, k6t4p3_part_6⟩ +def k6t4p4 : LayoutCertificate 6 where + chains := [[0, 1, 2], [3, 4, 5]] + clique := {0, 2, 3, 5} + templates := [⟨0, 1, [], [], [2], 1, 4⟩, + ⟨0, 3, [], [], [], 2, 5⟩, + ⟨0, 3, [], [2, 1], [4, 5], 1, 1⟩, + ⟨0, 4, [], [], [3], 1, 4⟩, + ⟨0, 5, [], [2, 1], [4, 3], 1, 1⟩, + ⟨1, 2, [], [0], [], 1, 4⟩, + ⟨1, 3, [], [0], [], 1, 4⟩, + ⟨1, 4, [], [0], [3], 1, 3⟩, + ⟨1, 5, [], [0], [], 1, 4⟩, + ⟨2, 3, [], [0, 1], [4, 5], 1, 1⟩, + ⟨3, 4, [], [], [5], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (3, 2), (1, 2), (4, 1)}⟩ + + +private def k6t4p4_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 4, ∅, Finset.Icc 1 5, Finset.Icc 1 4, {1}], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 3}, Finset.Icc 1 4], + #[∅, Finset.Icc 1 4, ∅, {1}, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 4, {1}, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 4, {1, 2, 3}, ∅, Finset.Icc 1 4, ∅, ∅], + #[{1}, Finset.Icc 1 4, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t4p4_initial_eq_row_0 : ∀ j : Fin 6, (k6t4p4.initialMatrix 6) 0 j = k6t4p4_state_0 0 j := by decide + +private theorem k6t4p4_initial_eq_row_1 : ∀ j : Fin 6, (k6t4p4.initialMatrix 6) 1 j = k6t4p4_state_0 1 j := by decide + +private theorem k6t4p4_initial_eq_row_2 : ∀ j : Fin 6, (k6t4p4.initialMatrix 6) 2 j = k6t4p4_state_0 2 j := by decide + +private theorem k6t4p4_initial_eq_row_3 : ∀ j : Fin 6, (k6t4p4.initialMatrix 6) 3 j = k6t4p4_state_0 3 j := by decide + +private theorem k6t4p4_initial_eq_row_4 : ∀ j : Fin 6, (k6t4p4.initialMatrix 6) 4 j = k6t4p4_state_0 4 j := by decide + +private theorem k6t4p4_initial_eq_row_5 : ∀ j : Fin 6, (k6t4p4.initialMatrix 6) 5 j = k6t4p4_state_0 5 j := by decide + +private theorem k6t4p4_initial_eq : (k6t4p4.initialMatrix 6) = k6t4p4_state_0 := by + funext i j + fin_cases i + + · exact k6t4p4_initial_eq_row_0 j + + · exact k6t4p4_initial_eq_row_1 j + + · exact k6t4p4_initial_eq_row_2 j + + · exact k6t4p4_initial_eq_row_3 j + + · exact k6t4p4_initial_eq_row_4 j + + · exact k6t4p4_initial_eq_row_5 j + +private theorem k6t4p4_closure_0 : ClosureCheck k6t4p4.graph k6t4p4_state_0 6 4 [] := by trivial + +private theorem k6t4p4_matrix_eq : k6t4p4.matrix 6 = k6t4p4_state_0 := by + change closureMatrix (k6t4p4.initialMatrix 6) _ = _ + rw [k6t4p4_initial_eq] + change closureMatrix k6t4p4_state_0 [] = _ + rfl + +private theorem k6t4p4_part_0 : k6t4p4.chains.flatten = List.finRange _ := by decide + +private theorem k6t4p4_part_1 : k6t4p4.chains.map List.length = ([[1], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k6t4p4_part_2 : k6t4p4.chains.map (fun l => l.map (fun i => decide (i ∈ k6t4p4.clique))) = ([[1], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k6t4p4_templates_item_0 : (⟨0, 1, [], [], [2], 1, 4⟩ : TemplateData (Fin 6)).Check k6t4p4.graph k6t4p4.clique 6 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p4_templates_item_1 : (⟨0, 3, [], [], [], 2, 5⟩ : TemplateData (Fin 6)).Check k6t4p4.graph k6t4p4.clique 6 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p4_templates_item_2 : (⟨0, 3, [], [2, 1], [4, 5], 1, 1⟩ : TemplateData (Fin 6)).Check k6t4p4.graph k6t4p4.clique 6 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p4_templates_item_3 : (⟨0, 4, [], [], [3], 1, 4⟩ : TemplateData (Fin 6)).Check k6t4p4.graph k6t4p4.clique 6 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p4_templates_item_4 : (⟨0, 5, [], [2, 1], [4, 3], 1, 1⟩ : TemplateData (Fin 6)).Check k6t4p4.graph k6t4p4.clique 6 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p4_templates_item_5 : (⟨1, 2, [], [0], [], 1, 4⟩ : TemplateData (Fin 6)).Check k6t4p4.graph k6t4p4.clique 6 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p4_templates_item_6 : (⟨1, 3, [], [0], [], 1, 4⟩ : TemplateData (Fin 6)).Check k6t4p4.graph k6t4p4.clique 6 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p4_templates_item_7 : (⟨1, 4, [], [0], [3], 1, 3⟩ : TemplateData (Fin 6)).Check k6t4p4.graph k6t4p4.clique 6 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p4_templates_item_8 : (⟨1, 5, [], [0], [], 1, 4⟩ : TemplateData (Fin 6)).Check k6t4p4.graph k6t4p4.clique 6 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p4_templates_item_9 : (⟨2, 3, [], [0, 1], [4, 5], 1, 1⟩ : TemplateData (Fin 6)).Check k6t4p4.graph k6t4p4.clique 6 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p4_templates_item_10 : (⟨3, 4, [], [], [5], 1, 4⟩ : TemplateData (Fin 6)).Check k6t4p4.graph k6t4p4.clique 6 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t4p4_part_3 : ∀ T ∈ k6t4p4.templates, T.Check k6t4p4.graph k6t4p4.clique 6 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k6t4p4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t4p4_templates_item_0, k6t4p4_templates_item_1, k6t4p4_templates_item_2, k6t4p4_templates_item_3, k6t4p4_templates_item_4, k6t4p4_templates_item_5, k6t4p4_templates_item_6, k6t4p4_templates_item_7, k6t4p4_templates_item_8, k6t4p4_templates_item_9, k6t4p4_templates_item_10⟩ + +private theorem k6t4p4_part_4 : ∀ p ∈ k6t4p4.required, p.Check k6t4p4.graph 6 := by decide + +private theorem k6t4p4_part_5 : ClosureCheck k6t4p4.graph (k6t4p4.initialMatrix 6) 6 4 k6t4p4.closure := by + rw [k6t4p4_initial_eq] + exact k6t4p4_closure_0 + +private theorem k6t4p4_part_6 : k6t4p4.bad.Check k6t4p4.graph (k6t4p4.matrix 6) 6 4 := by + rw [k6t4p4_matrix_eq] + decide + +theorem k6t4p4_check : k6t4p4.Check 6 4 [[1], [1]] := + ⟨k6t4p4_part_0, k6t4p4_part_1, k6t4p4_part_2, k6t4p4_part_3, k6t4p4_part_4, k6t4p4_part_5, k6t4p4_part_6⟩ +def k6t5p0 : LayoutCertificate 5 where + chains := [[0], [1], [2], [3], [4]] + clique := {0, 1, 2, 3, 4} + templates := [⟨0, 1, [], [], [], 1, 5⟩, + ⟨0, 2, [], [], [], 1, 5⟩, + ⟨0, 3, [], [], [], 1, 5⟩, + ⟨0, 4, [], [], [], 1, 5⟩, + ⟨1, 2, [], [], [], 1, 5⟩, + ⟨1, 3, [], [], [], 1, 5⟩, + ⟨1, 4, [], [], [], 1, 5⟩, + ⟨2, 3, [], [], [], 1, 5⟩, + ⟨2, 4, [], [], [], 1, 5⟩, + ⟨3, 4, [], [], [], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (1, 2), (2, 2), (3, 2)}⟩ + + +private def k6t5p0_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t5p0_initial_eq_row_0 : ∀ j : Fin 5, (k6t5p0.initialMatrix 6) 0 j = k6t5p0_state_0 0 j := by decide + +private theorem k6t5p0_initial_eq_row_1 : ∀ j : Fin 5, (k6t5p0.initialMatrix 6) 1 j = k6t5p0_state_0 1 j := by decide + +private theorem k6t5p0_initial_eq_row_2 : ∀ j : Fin 5, (k6t5p0.initialMatrix 6) 2 j = k6t5p0_state_0 2 j := by decide + +private theorem k6t5p0_initial_eq_row_3 : ∀ j : Fin 5, (k6t5p0.initialMatrix 6) 3 j = k6t5p0_state_0 3 j := by decide + +private theorem k6t5p0_initial_eq_row_4 : ∀ j : Fin 5, (k6t5p0.initialMatrix 6) 4 j = k6t5p0_state_0 4 j := by decide + +private theorem k6t5p0_initial_eq : (k6t5p0.initialMatrix 6) = k6t5p0_state_0 := by + funext i j + fin_cases i + + · exact k6t5p0_initial_eq_row_0 j + + · exact k6t5p0_initial_eq_row_1 j + + · exact k6t5p0_initial_eq_row_2 j + + · exact k6t5p0_initial_eq_row_3 j + + · exact k6t5p0_initial_eq_row_4 j + +private theorem k6t5p0_closure_0 : ClosureCheck k6t5p0.graph k6t5p0_state_0 6 5 [] := by trivial + +private theorem k6t5p0_matrix_eq : k6t5p0.matrix 6 = k6t5p0_state_0 := by + change closureMatrix (k6t5p0.initialMatrix 6) _ = _ + rw [k6t5p0_initial_eq] + change closureMatrix k6t5p0_state_0 [] = _ + rfl + +private theorem k6t5p0_part_0 : k6t5p0.chains.flatten = List.finRange _ := by decide + +private theorem k6t5p0_part_1 : k6t5p0.chains.map List.length = ([[], [], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k6t5p0_part_2 : k6t5p0.chains.map (fun l => l.map (fun i => decide (i ∈ k6t5p0.clique))) = ([[], [], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k6t5p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 5⟩ : TemplateData (Fin 5)).Check k6t5p0.graph k6t5p0.clique 6 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 5⟩ : TemplateData (Fin 5)).Check k6t5p0.graph k6t5p0.clique 6 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 5⟩ : TemplateData (Fin 5)).Check k6t5p0.graph k6t5p0.clique 6 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p0_templates_item_3 : (⟨0, 4, [], [], [], 1, 5⟩ : TemplateData (Fin 5)).Check k6t5p0.graph k6t5p0.clique 6 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p0_templates_item_4 : (⟨1, 2, [], [], [], 1, 5⟩ : TemplateData (Fin 5)).Check k6t5p0.graph k6t5p0.clique 6 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p0_templates_item_5 : (⟨1, 3, [], [], [], 1, 5⟩ : TemplateData (Fin 5)).Check k6t5p0.graph k6t5p0.clique 6 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p0_templates_item_6 : (⟨1, 4, [], [], [], 1, 5⟩ : TemplateData (Fin 5)).Check k6t5p0.graph k6t5p0.clique 6 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p0_templates_item_7 : (⟨2, 3, [], [], [], 1, 5⟩ : TemplateData (Fin 5)).Check k6t5p0.graph k6t5p0.clique 6 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p0_templates_item_8 : (⟨2, 4, [], [], [], 1, 5⟩ : TemplateData (Fin 5)).Check k6t5p0.graph k6t5p0.clique 6 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p0_templates_item_9 : (⟨3, 4, [], [], [], 1, 5⟩ : TemplateData (Fin 5)).Check k6t5p0.graph k6t5p0.clique 6 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p0_part_3 : ∀ T ∈ k6t5p0.templates, T.Check k6t5p0.graph k6t5p0.clique 6 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k6t5p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t5p0_templates_item_0, k6t5p0_templates_item_1, k6t5p0_templates_item_2, k6t5p0_templates_item_3, k6t5p0_templates_item_4, k6t5p0_templates_item_5, k6t5p0_templates_item_6, k6t5p0_templates_item_7, k6t5p0_templates_item_8, k6t5p0_templates_item_9⟩ + +private theorem k6t5p0_part_4 : ∀ p ∈ k6t5p0.required, p.Check k6t5p0.graph 6 := by decide + +private theorem k6t5p0_part_5 : ClosureCheck k6t5p0.graph (k6t5p0.initialMatrix 6) 6 5 k6t5p0.closure := by + rw [k6t5p0_initial_eq] + exact k6t5p0_closure_0 + +private theorem k6t5p0_part_6 : k6t5p0.bad.Check k6t5p0.graph (k6t5p0.matrix 6) 6 5 := by + rw [k6t5p0_matrix_eq] + decide + +theorem k6t5p0_check : k6t5p0.Check 6 5 [[], [], [], [], []] := + ⟨k6t5p0_part_0, k6t5p0_part_1, k6t5p0_part_2, k6t5p0_part_3, k6t5p0_part_4, k6t5p0_part_5, k6t5p0_part_6⟩ +def k6t5p1 : LayoutCertificate 6 where + chains := [[0], [1], [2], [3, 4, 5]] + clique := {0, 1, 2, 3, 5} + templates := [⟨0, 1, [], [], [], 2, 5⟩, + ⟨0, 1, [[3, 4, 5]], [], [], 1, 2⟩, + ⟨0, 2, [], [], [], 2, 5⟩, + ⟨0, 2, [[3, 4, 5]], [], [], 1, 2⟩, + ⟨0, 3, [], [], [4, 5], 1, 3⟩, + ⟨0, 4, [], [], [3], 1, 4⟩, + ⟨0, 5, [], [], [4, 3], 1, 3⟩, + ⟨1, 2, [], [], [], 2, 5⟩, + ⟨1, 2, [[3, 4, 5]], [], [], 1, 2⟩, + ⟨1, 3, [], [], [4, 5], 1, 3⟩, + ⟨1, 4, [], [], [3], 1, 4⟩, + ⟨1, 5, [], [], [4, 3], 1, 3⟩, + ⟨2, 3, [], [], [4, 5], 1, 3⟩, + ⟨2, 4, [], [], [3], 1, 4⟩, + ⟨2, 5, [], [], [4, 3], 1, 3⟩, + ⟨3, 4, [], [], [5], 1, 4⟩, + ⟨4, 5, [], [3], [], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (1, 2), (2, 2), (4, 2)}⟩ + + +private def k6t5p1_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 5, {1, 2, 3}, Finset.Icc 1 4, {1, 2, 3}], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, {1, 2, 3}, Finset.Icc 1 4, {1, 2, 3}], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2, 3}, Finset.Icc 1 4, {1, 2, 3}], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t5p1_initial_eq_row_0 : ∀ j : Fin 6, (k6t5p1.initialMatrix 6) 0 j = k6t5p1_state_0 0 j := by decide + +private theorem k6t5p1_initial_eq_row_1 : ∀ j : Fin 6, (k6t5p1.initialMatrix 6) 1 j = k6t5p1_state_0 1 j := by decide + +private theorem k6t5p1_initial_eq_row_2 : ∀ j : Fin 6, (k6t5p1.initialMatrix 6) 2 j = k6t5p1_state_0 2 j := by decide + +private theorem k6t5p1_initial_eq_row_3 : ∀ j : Fin 6, (k6t5p1.initialMatrix 6) 3 j = k6t5p1_state_0 3 j := by decide + +private theorem k6t5p1_initial_eq_row_4 : ∀ j : Fin 6, (k6t5p1.initialMatrix 6) 4 j = k6t5p1_state_0 4 j := by decide + +private theorem k6t5p1_initial_eq_row_5 : ∀ j : Fin 6, (k6t5p1.initialMatrix 6) 5 j = k6t5p1_state_0 5 j := by decide + +private theorem k6t5p1_initial_eq : (k6t5p1.initialMatrix 6) = k6t5p1_state_0 := by + funext i j + fin_cases i + + · exact k6t5p1_initial_eq_row_0 j + + · exact k6t5p1_initial_eq_row_1 j + + · exact k6t5p1_initial_eq_row_2 j + + · exact k6t5p1_initial_eq_row_3 j + + · exact k6t5p1_initial_eq_row_4 j + + · exact k6t5p1_initial_eq_row_5 j + +private theorem k6t5p1_closure_0 : ClosureCheck k6t5p1.graph k6t5p1_state_0 6 5 [] := by trivial + +private theorem k6t5p1_matrix_eq : k6t5p1.matrix 6 = k6t5p1_state_0 := by + change closureMatrix (k6t5p1.initialMatrix 6) _ = _ + rw [k6t5p1_initial_eq] + change closureMatrix k6t5p1_state_0 [] = _ + rfl + +private theorem k6t5p1_part_0 : k6t5p1.chains.flatten = List.finRange _ := by decide + +private theorem k6t5p1_part_1 : k6t5p1.chains.map List.length = ([[], [], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k6t5p1_part_2 : k6t5p1.chains.map (fun l => l.map (fun i => decide (i ∈ k6t5p1.clique))) = ([[], [], [], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k6t5p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 5⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_1 : (⟨0, 1, [[3, 4, 5]], [], [], 1, 2⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_2 : (⟨0, 2, [], [], [], 2, 5⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_3 : (⟨0, 2, [[3, 4, 5]], [], [], 1, 2⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_4 : (⟨0, 3, [], [], [4, 5], 1, 3⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_5 : (⟨0, 4, [], [], [3], 1, 4⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_6 : (⟨0, 5, [], [], [4, 3], 1, 3⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_7 : (⟨1, 2, [], [], [], 2, 5⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_8 : (⟨1, 2, [[3, 4, 5]], [], [], 1, 2⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_9 : (⟨1, 3, [], [], [4, 5], 1, 3⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_10 : (⟨1, 4, [], [], [3], 1, 4⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_11 : (⟨1, 5, [], [], [4, 3], 1, 3⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_12 : (⟨2, 3, [], [], [4, 5], 1, 3⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_13 : (⟨2, 4, [], [], [3], 1, 4⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_14 : (⟨2, 5, [], [], [4, 3], 1, 3⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_15 : (⟨3, 4, [], [], [5], 1, 4⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_templates_item_16 : (⟨4, 5, [], [3], [], 1, 4⟩ : TemplateData (Fin 6)).Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t5p1_part_3 : ∀ T ∈ k6t5p1.templates, T.Check k6t5p1.graph k6t5p1.clique 6 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k6t5p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t5p1_templates_item_0, k6t5p1_templates_item_1, k6t5p1_templates_item_2, k6t5p1_templates_item_3, k6t5p1_templates_item_4, k6t5p1_templates_item_5, k6t5p1_templates_item_6, k6t5p1_templates_item_7, k6t5p1_templates_item_8, k6t5p1_templates_item_9, k6t5p1_templates_item_10, k6t5p1_templates_item_11, k6t5p1_templates_item_12, k6t5p1_templates_item_13, k6t5p1_templates_item_14, k6t5p1_templates_item_15, k6t5p1_templates_item_16⟩ + +private theorem k6t5p1_part_4 : ∀ p ∈ k6t5p1.required, p.Check k6t5p1.graph 6 := by decide + +private theorem k6t5p1_part_5 : ClosureCheck k6t5p1.graph (k6t5p1.initialMatrix 6) 6 5 k6t5p1.closure := by + rw [k6t5p1_initial_eq] + exact k6t5p1_closure_0 + +private theorem k6t5p1_part_6 : k6t5p1.bad.Check k6t5p1.graph (k6t5p1.matrix 6) 6 5 := by + rw [k6t5p1_matrix_eq] + decide + +theorem k6t5p1_check : k6t5p1.Check 6 5 [[], [], [], [1]] := + ⟨k6t5p1_part_0, k6t5p1_part_1, k6t5p1_part_2, k6t5p1_part_3, k6t5p1_part_4, k6t5p1_part_5, k6t5p1_part_6⟩ +def k6t6p0 : LayoutCertificate 6 where + chains := [[0], [1], [2], [3], [4], [5]] + clique := {0, 1, 2, 3, 4, 5} + templates := [⟨0, 1, [], [], [], 1, 5⟩, + ⟨0, 2, [], [], [], 1, 5⟩, + ⟨0, 3, [], [], [], 1, 5⟩, + ⟨0, 4, [], [], [], 1, 5⟩, + ⟨0, 5, [], [], [], 1, 5⟩, + ⟨1, 2, [], [], [], 1, 5⟩, + ⟨1, 3, [], [], [], 1, 5⟩, + ⟨1, 4, [], [], [], 1, 5⟩, + ⟨1, 5, [], [], [], 1, 5⟩, + ⟨2, 3, [], [], [], 1, 5⟩, + ⟨2, 4, [], [], [], 1, 5⟩, + ⟨2, 5, [], [], [], 1, 5⟩, + ⟨3, 4, [], [], [], 1, 5⟩, + ⟨3, 5, [], [], [], 1, 5⟩, + ⟨4, 5, [], [], [], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 1), (1, 1), (2, 1), (3, 1), (4, 1), (5, 3)}⟩ + + +private def k6t6p0_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k6t6p0_initial_eq_row_0 : ∀ j : Fin 6, (k6t6p0.initialMatrix 6) 0 j = k6t6p0_state_0 0 j := by decide + +private theorem k6t6p0_initial_eq_row_1 : ∀ j : Fin 6, (k6t6p0.initialMatrix 6) 1 j = k6t6p0_state_0 1 j := by decide + +private theorem k6t6p0_initial_eq_row_2 : ∀ j : Fin 6, (k6t6p0.initialMatrix 6) 2 j = k6t6p0_state_0 2 j := by decide + +private theorem k6t6p0_initial_eq_row_3 : ∀ j : Fin 6, (k6t6p0.initialMatrix 6) 3 j = k6t6p0_state_0 3 j := by decide + +private theorem k6t6p0_initial_eq_row_4 : ∀ j : Fin 6, (k6t6p0.initialMatrix 6) 4 j = k6t6p0_state_0 4 j := by decide + +private theorem k6t6p0_initial_eq_row_5 : ∀ j : Fin 6, (k6t6p0.initialMatrix 6) 5 j = k6t6p0_state_0 5 j := by decide + +private theorem k6t6p0_initial_eq : (k6t6p0.initialMatrix 6) = k6t6p0_state_0 := by + funext i j + fin_cases i + + · exact k6t6p0_initial_eq_row_0 j + + · exact k6t6p0_initial_eq_row_1 j + + · exact k6t6p0_initial_eq_row_2 j + + · exact k6t6p0_initial_eq_row_3 j + + · exact k6t6p0_initial_eq_row_4 j + + · exact k6t6p0_initial_eq_row_5 j + +private theorem k6t6p0_closure_0 : ClosureCheck k6t6p0.graph k6t6p0_state_0 6 6 [] := by trivial + +private theorem k6t6p0_matrix_eq : k6t6p0.matrix 6 = k6t6p0_state_0 := by + change closureMatrix (k6t6p0.initialMatrix 6) _ = _ + rw [k6t6p0_initial_eq] + change closureMatrix k6t6p0_state_0 [] = _ + rfl + +private theorem k6t6p0_part_0 : k6t6p0.chains.flatten = List.finRange _ := by decide + +private theorem k6t6p0_part_1 : k6t6p0.chains.map List.length = ([[], [], [], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k6t6p0_part_2 : k6t6p0.chains.map (fun l => l.map (fun i => decide (i ∈ k6t6p0.clique))) = ([[], [], [], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k6t6p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t6p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t6p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t6p0_templates_item_3 : (⟨0, 4, [], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t6p0_templates_item_4 : (⟨0, 5, [], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t6p0_templates_item_5 : (⟨1, 2, [], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t6p0_templates_item_6 : (⟨1, 3, [], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t6p0_templates_item_7 : (⟨1, 4, [], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t6p0_templates_item_8 : (⟨1, 5, [], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t6p0_templates_item_9 : (⟨2, 3, [], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t6p0_templates_item_10 : (⟨2, 4, [], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t6p0_templates_item_11 : (⟨2, 5, [], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t6p0_templates_item_12 : (⟨3, 4, [], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t6p0_templates_item_13 : (⟨3, 5, [], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t6p0_templates_item_14 : (⟨4, 5, [], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k6t6p0_part_3 : ∀ T ∈ k6t6p0.templates, T.Check k6t6p0.graph k6t6p0.clique 6 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k6t6p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k6t6p0_templates_item_0, k6t6p0_templates_item_1, k6t6p0_templates_item_2, k6t6p0_templates_item_3, k6t6p0_templates_item_4, k6t6p0_templates_item_5, k6t6p0_templates_item_6, k6t6p0_templates_item_7, k6t6p0_templates_item_8, k6t6p0_templates_item_9, k6t6p0_templates_item_10, k6t6p0_templates_item_11, k6t6p0_templates_item_12, k6t6p0_templates_item_13, k6t6p0_templates_item_14⟩ + +private theorem k6t6p0_part_4 : ∀ p ∈ k6t6p0.required, p.Check k6t6p0.graph 6 := by decide + +private theorem k6t6p0_part_5 : ClosureCheck k6t6p0.graph (k6t6p0.initialMatrix 6) 6 6 k6t6p0.closure := by + rw [k6t6p0_initial_eq] + exact k6t6p0_closure_0 + +private theorem k6t6p0_part_6 : k6t6p0.bad.Check k6t6p0.graph (k6t6p0.matrix 6) 6 6 := by + rw [k6t6p0_matrix_eq] + decide + +theorem k6t6p0_check : k6t6p0.Check 6 6 [[], [], [], [], [], []] := + ⟨k6t6p0_part_0, k6t6p0_part_1, k6t6p0_part_2, k6t6p0_part_3, k6t6p0_part_4, k6t6p0_part_5, k6t6p0_part_6⟩ +end CycleClique.Construction.Certificates + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK7.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK7.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc1c36a5d18d71f211d44e27242c8299a2e385e0 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK7.lean @@ -0,0 +1,8476 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LayoutCertificate +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateMatrixChunks +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FastCertificateMatrix +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FastLayoutGraph + +namespace OAI + +namespace CycleClique.Construction.Certificates + +def k7t3p0 : LayoutCertificate 3 where + chains := [[0], [1], [2]] + clique := {0, 1, 2} + templates := [⟨0, 1, [], [], [], 1, 6⟩, + ⟨0, 2, [], [], [], 1, 6⟩, + ⟨1, 2, [], [], [], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (1, 2), (2, 2)}⟩ + + +private def k7t3p0_state_0 : ForbiddenMatrix 3 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p0_initial_eq_row_0 : ∀ j : Fin 3, (k7t3p0.initialMatrix 7) 0 j = k7t3p0_state_0 0 j := by decide + +private theorem k7t3p0_initial_eq_row_1 : ∀ j : Fin 3, (k7t3p0.initialMatrix 7) 1 j = k7t3p0_state_0 1 j := by decide + +private theorem k7t3p0_initial_eq_row_2 : ∀ j : Fin 3, (k7t3p0.initialMatrix 7) 2 j = k7t3p0_state_0 2 j := by decide + +private theorem k7t3p0_initial_eq : (k7t3p0.initialMatrix 7) = k7t3p0_state_0 := by + funext i j + fin_cases i + + · exact k7t3p0_initial_eq_row_0 j + + · exact k7t3p0_initial_eq_row_1 j + + · exact k7t3p0_initial_eq_row_2 j + +private theorem k7t3p0_closure_0 : ClosureCheck k7t3p0.graph k7t3p0_state_0 7 3 [] := by trivial + +private theorem k7t3p0_matrix_eq : k7t3p0.matrix 7 = k7t3p0_state_0 := by + change closureMatrix (k7t3p0.initialMatrix 7) _ = _ + rw [k7t3p0_initial_eq] + change closureMatrix k7t3p0_state_0 [] = _ + rfl + +private theorem k7t3p0_part_0 : k7t3p0.chains.flatten = List.finRange _ := by decide + +private theorem k7t3p0_part_1 : k7t3p0.chains.map List.length = ([[], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t3p0_part_2 : k7t3p0.chains.map (fun l => l.map (fun i => decide (i ∈ k7t3p0.clique))) = ([[], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k7t3p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 6⟩ : TemplateData (Fin 3)).Check k7t3p0.graph k7t3p0.clique 7 (patternAmount ([[], [], []] : List (List ℕ))) (([[], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 6⟩ : TemplateData (Fin 3)).Check k7t3p0.graph k7t3p0.clique 7 (patternAmount ([[], [], []] : List (List ℕ))) (([[], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p0_templates_item_2 : (⟨1, 2, [], [], [], 1, 6⟩ : TemplateData (Fin 3)).Check k7t3p0.graph k7t3p0.clique 7 (patternAmount ([[], [], []] : List (List ℕ))) (([[], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p0_part_3 : ∀ T ∈ k7t3p0.templates, T.Check k7t3p0.graph k7t3p0.clique 7 (patternAmount ([[], [], []] : List (List ℕ))) (([[], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k7t3p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p0_templates_item_0, k7t3p0_templates_item_1, k7t3p0_templates_item_2⟩ + +private theorem k7t3p0_part_4 : ∀ p ∈ k7t3p0.required, p.Check k7t3p0.graph 7 := by decide + +private theorem k7t3p0_part_5 : ClosureCheck k7t3p0.graph (k7t3p0.initialMatrix 7) 7 3 k7t3p0.closure := by + rw [k7t3p0_initial_eq] + exact k7t3p0_closure_0 + +private theorem k7t3p0_part_6 : k7t3p0.bad.Check k7t3p0.graph (k7t3p0.matrix 7) 7 3 := by + rw [k7t3p0_matrix_eq] + decide + +theorem k7t3p0_check : k7t3p0.Check 7 3 [[], [], []] := + ⟨k7t3p0_part_0, k7t3p0_part_1, k7t3p0_part_2, k7t3p0_part_3, k7t3p0_part_4, k7t3p0_part_5, k7t3p0_part_6⟩ +def k7t3p1 : LayoutCertificate 4 where + chains := [[0], [1, 2, 3]] + clique := {0, 1, 3} + templates := [⟨0, 1, [], [], [], 2, 6⟩, + ⟨0, 1, [], [], [2, 3], 1, 4⟩, + ⟨0, 2, [], [], [1], 1, 5⟩, + ⟨0, 3, [], [], [2, 1], 1, 4⟩, + ⟨1, 2, [], [], [3], 1, 5⟩, + ⟨2, 3, [], [1], [], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (2, 2), (1, 2)}⟩ + + +private def k7t3p1_state_0 : ForbiddenMatrix 4 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p1_initial_eq_row_0 : ∀ j : Fin 4, (k7t3p1.initialMatrix 7) 0 j = k7t3p1_state_0 0 j := by decide + +private theorem k7t3p1_initial_eq_row_1 : ∀ j : Fin 4, (k7t3p1.initialMatrix 7) 1 j = k7t3p1_state_0 1 j := by decide + +private theorem k7t3p1_initial_eq_row_2 : ∀ j : Fin 4, (k7t3p1.initialMatrix 7) 2 j = k7t3p1_state_0 2 j := by decide + +private theorem k7t3p1_initial_eq_row_3 : ∀ j : Fin 4, (k7t3p1.initialMatrix 7) 3 j = k7t3p1_state_0 3 j := by decide + +private theorem k7t3p1_initial_eq : (k7t3p1.initialMatrix 7) = k7t3p1_state_0 := by + funext i j + fin_cases i + + · exact k7t3p1_initial_eq_row_0 j + + · exact k7t3p1_initial_eq_row_1 j + + · exact k7t3p1_initial_eq_row_2 j + + · exact k7t3p1_initial_eq_row_3 j + +private theorem k7t3p1_closure_0 : ClosureCheck k7t3p1.graph k7t3p1_state_0 7 3 [] := by trivial + +private theorem k7t3p1_matrix_eq : k7t3p1.matrix 7 = k7t3p1_state_0 := by + change closureMatrix (k7t3p1.initialMatrix 7) _ = _ + rw [k7t3p1_initial_eq] + change closureMatrix k7t3p1_state_0 [] = _ + rfl + +private theorem k7t3p1_part_0 : k7t3p1.chains.flatten = List.finRange _ := by decide + +private theorem k7t3p1_part_1 : k7t3p1.chains.map List.length = ([[], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t3p1_part_2 : k7t3p1.chains.map (fun l => l.map (fun i => decide (i ∈ k7t3p1.clique))) = ([[], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t3p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 6⟩ : TemplateData (Fin 4)).Check k7t3p1.graph k7t3p1.clique 7 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p1_templates_item_1 : (⟨0, 1, [], [], [2, 3], 1, 4⟩ : TemplateData (Fin 4)).Check k7t3p1.graph k7t3p1.clique 7 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p1_templates_item_2 : (⟨0, 2, [], [], [1], 1, 5⟩ : TemplateData (Fin 4)).Check k7t3p1.graph k7t3p1.clique 7 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p1_templates_item_3 : (⟨0, 3, [], [], [2, 1], 1, 4⟩ : TemplateData (Fin 4)).Check k7t3p1.graph k7t3p1.clique 7 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p1_templates_item_4 : (⟨1, 2, [], [], [3], 1, 5⟩ : TemplateData (Fin 4)).Check k7t3p1.graph k7t3p1.clique 7 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p1_templates_item_5 : (⟨2, 3, [], [1], [], 1, 5⟩ : TemplateData (Fin 4)).Check k7t3p1.graph k7t3p1.clique 7 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p1_part_3 : ∀ T ∈ k7t3p1.templates, T.Check k7t3p1.graph k7t3p1.clique 7 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k7t3p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p1_templates_item_0, k7t3p1_templates_item_1, k7t3p1_templates_item_2, k7t3p1_templates_item_3, k7t3p1_templates_item_4, k7t3p1_templates_item_5⟩ + +private theorem k7t3p1_part_4 : ∀ p ∈ k7t3p1.required, p.Check k7t3p1.graph 7 := by decide + +private theorem k7t3p1_part_5 : ClosureCheck k7t3p1.graph (k7t3p1.initialMatrix 7) 7 3 k7t3p1.closure := by + rw [k7t3p1_initial_eq] + exact k7t3p1_closure_0 + +private theorem k7t3p1_part_6 : k7t3p1.bad.Check k7t3p1.graph (k7t3p1.matrix 7) 7 3 := by + rw [k7t3p1_matrix_eq] + decide + +theorem k7t3p1_check : k7t3p1.Check 7 3 [[], [1]] := + ⟨k7t3p1_part_0, k7t3p1_part_1, k7t3p1_part_2, k7t3p1_part_3, k7t3p1_part_4, k7t3p1_part_5, k7t3p1_part_6⟩ +def k7t3p2 : LayoutCertificate 5 where + chains := [[0], [1, 2, 3, 4]] + clique := {0, 1, 4} + templates := [⟨0, 1, [], [], [2, 3, 4], 1, 3⟩, + ⟨0, 2, [], [], [1], 2, 5⟩, + ⟨0, 2, [], [], [3, 4], 1, 4⟩, + ⟨0, 3, [], [], [2, 1], 1, 4⟩, + ⟨0, 4, [], [], [3, 2, 1], 1, 3⟩, + ⟨1, 2, [], [], [3, 4], 1, 4⟩, + ⟨2, 3, [], [1], [4], 1, 4⟩, + ⟨3, 4, [], [1, 2], [], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (2, 2), (3, 2)}⟩ + + +private def k7t3p2_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, {1, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[{1, 2, 3}, ∅, Finset.Icc 1 4, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p2_initial_eq_row_0 : ∀ j : Fin 5, (k7t3p2.initialMatrix 7) 0 j = k7t3p2_state_0 0 j := by decide + +private theorem k7t3p2_initial_eq_row_1 : ∀ j : Fin 5, (k7t3p2.initialMatrix 7) 1 j = k7t3p2_state_0 1 j := by decide + +private theorem k7t3p2_initial_eq_row_2 : ∀ j : Fin 5, (k7t3p2.initialMatrix 7) 2 j = k7t3p2_state_0 2 j := by decide + +private theorem k7t3p2_initial_eq_row_3 : ∀ j : Fin 5, (k7t3p2.initialMatrix 7) 3 j = k7t3p2_state_0 3 j := by decide + +private theorem k7t3p2_initial_eq_row_4 : ∀ j : Fin 5, (k7t3p2.initialMatrix 7) 4 j = k7t3p2_state_0 4 j := by decide + +private theorem k7t3p2_initial_eq : (k7t3p2.initialMatrix 7) = k7t3p2_state_0 := by + funext i j + fin_cases i + + · exact k7t3p2_initial_eq_row_0 j + + · exact k7t3p2_initial_eq_row_1 j + + · exact k7t3p2_initial_eq_row_2 j + + · exact k7t3p2_initial_eq_row_3 j + + · exact k7t3p2_initial_eq_row_4 j + +private theorem k7t3p2_closure_0 : ClosureCheck k7t3p2.graph k7t3p2_state_0 7 3 [] := by trivial + +private theorem k7t3p2_matrix_eq : k7t3p2.matrix 7 = k7t3p2_state_0 := by + change closureMatrix (k7t3p2.initialMatrix 7) _ = _ + rw [k7t3p2_initial_eq] + change closureMatrix k7t3p2_state_0 [] = _ + rfl + +private theorem k7t3p2_part_0 : k7t3p2.chains.flatten = List.finRange _ := by decide + +private theorem k7t3p2_part_1 : k7t3p2.chains.map List.length = ([[], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t3p2_part_2 : k7t3p2.chains.map (fun l => l.map (fun i => decide (i ∈ k7t3p2.clique))) = ([[], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t3p2_templates_item_0 : (⟨0, 1, [], [], [2, 3, 4], 1, 3⟩ : TemplateData (Fin 5)).Check k7t3p2.graph k7t3p2.clique 7 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p2_templates_item_1 : (⟨0, 2, [], [], [1], 2, 5⟩ : TemplateData (Fin 5)).Check k7t3p2.graph k7t3p2.clique 7 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p2_templates_item_2 : (⟨0, 2, [], [], [3, 4], 1, 4⟩ : TemplateData (Fin 5)).Check k7t3p2.graph k7t3p2.clique 7 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p2_templates_item_3 : (⟨0, 3, [], [], [2, 1], 1, 4⟩ : TemplateData (Fin 5)).Check k7t3p2.graph k7t3p2.clique 7 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p2_templates_item_4 : (⟨0, 4, [], [], [3, 2, 1], 1, 3⟩ : TemplateData (Fin 5)).Check k7t3p2.graph k7t3p2.clique 7 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p2_templates_item_5 : (⟨1, 2, [], [], [3, 4], 1, 4⟩ : TemplateData (Fin 5)).Check k7t3p2.graph k7t3p2.clique 7 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p2_templates_item_6 : (⟨2, 3, [], [1], [4], 1, 4⟩ : TemplateData (Fin 5)).Check k7t3p2.graph k7t3p2.clique 7 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p2_templates_item_7 : (⟨3, 4, [], [1, 2], [], 1, 4⟩ : TemplateData (Fin 5)).Check k7t3p2.graph k7t3p2.clique 7 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p2_part_3 : ∀ T ∈ k7t3p2.templates, T.Check k7t3p2.graph k7t3p2.clique 7 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k7t3p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p2_templates_item_0, k7t3p2_templates_item_1, k7t3p2_templates_item_2, k7t3p2_templates_item_3, k7t3p2_templates_item_4, k7t3p2_templates_item_5, k7t3p2_templates_item_6, k7t3p2_templates_item_7⟩ + +private theorem k7t3p2_part_4 : ∀ p ∈ k7t3p2.required, p.Check k7t3p2.graph 7 := by decide + +private theorem k7t3p2_part_5 : ClosureCheck k7t3p2.graph (k7t3p2.initialMatrix 7) 7 3 k7t3p2.closure := by + rw [k7t3p2_initial_eq] + exact k7t3p2_closure_0 + +private theorem k7t3p2_part_6 : k7t3p2.bad.Check k7t3p2.graph (k7t3p2.matrix 7) 7 3 := by + rw [k7t3p2_matrix_eq] + decide + +theorem k7t3p2_check : k7t3p2.Check 7 3 [[], [2]] := + ⟨k7t3p2_part_0, k7t3p2_part_1, k7t3p2_part_2, k7t3p2_part_3, k7t3p2_part_4, k7t3p2_part_5, k7t3p2_part_6⟩ +private def k7t3p3_step_0_data : FreshAttachmentData 6 := ⟨3, 0, [⟨1, 2, [0, 4, 3]⟩, ⟨3, 0, [2, 1, 6, 5, 4]⟩, ⟨3, 6, [2, 1, 0, 4, 5]⟩, ⟨3, 5, [2, 6, 1, 0, 4]⟩, ⟨5, 0, [4, 3, 2, 6, 1]⟩, ⟨5, 2, [4, 0, 1, 6]⟩, ⟨5, 3, [4, 0, 1, 6, 2]⟩, ⟨5, 2, [6, 1, 0, 4, 3]⟩], ⟨none, {(1, 3), (3, 2), (5, 2), (2, 1)}⟩⟩ + +private def k7t3p3_step_0 : ClosureStep 6 := .fresh k7t3p3_step_0_data + +private def k7t3p3_step_1_data : FreshAttachmentData 6 := ⟨3, 1, [⟨1, 0, [2, 3, 4]⟩, ⟨1, 0, [2, 6, 5, 4]⟩, ⟨1, 0, [6, 5, 4, 3, 2]⟩, ⟨3, 0, [2, 1, 6, 5, 4]⟩, ⟨3, 0, [2, 6, 5, 4]⟩, ⟨3, 5, [4, 0, 2, 1, 6]⟩, ⟨5, 0, [6, 1, 2, 3, 4]⟩, ⟨5, 3, [6, 1, 2, 0, 4]⟩, ⟨5, 0, [6, 2, 3, 4]⟩], ⟨none, {(5, 2), (3, 2), (1, 3), (0, 0)}⟩⟩ + +private def k7t3p3_step_1 : ClosureStep 6 := .fresh k7t3p3_step_1_data + +private def k7t3p3_step_2_data : FreshAttachmentData 6 := ⟨4, 1, [⟨1, 0, [2, 3, 4, 5]⟩, ⟨1, 0, [2, 6, 5]⟩, ⟨1, 0, [2]⟩, ⟨1, 0, [6, 2, 3, 4, 5]⟩, ⟨1, 0, [6, 2]⟩, ⟨1, 4, [6, 5, 0, 2, 3]⟩, ⟨3, 0, [2, 1, 6, 5]⟩, ⟨3, 0, [2, 6, 5]⟩, ⟨3, 0, [4, 5, 6, 1, 2]⟩, ⟨3, 0, [4, 5]⟩, ⟨3, 6, [4, 5, 0, 2, 1]⟩, ⟨0, 4, [2, 1, 6, 5]⟩, ⟨0, 3, [2, 1, 6, 5, 4]⟩, ⟨0, 1, [2, 3, 4, 5, 6]⟩, ⟨0, 6, [5, 4, 3, 2, 1]⟩, ⟨0, 4, [5, 6, 1, 2, 3]⟩], ⟨none, {(1, 3), (3, 2), (0, 2), (4, 0)}⟩⟩ + +private def k7t3p3_step_2 : ClosureStep 6 := .fresh k7t3p3_step_2_data + +private def k7t3p3_step_3_data : FreshAttachmentData 6 := ⟨5, 2, [⟨1, 0, [2, 3, 4, 5, 6]⟩, ⟨1, 0, [2, 3]⟩, ⟨1, 4, [2, 3, 0, 6, 5]⟩, ⟨1, 0, [6, 2, 3]⟩, ⟨1, 0, [6, 5, 4, 3]⟩, ⟨1, 0, [6]⟩, ⟨5, 0, [4, 3, 2, 1, 6]⟩, ⟨5, 0, [4, 3, 2, 6]⟩, ⟨5, 0, [4, 3]⟩, ⟨5, 2, [4, 3, 0, 6, 1]⟩, ⟨5, 0, [6, 2, 3]⟩, ⟨0, 4, [3, 2, 1, 6, 5]⟩, ⟨0, 4, [3, 2, 6, 5]⟩, ⟨0, 2, [3, 4, 5, 6, 1]⟩, ⟨0, 1, [3, 4, 5, 6, 2]⟩, ⟨0, 5, [6, 1, 2, 3, 4]⟩], ⟨none, {(1, 3), (5, 2), (0, 2), (4, 0)}⟩⟩ + +private def k7t3p3_step_3 : ClosureStep 6 := .fresh k7t3p3_step_3_data + +private def k7t3p3_step_4_data : FreshAttachmentData 6 := ⟨5, 3, [⟨1, 0, [2, 3, 4, 5, 6]⟩, ⟨1, 0, [2, 3, 4]⟩, ⟨1, 0, [2, 6, 5, 4]⟩, ⟨3, 0, [2, 1, 6, 5, 4]⟩, ⟨3, 5, [2, 1, 6, 0, 4]⟩, ⟨3, 0, [2, 6, 5, 4]⟩, ⟨5, 0, [4, 3, 2, 1, 6]⟩, ⟨5, 0, [4, 3, 2, 6]⟩, ⟨5, 3, [4, 0, 6, 1, 2]⟩], ⟨none, {(3, 2), (5, 2), (1, 3), (0, 0)}⟩⟩ + +private def k7t3p3_step_4 : ClosureStep 6 := .fresh k7t3p3_step_4_data + +private def k7t3p3_step_5_data : EdgeAttachmentData 6 := ⟨2, 0, [⟨0, 3, [2]⟩, ⟨0, 5, [2, 3, 4]⟩], ⟨none, {(0, 3), (3, 2), (5, 3)}⟩⟩ + +private def k7t3p3_step_5 : ClosureStep 6 := .edge k7t3p3_step_5_data + +private def k7t3p3_step_6_data : EdgeAttachmentData 6 := ⟨3, 0, [⟨0, 1, [3, 4, 5]⟩, ⟨1, 4, [2, 3, 0, 5]⟩], ⟨none, {(0, 3), (1, 3), (4, 2)}⟩⟩ + +private def k7t3p3_step_6 : ClosureStep 6 := .edge k7t3p3_step_6_data + +private def k7t3p3_step_7_data : EdgeAttachmentData 6 := ⟨3, 1, [⟨0, 3, [1]⟩, ⟨0, 1, [5, 4, 3]⟩], ⟨none, {(0, 3), (3, 2), (1, 3)}⟩⟩ + +private def k7t3p3_step_7 : ClosureStep 6 := .edge k7t3p3_step_7_data + +private def k7t3p3_step_8_data : EdgeAttachmentData 6 := ⟨4, 0, [⟨0, 3, [4]⟩, ⟨0, 1, [4, 3, 2]⟩], ⟨none, {(0, 3), (3, 2), (1, 3)}⟩⟩ + +private def k7t3p3_step_8 : ClosureStep 6 := .edge k7t3p3_step_8_data + +private def k7t3p3_step_9_data : EdgeAttachmentData 6 := ⟨4, 2, [⟨0, 1, [5, 4, 2]⟩, ⟨1, 2, [5, 4]⟩], ⟨none, {(0, 3), (1, 3), (3, 0), (2, 1)}⟩⟩ + +private def k7t3p3_step_9 : ClosureStep 6 := .edge k7t3p3_step_9_data + +private def k7t3p3_step_10_data : EdgeAttachmentData 6 := ⟨5, 3, [⟨0, 5, [1, 2, 3]⟩, ⟨0, 3, [5]⟩], ⟨none, {(0, 3), (3, 2), (5, 3)}⟩⟩ + +private def k7t3p3_step_10 : ClosureStep 6 := .edge k7t3p3_step_10_data + +def k7t3p3 : LayoutCertificate 6 where + chains := [[0], [1, 2, 3, 4, 5]] + clique := {0, 1, 5} + templates := [⟨0, 1, [], [], [], 4, 6⟩, + ⟨0, 1, [], [], [2, 3, 4, 5], 1, 2⟩, + ⟨0, 2, [], [], [1], 3, 5⟩, + ⟨0, 2, [], [], [3, 4, 5], 1, 3⟩, + ⟨0, 3, [], [], [2, 1], 2, 4⟩, + ⟨0, 4, [], [], [3, 2, 1], 1, 3⟩, + ⟨0, 4, [], [], [5], 3, 5⟩, + ⟨0, 5, [], [], [], 4, 6⟩, + ⟨0, 5, [], [], [4, 3, 2, 1], 1, 2⟩, + ⟨1, 2, [], [], [3, 4, 5], 1, 3⟩, + ⟨1, 3, [], [], [4, 5], 2, 4⟩, + ⟨1, 4, [], [], [5], 3, 5⟩, + ⟨2, 3, [], [1], [4, 5], 1, 3⟩, + ⟨2, 4, [], [1], [5], 2, 4⟩, + ⟨3, 4, [], [1, 2], [5], 1, 3⟩, + ⟨3, 5, [], [1, 2], [], 2, 4⟩, + ⟨4, 5, [], [1, 2, 3], [], 1, 3⟩] + required := [⟨1, 3, [2]⟩, + ⟨3, 5, [4]⟩] + closure := [k7t3p3_step_0, k7t3p3_step_1, k7t3p3_step_2, k7t3p3_step_3, k7t3p3_step_4, k7t3p3_step_5, k7t3p3_step_6, k7t3p3_step_7, k7t3p3_step_8, k7t3p3_step_9, k7t3p3_step_10] + bad := ⟨none, {(3, 2), (0, 2), (2, 1)}⟩ + + +private def k7t3p3_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, {2, 3, 4}, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 2 5, {3, 4, 5}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[{2, 3, 4}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5], + #[Finset.Icc 1 5, {3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p3_initial_eq_row_0 : ∀ j : Fin 6, (k7t3p3.initialMatrix 7) 0 j = k7t3p3_state_0 0 j := by decide + +private theorem k7t3p3_initial_eq_row_1 : ∀ j : Fin 6, (k7t3p3.initialMatrix 7) 1 j = k7t3p3_state_0 1 j := by decide + +private theorem k7t3p3_initial_eq_row_2 : ∀ j : Fin 6, (k7t3p3.initialMatrix 7) 2 j = k7t3p3_state_0 2 j := by decide + +private theorem k7t3p3_initial_eq_row_3 : ∀ j : Fin 6, (k7t3p3.initialMatrix 7) 3 j = k7t3p3_state_0 3 j := by decide + +private theorem k7t3p3_initial_eq_row_4 : ∀ j : Fin 6, (k7t3p3.initialMatrix 7) 4 j = k7t3p3_state_0 4 j := by decide + +private theorem k7t3p3_initial_eq_row_5 : ∀ j : Fin 6, (k7t3p3.initialMatrix 7) 5 j = k7t3p3_state_0 5 j := by decide + +private theorem k7t3p3_initial_eq : (k7t3p3.initialMatrix 7) = k7t3p3_state_0 := by + funext i j + fin_cases i + + · exact k7t3p3_initial_eq_row_0 j + + · exact k7t3p3_initial_eq_row_1 j + + · exact k7t3p3_initial_eq_row_2 j + + · exact k7t3p3_initial_eq_row_3 j + + · exact k7t3p3_initial_eq_row_4 j + + · exact k7t3p3_initial_eq_row_5 j + +private def k7t3p3_state_1 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 2 5, {3, 4, 5}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 1 4, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5], + #[Finset.Icc 1 5, {3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p3_local_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, ∅, ∅, {1}, ∅, {1}, ∅], + #[∅, ∅, Finset.Icc 1 6, Finset.Icc 1 5, {2, 3, 4}, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[∅, Finset.Icc 1 6, ∅, {1, 2, 3}, Finset.Icc 2 5, Finset.Icc 1 5, ∅], + #[{1}, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}], + #[∅, {2, 3, 4}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5], + #[{1}, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2, 4, 5, 6}, ∅, {1}, Finset.Icc 2 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p3_local_0_eq_row_0 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_0 a b ∪ requiredMatrix 7 k7t3p3_step_0_data.required a b) 0 j = k7t3p3_local_0 0 j := by decide + +private theorem k7t3p3_local_0_eq_row_1 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_0 a b ∪ requiredMatrix 7 k7t3p3_step_0_data.required a b) 1 j = k7t3p3_local_0 1 j := by decide + +private theorem k7t3p3_local_0_eq_row_2 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_0 a b ∪ requiredMatrix 7 k7t3p3_step_0_data.required a b) 2 j = k7t3p3_local_0 2 j := by decide + +private theorem k7t3p3_local_0_eq_row_3 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_0 a b ∪ requiredMatrix 7 k7t3p3_step_0_data.required a b) 3 j = k7t3p3_local_0 3 j := by decide + +private theorem k7t3p3_local_0_eq_row_4 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_0 a b ∪ requiredMatrix 7 k7t3p3_step_0_data.required a b) 4 j = k7t3p3_local_0 4 j := by decide + +private theorem k7t3p3_local_0_eq_row_5 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_0 a b ∪ requiredMatrix 7 k7t3p3_step_0_data.required a b) 5 j = k7t3p3_local_0 5 j := by decide + +private theorem k7t3p3_local_0_eq_row_6 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_0 a b ∪ requiredMatrix 7 k7t3p3_step_0_data.required a b) 6 j = k7t3p3_local_0 6 j := by decide + +private theorem k7t3p3_local_0_eq : (fun a b => freshMatrix k7t3p3_state_0 a b ∪ requiredMatrix 7 k7t3p3_step_0_data.required a b) = k7t3p3_local_0 := by + funext i j + fin_cases i + + · exact k7t3p3_local_0_eq_row_0 j + + · exact k7t3p3_local_0_eq_row_1 j + + · exact k7t3p3_local_0_eq_row_2 j + + · exact k7t3p3_local_0_eq_row_3 j + + · exact k7t3p3_local_0_eq_row_4 j + + · exact k7t3p3_local_0_eq_row_5 j + + · exact k7t3p3_local_0_eq_row_6 j + +private theorem k7t3p3_local_0_paths : ∀ p ∈ k7t3p3_step_0_data.required, p.Check (freshGraph k7t3p3.graph k7t3p3_step_0_data.i k7t3p3_step_0_data.j) 7 := by decide + +private theorem k7t3p3_local_0_bad : k7t3p3_step_0_data.bad.Check (freshGraph k7t3p3.graph k7t3p3_step_0_data.i k7t3p3_step_0_data.j) k7t3p3_local_0 7 3 := by decide + +private theorem k7t3p3_step_0_check : k7t3p3_step_0.Check k7t3p3.graph k7t3p3_state_0 7 3 := by + change k7t3p3_step_0_data.Check k7t3p3.graph k7t3p3_state_0 7 3 + refine ⟨by decide, k7t3p3_local_0_paths, ?_⟩ + rw [k7t3p3_local_0_eq] + exact k7t3p3_local_0_bad + +private theorem k7t3p3_update_0 : k7t3p3_step_0.apply k7t3p3_state_0 = k7t3p3_state_1 := by + have h : ∀ i j : Fin 6, k7t3p3_step_0.apply k7t3p3_state_0 i j = k7t3p3_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p3_state_2 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 1 5, {3, 4, 5}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5], + #[Finset.Icc 1 5, {3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p3_local_1 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 3}, ∅, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2, 3}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[∅, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 2 5, {3, 4, 5}, ∅], + #[{1, 2}, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4, ∅], + #[∅, Finset.Icc 1 4, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5], + #[{1, 2}, Finset.Icc 1 5, {3, 4, 5}, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2, 4, 5, 6}, ∅, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p3_local_1_eq_row_0 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_1 a b ∪ requiredMatrix 7 k7t3p3_step_1_data.required a b) 0 j = k7t3p3_local_1 0 j := by decide + +private theorem k7t3p3_local_1_eq_row_1 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_1 a b ∪ requiredMatrix 7 k7t3p3_step_1_data.required a b) 1 j = k7t3p3_local_1 1 j := by decide + +private theorem k7t3p3_local_1_eq_row_2 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_1 a b ∪ requiredMatrix 7 k7t3p3_step_1_data.required a b) 2 j = k7t3p3_local_1 2 j := by decide + +private theorem k7t3p3_local_1_eq_row_3 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_1 a b ∪ requiredMatrix 7 k7t3p3_step_1_data.required a b) 3 j = k7t3p3_local_1 3 j := by decide + +private theorem k7t3p3_local_1_eq_row_4 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_1 a b ∪ requiredMatrix 7 k7t3p3_step_1_data.required a b) 4 j = k7t3p3_local_1 4 j := by decide + +private theorem k7t3p3_local_1_eq_row_5 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_1 a b ∪ requiredMatrix 7 k7t3p3_step_1_data.required a b) 5 j = k7t3p3_local_1 5 j := by decide + +private theorem k7t3p3_local_1_eq_row_6 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_1 a b ∪ requiredMatrix 7 k7t3p3_step_1_data.required a b) 6 j = k7t3p3_local_1 6 j := by decide + +private theorem k7t3p3_local_1_eq : (fun a b => freshMatrix k7t3p3_state_1 a b ∪ requiredMatrix 7 k7t3p3_step_1_data.required a b) = k7t3p3_local_1 := by + funext i j + fin_cases i + + · exact k7t3p3_local_1_eq_row_0 j + + · exact k7t3p3_local_1_eq_row_1 j + + · exact k7t3p3_local_1_eq_row_2 j + + · exact k7t3p3_local_1_eq_row_3 j + + · exact k7t3p3_local_1_eq_row_4 j + + · exact k7t3p3_local_1_eq_row_5 j + + · exact k7t3p3_local_1_eq_row_6 j + +private theorem k7t3p3_local_1_paths : ∀ p ∈ k7t3p3_step_1_data.required, p.Check (freshGraph k7t3p3.graph k7t3p3_step_1_data.i k7t3p3_step_1_data.j) 7 := by decide + +private theorem k7t3p3_local_1_bad : k7t3p3_step_1_data.bad.Check (freshGraph k7t3p3.graph k7t3p3_step_1_data.i k7t3p3_step_1_data.j) k7t3p3_local_1 7 3 := by decide + +private theorem k7t3p3_step_1_check : k7t3p3_step_1.Check k7t3p3.graph k7t3p3_state_1 7 3 := by + change k7t3p3_step_1_data.Check k7t3p3.graph k7t3p3_state_1 7 3 + refine ⟨by decide, k7t3p3_local_1_paths, ?_⟩ + rw [k7t3p3_local_1_eq] + exact k7t3p3_local_1_bad + +private theorem k7t3p3_update_1 : k7t3p3_step_1.apply k7t3p3_state_1 = k7t3p3_state_2 := by + have h : ∀ i j : Fin 6, k7t3p3_step_1.apply k7t3p3_state_1 i j = k7t3p3_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p3_state_3 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 1 5, {1, 3, 4, 5}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5], + #[Finset.Icc 1 5, {1, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p3_local_2 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 4, {1, 2}, ∅, {1}], + #[Finset.Icc 1 5, ∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[∅, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 1 5, {3, 4, 5}, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1}], + #[{1, 2}, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5], + #[∅, Finset.Icc 1 5, {3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1}, {1, 2, 4, 5, 6}, ∅, {1}, Finset.Icc 2 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p3_local_2_eq_row_0 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_2 a b ∪ requiredMatrix 7 k7t3p3_step_2_data.required a b) 0 j = k7t3p3_local_2 0 j := by decide + +private theorem k7t3p3_local_2_eq_row_1 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_2 a b ∪ requiredMatrix 7 k7t3p3_step_2_data.required a b) 1 j = k7t3p3_local_2 1 j := by decide + +private theorem k7t3p3_local_2_eq_row_2 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_2 a b ∪ requiredMatrix 7 k7t3p3_step_2_data.required a b) 2 j = k7t3p3_local_2 2 j := by decide + +private theorem k7t3p3_local_2_eq_row_3 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_2 a b ∪ requiredMatrix 7 k7t3p3_step_2_data.required a b) 3 j = k7t3p3_local_2 3 j := by decide + +private theorem k7t3p3_local_2_eq_row_4 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_2 a b ∪ requiredMatrix 7 k7t3p3_step_2_data.required a b) 4 j = k7t3p3_local_2 4 j := by decide + +private theorem k7t3p3_local_2_eq_row_5 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_2 a b ∪ requiredMatrix 7 k7t3p3_step_2_data.required a b) 5 j = k7t3p3_local_2 5 j := by decide + +private theorem k7t3p3_local_2_eq_row_6 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_2 a b ∪ requiredMatrix 7 k7t3p3_step_2_data.required a b) 6 j = k7t3p3_local_2 6 j := by decide + +private theorem k7t3p3_local_2_eq : (fun a b => freshMatrix k7t3p3_state_2 a b ∪ requiredMatrix 7 k7t3p3_step_2_data.required a b) = k7t3p3_local_2 := by + funext i j + fin_cases i + + · exact k7t3p3_local_2_eq_row_0 j + + · exact k7t3p3_local_2_eq_row_1 j + + · exact k7t3p3_local_2_eq_row_2 j + + · exact k7t3p3_local_2_eq_row_3 j + + · exact k7t3p3_local_2_eq_row_4 j + + · exact k7t3p3_local_2_eq_row_5 j + + · exact k7t3p3_local_2_eq_row_6 j + +private theorem k7t3p3_local_2_paths : ∀ p ∈ k7t3p3_step_2_data.required, p.Check (freshGraph k7t3p3.graph k7t3p3_step_2_data.i k7t3p3_step_2_data.j) 7 := by decide + +private theorem k7t3p3_local_2_bad : k7t3p3_step_2_data.bad.Check (freshGraph k7t3p3.graph k7t3p3_step_2_data.i k7t3p3_step_2_data.j) k7t3p3_local_2 7 3 := by decide + +private theorem k7t3p3_step_2_check : k7t3p3_step_2.Check k7t3p3.graph k7t3p3_state_2 7 3 := by + change k7t3p3_step_2_data.Check k7t3p3.graph k7t3p3_state_2 7 3 + refine ⟨by decide, k7t3p3_local_2_paths, ?_⟩ + rw [k7t3p3_local_2_eq] + exact k7t3p3_local_2_bad + +private theorem k7t3p3_update_2 : k7t3p3_step_2.apply k7t3p3_state_2 = k7t3p3_state_3 := by + have h : ∀ i j : Fin 6, k7t3p3_step_2.apply k7t3p3_state_2 i j = k7t3p3_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p3_state_4 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 1 5, {1, 3, 4, 5}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1}], + #[Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5], + #[Finset.Icc 1 5, {1, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, {1}, Finset.Icc 2 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p3_local_3 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 5, {1}, ∅, {1, 2}, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 5, ∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 1 5, {1, 3, 4, 5}, ∅], + #[∅, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[{1, 2}, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5], + #[Finset.Icc 1 4, Finset.Icc 1 5, {1, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2, 4, 5, 6}, ∅, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p3_local_3_eq_row_0 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_3 a b ∪ requiredMatrix 7 k7t3p3_step_3_data.required a b) 0 j = k7t3p3_local_3 0 j := by decide + +private theorem k7t3p3_local_3_eq_row_1 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_3 a b ∪ requiredMatrix 7 k7t3p3_step_3_data.required a b) 1 j = k7t3p3_local_3 1 j := by decide + +private theorem k7t3p3_local_3_eq_row_2 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_3 a b ∪ requiredMatrix 7 k7t3p3_step_3_data.required a b) 2 j = k7t3p3_local_3 2 j := by decide + +private theorem k7t3p3_local_3_eq_row_3 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_3 a b ∪ requiredMatrix 7 k7t3p3_step_3_data.required a b) 3 j = k7t3p3_local_3 3 j := by decide + +private theorem k7t3p3_local_3_eq_row_4 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_3 a b ∪ requiredMatrix 7 k7t3p3_step_3_data.required a b) 4 j = k7t3p3_local_3 4 j := by decide + +private theorem k7t3p3_local_3_eq_row_5 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_3 a b ∪ requiredMatrix 7 k7t3p3_step_3_data.required a b) 5 j = k7t3p3_local_3 5 j := by decide + +private theorem k7t3p3_local_3_eq_row_6 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_3 a b ∪ requiredMatrix 7 k7t3p3_step_3_data.required a b) 6 j = k7t3p3_local_3 6 j := by decide + +private theorem k7t3p3_local_3_eq : (fun a b => freshMatrix k7t3p3_state_3 a b ∪ requiredMatrix 7 k7t3p3_step_3_data.required a b) = k7t3p3_local_3 := by + funext i j + fin_cases i + + · exact k7t3p3_local_3_eq_row_0 j + + · exact k7t3p3_local_3_eq_row_1 j + + · exact k7t3p3_local_3_eq_row_2 j + + · exact k7t3p3_local_3_eq_row_3 j + + · exact k7t3p3_local_3_eq_row_4 j + + · exact k7t3p3_local_3_eq_row_5 j + + · exact k7t3p3_local_3_eq_row_6 j + +private theorem k7t3p3_local_3_paths : ∀ p ∈ k7t3p3_step_3_data.required, p.Check (freshGraph k7t3p3.graph k7t3p3_step_3_data.i k7t3p3_step_3_data.j) 7 := by decide + +private theorem k7t3p3_local_3_bad : k7t3p3_step_3_data.bad.Check (freshGraph k7t3p3.graph k7t3p3_step_3_data.i k7t3p3_step_3_data.j) k7t3p3_local_3 7 3 := by decide + +private theorem k7t3p3_step_3_check : k7t3p3_step_3.Check k7t3p3.graph k7t3p3_state_3 7 3 := by + change k7t3p3_step_3_data.Check k7t3p3.graph k7t3p3_state_3 7 3 + refine ⟨by decide, k7t3p3_local_3_paths, ?_⟩ + rw [k7t3p3_local_3_eq] + exact k7t3p3_local_3_bad + +private theorem k7t3p3_update_3 : k7t3p3_step_3.apply k7t3p3_state_3 = k7t3p3_state_4 := by + have h : ∀ i j : Fin 6, k7t3p3_step_3.apply k7t3p3_state_3 i j = k7t3p3_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p3_state_5 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 1 5, {1, 3, 4, 5}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1}], + #[Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5], + #[Finset.Icc 1 5, {1, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, {1}, Finset.Icc 1 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p3_local_4 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 3}, ∅, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2, 3}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[∅, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 1 5, {1, 3, 4, 5}, ∅], + #[{1, 2}, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}], + #[∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5], + #[{1, 2}, Finset.Icc 1 5, {1, 3, 4, 5}, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2, 4, 5, 6}, ∅, {1}, Finset.Icc 2 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p3_local_4_eq_row_0 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_4 a b ∪ requiredMatrix 7 k7t3p3_step_4_data.required a b) 0 j = k7t3p3_local_4 0 j := by decide + +private theorem k7t3p3_local_4_eq_row_1 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_4 a b ∪ requiredMatrix 7 k7t3p3_step_4_data.required a b) 1 j = k7t3p3_local_4 1 j := by decide + +private theorem k7t3p3_local_4_eq_row_2 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_4 a b ∪ requiredMatrix 7 k7t3p3_step_4_data.required a b) 2 j = k7t3p3_local_4 2 j := by decide + +private theorem k7t3p3_local_4_eq_row_3 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_4 a b ∪ requiredMatrix 7 k7t3p3_step_4_data.required a b) 3 j = k7t3p3_local_4 3 j := by decide + +private theorem k7t3p3_local_4_eq_row_4 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_4 a b ∪ requiredMatrix 7 k7t3p3_step_4_data.required a b) 4 j = k7t3p3_local_4 4 j := by decide + +private theorem k7t3p3_local_4_eq_row_5 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_4 a b ∪ requiredMatrix 7 k7t3p3_step_4_data.required a b) 5 j = k7t3p3_local_4 5 j := by decide + +private theorem k7t3p3_local_4_eq_row_6 : ∀ j : Fin 7, (fun a b => freshMatrix k7t3p3_state_4 a b ∪ requiredMatrix 7 k7t3p3_step_4_data.required a b) 6 j = k7t3p3_local_4 6 j := by decide + +private theorem k7t3p3_local_4_eq : (fun a b => freshMatrix k7t3p3_state_4 a b ∪ requiredMatrix 7 k7t3p3_step_4_data.required a b) = k7t3p3_local_4 := by + funext i j + fin_cases i + + · exact k7t3p3_local_4_eq_row_0 j + + · exact k7t3p3_local_4_eq_row_1 j + + · exact k7t3p3_local_4_eq_row_2 j + + · exact k7t3p3_local_4_eq_row_3 j + + · exact k7t3p3_local_4_eq_row_4 j + + · exact k7t3p3_local_4_eq_row_5 j + + · exact k7t3p3_local_4_eq_row_6 j + +private theorem k7t3p3_local_4_paths : ∀ p ∈ k7t3p3_step_4_data.required, p.Check (freshGraph k7t3p3.graph k7t3p3_step_4_data.i k7t3p3_step_4_data.j) 7 := by decide + +private theorem k7t3p3_local_4_bad : k7t3p3_step_4_data.bad.Check (freshGraph k7t3p3.graph k7t3p3_step_4_data.i k7t3p3_step_4_data.j) k7t3p3_local_4 7 3 := by decide + +private theorem k7t3p3_step_4_check : k7t3p3_step_4.Check k7t3p3.graph k7t3p3_state_4 7 3 := by + change k7t3p3_step_4_data.Check k7t3p3.graph k7t3p3_state_4 7 3 + refine ⟨by decide, k7t3p3_local_4_paths, ?_⟩ + rw [k7t3p3_local_4_eq] + exact k7t3p3_local_4_bad + +private theorem k7t3p3_update_4 : k7t3p3_step_4.apply k7t3p3_state_4 = k7t3p3_state_5 := by + have h : ∀ i j : Fin 6, k7t3p3_step_4.apply k7t3p3_state_4 i j = k7t3p3_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p3_state_6 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 1 5, {1, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1}], + #[Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5], + #[Finset.Icc 1 5, {1, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, {1}, Finset.Icc 1 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p3_local_5 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 6], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 1 5, {1, 3, 4, 5}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1}], + #[Finset.Icc 1 5, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5], + #[Finset.Icc 1 5, {1, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 6, ∅, {1}, Finset.Icc 1 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p3_local_5_eq_row_0 : ∀ j : Fin 6, (fun a b => k7t3p3_state_5 a b ∪ requiredMatrix 7 k7t3p3_step_5_data.required a b) 0 j = k7t3p3_local_5 0 j := by decide + +private theorem k7t3p3_local_5_eq_row_1 : ∀ j : Fin 6, (fun a b => k7t3p3_state_5 a b ∪ requiredMatrix 7 k7t3p3_step_5_data.required a b) 1 j = k7t3p3_local_5 1 j := by decide + +private theorem k7t3p3_local_5_eq_row_2 : ∀ j : Fin 6, (fun a b => k7t3p3_state_5 a b ∪ requiredMatrix 7 k7t3p3_step_5_data.required a b) 2 j = k7t3p3_local_5 2 j := by decide + +private theorem k7t3p3_local_5_eq_row_3 : ∀ j : Fin 6, (fun a b => k7t3p3_state_5 a b ∪ requiredMatrix 7 k7t3p3_step_5_data.required a b) 3 j = k7t3p3_local_5 3 j := by decide + +private theorem k7t3p3_local_5_eq_row_4 : ∀ j : Fin 6, (fun a b => k7t3p3_state_5 a b ∪ requiredMatrix 7 k7t3p3_step_5_data.required a b) 4 j = k7t3p3_local_5 4 j := by decide + +private theorem k7t3p3_local_5_eq_row_5 : ∀ j : Fin 6, (fun a b => k7t3p3_state_5 a b ∪ requiredMatrix 7 k7t3p3_step_5_data.required a b) 5 j = k7t3p3_local_5 5 j := by decide + +private theorem k7t3p3_local_5_eq : (fun a b => k7t3p3_state_5 a b ∪ requiredMatrix 7 k7t3p3_step_5_data.required a b) = k7t3p3_local_5 := by + funext i j + fin_cases i + + · exact k7t3p3_local_5_eq_row_0 j + + · exact k7t3p3_local_5_eq_row_1 j + + · exact k7t3p3_local_5_eq_row_2 j + + · exact k7t3p3_local_5_eq_row_3 j + + · exact k7t3p3_local_5_eq_row_4 j + + · exact k7t3p3_local_5_eq_row_5 j + +private theorem k7t3p3_local_5_paths : ∀ p ∈ k7t3p3_step_5_data.required, p.Check (addedEdgeGraph k7t3p3.graph k7t3p3_step_5_data.i k7t3p3_step_5_data.j) 7 := by decide + +private theorem k7t3p3_local_5_bad : k7t3p3_step_5_data.bad.Check (addedEdgeGraph k7t3p3.graph k7t3p3_step_5_data.i k7t3p3_step_5_data.j) k7t3p3_local_5 7 3 := by decide + +private theorem k7t3p3_step_5_check : k7t3p3_step_5.Check k7t3p3.graph k7t3p3_state_5 7 3 := by + change k7t3p3_step_5_data.Check k7t3p3.graph k7t3p3_state_5 7 3 + refine ⟨k7t3p3_local_5_paths, ?_⟩ + rw [k7t3p3_local_5_eq] + exact k7t3p3_local_5_bad + +private theorem k7t3p3_update_5 : k7t3p3_step_5.apply k7t3p3_state_5 = k7t3p3_state_6 := by + have h : ∀ i j : Fin 6, k7t3p3_step_5.apply k7t3p3_state_5 i j = k7t3p3_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p3_state_7 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 1 5, {1, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1}], + #[Finset.Icc 0 4, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5], + #[Finset.Icc 1 5, {1, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, {1}, Finset.Icc 1 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p3_local_6 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[Finset.Icc 1 6, ∅, {1, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1}], + #[Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, {1}, Finset.Icc 1 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p3_local_6_eq_row_0 : ∀ j : Fin 6, (fun a b => k7t3p3_state_6 a b ∪ requiredMatrix 7 k7t3p3_step_6_data.required a b) 0 j = k7t3p3_local_6 0 j := by decide + +private theorem k7t3p3_local_6_eq_row_1 : ∀ j : Fin 6, (fun a b => k7t3p3_state_6 a b ∪ requiredMatrix 7 k7t3p3_step_6_data.required a b) 1 j = k7t3p3_local_6 1 j := by decide + +private theorem k7t3p3_local_6_eq_row_2 : ∀ j : Fin 6, (fun a b => k7t3p3_state_6 a b ∪ requiredMatrix 7 k7t3p3_step_6_data.required a b) 2 j = k7t3p3_local_6 2 j := by decide + +private theorem k7t3p3_local_6_eq_row_3 : ∀ j : Fin 6, (fun a b => k7t3p3_state_6 a b ∪ requiredMatrix 7 k7t3p3_step_6_data.required a b) 3 j = k7t3p3_local_6 3 j := by decide + +private theorem k7t3p3_local_6_eq_row_4 : ∀ j : Fin 6, (fun a b => k7t3p3_state_6 a b ∪ requiredMatrix 7 k7t3p3_step_6_data.required a b) 4 j = k7t3p3_local_6 4 j := by decide + +private theorem k7t3p3_local_6_eq_row_5 : ∀ j : Fin 6, (fun a b => k7t3p3_state_6 a b ∪ requiredMatrix 7 k7t3p3_step_6_data.required a b) 5 j = k7t3p3_local_6 5 j := by decide + +private theorem k7t3p3_local_6_eq : (fun a b => k7t3p3_state_6 a b ∪ requiredMatrix 7 k7t3p3_step_6_data.required a b) = k7t3p3_local_6 := by + funext i j + fin_cases i + + · exact k7t3p3_local_6_eq_row_0 j + + · exact k7t3p3_local_6_eq_row_1 j + + · exact k7t3p3_local_6_eq_row_2 j + + · exact k7t3p3_local_6_eq_row_3 j + + · exact k7t3p3_local_6_eq_row_4 j + + · exact k7t3p3_local_6_eq_row_5 j + +private theorem k7t3p3_local_6_paths : ∀ p ∈ k7t3p3_step_6_data.required, p.Check (addedEdgeGraph k7t3p3.graph k7t3p3_step_6_data.i k7t3p3_step_6_data.j) 7 := by decide + +private theorem k7t3p3_local_6_bad : k7t3p3_step_6_data.bad.Check (addedEdgeGraph k7t3p3.graph k7t3p3_step_6_data.i k7t3p3_step_6_data.j) k7t3p3_local_6 7 3 := by decide + +private theorem k7t3p3_step_6_check : k7t3p3_step_6.Check k7t3p3.graph k7t3p3_state_6 7 3 := by + change k7t3p3_step_6_data.Check k7t3p3.graph k7t3p3_state_6 7 3 + refine ⟨k7t3p3_local_6_paths, ?_⟩ + rw [k7t3p3_local_6_eq] + exact k7t3p3_local_6_bad + +private theorem k7t3p3_update_6 : k7t3p3_step_6.apply k7t3p3_state_6 = k7t3p3_state_7 := by + have h : ∀ i j : Fin 6, k7t3p3_step_6.apply k7t3p3_state_6 i j = k7t3p3_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p3_state_8 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 0 5, {1, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1}], + #[Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5], + #[Finset.Icc 1 5, {1, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, {1}, Finset.Icc 1 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p3_local_7 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[Finset.Icc 1 6, ∅, {1, 2, 3}, Finset.Icc 1 5, {1, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1}], + #[Finset.Icc 0 5, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5], + #[Finset.Icc 1 5, {1, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, {1}, Finset.Icc 1 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p3_local_7_eq_row_0 : ∀ j : Fin 6, (fun a b => k7t3p3_state_7 a b ∪ requiredMatrix 7 k7t3p3_step_7_data.required a b) 0 j = k7t3p3_local_7 0 j := by decide + +private theorem k7t3p3_local_7_eq_row_1 : ∀ j : Fin 6, (fun a b => k7t3p3_state_7 a b ∪ requiredMatrix 7 k7t3p3_step_7_data.required a b) 1 j = k7t3p3_local_7 1 j := by decide + +private theorem k7t3p3_local_7_eq_row_2 : ∀ j : Fin 6, (fun a b => k7t3p3_state_7 a b ∪ requiredMatrix 7 k7t3p3_step_7_data.required a b) 2 j = k7t3p3_local_7 2 j := by decide + +private theorem k7t3p3_local_7_eq_row_3 : ∀ j : Fin 6, (fun a b => k7t3p3_state_7 a b ∪ requiredMatrix 7 k7t3p3_step_7_data.required a b) 3 j = k7t3p3_local_7 3 j := by decide + +private theorem k7t3p3_local_7_eq_row_4 : ∀ j : Fin 6, (fun a b => k7t3p3_state_7 a b ∪ requiredMatrix 7 k7t3p3_step_7_data.required a b) 4 j = k7t3p3_local_7 4 j := by decide + +private theorem k7t3p3_local_7_eq_row_5 : ∀ j : Fin 6, (fun a b => k7t3p3_state_7 a b ∪ requiredMatrix 7 k7t3p3_step_7_data.required a b) 5 j = k7t3p3_local_7 5 j := by decide + +private theorem k7t3p3_local_7_eq : (fun a b => k7t3p3_state_7 a b ∪ requiredMatrix 7 k7t3p3_step_7_data.required a b) = k7t3p3_local_7 := by + funext i j + fin_cases i + + · exact k7t3p3_local_7_eq_row_0 j + + · exact k7t3p3_local_7_eq_row_1 j + + · exact k7t3p3_local_7_eq_row_2 j + + · exact k7t3p3_local_7_eq_row_3 j + + · exact k7t3p3_local_7_eq_row_4 j + + · exact k7t3p3_local_7_eq_row_5 j + +private theorem k7t3p3_local_7_paths : ∀ p ∈ k7t3p3_step_7_data.required, p.Check (addedEdgeGraph k7t3p3.graph k7t3p3_step_7_data.i k7t3p3_step_7_data.j) 7 := by decide + +private theorem k7t3p3_local_7_bad : k7t3p3_step_7_data.bad.Check (addedEdgeGraph k7t3p3.graph k7t3p3_step_7_data.i k7t3p3_step_7_data.j) k7t3p3_local_7 7 3 := by decide + +private theorem k7t3p3_step_7_check : k7t3p3_step_7.Check k7t3p3.graph k7t3p3_state_7 7 3 := by + change k7t3p3_step_7_data.Check k7t3p3.graph k7t3p3_state_7 7 3 + refine ⟨k7t3p3_local_7_paths, ?_⟩ + rw [k7t3p3_local_7_eq] + exact k7t3p3_local_7_bad + +private theorem k7t3p3_update_7 : k7t3p3_step_7.apply k7t3p3_state_7 = k7t3p3_state_8 := by + have h : ∀ i j : Fin 6, k7t3p3_step_7.apply k7t3p3_state_7 i j = k7t3p3_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p3_state_9 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 0 5, {1, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1}], + #[Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5], + #[Finset.Icc 0 5, {1, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, {1}, Finset.Icc 1 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p3_local_8 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[Finset.Icc 1 6, ∅, {1, 2, 3}, Finset.Icc 0 5, {1, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1}], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5], + #[Finset.Icc 1 5, {1, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, {1}, Finset.Icc 1 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p3_local_8_eq_row_0 : ∀ j : Fin 6, (fun a b => k7t3p3_state_8 a b ∪ requiredMatrix 7 k7t3p3_step_8_data.required a b) 0 j = k7t3p3_local_8 0 j := by decide + +private theorem k7t3p3_local_8_eq_row_1 : ∀ j : Fin 6, (fun a b => k7t3p3_state_8 a b ∪ requiredMatrix 7 k7t3p3_step_8_data.required a b) 1 j = k7t3p3_local_8 1 j := by decide + +private theorem k7t3p3_local_8_eq_row_2 : ∀ j : Fin 6, (fun a b => k7t3p3_state_8 a b ∪ requiredMatrix 7 k7t3p3_step_8_data.required a b) 2 j = k7t3p3_local_8 2 j := by decide + +private theorem k7t3p3_local_8_eq_row_3 : ∀ j : Fin 6, (fun a b => k7t3p3_state_8 a b ∪ requiredMatrix 7 k7t3p3_step_8_data.required a b) 3 j = k7t3p3_local_8 3 j := by decide + +private theorem k7t3p3_local_8_eq_row_4 : ∀ j : Fin 6, (fun a b => k7t3p3_state_8 a b ∪ requiredMatrix 7 k7t3p3_step_8_data.required a b) 4 j = k7t3p3_local_8 4 j := by decide + +private theorem k7t3p3_local_8_eq_row_5 : ∀ j : Fin 6, (fun a b => k7t3p3_state_8 a b ∪ requiredMatrix 7 k7t3p3_step_8_data.required a b) 5 j = k7t3p3_local_8 5 j := by decide + +private theorem k7t3p3_local_8_eq : (fun a b => k7t3p3_state_8 a b ∪ requiredMatrix 7 k7t3p3_step_8_data.required a b) = k7t3p3_local_8 := by + funext i j + fin_cases i + + · exact k7t3p3_local_8_eq_row_0 j + + · exact k7t3p3_local_8_eq_row_1 j + + · exact k7t3p3_local_8_eq_row_2 j + + · exact k7t3p3_local_8_eq_row_3 j + + · exact k7t3p3_local_8_eq_row_4 j + + · exact k7t3p3_local_8_eq_row_5 j + +private theorem k7t3p3_local_8_paths : ∀ p ∈ k7t3p3_step_8_data.required, p.Check (addedEdgeGraph k7t3p3.graph k7t3p3_step_8_data.i k7t3p3_step_8_data.j) 7 := by decide + +private theorem k7t3p3_local_8_bad : k7t3p3_step_8_data.bad.Check (addedEdgeGraph k7t3p3.graph k7t3p3_step_8_data.i k7t3p3_step_8_data.j) k7t3p3_local_8 7 3 := by decide + +private theorem k7t3p3_step_8_check : k7t3p3_step_8.Check k7t3p3.graph k7t3p3_state_8 7 3 := by + change k7t3p3_step_8_data.Check k7t3p3.graph k7t3p3_state_8 7 3 + refine ⟨k7t3p3_local_8_paths, ?_⟩ + rw [k7t3p3_local_8_eq] + exact k7t3p3_local_8_bad + +private theorem k7t3p3_update_8 : k7t3p3_step_8.apply k7t3p3_state_8 = k7t3p3_state_9 := by + have h : ∀ i j : Fin 6, k7t3p3_step_8.apply k7t3p3_state_8 i j = k7t3p3_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p3_state_10 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 0 5, {1, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4}, {1}], + #[Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5], + #[Finset.Icc 0 5, {1, 3, 4, 5}, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, {1}, Finset.Icc 1 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p3_local_9 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 4, 5, 6}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 1 4, ∅, {1, 2, 3}, {2, 3, 4}, {1}], + #[Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5], + #[Finset.Icc 0 5, {1, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, {1}, Finset.Icc 1 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p3_local_9_eq_row_0 : ∀ j : Fin 6, (fun a b => k7t3p3_state_9 a b ∪ requiredMatrix 7 k7t3p3_step_9_data.required a b) 0 j = k7t3p3_local_9 0 j := by decide + +private theorem k7t3p3_local_9_eq_row_1 : ∀ j : Fin 6, (fun a b => k7t3p3_state_9 a b ∪ requiredMatrix 7 k7t3p3_step_9_data.required a b) 1 j = k7t3p3_local_9 1 j := by decide + +private theorem k7t3p3_local_9_eq_row_2 : ∀ j : Fin 6, (fun a b => k7t3p3_state_9 a b ∪ requiredMatrix 7 k7t3p3_step_9_data.required a b) 2 j = k7t3p3_local_9 2 j := by decide + +private theorem k7t3p3_local_9_eq_row_3 : ∀ j : Fin 6, (fun a b => k7t3p3_state_9 a b ∪ requiredMatrix 7 k7t3p3_step_9_data.required a b) 3 j = k7t3p3_local_9 3 j := by decide + +private theorem k7t3p3_local_9_eq_row_4 : ∀ j : Fin 6, (fun a b => k7t3p3_state_9 a b ∪ requiredMatrix 7 k7t3p3_step_9_data.required a b) 4 j = k7t3p3_local_9 4 j := by decide + +private theorem k7t3p3_local_9_eq_row_5 : ∀ j : Fin 6, (fun a b => k7t3p3_state_9 a b ∪ requiredMatrix 7 k7t3p3_step_9_data.required a b) 5 j = k7t3p3_local_9 5 j := by decide + +private theorem k7t3p3_local_9_eq : (fun a b => k7t3p3_state_9 a b ∪ requiredMatrix 7 k7t3p3_step_9_data.required a b) = k7t3p3_local_9 := by + funext i j + fin_cases i + + · exact k7t3p3_local_9_eq_row_0 j + + · exact k7t3p3_local_9_eq_row_1 j + + · exact k7t3p3_local_9_eq_row_2 j + + · exact k7t3p3_local_9_eq_row_3 j + + · exact k7t3p3_local_9_eq_row_4 j + + · exact k7t3p3_local_9_eq_row_5 j + +private theorem k7t3p3_local_9_paths : ∀ p ∈ k7t3p3_step_9_data.required, p.Check (addedEdgeGraph k7t3p3.graph k7t3p3_step_9_data.i k7t3p3_step_9_data.j) 7 := by decide + +private theorem k7t3p3_local_9_bad : k7t3p3_step_9_data.bad.Check (addedEdgeGraph k7t3p3.graph k7t3p3_step_9_data.i k7t3p3_step_9_data.j) k7t3p3_local_9 7 3 := by decide + +private theorem k7t3p3_step_9_check : k7t3p3_step_9.Check k7t3p3.graph k7t3p3_state_9 7 3 := by + change k7t3p3_step_9_data.Check k7t3p3.graph k7t3p3_state_9 7 3 + refine ⟨k7t3p3_local_9_paths, ?_⟩ + rw [k7t3p3_local_9_eq] + exact k7t3p3_local_9_bad + +private theorem k7t3p3_update_9 : k7t3p3_step_9.apply k7t3p3_state_9 = k7t3p3_state_10 := by + have h : ∀ i j : Fin 6, k7t3p3_step_9.apply k7t3p3_state_9 i j = k7t3p3_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p3_state_11 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 0 5, {1, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4}, {1}], + #[Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 5], + #[Finset.Icc 0 5, {1, 3, 4, 5}, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, ∅, {1}, Finset.Icc 0 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p3_local_10 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 0 5, {1, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4}, {1}], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5], + #[Finset.Icc 0 5, {1, 3, 4, 5}, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 6, ∅, {1}, Finset.Icc 1 5, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p3_local_10_eq_row_0 : ∀ j : Fin 6, (fun a b => k7t3p3_state_10 a b ∪ requiredMatrix 7 k7t3p3_step_10_data.required a b) 0 j = k7t3p3_local_10 0 j := by decide + +private theorem k7t3p3_local_10_eq_row_1 : ∀ j : Fin 6, (fun a b => k7t3p3_state_10 a b ∪ requiredMatrix 7 k7t3p3_step_10_data.required a b) 1 j = k7t3p3_local_10 1 j := by decide + +private theorem k7t3p3_local_10_eq_row_2 : ∀ j : Fin 6, (fun a b => k7t3p3_state_10 a b ∪ requiredMatrix 7 k7t3p3_step_10_data.required a b) 2 j = k7t3p3_local_10 2 j := by decide + +private theorem k7t3p3_local_10_eq_row_3 : ∀ j : Fin 6, (fun a b => k7t3p3_state_10 a b ∪ requiredMatrix 7 k7t3p3_step_10_data.required a b) 3 j = k7t3p3_local_10 3 j := by decide + +private theorem k7t3p3_local_10_eq_row_4 : ∀ j : Fin 6, (fun a b => k7t3p3_state_10 a b ∪ requiredMatrix 7 k7t3p3_step_10_data.required a b) 4 j = k7t3p3_local_10 4 j := by decide + +private theorem k7t3p3_local_10_eq_row_5 : ∀ j : Fin 6, (fun a b => k7t3p3_state_10 a b ∪ requiredMatrix 7 k7t3p3_step_10_data.required a b) 5 j = k7t3p3_local_10 5 j := by decide + +private theorem k7t3p3_local_10_eq : (fun a b => k7t3p3_state_10 a b ∪ requiredMatrix 7 k7t3p3_step_10_data.required a b) = k7t3p3_local_10 := by + funext i j + fin_cases i + + · exact k7t3p3_local_10_eq_row_0 j + + · exact k7t3p3_local_10_eq_row_1 j + + · exact k7t3p3_local_10_eq_row_2 j + + · exact k7t3p3_local_10_eq_row_3 j + + · exact k7t3p3_local_10_eq_row_4 j + + · exact k7t3p3_local_10_eq_row_5 j + +private theorem k7t3p3_local_10_paths : ∀ p ∈ k7t3p3_step_10_data.required, p.Check (addedEdgeGraph k7t3p3.graph k7t3p3_step_10_data.i k7t3p3_step_10_data.j) 7 := by decide + +private theorem k7t3p3_local_10_bad : k7t3p3_step_10_data.bad.Check (addedEdgeGraph k7t3p3.graph k7t3p3_step_10_data.i k7t3p3_step_10_data.j) k7t3p3_local_10 7 3 := by decide + +private theorem k7t3p3_step_10_check : k7t3p3_step_10.Check k7t3p3.graph k7t3p3_state_10 7 3 := by + change k7t3p3_step_10_data.Check k7t3p3.graph k7t3p3_state_10 7 3 + refine ⟨k7t3p3_local_10_paths, ?_⟩ + rw [k7t3p3_local_10_eq] + exact k7t3p3_local_10_bad + +private theorem k7t3p3_update_10 : k7t3p3_step_10.apply k7t3p3_state_10 = k7t3p3_state_11 := by + have h : ∀ i j : Fin 6, k7t3p3_step_10.apply k7t3p3_state_10 i j = k7t3p3_state_11 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k7t3p3_closure_11 : ClosureCheck k7t3p3.graph k7t3p3_state_11 7 3 [] := by trivial + +private theorem k7t3p3_closure_10 : ClosureCheck k7t3p3.graph k7t3p3_state_10 7 3 [k7t3p3_step_10] := by + constructor + · exact k7t3p3_step_10_check + · rw [k7t3p3_update_10] + exact k7t3p3_closure_11 + +private theorem k7t3p3_closure_9 : ClosureCheck k7t3p3.graph k7t3p3_state_9 7 3 [k7t3p3_step_9, k7t3p3_step_10] := by + constructor + · exact k7t3p3_step_9_check + · rw [k7t3p3_update_9] + exact k7t3p3_closure_10 + +private theorem k7t3p3_closure_8 : ClosureCheck k7t3p3.graph k7t3p3_state_8 7 3 [k7t3p3_step_8, k7t3p3_step_9, k7t3p3_step_10] := by + constructor + · exact k7t3p3_step_8_check + · rw [k7t3p3_update_8] + exact k7t3p3_closure_9 + +private theorem k7t3p3_closure_7 : ClosureCheck k7t3p3.graph k7t3p3_state_7 7 3 [k7t3p3_step_7, k7t3p3_step_8, k7t3p3_step_9, k7t3p3_step_10] := by + constructor + · exact k7t3p3_step_7_check + · rw [k7t3p3_update_7] + exact k7t3p3_closure_8 + +private theorem k7t3p3_closure_6 : ClosureCheck k7t3p3.graph k7t3p3_state_6 7 3 [k7t3p3_step_6, k7t3p3_step_7, k7t3p3_step_8, k7t3p3_step_9, k7t3p3_step_10] := by + constructor + · exact k7t3p3_step_6_check + · rw [k7t3p3_update_6] + exact k7t3p3_closure_7 + +private theorem k7t3p3_closure_5 : ClosureCheck k7t3p3.graph k7t3p3_state_5 7 3 [k7t3p3_step_5, k7t3p3_step_6, k7t3p3_step_7, k7t3p3_step_8, k7t3p3_step_9, k7t3p3_step_10] := by + constructor + · exact k7t3p3_step_5_check + · rw [k7t3p3_update_5] + exact k7t3p3_closure_6 + +private theorem k7t3p3_closure_4 : ClosureCheck k7t3p3.graph k7t3p3_state_4 7 3 [k7t3p3_step_4, k7t3p3_step_5, k7t3p3_step_6, k7t3p3_step_7, k7t3p3_step_8, k7t3p3_step_9, k7t3p3_step_10] := by + constructor + · exact k7t3p3_step_4_check + · rw [k7t3p3_update_4] + exact k7t3p3_closure_5 + +private theorem k7t3p3_closure_3 : ClosureCheck k7t3p3.graph k7t3p3_state_3 7 3 [k7t3p3_step_3, k7t3p3_step_4, k7t3p3_step_5, k7t3p3_step_6, k7t3p3_step_7, k7t3p3_step_8, k7t3p3_step_9, k7t3p3_step_10] := by + constructor + · exact k7t3p3_step_3_check + · rw [k7t3p3_update_3] + exact k7t3p3_closure_4 + +private theorem k7t3p3_closure_2 : ClosureCheck k7t3p3.graph k7t3p3_state_2 7 3 [k7t3p3_step_2, k7t3p3_step_3, k7t3p3_step_4, k7t3p3_step_5, k7t3p3_step_6, k7t3p3_step_7, k7t3p3_step_8, k7t3p3_step_9, k7t3p3_step_10] := by + constructor + · exact k7t3p3_step_2_check + · rw [k7t3p3_update_2] + exact k7t3p3_closure_3 + +private theorem k7t3p3_closure_1 : ClosureCheck k7t3p3.graph k7t3p3_state_1 7 3 [k7t3p3_step_1, k7t3p3_step_2, k7t3p3_step_3, k7t3p3_step_4, k7t3p3_step_5, k7t3p3_step_6, k7t3p3_step_7, k7t3p3_step_8, k7t3p3_step_9, k7t3p3_step_10] := by + constructor + · exact k7t3p3_step_1_check + · rw [k7t3p3_update_1] + exact k7t3p3_closure_2 + +private theorem k7t3p3_closure_0 : ClosureCheck k7t3p3.graph k7t3p3_state_0 7 3 [k7t3p3_step_0, k7t3p3_step_1, k7t3p3_step_2, k7t3p3_step_3, k7t3p3_step_4, k7t3p3_step_5, k7t3p3_step_6, k7t3p3_step_7, k7t3p3_step_8, k7t3p3_step_9, k7t3p3_step_10] := by + constructor + · exact k7t3p3_step_0_check + · rw [k7t3p3_update_0] + exact k7t3p3_closure_1 + +private theorem k7t3p3_matrix_eq : k7t3p3.matrix 7 = k7t3p3_state_11 := by + change closureMatrix (k7t3p3.initialMatrix 7) _ = _ + rw [k7t3p3_initial_eq] + change closureMatrix k7t3p3_state_0 [k7t3p3_step_0, k7t3p3_step_1, k7t3p3_step_2, k7t3p3_step_3, k7t3p3_step_4, k7t3p3_step_5, k7t3p3_step_6, k7t3p3_step_7, k7t3p3_step_8, k7t3p3_step_9, k7t3p3_step_10] = _ + simp only [closureMatrix] + rw [k7t3p3_update_0, k7t3p3_update_1, k7t3p3_update_2, k7t3p3_update_3, k7t3p3_update_4, k7t3p3_update_5, k7t3p3_update_6, k7t3p3_update_7, k7t3p3_update_8, k7t3p3_update_9, k7t3p3_update_10] + +private theorem k7t3p3_part_0 : k7t3p3.chains.flatten = List.finRange _ := by decide + +private theorem k7t3p3_part_1 : k7t3p3.chains.map List.length = ([[], [3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t3p3_part_2 : k7t3p3.chains.map (fun l => l.map (fun i => decide (i ∈ k7t3p3.clique))) = ([[], [3]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t3p3_templates_item_0 : (⟨0, 1, [], [], [], 4, 6⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5], 1, 2⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_2 : (⟨0, 2, [], [], [1], 3, 5⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_3 : (⟨0, 2, [], [], [3, 4, 5], 1, 3⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_4 : (⟨0, 3, [], [], [2, 1], 2, 4⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_5 : (⟨0, 4, [], [], [3, 2, 1], 1, 3⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_6 : (⟨0, 4, [], [], [5], 3, 5⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_7 : (⟨0, 5, [], [], [], 4, 6⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_8 : (⟨0, 5, [], [], [4, 3, 2, 1], 1, 2⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_9 : (⟨1, 2, [], [], [3, 4, 5], 1, 3⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_10 : (⟨1, 3, [], [], [4, 5], 2, 4⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_11 : (⟨1, 4, [], [], [5], 3, 5⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_12 : (⟨2, 3, [], [1], [4, 5], 1, 3⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_13 : (⟨2, 4, [], [1], [5], 2, 4⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_14 : (⟨3, 4, [], [1, 2], [5], 1, 3⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_15 : (⟨3, 5, [], [1, 2], [], 2, 4⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_templates_item_16 : (⟨4, 5, [], [1, 2, 3], [], 1, 3⟩ : TemplateData (Fin 6)).Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p3_part_3 : ∀ T ∈ k7t3p3.templates, T.Check k7t3p3.graph k7t3p3.clique 7 (patternAmount ([[], [3]] : List (List ℕ))) (([[], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k7t3p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p3_templates_item_0, k7t3p3_templates_item_1, k7t3p3_templates_item_2, k7t3p3_templates_item_3, k7t3p3_templates_item_4, k7t3p3_templates_item_5, k7t3p3_templates_item_6, k7t3p3_templates_item_7, k7t3p3_templates_item_8, k7t3p3_templates_item_9, k7t3p3_templates_item_10, k7t3p3_templates_item_11, k7t3p3_templates_item_12, k7t3p3_templates_item_13, k7t3p3_templates_item_14, k7t3p3_templates_item_15, k7t3p3_templates_item_16⟩ + +private theorem k7t3p3_required_item_0 : (⟨1, 3, [2]⟩ : RequiredPathData (Fin 6)).Check k7t3p3.graph 7 := by decide + +private theorem k7t3p3_required_item_1 : (⟨3, 5, [4]⟩ : RequiredPathData (Fin 6)).Check k7t3p3.graph 7 := by decide + +private theorem k7t3p3_part_4 : ∀ p ∈ k7t3p3.required, p.Check k7t3p3.graph 7 := by + simp only [k7t3p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p3_required_item_0, k7t3p3_required_item_1⟩ + +private theorem k7t3p3_part_5 : ClosureCheck k7t3p3.graph (k7t3p3.initialMatrix 7) 7 3 k7t3p3.closure := by + rw [k7t3p3_initial_eq] + exact k7t3p3_closure_0 + +private theorem k7t3p3_part_6 : k7t3p3.bad.Check k7t3p3.graph (k7t3p3.matrix 7) 7 3 := by + rw [k7t3p3_matrix_eq] + decide + +theorem k7t3p3_check : k7t3p3.Check 7 3 [[], [3]] := + ⟨k7t3p3_part_0, k7t3p3_part_1, k7t3p3_part_2, k7t3p3_part_3, k7t3p3_part_4, k7t3p3_part_5, k7t3p3_part_6⟩ +private def k7t3p4_step_0_data : FreshAttachmentData 7 := ⟨3, 0, [⟨2, 0, [1, 7, 6, 5, 4]⟩, ⟨2, 7, [1, 0, 4, 5, 6]⟩, ⟨2, 0, [3, 4, 5, 6, 7, 1]⟩, ⟨2, 6, [3, 4, 0, 1, 7]⟩, ⟨2, 5, [3, 4, 0, 1, 7, 6]⟩, ⟨3, 0, [2, 1, 7, 6, 5, 4]⟩, ⟨3, 6, [2, 1, 0, 4, 5]⟩, ⟨3, 7, [2, 1, 0, 4, 5, 6]⟩, ⟨3, 6, [2, 7, 1, 0, 4, 5]⟩, ⟨3, 0, [2, 7, 6, 5, 4]⟩, ⟨3, 1, [2, 7, 6, 5, 4, 0]⟩, ⟨3, 2, [4, 0, 1]⟩, ⟨3, 5, [4, 0, 1, 2, 7, 6]⟩, ⟨3, 6, [4, 0, 1, 7]⟩, ⟨6, 0, [5, 4, 3, 2, 1]⟩, ⟨6, 0, [5, 4, 3, 2, 7, 1]⟩, ⟨6, 2, [5, 4, 0, 1]⟩, ⟨6, 3, [5, 4, 0, 1, 2]⟩, ⟨6, 2, [5, 4, 0, 1, 7]⟩, ⟨6, 3, [5, 4, 0, 1, 7, 2]⟩, ⟨6, 3, [7, 1, 0, 4]⟩, ⟨6, 0, [7, 2, 1]⟩, ⟨6, 0, [7, 2, 3, 4]⟩, ⟨0, 2, [4, 5, 6, 7, 1]⟩, ⟨0, 2, [4, 5, 6, 7]⟩], ⟨none, {(3, 1), (6, 3), (0, 0), (2, 2)}⟩⟩ + +private def k7t3p4_step_0 : ClosureStep 7 := .fresh k7t3p4_step_0_data + +private def k7t3p4_step_1_data : FreshAttachmentData 7 := ⟨4, 0, [⟨3, 0, [2, 1, 7, 6, 5]⟩, ⟨3, 6, [2, 1, 0, 5]⟩, ⟨3, 7, [2, 1, 0, 5, 6]⟩, ⟨3, 0, [2, 7, 1]⟩, ⟨3, 6, [2, 7, 1, 0, 5]⟩, ⟨3, 0, [2, 7, 6, 5]⟩, ⟨3, 0, [4, 5, 6, 7, 2, 1]⟩, ⟨3, 6, [4, 5, 0, 1, 2, 7]⟩, ⟨3, 7, [4, 5, 0, 1]⟩, ⟨6, 0, [5, 4, 3, 2, 1]⟩, ⟨6, 0, [5, 4, 3, 2, 7, 1]⟩, ⟨6, 7, [5, 0, 1]⟩, ⟨6, 4, [5, 0, 1, 7, 2, 3]⟩, ⟨6, 2, [7, 1, 0, 5, 4, 3]⟩, ⟨6, 3, [7, 2, 1, 0, 5, 4]⟩, ⟨6, 1, [7, 2, 3, 4, 5, 0]⟩, ⟨7, 0, [1, 2, 3, 4, 5]⟩, ⟨7, 2, [1, 0, 5, 4, 3]⟩, ⟨7, 3, [2, 1, 0, 5, 4]⟩, ⟨7, 0, [6, 5, 4, 3, 2, 1]⟩, ⟨7, 4, [6, 5, 0, 1, 2, 3]⟩, ⟨0, 7, [5, 4, 3, 2, 1]⟩, ⟨0, 7, [5, 4, 3, 2]⟩], ⟨none, {(3, 3), (6, 1), (0, 0), (7, 2)}⟩⟩ + +private def k7t3p4_step_1 : ClosureStep 7 := .fresh k7t3p4_step_1_data + +private def k7t3p4_step_2_data : FreshAttachmentData 7 := ⟨4, 1, [⟨1, 0, [7, 2, 3, 4, 5]⟩, ⟨1, 0, [7, 6, 5, 4, 3, 2]⟩, ⟨1, 4, [7, 6, 5, 0, 2, 3]⟩, ⟨6, 0, [5, 4, 3, 2]⟩, ⟨6, 1, [5, 0, 2]⟩, ⟨6, 0, [7, 1, 2, 3, 4, 5]⟩, ⟨6, 4, [7, 1, 2, 0, 5]⟩, ⟨6, 3, [7, 1, 2, 0, 5, 4]⟩, ⟨6, 0, [7, 2, 3, 4, 5]⟩, ⟨6, 3, [7, 2, 0, 5, 4]⟩, ⟨0, 6, [2, 1, 7]⟩, ⟨0, 4, [2, 1, 7, 6, 5]⟩, ⟨0, 3, [2, 1, 7, 6, 5, 4]⟩, ⟨0, 6, [2, 3, 4, 5]⟩, ⟨0, 7, [2, 3, 4, 5, 6]⟩, ⟨0, 1, [2, 3, 4, 5, 6, 7]⟩, ⟨0, 1, [2, 7]⟩, ⟨0, 6, [2, 7]⟩, ⟨0, 3, [2, 7, 6, 5, 4]⟩, ⟨0, 1, [5, 4, 3, 2]⟩, ⟨0, 6, [5, 4, 3, 2, 1, 7]⟩, ⟨0, 1, [5, 4, 3, 2, 7]⟩, ⟨0, 6, [5, 4, 3, 2, 7]⟩, ⟨0, 6, [5]⟩, ⟨0, 1, [5, 6, 7]⟩, ⟨0, 4, [5, 6, 7, 1, 2, 3]⟩], ⟨none, {(0, 2), (6, 3), (1, 2)}⟩⟩ + +private def k7t3p4_step_2 : ClosureStep 7 := .fresh k7t3p4_step_2_data + +private def k7t3p4_step_3_data : FreshAttachmentData 7 := ⟨5, 2, [⟨1, 0, [2, 3, 4, 5, 6]⟩, ⟨1, 4, [2, 3, 0, 6, 5]⟩, ⟨1, 0, [2, 7, 6, 5, 4, 3]⟩, ⟨1, 5, [2, 7, 6, 0, 3, 4]⟩, ⟨1, 5, [7, 2, 3, 0, 6]⟩, ⟨1, 4, [7, 2, 3, 0, 6, 5]⟩, ⟨1, 2, [7, 6, 0, 3]⟩, ⟨4, 2, [3, 0, 6, 7, 1]⟩, ⟨4, 0, [5, 6, 7, 1, 2, 3]⟩, ⟨4, 7, [5, 6, 0, 3, 2, 1]⟩, ⟨4, 1, [5, 6, 0, 3, 2, 7]⟩, ⟨5, 0, [4, 3, 2, 1, 7, 6]⟩, ⟨5, 2, [4, 3, 0, 6, 7, 1]⟩, ⟨5, 2, [4, 3, 0, 6, 7]⟩, ⟨5, 1, [4, 3, 0, 6, 7, 2]⟩], ⟨none, {(1, 2), (4, 1), (5, 1), (2, 0)}⟩⟩ + +private def k7t3p4_step_3 : ClosureStep 7 := .fresh k7t3p4_step_3_data + +private def k7t3p4_step_4_data : FreshAttachmentData 7 := ⟨6, 3, [⟨1, 0, [2, 3, 4, 5, 6, 7]⟩, ⟨1, 5, [2, 3, 4, 0, 7, 6]⟩, ⟨1, 0, [2, 7, 6, 5, 4]⟩, ⟨3, 0, [2, 1, 7, 6, 5, 4]⟩, ⟨3, 5, [2, 1, 7, 0, 4]⟩, ⟨3, 6, [2, 1, 7, 0, 4, 5]⟩, ⟨3, 0, [2, 7, 6, 5, 4]⟩, ⟨3, 6, [2, 7, 0, 4, 5]⟩, ⟨3, 0, [4, 5, 6, 7]⟩, ⟨3, 1, [4, 0, 7]⟩, ⟨0, 3, [4]⟩, ⟨0, 1, [4, 3, 2]⟩, ⟨0, 6, [4, 3, 2, 1, 7]⟩, ⟨0, 5, [4, 3, 2, 1, 7, 6]⟩, ⟨0, 1, [4, 3, 2, 7]⟩, ⟨0, 5, [4, 3, 2, 7, 6]⟩, ⟨0, 2, [4, 5, 6, 7, 1]⟩, ⟨0, 3, [4, 5, 6, 7, 1, 2]⟩, ⟨0, 1, [4, 5, 6, 7, 2]⟩, ⟨0, 3, [4, 5, 6, 7, 2]⟩, ⟨0, 3, [7, 1, 2]⟩, ⟨0, 6, [7, 1, 2, 3, 4, 5]⟩, ⟨0, 1, [7, 2]⟩, ⟨0, 3, [7, 2]⟩, ⟨0, 3, [7, 6, 5, 4]⟩, ⟨0, 1, [7, 6, 5, 4, 3, 2]⟩], ⟨none, {(0, 2), (3, 3), (1, 2)}⟩⟩ + +private def k7t3p4_step_4 : ClosureStep 7 := .fresh k7t3p4_step_4_data + +private def k7t3p4_step_5_data : EdgeAttachmentData 7 := ⟨3, 1, [⟨0, 2, [6, 1, 3]⟩, ⟨2, 4, [1, 3]⟩, ⟨2, 5, [3, 1, 0, 6]⟩, ⟨2, 4, [3, 1, 0, 6, 5]⟩, ⟨4, 2, [5, 6, 0, 1, 3]⟩], ⟨none, {(0, 2), (2, 3), (4, 2), (5, 0)}⟩⟩ + +private def k7t3p4_step_5 : ClosureStep 7 := .edge k7t3p4_step_5_data + +private def k7t3p4_step_6_data : FreshAttachmentData 7 := ⟨3, 1, [⟨1, 0, [2, 7, 6, 5, 4]⟩, ⟨1, 3, [2, 0, 4]⟩, ⟨1, 0, [7, 2, 3, 4]⟩, ⟨1, 0, [7, 6, 5, 4, 3, 2]⟩, ⟨1, 3, [7, 6, 5, 4, 0, 2]⟩, ⟨3, 0, [2, 1, 7, 6, 5, 4]⟩, ⟨3, 0, [2, 7, 6, 5, 4]⟩, ⟨3, 7, [2, 0, 4, 5, 6]⟩, ⟨3, 1, [2, 0, 4, 5, 6, 7]⟩, ⟨3, 5, [4, 0, 2, 1, 7, 6]⟩, ⟨3, 5, [4, 0, 2, 7, 6]⟩, ⟨5, 0, [6, 7, 1, 2, 3, 4]⟩, ⟨5, 3, [6, 7, 1, 2, 0, 4]⟩], ⟨none, {(1, 3), (3, 2), (5, 1), (4, 0)}⟩⟩ + +private def k7t3p4_step_6 : ClosureStep 7 := .fresh k7t3p4_step_6_data + +private def k7t3p4_step_7_data : EdgeAttachmentData 7 := ⟨4, 2, [⟨0, 5, [1, 2, 4]⟩, ⟨3, 5, [2, 4]⟩, ⟨3, 1, [2, 4, 5, 6, 0]⟩, ⟨3, 5, [4, 2, 1, 0, 6]⟩, ⟨5, 3, [6, 0, 1, 2, 4]⟩, ⟨5, 4, [6, 1, 2]⟩], ⟨none, {(0, 2), (3, 2), (5, 3), (4, 0)}⟩⟩ + +private def k7t3p4_step_7 : ClosureStep 7 := .edge k7t3p4_step_7_data + +private def k7t3p4_step_8_data : EdgeAttachmentData 7 := ⟨5, 3, [⟨0, 2, [6, 5, 3]⟩, ⟨2, 4, [1, 0, 6, 5, 3]⟩, ⟨2, 3, [1, 6, 5]⟩, ⟨4, 2, [3, 5, 6, 0, 1]⟩, ⟨4, 2, [5, 3]⟩, ⟨4, 6, [5, 3, 2, 1, 0]⟩], ⟨none, {(0, 2), (4, 2), (2, 3), (3, 0)}⟩⟩ + +private def k7t3p4_step_8 : ClosureStep 7 := .edge k7t3p4_step_8_data + +private def k7t3p4_step_9_data : EdgeAttachmentData 7 := ⟨6, 4, [⟨0, 5, [1, 6, 4]⟩, ⟨3, 5, [2, 1, 0, 6, 4]⟩, ⟨3, 5, [4, 6]⟩, ⟨5, 2, [4, 6, 0, 1]⟩, ⟨5, 3, [4, 6, 0, 1, 2]⟩], ⟨none, {(0, 2), (3, 2), (5, 3), (2, 0)}⟩⟩ + +private def k7t3p4_step_9 : ClosureStep 7 := .edge k7t3p4_step_9_data + +private def k7t3p4_step_10_data : FreshAttachmentData 7 := ⟨6, 4, [⟨1, 0, [2, 3, 4, 5, 6, 7]⟩, ⟨1, 0, [2, 3, 4, 5]⟩, ⟨1, 6, [2, 3, 4, 5, 0, 7]⟩, ⟨1, 0, [7, 2, 3, 4, 5]⟩, ⟨1, 6, [7, 0, 5]⟩, ⟨4, 0, [3, 2, 1, 7, 6, 5]⟩, ⟨4, 6, [3, 2, 1, 7, 0, 5]⟩, ⟨6, 0, [5, 4, 3, 2, 1, 7]⟩, ⟨6, 0, [5, 4, 3, 2, 7]⟩, ⟨6, 4, [5, 0, 7, 1, 2, 3]⟩, ⟨6, 4, [5, 0, 7, 2, 3]⟩, ⟨6, 2, [7, 0, 5, 4, 3]⟩, ⟨6, 1, [7, 0, 5, 4, 3, 2]⟩], ⟨none, {(1, 3), (6, 2), (4, 1), (5, 0)}⟩⟩ + +private def k7t3p4_step_10 : ClosureStep 7 := .fresh k7t3p4_step_10_data + +private def k7t3p4_step_11_data : EdgeAttachmentData 7 := ⟨3, 0, [⟨4, 3, [5, 6, 0]⟩, ⟨4, 2, [5, 6, 1, 0, 3]⟩], ⟨none, {(4, 2), (3, 1), (0, 2), (2, 0)}⟩⟩ + +private def k7t3p4_step_11 : ClosureStep 7 := .edge k7t3p4_step_11_data + +private def k7t3p4_step_12_data : EdgeAttachmentData 7 := ⟨4, 0, [⟨3, 4, [2, 1, 0]⟩, ⟨3, 5, [2, 1, 6, 0, 4]⟩], ⟨none, {(3, 2), (4, 1), (0, 2), (5, 0)}⟩⟩ + +private def k7t3p4_step_12 : ClosureStep 7 := .edge k7t3p4_step_12_data + +private def k7t3p4_step_13_data : EdgeAttachmentData 7 := ⟨6, 3, [⟨0, 2, [1, 6, 3]⟩, ⟨3, 0, [6]⟩, ⟨3, 2, [6, 0, 1]⟩, ⟨3, 2, [6, 1]⟩], ⟨none, {(3, 2), (0, 3), (2, 2)}⟩⟩ + +private def k7t3p4_step_13 : ClosureStep 7 := .edge k7t3p4_step_13_data + +def k7t3p4 : LayoutCertificate 7 where + chains := [[0], [1, 2, 3, 4, 5, 6]] + clique := {0, 1, 6} + templates := [⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 1⟩, + ⟨0, 2, [], [], [1], 4, 5⟩, + ⟨0, 2, [], [], [3, 4, 5, 6], 1, 2⟩, + ⟨0, 3, [], [], [2, 1], 3, 4⟩, + ⟨0, 3, [], [], [4, 5, 6], 2, 3⟩, + ⟨0, 4, [], [], [3, 2, 1], 2, 3⟩, + ⟨0, 4, [], [], [5, 6], 3, 4⟩, + ⟨0, 5, [], [], [4, 3, 2, 1], 1, 2⟩, + ⟨0, 5, [], [], [6], 4, 5⟩, + ⟨0, 6, [], [], [5, 4, 3, 2, 1], 1, 1⟩, + ⟨1, 2, [], [], [3, 4, 5, 6], 1, 2⟩, + ⟨1, 5, [], [], [6], 4, 5⟩, + ⟨2, 3, [], [1], [4, 5, 6], 1, 2⟩, + ⟨2, 4, [], [1], [5, 6], 2, 3⟩, + ⟨2, 5, [], [1], [6], 3, 4⟩, + ⟨2, 6, [], [1], [], 4, 5⟩, + ⟨3, 4, [], [1, 2], [5, 6], 1, 2⟩, + ⟨3, 5, [], [1, 2], [6], 2, 3⟩, + ⟨4, 5, [], [1, 2, 3], [6], 1, 2⟩, + ⟨5, 6, [], [1, 2, 3, 4], [], 1, 2⟩] + required := [⟨1, 5, [2, 3, 4]⟩, + ⟨2, 4, [3]⟩, + ⟨2, 6, [3, 4, 5]⟩, + ⟨3, 5, [4]⟩] + closure := [k7t3p4_step_0, k7t3p4_step_1, k7t3p4_step_2, k7t3p4_step_3, k7t3p4_step_4, k7t3p4_step_5, k7t3p4_step_6, k7t3p4_step_7, k7t3p4_step_8, k7t3p4_step_9, k7t3p4_step_10, k7t3p4_step_11, k7t3p4_step_12, k7t3p4_step_13] + bad := ⟨none, {(0, 2), (3, 2), (4, 0), (2, 0)}⟩ + + +private def k7t3p4_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, {2, 3, 4}, {2, 3, 4}, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, ∅, ∅, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {3, 4}, {3, 4, 5}], + #[{2, 3, 4}, ∅, {1, 2}, ∅, {1, 2}, {2, 3, 5}, ∅], + #[{2, 3, 4}, ∅, {2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2, 4, 5}, {3, 4, 5}, {3, 4}, {2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, ∅, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p4_initial_eq_row_0 : ∀ j : Fin 7, (k7t3p4.initialMatrix 7) 0 j = k7t3p4_state_0 0 j := by decide + +private theorem k7t3p4_initial_eq_row_1 : ∀ j : Fin 7, (k7t3p4.initialMatrix 7) 1 j = k7t3p4_state_0 1 j := by decide + +private theorem k7t3p4_initial_eq_row_2 : ∀ j : Fin 7, (k7t3p4.initialMatrix 7) 2 j = k7t3p4_state_0 2 j := by decide + +private theorem k7t3p4_initial_eq_row_3 : ∀ j : Fin 7, (k7t3p4.initialMatrix 7) 3 j = k7t3p4_state_0 3 j := by decide + +private theorem k7t3p4_initial_eq_row_4 : ∀ j : Fin 7, (k7t3p4.initialMatrix 7) 4 j = k7t3p4_state_0 4 j := by decide + +private theorem k7t3p4_initial_eq_row_5 : ∀ j : Fin 7, (k7t3p4.initialMatrix 7) 5 j = k7t3p4_state_0 5 j := by decide + +private theorem k7t3p4_initial_eq_row_6 : ∀ j : Fin 7, (k7t3p4.initialMatrix 7) 6 j = k7t3p4_state_0 6 j := by decide + +private theorem k7t3p4_initial_eq : (k7t3p4.initialMatrix 7) = k7t3p4_state_0 := by + funext i j + fin_cases i + + · exact k7t3p4_initial_eq_row_0 j + + · exact k7t3p4_initial_eq_row_1 j + + · exact k7t3p4_initial_eq_row_2 j + + · exact k7t3p4_initial_eq_row_3 j + + · exact k7t3p4_initial_eq_row_4 j + + · exact k7t3p4_initial_eq_row_5 j + + · exact k7t3p4_initial_eq_row_6 j + +private def k7t3p4_state_1 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, ∅, ∅, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {3, 4}, {3, 4, 5}], + #[Finset.Icc 1 4, ∅, {1, 2}, ∅, {1, 2}, {2, 3, 5}, ∅], + #[{2, 3, 4}, ∅, {2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2, 4, 5}, {3, 4, 5}, {3, 4}, {2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, ∅, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p4_local_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, {0, 1, 2}, {0, 1}, ∅, ∅, Finset.Icc 0 3, ∅], + #[∅, ∅, {1}, {0, 1, 2, 4, 5}, {2, 3, 4}, {2, 3, 4}, {1, 2, 4, 5}, {1}], + #[{0, 1, 2}, {1}, ∅, {1, 2, 3}, ∅, {0}, Finset.Icc 1 5, {1}], + #[{0, 1}, {0, 1, 2, 4, 5}, {1, 2, 3}, ∅, {1, 2}, {0, 2, 3, 5}, Finset.Icc 0 4, {0, 3, 4, 5}], + #[∅, {2, 3, 4}, ∅, {1, 2}, ∅, {1, 2}, {2, 3, 5}, ∅], + #[∅, {2, 3, 4}, {0}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[Finset.Icc 0 3, {1, 2, 4, 5}, Finset.Icc 1 5, Finset.Icc 0 4, {2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[∅, {1}, {1}, {0, 3, 4, 5}, ∅, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p4_local_0_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_0 a b ∪ requiredMatrix 7 k7t3p4_step_0_data.required a b) 0 j = k7t3p4_local_0 0 j := by decide + +private theorem k7t3p4_local_0_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_0 a b ∪ requiredMatrix 7 k7t3p4_step_0_data.required a b) 1 j = k7t3p4_local_0 1 j := by decide + +private theorem k7t3p4_local_0_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_0 a b ∪ requiredMatrix 7 k7t3p4_step_0_data.required a b) 2 j = k7t3p4_local_0 2 j := by decide + +private theorem k7t3p4_local_0_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_0 a b ∪ requiredMatrix 7 k7t3p4_step_0_data.required a b) 3 j = k7t3p4_local_0 3 j := by decide + +private theorem k7t3p4_local_0_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_0 a b ∪ requiredMatrix 7 k7t3p4_step_0_data.required a b) 4 j = k7t3p4_local_0 4 j := by decide + +private theorem k7t3p4_local_0_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_0 a b ∪ requiredMatrix 7 k7t3p4_step_0_data.required a b) 5 j = k7t3p4_local_0 5 j := by decide + +private theorem k7t3p4_local_0_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_0 a b ∪ requiredMatrix 7 k7t3p4_step_0_data.required a b) 6 j = k7t3p4_local_0 6 j := by decide + +private theorem k7t3p4_local_0_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_0 a b ∪ requiredMatrix 7 k7t3p4_step_0_data.required a b) 7 j = k7t3p4_local_0 7 j := by decide + +private theorem k7t3p4_local_0_eq : (fun a b => freshMatrix k7t3p4_state_0 a b ∪ requiredMatrix 7 k7t3p4_step_0_data.required a b) = k7t3p4_local_0 := by + funext i j + fin_cases i + + · exact k7t3p4_local_0_eq_row_0 j + + · exact k7t3p4_local_0_eq_row_1 j + + · exact k7t3p4_local_0_eq_row_2 j + + · exact k7t3p4_local_0_eq_row_3 j + + · exact k7t3p4_local_0_eq_row_4 j + + · exact k7t3p4_local_0_eq_row_5 j + + · exact k7t3p4_local_0_eq_row_6 j + + · exact k7t3p4_local_0_eq_row_7 j + +private theorem k7t3p4_local_0_paths : ∀ p ∈ k7t3p4_step_0_data.required, p.Check (freshGraph k7t3p4.graph k7t3p4_step_0_data.i k7t3p4_step_0_data.j) 7 := by decide + +private theorem k7t3p4_local_0_bad : k7t3p4_step_0_data.bad.Check (freshGraph k7t3p4.graph k7t3p4_step_0_data.i k7t3p4_step_0_data.j) k7t3p4_local_0 7 3 := by decide + +private theorem k7t3p4_step_0_check : k7t3p4_step_0.Check k7t3p4.graph k7t3p4_state_0 7 3 := by + change k7t3p4_step_0_data.Check k7t3p4.graph k7t3p4_state_0 7 3 + refine ⟨by decide, k7t3p4_local_0_paths, ?_⟩ + rw [k7t3p4_local_0_eq] + exact k7t3p4_local_0_bad + +private theorem k7t3p4_update_0 : k7t3p4_step_0.apply k7t3p4_state_0 = k7t3p4_state_1 := by + have h : ∀ i j : Fin 7, k7t3p4_step_0.apply k7t3p4_state_0 i j = k7t3p4_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p4_state_2 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, ∅, ∅, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {3, 4}, {3, 4, 5}], + #[Finset.Icc 1 4, ∅, {1, 2}, ∅, {1, 2}, {2, 3, 5}, ∅], + #[Finset.Icc 1 4, ∅, {2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2, 4, 5}, {3, 4, 5}, {3, 4}, {2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, ∅, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p4_local_1 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, ∅, Finset.Icc 0 3, ∅, ∅, {0, 1}, {0, 1, 2}], + #[∅, ∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, {2, 3, 4}, {0, 1, 2, 4, 5}, {1}], + #[∅, {1}, ∅, {1, 2}, ∅, ∅, {0, 3, 4, 5}, {1}], + #[Finset.Icc 0 3, {1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, Finset.Icc 0 4, Finset.Icc 1 5], + #[∅, Finset.Icc 1 4, ∅, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {0}], + #[∅, {2, 3, 4}, ∅, {2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[{0, 1}, {0, 1, 2, 4, 5}, {0, 3, 4, 5}, Finset.Icc 0 4, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2, 3}], + #[{0, 1, 2}, {1}, {1}, Finset.Icc 1 5, {0}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p4_local_1_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_1 a b ∪ requiredMatrix 7 k7t3p4_step_1_data.required a b) 0 j = k7t3p4_local_1 0 j := by decide + +private theorem k7t3p4_local_1_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_1 a b ∪ requiredMatrix 7 k7t3p4_step_1_data.required a b) 1 j = k7t3p4_local_1 1 j := by decide + +private theorem k7t3p4_local_1_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_1 a b ∪ requiredMatrix 7 k7t3p4_step_1_data.required a b) 2 j = k7t3p4_local_1 2 j := by decide + +private theorem k7t3p4_local_1_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_1 a b ∪ requiredMatrix 7 k7t3p4_step_1_data.required a b) 3 j = k7t3p4_local_1 3 j := by decide + +private theorem k7t3p4_local_1_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_1 a b ∪ requiredMatrix 7 k7t3p4_step_1_data.required a b) 4 j = k7t3p4_local_1 4 j := by decide + +private theorem k7t3p4_local_1_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_1 a b ∪ requiredMatrix 7 k7t3p4_step_1_data.required a b) 5 j = k7t3p4_local_1 5 j := by decide + +private theorem k7t3p4_local_1_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_1 a b ∪ requiredMatrix 7 k7t3p4_step_1_data.required a b) 6 j = k7t3p4_local_1 6 j := by decide + +private theorem k7t3p4_local_1_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_1 a b ∪ requiredMatrix 7 k7t3p4_step_1_data.required a b) 7 j = k7t3p4_local_1 7 j := by decide + +private theorem k7t3p4_local_1_eq : (fun a b => freshMatrix k7t3p4_state_1 a b ∪ requiredMatrix 7 k7t3p4_step_1_data.required a b) = k7t3p4_local_1 := by + funext i j + fin_cases i + + · exact k7t3p4_local_1_eq_row_0 j + + · exact k7t3p4_local_1_eq_row_1 j + + · exact k7t3p4_local_1_eq_row_2 j + + · exact k7t3p4_local_1_eq_row_3 j + + · exact k7t3p4_local_1_eq_row_4 j + + · exact k7t3p4_local_1_eq_row_5 j + + · exact k7t3p4_local_1_eq_row_6 j + + · exact k7t3p4_local_1_eq_row_7 j + +private theorem k7t3p4_local_1_paths : ∀ p ∈ k7t3p4_step_1_data.required, p.Check (freshGraph k7t3p4.graph k7t3p4_step_1_data.i k7t3p4_step_1_data.j) 7 := by decide + +private theorem k7t3p4_local_1_bad : k7t3p4_step_1_data.bad.Check (freshGraph k7t3p4.graph k7t3p4_step_1_data.i k7t3p4_step_1_data.j) k7t3p4_local_1 7 3 := by decide + +private theorem k7t3p4_step_1_check : k7t3p4_step_1.Check k7t3p4.graph k7t3p4_state_1 7 3 := by + change k7t3p4_step_1_data.Check k7t3p4.graph k7t3p4_state_1 7 3 + refine ⟨by decide, k7t3p4_local_1_paths, ?_⟩ + rw [k7t3p4_local_1_eq] + exact k7t3p4_local_1_bad + +private theorem k7t3p4_update_1 : k7t3p4_step_1.apply k7t3p4_state_1 = k7t3p4_state_2 := by + have h : ∀ i j : Fin 7, k7t3p4_step_1.apply k7t3p4_state_1 i j = k7t3p4_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p4_state_3 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, ∅, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {3, 4}, {3, 4, 5}], + #[Finset.Icc 1 4, ∅, {1, 2}, ∅, {1, 2}, {2, 3, 5}, ∅], + #[Finset.Icc 1 4, {1}, {2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2, 4, 5}, {3, 4, 5}, {3, 4}, {2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, ∅, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p4_local_2 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 0 4, ∅, {0, 1}, {0, 1}, ∅, Finset.Icc 0 5, {1}], + #[Finset.Icc 0 4, ∅, {1}, {1, 2, 4, 5}, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5, {1}], + #[∅, {1}, ∅, {1, 2}, ∅, ∅, {3, 4, 5}, ∅], + #[{0, 1}, {1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {0, 1, 3, 4}, {3, 4, 5}], + #[{0, 1}, Finset.Icc 0 4, ∅, {1, 2}, ∅, {1, 2}, {1, 2, 3, 5}, ∅], + #[∅, Finset.Icc 1 4, ∅, {2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[Finset.Icc 0 5, Finset.Icc 1 5, {3, 4, 5}, {0, 1, 3, 4}, {1, 2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, {1}, ∅, {3, 4, 5}, ∅, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p4_local_2_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_2 a b ∪ requiredMatrix 7 k7t3p4_step_2_data.required a b) 0 j = k7t3p4_local_2 0 j := by decide + +private theorem k7t3p4_local_2_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_2 a b ∪ requiredMatrix 7 k7t3p4_step_2_data.required a b) 1 j = k7t3p4_local_2 1 j := by decide + +private theorem k7t3p4_local_2_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_2 a b ∪ requiredMatrix 7 k7t3p4_step_2_data.required a b) 2 j = k7t3p4_local_2 2 j := by decide + +private theorem k7t3p4_local_2_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_2 a b ∪ requiredMatrix 7 k7t3p4_step_2_data.required a b) 3 j = k7t3p4_local_2 3 j := by decide + +private theorem k7t3p4_local_2_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_2 a b ∪ requiredMatrix 7 k7t3p4_step_2_data.required a b) 4 j = k7t3p4_local_2 4 j := by decide + +private theorem k7t3p4_local_2_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_2 a b ∪ requiredMatrix 7 k7t3p4_step_2_data.required a b) 5 j = k7t3p4_local_2 5 j := by decide + +private theorem k7t3p4_local_2_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_2 a b ∪ requiredMatrix 7 k7t3p4_step_2_data.required a b) 6 j = k7t3p4_local_2 6 j := by decide + +private theorem k7t3p4_local_2_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_2 a b ∪ requiredMatrix 7 k7t3p4_step_2_data.required a b) 7 j = k7t3p4_local_2 7 j := by decide + +private theorem k7t3p4_local_2_eq : (fun a b => freshMatrix k7t3p4_state_2 a b ∪ requiredMatrix 7 k7t3p4_step_2_data.required a b) = k7t3p4_local_2 := by + funext i j + fin_cases i + + · exact k7t3p4_local_2_eq_row_0 j + + · exact k7t3p4_local_2_eq_row_1 j + + · exact k7t3p4_local_2_eq_row_2 j + + · exact k7t3p4_local_2_eq_row_3 j + + · exact k7t3p4_local_2_eq_row_4 j + + · exact k7t3p4_local_2_eq_row_5 j + + · exact k7t3p4_local_2_eq_row_6 j + + · exact k7t3p4_local_2_eq_row_7 j + +private theorem k7t3p4_local_2_paths : ∀ p ∈ k7t3p4_step_2_data.required, p.Check (freshGraph k7t3p4.graph k7t3p4_step_2_data.i k7t3p4_step_2_data.j) 7 := by decide + +private theorem k7t3p4_local_2_bad : k7t3p4_step_2_data.bad.Check (freshGraph k7t3p4.graph k7t3p4_step_2_data.i k7t3p4_step_2_data.j) k7t3p4_local_2 7 3 := by decide + +private theorem k7t3p4_step_2_check : k7t3p4_step_2.Check k7t3p4.graph k7t3p4_state_2 7 3 := by + change k7t3p4_step_2_data.Check k7t3p4.graph k7t3p4_state_2 7 3 + refine ⟨by decide, k7t3p4_local_2_paths, ?_⟩ + rw [k7t3p4_local_2_eq] + exact k7t3p4_local_2_bad + +private theorem k7t3p4_update_2 : k7t3p4_step_2.apply k7t3p4_state_2 = k7t3p4_state_3 := by + have h : ∀ i j : Fin 7, k7t3p4_step_2.apply k7t3p4_state_2 i j = k7t3p4_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p4_state_4 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, ∅, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 1 4, ∅, {1, 2}, ∅, {1, 2}, {2, 3, 5}, ∅], + #[Finset.Icc 1 4, {1}, {2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, ∅, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p4_local_3 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {0, 1}, ∅, ∅, {0}, {0}, ∅, ∅], + #[{0, 1}, ∅, {1, 2}, {1, 2, 4, 5}, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 4, 5}, {1}], + #[∅, {1, 2}, ∅, {1, 2}, {1}, {0, 1}, {3, 4, 5}, ∅], + #[∅, {1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {3, 4}, {3, 4, 5}], + #[{0}, Finset.Icc 0 4, {1}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {0}], + #[{0}, Finset.Icc 0 4, {0, 1}, {2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[∅, {1, 2, 4, 5}, {3, 4, 5}, {3, 4}, {2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[∅, {1}, ∅, {3, 4, 5}, {0}, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p4_local_3_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_3 a b ∪ requiredMatrix 7 k7t3p4_step_3_data.required a b) 0 j = k7t3p4_local_3 0 j := by decide + +private theorem k7t3p4_local_3_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_3 a b ∪ requiredMatrix 7 k7t3p4_step_3_data.required a b) 1 j = k7t3p4_local_3 1 j := by decide + +private theorem k7t3p4_local_3_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_3 a b ∪ requiredMatrix 7 k7t3p4_step_3_data.required a b) 2 j = k7t3p4_local_3 2 j := by decide + +private theorem k7t3p4_local_3_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_3 a b ∪ requiredMatrix 7 k7t3p4_step_3_data.required a b) 3 j = k7t3p4_local_3 3 j := by decide + +private theorem k7t3p4_local_3_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_3 a b ∪ requiredMatrix 7 k7t3p4_step_3_data.required a b) 4 j = k7t3p4_local_3 4 j := by decide + +private theorem k7t3p4_local_3_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_3 a b ∪ requiredMatrix 7 k7t3p4_step_3_data.required a b) 5 j = k7t3p4_local_3 5 j := by decide + +private theorem k7t3p4_local_3_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_3 a b ∪ requiredMatrix 7 k7t3p4_step_3_data.required a b) 6 j = k7t3p4_local_3 6 j := by decide + +private theorem k7t3p4_local_3_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_3 a b ∪ requiredMatrix 7 k7t3p4_step_3_data.required a b) 7 j = k7t3p4_local_3 7 j := by decide + +private theorem k7t3p4_local_3_eq : (fun a b => freshMatrix k7t3p4_state_3 a b ∪ requiredMatrix 7 k7t3p4_step_3_data.required a b) = k7t3p4_local_3 := by + funext i j + fin_cases i + + · exact k7t3p4_local_3_eq_row_0 j + + · exact k7t3p4_local_3_eq_row_1 j + + · exact k7t3p4_local_3_eq_row_2 j + + · exact k7t3p4_local_3_eq_row_3 j + + · exact k7t3p4_local_3_eq_row_4 j + + · exact k7t3p4_local_3_eq_row_5 j + + · exact k7t3p4_local_3_eq_row_6 j + + · exact k7t3p4_local_3_eq_row_7 j + +private theorem k7t3p4_local_3_paths : ∀ p ∈ k7t3p4_step_3_data.required, p.Check (freshGraph k7t3p4.graph k7t3p4_step_3_data.i k7t3p4_step_3_data.j) 7 := by decide + +private theorem k7t3p4_local_3_bad : k7t3p4_step_3_data.bad.Check (freshGraph k7t3p4.graph k7t3p4_step_3_data.i k7t3p4_step_3_data.j) k7t3p4_local_3 7 3 := by decide + +private theorem k7t3p4_step_3_check : k7t3p4_step_3.Check k7t3p4.graph k7t3p4_state_3 7 3 := by + change k7t3p4_step_3_data.Check k7t3p4.graph k7t3p4_state_3 7 3 + refine ⟨by decide, k7t3p4_local_3_paths, ?_⟩ + rw [k7t3p4_local_3_eq] + exact k7t3p4_local_3_bad + +private theorem k7t3p4_update_3 : k7t3p4_step_3.apply k7t3p4_state_3 = k7t3p4_state_4 := by + have h : ∀ i j : Fin 7, k7t3p4_step_3.apply k7t3p4_state_3 i j = k7t3p4_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p4_state_5 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, ∅, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 1 4, ∅, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {1}], + #[Finset.Icc 1 4, {1}, {2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p4_local_4 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {1}, Finset.Icc 0 5, ∅, {0, 1}, {0, 1}, ∅], + #[Finset.Icc 0 4, ∅, {1}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 0 4, {1, 2, 4, 5}, {1}], + #[{1}, {1}, ∅, {1, 2}, ∅, {1}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 1 5, {1, 2}, ∅, {1, 2}, {1, 2, 3, 5}, {0, 1, 3, 4}, {3, 4, 5}], + #[∅, Finset.Icc 1 4, ∅, {1, 2}, ∅, {1, 2}, {2, 3, 5}, ∅], + #[{0, 1}, Finset.Icc 0 4, {1}, {1, 2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[{0, 1}, {1, 2, 4, 5}, {3, 4, 5}, {0, 1, 3, 4}, {2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[∅, {1}, ∅, {3, 4, 5}, ∅, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p4_local_4_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_4 a b ∪ requiredMatrix 7 k7t3p4_step_4_data.required a b) 0 j = k7t3p4_local_4 0 j := by decide + +private theorem k7t3p4_local_4_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_4 a b ∪ requiredMatrix 7 k7t3p4_step_4_data.required a b) 1 j = k7t3p4_local_4 1 j := by decide + +private theorem k7t3p4_local_4_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_4 a b ∪ requiredMatrix 7 k7t3p4_step_4_data.required a b) 2 j = k7t3p4_local_4 2 j := by decide + +private theorem k7t3p4_local_4_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_4 a b ∪ requiredMatrix 7 k7t3p4_step_4_data.required a b) 3 j = k7t3p4_local_4 3 j := by decide + +private theorem k7t3p4_local_4_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_4 a b ∪ requiredMatrix 7 k7t3p4_step_4_data.required a b) 4 j = k7t3p4_local_4 4 j := by decide + +private theorem k7t3p4_local_4_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_4 a b ∪ requiredMatrix 7 k7t3p4_step_4_data.required a b) 5 j = k7t3p4_local_4 5 j := by decide + +private theorem k7t3p4_local_4_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_4 a b ∪ requiredMatrix 7 k7t3p4_step_4_data.required a b) 6 j = k7t3p4_local_4 6 j := by decide + +private theorem k7t3p4_local_4_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_4 a b ∪ requiredMatrix 7 k7t3p4_step_4_data.required a b) 7 j = k7t3p4_local_4 7 j := by decide + +private theorem k7t3p4_local_4_eq : (fun a b => freshMatrix k7t3p4_state_4 a b ∪ requiredMatrix 7 k7t3p4_step_4_data.required a b) = k7t3p4_local_4 := by + funext i j + fin_cases i + + · exact k7t3p4_local_4_eq_row_0 j + + · exact k7t3p4_local_4_eq_row_1 j + + · exact k7t3p4_local_4_eq_row_2 j + + · exact k7t3p4_local_4_eq_row_3 j + + · exact k7t3p4_local_4_eq_row_4 j + + · exact k7t3p4_local_4_eq_row_5 j + + · exact k7t3p4_local_4_eq_row_6 j + + · exact k7t3p4_local_4_eq_row_7 j + +private theorem k7t3p4_local_4_paths : ∀ p ∈ k7t3p4_step_4_data.required, p.Check (freshGraph k7t3p4.graph k7t3p4_step_4_data.i k7t3p4_step_4_data.j) 7 := by decide + +private theorem k7t3p4_local_4_bad : k7t3p4_step_4_data.bad.Check (freshGraph k7t3p4.graph k7t3p4_step_4_data.i k7t3p4_step_4_data.j) k7t3p4_local_4 7 3 := by decide + +private theorem k7t3p4_step_4_check : k7t3p4_step_4.Check k7t3p4.graph k7t3p4_state_4 7 3 := by + change k7t3p4_step_4_data.Check k7t3p4.graph k7t3p4_state_4 7 3 + refine ⟨by decide, k7t3p4_local_4_paths, ?_⟩ + rw [k7t3p4_local_4_eq] + exact k7t3p4_local_4_bad + +private theorem k7t3p4_update_4 : k7t3p4_step_4.apply k7t3p4_state_4 = k7t3p4_state_5 := by + have h : ∀ i j : Fin 7, k7t3p4_step_4.apply k7t3p4_state_4 i j = k7t3p4_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p4_state_6 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, {0}, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 1 4, {0}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {1}], + #[Finset.Icc 1 4, {1}, {2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p4_local_5 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, ∅, {1}, {3, 4, 5}, ∅], + #[Finset.Icc 1 5, {1, 2}, ∅, {1, 2}, Finset.Icc 1 5, Finset.Icc 1 4, {3, 4, 5}], + #[Finset.Icc 1 4, ∅, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {1}], + #[Finset.Icc 1 4, {1}, Finset.Icc 1 5, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2, 4, 5}, {3, 4, 5}, Finset.Icc 1 4, {2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p4_local_5_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p4_state_5 a b ∪ requiredMatrix 7 k7t3p4_step_5_data.required a b) 0 j = k7t3p4_local_5 0 j := by decide + +private theorem k7t3p4_local_5_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p4_state_5 a b ∪ requiredMatrix 7 k7t3p4_step_5_data.required a b) 1 j = k7t3p4_local_5 1 j := by decide + +private theorem k7t3p4_local_5_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p4_state_5 a b ∪ requiredMatrix 7 k7t3p4_step_5_data.required a b) 2 j = k7t3p4_local_5 2 j := by decide + +private theorem k7t3p4_local_5_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p4_state_5 a b ∪ requiredMatrix 7 k7t3p4_step_5_data.required a b) 3 j = k7t3p4_local_5 3 j := by decide + +private theorem k7t3p4_local_5_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p4_state_5 a b ∪ requiredMatrix 7 k7t3p4_step_5_data.required a b) 4 j = k7t3p4_local_5 4 j := by decide + +private theorem k7t3p4_local_5_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p4_state_5 a b ∪ requiredMatrix 7 k7t3p4_step_5_data.required a b) 5 j = k7t3p4_local_5 5 j := by decide + +private theorem k7t3p4_local_5_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p4_state_5 a b ∪ requiredMatrix 7 k7t3p4_step_5_data.required a b) 6 j = k7t3p4_local_5 6 j := by decide + +private theorem k7t3p4_local_5_eq : (fun a b => k7t3p4_state_5 a b ∪ requiredMatrix 7 k7t3p4_step_5_data.required a b) = k7t3p4_local_5 := by + funext i j + fin_cases i + + · exact k7t3p4_local_5_eq_row_0 j + + · exact k7t3p4_local_5_eq_row_1 j + + · exact k7t3p4_local_5_eq_row_2 j + + · exact k7t3p4_local_5_eq_row_3 j + + · exact k7t3p4_local_5_eq_row_4 j + + · exact k7t3p4_local_5_eq_row_5 j + + · exact k7t3p4_local_5_eq_row_6 j + +private theorem k7t3p4_local_5_paths : ∀ p ∈ k7t3p4_step_5_data.required, p.Check (addedEdgeGraph k7t3p4.graph k7t3p4_step_5_data.i k7t3p4_step_5_data.j) 7 := by decide + +private theorem k7t3p4_local_5_bad : k7t3p4_step_5_data.bad.Check (addedEdgeGraph k7t3p4.graph k7t3p4_step_5_data.i k7t3p4_step_5_data.j) k7t3p4_local_5 7 3 := by decide + +private theorem k7t3p4_step_5_check : k7t3p4_step_5.Check k7t3p4.graph k7t3p4_state_5 7 3 := by + change k7t3p4_step_5_data.Check k7t3p4.graph k7t3p4_state_5 7 3 + refine ⟨k7t3p4_local_5_paths, ?_⟩ + rw [k7t3p4_local_5_eq] + exact k7t3p4_local_5_bad + +private theorem k7t3p4_update_5 : k7t3p4_step_5.apply k7t3p4_state_5 = k7t3p4_state_6 := by + have h : ∀ i j : Fin 7, k7t3p4_step_5.apply k7t3p4_state_5 i j = k7t3p4_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p4_state_7 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, {0, 1}, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 1 4, {0, 1}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {1}], + #[Finset.Icc 1 4, {1}, {2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p4_local_6 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, {0, 1}, ∅, {0}, ∅, ∅], + #[{0, 1, 2}, ∅, {1}, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[∅, {1}, ∅, {1, 2}, {0}, {1}, {3, 4, 5}, ∅], + #[{0, 1}, Finset.Icc 0 5, {1, 2}, ∅, {1, 2}, {0, 1, 2, 3, 5}, {1, 3, 4}, {1, 3, 4, 5}], + #[∅, Finset.Icc 1 4, {0}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {1}], + #[{0}, Finset.Icc 1 4, {1}, {0, 1, 2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[∅, {1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[∅, {1}, ∅, {1, 3, 4, 5}, {1}, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p4_local_6_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_6 a b ∪ requiredMatrix 7 k7t3p4_step_6_data.required a b) 0 j = k7t3p4_local_6 0 j := by decide + +private theorem k7t3p4_local_6_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_6 a b ∪ requiredMatrix 7 k7t3p4_step_6_data.required a b) 1 j = k7t3p4_local_6 1 j := by decide + +private theorem k7t3p4_local_6_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_6 a b ∪ requiredMatrix 7 k7t3p4_step_6_data.required a b) 2 j = k7t3p4_local_6 2 j := by decide + +private theorem k7t3p4_local_6_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_6 a b ∪ requiredMatrix 7 k7t3p4_step_6_data.required a b) 3 j = k7t3p4_local_6 3 j := by decide + +private theorem k7t3p4_local_6_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_6 a b ∪ requiredMatrix 7 k7t3p4_step_6_data.required a b) 4 j = k7t3p4_local_6 4 j := by decide + +private theorem k7t3p4_local_6_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_6 a b ∪ requiredMatrix 7 k7t3p4_step_6_data.required a b) 5 j = k7t3p4_local_6 5 j := by decide + +private theorem k7t3p4_local_6_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_6 a b ∪ requiredMatrix 7 k7t3p4_step_6_data.required a b) 6 j = k7t3p4_local_6 6 j := by decide + +private theorem k7t3p4_local_6_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_6 a b ∪ requiredMatrix 7 k7t3p4_step_6_data.required a b) 7 j = k7t3p4_local_6 7 j := by decide + +private theorem k7t3p4_local_6_eq : (fun a b => freshMatrix k7t3p4_state_6 a b ∪ requiredMatrix 7 k7t3p4_step_6_data.required a b) = k7t3p4_local_6 := by + funext i j + fin_cases i + + · exact k7t3p4_local_6_eq_row_0 j + + · exact k7t3p4_local_6_eq_row_1 j + + · exact k7t3p4_local_6_eq_row_2 j + + · exact k7t3p4_local_6_eq_row_3 j + + · exact k7t3p4_local_6_eq_row_4 j + + · exact k7t3p4_local_6_eq_row_5 j + + · exact k7t3p4_local_6_eq_row_6 j + + · exact k7t3p4_local_6_eq_row_7 j + +private theorem k7t3p4_local_6_paths : ∀ p ∈ k7t3p4_step_6_data.required, p.Check (freshGraph k7t3p4.graph k7t3p4_step_6_data.i k7t3p4_step_6_data.j) 7 := by decide + +private theorem k7t3p4_local_6_bad : k7t3p4_step_6_data.bad.Check (freshGraph k7t3p4.graph k7t3p4_step_6_data.i k7t3p4_step_6_data.j) k7t3p4_local_6 7 3 := by decide + +private theorem k7t3p4_step_6_check : k7t3p4_step_6.Check k7t3p4.graph k7t3p4_state_6 7 3 := by + change k7t3p4_step_6_data.Check k7t3p4.graph k7t3p4_state_6 7 3 + refine ⟨by decide, k7t3p4_local_6_paths, ?_⟩ + rw [k7t3p4_local_6_eq] + exact k7t3p4_local_6_bad + +private theorem k7t3p4_update_6 : k7t3p4_step_6.apply k7t3p4_state_6 = k7t3p4_state_7 := by + have h : ∀ i j : Fin 7, k7t3p4_step_6.apply k7t3p4_state_6 i j = k7t3p4_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p4_state_8 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, {0, 1}, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 1 4, {0, 1}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {1}], + #[Finset.Icc 1 4, {1}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p4_local_7 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5, {1}], + #[{1}, ∅, {1, 2}, {0, 1}, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 1 4, {0, 1}, {1, 2}, ∅, {1, 2}, Finset.Icc 1 5, {1}], + #[Finset.Icc 1 4, {1}, {2, 3, 5}, {1, 2}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {3, 4, 5}, {1, 3, 4}, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p4_local_7_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p4_state_7 a b ∪ requiredMatrix 7 k7t3p4_step_7_data.required a b) 0 j = k7t3p4_local_7 0 j := by decide + +private theorem k7t3p4_local_7_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p4_state_7 a b ∪ requiredMatrix 7 k7t3p4_step_7_data.required a b) 1 j = k7t3p4_local_7 1 j := by decide + +private theorem k7t3p4_local_7_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p4_state_7 a b ∪ requiredMatrix 7 k7t3p4_step_7_data.required a b) 2 j = k7t3p4_local_7 2 j := by decide + +private theorem k7t3p4_local_7_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p4_state_7 a b ∪ requiredMatrix 7 k7t3p4_step_7_data.required a b) 3 j = k7t3p4_local_7 3 j := by decide + +private theorem k7t3p4_local_7_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p4_state_7 a b ∪ requiredMatrix 7 k7t3p4_step_7_data.required a b) 4 j = k7t3p4_local_7 4 j := by decide + +private theorem k7t3p4_local_7_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p4_state_7 a b ∪ requiredMatrix 7 k7t3p4_step_7_data.required a b) 5 j = k7t3p4_local_7 5 j := by decide + +private theorem k7t3p4_local_7_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p4_state_7 a b ∪ requiredMatrix 7 k7t3p4_step_7_data.required a b) 6 j = k7t3p4_local_7 6 j := by decide + +private theorem k7t3p4_local_7_eq : (fun a b => k7t3p4_state_7 a b ∪ requiredMatrix 7 k7t3p4_step_7_data.required a b) = k7t3p4_local_7 := by + funext i j + fin_cases i + + · exact k7t3p4_local_7_eq_row_0 j + + · exact k7t3p4_local_7_eq_row_1 j + + · exact k7t3p4_local_7_eq_row_2 j + + · exact k7t3p4_local_7_eq_row_3 j + + · exact k7t3p4_local_7_eq_row_4 j + + · exact k7t3p4_local_7_eq_row_5 j + + · exact k7t3p4_local_7_eq_row_6 j + +private theorem k7t3p4_local_7_paths : ∀ p ∈ k7t3p4_step_7_data.required, p.Check (addedEdgeGraph k7t3p4.graph k7t3p4_step_7_data.i k7t3p4_step_7_data.j) 7 := by decide + +private theorem k7t3p4_local_7_bad : k7t3p4_step_7_data.bad.Check (addedEdgeGraph k7t3p4.graph k7t3p4_step_7_data.i k7t3p4_step_7_data.j) k7t3p4_local_7 7 3 := by decide + +private theorem k7t3p4_step_7_check : k7t3p4_step_7.Check k7t3p4.graph k7t3p4_state_7 7 3 := by + change k7t3p4_step_7_data.Check k7t3p4.graph k7t3p4_state_7 7 3 + refine ⟨k7t3p4_local_7_paths, ?_⟩ + rw [k7t3p4_local_7_eq] + exact k7t3p4_local_7_bad + +private theorem k7t3p4_update_7 : k7t3p4_step_7.apply k7t3p4_state_7 = k7t3p4_state_8 := by + have h : ∀ i j : Fin 7, k7t3p4_step_7.apply k7t3p4_state_7 i j = k7t3p4_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p4_state_9 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, {0, 1}, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 1 4, {0, 1}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {1}], + #[Finset.Icc 1 4, {1}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p4_local_8 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, {0, 1}, {1}, {3, 4, 5}, ∅], + #[Finset.Icc 1 5, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 0 5, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 1 4, {0, 1}, {1, 2, 3}, ∅, {1, 2}, {2, 3, 5}, {1}], + #[Finset.Icc 1 4, {1}, Finset.Icc 0 5, {1, 2}, ∅, {1, 2}, {1}], + #[{1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, {1}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p4_local_8_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p4_state_8 a b ∪ requiredMatrix 7 k7t3p4_step_8_data.required a b) 0 j = k7t3p4_local_8 0 j := by decide + +private theorem k7t3p4_local_8_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p4_state_8 a b ∪ requiredMatrix 7 k7t3p4_step_8_data.required a b) 1 j = k7t3p4_local_8 1 j := by decide + +private theorem k7t3p4_local_8_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p4_state_8 a b ∪ requiredMatrix 7 k7t3p4_step_8_data.required a b) 2 j = k7t3p4_local_8 2 j := by decide + +private theorem k7t3p4_local_8_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p4_state_8 a b ∪ requiredMatrix 7 k7t3p4_step_8_data.required a b) 3 j = k7t3p4_local_8 3 j := by decide + +private theorem k7t3p4_local_8_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p4_state_8 a b ∪ requiredMatrix 7 k7t3p4_step_8_data.required a b) 4 j = k7t3p4_local_8 4 j := by decide + +private theorem k7t3p4_local_8_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p4_state_8 a b ∪ requiredMatrix 7 k7t3p4_step_8_data.required a b) 5 j = k7t3p4_local_8 5 j := by decide + +private theorem k7t3p4_local_8_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p4_state_8 a b ∪ requiredMatrix 7 k7t3p4_step_8_data.required a b) 6 j = k7t3p4_local_8 6 j := by decide + +private theorem k7t3p4_local_8_eq : (fun a b => k7t3p4_state_8 a b ∪ requiredMatrix 7 k7t3p4_step_8_data.required a b) = k7t3p4_local_8 := by + funext i j + fin_cases i + + · exact k7t3p4_local_8_eq_row_0 j + + · exact k7t3p4_local_8_eq_row_1 j + + · exact k7t3p4_local_8_eq_row_2 j + + · exact k7t3p4_local_8_eq_row_3 j + + · exact k7t3p4_local_8_eq_row_4 j + + · exact k7t3p4_local_8_eq_row_5 j + + · exact k7t3p4_local_8_eq_row_6 j + +private theorem k7t3p4_local_8_paths : ∀ p ∈ k7t3p4_step_8_data.required, p.Check (addedEdgeGraph k7t3p4.graph k7t3p4_step_8_data.i k7t3p4_step_8_data.j) 7 := by decide + +private theorem k7t3p4_local_8_bad : k7t3p4_step_8_data.bad.Check (addedEdgeGraph k7t3p4.graph k7t3p4_step_8_data.i k7t3p4_step_8_data.j) k7t3p4_local_8 7 3 := by decide + +private theorem k7t3p4_step_8_check : k7t3p4_step_8.Check k7t3p4.graph k7t3p4_state_8 7 3 := by + change k7t3p4_step_8_data.Check k7t3p4.graph k7t3p4_state_8 7 3 + refine ⟨k7t3p4_local_8_paths, ?_⟩ + rw [k7t3p4_local_8_eq] + exact k7t3p4_local_8_bad + +private theorem k7t3p4_update_8 : k7t3p4_step_8.apply k7t3p4_state_8 = k7t3p4_state_9 := by + have h : ∀ i j : Fin 7, k7t3p4_step_8.apply k7t3p4_state_8 i j = k7t3p4_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p4_state_10 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, {0, 1}, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 1 4, {0, 1}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {1}], + #[Finset.Icc 1 4, {1}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}, {0}], + #[{1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, {0}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p4_local_9 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5, {1}], + #[{1}, ∅, {1, 2}, {0, 1}, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, Finset.Icc 1 4, {3, 4, 5}], + #[Finset.Icc 1 4, {0, 1}, {1, 2}, ∅, {1, 2}, Finset.Icc 0 5, {1}], + #[Finset.Icc 1 4, {1}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}, ∅], + #[Finset.Icc 1 5, {3, 4, 5}, Finset.Icc 1 4, Finset.Icc 0 5, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p4_local_9_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p4_state_9 a b ∪ requiredMatrix 7 k7t3p4_step_9_data.required a b) 0 j = k7t3p4_local_9 0 j := by decide + +private theorem k7t3p4_local_9_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p4_state_9 a b ∪ requiredMatrix 7 k7t3p4_step_9_data.required a b) 1 j = k7t3p4_local_9 1 j := by decide + +private theorem k7t3p4_local_9_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p4_state_9 a b ∪ requiredMatrix 7 k7t3p4_step_9_data.required a b) 2 j = k7t3p4_local_9 2 j := by decide + +private theorem k7t3p4_local_9_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p4_state_9 a b ∪ requiredMatrix 7 k7t3p4_step_9_data.required a b) 3 j = k7t3p4_local_9 3 j := by decide + +private theorem k7t3p4_local_9_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p4_state_9 a b ∪ requiredMatrix 7 k7t3p4_step_9_data.required a b) 4 j = k7t3p4_local_9 4 j := by decide + +private theorem k7t3p4_local_9_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p4_state_9 a b ∪ requiredMatrix 7 k7t3p4_step_9_data.required a b) 5 j = k7t3p4_local_9 5 j := by decide + +private theorem k7t3p4_local_9_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p4_state_9 a b ∪ requiredMatrix 7 k7t3p4_step_9_data.required a b) 6 j = k7t3p4_local_9 6 j := by decide + +private theorem k7t3p4_local_9_eq : (fun a b => k7t3p4_state_9 a b ∪ requiredMatrix 7 k7t3p4_step_9_data.required a b) = k7t3p4_local_9 := by + funext i j + fin_cases i + + · exact k7t3p4_local_9_eq_row_0 j + + · exact k7t3p4_local_9_eq_row_1 j + + · exact k7t3p4_local_9_eq_row_2 j + + · exact k7t3p4_local_9_eq_row_3 j + + · exact k7t3p4_local_9_eq_row_4 j + + · exact k7t3p4_local_9_eq_row_5 j + + · exact k7t3p4_local_9_eq_row_6 j + +private theorem k7t3p4_local_9_paths : ∀ p ∈ k7t3p4_step_9_data.required, p.Check (addedEdgeGraph k7t3p4.graph k7t3p4_step_9_data.i k7t3p4_step_9_data.j) 7 := by decide + +private theorem k7t3p4_local_9_bad : k7t3p4_step_9_data.bad.Check (addedEdgeGraph k7t3p4.graph k7t3p4_step_9_data.i k7t3p4_step_9_data.j) k7t3p4_local_9 7 3 := by decide + +private theorem k7t3p4_step_9_check : k7t3p4_step_9.Check k7t3p4.graph k7t3p4_state_9 7 3 := by + change k7t3p4_step_9_data.Check k7t3p4.graph k7t3p4_state_9 7 3 + refine ⟨k7t3p4_local_9_paths, ?_⟩ + rw [k7t3p4_local_9_eq] + exact k7t3p4_local_9_bad + +private theorem k7t3p4_update_9 : k7t3p4_step_9.apply k7t3p4_state_9 = k7t3p4_state_10 := by + have h : ∀ i j : Fin 7, k7t3p4_step_9.apply k7t3p4_state_9 i j = k7t3p4_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p4_state_11 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, {0, 1}, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 1 4, {0, 1}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {1}], + #[Finset.Icc 1 4, {1}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}, {0, 1}], + #[{1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, {0, 1}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p4_local_10 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, {0}, ∅, {0, 1}, ∅], + #[{0, 1, 2}, ∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 0 5, {1}], + #[∅, {1}, ∅, {1, 2}, {0, 1}, {1}, {1, 3, 4, 5}, ∅], + #[∅, {1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[{0}, Finset.Icc 1 4, {0, 1}, {1, 2}, ∅, {1, 2}, {0, 1, 2, 3, 5}, {1}], + #[∅, Finset.Icc 1 4, {1}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}, {0}], + #[{0, 1}, Finset.Icc 0 5, {1, 3, 4, 5}, {1, 3, 4}, {0, 1, 2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[∅, {1}, ∅, {3, 4, 5}, {1}, {0}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p4_local_10_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_10 a b ∪ requiredMatrix 7 k7t3p4_step_10_data.required a b) 0 j = k7t3p4_local_10 0 j := by decide + +private theorem k7t3p4_local_10_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_10 a b ∪ requiredMatrix 7 k7t3p4_step_10_data.required a b) 1 j = k7t3p4_local_10 1 j := by decide + +private theorem k7t3p4_local_10_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_10 a b ∪ requiredMatrix 7 k7t3p4_step_10_data.required a b) 2 j = k7t3p4_local_10 2 j := by decide + +private theorem k7t3p4_local_10_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_10 a b ∪ requiredMatrix 7 k7t3p4_step_10_data.required a b) 3 j = k7t3p4_local_10 3 j := by decide + +private theorem k7t3p4_local_10_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_10 a b ∪ requiredMatrix 7 k7t3p4_step_10_data.required a b) 4 j = k7t3p4_local_10 4 j := by decide + +private theorem k7t3p4_local_10_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_10 a b ∪ requiredMatrix 7 k7t3p4_step_10_data.required a b) 5 j = k7t3p4_local_10 5 j := by decide + +private theorem k7t3p4_local_10_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_10 a b ∪ requiredMatrix 7 k7t3p4_step_10_data.required a b) 6 j = k7t3p4_local_10 6 j := by decide + +private theorem k7t3p4_local_10_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p4_state_10 a b ∪ requiredMatrix 7 k7t3p4_step_10_data.required a b) 7 j = k7t3p4_local_10 7 j := by decide + +private theorem k7t3p4_local_10_eq : (fun a b => freshMatrix k7t3p4_state_10 a b ∪ requiredMatrix 7 k7t3p4_step_10_data.required a b) = k7t3p4_local_10 := by + funext i j + fin_cases i + + · exact k7t3p4_local_10_eq_row_0 j + + · exact k7t3p4_local_10_eq_row_1 j + + · exact k7t3p4_local_10_eq_row_2 j + + · exact k7t3p4_local_10_eq_row_3 j + + · exact k7t3p4_local_10_eq_row_4 j + + · exact k7t3p4_local_10_eq_row_5 j + + · exact k7t3p4_local_10_eq_row_6 j + + · exact k7t3p4_local_10_eq_row_7 j + +private theorem k7t3p4_local_10_paths : ∀ p ∈ k7t3p4_step_10_data.required, p.Check (freshGraph k7t3p4.graph k7t3p4_step_10_data.i k7t3p4_step_10_data.j) 7 := by decide + +private theorem k7t3p4_local_10_bad : k7t3p4_step_10_data.bad.Check (freshGraph k7t3p4.graph k7t3p4_step_10_data.i k7t3p4_step_10_data.j) k7t3p4_local_10 7 3 := by decide + +private theorem k7t3p4_step_10_check : k7t3p4_step_10.Check k7t3p4.graph k7t3p4_state_10 7 3 := by + change k7t3p4_step_10_data.Check k7t3p4.graph k7t3p4_state_10 7 3 + refine ⟨by decide, k7t3p4_local_10_paths, ?_⟩ + rw [k7t3p4_local_10_eq] + exact k7t3p4_local_10_bad + +private theorem k7t3p4_update_10 : k7t3p4_step_10.apply k7t3p4_state_10 = k7t3p4_state_11 := by + have h : ∀ i j : Fin 7, k7t3p4_step_10.apply k7t3p4_state_10 i j = k7t3p4_state_11 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p4_state_12 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 0 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, {0, 1}, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 0 4, {0, 1}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {1}], + #[Finset.Icc 1 4, {1}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}, {0, 1}], + #[{1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, {0, 1}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p4_local_11 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, {0, 1}, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {0, 1, 2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 1 4, {0, 1}, {1, 2}, ∅, {1, 2, 3}, {0, 2, 3, 5}, {1}], + #[Finset.Icc 1 4, {1}, {0, 1, 2, 3, 5}, {1, 2, 3}, ∅, {1, 2}, {0, 1}], + #[{1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, {0, 1}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p4_local_11_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p4_state_11 a b ∪ requiredMatrix 7 k7t3p4_step_11_data.required a b) 0 j = k7t3p4_local_11 0 j := by decide + +private theorem k7t3p4_local_11_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p4_state_11 a b ∪ requiredMatrix 7 k7t3p4_step_11_data.required a b) 1 j = k7t3p4_local_11 1 j := by decide + +private theorem k7t3p4_local_11_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p4_state_11 a b ∪ requiredMatrix 7 k7t3p4_step_11_data.required a b) 2 j = k7t3p4_local_11 2 j := by decide + +private theorem k7t3p4_local_11_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p4_state_11 a b ∪ requiredMatrix 7 k7t3p4_step_11_data.required a b) 3 j = k7t3p4_local_11 3 j := by decide + +private theorem k7t3p4_local_11_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p4_state_11 a b ∪ requiredMatrix 7 k7t3p4_step_11_data.required a b) 4 j = k7t3p4_local_11 4 j := by decide + +private theorem k7t3p4_local_11_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p4_state_11 a b ∪ requiredMatrix 7 k7t3p4_step_11_data.required a b) 5 j = k7t3p4_local_11 5 j := by decide + +private theorem k7t3p4_local_11_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p4_state_11 a b ∪ requiredMatrix 7 k7t3p4_step_11_data.required a b) 6 j = k7t3p4_local_11 6 j := by decide + +private theorem k7t3p4_local_11_eq : (fun a b => k7t3p4_state_11 a b ∪ requiredMatrix 7 k7t3p4_step_11_data.required a b) = k7t3p4_local_11 := by + funext i j + fin_cases i + + · exact k7t3p4_local_11_eq_row_0 j + + · exact k7t3p4_local_11_eq_row_1 j + + · exact k7t3p4_local_11_eq_row_2 j + + · exact k7t3p4_local_11_eq_row_3 j + + · exact k7t3p4_local_11_eq_row_4 j + + · exact k7t3p4_local_11_eq_row_5 j + + · exact k7t3p4_local_11_eq_row_6 j + +private theorem k7t3p4_local_11_paths : ∀ p ∈ k7t3p4_step_11_data.required, p.Check (addedEdgeGraph k7t3p4.graph k7t3p4_step_11_data.i k7t3p4_step_11_data.j) 7 := by decide + +private theorem k7t3p4_local_11_bad : k7t3p4_step_11_data.bad.Check (addedEdgeGraph k7t3p4.graph k7t3p4_step_11_data.i k7t3p4_step_11_data.j) k7t3p4_local_11 7 3 := by decide + +private theorem k7t3p4_step_11_check : k7t3p4_step_11.Check k7t3p4.graph k7t3p4_state_11 7 3 := by + change k7t3p4_step_11_data.Check k7t3p4.graph k7t3p4_state_11 7 3 + refine ⟨k7t3p4_local_11_paths, ?_⟩ + rw [k7t3p4_local_11_eq] + exact k7t3p4_local_11_bad + +private theorem k7t3p4_update_11 : k7t3p4_step_11.apply k7t3p4_state_11 = k7t3p4_state_12 := by + have h : ∀ i j : Fin 7, k7t3p4_step_11.apply k7t3p4_state_11 i j = k7t3p4_state_12 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p4_state_13 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, {0, 1}, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 0 4, {0, 1}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {1}], + #[Finset.Icc 0 4, {1}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}, {0, 1}], + #[{1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, {0, 1}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p4_local_12 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 0 4, Finset.Icc 1 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, {0, 1}, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 0 4, {0, 1}, {1, 2}, ∅, {1, 2, 3}, {0, 1, 2, 3, 5}, {1}], + #[Finset.Icc 1 4, {1}, {0, 2, 3, 5}, {1, 2, 3}, ∅, {1, 2}, {0, 1}], + #[{1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {0, 1, 2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, {0, 1}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p4_local_12_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p4_state_12 a b ∪ requiredMatrix 7 k7t3p4_step_12_data.required a b) 0 j = k7t3p4_local_12 0 j := by decide + +private theorem k7t3p4_local_12_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p4_state_12 a b ∪ requiredMatrix 7 k7t3p4_step_12_data.required a b) 1 j = k7t3p4_local_12 1 j := by decide + +private theorem k7t3p4_local_12_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p4_state_12 a b ∪ requiredMatrix 7 k7t3p4_step_12_data.required a b) 2 j = k7t3p4_local_12 2 j := by decide + +private theorem k7t3p4_local_12_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p4_state_12 a b ∪ requiredMatrix 7 k7t3p4_step_12_data.required a b) 3 j = k7t3p4_local_12 3 j := by decide + +private theorem k7t3p4_local_12_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p4_state_12 a b ∪ requiredMatrix 7 k7t3p4_step_12_data.required a b) 4 j = k7t3p4_local_12 4 j := by decide + +private theorem k7t3p4_local_12_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p4_state_12 a b ∪ requiredMatrix 7 k7t3p4_step_12_data.required a b) 5 j = k7t3p4_local_12 5 j := by decide + +private theorem k7t3p4_local_12_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p4_state_12 a b ∪ requiredMatrix 7 k7t3p4_step_12_data.required a b) 6 j = k7t3p4_local_12 6 j := by decide + +private theorem k7t3p4_local_12_eq : (fun a b => k7t3p4_state_12 a b ∪ requiredMatrix 7 k7t3p4_step_12_data.required a b) = k7t3p4_local_12 := by + funext i j + fin_cases i + + · exact k7t3p4_local_12_eq_row_0 j + + · exact k7t3p4_local_12_eq_row_1 j + + · exact k7t3p4_local_12_eq_row_2 j + + · exact k7t3p4_local_12_eq_row_3 j + + · exact k7t3p4_local_12_eq_row_4 j + + · exact k7t3p4_local_12_eq_row_5 j + + · exact k7t3p4_local_12_eq_row_6 j + +private theorem k7t3p4_local_12_paths : ∀ p ∈ k7t3p4_step_12_data.required, p.Check (addedEdgeGraph k7t3p4.graph k7t3p4_step_12_data.i k7t3p4_step_12_data.j) 7 := by decide + +private theorem k7t3p4_local_12_bad : k7t3p4_step_12_data.bad.Check (addedEdgeGraph k7t3p4.graph k7t3p4_step_12_data.i k7t3p4_step_12_data.j) k7t3p4_local_12 7 3 := by decide + +private theorem k7t3p4_step_12_check : k7t3p4_step_12.Check k7t3p4.graph k7t3p4_state_12 7 3 := by + change k7t3p4_step_12_data.Check k7t3p4.graph k7t3p4_state_12 7 3 + refine ⟨k7t3p4_local_12_paths, ?_⟩ + rw [k7t3p4_local_12_eq] + exact k7t3p4_local_12_bad + +private theorem k7t3p4_update_12 : k7t3p4_step_12.apply k7t3p4_state_12 = k7t3p4_state_13 := by + have h : ∀ i j : Fin 7, k7t3p4_step_12.apply k7t3p4_state_12 i j = k7t3p4_state_13 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p4_state_14 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, {1, 2, 4, 5}, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, {0, 1}, {1}, {3, 4, 5}, ∅], + #[{1, 2, 4, 5}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 0 4, {0, 1}, {1, 2}, ∅, {1, 2}, {0, 2, 3, 5}, {0, 1}], + #[Finset.Icc 0 4, {1}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}, {0, 1}], + #[{1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {0, 1}, {0, 1}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p4_local_13 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1}, Finset.Icc 1 5, Finset.Icc 0 5, Finset.Icc 0 4, {1, 2, 4, 5}, {1}], + #[{1}, ∅, {1, 2}, {0, 1}, {1}, {3, 4, 5}, ∅], + #[Finset.Icc 1 5, {1, 2}, ∅, Finset.Icc 1 4, {0, 2, 3, 5}, {1, 3, 4}, {3, 4, 5}], + #[Finset.Icc 0 5, {0, 1}, Finset.Icc 1 4, ∅, {1, 2}, {0, 2, 3, 5}, {1}], + #[Finset.Icc 0 4, {1}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}, {0, 1}], + #[{1, 2, 4, 5}, {3, 4, 5}, {1, 3, 4}, {0, 2, 3, 5}, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, {3, 4, 5}, {1}, {0, 1}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p4_local_13_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p4_state_13 a b ∪ requiredMatrix 7 k7t3p4_step_13_data.required a b) 0 j = k7t3p4_local_13 0 j := by decide + +private theorem k7t3p4_local_13_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p4_state_13 a b ∪ requiredMatrix 7 k7t3p4_step_13_data.required a b) 1 j = k7t3p4_local_13 1 j := by decide + +private theorem k7t3p4_local_13_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p4_state_13 a b ∪ requiredMatrix 7 k7t3p4_step_13_data.required a b) 2 j = k7t3p4_local_13 2 j := by decide + +private theorem k7t3p4_local_13_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p4_state_13 a b ∪ requiredMatrix 7 k7t3p4_step_13_data.required a b) 3 j = k7t3p4_local_13 3 j := by decide + +private theorem k7t3p4_local_13_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p4_state_13 a b ∪ requiredMatrix 7 k7t3p4_step_13_data.required a b) 4 j = k7t3p4_local_13 4 j := by decide + +private theorem k7t3p4_local_13_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p4_state_13 a b ∪ requiredMatrix 7 k7t3p4_step_13_data.required a b) 5 j = k7t3p4_local_13 5 j := by decide + +private theorem k7t3p4_local_13_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p4_state_13 a b ∪ requiredMatrix 7 k7t3p4_step_13_data.required a b) 6 j = k7t3p4_local_13 6 j := by decide + +private theorem k7t3p4_local_13_eq : (fun a b => k7t3p4_state_13 a b ∪ requiredMatrix 7 k7t3p4_step_13_data.required a b) = k7t3p4_local_13 := by + funext i j + fin_cases i + + · exact k7t3p4_local_13_eq_row_0 j + + · exact k7t3p4_local_13_eq_row_1 j + + · exact k7t3p4_local_13_eq_row_2 j + + · exact k7t3p4_local_13_eq_row_3 j + + · exact k7t3p4_local_13_eq_row_4 j + + · exact k7t3p4_local_13_eq_row_5 j + + · exact k7t3p4_local_13_eq_row_6 j + +private theorem k7t3p4_local_13_paths : ∀ p ∈ k7t3p4_step_13_data.required, p.Check (addedEdgeGraph k7t3p4.graph k7t3p4_step_13_data.i k7t3p4_step_13_data.j) 7 := by decide + +private theorem k7t3p4_local_13_bad : k7t3p4_step_13_data.bad.Check (addedEdgeGraph k7t3p4.graph k7t3p4_step_13_data.i k7t3p4_step_13_data.j) k7t3p4_local_13 7 3 := by decide + +private theorem k7t3p4_step_13_check : k7t3p4_step_13.Check k7t3p4.graph k7t3p4_state_13 7 3 := by + change k7t3p4_step_13_data.Check k7t3p4.graph k7t3p4_state_13 7 3 + refine ⟨k7t3p4_local_13_paths, ?_⟩ + rw [k7t3p4_local_13_eq] + exact k7t3p4_local_13_bad + +private theorem k7t3p4_update_13 : k7t3p4_step_13.apply k7t3p4_state_13 = k7t3p4_state_14 := by + have h : ∀ i j : Fin 7, k7t3p4_step_13.apply k7t3p4_state_13 i j = k7t3p4_state_14 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k7t3p4_closure_14 : ClosureCheck k7t3p4.graph k7t3p4_state_14 7 3 [] := by trivial + +private theorem k7t3p4_closure_13 : ClosureCheck k7t3p4.graph k7t3p4_state_13 7 3 [k7t3p4_step_13] := by + constructor + · exact k7t3p4_step_13_check + · rw [k7t3p4_update_13] + exact k7t3p4_closure_14 + +private theorem k7t3p4_closure_12 : ClosureCheck k7t3p4.graph k7t3p4_state_12 7 3 [k7t3p4_step_12, k7t3p4_step_13] := by + constructor + · exact k7t3p4_step_12_check + · rw [k7t3p4_update_12] + exact k7t3p4_closure_13 + +private theorem k7t3p4_closure_11 : ClosureCheck k7t3p4.graph k7t3p4_state_11 7 3 [k7t3p4_step_11, k7t3p4_step_12, k7t3p4_step_13] := by + constructor + · exact k7t3p4_step_11_check + · rw [k7t3p4_update_11] + exact k7t3p4_closure_12 + +private theorem k7t3p4_closure_10 : ClosureCheck k7t3p4.graph k7t3p4_state_10 7 3 [k7t3p4_step_10, k7t3p4_step_11, k7t3p4_step_12, k7t3p4_step_13] := by + constructor + · exact k7t3p4_step_10_check + · rw [k7t3p4_update_10] + exact k7t3p4_closure_11 + +private theorem k7t3p4_closure_9 : ClosureCheck k7t3p4.graph k7t3p4_state_9 7 3 [k7t3p4_step_9, k7t3p4_step_10, k7t3p4_step_11, k7t3p4_step_12, k7t3p4_step_13] := by + constructor + · exact k7t3p4_step_9_check + · rw [k7t3p4_update_9] + exact k7t3p4_closure_10 + +private theorem k7t3p4_closure_8 : ClosureCheck k7t3p4.graph k7t3p4_state_8 7 3 [k7t3p4_step_8, k7t3p4_step_9, k7t3p4_step_10, k7t3p4_step_11, k7t3p4_step_12, k7t3p4_step_13] := by + constructor + · exact k7t3p4_step_8_check + · rw [k7t3p4_update_8] + exact k7t3p4_closure_9 + +private theorem k7t3p4_closure_7 : ClosureCheck k7t3p4.graph k7t3p4_state_7 7 3 [k7t3p4_step_7, k7t3p4_step_8, k7t3p4_step_9, k7t3p4_step_10, k7t3p4_step_11, k7t3p4_step_12, k7t3p4_step_13] := by + constructor + · exact k7t3p4_step_7_check + · rw [k7t3p4_update_7] + exact k7t3p4_closure_8 + +private theorem k7t3p4_closure_6 : ClosureCheck k7t3p4.graph k7t3p4_state_6 7 3 [k7t3p4_step_6, k7t3p4_step_7, k7t3p4_step_8, k7t3p4_step_9, k7t3p4_step_10, k7t3p4_step_11, k7t3p4_step_12, k7t3p4_step_13] := by + constructor + · exact k7t3p4_step_6_check + · rw [k7t3p4_update_6] + exact k7t3p4_closure_7 + +private theorem k7t3p4_closure_5 : ClosureCheck k7t3p4.graph k7t3p4_state_5 7 3 [k7t3p4_step_5, k7t3p4_step_6, k7t3p4_step_7, k7t3p4_step_8, k7t3p4_step_9, k7t3p4_step_10, k7t3p4_step_11, k7t3p4_step_12, k7t3p4_step_13] := by + constructor + · exact k7t3p4_step_5_check + · rw [k7t3p4_update_5] + exact k7t3p4_closure_6 + +private theorem k7t3p4_closure_4 : ClosureCheck k7t3p4.graph k7t3p4_state_4 7 3 [k7t3p4_step_4, k7t3p4_step_5, k7t3p4_step_6, k7t3p4_step_7, k7t3p4_step_8, k7t3p4_step_9, k7t3p4_step_10, k7t3p4_step_11, k7t3p4_step_12, k7t3p4_step_13] := by + constructor + · exact k7t3p4_step_4_check + · rw [k7t3p4_update_4] + exact k7t3p4_closure_5 + +private theorem k7t3p4_closure_3 : ClosureCheck k7t3p4.graph k7t3p4_state_3 7 3 [k7t3p4_step_3, k7t3p4_step_4, k7t3p4_step_5, k7t3p4_step_6, k7t3p4_step_7, k7t3p4_step_8, k7t3p4_step_9, k7t3p4_step_10, k7t3p4_step_11, k7t3p4_step_12, k7t3p4_step_13] := by + constructor + · exact k7t3p4_step_3_check + · rw [k7t3p4_update_3] + exact k7t3p4_closure_4 + +private theorem k7t3p4_closure_2 : ClosureCheck k7t3p4.graph k7t3p4_state_2 7 3 [k7t3p4_step_2, k7t3p4_step_3, k7t3p4_step_4, k7t3p4_step_5, k7t3p4_step_6, k7t3p4_step_7, k7t3p4_step_8, k7t3p4_step_9, k7t3p4_step_10, k7t3p4_step_11, k7t3p4_step_12, k7t3p4_step_13] := by + constructor + · exact k7t3p4_step_2_check + · rw [k7t3p4_update_2] + exact k7t3p4_closure_3 + +private theorem k7t3p4_closure_1 : ClosureCheck k7t3p4.graph k7t3p4_state_1 7 3 [k7t3p4_step_1, k7t3p4_step_2, k7t3p4_step_3, k7t3p4_step_4, k7t3p4_step_5, k7t3p4_step_6, k7t3p4_step_7, k7t3p4_step_8, k7t3p4_step_9, k7t3p4_step_10, k7t3p4_step_11, k7t3p4_step_12, k7t3p4_step_13] := by + constructor + · exact k7t3p4_step_1_check + · rw [k7t3p4_update_1] + exact k7t3p4_closure_2 + +private theorem k7t3p4_closure_0 : ClosureCheck k7t3p4.graph k7t3p4_state_0 7 3 [k7t3p4_step_0, k7t3p4_step_1, k7t3p4_step_2, k7t3p4_step_3, k7t3p4_step_4, k7t3p4_step_5, k7t3p4_step_6, k7t3p4_step_7, k7t3p4_step_8, k7t3p4_step_9, k7t3p4_step_10, k7t3p4_step_11, k7t3p4_step_12, k7t3p4_step_13] := by + constructor + · exact k7t3p4_step_0_check + · rw [k7t3p4_update_0] + exact k7t3p4_closure_1 + +private theorem k7t3p4_matrix_eq : k7t3p4.matrix 7 = k7t3p4_state_14 := by + change closureMatrix (k7t3p4.initialMatrix 7) _ = _ + rw [k7t3p4_initial_eq] + change closureMatrix k7t3p4_state_0 [k7t3p4_step_0, k7t3p4_step_1, k7t3p4_step_2, k7t3p4_step_3, k7t3p4_step_4, k7t3p4_step_5, k7t3p4_step_6, k7t3p4_step_7, k7t3p4_step_8, k7t3p4_step_9, k7t3p4_step_10, k7t3p4_step_11, k7t3p4_step_12, k7t3p4_step_13] = _ + simp only [closureMatrix] + rw [k7t3p4_update_0, k7t3p4_update_1, k7t3p4_update_2, k7t3p4_update_3, k7t3p4_update_4, k7t3p4_update_5, k7t3p4_update_6, k7t3p4_update_7, k7t3p4_update_8, k7t3p4_update_9, k7t3p4_update_10, k7t3p4_update_11, k7t3p4_update_12, k7t3p4_update_13] + +private theorem k7t3p4_part_0 : k7t3p4.chains.flatten = List.finRange _ := by decide + +private theorem k7t3p4_part_1 : k7t3p4.chains.map List.length = ([[], [4]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t3p4_part_2 : k7t3p4.chains.map (fun l => l.map (fun i => decide (i ∈ k7t3p4.clique))) = ([[], [4]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t3p4_templates_item_0 : (⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 1⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_1 : (⟨0, 2, [], [], [1], 4, 5⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_2 : (⟨0, 2, [], [], [3, 4, 5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_3 : (⟨0, 3, [], [], [2, 1], 3, 4⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_4 : (⟨0, 3, [], [], [4, 5, 6], 2, 3⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_5 : (⟨0, 4, [], [], [3, 2, 1], 2, 3⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_6 : (⟨0, 4, [], [], [5, 6], 3, 4⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_7 : (⟨0, 5, [], [], [4, 3, 2, 1], 1, 2⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_8 : (⟨0, 5, [], [], [6], 4, 5⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_9 : (⟨0, 6, [], [], [5, 4, 3, 2, 1], 1, 1⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_10 : (⟨1, 2, [], [], [3, 4, 5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_11 : (⟨1, 5, [], [], [6], 4, 5⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_12 : (⟨2, 3, [], [1], [4, 5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_13 : (⟨2, 4, [], [1], [5, 6], 2, 3⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_14 : (⟨2, 5, [], [1], [6], 3, 4⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_15 : (⟨2, 6, [], [1], [], 4, 5⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_16 : (⟨3, 4, [], [1, 2], [5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_17 : (⟨3, 5, [], [1, 2], [6], 2, 3⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_18 : (⟨4, 5, [], [1, 2, 3], [6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_templates_item_19 : (⟨5, 6, [], [1, 2, 3, 4], [], 1, 2⟩ : TemplateData (Fin 7)).Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p4_part_3 : ∀ T ∈ k7t3p4.templates, T.Check k7t3p4.graph k7t3p4.clique 7 (patternAmount ([[], [4]] : List (List ℕ))) (([[], [4]] : List (List ℕ)).map List.length).sum := by + simp only [k7t3p4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p4_templates_item_0, k7t3p4_templates_item_1, k7t3p4_templates_item_2, k7t3p4_templates_item_3, k7t3p4_templates_item_4, k7t3p4_templates_item_5, k7t3p4_templates_item_6, k7t3p4_templates_item_7, k7t3p4_templates_item_8, k7t3p4_templates_item_9, k7t3p4_templates_item_10, k7t3p4_templates_item_11, k7t3p4_templates_item_12, k7t3p4_templates_item_13, k7t3p4_templates_item_14, k7t3p4_templates_item_15, k7t3p4_templates_item_16, k7t3p4_templates_item_17, k7t3p4_templates_item_18, k7t3p4_templates_item_19⟩ + +private theorem k7t3p4_required_item_0 : (⟨1, 5, [2, 3, 4]⟩ : RequiredPathData (Fin 7)).Check k7t3p4.graph 7 := by decide + +private theorem k7t3p4_required_item_1 : (⟨2, 4, [3]⟩ : RequiredPathData (Fin 7)).Check k7t3p4.graph 7 := by decide + +private theorem k7t3p4_required_item_2 : (⟨2, 6, [3, 4, 5]⟩ : RequiredPathData (Fin 7)).Check k7t3p4.graph 7 := by decide + +private theorem k7t3p4_required_item_3 : (⟨3, 5, [4]⟩ : RequiredPathData (Fin 7)).Check k7t3p4.graph 7 := by decide + +private theorem k7t3p4_part_4 : ∀ p ∈ k7t3p4.required, p.Check k7t3p4.graph 7 := by + simp only [k7t3p4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p4_required_item_0, k7t3p4_required_item_1, k7t3p4_required_item_2, k7t3p4_required_item_3⟩ + +private theorem k7t3p4_part_5 : ClosureCheck k7t3p4.graph (k7t3p4.initialMatrix 7) 7 3 k7t3p4.closure := by + rw [k7t3p4_initial_eq] + exact k7t3p4_closure_0 + +private theorem k7t3p4_part_6 : k7t3p4.bad.Check k7t3p4.graph (k7t3p4.matrix 7) 7 3 := by + rw [k7t3p4_matrix_eq] + decide + +theorem k7t3p4_check : k7t3p4.Check 7 3 [[], [4]] := + ⟨k7t3p4_part_0, k7t3p4_part_1, k7t3p4_part_2, k7t3p4_part_3, k7t3p4_part_4, k7t3p4_part_5, k7t3p4_part_6⟩ +def k7t3p5 : LayoutCertificate 5 where + chains := [[0, 1, 2, 3, 4]] + clique := {0, 2, 4} + templates := [⟨0, 1, [], [], [2], 1, 5⟩, + ⟨0, 3, [], [], [2], 1, 5⟩, + ⟨1, 2, [], [0], [], 1, 5⟩, + ⟨1, 3, [], [0], [2], 1, 4⟩, + ⟨1, 4, [], [0], [], 1, 5⟩, + ⟨2, 3, [], [], [4], 1, 5⟩, + ⟨3, 4, [], [2], [], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 2), (3, 2), (0, 2)}⟩ + + +private def k7t3p5_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5], + #[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p5_initial_eq_row_0 : ∀ j : Fin 5, (k7t3p5.initialMatrix 7) 0 j = k7t3p5_state_0 0 j := by decide + +private theorem k7t3p5_initial_eq_row_1 : ∀ j : Fin 5, (k7t3p5.initialMatrix 7) 1 j = k7t3p5_state_0 1 j := by decide + +private theorem k7t3p5_initial_eq_row_2 : ∀ j : Fin 5, (k7t3p5.initialMatrix 7) 2 j = k7t3p5_state_0 2 j := by decide + +private theorem k7t3p5_initial_eq_row_3 : ∀ j : Fin 5, (k7t3p5.initialMatrix 7) 3 j = k7t3p5_state_0 3 j := by decide + +private theorem k7t3p5_initial_eq_row_4 : ∀ j : Fin 5, (k7t3p5.initialMatrix 7) 4 j = k7t3p5_state_0 4 j := by decide + +private theorem k7t3p5_initial_eq : (k7t3p5.initialMatrix 7) = k7t3p5_state_0 := by + funext i j + fin_cases i + + · exact k7t3p5_initial_eq_row_0 j + + · exact k7t3p5_initial_eq_row_1 j + + · exact k7t3p5_initial_eq_row_2 j + + · exact k7t3p5_initial_eq_row_3 j + + · exact k7t3p5_initial_eq_row_4 j + +private theorem k7t3p5_closure_0 : ClosureCheck k7t3p5.graph k7t3p5_state_0 7 3 [] := by trivial + +private theorem k7t3p5_matrix_eq : k7t3p5.matrix 7 = k7t3p5_state_0 := by + change closureMatrix (k7t3p5.initialMatrix 7) _ = _ + rw [k7t3p5_initial_eq] + change closureMatrix k7t3p5_state_0 [] = _ + rfl + +private theorem k7t3p5_part_0 : k7t3p5.chains.flatten = List.finRange _ := by decide + +private theorem k7t3p5_part_1 : k7t3p5.chains.map List.length = ([[1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t3p5_part_2 : k7t3p5.chains.map (fun l => l.map (fun i => decide (i ∈ k7t3p5.clique))) = ([[1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t3p5_templates_item_0 : (⟨0, 1, [], [], [2], 1, 5⟩ : TemplateData (Fin 5)).Check k7t3p5.graph k7t3p5.clique 7 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p5_templates_item_1 : (⟨0, 3, [], [], [2], 1, 5⟩ : TemplateData (Fin 5)).Check k7t3p5.graph k7t3p5.clique 7 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p5_templates_item_2 : (⟨1, 2, [], [0], [], 1, 5⟩ : TemplateData (Fin 5)).Check k7t3p5.graph k7t3p5.clique 7 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p5_templates_item_3 : (⟨1, 3, [], [0], [2], 1, 4⟩ : TemplateData (Fin 5)).Check k7t3p5.graph k7t3p5.clique 7 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p5_templates_item_4 : (⟨1, 4, [], [0], [], 1, 5⟩ : TemplateData (Fin 5)).Check k7t3p5.graph k7t3p5.clique 7 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p5_templates_item_5 : (⟨2, 3, [], [], [4], 1, 5⟩ : TemplateData (Fin 5)).Check k7t3p5.graph k7t3p5.clique 7 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p5_templates_item_6 : (⟨3, 4, [], [2], [], 1, 5⟩ : TemplateData (Fin 5)).Check k7t3p5.graph k7t3p5.clique 7 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p5_part_3 : ∀ T ∈ k7t3p5.templates, T.Check k7t3p5.graph k7t3p5.clique 7 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k7t3p5, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p5_templates_item_0, k7t3p5_templates_item_1, k7t3p5_templates_item_2, k7t3p5_templates_item_3, k7t3p5_templates_item_4, k7t3p5_templates_item_5, k7t3p5_templates_item_6⟩ + +private theorem k7t3p5_part_4 : ∀ p ∈ k7t3p5.required, p.Check k7t3p5.graph 7 := by decide + +private theorem k7t3p5_part_5 : ClosureCheck k7t3p5.graph (k7t3p5.initialMatrix 7) 7 3 k7t3p5.closure := by + rw [k7t3p5_initial_eq] + exact k7t3p5_closure_0 + +private theorem k7t3p5_part_6 : k7t3p5.bad.Check k7t3p5.graph (k7t3p5.matrix 7) 7 3 := by + rw [k7t3p5_matrix_eq] + decide + +theorem k7t3p5_check : k7t3p5.Check 7 3 [[1, 1]] := + ⟨k7t3p5_part_0, k7t3p5_part_1, k7t3p5_part_2, k7t3p5_part_3, k7t3p5_part_4, k7t3p5_part_5, k7t3p5_part_6⟩ +def k7t3p6 : LayoutCertificate 6 where + chains := [[0, 1, 2, 3, 4, 5]] + clique := {0, 2, 5} + templates := [⟨0, 1, [], [], [2], 2, 5⟩, + ⟨0, 1, [], [], [2, 3, 4, 5], 1, 2⟩, + ⟨0, 3, [], [], [2], 2, 5⟩, + ⟨0, 3, [], [], [4, 5], 1, 4⟩, + ⟨0, 4, [], [], [3, 2], 1, 4⟩, + ⟨1, 2, [], [0], [3, 4, 5], 1, 2⟩, + ⟨1, 3, [], [0], [2], 1, 4⟩, + ⟨1, 4, [], [0], [3, 2], 1, 3⟩, + ⟨1, 4, [], [0], [5], 1, 4⟩, + ⟨1, 5, [], [0], [4, 3, 2], 1, 2⟩, + ⟨2, 3, [], [], [4, 5], 1, 4⟩, + ⟨3, 4, [], [2], [5], 1, 4⟩, + ⟨4, 5, [], [2, 3], [], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 2), (0, 2), (3, 2), (4, 2)}⟩ + + +private def k7t3p6_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 5, ∅, {1, 2}, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2}], + #[∅, {1, 2}, ∅, Finset.Icc 1 4, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2}, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p6_initial_eq_row_0 : ∀ j : Fin 6, (k7t3p6.initialMatrix 7) 0 j = k7t3p6_state_0 0 j := by decide + +private theorem k7t3p6_initial_eq_row_1 : ∀ j : Fin 6, (k7t3p6.initialMatrix 7) 1 j = k7t3p6_state_0 1 j := by decide + +private theorem k7t3p6_initial_eq_row_2 : ∀ j : Fin 6, (k7t3p6.initialMatrix 7) 2 j = k7t3p6_state_0 2 j := by decide + +private theorem k7t3p6_initial_eq_row_3 : ∀ j : Fin 6, (k7t3p6.initialMatrix 7) 3 j = k7t3p6_state_0 3 j := by decide + +private theorem k7t3p6_initial_eq_row_4 : ∀ j : Fin 6, (k7t3p6.initialMatrix 7) 4 j = k7t3p6_state_0 4 j := by decide + +private theorem k7t3p6_initial_eq_row_5 : ∀ j : Fin 6, (k7t3p6.initialMatrix 7) 5 j = k7t3p6_state_0 5 j := by decide + +private theorem k7t3p6_initial_eq : (k7t3p6.initialMatrix 7) = k7t3p6_state_0 := by + funext i j + fin_cases i + + · exact k7t3p6_initial_eq_row_0 j + + · exact k7t3p6_initial_eq_row_1 j + + · exact k7t3p6_initial_eq_row_2 j + + · exact k7t3p6_initial_eq_row_3 j + + · exact k7t3p6_initial_eq_row_4 j + + · exact k7t3p6_initial_eq_row_5 j + +private theorem k7t3p6_closure_0 : ClosureCheck k7t3p6.graph k7t3p6_state_0 7 3 [] := by trivial + +private theorem k7t3p6_matrix_eq : k7t3p6.matrix 7 = k7t3p6_state_0 := by + change closureMatrix (k7t3p6.initialMatrix 7) _ = _ + rw [k7t3p6_initial_eq] + change closureMatrix k7t3p6_state_0 [] = _ + rfl + +private theorem k7t3p6_part_0 : k7t3p6.chains.flatten = List.finRange _ := by decide + +private theorem k7t3p6_part_1 : k7t3p6.chains.map List.length = ([[1, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t3p6_part_2 : k7t3p6.chains.map (fun l => l.map (fun i => decide (i ∈ k7t3p6.clique))) = ([[1, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t3p6_templates_item_0 : (⟨0, 1, [], [], [2], 2, 5⟩ : TemplateData (Fin 6)).Check k7t3p6.graph k7t3p6.clique 7 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p6_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5], 1, 2⟩ : TemplateData (Fin 6)).Check k7t3p6.graph k7t3p6.clique 7 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p6_templates_item_2 : (⟨0, 3, [], [], [2], 2, 5⟩ : TemplateData (Fin 6)).Check k7t3p6.graph k7t3p6.clique 7 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p6_templates_item_3 : (⟨0, 3, [], [], [4, 5], 1, 4⟩ : TemplateData (Fin 6)).Check k7t3p6.graph k7t3p6.clique 7 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p6_templates_item_4 : (⟨0, 4, [], [], [3, 2], 1, 4⟩ : TemplateData (Fin 6)).Check k7t3p6.graph k7t3p6.clique 7 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p6_templates_item_5 : (⟨1, 2, [], [0], [3, 4, 5], 1, 2⟩ : TemplateData (Fin 6)).Check k7t3p6.graph k7t3p6.clique 7 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p6_templates_item_6 : (⟨1, 3, [], [0], [2], 1, 4⟩ : TemplateData (Fin 6)).Check k7t3p6.graph k7t3p6.clique 7 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p6_templates_item_7 : (⟨1, 4, [], [0], [3, 2], 1, 3⟩ : TemplateData (Fin 6)).Check k7t3p6.graph k7t3p6.clique 7 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p6_templates_item_8 : (⟨1, 4, [], [0], [5], 1, 4⟩ : TemplateData (Fin 6)).Check k7t3p6.graph k7t3p6.clique 7 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p6_templates_item_9 : (⟨1, 5, [], [0], [4, 3, 2], 1, 2⟩ : TemplateData (Fin 6)).Check k7t3p6.graph k7t3p6.clique 7 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p6_templates_item_10 : (⟨2, 3, [], [], [4, 5], 1, 4⟩ : TemplateData (Fin 6)).Check k7t3p6.graph k7t3p6.clique 7 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p6_templates_item_11 : (⟨3, 4, [], [2], [5], 1, 4⟩ : TemplateData (Fin 6)).Check k7t3p6.graph k7t3p6.clique 7 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p6_templates_item_12 : (⟨4, 5, [], [2, 3], [], 1, 4⟩ : TemplateData (Fin 6)).Check k7t3p6.graph k7t3p6.clique 7 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p6_part_3 : ∀ T ∈ k7t3p6.templates, T.Check k7t3p6.graph k7t3p6.clique 7 (patternAmount ([[1, 2]] : List (List ℕ))) (([[1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k7t3p6, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p6_templates_item_0, k7t3p6_templates_item_1, k7t3p6_templates_item_2, k7t3p6_templates_item_3, k7t3p6_templates_item_4, k7t3p6_templates_item_5, k7t3p6_templates_item_6, k7t3p6_templates_item_7, k7t3p6_templates_item_8, k7t3p6_templates_item_9, k7t3p6_templates_item_10, k7t3p6_templates_item_11, k7t3p6_templates_item_12⟩ + +private theorem k7t3p6_part_4 : ∀ p ∈ k7t3p6.required, p.Check k7t3p6.graph 7 := by decide + +private theorem k7t3p6_part_5 : ClosureCheck k7t3p6.graph (k7t3p6.initialMatrix 7) 7 3 k7t3p6.closure := by + rw [k7t3p6_initial_eq] + exact k7t3p6_closure_0 + +private theorem k7t3p6_part_6 : k7t3p6.bad.Check k7t3p6.graph (k7t3p6.matrix 7) 7 3 := by + rw [k7t3p6_matrix_eq] + decide + +theorem k7t3p6_check : k7t3p6.Check 7 3 [[1, 2]] := + ⟨k7t3p6_part_0, k7t3p6_part_1, k7t3p6_part_2, k7t3p6_part_3, k7t3p6_part_4, k7t3p6_part_5, k7t3p6_part_6⟩ +private def k7t3p7_step_0_data : EdgeAttachmentData 7 := ⟨3, 1, [⟨1, 3, []⟩, ⟨1, 0, [3, 4, 5, 6]⟩, ⟨1, 2, [3, 4, 5, 6]⟩, ⟨2, 3, [0, 1]⟩, ⟨2, 5, [0, 1, 3, 4]⟩, ⟨2, 6, [0, 1, 3, 4, 5]⟩, ⟨2, 3, [1]⟩, ⟨2, 6, [1, 3, 4, 5]⟩, ⟨2, 0, [1, 3, 4, 5, 6]⟩, ⟨2, 4, [3, 1, 0, 6, 5]⟩, ⟨2, 5, [6, 0, 1, 3, 4]⟩, ⟨2, 1, [6, 5, 4, 3]⟩], ⟨none, {(1, 3), (2, 3), (3, 3)}⟩⟩ + +private def k7t3p7_step_0 : ClosureStep 7 := .edge k7t3p7_step_0_data + +private def k7t3p7_step_1_data : EdgeAttachmentData 7 := ⟨4, 0, [⟨0, 1, [4, 5, 6, 2]⟩, ⟨1, 2, [0, 4, 5, 6]⟩, ⟨1, 0, [2, 6, 5, 4]⟩, ⟨3, 6, [2, 1, 0, 4, 5]⟩, ⟨3, 5, [4, 0, 1, 2, 6]⟩], ⟨none, {(1, 3), (3, 2), (0, 3)}⟩⟩ + +private def k7t3p7_step_1 : ClosureStep 7 := .edge k7t3p7_step_1_data + +private def k7t3p7_step_2_data : FreshAttachmentData 7 := ⟨4, 0, [⟨2, 0, [1, 3, 4, 5]⟩, ⟨2, 0, [1, 3, 7, 6, 5]⟩, ⟨2, 6, [1, 0, 5, 4, 3, 7]⟩, ⟨2, 4, [1, 0, 5, 6, 7, 3]⟩, ⟨2, 0, [3, 1]⟩, ⟨2, 0, [3, 4, 5, 6, 7, 1]⟩, ⟨2, 0, [3, 4, 5]⟩, ⟨4, 0, [3, 1, 7, 6, 5]⟩, ⟨4, 0, [3, 1]⟩, ⟨4, 7, [3, 1, 0, 5, 6]⟩, ⟨4, 0, [3, 2, 1, 7, 6, 5]⟩, ⟨4, 0, [3, 2, 1]⟩, ⟨4, 6, [3, 2, 1, 0, 5]⟩, ⟨4, 7, [3, 2, 1, 0, 5, 6]⟩, ⟨4, 0, [3, 7, 6, 5]⟩, ⟨4, 2, [3, 7, 6, 5, 0, 1]⟩, ⟨4, 6, [5, 0, 1, 2, 3, 7]⟩, ⟨0, 6, [1, 2, 3, 4, 5]⟩, ⟨0, 7, [1, 2, 3, 4, 5, 6]⟩, ⟨0, 5, [1, 2, 3, 7, 6]⟩, ⟨0, 4, [1, 2, 3, 7, 6, 5]⟩, ⟨0, 7, [1, 3, 4, 5, 6]⟩, ⟨0, 4, [1, 3, 7, 6, 5]⟩, ⟨0, 3, [1, 7, 6, 5, 4]⟩, ⟨0, 2, [1, 7, 6, 5, 4, 3]⟩, ⟨0, 6, [5, 4, 3, 2, 1, 7]⟩, ⟨0, 2, [5, 4, 3, 7, 1]⟩, ⟨0, 1, [5, 6, 7, 3, 2]⟩], ⟨none, {(2, 2), (4, 2), (0, 2)}⟩⟩ + +private def k7t3p7_step_2 : ClosureStep 7 := .fresh k7t3p7_step_2_data + +private def k7t3p7_step_3_data : EdgeAttachmentData 7 := ⟨4, 1, [⟨0, 1, [2, 6, 5, 4]⟩, ⟨1, 0, [4, 3, 2, 6]⟩, ⟨1, 2, [4, 5, 6, 0]⟩, ⟨3, 6, [2, 0, 1, 4, 5]⟩, ⟨3, 5, [2, 6, 0, 1, 4]⟩], ⟨none, {(1, 3), (3, 2), (0, 3)}⟩⟩ + +private def k7t3p7_step_3 : ClosureStep 7 := .edge k7t3p7_step_3_data + +private def k7t3p7_step_4_data : EdgeAttachmentData 7 := ⟨4, 2, [⟨0, 1, [6, 5, 4, 2]⟩, ⟨1, 2, [0, 6, 5, 4]⟩, ⟨1, 0, [2, 4, 5, 6]⟩, ⟨3, 5, [4, 2, 1, 0, 6]⟩], ⟨none, {(1, 3), (0, 3), (3, 2)}⟩⟩ + +private def k7t3p7_step_4 : ClosureStep 7 := .edge k7t3p7_step_4_data + +private def k7t3p7_step_5_data : FreshAttachmentData 7 := ⟨4, 2, [⟨2, 0, [1, 7, 6, 5, 4, 3]⟩, ⟨2, 4, [1, 7, 6, 5, 0, 3]⟩, ⟨4, 0, [3, 1, 7, 6, 5]⟩, ⟨4, 0, [3, 2, 1, 7, 6, 5]⟩, ⟨4, 2, [3, 0, 5, 6, 7, 1]⟩, ⟨4, 6, [5, 0, 3, 1, 7]⟩, ⟨4, 7, [5, 0, 3, 2, 1]⟩, ⟨4, 6, [5, 0, 3, 2, 1, 7]⟩, ⟨6, 0, [7, 1, 2, 3, 4, 5]⟩, ⟨6, 0, [7, 1, 2, 3]⟩, ⟨6, 4, [7, 1, 2, 3, 0, 5]⟩, ⟨6, 0, [7, 1, 3, 4, 5]⟩, ⟨6, 4, [7, 1, 3, 0, 5]⟩], ⟨none, {(4, 2), (6, 3), (2, 1), (5, 0)}⟩⟩ + +private def k7t3p7_step_5 : ClosureStep 7 := .fresh k7t3p7_step_5_data + +private def k7t3p7_step_6_data : EdgeAttachmentData 7 := ⟨5, 1, [⟨0, 4, [1, 5, 6, 2, 3]⟩, ⟨0, 6, [2, 1, 5]⟩, ⟨0, 1, [2, 3, 4, 5]⟩, ⟨3, 6, [4, 5, 1, 0, 2]⟩, ⟨6, 3, [0, 1, 5, 4]⟩, ⟨6, 2, [0, 1, 5, 4, 3]⟩, ⟨6, 3, [0, 2, 1, 5, 4]⟩, ⟨6, 4, [5, 1, 0, 2, 3]⟩], ⟨none, {(0, 3), (1, 2), (6, 2), (3, 2)}⟩⟩ + +private def k7t3p7_step_6 : ClosureStep 7 := .edge k7t3p7_step_6_data + +private def k7t3p7_step_7_data : EdgeAttachmentData 7 := ⟨5, 3, [⟨0, 4, [1, 2, 6, 5, 3]⟩, ⟨0, 6, [2, 3, 5]⟩, ⟨0, 1, [6, 5, 3, 2]⟩, ⟨1, 2, [0, 6, 5, 3]⟩, ⟨1, 0, [2, 3, 5, 6]⟩, ⟨6, 4, [0, 1, 2, 3, 5]⟩], ⟨none, {(1, 3), (0, 3), (6, 2)}⟩⟩ + +private def k7t3p7_step_7 : ClosureStep 7 := .edge k7t3p7_step_7_data + +private def k7t3p7_step_8_data : EdgeAttachmentData 7 := ⟨6, 4, [⟨0, 1, [6, 4, 3, 2]⟩, ⟨1, 2, [0, 6, 4, 3]⟩, ⟨1, 0, [2, 3, 4, 6]⟩, ⟨3, 5, [2, 1, 0, 6, 4]⟩], ⟨none, {(1, 3), (0, 3), (3, 2)}⟩⟩ + +private def k7t3p7_step_8 : ClosureStep 7 := .edge k7t3p7_step_8_data + +private def k7t3p7_step_9_data : FreshAttachmentData 7 := ⟨6, 4, [⟨2, 0, [1, 3, 4, 5, 6, 7]⟩, ⟨2, 6, [1, 3, 4, 5, 0, 7]⟩, ⟨2, 0, [1, 3, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 7, 6, 5]⟩, ⟨4, 6, [3, 1, 7, 0, 5]⟩, ⟨4, 0, [3, 2, 1, 7, 6, 5]⟩, ⟨4, 0, [3, 2, 1, 7]⟩, ⟨4, 6, [3, 2, 1, 7, 0, 5]⟩, ⟨6, 0, [5, 4, 3, 1, 7]⟩, ⟨6, 0, [5, 4, 3, 2, 1, 7]⟩, ⟨6, 3, [5, 0, 7, 1, 2]⟩, ⟨6, 4, [5, 0, 7, 1, 2, 3]⟩, ⟨6, 4, [5, 0, 7, 1, 3]⟩, ⟨6, 2, [7, 0, 5, 4, 3, 1]⟩, ⟨6, 1, [7, 0, 5, 4, 3, 2]⟩], ⟨none, {(4, 3), (6, 2), (2, 2)}⟩⟩ + +private def k7t3p7_step_9 : ClosureStep 7 := .fresh k7t3p7_step_9_data + +def k7t3p7 : LayoutCertificate 7 where + chains := [[0, 1, 2, 3, 4, 5, 6]] + clique := {0, 2, 6} + templates := [⟨0, 1, [], [], [2], 3, 5⟩, + ⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 1⟩, + ⟨0, 2, [], [], [3, 4, 5, 6], 2, 2⟩, + ⟨0, 3, [], [], [2], 3, 5⟩, + ⟨0, 3, [], [], [4, 5, 6], 1, 3⟩, + ⟨0, 4, [], [], [3, 2], 2, 4⟩, + ⟨0, 5, [], [], [4, 3, 2], 1, 3⟩, + ⟨0, 6, [], [], [], 4, 6⟩, + ⟨0, 6, [], [], [5, 4, 3, 2], 2, 2⟩, + ⟨1, 2, [], [0], [], 3, 5⟩, + ⟨1, 2, [], [0], [3, 4, 5, 6], 1, 1⟩, + ⟨1, 3, [], [0], [2], 2, 4⟩, + ⟨1, 3, [], [0], [4, 5, 6], 1, 2⟩, + ⟨1, 4, [], [0], [3, 2], 1, 3⟩, + ⟨1, 5, [], [0], [4, 3, 2], 1, 2⟩, + ⟨1, 5, [], [0], [6], 2, 4⟩, + ⟨1, 6, [], [0], [], 3, 5⟩, + ⟨1, 6, [], [0], [5, 4, 3, 2], 1, 1⟩, + ⟨2, 3, [], [], [4, 5, 6], 1, 3⟩, + ⟨2, 4, [], [], [5, 6], 2, 4⟩, + ⟨3, 4, [], [2], [5, 6], 1, 3⟩, + ⟨3, 5, [], [2], [6], 2, 4⟩, + ⟨3, 6, [], [2], [], 3, 5⟩, + ⟨4, 5, [], [2, 3], [6], 1, 3⟩, + ⟨5, 6, [], [2, 3, 4], [], 1, 3⟩] + required := [⟨0, 1, []⟩, + ⟨0, 6, [1, 2, 3, 4, 5]⟩, + ⟨1, 2, []⟩, + ⟨1, 3, [2]⟩, + ⟨1, 4, [2, 3]⟩, + ⟨1, 6, [2, 3, 4, 5]⟩, + ⟨2, 3, []⟩, + ⟨3, 5, [4]⟩] + closure := [k7t3p7_step_0, k7t3p7_step_1, k7t3p7_step_2, k7t3p7_step_3, k7t3p7_step_4, k7t3p7_step_5, k7t3p7_step_6, k7t3p7_step_7, k7t3p7_step_8, k7t3p7_step_9] + bad := ⟨none, {(4, 2), (1, 2), (3, 1)}⟩ + + +private def k7t3p7_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2}, Finset.Icc 1 5, {2, 3, 4}, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{2}, {1, 3, 4, 5, 6}, ∅, {1, 2, 3, 6}, {2, 3, 4}, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 2 5, {3, 4, 5}], + #[{2, 3, 4}, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{1, 2, 3}, Finset.Icc 1 4, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p7_initial_eq_row_0 : ∀ j : Fin 7, (k7t3p7.initialMatrix 7) 0 j = k7t3p7_state_0 0 j := by decide + +private theorem k7t3p7_initial_eq_row_1 : ∀ j : Fin 7, (k7t3p7.initialMatrix 7) 1 j = k7t3p7_state_0 1 j := by decide + +private theorem k7t3p7_initial_eq_row_2 : ∀ j : Fin 7, (k7t3p7.initialMatrix 7) 2 j = k7t3p7_state_0 2 j := by decide + +private theorem k7t3p7_initial_eq_row_3 : ∀ j : Fin 7, (k7t3p7.initialMatrix 7) 3 j = k7t3p7_state_0 3 j := by decide + +private theorem k7t3p7_initial_eq_row_4 : ∀ j : Fin 7, (k7t3p7.initialMatrix 7) 4 j = k7t3p7_state_0 4 j := by decide + +private theorem k7t3p7_initial_eq_row_5 : ∀ j : Fin 7, (k7t3p7.initialMatrix 7) 5 j = k7t3p7_state_0 5 j := by decide + +private theorem k7t3p7_initial_eq_row_6 : ∀ j : Fin 7, (k7t3p7.initialMatrix 7) 6 j = k7t3p7_state_0 6 j := by decide + +private theorem k7t3p7_initial_eq : (k7t3p7.initialMatrix 7) = k7t3p7_state_0 := by + funext i j + fin_cases i + + · exact k7t3p7_initial_eq_row_0 j + + · exact k7t3p7_initial_eq_row_1 j + + · exact k7t3p7_initial_eq_row_2 j + + · exact k7t3p7_initial_eq_row_3 j + + · exact k7t3p7_initial_eq_row_4 j + + · exact k7t3p7_initial_eq_row_5 j + + · exact k7t3p7_initial_eq_row_6 j + +private def k7t3p7_state_1 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2}, Finset.Icc 1 5, {2, 3, 4}, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{2}, {1, 3, 4, 5, 6}, ∅, {1, 2, 3, 6}, {2, 3, 4}, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 2 5, {3, 4, 5}], + #[{2, 3, 4}, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{1, 2, 3}, Finset.Icc 1 4, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p7_local_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {1, 2}, Finset.Icc 1 5, {2, 3, 4}, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{1, 2}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 4, {1, 2}, {1, 2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, ∅, {1, 2, 3}, Finset.Icc 2 5, {3, 4, 5}], + #[{2, 3, 4}, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{1, 2, 3}, Finset.Icc 1 4, {1, 2}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, {1, 2}, {3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p7_local_0_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p7_state_0 a b ∪ requiredMatrix 7 k7t3p7_step_0_data.required a b) 0 j = k7t3p7_local_0 0 j := by decide + +private theorem k7t3p7_local_0_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p7_state_0 a b ∪ requiredMatrix 7 k7t3p7_step_0_data.required a b) 1 j = k7t3p7_local_0 1 j := by decide + +private theorem k7t3p7_local_0_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p7_state_0 a b ∪ requiredMatrix 7 k7t3p7_step_0_data.required a b) 2 j = k7t3p7_local_0 2 j := by decide + +private theorem k7t3p7_local_0_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p7_state_0 a b ∪ requiredMatrix 7 k7t3p7_step_0_data.required a b) 3 j = k7t3p7_local_0 3 j := by decide + +private theorem k7t3p7_local_0_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p7_state_0 a b ∪ requiredMatrix 7 k7t3p7_step_0_data.required a b) 4 j = k7t3p7_local_0 4 j := by decide + +private theorem k7t3p7_local_0_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p7_state_0 a b ∪ requiredMatrix 7 k7t3p7_step_0_data.required a b) 5 j = k7t3p7_local_0 5 j := by decide + +private theorem k7t3p7_local_0_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p7_state_0 a b ∪ requiredMatrix 7 k7t3p7_step_0_data.required a b) 6 j = k7t3p7_local_0 6 j := by decide + +private theorem k7t3p7_local_0_eq : (fun a b => k7t3p7_state_0 a b ∪ requiredMatrix 7 k7t3p7_step_0_data.required a b) = k7t3p7_local_0 := by + funext i j + fin_cases i + + · exact k7t3p7_local_0_eq_row_0 j + + · exact k7t3p7_local_0_eq_row_1 j + + · exact k7t3p7_local_0_eq_row_2 j + + · exact k7t3p7_local_0_eq_row_3 j + + · exact k7t3p7_local_0_eq_row_4 j + + · exact k7t3p7_local_0_eq_row_5 j + + · exact k7t3p7_local_0_eq_row_6 j + +private theorem k7t3p7_local_0_paths : ∀ p ∈ k7t3p7_step_0_data.required, p.Check (addedEdgeGraph k7t3p7.graph k7t3p7_step_0_data.i k7t3p7_step_0_data.j) 7 := by decide + +private theorem k7t3p7_local_0_bad : k7t3p7_step_0_data.bad.Check (addedEdgeGraph k7t3p7.graph k7t3p7_step_0_data.i k7t3p7_step_0_data.j) k7t3p7_local_0 7 3 := by decide + +private theorem k7t3p7_step_0_check : k7t3p7_step_0.Check k7t3p7.graph k7t3p7_state_0 7 3 := by + change k7t3p7_step_0_data.Check k7t3p7.graph k7t3p7_state_0 7 3 + refine ⟨k7t3p7_local_0_paths, ?_⟩ + rw [k7t3p7_local_0_eq] + exact k7t3p7_local_0_bad + +private theorem k7t3p7_update_0 : k7t3p7_step_0.apply k7t3p7_state_0 = k7t3p7_state_1 := by + have h : ∀ i j : Fin 7, k7t3p7_step_0.apply k7t3p7_state_0 i j = k7t3p7_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p7_state_2 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2}, Finset.Icc 1 5, {0, 2, 3, 4}, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{2}, {1, 3, 4, 5, 6}, ∅, {1, 2, 3, 6}, {2, 3, 4}, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 2 5, {3, 4, 5}], + #[{0, 2, 3, 4}, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{1, 2, 3}, Finset.Icc 1 4, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p7_local_1 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2}, Finset.Icc 1 5, {2, 3, 4}, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{2}, Finset.Icc 1 6, ∅, {1, 2, 3, 6}, {2, 3, 4}, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 1 5, {1, 3, 4, 5}], + #[{2, 3, 4}, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{1, 2, 3}, Finset.Icc 1 4, ∅, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {1, 3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p7_local_1_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p7_state_1 a b ∪ requiredMatrix 7 k7t3p7_step_1_data.required a b) 0 j = k7t3p7_local_1 0 j := by decide + +private theorem k7t3p7_local_1_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p7_state_1 a b ∪ requiredMatrix 7 k7t3p7_step_1_data.required a b) 1 j = k7t3p7_local_1 1 j := by decide + +private theorem k7t3p7_local_1_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p7_state_1 a b ∪ requiredMatrix 7 k7t3p7_step_1_data.required a b) 2 j = k7t3p7_local_1 2 j := by decide + +private theorem k7t3p7_local_1_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p7_state_1 a b ∪ requiredMatrix 7 k7t3p7_step_1_data.required a b) 3 j = k7t3p7_local_1 3 j := by decide + +private theorem k7t3p7_local_1_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p7_state_1 a b ∪ requiredMatrix 7 k7t3p7_step_1_data.required a b) 4 j = k7t3p7_local_1 4 j := by decide + +private theorem k7t3p7_local_1_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p7_state_1 a b ∪ requiredMatrix 7 k7t3p7_step_1_data.required a b) 5 j = k7t3p7_local_1 5 j := by decide + +private theorem k7t3p7_local_1_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p7_state_1 a b ∪ requiredMatrix 7 k7t3p7_step_1_data.required a b) 6 j = k7t3p7_local_1 6 j := by decide + +private theorem k7t3p7_local_1_eq : (fun a b => k7t3p7_state_1 a b ∪ requiredMatrix 7 k7t3p7_step_1_data.required a b) = k7t3p7_local_1 := by + funext i j + fin_cases i + + · exact k7t3p7_local_1_eq_row_0 j + + · exact k7t3p7_local_1_eq_row_1 j + + · exact k7t3p7_local_1_eq_row_2 j + + · exact k7t3p7_local_1_eq_row_3 j + + · exact k7t3p7_local_1_eq_row_4 j + + · exact k7t3p7_local_1_eq_row_5 j + + · exact k7t3p7_local_1_eq_row_6 j + +private theorem k7t3p7_local_1_paths : ∀ p ∈ k7t3p7_step_1_data.required, p.Check (addedEdgeGraph k7t3p7.graph k7t3p7_step_1_data.i k7t3p7_step_1_data.j) 7 := by decide + +private theorem k7t3p7_local_1_bad : k7t3p7_step_1_data.bad.Check (addedEdgeGraph k7t3p7.graph k7t3p7_step_1_data.i k7t3p7_step_1_data.j) k7t3p7_local_1 7 3 := by decide + +private theorem k7t3p7_step_1_check : k7t3p7_step_1.Check k7t3p7.graph k7t3p7_state_1 7 3 := by + change k7t3p7_step_1_data.Check k7t3p7.graph k7t3p7_state_1 7 3 + refine ⟨k7t3p7_local_1_paths, ?_⟩ + rw [k7t3p7_local_1_eq] + exact k7t3p7_local_1_bad + +private theorem k7t3p7_update_1 : k7t3p7_step_1.apply k7t3p7_state_1 = k7t3p7_state_2 := by + have h : ∀ i j : Fin 7, k7t3p7_step_1.apply k7t3p7_state_1 i j = k7t3p7_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p7_state_3 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2}, Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{2}, {1, 3, 4, 5, 6}, ∅, {1, 2, 3, 6}, {2, 3, 4}, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 2 5, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{1, 2, 3}, Finset.Icc 1 4, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p7_local_2 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1}, Finset.Icc 0 4, {1}, Finset.Icc 0 4, {1}, {0, 1}, {0, 1}], + #[{1}, ∅, {1, 3, 4, 5, 6}, {2}, Finset.Icc 1 5, {0, 2, 3, 4}, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[Finset.Icc 0 4, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[{1}, {2}, {1, 3, 4, 5, 6}, ∅, {1, 2, 3, 6}, {2, 3, 4}, ∅, ∅], + #[Finset.Icc 0 4, Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 0 5, {0, 1, 3, 4, 5}], + #[{1}, {0, 2, 3, 4}, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{0, 1}, {1, 2, 3}, Finset.Icc 0 4, ∅, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{0, 1}, {1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {0, 1, 3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p7_local_2_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_2 a b ∪ requiredMatrix 7 k7t3p7_step_2_data.required a b) 0 j = k7t3p7_local_2 0 j := by decide + +private theorem k7t3p7_local_2_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_2 a b ∪ requiredMatrix 7 k7t3p7_step_2_data.required a b) 1 j = k7t3p7_local_2 1 j := by decide + +private theorem k7t3p7_local_2_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_2 a b ∪ requiredMatrix 7 k7t3p7_step_2_data.required a b) 2 j = k7t3p7_local_2 2 j := by decide + +private theorem k7t3p7_local_2_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_2 a b ∪ requiredMatrix 7 k7t3p7_step_2_data.required a b) 3 j = k7t3p7_local_2 3 j := by decide + +private theorem k7t3p7_local_2_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_2 a b ∪ requiredMatrix 7 k7t3p7_step_2_data.required a b) 4 j = k7t3p7_local_2 4 j := by decide + +private theorem k7t3p7_local_2_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_2 a b ∪ requiredMatrix 7 k7t3p7_step_2_data.required a b) 5 j = k7t3p7_local_2 5 j := by decide + +private theorem k7t3p7_local_2_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_2 a b ∪ requiredMatrix 7 k7t3p7_step_2_data.required a b) 6 j = k7t3p7_local_2 6 j := by decide + +private theorem k7t3p7_local_2_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_2 a b ∪ requiredMatrix 7 k7t3p7_step_2_data.required a b) 7 j = k7t3p7_local_2 7 j := by decide + +private theorem k7t3p7_local_2_eq : (fun a b => freshMatrix k7t3p7_state_2 a b ∪ requiredMatrix 7 k7t3p7_step_2_data.required a b) = k7t3p7_local_2 := by + funext i j + fin_cases i + + · exact k7t3p7_local_2_eq_row_0 j + + · exact k7t3p7_local_2_eq_row_1 j + + · exact k7t3p7_local_2_eq_row_2 j + + · exact k7t3p7_local_2_eq_row_3 j + + · exact k7t3p7_local_2_eq_row_4 j + + · exact k7t3p7_local_2_eq_row_5 j + + · exact k7t3p7_local_2_eq_row_6 j + + · exact k7t3p7_local_2_eq_row_7 j + +private theorem k7t3p7_local_2_paths : ∀ p ∈ k7t3p7_step_2_data.required, p.Check (freshGraph k7t3p7.graph k7t3p7_step_2_data.i k7t3p7_step_2_data.j) 7 := by decide + +private theorem k7t3p7_local_2_bad : k7t3p7_step_2_data.bad.Check (freshGraph k7t3p7.graph k7t3p7_step_2_data.i k7t3p7_step_2_data.j) k7t3p7_local_2 7 3 := by decide + +private theorem k7t3p7_step_2_check : k7t3p7_step_2.Check k7t3p7.graph k7t3p7_state_2 7 3 := by + change k7t3p7_step_2_data.Check k7t3p7.graph k7t3p7_state_2 7 3 + refine ⟨by decide, k7t3p7_local_2_paths, ?_⟩ + rw [k7t3p7_local_2_eq] + exact k7t3p7_local_2_bad + +private theorem k7t3p7_update_2 : k7t3p7_step_2.apply k7t3p7_state_2 = k7t3p7_state_3 := by + have h : ∀ i j : Fin 7, k7t3p7_step_2.apply k7t3p7_state_2 i j = k7t3p7_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p7_state_4 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2}, Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{2}, {1, 3, 4, 5, 6}, ∅, {1, 2, 3, 6}, {2, 3, 4}, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 2 5, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{1, 2, 3}, Finset.Icc 1 4, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p7_local_3 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2}, Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{2}, Finset.Icc 1 6, ∅, {1, 2, 3, 6}, {2, 3, 4}, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 1 5, {1, 3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{1, 2, 3}, Finset.Icc 1 4, ∅, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {1, 3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p7_local_3_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p7_state_3 a b ∪ requiredMatrix 7 k7t3p7_step_3_data.required a b) 0 j = k7t3p7_local_3 0 j := by decide + +private theorem k7t3p7_local_3_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p7_state_3 a b ∪ requiredMatrix 7 k7t3p7_step_3_data.required a b) 1 j = k7t3p7_local_3 1 j := by decide + +private theorem k7t3p7_local_3_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p7_state_3 a b ∪ requiredMatrix 7 k7t3p7_step_3_data.required a b) 2 j = k7t3p7_local_3 2 j := by decide + +private theorem k7t3p7_local_3_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p7_state_3 a b ∪ requiredMatrix 7 k7t3p7_step_3_data.required a b) 3 j = k7t3p7_local_3 3 j := by decide + +private theorem k7t3p7_local_3_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p7_state_3 a b ∪ requiredMatrix 7 k7t3p7_step_3_data.required a b) 4 j = k7t3p7_local_3 4 j := by decide + +private theorem k7t3p7_local_3_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p7_state_3 a b ∪ requiredMatrix 7 k7t3p7_step_3_data.required a b) 5 j = k7t3p7_local_3 5 j := by decide + +private theorem k7t3p7_local_3_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p7_state_3 a b ∪ requiredMatrix 7 k7t3p7_step_3_data.required a b) 6 j = k7t3p7_local_3 6 j := by decide + +private theorem k7t3p7_local_3_eq : (fun a b => k7t3p7_state_3 a b ∪ requiredMatrix 7 k7t3p7_step_3_data.required a b) = k7t3p7_local_3 := by + funext i j + fin_cases i + + · exact k7t3p7_local_3_eq_row_0 j + + · exact k7t3p7_local_3_eq_row_1 j + + · exact k7t3p7_local_3_eq_row_2 j + + · exact k7t3p7_local_3_eq_row_3 j + + · exact k7t3p7_local_3_eq_row_4 j + + · exact k7t3p7_local_3_eq_row_5 j + + · exact k7t3p7_local_3_eq_row_6 j + +private theorem k7t3p7_local_3_paths : ∀ p ∈ k7t3p7_step_3_data.required, p.Check (addedEdgeGraph k7t3p7.graph k7t3p7_step_3_data.i k7t3p7_step_3_data.j) 7 := by decide + +private theorem k7t3p7_local_3_bad : k7t3p7_step_3_data.bad.Check (addedEdgeGraph k7t3p7.graph k7t3p7_step_3_data.i k7t3p7_step_3_data.j) k7t3p7_local_3 7 3 := by decide + +private theorem k7t3p7_step_3_check : k7t3p7_step_3.Check k7t3p7.graph k7t3p7_state_3 7 3 := by + change k7t3p7_step_3_data.Check k7t3p7.graph k7t3p7_state_3 7 3 + refine ⟨k7t3p7_local_3_paths, ?_⟩ + rw [k7t3p7_local_3_eq] + exact k7t3p7_local_3_bad + +private theorem k7t3p7_update_3 : k7t3p7_step_3.apply k7t3p7_state_3 = k7t3p7_state_4 := by + have h : ∀ i j : Fin 7, k7t3p7_step_3.apply k7t3p7_state_3 i j = k7t3p7_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p7_state_5 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2}, Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{2}, {1, 3, 4, 5, 6}, ∅, {1, 2, 3, 6}, {0, 2, 3, 4}, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 2 5, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{1, 2, 3}, Finset.Icc 1 4, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p7_local_4 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2}, Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{2}, Finset.Icc 1 6, ∅, {1, 2, 3, 6}, {2, 3, 4}, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 1 5, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{1, 2, 3}, Finset.Icc 1 4, ∅, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p7_local_4_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p7_state_4 a b ∪ requiredMatrix 7 k7t3p7_step_4_data.required a b) 0 j = k7t3p7_local_4 0 j := by decide + +private theorem k7t3p7_local_4_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p7_state_4 a b ∪ requiredMatrix 7 k7t3p7_step_4_data.required a b) 1 j = k7t3p7_local_4 1 j := by decide + +private theorem k7t3p7_local_4_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p7_state_4 a b ∪ requiredMatrix 7 k7t3p7_step_4_data.required a b) 2 j = k7t3p7_local_4 2 j := by decide + +private theorem k7t3p7_local_4_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p7_state_4 a b ∪ requiredMatrix 7 k7t3p7_step_4_data.required a b) 3 j = k7t3p7_local_4 3 j := by decide + +private theorem k7t3p7_local_4_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p7_state_4 a b ∪ requiredMatrix 7 k7t3p7_step_4_data.required a b) 4 j = k7t3p7_local_4 4 j := by decide + +private theorem k7t3p7_local_4_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p7_state_4 a b ∪ requiredMatrix 7 k7t3p7_step_4_data.required a b) 5 j = k7t3p7_local_4 5 j := by decide + +private theorem k7t3p7_local_4_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p7_state_4 a b ∪ requiredMatrix 7 k7t3p7_step_4_data.required a b) 6 j = k7t3p7_local_4 6 j := by decide + +private theorem k7t3p7_local_4_eq : (fun a b => k7t3p7_state_4 a b ∪ requiredMatrix 7 k7t3p7_step_4_data.required a b) = k7t3p7_local_4 := by + funext i j + fin_cases i + + · exact k7t3p7_local_4_eq_row_0 j + + · exact k7t3p7_local_4_eq_row_1 j + + · exact k7t3p7_local_4_eq_row_2 j + + · exact k7t3p7_local_4_eq_row_3 j + + · exact k7t3p7_local_4_eq_row_4 j + + · exact k7t3p7_local_4_eq_row_5 j + + · exact k7t3p7_local_4_eq_row_6 j + +private theorem k7t3p7_local_4_paths : ∀ p ∈ k7t3p7_step_4_data.required, p.Check (addedEdgeGraph k7t3p7.graph k7t3p7_step_4_data.i k7t3p7_step_4_data.j) 7 := by decide + +private theorem k7t3p7_local_4_bad : k7t3p7_step_4_data.bad.Check (addedEdgeGraph k7t3p7.graph k7t3p7_step_4_data.i k7t3p7_step_4_data.j) k7t3p7_local_4 7 3 := by decide + +private theorem k7t3p7_step_4_check : k7t3p7_step_4.Check k7t3p7.graph k7t3p7_state_4 7 3 := by + change k7t3p7_step_4_data.Check k7t3p7.graph k7t3p7_state_4 7 3 + refine ⟨k7t3p7_local_4_paths, ?_⟩ + rw [k7t3p7_local_4_eq] + exact k7t3p7_local_4_bad + +private theorem k7t3p7_update_4 : k7t3p7_step_4.apply k7t3p7_state_4 = k7t3p7_state_5 := by + have h : ∀ i j : Fin 7, k7t3p7_step_4.apply k7t3p7_state_4 i j = k7t3p7_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p7_state_6 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2}, Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{2}, {1, 3, 4, 5, 6}, ∅, {1, 2, 3, 6}, Finset.Icc 0 4, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 2 5, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{1, 2, 3}, Finset.Icc 1 4, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p7_local_5 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, {0}, ∅, {0, 1}, ∅, {0, 1, 2}, ∅], + #[∅, ∅, {1, 3, 4, 5, 6}, {2}, Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{0}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[∅, {2}, {1, 3, 4, 5, 6}, ∅, {1, 2, 3, 6}, {0, 2, 3, 4}, ∅, ∅], + #[{0, 1}, Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 0 5, {1, 3, 4, 5}], + #[∅, Finset.Icc 0 4, Finset.Icc 0 4, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{0, 1, 2}, {1, 2, 3}, Finset.Icc 1 4, ∅, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {1, 3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p7_local_5_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_5 a b ∪ requiredMatrix 7 k7t3p7_step_5_data.required a b) 0 j = k7t3p7_local_5 0 j := by decide + +private theorem k7t3p7_local_5_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_5 a b ∪ requiredMatrix 7 k7t3p7_step_5_data.required a b) 1 j = k7t3p7_local_5 1 j := by decide + +private theorem k7t3p7_local_5_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_5 a b ∪ requiredMatrix 7 k7t3p7_step_5_data.required a b) 2 j = k7t3p7_local_5 2 j := by decide + +private theorem k7t3p7_local_5_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_5 a b ∪ requiredMatrix 7 k7t3p7_step_5_data.required a b) 3 j = k7t3p7_local_5 3 j := by decide + +private theorem k7t3p7_local_5_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_5 a b ∪ requiredMatrix 7 k7t3p7_step_5_data.required a b) 4 j = k7t3p7_local_5 4 j := by decide + +private theorem k7t3p7_local_5_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_5 a b ∪ requiredMatrix 7 k7t3p7_step_5_data.required a b) 5 j = k7t3p7_local_5 5 j := by decide + +private theorem k7t3p7_local_5_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_5 a b ∪ requiredMatrix 7 k7t3p7_step_5_data.required a b) 6 j = k7t3p7_local_5 6 j := by decide + +private theorem k7t3p7_local_5_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_5 a b ∪ requiredMatrix 7 k7t3p7_step_5_data.required a b) 7 j = k7t3p7_local_5 7 j := by decide + +private theorem k7t3p7_local_5_eq : (fun a b => freshMatrix k7t3p7_state_5 a b ∪ requiredMatrix 7 k7t3p7_step_5_data.required a b) = k7t3p7_local_5 := by + funext i j + fin_cases i + + · exact k7t3p7_local_5_eq_row_0 j + + · exact k7t3p7_local_5_eq_row_1 j + + · exact k7t3p7_local_5_eq_row_2 j + + · exact k7t3p7_local_5_eq_row_3 j + + · exact k7t3p7_local_5_eq_row_4 j + + · exact k7t3p7_local_5_eq_row_5 j + + · exact k7t3p7_local_5_eq_row_6 j + + · exact k7t3p7_local_5_eq_row_7 j + +private theorem k7t3p7_local_5_paths : ∀ p ∈ k7t3p7_step_5_data.required, p.Check (freshGraph k7t3p7.graph k7t3p7_step_5_data.i k7t3p7_step_5_data.j) 7 := by decide + +private theorem k7t3p7_local_5_bad : k7t3p7_step_5_data.bad.Check (freshGraph k7t3p7.graph k7t3p7_step_5_data.i k7t3p7_step_5_data.j) k7t3p7_local_5 7 3 := by decide + +private theorem k7t3p7_step_5_check : k7t3p7_step_5.Check k7t3p7.graph k7t3p7_state_5 7 3 := by + change k7t3p7_step_5_data.Check k7t3p7.graph k7t3p7_state_5 7 3 + refine ⟨by decide, k7t3p7_local_5_paths, ?_⟩ + rw [k7t3p7_local_5_eq] + exact k7t3p7_local_5_bad + +private theorem k7t3p7_update_5 : k7t3p7_step_5.apply k7t3p7_state_5 = k7t3p7_state_6 := by + have h : ∀ i j : Fin 7, k7t3p7_step_5.apply k7t3p7_state_5 i j = k7t3p7_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p7_state_7 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2}, Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[{2}, {1, 3, 4, 5, 6}, ∅, {1, 2, 3, 6}, Finset.Icc 0 4, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 2 5, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{1, 2, 3}, Finset.Icc 0 4, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p7_local_6 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2}, Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3}, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[{2}, {1, 3, 4, 5, 6}, ∅, {1, 2, 3, 6}, Finset.Icc 0 4, ∅, {1}], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 2 5, Finset.Icc 1 5], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {1}], + #[{1, 2, 3}, Finset.Icc 1 4, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 6, Finset.Icc 1 5, {1}, Finset.Icc 1 5, {1}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p7_local_6_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p7_state_6 a b ∪ requiredMatrix 7 k7t3p7_step_6_data.required a b) 0 j = k7t3p7_local_6 0 j := by decide + +private theorem k7t3p7_local_6_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p7_state_6 a b ∪ requiredMatrix 7 k7t3p7_step_6_data.required a b) 1 j = k7t3p7_local_6 1 j := by decide + +private theorem k7t3p7_local_6_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p7_state_6 a b ∪ requiredMatrix 7 k7t3p7_step_6_data.required a b) 2 j = k7t3p7_local_6 2 j := by decide + +private theorem k7t3p7_local_6_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p7_state_6 a b ∪ requiredMatrix 7 k7t3p7_step_6_data.required a b) 3 j = k7t3p7_local_6 3 j := by decide + +private theorem k7t3p7_local_6_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p7_state_6 a b ∪ requiredMatrix 7 k7t3p7_step_6_data.required a b) 4 j = k7t3p7_local_6 4 j := by decide + +private theorem k7t3p7_local_6_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p7_state_6 a b ∪ requiredMatrix 7 k7t3p7_step_6_data.required a b) 5 j = k7t3p7_local_6 5 j := by decide + +private theorem k7t3p7_local_6_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p7_state_6 a b ∪ requiredMatrix 7 k7t3p7_step_6_data.required a b) 6 j = k7t3p7_local_6 6 j := by decide + +private theorem k7t3p7_local_6_eq : (fun a b => k7t3p7_state_6 a b ∪ requiredMatrix 7 k7t3p7_step_6_data.required a b) = k7t3p7_local_6 := by + funext i j + fin_cases i + + · exact k7t3p7_local_6_eq_row_0 j + + · exact k7t3p7_local_6_eq_row_1 j + + · exact k7t3p7_local_6_eq_row_2 j + + · exact k7t3p7_local_6_eq_row_3 j + + · exact k7t3p7_local_6_eq_row_4 j + + · exact k7t3p7_local_6_eq_row_5 j + + · exact k7t3p7_local_6_eq_row_6 j + +private theorem k7t3p7_local_6_paths : ∀ p ∈ k7t3p7_step_6_data.required, p.Check (addedEdgeGraph k7t3p7.graph k7t3p7_step_6_data.i k7t3p7_step_6_data.j) 7 := by decide + +private theorem k7t3p7_local_6_bad : k7t3p7_step_6_data.bad.Check (addedEdgeGraph k7t3p7.graph k7t3p7_step_6_data.i k7t3p7_step_6_data.j) k7t3p7_local_6 7 3 := by decide + +private theorem k7t3p7_step_6_check : k7t3p7_step_6.Check k7t3p7.graph k7t3p7_state_6 7 3 := by + change k7t3p7_step_6_data.Check k7t3p7.graph k7t3p7_state_6 7 3 + refine ⟨k7t3p7_local_6_paths, ?_⟩ + rw [k7t3p7_local_6_eq] + exact k7t3p7_local_6_bad + +private theorem k7t3p7_update_6 : k7t3p7_step_6.apply k7t3p7_state_6 = k7t3p7_state_7 := by + have h : ∀ i j : Fin 7, k7t3p7_step_6.apply k7t3p7_state_6 i j = k7t3p7_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p7_state_8 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2}, Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[{2}, {1, 3, 4, 5, 6}, ∅, {1, 2, 3, 6}, Finset.Icc 0 4, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, {0, 2, 3, 4, 5}, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{1, 2, 3}, Finset.Icc 0 4, ∅, {0, 2, 3, 4, 5}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p7_local_7 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2}, Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3}, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[{2}, Finset.Icc 1 6, ∅, {1, 2, 3, 6}, Finset.Icc 0 4, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 2 5, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {1}], + #[{1, 2, 3}, Finset.Icc 0 4, ∅, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 6, Finset.Icc 1 5, ∅, {3, 4, 5}, {1}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p7_local_7_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p7_state_7 a b ∪ requiredMatrix 7 k7t3p7_step_7_data.required a b) 0 j = k7t3p7_local_7 0 j := by decide + +private theorem k7t3p7_local_7_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p7_state_7 a b ∪ requiredMatrix 7 k7t3p7_step_7_data.required a b) 1 j = k7t3p7_local_7 1 j := by decide + +private theorem k7t3p7_local_7_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p7_state_7 a b ∪ requiredMatrix 7 k7t3p7_step_7_data.required a b) 2 j = k7t3p7_local_7 2 j := by decide + +private theorem k7t3p7_local_7_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p7_state_7 a b ∪ requiredMatrix 7 k7t3p7_step_7_data.required a b) 3 j = k7t3p7_local_7 3 j := by decide + +private theorem k7t3p7_local_7_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p7_state_7 a b ∪ requiredMatrix 7 k7t3p7_step_7_data.required a b) 4 j = k7t3p7_local_7 4 j := by decide + +private theorem k7t3p7_local_7_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p7_state_7 a b ∪ requiredMatrix 7 k7t3p7_step_7_data.required a b) 5 j = k7t3p7_local_7 5 j := by decide + +private theorem k7t3p7_local_7_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p7_state_7 a b ∪ requiredMatrix 7 k7t3p7_step_7_data.required a b) 6 j = k7t3p7_local_7 6 j := by decide + +private theorem k7t3p7_local_7_eq : (fun a b => k7t3p7_state_7 a b ∪ requiredMatrix 7 k7t3p7_step_7_data.required a b) = k7t3p7_local_7 := by + funext i j + fin_cases i + + · exact k7t3p7_local_7_eq_row_0 j + + · exact k7t3p7_local_7_eq_row_1 j + + · exact k7t3p7_local_7_eq_row_2 j + + · exact k7t3p7_local_7_eq_row_3 j + + · exact k7t3p7_local_7_eq_row_4 j + + · exact k7t3p7_local_7_eq_row_5 j + + · exact k7t3p7_local_7_eq_row_6 j + +private theorem k7t3p7_local_7_paths : ∀ p ∈ k7t3p7_step_7_data.required, p.Check (addedEdgeGraph k7t3p7.graph k7t3p7_step_7_data.i k7t3p7_step_7_data.j) 7 := by decide + +private theorem k7t3p7_local_7_bad : k7t3p7_step_7_data.bad.Check (addedEdgeGraph k7t3p7.graph k7t3p7_step_7_data.i k7t3p7_step_7_data.j) k7t3p7_local_7 7 3 := by decide + +private theorem k7t3p7_step_7_check : k7t3p7_step_7.Check k7t3p7.graph k7t3p7_state_7 7 3 := by + change k7t3p7_step_7_data.Check k7t3p7.graph k7t3p7_state_7 7 3 + refine ⟨k7t3p7_local_7_paths, ?_⟩ + rw [k7t3p7_local_7_eq] + exact k7t3p7_local_7_bad + +private theorem k7t3p7_update_7 : k7t3p7_step_7.apply k7t3p7_state_7 = k7t3p7_state_8 := by + have h : ∀ i j : Fin 7, k7t3p7_step_7.apply k7t3p7_state_7 i j = k7t3p7_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p7_state_9 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2}, Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[{2}, {1, 3, 4, 5, 6}, ∅, {1, 2, 3, 6}, Finset.Icc 0 4, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, {0, 2, 3, 4, 5}, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {0}], + #[{1, 2, 3}, Finset.Icc 0 4, ∅, {0, 2, 3, 4, 5}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {3, 4, 5}, {0}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p7_local_8 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2}, Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[{2}, Finset.Icc 1 6, ∅, {1, 2, 3, 6}, Finset.Icc 0 4, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 0 5, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{1, 2, 3}, Finset.Icc 0 4, ∅, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {3, 4, 5}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p7_local_8_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p7_state_8 a b ∪ requiredMatrix 7 k7t3p7_step_8_data.required a b) 0 j = k7t3p7_local_8 0 j := by decide + +private theorem k7t3p7_local_8_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p7_state_8 a b ∪ requiredMatrix 7 k7t3p7_step_8_data.required a b) 1 j = k7t3p7_local_8 1 j := by decide + +private theorem k7t3p7_local_8_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p7_state_8 a b ∪ requiredMatrix 7 k7t3p7_step_8_data.required a b) 2 j = k7t3p7_local_8 2 j := by decide + +private theorem k7t3p7_local_8_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p7_state_8 a b ∪ requiredMatrix 7 k7t3p7_step_8_data.required a b) 3 j = k7t3p7_local_8 3 j := by decide + +private theorem k7t3p7_local_8_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p7_state_8 a b ∪ requiredMatrix 7 k7t3p7_step_8_data.required a b) 4 j = k7t3p7_local_8 4 j := by decide + +private theorem k7t3p7_local_8_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p7_state_8 a b ∪ requiredMatrix 7 k7t3p7_step_8_data.required a b) 5 j = k7t3p7_local_8 5 j := by decide + +private theorem k7t3p7_local_8_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p7_state_8 a b ∪ requiredMatrix 7 k7t3p7_step_8_data.required a b) 6 j = k7t3p7_local_8 6 j := by decide + +private theorem k7t3p7_local_8_eq : (fun a b => k7t3p7_state_8 a b ∪ requiredMatrix 7 k7t3p7_step_8_data.required a b) = k7t3p7_local_8 := by + funext i j + fin_cases i + + · exact k7t3p7_local_8_eq_row_0 j + + · exact k7t3p7_local_8_eq_row_1 j + + · exact k7t3p7_local_8_eq_row_2 j + + · exact k7t3p7_local_8_eq_row_3 j + + · exact k7t3p7_local_8_eq_row_4 j + + · exact k7t3p7_local_8_eq_row_5 j + + · exact k7t3p7_local_8_eq_row_6 j + +private theorem k7t3p7_local_8_paths : ∀ p ∈ k7t3p7_step_8_data.required, p.Check (addedEdgeGraph k7t3p7.graph k7t3p7_step_8_data.i k7t3p7_step_8_data.j) 7 := by decide + +private theorem k7t3p7_local_8_bad : k7t3p7_step_8_data.bad.Check (addedEdgeGraph k7t3p7.graph k7t3p7_step_8_data.i k7t3p7_step_8_data.j) k7t3p7_local_8 7 3 := by decide + +private theorem k7t3p7_step_8_check : k7t3p7_step_8.Check k7t3p7.graph k7t3p7_state_8 7 3 := by + change k7t3p7_step_8_data.Check k7t3p7.graph k7t3p7_state_8 7 3 + refine ⟨k7t3p7_local_8_paths, ?_⟩ + rw [k7t3p7_local_8_eq] + exact k7t3p7_local_8_bad + +private theorem k7t3p7_update_8 : k7t3p7_step_8.apply k7t3p7_state_8 = k7t3p7_state_9 := by + have h : ∀ i j : Fin 7, k7t3p7_step_8.apply k7t3p7_state_8 i j = k7t3p7_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p7_state_10 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2}, Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[{2}, {1, 3, 4, 5, 6}, ∅, {1, 2, 3, 6}, Finset.Icc 0 4, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, {0, 2, 3, 4, 5}, {3, 4, 5}], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {0, 1}], + #[{1, 2, 3}, Finset.Icc 0 4, ∅, {0, 2, 3, 4, 5}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {3, 4, 5}, {0, 1}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p7_local_9 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, {0, 1}, ∅, {0, 1, 2}, ∅, {0, 1}, ∅], + #[∅, ∅, {1, 3, 4, 5, 6}, {2}, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 3, {1, 2, 4, 5, 6}], + #[{0, 1}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[∅, {2}, {1, 3, 4, 5, 6}, ∅, {1, 2, 3, 6}, Finset.Icc 0 4, {1}, ∅], + #[{0, 1, 2}, Finset.Icc 1 5, Finset.Icc 0 5, {1, 2, 3, 6}, ∅, {1, 2, 3}, Finset.Icc 0 5, {3, 4, 5}], + #[∅, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {0}], + #[{0, 1}, Finset.Icc 0 3, Finset.Icc 0 4, {1}, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, ∅, {3, 4, 5}, {0}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p7_local_9_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_9 a b ∪ requiredMatrix 7 k7t3p7_step_9_data.required a b) 0 j = k7t3p7_local_9 0 j := by decide + +private theorem k7t3p7_local_9_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_9 a b ∪ requiredMatrix 7 k7t3p7_step_9_data.required a b) 1 j = k7t3p7_local_9 1 j := by decide + +private theorem k7t3p7_local_9_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_9 a b ∪ requiredMatrix 7 k7t3p7_step_9_data.required a b) 2 j = k7t3p7_local_9 2 j := by decide + +private theorem k7t3p7_local_9_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_9 a b ∪ requiredMatrix 7 k7t3p7_step_9_data.required a b) 3 j = k7t3p7_local_9 3 j := by decide + +private theorem k7t3p7_local_9_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_9 a b ∪ requiredMatrix 7 k7t3p7_step_9_data.required a b) 4 j = k7t3p7_local_9 4 j := by decide + +private theorem k7t3p7_local_9_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_9 a b ∪ requiredMatrix 7 k7t3p7_step_9_data.required a b) 5 j = k7t3p7_local_9 5 j := by decide + +private theorem k7t3p7_local_9_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_9 a b ∪ requiredMatrix 7 k7t3p7_step_9_data.required a b) 6 j = k7t3p7_local_9 6 j := by decide + +private theorem k7t3p7_local_9_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p7_state_9 a b ∪ requiredMatrix 7 k7t3p7_step_9_data.required a b) 7 j = k7t3p7_local_9 7 j := by decide + +private theorem k7t3p7_local_9_eq : (fun a b => freshMatrix k7t3p7_state_9 a b ∪ requiredMatrix 7 k7t3p7_step_9_data.required a b) = k7t3p7_local_9 := by + funext i j + fin_cases i + + · exact k7t3p7_local_9_eq_row_0 j + + · exact k7t3p7_local_9_eq_row_1 j + + · exact k7t3p7_local_9_eq_row_2 j + + · exact k7t3p7_local_9_eq_row_3 j + + · exact k7t3p7_local_9_eq_row_4 j + + · exact k7t3p7_local_9_eq_row_5 j + + · exact k7t3p7_local_9_eq_row_6 j + + · exact k7t3p7_local_9_eq_row_7 j + +private theorem k7t3p7_local_9_paths : ∀ p ∈ k7t3p7_step_9_data.required, p.Check (freshGraph k7t3p7.graph k7t3p7_step_9_data.i k7t3p7_step_9_data.j) 7 := by decide + +private theorem k7t3p7_local_9_bad : k7t3p7_step_9_data.bad.Check (freshGraph k7t3p7.graph k7t3p7_step_9_data.i k7t3p7_step_9_data.j) k7t3p7_local_9 7 3 := by decide + +private theorem k7t3p7_step_9_check : k7t3p7_step_9.Check k7t3p7.graph k7t3p7_state_9 7 3 := by + change k7t3p7_step_9_data.Check k7t3p7.graph k7t3p7_state_9 7 3 + refine ⟨by decide, k7t3p7_local_9_paths, ?_⟩ + rw [k7t3p7_local_9_eq] + exact k7t3p7_local_9_bad + +private theorem k7t3p7_update_9 : k7t3p7_step_9.apply k7t3p7_state_9 = k7t3p7_state_10 := by + have h : ∀ i j : Fin 7, k7t3p7_step_9.apply k7t3p7_state_9 i j = k7t3p7_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k7t3p7_closure_10 : ClosureCheck k7t3p7.graph k7t3p7_state_10 7 3 [] := by trivial + +private theorem k7t3p7_closure_9 : ClosureCheck k7t3p7.graph k7t3p7_state_9 7 3 [k7t3p7_step_9] := by + constructor + · exact k7t3p7_step_9_check + · rw [k7t3p7_update_9] + exact k7t3p7_closure_10 + +private theorem k7t3p7_closure_8 : ClosureCheck k7t3p7.graph k7t3p7_state_8 7 3 [k7t3p7_step_8, k7t3p7_step_9] := by + constructor + · exact k7t3p7_step_8_check + · rw [k7t3p7_update_8] + exact k7t3p7_closure_9 + +private theorem k7t3p7_closure_7 : ClosureCheck k7t3p7.graph k7t3p7_state_7 7 3 [k7t3p7_step_7, k7t3p7_step_8, k7t3p7_step_9] := by + constructor + · exact k7t3p7_step_7_check + · rw [k7t3p7_update_7] + exact k7t3p7_closure_8 + +private theorem k7t3p7_closure_6 : ClosureCheck k7t3p7.graph k7t3p7_state_6 7 3 [k7t3p7_step_6, k7t3p7_step_7, k7t3p7_step_8, k7t3p7_step_9] := by + constructor + · exact k7t3p7_step_6_check + · rw [k7t3p7_update_6] + exact k7t3p7_closure_7 + +private theorem k7t3p7_closure_5 : ClosureCheck k7t3p7.graph k7t3p7_state_5 7 3 [k7t3p7_step_5, k7t3p7_step_6, k7t3p7_step_7, k7t3p7_step_8, k7t3p7_step_9] := by + constructor + · exact k7t3p7_step_5_check + · rw [k7t3p7_update_5] + exact k7t3p7_closure_6 + +private theorem k7t3p7_closure_4 : ClosureCheck k7t3p7.graph k7t3p7_state_4 7 3 [k7t3p7_step_4, k7t3p7_step_5, k7t3p7_step_6, k7t3p7_step_7, k7t3p7_step_8, k7t3p7_step_9] := by + constructor + · exact k7t3p7_step_4_check + · rw [k7t3p7_update_4] + exact k7t3p7_closure_5 + +private theorem k7t3p7_closure_3 : ClosureCheck k7t3p7.graph k7t3p7_state_3 7 3 [k7t3p7_step_3, k7t3p7_step_4, k7t3p7_step_5, k7t3p7_step_6, k7t3p7_step_7, k7t3p7_step_8, k7t3p7_step_9] := by + constructor + · exact k7t3p7_step_3_check + · rw [k7t3p7_update_3] + exact k7t3p7_closure_4 + +private theorem k7t3p7_closure_2 : ClosureCheck k7t3p7.graph k7t3p7_state_2 7 3 [k7t3p7_step_2, k7t3p7_step_3, k7t3p7_step_4, k7t3p7_step_5, k7t3p7_step_6, k7t3p7_step_7, k7t3p7_step_8, k7t3p7_step_9] := by + constructor + · exact k7t3p7_step_2_check + · rw [k7t3p7_update_2] + exact k7t3p7_closure_3 + +private theorem k7t3p7_closure_1 : ClosureCheck k7t3p7.graph k7t3p7_state_1 7 3 [k7t3p7_step_1, k7t3p7_step_2, k7t3p7_step_3, k7t3p7_step_4, k7t3p7_step_5, k7t3p7_step_6, k7t3p7_step_7, k7t3p7_step_8, k7t3p7_step_9] := by + constructor + · exact k7t3p7_step_1_check + · rw [k7t3p7_update_1] + exact k7t3p7_closure_2 + +private theorem k7t3p7_closure_0 : ClosureCheck k7t3p7.graph k7t3p7_state_0 7 3 [k7t3p7_step_0, k7t3p7_step_1, k7t3p7_step_2, k7t3p7_step_3, k7t3p7_step_4, k7t3p7_step_5, k7t3p7_step_6, k7t3p7_step_7, k7t3p7_step_8, k7t3p7_step_9] := by + constructor + · exact k7t3p7_step_0_check + · rw [k7t3p7_update_0] + exact k7t3p7_closure_1 + +private theorem k7t3p7_matrix_eq : k7t3p7.matrix 7 = k7t3p7_state_10 := by + change closureMatrix (k7t3p7.initialMatrix 7) _ = _ + rw [k7t3p7_initial_eq] + change closureMatrix k7t3p7_state_0 [k7t3p7_step_0, k7t3p7_step_1, k7t3p7_step_2, k7t3p7_step_3, k7t3p7_step_4, k7t3p7_step_5, k7t3p7_step_6, k7t3p7_step_7, k7t3p7_step_8, k7t3p7_step_9] = _ + simp only [closureMatrix] + rw [k7t3p7_update_0, k7t3p7_update_1, k7t3p7_update_2, k7t3p7_update_3, k7t3p7_update_4, k7t3p7_update_5, k7t3p7_update_6, k7t3p7_update_7, k7t3p7_update_8, k7t3p7_update_9] + +private theorem k7t3p7_part_0 : k7t3p7.chains.flatten = List.finRange _ := by decide + +private theorem k7t3p7_part_1 : k7t3p7.chains.map List.length = ([[1, 3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t3p7_part_2 : k7t3p7.chains.map (fun l => l.map (fun i => decide (i ∈ k7t3p7.clique))) = ([[1, 3]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t3p7_templates_item_0 : (⟨0, 1, [], [], [2], 3, 5⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 1⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_2 : (⟨0, 2, [], [], [3, 4, 5, 6], 2, 2⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_3 : (⟨0, 3, [], [], [2], 3, 5⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_4 : (⟨0, 3, [], [], [4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_5 : (⟨0, 4, [], [], [3, 2], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_6 : (⟨0, 5, [], [], [4, 3, 2], 1, 3⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_7 : (⟨0, 6, [], [], [], 4, 6⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_8 : (⟨0, 6, [], [], [5, 4, 3, 2], 2, 2⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_9 : (⟨1, 2, [], [0], [], 3, 5⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_10 : (⟨1, 2, [], [0], [3, 4, 5, 6], 1, 1⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_11 : (⟨1, 3, [], [0], [2], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_12 : (⟨1, 3, [], [0], [4, 5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_13 : (⟨1, 4, [], [0], [3, 2], 1, 3⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_14 : (⟨1, 5, [], [0], [4, 3, 2], 1, 2⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_15 : (⟨1, 5, [], [0], [6], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_16 : (⟨1, 6, [], [0], [], 3, 5⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_17 : (⟨1, 6, [], [0], [5, 4, 3, 2], 1, 1⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_18 : (⟨2, 3, [], [], [4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_19 : (⟨2, 4, [], [], [5, 6], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_20 : (⟨3, 4, [], [2], [5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_21 : (⟨3, 5, [], [2], [6], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_22 : (⟨3, 6, [], [2], [], 3, 5⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_23 : (⟨4, 5, [], [2, 3], [6], 1, 3⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_templates_item_24 : (⟨5, 6, [], [2, 3, 4], [], 1, 3⟩ : TemplateData (Fin 7)).Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p7_part_3 : ∀ T ∈ k7t3p7.templates, T.Check k7t3p7.graph k7t3p7.clique 7 (patternAmount ([[1, 3]] : List (List ℕ))) (([[1, 3]] : List (List ℕ)).map List.length).sum := by + simp only [k7t3p7, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p7_templates_item_0, k7t3p7_templates_item_1, k7t3p7_templates_item_2, k7t3p7_templates_item_3, k7t3p7_templates_item_4, k7t3p7_templates_item_5, k7t3p7_templates_item_6, k7t3p7_templates_item_7, k7t3p7_templates_item_8, k7t3p7_templates_item_9, k7t3p7_templates_item_10, k7t3p7_templates_item_11, k7t3p7_templates_item_12, k7t3p7_templates_item_13, k7t3p7_templates_item_14, k7t3p7_templates_item_15, k7t3p7_templates_item_16, k7t3p7_templates_item_17, k7t3p7_templates_item_18, k7t3p7_templates_item_19, k7t3p7_templates_item_20, k7t3p7_templates_item_21, k7t3p7_templates_item_22, k7t3p7_templates_item_23, k7t3p7_templates_item_24⟩ + +private theorem k7t3p7_required_item_0 : (⟨0, 1, []⟩ : RequiredPathData (Fin 7)).Check k7t3p7.graph 7 := by decide + +private theorem k7t3p7_required_item_1 : (⟨0, 6, [1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 7)).Check k7t3p7.graph 7 := by decide + +private theorem k7t3p7_required_item_2 : (⟨1, 2, []⟩ : RequiredPathData (Fin 7)).Check k7t3p7.graph 7 := by decide + +private theorem k7t3p7_required_item_3 : (⟨1, 3, [2]⟩ : RequiredPathData (Fin 7)).Check k7t3p7.graph 7 := by decide + +private theorem k7t3p7_required_item_4 : (⟨1, 4, [2, 3]⟩ : RequiredPathData (Fin 7)).Check k7t3p7.graph 7 := by decide + +private theorem k7t3p7_required_item_5 : (⟨1, 6, [2, 3, 4, 5]⟩ : RequiredPathData (Fin 7)).Check k7t3p7.graph 7 := by decide + +private theorem k7t3p7_required_item_6 : (⟨2, 3, []⟩ : RequiredPathData (Fin 7)).Check k7t3p7.graph 7 := by decide + +private theorem k7t3p7_required_item_7 : (⟨3, 5, [4]⟩ : RequiredPathData (Fin 7)).Check k7t3p7.graph 7 := by decide + +private theorem k7t3p7_part_4 : ∀ p ∈ k7t3p7.required, p.Check k7t3p7.graph 7 := by + simp only [k7t3p7, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p7_required_item_0, k7t3p7_required_item_1, k7t3p7_required_item_2, k7t3p7_required_item_3, k7t3p7_required_item_4, k7t3p7_required_item_5, k7t3p7_required_item_6, k7t3p7_required_item_7⟩ + +private theorem k7t3p7_part_5 : ClosureCheck k7t3p7.graph (k7t3p7.initialMatrix 7) 7 3 k7t3p7.closure := by + rw [k7t3p7_initial_eq] + exact k7t3p7_closure_0 + +private theorem k7t3p7_part_6 : k7t3p7.bad.Check k7t3p7.graph (k7t3p7.matrix 7) 7 3 := by + rw [k7t3p7_matrix_eq] + decide + +theorem k7t3p7_check : k7t3p7.Check 7 3 [[1, 3]] := + ⟨k7t3p7_part_0, k7t3p7_part_1, k7t3p7_part_2, k7t3p7_part_3, k7t3p7_part_4, k7t3p7_part_5, k7t3p7_part_6⟩ +private def k7t3p8_step_0_data : EdgeAttachmentData 7 := ⟨2, 0, [⟨1, 2, [0]⟩, ⟨1, 6, [0, 2, 3, 4, 5]⟩, ⟨1, 3, [2, 0, 6, 5, 4]⟩, ⟨6, 1, [5, 4, 3, 0, 2]⟩], ⟨none, {(1, 3), (2, 3), (6, 2)}⟩⟩ + +private def k7t3p8_step_0 : ClosureStep 7 := .edge k7t3p8_step_0_data + +private def k7t3p8_step_1_data : FreshAttachmentData 7 := ⟨2, 0, [⟨2, 0, [1, 7, 6, 5, 4, 3]⟩, ⟨2, 7, [1, 0, 3, 4, 5, 6]⟩, ⟨2, 5, [1, 0, 3, 4, 7, 6]⟩, ⟨2, 6, [3, 0, 1, 7, 4, 5]⟩, ⟨2, 4, [3, 0, 1, 7, 6, 5]⟩, ⟨5, 0, [4, 7, 1, 2, 3]⟩, ⟨5, 0, [6, 7, 4, 1, 2, 3]⟩, ⟨5, 2, [6, 7, 4, 1, 0, 3]⟩, ⟨6, 0, [5, 4, 1, 2, 3]⟩, ⟨6, 0, [5, 4, 7, 1, 2, 3]⟩, ⟨6, 2, [5, 4, 7, 1, 0, 3]⟩], ⟨none, {(5, 2), (6, 2), (2, 2), (3, 0)}⟩⟩ + +private def k7t3p8_step_1 : ClosureStep 7 := .fresh k7t3p8_step_1_data + +private def k7t3p8_step_2_data : EdgeAttachmentData 7 := ⟨3, 1, [⟨0, 2, [6, 5, 4, 3, 1]⟩, ⟨1, 0, [3]⟩, ⟨2, 0, [1, 3, 4, 5, 6]⟩, ⟨2, 1, [3]⟩], ⟨none, {(2, 3), (1, 3), (0, 2)}⟩⟩ + +private def k7t3p8_step_2 : ClosureStep 7 := .edge k7t3p8_step_2_data + +private def k7t3p8_step_3_data : EdgeAttachmentData 7 := ⟨4, 1, [⟨0, 2, [1, 4, 5, 6, 3]⟩, ⟨0, 5, [6, 3, 2, 1, 4]⟩, ⟨0, 3, [6, 5, 4, 1, 2]⟩, ⟨2, 0, [1, 4, 5, 6, 3]⟩, ⟨5, 0, [4, 1, 2, 3, 6]⟩], ⟨none, {(0, 2), (2, 2), (5, 2), (1, 2)}⟩⟩ + +private def k7t3p8_step_3 : ClosureStep 7 := .edge k7t3p8_step_3_data + +private def k7t3p8_step_4_data : EdgeAttachmentData 7 := ⟨4, 2, [⟨0, 6, [1, 2, 4, 3]⟩, ⟨0, 5, [1, 2, 4, 3, 6]⟩, ⟨0, 3, [1, 2, 4, 5, 6]⟩, ⟨0, 3, [6, 5, 4, 2]⟩, ⟨3, 6, [0, 1, 2, 4, 5]⟩, ⟨3, 1, [0, 6, 5, 4, 2]⟩, ⟨3, 0, [2, 4, 5, 6]⟩, ⟨3, 6, [4, 2, 1, 0]⟩, ⟨3, 5, [4, 2, 1, 0, 6]⟩, ⟨3, 0, [6, 5, 4, 2, 1]⟩, ⟨6, 3, [0, 1, 2, 4]⟩, ⟨6, 0, [3, 4, 2, 1]⟩, ⟨6, 3, [5, 4, 2, 1, 0]⟩, ⟨6, 1, [5, 4, 2, 3, 0]⟩], ⟨none, {(3, 3), (0, 3), (6, 3)}⟩⟩ + +private def k7t3p8_step_4 : ClosureStep 7 := .edge k7t3p8_step_4_data + +private def k7t3p8_step_5_data : EdgeAttachmentData 7 := ⟨5, 0, [⟨1, 6, [2, 3, 4, 5, 0]⟩, ⟨4, 6, [3, 2, 1, 0, 5]⟩, ⟨6, 5, [0]⟩, ⟨6, 1, [0, 5, 4, 3, 2]⟩, ⟨6, 4, [3, 2, 1, 0, 5]⟩], ⟨none, {(6, 3), (1, 2), (4, 2), (5, 2)}⟩⟩ + +private def k7t3p8_step_5 : ClosureStep 7 := .edge k7t3p8_step_5_data + +private def k7t3p8_step_6_data : FreshAttachmentData 7 := ⟨5, 0, [⟨2, 0, [1, 7, 4, 5, 6]⟩, ⟨2, 7, [1, 0, 6, 5, 4]⟩, ⟨2, 0, [3, 4, 5, 6, 7, 1]⟩, ⟨2, 7, [3, 4, 5, 6, 0, 1]⟩, ⟨2, 5, [3, 4, 7, 1, 0, 6]⟩, ⟨3, 0, [2, 1, 4, 5, 6]⟩, ⟨3, 0, [2, 1, 7, 4, 5, 6]⟩, ⟨3, 7, [2, 1, 0, 6, 5, 4]⟩, ⟨3, 5, [2, 1, 0, 6, 7, 4]⟩, ⟨7, 0, [1, 2, 3, 4, 5, 6]⟩, ⟨7, 2, [1, 0, 6, 5, 4, 3]⟩, ⟨7, 5, [4, 3, 2, 1, 0, 6]⟩, ⟨7, 2, [4, 5, 6, 0, 1]⟩, ⟨7, 3, [4, 5, 6, 0, 1, 2]⟩, ⟨7, 4, [6, 0, 1, 2, 3]⟩], ⟨none, {(2, 2), (3, 2), (7, 2)}⟩⟩ + +private def k7t3p8_step_6 : ClosureStep 7 := .fresh k7t3p8_step_6_data + +private def k7t3p8_step_7_data : EdgeAttachmentData 7 := ⟨5, 1, [⟨0, 6, [1, 5, 4, 3]⟩, ⟨0, 2, [6, 3, 4, 5, 1]⟩, ⟨2, 4, [1, 5]⟩, ⟨2, 0, [1, 5, 4, 3, 6]⟩, ⟨4, 6, [5, 1, 2, 3, 0]⟩, ⟨6, 4, [0, 3, 2, 1, 5]⟩, ⟨6, 0, [3, 4, 5, 1]⟩], ⟨none, {(2, 2), (4, 2), (0, 3), (6, 3)}⟩⟩ + +private def k7t3p8_step_7 : ClosureStep 7 := .edge k7t3p8_step_7_data + +private def k7t3p8_step_8_data : EdgeAttachmentData 7 := ⟨5, 2, [⟨1, 6, [2, 5, 4, 3, 0]⟩, ⟨4, 6, [3, 0, 1, 2, 5]⟩, ⟨6, 3, [0, 1, 2, 5, 4]⟩, ⟨6, 1, [0, 3, 4, 5, 2]⟩, ⟨6, 4, [3, 0, 1, 2, 5]⟩], ⟨none, {(6, 2), (4, 2), (1, 2), (5, 2)}⟩⟩ + +private def k7t3p8_step_8 : ClosureStep 7 := .edge k7t3p8_step_8_data + +private def k7t3p8_step_9_data : EdgeAttachmentData 7 := ⟨5, 3, [⟨4, 5, [3]⟩, ⟨4, 6, [5, 3, 2, 1, 0]⟩, ⟨5, 6, [3]⟩, ⟨6, 4, [0, 1, 2, 3, 5]⟩], ⟨none, {(4, 3), (5, 3), (6, 2)}⟩⟩ + +private def k7t3p8_step_9 : ClosureStep 7 := .edge k7t3p8_step_9_data + +private def k7t3p8_step_10_data : EdgeAttachmentData 7 := ⟨6, 1, [⟨0, 2, [1, 6, 5, 4, 3]⟩, ⟨0, 1, [6]⟩, ⟨0, 5, [6, 1, 2, 3, 4]⟩, ⟨2, 0, [1, 6, 5, 4, 3]⟩, ⟨5, 0, [4, 3, 2, 1, 6]⟩], ⟨none, {(0, 3), (2, 2), (5, 2), (1, 2)}⟩⟩ + +private def k7t3p8_step_10 : ClosureStep 7 := .edge k7t3p8_step_10_data + +private def k7t3p8_step_11_data : FreshAttachmentData 7 := ⟨6, 1, [⟨1, 0, [2, 3, 4, 5, 6, 7]⟩, ⟨1, 6, [2, 0, 7, 4, 5]⟩, ⟨1, 4, [2, 0, 7, 6, 5]⟩, ⟨1, 3, [2, 0, 7, 6, 5, 4]⟩, ⟨1, 5, [4, 3, 2, 0, 7, 6]⟩, ⟨1, 6, [7, 0, 2, 3, 4, 5]⟩, ⟨5, 0, [4, 3, 2, 1, 7]⟩, ⟨5, 0, [6, 7, 1, 4, 3, 2]⟩, ⟨5, 3, [6, 7, 0, 2, 1, 4]⟩, ⟨5, 1, [6, 7, 0, 2, 3, 4]⟩, ⟨6, 3, [5, 4, 1, 7, 0, 2]⟩, ⟨6, 0, [5, 4, 3, 2, 1, 7]⟩, ⟨6, 1, [5, 4, 3, 2, 0, 7]⟩, ⟨6, 0, [5, 4, 7, 1, 2]⟩, ⟨6, 1, [5, 4, 7, 0, 2]⟩], ⟨none, {(5, 2), (6, 2), (1, 2)}⟩⟩ + +private def k7t3p8_step_11 : ClosureStep 7 := .fresh k7t3p8_step_11_data + +private def k7t3p8_step_12_data : EdgeAttachmentData 7 := ⟨6, 2, [⟨2, 4, [6, 3]⟩, ⟨2, 5, [6]⟩, ⟨5, 0, [4, 3, 6, 2, 1]⟩], ⟨none, {(2, 3), (4, 2), (5, 2), (1, 1)}⟩⟩ + +private def k7t3p8_step_12 : ClosureStep 7 := .edge k7t3p8_step_12_data + +private def k7t3p8_templates_block_0 : List (TemplateData (Fin 7)) := [⟨0, 1, [], [], [2, 3], 2, 4⟩, ⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 1⟩, ⟨0, 2, [], [], [3], 3, 5⟩, ⟨0, 2, [], [], [3, 4, 5, 6], 2, 2⟩, ⟨0, 3, [], [], [], 4, 6⟩, ⟨0, 3, [], [], [4, 5, 6], 3, 3⟩, ⟨0, 4, [], [], [3], 3, 5⟩, ⟨0, 4, [], [], [5, 6], 2, 4⟩, ⟨0, 4, [], [3, 2, 1], [5, 6], 1, 1⟩, ⟨0, 5, [], [], [4, 3], 2, 4⟩, ⟨0, 5, [], [], [6], 3, 5⟩, ⟨0, 6, [], [], [], 4, 6⟩] + +private def k7t3p8_templates_block_1 : List (TemplateData (Fin 7)) := [⟨0, 6, [], [3, 2, 1], [], 3, 3⟩, ⟨1, 2, [], [0], [3], 2, 4⟩, ⟨1, 2, [], [0], [3, 4, 5, 6], 1, 1⟩, ⟨1, 3, [], [0], [4, 5, 6], 2, 2⟩, ⟨1, 4, [], [0], [3], 2, 4⟩, ⟨1, 4, [], [0], [5, 6], 1, 3⟩, ⟨1, 5, [], [0], [4, 3], 1, 3⟩, ⟨1, 5, [], [0], [6], 2, 4⟩, ⟨1, 6, [], [0], [], 3, 5⟩, ⟨1, 6, [], [3, 2], [], 2, 4⟩, ⟨2, 3, [], [0, 1], [], 2, 4⟩, ⟨2, 3, [], [0, 1], [4, 5, 6], 1, 1⟩] + +private def k7t3p8_templates_block_2 : List (TemplateData (Fin 7)) := [⟨2, 4, [], [0, 1], [3], 1, 3⟩, ⟨2, 5, [], [0, 1], [4, 3], 1, 2⟩, ⟨2, 5, [], [0, 1], [6], 1, 3⟩, ⟨2, 5, [], [3], [6], 2, 4⟩, ⟨2, 6, [], [0, 1], [], 2, 4⟩, ⟨2, 6, [], [3], [], 3, 5⟩, ⟨2, 6, [], [0, 1], [5, 4, 3], 1, 1⟩, ⟨3, 4, [], [], [5, 6], 2, 4⟩, ⟨3, 4, [], [0, 1, 2], [5, 6], 1, 1⟩, ⟨3, 5, [], [0, 1, 2], [6], 2, 2⟩, ⟨3, 6, [], [], [], 4, 6⟩, ⟨3, 6, [], [0, 1, 2], [], 3, 3⟩] + +private def k7t3p8_templates_block_3 : List (TemplateData (Fin 7)) := [⟨4, 5, [], [3], [6], 2, 4⟩, ⟨4, 5, [], [0, 1, 2, 3], [6], 1, 1⟩, ⟨4, 6, [], [3], [], 3, 5⟩, ⟨4, 6, [], [0, 1, 2, 3], [], 2, 2⟩, ⟨5, 6, [], [3, 4], [], 2, 4⟩, ⟨5, 6, [], [0, 1, 2, 3, 4], [], 1, 1⟩] + +def k7t3p8 : LayoutCertificate 7 where + chains := [[0, 1, 2, 3, 4, 5, 6]] + clique := {0, 3, 6} + templates := k7t3p8_templates_block_0 ++ k7t3p8_templates_block_1 ++ k7t3p8_templates_block_2 ++ k7t3p8_templates_block_3 + required := [⟨0, 6, [1, 2, 3, 4, 5]⟩, + ⟨1, 2, []⟩, + ⟨2, 4, [3]⟩, + ⟨4, 5, []⟩] + closure := [k7t3p8_step_0, k7t3p8_step_1, k7t3p8_step_2, k7t3p8_step_3, k7t3p8_step_4, k7t3p8_step_5, k7t3p8_step_6, k7t3p8_step_7, k7t3p8_step_8, k7t3p8_step_9, k7t3p8_step_10, k7t3p8_step_11, k7t3p8_step_12] + bad := ⟨none, {(2, 2), (1, 2), (5, 2)}⟩ + + +private def k7t3p8_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 2 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {2}, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 2 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p8_template_matrix_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 2 5, {4, 5, 6}], + #[Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 2 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 3 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 2 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[{4, 5, 6}, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_template_matrix_0_eq_row_0 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_0) 0 j = k7t3p8_template_matrix_0 0 j := by decide + +private theorem k7t3p8_template_matrix_0_eq_row_1 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_0) 1 j = k7t3p8_template_matrix_0 1 j := by decide + +private theorem k7t3p8_template_matrix_0_eq_row_2 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_0) 2 j = k7t3p8_template_matrix_0 2 j := by decide + +private theorem k7t3p8_template_matrix_0_eq_row_3 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_0) 3 j = k7t3p8_template_matrix_0 3 j := by decide + +private theorem k7t3p8_template_matrix_0_eq_row_4 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_0) 4 j = k7t3p8_template_matrix_0 4 j := by decide + +private theorem k7t3p8_template_matrix_0_eq_row_5 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_0) 5 j = k7t3p8_template_matrix_0 5 j := by decide + +private theorem k7t3p8_template_matrix_0_eq_row_6 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_0) 6 j = k7t3p8_template_matrix_0 6 j := by decide + +private theorem k7t3p8_template_matrix_0_eq : (templateMatrix k7t3p8_templates_block_0) = k7t3p8_template_matrix_0 := by + funext i j + fin_cases i + + · exact k7t3p8_template_matrix_0_eq_row_0 j + + · exact k7t3p8_template_matrix_0_eq_row_1 j + + · exact k7t3p8_template_matrix_0_eq_row_2 j + + · exact k7t3p8_template_matrix_0_eq_row_3 j + + · exact k7t3p8_template_matrix_0_eq_row_4 j + + · exact k7t3p8_template_matrix_0_eq_row_5 j + + · exact k7t3p8_template_matrix_0_eq_row_6 j + +private def k7t3p8_template_matrix_1 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, {3}], + #[∅, ∅, Finset.Icc 1 4, {2}, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 2 5], + #[∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅, ∅, ∅], + #[∅, {2}, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅], + #[{3}, Finset.Icc 2 5, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_template_matrix_1_eq_row_0 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_1) 0 j = k7t3p8_template_matrix_1 0 j := by decide + +private theorem k7t3p8_template_matrix_1_eq_row_1 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_1) 1 j = k7t3p8_template_matrix_1 1 j := by decide + +private theorem k7t3p8_template_matrix_1_eq_row_2 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_1) 2 j = k7t3p8_template_matrix_1 2 j := by decide + +private theorem k7t3p8_template_matrix_1_eq_row_3 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_1) 3 j = k7t3p8_template_matrix_1 3 j := by decide + +private theorem k7t3p8_template_matrix_1_eq_row_4 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_1) 4 j = k7t3p8_template_matrix_1 4 j := by decide + +private theorem k7t3p8_template_matrix_1_eq_row_5 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_1) 5 j = k7t3p8_template_matrix_1 5 j := by decide + +private theorem k7t3p8_template_matrix_1_eq_row_6 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_1) 6 j = k7t3p8_template_matrix_1 6 j := by decide + +private theorem k7t3p8_template_matrix_1_eq : (templateMatrix k7t3p8_templates_block_1) = k7t3p8_template_matrix_1 := by + funext i j + fin_cases i + + · exact k7t3p8_template_matrix_1_eq_row_0 j + + · exact k7t3p8_template_matrix_1_eq_row_1 j + + · exact k7t3p8_template_matrix_1_eq_row_2 j + + · exact k7t3p8_template_matrix_1_eq_row_3 j + + · exact k7t3p8_template_matrix_1_eq_row_4 j + + · exact k7t3p8_template_matrix_1_eq_row_5 j + + · exact k7t3p8_template_matrix_1_eq_row_6 j + +private def k7t3p8_template_matrix_2 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1, 2, 3}, Finset.Icc 1 4, Finset.Icc 1 5], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[∅, ∅, {1, 2, 3}, Finset.Icc 1 4, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 4, {2}, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 5, Finset.Icc 3 6, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_template_matrix_2_eq_row_0 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_2) 0 j = k7t3p8_template_matrix_2 0 j := by decide + +private theorem k7t3p8_template_matrix_2_eq_row_1 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_2) 1 j = k7t3p8_template_matrix_2 1 j := by decide + +private theorem k7t3p8_template_matrix_2_eq_row_2 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_2) 2 j = k7t3p8_template_matrix_2 2 j := by decide + +private theorem k7t3p8_template_matrix_2_eq_row_3 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_2) 3 j = k7t3p8_template_matrix_2 3 j := by decide + +private theorem k7t3p8_template_matrix_2_eq_row_4 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_2) 4 j = k7t3p8_template_matrix_2 4 j := by decide + +private theorem k7t3p8_template_matrix_2_eq_row_5 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_2) 5 j = k7t3p8_template_matrix_2 5 j := by decide + +private theorem k7t3p8_template_matrix_2_eq_row_6 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_2) 6 j = k7t3p8_template_matrix_2 6 j := by decide + +private theorem k7t3p8_template_matrix_2_eq : (templateMatrix k7t3p8_templates_block_2) = k7t3p8_template_matrix_2 := by + funext i j + fin_cases i + + · exact k7t3p8_template_matrix_2_eq_row_0 j + + · exact k7t3p8_template_matrix_2_eq_row_1 j + + · exact k7t3p8_template_matrix_2_eq_row_2 j + + · exact k7t3p8_template_matrix_2_eq_row_3 j + + · exact k7t3p8_template_matrix_2_eq_row_4 j + + · exact k7t3p8_template_matrix_2_eq_row_5 j + + · exact k7t3p8_template_matrix_2_eq_row_6 j + +private def k7t3p8_template_matrix_3 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_template_matrix_3_eq_row_0 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_3) 0 j = k7t3p8_template_matrix_3 0 j := by decide + +private theorem k7t3p8_template_matrix_3_eq_row_1 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_3) 1 j = k7t3p8_template_matrix_3 1 j := by decide + +private theorem k7t3p8_template_matrix_3_eq_row_2 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_3) 2 j = k7t3p8_template_matrix_3 2 j := by decide + +private theorem k7t3p8_template_matrix_3_eq_row_3 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_3) 3 j = k7t3p8_template_matrix_3 3 j := by decide + +private theorem k7t3p8_template_matrix_3_eq_row_4 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_3) 4 j = k7t3p8_template_matrix_3 4 j := by decide + +private theorem k7t3p8_template_matrix_3_eq_row_5 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_3) 5 j = k7t3p8_template_matrix_3 5 j := by decide + +private theorem k7t3p8_template_matrix_3_eq_row_6 : ∀ j : Fin 7, (templateMatrix k7t3p8_templates_block_3) 6 j = k7t3p8_template_matrix_3 6 j := by decide + +private theorem k7t3p8_template_matrix_3_eq : (templateMatrix k7t3p8_templates_block_3) = k7t3p8_template_matrix_3 := by + funext i j + fin_cases i + + · exact k7t3p8_template_matrix_3_eq_row_0 j + + · exact k7t3p8_template_matrix_3_eq_row_1 j + + · exact k7t3p8_template_matrix_3_eq_row_2 j + + · exact k7t3p8_template_matrix_3_eq_row_3 j + + · exact k7t3p8_template_matrix_3_eq_row_4 j + + · exact k7t3p8_template_matrix_3_eq_row_5 j + + · exact k7t3p8_template_matrix_3_eq_row_6 j + +private theorem k7t3p8_initial_merged_eq_row_0 : ∀ j : Fin 7, (fun i j => (((k7t3p8_template_matrix_0 i j ∪ k7t3p8_template_matrix_1 i j) ∪ k7t3p8_template_matrix_2 i j) ∪ k7t3p8_template_matrix_3 i j) ∪ requiredMatrix 7 k7t3p8.required i j) 0 j = k7t3p8_state_0 0 j := by decide + +private theorem k7t3p8_initial_merged_eq_row_1 : ∀ j : Fin 7, (fun i j => (((k7t3p8_template_matrix_0 i j ∪ k7t3p8_template_matrix_1 i j) ∪ k7t3p8_template_matrix_2 i j) ∪ k7t3p8_template_matrix_3 i j) ∪ requiredMatrix 7 k7t3p8.required i j) 1 j = k7t3p8_state_0 1 j := by decide + +private theorem k7t3p8_initial_merged_eq_row_2 : ∀ j : Fin 7, (fun i j => (((k7t3p8_template_matrix_0 i j ∪ k7t3p8_template_matrix_1 i j) ∪ k7t3p8_template_matrix_2 i j) ∪ k7t3p8_template_matrix_3 i j) ∪ requiredMatrix 7 k7t3p8.required i j) 2 j = k7t3p8_state_0 2 j := by decide + +private theorem k7t3p8_initial_merged_eq_row_3 : ∀ j : Fin 7, (fun i j => (((k7t3p8_template_matrix_0 i j ∪ k7t3p8_template_matrix_1 i j) ∪ k7t3p8_template_matrix_2 i j) ∪ k7t3p8_template_matrix_3 i j) ∪ requiredMatrix 7 k7t3p8.required i j) 3 j = k7t3p8_state_0 3 j := by decide + +private theorem k7t3p8_initial_merged_eq_row_4 : ∀ j : Fin 7, (fun i j => (((k7t3p8_template_matrix_0 i j ∪ k7t3p8_template_matrix_1 i j) ∪ k7t3p8_template_matrix_2 i j) ∪ k7t3p8_template_matrix_3 i j) ∪ requiredMatrix 7 k7t3p8.required i j) 4 j = k7t3p8_state_0 4 j := by decide + +private theorem k7t3p8_initial_merged_eq_row_5 : ∀ j : Fin 7, (fun i j => (((k7t3p8_template_matrix_0 i j ∪ k7t3p8_template_matrix_1 i j) ∪ k7t3p8_template_matrix_2 i j) ∪ k7t3p8_template_matrix_3 i j) ∪ requiredMatrix 7 k7t3p8.required i j) 5 j = k7t3p8_state_0 5 j := by decide + +private theorem k7t3p8_initial_merged_eq_row_6 : ∀ j : Fin 7, (fun i j => (((k7t3p8_template_matrix_0 i j ∪ k7t3p8_template_matrix_1 i j) ∪ k7t3p8_template_matrix_2 i j) ∪ k7t3p8_template_matrix_3 i j) ∪ requiredMatrix 7 k7t3p8.required i j) 6 j = k7t3p8_state_0 6 j := by decide + +private theorem k7t3p8_initial_merged_eq : (fun i j => (((k7t3p8_template_matrix_0 i j ∪ k7t3p8_template_matrix_1 i j) ∪ k7t3p8_template_matrix_2 i j) ∪ k7t3p8_template_matrix_3 i j) ∪ requiredMatrix 7 k7t3p8.required i j) = k7t3p8_state_0 := by + funext i j + fin_cases i + + · exact k7t3p8_initial_merged_eq_row_0 j + + · exact k7t3p8_initial_merged_eq_row_1 j + + · exact k7t3p8_initial_merged_eq_row_2 j + + · exact k7t3p8_initial_merged_eq_row_3 j + + · exact k7t3p8_initial_merged_eq_row_4 j + + · exact k7t3p8_initial_merged_eq_row_5 j + + · exact k7t3p8_initial_merged_eq_row_6 j + +private theorem k7t3p8_initial_eq : k7t3p8.initialMatrix 7 = k7t3p8_state_0 := by + funext i j + change templateMatrix (k7t3p8_templates_block_0 ++ k7t3p8_templates_block_1 ++ k7t3p8_templates_block_2 ++ k7t3p8_templates_block_3) i j ∪ requiredMatrix 7 k7t3p8.required i j = _ + simp only [templateMatrix_append, k7t3p8_template_matrix_0_eq, k7t3p8_template_matrix_1_eq, k7t3p8_template_matrix_2_eq, k7t3p8_template_matrix_3_eq] + exact congrFun (congrFun k7t3p8_initial_merged_eq i) j + +private def k7t3p8_state_1 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 2 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {2}, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 2 5], + #[{0, 2, 3, 4, 5}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p8_local_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 2 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 6, {1, 2}, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 2 5, Finset.Icc 1 6, ∅, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {1, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_local_0_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p8_state_0 a b ∪ requiredMatrix 7 k7t3p8_step_0_data.required a b) 0 j = k7t3p8_local_0 0 j := by decide + +private theorem k7t3p8_local_0_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p8_state_0 a b ∪ requiredMatrix 7 k7t3p8_step_0_data.required a b) 1 j = k7t3p8_local_0 1 j := by decide + +private theorem k7t3p8_local_0_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p8_state_0 a b ∪ requiredMatrix 7 k7t3p8_step_0_data.required a b) 2 j = k7t3p8_local_0 2 j := by decide + +private theorem k7t3p8_local_0_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p8_state_0 a b ∪ requiredMatrix 7 k7t3p8_step_0_data.required a b) 3 j = k7t3p8_local_0 3 j := by decide + +private theorem k7t3p8_local_0_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p8_state_0 a b ∪ requiredMatrix 7 k7t3p8_step_0_data.required a b) 4 j = k7t3p8_local_0 4 j := by decide + +private theorem k7t3p8_local_0_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p8_state_0 a b ∪ requiredMatrix 7 k7t3p8_step_0_data.required a b) 5 j = k7t3p8_local_0 5 j := by decide + +private theorem k7t3p8_local_0_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p8_state_0 a b ∪ requiredMatrix 7 k7t3p8_step_0_data.required a b) 6 j = k7t3p8_local_0 6 j := by decide + +private theorem k7t3p8_local_0_eq : (fun a b => k7t3p8_state_0 a b ∪ requiredMatrix 7 k7t3p8_step_0_data.required a b) = k7t3p8_local_0 := by + funext i j + fin_cases i + + · exact k7t3p8_local_0_eq_row_0 j + + · exact k7t3p8_local_0_eq_row_1 j + + · exact k7t3p8_local_0_eq_row_2 j + + · exact k7t3p8_local_0_eq_row_3 j + + · exact k7t3p8_local_0_eq_row_4 j + + · exact k7t3p8_local_0_eq_row_5 j + + · exact k7t3p8_local_0_eq_row_6 j + +private theorem k7t3p8_local_0_paths : ∀ p ∈ k7t3p8_step_0_data.required, p.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_0_data.i k7t3p8_step_0_data.j) 7 := by decide + +private theorem k7t3p8_local_0_bad : k7t3p8_step_0_data.bad.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_0_data.i k7t3p8_step_0_data.j) k7t3p8_local_0 7 3 := by decide + +private theorem k7t3p8_step_0_check : k7t3p8_step_0.Check k7t3p8.graph k7t3p8_state_0 7 3 := by + change k7t3p8_step_0_data.Check k7t3p8.graph k7t3p8_state_0 7 3 + refine ⟨k7t3p8_local_0_paths, ?_⟩ + rw [k7t3p8_local_0_eq] + exact k7t3p8_local_0_bad + +private theorem k7t3p8_update_0 : k7t3p8_step_0.apply k7t3p8_state_0 = k7t3p8_state_1 := by + have h : ∀ i j : Fin 7, k7t3p8_step_0.apply k7t3p8_state_0 i j = k7t3p8_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p8_state_2 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 2 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {2}, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p8_local_1 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, {0}, ∅, ∅, {0, 1}, {0, 1}, ∅], + #[∅, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 2 5, {1, 3, 4, 5, 6}], + #[{0}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 0 4, {0, 2, 3, 4, 5}], + #[∅, {0, 2, 3, 4, 5}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[∅, Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[{0, 1}, Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[{0, 1}, Finset.Icc 2 5, Finset.Icc 0 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[∅, {1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_local_1_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_1 a b ∪ requiredMatrix 7 k7t3p8_step_1_data.required a b) 0 j = k7t3p8_local_1 0 j := by decide + +private theorem k7t3p8_local_1_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_1 a b ∪ requiredMatrix 7 k7t3p8_step_1_data.required a b) 1 j = k7t3p8_local_1 1 j := by decide + +private theorem k7t3p8_local_1_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_1 a b ∪ requiredMatrix 7 k7t3p8_step_1_data.required a b) 2 j = k7t3p8_local_1 2 j := by decide + +private theorem k7t3p8_local_1_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_1 a b ∪ requiredMatrix 7 k7t3p8_step_1_data.required a b) 3 j = k7t3p8_local_1 3 j := by decide + +private theorem k7t3p8_local_1_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_1 a b ∪ requiredMatrix 7 k7t3p8_step_1_data.required a b) 4 j = k7t3p8_local_1 4 j := by decide + +private theorem k7t3p8_local_1_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_1 a b ∪ requiredMatrix 7 k7t3p8_step_1_data.required a b) 5 j = k7t3p8_local_1 5 j := by decide + +private theorem k7t3p8_local_1_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_1 a b ∪ requiredMatrix 7 k7t3p8_step_1_data.required a b) 6 j = k7t3p8_local_1 6 j := by decide + +private theorem k7t3p8_local_1_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_1 a b ∪ requiredMatrix 7 k7t3p8_step_1_data.required a b) 7 j = k7t3p8_local_1 7 j := by decide + +private theorem k7t3p8_local_1_eq : (fun a b => freshMatrix k7t3p8_state_1 a b ∪ requiredMatrix 7 k7t3p8_step_1_data.required a b) = k7t3p8_local_1 := by + funext i j + fin_cases i + + · exact k7t3p8_local_1_eq_row_0 j + + · exact k7t3p8_local_1_eq_row_1 j + + · exact k7t3p8_local_1_eq_row_2 j + + · exact k7t3p8_local_1_eq_row_3 j + + · exact k7t3p8_local_1_eq_row_4 j + + · exact k7t3p8_local_1_eq_row_5 j + + · exact k7t3p8_local_1_eq_row_6 j + + · exact k7t3p8_local_1_eq_row_7 j + +private theorem k7t3p8_local_1_paths : ∀ p ∈ k7t3p8_step_1_data.required, p.Check (freshGraph k7t3p8.graph k7t3p8_step_1_data.i k7t3p8_step_1_data.j) 7 := by decide + +private theorem k7t3p8_local_1_bad : k7t3p8_step_1_data.bad.Check (freshGraph k7t3p8.graph k7t3p8_step_1_data.i k7t3p8_step_1_data.j) k7t3p8_local_1 7 3 := by decide + +private theorem k7t3p8_step_1_check : k7t3p8_step_1.Check k7t3p8.graph k7t3p8_state_1 7 3 := by + change k7t3p8_step_1_data.Check k7t3p8.graph k7t3p8_state_1 7 3 + refine ⟨by decide, k7t3p8_local_1_paths, ?_⟩ + rw [k7t3p8_local_1_eq] + exact k7t3p8_local_1_bad + +private theorem k7t3p8_update_1 : k7t3p8_step_1.apply k7t3p8_state_1 = k7t3p8_state_2 := by + have h : ∀ i j : Fin 7, k7t3p8_step_1.apply k7t3p8_state_1 i j = k7t3p8_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p8_state_3 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 2 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p8_local_2 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 2 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 6, {2}, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 5, Finset.Icc 1 6, ∅, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_local_2_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p8_state_2 a b ∪ requiredMatrix 7 k7t3p8_step_2_data.required a b) 0 j = k7t3p8_local_2 0 j := by decide + +private theorem k7t3p8_local_2_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p8_state_2 a b ∪ requiredMatrix 7 k7t3p8_step_2_data.required a b) 1 j = k7t3p8_local_2 1 j := by decide + +private theorem k7t3p8_local_2_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p8_state_2 a b ∪ requiredMatrix 7 k7t3p8_step_2_data.required a b) 2 j = k7t3p8_local_2 2 j := by decide + +private theorem k7t3p8_local_2_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p8_state_2 a b ∪ requiredMatrix 7 k7t3p8_step_2_data.required a b) 3 j = k7t3p8_local_2 3 j := by decide + +private theorem k7t3p8_local_2_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p8_state_2 a b ∪ requiredMatrix 7 k7t3p8_step_2_data.required a b) 4 j = k7t3p8_local_2 4 j := by decide + +private theorem k7t3p8_local_2_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p8_state_2 a b ∪ requiredMatrix 7 k7t3p8_step_2_data.required a b) 5 j = k7t3p8_local_2 5 j := by decide + +private theorem k7t3p8_local_2_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p8_state_2 a b ∪ requiredMatrix 7 k7t3p8_step_2_data.required a b) 6 j = k7t3p8_local_2 6 j := by decide + +private theorem k7t3p8_local_2_eq : (fun a b => k7t3p8_state_2 a b ∪ requiredMatrix 7 k7t3p8_step_2_data.required a b) = k7t3p8_local_2 := by + funext i j + fin_cases i + + · exact k7t3p8_local_2_eq_row_0 j + + · exact k7t3p8_local_2_eq_row_1 j + + · exact k7t3p8_local_2_eq_row_2 j + + · exact k7t3p8_local_2_eq_row_3 j + + · exact k7t3p8_local_2_eq_row_4 j + + · exact k7t3p8_local_2_eq_row_5 j + + · exact k7t3p8_local_2_eq_row_6 j + +private theorem k7t3p8_local_2_paths : ∀ p ∈ k7t3p8_step_2_data.required, p.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_2_data.i k7t3p8_step_2_data.j) 7 := by decide + +private theorem k7t3p8_local_2_bad : k7t3p8_step_2_data.bad.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_2_data.i k7t3p8_step_2_data.j) k7t3p8_local_2 7 3 := by decide + +private theorem k7t3p8_step_2_check : k7t3p8_step_2.Check k7t3p8.graph k7t3p8_state_2 7 3 := by + change k7t3p8_step_2_data.Check k7t3p8.graph k7t3p8_state_2 7 3 + refine ⟨k7t3p8_local_2_paths, ?_⟩ + rw [k7t3p8_local_2_eq] + exact k7t3p8_local_2_bad + +private theorem k7t3p8_update_2 : k7t3p8_step_2.apply k7t3p8_state_2 = k7t3p8_state_3 := by + have h : ∀ i j : Fin 7, k7t3p8_step_2.apply k7t3p8_state_2 i j = k7t3p8_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p8_state_4 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 2 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p8_local_3 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6}, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_local_3_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p8_state_3 a b ∪ requiredMatrix 7 k7t3p8_step_3_data.required a b) 0 j = k7t3p8_local_3 0 j := by decide + +private theorem k7t3p8_local_3_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p8_state_3 a b ∪ requiredMatrix 7 k7t3p8_step_3_data.required a b) 1 j = k7t3p8_local_3 1 j := by decide + +private theorem k7t3p8_local_3_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p8_state_3 a b ∪ requiredMatrix 7 k7t3p8_step_3_data.required a b) 2 j = k7t3p8_local_3 2 j := by decide + +private theorem k7t3p8_local_3_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p8_state_3 a b ∪ requiredMatrix 7 k7t3p8_step_3_data.required a b) 3 j = k7t3p8_local_3 3 j := by decide + +private theorem k7t3p8_local_3_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p8_state_3 a b ∪ requiredMatrix 7 k7t3p8_step_3_data.required a b) 4 j = k7t3p8_local_3 4 j := by decide + +private theorem k7t3p8_local_3_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p8_state_3 a b ∪ requiredMatrix 7 k7t3p8_step_3_data.required a b) 5 j = k7t3p8_local_3 5 j := by decide + +private theorem k7t3p8_local_3_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p8_state_3 a b ∪ requiredMatrix 7 k7t3p8_step_3_data.required a b) 6 j = k7t3p8_local_3 6 j := by decide + +private theorem k7t3p8_local_3_eq : (fun a b => k7t3p8_state_3 a b ∪ requiredMatrix 7 k7t3p8_step_3_data.required a b) = k7t3p8_local_3 := by + funext i j + fin_cases i + + · exact k7t3p8_local_3_eq_row_0 j + + · exact k7t3p8_local_3_eq_row_1 j + + · exact k7t3p8_local_3_eq_row_2 j + + · exact k7t3p8_local_3_eq_row_3 j + + · exact k7t3p8_local_3_eq_row_4 j + + · exact k7t3p8_local_3_eq_row_5 j + + · exact k7t3p8_local_3_eq_row_6 j + +private theorem k7t3p8_local_3_paths : ∀ p ∈ k7t3p8_step_3_data.required, p.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_3_data.i k7t3p8_step_3_data.j) 7 := by decide + +private theorem k7t3p8_local_3_bad : k7t3p8_step_3_data.bad.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_3_data.i k7t3p8_step_3_data.j) k7t3p8_local_3 7 3 := by decide + +private theorem k7t3p8_step_3_check : k7t3p8_step_3.Check k7t3p8.graph k7t3p8_state_3 7 3 := by + change k7t3p8_step_3_data.Check k7t3p8.graph k7t3p8_state_3 7 3 + refine ⟨k7t3p8_local_3_paths, ?_⟩ + rw [k7t3p8_local_3_eq] + exact k7t3p8_local_3_bad + +private theorem k7t3p8_update_3 : k7t3p8_step_3.apply k7t3p8_state_3 = k7t3p8_state_4 := by + have h : ∀ i j : Fin 7, k7t3p8_step_3.apply k7t3p8_state_3 i j = k7t3p8_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p8_state_5 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 2 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p8_local_4 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 1, 2}, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 6, {0, 1, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {1, 2}, Finset.Icc 1 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, {1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_local_4_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p8_state_4 a b ∪ requiredMatrix 7 k7t3p8_step_4_data.required a b) 0 j = k7t3p8_local_4 0 j := by decide + +private theorem k7t3p8_local_4_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p8_state_4 a b ∪ requiredMatrix 7 k7t3p8_step_4_data.required a b) 1 j = k7t3p8_local_4 1 j := by decide + +private theorem k7t3p8_local_4_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p8_state_4 a b ∪ requiredMatrix 7 k7t3p8_step_4_data.required a b) 2 j = k7t3p8_local_4 2 j := by decide + +private theorem k7t3p8_local_4_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p8_state_4 a b ∪ requiredMatrix 7 k7t3p8_step_4_data.required a b) 3 j = k7t3p8_local_4 3 j := by decide + +private theorem k7t3p8_local_4_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p8_state_4 a b ∪ requiredMatrix 7 k7t3p8_step_4_data.required a b) 4 j = k7t3p8_local_4 4 j := by decide + +private theorem k7t3p8_local_4_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p8_state_4 a b ∪ requiredMatrix 7 k7t3p8_step_4_data.required a b) 5 j = k7t3p8_local_4 5 j := by decide + +private theorem k7t3p8_local_4_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p8_state_4 a b ∪ requiredMatrix 7 k7t3p8_step_4_data.required a b) 6 j = k7t3p8_local_4 6 j := by decide + +private theorem k7t3p8_local_4_eq : (fun a b => k7t3p8_state_4 a b ∪ requiredMatrix 7 k7t3p8_step_4_data.required a b) = k7t3p8_local_4 := by + funext i j + fin_cases i + + · exact k7t3p8_local_4_eq_row_0 j + + · exact k7t3p8_local_4_eq_row_1 j + + · exact k7t3p8_local_4_eq_row_2 j + + · exact k7t3p8_local_4_eq_row_3 j + + · exact k7t3p8_local_4_eq_row_4 j + + · exact k7t3p8_local_4_eq_row_5 j + + · exact k7t3p8_local_4_eq_row_6 j + +private theorem k7t3p8_local_4_paths : ∀ p ∈ k7t3p8_step_4_data.required, p.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_4_data.i k7t3p8_step_4_data.j) 7 := by decide + +private theorem k7t3p8_local_4_bad : k7t3p8_step_4_data.bad.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_4_data.i k7t3p8_step_4_data.j) k7t3p8_local_4 7 3 := by decide + +private theorem k7t3p8_step_4_check : k7t3p8_step_4.Check k7t3p8.graph k7t3p8_state_4 7 3 := by + change k7t3p8_step_4_data.Check k7t3p8.graph k7t3p8_state_4 7 3 + refine ⟨k7t3p8_local_4_paths, ?_⟩ + rw [k7t3p8_local_4_eq] + exact k7t3p8_local_4_bad + +private theorem k7t3p8_update_4 : k7t3p8_step_4.apply k7t3p8_state_4 = k7t3p8_state_5 := by + have h : ∀ i j : Fin 7, k7t3p8_step_4.apply k7t3p8_state_4 i j = k7t3p8_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p8_state_6 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, {0, 2, 3, 4, 5}, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[{0, 2, 3, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p8_local_5 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 2 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 1 5], + #[Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_local_5_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p8_state_5 a b ∪ requiredMatrix 7 k7t3p8_step_5_data.required a b) 0 j = k7t3p8_local_5 0 j := by decide + +private theorem k7t3p8_local_5_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p8_state_5 a b ∪ requiredMatrix 7 k7t3p8_step_5_data.required a b) 1 j = k7t3p8_local_5 1 j := by decide + +private theorem k7t3p8_local_5_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p8_state_5 a b ∪ requiredMatrix 7 k7t3p8_step_5_data.required a b) 2 j = k7t3p8_local_5 2 j := by decide + +private theorem k7t3p8_local_5_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p8_state_5 a b ∪ requiredMatrix 7 k7t3p8_step_5_data.required a b) 3 j = k7t3p8_local_5 3 j := by decide + +private theorem k7t3p8_local_5_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p8_state_5 a b ∪ requiredMatrix 7 k7t3p8_step_5_data.required a b) 4 j = k7t3p8_local_5 4 j := by decide + +private theorem k7t3p8_local_5_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p8_state_5 a b ∪ requiredMatrix 7 k7t3p8_step_5_data.required a b) 5 j = k7t3p8_local_5 5 j := by decide + +private theorem k7t3p8_local_5_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p8_state_5 a b ∪ requiredMatrix 7 k7t3p8_step_5_data.required a b) 6 j = k7t3p8_local_5 6 j := by decide + +private theorem k7t3p8_local_5_eq : (fun a b => k7t3p8_state_5 a b ∪ requiredMatrix 7 k7t3p8_step_5_data.required a b) = k7t3p8_local_5 := by + funext i j + fin_cases i + + · exact k7t3p8_local_5_eq_row_0 j + + · exact k7t3p8_local_5_eq_row_1 j + + · exact k7t3p8_local_5_eq_row_2 j + + · exact k7t3p8_local_5_eq_row_3 j + + · exact k7t3p8_local_5_eq_row_4 j + + · exact k7t3p8_local_5_eq_row_5 j + + · exact k7t3p8_local_5_eq_row_6 j + +private theorem k7t3p8_local_5_paths : ∀ p ∈ k7t3p8_step_5_data.required, p.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_5_data.i k7t3p8_step_5_data.j) 7 := by decide + +private theorem k7t3p8_local_5_bad : k7t3p8_step_5_data.bad.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_5_data.i k7t3p8_step_5_data.j) k7t3p8_local_5 7 3 := by decide + +private theorem k7t3p8_step_5_check : k7t3p8_step_5.Check k7t3p8.graph k7t3p8_state_5 7 3 := by + change k7t3p8_step_5_data.Check k7t3p8.graph k7t3p8_state_5 7 3 + refine ⟨k7t3p8_local_5_paths, ?_⟩ + rw [k7t3p8_local_5_eq] + exact k7t3p8_local_5_bad + +private theorem k7t3p8_update_5 : k7t3p8_step_5.apply k7t3p8_state_5 = k7t3p8_state_6 := by + have h : ∀ i j : Fin 7, k7t3p8_step_5.apply k7t3p8_state_5 i j = k7t3p8_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p8_state_7 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p8_local_6 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, {0, 1}, {0, 1}, ∅, ∅, ∅, {0}], + #[∅, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, {0, 2, 3, 4, 5}, {1, 3, 4, 5, 6}], + #[{0, 1}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 0 5], + #[{0, 1}, Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 0 5], + #[∅, Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, {1, 3, 4, 5, 6}], + #[∅, Finset.Icc 1 5, Finset.Icc 0 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2, 3, 4, 5}], + #[∅, {0, 2, 3, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{0}, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_local_6_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_6 a b ∪ requiredMatrix 7 k7t3p8_step_6_data.required a b) 0 j = k7t3p8_local_6 0 j := by decide + +private theorem k7t3p8_local_6_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_6 a b ∪ requiredMatrix 7 k7t3p8_step_6_data.required a b) 1 j = k7t3p8_local_6 1 j := by decide + +private theorem k7t3p8_local_6_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_6 a b ∪ requiredMatrix 7 k7t3p8_step_6_data.required a b) 2 j = k7t3p8_local_6 2 j := by decide + +private theorem k7t3p8_local_6_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_6 a b ∪ requiredMatrix 7 k7t3p8_step_6_data.required a b) 3 j = k7t3p8_local_6 3 j := by decide + +private theorem k7t3p8_local_6_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_6 a b ∪ requiredMatrix 7 k7t3p8_step_6_data.required a b) 4 j = k7t3p8_local_6 4 j := by decide + +private theorem k7t3p8_local_6_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_6 a b ∪ requiredMatrix 7 k7t3p8_step_6_data.required a b) 5 j = k7t3p8_local_6 5 j := by decide + +private theorem k7t3p8_local_6_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_6 a b ∪ requiredMatrix 7 k7t3p8_step_6_data.required a b) 6 j = k7t3p8_local_6 6 j := by decide + +private theorem k7t3p8_local_6_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_6 a b ∪ requiredMatrix 7 k7t3p8_step_6_data.required a b) 7 j = k7t3p8_local_6 7 j := by decide + +private theorem k7t3p8_local_6_eq : (fun a b => freshMatrix k7t3p8_state_6 a b ∪ requiredMatrix 7 k7t3p8_step_6_data.required a b) = k7t3p8_local_6 := by + funext i j + fin_cases i + + · exact k7t3p8_local_6_eq_row_0 j + + · exact k7t3p8_local_6_eq_row_1 j + + · exact k7t3p8_local_6_eq_row_2 j + + · exact k7t3p8_local_6_eq_row_3 j + + · exact k7t3p8_local_6_eq_row_4 j + + · exact k7t3p8_local_6_eq_row_5 j + + · exact k7t3p8_local_6_eq_row_6 j + + · exact k7t3p8_local_6_eq_row_7 j + +private theorem k7t3p8_local_6_paths : ∀ p ∈ k7t3p8_step_6_data.required, p.Check (freshGraph k7t3p8.graph k7t3p8_step_6_data.i k7t3p8_step_6_data.j) 7 := by decide + +private theorem k7t3p8_local_6_bad : k7t3p8_step_6_data.bad.Check (freshGraph k7t3p8.graph k7t3p8_step_6_data.i k7t3p8_step_6_data.j) k7t3p8_local_6 7 3 := by decide + +private theorem k7t3p8_step_6_check : k7t3p8_step_6.Check k7t3p8.graph k7t3p8_state_6 7 3 := by + change k7t3p8_step_6_data.Check k7t3p8.graph k7t3p8_state_6 7 3 + refine ⟨by decide, k7t3p8_local_6_paths, ?_⟩ + rw [k7t3p8_local_6_eq] + exact k7t3p8_local_6_bad + +private theorem k7t3p8_update_6 : k7t3p8_step_6.apply k7t3p8_state_6 = k7t3p8_state_7 := by + have h : ∀ i j : Fin 7, k7t3p8_step_6.apply k7t3p8_state_6 i j = k7t3p8_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p8_state_8 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 2 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p8_local_7 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 0 5, Finset.Icc 1 6], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 1 5], + #[Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_local_7_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p8_state_7 a b ∪ requiredMatrix 7 k7t3p8_step_7_data.required a b) 0 j = k7t3p8_local_7 0 j := by decide + +private theorem k7t3p8_local_7_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p8_state_7 a b ∪ requiredMatrix 7 k7t3p8_step_7_data.required a b) 1 j = k7t3p8_local_7 1 j := by decide + +private theorem k7t3p8_local_7_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p8_state_7 a b ∪ requiredMatrix 7 k7t3p8_step_7_data.required a b) 2 j = k7t3p8_local_7 2 j := by decide + +private theorem k7t3p8_local_7_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p8_state_7 a b ∪ requiredMatrix 7 k7t3p8_step_7_data.required a b) 3 j = k7t3p8_local_7 3 j := by decide + +private theorem k7t3p8_local_7_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p8_state_7 a b ∪ requiredMatrix 7 k7t3p8_step_7_data.required a b) 4 j = k7t3p8_local_7 4 j := by decide + +private theorem k7t3p8_local_7_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p8_state_7 a b ∪ requiredMatrix 7 k7t3p8_step_7_data.required a b) 5 j = k7t3p8_local_7 5 j := by decide + +private theorem k7t3p8_local_7_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p8_state_7 a b ∪ requiredMatrix 7 k7t3p8_step_7_data.required a b) 6 j = k7t3p8_local_7 6 j := by decide + +private theorem k7t3p8_local_7_eq : (fun a b => k7t3p8_state_7 a b ∪ requiredMatrix 7 k7t3p8_step_7_data.required a b) = k7t3p8_local_7 := by + funext i j + fin_cases i + + · exact k7t3p8_local_7_eq_row_0 j + + · exact k7t3p8_local_7_eq_row_1 j + + · exact k7t3p8_local_7_eq_row_2 j + + · exact k7t3p8_local_7_eq_row_3 j + + · exact k7t3p8_local_7_eq_row_4 j + + · exact k7t3p8_local_7_eq_row_5 j + + · exact k7t3p8_local_7_eq_row_6 j + +private theorem k7t3p8_local_7_paths : ∀ p ∈ k7t3p8_step_7_data.required, p.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_7_data.i k7t3p8_step_7_data.j) 7 := by decide + +private theorem k7t3p8_local_7_bad : k7t3p8_step_7_data.bad.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_7_data.i k7t3p8_step_7_data.j) k7t3p8_local_7 7 3 := by decide + +private theorem k7t3p8_step_7_check : k7t3p8_step_7.Check k7t3p8.graph k7t3p8_state_7 7 3 := by + change k7t3p8_step_7_data.Check k7t3p8.graph k7t3p8_state_7 7 3 + refine ⟨k7t3p8_local_7_paths, ?_⟩ + rw [k7t3p8_local_7_eq] + exact k7t3p8_local_7_bad + +private theorem k7t3p8_update_7 : k7t3p8_step_7.apply k7t3p8_state_7 = k7t3p8_state_8 := by + have h : ∀ i j : Fin 7, k7t3p8_step_7.apply k7t3p8_state_7 i j = k7t3p8_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p8_state_9 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 2 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {0, 1, 2, 3, 5}, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p8_local_8 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 5, Finset.Icc 0 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 1 5], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, {2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 5, {1, 3, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_local_8_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p8_state_8 a b ∪ requiredMatrix 7 k7t3p8_step_8_data.required a b) 0 j = k7t3p8_local_8 0 j := by decide + +private theorem k7t3p8_local_8_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p8_state_8 a b ∪ requiredMatrix 7 k7t3p8_step_8_data.required a b) 1 j = k7t3p8_local_8 1 j := by decide + +private theorem k7t3p8_local_8_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p8_state_8 a b ∪ requiredMatrix 7 k7t3p8_step_8_data.required a b) 2 j = k7t3p8_local_8 2 j := by decide + +private theorem k7t3p8_local_8_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p8_state_8 a b ∪ requiredMatrix 7 k7t3p8_step_8_data.required a b) 3 j = k7t3p8_local_8 3 j := by decide + +private theorem k7t3p8_local_8_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p8_state_8 a b ∪ requiredMatrix 7 k7t3p8_step_8_data.required a b) 4 j = k7t3p8_local_8 4 j := by decide + +private theorem k7t3p8_local_8_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p8_state_8 a b ∪ requiredMatrix 7 k7t3p8_step_8_data.required a b) 5 j = k7t3p8_local_8 5 j := by decide + +private theorem k7t3p8_local_8_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p8_state_8 a b ∪ requiredMatrix 7 k7t3p8_step_8_data.required a b) 6 j = k7t3p8_local_8 6 j := by decide + +private theorem k7t3p8_local_8_eq : (fun a b => k7t3p8_state_8 a b ∪ requiredMatrix 7 k7t3p8_step_8_data.required a b) = k7t3p8_local_8 := by + funext i j + fin_cases i + + · exact k7t3p8_local_8_eq_row_0 j + + · exact k7t3p8_local_8_eq_row_1 j + + · exact k7t3p8_local_8_eq_row_2 j + + · exact k7t3p8_local_8_eq_row_3 j + + · exact k7t3p8_local_8_eq_row_4 j + + · exact k7t3p8_local_8_eq_row_5 j + + · exact k7t3p8_local_8_eq_row_6 j + +private theorem k7t3p8_local_8_paths : ∀ p ∈ k7t3p8_step_8_data.required, p.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_8_data.i k7t3p8_step_8_data.j) 7 := by decide + +private theorem k7t3p8_local_8_bad : k7t3p8_step_8_data.bad.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_8_data.i k7t3p8_step_8_data.j) k7t3p8_local_8 7 3 := by decide + +private theorem k7t3p8_step_8_check : k7t3p8_step_8.Check k7t3p8.graph k7t3p8_state_8 7 3 := by + change k7t3p8_step_8_data.Check k7t3p8.graph k7t3p8_state_8 7 3 + refine ⟨k7t3p8_local_8_paths, ?_⟩ + rw [k7t3p8_local_8_eq] + exact k7t3p8_local_8_bad + +private theorem k7t3p8_update_8 : k7t3p8_step_8.apply k7t3p8_state_8 = k7t3p8_state_9 := by + have h : ∀ i j : Fin 7, k7t3p8_step_8.apply k7t3p8_state_8 i j = k7t3p8_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p8_state_10 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 2 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {0, 1, 2, 3, 5}, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 4, {0, 2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p8_local_9 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 2 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {0, 1, 2, 3, 5}, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 4, {2}, Finset.Icc 1 6, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_local_9_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p8_state_9 a b ∪ requiredMatrix 7 k7t3p8_step_9_data.required a b) 0 j = k7t3p8_local_9 0 j := by decide + +private theorem k7t3p8_local_9_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p8_state_9 a b ∪ requiredMatrix 7 k7t3p8_step_9_data.required a b) 1 j = k7t3p8_local_9 1 j := by decide + +private theorem k7t3p8_local_9_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p8_state_9 a b ∪ requiredMatrix 7 k7t3p8_step_9_data.required a b) 2 j = k7t3p8_local_9 2 j := by decide + +private theorem k7t3p8_local_9_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p8_state_9 a b ∪ requiredMatrix 7 k7t3p8_step_9_data.required a b) 3 j = k7t3p8_local_9 3 j := by decide + +private theorem k7t3p8_local_9_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p8_state_9 a b ∪ requiredMatrix 7 k7t3p8_step_9_data.required a b) 4 j = k7t3p8_local_9 4 j := by decide + +private theorem k7t3p8_local_9_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p8_state_9 a b ∪ requiredMatrix 7 k7t3p8_step_9_data.required a b) 5 j = k7t3p8_local_9 5 j := by decide + +private theorem k7t3p8_local_9_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p8_state_9 a b ∪ requiredMatrix 7 k7t3p8_step_9_data.required a b) 6 j = k7t3p8_local_9 6 j := by decide + +private theorem k7t3p8_local_9_eq : (fun a b => k7t3p8_state_9 a b ∪ requiredMatrix 7 k7t3p8_step_9_data.required a b) = k7t3p8_local_9 := by + funext i j + fin_cases i + + · exact k7t3p8_local_9_eq_row_0 j + + · exact k7t3p8_local_9_eq_row_1 j + + · exact k7t3p8_local_9_eq_row_2 j + + · exact k7t3p8_local_9_eq_row_3 j + + · exact k7t3p8_local_9_eq_row_4 j + + · exact k7t3p8_local_9_eq_row_5 j + + · exact k7t3p8_local_9_eq_row_6 j + +private theorem k7t3p8_local_9_paths : ∀ p ∈ k7t3p8_step_9_data.required, p.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_9_data.i k7t3p8_step_9_data.j) 7 := by decide + +private theorem k7t3p8_local_9_bad : k7t3p8_step_9_data.bad.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_9_data.i k7t3p8_step_9_data.j) k7t3p8_local_9 7 3 := by decide + +private theorem k7t3p8_step_9_check : k7t3p8_step_9.Check k7t3p8.graph k7t3p8_state_9 7 3 := by + change k7t3p8_step_9_data.Check k7t3p8.graph k7t3p8_state_9 7 3 + refine ⟨k7t3p8_local_9_paths, ?_⟩ + rw [k7t3p8_local_9_eq] + exact k7t3p8_local_9_bad + +private theorem k7t3p8_update_9 : k7t3p8_step_9.apply k7t3p8_state_9 = k7t3p8_state_10 := by + have h : ∀ i j : Fin 7, k7t3p8_step_9.apply k7t3p8_state_9 i j = k7t3p8_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p8_state_11 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 0 4, {0, 2, 3, 4, 5}], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {0, 1, 2, 3, 5}, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 4, {0, 2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p8_local_10 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 5, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 2 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {0, 1, 2, 3, 5}, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 4, {0, 2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_local_10_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p8_state_10 a b ∪ requiredMatrix 7 k7t3p8_step_10_data.required a b) 0 j = k7t3p8_local_10 0 j := by decide + +private theorem k7t3p8_local_10_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p8_state_10 a b ∪ requiredMatrix 7 k7t3p8_step_10_data.required a b) 1 j = k7t3p8_local_10 1 j := by decide + +private theorem k7t3p8_local_10_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p8_state_10 a b ∪ requiredMatrix 7 k7t3p8_step_10_data.required a b) 2 j = k7t3p8_local_10 2 j := by decide + +private theorem k7t3p8_local_10_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p8_state_10 a b ∪ requiredMatrix 7 k7t3p8_step_10_data.required a b) 3 j = k7t3p8_local_10 3 j := by decide + +private theorem k7t3p8_local_10_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p8_state_10 a b ∪ requiredMatrix 7 k7t3p8_step_10_data.required a b) 4 j = k7t3p8_local_10 4 j := by decide + +private theorem k7t3p8_local_10_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p8_state_10 a b ∪ requiredMatrix 7 k7t3p8_step_10_data.required a b) 5 j = k7t3p8_local_10 5 j := by decide + +private theorem k7t3p8_local_10_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p8_state_10 a b ∪ requiredMatrix 7 k7t3p8_step_10_data.required a b) 6 j = k7t3p8_local_10 6 j := by decide + +private theorem k7t3p8_local_10_eq : (fun a b => k7t3p8_state_10 a b ∪ requiredMatrix 7 k7t3p8_step_10_data.required a b) = k7t3p8_local_10 := by + funext i j + fin_cases i + + · exact k7t3p8_local_10_eq_row_0 j + + · exact k7t3p8_local_10_eq_row_1 j + + · exact k7t3p8_local_10_eq_row_2 j + + · exact k7t3p8_local_10_eq_row_3 j + + · exact k7t3p8_local_10_eq_row_4 j + + · exact k7t3p8_local_10_eq_row_5 j + + · exact k7t3p8_local_10_eq_row_6 j + +private theorem k7t3p8_local_10_paths : ∀ p ∈ k7t3p8_step_10_data.required, p.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_10_data.i k7t3p8_step_10_data.j) 7 := by decide + +private theorem k7t3p8_local_10_bad : k7t3p8_step_10_data.bad.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_10_data.i k7t3p8_step_10_data.j) k7t3p8_local_10 7 3 := by decide + +private theorem k7t3p8_step_10_check : k7t3p8_step_10.Check k7t3p8.graph k7t3p8_state_10 7 3 := by + change k7t3p8_step_10_data.Check k7t3p8.graph k7t3p8_state_10 7 3 + refine ⟨k7t3p8_local_10_paths, ?_⟩ + rw [k7t3p8_local_10_eq] + exact k7t3p8_local_10_bad + +private theorem k7t3p8_update_10 : k7t3p8_step_10.apply k7t3p8_state_10 = k7t3p8_state_11 := by + have h : ∀ i j : Fin 7, k7t3p8_step_10.apply k7t3p8_state_10 i j = k7t3p8_state_11 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p8_state_12 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {0, 1, 2, 3, 5}, Finset.Icc 0 4, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 4, {0, 2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p8_local_11 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {0}, ∅, ∅, ∅, {0, 1}, {0, 1}, ∅], + #[{0}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}], + #[∅, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 0 4, {0, 2, 3, 4, 5}], + #[∅, Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {0, 1, 2, 3, 5}, Finset.Icc 0 4, Finset.Icc 1 5], + #[∅, {1, 3, 4, 5, 6}, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2}, Finset.Icc 3 6], + #[{0, 1}, Finset.Icc 0 5, Finset.Icc 0 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[{0, 1}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 4, {0, 2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[∅, {1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_local_11_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_11 a b ∪ requiredMatrix 7 k7t3p8_step_11_data.required a b) 0 j = k7t3p8_local_11 0 j := by decide + +private theorem k7t3p8_local_11_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_11 a b ∪ requiredMatrix 7 k7t3p8_step_11_data.required a b) 1 j = k7t3p8_local_11 1 j := by decide + +private theorem k7t3p8_local_11_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_11 a b ∪ requiredMatrix 7 k7t3p8_step_11_data.required a b) 2 j = k7t3p8_local_11 2 j := by decide + +private theorem k7t3p8_local_11_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_11 a b ∪ requiredMatrix 7 k7t3p8_step_11_data.required a b) 3 j = k7t3p8_local_11 3 j := by decide + +private theorem k7t3p8_local_11_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_11 a b ∪ requiredMatrix 7 k7t3p8_step_11_data.required a b) 4 j = k7t3p8_local_11 4 j := by decide + +private theorem k7t3p8_local_11_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_11 a b ∪ requiredMatrix 7 k7t3p8_step_11_data.required a b) 5 j = k7t3p8_local_11 5 j := by decide + +private theorem k7t3p8_local_11_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_11 a b ∪ requiredMatrix 7 k7t3p8_step_11_data.required a b) 6 j = k7t3p8_local_11 6 j := by decide + +private theorem k7t3p8_local_11_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t3p8_state_11 a b ∪ requiredMatrix 7 k7t3p8_step_11_data.required a b) 7 j = k7t3p8_local_11 7 j := by decide + +private theorem k7t3p8_local_11_eq : (fun a b => freshMatrix k7t3p8_state_11 a b ∪ requiredMatrix 7 k7t3p8_step_11_data.required a b) = k7t3p8_local_11 := by + funext i j + fin_cases i + + · exact k7t3p8_local_11_eq_row_0 j + + · exact k7t3p8_local_11_eq_row_1 j + + · exact k7t3p8_local_11_eq_row_2 j + + · exact k7t3p8_local_11_eq_row_3 j + + · exact k7t3p8_local_11_eq_row_4 j + + · exact k7t3p8_local_11_eq_row_5 j + + · exact k7t3p8_local_11_eq_row_6 j + + · exact k7t3p8_local_11_eq_row_7 j + +private theorem k7t3p8_local_11_paths : ∀ p ∈ k7t3p8_step_11_data.required, p.Check (freshGraph k7t3p8.graph k7t3p8_step_11_data.i k7t3p8_step_11_data.j) 7 := by decide + +private theorem k7t3p8_local_11_bad : k7t3p8_step_11_data.bad.Check (freshGraph k7t3p8.graph k7t3p8_step_11_data.i k7t3p8_step_11_data.j) k7t3p8_local_11 7 3 := by decide + +private theorem k7t3p8_step_11_check : k7t3p8_step_11.Check k7t3p8.graph k7t3p8_state_11 7 3 := by + change k7t3p8_step_11_data.Check k7t3p8.graph k7t3p8_state_11 7 3 + refine ⟨by decide, k7t3p8_local_11_paths, ?_⟩ + rw [k7t3p8_local_11_eq] + exact k7t3p8_local_11_bad + +private theorem k7t3p8_update_11 : k7t3p8_step_11.apply k7t3p8_state_11 = k7t3p8_state_12 := by + have h : ∀ i j : Fin 7, k7t3p8_step_11.apply k7t3p8_state_11 i j = k7t3p8_state_12 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t3p8_state_13 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, {0, 1, 2, 3, 5}, Finset.Icc 0 4, Finset.Icc 0 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, {0, 1, 2, 3, 5}, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 4, {0, 2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t3p8_local_12 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}], + #[Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {0, 2}, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 5], + #[Finset.Icc 0 5, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5], + #[Finset.Icc 3 6, {0, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2}, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, Finset.Icc 2 5], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {0, 2}, {1, 2, 3, 4, 6}, ∅, Finset.Icc 1 4], + #[{1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t3p8_local_12_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t3p8_state_12 a b ∪ requiredMatrix 7 k7t3p8_step_12_data.required a b) 0 j = k7t3p8_local_12 0 j := by decide + +private theorem k7t3p8_local_12_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t3p8_state_12 a b ∪ requiredMatrix 7 k7t3p8_step_12_data.required a b) 1 j = k7t3p8_local_12 1 j := by decide + +private theorem k7t3p8_local_12_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t3p8_state_12 a b ∪ requiredMatrix 7 k7t3p8_step_12_data.required a b) 2 j = k7t3p8_local_12 2 j := by decide + +private theorem k7t3p8_local_12_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t3p8_state_12 a b ∪ requiredMatrix 7 k7t3p8_step_12_data.required a b) 3 j = k7t3p8_local_12 3 j := by decide + +private theorem k7t3p8_local_12_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t3p8_state_12 a b ∪ requiredMatrix 7 k7t3p8_step_12_data.required a b) 4 j = k7t3p8_local_12 4 j := by decide + +private theorem k7t3p8_local_12_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t3p8_state_12 a b ∪ requiredMatrix 7 k7t3p8_step_12_data.required a b) 5 j = k7t3p8_local_12 5 j := by decide + +private theorem k7t3p8_local_12_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t3p8_state_12 a b ∪ requiredMatrix 7 k7t3p8_step_12_data.required a b) 6 j = k7t3p8_local_12 6 j := by decide + +private theorem k7t3p8_local_12_eq : (fun a b => k7t3p8_state_12 a b ∪ requiredMatrix 7 k7t3p8_step_12_data.required a b) = k7t3p8_local_12 := by + funext i j + fin_cases i + + · exact k7t3p8_local_12_eq_row_0 j + + · exact k7t3p8_local_12_eq_row_1 j + + · exact k7t3p8_local_12_eq_row_2 j + + · exact k7t3p8_local_12_eq_row_3 j + + · exact k7t3p8_local_12_eq_row_4 j + + · exact k7t3p8_local_12_eq_row_5 j + + · exact k7t3p8_local_12_eq_row_6 j + +private theorem k7t3p8_local_12_paths : ∀ p ∈ k7t3p8_step_12_data.required, p.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_12_data.i k7t3p8_step_12_data.j) 7 := by decide + +private theorem k7t3p8_local_12_bad : k7t3p8_step_12_data.bad.Check (addedEdgeGraph k7t3p8.graph k7t3p8_step_12_data.i k7t3p8_step_12_data.j) k7t3p8_local_12 7 3 := by decide + +private theorem k7t3p8_step_12_check : k7t3p8_step_12.Check k7t3p8.graph k7t3p8_state_12 7 3 := by + change k7t3p8_step_12_data.Check k7t3p8.graph k7t3p8_state_12 7 3 + refine ⟨k7t3p8_local_12_paths, ?_⟩ + rw [k7t3p8_local_12_eq] + exact k7t3p8_local_12_bad + +private theorem k7t3p8_update_12 : k7t3p8_step_12.apply k7t3p8_state_12 = k7t3p8_state_13 := by + have h : ∀ i j : Fin 7, k7t3p8_step_12.apply k7t3p8_state_12 i j = k7t3p8_state_13 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k7t3p8_closure_13 : ClosureCheck k7t3p8.graph k7t3p8_state_13 7 3 [] := by trivial + +private theorem k7t3p8_closure_12 : ClosureCheck k7t3p8.graph k7t3p8_state_12 7 3 [k7t3p8_step_12] := by + constructor + · exact k7t3p8_step_12_check + · rw [k7t3p8_update_12] + exact k7t3p8_closure_13 + +private theorem k7t3p8_closure_11 : ClosureCheck k7t3p8.graph k7t3p8_state_11 7 3 [k7t3p8_step_11, k7t3p8_step_12] := by + constructor + · exact k7t3p8_step_11_check + · rw [k7t3p8_update_11] + exact k7t3p8_closure_12 + +private theorem k7t3p8_closure_10 : ClosureCheck k7t3p8.graph k7t3p8_state_10 7 3 [k7t3p8_step_10, k7t3p8_step_11, k7t3p8_step_12] := by + constructor + · exact k7t3p8_step_10_check + · rw [k7t3p8_update_10] + exact k7t3p8_closure_11 + +private theorem k7t3p8_closure_9 : ClosureCheck k7t3p8.graph k7t3p8_state_9 7 3 [k7t3p8_step_9, k7t3p8_step_10, k7t3p8_step_11, k7t3p8_step_12] := by + constructor + · exact k7t3p8_step_9_check + · rw [k7t3p8_update_9] + exact k7t3p8_closure_10 + +private theorem k7t3p8_closure_8 : ClosureCheck k7t3p8.graph k7t3p8_state_8 7 3 [k7t3p8_step_8, k7t3p8_step_9, k7t3p8_step_10, k7t3p8_step_11, k7t3p8_step_12] := by + constructor + · exact k7t3p8_step_8_check + · rw [k7t3p8_update_8] + exact k7t3p8_closure_9 + +private theorem k7t3p8_closure_7 : ClosureCheck k7t3p8.graph k7t3p8_state_7 7 3 [k7t3p8_step_7, k7t3p8_step_8, k7t3p8_step_9, k7t3p8_step_10, k7t3p8_step_11, k7t3p8_step_12] := by + constructor + · exact k7t3p8_step_7_check + · rw [k7t3p8_update_7] + exact k7t3p8_closure_8 + +private theorem k7t3p8_closure_6 : ClosureCheck k7t3p8.graph k7t3p8_state_6 7 3 [k7t3p8_step_6, k7t3p8_step_7, k7t3p8_step_8, k7t3p8_step_9, k7t3p8_step_10, k7t3p8_step_11, k7t3p8_step_12] := by + constructor + · exact k7t3p8_step_6_check + · rw [k7t3p8_update_6] + exact k7t3p8_closure_7 + +private theorem k7t3p8_closure_5 : ClosureCheck k7t3p8.graph k7t3p8_state_5 7 3 [k7t3p8_step_5, k7t3p8_step_6, k7t3p8_step_7, k7t3p8_step_8, k7t3p8_step_9, k7t3p8_step_10, k7t3p8_step_11, k7t3p8_step_12] := by + constructor + · exact k7t3p8_step_5_check + · rw [k7t3p8_update_5] + exact k7t3p8_closure_6 + +private theorem k7t3p8_closure_4 : ClosureCheck k7t3p8.graph k7t3p8_state_4 7 3 [k7t3p8_step_4, k7t3p8_step_5, k7t3p8_step_6, k7t3p8_step_7, k7t3p8_step_8, k7t3p8_step_9, k7t3p8_step_10, k7t3p8_step_11, k7t3p8_step_12] := by + constructor + · exact k7t3p8_step_4_check + · rw [k7t3p8_update_4] + exact k7t3p8_closure_5 + +private theorem k7t3p8_closure_3 : ClosureCheck k7t3p8.graph k7t3p8_state_3 7 3 [k7t3p8_step_3, k7t3p8_step_4, k7t3p8_step_5, k7t3p8_step_6, k7t3p8_step_7, k7t3p8_step_8, k7t3p8_step_9, k7t3p8_step_10, k7t3p8_step_11, k7t3p8_step_12] := by + constructor + · exact k7t3p8_step_3_check + · rw [k7t3p8_update_3] + exact k7t3p8_closure_4 + +private theorem k7t3p8_closure_2 : ClosureCheck k7t3p8.graph k7t3p8_state_2 7 3 [k7t3p8_step_2, k7t3p8_step_3, k7t3p8_step_4, k7t3p8_step_5, k7t3p8_step_6, k7t3p8_step_7, k7t3p8_step_8, k7t3p8_step_9, k7t3p8_step_10, k7t3p8_step_11, k7t3p8_step_12] := by + constructor + · exact k7t3p8_step_2_check + · rw [k7t3p8_update_2] + exact k7t3p8_closure_3 + +private theorem k7t3p8_closure_1 : ClosureCheck k7t3p8.graph k7t3p8_state_1 7 3 [k7t3p8_step_1, k7t3p8_step_2, k7t3p8_step_3, k7t3p8_step_4, k7t3p8_step_5, k7t3p8_step_6, k7t3p8_step_7, k7t3p8_step_8, k7t3p8_step_9, k7t3p8_step_10, k7t3p8_step_11, k7t3p8_step_12] := by + constructor + · exact k7t3p8_step_1_check + · rw [k7t3p8_update_1] + exact k7t3p8_closure_2 + +private theorem k7t3p8_closure_0 : ClosureCheck k7t3p8.graph k7t3p8_state_0 7 3 [k7t3p8_step_0, k7t3p8_step_1, k7t3p8_step_2, k7t3p8_step_3, k7t3p8_step_4, k7t3p8_step_5, k7t3p8_step_6, k7t3p8_step_7, k7t3p8_step_8, k7t3p8_step_9, k7t3p8_step_10, k7t3p8_step_11, k7t3p8_step_12] := by + constructor + · exact k7t3p8_step_0_check + · rw [k7t3p8_update_0] + exact k7t3p8_closure_1 + +private theorem k7t3p8_matrix_eq : k7t3p8.matrix 7 = k7t3p8_state_13 := by + change closureMatrix (k7t3p8.initialMatrix 7) _ = _ + rw [k7t3p8_initial_eq] + change closureMatrix k7t3p8_state_0 [k7t3p8_step_0, k7t3p8_step_1, k7t3p8_step_2, k7t3p8_step_3, k7t3p8_step_4, k7t3p8_step_5, k7t3p8_step_6, k7t3p8_step_7, k7t3p8_step_8, k7t3p8_step_9, k7t3p8_step_10, k7t3p8_step_11, k7t3p8_step_12] = _ + simp only [closureMatrix] + rw [k7t3p8_update_0, k7t3p8_update_1, k7t3p8_update_2, k7t3p8_update_3, k7t3p8_update_4, k7t3p8_update_5, k7t3p8_update_6, k7t3p8_update_7, k7t3p8_update_8, k7t3p8_update_9, k7t3p8_update_10, k7t3p8_update_11, k7t3p8_update_12] + +private theorem k7t3p8_part_0 : k7t3p8.chains.flatten = List.finRange _ := by decide + +private theorem k7t3p8_part_1 : k7t3p8.chains.map List.length = ([[2, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t3p8_part_2 : k7t3p8.chains.map (fun l => l.map (fun i => decide (i ∈ k7t3p8.clique))) = ([[2, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t3p8_templates_item_0 : (⟨0, 1, [], [], [2, 3], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 1⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_2 : (⟨0, 2, [], [], [3], 3, 5⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_3 : (⟨0, 2, [], [], [3, 4, 5, 6], 2, 2⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_4 : (⟨0, 3, [], [], [], 4, 6⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_5 : (⟨0, 3, [], [], [4, 5, 6], 3, 3⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_6 : (⟨0, 4, [], [], [3], 3, 5⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_7 : (⟨0, 4, [], [], [5, 6], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_8 : (⟨0, 4, [], [3, 2, 1], [5, 6], 1, 1⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_9 : (⟨0, 5, [], [], [4, 3], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_10 : (⟨0, 5, [], [], [6], 3, 5⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_11 : (⟨0, 6, [], [], [], 4, 6⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_12 : (⟨0, 6, [], [3, 2, 1], [], 3, 3⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_13 : (⟨1, 2, [], [0], [3], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_14 : (⟨1, 2, [], [0], [3, 4, 5, 6], 1, 1⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_15 : (⟨1, 3, [], [0], [4, 5, 6], 2, 2⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_16 : (⟨1, 4, [], [0], [3], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_17 : (⟨1, 4, [], [0], [5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_18 : (⟨1, 5, [], [0], [4, 3], 1, 3⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_19 : (⟨1, 5, [], [0], [6], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_20 : (⟨1, 6, [], [0], [], 3, 5⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_21 : (⟨1, 6, [], [3, 2], [], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_22 : (⟨2, 3, [], [0, 1], [], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_23 : (⟨2, 3, [], [0, 1], [4, 5, 6], 1, 1⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_24 : (⟨2, 4, [], [0, 1], [3], 1, 3⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_25 : (⟨2, 5, [], [0, 1], [4, 3], 1, 2⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_26 : (⟨2, 5, [], [0, 1], [6], 1, 3⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_27 : (⟨2, 5, [], [3], [6], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_28 : (⟨2, 6, [], [0, 1], [], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_29 : (⟨2, 6, [], [3], [], 3, 5⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_30 : (⟨2, 6, [], [0, 1], [5, 4, 3], 1, 1⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_31 : (⟨3, 4, [], [], [5, 6], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_32 : (⟨3, 4, [], [0, 1, 2], [5, 6], 1, 1⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_33 : (⟨3, 5, [], [0, 1, 2], [6], 2, 2⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_34 : (⟨3, 6, [], [], [], 4, 6⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_35 : (⟨3, 6, [], [0, 1, 2], [], 3, 3⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_36 : (⟨4, 5, [], [3], [6], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_37 : (⟨4, 5, [], [0, 1, 2, 3], [6], 1, 1⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_38 : (⟨4, 6, [], [3], [], 3, 5⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_39 : (⟨4, 6, [], [0, 1, 2, 3], [], 2, 2⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_40 : (⟨5, 6, [], [3, 4], [], 2, 4⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_item_41 : (⟨5, 6, [], [0, 1, 2, 3, 4], [], 1, 1⟩ : TemplateData (Fin 7)).Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t3p8_templates_block_0_check : ∀ T ∈ k7t3p8_templates_block_0, T.Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k7t3p8_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p8_templates_item_0, k7t3p8_templates_item_1, k7t3p8_templates_item_2, k7t3p8_templates_item_3, k7t3p8_templates_item_4, k7t3p8_templates_item_5, k7t3p8_templates_item_6, k7t3p8_templates_item_7, k7t3p8_templates_item_8, k7t3p8_templates_item_9, k7t3p8_templates_item_10, k7t3p8_templates_item_11⟩ + +private theorem k7t3p8_templates_block_1_check : ∀ T ∈ k7t3p8_templates_block_1, T.Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k7t3p8_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p8_templates_item_12, k7t3p8_templates_item_13, k7t3p8_templates_item_14, k7t3p8_templates_item_15, k7t3p8_templates_item_16, k7t3p8_templates_item_17, k7t3p8_templates_item_18, k7t3p8_templates_item_19, k7t3p8_templates_item_20, k7t3p8_templates_item_21, k7t3p8_templates_item_22, k7t3p8_templates_item_23⟩ + +private theorem k7t3p8_templates_block_2_check : ∀ T ∈ k7t3p8_templates_block_2, T.Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k7t3p8_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p8_templates_item_24, k7t3p8_templates_item_25, k7t3p8_templates_item_26, k7t3p8_templates_item_27, k7t3p8_templates_item_28, k7t3p8_templates_item_29, k7t3p8_templates_item_30, k7t3p8_templates_item_31, k7t3p8_templates_item_32, k7t3p8_templates_item_33, k7t3p8_templates_item_34, k7t3p8_templates_item_35⟩ + +private theorem k7t3p8_templates_block_3_check : ∀ T ∈ k7t3p8_templates_block_3, T.Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k7t3p8_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p8_templates_item_36, k7t3p8_templates_item_37, k7t3p8_templates_item_38, k7t3p8_templates_item_39, k7t3p8_templates_item_40, k7t3p8_templates_item_41⟩ + +private theorem k7t3p8_part_3 : ∀ T ∈ k7t3p8.templates, T.Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k7t3p8_templates_block_0 ++ k7t3p8_templates_block_1 ++ k7t3p8_templates_block_2 ++ k7t3p8_templates_block_3), T.Check k7t3p8.graph k7t3p8.clique 7 (patternAmount ([[2, 2]] : List (List ℕ))) (([[2, 2]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k7t3p8_templates_block_0_check, k7t3p8_templates_block_1_check⟩, k7t3p8_templates_block_2_check⟩, k7t3p8_templates_block_3_check⟩ + +private theorem k7t3p8_required_item_0 : (⟨0, 6, [1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 7)).Check k7t3p8.graph 7 := by decide + +private theorem k7t3p8_required_item_1 : (⟨1, 2, []⟩ : RequiredPathData (Fin 7)).Check k7t3p8.graph 7 := by decide + +private theorem k7t3p8_required_item_2 : (⟨2, 4, [3]⟩ : RequiredPathData (Fin 7)).Check k7t3p8.graph 7 := by decide + +private theorem k7t3p8_required_item_3 : (⟨4, 5, []⟩ : RequiredPathData (Fin 7)).Check k7t3p8.graph 7 := by decide + +private theorem k7t3p8_part_4 : ∀ p ∈ k7t3p8.required, p.Check k7t3p8.graph 7 := by + simp only [k7t3p8, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t3p8_required_item_0, k7t3p8_required_item_1, k7t3p8_required_item_2, k7t3p8_required_item_3⟩ + +private theorem k7t3p8_part_5 : ClosureCheck k7t3p8.graph (k7t3p8.initialMatrix 7) 7 3 k7t3p8.closure := by + rw [k7t3p8_initial_eq] + exact k7t3p8_closure_0 + +private theorem k7t3p8_part_6 : k7t3p8.bad.Check k7t3p8.graph (k7t3p8.matrix 7) 7 3 := by + rw [k7t3p8_matrix_eq] + decide + +theorem k7t3p8_check : k7t3p8.Check 7 3 [[2, 2]] := + ⟨k7t3p8_part_0, k7t3p8_part_1, k7t3p8_part_2, k7t3p8_part_3, k7t3p8_part_4, k7t3p8_part_5, k7t3p8_part_6⟩ +def k7t4p0 : LayoutCertificate 4 where + chains := [[0], [1], [2], [3]] + clique := {0, 1, 2, 3} + templates := [⟨0, 1, [], [], [], 1, 6⟩, + ⟨0, 2, [], [], [], 1, 6⟩, + ⟨0, 3, [], [], [], 1, 6⟩, + ⟨1, 2, [], [], [], 1, 6⟩, + ⟨1, 3, [], [], [], 1, 6⟩, + ⟨2, 3, [], [], [], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (1, 2), (2, 2)}⟩ + + +private def k7t4p0_state_0 : ForbiddenMatrix 4 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p0_initial_eq_row_0 : ∀ j : Fin 4, (k7t4p0.initialMatrix 7) 0 j = k7t4p0_state_0 0 j := by decide + +private theorem k7t4p0_initial_eq_row_1 : ∀ j : Fin 4, (k7t4p0.initialMatrix 7) 1 j = k7t4p0_state_0 1 j := by decide + +private theorem k7t4p0_initial_eq_row_2 : ∀ j : Fin 4, (k7t4p0.initialMatrix 7) 2 j = k7t4p0_state_0 2 j := by decide + +private theorem k7t4p0_initial_eq_row_3 : ∀ j : Fin 4, (k7t4p0.initialMatrix 7) 3 j = k7t4p0_state_0 3 j := by decide + +private theorem k7t4p0_initial_eq : (k7t4p0.initialMatrix 7) = k7t4p0_state_0 := by + funext i j + fin_cases i + + · exact k7t4p0_initial_eq_row_0 j + + · exact k7t4p0_initial_eq_row_1 j + + · exact k7t4p0_initial_eq_row_2 j + + · exact k7t4p0_initial_eq_row_3 j + +private theorem k7t4p0_closure_0 : ClosureCheck k7t4p0.graph k7t4p0_state_0 7 4 [] := by trivial + +private theorem k7t4p0_matrix_eq : k7t4p0.matrix 7 = k7t4p0_state_0 := by + change closureMatrix (k7t4p0.initialMatrix 7) _ = _ + rw [k7t4p0_initial_eq] + change closureMatrix k7t4p0_state_0 [] = _ + rfl + +private theorem k7t4p0_part_0 : k7t4p0.chains.flatten = List.finRange _ := by decide + +private theorem k7t4p0_part_1 : k7t4p0.chains.map List.length = ([[], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t4p0_part_2 : k7t4p0.chains.map (fun l => l.map (fun i => decide (i ∈ k7t4p0.clique))) = ([[], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k7t4p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 6⟩ : TemplateData (Fin 4)).Check k7t4p0.graph k7t4p0.clique 7 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 6⟩ : TemplateData (Fin 4)).Check k7t4p0.graph k7t4p0.clique 7 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 6⟩ : TemplateData (Fin 4)).Check k7t4p0.graph k7t4p0.clique 7 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p0_templates_item_3 : (⟨1, 2, [], [], [], 1, 6⟩ : TemplateData (Fin 4)).Check k7t4p0.graph k7t4p0.clique 7 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p0_templates_item_4 : (⟨1, 3, [], [], [], 1, 6⟩ : TemplateData (Fin 4)).Check k7t4p0.graph k7t4p0.clique 7 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p0_templates_item_5 : (⟨2, 3, [], [], [], 1, 6⟩ : TemplateData (Fin 4)).Check k7t4p0.graph k7t4p0.clique 7 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p0_part_3 : ∀ T ∈ k7t4p0.templates, T.Check k7t4p0.graph k7t4p0.clique 7 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k7t4p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t4p0_templates_item_0, k7t4p0_templates_item_1, k7t4p0_templates_item_2, k7t4p0_templates_item_3, k7t4p0_templates_item_4, k7t4p0_templates_item_5⟩ + +private theorem k7t4p0_part_4 : ∀ p ∈ k7t4p0.required, p.Check k7t4p0.graph 7 := by decide + +private theorem k7t4p0_part_5 : ClosureCheck k7t4p0.graph (k7t4p0.initialMatrix 7) 7 4 k7t4p0.closure := by + rw [k7t4p0_initial_eq] + exact k7t4p0_closure_0 + +private theorem k7t4p0_part_6 : k7t4p0.bad.Check k7t4p0.graph (k7t4p0.matrix 7) 7 4 := by + rw [k7t4p0_matrix_eq] + decide + +theorem k7t4p0_check : k7t4p0.Check 7 4 [[], [], [], []] := + ⟨k7t4p0_part_0, k7t4p0_part_1, k7t4p0_part_2, k7t4p0_part_3, k7t4p0_part_4, k7t4p0_part_5, k7t4p0_part_6⟩ +def k7t4p1 : LayoutCertificate 5 where + chains := [[0], [1], [2, 3, 4]] + clique := {0, 1, 2, 4} + templates := [⟨0, 1, [], [], [], 2, 6⟩, + ⟨0, 1, [[2, 3, 4]], [], [], 1, 3⟩, + ⟨0, 2, [], [], [], 2, 6⟩, + ⟨0, 2, [], [], [3, 4], 1, 4⟩, + ⟨0, 3, [], [], [2], 1, 5⟩, + ⟨0, 4, [], [], [], 2, 6⟩, + ⟨0, 4, [], [], [3, 2], 1, 4⟩, + ⟨1, 2, [], [], [], 2, 6⟩, + ⟨1, 2, [], [], [3, 4], 1, 4⟩, + ⟨1, 3, [], [], [2], 1, 5⟩, + ⟨1, 4, [], [], [], 2, 6⟩, + ⟨1, 4, [], [], [3, 2], 1, 4⟩, + ⟨2, 3, [], [], [4], 1, 5⟩, + ⟨3, 4, [], [2], [], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (3, 2)}⟩ + + +private def k7t4p1_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p1_initial_eq_row_0 : ∀ j : Fin 5, (k7t4p1.initialMatrix 7) 0 j = k7t4p1_state_0 0 j := by decide + +private theorem k7t4p1_initial_eq_row_1 : ∀ j : Fin 5, (k7t4p1.initialMatrix 7) 1 j = k7t4p1_state_0 1 j := by decide + +private theorem k7t4p1_initial_eq_row_2 : ∀ j : Fin 5, (k7t4p1.initialMatrix 7) 2 j = k7t4p1_state_0 2 j := by decide + +private theorem k7t4p1_initial_eq_row_3 : ∀ j : Fin 5, (k7t4p1.initialMatrix 7) 3 j = k7t4p1_state_0 3 j := by decide + +private theorem k7t4p1_initial_eq_row_4 : ∀ j : Fin 5, (k7t4p1.initialMatrix 7) 4 j = k7t4p1_state_0 4 j := by decide + +private theorem k7t4p1_initial_eq : (k7t4p1.initialMatrix 7) = k7t4p1_state_0 := by + funext i j + fin_cases i + + · exact k7t4p1_initial_eq_row_0 j + + · exact k7t4p1_initial_eq_row_1 j + + · exact k7t4p1_initial_eq_row_2 j + + · exact k7t4p1_initial_eq_row_3 j + + · exact k7t4p1_initial_eq_row_4 j + +private theorem k7t4p1_closure_0 : ClosureCheck k7t4p1.graph k7t4p1_state_0 7 4 [] := by trivial + +private theorem k7t4p1_matrix_eq : k7t4p1.matrix 7 = k7t4p1_state_0 := by + change closureMatrix (k7t4p1.initialMatrix 7) _ = _ + rw [k7t4p1_initial_eq] + change closureMatrix k7t4p1_state_0 [] = _ + rfl + +private theorem k7t4p1_part_0 : k7t4p1.chains.flatten = List.finRange _ := by decide + +private theorem k7t4p1_part_1 : k7t4p1.chains.map List.length = ([[], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t4p1_part_2 : k7t4p1.chains.map (fun l => l.map (fun i => decide (i ∈ k7t4p1.clique))) = ([[], [], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t4p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 6⟩ : TemplateData (Fin 5)).Check k7t4p1.graph k7t4p1.clique 7 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p1_templates_item_1 : (⟨0, 1, [[2, 3, 4]], [], [], 1, 3⟩ : TemplateData (Fin 5)).Check k7t4p1.graph k7t4p1.clique 7 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p1_templates_item_2 : (⟨0, 2, [], [], [], 2, 6⟩ : TemplateData (Fin 5)).Check k7t4p1.graph k7t4p1.clique 7 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p1_templates_item_3 : (⟨0, 2, [], [], [3, 4], 1, 4⟩ : TemplateData (Fin 5)).Check k7t4p1.graph k7t4p1.clique 7 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p1_templates_item_4 : (⟨0, 3, [], [], [2], 1, 5⟩ : TemplateData (Fin 5)).Check k7t4p1.graph k7t4p1.clique 7 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p1_templates_item_5 : (⟨0, 4, [], [], [], 2, 6⟩ : TemplateData (Fin 5)).Check k7t4p1.graph k7t4p1.clique 7 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p1_templates_item_6 : (⟨0, 4, [], [], [3, 2], 1, 4⟩ : TemplateData (Fin 5)).Check k7t4p1.graph k7t4p1.clique 7 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p1_templates_item_7 : (⟨1, 2, [], [], [], 2, 6⟩ : TemplateData (Fin 5)).Check k7t4p1.graph k7t4p1.clique 7 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p1_templates_item_8 : (⟨1, 2, [], [], [3, 4], 1, 4⟩ : TemplateData (Fin 5)).Check k7t4p1.graph k7t4p1.clique 7 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p1_templates_item_9 : (⟨1, 3, [], [], [2], 1, 5⟩ : TemplateData (Fin 5)).Check k7t4p1.graph k7t4p1.clique 7 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p1_templates_item_10 : (⟨1, 4, [], [], [], 2, 6⟩ : TemplateData (Fin 5)).Check k7t4p1.graph k7t4p1.clique 7 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p1_templates_item_11 : (⟨1, 4, [], [], [3, 2], 1, 4⟩ : TemplateData (Fin 5)).Check k7t4p1.graph k7t4p1.clique 7 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p1_templates_item_12 : (⟨2, 3, [], [], [4], 1, 5⟩ : TemplateData (Fin 5)).Check k7t4p1.graph k7t4p1.clique 7 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p1_templates_item_13 : (⟨3, 4, [], [2], [], 1, 5⟩ : TemplateData (Fin 5)).Check k7t4p1.graph k7t4p1.clique 7 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p1_part_3 : ∀ T ∈ k7t4p1.templates, T.Check k7t4p1.graph k7t4p1.clique 7 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k7t4p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t4p1_templates_item_0, k7t4p1_templates_item_1, k7t4p1_templates_item_2, k7t4p1_templates_item_3, k7t4p1_templates_item_4, k7t4p1_templates_item_5, k7t4p1_templates_item_6, k7t4p1_templates_item_7, k7t4p1_templates_item_8, k7t4p1_templates_item_9, k7t4p1_templates_item_10, k7t4p1_templates_item_11, k7t4p1_templates_item_12, k7t4p1_templates_item_13⟩ + +private theorem k7t4p1_part_4 : ∀ p ∈ k7t4p1.required, p.Check k7t4p1.graph 7 := by decide + +private theorem k7t4p1_part_5 : ClosureCheck k7t4p1.graph (k7t4p1.initialMatrix 7) 7 4 k7t4p1.closure := by + rw [k7t4p1_initial_eq] + exact k7t4p1_closure_0 + +private theorem k7t4p1_part_6 : k7t4p1.bad.Check k7t4p1.graph (k7t4p1.matrix 7) 7 4 := by + rw [k7t4p1_matrix_eq] + decide + +theorem k7t4p1_check : k7t4p1.Check 7 4 [[], [], [1]] := + ⟨k7t4p1_part_0, k7t4p1_part_1, k7t4p1_part_2, k7t4p1_part_3, k7t4p1_part_4, k7t4p1_part_5, k7t4p1_part_6⟩ +def k7t4p2 : LayoutCertificate 6 where + chains := [[0], [1], [2, 3, 4, 5]] + clique := {0, 1, 2, 5} + templates := [⟨0, 1, [], [], [], 3, 6⟩, + ⟨0, 1, [[2, 3, 4, 5]], [], [], 1, 2⟩, + ⟨0, 2, [], [], [], 3, 6⟩, + ⟨0, 2, [], [], [3, 4, 5], 1, 3⟩, + ⟨0, 3, [], [], [2], 2, 5⟩, + ⟨0, 3, [], [], [4, 5], 1, 4⟩, + ⟨0, 4, [], [], [3, 2], 1, 4⟩, + ⟨0, 5, [], [], [4, 3, 2], 1, 3⟩, + ⟨1, 2, [], [], [], 3, 6⟩, + ⟨1, 2, [], [], [3, 4, 5], 1, 3⟩, + ⟨1, 3, [], [], [2], 2, 5⟩, + ⟨1, 3, [], [], [4, 5], 1, 4⟩, + ⟨1, 4, [], [], [3, 2], 1, 4⟩, + ⟨1, 5, [], [], [4, 3, 2], 1, 3⟩, + ⟨2, 3, [], [], [4, 5], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k7t4p2_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p2_initial_eq_row_0 : ∀ j : Fin 6, (k7t4p2.initialMatrix 7) 0 j = k7t4p2_state_0 0 j := by decide + +private theorem k7t4p2_initial_eq_row_1 : ∀ j : Fin 6, (k7t4p2.initialMatrix 7) 1 j = k7t4p2_state_0 1 j := by decide + +private theorem k7t4p2_initial_eq_row_2 : ∀ j : Fin 6, (k7t4p2.initialMatrix 7) 2 j = k7t4p2_state_0 2 j := by decide + +private theorem k7t4p2_initial_eq_row_3 : ∀ j : Fin 6, (k7t4p2.initialMatrix 7) 3 j = k7t4p2_state_0 3 j := by decide + +private theorem k7t4p2_initial_eq_row_4 : ∀ j : Fin 6, (k7t4p2.initialMatrix 7) 4 j = k7t4p2_state_0 4 j := by decide + +private theorem k7t4p2_initial_eq_row_5 : ∀ j : Fin 6, (k7t4p2.initialMatrix 7) 5 j = k7t4p2_state_0 5 j := by decide + +private theorem k7t4p2_initial_eq : (k7t4p2.initialMatrix 7) = k7t4p2_state_0 := by + funext i j + fin_cases i + + · exact k7t4p2_initial_eq_row_0 j + + · exact k7t4p2_initial_eq_row_1 j + + · exact k7t4p2_initial_eq_row_2 j + + · exact k7t4p2_initial_eq_row_3 j + + · exact k7t4p2_initial_eq_row_4 j + + · exact k7t4p2_initial_eq_row_5 j + +private theorem k7t4p2_closure_0 : ClosureCheck k7t4p2.graph k7t4p2_state_0 7 4 [] := by trivial + +private theorem k7t4p2_matrix_eq : k7t4p2.matrix 7 = k7t4p2_state_0 := by + change closureMatrix (k7t4p2.initialMatrix 7) _ = _ + rw [k7t4p2_initial_eq] + change closureMatrix k7t4p2_state_0 [] = _ + rfl + +private theorem k7t4p2_part_0 : k7t4p2.chains.flatten = List.finRange _ := by decide + +private theorem k7t4p2_part_1 : k7t4p2.chains.map List.length = ([[], [], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t4p2_part_2 : k7t4p2.chains.map (fun l => l.map (fun i => decide (i ∈ k7t4p2.clique))) = ([[], [], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t4p2_templates_item_0 : (⟨0, 1, [], [], [], 3, 6⟩ : TemplateData (Fin 6)).Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p2_templates_item_1 : (⟨0, 1, [[2, 3, 4, 5]], [], [], 1, 2⟩ : TemplateData (Fin 6)).Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p2_templates_item_2 : (⟨0, 2, [], [], [], 3, 6⟩ : TemplateData (Fin 6)).Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p2_templates_item_3 : (⟨0, 2, [], [], [3, 4, 5], 1, 3⟩ : TemplateData (Fin 6)).Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p2_templates_item_4 : (⟨0, 3, [], [], [2], 2, 5⟩ : TemplateData (Fin 6)).Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p2_templates_item_5 : (⟨0, 3, [], [], [4, 5], 1, 4⟩ : TemplateData (Fin 6)).Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p2_templates_item_6 : (⟨0, 4, [], [], [3, 2], 1, 4⟩ : TemplateData (Fin 6)).Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p2_templates_item_7 : (⟨0, 5, [], [], [4, 3, 2], 1, 3⟩ : TemplateData (Fin 6)).Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p2_templates_item_8 : (⟨1, 2, [], [], [], 3, 6⟩ : TemplateData (Fin 6)).Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p2_templates_item_9 : (⟨1, 2, [], [], [3, 4, 5], 1, 3⟩ : TemplateData (Fin 6)).Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p2_templates_item_10 : (⟨1, 3, [], [], [2], 2, 5⟩ : TemplateData (Fin 6)).Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p2_templates_item_11 : (⟨1, 3, [], [], [4, 5], 1, 4⟩ : TemplateData (Fin 6)).Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p2_templates_item_12 : (⟨1, 4, [], [], [3, 2], 1, 4⟩ : TemplateData (Fin 6)).Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p2_templates_item_13 : (⟨1, 5, [], [], [4, 3, 2], 1, 3⟩ : TemplateData (Fin 6)).Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p2_templates_item_14 : (⟨2, 3, [], [], [4, 5], 1, 4⟩ : TemplateData (Fin 6)).Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p2_part_3 : ∀ T ∈ k7t4p2.templates, T.Check k7t4p2.graph k7t4p2.clique 7 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k7t4p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t4p2_templates_item_0, k7t4p2_templates_item_1, k7t4p2_templates_item_2, k7t4p2_templates_item_3, k7t4p2_templates_item_4, k7t4p2_templates_item_5, k7t4p2_templates_item_6, k7t4p2_templates_item_7, k7t4p2_templates_item_8, k7t4p2_templates_item_9, k7t4p2_templates_item_10, k7t4p2_templates_item_11, k7t4p2_templates_item_12, k7t4p2_templates_item_13, k7t4p2_templates_item_14⟩ + +private theorem k7t4p2_part_4 : ∀ p ∈ k7t4p2.required, p.Check k7t4p2.graph 7 := by decide + +private theorem k7t4p2_part_5 : ClosureCheck k7t4p2.graph (k7t4p2.initialMatrix 7) 7 4 k7t4p2.closure := by + rw [k7t4p2_initial_eq] + exact k7t4p2_closure_0 + +private theorem k7t4p2_part_6 : k7t4p2.bad.Check k7t4p2.graph (k7t4p2.matrix 7) 7 4 := by + rw [k7t4p2_matrix_eq] + decide + +theorem k7t4p2_check : k7t4p2.Check 7 4 [[], [], [2]] := + ⟨k7t4p2_part_0, k7t4p2_part_1, k7t4p2_part_2, k7t4p2_part_3, k7t4p2_part_4, k7t4p2_part_5, k7t4p2_part_6⟩ +private def k7t4p3_step_0_data : EdgeAttachmentData 7 := ⟨3, 0, [⟨0, 6, [3, 2, 1]⟩, ⟨0, 4, [3, 2, 1, 6, 5]⟩, ⟨0, 1, [3, 4, 5, 6]⟩, ⟨1, 6, [0, 3, 2]⟩, ⟨1, 4, [0, 3, 2, 6, 5]⟩, ⟨1, 0, [6, 2, 3]⟩, ⟨1, 0, [6, 5, 4, 3]⟩, ⟨6, 2, [5, 4, 3, 0, 1]⟩, ⟨6, 2, [5, 4, 3, 0]⟩], ⟨none, {(1, 3), (0, 3), (6, 3)}⟩⟩ + +private def k7t4p3_step_0 : ClosureStep 7 := .edge k7t4p3_step_0_data + +private def k7t4p3_step_1_data : EdgeAttachmentData 7 := ⟨3, 1, [⟨0, 6, [1, 3, 2]⟩, ⟨0, 4, [1, 3, 2, 6, 5]⟩, ⟨0, 1, [6, 2, 3]⟩, ⟨0, 1, [6, 5, 4, 3]⟩, ⟨1, 6, [3, 2, 0]⟩, ⟨1, 4, [3, 2, 0, 6, 5]⟩, ⟨1, 0, [3, 4, 5, 6]⟩, ⟨6, 2, [5, 4, 3, 1, 0]⟩, ⟨6, 2, [5, 4, 3, 1]⟩], ⟨none, {(0, 3), (1, 3), (6, 3)}⟩⟩ + +private def k7t4p3_step_1 : ClosureStep 7 := .edge k7t4p3_step_1_data + +private def k7t4p3_step_2_data : EdgeAttachmentData 7 := ⟨4, 0, [⟨0, 1, [4, 3, 2]⟩, ⟨0, 1, [4, 3, 2, 6]⟩, ⟨1, 0, [2, 6, 5, 4]⟩, ⟨3, 6, [2, 1, 0, 4, 5]⟩, ⟨3, 5, [2, 1, 6, 0, 4]⟩], ⟨none, {(0, 3), (1, 3), (3, 2)}⟩⟩ + +private def k7t4p3_step_2 : ClosureStep 7 := .edge k7t4p3_step_2_data + +private def k7t4p3_step_3_required_block_0 : List (RequiredPathData (Fin 8)) := [⟨4, 0, [3, 1, 2, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 7, 6, 5]⟩, ⟨4, 0, [3, 1]⟩, ⟨4, 7, [3, 1, 0, 5, 6]⟩, ⟨4, 2, [3, 1, 0, 5, 6, 7]⟩, ⟨4, 0, [3, 2, 1]⟩, ⟨4, 6, [3, 2, 1, 0, 5]⟩, ⟨4, 7, [3, 2, 1, 0, 5, 6]⟩, ⟨4, 0, [3, 2, 7, 1]⟩, ⟨4, 6, [3, 2, 7, 1, 0, 5]⟩, ⟨4, 1, [3, 2, 7, 6, 5, 0]⟩, ⟨6, 0, [5, 4, 3, 1]⟩] + +private def k7t4p3_step_3_required_block_1 : List (RequiredPathData (Fin 8)) := [⟨6, 0, [5, 4, 3, 2, 1]⟩, ⟨6, 0, [5, 4, 3, 2, 7, 1]⟩, ⟨6, 4, [5, 0, 1, 2, 3]⟩, ⟨6, 3, [5, 0, 1, 2, 7]⟩, ⟨6, 4, [5, 0, 1, 2, 7, 3]⟩, ⟨6, 0, [7, 1]⟩, ⟨6, 2, [7, 1, 0, 5, 4, 3]⟩, ⟨6, 0, [7, 2, 1]⟩, ⟨6, 3, [7, 2, 1, 0, 5, 4]⟩, ⟨6, 1, [7, 2, 3, 4, 5, 0]⟩, ⟨0, 6, [1, 2, 3, 4, 5]⟩, ⟨0, 7, [1, 2, 3, 4, 5, 6]⟩] + +private def k7t4p3_step_3_required_block_2 : List (RequiredPathData (Fin 8)) := [⟨0, 5, [1, 2, 3, 7, 6]⟩, ⟨0, 4, [1, 2, 3, 7, 6, 5]⟩, ⟨0, 6, [1, 2, 7, 3, 4, 5]⟩, ⟨0, 4, [1, 2, 7, 6, 5]⟩, ⟨0, 3, [1, 2, 7, 6, 5, 4]⟩, ⟨0, 7, [1, 3, 4, 5, 6]⟩, ⟨0, 2, [1, 3, 4, 5, 6, 7]⟩, ⟨0, 3, [1, 7, 6, 5, 4]⟩, ⟨0, 2, [5, 4, 3, 1, 7]⟩, ⟨0, 1, [5, 4, 3, 2, 7]⟩] + +private def k7t4p3_step_3_data : FreshAttachmentData 7 := ⟨4, 0, k7t4p3_step_3_required_block_0 ++ k7t4p3_step_3_required_block_1 ++ k7t4p3_step_3_required_block_2, ⟨none, {(4, 2), (6, 2), (0, 2)}⟩⟩ + +private def k7t4p3_step_3 : ClosureStep 7 := .fresh k7t4p3_step_3_data + +private def k7t4p3_step_4_data : EdgeAttachmentData 7 := ⟨4, 1, [⟨0, 1, [2, 3, 4]⟩, ⟨0, 1, [2, 6, 5, 4]⟩, ⟨1, 0, [4, 3, 2, 6]⟩, ⟨3, 6, [2, 0, 1, 4, 5]⟩, ⟨3, 5, [2, 0, 6, 1, 4]⟩], ⟨none, {(0, 3), (1, 3), (3, 2)}⟩⟩ + +private def k7t4p3_step_4 : ClosureStep 7 := .edge k7t4p3_step_4_data + +private def k7t4p3_step_5_required_block_0 : List (RequiredPathData (Fin 8)) := [⟨4, 0, [3, 1, 2, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 2]⟩, ⟨4, 6, [3, 1, 2, 0, 5]⟩, ⟨4, 7, [3, 1, 2, 0, 5, 6]⟩, ⟨4, 0, [3, 1, 7, 2]⟩, ⟨4, 6, [3, 1, 7, 2, 0, 5]⟩, ⟨4, 0, [3, 1, 7, 6, 5]⟩, ⟨4, 2, [3, 1, 7, 6, 5, 0]⟩, ⟨4, 0, [3, 2]⟩, ⟨4, 7, [3, 2, 0, 5, 6]⟩, ⟨4, 1, [3, 2, 0, 5, 6, 7]⟩, ⟨6, 0, [5, 4, 3, 1, 2]⟩] + +private def k7t4p3_step_5_required_block_1 : List (RequiredPathData (Fin 8)) := [⟨6, 0, [5, 4, 3, 1, 7, 2]⟩, ⟨6, 0, [5, 4, 3, 2]⟩, ⟨6, 4, [5, 0, 2, 1, 3]⟩, ⟨6, 3, [5, 0, 2, 1, 7]⟩, ⟨6, 4, [5, 0, 2, 1, 7, 3]⟩, ⟨6, 0, [7, 1, 2]⟩, ⟨6, 3, [7, 1, 2, 0, 5, 4]⟩, ⟨6, 2, [7, 1, 3, 4, 5, 0]⟩, ⟨6, 0, [7, 2]⟩, ⟨6, 1, [7, 2, 0, 5, 4, 3]⟩, ⟨0, 6, [2, 1, 3, 4, 5]⟩, ⟨0, 7, [2, 1, 3, 4, 5, 6]⟩] + +private def k7t4p3_step_5_required_block_2 : List (RequiredPathData (Fin 8)) := [⟨0, 5, [2, 1, 3, 7, 6]⟩, ⟨0, 4, [2, 1, 3, 7, 6, 5]⟩, ⟨0, 6, [2, 1, 7, 3, 4, 5]⟩, ⟨0, 4, [2, 1, 7, 6, 5]⟩, ⟨0, 3, [2, 1, 7, 6, 5, 4]⟩, ⟨0, 7, [2, 3, 4, 5, 6]⟩, ⟨0, 1, [2, 3, 4, 5, 6, 7]⟩, ⟨0, 3, [2, 7, 6, 5, 4]⟩, ⟨0, 2, [5, 4, 3, 1, 7]⟩, ⟨0, 1, [5, 4, 3, 2, 7]⟩] + +private def k7t4p3_step_5_data : FreshAttachmentData 7 := ⟨4, 1, k7t4p3_step_5_required_block_0 ++ k7t4p3_step_5_required_block_1 ++ k7t4p3_step_5_required_block_2, ⟨none, {(4, 2), (6, 2), (0, 2)}⟩⟩ + +private def k7t4p3_step_5 : ClosureStep 7 := .fresh k7t4p3_step_5_data + +private def k7t4p3_step_6_data : EdgeAttachmentData 7 := ⟨4, 2, [⟨0, 1, [2, 4, 5, 6]⟩, ⟨3, 5, [4, 2, 0, 1, 6]⟩, ⟨5, 3, [6, 0, 1, 2, 4]⟩], ⟨none, {(3, 2), (5, 3), (0, 2), (1, 0)}⟩⟩ + +private def k7t4p3_step_6 : ClosureStep 7 := .edge k7t4p3_step_6_data + +private def k7t4p3_step_7_data : FreshAttachmentData 7 := ⟨4, 2, [⟨1, 0, [2, 3, 7, 6, 5]⟩, ⟨1, 0, [2, 7, 6, 5, 4, 3]⟩, ⟨1, 4, [2, 7, 6, 5, 0, 3]⟩, ⟨4, 0, [3, 1, 2, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 7, 6, 5]⟩, ⟨4, 2, [3, 0, 5, 6, 7, 1]⟩, ⟨4, 1, [3, 0, 5, 6, 7, 2]⟩, ⟨4, 7, [5, 0, 3, 1, 2]⟩, ⟨4, 6, [5, 0, 3, 1, 2, 7]⟩, ⟨4, 6, [5, 0, 3, 1, 7]⟩, ⟨6, 0, [7, 1, 2, 3, 4, 5]⟩, ⟨6, 0, [7, 1, 2, 3]⟩, ⟨6, 4, [7, 1, 2, 3, 0, 5]⟩, ⟨6, 0, [7, 1, 3, 4, 5]⟩, ⟨6, 4, [7, 1, 3, 0, 5]⟩], ⟨none, {(4, 2), (6, 3), (1, 2)}⟩⟩ + +private def k7t4p3_step_7 : ClosureStep 7 := .fresh k7t4p3_step_7_data + +private def k7t4p3_step_8_data : EdgeAttachmentData 7 := ⟨5, 0, [⟨0, 2, [5, 4, 3]⟩, ⟨0, 1, [5, 4, 3, 2]⟩, ⟨0, 4, [5, 6, 1, 2, 3]⟩, ⟨1, 2, [0, 5, 6]⟩, ⟨1, 4, [0, 5, 6, 2, 3]⟩, ⟨1, 0, [2, 3, 4, 5]⟩, ⟨1, 0, [2, 6, 5]⟩, ⟨2, 6, [3, 4, 5, 0, 1]⟩, ⟨2, 6, [3, 4, 5, 0]⟩], ⟨none, {(1, 3), (0, 3), (2, 3)}⟩⟩ + +private def k7t4p3_step_8 : ClosureStep 7 := .edge k7t4p3_step_8_data + +private def k7t4p3_step_9_data : EdgeAttachmentData 7 := ⟨5, 3, [⟨0, 4, [1, 2, 6, 5, 3]⟩, ⟨0, 1, [2, 3, 5, 6]⟩, ⟨0, 2, [6, 5, 3]⟩, ⟨2, 4, [0, 1, 6, 5, 3]⟩, ⟨2, 3, [6, 5]⟩], ⟨none, {(0, 3), (2, 3), (4, 0), (3, 1)}⟩⟩ + +private def k7t4p3_step_9 : ClosureStep 7 := .edge k7t4p3_step_9_data + +private def k7t4p3_step_10_data : EdgeAttachmentData 7 := ⟨6, 3, [⟨0, 4, [1, 2, 3, 6, 5]⟩, ⟨2, 5, [0, 1, 6, 3, 4]⟩, ⟨2, 5, [0, 6, 3, 4]⟩, ⟨2, 0, [3, 6, 1]⟩, ⟨5, 2, [4, 3, 6, 0, 1]⟩], ⟨none, {(2, 3), (0, 3), (5, 2)}⟩⟩ + +private def k7t4p3_step_10 : ClosureStep 7 := .edge k7t4p3_step_10_data + +private def k7t4p3_step_11_data : EdgeAttachmentData 7 := ⟨6, 4, [⟨0, 1, [2, 3, 4, 6]⟩, ⟨3, 5, [2, 0, 1, 6, 4]⟩, ⟨5, 3, [4, 6, 0, 1, 2]⟩], ⟨none, {(3, 2), (0, 2), (5, 3), (1, 0)}⟩⟩ + +private def k7t4p3_step_11 : ClosureStep 7 := .edge k7t4p3_step_11_data + +private def k7t4p3_step_12_data : FreshAttachmentData 7 := ⟨6, 4, [⟨1, 0, [2, 3, 4, 5, 6, 7]⟩, ⟨1, 6, [2, 3, 4, 5, 0, 7]⟩, ⟨1, 0, [2, 3, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 2, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 2, 7]⟩, ⟨4, 6, [3, 1, 2, 7, 0, 5]⟩, ⟨4, 0, [3, 1, 7, 6, 5]⟩, ⟨4, 6, [3, 1, 7, 0, 5]⟩, ⟨6, 0, [5, 4, 3, 1, 2, 7]⟩, ⟨6, 0, [5, 4, 3, 1, 7]⟩, ⟨6, 3, [5, 0, 7, 1, 2]⟩, ⟨6, 4, [5, 0, 7, 1, 2, 3]⟩, ⟨6, 4, [5, 0, 7, 1, 3]⟩, ⟨6, 2, [7, 0, 5, 4, 3, 1]⟩, ⟨6, 1, [7, 0, 5, 4, 3, 2]⟩], ⟨none, {(6, 2), (4, 3), (1, 2)}⟩⟩ + +private def k7t4p3_step_12 : ClosureStep 7 := .fresh k7t4p3_step_12_data + +def k7t4p3 : LayoutCertificate 7 where + chains := [[0], [1], [2, 3, 4, 5, 6]] + clique := {0, 1, 2, 6} + templates := [⟨0, 1, [], [], [], 4, 6⟩, + ⟨0, 1, [[2, 3, 4, 5, 6]], [], [], 1, 1⟩, + ⟨0, 2, [], [], [], 4, 6⟩, + ⟨0, 2, [], [], [3, 4, 5, 6], 1, 2⟩, + ⟨0, 3, [], [], [2], 3, 5⟩, + ⟨0, 3, [], [], [4, 5, 6], 1, 3⟩, + ⟨0, 4, [], [], [3, 2], 2, 4⟩, + ⟨0, 5, [], [], [4, 3, 2], 1, 3⟩, + ⟨0, 5, [], [], [6], 3, 5⟩, + ⟨0, 6, [], [], [], 4, 6⟩, + ⟨0, 6, [], [], [5, 4, 3, 2], 1, 2⟩, + ⟨1, 2, [], [], [], 4, 6⟩, + ⟨1, 2, [], [], [3, 4, 5, 6], 1, 2⟩, + ⟨1, 3, [], [], [2], 3, 5⟩, + ⟨1, 3, [], [], [4, 5, 6], 1, 3⟩, + ⟨1, 4, [], [], [3, 2], 2, 4⟩, + ⟨1, 5, [], [], [4, 3, 2], 1, 3⟩, + ⟨1, 6, [], [], [], 4, 6⟩, + ⟨1, 6, [], [], [5, 4, 3, 2], 1, 2⟩, + ⟨2, 3, [], [], [4, 5, 6], 1, 3⟩, + ⟨2, 4, [], [], [5, 6], 2, 4⟩, + ⟨2, 5, [], [], [6], 3, 5⟩, + ⟨3, 4, [], [2], [5, 6], 1, 3⟩, + ⟨3, 5, [], [2], [6], 2, 4⟩, + ⟨4, 5, [], [2, 3], [6], 1, 3⟩, + ⟨5, 6, [], [2, 3, 4], [], 1, 3⟩] + required := [⟨3, 5, [4]⟩] + closure := [k7t4p3_step_0, k7t4p3_step_1, k7t4p3_step_2, k7t4p3_step_3, k7t4p3_step_4, k7t4p3_step_5, k7t4p3_step_6, k7t4p3_step_7, k7t4p3_step_8, k7t4p3_step_9, k7t4p3_step_10, k7t4p3_step_11, k7t4p3_step_12] + bad := ⟨none, {(4, 2), (0, 2), (3, 1)}⟩ + + +private def k7t4p3_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 1 5, {2, 3, 4}, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, {2, 3, 4}, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5, ∅], + #[{2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_initial_eq_row_0 : ∀ j : Fin 7, (k7t4p3.initialMatrix 7) 0 j = k7t4p3_state_0 0 j := by decide + +private theorem k7t4p3_initial_eq_row_1 : ∀ j : Fin 7, (k7t4p3.initialMatrix 7) 1 j = k7t4p3_state_0 1 j := by decide + +private theorem k7t4p3_initial_eq_row_2 : ∀ j : Fin 7, (k7t4p3.initialMatrix 7) 2 j = k7t4p3_state_0 2 j := by decide + +private theorem k7t4p3_initial_eq_row_3 : ∀ j : Fin 7, (k7t4p3.initialMatrix 7) 3 j = k7t4p3_state_0 3 j := by decide + +private theorem k7t4p3_initial_eq_row_4 : ∀ j : Fin 7, (k7t4p3.initialMatrix 7) 4 j = k7t4p3_state_0 4 j := by decide + +private theorem k7t4p3_initial_eq_row_5 : ∀ j : Fin 7, (k7t4p3.initialMatrix 7) 5 j = k7t4p3_state_0 5 j := by decide + +private theorem k7t4p3_initial_eq_row_6 : ∀ j : Fin 7, (k7t4p3.initialMatrix 7) 6 j = k7t4p3_state_0 6 j := by decide + +private theorem k7t4p3_initial_eq : (k7t4p3.initialMatrix 7) = k7t4p3_state_0 := by + funext i j + fin_cases i + + · exact k7t4p3_initial_eq_row_0 j + + · exact k7t4p3_initial_eq_row_1 j + + · exact k7t4p3_initial_eq_row_2 j + + · exact k7t4p3_initial_eq_row_3 j + + · exact k7t4p3_initial_eq_row_4 j + + · exact k7t4p3_initial_eq_row_5 j + + · exact k7t4p3_initial_eq_row_6 j + +private def k7t4p3_state_1 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, {2, 3, 4}, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, {2, 3, 4}, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5, ∅], + #[{2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t4p3_local_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {1, 2, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}, Finset.Icc 1 6], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, {1, 2}], + #[Finset.Icc 1 5, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2}, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_0_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t4p3_state_0 a b ∪ requiredMatrix 7 k7t4p3_step_0_data.required a b) 0 j = k7t4p3_local_0 0 j := by decide + +private theorem k7t4p3_local_0_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t4p3_state_0 a b ∪ requiredMatrix 7 k7t4p3_step_0_data.required a b) 1 j = k7t4p3_local_0 1 j := by decide + +private theorem k7t4p3_local_0_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t4p3_state_0 a b ∪ requiredMatrix 7 k7t4p3_step_0_data.required a b) 2 j = k7t4p3_local_0 2 j := by decide + +private theorem k7t4p3_local_0_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t4p3_state_0 a b ∪ requiredMatrix 7 k7t4p3_step_0_data.required a b) 3 j = k7t4p3_local_0 3 j := by decide + +private theorem k7t4p3_local_0_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t4p3_state_0 a b ∪ requiredMatrix 7 k7t4p3_step_0_data.required a b) 4 j = k7t4p3_local_0 4 j := by decide + +private theorem k7t4p3_local_0_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t4p3_state_0 a b ∪ requiredMatrix 7 k7t4p3_step_0_data.required a b) 5 j = k7t4p3_local_0 5 j := by decide + +private theorem k7t4p3_local_0_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t4p3_state_0 a b ∪ requiredMatrix 7 k7t4p3_step_0_data.required a b) 6 j = k7t4p3_local_0 6 j := by decide + +private theorem k7t4p3_local_0_eq : (fun a b => k7t4p3_state_0 a b ∪ requiredMatrix 7 k7t4p3_step_0_data.required a b) = k7t4p3_local_0 := by + funext i j + fin_cases i + + · exact k7t4p3_local_0_eq_row_0 j + + · exact k7t4p3_local_0_eq_row_1 j + + · exact k7t4p3_local_0_eq_row_2 j + + · exact k7t4p3_local_0_eq_row_3 j + + · exact k7t4p3_local_0_eq_row_4 j + + · exact k7t4p3_local_0_eq_row_5 j + + · exact k7t4p3_local_0_eq_row_6 j + +private theorem k7t4p3_local_0_paths : ∀ p ∈ k7t4p3_step_0_data.required, p.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_0_data.i k7t4p3_step_0_data.j) 7 := by decide + +private theorem k7t4p3_local_0_bad : k7t4p3_step_0_data.bad.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_0_data.i k7t4p3_step_0_data.j) k7t4p3_local_0 7 4 := by decide + +private theorem k7t4p3_step_0_check : k7t4p3_step_0.Check k7t4p3.graph k7t4p3_state_0 7 4 := by + change k7t4p3_step_0_data.Check k7t4p3.graph k7t4p3_state_0 7 4 + refine ⟨k7t4p3_local_0_paths, ?_⟩ + rw [k7t4p3_local_0_eq] + exact k7t4p3_local_0_bad + +private theorem k7t4p3_update_0 : k7t4p3_step_0.apply k7t4p3_state_0 = k7t4p3_state_1 := by + have h : ∀ i j : Fin 7, k7t4p3_step_0.apply k7t4p3_state_0 i j = k7t4p3_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t4p3_state_2 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, {2, 3, 4}, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5, ∅], + #[{2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t4p3_local_1 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, {1, 2, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}, Finset.Icc 1 6], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, {1, 2}], + #[Finset.Icc 0 5, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2}, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_1_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t4p3_state_1 a b ∪ requiredMatrix 7 k7t4p3_step_1_data.required a b) 0 j = k7t4p3_local_1 0 j := by decide + +private theorem k7t4p3_local_1_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t4p3_state_1 a b ∪ requiredMatrix 7 k7t4p3_step_1_data.required a b) 1 j = k7t4p3_local_1 1 j := by decide + +private theorem k7t4p3_local_1_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t4p3_state_1 a b ∪ requiredMatrix 7 k7t4p3_step_1_data.required a b) 2 j = k7t4p3_local_1 2 j := by decide + +private theorem k7t4p3_local_1_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t4p3_state_1 a b ∪ requiredMatrix 7 k7t4p3_step_1_data.required a b) 3 j = k7t4p3_local_1 3 j := by decide + +private theorem k7t4p3_local_1_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t4p3_state_1 a b ∪ requiredMatrix 7 k7t4p3_step_1_data.required a b) 4 j = k7t4p3_local_1 4 j := by decide + +private theorem k7t4p3_local_1_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t4p3_state_1 a b ∪ requiredMatrix 7 k7t4p3_step_1_data.required a b) 5 j = k7t4p3_local_1 5 j := by decide + +private theorem k7t4p3_local_1_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t4p3_state_1 a b ∪ requiredMatrix 7 k7t4p3_step_1_data.required a b) 6 j = k7t4p3_local_1 6 j := by decide + +private theorem k7t4p3_local_1_eq : (fun a b => k7t4p3_state_1 a b ∪ requiredMatrix 7 k7t4p3_step_1_data.required a b) = k7t4p3_local_1 := by + funext i j + fin_cases i + + · exact k7t4p3_local_1_eq_row_0 j + + · exact k7t4p3_local_1_eq_row_1 j + + · exact k7t4p3_local_1_eq_row_2 j + + · exact k7t4p3_local_1_eq_row_3 j + + · exact k7t4p3_local_1_eq_row_4 j + + · exact k7t4p3_local_1_eq_row_5 j + + · exact k7t4p3_local_1_eq_row_6 j + +private theorem k7t4p3_local_1_paths : ∀ p ∈ k7t4p3_step_1_data.required, p.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_1_data.i k7t4p3_step_1_data.j) 7 := by decide + +private theorem k7t4p3_local_1_bad : k7t4p3_step_1_data.bad.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_1_data.i k7t4p3_step_1_data.j) k7t4p3_local_1 7 4 := by decide + +private theorem k7t4p3_step_1_check : k7t4p3_step_1.Check k7t4p3.graph k7t4p3_state_1 7 4 := by + change k7t4p3_step_1_data.Check k7t4p3.graph k7t4p3_state_1 7 4 + refine ⟨k7t4p3_local_1_paths, ?_⟩ + rw [k7t4p3_local_1_eq] + exact k7t4p3_local_1_bad + +private theorem k7t4p3_update_1 : k7t4p3_step_1.apply k7t4p3_state_1 = k7t4p3_state_2 := by + have h : ∀ i j : Fin 7, k7t4p3_step_1.apply k7t4p3_state_1 i j = k7t4p3_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t4p3_state_3 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, {0, 2, 3, 4}, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5, ∅], + #[{0, 2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t4p3_local_2 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {1, 2, 4, 5, 6}, Finset.Icc 0 5, {2, 3, 4}, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[Finset.Icc 1 6, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5, {1}], + #[{2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_2_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t4p3_state_2 a b ∪ requiredMatrix 7 k7t4p3_step_2_data.required a b) 0 j = k7t4p3_local_2 0 j := by decide + +private theorem k7t4p3_local_2_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t4p3_state_2 a b ∪ requiredMatrix 7 k7t4p3_step_2_data.required a b) 1 j = k7t4p3_local_2 1 j := by decide + +private theorem k7t4p3_local_2_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t4p3_state_2 a b ∪ requiredMatrix 7 k7t4p3_step_2_data.required a b) 2 j = k7t4p3_local_2 2 j := by decide + +private theorem k7t4p3_local_2_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t4p3_state_2 a b ∪ requiredMatrix 7 k7t4p3_step_2_data.required a b) 3 j = k7t4p3_local_2 3 j := by decide + +private theorem k7t4p3_local_2_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t4p3_state_2 a b ∪ requiredMatrix 7 k7t4p3_step_2_data.required a b) 4 j = k7t4p3_local_2 4 j := by decide + +private theorem k7t4p3_local_2_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t4p3_state_2 a b ∪ requiredMatrix 7 k7t4p3_step_2_data.required a b) 5 j = k7t4p3_local_2 5 j := by decide + +private theorem k7t4p3_local_2_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t4p3_state_2 a b ∪ requiredMatrix 7 k7t4p3_step_2_data.required a b) 6 j = k7t4p3_local_2 6 j := by decide + +private theorem k7t4p3_local_2_eq : (fun a b => k7t4p3_state_2 a b ∪ requiredMatrix 7 k7t4p3_step_2_data.required a b) = k7t4p3_local_2 := by + funext i j + fin_cases i + + · exact k7t4p3_local_2_eq_row_0 j + + · exact k7t4p3_local_2_eq_row_1 j + + · exact k7t4p3_local_2_eq_row_2 j + + · exact k7t4p3_local_2_eq_row_3 j + + · exact k7t4p3_local_2_eq_row_4 j + + · exact k7t4p3_local_2_eq_row_5 j + + · exact k7t4p3_local_2_eq_row_6 j + +private theorem k7t4p3_local_2_paths : ∀ p ∈ k7t4p3_step_2_data.required, p.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_2_data.i k7t4p3_step_2_data.j) 7 := by decide + +private theorem k7t4p3_local_2_bad : k7t4p3_step_2_data.bad.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_2_data.i k7t4p3_step_2_data.j) k7t4p3_local_2 7 4 := by decide + +private theorem k7t4p3_step_2_check : k7t4p3_step_2.Check k7t4p3.graph k7t4p3_state_2 7 4 := by + change k7t4p3_step_2_data.Check k7t4p3.graph k7t4p3_state_2 7 4 + refine ⟨k7t4p3_local_2_paths, ?_⟩ + rw [k7t4p3_local_2_eq] + exact k7t4p3_local_2_bad + +private theorem k7t4p3_update_2 : k7t4p3_step_2.apply k7t4p3_state_2 = k7t4p3_state_3 := by + have h : ∀ i j : Fin 7, k7t4p3_step_2.apply k7t4p3_state_2 i j = k7t4p3_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t4p3_state_4 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 4, {2, 3, 4}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t4p3_local_3 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1}, {0, 1}, {0, 1}, Finset.Icc 0 4, {1}, Finset.Icc 0 4, {0, 1}], + #[{1}, ∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, {0, 2, 3, 4}, Finset.Icc 0 5, {1, 2, 4, 5, 6}], + #[{0, 1}, {1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, {2, 3, 4}, Finset.Icc 0 3, {1, 2, 4, 5, 6}], + #[{0, 1}, {1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 5, {0, 1}], + #[{1}, {0, 2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 3, {0, 1, 3, 4, 5}, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{0, 1}, {1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {0, 1}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t4p3_local_3_required_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, ∅, ∅, Finset.Icc 0 4, ∅, {2}, ∅], + #[∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, {0}, {0}, ∅, ∅, ∅, {0, 1}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_3_required_0_eq_row_0 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_0) 0 j = k7t4p3_local_3_required_0 0 j := by decide + +private theorem k7t4p3_local_3_required_0_eq_row_1 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_0) 1 j = k7t4p3_local_3_required_0 1 j := by decide + +private theorem k7t4p3_local_3_required_0_eq_row_2 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_0) 2 j = k7t4p3_local_3_required_0 2 j := by decide + +private theorem k7t4p3_local_3_required_0_eq_row_3 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_0) 3 j = k7t4p3_local_3_required_0 3 j := by decide + +private theorem k7t4p3_local_3_required_0_eq_row_4 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_0) 4 j = k7t4p3_local_3_required_0 4 j := by decide + +private theorem k7t4p3_local_3_required_0_eq_row_5 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_0) 5 j = k7t4p3_local_3_required_0 5 j := by decide + +private theorem k7t4p3_local_3_required_0_eq_row_6 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_0) 6 j = k7t4p3_local_3_required_0 6 j := by decide + +private theorem k7t4p3_local_3_required_0_eq_row_7 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_0) 7 j = k7t4p3_local_3_required_0 7 j := by decide + +private theorem k7t4p3_local_3_required_0_eq : (requiredMatrix 7 k7t4p3_step_3_required_block_0) = k7t4p3_local_3_required_0 := by + funext i j + fin_cases i + + · exact k7t4p3_local_3_required_0_eq_row_0 j + + · exact k7t4p3_local_3_required_0_eq_row_1 j + + · exact k7t4p3_local_3_required_0_eq_row_2 j + + · exact k7t4p3_local_3_required_0_eq_row_3 j + + · exact k7t4p3_local_3_required_0_eq_row_4 j + + · exact k7t4p3_local_3_required_0_eq_row_5 j + + · exact k7t4p3_local_3_required_0_eq_row_6 j + + · exact k7t4p3_local_3_required_0_eq_row_7 j + +private theorem k7t4p3_local_3_path_0_0 : (⟨4, 0, [3, 1, 2, 7, 6, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_0_1 : (⟨4, 0, [3, 1, 7, 6, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_0_2 : (⟨4, 0, [3, 1]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_0_3 : (⟨4, 7, [3, 1, 0, 5, 6]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_0_4 : (⟨4, 2, [3, 1, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_0_5 : (⟨4, 0, [3, 2, 1]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_0_6 : (⟨4, 6, [3, 2, 1, 0, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_0_7 : (⟨4, 7, [3, 2, 1, 0, 5, 6]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_0_8 : (⟨4, 0, [3, 2, 7, 1]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_0_9 : (⟨4, 6, [3, 2, 7, 1, 0, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_0_10 : (⟨4, 1, [3, 2, 7, 6, 5, 0]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_0_11 : (⟨6, 0, [5, 4, 3, 1]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_paths_block_0 : ∀ p ∈ k7t4p3_step_3_required_block_0, p.Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by + simp only [k7t4p3_step_3_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t4p3_local_3_path_0_0, k7t4p3_local_3_path_0_1, k7t4p3_local_3_path_0_2, k7t4p3_local_3_path_0_3, k7t4p3_local_3_path_0_4, k7t4p3_local_3_path_0_5, k7t4p3_local_3_path_0_6, k7t4p3_local_3_path_0_7, k7t4p3_local_3_path_0_8, k7t4p3_local_3_path_0_9, k7t4p3_local_3_path_0_10, k7t4p3_local_3_path_0_11⟩ + +private def k7t4p3_local_3_required_1 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 3, 4}, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 3, 4}, {0}, {0}, {0, 1}, {0, 1}, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_3_required_1_eq_row_0 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_1) 0 j = k7t4p3_local_3_required_1 0 j := by decide + +private theorem k7t4p3_local_3_required_1_eq_row_1 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_1) 1 j = k7t4p3_local_3_required_1 1 j := by decide + +private theorem k7t4p3_local_3_required_1_eq_row_2 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_1) 2 j = k7t4p3_local_3_required_1 2 j := by decide + +private theorem k7t4p3_local_3_required_1_eq_row_3 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_1) 3 j = k7t4p3_local_3_required_1 3 j := by decide + +private theorem k7t4p3_local_3_required_1_eq_row_4 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_1) 4 j = k7t4p3_local_3_required_1 4 j := by decide + +private theorem k7t4p3_local_3_required_1_eq_row_5 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_1) 5 j = k7t4p3_local_3_required_1 5 j := by decide + +private theorem k7t4p3_local_3_required_1_eq_row_6 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_1) 6 j = k7t4p3_local_3_required_1 6 j := by decide + +private theorem k7t4p3_local_3_required_1_eq_row_7 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_1) 7 j = k7t4p3_local_3_required_1 7 j := by decide + +private theorem k7t4p3_local_3_required_1_eq : (requiredMatrix 7 k7t4p3_step_3_required_block_1) = k7t4p3_local_3_required_1 := by + funext i j + fin_cases i + + · exact k7t4p3_local_3_required_1_eq_row_0 j + + · exact k7t4p3_local_3_required_1_eq_row_1 j + + · exact k7t4p3_local_3_required_1_eq_row_2 j + + · exact k7t4p3_local_3_required_1_eq_row_3 j + + · exact k7t4p3_local_3_required_1_eq_row_4 j + + · exact k7t4p3_local_3_required_1_eq_row_5 j + + · exact k7t4p3_local_3_required_1_eq_row_6 j + + · exact k7t4p3_local_3_required_1_eq_row_7 j + +private theorem k7t4p3_local_3_path_1_0 : (⟨6, 0, [5, 4, 3, 2, 1]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_1_1 : (⟨6, 0, [5, 4, 3, 2, 7, 1]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_1_2 : (⟨6, 4, [5, 0, 1, 2, 3]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_1_3 : (⟨6, 3, [5, 0, 1, 2, 7]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_1_4 : (⟨6, 4, [5, 0, 1, 2, 7, 3]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_1_5 : (⟨6, 0, [7, 1]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_1_6 : (⟨6, 2, [7, 1, 0, 5, 4, 3]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_1_7 : (⟨6, 0, [7, 2, 1]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_1_8 : (⟨6, 3, [7, 2, 1, 0, 5, 4]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_1_9 : (⟨6, 1, [7, 2, 3, 4, 5, 0]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_1_10 : (⟨0, 6, [1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_1_11 : (⟨0, 7, [1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_paths_block_1 : ∀ p ∈ k7t4p3_step_3_required_block_1, p.Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by + simp only [k7t4p3_step_3_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t4p3_local_3_path_1_0, k7t4p3_local_3_path_1_1, k7t4p3_local_3_path_1_2, k7t4p3_local_3_path_1_3, k7t4p3_local_3_path_1_4, k7t4p3_local_3_path_1_5, k7t4p3_local_3_path_1_6, k7t4p3_local_3_path_1_7, k7t4p3_local_3_path_1_8, k7t4p3_local_3_path_1_9, k7t4p3_local_3_path_1_10, k7t4p3_local_3_path_1_11⟩ + +private def k7t4p3_local_3_required_2 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1}, {0, 1}, {0, 1}, {0, 1}, {1}, {0}, {1}], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_3_required_2_eq_row_0 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_2) 0 j = k7t4p3_local_3_required_2 0 j := by decide + +private theorem k7t4p3_local_3_required_2_eq_row_1 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_2) 1 j = k7t4p3_local_3_required_2 1 j := by decide + +private theorem k7t4p3_local_3_required_2_eq_row_2 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_2) 2 j = k7t4p3_local_3_required_2 2 j := by decide + +private theorem k7t4p3_local_3_required_2_eq_row_3 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_2) 3 j = k7t4p3_local_3_required_2 3 j := by decide + +private theorem k7t4p3_local_3_required_2_eq_row_4 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_2) 4 j = k7t4p3_local_3_required_2 4 j := by decide + +private theorem k7t4p3_local_3_required_2_eq_row_5 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_2) 5 j = k7t4p3_local_3_required_2 5 j := by decide + +private theorem k7t4p3_local_3_required_2_eq_row_6 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_2) 6 j = k7t4p3_local_3_required_2 6 j := by decide + +private theorem k7t4p3_local_3_required_2_eq_row_7 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_3_required_block_2) 7 j = k7t4p3_local_3_required_2 7 j := by decide + +private theorem k7t4p3_local_3_required_2_eq : (requiredMatrix 7 k7t4p3_step_3_required_block_2) = k7t4p3_local_3_required_2 := by + funext i j + fin_cases i + + · exact k7t4p3_local_3_required_2_eq_row_0 j + + · exact k7t4p3_local_3_required_2_eq_row_1 j + + · exact k7t4p3_local_3_required_2_eq_row_2 j + + · exact k7t4p3_local_3_required_2_eq_row_3 j + + · exact k7t4p3_local_3_required_2_eq_row_4 j + + · exact k7t4p3_local_3_required_2_eq_row_5 j + + · exact k7t4p3_local_3_required_2_eq_row_6 j + + · exact k7t4p3_local_3_required_2_eq_row_7 j + +private theorem k7t4p3_local_3_path_2_0 : (⟨0, 5, [1, 2, 3, 7, 6]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_2_1 : (⟨0, 4, [1, 2, 3, 7, 6, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_2_2 : (⟨0, 6, [1, 2, 7, 3, 4, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_2_3 : (⟨0, 4, [1, 2, 7, 6, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_2_4 : (⟨0, 3, [1, 2, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_2_5 : (⟨0, 7, [1, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_2_6 : (⟨0, 2, [1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_2_7 : (⟨0, 3, [1, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_2_8 : (⟨0, 2, [5, 4, 3, 1, 7]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_path_2_9 : (⟨0, 1, [5, 4, 3, 2, 7]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by decide + +private theorem k7t4p3_local_3_paths_block_2 : ∀ p ∈ k7t4p3_step_3_required_block_2, p.Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by + simp only [k7t4p3_step_3_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t4p3_local_3_path_2_0, k7t4p3_local_3_path_2_1, k7t4p3_local_3_path_2_2, k7t4p3_local_3_path_2_3, k7t4p3_local_3_path_2_4, k7t4p3_local_3_path_2_5, k7t4p3_local_3_path_2_6, k7t4p3_local_3_path_2_7, k7t4p3_local_3_path_2_8, k7t4p3_local_3_path_2_9⟩ + +private theorem k7t4p3_local_3_merged_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_3 a b ∪ (((k7t4p3_local_3_required_0 a b ∪ k7t4p3_local_3_required_1 a b) ∪ k7t4p3_local_3_required_2 a b))) 0 j = k7t4p3_local_3 0 j := by decide + +private theorem k7t4p3_local_3_merged_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_3 a b ∪ (((k7t4p3_local_3_required_0 a b ∪ k7t4p3_local_3_required_1 a b) ∪ k7t4p3_local_3_required_2 a b))) 1 j = k7t4p3_local_3 1 j := by decide + +private theorem k7t4p3_local_3_merged_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_3 a b ∪ (((k7t4p3_local_3_required_0 a b ∪ k7t4p3_local_3_required_1 a b) ∪ k7t4p3_local_3_required_2 a b))) 2 j = k7t4p3_local_3 2 j := by decide + +private theorem k7t4p3_local_3_merged_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_3 a b ∪ (((k7t4p3_local_3_required_0 a b ∪ k7t4p3_local_3_required_1 a b) ∪ k7t4p3_local_3_required_2 a b))) 3 j = k7t4p3_local_3 3 j := by decide + +private theorem k7t4p3_local_3_merged_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_3 a b ∪ (((k7t4p3_local_3_required_0 a b ∪ k7t4p3_local_3_required_1 a b) ∪ k7t4p3_local_3_required_2 a b))) 4 j = k7t4p3_local_3 4 j := by decide + +private theorem k7t4p3_local_3_merged_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_3 a b ∪ (((k7t4p3_local_3_required_0 a b ∪ k7t4p3_local_3_required_1 a b) ∪ k7t4p3_local_3_required_2 a b))) 5 j = k7t4p3_local_3 5 j := by decide + +private theorem k7t4p3_local_3_merged_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_3 a b ∪ (((k7t4p3_local_3_required_0 a b ∪ k7t4p3_local_3_required_1 a b) ∪ k7t4p3_local_3_required_2 a b))) 6 j = k7t4p3_local_3 6 j := by decide + +private theorem k7t4p3_local_3_merged_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_3 a b ∪ (((k7t4p3_local_3_required_0 a b ∪ k7t4p3_local_3_required_1 a b) ∪ k7t4p3_local_3_required_2 a b))) 7 j = k7t4p3_local_3 7 j := by decide + +private theorem k7t4p3_local_3_merged_eq : (fun a b => freshMatrix k7t4p3_state_3 a b ∪ (((k7t4p3_local_3_required_0 a b ∪ k7t4p3_local_3_required_1 a b) ∪ k7t4p3_local_3_required_2 a b))) = k7t4p3_local_3 := by + funext i j + fin_cases i + + · exact k7t4p3_local_3_merged_eq_row_0 j + + · exact k7t4p3_local_3_merged_eq_row_1 j + + · exact k7t4p3_local_3_merged_eq_row_2 j + + · exact k7t4p3_local_3_merged_eq_row_3 j + + · exact k7t4p3_local_3_merged_eq_row_4 j + + · exact k7t4p3_local_3_merged_eq_row_5 j + + · exact k7t4p3_local_3_merged_eq_row_6 j + + · exact k7t4p3_local_3_merged_eq_row_7 j + +private theorem k7t4p3_local_3_eq : (fun a b => freshMatrix k7t4p3_state_3 a b ∪ requiredMatrix 7 k7t4p3_step_3_data.required a b) = k7t4p3_local_3 := by + funext a b + change freshMatrix k7t4p3_state_3 a b ∪ requiredMatrix 7 (k7t4p3_step_3_required_block_0 ++ k7t4p3_step_3_required_block_1 ++ k7t4p3_step_3_required_block_2) a b = _ + simp only [requiredMatrix_append, k7t4p3_local_3_required_0_eq, k7t4p3_local_3_required_1_eq, k7t4p3_local_3_required_2_eq] + exact congrFun (congrFun k7t4p3_local_3_merged_eq a) b + +private theorem k7t4p3_local_3_paths : ∀ p ∈ k7t4p3_step_3_data.required, p.Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 := by + change ∀ p ∈ (k7t4p3_step_3_required_block_0 ++ k7t4p3_step_3_required_block_1 ++ k7t4p3_step_3_required_block_2), p.Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) 7 + simp only [List.forall_mem_append] + exact ⟨⟨k7t4p3_local_3_paths_block_0, k7t4p3_local_3_paths_block_1⟩, k7t4p3_local_3_paths_block_2⟩ + +private theorem k7t4p3_local_3_bad : k7t4p3_step_3_data.bad.Check (freshGraph k7t4p3.graph k7t4p3_step_3_data.i k7t4p3_step_3_data.j) k7t4p3_local_3 7 4 := by decide + +private theorem k7t4p3_step_3_check : k7t4p3_step_3.Check k7t4p3.graph k7t4p3_state_3 7 4 := by + change k7t4p3_step_3_data.Check k7t4p3.graph k7t4p3_state_3 7 4 + refine ⟨by decide, k7t4p3_local_3_paths, ?_⟩ + rw [k7t4p3_local_3_eq] + exact k7t4p3_local_3_bad + +private theorem k7t4p3_update_3 : k7t4p3_step_3.apply k7t4p3_state_3 = k7t4p3_state_4 := by + have h : ∀ i j : Fin 7, k7t4p3_step_3.apply k7t4p3_state_3 i j = k7t4p3_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t4p3_state_5 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, {0, 2, 3, 4}, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 4, {0, 2, 3, 4}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t4p3_local_4 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[Finset.Icc 1 6, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5, {1}], + #[Finset.Icc 0 4, {2, 3, 4}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_4_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t4p3_state_4 a b ∪ requiredMatrix 7 k7t4p3_step_4_data.required a b) 0 j = k7t4p3_local_4 0 j := by decide + +private theorem k7t4p3_local_4_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t4p3_state_4 a b ∪ requiredMatrix 7 k7t4p3_step_4_data.required a b) 1 j = k7t4p3_local_4 1 j := by decide + +private theorem k7t4p3_local_4_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t4p3_state_4 a b ∪ requiredMatrix 7 k7t4p3_step_4_data.required a b) 2 j = k7t4p3_local_4 2 j := by decide + +private theorem k7t4p3_local_4_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t4p3_state_4 a b ∪ requiredMatrix 7 k7t4p3_step_4_data.required a b) 3 j = k7t4p3_local_4 3 j := by decide + +private theorem k7t4p3_local_4_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t4p3_state_4 a b ∪ requiredMatrix 7 k7t4p3_step_4_data.required a b) 4 j = k7t4p3_local_4 4 j := by decide + +private theorem k7t4p3_local_4_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t4p3_state_4 a b ∪ requiredMatrix 7 k7t4p3_step_4_data.required a b) 5 j = k7t4p3_local_4 5 j := by decide + +private theorem k7t4p3_local_4_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t4p3_state_4 a b ∪ requiredMatrix 7 k7t4p3_step_4_data.required a b) 6 j = k7t4p3_local_4 6 j := by decide + +private theorem k7t4p3_local_4_eq : (fun a b => k7t4p3_state_4 a b ∪ requiredMatrix 7 k7t4p3_step_4_data.required a b) = k7t4p3_local_4 := by + funext i j + fin_cases i + + · exact k7t4p3_local_4_eq_row_0 j + + · exact k7t4p3_local_4_eq_row_1 j + + · exact k7t4p3_local_4_eq_row_2 j + + · exact k7t4p3_local_4_eq_row_3 j + + · exact k7t4p3_local_4_eq_row_4 j + + · exact k7t4p3_local_4_eq_row_5 j + + · exact k7t4p3_local_4_eq_row_6 j + +private theorem k7t4p3_local_4_paths : ∀ p ∈ k7t4p3_step_4_data.required, p.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_4_data.i k7t4p3_step_4_data.j) 7 := by decide + +private theorem k7t4p3_local_4_bad : k7t4p3_step_4_data.bad.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_4_data.i k7t4p3_step_4_data.j) k7t4p3_local_4 7 4 := by decide + +private theorem k7t4p3_step_4_check : k7t4p3_step_4.Check k7t4p3.graph k7t4p3_state_4 7 4 := by + change k7t4p3_step_4_data.Check k7t4p3.graph k7t4p3_state_4 7 4 + refine ⟨k7t4p3_local_4_paths, ?_⟩ + rw [k7t4p3_local_4_eq] + exact k7t4p3_local_4_bad + +private theorem k7t4p3_update_4 : k7t4p3_step_4.apply k7t4p3_state_4 = k7t4p3_state_5 := by + have h : ∀ i j : Fin 7, k7t4p3_step_4.apply k7t4p3_state_4 i j = k7t4p3_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t4p3_state_6 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t4p3_local_5 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {0, 1}, {1}, {0, 1}, Finset.Icc 0 4, {1}, Finset.Icc 0 4, {0, 1}], + #[{0, 1}, ∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 4, 5, 6}], + #[{1}, {1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, {0, 2, 3, 4}, Finset.Icc 0 3, {1, 2, 4, 5, 6}], + #[{0, 1}, {1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 5, {0, 1}], + #[{1}, Finset.Icc 0 4, {0, 2, 3, 4}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 3, {0, 1, 3, 4, 5}, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{0, 1}, {1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {0, 1}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t4p3_local_5_required_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, ∅, ∅, Finset.Icc 0 4, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, {0}, {0}, ∅, ∅, ∅, {0, 1}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_5_required_0_eq_row_0 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_0) 0 j = k7t4p3_local_5_required_0 0 j := by decide + +private theorem k7t4p3_local_5_required_0_eq_row_1 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_0) 1 j = k7t4p3_local_5_required_0 1 j := by decide + +private theorem k7t4p3_local_5_required_0_eq_row_2 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_0) 2 j = k7t4p3_local_5_required_0 2 j := by decide + +private theorem k7t4p3_local_5_required_0_eq_row_3 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_0) 3 j = k7t4p3_local_5_required_0 3 j := by decide + +private theorem k7t4p3_local_5_required_0_eq_row_4 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_0) 4 j = k7t4p3_local_5_required_0 4 j := by decide + +private theorem k7t4p3_local_5_required_0_eq_row_5 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_0) 5 j = k7t4p3_local_5_required_0 5 j := by decide + +private theorem k7t4p3_local_5_required_0_eq_row_6 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_0) 6 j = k7t4p3_local_5_required_0 6 j := by decide + +private theorem k7t4p3_local_5_required_0_eq_row_7 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_0) 7 j = k7t4p3_local_5_required_0 7 j := by decide + +private theorem k7t4p3_local_5_required_0_eq : (requiredMatrix 7 k7t4p3_step_5_required_block_0) = k7t4p3_local_5_required_0 := by + funext i j + fin_cases i + + · exact k7t4p3_local_5_required_0_eq_row_0 j + + · exact k7t4p3_local_5_required_0_eq_row_1 j + + · exact k7t4p3_local_5_required_0_eq_row_2 j + + · exact k7t4p3_local_5_required_0_eq_row_3 j + + · exact k7t4p3_local_5_required_0_eq_row_4 j + + · exact k7t4p3_local_5_required_0_eq_row_5 j + + · exact k7t4p3_local_5_required_0_eq_row_6 j + + · exact k7t4p3_local_5_required_0_eq_row_7 j + +private theorem k7t4p3_local_5_path_0_0 : (⟨4, 0, [3, 1, 2, 7, 6, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_0_1 : (⟨4, 0, [3, 1, 2]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_0_2 : (⟨4, 6, [3, 1, 2, 0, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_0_3 : (⟨4, 7, [3, 1, 2, 0, 5, 6]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_0_4 : (⟨4, 0, [3, 1, 7, 2]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_0_5 : (⟨4, 6, [3, 1, 7, 2, 0, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_0_6 : (⟨4, 0, [3, 1, 7, 6, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_0_7 : (⟨4, 2, [3, 1, 7, 6, 5, 0]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_0_8 : (⟨4, 0, [3, 2]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_0_9 : (⟨4, 7, [3, 2, 0, 5, 6]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_0_10 : (⟨4, 1, [3, 2, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_0_11 : (⟨6, 0, [5, 4, 3, 1, 2]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_paths_block_0 : ∀ p ∈ k7t4p3_step_5_required_block_0, p.Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by + simp only [k7t4p3_step_5_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t4p3_local_5_path_0_0, k7t4p3_local_5_path_0_1, k7t4p3_local_5_path_0_2, k7t4p3_local_5_path_0_3, k7t4p3_local_5_path_0_4, k7t4p3_local_5_path_0_5, k7t4p3_local_5_path_0_6, k7t4p3_local_5_path_0_7, k7t4p3_local_5_path_0_8, k7t4p3_local_5_path_0_9, k7t4p3_local_5_path_0_10, k7t4p3_local_5_path_0_11⟩ + +private def k7t4p3_local_5_required_1 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 0 4, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, {0}, {0}, {0, 1}, {0, 1}, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_5_required_1_eq_row_0 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_1) 0 j = k7t4p3_local_5_required_1 0 j := by decide + +private theorem k7t4p3_local_5_required_1_eq_row_1 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_1) 1 j = k7t4p3_local_5_required_1 1 j := by decide + +private theorem k7t4p3_local_5_required_1_eq_row_2 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_1) 2 j = k7t4p3_local_5_required_1 2 j := by decide + +private theorem k7t4p3_local_5_required_1_eq_row_3 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_1) 3 j = k7t4p3_local_5_required_1 3 j := by decide + +private theorem k7t4p3_local_5_required_1_eq_row_4 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_1) 4 j = k7t4p3_local_5_required_1 4 j := by decide + +private theorem k7t4p3_local_5_required_1_eq_row_5 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_1) 5 j = k7t4p3_local_5_required_1 5 j := by decide + +private theorem k7t4p3_local_5_required_1_eq_row_6 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_1) 6 j = k7t4p3_local_5_required_1 6 j := by decide + +private theorem k7t4p3_local_5_required_1_eq_row_7 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_1) 7 j = k7t4p3_local_5_required_1 7 j := by decide + +private theorem k7t4p3_local_5_required_1_eq : (requiredMatrix 7 k7t4p3_step_5_required_block_1) = k7t4p3_local_5_required_1 := by + funext i j + fin_cases i + + · exact k7t4p3_local_5_required_1_eq_row_0 j + + · exact k7t4p3_local_5_required_1_eq_row_1 j + + · exact k7t4p3_local_5_required_1_eq_row_2 j + + · exact k7t4p3_local_5_required_1_eq_row_3 j + + · exact k7t4p3_local_5_required_1_eq_row_4 j + + · exact k7t4p3_local_5_required_1_eq_row_5 j + + · exact k7t4p3_local_5_required_1_eq_row_6 j + + · exact k7t4p3_local_5_required_1_eq_row_7 j + +private theorem k7t4p3_local_5_path_1_0 : (⟨6, 0, [5, 4, 3, 1, 7, 2]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_1_1 : (⟨6, 0, [5, 4, 3, 2]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_1_2 : (⟨6, 4, [5, 0, 2, 1, 3]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_1_3 : (⟨6, 3, [5, 0, 2, 1, 7]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_1_4 : (⟨6, 4, [5, 0, 2, 1, 7, 3]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_1_5 : (⟨6, 0, [7, 1, 2]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_1_6 : (⟨6, 3, [7, 1, 2, 0, 5, 4]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_1_7 : (⟨6, 2, [7, 1, 3, 4, 5, 0]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_1_8 : (⟨6, 0, [7, 2]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_1_9 : (⟨6, 1, [7, 2, 0, 5, 4, 3]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_1_10 : (⟨0, 6, [2, 1, 3, 4, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_1_11 : (⟨0, 7, [2, 1, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_paths_block_1 : ∀ p ∈ k7t4p3_step_5_required_block_1, p.Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by + simp only [k7t4p3_step_5_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t4p3_local_5_path_1_0, k7t4p3_local_5_path_1_1, k7t4p3_local_5_path_1_2, k7t4p3_local_5_path_1_3, k7t4p3_local_5_path_1_4, k7t4p3_local_5_path_1_5, k7t4p3_local_5_path_1_6, k7t4p3_local_5_path_1_7, k7t4p3_local_5_path_1_8, k7t4p3_local_5_path_1_9, k7t4p3_local_5_path_1_10, k7t4p3_local_5_path_1_11⟩ + +private def k7t4p3_local_5_required_2 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {0, 1}, {1}, {0, 1}, {0, 1}, {1}, {0}, {1}], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_5_required_2_eq_row_0 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_2) 0 j = k7t4p3_local_5_required_2 0 j := by decide + +private theorem k7t4p3_local_5_required_2_eq_row_1 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_2) 1 j = k7t4p3_local_5_required_2 1 j := by decide + +private theorem k7t4p3_local_5_required_2_eq_row_2 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_2) 2 j = k7t4p3_local_5_required_2 2 j := by decide + +private theorem k7t4p3_local_5_required_2_eq_row_3 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_2) 3 j = k7t4p3_local_5_required_2 3 j := by decide + +private theorem k7t4p3_local_5_required_2_eq_row_4 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_2) 4 j = k7t4p3_local_5_required_2 4 j := by decide + +private theorem k7t4p3_local_5_required_2_eq_row_5 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_2) 5 j = k7t4p3_local_5_required_2 5 j := by decide + +private theorem k7t4p3_local_5_required_2_eq_row_6 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_2) 6 j = k7t4p3_local_5_required_2 6 j := by decide + +private theorem k7t4p3_local_5_required_2_eq_row_7 : ∀ j : Fin 8, (requiredMatrix 7 k7t4p3_step_5_required_block_2) 7 j = k7t4p3_local_5_required_2 7 j := by decide + +private theorem k7t4p3_local_5_required_2_eq : (requiredMatrix 7 k7t4p3_step_5_required_block_2) = k7t4p3_local_5_required_2 := by + funext i j + fin_cases i + + · exact k7t4p3_local_5_required_2_eq_row_0 j + + · exact k7t4p3_local_5_required_2_eq_row_1 j + + · exact k7t4p3_local_5_required_2_eq_row_2 j + + · exact k7t4p3_local_5_required_2_eq_row_3 j + + · exact k7t4p3_local_5_required_2_eq_row_4 j + + · exact k7t4p3_local_5_required_2_eq_row_5 j + + · exact k7t4p3_local_5_required_2_eq_row_6 j + + · exact k7t4p3_local_5_required_2_eq_row_7 j + +private theorem k7t4p3_local_5_path_2_0 : (⟨0, 5, [2, 1, 3, 7, 6]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_2_1 : (⟨0, 4, [2, 1, 3, 7, 6, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_2_2 : (⟨0, 6, [2, 1, 7, 3, 4, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_2_3 : (⟨0, 4, [2, 1, 7, 6, 5]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_2_4 : (⟨0, 3, [2, 1, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_2_5 : (⟨0, 7, [2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_2_6 : (⟨0, 1, [2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_2_7 : (⟨0, 3, [2, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_2_8 : (⟨0, 2, [5, 4, 3, 1, 7]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_path_2_9 : (⟨0, 1, [5, 4, 3, 2, 7]⟩ : RequiredPathData (Fin 8)).Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by decide + +private theorem k7t4p3_local_5_paths_block_2 : ∀ p ∈ k7t4p3_step_5_required_block_2, p.Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by + simp only [k7t4p3_step_5_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t4p3_local_5_path_2_0, k7t4p3_local_5_path_2_1, k7t4p3_local_5_path_2_2, k7t4p3_local_5_path_2_3, k7t4p3_local_5_path_2_4, k7t4p3_local_5_path_2_5, k7t4p3_local_5_path_2_6, k7t4p3_local_5_path_2_7, k7t4p3_local_5_path_2_8, k7t4p3_local_5_path_2_9⟩ + +private theorem k7t4p3_local_5_merged_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_5 a b ∪ (((k7t4p3_local_5_required_0 a b ∪ k7t4p3_local_5_required_1 a b) ∪ k7t4p3_local_5_required_2 a b))) 0 j = k7t4p3_local_5 0 j := by decide + +private theorem k7t4p3_local_5_merged_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_5 a b ∪ (((k7t4p3_local_5_required_0 a b ∪ k7t4p3_local_5_required_1 a b) ∪ k7t4p3_local_5_required_2 a b))) 1 j = k7t4p3_local_5 1 j := by decide + +private theorem k7t4p3_local_5_merged_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_5 a b ∪ (((k7t4p3_local_5_required_0 a b ∪ k7t4p3_local_5_required_1 a b) ∪ k7t4p3_local_5_required_2 a b))) 2 j = k7t4p3_local_5 2 j := by decide + +private theorem k7t4p3_local_5_merged_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_5 a b ∪ (((k7t4p3_local_5_required_0 a b ∪ k7t4p3_local_5_required_1 a b) ∪ k7t4p3_local_5_required_2 a b))) 3 j = k7t4p3_local_5 3 j := by decide + +private theorem k7t4p3_local_5_merged_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_5 a b ∪ (((k7t4p3_local_5_required_0 a b ∪ k7t4p3_local_5_required_1 a b) ∪ k7t4p3_local_5_required_2 a b))) 4 j = k7t4p3_local_5 4 j := by decide + +private theorem k7t4p3_local_5_merged_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_5 a b ∪ (((k7t4p3_local_5_required_0 a b ∪ k7t4p3_local_5_required_1 a b) ∪ k7t4p3_local_5_required_2 a b))) 5 j = k7t4p3_local_5 5 j := by decide + +private theorem k7t4p3_local_5_merged_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_5 a b ∪ (((k7t4p3_local_5_required_0 a b ∪ k7t4p3_local_5_required_1 a b) ∪ k7t4p3_local_5_required_2 a b))) 6 j = k7t4p3_local_5 6 j := by decide + +private theorem k7t4p3_local_5_merged_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_5 a b ∪ (((k7t4p3_local_5_required_0 a b ∪ k7t4p3_local_5_required_1 a b) ∪ k7t4p3_local_5_required_2 a b))) 7 j = k7t4p3_local_5 7 j := by decide + +private theorem k7t4p3_local_5_merged_eq : (fun a b => freshMatrix k7t4p3_state_5 a b ∪ (((k7t4p3_local_5_required_0 a b ∪ k7t4p3_local_5_required_1 a b) ∪ k7t4p3_local_5_required_2 a b))) = k7t4p3_local_5 := by + funext i j + fin_cases i + + · exact k7t4p3_local_5_merged_eq_row_0 j + + · exact k7t4p3_local_5_merged_eq_row_1 j + + · exact k7t4p3_local_5_merged_eq_row_2 j + + · exact k7t4p3_local_5_merged_eq_row_3 j + + · exact k7t4p3_local_5_merged_eq_row_4 j + + · exact k7t4p3_local_5_merged_eq_row_5 j + + · exact k7t4p3_local_5_merged_eq_row_6 j + + · exact k7t4p3_local_5_merged_eq_row_7 j + +private theorem k7t4p3_local_5_eq : (fun a b => freshMatrix k7t4p3_state_5 a b ∪ requiredMatrix 7 k7t4p3_step_5_data.required a b) = k7t4p3_local_5 := by + funext a b + change freshMatrix k7t4p3_state_5 a b ∪ requiredMatrix 7 (k7t4p3_step_5_required_block_0 ++ k7t4p3_step_5_required_block_1 ++ k7t4p3_step_5_required_block_2) a b = _ + simp only [requiredMatrix_append, k7t4p3_local_5_required_0_eq, k7t4p3_local_5_required_1_eq, k7t4p3_local_5_required_2_eq] + exact congrFun (congrFun k7t4p3_local_5_merged_eq a) b + +private theorem k7t4p3_local_5_paths : ∀ p ∈ k7t4p3_step_5_data.required, p.Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 := by + change ∀ p ∈ (k7t4p3_step_5_required_block_0 ++ k7t4p3_step_5_required_block_1 ++ k7t4p3_step_5_required_block_2), p.Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) 7 + simp only [List.forall_mem_append] + exact ⟨⟨k7t4p3_local_5_paths_block_0, k7t4p3_local_5_paths_block_1⟩, k7t4p3_local_5_paths_block_2⟩ + +private theorem k7t4p3_local_5_bad : k7t4p3_step_5_data.bad.Check (freshGraph k7t4p3.graph k7t4p3_step_5_data.i k7t4p3_step_5_data.j) k7t4p3_local_5 7 4 := by decide + +private theorem k7t4p3_step_5_check : k7t4p3_step_5.Check k7t4p3.graph k7t4p3_state_5 7 4 := by + change k7t4p3_step_5_data.Check k7t4p3.graph k7t4p3_state_5 7 4 + refine ⟨by decide, k7t4p3_local_5_paths, ?_⟩ + rw [k7t4p3_local_5_eq] + exact k7t4p3_local_5_bad + +private theorem k7t4p3_update_5 : k7t4p3_step_5.apply k7t4p3_state_5 = k7t4p3_state_6 := by + have h : ∀ i j : Fin 7, k7t4p3_step_5.apply k7t4p3_state_5 i j = k7t4p3_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t4p3_state_7 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {0, 2, 3, 4}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 4, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t4p3_local_6 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 4, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_6_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t4p3_state_6 a b ∪ requiredMatrix 7 k7t4p3_step_6_data.required a b) 0 j = k7t4p3_local_6 0 j := by decide + +private theorem k7t4p3_local_6_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t4p3_state_6 a b ∪ requiredMatrix 7 k7t4p3_step_6_data.required a b) 1 j = k7t4p3_local_6 1 j := by decide + +private theorem k7t4p3_local_6_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t4p3_state_6 a b ∪ requiredMatrix 7 k7t4p3_step_6_data.required a b) 2 j = k7t4p3_local_6 2 j := by decide + +private theorem k7t4p3_local_6_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t4p3_state_6 a b ∪ requiredMatrix 7 k7t4p3_step_6_data.required a b) 3 j = k7t4p3_local_6 3 j := by decide + +private theorem k7t4p3_local_6_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t4p3_state_6 a b ∪ requiredMatrix 7 k7t4p3_step_6_data.required a b) 4 j = k7t4p3_local_6 4 j := by decide + +private theorem k7t4p3_local_6_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t4p3_state_6 a b ∪ requiredMatrix 7 k7t4p3_step_6_data.required a b) 5 j = k7t4p3_local_6 5 j := by decide + +private theorem k7t4p3_local_6_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t4p3_state_6 a b ∪ requiredMatrix 7 k7t4p3_step_6_data.required a b) 6 j = k7t4p3_local_6 6 j := by decide + +private theorem k7t4p3_local_6_eq : (fun a b => k7t4p3_state_6 a b ∪ requiredMatrix 7 k7t4p3_step_6_data.required a b) = k7t4p3_local_6 := by + funext i j + fin_cases i + + · exact k7t4p3_local_6_eq_row_0 j + + · exact k7t4p3_local_6_eq_row_1 j + + · exact k7t4p3_local_6_eq_row_2 j + + · exact k7t4p3_local_6_eq_row_3 j + + · exact k7t4p3_local_6_eq_row_4 j + + · exact k7t4p3_local_6_eq_row_5 j + + · exact k7t4p3_local_6_eq_row_6 j + +private theorem k7t4p3_local_6_paths : ∀ p ∈ k7t4p3_step_6_data.required, p.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_6_data.i k7t4p3_step_6_data.j) 7 := by decide + +private theorem k7t4p3_local_6_bad : k7t4p3_step_6_data.bad.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_6_data.i k7t4p3_step_6_data.j) k7t4p3_local_6 7 4 := by decide + +private theorem k7t4p3_step_6_check : k7t4p3_step_6.Check k7t4p3.graph k7t4p3_state_6 7 4 := by + change k7t4p3_step_6_data.Check k7t4p3.graph k7t4p3_state_6 7 4 + refine ⟨k7t4p3_local_6_paths, ?_⟩ + rw [k7t4p3_local_6_eq] + exact k7t4p3_local_6_bad + +private theorem k7t4p3_update_6 : k7t4p3_step_6.apply k7t4p3_state_6 = k7t4p3_state_7 := by + have h : ∀ i j : Fin 7, k7t4p3_step_6.apply k7t4p3_state_6 i j = k7t4p3_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t4p3_state_8 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[{1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 0 4, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t4p3_local_7 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {0, 1}, ∅, ∅, {0, 1}, ∅, {0, 1, 2}, ∅], + #[{0, 1}, ∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[∅, {1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[∅, {1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, {0, 2, 3, 4}, {3, 4, 5}, ∅], + #[{0, 1}, Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 5, {1}], + #[∅, Finset.Icc 0 4, Finset.Icc 0 4, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[{0, 1, 2}, Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_7_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_7 a b ∪ requiredMatrix 7 k7t4p3_step_7_data.required a b) 0 j = k7t4p3_local_7 0 j := by decide + +private theorem k7t4p3_local_7_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_7 a b ∪ requiredMatrix 7 k7t4p3_step_7_data.required a b) 1 j = k7t4p3_local_7 1 j := by decide + +private theorem k7t4p3_local_7_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_7 a b ∪ requiredMatrix 7 k7t4p3_step_7_data.required a b) 2 j = k7t4p3_local_7 2 j := by decide + +private theorem k7t4p3_local_7_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_7 a b ∪ requiredMatrix 7 k7t4p3_step_7_data.required a b) 3 j = k7t4p3_local_7 3 j := by decide + +private theorem k7t4p3_local_7_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_7 a b ∪ requiredMatrix 7 k7t4p3_step_7_data.required a b) 4 j = k7t4p3_local_7 4 j := by decide + +private theorem k7t4p3_local_7_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_7 a b ∪ requiredMatrix 7 k7t4p3_step_7_data.required a b) 5 j = k7t4p3_local_7 5 j := by decide + +private theorem k7t4p3_local_7_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_7 a b ∪ requiredMatrix 7 k7t4p3_step_7_data.required a b) 6 j = k7t4p3_local_7 6 j := by decide + +private theorem k7t4p3_local_7_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_7 a b ∪ requiredMatrix 7 k7t4p3_step_7_data.required a b) 7 j = k7t4p3_local_7 7 j := by decide + +private theorem k7t4p3_local_7_eq : (fun a b => freshMatrix k7t4p3_state_7 a b ∪ requiredMatrix 7 k7t4p3_step_7_data.required a b) = k7t4p3_local_7 := by + funext i j + fin_cases i + + · exact k7t4p3_local_7_eq_row_0 j + + · exact k7t4p3_local_7_eq_row_1 j + + · exact k7t4p3_local_7_eq_row_2 j + + · exact k7t4p3_local_7_eq_row_3 j + + · exact k7t4p3_local_7_eq_row_4 j + + · exact k7t4p3_local_7_eq_row_5 j + + · exact k7t4p3_local_7_eq_row_6 j + + · exact k7t4p3_local_7_eq_row_7 j + +private theorem k7t4p3_local_7_paths : ∀ p ∈ k7t4p3_step_7_data.required, p.Check (freshGraph k7t4p3.graph k7t4p3_step_7_data.i k7t4p3_step_7_data.j) 7 := by decide + +private theorem k7t4p3_local_7_bad : k7t4p3_step_7_data.bad.Check (freshGraph k7t4p3.graph k7t4p3_step_7_data.i k7t4p3_step_7_data.j) k7t4p3_local_7 7 4 := by decide + +private theorem k7t4p3_step_7_check : k7t4p3_step_7.Check k7t4p3.graph k7t4p3_state_7 7 4 := by + change k7t4p3_step_7_data.Check k7t4p3.graph k7t4p3_state_7 7 4 + refine ⟨by decide, k7t4p3_local_7_paths, ?_⟩ + rw [k7t4p3_local_7_eq] + exact k7t4p3_local_7_bad + +private theorem k7t4p3_update_7 : k7t4p3_step_7.apply k7t4p3_state_7 = k7t4p3_state_8 := by + have h : ∀ i j : Fin 7, k7t4p3_step_7.apply k7t4p3_state_7 i j = k7t4p3_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t4p3_state_9 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 4, 5, 6}], + #[{1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 0 4, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t4p3_local_8 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, {1, 2, 4, 5, 6}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, {1, 2, 3}, Finset.Icc 0 4, {3, 4, 5}, {1, 2}], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, {1, 2}, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_8_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t4p3_state_8 a b ∪ requiredMatrix 7 k7t4p3_step_8_data.required a b) 0 j = k7t4p3_local_8 0 j := by decide + +private theorem k7t4p3_local_8_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t4p3_state_8 a b ∪ requiredMatrix 7 k7t4p3_step_8_data.required a b) 1 j = k7t4p3_local_8 1 j := by decide + +private theorem k7t4p3_local_8_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t4p3_state_8 a b ∪ requiredMatrix 7 k7t4p3_step_8_data.required a b) 2 j = k7t4p3_local_8 2 j := by decide + +private theorem k7t4p3_local_8_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t4p3_state_8 a b ∪ requiredMatrix 7 k7t4p3_step_8_data.required a b) 3 j = k7t4p3_local_8 3 j := by decide + +private theorem k7t4p3_local_8_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t4p3_state_8 a b ∪ requiredMatrix 7 k7t4p3_step_8_data.required a b) 4 j = k7t4p3_local_8 4 j := by decide + +private theorem k7t4p3_local_8_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t4p3_state_8 a b ∪ requiredMatrix 7 k7t4p3_step_8_data.required a b) 5 j = k7t4p3_local_8 5 j := by decide + +private theorem k7t4p3_local_8_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t4p3_state_8 a b ∪ requiredMatrix 7 k7t4p3_step_8_data.required a b) 6 j = k7t4p3_local_8 6 j := by decide + +private theorem k7t4p3_local_8_eq : (fun a b => k7t4p3_state_8 a b ∪ requiredMatrix 7 k7t4p3_step_8_data.required a b) = k7t4p3_local_8 := by + funext i j + fin_cases i + + · exact k7t4p3_local_8_eq_row_0 j + + · exact k7t4p3_local_8_eq_row_1 j + + · exact k7t4p3_local_8_eq_row_2 j + + · exact k7t4p3_local_8_eq_row_3 j + + · exact k7t4p3_local_8_eq_row_4 j + + · exact k7t4p3_local_8_eq_row_5 j + + · exact k7t4p3_local_8_eq_row_6 j + +private theorem k7t4p3_local_8_paths : ∀ p ∈ k7t4p3_step_8_data.required, p.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_8_data.i k7t4p3_step_8_data.j) 7 := by decide + +private theorem k7t4p3_local_8_bad : k7t4p3_step_8_data.bad.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_8_data.i k7t4p3_step_8_data.j) k7t4p3_local_8 7 4 := by decide + +private theorem k7t4p3_step_8_check : k7t4p3_step_8.Check k7t4p3.graph k7t4p3_state_8 7 4 := by + change k7t4p3_step_8_data.Check k7t4p3.graph k7t4p3_state_8 7 4 + refine ⟨k7t4p3_local_8_paths, ?_⟩ + rw [k7t4p3_local_8_eq] + exact k7t4p3_local_8_bad + +private theorem k7t4p3_update_8 : k7t4p3_step_8.apply k7t4p3_state_8 = k7t4p3_state_9 := by + have h : ∀ i j : Fin 7, k7t4p3_step_8.apply k7t4p3_state_8 i j = k7t4p3_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t4p3_state_10 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 4, 5, 6}], + #[{1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 0 4, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4, 5}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, {3, 4, 5}, {0, 2, 3, 4, 5}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t4p3_local_9 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[Finset.Icc 1 6, {1, 2, 4, 5, 6}, ∅, Finset.Icc 1 4, Finset.Icc 0 4, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, {1, 2, 3}, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 2 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_9_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t4p3_state_9 a b ∪ requiredMatrix 7 k7t4p3_step_9_data.required a b) 0 j = k7t4p3_local_9 0 j := by decide + +private theorem k7t4p3_local_9_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t4p3_state_9 a b ∪ requiredMatrix 7 k7t4p3_step_9_data.required a b) 1 j = k7t4p3_local_9 1 j := by decide + +private theorem k7t4p3_local_9_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t4p3_state_9 a b ∪ requiredMatrix 7 k7t4p3_step_9_data.required a b) 2 j = k7t4p3_local_9 2 j := by decide + +private theorem k7t4p3_local_9_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t4p3_state_9 a b ∪ requiredMatrix 7 k7t4p3_step_9_data.required a b) 3 j = k7t4p3_local_9 3 j := by decide + +private theorem k7t4p3_local_9_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t4p3_state_9 a b ∪ requiredMatrix 7 k7t4p3_step_9_data.required a b) 4 j = k7t4p3_local_9 4 j := by decide + +private theorem k7t4p3_local_9_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t4p3_state_9 a b ∪ requiredMatrix 7 k7t4p3_step_9_data.required a b) 5 j = k7t4p3_local_9 5 j := by decide + +private theorem k7t4p3_local_9_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t4p3_state_9 a b ∪ requiredMatrix 7 k7t4p3_step_9_data.required a b) 6 j = k7t4p3_local_9 6 j := by decide + +private theorem k7t4p3_local_9_eq : (fun a b => k7t4p3_state_9 a b ∪ requiredMatrix 7 k7t4p3_step_9_data.required a b) = k7t4p3_local_9 := by + funext i j + fin_cases i + + · exact k7t4p3_local_9_eq_row_0 j + + · exact k7t4p3_local_9_eq_row_1 j + + · exact k7t4p3_local_9_eq_row_2 j + + · exact k7t4p3_local_9_eq_row_3 j + + · exact k7t4p3_local_9_eq_row_4 j + + · exact k7t4p3_local_9_eq_row_5 j + + · exact k7t4p3_local_9_eq_row_6 j + +private theorem k7t4p3_local_9_paths : ∀ p ∈ k7t4p3_step_9_data.required, p.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_9_data.i k7t4p3_step_9_data.j) 7 := by decide + +private theorem k7t4p3_local_9_bad : k7t4p3_step_9_data.bad.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_9_data.i k7t4p3_step_9_data.j) k7t4p3_local_9 7 4 := by decide + +private theorem k7t4p3_step_9_check : k7t4p3_step_9.Check k7t4p3.graph k7t4p3_state_9 7 4 := by + change k7t4p3_step_9_data.Check k7t4p3.graph k7t4p3_state_9 7 4 + refine ⟨k7t4p3_local_9_paths, ?_⟩ + rw [k7t4p3_local_9_eq] + exact k7t4p3_local_9_bad + +private theorem k7t4p3_update_9 : k7t4p3_step_9.apply k7t4p3_state_9 = k7t4p3_state_10 := by + have h : ∀ i j : Fin 7, k7t4p3_step_9.apply k7t4p3_state_9 i j = k7t4p3_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t4p3_state_11 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 4, 5, 6}], + #[{1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 0 4, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4, 5}, {0}], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, {3, 4, 5}, {0, 2, 3, 4, 5}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {0}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t4p3_local_10 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 4, 5, 6}], + #[{1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[Finset.Icc 1 6, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 0 4, Finset.Icc 1 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4, 5}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, Finset.Icc 1 5, {0, 2, 3, 4, 5}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_10_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t4p3_state_10 a b ∪ requiredMatrix 7 k7t4p3_step_10_data.required a b) 0 j = k7t4p3_local_10 0 j := by decide + +private theorem k7t4p3_local_10_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t4p3_state_10 a b ∪ requiredMatrix 7 k7t4p3_step_10_data.required a b) 1 j = k7t4p3_local_10 1 j := by decide + +private theorem k7t4p3_local_10_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t4p3_state_10 a b ∪ requiredMatrix 7 k7t4p3_step_10_data.required a b) 2 j = k7t4p3_local_10 2 j := by decide + +private theorem k7t4p3_local_10_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t4p3_state_10 a b ∪ requiredMatrix 7 k7t4p3_step_10_data.required a b) 3 j = k7t4p3_local_10 3 j := by decide + +private theorem k7t4p3_local_10_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t4p3_state_10 a b ∪ requiredMatrix 7 k7t4p3_step_10_data.required a b) 4 j = k7t4p3_local_10 4 j := by decide + +private theorem k7t4p3_local_10_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t4p3_state_10 a b ∪ requiredMatrix 7 k7t4p3_step_10_data.required a b) 5 j = k7t4p3_local_10 5 j := by decide + +private theorem k7t4p3_local_10_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t4p3_state_10 a b ∪ requiredMatrix 7 k7t4p3_step_10_data.required a b) 6 j = k7t4p3_local_10 6 j := by decide + +private theorem k7t4p3_local_10_eq : (fun a b => k7t4p3_state_10 a b ∪ requiredMatrix 7 k7t4p3_step_10_data.required a b) = k7t4p3_local_10 := by + funext i j + fin_cases i + + · exact k7t4p3_local_10_eq_row_0 j + + · exact k7t4p3_local_10_eq_row_1 j + + · exact k7t4p3_local_10_eq_row_2 j + + · exact k7t4p3_local_10_eq_row_3 j + + · exact k7t4p3_local_10_eq_row_4 j + + · exact k7t4p3_local_10_eq_row_5 j + + · exact k7t4p3_local_10_eq_row_6 j + +private theorem k7t4p3_local_10_paths : ∀ p ∈ k7t4p3_step_10_data.required, p.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_10_data.i k7t4p3_step_10_data.j) 7 := by decide + +private theorem k7t4p3_local_10_bad : k7t4p3_step_10_data.bad.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_10_data.i k7t4p3_step_10_data.j) k7t4p3_local_10 7 4 := by decide + +private theorem k7t4p3_step_10_check : k7t4p3_step_10.Check k7t4p3.graph k7t4p3_state_10 7 4 := by + change k7t4p3_step_10_data.Check k7t4p3.graph k7t4p3_state_10 7 4 + refine ⟨k7t4p3_local_10_paths, ?_⟩ + rw [k7t4p3_local_10_eq] + exact k7t4p3_local_10_bad + +private theorem k7t4p3_update_10 : k7t4p3_step_10.apply k7t4p3_state_10 = k7t4p3_state_11 := by + have h : ∀ i j : Fin 7, k7t4p3_step_10.apply k7t4p3_state_10 i j = k7t4p3_state_11 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t4p3_state_12 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 4, 5, 6}], + #[{1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 0 4, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4, 5}, {0}], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {0}], + #[Finset.Icc 0 5, {1, 2, 3}, {3, 4, 5}, {0, 2, 3, 4, 5}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {0}, {0}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t4p3_local_11 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 0 4, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 5, {0}], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 0 5, {1, 2, 3}, {3, 4, 5}, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {0}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_11_eq_row_0 : ∀ j : Fin 7, (fun a b => k7t4p3_state_11 a b ∪ requiredMatrix 7 k7t4p3_step_11_data.required a b) 0 j = k7t4p3_local_11 0 j := by decide + +private theorem k7t4p3_local_11_eq_row_1 : ∀ j : Fin 7, (fun a b => k7t4p3_state_11 a b ∪ requiredMatrix 7 k7t4p3_step_11_data.required a b) 1 j = k7t4p3_local_11 1 j := by decide + +private theorem k7t4p3_local_11_eq_row_2 : ∀ j : Fin 7, (fun a b => k7t4p3_state_11 a b ∪ requiredMatrix 7 k7t4p3_step_11_data.required a b) 2 j = k7t4p3_local_11 2 j := by decide + +private theorem k7t4p3_local_11_eq_row_3 : ∀ j : Fin 7, (fun a b => k7t4p3_state_11 a b ∪ requiredMatrix 7 k7t4p3_step_11_data.required a b) 3 j = k7t4p3_local_11 3 j := by decide + +private theorem k7t4p3_local_11_eq_row_4 : ∀ j : Fin 7, (fun a b => k7t4p3_state_11 a b ∪ requiredMatrix 7 k7t4p3_step_11_data.required a b) 4 j = k7t4p3_local_11 4 j := by decide + +private theorem k7t4p3_local_11_eq_row_5 : ∀ j : Fin 7, (fun a b => k7t4p3_state_11 a b ∪ requiredMatrix 7 k7t4p3_step_11_data.required a b) 5 j = k7t4p3_local_11 5 j := by decide + +private theorem k7t4p3_local_11_eq_row_6 : ∀ j : Fin 7, (fun a b => k7t4p3_state_11 a b ∪ requiredMatrix 7 k7t4p3_step_11_data.required a b) 6 j = k7t4p3_local_11 6 j := by decide + +private theorem k7t4p3_local_11_eq : (fun a b => k7t4p3_state_11 a b ∪ requiredMatrix 7 k7t4p3_step_11_data.required a b) = k7t4p3_local_11 := by + funext i j + fin_cases i + + · exact k7t4p3_local_11_eq_row_0 j + + · exact k7t4p3_local_11_eq_row_1 j + + · exact k7t4p3_local_11_eq_row_2 j + + · exact k7t4p3_local_11_eq_row_3 j + + · exact k7t4p3_local_11_eq_row_4 j + + · exact k7t4p3_local_11_eq_row_5 j + + · exact k7t4p3_local_11_eq_row_6 j + +private theorem k7t4p3_local_11_paths : ∀ p ∈ k7t4p3_step_11_data.required, p.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_11_data.i k7t4p3_step_11_data.j) 7 := by decide + +private theorem k7t4p3_local_11_bad : k7t4p3_step_11_data.bad.Check (addedEdgeGraph k7t4p3.graph k7t4p3_step_11_data.i k7t4p3_step_11_data.j) k7t4p3_local_11 7 4 := by decide + +private theorem k7t4p3_step_11_check : k7t4p3_step_11.Check k7t4p3.graph k7t4p3_state_11 7 4 := by + change k7t4p3_step_11_data.Check k7t4p3.graph k7t4p3_state_11 7 4 + refine ⟨k7t4p3_local_11_paths, ?_⟩ + rw [k7t4p3_local_11_eq] + exact k7t4p3_local_11_bad + +private theorem k7t4p3_update_11 : k7t4p3_step_11.apply k7t4p3_state_11 = k7t4p3_state_12 := by + have h : ∀ i j : Fin 7, k7t4p3_step_11.apply k7t4p3_state_11 i j = k7t4p3_state_12 i j := by decide + exact funext (fun i => funext (h i)) + +private def k7t4p3_state_13 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 4, 5, 6}], + #[{1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, {1, 2, 3}, {1, 2, 4, 5, 6}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 0 4, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4, 5}, {0}], + #[Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {0, 1}], + #[Finset.Icc 0 5, {1, 2, 3}, {3, 4, 5}, {0, 2, 3, 4, 5}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {0}, {0, 1}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k7t4p3_local_12 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {0, 1}, ∅, ∅, {0, 1, 2}, ∅, {0, 1}, ∅], + #[{0, 1}, ∅, {1, 4, 5, 6}, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {1, 2, 4, 5, 6}], + #[∅, {1, 4, 5, 6}, ∅, {1, 2, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 3, {1, 2, 4, 5, 6}], + #[∅, {1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1, 3, 4, 5}, ∅], + #[{0, 1, 2}, Finset.Icc 0 5, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 5, {0}], + #[∅, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {0}], + #[{0, 1}, Finset.Icc 0 5, Finset.Icc 0 3, {1, 3, 4, 5}, Finset.Icc 0 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2, 4, 5, 6}, {1, 2, 4, 5, 6}, ∅, {0}, {0}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p3_local_12_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_12 a b ∪ requiredMatrix 7 k7t4p3_step_12_data.required a b) 0 j = k7t4p3_local_12 0 j := by decide + +private theorem k7t4p3_local_12_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_12 a b ∪ requiredMatrix 7 k7t4p3_step_12_data.required a b) 1 j = k7t4p3_local_12 1 j := by decide + +private theorem k7t4p3_local_12_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_12 a b ∪ requiredMatrix 7 k7t4p3_step_12_data.required a b) 2 j = k7t4p3_local_12 2 j := by decide + +private theorem k7t4p3_local_12_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_12 a b ∪ requiredMatrix 7 k7t4p3_step_12_data.required a b) 3 j = k7t4p3_local_12 3 j := by decide + +private theorem k7t4p3_local_12_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_12 a b ∪ requiredMatrix 7 k7t4p3_step_12_data.required a b) 4 j = k7t4p3_local_12 4 j := by decide + +private theorem k7t4p3_local_12_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_12 a b ∪ requiredMatrix 7 k7t4p3_step_12_data.required a b) 5 j = k7t4p3_local_12 5 j := by decide + +private theorem k7t4p3_local_12_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_12 a b ∪ requiredMatrix 7 k7t4p3_step_12_data.required a b) 6 j = k7t4p3_local_12 6 j := by decide + +private theorem k7t4p3_local_12_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k7t4p3_state_12 a b ∪ requiredMatrix 7 k7t4p3_step_12_data.required a b) 7 j = k7t4p3_local_12 7 j := by decide + +private theorem k7t4p3_local_12_eq : (fun a b => freshMatrix k7t4p3_state_12 a b ∪ requiredMatrix 7 k7t4p3_step_12_data.required a b) = k7t4p3_local_12 := by + funext i j + fin_cases i + + · exact k7t4p3_local_12_eq_row_0 j + + · exact k7t4p3_local_12_eq_row_1 j + + · exact k7t4p3_local_12_eq_row_2 j + + · exact k7t4p3_local_12_eq_row_3 j + + · exact k7t4p3_local_12_eq_row_4 j + + · exact k7t4p3_local_12_eq_row_5 j + + · exact k7t4p3_local_12_eq_row_6 j + + · exact k7t4p3_local_12_eq_row_7 j + +private theorem k7t4p3_local_12_paths : ∀ p ∈ k7t4p3_step_12_data.required, p.Check (freshGraph k7t4p3.graph k7t4p3_step_12_data.i k7t4p3_step_12_data.j) 7 := by decide + +private theorem k7t4p3_local_12_bad : k7t4p3_step_12_data.bad.Check (freshGraph k7t4p3.graph k7t4p3_step_12_data.i k7t4p3_step_12_data.j) k7t4p3_local_12 7 4 := by decide + +private theorem k7t4p3_step_12_check : k7t4p3_step_12.Check k7t4p3.graph k7t4p3_state_12 7 4 := by + change k7t4p3_step_12_data.Check k7t4p3.graph k7t4p3_state_12 7 4 + refine ⟨by decide, k7t4p3_local_12_paths, ?_⟩ + rw [k7t4p3_local_12_eq] + exact k7t4p3_local_12_bad + +private theorem k7t4p3_update_12 : k7t4p3_step_12.apply k7t4p3_state_12 = k7t4p3_state_13 := by + have h : ∀ i j : Fin 7, k7t4p3_step_12.apply k7t4p3_state_12 i j = k7t4p3_state_13 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k7t4p3_closure_13 : ClosureCheck k7t4p3.graph k7t4p3_state_13 7 4 [] := by trivial + +private theorem k7t4p3_closure_12 : ClosureCheck k7t4p3.graph k7t4p3_state_12 7 4 [k7t4p3_step_12] := by + constructor + · exact k7t4p3_step_12_check + · rw [k7t4p3_update_12] + exact k7t4p3_closure_13 + +private theorem k7t4p3_closure_11 : ClosureCheck k7t4p3.graph k7t4p3_state_11 7 4 [k7t4p3_step_11, k7t4p3_step_12] := by + constructor + · exact k7t4p3_step_11_check + · rw [k7t4p3_update_11] + exact k7t4p3_closure_12 + +private theorem k7t4p3_closure_10 : ClosureCheck k7t4p3.graph k7t4p3_state_10 7 4 [k7t4p3_step_10, k7t4p3_step_11, k7t4p3_step_12] := by + constructor + · exact k7t4p3_step_10_check + · rw [k7t4p3_update_10] + exact k7t4p3_closure_11 + +private theorem k7t4p3_closure_9 : ClosureCheck k7t4p3.graph k7t4p3_state_9 7 4 [k7t4p3_step_9, k7t4p3_step_10, k7t4p3_step_11, k7t4p3_step_12] := by + constructor + · exact k7t4p3_step_9_check + · rw [k7t4p3_update_9] + exact k7t4p3_closure_10 + +private theorem k7t4p3_closure_8 : ClosureCheck k7t4p3.graph k7t4p3_state_8 7 4 [k7t4p3_step_8, k7t4p3_step_9, k7t4p3_step_10, k7t4p3_step_11, k7t4p3_step_12] := by + constructor + · exact k7t4p3_step_8_check + · rw [k7t4p3_update_8] + exact k7t4p3_closure_9 + +private theorem k7t4p3_closure_7 : ClosureCheck k7t4p3.graph k7t4p3_state_7 7 4 [k7t4p3_step_7, k7t4p3_step_8, k7t4p3_step_9, k7t4p3_step_10, k7t4p3_step_11, k7t4p3_step_12] := by + constructor + · exact k7t4p3_step_7_check + · rw [k7t4p3_update_7] + exact k7t4p3_closure_8 + +private theorem k7t4p3_closure_6 : ClosureCheck k7t4p3.graph k7t4p3_state_6 7 4 [k7t4p3_step_6, k7t4p3_step_7, k7t4p3_step_8, k7t4p3_step_9, k7t4p3_step_10, k7t4p3_step_11, k7t4p3_step_12] := by + constructor + · exact k7t4p3_step_6_check + · rw [k7t4p3_update_6] + exact k7t4p3_closure_7 + +private theorem k7t4p3_closure_5 : ClosureCheck k7t4p3.graph k7t4p3_state_5 7 4 [k7t4p3_step_5, k7t4p3_step_6, k7t4p3_step_7, k7t4p3_step_8, k7t4p3_step_9, k7t4p3_step_10, k7t4p3_step_11, k7t4p3_step_12] := by + constructor + · exact k7t4p3_step_5_check + · rw [k7t4p3_update_5] + exact k7t4p3_closure_6 + +private theorem k7t4p3_closure_4 : ClosureCheck k7t4p3.graph k7t4p3_state_4 7 4 [k7t4p3_step_4, k7t4p3_step_5, k7t4p3_step_6, k7t4p3_step_7, k7t4p3_step_8, k7t4p3_step_9, k7t4p3_step_10, k7t4p3_step_11, k7t4p3_step_12] := by + constructor + · exact k7t4p3_step_4_check + · rw [k7t4p3_update_4] + exact k7t4p3_closure_5 + +private theorem k7t4p3_closure_3 : ClosureCheck k7t4p3.graph k7t4p3_state_3 7 4 [k7t4p3_step_3, k7t4p3_step_4, k7t4p3_step_5, k7t4p3_step_6, k7t4p3_step_7, k7t4p3_step_8, k7t4p3_step_9, k7t4p3_step_10, k7t4p3_step_11, k7t4p3_step_12] := by + constructor + · exact k7t4p3_step_3_check + · rw [k7t4p3_update_3] + exact k7t4p3_closure_4 + +private theorem k7t4p3_closure_2 : ClosureCheck k7t4p3.graph k7t4p3_state_2 7 4 [k7t4p3_step_2, k7t4p3_step_3, k7t4p3_step_4, k7t4p3_step_5, k7t4p3_step_6, k7t4p3_step_7, k7t4p3_step_8, k7t4p3_step_9, k7t4p3_step_10, k7t4p3_step_11, k7t4p3_step_12] := by + constructor + · exact k7t4p3_step_2_check + · rw [k7t4p3_update_2] + exact k7t4p3_closure_3 + +private theorem k7t4p3_closure_1 : ClosureCheck k7t4p3.graph k7t4p3_state_1 7 4 [k7t4p3_step_1, k7t4p3_step_2, k7t4p3_step_3, k7t4p3_step_4, k7t4p3_step_5, k7t4p3_step_6, k7t4p3_step_7, k7t4p3_step_8, k7t4p3_step_9, k7t4p3_step_10, k7t4p3_step_11, k7t4p3_step_12] := by + constructor + · exact k7t4p3_step_1_check + · rw [k7t4p3_update_1] + exact k7t4p3_closure_2 + +private theorem k7t4p3_closure_0 : ClosureCheck k7t4p3.graph k7t4p3_state_0 7 4 [k7t4p3_step_0, k7t4p3_step_1, k7t4p3_step_2, k7t4p3_step_3, k7t4p3_step_4, k7t4p3_step_5, k7t4p3_step_6, k7t4p3_step_7, k7t4p3_step_8, k7t4p3_step_9, k7t4p3_step_10, k7t4p3_step_11, k7t4p3_step_12] := by + constructor + · exact k7t4p3_step_0_check + · rw [k7t4p3_update_0] + exact k7t4p3_closure_1 + +private theorem k7t4p3_matrix_eq : k7t4p3.matrix 7 = k7t4p3_state_13 := by + change closureMatrix (k7t4p3.initialMatrix 7) _ = _ + rw [k7t4p3_initial_eq] + change closureMatrix k7t4p3_state_0 [k7t4p3_step_0, k7t4p3_step_1, k7t4p3_step_2, k7t4p3_step_3, k7t4p3_step_4, k7t4p3_step_5, k7t4p3_step_6, k7t4p3_step_7, k7t4p3_step_8, k7t4p3_step_9, k7t4p3_step_10, k7t4p3_step_11, k7t4p3_step_12] = _ + simp only [closureMatrix] + rw [k7t4p3_update_0, k7t4p3_update_1, k7t4p3_update_2, k7t4p3_update_3, k7t4p3_update_4, k7t4p3_update_5, k7t4p3_update_6, k7t4p3_update_7, k7t4p3_update_8, k7t4p3_update_9, k7t4p3_update_10, k7t4p3_update_11, k7t4p3_update_12] + +private theorem k7t4p3_part_0 : k7t4p3.chains.flatten = List.finRange _ := by decide + +private theorem k7t4p3_part_1 : k7t4p3.chains.map List.length = ([[], [], [3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t4p3_part_2 : k7t4p3.chains.map (fun l => l.map (fun i => decide (i ∈ k7t4p3.clique))) = ([[], [], [3]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t4p3_templates_item_0 : (⟨0, 1, [], [], [], 4, 6⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_1 : (⟨0, 1, [[2, 3, 4, 5, 6]], [], [], 1, 1⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_2 : (⟨0, 2, [], [], [], 4, 6⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_3 : (⟨0, 2, [], [], [3, 4, 5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_4 : (⟨0, 3, [], [], [2], 3, 5⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_5 : (⟨0, 3, [], [], [4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_6 : (⟨0, 4, [], [], [3, 2], 2, 4⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_7 : (⟨0, 5, [], [], [4, 3, 2], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_8 : (⟨0, 5, [], [], [6], 3, 5⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_9 : (⟨0, 6, [], [], [], 4, 6⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_10 : (⟨0, 6, [], [], [5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_11 : (⟨1, 2, [], [], [], 4, 6⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_12 : (⟨1, 2, [], [], [3, 4, 5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_13 : (⟨1, 3, [], [], [2], 3, 5⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_14 : (⟨1, 3, [], [], [4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_15 : (⟨1, 4, [], [], [3, 2], 2, 4⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_16 : (⟨1, 5, [], [], [4, 3, 2], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_17 : (⟨1, 6, [], [], [], 4, 6⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_18 : (⟨1, 6, [], [], [5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_19 : (⟨2, 3, [], [], [4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_20 : (⟨2, 4, [], [], [5, 6], 2, 4⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_21 : (⟨2, 5, [], [], [6], 3, 5⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_22 : (⟨3, 4, [], [2], [5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_23 : (⟨3, 5, [], [2], [6], 2, 4⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_24 : (⟨4, 5, [], [2, 3], [6], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_templates_item_25 : (⟨5, 6, [], [2, 3, 4], [], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p3_part_3 : ∀ T ∈ k7t4p3.templates, T.Check k7t4p3.graph k7t4p3.clique 7 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k7t4p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t4p3_templates_item_0, k7t4p3_templates_item_1, k7t4p3_templates_item_2, k7t4p3_templates_item_3, k7t4p3_templates_item_4, k7t4p3_templates_item_5, k7t4p3_templates_item_6, k7t4p3_templates_item_7, k7t4p3_templates_item_8, k7t4p3_templates_item_9, k7t4p3_templates_item_10, k7t4p3_templates_item_11, k7t4p3_templates_item_12, k7t4p3_templates_item_13, k7t4p3_templates_item_14, k7t4p3_templates_item_15, k7t4p3_templates_item_16, k7t4p3_templates_item_17, k7t4p3_templates_item_18, k7t4p3_templates_item_19, k7t4p3_templates_item_20, k7t4p3_templates_item_21, k7t4p3_templates_item_22, k7t4p3_templates_item_23, k7t4p3_templates_item_24, k7t4p3_templates_item_25⟩ + +private theorem k7t4p3_required_item_0 : (⟨3, 5, [4]⟩ : RequiredPathData (Fin 7)).Check k7t4p3.graph 7 := by decide + +private theorem k7t4p3_part_4 : ∀ p ∈ k7t4p3.required, p.Check k7t4p3.graph 7 := by + simp only [k7t4p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact k7t4p3_required_item_0 + +private theorem k7t4p3_part_5 : ClosureCheck k7t4p3.graph (k7t4p3.initialMatrix 7) 7 4 k7t4p3.closure := by + rw [k7t4p3_initial_eq] + exact k7t4p3_closure_0 + +private theorem k7t4p3_part_6 : k7t4p3.bad.Check k7t4p3.graph (k7t4p3.matrix 7) 7 4 := by + rw [k7t4p3_matrix_eq] + decide + +theorem k7t4p3_check : k7t4p3.Check 7 4 [[], [], [3]] := + ⟨k7t4p3_part_0, k7t4p3_part_1, k7t4p3_part_2, k7t4p3_part_3, k7t4p3_part_4, k7t4p3_part_5, k7t4p3_part_6⟩ +def k7t4p4 : LayoutCertificate 6 where + chains := [[0], [1, 2, 3, 4, 5]] + clique := {0, 1, 3, 5} + templates := [⟨0, 1, [], [], [], 2, 6⟩, + ⟨0, 1, [], [], [2, 3, 4, 5], 1, 2⟩, + ⟨0, 2, [], [], [1], 1, 5⟩, + ⟨0, 4, [], [], [3], 1, 5⟩, + ⟨0, 5, [], [], [], 2, 6⟩, + ⟨0, 5, [], [], [4, 3, 2, 1], 1, 2⟩, + ⟨1, 2, [], [], [3], 1, 5⟩, + ⟨1, 4, [], [], [3], 1, 5⟩, + ⟨2, 3, [], [1], [], 1, 5⟩, + ⟨2, 4, [], [1], [3], 1, 4⟩, + ⟨2, 5, [], [1], [], 1, 5⟩, + ⟨3, 4, [], [], [5], 1, 5⟩, + ⟨4, 5, [], [3], [], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (2, 2), (4, 2), (1, 3)}⟩ + + +private def k7t4p4_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5], + #[∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p4_initial_eq_row_0 : ∀ j : Fin 6, (k7t4p4.initialMatrix 7) 0 j = k7t4p4_state_0 0 j := by decide + +private theorem k7t4p4_initial_eq_row_1 : ∀ j : Fin 6, (k7t4p4.initialMatrix 7) 1 j = k7t4p4_state_0 1 j := by decide + +private theorem k7t4p4_initial_eq_row_2 : ∀ j : Fin 6, (k7t4p4.initialMatrix 7) 2 j = k7t4p4_state_0 2 j := by decide + +private theorem k7t4p4_initial_eq_row_3 : ∀ j : Fin 6, (k7t4p4.initialMatrix 7) 3 j = k7t4p4_state_0 3 j := by decide + +private theorem k7t4p4_initial_eq_row_4 : ∀ j : Fin 6, (k7t4p4.initialMatrix 7) 4 j = k7t4p4_state_0 4 j := by decide + +private theorem k7t4p4_initial_eq_row_5 : ∀ j : Fin 6, (k7t4p4.initialMatrix 7) 5 j = k7t4p4_state_0 5 j := by decide + +private theorem k7t4p4_initial_eq : (k7t4p4.initialMatrix 7) = k7t4p4_state_0 := by + funext i j + fin_cases i + + · exact k7t4p4_initial_eq_row_0 j + + · exact k7t4p4_initial_eq_row_1 j + + · exact k7t4p4_initial_eq_row_2 j + + · exact k7t4p4_initial_eq_row_3 j + + · exact k7t4p4_initial_eq_row_4 j + + · exact k7t4p4_initial_eq_row_5 j + +private theorem k7t4p4_closure_0 : ClosureCheck k7t4p4.graph k7t4p4_state_0 7 4 [] := by trivial + +private theorem k7t4p4_matrix_eq : k7t4p4.matrix 7 = k7t4p4_state_0 := by + change closureMatrix (k7t4p4.initialMatrix 7) _ = _ + rw [k7t4p4_initial_eq] + change closureMatrix k7t4p4_state_0 [] = _ + rfl + +private theorem k7t4p4_part_0 : k7t4p4.chains.flatten = List.finRange _ := by decide + +private theorem k7t4p4_part_1 : k7t4p4.chains.map List.length = ([[], [1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t4p4_part_2 : k7t4p4.chains.map (fun l => l.map (fun i => decide (i ∈ k7t4p4.clique))) = ([[], [1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t4p4_templates_item_0 : (⟨0, 1, [], [], [], 2, 6⟩ : TemplateData (Fin 6)).Check k7t4p4.graph k7t4p4.clique 7 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p4_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5], 1, 2⟩ : TemplateData (Fin 6)).Check k7t4p4.graph k7t4p4.clique 7 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p4_templates_item_2 : (⟨0, 2, [], [], [1], 1, 5⟩ : TemplateData (Fin 6)).Check k7t4p4.graph k7t4p4.clique 7 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p4_templates_item_3 : (⟨0, 4, [], [], [3], 1, 5⟩ : TemplateData (Fin 6)).Check k7t4p4.graph k7t4p4.clique 7 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p4_templates_item_4 : (⟨0, 5, [], [], [], 2, 6⟩ : TemplateData (Fin 6)).Check k7t4p4.graph k7t4p4.clique 7 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p4_templates_item_5 : (⟨0, 5, [], [], [4, 3, 2, 1], 1, 2⟩ : TemplateData (Fin 6)).Check k7t4p4.graph k7t4p4.clique 7 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p4_templates_item_6 : (⟨1, 2, [], [], [3], 1, 5⟩ : TemplateData (Fin 6)).Check k7t4p4.graph k7t4p4.clique 7 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p4_templates_item_7 : (⟨1, 4, [], [], [3], 1, 5⟩ : TemplateData (Fin 6)).Check k7t4p4.graph k7t4p4.clique 7 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p4_templates_item_8 : (⟨2, 3, [], [1], [], 1, 5⟩ : TemplateData (Fin 6)).Check k7t4p4.graph k7t4p4.clique 7 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p4_templates_item_9 : (⟨2, 4, [], [1], [3], 1, 4⟩ : TemplateData (Fin 6)).Check k7t4p4.graph k7t4p4.clique 7 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p4_templates_item_10 : (⟨2, 5, [], [1], [], 1, 5⟩ : TemplateData (Fin 6)).Check k7t4p4.graph k7t4p4.clique 7 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p4_templates_item_11 : (⟨3, 4, [], [], [5], 1, 5⟩ : TemplateData (Fin 6)).Check k7t4p4.graph k7t4p4.clique 7 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p4_templates_item_12 : (⟨4, 5, [], [3], [], 1, 5⟩ : TemplateData (Fin 6)).Check k7t4p4.graph k7t4p4.clique 7 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p4_part_3 : ∀ T ∈ k7t4p4.templates, T.Check k7t4p4.graph k7t4p4.clique 7 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k7t4p4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t4p4_templates_item_0, k7t4p4_templates_item_1, k7t4p4_templates_item_2, k7t4p4_templates_item_3, k7t4p4_templates_item_4, k7t4p4_templates_item_5, k7t4p4_templates_item_6, k7t4p4_templates_item_7, k7t4p4_templates_item_8, k7t4p4_templates_item_9, k7t4p4_templates_item_10, k7t4p4_templates_item_11, k7t4p4_templates_item_12⟩ + +private theorem k7t4p4_part_4 : ∀ p ∈ k7t4p4.required, p.Check k7t4p4.graph 7 := by decide + +private theorem k7t4p4_part_5 : ClosureCheck k7t4p4.graph (k7t4p4.initialMatrix 7) 7 4 k7t4p4.closure := by + rw [k7t4p4_initial_eq] + exact k7t4p4_closure_0 + +private theorem k7t4p4_part_6 : k7t4p4.bad.Check k7t4p4.graph (k7t4p4.matrix 7) 7 4 := by + rw [k7t4p4_matrix_eq] + decide + +theorem k7t4p4_check : k7t4p4.Check 7 4 [[], [1, 1]] := + ⟨k7t4p4_part_0, k7t4p4_part_1, k7t4p4_part_2, k7t4p4_part_3, k7t4p4_part_4, k7t4p4_part_5, k7t4p4_part_6⟩ +def k7t4p5 : LayoutCertificate 7 where + chains := [[0], [1, 2, 3, 4, 5, 6]] + clique := {0, 1, 3, 6} + templates := [⟨0, 1, [], [], [], 3, 6⟩, + ⟨0, 1, [[3, 4, 5, 6]], [], [], 2, 2⟩, + ⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 1⟩, + ⟨0, 2, [], [], [1], 2, 5⟩, + ⟨0, 2, [[3, 4, 5, 6]], [], [1], 1, 1⟩, + ⟨0, 4, [], [], [3], 2, 5⟩, + ⟨0, 4, [], [], [5, 6], 1, 4⟩, + ⟨0, 5, [], [], [4, 3], 1, 4⟩, + ⟨0, 6, [], [], [5, 4, 3], 2, 3⟩, + ⟨0, 6, [], [], [5, 4, 3, 2, 1], 1, 1⟩, + ⟨1, 2, [], [], [3], 2, 5⟩, + ⟨1, 2, [], [], [3, 4, 5, 6], 1, 2⟩, + ⟨1, 4, [], [], [3], 2, 5⟩, + ⟨1, 4, [], [], [5, 6], 1, 4⟩, + ⟨1, 5, [], [], [4, 3], 1, 4⟩, + ⟨2, 3, [], [1], [4, 5, 6], 1, 2⟩, + ⟨2, 4, [], [1], [3], 1, 4⟩, + ⟨2, 5, [], [1], [4, 3], 1, 3⟩, + ⟨2, 6, [], [1], [5, 4, 3], 1, 2⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 2)}⟩ + + +private def k7t4p5_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, {1, 2}, Finset.Icc 1 4, {1, 2, 3}, {1, 2}], + #[∅, ∅, {1, 2}, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 3}, ∅, ∅, ∅, ∅], + #[{1, 2, 3}, ∅, {1, 2}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p5_initial_eq_row_0 : ∀ j : Fin 7, (k7t4p5.initialMatrix 7) 0 j = k7t4p5_state_0 0 j := by decide + +private theorem k7t4p5_initial_eq_row_1 : ∀ j : Fin 7, (k7t4p5.initialMatrix 7) 1 j = k7t4p5_state_0 1 j := by decide + +private theorem k7t4p5_initial_eq_row_2 : ∀ j : Fin 7, (k7t4p5.initialMatrix 7) 2 j = k7t4p5_state_0 2 j := by decide + +private theorem k7t4p5_initial_eq_row_3 : ∀ j : Fin 7, (k7t4p5.initialMatrix 7) 3 j = k7t4p5_state_0 3 j := by decide + +private theorem k7t4p5_initial_eq_row_4 : ∀ j : Fin 7, (k7t4p5.initialMatrix 7) 4 j = k7t4p5_state_0 4 j := by decide + +private theorem k7t4p5_initial_eq_row_5 : ∀ j : Fin 7, (k7t4p5.initialMatrix 7) 5 j = k7t4p5_state_0 5 j := by decide + +private theorem k7t4p5_initial_eq_row_6 : ∀ j : Fin 7, (k7t4p5.initialMatrix 7) 6 j = k7t4p5_state_0 6 j := by decide + +private theorem k7t4p5_initial_eq : (k7t4p5.initialMatrix 7) = k7t4p5_state_0 := by + funext i j + fin_cases i + + · exact k7t4p5_initial_eq_row_0 j + + · exact k7t4p5_initial_eq_row_1 j + + · exact k7t4p5_initial_eq_row_2 j + + · exact k7t4p5_initial_eq_row_3 j + + · exact k7t4p5_initial_eq_row_4 j + + · exact k7t4p5_initial_eq_row_5 j + + · exact k7t4p5_initial_eq_row_6 j + +private theorem k7t4p5_closure_0 : ClosureCheck k7t4p5.graph k7t4p5_state_0 7 4 [] := by trivial + +private theorem k7t4p5_matrix_eq : k7t4p5.matrix 7 = k7t4p5_state_0 := by + change closureMatrix (k7t4p5.initialMatrix 7) _ = _ + rw [k7t4p5_initial_eq] + change closureMatrix k7t4p5_state_0 [] = _ + rfl + +private theorem k7t4p5_part_0 : k7t4p5.chains.flatten = List.finRange _ := by decide + +private theorem k7t4p5_part_1 : k7t4p5.chains.map List.length = ([[], [1, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t4p5_part_2 : k7t4p5.chains.map (fun l => l.map (fun i => decide (i ∈ k7t4p5.clique))) = ([[], [1, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t4p5_templates_item_0 : (⟨0, 1, [], [], [], 3, 6⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6]], [], [], 2, 2⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_2 : (⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 1⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_3 : (⟨0, 2, [], [], [1], 2, 5⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_4 : (⟨0, 2, [[3, 4, 5, 6]], [], [1], 1, 1⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_5 : (⟨0, 4, [], [], [3], 2, 5⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_6 : (⟨0, 4, [], [], [5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_7 : (⟨0, 5, [], [], [4, 3], 1, 4⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_8 : (⟨0, 6, [], [], [5, 4, 3], 2, 3⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_9 : (⟨0, 6, [], [], [5, 4, 3, 2, 1], 1, 1⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_10 : (⟨1, 2, [], [], [3], 2, 5⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_11 : (⟨1, 2, [], [], [3, 4, 5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_12 : (⟨1, 4, [], [], [3], 2, 5⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_13 : (⟨1, 4, [], [], [5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_14 : (⟨1, 5, [], [], [4, 3], 1, 4⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_15 : (⟨2, 3, [], [1], [4, 5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_16 : (⟨2, 4, [], [1], [3], 1, 4⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_17 : (⟨2, 5, [], [1], [4, 3], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_templates_item_18 : (⟨2, 6, [], [1], [5, 4, 3], 1, 2⟩ : TemplateData (Fin 7)).Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p5_part_3 : ∀ T ∈ k7t4p5.templates, T.Check k7t4p5.graph k7t4p5.clique 7 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k7t4p5, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t4p5_templates_item_0, k7t4p5_templates_item_1, k7t4p5_templates_item_2, k7t4p5_templates_item_3, k7t4p5_templates_item_4, k7t4p5_templates_item_5, k7t4p5_templates_item_6, k7t4p5_templates_item_7, k7t4p5_templates_item_8, k7t4p5_templates_item_9, k7t4p5_templates_item_10, k7t4p5_templates_item_11, k7t4p5_templates_item_12, k7t4p5_templates_item_13, k7t4p5_templates_item_14, k7t4p5_templates_item_15, k7t4p5_templates_item_16, k7t4p5_templates_item_17, k7t4p5_templates_item_18⟩ + +private theorem k7t4p5_part_4 : ∀ p ∈ k7t4p5.required, p.Check k7t4p5.graph 7 := by decide + +private theorem k7t4p5_part_5 : ClosureCheck k7t4p5.graph (k7t4p5.initialMatrix 7) 7 4 k7t4p5.closure := by + rw [k7t4p5_initial_eq] + exact k7t4p5_closure_0 + +private theorem k7t4p5_part_6 : k7t4p5.bad.Check k7t4p5.graph (k7t4p5.matrix 7) 7 4 := by + rw [k7t4p5_matrix_eq] + decide + +theorem k7t4p5_check : k7t4p5.Check 7 4 [[], [1, 2]] := + ⟨k7t4p5_part_0, k7t4p5_part_1, k7t4p5_part_2, k7t4p5_part_3, k7t4p5_part_4, k7t4p5_part_5, k7t4p5_part_6⟩ +def k7t4p6 : LayoutCertificate 6 where + chains := [[0, 1, 2], [3, 4, 5]] + clique := {0, 2, 3, 5} + templates := [⟨0, 1, [], [], [2], 1, 5⟩, + ⟨0, 3, [], [], [], 2, 6⟩, + ⟨0, 3, [], [2, 1], [4, 5], 1, 2⟩, + ⟨0, 4, [], [], [3], 1, 5⟩, + ⟨0, 5, [], [], [], 2, 6⟩, + ⟨0, 5, [], [2, 1], [4, 3], 1, 2⟩, + ⟨1, 2, [], [0], [], 1, 5⟩, + ⟨1, 3, [], [0], [], 1, 5⟩, + ⟨1, 4, [], [0], [3], 1, 4⟩, + ⟨1, 5, [], [0], [], 1, 5⟩, + ⟨2, 3, [], [], [], 2, 6⟩, + ⟨2, 3, [], [0, 1], [4, 5], 1, 2⟩, + ⟨3, 4, [], [], [5], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (3, 3), (1, 2)}⟩ + + +private def k7t4p6_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5], + #[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 5, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p6_initial_eq_row_0 : ∀ j : Fin 6, (k7t4p6.initialMatrix 7) 0 j = k7t4p6_state_0 0 j := by decide + +private theorem k7t4p6_initial_eq_row_1 : ∀ j : Fin 6, (k7t4p6.initialMatrix 7) 1 j = k7t4p6_state_0 1 j := by decide + +private theorem k7t4p6_initial_eq_row_2 : ∀ j : Fin 6, (k7t4p6.initialMatrix 7) 2 j = k7t4p6_state_0 2 j := by decide + +private theorem k7t4p6_initial_eq_row_3 : ∀ j : Fin 6, (k7t4p6.initialMatrix 7) 3 j = k7t4p6_state_0 3 j := by decide + +private theorem k7t4p6_initial_eq_row_4 : ∀ j : Fin 6, (k7t4p6.initialMatrix 7) 4 j = k7t4p6_state_0 4 j := by decide + +private theorem k7t4p6_initial_eq_row_5 : ∀ j : Fin 6, (k7t4p6.initialMatrix 7) 5 j = k7t4p6_state_0 5 j := by decide + +private theorem k7t4p6_initial_eq : (k7t4p6.initialMatrix 7) = k7t4p6_state_0 := by + funext i j + fin_cases i + + · exact k7t4p6_initial_eq_row_0 j + + · exact k7t4p6_initial_eq_row_1 j + + · exact k7t4p6_initial_eq_row_2 j + + · exact k7t4p6_initial_eq_row_3 j + + · exact k7t4p6_initial_eq_row_4 j + + · exact k7t4p6_initial_eq_row_5 j + +private theorem k7t4p6_closure_0 : ClosureCheck k7t4p6.graph k7t4p6_state_0 7 4 [] := by trivial + +private theorem k7t4p6_matrix_eq : k7t4p6.matrix 7 = k7t4p6_state_0 := by + change closureMatrix (k7t4p6.initialMatrix 7) _ = _ + rw [k7t4p6_initial_eq] + change closureMatrix k7t4p6_state_0 [] = _ + rfl + +private theorem k7t4p6_part_0 : k7t4p6.chains.flatten = List.finRange _ := by decide + +private theorem k7t4p6_part_1 : k7t4p6.chains.map List.length = ([[1], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t4p6_part_2 : k7t4p6.chains.map (fun l => l.map (fun i => decide (i ∈ k7t4p6.clique))) = ([[1], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t4p6_templates_item_0 : (⟨0, 1, [], [], [2], 1, 5⟩ : TemplateData (Fin 6)).Check k7t4p6.graph k7t4p6.clique 7 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p6_templates_item_1 : (⟨0, 3, [], [], [], 2, 6⟩ : TemplateData (Fin 6)).Check k7t4p6.graph k7t4p6.clique 7 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p6_templates_item_2 : (⟨0, 3, [], [2, 1], [4, 5], 1, 2⟩ : TemplateData (Fin 6)).Check k7t4p6.graph k7t4p6.clique 7 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p6_templates_item_3 : (⟨0, 4, [], [], [3], 1, 5⟩ : TemplateData (Fin 6)).Check k7t4p6.graph k7t4p6.clique 7 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p6_templates_item_4 : (⟨0, 5, [], [], [], 2, 6⟩ : TemplateData (Fin 6)).Check k7t4p6.graph k7t4p6.clique 7 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p6_templates_item_5 : (⟨0, 5, [], [2, 1], [4, 3], 1, 2⟩ : TemplateData (Fin 6)).Check k7t4p6.graph k7t4p6.clique 7 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p6_templates_item_6 : (⟨1, 2, [], [0], [], 1, 5⟩ : TemplateData (Fin 6)).Check k7t4p6.graph k7t4p6.clique 7 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p6_templates_item_7 : (⟨1, 3, [], [0], [], 1, 5⟩ : TemplateData (Fin 6)).Check k7t4p6.graph k7t4p6.clique 7 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p6_templates_item_8 : (⟨1, 4, [], [0], [3], 1, 4⟩ : TemplateData (Fin 6)).Check k7t4p6.graph k7t4p6.clique 7 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p6_templates_item_9 : (⟨1, 5, [], [0], [], 1, 5⟩ : TemplateData (Fin 6)).Check k7t4p6.graph k7t4p6.clique 7 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p6_templates_item_10 : (⟨2, 3, [], [], [], 2, 6⟩ : TemplateData (Fin 6)).Check k7t4p6.graph k7t4p6.clique 7 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p6_templates_item_11 : (⟨2, 3, [], [0, 1], [4, 5], 1, 2⟩ : TemplateData (Fin 6)).Check k7t4p6.graph k7t4p6.clique 7 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p6_templates_item_12 : (⟨3, 4, [], [], [5], 1, 5⟩ : TemplateData (Fin 6)).Check k7t4p6.graph k7t4p6.clique 7 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p6_part_3 : ∀ T ∈ k7t4p6.templates, T.Check k7t4p6.graph k7t4p6.clique 7 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k7t4p6, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t4p6_templates_item_0, k7t4p6_templates_item_1, k7t4p6_templates_item_2, k7t4p6_templates_item_3, k7t4p6_templates_item_4, k7t4p6_templates_item_5, k7t4p6_templates_item_6, k7t4p6_templates_item_7, k7t4p6_templates_item_8, k7t4p6_templates_item_9, k7t4p6_templates_item_10, k7t4p6_templates_item_11, k7t4p6_templates_item_12⟩ + +private theorem k7t4p6_part_4 : ∀ p ∈ k7t4p6.required, p.Check k7t4p6.graph 7 := by decide + +private theorem k7t4p6_part_5 : ClosureCheck k7t4p6.graph (k7t4p6.initialMatrix 7) 7 4 k7t4p6.closure := by + rw [k7t4p6_initial_eq] + exact k7t4p6_closure_0 + +private theorem k7t4p6_part_6 : k7t4p6.bad.Check k7t4p6.graph (k7t4p6.matrix 7) 7 4 := by + rw [k7t4p6_matrix_eq] + decide + +theorem k7t4p6_check : k7t4p6.Check 7 4 [[1], [1]] := + ⟨k7t4p6_part_0, k7t4p6_part_1, k7t4p6_part_2, k7t4p6_part_3, k7t4p6_part_4, k7t4p6_part_5, k7t4p6_part_6⟩ +def k7t4p7 : LayoutCertificate 7 where + chains := [[0, 1, 2], [3, 4, 5, 6]] + clique := {0, 2, 3, 6} + templates := [⟨0, 1, [], [], [2], 2, 5⟩, + ⟨0, 1, [[3, 4, 5, 6]], [], [2], 1, 1⟩, + ⟨0, 3, [], [], [], 3, 6⟩, + ⟨0, 3, [], [], [4, 5, 6], 2, 3⟩, + ⟨0, 3, [], [2, 1], [4, 5, 6], 1, 1⟩, + ⟨0, 4, [], [], [3], 2, 5⟩, + ⟨0, 4, [], [], [5, 6], 1, 4⟩, + ⟨0, 5, [], [], [4, 3], 1, 4⟩, + ⟨0, 6, [], [], [5, 4, 3], 2, 3⟩, + ⟨0, 6, [], [2, 1], [5, 4, 3], 1, 1⟩, + ⟨1, 2, [[3, 4, 5, 6]], [0], [], 1, 1⟩, + ⟨1, 3, [], [0], [], 2, 5⟩, + ⟨1, 3, [], [0], [4, 5, 6], 1, 2⟩, + ⟨1, 4, [], [0], [3], 1, 4⟩, + ⟨1, 5, [], [0], [4, 3], 1, 3⟩, + ⟨1, 6, [], [0], [5, 4, 3], 1, 2⟩, + ⟨2, 3, [], [], [4, 5, 6], 2, 3⟩, + ⟨2, 3, [], [0, 1], [4, 5, 6], 1, 1⟩, + ⟨3, 4, [], [], [5, 6], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 2), (3, 3)}⟩ + + +private def k7t4p7_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[Finset.Icc 1 5, ∅, {1}, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}, {1, 2}], + #[∅, {1}, ∅, {1, 2, 3}, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, {1, 2, 3}, ∅, Finset.Icc 1 4, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅, ∅, ∅], + #[Finset.Icc 1 4, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 3}, {1, 2}, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p7_initial_eq_row_0 : ∀ j : Fin 7, (k7t4p7.initialMatrix 7) 0 j = k7t4p7_state_0 0 j := by decide + +private theorem k7t4p7_initial_eq_row_1 : ∀ j : Fin 7, (k7t4p7.initialMatrix 7) 1 j = k7t4p7_state_0 1 j := by decide + +private theorem k7t4p7_initial_eq_row_2 : ∀ j : Fin 7, (k7t4p7.initialMatrix 7) 2 j = k7t4p7_state_0 2 j := by decide + +private theorem k7t4p7_initial_eq_row_3 : ∀ j : Fin 7, (k7t4p7.initialMatrix 7) 3 j = k7t4p7_state_0 3 j := by decide + +private theorem k7t4p7_initial_eq_row_4 : ∀ j : Fin 7, (k7t4p7.initialMatrix 7) 4 j = k7t4p7_state_0 4 j := by decide + +private theorem k7t4p7_initial_eq_row_5 : ∀ j : Fin 7, (k7t4p7.initialMatrix 7) 5 j = k7t4p7_state_0 5 j := by decide + +private theorem k7t4p7_initial_eq_row_6 : ∀ j : Fin 7, (k7t4p7.initialMatrix 7) 6 j = k7t4p7_state_0 6 j := by decide + +private theorem k7t4p7_initial_eq : (k7t4p7.initialMatrix 7) = k7t4p7_state_0 := by + funext i j + fin_cases i + + · exact k7t4p7_initial_eq_row_0 j + + · exact k7t4p7_initial_eq_row_1 j + + · exact k7t4p7_initial_eq_row_2 j + + · exact k7t4p7_initial_eq_row_3 j + + · exact k7t4p7_initial_eq_row_4 j + + · exact k7t4p7_initial_eq_row_5 j + + · exact k7t4p7_initial_eq_row_6 j + +private theorem k7t4p7_closure_0 : ClosureCheck k7t4p7.graph k7t4p7_state_0 7 4 [] := by trivial + +private theorem k7t4p7_matrix_eq : k7t4p7.matrix 7 = k7t4p7_state_0 := by + change closureMatrix (k7t4p7.initialMatrix 7) _ = _ + rw [k7t4p7_initial_eq] + change closureMatrix k7t4p7_state_0 [] = _ + rfl + +private theorem k7t4p7_part_0 : k7t4p7.chains.flatten = List.finRange _ := by decide + +private theorem k7t4p7_part_1 : k7t4p7.chains.map List.length = ([[1], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t4p7_part_2 : k7t4p7.chains.map (fun l => l.map (fun i => decide (i ∈ k7t4p7.clique))) = ([[1], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t4p7_templates_item_0 : (⟨0, 1, [], [], [2], 2, 5⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6]], [], [2], 1, 1⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_2 : (⟨0, 3, [], [], [], 3, 6⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_3 : (⟨0, 3, [], [], [4, 5, 6], 2, 3⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_4 : (⟨0, 3, [], [2, 1], [4, 5, 6], 1, 1⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_5 : (⟨0, 4, [], [], [3], 2, 5⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_6 : (⟨0, 4, [], [], [5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_7 : (⟨0, 5, [], [], [4, 3], 1, 4⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_8 : (⟨0, 6, [], [], [5, 4, 3], 2, 3⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_9 : (⟨0, 6, [], [2, 1], [5, 4, 3], 1, 1⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_10 : (⟨1, 2, [[3, 4, 5, 6]], [0], [], 1, 1⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_11 : (⟨1, 3, [], [0], [], 2, 5⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_12 : (⟨1, 3, [], [0], [4, 5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_13 : (⟨1, 4, [], [0], [3], 1, 4⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_14 : (⟨1, 5, [], [0], [4, 3], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_15 : (⟨1, 6, [], [0], [5, 4, 3], 1, 2⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_16 : (⟨2, 3, [], [], [4, 5, 6], 2, 3⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_17 : (⟨2, 3, [], [0, 1], [4, 5, 6], 1, 1⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_templates_item_18 : (⟨3, 4, [], [], [5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p7_part_3 : ∀ T ∈ k7t4p7.templates, T.Check k7t4p7.graph k7t4p7.clique 7 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k7t4p7, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t4p7_templates_item_0, k7t4p7_templates_item_1, k7t4p7_templates_item_2, k7t4p7_templates_item_3, k7t4p7_templates_item_4, k7t4p7_templates_item_5, k7t4p7_templates_item_6, k7t4p7_templates_item_7, k7t4p7_templates_item_8, k7t4p7_templates_item_9, k7t4p7_templates_item_10, k7t4p7_templates_item_11, k7t4p7_templates_item_12, k7t4p7_templates_item_13, k7t4p7_templates_item_14, k7t4p7_templates_item_15, k7t4p7_templates_item_16, k7t4p7_templates_item_17, k7t4p7_templates_item_18⟩ + +private theorem k7t4p7_part_4 : ∀ p ∈ k7t4p7.required, p.Check k7t4p7.graph 7 := by decide + +private theorem k7t4p7_part_5 : ClosureCheck k7t4p7.graph (k7t4p7.initialMatrix 7) 7 4 k7t4p7.closure := by + rw [k7t4p7_initial_eq] + exact k7t4p7_closure_0 + +private theorem k7t4p7_part_6 : k7t4p7.bad.Check k7t4p7.graph (k7t4p7.matrix 7) 7 4 := by + rw [k7t4p7_matrix_eq] + decide + +theorem k7t4p7_check : k7t4p7.Check 7 4 [[1], [2]] := + ⟨k7t4p7_part_0, k7t4p7_part_1, k7t4p7_part_2, k7t4p7_part_3, k7t4p7_part_4, k7t4p7_part_5, k7t4p7_part_6⟩ +def k7t4p8 : LayoutCertificate 7 where + chains := [[0, 1, 2, 3, 4, 5, 6]] + clique := {0, 2, 4, 6} + templates := [⟨0, 1, [], [], [2], 2, 5⟩, + ⟨0, 1, [], [], [2, 3, 4], 1, 3⟩, + ⟨0, 3, [], [], [2], 2, 5⟩, + ⟨0, 3, [], [2, 1], [4], 1, 3⟩, + ⟨0, 5, [], [], [4], 2, 5⟩, + ⟨0, 5, [], [2, 1], [4], 1, 3⟩, + ⟨1, 2, [], [0], [3, 4], 1, 3⟩, + ⟨1, 3, [], [0], [2], 1, 4⟩, + ⟨1, 4, [], [0], [3, 2], 1, 3⟩, + ⟨1, 5, [], [0], [4], 1, 4⟩, + ⟨1, 6, [[2, 3, 4]], [0], [], 1, 2⟩, + ⟨2, 3, [], [0, 1], [4], 1, 3⟩, + ⟨2, 5, [], [0, 1], [4], 1, 3⟩, + ⟨3, 4, [], [0, 1, 2], [], 1, 3⟩, + ⟨3, 5, [], [2], [4], 1, 4⟩, + ⟨3, 6, [], [0, 1, 2], [], 1, 3⟩, + ⟨4, 5, [[0, 1, 2]], [], [6], 1, 2⟩, + ⟨5, 6, [[0, 1, 2]], [4], [], 1, 2⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 2), (3, 2), (5, 2), (0, 3)}⟩ + + +private def k7t4p8_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 5, ∅, {1, 2, 3}, Finset.Icc 1 4, {1, 2, 3}, Finset.Icc 1 4, {1, 2}], + #[∅, {1, 2, 3}, ∅, {1, 2, 3}, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1, 2, 3}], + #[∅, {1, 2, 3}, ∅, {1, 2, 3}, ∅, {1, 2}, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}, Finset.Icc 1 4, {1, 2}, ∅, {1, 2}], + #[∅, {1, 2}, ∅, {1, 2, 3}, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t4p8_initial_eq_row_0 : ∀ j : Fin 7, (k7t4p8.initialMatrix 7) 0 j = k7t4p8_state_0 0 j := by decide + +private theorem k7t4p8_initial_eq_row_1 : ∀ j : Fin 7, (k7t4p8.initialMatrix 7) 1 j = k7t4p8_state_0 1 j := by decide + +private theorem k7t4p8_initial_eq_row_2 : ∀ j : Fin 7, (k7t4p8.initialMatrix 7) 2 j = k7t4p8_state_0 2 j := by decide + +private theorem k7t4p8_initial_eq_row_3 : ∀ j : Fin 7, (k7t4p8.initialMatrix 7) 3 j = k7t4p8_state_0 3 j := by decide + +private theorem k7t4p8_initial_eq_row_4 : ∀ j : Fin 7, (k7t4p8.initialMatrix 7) 4 j = k7t4p8_state_0 4 j := by decide + +private theorem k7t4p8_initial_eq_row_5 : ∀ j : Fin 7, (k7t4p8.initialMatrix 7) 5 j = k7t4p8_state_0 5 j := by decide + +private theorem k7t4p8_initial_eq_row_6 : ∀ j : Fin 7, (k7t4p8.initialMatrix 7) 6 j = k7t4p8_state_0 6 j := by decide + +private theorem k7t4p8_initial_eq : (k7t4p8.initialMatrix 7) = k7t4p8_state_0 := by + funext i j + fin_cases i + + · exact k7t4p8_initial_eq_row_0 j + + · exact k7t4p8_initial_eq_row_1 j + + · exact k7t4p8_initial_eq_row_2 j + + · exact k7t4p8_initial_eq_row_3 j + + · exact k7t4p8_initial_eq_row_4 j + + · exact k7t4p8_initial_eq_row_5 j + + · exact k7t4p8_initial_eq_row_6 j + +private theorem k7t4p8_closure_0 : ClosureCheck k7t4p8.graph k7t4p8_state_0 7 4 [] := by trivial + +private theorem k7t4p8_matrix_eq : k7t4p8.matrix 7 = k7t4p8_state_0 := by + change closureMatrix (k7t4p8.initialMatrix 7) _ = _ + rw [k7t4p8_initial_eq] + change closureMatrix k7t4p8_state_0 [] = _ + rfl + +private theorem k7t4p8_part_0 : k7t4p8.chains.flatten = List.finRange _ := by decide + +private theorem k7t4p8_part_1 : k7t4p8.chains.map List.length = ([[1, 1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t4p8_part_2 : k7t4p8.chains.map (fun l => l.map (fun i => decide (i ∈ k7t4p8.clique))) = ([[1, 1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t4p8_templates_item_0 : (⟨0, 1, [], [], [2], 2, 5⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_2 : (⟨0, 3, [], [], [2], 2, 5⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_3 : (⟨0, 3, [], [2, 1], [4], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_4 : (⟨0, 5, [], [], [4], 2, 5⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_5 : (⟨0, 5, [], [2, 1], [4], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_6 : (⟨1, 2, [], [0], [3, 4], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_7 : (⟨1, 3, [], [0], [2], 1, 4⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_8 : (⟨1, 4, [], [0], [3, 2], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_9 : (⟨1, 5, [], [0], [4], 1, 4⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_10 : (⟨1, 6, [[2, 3, 4]], [0], [], 1, 2⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_11 : (⟨2, 3, [], [0, 1], [4], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_12 : (⟨2, 5, [], [0, 1], [4], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_13 : (⟨3, 4, [], [0, 1, 2], [], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_14 : (⟨3, 5, [], [2], [4], 1, 4⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_15 : (⟨3, 6, [], [0, 1, 2], [], 1, 3⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_16 : (⟨4, 5, [[0, 1, 2]], [], [6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_templates_item_17 : (⟨5, 6, [[0, 1, 2]], [4], [], 1, 2⟩ : TemplateData (Fin 7)).Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t4p8_part_3 : ∀ T ∈ k7t4p8.templates, T.Check k7t4p8.graph k7t4p8.clique 7 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k7t4p8, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t4p8_templates_item_0, k7t4p8_templates_item_1, k7t4p8_templates_item_2, k7t4p8_templates_item_3, k7t4p8_templates_item_4, k7t4p8_templates_item_5, k7t4p8_templates_item_6, k7t4p8_templates_item_7, k7t4p8_templates_item_8, k7t4p8_templates_item_9, k7t4p8_templates_item_10, k7t4p8_templates_item_11, k7t4p8_templates_item_12, k7t4p8_templates_item_13, k7t4p8_templates_item_14, k7t4p8_templates_item_15, k7t4p8_templates_item_16, k7t4p8_templates_item_17⟩ + +private theorem k7t4p8_part_4 : ∀ p ∈ k7t4p8.required, p.Check k7t4p8.graph 7 := by decide + +private theorem k7t4p8_part_5 : ClosureCheck k7t4p8.graph (k7t4p8.initialMatrix 7) 7 4 k7t4p8.closure := by + rw [k7t4p8_initial_eq] + exact k7t4p8_closure_0 + +private theorem k7t4p8_part_6 : k7t4p8.bad.Check k7t4p8.graph (k7t4p8.matrix 7) 7 4 := by + rw [k7t4p8_matrix_eq] + decide + +theorem k7t4p8_check : k7t4p8.Check 7 4 [[1, 1, 1]] := + ⟨k7t4p8_part_0, k7t4p8_part_1, k7t4p8_part_2, k7t4p8_part_3, k7t4p8_part_4, k7t4p8_part_5, k7t4p8_part_6⟩ +def k7t5p0 : LayoutCertificate 5 where + chains := [[0], [1], [2], [3], [4]] + clique := {0, 1, 2, 3, 4} + templates := [⟨0, 1, [], [], [], 1, 6⟩, + ⟨0, 2, [], [], [], 1, 6⟩, + ⟨0, 3, [], [], [], 1, 6⟩, + ⟨0, 4, [], [], [], 1, 6⟩, + ⟨1, 2, [], [], [], 1, 6⟩, + ⟨1, 3, [], [], [], 1, 6⟩, + ⟨1, 4, [], [], [], 1, 6⟩, + ⟨2, 3, [], [], [], 1, 6⟩, + ⟨2, 4, [], [], [], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k7t5p0_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t5p0_initial_eq_row_0 : ∀ j : Fin 5, (k7t5p0.initialMatrix 7) 0 j = k7t5p0_state_0 0 j := by decide + +private theorem k7t5p0_initial_eq_row_1 : ∀ j : Fin 5, (k7t5p0.initialMatrix 7) 1 j = k7t5p0_state_0 1 j := by decide + +private theorem k7t5p0_initial_eq_row_2 : ∀ j : Fin 5, (k7t5p0.initialMatrix 7) 2 j = k7t5p0_state_0 2 j := by decide + +private theorem k7t5p0_initial_eq_row_3 : ∀ j : Fin 5, (k7t5p0.initialMatrix 7) 3 j = k7t5p0_state_0 3 j := by decide + +private theorem k7t5p0_initial_eq_row_4 : ∀ j : Fin 5, (k7t5p0.initialMatrix 7) 4 j = k7t5p0_state_0 4 j := by decide + +private theorem k7t5p0_initial_eq : (k7t5p0.initialMatrix 7) = k7t5p0_state_0 := by + funext i j + fin_cases i + + · exact k7t5p0_initial_eq_row_0 j + + · exact k7t5p0_initial_eq_row_1 j + + · exact k7t5p0_initial_eq_row_2 j + + · exact k7t5p0_initial_eq_row_3 j + + · exact k7t5p0_initial_eq_row_4 j + +private theorem k7t5p0_closure_0 : ClosureCheck k7t5p0.graph k7t5p0_state_0 7 5 [] := by trivial + +private theorem k7t5p0_matrix_eq : k7t5p0.matrix 7 = k7t5p0_state_0 := by + change closureMatrix (k7t5p0.initialMatrix 7) _ = _ + rw [k7t5p0_initial_eq] + change closureMatrix k7t5p0_state_0 [] = _ + rfl + +private theorem k7t5p0_part_0 : k7t5p0.chains.flatten = List.finRange _ := by decide + +private theorem k7t5p0_part_1 : k7t5p0.chains.map List.length = ([[], [], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t5p0_part_2 : k7t5p0.chains.map (fun l => l.map (fun i => decide (i ∈ k7t5p0.clique))) = ([[], [], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k7t5p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 6⟩ : TemplateData (Fin 5)).Check k7t5p0.graph k7t5p0.clique 7 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 6⟩ : TemplateData (Fin 5)).Check k7t5p0.graph k7t5p0.clique 7 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 6⟩ : TemplateData (Fin 5)).Check k7t5p0.graph k7t5p0.clique 7 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p0_templates_item_3 : (⟨0, 4, [], [], [], 1, 6⟩ : TemplateData (Fin 5)).Check k7t5p0.graph k7t5p0.clique 7 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p0_templates_item_4 : (⟨1, 2, [], [], [], 1, 6⟩ : TemplateData (Fin 5)).Check k7t5p0.graph k7t5p0.clique 7 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p0_templates_item_5 : (⟨1, 3, [], [], [], 1, 6⟩ : TemplateData (Fin 5)).Check k7t5p0.graph k7t5p0.clique 7 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p0_templates_item_6 : (⟨1, 4, [], [], [], 1, 6⟩ : TemplateData (Fin 5)).Check k7t5p0.graph k7t5p0.clique 7 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p0_templates_item_7 : (⟨2, 3, [], [], [], 1, 6⟩ : TemplateData (Fin 5)).Check k7t5p0.graph k7t5p0.clique 7 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p0_templates_item_8 : (⟨2, 4, [], [], [], 1, 6⟩ : TemplateData (Fin 5)).Check k7t5p0.graph k7t5p0.clique 7 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p0_part_3 : ∀ T ∈ k7t5p0.templates, T.Check k7t5p0.graph k7t5p0.clique 7 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k7t5p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t5p0_templates_item_0, k7t5p0_templates_item_1, k7t5p0_templates_item_2, k7t5p0_templates_item_3, k7t5p0_templates_item_4, k7t5p0_templates_item_5, k7t5p0_templates_item_6, k7t5p0_templates_item_7, k7t5p0_templates_item_8⟩ + +private theorem k7t5p0_part_4 : ∀ p ∈ k7t5p0.required, p.Check k7t5p0.graph 7 := by decide + +private theorem k7t5p0_part_5 : ClosureCheck k7t5p0.graph (k7t5p0.initialMatrix 7) 7 5 k7t5p0.closure := by + rw [k7t5p0_initial_eq] + exact k7t5p0_closure_0 + +private theorem k7t5p0_part_6 : k7t5p0.bad.Check k7t5p0.graph (k7t5p0.matrix 7) 7 5 := by + rw [k7t5p0_matrix_eq] + decide + +theorem k7t5p0_check : k7t5p0.Check 7 5 [[], [], [], [], []] := + ⟨k7t5p0_part_0, k7t5p0_part_1, k7t5p0_part_2, k7t5p0_part_3, k7t5p0_part_4, k7t5p0_part_5, k7t5p0_part_6⟩ +def k7t5p1 : LayoutCertificate 6 where + chains := [[0], [1], [2], [3, 4, 5]] + clique := {0, 1, 2, 3, 5} + templates := [⟨0, 1, [], [], [], 2, 6⟩, + ⟨0, 1, [[3, 4, 5]], [], [], 1, 3⟩, + ⟨0, 2, [], [], [], 2, 6⟩, + ⟨0, 2, [[3, 4, 5]], [], [], 1, 3⟩, + ⟨0, 3, [], [], [], 2, 6⟩, + ⟨0, 3, [], [], [4, 5], 1, 4⟩, + ⟨0, 4, [], [], [3], 1, 5⟩, + ⟨0, 5, [], [], [], 2, 6⟩, + ⟨0, 5, [], [], [4, 3], 1, 4⟩, + ⟨1, 2, [], [], [], 2, 6⟩, + ⟨1, 2, [[3, 4, 5]], [], [], 1, 3⟩, + ⟨1, 3, [], [], [], 2, 6⟩, + ⟨1, 3, [], [], [4, 5], 1, 4⟩, + ⟨1, 4, [], [], [3], 1, 5⟩, + ⟨1, 5, [], [], [], 2, 6⟩, + ⟨1, 5, [], [], [4, 3], 1, 4⟩, + ⟨2, 3, [], [], [], 2, 6⟩, + ⟨2, 3, [], [], [4, 5], 1, 4⟩, + ⟨2, 4, [], [], [3], 1, 5⟩, + ⟨2, 5, [], [], [], 2, 6⟩, + ⟨2, 5, [], [], [4, 3], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k7t5p1_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t5p1_initial_eq_row_0 : ∀ j : Fin 6, (k7t5p1.initialMatrix 7) 0 j = k7t5p1_state_0 0 j := by decide + +private theorem k7t5p1_initial_eq_row_1 : ∀ j : Fin 6, (k7t5p1.initialMatrix 7) 1 j = k7t5p1_state_0 1 j := by decide + +private theorem k7t5p1_initial_eq_row_2 : ∀ j : Fin 6, (k7t5p1.initialMatrix 7) 2 j = k7t5p1_state_0 2 j := by decide + +private theorem k7t5p1_initial_eq_row_3 : ∀ j : Fin 6, (k7t5p1.initialMatrix 7) 3 j = k7t5p1_state_0 3 j := by decide + +private theorem k7t5p1_initial_eq_row_4 : ∀ j : Fin 6, (k7t5p1.initialMatrix 7) 4 j = k7t5p1_state_0 4 j := by decide + +private theorem k7t5p1_initial_eq_row_5 : ∀ j : Fin 6, (k7t5p1.initialMatrix 7) 5 j = k7t5p1_state_0 5 j := by decide + +private theorem k7t5p1_initial_eq : (k7t5p1.initialMatrix 7) = k7t5p1_state_0 := by + funext i j + fin_cases i + + · exact k7t5p1_initial_eq_row_0 j + + · exact k7t5p1_initial_eq_row_1 j + + · exact k7t5p1_initial_eq_row_2 j + + · exact k7t5p1_initial_eq_row_3 j + + · exact k7t5p1_initial_eq_row_4 j + + · exact k7t5p1_initial_eq_row_5 j + +private theorem k7t5p1_closure_0 : ClosureCheck k7t5p1.graph k7t5p1_state_0 7 5 [] := by trivial + +private theorem k7t5p1_matrix_eq : k7t5p1.matrix 7 = k7t5p1_state_0 := by + change closureMatrix (k7t5p1.initialMatrix 7) _ = _ + rw [k7t5p1_initial_eq] + change closureMatrix k7t5p1_state_0 [] = _ + rfl + +private theorem k7t5p1_part_0 : k7t5p1.chains.flatten = List.finRange _ := by decide + +private theorem k7t5p1_part_1 : k7t5p1.chains.map List.length = ([[], [], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t5p1_part_2 : k7t5p1.chains.map (fun l => l.map (fun i => decide (i ∈ k7t5p1.clique))) = ([[], [], [], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t5p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 6⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_1 : (⟨0, 1, [[3, 4, 5]], [], [], 1, 3⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_2 : (⟨0, 2, [], [], [], 2, 6⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_3 : (⟨0, 2, [[3, 4, 5]], [], [], 1, 3⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_4 : (⟨0, 3, [], [], [], 2, 6⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_5 : (⟨0, 3, [], [], [4, 5], 1, 4⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_6 : (⟨0, 4, [], [], [3], 1, 5⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_7 : (⟨0, 5, [], [], [], 2, 6⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_8 : (⟨0, 5, [], [], [4, 3], 1, 4⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_9 : (⟨1, 2, [], [], [], 2, 6⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_10 : (⟨1, 2, [[3, 4, 5]], [], [], 1, 3⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_11 : (⟨1, 3, [], [], [], 2, 6⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_12 : (⟨1, 3, [], [], [4, 5], 1, 4⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_13 : (⟨1, 4, [], [], [3], 1, 5⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_14 : (⟨1, 5, [], [], [], 2, 6⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_15 : (⟨1, 5, [], [], [4, 3], 1, 4⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_16 : (⟨2, 3, [], [], [], 2, 6⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_17 : (⟨2, 3, [], [], [4, 5], 1, 4⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_18 : (⟨2, 4, [], [], [3], 1, 5⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_19 : (⟨2, 5, [], [], [], 2, 6⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_templates_item_20 : (⟨2, 5, [], [], [4, 3], 1, 4⟩ : TemplateData (Fin 6)).Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p1_part_3 : ∀ T ∈ k7t5p1.templates, T.Check k7t5p1.graph k7t5p1.clique 7 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k7t5p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t5p1_templates_item_0, k7t5p1_templates_item_1, k7t5p1_templates_item_2, k7t5p1_templates_item_3, k7t5p1_templates_item_4, k7t5p1_templates_item_5, k7t5p1_templates_item_6, k7t5p1_templates_item_7, k7t5p1_templates_item_8, k7t5p1_templates_item_9, k7t5p1_templates_item_10, k7t5p1_templates_item_11, k7t5p1_templates_item_12, k7t5p1_templates_item_13, k7t5p1_templates_item_14, k7t5p1_templates_item_15, k7t5p1_templates_item_16, k7t5p1_templates_item_17, k7t5p1_templates_item_18, k7t5p1_templates_item_19, k7t5p1_templates_item_20⟩ + +private theorem k7t5p1_part_4 : ∀ p ∈ k7t5p1.required, p.Check k7t5p1.graph 7 := by decide + +private theorem k7t5p1_part_5 : ClosureCheck k7t5p1.graph (k7t5p1.initialMatrix 7) 7 5 k7t5p1.closure := by + rw [k7t5p1_initial_eq] + exact k7t5p1_closure_0 + +private theorem k7t5p1_part_6 : k7t5p1.bad.Check k7t5p1.graph (k7t5p1.matrix 7) 7 5 := by + rw [k7t5p1_matrix_eq] + decide + +theorem k7t5p1_check : k7t5p1.Check 7 5 [[], [], [], [1]] := + ⟨k7t5p1_part_0, k7t5p1_part_1, k7t5p1_part_2, k7t5p1_part_3, k7t5p1_part_4, k7t5p1_part_5, k7t5p1_part_6⟩ +def k7t5p2 : LayoutCertificate 7 where + chains := [[0], [1], [2], [3, 4, 5, 6]] + clique := {0, 1, 2, 3, 6} + templates := [⟨0, 1, [], [], [], 3, 6⟩, + ⟨0, 1, [[3, 4, 5, 6]], [], [], 1, 2⟩, + ⟨0, 2, [], [], [], 3, 6⟩, + ⟨0, 2, [[3, 4, 5, 6]], [], [], 1, 2⟩, + ⟨0, 3, [], [], [4, 5, 6], 1, 3⟩, + ⟨0, 4, [], [], [3], 2, 5⟩, + ⟨0, 4, [], [], [5, 6], 1, 4⟩, + ⟨0, 5, [], [], [4, 3], 1, 4⟩, + ⟨0, 6, [], [], [5, 4, 3], 1, 3⟩, + ⟨1, 2, [], [], [], 3, 6⟩, + ⟨1, 2, [[3, 4, 5, 6]], [], [], 1, 2⟩, + ⟨1, 3, [], [], [4, 5, 6], 1, 3⟩, + ⟨1, 4, [], [], [3], 2, 5⟩, + ⟨1, 4, [], [], [5, 6], 1, 4⟩, + ⟨1, 5, [], [], [4, 3], 1, 4⟩, + ⟨1, 6, [], [], [5, 4, 3], 1, 3⟩, + ⟨2, 3, [], [], [4, 5, 6], 1, 3⟩, + ⟨2, 4, [], [], [3], 2, 5⟩, + ⟨2, 4, [], [], [5, 6], 1, 4⟩, + ⟨2, 5, [], [], [4, 3], 1, 4⟩, + ⟨2, 6, [], [], [5, 4, 3], 1, 3⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k7t5p2_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, {1, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, {1, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t5p2_initial_eq_row_0 : ∀ j : Fin 7, (k7t5p2.initialMatrix 7) 0 j = k7t5p2_state_0 0 j := by decide + +private theorem k7t5p2_initial_eq_row_1 : ∀ j : Fin 7, (k7t5p2.initialMatrix 7) 1 j = k7t5p2_state_0 1 j := by decide + +private theorem k7t5p2_initial_eq_row_2 : ∀ j : Fin 7, (k7t5p2.initialMatrix 7) 2 j = k7t5p2_state_0 2 j := by decide + +private theorem k7t5p2_initial_eq_row_3 : ∀ j : Fin 7, (k7t5p2.initialMatrix 7) 3 j = k7t5p2_state_0 3 j := by decide + +private theorem k7t5p2_initial_eq_row_4 : ∀ j : Fin 7, (k7t5p2.initialMatrix 7) 4 j = k7t5p2_state_0 4 j := by decide + +private theorem k7t5p2_initial_eq_row_5 : ∀ j : Fin 7, (k7t5p2.initialMatrix 7) 5 j = k7t5p2_state_0 5 j := by decide + +private theorem k7t5p2_initial_eq_row_6 : ∀ j : Fin 7, (k7t5p2.initialMatrix 7) 6 j = k7t5p2_state_0 6 j := by decide + +private theorem k7t5p2_initial_eq : (k7t5p2.initialMatrix 7) = k7t5p2_state_0 := by + funext i j + fin_cases i + + · exact k7t5p2_initial_eq_row_0 j + + · exact k7t5p2_initial_eq_row_1 j + + · exact k7t5p2_initial_eq_row_2 j + + · exact k7t5p2_initial_eq_row_3 j + + · exact k7t5p2_initial_eq_row_4 j + + · exact k7t5p2_initial_eq_row_5 j + + · exact k7t5p2_initial_eq_row_6 j + +private theorem k7t5p2_closure_0 : ClosureCheck k7t5p2.graph k7t5p2_state_0 7 5 [] := by trivial + +private theorem k7t5p2_matrix_eq : k7t5p2.matrix 7 = k7t5p2_state_0 := by + change closureMatrix (k7t5p2.initialMatrix 7) _ = _ + rw [k7t5p2_initial_eq] + change closureMatrix k7t5p2_state_0 [] = _ + rfl + +private theorem k7t5p2_part_0 : k7t5p2.chains.flatten = List.finRange _ := by decide + +private theorem k7t5p2_part_1 : k7t5p2.chains.map List.length = ([[], [], [], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t5p2_part_2 : k7t5p2.chains.map (fun l => l.map (fun i => decide (i ∈ k7t5p2.clique))) = ([[], [], [], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t5p2_templates_item_0 : (⟨0, 1, [], [], [], 3, 6⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6]], [], [], 1, 2⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_2 : (⟨0, 2, [], [], [], 3, 6⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_3 : (⟨0, 2, [[3, 4, 5, 6]], [], [], 1, 2⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_4 : (⟨0, 3, [], [], [4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_5 : (⟨0, 4, [], [], [3], 2, 5⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_6 : (⟨0, 4, [], [], [5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_7 : (⟨0, 5, [], [], [4, 3], 1, 4⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_8 : (⟨0, 6, [], [], [5, 4, 3], 1, 3⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_9 : (⟨1, 2, [], [], [], 3, 6⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_10 : (⟨1, 2, [[3, 4, 5, 6]], [], [], 1, 2⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_11 : (⟨1, 3, [], [], [4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_12 : (⟨1, 4, [], [], [3], 2, 5⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_13 : (⟨1, 4, [], [], [5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_14 : (⟨1, 5, [], [], [4, 3], 1, 4⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_15 : (⟨1, 6, [], [], [5, 4, 3], 1, 3⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_16 : (⟨2, 3, [], [], [4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_17 : (⟨2, 4, [], [], [3], 2, 5⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_18 : (⟨2, 4, [], [], [5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_19 : (⟨2, 5, [], [], [4, 3], 1, 4⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_templates_item_20 : (⟨2, 6, [], [], [5, 4, 3], 1, 3⟩ : TemplateData (Fin 7)).Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p2_part_3 : ∀ T ∈ k7t5p2.templates, T.Check k7t5p2.graph k7t5p2.clique 7 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k7t5p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t5p2_templates_item_0, k7t5p2_templates_item_1, k7t5p2_templates_item_2, k7t5p2_templates_item_3, k7t5p2_templates_item_4, k7t5p2_templates_item_5, k7t5p2_templates_item_6, k7t5p2_templates_item_7, k7t5p2_templates_item_8, k7t5p2_templates_item_9, k7t5p2_templates_item_10, k7t5p2_templates_item_11, k7t5p2_templates_item_12, k7t5p2_templates_item_13, k7t5p2_templates_item_14, k7t5p2_templates_item_15, k7t5p2_templates_item_16, k7t5p2_templates_item_17, k7t5p2_templates_item_18, k7t5p2_templates_item_19, k7t5p2_templates_item_20⟩ + +private theorem k7t5p2_part_4 : ∀ p ∈ k7t5p2.required, p.Check k7t5p2.graph 7 := by decide + +private theorem k7t5p2_part_5 : ClosureCheck k7t5p2.graph (k7t5p2.initialMatrix 7) 7 5 k7t5p2.closure := by + rw [k7t5p2_initial_eq] + exact k7t5p2_closure_0 + +private theorem k7t5p2_part_6 : k7t5p2.bad.Check k7t5p2.graph (k7t5p2.matrix 7) 7 5 := by + rw [k7t5p2_matrix_eq] + decide + +theorem k7t5p2_check : k7t5p2.Check 7 5 [[], [], [], [2]] := + ⟨k7t5p2_part_0, k7t5p2_part_1, k7t5p2_part_2, k7t5p2_part_3, k7t5p2_part_4, k7t5p2_part_5, k7t5p2_part_6⟩ +def k7t5p3 : LayoutCertificate 7 where + chains := [[0], [1], [2, 3, 4, 5, 6]] + clique := {0, 1, 2, 4, 6} + templates := [⟨0, 1, [], [], [], 2, 6⟩, + ⟨0, 1, [[2, 3, 4, 5, 6]], [], [], 1, 1⟩, + ⟨0, 2, [], [], [], 2, 6⟩, + ⟨0, 2, [], [], [3, 4, 5, 6], 1, 2⟩, + ⟨0, 3, [], [], [2], 1, 5⟩, + ⟨0, 5, [], [], [4], 1, 5⟩, + ⟨0, 6, [], [], [], 2, 6⟩, + ⟨0, 6, [], [], [5, 4, 3, 2], 1, 2⟩, + ⟨1, 2, [], [], [], 2, 6⟩, + ⟨1, 2, [], [], [3, 4, 5, 6], 1, 2⟩, + ⟨1, 3, [], [], [2], 1, 5⟩, + ⟨1, 5, [], [], [4], 1, 5⟩, + ⟨1, 6, [], [], [], 2, 6⟩, + ⟨1, 6, [], [], [5, 4, 3, 2], 1, 2⟩, + ⟨2, 3, [], [], [4], 1, 5⟩, + ⟨3, 4, [], [2], [], 1, 5⟩, + ⟨3, 5, [], [2], [4], 1, 4⟩, + ⟨3, 6, [], [2], [], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (3, 2)}⟩ + + +private def k7t5p3_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 4, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t5p3_initial_eq_row_0 : ∀ j : Fin 7, (k7t5p3.initialMatrix 7) 0 j = k7t5p3_state_0 0 j := by decide + +private theorem k7t5p3_initial_eq_row_1 : ∀ j : Fin 7, (k7t5p3.initialMatrix 7) 1 j = k7t5p3_state_0 1 j := by decide + +private theorem k7t5p3_initial_eq_row_2 : ∀ j : Fin 7, (k7t5p3.initialMatrix 7) 2 j = k7t5p3_state_0 2 j := by decide + +private theorem k7t5p3_initial_eq_row_3 : ∀ j : Fin 7, (k7t5p3.initialMatrix 7) 3 j = k7t5p3_state_0 3 j := by decide + +private theorem k7t5p3_initial_eq_row_4 : ∀ j : Fin 7, (k7t5p3.initialMatrix 7) 4 j = k7t5p3_state_0 4 j := by decide + +private theorem k7t5p3_initial_eq_row_5 : ∀ j : Fin 7, (k7t5p3.initialMatrix 7) 5 j = k7t5p3_state_0 5 j := by decide + +private theorem k7t5p3_initial_eq_row_6 : ∀ j : Fin 7, (k7t5p3.initialMatrix 7) 6 j = k7t5p3_state_0 6 j := by decide + +private theorem k7t5p3_initial_eq : (k7t5p3.initialMatrix 7) = k7t5p3_state_0 := by + funext i j + fin_cases i + + · exact k7t5p3_initial_eq_row_0 j + + · exact k7t5p3_initial_eq_row_1 j + + · exact k7t5p3_initial_eq_row_2 j + + · exact k7t5p3_initial_eq_row_3 j + + · exact k7t5p3_initial_eq_row_4 j + + · exact k7t5p3_initial_eq_row_5 j + + · exact k7t5p3_initial_eq_row_6 j + +private theorem k7t5p3_closure_0 : ClosureCheck k7t5p3.graph k7t5p3_state_0 7 5 [] := by trivial + +private theorem k7t5p3_matrix_eq : k7t5p3.matrix 7 = k7t5p3_state_0 := by + change closureMatrix (k7t5p3.initialMatrix 7) _ = _ + rw [k7t5p3_initial_eq] + change closureMatrix k7t5p3_state_0 [] = _ + rfl + +private theorem k7t5p3_part_0 : k7t5p3.chains.flatten = List.finRange _ := by decide + +private theorem k7t5p3_part_1 : k7t5p3.chains.map List.length = ([[], [], [1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t5p3_part_2 : k7t5p3.chains.map (fun l => l.map (fun i => decide (i ∈ k7t5p3.clique))) = ([[], [], [1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t5p3_templates_item_0 : (⟨0, 1, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_1 : (⟨0, 1, [[2, 3, 4, 5, 6]], [], [], 1, 1⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_2 : (⟨0, 2, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_3 : (⟨0, 2, [], [], [3, 4, 5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_4 : (⟨0, 3, [], [], [2], 1, 5⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_5 : (⟨0, 5, [], [], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_6 : (⟨0, 6, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_7 : (⟨0, 6, [], [], [5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_8 : (⟨1, 2, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_9 : (⟨1, 2, [], [], [3, 4, 5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_10 : (⟨1, 3, [], [], [2], 1, 5⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_11 : (⟨1, 5, [], [], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_12 : (⟨1, 6, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_13 : (⟨1, 6, [], [], [5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_14 : (⟨2, 3, [], [], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_15 : (⟨3, 4, [], [2], [], 1, 5⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_16 : (⟨3, 5, [], [2], [4], 1, 4⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_templates_item_17 : (⟨3, 6, [], [2], [], 1, 5⟩ : TemplateData (Fin 7)).Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p3_part_3 : ∀ T ∈ k7t5p3.templates, T.Check k7t5p3.graph k7t5p3.clique 7 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k7t5p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t5p3_templates_item_0, k7t5p3_templates_item_1, k7t5p3_templates_item_2, k7t5p3_templates_item_3, k7t5p3_templates_item_4, k7t5p3_templates_item_5, k7t5p3_templates_item_6, k7t5p3_templates_item_7, k7t5p3_templates_item_8, k7t5p3_templates_item_9, k7t5p3_templates_item_10, k7t5p3_templates_item_11, k7t5p3_templates_item_12, k7t5p3_templates_item_13, k7t5p3_templates_item_14, k7t5p3_templates_item_15, k7t5p3_templates_item_16, k7t5p3_templates_item_17⟩ + +private theorem k7t5p3_part_4 : ∀ p ∈ k7t5p3.required, p.Check k7t5p3.graph 7 := by decide + +private theorem k7t5p3_part_5 : ClosureCheck k7t5p3.graph (k7t5p3.initialMatrix 7) 7 5 k7t5p3.closure := by + rw [k7t5p3_initial_eq] + exact k7t5p3_closure_0 + +private theorem k7t5p3_part_6 : k7t5p3.bad.Check k7t5p3.graph (k7t5p3.matrix 7) 7 5 := by + rw [k7t5p3_matrix_eq] + decide + +theorem k7t5p3_check : k7t5p3.Check 7 5 [[], [], [1, 1]] := + ⟨k7t5p3_part_0, k7t5p3_part_1, k7t5p3_part_2, k7t5p3_part_3, k7t5p3_part_4, k7t5p3_part_5, k7t5p3_part_6⟩ +def k7t5p4 : LayoutCertificate 7 where + chains := [[0], [1, 2, 3], [4, 5, 6]] + clique := {0, 1, 3, 4, 6} + templates := [⟨0, 1, [], [], [], 2, 6⟩, + ⟨0, 1, [[4, 5, 6]], [], [2, 3], 1, 1⟩, + ⟨0, 2, [], [], [1], 1, 5⟩, + ⟨0, 3, [], [], [], 2, 6⟩, + ⟨0, 3, [[4, 5, 6]], [], [2, 1], 1, 1⟩, + ⟨0, 4, [], [], [], 2, 6⟩, + ⟨0, 4, [[1, 2, 3]], [], [5, 6], 1, 1⟩, + ⟨0, 5, [], [], [4], 1, 5⟩, + ⟨0, 6, [], [], [], 2, 6⟩, + ⟨0, 6, [[1, 2, 3]], [], [5, 4], 1, 1⟩, + ⟨1, 2, [], [], [3], 1, 5⟩, + ⟨1, 4, [], [], [], 2, 6⟩, + ⟨1, 4, [], [3, 2], [5, 6], 1, 2⟩, + ⟨1, 5, [], [], [4], 1, 5⟩, + ⟨1, 6, [], [], [], 2, 6⟩, + ⟨1, 6, [], [3, 2], [5, 4], 1, 2⟩, + ⟨2, 4, [], [1], [], 1, 5⟩, + ⟨3, 4, [], [], [], 2, 6⟩, + ⟨3, 4, [], [1, 2], [5, 6], 1, 2⟩, + ⟨4, 5, [], [], [6], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (4, 3)}⟩ + + +private def k7t5p4_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 5, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 5, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t5p4_initial_eq_row_0 : ∀ j : Fin 7, (k7t5p4.initialMatrix 7) 0 j = k7t5p4_state_0 0 j := by decide + +private theorem k7t5p4_initial_eq_row_1 : ∀ j : Fin 7, (k7t5p4.initialMatrix 7) 1 j = k7t5p4_state_0 1 j := by decide + +private theorem k7t5p4_initial_eq_row_2 : ∀ j : Fin 7, (k7t5p4.initialMatrix 7) 2 j = k7t5p4_state_0 2 j := by decide + +private theorem k7t5p4_initial_eq_row_3 : ∀ j : Fin 7, (k7t5p4.initialMatrix 7) 3 j = k7t5p4_state_0 3 j := by decide + +private theorem k7t5p4_initial_eq_row_4 : ∀ j : Fin 7, (k7t5p4.initialMatrix 7) 4 j = k7t5p4_state_0 4 j := by decide + +private theorem k7t5p4_initial_eq_row_5 : ∀ j : Fin 7, (k7t5p4.initialMatrix 7) 5 j = k7t5p4_state_0 5 j := by decide + +private theorem k7t5p4_initial_eq_row_6 : ∀ j : Fin 7, (k7t5p4.initialMatrix 7) 6 j = k7t5p4_state_0 6 j := by decide + +private theorem k7t5p4_initial_eq : (k7t5p4.initialMatrix 7) = k7t5p4_state_0 := by + funext i j + fin_cases i + + · exact k7t5p4_initial_eq_row_0 j + + · exact k7t5p4_initial_eq_row_1 j + + · exact k7t5p4_initial_eq_row_2 j + + · exact k7t5p4_initial_eq_row_3 j + + · exact k7t5p4_initial_eq_row_4 j + + · exact k7t5p4_initial_eq_row_5 j + + · exact k7t5p4_initial_eq_row_6 j + +private theorem k7t5p4_closure_0 : ClosureCheck k7t5p4.graph k7t5p4_state_0 7 5 [] := by trivial + +private theorem k7t5p4_matrix_eq : k7t5p4.matrix 7 = k7t5p4_state_0 := by + change closureMatrix (k7t5p4.initialMatrix 7) _ = _ + rw [k7t5p4_initial_eq] + change closureMatrix k7t5p4_state_0 [] = _ + rfl + +private theorem k7t5p4_part_0 : k7t5p4.chains.flatten = List.finRange _ := by decide + +private theorem k7t5p4_part_1 : k7t5p4.chains.map List.length = ([[], [1], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t5p4_part_2 : k7t5p4.chains.map (fun l => l.map (fun i => decide (i ∈ k7t5p4.clique))) = ([[], [1], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t5p4_templates_item_0 : (⟨0, 1, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_1 : (⟨0, 1, [[4, 5, 6]], [], [2, 3], 1, 1⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_2 : (⟨0, 2, [], [], [1], 1, 5⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_3 : (⟨0, 3, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_4 : (⟨0, 3, [[4, 5, 6]], [], [2, 1], 1, 1⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_5 : (⟨0, 4, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_6 : (⟨0, 4, [[1, 2, 3]], [], [5, 6], 1, 1⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_7 : (⟨0, 5, [], [], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_8 : (⟨0, 6, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_9 : (⟨0, 6, [[1, 2, 3]], [], [5, 4], 1, 1⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_10 : (⟨1, 2, [], [], [3], 1, 5⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_11 : (⟨1, 4, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_12 : (⟨1, 4, [], [3, 2], [5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_13 : (⟨1, 5, [], [], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_14 : (⟨1, 6, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_15 : (⟨1, 6, [], [3, 2], [5, 4], 1, 2⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_16 : (⟨2, 4, [], [1], [], 1, 5⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_17 : (⟨3, 4, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_18 : (⟨3, 4, [], [1, 2], [5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_templates_item_19 : (⟨4, 5, [], [], [6], 1, 5⟩ : TemplateData (Fin 7)).Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t5p4_part_3 : ∀ T ∈ k7t5p4.templates, T.Check k7t5p4.graph k7t5p4.clique 7 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k7t5p4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t5p4_templates_item_0, k7t5p4_templates_item_1, k7t5p4_templates_item_2, k7t5p4_templates_item_3, k7t5p4_templates_item_4, k7t5p4_templates_item_5, k7t5p4_templates_item_6, k7t5p4_templates_item_7, k7t5p4_templates_item_8, k7t5p4_templates_item_9, k7t5p4_templates_item_10, k7t5p4_templates_item_11, k7t5p4_templates_item_12, k7t5p4_templates_item_13, k7t5p4_templates_item_14, k7t5p4_templates_item_15, k7t5p4_templates_item_16, k7t5p4_templates_item_17, k7t5p4_templates_item_18, k7t5p4_templates_item_19⟩ + +private theorem k7t5p4_part_4 : ∀ p ∈ k7t5p4.required, p.Check k7t5p4.graph 7 := by decide + +private theorem k7t5p4_part_5 : ClosureCheck k7t5p4.graph (k7t5p4.initialMatrix 7) 7 5 k7t5p4.closure := by + rw [k7t5p4_initial_eq] + exact k7t5p4_closure_0 + +private theorem k7t5p4_part_6 : k7t5p4.bad.Check k7t5p4.graph (k7t5p4.matrix 7) 7 5 := by + rw [k7t5p4_matrix_eq] + decide + +theorem k7t5p4_check : k7t5p4.Check 7 5 [[], [1], [1]] := + ⟨k7t5p4_part_0, k7t5p4_part_1, k7t5p4_part_2, k7t5p4_part_3, k7t5p4_part_4, k7t5p4_part_5, k7t5p4_part_6⟩ +def k7t6p0 : LayoutCertificate 6 where + chains := [[0], [1], [2], [3], [4], [5]] + clique := {0, 1, 2, 3, 4, 5} + templates := [⟨0, 1, [], [], [], 1, 6⟩, + ⟨0, 2, [], [], [], 1, 6⟩, + ⟨0, 3, [], [], [], 1, 6⟩, + ⟨0, 4, [], [], [], 1, 6⟩, + ⟨0, 5, [], [], [], 1, 6⟩, + ⟨1, 2, [], [], [], 1, 6⟩, + ⟨1, 3, [], [], [], 1, 6⟩, + ⟨1, 4, [], [], [], 1, 6⟩, + ⟨1, 5, [], [], [], 1, 6⟩, + ⟨2, 3, [], [], [], 1, 6⟩, + ⟨2, 4, [], [], [], 1, 6⟩, + ⟨2, 5, [], [], [], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k7t6p0_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t6p0_initial_eq_row_0 : ∀ j : Fin 6, (k7t6p0.initialMatrix 7) 0 j = k7t6p0_state_0 0 j := by decide + +private theorem k7t6p0_initial_eq_row_1 : ∀ j : Fin 6, (k7t6p0.initialMatrix 7) 1 j = k7t6p0_state_0 1 j := by decide + +private theorem k7t6p0_initial_eq_row_2 : ∀ j : Fin 6, (k7t6p0.initialMatrix 7) 2 j = k7t6p0_state_0 2 j := by decide + +private theorem k7t6p0_initial_eq_row_3 : ∀ j : Fin 6, (k7t6p0.initialMatrix 7) 3 j = k7t6p0_state_0 3 j := by decide + +private theorem k7t6p0_initial_eq_row_4 : ∀ j : Fin 6, (k7t6p0.initialMatrix 7) 4 j = k7t6p0_state_0 4 j := by decide + +private theorem k7t6p0_initial_eq_row_5 : ∀ j : Fin 6, (k7t6p0.initialMatrix 7) 5 j = k7t6p0_state_0 5 j := by decide + +private theorem k7t6p0_initial_eq : (k7t6p0.initialMatrix 7) = k7t6p0_state_0 := by + funext i j + fin_cases i + + · exact k7t6p0_initial_eq_row_0 j + + · exact k7t6p0_initial_eq_row_1 j + + · exact k7t6p0_initial_eq_row_2 j + + · exact k7t6p0_initial_eq_row_3 j + + · exact k7t6p0_initial_eq_row_4 j + + · exact k7t6p0_initial_eq_row_5 j + +private theorem k7t6p0_closure_0 : ClosureCheck k7t6p0.graph k7t6p0_state_0 7 6 [] := by trivial + +private theorem k7t6p0_matrix_eq : k7t6p0.matrix 7 = k7t6p0_state_0 := by + change closureMatrix (k7t6p0.initialMatrix 7) _ = _ + rw [k7t6p0_initial_eq] + change closureMatrix k7t6p0_state_0 [] = _ + rfl + +private theorem k7t6p0_part_0 : k7t6p0.chains.flatten = List.finRange _ := by decide + +private theorem k7t6p0_part_1 : k7t6p0.chains.map List.length = ([[], [], [], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t6p0_part_2 : k7t6p0.chains.map (fun l => l.map (fun i => decide (i ∈ k7t6p0.clique))) = ([[], [], [], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k7t6p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 6⟩ : TemplateData (Fin 6)).Check k7t6p0.graph k7t6p0.clique 7 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 6⟩ : TemplateData (Fin 6)).Check k7t6p0.graph k7t6p0.clique 7 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 6⟩ : TemplateData (Fin 6)).Check k7t6p0.graph k7t6p0.clique 7 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p0_templates_item_3 : (⟨0, 4, [], [], [], 1, 6⟩ : TemplateData (Fin 6)).Check k7t6p0.graph k7t6p0.clique 7 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p0_templates_item_4 : (⟨0, 5, [], [], [], 1, 6⟩ : TemplateData (Fin 6)).Check k7t6p0.graph k7t6p0.clique 7 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p0_templates_item_5 : (⟨1, 2, [], [], [], 1, 6⟩ : TemplateData (Fin 6)).Check k7t6p0.graph k7t6p0.clique 7 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p0_templates_item_6 : (⟨1, 3, [], [], [], 1, 6⟩ : TemplateData (Fin 6)).Check k7t6p0.graph k7t6p0.clique 7 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p0_templates_item_7 : (⟨1, 4, [], [], [], 1, 6⟩ : TemplateData (Fin 6)).Check k7t6p0.graph k7t6p0.clique 7 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p0_templates_item_8 : (⟨1, 5, [], [], [], 1, 6⟩ : TemplateData (Fin 6)).Check k7t6p0.graph k7t6p0.clique 7 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p0_templates_item_9 : (⟨2, 3, [], [], [], 1, 6⟩ : TemplateData (Fin 6)).Check k7t6p0.graph k7t6p0.clique 7 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p0_templates_item_10 : (⟨2, 4, [], [], [], 1, 6⟩ : TemplateData (Fin 6)).Check k7t6p0.graph k7t6p0.clique 7 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p0_templates_item_11 : (⟨2, 5, [], [], [], 1, 6⟩ : TemplateData (Fin 6)).Check k7t6p0.graph k7t6p0.clique 7 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p0_part_3 : ∀ T ∈ k7t6p0.templates, T.Check k7t6p0.graph k7t6p0.clique 7 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k7t6p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t6p0_templates_item_0, k7t6p0_templates_item_1, k7t6p0_templates_item_2, k7t6p0_templates_item_3, k7t6p0_templates_item_4, k7t6p0_templates_item_5, k7t6p0_templates_item_6, k7t6p0_templates_item_7, k7t6p0_templates_item_8, k7t6p0_templates_item_9, k7t6p0_templates_item_10, k7t6p0_templates_item_11⟩ + +private theorem k7t6p0_part_4 : ∀ p ∈ k7t6p0.required, p.Check k7t6p0.graph 7 := by decide + +private theorem k7t6p0_part_5 : ClosureCheck k7t6p0.graph (k7t6p0.initialMatrix 7) 7 6 k7t6p0.closure := by + rw [k7t6p0_initial_eq] + exact k7t6p0_closure_0 + +private theorem k7t6p0_part_6 : k7t6p0.bad.Check k7t6p0.graph (k7t6p0.matrix 7) 7 6 := by + rw [k7t6p0_matrix_eq] + decide + +theorem k7t6p0_check : k7t6p0.Check 7 6 [[], [], [], [], [], []] := + ⟨k7t6p0_part_0, k7t6p0_part_1, k7t6p0_part_2, k7t6p0_part_3, k7t6p0_part_4, k7t6p0_part_5, k7t6p0_part_6⟩ +def k7t6p1 : LayoutCertificate 7 where + chains := [[0], [1], [2], [3], [4, 5, 6]] + clique := {0, 1, 2, 3, 4, 6} + templates := [⟨0, 1, [], [], [], 2, 6⟩, + ⟨0, 1, [[4, 5, 6]], [], [], 1, 3⟩, + ⟨0, 2, [], [], [], 2, 6⟩, + ⟨0, 2, [[4, 5, 6]], [], [], 1, 3⟩, + ⟨0, 3, [], [], [], 2, 6⟩, + ⟨0, 3, [[4, 5, 6]], [], [], 1, 3⟩, + ⟨0, 4, [], [], [], 2, 6⟩, + ⟨0, 4, [], [], [5, 6], 1, 4⟩, + ⟨0, 5, [], [], [4], 1, 5⟩, + ⟨0, 6, [], [], [], 2, 6⟩, + ⟨0, 6, [], [], [5, 4], 1, 4⟩, + ⟨1, 2, [], [], [], 2, 6⟩, + ⟨1, 2, [[4, 5, 6]], [], [], 1, 3⟩, + ⟨1, 3, [], [], [], 2, 6⟩, + ⟨1, 3, [[4, 5, 6]], [], [], 1, 3⟩, + ⟨1, 4, [], [], [], 2, 6⟩, + ⟨1, 4, [], [], [5, 6], 1, 4⟩, + ⟨1, 5, [], [], [4], 1, 5⟩, + ⟨1, 6, [], [], [], 2, 6⟩, + ⟨1, 6, [], [], [5, 4], 1, 4⟩, + ⟨2, 3, [], [], [], 2, 6⟩, + ⟨2, 3, [[4, 5, 6]], [], [], 1, 3⟩, + ⟨2, 4, [], [], [], 2, 6⟩, + ⟨2, 4, [], [], [5, 6], 1, 4⟩, + ⟨2, 5, [], [], [4], 1, 5⟩, + ⟨2, 6, [], [], [], 2, 6⟩, + ⟨2, 6, [], [], [5, 4], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k7t6p1_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t6p1_initial_eq_row_0 : ∀ j : Fin 7, (k7t6p1.initialMatrix 7) 0 j = k7t6p1_state_0 0 j := by decide + +private theorem k7t6p1_initial_eq_row_1 : ∀ j : Fin 7, (k7t6p1.initialMatrix 7) 1 j = k7t6p1_state_0 1 j := by decide + +private theorem k7t6p1_initial_eq_row_2 : ∀ j : Fin 7, (k7t6p1.initialMatrix 7) 2 j = k7t6p1_state_0 2 j := by decide + +private theorem k7t6p1_initial_eq_row_3 : ∀ j : Fin 7, (k7t6p1.initialMatrix 7) 3 j = k7t6p1_state_0 3 j := by decide + +private theorem k7t6p1_initial_eq_row_4 : ∀ j : Fin 7, (k7t6p1.initialMatrix 7) 4 j = k7t6p1_state_0 4 j := by decide + +private theorem k7t6p1_initial_eq_row_5 : ∀ j : Fin 7, (k7t6p1.initialMatrix 7) 5 j = k7t6p1_state_0 5 j := by decide + +private theorem k7t6p1_initial_eq_row_6 : ∀ j : Fin 7, (k7t6p1.initialMatrix 7) 6 j = k7t6p1_state_0 6 j := by decide + +private theorem k7t6p1_initial_eq : (k7t6p1.initialMatrix 7) = k7t6p1_state_0 := by + funext i j + fin_cases i + + · exact k7t6p1_initial_eq_row_0 j + + · exact k7t6p1_initial_eq_row_1 j + + · exact k7t6p1_initial_eq_row_2 j + + · exact k7t6p1_initial_eq_row_3 j + + · exact k7t6p1_initial_eq_row_4 j + + · exact k7t6p1_initial_eq_row_5 j + + · exact k7t6p1_initial_eq_row_6 j + +private theorem k7t6p1_closure_0 : ClosureCheck k7t6p1.graph k7t6p1_state_0 7 6 [] := by trivial + +private theorem k7t6p1_matrix_eq : k7t6p1.matrix 7 = k7t6p1_state_0 := by + change closureMatrix (k7t6p1.initialMatrix 7) _ = _ + rw [k7t6p1_initial_eq] + change closureMatrix k7t6p1_state_0 [] = _ + rfl + +private theorem k7t6p1_part_0 : k7t6p1.chains.flatten = List.finRange _ := by decide + +private theorem k7t6p1_part_1 : k7t6p1.chains.map List.length = ([[], [], [], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t6p1_part_2 : k7t6p1.chains.map (fun l => l.map (fun i => decide (i ∈ k7t6p1.clique))) = ([[], [], [], [], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k7t6p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_1 : (⟨0, 1, [[4, 5, 6]], [], [], 1, 3⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_2 : (⟨0, 2, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_3 : (⟨0, 2, [[4, 5, 6]], [], [], 1, 3⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_4 : (⟨0, 3, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_5 : (⟨0, 3, [[4, 5, 6]], [], [], 1, 3⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_6 : (⟨0, 4, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_7 : (⟨0, 4, [], [], [5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_8 : (⟨0, 5, [], [], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_9 : (⟨0, 6, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_10 : (⟨0, 6, [], [], [5, 4], 1, 4⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_11 : (⟨1, 2, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_12 : (⟨1, 2, [[4, 5, 6]], [], [], 1, 3⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_13 : (⟨1, 3, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_14 : (⟨1, 3, [[4, 5, 6]], [], [], 1, 3⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_15 : (⟨1, 4, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_16 : (⟨1, 4, [], [], [5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_17 : (⟨1, 5, [], [], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_18 : (⟨1, 6, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_19 : (⟨1, 6, [], [], [5, 4], 1, 4⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_20 : (⟨2, 3, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_21 : (⟨2, 3, [[4, 5, 6]], [], [], 1, 3⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_22 : (⟨2, 4, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_23 : (⟨2, 4, [], [], [5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_24 : (⟨2, 5, [], [], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_25 : (⟨2, 6, [], [], [], 2, 6⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_templates_item_26 : (⟨2, 6, [], [], [5, 4], 1, 4⟩ : TemplateData (Fin 7)).Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t6p1_part_3 : ∀ T ∈ k7t6p1.templates, T.Check k7t6p1.graph k7t6p1.clique 7 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k7t6p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t6p1_templates_item_0, k7t6p1_templates_item_1, k7t6p1_templates_item_2, k7t6p1_templates_item_3, k7t6p1_templates_item_4, k7t6p1_templates_item_5, k7t6p1_templates_item_6, k7t6p1_templates_item_7, k7t6p1_templates_item_8, k7t6p1_templates_item_9, k7t6p1_templates_item_10, k7t6p1_templates_item_11, k7t6p1_templates_item_12, k7t6p1_templates_item_13, k7t6p1_templates_item_14, k7t6p1_templates_item_15, k7t6p1_templates_item_16, k7t6p1_templates_item_17, k7t6p1_templates_item_18, k7t6p1_templates_item_19, k7t6p1_templates_item_20, k7t6p1_templates_item_21, k7t6p1_templates_item_22, k7t6p1_templates_item_23, k7t6p1_templates_item_24, k7t6p1_templates_item_25, k7t6p1_templates_item_26⟩ + +private theorem k7t6p1_part_4 : ∀ p ∈ k7t6p1.required, p.Check k7t6p1.graph 7 := by decide + +private theorem k7t6p1_part_5 : ClosureCheck k7t6p1.graph (k7t6p1.initialMatrix 7) 7 6 k7t6p1.closure := by + rw [k7t6p1_initial_eq] + exact k7t6p1_closure_0 + +private theorem k7t6p1_part_6 : k7t6p1.bad.Check k7t6p1.graph (k7t6p1.matrix 7) 7 6 := by + rw [k7t6p1_matrix_eq] + decide + +theorem k7t6p1_check : k7t6p1.Check 7 6 [[], [], [], [], [1]] := + ⟨k7t6p1_part_0, k7t6p1_part_1, k7t6p1_part_2, k7t6p1_part_3, k7t6p1_part_4, k7t6p1_part_5, k7t6p1_part_6⟩ +def k7t7p0 : LayoutCertificate 7 where + chains := [[0], [1], [2], [3], [4], [5], [6]] + clique := {0, 1, 2, 3, 4, 5, 6} + templates := [⟨0, 1, [], [], [], 1, 6⟩, + ⟨0, 2, [], [], [], 1, 6⟩, + ⟨0, 3, [], [], [], 1, 6⟩, + ⟨0, 4, [], [], [], 1, 6⟩, + ⟨0, 5, [], [], [], 1, 6⟩, + ⟨0, 6, [], [], [], 1, 6⟩, + ⟨1, 2, [], [], [], 1, 6⟩, + ⟨1, 3, [], [], [], 1, 6⟩, + ⟨1, 4, [], [], [], 1, 6⟩, + ⟨1, 5, [], [], [], 1, 6⟩, + ⟨1, 6, [], [], [], 1, 6⟩, + ⟨2, 3, [], [], [], 1, 6⟩, + ⟨2, 4, [], [], [], 1, 6⟩, + ⟨2, 5, [], [], [], 1, 6⟩, + ⟨2, 6, [], [], [], 1, 6⟩, + ⟨3, 4, [], [], [], 1, 6⟩, + ⟨3, 5, [], [], [], 1, 6⟩, + ⟨3, 6, [], [], [], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3), (3, 3)}⟩ + + +private def k7t7p0_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k7t7p0_initial_eq_row_0 : ∀ j : Fin 7, (k7t7p0.initialMatrix 7) 0 j = k7t7p0_state_0 0 j := by decide + +private theorem k7t7p0_initial_eq_row_1 : ∀ j : Fin 7, (k7t7p0.initialMatrix 7) 1 j = k7t7p0_state_0 1 j := by decide + +private theorem k7t7p0_initial_eq_row_2 : ∀ j : Fin 7, (k7t7p0.initialMatrix 7) 2 j = k7t7p0_state_0 2 j := by decide + +private theorem k7t7p0_initial_eq_row_3 : ∀ j : Fin 7, (k7t7p0.initialMatrix 7) 3 j = k7t7p0_state_0 3 j := by decide + +private theorem k7t7p0_initial_eq_row_4 : ∀ j : Fin 7, (k7t7p0.initialMatrix 7) 4 j = k7t7p0_state_0 4 j := by decide + +private theorem k7t7p0_initial_eq_row_5 : ∀ j : Fin 7, (k7t7p0.initialMatrix 7) 5 j = k7t7p0_state_0 5 j := by decide + +private theorem k7t7p0_initial_eq_row_6 : ∀ j : Fin 7, (k7t7p0.initialMatrix 7) 6 j = k7t7p0_state_0 6 j := by decide + +private theorem k7t7p0_initial_eq : (k7t7p0.initialMatrix 7) = k7t7p0_state_0 := by + funext i j + fin_cases i + + · exact k7t7p0_initial_eq_row_0 j + + · exact k7t7p0_initial_eq_row_1 j + + · exact k7t7p0_initial_eq_row_2 j + + · exact k7t7p0_initial_eq_row_3 j + + · exact k7t7p0_initial_eq_row_4 j + + · exact k7t7p0_initial_eq_row_5 j + + · exact k7t7p0_initial_eq_row_6 j + +private theorem k7t7p0_closure_0 : ClosureCheck k7t7p0.graph k7t7p0_state_0 7 7 [] := by trivial + +private theorem k7t7p0_matrix_eq : k7t7p0.matrix 7 = k7t7p0_state_0 := by + change closureMatrix (k7t7p0.initialMatrix 7) _ = _ + rw [k7t7p0_initial_eq] + change closureMatrix k7t7p0_state_0 [] = _ + rfl + +private theorem k7t7p0_part_0 : k7t7p0.chains.flatten = List.finRange _ := by decide + +private theorem k7t7p0_part_1 : k7t7p0.chains.map List.length = ([[], [], [], [], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k7t7p0_part_2 : k7t7p0.chains.map (fun l => l.map (fun i => decide (i ∈ k7t7p0.clique))) = ([[], [], [], [], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k7t7p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_3 : (⟨0, 4, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_4 : (⟨0, 5, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_5 : (⟨0, 6, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_6 : (⟨1, 2, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_7 : (⟨1, 3, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_8 : (⟨1, 4, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_9 : (⟨1, 5, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_10 : (⟨1, 6, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_11 : (⟨2, 3, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_12 : (⟨2, 4, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_13 : (⟨2, 5, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_14 : (⟨2, 6, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_15 : (⟨3, 4, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_16 : (⟨3, 5, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_templates_item_17 : (⟨3, 6, [], [], [], 1, 6⟩ : TemplateData (Fin 7)).Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k7t7p0_part_3 : ∀ T ∈ k7t7p0.templates, T.Check k7t7p0.graph k7t7p0.clique 7 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k7t7p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k7t7p0_templates_item_0, k7t7p0_templates_item_1, k7t7p0_templates_item_2, k7t7p0_templates_item_3, k7t7p0_templates_item_4, k7t7p0_templates_item_5, k7t7p0_templates_item_6, k7t7p0_templates_item_7, k7t7p0_templates_item_8, k7t7p0_templates_item_9, k7t7p0_templates_item_10, k7t7p0_templates_item_11, k7t7p0_templates_item_12, k7t7p0_templates_item_13, k7t7p0_templates_item_14, k7t7p0_templates_item_15, k7t7p0_templates_item_16, k7t7p0_templates_item_17⟩ + +private theorem k7t7p0_part_4 : ∀ p ∈ k7t7p0.required, p.Check k7t7p0.graph 7 := by decide + +private theorem k7t7p0_part_5 : ClosureCheck k7t7p0.graph (k7t7p0.initialMatrix 7) 7 7 k7t7p0.closure := by + rw [k7t7p0_initial_eq] + exact k7t7p0_closure_0 + +private theorem k7t7p0_part_6 : k7t7p0.bad.Check k7t7p0.graph (k7t7p0.matrix 7) 7 7 := by + rw [k7t7p0_matrix_eq] + decide + +theorem k7t7p0_check : k7t7p0.Check 7 7 [[], [], [], [], [], [], []] := + ⟨k7t7p0_part_0, k7t7p0_part_1, k7t7p0_part_2, k7t7p0_part_3, k7t7p0_part_4, k7t7p0_part_5, k7t7p0_part_6⟩ +end CycleClique.Construction.Certificates + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK8.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK8.lean new file mode 100644 index 0000000000000000000000000000000000000000..20afd506f690b2d86f8f29b3b81d30aa769b4936 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK8.lean @@ -0,0 +1,15158 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LayoutCertificate +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateMatrixChunks +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FastCertificateMatrix +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FastLayoutGraph + +namespace OAI + +namespace CycleClique.Construction.Certificates + +def k8t4p0 : LayoutCertificate 4 where + chains := [[0], [1], [2], [3]] + clique := {0, 1, 2, 3} + templates := [⟨0, 1, [], [], [], 1, 7⟩, + ⟨0, 2, [], [], [], 1, 7⟩, + ⟨0, 3, [], [], [], 1, 7⟩, + ⟨1, 2, [], [], [], 1, 7⟩, + ⟨1, 3, [], [], [], 1, 7⟩, + ⟨2, 3, [], [], [], 1, 7⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (1, 2), (2, 2)}⟩ + + +private def k8t4p0_state_0 : ForbiddenMatrix 4 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p0_initial_eq_row_0 : ∀ j : Fin 4, (k8t4p0.initialMatrix 8) 0 j = k8t4p0_state_0 0 j := by decide + +private theorem k8t4p0_initial_eq_row_1 : ∀ j : Fin 4, (k8t4p0.initialMatrix 8) 1 j = k8t4p0_state_0 1 j := by decide + +private theorem k8t4p0_initial_eq_row_2 : ∀ j : Fin 4, (k8t4p0.initialMatrix 8) 2 j = k8t4p0_state_0 2 j := by decide + +private theorem k8t4p0_initial_eq_row_3 : ∀ j : Fin 4, (k8t4p0.initialMatrix 8) 3 j = k8t4p0_state_0 3 j := by decide + +private theorem k8t4p0_initial_eq : (k8t4p0.initialMatrix 8) = k8t4p0_state_0 := by + funext i j + fin_cases i + + · exact k8t4p0_initial_eq_row_0 j + + · exact k8t4p0_initial_eq_row_1 j + + · exact k8t4p0_initial_eq_row_2 j + + · exact k8t4p0_initial_eq_row_3 j + +private theorem k8t4p0_closure_0 : ClosureCheck k8t4p0.graph k8t4p0_state_0 8 4 [] := by trivial + +private theorem k8t4p0_matrix_eq : k8t4p0.matrix 8 = k8t4p0_state_0 := by + change closureMatrix (k8t4p0.initialMatrix 8) _ = _ + rw [k8t4p0_initial_eq] + change closureMatrix k8t4p0_state_0 [] = _ + rfl + +private theorem k8t4p0_part_0 : k8t4p0.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p0_part_1 : k8t4p0.chains.map List.length = ([[], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p0_part_2 : k8t4p0.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p0.clique))) = ([[], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 7⟩ : TemplateData (Fin 4)).Check k8t4p0.graph k8t4p0.clique 8 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 7⟩ : TemplateData (Fin 4)).Check k8t4p0.graph k8t4p0.clique 8 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 7⟩ : TemplateData (Fin 4)).Check k8t4p0.graph k8t4p0.clique 8 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p0_templates_item_3 : (⟨1, 2, [], [], [], 1, 7⟩ : TemplateData (Fin 4)).Check k8t4p0.graph k8t4p0.clique 8 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p0_templates_item_4 : (⟨1, 3, [], [], [], 1, 7⟩ : TemplateData (Fin 4)).Check k8t4p0.graph k8t4p0.clique 8 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p0_templates_item_5 : (⟨2, 3, [], [], [], 1, 7⟩ : TemplateData (Fin 4)).Check k8t4p0.graph k8t4p0.clique 8 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p0_part_3 : ∀ T ∈ k8t4p0.templates, T.Check k8t4p0.graph k8t4p0.clique 8 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p0_templates_item_0, k8t4p0_templates_item_1, k8t4p0_templates_item_2, k8t4p0_templates_item_3, k8t4p0_templates_item_4, k8t4p0_templates_item_5⟩ + +private theorem k8t4p0_part_4 : ∀ p ∈ k8t4p0.required, p.Check k8t4p0.graph 8 := by decide + +private theorem k8t4p0_part_5 : ClosureCheck k8t4p0.graph (k8t4p0.initialMatrix 8) 8 4 k8t4p0.closure := by + rw [k8t4p0_initial_eq] + exact k8t4p0_closure_0 + +private theorem k8t4p0_part_6 : k8t4p0.bad.Check k8t4p0.graph (k8t4p0.matrix 8) 8 4 := by + rw [k8t4p0_matrix_eq] + decide + +theorem k8t4p0_check : k8t4p0.Check 8 4 [[], [], [], []] := + ⟨k8t4p0_part_0, k8t4p0_part_1, k8t4p0_part_2, k8t4p0_part_3, k8t4p0_part_4, k8t4p0_part_5, k8t4p0_part_6⟩ +def k8t4p1 : LayoutCertificate 5 where + chains := [[0], [1], [2, 3, 4]] + clique := {0, 1, 2, 4} + templates := [⟨0, 1, [], [], [], 2, 7⟩, + ⟨0, 1, [[2, 3, 4]], [], [], 1, 4⟩, + ⟨0, 2, [], [], [3, 4], 1, 5⟩, + ⟨0, 3, [], [], [2], 1, 6⟩, + ⟨0, 4, [], [], [3, 2], 1, 5⟩, + ⟨1, 2, [], [], [3, 4], 1, 5⟩, + ⟨1, 3, [], [], [2], 1, 6⟩, + ⟨1, 4, [], [], [3, 2], 1, 5⟩, + ⟨2, 3, [], [], [4], 1, 6⟩, + ⟨3, 4, [], [2], [], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (1, 2), (3, 2)}⟩ + + +private def k8t4p1_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p1_initial_eq_row_0 : ∀ j : Fin 5, (k8t4p1.initialMatrix 8) 0 j = k8t4p1_state_0 0 j := by decide + +private theorem k8t4p1_initial_eq_row_1 : ∀ j : Fin 5, (k8t4p1.initialMatrix 8) 1 j = k8t4p1_state_0 1 j := by decide + +private theorem k8t4p1_initial_eq_row_2 : ∀ j : Fin 5, (k8t4p1.initialMatrix 8) 2 j = k8t4p1_state_0 2 j := by decide + +private theorem k8t4p1_initial_eq_row_3 : ∀ j : Fin 5, (k8t4p1.initialMatrix 8) 3 j = k8t4p1_state_0 3 j := by decide + +private theorem k8t4p1_initial_eq_row_4 : ∀ j : Fin 5, (k8t4p1.initialMatrix 8) 4 j = k8t4p1_state_0 4 j := by decide + +private theorem k8t4p1_initial_eq : (k8t4p1.initialMatrix 8) = k8t4p1_state_0 := by + funext i j + fin_cases i + + · exact k8t4p1_initial_eq_row_0 j + + · exact k8t4p1_initial_eq_row_1 j + + · exact k8t4p1_initial_eq_row_2 j + + · exact k8t4p1_initial_eq_row_3 j + + · exact k8t4p1_initial_eq_row_4 j + +private theorem k8t4p1_closure_0 : ClosureCheck k8t4p1.graph k8t4p1_state_0 8 4 [] := by trivial + +private theorem k8t4p1_matrix_eq : k8t4p1.matrix 8 = k8t4p1_state_0 := by + change closureMatrix (k8t4p1.initialMatrix 8) _ = _ + rw [k8t4p1_initial_eq] + change closureMatrix k8t4p1_state_0 [] = _ + rfl + +private theorem k8t4p1_part_0 : k8t4p1.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p1_part_1 : k8t4p1.chains.map List.length = ([[], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p1_part_2 : k8t4p1.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p1.clique))) = ([[], [], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 7⟩ : TemplateData (Fin 5)).Check k8t4p1.graph k8t4p1.clique 8 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p1_templates_item_1 : (⟨0, 1, [[2, 3, 4]], [], [], 1, 4⟩ : TemplateData (Fin 5)).Check k8t4p1.graph k8t4p1.clique 8 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p1_templates_item_2 : (⟨0, 2, [], [], [3, 4], 1, 5⟩ : TemplateData (Fin 5)).Check k8t4p1.graph k8t4p1.clique 8 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p1_templates_item_3 : (⟨0, 3, [], [], [2], 1, 6⟩ : TemplateData (Fin 5)).Check k8t4p1.graph k8t4p1.clique 8 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p1_templates_item_4 : (⟨0, 4, [], [], [3, 2], 1, 5⟩ : TemplateData (Fin 5)).Check k8t4p1.graph k8t4p1.clique 8 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p1_templates_item_5 : (⟨1, 2, [], [], [3, 4], 1, 5⟩ : TemplateData (Fin 5)).Check k8t4p1.graph k8t4p1.clique 8 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p1_templates_item_6 : (⟨1, 3, [], [], [2], 1, 6⟩ : TemplateData (Fin 5)).Check k8t4p1.graph k8t4p1.clique 8 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p1_templates_item_7 : (⟨1, 4, [], [], [3, 2], 1, 5⟩ : TemplateData (Fin 5)).Check k8t4p1.graph k8t4p1.clique 8 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p1_templates_item_8 : (⟨2, 3, [], [], [4], 1, 6⟩ : TemplateData (Fin 5)).Check k8t4p1.graph k8t4p1.clique 8 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p1_templates_item_9 : (⟨3, 4, [], [2], [], 1, 6⟩ : TemplateData (Fin 5)).Check k8t4p1.graph k8t4p1.clique 8 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p1_part_3 : ∀ T ∈ k8t4p1.templates, T.Check k8t4p1.graph k8t4p1.clique 8 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p1_templates_item_0, k8t4p1_templates_item_1, k8t4p1_templates_item_2, k8t4p1_templates_item_3, k8t4p1_templates_item_4, k8t4p1_templates_item_5, k8t4p1_templates_item_6, k8t4p1_templates_item_7, k8t4p1_templates_item_8, k8t4p1_templates_item_9⟩ + +private theorem k8t4p1_part_4 : ∀ p ∈ k8t4p1.required, p.Check k8t4p1.graph 8 := by decide + +private theorem k8t4p1_part_5 : ClosureCheck k8t4p1.graph (k8t4p1.initialMatrix 8) 8 4 k8t4p1.closure := by + rw [k8t4p1_initial_eq] + exact k8t4p1_closure_0 + +private theorem k8t4p1_part_6 : k8t4p1.bad.Check k8t4p1.graph (k8t4p1.matrix 8) 8 4 := by + rw [k8t4p1_matrix_eq] + decide + +theorem k8t4p1_check : k8t4p1.Check 8 4 [[], [], [1]] := + ⟨k8t4p1_part_0, k8t4p1_part_1, k8t4p1_part_2, k8t4p1_part_3, k8t4p1_part_4, k8t4p1_part_5, k8t4p1_part_6⟩ +def k8t4p2 : LayoutCertificate 6 where + chains := [[0], [1], [2, 3, 4, 5]] + clique := {0, 1, 2, 5} + templates := [⟨0, 1, [], [], [], 3, 7⟩, + ⟨0, 1, [[2, 3, 4, 5]], [], [], 1, 3⟩, + ⟨0, 2, [], [], [3, 4, 5], 1, 4⟩, + ⟨0, 3, [], [], [2], 2, 6⟩, + ⟨0, 3, [], [], [4, 5], 1, 5⟩, + ⟨0, 4, [], [], [3, 2], 1, 5⟩, + ⟨0, 5, [], [], [4, 3, 2], 1, 4⟩, + ⟨1, 2, [], [], [3, 4, 5], 1, 4⟩, + ⟨1, 3, [], [], [2], 2, 6⟩, + ⟨1, 3, [], [], [4, 5], 1, 5⟩, + ⟨1, 4, [], [], [3, 2], 1, 5⟩, + ⟨1, 5, [], [], [4, 3, 2], 1, 4⟩, + ⟨2, 3, [], [], [4, 5], 1, 5⟩, + ⟨3, 4, [], [2], [5], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (3, 3)}⟩ + + +private def k8t4p2_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 5, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p2_initial_eq_row_0 : ∀ j : Fin 6, (k8t4p2.initialMatrix 8) 0 j = k8t4p2_state_0 0 j := by decide + +private theorem k8t4p2_initial_eq_row_1 : ∀ j : Fin 6, (k8t4p2.initialMatrix 8) 1 j = k8t4p2_state_0 1 j := by decide + +private theorem k8t4p2_initial_eq_row_2 : ∀ j : Fin 6, (k8t4p2.initialMatrix 8) 2 j = k8t4p2_state_0 2 j := by decide + +private theorem k8t4p2_initial_eq_row_3 : ∀ j : Fin 6, (k8t4p2.initialMatrix 8) 3 j = k8t4p2_state_0 3 j := by decide + +private theorem k8t4p2_initial_eq_row_4 : ∀ j : Fin 6, (k8t4p2.initialMatrix 8) 4 j = k8t4p2_state_0 4 j := by decide + +private theorem k8t4p2_initial_eq_row_5 : ∀ j : Fin 6, (k8t4p2.initialMatrix 8) 5 j = k8t4p2_state_0 5 j := by decide + +private theorem k8t4p2_initial_eq : (k8t4p2.initialMatrix 8) = k8t4p2_state_0 := by + funext i j + fin_cases i + + · exact k8t4p2_initial_eq_row_0 j + + · exact k8t4p2_initial_eq_row_1 j + + · exact k8t4p2_initial_eq_row_2 j + + · exact k8t4p2_initial_eq_row_3 j + + · exact k8t4p2_initial_eq_row_4 j + + · exact k8t4p2_initial_eq_row_5 j + +private theorem k8t4p2_closure_0 : ClosureCheck k8t4p2.graph k8t4p2_state_0 8 4 [] := by trivial + +private theorem k8t4p2_matrix_eq : k8t4p2.matrix 8 = k8t4p2_state_0 := by + change closureMatrix (k8t4p2.initialMatrix 8) _ = _ + rw [k8t4p2_initial_eq] + change closureMatrix k8t4p2_state_0 [] = _ + rfl + +private theorem k8t4p2_part_0 : k8t4p2.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p2_part_1 : k8t4p2.chains.map List.length = ([[], [], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p2_part_2 : k8t4p2.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p2.clique))) = ([[], [], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p2_templates_item_0 : (⟨0, 1, [], [], [], 3, 7⟩ : TemplateData (Fin 6)).Check k8t4p2.graph k8t4p2.clique 8 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p2_templates_item_1 : (⟨0, 1, [[2, 3, 4, 5]], [], [], 1, 3⟩ : TemplateData (Fin 6)).Check k8t4p2.graph k8t4p2.clique 8 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p2_templates_item_2 : (⟨0, 2, [], [], [3, 4, 5], 1, 4⟩ : TemplateData (Fin 6)).Check k8t4p2.graph k8t4p2.clique 8 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p2_templates_item_3 : (⟨0, 3, [], [], [2], 2, 6⟩ : TemplateData (Fin 6)).Check k8t4p2.graph k8t4p2.clique 8 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p2_templates_item_4 : (⟨0, 3, [], [], [4, 5], 1, 5⟩ : TemplateData (Fin 6)).Check k8t4p2.graph k8t4p2.clique 8 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p2_templates_item_5 : (⟨0, 4, [], [], [3, 2], 1, 5⟩ : TemplateData (Fin 6)).Check k8t4p2.graph k8t4p2.clique 8 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p2_templates_item_6 : (⟨0, 5, [], [], [4, 3, 2], 1, 4⟩ : TemplateData (Fin 6)).Check k8t4p2.graph k8t4p2.clique 8 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p2_templates_item_7 : (⟨1, 2, [], [], [3, 4, 5], 1, 4⟩ : TemplateData (Fin 6)).Check k8t4p2.graph k8t4p2.clique 8 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p2_templates_item_8 : (⟨1, 3, [], [], [2], 2, 6⟩ : TemplateData (Fin 6)).Check k8t4p2.graph k8t4p2.clique 8 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p2_templates_item_9 : (⟨1, 3, [], [], [4, 5], 1, 5⟩ : TemplateData (Fin 6)).Check k8t4p2.graph k8t4p2.clique 8 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p2_templates_item_10 : (⟨1, 4, [], [], [3, 2], 1, 5⟩ : TemplateData (Fin 6)).Check k8t4p2.graph k8t4p2.clique 8 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p2_templates_item_11 : (⟨1, 5, [], [], [4, 3, 2], 1, 4⟩ : TemplateData (Fin 6)).Check k8t4p2.graph k8t4p2.clique 8 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p2_templates_item_12 : (⟨2, 3, [], [], [4, 5], 1, 5⟩ : TemplateData (Fin 6)).Check k8t4p2.graph k8t4p2.clique 8 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p2_templates_item_13 : (⟨3, 4, [], [2], [5], 1, 5⟩ : TemplateData (Fin 6)).Check k8t4p2.graph k8t4p2.clique 8 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p2_part_3 : ∀ T ∈ k8t4p2.templates, T.Check k8t4p2.graph k8t4p2.clique 8 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p2_templates_item_0, k8t4p2_templates_item_1, k8t4p2_templates_item_2, k8t4p2_templates_item_3, k8t4p2_templates_item_4, k8t4p2_templates_item_5, k8t4p2_templates_item_6, k8t4p2_templates_item_7, k8t4p2_templates_item_8, k8t4p2_templates_item_9, k8t4p2_templates_item_10, k8t4p2_templates_item_11, k8t4p2_templates_item_12, k8t4p2_templates_item_13⟩ + +private theorem k8t4p2_part_4 : ∀ p ∈ k8t4p2.required, p.Check k8t4p2.graph 8 := by decide + +private theorem k8t4p2_part_5 : ClosureCheck k8t4p2.graph (k8t4p2.initialMatrix 8) 8 4 k8t4p2.closure := by + rw [k8t4p2_initial_eq] + exact k8t4p2_closure_0 + +private theorem k8t4p2_part_6 : k8t4p2.bad.Check k8t4p2.graph (k8t4p2.matrix 8) 8 4 := by + rw [k8t4p2_matrix_eq] + decide + +theorem k8t4p2_check : k8t4p2.Check 8 4 [[], [], [2]] := + ⟨k8t4p2_part_0, k8t4p2_part_1, k8t4p2_part_2, k8t4p2_part_3, k8t4p2_part_4, k8t4p2_part_5, k8t4p2_part_6⟩ +private def k8t4p3_step_0_data : EdgeAttachmentData 7 := ⟨3, 0, [⟨0, 1, [3, 4, 5, 6]⟩], ⟨none, {(0, 3), (1, 3), (3, 3)}⟩⟩ + +private def k8t4p3_step_0 : ClosureStep 7 := .edge k8t4p3_step_0_data + +private def k8t4p3_step_1_data : EdgeAttachmentData 7 := ⟨3, 1, [⟨0, 1, [6, 5, 4, 3]⟩], ⟨none, {(0, 3), (1, 3), (3, 3)}⟩⟩ + +private def k8t4p3_step_1 : ClosureStep 7 := .edge k8t4p3_step_1_data + +private def k8t4p3_step_2_data : EdgeAttachmentData 7 := ⟨4, 0, [⟨0, 1, [4, 3, 2, 6]⟩], ⟨none, {(0, 3), (1, 3), (3, 3)}⟩⟩ + +private def k8t4p3_step_2 : ClosureStep 7 := .edge k8t4p3_step_2_data + +private def k8t4p3_step_3_data : FreshAttachmentData 7 := ⟨4, 0, [⟨2, 0, [1, 3, 7, 6, 5]⟩, ⟨2, 0, [3, 4, 5, 6, 7, 1]⟩, ⟨4, 0, [3, 1, 2, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 7, 6, 5]⟩, ⟨4, 7, [3, 1, 0, 5, 6]⟩, ⟨4, 7, [3, 2, 1, 0, 5, 6]⟩, ⟨4, 6, [3, 2, 7, 1, 0, 5]⟩, ⟨6, 0, [5, 4, 3, 2, 1]⟩, ⟨6, 0, [5, 4, 3, 2, 7, 1]⟩, ⟨6, 3, [5, 0, 1, 2, 7]⟩, ⟨6, 4, [5, 0, 1, 2, 7, 3]⟩, ⟨6, 3, [7, 2, 1, 0, 5, 4]⟩], ⟨none, {(2, 3), (4, 3), (6, 3)}⟩⟩ + +private def k8t4p3_step_3 : ClosureStep 7 := .fresh k8t4p3_step_3_data + +private def k8t4p3_step_4_data : EdgeAttachmentData 7 := ⟨4, 1, [⟨0, 1, [2, 6, 5, 4]⟩], ⟨none, {(0, 3), (1, 3), (3, 3)}⟩⟩ + +private def k8t4p3_step_4 : ClosureStep 7 := .edge k8t4p3_step_4_data + +private def k8t4p3_step_5_data : FreshAttachmentData 7 := ⟨4, 1, [⟨1, 0, [2, 3, 7, 6, 5]⟩, ⟨1, 0, [3, 4, 5, 6, 7, 2]⟩, ⟨4, 0, [3, 1, 2, 7, 6, 5]⟩, ⟨4, 7, [3, 1, 2, 0, 5, 6]⟩, ⟨4, 6, [3, 1, 7, 2, 0, 5]⟩, ⟨4, 0, [3, 1, 7, 6, 5]⟩, ⟨4, 7, [3, 2, 0, 5, 6]⟩, ⟨6, 0, [5, 4, 3, 1, 2]⟩, ⟨6, 0, [5, 4, 3, 1, 7, 2]⟩, ⟨6, 3, [5, 0, 2, 1, 7]⟩, ⟨6, 4, [5, 0, 2, 1, 7, 3]⟩, ⟨6, 3, [7, 1, 2, 0, 5, 4]⟩], ⟨none, {(1, 3), (4, 3), (6, 3)}⟩⟩ + +private def k8t4p3_step_5 : ClosureStep 7 := .fresh k8t4p3_step_5_data + +private def k8t4p3_step_6_data : EdgeAttachmentData 7 := ⟨4, 2, [⟨0, 1, [2, 4, 5, 6]⟩], ⟨none, {(0, 3), (1, 3), (5, 3)}⟩⟩ + +private def k8t4p3_step_6 : ClosureStep 7 := .edge k8t4p3_step_6_data + +private def k8t4p3_step_7_data : FreshAttachmentData 7 := ⟨4, 2, [⟨1, 0, [2, 3, 7, 6, 5]⟩, ⟨1, 0, [2, 7, 6, 5, 4, 3]⟩, ⟨4, 0, [3, 1, 2, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 7, 6, 5]⟩, ⟨4, 6, [5, 0, 3, 1, 2, 7]⟩, ⟨6, 0, [7, 1, 2, 3, 4, 5]⟩, ⟨6, 4, [7, 1, 2, 3, 0, 5]⟩, ⟨6, 0, [7, 1, 3, 4, 5]⟩], ⟨none, {(6, 3), (1, 3), (4, 3)}⟩⟩ + +private def k8t4p3_step_7 : ClosureStep 7 := .fresh k8t4p3_step_7_data + +private def k8t4p3_step_8_data : EdgeAttachmentData 7 := ⟨5, 0, [⟨0, 1, [5, 4, 3, 2]⟩], ⟨none, {(0, 3), (1, 3), (5, 3)}⟩⟩ + +private def k8t4p3_step_8 : ClosureStep 7 := .edge k8t4p3_step_8_data + +private def k8t4p3_step_9_data : EdgeAttachmentData 7 := ⟨5, 3, [⟨0, 1, [2, 3, 5, 6]⟩], ⟨none, {(0, 3), (1, 3), (3, 3)}⟩⟩ + +private def k8t4p3_step_9 : ClosureStep 7 := .edge k8t4p3_step_9_data + +private def k8t4p3_step_10_data : FreshAttachmentData 7 := ⟨5, 3, [⟨1, 0, [2, 3, 4, 5, 6]⟩, ⟨1, 0, [2, 3, 4]⟩, ⟨1, 0, [2, 3, 7, 6, 5, 4]⟩, ⟨1, 0, [2, 3, 7, 6]⟩, ⟨1, 5, [2, 3, 7, 6, 0, 4]⟩, ⟨3, 0, [1, 2, 7, 6, 5, 4]⟩, ⟨3, 0, [1, 2, 7, 6]⟩, ⟨3, 5, [1, 2, 7, 6, 0, 4]⟩, ⟨3, 0, [1, 7, 6, 5, 4]⟩, ⟨3, 0, [1, 7, 6]⟩, ⟨5, 0, [4, 3, 1, 2, 7, 6]⟩, ⟨5, 0, [4, 3, 1, 7, 6]⟩, ⟨5, 0, [4, 3, 7, 6]⟩, ⟨5, 3, [4, 0, 6, 7, 1, 2]⟩, ⟨5, 2, [4, 0, 6, 7, 1, 3]⟩, ⟨5, 1, [4, 0, 6, 7, 2, 3]⟩, ⟨5, 7, [6, 0, 4, 3, 1, 2]⟩], ⟨none, {(1, 3), (3, 3), (5, 2), (0, 1)}⟩⟩ + +private def k8t4p3_step_10 : ClosureStep 7 := .fresh k8t4p3_step_10_data + +private def k8t4p3_step_11_data : EdgeAttachmentData 7 := ⟨6, 3, [⟨3, 2, [6, 0]⟩, ⟨3, 2, [6]⟩], ⟨none, {(0, 3), (3, 3), (2, 3)}⟩⟩ + +private def k8t4p3_step_11 : ClosureStep 7 := .edge k8t4p3_step_11_data + +private def k8t4p3_step_12_data : FreshAttachmentData 7 := ⟨6, 3, [⟨1, 0, [2, 3, 4, 5, 6, 7]⟩, ⟨1, 0, [2, 3, 4]⟩, ⟨1, 5, [2, 3, 4, 0, 7, 6]⟩, ⟨1, 0, [2, 7, 3, 4]⟩, ⟨1, 0, [2, 7, 6, 5, 4]⟩, ⟨1, 0, [2, 7]⟩, ⟨1, 2, [3, 4, 0, 7]⟩, ⟨1, 0, [7]⟩, ⟨2, 0, [1, 3, 4, 5, 6, 7]⟩, ⟨2, 0, [1, 3, 4]⟩, ⟨2, 5, [1, 3, 4, 0, 7, 6]⟩, ⟨2, 0, [1, 7, 3, 4]⟩, ⟨2, 0, [1, 7, 6, 5, 4]⟩, ⟨2, 0, [1, 7]⟩, ⟨2, 0, [7]⟩, ⟨0, 6, [4, 3, 1, 2, 7]⟩, ⟨0, 5, [4, 3, 1, 2, 7, 6]⟩, ⟨0, 5, [4, 3, 1, 7, 6]⟩, ⟨0, 2, [4, 5, 6, 7, 1]⟩, ⟨0, 3, [4, 5, 6, 7, 1, 2]⟩, ⟨0, 3, [4, 5, 6, 7, 1]⟩, ⟨0, 2, [4, 5, 6, 7, 1, 3]⟩, ⟨0, 1, [4, 5, 6, 7, 2]⟩, ⟨0, 1, [4, 5, 6, 7, 2, 3]⟩, ⟨0, 6, [7, 1, 2, 3, 4, 5]⟩], ⟨none, {(1, 3), (2, 3), (0, 3)}⟩⟩ + +private def k8t4p3_step_12 : ClosureStep 7 := .fresh k8t4p3_step_12_data + +private def k8t4p3_step_13_data : EdgeAttachmentData 7 := ⟨6, 4, [⟨0, 1, [2, 3, 4, 6]⟩], ⟨none, {(0, 3), (1, 3), (3, 3)}⟩⟩ + +private def k8t4p3_step_13 : ClosureStep 7 := .edge k8t4p3_step_13_data + +private def k8t4p3_step_14_data : FreshAttachmentData 7 := ⟨6, 4, [⟨1, 0, [2, 3, 4, 5, 6, 7]⟩, ⟨1, 0, [2, 3, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 2, 7, 6, 5]⟩, ⟨4, 6, [3, 1, 2, 7, 0, 5]⟩, ⟨4, 0, [3, 1, 7, 6, 5]⟩, ⟨6, 0, [5, 4, 3, 1, 2, 7]⟩, ⟨6, 0, [5, 4, 3, 1, 7]⟩, ⟨6, 4, [5, 0, 7, 1, 2, 3]⟩], ⟨none, {(4, 3), (1, 3), (6, 3)}⟩⟩ + +private def k8t4p3_step_14 : ClosureStep 7 := .fresh k8t4p3_step_14_data + +def k8t4p3 : LayoutCertificate 7 where + chains := [[0], [1], [2, 3, 4, 5, 6]] + clique := {0, 1, 2, 6} + templates := [⟨0, 1, [], [], [], 4, 7⟩, + ⟨0, 1, [[2, 3, 4, 5, 6]], [], [], 1, 2⟩, + ⟨0, 2, [], [], [], 4, 7⟩, + ⟨0, 2, [], [], [3, 4, 5, 6], 1, 3⟩, + ⟨0, 3, [], [], [2], 3, 6⟩, + ⟨0, 3, [], [], [4, 5, 6], 1, 4⟩, + ⟨0, 4, [], [], [3, 2], 2, 5⟩, + ⟨0, 5, [], [], [4, 3, 2], 1, 4⟩, + ⟨0, 5, [], [], [6], 3, 6⟩, + ⟨0, 6, [], [], [5, 4, 3, 2], 1, 3⟩, + ⟨1, 2, [], [], [3, 4, 5, 6], 1, 3⟩, + ⟨1, 3, [], [], [2], 3, 6⟩, + ⟨1, 3, [], [], [4, 5, 6], 1, 4⟩, + ⟨1, 4, [], [], [3, 2], 2, 5⟩, + ⟨1, 5, [], [], [4, 3, 2], 1, 4⟩, + ⟨1, 5, [], [], [6], 3, 6⟩, + ⟨1, 6, [], [], [5, 4, 3, 2], 1, 3⟩, + ⟨2, 3, [], [], [4, 5, 6], 1, 4⟩, + ⟨2, 4, [], [], [5, 6], 2, 5⟩, + ⟨3, 4, [], [2], [5, 6], 1, 4⟩, + ⟨3, 5, [], [2], [6], 2, 5⟩, + ⟨4, 5, [], [2, 3], [6], 1, 4⟩, + ⟨5, 6, [], [2, 3, 4], [], 1, 4⟩] + required := [⟨3, 5, [4]⟩] + closure := [k8t4p3_step_0, k8t4p3_step_1, k8t4p3_step_2, k8t4p3_step_3, k8t4p3_step_4, k8t4p3_step_5, k8t4p3_step_6, k8t4p3_step_7, k8t4p3_step_8, k8t4p3_step_9, k8t4p3_step_10, k8t4p3_step_11, k8t4p3_step_12, k8t4p3_step_13, k8t4p3_step_14] + bad := ⟨none, {(4, 2), (0, 2), (3, 2)}⟩ + + +private def k8t4p3_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_initial_eq_row_0 : ∀ j : Fin 7, (k8t4p3.initialMatrix 8) 0 j = k8t4p3_state_0 0 j := by decide + +private theorem k8t4p3_initial_eq_row_1 : ∀ j : Fin 7, (k8t4p3.initialMatrix 8) 1 j = k8t4p3_state_0 1 j := by decide + +private theorem k8t4p3_initial_eq_row_2 : ∀ j : Fin 7, (k8t4p3.initialMatrix 8) 2 j = k8t4p3_state_0 2 j := by decide + +private theorem k8t4p3_initial_eq_row_3 : ∀ j : Fin 7, (k8t4p3.initialMatrix 8) 3 j = k8t4p3_state_0 3 j := by decide + +private theorem k8t4p3_initial_eq_row_4 : ∀ j : Fin 7, (k8t4p3.initialMatrix 8) 4 j = k8t4p3_state_0 4 j := by decide + +private theorem k8t4p3_initial_eq_row_5 : ∀ j : Fin 7, (k8t4p3.initialMatrix 8) 5 j = k8t4p3_state_0 5 j := by decide + +private theorem k8t4p3_initial_eq_row_6 : ∀ j : Fin 7, (k8t4p3.initialMatrix 8) 6 j = k8t4p3_state_0 6 j := by decide + +private theorem k8t4p3_initial_eq : (k8t4p3.initialMatrix 8) = k8t4p3_state_0 := by + funext i j + fin_cases i + + · exact k8t4p3_initial_eq_row_0 j + + · exact k8t4p3_initial_eq_row_1 j + + · exact k8t4p3_initial_eq_row_2 j + + · exact k8t4p3_initial_eq_row_3 j + + · exact k8t4p3_initial_eq_row_4 j + + · exact k8t4p3_initial_eq_row_5 j + + · exact k8t4p3_initial_eq_row_6 j + +private def k8t4p3_state_1 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p3_local_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, ∅, {1, 2, 3}, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_local_0_eq_row_0 : ∀ j : Fin 7, (fun a b => k8t4p3_state_0 a b ∪ requiredMatrix 8 k8t4p3_step_0_data.required a b) 0 j = k8t4p3_local_0 0 j := by decide + +private theorem k8t4p3_local_0_eq_row_1 : ∀ j : Fin 7, (fun a b => k8t4p3_state_0 a b ∪ requiredMatrix 8 k8t4p3_step_0_data.required a b) 1 j = k8t4p3_local_0 1 j := by decide + +private theorem k8t4p3_local_0_eq_row_2 : ∀ j : Fin 7, (fun a b => k8t4p3_state_0 a b ∪ requiredMatrix 8 k8t4p3_step_0_data.required a b) 2 j = k8t4p3_local_0 2 j := by decide + +private theorem k8t4p3_local_0_eq_row_3 : ∀ j : Fin 7, (fun a b => k8t4p3_state_0 a b ∪ requiredMatrix 8 k8t4p3_step_0_data.required a b) 3 j = k8t4p3_local_0 3 j := by decide + +private theorem k8t4p3_local_0_eq_row_4 : ∀ j : Fin 7, (fun a b => k8t4p3_state_0 a b ∪ requiredMatrix 8 k8t4p3_step_0_data.required a b) 4 j = k8t4p3_local_0 4 j := by decide + +private theorem k8t4p3_local_0_eq_row_5 : ∀ j : Fin 7, (fun a b => k8t4p3_state_0 a b ∪ requiredMatrix 8 k8t4p3_step_0_data.required a b) 5 j = k8t4p3_local_0 5 j := by decide + +private theorem k8t4p3_local_0_eq_row_6 : ∀ j : Fin 7, (fun a b => k8t4p3_state_0 a b ∪ requiredMatrix 8 k8t4p3_step_0_data.required a b) 6 j = k8t4p3_local_0 6 j := by decide + +private theorem k8t4p3_local_0_eq : (fun a b => k8t4p3_state_0 a b ∪ requiredMatrix 8 k8t4p3_step_0_data.required a b) = k8t4p3_local_0 := by + funext i j + fin_cases i + + · exact k8t4p3_local_0_eq_row_0 j + + · exact k8t4p3_local_0_eq_row_1 j + + · exact k8t4p3_local_0_eq_row_2 j + + · exact k8t4p3_local_0_eq_row_3 j + + · exact k8t4p3_local_0_eq_row_4 j + + · exact k8t4p3_local_0_eq_row_5 j + + · exact k8t4p3_local_0_eq_row_6 j + +private theorem k8t4p3_local_0_paths : ∀ p ∈ k8t4p3_step_0_data.required, p.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_0_data.i k8t4p3_step_0_data.j) 8 := by decide + +private theorem k8t4p3_local_0_bad : k8t4p3_step_0_data.bad.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_0_data.i k8t4p3_step_0_data.j) k8t4p3_local_0 8 4 := by decide + +private theorem k8t4p3_step_0_check : k8t4p3_step_0.Check k8t4p3.graph k8t4p3_state_0 8 4 := by + change k8t4p3_step_0_data.Check k8t4p3.graph k8t4p3_state_0 8 4 + refine ⟨k8t4p3_local_0_paths, ?_⟩ + rw [k8t4p3_local_0_eq] + exact k8t4p3_local_0_bad + +private theorem k8t4p3_update_0 : k8t4p3_step_0.apply k8t4p3_state_0 = k8t4p3_state_1 := by + have h : ∀ i j : Fin 7, k8t4p3_step_0.apply k8t4p3_state_0 i j = k8t4p3_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p3_state_2 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p3_local_1 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, ∅, {1, 2, 3}, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_local_1_eq_row_0 : ∀ j : Fin 7, (fun a b => k8t4p3_state_1 a b ∪ requiredMatrix 8 k8t4p3_step_1_data.required a b) 0 j = k8t4p3_local_1 0 j := by decide + +private theorem k8t4p3_local_1_eq_row_1 : ∀ j : Fin 7, (fun a b => k8t4p3_state_1 a b ∪ requiredMatrix 8 k8t4p3_step_1_data.required a b) 1 j = k8t4p3_local_1 1 j := by decide + +private theorem k8t4p3_local_1_eq_row_2 : ∀ j : Fin 7, (fun a b => k8t4p3_state_1 a b ∪ requiredMatrix 8 k8t4p3_step_1_data.required a b) 2 j = k8t4p3_local_1 2 j := by decide + +private theorem k8t4p3_local_1_eq_row_3 : ∀ j : Fin 7, (fun a b => k8t4p3_state_1 a b ∪ requiredMatrix 8 k8t4p3_step_1_data.required a b) 3 j = k8t4p3_local_1 3 j := by decide + +private theorem k8t4p3_local_1_eq_row_4 : ∀ j : Fin 7, (fun a b => k8t4p3_state_1 a b ∪ requiredMatrix 8 k8t4p3_step_1_data.required a b) 4 j = k8t4p3_local_1 4 j := by decide + +private theorem k8t4p3_local_1_eq_row_5 : ∀ j : Fin 7, (fun a b => k8t4p3_state_1 a b ∪ requiredMatrix 8 k8t4p3_step_1_data.required a b) 5 j = k8t4p3_local_1 5 j := by decide + +private theorem k8t4p3_local_1_eq_row_6 : ∀ j : Fin 7, (fun a b => k8t4p3_state_1 a b ∪ requiredMatrix 8 k8t4p3_step_1_data.required a b) 6 j = k8t4p3_local_1 6 j := by decide + +private theorem k8t4p3_local_1_eq : (fun a b => k8t4p3_state_1 a b ∪ requiredMatrix 8 k8t4p3_step_1_data.required a b) = k8t4p3_local_1 := by + funext i j + fin_cases i + + · exact k8t4p3_local_1_eq_row_0 j + + · exact k8t4p3_local_1_eq_row_1 j + + · exact k8t4p3_local_1_eq_row_2 j + + · exact k8t4p3_local_1_eq_row_3 j + + · exact k8t4p3_local_1_eq_row_4 j + + · exact k8t4p3_local_1_eq_row_5 j + + · exact k8t4p3_local_1_eq_row_6 j + +private theorem k8t4p3_local_1_paths : ∀ p ∈ k8t4p3_step_1_data.required, p.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_1_data.i k8t4p3_step_1_data.j) 8 := by decide + +private theorem k8t4p3_local_1_bad : k8t4p3_step_1_data.bad.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_1_data.i k8t4p3_step_1_data.j) k8t4p3_local_1 8 4 := by decide + +private theorem k8t4p3_step_1_check : k8t4p3_step_1.Check k8t4p3.graph k8t4p3_state_1 8 4 := by + change k8t4p3_step_1_data.Check k8t4p3.graph k8t4p3_state_1 8 4 + refine ⟨k8t4p3_local_1_paths, ?_⟩ + rw [k8t4p3_local_1_eq] + exact k8t4p3_local_1_bad + +private theorem k8t4p3_update_1 : k8t4p3_step_1.apply k8t4p3_state_1 = k8t4p3_state_2 := by + have h : ∀ i j : Fin 7, k8t4p3_step_1.apply k8t4p3_state_1 i j = k8t4p3_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p3_state_3 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[{0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p3_local_2 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_local_2_eq_row_0 : ∀ j : Fin 7, (fun a b => k8t4p3_state_2 a b ∪ requiredMatrix 8 k8t4p3_step_2_data.required a b) 0 j = k8t4p3_local_2 0 j := by decide + +private theorem k8t4p3_local_2_eq_row_1 : ∀ j : Fin 7, (fun a b => k8t4p3_state_2 a b ∪ requiredMatrix 8 k8t4p3_step_2_data.required a b) 1 j = k8t4p3_local_2 1 j := by decide + +private theorem k8t4p3_local_2_eq_row_2 : ∀ j : Fin 7, (fun a b => k8t4p3_state_2 a b ∪ requiredMatrix 8 k8t4p3_step_2_data.required a b) 2 j = k8t4p3_local_2 2 j := by decide + +private theorem k8t4p3_local_2_eq_row_3 : ∀ j : Fin 7, (fun a b => k8t4p3_state_2 a b ∪ requiredMatrix 8 k8t4p3_step_2_data.required a b) 3 j = k8t4p3_local_2 3 j := by decide + +private theorem k8t4p3_local_2_eq_row_4 : ∀ j : Fin 7, (fun a b => k8t4p3_state_2 a b ∪ requiredMatrix 8 k8t4p3_step_2_data.required a b) 4 j = k8t4p3_local_2 4 j := by decide + +private theorem k8t4p3_local_2_eq_row_5 : ∀ j : Fin 7, (fun a b => k8t4p3_state_2 a b ∪ requiredMatrix 8 k8t4p3_step_2_data.required a b) 5 j = k8t4p3_local_2 5 j := by decide + +private theorem k8t4p3_local_2_eq_row_6 : ∀ j : Fin 7, (fun a b => k8t4p3_state_2 a b ∪ requiredMatrix 8 k8t4p3_step_2_data.required a b) 6 j = k8t4p3_local_2 6 j := by decide + +private theorem k8t4p3_local_2_eq : (fun a b => k8t4p3_state_2 a b ∪ requiredMatrix 8 k8t4p3_step_2_data.required a b) = k8t4p3_local_2 := by + funext i j + fin_cases i + + · exact k8t4p3_local_2_eq_row_0 j + + · exact k8t4p3_local_2_eq_row_1 j + + · exact k8t4p3_local_2_eq_row_2 j + + · exact k8t4p3_local_2_eq_row_3 j + + · exact k8t4p3_local_2_eq_row_4 j + + · exact k8t4p3_local_2_eq_row_5 j + + · exact k8t4p3_local_2_eq_row_6 j + +private theorem k8t4p3_local_2_paths : ∀ p ∈ k8t4p3_step_2_data.required, p.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_2_data.i k8t4p3_step_2_data.j) 8 := by decide + +private theorem k8t4p3_local_2_bad : k8t4p3_step_2_data.bad.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_2_data.i k8t4p3_step_2_data.j) k8t4p3_local_2 8 4 := by decide + +private theorem k8t4p3_step_2_check : k8t4p3_step_2.Check k8t4p3.graph k8t4p3_state_2 8 4 := by + change k8t4p3_step_2_data.Check k8t4p3.graph k8t4p3_state_2 8 4 + refine ⟨k8t4p3_local_2_paths, ?_⟩ + rw [k8t4p3_local_2_eq] + exact k8t4p3_local_2_bad + +private theorem k8t4p3_update_2 : k8t4p3_step_2.apply k8t4p3_state_2 = k8t4p3_state_3 := by + have h : ∀ i j : Fin 7, k8t4p3_step_2.apply k8t4p3_state_2 i j = k8t4p3_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p3_state_4 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p3_local_3 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, {1, 2}, ∅, {1, 2}, ∅, {1, 2}, ∅], + #[∅, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 6, {1, 2, 3}], + #[{1, 2}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[∅, Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {1, 2}, ∅], + #[{1, 2}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 6, {1, 2}], + #[∅, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[{1, 2}, Finset.Icc 1 6, Finset.Icc 1 6, {1, 2}, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3}, {1, 2, 3}, ∅, {1, 2}, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_local_3_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_3 a b ∪ requiredMatrix 8 k8t4p3_step_3_data.required a b) 0 j = k8t4p3_local_3 0 j := by decide + +private theorem k8t4p3_local_3_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_3 a b ∪ requiredMatrix 8 k8t4p3_step_3_data.required a b) 1 j = k8t4p3_local_3 1 j := by decide + +private theorem k8t4p3_local_3_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_3 a b ∪ requiredMatrix 8 k8t4p3_step_3_data.required a b) 2 j = k8t4p3_local_3 2 j := by decide + +private theorem k8t4p3_local_3_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_3 a b ∪ requiredMatrix 8 k8t4p3_step_3_data.required a b) 3 j = k8t4p3_local_3 3 j := by decide + +private theorem k8t4p3_local_3_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_3 a b ∪ requiredMatrix 8 k8t4p3_step_3_data.required a b) 4 j = k8t4p3_local_3 4 j := by decide + +private theorem k8t4p3_local_3_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_3 a b ∪ requiredMatrix 8 k8t4p3_step_3_data.required a b) 5 j = k8t4p3_local_3 5 j := by decide + +private theorem k8t4p3_local_3_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_3 a b ∪ requiredMatrix 8 k8t4p3_step_3_data.required a b) 6 j = k8t4p3_local_3 6 j := by decide + +private theorem k8t4p3_local_3_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_3 a b ∪ requiredMatrix 8 k8t4p3_step_3_data.required a b) 7 j = k8t4p3_local_3 7 j := by decide + +private theorem k8t4p3_local_3_eq : (fun a b => freshMatrix k8t4p3_state_3 a b ∪ requiredMatrix 8 k8t4p3_step_3_data.required a b) = k8t4p3_local_3 := by + funext i j + fin_cases i + + · exact k8t4p3_local_3_eq_row_0 j + + · exact k8t4p3_local_3_eq_row_1 j + + · exact k8t4p3_local_3_eq_row_2 j + + · exact k8t4p3_local_3_eq_row_3 j + + · exact k8t4p3_local_3_eq_row_4 j + + · exact k8t4p3_local_3_eq_row_5 j + + · exact k8t4p3_local_3_eq_row_6 j + + · exact k8t4p3_local_3_eq_row_7 j + +private theorem k8t4p3_local_3_paths : ∀ p ∈ k8t4p3_step_3_data.required, p.Check (freshGraph k8t4p3.graph k8t4p3_step_3_data.i k8t4p3_step_3_data.j) 8 := by decide + +private theorem k8t4p3_local_3_bad : k8t4p3_step_3_data.bad.Check (freshGraph k8t4p3.graph k8t4p3_step_3_data.i k8t4p3_step_3_data.j) k8t4p3_local_3 8 4 := by decide + +private theorem k8t4p3_step_3_check : k8t4p3_step_3.Check k8t4p3.graph k8t4p3_state_3 8 4 := by + change k8t4p3_step_3_data.Check k8t4p3.graph k8t4p3_state_3 8 4 + refine ⟨by decide, k8t4p3_local_3_paths, ?_⟩ + rw [k8t4p3_local_3_eq] + exact k8t4p3_local_3_bad + +private theorem k8t4p3_update_3 : k8t4p3_step_3.apply k8t4p3_state_3 = k8t4p3_state_4 := by + have h : ∀ i j : Fin 7, k8t4p3_step_3.apply k8t4p3_state_3 i j = k8t4p3_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p3_state_5 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p3_local_4 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_local_4_eq_row_0 : ∀ j : Fin 7, (fun a b => k8t4p3_state_4 a b ∪ requiredMatrix 8 k8t4p3_step_4_data.required a b) 0 j = k8t4p3_local_4 0 j := by decide + +private theorem k8t4p3_local_4_eq_row_1 : ∀ j : Fin 7, (fun a b => k8t4p3_state_4 a b ∪ requiredMatrix 8 k8t4p3_step_4_data.required a b) 1 j = k8t4p3_local_4 1 j := by decide + +private theorem k8t4p3_local_4_eq_row_2 : ∀ j : Fin 7, (fun a b => k8t4p3_state_4 a b ∪ requiredMatrix 8 k8t4p3_step_4_data.required a b) 2 j = k8t4p3_local_4 2 j := by decide + +private theorem k8t4p3_local_4_eq_row_3 : ∀ j : Fin 7, (fun a b => k8t4p3_state_4 a b ∪ requiredMatrix 8 k8t4p3_step_4_data.required a b) 3 j = k8t4p3_local_4 3 j := by decide + +private theorem k8t4p3_local_4_eq_row_4 : ∀ j : Fin 7, (fun a b => k8t4p3_state_4 a b ∪ requiredMatrix 8 k8t4p3_step_4_data.required a b) 4 j = k8t4p3_local_4 4 j := by decide + +private theorem k8t4p3_local_4_eq_row_5 : ∀ j : Fin 7, (fun a b => k8t4p3_state_4 a b ∪ requiredMatrix 8 k8t4p3_step_4_data.required a b) 5 j = k8t4p3_local_4 5 j := by decide + +private theorem k8t4p3_local_4_eq_row_6 : ∀ j : Fin 7, (fun a b => k8t4p3_state_4 a b ∪ requiredMatrix 8 k8t4p3_step_4_data.required a b) 6 j = k8t4p3_local_4 6 j := by decide + +private theorem k8t4p3_local_4_eq : (fun a b => k8t4p3_state_4 a b ∪ requiredMatrix 8 k8t4p3_step_4_data.required a b) = k8t4p3_local_4 := by + funext i j + fin_cases i + + · exact k8t4p3_local_4_eq_row_0 j + + · exact k8t4p3_local_4_eq_row_1 j + + · exact k8t4p3_local_4_eq_row_2 j + + · exact k8t4p3_local_4_eq_row_3 j + + · exact k8t4p3_local_4_eq_row_4 j + + · exact k8t4p3_local_4_eq_row_5 j + + · exact k8t4p3_local_4_eq_row_6 j + +private theorem k8t4p3_local_4_paths : ∀ p ∈ k8t4p3_step_4_data.required, p.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_4_data.i k8t4p3_step_4_data.j) 8 := by decide + +private theorem k8t4p3_local_4_bad : k8t4p3_step_4_data.bad.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_4_data.i k8t4p3_step_4_data.j) k8t4p3_local_4 8 4 := by decide + +private theorem k8t4p3_step_4_check : k8t4p3_step_4.Check k8t4p3.graph k8t4p3_state_4 8 4 := by + change k8t4p3_step_4_data.Check k8t4p3.graph k8t4p3_state_4 8 4 + refine ⟨k8t4p3_local_4_paths, ?_⟩ + rw [k8t4p3_local_4_eq] + exact k8t4p3_local_4_bad + +private theorem k8t4p3_update_4 : k8t4p3_step_4.apply k8t4p3_state_4 = k8t4p3_state_5 := by + have h : ∀ i j : Fin 7, k8t4p3_step_4.apply k8t4p3_state_4 i j = k8t4p3_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p3_state_6 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p3_local_5 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2}, ∅, ∅, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[∅, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 6, {1, 2, 3}], + #[∅, Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {1, 2}, ∅], + #[{1, 2}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 6, {1, 2}], + #[∅, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[{1, 2}, Finset.Icc 1 6, Finset.Icc 1 6, {1, 2}, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3}, {1, 2, 3}, ∅, {1, 2}, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_local_5_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_5 a b ∪ requiredMatrix 8 k8t4p3_step_5_data.required a b) 0 j = k8t4p3_local_5 0 j := by decide + +private theorem k8t4p3_local_5_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_5 a b ∪ requiredMatrix 8 k8t4p3_step_5_data.required a b) 1 j = k8t4p3_local_5 1 j := by decide + +private theorem k8t4p3_local_5_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_5 a b ∪ requiredMatrix 8 k8t4p3_step_5_data.required a b) 2 j = k8t4p3_local_5 2 j := by decide + +private theorem k8t4p3_local_5_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_5 a b ∪ requiredMatrix 8 k8t4p3_step_5_data.required a b) 3 j = k8t4p3_local_5 3 j := by decide + +private theorem k8t4p3_local_5_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_5 a b ∪ requiredMatrix 8 k8t4p3_step_5_data.required a b) 4 j = k8t4p3_local_5 4 j := by decide + +private theorem k8t4p3_local_5_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_5 a b ∪ requiredMatrix 8 k8t4p3_step_5_data.required a b) 5 j = k8t4p3_local_5 5 j := by decide + +private theorem k8t4p3_local_5_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_5 a b ∪ requiredMatrix 8 k8t4p3_step_5_data.required a b) 6 j = k8t4p3_local_5 6 j := by decide + +private theorem k8t4p3_local_5_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_5 a b ∪ requiredMatrix 8 k8t4p3_step_5_data.required a b) 7 j = k8t4p3_local_5 7 j := by decide + +private theorem k8t4p3_local_5_eq : (fun a b => freshMatrix k8t4p3_state_5 a b ∪ requiredMatrix 8 k8t4p3_step_5_data.required a b) = k8t4p3_local_5 := by + funext i j + fin_cases i + + · exact k8t4p3_local_5_eq_row_0 j + + · exact k8t4p3_local_5_eq_row_1 j + + · exact k8t4p3_local_5_eq_row_2 j + + · exact k8t4p3_local_5_eq_row_3 j + + · exact k8t4p3_local_5_eq_row_4 j + + · exact k8t4p3_local_5_eq_row_5 j + + · exact k8t4p3_local_5_eq_row_6 j + + · exact k8t4p3_local_5_eq_row_7 j + +private theorem k8t4p3_local_5_paths : ∀ p ∈ k8t4p3_step_5_data.required, p.Check (freshGraph k8t4p3.graph k8t4p3_step_5_data.i k8t4p3_step_5_data.j) 8 := by decide + +private theorem k8t4p3_local_5_bad : k8t4p3_step_5_data.bad.Check (freshGraph k8t4p3.graph k8t4p3_step_5_data.i k8t4p3_step_5_data.j) k8t4p3_local_5 8 4 := by decide + +private theorem k8t4p3_step_5_check : k8t4p3_step_5.Check k8t4p3.graph k8t4p3_state_5 8 4 := by + change k8t4p3_step_5_data.Check k8t4p3.graph k8t4p3_state_5 8 4 + refine ⟨by decide, k8t4p3_local_5_paths, ?_⟩ + rw [k8t4p3_local_5_eq] + exact k8t4p3_local_5_bad + +private theorem k8t4p3_update_5 : k8t4p3_step_5.apply k8t4p3_state_5 = k8t4p3_state_6 := by + have h : ∀ i j : Fin 7, k8t4p3_step_5.apply k8t4p3_state_5 i j = k8t4p3_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p3_state_7 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p3_local_6 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_local_6_eq_row_0 : ∀ j : Fin 7, (fun a b => k8t4p3_state_6 a b ∪ requiredMatrix 8 k8t4p3_step_6_data.required a b) 0 j = k8t4p3_local_6 0 j := by decide + +private theorem k8t4p3_local_6_eq_row_1 : ∀ j : Fin 7, (fun a b => k8t4p3_state_6 a b ∪ requiredMatrix 8 k8t4p3_step_6_data.required a b) 1 j = k8t4p3_local_6 1 j := by decide + +private theorem k8t4p3_local_6_eq_row_2 : ∀ j : Fin 7, (fun a b => k8t4p3_state_6 a b ∪ requiredMatrix 8 k8t4p3_step_6_data.required a b) 2 j = k8t4p3_local_6 2 j := by decide + +private theorem k8t4p3_local_6_eq_row_3 : ∀ j : Fin 7, (fun a b => k8t4p3_state_6 a b ∪ requiredMatrix 8 k8t4p3_step_6_data.required a b) 3 j = k8t4p3_local_6 3 j := by decide + +private theorem k8t4p3_local_6_eq_row_4 : ∀ j : Fin 7, (fun a b => k8t4p3_state_6 a b ∪ requiredMatrix 8 k8t4p3_step_6_data.required a b) 4 j = k8t4p3_local_6 4 j := by decide + +private theorem k8t4p3_local_6_eq_row_5 : ∀ j : Fin 7, (fun a b => k8t4p3_state_6 a b ∪ requiredMatrix 8 k8t4p3_step_6_data.required a b) 5 j = k8t4p3_local_6 5 j := by decide + +private theorem k8t4p3_local_6_eq_row_6 : ∀ j : Fin 7, (fun a b => k8t4p3_state_6 a b ∪ requiredMatrix 8 k8t4p3_step_6_data.required a b) 6 j = k8t4p3_local_6 6 j := by decide + +private theorem k8t4p3_local_6_eq : (fun a b => k8t4p3_state_6 a b ∪ requiredMatrix 8 k8t4p3_step_6_data.required a b) = k8t4p3_local_6 := by + funext i j + fin_cases i + + · exact k8t4p3_local_6_eq_row_0 j + + · exact k8t4p3_local_6_eq_row_1 j + + · exact k8t4p3_local_6_eq_row_2 j + + · exact k8t4p3_local_6_eq_row_3 j + + · exact k8t4p3_local_6_eq_row_4 j + + · exact k8t4p3_local_6_eq_row_5 j + + · exact k8t4p3_local_6_eq_row_6 j + +private theorem k8t4p3_local_6_paths : ∀ p ∈ k8t4p3_step_6_data.required, p.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_6_data.i k8t4p3_step_6_data.j) 8 := by decide + +private theorem k8t4p3_local_6_bad : k8t4p3_step_6_data.bad.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_6_data.i k8t4p3_step_6_data.j) k8t4p3_local_6 8 4 := by decide + +private theorem k8t4p3_step_6_check : k8t4p3_step_6.Check k8t4p3.graph k8t4p3_state_6 8 4 := by + change k8t4p3_step_6_data.Check k8t4p3.graph k8t4p3_state_6 8 4 + refine ⟨k8t4p3_local_6_paths, ?_⟩ + rw [k8t4p3_local_6_eq] + exact k8t4p3_local_6_bad + +private theorem k8t4p3_update_6 : k8t4p3_step_6.apply k8t4p3_state_6 = k8t4p3_state_7 := by + have h : ∀ i j : Fin 7, k8t4p3_step_6.apply k8t4p3_state_6 i j = k8t4p3_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p3_state_8 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p3_local_7 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2}, ∅, ∅, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[∅, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[∅, Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, ∅], + #[{1, 2}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 6, ∅], + #[∅, Finset.Icc 0 5, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[{1, 2}, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_local_7_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_7 a b ∪ requiredMatrix 8 k8t4p3_step_7_data.required a b) 0 j = k8t4p3_local_7 0 j := by decide + +private theorem k8t4p3_local_7_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_7 a b ∪ requiredMatrix 8 k8t4p3_step_7_data.required a b) 1 j = k8t4p3_local_7 1 j := by decide + +private theorem k8t4p3_local_7_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_7 a b ∪ requiredMatrix 8 k8t4p3_step_7_data.required a b) 2 j = k8t4p3_local_7 2 j := by decide + +private theorem k8t4p3_local_7_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_7 a b ∪ requiredMatrix 8 k8t4p3_step_7_data.required a b) 3 j = k8t4p3_local_7 3 j := by decide + +private theorem k8t4p3_local_7_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_7 a b ∪ requiredMatrix 8 k8t4p3_step_7_data.required a b) 4 j = k8t4p3_local_7 4 j := by decide + +private theorem k8t4p3_local_7_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_7 a b ∪ requiredMatrix 8 k8t4p3_step_7_data.required a b) 5 j = k8t4p3_local_7 5 j := by decide + +private theorem k8t4p3_local_7_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_7 a b ∪ requiredMatrix 8 k8t4p3_step_7_data.required a b) 6 j = k8t4p3_local_7 6 j := by decide + +private theorem k8t4p3_local_7_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_7 a b ∪ requiredMatrix 8 k8t4p3_step_7_data.required a b) 7 j = k8t4p3_local_7 7 j := by decide + +private theorem k8t4p3_local_7_eq : (fun a b => freshMatrix k8t4p3_state_7 a b ∪ requiredMatrix 8 k8t4p3_step_7_data.required a b) = k8t4p3_local_7 := by + funext i j + fin_cases i + + · exact k8t4p3_local_7_eq_row_0 j + + · exact k8t4p3_local_7_eq_row_1 j + + · exact k8t4p3_local_7_eq_row_2 j + + · exact k8t4p3_local_7_eq_row_3 j + + · exact k8t4p3_local_7_eq_row_4 j + + · exact k8t4p3_local_7_eq_row_5 j + + · exact k8t4p3_local_7_eq_row_6 j + + · exact k8t4p3_local_7_eq_row_7 j + +private theorem k8t4p3_local_7_paths : ∀ p ∈ k8t4p3_step_7_data.required, p.Check (freshGraph k8t4p3.graph k8t4p3_step_7_data.i k8t4p3_step_7_data.j) 8 := by decide + +private theorem k8t4p3_local_7_bad : k8t4p3_step_7_data.bad.Check (freshGraph k8t4p3.graph k8t4p3_step_7_data.i k8t4p3_step_7_data.j) k8t4p3_local_7 8 4 := by decide + +private theorem k8t4p3_step_7_check : k8t4p3_step_7.Check k8t4p3.graph k8t4p3_state_7 8 4 := by + change k8t4p3_step_7_data.Check k8t4p3.graph k8t4p3_state_7 8 4 + refine ⟨by decide, k8t4p3_local_7_paths, ?_⟩ + rw [k8t4p3_local_7_eq] + exact k8t4p3_local_7_bad + +private theorem k8t4p3_update_7 : k8t4p3_step_7.apply k8t4p3_state_7 = k8t4p3_state_8 := by + have h : ∀ i j : Fin 7, k8t4p3_step_7.apply k8t4p3_state_7 i j = k8t4p3_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p3_state_9 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 0 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p3_local_8 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_local_8_eq_row_0 : ∀ j : Fin 7, (fun a b => k8t4p3_state_8 a b ∪ requiredMatrix 8 k8t4p3_step_8_data.required a b) 0 j = k8t4p3_local_8 0 j := by decide + +private theorem k8t4p3_local_8_eq_row_1 : ∀ j : Fin 7, (fun a b => k8t4p3_state_8 a b ∪ requiredMatrix 8 k8t4p3_step_8_data.required a b) 1 j = k8t4p3_local_8 1 j := by decide + +private theorem k8t4p3_local_8_eq_row_2 : ∀ j : Fin 7, (fun a b => k8t4p3_state_8 a b ∪ requiredMatrix 8 k8t4p3_step_8_data.required a b) 2 j = k8t4p3_local_8 2 j := by decide + +private theorem k8t4p3_local_8_eq_row_3 : ∀ j : Fin 7, (fun a b => k8t4p3_state_8 a b ∪ requiredMatrix 8 k8t4p3_step_8_data.required a b) 3 j = k8t4p3_local_8 3 j := by decide + +private theorem k8t4p3_local_8_eq_row_4 : ∀ j : Fin 7, (fun a b => k8t4p3_state_8 a b ∪ requiredMatrix 8 k8t4p3_step_8_data.required a b) 4 j = k8t4p3_local_8 4 j := by decide + +private theorem k8t4p3_local_8_eq_row_5 : ∀ j : Fin 7, (fun a b => k8t4p3_state_8 a b ∪ requiredMatrix 8 k8t4p3_step_8_data.required a b) 5 j = k8t4p3_local_8 5 j := by decide + +private theorem k8t4p3_local_8_eq_row_6 : ∀ j : Fin 7, (fun a b => k8t4p3_state_8 a b ∪ requiredMatrix 8 k8t4p3_step_8_data.required a b) 6 j = k8t4p3_local_8 6 j := by decide + +private theorem k8t4p3_local_8_eq : (fun a b => k8t4p3_state_8 a b ∪ requiredMatrix 8 k8t4p3_step_8_data.required a b) = k8t4p3_local_8 := by + funext i j + fin_cases i + + · exact k8t4p3_local_8_eq_row_0 j + + · exact k8t4p3_local_8_eq_row_1 j + + · exact k8t4p3_local_8_eq_row_2 j + + · exact k8t4p3_local_8_eq_row_3 j + + · exact k8t4p3_local_8_eq_row_4 j + + · exact k8t4p3_local_8_eq_row_5 j + + · exact k8t4p3_local_8_eq_row_6 j + +private theorem k8t4p3_local_8_paths : ∀ p ∈ k8t4p3_step_8_data.required, p.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_8_data.i k8t4p3_step_8_data.j) 8 := by decide + +private theorem k8t4p3_local_8_bad : k8t4p3_step_8_data.bad.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_8_data.i k8t4p3_step_8_data.j) k8t4p3_local_8 8 4 := by decide + +private theorem k8t4p3_step_8_check : k8t4p3_step_8.Check k8t4p3.graph k8t4p3_state_8 8 4 := by + change k8t4p3_step_8_data.Check k8t4p3.graph k8t4p3_state_8 8 4 + refine ⟨k8t4p3_local_8_paths, ?_⟩ + rw [k8t4p3_local_8_eq] + exact k8t4p3_local_8_bad + +private theorem k8t4p3_update_8 : k8t4p3_step_8.apply k8t4p3_state_8 = k8t4p3_state_9 := by + have h : ∀ i j : Fin 7, k8t4p3_step_8.apply k8t4p3_state_8 i j = k8t4p3_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p3_state_10 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 0 6, Finset.Icc 1 6, ∅, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p3_local_9 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[Finset.Icc 1 7, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 0 6, Finset.Icc 1 6, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_local_9_eq_row_0 : ∀ j : Fin 7, (fun a b => k8t4p3_state_9 a b ∪ requiredMatrix 8 k8t4p3_step_9_data.required a b) 0 j = k8t4p3_local_9 0 j := by decide + +private theorem k8t4p3_local_9_eq_row_1 : ∀ j : Fin 7, (fun a b => k8t4p3_state_9 a b ∪ requiredMatrix 8 k8t4p3_step_9_data.required a b) 1 j = k8t4p3_local_9 1 j := by decide + +private theorem k8t4p3_local_9_eq_row_2 : ∀ j : Fin 7, (fun a b => k8t4p3_state_9 a b ∪ requiredMatrix 8 k8t4p3_step_9_data.required a b) 2 j = k8t4p3_local_9 2 j := by decide + +private theorem k8t4p3_local_9_eq_row_3 : ∀ j : Fin 7, (fun a b => k8t4p3_state_9 a b ∪ requiredMatrix 8 k8t4p3_step_9_data.required a b) 3 j = k8t4p3_local_9 3 j := by decide + +private theorem k8t4p3_local_9_eq_row_4 : ∀ j : Fin 7, (fun a b => k8t4p3_state_9 a b ∪ requiredMatrix 8 k8t4p3_step_9_data.required a b) 4 j = k8t4p3_local_9 4 j := by decide + +private theorem k8t4p3_local_9_eq_row_5 : ∀ j : Fin 7, (fun a b => k8t4p3_state_9 a b ∪ requiredMatrix 8 k8t4p3_step_9_data.required a b) 5 j = k8t4p3_local_9 5 j := by decide + +private theorem k8t4p3_local_9_eq_row_6 : ∀ j : Fin 7, (fun a b => k8t4p3_state_9 a b ∪ requiredMatrix 8 k8t4p3_step_9_data.required a b) 6 j = k8t4p3_local_9 6 j := by decide + +private theorem k8t4p3_local_9_eq : (fun a b => k8t4p3_state_9 a b ∪ requiredMatrix 8 k8t4p3_step_9_data.required a b) = k8t4p3_local_9 := by + funext i j + fin_cases i + + · exact k8t4p3_local_9_eq_row_0 j + + · exact k8t4p3_local_9_eq_row_1 j + + · exact k8t4p3_local_9_eq_row_2 j + + · exact k8t4p3_local_9_eq_row_3 j + + · exact k8t4p3_local_9_eq_row_4 j + + · exact k8t4p3_local_9_eq_row_5 j + + · exact k8t4p3_local_9_eq_row_6 j + +private theorem k8t4p3_local_9_paths : ∀ p ∈ k8t4p3_step_9_data.required, p.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_9_data.i k8t4p3_step_9_data.j) 8 := by decide + +private theorem k8t4p3_local_9_bad : k8t4p3_step_9_data.bad.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_9_data.i k8t4p3_step_9_data.j) k8t4p3_local_9 8 4 := by decide + +private theorem k8t4p3_step_9_check : k8t4p3_step_9.Check k8t4p3.graph k8t4p3_state_9 8 4 := by + change k8t4p3_step_9_data.Check k8t4p3.graph k8t4p3_state_9 8 4 + refine ⟨k8t4p3_local_9_paths, ?_⟩ + rw [k8t4p3_local_9_eq] + exact k8t4p3_local_9_bad + +private theorem k8t4p3_update_9 : k8t4p3_step_9.apply k8t4p3_state_9 = k8t4p3_state_10 := by + have h : ∀ i j : Fin 7, k8t4p3_step_9.apply k8t4p3_state_9 i j = k8t4p3_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p3_state_11 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 0 6, Finset.Icc 1 6, ∅, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p3_local_10 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅, {1, 2, 3}, ∅, ∅], + #[Finset.Icc 1 4, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[∅, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 4, Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5, 6}, ∅], + #[{1, 2, 3}, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {1}], + #[∅, Finset.Icc 0 6, Finset.Icc 1 6, ∅, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3}, {1, 2, 3}, ∅, ∅, {1}, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_local_10_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_10 a b ∪ requiredMatrix 8 k8t4p3_step_10_data.required a b) 0 j = k8t4p3_local_10 0 j := by decide + +private theorem k8t4p3_local_10_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_10 a b ∪ requiredMatrix 8 k8t4p3_step_10_data.required a b) 1 j = k8t4p3_local_10 1 j := by decide + +private theorem k8t4p3_local_10_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_10 a b ∪ requiredMatrix 8 k8t4p3_step_10_data.required a b) 2 j = k8t4p3_local_10 2 j := by decide + +private theorem k8t4p3_local_10_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_10 a b ∪ requiredMatrix 8 k8t4p3_step_10_data.required a b) 3 j = k8t4p3_local_10 3 j := by decide + +private theorem k8t4p3_local_10_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_10 a b ∪ requiredMatrix 8 k8t4p3_step_10_data.required a b) 4 j = k8t4p3_local_10 4 j := by decide + +private theorem k8t4p3_local_10_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_10 a b ∪ requiredMatrix 8 k8t4p3_step_10_data.required a b) 5 j = k8t4p3_local_10 5 j := by decide + +private theorem k8t4p3_local_10_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_10 a b ∪ requiredMatrix 8 k8t4p3_step_10_data.required a b) 6 j = k8t4p3_local_10 6 j := by decide + +private theorem k8t4p3_local_10_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_10 a b ∪ requiredMatrix 8 k8t4p3_step_10_data.required a b) 7 j = k8t4p3_local_10 7 j := by decide + +private theorem k8t4p3_local_10_eq : (fun a b => freshMatrix k8t4p3_state_10 a b ∪ requiredMatrix 8 k8t4p3_step_10_data.required a b) = k8t4p3_local_10 := by + funext i j + fin_cases i + + · exact k8t4p3_local_10_eq_row_0 j + + · exact k8t4p3_local_10_eq_row_1 j + + · exact k8t4p3_local_10_eq_row_2 j + + · exact k8t4p3_local_10_eq_row_3 j + + · exact k8t4p3_local_10_eq_row_4 j + + · exact k8t4p3_local_10_eq_row_5 j + + · exact k8t4p3_local_10_eq_row_6 j + + · exact k8t4p3_local_10_eq_row_7 j + +private theorem k8t4p3_local_10_paths : ∀ p ∈ k8t4p3_step_10_data.required, p.Check (freshGraph k8t4p3.graph k8t4p3_step_10_data.i k8t4p3_step_10_data.j) 8 := by decide + +private theorem k8t4p3_local_10_bad : k8t4p3_step_10_data.bad.Check (freshGraph k8t4p3.graph k8t4p3_step_10_data.i k8t4p3_step_10_data.j) k8t4p3_local_10 8 4 := by decide + +private theorem k8t4p3_step_10_check : k8t4p3_step_10.Check k8t4p3.graph k8t4p3_state_10 8 4 := by + change k8t4p3_step_10_data.Check k8t4p3.graph k8t4p3_state_10 8 4 + refine ⟨by decide, k8t4p3_local_10_paths, ?_⟩ + rw [k8t4p3_local_10_eq] + exact k8t4p3_local_10_bad + +private theorem k8t4p3_update_10 : k8t4p3_step_10.apply k8t4p3_state_10 = k8t4p3_state_11 := by + have h : ∀ i j : Fin 7, k8t4p3_step_10.apply k8t4p3_state_10 i j = k8t4p3_state_11 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p3_state_12 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {0}], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 0 6, Finset.Icc 1 6, ∅, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, {0}, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p3_local_11 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 6, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 6, ∅, Finset.Icc 1 4, Finset.Icc 0 6, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 0 6, Finset.Icc 1 6, ∅, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_local_11_eq_row_0 : ∀ j : Fin 7, (fun a b => k8t4p3_state_11 a b ∪ requiredMatrix 8 k8t4p3_step_11_data.required a b) 0 j = k8t4p3_local_11 0 j := by decide + +private theorem k8t4p3_local_11_eq_row_1 : ∀ j : Fin 7, (fun a b => k8t4p3_state_11 a b ∪ requiredMatrix 8 k8t4p3_step_11_data.required a b) 1 j = k8t4p3_local_11 1 j := by decide + +private theorem k8t4p3_local_11_eq_row_2 : ∀ j : Fin 7, (fun a b => k8t4p3_state_11 a b ∪ requiredMatrix 8 k8t4p3_step_11_data.required a b) 2 j = k8t4p3_local_11 2 j := by decide + +private theorem k8t4p3_local_11_eq_row_3 : ∀ j : Fin 7, (fun a b => k8t4p3_state_11 a b ∪ requiredMatrix 8 k8t4p3_step_11_data.required a b) 3 j = k8t4p3_local_11 3 j := by decide + +private theorem k8t4p3_local_11_eq_row_4 : ∀ j : Fin 7, (fun a b => k8t4p3_state_11 a b ∪ requiredMatrix 8 k8t4p3_step_11_data.required a b) 4 j = k8t4p3_local_11 4 j := by decide + +private theorem k8t4p3_local_11_eq_row_5 : ∀ j : Fin 7, (fun a b => k8t4p3_state_11 a b ∪ requiredMatrix 8 k8t4p3_step_11_data.required a b) 5 j = k8t4p3_local_11 5 j := by decide + +private theorem k8t4p3_local_11_eq_row_6 : ∀ j : Fin 7, (fun a b => k8t4p3_state_11 a b ∪ requiredMatrix 8 k8t4p3_step_11_data.required a b) 6 j = k8t4p3_local_11 6 j := by decide + +private theorem k8t4p3_local_11_eq : (fun a b => k8t4p3_state_11 a b ∪ requiredMatrix 8 k8t4p3_step_11_data.required a b) = k8t4p3_local_11 := by + funext i j + fin_cases i + + · exact k8t4p3_local_11_eq_row_0 j + + · exact k8t4p3_local_11_eq_row_1 j + + · exact k8t4p3_local_11_eq_row_2 j + + · exact k8t4p3_local_11_eq_row_3 j + + · exact k8t4p3_local_11_eq_row_4 j + + · exact k8t4p3_local_11_eq_row_5 j + + · exact k8t4p3_local_11_eq_row_6 j + +private theorem k8t4p3_local_11_paths : ∀ p ∈ k8t4p3_step_11_data.required, p.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_11_data.i k8t4p3_step_11_data.j) 8 := by decide + +private theorem k8t4p3_local_11_bad : k8t4p3_step_11_data.bad.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_11_data.i k8t4p3_step_11_data.j) k8t4p3_local_11 8 4 := by decide + +private theorem k8t4p3_step_11_check : k8t4p3_step_11.Check k8t4p3.graph k8t4p3_state_11 8 4 := by + change k8t4p3_step_11_data.Check k8t4p3.graph k8t4p3_state_11 8 4 + refine ⟨k8t4p3_local_11_paths, ?_⟩ + rw [k8t4p3_local_11_eq] + exact k8t4p3_local_11_bad + +private theorem k8t4p3_update_11 : k8t4p3_step_11.apply k8t4p3_state_11 = k8t4p3_state_12 := by + have h : ∀ i j : Fin 7, k8t4p3_step_11.apply k8t4p3_state_11 i j = k8t4p3_state_12 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p3_state_13 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {0, 1}], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 0 6, Finset.Icc 1 6, ∅, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, {0, 1}, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p3_local_12 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 6, {1, 2}, ∅, {1, 2}, {1, 2}, ∅], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[Finset.Icc 1 6, Finset.Icc 1 7, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[{1, 2}, Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {0}], + #[{1, 2}, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[{1, 2}, Finset.Icc 0 6, Finset.Icc 1 6, ∅, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3}, {1, 2, 3}, ∅, {0}, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_local_12_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_12 a b ∪ requiredMatrix 8 k8t4p3_step_12_data.required a b) 0 j = k8t4p3_local_12 0 j := by decide + +private theorem k8t4p3_local_12_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_12 a b ∪ requiredMatrix 8 k8t4p3_step_12_data.required a b) 1 j = k8t4p3_local_12 1 j := by decide + +private theorem k8t4p3_local_12_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_12 a b ∪ requiredMatrix 8 k8t4p3_step_12_data.required a b) 2 j = k8t4p3_local_12 2 j := by decide + +private theorem k8t4p3_local_12_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_12 a b ∪ requiredMatrix 8 k8t4p3_step_12_data.required a b) 3 j = k8t4p3_local_12 3 j := by decide + +private theorem k8t4p3_local_12_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_12 a b ∪ requiredMatrix 8 k8t4p3_step_12_data.required a b) 4 j = k8t4p3_local_12 4 j := by decide + +private theorem k8t4p3_local_12_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_12 a b ∪ requiredMatrix 8 k8t4p3_step_12_data.required a b) 5 j = k8t4p3_local_12 5 j := by decide + +private theorem k8t4p3_local_12_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_12 a b ∪ requiredMatrix 8 k8t4p3_step_12_data.required a b) 6 j = k8t4p3_local_12 6 j := by decide + +private theorem k8t4p3_local_12_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_12 a b ∪ requiredMatrix 8 k8t4p3_step_12_data.required a b) 7 j = k8t4p3_local_12 7 j := by decide + +private theorem k8t4p3_local_12_eq : (fun a b => freshMatrix k8t4p3_state_12 a b ∪ requiredMatrix 8 k8t4p3_step_12_data.required a b) = k8t4p3_local_12 := by + funext i j + fin_cases i + + · exact k8t4p3_local_12_eq_row_0 j + + · exact k8t4p3_local_12_eq_row_1 j + + · exact k8t4p3_local_12_eq_row_2 j + + · exact k8t4p3_local_12_eq_row_3 j + + · exact k8t4p3_local_12_eq_row_4 j + + · exact k8t4p3_local_12_eq_row_5 j + + · exact k8t4p3_local_12_eq_row_6 j + + · exact k8t4p3_local_12_eq_row_7 j + +private theorem k8t4p3_local_12_paths : ∀ p ∈ k8t4p3_step_12_data.required, p.Check (freshGraph k8t4p3.graph k8t4p3_step_12_data.i k8t4p3_step_12_data.j) 8 := by decide + +private theorem k8t4p3_local_12_bad : k8t4p3_step_12_data.bad.Check (freshGraph k8t4p3.graph k8t4p3_step_12_data.i k8t4p3_step_12_data.j) k8t4p3_local_12 8 4 := by decide + +private theorem k8t4p3_step_12_check : k8t4p3_step_12.Check k8t4p3.graph k8t4p3_state_12 8 4 := by + change k8t4p3_step_12_data.Check k8t4p3.graph k8t4p3_state_12 8 4 + refine ⟨by decide, k8t4p3_local_12_paths, ?_⟩ + rw [k8t4p3_local_12_eq] + exact k8t4p3_local_12_bad + +private theorem k8t4p3_update_12 : k8t4p3_step_12.apply k8t4p3_state_12 = k8t4p3_state_13 := by + have h : ∀ i j : Fin 7, k8t4p3_step_12.apply k8t4p3_state_12 i j = k8t4p3_state_13 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p3_state_14 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {0, 1}], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0}], + #[Finset.Icc 0 6, Finset.Icc 1 6, ∅, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, {0, 1}, {0}, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p3_local_13 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[Finset.Icc 1 7, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {0, 1}], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 0 6, Finset.Icc 1 6, ∅, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, {0, 1}, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_local_13_eq_row_0 : ∀ j : Fin 7, (fun a b => k8t4p3_state_13 a b ∪ requiredMatrix 8 k8t4p3_step_13_data.required a b) 0 j = k8t4p3_local_13 0 j := by decide + +private theorem k8t4p3_local_13_eq_row_1 : ∀ j : Fin 7, (fun a b => k8t4p3_state_13 a b ∪ requiredMatrix 8 k8t4p3_step_13_data.required a b) 1 j = k8t4p3_local_13 1 j := by decide + +private theorem k8t4p3_local_13_eq_row_2 : ∀ j : Fin 7, (fun a b => k8t4p3_state_13 a b ∪ requiredMatrix 8 k8t4p3_step_13_data.required a b) 2 j = k8t4p3_local_13 2 j := by decide + +private theorem k8t4p3_local_13_eq_row_3 : ∀ j : Fin 7, (fun a b => k8t4p3_state_13 a b ∪ requiredMatrix 8 k8t4p3_step_13_data.required a b) 3 j = k8t4p3_local_13 3 j := by decide + +private theorem k8t4p3_local_13_eq_row_4 : ∀ j : Fin 7, (fun a b => k8t4p3_state_13 a b ∪ requiredMatrix 8 k8t4p3_step_13_data.required a b) 4 j = k8t4p3_local_13 4 j := by decide + +private theorem k8t4p3_local_13_eq_row_5 : ∀ j : Fin 7, (fun a b => k8t4p3_state_13 a b ∪ requiredMatrix 8 k8t4p3_step_13_data.required a b) 5 j = k8t4p3_local_13 5 j := by decide + +private theorem k8t4p3_local_13_eq_row_6 : ∀ j : Fin 7, (fun a b => k8t4p3_state_13 a b ∪ requiredMatrix 8 k8t4p3_step_13_data.required a b) 6 j = k8t4p3_local_13 6 j := by decide + +private theorem k8t4p3_local_13_eq : (fun a b => k8t4p3_state_13 a b ∪ requiredMatrix 8 k8t4p3_step_13_data.required a b) = k8t4p3_local_13 := by + funext i j + fin_cases i + + · exact k8t4p3_local_13_eq_row_0 j + + · exact k8t4p3_local_13_eq_row_1 j + + · exact k8t4p3_local_13_eq_row_2 j + + · exact k8t4p3_local_13_eq_row_3 j + + · exact k8t4p3_local_13_eq_row_4 j + + · exact k8t4p3_local_13_eq_row_5 j + + · exact k8t4p3_local_13_eq_row_6 j + +private theorem k8t4p3_local_13_paths : ∀ p ∈ k8t4p3_step_13_data.required, p.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_13_data.i k8t4p3_step_13_data.j) 8 := by decide + +private theorem k8t4p3_local_13_bad : k8t4p3_step_13_data.bad.Check (addedEdgeGraph k8t4p3.graph k8t4p3_step_13_data.i k8t4p3_step_13_data.j) k8t4p3_local_13 8 4 := by decide + +private theorem k8t4p3_step_13_check : k8t4p3_step_13.Check k8t4p3.graph k8t4p3_state_13 8 4 := by + change k8t4p3_step_13_data.Check k8t4p3.graph k8t4p3_state_13 8 4 + refine ⟨k8t4p3_local_13_paths, ?_⟩ + rw [k8t4p3_local_13_eq] + exact k8t4p3_local_13_bad + +private theorem k8t4p3_update_13 : k8t4p3_step_13.apply k8t4p3_state_13 = k8t4p3_state_14 := by + have h : ∀ i j : Fin 7, k8t4p3_step_13.apply k8t4p3_state_13 i j = k8t4p3_state_14 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p3_state_15 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {0, 1}], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 1}], + #[Finset.Icc 0 6, Finset.Icc 1 6, ∅, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, ∅, {0, 1}, {0, 1}, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p3_local_14 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2}, ∅, ∅, {1, 2}, ∅, {1, 2}, ∅], + #[{1, 2}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[∅, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[∅, Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[{1, 2}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {0, 1}], + #[∅, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0}], + #[{1, 2}, Finset.Icc 0 6, Finset.Icc 1 6, ∅, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3}, {1, 2, 3}, ∅, {0, 1}, {0}, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p3_local_14_eq_row_0 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_14 a b ∪ requiredMatrix 8 k8t4p3_step_14_data.required a b) 0 j = k8t4p3_local_14 0 j := by decide + +private theorem k8t4p3_local_14_eq_row_1 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_14 a b ∪ requiredMatrix 8 k8t4p3_step_14_data.required a b) 1 j = k8t4p3_local_14 1 j := by decide + +private theorem k8t4p3_local_14_eq_row_2 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_14 a b ∪ requiredMatrix 8 k8t4p3_step_14_data.required a b) 2 j = k8t4p3_local_14 2 j := by decide + +private theorem k8t4p3_local_14_eq_row_3 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_14 a b ∪ requiredMatrix 8 k8t4p3_step_14_data.required a b) 3 j = k8t4p3_local_14 3 j := by decide + +private theorem k8t4p3_local_14_eq_row_4 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_14 a b ∪ requiredMatrix 8 k8t4p3_step_14_data.required a b) 4 j = k8t4p3_local_14 4 j := by decide + +private theorem k8t4p3_local_14_eq_row_5 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_14 a b ∪ requiredMatrix 8 k8t4p3_step_14_data.required a b) 5 j = k8t4p3_local_14 5 j := by decide + +private theorem k8t4p3_local_14_eq_row_6 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_14 a b ∪ requiredMatrix 8 k8t4p3_step_14_data.required a b) 6 j = k8t4p3_local_14 6 j := by decide + +private theorem k8t4p3_local_14_eq_row_7 : ∀ j : Fin 8, (fun a b => freshMatrix k8t4p3_state_14 a b ∪ requiredMatrix 8 k8t4p3_step_14_data.required a b) 7 j = k8t4p3_local_14 7 j := by decide + +private theorem k8t4p3_local_14_eq : (fun a b => freshMatrix k8t4p3_state_14 a b ∪ requiredMatrix 8 k8t4p3_step_14_data.required a b) = k8t4p3_local_14 := by + funext i j + fin_cases i + + · exact k8t4p3_local_14_eq_row_0 j + + · exact k8t4p3_local_14_eq_row_1 j + + · exact k8t4p3_local_14_eq_row_2 j + + · exact k8t4p3_local_14_eq_row_3 j + + · exact k8t4p3_local_14_eq_row_4 j + + · exact k8t4p3_local_14_eq_row_5 j + + · exact k8t4p3_local_14_eq_row_6 j + + · exact k8t4p3_local_14_eq_row_7 j + +private theorem k8t4p3_local_14_paths : ∀ p ∈ k8t4p3_step_14_data.required, p.Check (freshGraph k8t4p3.graph k8t4p3_step_14_data.i k8t4p3_step_14_data.j) 8 := by decide + +private theorem k8t4p3_local_14_bad : k8t4p3_step_14_data.bad.Check (freshGraph k8t4p3.graph k8t4p3_step_14_data.i k8t4p3_step_14_data.j) k8t4p3_local_14 8 4 := by decide + +private theorem k8t4p3_step_14_check : k8t4p3_step_14.Check k8t4p3.graph k8t4p3_state_14 8 4 := by + change k8t4p3_step_14_data.Check k8t4p3.graph k8t4p3_state_14 8 4 + refine ⟨by decide, k8t4p3_local_14_paths, ?_⟩ + rw [k8t4p3_local_14_eq] + exact k8t4p3_local_14_bad + +private theorem k8t4p3_update_14 : k8t4p3_step_14.apply k8t4p3_state_14 = k8t4p3_state_15 := by + have h : ∀ i j : Fin 7, k8t4p3_step_14.apply k8t4p3_state_14 i j = k8t4p3_state_15 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k8t4p3_closure_15 : ClosureCheck k8t4p3.graph k8t4p3_state_15 8 4 [] := by trivial + +private theorem k8t4p3_closure_14 : ClosureCheck k8t4p3.graph k8t4p3_state_14 8 4 [k8t4p3_step_14] := by + constructor + · exact k8t4p3_step_14_check + · rw [k8t4p3_update_14] + exact k8t4p3_closure_15 + +private theorem k8t4p3_closure_13 : ClosureCheck k8t4p3.graph k8t4p3_state_13 8 4 [k8t4p3_step_13, k8t4p3_step_14] := by + constructor + · exact k8t4p3_step_13_check + · rw [k8t4p3_update_13] + exact k8t4p3_closure_14 + +private theorem k8t4p3_closure_12 : ClosureCheck k8t4p3.graph k8t4p3_state_12 8 4 [k8t4p3_step_12, k8t4p3_step_13, k8t4p3_step_14] := by + constructor + · exact k8t4p3_step_12_check + · rw [k8t4p3_update_12] + exact k8t4p3_closure_13 + +private theorem k8t4p3_closure_11 : ClosureCheck k8t4p3.graph k8t4p3_state_11 8 4 [k8t4p3_step_11, k8t4p3_step_12, k8t4p3_step_13, k8t4p3_step_14] := by + constructor + · exact k8t4p3_step_11_check + · rw [k8t4p3_update_11] + exact k8t4p3_closure_12 + +private theorem k8t4p3_closure_10 : ClosureCheck k8t4p3.graph k8t4p3_state_10 8 4 [k8t4p3_step_10, k8t4p3_step_11, k8t4p3_step_12, k8t4p3_step_13, k8t4p3_step_14] := by + constructor + · exact k8t4p3_step_10_check + · rw [k8t4p3_update_10] + exact k8t4p3_closure_11 + +private theorem k8t4p3_closure_9 : ClosureCheck k8t4p3.graph k8t4p3_state_9 8 4 [k8t4p3_step_9, k8t4p3_step_10, k8t4p3_step_11, k8t4p3_step_12, k8t4p3_step_13, k8t4p3_step_14] := by + constructor + · exact k8t4p3_step_9_check + · rw [k8t4p3_update_9] + exact k8t4p3_closure_10 + +private theorem k8t4p3_closure_8 : ClosureCheck k8t4p3.graph k8t4p3_state_8 8 4 [k8t4p3_step_8, k8t4p3_step_9, k8t4p3_step_10, k8t4p3_step_11, k8t4p3_step_12, k8t4p3_step_13, k8t4p3_step_14] := by + constructor + · exact k8t4p3_step_8_check + · rw [k8t4p3_update_8] + exact k8t4p3_closure_9 + +private theorem k8t4p3_closure_7 : ClosureCheck k8t4p3.graph k8t4p3_state_7 8 4 [k8t4p3_step_7, k8t4p3_step_8, k8t4p3_step_9, k8t4p3_step_10, k8t4p3_step_11, k8t4p3_step_12, k8t4p3_step_13, k8t4p3_step_14] := by + constructor + · exact k8t4p3_step_7_check + · rw [k8t4p3_update_7] + exact k8t4p3_closure_8 + +private theorem k8t4p3_closure_6 : ClosureCheck k8t4p3.graph k8t4p3_state_6 8 4 [k8t4p3_step_6, k8t4p3_step_7, k8t4p3_step_8, k8t4p3_step_9, k8t4p3_step_10, k8t4p3_step_11, k8t4p3_step_12, k8t4p3_step_13, k8t4p3_step_14] := by + constructor + · exact k8t4p3_step_6_check + · rw [k8t4p3_update_6] + exact k8t4p3_closure_7 + +private theorem k8t4p3_closure_5 : ClosureCheck k8t4p3.graph k8t4p3_state_5 8 4 [k8t4p3_step_5, k8t4p3_step_6, k8t4p3_step_7, k8t4p3_step_8, k8t4p3_step_9, k8t4p3_step_10, k8t4p3_step_11, k8t4p3_step_12, k8t4p3_step_13, k8t4p3_step_14] := by + constructor + · exact k8t4p3_step_5_check + · rw [k8t4p3_update_5] + exact k8t4p3_closure_6 + +private theorem k8t4p3_closure_4 : ClosureCheck k8t4p3.graph k8t4p3_state_4 8 4 [k8t4p3_step_4, k8t4p3_step_5, k8t4p3_step_6, k8t4p3_step_7, k8t4p3_step_8, k8t4p3_step_9, k8t4p3_step_10, k8t4p3_step_11, k8t4p3_step_12, k8t4p3_step_13, k8t4p3_step_14] := by + constructor + · exact k8t4p3_step_4_check + · rw [k8t4p3_update_4] + exact k8t4p3_closure_5 + +private theorem k8t4p3_closure_3 : ClosureCheck k8t4p3.graph k8t4p3_state_3 8 4 [k8t4p3_step_3, k8t4p3_step_4, k8t4p3_step_5, k8t4p3_step_6, k8t4p3_step_7, k8t4p3_step_8, k8t4p3_step_9, k8t4p3_step_10, k8t4p3_step_11, k8t4p3_step_12, k8t4p3_step_13, k8t4p3_step_14] := by + constructor + · exact k8t4p3_step_3_check + · rw [k8t4p3_update_3] + exact k8t4p3_closure_4 + +private theorem k8t4p3_closure_2 : ClosureCheck k8t4p3.graph k8t4p3_state_2 8 4 [k8t4p3_step_2, k8t4p3_step_3, k8t4p3_step_4, k8t4p3_step_5, k8t4p3_step_6, k8t4p3_step_7, k8t4p3_step_8, k8t4p3_step_9, k8t4p3_step_10, k8t4p3_step_11, k8t4p3_step_12, k8t4p3_step_13, k8t4p3_step_14] := by + constructor + · exact k8t4p3_step_2_check + · rw [k8t4p3_update_2] + exact k8t4p3_closure_3 + +private theorem k8t4p3_closure_1 : ClosureCheck k8t4p3.graph k8t4p3_state_1 8 4 [k8t4p3_step_1, k8t4p3_step_2, k8t4p3_step_3, k8t4p3_step_4, k8t4p3_step_5, k8t4p3_step_6, k8t4p3_step_7, k8t4p3_step_8, k8t4p3_step_9, k8t4p3_step_10, k8t4p3_step_11, k8t4p3_step_12, k8t4p3_step_13, k8t4p3_step_14] := by + constructor + · exact k8t4p3_step_1_check + · rw [k8t4p3_update_1] + exact k8t4p3_closure_2 + +private theorem k8t4p3_closure_0 : ClosureCheck k8t4p3.graph k8t4p3_state_0 8 4 [k8t4p3_step_0, k8t4p3_step_1, k8t4p3_step_2, k8t4p3_step_3, k8t4p3_step_4, k8t4p3_step_5, k8t4p3_step_6, k8t4p3_step_7, k8t4p3_step_8, k8t4p3_step_9, k8t4p3_step_10, k8t4p3_step_11, k8t4p3_step_12, k8t4p3_step_13, k8t4p3_step_14] := by + constructor + · exact k8t4p3_step_0_check + · rw [k8t4p3_update_0] + exact k8t4p3_closure_1 + +private theorem k8t4p3_matrix_eq : k8t4p3.matrix 8 = k8t4p3_state_15 := by + change closureMatrix (k8t4p3.initialMatrix 8) _ = _ + rw [k8t4p3_initial_eq] + change closureMatrix k8t4p3_state_0 [k8t4p3_step_0, k8t4p3_step_1, k8t4p3_step_2, k8t4p3_step_3, k8t4p3_step_4, k8t4p3_step_5, k8t4p3_step_6, k8t4p3_step_7, k8t4p3_step_8, k8t4p3_step_9, k8t4p3_step_10, k8t4p3_step_11, k8t4p3_step_12, k8t4p3_step_13, k8t4p3_step_14] = _ + simp only [closureMatrix] + rw [k8t4p3_update_0, k8t4p3_update_1, k8t4p3_update_2, k8t4p3_update_3, k8t4p3_update_4, k8t4p3_update_5, k8t4p3_update_6, k8t4p3_update_7, k8t4p3_update_8, k8t4p3_update_9, k8t4p3_update_10, k8t4p3_update_11, k8t4p3_update_12, k8t4p3_update_13, k8t4p3_update_14] + +private theorem k8t4p3_part_0 : k8t4p3.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p3_part_1 : k8t4p3.chains.map List.length = ([[], [], [3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p3_part_2 : k8t4p3.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p3.clique))) = ([[], [], [3]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p3_templates_item_0 : (⟨0, 1, [], [], [], 4, 7⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_1 : (⟨0, 1, [[2, 3, 4, 5, 6]], [], [], 1, 2⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_2 : (⟨0, 2, [], [], [], 4, 7⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_3 : (⟨0, 2, [], [], [3, 4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_4 : (⟨0, 3, [], [], [2], 3, 6⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_5 : (⟨0, 3, [], [], [4, 5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_6 : (⟨0, 4, [], [], [3, 2], 2, 5⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_7 : (⟨0, 5, [], [], [4, 3, 2], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_8 : (⟨0, 5, [], [], [6], 3, 6⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_9 : (⟨0, 6, [], [], [5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_10 : (⟨1, 2, [], [], [3, 4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_11 : (⟨1, 3, [], [], [2], 3, 6⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_12 : (⟨1, 3, [], [], [4, 5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_13 : (⟨1, 4, [], [], [3, 2], 2, 5⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_14 : (⟨1, 5, [], [], [4, 3, 2], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_15 : (⟨1, 5, [], [], [6], 3, 6⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_16 : (⟨1, 6, [], [], [5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_17 : (⟨2, 3, [], [], [4, 5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_18 : (⟨2, 4, [], [], [5, 6], 2, 5⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_19 : (⟨3, 4, [], [2], [5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_20 : (⟨3, 5, [], [2], [6], 2, 5⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_21 : (⟨4, 5, [], [2, 3], [6], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_templates_item_22 : (⟨5, 6, [], [2, 3, 4], [], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p3_part_3 : ∀ T ∈ k8t4p3.templates, T.Check k8t4p3.graph k8t4p3.clique 8 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p3_templates_item_0, k8t4p3_templates_item_1, k8t4p3_templates_item_2, k8t4p3_templates_item_3, k8t4p3_templates_item_4, k8t4p3_templates_item_5, k8t4p3_templates_item_6, k8t4p3_templates_item_7, k8t4p3_templates_item_8, k8t4p3_templates_item_9, k8t4p3_templates_item_10, k8t4p3_templates_item_11, k8t4p3_templates_item_12, k8t4p3_templates_item_13, k8t4p3_templates_item_14, k8t4p3_templates_item_15, k8t4p3_templates_item_16, k8t4p3_templates_item_17, k8t4p3_templates_item_18, k8t4p3_templates_item_19, k8t4p3_templates_item_20, k8t4p3_templates_item_21, k8t4p3_templates_item_22⟩ + +private theorem k8t4p3_required_item_0 : (⟨3, 5, [4]⟩ : RequiredPathData (Fin 7)).Check k8t4p3.graph 8 := by decide + +private theorem k8t4p3_part_4 : ∀ p ∈ k8t4p3.required, p.Check k8t4p3.graph 8 := by + simp only [k8t4p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact k8t4p3_required_item_0 + +private theorem k8t4p3_part_5 : ClosureCheck k8t4p3.graph (k8t4p3.initialMatrix 8) 8 4 k8t4p3.closure := by + rw [k8t4p3_initial_eq] + exact k8t4p3_closure_0 + +private theorem k8t4p3_part_6 : k8t4p3.bad.Check k8t4p3.graph (k8t4p3.matrix 8) 8 4 := by + rw [k8t4p3_matrix_eq] + decide + +theorem k8t4p3_check : k8t4p3.Check 8 4 [[], [], [3]] := + ⟨k8t4p3_part_0, k8t4p3_part_1, k8t4p3_part_2, k8t4p3_part_3, k8t4p3_part_4, k8t4p3_part_5, k8t4p3_part_6⟩ +private def k8t4p4_step_0_data : EdgeAttachmentData 8 := ⟨4, 0, [⟨0, 1, [4, 3, 2]⟩, ⟨0, 5, [4, 3, 2, 1, 7, 6]⟩, ⟨0, 1, [4, 3, 2, 7]⟩, ⟨0, 1, [4, 5, 6, 7, 2]⟩, ⟨1, 5, [0, 4, 3, 2, 7, 6]⟩, ⟨1, 0, [2, 7, 6, 5, 4]⟩, ⟨3, 7, [2, 0, 4, 5, 6]⟩, ⟨3, 6, [2, 1, 0, 4, 5]⟩, ⟨3, 7, [2, 1, 0, 4, 5, 6]⟩, ⟨3, 6, [2, 1, 7, 0, 4, 5]⟩, ⟨3, 5, [4, 0, 1, 2, 7, 6]⟩], ⟨none, {(0, 3), (1, 3), (3, 3)}⟩⟩ + +private def k8t4p4_step_0 : ClosureStep 8 := .edge k8t4p4_step_0_data + +private def k8t4p4_step_1_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨4, 0, [3, 1, 2, 8, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 8, 7, 6, 5]⟩, ⟨4, 7, [3, 1, 0, 5, 6]⟩, ⟨4, 8, [3, 1, 0, 5, 6, 7]⟩, ⟨4, 2, [3, 1, 0, 5, 6, 7, 8]⟩, ⟨4, 0, [3, 2, 1]⟩, ⟨4, 7, [3, 2, 1, 0, 5, 6]⟩, ⟨4, 8, [3, 2, 1, 0, 5, 6, 7]⟩, ⟨4, 0, [3, 2, 8, 1]⟩, ⟨4, 6, [3, 2, 8, 1, 0, 5]⟩, ⟨4, 7, [3, 2, 8, 1, 0, 5, 6]⟩, ⟨4, 1, [3, 2, 8, 7, 6, 5, 0]⟩] + +private def k8t4p4_step_1_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨4, 0, [3, 8, 7, 6, 5]⟩, ⟨4, 6, [5, 0, 1, 2, 3, 8, 7]⟩, ⟨7, 0, [6, 5, 4, 3, 1]⟩, ⟨7, 0, [6, 5, 4, 3, 2, 1]⟩, ⟨7, 0, [6, 5, 4, 3, 2, 8, 1]⟩, ⟨7, 3, [6, 5, 0, 1, 2]⟩, ⟨7, 4, [6, 5, 0, 1, 2, 3]⟩, ⟨7, 3, [6, 5, 0, 1, 2, 8]⟩, ⟨7, 4, [6, 5, 0, 1, 2, 8, 3]⟩, ⟨7, 4, [6, 5, 0, 1, 3]⟩, ⟨0, 7, [1, 2, 3, 4, 5, 6]⟩, ⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩] + +private def k8t4p4_step_1_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 7, [1, 2, 3, 8]⟩, ⟨0, 5, [1, 2, 3, 8, 7, 6]⟩, ⟨0, 4, [1, 2, 3, 8, 7, 6, 5]⟩, ⟨0, 6, [1, 2, 8, 3, 4, 5]⟩, ⟨0, 7, [1, 2, 8, 3, 4, 5, 6]⟩, ⟨0, 7, [1, 2, 8]⟩, ⟨0, 4, [1, 2, 8, 7, 6, 5]⟩, ⟨0, 3, [1, 2, 8, 7, 6, 5, 4]⟩, ⟨0, 7, [1, 3, 4, 5, 6]⟩, ⟨0, 8, [1, 3, 4, 5, 6, 7]⟩, ⟨0, 2, [1, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 7, [1, 8]⟩] + +private def k8t4p4_step_1_required_block_3 : List (RequiredPathData (Fin 9)) := [⟨0, 3, [1, 8, 7, 6, 5, 4]⟩, ⟨0, 6, [5, 4, 3, 1, 2, 8, 7]⟩, ⟨0, 2, [5, 6, 7, 8, 1, 3]⟩, ⟨0, 1, [5, 6, 7, 8, 2, 3]⟩] + +private def k8t4p4_step_1_data : FreshAttachmentData 8 := ⟨4, 0, k8t4p4_step_1_required_block_0 ++ k8t4p4_step_1_required_block_1 ++ k8t4p4_step_1_required_block_2 ++ k8t4p4_step_1_required_block_3, ⟨none, {(4, 2), (0, 2), (7, 3)}⟩⟩ + +private def k8t4p4_step_1 : ClosureStep 8 := .fresh k8t4p4_step_1_data + +private def k8t4p4_step_2_data : EdgeAttachmentData 8 := ⟨4, 1, [⟨0, 5, [1, 4, 3, 2, 7, 6]⟩, ⟨0, 1, [2, 7, 6, 5, 4]⟩, ⟨1, 0, [4, 3, 2]⟩, ⟨1, 5, [4, 3, 2, 0, 7, 6]⟩, ⟨1, 0, [4, 3, 2, 7]⟩, ⟨1, 0, [4, 5, 6, 7, 2]⟩, ⟨3, 6, [2, 0, 1, 4, 5]⟩, ⟨3, 7, [2, 0, 1, 4, 5, 6]⟩, ⟨3, 6, [2, 0, 7, 1, 4, 5]⟩, ⟨3, 7, [2, 1, 4, 5, 6]⟩, ⟨3, 5, [4, 1, 0, 2, 7, 6]⟩], ⟨none, {(1, 3), (0, 3), (3, 3)}⟩⟩ + +private def k8t4p4_step_2 : ClosureStep 8 := .edge k8t4p4_step_2_data + +private def k8t4p4_step_3_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨4, 0, [3, 1, 2, 8, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 2]⟩, ⟨4, 7, [3, 1, 2, 0, 5, 6]⟩, ⟨4, 8, [3, 1, 2, 0, 5, 6, 7]⟩, ⟨4, 0, [3, 1, 8, 2]⟩, ⟨4, 6, [3, 1, 8, 2, 0, 5]⟩, ⟨4, 7, [3, 1, 8, 2, 0, 5, 6]⟩, ⟨4, 0, [3, 1, 8, 7, 6, 5]⟩, ⟨4, 2, [3, 1, 8, 7, 6, 5, 0]⟩, ⟨4, 7, [3, 2, 0, 5, 6]⟩, ⟨4, 8, [3, 2, 0, 5, 6, 7]⟩, ⟨4, 1, [3, 2, 0, 5, 6, 7, 8]⟩] + +private def k8t4p4_step_3_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨4, 0, [3, 8, 7, 6, 5]⟩, ⟨4, 6, [5, 0, 2, 1, 3, 8, 7]⟩, ⟨7, 0, [6, 5, 4, 3, 1, 2]⟩, ⟨7, 0, [6, 5, 4, 3, 1, 8, 2]⟩, ⟨7, 0, [6, 5, 4, 3, 2]⟩, ⟨7, 3, [6, 5, 0, 2, 1]⟩, ⟨7, 4, [6, 5, 0, 2, 1, 3]⟩, ⟨7, 3, [6, 5, 0, 2, 1, 8]⟩, ⟨7, 4, [6, 5, 0, 2, 1, 8, 3]⟩, ⟨7, 4, [6, 5, 0, 2, 3]⟩, ⟨0, 7, [2, 1, 3, 4, 5, 6]⟩, ⟨0, 8, [2, 1, 3, 4, 5, 6, 7]⟩] + +private def k8t4p4_step_3_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 7, [2, 1, 3, 8]⟩, ⟨0, 5, [2, 1, 3, 8, 7, 6]⟩, ⟨0, 4, [2, 1, 3, 8, 7, 6, 5]⟩, ⟨0, 6, [2, 1, 8, 3, 4, 5]⟩, ⟨0, 7, [2, 1, 8, 3, 4, 5, 6]⟩, ⟨0, 7, [2, 1, 8]⟩, ⟨0, 4, [2, 1, 8, 7, 6, 5]⟩, ⟨0, 3, [2, 1, 8, 7, 6, 5, 4]⟩, ⟨0, 7, [2, 3, 4, 5, 6]⟩, ⟨0, 8, [2, 3, 4, 5, 6, 7]⟩, ⟨0, 1, [2, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 7, [2, 8]⟩] + +private def k8t4p4_step_3_required_block_3 : List (RequiredPathData (Fin 9)) := [⟨0, 3, [2, 8, 7, 6, 5, 4]⟩, ⟨0, 6, [5, 4, 3, 1, 2, 8, 7]⟩, ⟨0, 2, [5, 6, 7, 8, 1, 3]⟩, ⟨0, 1, [5, 6, 7, 8, 2, 3]⟩] + +private def k8t4p4_step_3_data : FreshAttachmentData 8 := ⟨4, 1, k8t4p4_step_3_required_block_0 ++ k8t4p4_step_3_required_block_1 ++ k8t4p4_step_3_required_block_2 ++ k8t4p4_step_3_required_block_3, ⟨none, {(4, 2), (0, 2), (7, 3)}⟩⟩ + +private def k8t4p4_step_3 : ClosureStep 8 := .fresh k8t4p4_step_3_data + +private def k8t4p4_step_4_data : EdgeAttachmentData 8 := ⟨5, 0, [⟨0, 1, [5, 4, 3, 2]⟩, ⟨0, 1, [5, 4, 3, 2, 7]⟩, ⟨0, 1, [5, 6, 7]⟩, ⟨0, 4, [5, 6, 7, 1, 2, 3]⟩, ⟨1, 4, [0, 5, 6, 7, 2, 3]⟩, ⟨1, 0, [7, 2, 3, 4, 5]⟩, ⟨6, 3, [5, 0, 1, 7, 2]⟩, ⟨6, 4, [5, 0, 1, 7, 2, 3]⟩, ⟨6, 2, [7, 0, 5, 4, 3]⟩, ⟨6, 2, [7, 1, 0, 5, 4, 3]⟩, ⟨6, 3, [7, 1, 2, 0, 5, 4]⟩], ⟨none, {(0, 3), (1, 3), (6, 3)}⟩⟩ + +private def k8t4p4_step_4 : ClosureStep 8 := .edge k8t4p4_step_4_data + +private def k8t4p4_step_5_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨4, 0, [3, 1, 2, 8, 7, 6]⟩, ⟨4, 0, [3, 1, 8, 7, 6]⟩, ⟨4, 8, [3, 1, 0, 6, 7]⟩, ⟨4, 7, [3, 2, 1, 0, 6]⟩, ⟨4, 8, [3, 2, 1, 0, 6, 7]⟩, ⟨4, 7, [3, 2, 8, 1, 0, 6]⟩, ⟨4, 0, [5, 6, 7, 8, 2, 3, 1]⟩, ⟨4, 7, [5, 6, 0, 1, 2, 3, 8]⟩, ⟨7, 0, [6, 5, 4, 3, 1]⟩, ⟨7, 0, [6, 5, 4, 3, 2, 1]⟩, ⟨7, 0, [6, 5, 4, 3, 2, 8, 1]⟩, ⟨7, 4, [6, 0, 1, 2, 3]⟩] + +private def k8t4p4_step_5_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨7, 5, [6, 0, 1, 2, 3, 4]⟩, ⟨7, 4, [6, 0, 1, 2, 8, 3]⟩, ⟨7, 5, [6, 0, 1, 2, 8, 3, 4]⟩, ⟨7, 3, [8, 1, 0, 6, 5, 4]⟩, ⟨7, 2, [8, 1, 0, 6, 5, 4, 3]⟩, ⟨7, 0, [8, 2, 1]⟩, ⟨7, 3, [8, 2, 1, 0, 6, 5, 4]⟩, ⟨7, 0, [8, 2, 3, 1]⟩, ⟨7, 4, [8, 2, 3, 1, 0, 6, 5]⟩, ⟨7, 1, [8, 2, 3, 4, 5, 6, 0]⟩, ⟨0, 4, [1, 2, 3]⟩, ⟨0, 7, [1, 2, 3, 4, 5, 6]⟩] + +private def k8t4p4_step_5_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 5, [1, 2, 3, 8, 7, 6]⟩, ⟨0, 4, [1, 2, 3, 8, 7, 6, 5]⟩, ⟨0, 4, [1, 2, 8, 3]⟩, ⟨0, 6, [1, 2, 8, 3, 4, 5]⟩, ⟨0, 7, [1, 2, 8, 3, 4, 5, 6]⟩, ⟨0, 4, [1, 2, 8, 7, 6, 5]⟩, ⟨0, 3, [1, 2, 8, 7, 6, 5, 4]⟩, ⟨0, 4, [1, 3]⟩, ⟨0, 8, [1, 3, 4, 5, 6, 7]⟩, ⟨0, 2, [1, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 4, [1, 8, 7, 6, 5]⟩] + +private def k8t4p4_step_5_required_block_3 : List (RequiredPathData (Fin 9)) := [⟨0, 3, [1, 8, 7, 6, 5, 4]⟩, ⟨0, 2, [6, 5, 4, 3, 1, 8]⟩, ⟨0, 1, [6, 5, 4, 3, 2, 8]⟩, ⟨0, 5, [6, 7, 8, 1, 2, 3, 4]⟩] + +private def k8t4p4_step_5_data : FreshAttachmentData 8 := ⟨5, 0, k8t4p4_step_5_required_block_0 ++ k8t4p4_step_5_required_block_1 ++ k8t4p4_step_5_required_block_2 ++ k8t4p4_step_5_required_block_3, ⟨none, {(7, 2), (0, 2), (4, 3)}⟩⟩ + +private def k8t4p4_step_5 : ClosureStep 8 := .fresh k8t4p4_step_5_data + +private def k8t4p4_step_6_data : EdgeAttachmentData 8 := ⟨5, 1, [⟨0, 4, [1, 5, 6, 7, 2, 3]⟩, ⟨0, 1, [7, 2, 3, 4, 5]⟩, ⟨1, 0, [5, 4, 3, 2]⟩, ⟨1, 0, [5, 4, 3, 2, 7]⟩, ⟨1, 0, [5, 6, 7]⟩, ⟨1, 4, [5, 6, 7, 0, 2, 3]⟩, ⟨6, 3, [5, 1, 0, 7, 2]⟩, ⟨6, 4, [5, 1, 0, 7, 2, 3]⟩, ⟨6, 2, [7, 0, 1, 5, 4, 3]⟩, ⟨6, 3, [7, 0, 2, 1, 5, 4]⟩, ⟨6, 2, [7, 1, 5, 4, 3]⟩], ⟨none, {(1, 3), (0, 3), (6, 3)}⟩⟩ + +private def k8t4p4_step_6 : ClosureStep 8 := .edge k8t4p4_step_6_data + +private def k8t4p4_step_7_data : EdgeAttachmentData 8 := ⟨5, 3, [⟨0, 4, [1, 2, 7, 6, 5, 3]⟩, ⟨0, 1, [2, 3, 5, 6, 7]⟩, ⟨4, 2, [3, 5, 6, 7, 0, 1]⟩, ⟨4, 1, [3, 5, 6, 7, 0, 2]⟩, ⟨4, 0, [3, 5, 6, 7, 1, 2]⟩, ⟨4, 6, [5, 3, 2, 0, 1, 7]⟩, ⟨6, 4, [5, 3]⟩, ⟨6, 4, [7, 0, 1, 2, 3, 5]⟩], ⟨none, {(6, 3), (4, 3), (0, 2), (1, 0)}⟩⟩ + +private def k8t4p4_step_7 : ClosureStep 8 := .edge k8t4p4_step_7_data + +private def k8t4p4_step_8_data : FreshAttachmentData 8 := ⟨6, 2, [⟨1, 0, [2, 3, 4, 5, 6, 7]⟩, ⟨1, 0, [2, 3, 8, 7]⟩, ⟨1, 0, [2, 3]⟩, ⟨1, 0, [2, 8, 3, 4, 5, 6, 7]⟩, ⟨1, 0, [2, 8, 3]⟩, ⟨1, 5, [2, 8, 3, 0, 7, 6]⟩, ⟨1, 4, [2, 8, 3, 0, 7, 6, 5]⟩, ⟨1, 6, [2, 8, 7, 0, 3, 4, 5]⟩, ⟨1, 0, [3, 4, 5, 6, 7]⟩, ⟨1, 6, [8, 7, 0, 3, 4, 5]⟩, ⟨4, 0, [5, 6, 7, 8, 1, 2, 3]⟩, ⟨4, 0, [5, 6, 7, 8, 1, 3]⟩, ⟨4, 8, [5, 6, 7, 0, 3, 1, 2]⟩, ⟨4, 8, [5, 6, 7, 0, 3, 1]⟩, ⟨4, 2, [5, 6, 7, 0, 3, 1, 8]⟩, ⟨4, 1, [5, 6, 7, 0, 3, 2, 8]⟩, ⟨0, 5, [3, 1, 2, 8, 7, 6]⟩, ⟨0, 4, [3, 1, 2, 8, 7, 6, 5]⟩, ⟨0, 4, [3, 1, 8, 7, 6, 5]⟩, ⟨0, 1, [3, 4, 5, 6, 7, 8]⟩, ⟨0, 2, [3, 4, 5, 6, 7, 8, 1]⟩, ⟨0, 2, [3, 4, 5, 6, 7, 8]⟩, ⟨0, 1, [3, 4, 5, 6, 7, 8, 2]⟩, ⟨0, 4, [3, 8, 7, 6, 5]⟩, ⟨0, 4, [7, 6, 5]⟩, ⟨0, 8, [7, 6, 5, 4, 3, 1, 2]⟩, ⟨0, 8, [7, 6, 5, 4, 3, 1]⟩, ⟨0, 6, [7, 8, 1, 2, 3, 4, 5]⟩, ⟨0, 4, [7, 8, 1, 3]⟩, ⟨0, 6, [7, 8, 1, 3, 4, 5]⟩], ⟨none, {(1, 3), (0, 2), (4, 2)}⟩⟩ + +private def k8t4p4_step_8 : ClosureStep 8 := .fresh k8t4p4_step_8_data + +private def k8t4p4_step_9_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨1, 0, [2, 3, 4, 5, 6, 7]⟩, ⟨1, 5, [2, 3, 4, 0, 7, 6]⟩, ⟨1, 0, [2, 3, 8, 7, 6, 5, 4]⟩, ⟨1, 6, [2, 3, 8, 7, 0, 4, 5]⟩, ⟨1, 6, [2, 8, 3, 4, 0, 7]⟩, ⟨1, 5, [2, 8, 3, 4, 0, 7, 6]⟩, ⟨1, 0, [3, 4, 5, 6, 7]⟩, ⟨1, 2, [3, 4, 0, 7, 8]⟩, ⟨5, 0, [4, 3, 1, 2, 8, 7]⟩, ⟨5, 0, [4, 3, 1, 8, 7]⟩, ⟨5, 0, [4, 3, 8, 7]⟩, ⟨5, 6, [4, 0, 7]⟩] + +private def k8t4p4_step_9_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨5, 3, [4, 0, 7, 8, 1, 2]⟩, ⟨5, 2, [4, 0, 7, 8, 1, 3]⟩, ⟨5, 1, [4, 0, 7, 8, 2, 3]⟩, ⟨5, 0, [6, 7, 8, 1, 2, 3, 4]⟩, ⟨5, 8, [6, 7, 0, 4, 3, 1, 2]⟩, ⟨5, 8, [6, 7, 0, 4, 3, 1]⟩, ⟨5, 2, [6, 7, 0, 4, 3, 1, 8]⟩, ⟨5, 1, [6, 7, 0, 4, 3, 2, 8]⟩, ⟨6, 0, [5, 4, 3, 1, 2, 8, 7]⟩, ⟨6, 0, [5, 4, 3, 1, 8, 7]⟩, ⟨6, 0, [5, 4, 3, 8, 7]⟩, ⟨6, 2, [5, 4, 0, 7, 8, 1]⟩] + +private def k8t4p4_step_9_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨6, 3, [5, 4, 0, 7, 8, 1, 2]⟩, ⟨6, 3, [5, 4, 0, 7, 8, 1]⟩, ⟨6, 2, [5, 4, 0, 7, 8, 1, 3]⟩, ⟨6, 1, [5, 4, 0, 7, 8, 2]⟩, ⟨6, 1, [5, 4, 0, 7, 8, 2, 3]⟩, ⟨6, 0, [7, 8, 3, 4]⟩, ⟨6, 8, [7, 0, 4, 3, 1, 2]⟩, ⟨0, 5, [4, 3, 1, 2, 8, 7, 6]⟩, ⟨0, 1, [4, 3, 2]⟩, ⟨0, 1, [4, 3, 2, 8]⟩, ⟨0, 1, [4, 5, 6, 7, 8]⟩, ⟨0, 3, [4, 5, 6, 7, 8, 1, 2]⟩] + +private def k8t4p4_step_9_required_block_3 : List (RequiredPathData (Fin 9)) := [⟨0, 2, [4, 5, 6, 7, 8, 1, 3]⟩, ⟨0, 1, [4, 5, 6, 7, 8, 2]⟩, ⟨0, 1, [4, 5, 6, 7, 8, 2, 3]⟩, ⟨0, 8, [7, 6, 5, 4, 3, 1, 2]⟩, ⟨0, 6, [7, 8, 1, 2, 3, 4, 5]⟩] + +private def k8t4p4_step_9_data : FreshAttachmentData 8 := ⟨6, 3, k8t4p4_step_9_required_block_0 ++ k8t4p4_step_9_required_block_1 ++ k8t4p4_step_9_required_block_2 ++ k8t4p4_step_9_required_block_3, ⟨none, {(5, 2), (6, 2), (0, 1), (1, 3)}⟩⟩ + +private def k8t4p4_step_9 : ClosureStep 8 := .fresh k8t4p4_step_9_data + +private def k8t4p4_step_10_data : EdgeAttachmentData 8 := ⟨6, 4, [⟨0, 5, [1, 7, 2, 3, 4, 6]⟩, ⟨0, 1, [2, 3, 4, 6, 7]⟩, ⟨3, 5, [2, 0, 1, 7, 6, 4]⟩, ⟨3, 5, [4, 6]⟩, ⟨5, 3, [4, 6, 7, 0, 1, 2]⟩, ⟨5, 7, [6, 4, 3, 2, 0, 1]⟩, ⟨5, 1, [6, 4, 3, 2, 0, 7]⟩, ⟨5, 0, [6, 4, 3, 2, 1, 7]⟩], ⟨none, {(3, 3), (5, 3), (0, 2), (1, 0)}⟩⟩ + +private def k8t4p4_step_10 : ClosureStep 8 := .edge k8t4p4_step_10_data + +private def k8t4p4_step_11_data : FreshAttachmentData 8 := ⟨6, 4, [⟨1, 0, [2, 3, 4, 5, 6, 7]⟩, ⟨1, 0, [2, 3, 4, 5]⟩, ⟨1, 6, [2, 3, 4, 5, 0, 7]⟩, ⟨1, 0, [2, 8, 3, 4, 5, 6, 7]⟩, ⟨1, 0, [2, 8, 3, 4, 5]⟩, ⟨1, 6, [2, 8, 3, 4, 5, 0, 7]⟩, ⟨4, 0, [3, 1, 2, 8, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 2, 8, 7]⟩, ⟨4, 6, [3, 1, 2, 8, 7, 0, 5]⟩, ⟨4, 0, [3, 1, 8, 7, 6, 5]⟩, ⟨4, 6, [3, 1, 8, 7, 0, 5]⟩, ⟨6, 0, [5, 4, 3, 1, 2, 8, 7]⟩, ⟨6, 0, [5, 4, 3, 1, 8, 7]⟩, ⟨6, 0, [5, 4, 3, 8, 7]⟩, ⟨6, 3, [5, 0, 7, 8, 1, 2]⟩, ⟨6, 4, [5, 0, 7, 8, 1, 2, 3]⟩, ⟨6, 2, [5, 0, 7, 8, 1, 3]⟩, ⟨6, 4, [5, 0, 7, 8, 1, 3]⟩, ⟨6, 1, [5, 0, 7, 8, 2, 3]⟩, ⟨6, 8, [7, 0, 5, 4, 3, 1, 2]⟩, ⟨6, 8, [7, 0, 5, 4, 3, 1]⟩, ⟨6, 2, [7, 0, 5, 4, 3, 1, 8]⟩, ⟨6, 1, [7, 0, 5, 4, 3, 2, 8]⟩], ⟨none, {(6, 2), (1, 3), (4, 2), (0, 0)}⟩⟩ + +private def k8t4p4_step_11 : ClosureStep 8 := .fresh k8t4p4_step_11_data + +private def k8t4p4_step_12_data : FreshAttachmentData 8 := ⟨7, 4, [⟨1, 0, [2, 3, 4, 5, 6, 7, 8]⟩, ⟨1, 0, [2, 3, 4, 5]⟩, ⟨1, 6, [2, 3, 4, 5, 0, 8, 7]⟩, ⟨1, 0, [2, 3, 8, 7, 6, 5]⟩, ⟨1, 0, [2, 3, 8]⟩, ⟨1, 0, [2, 8, 3, 4, 5]⟩, ⟨1, 0, [2, 8]⟩, ⟨1, 2, [3, 4, 5, 0, 8]⟩, ⟨1, 6, [3, 4, 5, 0, 8, 7]⟩, ⟨4, 0, [3, 1, 2, 8, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 2, 8]⟩, ⟨4, 6, [3, 1, 2, 8, 0, 5]⟩, ⟨4, 7, [3, 1, 2, 8, 0, 5, 6]⟩, ⟨4, 0, [3, 1, 8, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 8]⟩, ⟨4, 7, [3, 1, 8, 0, 5, 6]⟩, ⟨4, 0, [3, 8, 7, 6, 5]⟩, ⟨4, 0, [3, 8]⟩, ⟨4, 7, [3, 8, 0, 5, 6]⟩, ⟨0, 7, [5, 4, 3, 1, 2, 8]⟩, ⟨0, 6, [5, 4, 3, 1, 2, 8, 7]⟩, ⟨0, 6, [5, 4, 3, 1, 8, 7]⟩, ⟨0, 3, [5, 6, 7, 8, 1, 2]⟩, ⟨0, 4, [5, 6, 7, 8, 1, 2, 3]⟩, ⟨0, 2, [5, 6, 7, 8, 1, 3]⟩, ⟨0, 4, [5, 6, 7, 8, 1, 3]⟩, ⟨0, 1, [5, 6, 7, 8, 2, 3]⟩, ⟨0, 7, [8, 1, 2, 3, 4, 5, 6]⟩, ⟨0, 2, [8, 7, 6, 5, 4, 3, 1]⟩, ⟨0, 1, [8, 7, 6, 5, 4, 3, 2]⟩], ⟨none, {(4, 3), (1, 3), (0, 2)}⟩⟩ + +private def k8t4p4_step_12 : ClosureStep 8 := .fresh k8t4p4_step_12_data + +def k8t4p4 : LayoutCertificate 8 where + chains := [[0], [1], [2, 3, 4, 5, 6, 7]] + clique := {0, 1, 2, 7} + templates := [⟨0, 1, [], [], [], 5, 7⟩, + ⟨0, 1, [[2, 3, 4, 5, 6, 7]], [], [], 1, 1⟩, + ⟨0, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩, + ⟨0, 3, [], [], [2], 4, 6⟩, + ⟨0, 3, [], [], [4, 5, 6, 7], 1, 3⟩, + ⟨0, 4, [], [], [3, 2], 3, 5⟩, + ⟨0, 4, [], [], [5, 6, 7], 2, 4⟩, + ⟨0, 5, [], [], [4, 3, 2], 2, 4⟩, + ⟨0, 5, [], [], [6, 7], 3, 5⟩, + ⟨0, 6, [], [], [5, 4, 3, 2], 1, 3⟩, + ⟨0, 6, [], [], [7], 4, 6⟩, + ⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 2⟩, + ⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩, + ⟨1, 3, [], [], [2], 4, 6⟩, + ⟨1, 3, [], [], [4, 5, 6, 7], 1, 3⟩, + ⟨1, 4, [], [], [3, 2], 3, 5⟩, + ⟨1, 4, [], [], [5, 6, 7], 2, 4⟩, + ⟨1, 5, [], [], [4, 3, 2], 2, 4⟩, + ⟨1, 6, [], [], [5, 4, 3, 2], 1, 3⟩, + ⟨1, 6, [], [], [7], 4, 6⟩, + ⟨1, 7, [], [], [6, 5, 4, 3, 2], 1, 2⟩, + ⟨2, 3, [], [], [4, 5, 6, 7], 1, 3⟩, + ⟨2, 4, [], [], [5, 6, 7], 2, 4⟩, + ⟨3, 4, [], [2], [5, 6, 7], 1, 3⟩, + ⟨3, 5, [], [2], [6, 7], 2, 4⟩, + ⟨3, 6, [], [2], [7], 3, 5⟩, + ⟨4, 5, [], [2, 3], [6, 7], 1, 3⟩, + ⟨4, 6, [], [2, 3], [7], 2, 4⟩, + ⟨5, 6, [], [2, 3, 4], [7], 1, 3⟩, + ⟨5, 7, [], [2, 3, 4], [], 2, 4⟩, + ⟨6, 7, [], [2, 3, 4, 5], [], 1, 3⟩] + required := [⟨3, 5, [4]⟩, + ⟨4, 6, [5]⟩] + closure := [k8t4p4_step_0, k8t4p4_step_1, k8t4p4_step_2, k8t4p4_step_3, k8t4p4_step_4, k8t4p4_step_5, k8t4p4_step_6, k8t4p4_step_7, k8t4p4_step_8, k8t4p4_step_9, k8t4p4_step_10, k8t4p4_step_11, k8t4p4_step_12] + bad := ⟨none, {(0, 3), (4, 2), (5, 1), (6, 2)}⟩ + + +private def k8t4p4_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2}], + #[{1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 2 5, {2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, {3, 4, 5}, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[Finset.Icc 2 5, {2, 3, 4}, ∅, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, {3, 4, 5}, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_initial_eq_row_0 : ∀ j : Fin 8, (k8t4p4.initialMatrix 8) 0 j = k8t4p4_state_0 0 j := by decide + +private theorem k8t4p4_initial_eq_row_1 : ∀ j : Fin 8, (k8t4p4.initialMatrix 8) 1 j = k8t4p4_state_0 1 j := by decide + +private theorem k8t4p4_initial_eq_row_2 : ∀ j : Fin 8, (k8t4p4.initialMatrix 8) 2 j = k8t4p4_state_0 2 j := by decide + +private theorem k8t4p4_initial_eq_row_3 : ∀ j : Fin 8, (k8t4p4.initialMatrix 8) 3 j = k8t4p4_state_0 3 j := by decide + +private theorem k8t4p4_initial_eq_row_4 : ∀ j : Fin 8, (k8t4p4.initialMatrix 8) 4 j = k8t4p4_state_0 4 j := by decide + +private theorem k8t4p4_initial_eq_row_5 : ∀ j : Fin 8, (k8t4p4.initialMatrix 8) 5 j = k8t4p4_state_0 5 j := by decide + +private theorem k8t4p4_initial_eq_row_6 : ∀ j : Fin 8, (k8t4p4.initialMatrix 8) 6 j = k8t4p4_state_0 6 j := by decide + +private theorem k8t4p4_initial_eq_row_7 : ∀ j : Fin 8, (k8t4p4.initialMatrix 8) 7 j = k8t4p4_state_0 7 j := by decide + +private theorem k8t4p4_initial_eq : (k8t4p4.initialMatrix 8) = k8t4p4_state_0 := by + funext i j + fin_cases i + + · exact k8t4p4_initial_eq_row_0 j + + · exact k8t4p4_initial_eq_row_1 j + + · exact k8t4p4_initial_eq_row_2 j + + · exact k8t4p4_initial_eq_row_3 j + + · exact k8t4p4_initial_eq_row_4 j + + · exact k8t4p4_initial_eq_row_5 j + + · exact k8t4p4_initial_eq_row_6 j + + · exact k8t4p4_initial_eq_row_7 j + +private def k8t4p4_state_1 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2}], + #[{1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 2 5, {2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, {3, 4, 5}, ∅], + #[{0, 2, 3, 4, 5}, Finset.Icc 2 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[Finset.Icc 2 5, {2, 3, 4}, ∅, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, {3, 4, 5}, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, {1, 2}, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 1 7, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {1, 2, 3, 4, 6}, Finset.Icc 1 5, {1, 2}], + #[Finset.Icc 2 5, Finset.Icc 2 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 5, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 2}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_0_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p4_state_0 a b ∪ requiredMatrix 8 k8t4p4_step_0_data.required a b) 0 j = k8t4p4_local_0 0 j := by decide + +private theorem k8t4p4_local_0_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p4_state_0 a b ∪ requiredMatrix 8 k8t4p4_step_0_data.required a b) 1 j = k8t4p4_local_0 1 j := by decide + +private theorem k8t4p4_local_0_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p4_state_0 a b ∪ requiredMatrix 8 k8t4p4_step_0_data.required a b) 2 j = k8t4p4_local_0 2 j := by decide + +private theorem k8t4p4_local_0_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p4_state_0 a b ∪ requiredMatrix 8 k8t4p4_step_0_data.required a b) 3 j = k8t4p4_local_0 3 j := by decide + +private theorem k8t4p4_local_0_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p4_state_0 a b ∪ requiredMatrix 8 k8t4p4_step_0_data.required a b) 4 j = k8t4p4_local_0 4 j := by decide + +private theorem k8t4p4_local_0_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p4_state_0 a b ∪ requiredMatrix 8 k8t4p4_step_0_data.required a b) 5 j = k8t4p4_local_0 5 j := by decide + +private theorem k8t4p4_local_0_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p4_state_0 a b ∪ requiredMatrix 8 k8t4p4_step_0_data.required a b) 6 j = k8t4p4_local_0 6 j := by decide + +private theorem k8t4p4_local_0_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p4_state_0 a b ∪ requiredMatrix 8 k8t4p4_step_0_data.required a b) 7 j = k8t4p4_local_0 7 j := by decide + +private theorem k8t4p4_local_0_eq : (fun a b => k8t4p4_state_0 a b ∪ requiredMatrix 8 k8t4p4_step_0_data.required a b) = k8t4p4_local_0 := by + funext i j + fin_cases i + + · exact k8t4p4_local_0_eq_row_0 j + + · exact k8t4p4_local_0_eq_row_1 j + + · exact k8t4p4_local_0_eq_row_2 j + + · exact k8t4p4_local_0_eq_row_3 j + + · exact k8t4p4_local_0_eq_row_4 j + + · exact k8t4p4_local_0_eq_row_5 j + + · exact k8t4p4_local_0_eq_row_6 j + + · exact k8t4p4_local_0_eq_row_7 j + +private theorem k8t4p4_local_0_paths : ∀ p ∈ k8t4p4_step_0_data.required, p.Check (addedEdgeGraph k8t4p4.graph k8t4p4_step_0_data.i k8t4p4_step_0_data.j) 8 := by decide + +private theorem k8t4p4_local_0_bad : k8t4p4_step_0_data.bad.Check (addedEdgeGraph k8t4p4.graph k8t4p4_step_0_data.i k8t4p4_step_0_data.j) k8t4p4_local_0 8 4 := by decide + +private theorem k8t4p4_step_0_check : k8t4p4_step_0.Check k8t4p4.graph k8t4p4_state_0 8 4 := by + change k8t4p4_step_0_data.Check k8t4p4.graph k8t4p4_state_0 8 4 + refine ⟨k8t4p4_local_0_paths, ?_⟩ + rw [k8t4p4_local_0_eq] + exact k8t4p4_local_0_bad + +private theorem k8t4p4_update_0 : k8t4p4_step_0.apply k8t4p4_state_0 = k8t4p4_state_1 := by + have h : ∀ i j : Fin 8, k8t4p4_step_0.apply k8t4p4_state_0 i j = k8t4p4_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p4_state_2 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2}], + #[{1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 2 5, {2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 2 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[Finset.Icc 2 5, {2, 3, 4}, ∅, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, {3, 4, 5}, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {0, 1}, {0, 1}, Finset.Icc 0 4, {1}, {0, 1}, Finset.Icc 0 5, {0, 1}], + #[{1}, ∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2}], + #[{0, 1}, {1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 0 6, Finset.Icc 2 5, {2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{0, 1}, {1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1, 2}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 6, {1, 2, 3}, ∅, {1, 2, 3}, {0, 1, 2, 3, 4, 6}, Finset.Icc 0 5, {0, 1}], + #[{1}, {0, 2, 3, 4, 5}, Finset.Icc 2 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[{0, 1}, Finset.Icc 2 5, {2, 3, 4}, ∅, {0, 1, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6, {1, 2}, Finset.Icc 0 5, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{0, 1}, {1, 2}, {1, 2}, ∅, {0, 1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_1_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {0, 1, 3, 4}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 3, 4}, {0}, {0}, ∅, ∅, ∅, {1}, {0, 1, 2}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_1_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_0) 0 j = k8t4p4_local_1_required_0 0 j := by decide + +private theorem k8t4p4_local_1_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_0) 1 j = k8t4p4_local_1_required_0 1 j := by decide + +private theorem k8t4p4_local_1_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_0) 2 j = k8t4p4_local_1_required_0 2 j := by decide + +private theorem k8t4p4_local_1_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_0) 3 j = k8t4p4_local_1_required_0 3 j := by decide + +private theorem k8t4p4_local_1_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_0) 4 j = k8t4p4_local_1_required_0 4 j := by decide + +private theorem k8t4p4_local_1_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_0) 5 j = k8t4p4_local_1_required_0 5 j := by decide + +private theorem k8t4p4_local_1_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_0) 6 j = k8t4p4_local_1_required_0 6 j := by decide + +private theorem k8t4p4_local_1_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_0) 7 j = k8t4p4_local_1_required_0 7 j := by decide + +private theorem k8t4p4_local_1_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_0) 8 j = k8t4p4_local_1_required_0 8 j := by decide + +private theorem k8t4p4_local_1_required_0_eq : (requiredMatrix 8 k8t4p4_step_1_required_block_0) = k8t4p4_local_1_required_0 := by + funext i j + fin_cases i + + · exact k8t4p4_local_1_required_0_eq_row_0 j + + · exact k8t4p4_local_1_required_0_eq_row_1 j + + · exact k8t4p4_local_1_required_0_eq_row_2 j + + · exact k8t4p4_local_1_required_0_eq_row_3 j + + · exact k8t4p4_local_1_required_0_eq_row_4 j + + · exact k8t4p4_local_1_required_0_eq_row_5 j + + · exact k8t4p4_local_1_required_0_eq_row_6 j + + · exact k8t4p4_local_1_required_0_eq_row_7 j + + · exact k8t4p4_local_1_required_0_eq_row_8 j + +private theorem k8t4p4_local_1_path_0_0 : (⟨4, 0, [3, 1, 2, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_0_1 : (⟨4, 0, [3, 1, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_0_2 : (⟨4, 7, [3, 1, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_0_3 : (⟨4, 8, [3, 1, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_0_4 : (⟨4, 2, [3, 1, 0, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_0_5 : (⟨4, 0, [3, 2, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_0_6 : (⟨4, 7, [3, 2, 1, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_0_7 : (⟨4, 8, [3, 2, 1, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_0_8 : (⟨4, 0, [3, 2, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_0_9 : (⟨4, 6, [3, 2, 8, 1, 0, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_0_10 : (⟨4, 7, [3, 2, 8, 1, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_0_11 : (⟨4, 1, [3, 2, 8, 7, 6, 5, 0]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_paths_block_0 : ∀ p ∈ k8t4p4_step_1_required_block_0, p.Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by + simp only [k8t4p4_step_1_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_1_path_0_0, k8t4p4_local_1_path_0_1, k8t4p4_local_1_path_0_2, k8t4p4_local_1_path_0_3, k8t4p4_local_1_path_0_4, k8t4p4_local_1_path_0_5, k8t4p4_local_1_path_0_6, k8t4p4_local_1_path_0_7, k8t4p4_local_1_path_0_8, k8t4p4_local_1_path_0_9, k8t4p4_local_1_path_0_10, k8t4p4_local_1_path_0_11⟩ + +private def k8t4p4_local_1_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {2}, ∅, ∅, {0, 1, 2}, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅], + #[{2}, ∅, ∅, ∅, ∅, ∅, {0}, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, {1, 2}, {0, 1, 2}, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_1_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_1) 0 j = k8t4p4_local_1_required_1 0 j := by decide + +private theorem k8t4p4_local_1_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_1) 1 j = k8t4p4_local_1_required_1 1 j := by decide + +private theorem k8t4p4_local_1_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_1) 2 j = k8t4p4_local_1_required_1 2 j := by decide + +private theorem k8t4p4_local_1_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_1) 3 j = k8t4p4_local_1_required_1 3 j := by decide + +private theorem k8t4p4_local_1_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_1) 4 j = k8t4p4_local_1_required_1 4 j := by decide + +private theorem k8t4p4_local_1_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_1) 5 j = k8t4p4_local_1_required_1 5 j := by decide + +private theorem k8t4p4_local_1_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_1) 6 j = k8t4p4_local_1_required_1 6 j := by decide + +private theorem k8t4p4_local_1_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_1) 7 j = k8t4p4_local_1_required_1 7 j := by decide + +private theorem k8t4p4_local_1_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_1) 8 j = k8t4p4_local_1_required_1 8 j := by decide + +private theorem k8t4p4_local_1_required_1_eq : (requiredMatrix 8 k8t4p4_step_1_required_block_1) = k8t4p4_local_1_required_1 := by + funext i j + fin_cases i + + · exact k8t4p4_local_1_required_1_eq_row_0 j + + · exact k8t4p4_local_1_required_1_eq_row_1 j + + · exact k8t4p4_local_1_required_1_eq_row_2 j + + · exact k8t4p4_local_1_required_1_eq_row_3 j + + · exact k8t4p4_local_1_required_1_eq_row_4 j + + · exact k8t4p4_local_1_required_1_eq_row_5 j + + · exact k8t4p4_local_1_required_1_eq_row_6 j + + · exact k8t4p4_local_1_required_1_eq_row_7 j + + · exact k8t4p4_local_1_required_1_eq_row_8 j + +private theorem k8t4p4_local_1_path_1_0 : (⟨4, 0, [3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_1_1 : (⟨4, 6, [5, 0, 1, 2, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_1_2 : (⟨7, 0, [6, 5, 4, 3, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_1_3 : (⟨7, 0, [6, 5, 4, 3, 2, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_1_4 : (⟨7, 0, [6, 5, 4, 3, 2, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_1_5 : (⟨7, 3, [6, 5, 0, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_1_6 : (⟨7, 4, [6, 5, 0, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_1_7 : (⟨7, 3, [6, 5, 0, 1, 2, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_1_8 : (⟨7, 4, [6, 5, 0, 1, 2, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_1_9 : (⟨7, 4, [6, 5, 0, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_1_10 : (⟨0, 7, [1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_1_11 : (⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_paths_block_1 : ∀ p ∈ k8t4p4_step_1_required_block_1, p.Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by + simp only [k8t4p4_step_1_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_1_path_1_0, k8t4p4_local_1_path_1_1, k8t4p4_local_1_path_1_2, k8t4p4_local_1_path_1_3, k8t4p4_local_1_path_1_4, k8t4p4_local_1_path_1_5, k8t4p4_local_1_path_1_6, k8t4p4_local_1_path_1_7, k8t4p4_local_1_path_1_8, k8t4p4_local_1_path_1_9, k8t4p4_local_1_path_1_10, k8t4p4_local_1_path_1_11⟩ + +private def k8t4p4_local_1_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, {0}, {0}, {0, 1}, {1}, {1}, {0, 2, 3, 4, 5}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 2, 3, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_1_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_2) 0 j = k8t4p4_local_1_required_2 0 j := by decide + +private theorem k8t4p4_local_1_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_2) 1 j = k8t4p4_local_1_required_2 1 j := by decide + +private theorem k8t4p4_local_1_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_2) 2 j = k8t4p4_local_1_required_2 2 j := by decide + +private theorem k8t4p4_local_1_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_2) 3 j = k8t4p4_local_1_required_2 3 j := by decide + +private theorem k8t4p4_local_1_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_2) 4 j = k8t4p4_local_1_required_2 4 j := by decide + +private theorem k8t4p4_local_1_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_2) 5 j = k8t4p4_local_1_required_2 5 j := by decide + +private theorem k8t4p4_local_1_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_2) 6 j = k8t4p4_local_1_required_2 6 j := by decide + +private theorem k8t4p4_local_1_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_2) 7 j = k8t4p4_local_1_required_2 7 j := by decide + +private theorem k8t4p4_local_1_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_2) 8 j = k8t4p4_local_1_required_2 8 j := by decide + +private theorem k8t4p4_local_1_required_2_eq : (requiredMatrix 8 k8t4p4_step_1_required_block_2) = k8t4p4_local_1_required_2 := by + funext i j + fin_cases i + + · exact k8t4p4_local_1_required_2_eq_row_0 j + + · exact k8t4p4_local_1_required_2_eq_row_1 j + + · exact k8t4p4_local_1_required_2_eq_row_2 j + + · exact k8t4p4_local_1_required_2_eq_row_3 j + + · exact k8t4p4_local_1_required_2_eq_row_4 j + + · exact k8t4p4_local_1_required_2_eq_row_5 j + + · exact k8t4p4_local_1_required_2_eq_row_6 j + + · exact k8t4p4_local_1_required_2_eq_row_7 j + + · exact k8t4p4_local_1_required_2_eq_row_8 j + +private theorem k8t4p4_local_1_path_2_0 : (⟨0, 7, [1, 2, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_2_1 : (⟨0, 5, [1, 2, 3, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_2_2 : (⟨0, 4, [1, 2, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_2_3 : (⟨0, 6, [1, 2, 8, 3, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_2_4 : (⟨0, 7, [1, 2, 8, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_2_5 : (⟨0, 7, [1, 2, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_2_6 : (⟨0, 4, [1, 2, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_2_7 : (⟨0, 3, [1, 2, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_2_8 : (⟨0, 7, [1, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_2_9 : (⟨0, 8, [1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_2_10 : (⟨0, 2, [1, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_2_11 : (⟨0, 7, [1, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_paths_block_2 : ∀ p ∈ k8t4p4_step_1_required_block_2, p.Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by + simp only [k8t4p4_step_1_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_1_path_2_0, k8t4p4_local_1_path_2_1, k8t4p4_local_1_path_2_2, k8t4p4_local_1_path_2_3, k8t4p4_local_1_path_2_4, k8t4p4_local_1_path_2_5, k8t4p4_local_1_path_2_6, k8t4p4_local_1_path_2_7, k8t4p4_local_1_path_2_8, k8t4p4_local_1_path_2_9, k8t4p4_local_1_path_2_10, k8t4p4_local_1_path_2_11⟩ + +private def k8t4p4_local_1_required_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1}, {1}, ∅, ∅, {0}, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_1_required_3_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_3) 0 j = k8t4p4_local_1_required_3 0 j := by decide + +private theorem k8t4p4_local_1_required_3_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_3) 1 j = k8t4p4_local_1_required_3 1 j := by decide + +private theorem k8t4p4_local_1_required_3_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_3) 2 j = k8t4p4_local_1_required_3 2 j := by decide + +private theorem k8t4p4_local_1_required_3_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_3) 3 j = k8t4p4_local_1_required_3 3 j := by decide + +private theorem k8t4p4_local_1_required_3_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_3) 4 j = k8t4p4_local_1_required_3 4 j := by decide + +private theorem k8t4p4_local_1_required_3_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_3) 5 j = k8t4p4_local_1_required_3 5 j := by decide + +private theorem k8t4p4_local_1_required_3_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_3) 6 j = k8t4p4_local_1_required_3 6 j := by decide + +private theorem k8t4p4_local_1_required_3_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_3) 7 j = k8t4p4_local_1_required_3 7 j := by decide + +private theorem k8t4p4_local_1_required_3_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_1_required_block_3) 8 j = k8t4p4_local_1_required_3 8 j := by decide + +private theorem k8t4p4_local_1_required_3_eq : (requiredMatrix 8 k8t4p4_step_1_required_block_3) = k8t4p4_local_1_required_3 := by + funext i j + fin_cases i + + · exact k8t4p4_local_1_required_3_eq_row_0 j + + · exact k8t4p4_local_1_required_3_eq_row_1 j + + · exact k8t4p4_local_1_required_3_eq_row_2 j + + · exact k8t4p4_local_1_required_3_eq_row_3 j + + · exact k8t4p4_local_1_required_3_eq_row_4 j + + · exact k8t4p4_local_1_required_3_eq_row_5 j + + · exact k8t4p4_local_1_required_3_eq_row_6 j + + · exact k8t4p4_local_1_required_3_eq_row_7 j + + · exact k8t4p4_local_1_required_3_eq_row_8 j + +private theorem k8t4p4_local_1_path_3_0 : (⟨0, 3, [1, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_3_1 : (⟨0, 6, [5, 4, 3, 1, 2, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_3_2 : (⟨0, 2, [5, 6, 7, 8, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_path_3_3 : (⟨0, 1, [5, 6, 7, 8, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by decide + +private theorem k8t4p4_local_1_paths_block_3 : ∀ p ∈ k8t4p4_step_1_required_block_3, p.Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by + simp only [k8t4p4_step_1_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_1_path_3_0, k8t4p4_local_1_path_3_1, k8t4p4_local_1_path_3_2, k8t4p4_local_1_path_3_3⟩ + +private theorem k8t4p4_local_1_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_1 a b ∪ ((((k8t4p4_local_1_required_0 a b ∪ k8t4p4_local_1_required_1 a b) ∪ k8t4p4_local_1_required_2 a b) ∪ k8t4p4_local_1_required_3 a b))) 0 j = k8t4p4_local_1 0 j := by decide + +private theorem k8t4p4_local_1_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_1 a b ∪ ((((k8t4p4_local_1_required_0 a b ∪ k8t4p4_local_1_required_1 a b) ∪ k8t4p4_local_1_required_2 a b) ∪ k8t4p4_local_1_required_3 a b))) 1 j = k8t4p4_local_1 1 j := by decide + +private theorem k8t4p4_local_1_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_1 a b ∪ ((((k8t4p4_local_1_required_0 a b ∪ k8t4p4_local_1_required_1 a b) ∪ k8t4p4_local_1_required_2 a b) ∪ k8t4p4_local_1_required_3 a b))) 2 j = k8t4p4_local_1 2 j := by decide + +private theorem k8t4p4_local_1_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_1 a b ∪ ((((k8t4p4_local_1_required_0 a b ∪ k8t4p4_local_1_required_1 a b) ∪ k8t4p4_local_1_required_2 a b) ∪ k8t4p4_local_1_required_3 a b))) 3 j = k8t4p4_local_1 3 j := by decide + +private theorem k8t4p4_local_1_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_1 a b ∪ ((((k8t4p4_local_1_required_0 a b ∪ k8t4p4_local_1_required_1 a b) ∪ k8t4p4_local_1_required_2 a b) ∪ k8t4p4_local_1_required_3 a b))) 4 j = k8t4p4_local_1 4 j := by decide + +private theorem k8t4p4_local_1_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_1 a b ∪ ((((k8t4p4_local_1_required_0 a b ∪ k8t4p4_local_1_required_1 a b) ∪ k8t4p4_local_1_required_2 a b) ∪ k8t4p4_local_1_required_3 a b))) 5 j = k8t4p4_local_1 5 j := by decide + +private theorem k8t4p4_local_1_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_1 a b ∪ ((((k8t4p4_local_1_required_0 a b ∪ k8t4p4_local_1_required_1 a b) ∪ k8t4p4_local_1_required_2 a b) ∪ k8t4p4_local_1_required_3 a b))) 6 j = k8t4p4_local_1 6 j := by decide + +private theorem k8t4p4_local_1_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_1 a b ∪ ((((k8t4p4_local_1_required_0 a b ∪ k8t4p4_local_1_required_1 a b) ∪ k8t4p4_local_1_required_2 a b) ∪ k8t4p4_local_1_required_3 a b))) 7 j = k8t4p4_local_1 7 j := by decide + +private theorem k8t4p4_local_1_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_1 a b ∪ ((((k8t4p4_local_1_required_0 a b ∪ k8t4p4_local_1_required_1 a b) ∪ k8t4p4_local_1_required_2 a b) ∪ k8t4p4_local_1_required_3 a b))) 8 j = k8t4p4_local_1 8 j := by decide + +private theorem k8t4p4_local_1_merged_eq : (fun a b => freshMatrix k8t4p4_state_1 a b ∪ ((((k8t4p4_local_1_required_0 a b ∪ k8t4p4_local_1_required_1 a b) ∪ k8t4p4_local_1_required_2 a b) ∪ k8t4p4_local_1_required_3 a b))) = k8t4p4_local_1 := by + funext i j + fin_cases i + + · exact k8t4p4_local_1_merged_eq_row_0 j + + · exact k8t4p4_local_1_merged_eq_row_1 j + + · exact k8t4p4_local_1_merged_eq_row_2 j + + · exact k8t4p4_local_1_merged_eq_row_3 j + + · exact k8t4p4_local_1_merged_eq_row_4 j + + · exact k8t4p4_local_1_merged_eq_row_5 j + + · exact k8t4p4_local_1_merged_eq_row_6 j + + · exact k8t4p4_local_1_merged_eq_row_7 j + + · exact k8t4p4_local_1_merged_eq_row_8 j + +private theorem k8t4p4_local_1_eq : (fun a b => freshMatrix k8t4p4_state_1 a b ∪ requiredMatrix 8 k8t4p4_step_1_data.required a b) = k8t4p4_local_1 := by + funext a b + change freshMatrix k8t4p4_state_1 a b ∪ requiredMatrix 8 (k8t4p4_step_1_required_block_0 ++ k8t4p4_step_1_required_block_1 ++ k8t4p4_step_1_required_block_2 ++ k8t4p4_step_1_required_block_3) a b = _ + simp only [requiredMatrix_append, k8t4p4_local_1_required_0_eq, k8t4p4_local_1_required_1_eq, k8t4p4_local_1_required_2_eq, k8t4p4_local_1_required_3_eq] + exact congrFun (congrFun k8t4p4_local_1_merged_eq a) b + +private theorem k8t4p4_local_1_paths : ∀ p ∈ k8t4p4_step_1_data.required, p.Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 := by + change ∀ p ∈ (k8t4p4_step_1_required_block_0 ++ k8t4p4_step_1_required_block_1 ++ k8t4p4_step_1_required_block_2 ++ k8t4p4_step_1_required_block_3), p.Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) 8 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k8t4p4_local_1_paths_block_0, k8t4p4_local_1_paths_block_1⟩, k8t4p4_local_1_paths_block_2⟩, k8t4p4_local_1_paths_block_3⟩ + +private theorem k8t4p4_local_1_bad : k8t4p4_step_1_data.bad.Check (freshGraph k8t4p4.graph k8t4p4_step_1_data.i k8t4p4_step_1_data.j) k8t4p4_local_1 8 4 := by decide + +private theorem k8t4p4_step_1_check : k8t4p4_step_1.Check k8t4p4.graph k8t4p4_state_1 8 4 := by + change k8t4p4_step_1_data.Check k8t4p4.graph k8t4p4_state_1 8 4 + refine ⟨by decide, k8t4p4_local_1_paths, ?_⟩ + rw [k8t4p4_local_1_eq] + exact k8t4p4_local_1_bad + +private theorem k8t4p4_update_1 : k8t4p4_step_1.apply k8t4p4_state_1 = k8t4p4_state_2 := by + have h : ∀ i j : Fin 8, k8t4p4_step_1.apply k8t4p4_state_1 i j = k8t4p4_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p4_state_3 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2}], + #[{1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, {0, 2, 3, 4, 5}, {2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, {0, 2, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[Finset.Icc 2 5, {2, 3, 4}, ∅, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, {3, 4, 5}, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_2 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 1 7, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {1, 2, 3, 4, 6}, Finset.Icc 1 5, {1, 2}], + #[Finset.Icc 0 5, Finset.Icc 2 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 4, ∅, {1, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 5, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 2}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_2_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p4_state_2 a b ∪ requiredMatrix 8 k8t4p4_step_2_data.required a b) 0 j = k8t4p4_local_2 0 j := by decide + +private theorem k8t4p4_local_2_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p4_state_2 a b ∪ requiredMatrix 8 k8t4p4_step_2_data.required a b) 1 j = k8t4p4_local_2 1 j := by decide + +private theorem k8t4p4_local_2_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p4_state_2 a b ∪ requiredMatrix 8 k8t4p4_step_2_data.required a b) 2 j = k8t4p4_local_2 2 j := by decide + +private theorem k8t4p4_local_2_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p4_state_2 a b ∪ requiredMatrix 8 k8t4p4_step_2_data.required a b) 3 j = k8t4p4_local_2 3 j := by decide + +private theorem k8t4p4_local_2_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p4_state_2 a b ∪ requiredMatrix 8 k8t4p4_step_2_data.required a b) 4 j = k8t4p4_local_2 4 j := by decide + +private theorem k8t4p4_local_2_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p4_state_2 a b ∪ requiredMatrix 8 k8t4p4_step_2_data.required a b) 5 j = k8t4p4_local_2 5 j := by decide + +private theorem k8t4p4_local_2_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p4_state_2 a b ∪ requiredMatrix 8 k8t4p4_step_2_data.required a b) 6 j = k8t4p4_local_2 6 j := by decide + +private theorem k8t4p4_local_2_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p4_state_2 a b ∪ requiredMatrix 8 k8t4p4_step_2_data.required a b) 7 j = k8t4p4_local_2 7 j := by decide + +private theorem k8t4p4_local_2_eq : (fun a b => k8t4p4_state_2 a b ∪ requiredMatrix 8 k8t4p4_step_2_data.required a b) = k8t4p4_local_2 := by + funext i j + fin_cases i + + · exact k8t4p4_local_2_eq_row_0 j + + · exact k8t4p4_local_2_eq_row_1 j + + · exact k8t4p4_local_2_eq_row_2 j + + · exact k8t4p4_local_2_eq_row_3 j + + · exact k8t4p4_local_2_eq_row_4 j + + · exact k8t4p4_local_2_eq_row_5 j + + · exact k8t4p4_local_2_eq_row_6 j + + · exact k8t4p4_local_2_eq_row_7 j + +private theorem k8t4p4_local_2_paths : ∀ p ∈ k8t4p4_step_2_data.required, p.Check (addedEdgeGraph k8t4p4.graph k8t4p4_step_2_data.i k8t4p4_step_2_data.j) 8 := by decide + +private theorem k8t4p4_local_2_bad : k8t4p4_step_2_data.bad.Check (addedEdgeGraph k8t4p4.graph k8t4p4_step_2_data.i k8t4p4_step_2_data.j) k8t4p4_local_2 8 4 := by decide + +private theorem k8t4p4_step_2_check : k8t4p4_step_2.Check k8t4p4.graph k8t4p4_state_2 8 4 := by + change k8t4p4_step_2_data.Check k8t4p4.graph k8t4p4_state_2 8 4 + refine ⟨k8t4p4_local_2_paths, ?_⟩ + rw [k8t4p4_local_2_eq] + exact k8t4p4_local_2_bad + +private theorem k8t4p4_update_2 : k8t4p4_step_2.apply k8t4p4_state_2 = k8t4p4_state_3 := by + have h : ∀ i j : Fin 8, k8t4p4_step_2.apply k8t4p4_state_2 i j = k8t4p4_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p4_state_4 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2}], + #[{1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[Finset.Icc 2 5, {2, 3, 4}, ∅, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, {3, 4, 5}, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1}, {1}, {0, 1}, Finset.Icc 0 4, {1}, {0, 1}, Finset.Icc 0 5, {0, 1}], + #[{0, 1}, ∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2}], + #[{1}, {1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 0 6, {0, 2, 3, 4, 5}, {2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{0, 1}, {1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1, 2}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 6, {1, 2, 3}, ∅, {1, 2, 3}, {0, 1, 2, 3, 4, 6}, Finset.Icc 0 5, {0, 1}], + #[{1}, Finset.Icc 0 5, {0, 2, 3, 4, 5}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[{0, 1}, Finset.Icc 2 5, {2, 3, 4}, ∅, {0, 1, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6, {1, 2}, Finset.Icc 0 5, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{0, 1}, {1, 2}, {1, 2}, ∅, {0, 1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_3_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {0, 1, 3, 4}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 3, 4}, {0}, {0}, ∅, ∅, ∅, {1}, {0, 1, 2}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_3_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_0) 0 j = k8t4p4_local_3_required_0 0 j := by decide + +private theorem k8t4p4_local_3_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_0) 1 j = k8t4p4_local_3_required_0 1 j := by decide + +private theorem k8t4p4_local_3_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_0) 2 j = k8t4p4_local_3_required_0 2 j := by decide + +private theorem k8t4p4_local_3_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_0) 3 j = k8t4p4_local_3_required_0 3 j := by decide + +private theorem k8t4p4_local_3_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_0) 4 j = k8t4p4_local_3_required_0 4 j := by decide + +private theorem k8t4p4_local_3_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_0) 5 j = k8t4p4_local_3_required_0 5 j := by decide + +private theorem k8t4p4_local_3_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_0) 6 j = k8t4p4_local_3_required_0 6 j := by decide + +private theorem k8t4p4_local_3_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_0) 7 j = k8t4p4_local_3_required_0 7 j := by decide + +private theorem k8t4p4_local_3_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_0) 8 j = k8t4p4_local_3_required_0 8 j := by decide + +private theorem k8t4p4_local_3_required_0_eq : (requiredMatrix 8 k8t4p4_step_3_required_block_0) = k8t4p4_local_3_required_0 := by + funext i j + fin_cases i + + · exact k8t4p4_local_3_required_0_eq_row_0 j + + · exact k8t4p4_local_3_required_0_eq_row_1 j + + · exact k8t4p4_local_3_required_0_eq_row_2 j + + · exact k8t4p4_local_3_required_0_eq_row_3 j + + · exact k8t4p4_local_3_required_0_eq_row_4 j + + · exact k8t4p4_local_3_required_0_eq_row_5 j + + · exact k8t4p4_local_3_required_0_eq_row_6 j + + · exact k8t4p4_local_3_required_0_eq_row_7 j + + · exact k8t4p4_local_3_required_0_eq_row_8 j + +private theorem k8t4p4_local_3_path_0_0 : (⟨4, 0, [3, 1, 2, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_0_1 : (⟨4, 0, [3, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_0_2 : (⟨4, 7, [3, 1, 2, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_0_3 : (⟨4, 8, [3, 1, 2, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_0_4 : (⟨4, 0, [3, 1, 8, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_0_5 : (⟨4, 6, [3, 1, 8, 2, 0, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_0_6 : (⟨4, 7, [3, 1, 8, 2, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_0_7 : (⟨4, 0, [3, 1, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_0_8 : (⟨4, 2, [3, 1, 8, 7, 6, 5, 0]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_0_9 : (⟨4, 7, [3, 2, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_0_10 : (⟨4, 8, [3, 2, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_0_11 : (⟨4, 1, [3, 2, 0, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_paths_block_0 : ∀ p ∈ k8t4p4_step_3_required_block_0, p.Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by + simp only [k8t4p4_step_3_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_3_path_0_0, k8t4p4_local_3_path_0_1, k8t4p4_local_3_path_0_2, k8t4p4_local_3_path_0_3, k8t4p4_local_3_path_0_4, k8t4p4_local_3_path_0_5, k8t4p4_local_3_path_0_6, k8t4p4_local_3_path_0_7, k8t4p4_local_3_path_0_8, k8t4p4_local_3_path_0_9, k8t4p4_local_3_path_0_10, k8t4p4_local_3_path_0_11⟩ + +private def k8t4p4_local_3_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {2}, ∅, ∅, {0, 1, 2}, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅], + #[{2}, ∅, ∅, ∅, ∅, ∅, {0}, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, {1, 2}, {0, 1, 2}, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_3_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_1) 0 j = k8t4p4_local_3_required_1 0 j := by decide + +private theorem k8t4p4_local_3_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_1) 1 j = k8t4p4_local_3_required_1 1 j := by decide + +private theorem k8t4p4_local_3_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_1) 2 j = k8t4p4_local_3_required_1 2 j := by decide + +private theorem k8t4p4_local_3_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_1) 3 j = k8t4p4_local_3_required_1 3 j := by decide + +private theorem k8t4p4_local_3_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_1) 4 j = k8t4p4_local_3_required_1 4 j := by decide + +private theorem k8t4p4_local_3_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_1) 5 j = k8t4p4_local_3_required_1 5 j := by decide + +private theorem k8t4p4_local_3_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_1) 6 j = k8t4p4_local_3_required_1 6 j := by decide + +private theorem k8t4p4_local_3_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_1) 7 j = k8t4p4_local_3_required_1 7 j := by decide + +private theorem k8t4p4_local_3_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_1) 8 j = k8t4p4_local_3_required_1 8 j := by decide + +private theorem k8t4p4_local_3_required_1_eq : (requiredMatrix 8 k8t4p4_step_3_required_block_1) = k8t4p4_local_3_required_1 := by + funext i j + fin_cases i + + · exact k8t4p4_local_3_required_1_eq_row_0 j + + · exact k8t4p4_local_3_required_1_eq_row_1 j + + · exact k8t4p4_local_3_required_1_eq_row_2 j + + · exact k8t4p4_local_3_required_1_eq_row_3 j + + · exact k8t4p4_local_3_required_1_eq_row_4 j + + · exact k8t4p4_local_3_required_1_eq_row_5 j + + · exact k8t4p4_local_3_required_1_eq_row_6 j + + · exact k8t4p4_local_3_required_1_eq_row_7 j + + · exact k8t4p4_local_3_required_1_eq_row_8 j + +private theorem k8t4p4_local_3_path_1_0 : (⟨4, 0, [3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_1_1 : (⟨4, 6, [5, 0, 2, 1, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_1_2 : (⟨7, 0, [6, 5, 4, 3, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_1_3 : (⟨7, 0, [6, 5, 4, 3, 1, 8, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_1_4 : (⟨7, 0, [6, 5, 4, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_1_5 : (⟨7, 3, [6, 5, 0, 2, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_1_6 : (⟨7, 4, [6, 5, 0, 2, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_1_7 : (⟨7, 3, [6, 5, 0, 2, 1, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_1_8 : (⟨7, 4, [6, 5, 0, 2, 1, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_1_9 : (⟨7, 4, [6, 5, 0, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_1_10 : (⟨0, 7, [2, 1, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_1_11 : (⟨0, 8, [2, 1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_paths_block_1 : ∀ p ∈ k8t4p4_step_3_required_block_1, p.Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by + simp only [k8t4p4_step_3_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_3_path_1_0, k8t4p4_local_3_path_1_1, k8t4p4_local_3_path_1_2, k8t4p4_local_3_path_1_3, k8t4p4_local_3_path_1_4, k8t4p4_local_3_path_1_5, k8t4p4_local_3_path_1_6, k8t4p4_local_3_path_1_7, k8t4p4_local_3_path_1_8, k8t4p4_local_3_path_1_9, k8t4p4_local_3_path_1_10, k8t4p4_local_3_path_1_11⟩ + +private def k8t4p4_local_3_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0}, ∅, {0}, {0, 1}, {1}, {1}, {0, 2, 3, 4, 5}, {1}], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 2, 3, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_3_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_2) 0 j = k8t4p4_local_3_required_2 0 j := by decide + +private theorem k8t4p4_local_3_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_2) 1 j = k8t4p4_local_3_required_2 1 j := by decide + +private theorem k8t4p4_local_3_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_2) 2 j = k8t4p4_local_3_required_2 2 j := by decide + +private theorem k8t4p4_local_3_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_2) 3 j = k8t4p4_local_3_required_2 3 j := by decide + +private theorem k8t4p4_local_3_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_2) 4 j = k8t4p4_local_3_required_2 4 j := by decide + +private theorem k8t4p4_local_3_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_2) 5 j = k8t4p4_local_3_required_2 5 j := by decide + +private theorem k8t4p4_local_3_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_2) 6 j = k8t4p4_local_3_required_2 6 j := by decide + +private theorem k8t4p4_local_3_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_2) 7 j = k8t4p4_local_3_required_2 7 j := by decide + +private theorem k8t4p4_local_3_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_2) 8 j = k8t4p4_local_3_required_2 8 j := by decide + +private theorem k8t4p4_local_3_required_2_eq : (requiredMatrix 8 k8t4p4_step_3_required_block_2) = k8t4p4_local_3_required_2 := by + funext i j + fin_cases i + + · exact k8t4p4_local_3_required_2_eq_row_0 j + + · exact k8t4p4_local_3_required_2_eq_row_1 j + + · exact k8t4p4_local_3_required_2_eq_row_2 j + + · exact k8t4p4_local_3_required_2_eq_row_3 j + + · exact k8t4p4_local_3_required_2_eq_row_4 j + + · exact k8t4p4_local_3_required_2_eq_row_5 j + + · exact k8t4p4_local_3_required_2_eq_row_6 j + + · exact k8t4p4_local_3_required_2_eq_row_7 j + + · exact k8t4p4_local_3_required_2_eq_row_8 j + +private theorem k8t4p4_local_3_path_2_0 : (⟨0, 7, [2, 1, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_2_1 : (⟨0, 5, [2, 1, 3, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_2_2 : (⟨0, 4, [2, 1, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_2_3 : (⟨0, 6, [2, 1, 8, 3, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_2_4 : (⟨0, 7, [2, 1, 8, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_2_5 : (⟨0, 7, [2, 1, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_2_6 : (⟨0, 4, [2, 1, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_2_7 : (⟨0, 3, [2, 1, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_2_8 : (⟨0, 7, [2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_2_9 : (⟨0, 8, [2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_2_10 : (⟨0, 1, [2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_2_11 : (⟨0, 7, [2, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_paths_block_2 : ∀ p ∈ k8t4p4_step_3_required_block_2, p.Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by + simp only [k8t4p4_step_3_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_3_path_2_0, k8t4p4_local_3_path_2_1, k8t4p4_local_3_path_2_2, k8t4p4_local_3_path_2_3, k8t4p4_local_3_path_2_4, k8t4p4_local_3_path_2_5, k8t4p4_local_3_path_2_6, k8t4p4_local_3_path_2_7, k8t4p4_local_3_path_2_8, k8t4p4_local_3_path_2_9, k8t4p4_local_3_path_2_10, k8t4p4_local_3_path_2_11⟩ + +private def k8t4p4_local_3_required_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1}, {1}, ∅, ∅, {0}, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_3_required_3_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_3) 0 j = k8t4p4_local_3_required_3 0 j := by decide + +private theorem k8t4p4_local_3_required_3_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_3) 1 j = k8t4p4_local_3_required_3 1 j := by decide + +private theorem k8t4p4_local_3_required_3_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_3) 2 j = k8t4p4_local_3_required_3 2 j := by decide + +private theorem k8t4p4_local_3_required_3_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_3) 3 j = k8t4p4_local_3_required_3 3 j := by decide + +private theorem k8t4p4_local_3_required_3_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_3) 4 j = k8t4p4_local_3_required_3 4 j := by decide + +private theorem k8t4p4_local_3_required_3_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_3) 5 j = k8t4p4_local_3_required_3 5 j := by decide + +private theorem k8t4p4_local_3_required_3_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_3) 6 j = k8t4p4_local_3_required_3 6 j := by decide + +private theorem k8t4p4_local_3_required_3_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_3) 7 j = k8t4p4_local_3_required_3 7 j := by decide + +private theorem k8t4p4_local_3_required_3_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_3_required_block_3) 8 j = k8t4p4_local_3_required_3 8 j := by decide + +private theorem k8t4p4_local_3_required_3_eq : (requiredMatrix 8 k8t4p4_step_3_required_block_3) = k8t4p4_local_3_required_3 := by + funext i j + fin_cases i + + · exact k8t4p4_local_3_required_3_eq_row_0 j + + · exact k8t4p4_local_3_required_3_eq_row_1 j + + · exact k8t4p4_local_3_required_3_eq_row_2 j + + · exact k8t4p4_local_3_required_3_eq_row_3 j + + · exact k8t4p4_local_3_required_3_eq_row_4 j + + · exact k8t4p4_local_3_required_3_eq_row_5 j + + · exact k8t4p4_local_3_required_3_eq_row_6 j + + · exact k8t4p4_local_3_required_3_eq_row_7 j + + · exact k8t4p4_local_3_required_3_eq_row_8 j + +private theorem k8t4p4_local_3_path_3_0 : (⟨0, 3, [2, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_3_1 : (⟨0, 6, [5, 4, 3, 1, 2, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_3_2 : (⟨0, 2, [5, 6, 7, 8, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_path_3_3 : (⟨0, 1, [5, 6, 7, 8, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by decide + +private theorem k8t4p4_local_3_paths_block_3 : ∀ p ∈ k8t4p4_step_3_required_block_3, p.Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by + simp only [k8t4p4_step_3_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_3_path_3_0, k8t4p4_local_3_path_3_1, k8t4p4_local_3_path_3_2, k8t4p4_local_3_path_3_3⟩ + +private theorem k8t4p4_local_3_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_3 a b ∪ ((((k8t4p4_local_3_required_0 a b ∪ k8t4p4_local_3_required_1 a b) ∪ k8t4p4_local_3_required_2 a b) ∪ k8t4p4_local_3_required_3 a b))) 0 j = k8t4p4_local_3 0 j := by decide + +private theorem k8t4p4_local_3_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_3 a b ∪ ((((k8t4p4_local_3_required_0 a b ∪ k8t4p4_local_3_required_1 a b) ∪ k8t4p4_local_3_required_2 a b) ∪ k8t4p4_local_3_required_3 a b))) 1 j = k8t4p4_local_3 1 j := by decide + +private theorem k8t4p4_local_3_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_3 a b ∪ ((((k8t4p4_local_3_required_0 a b ∪ k8t4p4_local_3_required_1 a b) ∪ k8t4p4_local_3_required_2 a b) ∪ k8t4p4_local_3_required_3 a b))) 2 j = k8t4p4_local_3 2 j := by decide + +private theorem k8t4p4_local_3_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_3 a b ∪ ((((k8t4p4_local_3_required_0 a b ∪ k8t4p4_local_3_required_1 a b) ∪ k8t4p4_local_3_required_2 a b) ∪ k8t4p4_local_3_required_3 a b))) 3 j = k8t4p4_local_3 3 j := by decide + +private theorem k8t4p4_local_3_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_3 a b ∪ ((((k8t4p4_local_3_required_0 a b ∪ k8t4p4_local_3_required_1 a b) ∪ k8t4p4_local_3_required_2 a b) ∪ k8t4p4_local_3_required_3 a b))) 4 j = k8t4p4_local_3 4 j := by decide + +private theorem k8t4p4_local_3_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_3 a b ∪ ((((k8t4p4_local_3_required_0 a b ∪ k8t4p4_local_3_required_1 a b) ∪ k8t4p4_local_3_required_2 a b) ∪ k8t4p4_local_3_required_3 a b))) 5 j = k8t4p4_local_3 5 j := by decide + +private theorem k8t4p4_local_3_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_3 a b ∪ ((((k8t4p4_local_3_required_0 a b ∪ k8t4p4_local_3_required_1 a b) ∪ k8t4p4_local_3_required_2 a b) ∪ k8t4p4_local_3_required_3 a b))) 6 j = k8t4p4_local_3 6 j := by decide + +private theorem k8t4p4_local_3_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_3 a b ∪ ((((k8t4p4_local_3_required_0 a b ∪ k8t4p4_local_3_required_1 a b) ∪ k8t4p4_local_3_required_2 a b) ∪ k8t4p4_local_3_required_3 a b))) 7 j = k8t4p4_local_3 7 j := by decide + +private theorem k8t4p4_local_3_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_3 a b ∪ ((((k8t4p4_local_3_required_0 a b ∪ k8t4p4_local_3_required_1 a b) ∪ k8t4p4_local_3_required_2 a b) ∪ k8t4p4_local_3_required_3 a b))) 8 j = k8t4p4_local_3 8 j := by decide + +private theorem k8t4p4_local_3_merged_eq : (fun a b => freshMatrix k8t4p4_state_3 a b ∪ ((((k8t4p4_local_3_required_0 a b ∪ k8t4p4_local_3_required_1 a b) ∪ k8t4p4_local_3_required_2 a b) ∪ k8t4p4_local_3_required_3 a b))) = k8t4p4_local_3 := by + funext i j + fin_cases i + + · exact k8t4p4_local_3_merged_eq_row_0 j + + · exact k8t4p4_local_3_merged_eq_row_1 j + + · exact k8t4p4_local_3_merged_eq_row_2 j + + · exact k8t4p4_local_3_merged_eq_row_3 j + + · exact k8t4p4_local_3_merged_eq_row_4 j + + · exact k8t4p4_local_3_merged_eq_row_5 j + + · exact k8t4p4_local_3_merged_eq_row_6 j + + · exact k8t4p4_local_3_merged_eq_row_7 j + + · exact k8t4p4_local_3_merged_eq_row_8 j + +private theorem k8t4p4_local_3_eq : (fun a b => freshMatrix k8t4p4_state_3 a b ∪ requiredMatrix 8 k8t4p4_step_3_data.required a b) = k8t4p4_local_3 := by + funext a b + change freshMatrix k8t4p4_state_3 a b ∪ requiredMatrix 8 (k8t4p4_step_3_required_block_0 ++ k8t4p4_step_3_required_block_1 ++ k8t4p4_step_3_required_block_2 ++ k8t4p4_step_3_required_block_3) a b = _ + simp only [requiredMatrix_append, k8t4p4_local_3_required_0_eq, k8t4p4_local_3_required_1_eq, k8t4p4_local_3_required_2_eq, k8t4p4_local_3_required_3_eq] + exact congrFun (congrFun k8t4p4_local_3_merged_eq a) b + +private theorem k8t4p4_local_3_paths : ∀ p ∈ k8t4p4_step_3_data.required, p.Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 := by + change ∀ p ∈ (k8t4p4_step_3_required_block_0 ++ k8t4p4_step_3_required_block_1 ++ k8t4p4_step_3_required_block_2 ++ k8t4p4_step_3_required_block_3), p.Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) 8 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k8t4p4_local_3_paths_block_0, k8t4p4_local_3_paths_block_1⟩, k8t4p4_local_3_paths_block_2⟩, k8t4p4_local_3_paths_block_3⟩ + +private theorem k8t4p4_local_3_bad : k8t4p4_step_3_data.bad.Check (freshGraph k8t4p4.graph k8t4p4_step_3_data.i k8t4p4_step_3_data.j) k8t4p4_local_3 8 4 := by decide + +private theorem k8t4p4_step_3_check : k8t4p4_step_3.Check k8t4p4.graph k8t4p4_state_3 8 4 := by + change k8t4p4_step_3_data.Check k8t4p4.graph k8t4p4_state_3 8 4 + refine ⟨by decide, k8t4p4_local_3_paths, ?_⟩ + rw [k8t4p4_local_3_eq] + exact k8t4p4_local_3_bad + +private theorem k8t4p4_update_3 : k8t4p4_step_3.apply k8t4p4_state_3 = k8t4p4_state_4 := by + have h : ∀ i j : Fin 8, k8t4p4_step_3.apply k8t4p4_state_3 i j = k8t4p4_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p4_state_5 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 1 6, {1, 2}], + #[{1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[{0, 2, 3, 4, 5}, {2, 3, 4}, ∅, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, {3, 4, 5}, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_4 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 1 7, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1, 2}, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, Finset.Icc 1 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {1, 2, 3, 4, 6}, ∅], + #[Finset.Icc 2 5, {2, 3, 4}, ∅, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2}, Finset.Icc 1 5, {1, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_4_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p4_state_4 a b ∪ requiredMatrix 8 k8t4p4_step_4_data.required a b) 0 j = k8t4p4_local_4 0 j := by decide + +private theorem k8t4p4_local_4_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p4_state_4 a b ∪ requiredMatrix 8 k8t4p4_step_4_data.required a b) 1 j = k8t4p4_local_4 1 j := by decide + +private theorem k8t4p4_local_4_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p4_state_4 a b ∪ requiredMatrix 8 k8t4p4_step_4_data.required a b) 2 j = k8t4p4_local_4 2 j := by decide + +private theorem k8t4p4_local_4_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p4_state_4 a b ∪ requiredMatrix 8 k8t4p4_step_4_data.required a b) 3 j = k8t4p4_local_4 3 j := by decide + +private theorem k8t4p4_local_4_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p4_state_4 a b ∪ requiredMatrix 8 k8t4p4_step_4_data.required a b) 4 j = k8t4p4_local_4 4 j := by decide + +private theorem k8t4p4_local_4_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p4_state_4 a b ∪ requiredMatrix 8 k8t4p4_step_4_data.required a b) 5 j = k8t4p4_local_4 5 j := by decide + +private theorem k8t4p4_local_4_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p4_state_4 a b ∪ requiredMatrix 8 k8t4p4_step_4_data.required a b) 6 j = k8t4p4_local_4 6 j := by decide + +private theorem k8t4p4_local_4_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p4_state_4 a b ∪ requiredMatrix 8 k8t4p4_step_4_data.required a b) 7 j = k8t4p4_local_4 7 j := by decide + +private theorem k8t4p4_local_4_eq : (fun a b => k8t4p4_state_4 a b ∪ requiredMatrix 8 k8t4p4_step_4_data.required a b) = k8t4p4_local_4 := by + funext i j + fin_cases i + + · exact k8t4p4_local_4_eq_row_0 j + + · exact k8t4p4_local_4_eq_row_1 j + + · exact k8t4p4_local_4_eq_row_2 j + + · exact k8t4p4_local_4_eq_row_3 j + + · exact k8t4p4_local_4_eq_row_4 j + + · exact k8t4p4_local_4_eq_row_5 j + + · exact k8t4p4_local_4_eq_row_6 j + + · exact k8t4p4_local_4_eq_row_7 j + +private theorem k8t4p4_local_4_paths : ∀ p ∈ k8t4p4_step_4_data.required, p.Check (addedEdgeGraph k8t4p4.graph k8t4p4_step_4_data.i k8t4p4_step_4_data.j) 8 := by decide + +private theorem k8t4p4_local_4_bad : k8t4p4_step_4_data.bad.Check (addedEdgeGraph k8t4p4.graph k8t4p4_step_4_data.i k8t4p4_step_4_data.j) k8t4p4_local_4 8 4 := by decide + +private theorem k8t4p4_step_4_check : k8t4p4_step_4.Check k8t4p4.graph k8t4p4_state_4 8 4 := by + change k8t4p4_step_4_data.Check k8t4p4.graph k8t4p4_state_4 8 4 + refine ⟨k8t4p4_local_4_paths, ?_⟩ + rw [k8t4p4_local_4_eq] + exact k8t4p4_local_4_bad + +private theorem k8t4p4_update_4 : k8t4p4_step_4.apply k8t4p4_state_4 = k8t4p4_state_5 := by + have h : ∀ i j : Fin 8, k8t4p4_step_4.apply k8t4p4_state_4 i j = k8t4p4_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p4_state_6 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2}], + #[{1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[Finset.Icc 0 5, {2, 3, 4}, ∅, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, {3, 4, 5}, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_5 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {0, 1}, {0, 1}, Finset.Icc 0 5, {0, 1}, {1}, Finset.Icc 0 4, {0, 1}], + #[{1}, ∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 0 6, {1, 2}], + #[{0, 1}, {1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {2, 3, 4}, Finset.Icc 0 6, {1, 2}], + #[{0, 1}, {1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {0, 1}, ∅], + #[Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, Finset.Icc 0 5, {1, 2}], + #[{0, 1}, Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {0, 1, 2, 3, 4, 6}, ∅], + #[{1}, {0, 2, 3, 4, 5}, {2, 3, 4}, ∅, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 6, {0, 1}, Finset.Icc 0 5, {0, 1, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{0, 1}, {1, 2}, {1, 2}, ∅, {1, 2}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_5_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, {1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_5_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_0) 0 j = k8t4p4_local_5_required_0 0 j := by decide + +private theorem k8t4p4_local_5_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_0) 1 j = k8t4p4_local_5_required_0 1 j := by decide + +private theorem k8t4p4_local_5_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_0) 2 j = k8t4p4_local_5_required_0 2 j := by decide + +private theorem k8t4p4_local_5_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_0) 3 j = k8t4p4_local_5_required_0 3 j := by decide + +private theorem k8t4p4_local_5_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_0) 4 j = k8t4p4_local_5_required_0 4 j := by decide + +private theorem k8t4p4_local_5_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_0) 5 j = k8t4p4_local_5_required_0 5 j := by decide + +private theorem k8t4p4_local_5_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_0) 6 j = k8t4p4_local_5_required_0 6 j := by decide + +private theorem k8t4p4_local_5_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_0) 7 j = k8t4p4_local_5_required_0 7 j := by decide + +private theorem k8t4p4_local_5_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_0) 8 j = k8t4p4_local_5_required_0 8 j := by decide + +private theorem k8t4p4_local_5_required_0_eq : (requiredMatrix 8 k8t4p4_step_5_required_block_0) = k8t4p4_local_5_required_0 := by + funext i j + fin_cases i + + · exact k8t4p4_local_5_required_0_eq_row_0 j + + · exact k8t4p4_local_5_required_0_eq_row_1 j + + · exact k8t4p4_local_5_required_0_eq_row_2 j + + · exact k8t4p4_local_5_required_0_eq_row_3 j + + · exact k8t4p4_local_5_required_0_eq_row_4 j + + · exact k8t4p4_local_5_required_0_eq_row_5 j + + · exact k8t4p4_local_5_required_0_eq_row_6 j + + · exact k8t4p4_local_5_required_0_eq_row_7 j + + · exact k8t4p4_local_5_required_0_eq_row_8 j + +private theorem k8t4p4_local_5_path_0_0 : (⟨4, 0, [3, 1, 2, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_0_1 : (⟨4, 0, [3, 1, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_0_2 : (⟨4, 8, [3, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_0_3 : (⟨4, 7, [3, 2, 1, 0, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_0_4 : (⟨4, 8, [3, 2, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_0_5 : (⟨4, 7, [3, 2, 8, 1, 0, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_0_6 : (⟨4, 0, [5, 6, 7, 8, 2, 3, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_0_7 : (⟨4, 7, [5, 6, 0, 1, 2, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_0_8 : (⟨7, 0, [6, 5, 4, 3, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_0_9 : (⟨7, 0, [6, 5, 4, 3, 2, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_0_10 : (⟨7, 0, [6, 5, 4, 3, 2, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_0_11 : (⟨7, 4, [6, 0, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_paths_block_0 : ∀ p ∈ k8t4p4_step_5_required_block_0, p.Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by + simp only [k8t4p4_step_5_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_5_path_0_0, k8t4p4_local_5_path_0_1, k8t4p4_local_5_path_0_2, k8t4p4_local_5_path_0_3, k8t4p4_local_5_path_0_4, k8t4p4_local_5_path_0_5, k8t4p4_local_5_path_0_6, k8t4p4_local_5_path_0_7, k8t4p4_local_5_path_0_8, k8t4p4_local_5_path_0_9, k8t4p4_local_5_path_0_10, k8t4p4_local_5_path_0_11⟩ + +private def k8t4p4_local_5_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {4}, ∅, ∅, {1, 3, 4}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[{4}, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 3, 4}, {0}, {0}, {0, 1}, {0, 1}, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_5_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_1) 0 j = k8t4p4_local_5_required_1 0 j := by decide + +private theorem k8t4p4_local_5_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_1) 1 j = k8t4p4_local_5_required_1 1 j := by decide + +private theorem k8t4p4_local_5_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_1) 2 j = k8t4p4_local_5_required_1 2 j := by decide + +private theorem k8t4p4_local_5_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_1) 3 j = k8t4p4_local_5_required_1 3 j := by decide + +private theorem k8t4p4_local_5_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_1) 4 j = k8t4p4_local_5_required_1 4 j := by decide + +private theorem k8t4p4_local_5_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_1) 5 j = k8t4p4_local_5_required_1 5 j := by decide + +private theorem k8t4p4_local_5_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_1) 6 j = k8t4p4_local_5_required_1 6 j := by decide + +private theorem k8t4p4_local_5_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_1) 7 j = k8t4p4_local_5_required_1 7 j := by decide + +private theorem k8t4p4_local_5_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_1) 8 j = k8t4p4_local_5_required_1 8 j := by decide + +private theorem k8t4p4_local_5_required_1_eq : (requiredMatrix 8 k8t4p4_step_5_required_block_1) = k8t4p4_local_5_required_1 := by + funext i j + fin_cases i + + · exact k8t4p4_local_5_required_1_eq_row_0 j + + · exact k8t4p4_local_5_required_1_eq_row_1 j + + · exact k8t4p4_local_5_required_1_eq_row_2 j + + · exact k8t4p4_local_5_required_1_eq_row_3 j + + · exact k8t4p4_local_5_required_1_eq_row_4 j + + · exact k8t4p4_local_5_required_1_eq_row_5 j + + · exact k8t4p4_local_5_required_1_eq_row_6 j + + · exact k8t4p4_local_5_required_1_eq_row_7 j + + · exact k8t4p4_local_5_required_1_eq_row_8 j + +private theorem k8t4p4_local_5_path_1_0 : (⟨7, 5, [6, 0, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_1_1 : (⟨7, 4, [6, 0, 1, 2, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_1_2 : (⟨7, 5, [6, 0, 1, 2, 8, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_1_3 : (⟨7, 3, [8, 1, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_1_4 : (⟨7, 2, [8, 1, 0, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_1_5 : (⟨7, 0, [8, 2, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_1_6 : (⟨7, 3, [8, 2, 1, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_1_7 : (⟨7, 0, [8, 2, 3, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_1_8 : (⟨7, 4, [8, 2, 3, 1, 0, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_1_9 : (⟨7, 1, [8, 2, 3, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_1_10 : (⟨0, 4, [1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_1_11 : (⟨0, 7, [1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_paths_block_1 : ∀ p ∈ k8t4p4_step_5_required_block_1, p.Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by + simp only [k8t4p4_step_5_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_5_path_1_0, k8t4p4_local_5_path_1_1, k8t4p4_local_5_path_1_2, k8t4p4_local_5_path_1_3, k8t4p4_local_5_path_1_4, k8t4p4_local_5_path_1_5, k8t4p4_local_5_path_1_6, k8t4p4_local_5_path_1_7, k8t4p4_local_5_path_1_8, k8t4p4_local_5_path_1_9, k8t4p4_local_5_path_1_10, k8t4p4_local_5_path_1_11⟩ + +private def k8t4p4_local_5_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, {0}, {0}, {0, 1, 2, 3, 5}, {1}, {1}, {0}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2, 3, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_5_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_2) 0 j = k8t4p4_local_5_required_2 0 j := by decide + +private theorem k8t4p4_local_5_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_2) 1 j = k8t4p4_local_5_required_2 1 j := by decide + +private theorem k8t4p4_local_5_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_2) 2 j = k8t4p4_local_5_required_2 2 j := by decide + +private theorem k8t4p4_local_5_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_2) 3 j = k8t4p4_local_5_required_2 3 j := by decide + +private theorem k8t4p4_local_5_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_2) 4 j = k8t4p4_local_5_required_2 4 j := by decide + +private theorem k8t4p4_local_5_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_2) 5 j = k8t4p4_local_5_required_2 5 j := by decide + +private theorem k8t4p4_local_5_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_2) 6 j = k8t4p4_local_5_required_2 6 j := by decide + +private theorem k8t4p4_local_5_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_2) 7 j = k8t4p4_local_5_required_2 7 j := by decide + +private theorem k8t4p4_local_5_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_2) 8 j = k8t4p4_local_5_required_2 8 j := by decide + +private theorem k8t4p4_local_5_required_2_eq : (requiredMatrix 8 k8t4p4_step_5_required_block_2) = k8t4p4_local_5_required_2 := by + funext i j + fin_cases i + + · exact k8t4p4_local_5_required_2_eq_row_0 j + + · exact k8t4p4_local_5_required_2_eq_row_1 j + + · exact k8t4p4_local_5_required_2_eq_row_2 j + + · exact k8t4p4_local_5_required_2_eq_row_3 j + + · exact k8t4p4_local_5_required_2_eq_row_4 j + + · exact k8t4p4_local_5_required_2_eq_row_5 j + + · exact k8t4p4_local_5_required_2_eq_row_6 j + + · exact k8t4p4_local_5_required_2_eq_row_7 j + + · exact k8t4p4_local_5_required_2_eq_row_8 j + +private theorem k8t4p4_local_5_path_2_0 : (⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_2_1 : (⟨0, 5, [1, 2, 3, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_2_2 : (⟨0, 4, [1, 2, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_2_3 : (⟨0, 4, [1, 2, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_2_4 : (⟨0, 6, [1, 2, 8, 3, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_2_5 : (⟨0, 7, [1, 2, 8, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_2_6 : (⟨0, 4, [1, 2, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_2_7 : (⟨0, 3, [1, 2, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_2_8 : (⟨0, 4, [1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_2_9 : (⟨0, 8, [1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_2_10 : (⟨0, 2, [1, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_2_11 : (⟨0, 4, [1, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_paths_block_2 : ∀ p ∈ k8t4p4_step_5_required_block_2, p.Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by + simp only [k8t4p4_step_5_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_5_path_2_0, k8t4p4_local_5_path_2_1, k8t4p4_local_5_path_2_2, k8t4p4_local_5_path_2_3, k8t4p4_local_5_path_2_4, k8t4p4_local_5_path_2_5, k8t4p4_local_5_path_2_6, k8t4p4_local_5_path_2_7, k8t4p4_local_5_path_2_8, k8t4p4_local_5_path_2_9, k8t4p4_local_5_path_2_10, k8t4p4_local_5_path_2_11⟩ + +private def k8t4p4_local_5_required_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1}, {1}, ∅, {0}, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_5_required_3_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_3) 0 j = k8t4p4_local_5_required_3 0 j := by decide + +private theorem k8t4p4_local_5_required_3_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_3) 1 j = k8t4p4_local_5_required_3 1 j := by decide + +private theorem k8t4p4_local_5_required_3_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_3) 2 j = k8t4p4_local_5_required_3 2 j := by decide + +private theorem k8t4p4_local_5_required_3_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_3) 3 j = k8t4p4_local_5_required_3 3 j := by decide + +private theorem k8t4p4_local_5_required_3_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_3) 4 j = k8t4p4_local_5_required_3 4 j := by decide + +private theorem k8t4p4_local_5_required_3_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_3) 5 j = k8t4p4_local_5_required_3 5 j := by decide + +private theorem k8t4p4_local_5_required_3_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_3) 6 j = k8t4p4_local_5_required_3 6 j := by decide + +private theorem k8t4p4_local_5_required_3_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_3) 7 j = k8t4p4_local_5_required_3 7 j := by decide + +private theorem k8t4p4_local_5_required_3_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_5_required_block_3) 8 j = k8t4p4_local_5_required_3 8 j := by decide + +private theorem k8t4p4_local_5_required_3_eq : (requiredMatrix 8 k8t4p4_step_5_required_block_3) = k8t4p4_local_5_required_3 := by + funext i j + fin_cases i + + · exact k8t4p4_local_5_required_3_eq_row_0 j + + · exact k8t4p4_local_5_required_3_eq_row_1 j + + · exact k8t4p4_local_5_required_3_eq_row_2 j + + · exact k8t4p4_local_5_required_3_eq_row_3 j + + · exact k8t4p4_local_5_required_3_eq_row_4 j + + · exact k8t4p4_local_5_required_3_eq_row_5 j + + · exact k8t4p4_local_5_required_3_eq_row_6 j + + · exact k8t4p4_local_5_required_3_eq_row_7 j + + · exact k8t4p4_local_5_required_3_eq_row_8 j + +private theorem k8t4p4_local_5_path_3_0 : (⟨0, 3, [1, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_3_1 : (⟨0, 2, [6, 5, 4, 3, 1, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_3_2 : (⟨0, 1, [6, 5, 4, 3, 2, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_path_3_3 : (⟨0, 5, [6, 7, 8, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by decide + +private theorem k8t4p4_local_5_paths_block_3 : ∀ p ∈ k8t4p4_step_5_required_block_3, p.Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by + simp only [k8t4p4_step_5_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_5_path_3_0, k8t4p4_local_5_path_3_1, k8t4p4_local_5_path_3_2, k8t4p4_local_5_path_3_3⟩ + +private theorem k8t4p4_local_5_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_5 a b ∪ ((((k8t4p4_local_5_required_0 a b ∪ k8t4p4_local_5_required_1 a b) ∪ k8t4p4_local_5_required_2 a b) ∪ k8t4p4_local_5_required_3 a b))) 0 j = k8t4p4_local_5 0 j := by decide + +private theorem k8t4p4_local_5_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_5 a b ∪ ((((k8t4p4_local_5_required_0 a b ∪ k8t4p4_local_5_required_1 a b) ∪ k8t4p4_local_5_required_2 a b) ∪ k8t4p4_local_5_required_3 a b))) 1 j = k8t4p4_local_5 1 j := by decide + +private theorem k8t4p4_local_5_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_5 a b ∪ ((((k8t4p4_local_5_required_0 a b ∪ k8t4p4_local_5_required_1 a b) ∪ k8t4p4_local_5_required_2 a b) ∪ k8t4p4_local_5_required_3 a b))) 2 j = k8t4p4_local_5 2 j := by decide + +private theorem k8t4p4_local_5_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_5 a b ∪ ((((k8t4p4_local_5_required_0 a b ∪ k8t4p4_local_5_required_1 a b) ∪ k8t4p4_local_5_required_2 a b) ∪ k8t4p4_local_5_required_3 a b))) 3 j = k8t4p4_local_5 3 j := by decide + +private theorem k8t4p4_local_5_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_5 a b ∪ ((((k8t4p4_local_5_required_0 a b ∪ k8t4p4_local_5_required_1 a b) ∪ k8t4p4_local_5_required_2 a b) ∪ k8t4p4_local_5_required_3 a b))) 4 j = k8t4p4_local_5 4 j := by decide + +private theorem k8t4p4_local_5_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_5 a b ∪ ((((k8t4p4_local_5_required_0 a b ∪ k8t4p4_local_5_required_1 a b) ∪ k8t4p4_local_5_required_2 a b) ∪ k8t4p4_local_5_required_3 a b))) 5 j = k8t4p4_local_5 5 j := by decide + +private theorem k8t4p4_local_5_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_5 a b ∪ ((((k8t4p4_local_5_required_0 a b ∪ k8t4p4_local_5_required_1 a b) ∪ k8t4p4_local_5_required_2 a b) ∪ k8t4p4_local_5_required_3 a b))) 6 j = k8t4p4_local_5 6 j := by decide + +private theorem k8t4p4_local_5_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_5 a b ∪ ((((k8t4p4_local_5_required_0 a b ∪ k8t4p4_local_5_required_1 a b) ∪ k8t4p4_local_5_required_2 a b) ∪ k8t4p4_local_5_required_3 a b))) 7 j = k8t4p4_local_5 7 j := by decide + +private theorem k8t4p4_local_5_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_5 a b ∪ ((((k8t4p4_local_5_required_0 a b ∪ k8t4p4_local_5_required_1 a b) ∪ k8t4p4_local_5_required_2 a b) ∪ k8t4p4_local_5_required_3 a b))) 8 j = k8t4p4_local_5 8 j := by decide + +private theorem k8t4p4_local_5_merged_eq : (fun a b => freshMatrix k8t4p4_state_5 a b ∪ ((((k8t4p4_local_5_required_0 a b ∪ k8t4p4_local_5_required_1 a b) ∪ k8t4p4_local_5_required_2 a b) ∪ k8t4p4_local_5_required_3 a b))) = k8t4p4_local_5 := by + funext i j + fin_cases i + + · exact k8t4p4_local_5_merged_eq_row_0 j + + · exact k8t4p4_local_5_merged_eq_row_1 j + + · exact k8t4p4_local_5_merged_eq_row_2 j + + · exact k8t4p4_local_5_merged_eq_row_3 j + + · exact k8t4p4_local_5_merged_eq_row_4 j + + · exact k8t4p4_local_5_merged_eq_row_5 j + + · exact k8t4p4_local_5_merged_eq_row_6 j + + · exact k8t4p4_local_5_merged_eq_row_7 j + + · exact k8t4p4_local_5_merged_eq_row_8 j + +private theorem k8t4p4_local_5_eq : (fun a b => freshMatrix k8t4p4_state_5 a b ∪ requiredMatrix 8 k8t4p4_step_5_data.required a b) = k8t4p4_local_5 := by + funext a b + change freshMatrix k8t4p4_state_5 a b ∪ requiredMatrix 8 (k8t4p4_step_5_required_block_0 ++ k8t4p4_step_5_required_block_1 ++ k8t4p4_step_5_required_block_2 ++ k8t4p4_step_5_required_block_3) a b = _ + simp only [requiredMatrix_append, k8t4p4_local_5_required_0_eq, k8t4p4_local_5_required_1_eq, k8t4p4_local_5_required_2_eq, k8t4p4_local_5_required_3_eq] + exact congrFun (congrFun k8t4p4_local_5_merged_eq a) b + +private theorem k8t4p4_local_5_paths : ∀ p ∈ k8t4p4_step_5_data.required, p.Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 := by + change ∀ p ∈ (k8t4p4_step_5_required_block_0 ++ k8t4p4_step_5_required_block_1 ++ k8t4p4_step_5_required_block_2 ++ k8t4p4_step_5_required_block_3), p.Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) 8 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k8t4p4_local_5_paths_block_0, k8t4p4_local_5_paths_block_1⟩, k8t4p4_local_5_paths_block_2⟩, k8t4p4_local_5_paths_block_3⟩ + +private theorem k8t4p4_local_5_bad : k8t4p4_step_5_data.bad.Check (freshGraph k8t4p4.graph k8t4p4_step_5_data.i k8t4p4_step_5_data.j) k8t4p4_local_5 8 4 := by decide + +private theorem k8t4p4_step_5_check : k8t4p4_step_5.Check k8t4p4.graph k8t4p4_state_5 8 4 := by + change k8t4p4_step_5_data.Check k8t4p4.graph k8t4p4_state_5 8 4 + refine ⟨by decide, k8t4p4_local_5_paths, ?_⟩ + rw [k8t4p4_local_5_eq] + exact k8t4p4_local_5_bad + +private theorem k8t4p4_update_5 : k8t4p4_step_5.apply k8t4p4_state_5 = k8t4p4_state_6 := by + have h : ∀ i j : Fin 8, k8t4p4_step_5.apply k8t4p4_state_5 i j = k8t4p4_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p4_state_7 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2}], + #[{1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {0, 2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[Finset.Icc 0 5, {0, 2, 3, 4}, ∅, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, {3, 4, 5}, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_6 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 1 7, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1, 2}, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, Finset.Icc 1 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {1, 2, 3, 4, 6}, ∅], + #[Finset.Icc 0 5, {2, 3, 4}, ∅, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2}, Finset.Icc 1 5, {1, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_6_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p4_state_6 a b ∪ requiredMatrix 8 k8t4p4_step_6_data.required a b) 0 j = k8t4p4_local_6 0 j := by decide + +private theorem k8t4p4_local_6_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p4_state_6 a b ∪ requiredMatrix 8 k8t4p4_step_6_data.required a b) 1 j = k8t4p4_local_6 1 j := by decide + +private theorem k8t4p4_local_6_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p4_state_6 a b ∪ requiredMatrix 8 k8t4p4_step_6_data.required a b) 2 j = k8t4p4_local_6 2 j := by decide + +private theorem k8t4p4_local_6_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p4_state_6 a b ∪ requiredMatrix 8 k8t4p4_step_6_data.required a b) 3 j = k8t4p4_local_6 3 j := by decide + +private theorem k8t4p4_local_6_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p4_state_6 a b ∪ requiredMatrix 8 k8t4p4_step_6_data.required a b) 4 j = k8t4p4_local_6 4 j := by decide + +private theorem k8t4p4_local_6_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p4_state_6 a b ∪ requiredMatrix 8 k8t4p4_step_6_data.required a b) 5 j = k8t4p4_local_6 5 j := by decide + +private theorem k8t4p4_local_6_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p4_state_6 a b ∪ requiredMatrix 8 k8t4p4_step_6_data.required a b) 6 j = k8t4p4_local_6 6 j := by decide + +private theorem k8t4p4_local_6_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p4_state_6 a b ∪ requiredMatrix 8 k8t4p4_step_6_data.required a b) 7 j = k8t4p4_local_6 7 j := by decide + +private theorem k8t4p4_local_6_eq : (fun a b => k8t4p4_state_6 a b ∪ requiredMatrix 8 k8t4p4_step_6_data.required a b) = k8t4p4_local_6 := by + funext i j + fin_cases i + + · exact k8t4p4_local_6_eq_row_0 j + + · exact k8t4p4_local_6_eq_row_1 j + + · exact k8t4p4_local_6_eq_row_2 j + + · exact k8t4p4_local_6_eq_row_3 j + + · exact k8t4p4_local_6_eq_row_4 j + + · exact k8t4p4_local_6_eq_row_5 j + + · exact k8t4p4_local_6_eq_row_6 j + + · exact k8t4p4_local_6_eq_row_7 j + +private theorem k8t4p4_local_6_paths : ∀ p ∈ k8t4p4_step_6_data.required, p.Check (addedEdgeGraph k8t4p4.graph k8t4p4_step_6_data.i k8t4p4_step_6_data.j) 8 := by decide + +private theorem k8t4p4_local_6_bad : k8t4p4_step_6_data.bad.Check (addedEdgeGraph k8t4p4.graph k8t4p4_step_6_data.i k8t4p4_step_6_data.j) k8t4p4_local_6 8 4 := by decide + +private theorem k8t4p4_step_6_check : k8t4p4_step_6.Check k8t4p4.graph k8t4p4_state_6 8 4 := by + change k8t4p4_step_6_data.Check k8t4p4.graph k8t4p4_state_6 8 4 + refine ⟨k8t4p4_local_6_paths, ?_⟩ + rw [k8t4p4_local_6_eq] + exact k8t4p4_local_6_bad + +private theorem k8t4p4_update_6 : k8t4p4_step_6.apply k8t4p4_state_6 = k8t4p4_state_7 := by + have h : ∀ i j : Fin 8, k8t4p4_step_6.apply k8t4p4_state_6 i j = k8t4p4_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p4_state_8 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2}], + #[{1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {0, 2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4, 6}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[Finset.Icc 0 5, {0, 2, 3, 4}, ∅, {0, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, {3, 4, 5}, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_7 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2}], + #[{1, 2, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {0, 2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 6, ∅], + #[Finset.Icc 0 5, {0, 2, 3, 4}, ∅, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, {3, 4, 5}, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_7_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p4_state_7 a b ∪ requiredMatrix 8 k8t4p4_step_7_data.required a b) 0 j = k8t4p4_local_7 0 j := by decide + +private theorem k8t4p4_local_7_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p4_state_7 a b ∪ requiredMatrix 8 k8t4p4_step_7_data.required a b) 1 j = k8t4p4_local_7 1 j := by decide + +private theorem k8t4p4_local_7_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p4_state_7 a b ∪ requiredMatrix 8 k8t4p4_step_7_data.required a b) 2 j = k8t4p4_local_7 2 j := by decide + +private theorem k8t4p4_local_7_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p4_state_7 a b ∪ requiredMatrix 8 k8t4p4_step_7_data.required a b) 3 j = k8t4p4_local_7 3 j := by decide + +private theorem k8t4p4_local_7_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p4_state_7 a b ∪ requiredMatrix 8 k8t4p4_step_7_data.required a b) 4 j = k8t4p4_local_7 4 j := by decide + +private theorem k8t4p4_local_7_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p4_state_7 a b ∪ requiredMatrix 8 k8t4p4_step_7_data.required a b) 5 j = k8t4p4_local_7 5 j := by decide + +private theorem k8t4p4_local_7_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p4_state_7 a b ∪ requiredMatrix 8 k8t4p4_step_7_data.required a b) 6 j = k8t4p4_local_7 6 j := by decide + +private theorem k8t4p4_local_7_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p4_state_7 a b ∪ requiredMatrix 8 k8t4p4_step_7_data.required a b) 7 j = k8t4p4_local_7 7 j := by decide + +private theorem k8t4p4_local_7_eq : (fun a b => k8t4p4_state_7 a b ∪ requiredMatrix 8 k8t4p4_step_7_data.required a b) = k8t4p4_local_7 := by + funext i j + fin_cases i + + · exact k8t4p4_local_7_eq_row_0 j + + · exact k8t4p4_local_7_eq_row_1 j + + · exact k8t4p4_local_7_eq_row_2 j + + · exact k8t4p4_local_7_eq_row_3 j + + · exact k8t4p4_local_7_eq_row_4 j + + · exact k8t4p4_local_7_eq_row_5 j + + · exact k8t4p4_local_7_eq_row_6 j + + · exact k8t4p4_local_7_eq_row_7 j + +private theorem k8t4p4_local_7_paths : ∀ p ∈ k8t4p4_step_7_data.required, p.Check (addedEdgeGraph k8t4p4.graph k8t4p4_step_7_data.i k8t4p4_step_7_data.j) 8 := by decide + +private theorem k8t4p4_local_7_bad : k8t4p4_step_7_data.bad.Check (addedEdgeGraph k8t4p4.graph k8t4p4_step_7_data.i k8t4p4_step_7_data.j) k8t4p4_local_7 8 4 := by decide + +private theorem k8t4p4_step_7_check : k8t4p4_step_7.Check k8t4p4.graph k8t4p4_state_7 8 4 := by + change k8t4p4_step_7_data.Check k8t4p4.graph k8t4p4_state_7 8 4 + refine ⟨k8t4p4_local_7_paths, ?_⟩ + rw [k8t4p4_local_7_eq] + exact k8t4p4_local_7_bad + +private theorem k8t4p4_update_7 : k8t4p4_step_7.apply k8t4p4_state_7 = k8t4p4_state_8 := by + have h : ∀ i j : Fin 8, k8t4p4_step_7.apply k8t4p4_state_7 i j = k8t4p4_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p4_state_9 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2}], + #[{1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {0, 2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1}, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4, 6}, {3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[Finset.Icc 0 5, {0, 2, 3, 4}, ∅, {0, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1}, {3, 4, 5}, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_8 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 0 5, {0, 1}, ∅, Finset.Icc 0 4, {1}, {0, 1}, ∅, {0, 1}], + #[Finset.Icc 0 5, ∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2}], + #[{0, 1}, {1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 0 6, Finset.Icc 0 5, {0, 2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[∅, {1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, ∅, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 6, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4, 6}, {3, 4, 5}, {0, 1}], + #[{1}, Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[{0, 1}, Finset.Icc 0 5, {0, 2, 3, 4}, ∅, {0, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, {3, 4, 5}, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{0, 1}, {1, 2}, {1, 2}, ∅, {0, 1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_8_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_8 a b ∪ requiredMatrix 8 k8t4p4_step_8_data.required a b) 0 j = k8t4p4_local_8 0 j := by decide + +private theorem k8t4p4_local_8_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_8 a b ∪ requiredMatrix 8 k8t4p4_step_8_data.required a b) 1 j = k8t4p4_local_8 1 j := by decide + +private theorem k8t4p4_local_8_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_8 a b ∪ requiredMatrix 8 k8t4p4_step_8_data.required a b) 2 j = k8t4p4_local_8 2 j := by decide + +private theorem k8t4p4_local_8_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_8 a b ∪ requiredMatrix 8 k8t4p4_step_8_data.required a b) 3 j = k8t4p4_local_8 3 j := by decide + +private theorem k8t4p4_local_8_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_8 a b ∪ requiredMatrix 8 k8t4p4_step_8_data.required a b) 4 j = k8t4p4_local_8 4 j := by decide + +private theorem k8t4p4_local_8_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_8 a b ∪ requiredMatrix 8 k8t4p4_step_8_data.required a b) 5 j = k8t4p4_local_8 5 j := by decide + +private theorem k8t4p4_local_8_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_8 a b ∪ requiredMatrix 8 k8t4p4_step_8_data.required a b) 6 j = k8t4p4_local_8 6 j := by decide + +private theorem k8t4p4_local_8_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_8 a b ∪ requiredMatrix 8 k8t4p4_step_8_data.required a b) 7 j = k8t4p4_local_8 7 j := by decide + +private theorem k8t4p4_local_8_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_8 a b ∪ requiredMatrix 8 k8t4p4_step_8_data.required a b) 8 j = k8t4p4_local_8 8 j := by decide + +private theorem k8t4p4_local_8_eq : (fun a b => freshMatrix k8t4p4_state_8 a b ∪ requiredMatrix 8 k8t4p4_step_8_data.required a b) = k8t4p4_local_8 := by + funext i j + fin_cases i + + · exact k8t4p4_local_8_eq_row_0 j + + · exact k8t4p4_local_8_eq_row_1 j + + · exact k8t4p4_local_8_eq_row_2 j + + · exact k8t4p4_local_8_eq_row_3 j + + · exact k8t4p4_local_8_eq_row_4 j + + · exact k8t4p4_local_8_eq_row_5 j + + · exact k8t4p4_local_8_eq_row_6 j + + · exact k8t4p4_local_8_eq_row_7 j + + · exact k8t4p4_local_8_eq_row_8 j + +private theorem k8t4p4_local_8_paths : ∀ p ∈ k8t4p4_step_8_data.required, p.Check (freshGraph k8t4p4.graph k8t4p4_step_8_data.i k8t4p4_step_8_data.j) 8 := by decide + +private theorem k8t4p4_local_8_bad : k8t4p4_step_8_data.bad.Check (freshGraph k8t4p4.graph k8t4p4_step_8_data.i k8t4p4_step_8_data.j) k8t4p4_local_8 8 4 := by decide + +private theorem k8t4p4_step_8_check : k8t4p4_step_8.Check k8t4p4.graph k8t4p4_state_8 8 4 := by + change k8t4p4_step_8_data.Check k8t4p4.graph k8t4p4_state_8 8 4 + refine ⟨by decide, k8t4p4_local_8_paths, ?_⟩ + rw [k8t4p4_local_8_eq] + exact k8t4p4_local_8_bad + +private theorem k8t4p4_update_8 : k8t4p4_step_8.apply k8t4p4_state_8 = k8t4p4_state_9 := by + have h : ∀ i j : Fin 8, k8t4p4_step_8.apply k8t4p4_state_8 i j = k8t4p4_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p4_state_10 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2}], + #[{1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {0, 2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1}, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4, 6}, {1, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[Finset.Icc 0 5, {0, 2, 3, 4}, ∅, {0, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1}, {1, 3, 4, 5}, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_9 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, ∅, Finset.Icc 0 3, Finset.Icc 0 3, ∅, {0}], + #[Finset.Icc 0 4, ∅, {1, 2, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2}], + #[{0}, {1, 2, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 6, {1, 2}], + #[{0}, {1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {0, 1}, {1}, ∅], + #[∅, Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4, 6}, {3, 4, 5}, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, {1, 2, 3}, ∅, Finset.Icc 1 4, {2, 3, 4, 6}, {0, 1}], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 4, {0, 1}, {0, 2, 3, 4, 6}, Finset.Icc 1 4, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[∅, Finset.Icc 1 6, Finset.Icc 1 6, {1}, {3, 4, 5}, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{0}, {1, 2}, {1, 2}, ∅, ∅, {0, 1}, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_9_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, ∅, {1, 2, 3}, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, {2}, ∅, ∅, {0, 1}, {0, 1}, ∅, ∅], + #[∅, {2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 3}, {0, 1}, ∅, ∅, ∅, ∅, {4}, ∅, ∅], + #[∅, {0, 1}, ∅, ∅, ∅, {4}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_9_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_0) 0 j = k8t4p4_local_9_required_0 0 j := by decide + +private theorem k8t4p4_local_9_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_0) 1 j = k8t4p4_local_9_required_0 1 j := by decide + +private theorem k8t4p4_local_9_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_0) 2 j = k8t4p4_local_9_required_0 2 j := by decide + +private theorem k8t4p4_local_9_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_0) 3 j = k8t4p4_local_9_required_0 3 j := by decide + +private theorem k8t4p4_local_9_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_0) 4 j = k8t4p4_local_9_required_0 4 j := by decide + +private theorem k8t4p4_local_9_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_0) 5 j = k8t4p4_local_9_required_0 5 j := by decide + +private theorem k8t4p4_local_9_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_0) 6 j = k8t4p4_local_9_required_0 6 j := by decide + +private theorem k8t4p4_local_9_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_0) 7 j = k8t4p4_local_9_required_0 7 j := by decide + +private theorem k8t4p4_local_9_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_0) 8 j = k8t4p4_local_9_required_0 8 j := by decide + +private theorem k8t4p4_local_9_required_0_eq : (requiredMatrix 8 k8t4p4_step_9_required_block_0) = k8t4p4_local_9_required_0 := by + funext i j + fin_cases i + + · exact k8t4p4_local_9_required_0_eq_row_0 j + + · exact k8t4p4_local_9_required_0_eq_row_1 j + + · exact k8t4p4_local_9_required_0_eq_row_2 j + + · exact k8t4p4_local_9_required_0_eq_row_3 j + + · exact k8t4p4_local_9_required_0_eq_row_4 j + + · exact k8t4p4_local_9_required_0_eq_row_5 j + + · exact k8t4p4_local_9_required_0_eq_row_6 j + + · exact k8t4p4_local_9_required_0_eq_row_7 j + + · exact k8t4p4_local_9_required_0_eq_row_8 j + +private theorem k8t4p4_local_9_path_0_0 : (⟨1, 0, [2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_0_1 : (⟨1, 5, [2, 3, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_0_2 : (⟨1, 0, [2, 3, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_0_3 : (⟨1, 6, [2, 3, 8, 7, 0, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_0_4 : (⟨1, 6, [2, 8, 3, 4, 0, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_0_5 : (⟨1, 5, [2, 8, 3, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_0_6 : (⟨1, 0, [3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_0_7 : (⟨1, 2, [3, 4, 0, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_0_8 : (⟨5, 0, [4, 3, 1, 2, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_0_9 : (⟨5, 0, [4, 3, 1, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_0_10 : (⟨5, 0, [4, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_0_11 : (⟨5, 6, [4, 0, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_paths_block_0 : ∀ p ∈ k8t4p4_step_9_required_block_0, p.Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by + simp only [k8t4p4_step_9_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_9_path_0_0, k8t4p4_local_9_path_0_1, k8t4p4_local_9_path_0_2, k8t4p4_local_9_path_0_3, k8t4p4_local_9_path_0_4, k8t4p4_local_9_path_0_5, k8t4p4_local_9_path_0_6, k8t4p4_local_9_path_0_7, k8t4p4_local_9_path_0_8, k8t4p4_local_9_path_0_9, k8t4p4_local_9_path_0_10, k8t4p4_local_9_path_0_11⟩ + +private def k8t4p4_local_9_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, {0}, {0, 1, 2}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, {0, 1}, {0, 1}, {1}, ∅, ∅, ∅, ∅, {0, 1}], + #[{0, 1, 2}, ∅, {1}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_9_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_1) 0 j = k8t4p4_local_9_required_1 0 j := by decide + +private theorem k8t4p4_local_9_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_1) 1 j = k8t4p4_local_9_required_1 1 j := by decide + +private theorem k8t4p4_local_9_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_1) 2 j = k8t4p4_local_9_required_1 2 j := by decide + +private theorem k8t4p4_local_9_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_1) 3 j = k8t4p4_local_9_required_1 3 j := by decide + +private theorem k8t4p4_local_9_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_1) 4 j = k8t4p4_local_9_required_1 4 j := by decide + +private theorem k8t4p4_local_9_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_1) 5 j = k8t4p4_local_9_required_1 5 j := by decide + +private theorem k8t4p4_local_9_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_1) 6 j = k8t4p4_local_9_required_1 6 j := by decide + +private theorem k8t4p4_local_9_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_1) 7 j = k8t4p4_local_9_required_1 7 j := by decide + +private theorem k8t4p4_local_9_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_1) 8 j = k8t4p4_local_9_required_1 8 j := by decide + +private theorem k8t4p4_local_9_required_1_eq : (requiredMatrix 8 k8t4p4_step_9_required_block_1) = k8t4p4_local_9_required_1 := by + funext i j + fin_cases i + + · exact k8t4p4_local_9_required_1_eq_row_0 j + + · exact k8t4p4_local_9_required_1_eq_row_1 j + + · exact k8t4p4_local_9_required_1_eq_row_2 j + + · exact k8t4p4_local_9_required_1_eq_row_3 j + + · exact k8t4p4_local_9_required_1_eq_row_4 j + + · exact k8t4p4_local_9_required_1_eq_row_5 j + + · exact k8t4p4_local_9_required_1_eq_row_6 j + + · exact k8t4p4_local_9_required_1_eq_row_7 j + + · exact k8t4p4_local_9_required_1_eq_row_8 j + +private theorem k8t4p4_local_9_path_1_0 : (⟨5, 3, [4, 0, 7, 8, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_1_1 : (⟨5, 2, [4, 0, 7, 8, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_1_2 : (⟨5, 1, [4, 0, 7, 8, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_1_3 : (⟨5, 0, [6, 7, 8, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_1_4 : (⟨5, 8, [6, 7, 0, 4, 3, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_1_5 : (⟨5, 8, [6, 7, 0, 4, 3, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_1_6 : (⟨5, 2, [6, 7, 0, 4, 3, 1, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_1_7 : (⟨5, 1, [6, 7, 0, 4, 3, 2, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_1_8 : (⟨6, 0, [5, 4, 3, 1, 2, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_1_9 : (⟨6, 0, [5, 4, 3, 1, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_1_10 : (⟨6, 0, [5, 4, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_1_11 : (⟨6, 2, [5, 4, 0, 7, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_paths_block_1 : ∀ p ∈ k8t4p4_step_9_required_block_1, p.Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by + simp only [k8t4p4_step_9_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_9_path_1_0, k8t4p4_local_9_path_1_1, k8t4p4_local_9_path_1_2, k8t4p4_local_9_path_1_3, k8t4p4_local_9_path_1_4, k8t4p4_local_9_path_1_5, k8t4p4_local_9_path_1_6, k8t4p4_local_9_path_1_7, k8t4p4_local_9_path_1_8, k8t4p4_local_9_path_1_9, k8t4p4_local_9_path_1_10, k8t4p4_local_9_path_1_11⟩ + +private def k8t4p4_local_9_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {2, 3, 4}, ∅, {0}, ∅, {0}, {3}, ∅, ∅], + #[{2, 3, 4}, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3}, {0, 1}, {0}, {0, 1}, ∅, ∅, ∅, ∅, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_9_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_2) 0 j = k8t4p4_local_9_required_2 0 j := by decide + +private theorem k8t4p4_local_9_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_2) 1 j = k8t4p4_local_9_required_2 1 j := by decide + +private theorem k8t4p4_local_9_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_2) 2 j = k8t4p4_local_9_required_2 2 j := by decide + +private theorem k8t4p4_local_9_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_2) 3 j = k8t4p4_local_9_required_2 3 j := by decide + +private theorem k8t4p4_local_9_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_2) 4 j = k8t4p4_local_9_required_2 4 j := by decide + +private theorem k8t4p4_local_9_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_2) 5 j = k8t4p4_local_9_required_2 5 j := by decide + +private theorem k8t4p4_local_9_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_2) 6 j = k8t4p4_local_9_required_2 6 j := by decide + +private theorem k8t4p4_local_9_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_2) 7 j = k8t4p4_local_9_required_2 7 j := by decide + +private theorem k8t4p4_local_9_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_2) 8 j = k8t4p4_local_9_required_2 8 j := by decide + +private theorem k8t4p4_local_9_required_2_eq : (requiredMatrix 8 k8t4p4_step_9_required_block_2) = k8t4p4_local_9_required_2 := by + funext i j + fin_cases i + + · exact k8t4p4_local_9_required_2_eq_row_0 j + + · exact k8t4p4_local_9_required_2_eq_row_1 j + + · exact k8t4p4_local_9_required_2_eq_row_2 j + + · exact k8t4p4_local_9_required_2_eq_row_3 j + + · exact k8t4p4_local_9_required_2_eq_row_4 j + + · exact k8t4p4_local_9_required_2_eq_row_5 j + + · exact k8t4p4_local_9_required_2_eq_row_6 j + + · exact k8t4p4_local_9_required_2_eq_row_7 j + + · exact k8t4p4_local_9_required_2_eq_row_8 j + +private theorem k8t4p4_local_9_path_2_0 : (⟨6, 3, [5, 4, 0, 7, 8, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_2_1 : (⟨6, 3, [5, 4, 0, 7, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_2_2 : (⟨6, 2, [5, 4, 0, 7, 8, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_2_3 : (⟨6, 1, [5, 4, 0, 7, 8, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_2_4 : (⟨6, 1, [5, 4, 0, 7, 8, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_2_5 : (⟨6, 0, [7, 8, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_2_6 : (⟨6, 8, [7, 0, 4, 3, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_2_7 : (⟨0, 5, [4, 3, 1, 2, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_2_8 : (⟨0, 1, [4, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_2_9 : (⟨0, 1, [4, 3, 2, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_2_10 : (⟨0, 1, [4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_2_11 : (⟨0, 3, [4, 5, 6, 7, 8, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_paths_block_2 : ∀ p ∈ k8t4p4_step_9_required_block_2, p.Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by + simp only [k8t4p4_step_9_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_9_path_2_0, k8t4p4_local_9_path_2_1, k8t4p4_local_9_path_2_2, k8t4p4_local_9_path_2_3, k8t4p4_local_9_path_2_4, k8t4p4_local_9_path_2_5, k8t4p4_local_9_path_2_6, k8t4p4_local_9_path_2_7, k8t4p4_local_9_path_2_8, k8t4p4_local_9_path_2_9, k8t4p4_local_9_path_2_10, k8t4p4_local_9_path_2_11⟩ + +private def k8t4p4_local_9_required_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1}, {0}, ∅, ∅, ∅, {0}, ∅, {0}], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_9_required_3_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_3) 0 j = k8t4p4_local_9_required_3 0 j := by decide + +private theorem k8t4p4_local_9_required_3_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_3) 1 j = k8t4p4_local_9_required_3 1 j := by decide + +private theorem k8t4p4_local_9_required_3_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_3) 2 j = k8t4p4_local_9_required_3 2 j := by decide + +private theorem k8t4p4_local_9_required_3_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_3) 3 j = k8t4p4_local_9_required_3 3 j := by decide + +private theorem k8t4p4_local_9_required_3_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_3) 4 j = k8t4p4_local_9_required_3 4 j := by decide + +private theorem k8t4p4_local_9_required_3_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_3) 5 j = k8t4p4_local_9_required_3 5 j := by decide + +private theorem k8t4p4_local_9_required_3_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_3) 6 j = k8t4p4_local_9_required_3 6 j := by decide + +private theorem k8t4p4_local_9_required_3_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_3) 7 j = k8t4p4_local_9_required_3 7 j := by decide + +private theorem k8t4p4_local_9_required_3_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p4_step_9_required_block_3) 8 j = k8t4p4_local_9_required_3 8 j := by decide + +private theorem k8t4p4_local_9_required_3_eq : (requiredMatrix 8 k8t4p4_step_9_required_block_3) = k8t4p4_local_9_required_3 := by + funext i j + fin_cases i + + · exact k8t4p4_local_9_required_3_eq_row_0 j + + · exact k8t4p4_local_9_required_3_eq_row_1 j + + · exact k8t4p4_local_9_required_3_eq_row_2 j + + · exact k8t4p4_local_9_required_3_eq_row_3 j + + · exact k8t4p4_local_9_required_3_eq_row_4 j + + · exact k8t4p4_local_9_required_3_eq_row_5 j + + · exact k8t4p4_local_9_required_3_eq_row_6 j + + · exact k8t4p4_local_9_required_3_eq_row_7 j + + · exact k8t4p4_local_9_required_3_eq_row_8 j + +private theorem k8t4p4_local_9_path_3_0 : (⟨0, 2, [4, 5, 6, 7, 8, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_3_1 : (⟨0, 1, [4, 5, 6, 7, 8, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_3_2 : (⟨0, 1, [4, 5, 6, 7, 8, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_3_3 : (⟨0, 8, [7, 6, 5, 4, 3, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_path_3_4 : (⟨0, 6, [7, 8, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by decide + +private theorem k8t4p4_local_9_paths_block_3 : ∀ p ∈ k8t4p4_step_9_required_block_3, p.Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by + simp only [k8t4p4_step_9_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_local_9_path_3_0, k8t4p4_local_9_path_3_1, k8t4p4_local_9_path_3_2, k8t4p4_local_9_path_3_3, k8t4p4_local_9_path_3_4⟩ + +private theorem k8t4p4_local_9_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_9 a b ∪ ((((k8t4p4_local_9_required_0 a b ∪ k8t4p4_local_9_required_1 a b) ∪ k8t4p4_local_9_required_2 a b) ∪ k8t4p4_local_9_required_3 a b))) 0 j = k8t4p4_local_9 0 j := by decide + +private theorem k8t4p4_local_9_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_9 a b ∪ ((((k8t4p4_local_9_required_0 a b ∪ k8t4p4_local_9_required_1 a b) ∪ k8t4p4_local_9_required_2 a b) ∪ k8t4p4_local_9_required_3 a b))) 1 j = k8t4p4_local_9 1 j := by decide + +private theorem k8t4p4_local_9_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_9 a b ∪ ((((k8t4p4_local_9_required_0 a b ∪ k8t4p4_local_9_required_1 a b) ∪ k8t4p4_local_9_required_2 a b) ∪ k8t4p4_local_9_required_3 a b))) 2 j = k8t4p4_local_9 2 j := by decide + +private theorem k8t4p4_local_9_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_9 a b ∪ ((((k8t4p4_local_9_required_0 a b ∪ k8t4p4_local_9_required_1 a b) ∪ k8t4p4_local_9_required_2 a b) ∪ k8t4p4_local_9_required_3 a b))) 3 j = k8t4p4_local_9 3 j := by decide + +private theorem k8t4p4_local_9_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_9 a b ∪ ((((k8t4p4_local_9_required_0 a b ∪ k8t4p4_local_9_required_1 a b) ∪ k8t4p4_local_9_required_2 a b) ∪ k8t4p4_local_9_required_3 a b))) 4 j = k8t4p4_local_9 4 j := by decide + +private theorem k8t4p4_local_9_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_9 a b ∪ ((((k8t4p4_local_9_required_0 a b ∪ k8t4p4_local_9_required_1 a b) ∪ k8t4p4_local_9_required_2 a b) ∪ k8t4p4_local_9_required_3 a b))) 5 j = k8t4p4_local_9 5 j := by decide + +private theorem k8t4p4_local_9_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_9 a b ∪ ((((k8t4p4_local_9_required_0 a b ∪ k8t4p4_local_9_required_1 a b) ∪ k8t4p4_local_9_required_2 a b) ∪ k8t4p4_local_9_required_3 a b))) 6 j = k8t4p4_local_9 6 j := by decide + +private theorem k8t4p4_local_9_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_9 a b ∪ ((((k8t4p4_local_9_required_0 a b ∪ k8t4p4_local_9_required_1 a b) ∪ k8t4p4_local_9_required_2 a b) ∪ k8t4p4_local_9_required_3 a b))) 7 j = k8t4p4_local_9 7 j := by decide + +private theorem k8t4p4_local_9_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_9 a b ∪ ((((k8t4p4_local_9_required_0 a b ∪ k8t4p4_local_9_required_1 a b) ∪ k8t4p4_local_9_required_2 a b) ∪ k8t4p4_local_9_required_3 a b))) 8 j = k8t4p4_local_9 8 j := by decide + +private theorem k8t4p4_local_9_merged_eq : (fun a b => freshMatrix k8t4p4_state_9 a b ∪ ((((k8t4p4_local_9_required_0 a b ∪ k8t4p4_local_9_required_1 a b) ∪ k8t4p4_local_9_required_2 a b) ∪ k8t4p4_local_9_required_3 a b))) = k8t4p4_local_9 := by + funext i j + fin_cases i + + · exact k8t4p4_local_9_merged_eq_row_0 j + + · exact k8t4p4_local_9_merged_eq_row_1 j + + · exact k8t4p4_local_9_merged_eq_row_2 j + + · exact k8t4p4_local_9_merged_eq_row_3 j + + · exact k8t4p4_local_9_merged_eq_row_4 j + + · exact k8t4p4_local_9_merged_eq_row_5 j + + · exact k8t4p4_local_9_merged_eq_row_6 j + + · exact k8t4p4_local_9_merged_eq_row_7 j + + · exact k8t4p4_local_9_merged_eq_row_8 j + +private theorem k8t4p4_local_9_eq : (fun a b => freshMatrix k8t4p4_state_9 a b ∪ requiredMatrix 8 k8t4p4_step_9_data.required a b) = k8t4p4_local_9 := by + funext a b + change freshMatrix k8t4p4_state_9 a b ∪ requiredMatrix 8 (k8t4p4_step_9_required_block_0 ++ k8t4p4_step_9_required_block_1 ++ k8t4p4_step_9_required_block_2 ++ k8t4p4_step_9_required_block_3) a b = _ + simp only [requiredMatrix_append, k8t4p4_local_9_required_0_eq, k8t4p4_local_9_required_1_eq, k8t4p4_local_9_required_2_eq, k8t4p4_local_9_required_3_eq] + exact congrFun (congrFun k8t4p4_local_9_merged_eq a) b + +private theorem k8t4p4_local_9_paths : ∀ p ∈ k8t4p4_step_9_data.required, p.Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 := by + change ∀ p ∈ (k8t4p4_step_9_required_block_0 ++ k8t4p4_step_9_required_block_1 ++ k8t4p4_step_9_required_block_2 ++ k8t4p4_step_9_required_block_3), p.Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) 8 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k8t4p4_local_9_paths_block_0, k8t4p4_local_9_paths_block_1⟩, k8t4p4_local_9_paths_block_2⟩, k8t4p4_local_9_paths_block_3⟩ + +private theorem k8t4p4_local_9_bad : k8t4p4_step_9_data.bad.Check (freshGraph k8t4p4.graph k8t4p4_step_9_data.i k8t4p4_step_9_data.j) k8t4p4_local_9 8 4 := by decide + +private theorem k8t4p4_step_9_check : k8t4p4_step_9.Check k8t4p4.graph k8t4p4_state_9 8 4 := by + change k8t4p4_step_9_data.Check k8t4p4.graph k8t4p4_state_9 8 4 + refine ⟨by decide, k8t4p4_local_9_paths, ?_⟩ + rw [k8t4p4_local_9_eq] + exact k8t4p4_local_9_bad + +private theorem k8t4p4_update_9 : k8t4p4_step_9.apply k8t4p4_state_9 = k8t4p4_state_10 := by + have h : ∀ i j : Fin 8, k8t4p4_step_9.apply k8t4p4_state_9 i j = k8t4p4_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p4_state_11 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2}], + #[{1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {0, 2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1}, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4, 6}, {1, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4, 6}, ∅], + #[Finset.Icc 0 5, {0, 2, 3, 4}, ∅, {0, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1}, {1, 3, 4, 5}, {0, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_10 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2}], + #[{1, 2, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1}, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 6, {1, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4, 6}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 4, ∅, Finset.Icc 0 6, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1}, {1, 3, 4, 5}, {2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_10_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p4_state_10 a b ∪ requiredMatrix 8 k8t4p4_step_10_data.required a b) 0 j = k8t4p4_local_10 0 j := by decide + +private theorem k8t4p4_local_10_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p4_state_10 a b ∪ requiredMatrix 8 k8t4p4_step_10_data.required a b) 1 j = k8t4p4_local_10 1 j := by decide + +private theorem k8t4p4_local_10_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p4_state_10 a b ∪ requiredMatrix 8 k8t4p4_step_10_data.required a b) 2 j = k8t4p4_local_10 2 j := by decide + +private theorem k8t4p4_local_10_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p4_state_10 a b ∪ requiredMatrix 8 k8t4p4_step_10_data.required a b) 3 j = k8t4p4_local_10 3 j := by decide + +private theorem k8t4p4_local_10_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p4_state_10 a b ∪ requiredMatrix 8 k8t4p4_step_10_data.required a b) 4 j = k8t4p4_local_10 4 j := by decide + +private theorem k8t4p4_local_10_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p4_state_10 a b ∪ requiredMatrix 8 k8t4p4_step_10_data.required a b) 5 j = k8t4p4_local_10 5 j := by decide + +private theorem k8t4p4_local_10_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p4_state_10 a b ∪ requiredMatrix 8 k8t4p4_step_10_data.required a b) 6 j = k8t4p4_local_10 6 j := by decide + +private theorem k8t4p4_local_10_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p4_state_10 a b ∪ requiredMatrix 8 k8t4p4_step_10_data.required a b) 7 j = k8t4p4_local_10 7 j := by decide + +private theorem k8t4p4_local_10_eq : (fun a b => k8t4p4_state_10 a b ∪ requiredMatrix 8 k8t4p4_step_10_data.required a b) = k8t4p4_local_10 := by + funext i j + fin_cases i + + · exact k8t4p4_local_10_eq_row_0 j + + · exact k8t4p4_local_10_eq_row_1 j + + · exact k8t4p4_local_10_eq_row_2 j + + · exact k8t4p4_local_10_eq_row_3 j + + · exact k8t4p4_local_10_eq_row_4 j + + · exact k8t4p4_local_10_eq_row_5 j + + · exact k8t4p4_local_10_eq_row_6 j + + · exact k8t4p4_local_10_eq_row_7 j + +private theorem k8t4p4_local_10_paths : ∀ p ∈ k8t4p4_step_10_data.required, p.Check (addedEdgeGraph k8t4p4.graph k8t4p4_step_10_data.i k8t4p4_step_10_data.j) 8 := by decide + +private theorem k8t4p4_local_10_bad : k8t4p4_step_10_data.bad.Check (addedEdgeGraph k8t4p4.graph k8t4p4_step_10_data.i k8t4p4_step_10_data.j) k8t4p4_local_10 8 4 := by decide + +private theorem k8t4p4_step_10_check : k8t4p4_step_10.Check k8t4p4.graph k8t4p4_state_10 8 4 := by + change k8t4p4_step_10_data.Check k8t4p4.graph k8t4p4_state_10 8 4 + refine ⟨k8t4p4_local_10_paths, ?_⟩ + rw [k8t4p4_local_10_eq] + exact k8t4p4_local_10_bad + +private theorem k8t4p4_update_10 : k8t4p4_step_10.apply k8t4p4_state_10 = k8t4p4_state_11 := by + have h : ∀ i j : Fin 8, k8t4p4_step_10.apply k8t4p4_state_10 i j = k8t4p4_state_11 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p4_state_12 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2}], + #[{1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {0, 2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1}, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4, 6}, {1, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {0, 1, 2, 3, 4, 6}, ∅], + #[Finset.Icc 0 5, {0, 2, 3, 4}, ∅, {0, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1}, {1, 3, 4, 5}, {0, 1, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_11 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 0 3, ∅, ∅, {0, 1, 2}, ∅, {0, 1, 2}, ∅, ∅], + #[Finset.Icc 0 3, ∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2}], + #[∅, {1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 6, {1, 2}], + #[∅, {1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, {1}, {1}, ∅], + #[{0, 1, 2}, Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {0, 1, 2, 3, 4, 6}, {1, 3, 4, 5}, ∅], + #[∅, Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4, 6}, ∅], + #[{0, 1, 2}, Finset.Icc 0 5, Finset.Icc 0 4, {1}, {0, 1, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4], + #[∅, Finset.Icc 1 6, Finset.Icc 1 6, {1}, {1, 3, 4, 5}, {0, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2}, {1, 2}, ∅, ∅, ∅, Finset.Icc 0 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_11_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_11 a b ∪ requiredMatrix 8 k8t4p4_step_11_data.required a b) 0 j = k8t4p4_local_11 0 j := by decide + +private theorem k8t4p4_local_11_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_11 a b ∪ requiredMatrix 8 k8t4p4_step_11_data.required a b) 1 j = k8t4p4_local_11 1 j := by decide + +private theorem k8t4p4_local_11_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_11 a b ∪ requiredMatrix 8 k8t4p4_step_11_data.required a b) 2 j = k8t4p4_local_11 2 j := by decide + +private theorem k8t4p4_local_11_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_11 a b ∪ requiredMatrix 8 k8t4p4_step_11_data.required a b) 3 j = k8t4p4_local_11 3 j := by decide + +private theorem k8t4p4_local_11_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_11 a b ∪ requiredMatrix 8 k8t4p4_step_11_data.required a b) 4 j = k8t4p4_local_11 4 j := by decide + +private theorem k8t4p4_local_11_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_11 a b ∪ requiredMatrix 8 k8t4p4_step_11_data.required a b) 5 j = k8t4p4_local_11 5 j := by decide + +private theorem k8t4p4_local_11_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_11 a b ∪ requiredMatrix 8 k8t4p4_step_11_data.required a b) 6 j = k8t4p4_local_11 6 j := by decide + +private theorem k8t4p4_local_11_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_11 a b ∪ requiredMatrix 8 k8t4p4_step_11_data.required a b) 7 j = k8t4p4_local_11 7 j := by decide + +private theorem k8t4p4_local_11_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_11 a b ∪ requiredMatrix 8 k8t4p4_step_11_data.required a b) 8 j = k8t4p4_local_11 8 j := by decide + +private theorem k8t4p4_local_11_eq : (fun a b => freshMatrix k8t4p4_state_11 a b ∪ requiredMatrix 8 k8t4p4_step_11_data.required a b) = k8t4p4_local_11 := by + funext i j + fin_cases i + + · exact k8t4p4_local_11_eq_row_0 j + + · exact k8t4p4_local_11_eq_row_1 j + + · exact k8t4p4_local_11_eq_row_2 j + + · exact k8t4p4_local_11_eq_row_3 j + + · exact k8t4p4_local_11_eq_row_4 j + + · exact k8t4p4_local_11_eq_row_5 j + + · exact k8t4p4_local_11_eq_row_6 j + + · exact k8t4p4_local_11_eq_row_7 j + + · exact k8t4p4_local_11_eq_row_8 j + +private theorem k8t4p4_local_11_paths : ∀ p ∈ k8t4p4_step_11_data.required, p.Check (freshGraph k8t4p4.graph k8t4p4_step_11_data.i k8t4p4_step_11_data.j) 8 := by decide + +private theorem k8t4p4_local_11_bad : k8t4p4_step_11_data.bad.Check (freshGraph k8t4p4.graph k8t4p4_step_11_data.i k8t4p4_step_11_data.j) k8t4p4_local_11 8 4 := by decide + +private theorem k8t4p4_step_11_check : k8t4p4_step_11.Check k8t4p4.graph k8t4p4_state_11 8 4 := by + change k8t4p4_step_11_data.Check k8t4p4.graph k8t4p4_state_11 8 4 + refine ⟨by decide, k8t4p4_local_11_paths, ?_⟩ + rw [k8t4p4_local_11_eq] + exact k8t4p4_local_11_bad + +private theorem k8t4p4_update_11 : k8t4p4_step_11.apply k8t4p4_state_11 = k8t4p4_state_12 := by + have h : ∀ i j : Fin 8, k8t4p4_step_11.apply k8t4p4_state_11 i j = k8t4p4_state_12 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p4_state_13 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2}], + #[{1, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {0, 2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1}, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4, 6}, {1, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {0, 1, 2, 3, 4, 6}, {1}], + #[Finset.Icc 0 5, {0, 2, 3, 4}, ∅, {0, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 6, Finset.Icc 1 6, {1}, {1, 3, 4, 5}, {0, 1, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, ∅, {1}, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p4_local_12 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 0 5, {0, 1}, {1}, Finset.Icc 0 5, ∅, {0, 1}, {0, 1}, ∅], + #[Finset.Icc 0 5, ∅, {1, 2, 5, 6, 7}, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2}], + #[{0, 1}, {1, 2, 5, 6, 7}, ∅, {1, 2}, Finset.Icc 1 6, Finset.Icc 0 5, {0, 2, 3, 4}, Finset.Icc 1 6, {1, 2}], + #[{1}, {1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1}, ∅], + #[Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, {0, 1, 2, 3, 4, 6}, Finset.Icc 0 5, ∅], + #[∅, Finset.Icc 0 5, Finset.Icc 0 5, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {0, 1, 2, 3, 4, 6}, ∅], + #[{0, 1}, Finset.Icc 0 5, {0, 2, 3, 4}, ∅, {0, 1, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{0, 1}, Finset.Icc 1 6, Finset.Icc 1 6, {1}, Finset.Icc 0 5, {0, 1, 2, 3, 4, 6}, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2}, {1, 2}, ∅, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p4_local_12_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_12 a b ∪ requiredMatrix 8 k8t4p4_step_12_data.required a b) 0 j = k8t4p4_local_12 0 j := by decide + +private theorem k8t4p4_local_12_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_12 a b ∪ requiredMatrix 8 k8t4p4_step_12_data.required a b) 1 j = k8t4p4_local_12 1 j := by decide + +private theorem k8t4p4_local_12_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_12 a b ∪ requiredMatrix 8 k8t4p4_step_12_data.required a b) 2 j = k8t4p4_local_12 2 j := by decide + +private theorem k8t4p4_local_12_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_12 a b ∪ requiredMatrix 8 k8t4p4_step_12_data.required a b) 3 j = k8t4p4_local_12 3 j := by decide + +private theorem k8t4p4_local_12_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_12 a b ∪ requiredMatrix 8 k8t4p4_step_12_data.required a b) 4 j = k8t4p4_local_12 4 j := by decide + +private theorem k8t4p4_local_12_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_12 a b ∪ requiredMatrix 8 k8t4p4_step_12_data.required a b) 5 j = k8t4p4_local_12 5 j := by decide + +private theorem k8t4p4_local_12_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_12 a b ∪ requiredMatrix 8 k8t4p4_step_12_data.required a b) 6 j = k8t4p4_local_12 6 j := by decide + +private theorem k8t4p4_local_12_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_12 a b ∪ requiredMatrix 8 k8t4p4_step_12_data.required a b) 7 j = k8t4p4_local_12 7 j := by decide + +private theorem k8t4p4_local_12_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p4_state_12 a b ∪ requiredMatrix 8 k8t4p4_step_12_data.required a b) 8 j = k8t4p4_local_12 8 j := by decide + +private theorem k8t4p4_local_12_eq : (fun a b => freshMatrix k8t4p4_state_12 a b ∪ requiredMatrix 8 k8t4p4_step_12_data.required a b) = k8t4p4_local_12 := by + funext i j + fin_cases i + + · exact k8t4p4_local_12_eq_row_0 j + + · exact k8t4p4_local_12_eq_row_1 j + + · exact k8t4p4_local_12_eq_row_2 j + + · exact k8t4p4_local_12_eq_row_3 j + + · exact k8t4p4_local_12_eq_row_4 j + + · exact k8t4p4_local_12_eq_row_5 j + + · exact k8t4p4_local_12_eq_row_6 j + + · exact k8t4p4_local_12_eq_row_7 j + + · exact k8t4p4_local_12_eq_row_8 j + +private theorem k8t4p4_local_12_paths : ∀ p ∈ k8t4p4_step_12_data.required, p.Check (freshGraph k8t4p4.graph k8t4p4_step_12_data.i k8t4p4_step_12_data.j) 8 := by decide + +private theorem k8t4p4_local_12_bad : k8t4p4_step_12_data.bad.Check (freshGraph k8t4p4.graph k8t4p4_step_12_data.i k8t4p4_step_12_data.j) k8t4p4_local_12 8 4 := by decide + +private theorem k8t4p4_step_12_check : k8t4p4_step_12.Check k8t4p4.graph k8t4p4_state_12 8 4 := by + change k8t4p4_step_12_data.Check k8t4p4.graph k8t4p4_state_12 8 4 + refine ⟨by decide, k8t4p4_local_12_paths, ?_⟩ + rw [k8t4p4_local_12_eq] + exact k8t4p4_local_12_bad + +private theorem k8t4p4_update_12 : k8t4p4_step_12.apply k8t4p4_state_12 = k8t4p4_state_13 := by + have h : ∀ i j : Fin 8, k8t4p4_step_12.apply k8t4p4_state_12 i j = k8t4p4_state_13 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k8t4p4_closure_13 : ClosureCheck k8t4p4.graph k8t4p4_state_13 8 4 [] := by trivial + +private theorem k8t4p4_closure_12 : ClosureCheck k8t4p4.graph k8t4p4_state_12 8 4 [k8t4p4_step_12] := by + constructor + · exact k8t4p4_step_12_check + · rw [k8t4p4_update_12] + exact k8t4p4_closure_13 + +private theorem k8t4p4_closure_11 : ClosureCheck k8t4p4.graph k8t4p4_state_11 8 4 [k8t4p4_step_11, k8t4p4_step_12] := by + constructor + · exact k8t4p4_step_11_check + · rw [k8t4p4_update_11] + exact k8t4p4_closure_12 + +private theorem k8t4p4_closure_10 : ClosureCheck k8t4p4.graph k8t4p4_state_10 8 4 [k8t4p4_step_10, k8t4p4_step_11, k8t4p4_step_12] := by + constructor + · exact k8t4p4_step_10_check + · rw [k8t4p4_update_10] + exact k8t4p4_closure_11 + +private theorem k8t4p4_closure_9 : ClosureCheck k8t4p4.graph k8t4p4_state_9 8 4 [k8t4p4_step_9, k8t4p4_step_10, k8t4p4_step_11, k8t4p4_step_12] := by + constructor + · exact k8t4p4_step_9_check + · rw [k8t4p4_update_9] + exact k8t4p4_closure_10 + +private theorem k8t4p4_closure_8 : ClosureCheck k8t4p4.graph k8t4p4_state_8 8 4 [k8t4p4_step_8, k8t4p4_step_9, k8t4p4_step_10, k8t4p4_step_11, k8t4p4_step_12] := by + constructor + · exact k8t4p4_step_8_check + · rw [k8t4p4_update_8] + exact k8t4p4_closure_9 + +private theorem k8t4p4_closure_7 : ClosureCheck k8t4p4.graph k8t4p4_state_7 8 4 [k8t4p4_step_7, k8t4p4_step_8, k8t4p4_step_9, k8t4p4_step_10, k8t4p4_step_11, k8t4p4_step_12] := by + constructor + · exact k8t4p4_step_7_check + · rw [k8t4p4_update_7] + exact k8t4p4_closure_8 + +private theorem k8t4p4_closure_6 : ClosureCheck k8t4p4.graph k8t4p4_state_6 8 4 [k8t4p4_step_6, k8t4p4_step_7, k8t4p4_step_8, k8t4p4_step_9, k8t4p4_step_10, k8t4p4_step_11, k8t4p4_step_12] := by + constructor + · exact k8t4p4_step_6_check + · rw [k8t4p4_update_6] + exact k8t4p4_closure_7 + +private theorem k8t4p4_closure_5 : ClosureCheck k8t4p4.graph k8t4p4_state_5 8 4 [k8t4p4_step_5, k8t4p4_step_6, k8t4p4_step_7, k8t4p4_step_8, k8t4p4_step_9, k8t4p4_step_10, k8t4p4_step_11, k8t4p4_step_12] := by + constructor + · exact k8t4p4_step_5_check + · rw [k8t4p4_update_5] + exact k8t4p4_closure_6 + +private theorem k8t4p4_closure_4 : ClosureCheck k8t4p4.graph k8t4p4_state_4 8 4 [k8t4p4_step_4, k8t4p4_step_5, k8t4p4_step_6, k8t4p4_step_7, k8t4p4_step_8, k8t4p4_step_9, k8t4p4_step_10, k8t4p4_step_11, k8t4p4_step_12] := by + constructor + · exact k8t4p4_step_4_check + · rw [k8t4p4_update_4] + exact k8t4p4_closure_5 + +private theorem k8t4p4_closure_3 : ClosureCheck k8t4p4.graph k8t4p4_state_3 8 4 [k8t4p4_step_3, k8t4p4_step_4, k8t4p4_step_5, k8t4p4_step_6, k8t4p4_step_7, k8t4p4_step_8, k8t4p4_step_9, k8t4p4_step_10, k8t4p4_step_11, k8t4p4_step_12] := by + constructor + · exact k8t4p4_step_3_check + · rw [k8t4p4_update_3] + exact k8t4p4_closure_4 + +private theorem k8t4p4_closure_2 : ClosureCheck k8t4p4.graph k8t4p4_state_2 8 4 [k8t4p4_step_2, k8t4p4_step_3, k8t4p4_step_4, k8t4p4_step_5, k8t4p4_step_6, k8t4p4_step_7, k8t4p4_step_8, k8t4p4_step_9, k8t4p4_step_10, k8t4p4_step_11, k8t4p4_step_12] := by + constructor + · exact k8t4p4_step_2_check + · rw [k8t4p4_update_2] + exact k8t4p4_closure_3 + +private theorem k8t4p4_closure_1 : ClosureCheck k8t4p4.graph k8t4p4_state_1 8 4 [k8t4p4_step_1, k8t4p4_step_2, k8t4p4_step_3, k8t4p4_step_4, k8t4p4_step_5, k8t4p4_step_6, k8t4p4_step_7, k8t4p4_step_8, k8t4p4_step_9, k8t4p4_step_10, k8t4p4_step_11, k8t4p4_step_12] := by + constructor + · exact k8t4p4_step_1_check + · rw [k8t4p4_update_1] + exact k8t4p4_closure_2 + +private theorem k8t4p4_closure_0 : ClosureCheck k8t4p4.graph k8t4p4_state_0 8 4 [k8t4p4_step_0, k8t4p4_step_1, k8t4p4_step_2, k8t4p4_step_3, k8t4p4_step_4, k8t4p4_step_5, k8t4p4_step_6, k8t4p4_step_7, k8t4p4_step_8, k8t4p4_step_9, k8t4p4_step_10, k8t4p4_step_11, k8t4p4_step_12] := by + constructor + · exact k8t4p4_step_0_check + · rw [k8t4p4_update_0] + exact k8t4p4_closure_1 + +private theorem k8t4p4_matrix_eq : k8t4p4.matrix 8 = k8t4p4_state_13 := by + change closureMatrix (k8t4p4.initialMatrix 8) _ = _ + rw [k8t4p4_initial_eq] + change closureMatrix k8t4p4_state_0 [k8t4p4_step_0, k8t4p4_step_1, k8t4p4_step_2, k8t4p4_step_3, k8t4p4_step_4, k8t4p4_step_5, k8t4p4_step_6, k8t4p4_step_7, k8t4p4_step_8, k8t4p4_step_9, k8t4p4_step_10, k8t4p4_step_11, k8t4p4_step_12] = _ + simp only [closureMatrix] + rw [k8t4p4_update_0, k8t4p4_update_1, k8t4p4_update_2, k8t4p4_update_3, k8t4p4_update_4, k8t4p4_update_5, k8t4p4_update_6, k8t4p4_update_7, k8t4p4_update_8, k8t4p4_update_9, k8t4p4_update_10, k8t4p4_update_11, k8t4p4_update_12] + +private theorem k8t4p4_part_0 : k8t4p4.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p4_part_1 : k8t4p4.chains.map List.length = ([[], [], [4]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p4_part_2 : k8t4p4.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p4.clique))) = ([[], [], [4]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p4_templates_item_0 : (⟨0, 1, [], [], [], 5, 7⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_1 : (⟨0, 1, [[2, 3, 4, 5, 6, 7]], [], [], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_2 : (⟨0, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_3 : (⟨0, 3, [], [], [2], 4, 6⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_4 : (⟨0, 3, [], [], [4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_5 : (⟨0, 4, [], [], [3, 2], 3, 5⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_6 : (⟨0, 4, [], [], [5, 6, 7], 2, 4⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_7 : (⟨0, 5, [], [], [4, 3, 2], 2, 4⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_8 : (⟨0, 5, [], [], [6, 7], 3, 5⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_9 : (⟨0, 6, [], [], [5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_10 : (⟨0, 6, [], [], [7], 4, 6⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_11 : (⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_12 : (⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_13 : (⟨1, 3, [], [], [2], 4, 6⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_14 : (⟨1, 3, [], [], [4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_15 : (⟨1, 4, [], [], [3, 2], 3, 5⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_16 : (⟨1, 4, [], [], [5, 6, 7], 2, 4⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_17 : (⟨1, 5, [], [], [4, 3, 2], 2, 4⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_18 : (⟨1, 6, [], [], [5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_19 : (⟨1, 6, [], [], [7], 4, 6⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_20 : (⟨1, 7, [], [], [6, 5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_21 : (⟨2, 3, [], [], [4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_22 : (⟨2, 4, [], [], [5, 6, 7], 2, 4⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_23 : (⟨3, 4, [], [2], [5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_24 : (⟨3, 5, [], [2], [6, 7], 2, 4⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_25 : (⟨3, 6, [], [2], [7], 3, 5⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_26 : (⟨4, 5, [], [2, 3], [6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_27 : (⟨4, 6, [], [2, 3], [7], 2, 4⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_28 : (⟨5, 6, [], [2, 3, 4], [7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_29 : (⟨5, 7, [], [2, 3, 4], [], 2, 4⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_templates_item_30 : (⟨6, 7, [], [2, 3, 4, 5], [], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p4_part_3 : ∀ T ∈ k8t4p4.templates, T.Check k8t4p4.graph k8t4p4.clique 8 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_templates_item_0, k8t4p4_templates_item_1, k8t4p4_templates_item_2, k8t4p4_templates_item_3, k8t4p4_templates_item_4, k8t4p4_templates_item_5, k8t4p4_templates_item_6, k8t4p4_templates_item_7, k8t4p4_templates_item_8, k8t4p4_templates_item_9, k8t4p4_templates_item_10, k8t4p4_templates_item_11, k8t4p4_templates_item_12, k8t4p4_templates_item_13, k8t4p4_templates_item_14, k8t4p4_templates_item_15, k8t4p4_templates_item_16, k8t4p4_templates_item_17, k8t4p4_templates_item_18, k8t4p4_templates_item_19, k8t4p4_templates_item_20, k8t4p4_templates_item_21, k8t4p4_templates_item_22, k8t4p4_templates_item_23, k8t4p4_templates_item_24, k8t4p4_templates_item_25, k8t4p4_templates_item_26, k8t4p4_templates_item_27, k8t4p4_templates_item_28, k8t4p4_templates_item_29, k8t4p4_templates_item_30⟩ + +private theorem k8t4p4_required_item_0 : (⟨3, 5, [4]⟩ : RequiredPathData (Fin 8)).Check k8t4p4.graph 8 := by decide + +private theorem k8t4p4_required_item_1 : (⟨4, 6, [5]⟩ : RequiredPathData (Fin 8)).Check k8t4p4.graph 8 := by decide + +private theorem k8t4p4_part_4 : ∀ p ∈ k8t4p4.required, p.Check k8t4p4.graph 8 := by + simp only [k8t4p4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p4_required_item_0, k8t4p4_required_item_1⟩ + +private theorem k8t4p4_part_5 : ClosureCheck k8t4p4.graph (k8t4p4.initialMatrix 8) 8 4 k8t4p4.closure := by + rw [k8t4p4_initial_eq] + exact k8t4p4_closure_0 + +private theorem k8t4p4_part_6 : k8t4p4.bad.Check k8t4p4.graph (k8t4p4.matrix 8) 8 4 := by + rw [k8t4p4_matrix_eq] + decide + +theorem k8t4p4_check : k8t4p4.Check 8 4 [[], [], [4]] := + ⟨k8t4p4_part_0, k8t4p4_part_1, k8t4p4_part_2, k8t4p4_part_3, k8t4p4_part_4, k8t4p4_part_5, k8t4p4_part_6⟩ +def k8t4p5 : LayoutCertificate 6 where + chains := [[0], [1, 2, 3, 4, 5]] + clique := {0, 1, 3, 5} + templates := [⟨0, 1, [], [], [], 2, 7⟩, + ⟨0, 1, [], [], [2, 3, 4, 5], 1, 3⟩, + ⟨0, 2, [], [], [1], 1, 6⟩, + ⟨0, 4, [], [], [3], 1, 6⟩, + ⟨0, 5, [], [], [], 2, 7⟩, + ⟨0, 5, [], [], [4, 3, 2, 1], 1, 3⟩, + ⟨1, 2, [], [], [3], 1, 6⟩, + ⟨1, 4, [], [], [3], 1, 6⟩, + ⟨2, 3, [], [1], [], 1, 6⟩, + ⟨2, 4, [], [1], [3], 1, 5⟩, + ⟨2, 5, [], [1], [], 1, 6⟩, + ⟨3, 4, [], [], [5], 1, 6⟩, + ⟨4, 5, [], [3], [], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(2, 3), (0, 3), (4, 2), (1, 3)}⟩ + + +private def k8t4p5_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p5_initial_eq_row_0 : ∀ j : Fin 6, (k8t4p5.initialMatrix 8) 0 j = k8t4p5_state_0 0 j := by decide + +private theorem k8t4p5_initial_eq_row_1 : ∀ j : Fin 6, (k8t4p5.initialMatrix 8) 1 j = k8t4p5_state_0 1 j := by decide + +private theorem k8t4p5_initial_eq_row_2 : ∀ j : Fin 6, (k8t4p5.initialMatrix 8) 2 j = k8t4p5_state_0 2 j := by decide + +private theorem k8t4p5_initial_eq_row_3 : ∀ j : Fin 6, (k8t4p5.initialMatrix 8) 3 j = k8t4p5_state_0 3 j := by decide + +private theorem k8t4p5_initial_eq_row_4 : ∀ j : Fin 6, (k8t4p5.initialMatrix 8) 4 j = k8t4p5_state_0 4 j := by decide + +private theorem k8t4p5_initial_eq_row_5 : ∀ j : Fin 6, (k8t4p5.initialMatrix 8) 5 j = k8t4p5_state_0 5 j := by decide + +private theorem k8t4p5_initial_eq : (k8t4p5.initialMatrix 8) = k8t4p5_state_0 := by + funext i j + fin_cases i + + · exact k8t4p5_initial_eq_row_0 j + + · exact k8t4p5_initial_eq_row_1 j + + · exact k8t4p5_initial_eq_row_2 j + + · exact k8t4p5_initial_eq_row_3 j + + · exact k8t4p5_initial_eq_row_4 j + + · exact k8t4p5_initial_eq_row_5 j + +private theorem k8t4p5_closure_0 : ClosureCheck k8t4p5.graph k8t4p5_state_0 8 4 [] := by trivial + +private theorem k8t4p5_matrix_eq : k8t4p5.matrix 8 = k8t4p5_state_0 := by + change closureMatrix (k8t4p5.initialMatrix 8) _ = _ + rw [k8t4p5_initial_eq] + change closureMatrix k8t4p5_state_0 [] = _ + rfl + +private theorem k8t4p5_part_0 : k8t4p5.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p5_part_1 : k8t4p5.chains.map List.length = ([[], [1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p5_part_2 : k8t4p5.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p5.clique))) = ([[], [1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p5_templates_item_0 : (⟨0, 1, [], [], [], 2, 7⟩ : TemplateData (Fin 6)).Check k8t4p5.graph k8t4p5.clique 8 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p5_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5], 1, 3⟩ : TemplateData (Fin 6)).Check k8t4p5.graph k8t4p5.clique 8 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p5_templates_item_2 : (⟨0, 2, [], [], [1], 1, 6⟩ : TemplateData (Fin 6)).Check k8t4p5.graph k8t4p5.clique 8 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p5_templates_item_3 : (⟨0, 4, [], [], [3], 1, 6⟩ : TemplateData (Fin 6)).Check k8t4p5.graph k8t4p5.clique 8 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p5_templates_item_4 : (⟨0, 5, [], [], [], 2, 7⟩ : TemplateData (Fin 6)).Check k8t4p5.graph k8t4p5.clique 8 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p5_templates_item_5 : (⟨0, 5, [], [], [4, 3, 2, 1], 1, 3⟩ : TemplateData (Fin 6)).Check k8t4p5.graph k8t4p5.clique 8 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p5_templates_item_6 : (⟨1, 2, [], [], [3], 1, 6⟩ : TemplateData (Fin 6)).Check k8t4p5.graph k8t4p5.clique 8 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p5_templates_item_7 : (⟨1, 4, [], [], [3], 1, 6⟩ : TemplateData (Fin 6)).Check k8t4p5.graph k8t4p5.clique 8 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p5_templates_item_8 : (⟨2, 3, [], [1], [], 1, 6⟩ : TemplateData (Fin 6)).Check k8t4p5.graph k8t4p5.clique 8 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p5_templates_item_9 : (⟨2, 4, [], [1], [3], 1, 5⟩ : TemplateData (Fin 6)).Check k8t4p5.graph k8t4p5.clique 8 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p5_templates_item_10 : (⟨2, 5, [], [1], [], 1, 6⟩ : TemplateData (Fin 6)).Check k8t4p5.graph k8t4p5.clique 8 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p5_templates_item_11 : (⟨3, 4, [], [], [5], 1, 6⟩ : TemplateData (Fin 6)).Check k8t4p5.graph k8t4p5.clique 8 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p5_templates_item_12 : (⟨4, 5, [], [3], [], 1, 6⟩ : TemplateData (Fin 6)).Check k8t4p5.graph k8t4p5.clique 8 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p5_part_3 : ∀ T ∈ k8t4p5.templates, T.Check k8t4p5.graph k8t4p5.clique 8 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p5, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p5_templates_item_0, k8t4p5_templates_item_1, k8t4p5_templates_item_2, k8t4p5_templates_item_3, k8t4p5_templates_item_4, k8t4p5_templates_item_5, k8t4p5_templates_item_6, k8t4p5_templates_item_7, k8t4p5_templates_item_8, k8t4p5_templates_item_9, k8t4p5_templates_item_10, k8t4p5_templates_item_11, k8t4p5_templates_item_12⟩ + +private theorem k8t4p5_part_4 : ∀ p ∈ k8t4p5.required, p.Check k8t4p5.graph 8 := by decide + +private theorem k8t4p5_part_5 : ClosureCheck k8t4p5.graph (k8t4p5.initialMatrix 8) 8 4 k8t4p5.closure := by + rw [k8t4p5_initial_eq] + exact k8t4p5_closure_0 + +private theorem k8t4p5_part_6 : k8t4p5.bad.Check k8t4p5.graph (k8t4p5.matrix 8) 8 4 := by + rw [k8t4p5_matrix_eq] + decide + +theorem k8t4p5_check : k8t4p5.Check 8 4 [[], [1, 1]] := + ⟨k8t4p5_part_0, k8t4p5_part_1, k8t4p5_part_2, k8t4p5_part_3, k8t4p5_part_4, k8t4p5_part_5, k8t4p5_part_6⟩ +def k8t4p6 : LayoutCertificate 7 where + chains := [[0], [1, 2, 3, 4, 5, 6]] + clique := {0, 1, 3, 6} + templates := [⟨0, 1, [], [], [], 3, 7⟩, + ⟨0, 1, [[3, 4, 5, 6]], [], [], 2, 3⟩, + ⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 2⟩, + ⟨0, 2, [], [], [1], 2, 6⟩, + ⟨0, 2, [[3, 4, 5, 6]], [], [1], 1, 2⟩, + ⟨0, 4, [], [], [3], 2, 6⟩, + ⟨0, 4, [], [], [5, 6], 1, 5⟩, + ⟨0, 5, [], [], [4, 3], 1, 5⟩, + ⟨0, 6, [], [], [5, 4, 3], 2, 4⟩, + ⟨0, 6, [], [], [5, 4, 3, 2, 1], 1, 2⟩, + ⟨1, 2, [], [], [3], 2, 6⟩, + ⟨1, 2, [], [], [3, 4, 5, 6], 1, 3⟩, + ⟨1, 4, [], [], [3], 2, 6⟩, + ⟨1, 4, [], [], [5, 6], 1, 5⟩, + ⟨1, 5, [], [], [4, 3], 1, 5⟩, + ⟨2, 3, [], [1], [], 2, 6⟩, + ⟨2, 3, [], [1], [4, 5, 6], 1, 3⟩, + ⟨2, 4, [], [1], [3], 1, 5⟩, + ⟨2, 5, [], [1], [4, 3], 1, 4⟩, + ⟨2, 6, [], [1], [], 2, 6⟩, + ⟨2, 6, [], [1], [5, 4, 3], 1, 3⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (2, 3), (1, 3)}⟩ + + +private def k8t4p6_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 6], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p6_initial_eq_row_0 : ∀ j : Fin 7, (k8t4p6.initialMatrix 8) 0 j = k8t4p6_state_0 0 j := by decide + +private theorem k8t4p6_initial_eq_row_1 : ∀ j : Fin 7, (k8t4p6.initialMatrix 8) 1 j = k8t4p6_state_0 1 j := by decide + +private theorem k8t4p6_initial_eq_row_2 : ∀ j : Fin 7, (k8t4p6.initialMatrix 8) 2 j = k8t4p6_state_0 2 j := by decide + +private theorem k8t4p6_initial_eq_row_3 : ∀ j : Fin 7, (k8t4p6.initialMatrix 8) 3 j = k8t4p6_state_0 3 j := by decide + +private theorem k8t4p6_initial_eq_row_4 : ∀ j : Fin 7, (k8t4p6.initialMatrix 8) 4 j = k8t4p6_state_0 4 j := by decide + +private theorem k8t4p6_initial_eq_row_5 : ∀ j : Fin 7, (k8t4p6.initialMatrix 8) 5 j = k8t4p6_state_0 5 j := by decide + +private theorem k8t4p6_initial_eq_row_6 : ∀ j : Fin 7, (k8t4p6.initialMatrix 8) 6 j = k8t4p6_state_0 6 j := by decide + +private theorem k8t4p6_initial_eq : (k8t4p6.initialMatrix 8) = k8t4p6_state_0 := by + funext i j + fin_cases i + + · exact k8t4p6_initial_eq_row_0 j + + · exact k8t4p6_initial_eq_row_1 j + + · exact k8t4p6_initial_eq_row_2 j + + · exact k8t4p6_initial_eq_row_3 j + + · exact k8t4p6_initial_eq_row_4 j + + · exact k8t4p6_initial_eq_row_5 j + + · exact k8t4p6_initial_eq_row_6 j + +private theorem k8t4p6_closure_0 : ClosureCheck k8t4p6.graph k8t4p6_state_0 8 4 [] := by trivial + +private theorem k8t4p6_matrix_eq : k8t4p6.matrix 8 = k8t4p6_state_0 := by + change closureMatrix (k8t4p6.initialMatrix 8) _ = _ + rw [k8t4p6_initial_eq] + change closureMatrix k8t4p6_state_0 [] = _ + rfl + +private theorem k8t4p6_part_0 : k8t4p6.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p6_part_1 : k8t4p6.chains.map List.length = ([[], [1, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p6_part_2 : k8t4p6.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p6.clique))) = ([[], [1, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p6_templates_item_0 : (⟨0, 1, [], [], [], 3, 7⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6]], [], [], 2, 3⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_2 : (⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_3 : (⟨0, 2, [], [], [1], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_4 : (⟨0, 2, [[3, 4, 5, 6]], [], [1], 1, 2⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_5 : (⟨0, 4, [], [], [3], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_6 : (⟨0, 4, [], [], [5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_7 : (⟨0, 5, [], [], [4, 3], 1, 5⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_8 : (⟨0, 6, [], [], [5, 4, 3], 2, 4⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_9 : (⟨0, 6, [], [], [5, 4, 3, 2, 1], 1, 2⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_10 : (⟨1, 2, [], [], [3], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_11 : (⟨1, 2, [], [], [3, 4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_12 : (⟨1, 4, [], [], [3], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_13 : (⟨1, 4, [], [], [5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_14 : (⟨1, 5, [], [], [4, 3], 1, 5⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_15 : (⟨2, 3, [], [1], [], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_16 : (⟨2, 3, [], [1], [4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_17 : (⟨2, 4, [], [1], [3], 1, 5⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_18 : (⟨2, 5, [], [1], [4, 3], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_19 : (⟨2, 6, [], [1], [], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_templates_item_20 : (⟨2, 6, [], [1], [5, 4, 3], 1, 3⟩ : TemplateData (Fin 7)).Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p6_part_3 : ∀ T ∈ k8t4p6.templates, T.Check k8t4p6.graph k8t4p6.clique 8 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p6, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p6_templates_item_0, k8t4p6_templates_item_1, k8t4p6_templates_item_2, k8t4p6_templates_item_3, k8t4p6_templates_item_4, k8t4p6_templates_item_5, k8t4p6_templates_item_6, k8t4p6_templates_item_7, k8t4p6_templates_item_8, k8t4p6_templates_item_9, k8t4p6_templates_item_10, k8t4p6_templates_item_11, k8t4p6_templates_item_12, k8t4p6_templates_item_13, k8t4p6_templates_item_14, k8t4p6_templates_item_15, k8t4p6_templates_item_16, k8t4p6_templates_item_17, k8t4p6_templates_item_18, k8t4p6_templates_item_19, k8t4p6_templates_item_20⟩ + +private theorem k8t4p6_part_4 : ∀ p ∈ k8t4p6.required, p.Check k8t4p6.graph 8 := by decide + +private theorem k8t4p6_part_5 : ClosureCheck k8t4p6.graph (k8t4p6.initialMatrix 8) 8 4 k8t4p6.closure := by + rw [k8t4p6_initial_eq] + exact k8t4p6_closure_0 + +private theorem k8t4p6_part_6 : k8t4p6.bad.Check k8t4p6.graph (k8t4p6.matrix 8) 8 4 := by + rw [k8t4p6_matrix_eq] + decide + +theorem k8t4p6_check : k8t4p6.Check 8 4 [[], [1, 2]] := + ⟨k8t4p6_part_0, k8t4p6_part_1, k8t4p6_part_2, k8t4p6_part_3, k8t4p6_part_4, k8t4p6_part_5, k8t4p6_part_6⟩ +def k8t4p7 : LayoutCertificate 8 where + chains := [[0], [1, 2, 3, 4, 5, 6, 7]] + clique := {0, 1, 3, 7} + templates := [⟨0, 1, [[3, 4, 5, 6, 7]], [], [], 2, 2⟩, + ⟨0, 1, [], [], [2, 3, 4, 5, 6, 7], 1, 1⟩, + ⟨0, 2, [], [], [1], 3, 6⟩, + ⟨0, 2, [[3, 4, 5, 6, 7]], [], [1], 1, 1⟩, + ⟨0, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩, + ⟨0, 4, [], [], [5, 6, 7], 1, 4⟩, + ⟨0, 6, [], [], [5, 4, 3], 1, 4⟩, + ⟨0, 6, [], [], [7], 3, 6⟩, + ⟨0, 7, [], [], [], 4, 7⟩, + ⟨0, 7, [], [], [6, 5, 4, 3], 2, 3⟩, + ⟨0, 7, [], [], [6, 5, 4, 3, 2, 1], 1, 1⟩, + ⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩, + ⟨1, 6, [], [], [5, 4, 3], 1, 4⟩, + ⟨2, 3, [], [1], [4, 5, 6, 7], 1, 2⟩, + ⟨2, 4, [], [1], [3], 2, 5⟩, + ⟨2, 4, [], [1], [5, 6, 7], 1, 3⟩, + ⟨2, 5, [], [1], [4, 3], 1, 4⟩, + ⟨2, 6, [], [1], [5, 4, 3], 1, 3⟩, + ⟨2, 6, [], [1], [7], 2, 5⟩, + ⟨2, 7, [], [1], [], 3, 6⟩, + ⟨2, 7, [], [1], [6, 5, 4, 3], 1, 2⟩, + ⟨5, 6, [], [3, 4], [7], 1, 4⟩, + ⟨6, 7, [], [3, 4, 5], [], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(2, 3), (0, 3), (6, 2), (7, 1)}⟩ + + +private def k8t4p7_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2}, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 2}, ∅, {1, 2}, ∅, ∅, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, {1, 2}, ∅, {1, 2}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p7_initial_eq_row_0 : ∀ j : Fin 8, (k8t4p7.initialMatrix 8) 0 j = k8t4p7_state_0 0 j := by decide + +private theorem k8t4p7_initial_eq_row_1 : ∀ j : Fin 8, (k8t4p7.initialMatrix 8) 1 j = k8t4p7_state_0 1 j := by decide + +private theorem k8t4p7_initial_eq_row_2 : ∀ j : Fin 8, (k8t4p7.initialMatrix 8) 2 j = k8t4p7_state_0 2 j := by decide + +private theorem k8t4p7_initial_eq_row_3 : ∀ j : Fin 8, (k8t4p7.initialMatrix 8) 3 j = k8t4p7_state_0 3 j := by decide + +private theorem k8t4p7_initial_eq_row_4 : ∀ j : Fin 8, (k8t4p7.initialMatrix 8) 4 j = k8t4p7_state_0 4 j := by decide + +private theorem k8t4p7_initial_eq_row_5 : ∀ j : Fin 8, (k8t4p7.initialMatrix 8) 5 j = k8t4p7_state_0 5 j := by decide + +private theorem k8t4p7_initial_eq_row_6 : ∀ j : Fin 8, (k8t4p7.initialMatrix 8) 6 j = k8t4p7_state_0 6 j := by decide + +private theorem k8t4p7_initial_eq_row_7 : ∀ j : Fin 8, (k8t4p7.initialMatrix 8) 7 j = k8t4p7_state_0 7 j := by decide + +private theorem k8t4p7_initial_eq : (k8t4p7.initialMatrix 8) = k8t4p7_state_0 := by + funext i j + fin_cases i + + · exact k8t4p7_initial_eq_row_0 j + + · exact k8t4p7_initial_eq_row_1 j + + · exact k8t4p7_initial_eq_row_2 j + + · exact k8t4p7_initial_eq_row_3 j + + · exact k8t4p7_initial_eq_row_4 j + + · exact k8t4p7_initial_eq_row_5 j + + · exact k8t4p7_initial_eq_row_6 j + + · exact k8t4p7_initial_eq_row_7 j + +private theorem k8t4p7_closure_0 : ClosureCheck k8t4p7.graph k8t4p7_state_0 8 4 [] := by trivial + +private theorem k8t4p7_matrix_eq : k8t4p7.matrix 8 = k8t4p7_state_0 := by + change closureMatrix (k8t4p7.initialMatrix 8) _ = _ + rw [k8t4p7_initial_eq] + change closureMatrix k8t4p7_state_0 [] = _ + rfl + +private theorem k8t4p7_part_0 : k8t4p7.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p7_part_1 : k8t4p7.chains.map List.length = ([[], [1, 3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p7_part_2 : k8t4p7.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p7.clique))) = ([[], [1, 3]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p7_templates_item_0 : (⟨0, 1, [[3, 4, 5, 6, 7]], [], [], 2, 2⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5, 6, 7], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_2 : (⟨0, 2, [], [], [1], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_3 : (⟨0, 2, [[3, 4, 5, 6, 7]], [], [1], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_4 : (⟨0, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_5 : (⟨0, 4, [], [], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_6 : (⟨0, 6, [], [], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_7 : (⟨0, 6, [], [], [7], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_8 : (⟨0, 7, [], [], [], 4, 7⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_9 : (⟨0, 7, [], [], [6, 5, 4, 3], 2, 3⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_10 : (⟨0, 7, [], [], [6, 5, 4, 3, 2, 1], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_11 : (⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_12 : (⟨1, 6, [], [], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_13 : (⟨2, 3, [], [1], [4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_14 : (⟨2, 4, [], [1], [3], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_15 : (⟨2, 4, [], [1], [5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_16 : (⟨2, 5, [], [1], [4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_17 : (⟨2, 6, [], [1], [5, 4, 3], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_18 : (⟨2, 6, [], [1], [7], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_19 : (⟨2, 7, [], [1], [], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_20 : (⟨2, 7, [], [1], [6, 5, 4, 3], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_21 : (⟨5, 6, [], [3, 4], [7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_templates_item_22 : (⟨6, 7, [], [3, 4, 5], [], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p7_part_3 : ∀ T ∈ k8t4p7.templates, T.Check k8t4p7.graph k8t4p7.clique 8 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p7, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p7_templates_item_0, k8t4p7_templates_item_1, k8t4p7_templates_item_2, k8t4p7_templates_item_3, k8t4p7_templates_item_4, k8t4p7_templates_item_5, k8t4p7_templates_item_6, k8t4p7_templates_item_7, k8t4p7_templates_item_8, k8t4p7_templates_item_9, k8t4p7_templates_item_10, k8t4p7_templates_item_11, k8t4p7_templates_item_12, k8t4p7_templates_item_13, k8t4p7_templates_item_14, k8t4p7_templates_item_15, k8t4p7_templates_item_16, k8t4p7_templates_item_17, k8t4p7_templates_item_18, k8t4p7_templates_item_19, k8t4p7_templates_item_20, k8t4p7_templates_item_21, k8t4p7_templates_item_22⟩ + +private theorem k8t4p7_part_4 : ∀ p ∈ k8t4p7.required, p.Check k8t4p7.graph 8 := by decide + +private theorem k8t4p7_part_5 : ClosureCheck k8t4p7.graph (k8t4p7.initialMatrix 8) 8 4 k8t4p7.closure := by + rw [k8t4p7_initial_eq] + exact k8t4p7_closure_0 + +private theorem k8t4p7_part_6 : k8t4p7.bad.Check k8t4p7.graph (k8t4p7.matrix 8) 8 4 := by + rw [k8t4p7_matrix_eq] + decide + +theorem k8t4p7_check : k8t4p7.Check 8 4 [[], [1, 3]] := + ⟨k8t4p7_part_0, k8t4p7_part_1, k8t4p7_part_2, k8t4p7_part_3, k8t4p7_part_4, k8t4p7_part_5, k8t4p7_part_6⟩ +def k8t4p8 : LayoutCertificate 8 where + chains := [[0], [1, 2, 3, 4, 5, 6, 7]] + clique := {0, 1, 4, 7} + templates := [⟨0, 1, [], [], [2, 3, 4, 5, 6, 7], 1, 1⟩, + ⟨0, 2, [], [], [1], 3, 6⟩, + ⟨0, 2, [], [], [3, 4], 2, 5⟩, + ⟨0, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩, + ⟨0, 3, [], [], [2, 1], 2, 5⟩, + ⟨0, 3, [[4, 5, 6, 7]], [], [2, 1], 1, 1⟩, + ⟨0, 5, [], [], [6, 7], 2, 5⟩, + ⟨0, 5, [[1, 2, 3, 4]], [], [6, 7], 1, 1⟩, + ⟨0, 6, [], [], [5, 4], 2, 5⟩, + ⟨0, 6, [], [], [5, 4, 3, 2, 1], 1, 2⟩, + ⟨0, 7, [], [], [6, 5, 4, 3, 2, 1], 1, 1⟩, + ⟨1, 2, [], [], [3, 4], 2, 5⟩, + ⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩, + ⟨2, 3, [], [1], [4], 2, 5⟩, + ⟨2, 3, [], [1], [4, 5, 6, 7], 1, 2⟩, + ⟨2, 5, [], [1], [4], 2, 5⟩, + ⟨2, 5, [], [1], [6, 7], 1, 4⟩, + ⟨2, 6, [], [1], [5, 4], 1, 4⟩, + ⟨2, 6, [], [1], [7], 2, 5⟩, + ⟨3, 4, [], [1, 2], [5, 6, 7], 1, 2⟩, + ⟨3, 5, [], [1, 2], [4], 1, 4⟩, + ⟨3, 6, [], [1, 2], [5, 4], 1, 3⟩, + ⟨3, 6, [], [1, 2], [7], 1, 4⟩, + ⟨3, 7, [], [1, 2], [6, 5, 4], 1, 2⟩, + ⟨5, 6, [], [1, 2, 3, 4], [7], 1, 2⟩, + ⟨6, 7, [], [1, 2, 3, 4, 5], [], 1, 2⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (2, 3), (6, 2), (3, 2)}⟩ + + +private def k8t4p8_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1}, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 5, {1}], + #[{1}, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, {1, 2}, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2}], + #[∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅, ∅, {1, 2}, ∅], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅, {1, 2}, ∅, {1, 2}], + #[{1}, ∅, ∅, {1, 2}, ∅, ∅, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p8_initial_eq_row_0 : ∀ j : Fin 8, (k8t4p8.initialMatrix 8) 0 j = k8t4p8_state_0 0 j := by decide + +private theorem k8t4p8_initial_eq_row_1 : ∀ j : Fin 8, (k8t4p8.initialMatrix 8) 1 j = k8t4p8_state_0 1 j := by decide + +private theorem k8t4p8_initial_eq_row_2 : ∀ j : Fin 8, (k8t4p8.initialMatrix 8) 2 j = k8t4p8_state_0 2 j := by decide + +private theorem k8t4p8_initial_eq_row_3 : ∀ j : Fin 8, (k8t4p8.initialMatrix 8) 3 j = k8t4p8_state_0 3 j := by decide + +private theorem k8t4p8_initial_eq_row_4 : ∀ j : Fin 8, (k8t4p8.initialMatrix 8) 4 j = k8t4p8_state_0 4 j := by decide + +private theorem k8t4p8_initial_eq_row_5 : ∀ j : Fin 8, (k8t4p8.initialMatrix 8) 5 j = k8t4p8_state_0 5 j := by decide + +private theorem k8t4p8_initial_eq_row_6 : ∀ j : Fin 8, (k8t4p8.initialMatrix 8) 6 j = k8t4p8_state_0 6 j := by decide + +private theorem k8t4p8_initial_eq_row_7 : ∀ j : Fin 8, (k8t4p8.initialMatrix 8) 7 j = k8t4p8_state_0 7 j := by decide + +private theorem k8t4p8_initial_eq : (k8t4p8.initialMatrix 8) = k8t4p8_state_0 := by + funext i j + fin_cases i + + · exact k8t4p8_initial_eq_row_0 j + + · exact k8t4p8_initial_eq_row_1 j + + · exact k8t4p8_initial_eq_row_2 j + + · exact k8t4p8_initial_eq_row_3 j + + · exact k8t4p8_initial_eq_row_4 j + + · exact k8t4p8_initial_eq_row_5 j + + · exact k8t4p8_initial_eq_row_6 j + + · exact k8t4p8_initial_eq_row_7 j + +private theorem k8t4p8_closure_0 : ClosureCheck k8t4p8.graph k8t4p8_state_0 8 4 [] := by trivial + +private theorem k8t4p8_matrix_eq : k8t4p8.matrix 8 = k8t4p8_state_0 := by + change closureMatrix (k8t4p8.initialMatrix 8) _ = _ + rw [k8t4p8_initial_eq] + change closureMatrix k8t4p8_state_0 [] = _ + rfl + +private theorem k8t4p8_part_0 : k8t4p8.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p8_part_1 : k8t4p8.chains.map List.length = ([[], [2, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p8_part_2 : k8t4p8.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p8.clique))) = ([[], [2, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p8_templates_item_0 : (⟨0, 1, [], [], [2, 3, 4, 5, 6, 7], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_1 : (⟨0, 2, [], [], [1], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_2 : (⟨0, 2, [], [], [3, 4], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_3 : (⟨0, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_4 : (⟨0, 3, [], [], [2, 1], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_5 : (⟨0, 3, [[4, 5, 6, 7]], [], [2, 1], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_6 : (⟨0, 5, [], [], [6, 7], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_7 : (⟨0, 5, [[1, 2, 3, 4]], [], [6, 7], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_8 : (⟨0, 6, [], [], [5, 4], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_9 : (⟨0, 6, [], [], [5, 4, 3, 2, 1], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_10 : (⟨0, 7, [], [], [6, 5, 4, 3, 2, 1], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_11 : (⟨1, 2, [], [], [3, 4], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_12 : (⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_13 : (⟨2, 3, [], [1], [4], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_14 : (⟨2, 3, [], [1], [4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_15 : (⟨2, 5, [], [1], [4], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_16 : (⟨2, 5, [], [1], [6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_17 : (⟨2, 6, [], [1], [5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_18 : (⟨2, 6, [], [1], [7], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_19 : (⟨3, 4, [], [1, 2], [5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_20 : (⟨3, 5, [], [1, 2], [4], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_21 : (⟨3, 6, [], [1, 2], [5, 4], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_22 : (⟨3, 6, [], [1, 2], [7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_23 : (⟨3, 7, [], [1, 2], [6, 5, 4], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_24 : (⟨5, 6, [], [1, 2, 3, 4], [7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_templates_item_25 : (⟨6, 7, [], [1, 2, 3, 4, 5], [], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p8_part_3 : ∀ T ∈ k8t4p8.templates, T.Check k8t4p8.graph k8t4p8.clique 8 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p8, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p8_templates_item_0, k8t4p8_templates_item_1, k8t4p8_templates_item_2, k8t4p8_templates_item_3, k8t4p8_templates_item_4, k8t4p8_templates_item_5, k8t4p8_templates_item_6, k8t4p8_templates_item_7, k8t4p8_templates_item_8, k8t4p8_templates_item_9, k8t4p8_templates_item_10, k8t4p8_templates_item_11, k8t4p8_templates_item_12, k8t4p8_templates_item_13, k8t4p8_templates_item_14, k8t4p8_templates_item_15, k8t4p8_templates_item_16, k8t4p8_templates_item_17, k8t4p8_templates_item_18, k8t4p8_templates_item_19, k8t4p8_templates_item_20, k8t4p8_templates_item_21, k8t4p8_templates_item_22, k8t4p8_templates_item_23, k8t4p8_templates_item_24, k8t4p8_templates_item_25⟩ + +private theorem k8t4p8_part_4 : ∀ p ∈ k8t4p8.required, p.Check k8t4p8.graph 8 := by decide + +private theorem k8t4p8_part_5 : ClosureCheck k8t4p8.graph (k8t4p8.initialMatrix 8) 8 4 k8t4p8.closure := by + rw [k8t4p8_initial_eq] + exact k8t4p8_closure_0 + +private theorem k8t4p8_part_6 : k8t4p8.bad.Check k8t4p8.graph (k8t4p8.matrix 8) 8 4 := by + rw [k8t4p8_matrix_eq] + decide + +theorem k8t4p8_check : k8t4p8.Check 8 4 [[], [2, 2]] := + ⟨k8t4p8_part_0, k8t4p8_part_1, k8t4p8_part_2, k8t4p8_part_3, k8t4p8_part_4, k8t4p8_part_5, k8t4p8_part_6⟩ +def k8t4p9 : LayoutCertificate 6 where + chains := [[0, 1, 2], [3, 4, 5]] + clique := {0, 2, 3, 5} + templates := [⟨0, 1, [], [], [2], 1, 6⟩, + ⟨0, 3, [], [], [], 2, 7⟩, + ⟨0, 3, [], [2, 1], [4, 5], 1, 3⟩, + ⟨0, 4, [], [], [3], 1, 6⟩, + ⟨0, 5, [], [], [], 2, 7⟩, + ⟨0, 5, [], [2, 1], [4, 3], 1, 3⟩, + ⟨1, 2, [], [0], [], 1, 6⟩, + ⟨1, 3, [], [0], [], 1, 6⟩, + ⟨1, 4, [], [0], [3], 1, 5⟩, + ⟨1, 5, [], [0], [], 1, 6⟩, + ⟨2, 3, [], [], [], 2, 7⟩, + ⟨2, 3, [], [0, 1], [4, 5], 1, 3⟩, + ⟨3, 4, [], [], [5], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 3), (0, 3), (3, 3)}⟩ + + +private def k8t4p9_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[∅, Finset.Icc 1 6, ∅, Finset.Icc 1 7, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p9_initial_eq_row_0 : ∀ j : Fin 6, (k8t4p9.initialMatrix 8) 0 j = k8t4p9_state_0 0 j := by decide + +private theorem k8t4p9_initial_eq_row_1 : ∀ j : Fin 6, (k8t4p9.initialMatrix 8) 1 j = k8t4p9_state_0 1 j := by decide + +private theorem k8t4p9_initial_eq_row_2 : ∀ j : Fin 6, (k8t4p9.initialMatrix 8) 2 j = k8t4p9_state_0 2 j := by decide + +private theorem k8t4p9_initial_eq_row_3 : ∀ j : Fin 6, (k8t4p9.initialMatrix 8) 3 j = k8t4p9_state_0 3 j := by decide + +private theorem k8t4p9_initial_eq_row_4 : ∀ j : Fin 6, (k8t4p9.initialMatrix 8) 4 j = k8t4p9_state_0 4 j := by decide + +private theorem k8t4p9_initial_eq_row_5 : ∀ j : Fin 6, (k8t4p9.initialMatrix 8) 5 j = k8t4p9_state_0 5 j := by decide + +private theorem k8t4p9_initial_eq : (k8t4p9.initialMatrix 8) = k8t4p9_state_0 := by + funext i j + fin_cases i + + · exact k8t4p9_initial_eq_row_0 j + + · exact k8t4p9_initial_eq_row_1 j + + · exact k8t4p9_initial_eq_row_2 j + + · exact k8t4p9_initial_eq_row_3 j + + · exact k8t4p9_initial_eq_row_4 j + + · exact k8t4p9_initial_eq_row_5 j + +private theorem k8t4p9_closure_0 : ClosureCheck k8t4p9.graph k8t4p9_state_0 8 4 [] := by trivial + +private theorem k8t4p9_matrix_eq : k8t4p9.matrix 8 = k8t4p9_state_0 := by + change closureMatrix (k8t4p9.initialMatrix 8) _ = _ + rw [k8t4p9_initial_eq] + change closureMatrix k8t4p9_state_0 [] = _ + rfl + +private theorem k8t4p9_part_0 : k8t4p9.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p9_part_1 : k8t4p9.chains.map List.length = ([[1], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p9_part_2 : k8t4p9.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p9.clique))) = ([[1], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p9_templates_item_0 : (⟨0, 1, [], [], [2], 1, 6⟩ : TemplateData (Fin 6)).Check k8t4p9.graph k8t4p9.clique 8 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p9_templates_item_1 : (⟨0, 3, [], [], [], 2, 7⟩ : TemplateData (Fin 6)).Check k8t4p9.graph k8t4p9.clique 8 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p9_templates_item_2 : (⟨0, 3, [], [2, 1], [4, 5], 1, 3⟩ : TemplateData (Fin 6)).Check k8t4p9.graph k8t4p9.clique 8 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p9_templates_item_3 : (⟨0, 4, [], [], [3], 1, 6⟩ : TemplateData (Fin 6)).Check k8t4p9.graph k8t4p9.clique 8 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p9_templates_item_4 : (⟨0, 5, [], [], [], 2, 7⟩ : TemplateData (Fin 6)).Check k8t4p9.graph k8t4p9.clique 8 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p9_templates_item_5 : (⟨0, 5, [], [2, 1], [4, 3], 1, 3⟩ : TemplateData (Fin 6)).Check k8t4p9.graph k8t4p9.clique 8 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p9_templates_item_6 : (⟨1, 2, [], [0], [], 1, 6⟩ : TemplateData (Fin 6)).Check k8t4p9.graph k8t4p9.clique 8 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p9_templates_item_7 : (⟨1, 3, [], [0], [], 1, 6⟩ : TemplateData (Fin 6)).Check k8t4p9.graph k8t4p9.clique 8 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p9_templates_item_8 : (⟨1, 4, [], [0], [3], 1, 5⟩ : TemplateData (Fin 6)).Check k8t4p9.graph k8t4p9.clique 8 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p9_templates_item_9 : (⟨1, 5, [], [0], [], 1, 6⟩ : TemplateData (Fin 6)).Check k8t4p9.graph k8t4p9.clique 8 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p9_templates_item_10 : (⟨2, 3, [], [], [], 2, 7⟩ : TemplateData (Fin 6)).Check k8t4p9.graph k8t4p9.clique 8 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p9_templates_item_11 : (⟨2, 3, [], [0, 1], [4, 5], 1, 3⟩ : TemplateData (Fin 6)).Check k8t4p9.graph k8t4p9.clique 8 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p9_templates_item_12 : (⟨3, 4, [], [], [5], 1, 6⟩ : TemplateData (Fin 6)).Check k8t4p9.graph k8t4p9.clique 8 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p9_part_3 : ∀ T ∈ k8t4p9.templates, T.Check k8t4p9.graph k8t4p9.clique 8 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p9, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p9_templates_item_0, k8t4p9_templates_item_1, k8t4p9_templates_item_2, k8t4p9_templates_item_3, k8t4p9_templates_item_4, k8t4p9_templates_item_5, k8t4p9_templates_item_6, k8t4p9_templates_item_7, k8t4p9_templates_item_8, k8t4p9_templates_item_9, k8t4p9_templates_item_10, k8t4p9_templates_item_11, k8t4p9_templates_item_12⟩ + +private theorem k8t4p9_part_4 : ∀ p ∈ k8t4p9.required, p.Check k8t4p9.graph 8 := by decide + +private theorem k8t4p9_part_5 : ClosureCheck k8t4p9.graph (k8t4p9.initialMatrix 8) 8 4 k8t4p9.closure := by + rw [k8t4p9_initial_eq] + exact k8t4p9_closure_0 + +private theorem k8t4p9_part_6 : k8t4p9.bad.Check k8t4p9.graph (k8t4p9.matrix 8) 8 4 := by + rw [k8t4p9_matrix_eq] + decide + +theorem k8t4p9_check : k8t4p9.Check 8 4 [[1], [1]] := + ⟨k8t4p9_part_0, k8t4p9_part_1, k8t4p9_part_2, k8t4p9_part_3, k8t4p9_part_4, k8t4p9_part_5, k8t4p9_part_6⟩ +def k8t4p10 : LayoutCertificate 7 where + chains := [[0, 1, 2], [3, 4, 5, 6]] + clique := {0, 2, 3, 6} + templates := [⟨0, 1, [], [], [2], 2, 6⟩, + ⟨0, 1, [[3, 4, 5, 6]], [], [2], 1, 2⟩, + ⟨0, 3, [], [], [], 3, 7⟩, + ⟨0, 3, [], [], [4, 5, 6], 2, 4⟩, + ⟨0, 3, [], [2, 1], [4, 5, 6], 1, 2⟩, + ⟨0, 4, [], [], [3], 2, 6⟩, + ⟨0, 4, [], [], [5, 6], 1, 5⟩, + ⟨0, 5, [], [], [4, 3], 1, 5⟩, + ⟨0, 6, [], [], [5, 4, 3], 2, 4⟩, + ⟨0, 6, [], [2, 1], [5, 4, 3], 1, 2⟩, + ⟨1, 2, [], [0], [], 2, 6⟩, + ⟨1, 2, [[3, 4, 5, 6]], [0], [], 1, 2⟩, + ⟨1, 3, [], [0], [], 2, 6⟩, + ⟨1, 3, [], [0], [4, 5, 6], 1, 3⟩, + ⟨1, 4, [], [0], [3], 1, 5⟩, + ⟨1, 5, [], [0], [4, 3], 1, 4⟩, + ⟨1, 6, [], [0], [], 2, 6⟩, + ⟨1, 6, [], [0], [5, 4, 3], 1, 3⟩, + ⟨2, 3, [], [], [4, 5, 6], 2, 4⟩, + ⟨2, 3, [], [0, 1], [4, 5, 6], 1, 2⟩, + ⟨3, 4, [], [], [5, 6], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 3), (0, 3), (3, 3)}⟩ + + +private def k8t4p10_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 6], + #[∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 5, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p10_initial_eq_row_0 : ∀ j : Fin 7, (k8t4p10.initialMatrix 8) 0 j = k8t4p10_state_0 0 j := by decide + +private theorem k8t4p10_initial_eq_row_1 : ∀ j : Fin 7, (k8t4p10.initialMatrix 8) 1 j = k8t4p10_state_0 1 j := by decide + +private theorem k8t4p10_initial_eq_row_2 : ∀ j : Fin 7, (k8t4p10.initialMatrix 8) 2 j = k8t4p10_state_0 2 j := by decide + +private theorem k8t4p10_initial_eq_row_3 : ∀ j : Fin 7, (k8t4p10.initialMatrix 8) 3 j = k8t4p10_state_0 3 j := by decide + +private theorem k8t4p10_initial_eq_row_4 : ∀ j : Fin 7, (k8t4p10.initialMatrix 8) 4 j = k8t4p10_state_0 4 j := by decide + +private theorem k8t4p10_initial_eq_row_5 : ∀ j : Fin 7, (k8t4p10.initialMatrix 8) 5 j = k8t4p10_state_0 5 j := by decide + +private theorem k8t4p10_initial_eq_row_6 : ∀ j : Fin 7, (k8t4p10.initialMatrix 8) 6 j = k8t4p10_state_0 6 j := by decide + +private theorem k8t4p10_initial_eq : (k8t4p10.initialMatrix 8) = k8t4p10_state_0 := by + funext i j + fin_cases i + + · exact k8t4p10_initial_eq_row_0 j + + · exact k8t4p10_initial_eq_row_1 j + + · exact k8t4p10_initial_eq_row_2 j + + · exact k8t4p10_initial_eq_row_3 j + + · exact k8t4p10_initial_eq_row_4 j + + · exact k8t4p10_initial_eq_row_5 j + + · exact k8t4p10_initial_eq_row_6 j + +private theorem k8t4p10_closure_0 : ClosureCheck k8t4p10.graph k8t4p10_state_0 8 4 [] := by trivial + +private theorem k8t4p10_matrix_eq : k8t4p10.matrix 8 = k8t4p10_state_0 := by + change closureMatrix (k8t4p10.initialMatrix 8) _ = _ + rw [k8t4p10_initial_eq] + change closureMatrix k8t4p10_state_0 [] = _ + rfl + +private theorem k8t4p10_part_0 : k8t4p10.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p10_part_1 : k8t4p10.chains.map List.length = ([[1], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p10_part_2 : k8t4p10.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p10.clique))) = ([[1], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p10_templates_item_0 : (⟨0, 1, [], [], [2], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6]], [], [2], 1, 2⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_2 : (⟨0, 3, [], [], [], 3, 7⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_3 : (⟨0, 3, [], [], [4, 5, 6], 2, 4⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_4 : (⟨0, 3, [], [2, 1], [4, 5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_5 : (⟨0, 4, [], [], [3], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_6 : (⟨0, 4, [], [], [5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_7 : (⟨0, 5, [], [], [4, 3], 1, 5⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_8 : (⟨0, 6, [], [], [5, 4, 3], 2, 4⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_9 : (⟨0, 6, [], [2, 1], [5, 4, 3], 1, 2⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_10 : (⟨1, 2, [], [0], [], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_11 : (⟨1, 2, [[3, 4, 5, 6]], [0], [], 1, 2⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_12 : (⟨1, 3, [], [0], [], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_13 : (⟨1, 3, [], [0], [4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_14 : (⟨1, 4, [], [0], [3], 1, 5⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_15 : (⟨1, 5, [], [0], [4, 3], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_16 : (⟨1, 6, [], [0], [], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_17 : (⟨1, 6, [], [0], [5, 4, 3], 1, 3⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_18 : (⟨2, 3, [], [], [4, 5, 6], 2, 4⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_19 : (⟨2, 3, [], [0, 1], [4, 5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_templates_item_20 : (⟨3, 4, [], [], [5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p10_part_3 : ∀ T ∈ k8t4p10.templates, T.Check k8t4p10.graph k8t4p10.clique 8 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p10, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p10_templates_item_0, k8t4p10_templates_item_1, k8t4p10_templates_item_2, k8t4p10_templates_item_3, k8t4p10_templates_item_4, k8t4p10_templates_item_5, k8t4p10_templates_item_6, k8t4p10_templates_item_7, k8t4p10_templates_item_8, k8t4p10_templates_item_9, k8t4p10_templates_item_10, k8t4p10_templates_item_11, k8t4p10_templates_item_12, k8t4p10_templates_item_13, k8t4p10_templates_item_14, k8t4p10_templates_item_15, k8t4p10_templates_item_16, k8t4p10_templates_item_17, k8t4p10_templates_item_18, k8t4p10_templates_item_19, k8t4p10_templates_item_20⟩ + +private theorem k8t4p10_part_4 : ∀ p ∈ k8t4p10.required, p.Check k8t4p10.graph 8 := by decide + +private theorem k8t4p10_part_5 : ClosureCheck k8t4p10.graph (k8t4p10.initialMatrix 8) 8 4 k8t4p10.closure := by + rw [k8t4p10_initial_eq] + exact k8t4p10_closure_0 + +private theorem k8t4p10_part_6 : k8t4p10.bad.Check k8t4p10.graph (k8t4p10.matrix 8) 8 4 := by + rw [k8t4p10_matrix_eq] + decide + +theorem k8t4p10_check : k8t4p10.Check 8 4 [[1], [2]] := + ⟨k8t4p10_part_0, k8t4p10_part_1, k8t4p10_part_2, k8t4p10_part_3, k8t4p10_part_4, k8t4p10_part_5, k8t4p10_part_6⟩ +private def k8t4p11_step_0_data : EdgeAttachmentData 8 := ⟨4, 0, [⟨1, 2, [0, 4, 5, 6, 7]⟩, ⟨1, 0, [2, 7, 6, 5, 4]⟩, ⟨2, 5, [1, 0, 4, 3, 7, 6]⟩, ⟨2, 1, [7, 6, 5, 4, 0]⟩, ⟨3, 7, [2, 0, 4, 5, 6]⟩, ⟨3, 6, [2, 1, 0, 4, 5]⟩, ⟨3, 7, [2, 1, 0, 4, 5, 6]⟩, ⟨3, 5, [4, 0, 1, 2, 7, 6]⟩, ⟨3, 6, [7, 2, 1, 0, 4, 5]⟩], ⟨none, {(3, 3), (1, 3), (2, 3)}⟩⟩ + +private def k8t4p11_step_0 : ClosureStep 8 := .edge k8t4p11_step_0_data + +private def k8t4p11_step_1_data : EdgeAttachmentData 8 := ⟨4, 1, [⟨0, 5, [1, 4, 3, 2, 7, 6]⟩, ⟨0, 2, [1, 4, 3, 7]⟩, ⟨0, 2, [1, 4, 5, 6, 7, 3]⟩, ⟨0, 1, [2, 7, 6, 5, 4]⟩, ⟨2, 5, [0, 1, 4, 3, 7, 6]⟩, ⟨2, 1, [0, 7, 6, 5, 4]⟩, ⟨2, 0, [1, 4, 5, 6, 7, 3]⟩, ⟨3, 7, [0, 1, 4, 5, 6]⟩, ⟨3, 6, [0, 2, 1, 4, 5]⟩, ⟨3, 7, [0, 2, 1, 4, 5, 6]⟩, ⟨3, 6, [0, 7, 2, 1, 4, 5]⟩, ⟨3, 5, [4, 1, 0, 2, 7, 6]⟩], ⟨none, {(0, 3), (2, 3), (3, 3)}⟩⟩ + +private def k8t4p11_step_1 : ClosureStep 8 := .edge k8t4p11_step_1_data + +private def k8t4p11_step_2_data : EdgeAttachmentData 8 := ⟨4, 2, [⟨0, 5, [1, 2, 4, 3, 7, 6]⟩, ⟨0, 1, [7, 6, 5, 4, 2]⟩, ⟨1, 2, [0, 7, 6, 5, 4]⟩, ⟨1, 0, [2, 4, 5, 6, 7]⟩, ⟨3, 6, [0, 1, 2, 4, 5]⟩, ⟨3, 7, [0, 1, 2, 4, 5, 6]⟩, ⟨3, 7, [0, 2, 4, 5, 6]⟩, ⟨3, 5, [4, 2, 1, 0, 7, 6]⟩, ⟨3, 6, [7, 0, 1, 2, 4, 5]⟩], ⟨none, {(3, 3), (1, 3), (0, 3)}⟩⟩ + +private def k8t4p11_step_2 : ClosureStep 8 := .edge k8t4p11_step_2_data + +private def k8t4p11_step_3_data : EdgeAttachmentData 8 := ⟨5, 0, [⟨0, 1, [5, 4, 3, 7, 2]⟩, ⟨1, 2, [0, 5, 4, 3, 7]⟩, ⟨1, 0, [2, 3, 7, 6, 5]⟩, ⟨3, 6, [4, 5, 0, 1, 2, 7]⟩, ⟨3, 6, [4, 5, 0, 2, 7]⟩], ⟨none, {(1, 3), (0, 3), (3, 3)}⟩⟩ + +private def k8t4p11_step_3 : ClosureStep 8 := .edge k8t4p11_step_3_data + +private def k8t4p11_step_4_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨2, 0, [1, 3, 4, 5, 6]⟩, ⟨2, 0, [1, 3, 4, 8, 7, 6]⟩, ⟨2, 3, [1, 0, 6, 5, 4]⟩, ⟨2, 7, [1, 0, 6, 5, 4, 3, 8]⟩, ⟨2, 5, [1, 0, 6, 7, 8, 3, 4]⟩, ⟨2, 0, [3, 4, 5, 6, 7, 8, 1]⟩, ⟨2, 1, [3, 4, 5, 6, 0]⟩, ⟨3, 0, [1, 4, 8, 7, 6]⟩, ⟨3, 0, [2, 1, 4, 8, 7, 6]⟩, ⟨3, 7, [2, 1, 0, 6, 5, 4, 8]⟩, ⟨3, 5, [2, 1, 0, 6, 7, 8, 4]⟩, ⟨3, 2, [4, 5, 6, 0, 1]⟩] + +private def k8t4p11_step_4_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨0, 3, [1, 2]⟩, ⟨0, 7, [1, 2, 3, 4, 5, 6]⟩, ⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 6, [1, 2, 3, 4, 8, 7]⟩, ⟨0, 5, [1, 2, 3, 4, 8, 7, 6]⟩, ⟨0, 7, [1, 2, 3, 8, 4, 5, 6]⟩, ⟨0, 5, [1, 2, 3, 8, 7, 6]⟩, ⟨0, 4, [1, 2, 3, 8, 7, 6, 5]⟩, ⟨0, 2, [1, 3]⟩, ⟨0, 8, [1, 3, 4, 5, 6, 7]⟩, ⟨0, 4, [1, 3, 8, 7, 6, 5]⟩, ⟨0, 2, [1, 4, 3]⟩] + +private def k8t4p11_step_4_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 3, [1, 4, 5, 6, 7, 8]⟩, ⟨0, 2, [1, 4, 5, 6, 7, 8, 3]⟩, ⟨0, 3, [1, 4, 8]⟩, ⟨0, 2, [1, 4, 8, 3]⟩, ⟨0, 3, [6, 5, 4, 1, 2]⟩, ⟨0, 3, [6, 5, 4, 1]⟩, ⟨0, 2, [6, 5, 4, 1, 3]⟩, ⟨0, 2, [6, 5, 4, 1, 8, 3]⟩, ⟨0, 1, [6, 5, 4, 8, 3, 2]⟩] + +private def k8t4p11_step_4_data : FreshAttachmentData 8 := ⟨5, 0, k8t4p11_step_4_required_block_0 ++ k8t4p11_step_4_required_block_1 ++ k8t4p11_step_4_required_block_2, ⟨none, {(0, 2), (2, 3), (3, 3)}⟩⟩ + +private def k8t4p11_step_4 : ClosureStep 8 := .fresh k8t4p11_step_4_data + +private def k8t4p11_step_5_data : EdgeAttachmentData 8 := ⟨5, 1, [⟨1, 4, [5]⟩, ⟨1, 2, [5, 4, 3, 0, 7]⟩, ⟨1, 0, [5, 4, 3, 2, 7]⟩, ⟨1, 6, [5]⟩, ⟨4, 7, [3, 0, 1, 5, 6]⟩, ⟨4, 7, [3, 0, 2, 1, 5, 6]⟩, ⟨4, 6, [3, 0, 7, 2, 1, 5]⟩, ⟨6, 3, [5, 1, 0, 2, 7]⟩, ⟨6, 4, [5, 1, 0, 2, 7, 3]⟩, ⟨6, 3, [7, 0, 2, 1, 5, 4]⟩], ⟨none, {(1, 3), (4, 3), (6, 3)}⟩⟩ + +private def k8t4p11_step_5 : ClosureStep 8 := .edge k8t4p11_step_5_data + +private def k8t4p11_step_6_data : EdgeAttachmentData 8 := ⟨5, 2, [⟨0, 1, [3, 7, 6, 5, 2]⟩, ⟨1, 2, [0, 3, 7, 6, 5]⟩, ⟨1, 0, [2, 5, 4, 3, 7]⟩, ⟨3, 6, [4, 5, 2, 0, 7]⟩, ⟨3, 6, [4, 5, 2, 1, 0, 7]⟩], ⟨none, {(1, 3), (0, 3), (3, 3)}⟩⟩ + +private def k8t4p11_step_6 : ClosureStep 8 := .edge k8t4p11_step_6_data + +private def k8t4p11_step_7_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨1, 0, [2, 3, 4, 5, 6]⟩, ⟨1, 0, [2, 3, 4, 8, 7, 6]⟩, ⟨1, 7, [2, 3, 0, 6, 5, 4, 8]⟩, ⟨1, 5, [2, 3, 0, 6, 7, 8, 4]⟩, ⟨1, 2, [4, 5, 6, 0, 3]⟩, ⟨2, 0, [1, 3, 4, 5, 6]⟩, ⟨2, 0, [1, 3, 4, 8, 7, 6]⟩, ⟨2, 7, [1, 3, 0, 6, 5, 4, 8]⟩, ⟨2, 5, [1, 3, 0, 6, 7, 8, 4]⟩, ⟨2, 0, [1, 4, 5, 6, 7, 8, 3]⟩, ⟨2, 3, [1, 4, 5, 6, 0]⟩, ⟨2, 1, [3, 0, 6, 5, 4]⟩] + +private def k8t4p11_step_7_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨0, 2, [3, 1]⟩, ⟨0, 8, [3, 1, 4, 5, 6, 7]⟩, ⟨0, 5, [3, 1, 4, 8, 7, 6]⟩, ⟨0, 7, [3, 1, 8, 4, 5, 6]⟩, ⟨0, 4, [3, 1, 8, 7, 6, 5]⟩, ⟨0, 1, [3, 2]⟩, ⟨0, 8, [3, 2, 1, 4, 5, 6, 7]⟩, ⟨0, 6, [3, 2, 1, 4, 8, 7]⟩, ⟨0, 5, [3, 2, 1, 4, 8, 7, 6]⟩, ⟨0, 7, [3, 2, 1, 8, 4, 5, 6]⟩, ⟨0, 4, [3, 2, 1, 8, 7, 6, 5]⟩, ⟨0, 2, [3, 4, 1]⟩] + +private def k8t4p11_step_7_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 1, [3, 4, 5, 6, 7, 8]⟩, ⟨0, 2, [3, 4, 5, 6, 7, 8, 1]⟩, ⟨0, 1, [3, 4, 8]⟩, ⟨0, 2, [3, 4, 8, 1]⟩, ⟨0, 2, [6, 5, 4, 1, 3]⟩, ⟨0, 2, [6, 5, 4, 1, 8, 3]⟩, ⟨0, 1, [6, 5, 4, 3]⟩, ⟨0, 1, [6, 5, 4, 3, 2]⟩, ⟨0, 3, [6, 5, 4, 8, 1, 2]⟩] + +private def k8t4p11_step_7_data : FreshAttachmentData 8 := ⟨5, 2, k8t4p11_step_7_required_block_0 ++ k8t4p11_step_7_required_block_1 ++ k8t4p11_step_7_required_block_2, ⟨none, {(0, 2), (2, 3), (1, 3)}⟩⟩ + +private def k8t4p11_step_7 : ClosureStep 8 := .fresh k8t4p11_step_7_data + +private def k8t4p11_step_8_data : EdgeAttachmentData 8 := ⟨5, 3, [⟨0, 1, [3, 5, 6, 7, 2]⟩, ⟨1, 2, [0, 3, 5, 6, 7]⟩, ⟨1, 0, [2, 3, 5, 6, 7]⟩, ⟨6, 7, [5, 3]⟩, ⟨6, 4, [7, 0, 1, 2, 3, 5]⟩], ⟨none, {(1, 3), (0, 3), (6, 2), (7, 3)}⟩⟩ + +private def k8t4p11_step_8 : ClosureStep 8 := .edge k8t4p11_step_8_data + +private def k8t4p11_step_9_data : FreshAttachmentData 8 := ⟨5, 3, [⟨1, 0, [2, 3, 4, 5, 6]⟩, ⟨1, 0, [2, 3, 4, 8, 7, 6]⟩, ⟨1, 0, [2, 3, 8, 7, 6, 5, 4]⟩, ⟨1, 5, [2, 3, 8, 7, 6, 0, 4]⟩, ⟨5, 0, [4, 1, 2, 3, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 3, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 8, 7, 6]⟩, ⟨5, 0, [4, 8, 7, 6]⟩, ⟨5, 3, [4, 0, 6, 7, 8, 1, 2]⟩, ⟨5, 2, [4, 0, 6, 7, 8, 1, 3]⟩, ⟨5, 1, [4, 0, 6, 7, 8, 3, 2]⟩, ⟨5, 8, [6, 0, 4, 1, 2, 3]⟩, ⟨5, 7, [6, 0, 4, 1, 2, 3, 8]⟩, ⟨5, 7, [6, 0, 4, 1, 3, 8]⟩, ⟨7, 0, [6, 5, 4]⟩, ⟨7, 0, [8, 1, 2, 3, 4, 5, 6]⟩, ⟨7, 0, [8, 1, 2, 3, 4]⟩, ⟨7, 5, [8, 1, 2, 3, 4, 0, 6]⟩, ⟨7, 0, [8, 1, 3, 4, 5, 6]⟩, ⟨7, 0, [8, 1, 3, 4]⟩, ⟨7, 5, [8, 1, 3, 4, 0, 6]⟩, ⟨0, 5, [4, 1, 2, 3, 8, 7, 6]⟩, ⟨0, 1, [4, 3, 2]⟩, ⟨0, 1, [4, 5, 6, 7, 8]⟩, ⟨0, 3, [4, 5, 6, 7, 8, 1, 2]⟩, ⟨0, 2, [4, 5, 6, 7, 8, 1, 3]⟩, ⟨0, 1, [4, 5, 6, 7, 8, 3]⟩, ⟨0, 1, [4, 5, 6, 7, 8, 3, 2]⟩, ⟨0, 1, [4, 8, 3, 2]⟩, ⟨0, 7, [6, 5, 4, 1, 2, 3, 8]⟩], ⟨none, {(5, 2), (7, 3), (0, 1), (1, 3)}⟩⟩ + +private def k8t4p11_step_9 : ClosureStep 8 := .fresh k8t4p11_step_9_data + +private def k8t4p11_step_10_data : EdgeAttachmentData 8 := ⟨6, 0, [⟨1, 2, [0, 6, 5, 4, 3]⟩, ⟨1, 0, [2, 3, 4, 5, 6]⟩, ⟨2, 5, [1, 0, 6, 7, 3, 4]⟩, ⟨2, 1, [3, 4, 5, 6, 0]⟩, ⟨7, 3, [2, 0, 6, 5, 4]⟩, ⟨7, 4, [2, 1, 0, 6, 5]⟩, ⟨7, 3, [2, 1, 0, 6, 5, 4]⟩, ⟨7, 4, [3, 2, 1, 0, 6, 5]⟩, ⟨7, 5, [6, 0, 1, 2, 3, 4]⟩], ⟨none, {(7, 3), (1, 3), (2, 3)}⟩⟩ + +private def k8t4p11_step_10 : ClosureStep 8 := .edge k8t4p11_step_10_data + +private def k8t4p11_step_11_data : EdgeAttachmentData 8 := ⟨6, 1, [⟨0, 2, [1, 6, 5, 4, 3, 7]⟩, ⟨0, 5, [1, 6, 7, 2, 3, 4]⟩, ⟨0, 2, [1, 6, 7, 3]⟩, ⟨0, 1, [2, 3, 4, 5, 6]⟩, ⟨2, 5, [0, 1, 6, 7, 3, 4]⟩, ⟨2, 1, [0, 3, 4, 5, 6]⟩, ⟨2, 0, [1, 6, 5, 4, 3, 7]⟩, ⟨7, 3, [0, 1, 6, 5, 4]⟩, ⟨7, 4, [0, 2, 1, 6, 5]⟩, ⟨7, 3, [0, 2, 1, 6, 5, 4]⟩, ⟨7, 4, [0, 3, 2, 1, 6, 5]⟩, ⟨7, 5, [6, 1, 0, 2, 3, 4]⟩], ⟨none, {(0, 3), (2, 3), (7, 3)}⟩⟩ + +private def k8t4p11_step_11 : ClosureStep 8 := .edge k8t4p11_step_11_data + +private def k8t4p11_step_12_data : EdgeAttachmentData 8 := ⟨6, 2, [⟨0, 5, [1, 2, 6, 7, 3, 4]⟩, ⟨0, 1, [3, 4, 5, 6, 2]⟩, ⟨1, 2, [0, 3, 4, 5, 6]⟩, ⟨1, 0, [2, 6, 5, 4, 3]⟩, ⟨7, 4, [0, 1, 2, 6, 5]⟩, ⟨7, 3, [0, 1, 2, 6, 5, 4]⟩, ⟨7, 3, [0, 2, 6, 5, 4]⟩, ⟨7, 4, [3, 0, 1, 2, 6, 5]⟩, ⟨7, 5, [6, 2, 1, 0, 3, 4]⟩], ⟨none, {(7, 3), (1, 3), (0, 3)}⟩⟩ + +private def k8t4p11_step_12 : ClosureStep 8 := .edge k8t4p11_step_12_data + +private def k8t4p11_step_13_data : EdgeAttachmentData 8 := ⟨6, 3, [⟨0, 5, [1, 2, 7, 6, 3, 4]⟩, ⟨4, 7, [5, 6, 3, 0, 1, 2]⟩, ⟨4, 7, [5, 6, 3, 0, 2]⟩, ⟨7, 4, [0, 1, 2, 3, 6, 5]⟩, ⟨7, 4, [0, 2, 3, 6, 5]⟩], ⟨none, {(7, 3), (4, 3), (0, 3)}⟩⟩ + +private def k8t4p11_step_13 : ClosureStep 8 := .edge k8t4p11_step_13_data + +private def k8t4p11_step_14_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨5, 0, [4, 1, 2, 3, 8, 7]⟩, ⟨5, 0, [4, 1, 3, 8, 7]⟩, ⟨5, 0, [4, 1, 8, 7]⟩, ⟨5, 0, [4, 8, 7]⟩, ⟨5, 0, [6, 7, 8, 1, 2, 3, 4]⟩, ⟨5, 8, [6, 7, 0, 4, 1, 2, 3]⟩, ⟨5, 8, [6, 7, 0, 4, 1, 3]⟩, ⟨5, 8, [6, 7, 0, 4, 1]⟩, ⟨5, 2, [6, 7, 0, 4, 1, 8, 3]⟩, ⟨5, 3, [6, 7, 0, 4, 8, 1, 2]⟩, ⟨5, 1, [6, 7, 0, 4, 8, 3, 2]⟩, ⟨8, 0, [1, 2, 3, 4, 5, 6, 7]⟩] + +private def k8t4p11_step_14_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨8, 0, [1, 2, 3, 4]⟩, ⟨8, 6, [1, 2, 3, 4, 0, 7]⟩, ⟨8, 5, [1, 2, 3, 4, 0, 7, 6]⟩, ⟨8, 0, [1, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [1, 3, 4]⟩, ⟨8, 5, [1, 3, 4, 0, 7, 6]⟩, ⟨8, 0, [1, 4, 5, 6, 7]⟩, ⟨8, 0, [1, 4]⟩, ⟨8, 5, [1, 4, 0, 7, 6]⟩, ⟨0, 6, [4, 1, 2, 3, 8, 7]⟩, ⟨0, 5, [4, 1, 2, 3, 8, 7, 6]⟩, ⟨0, 5, [4, 1, 3, 8, 7, 6]⟩] + +private def k8t4p11_step_14_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 2, [4, 5, 6, 7, 8, 1]⟩, ⟨0, 3, [4, 5, 6, 7, 8, 1, 2]⟩, ⟨0, 3, [4, 5, 6, 7, 8, 1]⟩, ⟨0, 2, [4, 5, 6, 7, 8, 1, 3]⟩, ⟨0, 1, [4, 5, 6, 7, 8, 3]⟩, ⟨0, 1, [4, 5, 6, 7, 8, 3, 2]⟩, ⟨0, 8, [7, 6, 5, 4, 1, 2, 3]⟩, ⟨0, 8, [7, 6, 5, 4, 1, 3]⟩, ⟨0, 6, [7, 8, 1, 2, 3, 4, 5]⟩] + +private def k8t4p11_step_14_data : FreshAttachmentData 8 := ⟨6, 3, k8t4p11_step_14_required_block_0 ++ k8t4p11_step_14_required_block_1 ++ k8t4p11_step_14_required_block_2, ⟨none, {(5, 2), (8, 3), (0, 2)}⟩⟩ + +private def k8t4p11_step_14 : ClosureStep 8 := .fresh k8t4p11_step_14_data + +private def k8t4p11_step_15_data : EdgeAttachmentData 8 := ⟨6, 4, [⟨0, 5, [1, 2, 3, 7, 6, 4]⟩, ⟨0, 1, [3, 4, 6, 7, 2]⟩, ⟨1, 2, [0, 3, 4, 6, 7]⟩, ⟨1, 0, [2, 3, 4, 6, 7]⟩, ⟨3, 5, [0, 1, 2, 7, 6, 4]⟩], ⟨none, {(0, 3), (1, 3), (3, 3)}⟩⟩ + +private def k8t4p11_step_15 : ClosureStep 8 := .edge k8t4p11_step_15_data + +private def k8t4p11_step_16_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨1, 0, [2, 3, 4, 5, 6, 7]⟩, ⟨1, 6, [2, 3, 4, 5, 0, 7]⟩, ⟨1, 0, [2, 3, 4, 8, 7, 6, 5]⟩, ⟨1, 0, [2, 3, 4, 8, 7]⟩, ⟨1, 6, [2, 3, 4, 8, 7, 0, 5]⟩, ⟨4, 0, [1, 2, 3, 8, 7, 6, 5]⟩, ⟨4, 0, [1, 2, 3, 8, 7]⟩, ⟨4, 6, [1, 2, 3, 8, 7, 0, 5]⟩, ⟨4, 0, [1, 3, 8, 7, 6, 5]⟩, ⟨4, 0, [1, 3, 8, 7]⟩, ⟨4, 6, [1, 3, 8, 7, 0, 5]⟩, ⟨4, 0, [1, 8, 7]⟩] + +private def k8t4p11_step_16_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨6, 0, [5, 4, 1, 2, 3, 8, 7]⟩, ⟨6, 0, [5, 4, 1, 3, 8, 7]⟩, ⟨6, 0, [5, 4, 1, 8, 7]⟩, ⟨6, 0, [5, 4, 8, 7]⟩, ⟨6, 3, [5, 0, 7, 8, 1, 2]⟩, ⟨6, 4, [5, 0, 7, 8, 1, 2, 3]⟩, ⟨6, 4, [5, 0, 7, 8, 1, 3]⟩, ⟨6, 2, [5, 0, 7, 8, 1, 4, 3]⟩, ⟨6, 1, [5, 0, 7, 8, 3, 2]⟩, ⟨6, 3, [5, 0, 7, 8, 4, 1, 2]⟩, ⟨6, 1, [5, 0, 7, 8, 4, 3, 2]⟩, ⟨6, 8, [7, 0, 5, 4, 1, 2, 3]⟩] + +private def k8t4p11_step_16_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨6, 8, [7, 0, 5, 4, 1, 3]⟩, ⟨0, 6, [5, 4, 1, 2, 3, 8, 7]⟩, ⟨0, 1, [5, 4, 3]⟩, ⟨0, 1, [5, 4, 3, 2]⟩, ⟨0, 1, [5, 4, 8, 3, 2]⟩, ⟨0, 4, [5, 6, 7, 8, 1, 2, 3]⟩, ⟨0, 2, [5, 6, 7, 8, 1, 4, 3]⟩, ⟨0, 1, [5, 6, 7, 8, 3, 2]⟩, ⟨0, 3, [5, 6, 7, 8, 4, 1, 2]⟩, ⟨0, 1, [5, 6, 7, 8, 4, 3, 2]⟩, ⟨0, 8, [7, 6, 5, 4, 1, 2, 3]⟩] + +private def k8t4p11_step_16_data : FreshAttachmentData 8 := ⟨6, 4, k8t4p11_step_16_required_block_0 ++ k8t4p11_step_16_required_block_1 ++ k8t4p11_step_16_required_block_2, ⟨none, {(6, 2), (4, 3), (0, 1), (1, 3)}⟩⟩ + +private def k8t4p11_step_16 : ClosureStep 8 := .fresh k8t4p11_step_16_data + +private def k8t4p11_step_17_data : EdgeAttachmentData 8 := ⟨7, 4, [⟨0, 5, [1, 2, 3, 4, 7, 6]⟩, ⟨3, 6, [0, 1, 2, 7, 4, 5]⟩, ⟨3, 6, [0, 2, 7, 4, 5]⟩, ⟨6, 3, [5, 4, 7, 0, 1, 2]⟩, ⟨6, 3, [5, 4, 7, 0, 2]⟩], ⟨none, {(3, 3), (6, 3), (0, 3)}⟩⟩ + +private def k8t4p11_step_17 : ClosureStep 8 := .edge k8t4p11_step_17_data + +private def k8t4p11_step_18_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨4, 0, [1, 2, 3, 8, 7, 6, 5]⟩, ⟨4, 0, [1, 2, 3, 8]⟩, ⟨4, 6, [1, 2, 3, 8, 0, 5]⟩, ⟨4, 7, [1, 2, 3, 8, 0, 5, 6]⟩, ⟨4, 0, [1, 3, 8, 7, 6, 5]⟩, ⟨4, 0, [1, 3, 8]⟩, ⟨4, 7, [1, 3, 8, 0, 5, 6]⟩, ⟨4, 0, [1, 8, 7, 6, 5]⟩, ⟨4, 0, [1, 8]⟩, ⟨4, 7, [1, 8, 0, 5, 6]⟩, ⟨7, 0, [6, 5, 4, 1, 2, 3, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 3, 8]⟩] + +private def k8t4p11_step_18_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨7, 0, [6, 5, 4, 1, 8]⟩, ⟨7, 0, [6, 5, 4, 8]⟩, ⟨7, 4, [6, 5, 0, 8, 1, 2, 3]⟩, ⟨7, 4, [6, 5, 0, 8, 1, 3]⟩, ⟨7, 4, [6, 5, 0, 8, 1]⟩, ⟨7, 2, [6, 5, 0, 8, 1, 4, 3]⟩, ⟨7, 3, [6, 5, 0, 8, 4, 1, 2]⟩, ⟨7, 1, [6, 5, 0, 8, 4, 3, 2]⟩, ⟨7, 0, [8, 4, 5]⟩, ⟨0, 7, [5, 4, 1, 2, 3, 8]⟩, ⟨0, 6, [5, 4, 1, 2, 3, 8, 7]⟩, ⟨0, 6, [5, 4, 1, 3, 8, 7]⟩] + +private def k8t4p11_step_18_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 3, [5, 6, 7, 8, 1, 2]⟩, ⟨0, 4, [5, 6, 7, 8, 1, 2, 3]⟩, ⟨0, 2, [5, 6, 7, 8, 1, 3]⟩, ⟨0, 4, [5, 6, 7, 8, 1, 3]⟩, ⟨0, 2, [5, 6, 7, 8, 1, 4, 3]⟩, ⟨0, 1, [5, 6, 7, 8, 3, 2]⟩, ⟨0, 3, [5, 6, 7, 8, 4, 1, 2]⟩, ⟨0, 1, [5, 6, 7, 8, 4, 3, 2]⟩, ⟨0, 7, [8, 1, 2, 3, 4, 5, 6]⟩] + +private def k8t4p11_step_18_data : FreshAttachmentData 8 := ⟨7, 4, k8t4p11_step_18_required_block_0 ++ k8t4p11_step_18_required_block_1 ++ k8t4p11_step_18_required_block_2, ⟨none, {(7, 2), (4, 3), (0, 2)}⟩⟩ + +private def k8t4p11_step_18 : ClosureStep 8 := .fresh k8t4p11_step_18_data + +private def k8t4p11_step_19_data : EdgeAttachmentData 8 := ⟨7, 5, [⟨0, 1, [3, 4, 5, 7, 2]⟩, ⟨1, 2, [0, 3, 4, 5, 7]⟩, ⟨1, 0, [2, 3, 4, 5, 7]⟩, ⟨4, 6, [3, 0, 1, 2, 7, 5]⟩, ⟨4, 3, [5, 7]⟩], ⟨none, {(1, 3), (0, 3), (4, 2), (3, 3)}⟩⟩ + +private def k8t4p11_step_19 : ClosureStep 8 := .edge k8t4p11_step_19_data + +private def k8t4p11_step_20_data : FreshAttachmentData 8 := ⟨7, 5, [⟨1, 0, [2, 3, 4, 5, 6, 7, 8]⟩, ⟨1, 0, [2, 3, 4, 5, 6]⟩, ⟨1, 7, [2, 3, 4, 5, 6, 0, 8]⟩, ⟨1, 0, [2, 3, 4, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 2, 3, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 2, 3, 8]⟩, ⟨5, 7, [4, 1, 2, 3, 8, 0, 6]⟩, ⟨5, 0, [4, 1, 3, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 3, 8]⟩, ⟨5, 7, [4, 1, 3, 8, 0, 6]⟩, ⟨5, 0, [4, 1, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 2, 3, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 3, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 8]⟩, ⟨7, 0, [6, 5, 4, 8]⟩, ⟨7, 4, [6, 0, 8, 1, 2, 3]⟩, ⟨7, 5, [6, 0, 8, 1, 2, 3, 4]⟩, ⟨7, 5, [6, 0, 8, 1, 3, 4]⟩, ⟨7, 3, [8, 0, 6, 5, 4, 1, 2]⟩, ⟨7, 2, [8, 0, 6, 5, 4, 1, 3]⟩, ⟨7, 1, [8, 0, 6, 5, 4, 3, 2]⟩, ⟨0, 1, [6, 5, 4]⟩, ⟨0, 7, [6, 5, 4, 1, 2, 3, 8]⟩, ⟨0, 1, [6, 5, 4, 3]⟩, ⟨0, 1, [6, 5, 4, 3, 2]⟩, ⟨0, 1, [6, 5, 4, 8, 3, 2]⟩, ⟨0, 5, [6, 7, 8, 1, 2, 3, 4]⟩, ⟨0, 3, [8, 7, 6, 5, 4, 1, 2]⟩, ⟨0, 2, [8, 7, 6, 5, 4, 1, 3]⟩, ⟨0, 1, [8, 7, 6, 5, 4, 3, 2]⟩], ⟨none, {(7, 2), (5, 3), (0, 1), (1, 3)}⟩⟩ + +private def k8t4p11_step_20 : ClosureStep 8 := .fresh k8t4p11_step_20_data + +private def k8t4p11_templates_block_0 : List (TemplateData (Fin 8)) := [⟨0, 1, [], [], [2], 3, 6⟩, ⟨0, 1, [[3, 4, 5, 6, 7]], [], [2], 1, 1⟩, ⟨0, 2, [], [], [], 4, 7⟩, ⟨0, 2, [[3, 4, 5, 6, 7]], [], [], 2, 2⟩, ⟨0, 3, [], [], [], 4, 7⟩, ⟨0, 3, [], [], [4, 5, 6, 7], 2, 3⟩, ⟨0, 3, [], [2, 1], [4, 5, 6, 7], 1, 1⟩, ⟨0, 4, [], [], [3], 3, 6⟩, ⟨0, 4, [], [], [5, 6, 7], 1, 4⟩, ⟨0, 5, [], [], [4, 3], 2, 5⟩, ⟨0, 6, [], [], [5, 4, 3], 1, 4⟩, ⟨0, 6, [], [], [7], 3, 6⟩] + +private def k8t4p11_templates_block_1 : List (TemplateData (Fin 8)) := [⟨0, 7, [], [], [], 4, 7⟩, ⟨0, 7, [], [], [6, 5, 4, 3], 2, 3⟩, ⟨0, 7, [], [2, 1], [6, 5, 4, 3], 1, 1⟩, ⟨1, 2, [], [0], [], 3, 6⟩, ⟨1, 2, [[3, 4, 5, 6, 7]], [0], [], 1, 1⟩, ⟨1, 3, [], [0], [], 3, 6⟩, ⟨1, 3, [], [0], [4, 5, 6, 7], 1, 2⟩, ⟨1, 4, [], [0], [3], 2, 5⟩, ⟨1, 4, [], [0], [5, 6, 7], 1, 3⟩, ⟨1, 5, [], [0], [4, 3], 1, 4⟩, ⟨1, 6, [], [0], [5, 4, 3], 1, 3⟩, ⟨1, 6, [], [0], [7], 2, 5⟩] + +private def k8t4p11_templates_block_2 : List (TemplateData (Fin 8)) := [⟨1, 7, [], [0], [], 3, 6⟩, ⟨1, 7, [], [0], [6, 5, 4, 3], 1, 2⟩, ⟨2, 3, [], [], [], 4, 7⟩, ⟨2, 3, [], [], [4, 5, 6, 7], 2, 3⟩, ⟨2, 3, [], [0, 1], [4, 5, 6, 7], 1, 1⟩, ⟨2, 4, [], [], [5, 6, 7], 1, 4⟩, ⟨2, 5, [], [], [4, 3], 2, 5⟩, ⟨2, 6, [], [], [5, 4, 3], 1, 4⟩, ⟨2, 7, [], [], [], 4, 7⟩, ⟨2, 7, [], [], [6, 5, 4, 3], 2, 3⟩, ⟨2, 7, [], [0, 1], [6, 5, 4, 3], 1, 1⟩, ⟨3, 4, [], [], [5, 6, 7], 1, 4⟩] + +private def k8t4p11_templates_block_3 : List (TemplateData (Fin 8)) := [⟨3, 5, [], [], [6, 7], 2, 5⟩, ⟨3, 6, [], [], [7], 3, 6⟩, ⟨4, 5, [], [3], [6, 7], 1, 4⟩, ⟨4, 6, [], [3], [7], 2, 5⟩, ⟨4, 7, [], [3], [], 3, 6⟩, ⟨5, 6, [], [3, 4], [7], 1, 4⟩, ⟨5, 7, [], [3, 4], [], 2, 5⟩, ⟨6, 7, [], [3, 4, 5], [], 1, 4⟩] + +def k8t4p11 : LayoutCertificate 8 where + chains := [[0, 1, 2], [3, 4, 5, 6, 7]] + clique := {0, 2, 3, 7} + templates := k8t4p11_templates_block_0 ++ k8t4p11_templates_block_1 ++ k8t4p11_templates_block_2 ++ k8t4p11_templates_block_3 + required := [⟨4, 6, [5]⟩] + closure := [k8t4p11_step_0, k8t4p11_step_1, k8t4p11_step_2, k8t4p11_step_3, k8t4p11_step_4, k8t4p11_step_5, k8t4p11_step_6, k8t4p11_step_7, k8t4p11_step_8, k8t4p11_step_9, k8t4p11_step_10, k8t4p11_step_11, k8t4p11_step_12, k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] + bad := ⟨none, {(5, 2), (4, 2), (6, 2)}⟩ + + +private def k8t4p11_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_template_matrix_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 6, ∅], + #[{1, 3, 4, 5, 6}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 4, 5, 6, 7}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 2 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_template_matrix_0_eq_row_0 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_0) 0 j = k8t4p11_template_matrix_0 0 j := by decide + +private theorem k8t4p11_template_matrix_0_eq_row_1 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_0) 1 j = k8t4p11_template_matrix_0 1 j := by decide + +private theorem k8t4p11_template_matrix_0_eq_row_2 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_0) 2 j = k8t4p11_template_matrix_0 2 j := by decide + +private theorem k8t4p11_template_matrix_0_eq_row_3 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_0) 3 j = k8t4p11_template_matrix_0 3 j := by decide + +private theorem k8t4p11_template_matrix_0_eq_row_4 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_0) 4 j = k8t4p11_template_matrix_0 4 j := by decide + +private theorem k8t4p11_template_matrix_0_eq_row_5 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_0) 5 j = k8t4p11_template_matrix_0 5 j := by decide + +private theorem k8t4p11_template_matrix_0_eq_row_6 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_0) 6 j = k8t4p11_template_matrix_0 6 j := by decide + +private theorem k8t4p11_template_matrix_0_eq_row_7 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_0) 7 j = k8t4p11_template_matrix_0 7 j := by decide + +private theorem k8t4p11_template_matrix_0_eq : (templateMatrix k8t4p11_templates_block_0) = k8t4p11_template_matrix_0 := by + funext i j + fin_cases i + + · exact k8t4p11_template_matrix_0_eq_row_0 j + + · exact k8t4p11_template_matrix_0_eq_row_1 j + + · exact k8t4p11_template_matrix_0_eq_row_2 j + + · exact k8t4p11_template_matrix_0_eq_row_3 j + + · exact k8t4p11_template_matrix_0_eq_row_4 j + + · exact k8t4p11_template_matrix_0_eq_row_5 j + + · exact k8t4p11_template_matrix_0_eq_row_6 j + + · exact k8t4p11_template_matrix_0_eq_row_7 j + +private def k8t4p11_template_matrix_1 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7], + #[∅, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[∅, {1, 3, 4, 5, 6}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_template_matrix_1_eq_row_0 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_1) 0 j = k8t4p11_template_matrix_1 0 j := by decide + +private theorem k8t4p11_template_matrix_1_eq_row_1 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_1) 1 j = k8t4p11_template_matrix_1 1 j := by decide + +private theorem k8t4p11_template_matrix_1_eq_row_2 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_1) 2 j = k8t4p11_template_matrix_1 2 j := by decide + +private theorem k8t4p11_template_matrix_1_eq_row_3 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_1) 3 j = k8t4p11_template_matrix_1 3 j := by decide + +private theorem k8t4p11_template_matrix_1_eq_row_4 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_1) 4 j = k8t4p11_template_matrix_1 4 j := by decide + +private theorem k8t4p11_template_matrix_1_eq_row_5 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_1) 5 j = k8t4p11_template_matrix_1 5 j := by decide + +private theorem k8t4p11_template_matrix_1_eq_row_6 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_1) 6 j = k8t4p11_template_matrix_1 6 j := by decide + +private theorem k8t4p11_template_matrix_1_eq_row_7 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_1) 7 j = k8t4p11_template_matrix_1 7 j := by decide + +private theorem k8t4p11_template_matrix_1_eq : (templateMatrix k8t4p11_templates_block_1) = k8t4p11_template_matrix_1 := by + funext i j + fin_cases i + + · exact k8t4p11_template_matrix_1_eq_row_0 j + + · exact k8t4p11_template_matrix_1_eq_row_1 j + + · exact k8t4p11_template_matrix_1_eq_row_2 j + + · exact k8t4p11_template_matrix_1_eq_row_3 j + + · exact k8t4p11_template_matrix_1_eq_row_4 j + + · exact k8t4p11_template_matrix_1_eq_row_5 j + + · exact k8t4p11_template_matrix_1_eq_row_6 j + + · exact k8t4p11_template_matrix_1_eq_row_7 j + +private def k8t4p11_template_matrix_2 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6], + #[∅, ∅, ∅, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 4, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 4, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 2 5, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_template_matrix_2_eq_row_0 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_2) 0 j = k8t4p11_template_matrix_2 0 j := by decide + +private theorem k8t4p11_template_matrix_2_eq_row_1 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_2) 1 j = k8t4p11_template_matrix_2 1 j := by decide + +private theorem k8t4p11_template_matrix_2_eq_row_2 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_2) 2 j = k8t4p11_template_matrix_2 2 j := by decide + +private theorem k8t4p11_template_matrix_2_eq_row_3 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_2) 3 j = k8t4p11_template_matrix_2 3 j := by decide + +private theorem k8t4p11_template_matrix_2_eq_row_4 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_2) 4 j = k8t4p11_template_matrix_2 4 j := by decide + +private theorem k8t4p11_template_matrix_2_eq_row_5 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_2) 5 j = k8t4p11_template_matrix_2 5 j := by decide + +private theorem k8t4p11_template_matrix_2_eq_row_6 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_2) 6 j = k8t4p11_template_matrix_2 6 j := by decide + +private theorem k8t4p11_template_matrix_2_eq_row_7 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_2) 7 j = k8t4p11_template_matrix_2 7 j := by decide + +private theorem k8t4p11_template_matrix_2_eq : (templateMatrix k8t4p11_templates_block_2) = k8t4p11_template_matrix_2 := by + funext i j + fin_cases i + + · exact k8t4p11_template_matrix_2_eq_row_0 j + + · exact k8t4p11_template_matrix_2_eq_row_1 j + + · exact k8t4p11_template_matrix_2_eq_row_2 j + + · exact k8t4p11_template_matrix_2_eq_row_3 j + + · exact k8t4p11_template_matrix_2_eq_row_4 j + + · exact k8t4p11_template_matrix_2_eq_row_5 j + + · exact k8t4p11_template_matrix_2_eq_row_6 j + + · exact k8t4p11_template_matrix_2_eq_row_7 j + +private def k8t4p11_template_matrix_3 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6], + #[∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[∅, ∅, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, ∅, ∅, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_template_matrix_3_eq_row_0 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_3) 0 j = k8t4p11_template_matrix_3 0 j := by decide + +private theorem k8t4p11_template_matrix_3_eq_row_1 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_3) 1 j = k8t4p11_template_matrix_3 1 j := by decide + +private theorem k8t4p11_template_matrix_3_eq_row_2 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_3) 2 j = k8t4p11_template_matrix_3 2 j := by decide + +private theorem k8t4p11_template_matrix_3_eq_row_3 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_3) 3 j = k8t4p11_template_matrix_3 3 j := by decide + +private theorem k8t4p11_template_matrix_3_eq_row_4 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_3) 4 j = k8t4p11_template_matrix_3 4 j := by decide + +private theorem k8t4p11_template_matrix_3_eq_row_5 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_3) 5 j = k8t4p11_template_matrix_3 5 j := by decide + +private theorem k8t4p11_template_matrix_3_eq_row_6 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_3) 6 j = k8t4p11_template_matrix_3 6 j := by decide + +private theorem k8t4p11_template_matrix_3_eq_row_7 : ∀ j : Fin 8, (templateMatrix k8t4p11_templates_block_3) 7 j = k8t4p11_template_matrix_3 7 j := by decide + +private theorem k8t4p11_template_matrix_3_eq : (templateMatrix k8t4p11_templates_block_3) = k8t4p11_template_matrix_3 := by + funext i j + fin_cases i + + · exact k8t4p11_template_matrix_3_eq_row_0 j + + · exact k8t4p11_template_matrix_3_eq_row_1 j + + · exact k8t4p11_template_matrix_3_eq_row_2 j + + · exact k8t4p11_template_matrix_3_eq_row_3 j + + · exact k8t4p11_template_matrix_3_eq_row_4 j + + · exact k8t4p11_template_matrix_3_eq_row_5 j + + · exact k8t4p11_template_matrix_3_eq_row_6 j + + · exact k8t4p11_template_matrix_3_eq_row_7 j + +private theorem k8t4p11_initial_merged_eq_row_0 : ∀ j : Fin 8, (fun i j => (((k8t4p11_template_matrix_0 i j ∪ k8t4p11_template_matrix_1 i j) ∪ k8t4p11_template_matrix_2 i j) ∪ k8t4p11_template_matrix_3 i j) ∪ requiredMatrix 8 k8t4p11.required i j) 0 j = k8t4p11_state_0 0 j := by decide + +private theorem k8t4p11_initial_merged_eq_row_1 : ∀ j : Fin 8, (fun i j => (((k8t4p11_template_matrix_0 i j ∪ k8t4p11_template_matrix_1 i j) ∪ k8t4p11_template_matrix_2 i j) ∪ k8t4p11_template_matrix_3 i j) ∪ requiredMatrix 8 k8t4p11.required i j) 1 j = k8t4p11_state_0 1 j := by decide + +private theorem k8t4p11_initial_merged_eq_row_2 : ∀ j : Fin 8, (fun i j => (((k8t4p11_template_matrix_0 i j ∪ k8t4p11_template_matrix_1 i j) ∪ k8t4p11_template_matrix_2 i j) ∪ k8t4p11_template_matrix_3 i j) ∪ requiredMatrix 8 k8t4p11.required i j) 2 j = k8t4p11_state_0 2 j := by decide + +private theorem k8t4p11_initial_merged_eq_row_3 : ∀ j : Fin 8, (fun i j => (((k8t4p11_template_matrix_0 i j ∪ k8t4p11_template_matrix_1 i j) ∪ k8t4p11_template_matrix_2 i j) ∪ k8t4p11_template_matrix_3 i j) ∪ requiredMatrix 8 k8t4p11.required i j) 3 j = k8t4p11_state_0 3 j := by decide + +private theorem k8t4p11_initial_merged_eq_row_4 : ∀ j : Fin 8, (fun i j => (((k8t4p11_template_matrix_0 i j ∪ k8t4p11_template_matrix_1 i j) ∪ k8t4p11_template_matrix_2 i j) ∪ k8t4p11_template_matrix_3 i j) ∪ requiredMatrix 8 k8t4p11.required i j) 4 j = k8t4p11_state_0 4 j := by decide + +private theorem k8t4p11_initial_merged_eq_row_5 : ∀ j : Fin 8, (fun i j => (((k8t4p11_template_matrix_0 i j ∪ k8t4p11_template_matrix_1 i j) ∪ k8t4p11_template_matrix_2 i j) ∪ k8t4p11_template_matrix_3 i j) ∪ requiredMatrix 8 k8t4p11.required i j) 5 j = k8t4p11_state_0 5 j := by decide + +private theorem k8t4p11_initial_merged_eq_row_6 : ∀ j : Fin 8, (fun i j => (((k8t4p11_template_matrix_0 i j ∪ k8t4p11_template_matrix_1 i j) ∪ k8t4p11_template_matrix_2 i j) ∪ k8t4p11_template_matrix_3 i j) ∪ requiredMatrix 8 k8t4p11.required i j) 6 j = k8t4p11_state_0 6 j := by decide + +private theorem k8t4p11_initial_merged_eq_row_7 : ∀ j : Fin 8, (fun i j => (((k8t4p11_template_matrix_0 i j ∪ k8t4p11_template_matrix_1 i j) ∪ k8t4p11_template_matrix_2 i j) ∪ k8t4p11_template_matrix_3 i j) ∪ requiredMatrix 8 k8t4p11.required i j) 7 j = k8t4p11_state_0 7 j := by decide + +private theorem k8t4p11_initial_merged_eq : (fun i j => (((k8t4p11_template_matrix_0 i j ∪ k8t4p11_template_matrix_1 i j) ∪ k8t4p11_template_matrix_2 i j) ∪ k8t4p11_template_matrix_3 i j) ∪ requiredMatrix 8 k8t4p11.required i j) = k8t4p11_state_0 := by + funext i j + fin_cases i + + · exact k8t4p11_initial_merged_eq_row_0 j + + · exact k8t4p11_initial_merged_eq_row_1 j + + · exact k8t4p11_initial_merged_eq_row_2 j + + · exact k8t4p11_initial_merged_eq_row_3 j + + · exact k8t4p11_initial_merged_eq_row_4 j + + · exact k8t4p11_initial_merged_eq_row_5 j + + · exact k8t4p11_initial_merged_eq_row_6 j + + · exact k8t4p11_initial_merged_eq_row_7 j + +private theorem k8t4p11_initial_eq : k8t4p11.initialMatrix 8 = k8t4p11_state_0 := by + funext i j + change templateMatrix (k8t4p11_templates_block_0 ++ k8t4p11_templates_block_1 ++ k8t4p11_templates_block_2 ++ k8t4p11_templates_block_3) i j ∪ requiredMatrix 8 k8t4p11.required i j = _ + simp only [templateMatrix_append, k8t4p11_template_matrix_0_eq, k8t4p11_template_matrix_1_eq, k8t4p11_template_matrix_2_eq, k8t4p11_template_matrix_3_eq] + exact congrFun (congrFun k8t4p11_initial_merged_eq i) j + +private def k8t4p11_state_1 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2}, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_0_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p11_state_0 a b ∪ requiredMatrix 8 k8t4p11_step_0_data.required a b) 0 j = k8t4p11_local_0 0 j := by decide + +private theorem k8t4p11_local_0_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p11_state_0 a b ∪ requiredMatrix 8 k8t4p11_step_0_data.required a b) 1 j = k8t4p11_local_0 1 j := by decide + +private theorem k8t4p11_local_0_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p11_state_0 a b ∪ requiredMatrix 8 k8t4p11_step_0_data.required a b) 2 j = k8t4p11_local_0 2 j := by decide + +private theorem k8t4p11_local_0_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p11_state_0 a b ∪ requiredMatrix 8 k8t4p11_step_0_data.required a b) 3 j = k8t4p11_local_0 3 j := by decide + +private theorem k8t4p11_local_0_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p11_state_0 a b ∪ requiredMatrix 8 k8t4p11_step_0_data.required a b) 4 j = k8t4p11_local_0 4 j := by decide + +private theorem k8t4p11_local_0_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p11_state_0 a b ∪ requiredMatrix 8 k8t4p11_step_0_data.required a b) 5 j = k8t4p11_local_0 5 j := by decide + +private theorem k8t4p11_local_0_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p11_state_0 a b ∪ requiredMatrix 8 k8t4p11_step_0_data.required a b) 6 j = k8t4p11_local_0 6 j := by decide + +private theorem k8t4p11_local_0_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p11_state_0 a b ∪ requiredMatrix 8 k8t4p11_step_0_data.required a b) 7 j = k8t4p11_local_0 7 j := by decide + +private theorem k8t4p11_local_0_eq : (fun a b => k8t4p11_state_0 a b ∪ requiredMatrix 8 k8t4p11_step_0_data.required a b) = k8t4p11_local_0 := by + funext i j + fin_cases i + + · exact k8t4p11_local_0_eq_row_0 j + + · exact k8t4p11_local_0_eq_row_1 j + + · exact k8t4p11_local_0_eq_row_2 j + + · exact k8t4p11_local_0_eq_row_3 j + + · exact k8t4p11_local_0_eq_row_4 j + + · exact k8t4p11_local_0_eq_row_5 j + + · exact k8t4p11_local_0_eq_row_6 j + + · exact k8t4p11_local_0_eq_row_7 j + +private theorem k8t4p11_local_0_paths : ∀ p ∈ k8t4p11_step_0_data.required, p.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_0_data.i k8t4p11_step_0_data.j) 8 := by decide + +private theorem k8t4p11_local_0_bad : k8t4p11_step_0_data.bad.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_0_data.i k8t4p11_step_0_data.j) k8t4p11_local_0 8 4 := by decide + +private theorem k8t4p11_step_0_check : k8t4p11_step_0.Check k8t4p11.graph k8t4p11_state_0 8 4 := by + change k8t4p11_step_0_data.Check k8t4p11.graph k8t4p11_state_0 8 4 + refine ⟨k8t4p11_local_0_paths, ?_⟩ + rw [k8t4p11_local_0_eq] + exact k8t4p11_local_0_bad + +private theorem k8t4p11_update_0 : k8t4p11_step_0.apply k8t4p11_state_0 = k8t4p11_state_1 := by + have h : ∀ i j : Fin 8, k8t4p11_step_0.apply k8t4p11_state_0 i j = k8t4p11_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_2 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_1 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2}, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_1_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p11_state_1 a b ∪ requiredMatrix 8 k8t4p11_step_1_data.required a b) 0 j = k8t4p11_local_1 0 j := by decide + +private theorem k8t4p11_local_1_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p11_state_1 a b ∪ requiredMatrix 8 k8t4p11_step_1_data.required a b) 1 j = k8t4p11_local_1 1 j := by decide + +private theorem k8t4p11_local_1_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p11_state_1 a b ∪ requiredMatrix 8 k8t4p11_step_1_data.required a b) 2 j = k8t4p11_local_1 2 j := by decide + +private theorem k8t4p11_local_1_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p11_state_1 a b ∪ requiredMatrix 8 k8t4p11_step_1_data.required a b) 3 j = k8t4p11_local_1 3 j := by decide + +private theorem k8t4p11_local_1_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p11_state_1 a b ∪ requiredMatrix 8 k8t4p11_step_1_data.required a b) 4 j = k8t4p11_local_1 4 j := by decide + +private theorem k8t4p11_local_1_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p11_state_1 a b ∪ requiredMatrix 8 k8t4p11_step_1_data.required a b) 5 j = k8t4p11_local_1 5 j := by decide + +private theorem k8t4p11_local_1_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p11_state_1 a b ∪ requiredMatrix 8 k8t4p11_step_1_data.required a b) 6 j = k8t4p11_local_1 6 j := by decide + +private theorem k8t4p11_local_1_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p11_state_1 a b ∪ requiredMatrix 8 k8t4p11_step_1_data.required a b) 7 j = k8t4p11_local_1 7 j := by decide + +private theorem k8t4p11_local_1_eq : (fun a b => k8t4p11_state_1 a b ∪ requiredMatrix 8 k8t4p11_step_1_data.required a b) = k8t4p11_local_1 := by + funext i j + fin_cases i + + · exact k8t4p11_local_1_eq_row_0 j + + · exact k8t4p11_local_1_eq_row_1 j + + · exact k8t4p11_local_1_eq_row_2 j + + · exact k8t4p11_local_1_eq_row_3 j + + · exact k8t4p11_local_1_eq_row_4 j + + · exact k8t4p11_local_1_eq_row_5 j + + · exact k8t4p11_local_1_eq_row_6 j + + · exact k8t4p11_local_1_eq_row_7 j + +private theorem k8t4p11_local_1_paths : ∀ p ∈ k8t4p11_step_1_data.required, p.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_1_data.i k8t4p11_step_1_data.j) 8 := by decide + +private theorem k8t4p11_local_1_bad : k8t4p11_step_1_data.bad.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_1_data.i k8t4p11_step_1_data.j) k8t4p11_local_1 8 4 := by decide + +private theorem k8t4p11_step_1_check : k8t4p11_step_1.Check k8t4p11.graph k8t4p11_state_1 8 4 := by + change k8t4p11_step_1_data.Check k8t4p11.graph k8t4p11_state_1 8 4 + refine ⟨k8t4p11_local_1_paths, ?_⟩ + rw [k8t4p11_local_1_eq] + exact k8t4p11_local_1_bad + +private theorem k8t4p11_update_1 : k8t4p11_step_1.apply k8t4p11_state_1 = k8t4p11_state_2 := by + have h : ∀ i j : Fin 8, k8t4p11_step_1.apply k8t4p11_state_1 i j = k8t4p11_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_3 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_2 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2}, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_2_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p11_state_2 a b ∪ requiredMatrix 8 k8t4p11_step_2_data.required a b) 0 j = k8t4p11_local_2 0 j := by decide + +private theorem k8t4p11_local_2_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p11_state_2 a b ∪ requiredMatrix 8 k8t4p11_step_2_data.required a b) 1 j = k8t4p11_local_2 1 j := by decide + +private theorem k8t4p11_local_2_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p11_state_2 a b ∪ requiredMatrix 8 k8t4p11_step_2_data.required a b) 2 j = k8t4p11_local_2 2 j := by decide + +private theorem k8t4p11_local_2_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p11_state_2 a b ∪ requiredMatrix 8 k8t4p11_step_2_data.required a b) 3 j = k8t4p11_local_2 3 j := by decide + +private theorem k8t4p11_local_2_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p11_state_2 a b ∪ requiredMatrix 8 k8t4p11_step_2_data.required a b) 4 j = k8t4p11_local_2 4 j := by decide + +private theorem k8t4p11_local_2_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p11_state_2 a b ∪ requiredMatrix 8 k8t4p11_step_2_data.required a b) 5 j = k8t4p11_local_2 5 j := by decide + +private theorem k8t4p11_local_2_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p11_state_2 a b ∪ requiredMatrix 8 k8t4p11_step_2_data.required a b) 6 j = k8t4p11_local_2 6 j := by decide + +private theorem k8t4p11_local_2_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p11_state_2 a b ∪ requiredMatrix 8 k8t4p11_step_2_data.required a b) 7 j = k8t4p11_local_2 7 j := by decide + +private theorem k8t4p11_local_2_eq : (fun a b => k8t4p11_state_2 a b ∪ requiredMatrix 8 k8t4p11_step_2_data.required a b) = k8t4p11_local_2 := by + funext i j + fin_cases i + + · exact k8t4p11_local_2_eq_row_0 j + + · exact k8t4p11_local_2_eq_row_1 j + + · exact k8t4p11_local_2_eq_row_2 j + + · exact k8t4p11_local_2_eq_row_3 j + + · exact k8t4p11_local_2_eq_row_4 j + + · exact k8t4p11_local_2_eq_row_5 j + + · exact k8t4p11_local_2_eq_row_6 j + + · exact k8t4p11_local_2_eq_row_7 j + +private theorem k8t4p11_local_2_paths : ∀ p ∈ k8t4p11_step_2_data.required, p.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_2_data.i k8t4p11_step_2_data.j) 8 := by decide + +private theorem k8t4p11_local_2_bad : k8t4p11_step_2_data.bad.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_2_data.i k8t4p11_step_2_data.j) k8t4p11_local_2 8 4 := by decide + +private theorem k8t4p11_step_2_check : k8t4p11_step_2.Check k8t4p11.graph k8t4p11_state_2 8 4 := by + change k8t4p11_step_2_data.Check k8t4p11.graph k8t4p11_state_2 8 4 + refine ⟨k8t4p11_local_2_paths, ?_⟩ + rw [k8t4p11_local_2_eq] + exact k8t4p11_local_2_bad + +private theorem k8t4p11_update_2 : k8t4p11_step_2.apply k8t4p11_state_2 = k8t4p11_state_3 := by + have h : ∀ i j : Fin 8, k8t4p11_step_2.apply k8t4p11_state_2 i j = k8t4p11_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_4 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[{0, 2, 3, 4, 5}, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_3 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_3_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p11_state_3 a b ∪ requiredMatrix 8 k8t4p11_step_3_data.required a b) 0 j = k8t4p11_local_3 0 j := by decide + +private theorem k8t4p11_local_3_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p11_state_3 a b ∪ requiredMatrix 8 k8t4p11_step_3_data.required a b) 1 j = k8t4p11_local_3 1 j := by decide + +private theorem k8t4p11_local_3_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p11_state_3 a b ∪ requiredMatrix 8 k8t4p11_step_3_data.required a b) 2 j = k8t4p11_local_3 2 j := by decide + +private theorem k8t4p11_local_3_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p11_state_3 a b ∪ requiredMatrix 8 k8t4p11_step_3_data.required a b) 3 j = k8t4p11_local_3 3 j := by decide + +private theorem k8t4p11_local_3_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p11_state_3 a b ∪ requiredMatrix 8 k8t4p11_step_3_data.required a b) 4 j = k8t4p11_local_3 4 j := by decide + +private theorem k8t4p11_local_3_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p11_state_3 a b ∪ requiredMatrix 8 k8t4p11_step_3_data.required a b) 5 j = k8t4p11_local_3 5 j := by decide + +private theorem k8t4p11_local_3_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p11_state_3 a b ∪ requiredMatrix 8 k8t4p11_step_3_data.required a b) 6 j = k8t4p11_local_3 6 j := by decide + +private theorem k8t4p11_local_3_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p11_state_3 a b ∪ requiredMatrix 8 k8t4p11_step_3_data.required a b) 7 j = k8t4p11_local_3 7 j := by decide + +private theorem k8t4p11_local_3_eq : (fun a b => k8t4p11_state_3 a b ∪ requiredMatrix 8 k8t4p11_step_3_data.required a b) = k8t4p11_local_3 := by + funext i j + fin_cases i + + · exact k8t4p11_local_3_eq_row_0 j + + · exact k8t4p11_local_3_eq_row_1 j + + · exact k8t4p11_local_3_eq_row_2 j + + · exact k8t4p11_local_3_eq_row_3 j + + · exact k8t4p11_local_3_eq_row_4 j + + · exact k8t4p11_local_3_eq_row_5 j + + · exact k8t4p11_local_3_eq_row_6 j + + · exact k8t4p11_local_3_eq_row_7 j + +private theorem k8t4p11_local_3_paths : ∀ p ∈ k8t4p11_step_3_data.required, p.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_3_data.i k8t4p11_step_3_data.j) 8 := by decide + +private theorem k8t4p11_local_3_bad : k8t4p11_step_3_data.bad.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_3_data.i k8t4p11_step_3_data.j) k8t4p11_local_3 8 4 := by decide + +private theorem k8t4p11_step_3_check : k8t4p11_step_3.Check k8t4p11.graph k8t4p11_state_3 8 4 := by + change k8t4p11_step_3_data.Check k8t4p11.graph k8t4p11_state_3 8 4 + refine ⟨k8t4p11_local_3_paths, ?_⟩ + rw [k8t4p11_local_3_eq] + exact k8t4p11_local_3_bad + +private theorem k8t4p11_update_3 : k8t4p11_step_3.apply k8t4p11_state_3 = k8t4p11_state_4 := by + have h : ∀ i j : Fin 8, k8t4p11_step_3.apply k8t4p11_state_3 i j = k8t4p11_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_5 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_4 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, Finset.Icc 0 5, Finset.Icc 1 5, {0, 1}, {0, 1}, {1}, {0, 1}, {0, 1}], + #[{1}, ∅, Finset.Icc 1 6, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 0 5, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[Finset.Icc 1 5, {2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[{1}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[{0, 1}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_4_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, {0, 1, 2}, {1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {2}, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, {2}, ∅, {2}, ∅, {0}, ∅, {0}, ∅], + #[{1, 2}, ∅, {2}, ∅, ∅, {0}, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {0}, {0}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {0}, {0}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_4_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_0) 0 j = k8t4p11_local_4_required_0 0 j := by decide + +private theorem k8t4p11_local_4_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_0) 1 j = k8t4p11_local_4_required_0 1 j := by decide + +private theorem k8t4p11_local_4_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_0) 2 j = k8t4p11_local_4_required_0 2 j := by decide + +private theorem k8t4p11_local_4_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_0) 3 j = k8t4p11_local_4_required_0 3 j := by decide + +private theorem k8t4p11_local_4_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_0) 4 j = k8t4p11_local_4_required_0 4 j := by decide + +private theorem k8t4p11_local_4_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_0) 5 j = k8t4p11_local_4_required_0 5 j := by decide + +private theorem k8t4p11_local_4_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_0) 6 j = k8t4p11_local_4_required_0 6 j := by decide + +private theorem k8t4p11_local_4_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_0) 7 j = k8t4p11_local_4_required_0 7 j := by decide + +private theorem k8t4p11_local_4_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_0) 8 j = k8t4p11_local_4_required_0 8 j := by decide + +private theorem k8t4p11_local_4_required_0_eq : (requiredMatrix 8 k8t4p11_step_4_required_block_0) = k8t4p11_local_4_required_0 := by + funext i j + fin_cases i + + · exact k8t4p11_local_4_required_0_eq_row_0 j + + · exact k8t4p11_local_4_required_0_eq_row_1 j + + · exact k8t4p11_local_4_required_0_eq_row_2 j + + · exact k8t4p11_local_4_required_0_eq_row_3 j + + · exact k8t4p11_local_4_required_0_eq_row_4 j + + · exact k8t4p11_local_4_required_0_eq_row_5 j + + · exact k8t4p11_local_4_required_0_eq_row_6 j + + · exact k8t4p11_local_4_required_0_eq_row_7 j + + · exact k8t4p11_local_4_required_0_eq_row_8 j + +private theorem k8t4p11_local_4_path_0_0 : (⟨2, 0, [1, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_0_1 : (⟨2, 0, [1, 3, 4, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_0_2 : (⟨2, 3, [1, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_0_3 : (⟨2, 7, [1, 0, 6, 5, 4, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_0_4 : (⟨2, 5, [1, 0, 6, 7, 8, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_0_5 : (⟨2, 0, [3, 4, 5, 6, 7, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_0_6 : (⟨2, 1, [3, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_0_7 : (⟨3, 0, [1, 4, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_0_8 : (⟨3, 0, [2, 1, 4, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_0_9 : (⟨3, 7, [2, 1, 0, 6, 5, 4, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_0_10 : (⟨3, 5, [2, 1, 0, 6, 7, 8, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_0_11 : (⟨3, 2, [4, 5, 6, 0, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_paths_block_0 : ∀ p ∈ k8t4p11_step_4_required_block_0, p.Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by + simp only [k8t4p11_step_4_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_local_4_path_0_0, k8t4p11_local_4_path_0_1, k8t4p11_local_4_path_0_2, k8t4p11_local_4_path_0_3, k8t4p11_local_4_path_0_4, k8t4p11_local_4_path_0_5, k8t4p11_local_4_path_0_6, k8t4p11_local_4_path_0_7, k8t4p11_local_4_path_0_8, k8t4p11_local_4_path_0_9, k8t4p11_local_4_path_0_10, k8t4p11_local_4_path_0_11⟩ + +private def k8t4p11_local_4_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, {4, 5}, {5}, {0, 1}, {0, 1}, {1}, {0, 1}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_4_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_1) 0 j = k8t4p11_local_4_required_1 0 j := by decide + +private theorem k8t4p11_local_4_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_1) 1 j = k8t4p11_local_4_required_1 1 j := by decide + +private theorem k8t4p11_local_4_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_1) 2 j = k8t4p11_local_4_required_1 2 j := by decide + +private theorem k8t4p11_local_4_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_1) 3 j = k8t4p11_local_4_required_1 3 j := by decide + +private theorem k8t4p11_local_4_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_1) 4 j = k8t4p11_local_4_required_1 4 j := by decide + +private theorem k8t4p11_local_4_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_1) 5 j = k8t4p11_local_4_required_1 5 j := by decide + +private theorem k8t4p11_local_4_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_1) 6 j = k8t4p11_local_4_required_1 6 j := by decide + +private theorem k8t4p11_local_4_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_1) 7 j = k8t4p11_local_4_required_1 7 j := by decide + +private theorem k8t4p11_local_4_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_1) 8 j = k8t4p11_local_4_required_1 8 j := by decide + +private theorem k8t4p11_local_4_required_1_eq : (requiredMatrix 8 k8t4p11_step_4_required_block_1) = k8t4p11_local_4_required_1 := by + funext i j + fin_cases i + + · exact k8t4p11_local_4_required_1_eq_row_0 j + + · exact k8t4p11_local_4_required_1_eq_row_1 j + + · exact k8t4p11_local_4_required_1_eq_row_2 j + + · exact k8t4p11_local_4_required_1_eq_row_3 j + + · exact k8t4p11_local_4_required_1_eq_row_4 j + + · exact k8t4p11_local_4_required_1_eq_row_5 j + + · exact k8t4p11_local_4_required_1_eq_row_6 j + + · exact k8t4p11_local_4_required_1_eq_row_7 j + + · exact k8t4p11_local_4_required_1_eq_row_8 j + +private theorem k8t4p11_local_4_path_1_0 : (⟨0, 3, [1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_1_1 : (⟨0, 7, [1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_1_2 : (⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_1_3 : (⟨0, 6, [1, 2, 3, 4, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_1_4 : (⟨0, 5, [1, 2, 3, 4, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_1_5 : (⟨0, 7, [1, 2, 3, 8, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_1_6 : (⟨0, 5, [1, 2, 3, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_1_7 : (⟨0, 4, [1, 2, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_1_8 : (⟨0, 2, [1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_1_9 : (⟨0, 8, [1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_1_10 : (⟨0, 4, [1, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_1_11 : (⟨0, 2, [1, 4, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_paths_block_1 : ∀ p ∈ k8t4p11_step_4_required_block_1, p.Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by + simp only [k8t4p11_step_4_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_local_4_path_1_0, k8t4p11_local_4_path_1_1, k8t4p11_local_4_path_1_2, k8t4p11_local_4_path_1_3, k8t4p11_local_4_path_1_4, k8t4p11_local_4_path_1_5, k8t4p11_local_4_path_1_6, k8t4p11_local_4_path_1_7, k8t4p11_local_4_path_1_8, k8t4p11_local_4_path_1_9, k8t4p11_local_4_path_1_10, k8t4p11_local_4_path_1_11⟩ + +private def k8t4p11_local_4_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, Finset.Icc 0 3, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_4_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_2) 0 j = k8t4p11_local_4_required_2 0 j := by decide + +private theorem k8t4p11_local_4_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_2) 1 j = k8t4p11_local_4_required_2 1 j := by decide + +private theorem k8t4p11_local_4_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_2) 2 j = k8t4p11_local_4_required_2 2 j := by decide + +private theorem k8t4p11_local_4_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_2) 3 j = k8t4p11_local_4_required_2 3 j := by decide + +private theorem k8t4p11_local_4_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_2) 4 j = k8t4p11_local_4_required_2 4 j := by decide + +private theorem k8t4p11_local_4_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_2) 5 j = k8t4p11_local_4_required_2 5 j := by decide + +private theorem k8t4p11_local_4_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_2) 6 j = k8t4p11_local_4_required_2 6 j := by decide + +private theorem k8t4p11_local_4_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_2) 7 j = k8t4p11_local_4_required_2 7 j := by decide + +private theorem k8t4p11_local_4_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_4_required_block_2) 8 j = k8t4p11_local_4_required_2 8 j := by decide + +private theorem k8t4p11_local_4_required_2_eq : (requiredMatrix 8 k8t4p11_step_4_required_block_2) = k8t4p11_local_4_required_2 := by + funext i j + fin_cases i + + · exact k8t4p11_local_4_required_2_eq_row_0 j + + · exact k8t4p11_local_4_required_2_eq_row_1 j + + · exact k8t4p11_local_4_required_2_eq_row_2 j + + · exact k8t4p11_local_4_required_2_eq_row_3 j + + · exact k8t4p11_local_4_required_2_eq_row_4 j + + · exact k8t4p11_local_4_required_2_eq_row_5 j + + · exact k8t4p11_local_4_required_2_eq_row_6 j + + · exact k8t4p11_local_4_required_2_eq_row_7 j + + · exact k8t4p11_local_4_required_2_eq_row_8 j + +private theorem k8t4p11_local_4_path_2_0 : (⟨0, 3, [1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_2_1 : (⟨0, 2, [1, 4, 5, 6, 7, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_2_2 : (⟨0, 3, [1, 4, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_2_3 : (⟨0, 2, [1, 4, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_2_4 : (⟨0, 3, [6, 5, 4, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_2_5 : (⟨0, 3, [6, 5, 4, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_2_6 : (⟨0, 2, [6, 5, 4, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_2_7 : (⟨0, 2, [6, 5, 4, 1, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_path_2_8 : (⟨0, 1, [6, 5, 4, 8, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by decide + +private theorem k8t4p11_local_4_paths_block_2 : ∀ p ∈ k8t4p11_step_4_required_block_2, p.Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by + simp only [k8t4p11_step_4_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_local_4_path_2_0, k8t4p11_local_4_path_2_1, k8t4p11_local_4_path_2_2, k8t4p11_local_4_path_2_3, k8t4p11_local_4_path_2_4, k8t4p11_local_4_path_2_5, k8t4p11_local_4_path_2_6, k8t4p11_local_4_path_2_7, k8t4p11_local_4_path_2_8⟩ + +private theorem k8t4p11_local_4_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_4 a b ∪ (((k8t4p11_local_4_required_0 a b ∪ k8t4p11_local_4_required_1 a b) ∪ k8t4p11_local_4_required_2 a b))) 0 j = k8t4p11_local_4 0 j := by decide + +private theorem k8t4p11_local_4_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_4 a b ∪ (((k8t4p11_local_4_required_0 a b ∪ k8t4p11_local_4_required_1 a b) ∪ k8t4p11_local_4_required_2 a b))) 1 j = k8t4p11_local_4 1 j := by decide + +private theorem k8t4p11_local_4_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_4 a b ∪ (((k8t4p11_local_4_required_0 a b ∪ k8t4p11_local_4_required_1 a b) ∪ k8t4p11_local_4_required_2 a b))) 2 j = k8t4p11_local_4 2 j := by decide + +private theorem k8t4p11_local_4_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_4 a b ∪ (((k8t4p11_local_4_required_0 a b ∪ k8t4p11_local_4_required_1 a b) ∪ k8t4p11_local_4_required_2 a b))) 3 j = k8t4p11_local_4 3 j := by decide + +private theorem k8t4p11_local_4_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_4 a b ∪ (((k8t4p11_local_4_required_0 a b ∪ k8t4p11_local_4_required_1 a b) ∪ k8t4p11_local_4_required_2 a b))) 4 j = k8t4p11_local_4 4 j := by decide + +private theorem k8t4p11_local_4_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_4 a b ∪ (((k8t4p11_local_4_required_0 a b ∪ k8t4p11_local_4_required_1 a b) ∪ k8t4p11_local_4_required_2 a b))) 5 j = k8t4p11_local_4 5 j := by decide + +private theorem k8t4p11_local_4_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_4 a b ∪ (((k8t4p11_local_4_required_0 a b ∪ k8t4p11_local_4_required_1 a b) ∪ k8t4p11_local_4_required_2 a b))) 6 j = k8t4p11_local_4 6 j := by decide + +private theorem k8t4p11_local_4_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_4 a b ∪ (((k8t4p11_local_4_required_0 a b ∪ k8t4p11_local_4_required_1 a b) ∪ k8t4p11_local_4_required_2 a b))) 7 j = k8t4p11_local_4 7 j := by decide + +private theorem k8t4p11_local_4_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_4 a b ∪ (((k8t4p11_local_4_required_0 a b ∪ k8t4p11_local_4_required_1 a b) ∪ k8t4p11_local_4_required_2 a b))) 8 j = k8t4p11_local_4 8 j := by decide + +private theorem k8t4p11_local_4_merged_eq : (fun a b => freshMatrix k8t4p11_state_4 a b ∪ (((k8t4p11_local_4_required_0 a b ∪ k8t4p11_local_4_required_1 a b) ∪ k8t4p11_local_4_required_2 a b))) = k8t4p11_local_4 := by + funext i j + fin_cases i + + · exact k8t4p11_local_4_merged_eq_row_0 j + + · exact k8t4p11_local_4_merged_eq_row_1 j + + · exact k8t4p11_local_4_merged_eq_row_2 j + + · exact k8t4p11_local_4_merged_eq_row_3 j + + · exact k8t4p11_local_4_merged_eq_row_4 j + + · exact k8t4p11_local_4_merged_eq_row_5 j + + · exact k8t4p11_local_4_merged_eq_row_6 j + + · exact k8t4p11_local_4_merged_eq_row_7 j + + · exact k8t4p11_local_4_merged_eq_row_8 j + +private theorem k8t4p11_local_4_eq : (fun a b => freshMatrix k8t4p11_state_4 a b ∪ requiredMatrix 8 k8t4p11_step_4_data.required a b) = k8t4p11_local_4 := by + funext a b + change freshMatrix k8t4p11_state_4 a b ∪ requiredMatrix 8 (k8t4p11_step_4_required_block_0 ++ k8t4p11_step_4_required_block_1 ++ k8t4p11_step_4_required_block_2) a b = _ + simp only [requiredMatrix_append, k8t4p11_local_4_required_0_eq, k8t4p11_local_4_required_1_eq, k8t4p11_local_4_required_2_eq] + exact congrFun (congrFun k8t4p11_local_4_merged_eq a) b + +private theorem k8t4p11_local_4_paths : ∀ p ∈ k8t4p11_step_4_data.required, p.Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 := by + change ∀ p ∈ (k8t4p11_step_4_required_block_0 ++ k8t4p11_step_4_required_block_1 ++ k8t4p11_step_4_required_block_2), p.Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) 8 + simp only [List.forall_mem_append] + exact ⟨⟨k8t4p11_local_4_paths_block_0, k8t4p11_local_4_paths_block_1⟩, k8t4p11_local_4_paths_block_2⟩ + +private theorem k8t4p11_local_4_bad : k8t4p11_step_4_data.bad.Check (freshGraph k8t4p11.graph k8t4p11_step_4_data.i k8t4p11_step_4_data.j) k8t4p11_local_4 8 4 := by decide + +private theorem k8t4p11_step_4_check : k8t4p11_step_4.Check k8t4p11.graph k8t4p11_state_4 8 4 := by + change k8t4p11_step_4_data.Check k8t4p11.graph k8t4p11_state_4 8 4 + refine ⟨by decide, k8t4p11_local_4_paths, ?_⟩ + rw [k8t4p11_local_4_eq] + exact k8t4p11_local_4_bad + +private theorem k8t4p11_update_4 : k8t4p11_step_4.apply k8t4p11_state_4 = k8t4p11_state_5 := by + have h : ∀ i j : Fin 8, k8t4p11_step_4.apply k8t4p11_state_4 i j = k8t4p11_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_6 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_5 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_5_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p11_state_5 a b ∪ requiredMatrix 8 k8t4p11_step_5_data.required a b) 0 j = k8t4p11_local_5 0 j := by decide + +private theorem k8t4p11_local_5_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p11_state_5 a b ∪ requiredMatrix 8 k8t4p11_step_5_data.required a b) 1 j = k8t4p11_local_5 1 j := by decide + +private theorem k8t4p11_local_5_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p11_state_5 a b ∪ requiredMatrix 8 k8t4p11_step_5_data.required a b) 2 j = k8t4p11_local_5 2 j := by decide + +private theorem k8t4p11_local_5_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p11_state_5 a b ∪ requiredMatrix 8 k8t4p11_step_5_data.required a b) 3 j = k8t4p11_local_5 3 j := by decide + +private theorem k8t4p11_local_5_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p11_state_5 a b ∪ requiredMatrix 8 k8t4p11_step_5_data.required a b) 4 j = k8t4p11_local_5 4 j := by decide + +private theorem k8t4p11_local_5_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p11_state_5 a b ∪ requiredMatrix 8 k8t4p11_step_5_data.required a b) 5 j = k8t4p11_local_5 5 j := by decide + +private theorem k8t4p11_local_5_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p11_state_5 a b ∪ requiredMatrix 8 k8t4p11_step_5_data.required a b) 6 j = k8t4p11_local_5 6 j := by decide + +private theorem k8t4p11_local_5_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p11_state_5 a b ∪ requiredMatrix 8 k8t4p11_step_5_data.required a b) 7 j = k8t4p11_local_5 7 j := by decide + +private theorem k8t4p11_local_5_eq : (fun a b => k8t4p11_state_5 a b ∪ requiredMatrix 8 k8t4p11_step_5_data.required a b) = k8t4p11_local_5 := by + funext i j + fin_cases i + + · exact k8t4p11_local_5_eq_row_0 j + + · exact k8t4p11_local_5_eq_row_1 j + + · exact k8t4p11_local_5_eq_row_2 j + + · exact k8t4p11_local_5_eq_row_3 j + + · exact k8t4p11_local_5_eq_row_4 j + + · exact k8t4p11_local_5_eq_row_5 j + + · exact k8t4p11_local_5_eq_row_6 j + + · exact k8t4p11_local_5_eq_row_7 j + +private theorem k8t4p11_local_5_paths : ∀ p ∈ k8t4p11_step_5_data.required, p.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_5_data.i k8t4p11_step_5_data.j) 8 := by decide + +private theorem k8t4p11_local_5_bad : k8t4p11_step_5_data.bad.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_5_data.i k8t4p11_step_5_data.j) k8t4p11_local_5 8 4 := by decide + +private theorem k8t4p11_step_5_check : k8t4p11_step_5.Check k8t4p11.graph k8t4p11_state_5 8 4 := by + change k8t4p11_step_5_data.Check k8t4p11.graph k8t4p11_state_5 8 4 + refine ⟨k8t4p11_local_5_paths, ?_⟩ + rw [k8t4p11_local_5_eq] + exact k8t4p11_local_5_bad + +private theorem k8t4p11_update_5 : k8t4p11_step_5.apply k8t4p11_state_5 = k8t4p11_state_6 := by + have h : ∀ i j : Fin 8, k8t4p11_step_5.apply k8t4p11_state_5 i j = k8t4p11_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_7 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, {0, 2, 3, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_6 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_6_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p11_state_6 a b ∪ requiredMatrix 8 k8t4p11_step_6_data.required a b) 0 j = k8t4p11_local_6 0 j := by decide + +private theorem k8t4p11_local_6_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p11_state_6 a b ∪ requiredMatrix 8 k8t4p11_step_6_data.required a b) 1 j = k8t4p11_local_6 1 j := by decide + +private theorem k8t4p11_local_6_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p11_state_6 a b ∪ requiredMatrix 8 k8t4p11_step_6_data.required a b) 2 j = k8t4p11_local_6 2 j := by decide + +private theorem k8t4p11_local_6_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p11_state_6 a b ∪ requiredMatrix 8 k8t4p11_step_6_data.required a b) 3 j = k8t4p11_local_6 3 j := by decide + +private theorem k8t4p11_local_6_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p11_state_6 a b ∪ requiredMatrix 8 k8t4p11_step_6_data.required a b) 4 j = k8t4p11_local_6 4 j := by decide + +private theorem k8t4p11_local_6_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p11_state_6 a b ∪ requiredMatrix 8 k8t4p11_step_6_data.required a b) 5 j = k8t4p11_local_6 5 j := by decide + +private theorem k8t4p11_local_6_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p11_state_6 a b ∪ requiredMatrix 8 k8t4p11_step_6_data.required a b) 6 j = k8t4p11_local_6 6 j := by decide + +private theorem k8t4p11_local_6_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p11_state_6 a b ∪ requiredMatrix 8 k8t4p11_step_6_data.required a b) 7 j = k8t4p11_local_6 7 j := by decide + +private theorem k8t4p11_local_6_eq : (fun a b => k8t4p11_state_6 a b ∪ requiredMatrix 8 k8t4p11_step_6_data.required a b) = k8t4p11_local_6 := by + funext i j + fin_cases i + + · exact k8t4p11_local_6_eq_row_0 j + + · exact k8t4p11_local_6_eq_row_1 j + + · exact k8t4p11_local_6_eq_row_2 j + + · exact k8t4p11_local_6_eq_row_3 j + + · exact k8t4p11_local_6_eq_row_4 j + + · exact k8t4p11_local_6_eq_row_5 j + + · exact k8t4p11_local_6_eq_row_6 j + + · exact k8t4p11_local_6_eq_row_7 j + +private theorem k8t4p11_local_6_paths : ∀ p ∈ k8t4p11_step_6_data.required, p.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_6_data.i k8t4p11_step_6_data.j) 8 := by decide + +private theorem k8t4p11_local_6_bad : k8t4p11_step_6_data.bad.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_6_data.i k8t4p11_step_6_data.j) k8t4p11_local_6 8 4 := by decide + +private theorem k8t4p11_step_6_check : k8t4p11_step_6.Check k8t4p11.graph k8t4p11_state_6 8 4 := by + change k8t4p11_step_6_data.Check k8t4p11.graph k8t4p11_state_6 8 4 + refine ⟨k8t4p11_local_6_paths, ?_⟩ + rw [k8t4p11_local_6_eq] + exact k8t4p11_local_6_bad + +private theorem k8t4p11_update_6 : k8t4p11_step_6.apply k8t4p11_state_6 = k8t4p11_state_7 := by + have h : ∀ i j : Fin 8, k8t4p11_step_6.apply k8t4p11_state_6 i j = k8t4p11_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_8 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_7 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 0 5, {1}, {0, 1}, {0, 1}, {1}, {0, 1}, {0, 1}], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 6, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[Finset.Icc 0 5, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{1}, {2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 0 4, {0, 2, 3, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 7], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[{1}, Finset.Icc 0 5, Finset.Icc 0 4, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_7_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2}, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, {2}, ∅, ∅, {0}, ∅, {0}, ∅], + #[{0, 1, 2}, {2}, ∅, {2}, ∅, {0}, ∅, {0}, ∅], + #[∅, ∅, {2}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0}, {0}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0}, {0}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_7_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_0) 0 j = k8t4p11_local_7_required_0 0 j := by decide + +private theorem k8t4p11_local_7_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_0) 1 j = k8t4p11_local_7_required_0 1 j := by decide + +private theorem k8t4p11_local_7_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_0) 2 j = k8t4p11_local_7_required_0 2 j := by decide + +private theorem k8t4p11_local_7_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_0) 3 j = k8t4p11_local_7_required_0 3 j := by decide + +private theorem k8t4p11_local_7_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_0) 4 j = k8t4p11_local_7_required_0 4 j := by decide + +private theorem k8t4p11_local_7_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_0) 5 j = k8t4p11_local_7_required_0 5 j := by decide + +private theorem k8t4p11_local_7_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_0) 6 j = k8t4p11_local_7_required_0 6 j := by decide + +private theorem k8t4p11_local_7_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_0) 7 j = k8t4p11_local_7_required_0 7 j := by decide + +private theorem k8t4p11_local_7_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_0) 8 j = k8t4p11_local_7_required_0 8 j := by decide + +private theorem k8t4p11_local_7_required_0_eq : (requiredMatrix 8 k8t4p11_step_7_required_block_0) = k8t4p11_local_7_required_0 := by + funext i j + fin_cases i + + · exact k8t4p11_local_7_required_0_eq_row_0 j + + · exact k8t4p11_local_7_required_0_eq_row_1 j + + · exact k8t4p11_local_7_required_0_eq_row_2 j + + · exact k8t4p11_local_7_required_0_eq_row_3 j + + · exact k8t4p11_local_7_required_0_eq_row_4 j + + · exact k8t4p11_local_7_required_0_eq_row_5 j + + · exact k8t4p11_local_7_required_0_eq_row_6 j + + · exact k8t4p11_local_7_required_0_eq_row_7 j + + · exact k8t4p11_local_7_required_0_eq_row_8 j + +private theorem k8t4p11_local_7_path_0_0 : (⟨1, 0, [2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_0_1 : (⟨1, 0, [2, 3, 4, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_0_2 : (⟨1, 7, [2, 3, 0, 6, 5, 4, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_0_3 : (⟨1, 5, [2, 3, 0, 6, 7, 8, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_0_4 : (⟨1, 2, [4, 5, 6, 0, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_0_5 : (⟨2, 0, [1, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_0_6 : (⟨2, 0, [1, 3, 4, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_0_7 : (⟨2, 7, [1, 3, 0, 6, 5, 4, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_0_8 : (⟨2, 5, [1, 3, 0, 6, 7, 8, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_0_9 : (⟨2, 0, [1, 4, 5, 6, 7, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_0_10 : (⟨2, 3, [1, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_0_11 : (⟨2, 1, [3, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_paths_block_0 : ∀ p ∈ k8t4p11_step_7_required_block_0, p.Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by + simp only [k8t4p11_step_7_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_local_7_path_0_0, k8t4p11_local_7_path_0_1, k8t4p11_local_7_path_0_2, k8t4p11_local_7_path_0_3, k8t4p11_local_7_path_0_4, k8t4p11_local_7_path_0_5, k8t4p11_local_7_path_0_6, k8t4p11_local_7_path_0_7, k8t4p11_local_7_path_0_8, k8t4p11_local_7_path_0_9, k8t4p11_local_7_path_0_10, k8t4p11_local_7_path_0_11⟩ + +private def k8t4p11_local_7_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {5}, {4, 5}, ∅, {0, 1}, {0, 1}, {1}, {0, 1}, {0, 1}], + #[{5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_7_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_1) 0 j = k8t4p11_local_7_required_1 0 j := by decide + +private theorem k8t4p11_local_7_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_1) 1 j = k8t4p11_local_7_required_1 1 j := by decide + +private theorem k8t4p11_local_7_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_1) 2 j = k8t4p11_local_7_required_1 2 j := by decide + +private theorem k8t4p11_local_7_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_1) 3 j = k8t4p11_local_7_required_1 3 j := by decide + +private theorem k8t4p11_local_7_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_1) 4 j = k8t4p11_local_7_required_1 4 j := by decide + +private theorem k8t4p11_local_7_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_1) 5 j = k8t4p11_local_7_required_1 5 j := by decide + +private theorem k8t4p11_local_7_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_1) 6 j = k8t4p11_local_7_required_1 6 j := by decide + +private theorem k8t4p11_local_7_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_1) 7 j = k8t4p11_local_7_required_1 7 j := by decide + +private theorem k8t4p11_local_7_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_1) 8 j = k8t4p11_local_7_required_1 8 j := by decide + +private theorem k8t4p11_local_7_required_1_eq : (requiredMatrix 8 k8t4p11_step_7_required_block_1) = k8t4p11_local_7_required_1 := by + funext i j + fin_cases i + + · exact k8t4p11_local_7_required_1_eq_row_0 j + + · exact k8t4p11_local_7_required_1_eq_row_1 j + + · exact k8t4p11_local_7_required_1_eq_row_2 j + + · exact k8t4p11_local_7_required_1_eq_row_3 j + + · exact k8t4p11_local_7_required_1_eq_row_4 j + + · exact k8t4p11_local_7_required_1_eq_row_5 j + + · exact k8t4p11_local_7_required_1_eq_row_6 j + + · exact k8t4p11_local_7_required_1_eq_row_7 j + + · exact k8t4p11_local_7_required_1_eq_row_8 j + +private theorem k8t4p11_local_7_path_1_0 : (⟨0, 2, [3, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_1_1 : (⟨0, 8, [3, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_1_2 : (⟨0, 5, [3, 1, 4, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_1_3 : (⟨0, 7, [3, 1, 8, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_1_4 : (⟨0, 4, [3, 1, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_1_5 : (⟨0, 1, [3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_1_6 : (⟨0, 8, [3, 2, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_1_7 : (⟨0, 6, [3, 2, 1, 4, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_1_8 : (⟨0, 5, [3, 2, 1, 4, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_1_9 : (⟨0, 7, [3, 2, 1, 8, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_1_10 : (⟨0, 4, [3, 2, 1, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_1_11 : (⟨0, 2, [3, 4, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_paths_block_1 : ∀ p ∈ k8t4p11_step_7_required_block_1, p.Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by + simp only [k8t4p11_step_7_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_local_7_path_1_0, k8t4p11_local_7_path_1_1, k8t4p11_local_7_path_1_2, k8t4p11_local_7_path_1_3, k8t4p11_local_7_path_1_4, k8t4p11_local_7_path_1_5, k8t4p11_local_7_path_1_6, k8t4p11_local_7_path_1_7, k8t4p11_local_7_path_1_8, k8t4p11_local_7_path_1_9, k8t4p11_local_7_path_1_10, k8t4p11_local_7_path_1_11⟩ + +private def k8t4p11_local_7_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 3, {1}, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_7_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_2) 0 j = k8t4p11_local_7_required_2 0 j := by decide + +private theorem k8t4p11_local_7_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_2) 1 j = k8t4p11_local_7_required_2 1 j := by decide + +private theorem k8t4p11_local_7_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_2) 2 j = k8t4p11_local_7_required_2 2 j := by decide + +private theorem k8t4p11_local_7_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_2) 3 j = k8t4p11_local_7_required_2 3 j := by decide + +private theorem k8t4p11_local_7_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_2) 4 j = k8t4p11_local_7_required_2 4 j := by decide + +private theorem k8t4p11_local_7_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_2) 5 j = k8t4p11_local_7_required_2 5 j := by decide + +private theorem k8t4p11_local_7_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_2) 6 j = k8t4p11_local_7_required_2 6 j := by decide + +private theorem k8t4p11_local_7_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_2) 7 j = k8t4p11_local_7_required_2 7 j := by decide + +private theorem k8t4p11_local_7_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_7_required_block_2) 8 j = k8t4p11_local_7_required_2 8 j := by decide + +private theorem k8t4p11_local_7_required_2_eq : (requiredMatrix 8 k8t4p11_step_7_required_block_2) = k8t4p11_local_7_required_2 := by + funext i j + fin_cases i + + · exact k8t4p11_local_7_required_2_eq_row_0 j + + · exact k8t4p11_local_7_required_2_eq_row_1 j + + · exact k8t4p11_local_7_required_2_eq_row_2 j + + · exact k8t4p11_local_7_required_2_eq_row_3 j + + · exact k8t4p11_local_7_required_2_eq_row_4 j + + · exact k8t4p11_local_7_required_2_eq_row_5 j + + · exact k8t4p11_local_7_required_2_eq_row_6 j + + · exact k8t4p11_local_7_required_2_eq_row_7 j + + · exact k8t4p11_local_7_required_2_eq_row_8 j + +private theorem k8t4p11_local_7_path_2_0 : (⟨0, 1, [3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_2_1 : (⟨0, 2, [3, 4, 5, 6, 7, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_2_2 : (⟨0, 1, [3, 4, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_2_3 : (⟨0, 2, [3, 4, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_2_4 : (⟨0, 2, [6, 5, 4, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_2_5 : (⟨0, 2, [6, 5, 4, 1, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_2_6 : (⟨0, 1, [6, 5, 4, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_2_7 : (⟨0, 1, [6, 5, 4, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_path_2_8 : (⟨0, 3, [6, 5, 4, 8, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by decide + +private theorem k8t4p11_local_7_paths_block_2 : ∀ p ∈ k8t4p11_step_7_required_block_2, p.Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by + simp only [k8t4p11_step_7_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_local_7_path_2_0, k8t4p11_local_7_path_2_1, k8t4p11_local_7_path_2_2, k8t4p11_local_7_path_2_3, k8t4p11_local_7_path_2_4, k8t4p11_local_7_path_2_5, k8t4p11_local_7_path_2_6, k8t4p11_local_7_path_2_7, k8t4p11_local_7_path_2_8⟩ + +private theorem k8t4p11_local_7_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_7 a b ∪ (((k8t4p11_local_7_required_0 a b ∪ k8t4p11_local_7_required_1 a b) ∪ k8t4p11_local_7_required_2 a b))) 0 j = k8t4p11_local_7 0 j := by decide + +private theorem k8t4p11_local_7_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_7 a b ∪ (((k8t4p11_local_7_required_0 a b ∪ k8t4p11_local_7_required_1 a b) ∪ k8t4p11_local_7_required_2 a b))) 1 j = k8t4p11_local_7 1 j := by decide + +private theorem k8t4p11_local_7_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_7 a b ∪ (((k8t4p11_local_7_required_0 a b ∪ k8t4p11_local_7_required_1 a b) ∪ k8t4p11_local_7_required_2 a b))) 2 j = k8t4p11_local_7 2 j := by decide + +private theorem k8t4p11_local_7_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_7 a b ∪ (((k8t4p11_local_7_required_0 a b ∪ k8t4p11_local_7_required_1 a b) ∪ k8t4p11_local_7_required_2 a b))) 3 j = k8t4p11_local_7 3 j := by decide + +private theorem k8t4p11_local_7_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_7 a b ∪ (((k8t4p11_local_7_required_0 a b ∪ k8t4p11_local_7_required_1 a b) ∪ k8t4p11_local_7_required_2 a b))) 4 j = k8t4p11_local_7 4 j := by decide + +private theorem k8t4p11_local_7_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_7 a b ∪ (((k8t4p11_local_7_required_0 a b ∪ k8t4p11_local_7_required_1 a b) ∪ k8t4p11_local_7_required_2 a b))) 5 j = k8t4p11_local_7 5 j := by decide + +private theorem k8t4p11_local_7_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_7 a b ∪ (((k8t4p11_local_7_required_0 a b ∪ k8t4p11_local_7_required_1 a b) ∪ k8t4p11_local_7_required_2 a b))) 6 j = k8t4p11_local_7 6 j := by decide + +private theorem k8t4p11_local_7_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_7 a b ∪ (((k8t4p11_local_7_required_0 a b ∪ k8t4p11_local_7_required_1 a b) ∪ k8t4p11_local_7_required_2 a b))) 7 j = k8t4p11_local_7 7 j := by decide + +private theorem k8t4p11_local_7_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_7 a b ∪ (((k8t4p11_local_7_required_0 a b ∪ k8t4p11_local_7_required_1 a b) ∪ k8t4p11_local_7_required_2 a b))) 8 j = k8t4p11_local_7 8 j := by decide + +private theorem k8t4p11_local_7_merged_eq : (fun a b => freshMatrix k8t4p11_state_7 a b ∪ (((k8t4p11_local_7_required_0 a b ∪ k8t4p11_local_7_required_1 a b) ∪ k8t4p11_local_7_required_2 a b))) = k8t4p11_local_7 := by + funext i j + fin_cases i + + · exact k8t4p11_local_7_merged_eq_row_0 j + + · exact k8t4p11_local_7_merged_eq_row_1 j + + · exact k8t4p11_local_7_merged_eq_row_2 j + + · exact k8t4p11_local_7_merged_eq_row_3 j + + · exact k8t4p11_local_7_merged_eq_row_4 j + + · exact k8t4p11_local_7_merged_eq_row_5 j + + · exact k8t4p11_local_7_merged_eq_row_6 j + + · exact k8t4p11_local_7_merged_eq_row_7 j + + · exact k8t4p11_local_7_merged_eq_row_8 j + +private theorem k8t4p11_local_7_eq : (fun a b => freshMatrix k8t4p11_state_7 a b ∪ requiredMatrix 8 k8t4p11_step_7_data.required a b) = k8t4p11_local_7 := by + funext a b + change freshMatrix k8t4p11_state_7 a b ∪ requiredMatrix 8 (k8t4p11_step_7_required_block_0 ++ k8t4p11_step_7_required_block_1 ++ k8t4p11_step_7_required_block_2) a b = _ + simp only [requiredMatrix_append, k8t4p11_local_7_required_0_eq, k8t4p11_local_7_required_1_eq, k8t4p11_local_7_required_2_eq] + exact congrFun (congrFun k8t4p11_local_7_merged_eq a) b + +private theorem k8t4p11_local_7_paths : ∀ p ∈ k8t4p11_step_7_data.required, p.Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 := by + change ∀ p ∈ (k8t4p11_step_7_required_block_0 ++ k8t4p11_step_7_required_block_1 ++ k8t4p11_step_7_required_block_2), p.Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) 8 + simp only [List.forall_mem_append] + exact ⟨⟨k8t4p11_local_7_paths_block_0, k8t4p11_local_7_paths_block_1⟩, k8t4p11_local_7_paths_block_2⟩ + +private theorem k8t4p11_local_7_bad : k8t4p11_step_7_data.bad.Check (freshGraph k8t4p11.graph k8t4p11_step_7_data.i k8t4p11_step_7_data.j) k8t4p11_local_7 8 4 := by decide + +private theorem k8t4p11_step_7_check : k8t4p11_step_7.Check k8t4p11.graph k8t4p11_state_7 8 4 := by + change k8t4p11_step_7_data.Check k8t4p11.graph k8t4p11_state_7 8 4 + refine ⟨by decide, k8t4p11_local_7_paths, ?_⟩ + rw [k8t4p11_local_7_eq] + exact k8t4p11_local_7_bad + +private theorem k8t4p11_update_7 : k8t4p11_step_7.apply k8t4p11_state_7 = k8t4p11_state_8 := by + have h : ∀ i j : Fin 8, k8t4p11_step_7.apply k8t4p11_state_7 i j = k8t4p11_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_9 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_8 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_8_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p11_state_8 a b ∪ requiredMatrix 8 k8t4p11_step_8_data.required a b) 0 j = k8t4p11_local_8 0 j := by decide + +private theorem k8t4p11_local_8_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p11_state_8 a b ∪ requiredMatrix 8 k8t4p11_step_8_data.required a b) 1 j = k8t4p11_local_8 1 j := by decide + +private theorem k8t4p11_local_8_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p11_state_8 a b ∪ requiredMatrix 8 k8t4p11_step_8_data.required a b) 2 j = k8t4p11_local_8 2 j := by decide + +private theorem k8t4p11_local_8_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p11_state_8 a b ∪ requiredMatrix 8 k8t4p11_step_8_data.required a b) 3 j = k8t4p11_local_8 3 j := by decide + +private theorem k8t4p11_local_8_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p11_state_8 a b ∪ requiredMatrix 8 k8t4p11_step_8_data.required a b) 4 j = k8t4p11_local_8 4 j := by decide + +private theorem k8t4p11_local_8_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p11_state_8 a b ∪ requiredMatrix 8 k8t4p11_step_8_data.required a b) 5 j = k8t4p11_local_8 5 j := by decide + +private theorem k8t4p11_local_8_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p11_state_8 a b ∪ requiredMatrix 8 k8t4p11_step_8_data.required a b) 6 j = k8t4p11_local_8 6 j := by decide + +private theorem k8t4p11_local_8_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p11_state_8 a b ∪ requiredMatrix 8 k8t4p11_step_8_data.required a b) 7 j = k8t4p11_local_8 7 j := by decide + +private theorem k8t4p11_local_8_eq : (fun a b => k8t4p11_state_8 a b ∪ requiredMatrix 8 k8t4p11_step_8_data.required a b) = k8t4p11_local_8 := by + funext i j + fin_cases i + + · exact k8t4p11_local_8_eq_row_0 j + + · exact k8t4p11_local_8_eq_row_1 j + + · exact k8t4p11_local_8_eq_row_2 j + + · exact k8t4p11_local_8_eq_row_3 j + + · exact k8t4p11_local_8_eq_row_4 j + + · exact k8t4p11_local_8_eq_row_5 j + + · exact k8t4p11_local_8_eq_row_6 j + + · exact k8t4p11_local_8_eq_row_7 j + +private theorem k8t4p11_local_8_paths : ∀ p ∈ k8t4p11_step_8_data.required, p.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_8_data.i k8t4p11_step_8_data.j) 8 := by decide + +private theorem k8t4p11_local_8_bad : k8t4p11_step_8_data.bad.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_8_data.i k8t4p11_step_8_data.j) k8t4p11_local_8 8 4 := by decide + +private theorem k8t4p11_step_8_check : k8t4p11_step_8.Check k8t4p11.graph k8t4p11_state_8 8 4 := by + change k8t4p11_step_8_data.Check k8t4p11.graph k8t4p11_state_8 8 4 + refine ⟨k8t4p11_local_8_paths, ?_⟩ + rw [k8t4p11_local_8_eq] + exact k8t4p11_local_8_bad + +private theorem k8t4p11_update_8 : k8t4p11_step_8.apply k8t4p11_state_8 = k8t4p11_state_9 := by + have h : ∀ i j : Fin 8, k8t4p11_step_8.apply k8t4p11_state_8 i j = k8t4p11_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_10 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_9 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, ∅, Finset.Icc 0 3, ∅, Finset.Icc 0 4, ∅], + #[Finset.Icc 0 4, ∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{0}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{0}, {2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {1, 3, 4, 5, 6}], + #[∅, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, {1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_9_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_9 a b ∪ requiredMatrix 8 k8t4p11_step_9_data.required a b) 0 j = k8t4p11_local_9 0 j := by decide + +private theorem k8t4p11_local_9_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_9 a b ∪ requiredMatrix 8 k8t4p11_step_9_data.required a b) 1 j = k8t4p11_local_9 1 j := by decide + +private theorem k8t4p11_local_9_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_9 a b ∪ requiredMatrix 8 k8t4p11_step_9_data.required a b) 2 j = k8t4p11_local_9 2 j := by decide + +private theorem k8t4p11_local_9_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_9 a b ∪ requiredMatrix 8 k8t4p11_step_9_data.required a b) 3 j = k8t4p11_local_9 3 j := by decide + +private theorem k8t4p11_local_9_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_9 a b ∪ requiredMatrix 8 k8t4p11_step_9_data.required a b) 4 j = k8t4p11_local_9 4 j := by decide + +private theorem k8t4p11_local_9_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_9 a b ∪ requiredMatrix 8 k8t4p11_step_9_data.required a b) 5 j = k8t4p11_local_9 5 j := by decide + +private theorem k8t4p11_local_9_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_9 a b ∪ requiredMatrix 8 k8t4p11_step_9_data.required a b) 6 j = k8t4p11_local_9 6 j := by decide + +private theorem k8t4p11_local_9_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_9 a b ∪ requiredMatrix 8 k8t4p11_step_9_data.required a b) 7 j = k8t4p11_local_9 7 j := by decide + +private theorem k8t4p11_local_9_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_9 a b ∪ requiredMatrix 8 k8t4p11_step_9_data.required a b) 8 j = k8t4p11_local_9 8 j := by decide + +private theorem k8t4p11_local_9_eq : (fun a b => freshMatrix k8t4p11_state_9 a b ∪ requiredMatrix 8 k8t4p11_step_9_data.required a b) = k8t4p11_local_9 := by + funext i j + fin_cases i + + · exact k8t4p11_local_9_eq_row_0 j + + · exact k8t4p11_local_9_eq_row_1 j + + · exact k8t4p11_local_9_eq_row_2 j + + · exact k8t4p11_local_9_eq_row_3 j + + · exact k8t4p11_local_9_eq_row_4 j + + · exact k8t4p11_local_9_eq_row_5 j + + · exact k8t4p11_local_9_eq_row_6 j + + · exact k8t4p11_local_9_eq_row_7 j + + · exact k8t4p11_local_9_eq_row_8 j + +private theorem k8t4p11_local_9_paths : ∀ p ∈ k8t4p11_step_9_data.required, p.Check (freshGraph k8t4p11.graph k8t4p11_step_9_data.i k8t4p11_step_9_data.j) 8 := by decide + +private theorem k8t4p11_local_9_bad : k8t4p11_step_9_data.bad.Check (freshGraph k8t4p11.graph k8t4p11_step_9_data.i k8t4p11_step_9_data.j) k8t4p11_local_9 8 4 := by decide + +private theorem k8t4p11_step_9_check : k8t4p11_step_9.Check k8t4p11.graph k8t4p11_state_9 8 4 := by + change k8t4p11_step_9_data.Check k8t4p11.graph k8t4p11_state_9 8 4 + refine ⟨by decide, k8t4p11_local_9_paths, ?_⟩ + rw [k8t4p11_local_9_eq] + exact k8t4p11_local_9_bad + +private theorem k8t4p11_update_9 : k8t4p11_step_9.apply k8t4p11_state_9 = k8t4p11_state_10 := by + have h : ∀ i j : Fin 8, k8t4p11_step_9.apply k8t4p11_state_9 i j = k8t4p11_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_11 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_10 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, {1, 2}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 1 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_10_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p11_state_10 a b ∪ requiredMatrix 8 k8t4p11_step_10_data.required a b) 0 j = k8t4p11_local_10 0 j := by decide + +private theorem k8t4p11_local_10_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p11_state_10 a b ∪ requiredMatrix 8 k8t4p11_step_10_data.required a b) 1 j = k8t4p11_local_10 1 j := by decide + +private theorem k8t4p11_local_10_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p11_state_10 a b ∪ requiredMatrix 8 k8t4p11_step_10_data.required a b) 2 j = k8t4p11_local_10 2 j := by decide + +private theorem k8t4p11_local_10_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p11_state_10 a b ∪ requiredMatrix 8 k8t4p11_step_10_data.required a b) 3 j = k8t4p11_local_10 3 j := by decide + +private theorem k8t4p11_local_10_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p11_state_10 a b ∪ requiredMatrix 8 k8t4p11_step_10_data.required a b) 4 j = k8t4p11_local_10 4 j := by decide + +private theorem k8t4p11_local_10_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p11_state_10 a b ∪ requiredMatrix 8 k8t4p11_step_10_data.required a b) 5 j = k8t4p11_local_10 5 j := by decide + +private theorem k8t4p11_local_10_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p11_state_10 a b ∪ requiredMatrix 8 k8t4p11_step_10_data.required a b) 6 j = k8t4p11_local_10 6 j := by decide + +private theorem k8t4p11_local_10_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p11_state_10 a b ∪ requiredMatrix 8 k8t4p11_step_10_data.required a b) 7 j = k8t4p11_local_10 7 j := by decide + +private theorem k8t4p11_local_10_eq : (fun a b => k8t4p11_state_10 a b ∪ requiredMatrix 8 k8t4p11_step_10_data.required a b) = k8t4p11_local_10 := by + funext i j + fin_cases i + + · exact k8t4p11_local_10_eq_row_0 j + + · exact k8t4p11_local_10_eq_row_1 j + + · exact k8t4p11_local_10_eq_row_2 j + + · exact k8t4p11_local_10_eq_row_3 j + + · exact k8t4p11_local_10_eq_row_4 j + + · exact k8t4p11_local_10_eq_row_5 j + + · exact k8t4p11_local_10_eq_row_6 j + + · exact k8t4p11_local_10_eq_row_7 j + +private theorem k8t4p11_local_10_paths : ∀ p ∈ k8t4p11_step_10_data.required, p.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_10_data.i k8t4p11_step_10_data.j) 8 := by decide + +private theorem k8t4p11_local_10_bad : k8t4p11_step_10_data.bad.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_10_data.i k8t4p11_step_10_data.j) k8t4p11_local_10 8 4 := by decide + +private theorem k8t4p11_step_10_check : k8t4p11_step_10.Check k8t4p11.graph k8t4p11_state_10 8 4 := by + change k8t4p11_step_10_data.Check k8t4p11.graph k8t4p11_state_10 8 4 + refine ⟨k8t4p11_local_10_paths, ?_⟩ + rw [k8t4p11_local_10_eq] + exact k8t4p11_local_10_bad + +private theorem k8t4p11_update_10 : k8t4p11_step_10.apply k8t4p11_state_10 = k8t4p11_state_11 := by + have h : ∀ i j : Fin 8, k8t4p11_step_10.apply k8t4p11_state_10 i j = k8t4p11_state_11 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_12 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_11 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, {1, 2}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 1 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_11_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p11_state_11 a b ∪ requiredMatrix 8 k8t4p11_step_11_data.required a b) 0 j = k8t4p11_local_11 0 j := by decide + +private theorem k8t4p11_local_11_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p11_state_11 a b ∪ requiredMatrix 8 k8t4p11_step_11_data.required a b) 1 j = k8t4p11_local_11 1 j := by decide + +private theorem k8t4p11_local_11_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p11_state_11 a b ∪ requiredMatrix 8 k8t4p11_step_11_data.required a b) 2 j = k8t4p11_local_11 2 j := by decide + +private theorem k8t4p11_local_11_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p11_state_11 a b ∪ requiredMatrix 8 k8t4p11_step_11_data.required a b) 3 j = k8t4p11_local_11 3 j := by decide + +private theorem k8t4p11_local_11_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p11_state_11 a b ∪ requiredMatrix 8 k8t4p11_step_11_data.required a b) 4 j = k8t4p11_local_11 4 j := by decide + +private theorem k8t4p11_local_11_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p11_state_11 a b ∪ requiredMatrix 8 k8t4p11_step_11_data.required a b) 5 j = k8t4p11_local_11 5 j := by decide + +private theorem k8t4p11_local_11_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p11_state_11 a b ∪ requiredMatrix 8 k8t4p11_step_11_data.required a b) 6 j = k8t4p11_local_11 6 j := by decide + +private theorem k8t4p11_local_11_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p11_state_11 a b ∪ requiredMatrix 8 k8t4p11_step_11_data.required a b) 7 j = k8t4p11_local_11 7 j := by decide + +private theorem k8t4p11_local_11_eq : (fun a b => k8t4p11_state_11 a b ∪ requiredMatrix 8 k8t4p11_step_11_data.required a b) = k8t4p11_local_11 := by + funext i j + fin_cases i + + · exact k8t4p11_local_11_eq_row_0 j + + · exact k8t4p11_local_11_eq_row_1 j + + · exact k8t4p11_local_11_eq_row_2 j + + · exact k8t4p11_local_11_eq_row_3 j + + · exact k8t4p11_local_11_eq_row_4 j + + · exact k8t4p11_local_11_eq_row_5 j + + · exact k8t4p11_local_11_eq_row_6 j + + · exact k8t4p11_local_11_eq_row_7 j + +private theorem k8t4p11_local_11_paths : ∀ p ∈ k8t4p11_step_11_data.required, p.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_11_data.i k8t4p11_step_11_data.j) 8 := by decide + +private theorem k8t4p11_local_11_bad : k8t4p11_step_11_data.bad.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_11_data.i k8t4p11_step_11_data.j) k8t4p11_local_11 8 4 := by decide + +private theorem k8t4p11_step_11_check : k8t4p11_step_11.Check k8t4p11.graph k8t4p11_state_11 8 4 := by + change k8t4p11_step_11_data.Check k8t4p11.graph k8t4p11_state_11 8 4 + refine ⟨k8t4p11_local_11_paths, ?_⟩ + rw [k8t4p11_local_11_eq] + exact k8t4p11_local_11_bad + +private theorem k8t4p11_update_11 : k8t4p11_step_11.apply k8t4p11_state_11 = k8t4p11_state_12 := by + have h : ∀ i j : Fin 8, k8t4p11_step_11.apply k8t4p11_state_11 i j = k8t4p11_state_12 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_13 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_12 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, {1, 2}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 1 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_12_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p11_state_12 a b ∪ requiredMatrix 8 k8t4p11_step_12_data.required a b) 0 j = k8t4p11_local_12 0 j := by decide + +private theorem k8t4p11_local_12_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p11_state_12 a b ∪ requiredMatrix 8 k8t4p11_step_12_data.required a b) 1 j = k8t4p11_local_12 1 j := by decide + +private theorem k8t4p11_local_12_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p11_state_12 a b ∪ requiredMatrix 8 k8t4p11_step_12_data.required a b) 2 j = k8t4p11_local_12 2 j := by decide + +private theorem k8t4p11_local_12_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p11_state_12 a b ∪ requiredMatrix 8 k8t4p11_step_12_data.required a b) 3 j = k8t4p11_local_12 3 j := by decide + +private theorem k8t4p11_local_12_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p11_state_12 a b ∪ requiredMatrix 8 k8t4p11_step_12_data.required a b) 4 j = k8t4p11_local_12 4 j := by decide + +private theorem k8t4p11_local_12_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p11_state_12 a b ∪ requiredMatrix 8 k8t4p11_step_12_data.required a b) 5 j = k8t4p11_local_12 5 j := by decide + +private theorem k8t4p11_local_12_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p11_state_12 a b ∪ requiredMatrix 8 k8t4p11_step_12_data.required a b) 6 j = k8t4p11_local_12 6 j := by decide + +private theorem k8t4p11_local_12_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p11_state_12 a b ∪ requiredMatrix 8 k8t4p11_step_12_data.required a b) 7 j = k8t4p11_local_12 7 j := by decide + +private theorem k8t4p11_local_12_eq : (fun a b => k8t4p11_state_12 a b ∪ requiredMatrix 8 k8t4p11_step_12_data.required a b) = k8t4p11_local_12 := by + funext i j + fin_cases i + + · exact k8t4p11_local_12_eq_row_0 j + + · exact k8t4p11_local_12_eq_row_1 j + + · exact k8t4p11_local_12_eq_row_2 j + + · exact k8t4p11_local_12_eq_row_3 j + + · exact k8t4p11_local_12_eq_row_4 j + + · exact k8t4p11_local_12_eq_row_5 j + + · exact k8t4p11_local_12_eq_row_6 j + + · exact k8t4p11_local_12_eq_row_7 j + +private theorem k8t4p11_local_12_paths : ∀ p ∈ k8t4p11_step_12_data.required, p.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_12_data.i k8t4p11_step_12_data.j) 8 := by decide + +private theorem k8t4p11_local_12_bad : k8t4p11_step_12_data.bad.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_12_data.i k8t4p11_step_12_data.j) k8t4p11_local_12 8 4 := by decide + +private theorem k8t4p11_step_12_check : k8t4p11_step_12.Check k8t4p11.graph k8t4p11_state_12 8 4 := by + change k8t4p11_step_12_data.Check k8t4p11.graph k8t4p11_state_12 8 4 + refine ⟨k8t4p11_local_12_paths, ?_⟩ + rw [k8t4p11_local_12_eq] + exact k8t4p11_local_12_bad + +private theorem k8t4p11_update_12 : k8t4p11_step_12.apply k8t4p11_state_12 = k8t4p11_state_13 := by + have h : ∀ i j : Fin 8, k8t4p11_step_12.apply k8t4p11_state_12 i j = k8t4p11_state_13 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_14 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, {0, 3, 4, 5, 6}, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_13 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 1 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 3 6, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_13_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p11_state_13 a b ∪ requiredMatrix 8 k8t4p11_step_13_data.required a b) 0 j = k8t4p11_local_13 0 j := by decide + +private theorem k8t4p11_local_13_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p11_state_13 a b ∪ requiredMatrix 8 k8t4p11_step_13_data.required a b) 1 j = k8t4p11_local_13 1 j := by decide + +private theorem k8t4p11_local_13_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p11_state_13 a b ∪ requiredMatrix 8 k8t4p11_step_13_data.required a b) 2 j = k8t4p11_local_13 2 j := by decide + +private theorem k8t4p11_local_13_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p11_state_13 a b ∪ requiredMatrix 8 k8t4p11_step_13_data.required a b) 3 j = k8t4p11_local_13 3 j := by decide + +private theorem k8t4p11_local_13_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p11_state_13 a b ∪ requiredMatrix 8 k8t4p11_step_13_data.required a b) 4 j = k8t4p11_local_13 4 j := by decide + +private theorem k8t4p11_local_13_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p11_state_13 a b ∪ requiredMatrix 8 k8t4p11_step_13_data.required a b) 5 j = k8t4p11_local_13 5 j := by decide + +private theorem k8t4p11_local_13_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p11_state_13 a b ∪ requiredMatrix 8 k8t4p11_step_13_data.required a b) 6 j = k8t4p11_local_13 6 j := by decide + +private theorem k8t4p11_local_13_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p11_state_13 a b ∪ requiredMatrix 8 k8t4p11_step_13_data.required a b) 7 j = k8t4p11_local_13 7 j := by decide + +private theorem k8t4p11_local_13_eq : (fun a b => k8t4p11_state_13 a b ∪ requiredMatrix 8 k8t4p11_step_13_data.required a b) = k8t4p11_local_13 := by + funext i j + fin_cases i + + · exact k8t4p11_local_13_eq_row_0 j + + · exact k8t4p11_local_13_eq_row_1 j + + · exact k8t4p11_local_13_eq_row_2 j + + · exact k8t4p11_local_13_eq_row_3 j + + · exact k8t4p11_local_13_eq_row_4 j + + · exact k8t4p11_local_13_eq_row_5 j + + · exact k8t4p11_local_13_eq_row_6 j + + · exact k8t4p11_local_13_eq_row_7 j + +private theorem k8t4p11_local_13_paths : ∀ p ∈ k8t4p11_step_13_data.required, p.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_13_data.i k8t4p11_step_13_data.j) 8 := by decide + +private theorem k8t4p11_local_13_bad : k8t4p11_step_13_data.bad.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_13_data.i k8t4p11_step_13_data.j) k8t4p11_local_13 8 4 := by decide + +private theorem k8t4p11_step_13_check : k8t4p11_step_13.Check k8t4p11.graph k8t4p11_state_13 8 4 := by + change k8t4p11_step_13_data.Check k8t4p11.graph k8t4p11_state_13 8 4 + refine ⟨k8t4p11_local_13_paths, ?_⟩ + rw [k8t4p11_local_13_eq] + exact k8t4p11_local_13_bad + +private theorem k8t4p11_update_13 : k8t4p11_step_13.apply k8t4p11_state_13 = k8t4p11_state_14 := by + have h : ∀ i j : Fin 8, k8t4p11_step_13.apply k8t4p11_state_13 i j = k8t4p11_state_14 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_15 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_14 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, {0, 1}, ∅, Finset.Icc 0 4, {0, 1}, ∅, Finset.Icc 0 5], + #[{0, 1}, ∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{0, 1}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{0, 1}, {2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 0 6], + #[{0, 1}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, {0, 3, 4, 5, 6}, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 0 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_14_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, Finset.Icc 0 4, ∅, ∅, {0}], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, {0}, {0}, {0}, ∅, ∅, ∅, ∅, {0, 1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_14_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_0) 0 j = k8t4p11_local_14_required_0 0 j := by decide + +private theorem k8t4p11_local_14_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_0) 1 j = k8t4p11_local_14_required_0 1 j := by decide + +private theorem k8t4p11_local_14_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_0) 2 j = k8t4p11_local_14_required_0 2 j := by decide + +private theorem k8t4p11_local_14_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_0) 3 j = k8t4p11_local_14_required_0 3 j := by decide + +private theorem k8t4p11_local_14_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_0) 4 j = k8t4p11_local_14_required_0 4 j := by decide + +private theorem k8t4p11_local_14_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_0) 5 j = k8t4p11_local_14_required_0 5 j := by decide + +private theorem k8t4p11_local_14_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_0) 6 j = k8t4p11_local_14_required_0 6 j := by decide + +private theorem k8t4p11_local_14_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_0) 7 j = k8t4p11_local_14_required_0 7 j := by decide + +private theorem k8t4p11_local_14_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_0) 8 j = k8t4p11_local_14_required_0 8 j := by decide + +private theorem k8t4p11_local_14_required_0_eq : (requiredMatrix 8 k8t4p11_step_14_required_block_0) = k8t4p11_local_14_required_0 := by + funext i j + fin_cases i + + · exact k8t4p11_local_14_required_0_eq_row_0 j + + · exact k8t4p11_local_14_required_0_eq_row_1 j + + · exact k8t4p11_local_14_required_0_eq_row_2 j + + · exact k8t4p11_local_14_required_0_eq_row_3 j + + · exact k8t4p11_local_14_required_0_eq_row_4 j + + · exact k8t4p11_local_14_required_0_eq_row_5 j + + · exact k8t4p11_local_14_required_0_eq_row_6 j + + · exact k8t4p11_local_14_required_0_eq_row_7 j + + · exact k8t4p11_local_14_required_0_eq_row_8 j + +private theorem k8t4p11_local_14_path_0_0 : (⟨5, 0, [4, 1, 2, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_0_1 : (⟨5, 0, [4, 1, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_0_2 : (⟨5, 0, [4, 1, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_0_3 : (⟨5, 0, [4, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_0_4 : (⟨5, 0, [6, 7, 8, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_0_5 : (⟨5, 8, [6, 7, 0, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_0_6 : (⟨5, 8, [6, 7, 0, 4, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_0_7 : (⟨5, 8, [6, 7, 0, 4, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_0_8 : (⟨5, 2, [6, 7, 0, 4, 1, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_0_9 : (⟨5, 3, [6, 7, 0, 4, 8, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_0_10 : (⟨5, 1, [6, 7, 0, 4, 8, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_0_11 : (⟨8, 0, [1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_paths_block_0 : ∀ p ∈ k8t4p11_step_14_required_block_0, p.Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by + simp only [k8t4p11_step_14_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_local_14_path_0_0, k8t4p11_local_14_path_0_1, k8t4p11_local_14_path_0_2, k8t4p11_local_14_path_0_3, k8t4p11_local_14_path_0_4, k8t4p11_local_14_path_0_5, k8t4p11_local_14_path_0_6, k8t4p11_local_14_path_0_7, k8t4p11_local_14_path_0_8, k8t4p11_local_14_path_0_9, k8t4p11_local_14_path_0_10, k8t4p11_local_14_path_0_11⟩ + +private def k8t4p11_local_14_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, {0, 1}, {1}, ∅, Finset.Icc 1 5], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, {0, 1, 2}, {1}, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_14_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_1) 0 j = k8t4p11_local_14_required_1 0 j := by decide + +private theorem k8t4p11_local_14_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_1) 1 j = k8t4p11_local_14_required_1 1 j := by decide + +private theorem k8t4p11_local_14_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_1) 2 j = k8t4p11_local_14_required_1 2 j := by decide + +private theorem k8t4p11_local_14_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_1) 3 j = k8t4p11_local_14_required_1 3 j := by decide + +private theorem k8t4p11_local_14_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_1) 4 j = k8t4p11_local_14_required_1 4 j := by decide + +private theorem k8t4p11_local_14_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_1) 5 j = k8t4p11_local_14_required_1 5 j := by decide + +private theorem k8t4p11_local_14_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_1) 6 j = k8t4p11_local_14_required_1 6 j := by decide + +private theorem k8t4p11_local_14_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_1) 7 j = k8t4p11_local_14_required_1 7 j := by decide + +private theorem k8t4p11_local_14_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_1) 8 j = k8t4p11_local_14_required_1 8 j := by decide + +private theorem k8t4p11_local_14_required_1_eq : (requiredMatrix 8 k8t4p11_step_14_required_block_1) = k8t4p11_local_14_required_1 := by + funext i j + fin_cases i + + · exact k8t4p11_local_14_required_1_eq_row_0 j + + · exact k8t4p11_local_14_required_1_eq_row_1 j + + · exact k8t4p11_local_14_required_1_eq_row_2 j + + · exact k8t4p11_local_14_required_1_eq_row_3 j + + · exact k8t4p11_local_14_required_1_eq_row_4 j + + · exact k8t4p11_local_14_required_1_eq_row_5 j + + · exact k8t4p11_local_14_required_1_eq_row_6 j + + · exact k8t4p11_local_14_required_1_eq_row_7 j + + · exact k8t4p11_local_14_required_1_eq_row_8 j + +private theorem k8t4p11_local_14_path_1_0 : (⟨8, 0, [1, 2, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_1_1 : (⟨8, 6, [1, 2, 3, 4, 0, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_1_2 : (⟨8, 5, [1, 2, 3, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_1_3 : (⟨8, 0, [1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_1_4 : (⟨8, 0, [1, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_1_5 : (⟨8, 5, [1, 3, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_1_6 : (⟨8, 0, [1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_1_7 : (⟨8, 0, [1, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_1_8 : (⟨8, 5, [1, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_1_9 : (⟨0, 6, [4, 1, 2, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_1_10 : (⟨0, 5, [4, 1, 2, 3, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_1_11 : (⟨0, 5, [4, 1, 3, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_paths_block_1 : ∀ p ∈ k8t4p11_step_14_required_block_1, p.Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by + simp only [k8t4p11_step_14_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_local_14_path_1_0, k8t4p11_local_14_path_1_1, k8t4p11_local_14_path_1_2, k8t4p11_local_14_path_1_3, k8t4p11_local_14_path_1_4, k8t4p11_local_14_path_1_5, k8t4p11_local_14_path_1_6, k8t4p11_local_14_path_1_7, k8t4p11_local_14_path_1_8, k8t4p11_local_14_path_1_9, k8t4p11_local_14_path_1_10, k8t4p11_local_14_path_1_11⟩ + +private def k8t4p11_local_14_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, {0, 1}, ∅, ∅, {0}, ∅, {0, 1}], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_14_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_2) 0 j = k8t4p11_local_14_required_2 0 j := by decide + +private theorem k8t4p11_local_14_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_2) 1 j = k8t4p11_local_14_required_2 1 j := by decide + +private theorem k8t4p11_local_14_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_2) 2 j = k8t4p11_local_14_required_2 2 j := by decide + +private theorem k8t4p11_local_14_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_2) 3 j = k8t4p11_local_14_required_2 3 j := by decide + +private theorem k8t4p11_local_14_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_2) 4 j = k8t4p11_local_14_required_2 4 j := by decide + +private theorem k8t4p11_local_14_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_2) 5 j = k8t4p11_local_14_required_2 5 j := by decide + +private theorem k8t4p11_local_14_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_2) 6 j = k8t4p11_local_14_required_2 6 j := by decide + +private theorem k8t4p11_local_14_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_2) 7 j = k8t4p11_local_14_required_2 7 j := by decide + +private theorem k8t4p11_local_14_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_14_required_block_2) 8 j = k8t4p11_local_14_required_2 8 j := by decide + +private theorem k8t4p11_local_14_required_2_eq : (requiredMatrix 8 k8t4p11_step_14_required_block_2) = k8t4p11_local_14_required_2 := by + funext i j + fin_cases i + + · exact k8t4p11_local_14_required_2_eq_row_0 j + + · exact k8t4p11_local_14_required_2_eq_row_1 j + + · exact k8t4p11_local_14_required_2_eq_row_2 j + + · exact k8t4p11_local_14_required_2_eq_row_3 j + + · exact k8t4p11_local_14_required_2_eq_row_4 j + + · exact k8t4p11_local_14_required_2_eq_row_5 j + + · exact k8t4p11_local_14_required_2_eq_row_6 j + + · exact k8t4p11_local_14_required_2_eq_row_7 j + + · exact k8t4p11_local_14_required_2_eq_row_8 j + +private theorem k8t4p11_local_14_path_2_0 : (⟨0, 2, [4, 5, 6, 7, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_2_1 : (⟨0, 3, [4, 5, 6, 7, 8, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_2_2 : (⟨0, 3, [4, 5, 6, 7, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_2_3 : (⟨0, 2, [4, 5, 6, 7, 8, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_2_4 : (⟨0, 1, [4, 5, 6, 7, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_2_5 : (⟨0, 1, [4, 5, 6, 7, 8, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_2_6 : (⟨0, 8, [7, 6, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_2_7 : (⟨0, 8, [7, 6, 5, 4, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_path_2_8 : (⟨0, 6, [7, 8, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by decide + +private theorem k8t4p11_local_14_paths_block_2 : ∀ p ∈ k8t4p11_step_14_required_block_2, p.Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by + simp only [k8t4p11_step_14_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_local_14_path_2_0, k8t4p11_local_14_path_2_1, k8t4p11_local_14_path_2_2, k8t4p11_local_14_path_2_3, k8t4p11_local_14_path_2_4, k8t4p11_local_14_path_2_5, k8t4p11_local_14_path_2_6, k8t4p11_local_14_path_2_7, k8t4p11_local_14_path_2_8⟩ + +private theorem k8t4p11_local_14_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_14 a b ∪ (((k8t4p11_local_14_required_0 a b ∪ k8t4p11_local_14_required_1 a b) ∪ k8t4p11_local_14_required_2 a b))) 0 j = k8t4p11_local_14 0 j := by decide + +private theorem k8t4p11_local_14_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_14 a b ∪ (((k8t4p11_local_14_required_0 a b ∪ k8t4p11_local_14_required_1 a b) ∪ k8t4p11_local_14_required_2 a b))) 1 j = k8t4p11_local_14 1 j := by decide + +private theorem k8t4p11_local_14_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_14 a b ∪ (((k8t4p11_local_14_required_0 a b ∪ k8t4p11_local_14_required_1 a b) ∪ k8t4p11_local_14_required_2 a b))) 2 j = k8t4p11_local_14 2 j := by decide + +private theorem k8t4p11_local_14_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_14 a b ∪ (((k8t4p11_local_14_required_0 a b ∪ k8t4p11_local_14_required_1 a b) ∪ k8t4p11_local_14_required_2 a b))) 3 j = k8t4p11_local_14 3 j := by decide + +private theorem k8t4p11_local_14_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_14 a b ∪ (((k8t4p11_local_14_required_0 a b ∪ k8t4p11_local_14_required_1 a b) ∪ k8t4p11_local_14_required_2 a b))) 4 j = k8t4p11_local_14 4 j := by decide + +private theorem k8t4p11_local_14_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_14 a b ∪ (((k8t4p11_local_14_required_0 a b ∪ k8t4p11_local_14_required_1 a b) ∪ k8t4p11_local_14_required_2 a b))) 5 j = k8t4p11_local_14 5 j := by decide + +private theorem k8t4p11_local_14_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_14 a b ∪ (((k8t4p11_local_14_required_0 a b ∪ k8t4p11_local_14_required_1 a b) ∪ k8t4p11_local_14_required_2 a b))) 6 j = k8t4p11_local_14 6 j := by decide + +private theorem k8t4p11_local_14_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_14 a b ∪ (((k8t4p11_local_14_required_0 a b ∪ k8t4p11_local_14_required_1 a b) ∪ k8t4p11_local_14_required_2 a b))) 7 j = k8t4p11_local_14 7 j := by decide + +private theorem k8t4p11_local_14_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_14 a b ∪ (((k8t4p11_local_14_required_0 a b ∪ k8t4p11_local_14_required_1 a b) ∪ k8t4p11_local_14_required_2 a b))) 8 j = k8t4p11_local_14 8 j := by decide + +private theorem k8t4p11_local_14_merged_eq : (fun a b => freshMatrix k8t4p11_state_14 a b ∪ (((k8t4p11_local_14_required_0 a b ∪ k8t4p11_local_14_required_1 a b) ∪ k8t4p11_local_14_required_2 a b))) = k8t4p11_local_14 := by + funext i j + fin_cases i + + · exact k8t4p11_local_14_merged_eq_row_0 j + + · exact k8t4p11_local_14_merged_eq_row_1 j + + · exact k8t4p11_local_14_merged_eq_row_2 j + + · exact k8t4p11_local_14_merged_eq_row_3 j + + · exact k8t4p11_local_14_merged_eq_row_4 j + + · exact k8t4p11_local_14_merged_eq_row_5 j + + · exact k8t4p11_local_14_merged_eq_row_6 j + + · exact k8t4p11_local_14_merged_eq_row_7 j + + · exact k8t4p11_local_14_merged_eq_row_8 j + +private theorem k8t4p11_local_14_eq : (fun a b => freshMatrix k8t4p11_state_14 a b ∪ requiredMatrix 8 k8t4p11_step_14_data.required a b) = k8t4p11_local_14 := by + funext a b + change freshMatrix k8t4p11_state_14 a b ∪ requiredMatrix 8 (k8t4p11_step_14_required_block_0 ++ k8t4p11_step_14_required_block_1 ++ k8t4p11_step_14_required_block_2) a b = _ + simp only [requiredMatrix_append, k8t4p11_local_14_required_0_eq, k8t4p11_local_14_required_1_eq, k8t4p11_local_14_required_2_eq] + exact congrFun (congrFun k8t4p11_local_14_merged_eq a) b + +private theorem k8t4p11_local_14_paths : ∀ p ∈ k8t4p11_step_14_data.required, p.Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 := by + change ∀ p ∈ (k8t4p11_step_14_required_block_0 ++ k8t4p11_step_14_required_block_1 ++ k8t4p11_step_14_required_block_2), p.Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) 8 + simp only [List.forall_mem_append] + exact ⟨⟨k8t4p11_local_14_paths_block_0, k8t4p11_local_14_paths_block_1⟩, k8t4p11_local_14_paths_block_2⟩ + +private theorem k8t4p11_local_14_bad : k8t4p11_step_14_data.bad.Check (freshGraph k8t4p11.graph k8t4p11_step_14_data.i k8t4p11_step_14_data.j) k8t4p11_local_14 8 4 := by decide + +private theorem k8t4p11_step_14_check : k8t4p11_step_14.Check k8t4p11.graph k8t4p11_state_14 8 4 := by + change k8t4p11_step_14_data.Check k8t4p11.graph k8t4p11_state_14 8 4 + refine ⟨by decide, k8t4p11_local_14_paths, ?_⟩ + rw [k8t4p11_local_14_eq] + exact k8t4p11_local_14_bad + +private theorem k8t4p11_update_14 : k8t4p11_step_14.apply k8t4p11_state_14 = k8t4p11_state_15 := by + have h : ∀ i j : Fin 8, k8t4p11_step_14.apply k8t4p11_state_14 i j = k8t4p11_state_15 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_16 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5, 6}, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_15 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_15_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p11_state_15 a b ∪ requiredMatrix 8 k8t4p11_step_15_data.required a b) 0 j = k8t4p11_local_15 0 j := by decide + +private theorem k8t4p11_local_15_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p11_state_15 a b ∪ requiredMatrix 8 k8t4p11_step_15_data.required a b) 1 j = k8t4p11_local_15 1 j := by decide + +private theorem k8t4p11_local_15_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p11_state_15 a b ∪ requiredMatrix 8 k8t4p11_step_15_data.required a b) 2 j = k8t4p11_local_15 2 j := by decide + +private theorem k8t4p11_local_15_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p11_state_15 a b ∪ requiredMatrix 8 k8t4p11_step_15_data.required a b) 3 j = k8t4p11_local_15 3 j := by decide + +private theorem k8t4p11_local_15_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p11_state_15 a b ∪ requiredMatrix 8 k8t4p11_step_15_data.required a b) 4 j = k8t4p11_local_15 4 j := by decide + +private theorem k8t4p11_local_15_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p11_state_15 a b ∪ requiredMatrix 8 k8t4p11_step_15_data.required a b) 5 j = k8t4p11_local_15 5 j := by decide + +private theorem k8t4p11_local_15_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p11_state_15 a b ∪ requiredMatrix 8 k8t4p11_step_15_data.required a b) 6 j = k8t4p11_local_15 6 j := by decide + +private theorem k8t4p11_local_15_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p11_state_15 a b ∪ requiredMatrix 8 k8t4p11_step_15_data.required a b) 7 j = k8t4p11_local_15 7 j := by decide + +private theorem k8t4p11_local_15_eq : (fun a b => k8t4p11_state_15 a b ∪ requiredMatrix 8 k8t4p11_step_15_data.required a b) = k8t4p11_local_15 := by + funext i j + fin_cases i + + · exact k8t4p11_local_15_eq_row_0 j + + · exact k8t4p11_local_15_eq_row_1 j + + · exact k8t4p11_local_15_eq_row_2 j + + · exact k8t4p11_local_15_eq_row_3 j + + · exact k8t4p11_local_15_eq_row_4 j + + · exact k8t4p11_local_15_eq_row_5 j + + · exact k8t4p11_local_15_eq_row_6 j + + · exact k8t4p11_local_15_eq_row_7 j + +private theorem k8t4p11_local_15_paths : ∀ p ∈ k8t4p11_step_15_data.required, p.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_15_data.i k8t4p11_step_15_data.j) 8 := by decide + +private theorem k8t4p11_local_15_bad : k8t4p11_step_15_data.bad.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_15_data.i k8t4p11_step_15_data.j) k8t4p11_local_15 8 4 := by decide + +private theorem k8t4p11_step_15_check : k8t4p11_step_15.Check k8t4p11.graph k8t4p11_state_15 8 4 := by + change k8t4p11_step_15_data.Check k8t4p11.graph k8t4p11_state_15 8 4 + refine ⟨k8t4p11_local_15_paths, ?_⟩ + rw [k8t4p11_local_15_eq] + exact k8t4p11_local_15_bad + +private theorem k8t4p11_update_15 : k8t4p11_step_15.apply k8t4p11_state_15 = k8t4p11_state_16 := by + have h : ∀ i j : Fin 8, k8t4p11_step_15.apply k8t4p11_state_15 i j = k8t4p11_state_16 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_17 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_16 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, Finset.Icc 0 4, ∅, Finset.Icc 0 3, ∅, {0}], + #[Finset.Icc 0 4, ∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{0}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{0}, {2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 0 4, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5, 6}, Finset.Icc 3 6], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_16_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, Finset.Icc 0 4, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_16_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_0) 0 j = k8t4p11_local_16_required_0 0 j := by decide + +private theorem k8t4p11_local_16_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_0) 1 j = k8t4p11_local_16_required_0 1 j := by decide + +private theorem k8t4p11_local_16_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_0) 2 j = k8t4p11_local_16_required_0 2 j := by decide + +private theorem k8t4p11_local_16_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_0) 3 j = k8t4p11_local_16_required_0 3 j := by decide + +private theorem k8t4p11_local_16_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_0) 4 j = k8t4p11_local_16_required_0 4 j := by decide + +private theorem k8t4p11_local_16_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_0) 5 j = k8t4p11_local_16_required_0 5 j := by decide + +private theorem k8t4p11_local_16_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_0) 6 j = k8t4p11_local_16_required_0 6 j := by decide + +private theorem k8t4p11_local_16_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_0) 7 j = k8t4p11_local_16_required_0 7 j := by decide + +private theorem k8t4p11_local_16_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_0) 8 j = k8t4p11_local_16_required_0 8 j := by decide + +private theorem k8t4p11_local_16_required_0_eq : (requiredMatrix 8 k8t4p11_step_16_required_block_0) = k8t4p11_local_16_required_0 := by + funext i j + fin_cases i + + · exact k8t4p11_local_16_required_0_eq_row_0 j + + · exact k8t4p11_local_16_required_0_eq_row_1 j + + · exact k8t4p11_local_16_required_0_eq_row_2 j + + · exact k8t4p11_local_16_required_0_eq_row_3 j + + · exact k8t4p11_local_16_required_0_eq_row_4 j + + · exact k8t4p11_local_16_required_0_eq_row_5 j + + · exact k8t4p11_local_16_required_0_eq_row_6 j + + · exact k8t4p11_local_16_required_0_eq_row_7 j + + · exact k8t4p11_local_16_required_0_eq_row_8 j + +private theorem k8t4p11_local_16_path_0_0 : (⟨1, 0, [2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_0_1 : (⟨1, 6, [2, 3, 4, 5, 0, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_0_2 : (⟨1, 0, [2, 3, 4, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_0_3 : (⟨1, 0, [2, 3, 4, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_0_4 : (⟨1, 6, [2, 3, 4, 8, 7, 0, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_0_5 : (⟨4, 0, [1, 2, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_0_6 : (⟨4, 0, [1, 2, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_0_7 : (⟨4, 6, [1, 2, 3, 8, 7, 0, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_0_8 : (⟨4, 0, [1, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_0_9 : (⟨4, 0, [1, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_0_10 : (⟨4, 6, [1, 3, 8, 7, 0, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_0_11 : (⟨4, 0, [1, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_paths_block_0 : ∀ p ∈ k8t4p11_step_16_required_block_0, p.Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by + simp only [k8t4p11_step_16_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_local_16_path_0_0, k8t4p11_local_16_path_0_1, k8t4p11_local_16_path_0_2, k8t4p11_local_16_path_0_3, k8t4p11_local_16_path_0_4, k8t4p11_local_16_path_0_5, k8t4p11_local_16_path_0_6, k8t4p11_local_16_path_0_7, k8t4p11_local_16_path_0_8, k8t4p11_local_16_path_0_9, k8t4p11_local_16_path_0_10, k8t4p11_local_16_path_0_11⟩ + +private def k8t4p11_local_16_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, {0, 1}, {0}, {0, 1}, {0, 1}, ∅, ∅, ∅, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_16_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_1) 0 j = k8t4p11_local_16_required_1 0 j := by decide + +private theorem k8t4p11_local_16_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_1) 1 j = k8t4p11_local_16_required_1 1 j := by decide + +private theorem k8t4p11_local_16_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_1) 2 j = k8t4p11_local_16_required_1 2 j := by decide + +private theorem k8t4p11_local_16_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_1) 3 j = k8t4p11_local_16_required_1 3 j := by decide + +private theorem k8t4p11_local_16_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_1) 4 j = k8t4p11_local_16_required_1 4 j := by decide + +private theorem k8t4p11_local_16_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_1) 5 j = k8t4p11_local_16_required_1 5 j := by decide + +private theorem k8t4p11_local_16_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_1) 6 j = k8t4p11_local_16_required_1 6 j := by decide + +private theorem k8t4p11_local_16_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_1) 7 j = k8t4p11_local_16_required_1 7 j := by decide + +private theorem k8t4p11_local_16_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_1) 8 j = k8t4p11_local_16_required_1 8 j := by decide + +private theorem k8t4p11_local_16_required_1_eq : (requiredMatrix 8 k8t4p11_step_16_required_block_1) = k8t4p11_local_16_required_1 := by + funext i j + fin_cases i + + · exact k8t4p11_local_16_required_1_eq_row_0 j + + · exact k8t4p11_local_16_required_1_eq_row_1 j + + · exact k8t4p11_local_16_required_1_eq_row_2 j + + · exact k8t4p11_local_16_required_1_eq_row_3 j + + · exact k8t4p11_local_16_required_1_eq_row_4 j + + · exact k8t4p11_local_16_required_1_eq_row_5 j + + · exact k8t4p11_local_16_required_1_eq_row_6 j + + · exact k8t4p11_local_16_required_1_eq_row_7 j + + · exact k8t4p11_local_16_required_1_eq_row_8 j + +private theorem k8t4p11_local_16_path_1_0 : (⟨6, 0, [5, 4, 1, 2, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_1_1 : (⟨6, 0, [5, 4, 1, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_1_2 : (⟨6, 0, [5, 4, 1, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_1_3 : (⟨6, 0, [5, 4, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_1_4 : (⟨6, 3, [5, 0, 7, 8, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_1_5 : (⟨6, 4, [5, 0, 7, 8, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_1_6 : (⟨6, 4, [5, 0, 7, 8, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_1_7 : (⟨6, 2, [5, 0, 7, 8, 1, 4, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_1_8 : (⟨6, 1, [5, 0, 7, 8, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_1_9 : (⟨6, 3, [5, 0, 7, 8, 4, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_1_10 : (⟨6, 1, [5, 0, 7, 8, 4, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_1_11 : (⟨6, 8, [7, 0, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_paths_block_1 : ∀ p ∈ k8t4p11_step_16_required_block_1, p.Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by + simp only [k8t4p11_step_16_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_local_16_path_1_0, k8t4p11_local_16_path_1_1, k8t4p11_local_16_path_1_2, k8t4p11_local_16_path_1_3, k8t4p11_local_16_path_1_4, k8t4p11_local_16_path_1_5, k8t4p11_local_16_path_1_6, k8t4p11_local_16_path_1_7, k8t4p11_local_16_path_1_8, k8t4p11_local_16_path_1_9, k8t4p11_local_16_path_1_10, k8t4p11_local_16_path_1_11⟩ + +private def k8t4p11_local_16_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, {0}, ∅, {0}, ∅, {0}], + #[Finset.Icc 0 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_16_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_2) 0 j = k8t4p11_local_16_required_2 0 j := by decide + +private theorem k8t4p11_local_16_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_2) 1 j = k8t4p11_local_16_required_2 1 j := by decide + +private theorem k8t4p11_local_16_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_2) 2 j = k8t4p11_local_16_required_2 2 j := by decide + +private theorem k8t4p11_local_16_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_2) 3 j = k8t4p11_local_16_required_2 3 j := by decide + +private theorem k8t4p11_local_16_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_2) 4 j = k8t4p11_local_16_required_2 4 j := by decide + +private theorem k8t4p11_local_16_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_2) 5 j = k8t4p11_local_16_required_2 5 j := by decide + +private theorem k8t4p11_local_16_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_2) 6 j = k8t4p11_local_16_required_2 6 j := by decide + +private theorem k8t4p11_local_16_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_2) 7 j = k8t4p11_local_16_required_2 7 j := by decide + +private theorem k8t4p11_local_16_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_16_required_block_2) 8 j = k8t4p11_local_16_required_2 8 j := by decide + +private theorem k8t4p11_local_16_required_2_eq : (requiredMatrix 8 k8t4p11_step_16_required_block_2) = k8t4p11_local_16_required_2 := by + funext i j + fin_cases i + + · exact k8t4p11_local_16_required_2_eq_row_0 j + + · exact k8t4p11_local_16_required_2_eq_row_1 j + + · exact k8t4p11_local_16_required_2_eq_row_2 j + + · exact k8t4p11_local_16_required_2_eq_row_3 j + + · exact k8t4p11_local_16_required_2_eq_row_4 j + + · exact k8t4p11_local_16_required_2_eq_row_5 j + + · exact k8t4p11_local_16_required_2_eq_row_6 j + + · exact k8t4p11_local_16_required_2_eq_row_7 j + + · exact k8t4p11_local_16_required_2_eq_row_8 j + +private theorem k8t4p11_local_16_path_2_0 : (⟨6, 8, [7, 0, 5, 4, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_2_1 : (⟨0, 6, [5, 4, 1, 2, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_2_2 : (⟨0, 1, [5, 4, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_2_3 : (⟨0, 1, [5, 4, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_2_4 : (⟨0, 1, [5, 4, 8, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_2_5 : (⟨0, 4, [5, 6, 7, 8, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_2_6 : (⟨0, 2, [5, 6, 7, 8, 1, 4, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_2_7 : (⟨0, 1, [5, 6, 7, 8, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_2_8 : (⟨0, 3, [5, 6, 7, 8, 4, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_2_9 : (⟨0, 1, [5, 6, 7, 8, 4, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_path_2_10 : (⟨0, 8, [7, 6, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by decide + +private theorem k8t4p11_local_16_paths_block_2 : ∀ p ∈ k8t4p11_step_16_required_block_2, p.Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by + simp only [k8t4p11_step_16_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_local_16_path_2_0, k8t4p11_local_16_path_2_1, k8t4p11_local_16_path_2_2, k8t4p11_local_16_path_2_3, k8t4p11_local_16_path_2_4, k8t4p11_local_16_path_2_5, k8t4p11_local_16_path_2_6, k8t4p11_local_16_path_2_7, k8t4p11_local_16_path_2_8, k8t4p11_local_16_path_2_9, k8t4p11_local_16_path_2_10⟩ + +private theorem k8t4p11_local_16_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_16 a b ∪ (((k8t4p11_local_16_required_0 a b ∪ k8t4p11_local_16_required_1 a b) ∪ k8t4p11_local_16_required_2 a b))) 0 j = k8t4p11_local_16 0 j := by decide + +private theorem k8t4p11_local_16_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_16 a b ∪ (((k8t4p11_local_16_required_0 a b ∪ k8t4p11_local_16_required_1 a b) ∪ k8t4p11_local_16_required_2 a b))) 1 j = k8t4p11_local_16 1 j := by decide + +private theorem k8t4p11_local_16_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_16 a b ∪ (((k8t4p11_local_16_required_0 a b ∪ k8t4p11_local_16_required_1 a b) ∪ k8t4p11_local_16_required_2 a b))) 2 j = k8t4p11_local_16 2 j := by decide + +private theorem k8t4p11_local_16_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_16 a b ∪ (((k8t4p11_local_16_required_0 a b ∪ k8t4p11_local_16_required_1 a b) ∪ k8t4p11_local_16_required_2 a b))) 3 j = k8t4p11_local_16 3 j := by decide + +private theorem k8t4p11_local_16_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_16 a b ∪ (((k8t4p11_local_16_required_0 a b ∪ k8t4p11_local_16_required_1 a b) ∪ k8t4p11_local_16_required_2 a b))) 4 j = k8t4p11_local_16 4 j := by decide + +private theorem k8t4p11_local_16_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_16 a b ∪ (((k8t4p11_local_16_required_0 a b ∪ k8t4p11_local_16_required_1 a b) ∪ k8t4p11_local_16_required_2 a b))) 5 j = k8t4p11_local_16 5 j := by decide + +private theorem k8t4p11_local_16_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_16 a b ∪ (((k8t4p11_local_16_required_0 a b ∪ k8t4p11_local_16_required_1 a b) ∪ k8t4p11_local_16_required_2 a b))) 6 j = k8t4p11_local_16 6 j := by decide + +private theorem k8t4p11_local_16_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_16 a b ∪ (((k8t4p11_local_16_required_0 a b ∪ k8t4p11_local_16_required_1 a b) ∪ k8t4p11_local_16_required_2 a b))) 7 j = k8t4p11_local_16 7 j := by decide + +private theorem k8t4p11_local_16_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_16 a b ∪ (((k8t4p11_local_16_required_0 a b ∪ k8t4p11_local_16_required_1 a b) ∪ k8t4p11_local_16_required_2 a b))) 8 j = k8t4p11_local_16 8 j := by decide + +private theorem k8t4p11_local_16_merged_eq : (fun a b => freshMatrix k8t4p11_state_16 a b ∪ (((k8t4p11_local_16_required_0 a b ∪ k8t4p11_local_16_required_1 a b) ∪ k8t4p11_local_16_required_2 a b))) = k8t4p11_local_16 := by + funext i j + fin_cases i + + · exact k8t4p11_local_16_merged_eq_row_0 j + + · exact k8t4p11_local_16_merged_eq_row_1 j + + · exact k8t4p11_local_16_merged_eq_row_2 j + + · exact k8t4p11_local_16_merged_eq_row_3 j + + · exact k8t4p11_local_16_merged_eq_row_4 j + + · exact k8t4p11_local_16_merged_eq_row_5 j + + · exact k8t4p11_local_16_merged_eq_row_6 j + + · exact k8t4p11_local_16_merged_eq_row_7 j + + · exact k8t4p11_local_16_merged_eq_row_8 j + +private theorem k8t4p11_local_16_eq : (fun a b => freshMatrix k8t4p11_state_16 a b ∪ requiredMatrix 8 k8t4p11_step_16_data.required a b) = k8t4p11_local_16 := by + funext a b + change freshMatrix k8t4p11_state_16 a b ∪ requiredMatrix 8 (k8t4p11_step_16_required_block_0 ++ k8t4p11_step_16_required_block_1 ++ k8t4p11_step_16_required_block_2) a b = _ + simp only [requiredMatrix_append, k8t4p11_local_16_required_0_eq, k8t4p11_local_16_required_1_eq, k8t4p11_local_16_required_2_eq] + exact congrFun (congrFun k8t4p11_local_16_merged_eq a) b + +private theorem k8t4p11_local_16_paths : ∀ p ∈ k8t4p11_step_16_data.required, p.Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 := by + change ∀ p ∈ (k8t4p11_step_16_required_block_0 ++ k8t4p11_step_16_required_block_1 ++ k8t4p11_step_16_required_block_2), p.Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) 8 + simp only [List.forall_mem_append] + exact ⟨⟨k8t4p11_local_16_paths_block_0, k8t4p11_local_16_paths_block_1⟩, k8t4p11_local_16_paths_block_2⟩ + +private theorem k8t4p11_local_16_bad : k8t4p11_step_16_data.bad.Check (freshGraph k8t4p11.graph k8t4p11_step_16_data.i k8t4p11_step_16_data.j) k8t4p11_local_16 8 4 := by decide + +private theorem k8t4p11_step_16_check : k8t4p11_step_16.Check k8t4p11.graph k8t4p11_state_16 8 4 := by + change k8t4p11_step_16_data.Check k8t4p11.graph k8t4p11_state_16 8 4 + refine ⟨by decide, k8t4p11_local_16_paths, ?_⟩ + rw [k8t4p11_local_16_eq] + exact k8t4p11_local_16_bad + +private theorem k8t4p11_update_16 : k8t4p11_step_16.apply k8t4p11_state_16 = k8t4p11_state_17 := by + have h : ∀ i j : Fin 8, k8t4p11_step_16.apply k8t4p11_state_16 i j = k8t4p11_state_17 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_18 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {0, 3, 4, 5, 6}], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, {0, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_17 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 0 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, Finset.Icc 3 6], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_17_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p11_state_17 a b ∪ requiredMatrix 8 k8t4p11_step_17_data.required a b) 0 j = k8t4p11_local_17 0 j := by decide + +private theorem k8t4p11_local_17_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p11_state_17 a b ∪ requiredMatrix 8 k8t4p11_step_17_data.required a b) 1 j = k8t4p11_local_17 1 j := by decide + +private theorem k8t4p11_local_17_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p11_state_17 a b ∪ requiredMatrix 8 k8t4p11_step_17_data.required a b) 2 j = k8t4p11_local_17 2 j := by decide + +private theorem k8t4p11_local_17_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p11_state_17 a b ∪ requiredMatrix 8 k8t4p11_step_17_data.required a b) 3 j = k8t4p11_local_17 3 j := by decide + +private theorem k8t4p11_local_17_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p11_state_17 a b ∪ requiredMatrix 8 k8t4p11_step_17_data.required a b) 4 j = k8t4p11_local_17 4 j := by decide + +private theorem k8t4p11_local_17_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p11_state_17 a b ∪ requiredMatrix 8 k8t4p11_step_17_data.required a b) 5 j = k8t4p11_local_17 5 j := by decide + +private theorem k8t4p11_local_17_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p11_state_17 a b ∪ requiredMatrix 8 k8t4p11_step_17_data.required a b) 6 j = k8t4p11_local_17 6 j := by decide + +private theorem k8t4p11_local_17_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p11_state_17 a b ∪ requiredMatrix 8 k8t4p11_step_17_data.required a b) 7 j = k8t4p11_local_17 7 j := by decide + +private theorem k8t4p11_local_17_eq : (fun a b => k8t4p11_state_17 a b ∪ requiredMatrix 8 k8t4p11_step_17_data.required a b) = k8t4p11_local_17 := by + funext i j + fin_cases i + + · exact k8t4p11_local_17_eq_row_0 j + + · exact k8t4p11_local_17_eq_row_1 j + + · exact k8t4p11_local_17_eq_row_2 j + + · exact k8t4p11_local_17_eq_row_3 j + + · exact k8t4p11_local_17_eq_row_4 j + + · exact k8t4p11_local_17_eq_row_5 j + + · exact k8t4p11_local_17_eq_row_6 j + + · exact k8t4p11_local_17_eq_row_7 j + +private theorem k8t4p11_local_17_paths : ∀ p ∈ k8t4p11_step_17_data.required, p.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_17_data.i k8t4p11_step_17_data.j) 8 := by decide + +private theorem k8t4p11_local_17_bad : k8t4p11_step_17_data.bad.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_17_data.i k8t4p11_step_17_data.j) k8t4p11_local_17 8 4 := by decide + +private theorem k8t4p11_step_17_check : k8t4p11_step_17.Check k8t4p11.graph k8t4p11_state_17 8 4 := by + change k8t4p11_step_17_data.Check k8t4p11.graph k8t4p11_state_17 8 4 + refine ⟨k8t4p11_local_17_paths, ?_⟩ + rw [k8t4p11_local_17_eq] + exact k8t4p11_local_17_bad + +private theorem k8t4p11_update_17 : k8t4p11_step_17.apply k8t4p11_state_17 = k8t4p11_state_18 := by + have h : ∀ i j : Fin 8, k8t4p11_step_17.apply k8t4p11_state_17 i j = k8t4p11_state_18 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_19 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {0, 1, 3, 4, 5, 6}], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_18 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, {0, 1}, Finset.Icc 0 5, ∅, {0, 1}, Finset.Icc 0 4, ∅], + #[{0, 1}, ∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{0, 1}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{0, 1}, {2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 0 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 0 6, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {0, 3, 4, 5, 6}], + #[{0, 1}, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, {0, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_18_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, Finset.Icc 0 5, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 5, ∅, ∅, ∅, ∅, ∅, {1}, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_18_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_0) 0 j = k8t4p11_local_18_required_0 0 j := by decide + +private theorem k8t4p11_local_18_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_0) 1 j = k8t4p11_local_18_required_0 1 j := by decide + +private theorem k8t4p11_local_18_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_0) 2 j = k8t4p11_local_18_required_0 2 j := by decide + +private theorem k8t4p11_local_18_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_0) 3 j = k8t4p11_local_18_required_0 3 j := by decide + +private theorem k8t4p11_local_18_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_0) 4 j = k8t4p11_local_18_required_0 4 j := by decide + +private theorem k8t4p11_local_18_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_0) 5 j = k8t4p11_local_18_required_0 5 j := by decide + +private theorem k8t4p11_local_18_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_0) 6 j = k8t4p11_local_18_required_0 6 j := by decide + +private theorem k8t4p11_local_18_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_0) 7 j = k8t4p11_local_18_required_0 7 j := by decide + +private theorem k8t4p11_local_18_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_0) 8 j = k8t4p11_local_18_required_0 8 j := by decide + +private theorem k8t4p11_local_18_required_0_eq : (requiredMatrix 8 k8t4p11_step_18_required_block_0) = k8t4p11_local_18_required_0 := by + funext i j + fin_cases i + + · exact k8t4p11_local_18_required_0_eq_row_0 j + + · exact k8t4p11_local_18_required_0_eq_row_1 j + + · exact k8t4p11_local_18_required_0_eq_row_2 j + + · exact k8t4p11_local_18_required_0_eq_row_3 j + + · exact k8t4p11_local_18_required_0_eq_row_4 j + + · exact k8t4p11_local_18_required_0_eq_row_5 j + + · exact k8t4p11_local_18_required_0_eq_row_6 j + + · exact k8t4p11_local_18_required_0_eq_row_7 j + + · exact k8t4p11_local_18_required_0_eq_row_8 j + +private theorem k8t4p11_local_18_path_0_0 : (⟨4, 0, [1, 2, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_0_1 : (⟨4, 0, [1, 2, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_0_2 : (⟨4, 6, [1, 2, 3, 8, 0, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_0_3 : (⟨4, 7, [1, 2, 3, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_0_4 : (⟨4, 0, [1, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_0_5 : (⟨4, 0, [1, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_0_6 : (⟨4, 7, [1, 3, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_0_7 : (⟨4, 0, [1, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_0_8 : (⟨4, 0, [1, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_0_9 : (⟨4, 7, [1, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_0_10 : (⟨7, 0, [6, 5, 4, 1, 2, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_0_11 : (⟨7, 0, [6, 5, 4, 1, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_paths_block_0 : ∀ p ∈ k8t4p11_step_18_required_block_0, p.Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by + simp only [k8t4p11_step_18_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_local_18_path_0_0, k8t4p11_local_18_path_0_1, k8t4p11_local_18_path_0_2, k8t4p11_local_18_path_0_3, k8t4p11_local_18_path_0_4, k8t4p11_local_18_path_0_5, k8t4p11_local_18_path_0_6, k8t4p11_local_18_path_0_7, k8t4p11_local_18_path_0_8, k8t4p11_local_18_path_0_9, k8t4p11_local_18_path_0_10, k8t4p11_local_18_path_0_11⟩ + +private def k8t4p11_local_18_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, Finset.Icc 1 4, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, {0}, {0}, {0}, {0, 1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_18_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_1) 0 j = k8t4p11_local_18_required_1 0 j := by decide + +private theorem k8t4p11_local_18_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_1) 1 j = k8t4p11_local_18_required_1 1 j := by decide + +private theorem k8t4p11_local_18_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_1) 2 j = k8t4p11_local_18_required_1 2 j := by decide + +private theorem k8t4p11_local_18_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_1) 3 j = k8t4p11_local_18_required_1 3 j := by decide + +private theorem k8t4p11_local_18_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_1) 4 j = k8t4p11_local_18_required_1 4 j := by decide + +private theorem k8t4p11_local_18_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_1) 5 j = k8t4p11_local_18_required_1 5 j := by decide + +private theorem k8t4p11_local_18_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_1) 6 j = k8t4p11_local_18_required_1 6 j := by decide + +private theorem k8t4p11_local_18_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_1) 7 j = k8t4p11_local_18_required_1 7 j := by decide + +private theorem k8t4p11_local_18_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_1) 8 j = k8t4p11_local_18_required_1 8 j := by decide + +private theorem k8t4p11_local_18_required_1_eq : (requiredMatrix 8 k8t4p11_step_18_required_block_1) = k8t4p11_local_18_required_1 := by + funext i j + fin_cases i + + · exact k8t4p11_local_18_required_1_eq_row_0 j + + · exact k8t4p11_local_18_required_1_eq_row_1 j + + · exact k8t4p11_local_18_required_1_eq_row_2 j + + · exact k8t4p11_local_18_required_1_eq_row_3 j + + · exact k8t4p11_local_18_required_1_eq_row_4 j + + · exact k8t4p11_local_18_required_1_eq_row_5 j + + · exact k8t4p11_local_18_required_1_eq_row_6 j + + · exact k8t4p11_local_18_required_1_eq_row_7 j + + · exact k8t4p11_local_18_required_1_eq_row_8 j + +private theorem k8t4p11_local_18_path_1_0 : (⟨7, 0, [6, 5, 4, 1, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_1_1 : (⟨7, 0, [6, 5, 4, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_1_2 : (⟨7, 4, [6, 5, 0, 8, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_1_3 : (⟨7, 4, [6, 5, 0, 8, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_1_4 : (⟨7, 4, [6, 5, 0, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_1_5 : (⟨7, 2, [6, 5, 0, 8, 1, 4, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_1_6 : (⟨7, 3, [6, 5, 0, 8, 4, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_1_7 : (⟨7, 1, [6, 5, 0, 8, 4, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_1_8 : (⟨7, 0, [8, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_1_9 : (⟨0, 7, [5, 4, 1, 2, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_1_10 : (⟨0, 6, [5, 4, 1, 2, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_1_11 : (⟨0, 6, [5, 4, 1, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_paths_block_1 : ∀ p ∈ k8t4p11_step_18_required_block_1, p.Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by + simp only [k8t4p11_step_18_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_local_18_path_1_0, k8t4p11_local_18_path_1_1, k8t4p11_local_18_path_1_2, k8t4p11_local_18_path_1_3, k8t4p11_local_18_path_1_4, k8t4p11_local_18_path_1_5, k8t4p11_local_18_path_1_6, k8t4p11_local_18_path_1_7, k8t4p11_local_18_path_1_8, k8t4p11_local_18_path_1_9, k8t4p11_local_18_path_1_10, k8t4p11_local_18_path_1_11⟩ + +private def k8t4p11_local_18_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, {0, 1}, {0, 1}, ∅, ∅, {0}, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_18_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_2) 0 j = k8t4p11_local_18_required_2 0 j := by decide + +private theorem k8t4p11_local_18_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_2) 1 j = k8t4p11_local_18_required_2 1 j := by decide + +private theorem k8t4p11_local_18_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_2) 2 j = k8t4p11_local_18_required_2 2 j := by decide + +private theorem k8t4p11_local_18_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_2) 3 j = k8t4p11_local_18_required_2 3 j := by decide + +private theorem k8t4p11_local_18_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_2) 4 j = k8t4p11_local_18_required_2 4 j := by decide + +private theorem k8t4p11_local_18_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_2) 5 j = k8t4p11_local_18_required_2 5 j := by decide + +private theorem k8t4p11_local_18_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_2) 6 j = k8t4p11_local_18_required_2 6 j := by decide + +private theorem k8t4p11_local_18_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_2) 7 j = k8t4p11_local_18_required_2 7 j := by decide + +private theorem k8t4p11_local_18_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t4p11_step_18_required_block_2) 8 j = k8t4p11_local_18_required_2 8 j := by decide + +private theorem k8t4p11_local_18_required_2_eq : (requiredMatrix 8 k8t4p11_step_18_required_block_2) = k8t4p11_local_18_required_2 := by + funext i j + fin_cases i + + · exact k8t4p11_local_18_required_2_eq_row_0 j + + · exact k8t4p11_local_18_required_2_eq_row_1 j + + · exact k8t4p11_local_18_required_2_eq_row_2 j + + · exact k8t4p11_local_18_required_2_eq_row_3 j + + · exact k8t4p11_local_18_required_2_eq_row_4 j + + · exact k8t4p11_local_18_required_2_eq_row_5 j + + · exact k8t4p11_local_18_required_2_eq_row_6 j + + · exact k8t4p11_local_18_required_2_eq_row_7 j + + · exact k8t4p11_local_18_required_2_eq_row_8 j + +private theorem k8t4p11_local_18_path_2_0 : (⟨0, 3, [5, 6, 7, 8, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_2_1 : (⟨0, 4, [5, 6, 7, 8, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_2_2 : (⟨0, 2, [5, 6, 7, 8, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_2_3 : (⟨0, 4, [5, 6, 7, 8, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_2_4 : (⟨0, 2, [5, 6, 7, 8, 1, 4, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_2_5 : (⟨0, 1, [5, 6, 7, 8, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_2_6 : (⟨0, 3, [5, 6, 7, 8, 4, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_2_7 : (⟨0, 1, [5, 6, 7, 8, 4, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_path_2_8 : (⟨0, 7, [8, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by decide + +private theorem k8t4p11_local_18_paths_block_2 : ∀ p ∈ k8t4p11_step_18_required_block_2, p.Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by + simp only [k8t4p11_step_18_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_local_18_path_2_0, k8t4p11_local_18_path_2_1, k8t4p11_local_18_path_2_2, k8t4p11_local_18_path_2_3, k8t4p11_local_18_path_2_4, k8t4p11_local_18_path_2_5, k8t4p11_local_18_path_2_6, k8t4p11_local_18_path_2_7, k8t4p11_local_18_path_2_8⟩ + +private theorem k8t4p11_local_18_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_18 a b ∪ (((k8t4p11_local_18_required_0 a b ∪ k8t4p11_local_18_required_1 a b) ∪ k8t4p11_local_18_required_2 a b))) 0 j = k8t4p11_local_18 0 j := by decide + +private theorem k8t4p11_local_18_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_18 a b ∪ (((k8t4p11_local_18_required_0 a b ∪ k8t4p11_local_18_required_1 a b) ∪ k8t4p11_local_18_required_2 a b))) 1 j = k8t4p11_local_18 1 j := by decide + +private theorem k8t4p11_local_18_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_18 a b ∪ (((k8t4p11_local_18_required_0 a b ∪ k8t4p11_local_18_required_1 a b) ∪ k8t4p11_local_18_required_2 a b))) 2 j = k8t4p11_local_18 2 j := by decide + +private theorem k8t4p11_local_18_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_18 a b ∪ (((k8t4p11_local_18_required_0 a b ∪ k8t4p11_local_18_required_1 a b) ∪ k8t4p11_local_18_required_2 a b))) 3 j = k8t4p11_local_18 3 j := by decide + +private theorem k8t4p11_local_18_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_18 a b ∪ (((k8t4p11_local_18_required_0 a b ∪ k8t4p11_local_18_required_1 a b) ∪ k8t4p11_local_18_required_2 a b))) 4 j = k8t4p11_local_18 4 j := by decide + +private theorem k8t4p11_local_18_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_18 a b ∪ (((k8t4p11_local_18_required_0 a b ∪ k8t4p11_local_18_required_1 a b) ∪ k8t4p11_local_18_required_2 a b))) 5 j = k8t4p11_local_18 5 j := by decide + +private theorem k8t4p11_local_18_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_18 a b ∪ (((k8t4p11_local_18_required_0 a b ∪ k8t4p11_local_18_required_1 a b) ∪ k8t4p11_local_18_required_2 a b))) 6 j = k8t4p11_local_18 6 j := by decide + +private theorem k8t4p11_local_18_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_18 a b ∪ (((k8t4p11_local_18_required_0 a b ∪ k8t4p11_local_18_required_1 a b) ∪ k8t4p11_local_18_required_2 a b))) 7 j = k8t4p11_local_18 7 j := by decide + +private theorem k8t4p11_local_18_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_18 a b ∪ (((k8t4p11_local_18_required_0 a b ∪ k8t4p11_local_18_required_1 a b) ∪ k8t4p11_local_18_required_2 a b))) 8 j = k8t4p11_local_18 8 j := by decide + +private theorem k8t4p11_local_18_merged_eq : (fun a b => freshMatrix k8t4p11_state_18 a b ∪ (((k8t4p11_local_18_required_0 a b ∪ k8t4p11_local_18_required_1 a b) ∪ k8t4p11_local_18_required_2 a b))) = k8t4p11_local_18 := by + funext i j + fin_cases i + + · exact k8t4p11_local_18_merged_eq_row_0 j + + · exact k8t4p11_local_18_merged_eq_row_1 j + + · exact k8t4p11_local_18_merged_eq_row_2 j + + · exact k8t4p11_local_18_merged_eq_row_3 j + + · exact k8t4p11_local_18_merged_eq_row_4 j + + · exact k8t4p11_local_18_merged_eq_row_5 j + + · exact k8t4p11_local_18_merged_eq_row_6 j + + · exact k8t4p11_local_18_merged_eq_row_7 j + + · exact k8t4p11_local_18_merged_eq_row_8 j + +private theorem k8t4p11_local_18_eq : (fun a b => freshMatrix k8t4p11_state_18 a b ∪ requiredMatrix 8 k8t4p11_step_18_data.required a b) = k8t4p11_local_18 := by + funext a b + change freshMatrix k8t4p11_state_18 a b ∪ requiredMatrix 8 (k8t4p11_step_18_required_block_0 ++ k8t4p11_step_18_required_block_1 ++ k8t4p11_step_18_required_block_2) a b = _ + simp only [requiredMatrix_append, k8t4p11_local_18_required_0_eq, k8t4p11_local_18_required_1_eq, k8t4p11_local_18_required_2_eq] + exact congrFun (congrFun k8t4p11_local_18_merged_eq a) b + +private theorem k8t4p11_local_18_paths : ∀ p ∈ k8t4p11_step_18_data.required, p.Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 := by + change ∀ p ∈ (k8t4p11_step_18_required_block_0 ++ k8t4p11_step_18_required_block_1 ++ k8t4p11_step_18_required_block_2), p.Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) 8 + simp only [List.forall_mem_append] + exact ⟨⟨k8t4p11_local_18_paths_block_0, k8t4p11_local_18_paths_block_1⟩, k8t4p11_local_18_paths_block_2⟩ + +private theorem k8t4p11_local_18_bad : k8t4p11_step_18_data.bad.Check (freshGraph k8t4p11.graph k8t4p11_step_18_data.i k8t4p11_step_18_data.j) k8t4p11_local_18 8 4 := by decide + +private theorem k8t4p11_step_18_check : k8t4p11_step_18.Check k8t4p11.graph k8t4p11_state_18 8 4 := by + change k8t4p11_step_18_data.Check k8t4p11.graph k8t4p11_state_18 8 4 + refine ⟨by decide, k8t4p11_local_18_paths, ?_⟩ + rw [k8t4p11_local_18_eq] + exact k8t4p11_local_18_bad + +private theorem k8t4p11_update_18 : k8t4p11_step_18.apply k8t4p11_state_18 = k8t4p11_state_19 := by + have h : ∀ i j : Fin 8, k8t4p11_step_18.apply k8t4p11_state_18 i j = k8t4p11_state_19 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_20 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {0, 1, 3, 4, 5, 6}], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_19 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 5, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {0, 1, 3, 4, 5, 6}], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_19_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t4p11_state_19 a b ∪ requiredMatrix 8 k8t4p11_step_19_data.required a b) 0 j = k8t4p11_local_19 0 j := by decide + +private theorem k8t4p11_local_19_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t4p11_state_19 a b ∪ requiredMatrix 8 k8t4p11_step_19_data.required a b) 1 j = k8t4p11_local_19 1 j := by decide + +private theorem k8t4p11_local_19_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t4p11_state_19 a b ∪ requiredMatrix 8 k8t4p11_step_19_data.required a b) 2 j = k8t4p11_local_19 2 j := by decide + +private theorem k8t4p11_local_19_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t4p11_state_19 a b ∪ requiredMatrix 8 k8t4p11_step_19_data.required a b) 3 j = k8t4p11_local_19 3 j := by decide + +private theorem k8t4p11_local_19_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t4p11_state_19 a b ∪ requiredMatrix 8 k8t4p11_step_19_data.required a b) 4 j = k8t4p11_local_19 4 j := by decide + +private theorem k8t4p11_local_19_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t4p11_state_19 a b ∪ requiredMatrix 8 k8t4p11_step_19_data.required a b) 5 j = k8t4p11_local_19 5 j := by decide + +private theorem k8t4p11_local_19_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t4p11_state_19 a b ∪ requiredMatrix 8 k8t4p11_step_19_data.required a b) 6 j = k8t4p11_local_19 6 j := by decide + +private theorem k8t4p11_local_19_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t4p11_state_19 a b ∪ requiredMatrix 8 k8t4p11_step_19_data.required a b) 7 j = k8t4p11_local_19 7 j := by decide + +private theorem k8t4p11_local_19_eq : (fun a b => k8t4p11_state_19 a b ∪ requiredMatrix 8 k8t4p11_step_19_data.required a b) = k8t4p11_local_19 := by + funext i j + fin_cases i + + · exact k8t4p11_local_19_eq_row_0 j + + · exact k8t4p11_local_19_eq_row_1 j + + · exact k8t4p11_local_19_eq_row_2 j + + · exact k8t4p11_local_19_eq_row_3 j + + · exact k8t4p11_local_19_eq_row_4 j + + · exact k8t4p11_local_19_eq_row_5 j + + · exact k8t4p11_local_19_eq_row_6 j + + · exact k8t4p11_local_19_eq_row_7 j + +private theorem k8t4p11_local_19_paths : ∀ p ∈ k8t4p11_step_19_data.required, p.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_19_data.i k8t4p11_step_19_data.j) 8 := by decide + +private theorem k8t4p11_local_19_bad : k8t4p11_step_19_data.bad.Check (addedEdgeGraph k8t4p11.graph k8t4p11_step_19_data.i k8t4p11_step_19_data.j) k8t4p11_local_19 8 4 := by decide + +private theorem k8t4p11_step_19_check : k8t4p11_step_19.Check k8t4p11.graph k8t4p11_state_19 8 4 := by + change k8t4p11_step_19_data.Check k8t4p11.graph k8t4p11_state_19 8 4 + refine ⟨k8t4p11_local_19_paths, ?_⟩ + rw [k8t4p11_local_19_eq] + exact k8t4p11_local_19_bad + +private theorem k8t4p11_update_19 : k8t4p11_step_19.apply k8t4p11_state_19 = k8t4p11_state_20 := by + have h : ∀ i j : Fin 8, k8t4p11_step_19.apply k8t4p11_state_19 i j = k8t4p11_state_20 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t4p11_state_21 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {0, 1, 3, 4, 5, 6}], + #[Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t4p11_local_20 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, ∅, Finset.Icc 0 4, ∅, Finset.Icc 0 3, ∅], + #[Finset.Icc 0 4, ∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{0}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 6], + #[{0}, {2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {0, 1, 3, 4, 5, 6}], + #[∅, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}], + #[Finset.Icc 0 3, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p11_local_20_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_20 a b ∪ requiredMatrix 8 k8t4p11_step_20_data.required a b) 0 j = k8t4p11_local_20 0 j := by decide + +private theorem k8t4p11_local_20_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_20 a b ∪ requiredMatrix 8 k8t4p11_step_20_data.required a b) 1 j = k8t4p11_local_20 1 j := by decide + +private theorem k8t4p11_local_20_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_20 a b ∪ requiredMatrix 8 k8t4p11_step_20_data.required a b) 2 j = k8t4p11_local_20 2 j := by decide + +private theorem k8t4p11_local_20_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_20 a b ∪ requiredMatrix 8 k8t4p11_step_20_data.required a b) 3 j = k8t4p11_local_20 3 j := by decide + +private theorem k8t4p11_local_20_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_20 a b ∪ requiredMatrix 8 k8t4p11_step_20_data.required a b) 4 j = k8t4p11_local_20 4 j := by decide + +private theorem k8t4p11_local_20_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_20 a b ∪ requiredMatrix 8 k8t4p11_step_20_data.required a b) 5 j = k8t4p11_local_20 5 j := by decide + +private theorem k8t4p11_local_20_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_20 a b ∪ requiredMatrix 8 k8t4p11_step_20_data.required a b) 6 j = k8t4p11_local_20 6 j := by decide + +private theorem k8t4p11_local_20_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_20 a b ∪ requiredMatrix 8 k8t4p11_step_20_data.required a b) 7 j = k8t4p11_local_20 7 j := by decide + +private theorem k8t4p11_local_20_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t4p11_state_20 a b ∪ requiredMatrix 8 k8t4p11_step_20_data.required a b) 8 j = k8t4p11_local_20 8 j := by decide + +private theorem k8t4p11_local_20_eq : (fun a b => freshMatrix k8t4p11_state_20 a b ∪ requiredMatrix 8 k8t4p11_step_20_data.required a b) = k8t4p11_local_20 := by + funext i j + fin_cases i + + · exact k8t4p11_local_20_eq_row_0 j + + · exact k8t4p11_local_20_eq_row_1 j + + · exact k8t4p11_local_20_eq_row_2 j + + · exact k8t4p11_local_20_eq_row_3 j + + · exact k8t4p11_local_20_eq_row_4 j + + · exact k8t4p11_local_20_eq_row_5 j + + · exact k8t4p11_local_20_eq_row_6 j + + · exact k8t4p11_local_20_eq_row_7 j + + · exact k8t4p11_local_20_eq_row_8 j + +private theorem k8t4p11_local_20_paths : ∀ p ∈ k8t4p11_step_20_data.required, p.Check (freshGraph k8t4p11.graph k8t4p11_step_20_data.i k8t4p11_step_20_data.j) 8 := by decide + +private theorem k8t4p11_local_20_bad : k8t4p11_step_20_data.bad.Check (freshGraph k8t4p11.graph k8t4p11_step_20_data.i k8t4p11_step_20_data.j) k8t4p11_local_20 8 4 := by decide + +private theorem k8t4p11_step_20_check : k8t4p11_step_20.Check k8t4p11.graph k8t4p11_state_20 8 4 := by + change k8t4p11_step_20_data.Check k8t4p11.graph k8t4p11_state_20 8 4 + refine ⟨by decide, k8t4p11_local_20_paths, ?_⟩ + rw [k8t4p11_local_20_eq] + exact k8t4p11_local_20_bad + +private theorem k8t4p11_update_20 : k8t4p11_step_20.apply k8t4p11_state_20 = k8t4p11_state_21 := by + have h : ∀ i j : Fin 8, k8t4p11_step_20.apply k8t4p11_state_20 i j = k8t4p11_state_21 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k8t4p11_closure_21 : ClosureCheck k8t4p11.graph k8t4p11_state_21 8 4 [] := by trivial + +private theorem k8t4p11_closure_20 : ClosureCheck k8t4p11.graph k8t4p11_state_20 8 4 [k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_20_check + · rw [k8t4p11_update_20] + exact k8t4p11_closure_21 + +private theorem k8t4p11_closure_19 : ClosureCheck k8t4p11.graph k8t4p11_state_19 8 4 [k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_19_check + · rw [k8t4p11_update_19] + exact k8t4p11_closure_20 + +private theorem k8t4p11_closure_18 : ClosureCheck k8t4p11.graph k8t4p11_state_18 8 4 [k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_18_check + · rw [k8t4p11_update_18] + exact k8t4p11_closure_19 + +private theorem k8t4p11_closure_17 : ClosureCheck k8t4p11.graph k8t4p11_state_17 8 4 [k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_17_check + · rw [k8t4p11_update_17] + exact k8t4p11_closure_18 + +private theorem k8t4p11_closure_16 : ClosureCheck k8t4p11.graph k8t4p11_state_16 8 4 [k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_16_check + · rw [k8t4p11_update_16] + exact k8t4p11_closure_17 + +private theorem k8t4p11_closure_15 : ClosureCheck k8t4p11.graph k8t4p11_state_15 8 4 [k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_15_check + · rw [k8t4p11_update_15] + exact k8t4p11_closure_16 + +private theorem k8t4p11_closure_14 : ClosureCheck k8t4p11.graph k8t4p11_state_14 8 4 [k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_14_check + · rw [k8t4p11_update_14] + exact k8t4p11_closure_15 + +private theorem k8t4p11_closure_13 : ClosureCheck k8t4p11.graph k8t4p11_state_13 8 4 [k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_13_check + · rw [k8t4p11_update_13] + exact k8t4p11_closure_14 + +private theorem k8t4p11_closure_12 : ClosureCheck k8t4p11.graph k8t4p11_state_12 8 4 [k8t4p11_step_12, k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_12_check + · rw [k8t4p11_update_12] + exact k8t4p11_closure_13 + +private theorem k8t4p11_closure_11 : ClosureCheck k8t4p11.graph k8t4p11_state_11 8 4 [k8t4p11_step_11, k8t4p11_step_12, k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_11_check + · rw [k8t4p11_update_11] + exact k8t4p11_closure_12 + +private theorem k8t4p11_closure_10 : ClosureCheck k8t4p11.graph k8t4p11_state_10 8 4 [k8t4p11_step_10, k8t4p11_step_11, k8t4p11_step_12, k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_10_check + · rw [k8t4p11_update_10] + exact k8t4p11_closure_11 + +private theorem k8t4p11_closure_9 : ClosureCheck k8t4p11.graph k8t4p11_state_9 8 4 [k8t4p11_step_9, k8t4p11_step_10, k8t4p11_step_11, k8t4p11_step_12, k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_9_check + · rw [k8t4p11_update_9] + exact k8t4p11_closure_10 + +private theorem k8t4p11_closure_8 : ClosureCheck k8t4p11.graph k8t4p11_state_8 8 4 [k8t4p11_step_8, k8t4p11_step_9, k8t4p11_step_10, k8t4p11_step_11, k8t4p11_step_12, k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_8_check + · rw [k8t4p11_update_8] + exact k8t4p11_closure_9 + +private theorem k8t4p11_closure_7 : ClosureCheck k8t4p11.graph k8t4p11_state_7 8 4 [k8t4p11_step_7, k8t4p11_step_8, k8t4p11_step_9, k8t4p11_step_10, k8t4p11_step_11, k8t4p11_step_12, k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_7_check + · rw [k8t4p11_update_7] + exact k8t4p11_closure_8 + +private theorem k8t4p11_closure_6 : ClosureCheck k8t4p11.graph k8t4p11_state_6 8 4 [k8t4p11_step_6, k8t4p11_step_7, k8t4p11_step_8, k8t4p11_step_9, k8t4p11_step_10, k8t4p11_step_11, k8t4p11_step_12, k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_6_check + · rw [k8t4p11_update_6] + exact k8t4p11_closure_7 + +private theorem k8t4p11_closure_5 : ClosureCheck k8t4p11.graph k8t4p11_state_5 8 4 [k8t4p11_step_5, k8t4p11_step_6, k8t4p11_step_7, k8t4p11_step_8, k8t4p11_step_9, k8t4p11_step_10, k8t4p11_step_11, k8t4p11_step_12, k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_5_check + · rw [k8t4p11_update_5] + exact k8t4p11_closure_6 + +private theorem k8t4p11_closure_4 : ClosureCheck k8t4p11.graph k8t4p11_state_4 8 4 [k8t4p11_step_4, k8t4p11_step_5, k8t4p11_step_6, k8t4p11_step_7, k8t4p11_step_8, k8t4p11_step_9, k8t4p11_step_10, k8t4p11_step_11, k8t4p11_step_12, k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_4_check + · rw [k8t4p11_update_4] + exact k8t4p11_closure_5 + +private theorem k8t4p11_closure_3 : ClosureCheck k8t4p11.graph k8t4p11_state_3 8 4 [k8t4p11_step_3, k8t4p11_step_4, k8t4p11_step_5, k8t4p11_step_6, k8t4p11_step_7, k8t4p11_step_8, k8t4p11_step_9, k8t4p11_step_10, k8t4p11_step_11, k8t4p11_step_12, k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_3_check + · rw [k8t4p11_update_3] + exact k8t4p11_closure_4 + +private theorem k8t4p11_closure_2 : ClosureCheck k8t4p11.graph k8t4p11_state_2 8 4 [k8t4p11_step_2, k8t4p11_step_3, k8t4p11_step_4, k8t4p11_step_5, k8t4p11_step_6, k8t4p11_step_7, k8t4p11_step_8, k8t4p11_step_9, k8t4p11_step_10, k8t4p11_step_11, k8t4p11_step_12, k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_2_check + · rw [k8t4p11_update_2] + exact k8t4p11_closure_3 + +private theorem k8t4p11_closure_1 : ClosureCheck k8t4p11.graph k8t4p11_state_1 8 4 [k8t4p11_step_1, k8t4p11_step_2, k8t4p11_step_3, k8t4p11_step_4, k8t4p11_step_5, k8t4p11_step_6, k8t4p11_step_7, k8t4p11_step_8, k8t4p11_step_9, k8t4p11_step_10, k8t4p11_step_11, k8t4p11_step_12, k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_1_check + · rw [k8t4p11_update_1] + exact k8t4p11_closure_2 + +private theorem k8t4p11_closure_0 : ClosureCheck k8t4p11.graph k8t4p11_state_0 8 4 [k8t4p11_step_0, k8t4p11_step_1, k8t4p11_step_2, k8t4p11_step_3, k8t4p11_step_4, k8t4p11_step_5, k8t4p11_step_6, k8t4p11_step_7, k8t4p11_step_8, k8t4p11_step_9, k8t4p11_step_10, k8t4p11_step_11, k8t4p11_step_12, k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] := by + constructor + · exact k8t4p11_step_0_check + · rw [k8t4p11_update_0] + exact k8t4p11_closure_1 + +private theorem k8t4p11_matrix_eq : k8t4p11.matrix 8 = k8t4p11_state_21 := by + change closureMatrix (k8t4p11.initialMatrix 8) _ = _ + rw [k8t4p11_initial_eq] + change closureMatrix k8t4p11_state_0 [k8t4p11_step_0, k8t4p11_step_1, k8t4p11_step_2, k8t4p11_step_3, k8t4p11_step_4, k8t4p11_step_5, k8t4p11_step_6, k8t4p11_step_7, k8t4p11_step_8, k8t4p11_step_9, k8t4p11_step_10, k8t4p11_step_11, k8t4p11_step_12, k8t4p11_step_13, k8t4p11_step_14, k8t4p11_step_15, k8t4p11_step_16, k8t4p11_step_17, k8t4p11_step_18, k8t4p11_step_19, k8t4p11_step_20] = _ + simp only [closureMatrix] + rw [k8t4p11_update_0, k8t4p11_update_1, k8t4p11_update_2, k8t4p11_update_3, k8t4p11_update_4, k8t4p11_update_5, k8t4p11_update_6, k8t4p11_update_7, k8t4p11_update_8, k8t4p11_update_9, k8t4p11_update_10, k8t4p11_update_11, k8t4p11_update_12, k8t4p11_update_13, k8t4p11_update_14, k8t4p11_update_15, k8t4p11_update_16, k8t4p11_update_17, k8t4p11_update_18, k8t4p11_update_19, k8t4p11_update_20] + +private theorem k8t4p11_part_0 : k8t4p11.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p11_part_1 : k8t4p11.chains.map List.length = ([[1], [3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p11_part_2 : k8t4p11.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p11.clique))) = ([[1], [3]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p11_templates_item_0 : (⟨0, 1, [], [], [2], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6, 7]], [], [2], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_2 : (⟨0, 2, [], [], [], 4, 7⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_3 : (⟨0, 2, [[3, 4, 5, 6, 7]], [], [], 2, 2⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_4 : (⟨0, 3, [], [], [], 4, 7⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_5 : (⟨0, 3, [], [], [4, 5, 6, 7], 2, 3⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_6 : (⟨0, 3, [], [2, 1], [4, 5, 6, 7], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_7 : (⟨0, 4, [], [], [3], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_8 : (⟨0, 4, [], [], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_9 : (⟨0, 5, [], [], [4, 3], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_10 : (⟨0, 6, [], [], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_11 : (⟨0, 6, [], [], [7], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_12 : (⟨0, 7, [], [], [], 4, 7⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_13 : (⟨0, 7, [], [], [6, 5, 4, 3], 2, 3⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_14 : (⟨0, 7, [], [2, 1], [6, 5, 4, 3], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_15 : (⟨1, 2, [], [0], [], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_16 : (⟨1, 2, [[3, 4, 5, 6, 7]], [0], [], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_17 : (⟨1, 3, [], [0], [], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_18 : (⟨1, 3, [], [0], [4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_19 : (⟨1, 4, [], [0], [3], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_20 : (⟨1, 4, [], [0], [5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_21 : (⟨1, 5, [], [0], [4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_22 : (⟨1, 6, [], [0], [5, 4, 3], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_23 : (⟨1, 6, [], [0], [7], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_24 : (⟨1, 7, [], [0], [], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_25 : (⟨1, 7, [], [0], [6, 5, 4, 3], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_26 : (⟨2, 3, [], [], [], 4, 7⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_27 : (⟨2, 3, [], [], [4, 5, 6, 7], 2, 3⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_28 : (⟨2, 3, [], [0, 1], [4, 5, 6, 7], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_29 : (⟨2, 4, [], [], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_30 : (⟨2, 5, [], [], [4, 3], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_31 : (⟨2, 6, [], [], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_32 : (⟨2, 7, [], [], [], 4, 7⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_33 : (⟨2, 7, [], [], [6, 5, 4, 3], 2, 3⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_34 : (⟨2, 7, [], [0, 1], [6, 5, 4, 3], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_35 : (⟨3, 4, [], [], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_36 : (⟨3, 5, [], [], [6, 7], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_37 : (⟨3, 6, [], [], [7], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_38 : (⟨4, 5, [], [3], [6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_39 : (⟨4, 6, [], [3], [7], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_40 : (⟨4, 7, [], [3], [], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_41 : (⟨5, 6, [], [3, 4], [7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_42 : (⟨5, 7, [], [3, 4], [], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_item_43 : (⟨6, 7, [], [3, 4, 5], [], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p11_templates_block_0_check : ∀ T ∈ k8t4p11_templates_block_0, T.Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p11_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_templates_item_0, k8t4p11_templates_item_1, k8t4p11_templates_item_2, k8t4p11_templates_item_3, k8t4p11_templates_item_4, k8t4p11_templates_item_5, k8t4p11_templates_item_6, k8t4p11_templates_item_7, k8t4p11_templates_item_8, k8t4p11_templates_item_9, k8t4p11_templates_item_10, k8t4p11_templates_item_11⟩ + +private theorem k8t4p11_templates_block_1_check : ∀ T ∈ k8t4p11_templates_block_1, T.Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p11_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_templates_item_12, k8t4p11_templates_item_13, k8t4p11_templates_item_14, k8t4p11_templates_item_15, k8t4p11_templates_item_16, k8t4p11_templates_item_17, k8t4p11_templates_item_18, k8t4p11_templates_item_19, k8t4p11_templates_item_20, k8t4p11_templates_item_21, k8t4p11_templates_item_22, k8t4p11_templates_item_23⟩ + +private theorem k8t4p11_templates_block_2_check : ∀ T ∈ k8t4p11_templates_block_2, T.Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p11_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_templates_item_24, k8t4p11_templates_item_25, k8t4p11_templates_item_26, k8t4p11_templates_item_27, k8t4p11_templates_item_28, k8t4p11_templates_item_29, k8t4p11_templates_item_30, k8t4p11_templates_item_31, k8t4p11_templates_item_32, k8t4p11_templates_item_33, k8t4p11_templates_item_34, k8t4p11_templates_item_35⟩ + +private theorem k8t4p11_templates_block_3_check : ∀ T ∈ k8t4p11_templates_block_3, T.Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p11_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p11_templates_item_36, k8t4p11_templates_item_37, k8t4p11_templates_item_38, k8t4p11_templates_item_39, k8t4p11_templates_item_40, k8t4p11_templates_item_41, k8t4p11_templates_item_42, k8t4p11_templates_item_43⟩ + +private theorem k8t4p11_part_3 : ∀ T ∈ k8t4p11.templates, T.Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k8t4p11_templates_block_0 ++ k8t4p11_templates_block_1 ++ k8t4p11_templates_block_2 ++ k8t4p11_templates_block_3), T.Check k8t4p11.graph k8t4p11.clique 8 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k8t4p11_templates_block_0_check, k8t4p11_templates_block_1_check⟩, k8t4p11_templates_block_2_check⟩, k8t4p11_templates_block_3_check⟩ + +private theorem k8t4p11_required_item_0 : (⟨4, 6, [5]⟩ : RequiredPathData (Fin 8)).Check k8t4p11.graph 8 := by decide + +private theorem k8t4p11_part_4 : ∀ p ∈ k8t4p11.required, p.Check k8t4p11.graph 8 := by + simp only [k8t4p11, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact k8t4p11_required_item_0 + +private theorem k8t4p11_part_5 : ClosureCheck k8t4p11.graph (k8t4p11.initialMatrix 8) 8 4 k8t4p11.closure := by + rw [k8t4p11_initial_eq] + exact k8t4p11_closure_0 + +private theorem k8t4p11_part_6 : k8t4p11.bad.Check k8t4p11.graph (k8t4p11.matrix 8) 8 4 := by + rw [k8t4p11_matrix_eq] + decide + +theorem k8t4p11_check : k8t4p11.Check 8 4 [[1], [3]] := + ⟨k8t4p11_part_0, k8t4p11_part_1, k8t4p11_part_2, k8t4p11_part_3, k8t4p11_part_4, k8t4p11_part_5, k8t4p11_part_6⟩ +def k8t4p12 : LayoutCertificate 7 where + chains := [[0, 1, 2, 3, 4, 5, 6]] + clique := {0, 2, 4, 6} + templates := [⟨0, 1, [], [], [2], 2, 6⟩, + ⟨0, 1, [], [], [2, 3, 4], 1, 4⟩, + ⟨0, 3, [], [], [2], 2, 6⟩, + ⟨0, 3, [], [2, 1], [4], 1, 4⟩, + ⟨0, 5, [], [], [4], 2, 6⟩, + ⟨0, 5, [], [2, 1], [4], 1, 4⟩, + ⟨1, 2, [], [0], [], 2, 6⟩, + ⟨1, 2, [], [0], [3, 4], 1, 4⟩, + ⟨1, 3, [], [0], [2], 1, 5⟩, + ⟨1, 4, [], [0], [], 2, 6⟩, + ⟨1, 4, [], [0], [3, 2], 1, 4⟩, + ⟨1, 5, [], [0], [4], 1, 5⟩, + ⟨1, 6, [], [0], [], 2, 6⟩, + ⟨1, 6, [[2, 3, 4]], [0], [], 1, 3⟩, + ⟨2, 3, [], [0, 1], [4], 1, 4⟩, + ⟨2, 5, [], [0, 1], [4], 1, 4⟩, + ⟨3, 4, [], [0, 1, 2], [], 1, 4⟩, + ⟨3, 5, [], [2], [4], 1, 5⟩, + ⟨3, 6, [], [0, 1, 2], [], 1, 4⟩, + ⟨4, 5, [[0, 1, 2]], [], [6], 1, 3⟩, + ⟨5, 6, [[0, 1, 2]], [4], [], 1, 3⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 3), (3, 2), (5, 2), (0, 3)}⟩ + + +private def k8t4p12_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 4], + #[∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p12_initial_eq_row_0 : ∀ j : Fin 7, (k8t4p12.initialMatrix 8) 0 j = k8t4p12_state_0 0 j := by decide + +private theorem k8t4p12_initial_eq_row_1 : ∀ j : Fin 7, (k8t4p12.initialMatrix 8) 1 j = k8t4p12_state_0 1 j := by decide + +private theorem k8t4p12_initial_eq_row_2 : ∀ j : Fin 7, (k8t4p12.initialMatrix 8) 2 j = k8t4p12_state_0 2 j := by decide + +private theorem k8t4p12_initial_eq_row_3 : ∀ j : Fin 7, (k8t4p12.initialMatrix 8) 3 j = k8t4p12_state_0 3 j := by decide + +private theorem k8t4p12_initial_eq_row_4 : ∀ j : Fin 7, (k8t4p12.initialMatrix 8) 4 j = k8t4p12_state_0 4 j := by decide + +private theorem k8t4p12_initial_eq_row_5 : ∀ j : Fin 7, (k8t4p12.initialMatrix 8) 5 j = k8t4p12_state_0 5 j := by decide + +private theorem k8t4p12_initial_eq_row_6 : ∀ j : Fin 7, (k8t4p12.initialMatrix 8) 6 j = k8t4p12_state_0 6 j := by decide + +private theorem k8t4p12_initial_eq : (k8t4p12.initialMatrix 8) = k8t4p12_state_0 := by + funext i j + fin_cases i + + · exact k8t4p12_initial_eq_row_0 j + + · exact k8t4p12_initial_eq_row_1 j + + · exact k8t4p12_initial_eq_row_2 j + + · exact k8t4p12_initial_eq_row_3 j + + · exact k8t4p12_initial_eq_row_4 j + + · exact k8t4p12_initial_eq_row_5 j + + · exact k8t4p12_initial_eq_row_6 j + +private theorem k8t4p12_closure_0 : ClosureCheck k8t4p12.graph k8t4p12_state_0 8 4 [] := by trivial + +private theorem k8t4p12_matrix_eq : k8t4p12.matrix 8 = k8t4p12_state_0 := by + change closureMatrix (k8t4p12.initialMatrix 8) _ = _ + rw [k8t4p12_initial_eq] + change closureMatrix k8t4p12_state_0 [] = _ + rfl + +private theorem k8t4p12_part_0 : k8t4p12.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p12_part_1 : k8t4p12.chains.map List.length = ([[1, 1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p12_part_2 : k8t4p12.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p12.clique))) = ([[1, 1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p12_templates_item_0 : (⟨0, 1, [], [], [2], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_2 : (⟨0, 3, [], [], [2], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_3 : (⟨0, 3, [], [2, 1], [4], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_4 : (⟨0, 5, [], [], [4], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_5 : (⟨0, 5, [], [2, 1], [4], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_6 : (⟨1, 2, [], [0], [], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_7 : (⟨1, 2, [], [0], [3, 4], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_8 : (⟨1, 3, [], [0], [2], 1, 5⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_9 : (⟨1, 4, [], [0], [], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_10 : (⟨1, 4, [], [0], [3, 2], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_11 : (⟨1, 5, [], [0], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_12 : (⟨1, 6, [], [0], [], 2, 6⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_13 : (⟨1, 6, [[2, 3, 4]], [0], [], 1, 3⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_14 : (⟨2, 3, [], [0, 1], [4], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_15 : (⟨2, 5, [], [0, 1], [4], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_16 : (⟨3, 4, [], [0, 1, 2], [], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_17 : (⟨3, 5, [], [2], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_18 : (⟨3, 6, [], [0, 1, 2], [], 1, 4⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_19 : (⟨4, 5, [[0, 1, 2]], [], [6], 1, 3⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_templates_item_20 : (⟨5, 6, [[0, 1, 2]], [4], [], 1, 3⟩ : TemplateData (Fin 7)).Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p12_part_3 : ∀ T ∈ k8t4p12.templates, T.Check k8t4p12.graph k8t4p12.clique 8 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p12, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p12_templates_item_0, k8t4p12_templates_item_1, k8t4p12_templates_item_2, k8t4p12_templates_item_3, k8t4p12_templates_item_4, k8t4p12_templates_item_5, k8t4p12_templates_item_6, k8t4p12_templates_item_7, k8t4p12_templates_item_8, k8t4p12_templates_item_9, k8t4p12_templates_item_10, k8t4p12_templates_item_11, k8t4p12_templates_item_12, k8t4p12_templates_item_13, k8t4p12_templates_item_14, k8t4p12_templates_item_15, k8t4p12_templates_item_16, k8t4p12_templates_item_17, k8t4p12_templates_item_18, k8t4p12_templates_item_19, k8t4p12_templates_item_20⟩ + +private theorem k8t4p12_part_4 : ∀ p ∈ k8t4p12.required, p.Check k8t4p12.graph 8 := by decide + +private theorem k8t4p12_part_5 : ClosureCheck k8t4p12.graph (k8t4p12.initialMatrix 8) 8 4 k8t4p12.closure := by + rw [k8t4p12_initial_eq] + exact k8t4p12_closure_0 + +private theorem k8t4p12_part_6 : k8t4p12.bad.Check k8t4p12.graph (k8t4p12.matrix 8) 8 4 := by + rw [k8t4p12_matrix_eq] + decide + +theorem k8t4p12_check : k8t4p12.Check 8 4 [[1, 1, 1]] := + ⟨k8t4p12_part_0, k8t4p12_part_1, k8t4p12_part_2, k8t4p12_part_3, k8t4p12_part_4, k8t4p12_part_5, k8t4p12_part_6⟩ +def k8t4p13 : LayoutCertificate 8 where + chains := [[0, 1, 2, 3, 4, 5, 6, 7]] + clique := {0, 2, 4, 7} + templates := [⟨0, 1, [], [], [2], 3, 6⟩, + ⟨0, 1, [], [], [2, 3, 4], 2, 4⟩, + ⟨0, 1, [[4, 5, 6, 7]], [], [2], 1, 2⟩, + ⟨0, 3, [], [], [2], 3, 6⟩, + ⟨0, 3, [], [2, 1], [4], 2, 4⟩, + ⟨0, 3, [[4, 5, 6, 7]], [], [2], 1, 2⟩, + ⟨0, 5, [], [], [4], 3, 6⟩, + ⟨0, 5, [], [], [6, 7], 2, 5⟩, + ⟨0, 5, [], [2, 1], [6, 7], 1, 3⟩, + ⟨0, 6, [], [], [5, 4], 2, 5⟩, + ⟨0, 6, [], [2, 1], [5, 4], 1, 3⟩, + ⟨1, 2, [], [0], [3, 4], 2, 4⟩, + ⟨1, 2, [[4, 5, 6, 7]], [0], [], 1, 2⟩, + ⟨1, 3, [], [0], [2], 2, 5⟩, + ⟨1, 3, [[4, 5, 6, 7]], [0], [2], 1, 1⟩, + ⟨1, 4, [], [0], [3, 2], 2, 4⟩, + ⟨1, 4, [], [0], [5, 6, 7], 1, 3⟩, + ⟨1, 5, [], [0], [4], 2, 5⟩, + ⟨1, 5, [], [0], [6, 7], 1, 4⟩, + ⟨1, 6, [], [0], [5, 4], 1, 4⟩, + ⟨1, 7, [[2, 3, 4]], [0], [], 2, 3⟩, + ⟨1, 7, [], [0], [6, 5, 4], 1, 3⟩, + ⟨2, 3, [], [], [4, 5, 6, 7], 1, 3⟩, + ⟨2, 5, [], [0, 1], [6, 7], 1, 3⟩, + ⟨3, 4, [], [2], [5, 6, 7], 1, 3⟩, + ⟨3, 5, [], [2], [4], 2, 5⟩, + ⟨3, 5, [], [2], [6, 7], 1, 4⟩, + ⟨3, 6, [], [2], [5, 4], 1, 4⟩, + ⟨3, 7, [], [2], [6, 5, 4], 1, 3⟩, + ⟨4, 5, [[0, 1, 2]], [], [6, 7], 1, 2⟩, + ⟨5, 6, [[0, 1, 2]], [4], [7], 1, 2⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 3), (3, 2), (0, 3), (5, 2)}⟩ + + +private def k8t4p13_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[∅, Finset.Icc 1 4, ∅, {1, 2, 3}, ∅, {1, 2, 3}, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[∅, Finset.Icc 1 4, ∅, {1, 2, 3}, ∅, {1, 2}, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, {1, 2, 3}, Finset.Icc 1 5, {1, 2}, ∅, {1, 2}, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅, {1, 2}, ∅, ∅], + #[∅, {1, 2, 3}, ∅, {1, 2, 3}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p13_initial_eq_row_0 : ∀ j : Fin 8, (k8t4p13.initialMatrix 8) 0 j = k8t4p13_state_0 0 j := by decide + +private theorem k8t4p13_initial_eq_row_1 : ∀ j : Fin 8, (k8t4p13.initialMatrix 8) 1 j = k8t4p13_state_0 1 j := by decide + +private theorem k8t4p13_initial_eq_row_2 : ∀ j : Fin 8, (k8t4p13.initialMatrix 8) 2 j = k8t4p13_state_0 2 j := by decide + +private theorem k8t4p13_initial_eq_row_3 : ∀ j : Fin 8, (k8t4p13.initialMatrix 8) 3 j = k8t4p13_state_0 3 j := by decide + +private theorem k8t4p13_initial_eq_row_4 : ∀ j : Fin 8, (k8t4p13.initialMatrix 8) 4 j = k8t4p13_state_0 4 j := by decide + +private theorem k8t4p13_initial_eq_row_5 : ∀ j : Fin 8, (k8t4p13.initialMatrix 8) 5 j = k8t4p13_state_0 5 j := by decide + +private theorem k8t4p13_initial_eq_row_6 : ∀ j : Fin 8, (k8t4p13.initialMatrix 8) 6 j = k8t4p13_state_0 6 j := by decide + +private theorem k8t4p13_initial_eq_row_7 : ∀ j : Fin 8, (k8t4p13.initialMatrix 8) 7 j = k8t4p13_state_0 7 j := by decide + +private theorem k8t4p13_initial_eq : (k8t4p13.initialMatrix 8) = k8t4p13_state_0 := by + funext i j + fin_cases i + + · exact k8t4p13_initial_eq_row_0 j + + · exact k8t4p13_initial_eq_row_1 j + + · exact k8t4p13_initial_eq_row_2 j + + · exact k8t4p13_initial_eq_row_3 j + + · exact k8t4p13_initial_eq_row_4 j + + · exact k8t4p13_initial_eq_row_5 j + + · exact k8t4p13_initial_eq_row_6 j + + · exact k8t4p13_initial_eq_row_7 j + +private theorem k8t4p13_closure_0 : ClosureCheck k8t4p13.graph k8t4p13_state_0 8 4 [] := by trivial + +private theorem k8t4p13_matrix_eq : k8t4p13.matrix 8 = k8t4p13_state_0 := by + change closureMatrix (k8t4p13.initialMatrix 8) _ = _ + rw [k8t4p13_initial_eq] + change closureMatrix k8t4p13_state_0 [] = _ + rfl + +private theorem k8t4p13_part_0 : k8t4p13.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p13_part_1 : k8t4p13.chains.map List.length = ([[1, 1, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p13_part_2 : k8t4p13.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p13.clique))) = ([[1, 1, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p13_templates_item_0 : (⟨0, 1, [], [], [2], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4], 2, 4⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_2 : (⟨0, 1, [[4, 5, 6, 7]], [], [2], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_3 : (⟨0, 3, [], [], [2], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_4 : (⟨0, 3, [], [2, 1], [4], 2, 4⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_5 : (⟨0, 3, [[4, 5, 6, 7]], [], [2], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_6 : (⟨0, 5, [], [], [4], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_7 : (⟨0, 5, [], [], [6, 7], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_8 : (⟨0, 5, [], [2, 1], [6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_9 : (⟨0, 6, [], [], [5, 4], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_10 : (⟨0, 6, [], [2, 1], [5, 4], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_11 : (⟨1, 2, [], [0], [3, 4], 2, 4⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_12 : (⟨1, 2, [[4, 5, 6, 7]], [0], [], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_13 : (⟨1, 3, [], [0], [2], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_14 : (⟨1, 3, [[4, 5, 6, 7]], [0], [2], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_15 : (⟨1, 4, [], [0], [3, 2], 2, 4⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_16 : (⟨1, 4, [], [0], [5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_17 : (⟨1, 5, [], [0], [4], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_18 : (⟨1, 5, [], [0], [6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_19 : (⟨1, 6, [], [0], [5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_20 : (⟨1, 7, [[2, 3, 4]], [0], [], 2, 3⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_21 : (⟨1, 7, [], [0], [6, 5, 4], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_22 : (⟨2, 3, [], [], [4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_23 : (⟨2, 5, [], [0, 1], [6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_24 : (⟨3, 4, [], [2], [5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_25 : (⟨3, 5, [], [2], [4], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_26 : (⟨3, 5, [], [2], [6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_27 : (⟨3, 6, [], [2], [5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_28 : (⟨3, 7, [], [2], [6, 5, 4], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_29 : (⟨4, 5, [[0, 1, 2]], [], [6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_templates_item_30 : (⟨5, 6, [[0, 1, 2]], [4], [7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p13_part_3 : ∀ T ∈ k8t4p13.templates, T.Check k8t4p13.graph k8t4p13.clique 8 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p13, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p13_templates_item_0, k8t4p13_templates_item_1, k8t4p13_templates_item_2, k8t4p13_templates_item_3, k8t4p13_templates_item_4, k8t4p13_templates_item_5, k8t4p13_templates_item_6, k8t4p13_templates_item_7, k8t4p13_templates_item_8, k8t4p13_templates_item_9, k8t4p13_templates_item_10, k8t4p13_templates_item_11, k8t4p13_templates_item_12, k8t4p13_templates_item_13, k8t4p13_templates_item_14, k8t4p13_templates_item_15, k8t4p13_templates_item_16, k8t4p13_templates_item_17, k8t4p13_templates_item_18, k8t4p13_templates_item_19, k8t4p13_templates_item_20, k8t4p13_templates_item_21, k8t4p13_templates_item_22, k8t4p13_templates_item_23, k8t4p13_templates_item_24, k8t4p13_templates_item_25, k8t4p13_templates_item_26, k8t4p13_templates_item_27, k8t4p13_templates_item_28, k8t4p13_templates_item_29, k8t4p13_templates_item_30⟩ + +private theorem k8t4p13_part_4 : ∀ p ∈ k8t4p13.required, p.Check k8t4p13.graph 8 := by decide + +private theorem k8t4p13_part_5 : ClosureCheck k8t4p13.graph (k8t4p13.initialMatrix 8) 8 4 k8t4p13.closure := by + rw [k8t4p13_initial_eq] + exact k8t4p13_closure_0 + +private theorem k8t4p13_part_6 : k8t4p13.bad.Check k8t4p13.graph (k8t4p13.matrix 8) 8 4 := by + rw [k8t4p13_matrix_eq] + decide + +theorem k8t4p13_check : k8t4p13.Check 8 4 [[1, 1, 2]] := + ⟨k8t4p13_part_0, k8t4p13_part_1, k8t4p13_part_2, k8t4p13_part_3, k8t4p13_part_4, k8t4p13_part_5, k8t4p13_part_6⟩ +def k8t4p14 : LayoutCertificate 8 where + chains := [[0, 1, 2, 3, 4, 5, 6, 7]] + clique := {0, 2, 5, 7} + templates := [⟨0, 1, [], [], [2], 3, 6⟩, + ⟨0, 1, [], [], [2, 3, 4, 5], 1, 3⟩, + ⟨0, 3, [], [], [2], 3, 6⟩, + ⟨0, 3, [], [], [4, 5], 2, 5⟩, + ⟨0, 3, [], [2, 1], [4, 5], 1, 3⟩, + ⟨0, 4, [], [], [3, 2], 2, 5⟩, + ⟨0, 4, [[5, 6, 7]], [], [3, 2], 1, 2⟩, + ⟨0, 6, [], [], [5], 3, 6⟩, + ⟨0, 6, [], [2, 1], [5], 2, 4⟩, + ⟨0, 6, [], [], [5, 4, 3, 2], 1, 3⟩, + ⟨1, 2, [], [0], [3, 4, 5], 1, 3⟩, + ⟨1, 3, [], [0], [2], 2, 5⟩, + ⟨1, 3, [], [0], [4, 5], 1, 4⟩, + ⟨1, 4, [], [0], [3, 2], 1, 4⟩, + ⟨1, 5, [], [0], [4, 3, 2], 1, 3⟩, + ⟨1, 6, [], [0], [5], 2, 5⟩, + ⟨1, 6, [], [0], [5, 4, 3, 2], 1, 2⟩, + ⟨1, 7, [[2, 3, 4, 5]], [0], [], 1, 2⟩, + ⟨2, 3, [], [0, 1], [4, 5], 1, 3⟩, + ⟨2, 6, [], [5, 4, 3], [7], 1, 3⟩, + ⟨3, 4, [], [0, 1, 2], [5], 1, 3⟩, + ⟨3, 6, [], [2], [5], 2, 5⟩, + ⟨3, 6, [], [5, 4], [7], 1, 4⟩, + ⟨3, 7, [[0, 1, 2]], [5, 4], [], 1, 2⟩, + ⟨4, 6, [], [2, 3], [5], 1, 4⟩, + ⟨5, 6, [], [2, 3, 4], [7], 1, 3⟩, + ⟨6, 7, [], [2, 3, 4, 5], [], 1, 3⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 3), (6, 2), (0, 3), (3, 2)}⟩ + + +private def k8t4p14_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, ∅, {1, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}, Finset.Icc 1 5, {1, 2}], + #[∅, {1, 2, 3}, ∅, {1, 2, 3}, ∅, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}, ∅, Finset.Icc 1 5, {1, 2}], + #[Finset.Icc 1 5, Finset.Icc 1 4, ∅, {1, 2, 3}, ∅, ∅, Finset.Icc 1 4, ∅], + #[∅, {1, 2, 3}, ∅, ∅, ∅, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, {1, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2}, ∅, {1, 2}, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p14_initial_eq_row_0 : ∀ j : Fin 8, (k8t4p14.initialMatrix 8) 0 j = k8t4p14_state_0 0 j := by decide + +private theorem k8t4p14_initial_eq_row_1 : ∀ j : Fin 8, (k8t4p14.initialMatrix 8) 1 j = k8t4p14_state_0 1 j := by decide + +private theorem k8t4p14_initial_eq_row_2 : ∀ j : Fin 8, (k8t4p14.initialMatrix 8) 2 j = k8t4p14_state_0 2 j := by decide + +private theorem k8t4p14_initial_eq_row_3 : ∀ j : Fin 8, (k8t4p14.initialMatrix 8) 3 j = k8t4p14_state_0 3 j := by decide + +private theorem k8t4p14_initial_eq_row_4 : ∀ j : Fin 8, (k8t4p14.initialMatrix 8) 4 j = k8t4p14_state_0 4 j := by decide + +private theorem k8t4p14_initial_eq_row_5 : ∀ j : Fin 8, (k8t4p14.initialMatrix 8) 5 j = k8t4p14_state_0 5 j := by decide + +private theorem k8t4p14_initial_eq_row_6 : ∀ j : Fin 8, (k8t4p14.initialMatrix 8) 6 j = k8t4p14_state_0 6 j := by decide + +private theorem k8t4p14_initial_eq_row_7 : ∀ j : Fin 8, (k8t4p14.initialMatrix 8) 7 j = k8t4p14_state_0 7 j := by decide + +private theorem k8t4p14_initial_eq : (k8t4p14.initialMatrix 8) = k8t4p14_state_0 := by + funext i j + fin_cases i + + · exact k8t4p14_initial_eq_row_0 j + + · exact k8t4p14_initial_eq_row_1 j + + · exact k8t4p14_initial_eq_row_2 j + + · exact k8t4p14_initial_eq_row_3 j + + · exact k8t4p14_initial_eq_row_4 j + + · exact k8t4p14_initial_eq_row_5 j + + · exact k8t4p14_initial_eq_row_6 j + + · exact k8t4p14_initial_eq_row_7 j + +private theorem k8t4p14_closure_0 : ClosureCheck k8t4p14.graph k8t4p14_state_0 8 4 [] := by trivial + +private theorem k8t4p14_matrix_eq : k8t4p14.matrix 8 = k8t4p14_state_0 := by + change closureMatrix (k8t4p14.initialMatrix 8) _ = _ + rw [k8t4p14_initial_eq] + change closureMatrix k8t4p14_state_0 [] = _ + rfl + +private theorem k8t4p14_part_0 : k8t4p14.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p14_part_1 : k8t4p14.chains.map List.length = ([[1, 2, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p14_part_2 : k8t4p14.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p14.clique))) = ([[1, 2, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p14_templates_item_0 : (⟨0, 1, [], [], [2], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_2 : (⟨0, 3, [], [], [2], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_3 : (⟨0, 3, [], [], [4, 5], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_4 : (⟨0, 3, [], [2, 1], [4, 5], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_5 : (⟨0, 4, [], [], [3, 2], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_6 : (⟨0, 4, [[5, 6, 7]], [], [3, 2], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_7 : (⟨0, 6, [], [], [5], 3, 6⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_8 : (⟨0, 6, [], [2, 1], [5], 2, 4⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_9 : (⟨0, 6, [], [], [5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_10 : (⟨1, 2, [], [0], [3, 4, 5], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_11 : (⟨1, 3, [], [0], [2], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_12 : (⟨1, 3, [], [0], [4, 5], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_13 : (⟨1, 4, [], [0], [3, 2], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_14 : (⟨1, 5, [], [0], [4, 3, 2], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_15 : (⟨1, 6, [], [0], [5], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_16 : (⟨1, 6, [], [0], [5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_17 : (⟨1, 7, [[2, 3, 4, 5]], [0], [], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_18 : (⟨2, 3, [], [0, 1], [4, 5], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_19 : (⟨2, 6, [], [5, 4, 3], [7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_20 : (⟨3, 4, [], [0, 1, 2], [5], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_21 : (⟨3, 6, [], [2], [5], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_22 : (⟨3, 6, [], [5, 4], [7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_23 : (⟨3, 7, [[0, 1, 2]], [5, 4], [], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_24 : (⟨4, 6, [], [2, 3], [5], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_25 : (⟨5, 6, [], [2, 3, 4], [7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_templates_item_26 : (⟨6, 7, [], [2, 3, 4, 5], [], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p14_part_3 : ∀ T ∈ k8t4p14.templates, T.Check k8t4p14.graph k8t4p14.clique 8 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p14, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p14_templates_item_0, k8t4p14_templates_item_1, k8t4p14_templates_item_2, k8t4p14_templates_item_3, k8t4p14_templates_item_4, k8t4p14_templates_item_5, k8t4p14_templates_item_6, k8t4p14_templates_item_7, k8t4p14_templates_item_8, k8t4p14_templates_item_9, k8t4p14_templates_item_10, k8t4p14_templates_item_11, k8t4p14_templates_item_12, k8t4p14_templates_item_13, k8t4p14_templates_item_14, k8t4p14_templates_item_15, k8t4p14_templates_item_16, k8t4p14_templates_item_17, k8t4p14_templates_item_18, k8t4p14_templates_item_19, k8t4p14_templates_item_20, k8t4p14_templates_item_21, k8t4p14_templates_item_22, k8t4p14_templates_item_23, k8t4p14_templates_item_24, k8t4p14_templates_item_25, k8t4p14_templates_item_26⟩ + +private theorem k8t4p14_part_4 : ∀ p ∈ k8t4p14.required, p.Check k8t4p14.graph 8 := by decide + +private theorem k8t4p14_part_5 : ClosureCheck k8t4p14.graph (k8t4p14.initialMatrix 8) 8 4 k8t4p14.closure := by + rw [k8t4p14_initial_eq] + exact k8t4p14_closure_0 + +private theorem k8t4p14_part_6 : k8t4p14.bad.Check k8t4p14.graph (k8t4p14.matrix 8) 8 4 := by + rw [k8t4p14_matrix_eq] + decide + +theorem k8t4p14_check : k8t4p14.Check 8 4 [[1, 2, 1]] := + ⟨k8t4p14_part_0, k8t4p14_part_1, k8t4p14_part_2, k8t4p14_part_3, k8t4p14_part_4, k8t4p14_part_5, k8t4p14_part_6⟩ +def k8t4p15 : LayoutCertificate 8 where + chains := [[0, 1, 2, 3], [4, 5, 6, 7]] + clique := {0, 3, 4, 7} + templates := [⟨0, 1, [], [], [2, 3], 2, 5⟩, + ⟨0, 1, [[4, 5, 6, 7]], [], [2, 3], 1, 1⟩, + ⟨0, 5, [], [3, 2, 1], [6, 7], 1, 2⟩, + ⟨0, 6, [], [3, 2, 1], [5, 4], 1, 2⟩, + ⟨1, 2, [], [0], [3], 2, 5⟩, + ⟨1, 2, [[4, 5, 6, 7]], [0], [3], 1, 1⟩, + ⟨1, 4, [], [3, 2], [], 2, 5⟩, + ⟨1, 4, [], [3, 2], [5, 6, 7], 1, 2⟩, + ⟨1, 5, [], [0], [4], 2, 5⟩, + ⟨1, 5, [], [0], [6, 7], 1, 4⟩, + ⟨1, 6, [], [0], [5, 4], 1, 4⟩, + ⟨1, 6, [], [0], [7], 2, 5⟩, + ⟨1, 7, [], [3, 2], [], 2, 5⟩, + ⟨1, 7, [], [3, 2], [6, 5, 4], 1, 2⟩, + ⟨2, 3, [[4, 5, 6, 7]], [0, 1], [], 1, 1⟩, + ⟨2, 4, [], [0, 1], [5, 6, 7], 1, 2⟩, + ⟨2, 5, [], [0, 1], [4], 1, 4⟩, + ⟨2, 6, [], [0, 1], [5, 4], 1, 3⟩, + ⟨2, 6, [], [0, 1], [7], 1, 4⟩, + ⟨2, 7, [], [0, 1], [6, 5, 4], 1, 2⟩, + ⟨3, 5, [], [0, 1, 2], [6, 7], 1, 2⟩, + ⟨3, 6, [], [0, 1, 2], [5, 4], 1, 2⟩, + ⟨4, 5, [[0, 1, 2, 3]], [], [6, 7], 1, 1⟩, + ⟨5, 6, [], [4], [7], 2, 5⟩, + ⟨5, 6, [[0, 1, 2, 3]], [4], [7], 1, 1⟩, + ⟨6, 7, [[0, 1, 2, 3]], [4, 5], [], 1, 1⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 3), (2, 2), (5, 2), (6, 2)}⟩ + + +private def k8t4p15_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 5, ∅, ∅, ∅, {1, 2}, {1, 2}, ∅], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5], + #[∅, Finset.Icc 1 5, ∅, {1}, {1, 2}, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2}], + #[∅, ∅, {1}, ∅, ∅, {1, 2}, {1, 2}, ∅], + #[∅, Finset.Icc 1 5, {1, 2}, ∅, ∅, {1}, ∅, ∅], + #[{1, 2}, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2}, {1}, ∅, Finset.Icc 1 5, ∅], + #[{1, 2}, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2}, ∅, Finset.Icc 1 5, ∅, {1}], + #[∅, Finset.Icc 1 5, {1, 2}, ∅, ∅, ∅, {1}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t4p15_initial_eq_row_0 : ∀ j : Fin 8, (k8t4p15.initialMatrix 8) 0 j = k8t4p15_state_0 0 j := by decide + +private theorem k8t4p15_initial_eq_row_1 : ∀ j : Fin 8, (k8t4p15.initialMatrix 8) 1 j = k8t4p15_state_0 1 j := by decide + +private theorem k8t4p15_initial_eq_row_2 : ∀ j : Fin 8, (k8t4p15.initialMatrix 8) 2 j = k8t4p15_state_0 2 j := by decide + +private theorem k8t4p15_initial_eq_row_3 : ∀ j : Fin 8, (k8t4p15.initialMatrix 8) 3 j = k8t4p15_state_0 3 j := by decide + +private theorem k8t4p15_initial_eq_row_4 : ∀ j : Fin 8, (k8t4p15.initialMatrix 8) 4 j = k8t4p15_state_0 4 j := by decide + +private theorem k8t4p15_initial_eq_row_5 : ∀ j : Fin 8, (k8t4p15.initialMatrix 8) 5 j = k8t4p15_state_0 5 j := by decide + +private theorem k8t4p15_initial_eq_row_6 : ∀ j : Fin 8, (k8t4p15.initialMatrix 8) 6 j = k8t4p15_state_0 6 j := by decide + +private theorem k8t4p15_initial_eq_row_7 : ∀ j : Fin 8, (k8t4p15.initialMatrix 8) 7 j = k8t4p15_state_0 7 j := by decide + +private theorem k8t4p15_initial_eq : (k8t4p15.initialMatrix 8) = k8t4p15_state_0 := by + funext i j + fin_cases i + + · exact k8t4p15_initial_eq_row_0 j + + · exact k8t4p15_initial_eq_row_1 j + + · exact k8t4p15_initial_eq_row_2 j + + · exact k8t4p15_initial_eq_row_3 j + + · exact k8t4p15_initial_eq_row_4 j + + · exact k8t4p15_initial_eq_row_5 j + + · exact k8t4p15_initial_eq_row_6 j + + · exact k8t4p15_initial_eq_row_7 j + +private theorem k8t4p15_closure_0 : ClosureCheck k8t4p15.graph k8t4p15_state_0 8 4 [] := by trivial + +private theorem k8t4p15_matrix_eq : k8t4p15.matrix 8 = k8t4p15_state_0 := by + change closureMatrix (k8t4p15.initialMatrix 8) _ = _ + rw [k8t4p15_initial_eq] + change closureMatrix k8t4p15_state_0 [] = _ + rfl + +private theorem k8t4p15_part_0 : k8t4p15.chains.flatten = List.finRange _ := by decide + +private theorem k8t4p15_part_1 : k8t4p15.chains.map List.length = ([[2], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t4p15_part_2 : k8t4p15.chains.map (fun l => l.map (fun i => decide (i ∈ k8t4p15.clique))) = ([[2], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t4p15_templates_item_0 : (⟨0, 1, [], [], [2, 3], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_1 : (⟨0, 1, [[4, 5, 6, 7]], [], [2, 3], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_2 : (⟨0, 5, [], [3, 2, 1], [6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_3 : (⟨0, 6, [], [3, 2, 1], [5, 4], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_4 : (⟨1, 2, [], [0], [3], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_5 : (⟨1, 2, [[4, 5, 6, 7]], [0], [3], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_6 : (⟨1, 4, [], [3, 2], [], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_7 : (⟨1, 4, [], [3, 2], [5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_8 : (⟨1, 5, [], [0], [4], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_9 : (⟨1, 5, [], [0], [6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_10 : (⟨1, 6, [], [0], [5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_11 : (⟨1, 6, [], [0], [7], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_12 : (⟨1, 7, [], [3, 2], [], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_13 : (⟨1, 7, [], [3, 2], [6, 5, 4], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_14 : (⟨2, 3, [[4, 5, 6, 7]], [0, 1], [], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_15 : (⟨2, 4, [], [0, 1], [5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_16 : (⟨2, 5, [], [0, 1], [4], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_17 : (⟨2, 6, [], [0, 1], [5, 4], 1, 3⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_18 : (⟨2, 6, [], [0, 1], [7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_19 : (⟨2, 7, [], [0, 1], [6, 5, 4], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_20 : (⟨3, 5, [], [0, 1, 2], [6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_21 : (⟨3, 6, [], [0, 1, 2], [5, 4], 1, 2⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_22 : (⟨4, 5, [[0, 1, 2, 3]], [], [6, 7], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_23 : (⟨5, 6, [], [4], [7], 2, 5⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_24 : (⟨5, 6, [[0, 1, 2, 3]], [4], [7], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_templates_item_25 : (⟨6, 7, [[0, 1, 2, 3]], [4, 5], [], 1, 1⟩ : TemplateData (Fin 8)).Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t4p15_part_3 : ∀ T ∈ k8t4p15.templates, T.Check k8t4p15.graph k8t4p15.clique 8 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k8t4p15, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t4p15_templates_item_0, k8t4p15_templates_item_1, k8t4p15_templates_item_2, k8t4p15_templates_item_3, k8t4p15_templates_item_4, k8t4p15_templates_item_5, k8t4p15_templates_item_6, k8t4p15_templates_item_7, k8t4p15_templates_item_8, k8t4p15_templates_item_9, k8t4p15_templates_item_10, k8t4p15_templates_item_11, k8t4p15_templates_item_12, k8t4p15_templates_item_13, k8t4p15_templates_item_14, k8t4p15_templates_item_15, k8t4p15_templates_item_16, k8t4p15_templates_item_17, k8t4p15_templates_item_18, k8t4p15_templates_item_19, k8t4p15_templates_item_20, k8t4p15_templates_item_21, k8t4p15_templates_item_22, k8t4p15_templates_item_23, k8t4p15_templates_item_24, k8t4p15_templates_item_25⟩ + +private theorem k8t4p15_part_4 : ∀ p ∈ k8t4p15.required, p.Check k8t4p15.graph 8 := by decide + +private theorem k8t4p15_part_5 : ClosureCheck k8t4p15.graph (k8t4p15.initialMatrix 8) 8 4 k8t4p15.closure := by + rw [k8t4p15_initial_eq] + exact k8t4p15_closure_0 + +private theorem k8t4p15_part_6 : k8t4p15.bad.Check k8t4p15.graph (k8t4p15.matrix 8) 8 4 := by + rw [k8t4p15_matrix_eq] + decide + +theorem k8t4p15_check : k8t4p15.Check 8 4 [[2], [2]] := + ⟨k8t4p15_part_0, k8t4p15_part_1, k8t4p15_part_2, k8t4p15_part_3, k8t4p15_part_4, k8t4p15_part_5, k8t4p15_part_6⟩ +def k8t5p0 : LayoutCertificate 5 where + chains := [[0], [1], [2], [3], [4]] + clique := {0, 1, 2, 3, 4} + templates := [⟨0, 1, [], [], [], 1, 7⟩, + ⟨0, 2, [], [], [], 1, 7⟩, + ⟨0, 3, [], [], [], 1, 7⟩, + ⟨0, 4, [], [], [], 1, 7⟩, + ⟨1, 2, [], [], [], 1, 7⟩, + ⟨1, 3, [], [], [], 1, 7⟩, + ⟨1, 4, [], [], [], 1, 7⟩, + ⟨2, 3, [], [], [], 1, 7⟩, + ⟨2, 4, [], [], [], 1, 7⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k8t5p0_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p0_initial_eq_row_0 : ∀ j : Fin 5, (k8t5p0.initialMatrix 8) 0 j = k8t5p0_state_0 0 j := by decide + +private theorem k8t5p0_initial_eq_row_1 : ∀ j : Fin 5, (k8t5p0.initialMatrix 8) 1 j = k8t5p0_state_0 1 j := by decide + +private theorem k8t5p0_initial_eq_row_2 : ∀ j : Fin 5, (k8t5p0.initialMatrix 8) 2 j = k8t5p0_state_0 2 j := by decide + +private theorem k8t5p0_initial_eq_row_3 : ∀ j : Fin 5, (k8t5p0.initialMatrix 8) 3 j = k8t5p0_state_0 3 j := by decide + +private theorem k8t5p0_initial_eq_row_4 : ∀ j : Fin 5, (k8t5p0.initialMatrix 8) 4 j = k8t5p0_state_0 4 j := by decide + +private theorem k8t5p0_initial_eq : (k8t5p0.initialMatrix 8) = k8t5p0_state_0 := by + funext i j + fin_cases i + + · exact k8t5p0_initial_eq_row_0 j + + · exact k8t5p0_initial_eq_row_1 j + + · exact k8t5p0_initial_eq_row_2 j + + · exact k8t5p0_initial_eq_row_3 j + + · exact k8t5p0_initial_eq_row_4 j + +private theorem k8t5p0_closure_0 : ClosureCheck k8t5p0.graph k8t5p0_state_0 8 5 [] := by trivial + +private theorem k8t5p0_matrix_eq : k8t5p0.matrix 8 = k8t5p0_state_0 := by + change closureMatrix (k8t5p0.initialMatrix 8) _ = _ + rw [k8t5p0_initial_eq] + change closureMatrix k8t5p0_state_0 [] = _ + rfl + +private theorem k8t5p0_part_0 : k8t5p0.chains.flatten = List.finRange _ := by decide + +private theorem k8t5p0_part_1 : k8t5p0.chains.map List.length = ([[], [], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t5p0_part_2 : k8t5p0.chains.map (fun l => l.map (fun i => decide (i ∈ k8t5p0.clique))) = ([[], [], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k8t5p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 7⟩ : TemplateData (Fin 5)).Check k8t5p0.graph k8t5p0.clique 8 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 7⟩ : TemplateData (Fin 5)).Check k8t5p0.graph k8t5p0.clique 8 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 7⟩ : TemplateData (Fin 5)).Check k8t5p0.graph k8t5p0.clique 8 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p0_templates_item_3 : (⟨0, 4, [], [], [], 1, 7⟩ : TemplateData (Fin 5)).Check k8t5p0.graph k8t5p0.clique 8 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p0_templates_item_4 : (⟨1, 2, [], [], [], 1, 7⟩ : TemplateData (Fin 5)).Check k8t5p0.graph k8t5p0.clique 8 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p0_templates_item_5 : (⟨1, 3, [], [], [], 1, 7⟩ : TemplateData (Fin 5)).Check k8t5p0.graph k8t5p0.clique 8 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p0_templates_item_6 : (⟨1, 4, [], [], [], 1, 7⟩ : TemplateData (Fin 5)).Check k8t5p0.graph k8t5p0.clique 8 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p0_templates_item_7 : (⟨2, 3, [], [], [], 1, 7⟩ : TemplateData (Fin 5)).Check k8t5p0.graph k8t5p0.clique 8 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p0_templates_item_8 : (⟨2, 4, [], [], [], 1, 7⟩ : TemplateData (Fin 5)).Check k8t5p0.graph k8t5p0.clique 8 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p0_part_3 : ∀ T ∈ k8t5p0.templates, T.Check k8t5p0.graph k8t5p0.clique 8 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k8t5p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p0_templates_item_0, k8t5p0_templates_item_1, k8t5p0_templates_item_2, k8t5p0_templates_item_3, k8t5p0_templates_item_4, k8t5p0_templates_item_5, k8t5p0_templates_item_6, k8t5p0_templates_item_7, k8t5p0_templates_item_8⟩ + +private theorem k8t5p0_part_4 : ∀ p ∈ k8t5p0.required, p.Check k8t5p0.graph 8 := by decide + +private theorem k8t5p0_part_5 : ClosureCheck k8t5p0.graph (k8t5p0.initialMatrix 8) 8 5 k8t5p0.closure := by + rw [k8t5p0_initial_eq] + exact k8t5p0_closure_0 + +private theorem k8t5p0_part_6 : k8t5p0.bad.Check k8t5p0.graph (k8t5p0.matrix 8) 8 5 := by + rw [k8t5p0_matrix_eq] + decide + +theorem k8t5p0_check : k8t5p0.Check 8 5 [[], [], [], [], []] := + ⟨k8t5p0_part_0, k8t5p0_part_1, k8t5p0_part_2, k8t5p0_part_3, k8t5p0_part_4, k8t5p0_part_5, k8t5p0_part_6⟩ +def k8t5p1 : LayoutCertificate 6 where + chains := [[0], [1], [2], [3, 4, 5]] + clique := {0, 1, 2, 3, 5} + templates := [⟨0, 1, [], [], [], 2, 7⟩, + ⟨0, 1, [[3, 4, 5]], [], [], 1, 4⟩, + ⟨0, 2, [], [], [], 2, 7⟩, + ⟨0, 2, [[3, 4, 5]], [], [], 1, 4⟩, + ⟨0, 3, [], [], [], 2, 7⟩, + ⟨0, 3, [], [], [4, 5], 1, 5⟩, + ⟨0, 4, [], [], [3], 1, 6⟩, + ⟨0, 5, [], [], [], 2, 7⟩, + ⟨0, 5, [], [], [4, 3], 1, 5⟩, + ⟨1, 2, [], [], [], 2, 7⟩, + ⟨1, 2, [[3, 4, 5]], [], [], 1, 4⟩, + ⟨1, 3, [], [], [], 2, 7⟩, + ⟨1, 3, [], [], [4, 5], 1, 5⟩, + ⟨1, 4, [], [], [3], 1, 6⟩, + ⟨1, 5, [], [], [], 2, 7⟩, + ⟨1, 5, [], [], [4, 3], 1, 5⟩, + ⟨2, 3, [], [], [], 2, 7⟩, + ⟨2, 3, [], [], [4, 5], 1, 5⟩, + ⟨2, 4, [], [], [3], 1, 6⟩, + ⟨2, 5, [], [], [], 2, 7⟩, + ⟨2, 5, [], [], [4, 3], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k8t5p1_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p1_initial_eq_row_0 : ∀ j : Fin 6, (k8t5p1.initialMatrix 8) 0 j = k8t5p1_state_0 0 j := by decide + +private theorem k8t5p1_initial_eq_row_1 : ∀ j : Fin 6, (k8t5p1.initialMatrix 8) 1 j = k8t5p1_state_0 1 j := by decide + +private theorem k8t5p1_initial_eq_row_2 : ∀ j : Fin 6, (k8t5p1.initialMatrix 8) 2 j = k8t5p1_state_0 2 j := by decide + +private theorem k8t5p1_initial_eq_row_3 : ∀ j : Fin 6, (k8t5p1.initialMatrix 8) 3 j = k8t5p1_state_0 3 j := by decide + +private theorem k8t5p1_initial_eq_row_4 : ∀ j : Fin 6, (k8t5p1.initialMatrix 8) 4 j = k8t5p1_state_0 4 j := by decide + +private theorem k8t5p1_initial_eq_row_5 : ∀ j : Fin 6, (k8t5p1.initialMatrix 8) 5 j = k8t5p1_state_0 5 j := by decide + +private theorem k8t5p1_initial_eq : (k8t5p1.initialMatrix 8) = k8t5p1_state_0 := by + funext i j + fin_cases i + + · exact k8t5p1_initial_eq_row_0 j + + · exact k8t5p1_initial_eq_row_1 j + + · exact k8t5p1_initial_eq_row_2 j + + · exact k8t5p1_initial_eq_row_3 j + + · exact k8t5p1_initial_eq_row_4 j + + · exact k8t5p1_initial_eq_row_5 j + +private theorem k8t5p1_closure_0 : ClosureCheck k8t5p1.graph k8t5p1_state_0 8 5 [] := by trivial + +private theorem k8t5p1_matrix_eq : k8t5p1.matrix 8 = k8t5p1_state_0 := by + change closureMatrix (k8t5p1.initialMatrix 8) _ = _ + rw [k8t5p1_initial_eq] + change closureMatrix k8t5p1_state_0 [] = _ + rfl + +private theorem k8t5p1_part_0 : k8t5p1.chains.flatten = List.finRange _ := by decide + +private theorem k8t5p1_part_1 : k8t5p1.chains.map List.length = ([[], [], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t5p1_part_2 : k8t5p1.chains.map (fun l => l.map (fun i => decide (i ∈ k8t5p1.clique))) = ([[], [], [], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t5p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 7⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_1 : (⟨0, 1, [[3, 4, 5]], [], [], 1, 4⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_2 : (⟨0, 2, [], [], [], 2, 7⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_3 : (⟨0, 2, [[3, 4, 5]], [], [], 1, 4⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_4 : (⟨0, 3, [], [], [], 2, 7⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_5 : (⟨0, 3, [], [], [4, 5], 1, 5⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_6 : (⟨0, 4, [], [], [3], 1, 6⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_7 : (⟨0, 5, [], [], [], 2, 7⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_8 : (⟨0, 5, [], [], [4, 3], 1, 5⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_9 : (⟨1, 2, [], [], [], 2, 7⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_10 : (⟨1, 2, [[3, 4, 5]], [], [], 1, 4⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_11 : (⟨1, 3, [], [], [], 2, 7⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_12 : (⟨1, 3, [], [], [4, 5], 1, 5⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_13 : (⟨1, 4, [], [], [3], 1, 6⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_14 : (⟨1, 5, [], [], [], 2, 7⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_15 : (⟨1, 5, [], [], [4, 3], 1, 5⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_16 : (⟨2, 3, [], [], [], 2, 7⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_17 : (⟨2, 3, [], [], [4, 5], 1, 5⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_18 : (⟨2, 4, [], [], [3], 1, 6⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_19 : (⟨2, 5, [], [], [], 2, 7⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_templates_item_20 : (⟨2, 5, [], [], [4, 3], 1, 5⟩ : TemplateData (Fin 6)).Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p1_part_3 : ∀ T ∈ k8t5p1.templates, T.Check k8t5p1.graph k8t5p1.clique 8 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k8t5p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p1_templates_item_0, k8t5p1_templates_item_1, k8t5p1_templates_item_2, k8t5p1_templates_item_3, k8t5p1_templates_item_4, k8t5p1_templates_item_5, k8t5p1_templates_item_6, k8t5p1_templates_item_7, k8t5p1_templates_item_8, k8t5p1_templates_item_9, k8t5p1_templates_item_10, k8t5p1_templates_item_11, k8t5p1_templates_item_12, k8t5p1_templates_item_13, k8t5p1_templates_item_14, k8t5p1_templates_item_15, k8t5p1_templates_item_16, k8t5p1_templates_item_17, k8t5p1_templates_item_18, k8t5p1_templates_item_19, k8t5p1_templates_item_20⟩ + +private theorem k8t5p1_part_4 : ∀ p ∈ k8t5p1.required, p.Check k8t5p1.graph 8 := by decide + +private theorem k8t5p1_part_5 : ClosureCheck k8t5p1.graph (k8t5p1.initialMatrix 8) 8 5 k8t5p1.closure := by + rw [k8t5p1_initial_eq] + exact k8t5p1_closure_0 + +private theorem k8t5p1_part_6 : k8t5p1.bad.Check k8t5p1.graph (k8t5p1.matrix 8) 8 5 := by + rw [k8t5p1_matrix_eq] + decide + +theorem k8t5p1_check : k8t5p1.Check 8 5 [[], [], [], [1]] := + ⟨k8t5p1_part_0, k8t5p1_part_1, k8t5p1_part_2, k8t5p1_part_3, k8t5p1_part_4, k8t5p1_part_5, k8t5p1_part_6⟩ +def k8t5p2 : LayoutCertificate 7 where + chains := [[0], [1], [2], [3, 4, 5, 6]] + clique := {0, 1, 2, 3, 6} + templates := [⟨0, 1, [], [], [], 3, 7⟩, + ⟨0, 1, [[3, 4, 5, 6]], [], [], 1, 3⟩, + ⟨0, 2, [], [], [], 3, 7⟩, + ⟨0, 2, [[3, 4, 5, 6]], [], [], 1, 3⟩, + ⟨0, 3, [], [], [4, 5, 6], 1, 4⟩, + ⟨0, 4, [], [], [3], 2, 6⟩, + ⟨0, 4, [], [], [5, 6], 1, 5⟩, + ⟨0, 5, [], [], [4, 3], 1, 5⟩, + ⟨0, 6, [], [], [5, 4, 3], 1, 4⟩, + ⟨1, 2, [], [], [], 3, 7⟩, + ⟨1, 2, [[3, 4, 5, 6]], [], [], 1, 3⟩, + ⟨1, 3, [], [], [4, 5, 6], 1, 4⟩, + ⟨1, 4, [], [], [3], 2, 6⟩, + ⟨1, 4, [], [], [5, 6], 1, 5⟩, + ⟨1, 5, [], [], [4, 3], 1, 5⟩, + ⟨1, 6, [], [], [5, 4, 3], 1, 4⟩, + ⟨2, 3, [], [], [4, 5, 6], 1, 4⟩, + ⟨2, 4, [], [], [3], 2, 6⟩, + ⟨2, 4, [], [], [5, 6], 1, 5⟩, + ⟨2, 5, [], [], [4, 3], 1, 5⟩, + ⟨2, 6, [], [], [5, 4, 3], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k8t5p2_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p2_initial_eq_row_0 : ∀ j : Fin 7, (k8t5p2.initialMatrix 8) 0 j = k8t5p2_state_0 0 j := by decide + +private theorem k8t5p2_initial_eq_row_1 : ∀ j : Fin 7, (k8t5p2.initialMatrix 8) 1 j = k8t5p2_state_0 1 j := by decide + +private theorem k8t5p2_initial_eq_row_2 : ∀ j : Fin 7, (k8t5p2.initialMatrix 8) 2 j = k8t5p2_state_0 2 j := by decide + +private theorem k8t5p2_initial_eq_row_3 : ∀ j : Fin 7, (k8t5p2.initialMatrix 8) 3 j = k8t5p2_state_0 3 j := by decide + +private theorem k8t5p2_initial_eq_row_4 : ∀ j : Fin 7, (k8t5p2.initialMatrix 8) 4 j = k8t5p2_state_0 4 j := by decide + +private theorem k8t5p2_initial_eq_row_5 : ∀ j : Fin 7, (k8t5p2.initialMatrix 8) 5 j = k8t5p2_state_0 5 j := by decide + +private theorem k8t5p2_initial_eq_row_6 : ∀ j : Fin 7, (k8t5p2.initialMatrix 8) 6 j = k8t5p2_state_0 6 j := by decide + +private theorem k8t5p2_initial_eq : (k8t5p2.initialMatrix 8) = k8t5p2_state_0 := by + funext i j + fin_cases i + + · exact k8t5p2_initial_eq_row_0 j + + · exact k8t5p2_initial_eq_row_1 j + + · exact k8t5p2_initial_eq_row_2 j + + · exact k8t5p2_initial_eq_row_3 j + + · exact k8t5p2_initial_eq_row_4 j + + · exact k8t5p2_initial_eq_row_5 j + + · exact k8t5p2_initial_eq_row_6 j + +private theorem k8t5p2_closure_0 : ClosureCheck k8t5p2.graph k8t5p2_state_0 8 5 [] := by trivial + +private theorem k8t5p2_matrix_eq : k8t5p2.matrix 8 = k8t5p2_state_0 := by + change closureMatrix (k8t5p2.initialMatrix 8) _ = _ + rw [k8t5p2_initial_eq] + change closureMatrix k8t5p2_state_0 [] = _ + rfl + +private theorem k8t5p2_part_0 : k8t5p2.chains.flatten = List.finRange _ := by decide + +private theorem k8t5p2_part_1 : k8t5p2.chains.map List.length = ([[], [], [], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t5p2_part_2 : k8t5p2.chains.map (fun l => l.map (fun i => decide (i ∈ k8t5p2.clique))) = ([[], [], [], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t5p2_templates_item_0 : (⟨0, 1, [], [], [], 3, 7⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6]], [], [], 1, 3⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_2 : (⟨0, 2, [], [], [], 3, 7⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_3 : (⟨0, 2, [[3, 4, 5, 6]], [], [], 1, 3⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_4 : (⟨0, 3, [], [], [4, 5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_5 : (⟨0, 4, [], [], [3], 2, 6⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_6 : (⟨0, 4, [], [], [5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_7 : (⟨0, 5, [], [], [4, 3], 1, 5⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_8 : (⟨0, 6, [], [], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_9 : (⟨1, 2, [], [], [], 3, 7⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_10 : (⟨1, 2, [[3, 4, 5, 6]], [], [], 1, 3⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_11 : (⟨1, 3, [], [], [4, 5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_12 : (⟨1, 4, [], [], [3], 2, 6⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_13 : (⟨1, 4, [], [], [5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_14 : (⟨1, 5, [], [], [4, 3], 1, 5⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_15 : (⟨1, 6, [], [], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_16 : (⟨2, 3, [], [], [4, 5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_17 : (⟨2, 4, [], [], [3], 2, 6⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_18 : (⟨2, 4, [], [], [5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_19 : (⟨2, 5, [], [], [4, 3], 1, 5⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_templates_item_20 : (⟨2, 6, [], [], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 7)).Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p2_part_3 : ∀ T ∈ k8t5p2.templates, T.Check k8t5p2.graph k8t5p2.clique 8 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k8t5p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p2_templates_item_0, k8t5p2_templates_item_1, k8t5p2_templates_item_2, k8t5p2_templates_item_3, k8t5p2_templates_item_4, k8t5p2_templates_item_5, k8t5p2_templates_item_6, k8t5p2_templates_item_7, k8t5p2_templates_item_8, k8t5p2_templates_item_9, k8t5p2_templates_item_10, k8t5p2_templates_item_11, k8t5p2_templates_item_12, k8t5p2_templates_item_13, k8t5p2_templates_item_14, k8t5p2_templates_item_15, k8t5p2_templates_item_16, k8t5p2_templates_item_17, k8t5p2_templates_item_18, k8t5p2_templates_item_19, k8t5p2_templates_item_20⟩ + +private theorem k8t5p2_part_4 : ∀ p ∈ k8t5p2.required, p.Check k8t5p2.graph 8 := by decide + +private theorem k8t5p2_part_5 : ClosureCheck k8t5p2.graph (k8t5p2.initialMatrix 8) 8 5 k8t5p2.closure := by + rw [k8t5p2_initial_eq] + exact k8t5p2_closure_0 + +private theorem k8t5p2_part_6 : k8t5p2.bad.Check k8t5p2.graph (k8t5p2.matrix 8) 8 5 := by + rw [k8t5p2_matrix_eq] + decide + +theorem k8t5p2_check : k8t5p2.Check 8 5 [[], [], [], [2]] := + ⟨k8t5p2_part_0, k8t5p2_part_1, k8t5p2_part_2, k8t5p2_part_3, k8t5p2_part_4, k8t5p2_part_5, k8t5p2_part_6⟩ +private def k8t5p3_step_0_data : EdgeAttachmentData 8 := ⟨4, 0, [⟨0, 5, [4, 3, 1, 2, 7, 6]⟩, ⟨0, 1, [4, 3, 2, 7]⟩, ⟨1, 5, [0, 4, 3, 2, 7, 6]⟩, ⟨3, 7, [1, 0, 4, 5, 6]⟩, ⟨3, 6, [1, 2, 0, 4, 5]⟩, ⟨3, 7, [1, 2, 0, 4, 5, 6]⟩, ⟨3, 6, [1, 2, 7, 0, 4, 5]⟩, ⟨3, 5, [4, 0, 1, 2, 7, 6]⟩], ⟨none, {(0, 3), (3, 3), (1, 3)}⟩⟩ + +private def k8t5p3_step_0 : ClosureStep 8 := .edge k8t5p3_step_0_data + +private def k8t5p3_step_1_data : EdgeAttachmentData 8 := ⟨4, 1, [⟨0, 5, [1, 4, 3, 2, 7, 6]⟩, ⟨1, 5, [4, 3, 0, 2, 7, 6]⟩, ⟨1, 0, [4, 3, 2, 7]⟩, ⟨3, 7, [0, 1, 4, 5, 6]⟩, ⟨3, 6, [0, 2, 1, 4, 5]⟩, ⟨3, 7, [0, 2, 1, 4, 5, 6]⟩, ⟨3, 6, [0, 2, 7, 1, 4, 5]⟩, ⟨3, 5, [4, 1, 0, 2, 7, 6]⟩], ⟨none, {(1, 3), (3, 3), (0, 3)}⟩⟩ + +private def k8t5p3_step_1 : ClosureStep 8 := .edge k8t5p3_step_1_data + +private def k8t5p3_step_2_data : EdgeAttachmentData 8 := ⟨4, 2, [⟨0, 5, [1, 2, 4, 3, 7, 6]⟩, ⟨2, 5, [4, 3, 0, 1, 7, 6]⟩, ⟨2, 0, [4, 3, 1, 7]⟩, ⟨3, 6, [0, 1, 2, 4, 5]⟩, ⟨3, 7, [0, 1, 2, 4, 5, 6]⟩, ⟨3, 6, [0, 1, 7, 2, 4, 5]⟩, ⟨3, 7, [0, 2, 4, 5, 6]⟩, ⟨3, 5, [4, 2, 0, 1, 7, 6]⟩], ⟨none, {(2, 3), (3, 3), (0, 3)}⟩⟩ + +private def k8t5p3_step_2 : ClosureStep 8 := .edge k8t5p3_step_2_data + +private def k8t5p3_step_3_data : EdgeAttachmentData 8 := ⟨5, 0, [⟨0, 2, [5, 4, 3, 1]⟩, ⟨0, 1, [5, 4, 3, 2]⟩, ⟨1, 2, [0, 5, 4, 3]⟩], ⟨none, {(0, 3), (1, 3), (2, 3)}⟩⟩ + +private def k8t5p3_step_3 : ClosureStep 8 := .edge k8t5p3_step_3_data + +private def k8t5p3_step_4_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨5, 0, [4, 1, 2, 3, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 2, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 8, 7, 6]⟩, ⟨5, 3, [4, 1, 0, 6, 7, 8, 2]⟩, ⟨5, 2, [4, 1, 0, 6, 7, 8, 3]⟩, ⟨5, 0, [4, 2, 1]⟩, ⟨5, 8, [4, 2, 1, 0, 6, 7]⟩, ⟨5, 0, [4, 2, 3, 1]⟩, ⟨5, 7, [4, 2, 3, 1, 0, 6]⟩, ⟨5, 8, [4, 2, 3, 1, 0, 6, 7]⟩, ⟨5, 7, [4, 2, 3, 8, 1, 0, 6]⟩, ⟨5, 1, [4, 2, 3, 8, 7, 6, 0]⟩] + +private def k8t5p3_step_4_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨7, 0, [6, 5, 4, 1]⟩, ⟨7, 0, [6, 5, 4, 2, 1]⟩, ⟨7, 0, [6, 5, 4, 2, 3, 1]⟩, ⟨7, 0, [6, 5, 4, 2, 3, 8, 1]⟩, ⟨7, 5, [6, 0, 1, 2, 3, 4]⟩, ⟨7, 4, [6, 0, 1, 2, 3, 8]⟩, ⟨7, 5, [6, 0, 1, 2, 3, 8, 4]⟩, ⟨7, 3, [8, 1, 0, 6, 5, 4, 2]⟩, ⟨7, 2, [8, 1, 0, 6, 5, 4, 3]⟩, ⟨7, 0, [8, 2, 1]⟩, ⟨7, 4, [8, 2, 3, 1, 0, 6, 5]⟩, ⟨7, 1, [8, 2, 3, 4, 5, 6, 0]⟩] + +private def k8t5p3_step_4_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 7, [1, 2, 3, 4, 5, 6]⟩, ⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 6, [1, 2, 3, 4, 8, 7]⟩, ⟨0, 5, [1, 2, 3, 4, 8, 7, 6]⟩, ⟨0, 7, [1, 2, 3, 8, 4, 5, 6]⟩, ⟨0, 5, [1, 2, 3, 8, 7, 6]⟩, ⟨0, 4, [1, 2, 3, 8, 7, 6, 5]⟩, ⟨0, 8, [1, 2, 4, 5, 6, 7]⟩, ⟨0, 3, [1, 2, 4, 5, 6, 7, 8]⟩, ⟨0, 4, [1, 2, 8, 7, 6, 5]⟩, ⟨0, 2, [1, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 2, [1, 4, 5, 6, 7, 8]⟩] + +private def k8t5p3_step_4_required_block_3 : List (RequiredPathData (Fin 9)) := [⟨0, 3, [1, 4, 5, 6, 7, 8]⟩, ⟨0, 1, [6, 5, 4, 2, 3, 8]⟩] + +private def k8t5p3_step_4_data : FreshAttachmentData 8 := ⟨5, 0, k8t5p3_step_4_required_block_0 ++ k8t5p3_step_4_required_block_1 ++ k8t5p3_step_4_required_block_2 ++ k8t5p3_step_4_required_block_3, ⟨none, {(5, 2), (7, 2), (0, 2)}⟩⟩ + +private def k8t5p3_step_4 : ClosureStep 8 := .fresh k8t5p3_step_4_data + +private def k8t5p3_step_5_data : EdgeAttachmentData 8 := ⟨5, 1, [⟨0, 2, [1, 5, 4, 3]⟩, ⟨0, 1, [2, 3, 4, 5]⟩, ⟨1, 2, [5, 4, 3, 0]⟩], ⟨none, {(0, 3), (1, 3), (2, 3)}⟩⟩ + +private def k8t5p3_step_5 : ClosureStep 8 := .edge k8t5p3_step_5_data + +private def k8t5p3_step_6_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨5, 0, [4, 1, 2, 3, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 2, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 2]⟩, ⟨5, 8, [4, 1, 2, 0, 6, 7]⟩, ⟨5, 3, [4, 1, 2, 0, 6, 7, 8]⟩, ⟨5, 0, [4, 1, 3, 2]⟩, ⟨5, 7, [4, 1, 3, 2, 0, 6]⟩, ⟨5, 8, [4, 1, 3, 2, 0, 6, 7]⟩, ⟨5, 0, [4, 1, 3, 8, 2]⟩, ⟨5, 7, [4, 1, 3, 8, 2, 0, 6]⟩, ⟨5, 2, [4, 1, 3, 8, 7, 6, 0]⟩, ⟨5, 1, [4, 2, 0, 6, 7, 8, 3]⟩] + +private def k8t5p3_step_6_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨7, 0, [6, 5, 4, 1, 2]⟩, ⟨7, 0, [6, 5, 4, 1, 3, 2]⟩, ⟨7, 0, [6, 5, 4, 1, 3, 8, 2]⟩, ⟨7, 0, [6, 5, 4, 2]⟩, ⟨7, 5, [6, 0, 2, 1, 3, 4]⟩, ⟨7, 4, [6, 0, 2, 1, 3, 8]⟩, ⟨7, 5, [6, 0, 2, 1, 3, 8, 4]⟩, ⟨7, 0, [8, 1, 2]⟩, ⟨7, 3, [8, 1, 2, 0, 6, 5, 4]⟩, ⟨7, 4, [8, 1, 3, 2, 0, 6, 5]⟩, ⟨7, 2, [8, 1, 3, 4, 5, 6, 0]⟩, ⟨7, 1, [8, 2, 0, 6, 5, 4, 3]⟩] + +private def k8t5p3_step_6_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 7, [2, 1, 3, 4, 5, 6]⟩, ⟨0, 8, [2, 1, 3, 4, 5, 6, 7]⟩, ⟨0, 6, [2, 1, 3, 4, 8, 7]⟩, ⟨0, 5, [2, 1, 3, 4, 8, 7, 6]⟩, ⟨0, 7, [2, 1, 3, 8, 4, 5, 6]⟩, ⟨0, 5, [2, 1, 3, 8, 7, 6]⟩, ⟨0, 4, [2, 1, 3, 8, 7, 6, 5]⟩, ⟨0, 8, [2, 1, 4, 5, 6, 7]⟩, ⟨0, 3, [2, 1, 4, 5, 6, 7, 8]⟩, ⟨0, 4, [2, 1, 8, 7, 6, 5]⟩, ⟨0, 1, [2, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 1, [2, 4, 5, 6, 7, 8]⟩] + +private def k8t5p3_step_6_required_block_3 : List (RequiredPathData (Fin 9)) := [⟨0, 3, [2, 4, 5, 6, 7, 8]⟩, ⟨0, 2, [6, 5, 4, 1, 3, 8]⟩] + +private def k8t5p3_step_6_data : FreshAttachmentData 8 := ⟨5, 1, k8t5p3_step_6_required_block_0 ++ k8t5p3_step_6_required_block_1 ++ k8t5p3_step_6_required_block_2 ++ k8t5p3_step_6_required_block_3, ⟨none, {(5, 2), (7, 2), (0, 2)}⟩⟩ + +private def k8t5p3_step_6 : ClosureStep 8 := .fresh k8t5p3_step_6_data + +private def k8t5p3_step_7_data : EdgeAttachmentData 8 := ⟨5, 2, [⟨0, 2, [1, 3, 4, 5]⟩, ⟨0, 1, [2, 5, 4, 3]⟩, ⟨1, 2, [0, 3, 4, 5]⟩], ⟨none, {(0, 3), (1, 3), (2, 3)}⟩⟩ + +private def k8t5p3_step_7 : ClosureStep 8 := .edge k8t5p3_step_7_data + +private def k8t5p3_step_8_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨5, 0, [4, 1, 2, 3, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 2, 3]⟩, ⟨5, 7, [4, 1, 2, 3, 0, 6]⟩, ⟨5, 8, [4, 1, 2, 3, 0, 6, 7]⟩, ⟨5, 0, [4, 1, 2, 8, 3]⟩, ⟨5, 7, [4, 1, 2, 8, 3, 0, 6]⟩, ⟨5, 0, [4, 1, 2, 8, 7, 6]⟩, ⟨5, 3, [4, 1, 2, 8, 7, 6, 0]⟩, ⟨5, 0, [4, 1, 3]⟩, ⟨5, 8, [4, 1, 3, 0, 6, 7]⟩, ⟨5, 2, [4, 1, 3, 0, 6, 7, 8]⟩, ⟨5, 1, [4, 2, 3, 0, 6, 7, 8]⟩] + +private def k8t5p3_step_8_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨7, 0, [6, 5, 4, 1, 2, 3]⟩, ⟨7, 0, [6, 5, 4, 1, 2, 8, 3]⟩, ⟨7, 0, [6, 5, 4, 1, 3]⟩, ⟨7, 0, [6, 5, 4, 3]⟩, ⟨7, 5, [6, 0, 3, 1, 2, 4]⟩, ⟨7, 4, [6, 0, 3, 1, 2, 8]⟩, ⟨7, 5, [6, 0, 3, 1, 2, 8, 4]⟩, ⟨7, 4, [8, 1, 2, 3, 0, 6, 5]⟩, ⟨7, 3, [8, 1, 2, 4, 5, 6, 0]⟩, ⟨7, 0, [8, 1, 3]⟩, ⟨7, 2, [8, 1, 3, 0, 6, 5, 4]⟩, ⟨7, 1, [8, 2, 3, 0, 6, 5, 4]⟩] + +private def k8t5p3_step_8_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 7, [3, 1, 2, 4, 5, 6]⟩, ⟨0, 8, [3, 1, 2, 4, 5, 6, 7]⟩, ⟨0, 6, [3, 1, 2, 4, 8, 7]⟩, ⟨0, 5, [3, 1, 2, 4, 8, 7, 6]⟩, ⟨0, 7, [3, 1, 2, 8, 4, 5, 6]⟩, ⟨0, 5, [3, 1, 2, 8, 7, 6]⟩, ⟨0, 4, [3, 1, 2, 8, 7, 6, 5]⟩, ⟨0, 8, [3, 1, 4, 5, 6, 7]⟩, ⟨0, 2, [3, 1, 4, 5, 6, 7, 8]⟩, ⟨0, 4, [3, 1, 8, 7, 6, 5]⟩, ⟨0, 1, [3, 2, 4, 5, 6, 7, 8]⟩, ⟨0, 1, [3, 4, 5, 6, 7, 8]⟩] + +private def k8t5p3_step_8_required_block_3 : List (RequiredPathData (Fin 9)) := [⟨0, 2, [3, 4, 5, 6, 7, 8]⟩, ⟨0, 3, [6, 5, 4, 1, 2, 8]⟩] + +private def k8t5p3_step_8_data : FreshAttachmentData 8 := ⟨5, 2, k8t5p3_step_8_required_block_0 ++ k8t5p3_step_8_required_block_1 ++ k8t5p3_step_8_required_block_2 ++ k8t5p3_step_8_required_block_3, ⟨none, {(5, 2), (7, 2), (0, 2)}⟩⟩ + +private def k8t5p3_step_8 : ClosureStep 8 := .fresh k8t5p3_step_8_data + +private def k8t5p3_step_9_data : EdgeAttachmentData 8 := ⟨5, 3, [⟨0, 1, [3, 5, 6, 7]⟩, ⟨0, 2, [3, 5, 6, 7]⟩, ⟨1, 2, [3, 5, 6, 7]⟩], ⟨none, {(0, 3), (1, 3), (2, 3)}⟩⟩ + +private def k8t5p3_step_9 : ClosureStep 8 := .edge k8t5p3_step_9_data + +private def k8t5p3_step_10_data : FreshAttachmentData 8 := ⟨5, 3, [⟨1, 0, [2, 3, 4, 5, 6]⟩, ⟨1, 0, [2, 3, 4, 8, 7, 6]⟩, ⟨1, 0, [2, 3, 8, 7, 6, 5, 4]⟩, ⟨1, 5, [2, 3, 8, 7, 6, 0, 4]⟩, ⟨5, 0, [4, 1, 2, 3, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 2, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 8, 7, 6]⟩, ⟨5, 0, [4, 8, 7, 6]⟩, ⟨5, 3, [4, 0, 6, 7, 8, 1, 2]⟩, ⟨5, 2, [4, 0, 6, 7, 8, 1, 3]⟩, ⟨5, 1, [4, 0, 6, 7, 8, 2, 3]⟩, ⟨5, 8, [6, 0, 4, 1, 2, 3]⟩, ⟨5, 7, [6, 0, 4, 1, 2, 3, 8]⟩, ⟨5, 7, [6, 0, 4, 1, 2, 8]⟩, ⟨7, 0, [6, 5, 4]⟩, ⟨7, 0, [8, 1, 2, 3, 4, 5, 6]⟩, ⟨7, 0, [8, 1, 2, 3, 4]⟩, ⟨7, 5, [8, 1, 2, 3, 4, 0, 6]⟩, ⟨7, 0, [8, 1, 2, 4, 5, 6]⟩, ⟨7, 0, [8, 1, 2, 4]⟩, ⟨7, 5, [8, 1, 2, 4, 0, 6]⟩, ⟨0, 5, [4, 1, 2, 3, 8, 7, 6]⟩, ⟨0, 1, [4, 2, 3]⟩, ⟨0, 1, [4, 2, 3, 8]⟩, ⟨0, 1, [4, 5, 6, 7, 8]⟩, ⟨0, 3, [4, 5, 6, 7, 8, 1, 2]⟩, ⟨0, 2, [4, 5, 6, 7, 8, 1, 3]⟩, ⟨0, 1, [4, 5, 6, 7, 8, 2]⟩, ⟨0, 1, [4, 5, 6, 7, 8, 2, 3]⟩, ⟨0, 7, [6, 5, 4, 1, 2, 3, 8]⟩], ⟨none, {(7, 3), (5, 2), (0, 1), (1, 3)}⟩⟩ + +private def k8t5p3_step_10 : ClosureStep 8 := .fresh k8t5p3_step_10_data + +private def k8t5p3_step_11_data : EdgeAttachmentData 8 := ⟨6, 0, [⟨0, 1, [6, 5, 4, 3]⟩, ⟨0, 5, [6, 7, 1, 2, 3, 4]⟩, ⟨1, 5, [0, 6, 7, 2, 3, 4]⟩, ⟨7, 3, [1, 0, 6, 5, 4]⟩, ⟨7, 4, [1, 2, 0, 6, 5]⟩, ⟨7, 3, [1, 2, 0, 6, 5, 4]⟩, ⟨7, 4, [1, 2, 3, 0, 6, 5]⟩, ⟨7, 5, [6, 0, 1, 2, 3, 4]⟩], ⟨none, {(0, 3), (7, 3), (1, 3)}⟩⟩ + +private def k8t5p3_step_11 : ClosureStep 8 := .edge k8t5p3_step_11_data + +private def k8t5p3_step_12_data : EdgeAttachmentData 8 := ⟨6, 1, [⟨0, 5, [1, 6, 7, 2, 3, 4]⟩, ⟨1, 0, [6, 5, 4, 3]⟩, ⟨1, 5, [6, 7, 0, 2, 3, 4]⟩, ⟨7, 3, [0, 1, 6, 5, 4]⟩, ⟨7, 4, [0, 2, 1, 6, 5]⟩, ⟨7, 3, [0, 2, 1, 6, 5, 4]⟩, ⟨7, 4, [0, 2, 3, 1, 6, 5]⟩, ⟨7, 5, [6, 1, 0, 2, 3, 4]⟩], ⟨none, {(1, 3), (7, 3), (0, 3)}⟩⟩ + +private def k8t5p3_step_12 : ClosureStep 8 := .edge k8t5p3_step_12_data + +private def k8t5p3_step_13_data : EdgeAttachmentData 8 := ⟨6, 2, [⟨0, 5, [1, 2, 6, 7, 3, 4]⟩, ⟨2, 0, [6, 5, 4, 3]⟩, ⟨2, 5, [6, 7, 0, 1, 3, 4]⟩, ⟨7, 4, [0, 1, 2, 6, 5]⟩, ⟨7, 3, [0, 1, 2, 6, 5, 4]⟩, ⟨7, 4, [0, 1, 3, 2, 6, 5]⟩, ⟨7, 3, [0, 2, 6, 5, 4]⟩, ⟨7, 5, [6, 2, 0, 1, 3, 4]⟩], ⟨none, {(2, 3), (7, 3), (0, 3)}⟩⟩ + +private def k8t5p3_step_13 : ClosureStep 8 := .edge k8t5p3_step_13_data + +private def k8t5p3_step_14_data : EdgeAttachmentData 8 := ⟨6, 3, [⟨0, 5, [1, 2, 7, 6, 3, 4]⟩, ⟨0, 2, [1, 3, 6, 7]⟩, ⟨0, 1, [2, 3, 6, 7]⟩, ⟨1, 5, [0, 2, 7, 6, 3, 4]⟩, ⟨1, 2, [0, 3, 6, 7]⟩, ⟨2, 5, [0, 1, 7, 6, 3, 4]⟩], ⟨none, {(0, 3), (1, 3), (2, 3)}⟩⟩ + +private def k8t5p3_step_14 : ClosureStep 8 := .edge k8t5p3_step_14_data + +private def k8t5p3_step_15_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨1, 0, [2, 3, 4, 5, 6, 7]⟩, ⟨1, 0, [2, 3, 4, 8, 7]⟩, ⟨1, 0, [2, 3, 8, 4, 5, 6, 7]⟩, ⟨1, 6, [2, 3, 8, 4, 0, 7]⟩, ⟨1, 5, [2, 3, 8, 4, 0, 7, 6]⟩, ⟨1, 6, [2, 3, 8, 7, 0, 4, 5]⟩, ⟨8, 0, [1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [1, 2, 3, 4]⟩, ⟨8, 6, [1, 2, 3, 4, 0, 7]⟩, ⟨8, 5, [1, 2, 3, 4, 0, 7, 6]⟩, ⟨8, 0, [1, 2, 4, 5, 6, 7]⟩, ⟨8, 0, [1, 2, 4]⟩] + +private def k8t5p3_step_15_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨8, 5, [1, 2, 4, 0, 7, 6]⟩, ⟨8, 0, [1, 4, 5, 6, 7]⟩, ⟨8, 0, [1, 4]⟩, ⟨8, 5, [1, 4, 0, 7, 6]⟩, ⟨0, 6, [4, 1, 2, 3, 8, 7]⟩, ⟨0, 5, [4, 1, 2, 3, 8, 7, 6]⟩, ⟨0, 5, [4, 1, 2, 8, 7, 6]⟩, ⟨0, 1, [4, 2]⟩, ⟨0, 1, [4, 2, 3]⟩, ⟨0, 1, [4, 2, 3, 8]⟩, ⟨0, 1, [4, 5, 6, 7, 8]⟩, ⟨0, 2, [4, 5, 6, 7, 8, 1]⟩] + +private def k8t5p3_step_15_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 3, [4, 5, 6, 7, 8, 1, 2]⟩, ⟨0, 3, [4, 5, 6, 7, 8, 1]⟩, ⟨0, 2, [4, 5, 6, 7, 8, 1, 3]⟩, ⟨0, 1, [4, 5, 6, 7, 8, 2]⟩, ⟨0, 1, [4, 5, 6, 7, 8, 2, 3]⟩, ⟨0, 8, [7, 6, 5, 4, 1, 2, 3]⟩, ⟨0, 8, [7, 6, 5, 4, 1, 2]⟩, ⟨0, 6, [7, 8, 1, 2, 3, 4, 5]⟩] + +private def k8t5p3_step_15_data : FreshAttachmentData 8 := ⟨6, 3, k8t5p3_step_15_required_block_0 ++ k8t5p3_step_15_required_block_1 ++ k8t5p3_step_15_required_block_2, ⟨none, {(8, 3), (0, 2), (1, 3)}⟩⟩ + +private def k8t5p3_step_15 : ClosureStep 8 := .fresh k8t5p3_step_15_data + +private def k8t5p3_step_16_data : EdgeAttachmentData 8 := ⟨6, 4, [⟨0, 5, [1, 2, 3, 7, 6, 4]⟩, ⟨0, 1, [3, 4, 6, 7]⟩, ⟨0, 2, [3, 4, 6, 7]⟩, ⟨1, 5, [0, 2, 3, 7, 6, 4]⟩, ⟨1, 2, [3, 4, 6, 7]⟩, ⟨2, 5, [0, 1, 3, 7, 6, 4]⟩], ⟨none, {(0, 3), (1, 3), (2, 3)}⟩⟩ + +private def k8t5p3_step_16 : ClosureStep 8 := .edge k8t5p3_step_16_data + +private def k8t5p3_step_17_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨1, 0, [2, 3, 4, 5, 6, 7]⟩, ⟨1, 6, [2, 3, 4, 5, 0, 7]⟩, ⟨1, 0, [2, 3, 4, 8, 7, 6, 5]⟩, ⟨1, 0, [2, 3, 4, 8, 7]⟩, ⟨1, 6, [2, 3, 4, 8, 7, 0, 5]⟩, ⟨4, 0, [1, 2, 3, 8, 7, 6, 5]⟩, ⟨4, 0, [1, 2, 3, 8, 7]⟩, ⟨4, 6, [1, 2, 3, 8, 7, 0, 5]⟩, ⟨4, 0, [1, 2, 8, 7, 6, 5]⟩, ⟨4, 0, [1, 2, 8, 7]⟩, ⟨4, 6, [1, 2, 8, 7, 0, 5]⟩, ⟨4, 0, [1, 8, 7]⟩] + +private def k8t5p3_step_17_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨6, 0, [5, 4, 1, 2, 3, 8, 7]⟩, ⟨6, 0, [5, 4, 1, 2, 8, 7]⟩, ⟨6, 0, [5, 4, 1, 8, 7]⟩, ⟨6, 0, [5, 4, 8, 7]⟩, ⟨6, 3, [5, 0, 7, 8, 1, 2]⟩, ⟨6, 4, [5, 0, 7, 8, 1, 2, 3]⟩, ⟨6, 4, [5, 0, 7, 8, 1, 2]⟩, ⟨6, 3, [5, 0, 7, 8, 1, 2, 4]⟩, ⟨6, 2, [5, 0, 7, 8, 1, 3]⟩, ⟨6, 2, [5, 0, 7, 8, 1, 3, 4]⟩, ⟨6, 1, [5, 0, 7, 8, 2, 3]⟩, ⟨6, 1, [5, 0, 7, 8, 2, 3, 4]⟩] + +private def k8t5p3_step_17_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨6, 8, [7, 0, 5, 4, 1, 2, 3]⟩, ⟨6, 8, [7, 0, 5, 4, 1, 2]⟩, ⟨0, 6, [5, 4, 1, 2, 3, 8, 7]⟩, ⟨0, 1, [5, 4, 2]⟩, ⟨0, 1, [5, 4, 2, 3]⟩, ⟨0, 1, [5, 4, 2, 3, 8]⟩, ⟨0, 4, [5, 6, 7, 8, 1, 2, 3]⟩, ⟨0, 3, [5, 6, 7, 8, 1, 2, 4]⟩, ⟨0, 2, [5, 6, 7, 8, 1, 3, 4]⟩, ⟨0, 1, [5, 6, 7, 8, 2, 3]⟩, ⟨0, 1, [5, 6, 7, 8, 2, 3, 4]⟩, ⟨0, 8, [7, 6, 5, 4, 1, 2, 3]⟩] + +private def k8t5p3_step_17_data : FreshAttachmentData 8 := ⟨6, 4, k8t5p3_step_17_required_block_0 ++ k8t5p3_step_17_required_block_1 ++ k8t5p3_step_17_required_block_2, ⟨none, {(6, 2), (4, 3), (0, 1), (1, 3)}⟩⟩ + +private def k8t5p3_step_17 : ClosureStep 8 := .fresh k8t5p3_step_17_data + +private def k8t5p3_step_18_data : EdgeAttachmentData 8 := ⟨7, 4, [⟨0, 5, [1, 2, 3, 4, 7, 6]⟩, ⟨0, 2, [1, 3, 4, 7]⟩, ⟨0, 1, [2, 3, 4, 7]⟩, ⟨1, 5, [0, 2, 3, 4, 7, 6]⟩, ⟨1, 2, [0, 3, 4, 7]⟩, ⟨2, 5, [0, 1, 3, 4, 7, 6]⟩], ⟨none, {(0, 3), (1, 3), (2, 3)}⟩⟩ + +private def k8t5p3_step_18 : ClosureStep 8 := .edge k8t5p3_step_18_data + +private def k8t5p3_step_19_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨1, 0, [2, 3, 4, 5, 6, 7, 8]⟩, ⟨1, 6, [2, 3, 4, 5, 0, 8, 7]⟩, ⟨1, 6, [2, 3, 4, 8, 0, 5]⟩, ⟨1, 7, [2, 3, 4, 8, 0, 5, 6]⟩, ⟨1, 0, [2, 3, 8, 4, 5]⟩, ⟨1, 0, [2, 3, 8, 7, 6, 5]⟩, ⟨4, 0, [1, 2, 3, 8, 7, 6, 5]⟩, ⟨4, 0, [1, 2, 3, 8]⟩, ⟨4, 6, [1, 2, 3, 8, 0, 5]⟩, ⟨4, 7, [1, 2, 3, 8, 0, 5, 6]⟩, ⟨4, 0, [1, 2, 8, 7, 6, 5]⟩, ⟨4, 0, [1, 2, 8]⟩] + +private def k8t5p3_step_19_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨4, 7, [1, 2, 8, 0, 5, 6]⟩, ⟨4, 0, [1, 8, 7, 6, 5]⟩, ⟨4, 0, [1, 8]⟩, ⟨4, 7, [1, 8, 0, 5, 6]⟩, ⟨0, 1, [5, 4]⟩, ⟨0, 7, [5, 4, 1, 2, 3, 8]⟩, ⟨0, 6, [5, 4, 1, 2, 3, 8, 7]⟩, ⟨0, 6, [5, 4, 1, 2, 8, 7]⟩, ⟨0, 1, [5, 4, 2]⟩, ⟨0, 1, [5, 4, 2, 3]⟩, ⟨0, 1, [5, 4, 2, 3, 8]⟩, ⟨0, 3, [5, 6, 7, 8, 1, 2]⟩] + +private def k8t5p3_step_19_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 4, [5, 6, 7, 8, 1, 2, 3]⟩, ⟨0, 4, [5, 6, 7, 8, 1, 2]⟩, ⟨0, 3, [5, 6, 7, 8, 1, 2, 4]⟩, ⟨0, 2, [5, 6, 7, 8, 1, 3]⟩, ⟨0, 2, [5, 6, 7, 8, 1, 3, 4]⟩, ⟨0, 1, [5, 6, 7, 8, 2, 3]⟩, ⟨0, 1, [5, 6, 7, 8, 2, 3, 4]⟩, ⟨0, 7, [8, 1, 2, 3, 4, 5, 6]⟩] + +private def k8t5p3_step_19_data : FreshAttachmentData 8 := ⟨7, 4, k8t5p3_step_19_required_block_0 ++ k8t5p3_step_19_required_block_1 ++ k8t5p3_step_19_required_block_2, ⟨none, {(4, 3), (0, 2), (1, 3)}⟩⟩ + +private def k8t5p3_step_19 : ClosureStep 8 := .fresh k8t5p3_step_19_data + +private def k8t5p3_step_20_data : EdgeAttachmentData 8 := ⟨7, 5, [⟨0, 1, [3, 4, 5, 7]⟩, ⟨0, 2, [3, 4, 5, 7]⟩, ⟨1, 2, [3, 4, 5, 7]⟩], ⟨none, {(0, 3), (1, 3), (2, 3)}⟩⟩ + +private def k8t5p3_step_20 : ClosureStep 8 := .edge k8t5p3_step_20_data + +private def k8t5p3_step_21_data : FreshAttachmentData 8 := ⟨7, 5, [⟨1, 0, [2, 3, 4, 5, 6, 7, 8]⟩, ⟨1, 0, [2, 3, 4, 5, 6]⟩, ⟨1, 7, [2, 3, 4, 5, 6, 0, 8]⟩, ⟨1, 0, [2, 3, 4, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 2, 3, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 2, 3, 8]⟩, ⟨5, 7, [4, 1, 2, 3, 8, 0, 6]⟩, ⟨5, 0, [4, 1, 2, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 2, 8]⟩, ⟨5, 7, [4, 1, 2, 8, 0, 6]⟩, ⟨5, 0, [4, 1, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 2, 3, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 2, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 8]⟩, ⟨7, 0, [6, 5, 4, 8]⟩, ⟨7, 4, [6, 0, 8, 1, 2, 3]⟩, ⟨7, 5, [6, 0, 8, 1, 2, 3, 4]⟩, ⟨7, 5, [6, 0, 8, 1, 2, 4]⟩, ⟨7, 3, [8, 0, 6, 5, 4, 1, 2]⟩, ⟨7, 2, [8, 0, 6, 5, 4, 1, 3]⟩, ⟨7, 1, [8, 0, 6, 5, 4, 2, 3]⟩, ⟨0, 1, [6, 5, 4]⟩, ⟨0, 7, [6, 5, 4, 1, 2, 3, 8]⟩, ⟨0, 1, [6, 5, 4, 2]⟩, ⟨0, 1, [6, 5, 4, 2, 3]⟩, ⟨0, 1, [6, 5, 4, 2, 3, 8]⟩, ⟨0, 5, [6, 7, 8, 1, 2, 3, 4]⟩, ⟨0, 3, [8, 7, 6, 5, 4, 1, 2]⟩, ⟨0, 2, [8, 7, 6, 5, 4, 1, 3]⟩, ⟨0, 1, [8, 7, 6, 5, 4, 2, 3]⟩], ⟨none, {(5, 3), (7, 2), (0, 1), (1, 3)}⟩⟩ + +private def k8t5p3_step_21 : ClosureStep 8 := .fresh k8t5p3_step_21_data + +def k8t5p3 : LayoutCertificate 8 where + chains := [[0], [1], [2], [3, 4, 5, 6, 7]] + clique := {0, 1, 2, 3, 7} + templates := [⟨0, 1, [], [], [], 4, 7⟩, + ⟨0, 1, [[3, 4, 5, 6, 7]], [], [], 1, 2⟩, + ⟨0, 2, [], [], [], 4, 7⟩, + ⟨0, 2, [[3, 4, 5, 6, 7]], [], [], 1, 2⟩, + ⟨0, 3, [], [], [], 4, 7⟩, + ⟨0, 3, [], [], [4, 5, 6, 7], 1, 3⟩, + ⟨0, 4, [], [], [3], 3, 6⟩, + ⟨0, 4, [], [], [5, 6, 7], 1, 4⟩, + ⟨0, 5, [], [], [4, 3], 2, 5⟩, + ⟨0, 6, [], [], [5, 4, 3], 1, 4⟩, + ⟨0, 6, [], [], [7], 3, 6⟩, + ⟨0, 7, [], [], [], 4, 7⟩, + ⟨0, 7, [], [], [6, 5, 4, 3], 1, 3⟩, + ⟨1, 2, [], [], [], 4, 7⟩, + ⟨1, 2, [[3, 4, 5, 6, 7]], [], [], 1, 2⟩, + ⟨1, 3, [], [], [], 4, 7⟩, + ⟨1, 3, [], [], [4, 5, 6, 7], 1, 3⟩, + ⟨1, 4, [], [], [5, 6, 7], 1, 4⟩, + ⟨1, 5, [], [], [4, 3], 2, 5⟩, + ⟨1, 6, [], [], [5, 4, 3], 1, 4⟩, + ⟨1, 7, [], [], [], 4, 7⟩, + ⟨1, 7, [], [], [6, 5, 4, 3], 1, 3⟩, + ⟨2, 3, [], [], [], 4, 7⟩, + ⟨2, 3, [], [], [4, 5, 6, 7], 1, 3⟩, + ⟨2, 4, [], [], [5, 6, 7], 1, 4⟩, + ⟨2, 5, [], [], [4, 3], 2, 5⟩, + ⟨2, 6, [], [], [5, 4, 3], 1, 4⟩, + ⟨2, 7, [], [], [], 4, 7⟩, + ⟨2, 7, [], [], [6, 5, 4, 3], 1, 3⟩, + ⟨3, 4, [], [], [5, 6, 7], 1, 4⟩, + ⟨3, 5, [], [], [6, 7], 2, 5⟩, + ⟨4, 5, [], [3], [6, 7], 1, 4⟩, + ⟨4, 6, [], [3], [7], 2, 5⟩, + ⟨5, 6, [], [3, 4], [7], 1, 4⟩, + ⟨5, 7, [], [3, 4], [], 2, 5⟩, + ⟨6, 7, [], [3, 4, 5], [], 1, 4⟩] + required := [] + closure := [k8t5p3_step_0, k8t5p3_step_1, k8t5p3_step_2, k8t5p3_step_3, k8t5p3_step_4, k8t5p3_step_5, k8t5p3_step_6, k8t5p3_step_7, k8t5p3_step_8, k8t5p3_step_9, k8t5p3_step_10, k8t5p3_step_11, k8t5p3_step_12, k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] + bad := ⟨none, {(5, 2), (4, 2), (6, 2)}⟩ + + +private def k8t5p3_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_initial_eq_row_0 : ∀ j : Fin 8, (k8t5p3.initialMatrix 8) 0 j = k8t5p3_state_0 0 j := by decide + +private theorem k8t5p3_initial_eq_row_1 : ∀ j : Fin 8, (k8t5p3.initialMatrix 8) 1 j = k8t5p3_state_0 1 j := by decide + +private theorem k8t5p3_initial_eq_row_2 : ∀ j : Fin 8, (k8t5p3.initialMatrix 8) 2 j = k8t5p3_state_0 2 j := by decide + +private theorem k8t5p3_initial_eq_row_3 : ∀ j : Fin 8, (k8t5p3.initialMatrix 8) 3 j = k8t5p3_state_0 3 j := by decide + +private theorem k8t5p3_initial_eq_row_4 : ∀ j : Fin 8, (k8t5p3.initialMatrix 8) 4 j = k8t5p3_state_0 4 j := by decide + +private theorem k8t5p3_initial_eq_row_5 : ∀ j : Fin 8, (k8t5p3.initialMatrix 8) 5 j = k8t5p3_state_0 5 j := by decide + +private theorem k8t5p3_initial_eq_row_6 : ∀ j : Fin 8, (k8t5p3.initialMatrix 8) 6 j = k8t5p3_state_0 6 j := by decide + +private theorem k8t5p3_initial_eq_row_7 : ∀ j : Fin 8, (k8t5p3.initialMatrix 8) 7 j = k8t5p3_state_0 7 j := by decide + +private theorem k8t5p3_initial_eq : (k8t5p3.initialMatrix 8) = k8t5p3_state_0 := by + funext i j + fin_cases i + + · exact k8t5p3_initial_eq_row_0 j + + · exact k8t5p3_initial_eq_row_1 j + + · exact k8t5p3_initial_eq_row_2 j + + · exact k8t5p3_initial_eq_row_3 j + + · exact k8t5p3_initial_eq_row_4 j + + · exact k8t5p3_initial_eq_row_5 j + + · exact k8t5p3_initial_eq_row_6 j + + · exact k8t5p3_initial_eq_row_7 j + +private def k8t5p3_state_1 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2}, {1, 2}], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, {1, 2}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_0_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t5p3_state_0 a b ∪ requiredMatrix 8 k8t5p3_step_0_data.required a b) 0 j = k8t5p3_local_0 0 j := by decide + +private theorem k8t5p3_local_0_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t5p3_state_0 a b ∪ requiredMatrix 8 k8t5p3_step_0_data.required a b) 1 j = k8t5p3_local_0 1 j := by decide + +private theorem k8t5p3_local_0_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t5p3_state_0 a b ∪ requiredMatrix 8 k8t5p3_step_0_data.required a b) 2 j = k8t5p3_local_0 2 j := by decide + +private theorem k8t5p3_local_0_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t5p3_state_0 a b ∪ requiredMatrix 8 k8t5p3_step_0_data.required a b) 3 j = k8t5p3_local_0 3 j := by decide + +private theorem k8t5p3_local_0_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t5p3_state_0 a b ∪ requiredMatrix 8 k8t5p3_step_0_data.required a b) 4 j = k8t5p3_local_0 4 j := by decide + +private theorem k8t5p3_local_0_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t5p3_state_0 a b ∪ requiredMatrix 8 k8t5p3_step_0_data.required a b) 5 j = k8t5p3_local_0 5 j := by decide + +private theorem k8t5p3_local_0_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t5p3_state_0 a b ∪ requiredMatrix 8 k8t5p3_step_0_data.required a b) 6 j = k8t5p3_local_0 6 j := by decide + +private theorem k8t5p3_local_0_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t5p3_state_0 a b ∪ requiredMatrix 8 k8t5p3_step_0_data.required a b) 7 j = k8t5p3_local_0 7 j := by decide + +private theorem k8t5p3_local_0_eq : (fun a b => k8t5p3_state_0 a b ∪ requiredMatrix 8 k8t5p3_step_0_data.required a b) = k8t5p3_local_0 := by + funext i j + fin_cases i + + · exact k8t5p3_local_0_eq_row_0 j + + · exact k8t5p3_local_0_eq_row_1 j + + · exact k8t5p3_local_0_eq_row_2 j + + · exact k8t5p3_local_0_eq_row_3 j + + · exact k8t5p3_local_0_eq_row_4 j + + · exact k8t5p3_local_0_eq_row_5 j + + · exact k8t5p3_local_0_eq_row_6 j + + · exact k8t5p3_local_0_eq_row_7 j + +private theorem k8t5p3_local_0_paths : ∀ p ∈ k8t5p3_step_0_data.required, p.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_0_data.i k8t5p3_step_0_data.j) 8 := by decide + +private theorem k8t5p3_local_0_bad : k8t5p3_step_0_data.bad.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_0_data.i k8t5p3_step_0_data.j) k8t5p3_local_0 8 5 := by decide + +private theorem k8t5p3_step_0_check : k8t5p3_step_0.Check k8t5p3.graph k8t5p3_state_0 8 5 := by + change k8t5p3_step_0_data.Check k8t5p3.graph k8t5p3_state_0 8 5 + refine ⟨k8t5p3_local_0_paths, ?_⟩ + rw [k8t5p3_local_0_eq] + exact k8t5p3_local_0_bad + +private theorem k8t5p3_update_0 : k8t5p3_step_0.apply k8t5p3_state_0 = k8t5p3_state_1 := by + have h : ∀ i j : Fin 8, k8t5p3_step_0.apply k8t5p3_state_0 i j = k8t5p3_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_2 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_1 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2}, {1, 2}], + #[Finset.Icc 0 6, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, {1, 2}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_1_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t5p3_state_1 a b ∪ requiredMatrix 8 k8t5p3_step_1_data.required a b) 0 j = k8t5p3_local_1 0 j := by decide + +private theorem k8t5p3_local_1_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t5p3_state_1 a b ∪ requiredMatrix 8 k8t5p3_step_1_data.required a b) 1 j = k8t5p3_local_1 1 j := by decide + +private theorem k8t5p3_local_1_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t5p3_state_1 a b ∪ requiredMatrix 8 k8t5p3_step_1_data.required a b) 2 j = k8t5p3_local_1 2 j := by decide + +private theorem k8t5p3_local_1_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t5p3_state_1 a b ∪ requiredMatrix 8 k8t5p3_step_1_data.required a b) 3 j = k8t5p3_local_1 3 j := by decide + +private theorem k8t5p3_local_1_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t5p3_state_1 a b ∪ requiredMatrix 8 k8t5p3_step_1_data.required a b) 4 j = k8t5p3_local_1 4 j := by decide + +private theorem k8t5p3_local_1_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t5p3_state_1 a b ∪ requiredMatrix 8 k8t5p3_step_1_data.required a b) 5 j = k8t5p3_local_1 5 j := by decide + +private theorem k8t5p3_local_1_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t5p3_state_1 a b ∪ requiredMatrix 8 k8t5p3_step_1_data.required a b) 6 j = k8t5p3_local_1 6 j := by decide + +private theorem k8t5p3_local_1_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t5p3_state_1 a b ∪ requiredMatrix 8 k8t5p3_step_1_data.required a b) 7 j = k8t5p3_local_1 7 j := by decide + +private theorem k8t5p3_local_1_eq : (fun a b => k8t5p3_state_1 a b ∪ requiredMatrix 8 k8t5p3_step_1_data.required a b) = k8t5p3_local_1 := by + funext i j + fin_cases i + + · exact k8t5p3_local_1_eq_row_0 j + + · exact k8t5p3_local_1_eq_row_1 j + + · exact k8t5p3_local_1_eq_row_2 j + + · exact k8t5p3_local_1_eq_row_3 j + + · exact k8t5p3_local_1_eq_row_4 j + + · exact k8t5p3_local_1_eq_row_5 j + + · exact k8t5p3_local_1_eq_row_6 j + + · exact k8t5p3_local_1_eq_row_7 j + +private theorem k8t5p3_local_1_paths : ∀ p ∈ k8t5p3_step_1_data.required, p.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_1_data.i k8t5p3_step_1_data.j) 8 := by decide + +private theorem k8t5p3_local_1_bad : k8t5p3_step_1_data.bad.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_1_data.i k8t5p3_step_1_data.j) k8t5p3_local_1 8 5 := by decide + +private theorem k8t5p3_step_1_check : k8t5p3_step_1.Check k8t5p3.graph k8t5p3_state_1 8 5 := by + change k8t5p3_step_1_data.Check k8t5p3.graph k8t5p3_state_1 8 5 + refine ⟨k8t5p3_local_1_paths, ?_⟩ + rw [k8t5p3_local_1_eq] + exact k8t5p3_local_1_bad + +private theorem k8t5p3_update_1 : k8t5p3_step_1.apply k8t5p3_state_1 = k8t5p3_state_2 := by + have h : ∀ i j : Fin 8, k8t5p3_step_1.apply k8t5p3_state_1 i j = k8t5p3_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_3 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_2 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2}, {1, 2}], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, {1, 2}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_2_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t5p3_state_2 a b ∪ requiredMatrix 8 k8t5p3_step_2_data.required a b) 0 j = k8t5p3_local_2 0 j := by decide + +private theorem k8t5p3_local_2_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t5p3_state_2 a b ∪ requiredMatrix 8 k8t5p3_step_2_data.required a b) 1 j = k8t5p3_local_2 1 j := by decide + +private theorem k8t5p3_local_2_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t5p3_state_2 a b ∪ requiredMatrix 8 k8t5p3_step_2_data.required a b) 2 j = k8t5p3_local_2 2 j := by decide + +private theorem k8t5p3_local_2_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t5p3_state_2 a b ∪ requiredMatrix 8 k8t5p3_step_2_data.required a b) 3 j = k8t5p3_local_2 3 j := by decide + +private theorem k8t5p3_local_2_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t5p3_state_2 a b ∪ requiredMatrix 8 k8t5p3_step_2_data.required a b) 4 j = k8t5p3_local_2 4 j := by decide + +private theorem k8t5p3_local_2_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t5p3_state_2 a b ∪ requiredMatrix 8 k8t5p3_step_2_data.required a b) 5 j = k8t5p3_local_2 5 j := by decide + +private theorem k8t5p3_local_2_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t5p3_state_2 a b ∪ requiredMatrix 8 k8t5p3_step_2_data.required a b) 6 j = k8t5p3_local_2 6 j := by decide + +private theorem k8t5p3_local_2_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t5p3_state_2 a b ∪ requiredMatrix 8 k8t5p3_step_2_data.required a b) 7 j = k8t5p3_local_2 7 j := by decide + +private theorem k8t5p3_local_2_eq : (fun a b => k8t5p3_state_2 a b ∪ requiredMatrix 8 k8t5p3_step_2_data.required a b) = k8t5p3_local_2 := by + funext i j + fin_cases i + + · exact k8t5p3_local_2_eq_row_0 j + + · exact k8t5p3_local_2_eq_row_1 j + + · exact k8t5p3_local_2_eq_row_2 j + + · exact k8t5p3_local_2_eq_row_3 j + + · exact k8t5p3_local_2_eq_row_4 j + + · exact k8t5p3_local_2_eq_row_5 j + + · exact k8t5p3_local_2_eq_row_6 j + + · exact k8t5p3_local_2_eq_row_7 j + +private theorem k8t5p3_local_2_paths : ∀ p ∈ k8t5p3_step_2_data.required, p.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_2_data.i k8t5p3_step_2_data.j) 8 := by decide + +private theorem k8t5p3_local_2_bad : k8t5p3_step_2_data.bad.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_2_data.i k8t5p3_step_2_data.j) k8t5p3_local_2 8 5 := by decide + +private theorem k8t5p3_step_2_check : k8t5p3_step_2.Check k8t5p3.graph k8t5p3_state_2 8 5 := by + change k8t5p3_step_2_data.Check k8t5p3.graph k8t5p3_state_2 8 5 + refine ⟨k8t5p3_local_2_paths, ?_⟩ + rw [k8t5p3_local_2_eq] + exact k8t5p3_local_2_bad + +private theorem k8t5p3_update_2 : k8t5p3_step_2.apply k8t5p3_state_2 = k8t5p3_state_3 := by + have h : ∀ i j : Fin 8, k8t5p3_step_2.apply k8t5p3_state_2 i j = k8t5p3_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_4 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[{0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_3 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_3_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t5p3_state_3 a b ∪ requiredMatrix 8 k8t5p3_step_3_data.required a b) 0 j = k8t5p3_local_3 0 j := by decide + +private theorem k8t5p3_local_3_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t5p3_state_3 a b ∪ requiredMatrix 8 k8t5p3_step_3_data.required a b) 1 j = k8t5p3_local_3 1 j := by decide + +private theorem k8t5p3_local_3_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t5p3_state_3 a b ∪ requiredMatrix 8 k8t5p3_step_3_data.required a b) 2 j = k8t5p3_local_3 2 j := by decide + +private theorem k8t5p3_local_3_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t5p3_state_3 a b ∪ requiredMatrix 8 k8t5p3_step_3_data.required a b) 3 j = k8t5p3_local_3 3 j := by decide + +private theorem k8t5p3_local_3_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t5p3_state_3 a b ∪ requiredMatrix 8 k8t5p3_step_3_data.required a b) 4 j = k8t5p3_local_3 4 j := by decide + +private theorem k8t5p3_local_3_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t5p3_state_3 a b ∪ requiredMatrix 8 k8t5p3_step_3_data.required a b) 5 j = k8t5p3_local_3 5 j := by decide + +private theorem k8t5p3_local_3_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t5p3_state_3 a b ∪ requiredMatrix 8 k8t5p3_step_3_data.required a b) 6 j = k8t5p3_local_3 6 j := by decide + +private theorem k8t5p3_local_3_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t5p3_state_3 a b ∪ requiredMatrix 8 k8t5p3_step_3_data.required a b) 7 j = k8t5p3_local_3 7 j := by decide + +private theorem k8t5p3_local_3_eq : (fun a b => k8t5p3_state_3 a b ∪ requiredMatrix 8 k8t5p3_step_3_data.required a b) = k8t5p3_local_3 := by + funext i j + fin_cases i + + · exact k8t5p3_local_3_eq_row_0 j + + · exact k8t5p3_local_3_eq_row_1 j + + · exact k8t5p3_local_3_eq_row_2 j + + · exact k8t5p3_local_3_eq_row_3 j + + · exact k8t5p3_local_3_eq_row_4 j + + · exact k8t5p3_local_3_eq_row_5 j + + · exact k8t5p3_local_3_eq_row_6 j + + · exact k8t5p3_local_3_eq_row_7 j + +private theorem k8t5p3_local_3_paths : ∀ p ∈ k8t5p3_step_3_data.required, p.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_3_data.i k8t5p3_step_3_data.j) 8 := by decide + +private theorem k8t5p3_local_3_bad : k8t5p3_step_3_data.bad.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_3_data.i k8t5p3_step_3_data.j) k8t5p3_local_3 8 5 := by decide + +private theorem k8t5p3_step_3_check : k8t5p3_step_3.Check k8t5p3.graph k8t5p3_state_3 8 5 := by + change k8t5p3_step_3_data.Check k8t5p3.graph k8t5p3_state_3 8 5 + refine ⟨k8t5p3_local_3_paths, ?_⟩ + rw [k8t5p3_local_3_eq] + exact k8t5p3_local_3_bad + +private theorem k8t5p3_update_3 : k8t5p3_step_3.apply k8t5p3_state_3 = k8t5p3_state_4 := by + have h : ∀ i j : Fin 8, k8t5p3_step_3.apply k8t5p3_state_3 i j = k8t5p3_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_5 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_4 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {0, 1}, {0, 1}, {0, 1}, Finset.Icc 0 4, {1}, Finset.Icc 0 4, {0, 1}], + #[{1}, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 0 6, Finset.Icc 1 7], + #[{0, 1}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{0, 1}, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}], + #[{1}, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_4_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, Finset.Icc 0 4, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, {0}, {0}, {0}, ∅, ∅, ∅, {0, 1}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_4_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_0) 0 j = k8t5p3_local_4_required_0 0 j := by decide + +private theorem k8t5p3_local_4_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_0) 1 j = k8t5p3_local_4_required_0 1 j := by decide + +private theorem k8t5p3_local_4_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_0) 2 j = k8t5p3_local_4_required_0 2 j := by decide + +private theorem k8t5p3_local_4_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_0) 3 j = k8t5p3_local_4_required_0 3 j := by decide + +private theorem k8t5p3_local_4_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_0) 4 j = k8t5p3_local_4_required_0 4 j := by decide + +private theorem k8t5p3_local_4_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_0) 5 j = k8t5p3_local_4_required_0 5 j := by decide + +private theorem k8t5p3_local_4_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_0) 6 j = k8t5p3_local_4_required_0 6 j := by decide + +private theorem k8t5p3_local_4_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_0) 7 j = k8t5p3_local_4_required_0 7 j := by decide + +private theorem k8t5p3_local_4_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_0) 8 j = k8t5p3_local_4_required_0 8 j := by decide + +private theorem k8t5p3_local_4_required_0_eq : (requiredMatrix 8 k8t5p3_step_4_required_block_0) = k8t5p3_local_4_required_0 := by + funext i j + fin_cases i + + · exact k8t5p3_local_4_required_0_eq_row_0 j + + · exact k8t5p3_local_4_required_0_eq_row_1 j + + · exact k8t5p3_local_4_required_0_eq_row_2 j + + · exact k8t5p3_local_4_required_0_eq_row_3 j + + · exact k8t5p3_local_4_required_0_eq_row_4 j + + · exact k8t5p3_local_4_required_0_eq_row_5 j + + · exact k8t5p3_local_4_required_0_eq_row_6 j + + · exact k8t5p3_local_4_required_0_eq_row_7 j + + · exact k8t5p3_local_4_required_0_eq_row_8 j + +private theorem k8t5p3_local_4_path_0_0 : (⟨5, 0, [4, 1, 2, 3, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_0_1 : (⟨5, 0, [4, 1, 2, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_0_2 : (⟨5, 0, [4, 1, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_0_3 : (⟨5, 3, [4, 1, 0, 6, 7, 8, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_0_4 : (⟨5, 2, [4, 1, 0, 6, 7, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_0_5 : (⟨5, 0, [4, 2, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_0_6 : (⟨5, 8, [4, 2, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_0_7 : (⟨5, 0, [4, 2, 3, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_0_8 : (⟨5, 7, [4, 2, 3, 1, 0, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_0_9 : (⟨5, 8, [4, 2, 3, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_0_10 : (⟨5, 7, [4, 2, 3, 8, 1, 0, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_0_11 : (⟨5, 1, [4, 2, 3, 8, 7, 6, 0]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_paths_block_0 : ∀ p ∈ k8t5p3_step_4_required_block_0, p.Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by + simp only [k8t5p3_step_4_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_4_path_0_0, k8t5p3_local_4_path_0_1, k8t5p3_local_4_path_0_2, k8t5p3_local_4_path_0_3, k8t5p3_local_4_path_0_4, k8t5p3_local_4_path_0_5, k8t5p3_local_4_path_0_6, k8t5p3_local_4_path_0_7, k8t5p3_local_4_path_0_8, k8t5p3_local_4_path_0_9, k8t5p3_local_4_path_0_10, k8t5p3_local_4_path_0_11⟩ + +private def k8t5p3_local_4_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 0 4, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, {0}, {0}, {0}, {0, 1}, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_4_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_1) 0 j = k8t5p3_local_4_required_1 0 j := by decide + +private theorem k8t5p3_local_4_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_1) 1 j = k8t5p3_local_4_required_1 1 j := by decide + +private theorem k8t5p3_local_4_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_1) 2 j = k8t5p3_local_4_required_1 2 j := by decide + +private theorem k8t5p3_local_4_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_1) 3 j = k8t5p3_local_4_required_1 3 j := by decide + +private theorem k8t5p3_local_4_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_1) 4 j = k8t5p3_local_4_required_1 4 j := by decide + +private theorem k8t5p3_local_4_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_1) 5 j = k8t5p3_local_4_required_1 5 j := by decide + +private theorem k8t5p3_local_4_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_1) 6 j = k8t5p3_local_4_required_1 6 j := by decide + +private theorem k8t5p3_local_4_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_1) 7 j = k8t5p3_local_4_required_1 7 j := by decide + +private theorem k8t5p3_local_4_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_1) 8 j = k8t5p3_local_4_required_1 8 j := by decide + +private theorem k8t5p3_local_4_required_1_eq : (requiredMatrix 8 k8t5p3_step_4_required_block_1) = k8t5p3_local_4_required_1 := by + funext i j + fin_cases i + + · exact k8t5p3_local_4_required_1_eq_row_0 j + + · exact k8t5p3_local_4_required_1_eq_row_1 j + + · exact k8t5p3_local_4_required_1_eq_row_2 j + + · exact k8t5p3_local_4_required_1_eq_row_3 j + + · exact k8t5p3_local_4_required_1_eq_row_4 j + + · exact k8t5p3_local_4_required_1_eq_row_5 j + + · exact k8t5p3_local_4_required_1_eq_row_6 j + + · exact k8t5p3_local_4_required_1_eq_row_7 j + + · exact k8t5p3_local_4_required_1_eq_row_8 j + +private theorem k8t5p3_local_4_path_1_0 : (⟨7, 0, [6, 5, 4, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_1_1 : (⟨7, 0, [6, 5, 4, 2, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_1_2 : (⟨7, 0, [6, 5, 4, 2, 3, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_1_3 : (⟨7, 0, [6, 5, 4, 2, 3, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_1_4 : (⟨7, 5, [6, 0, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_1_5 : (⟨7, 4, [6, 0, 1, 2, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_1_6 : (⟨7, 5, [6, 0, 1, 2, 3, 8, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_1_7 : (⟨7, 3, [8, 1, 0, 6, 5, 4, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_1_8 : (⟨7, 2, [8, 1, 0, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_1_9 : (⟨7, 0, [8, 2, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_1_10 : (⟨7, 4, [8, 2, 3, 1, 0, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_1_11 : (⟨7, 1, [8, 2, 3, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_paths_block_1 : ∀ p ∈ k8t5p3_step_4_required_block_1, p.Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by + simp only [k8t5p3_step_4_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_4_path_1_0, k8t5p3_local_4_path_1_1, k8t5p3_local_4_path_1_2, k8t5p3_local_4_path_1_3, k8t5p3_local_4_path_1_4, k8t5p3_local_4_path_1_5, k8t5p3_local_4_path_1_6, k8t5p3_local_4_path_1_7, k8t5p3_local_4_path_1_8, k8t5p3_local_4_path_1_9, k8t5p3_local_4_path_1_10, k8t5p3_local_4_path_1_11⟩ + +private def k8t5p3_local_4_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, {0, 1}, {0}, {0, 1}, {0, 1}, {1}, {0, 1}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_4_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_2) 0 j = k8t5p3_local_4_required_2 0 j := by decide + +private theorem k8t5p3_local_4_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_2) 1 j = k8t5p3_local_4_required_2 1 j := by decide + +private theorem k8t5p3_local_4_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_2) 2 j = k8t5p3_local_4_required_2 2 j := by decide + +private theorem k8t5p3_local_4_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_2) 3 j = k8t5p3_local_4_required_2 3 j := by decide + +private theorem k8t5p3_local_4_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_2) 4 j = k8t5p3_local_4_required_2 4 j := by decide + +private theorem k8t5p3_local_4_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_2) 5 j = k8t5p3_local_4_required_2 5 j := by decide + +private theorem k8t5p3_local_4_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_2) 6 j = k8t5p3_local_4_required_2 6 j := by decide + +private theorem k8t5p3_local_4_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_2) 7 j = k8t5p3_local_4_required_2 7 j := by decide + +private theorem k8t5p3_local_4_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_2) 8 j = k8t5p3_local_4_required_2 8 j := by decide + +private theorem k8t5p3_local_4_required_2_eq : (requiredMatrix 8 k8t5p3_step_4_required_block_2) = k8t5p3_local_4_required_2 := by + funext i j + fin_cases i + + · exact k8t5p3_local_4_required_2_eq_row_0 j + + · exact k8t5p3_local_4_required_2_eq_row_1 j + + · exact k8t5p3_local_4_required_2_eq_row_2 j + + · exact k8t5p3_local_4_required_2_eq_row_3 j + + · exact k8t5p3_local_4_required_2_eq_row_4 j + + · exact k8t5p3_local_4_required_2_eq_row_5 j + + · exact k8t5p3_local_4_required_2_eq_row_6 j + + · exact k8t5p3_local_4_required_2_eq_row_7 j + + · exact k8t5p3_local_4_required_2_eq_row_8 j + +private theorem k8t5p3_local_4_path_2_0 : (⟨0, 7, [1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_2_1 : (⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_2_2 : (⟨0, 6, [1, 2, 3, 4, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_2_3 : (⟨0, 5, [1, 2, 3, 4, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_2_4 : (⟨0, 7, [1, 2, 3, 8, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_2_5 : (⟨0, 5, [1, 2, 3, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_2_6 : (⟨0, 4, [1, 2, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_2_7 : (⟨0, 8, [1, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_2_8 : (⟨0, 3, [1, 2, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_2_9 : (⟨0, 4, [1, 2, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_2_10 : (⟨0, 2, [1, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_2_11 : (⟨0, 2, [1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_paths_block_2 : ∀ p ∈ k8t5p3_step_4_required_block_2, p.Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by + simp only [k8t5p3_step_4_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_4_path_2_0, k8t5p3_local_4_path_2_1, k8t5p3_local_4_path_2_2, k8t5p3_local_4_path_2_3, k8t5p3_local_4_path_2_4, k8t5p3_local_4_path_2_5, k8t5p3_local_4_path_2_6, k8t5p3_local_4_path_2_7, k8t5p3_local_4_path_2_8, k8t5p3_local_4_path_2_9, k8t5p3_local_4_path_2_10, k8t5p3_local_4_path_2_11⟩ + +private def k8t5p3_local_4_required_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, ∅, {1}, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_4_required_3_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_3) 0 j = k8t5p3_local_4_required_3 0 j := by decide + +private theorem k8t5p3_local_4_required_3_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_3) 1 j = k8t5p3_local_4_required_3 1 j := by decide + +private theorem k8t5p3_local_4_required_3_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_3) 2 j = k8t5p3_local_4_required_3 2 j := by decide + +private theorem k8t5p3_local_4_required_3_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_3) 3 j = k8t5p3_local_4_required_3 3 j := by decide + +private theorem k8t5p3_local_4_required_3_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_3) 4 j = k8t5p3_local_4_required_3 4 j := by decide + +private theorem k8t5p3_local_4_required_3_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_3) 5 j = k8t5p3_local_4_required_3 5 j := by decide + +private theorem k8t5p3_local_4_required_3_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_3) 6 j = k8t5p3_local_4_required_3 6 j := by decide + +private theorem k8t5p3_local_4_required_3_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_3) 7 j = k8t5p3_local_4_required_3 7 j := by decide + +private theorem k8t5p3_local_4_required_3_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_4_required_block_3) 8 j = k8t5p3_local_4_required_3 8 j := by decide + +private theorem k8t5p3_local_4_required_3_eq : (requiredMatrix 8 k8t5p3_step_4_required_block_3) = k8t5p3_local_4_required_3 := by + funext i j + fin_cases i + + · exact k8t5p3_local_4_required_3_eq_row_0 j + + · exact k8t5p3_local_4_required_3_eq_row_1 j + + · exact k8t5p3_local_4_required_3_eq_row_2 j + + · exact k8t5p3_local_4_required_3_eq_row_3 j + + · exact k8t5p3_local_4_required_3_eq_row_4 j + + · exact k8t5p3_local_4_required_3_eq_row_5 j + + · exact k8t5p3_local_4_required_3_eq_row_6 j + + · exact k8t5p3_local_4_required_3_eq_row_7 j + + · exact k8t5p3_local_4_required_3_eq_row_8 j + +private theorem k8t5p3_local_4_path_3_0 : (⟨0, 3, [1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_path_3_1 : (⟨0, 1, [6, 5, 4, 2, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by decide + +private theorem k8t5p3_local_4_paths_block_3 : ∀ p ∈ k8t5p3_step_4_required_block_3, p.Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by + simp only [k8t5p3_step_4_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_4_path_3_0, k8t5p3_local_4_path_3_1⟩ + +private theorem k8t5p3_local_4_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_4 a b ∪ ((((k8t5p3_local_4_required_0 a b ∪ k8t5p3_local_4_required_1 a b) ∪ k8t5p3_local_4_required_2 a b) ∪ k8t5p3_local_4_required_3 a b))) 0 j = k8t5p3_local_4 0 j := by decide + +private theorem k8t5p3_local_4_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_4 a b ∪ ((((k8t5p3_local_4_required_0 a b ∪ k8t5p3_local_4_required_1 a b) ∪ k8t5p3_local_4_required_2 a b) ∪ k8t5p3_local_4_required_3 a b))) 1 j = k8t5p3_local_4 1 j := by decide + +private theorem k8t5p3_local_4_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_4 a b ∪ ((((k8t5p3_local_4_required_0 a b ∪ k8t5p3_local_4_required_1 a b) ∪ k8t5p3_local_4_required_2 a b) ∪ k8t5p3_local_4_required_3 a b))) 2 j = k8t5p3_local_4 2 j := by decide + +private theorem k8t5p3_local_4_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_4 a b ∪ ((((k8t5p3_local_4_required_0 a b ∪ k8t5p3_local_4_required_1 a b) ∪ k8t5p3_local_4_required_2 a b) ∪ k8t5p3_local_4_required_3 a b))) 3 j = k8t5p3_local_4 3 j := by decide + +private theorem k8t5p3_local_4_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_4 a b ∪ ((((k8t5p3_local_4_required_0 a b ∪ k8t5p3_local_4_required_1 a b) ∪ k8t5p3_local_4_required_2 a b) ∪ k8t5p3_local_4_required_3 a b))) 4 j = k8t5p3_local_4 4 j := by decide + +private theorem k8t5p3_local_4_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_4 a b ∪ ((((k8t5p3_local_4_required_0 a b ∪ k8t5p3_local_4_required_1 a b) ∪ k8t5p3_local_4_required_2 a b) ∪ k8t5p3_local_4_required_3 a b))) 5 j = k8t5p3_local_4 5 j := by decide + +private theorem k8t5p3_local_4_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_4 a b ∪ ((((k8t5p3_local_4_required_0 a b ∪ k8t5p3_local_4_required_1 a b) ∪ k8t5p3_local_4_required_2 a b) ∪ k8t5p3_local_4_required_3 a b))) 6 j = k8t5p3_local_4 6 j := by decide + +private theorem k8t5p3_local_4_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_4 a b ∪ ((((k8t5p3_local_4_required_0 a b ∪ k8t5p3_local_4_required_1 a b) ∪ k8t5p3_local_4_required_2 a b) ∪ k8t5p3_local_4_required_3 a b))) 7 j = k8t5p3_local_4 7 j := by decide + +private theorem k8t5p3_local_4_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_4 a b ∪ ((((k8t5p3_local_4_required_0 a b ∪ k8t5p3_local_4_required_1 a b) ∪ k8t5p3_local_4_required_2 a b) ∪ k8t5p3_local_4_required_3 a b))) 8 j = k8t5p3_local_4 8 j := by decide + +private theorem k8t5p3_local_4_merged_eq : (fun a b => freshMatrix k8t5p3_state_4 a b ∪ ((((k8t5p3_local_4_required_0 a b ∪ k8t5p3_local_4_required_1 a b) ∪ k8t5p3_local_4_required_2 a b) ∪ k8t5p3_local_4_required_3 a b))) = k8t5p3_local_4 := by + funext i j + fin_cases i + + · exact k8t5p3_local_4_merged_eq_row_0 j + + · exact k8t5p3_local_4_merged_eq_row_1 j + + · exact k8t5p3_local_4_merged_eq_row_2 j + + · exact k8t5p3_local_4_merged_eq_row_3 j + + · exact k8t5p3_local_4_merged_eq_row_4 j + + · exact k8t5p3_local_4_merged_eq_row_5 j + + · exact k8t5p3_local_4_merged_eq_row_6 j + + · exact k8t5p3_local_4_merged_eq_row_7 j + + · exact k8t5p3_local_4_merged_eq_row_8 j + +private theorem k8t5p3_local_4_eq : (fun a b => freshMatrix k8t5p3_state_4 a b ∪ requiredMatrix 8 k8t5p3_step_4_data.required a b) = k8t5p3_local_4 := by + funext a b + change freshMatrix k8t5p3_state_4 a b ∪ requiredMatrix 8 (k8t5p3_step_4_required_block_0 ++ k8t5p3_step_4_required_block_1 ++ k8t5p3_step_4_required_block_2 ++ k8t5p3_step_4_required_block_3) a b = _ + simp only [requiredMatrix_append, k8t5p3_local_4_required_0_eq, k8t5p3_local_4_required_1_eq, k8t5p3_local_4_required_2_eq, k8t5p3_local_4_required_3_eq] + exact congrFun (congrFun k8t5p3_local_4_merged_eq a) b + +private theorem k8t5p3_local_4_paths : ∀ p ∈ k8t5p3_step_4_data.required, p.Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 := by + change ∀ p ∈ (k8t5p3_step_4_required_block_0 ++ k8t5p3_step_4_required_block_1 ++ k8t5p3_step_4_required_block_2 ++ k8t5p3_step_4_required_block_3), p.Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) 8 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k8t5p3_local_4_paths_block_0, k8t5p3_local_4_paths_block_1⟩, k8t5p3_local_4_paths_block_2⟩, k8t5p3_local_4_paths_block_3⟩ + +private theorem k8t5p3_local_4_bad : k8t5p3_step_4_data.bad.Check (freshGraph k8t5p3.graph k8t5p3_step_4_data.i k8t5p3_step_4_data.j) k8t5p3_local_4 8 5 := by decide + +private theorem k8t5p3_step_4_check : k8t5p3_step_4.Check k8t5p3.graph k8t5p3_state_4 8 5 := by + change k8t5p3_step_4_data.Check k8t5p3.graph k8t5p3_state_4 8 5 + refine ⟨by decide, k8t5p3_local_4_paths, ?_⟩ + rw [k8t5p3_local_4_eq] + exact k8t5p3_local_4_bad + +private theorem k8t5p3_update_4 : k8t5p3_step_4.apply k8t5p3_state_4 = k8t5p3_state_5 := by + have h : ∀ i j : Fin 8, k8t5p3_step_4.apply k8t5p3_state_4 i j = k8t5p3_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_6 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, {0, 2, 3, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_5 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_5_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t5p3_state_5 a b ∪ requiredMatrix 8 k8t5p3_step_5_data.required a b) 0 j = k8t5p3_local_5 0 j := by decide + +private theorem k8t5p3_local_5_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t5p3_state_5 a b ∪ requiredMatrix 8 k8t5p3_step_5_data.required a b) 1 j = k8t5p3_local_5 1 j := by decide + +private theorem k8t5p3_local_5_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t5p3_state_5 a b ∪ requiredMatrix 8 k8t5p3_step_5_data.required a b) 2 j = k8t5p3_local_5 2 j := by decide + +private theorem k8t5p3_local_5_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t5p3_state_5 a b ∪ requiredMatrix 8 k8t5p3_step_5_data.required a b) 3 j = k8t5p3_local_5 3 j := by decide + +private theorem k8t5p3_local_5_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t5p3_state_5 a b ∪ requiredMatrix 8 k8t5p3_step_5_data.required a b) 4 j = k8t5p3_local_5 4 j := by decide + +private theorem k8t5p3_local_5_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t5p3_state_5 a b ∪ requiredMatrix 8 k8t5p3_step_5_data.required a b) 5 j = k8t5p3_local_5 5 j := by decide + +private theorem k8t5p3_local_5_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t5p3_state_5 a b ∪ requiredMatrix 8 k8t5p3_step_5_data.required a b) 6 j = k8t5p3_local_5 6 j := by decide + +private theorem k8t5p3_local_5_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t5p3_state_5 a b ∪ requiredMatrix 8 k8t5p3_step_5_data.required a b) 7 j = k8t5p3_local_5 7 j := by decide + +private theorem k8t5p3_local_5_eq : (fun a b => k8t5p3_state_5 a b ∪ requiredMatrix 8 k8t5p3_step_5_data.required a b) = k8t5p3_local_5 := by + funext i j + fin_cases i + + · exact k8t5p3_local_5_eq_row_0 j + + · exact k8t5p3_local_5_eq_row_1 j + + · exact k8t5p3_local_5_eq_row_2 j + + · exact k8t5p3_local_5_eq_row_3 j + + · exact k8t5p3_local_5_eq_row_4 j + + · exact k8t5p3_local_5_eq_row_5 j + + · exact k8t5p3_local_5_eq_row_6 j + + · exact k8t5p3_local_5_eq_row_7 j + +private theorem k8t5p3_local_5_paths : ∀ p ∈ k8t5p3_step_5_data.required, p.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_5_data.i k8t5p3_step_5_data.j) 8 := by decide + +private theorem k8t5p3_local_5_bad : k8t5p3_step_5_data.bad.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_5_data.i k8t5p3_step_5_data.j) k8t5p3_local_5 8 5 := by decide + +private theorem k8t5p3_step_5_check : k8t5p3_step_5.Check k8t5p3.graph k8t5p3_state_5 8 5 := by + change k8t5p3_step_5_data.Check k8t5p3.graph k8t5p3_state_5 8 5 + refine ⟨k8t5p3_local_5_paths, ?_⟩ + rw [k8t5p3_local_5_eq] + exact k8t5p3_local_5_bad + +private theorem k8t5p3_update_5 : k8t5p3_step_5.apply k8t5p3_state_5 = k8t5p3_state_6 := by + have h : ∀ i j : Fin 8, k8t5p3_step_5.apply k8t5p3_state_5 i j = k8t5p3_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_7 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_6 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1}, {1}, {0, 1}, {0, 1}, Finset.Icc 0 4, {1}, Finset.Icc 0 4, {0, 1}], + #[{0, 1}, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, {0, 2, 3, 4, 5}, Finset.Icc 0 4, Finset.Icc 1 7], + #[{0, 1}, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}], + #[{1}, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_6_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, Finset.Icc 0 4, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, {0}, {0}, {0}, ∅, ∅, ∅, {0, 1}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_6_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_0) 0 j = k8t5p3_local_6_required_0 0 j := by decide + +private theorem k8t5p3_local_6_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_0) 1 j = k8t5p3_local_6_required_0 1 j := by decide + +private theorem k8t5p3_local_6_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_0) 2 j = k8t5p3_local_6_required_0 2 j := by decide + +private theorem k8t5p3_local_6_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_0) 3 j = k8t5p3_local_6_required_0 3 j := by decide + +private theorem k8t5p3_local_6_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_0) 4 j = k8t5p3_local_6_required_0 4 j := by decide + +private theorem k8t5p3_local_6_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_0) 5 j = k8t5p3_local_6_required_0 5 j := by decide + +private theorem k8t5p3_local_6_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_0) 6 j = k8t5p3_local_6_required_0 6 j := by decide + +private theorem k8t5p3_local_6_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_0) 7 j = k8t5p3_local_6_required_0 7 j := by decide + +private theorem k8t5p3_local_6_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_0) 8 j = k8t5p3_local_6_required_0 8 j := by decide + +private theorem k8t5p3_local_6_required_0_eq : (requiredMatrix 8 k8t5p3_step_6_required_block_0) = k8t5p3_local_6_required_0 := by + funext i j + fin_cases i + + · exact k8t5p3_local_6_required_0_eq_row_0 j + + · exact k8t5p3_local_6_required_0_eq_row_1 j + + · exact k8t5p3_local_6_required_0_eq_row_2 j + + · exact k8t5p3_local_6_required_0_eq_row_3 j + + · exact k8t5p3_local_6_required_0_eq_row_4 j + + · exact k8t5p3_local_6_required_0_eq_row_5 j + + · exact k8t5p3_local_6_required_0_eq_row_6 j + + · exact k8t5p3_local_6_required_0_eq_row_7 j + + · exact k8t5p3_local_6_required_0_eq_row_8 j + +private theorem k8t5p3_local_6_path_0_0 : (⟨5, 0, [4, 1, 2, 3, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_0_1 : (⟨5, 0, [4, 1, 2, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_0_2 : (⟨5, 0, [4, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_0_3 : (⟨5, 8, [4, 1, 2, 0, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_0_4 : (⟨5, 3, [4, 1, 2, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_0_5 : (⟨5, 0, [4, 1, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_0_6 : (⟨5, 7, [4, 1, 3, 2, 0, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_0_7 : (⟨5, 8, [4, 1, 3, 2, 0, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_0_8 : (⟨5, 0, [4, 1, 3, 8, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_0_9 : (⟨5, 7, [4, 1, 3, 8, 2, 0, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_0_10 : (⟨5, 2, [4, 1, 3, 8, 7, 6, 0]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_0_11 : (⟨5, 1, [4, 2, 0, 6, 7, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_paths_block_0 : ∀ p ∈ k8t5p3_step_6_required_block_0, p.Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by + simp only [k8t5p3_step_6_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_6_path_0_0, k8t5p3_local_6_path_0_1, k8t5p3_local_6_path_0_2, k8t5p3_local_6_path_0_3, k8t5p3_local_6_path_0_4, k8t5p3_local_6_path_0_5, k8t5p3_local_6_path_0_6, k8t5p3_local_6_path_0_7, k8t5p3_local_6_path_0_8, k8t5p3_local_6_path_0_9, k8t5p3_local_6_path_0_10, k8t5p3_local_6_path_0_11⟩ + +private def k8t5p3_local_6_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 0 4, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, {0}, {0}, {0}, {0, 1}, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_6_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_1) 0 j = k8t5p3_local_6_required_1 0 j := by decide + +private theorem k8t5p3_local_6_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_1) 1 j = k8t5p3_local_6_required_1 1 j := by decide + +private theorem k8t5p3_local_6_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_1) 2 j = k8t5p3_local_6_required_1 2 j := by decide + +private theorem k8t5p3_local_6_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_1) 3 j = k8t5p3_local_6_required_1 3 j := by decide + +private theorem k8t5p3_local_6_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_1) 4 j = k8t5p3_local_6_required_1 4 j := by decide + +private theorem k8t5p3_local_6_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_1) 5 j = k8t5p3_local_6_required_1 5 j := by decide + +private theorem k8t5p3_local_6_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_1) 6 j = k8t5p3_local_6_required_1 6 j := by decide + +private theorem k8t5p3_local_6_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_1) 7 j = k8t5p3_local_6_required_1 7 j := by decide + +private theorem k8t5p3_local_6_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_1) 8 j = k8t5p3_local_6_required_1 8 j := by decide + +private theorem k8t5p3_local_6_required_1_eq : (requiredMatrix 8 k8t5p3_step_6_required_block_1) = k8t5p3_local_6_required_1 := by + funext i j + fin_cases i + + · exact k8t5p3_local_6_required_1_eq_row_0 j + + · exact k8t5p3_local_6_required_1_eq_row_1 j + + · exact k8t5p3_local_6_required_1_eq_row_2 j + + · exact k8t5p3_local_6_required_1_eq_row_3 j + + · exact k8t5p3_local_6_required_1_eq_row_4 j + + · exact k8t5p3_local_6_required_1_eq_row_5 j + + · exact k8t5p3_local_6_required_1_eq_row_6 j + + · exact k8t5p3_local_6_required_1_eq_row_7 j + + · exact k8t5p3_local_6_required_1_eq_row_8 j + +private theorem k8t5p3_local_6_path_1_0 : (⟨7, 0, [6, 5, 4, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_1_1 : (⟨7, 0, [6, 5, 4, 1, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_1_2 : (⟨7, 0, [6, 5, 4, 1, 3, 8, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_1_3 : (⟨7, 0, [6, 5, 4, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_1_4 : (⟨7, 5, [6, 0, 2, 1, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_1_5 : (⟨7, 4, [6, 0, 2, 1, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_1_6 : (⟨7, 5, [6, 0, 2, 1, 3, 8, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_1_7 : (⟨7, 0, [8, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_1_8 : (⟨7, 3, [8, 1, 2, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_1_9 : (⟨7, 4, [8, 1, 3, 2, 0, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_1_10 : (⟨7, 2, [8, 1, 3, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_1_11 : (⟨7, 1, [8, 2, 0, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_paths_block_1 : ∀ p ∈ k8t5p3_step_6_required_block_1, p.Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by + simp only [k8t5p3_step_6_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_6_path_1_0, k8t5p3_local_6_path_1_1, k8t5p3_local_6_path_1_2, k8t5p3_local_6_path_1_3, k8t5p3_local_6_path_1_4, k8t5p3_local_6_path_1_5, k8t5p3_local_6_path_1_6, k8t5p3_local_6_path_1_7, k8t5p3_local_6_path_1_8, k8t5p3_local_6_path_1_9, k8t5p3_local_6_path_1_10, k8t5p3_local_6_path_1_11⟩ + +private def k8t5p3_local_6_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1}, ∅, {0}, {0, 1}, {0, 1}, {1}, {0, 1}, {0, 1}], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_6_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_2) 0 j = k8t5p3_local_6_required_2 0 j := by decide + +private theorem k8t5p3_local_6_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_2) 1 j = k8t5p3_local_6_required_2 1 j := by decide + +private theorem k8t5p3_local_6_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_2) 2 j = k8t5p3_local_6_required_2 2 j := by decide + +private theorem k8t5p3_local_6_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_2) 3 j = k8t5p3_local_6_required_2 3 j := by decide + +private theorem k8t5p3_local_6_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_2) 4 j = k8t5p3_local_6_required_2 4 j := by decide + +private theorem k8t5p3_local_6_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_2) 5 j = k8t5p3_local_6_required_2 5 j := by decide + +private theorem k8t5p3_local_6_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_2) 6 j = k8t5p3_local_6_required_2 6 j := by decide + +private theorem k8t5p3_local_6_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_2) 7 j = k8t5p3_local_6_required_2 7 j := by decide + +private theorem k8t5p3_local_6_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_2) 8 j = k8t5p3_local_6_required_2 8 j := by decide + +private theorem k8t5p3_local_6_required_2_eq : (requiredMatrix 8 k8t5p3_step_6_required_block_2) = k8t5p3_local_6_required_2 := by + funext i j + fin_cases i + + · exact k8t5p3_local_6_required_2_eq_row_0 j + + · exact k8t5p3_local_6_required_2_eq_row_1 j + + · exact k8t5p3_local_6_required_2_eq_row_2 j + + · exact k8t5p3_local_6_required_2_eq_row_3 j + + · exact k8t5p3_local_6_required_2_eq_row_4 j + + · exact k8t5p3_local_6_required_2_eq_row_5 j + + · exact k8t5p3_local_6_required_2_eq_row_6 j + + · exact k8t5p3_local_6_required_2_eq_row_7 j + + · exact k8t5p3_local_6_required_2_eq_row_8 j + +private theorem k8t5p3_local_6_path_2_0 : (⟨0, 7, [2, 1, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_2_1 : (⟨0, 8, [2, 1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_2_2 : (⟨0, 6, [2, 1, 3, 4, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_2_3 : (⟨0, 5, [2, 1, 3, 4, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_2_4 : (⟨0, 7, [2, 1, 3, 8, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_2_5 : (⟨0, 5, [2, 1, 3, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_2_6 : (⟨0, 4, [2, 1, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_2_7 : (⟨0, 8, [2, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_2_8 : (⟨0, 3, [2, 1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_2_9 : (⟨0, 4, [2, 1, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_2_10 : (⟨0, 1, [2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_2_11 : (⟨0, 1, [2, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_paths_block_2 : ∀ p ∈ k8t5p3_step_6_required_block_2, p.Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by + simp only [k8t5p3_step_6_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_6_path_2_0, k8t5p3_local_6_path_2_1, k8t5p3_local_6_path_2_2, k8t5p3_local_6_path_2_3, k8t5p3_local_6_path_2_4, k8t5p3_local_6_path_2_5, k8t5p3_local_6_path_2_6, k8t5p3_local_6_path_2_7, k8t5p3_local_6_path_2_8, k8t5p3_local_6_path_2_9, k8t5p3_local_6_path_2_10, k8t5p3_local_6_path_2_11⟩ + +private def k8t5p3_local_6_required_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, {1}, {1}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_6_required_3_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_3) 0 j = k8t5p3_local_6_required_3 0 j := by decide + +private theorem k8t5p3_local_6_required_3_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_3) 1 j = k8t5p3_local_6_required_3 1 j := by decide + +private theorem k8t5p3_local_6_required_3_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_3) 2 j = k8t5p3_local_6_required_3 2 j := by decide + +private theorem k8t5p3_local_6_required_3_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_3) 3 j = k8t5p3_local_6_required_3 3 j := by decide + +private theorem k8t5p3_local_6_required_3_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_3) 4 j = k8t5p3_local_6_required_3 4 j := by decide + +private theorem k8t5p3_local_6_required_3_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_3) 5 j = k8t5p3_local_6_required_3 5 j := by decide + +private theorem k8t5p3_local_6_required_3_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_3) 6 j = k8t5p3_local_6_required_3 6 j := by decide + +private theorem k8t5p3_local_6_required_3_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_3) 7 j = k8t5p3_local_6_required_3 7 j := by decide + +private theorem k8t5p3_local_6_required_3_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_6_required_block_3) 8 j = k8t5p3_local_6_required_3 8 j := by decide + +private theorem k8t5p3_local_6_required_3_eq : (requiredMatrix 8 k8t5p3_step_6_required_block_3) = k8t5p3_local_6_required_3 := by + funext i j + fin_cases i + + · exact k8t5p3_local_6_required_3_eq_row_0 j + + · exact k8t5p3_local_6_required_3_eq_row_1 j + + · exact k8t5p3_local_6_required_3_eq_row_2 j + + · exact k8t5p3_local_6_required_3_eq_row_3 j + + · exact k8t5p3_local_6_required_3_eq_row_4 j + + · exact k8t5p3_local_6_required_3_eq_row_5 j + + · exact k8t5p3_local_6_required_3_eq_row_6 j + + · exact k8t5p3_local_6_required_3_eq_row_7 j + + · exact k8t5p3_local_6_required_3_eq_row_8 j + +private theorem k8t5p3_local_6_path_3_0 : (⟨0, 3, [2, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_path_3_1 : (⟨0, 2, [6, 5, 4, 1, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by decide + +private theorem k8t5p3_local_6_paths_block_3 : ∀ p ∈ k8t5p3_step_6_required_block_3, p.Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by + simp only [k8t5p3_step_6_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_6_path_3_0, k8t5p3_local_6_path_3_1⟩ + +private theorem k8t5p3_local_6_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_6 a b ∪ ((((k8t5p3_local_6_required_0 a b ∪ k8t5p3_local_6_required_1 a b) ∪ k8t5p3_local_6_required_2 a b) ∪ k8t5p3_local_6_required_3 a b))) 0 j = k8t5p3_local_6 0 j := by decide + +private theorem k8t5p3_local_6_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_6 a b ∪ ((((k8t5p3_local_6_required_0 a b ∪ k8t5p3_local_6_required_1 a b) ∪ k8t5p3_local_6_required_2 a b) ∪ k8t5p3_local_6_required_3 a b))) 1 j = k8t5p3_local_6 1 j := by decide + +private theorem k8t5p3_local_6_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_6 a b ∪ ((((k8t5p3_local_6_required_0 a b ∪ k8t5p3_local_6_required_1 a b) ∪ k8t5p3_local_6_required_2 a b) ∪ k8t5p3_local_6_required_3 a b))) 2 j = k8t5p3_local_6 2 j := by decide + +private theorem k8t5p3_local_6_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_6 a b ∪ ((((k8t5p3_local_6_required_0 a b ∪ k8t5p3_local_6_required_1 a b) ∪ k8t5p3_local_6_required_2 a b) ∪ k8t5p3_local_6_required_3 a b))) 3 j = k8t5p3_local_6 3 j := by decide + +private theorem k8t5p3_local_6_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_6 a b ∪ ((((k8t5p3_local_6_required_0 a b ∪ k8t5p3_local_6_required_1 a b) ∪ k8t5p3_local_6_required_2 a b) ∪ k8t5p3_local_6_required_3 a b))) 4 j = k8t5p3_local_6 4 j := by decide + +private theorem k8t5p3_local_6_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_6 a b ∪ ((((k8t5p3_local_6_required_0 a b ∪ k8t5p3_local_6_required_1 a b) ∪ k8t5p3_local_6_required_2 a b) ∪ k8t5p3_local_6_required_3 a b))) 5 j = k8t5p3_local_6 5 j := by decide + +private theorem k8t5p3_local_6_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_6 a b ∪ ((((k8t5p3_local_6_required_0 a b ∪ k8t5p3_local_6_required_1 a b) ∪ k8t5p3_local_6_required_2 a b) ∪ k8t5p3_local_6_required_3 a b))) 6 j = k8t5p3_local_6 6 j := by decide + +private theorem k8t5p3_local_6_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_6 a b ∪ ((((k8t5p3_local_6_required_0 a b ∪ k8t5p3_local_6_required_1 a b) ∪ k8t5p3_local_6_required_2 a b) ∪ k8t5p3_local_6_required_3 a b))) 7 j = k8t5p3_local_6 7 j := by decide + +private theorem k8t5p3_local_6_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_6 a b ∪ ((((k8t5p3_local_6_required_0 a b ∪ k8t5p3_local_6_required_1 a b) ∪ k8t5p3_local_6_required_2 a b) ∪ k8t5p3_local_6_required_3 a b))) 8 j = k8t5p3_local_6 8 j := by decide + +private theorem k8t5p3_local_6_merged_eq : (fun a b => freshMatrix k8t5p3_state_6 a b ∪ ((((k8t5p3_local_6_required_0 a b ∪ k8t5p3_local_6_required_1 a b) ∪ k8t5p3_local_6_required_2 a b) ∪ k8t5p3_local_6_required_3 a b))) = k8t5p3_local_6 := by + funext i j + fin_cases i + + · exact k8t5p3_local_6_merged_eq_row_0 j + + · exact k8t5p3_local_6_merged_eq_row_1 j + + · exact k8t5p3_local_6_merged_eq_row_2 j + + · exact k8t5p3_local_6_merged_eq_row_3 j + + · exact k8t5p3_local_6_merged_eq_row_4 j + + · exact k8t5p3_local_6_merged_eq_row_5 j + + · exact k8t5p3_local_6_merged_eq_row_6 j + + · exact k8t5p3_local_6_merged_eq_row_7 j + + · exact k8t5p3_local_6_merged_eq_row_8 j + +private theorem k8t5p3_local_6_eq : (fun a b => freshMatrix k8t5p3_state_6 a b ∪ requiredMatrix 8 k8t5p3_step_6_data.required a b) = k8t5p3_local_6 := by + funext a b + change freshMatrix k8t5p3_state_6 a b ∪ requiredMatrix 8 (k8t5p3_step_6_required_block_0 ++ k8t5p3_step_6_required_block_1 ++ k8t5p3_step_6_required_block_2 ++ k8t5p3_step_6_required_block_3) a b = _ + simp only [requiredMatrix_append, k8t5p3_local_6_required_0_eq, k8t5p3_local_6_required_1_eq, k8t5p3_local_6_required_2_eq, k8t5p3_local_6_required_3_eq] + exact congrFun (congrFun k8t5p3_local_6_merged_eq a) b + +private theorem k8t5p3_local_6_paths : ∀ p ∈ k8t5p3_step_6_data.required, p.Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 := by + change ∀ p ∈ (k8t5p3_step_6_required_block_0 ++ k8t5p3_step_6_required_block_1 ++ k8t5p3_step_6_required_block_2 ++ k8t5p3_step_6_required_block_3), p.Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) 8 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k8t5p3_local_6_paths_block_0, k8t5p3_local_6_paths_block_1⟩, k8t5p3_local_6_paths_block_2⟩, k8t5p3_local_6_paths_block_3⟩ + +private theorem k8t5p3_local_6_bad : k8t5p3_step_6_data.bad.Check (freshGraph k8t5p3.graph k8t5p3_step_6_data.i k8t5p3_step_6_data.j) k8t5p3_local_6 8 5 := by decide + +private theorem k8t5p3_step_6_check : k8t5p3_step_6.Check k8t5p3.graph k8t5p3_state_6 8 5 := by + change k8t5p3_step_6_data.Check k8t5p3.graph k8t5p3_state_6 8 5 + refine ⟨by decide, k8t5p3_local_6_paths, ?_⟩ + rw [k8t5p3_local_6_eq] + exact k8t5p3_local_6_bad + +private theorem k8t5p3_update_6 : k8t5p3_step_6.apply k8t5p3_state_6 = k8t5p3_state_7 := by + have h : ∀ i j : Fin 8, k8t5p3_step_6.apply k8t5p3_state_6 i j = k8t5p3_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_8 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, {0, 2, 3, 4, 5}, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_7 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 2 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_7_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t5p3_state_7 a b ∪ requiredMatrix 8 k8t5p3_step_7_data.required a b) 0 j = k8t5p3_local_7 0 j := by decide + +private theorem k8t5p3_local_7_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t5p3_state_7 a b ∪ requiredMatrix 8 k8t5p3_step_7_data.required a b) 1 j = k8t5p3_local_7 1 j := by decide + +private theorem k8t5p3_local_7_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t5p3_state_7 a b ∪ requiredMatrix 8 k8t5p3_step_7_data.required a b) 2 j = k8t5p3_local_7 2 j := by decide + +private theorem k8t5p3_local_7_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t5p3_state_7 a b ∪ requiredMatrix 8 k8t5p3_step_7_data.required a b) 3 j = k8t5p3_local_7 3 j := by decide + +private theorem k8t5p3_local_7_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t5p3_state_7 a b ∪ requiredMatrix 8 k8t5p3_step_7_data.required a b) 4 j = k8t5p3_local_7 4 j := by decide + +private theorem k8t5p3_local_7_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t5p3_state_7 a b ∪ requiredMatrix 8 k8t5p3_step_7_data.required a b) 5 j = k8t5p3_local_7 5 j := by decide + +private theorem k8t5p3_local_7_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t5p3_state_7 a b ∪ requiredMatrix 8 k8t5p3_step_7_data.required a b) 6 j = k8t5p3_local_7 6 j := by decide + +private theorem k8t5p3_local_7_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t5p3_state_7 a b ∪ requiredMatrix 8 k8t5p3_step_7_data.required a b) 7 j = k8t5p3_local_7 7 j := by decide + +private theorem k8t5p3_local_7_eq : (fun a b => k8t5p3_state_7 a b ∪ requiredMatrix 8 k8t5p3_step_7_data.required a b) = k8t5p3_local_7 := by + funext i j + fin_cases i + + · exact k8t5p3_local_7_eq_row_0 j + + · exact k8t5p3_local_7_eq_row_1 j + + · exact k8t5p3_local_7_eq_row_2 j + + · exact k8t5p3_local_7_eq_row_3 j + + · exact k8t5p3_local_7_eq_row_4 j + + · exact k8t5p3_local_7_eq_row_5 j + + · exact k8t5p3_local_7_eq_row_6 j + + · exact k8t5p3_local_7_eq_row_7 j + +private theorem k8t5p3_local_7_paths : ∀ p ∈ k8t5p3_step_7_data.required, p.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_7_data.i k8t5p3_step_7_data.j) 8 := by decide + +private theorem k8t5p3_local_7_bad : k8t5p3_step_7_data.bad.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_7_data.i k8t5p3_step_7_data.j) k8t5p3_local_7 8 5 := by decide + +private theorem k8t5p3_step_7_check : k8t5p3_step_7.Check k8t5p3.graph k8t5p3_state_7 8 5 := by + change k8t5p3_step_7_data.Check k8t5p3.graph k8t5p3_state_7 8 5 + refine ⟨k8t5p3_local_7_paths, ?_⟩ + rw [k8t5p3_local_7_eq] + exact k8t5p3_local_7_bad + +private theorem k8t5p3_update_7 : k8t5p3_step_7.apply k8t5p3_state_7 = k8t5p3_state_8 := by + have h : ∀ i j : Fin 8, k8t5p3_step_7.apply k8t5p3_state_7 i j = k8t5p3_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_9 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_8 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, {1}, {0, 1}, Finset.Icc 0 4, {1}, Finset.Icc 0 4, {0, 1}], + #[{0, 1}, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{0, 1}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{1}, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, {0, 2, 3, 4, 5}, Finset.Icc 0 4, Finset.Icc 1 7], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}], + #[{1}, Finset.Icc 0 5, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_8_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, Finset.Icc 0 4, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, {0}, {0}, {0}, ∅, ∅, ∅, {0, 1}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_8_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_0) 0 j = k8t5p3_local_8_required_0 0 j := by decide + +private theorem k8t5p3_local_8_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_0) 1 j = k8t5p3_local_8_required_0 1 j := by decide + +private theorem k8t5p3_local_8_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_0) 2 j = k8t5p3_local_8_required_0 2 j := by decide + +private theorem k8t5p3_local_8_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_0) 3 j = k8t5p3_local_8_required_0 3 j := by decide + +private theorem k8t5p3_local_8_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_0) 4 j = k8t5p3_local_8_required_0 4 j := by decide + +private theorem k8t5p3_local_8_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_0) 5 j = k8t5p3_local_8_required_0 5 j := by decide + +private theorem k8t5p3_local_8_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_0) 6 j = k8t5p3_local_8_required_0 6 j := by decide + +private theorem k8t5p3_local_8_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_0) 7 j = k8t5p3_local_8_required_0 7 j := by decide + +private theorem k8t5p3_local_8_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_0) 8 j = k8t5p3_local_8_required_0 8 j := by decide + +private theorem k8t5p3_local_8_required_0_eq : (requiredMatrix 8 k8t5p3_step_8_required_block_0) = k8t5p3_local_8_required_0 := by + funext i j + fin_cases i + + · exact k8t5p3_local_8_required_0_eq_row_0 j + + · exact k8t5p3_local_8_required_0_eq_row_1 j + + · exact k8t5p3_local_8_required_0_eq_row_2 j + + · exact k8t5p3_local_8_required_0_eq_row_3 j + + · exact k8t5p3_local_8_required_0_eq_row_4 j + + · exact k8t5p3_local_8_required_0_eq_row_5 j + + · exact k8t5p3_local_8_required_0_eq_row_6 j + + · exact k8t5p3_local_8_required_0_eq_row_7 j + + · exact k8t5p3_local_8_required_0_eq_row_8 j + +private theorem k8t5p3_local_8_path_0_0 : (⟨5, 0, [4, 1, 2, 3, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_0_1 : (⟨5, 0, [4, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_0_2 : (⟨5, 7, [4, 1, 2, 3, 0, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_0_3 : (⟨5, 8, [4, 1, 2, 3, 0, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_0_4 : (⟨5, 0, [4, 1, 2, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_0_5 : (⟨5, 7, [4, 1, 2, 8, 3, 0, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_0_6 : (⟨5, 0, [4, 1, 2, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_0_7 : (⟨5, 3, [4, 1, 2, 8, 7, 6, 0]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_0_8 : (⟨5, 0, [4, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_0_9 : (⟨5, 8, [4, 1, 3, 0, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_0_10 : (⟨5, 2, [4, 1, 3, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_0_11 : (⟨5, 1, [4, 2, 3, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_paths_block_0 : ∀ p ∈ k8t5p3_step_8_required_block_0, p.Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by + simp only [k8t5p3_step_8_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_8_path_0_0, k8t5p3_local_8_path_0_1, k8t5p3_local_8_path_0_2, k8t5p3_local_8_path_0_3, k8t5p3_local_8_path_0_4, k8t5p3_local_8_path_0_5, k8t5p3_local_8_path_0_6, k8t5p3_local_8_path_0_7, k8t5p3_local_8_path_0_8, k8t5p3_local_8_path_0_9, k8t5p3_local_8_path_0_10, k8t5p3_local_8_path_0_11⟩ + +private def k8t5p3_local_8_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 0 4, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, {0}, {0}, {0}, {0, 1}, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_8_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_1) 0 j = k8t5p3_local_8_required_1 0 j := by decide + +private theorem k8t5p3_local_8_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_1) 1 j = k8t5p3_local_8_required_1 1 j := by decide + +private theorem k8t5p3_local_8_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_1) 2 j = k8t5p3_local_8_required_1 2 j := by decide + +private theorem k8t5p3_local_8_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_1) 3 j = k8t5p3_local_8_required_1 3 j := by decide + +private theorem k8t5p3_local_8_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_1) 4 j = k8t5p3_local_8_required_1 4 j := by decide + +private theorem k8t5p3_local_8_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_1) 5 j = k8t5p3_local_8_required_1 5 j := by decide + +private theorem k8t5p3_local_8_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_1) 6 j = k8t5p3_local_8_required_1 6 j := by decide + +private theorem k8t5p3_local_8_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_1) 7 j = k8t5p3_local_8_required_1 7 j := by decide + +private theorem k8t5p3_local_8_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_1) 8 j = k8t5p3_local_8_required_1 8 j := by decide + +private theorem k8t5p3_local_8_required_1_eq : (requiredMatrix 8 k8t5p3_step_8_required_block_1) = k8t5p3_local_8_required_1 := by + funext i j + fin_cases i + + · exact k8t5p3_local_8_required_1_eq_row_0 j + + · exact k8t5p3_local_8_required_1_eq_row_1 j + + · exact k8t5p3_local_8_required_1_eq_row_2 j + + · exact k8t5p3_local_8_required_1_eq_row_3 j + + · exact k8t5p3_local_8_required_1_eq_row_4 j + + · exact k8t5p3_local_8_required_1_eq_row_5 j + + · exact k8t5p3_local_8_required_1_eq_row_6 j + + · exact k8t5p3_local_8_required_1_eq_row_7 j + + · exact k8t5p3_local_8_required_1_eq_row_8 j + +private theorem k8t5p3_local_8_path_1_0 : (⟨7, 0, [6, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_1_1 : (⟨7, 0, [6, 5, 4, 1, 2, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_1_2 : (⟨7, 0, [6, 5, 4, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_1_3 : (⟨7, 0, [6, 5, 4, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_1_4 : (⟨7, 5, [6, 0, 3, 1, 2, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_1_5 : (⟨7, 4, [6, 0, 3, 1, 2, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_1_6 : (⟨7, 5, [6, 0, 3, 1, 2, 8, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_1_7 : (⟨7, 4, [8, 1, 2, 3, 0, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_1_8 : (⟨7, 3, [8, 1, 2, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_1_9 : (⟨7, 0, [8, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_1_10 : (⟨7, 2, [8, 1, 3, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_1_11 : (⟨7, 1, [8, 2, 3, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_paths_block_1 : ∀ p ∈ k8t5p3_step_8_required_block_1, p.Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by + simp only [k8t5p3_step_8_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_8_path_1_0, k8t5p3_local_8_path_1_1, k8t5p3_local_8_path_1_2, k8t5p3_local_8_path_1_3, k8t5p3_local_8_path_1_4, k8t5p3_local_8_path_1_5, k8t5p3_local_8_path_1_6, k8t5p3_local_8_path_1_7, k8t5p3_local_8_path_1_8, k8t5p3_local_8_path_1_9, k8t5p3_local_8_path_1_10, k8t5p3_local_8_path_1_11⟩ + +private def k8t5p3_local_8_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1}, {0}, ∅, {0, 1}, {0, 1}, {1}, {0, 1}, {0, 1}], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_8_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_2) 0 j = k8t5p3_local_8_required_2 0 j := by decide + +private theorem k8t5p3_local_8_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_2) 1 j = k8t5p3_local_8_required_2 1 j := by decide + +private theorem k8t5p3_local_8_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_2) 2 j = k8t5p3_local_8_required_2 2 j := by decide + +private theorem k8t5p3_local_8_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_2) 3 j = k8t5p3_local_8_required_2 3 j := by decide + +private theorem k8t5p3_local_8_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_2) 4 j = k8t5p3_local_8_required_2 4 j := by decide + +private theorem k8t5p3_local_8_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_2) 5 j = k8t5p3_local_8_required_2 5 j := by decide + +private theorem k8t5p3_local_8_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_2) 6 j = k8t5p3_local_8_required_2 6 j := by decide + +private theorem k8t5p3_local_8_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_2) 7 j = k8t5p3_local_8_required_2 7 j := by decide + +private theorem k8t5p3_local_8_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_2) 8 j = k8t5p3_local_8_required_2 8 j := by decide + +private theorem k8t5p3_local_8_required_2_eq : (requiredMatrix 8 k8t5p3_step_8_required_block_2) = k8t5p3_local_8_required_2 := by + funext i j + fin_cases i + + · exact k8t5p3_local_8_required_2_eq_row_0 j + + · exact k8t5p3_local_8_required_2_eq_row_1 j + + · exact k8t5p3_local_8_required_2_eq_row_2 j + + · exact k8t5p3_local_8_required_2_eq_row_3 j + + · exact k8t5p3_local_8_required_2_eq_row_4 j + + · exact k8t5p3_local_8_required_2_eq_row_5 j + + · exact k8t5p3_local_8_required_2_eq_row_6 j + + · exact k8t5p3_local_8_required_2_eq_row_7 j + + · exact k8t5p3_local_8_required_2_eq_row_8 j + +private theorem k8t5p3_local_8_path_2_0 : (⟨0, 7, [3, 1, 2, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_2_1 : (⟨0, 8, [3, 1, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_2_2 : (⟨0, 6, [3, 1, 2, 4, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_2_3 : (⟨0, 5, [3, 1, 2, 4, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_2_4 : (⟨0, 7, [3, 1, 2, 8, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_2_5 : (⟨0, 5, [3, 1, 2, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_2_6 : (⟨0, 4, [3, 1, 2, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_2_7 : (⟨0, 8, [3, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_2_8 : (⟨0, 2, [3, 1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_2_9 : (⟨0, 4, [3, 1, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_2_10 : (⟨0, 1, [3, 2, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_2_11 : (⟨0, 1, [3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_paths_block_2 : ∀ p ∈ k8t5p3_step_8_required_block_2, p.Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by + simp only [k8t5p3_step_8_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_8_path_2_0, k8t5p3_local_8_path_2_1, k8t5p3_local_8_path_2_2, k8t5p3_local_8_path_2_3, k8t5p3_local_8_path_2_4, k8t5p3_local_8_path_2_5, k8t5p3_local_8_path_2_6, k8t5p3_local_8_path_2_7, k8t5p3_local_8_path_2_8, k8t5p3_local_8_path_2_9, k8t5p3_local_8_path_2_10, k8t5p3_local_8_path_2_11⟩ + +private def k8t5p3_local_8_required_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, {1}, {1}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_8_required_3_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_3) 0 j = k8t5p3_local_8_required_3 0 j := by decide + +private theorem k8t5p3_local_8_required_3_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_3) 1 j = k8t5p3_local_8_required_3 1 j := by decide + +private theorem k8t5p3_local_8_required_3_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_3) 2 j = k8t5p3_local_8_required_3 2 j := by decide + +private theorem k8t5p3_local_8_required_3_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_3) 3 j = k8t5p3_local_8_required_3 3 j := by decide + +private theorem k8t5p3_local_8_required_3_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_3) 4 j = k8t5p3_local_8_required_3 4 j := by decide + +private theorem k8t5p3_local_8_required_3_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_3) 5 j = k8t5p3_local_8_required_3 5 j := by decide + +private theorem k8t5p3_local_8_required_3_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_3) 6 j = k8t5p3_local_8_required_3 6 j := by decide + +private theorem k8t5p3_local_8_required_3_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_3) 7 j = k8t5p3_local_8_required_3 7 j := by decide + +private theorem k8t5p3_local_8_required_3_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_8_required_block_3) 8 j = k8t5p3_local_8_required_3 8 j := by decide + +private theorem k8t5p3_local_8_required_3_eq : (requiredMatrix 8 k8t5p3_step_8_required_block_3) = k8t5p3_local_8_required_3 := by + funext i j + fin_cases i + + · exact k8t5p3_local_8_required_3_eq_row_0 j + + · exact k8t5p3_local_8_required_3_eq_row_1 j + + · exact k8t5p3_local_8_required_3_eq_row_2 j + + · exact k8t5p3_local_8_required_3_eq_row_3 j + + · exact k8t5p3_local_8_required_3_eq_row_4 j + + · exact k8t5p3_local_8_required_3_eq_row_5 j + + · exact k8t5p3_local_8_required_3_eq_row_6 j + + · exact k8t5p3_local_8_required_3_eq_row_7 j + + · exact k8t5p3_local_8_required_3_eq_row_8 j + +private theorem k8t5p3_local_8_path_3_0 : (⟨0, 2, [3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_path_3_1 : (⟨0, 3, [6, 5, 4, 1, 2, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by decide + +private theorem k8t5p3_local_8_paths_block_3 : ∀ p ∈ k8t5p3_step_8_required_block_3, p.Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by + simp only [k8t5p3_step_8_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_8_path_3_0, k8t5p3_local_8_path_3_1⟩ + +private theorem k8t5p3_local_8_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_8 a b ∪ ((((k8t5p3_local_8_required_0 a b ∪ k8t5p3_local_8_required_1 a b) ∪ k8t5p3_local_8_required_2 a b) ∪ k8t5p3_local_8_required_3 a b))) 0 j = k8t5p3_local_8 0 j := by decide + +private theorem k8t5p3_local_8_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_8 a b ∪ ((((k8t5p3_local_8_required_0 a b ∪ k8t5p3_local_8_required_1 a b) ∪ k8t5p3_local_8_required_2 a b) ∪ k8t5p3_local_8_required_3 a b))) 1 j = k8t5p3_local_8 1 j := by decide + +private theorem k8t5p3_local_8_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_8 a b ∪ ((((k8t5p3_local_8_required_0 a b ∪ k8t5p3_local_8_required_1 a b) ∪ k8t5p3_local_8_required_2 a b) ∪ k8t5p3_local_8_required_3 a b))) 2 j = k8t5p3_local_8 2 j := by decide + +private theorem k8t5p3_local_8_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_8 a b ∪ ((((k8t5p3_local_8_required_0 a b ∪ k8t5p3_local_8_required_1 a b) ∪ k8t5p3_local_8_required_2 a b) ∪ k8t5p3_local_8_required_3 a b))) 3 j = k8t5p3_local_8 3 j := by decide + +private theorem k8t5p3_local_8_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_8 a b ∪ ((((k8t5p3_local_8_required_0 a b ∪ k8t5p3_local_8_required_1 a b) ∪ k8t5p3_local_8_required_2 a b) ∪ k8t5p3_local_8_required_3 a b))) 4 j = k8t5p3_local_8 4 j := by decide + +private theorem k8t5p3_local_8_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_8 a b ∪ ((((k8t5p3_local_8_required_0 a b ∪ k8t5p3_local_8_required_1 a b) ∪ k8t5p3_local_8_required_2 a b) ∪ k8t5p3_local_8_required_3 a b))) 5 j = k8t5p3_local_8 5 j := by decide + +private theorem k8t5p3_local_8_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_8 a b ∪ ((((k8t5p3_local_8_required_0 a b ∪ k8t5p3_local_8_required_1 a b) ∪ k8t5p3_local_8_required_2 a b) ∪ k8t5p3_local_8_required_3 a b))) 6 j = k8t5p3_local_8 6 j := by decide + +private theorem k8t5p3_local_8_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_8 a b ∪ ((((k8t5p3_local_8_required_0 a b ∪ k8t5p3_local_8_required_1 a b) ∪ k8t5p3_local_8_required_2 a b) ∪ k8t5p3_local_8_required_3 a b))) 7 j = k8t5p3_local_8 7 j := by decide + +private theorem k8t5p3_local_8_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_8 a b ∪ ((((k8t5p3_local_8_required_0 a b ∪ k8t5p3_local_8_required_1 a b) ∪ k8t5p3_local_8_required_2 a b) ∪ k8t5p3_local_8_required_3 a b))) 8 j = k8t5p3_local_8 8 j := by decide + +private theorem k8t5p3_local_8_merged_eq : (fun a b => freshMatrix k8t5p3_state_8 a b ∪ ((((k8t5p3_local_8_required_0 a b ∪ k8t5p3_local_8_required_1 a b) ∪ k8t5p3_local_8_required_2 a b) ∪ k8t5p3_local_8_required_3 a b))) = k8t5p3_local_8 := by + funext i j + fin_cases i + + · exact k8t5p3_local_8_merged_eq_row_0 j + + · exact k8t5p3_local_8_merged_eq_row_1 j + + · exact k8t5p3_local_8_merged_eq_row_2 j + + · exact k8t5p3_local_8_merged_eq_row_3 j + + · exact k8t5p3_local_8_merged_eq_row_4 j + + · exact k8t5p3_local_8_merged_eq_row_5 j + + · exact k8t5p3_local_8_merged_eq_row_6 j + + · exact k8t5p3_local_8_merged_eq_row_7 j + + · exact k8t5p3_local_8_merged_eq_row_8 j + +private theorem k8t5p3_local_8_eq : (fun a b => freshMatrix k8t5p3_state_8 a b ∪ requiredMatrix 8 k8t5p3_step_8_data.required a b) = k8t5p3_local_8 := by + funext a b + change freshMatrix k8t5p3_state_8 a b ∪ requiredMatrix 8 (k8t5p3_step_8_required_block_0 ++ k8t5p3_step_8_required_block_1 ++ k8t5p3_step_8_required_block_2 ++ k8t5p3_step_8_required_block_3) a b = _ + simp only [requiredMatrix_append, k8t5p3_local_8_required_0_eq, k8t5p3_local_8_required_1_eq, k8t5p3_local_8_required_2_eq, k8t5p3_local_8_required_3_eq] + exact congrFun (congrFun k8t5p3_local_8_merged_eq a) b + +private theorem k8t5p3_local_8_paths : ∀ p ∈ k8t5p3_step_8_data.required, p.Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 := by + change ∀ p ∈ (k8t5p3_step_8_required_block_0 ++ k8t5p3_step_8_required_block_1 ++ k8t5p3_step_8_required_block_2 ++ k8t5p3_step_8_required_block_3), p.Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) 8 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k8t5p3_local_8_paths_block_0, k8t5p3_local_8_paths_block_1⟩, k8t5p3_local_8_paths_block_2⟩, k8t5p3_local_8_paths_block_3⟩ + +private theorem k8t5p3_local_8_bad : k8t5p3_step_8_data.bad.Check (freshGraph k8t5p3.graph k8t5p3_step_8_data.i k8t5p3_step_8_data.j) k8t5p3_local_8 8 5 := by decide + +private theorem k8t5p3_step_8_check : k8t5p3_step_8.Check k8t5p3.graph k8t5p3_state_8 8 5 := by + change k8t5p3_step_8_data.Check k8t5p3.graph k8t5p3_state_8 8 5 + refine ⟨by decide, k8t5p3_local_8_paths, ?_⟩ + rw [k8t5p3_local_8_eq] + exact k8t5p3_local_8_bad + +private theorem k8t5p3_update_8 : k8t5p3_step_8.apply k8t5p3_state_8 = k8t5p3_state_9 := by + have h : ∀ i j : Fin 8, k8t5p3_step_8.apply k8t5p3_state_8 i j = k8t5p3_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_10 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_9 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_9_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t5p3_state_9 a b ∪ requiredMatrix 8 k8t5p3_step_9_data.required a b) 0 j = k8t5p3_local_9 0 j := by decide + +private theorem k8t5p3_local_9_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t5p3_state_9 a b ∪ requiredMatrix 8 k8t5p3_step_9_data.required a b) 1 j = k8t5p3_local_9 1 j := by decide + +private theorem k8t5p3_local_9_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t5p3_state_9 a b ∪ requiredMatrix 8 k8t5p3_step_9_data.required a b) 2 j = k8t5p3_local_9 2 j := by decide + +private theorem k8t5p3_local_9_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t5p3_state_9 a b ∪ requiredMatrix 8 k8t5p3_step_9_data.required a b) 3 j = k8t5p3_local_9 3 j := by decide + +private theorem k8t5p3_local_9_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t5p3_state_9 a b ∪ requiredMatrix 8 k8t5p3_step_9_data.required a b) 4 j = k8t5p3_local_9 4 j := by decide + +private theorem k8t5p3_local_9_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t5p3_state_9 a b ∪ requiredMatrix 8 k8t5p3_step_9_data.required a b) 5 j = k8t5p3_local_9 5 j := by decide + +private theorem k8t5p3_local_9_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t5p3_state_9 a b ∪ requiredMatrix 8 k8t5p3_step_9_data.required a b) 6 j = k8t5p3_local_9 6 j := by decide + +private theorem k8t5p3_local_9_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t5p3_state_9 a b ∪ requiredMatrix 8 k8t5p3_step_9_data.required a b) 7 j = k8t5p3_local_9 7 j := by decide + +private theorem k8t5p3_local_9_eq : (fun a b => k8t5p3_state_9 a b ∪ requiredMatrix 8 k8t5p3_step_9_data.required a b) = k8t5p3_local_9 := by + funext i j + fin_cases i + + · exact k8t5p3_local_9_eq_row_0 j + + · exact k8t5p3_local_9_eq_row_1 j + + · exact k8t5p3_local_9_eq_row_2 j + + · exact k8t5p3_local_9_eq_row_3 j + + · exact k8t5p3_local_9_eq_row_4 j + + · exact k8t5p3_local_9_eq_row_5 j + + · exact k8t5p3_local_9_eq_row_6 j + + · exact k8t5p3_local_9_eq_row_7 j + +private theorem k8t5p3_local_9_paths : ∀ p ∈ k8t5p3_step_9_data.required, p.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_9_data.i k8t5p3_step_9_data.j) 8 := by decide + +private theorem k8t5p3_local_9_bad : k8t5p3_step_9_data.bad.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_9_data.i k8t5p3_step_9_data.j) k8t5p3_local_9 8 5 := by decide + +private theorem k8t5p3_step_9_check : k8t5p3_step_9.Check k8t5p3.graph k8t5p3_state_9 8 5 := by + change k8t5p3_step_9_data.Check k8t5p3.graph k8t5p3_state_9 8 5 + refine ⟨k8t5p3_local_9_paths, ?_⟩ + rw [k8t5p3_local_9_eq] + exact k8t5p3_local_9_bad + +private theorem k8t5p3_update_9 : k8t5p3_step_9.apply k8t5p3_state_9 = k8t5p3_state_10 := by + have h : ∀ i j : Fin 8, k8t5p3_step_9.apply k8t5p3_state_9 i j = k8t5p3_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_11 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_10 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, ∅, Finset.Icc 0 3, ∅, Finset.Icc 0 4, ∅], + #[Finset.Icc 0 4, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{0}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{0}, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1}], + #[∅, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_10_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_10 a b ∪ requiredMatrix 8 k8t5p3_step_10_data.required a b) 0 j = k8t5p3_local_10 0 j := by decide + +private theorem k8t5p3_local_10_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_10 a b ∪ requiredMatrix 8 k8t5p3_step_10_data.required a b) 1 j = k8t5p3_local_10 1 j := by decide + +private theorem k8t5p3_local_10_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_10 a b ∪ requiredMatrix 8 k8t5p3_step_10_data.required a b) 2 j = k8t5p3_local_10 2 j := by decide + +private theorem k8t5p3_local_10_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_10 a b ∪ requiredMatrix 8 k8t5p3_step_10_data.required a b) 3 j = k8t5p3_local_10 3 j := by decide + +private theorem k8t5p3_local_10_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_10 a b ∪ requiredMatrix 8 k8t5p3_step_10_data.required a b) 4 j = k8t5p3_local_10 4 j := by decide + +private theorem k8t5p3_local_10_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_10 a b ∪ requiredMatrix 8 k8t5p3_step_10_data.required a b) 5 j = k8t5p3_local_10 5 j := by decide + +private theorem k8t5p3_local_10_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_10 a b ∪ requiredMatrix 8 k8t5p3_step_10_data.required a b) 6 j = k8t5p3_local_10 6 j := by decide + +private theorem k8t5p3_local_10_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_10 a b ∪ requiredMatrix 8 k8t5p3_step_10_data.required a b) 7 j = k8t5p3_local_10 7 j := by decide + +private theorem k8t5p3_local_10_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_10 a b ∪ requiredMatrix 8 k8t5p3_step_10_data.required a b) 8 j = k8t5p3_local_10 8 j := by decide + +private theorem k8t5p3_local_10_eq : (fun a b => freshMatrix k8t5p3_state_10 a b ∪ requiredMatrix 8 k8t5p3_step_10_data.required a b) = k8t5p3_local_10 := by + funext i j + fin_cases i + + · exact k8t5p3_local_10_eq_row_0 j + + · exact k8t5p3_local_10_eq_row_1 j + + · exact k8t5p3_local_10_eq_row_2 j + + · exact k8t5p3_local_10_eq_row_3 j + + · exact k8t5p3_local_10_eq_row_4 j + + · exact k8t5p3_local_10_eq_row_5 j + + · exact k8t5p3_local_10_eq_row_6 j + + · exact k8t5p3_local_10_eq_row_7 j + + · exact k8t5p3_local_10_eq_row_8 j + +private theorem k8t5p3_local_10_paths : ∀ p ∈ k8t5p3_step_10_data.required, p.Check (freshGraph k8t5p3.graph k8t5p3_step_10_data.i k8t5p3_step_10_data.j) 8 := by decide + +private theorem k8t5p3_local_10_bad : k8t5p3_step_10_data.bad.Check (freshGraph k8t5p3.graph k8t5p3_step_10_data.i k8t5p3_step_10_data.j) k8t5p3_local_10 8 5 := by decide + +private theorem k8t5p3_step_10_check : k8t5p3_step_10.Check k8t5p3.graph k8t5p3_state_10 8 5 := by + change k8t5p3_step_10_data.Check k8t5p3.graph k8t5p3_state_10 8 5 + refine ⟨by decide, k8t5p3_local_10_paths, ?_⟩ + rw [k8t5p3_local_10_eq] + exact k8t5p3_local_10_bad + +private theorem k8t5p3_update_10 : k8t5p3_step_10.apply k8t5p3_state_10 = k8t5p3_state_11 := by + have h : ∀ i j : Fin 8, k8t5p3_step_10.apply k8t5p3_state_10 i j = k8t5p3_state_11 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_12 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_11 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, {1, 2}], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {1, 2}], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, {1, 2}, {1, 2}, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_11_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t5p3_state_11 a b ∪ requiredMatrix 8 k8t5p3_step_11_data.required a b) 0 j = k8t5p3_local_11 0 j := by decide + +private theorem k8t5p3_local_11_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t5p3_state_11 a b ∪ requiredMatrix 8 k8t5p3_step_11_data.required a b) 1 j = k8t5p3_local_11 1 j := by decide + +private theorem k8t5p3_local_11_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t5p3_state_11 a b ∪ requiredMatrix 8 k8t5p3_step_11_data.required a b) 2 j = k8t5p3_local_11 2 j := by decide + +private theorem k8t5p3_local_11_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t5p3_state_11 a b ∪ requiredMatrix 8 k8t5p3_step_11_data.required a b) 3 j = k8t5p3_local_11 3 j := by decide + +private theorem k8t5p3_local_11_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t5p3_state_11 a b ∪ requiredMatrix 8 k8t5p3_step_11_data.required a b) 4 j = k8t5p3_local_11 4 j := by decide + +private theorem k8t5p3_local_11_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t5p3_state_11 a b ∪ requiredMatrix 8 k8t5p3_step_11_data.required a b) 5 j = k8t5p3_local_11 5 j := by decide + +private theorem k8t5p3_local_11_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t5p3_state_11 a b ∪ requiredMatrix 8 k8t5p3_step_11_data.required a b) 6 j = k8t5p3_local_11 6 j := by decide + +private theorem k8t5p3_local_11_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t5p3_state_11 a b ∪ requiredMatrix 8 k8t5p3_step_11_data.required a b) 7 j = k8t5p3_local_11 7 j := by decide + +private theorem k8t5p3_local_11_eq : (fun a b => k8t5p3_state_11 a b ∪ requiredMatrix 8 k8t5p3_step_11_data.required a b) = k8t5p3_local_11 := by + funext i j + fin_cases i + + · exact k8t5p3_local_11_eq_row_0 j + + · exact k8t5p3_local_11_eq_row_1 j + + · exact k8t5p3_local_11_eq_row_2 j + + · exact k8t5p3_local_11_eq_row_3 j + + · exact k8t5p3_local_11_eq_row_4 j + + · exact k8t5p3_local_11_eq_row_5 j + + · exact k8t5p3_local_11_eq_row_6 j + + · exact k8t5p3_local_11_eq_row_7 j + +private theorem k8t5p3_local_11_paths : ∀ p ∈ k8t5p3_step_11_data.required, p.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_11_data.i k8t5p3_step_11_data.j) 8 := by decide + +private theorem k8t5p3_local_11_bad : k8t5p3_step_11_data.bad.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_11_data.i k8t5p3_step_11_data.j) k8t5p3_local_11 8 5 := by decide + +private theorem k8t5p3_step_11_check : k8t5p3_step_11.Check k8t5p3.graph k8t5p3_state_11 8 5 := by + change k8t5p3_step_11_data.Check k8t5p3.graph k8t5p3_state_11 8 5 + refine ⟨k8t5p3_local_11_paths, ?_⟩ + rw [k8t5p3_local_11_eq] + exact k8t5p3_local_11_bad + +private theorem k8t5p3_update_11 : k8t5p3_step_11.apply k8t5p3_state_11 = k8t5p3_state_12 := by + have h : ∀ i j : Fin 8, k8t5p3_step_11.apply k8t5p3_state_11 i j = k8t5p3_state_12 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_13 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_12 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, {1, 2}], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {1, 2}], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 0 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, {1, 2}, {1, 2}, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_12_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t5p3_state_12 a b ∪ requiredMatrix 8 k8t5p3_step_12_data.required a b) 0 j = k8t5p3_local_12 0 j := by decide + +private theorem k8t5p3_local_12_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t5p3_state_12 a b ∪ requiredMatrix 8 k8t5p3_step_12_data.required a b) 1 j = k8t5p3_local_12 1 j := by decide + +private theorem k8t5p3_local_12_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t5p3_state_12 a b ∪ requiredMatrix 8 k8t5p3_step_12_data.required a b) 2 j = k8t5p3_local_12 2 j := by decide + +private theorem k8t5p3_local_12_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t5p3_state_12 a b ∪ requiredMatrix 8 k8t5p3_step_12_data.required a b) 3 j = k8t5p3_local_12 3 j := by decide + +private theorem k8t5p3_local_12_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t5p3_state_12 a b ∪ requiredMatrix 8 k8t5p3_step_12_data.required a b) 4 j = k8t5p3_local_12 4 j := by decide + +private theorem k8t5p3_local_12_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t5p3_state_12 a b ∪ requiredMatrix 8 k8t5p3_step_12_data.required a b) 5 j = k8t5p3_local_12 5 j := by decide + +private theorem k8t5p3_local_12_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t5p3_state_12 a b ∪ requiredMatrix 8 k8t5p3_step_12_data.required a b) 6 j = k8t5p3_local_12 6 j := by decide + +private theorem k8t5p3_local_12_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t5p3_state_12 a b ∪ requiredMatrix 8 k8t5p3_step_12_data.required a b) 7 j = k8t5p3_local_12 7 j := by decide + +private theorem k8t5p3_local_12_eq : (fun a b => k8t5p3_state_12 a b ∪ requiredMatrix 8 k8t5p3_step_12_data.required a b) = k8t5p3_local_12 := by + funext i j + fin_cases i + + · exact k8t5p3_local_12_eq_row_0 j + + · exact k8t5p3_local_12_eq_row_1 j + + · exact k8t5p3_local_12_eq_row_2 j + + · exact k8t5p3_local_12_eq_row_3 j + + · exact k8t5p3_local_12_eq_row_4 j + + · exact k8t5p3_local_12_eq_row_5 j + + · exact k8t5p3_local_12_eq_row_6 j + + · exact k8t5p3_local_12_eq_row_7 j + +private theorem k8t5p3_local_12_paths : ∀ p ∈ k8t5p3_step_12_data.required, p.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_12_data.i k8t5p3_step_12_data.j) 8 := by decide + +private theorem k8t5p3_local_12_bad : k8t5p3_step_12_data.bad.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_12_data.i k8t5p3_step_12_data.j) k8t5p3_local_12 8 5 := by decide + +private theorem k8t5p3_step_12_check : k8t5p3_step_12.Check k8t5p3.graph k8t5p3_state_12 8 5 := by + change k8t5p3_step_12_data.Check k8t5p3.graph k8t5p3_state_12 8 5 + refine ⟨k8t5p3_local_12_paths, ?_⟩ + rw [k8t5p3_local_12_eq] + exact k8t5p3_local_12_bad + +private theorem k8t5p3_update_12 : k8t5p3_step_12.apply k8t5p3_state_12 = k8t5p3_state_13 := by + have h : ∀ i j : Fin 8, k8t5p3_step_12.apply k8t5p3_state_12 i j = k8t5p3_state_13 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_14 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_13 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 1 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, {1, 2}], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {1, 2}], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, {1, 2}, {1, 2}, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_13_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t5p3_state_13 a b ∪ requiredMatrix 8 k8t5p3_step_13_data.required a b) 0 j = k8t5p3_local_13 0 j := by decide + +private theorem k8t5p3_local_13_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t5p3_state_13 a b ∪ requiredMatrix 8 k8t5p3_step_13_data.required a b) 1 j = k8t5p3_local_13 1 j := by decide + +private theorem k8t5p3_local_13_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t5p3_state_13 a b ∪ requiredMatrix 8 k8t5p3_step_13_data.required a b) 2 j = k8t5p3_local_13 2 j := by decide + +private theorem k8t5p3_local_13_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t5p3_state_13 a b ∪ requiredMatrix 8 k8t5p3_step_13_data.required a b) 3 j = k8t5p3_local_13 3 j := by decide + +private theorem k8t5p3_local_13_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t5p3_state_13 a b ∪ requiredMatrix 8 k8t5p3_step_13_data.required a b) 4 j = k8t5p3_local_13 4 j := by decide + +private theorem k8t5p3_local_13_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t5p3_state_13 a b ∪ requiredMatrix 8 k8t5p3_step_13_data.required a b) 5 j = k8t5p3_local_13 5 j := by decide + +private theorem k8t5p3_local_13_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t5p3_state_13 a b ∪ requiredMatrix 8 k8t5p3_step_13_data.required a b) 6 j = k8t5p3_local_13 6 j := by decide + +private theorem k8t5p3_local_13_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t5p3_state_13 a b ∪ requiredMatrix 8 k8t5p3_step_13_data.required a b) 7 j = k8t5p3_local_13 7 j := by decide + +private theorem k8t5p3_local_13_eq : (fun a b => k8t5p3_state_13 a b ∪ requiredMatrix 8 k8t5p3_step_13_data.required a b) = k8t5p3_local_13 := by + funext i j + fin_cases i + + · exact k8t5p3_local_13_eq_row_0 j + + · exact k8t5p3_local_13_eq_row_1 j + + · exact k8t5p3_local_13_eq_row_2 j + + · exact k8t5p3_local_13_eq_row_3 j + + · exact k8t5p3_local_13_eq_row_4 j + + · exact k8t5p3_local_13_eq_row_5 j + + · exact k8t5p3_local_13_eq_row_6 j + + · exact k8t5p3_local_13_eq_row_7 j + +private theorem k8t5p3_local_13_paths : ∀ p ∈ k8t5p3_step_13_data.required, p.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_13_data.i k8t5p3_step_13_data.j) 8 := by decide + +private theorem k8t5p3_local_13_bad : k8t5p3_step_13_data.bad.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_13_data.i k8t5p3_step_13_data.j) k8t5p3_local_13 8 5 := by decide + +private theorem k8t5p3_step_13_check : k8t5p3_step_13.Check k8t5p3.graph k8t5p3_state_13 8 5 := by + change k8t5p3_step_13_data.Check k8t5p3.graph k8t5p3_state_13 8 5 + refine ⟨k8t5p3_local_13_paths, ?_⟩ + rw [k8t5p3_local_13_eq] + exact k8t5p3_local_13_bad + +private theorem k8t5p3_update_13 : k8t5p3_step_13.apply k8t5p3_state_13 = k8t5p3_state_14 := by + have h : ∀ i j : Fin 8, k8t5p3_step_13.apply k8t5p3_state_13 i j = k8t5p3_state_14 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_15 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_14 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_14_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t5p3_state_14 a b ∪ requiredMatrix 8 k8t5p3_step_14_data.required a b) 0 j = k8t5p3_local_14 0 j := by decide + +private theorem k8t5p3_local_14_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t5p3_state_14 a b ∪ requiredMatrix 8 k8t5p3_step_14_data.required a b) 1 j = k8t5p3_local_14 1 j := by decide + +private theorem k8t5p3_local_14_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t5p3_state_14 a b ∪ requiredMatrix 8 k8t5p3_step_14_data.required a b) 2 j = k8t5p3_local_14 2 j := by decide + +private theorem k8t5p3_local_14_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t5p3_state_14 a b ∪ requiredMatrix 8 k8t5p3_step_14_data.required a b) 3 j = k8t5p3_local_14 3 j := by decide + +private theorem k8t5p3_local_14_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t5p3_state_14 a b ∪ requiredMatrix 8 k8t5p3_step_14_data.required a b) 4 j = k8t5p3_local_14 4 j := by decide + +private theorem k8t5p3_local_14_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t5p3_state_14 a b ∪ requiredMatrix 8 k8t5p3_step_14_data.required a b) 5 j = k8t5p3_local_14 5 j := by decide + +private theorem k8t5p3_local_14_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t5p3_state_14 a b ∪ requiredMatrix 8 k8t5p3_step_14_data.required a b) 6 j = k8t5p3_local_14 6 j := by decide + +private theorem k8t5p3_local_14_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t5p3_state_14 a b ∪ requiredMatrix 8 k8t5p3_step_14_data.required a b) 7 j = k8t5p3_local_14 7 j := by decide + +private theorem k8t5p3_local_14_eq : (fun a b => k8t5p3_state_14 a b ∪ requiredMatrix 8 k8t5p3_step_14_data.required a b) = k8t5p3_local_14 := by + funext i j + fin_cases i + + · exact k8t5p3_local_14_eq_row_0 j + + · exact k8t5p3_local_14_eq_row_1 j + + · exact k8t5p3_local_14_eq_row_2 j + + · exact k8t5p3_local_14_eq_row_3 j + + · exact k8t5p3_local_14_eq_row_4 j + + · exact k8t5p3_local_14_eq_row_5 j + + · exact k8t5p3_local_14_eq_row_6 j + + · exact k8t5p3_local_14_eq_row_7 j + +private theorem k8t5p3_local_14_paths : ∀ p ∈ k8t5p3_step_14_data.required, p.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_14_data.i k8t5p3_step_14_data.j) 8 := by decide + +private theorem k8t5p3_local_14_bad : k8t5p3_step_14_data.bad.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_14_data.i k8t5p3_step_14_data.j) k8t5p3_local_14 8 5 := by decide + +private theorem k8t5p3_step_14_check : k8t5p3_step_14.Check k8t5p3.graph k8t5p3_state_14 8 5 := by + change k8t5p3_step_14_data.Check k8t5p3.graph k8t5p3_state_14 8 5 + refine ⟨k8t5p3_local_14_paths, ?_⟩ + rw [k8t5p3_local_14_eq] + exact k8t5p3_local_14_bad + +private theorem k8t5p3_update_14 : k8t5p3_step_14.apply k8t5p3_state_14 = k8t5p3_state_15 := by + have h : ∀ i j : Fin 8, k8t5p3_step_14.apply k8t5p3_state_14 i j = k8t5p3_state_15 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_16 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_15 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 0 5, {0, 1}, {0, 1}, ∅, {0, 1}, {0, 1}, ∅, Finset.Icc 0 5], + #[Finset.Icc 0 5, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{0, 1}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{0, 1}, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0}, ∅], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 2}], + #[{0, 1}, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5], + #[∅, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 0 5, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1, 2}, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_15_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 3, 4}], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, {0}, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅, {0}], + #[∅, {0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 3, 4}, ∅, ∅, ∅, ∅, {0}, {1}, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_15_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_0) 0 j = k8t5p3_local_15_required_0 0 j := by decide + +private theorem k8t5p3_local_15_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_0) 1 j = k8t5p3_local_15_required_0 1 j := by decide + +private theorem k8t5p3_local_15_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_0) 2 j = k8t5p3_local_15_required_0 2 j := by decide + +private theorem k8t5p3_local_15_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_0) 3 j = k8t5p3_local_15_required_0 3 j := by decide + +private theorem k8t5p3_local_15_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_0) 4 j = k8t5p3_local_15_required_0 4 j := by decide + +private theorem k8t5p3_local_15_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_0) 5 j = k8t5p3_local_15_required_0 5 j := by decide + +private theorem k8t5p3_local_15_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_0) 6 j = k8t5p3_local_15_required_0 6 j := by decide + +private theorem k8t5p3_local_15_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_0) 7 j = k8t5p3_local_15_required_0 7 j := by decide + +private theorem k8t5p3_local_15_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_0) 8 j = k8t5p3_local_15_required_0 8 j := by decide + +private theorem k8t5p3_local_15_required_0_eq : (requiredMatrix 8 k8t5p3_step_15_required_block_0) = k8t5p3_local_15_required_0 := by + funext i j + fin_cases i + + · exact k8t5p3_local_15_required_0_eq_row_0 j + + · exact k8t5p3_local_15_required_0_eq_row_1 j + + · exact k8t5p3_local_15_required_0_eq_row_2 j + + · exact k8t5p3_local_15_required_0_eq_row_3 j + + · exact k8t5p3_local_15_required_0_eq_row_4 j + + · exact k8t5p3_local_15_required_0_eq_row_5 j + + · exact k8t5p3_local_15_required_0_eq_row_6 j + + · exact k8t5p3_local_15_required_0_eq_row_7 j + + · exact k8t5p3_local_15_required_0_eq_row_8 j + +private theorem k8t5p3_local_15_path_0_0 : (⟨1, 0, [2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_0_1 : (⟨1, 0, [2, 3, 4, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_0_2 : (⟨1, 0, [2, 3, 8, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_0_3 : (⟨1, 6, [2, 3, 8, 4, 0, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_0_4 : (⟨1, 5, [2, 3, 8, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_0_5 : (⟨1, 6, [2, 3, 8, 7, 0, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_0_6 : (⟨8, 0, [1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_0_7 : (⟨8, 0, [1, 2, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_0_8 : (⟨8, 6, [1, 2, 3, 4, 0, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_0_9 : (⟨8, 5, [1, 2, 3, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_0_10 : (⟨8, 0, [1, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_0_11 : (⟨8, 0, [1, 2, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_paths_block_0 : ∀ p ∈ k8t5p3_step_15_required_block_0, p.Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by + simp only [k8t5p3_step_15_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_15_path_0_0, k8t5p3_local_15_path_0_1, k8t5p3_local_15_path_0_2, k8t5p3_local_15_path_0_3, k8t5p3_local_15_path_0_4, k8t5p3_local_15_path_0_5, k8t5p3_local_15_path_0_6, k8t5p3_local_15_path_0_7, k8t5p3_local_15_path_0_8, k8t5p3_local_15_path_0_9, k8t5p3_local_15_path_0_10, k8t5p3_local_15_path_0_11⟩ + +private def k8t5p3_local_15_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 2 5, {1}, ∅, ∅, {0, 1}, {1}, ∅, {2, 5}], + #[Finset.Icc 2 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 5}, ∅, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_15_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_1) 0 j = k8t5p3_local_15_required_1 0 j := by decide + +private theorem k8t5p3_local_15_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_1) 1 j = k8t5p3_local_15_required_1 1 j := by decide + +private theorem k8t5p3_local_15_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_1) 2 j = k8t5p3_local_15_required_1 2 j := by decide + +private theorem k8t5p3_local_15_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_1) 3 j = k8t5p3_local_15_required_1 3 j := by decide + +private theorem k8t5p3_local_15_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_1) 4 j = k8t5p3_local_15_required_1 4 j := by decide + +private theorem k8t5p3_local_15_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_1) 5 j = k8t5p3_local_15_required_1 5 j := by decide + +private theorem k8t5p3_local_15_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_1) 6 j = k8t5p3_local_15_required_1 6 j := by decide + +private theorem k8t5p3_local_15_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_1) 7 j = k8t5p3_local_15_required_1 7 j := by decide + +private theorem k8t5p3_local_15_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_1) 8 j = k8t5p3_local_15_required_1 8 j := by decide + +private theorem k8t5p3_local_15_required_1_eq : (requiredMatrix 8 k8t5p3_step_15_required_block_1) = k8t5p3_local_15_required_1 := by + funext i j + fin_cases i + + · exact k8t5p3_local_15_required_1_eq_row_0 j + + · exact k8t5p3_local_15_required_1_eq_row_1 j + + · exact k8t5p3_local_15_required_1_eq_row_2 j + + · exact k8t5p3_local_15_required_1_eq_row_3 j + + · exact k8t5p3_local_15_required_1_eq_row_4 j + + · exact k8t5p3_local_15_required_1_eq_row_5 j + + · exact k8t5p3_local_15_required_1_eq_row_6 j + + · exact k8t5p3_local_15_required_1_eq_row_7 j + + · exact k8t5p3_local_15_required_1_eq_row_8 j + +private theorem k8t5p3_local_15_path_1_0 : (⟨8, 5, [1, 2, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_1_1 : (⟨8, 0, [1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_1_2 : (⟨8, 0, [1, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_1_3 : (⟨8, 5, [1, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_1_4 : (⟨0, 6, [4, 1, 2, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_1_5 : (⟨0, 5, [4, 1, 2, 3, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_1_6 : (⟨0, 5, [4, 1, 2, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_1_7 : (⟨0, 1, [4, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_1_8 : (⟨0, 1, [4, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_1_9 : (⟨0, 1, [4, 2, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_1_10 : (⟨0, 1, [4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_1_11 : (⟨0, 2, [4, 5, 6, 7, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_paths_block_1 : ∀ p ∈ k8t5p3_step_15_required_block_1, p.Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by + simp only [k8t5p3_step_15_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_15_path_1_0, k8t5p3_local_15_path_1_1, k8t5p3_local_15_path_1_2, k8t5p3_local_15_path_1_3, k8t5p3_local_15_path_1_4, k8t5p3_local_15_path_1_5, k8t5p3_local_15_path_1_6, k8t5p3_local_15_path_1_7, k8t5p3_local_15_path_1_8, k8t5p3_local_15_path_1_9, k8t5p3_local_15_path_1_10, k8t5p3_local_15_path_1_11⟩ + +private def k8t5p3_local_15_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1}, {0}, {0, 1}, ∅, ∅, {0}, ∅, {0, 1}], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_15_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_2) 0 j = k8t5p3_local_15_required_2 0 j := by decide + +private theorem k8t5p3_local_15_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_2) 1 j = k8t5p3_local_15_required_2 1 j := by decide + +private theorem k8t5p3_local_15_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_2) 2 j = k8t5p3_local_15_required_2 2 j := by decide + +private theorem k8t5p3_local_15_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_2) 3 j = k8t5p3_local_15_required_2 3 j := by decide + +private theorem k8t5p3_local_15_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_2) 4 j = k8t5p3_local_15_required_2 4 j := by decide + +private theorem k8t5p3_local_15_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_2) 5 j = k8t5p3_local_15_required_2 5 j := by decide + +private theorem k8t5p3_local_15_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_2) 6 j = k8t5p3_local_15_required_2 6 j := by decide + +private theorem k8t5p3_local_15_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_2) 7 j = k8t5p3_local_15_required_2 7 j := by decide + +private theorem k8t5p3_local_15_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_15_required_block_2) 8 j = k8t5p3_local_15_required_2 8 j := by decide + +private theorem k8t5p3_local_15_required_2_eq : (requiredMatrix 8 k8t5p3_step_15_required_block_2) = k8t5p3_local_15_required_2 := by + funext i j + fin_cases i + + · exact k8t5p3_local_15_required_2_eq_row_0 j + + · exact k8t5p3_local_15_required_2_eq_row_1 j + + · exact k8t5p3_local_15_required_2_eq_row_2 j + + · exact k8t5p3_local_15_required_2_eq_row_3 j + + · exact k8t5p3_local_15_required_2_eq_row_4 j + + · exact k8t5p3_local_15_required_2_eq_row_5 j + + · exact k8t5p3_local_15_required_2_eq_row_6 j + + · exact k8t5p3_local_15_required_2_eq_row_7 j + + · exact k8t5p3_local_15_required_2_eq_row_8 j + +private theorem k8t5p3_local_15_path_2_0 : (⟨0, 3, [4, 5, 6, 7, 8, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_2_1 : (⟨0, 3, [4, 5, 6, 7, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_2_2 : (⟨0, 2, [4, 5, 6, 7, 8, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_2_3 : (⟨0, 1, [4, 5, 6, 7, 8, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_2_4 : (⟨0, 1, [4, 5, 6, 7, 8, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_2_5 : (⟨0, 8, [7, 6, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_2_6 : (⟨0, 8, [7, 6, 5, 4, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_path_2_7 : (⟨0, 6, [7, 8, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by decide + +private theorem k8t5p3_local_15_paths_block_2 : ∀ p ∈ k8t5p3_step_15_required_block_2, p.Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by + simp only [k8t5p3_step_15_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_15_path_2_0, k8t5p3_local_15_path_2_1, k8t5p3_local_15_path_2_2, k8t5p3_local_15_path_2_3, k8t5p3_local_15_path_2_4, k8t5p3_local_15_path_2_5, k8t5p3_local_15_path_2_6, k8t5p3_local_15_path_2_7⟩ + +private theorem k8t5p3_local_15_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_15 a b ∪ (((k8t5p3_local_15_required_0 a b ∪ k8t5p3_local_15_required_1 a b) ∪ k8t5p3_local_15_required_2 a b))) 0 j = k8t5p3_local_15 0 j := by decide + +private theorem k8t5p3_local_15_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_15 a b ∪ (((k8t5p3_local_15_required_0 a b ∪ k8t5p3_local_15_required_1 a b) ∪ k8t5p3_local_15_required_2 a b))) 1 j = k8t5p3_local_15 1 j := by decide + +private theorem k8t5p3_local_15_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_15 a b ∪ (((k8t5p3_local_15_required_0 a b ∪ k8t5p3_local_15_required_1 a b) ∪ k8t5p3_local_15_required_2 a b))) 2 j = k8t5p3_local_15 2 j := by decide + +private theorem k8t5p3_local_15_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_15 a b ∪ (((k8t5p3_local_15_required_0 a b ∪ k8t5p3_local_15_required_1 a b) ∪ k8t5p3_local_15_required_2 a b))) 3 j = k8t5p3_local_15 3 j := by decide + +private theorem k8t5p3_local_15_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_15 a b ∪ (((k8t5p3_local_15_required_0 a b ∪ k8t5p3_local_15_required_1 a b) ∪ k8t5p3_local_15_required_2 a b))) 4 j = k8t5p3_local_15 4 j := by decide + +private theorem k8t5p3_local_15_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_15 a b ∪ (((k8t5p3_local_15_required_0 a b ∪ k8t5p3_local_15_required_1 a b) ∪ k8t5p3_local_15_required_2 a b))) 5 j = k8t5p3_local_15 5 j := by decide + +private theorem k8t5p3_local_15_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_15 a b ∪ (((k8t5p3_local_15_required_0 a b ∪ k8t5p3_local_15_required_1 a b) ∪ k8t5p3_local_15_required_2 a b))) 6 j = k8t5p3_local_15 6 j := by decide + +private theorem k8t5p3_local_15_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_15 a b ∪ (((k8t5p3_local_15_required_0 a b ∪ k8t5p3_local_15_required_1 a b) ∪ k8t5p3_local_15_required_2 a b))) 7 j = k8t5p3_local_15 7 j := by decide + +private theorem k8t5p3_local_15_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_15 a b ∪ (((k8t5p3_local_15_required_0 a b ∪ k8t5p3_local_15_required_1 a b) ∪ k8t5p3_local_15_required_2 a b))) 8 j = k8t5p3_local_15 8 j := by decide + +private theorem k8t5p3_local_15_merged_eq : (fun a b => freshMatrix k8t5p3_state_15 a b ∪ (((k8t5p3_local_15_required_0 a b ∪ k8t5p3_local_15_required_1 a b) ∪ k8t5p3_local_15_required_2 a b))) = k8t5p3_local_15 := by + funext i j + fin_cases i + + · exact k8t5p3_local_15_merged_eq_row_0 j + + · exact k8t5p3_local_15_merged_eq_row_1 j + + · exact k8t5p3_local_15_merged_eq_row_2 j + + · exact k8t5p3_local_15_merged_eq_row_3 j + + · exact k8t5p3_local_15_merged_eq_row_4 j + + · exact k8t5p3_local_15_merged_eq_row_5 j + + · exact k8t5p3_local_15_merged_eq_row_6 j + + · exact k8t5p3_local_15_merged_eq_row_7 j + + · exact k8t5p3_local_15_merged_eq_row_8 j + +private theorem k8t5p3_local_15_eq : (fun a b => freshMatrix k8t5p3_state_15 a b ∪ requiredMatrix 8 k8t5p3_step_15_data.required a b) = k8t5p3_local_15 := by + funext a b + change freshMatrix k8t5p3_state_15 a b ∪ requiredMatrix 8 (k8t5p3_step_15_required_block_0 ++ k8t5p3_step_15_required_block_1 ++ k8t5p3_step_15_required_block_2) a b = _ + simp only [requiredMatrix_append, k8t5p3_local_15_required_0_eq, k8t5p3_local_15_required_1_eq, k8t5p3_local_15_required_2_eq] + exact congrFun (congrFun k8t5p3_local_15_merged_eq a) b + +private theorem k8t5p3_local_15_paths : ∀ p ∈ k8t5p3_step_15_data.required, p.Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 := by + change ∀ p ∈ (k8t5p3_step_15_required_block_0 ++ k8t5p3_step_15_required_block_1 ++ k8t5p3_step_15_required_block_2), p.Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) 8 + simp only [List.forall_mem_append] + exact ⟨⟨k8t5p3_local_15_paths_block_0, k8t5p3_local_15_paths_block_1⟩, k8t5p3_local_15_paths_block_2⟩ + +private theorem k8t5p3_local_15_bad : k8t5p3_step_15_data.bad.Check (freshGraph k8t5p3.graph k8t5p3_step_15_data.i k8t5p3_step_15_data.j) k8t5p3_local_15 8 5 := by decide + +private theorem k8t5p3_step_15_check : k8t5p3_step_15.Check k8t5p3.graph k8t5p3_state_15 8 5 := by + change k8t5p3_step_15_data.Check k8t5p3.graph k8t5p3_state_15 8 5 + refine ⟨by decide, k8t5p3_local_15_paths, ?_⟩ + rw [k8t5p3_local_15_eq] + exact k8t5p3_local_15_bad + +private theorem k8t5p3_update_15 : k8t5p3_step_15.apply k8t5p3_state_15 = k8t5p3_state_16 := by + have h : ∀ i j : Fin 8, k8t5p3_step_15.apply k8t5p3_state_15 i j = k8t5p3_state_16 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_17 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_16 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_16_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t5p3_state_16 a b ∪ requiredMatrix 8 k8t5p3_step_16_data.required a b) 0 j = k8t5p3_local_16 0 j := by decide + +private theorem k8t5p3_local_16_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t5p3_state_16 a b ∪ requiredMatrix 8 k8t5p3_step_16_data.required a b) 1 j = k8t5p3_local_16 1 j := by decide + +private theorem k8t5p3_local_16_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t5p3_state_16 a b ∪ requiredMatrix 8 k8t5p3_step_16_data.required a b) 2 j = k8t5p3_local_16 2 j := by decide + +private theorem k8t5p3_local_16_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t5p3_state_16 a b ∪ requiredMatrix 8 k8t5p3_step_16_data.required a b) 3 j = k8t5p3_local_16 3 j := by decide + +private theorem k8t5p3_local_16_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t5p3_state_16 a b ∪ requiredMatrix 8 k8t5p3_step_16_data.required a b) 4 j = k8t5p3_local_16 4 j := by decide + +private theorem k8t5p3_local_16_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t5p3_state_16 a b ∪ requiredMatrix 8 k8t5p3_step_16_data.required a b) 5 j = k8t5p3_local_16 5 j := by decide + +private theorem k8t5p3_local_16_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t5p3_state_16 a b ∪ requiredMatrix 8 k8t5p3_step_16_data.required a b) 6 j = k8t5p3_local_16 6 j := by decide + +private theorem k8t5p3_local_16_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t5p3_state_16 a b ∪ requiredMatrix 8 k8t5p3_step_16_data.required a b) 7 j = k8t5p3_local_16 7 j := by decide + +private theorem k8t5p3_local_16_eq : (fun a b => k8t5p3_state_16 a b ∪ requiredMatrix 8 k8t5p3_step_16_data.required a b) = k8t5p3_local_16 := by + funext i j + fin_cases i + + · exact k8t5p3_local_16_eq_row_0 j + + · exact k8t5p3_local_16_eq_row_1 j + + · exact k8t5p3_local_16_eq_row_2 j + + · exact k8t5p3_local_16_eq_row_3 j + + · exact k8t5p3_local_16_eq_row_4 j + + · exact k8t5p3_local_16_eq_row_5 j + + · exact k8t5p3_local_16_eq_row_6 j + + · exact k8t5p3_local_16_eq_row_7 j + +private theorem k8t5p3_local_16_paths : ∀ p ∈ k8t5p3_step_16_data.required, p.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_16_data.i k8t5p3_step_16_data.j) 8 := by decide + +private theorem k8t5p3_local_16_bad : k8t5p3_step_16_data.bad.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_16_data.i k8t5p3_step_16_data.j) k8t5p3_local_16 8 5 := by decide + +private theorem k8t5p3_step_16_check : k8t5p3_step_16.Check k8t5p3.graph k8t5p3_state_16 8 5 := by + change k8t5p3_step_16_data.Check k8t5p3.graph k8t5p3_state_16 8 5 + refine ⟨k8t5p3_local_16_paths, ?_⟩ + rw [k8t5p3_local_16_eq] + exact k8t5p3_local_16_bad + +private theorem k8t5p3_update_16 : k8t5p3_step_16.apply k8t5p3_state_16 = k8t5p3_state_17 := by + have h : ∀ i j : Fin 8, k8t5p3_step_16.apply k8t5p3_state_16 i j = k8t5p3_state_17 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_18 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_17 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, Finset.Icc 0 4, ∅, Finset.Icc 0 3, ∅, {0}], + #[Finset.Icc 0 4, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{0}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{0}, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 0 4, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5], + #[∅, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 0 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_17_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, Finset.Icc 0 4, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_17_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_0) 0 j = k8t5p3_local_17_required_0 0 j := by decide + +private theorem k8t5p3_local_17_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_0) 1 j = k8t5p3_local_17_required_0 1 j := by decide + +private theorem k8t5p3_local_17_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_0) 2 j = k8t5p3_local_17_required_0 2 j := by decide + +private theorem k8t5p3_local_17_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_0) 3 j = k8t5p3_local_17_required_0 3 j := by decide + +private theorem k8t5p3_local_17_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_0) 4 j = k8t5p3_local_17_required_0 4 j := by decide + +private theorem k8t5p3_local_17_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_0) 5 j = k8t5p3_local_17_required_0 5 j := by decide + +private theorem k8t5p3_local_17_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_0) 6 j = k8t5p3_local_17_required_0 6 j := by decide + +private theorem k8t5p3_local_17_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_0) 7 j = k8t5p3_local_17_required_0 7 j := by decide + +private theorem k8t5p3_local_17_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_0) 8 j = k8t5p3_local_17_required_0 8 j := by decide + +private theorem k8t5p3_local_17_required_0_eq : (requiredMatrix 8 k8t5p3_step_17_required_block_0) = k8t5p3_local_17_required_0 := by + funext i j + fin_cases i + + · exact k8t5p3_local_17_required_0_eq_row_0 j + + · exact k8t5p3_local_17_required_0_eq_row_1 j + + · exact k8t5p3_local_17_required_0_eq_row_2 j + + · exact k8t5p3_local_17_required_0_eq_row_3 j + + · exact k8t5p3_local_17_required_0_eq_row_4 j + + · exact k8t5p3_local_17_required_0_eq_row_5 j + + · exact k8t5p3_local_17_required_0_eq_row_6 j + + · exact k8t5p3_local_17_required_0_eq_row_7 j + + · exact k8t5p3_local_17_required_0_eq_row_8 j + +private theorem k8t5p3_local_17_path_0_0 : (⟨1, 0, [2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_0_1 : (⟨1, 6, [2, 3, 4, 5, 0, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_0_2 : (⟨1, 0, [2, 3, 4, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_0_3 : (⟨1, 0, [2, 3, 4, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_0_4 : (⟨1, 6, [2, 3, 4, 8, 7, 0, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_0_5 : (⟨4, 0, [1, 2, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_0_6 : (⟨4, 0, [1, 2, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_0_7 : (⟨4, 6, [1, 2, 3, 8, 7, 0, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_0_8 : (⟨4, 0, [1, 2, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_0_9 : (⟨4, 0, [1, 2, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_0_10 : (⟨4, 6, [1, 2, 8, 7, 0, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_0_11 : (⟨4, 0, [1, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_paths_block_0 : ∀ p ∈ k8t5p3_step_17_required_block_0, p.Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by + simp only [k8t5p3_step_17_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_17_path_0_0, k8t5p3_local_17_path_0_1, k8t5p3_local_17_path_0_2, k8t5p3_local_17_path_0_3, k8t5p3_local_17_path_0_4, k8t5p3_local_17_path_0_5, k8t5p3_local_17_path_0_6, k8t5p3_local_17_path_0_7, k8t5p3_local_17_path_0_8, k8t5p3_local_17_path_0_9, k8t5p3_local_17_path_0_10, k8t5p3_local_17_path_0_11⟩ + +private def k8t5p3_local_17_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, {0, 1}, {0, 1}, {0, 1}, {0, 1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_17_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_1) 0 j = k8t5p3_local_17_required_1 0 j := by decide + +private theorem k8t5p3_local_17_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_1) 1 j = k8t5p3_local_17_required_1 1 j := by decide + +private theorem k8t5p3_local_17_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_1) 2 j = k8t5p3_local_17_required_1 2 j := by decide + +private theorem k8t5p3_local_17_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_1) 3 j = k8t5p3_local_17_required_1 3 j := by decide + +private theorem k8t5p3_local_17_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_1) 4 j = k8t5p3_local_17_required_1 4 j := by decide + +private theorem k8t5p3_local_17_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_1) 5 j = k8t5p3_local_17_required_1 5 j := by decide + +private theorem k8t5p3_local_17_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_1) 6 j = k8t5p3_local_17_required_1 6 j := by decide + +private theorem k8t5p3_local_17_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_1) 7 j = k8t5p3_local_17_required_1 7 j := by decide + +private theorem k8t5p3_local_17_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_1) 8 j = k8t5p3_local_17_required_1 8 j := by decide + +private theorem k8t5p3_local_17_required_1_eq : (requiredMatrix 8 k8t5p3_step_17_required_block_1) = k8t5p3_local_17_required_1 := by + funext i j + fin_cases i + + · exact k8t5p3_local_17_required_1_eq_row_0 j + + · exact k8t5p3_local_17_required_1_eq_row_1 j + + · exact k8t5p3_local_17_required_1_eq_row_2 j + + · exact k8t5p3_local_17_required_1_eq_row_3 j + + · exact k8t5p3_local_17_required_1_eq_row_4 j + + · exact k8t5p3_local_17_required_1_eq_row_5 j + + · exact k8t5p3_local_17_required_1_eq_row_6 j + + · exact k8t5p3_local_17_required_1_eq_row_7 j + + · exact k8t5p3_local_17_required_1_eq_row_8 j + +private theorem k8t5p3_local_17_path_1_0 : (⟨6, 0, [5, 4, 1, 2, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_1_1 : (⟨6, 0, [5, 4, 1, 2, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_1_2 : (⟨6, 0, [5, 4, 1, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_1_3 : (⟨6, 0, [5, 4, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_1_4 : (⟨6, 3, [5, 0, 7, 8, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_1_5 : (⟨6, 4, [5, 0, 7, 8, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_1_6 : (⟨6, 4, [5, 0, 7, 8, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_1_7 : (⟨6, 3, [5, 0, 7, 8, 1, 2, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_1_8 : (⟨6, 2, [5, 0, 7, 8, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_1_9 : (⟨6, 2, [5, 0, 7, 8, 1, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_1_10 : (⟨6, 1, [5, 0, 7, 8, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_1_11 : (⟨6, 1, [5, 0, 7, 8, 2, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_paths_block_1 : ∀ p ∈ k8t5p3_step_17_required_block_1, p.Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by + simp only [k8t5p3_step_17_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_17_path_1_0, k8t5p3_local_17_path_1_1, k8t5p3_local_17_path_1_2, k8t5p3_local_17_path_1_3, k8t5p3_local_17_path_1_4, k8t5p3_local_17_path_1_5, k8t5p3_local_17_path_1_6, k8t5p3_local_17_path_1_7, k8t5p3_local_17_path_1_8, k8t5p3_local_17_path_1_9, k8t5p3_local_17_path_1_10, k8t5p3_local_17_path_1_11⟩ + +private def k8t5p3_local_17_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, {0}, ∅, {0}, ∅, {0}], + #[Finset.Icc 0 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_17_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_2) 0 j = k8t5p3_local_17_required_2 0 j := by decide + +private theorem k8t5p3_local_17_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_2) 1 j = k8t5p3_local_17_required_2 1 j := by decide + +private theorem k8t5p3_local_17_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_2) 2 j = k8t5p3_local_17_required_2 2 j := by decide + +private theorem k8t5p3_local_17_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_2) 3 j = k8t5p3_local_17_required_2 3 j := by decide + +private theorem k8t5p3_local_17_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_2) 4 j = k8t5p3_local_17_required_2 4 j := by decide + +private theorem k8t5p3_local_17_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_2) 5 j = k8t5p3_local_17_required_2 5 j := by decide + +private theorem k8t5p3_local_17_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_2) 6 j = k8t5p3_local_17_required_2 6 j := by decide + +private theorem k8t5p3_local_17_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_2) 7 j = k8t5p3_local_17_required_2 7 j := by decide + +private theorem k8t5p3_local_17_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_17_required_block_2) 8 j = k8t5p3_local_17_required_2 8 j := by decide + +private theorem k8t5p3_local_17_required_2_eq : (requiredMatrix 8 k8t5p3_step_17_required_block_2) = k8t5p3_local_17_required_2 := by + funext i j + fin_cases i + + · exact k8t5p3_local_17_required_2_eq_row_0 j + + · exact k8t5p3_local_17_required_2_eq_row_1 j + + · exact k8t5p3_local_17_required_2_eq_row_2 j + + · exact k8t5p3_local_17_required_2_eq_row_3 j + + · exact k8t5p3_local_17_required_2_eq_row_4 j + + · exact k8t5p3_local_17_required_2_eq_row_5 j + + · exact k8t5p3_local_17_required_2_eq_row_6 j + + · exact k8t5p3_local_17_required_2_eq_row_7 j + + · exact k8t5p3_local_17_required_2_eq_row_8 j + +private theorem k8t5p3_local_17_path_2_0 : (⟨6, 8, [7, 0, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_2_1 : (⟨6, 8, [7, 0, 5, 4, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_2_2 : (⟨0, 6, [5, 4, 1, 2, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_2_3 : (⟨0, 1, [5, 4, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_2_4 : (⟨0, 1, [5, 4, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_2_5 : (⟨0, 1, [5, 4, 2, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_2_6 : (⟨0, 4, [5, 6, 7, 8, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_2_7 : (⟨0, 3, [5, 6, 7, 8, 1, 2, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_2_8 : (⟨0, 2, [5, 6, 7, 8, 1, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_2_9 : (⟨0, 1, [5, 6, 7, 8, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_2_10 : (⟨0, 1, [5, 6, 7, 8, 2, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_path_2_11 : (⟨0, 8, [7, 6, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by decide + +private theorem k8t5p3_local_17_paths_block_2 : ∀ p ∈ k8t5p3_step_17_required_block_2, p.Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by + simp only [k8t5p3_step_17_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_17_path_2_0, k8t5p3_local_17_path_2_1, k8t5p3_local_17_path_2_2, k8t5p3_local_17_path_2_3, k8t5p3_local_17_path_2_4, k8t5p3_local_17_path_2_5, k8t5p3_local_17_path_2_6, k8t5p3_local_17_path_2_7, k8t5p3_local_17_path_2_8, k8t5p3_local_17_path_2_9, k8t5p3_local_17_path_2_10, k8t5p3_local_17_path_2_11⟩ + +private theorem k8t5p3_local_17_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_17 a b ∪ (((k8t5p3_local_17_required_0 a b ∪ k8t5p3_local_17_required_1 a b) ∪ k8t5p3_local_17_required_2 a b))) 0 j = k8t5p3_local_17 0 j := by decide + +private theorem k8t5p3_local_17_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_17 a b ∪ (((k8t5p3_local_17_required_0 a b ∪ k8t5p3_local_17_required_1 a b) ∪ k8t5p3_local_17_required_2 a b))) 1 j = k8t5p3_local_17 1 j := by decide + +private theorem k8t5p3_local_17_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_17 a b ∪ (((k8t5p3_local_17_required_0 a b ∪ k8t5p3_local_17_required_1 a b) ∪ k8t5p3_local_17_required_2 a b))) 2 j = k8t5p3_local_17 2 j := by decide + +private theorem k8t5p3_local_17_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_17 a b ∪ (((k8t5p3_local_17_required_0 a b ∪ k8t5p3_local_17_required_1 a b) ∪ k8t5p3_local_17_required_2 a b))) 3 j = k8t5p3_local_17 3 j := by decide + +private theorem k8t5p3_local_17_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_17 a b ∪ (((k8t5p3_local_17_required_0 a b ∪ k8t5p3_local_17_required_1 a b) ∪ k8t5p3_local_17_required_2 a b))) 4 j = k8t5p3_local_17 4 j := by decide + +private theorem k8t5p3_local_17_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_17 a b ∪ (((k8t5p3_local_17_required_0 a b ∪ k8t5p3_local_17_required_1 a b) ∪ k8t5p3_local_17_required_2 a b))) 5 j = k8t5p3_local_17 5 j := by decide + +private theorem k8t5p3_local_17_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_17 a b ∪ (((k8t5p3_local_17_required_0 a b ∪ k8t5p3_local_17_required_1 a b) ∪ k8t5p3_local_17_required_2 a b))) 6 j = k8t5p3_local_17 6 j := by decide + +private theorem k8t5p3_local_17_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_17 a b ∪ (((k8t5p3_local_17_required_0 a b ∪ k8t5p3_local_17_required_1 a b) ∪ k8t5p3_local_17_required_2 a b))) 7 j = k8t5p3_local_17 7 j := by decide + +private theorem k8t5p3_local_17_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_17 a b ∪ (((k8t5p3_local_17_required_0 a b ∪ k8t5p3_local_17_required_1 a b) ∪ k8t5p3_local_17_required_2 a b))) 8 j = k8t5p3_local_17 8 j := by decide + +private theorem k8t5p3_local_17_merged_eq : (fun a b => freshMatrix k8t5p3_state_17 a b ∪ (((k8t5p3_local_17_required_0 a b ∪ k8t5p3_local_17_required_1 a b) ∪ k8t5p3_local_17_required_2 a b))) = k8t5p3_local_17 := by + funext i j + fin_cases i + + · exact k8t5p3_local_17_merged_eq_row_0 j + + · exact k8t5p3_local_17_merged_eq_row_1 j + + · exact k8t5p3_local_17_merged_eq_row_2 j + + · exact k8t5p3_local_17_merged_eq_row_3 j + + · exact k8t5p3_local_17_merged_eq_row_4 j + + · exact k8t5p3_local_17_merged_eq_row_5 j + + · exact k8t5p3_local_17_merged_eq_row_6 j + + · exact k8t5p3_local_17_merged_eq_row_7 j + + · exact k8t5p3_local_17_merged_eq_row_8 j + +private theorem k8t5p3_local_17_eq : (fun a b => freshMatrix k8t5p3_state_17 a b ∪ requiredMatrix 8 k8t5p3_step_17_data.required a b) = k8t5p3_local_17 := by + funext a b + change freshMatrix k8t5p3_state_17 a b ∪ requiredMatrix 8 (k8t5p3_step_17_required_block_0 ++ k8t5p3_step_17_required_block_1 ++ k8t5p3_step_17_required_block_2) a b = _ + simp only [requiredMatrix_append, k8t5p3_local_17_required_0_eq, k8t5p3_local_17_required_1_eq, k8t5p3_local_17_required_2_eq] + exact congrFun (congrFun k8t5p3_local_17_merged_eq a) b + +private theorem k8t5p3_local_17_paths : ∀ p ∈ k8t5p3_step_17_data.required, p.Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 := by + change ∀ p ∈ (k8t5p3_step_17_required_block_0 ++ k8t5p3_step_17_required_block_1 ++ k8t5p3_step_17_required_block_2), p.Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) 8 + simp only [List.forall_mem_append] + exact ⟨⟨k8t5p3_local_17_paths_block_0, k8t5p3_local_17_paths_block_1⟩, k8t5p3_local_17_paths_block_2⟩ + +private theorem k8t5p3_local_17_bad : k8t5p3_step_17_data.bad.Check (freshGraph k8t5p3.graph k8t5p3_step_17_data.i k8t5p3_step_17_data.j) k8t5p3_local_17 8 5 := by decide + +private theorem k8t5p3_step_17_check : k8t5p3_step_17.Check k8t5p3.graph k8t5p3_state_17 8 5 := by + change k8t5p3_step_17_data.Check k8t5p3.graph k8t5p3_state_17 8 5 + refine ⟨by decide, k8t5p3_local_17_paths, ?_⟩ + rw [k8t5p3_local_17_eq] + exact k8t5p3_local_17_bad + +private theorem k8t5p3_update_17 : k8t5p3_step_17.apply k8t5p3_state_17 = k8t5p3_state_18 := by + have h : ∀ i j : Fin 8, k8t5p3_step_17.apply k8t5p3_state_17 i j = k8t5p3_state_18 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_19 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0}], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_18 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_18_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t5p3_state_18 a b ∪ requiredMatrix 8 k8t5p3_step_18_data.required a b) 0 j = k8t5p3_local_18 0 j := by decide + +private theorem k8t5p3_local_18_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t5p3_state_18 a b ∪ requiredMatrix 8 k8t5p3_step_18_data.required a b) 1 j = k8t5p3_local_18 1 j := by decide + +private theorem k8t5p3_local_18_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t5p3_state_18 a b ∪ requiredMatrix 8 k8t5p3_step_18_data.required a b) 2 j = k8t5p3_local_18 2 j := by decide + +private theorem k8t5p3_local_18_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t5p3_state_18 a b ∪ requiredMatrix 8 k8t5p3_step_18_data.required a b) 3 j = k8t5p3_local_18 3 j := by decide + +private theorem k8t5p3_local_18_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t5p3_state_18 a b ∪ requiredMatrix 8 k8t5p3_step_18_data.required a b) 4 j = k8t5p3_local_18 4 j := by decide + +private theorem k8t5p3_local_18_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t5p3_state_18 a b ∪ requiredMatrix 8 k8t5p3_step_18_data.required a b) 5 j = k8t5p3_local_18 5 j := by decide + +private theorem k8t5p3_local_18_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t5p3_state_18 a b ∪ requiredMatrix 8 k8t5p3_step_18_data.required a b) 6 j = k8t5p3_local_18 6 j := by decide + +private theorem k8t5p3_local_18_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t5p3_state_18 a b ∪ requiredMatrix 8 k8t5p3_step_18_data.required a b) 7 j = k8t5p3_local_18 7 j := by decide + +private theorem k8t5p3_local_18_eq : (fun a b => k8t5p3_state_18 a b ∪ requiredMatrix 8 k8t5p3_step_18_data.required a b) = k8t5p3_local_18 := by + funext i j + fin_cases i + + · exact k8t5p3_local_18_eq_row_0 j + + · exact k8t5p3_local_18_eq_row_1 j + + · exact k8t5p3_local_18_eq_row_2 j + + · exact k8t5p3_local_18_eq_row_3 j + + · exact k8t5p3_local_18_eq_row_4 j + + · exact k8t5p3_local_18_eq_row_5 j + + · exact k8t5p3_local_18_eq_row_6 j + + · exact k8t5p3_local_18_eq_row_7 j + +private theorem k8t5p3_local_18_paths : ∀ p ∈ k8t5p3_step_18_data.required, p.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_18_data.i k8t5p3_step_18_data.j) 8 := by decide + +private theorem k8t5p3_local_18_bad : k8t5p3_step_18_data.bad.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_18_data.i k8t5p3_step_18_data.j) k8t5p3_local_18 8 5 := by decide + +private theorem k8t5p3_step_18_check : k8t5p3_step_18.Check k8t5p3.graph k8t5p3_state_18 8 5 := by + change k8t5p3_step_18_data.Check k8t5p3.graph k8t5p3_state_18 8 5 + refine ⟨k8t5p3_local_18_paths, ?_⟩ + rw [k8t5p3_local_18_eq] + exact k8t5p3_local_18_bad + +private theorem k8t5p3_update_18 : k8t5p3_step_18.apply k8t5p3_state_18 = k8t5p3_state_19 := by + have h : ∀ i j : Fin 8, k8t5p3_step_18.apply k8t5p3_state_18 i j = k8t5p3_state_19 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_20 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_19 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 0 5, {0, 1}, {0, 1}, Finset.Icc 0 5, ∅, {0, 1}, {0, 1}, ∅], + #[Finset.Icc 0 5, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{0, 1}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{0, 1}, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 0 5, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 2}, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0}], + #[{0, 1}, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1, 2}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_19_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, {0, 1, 3, 4}, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, {0, 1}, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 3, 4}, ∅, ∅, ∅, ∅, ∅, {1}, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, ∅, ∅, {1}, ∅, ∅, ∅, ∅], + #[∅, {0}, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_19_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_0) 0 j = k8t5p3_local_19_required_0 0 j := by decide + +private theorem k8t5p3_local_19_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_0) 1 j = k8t5p3_local_19_required_0 1 j := by decide + +private theorem k8t5p3_local_19_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_0) 2 j = k8t5p3_local_19_required_0 2 j := by decide + +private theorem k8t5p3_local_19_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_0) 3 j = k8t5p3_local_19_required_0 3 j := by decide + +private theorem k8t5p3_local_19_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_0) 4 j = k8t5p3_local_19_required_0 4 j := by decide + +private theorem k8t5p3_local_19_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_0) 5 j = k8t5p3_local_19_required_0 5 j := by decide + +private theorem k8t5p3_local_19_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_0) 6 j = k8t5p3_local_19_required_0 6 j := by decide + +private theorem k8t5p3_local_19_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_0) 7 j = k8t5p3_local_19_required_0 7 j := by decide + +private theorem k8t5p3_local_19_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_0) 8 j = k8t5p3_local_19_required_0 8 j := by decide + +private theorem k8t5p3_local_19_required_0_eq : (requiredMatrix 8 k8t5p3_step_19_required_block_0) = k8t5p3_local_19_required_0 := by + funext i j + fin_cases i + + · exact k8t5p3_local_19_required_0_eq_row_0 j + + · exact k8t5p3_local_19_required_0_eq_row_1 j + + · exact k8t5p3_local_19_required_0_eq_row_2 j + + · exact k8t5p3_local_19_required_0_eq_row_3 j + + · exact k8t5p3_local_19_required_0_eq_row_4 j + + · exact k8t5p3_local_19_required_0_eq_row_5 j + + · exact k8t5p3_local_19_required_0_eq_row_6 j + + · exact k8t5p3_local_19_required_0_eq_row_7 j + + · exact k8t5p3_local_19_required_0_eq_row_8 j + +private theorem k8t5p3_local_19_path_0_0 : (⟨1, 0, [2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_0_1 : (⟨1, 6, [2, 3, 4, 5, 0, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_0_2 : (⟨1, 6, [2, 3, 4, 8, 0, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_0_3 : (⟨1, 7, [2, 3, 4, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_0_4 : (⟨1, 0, [2, 3, 8, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_0_5 : (⟨1, 0, [2, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_0_6 : (⟨4, 0, [1, 2, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_0_7 : (⟨4, 0, [1, 2, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_0_8 : (⟨4, 6, [1, 2, 3, 8, 0, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_0_9 : (⟨4, 7, [1, 2, 3, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_0_10 : (⟨4, 0, [1, 2, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_0_11 : (⟨4, 0, [1, 2, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_paths_block_0 : ∀ p ∈ k8t5p3_step_19_required_block_0, p.Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by + simp only [k8t5p3_step_19_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_19_path_0_0, k8t5p3_local_19_path_0_1, k8t5p3_local_19_path_0_2, k8t5p3_local_19_path_0_3, k8t5p3_local_19_path_0_4, k8t5p3_local_19_path_0_5, k8t5p3_local_19_path_0_6, k8t5p3_local_19_path_0_7, k8t5p3_local_19_path_0_8, k8t5p3_local_19_path_0_9, k8t5p3_local_19_path_0_10, k8t5p3_local_19_path_0_11⟩ + +private def k8t5p3_local_19_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 2 5, ∅, {1}, {2, 5}, ∅, {0, 1}, {1}, ∅], + #[Finset.Icc 2 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 5}, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_19_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_1) 0 j = k8t5p3_local_19_required_1 0 j := by decide + +private theorem k8t5p3_local_19_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_1) 1 j = k8t5p3_local_19_required_1 1 j := by decide + +private theorem k8t5p3_local_19_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_1) 2 j = k8t5p3_local_19_required_1 2 j := by decide + +private theorem k8t5p3_local_19_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_1) 3 j = k8t5p3_local_19_required_1 3 j := by decide + +private theorem k8t5p3_local_19_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_1) 4 j = k8t5p3_local_19_required_1 4 j := by decide + +private theorem k8t5p3_local_19_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_1) 5 j = k8t5p3_local_19_required_1 5 j := by decide + +private theorem k8t5p3_local_19_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_1) 6 j = k8t5p3_local_19_required_1 6 j := by decide + +private theorem k8t5p3_local_19_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_1) 7 j = k8t5p3_local_19_required_1 7 j := by decide + +private theorem k8t5p3_local_19_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_1) 8 j = k8t5p3_local_19_required_1 8 j := by decide + +private theorem k8t5p3_local_19_required_1_eq : (requiredMatrix 8 k8t5p3_step_19_required_block_1) = k8t5p3_local_19_required_1 := by + funext i j + fin_cases i + + · exact k8t5p3_local_19_required_1_eq_row_0 j + + · exact k8t5p3_local_19_required_1_eq_row_1 j + + · exact k8t5p3_local_19_required_1_eq_row_2 j + + · exact k8t5p3_local_19_required_1_eq_row_3 j + + · exact k8t5p3_local_19_required_1_eq_row_4 j + + · exact k8t5p3_local_19_required_1_eq_row_5 j + + · exact k8t5p3_local_19_required_1_eq_row_6 j + + · exact k8t5p3_local_19_required_1_eq_row_7 j + + · exact k8t5p3_local_19_required_1_eq_row_8 j + +private theorem k8t5p3_local_19_path_1_0 : (⟨4, 7, [1, 2, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_1_1 : (⟨4, 0, [1, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_1_2 : (⟨4, 0, [1, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_1_3 : (⟨4, 7, [1, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_1_4 : (⟨0, 1, [5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_1_5 : (⟨0, 7, [5, 4, 1, 2, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_1_6 : (⟨0, 6, [5, 4, 1, 2, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_1_7 : (⟨0, 6, [5, 4, 1, 2, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_1_8 : (⟨0, 1, [5, 4, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_1_9 : (⟨0, 1, [5, 4, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_1_10 : (⟨0, 1, [5, 4, 2, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_1_11 : (⟨0, 3, [5, 6, 7, 8, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_paths_block_1 : ∀ p ∈ k8t5p3_step_19_required_block_1, p.Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by + simp only [k8t5p3_step_19_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_19_path_1_0, k8t5p3_local_19_path_1_1, k8t5p3_local_19_path_1_2, k8t5p3_local_19_path_1_3, k8t5p3_local_19_path_1_4, k8t5p3_local_19_path_1_5, k8t5p3_local_19_path_1_6, k8t5p3_local_19_path_1_7, k8t5p3_local_19_path_1_8, k8t5p3_local_19_path_1_9, k8t5p3_local_19_path_1_10, k8t5p3_local_19_path_1_11⟩ + +private def k8t5p3_local_19_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, {0}, {0, 1}, ∅, ∅, {0}, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_19_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_2) 0 j = k8t5p3_local_19_required_2 0 j := by decide + +private theorem k8t5p3_local_19_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_2) 1 j = k8t5p3_local_19_required_2 1 j := by decide + +private theorem k8t5p3_local_19_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_2) 2 j = k8t5p3_local_19_required_2 2 j := by decide + +private theorem k8t5p3_local_19_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_2) 3 j = k8t5p3_local_19_required_2 3 j := by decide + +private theorem k8t5p3_local_19_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_2) 4 j = k8t5p3_local_19_required_2 4 j := by decide + +private theorem k8t5p3_local_19_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_2) 5 j = k8t5p3_local_19_required_2 5 j := by decide + +private theorem k8t5p3_local_19_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_2) 6 j = k8t5p3_local_19_required_2 6 j := by decide + +private theorem k8t5p3_local_19_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_2) 7 j = k8t5p3_local_19_required_2 7 j := by decide + +private theorem k8t5p3_local_19_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 8 k8t5p3_step_19_required_block_2) 8 j = k8t5p3_local_19_required_2 8 j := by decide + +private theorem k8t5p3_local_19_required_2_eq : (requiredMatrix 8 k8t5p3_step_19_required_block_2) = k8t5p3_local_19_required_2 := by + funext i j + fin_cases i + + · exact k8t5p3_local_19_required_2_eq_row_0 j + + · exact k8t5p3_local_19_required_2_eq_row_1 j + + · exact k8t5p3_local_19_required_2_eq_row_2 j + + · exact k8t5p3_local_19_required_2_eq_row_3 j + + · exact k8t5p3_local_19_required_2_eq_row_4 j + + · exact k8t5p3_local_19_required_2_eq_row_5 j + + · exact k8t5p3_local_19_required_2_eq_row_6 j + + · exact k8t5p3_local_19_required_2_eq_row_7 j + + · exact k8t5p3_local_19_required_2_eq_row_8 j + +private theorem k8t5p3_local_19_path_2_0 : (⟨0, 4, [5, 6, 7, 8, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_2_1 : (⟨0, 4, [5, 6, 7, 8, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_2_2 : (⟨0, 3, [5, 6, 7, 8, 1, 2, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_2_3 : (⟨0, 2, [5, 6, 7, 8, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_2_4 : (⟨0, 2, [5, 6, 7, 8, 1, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_2_5 : (⟨0, 1, [5, 6, 7, 8, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_2_6 : (⟨0, 1, [5, 6, 7, 8, 2, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_path_2_7 : (⟨0, 7, [8, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by decide + +private theorem k8t5p3_local_19_paths_block_2 : ∀ p ∈ k8t5p3_step_19_required_block_2, p.Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by + simp only [k8t5p3_step_19_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_local_19_path_2_0, k8t5p3_local_19_path_2_1, k8t5p3_local_19_path_2_2, k8t5p3_local_19_path_2_3, k8t5p3_local_19_path_2_4, k8t5p3_local_19_path_2_5, k8t5p3_local_19_path_2_6, k8t5p3_local_19_path_2_7⟩ + +private theorem k8t5p3_local_19_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_19 a b ∪ (((k8t5p3_local_19_required_0 a b ∪ k8t5p3_local_19_required_1 a b) ∪ k8t5p3_local_19_required_2 a b))) 0 j = k8t5p3_local_19 0 j := by decide + +private theorem k8t5p3_local_19_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_19 a b ∪ (((k8t5p3_local_19_required_0 a b ∪ k8t5p3_local_19_required_1 a b) ∪ k8t5p3_local_19_required_2 a b))) 1 j = k8t5p3_local_19 1 j := by decide + +private theorem k8t5p3_local_19_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_19 a b ∪ (((k8t5p3_local_19_required_0 a b ∪ k8t5p3_local_19_required_1 a b) ∪ k8t5p3_local_19_required_2 a b))) 2 j = k8t5p3_local_19 2 j := by decide + +private theorem k8t5p3_local_19_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_19 a b ∪ (((k8t5p3_local_19_required_0 a b ∪ k8t5p3_local_19_required_1 a b) ∪ k8t5p3_local_19_required_2 a b))) 3 j = k8t5p3_local_19 3 j := by decide + +private theorem k8t5p3_local_19_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_19 a b ∪ (((k8t5p3_local_19_required_0 a b ∪ k8t5p3_local_19_required_1 a b) ∪ k8t5p3_local_19_required_2 a b))) 4 j = k8t5p3_local_19 4 j := by decide + +private theorem k8t5p3_local_19_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_19 a b ∪ (((k8t5p3_local_19_required_0 a b ∪ k8t5p3_local_19_required_1 a b) ∪ k8t5p3_local_19_required_2 a b))) 5 j = k8t5p3_local_19 5 j := by decide + +private theorem k8t5p3_local_19_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_19 a b ∪ (((k8t5p3_local_19_required_0 a b ∪ k8t5p3_local_19_required_1 a b) ∪ k8t5p3_local_19_required_2 a b))) 6 j = k8t5p3_local_19 6 j := by decide + +private theorem k8t5p3_local_19_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_19 a b ∪ (((k8t5p3_local_19_required_0 a b ∪ k8t5p3_local_19_required_1 a b) ∪ k8t5p3_local_19_required_2 a b))) 7 j = k8t5p3_local_19 7 j := by decide + +private theorem k8t5p3_local_19_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_19 a b ∪ (((k8t5p3_local_19_required_0 a b ∪ k8t5p3_local_19_required_1 a b) ∪ k8t5p3_local_19_required_2 a b))) 8 j = k8t5p3_local_19 8 j := by decide + +private theorem k8t5p3_local_19_merged_eq : (fun a b => freshMatrix k8t5p3_state_19 a b ∪ (((k8t5p3_local_19_required_0 a b ∪ k8t5p3_local_19_required_1 a b) ∪ k8t5p3_local_19_required_2 a b))) = k8t5p3_local_19 := by + funext i j + fin_cases i + + · exact k8t5p3_local_19_merged_eq_row_0 j + + · exact k8t5p3_local_19_merged_eq_row_1 j + + · exact k8t5p3_local_19_merged_eq_row_2 j + + · exact k8t5p3_local_19_merged_eq_row_3 j + + · exact k8t5p3_local_19_merged_eq_row_4 j + + · exact k8t5p3_local_19_merged_eq_row_5 j + + · exact k8t5p3_local_19_merged_eq_row_6 j + + · exact k8t5p3_local_19_merged_eq_row_7 j + + · exact k8t5p3_local_19_merged_eq_row_8 j + +private theorem k8t5p3_local_19_eq : (fun a b => freshMatrix k8t5p3_state_19 a b ∪ requiredMatrix 8 k8t5p3_step_19_data.required a b) = k8t5p3_local_19 := by + funext a b + change freshMatrix k8t5p3_state_19 a b ∪ requiredMatrix 8 (k8t5p3_step_19_required_block_0 ++ k8t5p3_step_19_required_block_1 ++ k8t5p3_step_19_required_block_2) a b = _ + simp only [requiredMatrix_append, k8t5p3_local_19_required_0_eq, k8t5p3_local_19_required_1_eq, k8t5p3_local_19_required_2_eq] + exact congrFun (congrFun k8t5p3_local_19_merged_eq a) b + +private theorem k8t5p3_local_19_paths : ∀ p ∈ k8t5p3_step_19_data.required, p.Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 := by + change ∀ p ∈ (k8t5p3_step_19_required_block_0 ++ k8t5p3_step_19_required_block_1 ++ k8t5p3_step_19_required_block_2), p.Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) 8 + simp only [List.forall_mem_append] + exact ⟨⟨k8t5p3_local_19_paths_block_0, k8t5p3_local_19_paths_block_1⟩, k8t5p3_local_19_paths_block_2⟩ + +private theorem k8t5p3_local_19_bad : k8t5p3_step_19_data.bad.Check (freshGraph k8t5p3.graph k8t5p3_step_19_data.i k8t5p3_step_19_data.j) k8t5p3_local_19 8 5 := by decide + +private theorem k8t5p3_step_19_check : k8t5p3_step_19.Check k8t5p3.graph k8t5p3_state_19 8 5 := by + change k8t5p3_step_19_data.Check k8t5p3.graph k8t5p3_state_19 8 5 + refine ⟨by decide, k8t5p3_local_19_paths, ?_⟩ + rw [k8t5p3_local_19_eq] + exact k8t5p3_local_19_bad + +private theorem k8t5p3_update_19 : k8t5p3_step_19.apply k8t5p3_state_19 = k8t5p3_state_20 := by + have h : ∀ i j : Fin 8, k8t5p3_step_19.apply k8t5p3_state_19 i j = k8t5p3_state_20 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_21 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_20 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_20_eq_row_0 : ∀ j : Fin 8, (fun a b => k8t5p3_state_20 a b ∪ requiredMatrix 8 k8t5p3_step_20_data.required a b) 0 j = k8t5p3_local_20 0 j := by decide + +private theorem k8t5p3_local_20_eq_row_1 : ∀ j : Fin 8, (fun a b => k8t5p3_state_20 a b ∪ requiredMatrix 8 k8t5p3_step_20_data.required a b) 1 j = k8t5p3_local_20 1 j := by decide + +private theorem k8t5p3_local_20_eq_row_2 : ∀ j : Fin 8, (fun a b => k8t5p3_state_20 a b ∪ requiredMatrix 8 k8t5p3_step_20_data.required a b) 2 j = k8t5p3_local_20 2 j := by decide + +private theorem k8t5p3_local_20_eq_row_3 : ∀ j : Fin 8, (fun a b => k8t5p3_state_20 a b ∪ requiredMatrix 8 k8t5p3_step_20_data.required a b) 3 j = k8t5p3_local_20 3 j := by decide + +private theorem k8t5p3_local_20_eq_row_4 : ∀ j : Fin 8, (fun a b => k8t5p3_state_20 a b ∪ requiredMatrix 8 k8t5p3_step_20_data.required a b) 4 j = k8t5p3_local_20 4 j := by decide + +private theorem k8t5p3_local_20_eq_row_5 : ∀ j : Fin 8, (fun a b => k8t5p3_state_20 a b ∪ requiredMatrix 8 k8t5p3_step_20_data.required a b) 5 j = k8t5p3_local_20 5 j := by decide + +private theorem k8t5p3_local_20_eq_row_6 : ∀ j : Fin 8, (fun a b => k8t5p3_state_20 a b ∪ requiredMatrix 8 k8t5p3_step_20_data.required a b) 6 j = k8t5p3_local_20 6 j := by decide + +private theorem k8t5p3_local_20_eq_row_7 : ∀ j : Fin 8, (fun a b => k8t5p3_state_20 a b ∪ requiredMatrix 8 k8t5p3_step_20_data.required a b) 7 j = k8t5p3_local_20 7 j := by decide + +private theorem k8t5p3_local_20_eq : (fun a b => k8t5p3_state_20 a b ∪ requiredMatrix 8 k8t5p3_step_20_data.required a b) = k8t5p3_local_20 := by + funext i j + fin_cases i + + · exact k8t5p3_local_20_eq_row_0 j + + · exact k8t5p3_local_20_eq_row_1 j + + · exact k8t5p3_local_20_eq_row_2 j + + · exact k8t5p3_local_20_eq_row_3 j + + · exact k8t5p3_local_20_eq_row_4 j + + · exact k8t5p3_local_20_eq_row_5 j + + · exact k8t5p3_local_20_eq_row_6 j + + · exact k8t5p3_local_20_eq_row_7 j + +private theorem k8t5p3_local_20_paths : ∀ p ∈ k8t5p3_step_20_data.required, p.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_20_data.i k8t5p3_step_20_data.j) 8 := by decide + +private theorem k8t5p3_local_20_bad : k8t5p3_step_20_data.bad.Check (addedEdgeGraph k8t5p3.graph k8t5p3_step_20_data.i k8t5p3_step_20_data.j) k8t5p3_local_20 8 5 := by decide + +private theorem k8t5p3_step_20_check : k8t5p3_step_20.Check k8t5p3.graph k8t5p3_state_20 8 5 := by + change k8t5p3_step_20_data.Check k8t5p3.graph k8t5p3_state_20 8 5 + refine ⟨k8t5p3_local_20_paths, ?_⟩ + rw [k8t5p3_local_20_eq] + exact k8t5p3_local_20_bad + +private theorem k8t5p3_update_20 : k8t5p3_step_20.apply k8t5p3_state_20 = k8t5p3_state_21 := by + have h : ∀ i j : Fin 8, k8t5p3_step_20.apply k8t5p3_state_20 i j = k8t5p3_state_21 i j := by decide + exact funext (fun i => funext (h i)) + +private def k8t5p3_state_22 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}], + #[Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k8t5p3_local_21 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, ∅, Finset.Icc 0 4, ∅, Finset.Icc 0 3, ∅], + #[Finset.Icc 0 4, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{0}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[{0}, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 4, Finset.Icc 1 7], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}], + #[∅, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}], + #[Finset.Icc 0 3, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 4, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p3_local_21_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_21 a b ∪ requiredMatrix 8 k8t5p3_step_21_data.required a b) 0 j = k8t5p3_local_21 0 j := by decide + +private theorem k8t5p3_local_21_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_21 a b ∪ requiredMatrix 8 k8t5p3_step_21_data.required a b) 1 j = k8t5p3_local_21 1 j := by decide + +private theorem k8t5p3_local_21_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_21 a b ∪ requiredMatrix 8 k8t5p3_step_21_data.required a b) 2 j = k8t5p3_local_21 2 j := by decide + +private theorem k8t5p3_local_21_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_21 a b ∪ requiredMatrix 8 k8t5p3_step_21_data.required a b) 3 j = k8t5p3_local_21 3 j := by decide + +private theorem k8t5p3_local_21_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_21 a b ∪ requiredMatrix 8 k8t5p3_step_21_data.required a b) 4 j = k8t5p3_local_21 4 j := by decide + +private theorem k8t5p3_local_21_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_21 a b ∪ requiredMatrix 8 k8t5p3_step_21_data.required a b) 5 j = k8t5p3_local_21 5 j := by decide + +private theorem k8t5p3_local_21_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_21 a b ∪ requiredMatrix 8 k8t5p3_step_21_data.required a b) 6 j = k8t5p3_local_21 6 j := by decide + +private theorem k8t5p3_local_21_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_21 a b ∪ requiredMatrix 8 k8t5p3_step_21_data.required a b) 7 j = k8t5p3_local_21 7 j := by decide + +private theorem k8t5p3_local_21_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k8t5p3_state_21 a b ∪ requiredMatrix 8 k8t5p3_step_21_data.required a b) 8 j = k8t5p3_local_21 8 j := by decide + +private theorem k8t5p3_local_21_eq : (fun a b => freshMatrix k8t5p3_state_21 a b ∪ requiredMatrix 8 k8t5p3_step_21_data.required a b) = k8t5p3_local_21 := by + funext i j + fin_cases i + + · exact k8t5p3_local_21_eq_row_0 j + + · exact k8t5p3_local_21_eq_row_1 j + + · exact k8t5p3_local_21_eq_row_2 j + + · exact k8t5p3_local_21_eq_row_3 j + + · exact k8t5p3_local_21_eq_row_4 j + + · exact k8t5p3_local_21_eq_row_5 j + + · exact k8t5p3_local_21_eq_row_6 j + + · exact k8t5p3_local_21_eq_row_7 j + + · exact k8t5p3_local_21_eq_row_8 j + +private theorem k8t5p3_local_21_paths : ∀ p ∈ k8t5p3_step_21_data.required, p.Check (freshGraph k8t5p3.graph k8t5p3_step_21_data.i k8t5p3_step_21_data.j) 8 := by decide + +private theorem k8t5p3_local_21_bad : k8t5p3_step_21_data.bad.Check (freshGraph k8t5p3.graph k8t5p3_step_21_data.i k8t5p3_step_21_data.j) k8t5p3_local_21 8 5 := by decide + +private theorem k8t5p3_step_21_check : k8t5p3_step_21.Check k8t5p3.graph k8t5p3_state_21 8 5 := by + change k8t5p3_step_21_data.Check k8t5p3.graph k8t5p3_state_21 8 5 + refine ⟨by decide, k8t5p3_local_21_paths, ?_⟩ + rw [k8t5p3_local_21_eq] + exact k8t5p3_local_21_bad + +private theorem k8t5p3_update_21 : k8t5p3_step_21.apply k8t5p3_state_21 = k8t5p3_state_22 := by + have h : ∀ i j : Fin 8, k8t5p3_step_21.apply k8t5p3_state_21 i j = k8t5p3_state_22 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k8t5p3_closure_22 : ClosureCheck k8t5p3.graph k8t5p3_state_22 8 5 [] := by trivial + +private theorem k8t5p3_closure_21 : ClosureCheck k8t5p3.graph k8t5p3_state_21 8 5 [k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_21_check + · rw [k8t5p3_update_21] + exact k8t5p3_closure_22 + +private theorem k8t5p3_closure_20 : ClosureCheck k8t5p3.graph k8t5p3_state_20 8 5 [k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_20_check + · rw [k8t5p3_update_20] + exact k8t5p3_closure_21 + +private theorem k8t5p3_closure_19 : ClosureCheck k8t5p3.graph k8t5p3_state_19 8 5 [k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_19_check + · rw [k8t5p3_update_19] + exact k8t5p3_closure_20 + +private theorem k8t5p3_closure_18 : ClosureCheck k8t5p3.graph k8t5p3_state_18 8 5 [k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_18_check + · rw [k8t5p3_update_18] + exact k8t5p3_closure_19 + +private theorem k8t5p3_closure_17 : ClosureCheck k8t5p3.graph k8t5p3_state_17 8 5 [k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_17_check + · rw [k8t5p3_update_17] + exact k8t5p3_closure_18 + +private theorem k8t5p3_closure_16 : ClosureCheck k8t5p3.graph k8t5p3_state_16 8 5 [k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_16_check + · rw [k8t5p3_update_16] + exact k8t5p3_closure_17 + +private theorem k8t5p3_closure_15 : ClosureCheck k8t5p3.graph k8t5p3_state_15 8 5 [k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_15_check + · rw [k8t5p3_update_15] + exact k8t5p3_closure_16 + +private theorem k8t5p3_closure_14 : ClosureCheck k8t5p3.graph k8t5p3_state_14 8 5 [k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_14_check + · rw [k8t5p3_update_14] + exact k8t5p3_closure_15 + +private theorem k8t5p3_closure_13 : ClosureCheck k8t5p3.graph k8t5p3_state_13 8 5 [k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_13_check + · rw [k8t5p3_update_13] + exact k8t5p3_closure_14 + +private theorem k8t5p3_closure_12 : ClosureCheck k8t5p3.graph k8t5p3_state_12 8 5 [k8t5p3_step_12, k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_12_check + · rw [k8t5p3_update_12] + exact k8t5p3_closure_13 + +private theorem k8t5p3_closure_11 : ClosureCheck k8t5p3.graph k8t5p3_state_11 8 5 [k8t5p3_step_11, k8t5p3_step_12, k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_11_check + · rw [k8t5p3_update_11] + exact k8t5p3_closure_12 + +private theorem k8t5p3_closure_10 : ClosureCheck k8t5p3.graph k8t5p3_state_10 8 5 [k8t5p3_step_10, k8t5p3_step_11, k8t5p3_step_12, k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_10_check + · rw [k8t5p3_update_10] + exact k8t5p3_closure_11 + +private theorem k8t5p3_closure_9 : ClosureCheck k8t5p3.graph k8t5p3_state_9 8 5 [k8t5p3_step_9, k8t5p3_step_10, k8t5p3_step_11, k8t5p3_step_12, k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_9_check + · rw [k8t5p3_update_9] + exact k8t5p3_closure_10 + +private theorem k8t5p3_closure_8 : ClosureCheck k8t5p3.graph k8t5p3_state_8 8 5 [k8t5p3_step_8, k8t5p3_step_9, k8t5p3_step_10, k8t5p3_step_11, k8t5p3_step_12, k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_8_check + · rw [k8t5p3_update_8] + exact k8t5p3_closure_9 + +private theorem k8t5p3_closure_7 : ClosureCheck k8t5p3.graph k8t5p3_state_7 8 5 [k8t5p3_step_7, k8t5p3_step_8, k8t5p3_step_9, k8t5p3_step_10, k8t5p3_step_11, k8t5p3_step_12, k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_7_check + · rw [k8t5p3_update_7] + exact k8t5p3_closure_8 + +private theorem k8t5p3_closure_6 : ClosureCheck k8t5p3.graph k8t5p3_state_6 8 5 [k8t5p3_step_6, k8t5p3_step_7, k8t5p3_step_8, k8t5p3_step_9, k8t5p3_step_10, k8t5p3_step_11, k8t5p3_step_12, k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_6_check + · rw [k8t5p3_update_6] + exact k8t5p3_closure_7 + +private theorem k8t5p3_closure_5 : ClosureCheck k8t5p3.graph k8t5p3_state_5 8 5 [k8t5p3_step_5, k8t5p3_step_6, k8t5p3_step_7, k8t5p3_step_8, k8t5p3_step_9, k8t5p3_step_10, k8t5p3_step_11, k8t5p3_step_12, k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_5_check + · rw [k8t5p3_update_5] + exact k8t5p3_closure_6 + +private theorem k8t5p3_closure_4 : ClosureCheck k8t5p3.graph k8t5p3_state_4 8 5 [k8t5p3_step_4, k8t5p3_step_5, k8t5p3_step_6, k8t5p3_step_7, k8t5p3_step_8, k8t5p3_step_9, k8t5p3_step_10, k8t5p3_step_11, k8t5p3_step_12, k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_4_check + · rw [k8t5p3_update_4] + exact k8t5p3_closure_5 + +private theorem k8t5p3_closure_3 : ClosureCheck k8t5p3.graph k8t5p3_state_3 8 5 [k8t5p3_step_3, k8t5p3_step_4, k8t5p3_step_5, k8t5p3_step_6, k8t5p3_step_7, k8t5p3_step_8, k8t5p3_step_9, k8t5p3_step_10, k8t5p3_step_11, k8t5p3_step_12, k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_3_check + · rw [k8t5p3_update_3] + exact k8t5p3_closure_4 + +private theorem k8t5p3_closure_2 : ClosureCheck k8t5p3.graph k8t5p3_state_2 8 5 [k8t5p3_step_2, k8t5p3_step_3, k8t5p3_step_4, k8t5p3_step_5, k8t5p3_step_6, k8t5p3_step_7, k8t5p3_step_8, k8t5p3_step_9, k8t5p3_step_10, k8t5p3_step_11, k8t5p3_step_12, k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_2_check + · rw [k8t5p3_update_2] + exact k8t5p3_closure_3 + +private theorem k8t5p3_closure_1 : ClosureCheck k8t5p3.graph k8t5p3_state_1 8 5 [k8t5p3_step_1, k8t5p3_step_2, k8t5p3_step_3, k8t5p3_step_4, k8t5p3_step_5, k8t5p3_step_6, k8t5p3_step_7, k8t5p3_step_8, k8t5p3_step_9, k8t5p3_step_10, k8t5p3_step_11, k8t5p3_step_12, k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_1_check + · rw [k8t5p3_update_1] + exact k8t5p3_closure_2 + +private theorem k8t5p3_closure_0 : ClosureCheck k8t5p3.graph k8t5p3_state_0 8 5 [k8t5p3_step_0, k8t5p3_step_1, k8t5p3_step_2, k8t5p3_step_3, k8t5p3_step_4, k8t5p3_step_5, k8t5p3_step_6, k8t5p3_step_7, k8t5p3_step_8, k8t5p3_step_9, k8t5p3_step_10, k8t5p3_step_11, k8t5p3_step_12, k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] := by + constructor + · exact k8t5p3_step_0_check + · rw [k8t5p3_update_0] + exact k8t5p3_closure_1 + +private theorem k8t5p3_matrix_eq : k8t5p3.matrix 8 = k8t5p3_state_22 := by + change closureMatrix (k8t5p3.initialMatrix 8) _ = _ + rw [k8t5p3_initial_eq] + change closureMatrix k8t5p3_state_0 [k8t5p3_step_0, k8t5p3_step_1, k8t5p3_step_2, k8t5p3_step_3, k8t5p3_step_4, k8t5p3_step_5, k8t5p3_step_6, k8t5p3_step_7, k8t5p3_step_8, k8t5p3_step_9, k8t5p3_step_10, k8t5p3_step_11, k8t5p3_step_12, k8t5p3_step_13, k8t5p3_step_14, k8t5p3_step_15, k8t5p3_step_16, k8t5p3_step_17, k8t5p3_step_18, k8t5p3_step_19, k8t5p3_step_20, k8t5p3_step_21] = _ + simp only [closureMatrix] + rw [k8t5p3_update_0, k8t5p3_update_1, k8t5p3_update_2, k8t5p3_update_3, k8t5p3_update_4, k8t5p3_update_5, k8t5p3_update_6, k8t5p3_update_7, k8t5p3_update_8, k8t5p3_update_9, k8t5p3_update_10, k8t5p3_update_11, k8t5p3_update_12, k8t5p3_update_13, k8t5p3_update_14, k8t5p3_update_15, k8t5p3_update_16, k8t5p3_update_17, k8t5p3_update_18, k8t5p3_update_19, k8t5p3_update_20, k8t5p3_update_21] + +private theorem k8t5p3_part_0 : k8t5p3.chains.flatten = List.finRange _ := by decide + +private theorem k8t5p3_part_1 : k8t5p3.chains.map List.length = ([[], [], [], [3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t5p3_part_2 : k8t5p3.chains.map (fun l => l.map (fun i => decide (i ∈ k8t5p3.clique))) = ([[], [], [], [3]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t5p3_templates_item_0 : (⟨0, 1, [], [], [], 4, 7⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6, 7]], [], [], 1, 2⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_2 : (⟨0, 2, [], [], [], 4, 7⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_3 : (⟨0, 2, [[3, 4, 5, 6, 7]], [], [], 1, 2⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_4 : (⟨0, 3, [], [], [], 4, 7⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_5 : (⟨0, 3, [], [], [4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_6 : (⟨0, 4, [], [], [3], 3, 6⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_7 : (⟨0, 4, [], [], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_8 : (⟨0, 5, [], [], [4, 3], 2, 5⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_9 : (⟨0, 6, [], [], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_10 : (⟨0, 6, [], [], [7], 3, 6⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_11 : (⟨0, 7, [], [], [], 4, 7⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_12 : (⟨0, 7, [], [], [6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_13 : (⟨1, 2, [], [], [], 4, 7⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_14 : (⟨1, 2, [[3, 4, 5, 6, 7]], [], [], 1, 2⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_15 : (⟨1, 3, [], [], [], 4, 7⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_16 : (⟨1, 3, [], [], [4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_17 : (⟨1, 4, [], [], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_18 : (⟨1, 5, [], [], [4, 3], 2, 5⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_19 : (⟨1, 6, [], [], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_20 : (⟨1, 7, [], [], [], 4, 7⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_21 : (⟨1, 7, [], [], [6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_22 : (⟨2, 3, [], [], [], 4, 7⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_23 : (⟨2, 3, [], [], [4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_24 : (⟨2, 4, [], [], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_25 : (⟨2, 5, [], [], [4, 3], 2, 5⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_26 : (⟨2, 6, [], [], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_27 : (⟨2, 7, [], [], [], 4, 7⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_28 : (⟨2, 7, [], [], [6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_29 : (⟨3, 4, [], [], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_30 : (⟨3, 5, [], [], [6, 7], 2, 5⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_31 : (⟨4, 5, [], [3], [6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_32 : (⟨4, 6, [], [3], [7], 2, 5⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_33 : (⟨5, 6, [], [3, 4], [7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_34 : (⟨5, 7, [], [3, 4], [], 2, 5⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_templates_item_35 : (⟨6, 7, [], [3, 4, 5], [], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p3_part_3 : ∀ T ∈ k8t5p3.templates, T.Check k8t5p3.graph k8t5p3.clique 8 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k8t5p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p3_templates_item_0, k8t5p3_templates_item_1, k8t5p3_templates_item_2, k8t5p3_templates_item_3, k8t5p3_templates_item_4, k8t5p3_templates_item_5, k8t5p3_templates_item_6, k8t5p3_templates_item_7, k8t5p3_templates_item_8, k8t5p3_templates_item_9, k8t5p3_templates_item_10, k8t5p3_templates_item_11, k8t5p3_templates_item_12, k8t5p3_templates_item_13, k8t5p3_templates_item_14, k8t5p3_templates_item_15, k8t5p3_templates_item_16, k8t5p3_templates_item_17, k8t5p3_templates_item_18, k8t5p3_templates_item_19, k8t5p3_templates_item_20, k8t5p3_templates_item_21, k8t5p3_templates_item_22, k8t5p3_templates_item_23, k8t5p3_templates_item_24, k8t5p3_templates_item_25, k8t5p3_templates_item_26, k8t5p3_templates_item_27, k8t5p3_templates_item_28, k8t5p3_templates_item_29, k8t5p3_templates_item_30, k8t5p3_templates_item_31, k8t5p3_templates_item_32, k8t5p3_templates_item_33, k8t5p3_templates_item_34, k8t5p3_templates_item_35⟩ + +private theorem k8t5p3_part_4 : ∀ p ∈ k8t5p3.required, p.Check k8t5p3.graph 8 := by decide + +private theorem k8t5p3_part_5 : ClosureCheck k8t5p3.graph (k8t5p3.initialMatrix 8) 8 5 k8t5p3.closure := by + rw [k8t5p3_initial_eq] + exact k8t5p3_closure_0 + +private theorem k8t5p3_part_6 : k8t5p3.bad.Check k8t5p3.graph (k8t5p3.matrix 8) 8 5 := by + rw [k8t5p3_matrix_eq] + decide + +theorem k8t5p3_check : k8t5p3.Check 8 5 [[], [], [], [3]] := + ⟨k8t5p3_part_0, k8t5p3_part_1, k8t5p3_part_2, k8t5p3_part_3, k8t5p3_part_4, k8t5p3_part_5, k8t5p3_part_6⟩ +def k8t5p4 : LayoutCertificate 7 where + chains := [[0], [1], [2, 3, 4, 5, 6]] + clique := {0, 1, 2, 4, 6} + templates := [⟨0, 1, [], [], [], 2, 7⟩, + ⟨0, 1, [[2, 3, 4, 5, 6]], [], [], 1, 2⟩, + ⟨0, 2, [], [], [], 2, 7⟩, + ⟨0, 2, [], [], [3, 4, 5, 6], 1, 3⟩, + ⟨0, 3, [], [], [2], 1, 6⟩, + ⟨0, 5, [], [], [4], 1, 6⟩, + ⟨0, 6, [], [], [], 2, 7⟩, + ⟨0, 6, [], [], [5, 4, 3, 2], 1, 3⟩, + ⟨1, 2, [], [], [], 2, 7⟩, + ⟨1, 2, [], [], [3, 4, 5, 6], 1, 3⟩, + ⟨1, 3, [], [], [2], 1, 6⟩, + ⟨1, 5, [], [], [4], 1, 6⟩, + ⟨1, 6, [], [], [], 2, 7⟩, + ⟨1, 6, [], [], [5, 4, 3, 2], 1, 3⟩, + ⟨2, 3, [], [], [4], 1, 6⟩, + ⟨3, 4, [], [2], [], 1, 6⟩, + ⟨3, 5, [], [2], [4], 1, 5⟩, + ⟨3, 6, [], [2], [], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (3, 3)}⟩ + + +private def k8t5p4_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p4_initial_eq_row_0 : ∀ j : Fin 7, (k8t5p4.initialMatrix 8) 0 j = k8t5p4_state_0 0 j := by decide + +private theorem k8t5p4_initial_eq_row_1 : ∀ j : Fin 7, (k8t5p4.initialMatrix 8) 1 j = k8t5p4_state_0 1 j := by decide + +private theorem k8t5p4_initial_eq_row_2 : ∀ j : Fin 7, (k8t5p4.initialMatrix 8) 2 j = k8t5p4_state_0 2 j := by decide + +private theorem k8t5p4_initial_eq_row_3 : ∀ j : Fin 7, (k8t5p4.initialMatrix 8) 3 j = k8t5p4_state_0 3 j := by decide + +private theorem k8t5p4_initial_eq_row_4 : ∀ j : Fin 7, (k8t5p4.initialMatrix 8) 4 j = k8t5p4_state_0 4 j := by decide + +private theorem k8t5p4_initial_eq_row_5 : ∀ j : Fin 7, (k8t5p4.initialMatrix 8) 5 j = k8t5p4_state_0 5 j := by decide + +private theorem k8t5p4_initial_eq_row_6 : ∀ j : Fin 7, (k8t5p4.initialMatrix 8) 6 j = k8t5p4_state_0 6 j := by decide + +private theorem k8t5p4_initial_eq : (k8t5p4.initialMatrix 8) = k8t5p4_state_0 := by + funext i j + fin_cases i + + · exact k8t5p4_initial_eq_row_0 j + + · exact k8t5p4_initial_eq_row_1 j + + · exact k8t5p4_initial_eq_row_2 j + + · exact k8t5p4_initial_eq_row_3 j + + · exact k8t5p4_initial_eq_row_4 j + + · exact k8t5p4_initial_eq_row_5 j + + · exact k8t5p4_initial_eq_row_6 j + +private theorem k8t5p4_closure_0 : ClosureCheck k8t5p4.graph k8t5p4_state_0 8 5 [] := by trivial + +private theorem k8t5p4_matrix_eq : k8t5p4.matrix 8 = k8t5p4_state_0 := by + change closureMatrix (k8t5p4.initialMatrix 8) _ = _ + rw [k8t5p4_initial_eq] + change closureMatrix k8t5p4_state_0 [] = _ + rfl + +private theorem k8t5p4_part_0 : k8t5p4.chains.flatten = List.finRange _ := by decide + +private theorem k8t5p4_part_1 : k8t5p4.chains.map List.length = ([[], [], [1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t5p4_part_2 : k8t5p4.chains.map (fun l => l.map (fun i => decide (i ∈ k8t5p4.clique))) = ([[], [], [1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t5p4_templates_item_0 : (⟨0, 1, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_1 : (⟨0, 1, [[2, 3, 4, 5, 6]], [], [], 1, 2⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_2 : (⟨0, 2, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_3 : (⟨0, 2, [], [], [3, 4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_4 : (⟨0, 3, [], [], [2], 1, 6⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_5 : (⟨0, 5, [], [], [4], 1, 6⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_6 : (⟨0, 6, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_7 : (⟨0, 6, [], [], [5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_8 : (⟨1, 2, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_9 : (⟨1, 2, [], [], [3, 4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_10 : (⟨1, 3, [], [], [2], 1, 6⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_11 : (⟨1, 5, [], [], [4], 1, 6⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_12 : (⟨1, 6, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_13 : (⟨1, 6, [], [], [5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_14 : (⟨2, 3, [], [], [4], 1, 6⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_15 : (⟨3, 4, [], [2], [], 1, 6⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_16 : (⟨3, 5, [], [2], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_templates_item_17 : (⟨3, 6, [], [2], [], 1, 6⟩ : TemplateData (Fin 7)).Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p4_part_3 : ∀ T ∈ k8t5p4.templates, T.Check k8t5p4.graph k8t5p4.clique 8 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k8t5p4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p4_templates_item_0, k8t5p4_templates_item_1, k8t5p4_templates_item_2, k8t5p4_templates_item_3, k8t5p4_templates_item_4, k8t5p4_templates_item_5, k8t5p4_templates_item_6, k8t5p4_templates_item_7, k8t5p4_templates_item_8, k8t5p4_templates_item_9, k8t5p4_templates_item_10, k8t5p4_templates_item_11, k8t5p4_templates_item_12, k8t5p4_templates_item_13, k8t5p4_templates_item_14, k8t5p4_templates_item_15, k8t5p4_templates_item_16, k8t5p4_templates_item_17⟩ + +private theorem k8t5p4_part_4 : ∀ p ∈ k8t5p4.required, p.Check k8t5p4.graph 8 := by decide + +private theorem k8t5p4_part_5 : ClosureCheck k8t5p4.graph (k8t5p4.initialMatrix 8) 8 5 k8t5p4.closure := by + rw [k8t5p4_initial_eq] + exact k8t5p4_closure_0 + +private theorem k8t5p4_part_6 : k8t5p4.bad.Check k8t5p4.graph (k8t5p4.matrix 8) 8 5 := by + rw [k8t5p4_matrix_eq] + decide + +theorem k8t5p4_check : k8t5p4.Check 8 5 [[], [], [1, 1]] := + ⟨k8t5p4_part_0, k8t5p4_part_1, k8t5p4_part_2, k8t5p4_part_3, k8t5p4_part_4, k8t5p4_part_5, k8t5p4_part_6⟩ +def k8t5p5 : LayoutCertificate 8 where + chains := [[0], [1], [2, 3, 4, 5, 6, 7]] + clique := {0, 1, 2, 4, 7} + templates := [⟨0, 1, [], [], [], 3, 7⟩, + ⟨0, 1, [[4, 5, 6, 7]], [], [], 2, 3⟩, + ⟨0, 1, [[2, 3, 4, 5, 6, 7]], [], [], 1, 1⟩, + ⟨0, 2, [], [], [], 3, 7⟩, + ⟨0, 2, [[4, 5, 6, 7]], [], [], 2, 3⟩, + ⟨0, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩, + ⟨0, 3, [], [], [2], 2, 6⟩, + ⟨0, 3, [[4, 5, 6, 7]], [], [2], 1, 2⟩, + ⟨0, 5, [], [], [4], 2, 6⟩, + ⟨0, 5, [], [], [6, 7], 1, 5⟩, + ⟨0, 6, [], [], [5, 4], 1, 5⟩, + ⟨0, 7, [], [], [6, 5, 4], 2, 4⟩, + ⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 2⟩, + ⟨1, 2, [], [], [], 3, 7⟩, + ⟨1, 2, [[4, 5, 6, 7]], [], [], 2, 3⟩, + ⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩, + ⟨1, 3, [], [], [2], 2, 6⟩, + ⟨1, 3, [[4, 5, 6, 7]], [], [2], 1, 2⟩, + ⟨1, 5, [], [], [4], 2, 6⟩, + ⟨1, 5, [], [], [6, 7], 1, 5⟩, + ⟨1, 6, [], [], [5, 4], 1, 5⟩, + ⟨1, 7, [], [], [6, 5, 4], 2, 4⟩, + ⟨1, 7, [], [], [6, 5, 4, 3, 2], 1, 2⟩, + ⟨2, 3, [], [], [4], 2, 6⟩, + ⟨2, 3, [], [], [4, 5, 6, 7], 1, 3⟩, + ⟨2, 5, [], [], [4], 2, 6⟩, + ⟨2, 5, [], [], [6, 7], 1, 5⟩, + ⟨2, 6, [], [], [5, 4], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k8t5p5_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p5_initial_eq_row_0 : ∀ j : Fin 8, (k8t5p5.initialMatrix 8) 0 j = k8t5p5_state_0 0 j := by decide + +private theorem k8t5p5_initial_eq_row_1 : ∀ j : Fin 8, (k8t5p5.initialMatrix 8) 1 j = k8t5p5_state_0 1 j := by decide + +private theorem k8t5p5_initial_eq_row_2 : ∀ j : Fin 8, (k8t5p5.initialMatrix 8) 2 j = k8t5p5_state_0 2 j := by decide + +private theorem k8t5p5_initial_eq_row_3 : ∀ j : Fin 8, (k8t5p5.initialMatrix 8) 3 j = k8t5p5_state_0 3 j := by decide + +private theorem k8t5p5_initial_eq_row_4 : ∀ j : Fin 8, (k8t5p5.initialMatrix 8) 4 j = k8t5p5_state_0 4 j := by decide + +private theorem k8t5p5_initial_eq_row_5 : ∀ j : Fin 8, (k8t5p5.initialMatrix 8) 5 j = k8t5p5_state_0 5 j := by decide + +private theorem k8t5p5_initial_eq_row_6 : ∀ j : Fin 8, (k8t5p5.initialMatrix 8) 6 j = k8t5p5_state_0 6 j := by decide + +private theorem k8t5p5_initial_eq_row_7 : ∀ j : Fin 8, (k8t5p5.initialMatrix 8) 7 j = k8t5p5_state_0 7 j := by decide + +private theorem k8t5p5_initial_eq : (k8t5p5.initialMatrix 8) = k8t5p5_state_0 := by + funext i j + fin_cases i + + · exact k8t5p5_initial_eq_row_0 j + + · exact k8t5p5_initial_eq_row_1 j + + · exact k8t5p5_initial_eq_row_2 j + + · exact k8t5p5_initial_eq_row_3 j + + · exact k8t5p5_initial_eq_row_4 j + + · exact k8t5p5_initial_eq_row_5 j + + · exact k8t5p5_initial_eq_row_6 j + + · exact k8t5p5_initial_eq_row_7 j + +private theorem k8t5p5_closure_0 : ClosureCheck k8t5p5.graph k8t5p5_state_0 8 5 [] := by trivial + +private theorem k8t5p5_matrix_eq : k8t5p5.matrix 8 = k8t5p5_state_0 := by + change closureMatrix (k8t5p5.initialMatrix 8) _ = _ + rw [k8t5p5_initial_eq] + change closureMatrix k8t5p5_state_0 [] = _ + rfl + +private theorem k8t5p5_part_0 : k8t5p5.chains.flatten = List.finRange _ := by decide + +private theorem k8t5p5_part_1 : k8t5p5.chains.map List.length = ([[], [], [1, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t5p5_part_2 : k8t5p5.chains.map (fun l => l.map (fun i => decide (i ∈ k8t5p5.clique))) = ([[], [], [1, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t5p5_templates_item_0 : (⟨0, 1, [], [], [], 3, 7⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_1 : (⟨0, 1, [[4, 5, 6, 7]], [], [], 2, 3⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_2 : (⟨0, 1, [[2, 3, 4, 5, 6, 7]], [], [], 1, 1⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_3 : (⟨0, 2, [], [], [], 3, 7⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_4 : (⟨0, 2, [[4, 5, 6, 7]], [], [], 2, 3⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_5 : (⟨0, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_6 : (⟨0, 3, [], [], [2], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_7 : (⟨0, 3, [[4, 5, 6, 7]], [], [2], 1, 2⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_8 : (⟨0, 5, [], [], [4], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_9 : (⟨0, 5, [], [], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_10 : (⟨0, 6, [], [], [5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_11 : (⟨0, 7, [], [], [6, 5, 4], 2, 4⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_12 : (⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_13 : (⟨1, 2, [], [], [], 3, 7⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_14 : (⟨1, 2, [[4, 5, 6, 7]], [], [], 2, 3⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_15 : (⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_16 : (⟨1, 3, [], [], [2], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_17 : (⟨1, 3, [[4, 5, 6, 7]], [], [2], 1, 2⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_18 : (⟨1, 5, [], [], [4], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_19 : (⟨1, 5, [], [], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_20 : (⟨1, 6, [], [], [5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_21 : (⟨1, 7, [], [], [6, 5, 4], 2, 4⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_22 : (⟨1, 7, [], [], [6, 5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_23 : (⟨2, 3, [], [], [4], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_24 : (⟨2, 3, [], [], [4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_25 : (⟨2, 5, [], [], [4], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_26 : (⟨2, 5, [], [], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_templates_item_27 : (⟨2, 6, [], [], [5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p5_part_3 : ∀ T ∈ k8t5p5.templates, T.Check k8t5p5.graph k8t5p5.clique 8 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k8t5p5, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p5_templates_item_0, k8t5p5_templates_item_1, k8t5p5_templates_item_2, k8t5p5_templates_item_3, k8t5p5_templates_item_4, k8t5p5_templates_item_5, k8t5p5_templates_item_6, k8t5p5_templates_item_7, k8t5p5_templates_item_8, k8t5p5_templates_item_9, k8t5p5_templates_item_10, k8t5p5_templates_item_11, k8t5p5_templates_item_12, k8t5p5_templates_item_13, k8t5p5_templates_item_14, k8t5p5_templates_item_15, k8t5p5_templates_item_16, k8t5p5_templates_item_17, k8t5p5_templates_item_18, k8t5p5_templates_item_19, k8t5p5_templates_item_20, k8t5p5_templates_item_21, k8t5p5_templates_item_22, k8t5p5_templates_item_23, k8t5p5_templates_item_24, k8t5p5_templates_item_25, k8t5p5_templates_item_26, k8t5p5_templates_item_27⟩ + +private theorem k8t5p5_part_4 : ∀ p ∈ k8t5p5.required, p.Check k8t5p5.graph 8 := by decide + +private theorem k8t5p5_part_5 : ClosureCheck k8t5p5.graph (k8t5p5.initialMatrix 8) 8 5 k8t5p5.closure := by + rw [k8t5p5_initial_eq] + exact k8t5p5_closure_0 + +private theorem k8t5p5_part_6 : k8t5p5.bad.Check k8t5p5.graph (k8t5p5.matrix 8) 8 5 := by + rw [k8t5p5_matrix_eq] + decide + +theorem k8t5p5_check : k8t5p5.Check 8 5 [[], [], [1, 2]] := + ⟨k8t5p5_part_0, k8t5p5_part_1, k8t5p5_part_2, k8t5p5_part_3, k8t5p5_part_4, k8t5p5_part_5, k8t5p5_part_6⟩ +def k8t5p6 : LayoutCertificate 7 where + chains := [[0], [1, 2, 3], [4, 5, 6]] + clique := {0, 1, 3, 4, 6} + templates := [⟨0, 1, [], [], [], 2, 7⟩, + ⟨0, 1, [[4, 5, 6]], [], [2, 3], 1, 2⟩, + ⟨0, 2, [], [], [1], 1, 6⟩, + ⟨0, 3, [], [], [], 2, 7⟩, + ⟨0, 3, [[4, 5, 6]], [], [2, 1], 1, 2⟩, + ⟨0, 4, [], [], [], 2, 7⟩, + ⟨0, 4, [[1, 2, 3]], [], [5, 6], 1, 2⟩, + ⟨0, 5, [], [], [4], 1, 6⟩, + ⟨0, 6, [], [], [], 2, 7⟩, + ⟨0, 6, [[1, 2, 3]], [], [5, 4], 1, 2⟩, + ⟨1, 2, [], [], [3], 1, 6⟩, + ⟨1, 4, [], [], [], 2, 7⟩, + ⟨1, 4, [], [3, 2], [5, 6], 1, 3⟩, + ⟨1, 5, [], [], [4], 1, 6⟩, + ⟨1, 6, [], [], [], 2, 7⟩, + ⟨1, 6, [], [3, 2], [5, 4], 1, 3⟩, + ⟨2, 3, [], [1], [], 1, 6⟩, + ⟨2, 4, [], [1], [], 1, 6⟩, + ⟨2, 5, [], [1], [4], 1, 5⟩, + ⟨2, 6, [], [1], [], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (2, 3), (1, 3)}⟩ + + +private def k8t5p6_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p6_initial_eq_row_0 : ∀ j : Fin 7, (k8t5p6.initialMatrix 8) 0 j = k8t5p6_state_0 0 j := by decide + +private theorem k8t5p6_initial_eq_row_1 : ∀ j : Fin 7, (k8t5p6.initialMatrix 8) 1 j = k8t5p6_state_0 1 j := by decide + +private theorem k8t5p6_initial_eq_row_2 : ∀ j : Fin 7, (k8t5p6.initialMatrix 8) 2 j = k8t5p6_state_0 2 j := by decide + +private theorem k8t5p6_initial_eq_row_3 : ∀ j : Fin 7, (k8t5p6.initialMatrix 8) 3 j = k8t5p6_state_0 3 j := by decide + +private theorem k8t5p6_initial_eq_row_4 : ∀ j : Fin 7, (k8t5p6.initialMatrix 8) 4 j = k8t5p6_state_0 4 j := by decide + +private theorem k8t5p6_initial_eq_row_5 : ∀ j : Fin 7, (k8t5p6.initialMatrix 8) 5 j = k8t5p6_state_0 5 j := by decide + +private theorem k8t5p6_initial_eq_row_6 : ∀ j : Fin 7, (k8t5p6.initialMatrix 8) 6 j = k8t5p6_state_0 6 j := by decide + +private theorem k8t5p6_initial_eq : (k8t5p6.initialMatrix 8) = k8t5p6_state_0 := by + funext i j + fin_cases i + + · exact k8t5p6_initial_eq_row_0 j + + · exact k8t5p6_initial_eq_row_1 j + + · exact k8t5p6_initial_eq_row_2 j + + · exact k8t5p6_initial_eq_row_3 j + + · exact k8t5p6_initial_eq_row_4 j + + · exact k8t5p6_initial_eq_row_5 j + + · exact k8t5p6_initial_eq_row_6 j + +private theorem k8t5p6_closure_0 : ClosureCheck k8t5p6.graph k8t5p6_state_0 8 5 [] := by trivial + +private theorem k8t5p6_matrix_eq : k8t5p6.matrix 8 = k8t5p6_state_0 := by + change closureMatrix (k8t5p6.initialMatrix 8) _ = _ + rw [k8t5p6_initial_eq] + change closureMatrix k8t5p6_state_0 [] = _ + rfl + +private theorem k8t5p6_part_0 : k8t5p6.chains.flatten = List.finRange _ := by decide + +private theorem k8t5p6_part_1 : k8t5p6.chains.map List.length = ([[], [1], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t5p6_part_2 : k8t5p6.chains.map (fun l => l.map (fun i => decide (i ∈ k8t5p6.clique))) = ([[], [1], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t5p6_templates_item_0 : (⟨0, 1, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_1 : (⟨0, 1, [[4, 5, 6]], [], [2, 3], 1, 2⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_2 : (⟨0, 2, [], [], [1], 1, 6⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_3 : (⟨0, 3, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_4 : (⟨0, 3, [[4, 5, 6]], [], [2, 1], 1, 2⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_5 : (⟨0, 4, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_6 : (⟨0, 4, [[1, 2, 3]], [], [5, 6], 1, 2⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_7 : (⟨0, 5, [], [], [4], 1, 6⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_8 : (⟨0, 6, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_9 : (⟨0, 6, [[1, 2, 3]], [], [5, 4], 1, 2⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_10 : (⟨1, 2, [], [], [3], 1, 6⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_11 : (⟨1, 4, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_12 : (⟨1, 4, [], [3, 2], [5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_13 : (⟨1, 5, [], [], [4], 1, 6⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_14 : (⟨1, 6, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_15 : (⟨1, 6, [], [3, 2], [5, 4], 1, 3⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_16 : (⟨2, 3, [], [1], [], 1, 6⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_17 : (⟨2, 4, [], [1], [], 1, 6⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_18 : (⟨2, 5, [], [1], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_templates_item_19 : (⟨2, 6, [], [1], [], 1, 6⟩ : TemplateData (Fin 7)).Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p6_part_3 : ∀ T ∈ k8t5p6.templates, T.Check k8t5p6.graph k8t5p6.clique 8 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k8t5p6, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p6_templates_item_0, k8t5p6_templates_item_1, k8t5p6_templates_item_2, k8t5p6_templates_item_3, k8t5p6_templates_item_4, k8t5p6_templates_item_5, k8t5p6_templates_item_6, k8t5p6_templates_item_7, k8t5p6_templates_item_8, k8t5p6_templates_item_9, k8t5p6_templates_item_10, k8t5p6_templates_item_11, k8t5p6_templates_item_12, k8t5p6_templates_item_13, k8t5p6_templates_item_14, k8t5p6_templates_item_15, k8t5p6_templates_item_16, k8t5p6_templates_item_17, k8t5p6_templates_item_18, k8t5p6_templates_item_19⟩ + +private theorem k8t5p6_part_4 : ∀ p ∈ k8t5p6.required, p.Check k8t5p6.graph 8 := by decide + +private theorem k8t5p6_part_5 : ClosureCheck k8t5p6.graph (k8t5p6.initialMatrix 8) 8 5 k8t5p6.closure := by + rw [k8t5p6_initial_eq] + exact k8t5p6_closure_0 + +private theorem k8t5p6_part_6 : k8t5p6.bad.Check k8t5p6.graph (k8t5p6.matrix 8) 8 5 := by + rw [k8t5p6_matrix_eq] + decide + +theorem k8t5p6_check : k8t5p6.Check 8 5 [[], [1], [1]] := + ⟨k8t5p6_part_0, k8t5p6_part_1, k8t5p6_part_2, k8t5p6_part_3, k8t5p6_part_4, k8t5p6_part_5, k8t5p6_part_6⟩ +def k8t5p7 : LayoutCertificate 8 where + chains := [[0], [1, 2, 3], [4, 5, 6, 7]] + clique := {0, 1, 3, 4, 7} + templates := [⟨0, 1, [], [], [], 3, 7⟩, + ⟨0, 1, [[4, 5, 6, 7]], [], [], 2, 3⟩, + ⟨0, 1, [[4, 5, 6, 7]], [], [2, 3], 1, 1⟩, + ⟨0, 2, [], [], [1], 2, 6⟩, + ⟨0, 2, [[4, 5, 6, 7]], [], [1], 1, 2⟩, + ⟨0, 3, [[4, 5, 6, 7]], [], [], 2, 3⟩, + ⟨0, 3, [[4, 5, 6, 7]], [], [2, 1], 1, 1⟩, + ⟨0, 4, [], [], [5, 6, 7], 2, 4⟩, + ⟨0, 4, [[1, 2, 3]], [], [5, 6, 7], 1, 1⟩, + ⟨0, 5, [], [], [4], 2, 6⟩, + ⟨0, 5, [], [], [6, 7], 1, 5⟩, + ⟨0, 6, [], [], [5, 4], 1, 5⟩, + ⟨0, 7, [], [], [6, 5, 4], 2, 4⟩, + ⟨0, 7, [[1, 2, 3]], [], [6, 5, 4], 1, 1⟩, + ⟨1, 2, [], [], [3], 2, 6⟩, + ⟨1, 2, [[4, 5, 6, 7]], [], [3], 1, 2⟩, + ⟨1, 4, [], [], [5, 6, 7], 2, 4⟩, + ⟨1, 4, [], [3, 2], [5, 6, 7], 1, 2⟩, + ⟨1, 5, [], [], [4], 2, 6⟩, + ⟨1, 5, [], [], [6, 7], 1, 5⟩, + ⟨1, 6, [], [], [5, 4], 1, 5⟩, + ⟨1, 7, [], [], [6, 5, 4], 2, 4⟩, + ⟨1, 7, [], [3, 2], [6, 5, 4], 1, 2⟩, + ⟨2, 3, [], [1], [], 2, 6⟩, + ⟨2, 3, [[4, 5, 6, 7]], [1], [], 1, 2⟩, + ⟨2, 4, [], [1], [], 2, 6⟩, + ⟨2, 4, [], [1], [5, 6, 7], 1, 3⟩, + ⟨2, 5, [], [1], [4], 1, 5⟩, + ⟨2, 6, [], [1], [5, 4], 1, 4⟩, + ⟨2, 7, [], [1], [], 2, 6⟩, + ⟨2, 7, [], [1], [6, 5, 4], 1, 3⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (2, 3), (1, 3)}⟩ + + +private def k8t5p7_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 6, {1, 2, 3}, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 6], + #[{1, 2, 3}, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p7_initial_eq_row_0 : ∀ j : Fin 8, (k8t5p7.initialMatrix 8) 0 j = k8t5p7_state_0 0 j := by decide + +private theorem k8t5p7_initial_eq_row_1 : ∀ j : Fin 8, (k8t5p7.initialMatrix 8) 1 j = k8t5p7_state_0 1 j := by decide + +private theorem k8t5p7_initial_eq_row_2 : ∀ j : Fin 8, (k8t5p7.initialMatrix 8) 2 j = k8t5p7_state_0 2 j := by decide + +private theorem k8t5p7_initial_eq_row_3 : ∀ j : Fin 8, (k8t5p7.initialMatrix 8) 3 j = k8t5p7_state_0 3 j := by decide + +private theorem k8t5p7_initial_eq_row_4 : ∀ j : Fin 8, (k8t5p7.initialMatrix 8) 4 j = k8t5p7_state_0 4 j := by decide + +private theorem k8t5p7_initial_eq_row_5 : ∀ j : Fin 8, (k8t5p7.initialMatrix 8) 5 j = k8t5p7_state_0 5 j := by decide + +private theorem k8t5p7_initial_eq_row_6 : ∀ j : Fin 8, (k8t5p7.initialMatrix 8) 6 j = k8t5p7_state_0 6 j := by decide + +private theorem k8t5p7_initial_eq_row_7 : ∀ j : Fin 8, (k8t5p7.initialMatrix 8) 7 j = k8t5p7_state_0 7 j := by decide + +private theorem k8t5p7_initial_eq : (k8t5p7.initialMatrix 8) = k8t5p7_state_0 := by + funext i j + fin_cases i + + · exact k8t5p7_initial_eq_row_0 j + + · exact k8t5p7_initial_eq_row_1 j + + · exact k8t5p7_initial_eq_row_2 j + + · exact k8t5p7_initial_eq_row_3 j + + · exact k8t5p7_initial_eq_row_4 j + + · exact k8t5p7_initial_eq_row_5 j + + · exact k8t5p7_initial_eq_row_6 j + + · exact k8t5p7_initial_eq_row_7 j + +private theorem k8t5p7_closure_0 : ClosureCheck k8t5p7.graph k8t5p7_state_0 8 5 [] := by trivial + +private theorem k8t5p7_matrix_eq : k8t5p7.matrix 8 = k8t5p7_state_0 := by + change closureMatrix (k8t5p7.initialMatrix 8) _ = _ + rw [k8t5p7_initial_eq] + change closureMatrix k8t5p7_state_0 [] = _ + rfl + +private theorem k8t5p7_part_0 : k8t5p7.chains.flatten = List.finRange _ := by decide + +private theorem k8t5p7_part_1 : k8t5p7.chains.map List.length = ([[], [1], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t5p7_part_2 : k8t5p7.chains.map (fun l => l.map (fun i => decide (i ∈ k8t5p7.clique))) = ([[], [1], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t5p7_templates_item_0 : (⟨0, 1, [], [], [], 3, 7⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_1 : (⟨0, 1, [[4, 5, 6, 7]], [], [], 2, 3⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_2 : (⟨0, 1, [[4, 5, 6, 7]], [], [2, 3], 1, 1⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_3 : (⟨0, 2, [], [], [1], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_4 : (⟨0, 2, [[4, 5, 6, 7]], [], [1], 1, 2⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_5 : (⟨0, 3, [[4, 5, 6, 7]], [], [], 2, 3⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_6 : (⟨0, 3, [[4, 5, 6, 7]], [], [2, 1], 1, 1⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_7 : (⟨0, 4, [], [], [5, 6, 7], 2, 4⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_8 : (⟨0, 4, [[1, 2, 3]], [], [5, 6, 7], 1, 1⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_9 : (⟨0, 5, [], [], [4], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_10 : (⟨0, 5, [], [], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_11 : (⟨0, 6, [], [], [5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_12 : (⟨0, 7, [], [], [6, 5, 4], 2, 4⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_13 : (⟨0, 7, [[1, 2, 3]], [], [6, 5, 4], 1, 1⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_14 : (⟨1, 2, [], [], [3], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_15 : (⟨1, 2, [[4, 5, 6, 7]], [], [3], 1, 2⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_16 : (⟨1, 4, [], [], [5, 6, 7], 2, 4⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_17 : (⟨1, 4, [], [3, 2], [5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_18 : (⟨1, 5, [], [], [4], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_19 : (⟨1, 5, [], [], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_20 : (⟨1, 6, [], [], [5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_21 : (⟨1, 7, [], [], [6, 5, 4], 2, 4⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_22 : (⟨1, 7, [], [3, 2], [6, 5, 4], 1, 2⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_23 : (⟨2, 3, [], [1], [], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_24 : (⟨2, 3, [[4, 5, 6, 7]], [1], [], 1, 2⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_25 : (⟨2, 4, [], [1], [], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_26 : (⟨2, 4, [], [1], [5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_27 : (⟨2, 5, [], [1], [4], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_28 : (⟨2, 6, [], [1], [5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_29 : (⟨2, 7, [], [1], [], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_templates_item_30 : (⟨2, 7, [], [1], [6, 5, 4], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p7_part_3 : ∀ T ∈ k8t5p7.templates, T.Check k8t5p7.graph k8t5p7.clique 8 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k8t5p7, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p7_templates_item_0, k8t5p7_templates_item_1, k8t5p7_templates_item_2, k8t5p7_templates_item_3, k8t5p7_templates_item_4, k8t5p7_templates_item_5, k8t5p7_templates_item_6, k8t5p7_templates_item_7, k8t5p7_templates_item_8, k8t5p7_templates_item_9, k8t5p7_templates_item_10, k8t5p7_templates_item_11, k8t5p7_templates_item_12, k8t5p7_templates_item_13, k8t5p7_templates_item_14, k8t5p7_templates_item_15, k8t5p7_templates_item_16, k8t5p7_templates_item_17, k8t5p7_templates_item_18, k8t5p7_templates_item_19, k8t5p7_templates_item_20, k8t5p7_templates_item_21, k8t5p7_templates_item_22, k8t5p7_templates_item_23, k8t5p7_templates_item_24, k8t5p7_templates_item_25, k8t5p7_templates_item_26, k8t5p7_templates_item_27, k8t5p7_templates_item_28, k8t5p7_templates_item_29, k8t5p7_templates_item_30⟩ + +private theorem k8t5p7_part_4 : ∀ p ∈ k8t5p7.required, p.Check k8t5p7.graph 8 := by decide + +private theorem k8t5p7_part_5 : ClosureCheck k8t5p7.graph (k8t5p7.initialMatrix 8) 8 5 k8t5p7.closure := by + rw [k8t5p7_initial_eq] + exact k8t5p7_closure_0 + +private theorem k8t5p7_part_6 : k8t5p7.bad.Check k8t5p7.graph (k8t5p7.matrix 8) 8 5 := by + rw [k8t5p7_matrix_eq] + decide + +theorem k8t5p7_check : k8t5p7.Check 8 5 [[], [1], [2]] := + ⟨k8t5p7_part_0, k8t5p7_part_1, k8t5p7_part_2, k8t5p7_part_3, k8t5p7_part_4, k8t5p7_part_5, k8t5p7_part_6⟩ +def k8t5p8 : LayoutCertificate 8 where + chains := [[0], [1, 2, 3, 4, 5, 6, 7]] + clique := {0, 1, 3, 5, 7} + templates := [⟨0, 1, [], [], [2, 3], 2, 5⟩, + ⟨0, 1, [], [], [2, 3, 4, 5, 6, 7], 1, 1⟩, + ⟨0, 2, [], [], [1], 2, 6⟩, + ⟨0, 2, [[3, 4, 5]], [], [1], 1, 3⟩, + ⟨0, 4, [], [], [3], 2, 6⟩, + ⟨0, 4, [], [], [3, 2, 1], 1, 4⟩, + ⟨0, 6, [], [], [5], 2, 6⟩, + ⟨0, 6, [[1, 2, 3]], [], [5], 1, 3⟩, + ⟨0, 7, [[1, 2, 3]], [], [], 2, 4⟩, + ⟨0, 7, [], [], [6, 5, 4, 3, 2, 1], 1, 1⟩, + ⟨1, 2, [], [], [3], 2, 6⟩, + ⟨1, 2, [], [], [3, 4, 5], 1, 4⟩, + ⟨1, 4, [], [3, 2], [5], 1, 4⟩, + ⟨1, 6, [], [3, 2], [5], 1, 4⟩, + ⟨2, 3, [], [1], [], 2, 6⟩, + ⟨2, 3, [], [1], [4, 5], 1, 4⟩, + ⟨2, 4, [], [1], [3], 1, 5⟩, + ⟨2, 5, [], [1], [], 2, 6⟩, + ⟨2, 5, [], [1], [4, 3], 1, 4⟩, + ⟨2, 6, [], [1], [5], 1, 5⟩, + ⟨2, 7, [], [1], [], 2, 6⟩, + ⟨2, 7, [[3, 4, 5]], [1], [], 1, 3⟩, + ⟨3, 4, [], [1, 2], [5], 1, 4⟩, + ⟨3, 6, [], [1, 2], [5], 1, 4⟩, + ⟨4, 5, [], [1, 2, 3], [], 1, 4⟩, + ⟨4, 6, [], [3], [5], 1, 5⟩, + ⟨4, 7, [], [1, 2, 3], [], 1, 4⟩, + ⟨5, 6, [[1, 2, 3]], [], [7], 1, 3⟩, + ⟨6, 7, [[1, 2, 3]], [5], [], 1, 3⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (2, 3), (4, 2), (6, 2)}⟩ + + +private def k8t5p8_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 4], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 4], + #[∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 5, {1, 2, 3}, ∅, {1, 2, 3}], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p8_initial_eq_row_0 : ∀ j : Fin 8, (k8t5p8.initialMatrix 8) 0 j = k8t5p8_state_0 0 j := by decide + +private theorem k8t5p8_initial_eq_row_1 : ∀ j : Fin 8, (k8t5p8.initialMatrix 8) 1 j = k8t5p8_state_0 1 j := by decide + +private theorem k8t5p8_initial_eq_row_2 : ∀ j : Fin 8, (k8t5p8.initialMatrix 8) 2 j = k8t5p8_state_0 2 j := by decide + +private theorem k8t5p8_initial_eq_row_3 : ∀ j : Fin 8, (k8t5p8.initialMatrix 8) 3 j = k8t5p8_state_0 3 j := by decide + +private theorem k8t5p8_initial_eq_row_4 : ∀ j : Fin 8, (k8t5p8.initialMatrix 8) 4 j = k8t5p8_state_0 4 j := by decide + +private theorem k8t5p8_initial_eq_row_5 : ∀ j : Fin 8, (k8t5p8.initialMatrix 8) 5 j = k8t5p8_state_0 5 j := by decide + +private theorem k8t5p8_initial_eq_row_6 : ∀ j : Fin 8, (k8t5p8.initialMatrix 8) 6 j = k8t5p8_state_0 6 j := by decide + +private theorem k8t5p8_initial_eq_row_7 : ∀ j : Fin 8, (k8t5p8.initialMatrix 8) 7 j = k8t5p8_state_0 7 j := by decide + +private theorem k8t5p8_initial_eq : (k8t5p8.initialMatrix 8) = k8t5p8_state_0 := by + funext i j + fin_cases i + + · exact k8t5p8_initial_eq_row_0 j + + · exact k8t5p8_initial_eq_row_1 j + + · exact k8t5p8_initial_eq_row_2 j + + · exact k8t5p8_initial_eq_row_3 j + + · exact k8t5p8_initial_eq_row_4 j + + · exact k8t5p8_initial_eq_row_5 j + + · exact k8t5p8_initial_eq_row_6 j + + · exact k8t5p8_initial_eq_row_7 j + +private theorem k8t5p8_closure_0 : ClosureCheck k8t5p8.graph k8t5p8_state_0 8 5 [] := by trivial + +private theorem k8t5p8_matrix_eq : k8t5p8.matrix 8 = k8t5p8_state_0 := by + change closureMatrix (k8t5p8.initialMatrix 8) _ = _ + rw [k8t5p8_initial_eq] + change closureMatrix k8t5p8_state_0 [] = _ + rfl + +private theorem k8t5p8_part_0 : k8t5p8.chains.flatten = List.finRange _ := by decide + +private theorem k8t5p8_part_1 : k8t5p8.chains.map List.length = ([[], [1, 1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t5p8_part_2 : k8t5p8.chains.map (fun l => l.map (fun i => decide (i ∈ k8t5p8.clique))) = ([[], [1, 1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t5p8_templates_item_0 : (⟨0, 1, [], [], [2, 3], 2, 5⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5, 6, 7], 1, 1⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_2 : (⟨0, 2, [], [], [1], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_3 : (⟨0, 2, [[3, 4, 5]], [], [1], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_4 : (⟨0, 4, [], [], [3], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_5 : (⟨0, 4, [], [], [3, 2, 1], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_6 : (⟨0, 6, [], [], [5], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_7 : (⟨0, 6, [[1, 2, 3]], [], [5], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_8 : (⟨0, 7, [[1, 2, 3]], [], [], 2, 4⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_9 : (⟨0, 7, [], [], [6, 5, 4, 3, 2, 1], 1, 1⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_10 : (⟨1, 2, [], [], [3], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_11 : (⟨1, 2, [], [], [3, 4, 5], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_12 : (⟨1, 4, [], [3, 2], [5], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_13 : (⟨1, 6, [], [3, 2], [5], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_14 : (⟨2, 3, [], [1], [], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_15 : (⟨2, 3, [], [1], [4, 5], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_16 : (⟨2, 4, [], [1], [3], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_17 : (⟨2, 5, [], [1], [], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_18 : (⟨2, 5, [], [1], [4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_19 : (⟨2, 6, [], [1], [5], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_20 : (⟨2, 7, [], [1], [], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_21 : (⟨2, 7, [[3, 4, 5]], [1], [], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_22 : (⟨3, 4, [], [1, 2], [5], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_23 : (⟨3, 6, [], [1, 2], [5], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_24 : (⟨4, 5, [], [1, 2, 3], [], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_25 : (⟨4, 6, [], [3], [5], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_26 : (⟨4, 7, [], [1, 2, 3], [], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_27 : (⟨5, 6, [[1, 2, 3]], [], [7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_templates_item_28 : (⟨6, 7, [[1, 2, 3]], [5], [], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p8_part_3 : ∀ T ∈ k8t5p8.templates, T.Check k8t5p8.graph k8t5p8.clique 8 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k8t5p8, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p8_templates_item_0, k8t5p8_templates_item_1, k8t5p8_templates_item_2, k8t5p8_templates_item_3, k8t5p8_templates_item_4, k8t5p8_templates_item_5, k8t5p8_templates_item_6, k8t5p8_templates_item_7, k8t5p8_templates_item_8, k8t5p8_templates_item_9, k8t5p8_templates_item_10, k8t5p8_templates_item_11, k8t5p8_templates_item_12, k8t5p8_templates_item_13, k8t5p8_templates_item_14, k8t5p8_templates_item_15, k8t5p8_templates_item_16, k8t5p8_templates_item_17, k8t5p8_templates_item_18, k8t5p8_templates_item_19, k8t5p8_templates_item_20, k8t5p8_templates_item_21, k8t5p8_templates_item_22, k8t5p8_templates_item_23, k8t5p8_templates_item_24, k8t5p8_templates_item_25, k8t5p8_templates_item_26, k8t5p8_templates_item_27, k8t5p8_templates_item_28⟩ + +private theorem k8t5p8_part_4 : ∀ p ∈ k8t5p8.required, p.Check k8t5p8.graph 8 := by decide + +private theorem k8t5p8_part_5 : ClosureCheck k8t5p8.graph (k8t5p8.initialMatrix 8) 8 5 k8t5p8.closure := by + rw [k8t5p8_initial_eq] + exact k8t5p8_closure_0 + +private theorem k8t5p8_part_6 : k8t5p8.bad.Check k8t5p8.graph (k8t5p8.matrix 8) 8 5 := by + rw [k8t5p8_matrix_eq] + decide + +theorem k8t5p8_check : k8t5p8.Check 8 5 [[], [1, 1, 1]] := + ⟨k8t5p8_part_0, k8t5p8_part_1, k8t5p8_part_2, k8t5p8_part_3, k8t5p8_part_4, k8t5p8_part_5, k8t5p8_part_6⟩ +def k8t5p9 : LayoutCertificate 8 where + chains := [[0, 1, 2], [3, 4, 5, 6, 7]] + clique := {0, 2, 3, 5, 7} + templates := [⟨0, 1, [], [], [2], 2, 6⟩, + ⟨0, 1, [[3, 4, 5]], [], [2], 1, 3⟩, + ⟨0, 3, [], [], [], 3, 7⟩, + ⟨0, 3, [], [2, 1], [], 2, 5⟩, + ⟨0, 3, [], [2, 1], [4, 5, 6, 7], 1, 1⟩, + ⟨0, 4, [], [], [3], 2, 6⟩, + ⟨0, 4, [], [2, 1], [3], 1, 4⟩, + ⟨0, 6, [], [], [5], 2, 6⟩, + ⟨0, 6, [], [2, 1], [5], 1, 4⟩, + ⟨0, 7, [], [2, 1], [], 2, 5⟩, + ⟨0, 7, [], [2, 1], [6, 5, 4, 3], 1, 1⟩, + ⟨1, 2, [], [0], [], 2, 6⟩, + ⟨1, 2, [[3, 4, 5]], [0], [], 1, 3⟩, + ⟨1, 3, [], [0], [], 2, 6⟩, + ⟨1, 3, [], [0], [4, 5], 1, 4⟩, + ⟨1, 4, [], [0], [3], 1, 5⟩, + ⟨1, 5, [], [0], [], 2, 6⟩, + ⟨1, 5, [], [0], [4, 3], 1, 4⟩, + ⟨1, 6, [], [0], [5], 1, 5⟩, + ⟨1, 7, [], [0], [], 2, 6⟩, + ⟨1, 7, [[3, 4, 5]], [0], [], 1, 3⟩, + ⟨2, 3, [], [0, 1], [], 2, 5⟩, + ⟨2, 3, [], [0, 1], [4, 5, 6, 7], 1, 1⟩, + ⟨3, 4, [], [], [5], 2, 6⟩, + ⟨3, 4, [[0, 1, 2]], [], [5], 1, 3⟩, + ⟨3, 6, [], [], [5], 2, 6⟩, + ⟨3, 6, [[0, 1, 2]], [], [5], 1, 3⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 3), (0, 3), (3, 3)}⟩ + + +private def k8t5p9_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, ∅, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[∅, Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t5p9_initial_eq_row_0 : ∀ j : Fin 8, (k8t5p9.initialMatrix 8) 0 j = k8t5p9_state_0 0 j := by decide + +private theorem k8t5p9_initial_eq_row_1 : ∀ j : Fin 8, (k8t5p9.initialMatrix 8) 1 j = k8t5p9_state_0 1 j := by decide + +private theorem k8t5p9_initial_eq_row_2 : ∀ j : Fin 8, (k8t5p9.initialMatrix 8) 2 j = k8t5p9_state_0 2 j := by decide + +private theorem k8t5p9_initial_eq_row_3 : ∀ j : Fin 8, (k8t5p9.initialMatrix 8) 3 j = k8t5p9_state_0 3 j := by decide + +private theorem k8t5p9_initial_eq_row_4 : ∀ j : Fin 8, (k8t5p9.initialMatrix 8) 4 j = k8t5p9_state_0 4 j := by decide + +private theorem k8t5p9_initial_eq_row_5 : ∀ j : Fin 8, (k8t5p9.initialMatrix 8) 5 j = k8t5p9_state_0 5 j := by decide + +private theorem k8t5p9_initial_eq_row_6 : ∀ j : Fin 8, (k8t5p9.initialMatrix 8) 6 j = k8t5p9_state_0 6 j := by decide + +private theorem k8t5p9_initial_eq_row_7 : ∀ j : Fin 8, (k8t5p9.initialMatrix 8) 7 j = k8t5p9_state_0 7 j := by decide + +private theorem k8t5p9_initial_eq : (k8t5p9.initialMatrix 8) = k8t5p9_state_0 := by + funext i j + fin_cases i + + · exact k8t5p9_initial_eq_row_0 j + + · exact k8t5p9_initial_eq_row_1 j + + · exact k8t5p9_initial_eq_row_2 j + + · exact k8t5p9_initial_eq_row_3 j + + · exact k8t5p9_initial_eq_row_4 j + + · exact k8t5p9_initial_eq_row_5 j + + · exact k8t5p9_initial_eq_row_6 j + + · exact k8t5p9_initial_eq_row_7 j + +private theorem k8t5p9_closure_0 : ClosureCheck k8t5p9.graph k8t5p9_state_0 8 5 [] := by trivial + +private theorem k8t5p9_matrix_eq : k8t5p9.matrix 8 = k8t5p9_state_0 := by + change closureMatrix (k8t5p9.initialMatrix 8) _ = _ + rw [k8t5p9_initial_eq] + change closureMatrix k8t5p9_state_0 [] = _ + rfl + +private theorem k8t5p9_part_0 : k8t5p9.chains.flatten = List.finRange _ := by decide + +private theorem k8t5p9_part_1 : k8t5p9.chains.map List.length = ([[1], [1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t5p9_part_2 : k8t5p9.chains.map (fun l => l.map (fun i => decide (i ∈ k8t5p9.clique))) = ([[1], [1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t5p9_templates_item_0 : (⟨0, 1, [], [], [2], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_1 : (⟨0, 1, [[3, 4, 5]], [], [2], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_2 : (⟨0, 3, [], [], [], 3, 7⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_3 : (⟨0, 3, [], [2, 1], [], 2, 5⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_4 : (⟨0, 3, [], [2, 1], [4, 5, 6, 7], 1, 1⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_5 : (⟨0, 4, [], [], [3], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_6 : (⟨0, 4, [], [2, 1], [3], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_7 : (⟨0, 6, [], [], [5], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_8 : (⟨0, 6, [], [2, 1], [5], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_9 : (⟨0, 7, [], [2, 1], [], 2, 5⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_10 : (⟨0, 7, [], [2, 1], [6, 5, 4, 3], 1, 1⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_11 : (⟨1, 2, [], [0], [], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_12 : (⟨1, 2, [[3, 4, 5]], [0], [], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_13 : (⟨1, 3, [], [0], [], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_14 : (⟨1, 3, [], [0], [4, 5], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_15 : (⟨1, 4, [], [0], [3], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_16 : (⟨1, 5, [], [0], [], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_17 : (⟨1, 5, [], [0], [4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_18 : (⟨1, 6, [], [0], [5], 1, 5⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_19 : (⟨1, 7, [], [0], [], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_20 : (⟨1, 7, [[3, 4, 5]], [0], [], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_21 : (⟨2, 3, [], [0, 1], [], 2, 5⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_22 : (⟨2, 3, [], [0, 1], [4, 5, 6, 7], 1, 1⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_23 : (⟨3, 4, [], [], [5], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_24 : (⟨3, 4, [[0, 1, 2]], [], [5], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_25 : (⟨3, 6, [], [], [5], 2, 6⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_templates_item_26 : (⟨3, 6, [[0, 1, 2]], [], [5], 1, 3⟩ : TemplateData (Fin 8)).Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t5p9_part_3 : ∀ T ∈ k8t5p9.templates, T.Check k8t5p9.graph k8t5p9.clique 8 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k8t5p9, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t5p9_templates_item_0, k8t5p9_templates_item_1, k8t5p9_templates_item_2, k8t5p9_templates_item_3, k8t5p9_templates_item_4, k8t5p9_templates_item_5, k8t5p9_templates_item_6, k8t5p9_templates_item_7, k8t5p9_templates_item_8, k8t5p9_templates_item_9, k8t5p9_templates_item_10, k8t5p9_templates_item_11, k8t5p9_templates_item_12, k8t5p9_templates_item_13, k8t5p9_templates_item_14, k8t5p9_templates_item_15, k8t5p9_templates_item_16, k8t5p9_templates_item_17, k8t5p9_templates_item_18, k8t5p9_templates_item_19, k8t5p9_templates_item_20, k8t5p9_templates_item_21, k8t5p9_templates_item_22, k8t5p9_templates_item_23, k8t5p9_templates_item_24, k8t5p9_templates_item_25, k8t5p9_templates_item_26⟩ + +private theorem k8t5p9_part_4 : ∀ p ∈ k8t5p9.required, p.Check k8t5p9.graph 8 := by decide + +private theorem k8t5p9_part_5 : ClosureCheck k8t5p9.graph (k8t5p9.initialMatrix 8) 8 5 k8t5p9.closure := by + rw [k8t5p9_initial_eq] + exact k8t5p9_closure_0 + +private theorem k8t5p9_part_6 : k8t5p9.bad.Check k8t5p9.graph (k8t5p9.matrix 8) 8 5 := by + rw [k8t5p9_matrix_eq] + decide + +theorem k8t5p9_check : k8t5p9.Check 8 5 [[1], [1, 1]] := + ⟨k8t5p9_part_0, k8t5p9_part_1, k8t5p9_part_2, k8t5p9_part_3, k8t5p9_part_4, k8t5p9_part_5, k8t5p9_part_6⟩ +def k8t6p0 : LayoutCertificate 6 where + chains := [[0], [1], [2], [3], [4], [5]] + clique := {0, 1, 2, 3, 4, 5} + templates := [⟨0, 1, [], [], [], 1, 7⟩, + ⟨0, 2, [], [], [], 1, 7⟩, + ⟨0, 3, [], [], [], 1, 7⟩, + ⟨0, 4, [], [], [], 1, 7⟩, + ⟨0, 5, [], [], [], 1, 7⟩, + ⟨1, 2, [], [], [], 1, 7⟩, + ⟨1, 3, [], [], [], 1, 7⟩, + ⟨1, 4, [], [], [], 1, 7⟩, + ⟨1, 5, [], [], [], 1, 7⟩, + ⟨2, 3, [], [], [], 1, 7⟩, + ⟨2, 4, [], [], [], 1, 7⟩, + ⟨2, 5, [], [], [], 1, 7⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k8t6p0_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t6p0_initial_eq_row_0 : ∀ j : Fin 6, (k8t6p0.initialMatrix 8) 0 j = k8t6p0_state_0 0 j := by decide + +private theorem k8t6p0_initial_eq_row_1 : ∀ j : Fin 6, (k8t6p0.initialMatrix 8) 1 j = k8t6p0_state_0 1 j := by decide + +private theorem k8t6p0_initial_eq_row_2 : ∀ j : Fin 6, (k8t6p0.initialMatrix 8) 2 j = k8t6p0_state_0 2 j := by decide + +private theorem k8t6p0_initial_eq_row_3 : ∀ j : Fin 6, (k8t6p0.initialMatrix 8) 3 j = k8t6p0_state_0 3 j := by decide + +private theorem k8t6p0_initial_eq_row_4 : ∀ j : Fin 6, (k8t6p0.initialMatrix 8) 4 j = k8t6p0_state_0 4 j := by decide + +private theorem k8t6p0_initial_eq_row_5 : ∀ j : Fin 6, (k8t6p0.initialMatrix 8) 5 j = k8t6p0_state_0 5 j := by decide + +private theorem k8t6p0_initial_eq : (k8t6p0.initialMatrix 8) = k8t6p0_state_0 := by + funext i j + fin_cases i + + · exact k8t6p0_initial_eq_row_0 j + + · exact k8t6p0_initial_eq_row_1 j + + · exact k8t6p0_initial_eq_row_2 j + + · exact k8t6p0_initial_eq_row_3 j + + · exact k8t6p0_initial_eq_row_4 j + + · exact k8t6p0_initial_eq_row_5 j + +private theorem k8t6p0_closure_0 : ClosureCheck k8t6p0.graph k8t6p0_state_0 8 6 [] := by trivial + +private theorem k8t6p0_matrix_eq : k8t6p0.matrix 8 = k8t6p0_state_0 := by + change closureMatrix (k8t6p0.initialMatrix 8) _ = _ + rw [k8t6p0_initial_eq] + change closureMatrix k8t6p0_state_0 [] = _ + rfl + +private theorem k8t6p0_part_0 : k8t6p0.chains.flatten = List.finRange _ := by decide + +private theorem k8t6p0_part_1 : k8t6p0.chains.map List.length = ([[], [], [], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t6p0_part_2 : k8t6p0.chains.map (fun l => l.map (fun i => decide (i ∈ k8t6p0.clique))) = ([[], [], [], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k8t6p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 7⟩ : TemplateData (Fin 6)).Check k8t6p0.graph k8t6p0.clique 8 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 7⟩ : TemplateData (Fin 6)).Check k8t6p0.graph k8t6p0.clique 8 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 7⟩ : TemplateData (Fin 6)).Check k8t6p0.graph k8t6p0.clique 8 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p0_templates_item_3 : (⟨0, 4, [], [], [], 1, 7⟩ : TemplateData (Fin 6)).Check k8t6p0.graph k8t6p0.clique 8 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p0_templates_item_4 : (⟨0, 5, [], [], [], 1, 7⟩ : TemplateData (Fin 6)).Check k8t6p0.graph k8t6p0.clique 8 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p0_templates_item_5 : (⟨1, 2, [], [], [], 1, 7⟩ : TemplateData (Fin 6)).Check k8t6p0.graph k8t6p0.clique 8 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p0_templates_item_6 : (⟨1, 3, [], [], [], 1, 7⟩ : TemplateData (Fin 6)).Check k8t6p0.graph k8t6p0.clique 8 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p0_templates_item_7 : (⟨1, 4, [], [], [], 1, 7⟩ : TemplateData (Fin 6)).Check k8t6p0.graph k8t6p0.clique 8 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p0_templates_item_8 : (⟨1, 5, [], [], [], 1, 7⟩ : TemplateData (Fin 6)).Check k8t6p0.graph k8t6p0.clique 8 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p0_templates_item_9 : (⟨2, 3, [], [], [], 1, 7⟩ : TemplateData (Fin 6)).Check k8t6p0.graph k8t6p0.clique 8 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p0_templates_item_10 : (⟨2, 4, [], [], [], 1, 7⟩ : TemplateData (Fin 6)).Check k8t6p0.graph k8t6p0.clique 8 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p0_templates_item_11 : (⟨2, 5, [], [], [], 1, 7⟩ : TemplateData (Fin 6)).Check k8t6p0.graph k8t6p0.clique 8 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p0_part_3 : ∀ T ∈ k8t6p0.templates, T.Check k8t6p0.graph k8t6p0.clique 8 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k8t6p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t6p0_templates_item_0, k8t6p0_templates_item_1, k8t6p0_templates_item_2, k8t6p0_templates_item_3, k8t6p0_templates_item_4, k8t6p0_templates_item_5, k8t6p0_templates_item_6, k8t6p0_templates_item_7, k8t6p0_templates_item_8, k8t6p0_templates_item_9, k8t6p0_templates_item_10, k8t6p0_templates_item_11⟩ + +private theorem k8t6p0_part_4 : ∀ p ∈ k8t6p0.required, p.Check k8t6p0.graph 8 := by decide + +private theorem k8t6p0_part_5 : ClosureCheck k8t6p0.graph (k8t6p0.initialMatrix 8) 8 6 k8t6p0.closure := by + rw [k8t6p0_initial_eq] + exact k8t6p0_closure_0 + +private theorem k8t6p0_part_6 : k8t6p0.bad.Check k8t6p0.graph (k8t6p0.matrix 8) 8 6 := by + rw [k8t6p0_matrix_eq] + decide + +theorem k8t6p0_check : k8t6p0.Check 8 6 [[], [], [], [], [], []] := + ⟨k8t6p0_part_0, k8t6p0_part_1, k8t6p0_part_2, k8t6p0_part_3, k8t6p0_part_4, k8t6p0_part_5, k8t6p0_part_6⟩ +def k8t6p1 : LayoutCertificate 7 where + chains := [[0], [1], [2], [3], [4, 5, 6]] + clique := {0, 1, 2, 3, 4, 6} + templates := [⟨0, 1, [], [], [], 2, 7⟩, + ⟨0, 1, [[4, 5, 6]], [], [], 1, 4⟩, + ⟨0, 2, [], [], [], 2, 7⟩, + ⟨0, 2, [[4, 5, 6]], [], [], 1, 4⟩, + ⟨0, 3, [], [], [], 2, 7⟩, + ⟨0, 3, [[4, 5, 6]], [], [], 1, 4⟩, + ⟨0, 4, [], [], [], 2, 7⟩, + ⟨0, 4, [], [], [5, 6], 1, 5⟩, + ⟨0, 5, [], [], [4], 1, 6⟩, + ⟨0, 6, [], [], [], 2, 7⟩, + ⟨0, 6, [], [], [5, 4], 1, 5⟩, + ⟨1, 2, [], [], [], 2, 7⟩, + ⟨1, 2, [[4, 5, 6]], [], [], 1, 4⟩, + ⟨1, 3, [], [], [], 2, 7⟩, + ⟨1, 3, [[4, 5, 6]], [], [], 1, 4⟩, + ⟨1, 4, [], [], [], 2, 7⟩, + ⟨1, 4, [], [], [5, 6], 1, 5⟩, + ⟨1, 5, [], [], [4], 1, 6⟩, + ⟨1, 6, [], [], [], 2, 7⟩, + ⟨1, 6, [], [], [5, 4], 1, 5⟩, + ⟨2, 3, [], [], [], 2, 7⟩, + ⟨2, 3, [[4, 5, 6]], [], [], 1, 4⟩, + ⟨2, 4, [], [], [], 2, 7⟩, + ⟨2, 4, [], [], [5, 6], 1, 5⟩, + ⟨2, 5, [], [], [4], 1, 6⟩, + ⟨2, 6, [], [], [], 2, 7⟩, + ⟨2, 6, [], [], [5, 4], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k8t6p1_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t6p1_initial_eq_row_0 : ∀ j : Fin 7, (k8t6p1.initialMatrix 8) 0 j = k8t6p1_state_0 0 j := by decide + +private theorem k8t6p1_initial_eq_row_1 : ∀ j : Fin 7, (k8t6p1.initialMatrix 8) 1 j = k8t6p1_state_0 1 j := by decide + +private theorem k8t6p1_initial_eq_row_2 : ∀ j : Fin 7, (k8t6p1.initialMatrix 8) 2 j = k8t6p1_state_0 2 j := by decide + +private theorem k8t6p1_initial_eq_row_3 : ∀ j : Fin 7, (k8t6p1.initialMatrix 8) 3 j = k8t6p1_state_0 3 j := by decide + +private theorem k8t6p1_initial_eq_row_4 : ∀ j : Fin 7, (k8t6p1.initialMatrix 8) 4 j = k8t6p1_state_0 4 j := by decide + +private theorem k8t6p1_initial_eq_row_5 : ∀ j : Fin 7, (k8t6p1.initialMatrix 8) 5 j = k8t6p1_state_0 5 j := by decide + +private theorem k8t6p1_initial_eq_row_6 : ∀ j : Fin 7, (k8t6p1.initialMatrix 8) 6 j = k8t6p1_state_0 6 j := by decide + +private theorem k8t6p1_initial_eq : (k8t6p1.initialMatrix 8) = k8t6p1_state_0 := by + funext i j + fin_cases i + + · exact k8t6p1_initial_eq_row_0 j + + · exact k8t6p1_initial_eq_row_1 j + + · exact k8t6p1_initial_eq_row_2 j + + · exact k8t6p1_initial_eq_row_3 j + + · exact k8t6p1_initial_eq_row_4 j + + · exact k8t6p1_initial_eq_row_5 j + + · exact k8t6p1_initial_eq_row_6 j + +private theorem k8t6p1_closure_0 : ClosureCheck k8t6p1.graph k8t6p1_state_0 8 6 [] := by trivial + +private theorem k8t6p1_matrix_eq : k8t6p1.matrix 8 = k8t6p1_state_0 := by + change closureMatrix (k8t6p1.initialMatrix 8) _ = _ + rw [k8t6p1_initial_eq] + change closureMatrix k8t6p1_state_0 [] = _ + rfl + +private theorem k8t6p1_part_0 : k8t6p1.chains.flatten = List.finRange _ := by decide + +private theorem k8t6p1_part_1 : k8t6p1.chains.map List.length = ([[], [], [], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t6p1_part_2 : k8t6p1.chains.map (fun l => l.map (fun i => decide (i ∈ k8t6p1.clique))) = ([[], [], [], [], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t6p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_1 : (⟨0, 1, [[4, 5, 6]], [], [], 1, 4⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_2 : (⟨0, 2, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_3 : (⟨0, 2, [[4, 5, 6]], [], [], 1, 4⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_4 : (⟨0, 3, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_5 : (⟨0, 3, [[4, 5, 6]], [], [], 1, 4⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_6 : (⟨0, 4, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_7 : (⟨0, 4, [], [], [5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_8 : (⟨0, 5, [], [], [4], 1, 6⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_9 : (⟨0, 6, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_10 : (⟨0, 6, [], [], [5, 4], 1, 5⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_11 : (⟨1, 2, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_12 : (⟨1, 2, [[4, 5, 6]], [], [], 1, 4⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_13 : (⟨1, 3, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_14 : (⟨1, 3, [[4, 5, 6]], [], [], 1, 4⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_15 : (⟨1, 4, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_16 : (⟨1, 4, [], [], [5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_17 : (⟨1, 5, [], [], [4], 1, 6⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_18 : (⟨1, 6, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_19 : (⟨1, 6, [], [], [5, 4], 1, 5⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_20 : (⟨2, 3, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_21 : (⟨2, 3, [[4, 5, 6]], [], [], 1, 4⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_22 : (⟨2, 4, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_23 : (⟨2, 4, [], [], [5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_24 : (⟨2, 5, [], [], [4], 1, 6⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_25 : (⟨2, 6, [], [], [], 2, 7⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_templates_item_26 : (⟨2, 6, [], [], [5, 4], 1, 5⟩ : TemplateData (Fin 7)).Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p1_part_3 : ∀ T ∈ k8t6p1.templates, T.Check k8t6p1.graph k8t6p1.clique 8 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k8t6p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t6p1_templates_item_0, k8t6p1_templates_item_1, k8t6p1_templates_item_2, k8t6p1_templates_item_3, k8t6p1_templates_item_4, k8t6p1_templates_item_5, k8t6p1_templates_item_6, k8t6p1_templates_item_7, k8t6p1_templates_item_8, k8t6p1_templates_item_9, k8t6p1_templates_item_10, k8t6p1_templates_item_11, k8t6p1_templates_item_12, k8t6p1_templates_item_13, k8t6p1_templates_item_14, k8t6p1_templates_item_15, k8t6p1_templates_item_16, k8t6p1_templates_item_17, k8t6p1_templates_item_18, k8t6p1_templates_item_19, k8t6p1_templates_item_20, k8t6p1_templates_item_21, k8t6p1_templates_item_22, k8t6p1_templates_item_23, k8t6p1_templates_item_24, k8t6p1_templates_item_25, k8t6p1_templates_item_26⟩ + +private theorem k8t6p1_part_4 : ∀ p ∈ k8t6p1.required, p.Check k8t6p1.graph 8 := by decide + +private theorem k8t6p1_part_5 : ClosureCheck k8t6p1.graph (k8t6p1.initialMatrix 8) 8 6 k8t6p1.closure := by + rw [k8t6p1_initial_eq] + exact k8t6p1_closure_0 + +private theorem k8t6p1_part_6 : k8t6p1.bad.Check k8t6p1.graph (k8t6p1.matrix 8) 8 6 := by + rw [k8t6p1_matrix_eq] + decide + +theorem k8t6p1_check : k8t6p1.Check 8 6 [[], [], [], [], [1]] := + ⟨k8t6p1_part_0, k8t6p1_part_1, k8t6p1_part_2, k8t6p1_part_3, k8t6p1_part_4, k8t6p1_part_5, k8t6p1_part_6⟩ +def k8t6p2 : LayoutCertificate 8 where + chains := [[0], [1], [2], [3], [4, 5, 6, 7]] + clique := {0, 1, 2, 3, 4, 7} + templates := [⟨0, 1, [], [], [], 3, 7⟩, + ⟨0, 1, [[4, 5, 6, 7]], [], [], 1, 3⟩, + ⟨0, 2, [], [], [], 3, 7⟩, + ⟨0, 2, [[4, 5, 6, 7]], [], [], 1, 3⟩, + ⟨0, 3, [[4, 5, 6, 7]], [], [], 1, 3⟩, + ⟨0, 4, [], [], [5, 6, 7], 1, 4⟩, + ⟨0, 5, [], [], [4], 2, 6⟩, + ⟨0, 5, [], [], [6, 7], 1, 5⟩, + ⟨0, 6, [], [], [5, 4], 1, 5⟩, + ⟨0, 7, [], [], [6, 5, 4], 1, 4⟩, + ⟨1, 2, [], [], [], 3, 7⟩, + ⟨1, 2, [[4, 5, 6, 7]], [], [], 1, 3⟩, + ⟨1, 3, [[4, 5, 6, 7]], [], [], 1, 3⟩, + ⟨1, 4, [], [], [5, 6, 7], 1, 4⟩, + ⟨1, 5, [], [], [4], 2, 6⟩, + ⟨1, 5, [], [], [6, 7], 1, 5⟩, + ⟨1, 6, [], [], [5, 4], 1, 5⟩, + ⟨1, 7, [], [], [6, 5, 4], 1, 4⟩, + ⟨2, 3, [[4, 5, 6, 7]], [], [], 1, 3⟩, + ⟨2, 4, [], [], [5, 6, 7], 1, 4⟩, + ⟨2, 5, [], [], [4], 2, 6⟩, + ⟨2, 5, [], [], [6, 7], 1, 5⟩, + ⟨2, 6, [], [], [5, 4], 1, 5⟩, + ⟨2, 7, [], [], [6, 5, 4], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k8t6p2_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, {1, 2, 3}, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, {1, 2, 3}, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, {1, 2, 3}, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t6p2_initial_eq_row_0 : ∀ j : Fin 8, (k8t6p2.initialMatrix 8) 0 j = k8t6p2_state_0 0 j := by decide + +private theorem k8t6p2_initial_eq_row_1 : ∀ j : Fin 8, (k8t6p2.initialMatrix 8) 1 j = k8t6p2_state_0 1 j := by decide + +private theorem k8t6p2_initial_eq_row_2 : ∀ j : Fin 8, (k8t6p2.initialMatrix 8) 2 j = k8t6p2_state_0 2 j := by decide + +private theorem k8t6p2_initial_eq_row_3 : ∀ j : Fin 8, (k8t6p2.initialMatrix 8) 3 j = k8t6p2_state_0 3 j := by decide + +private theorem k8t6p2_initial_eq_row_4 : ∀ j : Fin 8, (k8t6p2.initialMatrix 8) 4 j = k8t6p2_state_0 4 j := by decide + +private theorem k8t6p2_initial_eq_row_5 : ∀ j : Fin 8, (k8t6p2.initialMatrix 8) 5 j = k8t6p2_state_0 5 j := by decide + +private theorem k8t6p2_initial_eq_row_6 : ∀ j : Fin 8, (k8t6p2.initialMatrix 8) 6 j = k8t6p2_state_0 6 j := by decide + +private theorem k8t6p2_initial_eq_row_7 : ∀ j : Fin 8, (k8t6p2.initialMatrix 8) 7 j = k8t6p2_state_0 7 j := by decide + +private theorem k8t6p2_initial_eq : (k8t6p2.initialMatrix 8) = k8t6p2_state_0 := by + funext i j + fin_cases i + + · exact k8t6p2_initial_eq_row_0 j + + · exact k8t6p2_initial_eq_row_1 j + + · exact k8t6p2_initial_eq_row_2 j + + · exact k8t6p2_initial_eq_row_3 j + + · exact k8t6p2_initial_eq_row_4 j + + · exact k8t6p2_initial_eq_row_5 j + + · exact k8t6p2_initial_eq_row_6 j + + · exact k8t6p2_initial_eq_row_7 j + +private theorem k8t6p2_closure_0 : ClosureCheck k8t6p2.graph k8t6p2_state_0 8 6 [] := by trivial + +private theorem k8t6p2_matrix_eq : k8t6p2.matrix 8 = k8t6p2_state_0 := by + change closureMatrix (k8t6p2.initialMatrix 8) _ = _ + rw [k8t6p2_initial_eq] + change closureMatrix k8t6p2_state_0 [] = _ + rfl + +private theorem k8t6p2_part_0 : k8t6p2.chains.flatten = List.finRange _ := by decide + +private theorem k8t6p2_part_1 : k8t6p2.chains.map List.length = ([[], [], [], [], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t6p2_part_2 : k8t6p2.chains.map (fun l => l.map (fun i => decide (i ∈ k8t6p2.clique))) = ([[], [], [], [], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t6p2_templates_item_0 : (⟨0, 1, [], [], [], 3, 7⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_1 : (⟨0, 1, [[4, 5, 6, 7]], [], [], 1, 3⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_2 : (⟨0, 2, [], [], [], 3, 7⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_3 : (⟨0, 2, [[4, 5, 6, 7]], [], [], 1, 3⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_4 : (⟨0, 3, [[4, 5, 6, 7]], [], [], 1, 3⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_5 : (⟨0, 4, [], [], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_6 : (⟨0, 5, [], [], [4], 2, 6⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_7 : (⟨0, 5, [], [], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_8 : (⟨0, 6, [], [], [5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_9 : (⟨0, 7, [], [], [6, 5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_10 : (⟨1, 2, [], [], [], 3, 7⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_11 : (⟨1, 2, [[4, 5, 6, 7]], [], [], 1, 3⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_12 : (⟨1, 3, [[4, 5, 6, 7]], [], [], 1, 3⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_13 : (⟨1, 4, [], [], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_14 : (⟨1, 5, [], [], [4], 2, 6⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_15 : (⟨1, 5, [], [], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_16 : (⟨1, 6, [], [], [5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_17 : (⟨1, 7, [], [], [6, 5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_18 : (⟨2, 3, [[4, 5, 6, 7]], [], [], 1, 3⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_19 : (⟨2, 4, [], [], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_20 : (⟨2, 5, [], [], [4], 2, 6⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_21 : (⟨2, 5, [], [], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_22 : (⟨2, 6, [], [], [5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_templates_item_23 : (⟨2, 7, [], [], [6, 5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p2_part_3 : ∀ T ∈ k8t6p2.templates, T.Check k8t6p2.graph k8t6p2.clique 8 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k8t6p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t6p2_templates_item_0, k8t6p2_templates_item_1, k8t6p2_templates_item_2, k8t6p2_templates_item_3, k8t6p2_templates_item_4, k8t6p2_templates_item_5, k8t6p2_templates_item_6, k8t6p2_templates_item_7, k8t6p2_templates_item_8, k8t6p2_templates_item_9, k8t6p2_templates_item_10, k8t6p2_templates_item_11, k8t6p2_templates_item_12, k8t6p2_templates_item_13, k8t6p2_templates_item_14, k8t6p2_templates_item_15, k8t6p2_templates_item_16, k8t6p2_templates_item_17, k8t6p2_templates_item_18, k8t6p2_templates_item_19, k8t6p2_templates_item_20, k8t6p2_templates_item_21, k8t6p2_templates_item_22, k8t6p2_templates_item_23⟩ + +private theorem k8t6p2_part_4 : ∀ p ∈ k8t6p2.required, p.Check k8t6p2.graph 8 := by decide + +private theorem k8t6p2_part_5 : ClosureCheck k8t6p2.graph (k8t6p2.initialMatrix 8) 8 6 k8t6p2.closure := by + rw [k8t6p2_initial_eq] + exact k8t6p2_closure_0 + +private theorem k8t6p2_part_6 : k8t6p2.bad.Check k8t6p2.graph (k8t6p2.matrix 8) 8 6 := by + rw [k8t6p2_matrix_eq] + decide + +theorem k8t6p2_check : k8t6p2.Check 8 6 [[], [], [], [], [2]] := + ⟨k8t6p2_part_0, k8t6p2_part_1, k8t6p2_part_2, k8t6p2_part_3, k8t6p2_part_4, k8t6p2_part_5, k8t6p2_part_6⟩ +def k8t6p3 : LayoutCertificate 8 where + chains := [[0], [1], [2], [3, 4, 5, 6, 7]] + clique := {0, 1, 2, 3, 5, 7} + templates := [⟨0, 1, [], [], [], 2, 7⟩, + ⟨0, 1, [[3, 4, 5, 6, 7]], [], [], 1, 2⟩, + ⟨0, 2, [], [], [], 2, 7⟩, + ⟨0, 2, [[3, 4, 5, 6, 7]], [], [], 1, 2⟩, + ⟨0, 3, [], [], [], 2, 7⟩, + ⟨0, 3, [], [], [4, 5, 6, 7], 1, 3⟩, + ⟨0, 4, [], [], [3], 1, 6⟩, + ⟨0, 6, [], [], [5], 1, 6⟩, + ⟨0, 7, [], [], [], 2, 7⟩, + ⟨0, 7, [], [], [6, 5, 4, 3], 1, 3⟩, + ⟨1, 2, [], [], [], 2, 7⟩, + ⟨1, 2, [[3, 4, 5, 6, 7]], [], [], 1, 2⟩, + ⟨1, 3, [], [], [], 2, 7⟩, + ⟨1, 3, [], [], [4, 5, 6, 7], 1, 3⟩, + ⟨1, 4, [], [], [3], 1, 6⟩, + ⟨1, 6, [], [], [5], 1, 6⟩, + ⟨1, 7, [], [], [], 2, 7⟩, + ⟨1, 7, [], [], [6, 5, 4, 3], 1, 3⟩, + ⟨2, 3, [], [], [], 2, 7⟩, + ⟨2, 3, [], [], [4, 5, 6, 7], 1, 3⟩, + ⟨2, 4, [], [], [3], 1, 6⟩, + ⟨2, 6, [], [], [5], 1, 6⟩, + ⟨2, 7, [], [], [], 2, 7⟩, + ⟨2, 7, [], [], [6, 5, 4, 3], 1, 3⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k8t6p3_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t6p3_initial_eq_row_0 : ∀ j : Fin 8, (k8t6p3.initialMatrix 8) 0 j = k8t6p3_state_0 0 j := by decide + +private theorem k8t6p3_initial_eq_row_1 : ∀ j : Fin 8, (k8t6p3.initialMatrix 8) 1 j = k8t6p3_state_0 1 j := by decide + +private theorem k8t6p3_initial_eq_row_2 : ∀ j : Fin 8, (k8t6p3.initialMatrix 8) 2 j = k8t6p3_state_0 2 j := by decide + +private theorem k8t6p3_initial_eq_row_3 : ∀ j : Fin 8, (k8t6p3.initialMatrix 8) 3 j = k8t6p3_state_0 3 j := by decide + +private theorem k8t6p3_initial_eq_row_4 : ∀ j : Fin 8, (k8t6p3.initialMatrix 8) 4 j = k8t6p3_state_0 4 j := by decide + +private theorem k8t6p3_initial_eq_row_5 : ∀ j : Fin 8, (k8t6p3.initialMatrix 8) 5 j = k8t6p3_state_0 5 j := by decide + +private theorem k8t6p3_initial_eq_row_6 : ∀ j : Fin 8, (k8t6p3.initialMatrix 8) 6 j = k8t6p3_state_0 6 j := by decide + +private theorem k8t6p3_initial_eq_row_7 : ∀ j : Fin 8, (k8t6p3.initialMatrix 8) 7 j = k8t6p3_state_0 7 j := by decide + +private theorem k8t6p3_initial_eq : (k8t6p3.initialMatrix 8) = k8t6p3_state_0 := by + funext i j + fin_cases i + + · exact k8t6p3_initial_eq_row_0 j + + · exact k8t6p3_initial_eq_row_1 j + + · exact k8t6p3_initial_eq_row_2 j + + · exact k8t6p3_initial_eq_row_3 j + + · exact k8t6p3_initial_eq_row_4 j + + · exact k8t6p3_initial_eq_row_5 j + + · exact k8t6p3_initial_eq_row_6 j + + · exact k8t6p3_initial_eq_row_7 j + +private theorem k8t6p3_closure_0 : ClosureCheck k8t6p3.graph k8t6p3_state_0 8 6 [] := by trivial + +private theorem k8t6p3_matrix_eq : k8t6p3.matrix 8 = k8t6p3_state_0 := by + change closureMatrix (k8t6p3.initialMatrix 8) _ = _ + rw [k8t6p3_initial_eq] + change closureMatrix k8t6p3_state_0 [] = _ + rfl + +private theorem k8t6p3_part_0 : k8t6p3.chains.flatten = List.finRange _ := by decide + +private theorem k8t6p3_part_1 : k8t6p3.chains.map List.length = ([[], [], [], [1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t6p3_part_2 : k8t6p3.chains.map (fun l => l.map (fun i => decide (i ∈ k8t6p3.clique))) = ([[], [], [], [1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t6p3_templates_item_0 : (⟨0, 1, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6, 7]], [], [], 1, 2⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_2 : (⟨0, 2, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_3 : (⟨0, 2, [[3, 4, 5, 6, 7]], [], [], 1, 2⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_4 : (⟨0, 3, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_5 : (⟨0, 3, [], [], [4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_6 : (⟨0, 4, [], [], [3], 1, 6⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_7 : (⟨0, 6, [], [], [5], 1, 6⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_8 : (⟨0, 7, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_9 : (⟨0, 7, [], [], [6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_10 : (⟨1, 2, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_11 : (⟨1, 2, [[3, 4, 5, 6, 7]], [], [], 1, 2⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_12 : (⟨1, 3, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_13 : (⟨1, 3, [], [], [4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_14 : (⟨1, 4, [], [], [3], 1, 6⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_15 : (⟨1, 6, [], [], [5], 1, 6⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_16 : (⟨1, 7, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_17 : (⟨1, 7, [], [], [6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_18 : (⟨2, 3, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_19 : (⟨2, 3, [], [], [4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_20 : (⟨2, 4, [], [], [3], 1, 6⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_21 : (⟨2, 6, [], [], [5], 1, 6⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_22 : (⟨2, 7, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_templates_item_23 : (⟨2, 7, [], [], [6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 8)).Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p3_part_3 : ∀ T ∈ k8t6p3.templates, T.Check k8t6p3.graph k8t6p3.clique 8 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k8t6p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t6p3_templates_item_0, k8t6p3_templates_item_1, k8t6p3_templates_item_2, k8t6p3_templates_item_3, k8t6p3_templates_item_4, k8t6p3_templates_item_5, k8t6p3_templates_item_6, k8t6p3_templates_item_7, k8t6p3_templates_item_8, k8t6p3_templates_item_9, k8t6p3_templates_item_10, k8t6p3_templates_item_11, k8t6p3_templates_item_12, k8t6p3_templates_item_13, k8t6p3_templates_item_14, k8t6p3_templates_item_15, k8t6p3_templates_item_16, k8t6p3_templates_item_17, k8t6p3_templates_item_18, k8t6p3_templates_item_19, k8t6p3_templates_item_20, k8t6p3_templates_item_21, k8t6p3_templates_item_22, k8t6p3_templates_item_23⟩ + +private theorem k8t6p3_part_4 : ∀ p ∈ k8t6p3.required, p.Check k8t6p3.graph 8 := by decide + +private theorem k8t6p3_part_5 : ClosureCheck k8t6p3.graph (k8t6p3.initialMatrix 8) 8 6 k8t6p3.closure := by + rw [k8t6p3_initial_eq] + exact k8t6p3_closure_0 + +private theorem k8t6p3_part_6 : k8t6p3.bad.Check k8t6p3.graph (k8t6p3.matrix 8) 8 6 := by + rw [k8t6p3_matrix_eq] + decide + +theorem k8t6p3_check : k8t6p3.Check 8 6 [[], [], [], [1, 1]] := + ⟨k8t6p3_part_0, k8t6p3_part_1, k8t6p3_part_2, k8t6p3_part_3, k8t6p3_part_4, k8t6p3_part_5, k8t6p3_part_6⟩ +def k8t6p4 : LayoutCertificate 8 where + chains := [[0], [1], [2, 3, 4], [5, 6, 7]] + clique := {0, 1, 2, 4, 5, 7} + templates := [⟨0, 1, [], [], [], 2, 7⟩, + ⟨0, 1, [[2, 3, 4], [5, 6, 7]], [], [], 1, 1⟩, + ⟨0, 2, [], [], [], 2, 7⟩, + ⟨0, 2, [[5, 6, 7]], [], [3, 4], 1, 2⟩, + ⟨0, 3, [], [], [2], 1, 6⟩, + ⟨0, 4, [], [], [], 2, 7⟩, + ⟨0, 4, [[5, 6, 7]], [], [3, 2], 1, 2⟩, + ⟨0, 5, [], [], [], 2, 7⟩, + ⟨0, 5, [[2, 3, 4]], [], [6, 7], 1, 2⟩, + ⟨0, 6, [], [], [5], 1, 6⟩, + ⟨0, 7, [], [], [], 2, 7⟩, + ⟨0, 7, [[2, 3, 4]], [], [6, 5], 1, 2⟩, + ⟨1, 2, [], [], [], 2, 7⟩, + ⟨1, 2, [[5, 6, 7]], [], [3, 4], 1, 2⟩, + ⟨1, 3, [], [], [2], 1, 6⟩, + ⟨1, 4, [], [], [], 2, 7⟩, + ⟨1, 4, [[5, 6, 7]], [], [3, 2], 1, 2⟩, + ⟨1, 5, [], [], [], 2, 7⟩, + ⟨1, 5, [[2, 3, 4]], [], [6, 7], 1, 2⟩, + ⟨1, 6, [], [], [5], 1, 6⟩, + ⟨1, 7, [], [], [], 2, 7⟩, + ⟨1, 7, [[2, 3, 4]], [], [6, 5], 1, 2⟩, + ⟨2, 3, [], [], [4], 1, 6⟩, + ⟨3, 4, [], [2], [], 1, 6⟩, + ⟨3, 5, [], [2], [], 1, 6⟩, + ⟨3, 6, [], [2], [5], 1, 5⟩, + ⟨3, 7, [], [2], [], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (3, 3)}⟩ + + +private def k8t6p4_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t6p4_initial_eq_row_0 : ∀ j : Fin 8, (k8t6p4.initialMatrix 8) 0 j = k8t6p4_state_0 0 j := by decide + +private theorem k8t6p4_initial_eq_row_1 : ∀ j : Fin 8, (k8t6p4.initialMatrix 8) 1 j = k8t6p4_state_0 1 j := by decide + +private theorem k8t6p4_initial_eq_row_2 : ∀ j : Fin 8, (k8t6p4.initialMatrix 8) 2 j = k8t6p4_state_0 2 j := by decide + +private theorem k8t6p4_initial_eq_row_3 : ∀ j : Fin 8, (k8t6p4.initialMatrix 8) 3 j = k8t6p4_state_0 3 j := by decide + +private theorem k8t6p4_initial_eq_row_4 : ∀ j : Fin 8, (k8t6p4.initialMatrix 8) 4 j = k8t6p4_state_0 4 j := by decide + +private theorem k8t6p4_initial_eq_row_5 : ∀ j : Fin 8, (k8t6p4.initialMatrix 8) 5 j = k8t6p4_state_0 5 j := by decide + +private theorem k8t6p4_initial_eq_row_6 : ∀ j : Fin 8, (k8t6p4.initialMatrix 8) 6 j = k8t6p4_state_0 6 j := by decide + +private theorem k8t6p4_initial_eq_row_7 : ∀ j : Fin 8, (k8t6p4.initialMatrix 8) 7 j = k8t6p4_state_0 7 j := by decide + +private theorem k8t6p4_initial_eq : (k8t6p4.initialMatrix 8) = k8t6p4_state_0 := by + funext i j + fin_cases i + + · exact k8t6p4_initial_eq_row_0 j + + · exact k8t6p4_initial_eq_row_1 j + + · exact k8t6p4_initial_eq_row_2 j + + · exact k8t6p4_initial_eq_row_3 j + + · exact k8t6p4_initial_eq_row_4 j + + · exact k8t6p4_initial_eq_row_5 j + + · exact k8t6p4_initial_eq_row_6 j + + · exact k8t6p4_initial_eq_row_7 j + +private theorem k8t6p4_closure_0 : ClosureCheck k8t6p4.graph k8t6p4_state_0 8 6 [] := by trivial + +private theorem k8t6p4_matrix_eq : k8t6p4.matrix 8 = k8t6p4_state_0 := by + change closureMatrix (k8t6p4.initialMatrix 8) _ = _ + rw [k8t6p4_initial_eq] + change closureMatrix k8t6p4_state_0 [] = _ + rfl + +private theorem k8t6p4_part_0 : k8t6p4.chains.flatten = List.finRange _ := by decide + +private theorem k8t6p4_part_1 : k8t6p4.chains.map List.length = ([[], [], [1], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t6p4_part_2 : k8t6p4.chains.map (fun l => l.map (fun i => decide (i ∈ k8t6p4.clique))) = ([[], [], [1], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t6p4_templates_item_0 : (⟨0, 1, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_1 : (⟨0, 1, [[2, 3, 4], [5, 6, 7]], [], [], 1, 1⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_2 : (⟨0, 2, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_3 : (⟨0, 2, [[5, 6, 7]], [], [3, 4], 1, 2⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_4 : (⟨0, 3, [], [], [2], 1, 6⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_5 : (⟨0, 4, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_6 : (⟨0, 4, [[5, 6, 7]], [], [3, 2], 1, 2⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_7 : (⟨0, 5, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_8 : (⟨0, 5, [[2, 3, 4]], [], [6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_9 : (⟨0, 6, [], [], [5], 1, 6⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_10 : (⟨0, 7, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_11 : (⟨0, 7, [[2, 3, 4]], [], [6, 5], 1, 2⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_12 : (⟨1, 2, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_13 : (⟨1, 2, [[5, 6, 7]], [], [3, 4], 1, 2⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_14 : (⟨1, 3, [], [], [2], 1, 6⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_15 : (⟨1, 4, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_16 : (⟨1, 4, [[5, 6, 7]], [], [3, 2], 1, 2⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_17 : (⟨1, 5, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_18 : (⟨1, 5, [[2, 3, 4]], [], [6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_19 : (⟨1, 6, [], [], [5], 1, 6⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_20 : (⟨1, 7, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_21 : (⟨1, 7, [[2, 3, 4]], [], [6, 5], 1, 2⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_22 : (⟨2, 3, [], [], [4], 1, 6⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_23 : (⟨3, 4, [], [2], [], 1, 6⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_24 : (⟨3, 5, [], [2], [], 1, 6⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_25 : (⟨3, 6, [], [2], [5], 1, 5⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_templates_item_26 : (⟨3, 7, [], [2], [], 1, 6⟩ : TemplateData (Fin 8)).Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t6p4_part_3 : ∀ T ∈ k8t6p4.templates, T.Check k8t6p4.graph k8t6p4.clique 8 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k8t6p4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t6p4_templates_item_0, k8t6p4_templates_item_1, k8t6p4_templates_item_2, k8t6p4_templates_item_3, k8t6p4_templates_item_4, k8t6p4_templates_item_5, k8t6p4_templates_item_6, k8t6p4_templates_item_7, k8t6p4_templates_item_8, k8t6p4_templates_item_9, k8t6p4_templates_item_10, k8t6p4_templates_item_11, k8t6p4_templates_item_12, k8t6p4_templates_item_13, k8t6p4_templates_item_14, k8t6p4_templates_item_15, k8t6p4_templates_item_16, k8t6p4_templates_item_17, k8t6p4_templates_item_18, k8t6p4_templates_item_19, k8t6p4_templates_item_20, k8t6p4_templates_item_21, k8t6p4_templates_item_22, k8t6p4_templates_item_23, k8t6p4_templates_item_24, k8t6p4_templates_item_25, k8t6p4_templates_item_26⟩ + +private theorem k8t6p4_part_4 : ∀ p ∈ k8t6p4.required, p.Check k8t6p4.graph 8 := by decide + +private theorem k8t6p4_part_5 : ClosureCheck k8t6p4.graph (k8t6p4.initialMatrix 8) 8 6 k8t6p4.closure := by + rw [k8t6p4_initial_eq] + exact k8t6p4_closure_0 + +private theorem k8t6p4_part_6 : k8t6p4.bad.Check k8t6p4.graph (k8t6p4.matrix 8) 8 6 := by + rw [k8t6p4_matrix_eq] + decide + +theorem k8t6p4_check : k8t6p4.Check 8 6 [[], [], [1], [1]] := + ⟨k8t6p4_part_0, k8t6p4_part_1, k8t6p4_part_2, k8t6p4_part_3, k8t6p4_part_4, k8t6p4_part_5, k8t6p4_part_6⟩ +def k8t7p0 : LayoutCertificate 7 where + chains := [[0], [1], [2], [3], [4], [5], [6]] + clique := {0, 1, 2, 3, 4, 5, 6} + templates := [⟨0, 1, [], [], [], 1, 7⟩, + ⟨0, 2, [], [], [], 1, 7⟩, + ⟨0, 3, [], [], [], 1, 7⟩, + ⟨0, 4, [], [], [], 1, 7⟩, + ⟨0, 5, [], [], [], 1, 7⟩, + ⟨0, 6, [], [], [], 1, 7⟩, + ⟨1, 2, [], [], [], 1, 7⟩, + ⟨1, 3, [], [], [], 1, 7⟩, + ⟨1, 4, [], [], [], 1, 7⟩, + ⟨1, 5, [], [], [], 1, 7⟩, + ⟨1, 6, [], [], [], 1, 7⟩, + ⟨2, 3, [], [], [], 1, 7⟩, + ⟨2, 4, [], [], [], 1, 7⟩, + ⟨2, 5, [], [], [], 1, 7⟩, + ⟨2, 6, [], [], [], 1, 7⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k8t7p0_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t7p0_initial_eq_row_0 : ∀ j : Fin 7, (k8t7p0.initialMatrix 8) 0 j = k8t7p0_state_0 0 j := by decide + +private theorem k8t7p0_initial_eq_row_1 : ∀ j : Fin 7, (k8t7p0.initialMatrix 8) 1 j = k8t7p0_state_0 1 j := by decide + +private theorem k8t7p0_initial_eq_row_2 : ∀ j : Fin 7, (k8t7p0.initialMatrix 8) 2 j = k8t7p0_state_0 2 j := by decide + +private theorem k8t7p0_initial_eq_row_3 : ∀ j : Fin 7, (k8t7p0.initialMatrix 8) 3 j = k8t7p0_state_0 3 j := by decide + +private theorem k8t7p0_initial_eq_row_4 : ∀ j : Fin 7, (k8t7p0.initialMatrix 8) 4 j = k8t7p0_state_0 4 j := by decide + +private theorem k8t7p0_initial_eq_row_5 : ∀ j : Fin 7, (k8t7p0.initialMatrix 8) 5 j = k8t7p0_state_0 5 j := by decide + +private theorem k8t7p0_initial_eq_row_6 : ∀ j : Fin 7, (k8t7p0.initialMatrix 8) 6 j = k8t7p0_state_0 6 j := by decide + +private theorem k8t7p0_initial_eq : (k8t7p0.initialMatrix 8) = k8t7p0_state_0 := by + funext i j + fin_cases i + + · exact k8t7p0_initial_eq_row_0 j + + · exact k8t7p0_initial_eq_row_1 j + + · exact k8t7p0_initial_eq_row_2 j + + · exact k8t7p0_initial_eq_row_3 j + + · exact k8t7p0_initial_eq_row_4 j + + · exact k8t7p0_initial_eq_row_5 j + + · exact k8t7p0_initial_eq_row_6 j + +private theorem k8t7p0_closure_0 : ClosureCheck k8t7p0.graph k8t7p0_state_0 8 7 [] := by trivial + +private theorem k8t7p0_matrix_eq : k8t7p0.matrix 8 = k8t7p0_state_0 := by + change closureMatrix (k8t7p0.initialMatrix 8) _ = _ + rw [k8t7p0_initial_eq] + change closureMatrix k8t7p0_state_0 [] = _ + rfl + +private theorem k8t7p0_part_0 : k8t7p0.chains.flatten = List.finRange _ := by decide + +private theorem k8t7p0_part_1 : k8t7p0.chains.map List.length = ([[], [], [], [], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t7p0_part_2 : k8t7p0.chains.map (fun l => l.map (fun i => decide (i ∈ k8t7p0.clique))) = ([[], [], [], [], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k8t7p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 7⟩ : TemplateData (Fin 7)).Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 7⟩ : TemplateData (Fin 7)).Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 7⟩ : TemplateData (Fin 7)).Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p0_templates_item_3 : (⟨0, 4, [], [], [], 1, 7⟩ : TemplateData (Fin 7)).Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p0_templates_item_4 : (⟨0, 5, [], [], [], 1, 7⟩ : TemplateData (Fin 7)).Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p0_templates_item_5 : (⟨0, 6, [], [], [], 1, 7⟩ : TemplateData (Fin 7)).Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p0_templates_item_6 : (⟨1, 2, [], [], [], 1, 7⟩ : TemplateData (Fin 7)).Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p0_templates_item_7 : (⟨1, 3, [], [], [], 1, 7⟩ : TemplateData (Fin 7)).Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p0_templates_item_8 : (⟨1, 4, [], [], [], 1, 7⟩ : TemplateData (Fin 7)).Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p0_templates_item_9 : (⟨1, 5, [], [], [], 1, 7⟩ : TemplateData (Fin 7)).Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p0_templates_item_10 : (⟨1, 6, [], [], [], 1, 7⟩ : TemplateData (Fin 7)).Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p0_templates_item_11 : (⟨2, 3, [], [], [], 1, 7⟩ : TemplateData (Fin 7)).Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p0_templates_item_12 : (⟨2, 4, [], [], [], 1, 7⟩ : TemplateData (Fin 7)).Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p0_templates_item_13 : (⟨2, 5, [], [], [], 1, 7⟩ : TemplateData (Fin 7)).Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p0_templates_item_14 : (⟨2, 6, [], [], [], 1, 7⟩ : TemplateData (Fin 7)).Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p0_part_3 : ∀ T ∈ k8t7p0.templates, T.Check k8t7p0.graph k8t7p0.clique 8 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k8t7p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t7p0_templates_item_0, k8t7p0_templates_item_1, k8t7p0_templates_item_2, k8t7p0_templates_item_3, k8t7p0_templates_item_4, k8t7p0_templates_item_5, k8t7p0_templates_item_6, k8t7p0_templates_item_7, k8t7p0_templates_item_8, k8t7p0_templates_item_9, k8t7p0_templates_item_10, k8t7p0_templates_item_11, k8t7p0_templates_item_12, k8t7p0_templates_item_13, k8t7p0_templates_item_14⟩ + +private theorem k8t7p0_part_4 : ∀ p ∈ k8t7p0.required, p.Check k8t7p0.graph 8 := by decide + +private theorem k8t7p0_part_5 : ClosureCheck k8t7p0.graph (k8t7p0.initialMatrix 8) 8 7 k8t7p0.closure := by + rw [k8t7p0_initial_eq] + exact k8t7p0_closure_0 + +private theorem k8t7p0_part_6 : k8t7p0.bad.Check k8t7p0.graph (k8t7p0.matrix 8) 8 7 := by + rw [k8t7p0_matrix_eq] + decide + +theorem k8t7p0_check : k8t7p0.Check 8 7 [[], [], [], [], [], [], []] := + ⟨k8t7p0_part_0, k8t7p0_part_1, k8t7p0_part_2, k8t7p0_part_3, k8t7p0_part_4, k8t7p0_part_5, k8t7p0_part_6⟩ +def k8t7p1 : LayoutCertificate 8 where + chains := [[0], [1], [2], [3], [4], [5, 6, 7]] + clique := {0, 1, 2, 3, 4, 5, 7} + templates := [⟨0, 1, [], [], [], 2, 7⟩, + ⟨0, 1, [[5, 6, 7]], [], [], 1, 4⟩, + ⟨0, 2, [], [], [], 2, 7⟩, + ⟨0, 2, [[5, 6, 7]], [], [], 1, 4⟩, + ⟨0, 3, [], [], [], 2, 7⟩, + ⟨0, 3, [[5, 6, 7]], [], [], 1, 4⟩, + ⟨0, 4, [], [], [], 2, 7⟩, + ⟨0, 4, [[5, 6, 7]], [], [], 1, 4⟩, + ⟨0, 5, [], [], [], 2, 7⟩, + ⟨0, 5, [], [], [6, 7], 1, 5⟩, + ⟨0, 6, [], [], [5], 1, 6⟩, + ⟨0, 7, [], [], [], 2, 7⟩, + ⟨0, 7, [], [], [6, 5], 1, 5⟩, + ⟨1, 2, [], [], [], 2, 7⟩, + ⟨1, 2, [[5, 6, 7]], [], [], 1, 4⟩, + ⟨1, 3, [], [], [], 2, 7⟩, + ⟨1, 3, [[5, 6, 7]], [], [], 1, 4⟩, + ⟨1, 4, [], [], [], 2, 7⟩, + ⟨1, 4, [[5, 6, 7]], [], [], 1, 4⟩, + ⟨1, 5, [], [], [], 2, 7⟩, + ⟨1, 5, [], [], [6, 7], 1, 5⟩, + ⟨1, 6, [], [], [5], 1, 6⟩, + ⟨1, 7, [], [], [], 2, 7⟩, + ⟨1, 7, [], [], [6, 5], 1, 5⟩, + ⟨2, 3, [], [], [], 2, 7⟩, + ⟨2, 3, [[5, 6, 7]], [], [], 1, 4⟩, + ⟨2, 4, [], [], [], 2, 7⟩, + ⟨2, 4, [[5, 6, 7]], [], [], 1, 4⟩, + ⟨2, 5, [], [], [], 2, 7⟩, + ⟨2, 5, [], [], [6, 7], 1, 5⟩, + ⟨2, 6, [], [], [5], 1, 6⟩, + ⟨2, 7, [], [], [], 2, 7⟩, + ⟨2, 7, [], [], [6, 5], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3)}⟩ + + +private def k8t7p1_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t7p1_initial_eq_row_0 : ∀ j : Fin 8, (k8t7p1.initialMatrix 8) 0 j = k8t7p1_state_0 0 j := by decide + +private theorem k8t7p1_initial_eq_row_1 : ∀ j : Fin 8, (k8t7p1.initialMatrix 8) 1 j = k8t7p1_state_0 1 j := by decide + +private theorem k8t7p1_initial_eq_row_2 : ∀ j : Fin 8, (k8t7p1.initialMatrix 8) 2 j = k8t7p1_state_0 2 j := by decide + +private theorem k8t7p1_initial_eq_row_3 : ∀ j : Fin 8, (k8t7p1.initialMatrix 8) 3 j = k8t7p1_state_0 3 j := by decide + +private theorem k8t7p1_initial_eq_row_4 : ∀ j : Fin 8, (k8t7p1.initialMatrix 8) 4 j = k8t7p1_state_0 4 j := by decide + +private theorem k8t7p1_initial_eq_row_5 : ∀ j : Fin 8, (k8t7p1.initialMatrix 8) 5 j = k8t7p1_state_0 5 j := by decide + +private theorem k8t7p1_initial_eq_row_6 : ∀ j : Fin 8, (k8t7p1.initialMatrix 8) 6 j = k8t7p1_state_0 6 j := by decide + +private theorem k8t7p1_initial_eq_row_7 : ∀ j : Fin 8, (k8t7p1.initialMatrix 8) 7 j = k8t7p1_state_0 7 j := by decide + +private theorem k8t7p1_initial_eq : (k8t7p1.initialMatrix 8) = k8t7p1_state_0 := by + funext i j + fin_cases i + + · exact k8t7p1_initial_eq_row_0 j + + · exact k8t7p1_initial_eq_row_1 j + + · exact k8t7p1_initial_eq_row_2 j + + · exact k8t7p1_initial_eq_row_3 j + + · exact k8t7p1_initial_eq_row_4 j + + · exact k8t7p1_initial_eq_row_5 j + + · exact k8t7p1_initial_eq_row_6 j + + · exact k8t7p1_initial_eq_row_7 j + +private theorem k8t7p1_closure_0 : ClosureCheck k8t7p1.graph k8t7p1_state_0 8 7 [] := by trivial + +private theorem k8t7p1_matrix_eq : k8t7p1.matrix 8 = k8t7p1_state_0 := by + change closureMatrix (k8t7p1.initialMatrix 8) _ = _ + rw [k8t7p1_initial_eq] + change closureMatrix k8t7p1_state_0 [] = _ + rfl + +private theorem k8t7p1_part_0 : k8t7p1.chains.flatten = List.finRange _ := by decide + +private theorem k8t7p1_part_1 : k8t7p1.chains.map List.length = ([[], [], [], [], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t7p1_part_2 : k8t7p1.chains.map (fun l => l.map (fun i => decide (i ∈ k8t7p1.clique))) = ([[], [], [], [], [], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k8t7p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_1 : (⟨0, 1, [[5, 6, 7]], [], [], 1, 4⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_2 : (⟨0, 2, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_3 : (⟨0, 2, [[5, 6, 7]], [], [], 1, 4⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_4 : (⟨0, 3, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_5 : (⟨0, 3, [[5, 6, 7]], [], [], 1, 4⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_6 : (⟨0, 4, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_7 : (⟨0, 4, [[5, 6, 7]], [], [], 1, 4⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_8 : (⟨0, 5, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_9 : (⟨0, 5, [], [], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_10 : (⟨0, 6, [], [], [5], 1, 6⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_11 : (⟨0, 7, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_12 : (⟨0, 7, [], [], [6, 5], 1, 5⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_13 : (⟨1, 2, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_14 : (⟨1, 2, [[5, 6, 7]], [], [], 1, 4⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_15 : (⟨1, 3, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_16 : (⟨1, 3, [[5, 6, 7]], [], [], 1, 4⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_17 : (⟨1, 4, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_18 : (⟨1, 4, [[5, 6, 7]], [], [], 1, 4⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_19 : (⟨1, 5, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_20 : (⟨1, 5, [], [], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_21 : (⟨1, 6, [], [], [5], 1, 6⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_22 : (⟨1, 7, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_23 : (⟨1, 7, [], [], [6, 5], 1, 5⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_24 : (⟨2, 3, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_25 : (⟨2, 3, [[5, 6, 7]], [], [], 1, 4⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_26 : (⟨2, 4, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_27 : (⟨2, 4, [[5, 6, 7]], [], [], 1, 4⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_28 : (⟨2, 5, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_29 : (⟨2, 5, [], [], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_30 : (⟨2, 6, [], [], [5], 1, 6⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_31 : (⟨2, 7, [], [], [], 2, 7⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_templates_item_32 : (⟨2, 7, [], [], [6, 5], 1, 5⟩ : TemplateData (Fin 8)).Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t7p1_part_3 : ∀ T ∈ k8t7p1.templates, T.Check k8t7p1.graph k8t7p1.clique 8 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k8t7p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t7p1_templates_item_0, k8t7p1_templates_item_1, k8t7p1_templates_item_2, k8t7p1_templates_item_3, k8t7p1_templates_item_4, k8t7p1_templates_item_5, k8t7p1_templates_item_6, k8t7p1_templates_item_7, k8t7p1_templates_item_8, k8t7p1_templates_item_9, k8t7p1_templates_item_10, k8t7p1_templates_item_11, k8t7p1_templates_item_12, k8t7p1_templates_item_13, k8t7p1_templates_item_14, k8t7p1_templates_item_15, k8t7p1_templates_item_16, k8t7p1_templates_item_17, k8t7p1_templates_item_18, k8t7p1_templates_item_19, k8t7p1_templates_item_20, k8t7p1_templates_item_21, k8t7p1_templates_item_22, k8t7p1_templates_item_23, k8t7p1_templates_item_24, k8t7p1_templates_item_25, k8t7p1_templates_item_26, k8t7p1_templates_item_27, k8t7p1_templates_item_28, k8t7p1_templates_item_29, k8t7p1_templates_item_30, k8t7p1_templates_item_31, k8t7p1_templates_item_32⟩ + +private theorem k8t7p1_part_4 : ∀ p ∈ k8t7p1.required, p.Check k8t7p1.graph 8 := by decide + +private theorem k8t7p1_part_5 : ClosureCheck k8t7p1.graph (k8t7p1.initialMatrix 8) 8 7 k8t7p1.closure := by + rw [k8t7p1_initial_eq] + exact k8t7p1_closure_0 + +private theorem k8t7p1_part_6 : k8t7p1.bad.Check k8t7p1.graph (k8t7p1.matrix 8) 8 7 := by + rw [k8t7p1_matrix_eq] + decide + +theorem k8t7p1_check : k8t7p1.Check 8 7 [[], [], [], [], [], [1]] := + ⟨k8t7p1_part_0, k8t7p1_part_1, k8t7p1_part_2, k8t7p1_part_3, k8t7p1_part_4, k8t7p1_part_5, k8t7p1_part_6⟩ +def k8t8p0 : LayoutCertificate 8 where + chains := [[0], [1], [2], [3], [4], [5], [6], [7]] + clique := {0, 1, 2, 3, 4, 5, 6, 7} + templates := [⟨0, 1, [], [], [], 1, 7⟩, + ⟨0, 2, [], [], [], 1, 7⟩, + ⟨0, 3, [], [], [], 1, 7⟩, + ⟨0, 4, [], [], [], 1, 7⟩, + ⟨0, 5, [], [], [], 1, 7⟩, + ⟨0, 6, [], [], [], 1, 7⟩, + ⟨0, 7, [], [], [], 1, 7⟩, + ⟨1, 2, [], [], [], 1, 7⟩, + ⟨1, 3, [], [], [], 1, 7⟩, + ⟨1, 4, [], [], [], 1, 7⟩, + ⟨1, 5, [], [], [], 1, 7⟩, + ⟨1, 6, [], [], [], 1, 7⟩, + ⟨1, 7, [], [], [], 1, 7⟩, + ⟨2, 3, [], [], [], 1, 7⟩, + ⟨2, 4, [], [], [], 1, 7⟩, + ⟨2, 5, [], [], [], 1, 7⟩, + ⟨2, 6, [], [], [], 1, 7⟩, + ⟨2, 7, [], [], [], 1, 7⟩, + ⟨3, 4, [], [], [], 1, 7⟩, + ⟨3, 5, [], [], [], 1, 7⟩, + ⟨3, 6, [], [], [], 1, 7⟩, + ⟨3, 7, [], [], [], 1, 7⟩, + ⟨4, 5, [], [], [], 1, 7⟩, + ⟨4, 6, [], [], [], 1, 7⟩, + ⟨4, 7, [], [], [], 1, 7⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3), (3, 3), (4, 3)}⟩ + + +private def k8t8p0_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k8t8p0_initial_eq_row_0 : ∀ j : Fin 8, (k8t8p0.initialMatrix 8) 0 j = k8t8p0_state_0 0 j := by decide + +private theorem k8t8p0_initial_eq_row_1 : ∀ j : Fin 8, (k8t8p0.initialMatrix 8) 1 j = k8t8p0_state_0 1 j := by decide + +private theorem k8t8p0_initial_eq_row_2 : ∀ j : Fin 8, (k8t8p0.initialMatrix 8) 2 j = k8t8p0_state_0 2 j := by decide + +private theorem k8t8p0_initial_eq_row_3 : ∀ j : Fin 8, (k8t8p0.initialMatrix 8) 3 j = k8t8p0_state_0 3 j := by decide + +private theorem k8t8p0_initial_eq_row_4 : ∀ j : Fin 8, (k8t8p0.initialMatrix 8) 4 j = k8t8p0_state_0 4 j := by decide + +private theorem k8t8p0_initial_eq_row_5 : ∀ j : Fin 8, (k8t8p0.initialMatrix 8) 5 j = k8t8p0_state_0 5 j := by decide + +private theorem k8t8p0_initial_eq_row_6 : ∀ j : Fin 8, (k8t8p0.initialMatrix 8) 6 j = k8t8p0_state_0 6 j := by decide + +private theorem k8t8p0_initial_eq_row_7 : ∀ j : Fin 8, (k8t8p0.initialMatrix 8) 7 j = k8t8p0_state_0 7 j := by decide + +private theorem k8t8p0_initial_eq : (k8t8p0.initialMatrix 8) = k8t8p0_state_0 := by + funext i j + fin_cases i + + · exact k8t8p0_initial_eq_row_0 j + + · exact k8t8p0_initial_eq_row_1 j + + · exact k8t8p0_initial_eq_row_2 j + + · exact k8t8p0_initial_eq_row_3 j + + · exact k8t8p0_initial_eq_row_4 j + + · exact k8t8p0_initial_eq_row_5 j + + · exact k8t8p0_initial_eq_row_6 j + + · exact k8t8p0_initial_eq_row_7 j + +private theorem k8t8p0_closure_0 : ClosureCheck k8t8p0.graph k8t8p0_state_0 8 8 [] := by trivial + +private theorem k8t8p0_matrix_eq : k8t8p0.matrix 8 = k8t8p0_state_0 := by + change closureMatrix (k8t8p0.initialMatrix 8) _ = _ + rw [k8t8p0_initial_eq] + change closureMatrix k8t8p0_state_0 [] = _ + rfl + +private theorem k8t8p0_part_0 : k8t8p0.chains.flatten = List.finRange _ := by decide + +private theorem k8t8p0_part_1 : k8t8p0.chains.map List.length = ([[], [], [], [], [], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k8t8p0_part_2 : k8t8p0.chains.map (fun l => l.map (fun i => decide (i ∈ k8t8p0.clique))) = ([[], [], [], [], [], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k8t8p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_3 : (⟨0, 4, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_4 : (⟨0, 5, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_5 : (⟨0, 6, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_6 : (⟨0, 7, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_7 : (⟨1, 2, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_8 : (⟨1, 3, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_9 : (⟨1, 4, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_10 : (⟨1, 5, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_11 : (⟨1, 6, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_12 : (⟨1, 7, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_13 : (⟨2, 3, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_14 : (⟨2, 4, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_15 : (⟨2, 5, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_16 : (⟨2, 6, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_17 : (⟨2, 7, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_18 : (⟨3, 4, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_19 : (⟨3, 5, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_20 : (⟨3, 6, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_21 : (⟨3, 7, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_22 : (⟨4, 5, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_23 : (⟨4, 6, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_templates_item_24 : (⟨4, 7, [], [], [], 1, 7⟩ : TemplateData (Fin 8)).Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k8t8p0_part_3 : ∀ T ∈ k8t8p0.templates, T.Check k8t8p0.graph k8t8p0.clique 8 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k8t8p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k8t8p0_templates_item_0, k8t8p0_templates_item_1, k8t8p0_templates_item_2, k8t8p0_templates_item_3, k8t8p0_templates_item_4, k8t8p0_templates_item_5, k8t8p0_templates_item_6, k8t8p0_templates_item_7, k8t8p0_templates_item_8, k8t8p0_templates_item_9, k8t8p0_templates_item_10, k8t8p0_templates_item_11, k8t8p0_templates_item_12, k8t8p0_templates_item_13, k8t8p0_templates_item_14, k8t8p0_templates_item_15, k8t8p0_templates_item_16, k8t8p0_templates_item_17, k8t8p0_templates_item_18, k8t8p0_templates_item_19, k8t8p0_templates_item_20, k8t8p0_templates_item_21, k8t8p0_templates_item_22, k8t8p0_templates_item_23, k8t8p0_templates_item_24⟩ + +private theorem k8t8p0_part_4 : ∀ p ∈ k8t8p0.required, p.Check k8t8p0.graph 8 := by decide + +private theorem k8t8p0_part_5 : ClosureCheck k8t8p0.graph (k8t8p0.initialMatrix 8) 8 8 k8t8p0.closure := by + rw [k8t8p0_initial_eq] + exact k8t8p0_closure_0 + +private theorem k8t8p0_part_6 : k8t8p0.bad.Check k8t8p0.graph (k8t8p0.matrix 8) 8 8 := by + rw [k8t8p0_matrix_eq] + decide + +theorem k8t8p0_check : k8t8p0.Check 8 8 [[], [], [], [], [], [], [], []] := + ⟨k8t8p0_part_0, k8t8p0_part_1, k8t8p0_part_2, k8t8p0_part_3, k8t8p0_part_4, k8t8p0_part_5, k8t8p0_part_6⟩ +end CycleClique.Construction.Certificates + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK9.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK9.lean new file mode 100644 index 0000000000000000000000000000000000000000..fdba3efa45af909687ac474122062e12dbd52b69 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK9.lean @@ -0,0 +1,43389 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LayoutCertificate +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateMatrixChunks +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FastCertificateMatrix +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FastLayoutGraph + +namespace OAI + +namespace CycleClique.Construction.Certificates + +def k9t4p0 : LayoutCertificate 4 where + chains := [[0], [1], [2], [3]] + clique := {0, 1, 2, 3} + templates := [⟨0, 1, [], [], [], 1, 8⟩, + ⟨0, 2, [], [], [], 1, 8⟩, + ⟨0, 3, [], [], [], 1, 8⟩, + ⟨1, 2, [], [], [], 1, 8⟩, + ⟨1, 3, [], [], [], 1, 8⟩, + ⟨2, 3, [], [], [], 1, 8⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (1, 2), (2, 2), (3, 2)}⟩ + + +private def k9t4p0_state_0 : ForbiddenMatrix 4 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p0_initial_eq_row_0 : ∀ j : Fin 4, (k9t4p0.initialMatrix 9) 0 j = k9t4p0_state_0 0 j := by decide + +private theorem k9t4p0_initial_eq_row_1 : ∀ j : Fin 4, (k9t4p0.initialMatrix 9) 1 j = k9t4p0_state_0 1 j := by decide + +private theorem k9t4p0_initial_eq_row_2 : ∀ j : Fin 4, (k9t4p0.initialMatrix 9) 2 j = k9t4p0_state_0 2 j := by decide + +private theorem k9t4p0_initial_eq_row_3 : ∀ j : Fin 4, (k9t4p0.initialMatrix 9) 3 j = k9t4p0_state_0 3 j := by decide + +private theorem k9t4p0_initial_eq : (k9t4p0.initialMatrix 9) = k9t4p0_state_0 := by + funext i j + fin_cases i + + · exact k9t4p0_initial_eq_row_0 j + + · exact k9t4p0_initial_eq_row_1 j + + · exact k9t4p0_initial_eq_row_2 j + + · exact k9t4p0_initial_eq_row_3 j + +private theorem k9t4p0_closure_0 : ClosureCheck k9t4p0.graph k9t4p0_state_0 9 4 [] := by trivial + +private theorem k9t4p0_matrix_eq : k9t4p0.matrix 9 = k9t4p0_state_0 := by + change closureMatrix (k9t4p0.initialMatrix 9) _ = _ + rw [k9t4p0_initial_eq] + change closureMatrix k9t4p0_state_0 [] = _ + rfl + +private theorem k9t4p0_part_0 : k9t4p0.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p0_part_1 : k9t4p0.chains.map List.length = ([[], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p0_part_2 : k9t4p0.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p0.clique))) = ([[], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 8⟩ : TemplateData (Fin 4)).Check k9t4p0.graph k9t4p0.clique 9 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 8⟩ : TemplateData (Fin 4)).Check k9t4p0.graph k9t4p0.clique 9 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 8⟩ : TemplateData (Fin 4)).Check k9t4p0.graph k9t4p0.clique 9 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p0_templates_item_3 : (⟨1, 2, [], [], [], 1, 8⟩ : TemplateData (Fin 4)).Check k9t4p0.graph k9t4p0.clique 9 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p0_templates_item_4 : (⟨1, 3, [], [], [], 1, 8⟩ : TemplateData (Fin 4)).Check k9t4p0.graph k9t4p0.clique 9 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p0_templates_item_5 : (⟨2, 3, [], [], [], 1, 8⟩ : TemplateData (Fin 4)).Check k9t4p0.graph k9t4p0.clique 9 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p0_part_3 : ∀ T ∈ k9t4p0.templates, T.Check k9t4p0.graph k9t4p0.clique 9 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p0_templates_item_0, k9t4p0_templates_item_1, k9t4p0_templates_item_2, k9t4p0_templates_item_3, k9t4p0_templates_item_4, k9t4p0_templates_item_5⟩ + +private theorem k9t4p0_part_4 : ∀ p ∈ k9t4p0.required, p.Check k9t4p0.graph 9 := by decide + +private theorem k9t4p0_part_5 : ClosureCheck k9t4p0.graph (k9t4p0.initialMatrix 9) 9 4 k9t4p0.closure := by + rw [k9t4p0_initial_eq] + exact k9t4p0_closure_0 + +private theorem k9t4p0_part_6 : k9t4p0.bad.Check k9t4p0.graph (k9t4p0.matrix 9) 9 4 := by + rw [k9t4p0_matrix_eq] + decide + +theorem k9t4p0_check : k9t4p0.Check 9 4 [[], [], [], []] := + ⟨k9t4p0_part_0, k9t4p0_part_1, k9t4p0_part_2, k9t4p0_part_3, k9t4p0_part_4, k9t4p0_part_5, k9t4p0_part_6⟩ +def k9t4p1 : LayoutCertificate 5 where + chains := [[0], [1], [2, 3, 4]] + clique := {0, 1, 2, 4} + templates := [⟨0, 1, [], [], [], 2, 8⟩, + ⟨0, 1, [[2, 3, 4]], [], [], 1, 5⟩, + ⟨0, 2, [], [], [], 2, 8⟩, + ⟨0, 2, [], [], [3, 4], 1, 6⟩, + ⟨0, 3, [], [], [2], 1, 7⟩, + ⟨0, 4, [], [], [3, 2], 1, 6⟩, + ⟨1, 2, [], [], [], 2, 8⟩, + ⟨1, 2, [], [], [3, 4], 1, 6⟩, + ⟨1, 3, [], [], [2], 1, 7⟩, + ⟨1, 4, [], [], [3, 2], 1, 6⟩, + ⟨2, 3, [], [], [4], 1, 7⟩, + ⟨3, 4, [], [2], [], 1, 7⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (1, 2), (3, 2), (2, 2)}⟩ + + +private def k9t4p1_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 6], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 6], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p1_initial_eq_row_0 : ∀ j : Fin 5, (k9t4p1.initialMatrix 9) 0 j = k9t4p1_state_0 0 j := by decide + +private theorem k9t4p1_initial_eq_row_1 : ∀ j : Fin 5, (k9t4p1.initialMatrix 9) 1 j = k9t4p1_state_0 1 j := by decide + +private theorem k9t4p1_initial_eq_row_2 : ∀ j : Fin 5, (k9t4p1.initialMatrix 9) 2 j = k9t4p1_state_0 2 j := by decide + +private theorem k9t4p1_initial_eq_row_3 : ∀ j : Fin 5, (k9t4p1.initialMatrix 9) 3 j = k9t4p1_state_0 3 j := by decide + +private theorem k9t4p1_initial_eq_row_4 : ∀ j : Fin 5, (k9t4p1.initialMatrix 9) 4 j = k9t4p1_state_0 4 j := by decide + +private theorem k9t4p1_initial_eq : (k9t4p1.initialMatrix 9) = k9t4p1_state_0 := by + funext i j + fin_cases i + + · exact k9t4p1_initial_eq_row_0 j + + · exact k9t4p1_initial_eq_row_1 j + + · exact k9t4p1_initial_eq_row_2 j + + · exact k9t4p1_initial_eq_row_3 j + + · exact k9t4p1_initial_eq_row_4 j + +private theorem k9t4p1_closure_0 : ClosureCheck k9t4p1.graph k9t4p1_state_0 9 4 [] := by trivial + +private theorem k9t4p1_matrix_eq : k9t4p1.matrix 9 = k9t4p1_state_0 := by + change closureMatrix (k9t4p1.initialMatrix 9) _ = _ + rw [k9t4p1_initial_eq] + change closureMatrix k9t4p1_state_0 [] = _ + rfl + +private theorem k9t4p1_part_0 : k9t4p1.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p1_part_1 : k9t4p1.chains.map List.length = ([[], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p1_part_2 : k9t4p1.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p1.clique))) = ([[], [], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 8⟩ : TemplateData (Fin 5)).Check k9t4p1.graph k9t4p1.clique 9 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p1_templates_item_1 : (⟨0, 1, [[2, 3, 4]], [], [], 1, 5⟩ : TemplateData (Fin 5)).Check k9t4p1.graph k9t4p1.clique 9 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p1_templates_item_2 : (⟨0, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 5)).Check k9t4p1.graph k9t4p1.clique 9 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p1_templates_item_3 : (⟨0, 2, [], [], [3, 4], 1, 6⟩ : TemplateData (Fin 5)).Check k9t4p1.graph k9t4p1.clique 9 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p1_templates_item_4 : (⟨0, 3, [], [], [2], 1, 7⟩ : TemplateData (Fin 5)).Check k9t4p1.graph k9t4p1.clique 9 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p1_templates_item_5 : (⟨0, 4, [], [], [3, 2], 1, 6⟩ : TemplateData (Fin 5)).Check k9t4p1.graph k9t4p1.clique 9 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p1_templates_item_6 : (⟨1, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 5)).Check k9t4p1.graph k9t4p1.clique 9 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p1_templates_item_7 : (⟨1, 2, [], [], [3, 4], 1, 6⟩ : TemplateData (Fin 5)).Check k9t4p1.graph k9t4p1.clique 9 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p1_templates_item_8 : (⟨1, 3, [], [], [2], 1, 7⟩ : TemplateData (Fin 5)).Check k9t4p1.graph k9t4p1.clique 9 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p1_templates_item_9 : (⟨1, 4, [], [], [3, 2], 1, 6⟩ : TemplateData (Fin 5)).Check k9t4p1.graph k9t4p1.clique 9 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p1_templates_item_10 : (⟨2, 3, [], [], [4], 1, 7⟩ : TemplateData (Fin 5)).Check k9t4p1.graph k9t4p1.clique 9 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p1_templates_item_11 : (⟨3, 4, [], [2], [], 1, 7⟩ : TemplateData (Fin 5)).Check k9t4p1.graph k9t4p1.clique 9 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p1_part_3 : ∀ T ∈ k9t4p1.templates, T.Check k9t4p1.graph k9t4p1.clique 9 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p1_templates_item_0, k9t4p1_templates_item_1, k9t4p1_templates_item_2, k9t4p1_templates_item_3, k9t4p1_templates_item_4, k9t4p1_templates_item_5, k9t4p1_templates_item_6, k9t4p1_templates_item_7, k9t4p1_templates_item_8, k9t4p1_templates_item_9, k9t4p1_templates_item_10, k9t4p1_templates_item_11⟩ + +private theorem k9t4p1_part_4 : ∀ p ∈ k9t4p1.required, p.Check k9t4p1.graph 9 := by decide + +private theorem k9t4p1_part_5 : ClosureCheck k9t4p1.graph (k9t4p1.initialMatrix 9) 9 4 k9t4p1.closure := by + rw [k9t4p1_initial_eq] + exact k9t4p1_closure_0 + +private theorem k9t4p1_part_6 : k9t4p1.bad.Check k9t4p1.graph (k9t4p1.matrix 9) 9 4 := by + rw [k9t4p1_matrix_eq] + decide + +theorem k9t4p1_check : k9t4p1.Check 9 4 [[], [], [1]] := + ⟨k9t4p1_part_0, k9t4p1_part_1, k9t4p1_part_2, k9t4p1_part_3, k9t4p1_part_4, k9t4p1_part_5, k9t4p1_part_6⟩ +def k9t4p2 : LayoutCertificate 6 where + chains := [[0], [1], [2, 3, 4, 5]] + clique := {0, 1, 2, 5} + templates := [⟨0, 1, [], [], [], 3, 8⟩, + ⟨0, 1, [[2, 3, 4, 5]], [], [], 1, 4⟩, + ⟨0, 2, [], [], [3, 4, 5], 1, 5⟩, + ⟨0, 3, [], [], [2], 2, 7⟩, + ⟨0, 3, [], [], [4, 5], 1, 6⟩, + ⟨0, 4, [], [], [3, 2], 1, 6⟩, + ⟨0, 5, [], [], [4, 3, 2], 1, 5⟩, + ⟨1, 2, [], [], [3, 4, 5], 1, 5⟩, + ⟨1, 3, [], [], [2], 2, 7⟩, + ⟨1, 3, [], [], [4, 5], 1, 6⟩, + ⟨1, 4, [], [], [3, 2], 1, 6⟩, + ⟨1, 5, [], [], [4, 3, 2], 1, 5⟩, + ⟨2, 3, [], [], [4, 5], 1, 6⟩, + ⟨3, 4, [], [2], [5], 1, 6⟩, + ⟨4, 5, [], [2, 3], [], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (1, 2), (3, 2), (4, 2)}⟩ + + +private def k9t4p2_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p2_initial_eq_row_0 : ∀ j : Fin 6, (k9t4p2.initialMatrix 9) 0 j = k9t4p2_state_0 0 j := by decide + +private theorem k9t4p2_initial_eq_row_1 : ∀ j : Fin 6, (k9t4p2.initialMatrix 9) 1 j = k9t4p2_state_0 1 j := by decide + +private theorem k9t4p2_initial_eq_row_2 : ∀ j : Fin 6, (k9t4p2.initialMatrix 9) 2 j = k9t4p2_state_0 2 j := by decide + +private theorem k9t4p2_initial_eq_row_3 : ∀ j : Fin 6, (k9t4p2.initialMatrix 9) 3 j = k9t4p2_state_0 3 j := by decide + +private theorem k9t4p2_initial_eq_row_4 : ∀ j : Fin 6, (k9t4p2.initialMatrix 9) 4 j = k9t4p2_state_0 4 j := by decide + +private theorem k9t4p2_initial_eq_row_5 : ∀ j : Fin 6, (k9t4p2.initialMatrix 9) 5 j = k9t4p2_state_0 5 j := by decide + +private theorem k9t4p2_initial_eq : (k9t4p2.initialMatrix 9) = k9t4p2_state_0 := by + funext i j + fin_cases i + + · exact k9t4p2_initial_eq_row_0 j + + · exact k9t4p2_initial_eq_row_1 j + + · exact k9t4p2_initial_eq_row_2 j + + · exact k9t4p2_initial_eq_row_3 j + + · exact k9t4p2_initial_eq_row_4 j + + · exact k9t4p2_initial_eq_row_5 j + +private theorem k9t4p2_closure_0 : ClosureCheck k9t4p2.graph k9t4p2_state_0 9 4 [] := by trivial + +private theorem k9t4p2_matrix_eq : k9t4p2.matrix 9 = k9t4p2_state_0 := by + change closureMatrix (k9t4p2.initialMatrix 9) _ = _ + rw [k9t4p2_initial_eq] + change closureMatrix k9t4p2_state_0 [] = _ + rfl + +private theorem k9t4p2_part_0 : k9t4p2.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p2_part_1 : k9t4p2.chains.map List.length = ([[], [], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p2_part_2 : k9t4p2.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p2.clique))) = ([[], [], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p2_templates_item_0 : (⟨0, 1, [], [], [], 3, 8⟩ : TemplateData (Fin 6)).Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p2_templates_item_1 : (⟨0, 1, [[2, 3, 4, 5]], [], [], 1, 4⟩ : TemplateData (Fin 6)).Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p2_templates_item_2 : (⟨0, 2, [], [], [3, 4, 5], 1, 5⟩ : TemplateData (Fin 6)).Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p2_templates_item_3 : (⟨0, 3, [], [], [2], 2, 7⟩ : TemplateData (Fin 6)).Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p2_templates_item_4 : (⟨0, 3, [], [], [4, 5], 1, 6⟩ : TemplateData (Fin 6)).Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p2_templates_item_5 : (⟨0, 4, [], [], [3, 2], 1, 6⟩ : TemplateData (Fin 6)).Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p2_templates_item_6 : (⟨0, 5, [], [], [4, 3, 2], 1, 5⟩ : TemplateData (Fin 6)).Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p2_templates_item_7 : (⟨1, 2, [], [], [3, 4, 5], 1, 5⟩ : TemplateData (Fin 6)).Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p2_templates_item_8 : (⟨1, 3, [], [], [2], 2, 7⟩ : TemplateData (Fin 6)).Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p2_templates_item_9 : (⟨1, 3, [], [], [4, 5], 1, 6⟩ : TemplateData (Fin 6)).Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p2_templates_item_10 : (⟨1, 4, [], [], [3, 2], 1, 6⟩ : TemplateData (Fin 6)).Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p2_templates_item_11 : (⟨1, 5, [], [], [4, 3, 2], 1, 5⟩ : TemplateData (Fin 6)).Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p2_templates_item_12 : (⟨2, 3, [], [], [4, 5], 1, 6⟩ : TemplateData (Fin 6)).Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p2_templates_item_13 : (⟨3, 4, [], [2], [5], 1, 6⟩ : TemplateData (Fin 6)).Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p2_templates_item_14 : (⟨4, 5, [], [2, 3], [], 1, 6⟩ : TemplateData (Fin 6)).Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p2_part_3 : ∀ T ∈ k9t4p2.templates, T.Check k9t4p2.graph k9t4p2.clique 9 (patternAmount ([[], [], [2]] : List (List ℕ))) (([[], [], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p2_templates_item_0, k9t4p2_templates_item_1, k9t4p2_templates_item_2, k9t4p2_templates_item_3, k9t4p2_templates_item_4, k9t4p2_templates_item_5, k9t4p2_templates_item_6, k9t4p2_templates_item_7, k9t4p2_templates_item_8, k9t4p2_templates_item_9, k9t4p2_templates_item_10, k9t4p2_templates_item_11, k9t4p2_templates_item_12, k9t4p2_templates_item_13, k9t4p2_templates_item_14⟩ + +private theorem k9t4p2_part_4 : ∀ p ∈ k9t4p2.required, p.Check k9t4p2.graph 9 := by decide + +private theorem k9t4p2_part_5 : ClosureCheck k9t4p2.graph (k9t4p2.initialMatrix 9) 9 4 k9t4p2.closure := by + rw [k9t4p2_initial_eq] + exact k9t4p2_closure_0 + +private theorem k9t4p2_part_6 : k9t4p2.bad.Check k9t4p2.graph (k9t4p2.matrix 9) 9 4 := by + rw [k9t4p2_matrix_eq] + decide + +theorem k9t4p2_check : k9t4p2.Check 9 4 [[], [], [2]] := + ⟨k9t4p2_part_0, k9t4p2_part_1, k9t4p2_part_2, k9t4p2_part_3, k9t4p2_part_4, k9t4p2_part_5, k9t4p2_part_6⟩ +def k9t4p3 : LayoutCertificate 7 where + chains := [[0], [1], [2, 3, 4, 5, 6]] + clique := {0, 1, 2, 6} + templates := [⟨0, 1, [], [], [], 4, 8⟩, + ⟨0, 1, [[2, 3, 4, 5, 6]], [], [], 1, 3⟩, + ⟨0, 2, [], [], [], 4, 8⟩, + ⟨0, 2, [], [], [3, 4, 5, 6], 1, 4⟩, + ⟨0, 3, [], [], [2], 3, 7⟩, + ⟨0, 3, [], [], [4, 5, 6], 1, 5⟩, + ⟨0, 5, [], [], [4, 3, 2], 1, 5⟩, + ⟨0, 6, [], [], [5, 4, 3, 2], 1, 4⟩, + ⟨1, 2, [], [], [], 4, 8⟩, + ⟨1, 2, [], [], [3, 4, 5, 6], 1, 4⟩, + ⟨1, 3, [], [], [2], 3, 7⟩, + ⟨1, 3, [], [], [4, 5, 6], 1, 5⟩, + ⟨1, 5, [], [], [4, 3, 2], 1, 5⟩, + ⟨1, 6, [], [], [5, 4, 3, 2], 1, 4⟩, + ⟨2, 3, [], [], [4, 5, 6], 1, 5⟩, + ⟨3, 4, [], [2], [5, 6], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (3, 3), (2, 2)}⟩ + + +private def k9t4p3_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, ∅, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 7, ∅, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p3_initial_eq_row_0 : ∀ j : Fin 7, (k9t4p3.initialMatrix 9) 0 j = k9t4p3_state_0 0 j := by decide + +private theorem k9t4p3_initial_eq_row_1 : ∀ j : Fin 7, (k9t4p3.initialMatrix 9) 1 j = k9t4p3_state_0 1 j := by decide + +private theorem k9t4p3_initial_eq_row_2 : ∀ j : Fin 7, (k9t4p3.initialMatrix 9) 2 j = k9t4p3_state_0 2 j := by decide + +private theorem k9t4p3_initial_eq_row_3 : ∀ j : Fin 7, (k9t4p3.initialMatrix 9) 3 j = k9t4p3_state_0 3 j := by decide + +private theorem k9t4p3_initial_eq_row_4 : ∀ j : Fin 7, (k9t4p3.initialMatrix 9) 4 j = k9t4p3_state_0 4 j := by decide + +private theorem k9t4p3_initial_eq_row_5 : ∀ j : Fin 7, (k9t4p3.initialMatrix 9) 5 j = k9t4p3_state_0 5 j := by decide + +private theorem k9t4p3_initial_eq_row_6 : ∀ j : Fin 7, (k9t4p3.initialMatrix 9) 6 j = k9t4p3_state_0 6 j := by decide + +private theorem k9t4p3_initial_eq : (k9t4p3.initialMatrix 9) = k9t4p3_state_0 := by + funext i j + fin_cases i + + · exact k9t4p3_initial_eq_row_0 j + + · exact k9t4p3_initial_eq_row_1 j + + · exact k9t4p3_initial_eq_row_2 j + + · exact k9t4p3_initial_eq_row_3 j + + · exact k9t4p3_initial_eq_row_4 j + + · exact k9t4p3_initial_eq_row_5 j + + · exact k9t4p3_initial_eq_row_6 j + +private theorem k9t4p3_closure_0 : ClosureCheck k9t4p3.graph k9t4p3_state_0 9 4 [] := by trivial + +private theorem k9t4p3_matrix_eq : k9t4p3.matrix 9 = k9t4p3_state_0 := by + change closureMatrix (k9t4p3.initialMatrix 9) _ = _ + rw [k9t4p3_initial_eq] + change closureMatrix k9t4p3_state_0 [] = _ + rfl + +private theorem k9t4p3_part_0 : k9t4p3.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p3_part_1 : k9t4p3.chains.map List.length = ([[], [], [3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p3_part_2 : k9t4p3.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p3.clique))) = ([[], [], [3]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p3_templates_item_0 : (⟨0, 1, [], [], [], 4, 8⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_templates_item_1 : (⟨0, 1, [[2, 3, 4, 5, 6]], [], [], 1, 3⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_templates_item_2 : (⟨0, 2, [], [], [], 4, 8⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_templates_item_3 : (⟨0, 2, [], [], [3, 4, 5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_templates_item_4 : (⟨0, 3, [], [], [2], 3, 7⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_templates_item_5 : (⟨0, 3, [], [], [4, 5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_templates_item_6 : (⟨0, 5, [], [], [4, 3, 2], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_templates_item_7 : (⟨0, 6, [], [], [5, 4, 3, 2], 1, 4⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_templates_item_8 : (⟨1, 2, [], [], [], 4, 8⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_templates_item_9 : (⟨1, 2, [], [], [3, 4, 5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_templates_item_10 : (⟨1, 3, [], [], [2], 3, 7⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_templates_item_11 : (⟨1, 3, [], [], [4, 5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_templates_item_12 : (⟨1, 5, [], [], [4, 3, 2], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_templates_item_13 : (⟨1, 6, [], [], [5, 4, 3, 2], 1, 4⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_templates_item_14 : (⟨2, 3, [], [], [4, 5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_templates_item_15 : (⟨3, 4, [], [2], [5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p3_part_3 : ∀ T ∈ k9t4p3.templates, T.Check k9t4p3.graph k9t4p3.clique 9 (patternAmount ([[], [], [3]] : List (List ℕ))) (([[], [], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p3_templates_item_0, k9t4p3_templates_item_1, k9t4p3_templates_item_2, k9t4p3_templates_item_3, k9t4p3_templates_item_4, k9t4p3_templates_item_5, k9t4p3_templates_item_6, k9t4p3_templates_item_7, k9t4p3_templates_item_8, k9t4p3_templates_item_9, k9t4p3_templates_item_10, k9t4p3_templates_item_11, k9t4p3_templates_item_12, k9t4p3_templates_item_13, k9t4p3_templates_item_14, k9t4p3_templates_item_15⟩ + +private theorem k9t4p3_part_4 : ∀ p ∈ k9t4p3.required, p.Check k9t4p3.graph 9 := by decide + +private theorem k9t4p3_part_5 : ClosureCheck k9t4p3.graph (k9t4p3.initialMatrix 9) 9 4 k9t4p3.closure := by + rw [k9t4p3_initial_eq] + exact k9t4p3_closure_0 + +private theorem k9t4p3_part_6 : k9t4p3.bad.Check k9t4p3.graph (k9t4p3.matrix 9) 9 4 := by + rw [k9t4p3_matrix_eq] + decide + +theorem k9t4p3_check : k9t4p3.Check 9 4 [[], [], [3]] := + ⟨k9t4p3_part_0, k9t4p3_part_1, k9t4p3_part_2, k9t4p3_part_3, k9t4p3_part_4, k9t4p3_part_5, k9t4p3_part_6⟩ +private def k9t4p4_step_0_data : EdgeAttachmentData 8 := ⟨4, 0, [⟨0, 1, [4, 3, 2, 7]⟩, ⟨0, 2, [4, 5, 6, 7]⟩, ⟨0, 1, [4, 5, 6, 7, 2]⟩, ⟨1, 2, [7, 0, 4, 3]⟩, ⟨3, 2, [4, 0, 1]⟩, ⟨3, 2, [4, 0]⟩], ⟨none, {(0, 3), (1, 3), (3, 3), (2, 3)}⟩⟩ + +private def k9t4p4_step_0 : ClosureStep 8 := .edge k9t4p4_step_0_data + +private def k9t4p4_step_1_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨2, 0, [1, 3, 4, 5]⟩, ⟨2, 0, [1, 3, 8, 7, 6, 5]⟩, ⟨2, 0, [1, 8, 3, 4, 5]⟩, ⟨2, 6, [1, 0, 5, 4, 3, 8, 7]⟩, ⟨2, 0, [3, 1]⟩, ⟨2, 0, [3, 4, 5, 6, 7, 8, 1]⟩, ⟨2, 0, [3, 4, 5]⟩, ⟨4, 0, [3, 1, 2, 8, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 8, 7, 6, 5]⟩, ⟨4, 0, [3, 1]⟩, ⟨4, 8, [3, 1, 0, 5, 6, 7]⟩, ⟨4, 0, [3, 2, 1]⟩] + +private def k9t4p4_step_1_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨4, 7, [3, 2, 1, 0, 5, 6]⟩, ⟨4, 8, [3, 2, 1, 0, 5, 6, 7]⟩, ⟨4, 0, [3, 2, 8, 1]⟩, ⟨4, 7, [3, 2, 8, 1, 0, 5, 6]⟩, ⟨4, 0, [3, 8, 7, 6, 5]⟩, ⟨4, 6, [5, 0, 1, 2, 3, 8, 7]⟩, ⟨7, 0, [6, 5, 4, 3, 2, 1]⟩, ⟨7, 0, [6, 5, 4, 3, 2, 8, 1]⟩, ⟨7, 4, [6, 5, 0, 1, 2, 3]⟩, ⟨7, 4, [6, 5, 0, 1, 2, 8, 3]⟩, ⟨0, 7, [1, 2, 3, 4, 5, 6]⟩, ⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩] + +private def k9t4p4_step_1_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 7, [1, 2, 3, 8]⟩, ⟨0, 4, [1, 2, 3, 8, 7, 6, 5]⟩, ⟨0, 6, [1, 2, 8, 3, 4, 5]⟩, ⟨0, 7, [1, 2, 8, 3, 4, 5, 6]⟩, ⟨0, 7, [1, 2, 8]⟩, ⟨0, 4, [1, 2, 8, 7, 6, 5]⟩, ⟨0, 3, [1, 2, 8, 7, 6, 5, 4]⟩, ⟨0, 7, [1, 3, 4, 5, 6]⟩, ⟨0, 8, [1, 3, 4, 5, 6, 7]⟩, ⟨0, 2, [1, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 7, [1, 8]⟩, ⟨0, 3, [1, 8, 7, 6, 5, 4]⟩] + +private def k9t4p4_step_1_required_block_3 : List (RequiredPathData (Fin 9)) := [⟨0, 6, [5, 4, 3, 1, 2, 8, 7]⟩, ⟨0, 2, [5, 6, 7, 8, 1, 3]⟩] + +private def k9t4p4_step_1_data : FreshAttachmentData 8 := ⟨4, 0, k9t4p4_step_1_required_block_0 ++ k9t4p4_step_1_required_block_1 ++ k9t4p4_step_1_required_block_2 ++ k9t4p4_step_1_required_block_3, ⟨none, {(4, 3), (2, 3), (0, 3), (7, 3)}⟩⟩ + +private def k9t4p4_step_1 : ClosureStep 8 := .fresh k9t4p4_step_1_data + +private def k9t4p4_step_2_data : EdgeAttachmentData 8 := ⟨4, 1, [⟨0, 1, [2, 7, 6, 5, 4]⟩, ⟨0, 2, [7, 1, 4, 3]⟩, ⟨0, 1, [7, 2, 3, 4]⟩, ⟨1, 2, [4, 5, 6, 7]⟩, ⟨3, 2, [4, 1, 0]⟩, ⟨3, 2, [4, 1]⟩], ⟨none, {(0, 3), (1, 3), (3, 3), (2, 3)}⟩⟩ + +private def k9t4p4_step_2 : ClosureStep 8 := .edge k9t4p4_step_2_data + +private def k9t4p4_step_3_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨1, 0, [2, 3, 4, 5]⟩, ⟨1, 0, [2, 3, 8, 7, 6, 5]⟩, ⟨1, 0, [2, 8, 3, 4, 5]⟩, ⟨1, 6, [2, 0, 5, 4, 3, 8, 7]⟩, ⟨1, 0, [3, 2]⟩, ⟨1, 0, [3, 4, 5, 6, 7, 8, 2]⟩, ⟨1, 0, [3, 4, 5]⟩, ⟨4, 0, [3, 1, 2, 8, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 2]⟩, ⟨4, 7, [3, 1, 2, 0, 5, 6]⟩, ⟨4, 8, [3, 1, 2, 0, 5, 6, 7]⟩, ⟨4, 0, [3, 1, 8, 2]⟩] + +private def k9t4p4_step_3_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨4, 7, [3, 1, 8, 2, 0, 5, 6]⟩, ⟨4, 0, [3, 1, 8, 7, 6, 5]⟩, ⟨4, 0, [3, 2]⟩, ⟨4, 8, [3, 2, 0, 5, 6, 7]⟩, ⟨4, 0, [3, 8, 7, 6, 5]⟩, ⟨4, 6, [5, 0, 2, 1, 3, 8, 7]⟩, ⟨7, 0, [6, 5, 4, 3, 1, 2]⟩, ⟨7, 0, [6, 5, 4, 3, 1, 8, 2]⟩, ⟨7, 4, [6, 5, 0, 2, 1, 3]⟩, ⟨7, 4, [6, 5, 0, 2, 1, 8, 3]⟩, ⟨0, 7, [2, 1, 3, 4, 5, 6]⟩, ⟨0, 8, [2, 1, 3, 4, 5, 6, 7]⟩] + +private def k9t4p4_step_3_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 7, [2, 1, 3, 8]⟩, ⟨0, 4, [2, 1, 3, 8, 7, 6, 5]⟩, ⟨0, 6, [2, 1, 8, 3, 4, 5]⟩, ⟨0, 7, [2, 1, 8, 3, 4, 5, 6]⟩, ⟨0, 7, [2, 1, 8]⟩, ⟨0, 4, [2, 1, 8, 7, 6, 5]⟩, ⟨0, 3, [2, 1, 8, 7, 6, 5, 4]⟩, ⟨0, 7, [2, 3, 4, 5, 6]⟩, ⟨0, 8, [2, 3, 4, 5, 6, 7]⟩, ⟨0, 1, [2, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 7, [2, 8]⟩, ⟨0, 3, [2, 8, 7, 6, 5, 4]⟩] + +private def k9t4p4_step_3_required_block_3 : List (RequiredPathData (Fin 9)) := [⟨0, 6, [5, 4, 3, 1, 2, 8, 7]⟩, ⟨0, 1, [5, 6, 7, 8, 2, 3]⟩] + +private def k9t4p4_step_3_data : FreshAttachmentData 8 := ⟨4, 1, k9t4p4_step_3_required_block_0 ++ k9t4p4_step_3_required_block_1 ++ k9t4p4_step_3_required_block_2 ++ k9t4p4_step_3_required_block_3, ⟨none, {(4, 3), (1, 3), (0, 3), (7, 3)}⟩⟩ + +private def k9t4p4_step_3 : ClosureStep 8 := .fresh k9t4p4_step_3_data + +private def k9t4p4_step_4_data : EdgeAttachmentData 8 := ⟨5, 0, [⟨0, 1, [5, 4, 3, 2]⟩, ⟨0, 7, [5, 4, 3, 2]⟩, ⟨0, 1, [5, 4, 3, 2, 7]⟩, ⟨1, 7, [2, 0, 5, 6]⟩, ⟨6, 7, [5, 0, 1]⟩, ⟨6, 7, [5, 0]⟩], ⟨none, {(0, 3), (1, 3), (6, 3), (7, 3)}⟩⟩ + +private def k9t4p4_step_4 : ClosureStep 8 := .edge k9t4p4_step_4_data + +private def k9t4p4_step_5_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨2, 0, [1, 3, 4, 5, 6]⟩, ⟨2, 0, [1, 8, 3, 4, 5, 6]⟩, ⟨2, 0, [1, 8, 7, 6]⟩, ⟨2, 5, [1, 0, 6, 7, 8, 3, 4]⟩, ⟨2, 0, [3, 1]⟩, ⟨2, 0, [3, 4, 5, 6, 7, 8, 1]⟩, ⟨2, 0, [3, 8, 1]⟩, ⟨4, 0, [3, 1, 2, 8, 7, 6]⟩, ⟨4, 7, [3, 2, 8, 1, 0, 6]⟩, ⟨4, 0, [5, 6, 7, 8, 2, 3, 1]⟩, ⟨4, 7, [5, 6, 0, 1, 2, 3, 8]⟩, ⟨7, 0, [6, 5, 4, 3, 1]⟩] + +private def k9t4p4_step_5_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨7, 0, [6, 5, 4, 3, 2, 1]⟩, ⟨7, 0, [6, 5, 4, 3, 2, 8, 1]⟩, ⟨7, 4, [6, 0, 1, 2, 8, 3]⟩, ⟨7, 5, [6, 0, 1, 2, 8, 3, 4]⟩, ⟨7, 0, [8, 1]⟩, ⟨7, 3, [8, 1, 0, 6, 5, 4]⟩, ⟨7, 0, [8, 2, 1]⟩, ⟨7, 3, [8, 2, 1, 0, 6, 5, 4]⟩, ⟨7, 0, [8, 2, 3, 1]⟩, ⟨7, 4, [8, 2, 3, 1, 0, 6, 5]⟩, ⟨0, 4, [1, 2, 3]⟩, ⟨0, 7, [1, 2, 3, 4, 5, 6]⟩] + +private def k9t4p4_step_5_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 5, [1, 2, 3, 8, 7, 6]⟩, ⟨0, 4, [1, 2, 3, 8, 7, 6, 5]⟩, ⟨0, 4, [1, 2, 8, 3]⟩, ⟨0, 7, [1, 2, 8, 3, 4, 5, 6]⟩, ⟨0, 4, [1, 2, 8, 7, 6, 5]⟩, ⟨0, 3, [1, 2, 8, 7, 6, 5, 4]⟩, ⟨0, 4, [1, 3]⟩, ⟨0, 8, [1, 3, 4, 5, 6, 7]⟩, ⟨0, 2, [1, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 4, [1, 8, 7, 6, 5]⟩, ⟨0, 3, [1, 8, 7, 6, 5, 4]⟩] + +private def k9t4p4_step_5_required_block_3 : List (RequiredPathData (Fin 9)) := [⟨0, 2, [6, 5, 4, 3, 1, 8]⟩, ⟨0, 5, [6, 7, 8, 1, 2, 3, 4]⟩] + +private def k9t4p4_step_5_data : FreshAttachmentData 8 := ⟨5, 0, k9t4p4_step_5_required_block_0 ++ k9t4p4_step_5_required_block_1 ++ k9t4p4_step_5_required_block_2 ++ k9t4p4_step_5_required_block_3, ⟨none, {(7, 3), (2, 3), (0, 3), (4, 3)}⟩⟩ + +private def k9t4p4_step_5 : ClosureStep 8 := .fresh k9t4p4_step_5_data + +private def k9t4p4_step_6_data : EdgeAttachmentData 8 := ⟨5, 1, [⟨0, 7, [2, 1, 5, 6]⟩, ⟨0, 1, [2, 3, 4, 5]⟩, ⟨0, 1, [7, 2, 3, 4, 5]⟩, ⟨1, 7, [5, 4, 3, 2]⟩, ⟨6, 7, [5, 1, 0]⟩, ⟨6, 7, [5, 1]⟩], ⟨none, {(0, 3), (1, 3), (6, 3), (7, 3)}⟩⟩ + +private def k9t4p4_step_6 : ClosureStep 8 := .edge k9t4p4_step_6_data + +private def k9t4p4_step_7_required_block_0 : List (RequiredPathData (Fin 9)) := [⟨1, 0, [2, 3, 4, 5, 6]⟩, ⟨1, 0, [2, 8, 3, 4, 5, 6]⟩, ⟨1, 0, [2, 8, 7, 6]⟩, ⟨1, 5, [2, 0, 6, 7, 8, 3, 4]⟩, ⟨1, 0, [3, 2]⟩, ⟨1, 0, [3, 4, 5, 6, 7, 8, 2]⟩, ⟨1, 0, [3, 8, 2]⟩, ⟨4, 0, [3, 1, 2, 8, 7, 6]⟩, ⟨4, 7, [3, 1, 8, 2, 0, 6]⟩, ⟨4, 0, [5, 6, 7, 8, 1, 3, 2]⟩, ⟨4, 7, [5, 6, 0, 2, 1, 3, 8]⟩, ⟨7, 0, [6, 5, 4, 3, 1, 2]⟩] + +private def k9t4p4_step_7_required_block_1 : List (RequiredPathData (Fin 9)) := [⟨7, 0, [6, 5, 4, 3, 1, 8, 2]⟩, ⟨7, 0, [6, 5, 4, 3, 2]⟩, ⟨7, 4, [6, 0, 2, 1, 8, 3]⟩, ⟨7, 5, [6, 0, 2, 1, 8, 3, 4]⟩, ⟨7, 0, [8, 1, 2]⟩, ⟨7, 3, [8, 1, 2, 0, 6, 5, 4]⟩, ⟨7, 0, [8, 1, 3, 2]⟩, ⟨7, 4, [8, 1, 3, 2, 0, 6, 5]⟩, ⟨7, 0, [8, 2]⟩, ⟨7, 3, [8, 2, 0, 6, 5, 4]⟩, ⟨0, 4, [2, 1, 3]⟩, ⟨0, 7, [2, 1, 3, 4, 5, 6]⟩] + +private def k9t4p4_step_7_required_block_2 : List (RequiredPathData (Fin 9)) := [⟨0, 8, [2, 1, 3, 4, 5, 6, 7]⟩, ⟨0, 5, [2, 1, 3, 8, 7, 6]⟩, ⟨0, 4, [2, 1, 3, 8, 7, 6, 5]⟩, ⟨0, 4, [2, 1, 8, 3]⟩, ⟨0, 7, [2, 1, 8, 3, 4, 5, 6]⟩, ⟨0, 4, [2, 1, 8, 7, 6, 5]⟩, ⟨0, 3, [2, 1, 8, 7, 6, 5, 4]⟩, ⟨0, 4, [2, 3]⟩, ⟨0, 8, [2, 3, 4, 5, 6, 7]⟩, ⟨0, 1, [2, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 4, [2, 8, 7, 6, 5]⟩, ⟨0, 3, [2, 8, 7, 6, 5, 4]⟩] + +private def k9t4p4_step_7_required_block_3 : List (RequiredPathData (Fin 9)) := [⟨0, 1, [6, 5, 4, 3, 2, 8]⟩, ⟨0, 5, [6, 7, 8, 1, 2, 3, 4]⟩] + +private def k9t4p4_step_7_data : FreshAttachmentData 8 := ⟨5, 1, k9t4p4_step_7_required_block_0 ++ k9t4p4_step_7_required_block_1 ++ k9t4p4_step_7_required_block_2 ++ k9t4p4_step_7_required_block_3, ⟨none, {(7, 3), (1, 3), (0, 3), (4, 3)}⟩⟩ + +private def k9t4p4_step_7 : ClosureStep 8 := .fresh k9t4p4_step_7_data + +private def k9t4p4_step_8_data : FreshAttachmentData 8 := ⟨5, 2, [⟨1, 0, [2, 8, 3, 4, 5, 6]⟩, ⟨1, 0, [2, 8, 7, 6, 5, 4, 3]⟩, ⟨1, 5, [2, 8, 7, 6, 0, 3, 4]⟩, ⟨1, 2, [3, 0, 6, 7, 8]⟩, ⟨4, 0, [3, 1, 2, 8, 7, 6]⟩, ⟨4, 0, [5, 6, 7, 8, 1, 2, 3]⟩, ⟨4, 7, [5, 6, 0, 3, 1, 2, 8]⟩, ⟨4, 7, [5, 6, 0, 3, 1, 8]⟩, ⟨7, 0, [8, 1, 2, 3, 4, 5, 6]⟩, ⟨7, 4, [8, 1, 2, 3, 0, 6, 5]⟩, ⟨7, 0, [8, 1, 3, 4, 5, 6]⟩, ⟨7, 4, [8, 1, 3, 0, 6, 5]⟩], ⟨none, {(1, 3), (7, 3), (4, 3), (2, 0)}⟩⟩ + +private def k9t4p4_step_8 : ClosureStep 8 := .fresh k9t4p4_step_8_data + +private def k9t4p4_step_9_data : FreshAttachmentData 8 := ⟨7, 4, [⟨1, 0, [2, 3, 4, 5, 6, 7, 8]⟩, ⟨1, 6, [2, 3, 4, 5, 0, 8, 7]⟩, ⟨1, 0, [2, 3, 8, 7, 6, 5]⟩, ⟨1, 2, [3, 4, 5, 0, 8]⟩, ⟨4, 0, [3, 1, 2, 8, 7, 6, 5]⟩, ⟨4, 7, [3, 1, 2, 8, 0, 5, 6]⟩, ⟨4, 0, [3, 1, 8, 7, 6, 5]⟩, ⟨4, 7, [3, 1, 8, 0, 5, 6]⟩, ⟨7, 0, [6, 5, 4, 3, 1, 2, 8]⟩, ⟨7, 0, [6, 5, 4, 3, 1, 8]⟩, ⟨7, 4, [6, 5, 0, 8, 1, 2, 3]⟩, ⟨7, 4, [6, 5, 0, 8, 1, 3]⟩], ⟨none, {(1, 3), (4, 3), (7, 3), (2, 0)}⟩⟩ + +private def k9t4p4_step_9 : ClosureStep 8 := .fresh k9t4p4_step_9_data + +def k9t4p4 : LayoutCertificate 8 where + chains := [[0], [1], [2, 3, 4, 5, 6, 7]] + clique := {0, 1, 2, 7} + templates := [⟨0, 1, [], [], [], 5, 8⟩, + ⟨0, 1, [[2, 3, 4, 5, 6, 7]], [], [], 1, 2⟩, + ⟨0, 2, [], [], [], 5, 8⟩, + ⟨0, 2, [], [], [3, 4, 5, 6, 7], 1, 3⟩, + ⟨0, 3, [], [], [2], 4, 7⟩, + ⟨0, 3, [], [], [4, 5, 6, 7], 1, 4⟩, + ⟨0, 4, [], [], [3, 2], 3, 6⟩, + ⟨0, 4, [], [], [5, 6, 7], 2, 5⟩, + ⟨0, 5, [], [], [4, 3, 2], 2, 5⟩, + ⟨0, 6, [], [], [5, 4, 3, 2], 1, 4⟩, + ⟨0, 6, [], [], [7], 4, 7⟩, + ⟨0, 7, [], [], [], 5, 8⟩, + ⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩, + ⟨1, 2, [], [], [], 5, 8⟩, + ⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 3⟩, + ⟨1, 3, [], [], [2], 4, 7⟩, + ⟨1, 3, [], [], [4, 5, 6, 7], 1, 4⟩, + ⟨1, 4, [], [], [5, 6, 7], 2, 5⟩, + ⟨1, 5, [], [], [4, 3, 2], 2, 5⟩, + ⟨1, 6, [], [], [5, 4, 3, 2], 1, 4⟩, + ⟨1, 6, [], [], [7], 4, 7⟩, + ⟨1, 7, [], [], [], 5, 8⟩, + ⟨1, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩, + ⟨2, 3, [], [], [4, 5, 6, 7], 1, 4⟩, + ⟨3, 4, [], [2], [5, 6, 7], 1, 4⟩, + ⟨3, 5, [], [2], [6, 7], 2, 5⟩, + ⟨3, 6, [], [2], [7], 3, 6⟩, + ⟨4, 5, [], [2, 3], [6, 7], 1, 4⟩, + ⟨4, 6, [], [2, 3], [7], 2, 5⟩, + ⟨5, 6, [], [2, 3, 4], [7], 1, 4⟩, + ⟨6, 7, [], [2, 3, 4, 5], [], 1, 4⟩] + required := [] + closure := [k9t4p4_step_0, k9t4p4_step_1, k9t4p4_step_2, k9t4p4_step_3, k9t4p4_step_4, k9t4p4_step_5, k9t4p4_step_6, k9t4p4_step_7, k9t4p4_step_8, k9t4p4_step_9] + bad := ⟨none, {(0, 2), (4, 2), (5, 2), (1, 0)}⟩ + + +private def k9t4p4_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_initial_eq_row_0 : ∀ j : Fin 8, (k9t4p4.initialMatrix 9) 0 j = k9t4p4_state_0 0 j := by decide + +private theorem k9t4p4_initial_eq_row_1 : ∀ j : Fin 8, (k9t4p4.initialMatrix 9) 1 j = k9t4p4_state_0 1 j := by decide + +private theorem k9t4p4_initial_eq_row_2 : ∀ j : Fin 8, (k9t4p4.initialMatrix 9) 2 j = k9t4p4_state_0 2 j := by decide + +private theorem k9t4p4_initial_eq_row_3 : ∀ j : Fin 8, (k9t4p4.initialMatrix 9) 3 j = k9t4p4_state_0 3 j := by decide + +private theorem k9t4p4_initial_eq_row_4 : ∀ j : Fin 8, (k9t4p4.initialMatrix 9) 4 j = k9t4p4_state_0 4 j := by decide + +private theorem k9t4p4_initial_eq_row_5 : ∀ j : Fin 8, (k9t4p4.initialMatrix 9) 5 j = k9t4p4_state_0 5 j := by decide + +private theorem k9t4p4_initial_eq_row_6 : ∀ j : Fin 8, (k9t4p4.initialMatrix 9) 6 j = k9t4p4_state_0 6 j := by decide + +private theorem k9t4p4_initial_eq_row_7 : ∀ j : Fin 8, (k9t4p4.initialMatrix 9) 7 j = k9t4p4_state_0 7 j := by decide + +private theorem k9t4p4_initial_eq : (k9t4p4.initialMatrix 9) = k9t4p4_state_0 := by + funext i j + fin_cases i + + · exact k9t4p4_initial_eq_row_0 j + + · exact k9t4p4_initial_eq_row_1 j + + · exact k9t4p4_initial_eq_row_2 j + + · exact k9t4p4_initial_eq_row_3 j + + · exact k9t4p4_initial_eq_row_4 j + + · exact k9t4p4_initial_eq_row_5 j + + · exact k9t4p4_initial_eq_row_6 j + + · exact k9t4p4_initial_eq_row_7 j + +private def k9t4p4_state_1 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[{0, 2, 3, 4, 5, 6}, Finset.Icc 2 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p4_local_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_0_eq_row_0 : ∀ j : Fin 8, (fun a b => k9t4p4_state_0 a b ∪ requiredMatrix 9 k9t4p4_step_0_data.required a b) 0 j = k9t4p4_local_0 0 j := by decide + +private theorem k9t4p4_local_0_eq_row_1 : ∀ j : Fin 8, (fun a b => k9t4p4_state_0 a b ∪ requiredMatrix 9 k9t4p4_step_0_data.required a b) 1 j = k9t4p4_local_0 1 j := by decide + +private theorem k9t4p4_local_0_eq_row_2 : ∀ j : Fin 8, (fun a b => k9t4p4_state_0 a b ∪ requiredMatrix 9 k9t4p4_step_0_data.required a b) 2 j = k9t4p4_local_0 2 j := by decide + +private theorem k9t4p4_local_0_eq_row_3 : ∀ j : Fin 8, (fun a b => k9t4p4_state_0 a b ∪ requiredMatrix 9 k9t4p4_step_0_data.required a b) 3 j = k9t4p4_local_0 3 j := by decide + +private theorem k9t4p4_local_0_eq_row_4 : ∀ j : Fin 8, (fun a b => k9t4p4_state_0 a b ∪ requiredMatrix 9 k9t4p4_step_0_data.required a b) 4 j = k9t4p4_local_0 4 j := by decide + +private theorem k9t4p4_local_0_eq_row_5 : ∀ j : Fin 8, (fun a b => k9t4p4_state_0 a b ∪ requiredMatrix 9 k9t4p4_step_0_data.required a b) 5 j = k9t4p4_local_0 5 j := by decide + +private theorem k9t4p4_local_0_eq_row_6 : ∀ j : Fin 8, (fun a b => k9t4p4_state_0 a b ∪ requiredMatrix 9 k9t4p4_step_0_data.required a b) 6 j = k9t4p4_local_0 6 j := by decide + +private theorem k9t4p4_local_0_eq_row_7 : ∀ j : Fin 8, (fun a b => k9t4p4_state_0 a b ∪ requiredMatrix 9 k9t4p4_step_0_data.required a b) 7 j = k9t4p4_local_0 7 j := by decide + +private theorem k9t4p4_local_0_eq : (fun a b => k9t4p4_state_0 a b ∪ requiredMatrix 9 k9t4p4_step_0_data.required a b) = k9t4p4_local_0 := by + funext i j + fin_cases i + + · exact k9t4p4_local_0_eq_row_0 j + + · exact k9t4p4_local_0_eq_row_1 j + + · exact k9t4p4_local_0_eq_row_2 j + + · exact k9t4p4_local_0_eq_row_3 j + + · exact k9t4p4_local_0_eq_row_4 j + + · exact k9t4p4_local_0_eq_row_5 j + + · exact k9t4p4_local_0_eq_row_6 j + + · exact k9t4p4_local_0_eq_row_7 j + +private theorem k9t4p4_local_0_paths : ∀ p ∈ k9t4p4_step_0_data.required, p.Check (addedEdgeGraph k9t4p4.graph k9t4p4_step_0_data.i k9t4p4_step_0_data.j) 9 := by decide + +private theorem k9t4p4_local_0_bad : k9t4p4_step_0_data.bad.Check (addedEdgeGraph k9t4p4.graph k9t4p4_step_0_data.i k9t4p4_step_0_data.j) k9t4p4_local_0 9 4 := by decide + +private theorem k9t4p4_step_0_check : k9t4p4_step_0.Check k9t4p4.graph k9t4p4_state_0 9 4 := by + change k9t4p4_step_0_data.Check k9t4p4.graph k9t4p4_state_0 9 4 + refine ⟨k9t4p4_local_0_paths, ?_⟩ + rw [k9t4p4_local_0_eq] + exact k9t4p4_local_0_bad + +private theorem k9t4p4_update_0 : k9t4p4_step_0.apply k9t4p4_state_0 = k9t4p4_state_1 := by + have h : ∀ i j : Fin 8, k9t4p4_step_0.apply k9t4p4_state_0 i j = k9t4p4_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p4_state_2 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 2 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p4_local_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, Finset.Icc 1 6, {1, 2}, Finset.Icc 1 6, ∅, {1, 2}, Finset.Icc 1 6, {1, 2}], + #[∅, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 1 6, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[∅, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[{1, 2}, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, {1, 2}, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p4_local_1_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, Finset.Icc 1 6, ∅, {1, 2, 5, 6}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 5, 6}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {1}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {2}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_1_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_0) 0 j = k9t4p4_local_1_required_0 0 j := by decide + +private theorem k9t4p4_local_1_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_0) 1 j = k9t4p4_local_1_required_0 1 j := by decide + +private theorem k9t4p4_local_1_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_0) 2 j = k9t4p4_local_1_required_0 2 j := by decide + +private theorem k9t4p4_local_1_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_0) 3 j = k9t4p4_local_1_required_0 3 j := by decide + +private theorem k9t4p4_local_1_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_0) 4 j = k9t4p4_local_1_required_0 4 j := by decide + +private theorem k9t4p4_local_1_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_0) 5 j = k9t4p4_local_1_required_0 5 j := by decide + +private theorem k9t4p4_local_1_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_0) 6 j = k9t4p4_local_1_required_0 6 j := by decide + +private theorem k9t4p4_local_1_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_0) 7 j = k9t4p4_local_1_required_0 7 j := by decide + +private theorem k9t4p4_local_1_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_0) 8 j = k9t4p4_local_1_required_0 8 j := by decide + +private theorem k9t4p4_local_1_required_0_eq : (requiredMatrix 9 k9t4p4_step_1_required_block_0) = k9t4p4_local_1_required_0 := by + funext i j + fin_cases i + + · exact k9t4p4_local_1_required_0_eq_row_0 j + + · exact k9t4p4_local_1_required_0_eq_row_1 j + + · exact k9t4p4_local_1_required_0_eq_row_2 j + + · exact k9t4p4_local_1_required_0_eq_row_3 j + + · exact k9t4p4_local_1_required_0_eq_row_4 j + + · exact k9t4p4_local_1_required_0_eq_row_5 j + + · exact k9t4p4_local_1_required_0_eq_row_6 j + + · exact k9t4p4_local_1_required_0_eq_row_7 j + + · exact k9t4p4_local_1_required_0_eq_row_8 j + +private theorem k9t4p4_local_1_path_0_0 : (⟨2, 0, [1, 3, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_0_1 : (⟨2, 0, [1, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_0_2 : (⟨2, 0, [1, 8, 3, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_0_3 : (⟨2, 6, [1, 0, 5, 4, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_0_4 : (⟨2, 0, [3, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_0_5 : (⟨2, 0, [3, 4, 5, 6, 7, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_0_6 : (⟨2, 0, [3, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_0_7 : (⟨4, 0, [3, 1, 2, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_0_8 : (⟨4, 0, [3, 1, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_0_9 : (⟨4, 0, [3, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_0_10 : (⟨4, 8, [3, 1, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_0_11 : (⟨4, 0, [3, 2, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_paths_block_0 : ∀ p ∈ k9t4p4_step_1_required_block_0, p.Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by + simp only [k9t4p4_step_1_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_1_path_0_0, k9t4p4_local_1_path_0_1, k9t4p4_local_1_path_0_2, k9t4p4_local_1_path_0_3, k9t4p4_local_1_path_0_4, k9t4p4_local_1_path_0_5, k9t4p4_local_1_path_0_6, k9t4p4_local_1_path_0_7, k9t4p4_local_1_path_0_8, k9t4p4_local_1_path_0_9, k9t4p4_local_1_path_0_10, k9t4p4_local_1_path_0_11⟩ + +private def k9t4p4_local_1_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {3, 4}, ∅, ∅, {1, 2}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3, 4}, ∅, ∅, ∅, ∅, ∅, {1}, {1, 2}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_1_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_1) 0 j = k9t4p4_local_1_required_1 0 j := by decide + +private theorem k9t4p4_local_1_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_1) 1 j = k9t4p4_local_1_required_1 1 j := by decide + +private theorem k9t4p4_local_1_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_1) 2 j = k9t4p4_local_1_required_1 2 j := by decide + +private theorem k9t4p4_local_1_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_1) 3 j = k9t4p4_local_1_required_1 3 j := by decide + +private theorem k9t4p4_local_1_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_1) 4 j = k9t4p4_local_1_required_1 4 j := by decide + +private theorem k9t4p4_local_1_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_1) 5 j = k9t4p4_local_1_required_1 5 j := by decide + +private theorem k9t4p4_local_1_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_1) 6 j = k9t4p4_local_1_required_1 6 j := by decide + +private theorem k9t4p4_local_1_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_1) 7 j = k9t4p4_local_1_required_1 7 j := by decide + +private theorem k9t4p4_local_1_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_1) 8 j = k9t4p4_local_1_required_1 8 j := by decide + +private theorem k9t4p4_local_1_required_1_eq : (requiredMatrix 9 k9t4p4_step_1_required_block_1) = k9t4p4_local_1_required_1 := by + funext i j + fin_cases i + + · exact k9t4p4_local_1_required_1_eq_row_0 j + + · exact k9t4p4_local_1_required_1_eq_row_1 j + + · exact k9t4p4_local_1_required_1_eq_row_2 j + + · exact k9t4p4_local_1_required_1_eq_row_3 j + + · exact k9t4p4_local_1_required_1_eq_row_4 j + + · exact k9t4p4_local_1_required_1_eq_row_5 j + + · exact k9t4p4_local_1_required_1_eq_row_6 j + + · exact k9t4p4_local_1_required_1_eq_row_7 j + + · exact k9t4p4_local_1_required_1_eq_row_8 j + +private theorem k9t4p4_local_1_path_1_0 : (⟨4, 7, [3, 2, 1, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_1_1 : (⟨4, 8, [3, 2, 1, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_1_2 : (⟨4, 0, [3, 2, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_1_3 : (⟨4, 7, [3, 2, 8, 1, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_1_4 : (⟨4, 0, [3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_1_5 : (⟨4, 6, [5, 0, 1, 2, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_1_6 : (⟨7, 0, [6, 5, 4, 3, 2, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_1_7 : (⟨7, 0, [6, 5, 4, 3, 2, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_1_8 : (⟨7, 4, [6, 5, 0, 1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_1_9 : (⟨7, 4, [6, 5, 0, 1, 2, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_1_10 : (⟨0, 7, [1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_1_11 : (⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_paths_block_1 : ∀ p ∈ k9t4p4_step_1_required_block_1, p.Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by + simp only [k9t4p4_step_1_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_1_path_1_0, k9t4p4_local_1_path_1_1, k9t4p4_local_1_path_1_2, k9t4p4_local_1_path_1_3, k9t4p4_local_1_path_1_4, k9t4p4_local_1_path_1_5, k9t4p4_local_1_path_1_6, k9t4p4_local_1_path_1_7, k9t4p4_local_1_path_1_8, k9t4p4_local_1_path_1_9, k9t4p4_local_1_path_1_10, k9t4p4_local_1_path_1_11⟩ + +private def k9t4p4_local_1_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, {1}, {1, 2}, {1, 2}, ∅, {2}, {1, 3, 4, 5, 6}, {2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 3, 4, 5, 6}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_1_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_2) 0 j = k9t4p4_local_1_required_2 0 j := by decide + +private theorem k9t4p4_local_1_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_2) 1 j = k9t4p4_local_1_required_2 1 j := by decide + +private theorem k9t4p4_local_1_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_2) 2 j = k9t4p4_local_1_required_2 2 j := by decide + +private theorem k9t4p4_local_1_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_2) 3 j = k9t4p4_local_1_required_2 3 j := by decide + +private theorem k9t4p4_local_1_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_2) 4 j = k9t4p4_local_1_required_2 4 j := by decide + +private theorem k9t4p4_local_1_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_2) 5 j = k9t4p4_local_1_required_2 5 j := by decide + +private theorem k9t4p4_local_1_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_2) 6 j = k9t4p4_local_1_required_2 6 j := by decide + +private theorem k9t4p4_local_1_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_2) 7 j = k9t4p4_local_1_required_2 7 j := by decide + +private theorem k9t4p4_local_1_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_2) 8 j = k9t4p4_local_1_required_2 8 j := by decide + +private theorem k9t4p4_local_1_required_2_eq : (requiredMatrix 9 k9t4p4_step_1_required_block_2) = k9t4p4_local_1_required_2 := by + funext i j + fin_cases i + + · exact k9t4p4_local_1_required_2_eq_row_0 j + + · exact k9t4p4_local_1_required_2_eq_row_1 j + + · exact k9t4p4_local_1_required_2_eq_row_2 j + + · exact k9t4p4_local_1_required_2_eq_row_3 j + + · exact k9t4p4_local_1_required_2_eq_row_4 j + + · exact k9t4p4_local_1_required_2_eq_row_5 j + + · exact k9t4p4_local_1_required_2_eq_row_6 j + + · exact k9t4p4_local_1_required_2_eq_row_7 j + + · exact k9t4p4_local_1_required_2_eq_row_8 j + +private theorem k9t4p4_local_1_path_2_0 : (⟨0, 7, [1, 2, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_2_1 : (⟨0, 4, [1, 2, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_2_2 : (⟨0, 6, [1, 2, 8, 3, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_2_3 : (⟨0, 7, [1, 2, 8, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_2_4 : (⟨0, 7, [1, 2, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_2_5 : (⟨0, 4, [1, 2, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_2_6 : (⟨0, 3, [1, 2, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_2_7 : (⟨0, 7, [1, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_2_8 : (⟨0, 8, [1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_2_9 : (⟨0, 2, [1, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_2_10 : (⟨0, 7, [1, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_2_11 : (⟨0, 3, [1, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_paths_block_2 : ∀ p ∈ k9t4p4_step_1_required_block_2, p.Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by + simp only [k9t4p4_step_1_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_1_path_2_0, k9t4p4_local_1_path_2_1, k9t4p4_local_1_path_2_2, k9t4p4_local_1_path_2_3, k9t4p4_local_1_path_2_4, k9t4p4_local_1_path_2_5, k9t4p4_local_1_path_2_6, k9t4p4_local_1_path_2_7, k9t4p4_local_1_path_2_8, k9t4p4_local_1_path_2_9, k9t4p4_local_1_path_2_10, k9t4p4_local_1_path_2_11⟩ + +private def k9t4p4_local_1_required_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, {2}, ∅, ∅, ∅, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_1_required_3_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_3) 0 j = k9t4p4_local_1_required_3 0 j := by decide + +private theorem k9t4p4_local_1_required_3_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_3) 1 j = k9t4p4_local_1_required_3 1 j := by decide + +private theorem k9t4p4_local_1_required_3_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_3) 2 j = k9t4p4_local_1_required_3 2 j := by decide + +private theorem k9t4p4_local_1_required_3_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_3) 3 j = k9t4p4_local_1_required_3 3 j := by decide + +private theorem k9t4p4_local_1_required_3_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_3) 4 j = k9t4p4_local_1_required_3 4 j := by decide + +private theorem k9t4p4_local_1_required_3_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_3) 5 j = k9t4p4_local_1_required_3 5 j := by decide + +private theorem k9t4p4_local_1_required_3_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_3) 6 j = k9t4p4_local_1_required_3 6 j := by decide + +private theorem k9t4p4_local_1_required_3_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_3) 7 j = k9t4p4_local_1_required_3 7 j := by decide + +private theorem k9t4p4_local_1_required_3_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_1_required_block_3) 8 j = k9t4p4_local_1_required_3 8 j := by decide + +private theorem k9t4p4_local_1_required_3_eq : (requiredMatrix 9 k9t4p4_step_1_required_block_3) = k9t4p4_local_1_required_3 := by + funext i j + fin_cases i + + · exact k9t4p4_local_1_required_3_eq_row_0 j + + · exact k9t4p4_local_1_required_3_eq_row_1 j + + · exact k9t4p4_local_1_required_3_eq_row_2 j + + · exact k9t4p4_local_1_required_3_eq_row_3 j + + · exact k9t4p4_local_1_required_3_eq_row_4 j + + · exact k9t4p4_local_1_required_3_eq_row_5 j + + · exact k9t4p4_local_1_required_3_eq_row_6 j + + · exact k9t4p4_local_1_required_3_eq_row_7 j + + · exact k9t4p4_local_1_required_3_eq_row_8 j + +private theorem k9t4p4_local_1_path_3_0 : (⟨0, 6, [5, 4, 3, 1, 2, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_path_3_1 : (⟨0, 2, [5, 6, 7, 8, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by decide + +private theorem k9t4p4_local_1_paths_block_3 : ∀ p ∈ k9t4p4_step_1_required_block_3, p.Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by + simp only [k9t4p4_step_1_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_1_path_3_0, k9t4p4_local_1_path_3_1⟩ + +private theorem k9t4p4_local_1_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_1 a b ∪ ((((k9t4p4_local_1_required_0 a b ∪ k9t4p4_local_1_required_1 a b) ∪ k9t4p4_local_1_required_2 a b) ∪ k9t4p4_local_1_required_3 a b))) 0 j = k9t4p4_local_1 0 j := by decide + +private theorem k9t4p4_local_1_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_1 a b ∪ ((((k9t4p4_local_1_required_0 a b ∪ k9t4p4_local_1_required_1 a b) ∪ k9t4p4_local_1_required_2 a b) ∪ k9t4p4_local_1_required_3 a b))) 1 j = k9t4p4_local_1 1 j := by decide + +private theorem k9t4p4_local_1_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_1 a b ∪ ((((k9t4p4_local_1_required_0 a b ∪ k9t4p4_local_1_required_1 a b) ∪ k9t4p4_local_1_required_2 a b) ∪ k9t4p4_local_1_required_3 a b))) 2 j = k9t4p4_local_1 2 j := by decide + +private theorem k9t4p4_local_1_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_1 a b ∪ ((((k9t4p4_local_1_required_0 a b ∪ k9t4p4_local_1_required_1 a b) ∪ k9t4p4_local_1_required_2 a b) ∪ k9t4p4_local_1_required_3 a b))) 3 j = k9t4p4_local_1 3 j := by decide + +private theorem k9t4p4_local_1_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_1 a b ∪ ((((k9t4p4_local_1_required_0 a b ∪ k9t4p4_local_1_required_1 a b) ∪ k9t4p4_local_1_required_2 a b) ∪ k9t4p4_local_1_required_3 a b))) 4 j = k9t4p4_local_1 4 j := by decide + +private theorem k9t4p4_local_1_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_1 a b ∪ ((((k9t4p4_local_1_required_0 a b ∪ k9t4p4_local_1_required_1 a b) ∪ k9t4p4_local_1_required_2 a b) ∪ k9t4p4_local_1_required_3 a b))) 5 j = k9t4p4_local_1 5 j := by decide + +private theorem k9t4p4_local_1_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_1 a b ∪ ((((k9t4p4_local_1_required_0 a b ∪ k9t4p4_local_1_required_1 a b) ∪ k9t4p4_local_1_required_2 a b) ∪ k9t4p4_local_1_required_3 a b))) 6 j = k9t4p4_local_1 6 j := by decide + +private theorem k9t4p4_local_1_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_1 a b ∪ ((((k9t4p4_local_1_required_0 a b ∪ k9t4p4_local_1_required_1 a b) ∪ k9t4p4_local_1_required_2 a b) ∪ k9t4p4_local_1_required_3 a b))) 7 j = k9t4p4_local_1 7 j := by decide + +private theorem k9t4p4_local_1_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_1 a b ∪ ((((k9t4p4_local_1_required_0 a b ∪ k9t4p4_local_1_required_1 a b) ∪ k9t4p4_local_1_required_2 a b) ∪ k9t4p4_local_1_required_3 a b))) 8 j = k9t4p4_local_1 8 j := by decide + +private theorem k9t4p4_local_1_merged_eq : (fun a b => freshMatrix k9t4p4_state_1 a b ∪ ((((k9t4p4_local_1_required_0 a b ∪ k9t4p4_local_1_required_1 a b) ∪ k9t4p4_local_1_required_2 a b) ∪ k9t4p4_local_1_required_3 a b))) = k9t4p4_local_1 := by + funext i j + fin_cases i + + · exact k9t4p4_local_1_merged_eq_row_0 j + + · exact k9t4p4_local_1_merged_eq_row_1 j + + · exact k9t4p4_local_1_merged_eq_row_2 j + + · exact k9t4p4_local_1_merged_eq_row_3 j + + · exact k9t4p4_local_1_merged_eq_row_4 j + + · exact k9t4p4_local_1_merged_eq_row_5 j + + · exact k9t4p4_local_1_merged_eq_row_6 j + + · exact k9t4p4_local_1_merged_eq_row_7 j + + · exact k9t4p4_local_1_merged_eq_row_8 j + +private theorem k9t4p4_local_1_eq : (fun a b => freshMatrix k9t4p4_state_1 a b ∪ requiredMatrix 9 k9t4p4_step_1_data.required a b) = k9t4p4_local_1 := by + funext a b + change freshMatrix k9t4p4_state_1 a b ∪ requiredMatrix 9 (k9t4p4_step_1_required_block_0 ++ k9t4p4_step_1_required_block_1 ++ k9t4p4_step_1_required_block_2 ++ k9t4p4_step_1_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p4_local_1_required_0_eq, k9t4p4_local_1_required_1_eq, k9t4p4_local_1_required_2_eq, k9t4p4_local_1_required_3_eq] + exact congrFun (congrFun k9t4p4_local_1_merged_eq a) b + +private theorem k9t4p4_local_1_paths : ∀ p ∈ k9t4p4_step_1_data.required, p.Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 := by + change ∀ p ∈ (k9t4p4_step_1_required_block_0 ++ k9t4p4_step_1_required_block_1 ++ k9t4p4_step_1_required_block_2 ++ k9t4p4_step_1_required_block_3), p.Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p4_local_1_paths_block_0, k9t4p4_local_1_paths_block_1⟩, k9t4p4_local_1_paths_block_2⟩, k9t4p4_local_1_paths_block_3⟩ + +private theorem k9t4p4_local_1_bad : k9t4p4_step_1_data.bad.Check (freshGraph k9t4p4.graph k9t4p4_step_1_data.i k9t4p4_step_1_data.j) k9t4p4_local_1 9 4 := by decide + +private theorem k9t4p4_step_1_check : k9t4p4_step_1.Check k9t4p4.graph k9t4p4_state_1 9 4 := by + change k9t4p4_step_1_data.Check k9t4p4.graph k9t4p4_state_1 9 4 + refine ⟨by decide, k9t4p4_local_1_paths, ?_⟩ + rw [k9t4p4_local_1_eq] + exact k9t4p4_local_1_bad + +private theorem k9t4p4_update_1 : k9t4p4_step_1.apply k9t4p4_state_1 = k9t4p4_state_2 := by + have h : ∀ i j : Fin 8, k9t4p4_step_1.apply k9t4p4_state_1 i j = k9t4p4_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p4_state_3 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, {0, 2, 3, 4, 5}, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p4_local_2 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 2 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_2_eq_row_0 : ∀ j : Fin 8, (fun a b => k9t4p4_state_2 a b ∪ requiredMatrix 9 k9t4p4_step_2_data.required a b) 0 j = k9t4p4_local_2 0 j := by decide + +private theorem k9t4p4_local_2_eq_row_1 : ∀ j : Fin 8, (fun a b => k9t4p4_state_2 a b ∪ requiredMatrix 9 k9t4p4_step_2_data.required a b) 1 j = k9t4p4_local_2 1 j := by decide + +private theorem k9t4p4_local_2_eq_row_2 : ∀ j : Fin 8, (fun a b => k9t4p4_state_2 a b ∪ requiredMatrix 9 k9t4p4_step_2_data.required a b) 2 j = k9t4p4_local_2 2 j := by decide + +private theorem k9t4p4_local_2_eq_row_3 : ∀ j : Fin 8, (fun a b => k9t4p4_state_2 a b ∪ requiredMatrix 9 k9t4p4_step_2_data.required a b) 3 j = k9t4p4_local_2 3 j := by decide + +private theorem k9t4p4_local_2_eq_row_4 : ∀ j : Fin 8, (fun a b => k9t4p4_state_2 a b ∪ requiredMatrix 9 k9t4p4_step_2_data.required a b) 4 j = k9t4p4_local_2 4 j := by decide + +private theorem k9t4p4_local_2_eq_row_5 : ∀ j : Fin 8, (fun a b => k9t4p4_state_2 a b ∪ requiredMatrix 9 k9t4p4_step_2_data.required a b) 5 j = k9t4p4_local_2 5 j := by decide + +private theorem k9t4p4_local_2_eq_row_6 : ∀ j : Fin 8, (fun a b => k9t4p4_state_2 a b ∪ requiredMatrix 9 k9t4p4_step_2_data.required a b) 6 j = k9t4p4_local_2 6 j := by decide + +private theorem k9t4p4_local_2_eq_row_7 : ∀ j : Fin 8, (fun a b => k9t4p4_state_2 a b ∪ requiredMatrix 9 k9t4p4_step_2_data.required a b) 7 j = k9t4p4_local_2 7 j := by decide + +private theorem k9t4p4_local_2_eq : (fun a b => k9t4p4_state_2 a b ∪ requiredMatrix 9 k9t4p4_step_2_data.required a b) = k9t4p4_local_2 := by + funext i j + fin_cases i + + · exact k9t4p4_local_2_eq_row_0 j + + · exact k9t4p4_local_2_eq_row_1 j + + · exact k9t4p4_local_2_eq_row_2 j + + · exact k9t4p4_local_2_eq_row_3 j + + · exact k9t4p4_local_2_eq_row_4 j + + · exact k9t4p4_local_2_eq_row_5 j + + · exact k9t4p4_local_2_eq_row_6 j + + · exact k9t4p4_local_2_eq_row_7 j + +private theorem k9t4p4_local_2_paths : ∀ p ∈ k9t4p4_step_2_data.required, p.Check (addedEdgeGraph k9t4p4.graph k9t4p4_step_2_data.i k9t4p4_step_2_data.j) 9 := by decide + +private theorem k9t4p4_local_2_bad : k9t4p4_step_2_data.bad.Check (addedEdgeGraph k9t4p4.graph k9t4p4_step_2_data.i k9t4p4_step_2_data.j) k9t4p4_local_2 9 4 := by decide + +private theorem k9t4p4_step_2_check : k9t4p4_step_2.Check k9t4p4.graph k9t4p4_state_2 9 4 := by + change k9t4p4_step_2_data.Check k9t4p4.graph k9t4p4_state_2 9 4 + refine ⟨k9t4p4_local_2_paths, ?_⟩ + rw [k9t4p4_local_2_eq] + exact k9t4p4_local_2_bad + +private theorem k9t4p4_update_2 : k9t4p4_step_2.apply k9t4p4_state_2 = k9t4p4_state_3 := by + have h : ∀ i j : Fin 8, k9t4p4_step_2.apply k9t4p4_state_2 i j = k9t4p4_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p4_state_4 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p4_local_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, ∅, {1, 2}, Finset.Icc 1 6, ∅, {1, 2}, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 1 6, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[∅, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[∅, Finset.Icc 0 6, {0, 2, 3, 4, 5}, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[{1, 2}, Finset.Icc 1 5, Finset.Icc 2 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, {1, 2}, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p4_local_3_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, ∅, ∅, {1, 4, 5}, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, {2}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_3_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_0) 0 j = k9t4p4_local_3_required_0 0 j := by decide + +private theorem k9t4p4_local_3_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_0) 1 j = k9t4p4_local_3_required_0 1 j := by decide + +private theorem k9t4p4_local_3_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_0) 2 j = k9t4p4_local_3_required_0 2 j := by decide + +private theorem k9t4p4_local_3_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_0) 3 j = k9t4p4_local_3_required_0 3 j := by decide + +private theorem k9t4p4_local_3_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_0) 4 j = k9t4p4_local_3_required_0 4 j := by decide + +private theorem k9t4p4_local_3_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_0) 5 j = k9t4p4_local_3_required_0 5 j := by decide + +private theorem k9t4p4_local_3_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_0) 6 j = k9t4p4_local_3_required_0 6 j := by decide + +private theorem k9t4p4_local_3_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_0) 7 j = k9t4p4_local_3_required_0 7 j := by decide + +private theorem k9t4p4_local_3_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_0) 8 j = k9t4p4_local_3_required_0 8 j := by decide + +private theorem k9t4p4_local_3_required_0_eq : (requiredMatrix 9 k9t4p4_step_3_required_block_0) = k9t4p4_local_3_required_0 := by + funext i j + fin_cases i + + · exact k9t4p4_local_3_required_0_eq_row_0 j + + · exact k9t4p4_local_3_required_0_eq_row_1 j + + · exact k9t4p4_local_3_required_0_eq_row_2 j + + · exact k9t4p4_local_3_required_0_eq_row_3 j + + · exact k9t4p4_local_3_required_0_eq_row_4 j + + · exact k9t4p4_local_3_required_0_eq_row_5 j + + · exact k9t4p4_local_3_required_0_eq_row_6 j + + · exact k9t4p4_local_3_required_0_eq_row_7 j + + · exact k9t4p4_local_3_required_0_eq_row_8 j + +private theorem k9t4p4_local_3_path_0_0 : (⟨1, 0, [2, 3, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_0_1 : (⟨1, 0, [2, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_0_2 : (⟨1, 0, [2, 8, 3, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_0_3 : (⟨1, 6, [2, 0, 5, 4, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_0_4 : (⟨1, 0, [3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_0_5 : (⟨1, 0, [3, 4, 5, 6, 7, 8, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_0_6 : (⟨1, 0, [3, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_0_7 : (⟨4, 0, [3, 1, 2, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_0_8 : (⟨4, 0, [3, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_0_9 : (⟨4, 7, [3, 1, 2, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_0_10 : (⟨4, 8, [3, 1, 2, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_0_11 : (⟨4, 0, [3, 1, 8, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_paths_block_0 : ∀ p ∈ k9t4p4_step_3_required_block_0, p.Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by + simp only [k9t4p4_step_3_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_3_path_0_0, k9t4p4_local_3_path_0_1, k9t4p4_local_3_path_0_2, k9t4p4_local_3_path_0_3, k9t4p4_local_3_path_0_4, k9t4p4_local_3_path_0_5, k9t4p4_local_3_path_0_6, k9t4p4_local_3_path_0_7, k9t4p4_local_3_path_0_8, k9t4p4_local_3_path_0_9, k9t4p4_local_3_path_0_10, k9t4p4_local_3_path_0_11⟩ + +private def k9t4p4_local_3_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {2, 3, 6}, ∅, ∅, {1, 2}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 3, 6}, ∅, ∅, ∅, ∅, ∅, {1}, {1, 2}, {2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, {2}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_3_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_1) 0 j = k9t4p4_local_3_required_1 0 j := by decide + +private theorem k9t4p4_local_3_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_1) 1 j = k9t4p4_local_3_required_1 1 j := by decide + +private theorem k9t4p4_local_3_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_1) 2 j = k9t4p4_local_3_required_1 2 j := by decide + +private theorem k9t4p4_local_3_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_1) 3 j = k9t4p4_local_3_required_1 3 j := by decide + +private theorem k9t4p4_local_3_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_1) 4 j = k9t4p4_local_3_required_1 4 j := by decide + +private theorem k9t4p4_local_3_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_1) 5 j = k9t4p4_local_3_required_1 5 j := by decide + +private theorem k9t4p4_local_3_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_1) 6 j = k9t4p4_local_3_required_1 6 j := by decide + +private theorem k9t4p4_local_3_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_1) 7 j = k9t4p4_local_3_required_1 7 j := by decide + +private theorem k9t4p4_local_3_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_1) 8 j = k9t4p4_local_3_required_1 8 j := by decide + +private theorem k9t4p4_local_3_required_1_eq : (requiredMatrix 9 k9t4p4_step_3_required_block_1) = k9t4p4_local_3_required_1 := by + funext i j + fin_cases i + + · exact k9t4p4_local_3_required_1_eq_row_0 j + + · exact k9t4p4_local_3_required_1_eq_row_1 j + + · exact k9t4p4_local_3_required_1_eq_row_2 j + + · exact k9t4p4_local_3_required_1_eq_row_3 j + + · exact k9t4p4_local_3_required_1_eq_row_4 j + + · exact k9t4p4_local_3_required_1_eq_row_5 j + + · exact k9t4p4_local_3_required_1_eq_row_6 j + + · exact k9t4p4_local_3_required_1_eq_row_7 j + + · exact k9t4p4_local_3_required_1_eq_row_8 j + +private theorem k9t4p4_local_3_path_1_0 : (⟨4, 7, [3, 1, 8, 2, 0, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_1_1 : (⟨4, 0, [3, 1, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_1_2 : (⟨4, 0, [3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_1_3 : (⟨4, 8, [3, 2, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_1_4 : (⟨4, 0, [3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_1_5 : (⟨4, 6, [5, 0, 2, 1, 3, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_1_6 : (⟨7, 0, [6, 5, 4, 3, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_1_7 : (⟨7, 0, [6, 5, 4, 3, 1, 8, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_1_8 : (⟨7, 4, [6, 5, 0, 2, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_1_9 : (⟨7, 4, [6, 5, 0, 2, 1, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_1_10 : (⟨0, 7, [2, 1, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_1_11 : (⟨0, 8, [2, 1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_paths_block_1 : ∀ p ∈ k9t4p4_step_3_required_block_1, p.Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by + simp only [k9t4p4_step_3_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_3_path_1_0, k9t4p4_local_3_path_1_1, k9t4p4_local_3_path_1_2, k9t4p4_local_3_path_1_3, k9t4p4_local_3_path_1_4, k9t4p4_local_3_path_1_5, k9t4p4_local_3_path_1_6, k9t4p4_local_3_path_1_7, k9t4p4_local_3_path_1_8, k9t4p4_local_3_path_1_9, k9t4p4_local_3_path_1_10, k9t4p4_local_3_path_1_11⟩ + +private def k9t4p4_local_3_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, ∅, {1, 2}, {1, 2}, ∅, {2}, {1, 3, 4, 5, 6}, {2}], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 3, 4, 5, 6}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_3_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_2) 0 j = k9t4p4_local_3_required_2 0 j := by decide + +private theorem k9t4p4_local_3_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_2) 1 j = k9t4p4_local_3_required_2 1 j := by decide + +private theorem k9t4p4_local_3_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_2) 2 j = k9t4p4_local_3_required_2 2 j := by decide + +private theorem k9t4p4_local_3_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_2) 3 j = k9t4p4_local_3_required_2 3 j := by decide + +private theorem k9t4p4_local_3_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_2) 4 j = k9t4p4_local_3_required_2 4 j := by decide + +private theorem k9t4p4_local_3_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_2) 5 j = k9t4p4_local_3_required_2 5 j := by decide + +private theorem k9t4p4_local_3_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_2) 6 j = k9t4p4_local_3_required_2 6 j := by decide + +private theorem k9t4p4_local_3_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_2) 7 j = k9t4p4_local_3_required_2 7 j := by decide + +private theorem k9t4p4_local_3_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_2) 8 j = k9t4p4_local_3_required_2 8 j := by decide + +private theorem k9t4p4_local_3_required_2_eq : (requiredMatrix 9 k9t4p4_step_3_required_block_2) = k9t4p4_local_3_required_2 := by + funext i j + fin_cases i + + · exact k9t4p4_local_3_required_2_eq_row_0 j + + · exact k9t4p4_local_3_required_2_eq_row_1 j + + · exact k9t4p4_local_3_required_2_eq_row_2 j + + · exact k9t4p4_local_3_required_2_eq_row_3 j + + · exact k9t4p4_local_3_required_2_eq_row_4 j + + · exact k9t4p4_local_3_required_2_eq_row_5 j + + · exact k9t4p4_local_3_required_2_eq_row_6 j + + · exact k9t4p4_local_3_required_2_eq_row_7 j + + · exact k9t4p4_local_3_required_2_eq_row_8 j + +private theorem k9t4p4_local_3_path_2_0 : (⟨0, 7, [2, 1, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_2_1 : (⟨0, 4, [2, 1, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_2_2 : (⟨0, 6, [2, 1, 8, 3, 4, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_2_3 : (⟨0, 7, [2, 1, 8, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_2_4 : (⟨0, 7, [2, 1, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_2_5 : (⟨0, 4, [2, 1, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_2_6 : (⟨0, 3, [2, 1, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_2_7 : (⟨0, 7, [2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_2_8 : (⟨0, 8, [2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_2_9 : (⟨0, 1, [2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_2_10 : (⟨0, 7, [2, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_2_11 : (⟨0, 3, [2, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_paths_block_2 : ∀ p ∈ k9t4p4_step_3_required_block_2, p.Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by + simp only [k9t4p4_step_3_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_3_path_2_0, k9t4p4_local_3_path_2_1, k9t4p4_local_3_path_2_2, k9t4p4_local_3_path_2_3, k9t4p4_local_3_path_2_4, k9t4p4_local_3_path_2_5, k9t4p4_local_3_path_2_6, k9t4p4_local_3_path_2_7, k9t4p4_local_3_path_2_8, k9t4p4_local_3_path_2_9, k9t4p4_local_3_path_2_10, k9t4p4_local_3_path_2_11⟩ + +private def k9t4p4_local_3_required_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {2}, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[{2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_3_required_3_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_3) 0 j = k9t4p4_local_3_required_3 0 j := by decide + +private theorem k9t4p4_local_3_required_3_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_3) 1 j = k9t4p4_local_3_required_3 1 j := by decide + +private theorem k9t4p4_local_3_required_3_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_3) 2 j = k9t4p4_local_3_required_3 2 j := by decide + +private theorem k9t4p4_local_3_required_3_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_3) 3 j = k9t4p4_local_3_required_3 3 j := by decide + +private theorem k9t4p4_local_3_required_3_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_3) 4 j = k9t4p4_local_3_required_3 4 j := by decide + +private theorem k9t4p4_local_3_required_3_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_3) 5 j = k9t4p4_local_3_required_3 5 j := by decide + +private theorem k9t4p4_local_3_required_3_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_3) 6 j = k9t4p4_local_3_required_3 6 j := by decide + +private theorem k9t4p4_local_3_required_3_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_3) 7 j = k9t4p4_local_3_required_3 7 j := by decide + +private theorem k9t4p4_local_3_required_3_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_3_required_block_3) 8 j = k9t4p4_local_3_required_3 8 j := by decide + +private theorem k9t4p4_local_3_required_3_eq : (requiredMatrix 9 k9t4p4_step_3_required_block_3) = k9t4p4_local_3_required_3 := by + funext i j + fin_cases i + + · exact k9t4p4_local_3_required_3_eq_row_0 j + + · exact k9t4p4_local_3_required_3_eq_row_1 j + + · exact k9t4p4_local_3_required_3_eq_row_2 j + + · exact k9t4p4_local_3_required_3_eq_row_3 j + + · exact k9t4p4_local_3_required_3_eq_row_4 j + + · exact k9t4p4_local_3_required_3_eq_row_5 j + + · exact k9t4p4_local_3_required_3_eq_row_6 j + + · exact k9t4p4_local_3_required_3_eq_row_7 j + + · exact k9t4p4_local_3_required_3_eq_row_8 j + +private theorem k9t4p4_local_3_path_3_0 : (⟨0, 6, [5, 4, 3, 1, 2, 8, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_path_3_1 : (⟨0, 1, [5, 6, 7, 8, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by decide + +private theorem k9t4p4_local_3_paths_block_3 : ∀ p ∈ k9t4p4_step_3_required_block_3, p.Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by + simp only [k9t4p4_step_3_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_3_path_3_0, k9t4p4_local_3_path_3_1⟩ + +private theorem k9t4p4_local_3_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_3 a b ∪ ((((k9t4p4_local_3_required_0 a b ∪ k9t4p4_local_3_required_1 a b) ∪ k9t4p4_local_3_required_2 a b) ∪ k9t4p4_local_3_required_3 a b))) 0 j = k9t4p4_local_3 0 j := by decide + +private theorem k9t4p4_local_3_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_3 a b ∪ ((((k9t4p4_local_3_required_0 a b ∪ k9t4p4_local_3_required_1 a b) ∪ k9t4p4_local_3_required_2 a b) ∪ k9t4p4_local_3_required_3 a b))) 1 j = k9t4p4_local_3 1 j := by decide + +private theorem k9t4p4_local_3_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_3 a b ∪ ((((k9t4p4_local_3_required_0 a b ∪ k9t4p4_local_3_required_1 a b) ∪ k9t4p4_local_3_required_2 a b) ∪ k9t4p4_local_3_required_3 a b))) 2 j = k9t4p4_local_3 2 j := by decide + +private theorem k9t4p4_local_3_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_3 a b ∪ ((((k9t4p4_local_3_required_0 a b ∪ k9t4p4_local_3_required_1 a b) ∪ k9t4p4_local_3_required_2 a b) ∪ k9t4p4_local_3_required_3 a b))) 3 j = k9t4p4_local_3 3 j := by decide + +private theorem k9t4p4_local_3_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_3 a b ∪ ((((k9t4p4_local_3_required_0 a b ∪ k9t4p4_local_3_required_1 a b) ∪ k9t4p4_local_3_required_2 a b) ∪ k9t4p4_local_3_required_3 a b))) 4 j = k9t4p4_local_3 4 j := by decide + +private theorem k9t4p4_local_3_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_3 a b ∪ ((((k9t4p4_local_3_required_0 a b ∪ k9t4p4_local_3_required_1 a b) ∪ k9t4p4_local_3_required_2 a b) ∪ k9t4p4_local_3_required_3 a b))) 5 j = k9t4p4_local_3 5 j := by decide + +private theorem k9t4p4_local_3_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_3 a b ∪ ((((k9t4p4_local_3_required_0 a b ∪ k9t4p4_local_3_required_1 a b) ∪ k9t4p4_local_3_required_2 a b) ∪ k9t4p4_local_3_required_3 a b))) 6 j = k9t4p4_local_3 6 j := by decide + +private theorem k9t4p4_local_3_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_3 a b ∪ ((((k9t4p4_local_3_required_0 a b ∪ k9t4p4_local_3_required_1 a b) ∪ k9t4p4_local_3_required_2 a b) ∪ k9t4p4_local_3_required_3 a b))) 7 j = k9t4p4_local_3 7 j := by decide + +private theorem k9t4p4_local_3_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_3 a b ∪ ((((k9t4p4_local_3_required_0 a b ∪ k9t4p4_local_3_required_1 a b) ∪ k9t4p4_local_3_required_2 a b) ∪ k9t4p4_local_3_required_3 a b))) 8 j = k9t4p4_local_3 8 j := by decide + +private theorem k9t4p4_local_3_merged_eq : (fun a b => freshMatrix k9t4p4_state_3 a b ∪ ((((k9t4p4_local_3_required_0 a b ∪ k9t4p4_local_3_required_1 a b) ∪ k9t4p4_local_3_required_2 a b) ∪ k9t4p4_local_3_required_3 a b))) = k9t4p4_local_3 := by + funext i j + fin_cases i + + · exact k9t4p4_local_3_merged_eq_row_0 j + + · exact k9t4p4_local_3_merged_eq_row_1 j + + · exact k9t4p4_local_3_merged_eq_row_2 j + + · exact k9t4p4_local_3_merged_eq_row_3 j + + · exact k9t4p4_local_3_merged_eq_row_4 j + + · exact k9t4p4_local_3_merged_eq_row_5 j + + · exact k9t4p4_local_3_merged_eq_row_6 j + + · exact k9t4p4_local_3_merged_eq_row_7 j + + · exact k9t4p4_local_3_merged_eq_row_8 j + +private theorem k9t4p4_local_3_eq : (fun a b => freshMatrix k9t4p4_state_3 a b ∪ requiredMatrix 9 k9t4p4_step_3_data.required a b) = k9t4p4_local_3 := by + funext a b + change freshMatrix k9t4p4_state_3 a b ∪ requiredMatrix 9 (k9t4p4_step_3_required_block_0 ++ k9t4p4_step_3_required_block_1 ++ k9t4p4_step_3_required_block_2 ++ k9t4p4_step_3_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p4_local_3_required_0_eq, k9t4p4_local_3_required_1_eq, k9t4p4_local_3_required_2_eq, k9t4p4_local_3_required_3_eq] + exact congrFun (congrFun k9t4p4_local_3_merged_eq a) b + +private theorem k9t4p4_local_3_paths : ∀ p ∈ k9t4p4_step_3_data.required, p.Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 := by + change ∀ p ∈ (k9t4p4_step_3_required_block_0 ++ k9t4p4_step_3_required_block_1 ++ k9t4p4_step_3_required_block_2 ++ k9t4p4_step_3_required_block_3), p.Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p4_local_3_paths_block_0, k9t4p4_local_3_paths_block_1⟩, k9t4p4_local_3_paths_block_2⟩, k9t4p4_local_3_paths_block_3⟩ + +private theorem k9t4p4_local_3_bad : k9t4p4_step_3_data.bad.Check (freshGraph k9t4p4.graph k9t4p4_step_3_data.i k9t4p4_step_3_data.j) k9t4p4_local_3 9 4 := by decide + +private theorem k9t4p4_step_3_check : k9t4p4_step_3.Check k9t4p4.graph k9t4p4_state_3 9 4 := by + change k9t4p4_step_3_data.Check k9t4p4.graph k9t4p4_state_3 9 4 + refine ⟨by decide, k9t4p4_local_3_paths, ?_⟩ + rw [k9t4p4_local_3_eq] + exact k9t4p4_local_3_bad + +private theorem k9t4p4_update_3 : k9t4p4_step_3.apply k9t4p4_state_3 = k9t4p4_state_4 := by + have h : ∀ i j : Fin 8, k9t4p4_step_3.apply k9t4p4_state_3 i j = k9t4p4_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p4_state_5 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[{0, 2, 3, 4, 5}, Finset.Icc 2 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p4_local_4 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, Finset.Icc 1 8], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 5, Finset.Icc 2 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 6], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_4_eq_row_0 : ∀ j : Fin 8, (fun a b => k9t4p4_state_4 a b ∪ requiredMatrix 9 k9t4p4_step_4_data.required a b) 0 j = k9t4p4_local_4 0 j := by decide + +private theorem k9t4p4_local_4_eq_row_1 : ∀ j : Fin 8, (fun a b => k9t4p4_state_4 a b ∪ requiredMatrix 9 k9t4p4_step_4_data.required a b) 1 j = k9t4p4_local_4 1 j := by decide + +private theorem k9t4p4_local_4_eq_row_2 : ∀ j : Fin 8, (fun a b => k9t4p4_state_4 a b ∪ requiredMatrix 9 k9t4p4_step_4_data.required a b) 2 j = k9t4p4_local_4 2 j := by decide + +private theorem k9t4p4_local_4_eq_row_3 : ∀ j : Fin 8, (fun a b => k9t4p4_state_4 a b ∪ requiredMatrix 9 k9t4p4_step_4_data.required a b) 3 j = k9t4p4_local_4 3 j := by decide + +private theorem k9t4p4_local_4_eq_row_4 : ∀ j : Fin 8, (fun a b => k9t4p4_state_4 a b ∪ requiredMatrix 9 k9t4p4_step_4_data.required a b) 4 j = k9t4p4_local_4 4 j := by decide + +private theorem k9t4p4_local_4_eq_row_5 : ∀ j : Fin 8, (fun a b => k9t4p4_state_4 a b ∪ requiredMatrix 9 k9t4p4_step_4_data.required a b) 5 j = k9t4p4_local_4 5 j := by decide + +private theorem k9t4p4_local_4_eq_row_6 : ∀ j : Fin 8, (fun a b => k9t4p4_state_4 a b ∪ requiredMatrix 9 k9t4p4_step_4_data.required a b) 6 j = k9t4p4_local_4 6 j := by decide + +private theorem k9t4p4_local_4_eq_row_7 : ∀ j : Fin 8, (fun a b => k9t4p4_state_4 a b ∪ requiredMatrix 9 k9t4p4_step_4_data.required a b) 7 j = k9t4p4_local_4 7 j := by decide + +private theorem k9t4p4_local_4_eq : (fun a b => k9t4p4_state_4 a b ∪ requiredMatrix 9 k9t4p4_step_4_data.required a b) = k9t4p4_local_4 := by + funext i j + fin_cases i + + · exact k9t4p4_local_4_eq_row_0 j + + · exact k9t4p4_local_4_eq_row_1 j + + · exact k9t4p4_local_4_eq_row_2 j + + · exact k9t4p4_local_4_eq_row_3 j + + · exact k9t4p4_local_4_eq_row_4 j + + · exact k9t4p4_local_4_eq_row_5 j + + · exact k9t4p4_local_4_eq_row_6 j + + · exact k9t4p4_local_4_eq_row_7 j + +private theorem k9t4p4_local_4_paths : ∀ p ∈ k9t4p4_step_4_data.required, p.Check (addedEdgeGraph k9t4p4.graph k9t4p4_step_4_data.i k9t4p4_step_4_data.j) 9 := by decide + +private theorem k9t4p4_local_4_bad : k9t4p4_step_4_data.bad.Check (addedEdgeGraph k9t4p4.graph k9t4p4_step_4_data.i k9t4p4_step_4_data.j) k9t4p4_local_4 9 4 := by decide + +private theorem k9t4p4_step_4_check : k9t4p4_step_4.Check k9t4p4.graph k9t4p4_state_4 9 4 := by + change k9t4p4_step_4_data.Check k9t4p4.graph k9t4p4_state_4 9 4 + refine ⟨k9t4p4_local_4_paths, ?_⟩ + rw [k9t4p4_local_4_eq] + exact k9t4p4_local_4_bad + +private theorem k9t4p4_update_4 : k9t4p4_step_4.apply k9t4p4_state_4 = k9t4p4_state_5 := by + have h : ∀ i j : Fin 8, k9t4p4_step_4.apply k9t4p4_state_4 i j = k9t4p4_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p4_state_6 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 2 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p4_local_5 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, Finset.Icc 1 6, {1, 2}, Finset.Icc 1 6, {1, 2}, ∅, Finset.Icc 1 6, {1, 2}], + #[∅, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 1 6, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, {1, 2}, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, ∅], + #[{1, 2}, Finset.Icc 0 6, Finset.Icc 0 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[∅, {0, 2, 3, 4, 5}, Finset.Icc 2 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, {1, 2}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p4_local_5_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, Finset.Icc 1 6, ∅, {1, 2}, ∅, ∅, {3}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅], + #[∅, ∅, {1}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3}, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_5_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_0) 0 j = k9t4p4_local_5_required_0 0 j := by decide + +private theorem k9t4p4_local_5_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_0) 1 j = k9t4p4_local_5_required_0 1 j := by decide + +private theorem k9t4p4_local_5_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_0) 2 j = k9t4p4_local_5_required_0 2 j := by decide + +private theorem k9t4p4_local_5_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_0) 3 j = k9t4p4_local_5_required_0 3 j := by decide + +private theorem k9t4p4_local_5_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_0) 4 j = k9t4p4_local_5_required_0 4 j := by decide + +private theorem k9t4p4_local_5_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_0) 5 j = k9t4p4_local_5_required_0 5 j := by decide + +private theorem k9t4p4_local_5_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_0) 6 j = k9t4p4_local_5_required_0 6 j := by decide + +private theorem k9t4p4_local_5_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_0) 7 j = k9t4p4_local_5_required_0 7 j := by decide + +private theorem k9t4p4_local_5_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_0) 8 j = k9t4p4_local_5_required_0 8 j := by decide + +private theorem k9t4p4_local_5_required_0_eq : (requiredMatrix 9 k9t4p4_step_5_required_block_0) = k9t4p4_local_5_required_0 := by + funext i j + fin_cases i + + · exact k9t4p4_local_5_required_0_eq_row_0 j + + · exact k9t4p4_local_5_required_0_eq_row_1 j + + · exact k9t4p4_local_5_required_0_eq_row_2 j + + · exact k9t4p4_local_5_required_0_eq_row_3 j + + · exact k9t4p4_local_5_required_0_eq_row_4 j + + · exact k9t4p4_local_5_required_0_eq_row_5 j + + · exact k9t4p4_local_5_required_0_eq_row_6 j + + · exact k9t4p4_local_5_required_0_eq_row_7 j + + · exact k9t4p4_local_5_required_0_eq_row_8 j + +private theorem k9t4p4_local_5_path_0_0 : (⟨2, 0, [1, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_0_1 : (⟨2, 0, [1, 8, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_0_2 : (⟨2, 0, [1, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_0_3 : (⟨2, 5, [1, 0, 6, 7, 8, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_0_4 : (⟨2, 0, [3, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_0_5 : (⟨2, 0, [3, 4, 5, 6, 7, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_0_6 : (⟨2, 0, [3, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_0_7 : (⟨4, 0, [3, 1, 2, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_0_8 : (⟨4, 7, [3, 2, 8, 1, 0, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_0_9 : (⟨4, 0, [5, 6, 7, 8, 2, 3, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_0_10 : (⟨4, 7, [5, 6, 0, 1, 2, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_0_11 : (⟨7, 0, [6, 5, 4, 3, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_paths_block_0 : ∀ p ∈ k9t4p4_step_5_required_block_0, p.Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by + simp only [k9t4p4_step_5_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_5_path_0_0, k9t4p4_local_5_path_0_1, k9t4p4_local_5_path_0_2, k9t4p4_local_5_path_0_3, k9t4p4_local_5_path_0_4, k9t4p4_local_5_path_0_5, k9t4p4_local_5_path_0_6, k9t4p4_local_5_path_0_7, k9t4p4_local_5_path_0_8, k9t4p4_local_5_path_0_9, k9t4p4_local_5_path_0_10, k9t4p4_local_5_path_0_11⟩ + +private def k9t4p4_local_5_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {5}, ∅, ∅, {1, 2, 4, 5, 6}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅], + #[{5}, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 4, 5, 6}, ∅, ∅, {1, 2}, {1, 2}, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_5_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_1) 0 j = k9t4p4_local_5_required_1 0 j := by decide + +private theorem k9t4p4_local_5_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_1) 1 j = k9t4p4_local_5_required_1 1 j := by decide + +private theorem k9t4p4_local_5_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_1) 2 j = k9t4p4_local_5_required_1 2 j := by decide + +private theorem k9t4p4_local_5_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_1) 3 j = k9t4p4_local_5_required_1 3 j := by decide + +private theorem k9t4p4_local_5_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_1) 4 j = k9t4p4_local_5_required_1 4 j := by decide + +private theorem k9t4p4_local_5_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_1) 5 j = k9t4p4_local_5_required_1 5 j := by decide + +private theorem k9t4p4_local_5_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_1) 6 j = k9t4p4_local_5_required_1 6 j := by decide + +private theorem k9t4p4_local_5_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_1) 7 j = k9t4p4_local_5_required_1 7 j := by decide + +private theorem k9t4p4_local_5_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_1) 8 j = k9t4p4_local_5_required_1 8 j := by decide + +private theorem k9t4p4_local_5_required_1_eq : (requiredMatrix 9 k9t4p4_step_5_required_block_1) = k9t4p4_local_5_required_1 := by + funext i j + fin_cases i + + · exact k9t4p4_local_5_required_1_eq_row_0 j + + · exact k9t4p4_local_5_required_1_eq_row_1 j + + · exact k9t4p4_local_5_required_1_eq_row_2 j + + · exact k9t4p4_local_5_required_1_eq_row_3 j + + · exact k9t4p4_local_5_required_1_eq_row_4 j + + · exact k9t4p4_local_5_required_1_eq_row_5 j + + · exact k9t4p4_local_5_required_1_eq_row_6 j + + · exact k9t4p4_local_5_required_1_eq_row_7 j + + · exact k9t4p4_local_5_required_1_eq_row_8 j + +private theorem k9t4p4_local_5_path_1_0 : (⟨7, 0, [6, 5, 4, 3, 2, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_1_1 : (⟨7, 0, [6, 5, 4, 3, 2, 8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_1_2 : (⟨7, 4, [6, 0, 1, 2, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_1_3 : (⟨7, 5, [6, 0, 1, 2, 8, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_1_4 : (⟨7, 0, [8, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_1_5 : (⟨7, 3, [8, 1, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_1_6 : (⟨7, 0, [8, 2, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_1_7 : (⟨7, 3, [8, 2, 1, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_1_8 : (⟨7, 0, [8, 2, 3, 1]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_1_9 : (⟨7, 4, [8, 2, 3, 1, 0, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_1_10 : (⟨0, 4, [1, 2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_1_11 : (⟨0, 7, [1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_paths_block_1 : ∀ p ∈ k9t4p4_step_5_required_block_1, p.Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by + simp only [k9t4p4_step_5_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_5_path_1_0, k9t4p4_local_5_path_1_1, k9t4p4_local_5_path_1_2, k9t4p4_local_5_path_1_3, k9t4p4_local_5_path_1_4, k9t4p4_local_5_path_1_5, k9t4p4_local_5_path_1_6, k9t4p4_local_5_path_1_7, k9t4p4_local_5_path_1_8, k9t4p4_local_5_path_1_9, k9t4p4_local_5_path_1_10, k9t4p4_local_5_path_1_11⟩ + +private def k9t4p4_local_5_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, {1}, {1, 2}, {1, 2, 3, 4, 6}, {2}, ∅, {1}, {1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 3, 4, 6}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_5_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_2) 0 j = k9t4p4_local_5_required_2 0 j := by decide + +private theorem k9t4p4_local_5_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_2) 1 j = k9t4p4_local_5_required_2 1 j := by decide + +private theorem k9t4p4_local_5_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_2) 2 j = k9t4p4_local_5_required_2 2 j := by decide + +private theorem k9t4p4_local_5_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_2) 3 j = k9t4p4_local_5_required_2 3 j := by decide + +private theorem k9t4p4_local_5_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_2) 4 j = k9t4p4_local_5_required_2 4 j := by decide + +private theorem k9t4p4_local_5_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_2) 5 j = k9t4p4_local_5_required_2 5 j := by decide + +private theorem k9t4p4_local_5_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_2) 6 j = k9t4p4_local_5_required_2 6 j := by decide + +private theorem k9t4p4_local_5_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_2) 7 j = k9t4p4_local_5_required_2 7 j := by decide + +private theorem k9t4p4_local_5_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_2) 8 j = k9t4p4_local_5_required_2 8 j := by decide + +private theorem k9t4p4_local_5_required_2_eq : (requiredMatrix 9 k9t4p4_step_5_required_block_2) = k9t4p4_local_5_required_2 := by + funext i j + fin_cases i + + · exact k9t4p4_local_5_required_2_eq_row_0 j + + · exact k9t4p4_local_5_required_2_eq_row_1 j + + · exact k9t4p4_local_5_required_2_eq_row_2 j + + · exact k9t4p4_local_5_required_2_eq_row_3 j + + · exact k9t4p4_local_5_required_2_eq_row_4 j + + · exact k9t4p4_local_5_required_2_eq_row_5 j + + · exact k9t4p4_local_5_required_2_eq_row_6 j + + · exact k9t4p4_local_5_required_2_eq_row_7 j + + · exact k9t4p4_local_5_required_2_eq_row_8 j + +private theorem k9t4p4_local_5_path_2_0 : (⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_2_1 : (⟨0, 5, [1, 2, 3, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_2_2 : (⟨0, 4, [1, 2, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_2_3 : (⟨0, 4, [1, 2, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_2_4 : (⟨0, 7, [1, 2, 8, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_2_5 : (⟨0, 4, [1, 2, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_2_6 : (⟨0, 3, [1, 2, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_2_7 : (⟨0, 4, [1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_2_8 : (⟨0, 8, [1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_2_9 : (⟨0, 2, [1, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_2_10 : (⟨0, 4, [1, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_2_11 : (⟨0, 3, [1, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_paths_block_2 : ∀ p ∈ k9t4p4_step_5_required_block_2, p.Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by + simp only [k9t4p4_step_5_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_5_path_2_0, k9t4p4_local_5_path_2_1, k9t4p4_local_5_path_2_2, k9t4p4_local_5_path_2_3, k9t4p4_local_5_path_2_4, k9t4p4_local_5_path_2_5, k9t4p4_local_5_path_2_6, k9t4p4_local_5_path_2_7, k9t4p4_local_5_path_2_8, k9t4p4_local_5_path_2_9, k9t4p4_local_5_path_2_10, k9t4p4_local_5_path_2_11⟩ + +private def k9t4p4_local_5_required_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, {2}, ∅, ∅, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_5_required_3_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_3) 0 j = k9t4p4_local_5_required_3 0 j := by decide + +private theorem k9t4p4_local_5_required_3_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_3) 1 j = k9t4p4_local_5_required_3 1 j := by decide + +private theorem k9t4p4_local_5_required_3_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_3) 2 j = k9t4p4_local_5_required_3 2 j := by decide + +private theorem k9t4p4_local_5_required_3_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_3) 3 j = k9t4p4_local_5_required_3 3 j := by decide + +private theorem k9t4p4_local_5_required_3_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_3) 4 j = k9t4p4_local_5_required_3 4 j := by decide + +private theorem k9t4p4_local_5_required_3_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_3) 5 j = k9t4p4_local_5_required_3 5 j := by decide + +private theorem k9t4p4_local_5_required_3_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_3) 6 j = k9t4p4_local_5_required_3 6 j := by decide + +private theorem k9t4p4_local_5_required_3_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_3) 7 j = k9t4p4_local_5_required_3 7 j := by decide + +private theorem k9t4p4_local_5_required_3_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_5_required_block_3) 8 j = k9t4p4_local_5_required_3 8 j := by decide + +private theorem k9t4p4_local_5_required_3_eq : (requiredMatrix 9 k9t4p4_step_5_required_block_3) = k9t4p4_local_5_required_3 := by + funext i j + fin_cases i + + · exact k9t4p4_local_5_required_3_eq_row_0 j + + · exact k9t4p4_local_5_required_3_eq_row_1 j + + · exact k9t4p4_local_5_required_3_eq_row_2 j + + · exact k9t4p4_local_5_required_3_eq_row_3 j + + · exact k9t4p4_local_5_required_3_eq_row_4 j + + · exact k9t4p4_local_5_required_3_eq_row_5 j + + · exact k9t4p4_local_5_required_3_eq_row_6 j + + · exact k9t4p4_local_5_required_3_eq_row_7 j + + · exact k9t4p4_local_5_required_3_eq_row_8 j + +private theorem k9t4p4_local_5_path_3_0 : (⟨0, 2, [6, 5, 4, 3, 1, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_path_3_1 : (⟨0, 5, [6, 7, 8, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by decide + +private theorem k9t4p4_local_5_paths_block_3 : ∀ p ∈ k9t4p4_step_5_required_block_3, p.Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by + simp only [k9t4p4_step_5_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_5_path_3_0, k9t4p4_local_5_path_3_1⟩ + +private theorem k9t4p4_local_5_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_5 a b ∪ ((((k9t4p4_local_5_required_0 a b ∪ k9t4p4_local_5_required_1 a b) ∪ k9t4p4_local_5_required_2 a b) ∪ k9t4p4_local_5_required_3 a b))) 0 j = k9t4p4_local_5 0 j := by decide + +private theorem k9t4p4_local_5_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_5 a b ∪ ((((k9t4p4_local_5_required_0 a b ∪ k9t4p4_local_5_required_1 a b) ∪ k9t4p4_local_5_required_2 a b) ∪ k9t4p4_local_5_required_3 a b))) 1 j = k9t4p4_local_5 1 j := by decide + +private theorem k9t4p4_local_5_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_5 a b ∪ ((((k9t4p4_local_5_required_0 a b ∪ k9t4p4_local_5_required_1 a b) ∪ k9t4p4_local_5_required_2 a b) ∪ k9t4p4_local_5_required_3 a b))) 2 j = k9t4p4_local_5 2 j := by decide + +private theorem k9t4p4_local_5_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_5 a b ∪ ((((k9t4p4_local_5_required_0 a b ∪ k9t4p4_local_5_required_1 a b) ∪ k9t4p4_local_5_required_2 a b) ∪ k9t4p4_local_5_required_3 a b))) 3 j = k9t4p4_local_5 3 j := by decide + +private theorem k9t4p4_local_5_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_5 a b ∪ ((((k9t4p4_local_5_required_0 a b ∪ k9t4p4_local_5_required_1 a b) ∪ k9t4p4_local_5_required_2 a b) ∪ k9t4p4_local_5_required_3 a b))) 4 j = k9t4p4_local_5 4 j := by decide + +private theorem k9t4p4_local_5_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_5 a b ∪ ((((k9t4p4_local_5_required_0 a b ∪ k9t4p4_local_5_required_1 a b) ∪ k9t4p4_local_5_required_2 a b) ∪ k9t4p4_local_5_required_3 a b))) 5 j = k9t4p4_local_5 5 j := by decide + +private theorem k9t4p4_local_5_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_5 a b ∪ ((((k9t4p4_local_5_required_0 a b ∪ k9t4p4_local_5_required_1 a b) ∪ k9t4p4_local_5_required_2 a b) ∪ k9t4p4_local_5_required_3 a b))) 6 j = k9t4p4_local_5 6 j := by decide + +private theorem k9t4p4_local_5_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_5 a b ∪ ((((k9t4p4_local_5_required_0 a b ∪ k9t4p4_local_5_required_1 a b) ∪ k9t4p4_local_5_required_2 a b) ∪ k9t4p4_local_5_required_3 a b))) 7 j = k9t4p4_local_5 7 j := by decide + +private theorem k9t4p4_local_5_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_5 a b ∪ ((((k9t4p4_local_5_required_0 a b ∪ k9t4p4_local_5_required_1 a b) ∪ k9t4p4_local_5_required_2 a b) ∪ k9t4p4_local_5_required_3 a b))) 8 j = k9t4p4_local_5 8 j := by decide + +private theorem k9t4p4_local_5_merged_eq : (fun a b => freshMatrix k9t4p4_state_5 a b ∪ ((((k9t4p4_local_5_required_0 a b ∪ k9t4p4_local_5_required_1 a b) ∪ k9t4p4_local_5_required_2 a b) ∪ k9t4p4_local_5_required_3 a b))) = k9t4p4_local_5 := by + funext i j + fin_cases i + + · exact k9t4p4_local_5_merged_eq_row_0 j + + · exact k9t4p4_local_5_merged_eq_row_1 j + + · exact k9t4p4_local_5_merged_eq_row_2 j + + · exact k9t4p4_local_5_merged_eq_row_3 j + + · exact k9t4p4_local_5_merged_eq_row_4 j + + · exact k9t4p4_local_5_merged_eq_row_5 j + + · exact k9t4p4_local_5_merged_eq_row_6 j + + · exact k9t4p4_local_5_merged_eq_row_7 j + + · exact k9t4p4_local_5_merged_eq_row_8 j + +private theorem k9t4p4_local_5_eq : (fun a b => freshMatrix k9t4p4_state_5 a b ∪ requiredMatrix 9 k9t4p4_step_5_data.required a b) = k9t4p4_local_5 := by + funext a b + change freshMatrix k9t4p4_state_5 a b ∪ requiredMatrix 9 (k9t4p4_step_5_required_block_0 ++ k9t4p4_step_5_required_block_1 ++ k9t4p4_step_5_required_block_2 ++ k9t4p4_step_5_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p4_local_5_required_0_eq, k9t4p4_local_5_required_1_eq, k9t4p4_local_5_required_2_eq, k9t4p4_local_5_required_3_eq] + exact congrFun (congrFun k9t4p4_local_5_merged_eq a) b + +private theorem k9t4p4_local_5_paths : ∀ p ∈ k9t4p4_step_5_data.required, p.Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 := by + change ∀ p ∈ (k9t4p4_step_5_required_block_0 ++ k9t4p4_step_5_required_block_1 ++ k9t4p4_step_5_required_block_2 ++ k9t4p4_step_5_required_block_3), p.Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p4_local_5_paths_block_0, k9t4p4_local_5_paths_block_1⟩, k9t4p4_local_5_paths_block_2⟩, k9t4p4_local_5_paths_block_3⟩ + +private theorem k9t4p4_local_5_bad : k9t4p4_step_5_data.bad.Check (freshGraph k9t4p4.graph k9t4p4_step_5_data.i k9t4p4_step_5_data.j) k9t4p4_local_5 9 4 := by decide + +private theorem k9t4p4_step_5_check : k9t4p4_step_5.Check k9t4p4.graph k9t4p4_state_5 9 4 := by + change k9t4p4_step_5_data.Check k9t4p4.graph k9t4p4_state_5 9 4 + refine ⟨by decide, k9t4p4_local_5_paths, ?_⟩ + rw [k9t4p4_local_5_eq] + exact k9t4p4_local_5_bad + +private theorem k9t4p4_update_5 : k9t4p4_step_5.apply k9t4p4_state_5 = k9t4p4_state_6 := by + have h : ∀ i j : Fin 8, k9t4p4_step_5.apply k9t4p4_state_5 i j = k9t4p4_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p4_state_7 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, {0, 2, 3, 4, 5}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p4_local_6 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, Finset.Icc 1 8], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 2 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 6], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_6_eq_row_0 : ∀ j : Fin 8, (fun a b => k9t4p4_state_6 a b ∪ requiredMatrix 9 k9t4p4_step_6_data.required a b) 0 j = k9t4p4_local_6 0 j := by decide + +private theorem k9t4p4_local_6_eq_row_1 : ∀ j : Fin 8, (fun a b => k9t4p4_state_6 a b ∪ requiredMatrix 9 k9t4p4_step_6_data.required a b) 1 j = k9t4p4_local_6 1 j := by decide + +private theorem k9t4p4_local_6_eq_row_2 : ∀ j : Fin 8, (fun a b => k9t4p4_state_6 a b ∪ requiredMatrix 9 k9t4p4_step_6_data.required a b) 2 j = k9t4p4_local_6 2 j := by decide + +private theorem k9t4p4_local_6_eq_row_3 : ∀ j : Fin 8, (fun a b => k9t4p4_state_6 a b ∪ requiredMatrix 9 k9t4p4_step_6_data.required a b) 3 j = k9t4p4_local_6 3 j := by decide + +private theorem k9t4p4_local_6_eq_row_4 : ∀ j : Fin 8, (fun a b => k9t4p4_state_6 a b ∪ requiredMatrix 9 k9t4p4_step_6_data.required a b) 4 j = k9t4p4_local_6 4 j := by decide + +private theorem k9t4p4_local_6_eq_row_5 : ∀ j : Fin 8, (fun a b => k9t4p4_state_6 a b ∪ requiredMatrix 9 k9t4p4_step_6_data.required a b) 5 j = k9t4p4_local_6 5 j := by decide + +private theorem k9t4p4_local_6_eq_row_6 : ∀ j : Fin 8, (fun a b => k9t4p4_state_6 a b ∪ requiredMatrix 9 k9t4p4_step_6_data.required a b) 6 j = k9t4p4_local_6 6 j := by decide + +private theorem k9t4p4_local_6_eq_row_7 : ∀ j : Fin 8, (fun a b => k9t4p4_state_6 a b ∪ requiredMatrix 9 k9t4p4_step_6_data.required a b) 7 j = k9t4p4_local_6 7 j := by decide + +private theorem k9t4p4_local_6_eq : (fun a b => k9t4p4_state_6 a b ∪ requiredMatrix 9 k9t4p4_step_6_data.required a b) = k9t4p4_local_6 := by + funext i j + fin_cases i + + · exact k9t4p4_local_6_eq_row_0 j + + · exact k9t4p4_local_6_eq_row_1 j + + · exact k9t4p4_local_6_eq_row_2 j + + · exact k9t4p4_local_6_eq_row_3 j + + · exact k9t4p4_local_6_eq_row_4 j + + · exact k9t4p4_local_6_eq_row_5 j + + · exact k9t4p4_local_6_eq_row_6 j + + · exact k9t4p4_local_6_eq_row_7 j + +private theorem k9t4p4_local_6_paths : ∀ p ∈ k9t4p4_step_6_data.required, p.Check (addedEdgeGraph k9t4p4.graph k9t4p4_step_6_data.i k9t4p4_step_6_data.j) 9 := by decide + +private theorem k9t4p4_local_6_bad : k9t4p4_step_6_data.bad.Check (addedEdgeGraph k9t4p4.graph k9t4p4_step_6_data.i k9t4p4_step_6_data.j) k9t4p4_local_6 9 4 := by decide + +private theorem k9t4p4_step_6_check : k9t4p4_step_6.Check k9t4p4.graph k9t4p4_state_6 9 4 := by + change k9t4p4_step_6_data.Check k9t4p4.graph k9t4p4_state_6 9 4 + refine ⟨k9t4p4_local_6_paths, ?_⟩ + rw [k9t4p4_local_6_eq] + exact k9t4p4_local_6_bad + +private theorem k9t4p4_update_6 : k9t4p4_step_6.apply k9t4p4_state_6 = k9t4p4_state_7 := by + have h : ∀ i j : Fin 8, k9t4p4_step_6.apply k9t4p4_state_6 i j = k9t4p4_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p4_state_8 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p4_local_7 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, ∅, {1, 2}, Finset.Icc 1 6, {1, 2}, ∅, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 1 6, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[∅, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, {1, 2}, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, ∅], + #[{1, 2}, Finset.Icc 0 6, Finset.Icc 0 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[∅, Finset.Icc 0 5, {0, 2, 3, 4, 5}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, {1, 2}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p4_local_7_required_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, ∅, ∅, {1, 2}, ∅, ∅, {2}, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅], + #[∅, {1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_7_required_0_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_0) 0 j = k9t4p4_local_7_required_0 0 j := by decide + +private theorem k9t4p4_local_7_required_0_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_0) 1 j = k9t4p4_local_7_required_0 1 j := by decide + +private theorem k9t4p4_local_7_required_0_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_0) 2 j = k9t4p4_local_7_required_0 2 j := by decide + +private theorem k9t4p4_local_7_required_0_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_0) 3 j = k9t4p4_local_7_required_0 3 j := by decide + +private theorem k9t4p4_local_7_required_0_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_0) 4 j = k9t4p4_local_7_required_0 4 j := by decide + +private theorem k9t4p4_local_7_required_0_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_0) 5 j = k9t4p4_local_7_required_0 5 j := by decide + +private theorem k9t4p4_local_7_required_0_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_0) 6 j = k9t4p4_local_7_required_0 6 j := by decide + +private theorem k9t4p4_local_7_required_0_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_0) 7 j = k9t4p4_local_7_required_0 7 j := by decide + +private theorem k9t4p4_local_7_required_0_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_0) 8 j = k9t4p4_local_7_required_0 8 j := by decide + +private theorem k9t4p4_local_7_required_0_eq : (requiredMatrix 9 k9t4p4_step_7_required_block_0) = k9t4p4_local_7_required_0 := by + funext i j + fin_cases i + + · exact k9t4p4_local_7_required_0_eq_row_0 j + + · exact k9t4p4_local_7_required_0_eq_row_1 j + + · exact k9t4p4_local_7_required_0_eq_row_2 j + + · exact k9t4p4_local_7_required_0_eq_row_3 j + + · exact k9t4p4_local_7_required_0_eq_row_4 j + + · exact k9t4p4_local_7_required_0_eq_row_5 j + + · exact k9t4p4_local_7_required_0_eq_row_6 j + + · exact k9t4p4_local_7_required_0_eq_row_7 j + + · exact k9t4p4_local_7_required_0_eq_row_8 j + +private theorem k9t4p4_local_7_path_0_0 : (⟨1, 0, [2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_0_1 : (⟨1, 0, [2, 8, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_0_2 : (⟨1, 0, [2, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_0_3 : (⟨1, 5, [2, 0, 6, 7, 8, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_0_4 : (⟨1, 0, [3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_0_5 : (⟨1, 0, [3, 4, 5, 6, 7, 8, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_0_6 : (⟨1, 0, [3, 8, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_0_7 : (⟨4, 0, [3, 1, 2, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_0_8 : (⟨4, 7, [3, 1, 8, 2, 0, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_0_9 : (⟨4, 0, [5, 6, 7, 8, 1, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_0_10 : (⟨4, 7, [5, 6, 0, 2, 1, 3, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_0_11 : (⟨7, 0, [6, 5, 4, 3, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_paths_block_0 : ∀ p ∈ k9t4p4_step_7_required_block_0, p.Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by + simp only [k9t4p4_step_7_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_7_path_0_0, k9t4p4_local_7_path_0_1, k9t4p4_local_7_path_0_2, k9t4p4_local_7_path_0_3, k9t4p4_local_7_path_0_4, k9t4p4_local_7_path_0_5, k9t4p4_local_7_path_0_6, k9t4p4_local_7_path_0_7, k9t4p4_local_7_path_0_8, k9t4p4_local_7_path_0_9, k9t4p4_local_7_path_0_10, k9t4p4_local_7_path_0_11⟩ + +private def k9t4p4_local_7_required_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {5}, ∅, ∅, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅], + #[{5}, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, {1, 2}, {1, 2}, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_7_required_1_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_1) 0 j = k9t4p4_local_7_required_1 0 j := by decide + +private theorem k9t4p4_local_7_required_1_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_1) 1 j = k9t4p4_local_7_required_1 1 j := by decide + +private theorem k9t4p4_local_7_required_1_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_1) 2 j = k9t4p4_local_7_required_1 2 j := by decide + +private theorem k9t4p4_local_7_required_1_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_1) 3 j = k9t4p4_local_7_required_1 3 j := by decide + +private theorem k9t4p4_local_7_required_1_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_1) 4 j = k9t4p4_local_7_required_1 4 j := by decide + +private theorem k9t4p4_local_7_required_1_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_1) 5 j = k9t4p4_local_7_required_1 5 j := by decide + +private theorem k9t4p4_local_7_required_1_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_1) 6 j = k9t4p4_local_7_required_1 6 j := by decide + +private theorem k9t4p4_local_7_required_1_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_1) 7 j = k9t4p4_local_7_required_1 7 j := by decide + +private theorem k9t4p4_local_7_required_1_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_1) 8 j = k9t4p4_local_7_required_1 8 j := by decide + +private theorem k9t4p4_local_7_required_1_eq : (requiredMatrix 9 k9t4p4_step_7_required_block_1) = k9t4p4_local_7_required_1 := by + funext i j + fin_cases i + + · exact k9t4p4_local_7_required_1_eq_row_0 j + + · exact k9t4p4_local_7_required_1_eq_row_1 j + + · exact k9t4p4_local_7_required_1_eq_row_2 j + + · exact k9t4p4_local_7_required_1_eq_row_3 j + + · exact k9t4p4_local_7_required_1_eq_row_4 j + + · exact k9t4p4_local_7_required_1_eq_row_5 j + + · exact k9t4p4_local_7_required_1_eq_row_6 j + + · exact k9t4p4_local_7_required_1_eq_row_7 j + + · exact k9t4p4_local_7_required_1_eq_row_8 j + +private theorem k9t4p4_local_7_path_1_0 : (⟨7, 0, [6, 5, 4, 3, 1, 8, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_1_1 : (⟨7, 0, [6, 5, 4, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_1_2 : (⟨7, 4, [6, 0, 2, 1, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_1_3 : (⟨7, 5, [6, 0, 2, 1, 8, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_1_4 : (⟨7, 0, [8, 1, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_1_5 : (⟨7, 3, [8, 1, 2, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_1_6 : (⟨7, 0, [8, 1, 3, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_1_7 : (⟨7, 4, [8, 1, 3, 2, 0, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_1_8 : (⟨7, 0, [8, 2]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_1_9 : (⟨7, 3, [8, 2, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_1_10 : (⟨0, 4, [2, 1, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_1_11 : (⟨0, 7, [2, 1, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_paths_block_1 : ∀ p ∈ k9t4p4_step_7_required_block_1, p.Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by + simp only [k9t4p4_step_7_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_7_path_1_0, k9t4p4_local_7_path_1_1, k9t4p4_local_7_path_1_2, k9t4p4_local_7_path_1_3, k9t4p4_local_7_path_1_4, k9t4p4_local_7_path_1_5, k9t4p4_local_7_path_1_6, k9t4p4_local_7_path_1_7, k9t4p4_local_7_path_1_8, k9t4p4_local_7_path_1_9, k9t4p4_local_7_path_1_10, k9t4p4_local_7_path_1_11⟩ + +private def k9t4p4_local_7_required_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, ∅, {1, 2}, {1, 2, 3, 4, 6}, {2}, ∅, {1}, {1, 2}], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 3, 4, 6}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_7_required_2_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_2) 0 j = k9t4p4_local_7_required_2 0 j := by decide + +private theorem k9t4p4_local_7_required_2_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_2) 1 j = k9t4p4_local_7_required_2 1 j := by decide + +private theorem k9t4p4_local_7_required_2_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_2) 2 j = k9t4p4_local_7_required_2 2 j := by decide + +private theorem k9t4p4_local_7_required_2_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_2) 3 j = k9t4p4_local_7_required_2 3 j := by decide + +private theorem k9t4p4_local_7_required_2_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_2) 4 j = k9t4p4_local_7_required_2 4 j := by decide + +private theorem k9t4p4_local_7_required_2_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_2) 5 j = k9t4p4_local_7_required_2 5 j := by decide + +private theorem k9t4p4_local_7_required_2_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_2) 6 j = k9t4p4_local_7_required_2 6 j := by decide + +private theorem k9t4p4_local_7_required_2_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_2) 7 j = k9t4p4_local_7_required_2 7 j := by decide + +private theorem k9t4p4_local_7_required_2_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_2) 8 j = k9t4p4_local_7_required_2 8 j := by decide + +private theorem k9t4p4_local_7_required_2_eq : (requiredMatrix 9 k9t4p4_step_7_required_block_2) = k9t4p4_local_7_required_2 := by + funext i j + fin_cases i + + · exact k9t4p4_local_7_required_2_eq_row_0 j + + · exact k9t4p4_local_7_required_2_eq_row_1 j + + · exact k9t4p4_local_7_required_2_eq_row_2 j + + · exact k9t4p4_local_7_required_2_eq_row_3 j + + · exact k9t4p4_local_7_required_2_eq_row_4 j + + · exact k9t4p4_local_7_required_2_eq_row_5 j + + · exact k9t4p4_local_7_required_2_eq_row_6 j + + · exact k9t4p4_local_7_required_2_eq_row_7 j + + · exact k9t4p4_local_7_required_2_eq_row_8 j + +private theorem k9t4p4_local_7_path_2_0 : (⟨0, 8, [2, 1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_2_1 : (⟨0, 5, [2, 1, 3, 8, 7, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_2_2 : (⟨0, 4, [2, 1, 3, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_2_3 : (⟨0, 4, [2, 1, 8, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_2_4 : (⟨0, 7, [2, 1, 8, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_2_5 : (⟨0, 4, [2, 1, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_2_6 : (⟨0, 3, [2, 1, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_2_7 : (⟨0, 4, [2, 3]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_2_8 : (⟨0, 8, [2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_2_9 : (⟨0, 1, [2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_2_10 : (⟨0, 4, [2, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_2_11 : (⟨0, 3, [2, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_paths_block_2 : ∀ p ∈ k9t4p4_step_7_required_block_2, p.Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by + simp only [k9t4p4_step_7_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_7_path_2_0, k9t4p4_local_7_path_2_1, k9t4p4_local_7_path_2_2, k9t4p4_local_7_path_2_3, k9t4p4_local_7_path_2_4, k9t4p4_local_7_path_2_5, k9t4p4_local_7_path_2_6, k9t4p4_local_7_path_2_7, k9t4p4_local_7_path_2_8, k9t4p4_local_7_path_2_9, k9t4p4_local_7_path_2_10, k9t4p4_local_7_path_2_11⟩ + +private def k9t4p4_local_7_required_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {2}, ∅, ∅, ∅, {1}, ∅, ∅, ∅], + #[{2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_7_required_3_eq_row_0 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_3) 0 j = k9t4p4_local_7_required_3 0 j := by decide + +private theorem k9t4p4_local_7_required_3_eq_row_1 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_3) 1 j = k9t4p4_local_7_required_3 1 j := by decide + +private theorem k9t4p4_local_7_required_3_eq_row_2 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_3) 2 j = k9t4p4_local_7_required_3 2 j := by decide + +private theorem k9t4p4_local_7_required_3_eq_row_3 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_3) 3 j = k9t4p4_local_7_required_3 3 j := by decide + +private theorem k9t4p4_local_7_required_3_eq_row_4 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_3) 4 j = k9t4p4_local_7_required_3 4 j := by decide + +private theorem k9t4p4_local_7_required_3_eq_row_5 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_3) 5 j = k9t4p4_local_7_required_3 5 j := by decide + +private theorem k9t4p4_local_7_required_3_eq_row_6 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_3) 6 j = k9t4p4_local_7_required_3 6 j := by decide + +private theorem k9t4p4_local_7_required_3_eq_row_7 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_3) 7 j = k9t4p4_local_7_required_3 7 j := by decide + +private theorem k9t4p4_local_7_required_3_eq_row_8 : ∀ j : Fin 9, (requiredMatrix 9 k9t4p4_step_7_required_block_3) 8 j = k9t4p4_local_7_required_3 8 j := by decide + +private theorem k9t4p4_local_7_required_3_eq : (requiredMatrix 9 k9t4p4_step_7_required_block_3) = k9t4p4_local_7_required_3 := by + funext i j + fin_cases i + + · exact k9t4p4_local_7_required_3_eq_row_0 j + + · exact k9t4p4_local_7_required_3_eq_row_1 j + + · exact k9t4p4_local_7_required_3_eq_row_2 j + + · exact k9t4p4_local_7_required_3_eq_row_3 j + + · exact k9t4p4_local_7_required_3_eq_row_4 j + + · exact k9t4p4_local_7_required_3_eq_row_5 j + + · exact k9t4p4_local_7_required_3_eq_row_6 j + + · exact k9t4p4_local_7_required_3_eq_row_7 j + + · exact k9t4p4_local_7_required_3_eq_row_8 j + +private theorem k9t4p4_local_7_path_3_0 : (⟨0, 1, [6, 5, 4, 3, 2, 8]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_path_3_1 : (⟨0, 5, [6, 7, 8, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 9)).Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by decide + +private theorem k9t4p4_local_7_paths_block_3 : ∀ p ∈ k9t4p4_step_7_required_block_3, p.Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by + simp only [k9t4p4_step_7_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_local_7_path_3_0, k9t4p4_local_7_path_3_1⟩ + +private theorem k9t4p4_local_7_merged_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_7 a b ∪ ((((k9t4p4_local_7_required_0 a b ∪ k9t4p4_local_7_required_1 a b) ∪ k9t4p4_local_7_required_2 a b) ∪ k9t4p4_local_7_required_3 a b))) 0 j = k9t4p4_local_7 0 j := by decide + +private theorem k9t4p4_local_7_merged_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_7 a b ∪ ((((k9t4p4_local_7_required_0 a b ∪ k9t4p4_local_7_required_1 a b) ∪ k9t4p4_local_7_required_2 a b) ∪ k9t4p4_local_7_required_3 a b))) 1 j = k9t4p4_local_7 1 j := by decide + +private theorem k9t4p4_local_7_merged_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_7 a b ∪ ((((k9t4p4_local_7_required_0 a b ∪ k9t4p4_local_7_required_1 a b) ∪ k9t4p4_local_7_required_2 a b) ∪ k9t4p4_local_7_required_3 a b))) 2 j = k9t4p4_local_7 2 j := by decide + +private theorem k9t4p4_local_7_merged_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_7 a b ∪ ((((k9t4p4_local_7_required_0 a b ∪ k9t4p4_local_7_required_1 a b) ∪ k9t4p4_local_7_required_2 a b) ∪ k9t4p4_local_7_required_3 a b))) 3 j = k9t4p4_local_7 3 j := by decide + +private theorem k9t4p4_local_7_merged_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_7 a b ∪ ((((k9t4p4_local_7_required_0 a b ∪ k9t4p4_local_7_required_1 a b) ∪ k9t4p4_local_7_required_2 a b) ∪ k9t4p4_local_7_required_3 a b))) 4 j = k9t4p4_local_7 4 j := by decide + +private theorem k9t4p4_local_7_merged_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_7 a b ∪ ((((k9t4p4_local_7_required_0 a b ∪ k9t4p4_local_7_required_1 a b) ∪ k9t4p4_local_7_required_2 a b) ∪ k9t4p4_local_7_required_3 a b))) 5 j = k9t4p4_local_7 5 j := by decide + +private theorem k9t4p4_local_7_merged_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_7 a b ∪ ((((k9t4p4_local_7_required_0 a b ∪ k9t4p4_local_7_required_1 a b) ∪ k9t4p4_local_7_required_2 a b) ∪ k9t4p4_local_7_required_3 a b))) 6 j = k9t4p4_local_7 6 j := by decide + +private theorem k9t4p4_local_7_merged_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_7 a b ∪ ((((k9t4p4_local_7_required_0 a b ∪ k9t4p4_local_7_required_1 a b) ∪ k9t4p4_local_7_required_2 a b) ∪ k9t4p4_local_7_required_3 a b))) 7 j = k9t4p4_local_7 7 j := by decide + +private theorem k9t4p4_local_7_merged_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_7 a b ∪ ((((k9t4p4_local_7_required_0 a b ∪ k9t4p4_local_7_required_1 a b) ∪ k9t4p4_local_7_required_2 a b) ∪ k9t4p4_local_7_required_3 a b))) 8 j = k9t4p4_local_7 8 j := by decide + +private theorem k9t4p4_local_7_merged_eq : (fun a b => freshMatrix k9t4p4_state_7 a b ∪ ((((k9t4p4_local_7_required_0 a b ∪ k9t4p4_local_7_required_1 a b) ∪ k9t4p4_local_7_required_2 a b) ∪ k9t4p4_local_7_required_3 a b))) = k9t4p4_local_7 := by + funext i j + fin_cases i + + · exact k9t4p4_local_7_merged_eq_row_0 j + + · exact k9t4p4_local_7_merged_eq_row_1 j + + · exact k9t4p4_local_7_merged_eq_row_2 j + + · exact k9t4p4_local_7_merged_eq_row_3 j + + · exact k9t4p4_local_7_merged_eq_row_4 j + + · exact k9t4p4_local_7_merged_eq_row_5 j + + · exact k9t4p4_local_7_merged_eq_row_6 j + + · exact k9t4p4_local_7_merged_eq_row_7 j + + · exact k9t4p4_local_7_merged_eq_row_8 j + +private theorem k9t4p4_local_7_eq : (fun a b => freshMatrix k9t4p4_state_7 a b ∪ requiredMatrix 9 k9t4p4_step_7_data.required a b) = k9t4p4_local_7 := by + funext a b + change freshMatrix k9t4p4_state_7 a b ∪ requiredMatrix 9 (k9t4p4_step_7_required_block_0 ++ k9t4p4_step_7_required_block_1 ++ k9t4p4_step_7_required_block_2 ++ k9t4p4_step_7_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p4_local_7_required_0_eq, k9t4p4_local_7_required_1_eq, k9t4p4_local_7_required_2_eq, k9t4p4_local_7_required_3_eq] + exact congrFun (congrFun k9t4p4_local_7_merged_eq a) b + +private theorem k9t4p4_local_7_paths : ∀ p ∈ k9t4p4_step_7_data.required, p.Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 := by + change ∀ p ∈ (k9t4p4_step_7_required_block_0 ++ k9t4p4_step_7_required_block_1 ++ k9t4p4_step_7_required_block_2 ++ k9t4p4_step_7_required_block_3), p.Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p4_local_7_paths_block_0, k9t4p4_local_7_paths_block_1⟩, k9t4p4_local_7_paths_block_2⟩, k9t4p4_local_7_paths_block_3⟩ + +private theorem k9t4p4_local_7_bad : k9t4p4_step_7_data.bad.Check (freshGraph k9t4p4.graph k9t4p4_step_7_data.i k9t4p4_step_7_data.j) k9t4p4_local_7 9 4 := by decide + +private theorem k9t4p4_step_7_check : k9t4p4_step_7.Check k9t4p4.graph k9t4p4_state_7 9 4 := by + change k9t4p4_step_7_data.Check k9t4p4.graph k9t4p4_state_7 9 4 + refine ⟨by decide, k9t4p4_local_7_paths, ?_⟩ + rw [k9t4p4_local_7_eq] + exact k9t4p4_local_7_bad + +private theorem k9t4p4_update_7 : k9t4p4_step_7.apply k9t4p4_state_7 = k9t4p4_state_8 := by + have h : ∀ i j : Fin 8, k9t4p4_step_7.apply k9t4p4_state_7 i j = k9t4p4_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p4_state_9 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, {1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p4_local_8 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2}, ∅, ∅, {1, 2}, ∅, ∅, {1, 2}, ∅], + #[{1, 2}, ∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[∅, {1, 2, 3, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[{1, 2}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[∅, Finset.Icc 0 5, Finset.Icc 0 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[{1, 2}, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_8_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_8 a b ∪ requiredMatrix 9 k9t4p4_step_8_data.required a b) 0 j = k9t4p4_local_8 0 j := by decide + +private theorem k9t4p4_local_8_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_8 a b ∪ requiredMatrix 9 k9t4p4_step_8_data.required a b) 1 j = k9t4p4_local_8 1 j := by decide + +private theorem k9t4p4_local_8_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_8 a b ∪ requiredMatrix 9 k9t4p4_step_8_data.required a b) 2 j = k9t4p4_local_8 2 j := by decide + +private theorem k9t4p4_local_8_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_8 a b ∪ requiredMatrix 9 k9t4p4_step_8_data.required a b) 3 j = k9t4p4_local_8 3 j := by decide + +private theorem k9t4p4_local_8_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_8 a b ∪ requiredMatrix 9 k9t4p4_step_8_data.required a b) 4 j = k9t4p4_local_8 4 j := by decide + +private theorem k9t4p4_local_8_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_8 a b ∪ requiredMatrix 9 k9t4p4_step_8_data.required a b) 5 j = k9t4p4_local_8 5 j := by decide + +private theorem k9t4p4_local_8_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_8 a b ∪ requiredMatrix 9 k9t4p4_step_8_data.required a b) 6 j = k9t4p4_local_8 6 j := by decide + +private theorem k9t4p4_local_8_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_8 a b ∪ requiredMatrix 9 k9t4p4_step_8_data.required a b) 7 j = k9t4p4_local_8 7 j := by decide + +private theorem k9t4p4_local_8_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_8 a b ∪ requiredMatrix 9 k9t4p4_step_8_data.required a b) 8 j = k9t4p4_local_8 8 j := by decide + +private theorem k9t4p4_local_8_eq : (fun a b => freshMatrix k9t4p4_state_8 a b ∪ requiredMatrix 9 k9t4p4_step_8_data.required a b) = k9t4p4_local_8 := by + funext i j + fin_cases i + + · exact k9t4p4_local_8_eq_row_0 j + + · exact k9t4p4_local_8_eq_row_1 j + + · exact k9t4p4_local_8_eq_row_2 j + + · exact k9t4p4_local_8_eq_row_3 j + + · exact k9t4p4_local_8_eq_row_4 j + + · exact k9t4p4_local_8_eq_row_5 j + + · exact k9t4p4_local_8_eq_row_6 j + + · exact k9t4p4_local_8_eq_row_7 j + + · exact k9t4p4_local_8_eq_row_8 j + +private theorem k9t4p4_local_8_paths : ∀ p ∈ k9t4p4_step_8_data.required, p.Check (freshGraph k9t4p4.graph k9t4p4_step_8_data.i k9t4p4_step_8_data.j) 9 := by decide + +private theorem k9t4p4_local_8_bad : k9t4p4_step_8_data.bad.Check (freshGraph k9t4p4.graph k9t4p4_step_8_data.i k9t4p4_step_8_data.j) k9t4p4_local_8 9 4 := by decide + +private theorem k9t4p4_step_8_check : k9t4p4_step_8.Check k9t4p4.graph k9t4p4_state_8 9 4 := by + change k9t4p4_step_8_data.Check k9t4p4.graph k9t4p4_state_8 9 4 + refine ⟨by decide, k9t4p4_local_8_paths, ?_⟩ + rw [k9t4p4_local_8_eq] + exact k9t4p4_local_8_bad + +private theorem k9t4p4_update_8 : k9t4p4_step_8.apply k9t4p4_state_8 = k9t4p4_state_9 := by + have h : ∀ i j : Fin 8, k9t4p4_step_8.apply k9t4p4_state_8 i j = k9t4p4_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p4_state_10 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, {1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {1}], + #[Finset.Icc 0 5, Finset.Icc 0 5, {1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, {1}, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p4_local_9 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2}, ∅, ∅, {1, 2}, ∅, ∅, {1, 2}, ∅], + #[{1, 2}, ∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[∅, {1, 2, 3, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, ∅, {1}, ∅, ∅], + #[{1, 2}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[∅, Finset.Icc 0 5, Finset.Icc 0 5, {1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[{1, 2}, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p4_local_9_eq_row_0 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_9 a b ∪ requiredMatrix 9 k9t4p4_step_9_data.required a b) 0 j = k9t4p4_local_9 0 j := by decide + +private theorem k9t4p4_local_9_eq_row_1 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_9 a b ∪ requiredMatrix 9 k9t4p4_step_9_data.required a b) 1 j = k9t4p4_local_9 1 j := by decide + +private theorem k9t4p4_local_9_eq_row_2 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_9 a b ∪ requiredMatrix 9 k9t4p4_step_9_data.required a b) 2 j = k9t4p4_local_9 2 j := by decide + +private theorem k9t4p4_local_9_eq_row_3 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_9 a b ∪ requiredMatrix 9 k9t4p4_step_9_data.required a b) 3 j = k9t4p4_local_9 3 j := by decide + +private theorem k9t4p4_local_9_eq_row_4 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_9 a b ∪ requiredMatrix 9 k9t4p4_step_9_data.required a b) 4 j = k9t4p4_local_9 4 j := by decide + +private theorem k9t4p4_local_9_eq_row_5 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_9 a b ∪ requiredMatrix 9 k9t4p4_step_9_data.required a b) 5 j = k9t4p4_local_9 5 j := by decide + +private theorem k9t4p4_local_9_eq_row_6 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_9 a b ∪ requiredMatrix 9 k9t4p4_step_9_data.required a b) 6 j = k9t4p4_local_9 6 j := by decide + +private theorem k9t4p4_local_9_eq_row_7 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_9 a b ∪ requiredMatrix 9 k9t4p4_step_9_data.required a b) 7 j = k9t4p4_local_9 7 j := by decide + +private theorem k9t4p4_local_9_eq_row_8 : ∀ j : Fin 9, (fun a b => freshMatrix k9t4p4_state_9 a b ∪ requiredMatrix 9 k9t4p4_step_9_data.required a b) 8 j = k9t4p4_local_9 8 j := by decide + +private theorem k9t4p4_local_9_eq : (fun a b => freshMatrix k9t4p4_state_9 a b ∪ requiredMatrix 9 k9t4p4_step_9_data.required a b) = k9t4p4_local_9 := by + funext i j + fin_cases i + + · exact k9t4p4_local_9_eq_row_0 j + + · exact k9t4p4_local_9_eq_row_1 j + + · exact k9t4p4_local_9_eq_row_2 j + + · exact k9t4p4_local_9_eq_row_3 j + + · exact k9t4p4_local_9_eq_row_4 j + + · exact k9t4p4_local_9_eq_row_5 j + + · exact k9t4p4_local_9_eq_row_6 j + + · exact k9t4p4_local_9_eq_row_7 j + + · exact k9t4p4_local_9_eq_row_8 j + +private theorem k9t4p4_local_9_paths : ∀ p ∈ k9t4p4_step_9_data.required, p.Check (freshGraph k9t4p4.graph k9t4p4_step_9_data.i k9t4p4_step_9_data.j) 9 := by decide + +private theorem k9t4p4_local_9_bad : k9t4p4_step_9_data.bad.Check (freshGraph k9t4p4.graph k9t4p4_step_9_data.i k9t4p4_step_9_data.j) k9t4p4_local_9 9 4 := by decide + +private theorem k9t4p4_step_9_check : k9t4p4_step_9.Check k9t4p4.graph k9t4p4_state_9 9 4 := by + change k9t4p4_step_9_data.Check k9t4p4.graph k9t4p4_state_9 9 4 + refine ⟨by decide, k9t4p4_local_9_paths, ?_⟩ + rw [k9t4p4_local_9_eq] + exact k9t4p4_local_9_bad + +private theorem k9t4p4_update_9 : k9t4p4_step_9.apply k9t4p4_state_9 = k9t4p4_state_10 := by + have h : ∀ i j : Fin 8, k9t4p4_step_9.apply k9t4p4_state_9 i j = k9t4p4_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k9t4p4_closure_10 : ClosureCheck k9t4p4.graph k9t4p4_state_10 9 4 [] := by trivial + +private theorem k9t4p4_closure_9 : ClosureCheck k9t4p4.graph k9t4p4_state_9 9 4 [k9t4p4_step_9] := by + constructor + · exact k9t4p4_step_9_check + · rw [k9t4p4_update_9] + exact k9t4p4_closure_10 + +private theorem k9t4p4_closure_8 : ClosureCheck k9t4p4.graph k9t4p4_state_8 9 4 [k9t4p4_step_8, k9t4p4_step_9] := by + constructor + · exact k9t4p4_step_8_check + · rw [k9t4p4_update_8] + exact k9t4p4_closure_9 + +private theorem k9t4p4_closure_7 : ClosureCheck k9t4p4.graph k9t4p4_state_7 9 4 [k9t4p4_step_7, k9t4p4_step_8, k9t4p4_step_9] := by + constructor + · exact k9t4p4_step_7_check + · rw [k9t4p4_update_7] + exact k9t4p4_closure_8 + +private theorem k9t4p4_closure_6 : ClosureCheck k9t4p4.graph k9t4p4_state_6 9 4 [k9t4p4_step_6, k9t4p4_step_7, k9t4p4_step_8, k9t4p4_step_9] := by + constructor + · exact k9t4p4_step_6_check + · rw [k9t4p4_update_6] + exact k9t4p4_closure_7 + +private theorem k9t4p4_closure_5 : ClosureCheck k9t4p4.graph k9t4p4_state_5 9 4 [k9t4p4_step_5, k9t4p4_step_6, k9t4p4_step_7, k9t4p4_step_8, k9t4p4_step_9] := by + constructor + · exact k9t4p4_step_5_check + · rw [k9t4p4_update_5] + exact k9t4p4_closure_6 + +private theorem k9t4p4_closure_4 : ClosureCheck k9t4p4.graph k9t4p4_state_4 9 4 [k9t4p4_step_4, k9t4p4_step_5, k9t4p4_step_6, k9t4p4_step_7, k9t4p4_step_8, k9t4p4_step_9] := by + constructor + · exact k9t4p4_step_4_check + · rw [k9t4p4_update_4] + exact k9t4p4_closure_5 + +private theorem k9t4p4_closure_3 : ClosureCheck k9t4p4.graph k9t4p4_state_3 9 4 [k9t4p4_step_3, k9t4p4_step_4, k9t4p4_step_5, k9t4p4_step_6, k9t4p4_step_7, k9t4p4_step_8, k9t4p4_step_9] := by + constructor + · exact k9t4p4_step_3_check + · rw [k9t4p4_update_3] + exact k9t4p4_closure_4 + +private theorem k9t4p4_closure_2 : ClosureCheck k9t4p4.graph k9t4p4_state_2 9 4 [k9t4p4_step_2, k9t4p4_step_3, k9t4p4_step_4, k9t4p4_step_5, k9t4p4_step_6, k9t4p4_step_7, k9t4p4_step_8, k9t4p4_step_9] := by + constructor + · exact k9t4p4_step_2_check + · rw [k9t4p4_update_2] + exact k9t4p4_closure_3 + +private theorem k9t4p4_closure_1 : ClosureCheck k9t4p4.graph k9t4p4_state_1 9 4 [k9t4p4_step_1, k9t4p4_step_2, k9t4p4_step_3, k9t4p4_step_4, k9t4p4_step_5, k9t4p4_step_6, k9t4p4_step_7, k9t4p4_step_8, k9t4p4_step_9] := by + constructor + · exact k9t4p4_step_1_check + · rw [k9t4p4_update_1] + exact k9t4p4_closure_2 + +private theorem k9t4p4_closure_0 : ClosureCheck k9t4p4.graph k9t4p4_state_0 9 4 [k9t4p4_step_0, k9t4p4_step_1, k9t4p4_step_2, k9t4p4_step_3, k9t4p4_step_4, k9t4p4_step_5, k9t4p4_step_6, k9t4p4_step_7, k9t4p4_step_8, k9t4p4_step_9] := by + constructor + · exact k9t4p4_step_0_check + · rw [k9t4p4_update_0] + exact k9t4p4_closure_1 + +private theorem k9t4p4_matrix_eq : k9t4p4.matrix 9 = k9t4p4_state_10 := by + change closureMatrix (k9t4p4.initialMatrix 9) _ = _ + rw [k9t4p4_initial_eq] + change closureMatrix k9t4p4_state_0 [k9t4p4_step_0, k9t4p4_step_1, k9t4p4_step_2, k9t4p4_step_3, k9t4p4_step_4, k9t4p4_step_5, k9t4p4_step_6, k9t4p4_step_7, k9t4p4_step_8, k9t4p4_step_9] = _ + simp only [closureMatrix] + rw [k9t4p4_update_0, k9t4p4_update_1, k9t4p4_update_2, k9t4p4_update_3, k9t4p4_update_4, k9t4p4_update_5, k9t4p4_update_6, k9t4p4_update_7, k9t4p4_update_8, k9t4p4_update_9] + +private theorem k9t4p4_part_0 : k9t4p4.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p4_part_1 : k9t4p4.chains.map List.length = ([[], [], [4]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p4_part_2 : k9t4p4.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p4.clique))) = ([[], [], [4]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p4_templates_item_0 : (⟨0, 1, [], [], [], 5, 8⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_1 : (⟨0, 1, [[2, 3, 4, 5, 6, 7]], [], [], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_2 : (⟨0, 2, [], [], [], 5, 8⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_3 : (⟨0, 2, [], [], [3, 4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_4 : (⟨0, 3, [], [], [2], 4, 7⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_5 : (⟨0, 3, [], [], [4, 5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_6 : (⟨0, 4, [], [], [3, 2], 3, 6⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_7 : (⟨0, 4, [], [], [5, 6, 7], 2, 5⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_8 : (⟨0, 5, [], [], [4, 3, 2], 2, 5⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_9 : (⟨0, 6, [], [], [5, 4, 3, 2], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_10 : (⟨0, 6, [], [], [7], 4, 7⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_11 : (⟨0, 7, [], [], [], 5, 8⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_12 : (⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_13 : (⟨1, 2, [], [], [], 5, 8⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_14 : (⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_15 : (⟨1, 3, [], [], [2], 4, 7⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_16 : (⟨1, 3, [], [], [4, 5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_17 : (⟨1, 4, [], [], [5, 6, 7], 2, 5⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_18 : (⟨1, 5, [], [], [4, 3, 2], 2, 5⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_19 : (⟨1, 6, [], [], [5, 4, 3, 2], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_20 : (⟨1, 6, [], [], [7], 4, 7⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_21 : (⟨1, 7, [], [], [], 5, 8⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_22 : (⟨1, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_23 : (⟨2, 3, [], [], [4, 5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_24 : (⟨3, 4, [], [2], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_25 : (⟨3, 5, [], [2], [6, 7], 2, 5⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_26 : (⟨3, 6, [], [2], [7], 3, 6⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_27 : (⟨4, 5, [], [2, 3], [6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_28 : (⟨4, 6, [], [2, 3], [7], 2, 5⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_29 : (⟨5, 6, [], [2, 3, 4], [7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_templates_item_30 : (⟨6, 7, [], [2, 3, 4, 5], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p4_part_3 : ∀ T ∈ k9t4p4.templates, T.Check k9t4p4.graph k9t4p4.clique 9 (patternAmount ([[], [], [4]] : List (List ℕ))) (([[], [], [4]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p4_templates_item_0, k9t4p4_templates_item_1, k9t4p4_templates_item_2, k9t4p4_templates_item_3, k9t4p4_templates_item_4, k9t4p4_templates_item_5, k9t4p4_templates_item_6, k9t4p4_templates_item_7, k9t4p4_templates_item_8, k9t4p4_templates_item_9, k9t4p4_templates_item_10, k9t4p4_templates_item_11, k9t4p4_templates_item_12, k9t4p4_templates_item_13, k9t4p4_templates_item_14, k9t4p4_templates_item_15, k9t4p4_templates_item_16, k9t4p4_templates_item_17, k9t4p4_templates_item_18, k9t4p4_templates_item_19, k9t4p4_templates_item_20, k9t4p4_templates_item_21, k9t4p4_templates_item_22, k9t4p4_templates_item_23, k9t4p4_templates_item_24, k9t4p4_templates_item_25, k9t4p4_templates_item_26, k9t4p4_templates_item_27, k9t4p4_templates_item_28, k9t4p4_templates_item_29, k9t4p4_templates_item_30⟩ + +private theorem k9t4p4_part_4 : ∀ p ∈ k9t4p4.required, p.Check k9t4p4.graph 9 := by decide + +private theorem k9t4p4_part_5 : ClosureCheck k9t4p4.graph (k9t4p4.initialMatrix 9) 9 4 k9t4p4.closure := by + rw [k9t4p4_initial_eq] + exact k9t4p4_closure_0 + +private theorem k9t4p4_part_6 : k9t4p4.bad.Check k9t4p4.graph (k9t4p4.matrix 9) 9 4 := by + rw [k9t4p4_matrix_eq] + decide + +theorem k9t4p4_check : k9t4p4.Check 9 4 [[], [], [4]] := + ⟨k9t4p4_part_0, k9t4p4_part_1, k9t4p4_part_2, k9t4p4_part_3, k9t4p4_part_4, k9t4p4_part_5, k9t4p4_part_6⟩ +private def k9t4p5_step_0_data : EdgeAttachmentData 9 := ⟨4, 0, [⟨1, 5, [0, 4, 3, 2, 8, 7, 6]⟩, ⟨1, 0, [2, 8, 7, 6, 5, 4]⟩, ⟨1, 0, [8, 7, 6, 5, 4]⟩, ⟨3, 7, [2, 0, 4, 5, 6]⟩, ⟨3, 8, [2, 0, 4, 5, 6, 7]⟩, ⟨3, 7, [2, 1, 0, 4, 5, 6]⟩, ⟨3, 8, [2, 1, 0, 4, 5, 6, 7]⟩, ⟨3, 7, [2, 1, 8, 0, 4, 5, 6]⟩, ⟨3, 5, [4, 0, 1, 2, 8, 7, 6]⟩, ⟨3, 1, [4, 0, 8, 2]⟩, ⟨7, 1, [6, 5, 4, 0]⟩, ⟨7, 3, [6, 5, 4, 0, 8, 1, 2]⟩, ⟨7, 3, [6, 5, 4, 0, 8, 2]⟩], ⟨none, {(3, 3), (7, 3), (1, 3), (0, 0)}⟩⟩ + +private def k9t4p5_step_0 : ClosureStep 9 := .edge k9t4p5_step_0_data + +private def k9t4p5_step_1_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨3, 0, [1, 2, 9, 8, 7, 6, 5]⟩, ⟨3, 0, [1, 9, 8, 7, 6, 5]⟩, ⟨3, 9, [1, 0, 5, 6, 7, 8]⟩, ⟨3, 8, [2, 1, 0, 5, 6, 7]⟩, ⟨3, 9, [2, 1, 0, 5, 6, 7, 8]⟩, ⟨3, 7, [2, 9, 1, 0, 5, 6]⟩, ⟨3, 8, [2, 9, 1, 0, 5, 6, 7]⟩, ⟨3, 0, [4, 5, 6, 7, 8, 9, 2, 1]⟩, ⟨3, 7, [4, 5, 0, 1, 2, 9, 8]⟩, ⟨3, 6, [4, 5, 0, 1, 2, 9, 8, 7]⟩, ⟨3, 6, [4, 5, 0, 1, 9, 8, 7]⟩, ⟨3, 0, [9, 8, 7, 6, 5]⟩] + +private def k9t4p5_step_1_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨4, 0, [3, 1, 2, 9, 8, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 9, 8, 7, 6, 5]⟩, ⟨4, 8, [3, 1, 0, 5, 6, 7]⟩, ⟨4, 9, [3, 1, 0, 5, 6, 7, 8]⟩, ⟨4, 2, [3, 1, 0, 5, 6, 7, 8, 9]⟩, ⟨4, 8, [3, 2, 1, 0, 5, 6, 7]⟩, ⟨4, 9, [3, 2, 1, 0, 5, 6, 7, 8]⟩, ⟨4, 7, [3, 2, 9, 1, 0, 5, 6]⟩, ⟨4, 8, [3, 2, 9, 1, 0, 5, 6, 7]⟩, ⟨4, 1, [3, 2, 9, 8, 7, 6, 5, 0]⟩, ⟨4, 0, [3, 9, 8, 7, 6, 5]⟩, ⟨4, 6, [5, 0, 1, 2, 3, 9, 8, 7]⟩] + +private def k9t4p5_step_1_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨4, 8, [5, 0, 1, 2, 9]⟩, ⟨4, 6, [5, 0, 1, 2, 9, 8, 7]⟩, ⟨4, 3, [5, 0, 1]⟩, ⟨4, 3, [5, 0, 1, 9]⟩, ⟨8, 0, [7, 6, 5, 4, 3, 2, 1]⟩, ⟨8, 0, [7, 6, 5, 4, 3, 2, 9, 1]⟩, ⟨8, 3, [7, 6, 5, 0, 1, 9, 2]⟩, ⟨8, 4, [7, 6, 5, 0, 1, 9, 2, 3]⟩, ⟨8, 4, [7, 6, 5, 0, 1, 9, 3]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5]⟩, ⟨8, 0, [9, 1, 3, 4, 5]⟩, ⟨8, 3, [9, 1, 0, 5, 4]⟩] + +private def k9t4p5_step_1_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨8, 3, [9, 2, 1, 0, 5, 4]⟩, ⟨8, 4, [9, 2, 3, 1, 0, 5]⟩] + +private def k9t4p5_step_1_data : FreshAttachmentData 9 := ⟨4, 0, k9t4p5_step_1_required_block_0 ++ k9t4p5_step_1_required_block_1 ++ k9t4p5_step_1_required_block_2 ++ k9t4p5_step_1_required_block_3, ⟨none, {(4, 2), (8, 3), (3, 3), (0, 0)}⟩⟩ + +private def k9t4p5_step_1 : ClosureStep 9 := .fresh k9t4p5_step_1_data + +private def k9t4p5_step_2_data : EdgeAttachmentData 9 := ⟨4, 1, [⟨0, 5, [1, 4, 3, 2, 8, 7, 6]⟩, ⟨0, 1, [2, 8, 7, 6, 5, 4]⟩, ⟨0, 1, [8, 7, 6, 5, 4]⟩, ⟨3, 7, [2, 0, 1, 4, 5, 6]⟩, ⟨3, 8, [2, 0, 1, 4, 5, 6, 7]⟩, ⟨3, 7, [2, 0, 8, 1, 4, 5, 6]⟩, ⟨3, 7, [2, 1, 4, 5, 6]⟩, ⟨3, 8, [2, 1, 4, 5, 6, 7]⟩, ⟨3, 5, [4, 1, 0, 2, 8, 7, 6]⟩, ⟨3, 0, [4, 1, 8, 2]⟩, ⟨7, 0, [6, 5, 4, 1]⟩, ⟨7, 3, [6, 5, 4, 1, 0, 2]⟩, ⟨7, 3, [6, 5, 4, 1, 0, 8, 2]⟩], ⟨none, {(3, 3), (7, 3), (0, 3), (1, 0)}⟩⟩ + +private def k9t4p5_step_2 : ClosureStep 9 := .edge k9t4p5_step_2_data + +private def k9t4p5_step_3_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨3, 0, [1, 2, 9, 8, 7, 6, 5]⟩, ⟨3, 8, [1, 2, 0, 5, 6, 7]⟩, ⟨3, 9, [1, 2, 0, 5, 6, 7, 8]⟩, ⟨3, 7, [1, 9, 2, 0, 5, 6]⟩, ⟨3, 8, [1, 9, 2, 0, 5, 6, 7]⟩, ⟨3, 0, [1, 9, 8, 7, 6, 5]⟩, ⟨3, 9, [2, 0, 5, 6, 7, 8]⟩, ⟨3, 0, [4, 5, 6, 7, 8, 9, 1, 2]⟩, ⟨3, 7, [4, 5, 0, 2, 1, 9, 8]⟩, ⟨3, 6, [4, 5, 0, 2, 1, 9, 8, 7]⟩, ⟨3, 6, [4, 5, 0, 2, 9, 8, 7]⟩, ⟨3, 0, [9, 8, 7, 6, 5]⟩] + +private def k9t4p5_step_3_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨4, 0, [3, 1, 2, 9, 8, 7, 6, 5]⟩, ⟨4, 8, [3, 1, 2, 0, 5, 6, 7]⟩, ⟨4, 9, [3, 1, 2, 0, 5, 6, 7, 8]⟩, ⟨4, 7, [3, 1, 9, 2, 0, 5, 6]⟩, ⟨4, 8, [3, 1, 9, 2, 0, 5, 6, 7]⟩, ⟨4, 0, [3, 1, 9, 8, 7, 6, 5]⟩, ⟨4, 2, [3, 1, 9, 8, 7, 6, 5, 0]⟩, ⟨4, 8, [3, 2, 0, 5, 6, 7]⟩, ⟨4, 9, [3, 2, 0, 5, 6, 7, 8]⟩, ⟨4, 1, [3, 2, 0, 5, 6, 7, 8, 9]⟩, ⟨4, 0, [3, 9, 8, 7, 6, 5]⟩, ⟨4, 3, [5, 0, 2, 1]⟩] + +private def k9t4p5_step_3_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨4, 6, [5, 0, 2, 1, 3, 9, 8, 7]⟩, ⟨4, 8, [5, 0, 2, 1, 9]⟩, ⟨4, 6, [5, 0, 2, 1, 9, 8, 7]⟩, ⟨4, 3, [5, 0, 2]⟩, ⟨8, 0, [7, 6, 5, 4, 3, 1, 2]⟩, ⟨8, 0, [7, 6, 5, 4, 3, 1, 9, 2]⟩, ⟨8, 4, [7, 6, 5, 0, 2, 1, 3]⟩, ⟨8, 3, [7, 6, 5, 0, 2, 1, 9]⟩, ⟨8, 4, [7, 6, 5, 0, 2, 1, 9, 3]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5]⟩, ⟨8, 3, [9, 1, 2, 0, 5, 4]⟩, ⟨8, 4, [9, 1, 3, 2, 0, 5]⟩] + +private def k9t4p5_step_3_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨8, 0, [9, 1, 3, 4, 5]⟩, ⟨8, 3, [9, 2, 0, 5, 4]⟩] + +private def k9t4p5_step_3_data : FreshAttachmentData 9 := ⟨4, 1, k9t4p5_step_3_required_block_0 ++ k9t4p5_step_3_required_block_1 ++ k9t4p5_step_3_required_block_2 ++ k9t4p5_step_3_required_block_3, ⟨none, {(4, 2), (8, 3), (3, 3), (0, 0)}⟩⟩ + +private def k9t4p5_step_3 : ClosureStep 9 := .fresh k9t4p5_step_3_data + +private def k9t4p5_step_4_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨4, 0, [3, 1, 2, 9, 8, 7, 6]⟩, ⟨4, 0, [3, 1, 9, 8, 7, 6]⟩, ⟨4, 5, [3, 1, 0, 6]⟩, ⟨4, 8, [3, 1, 0, 6, 7]⟩, ⟨4, 9, [3, 1, 0, 6, 7, 8]⟩, ⟨4, 8, [3, 2, 1, 0, 6, 7]⟩, ⟨4, 9, [3, 2, 1, 0, 6, 7, 8]⟩, ⟨4, 7, [3, 2, 9, 1, 0, 6]⟩, ⟨4, 8, [3, 2, 9, 1, 0, 6, 7]⟩, ⟨4, 0, [5, 6, 7, 8, 9, 2, 3, 1]⟩, ⟨4, 7, [5, 6, 0, 1, 2, 3, 9, 8]⟩, ⟨4, 7, [5, 6, 0, 1, 2, 9, 8]⟩] + +private def k9t4p5_step_4_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨5, 0, [4, 3, 1, 2, 9, 8, 7, 6]⟩, ⟨5, 2, [4, 3, 1, 0, 6, 7, 8, 9]⟩, ⟨5, 9, [4, 3, 2, 1, 0, 6, 7, 8]⟩, ⟨5, 8, [4, 3, 2, 9, 1, 0, 6, 7]⟩, ⟨5, 1, [4, 3, 2, 9, 8, 7, 6, 0]⟩, ⟨8, 0, [7, 6, 5, 4, 3, 2, 9, 1]⟩, ⟨8, 5, [7, 6, 0, 1, 9, 2, 3, 4]⟩, ⟨8, 5, [7, 6, 0, 1, 9, 3, 4]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6]⟩, ⟨8, 0, [9, 1, 3, 4, 5, 6]⟩, ⟨8, 3, [9, 1, 0, 6, 5, 4]⟩, ⟨8, 4, [9, 2, 1, 0, 6, 5]⟩] + +private def k9t4p5_step_4_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 3, [9, 2, 1, 0, 6, 5, 4]⟩, ⟨8, 5, [9, 2, 3, 1, 0, 6]⟩, ⟨8, 4, [9, 2, 3, 1, 0, 6, 5]⟩, ⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 8, [1, 2, 3, 9]⟩, ⟨0, 5, [1, 2, 3, 9, 8, 7, 6]⟩, ⟨0, 4, [1, 2, 3, 9, 8, 7, 6, 5]⟩, ⟨0, 8, [1, 2, 9]⟩, ⟨0, 5, [1, 2, 9, 8, 7, 6]⟩, ⟨0, 4, [1, 2, 9, 8, 7, 6, 5]⟩, ⟨0, 3, [1, 2, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 8, [1, 3, 4, 5, 6, 7]⟩] + +private def k9t4p5_step_4_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 9, [1, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 4, [1, 9, 2, 3]⟩, ⟨0, 5, [1, 9, 2, 3, 4]⟩, ⟨0, 7, [1, 9, 2, 3, 4, 5, 6]⟩, ⟨0, 8, [1, 9, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 4, [1, 9, 3]⟩, ⟨0, 8, [1, 9, 3, 4, 5, 6, 7]⟩, ⟨0, 4, [1, 9, 8, 7, 6, 5]⟩, ⟨0, 3, [1, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 2, [1, 9, 8, 7, 6, 5, 4, 3]⟩, ⟨0, 7, [6, 5, 4, 3, 1, 2, 9, 8]⟩, ⟨0, 8, [6, 5, 4, 3, 9]⟩] + +private def k9t4p5_step_4_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 5, [6, 7, 8, 9, 1, 2, 3, 4]⟩, ⟨0, 4, [6, 7, 8, 9, 3]⟩] + +private def k9t4p5_step_4_data : FreshAttachmentData 9 := ⟨5, 0, k9t4p5_step_4_required_block_0 ++ k9t4p5_step_4_required_block_1 ++ k9t4p5_step_4_required_block_2 ++ k9t4p5_step_4_required_block_3 ++ k9t4p5_step_4_required_block_4, ⟨none, {(0, 2), (4, 3), (8, 3), (5, 1)}⟩⟩ + +private def k9t4p5_step_4 : ClosureStep 9 := .fresh k9t4p5_step_4_data + +private def k9t4p5_step_5_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨4, 0, [3, 1, 2, 9, 8, 7, 6]⟩, ⟨4, 8, [3, 1, 2, 0, 6, 7]⟩, ⟨4, 9, [3, 1, 2, 0, 6, 7, 8]⟩, ⟨4, 7, [3, 1, 9, 2, 0, 6]⟩, ⟨4, 8, [3, 1, 9, 2, 0, 6, 7]⟩, ⟨4, 0, [3, 1, 9, 8, 7, 6]⟩, ⟨4, 5, [3, 2, 0, 6]⟩, ⟨4, 8, [3, 2, 0, 6, 7]⟩, ⟨4, 9, [3, 2, 0, 6, 7, 8]⟩, ⟨4, 0, [5, 6, 7, 8, 9, 1, 3, 2]⟩, ⟨4, 7, [5, 6, 0, 2, 1, 3, 9, 8]⟩, ⟨4, 7, [5, 6, 0, 2, 1, 9, 8]⟩] + +private def k9t4p5_step_5_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨5, 0, [4, 3, 1, 2, 9, 8, 7, 6]⟩, ⟨5, 9, [4, 3, 1, 2, 0, 6, 7, 8]⟩, ⟨5, 8, [4, 3, 1, 9, 2, 0, 6, 7]⟩, ⟨5, 2, [4, 3, 1, 9, 8, 7, 6, 0]⟩, ⟨5, 1, [4, 3, 2, 0, 6, 7, 8, 9]⟩, ⟨8, 0, [7, 6, 5, 4, 3, 1, 9, 2]⟩, ⟨8, 5, [7, 6, 0, 2, 1, 3, 4]⟩, ⟨8, 5, [7, 6, 0, 2, 1, 9, 3, 4]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6]⟩, ⟨8, 4, [9, 1, 2, 0, 6, 5]⟩, ⟨8, 3, [9, 1, 2, 0, 6, 5, 4]⟩, ⟨8, 5, [9, 1, 3, 2, 0, 6]⟩] + +private def k9t4p5_step_5_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 4, [9, 1, 3, 2, 0, 6, 5]⟩, ⟨8, 0, [9, 1, 3, 4, 5, 6]⟩, ⟨8, 3, [9, 2, 0, 6, 5, 4]⟩, ⟨0, 4, [2, 1, 3]⟩, ⟨0, 8, [2, 1, 3, 4, 5, 6, 7]⟩, ⟨0, 9, [2, 1, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 8, [2, 1, 3, 9]⟩, ⟨0, 5, [2, 1, 3, 9, 8, 7, 6]⟩, ⟨0, 4, [2, 1, 3, 9, 8, 7, 6, 5]⟩, ⟨0, 4, [2, 1, 9, 3]⟩, ⟨0, 5, [2, 1, 9, 3, 4]⟩, ⟨0, 7, [2, 1, 9, 3, 4, 5, 6]⟩] + +private def k9t4p5_step_5_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 8, [2, 1, 9, 3, 4, 5, 6, 7]⟩, ⟨0, 8, [2, 1, 9]⟩, ⟨0, 5, [2, 1, 9, 8, 7, 6]⟩, ⟨0, 4, [2, 1, 9, 8, 7, 6, 5]⟩, ⟨0, 3, [2, 1, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 8, [2, 3, 4, 5, 6, 7]⟩, ⟨0, 9, [2, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 4, [2, 9, 8, 7, 6, 5]⟩, ⟨0, 3, [2, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 1, [2, 9, 8, 7, 6, 5, 4, 3]⟩, ⟨0, 7, [6, 5, 4, 3, 1, 2, 9, 8]⟩, ⟨0, 8, [6, 5, 4, 3, 9]⟩] + +private def k9t4p5_step_5_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 5, [6, 7, 8, 9, 1, 2, 3, 4]⟩, ⟨0, 4, [6, 7, 8, 9, 3]⟩] + +private def k9t4p5_step_5_data : FreshAttachmentData 9 := ⟨5, 1, k9t4p5_step_5_required_block_0 ++ k9t4p5_step_5_required_block_1 ++ k9t4p5_step_5_required_block_2 ++ k9t4p5_step_5_required_block_3 ++ k9t4p5_step_5_required_block_4, ⟨none, {(0, 2), (4, 3), (8, 3), (5, 1)}⟩⟩ + +private def k9t4p5_step_5 : ClosureStep 9 := .fresh k9t4p5_step_5_data + +private def k9t4p5_step_6_data : EdgeAttachmentData 9 := ⟨6, 0, [⟨1, 5, [0, 6, 7, 8, 2, 3, 4]⟩, ⟨1, 0, [2, 3, 4, 5, 6]⟩, ⟨1, 0, [8, 2, 3, 4, 5, 6]⟩, ⟨3, 1, [4, 5, 6, 0]⟩, ⟨3, 7, [4, 5, 6, 0, 1, 2, 8]⟩, ⟨3, 7, [4, 5, 6, 0, 1, 8]⟩, ⟨7, 5, [6, 0, 8, 1, 2, 3, 4]⟩, ⟨7, 1, [6, 0, 8, 2]⟩, ⟨7, 3, [8, 0, 6, 5, 4]⟩, ⟨7, 2, [8, 0, 6, 5, 4, 3]⟩, ⟨7, 3, [8, 1, 0, 6, 5, 4]⟩, ⟨7, 2, [8, 1, 0, 6, 5, 4, 3]⟩, ⟨7, 3, [8, 1, 2, 0, 6, 5, 4]⟩], ⟨none, {(7, 3), (3, 3), (1, 3), (0, 0)}⟩⟩ + +private def k9t4p5_step_6 : ClosureStep 9 := .edge k9t4p5_step_6_data + +private def k9t4p5_step_7_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨4, 0, [3, 1, 2, 9, 8, 7]⟩, ⟨4, 0, [3, 1, 9, 8, 7]⟩, ⟨4, 9, [3, 1, 0, 7, 8]⟩, ⟨4, 9, [3, 2, 1, 0, 7, 8]⟩, ⟨4, 8, [3, 2, 9, 1, 0, 7]⟩, ⟨4, 0, [5, 6, 7, 8, 9, 2, 1]⟩, ⟨4, 0, [5, 6, 7, 8, 9, 2, 3, 1]⟩, ⟨4, 9, [5, 6, 7, 0, 1, 2, 3]⟩, ⟨4, 8, [5, 6, 7, 0, 1, 2, 3, 9]⟩, ⟨4, 8, [5, 6, 7, 0, 1, 2, 9]⟩, ⟨8, 9, [7, 0, 1, 2]⟩, ⟨8, 9, [7, 0, 1]⟩] + +private def k9t4p5_step_7_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨8, 6, [7, 0, 1, 9, 2, 3, 4, 5]⟩, ⟨8, 4, [7, 0, 1, 9, 3]⟩, ⟨8, 6, [7, 0, 1, 9, 3, 4, 5]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩, ⟨8, 4, [9, 1, 0, 7, 6, 5]⟩, ⟨8, 3, [9, 1, 0, 7, 6, 5, 4]⟩, ⟨8, 2, [9, 1, 0, 7, 6, 5, 4, 3]⟩, ⟨8, 4, [9, 2, 1, 0, 7, 6, 5]⟩, ⟨8, 3, [9, 2, 1, 0, 7, 6, 5, 4]⟩, ⟨8, 5, [9, 2, 3, 1, 0, 7, 6]⟩, ⟨8, 4, [9, 2, 3, 1, 0, 7, 6, 5]⟩] + +private def k9t4p5_step_7_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 1, [9, 2, 3, 4, 5, 6, 7, 0]⟩, ⟨8, 0, [9, 3, 4, 5, 6, 7]⟩, ⟨9, 0, [1, 2, 3, 4, 5, 6, 7]⟩, ⟨9, 0, [1, 3, 4, 5, 6, 7]⟩, ⟨9, 3, [1, 0, 7, 6, 5, 4]⟩, ⟨9, 4, [2, 1, 0, 7, 6, 5]⟩, ⟨9, 3, [2, 1, 0, 7, 6, 5, 4]⟩, ⟨9, 5, [2, 3, 1, 0, 7, 6]⟩, ⟨9, 4, [2, 3, 1, 0, 7, 6, 5]⟩, ⟨9, 0, [3, 4, 5, 6, 7]⟩, ⟨9, 0, [8, 7, 6, 5, 4, 3, 2, 1]⟩, ⟨9, 5, [8, 7, 0, 1, 2, 3, 4]⟩] + +private def k9t4p5_step_7_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨9, 6, [8, 7, 0, 1, 2, 3, 4, 5]⟩, ⟨9, 6, [8, 7, 0, 1, 3, 4, 5]⟩] + +private def k9t4p5_step_7_data : FreshAttachmentData 9 := ⟨6, 0, k9t4p5_step_7_required_block_0 ++ k9t4p5_step_7_required_block_1 ++ k9t4p5_step_7_required_block_2 ++ k9t4p5_step_7_required_block_3, ⟨none, {(8, 2), (4, 3), (9, 3), (0, 0)}⟩⟩ + +private def k9t4p5_step_7 : ClosureStep 9 := .fresh k9t4p5_step_7_data + +private def k9t4p5_step_8_data : EdgeAttachmentData 9 := ⟨6, 1, [⟨0, 1, [2, 3, 4, 5, 6]⟩, ⟨0, 1, [8, 2, 3, 4, 5, 6]⟩, ⟨0, 5, [8, 7, 6, 1, 2, 3, 4]⟩, ⟨3, 0, [4, 5, 6, 1]⟩, ⟨3, 7, [4, 5, 6, 1, 0, 2, 8]⟩, ⟨3, 7, [4, 5, 6, 1, 0, 8]⟩, ⟨7, 5, [6, 1, 0, 8, 2, 3, 4]⟩, ⟨7, 0, [6, 1, 8, 2]⟩, ⟨7, 3, [8, 0, 1, 6, 5, 4]⟩, ⟨7, 2, [8, 0, 1, 6, 5, 4, 3]⟩, ⟨7, 3, [8, 0, 2, 1, 6, 5, 4]⟩, ⟨7, 3, [8, 1, 6, 5, 4]⟩, ⟨7, 2, [8, 1, 6, 5, 4, 3]⟩], ⟨none, {(7, 3), (3, 3), (0, 3), (1, 0)}⟩⟩ + +private def k9t4p5_step_8 : ClosureStep 9 := .edge k9t4p5_step_8_data + +private def k9t4p5_step_9_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨4, 0, [3, 1, 2, 9, 8, 7]⟩, ⟨4, 9, [3, 1, 2, 0, 7, 8]⟩, ⟨4, 8, [3, 1, 9, 2, 0, 7]⟩, ⟨4, 0, [3, 1, 9, 8, 7]⟩, ⟨4, 9, [3, 2, 0, 7, 8]⟩, ⟨4, 0, [5, 6, 7, 8, 9, 1, 2]⟩, ⟨4, 0, [5, 6, 7, 8, 9, 1, 3, 2]⟩, ⟨4, 9, [5, 6, 7, 0, 2, 1, 3]⟩, ⟨4, 8, [5, 6, 7, 0, 2, 1, 3, 9]⟩, ⟨4, 8, [5, 6, 7, 0, 2, 1, 9]⟩, ⟨8, 4, [7, 0, 2, 1, 3]⟩, ⟨8, 6, [7, 0, 2, 1, 3, 4, 5]⟩] + +private def k9t4p5_step_9_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨8, 9, [7, 0, 2, 1]⟩, ⟨8, 6, [7, 0, 2, 1, 9, 3, 4, 5]⟩, ⟨8, 9, [7, 0, 2]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 4, [9, 1, 2, 0, 7, 6, 5]⟩, ⟨8, 3, [9, 1, 2, 0, 7, 6, 5, 4]⟩, ⟨8, 5, [9, 1, 3, 2, 0, 7, 6]⟩, ⟨8, 4, [9, 1, 3, 2, 0, 7, 6, 5]⟩, ⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩, ⟨8, 2, [9, 1, 3, 4, 5, 6, 7, 0]⟩, ⟨8, 4, [9, 2, 0, 7, 6, 5]⟩, ⟨8, 3, [9, 2, 0, 7, 6, 5, 4]⟩] + +private def k9t4p5_step_9_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 1, [9, 2, 0, 7, 6, 5, 4, 3]⟩, ⟨8, 0, [9, 3, 4, 5, 6, 7]⟩, ⟨9, 0, [1, 2, 3, 4, 5, 6, 7]⟩, ⟨9, 4, [1, 2, 0, 7, 6, 5]⟩, ⟨9, 3, [1, 2, 0, 7, 6, 5, 4]⟩, ⟨9, 5, [1, 3, 2, 0, 7, 6]⟩, ⟨9, 4, [1, 3, 2, 0, 7, 6, 5]⟩, ⟨9, 0, [1, 3, 4, 5, 6, 7]⟩, ⟨9, 3, [2, 0, 7, 6, 5, 4]⟩, ⟨9, 0, [3, 4, 5, 6, 7]⟩, ⟨9, 0, [8, 7, 6, 5, 4, 3, 1, 2]⟩, ⟨9, 5, [8, 7, 0, 2, 1, 3, 4]⟩] + +private def k9t4p5_step_9_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨9, 6, [8, 7, 0, 2, 1, 3, 4, 5]⟩, ⟨9, 6, [8, 7, 0, 2, 3, 4, 5]⟩] + +private def k9t4p5_step_9_data : FreshAttachmentData 9 := ⟨6, 1, k9t4p5_step_9_required_block_0 ++ k9t4p5_step_9_required_block_1 ++ k9t4p5_step_9_required_block_2 ++ k9t4p5_step_9_required_block_3, ⟨none, {(8, 2), (4, 3), (9, 3), (0, 0)}⟩⟩ + +private def k9t4p5_step_9 : ClosureStep 9 := .fresh k9t4p5_step_9_data + +private def k9t4p5_step_10_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [2, 9, 8, 7, 6, 5, 4, 3]⟩, ⟨1, 5, [2, 9, 8, 7, 0, 3, 4]⟩, ⟨1, 6, [2, 9, 8, 7, 0, 3, 4, 5]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6, 7]⟩, ⟨1, 0, [9, 3, 4, 5, 6, 7]⟩, ⟨1, 6, [9, 8, 7, 0, 3, 4, 5]⟩, ⟨8, 1, [7, 0, 3, 2]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 5, [9, 1, 2, 3, 0, 7, 6]⟩, ⟨8, 4, [9, 1, 2, 3, 0, 7, 6, 5]⟩, ⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩, ⟨8, 5, [9, 1, 3, 0, 7, 6]⟩] + +private def k9t4p5_step_10_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨8, 4, [9, 1, 3, 0, 7, 6, 5]⟩, ⟨8, 0, [9, 3, 4, 5, 6, 7]⟩, ⟨8, 4, [9, 3, 0, 7, 6, 5]⟩, ⟨0, 8, [3, 1, 2, 9]⟩, ⟨0, 5, [3, 1, 2, 9, 8, 7, 6]⟩, ⟨0, 4, [3, 1, 2, 9, 8, 7, 6, 5]⟩, ⟨0, 8, [3, 1, 9]⟩, ⟨0, 5, [3, 1, 9, 8, 7, 6]⟩, ⟨0, 4, [3, 1, 9, 8, 7, 6, 5]⟩, ⟨0, 1, [3, 2, 9]⟩, ⟨0, 8, [3, 4, 5, 6, 7]⟩, ⟨0, 1, [3, 4, 5, 6, 7, 8, 9]⟩] + +private def k9t4p5_step_10_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨0, 2, [3, 4, 5, 6, 7, 8, 9, 1]⟩, ⟨0, 2, [3, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 1, [3, 4, 5, 6, 7, 8, 9, 2]⟩, ⟨0, 1, [7, 6, 5, 4, 3]⟩, ⟨0, 9, [7, 6, 5, 4, 3, 1, 2]⟩, ⟨0, 8, [7, 6, 5, 4, 3, 1, 2, 9]⟩, ⟨0, 8, [7, 6, 5, 4, 3, 1, 9]⟩, ⟨0, 1, [7, 6, 5, 4, 3, 2]⟩, ⟨0, 8, [7, 6, 5, 4, 3, 9]⟩, ⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩, ⟨0, 6, [7, 8, 9, 1, 3, 4, 5]⟩, ⟨0, 1, [7, 8, 9, 2]⟩] + +private def k9t4p5_step_10_data : FreshAttachmentData 9 := ⟨6, 2, k9t4p5_step_10_required_block_0 ++ k9t4p5_step_10_required_block_1 ++ k9t4p5_step_10_required_block_2, ⟨none, {(0, 2), (8, 3), (1, 3), (5, 0)}⟩⟩ + +private def k9t4p5_step_10 : ClosureStep 9 := .fresh k9t4p5_step_10_data + +private def k9t4p5_step_11_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [2, 3, 9, 8, 7, 6, 5, 4]⟩, ⟨1, 6, [2, 3, 9, 8, 7, 0, 4, 5]⟩, ⟨1, 6, [2, 9, 8, 7, 0, 4, 5]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6, 7]⟩, ⟨1, 6, [9, 2, 3, 4, 0, 7]⟩, ⟨1, 5, [9, 2, 3, 4, 0, 7, 6]⟩, ⟨1, 0, [9, 3, 4, 5, 6, 7]⟩, ⟨1, 2, [9, 8, 7, 0, 4, 3]⟩, ⟨6, 0, [5, 4, 3, 1, 2, 9, 8, 7]⟩, ⟨6, 3, [5, 4, 0, 7, 8, 9, 1, 2]⟩, ⟨6, 2, [5, 4, 0, 7, 8, 9, 1, 3]⟩, ⟨6, 1, [5, 4, 0, 7, 8, 9, 2, 3]⟩] + +private def k9t4p5_step_11_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨8, 1, [7, 0, 4, 3]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 6, [9, 1, 2, 3, 4, 0, 7]⟩, ⟨8, 5, [9, 1, 2, 3, 4, 0, 7, 6]⟩, ⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩, ⟨8, 5, [9, 1, 3, 4, 0, 7, 6]⟩, ⟨8, 0, [9, 3, 4, 5, 6, 7]⟩, ⟨8, 5, [9, 3, 4, 0, 7, 6]⟩, ⟨0, 8, [4, 3, 1, 2, 9]⟩, ⟨0, 6, [4, 3, 1, 2, 9, 8, 7]⟩, ⟨0, 5, [4, 3, 1, 2, 9, 8, 7, 6]⟩, ⟨0, 8, [4, 3, 1, 9]⟩] + +private def k9t4p5_step_11_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨0, 6, [4, 3, 1, 9, 8, 7]⟩, ⟨0, 5, [4, 3, 1, 9, 8, 7, 6]⟩, ⟨0, 1, [4, 3, 2]⟩, ⟨0, 1, [4, 3, 2, 9]⟩, ⟨0, 8, [4, 3, 9]⟩, ⟨0, 6, [4, 3, 9, 8, 7]⟩, ⟨0, 1, [4, 5, 6, 7, 8, 9]⟩, ⟨0, 2, [4, 5, 6, 7, 8, 9, 1]⟩, ⟨0, 3, [4, 5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 3, [4, 5, 6, 7, 8, 9, 1]⟩, ⟨0, 2, [4, 5, 6, 7, 8, 9, 1, 3]⟩, ⟨0, 1, [4, 5, 6, 7, 8, 9, 2]⟩] + +private def k9t4p5_step_11_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 1, [4, 5, 6, 7, 8, 9, 2, 3]⟩, ⟨0, 1, [7, 6, 5, 4, 3]⟩, ⟨0, 9, [7, 6, 5, 4, 3, 1, 2]⟩, ⟨0, 8, [7, 6, 5, 4, 3, 1, 2, 9]⟩, ⟨0, 8, [7, 6, 5, 4, 3, 1, 9]⟩, ⟨0, 8, [7, 6, 5, 4, 3, 9]⟩, ⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩] + +private def k9t4p5_step_11_data : FreshAttachmentData 9 := ⟨6, 3, k9t4p5_step_11_required_block_0 ++ k9t4p5_step_11_required_block_1 ++ k9t4p5_step_11_required_block_2 ++ k9t4p5_step_11_required_block_3, ⟨none, {(0, 2), (8, 3), (1, 3), (6, 1)}⟩⟩ + +private def k9t4p5_step_11 : ClosureStep 9 := .fresh k9t4p5_step_11_data + +private def k9t4p5_step_12_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 6, [2, 3, 9, 8, 0, 5]⟩, ⟨1, 0, [2, 9, 8, 7, 6, 5]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6, 7, 8]⟩, ⟨1, 7, [9, 2, 3, 4, 5, 0, 8]⟩, ⟨1, 6, [9, 2, 3, 4, 5, 0, 8, 7]⟩, ⟨1, 0, [9, 3, 4, 5, 6, 7, 8]⟩, ⟨1, 6, [9, 3, 4, 5, 0, 8, 7]⟩, ⟨1, 2, [9, 8, 0, 5, 4, 3]⟩, ⟨4, 0, [3, 1, 2, 9, 8, 7, 6, 5]⟩, ⟨4, 6, [3, 1, 2, 9, 8, 0, 5]⟩, ⟨4, 7, [3, 1, 2, 9, 8, 0, 5, 6]⟩, ⟨4, 0, [3, 1, 9, 8, 7, 6, 5]⟩] + +private def k9t4p5_step_12_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨4, 7, [3, 1, 9, 8, 0, 5, 6]⟩, ⟨4, 0, [3, 9, 8, 7, 6, 5]⟩, ⟨4, 7, [3, 9, 8, 0, 5, 6]⟩, ⟨4, 1, [5, 0, 8, 9]⟩, ⟨6, 0, [7, 8, 9, 1, 2, 3, 4, 5]⟩, ⟨6, 9, [7, 8, 0, 5, 4, 3, 1, 2]⟩, ⟨6, 2, [7, 8, 0, 5, 4, 3, 1, 9]⟩, ⟨6, 1, [7, 8, 0, 5, 4, 3, 2, 9]⟩, ⟨0, 1, [5, 4, 3]⟩, ⟨0, 7, [5, 4, 3, 1, 2, 9, 8]⟩, ⟨0, 6, [5, 4, 3, 1, 2, 9, 8, 7]⟩, ⟨0, 6, [5, 4, 3, 1, 9, 8, 7]⟩] + +private def k9t4p5_step_12_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨0, 1, [5, 4, 3, 2]⟩, ⟨0, 1, [5, 4, 3, 2, 9]⟩, ⟨0, 6, [5, 4, 3, 9, 8, 7]⟩, ⟨0, 3, [5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩, ⟨0, 2, [5, 6, 7, 8, 9, 1, 3]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 3]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 2]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 2, 3]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 3]⟩, ⟨0, 9, [8, 7, 6, 5, 4, 3, 1, 2]⟩, ⟨0, 9, [8, 7, 6, 5, 4, 3, 1]⟩] + +private def k9t4p5_step_12_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 2, [8, 7, 6, 5, 4, 3, 1, 9]⟩, ⟨0, 1, [8, 7, 6, 5, 4, 3, 2, 9]⟩, ⟨0, 4, [8, 9, 1, 2, 3]⟩, ⟨0, 7, [8, 9, 1, 2, 3, 4, 5, 6]⟩, ⟨0, 4, [8, 9, 1, 3]⟩, ⟨0, 4, [8, 9, 3]⟩, ⟨0, 6, [8, 9, 3, 4, 5]⟩] + +private def k9t4p5_step_12_data : FreshAttachmentData 9 := ⟨7, 4, k9t4p5_step_12_required_block_0 ++ k9t4p5_step_12_required_block_1 ++ k9t4p5_step_12_required_block_2 ++ k9t4p5_step_12_required_block_3, ⟨none, {(0, 2), (4, 3), (1, 3), (6, 1)}⟩⟩ + +private def k9t4p5_step_12 : ClosureStep 9 := .fresh k9t4p5_step_12_data + +private def k9t4p5_step_13_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [2, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨1, 7, [2, 3, 4, 5, 0, 9, 8]⟩, ⟨1, 6, [2, 3, 4, 5, 0, 9, 8, 7]⟩, ⟨1, 0, [2, 3, 9, 8, 7, 6, 5]⟩, ⟨1, 0, [2, 9, 8, 7, 6, 5]⟩, ⟨1, 6, [3, 4, 5, 0, 9, 8, 7]⟩, ⟨4, 0, [3, 1, 2, 9, 8, 7, 6, 5]⟩, ⟨4, 7, [3, 1, 2, 9, 0, 5, 6]⟩, ⟨4, 8, [3, 1, 2, 9, 0, 5, 6, 7]⟩, ⟨4, 0, [3, 1, 9, 8, 7, 6, 5]⟩, ⟨4, 7, [3, 1, 9, 0, 5, 6]⟩, ⟨4, 8, [3, 1, 9, 0, 5, 6, 7]⟩] + +private def k9t4p5_step_13_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨4, 0, [3, 9, 8, 7, 6, 5]⟩, ⟨4, 8, [3, 9, 0, 5, 6, 7]⟩, ⟨4, 1, [5, 0, 9, 2]⟩, ⟨0, 6, [5, 4, 3, 1, 2, 9, 8, 7]⟩, ⟨0, 6, [5, 4, 3, 1, 9, 8, 7]⟩, ⟨0, 1, [5, 4, 3, 2]⟩, ⟨0, 1, [5, 4, 3, 2, 9]⟩, ⟨0, 3, [5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 3]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 2]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 3]⟩] + +private def k9t4p5_step_13_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨0, 4, [9, 1, 2, 3]⟩, ⟨0, 7, [9, 1, 2, 3, 4, 5, 6]⟩, ⟨0, 8, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 4, [9, 1, 3]⟩, ⟨0, 7, [9, 1, 3, 4, 5, 6]⟩, ⟨0, 8, [9, 1, 3, 4, 5, 6, 7]⟩, ⟨0, 1, [9, 2, 3]⟩, ⟨0, 4, [9, 8, 7, 6, 5]⟩, ⟨0, 1, [9, 8, 7, 6, 5, 4, 3]⟩, ⟨0, 2, [9, 8, 7, 6, 5, 4, 3, 1]⟩, ⟨0, 2, [9, 8, 7, 6, 5, 4, 3]⟩, ⟨0, 1, [9, 8, 7, 6, 5, 4, 3, 2]⟩] + +private def k9t4p5_step_13_data : FreshAttachmentData 9 := ⟨8, 4, k9t4p5_step_13_required_block_0 ++ k9t4p5_step_13_required_block_1 ++ k9t4p5_step_13_required_block_2, ⟨none, {(0, 2), (4, 3), (1, 3), (7, 0)}⟩⟩ + +private def k9t4p5_step_13 : ClosureStep 9 := .fresh k9t4p5_step_13_data + +private def k9t4p5_step_14_data : FreshAttachmentData 9 := ⟨4, 2, [⟨1, 0, [2, 9, 8, 7, 6, 5, 4, 3]⟩, ⟨1, 0, [2, 9, 8, 7, 6, 5]⟩, ⟨1, 4, [2, 9, 8, 7, 6, 5, 0, 3]⟩, ⟨1, 0, [9, 8, 7, 6, 5, 4, 3]⟩, ⟨4, 0, [3, 1, 2, 9, 8, 7, 6, 5]⟩, ⟨4, 0, [3, 1, 9, 8, 7, 6, 5]⟩, ⟨4, 0, [3, 9, 8, 7, 6, 5]⟩, ⟨4, 2, [3, 0, 5, 6, 7, 8, 9, 1]⟩, ⟨4, 1, [3, 0, 5, 6, 7, 8, 9, 2]⟩, ⟨4, 6, [5, 0, 3, 1, 2, 9, 8, 7]⟩, ⟨4, 7, [5, 0, 3, 1, 9, 8]⟩, ⟨4, 6, [5, 0, 3, 1, 9, 8, 7]⟩, ⟨4, 1, [5, 0, 3, 2]⟩, ⟨7, 0, [8, 9, 1, 2, 3, 4, 5]⟩, ⟨7, 0, [8, 9, 1, 2, 3]⟩, ⟨7, 0, [8, 9, 1, 3, 4, 5]⟩, ⟨7, 4, [8, 9, 1, 3, 0, 5]⟩], ⟨none, {(4, 2), (1, 2), (7, 3), (0, 0)}⟩⟩ + +private def k9t4p5_step_14 : ClosureStep 9 := .fresh k9t4p5_step_14_data + +private def k9t4p5_step_15_data : FreshAttachmentData 9 := ⟨5, 2, [⟨1, 0, [2, 9, 8, 7, 6, 5, 4, 3]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6]⟩, ⟨1, 0, [9, 2, 3]⟩, ⟨1, 0, [9, 3, 4, 5, 6]⟩, ⟨1, 0, [9, 8, 7, 6, 5, 4, 3]⟩, ⟨1, 0, [9, 8, 7, 6]⟩, ⟨1, 2, [9, 8, 7, 6, 0, 3]⟩, ⟨7, 0, [6, 5, 4, 3]⟩, ⟨7, 0, [8, 9, 1, 2, 3, 4, 5, 6]⟩, ⟨7, 0, [8, 9, 1, 2, 3]⟩, ⟨7, 5, [8, 9, 1, 2, 3, 0, 6]⟩, ⟨7, 4, [8, 9, 1, 2, 3, 0, 6, 5]⟩, ⟨7, 0, [8, 9, 1, 3, 4, 5, 6]⟩, ⟨7, 0, [8, 9, 3, 4, 5, 6]⟩, ⟨0, 5, [3, 1, 2, 9, 8, 7, 6]⟩, ⟨0, 4, [3, 1, 2, 9, 8, 7, 6, 5]⟩, ⟨0, 4, [3, 1, 9, 8, 7, 6, 5]⟩, ⟨0, 1, [3, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 2, [3, 4, 5, 6, 7, 8, 9, 1]⟩, ⟨0, 2, [3, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 1, [3, 4, 5, 6, 7, 8, 9, 2]⟩, ⟨0, 8, [6, 5, 4, 3, 1, 2, 9]⟩, ⟨0, 7, [6, 5, 4, 3, 1, 2, 9, 8]⟩, ⟨0, 8, [6, 5, 4, 3, 1, 9]⟩, ⟨0, 7, [6, 5, 4, 3, 1, 9, 8]⟩, ⟨0, 5, [6, 7, 8, 9, 1, 2, 3, 4]⟩], ⟨none, {(7, 2), (1, 3), (0, 2), (8, 0)}⟩⟩ + +private def k9t4p5_step_15 : ClosureStep 9 := .fresh k9t4p5_step_15_data + +private def k9t4p5_step_16_data : EdgeAttachmentData 9 := ⟨5, 3, [⟨0, 7, [2, 3, 5, 6]⟩, ⟨0, 1, [8, 7, 6, 5, 3, 2]⟩, ⟨4, 2, [3, 5, 6, 7, 8, 0, 1]⟩, ⟨4, 7, [5, 3, 2, 0, 1, 8]⟩, ⟨4, 6, [5, 3, 2, 0, 1, 8, 7]⟩, ⟨7, 4, [8, 0, 1, 2, 3, 5]⟩, ⟨7, 6, [8, 2, 3, 5]⟩], ⟨none, {(0, 3), (4, 3), (7, 3), (6, 1)}⟩⟩ + +private def k9t4p5_step_16 : ClosureStep 9 := .edge k9t4p5_step_16_data + +private def k9t4p5_step_17_data : FreshAttachmentData 9 := ⟨5, 3, [⟨1, 0, [2, 3, 9, 8, 7, 6, 5, 4]⟩, ⟨1, 0, [2, 9, 8, 7, 6, 5, 4]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6]⟩, ⟨1, 0, [9, 3, 4, 5, 6]⟩, ⟨5, 0, [4, 3, 1, 2, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 3, 1, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 3, 9, 8, 7, 6]⟩, ⟨5, 3, [4, 0, 6, 7, 8, 9, 1, 2]⟩, ⟨5, 3, [4, 0, 6, 7, 8, 9, 1]⟩, ⟨5, 7, [6, 0, 4, 3, 1, 2, 9, 8]⟩, ⟨5, 7, [6, 0, 4, 3, 1, 9, 8]⟩, ⟨7, 0, [8, 9, 1, 2, 3, 4, 5, 6]⟩, ⟨7, 0, [8, 9, 1, 2, 3, 4]⟩, ⟨7, 5, [8, 9, 1, 2, 3, 4, 0, 6]⟩, ⟨7, 0, [8, 9, 1, 3, 4, 5, 6]⟩, ⟨7, 5, [8, 9, 1, 3, 4, 0, 6]⟩], ⟨none, {(5, 2), (7, 2), (1, 3), (0, 0)}⟩⟩ + +private def k9t4p5_step_17 : ClosureStep 9 := .fresh k9t4p5_step_17_data + +private def k9t4p5_step_18_data : EdgeAttachmentData 9 := ⟨6, 2, [⟨0, 3, [8, 7, 6, 2]⟩, ⟨0, 5, [8, 7, 6, 2, 3, 4]⟩, ⟨3, 7, [4, 5, 6, 2, 0, 1, 8]⟩, ⟨3, 7, [4, 5, 6, 2, 0, 8]⟩, ⟨7, 0, [6, 2, 1, 8]⟩, ⟨7, 4, [8, 0, 1, 2, 6, 5]⟩, ⟨7, 3, [8, 0, 1, 2, 6, 5, 4]⟩, ⟨7, 3, [8, 0, 2, 6, 5, 4]⟩, ⟨7, 3, [8, 2, 6, 5, 4]⟩], ⟨none, {(7, 3), (0, 3), (3, 3), (4, 0)}⟩⟩ + +private def k9t4p5_step_18 : ClosureStep 9 := .edge k9t4p5_step_18_data + +private def k9t4p5_step_19_data : EdgeAttachmentData 9 := ⟨6, 3, [⟨0, 8, [1, 2, 3, 6, 7]⟩, ⟨0, 5, [1, 8, 7, 6, 3, 4]⟩, ⟨0, 8, [2, 3, 6, 7]⟩, ⟨0, 7, [8, 2, 3, 6]⟩, ⟨4, 8, [5, 6, 3, 2, 0, 1]⟩, ⟨4, 8, [5, 6, 3, 2, 0]⟩, ⟨4, 7, [5, 6, 3, 2, 0, 8]⟩, ⟨7, 8, [6, 3, 2, 0]⟩, ⟨7, 4, [8, 0, 2, 3, 6, 5]⟩], ⟨none, {(0, 3), (4, 3), (7, 3), (8, 1)}⟩⟩ + +private def k9t4p5_step_19 : ClosureStep 9 := .edge k9t4p5_step_19_data + +private def k9t4p5_step_20_data : FreshAttachmentData 9 := ⟨7, 2, [⟨1, 0, [3, 4, 5, 6, 7, 8]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6, 7, 8]⟩, ⟨1, 4, [9, 2, 3, 0, 8, 7, 6, 5]⟩, ⟨1, 0, [9, 3, 4, 5, 6, 7, 8]⟩, ⟨2, 4, [1, 9, 3, 0, 8, 7, 6, 5]⟩, ⟨4, 9, [5, 6, 7, 8, 0, 3, 1]⟩, ⟨5, 0, [4, 3, 1, 2, 9, 8]⟩, ⟨5, 0, [4, 3, 1, 9, 8]⟩, ⟨5, 0, [4, 3, 9, 8]⟩, ⟨5, 0, [6, 7, 8, 9, 1, 2, 3]⟩, ⟨5, 9, [6, 7, 8, 0, 3, 1]⟩, ⟨5, 9, [6, 7, 8, 0, 3]⟩, ⟨9, 0, [1, 2, 3, 4, 5, 6, 7, 8]⟩, ⟨9, 4, [1, 2, 3, 0, 8, 7, 6, 5]⟩, ⟨0, 4, [3, 1, 2, 9, 8, 7, 6, 5]⟩, ⟨0, 4, [3, 1, 9, 8, 7, 6, 5]⟩, ⟨0, 9, [3, 4, 5, 6, 7, 8]⟩, ⟨0, 2, [3, 4, 5, 6, 7, 8, 9, 1]⟩, ⟨0, 2, [3, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 1, [3, 4, 5, 6, 7, 8, 9, 2]⟩, ⟨0, 9, [8, 7, 6, 5, 4, 3, 1, 2]⟩, ⟨0, 9, [8, 7, 6, 5, 4, 3, 1]⟩, ⟨0, 7, [8, 9, 1, 2, 3, 4, 5, 6]⟩], ⟨none, {(5, 3), (1, 1), (0, 1), (2, 0), (4, 0), (9, 1)}⟩⟩ + +private def k9t4p5_step_20 : ClosureStep 9 := .fresh k9t4p5_step_20_data + +private def k9t4p5_step_21_data : EdgeAttachmentData 9 := ⟨7, 4, [⟨0, 3, [1, 8, 7, 4]⟩, ⟨0, 2, [1, 8, 7, 4, 3]⟩, ⟨0, 5, [8, 2, 3, 4, 7, 6]⟩, ⟨0, 2, [8, 7, 4, 3]⟩, ⟨3, 6, [2, 0, 8, 7, 4, 5]⟩, ⟨3, 2, [4, 7, 8, 0]⟩, ⟨6, 2, [5, 4, 7, 8, 0, 1]⟩, ⟨6, 2, [5, 4, 7, 8, 0]⟩, ⟨6, 3, [5, 4, 7, 8, 0, 2]⟩], ⟨none, {(0, 3), (6, 3), (3, 3), (2, 1)}⟩⟩ + +private def k9t4p5_step_21 : ClosureStep 9 := .edge k9t4p5_step_21_data + +private def k9t4p5_step_22_data : EdgeAttachmentData 9 := ⟨7, 5, [⟨0, 3, [8, 7, 5, 4]⟩, ⟨0, 1, [8, 7, 5, 4, 3, 2]⟩, ⟨3, 6, [2, 0, 1, 8, 7, 5]⟩, ⟨3, 4, [2, 8, 7, 5]⟩, ⟨6, 3, [5, 7, 8, 0, 1, 2]⟩, ⟨6, 4, [5, 7, 8, 0, 1, 2, 3]⟩, ⟨6, 8, [7, 5, 4, 3, 2, 0, 1]⟩], ⟨none, {(0, 3), (6, 3), (3, 3), (4, 1)}⟩⟩ + +private def k9t4p5_step_22 : ClosureStep 9 := .edge k9t4p5_step_22_data + +private def k9t4p5_step_23_data : FreshAttachmentData 9 := ⟨7, 5, [⟨1, 0, [9, 2, 3, 4, 5, 6, 7, 8]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6]⟩, ⟨1, 0, [9, 3, 4, 5, 6, 7, 8]⟩, ⟨1, 0, [9, 3, 4, 5, 6]⟩, ⟨5, 0, [4, 3, 1, 2, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 3, 1, 2, 9, 8]⟩, ⟨5, 7, [4, 3, 1, 2, 9, 8, 0, 6]⟩, ⟨5, 0, [4, 3, 1, 9, 8, 7, 6]⟩, ⟨5, 7, [4, 3, 1, 9, 8, 0, 6]⟩, ⟨7, 0, [6, 5, 4, 3, 1, 2, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 3, 1, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 3, 9, 8]⟩, ⟨7, 5, [6, 0, 8, 9, 1, 2, 3, 4]⟩, ⟨7, 5, [6, 0, 8, 9, 1, 3, 4]⟩, ⟨7, 9, [8, 0, 6, 5, 4, 3, 1, 2]⟩, ⟨7, 9, [8, 0, 6, 5, 4, 3, 1]⟩], ⟨none, {(7, 2), (5, 2), (1, 3), (0, 0)}⟩⟩ + +private def k9t4p5_step_23 : ClosureStep 9 := .fresh k9t4p5_step_23_data + +private def k9t4p5_step_24_data : FreshAttachmentData 9 := ⟨8, 3, [⟨1, 0, [2, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨1, 8, [2, 3, 9, 0, 4, 5, 6, 7]⟩, ⟨1, 0, [2, 9, 8, 7, 6, 5, 4]⟩, ⟨1, 0, [9, 8, 7, 6, 5, 4]⟩, ⟨2, 8, [1, 3, 9, 0, 4, 5, 6, 7]⟩, ⟨3, 0, [1, 2, 9, 8, 7, 6, 5, 4]⟩, ⟨3, 8, [1, 2, 9, 0, 4, 5, 6, 7]⟩, ⟨7, 0, [6, 5, 4, 3, 1, 2, 9]⟩, ⟨7, 0, [6, 5, 4, 3, 1, 9]⟩, ⟨7, 0, [6, 5, 4, 3, 9]⟩, ⟨7, 3, [6, 5, 4, 0, 9, 1]⟩, ⟨7, 3, [6, 5, 4, 0, 9]⟩, ⟨7, 0, [8, 9, 3, 4]⟩, ⟨8, 3, [7, 6, 5, 4, 0, 9, 1]⟩, ⟨0, 5, [4, 3, 1, 2, 9, 8, 7, 6]⟩, ⟨0, 3, [4, 5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 3, [4, 5, 6, 7, 8, 9, 1]⟩, ⟨0, 8, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 8, [9, 1, 3, 4, 5, 6, 7]⟩, ⟨0, 3, [9, 8, 7, 6, 5, 4]⟩, ⟨0, 2, [9, 8, 7, 6, 5, 4, 3, 1]⟩, ⟨0, 2, [9, 8, 7, 6, 5, 4, 3]⟩, ⟨0, 1, [9, 8, 7, 6, 5, 4, 3, 2]⟩], ⟨none, {(7, 3), (1, 1), (0, 1), (2, 0), (8, 0), (3, 1)}⟩⟩ + +private def k9t4p5_step_24 : ClosureStep 9 := .fresh k9t4p5_step_24_data + +private def k9t4p5_step_25_data : EdgeAttachmentData 9 := ⟨8, 4, [⟨0, 5, [2, 3, 4, 8, 7, 6]⟩, ⟨3, 6, [2, 0, 1, 8, 4, 5]⟩, ⟨3, 7, [2, 0, 1, 8, 4, 5, 6]⟩, ⟨3, 7, [2, 0, 8, 4, 5, 6]⟩, ⟨3, 7, [2, 8, 4, 5, 6]⟩, ⟨3, 0, [4, 8, 1, 2]⟩, ⟨6, 3, [5, 4, 8, 0, 1, 2]⟩], ⟨none, {(3, 3), (0, 3), (6, 3), (7, 0)}⟩⟩ + +private def k9t4p5_step_25 : ClosureStep 9 := .edge k9t4p5_step_25_data + +private def k9t4p5_step_26_data : FreshAttachmentData 9 := ⟨8, 5, [⟨1, 0, [2, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨1, 0, [2, 3, 9]⟩, ⟨1, 0, [3, 4, 5, 6, 7, 8, 9]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6]⟩, ⟨1, 0, [9, 3, 4, 5, 6]⟩, ⟨1, 0, [9, 8, 7, 6]⟩, ⟨1, 2, [9, 0, 6, 5, 4, 3]⟩, ⟨5, 0, [4, 3, 1, 2, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 3, 1, 2, 9]⟩, ⟨5, 7, [4, 3, 1, 2, 9, 0, 6]⟩, ⟨5, 8, [4, 3, 1, 2, 9, 0, 6, 7]⟩, ⟨5, 0, [4, 3, 1, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 3, 1, 9]⟩, ⟨5, 0, [4, 3, 9, 8, 7, 6]⟩, ⟨0, 7, [6, 5, 4, 3, 1, 2, 9, 8]⟩, ⟨0, 4, [6, 7, 8, 9, 1, 2, 3]⟩, ⟨0, 5, [6, 7, 8, 9, 1, 2, 3, 4]⟩, ⟨0, 4, [6, 7, 8, 9, 1, 3]⟩, ⟨0, 5, [6, 7, 8, 9, 1, 3, 4]⟩, ⟨0, 7, [9, 1, 2, 3, 4, 5, 6]⟩, ⟨0, 8, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 8, [9, 1, 3, 4, 5, 6, 7]⟩, ⟨0, 1, [9, 8, 7, 6, 5, 4, 3]⟩, ⟨0, 2, [9, 8, 7, 6, 5, 4, 3, 1]⟩, ⟨0, 2, [9, 8, 7, 6, 5, 4, 3]⟩, ⟨0, 1, [9, 8, 7, 6, 5, 4, 3, 2]⟩], ⟨none, {(5, 2), (1, 3), (0, 2), (4, 0)}⟩⟩ + +private def k9t4p5_step_26 : ClosureStep 9 := .fresh k9t4p5_step_26_data + +private def k9t4p5_step_27_data : FreshAttachmentData 9 := ⟨8, 6, [⟨1, 0, [2, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨1, 8, [2, 3, 4, 5, 6, 7, 0, 9]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6, 7]⟩, ⟨1, 0, [9, 3, 4, 5, 6, 7]⟩, ⟨5, 0, [4, 3, 1, 2, 9, 8, 7]⟩, ⟨5, 0, [4, 3, 1, 2, 9]⟩, ⟨5, 0, [4, 3, 1, 9, 8, 7]⟩, ⟨5, 8, [4, 3, 1, 9, 0, 7]⟩, ⟨8, 6, [7, 0, 9, 1, 2, 3, 4, 5]⟩, ⟨8, 5, [7, 0, 9, 1, 3, 4]⟩, ⟨8, 6, [7, 0, 9, 1, 3, 4, 5]⟩, ⟨8, 1, [7, 0, 9, 2]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 3, 4, 5, 6, 7]⟩, ⟨8, 2, [9, 0, 7, 6, 5, 4, 3, 1]⟩, ⟨8, 1, [9, 0, 7, 6, 5, 4, 3, 2]⟩], ⟨none, {(8, 2), (1, 2), (5, 3), (0, 0)}⟩⟩ + +private def k9t4p5_step_27 : ClosureStep 9 := .fresh k9t4p5_step_27_data + +private def k9t4p5_step_28_data : EdgeAttachmentData 9 := ⟨5, 0, [⟨1, 2, [0, 5, 4, 3]⟩, ⟨1, 2, [0, 5, 6, 7, 8]⟩, ⟨3, 8, [2, 1, 0, 5, 6, 7]⟩, ⟨3, 6, [4, 5, 0, 1, 8, 7]⟩, ⟨3, 1, [4, 5, 0, 8]⟩, ⟨3, 2, [4, 5, 0, 8]⟩, ⟨4, 3, [5, 0, 2]⟩, ⟨4, 3, [5, 0, 8, 2]⟩], ⟨none, {(4, 2), (3, 3), (1, 3), (2, 1)}⟩⟩ + +private def k9t4p5_step_28 : ClosureStep 9 := .edge k9t4p5_step_28_data + +private def k9t4p5_step_29_data : EdgeAttachmentData 9 := ⟨5, 2, [⟨0, 8, [1, 2, 5, 6, 7]⟩, ⟨0, 8, [2, 5, 6, 7]⟩, ⟨6, 7, [5, 2, 0, 8]⟩, ⟨6, 7, [5, 2, 8]⟩, ⟨7, 8, [6, 5, 2, 0]⟩, ⟨7, 0, [6, 5, 2, 1]⟩], ⟨none, {(6, 2), (7, 3), (0, 3), (8, 1)}⟩⟩ + +private def k9t4p5_step_29 : ClosureStep 9 := .edge k9t4p5_step_29_data + +private def k9t4p5_step_30_data : EdgeAttachmentData 9 := ⟨6, 4, [⟨0, 5, [8, 1, 2, 3, 4, 6]⟩, ⟨0, 3, [8, 7, 6, 4]⟩, ⟨0, 2, [8, 7, 6, 4, 3]⟩, ⟨0, 1, [8, 7, 6, 4, 3, 2]⟩, ⟨5, 2, [4, 6, 7, 8, 0, 1]⟩], ⟨none, {(0, 3), (5, 2), (4, 1), (3, 2), (2, 0)}⟩⟩ + +private def k9t4p5_step_30 : ClosureStep 9 := .edge k9t4p5_step_30_data + +private def k9t4p5_step_31_data : EdgeAttachmentData 9 := ⟨7, 2, [⟨0, 5, [1, 8, 7, 2, 3, 4]⟩, ⟨3, 0, [2, 7, 8, 1]⟩, ⟨4, 5, [3, 2, 7, 6]⟩, ⟨4, 3, [5, 6, 7, 2]⟩, ⟨5, 0, [4, 3, 2, 7, 8, 1]⟩], ⟨none, {(4, 2), (5, 2), (3, 2), (0, 3)}⟩⟩ + +private def k9t4p5_step_31 : ClosureStep 9 := .edge k9t4p5_step_31_data + +private def k9t4p5_step_32_data : EdgeAttachmentData 9 := ⟨8, 3, [⟨0, 5, [1, 2, 3, 8, 7, 6]⟩, ⟨5, 0, [6, 7, 8, 3, 2, 1]⟩, ⟨6, 7, [5, 4, 3, 8]⟩, ⟨6, 5, [7, 8, 3, 4]⟩, ⟨7, 0, [8, 3, 2, 1]⟩], ⟨none, {(6, 2), (5, 2), (7, 2), (0, 3)}⟩⟩ + +private def k9t4p5_step_32 : ClosureStep 9 := .edge k9t4p5_step_32_data + +def k9t4p5 : LayoutCertificate 9 where + chains := [[0], [1], [2, 3, 4, 5, 6, 7, 8]] + clique := {0, 1, 2, 8} + templates := [⟨0, 1, [[2, 3, 4, 5, 6, 7, 8]], [], [], 1, 1⟩, + ⟨0, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩, + ⟨0, 3, [], [], [2], 5, 7⟩, + ⟨0, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩, + ⟨0, 4, [], [], [3, 2], 4, 6⟩, + ⟨0, 4, [], [], [5, 6, 7, 8], 2, 4⟩, + ⟨0, 5, [], [], [4, 3, 2], 3, 5⟩, + ⟨0, 6, [], [], [5, 4, 3, 2], 2, 4⟩, + ⟨0, 6, [], [], [7, 8], 4, 6⟩, + ⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩, + ⟨0, 7, [], [], [8], 5, 7⟩, + ⟨0, 8, [], [], [7, 6, 5, 4, 3, 2], 1, 2⟩, + ⟨1, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩, + ⟨1, 3, [], [], [2], 5, 7⟩, + ⟨1, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩, + ⟨1, 4, [], [], [3, 2], 4, 6⟩, + ⟨1, 4, [], [], [5, 6, 7, 8], 2, 4⟩, + ⟨1, 6, [], [], [5, 4, 3, 2], 2, 4⟩, + ⟨1, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩, + ⟨1, 7, [], [], [8], 5, 7⟩, + ⟨1, 8, [], [], [7, 6, 5, 4, 3, 2], 1, 2⟩, + ⟨2, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩, + ⟨2, 4, [], [], [5, 6, 7, 8], 2, 4⟩, + ⟨2, 6, [], [], [7, 8], 4, 6⟩, + ⟨2, 7, [], [], [8], 5, 7⟩, + ⟨3, 4, [], [2], [5, 6, 7, 8], 1, 3⟩, + ⟨3, 5, [], [2], [6, 7, 8], 2, 4⟩, + ⟨3, 6, [], [2], [7, 8], 3, 5⟩, + ⟨3, 7, [], [2], [8], 4, 6⟩, + ⟨3, 8, [], [2], [], 5, 7⟩, + ⟨4, 5, [], [2, 3], [6, 7, 8], 1, 3⟩, + ⟨4, 6, [], [2, 3], [7, 8], 2, 4⟩, + ⟨4, 7, [], [2, 3], [8], 3, 5⟩, + ⟨4, 8, [], [2, 3], [], 4, 6⟩, + ⟨5, 6, [], [2, 3, 4], [7, 8], 1, 3⟩, + ⟨5, 7, [], [2, 3, 4], [8], 2, 4⟩, + ⟨6, 7, [], [2, 3, 4, 5], [8], 1, 3⟩, + ⟨6, 8, [], [2, 3, 4, 5], [], 2, 4⟩, + ⟨7, 8, [], [2, 3, 4, 5, 6], [], 1, 3⟩] + required := [⟨2, 7, [3, 4, 5, 6]⟩, + ⟨3, 6, [4, 5]⟩, + ⟨3, 8, [4, 5, 6, 7]⟩, + ⟨4, 7, [5, 6]⟩] + closure := [k9t4p5_step_0, k9t4p5_step_1, k9t4p5_step_2, k9t4p5_step_3, k9t4p5_step_4, k9t4p5_step_5, k9t4p5_step_6, k9t4p5_step_7, k9t4p5_step_8, k9t4p5_step_9, k9t4p5_step_10, k9t4p5_step_11, k9t4p5_step_12, k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] + bad := ⟨none, {(4, 2), (3, 1), (0, 1), (2, 1), (1, 0)}⟩ + + +private def k9t4p5_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 2 6, {3, 4, 5}, Finset.Icc 2 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 2 6, ∅, {2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 2 6, Finset.Icc 2 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{3, 4, 5}, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 2 6, {2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_initial_eq_row_0 : ∀ j : Fin 9, (k9t4p5.initialMatrix 9) 0 j = k9t4p5_state_0 0 j := by decide + +private theorem k9t4p5_initial_eq_row_1 : ∀ j : Fin 9, (k9t4p5.initialMatrix 9) 1 j = k9t4p5_state_0 1 j := by decide + +private theorem k9t4p5_initial_eq_row_2 : ∀ j : Fin 9, (k9t4p5.initialMatrix 9) 2 j = k9t4p5_state_0 2 j := by decide + +private theorem k9t4p5_initial_eq_row_3 : ∀ j : Fin 9, (k9t4p5.initialMatrix 9) 3 j = k9t4p5_state_0 3 j := by decide + +private theorem k9t4p5_initial_eq_row_4 : ∀ j : Fin 9, (k9t4p5.initialMatrix 9) 4 j = k9t4p5_state_0 4 j := by decide + +private theorem k9t4p5_initial_eq_row_5 : ∀ j : Fin 9, (k9t4p5.initialMatrix 9) 5 j = k9t4p5_state_0 5 j := by decide + +private theorem k9t4p5_initial_eq_row_6 : ∀ j : Fin 9, (k9t4p5.initialMatrix 9) 6 j = k9t4p5_state_0 6 j := by decide + +private theorem k9t4p5_initial_eq_row_7 : ∀ j : Fin 9, (k9t4p5.initialMatrix 9) 7 j = k9t4p5_state_0 7 j := by decide + +private theorem k9t4p5_initial_eq_row_8 : ∀ j : Fin 9, (k9t4p5.initialMatrix 9) 8 j = k9t4p5_state_0 8 j := by decide + +private theorem k9t4p5_initial_eq : (k9t4p5.initialMatrix 9) = k9t4p5_state_0 := by + funext i j + fin_cases i + + · exact k9t4p5_initial_eq_row_0 j + + · exact k9t4p5_initial_eq_row_1 j + + · exact k9t4p5_initial_eq_row_2 j + + · exact k9t4p5_initial_eq_row_3 j + + · exact k9t4p5_initial_eq_row_4 j + + · exact k9t4p5_initial_eq_row_5 j + + · exact k9t4p5_initial_eq_row_6 j + + · exact k9t4p5_initial_eq_row_7 j + + · exact k9t4p5_initial_eq_row_8 j + +private def k9t4p5_state_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, {0, 2, 3, 4, 5, 6}, {3, 4, 5}, Finset.Icc 2 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 2 6, ∅, {2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}, Finset.Icc 4 7], + #[{0, 2, 3, 4, 5, 6}, Finset.Icc 2 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{3, 4, 5}, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 2 6, {2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 3}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 2 6, {3, 4, 5}, Finset.Icc 2 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2, 3}, ∅, {1, 2}, Finset.Icc 1 7, Finset.Icc 2 6, {1}, {2, 3, 4}, Finset.Icc 1 7, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, Finset.Icc 1 7, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[Finset.Icc 2 6, Finset.Icc 2 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{3, 4, 5}, {1}, ∅, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 2 6, {2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 1 6, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 4, 5, 6, 7}, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_0_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p5_state_0 a b ∪ requiredMatrix 9 k9t4p5_step_0_data.required a b) 0 j = k9t4p5_local_0 0 j := by decide + +private theorem k9t4p5_local_0_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p5_state_0 a b ∪ requiredMatrix 9 k9t4p5_step_0_data.required a b) 1 j = k9t4p5_local_0 1 j := by decide + +private theorem k9t4p5_local_0_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p5_state_0 a b ∪ requiredMatrix 9 k9t4p5_step_0_data.required a b) 2 j = k9t4p5_local_0 2 j := by decide + +private theorem k9t4p5_local_0_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p5_state_0 a b ∪ requiredMatrix 9 k9t4p5_step_0_data.required a b) 3 j = k9t4p5_local_0 3 j := by decide + +private theorem k9t4p5_local_0_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p5_state_0 a b ∪ requiredMatrix 9 k9t4p5_step_0_data.required a b) 4 j = k9t4p5_local_0 4 j := by decide + +private theorem k9t4p5_local_0_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p5_state_0 a b ∪ requiredMatrix 9 k9t4p5_step_0_data.required a b) 5 j = k9t4p5_local_0 5 j := by decide + +private theorem k9t4p5_local_0_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p5_state_0 a b ∪ requiredMatrix 9 k9t4p5_step_0_data.required a b) 6 j = k9t4p5_local_0 6 j := by decide + +private theorem k9t4p5_local_0_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p5_state_0 a b ∪ requiredMatrix 9 k9t4p5_step_0_data.required a b) 7 j = k9t4p5_local_0 7 j := by decide + +private theorem k9t4p5_local_0_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p5_state_0 a b ∪ requiredMatrix 9 k9t4p5_step_0_data.required a b) 8 j = k9t4p5_local_0 8 j := by decide + +private theorem k9t4p5_local_0_eq : (fun a b => k9t4p5_state_0 a b ∪ requiredMatrix 9 k9t4p5_step_0_data.required a b) = k9t4p5_local_0 := by + funext i j + fin_cases i + + · exact k9t4p5_local_0_eq_row_0 j + + · exact k9t4p5_local_0_eq_row_1 j + + · exact k9t4p5_local_0_eq_row_2 j + + · exact k9t4p5_local_0_eq_row_3 j + + · exact k9t4p5_local_0_eq_row_4 j + + · exact k9t4p5_local_0_eq_row_5 j + + · exact k9t4p5_local_0_eq_row_6 j + + · exact k9t4p5_local_0_eq_row_7 j + + · exact k9t4p5_local_0_eq_row_8 j + +private theorem k9t4p5_local_0_paths : ∀ p ∈ k9t4p5_step_0_data.required, p.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_0_data.i k9t4p5_step_0_data.j) 9 := by decide + +private theorem k9t4p5_local_0_bad : k9t4p5_step_0_data.bad.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_0_data.i k9t4p5_step_0_data.j) k9t4p5_local_0 9 4 := by decide + +private theorem k9t4p5_step_0_check : k9t4p5_step_0.Check k9t4p5.graph k9t4p5_state_0 9 4 := by + change k9t4p5_step_0_data.Check k9t4p5.graph k9t4p5_state_0 9 4 + refine ⟨k9t4p5_local_0_paths, ?_⟩ + rw [k9t4p5_local_0_eq] + exact k9t4p5_local_0_bad + +private theorem k9t4p5_update_0 : k9t4p5_step_0.apply k9t4p5_state_0 = k9t4p5_state_1 := by + have h : ∀ i j : Fin 9, k9t4p5_step_0.apply k9t4p5_state_0 i j = k9t4p5_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {3, 4, 5}, Finset.Icc 2 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 2 6, ∅, {2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 2 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{3, 4, 5}, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 2 6, {2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, Finset.Icc 0 3, {0, 1, 2}, ∅, ∅, ∅, Finset.Icc 0 3, ∅], + #[∅, ∅, {1}, {1, 2}, {0, 1, 2, 3, 5, 6, 7}, {0, 2, 3, 4, 5, 6}, {3, 4, 5}, Finset.Icc 2 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1}, ∅, {1, 2}, {0, 1, 2, 3, 5, 6, 7}, Finset.Icc 2 6, ∅, {2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[Finset.Icc 0 3, {1, 2}, {1, 2}, ∅, Finset.Icc 1 5, {2, 3, 4}, {0, 1}, {1, 2, 4, 5, 6}, Finset.Icc 1 7, {1, 2}], + #[{0, 1, 2}, {0, 1, 2, 3, 5, 6, 7}, {0, 1, 2, 3, 5, 6, 7}, Finset.Icc 1 5, ∅, {1, 2, 3}, Finset.Icc 0 4, {1, 3, 4, 5, 6}, Finset.Icc 0 6, {0, 1, 4, 5, 6, 7}], + #[∅, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[∅, {3, 4, 5}, ∅, {0, 1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[∅, Finset.Icc 2 6, {2, 3, 4}, {1, 2, 4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 0 3, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2}, {1, 2}, {1, 2}, {0, 1, 4, 5, 6, 7}, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_1_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅, {0, 1}, {1, 2}, {1, 2}, {1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_1_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_0) 0 j = k9t4p5_local_1_required_0 0 j := by decide + +private theorem k9t4p5_local_1_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_0) 1 j = k9t4p5_local_1_required_0 1 j := by decide + +private theorem k9t4p5_local_1_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_0) 2 j = k9t4p5_local_1_required_0 2 j := by decide + +private theorem k9t4p5_local_1_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_0) 3 j = k9t4p5_local_1_required_0 3 j := by decide + +private theorem k9t4p5_local_1_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_0) 4 j = k9t4p5_local_1_required_0 4 j := by decide + +private theorem k9t4p5_local_1_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_0) 5 j = k9t4p5_local_1_required_0 5 j := by decide + +private theorem k9t4p5_local_1_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_0) 6 j = k9t4p5_local_1_required_0 6 j := by decide + +private theorem k9t4p5_local_1_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_0) 7 j = k9t4p5_local_1_required_0 7 j := by decide + +private theorem k9t4p5_local_1_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_0) 8 j = k9t4p5_local_1_required_0 8 j := by decide + +private theorem k9t4p5_local_1_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_0) 9 j = k9t4p5_local_1_required_0 9 j := by decide + +private theorem k9t4p5_local_1_required_0_eq : (requiredMatrix 9 k9t4p5_step_1_required_block_0) = k9t4p5_local_1_required_0 := by + funext i j + fin_cases i + + · exact k9t4p5_local_1_required_0_eq_row_0 j + + · exact k9t4p5_local_1_required_0_eq_row_1 j + + · exact k9t4p5_local_1_required_0_eq_row_2 j + + · exact k9t4p5_local_1_required_0_eq_row_3 j + + · exact k9t4p5_local_1_required_0_eq_row_4 j + + · exact k9t4p5_local_1_required_0_eq_row_5 j + + · exact k9t4p5_local_1_required_0_eq_row_6 j + + · exact k9t4p5_local_1_required_0_eq_row_7 j + + · exact k9t4p5_local_1_required_0_eq_row_8 j + + · exact k9t4p5_local_1_required_0_eq_row_9 j + +private theorem k9t4p5_local_1_path_0_0 : (⟨3, 0, [1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_0_1 : (⟨3, 0, [1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_0_2 : (⟨3, 9, [1, 0, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_0_3 : (⟨3, 8, [2, 1, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_0_4 : (⟨3, 9, [2, 1, 0, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_0_5 : (⟨3, 7, [2, 9, 1, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_0_6 : (⟨3, 8, [2, 9, 1, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_0_7 : (⟨3, 0, [4, 5, 6, 7, 8, 9, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_0_8 : (⟨3, 7, [4, 5, 0, 1, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_0_9 : (⟨3, 6, [4, 5, 0, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_0_10 : (⟨3, 6, [4, 5, 0, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_0_11 : (⟨3, 0, [9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_paths_block_0 : ∀ p ∈ k9t4p5_step_1_required_block_0, p.Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by + simp only [k9t4p5_step_1_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_1_path_0_0, k9t4p5_local_1_path_0_1, k9t4p5_local_1_path_0_2, k9t4p5_local_1_path_0_3, k9t4p5_local_1_path_0_4, k9t4p5_local_1_path_0_5, k9t4p5_local_1_path_0_6, k9t4p5_local_1_path_0_7, k9t4p5_local_1_path_0_8, k9t4p5_local_1_path_0_9, k9t4p5_local_1_path_0_10, k9t4p5_local_1_path_0_11⟩ + +private def k9t4p5_local_1_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, {0}, {0}, ∅, ∅, ∅, {0}, {1}, {0, 1, 2}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_1_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_1) 0 j = k9t4p5_local_1_required_1 0 j := by decide + +private theorem k9t4p5_local_1_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_1) 1 j = k9t4p5_local_1_required_1 1 j := by decide + +private theorem k9t4p5_local_1_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_1) 2 j = k9t4p5_local_1_required_1 2 j := by decide + +private theorem k9t4p5_local_1_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_1) 3 j = k9t4p5_local_1_required_1 3 j := by decide + +private theorem k9t4p5_local_1_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_1) 4 j = k9t4p5_local_1_required_1 4 j := by decide + +private theorem k9t4p5_local_1_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_1) 5 j = k9t4p5_local_1_required_1 5 j := by decide + +private theorem k9t4p5_local_1_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_1) 6 j = k9t4p5_local_1_required_1 6 j := by decide + +private theorem k9t4p5_local_1_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_1) 7 j = k9t4p5_local_1_required_1 7 j := by decide + +private theorem k9t4p5_local_1_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_1) 8 j = k9t4p5_local_1_required_1 8 j := by decide + +private theorem k9t4p5_local_1_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_1) 9 j = k9t4p5_local_1_required_1 9 j := by decide + +private theorem k9t4p5_local_1_required_1_eq : (requiredMatrix 9 k9t4p5_step_1_required_block_1) = k9t4p5_local_1_required_1 := by + funext i j + fin_cases i + + · exact k9t4p5_local_1_required_1_eq_row_0 j + + · exact k9t4p5_local_1_required_1_eq_row_1 j + + · exact k9t4p5_local_1_required_1_eq_row_2 j + + · exact k9t4p5_local_1_required_1_eq_row_3 j + + · exact k9t4p5_local_1_required_1_eq_row_4 j + + · exact k9t4p5_local_1_required_1_eq_row_5 j + + · exact k9t4p5_local_1_required_1_eq_row_6 j + + · exact k9t4p5_local_1_required_1_eq_row_7 j + + · exact k9t4p5_local_1_required_1_eq_row_8 j + + · exact k9t4p5_local_1_required_1_eq_row_9 j + +private theorem k9t4p5_local_1_path_1_0 : (⟨4, 0, [3, 1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_1_1 : (⟨4, 0, [3, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_1_2 : (⟨4, 8, [3, 1, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_1_3 : (⟨4, 9, [3, 1, 0, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_1_4 : (⟨4, 2, [3, 1, 0, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_1_5 : (⟨4, 8, [3, 2, 1, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_1_6 : (⟨4, 9, [3, 2, 1, 0, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_1_7 : (⟨4, 7, [3, 2, 9, 1, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_1_8 : (⟨4, 8, [3, 2, 9, 1, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_1_9 : (⟨4, 1, [3, 2, 9, 8, 7, 6, 5, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_1_10 : (⟨4, 0, [3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_1_11 : (⟨4, 6, [5, 0, 1, 2, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_paths_block_1 : ∀ p ∈ k9t4p5_step_1_required_block_1, p.Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by + simp only [k9t4p5_step_1_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_1_path_1_0, k9t4p5_local_1_path_1_1, k9t4p5_local_1_path_1_2, k9t4p5_local_1_path_1_3, k9t4p5_local_1_path_1_4, k9t4p5_local_1_path_1_5, k9t4p5_local_1_path_1_6, k9t4p5_local_1_path_1_7, k9t4p5_local_1_path_1_8, k9t4p5_local_1_path_1_9, k9t4p5_local_1_path_1_10, k9t4p5_local_1_path_1_11⟩ + +private def k9t4p5_local_1_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {4, 5}, ∅, ∅, ∅, {1, 3}, ∅], + #[∅, ∅, ∅, {4, 5}, ∅, ∅, {1}, ∅, {0, 1, 3}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, ∅, {1, 3}, {0, 1, 3}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_1_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_2) 0 j = k9t4p5_local_1_required_2 0 j := by decide + +private theorem k9t4p5_local_1_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_2) 1 j = k9t4p5_local_1_required_2 1 j := by decide + +private theorem k9t4p5_local_1_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_2) 2 j = k9t4p5_local_1_required_2 2 j := by decide + +private theorem k9t4p5_local_1_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_2) 3 j = k9t4p5_local_1_required_2 3 j := by decide + +private theorem k9t4p5_local_1_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_2) 4 j = k9t4p5_local_1_required_2 4 j := by decide + +private theorem k9t4p5_local_1_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_2) 5 j = k9t4p5_local_1_required_2 5 j := by decide + +private theorem k9t4p5_local_1_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_2) 6 j = k9t4p5_local_1_required_2 6 j := by decide + +private theorem k9t4p5_local_1_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_2) 7 j = k9t4p5_local_1_required_2 7 j := by decide + +private theorem k9t4p5_local_1_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_2) 8 j = k9t4p5_local_1_required_2 8 j := by decide + +private theorem k9t4p5_local_1_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_2) 9 j = k9t4p5_local_1_required_2 9 j := by decide + +private theorem k9t4p5_local_1_required_2_eq : (requiredMatrix 9 k9t4p5_step_1_required_block_2) = k9t4p5_local_1_required_2 := by + funext i j + fin_cases i + + · exact k9t4p5_local_1_required_2_eq_row_0 j + + · exact k9t4p5_local_1_required_2_eq_row_1 j + + · exact k9t4p5_local_1_required_2_eq_row_2 j + + · exact k9t4p5_local_1_required_2_eq_row_3 j + + · exact k9t4p5_local_1_required_2_eq_row_4 j + + · exact k9t4p5_local_1_required_2_eq_row_5 j + + · exact k9t4p5_local_1_required_2_eq_row_6 j + + · exact k9t4p5_local_1_required_2_eq_row_7 j + + · exact k9t4p5_local_1_required_2_eq_row_8 j + + · exact k9t4p5_local_1_required_2_eq_row_9 j + +private theorem k9t4p5_local_1_path_2_0 : (⟨4, 8, [5, 0, 1, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_2_1 : (⟨4, 6, [5, 0, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_2_2 : (⟨4, 3, [5, 0, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_2_3 : (⟨4, 3, [5, 0, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_2_4 : (⟨8, 0, [7, 6, 5, 4, 3, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_2_5 : (⟨8, 0, [7, 6, 5, 4, 3, 2, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_2_6 : (⟨8, 3, [7, 6, 5, 0, 1, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_2_7 : (⟨8, 4, [7, 6, 5, 0, 1, 9, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_2_8 : (⟨8, 4, [7, 6, 5, 0, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_2_9 : (⟨8, 0, [9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_2_10 : (⟨8, 0, [9, 1, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_2_11 : (⟨8, 3, [9, 1, 0, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_paths_block_2 : ∀ p ∈ k9t4p5_step_1_required_block_2, p.Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by + simp only [k9t4p5_step_1_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_1_path_2_0, k9t4p5_local_1_path_2_1, k9t4p5_local_1_path_2_2, k9t4p5_local_1_path_2_3, k9t4p5_local_1_path_2_4, k9t4p5_local_1_path_2_5, k9t4p5_local_1_path_2_6, k9t4p5_local_1_path_2_7, k9t4p5_local_1_path_2_8, k9t4p5_local_1_path_2_9, k9t4p5_local_1_path_2_10, k9t4p5_local_1_path_2_11⟩ + +private def k9t4p5_local_1_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {2}, {2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_1_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_3) 0 j = k9t4p5_local_1_required_3 0 j := by decide + +private theorem k9t4p5_local_1_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_3) 1 j = k9t4p5_local_1_required_3 1 j := by decide + +private theorem k9t4p5_local_1_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_3) 2 j = k9t4p5_local_1_required_3 2 j := by decide + +private theorem k9t4p5_local_1_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_3) 3 j = k9t4p5_local_1_required_3 3 j := by decide + +private theorem k9t4p5_local_1_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_3) 4 j = k9t4p5_local_1_required_3 4 j := by decide + +private theorem k9t4p5_local_1_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_3) 5 j = k9t4p5_local_1_required_3 5 j := by decide + +private theorem k9t4p5_local_1_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_3) 6 j = k9t4p5_local_1_required_3 6 j := by decide + +private theorem k9t4p5_local_1_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_3) 7 j = k9t4p5_local_1_required_3 7 j := by decide + +private theorem k9t4p5_local_1_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_3) 8 j = k9t4p5_local_1_required_3 8 j := by decide + +private theorem k9t4p5_local_1_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_1_required_block_3) 9 j = k9t4p5_local_1_required_3 9 j := by decide + +private theorem k9t4p5_local_1_required_3_eq : (requiredMatrix 9 k9t4p5_step_1_required_block_3) = k9t4p5_local_1_required_3 := by + funext i j + fin_cases i + + · exact k9t4p5_local_1_required_3_eq_row_0 j + + · exact k9t4p5_local_1_required_3_eq_row_1 j + + · exact k9t4p5_local_1_required_3_eq_row_2 j + + · exact k9t4p5_local_1_required_3_eq_row_3 j + + · exact k9t4p5_local_1_required_3_eq_row_4 j + + · exact k9t4p5_local_1_required_3_eq_row_5 j + + · exact k9t4p5_local_1_required_3_eq_row_6 j + + · exact k9t4p5_local_1_required_3_eq_row_7 j + + · exact k9t4p5_local_1_required_3_eq_row_8 j + + · exact k9t4p5_local_1_required_3_eq_row_9 j + +private theorem k9t4p5_local_1_path_3_0 : (⟨8, 3, [9, 2, 1, 0, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_path_3_1 : (⟨8, 4, [9, 2, 3, 1, 0, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by decide + +private theorem k9t4p5_local_1_paths_block_3 : ∀ p ∈ k9t4p5_step_1_required_block_3, p.Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by + simp only [k9t4p5_step_1_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_1_path_3_0, k9t4p5_local_1_path_3_1⟩ + +private theorem k9t4p5_local_1_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_1 a b ∪ ((((k9t4p5_local_1_required_0 a b ∪ k9t4p5_local_1_required_1 a b) ∪ k9t4p5_local_1_required_2 a b) ∪ k9t4p5_local_1_required_3 a b))) 0 j = k9t4p5_local_1 0 j := by decide + +private theorem k9t4p5_local_1_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_1 a b ∪ ((((k9t4p5_local_1_required_0 a b ∪ k9t4p5_local_1_required_1 a b) ∪ k9t4p5_local_1_required_2 a b) ∪ k9t4p5_local_1_required_3 a b))) 1 j = k9t4p5_local_1 1 j := by decide + +private theorem k9t4p5_local_1_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_1 a b ∪ ((((k9t4p5_local_1_required_0 a b ∪ k9t4p5_local_1_required_1 a b) ∪ k9t4p5_local_1_required_2 a b) ∪ k9t4p5_local_1_required_3 a b))) 2 j = k9t4p5_local_1 2 j := by decide + +private theorem k9t4p5_local_1_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_1 a b ∪ ((((k9t4p5_local_1_required_0 a b ∪ k9t4p5_local_1_required_1 a b) ∪ k9t4p5_local_1_required_2 a b) ∪ k9t4p5_local_1_required_3 a b))) 3 j = k9t4p5_local_1 3 j := by decide + +private theorem k9t4p5_local_1_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_1 a b ∪ ((((k9t4p5_local_1_required_0 a b ∪ k9t4p5_local_1_required_1 a b) ∪ k9t4p5_local_1_required_2 a b) ∪ k9t4p5_local_1_required_3 a b))) 4 j = k9t4p5_local_1 4 j := by decide + +private theorem k9t4p5_local_1_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_1 a b ∪ ((((k9t4p5_local_1_required_0 a b ∪ k9t4p5_local_1_required_1 a b) ∪ k9t4p5_local_1_required_2 a b) ∪ k9t4p5_local_1_required_3 a b))) 5 j = k9t4p5_local_1 5 j := by decide + +private theorem k9t4p5_local_1_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_1 a b ∪ ((((k9t4p5_local_1_required_0 a b ∪ k9t4p5_local_1_required_1 a b) ∪ k9t4p5_local_1_required_2 a b) ∪ k9t4p5_local_1_required_3 a b))) 6 j = k9t4p5_local_1 6 j := by decide + +private theorem k9t4p5_local_1_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_1 a b ∪ ((((k9t4p5_local_1_required_0 a b ∪ k9t4p5_local_1_required_1 a b) ∪ k9t4p5_local_1_required_2 a b) ∪ k9t4p5_local_1_required_3 a b))) 7 j = k9t4p5_local_1 7 j := by decide + +private theorem k9t4p5_local_1_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_1 a b ∪ ((((k9t4p5_local_1_required_0 a b ∪ k9t4p5_local_1_required_1 a b) ∪ k9t4p5_local_1_required_2 a b) ∪ k9t4p5_local_1_required_3 a b))) 8 j = k9t4p5_local_1 8 j := by decide + +private theorem k9t4p5_local_1_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_1 a b ∪ ((((k9t4p5_local_1_required_0 a b ∪ k9t4p5_local_1_required_1 a b) ∪ k9t4p5_local_1_required_2 a b) ∪ k9t4p5_local_1_required_3 a b))) 9 j = k9t4p5_local_1 9 j := by decide + +private theorem k9t4p5_local_1_merged_eq : (fun a b => freshMatrix k9t4p5_state_1 a b ∪ ((((k9t4p5_local_1_required_0 a b ∪ k9t4p5_local_1_required_1 a b) ∪ k9t4p5_local_1_required_2 a b) ∪ k9t4p5_local_1_required_3 a b))) = k9t4p5_local_1 := by + funext i j + fin_cases i + + · exact k9t4p5_local_1_merged_eq_row_0 j + + · exact k9t4p5_local_1_merged_eq_row_1 j + + · exact k9t4p5_local_1_merged_eq_row_2 j + + · exact k9t4p5_local_1_merged_eq_row_3 j + + · exact k9t4p5_local_1_merged_eq_row_4 j + + · exact k9t4p5_local_1_merged_eq_row_5 j + + · exact k9t4p5_local_1_merged_eq_row_6 j + + · exact k9t4p5_local_1_merged_eq_row_7 j + + · exact k9t4p5_local_1_merged_eq_row_8 j + + · exact k9t4p5_local_1_merged_eq_row_9 j + +private theorem k9t4p5_local_1_eq : (fun a b => freshMatrix k9t4p5_state_1 a b ∪ requiredMatrix 9 k9t4p5_step_1_data.required a b) = k9t4p5_local_1 := by + funext a b + change freshMatrix k9t4p5_state_1 a b ∪ requiredMatrix 9 (k9t4p5_step_1_required_block_0 ++ k9t4p5_step_1_required_block_1 ++ k9t4p5_step_1_required_block_2 ++ k9t4p5_step_1_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p5_local_1_required_0_eq, k9t4p5_local_1_required_1_eq, k9t4p5_local_1_required_2_eq, k9t4p5_local_1_required_3_eq] + exact congrFun (congrFun k9t4p5_local_1_merged_eq a) b + +private theorem k9t4p5_local_1_paths : ∀ p ∈ k9t4p5_step_1_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 := by + change ∀ p ∈ (k9t4p5_step_1_required_block_0 ++ k9t4p5_step_1_required_block_1 ++ k9t4p5_step_1_required_block_2 ++ k9t4p5_step_1_required_block_3), p.Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p5_local_1_paths_block_0, k9t4p5_local_1_paths_block_1⟩, k9t4p5_local_1_paths_block_2⟩, k9t4p5_local_1_paths_block_3⟩ + +private theorem k9t4p5_local_1_bad : k9t4p5_step_1_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_1_data.i k9t4p5_step_1_data.j) k9t4p5_local_1 9 4 := by decide + +private theorem k9t4p5_step_1_check : k9t4p5_step_1.Check k9t4p5.graph k9t4p5_state_1 9 4 := by + change k9t4p5_step_1_data.Check k9t4p5.graph k9t4p5_state_1 9 4 + refine ⟨by decide, k9t4p5_local_1_paths, ?_⟩ + rw [k9t4p5_local_1_eq] + exact k9t4p5_local_1_bad + +private theorem k9t4p5_update_1 : k9t4p5_step_1.apply k9t4p5_state_1 = k9t4p5_state_2 := by + have h : ∀ i j : Fin 9, k9t4p5_step_1.apply k9t4p5_state_1 i j = k9t4p5_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {3, 4, 5}, Finset.Icc 2 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, {0, 2, 3, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, {0, 2, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{3, 4, 5}, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 2 6, {2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 3}, {1, 2}, Finset.Icc 1 7, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2}], + #[{1, 2, 3}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 2 6, ∅, {2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4, Finset.Icc 3 6, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 2 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{1, 3, 4, 5}, ∅, ∅, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 2 6, {2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, Finset.Icc 1 6, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 4, 5, 6, 7}, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_2_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p5_state_2 a b ∪ requiredMatrix 9 k9t4p5_step_2_data.required a b) 0 j = k9t4p5_local_2 0 j := by decide + +private theorem k9t4p5_local_2_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p5_state_2 a b ∪ requiredMatrix 9 k9t4p5_step_2_data.required a b) 1 j = k9t4p5_local_2 1 j := by decide + +private theorem k9t4p5_local_2_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p5_state_2 a b ∪ requiredMatrix 9 k9t4p5_step_2_data.required a b) 2 j = k9t4p5_local_2 2 j := by decide + +private theorem k9t4p5_local_2_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p5_state_2 a b ∪ requiredMatrix 9 k9t4p5_step_2_data.required a b) 3 j = k9t4p5_local_2 3 j := by decide + +private theorem k9t4p5_local_2_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p5_state_2 a b ∪ requiredMatrix 9 k9t4p5_step_2_data.required a b) 4 j = k9t4p5_local_2 4 j := by decide + +private theorem k9t4p5_local_2_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p5_state_2 a b ∪ requiredMatrix 9 k9t4p5_step_2_data.required a b) 5 j = k9t4p5_local_2 5 j := by decide + +private theorem k9t4p5_local_2_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p5_state_2 a b ∪ requiredMatrix 9 k9t4p5_step_2_data.required a b) 6 j = k9t4p5_local_2 6 j := by decide + +private theorem k9t4p5_local_2_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p5_state_2 a b ∪ requiredMatrix 9 k9t4p5_step_2_data.required a b) 7 j = k9t4p5_local_2 7 j := by decide + +private theorem k9t4p5_local_2_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p5_state_2 a b ∪ requiredMatrix 9 k9t4p5_step_2_data.required a b) 8 j = k9t4p5_local_2 8 j := by decide + +private theorem k9t4p5_local_2_eq : (fun a b => k9t4p5_state_2 a b ∪ requiredMatrix 9 k9t4p5_step_2_data.required a b) = k9t4p5_local_2 := by + funext i j + fin_cases i + + · exact k9t4p5_local_2_eq_row_0 j + + · exact k9t4p5_local_2_eq_row_1 j + + · exact k9t4p5_local_2_eq_row_2 j + + · exact k9t4p5_local_2_eq_row_3 j + + · exact k9t4p5_local_2_eq_row_4 j + + · exact k9t4p5_local_2_eq_row_5 j + + · exact k9t4p5_local_2_eq_row_6 j + + · exact k9t4p5_local_2_eq_row_7 j + + · exact k9t4p5_local_2_eq_row_8 j + +private theorem k9t4p5_local_2_paths : ∀ p ∈ k9t4p5_step_2_data.required, p.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_2_data.i k9t4p5_step_2_data.j) 9 := by decide + +private theorem k9t4p5_local_2_bad : k9t4p5_step_2_data.bad.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_2_data.i k9t4p5_step_2_data.j) k9t4p5_local_2 9 4 := by decide + +private theorem k9t4p5_step_2_check : k9t4p5_step_2.Check k9t4p5.graph k9t4p5_state_2 9 4 := by + change k9t4p5_step_2_data.Check k9t4p5.graph k9t4p5_state_2 9 4 + refine ⟨k9t4p5_local_2_paths, ?_⟩ + rw [k9t4p5_local_2_eq] + exact k9t4p5_local_2_bad + +private theorem k9t4p5_update_2 : k9t4p5_step_2.apply k9t4p5_state_2 = k9t4p5_state_3 := by + have h : ∀ i j : Fin 9, k9t4p5_step_2.apply k9t4p5_state_2 i j = k9t4p5_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_4 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {3, 4, 5}, Finset.Icc 2 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, ∅, {2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{3, 4, 5}, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 2 6, {2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, Finset.Icc 0 3, {0, 1, 2}, ∅, ∅, ∅, Finset.Icc 0 3, ∅], + #[∅, ∅, {1}, {1, 2}, {0, 1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {3, 4, 5}, Finset.Icc 2 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1}, ∅, {1, 2}, {0, 1, 2, 3, 5, 6, 7}, {0, 2, 3, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[Finset.Icc 0 3, {1, 2}, {1, 2}, ∅, Finset.Icc 1 5, {2, 3, 4}, {0, 1}, {1, 2, 4, 5, 6}, Finset.Icc 1 7, {1, 2}], + #[{0, 1, 2}, {0, 1, 2, 3, 5, 6, 7}, {0, 1, 2, 3, 5, 6, 7}, Finset.Icc 1 5, ∅, {1, 2, 3}, Finset.Icc 0 4, {1, 3, 4, 5, 6}, Finset.Icc 0 6, {0, 1, 4, 5, 6, 7}], + #[∅, Finset.Icc 0 6, {0, 2, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[∅, {3, 4, 5}, ∅, {0, 1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[∅, Finset.Icc 2 6, {2, 3, 4}, {1, 2, 4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 0 3, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2}, {1, 2}, {1, 2}, {0, 1, 4, 5, 6, 7}, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_3_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅, {0, 1}, {1, 2}, {1, 2}, {1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_3_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_0) 0 j = k9t4p5_local_3_required_0 0 j := by decide + +private theorem k9t4p5_local_3_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_0) 1 j = k9t4p5_local_3_required_0 1 j := by decide + +private theorem k9t4p5_local_3_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_0) 2 j = k9t4p5_local_3_required_0 2 j := by decide + +private theorem k9t4p5_local_3_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_0) 3 j = k9t4p5_local_3_required_0 3 j := by decide + +private theorem k9t4p5_local_3_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_0) 4 j = k9t4p5_local_3_required_0 4 j := by decide + +private theorem k9t4p5_local_3_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_0) 5 j = k9t4p5_local_3_required_0 5 j := by decide + +private theorem k9t4p5_local_3_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_0) 6 j = k9t4p5_local_3_required_0 6 j := by decide + +private theorem k9t4p5_local_3_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_0) 7 j = k9t4p5_local_3_required_0 7 j := by decide + +private theorem k9t4p5_local_3_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_0) 8 j = k9t4p5_local_3_required_0 8 j := by decide + +private theorem k9t4p5_local_3_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_0) 9 j = k9t4p5_local_3_required_0 9 j := by decide + +private theorem k9t4p5_local_3_required_0_eq : (requiredMatrix 9 k9t4p5_step_3_required_block_0) = k9t4p5_local_3_required_0 := by + funext i j + fin_cases i + + · exact k9t4p5_local_3_required_0_eq_row_0 j + + · exact k9t4p5_local_3_required_0_eq_row_1 j + + · exact k9t4p5_local_3_required_0_eq_row_2 j + + · exact k9t4p5_local_3_required_0_eq_row_3 j + + · exact k9t4p5_local_3_required_0_eq_row_4 j + + · exact k9t4p5_local_3_required_0_eq_row_5 j + + · exact k9t4p5_local_3_required_0_eq_row_6 j + + · exact k9t4p5_local_3_required_0_eq_row_7 j + + · exact k9t4p5_local_3_required_0_eq_row_8 j + + · exact k9t4p5_local_3_required_0_eq_row_9 j + +private theorem k9t4p5_local_3_path_0_0 : (⟨3, 0, [1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_0_1 : (⟨3, 8, [1, 2, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_0_2 : (⟨3, 9, [1, 2, 0, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_0_3 : (⟨3, 7, [1, 9, 2, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_0_4 : (⟨3, 8, [1, 9, 2, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_0_5 : (⟨3, 0, [1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_0_6 : (⟨3, 9, [2, 0, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_0_7 : (⟨3, 0, [4, 5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_0_8 : (⟨3, 7, [4, 5, 0, 2, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_0_9 : (⟨3, 6, [4, 5, 0, 2, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_0_10 : (⟨3, 6, [4, 5, 0, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_0_11 : (⟨3, 0, [9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_paths_block_0 : ∀ p ∈ k9t4p5_step_3_required_block_0, p.Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by + simp only [k9t4p5_step_3_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_3_path_0_0, k9t4p5_local_3_path_0_1, k9t4p5_local_3_path_0_2, k9t4p5_local_3_path_0_3, k9t4p5_local_3_path_0_4, k9t4p5_local_3_path_0_5, k9t4p5_local_3_path_0_6, k9t4p5_local_3_path_0_7, k9t4p5_local_3_path_0_8, k9t4p5_local_3_path_0_9, k9t4p5_local_3_path_0_10, k9t4p5_local_3_path_0_11⟩ + +private def k9t4p5_local_3_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {4}, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, {0}, {0}, {4}, ∅, ∅, ∅, {1}, {0, 1, 2}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_3_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_1) 0 j = k9t4p5_local_3_required_1 0 j := by decide + +private theorem k9t4p5_local_3_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_1) 1 j = k9t4p5_local_3_required_1 1 j := by decide + +private theorem k9t4p5_local_3_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_1) 2 j = k9t4p5_local_3_required_1 2 j := by decide + +private theorem k9t4p5_local_3_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_1) 3 j = k9t4p5_local_3_required_1 3 j := by decide + +private theorem k9t4p5_local_3_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_1) 4 j = k9t4p5_local_3_required_1 4 j := by decide + +private theorem k9t4p5_local_3_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_1) 5 j = k9t4p5_local_3_required_1 5 j := by decide + +private theorem k9t4p5_local_3_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_1) 6 j = k9t4p5_local_3_required_1 6 j := by decide + +private theorem k9t4p5_local_3_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_1) 7 j = k9t4p5_local_3_required_1 7 j := by decide + +private theorem k9t4p5_local_3_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_1) 8 j = k9t4p5_local_3_required_1 8 j := by decide + +private theorem k9t4p5_local_3_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_1) 9 j = k9t4p5_local_3_required_1 9 j := by decide + +private theorem k9t4p5_local_3_required_1_eq : (requiredMatrix 9 k9t4p5_step_3_required_block_1) = k9t4p5_local_3_required_1 := by + funext i j + fin_cases i + + · exact k9t4p5_local_3_required_1_eq_row_0 j + + · exact k9t4p5_local_3_required_1_eq_row_1 j + + · exact k9t4p5_local_3_required_1_eq_row_2 j + + · exact k9t4p5_local_3_required_1_eq_row_3 j + + · exact k9t4p5_local_3_required_1_eq_row_4 j + + · exact k9t4p5_local_3_required_1_eq_row_5 j + + · exact k9t4p5_local_3_required_1_eq_row_6 j + + · exact k9t4p5_local_3_required_1_eq_row_7 j + + · exact k9t4p5_local_3_required_1_eq_row_8 j + + · exact k9t4p5_local_3_required_1_eq_row_9 j + +private theorem k9t4p5_local_3_path_1_0 : (⟨4, 0, [3, 1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_1_1 : (⟨4, 8, [3, 1, 2, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_1_2 : (⟨4, 9, [3, 1, 2, 0, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_1_3 : (⟨4, 7, [3, 1, 9, 2, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_1_4 : (⟨4, 8, [3, 1, 9, 2, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_1_5 : (⟨4, 0, [3, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_1_6 : (⟨4, 2, [3, 1, 9, 8, 7, 6, 5, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_1_7 : (⟨4, 8, [3, 2, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_1_8 : (⟨4, 9, [3, 2, 0, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_1_9 : (⟨4, 1, [3, 2, 0, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_1_10 : (⟨4, 0, [3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_1_11 : (⟨4, 3, [5, 0, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_paths_block_1 : ∀ p ∈ k9t4p5_step_3_required_block_1, p.Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by + simp only [k9t4p5_step_3_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_3_path_1_0, k9t4p5_local_3_path_1_1, k9t4p5_local_3_path_1_2, k9t4p5_local_3_path_1_3, k9t4p5_local_3_path_1_4, k9t4p5_local_3_path_1_5, k9t4p5_local_3_path_1_6, k9t4p5_local_3_path_1_7, k9t4p5_local_3_path_1_8, k9t4p5_local_3_path_1_9, k9t4p5_local_3_path_1_10, k9t4p5_local_3_path_1_11⟩ + +private def k9t4p5_local_3_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {5}, ∅, ∅, ∅, {1, 2}, ∅], + #[∅, ∅, ∅, {5}, ∅, ∅, {0, 1}, ∅, Finset.Icc 0 3, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, {1, 2}, Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_3_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_2) 0 j = k9t4p5_local_3_required_2 0 j := by decide + +private theorem k9t4p5_local_3_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_2) 1 j = k9t4p5_local_3_required_2 1 j := by decide + +private theorem k9t4p5_local_3_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_2) 2 j = k9t4p5_local_3_required_2 2 j := by decide + +private theorem k9t4p5_local_3_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_2) 3 j = k9t4p5_local_3_required_2 3 j := by decide + +private theorem k9t4p5_local_3_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_2) 4 j = k9t4p5_local_3_required_2 4 j := by decide + +private theorem k9t4p5_local_3_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_2) 5 j = k9t4p5_local_3_required_2 5 j := by decide + +private theorem k9t4p5_local_3_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_2) 6 j = k9t4p5_local_3_required_2 6 j := by decide + +private theorem k9t4p5_local_3_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_2) 7 j = k9t4p5_local_3_required_2 7 j := by decide + +private theorem k9t4p5_local_3_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_2) 8 j = k9t4p5_local_3_required_2 8 j := by decide + +private theorem k9t4p5_local_3_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_2) 9 j = k9t4p5_local_3_required_2 9 j := by decide + +private theorem k9t4p5_local_3_required_2_eq : (requiredMatrix 9 k9t4p5_step_3_required_block_2) = k9t4p5_local_3_required_2 := by + funext i j + fin_cases i + + · exact k9t4p5_local_3_required_2_eq_row_0 j + + · exact k9t4p5_local_3_required_2_eq_row_1 j + + · exact k9t4p5_local_3_required_2_eq_row_2 j + + · exact k9t4p5_local_3_required_2_eq_row_3 j + + · exact k9t4p5_local_3_required_2_eq_row_4 j + + · exact k9t4p5_local_3_required_2_eq_row_5 j + + · exact k9t4p5_local_3_required_2_eq_row_6 j + + · exact k9t4p5_local_3_required_2_eq_row_7 j + + · exact k9t4p5_local_3_required_2_eq_row_8 j + + · exact k9t4p5_local_3_required_2_eq_row_9 j + +private theorem k9t4p5_local_3_path_2_0 : (⟨4, 6, [5, 0, 2, 1, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_2_1 : (⟨4, 8, [5, 0, 2, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_2_2 : (⟨4, 6, [5, 0, 2, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_2_3 : (⟨4, 3, [5, 0, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_2_4 : (⟨8, 0, [7, 6, 5, 4, 3, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_2_5 : (⟨8, 0, [7, 6, 5, 4, 3, 1, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_2_6 : (⟨8, 4, [7, 6, 5, 0, 2, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_2_7 : (⟨8, 3, [7, 6, 5, 0, 2, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_2_8 : (⟨8, 4, [7, 6, 5, 0, 2, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_2_9 : (⟨8, 0, [9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_2_10 : (⟨8, 3, [9, 1, 2, 0, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_2_11 : (⟨8, 4, [9, 1, 3, 2, 0, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_paths_block_2 : ∀ p ∈ k9t4p5_step_3_required_block_2, p.Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by + simp only [k9t4p5_step_3_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_3_path_2_0, k9t4p5_local_3_path_2_1, k9t4p5_local_3_path_2_2, k9t4p5_local_3_path_2_3, k9t4p5_local_3_path_2_4, k9t4p5_local_3_path_2_5, k9t4p5_local_3_path_2_6, k9t4p5_local_3_path_2_7, k9t4p5_local_3_path_2_8, k9t4p5_local_3_path_2_9, k9t4p5_local_3_path_2_10, k9t4p5_local_3_path_2_11⟩ + +private def k9t4p5_local_3_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {3}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {3}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3}, ∅, ∅, {3}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_3_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_3) 0 j = k9t4p5_local_3_required_3 0 j := by decide + +private theorem k9t4p5_local_3_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_3) 1 j = k9t4p5_local_3_required_3 1 j := by decide + +private theorem k9t4p5_local_3_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_3) 2 j = k9t4p5_local_3_required_3 2 j := by decide + +private theorem k9t4p5_local_3_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_3) 3 j = k9t4p5_local_3_required_3 3 j := by decide + +private theorem k9t4p5_local_3_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_3) 4 j = k9t4p5_local_3_required_3 4 j := by decide + +private theorem k9t4p5_local_3_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_3) 5 j = k9t4p5_local_3_required_3 5 j := by decide + +private theorem k9t4p5_local_3_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_3) 6 j = k9t4p5_local_3_required_3 6 j := by decide + +private theorem k9t4p5_local_3_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_3) 7 j = k9t4p5_local_3_required_3 7 j := by decide + +private theorem k9t4p5_local_3_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_3) 8 j = k9t4p5_local_3_required_3 8 j := by decide + +private theorem k9t4p5_local_3_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_3_required_block_3) 9 j = k9t4p5_local_3_required_3 9 j := by decide + +private theorem k9t4p5_local_3_required_3_eq : (requiredMatrix 9 k9t4p5_step_3_required_block_3) = k9t4p5_local_3_required_3 := by + funext i j + fin_cases i + + · exact k9t4p5_local_3_required_3_eq_row_0 j + + · exact k9t4p5_local_3_required_3_eq_row_1 j + + · exact k9t4p5_local_3_required_3_eq_row_2 j + + · exact k9t4p5_local_3_required_3_eq_row_3 j + + · exact k9t4p5_local_3_required_3_eq_row_4 j + + · exact k9t4p5_local_3_required_3_eq_row_5 j + + · exact k9t4p5_local_3_required_3_eq_row_6 j + + · exact k9t4p5_local_3_required_3_eq_row_7 j + + · exact k9t4p5_local_3_required_3_eq_row_8 j + + · exact k9t4p5_local_3_required_3_eq_row_9 j + +private theorem k9t4p5_local_3_path_3_0 : (⟨8, 0, [9, 1, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_path_3_1 : (⟨8, 3, [9, 2, 0, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by decide + +private theorem k9t4p5_local_3_paths_block_3 : ∀ p ∈ k9t4p5_step_3_required_block_3, p.Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by + simp only [k9t4p5_step_3_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_3_path_3_0, k9t4p5_local_3_path_3_1⟩ + +private theorem k9t4p5_local_3_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_3 a b ∪ ((((k9t4p5_local_3_required_0 a b ∪ k9t4p5_local_3_required_1 a b) ∪ k9t4p5_local_3_required_2 a b) ∪ k9t4p5_local_3_required_3 a b))) 0 j = k9t4p5_local_3 0 j := by decide + +private theorem k9t4p5_local_3_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_3 a b ∪ ((((k9t4p5_local_3_required_0 a b ∪ k9t4p5_local_3_required_1 a b) ∪ k9t4p5_local_3_required_2 a b) ∪ k9t4p5_local_3_required_3 a b))) 1 j = k9t4p5_local_3 1 j := by decide + +private theorem k9t4p5_local_3_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_3 a b ∪ ((((k9t4p5_local_3_required_0 a b ∪ k9t4p5_local_3_required_1 a b) ∪ k9t4p5_local_3_required_2 a b) ∪ k9t4p5_local_3_required_3 a b))) 2 j = k9t4p5_local_3 2 j := by decide + +private theorem k9t4p5_local_3_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_3 a b ∪ ((((k9t4p5_local_3_required_0 a b ∪ k9t4p5_local_3_required_1 a b) ∪ k9t4p5_local_3_required_2 a b) ∪ k9t4p5_local_3_required_3 a b))) 3 j = k9t4p5_local_3 3 j := by decide + +private theorem k9t4p5_local_3_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_3 a b ∪ ((((k9t4p5_local_3_required_0 a b ∪ k9t4p5_local_3_required_1 a b) ∪ k9t4p5_local_3_required_2 a b) ∪ k9t4p5_local_3_required_3 a b))) 4 j = k9t4p5_local_3 4 j := by decide + +private theorem k9t4p5_local_3_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_3 a b ∪ ((((k9t4p5_local_3_required_0 a b ∪ k9t4p5_local_3_required_1 a b) ∪ k9t4p5_local_3_required_2 a b) ∪ k9t4p5_local_3_required_3 a b))) 5 j = k9t4p5_local_3 5 j := by decide + +private theorem k9t4p5_local_3_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_3 a b ∪ ((((k9t4p5_local_3_required_0 a b ∪ k9t4p5_local_3_required_1 a b) ∪ k9t4p5_local_3_required_2 a b) ∪ k9t4p5_local_3_required_3 a b))) 6 j = k9t4p5_local_3 6 j := by decide + +private theorem k9t4p5_local_3_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_3 a b ∪ ((((k9t4p5_local_3_required_0 a b ∪ k9t4p5_local_3_required_1 a b) ∪ k9t4p5_local_3_required_2 a b) ∪ k9t4p5_local_3_required_3 a b))) 7 j = k9t4p5_local_3 7 j := by decide + +private theorem k9t4p5_local_3_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_3 a b ∪ ((((k9t4p5_local_3_required_0 a b ∪ k9t4p5_local_3_required_1 a b) ∪ k9t4p5_local_3_required_2 a b) ∪ k9t4p5_local_3_required_3 a b))) 8 j = k9t4p5_local_3 8 j := by decide + +private theorem k9t4p5_local_3_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_3 a b ∪ ((((k9t4p5_local_3_required_0 a b ∪ k9t4p5_local_3_required_1 a b) ∪ k9t4p5_local_3_required_2 a b) ∪ k9t4p5_local_3_required_3 a b))) 9 j = k9t4p5_local_3 9 j := by decide + +private theorem k9t4p5_local_3_merged_eq : (fun a b => freshMatrix k9t4p5_state_3 a b ∪ ((((k9t4p5_local_3_required_0 a b ∪ k9t4p5_local_3_required_1 a b) ∪ k9t4p5_local_3_required_2 a b) ∪ k9t4p5_local_3_required_3 a b))) = k9t4p5_local_3 := by + funext i j + fin_cases i + + · exact k9t4p5_local_3_merged_eq_row_0 j + + · exact k9t4p5_local_3_merged_eq_row_1 j + + · exact k9t4p5_local_3_merged_eq_row_2 j + + · exact k9t4p5_local_3_merged_eq_row_3 j + + · exact k9t4p5_local_3_merged_eq_row_4 j + + · exact k9t4p5_local_3_merged_eq_row_5 j + + · exact k9t4p5_local_3_merged_eq_row_6 j + + · exact k9t4p5_local_3_merged_eq_row_7 j + + · exact k9t4p5_local_3_merged_eq_row_8 j + + · exact k9t4p5_local_3_merged_eq_row_9 j + +private theorem k9t4p5_local_3_eq : (fun a b => freshMatrix k9t4p5_state_3 a b ∪ requiredMatrix 9 k9t4p5_step_3_data.required a b) = k9t4p5_local_3 := by + funext a b + change freshMatrix k9t4p5_state_3 a b ∪ requiredMatrix 9 (k9t4p5_step_3_required_block_0 ++ k9t4p5_step_3_required_block_1 ++ k9t4p5_step_3_required_block_2 ++ k9t4p5_step_3_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p5_local_3_required_0_eq, k9t4p5_local_3_required_1_eq, k9t4p5_local_3_required_2_eq, k9t4p5_local_3_required_3_eq] + exact congrFun (congrFun k9t4p5_local_3_merged_eq a) b + +private theorem k9t4p5_local_3_paths : ∀ p ∈ k9t4p5_step_3_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 := by + change ∀ p ∈ (k9t4p5_step_3_required_block_0 ++ k9t4p5_step_3_required_block_1 ++ k9t4p5_step_3_required_block_2 ++ k9t4p5_step_3_required_block_3), p.Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p5_local_3_paths_block_0, k9t4p5_local_3_paths_block_1⟩, k9t4p5_local_3_paths_block_2⟩, k9t4p5_local_3_paths_block_3⟩ + +private theorem k9t4p5_local_3_bad : k9t4p5_step_3_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_3_data.i k9t4p5_step_3_data.j) k9t4p5_local_3 9 4 := by decide + +private theorem k9t4p5_step_3_check : k9t4p5_step_3.Check k9t4p5.graph k9t4p5_state_3 9 4 := by + change k9t4p5_step_3_data.Check k9t4p5.graph k9t4p5_state_3 9 4 + refine ⟨by decide, k9t4p5_local_3_paths, ?_⟩ + rw [k9t4p5_local_3_eq] + exact k9t4p5_local_3_bad + +private theorem k9t4p5_update_3 : k9t4p5_step_3.apply k9t4p5_state_3 = k9t4p5_state_4 := by + have h : ∀ i j : Fin 9, k9t4p5_step_3.apply k9t4p5_state_3 i j = k9t4p5_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_5 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 2 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, ∅, {2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{1, 3, 4, 5}, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 2 6, {2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {0}, {0, 1}, Finset.Icc 0 5, Finset.Icc 0 3, ∅, {0, 1}, Finset.Icc 0 5, {0, 1}], + #[∅, ∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {3, 4, 5}, Finset.Icc 2 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{0}, {1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, ∅, {2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{0, 1}, {1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, {1, 2, 4, 5, 6, 7}, ∅], + #[Finset.Icc 0 5, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, {2, 3, 4}, Finset.Icc 0 6, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[Finset.Icc 0 3, Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, Finset.Icc 1 4, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 0 6, {0, 4, 5, 6}], + #[∅, {3, 4, 5}, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[{0, 1}, Finset.Icc 2 6, {2, 3, 4}, {4, 5, 6}, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 0 5, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{0, 1}, {1, 2}, {1, 2}, ∅, {1, 2, 4, 5, 6, 7}, {0, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_4_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, {4}, ∅, {0, 1, 2}, {1, 2, 3}, {1, 2}], + #[∅, ∅, ∅, ∅, {4}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_4_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_0) 0 j = k9t4p5_local_4_required_0 0 j := by decide + +private theorem k9t4p5_local_4_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_0) 1 j = k9t4p5_local_4_required_0 1 j := by decide + +private theorem k9t4p5_local_4_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_0) 2 j = k9t4p5_local_4_required_0 2 j := by decide + +private theorem k9t4p5_local_4_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_0) 3 j = k9t4p5_local_4_required_0 3 j := by decide + +private theorem k9t4p5_local_4_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_0) 4 j = k9t4p5_local_4_required_0 4 j := by decide + +private theorem k9t4p5_local_4_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_0) 5 j = k9t4p5_local_4_required_0 5 j := by decide + +private theorem k9t4p5_local_4_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_0) 6 j = k9t4p5_local_4_required_0 6 j := by decide + +private theorem k9t4p5_local_4_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_0) 7 j = k9t4p5_local_4_required_0 7 j := by decide + +private theorem k9t4p5_local_4_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_0) 8 j = k9t4p5_local_4_required_0 8 j := by decide + +private theorem k9t4p5_local_4_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_0) 9 j = k9t4p5_local_4_required_0 9 j := by decide + +private theorem k9t4p5_local_4_required_0_eq : (requiredMatrix 9 k9t4p5_step_4_required_block_0) = k9t4p5_local_4_required_0 := by + funext i j + fin_cases i + + · exact k9t4p5_local_4_required_0_eq_row_0 j + + · exact k9t4p5_local_4_required_0_eq_row_1 j + + · exact k9t4p5_local_4_required_0_eq_row_2 j + + · exact k9t4p5_local_4_required_0_eq_row_3 j + + · exact k9t4p5_local_4_required_0_eq_row_4 j + + · exact k9t4p5_local_4_required_0_eq_row_5 j + + · exact k9t4p5_local_4_required_0_eq_row_6 j + + · exact k9t4p5_local_4_required_0_eq_row_7 j + + · exact k9t4p5_local_4_required_0_eq_row_8 j + + · exact k9t4p5_local_4_required_0_eq_row_9 j + +private theorem k9t4p5_local_4_path_0_0 : (⟨4, 0, [3, 1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_0_1 : (⟨4, 0, [3, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_0_2 : (⟨4, 5, [3, 1, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_0_3 : (⟨4, 8, [3, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_0_4 : (⟨4, 9, [3, 1, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_0_5 : (⟨4, 8, [3, 2, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_0_6 : (⟨4, 9, [3, 2, 1, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_0_7 : (⟨4, 7, [3, 2, 9, 1, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_0_8 : (⟨4, 8, [3, 2, 9, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_0_9 : (⟨4, 0, [5, 6, 7, 8, 9, 2, 3, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_0_10 : (⟨4, 7, [5, 6, 0, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_0_11 : (⟨4, 7, [5, 6, 0, 1, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_paths_block_0 : ∀ p ∈ k9t4p5_step_4_required_block_0, p.Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by + simp only [k9t4p5_step_4_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_4_path_0_0, k9t4p5_local_4_path_0_1, k9t4p5_local_4_path_0_2, k9t4p5_local_4_path_0_3, k9t4p5_local_4_path_0_4, k9t4p5_local_4_path_0_5, k9t4p5_local_4_path_0_6, k9t4p5_local_4_path_0_7, k9t4p5_local_4_path_0_8, k9t4p5_local_4_path_0_9, k9t4p5_local_4_path_0_10, k9t4p5_local_4_path_0_11⟩ + +private def k9t4p5_local_4_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {2}, ∅], + #[{0}, {0}, {0}, ∅, ∅, ∅, ∅, ∅, {0, 1}, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, {2}, {2}, {0, 1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_4_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_1) 0 j = k9t4p5_local_4_required_1 0 j := by decide + +private theorem k9t4p5_local_4_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_1) 1 j = k9t4p5_local_4_required_1 1 j := by decide + +private theorem k9t4p5_local_4_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_1) 2 j = k9t4p5_local_4_required_1 2 j := by decide + +private theorem k9t4p5_local_4_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_1) 3 j = k9t4p5_local_4_required_1 3 j := by decide + +private theorem k9t4p5_local_4_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_1) 4 j = k9t4p5_local_4_required_1 4 j := by decide + +private theorem k9t4p5_local_4_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_1) 5 j = k9t4p5_local_4_required_1 5 j := by decide + +private theorem k9t4p5_local_4_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_1) 6 j = k9t4p5_local_4_required_1 6 j := by decide + +private theorem k9t4p5_local_4_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_1) 7 j = k9t4p5_local_4_required_1 7 j := by decide + +private theorem k9t4p5_local_4_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_1) 8 j = k9t4p5_local_4_required_1 8 j := by decide + +private theorem k9t4p5_local_4_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_1) 9 j = k9t4p5_local_4_required_1 9 j := by decide + +private theorem k9t4p5_local_4_required_1_eq : (requiredMatrix 9 k9t4p5_step_4_required_block_1) = k9t4p5_local_4_required_1 := by + funext i j + fin_cases i + + · exact k9t4p5_local_4_required_1_eq_row_0 j + + · exact k9t4p5_local_4_required_1_eq_row_1 j + + · exact k9t4p5_local_4_required_1_eq_row_2 j + + · exact k9t4p5_local_4_required_1_eq_row_3 j + + · exact k9t4p5_local_4_required_1_eq_row_4 j + + · exact k9t4p5_local_4_required_1_eq_row_5 j + + · exact k9t4p5_local_4_required_1_eq_row_6 j + + · exact k9t4p5_local_4_required_1_eq_row_7 j + + · exact k9t4p5_local_4_required_1_eq_row_8 j + + · exact k9t4p5_local_4_required_1_eq_row_9 j + +private theorem k9t4p5_local_4_path_1_0 : (⟨5, 0, [4, 3, 1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_1_1 : (⟨5, 2, [4, 3, 1, 0, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_1_2 : (⟨5, 9, [4, 3, 2, 1, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_1_3 : (⟨5, 8, [4, 3, 2, 9, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_1_4 : (⟨5, 1, [4, 3, 2, 9, 8, 7, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_1_5 : (⟨8, 0, [7, 6, 5, 4, 3, 2, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_1_6 : (⟨8, 5, [7, 6, 0, 1, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_1_7 : (⟨8, 5, [7, 6, 0, 1, 9, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_1_8 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_1_9 : (⟨8, 0, [9, 1, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_1_10 : (⟨8, 3, [9, 1, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_1_11 : (⟨8, 4, [9, 2, 1, 0, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_paths_block_1 : ∀ p ∈ k9t4p5_step_4_required_block_1, p.Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by + simp only [k9t4p5_step_4_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_4_path_1_0, k9t4p5_local_4_path_1_1, k9t4p5_local_4_path_1_2, k9t4p5_local_4_path_1_3, k9t4p5_local_4_path_1_4, k9t4p5_local_4_path_1_5, k9t4p5_local_4_path_1_6, k9t4p5_local_4_path_1_7, k9t4p5_local_4_path_1_8, k9t4p5_local_4_path_1_9, k9t4p5_local_4_path_1_10, k9t4p5_local_4_path_1_11⟩ + +private def k9t4p5_local_4_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, {0}, {0, 1}, {1, 2}, ∅, ∅, {2, 4, 5}, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 4, 5}, ∅, ∅, {1}, {1}, {2}, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_4_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_2) 0 j = k9t4p5_local_4_required_2 0 j := by decide + +private theorem k9t4p5_local_4_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_2) 1 j = k9t4p5_local_4_required_2 1 j := by decide + +private theorem k9t4p5_local_4_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_2) 2 j = k9t4p5_local_4_required_2 2 j := by decide + +private theorem k9t4p5_local_4_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_2) 3 j = k9t4p5_local_4_required_2 3 j := by decide + +private theorem k9t4p5_local_4_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_2) 4 j = k9t4p5_local_4_required_2 4 j := by decide + +private theorem k9t4p5_local_4_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_2) 5 j = k9t4p5_local_4_required_2 5 j := by decide + +private theorem k9t4p5_local_4_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_2) 6 j = k9t4p5_local_4_required_2 6 j := by decide + +private theorem k9t4p5_local_4_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_2) 7 j = k9t4p5_local_4_required_2 7 j := by decide + +private theorem k9t4p5_local_4_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_2) 8 j = k9t4p5_local_4_required_2 8 j := by decide + +private theorem k9t4p5_local_4_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_2) 9 j = k9t4p5_local_4_required_2 9 j := by decide + +private theorem k9t4p5_local_4_required_2_eq : (requiredMatrix 9 k9t4p5_step_4_required_block_2) = k9t4p5_local_4_required_2 := by + funext i j + fin_cases i + + · exact k9t4p5_local_4_required_2_eq_row_0 j + + · exact k9t4p5_local_4_required_2_eq_row_1 j + + · exact k9t4p5_local_4_required_2_eq_row_2 j + + · exact k9t4p5_local_4_required_2_eq_row_3 j + + · exact k9t4p5_local_4_required_2_eq_row_4 j + + · exact k9t4p5_local_4_required_2_eq_row_5 j + + · exact k9t4p5_local_4_required_2_eq_row_6 j + + · exact k9t4p5_local_4_required_2_eq_row_7 j + + · exact k9t4p5_local_4_required_2_eq_row_8 j + + · exact k9t4p5_local_4_required_2_eq_row_9 j + +private theorem k9t4p5_local_4_path_2_0 : (⟨8, 3, [9, 2, 1, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_2_1 : (⟨8, 5, [9, 2, 3, 1, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_2_2 : (⟨8, 4, [9, 2, 3, 1, 0, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_2_3 : (⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_2_4 : (⟨0, 8, [1, 2, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_2_5 : (⟨0, 5, [1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_2_6 : (⟨0, 4, [1, 2, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_2_7 : (⟨0, 8, [1, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_2_8 : (⟨0, 5, [1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_2_9 : (⟨0, 4, [1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_2_10 : (⟨0, 3, [1, 2, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_2_11 : (⟨0, 8, [1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_paths_block_2 : ∀ p ∈ k9t4p5_step_4_required_block_2, p.Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by + simp only [k9t4p5_step_4_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_4_path_2_0, k9t4p5_local_4_path_2_1, k9t4p5_local_4_path_2_2, k9t4p5_local_4_path_2_3, k9t4p5_local_4_path_2_4, k9t4p5_local_4_path_2_5, k9t4p5_local_4_path_2_6, k9t4p5_local_4_path_2_7, k9t4p5_local_4_path_2_8, k9t4p5_local_4_path_2_9, k9t4p5_local_4_path_2_10, k9t4p5_local_4_path_2_11⟩ + +private def k9t4p5_local_4_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {0}, {1}, {2, 4, 5}, {3}, ∅, {0, 1}, {0, 1, 3}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_4_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_3) 0 j = k9t4p5_local_4_required_3 0 j := by decide + +private theorem k9t4p5_local_4_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_3) 1 j = k9t4p5_local_4_required_3 1 j := by decide + +private theorem k9t4p5_local_4_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_3) 2 j = k9t4p5_local_4_required_3 2 j := by decide + +private theorem k9t4p5_local_4_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_3) 3 j = k9t4p5_local_4_required_3 3 j := by decide + +private theorem k9t4p5_local_4_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_3) 4 j = k9t4p5_local_4_required_3 4 j := by decide + +private theorem k9t4p5_local_4_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_3) 5 j = k9t4p5_local_4_required_3 5 j := by decide + +private theorem k9t4p5_local_4_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_3) 6 j = k9t4p5_local_4_required_3 6 j := by decide + +private theorem k9t4p5_local_4_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_3) 7 j = k9t4p5_local_4_required_3 7 j := by decide + +private theorem k9t4p5_local_4_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_3) 8 j = k9t4p5_local_4_required_3 8 j := by decide + +private theorem k9t4p5_local_4_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_3) 9 j = k9t4p5_local_4_required_3 9 j := by decide + +private theorem k9t4p5_local_4_required_3_eq : (requiredMatrix 9 k9t4p5_step_4_required_block_3) = k9t4p5_local_4_required_3 := by + funext i j + fin_cases i + + · exact k9t4p5_local_4_required_3_eq_row_0 j + + · exact k9t4p5_local_4_required_3_eq_row_1 j + + · exact k9t4p5_local_4_required_3_eq_row_2 j + + · exact k9t4p5_local_4_required_3_eq_row_3 j + + · exact k9t4p5_local_4_required_3_eq_row_4 j + + · exact k9t4p5_local_4_required_3_eq_row_5 j + + · exact k9t4p5_local_4_required_3_eq_row_6 j + + · exact k9t4p5_local_4_required_3_eq_row_7 j + + · exact k9t4p5_local_4_required_3_eq_row_8 j + + · exact k9t4p5_local_4_required_3_eq_row_9 j + +private theorem k9t4p5_local_4_path_3_0 : (⟨0, 9, [1, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_3_1 : (⟨0, 4, [1, 9, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_3_2 : (⟨0, 5, [1, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_3_3 : (⟨0, 7, [1, 9, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_3_4 : (⟨0, 8, [1, 9, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_3_5 : (⟨0, 4, [1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_3_6 : (⟨0, 8, [1, 9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_3_7 : (⟨0, 4, [1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_3_8 : (⟨0, 3, [1, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_3_9 : (⟨0, 2, [1, 9, 8, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_3_10 : (⟨0, 7, [6, 5, 4, 3, 1, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_3_11 : (⟨0, 8, [6, 5, 4, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_paths_block_3 : ∀ p ∈ k9t4p5_step_4_required_block_3, p.Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by + simp only [k9t4p5_step_4_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_4_path_3_0, k9t4p5_local_4_path_3_1, k9t4p5_local_4_path_3_2, k9t4p5_local_4_path_3_3, k9t4p5_local_4_path_3_4, k9t4p5_local_4_path_3_5, k9t4p5_local_4_path_3_6, k9t4p5_local_4_path_3_7, k9t4p5_local_4_path_3_8, k9t4p5_local_4_path_3_9, k9t4p5_local_4_path_3_10, k9t4p5_local_4_path_3_11⟩ + +private def k9t4p5_local_4_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {3}, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_4_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_4) 0 j = k9t4p5_local_4_required_4 0 j := by decide + +private theorem k9t4p5_local_4_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_4) 1 j = k9t4p5_local_4_required_4 1 j := by decide + +private theorem k9t4p5_local_4_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_4) 2 j = k9t4p5_local_4_required_4 2 j := by decide + +private theorem k9t4p5_local_4_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_4) 3 j = k9t4p5_local_4_required_4 3 j := by decide + +private theorem k9t4p5_local_4_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_4) 4 j = k9t4p5_local_4_required_4 4 j := by decide + +private theorem k9t4p5_local_4_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_4) 5 j = k9t4p5_local_4_required_4 5 j := by decide + +private theorem k9t4p5_local_4_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_4) 6 j = k9t4p5_local_4_required_4 6 j := by decide + +private theorem k9t4p5_local_4_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_4) 7 j = k9t4p5_local_4_required_4 7 j := by decide + +private theorem k9t4p5_local_4_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_4) 8 j = k9t4p5_local_4_required_4 8 j := by decide + +private theorem k9t4p5_local_4_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_4_required_block_4) 9 j = k9t4p5_local_4_required_4 9 j := by decide + +private theorem k9t4p5_local_4_required_4_eq : (requiredMatrix 9 k9t4p5_step_4_required_block_4) = k9t4p5_local_4_required_4 := by + funext i j + fin_cases i + + · exact k9t4p5_local_4_required_4_eq_row_0 j + + · exact k9t4p5_local_4_required_4_eq_row_1 j + + · exact k9t4p5_local_4_required_4_eq_row_2 j + + · exact k9t4p5_local_4_required_4_eq_row_3 j + + · exact k9t4p5_local_4_required_4_eq_row_4 j + + · exact k9t4p5_local_4_required_4_eq_row_5 j + + · exact k9t4p5_local_4_required_4_eq_row_6 j + + · exact k9t4p5_local_4_required_4_eq_row_7 j + + · exact k9t4p5_local_4_required_4_eq_row_8 j + + · exact k9t4p5_local_4_required_4_eq_row_9 j + +private theorem k9t4p5_local_4_path_4_0 : (⟨0, 5, [6, 7, 8, 9, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_path_4_1 : (⟨0, 4, [6, 7, 8, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by decide + +private theorem k9t4p5_local_4_paths_block_4 : ∀ p ∈ k9t4p5_step_4_required_block_4, p.Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by + simp only [k9t4p5_step_4_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_4_path_4_0, k9t4p5_local_4_path_4_1⟩ + +private theorem k9t4p5_local_4_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_4 a b ∪ (((((k9t4p5_local_4_required_0 a b ∪ k9t4p5_local_4_required_1 a b) ∪ k9t4p5_local_4_required_2 a b) ∪ k9t4p5_local_4_required_3 a b) ∪ k9t4p5_local_4_required_4 a b))) 0 j = k9t4p5_local_4 0 j := by decide + +private theorem k9t4p5_local_4_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_4 a b ∪ (((((k9t4p5_local_4_required_0 a b ∪ k9t4p5_local_4_required_1 a b) ∪ k9t4p5_local_4_required_2 a b) ∪ k9t4p5_local_4_required_3 a b) ∪ k9t4p5_local_4_required_4 a b))) 1 j = k9t4p5_local_4 1 j := by decide + +private theorem k9t4p5_local_4_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_4 a b ∪ (((((k9t4p5_local_4_required_0 a b ∪ k9t4p5_local_4_required_1 a b) ∪ k9t4p5_local_4_required_2 a b) ∪ k9t4p5_local_4_required_3 a b) ∪ k9t4p5_local_4_required_4 a b))) 2 j = k9t4p5_local_4 2 j := by decide + +private theorem k9t4p5_local_4_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_4 a b ∪ (((((k9t4p5_local_4_required_0 a b ∪ k9t4p5_local_4_required_1 a b) ∪ k9t4p5_local_4_required_2 a b) ∪ k9t4p5_local_4_required_3 a b) ∪ k9t4p5_local_4_required_4 a b))) 3 j = k9t4p5_local_4 3 j := by decide + +private theorem k9t4p5_local_4_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_4 a b ∪ (((((k9t4p5_local_4_required_0 a b ∪ k9t4p5_local_4_required_1 a b) ∪ k9t4p5_local_4_required_2 a b) ∪ k9t4p5_local_4_required_3 a b) ∪ k9t4p5_local_4_required_4 a b))) 4 j = k9t4p5_local_4 4 j := by decide + +private theorem k9t4p5_local_4_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_4 a b ∪ (((((k9t4p5_local_4_required_0 a b ∪ k9t4p5_local_4_required_1 a b) ∪ k9t4p5_local_4_required_2 a b) ∪ k9t4p5_local_4_required_3 a b) ∪ k9t4p5_local_4_required_4 a b))) 5 j = k9t4p5_local_4 5 j := by decide + +private theorem k9t4p5_local_4_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_4 a b ∪ (((((k9t4p5_local_4_required_0 a b ∪ k9t4p5_local_4_required_1 a b) ∪ k9t4p5_local_4_required_2 a b) ∪ k9t4p5_local_4_required_3 a b) ∪ k9t4p5_local_4_required_4 a b))) 6 j = k9t4p5_local_4 6 j := by decide + +private theorem k9t4p5_local_4_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_4 a b ∪ (((((k9t4p5_local_4_required_0 a b ∪ k9t4p5_local_4_required_1 a b) ∪ k9t4p5_local_4_required_2 a b) ∪ k9t4p5_local_4_required_3 a b) ∪ k9t4p5_local_4_required_4 a b))) 7 j = k9t4p5_local_4 7 j := by decide + +private theorem k9t4p5_local_4_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_4 a b ∪ (((((k9t4p5_local_4_required_0 a b ∪ k9t4p5_local_4_required_1 a b) ∪ k9t4p5_local_4_required_2 a b) ∪ k9t4p5_local_4_required_3 a b) ∪ k9t4p5_local_4_required_4 a b))) 8 j = k9t4p5_local_4 8 j := by decide + +private theorem k9t4p5_local_4_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_4 a b ∪ (((((k9t4p5_local_4_required_0 a b ∪ k9t4p5_local_4_required_1 a b) ∪ k9t4p5_local_4_required_2 a b) ∪ k9t4p5_local_4_required_3 a b) ∪ k9t4p5_local_4_required_4 a b))) 9 j = k9t4p5_local_4 9 j := by decide + +private theorem k9t4p5_local_4_merged_eq : (fun a b => freshMatrix k9t4p5_state_4 a b ∪ (((((k9t4p5_local_4_required_0 a b ∪ k9t4p5_local_4_required_1 a b) ∪ k9t4p5_local_4_required_2 a b) ∪ k9t4p5_local_4_required_3 a b) ∪ k9t4p5_local_4_required_4 a b))) = k9t4p5_local_4 := by + funext i j + fin_cases i + + · exact k9t4p5_local_4_merged_eq_row_0 j + + · exact k9t4p5_local_4_merged_eq_row_1 j + + · exact k9t4p5_local_4_merged_eq_row_2 j + + · exact k9t4p5_local_4_merged_eq_row_3 j + + · exact k9t4p5_local_4_merged_eq_row_4 j + + · exact k9t4p5_local_4_merged_eq_row_5 j + + · exact k9t4p5_local_4_merged_eq_row_6 j + + · exact k9t4p5_local_4_merged_eq_row_7 j + + · exact k9t4p5_local_4_merged_eq_row_8 j + + · exact k9t4p5_local_4_merged_eq_row_9 j + +private theorem k9t4p5_local_4_eq : (fun a b => freshMatrix k9t4p5_state_4 a b ∪ requiredMatrix 9 k9t4p5_step_4_data.required a b) = k9t4p5_local_4 := by + funext a b + change freshMatrix k9t4p5_state_4 a b ∪ requiredMatrix 9 (k9t4p5_step_4_required_block_0 ++ k9t4p5_step_4_required_block_1 ++ k9t4p5_step_4_required_block_2 ++ k9t4p5_step_4_required_block_3 ++ k9t4p5_step_4_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t4p5_local_4_required_0_eq, k9t4p5_local_4_required_1_eq, k9t4p5_local_4_required_2_eq, k9t4p5_local_4_required_3_eq, k9t4p5_local_4_required_4_eq] + exact congrFun (congrFun k9t4p5_local_4_merged_eq a) b + +private theorem k9t4p5_local_4_paths : ∀ p ∈ k9t4p5_step_4_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 := by + change ∀ p ∈ (k9t4p5_step_4_required_block_0 ++ k9t4p5_step_4_required_block_1 ++ k9t4p5_step_4_required_block_2 ++ k9t4p5_step_4_required_block_3 ++ k9t4p5_step_4_required_block_4), p.Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t4p5_local_4_paths_block_0, k9t4p5_local_4_paths_block_1⟩, k9t4p5_local_4_paths_block_2⟩, k9t4p5_local_4_paths_block_3⟩, k9t4p5_local_4_paths_block_4⟩ + +private theorem k9t4p5_local_4_bad : k9t4p5_step_4_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_4_data.i k9t4p5_step_4_data.j) k9t4p5_local_4 9 4 := by decide + +private theorem k9t4p5_step_4_check : k9t4p5_step_4.Check k9t4p5.graph k9t4p5_state_4 9 4 := by + change k9t4p5_step_4_data.Check k9t4p5.graph k9t4p5_state_4 9 4 + refine ⟨by decide, k9t4p5_local_4_paths, ?_⟩ + rw [k9t4p5_local_4_eq] + exact k9t4p5_local_4_bad + +private theorem k9t4p5_update_4 : k9t4p5_step_4.apply k9t4p5_state_4 = k9t4p5_state_5 := by + have h : ∀ i j : Fin 9, k9t4p5_step_4.apply k9t4p5_state_4 i j = k9t4p5_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_6 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 2 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, {2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 2 6, {2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_5 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0}, ∅, {0, 1}, Finset.Icc 0 5, Finset.Icc 0 3, ∅, {0, 1}, Finset.Icc 0 5, {0, 1}], + #[{0}, ∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 2 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, ∅, {2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{0, 1}, {1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, {1, 2, 4, 5, 6, 7}, ∅], + #[Finset.Icc 0 5, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, {2, 3, 4}, Finset.Icc 0 6, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[Finset.Icc 0 3, Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, Finset.Icc 1 4, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 0 6, {0, 4, 5, 6}], + #[∅, {1, 3, 4, 5}, ∅, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[{0, 1}, Finset.Icc 2 6, {2, 3, 4}, {4, 5, 6}, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 0 5, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{0, 1}, {1, 2}, {1, 2}, ∅, {1, 2, 4, 5, 6, 7}, {0, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_5_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, {4}, ∅, {0, 1, 2}, {1, 2, 3}, {1, 2}], + #[∅, ∅, ∅, ∅, {4}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_5_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_0) 0 j = k9t4p5_local_5_required_0 0 j := by decide + +private theorem k9t4p5_local_5_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_0) 1 j = k9t4p5_local_5_required_0 1 j := by decide + +private theorem k9t4p5_local_5_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_0) 2 j = k9t4p5_local_5_required_0 2 j := by decide + +private theorem k9t4p5_local_5_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_0) 3 j = k9t4p5_local_5_required_0 3 j := by decide + +private theorem k9t4p5_local_5_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_0) 4 j = k9t4p5_local_5_required_0 4 j := by decide + +private theorem k9t4p5_local_5_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_0) 5 j = k9t4p5_local_5_required_0 5 j := by decide + +private theorem k9t4p5_local_5_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_0) 6 j = k9t4p5_local_5_required_0 6 j := by decide + +private theorem k9t4p5_local_5_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_0) 7 j = k9t4p5_local_5_required_0 7 j := by decide + +private theorem k9t4p5_local_5_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_0) 8 j = k9t4p5_local_5_required_0 8 j := by decide + +private theorem k9t4p5_local_5_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_0) 9 j = k9t4p5_local_5_required_0 9 j := by decide + +private theorem k9t4p5_local_5_required_0_eq : (requiredMatrix 9 k9t4p5_step_5_required_block_0) = k9t4p5_local_5_required_0 := by + funext i j + fin_cases i + + · exact k9t4p5_local_5_required_0_eq_row_0 j + + · exact k9t4p5_local_5_required_0_eq_row_1 j + + · exact k9t4p5_local_5_required_0_eq_row_2 j + + · exact k9t4p5_local_5_required_0_eq_row_3 j + + · exact k9t4p5_local_5_required_0_eq_row_4 j + + · exact k9t4p5_local_5_required_0_eq_row_5 j + + · exact k9t4p5_local_5_required_0_eq_row_6 j + + · exact k9t4p5_local_5_required_0_eq_row_7 j + + · exact k9t4p5_local_5_required_0_eq_row_8 j + + · exact k9t4p5_local_5_required_0_eq_row_9 j + +private theorem k9t4p5_local_5_path_0_0 : (⟨4, 0, [3, 1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_0_1 : (⟨4, 8, [3, 1, 2, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_0_2 : (⟨4, 9, [3, 1, 2, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_0_3 : (⟨4, 7, [3, 1, 9, 2, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_0_4 : (⟨4, 8, [3, 1, 9, 2, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_0_5 : (⟨4, 0, [3, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_0_6 : (⟨4, 5, [3, 2, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_0_7 : (⟨4, 8, [3, 2, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_0_8 : (⟨4, 9, [3, 2, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_0_9 : (⟨4, 0, [5, 6, 7, 8, 9, 1, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_0_10 : (⟨4, 7, [5, 6, 0, 2, 1, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_0_11 : (⟨4, 7, [5, 6, 0, 2, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_paths_block_0 : ∀ p ∈ k9t4p5_step_5_required_block_0, p.Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by + simp only [k9t4p5_step_5_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_5_path_0_0, k9t4p5_local_5_path_0_1, k9t4p5_local_5_path_0_2, k9t4p5_local_5_path_0_3, k9t4p5_local_5_path_0_4, k9t4p5_local_5_path_0_5, k9t4p5_local_5_path_0_6, k9t4p5_local_5_path_0_7, k9t4p5_local_5_path_0_8, k9t4p5_local_5_path_0_9, k9t4p5_local_5_path_0_10, k9t4p5_local_5_path_0_11⟩ + +private def k9t4p5_local_5_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {2}, ∅], + #[{0}, {0}, {0}, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, {1}, {2}, {0, 1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_5_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_1) 0 j = k9t4p5_local_5_required_1 0 j := by decide + +private theorem k9t4p5_local_5_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_1) 1 j = k9t4p5_local_5_required_1 1 j := by decide + +private theorem k9t4p5_local_5_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_1) 2 j = k9t4p5_local_5_required_1 2 j := by decide + +private theorem k9t4p5_local_5_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_1) 3 j = k9t4p5_local_5_required_1 3 j := by decide + +private theorem k9t4p5_local_5_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_1) 4 j = k9t4p5_local_5_required_1 4 j := by decide + +private theorem k9t4p5_local_5_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_1) 5 j = k9t4p5_local_5_required_1 5 j := by decide + +private theorem k9t4p5_local_5_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_1) 6 j = k9t4p5_local_5_required_1 6 j := by decide + +private theorem k9t4p5_local_5_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_1) 7 j = k9t4p5_local_5_required_1 7 j := by decide + +private theorem k9t4p5_local_5_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_1) 8 j = k9t4p5_local_5_required_1 8 j := by decide + +private theorem k9t4p5_local_5_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_1) 9 j = k9t4p5_local_5_required_1 9 j := by decide + +private theorem k9t4p5_local_5_required_1_eq : (requiredMatrix 9 k9t4p5_step_5_required_block_1) = k9t4p5_local_5_required_1 := by + funext i j + fin_cases i + + · exact k9t4p5_local_5_required_1_eq_row_0 j + + · exact k9t4p5_local_5_required_1_eq_row_1 j + + · exact k9t4p5_local_5_required_1_eq_row_2 j + + · exact k9t4p5_local_5_required_1_eq_row_3 j + + · exact k9t4p5_local_5_required_1_eq_row_4 j + + · exact k9t4p5_local_5_required_1_eq_row_5 j + + · exact k9t4p5_local_5_required_1_eq_row_6 j + + · exact k9t4p5_local_5_required_1_eq_row_7 j + + · exact k9t4p5_local_5_required_1_eq_row_8 j + + · exact k9t4p5_local_5_required_1_eq_row_9 j + +private theorem k9t4p5_local_5_path_1_0 : (⟨5, 0, [4, 3, 1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_1_1 : (⟨5, 9, [4, 3, 1, 2, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_1_2 : (⟨5, 8, [4, 3, 1, 9, 2, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_1_3 : (⟨5, 2, [4, 3, 1, 9, 8, 7, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_1_4 : (⟨5, 1, [4, 3, 2, 0, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_1_5 : (⟨8, 0, [7, 6, 5, 4, 3, 1, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_1_6 : (⟨8, 5, [7, 6, 0, 2, 1, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_1_7 : (⟨8, 5, [7, 6, 0, 2, 1, 9, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_1_8 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_1_9 : (⟨8, 4, [9, 1, 2, 0, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_1_10 : (⟨8, 3, [9, 1, 2, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_1_11 : (⟨8, 5, [9, 1, 3, 2, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_paths_block_1 : ∀ p ∈ k9t4p5_step_5_required_block_1, p.Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by + simp only [k9t4p5_step_5_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_5_path_1_0, k9t4p5_local_5_path_1_1, k9t4p5_local_5_path_1_2, k9t4p5_local_5_path_1_3, k9t4p5_local_5_path_1_4, k9t4p5_local_5_path_1_5, k9t4p5_local_5_path_1_6, k9t4p5_local_5_path_1_7, k9t4p5_local_5_path_1_8, k9t4p5_local_5_path_1_9, k9t4p5_local_5_path_1_10, k9t4p5_local_5_path_1_11⟩ + +private def k9t4p5_local_5_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {0, 4, 5}, {1, 3}, ∅, {1}, {1, 2, 4}, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {2}, ∅], + #[{0, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[{1, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 4}, ∅, ∅, {2}, {1}, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_5_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_2) 0 j = k9t4p5_local_5_required_2 0 j := by decide + +private theorem k9t4p5_local_5_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_2) 1 j = k9t4p5_local_5_required_2 1 j := by decide + +private theorem k9t4p5_local_5_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_2) 2 j = k9t4p5_local_5_required_2 2 j := by decide + +private theorem k9t4p5_local_5_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_2) 3 j = k9t4p5_local_5_required_2 3 j := by decide + +private theorem k9t4p5_local_5_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_2) 4 j = k9t4p5_local_5_required_2 4 j := by decide + +private theorem k9t4p5_local_5_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_2) 5 j = k9t4p5_local_5_required_2 5 j := by decide + +private theorem k9t4p5_local_5_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_2) 6 j = k9t4p5_local_5_required_2 6 j := by decide + +private theorem k9t4p5_local_5_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_2) 7 j = k9t4p5_local_5_required_2 7 j := by decide + +private theorem k9t4p5_local_5_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_2) 8 j = k9t4p5_local_5_required_2 8 j := by decide + +private theorem k9t4p5_local_5_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_2) 9 j = k9t4p5_local_5_required_2 9 j := by decide + +private theorem k9t4p5_local_5_required_2_eq : (requiredMatrix 9 k9t4p5_step_5_required_block_2) = k9t4p5_local_5_required_2 := by + funext i j + fin_cases i + + · exact k9t4p5_local_5_required_2_eq_row_0 j + + · exact k9t4p5_local_5_required_2_eq_row_1 j + + · exact k9t4p5_local_5_required_2_eq_row_2 j + + · exact k9t4p5_local_5_required_2_eq_row_3 j + + · exact k9t4p5_local_5_required_2_eq_row_4 j + + · exact k9t4p5_local_5_required_2_eq_row_5 j + + · exact k9t4p5_local_5_required_2_eq_row_6 j + + · exact k9t4p5_local_5_required_2_eq_row_7 j + + · exact k9t4p5_local_5_required_2_eq_row_8 j + + · exact k9t4p5_local_5_required_2_eq_row_9 j + +private theorem k9t4p5_local_5_path_2_0 : (⟨8, 4, [9, 1, 3, 2, 0, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_2_1 : (⟨8, 0, [9, 1, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_2_2 : (⟨8, 3, [9, 2, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_2_3 : (⟨0, 4, [2, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_2_4 : (⟨0, 8, [2, 1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_2_5 : (⟨0, 9, [2, 1, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_2_6 : (⟨0, 8, [2, 1, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_2_7 : (⟨0, 5, [2, 1, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_2_8 : (⟨0, 4, [2, 1, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_2_9 : (⟨0, 4, [2, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_2_10 : (⟨0, 5, [2, 1, 9, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_2_11 : (⟨0, 7, [2, 1, 9, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_paths_block_2 : ∀ p ∈ k9t4p5_step_5_required_block_2, p.Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by + simp only [k9t4p5_step_5_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_5_path_2_0, k9t4p5_local_5_path_2_1, k9t4p5_local_5_path_2_2, k9t4p5_local_5_path_2_3, k9t4p5_local_5_path_2_4, k9t4p5_local_5_path_2_5, k9t4p5_local_5_path_2_6, k9t4p5_local_5_path_2_7, k9t4p5_local_5_path_2_8, k9t4p5_local_5_path_2_9, k9t4p5_local_5_path_2_10, k9t4p5_local_5_path_2_11⟩ + +private def k9t4p5_local_5_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0}, ∅, {0, 1}, {1, 2}, {2}, ∅, {0}, {0, 2, 3, 5}, {1}], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 2, 3, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_5_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_3) 0 j = k9t4p5_local_5_required_3 0 j := by decide + +private theorem k9t4p5_local_5_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_3) 1 j = k9t4p5_local_5_required_3 1 j := by decide + +private theorem k9t4p5_local_5_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_3) 2 j = k9t4p5_local_5_required_3 2 j := by decide + +private theorem k9t4p5_local_5_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_3) 3 j = k9t4p5_local_5_required_3 3 j := by decide + +private theorem k9t4p5_local_5_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_3) 4 j = k9t4p5_local_5_required_3 4 j := by decide + +private theorem k9t4p5_local_5_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_3) 5 j = k9t4p5_local_5_required_3 5 j := by decide + +private theorem k9t4p5_local_5_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_3) 6 j = k9t4p5_local_5_required_3 6 j := by decide + +private theorem k9t4p5_local_5_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_3) 7 j = k9t4p5_local_5_required_3 7 j := by decide + +private theorem k9t4p5_local_5_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_3) 8 j = k9t4p5_local_5_required_3 8 j := by decide + +private theorem k9t4p5_local_5_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_3) 9 j = k9t4p5_local_5_required_3 9 j := by decide + +private theorem k9t4p5_local_5_required_3_eq : (requiredMatrix 9 k9t4p5_step_5_required_block_3) = k9t4p5_local_5_required_3 := by + funext i j + fin_cases i + + · exact k9t4p5_local_5_required_3_eq_row_0 j + + · exact k9t4p5_local_5_required_3_eq_row_1 j + + · exact k9t4p5_local_5_required_3_eq_row_2 j + + · exact k9t4p5_local_5_required_3_eq_row_3 j + + · exact k9t4p5_local_5_required_3_eq_row_4 j + + · exact k9t4p5_local_5_required_3_eq_row_5 j + + · exact k9t4p5_local_5_required_3_eq_row_6 j + + · exact k9t4p5_local_5_required_3_eq_row_7 j + + · exact k9t4p5_local_5_required_3_eq_row_8 j + + · exact k9t4p5_local_5_required_3_eq_row_9 j + +private theorem k9t4p5_local_5_path_3_0 : (⟨0, 8, [2, 1, 9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_3_1 : (⟨0, 8, [2, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_3_2 : (⟨0, 5, [2, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_3_3 : (⟨0, 4, [2, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_3_4 : (⟨0, 3, [2, 1, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_3_5 : (⟨0, 8, [2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_3_6 : (⟨0, 9, [2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_3_7 : (⟨0, 4, [2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_3_8 : (⟨0, 3, [2, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_3_9 : (⟨0, 1, [2, 9, 8, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_3_10 : (⟨0, 7, [6, 5, 4, 3, 1, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_3_11 : (⟨0, 8, [6, 5, 4, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_paths_block_3 : ∀ p ∈ k9t4p5_step_5_required_block_3, p.Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by + simp only [k9t4p5_step_5_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_5_path_3_0, k9t4p5_local_5_path_3_1, k9t4p5_local_5_path_3_2, k9t4p5_local_5_path_3_3, k9t4p5_local_5_path_3_4, k9t4p5_local_5_path_3_5, k9t4p5_local_5_path_3_6, k9t4p5_local_5_path_3_7, k9t4p5_local_5_path_3_8, k9t4p5_local_5_path_3_9, k9t4p5_local_5_path_3_10, k9t4p5_local_5_path_3_11⟩ + +private def k9t4p5_local_5_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {3}, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_5_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_4) 0 j = k9t4p5_local_5_required_4 0 j := by decide + +private theorem k9t4p5_local_5_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_4) 1 j = k9t4p5_local_5_required_4 1 j := by decide + +private theorem k9t4p5_local_5_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_4) 2 j = k9t4p5_local_5_required_4 2 j := by decide + +private theorem k9t4p5_local_5_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_4) 3 j = k9t4p5_local_5_required_4 3 j := by decide + +private theorem k9t4p5_local_5_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_4) 4 j = k9t4p5_local_5_required_4 4 j := by decide + +private theorem k9t4p5_local_5_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_4) 5 j = k9t4p5_local_5_required_4 5 j := by decide + +private theorem k9t4p5_local_5_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_4) 6 j = k9t4p5_local_5_required_4 6 j := by decide + +private theorem k9t4p5_local_5_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_4) 7 j = k9t4p5_local_5_required_4 7 j := by decide + +private theorem k9t4p5_local_5_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_4) 8 j = k9t4p5_local_5_required_4 8 j := by decide + +private theorem k9t4p5_local_5_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_5_required_block_4) 9 j = k9t4p5_local_5_required_4 9 j := by decide + +private theorem k9t4p5_local_5_required_4_eq : (requiredMatrix 9 k9t4p5_step_5_required_block_4) = k9t4p5_local_5_required_4 := by + funext i j + fin_cases i + + · exact k9t4p5_local_5_required_4_eq_row_0 j + + · exact k9t4p5_local_5_required_4_eq_row_1 j + + · exact k9t4p5_local_5_required_4_eq_row_2 j + + · exact k9t4p5_local_5_required_4_eq_row_3 j + + · exact k9t4p5_local_5_required_4_eq_row_4 j + + · exact k9t4p5_local_5_required_4_eq_row_5 j + + · exact k9t4p5_local_5_required_4_eq_row_6 j + + · exact k9t4p5_local_5_required_4_eq_row_7 j + + · exact k9t4p5_local_5_required_4_eq_row_8 j + + · exact k9t4p5_local_5_required_4_eq_row_9 j + +private theorem k9t4p5_local_5_path_4_0 : (⟨0, 5, [6, 7, 8, 9, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_path_4_1 : (⟨0, 4, [6, 7, 8, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by decide + +private theorem k9t4p5_local_5_paths_block_4 : ∀ p ∈ k9t4p5_step_5_required_block_4, p.Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by + simp only [k9t4p5_step_5_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_5_path_4_0, k9t4p5_local_5_path_4_1⟩ + +private theorem k9t4p5_local_5_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_5 a b ∪ (((((k9t4p5_local_5_required_0 a b ∪ k9t4p5_local_5_required_1 a b) ∪ k9t4p5_local_5_required_2 a b) ∪ k9t4p5_local_5_required_3 a b) ∪ k9t4p5_local_5_required_4 a b))) 0 j = k9t4p5_local_5 0 j := by decide + +private theorem k9t4p5_local_5_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_5 a b ∪ (((((k9t4p5_local_5_required_0 a b ∪ k9t4p5_local_5_required_1 a b) ∪ k9t4p5_local_5_required_2 a b) ∪ k9t4p5_local_5_required_3 a b) ∪ k9t4p5_local_5_required_4 a b))) 1 j = k9t4p5_local_5 1 j := by decide + +private theorem k9t4p5_local_5_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_5 a b ∪ (((((k9t4p5_local_5_required_0 a b ∪ k9t4p5_local_5_required_1 a b) ∪ k9t4p5_local_5_required_2 a b) ∪ k9t4p5_local_5_required_3 a b) ∪ k9t4p5_local_5_required_4 a b))) 2 j = k9t4p5_local_5 2 j := by decide + +private theorem k9t4p5_local_5_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_5 a b ∪ (((((k9t4p5_local_5_required_0 a b ∪ k9t4p5_local_5_required_1 a b) ∪ k9t4p5_local_5_required_2 a b) ∪ k9t4p5_local_5_required_3 a b) ∪ k9t4p5_local_5_required_4 a b))) 3 j = k9t4p5_local_5 3 j := by decide + +private theorem k9t4p5_local_5_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_5 a b ∪ (((((k9t4p5_local_5_required_0 a b ∪ k9t4p5_local_5_required_1 a b) ∪ k9t4p5_local_5_required_2 a b) ∪ k9t4p5_local_5_required_3 a b) ∪ k9t4p5_local_5_required_4 a b))) 4 j = k9t4p5_local_5 4 j := by decide + +private theorem k9t4p5_local_5_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_5 a b ∪ (((((k9t4p5_local_5_required_0 a b ∪ k9t4p5_local_5_required_1 a b) ∪ k9t4p5_local_5_required_2 a b) ∪ k9t4p5_local_5_required_3 a b) ∪ k9t4p5_local_5_required_4 a b))) 5 j = k9t4p5_local_5 5 j := by decide + +private theorem k9t4p5_local_5_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_5 a b ∪ (((((k9t4p5_local_5_required_0 a b ∪ k9t4p5_local_5_required_1 a b) ∪ k9t4p5_local_5_required_2 a b) ∪ k9t4p5_local_5_required_3 a b) ∪ k9t4p5_local_5_required_4 a b))) 6 j = k9t4p5_local_5 6 j := by decide + +private theorem k9t4p5_local_5_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_5 a b ∪ (((((k9t4p5_local_5_required_0 a b ∪ k9t4p5_local_5_required_1 a b) ∪ k9t4p5_local_5_required_2 a b) ∪ k9t4p5_local_5_required_3 a b) ∪ k9t4p5_local_5_required_4 a b))) 7 j = k9t4p5_local_5 7 j := by decide + +private theorem k9t4p5_local_5_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_5 a b ∪ (((((k9t4p5_local_5_required_0 a b ∪ k9t4p5_local_5_required_1 a b) ∪ k9t4p5_local_5_required_2 a b) ∪ k9t4p5_local_5_required_3 a b) ∪ k9t4p5_local_5_required_4 a b))) 8 j = k9t4p5_local_5 8 j := by decide + +private theorem k9t4p5_local_5_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_5 a b ∪ (((((k9t4p5_local_5_required_0 a b ∪ k9t4p5_local_5_required_1 a b) ∪ k9t4p5_local_5_required_2 a b) ∪ k9t4p5_local_5_required_3 a b) ∪ k9t4p5_local_5_required_4 a b))) 9 j = k9t4p5_local_5 9 j := by decide + +private theorem k9t4p5_local_5_merged_eq : (fun a b => freshMatrix k9t4p5_state_5 a b ∪ (((((k9t4p5_local_5_required_0 a b ∪ k9t4p5_local_5_required_1 a b) ∪ k9t4p5_local_5_required_2 a b) ∪ k9t4p5_local_5_required_3 a b) ∪ k9t4p5_local_5_required_4 a b))) = k9t4p5_local_5 := by + funext i j + fin_cases i + + · exact k9t4p5_local_5_merged_eq_row_0 j + + · exact k9t4p5_local_5_merged_eq_row_1 j + + · exact k9t4p5_local_5_merged_eq_row_2 j + + · exact k9t4p5_local_5_merged_eq_row_3 j + + · exact k9t4p5_local_5_merged_eq_row_4 j + + · exact k9t4p5_local_5_merged_eq_row_5 j + + · exact k9t4p5_local_5_merged_eq_row_6 j + + · exact k9t4p5_local_5_merged_eq_row_7 j + + · exact k9t4p5_local_5_merged_eq_row_8 j + + · exact k9t4p5_local_5_merged_eq_row_9 j + +private theorem k9t4p5_local_5_eq : (fun a b => freshMatrix k9t4p5_state_5 a b ∪ requiredMatrix 9 k9t4p5_step_5_data.required a b) = k9t4p5_local_5 := by + funext a b + change freshMatrix k9t4p5_state_5 a b ∪ requiredMatrix 9 (k9t4p5_step_5_required_block_0 ++ k9t4p5_step_5_required_block_1 ++ k9t4p5_step_5_required_block_2 ++ k9t4p5_step_5_required_block_3 ++ k9t4p5_step_5_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t4p5_local_5_required_0_eq, k9t4p5_local_5_required_1_eq, k9t4p5_local_5_required_2_eq, k9t4p5_local_5_required_3_eq, k9t4p5_local_5_required_4_eq] + exact congrFun (congrFun k9t4p5_local_5_merged_eq a) b + +private theorem k9t4p5_local_5_paths : ∀ p ∈ k9t4p5_step_5_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 := by + change ∀ p ∈ (k9t4p5_step_5_required_block_0 ++ k9t4p5_step_5_required_block_1 ++ k9t4p5_step_5_required_block_2 ++ k9t4p5_step_5_required_block_3 ++ k9t4p5_step_5_required_block_4), p.Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t4p5_local_5_paths_block_0, k9t4p5_local_5_paths_block_1⟩, k9t4p5_local_5_paths_block_2⟩, k9t4p5_local_5_paths_block_3⟩, k9t4p5_local_5_paths_block_4⟩ + +private theorem k9t4p5_local_5_bad : k9t4p5_step_5_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_5_data.i k9t4p5_step_5_data.j) k9t4p5_local_5 9 4 := by decide + +private theorem k9t4p5_step_5_check : k9t4p5_step_5.Check k9t4p5.graph k9t4p5_state_5 9 4 := by + change k9t4p5_step_5_data.Check k9t4p5.graph k9t4p5_state_5 9 4 + refine ⟨by decide, k9t4p5_local_5_paths, ?_⟩ + rw [k9t4p5_local_5_eq] + exact k9t4p5_local_5_bad + +private theorem k9t4p5_update_5 : k9t4p5_step_5.apply k9t4p5_state_5 = k9t4p5_state_6 := by + have h : ∀ i j : Fin 9, k9t4p5_step_5.apply k9t4p5_state_5 i j = k9t4p5_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_7 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, {0, 2, 3, 4, 5, 6}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, {2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[{0, 2, 3, 4, 5, 6}, {2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_6 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 3}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 2 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2, 3}, ∅, {1, 2}, Finset.Icc 1 7, Finset.Icc 0 6, {1}, {2, 3, 4}, Finset.Icc 1 7, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, {1, 2, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, Finset.Icc 1 7, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, Finset.Icc 1 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4, ∅], + #[Finset.Icc 2 6, {2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 6, Finset.Icc 3 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_6_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p5_state_6 a b ∪ requiredMatrix 9 k9t4p5_step_6_data.required a b) 0 j = k9t4p5_local_6 0 j := by decide + +private theorem k9t4p5_local_6_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p5_state_6 a b ∪ requiredMatrix 9 k9t4p5_step_6_data.required a b) 1 j = k9t4p5_local_6 1 j := by decide + +private theorem k9t4p5_local_6_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p5_state_6 a b ∪ requiredMatrix 9 k9t4p5_step_6_data.required a b) 2 j = k9t4p5_local_6 2 j := by decide + +private theorem k9t4p5_local_6_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p5_state_6 a b ∪ requiredMatrix 9 k9t4p5_step_6_data.required a b) 3 j = k9t4p5_local_6 3 j := by decide + +private theorem k9t4p5_local_6_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p5_state_6 a b ∪ requiredMatrix 9 k9t4p5_step_6_data.required a b) 4 j = k9t4p5_local_6 4 j := by decide + +private theorem k9t4p5_local_6_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p5_state_6 a b ∪ requiredMatrix 9 k9t4p5_step_6_data.required a b) 5 j = k9t4p5_local_6 5 j := by decide + +private theorem k9t4p5_local_6_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p5_state_6 a b ∪ requiredMatrix 9 k9t4p5_step_6_data.required a b) 6 j = k9t4p5_local_6 6 j := by decide + +private theorem k9t4p5_local_6_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p5_state_6 a b ∪ requiredMatrix 9 k9t4p5_step_6_data.required a b) 7 j = k9t4p5_local_6 7 j := by decide + +private theorem k9t4p5_local_6_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p5_state_6 a b ∪ requiredMatrix 9 k9t4p5_step_6_data.required a b) 8 j = k9t4p5_local_6 8 j := by decide + +private theorem k9t4p5_local_6_eq : (fun a b => k9t4p5_state_6 a b ∪ requiredMatrix 9 k9t4p5_step_6_data.required a b) = k9t4p5_local_6 := by + funext i j + fin_cases i + + · exact k9t4p5_local_6_eq_row_0 j + + · exact k9t4p5_local_6_eq_row_1 j + + · exact k9t4p5_local_6_eq_row_2 j + + · exact k9t4p5_local_6_eq_row_3 j + + · exact k9t4p5_local_6_eq_row_4 j + + · exact k9t4p5_local_6_eq_row_5 j + + · exact k9t4p5_local_6_eq_row_6 j + + · exact k9t4p5_local_6_eq_row_7 j + + · exact k9t4p5_local_6_eq_row_8 j + +private theorem k9t4p5_local_6_paths : ∀ p ∈ k9t4p5_step_6_data.required, p.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_6_data.i k9t4p5_step_6_data.j) 9 := by decide + +private theorem k9t4p5_local_6_bad : k9t4p5_step_6_data.bad.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_6_data.i k9t4p5_step_6_data.j) k9t4p5_local_6 9 4 := by decide + +private theorem k9t4p5_step_6_check : k9t4p5_step_6.Check k9t4p5.graph k9t4p5_state_6 9 4 := by + change k9t4p5_step_6_data.Check k9t4p5.graph k9t4p5_state_6 9 4 + refine ⟨k9t4p5_local_6_paths, ?_⟩ + rw [k9t4p5_local_6_eq] + exact k9t4p5_local_6_bad + +private theorem k9t4p5_update_6 : k9t4p5_step_6.apply k9t4p5_state_6 = k9t4p5_state_7 := by + have h : ∀ i j : Fin 9, k9t4p5_step_6.apply k9t4p5_state_6 i j = k9t4p5_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_8 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, {2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, {2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_7 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅, ∅, ∅, {0, 1, 2}, Finset.Icc 0 3], + #[∅, ∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, {0, 2, 3, 4, 5, 6}, {0, 1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, {2, 3, 4}, {0, 1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, {0, 1, 4, 5, 6, 7}, {1, 2}], + #[Finset.Icc 0 3, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, Finset.Icc 0 6, Finset.Icc 1 7], + #[∅, Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {1, 2, 4, 5, 6}], + #[∅, {1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1}], + #[∅, {0, 2, 3, 4, 5, 6}, {2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{0, 1, 2}, {0, 1, 2, 3, 5, 6, 7}, {0, 1, 2, 3, 5, 6, 7}, {0, 1, 4, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, Finset.Icc 1 5], + #[Finset.Icc 0 3, {1, 2}, {1, 2}, {1, 2}, Finset.Icc 1 7, {1, 2, 4, 5, 6}, {0, 1}, {2, 3, 4}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_7_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, {1, 2, 3}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, {4, 5}], + #[∅, ∅, ∅, ∅, {1, 2, 3}, ∅, ∅, ∅, {4, 5}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_7_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_0) 0 j = k9t4p5_local_7_required_0 0 j := by decide + +private theorem k9t4p5_local_7_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_0) 1 j = k9t4p5_local_7_required_0 1 j := by decide + +private theorem k9t4p5_local_7_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_0) 2 j = k9t4p5_local_7_required_0 2 j := by decide + +private theorem k9t4p5_local_7_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_0) 3 j = k9t4p5_local_7_required_0 3 j := by decide + +private theorem k9t4p5_local_7_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_0) 4 j = k9t4p5_local_7_required_0 4 j := by decide + +private theorem k9t4p5_local_7_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_0) 5 j = k9t4p5_local_7_required_0 5 j := by decide + +private theorem k9t4p5_local_7_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_0) 6 j = k9t4p5_local_7_required_0 6 j := by decide + +private theorem k9t4p5_local_7_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_0) 7 j = k9t4p5_local_7_required_0 7 j := by decide + +private theorem k9t4p5_local_7_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_0) 8 j = k9t4p5_local_7_required_0 8 j := by decide + +private theorem k9t4p5_local_7_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_0) 9 j = k9t4p5_local_7_required_0 9 j := by decide + +private theorem k9t4p5_local_7_required_0_eq : (requiredMatrix 9 k9t4p5_step_7_required_block_0) = k9t4p5_local_7_required_0 := by + funext i j + fin_cases i + + · exact k9t4p5_local_7_required_0_eq_row_0 j + + · exact k9t4p5_local_7_required_0_eq_row_1 j + + · exact k9t4p5_local_7_required_0_eq_row_2 j + + · exact k9t4p5_local_7_required_0_eq_row_3 j + + · exact k9t4p5_local_7_required_0_eq_row_4 j + + · exact k9t4p5_local_7_required_0_eq_row_5 j + + · exact k9t4p5_local_7_required_0_eq_row_6 j + + · exact k9t4p5_local_7_required_0_eq_row_7 j + + · exact k9t4p5_local_7_required_0_eq_row_8 j + + · exact k9t4p5_local_7_required_0_eq_row_9 j + +private theorem k9t4p5_local_7_path_0_0 : (⟨4, 0, [3, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_0_1 : (⟨4, 0, [3, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_0_2 : (⟨4, 9, [3, 1, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_0_3 : (⟨4, 9, [3, 2, 1, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_0_4 : (⟨4, 8, [3, 2, 9, 1, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_0_5 : (⟨4, 0, [5, 6, 7, 8, 9, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_0_6 : (⟨4, 0, [5, 6, 7, 8, 9, 2, 3, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_0_7 : (⟨4, 9, [5, 6, 7, 0, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_0_8 : (⟨4, 8, [5, 6, 7, 0, 1, 2, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_0_9 : (⟨4, 8, [5, 6, 7, 0, 1, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_0_10 : (⟨8, 9, [7, 0, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_0_11 : (⟨8, 9, [7, 0, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_paths_block_0 : ∀ p ∈ k9t4p5_step_7_required_block_0, p.Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by + simp only [k9t4p5_step_7_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_7_path_0_0, k9t4p5_local_7_path_0_1, k9t4p5_local_7_path_0_2, k9t4p5_local_7_path_0_3, k9t4p5_local_7_path_0_4, k9t4p5_local_7_path_0_5, k9t4p5_local_7_path_0_6, k9t4p5_local_7_path_0_7, k9t4p5_local_7_path_0_8, k9t4p5_local_7_path_0_9, k9t4p5_local_7_path_0_10, k9t4p5_local_7_path_0_11⟩ + +private def k9t4p5_local_7_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, {0}, {0, 1}, Finset.Icc 0 3, {1}, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_7_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_1) 0 j = k9t4p5_local_7_required_1 0 j := by decide + +private theorem k9t4p5_local_7_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_1) 1 j = k9t4p5_local_7_required_1 1 j := by decide + +private theorem k9t4p5_local_7_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_1) 2 j = k9t4p5_local_7_required_1 2 j := by decide + +private theorem k9t4p5_local_7_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_1) 3 j = k9t4p5_local_7_required_1 3 j := by decide + +private theorem k9t4p5_local_7_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_1) 4 j = k9t4p5_local_7_required_1 4 j := by decide + +private theorem k9t4p5_local_7_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_1) 5 j = k9t4p5_local_7_required_1 5 j := by decide + +private theorem k9t4p5_local_7_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_1) 6 j = k9t4p5_local_7_required_1 6 j := by decide + +private theorem k9t4p5_local_7_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_1) 7 j = k9t4p5_local_7_required_1 7 j := by decide + +private theorem k9t4p5_local_7_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_1) 8 j = k9t4p5_local_7_required_1 8 j := by decide + +private theorem k9t4p5_local_7_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_1) 9 j = k9t4p5_local_7_required_1 9 j := by decide + +private theorem k9t4p5_local_7_required_1_eq : (requiredMatrix 9 k9t4p5_step_7_required_block_1) = k9t4p5_local_7_required_1 := by + funext i j + fin_cases i + + · exact k9t4p5_local_7_required_1_eq_row_0 j + + · exact k9t4p5_local_7_required_1_eq_row_1 j + + · exact k9t4p5_local_7_required_1_eq_row_2 j + + · exact k9t4p5_local_7_required_1_eq_row_3 j + + · exact k9t4p5_local_7_required_1_eq_row_4 j + + · exact k9t4p5_local_7_required_1_eq_row_5 j + + · exact k9t4p5_local_7_required_1_eq_row_6 j + + · exact k9t4p5_local_7_required_1_eq_row_7 j + + · exact k9t4p5_local_7_required_1_eq_row_8 j + + · exact k9t4p5_local_7_required_1_eq_row_9 j + +private theorem k9t4p5_local_7_path_1_0 : (⟨8, 6, [7, 0, 1, 9, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_1_1 : (⟨8, 4, [7, 0, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_1_2 : (⟨8, 6, [7, 0, 1, 9, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_1_3 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_1_4 : (⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_1_5 : (⟨8, 4, [9, 1, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_1_6 : (⟨8, 3, [9, 1, 0, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_1_7 : (⟨8, 2, [9, 1, 0, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_1_8 : (⟨8, 4, [9, 2, 1, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_1_9 : (⟨8, 3, [9, 2, 1, 0, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_1_10 : (⟨8, 5, [9, 2, 3, 1, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_1_11 : (⟨8, 4, [9, 2, 3, 1, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_paths_block_1 : ∀ p ∈ k9t4p5_step_7_required_block_1, p.Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by + simp only [k9t4p5_step_7_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_7_path_1_0, k9t4p5_local_7_path_1_1, k9t4p5_local_7_path_1_2, k9t4p5_local_7_path_1_3, k9t4p5_local_7_path_1_4, k9t4p5_local_7_path_1_5, k9t4p5_local_7_path_1_6, k9t4p5_local_7_path_1_7, k9t4p5_local_7_path_1_8, k9t4p5_local_7_path_1_9, k9t4p5_local_7_path_1_10, k9t4p5_local_7_path_1_11⟩ + +private def k9t4p5_local_7_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {2}, Finset.Icc 0 3], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, {0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, ∅, {1, 2}, {1, 2}, {1, 2}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_7_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_2) 0 j = k9t4p5_local_7_required_2 0 j := by decide + +private theorem k9t4p5_local_7_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_2) 1 j = k9t4p5_local_7_required_2 1 j := by decide + +private theorem k9t4p5_local_7_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_2) 2 j = k9t4p5_local_7_required_2 2 j := by decide + +private theorem k9t4p5_local_7_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_2) 3 j = k9t4p5_local_7_required_2 3 j := by decide + +private theorem k9t4p5_local_7_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_2) 4 j = k9t4p5_local_7_required_2 4 j := by decide + +private theorem k9t4p5_local_7_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_2) 5 j = k9t4p5_local_7_required_2 5 j := by decide + +private theorem k9t4p5_local_7_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_2) 6 j = k9t4p5_local_7_required_2 6 j := by decide + +private theorem k9t4p5_local_7_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_2) 7 j = k9t4p5_local_7_required_2 7 j := by decide + +private theorem k9t4p5_local_7_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_2) 8 j = k9t4p5_local_7_required_2 8 j := by decide + +private theorem k9t4p5_local_7_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_2) 9 j = k9t4p5_local_7_required_2 9 j := by decide + +private theorem k9t4p5_local_7_required_2_eq : (requiredMatrix 9 k9t4p5_step_7_required_block_2) = k9t4p5_local_7_required_2 := by + funext i j + fin_cases i + + · exact k9t4p5_local_7_required_2_eq_row_0 j + + · exact k9t4p5_local_7_required_2_eq_row_1 j + + · exact k9t4p5_local_7_required_2_eq_row_2 j + + · exact k9t4p5_local_7_required_2_eq_row_3 j + + · exact k9t4p5_local_7_required_2_eq_row_4 j + + · exact k9t4p5_local_7_required_2_eq_row_5 j + + · exact k9t4p5_local_7_required_2_eq_row_6 j + + · exact k9t4p5_local_7_required_2_eq_row_7 j + + · exact k9t4p5_local_7_required_2_eq_row_8 j + + · exact k9t4p5_local_7_required_2_eq_row_9 j + +private theorem k9t4p5_local_7_path_2_0 : (⟨8, 1, [9, 2, 3, 4, 5, 6, 7, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_2_1 : (⟨8, 0, [9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_2_2 : (⟨9, 0, [1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_2_3 : (⟨9, 0, [1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_2_4 : (⟨9, 3, [1, 0, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_2_5 : (⟨9, 4, [2, 1, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_2_6 : (⟨9, 3, [2, 1, 0, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_2_7 : (⟨9, 5, [2, 3, 1, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_2_8 : (⟨9, 4, [2, 3, 1, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_2_9 : (⟨9, 0, [3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_2_10 : (⟨9, 0, [8, 7, 6, 5, 4, 3, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_2_11 : (⟨9, 5, [8, 7, 0, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_paths_block_2 : ∀ p ∈ k9t4p5_step_7_required_block_2, p.Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by + simp only [k9t4p5_step_7_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_7_path_2_0, k9t4p5_local_7_path_2_1, k9t4p5_local_7_path_2_2, k9t4p5_local_7_path_2_3, k9t4p5_local_7_path_2_4, k9t4p5_local_7_path_2_5, k9t4p5_local_7_path_2_6, k9t4p5_local_7_path_2_7, k9t4p5_local_7_path_2_8, k9t4p5_local_7_path_2_9, k9t4p5_local_7_path_2_10, k9t4p5_local_7_path_2_11⟩ + +private def k9t4p5_local_7_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_7_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_3) 0 j = k9t4p5_local_7_required_3 0 j := by decide + +private theorem k9t4p5_local_7_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_3) 1 j = k9t4p5_local_7_required_3 1 j := by decide + +private theorem k9t4p5_local_7_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_3) 2 j = k9t4p5_local_7_required_3 2 j := by decide + +private theorem k9t4p5_local_7_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_3) 3 j = k9t4p5_local_7_required_3 3 j := by decide + +private theorem k9t4p5_local_7_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_3) 4 j = k9t4p5_local_7_required_3 4 j := by decide + +private theorem k9t4p5_local_7_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_3) 5 j = k9t4p5_local_7_required_3 5 j := by decide + +private theorem k9t4p5_local_7_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_3) 6 j = k9t4p5_local_7_required_3 6 j := by decide + +private theorem k9t4p5_local_7_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_3) 7 j = k9t4p5_local_7_required_3 7 j := by decide + +private theorem k9t4p5_local_7_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_3) 8 j = k9t4p5_local_7_required_3 8 j := by decide + +private theorem k9t4p5_local_7_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_7_required_block_3) 9 j = k9t4p5_local_7_required_3 9 j := by decide + +private theorem k9t4p5_local_7_required_3_eq : (requiredMatrix 9 k9t4p5_step_7_required_block_3) = k9t4p5_local_7_required_3 := by + funext i j + fin_cases i + + · exact k9t4p5_local_7_required_3_eq_row_0 j + + · exact k9t4p5_local_7_required_3_eq_row_1 j + + · exact k9t4p5_local_7_required_3_eq_row_2 j + + · exact k9t4p5_local_7_required_3_eq_row_3 j + + · exact k9t4p5_local_7_required_3_eq_row_4 j + + · exact k9t4p5_local_7_required_3_eq_row_5 j + + · exact k9t4p5_local_7_required_3_eq_row_6 j + + · exact k9t4p5_local_7_required_3_eq_row_7 j + + · exact k9t4p5_local_7_required_3_eq_row_8 j + + · exact k9t4p5_local_7_required_3_eq_row_9 j + +private theorem k9t4p5_local_7_path_3_0 : (⟨9, 6, [8, 7, 0, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_path_3_1 : (⟨9, 6, [8, 7, 0, 1, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by decide + +private theorem k9t4p5_local_7_paths_block_3 : ∀ p ∈ k9t4p5_step_7_required_block_3, p.Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by + simp only [k9t4p5_step_7_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_7_path_3_0, k9t4p5_local_7_path_3_1⟩ + +private theorem k9t4p5_local_7_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_7 a b ∪ ((((k9t4p5_local_7_required_0 a b ∪ k9t4p5_local_7_required_1 a b) ∪ k9t4p5_local_7_required_2 a b) ∪ k9t4p5_local_7_required_3 a b))) 0 j = k9t4p5_local_7 0 j := by decide + +private theorem k9t4p5_local_7_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_7 a b ∪ ((((k9t4p5_local_7_required_0 a b ∪ k9t4p5_local_7_required_1 a b) ∪ k9t4p5_local_7_required_2 a b) ∪ k9t4p5_local_7_required_3 a b))) 1 j = k9t4p5_local_7 1 j := by decide + +private theorem k9t4p5_local_7_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_7 a b ∪ ((((k9t4p5_local_7_required_0 a b ∪ k9t4p5_local_7_required_1 a b) ∪ k9t4p5_local_7_required_2 a b) ∪ k9t4p5_local_7_required_3 a b))) 2 j = k9t4p5_local_7 2 j := by decide + +private theorem k9t4p5_local_7_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_7 a b ∪ ((((k9t4p5_local_7_required_0 a b ∪ k9t4p5_local_7_required_1 a b) ∪ k9t4p5_local_7_required_2 a b) ∪ k9t4p5_local_7_required_3 a b))) 3 j = k9t4p5_local_7 3 j := by decide + +private theorem k9t4p5_local_7_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_7 a b ∪ ((((k9t4p5_local_7_required_0 a b ∪ k9t4p5_local_7_required_1 a b) ∪ k9t4p5_local_7_required_2 a b) ∪ k9t4p5_local_7_required_3 a b))) 4 j = k9t4p5_local_7 4 j := by decide + +private theorem k9t4p5_local_7_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_7 a b ∪ ((((k9t4p5_local_7_required_0 a b ∪ k9t4p5_local_7_required_1 a b) ∪ k9t4p5_local_7_required_2 a b) ∪ k9t4p5_local_7_required_3 a b))) 5 j = k9t4p5_local_7 5 j := by decide + +private theorem k9t4p5_local_7_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_7 a b ∪ ((((k9t4p5_local_7_required_0 a b ∪ k9t4p5_local_7_required_1 a b) ∪ k9t4p5_local_7_required_2 a b) ∪ k9t4p5_local_7_required_3 a b))) 6 j = k9t4p5_local_7 6 j := by decide + +private theorem k9t4p5_local_7_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_7 a b ∪ ((((k9t4p5_local_7_required_0 a b ∪ k9t4p5_local_7_required_1 a b) ∪ k9t4p5_local_7_required_2 a b) ∪ k9t4p5_local_7_required_3 a b))) 7 j = k9t4p5_local_7 7 j := by decide + +private theorem k9t4p5_local_7_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_7 a b ∪ ((((k9t4p5_local_7_required_0 a b ∪ k9t4p5_local_7_required_1 a b) ∪ k9t4p5_local_7_required_2 a b) ∪ k9t4p5_local_7_required_3 a b))) 8 j = k9t4p5_local_7 8 j := by decide + +private theorem k9t4p5_local_7_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_7 a b ∪ ((((k9t4p5_local_7_required_0 a b ∪ k9t4p5_local_7_required_1 a b) ∪ k9t4p5_local_7_required_2 a b) ∪ k9t4p5_local_7_required_3 a b))) 9 j = k9t4p5_local_7 9 j := by decide + +private theorem k9t4p5_local_7_merged_eq : (fun a b => freshMatrix k9t4p5_state_7 a b ∪ ((((k9t4p5_local_7_required_0 a b ∪ k9t4p5_local_7_required_1 a b) ∪ k9t4p5_local_7_required_2 a b) ∪ k9t4p5_local_7_required_3 a b))) = k9t4p5_local_7 := by + funext i j + fin_cases i + + · exact k9t4p5_local_7_merged_eq_row_0 j + + · exact k9t4p5_local_7_merged_eq_row_1 j + + · exact k9t4p5_local_7_merged_eq_row_2 j + + · exact k9t4p5_local_7_merged_eq_row_3 j + + · exact k9t4p5_local_7_merged_eq_row_4 j + + · exact k9t4p5_local_7_merged_eq_row_5 j + + · exact k9t4p5_local_7_merged_eq_row_6 j + + · exact k9t4p5_local_7_merged_eq_row_7 j + + · exact k9t4p5_local_7_merged_eq_row_8 j + + · exact k9t4p5_local_7_merged_eq_row_9 j + +private theorem k9t4p5_local_7_eq : (fun a b => freshMatrix k9t4p5_state_7 a b ∪ requiredMatrix 9 k9t4p5_step_7_data.required a b) = k9t4p5_local_7 := by + funext a b + change freshMatrix k9t4p5_state_7 a b ∪ requiredMatrix 9 (k9t4p5_step_7_required_block_0 ++ k9t4p5_step_7_required_block_1 ++ k9t4p5_step_7_required_block_2 ++ k9t4p5_step_7_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p5_local_7_required_0_eq, k9t4p5_local_7_required_1_eq, k9t4p5_local_7_required_2_eq, k9t4p5_local_7_required_3_eq] + exact congrFun (congrFun k9t4p5_local_7_merged_eq a) b + +private theorem k9t4p5_local_7_paths : ∀ p ∈ k9t4p5_step_7_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 := by + change ∀ p ∈ (k9t4p5_step_7_required_block_0 ++ k9t4p5_step_7_required_block_1 ++ k9t4p5_step_7_required_block_2 ++ k9t4p5_step_7_required_block_3), p.Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p5_local_7_paths_block_0, k9t4p5_local_7_paths_block_1⟩, k9t4p5_local_7_paths_block_2⟩, k9t4p5_local_7_paths_block_3⟩ + +private theorem k9t4p5_local_7_bad : k9t4p5_step_7_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_7_data.i k9t4p5_step_7_data.j) k9t4p5_local_7 9 4 := by decide + +private theorem k9t4p5_step_7_check : k9t4p5_step_7.Check k9t4p5.graph k9t4p5_state_7 9 4 := by + change k9t4p5_step_7_data.Check k9t4p5.graph k9t4p5_state_7 9 4 + refine ⟨by decide, k9t4p5_local_7_paths, ?_⟩ + rw [k9t4p5_local_7_eq] + exact k9t4p5_local_7_bad + +private theorem k9t4p5_update_7 : k9t4p5_step_7.apply k9t4p5_state_7 = k9t4p5_state_8 := by + have h : ∀ i j : Fin 9, k9t4p5_step_7.apply k9t4p5_state_7 i j = k9t4p5_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_9 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, {0, 2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, {0, 2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_8 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 3}, {1, 2}, Finset.Icc 1 7, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2}], + #[{1, 2, 3}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, {2, 3, 4}, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, {1, 2, 4, 5, 6, 7}, ∅], + #[Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, Finset.Icc 1 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4, ∅], + #[Finset.Icc 0 6, {2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 6, Finset.Icc 3 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_8_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p5_state_8 a b ∪ requiredMatrix 9 k9t4p5_step_8_data.required a b) 0 j = k9t4p5_local_8 0 j := by decide + +private theorem k9t4p5_local_8_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p5_state_8 a b ∪ requiredMatrix 9 k9t4p5_step_8_data.required a b) 1 j = k9t4p5_local_8 1 j := by decide + +private theorem k9t4p5_local_8_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p5_state_8 a b ∪ requiredMatrix 9 k9t4p5_step_8_data.required a b) 2 j = k9t4p5_local_8 2 j := by decide + +private theorem k9t4p5_local_8_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p5_state_8 a b ∪ requiredMatrix 9 k9t4p5_step_8_data.required a b) 3 j = k9t4p5_local_8 3 j := by decide + +private theorem k9t4p5_local_8_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p5_state_8 a b ∪ requiredMatrix 9 k9t4p5_step_8_data.required a b) 4 j = k9t4p5_local_8 4 j := by decide + +private theorem k9t4p5_local_8_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p5_state_8 a b ∪ requiredMatrix 9 k9t4p5_step_8_data.required a b) 5 j = k9t4p5_local_8 5 j := by decide + +private theorem k9t4p5_local_8_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p5_state_8 a b ∪ requiredMatrix 9 k9t4p5_step_8_data.required a b) 6 j = k9t4p5_local_8 6 j := by decide + +private theorem k9t4p5_local_8_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p5_state_8 a b ∪ requiredMatrix 9 k9t4p5_step_8_data.required a b) 7 j = k9t4p5_local_8 7 j := by decide + +private theorem k9t4p5_local_8_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p5_state_8 a b ∪ requiredMatrix 9 k9t4p5_step_8_data.required a b) 8 j = k9t4p5_local_8 8 j := by decide + +private theorem k9t4p5_local_8_eq : (fun a b => k9t4p5_state_8 a b ∪ requiredMatrix 9 k9t4p5_step_8_data.required a b) = k9t4p5_local_8 := by + funext i j + fin_cases i + + · exact k9t4p5_local_8_eq_row_0 j + + · exact k9t4p5_local_8_eq_row_1 j + + · exact k9t4p5_local_8_eq_row_2 j + + · exact k9t4p5_local_8_eq_row_3 j + + · exact k9t4p5_local_8_eq_row_4 j + + · exact k9t4p5_local_8_eq_row_5 j + + · exact k9t4p5_local_8_eq_row_6 j + + · exact k9t4p5_local_8_eq_row_7 j + + · exact k9t4p5_local_8_eq_row_8 j + +private theorem k9t4p5_local_8_paths : ∀ p ∈ k9t4p5_step_8_data.required, p.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_8_data.i k9t4p5_step_8_data.j) 9 := by decide + +private theorem k9t4p5_local_8_bad : k9t4p5_step_8_data.bad.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_8_data.i k9t4p5_step_8_data.j) k9t4p5_local_8 9 4 := by decide + +private theorem k9t4p5_step_8_check : k9t4p5_step_8.Check k9t4p5.graph k9t4p5_state_8 9 4 := by + change k9t4p5_step_8_data.Check k9t4p5.graph k9t4p5_state_8 9 4 + refine ⟨k9t4p5_local_8_paths, ?_⟩ + rw [k9t4p5_local_8_eq] + exact k9t4p5_local_8_bad + +private theorem k9t4p5_update_8 : k9t4p5_step_8.apply k9t4p5_state_8 = k9t4p5_state_9 := by + have h : ∀ i j : Fin 9, k9t4p5_step_8.apply k9t4p5_state_8 i j = k9t4p5_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_10 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_9 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅, ∅, ∅, {0, 1, 2}, Finset.Icc 0 3], + #[∅, ∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {0, 1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, {0, 2, 3, 4}, {0, 1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, {0, 1, 4, 5, 6, 7}, {1, 2}], + #[Finset.Icc 0 3, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, Finset.Icc 0 6, Finset.Icc 1 7], + #[∅, Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {1, 2, 4, 5, 6}], + #[∅, {1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1}], + #[∅, Finset.Icc 0 6, {0, 2, 3, 4}, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{0, 1, 2}, {0, 1, 2, 3, 5, 6, 7}, {0, 1, 2, 3, 5, 6, 7}, {0, 1, 4, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, Finset.Icc 1 5], + #[Finset.Icc 0 3, {1, 2}, {1, 2}, {1, 2}, Finset.Icc 1 7, {1, 2, 4, 5, 6}, {0, 1}, {2, 3, 4}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_9_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 0 3, {1, 2, 3}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_9_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_0) 0 j = k9t4p5_local_9_required_0 0 j := by decide + +private theorem k9t4p5_local_9_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_0) 1 j = k9t4p5_local_9_required_0 1 j := by decide + +private theorem k9t4p5_local_9_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_0) 2 j = k9t4p5_local_9_required_0 2 j := by decide + +private theorem k9t4p5_local_9_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_0) 3 j = k9t4p5_local_9_required_0 3 j := by decide + +private theorem k9t4p5_local_9_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_0) 4 j = k9t4p5_local_9_required_0 4 j := by decide + +private theorem k9t4p5_local_9_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_0) 5 j = k9t4p5_local_9_required_0 5 j := by decide + +private theorem k9t4p5_local_9_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_0) 6 j = k9t4p5_local_9_required_0 6 j := by decide + +private theorem k9t4p5_local_9_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_0) 7 j = k9t4p5_local_9_required_0 7 j := by decide + +private theorem k9t4p5_local_9_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_0) 8 j = k9t4p5_local_9_required_0 8 j := by decide + +private theorem k9t4p5_local_9_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_0) 9 j = k9t4p5_local_9_required_0 9 j := by decide + +private theorem k9t4p5_local_9_required_0_eq : (requiredMatrix 9 k9t4p5_step_9_required_block_0) = k9t4p5_local_9_required_0 := by + funext i j + fin_cases i + + · exact k9t4p5_local_9_required_0_eq_row_0 j + + · exact k9t4p5_local_9_required_0_eq_row_1 j + + · exact k9t4p5_local_9_required_0_eq_row_2 j + + · exact k9t4p5_local_9_required_0_eq_row_3 j + + · exact k9t4p5_local_9_required_0_eq_row_4 j + + · exact k9t4p5_local_9_required_0_eq_row_5 j + + · exact k9t4p5_local_9_required_0_eq_row_6 j + + · exact k9t4p5_local_9_required_0_eq_row_7 j + + · exact k9t4p5_local_9_required_0_eq_row_8 j + + · exact k9t4p5_local_9_required_0_eq_row_9 j + +private theorem k9t4p5_local_9_path_0_0 : (⟨4, 0, [3, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_0_1 : (⟨4, 9, [3, 1, 2, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_0_2 : (⟨4, 8, [3, 1, 9, 2, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_0_3 : (⟨4, 0, [3, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_0_4 : (⟨4, 9, [3, 2, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_0_5 : (⟨4, 0, [5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_0_6 : (⟨4, 0, [5, 6, 7, 8, 9, 1, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_0_7 : (⟨4, 9, [5, 6, 7, 0, 2, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_0_8 : (⟨4, 8, [5, 6, 7, 0, 2, 1, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_0_9 : (⟨4, 8, [5, 6, 7, 0, 2, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_0_10 : (⟨8, 4, [7, 0, 2, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_0_11 : (⟨8, 6, [7, 0, 2, 1, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_paths_block_0 : ∀ p ∈ k9t4p5_step_9_required_block_0, p.Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by + simp only [k9t4p5_step_9_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_9_path_0_0, k9t4p5_local_9_path_0_1, k9t4p5_local_9_path_0_2, k9t4p5_local_9_path_0_3, k9t4p5_local_9_path_0_4, k9t4p5_local_9_path_0_5, k9t4p5_local_9_path_0_6, k9t4p5_local_9_path_0_7, k9t4p5_local_9_path_0_8, k9t4p5_local_9_path_0_9, k9t4p5_local_9_path_0_10, k9t4p5_local_9_path_0_11⟩ + +private def k9t4p5_local_9_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, {0}, {0, 1}, {0, 1, 2}, {1}, {0}, ∅, ∅, {4, 5}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {4, 5}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_9_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_1) 0 j = k9t4p5_local_9_required_1 0 j := by decide + +private theorem k9t4p5_local_9_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_1) 1 j = k9t4p5_local_9_required_1 1 j := by decide + +private theorem k9t4p5_local_9_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_1) 2 j = k9t4p5_local_9_required_1 2 j := by decide + +private theorem k9t4p5_local_9_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_1) 3 j = k9t4p5_local_9_required_1 3 j := by decide + +private theorem k9t4p5_local_9_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_1) 4 j = k9t4p5_local_9_required_1 4 j := by decide + +private theorem k9t4p5_local_9_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_1) 5 j = k9t4p5_local_9_required_1 5 j := by decide + +private theorem k9t4p5_local_9_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_1) 6 j = k9t4p5_local_9_required_1 6 j := by decide + +private theorem k9t4p5_local_9_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_1) 7 j = k9t4p5_local_9_required_1 7 j := by decide + +private theorem k9t4p5_local_9_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_1) 8 j = k9t4p5_local_9_required_1 8 j := by decide + +private theorem k9t4p5_local_9_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_1) 9 j = k9t4p5_local_9_required_1 9 j := by decide + +private theorem k9t4p5_local_9_required_1_eq : (requiredMatrix 9 k9t4p5_step_9_required_block_1) = k9t4p5_local_9_required_1 := by + funext i j + fin_cases i + + · exact k9t4p5_local_9_required_1_eq_row_0 j + + · exact k9t4p5_local_9_required_1_eq_row_1 j + + · exact k9t4p5_local_9_required_1_eq_row_2 j + + · exact k9t4p5_local_9_required_1_eq_row_3 j + + · exact k9t4p5_local_9_required_1_eq_row_4 j + + · exact k9t4p5_local_9_required_1_eq_row_5 j + + · exact k9t4p5_local_9_required_1_eq_row_6 j + + · exact k9t4p5_local_9_required_1_eq_row_7 j + + · exact k9t4p5_local_9_required_1_eq_row_8 j + + · exact k9t4p5_local_9_required_1_eq_row_9 j + +private theorem k9t4p5_local_9_path_1_0 : (⟨8, 9, [7, 0, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_1_1 : (⟨8, 6, [7, 0, 2, 1, 9, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_1_2 : (⟨8, 9, [7, 0, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_1_3 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_1_4 : (⟨8, 4, [9, 1, 2, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_1_5 : (⟨8, 3, [9, 1, 2, 0, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_1_6 : (⟨8, 5, [9, 1, 3, 2, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_1_7 : (⟨8, 4, [9, 1, 3, 2, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_1_8 : (⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_1_9 : (⟨8, 2, [9, 1, 3, 4, 5, 6, 7, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_1_10 : (⟨8, 4, [9, 2, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_1_11 : (⟨8, 3, [9, 2, 0, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_paths_block_1 : ∀ p ∈ k9t4p5_step_9_required_block_1, p.Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by + simp only [k9t4p5_step_9_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_9_path_1_0, k9t4p5_local_9_path_1_1, k9t4p5_local_9_path_1_2, k9t4p5_local_9_path_1_3, k9t4p5_local_9_path_1_4, k9t4p5_local_9_path_1_5, k9t4p5_local_9_path_1_6, k9t4p5_local_9_path_1_7, k9t4p5_local_9_path_1_8, k9t4p5_local_9_path_1_9, k9t4p5_local_9_path_1_10, k9t4p5_local_9_path_1_11⟩ + +private def k9t4p5_local_9_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {2}, Finset.Icc 0 3], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, {0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, ∅, {1, 2}, {1, 2}, {1, 2}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_9_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_2) 0 j = k9t4p5_local_9_required_2 0 j := by decide + +private theorem k9t4p5_local_9_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_2) 1 j = k9t4p5_local_9_required_2 1 j := by decide + +private theorem k9t4p5_local_9_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_2) 2 j = k9t4p5_local_9_required_2 2 j := by decide + +private theorem k9t4p5_local_9_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_2) 3 j = k9t4p5_local_9_required_2 3 j := by decide + +private theorem k9t4p5_local_9_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_2) 4 j = k9t4p5_local_9_required_2 4 j := by decide + +private theorem k9t4p5_local_9_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_2) 5 j = k9t4p5_local_9_required_2 5 j := by decide + +private theorem k9t4p5_local_9_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_2) 6 j = k9t4p5_local_9_required_2 6 j := by decide + +private theorem k9t4p5_local_9_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_2) 7 j = k9t4p5_local_9_required_2 7 j := by decide + +private theorem k9t4p5_local_9_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_2) 8 j = k9t4p5_local_9_required_2 8 j := by decide + +private theorem k9t4p5_local_9_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_2) 9 j = k9t4p5_local_9_required_2 9 j := by decide + +private theorem k9t4p5_local_9_required_2_eq : (requiredMatrix 9 k9t4p5_step_9_required_block_2) = k9t4p5_local_9_required_2 := by + funext i j + fin_cases i + + · exact k9t4p5_local_9_required_2_eq_row_0 j + + · exact k9t4p5_local_9_required_2_eq_row_1 j + + · exact k9t4p5_local_9_required_2_eq_row_2 j + + · exact k9t4p5_local_9_required_2_eq_row_3 j + + · exact k9t4p5_local_9_required_2_eq_row_4 j + + · exact k9t4p5_local_9_required_2_eq_row_5 j + + · exact k9t4p5_local_9_required_2_eq_row_6 j + + · exact k9t4p5_local_9_required_2_eq_row_7 j + + · exact k9t4p5_local_9_required_2_eq_row_8 j + + · exact k9t4p5_local_9_required_2_eq_row_9 j + +private theorem k9t4p5_local_9_path_2_0 : (⟨8, 1, [9, 2, 0, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_2_1 : (⟨8, 0, [9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_2_2 : (⟨9, 0, [1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_2_3 : (⟨9, 4, [1, 2, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_2_4 : (⟨9, 3, [1, 2, 0, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_2_5 : (⟨9, 5, [1, 3, 2, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_2_6 : (⟨9, 4, [1, 3, 2, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_2_7 : (⟨9, 0, [1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_2_8 : (⟨9, 3, [2, 0, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_2_9 : (⟨9, 0, [3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_2_10 : (⟨9, 0, [8, 7, 6, 5, 4, 3, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_2_11 : (⟨9, 5, [8, 7, 0, 2, 1, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_paths_block_2 : ∀ p ∈ k9t4p5_step_9_required_block_2, p.Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by + simp only [k9t4p5_step_9_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_9_path_2_0, k9t4p5_local_9_path_2_1, k9t4p5_local_9_path_2_2, k9t4p5_local_9_path_2_3, k9t4p5_local_9_path_2_4, k9t4p5_local_9_path_2_5, k9t4p5_local_9_path_2_6, k9t4p5_local_9_path_2_7, k9t4p5_local_9_path_2_8, k9t4p5_local_9_path_2_9, k9t4p5_local_9_path_2_10, k9t4p5_local_9_path_2_11⟩ + +private def k9t4p5_local_9_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_9_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_3) 0 j = k9t4p5_local_9_required_3 0 j := by decide + +private theorem k9t4p5_local_9_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_3) 1 j = k9t4p5_local_9_required_3 1 j := by decide + +private theorem k9t4p5_local_9_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_3) 2 j = k9t4p5_local_9_required_3 2 j := by decide + +private theorem k9t4p5_local_9_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_3) 3 j = k9t4p5_local_9_required_3 3 j := by decide + +private theorem k9t4p5_local_9_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_3) 4 j = k9t4p5_local_9_required_3 4 j := by decide + +private theorem k9t4p5_local_9_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_3) 5 j = k9t4p5_local_9_required_3 5 j := by decide + +private theorem k9t4p5_local_9_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_3) 6 j = k9t4p5_local_9_required_3 6 j := by decide + +private theorem k9t4p5_local_9_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_3) 7 j = k9t4p5_local_9_required_3 7 j := by decide + +private theorem k9t4p5_local_9_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_3) 8 j = k9t4p5_local_9_required_3 8 j := by decide + +private theorem k9t4p5_local_9_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_9_required_block_3) 9 j = k9t4p5_local_9_required_3 9 j := by decide + +private theorem k9t4p5_local_9_required_3_eq : (requiredMatrix 9 k9t4p5_step_9_required_block_3) = k9t4p5_local_9_required_3 := by + funext i j + fin_cases i + + · exact k9t4p5_local_9_required_3_eq_row_0 j + + · exact k9t4p5_local_9_required_3_eq_row_1 j + + · exact k9t4p5_local_9_required_3_eq_row_2 j + + · exact k9t4p5_local_9_required_3_eq_row_3 j + + · exact k9t4p5_local_9_required_3_eq_row_4 j + + · exact k9t4p5_local_9_required_3_eq_row_5 j + + · exact k9t4p5_local_9_required_3_eq_row_6 j + + · exact k9t4p5_local_9_required_3_eq_row_7 j + + · exact k9t4p5_local_9_required_3_eq_row_8 j + + · exact k9t4p5_local_9_required_3_eq_row_9 j + +private theorem k9t4p5_local_9_path_3_0 : (⟨9, 6, [8, 7, 0, 2, 1, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_path_3_1 : (⟨9, 6, [8, 7, 0, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by decide + +private theorem k9t4p5_local_9_paths_block_3 : ∀ p ∈ k9t4p5_step_9_required_block_3, p.Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by + simp only [k9t4p5_step_9_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_9_path_3_0, k9t4p5_local_9_path_3_1⟩ + +private theorem k9t4p5_local_9_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_9 a b ∪ ((((k9t4p5_local_9_required_0 a b ∪ k9t4p5_local_9_required_1 a b) ∪ k9t4p5_local_9_required_2 a b) ∪ k9t4p5_local_9_required_3 a b))) 0 j = k9t4p5_local_9 0 j := by decide + +private theorem k9t4p5_local_9_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_9 a b ∪ ((((k9t4p5_local_9_required_0 a b ∪ k9t4p5_local_9_required_1 a b) ∪ k9t4p5_local_9_required_2 a b) ∪ k9t4p5_local_9_required_3 a b))) 1 j = k9t4p5_local_9 1 j := by decide + +private theorem k9t4p5_local_9_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_9 a b ∪ ((((k9t4p5_local_9_required_0 a b ∪ k9t4p5_local_9_required_1 a b) ∪ k9t4p5_local_9_required_2 a b) ∪ k9t4p5_local_9_required_3 a b))) 2 j = k9t4p5_local_9 2 j := by decide + +private theorem k9t4p5_local_9_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_9 a b ∪ ((((k9t4p5_local_9_required_0 a b ∪ k9t4p5_local_9_required_1 a b) ∪ k9t4p5_local_9_required_2 a b) ∪ k9t4p5_local_9_required_3 a b))) 3 j = k9t4p5_local_9 3 j := by decide + +private theorem k9t4p5_local_9_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_9 a b ∪ ((((k9t4p5_local_9_required_0 a b ∪ k9t4p5_local_9_required_1 a b) ∪ k9t4p5_local_9_required_2 a b) ∪ k9t4p5_local_9_required_3 a b))) 4 j = k9t4p5_local_9 4 j := by decide + +private theorem k9t4p5_local_9_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_9 a b ∪ ((((k9t4p5_local_9_required_0 a b ∪ k9t4p5_local_9_required_1 a b) ∪ k9t4p5_local_9_required_2 a b) ∪ k9t4p5_local_9_required_3 a b))) 5 j = k9t4p5_local_9 5 j := by decide + +private theorem k9t4p5_local_9_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_9 a b ∪ ((((k9t4p5_local_9_required_0 a b ∪ k9t4p5_local_9_required_1 a b) ∪ k9t4p5_local_9_required_2 a b) ∪ k9t4p5_local_9_required_3 a b))) 6 j = k9t4p5_local_9 6 j := by decide + +private theorem k9t4p5_local_9_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_9 a b ∪ ((((k9t4p5_local_9_required_0 a b ∪ k9t4p5_local_9_required_1 a b) ∪ k9t4p5_local_9_required_2 a b) ∪ k9t4p5_local_9_required_3 a b))) 7 j = k9t4p5_local_9 7 j := by decide + +private theorem k9t4p5_local_9_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_9 a b ∪ ((((k9t4p5_local_9_required_0 a b ∪ k9t4p5_local_9_required_1 a b) ∪ k9t4p5_local_9_required_2 a b) ∪ k9t4p5_local_9_required_3 a b))) 8 j = k9t4p5_local_9 8 j := by decide + +private theorem k9t4p5_local_9_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_9 a b ∪ ((((k9t4p5_local_9_required_0 a b ∪ k9t4p5_local_9_required_1 a b) ∪ k9t4p5_local_9_required_2 a b) ∪ k9t4p5_local_9_required_3 a b))) 9 j = k9t4p5_local_9 9 j := by decide + +private theorem k9t4p5_local_9_merged_eq : (fun a b => freshMatrix k9t4p5_state_9 a b ∪ ((((k9t4p5_local_9_required_0 a b ∪ k9t4p5_local_9_required_1 a b) ∪ k9t4p5_local_9_required_2 a b) ∪ k9t4p5_local_9_required_3 a b))) = k9t4p5_local_9 := by + funext i j + fin_cases i + + · exact k9t4p5_local_9_merged_eq_row_0 j + + · exact k9t4p5_local_9_merged_eq_row_1 j + + · exact k9t4p5_local_9_merged_eq_row_2 j + + · exact k9t4p5_local_9_merged_eq_row_3 j + + · exact k9t4p5_local_9_merged_eq_row_4 j + + · exact k9t4p5_local_9_merged_eq_row_5 j + + · exact k9t4p5_local_9_merged_eq_row_6 j + + · exact k9t4p5_local_9_merged_eq_row_7 j + + · exact k9t4p5_local_9_merged_eq_row_8 j + + · exact k9t4p5_local_9_merged_eq_row_9 j + +private theorem k9t4p5_local_9_eq : (fun a b => freshMatrix k9t4p5_state_9 a b ∪ requiredMatrix 9 k9t4p5_step_9_data.required a b) = k9t4p5_local_9 := by + funext a b + change freshMatrix k9t4p5_state_9 a b ∪ requiredMatrix 9 (k9t4p5_step_9_required_block_0 ++ k9t4p5_step_9_required_block_1 ++ k9t4p5_step_9_required_block_2 ++ k9t4p5_step_9_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p5_local_9_required_0_eq, k9t4p5_local_9_required_1_eq, k9t4p5_local_9_required_2_eq, k9t4p5_local_9_required_3_eq] + exact congrFun (congrFun k9t4p5_local_9_merged_eq a) b + +private theorem k9t4p5_local_9_paths : ∀ p ∈ k9t4p5_step_9_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 := by + change ∀ p ∈ (k9t4p5_step_9_required_block_0 ++ k9t4p5_step_9_required_block_1 ++ k9t4p5_step_9_required_block_2 ++ k9t4p5_step_9_required_block_3), p.Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p5_local_9_paths_block_0, k9t4p5_local_9_paths_block_1⟩, k9t4p5_local_9_paths_block_2⟩, k9t4p5_local_9_paths_block_3⟩ + +private theorem k9t4p5_local_9_bad : k9t4p5_step_9_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_9_data.i k9t4p5_step_9_data.j) k9t4p5_local_9 9 4 := by decide + +private theorem k9t4p5_step_9_check : k9t4p5_step_9.Check k9t4p5.graph k9t4p5_state_9 9 4 := by + change k9t4p5_step_9_data.Check k9t4p5.graph k9t4p5_state_9 9 4 + refine ⟨by decide, k9t4p5_local_9_paths, ?_⟩ + rw [k9t4p5_local_9_eq] + exact k9t4p5_local_9_bad + +private theorem k9t4p5_update_9 : k9t4p5_step_9.apply k9t4p5_state_9 = k9t4p5_state_10 := by + have h : ∀ i j : Fin 9, k9t4p5_step_9.apply k9t4p5_state_9 i j = k9t4p5_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_11 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_10 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 5, {0, 1}, ∅, {0, 1}, {1, 2}, {0, 1}, ∅, Finset.Icc 0 5, {1}], + #[Finset.Icc 0 5, ∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {0, 1, 3, 4, 5}, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2}], + #[{0, 1}, {1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {4, 5, 6}, Finset.Icc 4 7, ∅], + #[{0, 1}, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {0, 1, 2, 4, 5, 6}, Finset.Icc 4 7], + #[{1, 2}, Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 1 6, {4, 5, 6}], + #[{0, 1}, {0, 1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 4, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {0, 1, 2, 4, 5, 6}, Finset.Icc 1 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1}, {1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_10_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, {1}, {0, 1}, ∅, {4}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, {1}, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅], + #[∅, {0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, {4}, ∅, ∅, {0}, {1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_10_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_0) 0 j = k9t4p5_local_10_required_0 0 j := by decide + +private theorem k9t4p5_local_10_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_0) 1 j = k9t4p5_local_10_required_0 1 j := by decide + +private theorem k9t4p5_local_10_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_0) 2 j = k9t4p5_local_10_required_0 2 j := by decide + +private theorem k9t4p5_local_10_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_0) 3 j = k9t4p5_local_10_required_0 3 j := by decide + +private theorem k9t4p5_local_10_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_0) 4 j = k9t4p5_local_10_required_0 4 j := by decide + +private theorem k9t4p5_local_10_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_0) 5 j = k9t4p5_local_10_required_0 5 j := by decide + +private theorem k9t4p5_local_10_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_0) 6 j = k9t4p5_local_10_required_0 6 j := by decide + +private theorem k9t4p5_local_10_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_0) 7 j = k9t4p5_local_10_required_0 7 j := by decide + +private theorem k9t4p5_local_10_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_0) 8 j = k9t4p5_local_10_required_0 8 j := by decide + +private theorem k9t4p5_local_10_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_0) 9 j = k9t4p5_local_10_required_0 9 j := by decide + +private theorem k9t4p5_local_10_required_0_eq : (requiredMatrix 9 k9t4p5_step_10_required_block_0) = k9t4p5_local_10_required_0 := by + funext i j + fin_cases i + + · exact k9t4p5_local_10_required_0_eq_row_0 j + + · exact k9t4p5_local_10_required_0_eq_row_1 j + + · exact k9t4p5_local_10_required_0_eq_row_2 j + + · exact k9t4p5_local_10_required_0_eq_row_3 j + + · exact k9t4p5_local_10_required_0_eq_row_4 j + + · exact k9t4p5_local_10_required_0_eq_row_5 j + + · exact k9t4p5_local_10_required_0_eq_row_6 j + + · exact k9t4p5_local_10_required_0_eq_row_7 j + + · exact k9t4p5_local_10_required_0_eq_row_8 j + + · exact k9t4p5_local_10_required_0_eq_row_9 j + +private theorem k9t4p5_local_10_path_0_0 : (⟨1, 0, [2, 9, 8, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_0_1 : (⟨1, 5, [2, 9, 8, 7, 0, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_0_2 : (⟨1, 6, [2, 9, 8, 7, 0, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_0_3 : (⟨1, 0, [9, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_0_4 : (⟨1, 0, [9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_0_5 : (⟨1, 6, [9, 8, 7, 0, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_0_6 : (⟨8, 1, [7, 0, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_0_7 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_0_8 : (⟨8, 5, [9, 1, 2, 3, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_0_9 : (⟨8, 4, [9, 1, 2, 3, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_0_10 : (⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_0_11 : (⟨8, 5, [9, 1, 3, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_paths_block_0 : ∀ p ∈ k9t4p5_step_10_required_block_0, p.Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by + simp only [k9t4p5_step_10_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_10_path_0_0, k9t4p5_local_10_path_0_1, k9t4p5_local_10_path_0_2, k9t4p5_local_10_path_0_3, k9t4p5_local_10_path_0_4, k9t4p5_local_10_path_0_5, k9t4p5_local_10_path_0_6, k9t4p5_local_10_path_0_7, k9t4p5_local_10_path_0_8, k9t4p5_local_10_path_0_9, k9t4p5_local_10_path_0_10, k9t4p5_local_10_path_0_11⟩ + +private def k9t4p5_local_10_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1, 5}, ∅, ∅, {0, 1}, {1, 2}, ∅, ∅, Finset.Icc 2 5, ∅], + #[{1, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 2 5, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_10_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_1) 0 j = k9t4p5_local_10_required_1 0 j := by decide + +private theorem k9t4p5_local_10_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_1) 1 j = k9t4p5_local_10_required_1 1 j := by decide + +private theorem k9t4p5_local_10_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_1) 2 j = k9t4p5_local_10_required_1 2 j := by decide + +private theorem k9t4p5_local_10_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_1) 3 j = k9t4p5_local_10_required_1 3 j := by decide + +private theorem k9t4p5_local_10_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_1) 4 j = k9t4p5_local_10_required_1 4 j := by decide + +private theorem k9t4p5_local_10_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_1) 5 j = k9t4p5_local_10_required_1 5 j := by decide + +private theorem k9t4p5_local_10_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_1) 6 j = k9t4p5_local_10_required_1 6 j := by decide + +private theorem k9t4p5_local_10_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_1) 7 j = k9t4p5_local_10_required_1 7 j := by decide + +private theorem k9t4p5_local_10_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_1) 8 j = k9t4p5_local_10_required_1 8 j := by decide + +private theorem k9t4p5_local_10_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_1) 9 j = k9t4p5_local_10_required_1 9 j := by decide + +private theorem k9t4p5_local_10_required_1_eq : (requiredMatrix 9 k9t4p5_step_10_required_block_1) = k9t4p5_local_10_required_1 := by + funext i j + fin_cases i + + · exact k9t4p5_local_10_required_1_eq_row_0 j + + · exact k9t4p5_local_10_required_1_eq_row_1 j + + · exact k9t4p5_local_10_required_1_eq_row_2 j + + · exact k9t4p5_local_10_required_1_eq_row_3 j + + · exact k9t4p5_local_10_required_1_eq_row_4 j + + · exact k9t4p5_local_10_required_1_eq_row_5 j + + · exact k9t4p5_local_10_required_1_eq_row_6 j + + · exact k9t4p5_local_10_required_1_eq_row_7 j + + · exact k9t4p5_local_10_required_1_eq_row_8 j + + · exact k9t4p5_local_10_required_1_eq_row_9 j + +private theorem k9t4p5_local_10_path_1_0 : (⟨8, 4, [9, 1, 3, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_1_1 : (⟨8, 0, [9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_1_2 : (⟨8, 4, [9, 3, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_1_3 : (⟨0, 8, [3, 1, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_1_4 : (⟨0, 5, [3, 1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_1_5 : (⟨0, 4, [3, 1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_1_6 : (⟨0, 8, [3, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_1_7 : (⟨0, 5, [3, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_1_8 : (⟨0, 4, [3, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_1_9 : (⟨0, 1, [3, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_1_10 : (⟨0, 8, [3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_1_11 : (⟨0, 1, [3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_paths_block_1 : ∀ p ∈ k9t4p5_step_10_required_block_1, p.Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by + simp only [k9t4p5_step_10_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_10_path_1_0, k9t4p5_local_10_path_1_1, k9t4p5_local_10_path_1_2, k9t4p5_local_10_path_1_3, k9t4p5_local_10_path_1_4, k9t4p5_local_10_path_1_5, k9t4p5_local_10_path_1_6, k9t4p5_local_10_path_1_7, k9t4p5_local_10_path_1_8, k9t4p5_local_10_path_1_9, k9t4p5_local_10_path_1_10, k9t4p5_local_10_path_1_11⟩ + +private def k9t4p5_local_10_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 2, 3, 4}, {0, 1}, ∅, ∅, ∅, {0, 1}, ∅, {0, 1, 2}, {1}], + #[{0, 2, 3, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_10_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_2) 0 j = k9t4p5_local_10_required_2 0 j := by decide + +private theorem k9t4p5_local_10_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_2) 1 j = k9t4p5_local_10_required_2 1 j := by decide + +private theorem k9t4p5_local_10_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_2) 2 j = k9t4p5_local_10_required_2 2 j := by decide + +private theorem k9t4p5_local_10_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_2) 3 j = k9t4p5_local_10_required_2 3 j := by decide + +private theorem k9t4p5_local_10_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_2) 4 j = k9t4p5_local_10_required_2 4 j := by decide + +private theorem k9t4p5_local_10_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_2) 5 j = k9t4p5_local_10_required_2 5 j := by decide + +private theorem k9t4p5_local_10_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_2) 6 j = k9t4p5_local_10_required_2 6 j := by decide + +private theorem k9t4p5_local_10_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_2) 7 j = k9t4p5_local_10_required_2 7 j := by decide + +private theorem k9t4p5_local_10_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_2) 8 j = k9t4p5_local_10_required_2 8 j := by decide + +private theorem k9t4p5_local_10_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_10_required_block_2) 9 j = k9t4p5_local_10_required_2 9 j := by decide + +private theorem k9t4p5_local_10_required_2_eq : (requiredMatrix 9 k9t4p5_step_10_required_block_2) = k9t4p5_local_10_required_2 := by + funext i j + fin_cases i + + · exact k9t4p5_local_10_required_2_eq_row_0 j + + · exact k9t4p5_local_10_required_2_eq_row_1 j + + · exact k9t4p5_local_10_required_2_eq_row_2 j + + · exact k9t4p5_local_10_required_2_eq_row_3 j + + · exact k9t4p5_local_10_required_2_eq_row_4 j + + · exact k9t4p5_local_10_required_2_eq_row_5 j + + · exact k9t4p5_local_10_required_2_eq_row_6 j + + · exact k9t4p5_local_10_required_2_eq_row_7 j + + · exact k9t4p5_local_10_required_2_eq_row_8 j + + · exact k9t4p5_local_10_required_2_eq_row_9 j + +private theorem k9t4p5_local_10_path_2_0 : (⟨0, 2, [3, 4, 5, 6, 7, 8, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_2_1 : (⟨0, 2, [3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_2_2 : (⟨0, 1, [3, 4, 5, 6, 7, 8, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_2_3 : (⟨0, 1, [7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_2_4 : (⟨0, 9, [7, 6, 5, 4, 3, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_2_5 : (⟨0, 8, [7, 6, 5, 4, 3, 1, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_2_6 : (⟨0, 8, [7, 6, 5, 4, 3, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_2_7 : (⟨0, 1, [7, 6, 5, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_2_8 : (⟨0, 8, [7, 6, 5, 4, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_2_9 : (⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_2_10 : (⟨0, 6, [7, 8, 9, 1, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_path_2_11 : (⟨0, 1, [7, 8, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by decide + +private theorem k9t4p5_local_10_paths_block_2 : ∀ p ∈ k9t4p5_step_10_required_block_2, p.Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by + simp only [k9t4p5_step_10_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_10_path_2_0, k9t4p5_local_10_path_2_1, k9t4p5_local_10_path_2_2, k9t4p5_local_10_path_2_3, k9t4p5_local_10_path_2_4, k9t4p5_local_10_path_2_5, k9t4p5_local_10_path_2_6, k9t4p5_local_10_path_2_7, k9t4p5_local_10_path_2_8, k9t4p5_local_10_path_2_9, k9t4p5_local_10_path_2_10, k9t4p5_local_10_path_2_11⟩ + +private theorem k9t4p5_local_10_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_10 a b ∪ (((k9t4p5_local_10_required_0 a b ∪ k9t4p5_local_10_required_1 a b) ∪ k9t4p5_local_10_required_2 a b))) 0 j = k9t4p5_local_10 0 j := by decide + +private theorem k9t4p5_local_10_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_10 a b ∪ (((k9t4p5_local_10_required_0 a b ∪ k9t4p5_local_10_required_1 a b) ∪ k9t4p5_local_10_required_2 a b))) 1 j = k9t4p5_local_10 1 j := by decide + +private theorem k9t4p5_local_10_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_10 a b ∪ (((k9t4p5_local_10_required_0 a b ∪ k9t4p5_local_10_required_1 a b) ∪ k9t4p5_local_10_required_2 a b))) 2 j = k9t4p5_local_10 2 j := by decide + +private theorem k9t4p5_local_10_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_10 a b ∪ (((k9t4p5_local_10_required_0 a b ∪ k9t4p5_local_10_required_1 a b) ∪ k9t4p5_local_10_required_2 a b))) 3 j = k9t4p5_local_10 3 j := by decide + +private theorem k9t4p5_local_10_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_10 a b ∪ (((k9t4p5_local_10_required_0 a b ∪ k9t4p5_local_10_required_1 a b) ∪ k9t4p5_local_10_required_2 a b))) 4 j = k9t4p5_local_10 4 j := by decide + +private theorem k9t4p5_local_10_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_10 a b ∪ (((k9t4p5_local_10_required_0 a b ∪ k9t4p5_local_10_required_1 a b) ∪ k9t4p5_local_10_required_2 a b))) 5 j = k9t4p5_local_10 5 j := by decide + +private theorem k9t4p5_local_10_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_10 a b ∪ (((k9t4p5_local_10_required_0 a b ∪ k9t4p5_local_10_required_1 a b) ∪ k9t4p5_local_10_required_2 a b))) 6 j = k9t4p5_local_10 6 j := by decide + +private theorem k9t4p5_local_10_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_10 a b ∪ (((k9t4p5_local_10_required_0 a b ∪ k9t4p5_local_10_required_1 a b) ∪ k9t4p5_local_10_required_2 a b))) 7 j = k9t4p5_local_10 7 j := by decide + +private theorem k9t4p5_local_10_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_10 a b ∪ (((k9t4p5_local_10_required_0 a b ∪ k9t4p5_local_10_required_1 a b) ∪ k9t4p5_local_10_required_2 a b))) 8 j = k9t4p5_local_10 8 j := by decide + +private theorem k9t4p5_local_10_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_10 a b ∪ (((k9t4p5_local_10_required_0 a b ∪ k9t4p5_local_10_required_1 a b) ∪ k9t4p5_local_10_required_2 a b))) 9 j = k9t4p5_local_10 9 j := by decide + +private theorem k9t4p5_local_10_merged_eq : (fun a b => freshMatrix k9t4p5_state_10 a b ∪ (((k9t4p5_local_10_required_0 a b ∪ k9t4p5_local_10_required_1 a b) ∪ k9t4p5_local_10_required_2 a b))) = k9t4p5_local_10 := by + funext i j + fin_cases i + + · exact k9t4p5_local_10_merged_eq_row_0 j + + · exact k9t4p5_local_10_merged_eq_row_1 j + + · exact k9t4p5_local_10_merged_eq_row_2 j + + · exact k9t4p5_local_10_merged_eq_row_3 j + + · exact k9t4p5_local_10_merged_eq_row_4 j + + · exact k9t4p5_local_10_merged_eq_row_5 j + + · exact k9t4p5_local_10_merged_eq_row_6 j + + · exact k9t4p5_local_10_merged_eq_row_7 j + + · exact k9t4p5_local_10_merged_eq_row_8 j + + · exact k9t4p5_local_10_merged_eq_row_9 j + +private theorem k9t4p5_local_10_eq : (fun a b => freshMatrix k9t4p5_state_10 a b ∪ requiredMatrix 9 k9t4p5_step_10_data.required a b) = k9t4p5_local_10 := by + funext a b + change freshMatrix k9t4p5_state_10 a b ∪ requiredMatrix 9 (k9t4p5_step_10_required_block_0 ++ k9t4p5_step_10_required_block_1 ++ k9t4p5_step_10_required_block_2) a b = _ + simp only [requiredMatrix_append, k9t4p5_local_10_required_0_eq, k9t4p5_local_10_required_1_eq, k9t4p5_local_10_required_2_eq] + exact congrFun (congrFun k9t4p5_local_10_merged_eq a) b + +private theorem k9t4p5_local_10_paths : ∀ p ∈ k9t4p5_step_10_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 := by + change ∀ p ∈ (k9t4p5_step_10_required_block_0 ++ k9t4p5_step_10_required_block_1 ++ k9t4p5_step_10_required_block_2), p.Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨k9t4p5_local_10_paths_block_0, k9t4p5_local_10_paths_block_1⟩, k9t4p5_local_10_paths_block_2⟩ + +private theorem k9t4p5_local_10_bad : k9t4p5_step_10_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_10_data.i k9t4p5_step_10_data.j) k9t4p5_local_10 9 4 := by decide + +private theorem k9t4p5_step_10_check : k9t4p5_step_10.Check k9t4p5.graph k9t4p5_state_10 9 4 := by + change k9t4p5_step_10_data.Check k9t4p5.graph k9t4p5_state_10 9 4 + refine ⟨by decide, k9t4p5_local_10_paths, ?_⟩ + rw [k9t4p5_local_10_eq] + exact k9t4p5_local_10_bad + +private theorem k9t4p5_update_10 : k9t4p5_step_10.apply k9t4p5_state_10 = k9t4p5_state_11 := by + have h : ∀ i j : Fin 9, k9t4p5_step_10.apply k9t4p5_state_10 i j = k9t4p5_state_11 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_12 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[{1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_11 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 5, {0, 1}, {0, 1}, ∅, {0, 1}, Finset.Icc 0 3, ∅, Finset.Icc 0 5, {1}], + #[Finset.Icc 0 5, ∅, {1, 2}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2}], + #[{0, 1}, {1, 2}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {0, 1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{0, 1}, {1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, {0}, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[∅, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}, Finset.Icc 4 7], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 0 6, {4, 5, 6}], + #[Finset.Icc 0 3, Finset.Icc 0 5, {0, 1}, {0}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1}, {1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_11_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, {2}, ∅, ∅, {1}, {0, 1, 2}, ∅, ∅, ∅], + #[∅, {2}, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, {0, 1, 2}, {0}, {0}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_11_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_0) 0 j = k9t4p5_local_11_required_0 0 j := by decide + +private theorem k9t4p5_local_11_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_0) 1 j = k9t4p5_local_11_required_0 1 j := by decide + +private theorem k9t4p5_local_11_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_0) 2 j = k9t4p5_local_11_required_0 2 j := by decide + +private theorem k9t4p5_local_11_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_0) 3 j = k9t4p5_local_11_required_0 3 j := by decide + +private theorem k9t4p5_local_11_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_0) 4 j = k9t4p5_local_11_required_0 4 j := by decide + +private theorem k9t4p5_local_11_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_0) 5 j = k9t4p5_local_11_required_0 5 j := by decide + +private theorem k9t4p5_local_11_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_0) 6 j = k9t4p5_local_11_required_0 6 j := by decide + +private theorem k9t4p5_local_11_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_0) 7 j = k9t4p5_local_11_required_0 7 j := by decide + +private theorem k9t4p5_local_11_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_0) 8 j = k9t4p5_local_11_required_0 8 j := by decide + +private theorem k9t4p5_local_11_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_0) 9 j = k9t4p5_local_11_required_0 9 j := by decide + +private theorem k9t4p5_local_11_required_0_eq : (requiredMatrix 9 k9t4p5_step_11_required_block_0) = k9t4p5_local_11_required_0 := by + funext i j + fin_cases i + + · exact k9t4p5_local_11_required_0_eq_row_0 j + + · exact k9t4p5_local_11_required_0_eq_row_1 j + + · exact k9t4p5_local_11_required_0_eq_row_2 j + + · exact k9t4p5_local_11_required_0_eq_row_3 j + + · exact k9t4p5_local_11_required_0_eq_row_4 j + + · exact k9t4p5_local_11_required_0_eq_row_5 j + + · exact k9t4p5_local_11_required_0_eq_row_6 j + + · exact k9t4p5_local_11_required_0_eq_row_7 j + + · exact k9t4p5_local_11_required_0_eq_row_8 j + + · exact k9t4p5_local_11_required_0_eq_row_9 j + +private theorem k9t4p5_local_11_path_0_0 : (⟨1, 0, [2, 3, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_0_1 : (⟨1, 6, [2, 3, 9, 8, 7, 0, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_0_2 : (⟨1, 6, [2, 9, 8, 7, 0, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_0_3 : (⟨1, 0, [9, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_0_4 : (⟨1, 6, [9, 2, 3, 4, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_0_5 : (⟨1, 5, [9, 2, 3, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_0_6 : (⟨1, 0, [9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_0_7 : (⟨1, 2, [9, 8, 7, 0, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_0_8 : (⟨6, 0, [5, 4, 3, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_0_9 : (⟨6, 3, [5, 4, 0, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_0_10 : (⟨6, 2, [5, 4, 0, 7, 8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_0_11 : (⟨6, 1, [5, 4, 0, 7, 8, 9, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_paths_block_0 : ∀ p ∈ k9t4p5_step_11_required_block_0, p.Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by + simp only [k9t4p5_step_11_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_11_path_0_0, k9t4p5_local_11_path_0_1, k9t4p5_local_11_path_0_2, k9t4p5_local_11_path_0_3, k9t4p5_local_11_path_0_4, k9t4p5_local_11_path_0_5, k9t4p5_local_11_path_0_6, k9t4p5_local_11_path_0_7, k9t4p5_local_11_path_0_8, k9t4p5_local_11_path_0_9, k9t4p5_local_11_path_0_10, k9t4p5_local_11_path_0_11⟩ + +private def k9t4p5_local_11_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, {0}, {1}, ∅, Finset.Icc 0 4, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {4}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, {4}, ∅, ∅, ∅, {0, 1, 2}, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_11_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_1) 0 j = k9t4p5_local_11_required_1 0 j := by decide + +private theorem k9t4p5_local_11_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_1) 1 j = k9t4p5_local_11_required_1 1 j := by decide + +private theorem k9t4p5_local_11_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_1) 2 j = k9t4p5_local_11_required_1 2 j := by decide + +private theorem k9t4p5_local_11_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_1) 3 j = k9t4p5_local_11_required_1 3 j := by decide + +private theorem k9t4p5_local_11_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_1) 4 j = k9t4p5_local_11_required_1 4 j := by decide + +private theorem k9t4p5_local_11_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_1) 5 j = k9t4p5_local_11_required_1 5 j := by decide + +private theorem k9t4p5_local_11_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_1) 6 j = k9t4p5_local_11_required_1 6 j := by decide + +private theorem k9t4p5_local_11_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_1) 7 j = k9t4p5_local_11_required_1 7 j := by decide + +private theorem k9t4p5_local_11_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_1) 8 j = k9t4p5_local_11_required_1 8 j := by decide + +private theorem k9t4p5_local_11_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_1) 9 j = k9t4p5_local_11_required_1 9 j := by decide + +private theorem k9t4p5_local_11_required_1_eq : (requiredMatrix 9 k9t4p5_step_11_required_block_1) = k9t4p5_local_11_required_1 := by + funext i j + fin_cases i + + · exact k9t4p5_local_11_required_1_eq_row_0 j + + · exact k9t4p5_local_11_required_1_eq_row_1 j + + · exact k9t4p5_local_11_required_1_eq_row_2 j + + · exact k9t4p5_local_11_required_1_eq_row_3 j + + · exact k9t4p5_local_11_required_1_eq_row_4 j + + · exact k9t4p5_local_11_required_1_eq_row_5 j + + · exact k9t4p5_local_11_required_1_eq_row_6 j + + · exact k9t4p5_local_11_required_1_eq_row_7 j + + · exact k9t4p5_local_11_required_1_eq_row_8 j + + · exact k9t4p5_local_11_required_1_eq_row_9 j + +private theorem k9t4p5_local_11_path_1_0 : (⟨8, 1, [7, 0, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_1_1 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_1_2 : (⟨8, 6, [9, 1, 2, 3, 4, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_1_3 : (⟨8, 5, [9, 1, 2, 3, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_1_4 : (⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_1_5 : (⟨8, 5, [9, 1, 3, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_1_6 : (⟨8, 0, [9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_1_7 : (⟨8, 5, [9, 3, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_1_8 : (⟨0, 8, [4, 3, 1, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_1_9 : (⟨0, 6, [4, 3, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_1_10 : (⟨0, 5, [4, 3, 1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_1_11 : (⟨0, 8, [4, 3, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_paths_block_1 : ∀ p ∈ k9t4p5_step_11_required_block_1, p.Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by + simp only [k9t4p5_step_11_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_11_path_1_0, k9t4p5_local_11_path_1_1, k9t4p5_local_11_path_1_2, k9t4p5_local_11_path_1_3, k9t4p5_local_11_path_1_4, k9t4p5_local_11_path_1_5, k9t4p5_local_11_path_1_6, k9t4p5_local_11_path_1_7, k9t4p5_local_11_path_1_8, k9t4p5_local_11_path_1_9, k9t4p5_local_11_path_1_10, k9t4p5_local_11_path_1_11⟩ + +private def k9t4p5_local_11_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1, 2, 4, 5}, {0, 1}, {0, 1}, ∅, {1}, {2, 3}, ∅, {5}, ∅], + #[{1, 2, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_11_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_2) 0 j = k9t4p5_local_11_required_2 0 j := by decide + +private theorem k9t4p5_local_11_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_2) 1 j = k9t4p5_local_11_required_2 1 j := by decide + +private theorem k9t4p5_local_11_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_2) 2 j = k9t4p5_local_11_required_2 2 j := by decide + +private theorem k9t4p5_local_11_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_2) 3 j = k9t4p5_local_11_required_2 3 j := by decide + +private theorem k9t4p5_local_11_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_2) 4 j = k9t4p5_local_11_required_2 4 j := by decide + +private theorem k9t4p5_local_11_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_2) 5 j = k9t4p5_local_11_required_2 5 j := by decide + +private theorem k9t4p5_local_11_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_2) 6 j = k9t4p5_local_11_required_2 6 j := by decide + +private theorem k9t4p5_local_11_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_2) 7 j = k9t4p5_local_11_required_2 7 j := by decide + +private theorem k9t4p5_local_11_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_2) 8 j = k9t4p5_local_11_required_2 8 j := by decide + +private theorem k9t4p5_local_11_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_2) 9 j = k9t4p5_local_11_required_2 9 j := by decide + +private theorem k9t4p5_local_11_required_2_eq : (requiredMatrix 9 k9t4p5_step_11_required_block_2) = k9t4p5_local_11_required_2 := by + funext i j + fin_cases i + + · exact k9t4p5_local_11_required_2_eq_row_0 j + + · exact k9t4p5_local_11_required_2_eq_row_1 j + + · exact k9t4p5_local_11_required_2_eq_row_2 j + + · exact k9t4p5_local_11_required_2_eq_row_3 j + + · exact k9t4p5_local_11_required_2_eq_row_4 j + + · exact k9t4p5_local_11_required_2_eq_row_5 j + + · exact k9t4p5_local_11_required_2_eq_row_6 j + + · exact k9t4p5_local_11_required_2_eq_row_7 j + + · exact k9t4p5_local_11_required_2_eq_row_8 j + + · exact k9t4p5_local_11_required_2_eq_row_9 j + +private theorem k9t4p5_local_11_path_2_0 : (⟨0, 6, [4, 3, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_2_1 : (⟨0, 5, [4, 3, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_2_2 : (⟨0, 1, [4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_2_3 : (⟨0, 1, [4, 3, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_2_4 : (⟨0, 8, [4, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_2_5 : (⟨0, 6, [4, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_2_6 : (⟨0, 1, [4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_2_7 : (⟨0, 2, [4, 5, 6, 7, 8, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_2_8 : (⟨0, 3, [4, 5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_2_9 : (⟨0, 3, [4, 5, 6, 7, 8, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_2_10 : (⟨0, 2, [4, 5, 6, 7, 8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_2_11 : (⟨0, 1, [4, 5, 6, 7, 8, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_paths_block_2 : ∀ p ∈ k9t4p5_step_11_required_block_2, p.Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by + simp only [k9t4p5_step_11_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_11_path_2_0, k9t4p5_local_11_path_2_1, k9t4p5_local_11_path_2_2, k9t4p5_local_11_path_2_3, k9t4p5_local_11_path_2_4, k9t4p5_local_11_path_2_5, k9t4p5_local_11_path_2_6, k9t4p5_local_11_path_2_7, k9t4p5_local_11_path_2_8, k9t4p5_local_11_path_2_9, k9t4p5_local_11_path_2_10, k9t4p5_local_11_path_2_11⟩ + +private def k9t4p5_local_11_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 3}, ∅, ∅, ∅, ∅, {0}, ∅, {0, 1, 2}, {1}], + #[{0, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_11_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_3) 0 j = k9t4p5_local_11_required_3 0 j := by decide + +private theorem k9t4p5_local_11_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_3) 1 j = k9t4p5_local_11_required_3 1 j := by decide + +private theorem k9t4p5_local_11_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_3) 2 j = k9t4p5_local_11_required_3 2 j := by decide + +private theorem k9t4p5_local_11_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_3) 3 j = k9t4p5_local_11_required_3 3 j := by decide + +private theorem k9t4p5_local_11_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_3) 4 j = k9t4p5_local_11_required_3 4 j := by decide + +private theorem k9t4p5_local_11_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_3) 5 j = k9t4p5_local_11_required_3 5 j := by decide + +private theorem k9t4p5_local_11_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_3) 6 j = k9t4p5_local_11_required_3 6 j := by decide + +private theorem k9t4p5_local_11_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_3) 7 j = k9t4p5_local_11_required_3 7 j := by decide + +private theorem k9t4p5_local_11_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_3) 8 j = k9t4p5_local_11_required_3 8 j := by decide + +private theorem k9t4p5_local_11_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_11_required_block_3) 9 j = k9t4p5_local_11_required_3 9 j := by decide + +private theorem k9t4p5_local_11_required_3_eq : (requiredMatrix 9 k9t4p5_step_11_required_block_3) = k9t4p5_local_11_required_3 := by + funext i j + fin_cases i + + · exact k9t4p5_local_11_required_3_eq_row_0 j + + · exact k9t4p5_local_11_required_3_eq_row_1 j + + · exact k9t4p5_local_11_required_3_eq_row_2 j + + · exact k9t4p5_local_11_required_3_eq_row_3 j + + · exact k9t4p5_local_11_required_3_eq_row_4 j + + · exact k9t4p5_local_11_required_3_eq_row_5 j + + · exact k9t4p5_local_11_required_3_eq_row_6 j + + · exact k9t4p5_local_11_required_3_eq_row_7 j + + · exact k9t4p5_local_11_required_3_eq_row_8 j + + · exact k9t4p5_local_11_required_3_eq_row_9 j + +private theorem k9t4p5_local_11_path_3_0 : (⟨0, 1, [4, 5, 6, 7, 8, 9, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_3_1 : (⟨0, 1, [7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_3_2 : (⟨0, 9, [7, 6, 5, 4, 3, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_3_3 : (⟨0, 8, [7, 6, 5, 4, 3, 1, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_3_4 : (⟨0, 8, [7, 6, 5, 4, 3, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_3_5 : (⟨0, 8, [7, 6, 5, 4, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_path_3_6 : (⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by decide + +private theorem k9t4p5_local_11_paths_block_3 : ∀ p ∈ k9t4p5_step_11_required_block_3, p.Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by + simp only [k9t4p5_step_11_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_11_path_3_0, k9t4p5_local_11_path_3_1, k9t4p5_local_11_path_3_2, k9t4p5_local_11_path_3_3, k9t4p5_local_11_path_3_4, k9t4p5_local_11_path_3_5, k9t4p5_local_11_path_3_6⟩ + +private theorem k9t4p5_local_11_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_11 a b ∪ ((((k9t4p5_local_11_required_0 a b ∪ k9t4p5_local_11_required_1 a b) ∪ k9t4p5_local_11_required_2 a b) ∪ k9t4p5_local_11_required_3 a b))) 0 j = k9t4p5_local_11 0 j := by decide + +private theorem k9t4p5_local_11_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_11 a b ∪ ((((k9t4p5_local_11_required_0 a b ∪ k9t4p5_local_11_required_1 a b) ∪ k9t4p5_local_11_required_2 a b) ∪ k9t4p5_local_11_required_3 a b))) 1 j = k9t4p5_local_11 1 j := by decide + +private theorem k9t4p5_local_11_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_11 a b ∪ ((((k9t4p5_local_11_required_0 a b ∪ k9t4p5_local_11_required_1 a b) ∪ k9t4p5_local_11_required_2 a b) ∪ k9t4p5_local_11_required_3 a b))) 2 j = k9t4p5_local_11 2 j := by decide + +private theorem k9t4p5_local_11_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_11 a b ∪ ((((k9t4p5_local_11_required_0 a b ∪ k9t4p5_local_11_required_1 a b) ∪ k9t4p5_local_11_required_2 a b) ∪ k9t4p5_local_11_required_3 a b))) 3 j = k9t4p5_local_11 3 j := by decide + +private theorem k9t4p5_local_11_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_11 a b ∪ ((((k9t4p5_local_11_required_0 a b ∪ k9t4p5_local_11_required_1 a b) ∪ k9t4p5_local_11_required_2 a b) ∪ k9t4p5_local_11_required_3 a b))) 4 j = k9t4p5_local_11 4 j := by decide + +private theorem k9t4p5_local_11_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_11 a b ∪ ((((k9t4p5_local_11_required_0 a b ∪ k9t4p5_local_11_required_1 a b) ∪ k9t4p5_local_11_required_2 a b) ∪ k9t4p5_local_11_required_3 a b))) 5 j = k9t4p5_local_11 5 j := by decide + +private theorem k9t4p5_local_11_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_11 a b ∪ ((((k9t4p5_local_11_required_0 a b ∪ k9t4p5_local_11_required_1 a b) ∪ k9t4p5_local_11_required_2 a b) ∪ k9t4p5_local_11_required_3 a b))) 6 j = k9t4p5_local_11 6 j := by decide + +private theorem k9t4p5_local_11_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_11 a b ∪ ((((k9t4p5_local_11_required_0 a b ∪ k9t4p5_local_11_required_1 a b) ∪ k9t4p5_local_11_required_2 a b) ∪ k9t4p5_local_11_required_3 a b))) 7 j = k9t4p5_local_11 7 j := by decide + +private theorem k9t4p5_local_11_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_11 a b ∪ ((((k9t4p5_local_11_required_0 a b ∪ k9t4p5_local_11_required_1 a b) ∪ k9t4p5_local_11_required_2 a b) ∪ k9t4p5_local_11_required_3 a b))) 8 j = k9t4p5_local_11 8 j := by decide + +private theorem k9t4p5_local_11_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_11 a b ∪ ((((k9t4p5_local_11_required_0 a b ∪ k9t4p5_local_11_required_1 a b) ∪ k9t4p5_local_11_required_2 a b) ∪ k9t4p5_local_11_required_3 a b))) 9 j = k9t4p5_local_11 9 j := by decide + +private theorem k9t4p5_local_11_merged_eq : (fun a b => freshMatrix k9t4p5_state_11 a b ∪ ((((k9t4p5_local_11_required_0 a b ∪ k9t4p5_local_11_required_1 a b) ∪ k9t4p5_local_11_required_2 a b) ∪ k9t4p5_local_11_required_3 a b))) = k9t4p5_local_11 := by + funext i j + fin_cases i + + · exact k9t4p5_local_11_merged_eq_row_0 j + + · exact k9t4p5_local_11_merged_eq_row_1 j + + · exact k9t4p5_local_11_merged_eq_row_2 j + + · exact k9t4p5_local_11_merged_eq_row_3 j + + · exact k9t4p5_local_11_merged_eq_row_4 j + + · exact k9t4p5_local_11_merged_eq_row_5 j + + · exact k9t4p5_local_11_merged_eq_row_6 j + + · exact k9t4p5_local_11_merged_eq_row_7 j + + · exact k9t4p5_local_11_merged_eq_row_8 j + + · exact k9t4p5_local_11_merged_eq_row_9 j + +private theorem k9t4p5_local_11_eq : (fun a b => freshMatrix k9t4p5_state_11 a b ∪ requiredMatrix 9 k9t4p5_step_11_data.required a b) = k9t4p5_local_11 := by + funext a b + change freshMatrix k9t4p5_state_11 a b ∪ requiredMatrix 9 (k9t4p5_step_11_required_block_0 ++ k9t4p5_step_11_required_block_1 ++ k9t4p5_step_11_required_block_2 ++ k9t4p5_step_11_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p5_local_11_required_0_eq, k9t4p5_local_11_required_1_eq, k9t4p5_local_11_required_2_eq, k9t4p5_local_11_required_3_eq] + exact congrFun (congrFun k9t4p5_local_11_merged_eq a) b + +private theorem k9t4p5_local_11_paths : ∀ p ∈ k9t4p5_step_11_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 := by + change ∀ p ∈ (k9t4p5_step_11_required_block_0 ++ k9t4p5_step_11_required_block_1 ++ k9t4p5_step_11_required_block_2 ++ k9t4p5_step_11_required_block_3), p.Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p5_local_11_paths_block_0, k9t4p5_local_11_paths_block_1⟩, k9t4p5_local_11_paths_block_2⟩, k9t4p5_local_11_paths_block_3⟩ + +private theorem k9t4p5_local_11_bad : k9t4p5_step_11_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_11_data.i k9t4p5_step_11_data.j) k9t4p5_local_11 9 4 := by decide + +private theorem k9t4p5_step_11_check : k9t4p5_step_11.Check k9t4p5.graph k9t4p5_state_11 9 4 := by + change k9t4p5_step_11_data.Check k9t4p5.graph k9t4p5_state_11 9 4 + refine ⟨by decide, k9t4p5_local_11_paths, ?_⟩ + rw [k9t4p5_local_11_eq] + exact k9t4p5_local_11_bad + +private theorem k9t4p5_update_11 : k9t4p5_step_11.apply k9t4p5_state_11 = k9t4p5_state_12 := by + have h : ∀ i j : Fin 9, k9t4p5_step_11.apply k9t4p5_state_11 i j = k9t4p5_state_12 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_13 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {4, 5, 6}], + #[{1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_12 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 5, {0, 1}, {1}, Finset.Icc 0 5, ∅, Finset.Icc 0 3, {0, 1}, ∅, {0, 1}], + #[Finset.Icc 0 5, ∅, {1, 2}, {1, 2}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{0, 1}, {1, 2}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {0, 1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, {1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4, Finset.Icc 0 6, {4, 5, 6}, Finset.Icc 4 7], + #[∅, Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 3 6, {4, 5, 6}], + #[Finset.Icc 0 3, Finset.Icc 0 5, {0, 1}, ∅, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {0}], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[∅, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 3 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{0, 1}, {1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, {0}, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_12_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, {2}, ∅, ∅, ∅, {0, 1, 2}, {1}, ∅, ∅], + #[∅, {2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, {1}, {0}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1, 2}, ∅, ∅, {1}, ∅, ∅, ∅, ∅, ∅], + #[∅, {1}, ∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_12_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_0) 0 j = k9t4p5_local_12_required_0 0 j := by decide + +private theorem k9t4p5_local_12_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_0) 1 j = k9t4p5_local_12_required_0 1 j := by decide + +private theorem k9t4p5_local_12_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_0) 2 j = k9t4p5_local_12_required_0 2 j := by decide + +private theorem k9t4p5_local_12_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_0) 3 j = k9t4p5_local_12_required_0 3 j := by decide + +private theorem k9t4p5_local_12_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_0) 4 j = k9t4p5_local_12_required_0 4 j := by decide + +private theorem k9t4p5_local_12_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_0) 5 j = k9t4p5_local_12_required_0 5 j := by decide + +private theorem k9t4p5_local_12_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_0) 6 j = k9t4p5_local_12_required_0 6 j := by decide + +private theorem k9t4p5_local_12_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_0) 7 j = k9t4p5_local_12_required_0 7 j := by decide + +private theorem k9t4p5_local_12_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_0) 8 j = k9t4p5_local_12_required_0 8 j := by decide + +private theorem k9t4p5_local_12_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_0) 9 j = k9t4p5_local_12_required_0 9 j := by decide + +private theorem k9t4p5_local_12_required_0_eq : (requiredMatrix 9 k9t4p5_step_12_required_block_0) = k9t4p5_local_12_required_0 := by + funext i j + fin_cases i + + · exact k9t4p5_local_12_required_0_eq_row_0 j + + · exact k9t4p5_local_12_required_0_eq_row_1 j + + · exact k9t4p5_local_12_required_0_eq_row_2 j + + · exact k9t4p5_local_12_required_0_eq_row_3 j + + · exact k9t4p5_local_12_required_0_eq_row_4 j + + · exact k9t4p5_local_12_required_0_eq_row_5 j + + · exact k9t4p5_local_12_required_0_eq_row_6 j + + · exact k9t4p5_local_12_required_0_eq_row_7 j + + · exact k9t4p5_local_12_required_0_eq_row_8 j + + · exact k9t4p5_local_12_required_0_eq_row_9 j + +private theorem k9t4p5_local_12_path_0_0 : (⟨1, 6, [2, 3, 9, 8, 0, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_0_1 : (⟨1, 0, [2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_0_2 : (⟨1, 0, [9, 2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_0_3 : (⟨1, 7, [9, 2, 3, 4, 5, 0, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_0_4 : (⟨1, 6, [9, 2, 3, 4, 5, 0, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_0_5 : (⟨1, 0, [9, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_0_6 : (⟨1, 6, [9, 3, 4, 5, 0, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_0_7 : (⟨1, 2, [9, 8, 0, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_0_8 : (⟨4, 0, [3, 1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_0_9 : (⟨4, 6, [3, 1, 2, 9, 8, 0, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_0_10 : (⟨4, 7, [3, 1, 2, 9, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_0_11 : (⟨4, 0, [3, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_paths_block_0 : ∀ p ∈ k9t4p5_step_12_required_block_0, p.Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by + simp only [k9t4p5_step_12_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_12_path_0_0, k9t4p5_local_12_path_0_1, k9t4p5_local_12_path_0_2, k9t4p5_local_12_path_0_3, k9t4p5_local_12_path_0_4, k9t4p5_local_12_path_0_5, k9t4p5_local_12_path_0_6, k9t4p5_local_12_path_0_7, k9t4p5_local_12_path_0_8, k9t4p5_local_12_path_0_9, k9t4p5_local_12_path_0_10, k9t4p5_local_12_path_0_11⟩ + +private def k9t4p5_local_12_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {5}, ∅, ∅, {2}, ∅, {0, 1}, {1}, ∅, ∅], + #[{5}, ∅, ∅, ∅, {4}, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, {4}, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, {0}, {0}, ∅, ∅, ∅, ∅, ∅, ∅, {0}], + #[{1}, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_12_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_1) 0 j = k9t4p5_local_12_required_1 0 j := by decide + +private theorem k9t4p5_local_12_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_1) 1 j = k9t4p5_local_12_required_1 1 j := by decide + +private theorem k9t4p5_local_12_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_1) 2 j = k9t4p5_local_12_required_1 2 j := by decide + +private theorem k9t4p5_local_12_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_1) 3 j = k9t4p5_local_12_required_1 3 j := by decide + +private theorem k9t4p5_local_12_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_1) 4 j = k9t4p5_local_12_required_1 4 j := by decide + +private theorem k9t4p5_local_12_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_1) 5 j = k9t4p5_local_12_required_1 5 j := by decide + +private theorem k9t4p5_local_12_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_1) 6 j = k9t4p5_local_12_required_1 6 j := by decide + +private theorem k9t4p5_local_12_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_1) 7 j = k9t4p5_local_12_required_1 7 j := by decide + +private theorem k9t4p5_local_12_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_1) 8 j = k9t4p5_local_12_required_1 8 j := by decide + +private theorem k9t4p5_local_12_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_1) 9 j = k9t4p5_local_12_required_1 9 j := by decide + +private theorem k9t4p5_local_12_required_1_eq : (requiredMatrix 9 k9t4p5_step_12_required_block_1) = k9t4p5_local_12_required_1 := by + funext i j + fin_cases i + + · exact k9t4p5_local_12_required_1_eq_row_0 j + + · exact k9t4p5_local_12_required_1_eq_row_1 j + + · exact k9t4p5_local_12_required_1_eq_row_2 j + + · exact k9t4p5_local_12_required_1_eq_row_3 j + + · exact k9t4p5_local_12_required_1_eq_row_4 j + + · exact k9t4p5_local_12_required_1_eq_row_5 j + + · exact k9t4p5_local_12_required_1_eq_row_6 j + + · exact k9t4p5_local_12_required_1_eq_row_7 j + + · exact k9t4p5_local_12_required_1_eq_row_8 j + + · exact k9t4p5_local_12_required_1_eq_row_9 j + +private theorem k9t4p5_local_12_path_1_0 : (⟨4, 7, [3, 1, 9, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_1_1 : (⟨4, 0, [3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_1_2 : (⟨4, 7, [3, 9, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_1_3 : (⟨4, 1, [5, 0, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_1_4 : (⟨6, 0, [7, 8, 9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_1_5 : (⟨6, 9, [7, 8, 0, 5, 4, 3, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_1_6 : (⟨6, 2, [7, 8, 0, 5, 4, 3, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_1_7 : (⟨6, 1, [7, 8, 0, 5, 4, 3, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_1_8 : (⟨0, 1, [5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_1_9 : (⟨0, 7, [5, 4, 3, 1, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_1_10 : (⟨0, 6, [5, 4, 3, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_1_11 : (⟨0, 6, [5, 4, 3, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_paths_block_1 : ∀ p ∈ k9t4p5_step_12_required_block_1, p.Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by + simp only [k9t4p5_step_12_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_12_path_1_0, k9t4p5_local_12_path_1_1, k9t4p5_local_12_path_1_2, k9t4p5_local_12_path_1_3, k9t4p5_local_12_path_1_4, k9t4p5_local_12_path_1_5, k9t4p5_local_12_path_1_6, k9t4p5_local_12_path_1_7, k9t4p5_local_12_path_1_8, k9t4p5_local_12_path_1_9, k9t4p5_local_12_path_1_10, k9t4p5_local_12_path_1_11⟩ + +private def k9t4p5_local_12_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 1 4, {1}, {1}, {0, 1, 2}, ∅, {2}, ∅, ∅, {0, 1}], + #[Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_12_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_2) 0 j = k9t4p5_local_12_required_2 0 j := by decide + +private theorem k9t4p5_local_12_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_2) 1 j = k9t4p5_local_12_required_2 1 j := by decide + +private theorem k9t4p5_local_12_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_2) 2 j = k9t4p5_local_12_required_2 2 j := by decide + +private theorem k9t4p5_local_12_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_2) 3 j = k9t4p5_local_12_required_2 3 j := by decide + +private theorem k9t4p5_local_12_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_2) 4 j = k9t4p5_local_12_required_2 4 j := by decide + +private theorem k9t4p5_local_12_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_2) 5 j = k9t4p5_local_12_required_2 5 j := by decide + +private theorem k9t4p5_local_12_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_2) 6 j = k9t4p5_local_12_required_2 6 j := by decide + +private theorem k9t4p5_local_12_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_2) 7 j = k9t4p5_local_12_required_2 7 j := by decide + +private theorem k9t4p5_local_12_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_2) 8 j = k9t4p5_local_12_required_2 8 j := by decide + +private theorem k9t4p5_local_12_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_2) 9 j = k9t4p5_local_12_required_2 9 j := by decide + +private theorem k9t4p5_local_12_required_2_eq : (requiredMatrix 9 k9t4p5_step_12_required_block_2) = k9t4p5_local_12_required_2 := by + funext i j + fin_cases i + + · exact k9t4p5_local_12_required_2_eq_row_0 j + + · exact k9t4p5_local_12_required_2_eq_row_1 j + + · exact k9t4p5_local_12_required_2_eq_row_2 j + + · exact k9t4p5_local_12_required_2_eq_row_3 j + + · exact k9t4p5_local_12_required_2_eq_row_4 j + + · exact k9t4p5_local_12_required_2_eq_row_5 j + + · exact k9t4p5_local_12_required_2_eq_row_6 j + + · exact k9t4p5_local_12_required_2_eq_row_7 j + + · exact k9t4p5_local_12_required_2_eq_row_8 j + + · exact k9t4p5_local_12_required_2_eq_row_9 j + +private theorem k9t4p5_local_12_path_2_0 : (⟨0, 1, [5, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_2_1 : (⟨0, 1, [5, 4, 3, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_2_2 : (⟨0, 6, [5, 4, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_2_3 : (⟨0, 3, [5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_2_4 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_2_5 : (⟨0, 2, [5, 6, 7, 8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_2_6 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_2_7 : (⟨0, 1, [5, 6, 7, 8, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_2_8 : (⟨0, 1, [5, 6, 7, 8, 9, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_2_9 : (⟨0, 4, [5, 6, 7, 8, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_2_10 : (⟨0, 9, [8, 7, 6, 5, 4, 3, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_2_11 : (⟨0, 9, [8, 7, 6, 5, 4, 3, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_paths_block_2 : ∀ p ∈ k9t4p5_step_12_required_block_2, p.Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by + simp only [k9t4p5_step_12_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_12_path_2_0, k9t4p5_local_12_path_2_1, k9t4p5_local_12_path_2_2, k9t4p5_local_12_path_2_3, k9t4p5_local_12_path_2_4, k9t4p5_local_12_path_2_5, k9t4p5_local_12_path_2_6, k9t4p5_local_12_path_2_7, k9t4p5_local_12_path_2_8, k9t4p5_local_12_path_2_9, k9t4p5_local_12_path_2_10, k9t4p5_local_12_path_2_11⟩ + +private def k9t4p5_local_12_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0}, {0}, ∅, {3, 4, 5}, ∅, {3}, {0}, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_12_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_3) 0 j = k9t4p5_local_12_required_3 0 j := by decide + +private theorem k9t4p5_local_12_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_3) 1 j = k9t4p5_local_12_required_3 1 j := by decide + +private theorem k9t4p5_local_12_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_3) 2 j = k9t4p5_local_12_required_3 2 j := by decide + +private theorem k9t4p5_local_12_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_3) 3 j = k9t4p5_local_12_required_3 3 j := by decide + +private theorem k9t4p5_local_12_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_3) 4 j = k9t4p5_local_12_required_3 4 j := by decide + +private theorem k9t4p5_local_12_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_3) 5 j = k9t4p5_local_12_required_3 5 j := by decide + +private theorem k9t4p5_local_12_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_3) 6 j = k9t4p5_local_12_required_3 6 j := by decide + +private theorem k9t4p5_local_12_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_3) 7 j = k9t4p5_local_12_required_3 7 j := by decide + +private theorem k9t4p5_local_12_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_3) 8 j = k9t4p5_local_12_required_3 8 j := by decide + +private theorem k9t4p5_local_12_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_12_required_block_3) 9 j = k9t4p5_local_12_required_3 9 j := by decide + +private theorem k9t4p5_local_12_required_3_eq : (requiredMatrix 9 k9t4p5_step_12_required_block_3) = k9t4p5_local_12_required_3 := by + funext i j + fin_cases i + + · exact k9t4p5_local_12_required_3_eq_row_0 j + + · exact k9t4p5_local_12_required_3_eq_row_1 j + + · exact k9t4p5_local_12_required_3_eq_row_2 j + + · exact k9t4p5_local_12_required_3_eq_row_3 j + + · exact k9t4p5_local_12_required_3_eq_row_4 j + + · exact k9t4p5_local_12_required_3_eq_row_5 j + + · exact k9t4p5_local_12_required_3_eq_row_6 j + + · exact k9t4p5_local_12_required_3_eq_row_7 j + + · exact k9t4p5_local_12_required_3_eq_row_8 j + + · exact k9t4p5_local_12_required_3_eq_row_9 j + +private theorem k9t4p5_local_12_path_3_0 : (⟨0, 2, [8, 7, 6, 5, 4, 3, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_3_1 : (⟨0, 1, [8, 7, 6, 5, 4, 3, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_3_2 : (⟨0, 4, [8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_3_3 : (⟨0, 7, [8, 9, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_3_4 : (⟨0, 4, [8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_3_5 : (⟨0, 4, [8, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_path_3_6 : (⟨0, 6, [8, 9, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by decide + +private theorem k9t4p5_local_12_paths_block_3 : ∀ p ∈ k9t4p5_step_12_required_block_3, p.Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by + simp only [k9t4p5_step_12_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_12_path_3_0, k9t4p5_local_12_path_3_1, k9t4p5_local_12_path_3_2, k9t4p5_local_12_path_3_3, k9t4p5_local_12_path_3_4, k9t4p5_local_12_path_3_5, k9t4p5_local_12_path_3_6⟩ + +private theorem k9t4p5_local_12_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_12 a b ∪ ((((k9t4p5_local_12_required_0 a b ∪ k9t4p5_local_12_required_1 a b) ∪ k9t4p5_local_12_required_2 a b) ∪ k9t4p5_local_12_required_3 a b))) 0 j = k9t4p5_local_12 0 j := by decide + +private theorem k9t4p5_local_12_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_12 a b ∪ ((((k9t4p5_local_12_required_0 a b ∪ k9t4p5_local_12_required_1 a b) ∪ k9t4p5_local_12_required_2 a b) ∪ k9t4p5_local_12_required_3 a b))) 1 j = k9t4p5_local_12 1 j := by decide + +private theorem k9t4p5_local_12_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_12 a b ∪ ((((k9t4p5_local_12_required_0 a b ∪ k9t4p5_local_12_required_1 a b) ∪ k9t4p5_local_12_required_2 a b) ∪ k9t4p5_local_12_required_3 a b))) 2 j = k9t4p5_local_12 2 j := by decide + +private theorem k9t4p5_local_12_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_12 a b ∪ ((((k9t4p5_local_12_required_0 a b ∪ k9t4p5_local_12_required_1 a b) ∪ k9t4p5_local_12_required_2 a b) ∪ k9t4p5_local_12_required_3 a b))) 3 j = k9t4p5_local_12 3 j := by decide + +private theorem k9t4p5_local_12_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_12 a b ∪ ((((k9t4p5_local_12_required_0 a b ∪ k9t4p5_local_12_required_1 a b) ∪ k9t4p5_local_12_required_2 a b) ∪ k9t4p5_local_12_required_3 a b))) 4 j = k9t4p5_local_12 4 j := by decide + +private theorem k9t4p5_local_12_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_12 a b ∪ ((((k9t4p5_local_12_required_0 a b ∪ k9t4p5_local_12_required_1 a b) ∪ k9t4p5_local_12_required_2 a b) ∪ k9t4p5_local_12_required_3 a b))) 5 j = k9t4p5_local_12 5 j := by decide + +private theorem k9t4p5_local_12_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_12 a b ∪ ((((k9t4p5_local_12_required_0 a b ∪ k9t4p5_local_12_required_1 a b) ∪ k9t4p5_local_12_required_2 a b) ∪ k9t4p5_local_12_required_3 a b))) 6 j = k9t4p5_local_12 6 j := by decide + +private theorem k9t4p5_local_12_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_12 a b ∪ ((((k9t4p5_local_12_required_0 a b ∪ k9t4p5_local_12_required_1 a b) ∪ k9t4p5_local_12_required_2 a b) ∪ k9t4p5_local_12_required_3 a b))) 7 j = k9t4p5_local_12 7 j := by decide + +private theorem k9t4p5_local_12_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_12 a b ∪ ((((k9t4p5_local_12_required_0 a b ∪ k9t4p5_local_12_required_1 a b) ∪ k9t4p5_local_12_required_2 a b) ∪ k9t4p5_local_12_required_3 a b))) 8 j = k9t4p5_local_12 8 j := by decide + +private theorem k9t4p5_local_12_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_12 a b ∪ ((((k9t4p5_local_12_required_0 a b ∪ k9t4p5_local_12_required_1 a b) ∪ k9t4p5_local_12_required_2 a b) ∪ k9t4p5_local_12_required_3 a b))) 9 j = k9t4p5_local_12 9 j := by decide + +private theorem k9t4p5_local_12_merged_eq : (fun a b => freshMatrix k9t4p5_state_12 a b ∪ ((((k9t4p5_local_12_required_0 a b ∪ k9t4p5_local_12_required_1 a b) ∪ k9t4p5_local_12_required_2 a b) ∪ k9t4p5_local_12_required_3 a b))) = k9t4p5_local_12 := by + funext i j + fin_cases i + + · exact k9t4p5_local_12_merged_eq_row_0 j + + · exact k9t4p5_local_12_merged_eq_row_1 j + + · exact k9t4p5_local_12_merged_eq_row_2 j + + · exact k9t4p5_local_12_merged_eq_row_3 j + + · exact k9t4p5_local_12_merged_eq_row_4 j + + · exact k9t4p5_local_12_merged_eq_row_5 j + + · exact k9t4p5_local_12_merged_eq_row_6 j + + · exact k9t4p5_local_12_merged_eq_row_7 j + + · exact k9t4p5_local_12_merged_eq_row_8 j + + · exact k9t4p5_local_12_merged_eq_row_9 j + +private theorem k9t4p5_local_12_eq : (fun a b => freshMatrix k9t4p5_state_12 a b ∪ requiredMatrix 9 k9t4p5_step_12_data.required a b) = k9t4p5_local_12 := by + funext a b + change freshMatrix k9t4p5_state_12 a b ∪ requiredMatrix 9 (k9t4p5_step_12_required_block_0 ++ k9t4p5_step_12_required_block_1 ++ k9t4p5_step_12_required_block_2 ++ k9t4p5_step_12_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p5_local_12_required_0_eq, k9t4p5_local_12_required_1_eq, k9t4p5_local_12_required_2_eq, k9t4p5_local_12_required_3_eq] + exact congrFun (congrFun k9t4p5_local_12_merged_eq a) b + +private theorem k9t4p5_local_12_paths : ∀ p ∈ k9t4p5_step_12_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 := by + change ∀ p ∈ (k9t4p5_step_12_required_block_0 ++ k9t4p5_step_12_required_block_1 ++ k9t4p5_step_12_required_block_2 ++ k9t4p5_step_12_required_block_3), p.Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p5_local_12_paths_block_0, k9t4p5_local_12_paths_block_1⟩, k9t4p5_local_12_paths_block_2⟩, k9t4p5_local_12_paths_block_3⟩ + +private theorem k9t4p5_local_12_bad : k9t4p5_step_12_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_12_data.i k9t4p5_step_12_data.j) k9t4p5_local_12 9 4 := by decide + +private theorem k9t4p5_step_12_check : k9t4p5_step_12.Check k9t4p5.graph k9t4p5_state_12 9 4 := by + change k9t4p5_step_12_data.Check k9t4p5.graph k9t4p5_state_12 9 4 + refine ⟨by decide, k9t4p5_local_12_paths, ?_⟩ + rw [k9t4p5_local_12_eq] + exact k9t4p5_local_12_bad + +private theorem k9t4p5_update_12 : k9t4p5_step_12.apply k9t4p5_state_12 = k9t4p5_state_13 := by + have h : ∀ i j : Fin 9, k9t4p5_step_12.apply k9t4p5_state_12 i j = k9t4p5_state_13 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_14 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_13 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 5, {0, 1}, {1}, Finset.Icc 0 5, ∅, {0, 1}, {1, 2}, {0, 1}, ∅], + #[Finset.Icc 0 5, ∅, {1}, {1, 2}, Finset.Icc 1 7, Finset.Icc 0 6, {0, 1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{0, 1}, {1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, {1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 1 6, {0, 1, 2, 4, 5, 6}, Finset.Icc 4 7], + #[∅, Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {4, 5, 6}], + #[{0, 1}, {0, 1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[{1, 2}, Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, Finset.Icc 1 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{0, 1}, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {0, 1, 2, 4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_13_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, {0, 1}, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {1}, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_13_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_0) 0 j = k9t4p5_local_13_required_0 0 j := by decide + +private theorem k9t4p5_local_13_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_0) 1 j = k9t4p5_local_13_required_0 1 j := by decide + +private theorem k9t4p5_local_13_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_0) 2 j = k9t4p5_local_13_required_0 2 j := by decide + +private theorem k9t4p5_local_13_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_0) 3 j = k9t4p5_local_13_required_0 3 j := by decide + +private theorem k9t4p5_local_13_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_0) 4 j = k9t4p5_local_13_required_0 4 j := by decide + +private theorem k9t4p5_local_13_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_0) 5 j = k9t4p5_local_13_required_0 5 j := by decide + +private theorem k9t4p5_local_13_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_0) 6 j = k9t4p5_local_13_required_0 6 j := by decide + +private theorem k9t4p5_local_13_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_0) 7 j = k9t4p5_local_13_required_0 7 j := by decide + +private theorem k9t4p5_local_13_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_0) 8 j = k9t4p5_local_13_required_0 8 j := by decide + +private theorem k9t4p5_local_13_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_0) 9 j = k9t4p5_local_13_required_0 9 j := by decide + +private theorem k9t4p5_local_13_required_0_eq : (requiredMatrix 9 k9t4p5_step_13_required_block_0) = k9t4p5_local_13_required_0 := by + funext i j + fin_cases i + + · exact k9t4p5_local_13_required_0_eq_row_0 j + + · exact k9t4p5_local_13_required_0_eq_row_1 j + + · exact k9t4p5_local_13_required_0_eq_row_2 j + + · exact k9t4p5_local_13_required_0_eq_row_3 j + + · exact k9t4p5_local_13_required_0_eq_row_4 j + + · exact k9t4p5_local_13_required_0_eq_row_5 j + + · exact k9t4p5_local_13_required_0_eq_row_6 j + + · exact k9t4p5_local_13_required_0_eq_row_7 j + + · exact k9t4p5_local_13_required_0_eq_row_8 j + + · exact k9t4p5_local_13_required_0_eq_row_9 j + +private theorem k9t4p5_local_13_path_0_0 : (⟨1, 0, [2, 3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_0_1 : (⟨1, 7, [2, 3, 4, 5, 0, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_0_2 : (⟨1, 6, [2, 3, 4, 5, 0, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_0_3 : (⟨1, 0, [2, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_0_4 : (⟨1, 0, [2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_0_5 : (⟨1, 6, [3, 4, 5, 0, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_0_6 : (⟨4, 0, [3, 1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_0_7 : (⟨4, 7, [3, 1, 2, 9, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_0_8 : (⟨4, 8, [3, 1, 2, 9, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_0_9 : (⟨4, 0, [3, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_0_10 : (⟨4, 7, [3, 1, 9, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_0_11 : (⟨4, 8, [3, 1, 9, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_paths_block_0 : ∀ p ∈ k9t4p5_step_13_required_block_0, p.Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by + simp only [k9t4p5_step_13_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_13_path_0_0, k9t4p5_local_13_path_0_1, k9t4p5_local_13_path_0_2, k9t4p5_local_13_path_0_3, k9t4p5_local_13_path_0_4, k9t4p5_local_13_path_0_5, k9t4p5_local_13_path_0_6, k9t4p5_local_13_path_0_7, k9t4p5_local_13_path_0_8, k9t4p5_local_13_path_0_9, k9t4p5_local_13_path_0_10, k9t4p5_local_13_path_0_11⟩ + +private def k9t4p5_local_13_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {2, 3, 4}, ∅, {1}, {0, 1, 2}, ∅, {0, 1}, ∅, ∅, ∅], + #[{2, 3, 4}, ∅, ∅, ∅, {4}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, {4}, ∅, ∅, ∅, ∅, ∅, ∅, {2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_13_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_1) 0 j = k9t4p5_local_13_required_1 0 j := by decide + +private theorem k9t4p5_local_13_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_1) 1 j = k9t4p5_local_13_required_1 1 j := by decide + +private theorem k9t4p5_local_13_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_1) 2 j = k9t4p5_local_13_required_1 2 j := by decide + +private theorem k9t4p5_local_13_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_1) 3 j = k9t4p5_local_13_required_1 3 j := by decide + +private theorem k9t4p5_local_13_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_1) 4 j = k9t4p5_local_13_required_1 4 j := by decide + +private theorem k9t4p5_local_13_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_1) 5 j = k9t4p5_local_13_required_1 5 j := by decide + +private theorem k9t4p5_local_13_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_1) 6 j = k9t4p5_local_13_required_1 6 j := by decide + +private theorem k9t4p5_local_13_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_1) 7 j = k9t4p5_local_13_required_1 7 j := by decide + +private theorem k9t4p5_local_13_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_1) 8 j = k9t4p5_local_13_required_1 8 j := by decide + +private theorem k9t4p5_local_13_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_1) 9 j = k9t4p5_local_13_required_1 9 j := by decide + +private theorem k9t4p5_local_13_required_1_eq : (requiredMatrix 9 k9t4p5_step_13_required_block_1) = k9t4p5_local_13_required_1 := by + funext i j + fin_cases i + + · exact k9t4p5_local_13_required_1_eq_row_0 j + + · exact k9t4p5_local_13_required_1_eq_row_1 j + + · exact k9t4p5_local_13_required_1_eq_row_2 j + + · exact k9t4p5_local_13_required_1_eq_row_3 j + + · exact k9t4p5_local_13_required_1_eq_row_4 j + + · exact k9t4p5_local_13_required_1_eq_row_5 j + + · exact k9t4p5_local_13_required_1_eq_row_6 j + + · exact k9t4p5_local_13_required_1_eq_row_7 j + + · exact k9t4p5_local_13_required_1_eq_row_8 j + + · exact k9t4p5_local_13_required_1_eq_row_9 j + +private theorem k9t4p5_local_13_path_1_0 : (⟨4, 0, [3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_1_1 : (⟨4, 8, [3, 9, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_1_2 : (⟨4, 1, [5, 0, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_1_3 : (⟨0, 6, [5, 4, 3, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_1_4 : (⟨0, 6, [5, 4, 3, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_1_5 : (⟨0, 1, [5, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_1_6 : (⟨0, 1, [5, 4, 3, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_1_7 : (⟨0, 3, [5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_1_8 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_1_9 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_1_10 : (⟨0, 1, [5, 6, 7, 8, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_1_11 : (⟨0, 4, [5, 6, 7, 8, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_paths_block_1 : ∀ p ∈ k9t4p5_step_13_required_block_1, p.Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by + simp only [k9t4p5_step_13_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_13_path_1_0, k9t4p5_local_13_path_1_1, k9t4p5_local_13_path_1_2, k9t4p5_local_13_path_1_3, k9t4p5_local_13_path_1_4, k9t4p5_local_13_path_1_5, k9t4p5_local_13_path_1_6, k9t4p5_local_13_path_1_7, k9t4p5_local_13_path_1_8, k9t4p5_local_13_path_1_9, k9t4p5_local_13_path_1_10, k9t4p5_local_13_path_1_11⟩ + +private def k9t4p5_local_13_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 5}, {0, 1}, ∅, {3, 4, 5}, ∅, ∅, {1, 2}, {0, 1}, ∅], + #[{0, 1, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_13_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_2) 0 j = k9t4p5_local_13_required_2 0 j := by decide + +private theorem k9t4p5_local_13_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_2) 1 j = k9t4p5_local_13_required_2 1 j := by decide + +private theorem k9t4p5_local_13_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_2) 2 j = k9t4p5_local_13_required_2 2 j := by decide + +private theorem k9t4p5_local_13_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_2) 3 j = k9t4p5_local_13_required_2 3 j := by decide + +private theorem k9t4p5_local_13_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_2) 4 j = k9t4p5_local_13_required_2 4 j := by decide + +private theorem k9t4p5_local_13_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_2) 5 j = k9t4p5_local_13_required_2 5 j := by decide + +private theorem k9t4p5_local_13_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_2) 6 j = k9t4p5_local_13_required_2 6 j := by decide + +private theorem k9t4p5_local_13_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_2) 7 j = k9t4p5_local_13_required_2 7 j := by decide + +private theorem k9t4p5_local_13_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_2) 8 j = k9t4p5_local_13_required_2 8 j := by decide + +private theorem k9t4p5_local_13_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p5_step_13_required_block_2) 9 j = k9t4p5_local_13_required_2 9 j := by decide + +private theorem k9t4p5_local_13_required_2_eq : (requiredMatrix 9 k9t4p5_step_13_required_block_2) = k9t4p5_local_13_required_2 := by + funext i j + fin_cases i + + · exact k9t4p5_local_13_required_2_eq_row_0 j + + · exact k9t4p5_local_13_required_2_eq_row_1 j + + · exact k9t4p5_local_13_required_2_eq_row_2 j + + · exact k9t4p5_local_13_required_2_eq_row_3 j + + · exact k9t4p5_local_13_required_2_eq_row_4 j + + · exact k9t4p5_local_13_required_2_eq_row_5 j + + · exact k9t4p5_local_13_required_2_eq_row_6 j + + · exact k9t4p5_local_13_required_2_eq_row_7 j + + · exact k9t4p5_local_13_required_2_eq_row_8 j + + · exact k9t4p5_local_13_required_2_eq_row_9 j + +private theorem k9t4p5_local_13_path_2_0 : (⟨0, 4, [9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_2_1 : (⟨0, 7, [9, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_2_2 : (⟨0, 8, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_2_3 : (⟨0, 4, [9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_2_4 : (⟨0, 7, [9, 1, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_2_5 : (⟨0, 8, [9, 1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_2_6 : (⟨0, 1, [9, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_2_7 : (⟨0, 4, [9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_2_8 : (⟨0, 1, [9, 8, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_2_9 : (⟨0, 2, [9, 8, 7, 6, 5, 4, 3, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_2_10 : (⟨0, 2, [9, 8, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_path_2_11 : (⟨0, 1, [9, 8, 7, 6, 5, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by decide + +private theorem k9t4p5_local_13_paths_block_2 : ∀ p ∈ k9t4p5_step_13_required_block_2, p.Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by + simp only [k9t4p5_step_13_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_local_13_path_2_0, k9t4p5_local_13_path_2_1, k9t4p5_local_13_path_2_2, k9t4p5_local_13_path_2_3, k9t4p5_local_13_path_2_4, k9t4p5_local_13_path_2_5, k9t4p5_local_13_path_2_6, k9t4p5_local_13_path_2_7, k9t4p5_local_13_path_2_8, k9t4p5_local_13_path_2_9, k9t4p5_local_13_path_2_10, k9t4p5_local_13_path_2_11⟩ + +private theorem k9t4p5_local_13_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_13 a b ∪ (((k9t4p5_local_13_required_0 a b ∪ k9t4p5_local_13_required_1 a b) ∪ k9t4p5_local_13_required_2 a b))) 0 j = k9t4p5_local_13 0 j := by decide + +private theorem k9t4p5_local_13_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_13 a b ∪ (((k9t4p5_local_13_required_0 a b ∪ k9t4p5_local_13_required_1 a b) ∪ k9t4p5_local_13_required_2 a b))) 1 j = k9t4p5_local_13 1 j := by decide + +private theorem k9t4p5_local_13_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_13 a b ∪ (((k9t4p5_local_13_required_0 a b ∪ k9t4p5_local_13_required_1 a b) ∪ k9t4p5_local_13_required_2 a b))) 2 j = k9t4p5_local_13 2 j := by decide + +private theorem k9t4p5_local_13_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_13 a b ∪ (((k9t4p5_local_13_required_0 a b ∪ k9t4p5_local_13_required_1 a b) ∪ k9t4p5_local_13_required_2 a b))) 3 j = k9t4p5_local_13 3 j := by decide + +private theorem k9t4p5_local_13_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_13 a b ∪ (((k9t4p5_local_13_required_0 a b ∪ k9t4p5_local_13_required_1 a b) ∪ k9t4p5_local_13_required_2 a b))) 4 j = k9t4p5_local_13 4 j := by decide + +private theorem k9t4p5_local_13_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_13 a b ∪ (((k9t4p5_local_13_required_0 a b ∪ k9t4p5_local_13_required_1 a b) ∪ k9t4p5_local_13_required_2 a b))) 5 j = k9t4p5_local_13 5 j := by decide + +private theorem k9t4p5_local_13_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_13 a b ∪ (((k9t4p5_local_13_required_0 a b ∪ k9t4p5_local_13_required_1 a b) ∪ k9t4p5_local_13_required_2 a b))) 6 j = k9t4p5_local_13 6 j := by decide + +private theorem k9t4p5_local_13_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_13 a b ∪ (((k9t4p5_local_13_required_0 a b ∪ k9t4p5_local_13_required_1 a b) ∪ k9t4p5_local_13_required_2 a b))) 7 j = k9t4p5_local_13 7 j := by decide + +private theorem k9t4p5_local_13_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_13 a b ∪ (((k9t4p5_local_13_required_0 a b ∪ k9t4p5_local_13_required_1 a b) ∪ k9t4p5_local_13_required_2 a b))) 8 j = k9t4p5_local_13 8 j := by decide + +private theorem k9t4p5_local_13_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_13 a b ∪ (((k9t4p5_local_13_required_0 a b ∪ k9t4p5_local_13_required_1 a b) ∪ k9t4p5_local_13_required_2 a b))) 9 j = k9t4p5_local_13 9 j := by decide + +private theorem k9t4p5_local_13_merged_eq : (fun a b => freshMatrix k9t4p5_state_13 a b ∪ (((k9t4p5_local_13_required_0 a b ∪ k9t4p5_local_13_required_1 a b) ∪ k9t4p5_local_13_required_2 a b))) = k9t4p5_local_13 := by + funext i j + fin_cases i + + · exact k9t4p5_local_13_merged_eq_row_0 j + + · exact k9t4p5_local_13_merged_eq_row_1 j + + · exact k9t4p5_local_13_merged_eq_row_2 j + + · exact k9t4p5_local_13_merged_eq_row_3 j + + · exact k9t4p5_local_13_merged_eq_row_4 j + + · exact k9t4p5_local_13_merged_eq_row_5 j + + · exact k9t4p5_local_13_merged_eq_row_6 j + + · exact k9t4p5_local_13_merged_eq_row_7 j + + · exact k9t4p5_local_13_merged_eq_row_8 j + + · exact k9t4p5_local_13_merged_eq_row_9 j + +private theorem k9t4p5_local_13_eq : (fun a b => freshMatrix k9t4p5_state_13 a b ∪ requiredMatrix 9 k9t4p5_step_13_data.required a b) = k9t4p5_local_13 := by + funext a b + change freshMatrix k9t4p5_state_13 a b ∪ requiredMatrix 9 (k9t4p5_step_13_required_block_0 ++ k9t4p5_step_13_required_block_1 ++ k9t4p5_step_13_required_block_2) a b = _ + simp only [requiredMatrix_append, k9t4p5_local_13_required_0_eq, k9t4p5_local_13_required_1_eq, k9t4p5_local_13_required_2_eq] + exact congrFun (congrFun k9t4p5_local_13_merged_eq a) b + +private theorem k9t4p5_local_13_paths : ∀ p ∈ k9t4p5_step_13_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 := by + change ∀ p ∈ (k9t4p5_step_13_required_block_0 ++ k9t4p5_step_13_required_block_1 ++ k9t4p5_step_13_required_block_2), p.Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨k9t4p5_local_13_paths_block_0, k9t4p5_local_13_paths_block_1⟩, k9t4p5_local_13_paths_block_2⟩ + +private theorem k9t4p5_local_13_bad : k9t4p5_step_13_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_13_data.i k9t4p5_step_13_data.j) k9t4p5_local_13 9 4 := by decide + +private theorem k9t4p5_step_13_check : k9t4p5_step_13.Check k9t4p5.graph k9t4p5_state_13 9 4 := by + change k9t4p5_step_13_data.Check k9t4p5.graph k9t4p5_state_13 9 4 + refine ⟨by decide, k9t4p5_local_13_paths, ?_⟩ + rw [k9t4p5_local_13_eq] + exact k9t4p5_local_13_bad + +private theorem k9t4p5_update_13 : k9t4p5_step_13.apply k9t4p5_state_13 = k9t4p5_state_14 := by + have h : ∀ i j : Fin 9, k9t4p5_step_13.apply k9t4p5_state_13 i j = k9t4p5_state_14 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_15 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, ∅, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_14 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, {0, 1, 2}, ∅, ∅, {1, 2, 3}, ∅, ∅], + #[{0, 1, 2}, ∅, {1}, {1, 2}, Finset.Icc 0 7, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1}, ∅, {1, 2}, {0, 1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1, 2}, {1, 2}, ∅, {1, 2, 3}, {2, 3, 4}, ∅, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[{0, 1, 2}, Finset.Icc 0 7, {0, 1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, Finset.Icc 1 6, {4, 5, 6}, Finset.Icc 4 7], + #[∅, Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[∅, {1, 3, 4, 5}, {1}, ∅, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[{1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, Finset.Icc 1 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[∅, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_14_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_14 a b ∪ requiredMatrix 9 k9t4p5_step_14_data.required a b) 0 j = k9t4p5_local_14 0 j := by decide + +private theorem k9t4p5_local_14_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_14 a b ∪ requiredMatrix 9 k9t4p5_step_14_data.required a b) 1 j = k9t4p5_local_14 1 j := by decide + +private theorem k9t4p5_local_14_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_14 a b ∪ requiredMatrix 9 k9t4p5_step_14_data.required a b) 2 j = k9t4p5_local_14 2 j := by decide + +private theorem k9t4p5_local_14_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_14 a b ∪ requiredMatrix 9 k9t4p5_step_14_data.required a b) 3 j = k9t4p5_local_14 3 j := by decide + +private theorem k9t4p5_local_14_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_14 a b ∪ requiredMatrix 9 k9t4p5_step_14_data.required a b) 4 j = k9t4p5_local_14 4 j := by decide + +private theorem k9t4p5_local_14_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_14 a b ∪ requiredMatrix 9 k9t4p5_step_14_data.required a b) 5 j = k9t4p5_local_14 5 j := by decide + +private theorem k9t4p5_local_14_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_14 a b ∪ requiredMatrix 9 k9t4p5_step_14_data.required a b) 6 j = k9t4p5_local_14 6 j := by decide + +private theorem k9t4p5_local_14_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_14 a b ∪ requiredMatrix 9 k9t4p5_step_14_data.required a b) 7 j = k9t4p5_local_14 7 j := by decide + +private theorem k9t4p5_local_14_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_14 a b ∪ requiredMatrix 9 k9t4p5_step_14_data.required a b) 8 j = k9t4p5_local_14 8 j := by decide + +private theorem k9t4p5_local_14_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_14 a b ∪ requiredMatrix 9 k9t4p5_step_14_data.required a b) 9 j = k9t4p5_local_14 9 j := by decide + +private theorem k9t4p5_local_14_eq : (fun a b => freshMatrix k9t4p5_state_14 a b ∪ requiredMatrix 9 k9t4p5_step_14_data.required a b) = k9t4p5_local_14 := by + funext i j + fin_cases i + + · exact k9t4p5_local_14_eq_row_0 j + + · exact k9t4p5_local_14_eq_row_1 j + + · exact k9t4p5_local_14_eq_row_2 j + + · exact k9t4p5_local_14_eq_row_3 j + + · exact k9t4p5_local_14_eq_row_4 j + + · exact k9t4p5_local_14_eq_row_5 j + + · exact k9t4p5_local_14_eq_row_6 j + + · exact k9t4p5_local_14_eq_row_7 j + + · exact k9t4p5_local_14_eq_row_8 j + + · exact k9t4p5_local_14_eq_row_9 j + +private theorem k9t4p5_local_14_paths : ∀ p ∈ k9t4p5_step_14_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_14_data.i k9t4p5_step_14_data.j) 9 := by decide + +private theorem k9t4p5_local_14_bad : k9t4p5_step_14_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_14_data.i k9t4p5_step_14_data.j) k9t4p5_local_14 9 4 := by decide + +private theorem k9t4p5_step_14_check : k9t4p5_step_14.Check k9t4p5.graph k9t4p5_state_14 9 4 := by + change k9t4p5_step_14_data.Check k9t4p5.graph k9t4p5_state_14 9 4 + refine ⟨by decide, k9t4p5_local_14_paths, ?_⟩ + rw [k9t4p5_local_14_eq] + exact k9t4p5_local_14_bad + +private theorem k9t4p5_update_14 : k9t4p5_step_14.apply k9t4p5_state_14 = k9t4p5_state_15 := by + have h : ∀ i j : Fin 9, k9t4p5_step_14.apply k9t4p5_state_14 i j = k9t4p5_state_15 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_16 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_15 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 5, {0, 1}, ∅, {0, 1}, {0, 1}, ∅, Finset.Icc 0 4, {1, 2}, ∅], + #[Finset.Icc 0 5, ∅, {1, 2}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{0, 1}, {1, 2}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, ∅, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[{0, 1}, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[∅, {1, 3, 4, 5}, {1}, ∅, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2}, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_15_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_15 a b ∪ requiredMatrix 9 k9t4p5_step_15_data.required a b) 0 j = k9t4p5_local_15 0 j := by decide + +private theorem k9t4p5_local_15_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_15 a b ∪ requiredMatrix 9 k9t4p5_step_15_data.required a b) 1 j = k9t4p5_local_15 1 j := by decide + +private theorem k9t4p5_local_15_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_15 a b ∪ requiredMatrix 9 k9t4p5_step_15_data.required a b) 2 j = k9t4p5_local_15 2 j := by decide + +private theorem k9t4p5_local_15_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_15 a b ∪ requiredMatrix 9 k9t4p5_step_15_data.required a b) 3 j = k9t4p5_local_15 3 j := by decide + +private theorem k9t4p5_local_15_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_15 a b ∪ requiredMatrix 9 k9t4p5_step_15_data.required a b) 4 j = k9t4p5_local_15 4 j := by decide + +private theorem k9t4p5_local_15_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_15 a b ∪ requiredMatrix 9 k9t4p5_step_15_data.required a b) 5 j = k9t4p5_local_15 5 j := by decide + +private theorem k9t4p5_local_15_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_15 a b ∪ requiredMatrix 9 k9t4p5_step_15_data.required a b) 6 j = k9t4p5_local_15 6 j := by decide + +private theorem k9t4p5_local_15_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_15 a b ∪ requiredMatrix 9 k9t4p5_step_15_data.required a b) 7 j = k9t4p5_local_15 7 j := by decide + +private theorem k9t4p5_local_15_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_15 a b ∪ requiredMatrix 9 k9t4p5_step_15_data.required a b) 8 j = k9t4p5_local_15 8 j := by decide + +private theorem k9t4p5_local_15_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_15 a b ∪ requiredMatrix 9 k9t4p5_step_15_data.required a b) 9 j = k9t4p5_local_15 9 j := by decide + +private theorem k9t4p5_local_15_eq : (fun a b => freshMatrix k9t4p5_state_15 a b ∪ requiredMatrix 9 k9t4p5_step_15_data.required a b) = k9t4p5_local_15 := by + funext i j + fin_cases i + + · exact k9t4p5_local_15_eq_row_0 j + + · exact k9t4p5_local_15_eq_row_1 j + + · exact k9t4p5_local_15_eq_row_2 j + + · exact k9t4p5_local_15_eq_row_3 j + + · exact k9t4p5_local_15_eq_row_4 j + + · exact k9t4p5_local_15_eq_row_5 j + + · exact k9t4p5_local_15_eq_row_6 j + + · exact k9t4p5_local_15_eq_row_7 j + + · exact k9t4p5_local_15_eq_row_8 j + + · exact k9t4p5_local_15_eq_row_9 j + +private theorem k9t4p5_local_15_paths : ∀ p ∈ k9t4p5_step_15_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_15_data.i k9t4p5_step_15_data.j) 9 := by decide + +private theorem k9t4p5_local_15_bad : k9t4p5_step_15_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_15_data.i k9t4p5_step_15_data.j) k9t4p5_local_15 9 4 := by decide + +private theorem k9t4p5_step_15_check : k9t4p5_step_15.Check k9t4p5.graph k9t4p5_state_15 9 4 := by + change k9t4p5_step_15_data.Check k9t4p5.graph k9t4p5_state_15 9 4 + refine ⟨by decide, k9t4p5_local_15_paths, ?_⟩ + rw [k9t4p5_local_15_eq] + exact k9t4p5_local_15_bad + +private theorem k9t4p5_update_15 : k9t4p5_step_15.apply k9t4p5_state_15 = k9t4p5_state_16 := by + have h : ∀ i j : Fin 9, k9t4p5_step_15.apply k9t4p5_state_15 i j = k9t4p5_state_16 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_17 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4}, {1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_16 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2}], + #[{1, 2}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4, Finset.Icc 1 6, {1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, {1, 3, 4, 5, 6}, Finset.Icc 1 4, {1, 2, 3}, ∅, Finset.Icc 1 4, {2, 3, 4}], + #[Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 1 6, {2, 3, 4}, Finset.Icc 1 4, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_16_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p5_state_16 a b ∪ requiredMatrix 9 k9t4p5_step_16_data.required a b) 0 j = k9t4p5_local_16 0 j := by decide + +private theorem k9t4p5_local_16_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p5_state_16 a b ∪ requiredMatrix 9 k9t4p5_step_16_data.required a b) 1 j = k9t4p5_local_16 1 j := by decide + +private theorem k9t4p5_local_16_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p5_state_16 a b ∪ requiredMatrix 9 k9t4p5_step_16_data.required a b) 2 j = k9t4p5_local_16 2 j := by decide + +private theorem k9t4p5_local_16_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p5_state_16 a b ∪ requiredMatrix 9 k9t4p5_step_16_data.required a b) 3 j = k9t4p5_local_16 3 j := by decide + +private theorem k9t4p5_local_16_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p5_state_16 a b ∪ requiredMatrix 9 k9t4p5_step_16_data.required a b) 4 j = k9t4p5_local_16 4 j := by decide + +private theorem k9t4p5_local_16_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p5_state_16 a b ∪ requiredMatrix 9 k9t4p5_step_16_data.required a b) 5 j = k9t4p5_local_16 5 j := by decide + +private theorem k9t4p5_local_16_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p5_state_16 a b ∪ requiredMatrix 9 k9t4p5_step_16_data.required a b) 6 j = k9t4p5_local_16 6 j := by decide + +private theorem k9t4p5_local_16_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p5_state_16 a b ∪ requiredMatrix 9 k9t4p5_step_16_data.required a b) 7 j = k9t4p5_local_16 7 j := by decide + +private theorem k9t4p5_local_16_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p5_state_16 a b ∪ requiredMatrix 9 k9t4p5_step_16_data.required a b) 8 j = k9t4p5_local_16 8 j := by decide + +private theorem k9t4p5_local_16_eq : (fun a b => k9t4p5_state_16 a b ∪ requiredMatrix 9 k9t4p5_step_16_data.required a b) = k9t4p5_local_16 := by + funext i j + fin_cases i + + · exact k9t4p5_local_16_eq_row_0 j + + · exact k9t4p5_local_16_eq_row_1 j + + · exact k9t4p5_local_16_eq_row_2 j + + · exact k9t4p5_local_16_eq_row_3 j + + · exact k9t4p5_local_16_eq_row_4 j + + · exact k9t4p5_local_16_eq_row_5 j + + · exact k9t4p5_local_16_eq_row_6 j + + · exact k9t4p5_local_16_eq_row_7 j + + · exact k9t4p5_local_16_eq_row_8 j + +private theorem k9t4p5_local_16_paths : ∀ p ∈ k9t4p5_step_16_data.required, p.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_16_data.i k9t4p5_step_16_data.j) 9 := by decide + +private theorem k9t4p5_local_16_bad : k9t4p5_step_16_data.bad.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_16_data.i k9t4p5_step_16_data.j) k9t4p5_local_16 9 4 := by decide + +private theorem k9t4p5_step_16_check : k9t4p5_step_16.Check k9t4p5.graph k9t4p5_state_16 9 4 := by + change k9t4p5_step_16_data.Check k9t4p5.graph k9t4p5_state_16 9 4 + refine ⟨k9t4p5_local_16_paths, ?_⟩ + rw [k9t4p5_local_16_eq] + exact k9t4p5_local_16_bad + +private theorem k9t4p5_update_16 : k9t4p5_step_16.apply k9t4p5_state_16 = k9t4p5_state_17 := by + have h : ∀ i j : Fin 9, k9t4p5_step_16.apply k9t4p5_state_16 i j = k9t4p5_state_17 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_18 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_17 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 3, ∅, ∅, ∅, {0, 1, 2}, ∅, {0, 1, 2}, ∅, ∅], + #[Finset.Icc 0 3, ∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1}, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[∅, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4}, {1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[{0, 1, 2}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[∅, {1, 3, 4, 5}, {1}, {1}, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[{0, 1, 2}, Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, {1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[∅, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_17_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_17 a b ∪ requiredMatrix 9 k9t4p5_step_17_data.required a b) 0 j = k9t4p5_local_17 0 j := by decide + +private theorem k9t4p5_local_17_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_17 a b ∪ requiredMatrix 9 k9t4p5_step_17_data.required a b) 1 j = k9t4p5_local_17 1 j := by decide + +private theorem k9t4p5_local_17_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_17 a b ∪ requiredMatrix 9 k9t4p5_step_17_data.required a b) 2 j = k9t4p5_local_17 2 j := by decide + +private theorem k9t4p5_local_17_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_17 a b ∪ requiredMatrix 9 k9t4p5_step_17_data.required a b) 3 j = k9t4p5_local_17 3 j := by decide + +private theorem k9t4p5_local_17_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_17 a b ∪ requiredMatrix 9 k9t4p5_step_17_data.required a b) 4 j = k9t4p5_local_17 4 j := by decide + +private theorem k9t4p5_local_17_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_17 a b ∪ requiredMatrix 9 k9t4p5_step_17_data.required a b) 5 j = k9t4p5_local_17 5 j := by decide + +private theorem k9t4p5_local_17_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_17 a b ∪ requiredMatrix 9 k9t4p5_step_17_data.required a b) 6 j = k9t4p5_local_17 6 j := by decide + +private theorem k9t4p5_local_17_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_17 a b ∪ requiredMatrix 9 k9t4p5_step_17_data.required a b) 7 j = k9t4p5_local_17 7 j := by decide + +private theorem k9t4p5_local_17_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_17 a b ∪ requiredMatrix 9 k9t4p5_step_17_data.required a b) 8 j = k9t4p5_local_17 8 j := by decide + +private theorem k9t4p5_local_17_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_17 a b ∪ requiredMatrix 9 k9t4p5_step_17_data.required a b) 9 j = k9t4p5_local_17 9 j := by decide + +private theorem k9t4p5_local_17_eq : (fun a b => freshMatrix k9t4p5_state_17 a b ∪ requiredMatrix 9 k9t4p5_step_17_data.required a b) = k9t4p5_local_17 := by + funext i j + fin_cases i + + · exact k9t4p5_local_17_eq_row_0 j + + · exact k9t4p5_local_17_eq_row_1 j + + · exact k9t4p5_local_17_eq_row_2 j + + · exact k9t4p5_local_17_eq_row_3 j + + · exact k9t4p5_local_17_eq_row_4 j + + · exact k9t4p5_local_17_eq_row_5 j + + · exact k9t4p5_local_17_eq_row_6 j + + · exact k9t4p5_local_17_eq_row_7 j + + · exact k9t4p5_local_17_eq_row_8 j + + · exact k9t4p5_local_17_eq_row_9 j + +private theorem k9t4p5_local_17_paths : ∀ p ∈ k9t4p5_step_17_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_17_data.i k9t4p5_step_17_data.j) 9 := by decide + +private theorem k9t4p5_local_17_bad : k9t4p5_step_17_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_17_data.i k9t4p5_step_17_data.j) k9t4p5_local_17 9 4 := by decide + +private theorem k9t4p5_step_17_check : k9t4p5_step_17.Check k9t4p5.graph k9t4p5_state_17 9 4 := by + change k9t4p5_step_17_data.Check k9t4p5.graph k9t4p5_state_17 9 4 + refine ⟨by decide, k9t4p5_local_17_paths, ?_⟩ + rw [k9t4p5_local_17_eq] + exact k9t4p5_local_17_bad + +private theorem k9t4p5_update_17 : k9t4p5_step_17.apply k9t4p5_state_17 = k9t4p5_state_18 := by + have h : ∀ i j : Fin 9, k9t4p5_step_17.apply k9t4p5_state_17 i j = k9t4p5_state_18 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_19 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_18 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 1 6, {1, 4, 5, 6}], + #[Finset.Icc 1 5, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {1, 4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, Finset.Icc 1 6, Finset.Icc 1 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_18_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p5_state_18 a b ∪ requiredMatrix 9 k9t4p5_step_18_data.required a b) 0 j = k9t4p5_local_18 0 j := by decide + +private theorem k9t4p5_local_18_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p5_state_18 a b ∪ requiredMatrix 9 k9t4p5_step_18_data.required a b) 1 j = k9t4p5_local_18 1 j := by decide + +private theorem k9t4p5_local_18_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p5_state_18 a b ∪ requiredMatrix 9 k9t4p5_step_18_data.required a b) 2 j = k9t4p5_local_18 2 j := by decide + +private theorem k9t4p5_local_18_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p5_state_18 a b ∪ requiredMatrix 9 k9t4p5_step_18_data.required a b) 3 j = k9t4p5_local_18 3 j := by decide + +private theorem k9t4p5_local_18_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p5_state_18 a b ∪ requiredMatrix 9 k9t4p5_step_18_data.required a b) 4 j = k9t4p5_local_18 4 j := by decide + +private theorem k9t4p5_local_18_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p5_state_18 a b ∪ requiredMatrix 9 k9t4p5_step_18_data.required a b) 5 j = k9t4p5_local_18 5 j := by decide + +private theorem k9t4p5_local_18_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p5_state_18 a b ∪ requiredMatrix 9 k9t4p5_step_18_data.required a b) 6 j = k9t4p5_local_18 6 j := by decide + +private theorem k9t4p5_local_18_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p5_state_18 a b ∪ requiredMatrix 9 k9t4p5_step_18_data.required a b) 7 j = k9t4p5_local_18 7 j := by decide + +private theorem k9t4p5_local_18_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p5_state_18 a b ∪ requiredMatrix 9 k9t4p5_step_18_data.required a b) 8 j = k9t4p5_local_18 8 j := by decide + +private theorem k9t4p5_local_18_eq : (fun a b => k9t4p5_state_18 a b ∪ requiredMatrix 9 k9t4p5_step_18_data.required a b) = k9t4p5_local_18 := by + funext i j + fin_cases i + + · exact k9t4p5_local_18_eq_row_0 j + + · exact k9t4p5_local_18_eq_row_1 j + + · exact k9t4p5_local_18_eq_row_2 j + + · exact k9t4p5_local_18_eq_row_3 j + + · exact k9t4p5_local_18_eq_row_4 j + + · exact k9t4p5_local_18_eq_row_5 j + + · exact k9t4p5_local_18_eq_row_6 j + + · exact k9t4p5_local_18_eq_row_7 j + + · exact k9t4p5_local_18_eq_row_8 j + +private theorem k9t4p5_local_18_paths : ∀ p ∈ k9t4p5_step_18_data.required, p.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_18_data.i k9t4p5_step_18_data.j) 9 := by decide + +private theorem k9t4p5_local_18_bad : k9t4p5_step_18_data.bad.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_18_data.i k9t4p5_step_18_data.j) k9t4p5_local_18 9 4 := by decide + +private theorem k9t4p5_step_18_check : k9t4p5_step_18.Check k9t4p5.graph k9t4p5_state_18 9 4 := by + change k9t4p5_step_18_data.Check k9t4p5.graph k9t4p5_state_18 9 4 + refine ⟨k9t4p5_local_18_paths, ?_⟩ + rw [k9t4p5_local_18_eq] + exact k9t4p5_local_18_bad + +private theorem k9t4p5_update_18 : k9t4p5_step_18.apply k9t4p5_state_18 = k9t4p5_state_19 := by + have h : ∀ i j : Fin 9, k9t4p5_step_18.apply k9t4p5_state_18 i j = k9t4p5_state_19 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_20 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_19 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 5, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, Finset.Icc 1 6, {2, 3, 4}, {1, 2, 3}, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 4, {1, 2}, ∅, Finset.Icc 4 7, Finset.Icc 1 6, ∅, {2, 3, 4}, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_19_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p5_state_19 a b ∪ requiredMatrix 9 k9t4p5_step_19_data.required a b) 0 j = k9t4p5_local_19 0 j := by decide + +private theorem k9t4p5_local_19_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p5_state_19 a b ∪ requiredMatrix 9 k9t4p5_step_19_data.required a b) 1 j = k9t4p5_local_19 1 j := by decide + +private theorem k9t4p5_local_19_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p5_state_19 a b ∪ requiredMatrix 9 k9t4p5_step_19_data.required a b) 2 j = k9t4p5_local_19 2 j := by decide + +private theorem k9t4p5_local_19_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p5_state_19 a b ∪ requiredMatrix 9 k9t4p5_step_19_data.required a b) 3 j = k9t4p5_local_19 3 j := by decide + +private theorem k9t4p5_local_19_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p5_state_19 a b ∪ requiredMatrix 9 k9t4p5_step_19_data.required a b) 4 j = k9t4p5_local_19 4 j := by decide + +private theorem k9t4p5_local_19_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p5_state_19 a b ∪ requiredMatrix 9 k9t4p5_step_19_data.required a b) 5 j = k9t4p5_local_19 5 j := by decide + +private theorem k9t4p5_local_19_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p5_state_19 a b ∪ requiredMatrix 9 k9t4p5_step_19_data.required a b) 6 j = k9t4p5_local_19 6 j := by decide + +private theorem k9t4p5_local_19_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p5_state_19 a b ∪ requiredMatrix 9 k9t4p5_step_19_data.required a b) 7 j = k9t4p5_local_19 7 j := by decide + +private theorem k9t4p5_local_19_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p5_state_19 a b ∪ requiredMatrix 9 k9t4p5_step_19_data.required a b) 8 j = k9t4p5_local_19 8 j := by decide + +private theorem k9t4p5_local_19_eq : (fun a b => k9t4p5_state_19 a b ∪ requiredMatrix 9 k9t4p5_step_19_data.required a b) = k9t4p5_local_19 := by + funext i j + fin_cases i + + · exact k9t4p5_local_19_eq_row_0 j + + · exact k9t4p5_local_19_eq_row_1 j + + · exact k9t4p5_local_19_eq_row_2 j + + · exact k9t4p5_local_19_eq_row_3 j + + · exact k9t4p5_local_19_eq_row_4 j + + · exact k9t4p5_local_19_eq_row_5 j + + · exact k9t4p5_local_19_eq_row_6 j + + · exact k9t4p5_local_19_eq_row_7 j + + · exact k9t4p5_local_19_eq_row_8 j + +private theorem k9t4p5_local_19_paths : ∀ p ∈ k9t4p5_step_19_data.required, p.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_19_data.i k9t4p5_step_19_data.j) 9 := by decide + +private theorem k9t4p5_local_19_bad : k9t4p5_step_19_data.bad.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_19_data.i k9t4p5_step_19_data.j) k9t4p5_local_19 9 4 := by decide + +private theorem k9t4p5_step_19_check : k9t4p5_step_19.Check k9t4p5.graph k9t4p5_state_19 9 4 := by + change k9t4p5_step_19_data.Check k9t4p5.graph k9t4p5_state_19 9 4 + refine ⟨k9t4p5_local_19_paths, ?_⟩ + rw [k9t4p5_local_19_eq] + exact k9t4p5_local_19_bad + +private theorem k9t4p5_update_19 : k9t4p5_step_19.apply k9t4p5_state_19 = k9t4p5_state_20 := by + have h : ∀ i j : Fin 9, k9t4p5_step_19.apply k9t4p5_state_19 i j = k9t4p5_state_20 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_21 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_20 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, {0, 1}, ∅, {0, 1}, Finset.Icc 1 4, ∅, {0}, ∅, {0, 1, 2}], + #[{0, 1, 2}, ∅, {1}, {1, 2}, {0, 1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{0, 1}, {1}, ∅, {1, 2}, {0, 1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[{0, 1}, {0, 1, 2, 3, 5, 6, 7}, {0, 1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {0, 1, 4, 5, 6, 7}], + #[Finset.Icc 1 4, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, Finset.Icc 1 6], + #[∅, {1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[{0}, Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[∅, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, Finset.Icc 4 7, {4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{0, 1, 2}, {1, 2}, {1, 2}, ∅, {0, 1, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_20_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_20 a b ∪ requiredMatrix 9 k9t4p5_step_20_data.required a b) 0 j = k9t4p5_local_20 0 j := by decide + +private theorem k9t4p5_local_20_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_20 a b ∪ requiredMatrix 9 k9t4p5_step_20_data.required a b) 1 j = k9t4p5_local_20 1 j := by decide + +private theorem k9t4p5_local_20_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_20 a b ∪ requiredMatrix 9 k9t4p5_step_20_data.required a b) 2 j = k9t4p5_local_20 2 j := by decide + +private theorem k9t4p5_local_20_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_20 a b ∪ requiredMatrix 9 k9t4p5_step_20_data.required a b) 3 j = k9t4p5_local_20 3 j := by decide + +private theorem k9t4p5_local_20_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_20 a b ∪ requiredMatrix 9 k9t4p5_step_20_data.required a b) 4 j = k9t4p5_local_20 4 j := by decide + +private theorem k9t4p5_local_20_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_20 a b ∪ requiredMatrix 9 k9t4p5_step_20_data.required a b) 5 j = k9t4p5_local_20 5 j := by decide + +private theorem k9t4p5_local_20_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_20 a b ∪ requiredMatrix 9 k9t4p5_step_20_data.required a b) 6 j = k9t4p5_local_20 6 j := by decide + +private theorem k9t4p5_local_20_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_20 a b ∪ requiredMatrix 9 k9t4p5_step_20_data.required a b) 7 j = k9t4p5_local_20 7 j := by decide + +private theorem k9t4p5_local_20_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_20 a b ∪ requiredMatrix 9 k9t4p5_step_20_data.required a b) 8 j = k9t4p5_local_20 8 j := by decide + +private theorem k9t4p5_local_20_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_20 a b ∪ requiredMatrix 9 k9t4p5_step_20_data.required a b) 9 j = k9t4p5_local_20 9 j := by decide + +private theorem k9t4p5_local_20_eq : (fun a b => freshMatrix k9t4p5_state_20 a b ∪ requiredMatrix 9 k9t4p5_step_20_data.required a b) = k9t4p5_local_20 := by + funext i j + fin_cases i + + · exact k9t4p5_local_20_eq_row_0 j + + · exact k9t4p5_local_20_eq_row_1 j + + · exact k9t4p5_local_20_eq_row_2 j + + · exact k9t4p5_local_20_eq_row_3 j + + · exact k9t4p5_local_20_eq_row_4 j + + · exact k9t4p5_local_20_eq_row_5 j + + · exact k9t4p5_local_20_eq_row_6 j + + · exact k9t4p5_local_20_eq_row_7 j + + · exact k9t4p5_local_20_eq_row_8 j + + · exact k9t4p5_local_20_eq_row_9 j + +private theorem k9t4p5_local_20_paths : ∀ p ∈ k9t4p5_step_20_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_20_data.i k9t4p5_step_20_data.j) 9 := by decide + +private theorem k9t4p5_local_20_bad : k9t4p5_step_20_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_20_data.i k9t4p5_step_20_data.j) k9t4p5_local_20 9 4 := by decide + +private theorem k9t4p5_step_20_check : k9t4p5_step_20.Check k9t4p5.graph k9t4p5_state_20 9 4 := by + change k9t4p5_step_20_data.Check k9t4p5.graph k9t4p5_state_20 9 4 + refine ⟨by decide, k9t4p5_local_20_paths, ?_⟩ + rw [k9t4p5_local_20_eq] + exact k9t4p5_local_20_bad + +private theorem k9t4p5_update_20 : k9t4p5_step_20.apply k9t4p5_state_20 = k9t4p5_state_21 := by + have h : ∀ i j : Fin 9, k9t4p5_step_20.apply k9t4p5_state_20 i j = k9t4p5_state_21 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_22 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_21 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, Finset.Icc 1 4, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[Finset.Icc 1 4, {1, 2}, ∅, Finset.Icc 1 4, Finset.Icc 1 4, {1}, Finset.Icc 0 6, {1, 4, 5, 6, 7}, ∅], + #[Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, Finset.Icc 1 4, ∅, {1, 2, 3}, Finset.Icc 0 4, Finset.Icc 0 6, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[Finset.Icc 1 5, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_21_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p5_state_21 a b ∪ requiredMatrix 9 k9t4p5_step_21_data.required a b) 0 j = k9t4p5_local_21 0 j := by decide + +private theorem k9t4p5_local_21_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p5_state_21 a b ∪ requiredMatrix 9 k9t4p5_step_21_data.required a b) 1 j = k9t4p5_local_21 1 j := by decide + +private theorem k9t4p5_local_21_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p5_state_21 a b ∪ requiredMatrix 9 k9t4p5_step_21_data.required a b) 2 j = k9t4p5_local_21 2 j := by decide + +private theorem k9t4p5_local_21_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p5_state_21 a b ∪ requiredMatrix 9 k9t4p5_step_21_data.required a b) 3 j = k9t4p5_local_21 3 j := by decide + +private theorem k9t4p5_local_21_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p5_state_21 a b ∪ requiredMatrix 9 k9t4p5_step_21_data.required a b) 4 j = k9t4p5_local_21 4 j := by decide + +private theorem k9t4p5_local_21_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p5_state_21 a b ∪ requiredMatrix 9 k9t4p5_step_21_data.required a b) 5 j = k9t4p5_local_21 5 j := by decide + +private theorem k9t4p5_local_21_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p5_state_21 a b ∪ requiredMatrix 9 k9t4p5_step_21_data.required a b) 6 j = k9t4p5_local_21 6 j := by decide + +private theorem k9t4p5_local_21_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p5_state_21 a b ∪ requiredMatrix 9 k9t4p5_step_21_data.required a b) 7 j = k9t4p5_local_21 7 j := by decide + +private theorem k9t4p5_local_21_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p5_state_21 a b ∪ requiredMatrix 9 k9t4p5_step_21_data.required a b) 8 j = k9t4p5_local_21 8 j := by decide + +private theorem k9t4p5_local_21_eq : (fun a b => k9t4p5_state_21 a b ∪ requiredMatrix 9 k9t4p5_step_21_data.required a b) = k9t4p5_local_21 := by + funext i j + fin_cases i + + · exact k9t4p5_local_21_eq_row_0 j + + · exact k9t4p5_local_21_eq_row_1 j + + · exact k9t4p5_local_21_eq_row_2 j + + · exact k9t4p5_local_21_eq_row_3 j + + · exact k9t4p5_local_21_eq_row_4 j + + · exact k9t4p5_local_21_eq_row_5 j + + · exact k9t4p5_local_21_eq_row_6 j + + · exact k9t4p5_local_21_eq_row_7 j + + · exact k9t4p5_local_21_eq_row_8 j + +private theorem k9t4p5_local_21_paths : ∀ p ∈ k9t4p5_step_21_data.required, p.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_21_data.i k9t4p5_step_21_data.j) 9 := by decide + +private theorem k9t4p5_local_21_bad : k9t4p5_step_21_data.bad.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_21_data.i k9t4p5_step_21_data.j) k9t4p5_local_21 9 4 := by decide + +private theorem k9t4p5_step_21_check : k9t4p5_step_21.Check k9t4p5.graph k9t4p5_state_21 9 4 := by + change k9t4p5_step_21_data.Check k9t4p5.graph k9t4p5_state_21 9 4 + refine ⟨k9t4p5_local_21_paths, ?_⟩ + rw [k9t4p5_local_21_eq] + exact k9t4p5_local_21_bad + +private theorem k9t4p5_update_21 : k9t4p5_step_21.apply k9t4p5_state_21 = k9t4p5_state_22 := by + have h : ∀ i j : Fin 9, k9t4p5_step_21.apply k9t4p5_state_21 i j = k9t4p5_state_22 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_23 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_22 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2}, {1, 2}, Finset.Icc 1 7, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 4, Finset.Icc 0 6, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, {1, 2, 3}, Finset.Icc 1 4, {0, 1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_22_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p5_state_22 a b ∪ requiredMatrix 9 k9t4p5_step_22_data.required a b) 0 j = k9t4p5_local_22 0 j := by decide + +private theorem k9t4p5_local_22_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p5_state_22 a b ∪ requiredMatrix 9 k9t4p5_step_22_data.required a b) 1 j = k9t4p5_local_22 1 j := by decide + +private theorem k9t4p5_local_22_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p5_state_22 a b ∪ requiredMatrix 9 k9t4p5_step_22_data.required a b) 2 j = k9t4p5_local_22 2 j := by decide + +private theorem k9t4p5_local_22_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p5_state_22 a b ∪ requiredMatrix 9 k9t4p5_step_22_data.required a b) 3 j = k9t4p5_local_22 3 j := by decide + +private theorem k9t4p5_local_22_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p5_state_22 a b ∪ requiredMatrix 9 k9t4p5_step_22_data.required a b) 4 j = k9t4p5_local_22 4 j := by decide + +private theorem k9t4p5_local_22_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p5_state_22 a b ∪ requiredMatrix 9 k9t4p5_step_22_data.required a b) 5 j = k9t4p5_local_22 5 j := by decide + +private theorem k9t4p5_local_22_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p5_state_22 a b ∪ requiredMatrix 9 k9t4p5_step_22_data.required a b) 6 j = k9t4p5_local_22 6 j := by decide + +private theorem k9t4p5_local_22_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p5_state_22 a b ∪ requiredMatrix 9 k9t4p5_step_22_data.required a b) 7 j = k9t4p5_local_22 7 j := by decide + +private theorem k9t4p5_local_22_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p5_state_22 a b ∪ requiredMatrix 9 k9t4p5_step_22_data.required a b) 8 j = k9t4p5_local_22 8 j := by decide + +private theorem k9t4p5_local_22_eq : (fun a b => k9t4p5_state_22 a b ∪ requiredMatrix 9 k9t4p5_step_22_data.required a b) = k9t4p5_local_22 := by + funext i j + fin_cases i + + · exact k9t4p5_local_22_eq_row_0 j + + · exact k9t4p5_local_22_eq_row_1 j + + · exact k9t4p5_local_22_eq_row_2 j + + · exact k9t4p5_local_22_eq_row_3 j + + · exact k9t4p5_local_22_eq_row_4 j + + · exact k9t4p5_local_22_eq_row_5 j + + · exact k9t4p5_local_22_eq_row_6 j + + · exact k9t4p5_local_22_eq_row_7 j + + · exact k9t4p5_local_22_eq_row_8 j + +private theorem k9t4p5_local_22_paths : ∀ p ∈ k9t4p5_step_22_data.required, p.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_22_data.i k9t4p5_step_22_data.j) 9 := by decide + +private theorem k9t4p5_local_22_bad : k9t4p5_step_22_data.bad.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_22_data.i k9t4p5_step_22_data.j) k9t4p5_local_22 9 4 := by decide + +private theorem k9t4p5_step_22_check : k9t4p5_step_22.Check k9t4p5.graph k9t4p5_state_22 9 4 := by + change k9t4p5_step_22_data.Check k9t4p5.graph k9t4p5_state_22 9 4 + refine ⟨k9t4p5_local_22_paths, ?_⟩ + rw [k9t4p5_local_22_eq] + exact k9t4p5_local_22_bad + +private theorem k9t4p5_update_22 : k9t4p5_step_22.apply k9t4p5_state_22 = k9t4p5_state_23 := by + have h : ∀ i j : Fin 9, k9t4p5_step_22.apply k9t4p5_state_22 i j = k9t4p5_state_23 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_24 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_23 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 3, ∅, ∅, ∅, {0, 1, 2}, ∅, {0, 1, 2}, ∅, ∅], + #[Finset.Icc 0 3, ∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[∅, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[{0, 1, 2}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[∅, {1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4}, ∅], + #[{0, 1, 2}, Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4], + #[∅, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, Finset.Icc 0 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_23_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_23 a b ∪ requiredMatrix 9 k9t4p5_step_23_data.required a b) 0 j = k9t4p5_local_23 0 j := by decide + +private theorem k9t4p5_local_23_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_23 a b ∪ requiredMatrix 9 k9t4p5_step_23_data.required a b) 1 j = k9t4p5_local_23 1 j := by decide + +private theorem k9t4p5_local_23_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_23 a b ∪ requiredMatrix 9 k9t4p5_step_23_data.required a b) 2 j = k9t4p5_local_23 2 j := by decide + +private theorem k9t4p5_local_23_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_23 a b ∪ requiredMatrix 9 k9t4p5_step_23_data.required a b) 3 j = k9t4p5_local_23 3 j := by decide + +private theorem k9t4p5_local_23_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_23 a b ∪ requiredMatrix 9 k9t4p5_step_23_data.required a b) 4 j = k9t4p5_local_23 4 j := by decide + +private theorem k9t4p5_local_23_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_23 a b ∪ requiredMatrix 9 k9t4p5_step_23_data.required a b) 5 j = k9t4p5_local_23 5 j := by decide + +private theorem k9t4p5_local_23_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_23 a b ∪ requiredMatrix 9 k9t4p5_step_23_data.required a b) 6 j = k9t4p5_local_23 6 j := by decide + +private theorem k9t4p5_local_23_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_23 a b ∪ requiredMatrix 9 k9t4p5_step_23_data.required a b) 7 j = k9t4p5_local_23 7 j := by decide + +private theorem k9t4p5_local_23_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_23 a b ∪ requiredMatrix 9 k9t4p5_step_23_data.required a b) 8 j = k9t4p5_local_23 8 j := by decide + +private theorem k9t4p5_local_23_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_23 a b ∪ requiredMatrix 9 k9t4p5_step_23_data.required a b) 9 j = k9t4p5_local_23 9 j := by decide + +private theorem k9t4p5_local_23_eq : (fun a b => freshMatrix k9t4p5_state_23 a b ∪ requiredMatrix 9 k9t4p5_step_23_data.required a b) = k9t4p5_local_23 := by + funext i j + fin_cases i + + · exact k9t4p5_local_23_eq_row_0 j + + · exact k9t4p5_local_23_eq_row_1 j + + · exact k9t4p5_local_23_eq_row_2 j + + · exact k9t4p5_local_23_eq_row_3 j + + · exact k9t4p5_local_23_eq_row_4 j + + · exact k9t4p5_local_23_eq_row_5 j + + · exact k9t4p5_local_23_eq_row_6 j + + · exact k9t4p5_local_23_eq_row_7 j + + · exact k9t4p5_local_23_eq_row_8 j + + · exact k9t4p5_local_23_eq_row_9 j + +private theorem k9t4p5_local_23_paths : ∀ p ∈ k9t4p5_step_23_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_23_data.i k9t4p5_step_23_data.j) 9 := by decide + +private theorem k9t4p5_local_23_bad : k9t4p5_step_23_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_23_data.i k9t4p5_step_23_data.j) k9t4p5_local_23 9 4 := by decide + +private theorem k9t4p5_step_23_check : k9t4p5_step_23.Check k9t4p5.graph k9t4p5_state_23 9 4 := by + change k9t4p5_step_23_data.Check k9t4p5.graph k9t4p5_state_23 9 4 + refine ⟨by decide, k9t4p5_local_23_paths, ?_⟩ + rw [k9t4p5_local_23_eq] + exact k9t4p5_local_23_bad + +private theorem k9t4p5_update_23 : k9t4p5_step_23.apply k9t4p5_state_23 = k9t4p5_state_24 := by + have h : ∀ i j : Fin 9, k9t4p5_step_23.apply k9t4p5_state_23 i j = k9t4p5_state_24 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_25 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 4, 5, 6, 7}, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_24 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, {0, 1}, {0, 1, 2}, ∅, {0}, ∅, Finset.Icc 1 4, {0, 1}, ∅], + #[{0, 1, 2}, ∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {0, 1, 2, 3, 5, 6, 7}, {1, 2}], + #[{0, 1}, {1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {0, 1, 2, 3, 5, 6, 7}, {1, 2}], + #[{0, 1, 2}, {1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, Finset.Icc 0 6, {0, 1, 4, 5, 6, 7}, ∅], + #[∅, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, Finset.Icc 4 7], + #[{0}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[∅, {1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, ∅], + #[Finset.Icc 1 4, Finset.Icc 0 6, Finset.Icc 0 4, Finset.Icc 0 6, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{0, 1}, {0, 1, 2, 3, 5, 6, 7}, {0, 1, 2, 3, 5, 6, 7}, {0, 1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2}, {1, 2}, ∅, Finset.Icc 4 7, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_24_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_24 a b ∪ requiredMatrix 9 k9t4p5_step_24_data.required a b) 0 j = k9t4p5_local_24 0 j := by decide + +private theorem k9t4p5_local_24_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_24 a b ∪ requiredMatrix 9 k9t4p5_step_24_data.required a b) 1 j = k9t4p5_local_24 1 j := by decide + +private theorem k9t4p5_local_24_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_24 a b ∪ requiredMatrix 9 k9t4p5_step_24_data.required a b) 2 j = k9t4p5_local_24 2 j := by decide + +private theorem k9t4p5_local_24_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_24 a b ∪ requiredMatrix 9 k9t4p5_step_24_data.required a b) 3 j = k9t4p5_local_24 3 j := by decide + +private theorem k9t4p5_local_24_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_24 a b ∪ requiredMatrix 9 k9t4p5_step_24_data.required a b) 4 j = k9t4p5_local_24 4 j := by decide + +private theorem k9t4p5_local_24_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_24 a b ∪ requiredMatrix 9 k9t4p5_step_24_data.required a b) 5 j = k9t4p5_local_24 5 j := by decide + +private theorem k9t4p5_local_24_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_24 a b ∪ requiredMatrix 9 k9t4p5_step_24_data.required a b) 6 j = k9t4p5_local_24 6 j := by decide + +private theorem k9t4p5_local_24_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_24 a b ∪ requiredMatrix 9 k9t4p5_step_24_data.required a b) 7 j = k9t4p5_local_24 7 j := by decide + +private theorem k9t4p5_local_24_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_24 a b ∪ requiredMatrix 9 k9t4p5_step_24_data.required a b) 8 j = k9t4p5_local_24 8 j := by decide + +private theorem k9t4p5_local_24_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_24 a b ∪ requiredMatrix 9 k9t4p5_step_24_data.required a b) 9 j = k9t4p5_local_24 9 j := by decide + +private theorem k9t4p5_local_24_eq : (fun a b => freshMatrix k9t4p5_state_24 a b ∪ requiredMatrix 9 k9t4p5_step_24_data.required a b) = k9t4p5_local_24 := by + funext i j + fin_cases i + + · exact k9t4p5_local_24_eq_row_0 j + + · exact k9t4p5_local_24_eq_row_1 j + + · exact k9t4p5_local_24_eq_row_2 j + + · exact k9t4p5_local_24_eq_row_3 j + + · exact k9t4p5_local_24_eq_row_4 j + + · exact k9t4p5_local_24_eq_row_5 j + + · exact k9t4p5_local_24_eq_row_6 j + + · exact k9t4p5_local_24_eq_row_7 j + + · exact k9t4p5_local_24_eq_row_8 j + + · exact k9t4p5_local_24_eq_row_9 j + +private theorem k9t4p5_local_24_paths : ∀ p ∈ k9t4p5_step_24_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_24_data.i k9t4p5_step_24_data.j) 9 := by decide + +private theorem k9t4p5_local_24_bad : k9t4p5_step_24_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_24_data.i k9t4p5_step_24_data.j) k9t4p5_local_24 9 4 := by decide + +private theorem k9t4p5_step_24_check : k9t4p5_step_24.Check k9t4p5.graph k9t4p5_state_24 9 4 := by + change k9t4p5_step_24_data.Check k9t4p5.graph k9t4p5_state_24 9 4 + refine ⟨by decide, k9t4p5_local_24_paths, ?_⟩ + rw [k9t4p5_local_24_eq] + exact k9t4p5_local_24_bad + +private theorem k9t4p5_update_24 : k9t4p5_step_24.apply k9t4p5_state_24 = k9t4p5_state_25 := by + have h : ∀ i j : Fin 9, k9t4p5_step_24.apply k9t4p5_state_24 i j = k9t4p5_state_25 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_26 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5, 6}, {0, 1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 4, 5, 6, 7}, {0, 1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_25 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 1 6, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5, 6}, {1, 4, 5, 6}], + #[Finset.Icc 1 5, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, Finset.Icc 1 6, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 4, 5, 6, 7}, {1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_25_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p5_state_25 a b ∪ requiredMatrix 9 k9t4p5_step_25_data.required a b) 0 j = k9t4p5_local_25 0 j := by decide + +private theorem k9t4p5_local_25_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p5_state_25 a b ∪ requiredMatrix 9 k9t4p5_step_25_data.required a b) 1 j = k9t4p5_local_25 1 j := by decide + +private theorem k9t4p5_local_25_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p5_state_25 a b ∪ requiredMatrix 9 k9t4p5_step_25_data.required a b) 2 j = k9t4p5_local_25 2 j := by decide + +private theorem k9t4p5_local_25_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p5_state_25 a b ∪ requiredMatrix 9 k9t4p5_step_25_data.required a b) 3 j = k9t4p5_local_25 3 j := by decide + +private theorem k9t4p5_local_25_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p5_state_25 a b ∪ requiredMatrix 9 k9t4p5_step_25_data.required a b) 4 j = k9t4p5_local_25 4 j := by decide + +private theorem k9t4p5_local_25_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p5_state_25 a b ∪ requiredMatrix 9 k9t4p5_step_25_data.required a b) 5 j = k9t4p5_local_25 5 j := by decide + +private theorem k9t4p5_local_25_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p5_state_25 a b ∪ requiredMatrix 9 k9t4p5_step_25_data.required a b) 6 j = k9t4p5_local_25 6 j := by decide + +private theorem k9t4p5_local_25_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p5_state_25 a b ∪ requiredMatrix 9 k9t4p5_step_25_data.required a b) 7 j = k9t4p5_local_25 7 j := by decide + +private theorem k9t4p5_local_25_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p5_state_25 a b ∪ requiredMatrix 9 k9t4p5_step_25_data.required a b) 8 j = k9t4p5_local_25 8 j := by decide + +private theorem k9t4p5_local_25_eq : (fun a b => k9t4p5_state_25 a b ∪ requiredMatrix 9 k9t4p5_step_25_data.required a b) = k9t4p5_local_25 := by + funext i j + fin_cases i + + · exact k9t4p5_local_25_eq_row_0 j + + · exact k9t4p5_local_25_eq_row_1 j + + · exact k9t4p5_local_25_eq_row_2 j + + · exact k9t4p5_local_25_eq_row_3 j + + · exact k9t4p5_local_25_eq_row_4 j + + · exact k9t4p5_local_25_eq_row_5 j + + · exact k9t4p5_local_25_eq_row_6 j + + · exact k9t4p5_local_25_eq_row_7 j + + · exact k9t4p5_local_25_eq_row_8 j + +private theorem k9t4p5_local_25_paths : ∀ p ∈ k9t4p5_step_25_data.required, p.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_25_data.i k9t4p5_step_25_data.j) 9 := by decide + +private theorem k9t4p5_local_25_bad : k9t4p5_step_25_data.bad.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_25_data.i k9t4p5_step_25_data.j) k9t4p5_local_25 9 4 := by decide + +private theorem k9t4p5_step_25_check : k9t4p5_step_25.Check k9t4p5.graph k9t4p5_state_25 9 4 := by + change k9t4p5_step_25_data.Check k9t4p5.graph k9t4p5_state_25 9 4 + refine ⟨k9t4p5_local_25_paths, ?_⟩ + rw [k9t4p5_local_25_eq] + exact k9t4p5_local_25_bad + +private theorem k9t4p5_update_25 : k9t4p5_step_25.apply k9t4p5_state_25 = k9t4p5_state_26 := by + have h : ∀ i j : Fin 9, k9t4p5_step_25.apply k9t4p5_state_25 i j = k9t4p5_state_26 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_27 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5, 6}, {0, 1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 4, 5, 6, 7}, {0, 1, 4, 5, 6}, {1}, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_26 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 5, {0, 1}, ∅, {1, 2}, Finset.Icc 0 4, ∅, {0, 1}, {0, 1}, ∅], + #[Finset.Icc 0 5, ∅, {1, 2}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{0, 1}, {1, 2}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[{1, 2}, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4, {0, 1, 3, 4, 5, 6}, {0, 1, 4, 5, 6}], + #[∅, {1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, ∅], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{0, 1}, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2}, {1, 2}, ∅, {1, 4, 5, 6, 7}, {0, 1, 4, 5, 6}, ∅, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_26_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_26 a b ∪ requiredMatrix 9 k9t4p5_step_26_data.required a b) 0 j = k9t4p5_local_26 0 j := by decide + +private theorem k9t4p5_local_26_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_26 a b ∪ requiredMatrix 9 k9t4p5_step_26_data.required a b) 1 j = k9t4p5_local_26 1 j := by decide + +private theorem k9t4p5_local_26_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_26 a b ∪ requiredMatrix 9 k9t4p5_step_26_data.required a b) 2 j = k9t4p5_local_26 2 j := by decide + +private theorem k9t4p5_local_26_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_26 a b ∪ requiredMatrix 9 k9t4p5_step_26_data.required a b) 3 j = k9t4p5_local_26 3 j := by decide + +private theorem k9t4p5_local_26_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_26 a b ∪ requiredMatrix 9 k9t4p5_step_26_data.required a b) 4 j = k9t4p5_local_26 4 j := by decide + +private theorem k9t4p5_local_26_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_26 a b ∪ requiredMatrix 9 k9t4p5_step_26_data.required a b) 5 j = k9t4p5_local_26 5 j := by decide + +private theorem k9t4p5_local_26_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_26 a b ∪ requiredMatrix 9 k9t4p5_step_26_data.required a b) 6 j = k9t4p5_local_26 6 j := by decide + +private theorem k9t4p5_local_26_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_26 a b ∪ requiredMatrix 9 k9t4p5_step_26_data.required a b) 7 j = k9t4p5_local_26 7 j := by decide + +private theorem k9t4p5_local_26_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_26 a b ∪ requiredMatrix 9 k9t4p5_step_26_data.required a b) 8 j = k9t4p5_local_26 8 j := by decide + +private theorem k9t4p5_local_26_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_26 a b ∪ requiredMatrix 9 k9t4p5_step_26_data.required a b) 9 j = k9t4p5_local_26 9 j := by decide + +private theorem k9t4p5_local_26_eq : (fun a b => freshMatrix k9t4p5_state_26 a b ∪ requiredMatrix 9 k9t4p5_step_26_data.required a b) = k9t4p5_local_26 := by + funext i j + fin_cases i + + · exact k9t4p5_local_26_eq_row_0 j + + · exact k9t4p5_local_26_eq_row_1 j + + · exact k9t4p5_local_26_eq_row_2 j + + · exact k9t4p5_local_26_eq_row_3 j + + · exact k9t4p5_local_26_eq_row_4 j + + · exact k9t4p5_local_26_eq_row_5 j + + · exact k9t4p5_local_26_eq_row_6 j + + · exact k9t4p5_local_26_eq_row_7 j + + · exact k9t4p5_local_26_eq_row_8 j + + · exact k9t4p5_local_26_eq_row_9 j + +private theorem k9t4p5_local_26_paths : ∀ p ∈ k9t4p5_step_26_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_26_data.i k9t4p5_step_26_data.j) 9 := by decide + +private theorem k9t4p5_local_26_bad : k9t4p5_step_26_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_26_data.i k9t4p5_step_26_data.j) k9t4p5_local_26 9 4 := by decide + +private theorem k9t4p5_step_26_check : k9t4p5_step_26.Check k9t4p5.graph k9t4p5_state_26 9 4 := by + change k9t4p5_step_26_data.Check k9t4p5.graph k9t4p5_state_26 9 4 + refine ⟨by decide, k9t4p5_local_26_paths, ?_⟩ + rw [k9t4p5_local_26_eq] + exact k9t4p5_local_26_bad + +private theorem k9t4p5_update_26 : k9t4p5_step_26.apply k9t4p5_state_26 = k9t4p5_state_27 := by + have h : ∀ i j : Fin 9, k9t4p5_step_26.apply k9t4p5_state_26 i j = k9t4p5_state_27 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_28 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5, 6}, {0, 1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 4, 5, 6, 7}, {0, 1, 4, 5, 6}, {1}, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_27 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, ∅, {1, 2, 3}, ∅, ∅, {0, 1, 2}, ∅], + #[{0, 1, 2}, ∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2}], + #[∅, {1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {0, 1, 2, 3, 5, 6, 7}, {1, 2}], + #[∅, {1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[∅, {1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {1, 4, 5, 6, 7}], + #[{1, 2, 3}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, Finset.Icc 0 6, {0, 1, 4, 5, 6}], + #[∅, {1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1}], + #[∅, Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}], + #[{0, 1, 2}, Finset.Icc 0 7, {0, 1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, Finset.Icc 0 6, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2}, {1, 2}, ∅, {1, 4, 5, 6, 7}, {0, 1, 4, 5, 6}, {1}, {2, 3, 4}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_27_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_27 a b ∪ requiredMatrix 9 k9t4p5_step_27_data.required a b) 0 j = k9t4p5_local_27 0 j := by decide + +private theorem k9t4p5_local_27_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_27 a b ∪ requiredMatrix 9 k9t4p5_step_27_data.required a b) 1 j = k9t4p5_local_27 1 j := by decide + +private theorem k9t4p5_local_27_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_27 a b ∪ requiredMatrix 9 k9t4p5_step_27_data.required a b) 2 j = k9t4p5_local_27 2 j := by decide + +private theorem k9t4p5_local_27_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_27 a b ∪ requiredMatrix 9 k9t4p5_step_27_data.required a b) 3 j = k9t4p5_local_27 3 j := by decide + +private theorem k9t4p5_local_27_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_27 a b ∪ requiredMatrix 9 k9t4p5_step_27_data.required a b) 4 j = k9t4p5_local_27 4 j := by decide + +private theorem k9t4p5_local_27_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_27 a b ∪ requiredMatrix 9 k9t4p5_step_27_data.required a b) 5 j = k9t4p5_local_27 5 j := by decide + +private theorem k9t4p5_local_27_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_27 a b ∪ requiredMatrix 9 k9t4p5_step_27_data.required a b) 6 j = k9t4p5_local_27 6 j := by decide + +private theorem k9t4p5_local_27_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_27 a b ∪ requiredMatrix 9 k9t4p5_step_27_data.required a b) 7 j = k9t4p5_local_27 7 j := by decide + +private theorem k9t4p5_local_27_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_27 a b ∪ requiredMatrix 9 k9t4p5_step_27_data.required a b) 8 j = k9t4p5_local_27 8 j := by decide + +private theorem k9t4p5_local_27_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p5_state_27 a b ∪ requiredMatrix 9 k9t4p5_step_27_data.required a b) 9 j = k9t4p5_local_27 9 j := by decide + +private theorem k9t4p5_local_27_eq : (fun a b => freshMatrix k9t4p5_state_27 a b ∪ requiredMatrix 9 k9t4p5_step_27_data.required a b) = k9t4p5_local_27 := by + funext i j + fin_cases i + + · exact k9t4p5_local_27_eq_row_0 j + + · exact k9t4p5_local_27_eq_row_1 j + + · exact k9t4p5_local_27_eq_row_2 j + + · exact k9t4p5_local_27_eq_row_3 j + + · exact k9t4p5_local_27_eq_row_4 j + + · exact k9t4p5_local_27_eq_row_5 j + + · exact k9t4p5_local_27_eq_row_6 j + + · exact k9t4p5_local_27_eq_row_7 j + + · exact k9t4p5_local_27_eq_row_8 j + + · exact k9t4p5_local_27_eq_row_9 j + +private theorem k9t4p5_local_27_paths : ∀ p ∈ k9t4p5_step_27_data.required, p.Check (freshGraph k9t4p5.graph k9t4p5_step_27_data.i k9t4p5_step_27_data.j) 9 := by decide + +private theorem k9t4p5_local_27_bad : k9t4p5_step_27_data.bad.Check (freshGraph k9t4p5.graph k9t4p5_step_27_data.i k9t4p5_step_27_data.j) k9t4p5_local_27 9 4 := by decide + +private theorem k9t4p5_step_27_check : k9t4p5_step_27.Check k9t4p5.graph k9t4p5_state_27 9 4 := by + change k9t4p5_step_27_data.Check k9t4p5.graph k9t4p5_state_27 9 4 + refine ⟨by decide, k9t4p5_local_27_paths, ?_⟩ + rw [k9t4p5_local_27_eq] + exact k9t4p5_local_27_bad + +private theorem k9t4p5_update_27 : k9t4p5_step_27.apply k9t4p5_state_27 = k9t4p5_state_28 := by + have h : ∀ i j : Fin 9, k9t4p5_step_27.apply k9t4p5_state_27 i j = k9t4p5_state_28 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_29 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {0, 1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5, 6}, {0, 1, 4, 5, 6}], + #[{0, 1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 4, 5, 6, 7}, {0, 1, 4, 5, 6}, {1}, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_28 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, Finset.Icc 1 4, Finset.Icc 1 7, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 5, Finset.Icc 0 4, Finset.Icc 0 6, {4, 5, 6}, {1, 2, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, Finset.Icc 1 5, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5, 6}, {0, 1, 4, 5, 6}], + #[{1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, Finset.Icc 0 6, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 4, 5, 6, 7}, {0, 1, 4, 5, 6}, {1}, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_28_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p5_state_28 a b ∪ requiredMatrix 9 k9t4p5_step_28_data.required a b) 0 j = k9t4p5_local_28 0 j := by decide + +private theorem k9t4p5_local_28_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p5_state_28 a b ∪ requiredMatrix 9 k9t4p5_step_28_data.required a b) 1 j = k9t4p5_local_28 1 j := by decide + +private theorem k9t4p5_local_28_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p5_state_28 a b ∪ requiredMatrix 9 k9t4p5_step_28_data.required a b) 2 j = k9t4p5_local_28 2 j := by decide + +private theorem k9t4p5_local_28_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p5_state_28 a b ∪ requiredMatrix 9 k9t4p5_step_28_data.required a b) 3 j = k9t4p5_local_28 3 j := by decide + +private theorem k9t4p5_local_28_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p5_state_28 a b ∪ requiredMatrix 9 k9t4p5_step_28_data.required a b) 4 j = k9t4p5_local_28 4 j := by decide + +private theorem k9t4p5_local_28_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p5_state_28 a b ∪ requiredMatrix 9 k9t4p5_step_28_data.required a b) 5 j = k9t4p5_local_28 5 j := by decide + +private theorem k9t4p5_local_28_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p5_state_28 a b ∪ requiredMatrix 9 k9t4p5_step_28_data.required a b) 6 j = k9t4p5_local_28 6 j := by decide + +private theorem k9t4p5_local_28_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p5_state_28 a b ∪ requiredMatrix 9 k9t4p5_step_28_data.required a b) 7 j = k9t4p5_local_28 7 j := by decide + +private theorem k9t4p5_local_28_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p5_state_28 a b ∪ requiredMatrix 9 k9t4p5_step_28_data.required a b) 8 j = k9t4p5_local_28 8 j := by decide + +private theorem k9t4p5_local_28_eq : (fun a b => k9t4p5_state_28 a b ∪ requiredMatrix 9 k9t4p5_step_28_data.required a b) = k9t4p5_local_28 := by + funext i j + fin_cases i + + · exact k9t4p5_local_28_eq_row_0 j + + · exact k9t4p5_local_28_eq_row_1 j + + · exact k9t4p5_local_28_eq_row_2 j + + · exact k9t4p5_local_28_eq_row_3 j + + · exact k9t4p5_local_28_eq_row_4 j + + · exact k9t4p5_local_28_eq_row_5 j + + · exact k9t4p5_local_28_eq_row_6 j + + · exact k9t4p5_local_28_eq_row_7 j + + · exact k9t4p5_local_28_eq_row_8 j + +private theorem k9t4p5_local_28_paths : ∀ p ∈ k9t4p5_step_28_data.required, p.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_28_data.i k9t4p5_step_28_data.j) 9 := by decide + +private theorem k9t4p5_local_28_bad : k9t4p5_step_28_data.bad.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_28_data.i k9t4p5_step_28_data.j) k9t4p5_local_28 9 4 := by decide + +private theorem k9t4p5_step_28_check : k9t4p5_step_28.Check k9t4p5.graph k9t4p5_state_28 9 4 := by + change k9t4p5_step_28_data.Check k9t4p5.graph k9t4p5_state_28 9 4 + refine ⟨k9t4p5_local_28_paths, ?_⟩ + rw [k9t4p5_local_28_eq] + exact k9t4p5_local_28_bad + +private theorem k9t4p5_update_28 : k9t4p5_step_28.apply k9t4p5_state_28 = k9t4p5_state_29 := by + have h : ∀ i j : Fin 9, k9t4p5_step_28.apply k9t4p5_state_28 i j = k9t4p5_state_29 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_30 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {0, 1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {0, 1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5, 6}, {0, 1, 4, 5, 6}], + #[{0, 1, 3, 4, 5}, {1}, {0, 1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 4, 5, 6, 7}, {0, 1, 4, 5, 6}, {1}, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_29 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {0, 1, 3, 4, 5}, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5, 6}, {0, 1, 4, 5, 6}], + #[{0, 1, 3, 4, 5}, {1}, {1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, Finset.Icc 1 5, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 4, {1, 2}, ∅, {1, 4, 5, 6, 7}, {0, 1, 4, 5, 6}, {1}, Finset.Icc 1 4, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_29_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p5_state_29 a b ∪ requiredMatrix 9 k9t4p5_step_29_data.required a b) 0 j = k9t4p5_local_29 0 j := by decide + +private theorem k9t4p5_local_29_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p5_state_29 a b ∪ requiredMatrix 9 k9t4p5_step_29_data.required a b) 1 j = k9t4p5_local_29 1 j := by decide + +private theorem k9t4p5_local_29_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p5_state_29 a b ∪ requiredMatrix 9 k9t4p5_step_29_data.required a b) 2 j = k9t4p5_local_29 2 j := by decide + +private theorem k9t4p5_local_29_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p5_state_29 a b ∪ requiredMatrix 9 k9t4p5_step_29_data.required a b) 3 j = k9t4p5_local_29 3 j := by decide + +private theorem k9t4p5_local_29_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p5_state_29 a b ∪ requiredMatrix 9 k9t4p5_step_29_data.required a b) 4 j = k9t4p5_local_29 4 j := by decide + +private theorem k9t4p5_local_29_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p5_state_29 a b ∪ requiredMatrix 9 k9t4p5_step_29_data.required a b) 5 j = k9t4p5_local_29 5 j := by decide + +private theorem k9t4p5_local_29_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p5_state_29 a b ∪ requiredMatrix 9 k9t4p5_step_29_data.required a b) 6 j = k9t4p5_local_29 6 j := by decide + +private theorem k9t4p5_local_29_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p5_state_29 a b ∪ requiredMatrix 9 k9t4p5_step_29_data.required a b) 7 j = k9t4p5_local_29 7 j := by decide + +private theorem k9t4p5_local_29_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p5_state_29 a b ∪ requiredMatrix 9 k9t4p5_step_29_data.required a b) 8 j = k9t4p5_local_29 8 j := by decide + +private theorem k9t4p5_local_29_eq : (fun a b => k9t4p5_state_29 a b ∪ requiredMatrix 9 k9t4p5_step_29_data.required a b) = k9t4p5_local_29 := by + funext i j + fin_cases i + + · exact k9t4p5_local_29_eq_row_0 j + + · exact k9t4p5_local_29_eq_row_1 j + + · exact k9t4p5_local_29_eq_row_2 j + + · exact k9t4p5_local_29_eq_row_3 j + + · exact k9t4p5_local_29_eq_row_4 j + + · exact k9t4p5_local_29_eq_row_5 j + + · exact k9t4p5_local_29_eq_row_6 j + + · exact k9t4p5_local_29_eq_row_7 j + + · exact k9t4p5_local_29_eq_row_8 j + +private theorem k9t4p5_local_29_paths : ∀ p ∈ k9t4p5_step_29_data.required, p.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_29_data.i k9t4p5_step_29_data.j) 9 := by decide + +private theorem k9t4p5_local_29_bad : k9t4p5_step_29_data.bad.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_29_data.i k9t4p5_step_29_data.j) k9t4p5_local_29 9 4 := by decide + +private theorem k9t4p5_step_29_check : k9t4p5_step_29.Check k9t4p5.graph k9t4p5_state_29 9 4 := by + change k9t4p5_step_29_data.Check k9t4p5.graph k9t4p5_state_29 9 4 + refine ⟨k9t4p5_local_29_paths, ?_⟩ + rw [k9t4p5_local_29_eq] + exact k9t4p5_local_29_bad + +private theorem k9t4p5_update_29 : k9t4p5_step_29.apply k9t4p5_state_29 = k9t4p5_state_30 := by + have h : ∀ i j : Fin 9, k9t4p5_step_29.apply k9t4p5_state_29 i j = k9t4p5_state_30 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_31 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {0, 1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {0, 1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4}, {0, 1, 3, 4, 5, 6}, {0, 1, 4, 5, 6}], + #[{0, 1, 3, 4, 5}, {1}, {0, 1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 4, 5, 6, 7}, {0, 1, 4, 5, 6}, {1}, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_30 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2}, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2, 3}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {0, 1, 2}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {2, 3, 4}, {0, 1, 3, 4, 5, 6}, {0, 1, 4, 5, 6}], + #[Finset.Icc 0 5, {1}, {0, 1, 2}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 4, 5, 6, 7}, {0, 1, 4, 5, 6}, {1}, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_30_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p5_state_30 a b ∪ requiredMatrix 9 k9t4p5_step_30_data.required a b) 0 j = k9t4p5_local_30 0 j := by decide + +private theorem k9t4p5_local_30_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p5_state_30 a b ∪ requiredMatrix 9 k9t4p5_step_30_data.required a b) 1 j = k9t4p5_local_30 1 j := by decide + +private theorem k9t4p5_local_30_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p5_state_30 a b ∪ requiredMatrix 9 k9t4p5_step_30_data.required a b) 2 j = k9t4p5_local_30 2 j := by decide + +private theorem k9t4p5_local_30_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p5_state_30 a b ∪ requiredMatrix 9 k9t4p5_step_30_data.required a b) 3 j = k9t4p5_local_30 3 j := by decide + +private theorem k9t4p5_local_30_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p5_state_30 a b ∪ requiredMatrix 9 k9t4p5_step_30_data.required a b) 4 j = k9t4p5_local_30 4 j := by decide + +private theorem k9t4p5_local_30_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p5_state_30 a b ∪ requiredMatrix 9 k9t4p5_step_30_data.required a b) 5 j = k9t4p5_local_30 5 j := by decide + +private theorem k9t4p5_local_30_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p5_state_30 a b ∪ requiredMatrix 9 k9t4p5_step_30_data.required a b) 6 j = k9t4p5_local_30 6 j := by decide + +private theorem k9t4p5_local_30_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p5_state_30 a b ∪ requiredMatrix 9 k9t4p5_step_30_data.required a b) 7 j = k9t4p5_local_30 7 j := by decide + +private theorem k9t4p5_local_30_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p5_state_30 a b ∪ requiredMatrix 9 k9t4p5_step_30_data.required a b) 8 j = k9t4p5_local_30 8 j := by decide + +private theorem k9t4p5_local_30_eq : (fun a b => k9t4p5_state_30 a b ∪ requiredMatrix 9 k9t4p5_step_30_data.required a b) = k9t4p5_local_30 := by + funext i j + fin_cases i + + · exact k9t4p5_local_30_eq_row_0 j + + · exact k9t4p5_local_30_eq_row_1 j + + · exact k9t4p5_local_30_eq_row_2 j + + · exact k9t4p5_local_30_eq_row_3 j + + · exact k9t4p5_local_30_eq_row_4 j + + · exact k9t4p5_local_30_eq_row_5 j + + · exact k9t4p5_local_30_eq_row_6 j + + · exact k9t4p5_local_30_eq_row_7 j + + · exact k9t4p5_local_30_eq_row_8 j + +private theorem k9t4p5_local_30_paths : ∀ p ∈ k9t4p5_step_30_data.required, p.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_30_data.i k9t4p5_step_30_data.j) 9 := by decide + +private theorem k9t4p5_local_30_bad : k9t4p5_step_30_data.bad.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_30_data.i k9t4p5_step_30_data.j) k9t4p5_local_30 9 4 := by decide + +private theorem k9t4p5_step_30_check : k9t4p5_step_30.Check k9t4p5.graph k9t4p5_state_30 9 4 := by + change k9t4p5_step_30_data.Check k9t4p5.graph k9t4p5_state_30 9 4 + refine ⟨k9t4p5_local_30_paths, ?_⟩ + rw [k9t4p5_local_30_eq] + exact k9t4p5_local_30_bad + +private theorem k9t4p5_update_30 : k9t4p5_step_30.apply k9t4p5_state_30 = k9t4p5_state_31 := by + have h : ∀ i j : Fin 9, k9t4p5_step_30.apply k9t4p5_state_30 i j = k9t4p5_state_31 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_32 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {0, 1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {0, 1}, {0, 1, 4, 5, 6}, {0, 1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4}, {0, 1, 3, 4, 5, 6}, {0, 1, 4, 5, 6}], + #[{0, 1, 3, 4, 5}, {1}, {0, 1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {0, 1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 4, 5, 6, 7}, {0, 1, 4, 5, 6}, {1}, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_31 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {0, 1}, {0, 1, 4, 5, 6}, {1, 4, 5, 6, 7}, ∅], + #[Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4}, {0, 1, 3, 4, 5, 6}, {0, 1, 4, 5, 6}], + #[Finset.Icc 0 5, {1}, {0, 1}, Finset.Icc 0 4, Finset.Icc 1 4, ∅, {1, 2, 3}, Finset.Icc 0 4, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 4, 5, 6, 7}, {0, 1, 4, 5, 6}, {1}, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_31_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p5_state_31 a b ∪ requiredMatrix 9 k9t4p5_step_31_data.required a b) 0 j = k9t4p5_local_31 0 j := by decide + +private theorem k9t4p5_local_31_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p5_state_31 a b ∪ requiredMatrix 9 k9t4p5_step_31_data.required a b) 1 j = k9t4p5_local_31 1 j := by decide + +private theorem k9t4p5_local_31_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p5_state_31 a b ∪ requiredMatrix 9 k9t4p5_step_31_data.required a b) 2 j = k9t4p5_local_31 2 j := by decide + +private theorem k9t4p5_local_31_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p5_state_31 a b ∪ requiredMatrix 9 k9t4p5_step_31_data.required a b) 3 j = k9t4p5_local_31 3 j := by decide + +private theorem k9t4p5_local_31_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p5_state_31 a b ∪ requiredMatrix 9 k9t4p5_step_31_data.required a b) 4 j = k9t4p5_local_31 4 j := by decide + +private theorem k9t4p5_local_31_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p5_state_31 a b ∪ requiredMatrix 9 k9t4p5_step_31_data.required a b) 5 j = k9t4p5_local_31 5 j := by decide + +private theorem k9t4p5_local_31_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p5_state_31 a b ∪ requiredMatrix 9 k9t4p5_step_31_data.required a b) 6 j = k9t4p5_local_31 6 j := by decide + +private theorem k9t4p5_local_31_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p5_state_31 a b ∪ requiredMatrix 9 k9t4p5_step_31_data.required a b) 7 j = k9t4p5_local_31 7 j := by decide + +private theorem k9t4p5_local_31_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p5_state_31 a b ∪ requiredMatrix 9 k9t4p5_step_31_data.required a b) 8 j = k9t4p5_local_31 8 j := by decide + +private theorem k9t4p5_local_31_eq : (fun a b => k9t4p5_state_31 a b ∪ requiredMatrix 9 k9t4p5_step_31_data.required a b) = k9t4p5_local_31 := by + funext i j + fin_cases i + + · exact k9t4p5_local_31_eq_row_0 j + + · exact k9t4p5_local_31_eq_row_1 j + + · exact k9t4p5_local_31_eq_row_2 j + + · exact k9t4p5_local_31_eq_row_3 j + + · exact k9t4p5_local_31_eq_row_4 j + + · exact k9t4p5_local_31_eq_row_5 j + + · exact k9t4p5_local_31_eq_row_6 j + + · exact k9t4p5_local_31_eq_row_7 j + + · exact k9t4p5_local_31_eq_row_8 j + +private theorem k9t4p5_local_31_paths : ∀ p ∈ k9t4p5_step_31_data.required, p.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_31_data.i k9t4p5_step_31_data.j) 9 := by decide + +private theorem k9t4p5_local_31_bad : k9t4p5_step_31_data.bad.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_31_data.i k9t4p5_step_31_data.j) k9t4p5_local_31 9 4 := by decide + +private theorem k9t4p5_step_31_check : k9t4p5_step_31.Check k9t4p5.graph k9t4p5_state_31 9 4 := by + change k9t4p5_step_31_data.Check k9t4p5.graph k9t4p5_state_31 9 4 + refine ⟨k9t4p5_local_31_paths, ?_⟩ + rw [k9t4p5_local_31_eq] + exact k9t4p5_local_31_bad + +private theorem k9t4p5_update_31 : k9t4p5_step_31.apply k9t4p5_state_31 = k9t4p5_state_32 := by + have h : ∀ i j : Fin 9, k9t4p5_step_31.apply k9t4p5_state_31 i j = k9t4p5_state_32 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p5_state_33 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {0, 1, 3, 4, 5}, Finset.Icc 0 6, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {0, 1}, {0, 1, 4, 5, 6}, {0, 1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {0, 1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4}, {0, 1, 3, 4, 5, 6}, {0, 1, 4, 5, 6}], + #[{0, 1, 3, 4, 5}, {1}, {0, 1}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {0, 1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {0, 1, 4, 5, 6, 7}, {0, 1, 4, 5, 6}, {1}, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p5_local_32 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2}], + #[{1}, ∅, {1, 2}, {1, 2, 3, 5, 6, 7}, Finset.Icc 0 6, {1}, Finset.Icc 0 4, {1, 2, 3, 5, 6, 7}, {1, 2}], + #[{1, 2}, {1, 2}, ∅, {1, 2, 3}, Finset.Icc 1 4, {0, 1}, {0, 1, 4, 5, 6}, {0, 1, 4, 5, 6, 7}, ∅], + #[{1, 2, 3, 5, 6, 7}, {1, 2, 3, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 0 4, {0, 1, 3, 4, 5, 6}, {4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, {0, 2, 3, 4}, {0, 1, 3, 4, 5, 6}, {0, 1, 4, 5, 6}], + #[Finset.Icc 0 5, {1}, {0, 1}, Finset.Icc 0 4, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 4, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 4, {0, 1, 4, 5, 6}, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 4], + #[Finset.Icc 1 7, {1, 2, 3, 5, 6, 7}, {0, 1, 4, 5, 6, 7}, {4, 5, 6}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 4, Finset.Icc 1 4, ∅, {1, 2, 3}], + #[{1, 2}, {1, 2}, ∅, {1, 4, 5, 6, 7}, {0, 1, 4, 5, 6}, {1}, Finset.Icc 1 4, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p5_local_32_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p5_state_32 a b ∪ requiredMatrix 9 k9t4p5_step_32_data.required a b) 0 j = k9t4p5_local_32 0 j := by decide + +private theorem k9t4p5_local_32_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p5_state_32 a b ∪ requiredMatrix 9 k9t4p5_step_32_data.required a b) 1 j = k9t4p5_local_32 1 j := by decide + +private theorem k9t4p5_local_32_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p5_state_32 a b ∪ requiredMatrix 9 k9t4p5_step_32_data.required a b) 2 j = k9t4p5_local_32 2 j := by decide + +private theorem k9t4p5_local_32_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p5_state_32 a b ∪ requiredMatrix 9 k9t4p5_step_32_data.required a b) 3 j = k9t4p5_local_32 3 j := by decide + +private theorem k9t4p5_local_32_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p5_state_32 a b ∪ requiredMatrix 9 k9t4p5_step_32_data.required a b) 4 j = k9t4p5_local_32 4 j := by decide + +private theorem k9t4p5_local_32_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p5_state_32 a b ∪ requiredMatrix 9 k9t4p5_step_32_data.required a b) 5 j = k9t4p5_local_32 5 j := by decide + +private theorem k9t4p5_local_32_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p5_state_32 a b ∪ requiredMatrix 9 k9t4p5_step_32_data.required a b) 6 j = k9t4p5_local_32 6 j := by decide + +private theorem k9t4p5_local_32_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p5_state_32 a b ∪ requiredMatrix 9 k9t4p5_step_32_data.required a b) 7 j = k9t4p5_local_32 7 j := by decide + +private theorem k9t4p5_local_32_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p5_state_32 a b ∪ requiredMatrix 9 k9t4p5_step_32_data.required a b) 8 j = k9t4p5_local_32 8 j := by decide + +private theorem k9t4p5_local_32_eq : (fun a b => k9t4p5_state_32 a b ∪ requiredMatrix 9 k9t4p5_step_32_data.required a b) = k9t4p5_local_32 := by + funext i j + fin_cases i + + · exact k9t4p5_local_32_eq_row_0 j + + · exact k9t4p5_local_32_eq_row_1 j + + · exact k9t4p5_local_32_eq_row_2 j + + · exact k9t4p5_local_32_eq_row_3 j + + · exact k9t4p5_local_32_eq_row_4 j + + · exact k9t4p5_local_32_eq_row_5 j + + · exact k9t4p5_local_32_eq_row_6 j + + · exact k9t4p5_local_32_eq_row_7 j + + · exact k9t4p5_local_32_eq_row_8 j + +private theorem k9t4p5_local_32_paths : ∀ p ∈ k9t4p5_step_32_data.required, p.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_32_data.i k9t4p5_step_32_data.j) 9 := by decide + +private theorem k9t4p5_local_32_bad : k9t4p5_step_32_data.bad.Check (addedEdgeGraph k9t4p5.graph k9t4p5_step_32_data.i k9t4p5_step_32_data.j) k9t4p5_local_32 9 4 := by decide + +private theorem k9t4p5_step_32_check : k9t4p5_step_32.Check k9t4p5.graph k9t4p5_state_32 9 4 := by + change k9t4p5_step_32_data.Check k9t4p5.graph k9t4p5_state_32 9 4 + refine ⟨k9t4p5_local_32_paths, ?_⟩ + rw [k9t4p5_local_32_eq] + exact k9t4p5_local_32_bad + +private theorem k9t4p5_update_32 : k9t4p5_step_32.apply k9t4p5_state_32 = k9t4p5_state_33 := by + have h : ∀ i j : Fin 9, k9t4p5_step_32.apply k9t4p5_state_32 i j = k9t4p5_state_33 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k9t4p5_closure_33 : ClosureCheck k9t4p5.graph k9t4p5_state_33 9 4 [] := by trivial + +private theorem k9t4p5_closure_32 : ClosureCheck k9t4p5.graph k9t4p5_state_32 9 4 [k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_32_check + · rw [k9t4p5_update_32] + exact k9t4p5_closure_33 + +private theorem k9t4p5_closure_31 : ClosureCheck k9t4p5.graph k9t4p5_state_31 9 4 [k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_31_check + · rw [k9t4p5_update_31] + exact k9t4p5_closure_32 + +private theorem k9t4p5_closure_30 : ClosureCheck k9t4p5.graph k9t4p5_state_30 9 4 [k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_30_check + · rw [k9t4p5_update_30] + exact k9t4p5_closure_31 + +private theorem k9t4p5_closure_29 : ClosureCheck k9t4p5.graph k9t4p5_state_29 9 4 [k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_29_check + · rw [k9t4p5_update_29] + exact k9t4p5_closure_30 + +private theorem k9t4p5_closure_28 : ClosureCheck k9t4p5.graph k9t4p5_state_28 9 4 [k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_28_check + · rw [k9t4p5_update_28] + exact k9t4p5_closure_29 + +private theorem k9t4p5_closure_27 : ClosureCheck k9t4p5.graph k9t4p5_state_27 9 4 [k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_27_check + · rw [k9t4p5_update_27] + exact k9t4p5_closure_28 + +private theorem k9t4p5_closure_26 : ClosureCheck k9t4p5.graph k9t4p5_state_26 9 4 [k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_26_check + · rw [k9t4p5_update_26] + exact k9t4p5_closure_27 + +private theorem k9t4p5_closure_25 : ClosureCheck k9t4p5.graph k9t4p5_state_25 9 4 [k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_25_check + · rw [k9t4p5_update_25] + exact k9t4p5_closure_26 + +private theorem k9t4p5_closure_24 : ClosureCheck k9t4p5.graph k9t4p5_state_24 9 4 [k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_24_check + · rw [k9t4p5_update_24] + exact k9t4p5_closure_25 + +private theorem k9t4p5_closure_23 : ClosureCheck k9t4p5.graph k9t4p5_state_23 9 4 [k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_23_check + · rw [k9t4p5_update_23] + exact k9t4p5_closure_24 + +private theorem k9t4p5_closure_22 : ClosureCheck k9t4p5.graph k9t4p5_state_22 9 4 [k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_22_check + · rw [k9t4p5_update_22] + exact k9t4p5_closure_23 + +private theorem k9t4p5_closure_21 : ClosureCheck k9t4p5.graph k9t4p5_state_21 9 4 [k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_21_check + · rw [k9t4p5_update_21] + exact k9t4p5_closure_22 + +private theorem k9t4p5_closure_20 : ClosureCheck k9t4p5.graph k9t4p5_state_20 9 4 [k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_20_check + · rw [k9t4p5_update_20] + exact k9t4p5_closure_21 + +private theorem k9t4p5_closure_19 : ClosureCheck k9t4p5.graph k9t4p5_state_19 9 4 [k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_19_check + · rw [k9t4p5_update_19] + exact k9t4p5_closure_20 + +private theorem k9t4p5_closure_18 : ClosureCheck k9t4p5.graph k9t4p5_state_18 9 4 [k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_18_check + · rw [k9t4p5_update_18] + exact k9t4p5_closure_19 + +private theorem k9t4p5_closure_17 : ClosureCheck k9t4p5.graph k9t4p5_state_17 9 4 [k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_17_check + · rw [k9t4p5_update_17] + exact k9t4p5_closure_18 + +private theorem k9t4p5_closure_16 : ClosureCheck k9t4p5.graph k9t4p5_state_16 9 4 [k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_16_check + · rw [k9t4p5_update_16] + exact k9t4p5_closure_17 + +private theorem k9t4p5_closure_15 : ClosureCheck k9t4p5.graph k9t4p5_state_15 9 4 [k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_15_check + · rw [k9t4p5_update_15] + exact k9t4p5_closure_16 + +private theorem k9t4p5_closure_14 : ClosureCheck k9t4p5.graph k9t4p5_state_14 9 4 [k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_14_check + · rw [k9t4p5_update_14] + exact k9t4p5_closure_15 + +private theorem k9t4p5_closure_13 : ClosureCheck k9t4p5.graph k9t4p5_state_13 9 4 [k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_13_check + · rw [k9t4p5_update_13] + exact k9t4p5_closure_14 + +private theorem k9t4p5_closure_12 : ClosureCheck k9t4p5.graph k9t4p5_state_12 9 4 [k9t4p5_step_12, k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_12_check + · rw [k9t4p5_update_12] + exact k9t4p5_closure_13 + +private theorem k9t4p5_closure_11 : ClosureCheck k9t4p5.graph k9t4p5_state_11 9 4 [k9t4p5_step_11, k9t4p5_step_12, k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_11_check + · rw [k9t4p5_update_11] + exact k9t4p5_closure_12 + +private theorem k9t4p5_closure_10 : ClosureCheck k9t4p5.graph k9t4p5_state_10 9 4 [k9t4p5_step_10, k9t4p5_step_11, k9t4p5_step_12, k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_10_check + · rw [k9t4p5_update_10] + exact k9t4p5_closure_11 + +private theorem k9t4p5_closure_9 : ClosureCheck k9t4p5.graph k9t4p5_state_9 9 4 [k9t4p5_step_9, k9t4p5_step_10, k9t4p5_step_11, k9t4p5_step_12, k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_9_check + · rw [k9t4p5_update_9] + exact k9t4p5_closure_10 + +private theorem k9t4p5_closure_8 : ClosureCheck k9t4p5.graph k9t4p5_state_8 9 4 [k9t4p5_step_8, k9t4p5_step_9, k9t4p5_step_10, k9t4p5_step_11, k9t4p5_step_12, k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_8_check + · rw [k9t4p5_update_8] + exact k9t4p5_closure_9 + +private theorem k9t4p5_closure_7 : ClosureCheck k9t4p5.graph k9t4p5_state_7 9 4 [k9t4p5_step_7, k9t4p5_step_8, k9t4p5_step_9, k9t4p5_step_10, k9t4p5_step_11, k9t4p5_step_12, k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_7_check + · rw [k9t4p5_update_7] + exact k9t4p5_closure_8 + +private theorem k9t4p5_closure_6 : ClosureCheck k9t4p5.graph k9t4p5_state_6 9 4 [k9t4p5_step_6, k9t4p5_step_7, k9t4p5_step_8, k9t4p5_step_9, k9t4p5_step_10, k9t4p5_step_11, k9t4p5_step_12, k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_6_check + · rw [k9t4p5_update_6] + exact k9t4p5_closure_7 + +private theorem k9t4p5_closure_5 : ClosureCheck k9t4p5.graph k9t4p5_state_5 9 4 [k9t4p5_step_5, k9t4p5_step_6, k9t4p5_step_7, k9t4p5_step_8, k9t4p5_step_9, k9t4p5_step_10, k9t4p5_step_11, k9t4p5_step_12, k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_5_check + · rw [k9t4p5_update_5] + exact k9t4p5_closure_6 + +private theorem k9t4p5_closure_4 : ClosureCheck k9t4p5.graph k9t4p5_state_4 9 4 [k9t4p5_step_4, k9t4p5_step_5, k9t4p5_step_6, k9t4p5_step_7, k9t4p5_step_8, k9t4p5_step_9, k9t4p5_step_10, k9t4p5_step_11, k9t4p5_step_12, k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_4_check + · rw [k9t4p5_update_4] + exact k9t4p5_closure_5 + +private theorem k9t4p5_closure_3 : ClosureCheck k9t4p5.graph k9t4p5_state_3 9 4 [k9t4p5_step_3, k9t4p5_step_4, k9t4p5_step_5, k9t4p5_step_6, k9t4p5_step_7, k9t4p5_step_8, k9t4p5_step_9, k9t4p5_step_10, k9t4p5_step_11, k9t4p5_step_12, k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_3_check + · rw [k9t4p5_update_3] + exact k9t4p5_closure_4 + +private theorem k9t4p5_closure_2 : ClosureCheck k9t4p5.graph k9t4p5_state_2 9 4 [k9t4p5_step_2, k9t4p5_step_3, k9t4p5_step_4, k9t4p5_step_5, k9t4p5_step_6, k9t4p5_step_7, k9t4p5_step_8, k9t4p5_step_9, k9t4p5_step_10, k9t4p5_step_11, k9t4p5_step_12, k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_2_check + · rw [k9t4p5_update_2] + exact k9t4p5_closure_3 + +private theorem k9t4p5_closure_1 : ClosureCheck k9t4p5.graph k9t4p5_state_1 9 4 [k9t4p5_step_1, k9t4p5_step_2, k9t4p5_step_3, k9t4p5_step_4, k9t4p5_step_5, k9t4p5_step_6, k9t4p5_step_7, k9t4p5_step_8, k9t4p5_step_9, k9t4p5_step_10, k9t4p5_step_11, k9t4p5_step_12, k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_1_check + · rw [k9t4p5_update_1] + exact k9t4p5_closure_2 + +private theorem k9t4p5_closure_0 : ClosureCheck k9t4p5.graph k9t4p5_state_0 9 4 [k9t4p5_step_0, k9t4p5_step_1, k9t4p5_step_2, k9t4p5_step_3, k9t4p5_step_4, k9t4p5_step_5, k9t4p5_step_6, k9t4p5_step_7, k9t4p5_step_8, k9t4p5_step_9, k9t4p5_step_10, k9t4p5_step_11, k9t4p5_step_12, k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] := by + constructor + · exact k9t4p5_step_0_check + · rw [k9t4p5_update_0] + exact k9t4p5_closure_1 + +private theorem k9t4p5_matrix_eq : k9t4p5.matrix 9 = k9t4p5_state_33 := by + change closureMatrix (k9t4p5.initialMatrix 9) _ = _ + rw [k9t4p5_initial_eq] + change closureMatrix k9t4p5_state_0 [k9t4p5_step_0, k9t4p5_step_1, k9t4p5_step_2, k9t4p5_step_3, k9t4p5_step_4, k9t4p5_step_5, k9t4p5_step_6, k9t4p5_step_7, k9t4p5_step_8, k9t4p5_step_9, k9t4p5_step_10, k9t4p5_step_11, k9t4p5_step_12, k9t4p5_step_13, k9t4p5_step_14, k9t4p5_step_15, k9t4p5_step_16, k9t4p5_step_17, k9t4p5_step_18, k9t4p5_step_19, k9t4p5_step_20, k9t4p5_step_21, k9t4p5_step_22, k9t4p5_step_23, k9t4p5_step_24, k9t4p5_step_25, k9t4p5_step_26, k9t4p5_step_27, k9t4p5_step_28, k9t4p5_step_29, k9t4p5_step_30, k9t4p5_step_31, k9t4p5_step_32] = _ + simp only [closureMatrix] + rw [k9t4p5_update_0, k9t4p5_update_1, k9t4p5_update_2, k9t4p5_update_3, k9t4p5_update_4, k9t4p5_update_5, k9t4p5_update_6, k9t4p5_update_7, k9t4p5_update_8, k9t4p5_update_9, k9t4p5_update_10, k9t4p5_update_11, k9t4p5_update_12, k9t4p5_update_13, k9t4p5_update_14, k9t4p5_update_15, k9t4p5_update_16, k9t4p5_update_17, k9t4p5_update_18, k9t4p5_update_19, k9t4p5_update_20, k9t4p5_update_21, k9t4p5_update_22, k9t4p5_update_23, k9t4p5_update_24, k9t4p5_update_25, k9t4p5_update_26, k9t4p5_update_27, k9t4p5_update_28, k9t4p5_update_29, k9t4p5_update_30, k9t4p5_update_31, k9t4p5_update_32] + +private theorem k9t4p5_part_0 : k9t4p5.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p5_part_1 : k9t4p5.chains.map List.length = ([[], [], [5]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p5_part_2 : k9t4p5.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p5.clique))) = ([[], [], [5]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p5_templates_item_0 : (⟨0, 1, [[2, 3, 4, 5, 6, 7, 8]], [], [], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_1 : (⟨0, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_2 : (⟨0, 3, [], [], [2], 5, 7⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_3 : (⟨0, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_4 : (⟨0, 4, [], [], [3, 2], 4, 6⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_5 : (⟨0, 4, [], [], [5, 6, 7, 8], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_6 : (⟨0, 5, [], [], [4, 3, 2], 3, 5⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_7 : (⟨0, 6, [], [], [5, 4, 3, 2], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_8 : (⟨0, 6, [], [], [7, 8], 4, 6⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_9 : (⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_10 : (⟨0, 7, [], [], [8], 5, 7⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_11 : (⟨0, 8, [], [], [7, 6, 5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_12 : (⟨1, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_13 : (⟨1, 3, [], [], [2], 5, 7⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_14 : (⟨1, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_15 : (⟨1, 4, [], [], [3, 2], 4, 6⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_16 : (⟨1, 4, [], [], [5, 6, 7, 8], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_17 : (⟨1, 6, [], [], [5, 4, 3, 2], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_18 : (⟨1, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_19 : (⟨1, 7, [], [], [8], 5, 7⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_20 : (⟨1, 8, [], [], [7, 6, 5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_21 : (⟨2, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_22 : (⟨2, 4, [], [], [5, 6, 7, 8], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_23 : (⟨2, 6, [], [], [7, 8], 4, 6⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_24 : (⟨2, 7, [], [], [8], 5, 7⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_25 : (⟨3, 4, [], [2], [5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_26 : (⟨3, 5, [], [2], [6, 7, 8], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_27 : (⟨3, 6, [], [2], [7, 8], 3, 5⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_28 : (⟨3, 7, [], [2], [8], 4, 6⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_29 : (⟨3, 8, [], [2], [], 5, 7⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_30 : (⟨4, 5, [], [2, 3], [6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_31 : (⟨4, 6, [], [2, 3], [7, 8], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_32 : (⟨4, 7, [], [2, 3], [8], 3, 5⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_33 : (⟨4, 8, [], [2, 3], [], 4, 6⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_34 : (⟨5, 6, [], [2, 3, 4], [7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_35 : (⟨5, 7, [], [2, 3, 4], [8], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_36 : (⟨6, 7, [], [2, 3, 4, 5], [8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_37 : (⟨6, 8, [], [2, 3, 4, 5], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_templates_item_38 : (⟨7, 8, [], [2, 3, 4, 5, 6], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p5_part_3 : ∀ T ∈ k9t4p5.templates, T.Check k9t4p5.graph k9t4p5.clique 9 (patternAmount ([[], [], [5]] : List (List ℕ))) (([[], [], [5]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p5, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_templates_item_0, k9t4p5_templates_item_1, k9t4p5_templates_item_2, k9t4p5_templates_item_3, k9t4p5_templates_item_4, k9t4p5_templates_item_5, k9t4p5_templates_item_6, k9t4p5_templates_item_7, k9t4p5_templates_item_8, k9t4p5_templates_item_9, k9t4p5_templates_item_10, k9t4p5_templates_item_11, k9t4p5_templates_item_12, k9t4p5_templates_item_13, k9t4p5_templates_item_14, k9t4p5_templates_item_15, k9t4p5_templates_item_16, k9t4p5_templates_item_17, k9t4p5_templates_item_18, k9t4p5_templates_item_19, k9t4p5_templates_item_20, k9t4p5_templates_item_21, k9t4p5_templates_item_22, k9t4p5_templates_item_23, k9t4p5_templates_item_24, k9t4p5_templates_item_25, k9t4p5_templates_item_26, k9t4p5_templates_item_27, k9t4p5_templates_item_28, k9t4p5_templates_item_29, k9t4p5_templates_item_30, k9t4p5_templates_item_31, k9t4p5_templates_item_32, k9t4p5_templates_item_33, k9t4p5_templates_item_34, k9t4p5_templates_item_35, k9t4p5_templates_item_36, k9t4p5_templates_item_37, k9t4p5_templates_item_38⟩ + +private theorem k9t4p5_required_item_0 : (⟨2, 7, [3, 4, 5, 6]⟩ : RequiredPathData (Fin 9)).Check k9t4p5.graph 9 := by decide + +private theorem k9t4p5_required_item_1 : (⟨3, 6, [4, 5]⟩ : RequiredPathData (Fin 9)).Check k9t4p5.graph 9 := by decide + +private theorem k9t4p5_required_item_2 : (⟨3, 8, [4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check k9t4p5.graph 9 := by decide + +private theorem k9t4p5_required_item_3 : (⟨4, 7, [5, 6]⟩ : RequiredPathData (Fin 9)).Check k9t4p5.graph 9 := by decide + +private theorem k9t4p5_part_4 : ∀ p ∈ k9t4p5.required, p.Check k9t4p5.graph 9 := by + simp only [k9t4p5, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p5_required_item_0, k9t4p5_required_item_1, k9t4p5_required_item_2, k9t4p5_required_item_3⟩ + +private theorem k9t4p5_part_5 : ClosureCheck k9t4p5.graph (k9t4p5.initialMatrix 9) 9 4 k9t4p5.closure := by + rw [k9t4p5_initial_eq] + exact k9t4p5_closure_0 + +private theorem k9t4p5_part_6 : k9t4p5.bad.Check k9t4p5.graph (k9t4p5.matrix 9) 9 4 := by + rw [k9t4p5_matrix_eq] + decide + +theorem k9t4p5_check : k9t4p5.Check 9 4 [[], [], [5]] := + ⟨k9t4p5_part_0, k9t4p5_part_1, k9t4p5_part_2, k9t4p5_part_3, k9t4p5_part_4, k9t4p5_part_5, k9t4p5_part_6⟩ +def k9t4p6 : LayoutCertificate 6 where + chains := [[0], [1, 2, 3, 4, 5]] + clique := {0, 1, 3, 5} + templates := [⟨0, 1, [], [], [], 2, 8⟩, + ⟨0, 1, [], [], [2, 3, 4, 5], 1, 4⟩, + ⟨0, 2, [], [], [1], 1, 7⟩, + ⟨0, 4, [], [], [3], 1, 7⟩, + ⟨0, 5, [], [], [4, 3, 2, 1], 1, 4⟩, + ⟨1, 2, [], [], [3], 1, 7⟩, + ⟨1, 4, [], [], [3], 1, 7⟩, + ⟨2, 3, [], [1], [], 1, 7⟩, + ⟨2, 4, [], [1], [3], 1, 6⟩, + ⟨2, 5, [], [1], [], 1, 7⟩, + ⟨3, 4, [], [], [5], 1, 7⟩, + ⟨4, 5, [], [3], [], 1, 7⟩] + required := [] + closure := [] + bad := ⟨none, {(2, 2), (4, 2), (0, 2), (1, 2)}⟩ + + +private def k9t4p6_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 4], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p6_initial_eq_row_0 : ∀ j : Fin 6, (k9t4p6.initialMatrix 9) 0 j = k9t4p6_state_0 0 j := by decide + +private theorem k9t4p6_initial_eq_row_1 : ∀ j : Fin 6, (k9t4p6.initialMatrix 9) 1 j = k9t4p6_state_0 1 j := by decide + +private theorem k9t4p6_initial_eq_row_2 : ∀ j : Fin 6, (k9t4p6.initialMatrix 9) 2 j = k9t4p6_state_0 2 j := by decide + +private theorem k9t4p6_initial_eq_row_3 : ∀ j : Fin 6, (k9t4p6.initialMatrix 9) 3 j = k9t4p6_state_0 3 j := by decide + +private theorem k9t4p6_initial_eq_row_4 : ∀ j : Fin 6, (k9t4p6.initialMatrix 9) 4 j = k9t4p6_state_0 4 j := by decide + +private theorem k9t4p6_initial_eq_row_5 : ∀ j : Fin 6, (k9t4p6.initialMatrix 9) 5 j = k9t4p6_state_0 5 j := by decide + +private theorem k9t4p6_initial_eq : (k9t4p6.initialMatrix 9) = k9t4p6_state_0 := by + funext i j + fin_cases i + + · exact k9t4p6_initial_eq_row_0 j + + · exact k9t4p6_initial_eq_row_1 j + + · exact k9t4p6_initial_eq_row_2 j + + · exact k9t4p6_initial_eq_row_3 j + + · exact k9t4p6_initial_eq_row_4 j + + · exact k9t4p6_initial_eq_row_5 j + +private theorem k9t4p6_closure_0 : ClosureCheck k9t4p6.graph k9t4p6_state_0 9 4 [] := by trivial + +private theorem k9t4p6_matrix_eq : k9t4p6.matrix 9 = k9t4p6_state_0 := by + change closureMatrix (k9t4p6.initialMatrix 9) _ = _ + rw [k9t4p6_initial_eq] + change closureMatrix k9t4p6_state_0 [] = _ + rfl + +private theorem k9t4p6_part_0 : k9t4p6.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p6_part_1 : k9t4p6.chains.map List.length = ([[], [1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p6_part_2 : k9t4p6.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p6.clique))) = ([[], [1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p6_templates_item_0 : (⟨0, 1, [], [], [], 2, 8⟩ : TemplateData (Fin 6)).Check k9t4p6.graph k9t4p6.clique 9 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p6_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5], 1, 4⟩ : TemplateData (Fin 6)).Check k9t4p6.graph k9t4p6.clique 9 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p6_templates_item_2 : (⟨0, 2, [], [], [1], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p6.graph k9t4p6.clique 9 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p6_templates_item_3 : (⟨0, 4, [], [], [3], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p6.graph k9t4p6.clique 9 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p6_templates_item_4 : (⟨0, 5, [], [], [4, 3, 2, 1], 1, 4⟩ : TemplateData (Fin 6)).Check k9t4p6.graph k9t4p6.clique 9 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p6_templates_item_5 : (⟨1, 2, [], [], [3], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p6.graph k9t4p6.clique 9 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p6_templates_item_6 : (⟨1, 4, [], [], [3], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p6.graph k9t4p6.clique 9 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p6_templates_item_7 : (⟨2, 3, [], [1], [], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p6.graph k9t4p6.clique 9 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p6_templates_item_8 : (⟨2, 4, [], [1], [3], 1, 6⟩ : TemplateData (Fin 6)).Check k9t4p6.graph k9t4p6.clique 9 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p6_templates_item_9 : (⟨2, 5, [], [1], [], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p6.graph k9t4p6.clique 9 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p6_templates_item_10 : (⟨3, 4, [], [], [5], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p6.graph k9t4p6.clique 9 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p6_templates_item_11 : (⟨4, 5, [], [3], [], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p6.graph k9t4p6.clique 9 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p6_part_3 : ∀ T ∈ k9t4p6.templates, T.Check k9t4p6.graph k9t4p6.clique 9 (patternAmount ([[], [1, 1]] : List (List ℕ))) (([[], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p6, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p6_templates_item_0, k9t4p6_templates_item_1, k9t4p6_templates_item_2, k9t4p6_templates_item_3, k9t4p6_templates_item_4, k9t4p6_templates_item_5, k9t4p6_templates_item_6, k9t4p6_templates_item_7, k9t4p6_templates_item_8, k9t4p6_templates_item_9, k9t4p6_templates_item_10, k9t4p6_templates_item_11⟩ + +private theorem k9t4p6_part_4 : ∀ p ∈ k9t4p6.required, p.Check k9t4p6.graph 9 := by decide + +private theorem k9t4p6_part_5 : ClosureCheck k9t4p6.graph (k9t4p6.initialMatrix 9) 9 4 k9t4p6.closure := by + rw [k9t4p6_initial_eq] + exact k9t4p6_closure_0 + +private theorem k9t4p6_part_6 : k9t4p6.bad.Check k9t4p6.graph (k9t4p6.matrix 9) 9 4 := by + rw [k9t4p6_matrix_eq] + decide + +theorem k9t4p6_check : k9t4p6.Check 9 4 [[], [1, 1]] := + ⟨k9t4p6_part_0, k9t4p6_part_1, k9t4p6_part_2, k9t4p6_part_3, k9t4p6_part_4, k9t4p6_part_5, k9t4p6_part_6⟩ +def k9t4p7 : LayoutCertificate 7 where + chains := [[0], [1, 2, 3, 4, 5, 6]] + clique := {0, 1, 3, 6} + templates := [⟨0, 1, [[3, 4, 5, 6]], [], [], 2, 4⟩, + ⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 3⟩, + ⟨0, 2, [], [], [1], 2, 7⟩, + ⟨0, 2, [[3, 4, 5, 6]], [], [1], 1, 3⟩, + ⟨0, 4, [], [], [3], 2, 7⟩, + ⟨0, 4, [], [], [5, 6], 1, 6⟩, + ⟨0, 5, [], [], [4, 3], 1, 6⟩, + ⟨0, 6, [], [], [5, 4, 3], 2, 5⟩, + ⟨0, 6, [], [], [5, 4, 3, 2, 1], 1, 3⟩, + ⟨1, 2, [], [], [3], 2, 7⟩, + ⟨1, 2, [], [], [3, 4, 5, 6], 1, 4⟩, + ⟨1, 4, [], [], [3], 2, 7⟩, + ⟨1, 4, [], [], [5, 6], 1, 6⟩, + ⟨1, 5, [], [], [4, 3], 1, 6⟩, + ⟨2, 3, [], [1], [], 2, 7⟩, + ⟨2, 3, [], [1], [4, 5, 6], 1, 4⟩, + ⟨2, 4, [], [1], [3], 1, 6⟩, + ⟨2, 5, [], [1], [4, 3], 1, 5⟩, + ⟨2, 5, [], [1], [6], 1, 6⟩, + ⟨2, 6, [], [1], [], 2, 7⟩, + ⟨2, 6, [], [1], [5, 4, 3], 1, 4⟩, + ⟨3, 4, [], [], [5, 6], 1, 6⟩, + ⟨4, 5, [], [3], [6], 1, 6⟩, + ⟨5, 6, [], [3, 4], [], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(2, 3), (0, 3), (4, 3), (5, 3)}⟩ + + +private def k9t4p7_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p7_initial_eq_row_0 : ∀ j : Fin 7, (k9t4p7.initialMatrix 9) 0 j = k9t4p7_state_0 0 j := by decide + +private theorem k9t4p7_initial_eq_row_1 : ∀ j : Fin 7, (k9t4p7.initialMatrix 9) 1 j = k9t4p7_state_0 1 j := by decide + +private theorem k9t4p7_initial_eq_row_2 : ∀ j : Fin 7, (k9t4p7.initialMatrix 9) 2 j = k9t4p7_state_0 2 j := by decide + +private theorem k9t4p7_initial_eq_row_3 : ∀ j : Fin 7, (k9t4p7.initialMatrix 9) 3 j = k9t4p7_state_0 3 j := by decide + +private theorem k9t4p7_initial_eq_row_4 : ∀ j : Fin 7, (k9t4p7.initialMatrix 9) 4 j = k9t4p7_state_0 4 j := by decide + +private theorem k9t4p7_initial_eq_row_5 : ∀ j : Fin 7, (k9t4p7.initialMatrix 9) 5 j = k9t4p7_state_0 5 j := by decide + +private theorem k9t4p7_initial_eq_row_6 : ∀ j : Fin 7, (k9t4p7.initialMatrix 9) 6 j = k9t4p7_state_0 6 j := by decide + +private theorem k9t4p7_initial_eq : (k9t4p7.initialMatrix 9) = k9t4p7_state_0 := by + funext i j + fin_cases i + + · exact k9t4p7_initial_eq_row_0 j + + · exact k9t4p7_initial_eq_row_1 j + + · exact k9t4p7_initial_eq_row_2 j + + · exact k9t4p7_initial_eq_row_3 j + + · exact k9t4p7_initial_eq_row_4 j + + · exact k9t4p7_initial_eq_row_5 j + + · exact k9t4p7_initial_eq_row_6 j + +private theorem k9t4p7_closure_0 : ClosureCheck k9t4p7.graph k9t4p7_state_0 9 4 [] := by trivial + +private theorem k9t4p7_matrix_eq : k9t4p7.matrix 9 = k9t4p7_state_0 := by + change closureMatrix (k9t4p7.initialMatrix 9) _ = _ + rw [k9t4p7_initial_eq] + change closureMatrix k9t4p7_state_0 [] = _ + rfl + +private theorem k9t4p7_part_0 : k9t4p7.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p7_part_1 : k9t4p7.chains.map List.length = ([[], [1, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p7_part_2 : k9t4p7.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p7.clique))) = ([[], [1, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p7_templates_item_0 : (⟨0, 1, [[3, 4, 5, 6]], [], [], 2, 4⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_2 : (⟨0, 2, [], [], [1], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_3 : (⟨0, 2, [[3, 4, 5, 6]], [], [1], 1, 3⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_4 : (⟨0, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_5 : (⟨0, 4, [], [], [5, 6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_6 : (⟨0, 5, [], [], [4, 3], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_7 : (⟨0, 6, [], [], [5, 4, 3], 2, 5⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_8 : (⟨0, 6, [], [], [5, 4, 3, 2, 1], 1, 3⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_9 : (⟨1, 2, [], [], [3], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_10 : (⟨1, 2, [], [], [3, 4, 5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_11 : (⟨1, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_12 : (⟨1, 4, [], [], [5, 6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_13 : (⟨1, 5, [], [], [4, 3], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_14 : (⟨2, 3, [], [1], [], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_15 : (⟨2, 3, [], [1], [4, 5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_16 : (⟨2, 4, [], [1], [3], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_17 : (⟨2, 5, [], [1], [4, 3], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_18 : (⟨2, 5, [], [1], [6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_19 : (⟨2, 6, [], [1], [], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_20 : (⟨2, 6, [], [1], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_21 : (⟨3, 4, [], [], [5, 6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_22 : (⟨4, 5, [], [3], [6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_templates_item_23 : (⟨5, 6, [], [3, 4], [], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p7_part_3 : ∀ T ∈ k9t4p7.templates, T.Check k9t4p7.graph k9t4p7.clique 9 (patternAmount ([[], [1, 2]] : List (List ℕ))) (([[], [1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p7, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p7_templates_item_0, k9t4p7_templates_item_1, k9t4p7_templates_item_2, k9t4p7_templates_item_3, k9t4p7_templates_item_4, k9t4p7_templates_item_5, k9t4p7_templates_item_6, k9t4p7_templates_item_7, k9t4p7_templates_item_8, k9t4p7_templates_item_9, k9t4p7_templates_item_10, k9t4p7_templates_item_11, k9t4p7_templates_item_12, k9t4p7_templates_item_13, k9t4p7_templates_item_14, k9t4p7_templates_item_15, k9t4p7_templates_item_16, k9t4p7_templates_item_17, k9t4p7_templates_item_18, k9t4p7_templates_item_19, k9t4p7_templates_item_20, k9t4p7_templates_item_21, k9t4p7_templates_item_22, k9t4p7_templates_item_23⟩ + +private theorem k9t4p7_part_4 : ∀ p ∈ k9t4p7.required, p.Check k9t4p7.graph 9 := by decide + +private theorem k9t4p7_part_5 : ClosureCheck k9t4p7.graph (k9t4p7.initialMatrix 9) 9 4 k9t4p7.closure := by + rw [k9t4p7_initial_eq] + exact k9t4p7_closure_0 + +private theorem k9t4p7_part_6 : k9t4p7.bad.Check k9t4p7.graph (k9t4p7.matrix 9) 9 4 := by + rw [k9t4p7_matrix_eq] + decide + +theorem k9t4p7_check : k9t4p7.Check 9 4 [[], [1, 2]] := + ⟨k9t4p7_part_0, k9t4p7_part_1, k9t4p7_part_2, k9t4p7_part_3, k9t4p7_part_4, k9t4p7_part_5, k9t4p7_part_6⟩ +def k9t4p8 : LayoutCertificate 8 where + chains := [[0], [1, 2, 3, 4, 5, 6, 7]] + clique := {0, 1, 3, 7} + templates := [⟨0, 1, [], [], [], 4, 8⟩, + ⟨0, 1, [[3, 4, 5, 6, 7]], [], [], 2, 3⟩, + ⟨0, 1, [], [], [2, 3, 4, 5, 6, 7], 1, 2⟩, + ⟨0, 2, [], [], [1], 3, 7⟩, + ⟨0, 2, [[3, 4, 5, 6, 7]], [], [1], 1, 2⟩, + ⟨0, 4, [], [], [5, 6, 7], 1, 5⟩, + ⟨0, 6, [], [], [5, 4, 3], 1, 5⟩, + ⟨0, 6, [], [], [7], 3, 7⟩, + ⟨0, 7, [], [], [6, 5, 4, 3], 2, 4⟩, + ⟨0, 7, [], [], [6, 5, 4, 3, 2, 1], 1, 2⟩, + ⟨1, 2, [], [], [3], 3, 7⟩, + ⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 3⟩, + ⟨1, 4, [], [], [5, 6, 7], 1, 5⟩, + ⟨1, 6, [], [], [5, 4, 3], 1, 5⟩, + ⟨1, 6, [], [], [7], 3, 7⟩, + ⟨2, 3, [], [1], [4, 5, 6, 7], 1, 3⟩, + ⟨2, 4, [], [1], [3], 2, 6⟩, + ⟨2, 4, [], [1], [5, 6, 7], 1, 4⟩, + ⟨2, 5, [], [1], [4, 3], 1, 5⟩, + ⟨2, 6, [], [1], [5, 4, 3], 1, 4⟩, + ⟨2, 6, [], [1], [7], 2, 6⟩, + ⟨2, 7, [], [1], [6, 5, 4, 3], 1, 3⟩, + ⟨5, 6, [], [3, 4], [7], 1, 5⟩, + ⟨6, 7, [], [3, 4, 5], [], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(2, 3), (0, 3), (6, 3), (1, 3)}⟩ + + +private def k9t4p8_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 7, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 7, Finset.Icc 1 4], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, {1, 2, 3}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[∅, ∅, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[Finset.Icc 1 4, ∅, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p8_initial_eq_row_0 : ∀ j : Fin 8, (k9t4p8.initialMatrix 9) 0 j = k9t4p8_state_0 0 j := by decide + +private theorem k9t4p8_initial_eq_row_1 : ∀ j : Fin 8, (k9t4p8.initialMatrix 9) 1 j = k9t4p8_state_0 1 j := by decide + +private theorem k9t4p8_initial_eq_row_2 : ∀ j : Fin 8, (k9t4p8.initialMatrix 9) 2 j = k9t4p8_state_0 2 j := by decide + +private theorem k9t4p8_initial_eq_row_3 : ∀ j : Fin 8, (k9t4p8.initialMatrix 9) 3 j = k9t4p8_state_0 3 j := by decide + +private theorem k9t4p8_initial_eq_row_4 : ∀ j : Fin 8, (k9t4p8.initialMatrix 9) 4 j = k9t4p8_state_0 4 j := by decide + +private theorem k9t4p8_initial_eq_row_5 : ∀ j : Fin 8, (k9t4p8.initialMatrix 9) 5 j = k9t4p8_state_0 5 j := by decide + +private theorem k9t4p8_initial_eq_row_6 : ∀ j : Fin 8, (k9t4p8.initialMatrix 9) 6 j = k9t4p8_state_0 6 j := by decide + +private theorem k9t4p8_initial_eq_row_7 : ∀ j : Fin 8, (k9t4p8.initialMatrix 9) 7 j = k9t4p8_state_0 7 j := by decide + +private theorem k9t4p8_initial_eq : (k9t4p8.initialMatrix 9) = k9t4p8_state_0 := by + funext i j + fin_cases i + + · exact k9t4p8_initial_eq_row_0 j + + · exact k9t4p8_initial_eq_row_1 j + + · exact k9t4p8_initial_eq_row_2 j + + · exact k9t4p8_initial_eq_row_3 j + + · exact k9t4p8_initial_eq_row_4 j + + · exact k9t4p8_initial_eq_row_5 j + + · exact k9t4p8_initial_eq_row_6 j + + · exact k9t4p8_initial_eq_row_7 j + +private theorem k9t4p8_closure_0 : ClosureCheck k9t4p8.graph k9t4p8_state_0 9 4 [] := by trivial + +private theorem k9t4p8_matrix_eq : k9t4p8.matrix 9 = k9t4p8_state_0 := by + change closureMatrix (k9t4p8.initialMatrix 9) _ = _ + rw [k9t4p8_initial_eq] + change closureMatrix k9t4p8_state_0 [] = _ + rfl + +private theorem k9t4p8_part_0 : k9t4p8.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p8_part_1 : k9t4p8.chains.map List.length = ([[], [1, 3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p8_part_2 : k9t4p8.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p8.clique))) = ([[], [1, 3]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p8_templates_item_0 : (⟨0, 1, [], [], [], 4, 8⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6, 7]], [], [], 2, 3⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_2 : (⟨0, 1, [], [], [2, 3, 4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_3 : (⟨0, 2, [], [], [1], 3, 7⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_4 : (⟨0, 2, [[3, 4, 5, 6, 7]], [], [1], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_5 : (⟨0, 4, [], [], [5, 6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_6 : (⟨0, 6, [], [], [5, 4, 3], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_7 : (⟨0, 6, [], [], [7], 3, 7⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_8 : (⟨0, 7, [], [], [6, 5, 4, 3], 2, 4⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_9 : (⟨0, 7, [], [], [6, 5, 4, 3, 2, 1], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_10 : (⟨1, 2, [], [], [3], 3, 7⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_11 : (⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_12 : (⟨1, 4, [], [], [5, 6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_13 : (⟨1, 6, [], [], [5, 4, 3], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_14 : (⟨1, 6, [], [], [7], 3, 7⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_15 : (⟨2, 3, [], [1], [4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_16 : (⟨2, 4, [], [1], [3], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_17 : (⟨2, 4, [], [1], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_18 : (⟨2, 5, [], [1], [4, 3], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_19 : (⟨2, 6, [], [1], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_20 : (⟨2, 6, [], [1], [7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_21 : (⟨2, 7, [], [1], [6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_22 : (⟨5, 6, [], [3, 4], [7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_templates_item_23 : (⟨6, 7, [], [3, 4, 5], [], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p8_part_3 : ∀ T ∈ k9t4p8.templates, T.Check k9t4p8.graph k9t4p8.clique 9 (patternAmount ([[], [1, 3]] : List (List ℕ))) (([[], [1, 3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p8, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p8_templates_item_0, k9t4p8_templates_item_1, k9t4p8_templates_item_2, k9t4p8_templates_item_3, k9t4p8_templates_item_4, k9t4p8_templates_item_5, k9t4p8_templates_item_6, k9t4p8_templates_item_7, k9t4p8_templates_item_8, k9t4p8_templates_item_9, k9t4p8_templates_item_10, k9t4p8_templates_item_11, k9t4p8_templates_item_12, k9t4p8_templates_item_13, k9t4p8_templates_item_14, k9t4p8_templates_item_15, k9t4p8_templates_item_16, k9t4p8_templates_item_17, k9t4p8_templates_item_18, k9t4p8_templates_item_19, k9t4p8_templates_item_20, k9t4p8_templates_item_21, k9t4p8_templates_item_22, k9t4p8_templates_item_23⟩ + +private theorem k9t4p8_part_4 : ∀ p ∈ k9t4p8.required, p.Check k9t4p8.graph 9 := by decide + +private theorem k9t4p8_part_5 : ClosureCheck k9t4p8.graph (k9t4p8.initialMatrix 9) 9 4 k9t4p8.closure := by + rw [k9t4p8_initial_eq] + exact k9t4p8_closure_0 + +private theorem k9t4p8_part_6 : k9t4p8.bad.Check k9t4p8.graph (k9t4p8.matrix 9) 9 4 := by + rw [k9t4p8_matrix_eq] + decide + +theorem k9t4p8_check : k9t4p8.Check 9 4 [[], [1, 3]] := + ⟨k9t4p8_part_0, k9t4p8_part_1, k9t4p8_part_2, k9t4p8_part_3, k9t4p8_part_4, k9t4p8_part_5, k9t4p8_part_6⟩ +private def k9t4p9_step_0_data : EdgeAttachmentData 9 := ⟨4, 2, [⟨0, 5, [1, 2, 4, 3, 8, 7, 6]⟩, ⟨0, 3, [8, 7, 6, 5, 4, 2, 1]⟩, ⟨2, 0, [4, 5, 6, 7, 8]⟩, ⟨2, 3, [4, 5, 6, 7, 8]⟩, ⟨3, 7, [0, 1, 2, 4, 5, 6]⟩, ⟨3, 8, [0, 1, 2, 4, 5, 6, 7]⟩, ⟨3, 7, [0, 8, 1, 2, 4, 5, 6]⟩, ⟨3, 1, [0, 8, 7, 6, 5, 4, 2]⟩, ⟨3, 8, [1, 2, 4, 5, 6, 7]⟩, ⟨3, 0, [1, 2, 4, 5, 6, 7, 8]⟩, ⟨3, 5, [2, 4]⟩, ⟨3, 5, [4, 2, 1, 0, 8, 7, 6]⟩, ⟨3, 0, [4, 2, 1, 8]⟩, ⟨5, 3, [6, 7, 8, 0, 1, 2, 4]⟩, ⟨5, 1, [6, 7, 8, 0, 3, 4, 2]⟩, ⟨5, 0, [6, 7, 8, 1, 2, 4, 3]⟩], ⟨none, {(2, 3), (3, 3), (0, 3), (5, 3)}⟩⟩ + +private def k9t4p9_step_0 : ClosureStep 9 := .edge k9t4p9_step_0_data + +private def k9t4p9_step_1_data : EdgeAttachmentData 9 := ⟨5, 0, [⟨0, 6, [5, 4, 3, 2, 1, 8, 7]⟩, ⟨2, 0, [1, 8, 3, 4, 5]⟩, ⟨4, 8, [3, 1, 0, 5, 6, 7]⟩, ⟨4, 7, [3, 1, 8, 0, 5, 6]⟩, ⟨4, 8, [3, 2, 1, 0, 5, 6, 7]⟩, ⟨4, 7, [3, 2, 1, 8, 0, 5, 6]⟩, ⟨4, 6, [5, 0, 1, 2, 3, 8, 7]⟩, ⟨7, 4, [6, 5, 0, 8, 1, 2, 3]⟩, ⟨7, 4, [8, 1, 2, 3, 0, 5]⟩], ⟨none, {(2, 3), (4, 3), (0, 3), (7, 3)}⟩⟩ + +private def k9t4p9_step_1 : ClosureStep 9 := .edge k9t4p9_step_1_data + +private def k9t4p9_step_2_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [2, 3, 4, 9, 8, 7, 6]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6]⟩, ⟨1, 7, [0, 6, 5, 4, 2, 9, 8]⟩, ⟨1, 7, [0, 6, 5, 4, 3, 2, 9, 8]⟩, ⟨1, 4, [0, 6, 7, 8, 9, 2, 3]⟩, ⟨1, 5, [0, 6, 7, 8, 9, 2, 3, 4]⟩, ⟨3, 0, [2, 1, 4, 9, 8, 7, 6]⟩, ⟨3, 0, [2, 1, 9, 4, 5, 6]⟩, ⟨3, 7, [2, 1, 0, 6, 5, 4, 9, 8]⟩, ⟨3, 5, [2, 1, 0, 6, 7, 8, 9, 4]⟩, ⟨3, 1, [2, 4, 5, 6, 0]⟩, ⟨3, 0, [2, 9, 8, 7, 6, 5, 4, 1]⟩] + +private def k9t4p9_step_2_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 9, 8, 7, 6]⟩, ⟨5, 3, [4, 1, 0, 6, 7, 8, 9, 2]⟩, ⟨5, 9, [4, 2, 1, 0, 6, 7, 8]⟩, ⟨5, 0, [4, 2, 9, 1]⟩, ⟨5, 8, [4, 2, 9, 1, 0, 6, 7]⟩, ⟨5, 0, [4, 3, 2, 1, 9, 8, 7, 6]⟩, ⟨5, 9, [4, 3, 2, 1, 0, 6, 7, 8]⟩, ⟨5, 0, [4, 3, 2, 9, 1]⟩, ⟨5, 7, [4, 3, 2, 9, 1, 0, 6]⟩, ⟨5, 8, [4, 3, 2, 9, 1, 0, 6, 7]⟩, ⟨5, 1, [4, 3, 2, 9, 8, 7, 6, 0]⟩] + +private def k9t4p9_step_2_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨5, 7, [6, 0, 1, 2, 3, 4, 9, 8]⟩, ⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 6, [1, 2, 3, 4, 9, 8, 7]⟩, ⟨0, 5, [1, 2, 3, 4, 9, 8, 7, 6]⟩, ⟨0, 9, [1, 2, 4, 5, 6, 7, 8]⟩, ⟨0, 5, [1, 2, 4, 9, 8, 7, 6]⟩, ⟨0, 4, [1, 2, 9, 8, 7, 6, 5]⟩, ⟨0, 3, [1, 9, 2]⟩, ⟨0, 7, [1, 9, 2, 3, 4, 5, 6]⟩, ⟨0, 8, [1, 9, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 3, [1, 9, 2, 4]⟩, ⟨0, 8, [1, 9, 2, 4, 5, 6, 7]⟩] + +private def k9t4p9_step_2_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 2, [1, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 3, [1, 9, 8, 7, 6, 5, 4, 2]⟩, ⟨0, 3, [1, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 2, [1, 9, 8, 7, 6, 5, 4, 3]⟩, ⟨0, 1, [6, 5, 4]⟩, ⟨0, 3, [6, 5, 4, 1, 2]⟩, ⟨0, 3, [6, 5, 4, 1, 9, 2]⟩, ⟨0, 1, [6, 5, 4, 2]⟩, ⟨0, 1, [6, 5, 4, 2, 9]⟩, ⟨0, 7, [6, 5, 4, 3, 2, 1, 9, 8]⟩, ⟨0, 1, [6, 5, 4, 3, 2, 9]⟩, ⟨0, 1, [6, 7, 8, 9, 2, 3, 4]⟩] + +private def k9t4p9_step_2_data : FreshAttachmentData 9 := ⟨5, 0, k9t4p9_step_2_required_block_0 ++ k9t4p9_step_2_required_block_1 ++ k9t4p9_step_2_required_block_2 ++ k9t4p9_step_2_required_block_3, ⟨none, {(5, 2), (0, 2), (3, 3), (1, 3)}⟩⟩ + +private def k9t4p9_step_2 : ClosureStep 9 := .fresh k9t4p9_step_2_data + +private def k9t4p9_step_3_data : EdgeAttachmentData 9 := ⟨5, 1, [⟨0, 1, [3, 8, 7, 6, 5]⟩, ⟨0, 1, [8, 3, 4, 5]⟩, ⟨2, 0, [1, 5, 4, 3, 8]⟩, ⟨2, 1, [3, 8, 7, 6, 5]⟩, ⟨4, 6, [5, 1, 2, 3, 0, 8, 7]⟩], ⟨none, {(2, 3), (0, 3), (4, 3), (1, 3)}⟩⟩ + +private def k9t4p9_step_3 : ClosureStep 9 := .edge k9t4p9_step_3_data + +private def k9t4p9_step_4_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 7, [2, 0, 6, 5, 4, 9, 8]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6]⟩, ⟨1, 0, [9, 8, 7, 6, 5, 4, 2]⟩, ⟨1, 0, [9, 8, 7, 6, 5, 4, 3, 2]⟩, ⟨1, 4, [9, 8, 7, 6, 0, 2, 3]⟩, ⟨1, 5, [9, 8, 7, 6, 0, 2, 3, 4]⟩, ⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩, ⟨5, 9, [4, 1, 2, 0, 6, 7, 8]⟩, ⟨5, 0, [4, 1, 9, 2]⟩, ⟨5, 8, [4, 1, 9, 2, 0, 6, 7]⟩, ⟨5, 0, [4, 1, 9, 8, 7, 6]⟩, ⟨5, 3, [4, 1, 9, 8, 7, 6, 0, 2]⟩] + +private def k9t4p9_step_4_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨5, 0, [4, 3, 2, 1, 9, 8, 7, 6]⟩, ⟨5, 1, [4, 3, 2, 0, 6, 7, 8, 9]⟩, ⟨5, 0, [4, 9, 8, 7, 6]⟩, ⟨5, 7, [6, 0, 2, 1, 4, 9, 8]⟩, ⟨5, 7, [6, 0, 2, 3, 4, 1, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 9, 2]⟩, ⟨7, 0, [8, 9, 1, 2, 3, 4, 5, 6]⟩, ⟨7, 0, [8, 9, 1, 2, 4, 5, 6]⟩, ⟨7, 4, [8, 9, 1, 2, 0, 6, 5]⟩, ⟨7, 3, [8, 9, 1, 2, 0, 6, 5, 4]⟩, ⟨7, 5, [8, 9, 1, 4, 2, 0, 6]⟩, ⟨7, 5, [8, 9, 1, 4, 3, 2, 0, 6]⟩] + +private def k9t4p9_step_4_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨7, 2, [8, 9, 1, 4, 5, 6, 0]⟩, ⟨7, 4, [8, 9, 2, 0, 6, 5]⟩, ⟨7, 1, [8, 9, 2, 0, 6, 5, 4]⟩, ⟨0, 7, [2, 1, 4, 5, 6]⟩, ⟨0, 9, [2, 1, 4, 5, 6, 7, 8]⟩, ⟨0, 5, [2, 1, 4, 9, 8, 7, 6]⟩, ⟨0, 7, [2, 1, 9, 4, 5, 6]⟩, ⟨0, 8, [2, 1, 9, 4, 5, 6, 7]⟩, ⟨0, 7, [2, 1, 9, 8]⟩, ⟨0, 4, [2, 1, 9, 8, 7, 6, 5]⟩, ⟨0, 3, [2, 1, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 1, [2, 3, 4]⟩] + +private def k9t4p9_step_4_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 6, [2, 3, 4, 1, 9, 8, 7]⟩, ⟨0, 5, [2, 3, 4, 1, 9, 8, 7, 6]⟩, ⟨0, 1, [2, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 1, [2, 3, 4, 9]⟩, ⟨0, 1, [2, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 7, [2, 9, 8]⟩, ⟨0, 3, [2, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 7, [6, 5, 4, 1, 2, 9, 8]⟩, ⟨0, 1, [6, 5, 4, 2, 9]⟩, ⟨0, 7, [6, 5, 4, 3, 2, 1, 9, 8]⟩, ⟨0, 1, [6, 5, 4, 3, 2, 9]⟩, ⟨0, 2, [6, 7, 8, 9, 1, 4, 3]⟩] + +private def k9t4p9_step_4_data : FreshAttachmentData 9 := ⟨5, 1, k9t4p9_step_4_required_block_0 ++ k9t4p9_step_4_required_block_1 ++ k9t4p9_step_4_required_block_2 ++ k9t4p9_step_4_required_block_3, ⟨none, {(5, 2), (0, 2), (1, 3), (7, 3)}⟩⟩ + +private def k9t4p9_step_4 : ClosureStep 9 := .fresh k9t4p9_step_4_data + +private def k9t4p9_step_5_data : EdgeAttachmentData 9 := ⟨5, 2, [⟨0, 6, [1, 2, 5, 4, 3, 8, 7]⟩, ⟨0, 1, [3, 4, 5, 2]⟩, ⟨0, 1, [8, 3, 4, 5, 2]⟩, ⟨1, 6, [2, 5, 4, 3, 0, 8, 7]⟩, ⟨2, 1, [5, 4, 3, 0, 8]⟩, ⟨2, 0, [5, 4, 3, 1, 8]⟩, ⟨4, 7, [3, 0, 1, 2, 5, 6]⟩, ⟨4, 8, [3, 0, 1, 2, 5, 6, 7]⟩, ⟨4, 7, [3, 0, 8, 1, 2, 5, 6]⟩, ⟨4, 8, [3, 1, 2, 5, 6, 7]⟩, ⟨4, 6, [5, 2, 1, 0, 3, 8, 7]⟩], ⟨none, {(2, 3), (4, 3), (0, 3), (1, 3)}⟩⟩ + +private def k9t4p9_step_5 : ClosureStep 9 := .edge k9t4p9_step_5_data + +private def k9t4p9_step_6_data : EdgeAttachmentData 9 := ⟨5, 3, [⟨0, 1, [8, 7, 6, 5, 3]⟩, ⟨2, 0, [3, 5, 6, 7, 8]⟩, ⟨2, 1, [3, 5, 6, 7, 8]⟩, ⟨4, 6, [5, 3, 2, 1, 0, 8, 7]⟩], ⟨none, {(2, 3), (4, 3), (0, 3), (1, 0)}⟩⟩ + +private def k9t4p9_step_6 : ClosureStep 9 := .edge k9t4p9_step_6_data + +private def k9t4p9_step_7_data : EdgeAttachmentData 9 := ⟨6, 0, [⟨0, 5, [6, 7, 8, 1, 2, 3, 4]⟩, ⟨2, 0, [1, 3, 4, 5, 6]⟩, ⟨4, 7, [3, 2, 1, 8, 0, 6]⟩, ⟨4, 7, [5, 6, 0, 1, 2, 3, 8]⟩, ⟨7, 5, [6, 0, 8, 1, 2, 3, 4]⟩, ⟨7, 4, [8, 1, 2, 3, 0, 6, 5]⟩, ⟨7, 4, [8, 1, 3, 0, 6, 5]⟩], ⟨none, {(2, 3), (7, 3), (0, 3), (4, 3)}⟩⟩ + +private def k9t4p9_step_7 : ClosureStep 9 := .edge k9t4p9_step_7_data + +private def k9t4p9_step_8_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [9, 2, 3, 4, 5, 6, 7]⟩, ⟨1, 0, [9, 2, 4, 5, 6, 7]⟩, ⟨1, 8, [0, 7, 6, 5, 4, 3, 2, 9]⟩, ⟨1, 6, [0, 7, 8, 9, 2, 3, 4, 5]⟩, ⟨1, 6, [0, 7, 8, 9, 2, 4, 5]⟩, ⟨6, 0, [5, 4, 1, 2, 9, 8, 7]⟩, ⟨6, 2, [5, 4, 1, 0, 7, 8, 9]⟩, ⟨6, 3, [5, 4, 1, 0, 7, 8, 9, 2]⟩, ⟨6, 9, [5, 4, 2, 1, 0, 7, 8]⟩, ⟨6, 8, [5, 4, 2, 9, 1, 0, 7]⟩, ⟨6, 1, [5, 4, 2, 9, 8, 7, 0]⟩, ⟨6, 0, [5, 4, 3, 2, 1, 9, 8, 7]⟩] + +private def k9t4p9_step_8_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨6, 9, [5, 4, 3, 2, 1, 0, 7, 8]⟩, ⟨6, 8, [5, 4, 3, 2, 9, 1, 0, 7]⟩, ⟨6, 1, [5, 4, 3, 2, 9, 8, 7, 0]⟩, ⟨8, 6, [7, 0, 1, 9, 2, 3, 4, 5]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 4, 5, 6, 7]⟩, ⟨8, 3, [9, 1, 0, 7, 6, 5, 4, 2]⟩, ⟨8, 2, [9, 1, 0, 7, 6, 5, 4, 3]⟩, ⟨8, 4, [9, 2, 1, 0, 7, 6, 5]⟩, ⟨8, 0, [9, 2, 3, 4, 1]⟩, ⟨8, 6, [9, 2, 3, 4, 1, 0, 7]⟩] + +private def k9t4p9_step_8_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 5, [9, 2, 3, 4, 1, 0, 7, 6]⟩, ⟨8, 1, [9, 2, 3, 4, 5, 6, 7, 0]⟩, ⟨8, 0, [9, 2, 4, 1]⟩, ⟨8, 5, [9, 2, 4, 1, 0, 7, 6]⟩, ⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 6, [1, 2, 3, 4, 9, 8, 7]⟩, ⟨0, 5, [1, 2, 3, 4, 9, 8, 7, 6]⟩, ⟨0, 9, [1, 2, 4, 5, 6, 7, 8]⟩, ⟨0, 5, [1, 2, 4, 9, 8, 7, 6]⟩, ⟨0, 4, [1, 2, 9, 8, 7, 6, 5]⟩, ⟨0, 6, [1, 9, 2, 3, 4, 5]⟩, ⟨0, 7, [1, 9, 2, 3, 4, 5, 6]⟩] + +private def k9t4p9_step_8_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 8, [1, 9, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 6, [1, 9, 2, 4, 5]⟩, ⟨0, 8, [1, 9, 2, 4, 5, 6, 7]⟩, ⟨0, 6, [1, 9, 4, 5]⟩, ⟨0, 2, [1, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 3, [1, 9, 8, 7, 6, 5, 4, 2]⟩, ⟨0, 3, [1, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 2, [1, 9, 8, 7, 6, 5, 4, 3]⟩, ⟨0, 1, [7, 6, 5, 4]⟩, ⟨0, 1, [7, 6, 5, 4, 2]⟩, ⟨0, 1, [7, 6, 5, 4, 2, 9]⟩, ⟨0, 1, [7, 6, 5, 4, 3, 2, 9]⟩] + +private def k9t4p9_step_8_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 1, [7, 8, 9]⟩, ⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩] + +private def k9t4p9_step_8_data : FreshAttachmentData 9 := ⟨6, 0, k9t4p9_step_8_required_block_0 ++ k9t4p9_step_8_required_block_1 ++ k9t4p9_step_8_required_block_2 ++ k9t4p9_step_8_required_block_3 ++ k9t4p9_step_8_required_block_4, ⟨none, {(8, 2), (0, 2), (6, 2), (1, 3)}⟩⟩ + +private def k9t4p9_step_8 : ClosureStep 9 := .fresh k9t4p9_step_8_data + +private def k9t4p9_step_9_data : EdgeAttachmentData 9 := ⟨6, 1, [⟨0, 5, [8, 7, 6, 1, 2, 3, 4]⟩, ⟨2, 0, [1, 6, 5, 4, 3]⟩, ⟨4, 7, [5, 6, 1, 0, 3, 8]⟩, ⟨4, 7, [5, 6, 1, 2, 3, 0, 8]⟩, ⟨7, 4, [8, 0, 3, 1, 6, 5]⟩, ⟨7, 4, [8, 0, 3, 2, 1, 6, 5]⟩], ⟨none, {(2, 3), (0, 3), (7, 3), (4, 3)}⟩⟩ + +private def k9t4p9_step_9 : ClosureStep 9 := .edge k9t4p9_step_9_data + +private def k9t4p9_step_10_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [9, 2, 3, 4, 5, 6, 7]⟩, ⟨1, 0, [9, 2, 4, 5, 6, 7]⟩, ⟨1, 0, [9, 8, 7, 6, 5, 4, 3, 2]⟩, ⟨1, 6, [9, 8, 7, 0, 2, 3, 4, 5]⟩, ⟨1, 6, [9, 8, 7, 0, 2, 4, 5]⟩, ⟨3, 0, [2, 1, 4, 5, 6, 7]⟩, ⟨3, 0, [2, 1, 9, 4, 5, 6, 7]⟩, ⟨3, 0, [2, 1, 9, 8, 7]⟩, ⟨3, 0, [2, 9, 8, 7]⟩, ⟨3, 8, [2, 0, 7, 6, 5, 4, 1, 9]⟩, ⟨3, 1, [2, 0, 7, 8, 9]⟩, ⟨3, 6, [2, 0, 7, 8, 9, 1, 4, 5]⟩] + +private def k9t4p9_step_10_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨3, 0, [4, 1, 2]⟩, ⟨3, 0, [4, 5, 6, 7, 8, 9, 1, 2]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩, ⟨8, 5, [9, 1, 2, 0, 7, 6]⟩, ⟨8, 4, [9, 1, 2, 0, 7, 6, 5]⟩, ⟨8, 3, [9, 1, 2, 0, 7, 6, 5, 4]⟩, ⟨8, 5, [9, 1, 4, 2, 0, 7, 6]⟩, ⟨8, 6, [9, 1, 4, 3, 2, 0, 7]⟩, ⟨8, 5, [9, 1, 4, 3, 2, 0, 7, 6]⟩, ⟨8, 0, [9, 1, 4, 5, 6, 7]⟩, ⟨8, 4, [9, 2, 0, 7, 6, 5]⟩] + +private def k9t4p9_step_10_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨0, 8, [2, 1, 4, 5, 6, 7]⟩, ⟨0, 9, [2, 1, 4, 5, 6, 7, 8]⟩, ⟨0, 8, [2, 1, 4, 9]⟩, ⟨0, 5, [2, 1, 4, 9, 8, 7, 6]⟩, ⟨0, 8, [2, 1, 9, 4, 5, 6, 7]⟩, ⟨0, 8, [2, 1, 9]⟩, ⟨0, 4, [2, 1, 9, 8, 7, 6, 5]⟩, ⟨0, 3, [2, 1, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 1, [2, 3, 4]⟩, ⟨0, 8, [2, 3, 4, 1, 9]⟩, ⟨0, 6, [2, 3, 4, 1, 9, 8, 7]⟩, ⟨0, 5, [2, 3, 4, 1, 9, 8, 7, 6]⟩] + +private def k9t4p9_step_10_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 1, [2, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 1, [2, 3, 4, 9]⟩, ⟨0, 1, [2, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 3, [2, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 1, [7, 6, 5, 4, 2]⟩, ⟨0, 1, [7, 6, 5, 4, 2, 9]⟩, ⟨0, 8, [7, 6, 5, 4, 3, 2, 1, 9]⟩, ⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩] + +private def k9t4p9_step_10_data : FreshAttachmentData 9 := ⟨6, 1, k9t4p9_step_10_required_block_0 ++ k9t4p9_step_10_required_block_1 ++ k9t4p9_step_10_required_block_2 ++ k9t4p9_step_10_required_block_3, ⟨none, {(3, 3), (0, 2), (1, 3), (8, 3)}⟩⟩ + +private def k9t4p9_step_10 : ClosureStep 9 := .fresh k9t4p9_step_10_data + +private def k9t4p9_step_11_data : EdgeAttachmentData 9 := ⟨6, 2, [⟨0, 1, [8, 7, 6, 2]⟩, ⟨0, 5, [8, 7, 6, 2, 1, 3, 4]⟩, ⟨0, 1, [8, 7, 6, 2, 3]⟩, ⟨1, 5, [0, 8, 7, 6, 2, 3, 4]⟩, ⟨2, 1, [6, 5, 4, 3, 0]⟩, ⟨2, 0, [6, 5, 4, 3, 1]⟩, ⟨7, 5, [6, 2, 1, 0, 8, 3, 4]⟩, ⟨7, 4, [8, 0, 1, 2, 6, 5]⟩, ⟨7, 3, [8, 0, 1, 2, 6, 5, 4]⟩, ⟨7, 4, [8, 0, 1, 3, 2, 6, 5]⟩, ⟨7, 3, [8, 1, 2, 6, 5, 4]⟩], ⟨none, {(2, 3), (0, 3), (7, 3), (1, 3)}⟩⟩ + +private def k9t4p9_step_11 : ClosureStep 9 := .edge k9t4p9_step_11_data + +private def k9t4p9_step_12_data : EdgeAttachmentData 9 := ⟨6, 3, [⟨2, 0, [1, 8, 7, 6, 3]⟩, ⟨4, 7, [5, 6, 3, 0, 1, 8]⟩, ⟨4, 7, [5, 6, 3, 2, 1, 0, 8]⟩, ⟨7, 4, [8, 0, 1, 2, 3, 6, 5]⟩, ⟨7, 4, [8, 0, 1, 3, 6, 5]⟩], ⟨none, {(2, 3), (7, 3), (0, 3), (4, 3)}⟩⟩ + +private def k9t4p9_step_12 : ClosureStep 9 := .edge k9t4p9_step_12_data + +private def k9t4p9_step_13_data : FreshAttachmentData 9 := ⟨6, 3, [⟨3, 0, [2, 1, 4, 5, 6, 7]⟩, ⟨3, 0, [2, 1, 9, 4, 5, 6, 7]⟩, ⟨3, 0, [2, 1, 9, 4]⟩, ⟨3, 0, [2, 1, 9, 8, 7, 6, 5, 4]⟩, ⟨3, 0, [2, 1, 9, 8, 7]⟩, ⟨3, 6, [2, 1, 9, 8, 7, 0, 4, 5]⟩, ⟨5, 0, [4, 1, 2, 9, 8, 7]⟩, ⟨5, 0, [4, 1, 9, 8, 7]⟩, ⟨5, 0, [4, 3, 2, 1, 9, 8, 7]⟩, ⟨5, 0, [4, 9, 8, 7]⟩, ⟨5, 0, [6, 7, 8, 9, 1, 2, 3, 4]⟩, ⟨5, 9, [6, 7, 0, 4, 1, 2]⟩, ⟨5, 8, [6, 7, 0, 4, 1, 2, 9]⟩, ⟨5, 8, [6, 7, 0, 4, 1, 9]⟩, ⟨5, 9, [6, 7, 0, 4, 3, 2, 1]⟩, ⟨5, 8, [6, 7, 0, 4, 3, 2, 1, 9]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 3, 4]⟩, ⟨8, 6, [9, 1, 2, 3, 4, 0, 7]⟩, ⟨8, 5, [9, 1, 2, 3, 4, 0, 7, 6]⟩, ⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 4]⟩, ⟨8, 5, [9, 1, 2, 4, 0, 7, 6]⟩, ⟨8, 0, [9, 1, 4, 5, 6, 7]⟩, ⟨8, 5, [9, 1, 4, 0, 7, 6]⟩, ⟨0, 5, [4, 3, 2, 1, 9, 8, 7, 6]⟩, ⟨0, 3, [4, 5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 8, [7, 6, 5, 4, 3, 2, 1, 9]⟩, ⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩], ⟨none, {(3, 3), (8, 3), (5, 3), (0, 1)}⟩⟩ + +private def k9t4p9_step_13 : ClosureStep 9 := .fresh k9t4p9_step_13_data + +private def k9t4p9_step_14_data : EdgeAttachmentData 9 := ⟨6, 4, [⟨0, 5, [1, 2, 3, 8, 7, 6, 4]⟩, ⟨2, 0, [3, 4, 6, 7, 8]⟩, ⟨5, 7, [4, 6]⟩, ⟨5, 3, [4, 6, 7, 8, 0, 1, 2]⟩, ⟨5, 1, [4, 6, 7, 8, 0, 3, 2]⟩, ⟨5, 0, [4, 6, 7, 8, 1, 2, 3]⟩, ⟨5, 7, [6, 4, 3, 2, 1, 0, 8]⟩, ⟨7, 5, [8, 0, 1, 2, 3, 4, 6]⟩], ⟨none, {(2, 3), (5, 3), (0, 3), (7, 3)}⟩⟩ + +private def k9t4p9_step_14 : ClosureStep 9 := .edge k9t4p9_step_14_data + +private def k9t4p9_step_15_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨3, 0, [2, 1, 4, 5, 6, 7]⟩, ⟨3, 0, [2, 1, 4, 9, 8, 7, 6, 5]⟩, ⟨3, 6, [2, 1, 4, 9, 8, 7, 0, 5]⟩, ⟨3, 0, [2, 1, 9, 4, 5, 6, 7]⟩, ⟨6, 0, [5, 4, 1, 2, 9, 8, 7]⟩, ⟨6, 0, [5, 4, 1, 9, 8, 7]⟩, ⟨6, 0, [5, 4, 3, 2, 1, 9, 8, 7]⟩, ⟨6, 0, [5, 4, 9, 8, 7]⟩, ⟨6, 4, [5, 0, 7, 8, 9, 1, 2, 3]⟩, ⟨6, 4, [5, 0, 7, 8, 9, 1, 2]⟩, ⟨6, 3, [5, 0, 7, 8, 9, 1, 2, 4]⟩, ⟨6, 2, [5, 0, 7, 8, 9, 1, 4]⟩] + +private def k9t4p9_step_15_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨6, 2, [5, 0, 7, 8, 9, 1, 4, 3]⟩, ⟨6, 1, [5, 0, 7, 8, 9, 2, 3, 4]⟩, ⟨6, 1, [5, 0, 7, 8, 9, 2, 4]⟩, ⟨6, 8, [7, 0, 5, 4, 1, 2, 9]⟩, ⟨6, 9, [7, 0, 5, 4, 3, 2, 1]⟩, ⟨6, 8, [7, 0, 5, 4, 3, 2, 1, 9]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5]⟩, ⟨8, 6, [9, 1, 2, 3, 4, 5, 0, 7]⟩, ⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 4, 5]⟩, ⟨8, 6, [9, 1, 2, 4, 5, 0, 7]⟩] + +private def k9t4p9_step_15_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 0, [9, 1, 4, 5]⟩, ⟨0, 3, [5, 4, 1, 2]⟩, ⟨0, 3, [5, 4, 1, 9, 2]⟩, ⟨0, 6, [5, 4, 3, 2, 1, 9, 8, 7]⟩, ⟨0, 3, [5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩, ⟨0, 3, [5, 6, 7, 8, 9, 1, 2, 4]⟩, ⟨0, 2, [5, 6, 7, 8, 9, 1, 4, 3]⟩, ⟨0, 3, [5, 6, 7, 8, 9, 2]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 2, 3, 4]⟩, ⟨0, 8, [7, 6, 5, 4, 3, 2, 1, 9]⟩] + +private def k9t4p9_step_15_data : FreshAttachmentData 9 := ⟨6, 4, k9t4p9_step_15_required_block_0 ++ k9t4p9_step_15_required_block_1 ++ k9t4p9_step_15_required_block_2, ⟨none, {(6, 2), (8, 3), (0, 1), (3, 3)}⟩⟩ + +private def k9t4p9_step_15 : ClosureStep 9 := .fresh k9t4p9_step_15_data + +private def k9t4p9_step_16_data : EdgeAttachmentData 9 := ⟨7, 2, [⟨0, 8, [1, 3, 2, 7]⟩, ⟨0, 3, [8, 1, 2, 7, 6, 5, 4]⟩, ⟨0, 6, [8, 7, 2, 1, 3, 4, 5]⟩, ⟨2, 0, [7, 6, 5, 4, 3]⟩, ⟨4, 8, [5, 6, 7, 2, 1, 0, 3]⟩, ⟨4, 8, [5, 6, 7, 2, 1, 0]⟩, ⟨8, 4, [0, 1, 2, 7, 6, 5]⟩, ⟨8, 3, [0, 1, 2, 7, 6, 5, 4]⟩, ⟨8, 4, [0, 1, 3, 2, 7, 6, 5]⟩, ⟨8, 1, [0, 3, 4, 5, 6, 7, 2]⟩, ⟨8, 4, [1, 2, 7, 6, 5]⟩, ⟨8, 3, [1, 2, 7, 6, 5, 4]⟩, ⟨8, 6, [7, 2, 1, 0, 3, 4, 5]⟩], ⟨none, {(2, 3), (0, 3), (8, 3), (4, 3)}⟩⟩ + +private def k9t4p9_step_16 : ClosureStep 9 := .edge k9t4p9_step_16_data + +private def k9t4p9_step_17_data : EdgeAttachmentData 9 := ⟨7, 4, [⟨0, 6, [1, 2, 3, 8, 7, 4, 5]⟩, ⟨0, 5, [8, 1, 2, 3, 4, 7, 6]⟩, ⟨0, 1, [8, 7, 4, 3]⟩, ⟨0, 1, [8, 7, 4, 3, 2]⟩, ⟨1, 6, [2, 3, 0, 8, 7, 4, 5]⟩, ⟨2, 0, [1, 8, 7, 4, 3]⟩, ⟨2, 1, [3, 4, 7, 8, 0]⟩], ⟨none, {(2, 3), (0, 3), (1, 3), (7, 3)}⟩⟩ + +private def k9t4p9_step_17 : ClosureStep 9 := .edge k9t4p9_step_17_data + +private def k9t4p9_step_18_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨3, 7, [2, 1, 4, 9, 8, 0, 5, 6]⟩, ⟨3, 0, [2, 1, 9, 4, 5, 6, 7, 8]⟩, ⟨3, 0, [2, 1, 9, 4, 5]⟩, ⟨3, 6, [2, 1, 9, 4, 5, 0, 8, 7]⟩, ⟨3, 0, [2, 1, 9, 8, 7, 6, 5]⟩, ⟨3, 0, [2, 1, 9, 8]⟩, ⟨3, 0, [2, 9, 8, 7, 6, 5]⟩, ⟨3, 0, [2, 9, 8]⟩, ⟨6, 0, [5, 4, 1, 2, 9, 8]⟩, ⟨6, 0, [5, 4, 1, 9, 8]⟩, ⟨6, 0, [5, 4, 3, 2, 1, 9, 8]⟩, ⟨6, 0, [5, 4, 9, 8]⟩] + +private def k9t4p9_step_18_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨6, 4, [5, 0, 8, 9, 1, 2, 3]⟩, ⟨6, 2, [5, 0, 8, 9, 1, 4, 3]⟩, ⟨6, 1, [5, 0, 8, 9, 2, 3, 4]⟩, ⟨6, 0, [7, 8, 9, 1, 2, 3, 4, 5]⟩, ⟨6, 9, [7, 8, 0, 5, 4, 1, 2]⟩, ⟨6, 3, [7, 8, 0, 5, 4, 1, 9, 2]⟩, ⟨6, 9, [7, 8, 0, 5, 4, 3, 2, 1]⟩, ⟨6, 1, [7, 8, 0, 5, 4, 3, 2, 9]⟩, ⟨7, 0, [6, 5, 4, 1, 2, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 3, 2, 1, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 9, 8]⟩] + +private def k9t4p9_step_18_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨7, 4, [6, 5, 0, 8, 9, 1, 2, 3]⟩, ⟨7, 4, [6, 5, 0, 8, 9, 1, 2]⟩, ⟨7, 3, [6, 5, 0, 8, 9, 1, 2, 4]⟩, ⟨7, 2, [6, 5, 0, 8, 9, 1, 4]⟩, ⟨7, 2, [6, 5, 0, 8, 9, 1, 4, 3]⟩, ⟨7, 1, [6, 5, 0, 8, 9, 2, 3, 4]⟩, ⟨7, 1, [6, 5, 0, 8, 9, 2, 4]⟩, ⟨7, 0, [8, 9, 4, 5]⟩, ⟨7, 9, [8, 0, 5, 4, 3, 2, 1]⟩, ⟨0, 6, [5, 4, 1, 2, 9, 8, 7]⟩, ⟨0, 7, [5, 4, 3, 2, 1, 9, 8]⟩, ⟨0, 6, [5, 4, 3, 2, 1, 9, 8, 7]⟩] + +private def k9t4p9_step_18_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 3, [5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 3, [5, 6, 7, 8, 9, 1, 2, 4]⟩, ⟨0, 2, [5, 6, 7, 8, 9, 1, 4]⟩, ⟨0, 2, [5, 6, 7, 8, 9, 1, 4, 3]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 2, 3, 4]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 2, 4]⟩, ⟨0, 9, [8, 7, 6, 5, 4, 1, 2]⟩, ⟨0, 9, [8, 7, 6, 5, 4, 3, 2, 1]⟩, ⟨0, 7, [8, 9, 1, 2, 3, 4, 5, 6]⟩] + +private def k9t4p9_step_18_data : FreshAttachmentData 9 := ⟨7, 4, k9t4p9_step_18_required_block_0 ++ k9t4p9_step_18_required_block_1 ++ k9t4p9_step_18_required_block_2 ++ k9t4p9_step_18_required_block_3, ⟨none, {(3, 3), (6, 2), (7, 2), (0, 2)}⟩⟩ + +private def k9t4p9_step_18 : ClosureStep 9 := .fresh k9t4p9_step_18_data + +private def k9t4p9_step_19_data : EdgeAttachmentData 9 := ⟨7, 5, [⟨0, 6, [8, 1, 2, 3, 4, 5, 7]⟩, ⟨2, 0, [3, 4, 5, 7, 8]⟩, ⟨4, 6, [3, 2, 1, 0, 8, 7, 5]⟩, ⟨6, 4, [5, 7, 8, 0, 1, 2, 3]⟩, ⟨6, 8, [7, 5, 4, 3, 2, 1, 0]⟩, ⟨6, 0, [7, 5, 4, 3, 2, 1, 8]⟩], ⟨none, {(2, 3), (0, 3), (4, 3), (6, 2)}⟩⟩ + +private def k9t4p9_step_19 : ClosureStep 9 := .edge k9t4p9_step_19_data + +private def k9t4p9_step_20_data : FreshAttachmentData 9 := ⟨7, 5, [⟨3, 0, [2, 1, 4, 5, 6, 7, 8]⟩, ⟨3, 0, [2, 1, 4, 5, 6]⟩, ⟨3, 0, [2, 1, 9, 4, 5, 6, 7, 8]⟩, ⟨3, 0, [2, 1, 9, 4, 5, 6]⟩, ⟨3, 7, [2, 1, 9, 4, 5, 6, 0, 8]⟩, ⟨3, 0, [2, 1, 9, 8]⟩, ⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 2, 9, 8]⟩, ⟨5, 7, [4, 1, 2, 9, 8, 0, 6]⟩, ⟨5, 0, [4, 1, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 9, 8]⟩, ⟨5, 0, [4, 3, 2, 1, 9, 8, 7, 6]⟩, ⟨5, 7, [4, 3, 2, 1, 9, 8, 0, 6]⟩, ⟨7, 0, [6, 5, 4, 1, 2, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 3, 2, 1, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 9, 8]⟩, ⟨7, 4, [6, 0, 8, 9, 1, 2, 3]⟩, ⟨7, 5, [6, 0, 8, 9, 1, 2, 3, 4]⟩, ⟨7, 5, [6, 0, 8, 9, 1, 2, 4]⟩, ⟨7, 2, [6, 0, 8, 9, 1, 4, 3]⟩, ⟨7, 1, [6, 0, 8, 9, 2, 3, 4]⟩, ⟨7, 9, [8, 0, 6, 5, 4, 1, 2]⟩, ⟨7, 3, [8, 0, 6, 5, 4, 1, 9, 2]⟩, ⟨7, 9, [8, 0, 6, 5, 4, 3, 2, 1]⟩, ⟨7, 1, [8, 0, 6, 5, 4, 3, 2, 9]⟩, ⟨0, 7, [6, 5, 4, 3, 2, 1, 9, 8]⟩, ⟨0, 5, [6, 7, 8, 9, 1, 2, 3, 4]⟩, ⟨0, 3, [8, 7, 6, 5, 4, 1, 9, 2]⟩, ⟨0, 9, [8, 7, 6, 5, 4, 3, 2, 1]⟩, ⟨0, 1, [8, 7, 6, 5, 4, 3, 2, 9]⟩], ⟨none, {(7, 2), (5, 3), (3, 3), (0, 1)}⟩⟩ + +private def k9t4p9_step_20 : ClosureStep 9 := .fresh k9t4p9_step_20_data + +private def k9t4p9_step_21_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [2, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨1, 7, [2, 3, 4, 5, 0, 9, 8]⟩, ⟨1, 6, [2, 3, 4, 5, 0, 9, 8, 7]⟩, ⟨1, 8, [2, 3, 4, 9, 0, 5, 6, 7]⟩, ⟨1, 0, [2, 4, 5, 6, 7, 8, 9]⟩, ⟨1, 6, [2, 4, 5, 0, 9, 8, 7]⟩, ⟨1, 0, [2, 9, 8, 7, 6, 5]⟩, ⟨3, 0, [2, 1, 4, 5, 6, 7, 8, 9]⟩, ⟨3, 0, [2, 1, 4, 5]⟩, ⟨3, 6, [2, 1, 4, 5, 0, 9, 8, 7]⟩, ⟨3, 8, [2, 1, 4, 9, 0, 5, 6, 7]⟩, ⟨3, 0, [2, 1, 9, 4, 5]⟩] + +private def k9t4p9_step_21_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨3, 0, [2, 1, 9, 8, 7, 6, 5]⟩, ⟨3, 0, [2, 1, 9]⟩, ⟨3, 0, [2, 9, 8, 7, 6, 5]⟩, ⟨3, 1, [2, 9, 0, 5, 4]⟩, ⟨8, 0, [7, 6, 5, 4, 1, 2, 9]⟩, ⟨8, 0, [7, 6, 5, 4, 3, 2, 1, 9]⟩, ⟨8, 4, [7, 6, 5, 0, 9, 1, 2, 3]⟩, ⟨8, 4, [7, 6, 5, 0, 9, 1, 2]⟩, ⟨8, 3, [7, 6, 5, 0, 9, 1, 2, 4]⟩, ⟨8, 2, [7, 6, 5, 0, 9, 1, 4, 3]⟩, ⟨8, 1, [7, 6, 5, 0, 9, 2, 3, 4]⟩, ⟨0, 6, [5, 4, 1, 2, 9, 8, 7]⟩] + +private def k9t4p9_step_21_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨0, 8, [5, 4, 1, 9]⟩, ⟨0, 6, [5, 4, 3, 2, 1, 9, 8, 7]⟩, ⟨0, 1, [5, 4, 3, 2, 9]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 2, [5, 6, 7, 8, 9, 1, 4, 3]⟩, ⟨0, 7, [9, 1, 2, 3, 4, 5, 6]⟩, ⟨0, 8, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 8, [9, 1, 2, 4, 5, 6, 7]⟩, ⟨0, 8, [9, 1, 4, 5, 6, 7]⟩, ⟨0, 1, [9, 2, 3, 4]⟩, ⟨0, 1, [9, 2, 4]⟩] + +private def k9t4p9_step_21_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 8, [9, 4, 5, 6, 7]⟩, ⟨0, 1, [9, 8, 7, 6, 5, 4]⟩, ⟨0, 2, [9, 8, 7, 6, 5, 4, 1]⟩, ⟨0, 3, [9, 8, 7, 6, 5, 4, 1, 2]⟩, ⟨0, 1, [9, 8, 7, 6, 5, 4, 2]⟩, ⟨0, 3, [9, 8, 7, 6, 5, 4, 2]⟩, ⟨0, 1, [9, 8, 7, 6, 5, 4, 3, 2]⟩] + +private def k9t4p9_step_21_data : FreshAttachmentData 9 := ⟨8, 4, k9t4p9_step_21_required_block_0 ++ k9t4p9_step_21_required_block_1 ++ k9t4p9_step_21_required_block_2 ++ k9t4p9_step_21_required_block_3, ⟨none, {(3, 3), (0, 2), (1, 3), (8, 2)}⟩⟩ + +private def k9t4p9_step_21 : ClosureStep 9 := .fresh k9t4p9_step_21_data + +private def k9t4p9_step_22_data : EdgeAttachmentData 9 := ⟨8, 5, [⟨0, 6, [1, 2, 3, 4, 5, 8, 7]⟩, ⟨2, 0, [1, 8, 5, 4, 3]⟩, ⟨4, 7, [3, 0, 1, 8, 5, 6]⟩, ⟨4, 7, [3, 2, 1, 0, 8, 5, 6]⟩, ⟨7, 4, [6, 5, 8, 0, 1, 2, 3]⟩, ⟨7, 4, [6, 5, 8, 0, 1, 3]⟩], ⟨none, {(2, 3), (0, 3), (4, 3), (7, 3)}⟩⟩ + +private def k9t4p9_step_22 : ClosureStep 9 := .edge k9t4p9_step_22_data + +private def k9t4p9_step_23_data : FreshAttachmentData 9 := ⟨8, 5, [⟨1, 0, [2, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨1, 7, [2, 3, 4, 5, 6, 0, 9, 8]⟩, ⟨1, 0, [2, 3, 4, 9, 8, 7, 6]⟩, ⟨1, 7, [2, 4, 5, 6, 0, 9, 8]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6]⟩, ⟨1, 3, [9, 0, 6, 5, 4]⟩, ⟨3, 0, [2, 1, 4, 5, 6, 7, 8, 9]⟩, ⟨3, 7, [2, 1, 4, 5, 6, 0, 9, 8]⟩, ⟨3, 0, [2, 1, 4, 9, 8, 7, 6]⟩, ⟨3, 0, [2, 1, 9, 4, 5, 6]⟩, ⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩, ⟨5, 8, [4, 1, 2, 9, 0, 6, 7]⟩, ⟨5, 0, [4, 1, 9, 8, 7, 6]⟩, ⟨5, 8, [4, 1, 9, 0, 6, 7]⟩, ⟨5, 0, [4, 3, 2, 1, 9, 8, 7, 6]⟩, ⟨5, 7, [4, 3, 2, 1, 9, 0, 6]⟩, ⟨5, 8, [4, 3, 2, 1, 9, 0, 6, 7]⟩, ⟨8, 0, [7, 6, 5, 4, 3, 2, 1, 9]⟩, ⟨8, 4, [7, 6, 0, 9, 1, 2, 3]⟩, ⟨8, 5, [7, 6, 0, 9, 1, 2, 3, 4]⟩, ⟨8, 4, [7, 6, 0, 9, 1, 2]⟩, ⟨8, 5, [7, 6, 0, 9, 1, 2, 4]⟩, ⟨8, 5, [7, 6, 0, 9, 1, 4]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6]⟩, ⟨8, 0, [9, 1, 2, 4, 5, 6]⟩], ⟨none, {(1, 3), (3, 3), (5, 3), (8, 3)}⟩⟩ + +private def k9t4p9_step_23 : ClosureStep 9 := .fresh k9t4p9_step_23_data + +private def k9t4p9_step_24_data : EdgeAttachmentData 9 := ⟨8, 6, [⟨0, 1, [8, 6, 5, 4, 3]⟩, ⟨2, 0, [3, 4, 5, 6, 8]⟩, ⟨2, 1, [3, 4, 5, 6, 8]⟩, ⟨7, 5, [6, 8, 0, 1, 2, 3, 4]⟩], ⟨none, {(2, 3), (7, 3), (0, 3), (1, 0)}⟩⟩ + +private def k9t4p9_step_24 : ClosureStep 9 := .edge k9t4p9_step_24_data + +private def k9t4p9_step_25_data : FreshAttachmentData 9 := ⟨8, 6, [⟨3, 0, [2, 1, 4, 5, 6, 7, 8, 9]⟩, ⟨3, 0, [2, 1, 4, 5, 6, 7]⟩, ⟨3, 8, [2, 1, 4, 5, 6, 7, 0, 9]⟩, ⟨3, 0, [2, 1, 4, 9]⟩, ⟨3, 0, [2, 1, 9, 4, 5, 6, 7]⟩, ⟨3, 0, [2, 1, 9, 8, 7]⟩, ⟨6, 0, [5, 4, 1, 2, 9, 8, 7]⟩, ⟨6, 0, [5, 4, 1, 2, 9]⟩, ⟨6, 8, [5, 4, 1, 2, 9, 0, 7]⟩, ⟨6, 0, [5, 4, 1, 9, 8, 7]⟩, ⟨6, 0, [5, 4, 1, 9]⟩, ⟨6, 0, [5, 4, 3, 2, 1, 9, 8, 7]⟩, ⟨6, 8, [5, 4, 3, 2, 1, 9, 0, 7]⟩, ⟨8, 5, [7, 0, 9, 1, 2, 3, 4]⟩, ⟨8, 6, [7, 0, 9, 1, 2, 3, 4, 5]⟩, ⟨8, 6, [7, 0, 9, 1, 2, 4, 5]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 4, 5, 6, 7]⟩, ⟨8, 3, [9, 0, 7, 6, 5, 4, 1, 2]⟩, ⟨8, 1, [9, 0, 7, 6, 5, 4, 3, 2]⟩, ⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩, ⟨0, 8, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 3, [9, 8, 7, 6, 5, 4, 1, 2]⟩, ⟨0, 1, [9, 8, 7, 6, 5, 4, 3, 2]⟩], ⟨none, {(8, 2), (3, 3), (6, 3), (0, 1)}⟩⟩ + +private def k9t4p9_step_25 : ClosureStep 9 := .fresh k9t4p9_step_25_data + +private def k9t4p9_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [], [], [], 5, 8⟩, ⟨0, 1, [[3, 4, 5, 6, 7, 8]], [], [], 2, 2⟩, ⟨0, 1, [], [], [2, 3, 4, 5, 6, 7, 8], 1, 1⟩, ⟨0, 2, [], [], [1], 4, 7⟩, ⟨0, 2, [[3, 4, 5, 6, 7, 8]], [], [1], 1, 1⟩, ⟨0, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩, ⟨0, 3, [], [], [], 5, 8⟩, ⟨0, 3, [], [], [4, 5, 6, 7, 8], 2, 3⟩, ⟨0, 4, [], [], [3], 4, 7⟩, ⟨0, 4, [], [], [5, 6, 7, 8], 1, 4⟩, ⟨0, 5, [], [], [4, 3], 3, 6⟩, ⟨0, 5, [], [], [6, 7, 8], 2, 5⟩] + +private def k9t4p9_templates_block_1 : List (TemplateData (Fin 9)) := [⟨0, 6, [], [], [5, 4, 3], 2, 5⟩, ⟨0, 6, [], [], [7, 8], 3, 6⟩, ⟨0, 7, [], [], [6, 5, 4, 3], 1, 4⟩, ⟨0, 7, [], [], [8], 4, 7⟩, ⟨0, 8, [], [], [], 5, 8⟩, ⟨0, 8, [], [], [7, 6, 5, 4, 3], 2, 3⟩, ⟨0, 8, [], [], [7, 6, 5, 4, 3, 2, 1], 1, 1⟩, ⟨1, 2, [], [], [3], 4, 7⟩, ⟨1, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩, ⟨1, 3, [], [], [4, 5, 6, 7, 8], 2, 3⟩, ⟨1, 4, [], [], [3], 4, 7⟩, ⟨1, 4, [], [], [5, 6, 7, 8], 1, 4⟩] + +private def k9t4p9_templates_block_2 : List (TemplateData (Fin 9)) := [⟨1, 5, [], [], [6, 7, 8], 2, 5⟩, ⟨1, 6, [], [], [5, 4, 3], 2, 5⟩, ⟨1, 7, [], [], [6, 5, 4, 3], 1, 4⟩, ⟨1, 7, [], [], [8], 4, 7⟩, ⟨1, 8, [], [], [7, 6, 5, 4, 3], 2, 3⟩, ⟨2, 3, [], [1], [], 4, 7⟩, ⟨2, 3, [], [1], [4, 5, 6, 7, 8], 1, 2⟩, ⟨2, 4, [], [1], [3], 3, 6⟩, ⟨2, 4, [], [1], [5, 6, 7, 8], 1, 3⟩, ⟨2, 5, [], [1], [4, 3], 2, 5⟩, ⟨2, 5, [], [1], [6, 7, 8], 1, 4⟩, ⟨2, 6, [], [1], [5, 4, 3], 1, 4⟩] + +private def k9t4p9_templates_block_3 : List (TemplateData (Fin 9)) := [⟨2, 6, [], [1], [7, 8], 2, 5⟩, ⟨2, 7, [], [1], [6, 5, 4, 3], 1, 3⟩, ⟨2, 7, [], [1], [8], 3, 6⟩, ⟨2, 8, [], [1], [], 4, 7⟩, ⟨2, 8, [], [1], [7, 6, 5, 4, 3], 1, 2⟩, ⟨3, 4, [], [], [5, 6, 7, 8], 1, 4⟩, ⟨3, 5, [], [], [6, 7, 8], 2, 5⟩, ⟨4, 5, [], [3], [6, 7, 8], 1, 4⟩, ⟨4, 6, [], [3], [7, 8], 2, 5⟩, ⟨4, 7, [], [3], [8], 3, 6⟩, ⟨4, 8, [], [3], [], 4, 7⟩, ⟨5, 6, [], [3, 4], [7, 8], 1, 4⟩] + +private def k9t4p9_templates_block_4 : List (TemplateData (Fin 9)) := [⟨5, 7, [], [3, 4], [8], 2, 5⟩, ⟨6, 7, [], [3, 4, 5], [8], 1, 4⟩, ⟨6, 8, [], [3, 4, 5], [], 2, 5⟩, ⟨7, 8, [], [3, 4, 5, 6], [], 1, 4⟩] + +def k9t4p9 : LayoutCertificate 9 where + chains := [[0], [1, 2, 3, 4, 5, 6, 7, 8]] + clique := {0, 1, 3, 8} + templates := k9t4p9_templates_block_0 ++ k9t4p9_templates_block_1 ++ k9t4p9_templates_block_2 ++ k9t4p9_templates_block_3 ++ k9t4p9_templates_block_4 + required := [⟨2, 5, [3, 4]⟩, + ⟨2, 8, [3, 4, 5, 6, 7]⟩] + closure := [k9t4p9_step_0, k9t4p9_step_1, k9t4p9_step_2, k9t4p9_step_3, k9t4p9_step_4, k9t4p9_step_5, k9t4p9_step_6, k9t4p9_step_7, k9t4p9_step_8, k9t4p9_step_9, k9t4p9_step_10, k9t4p9_step_11, k9t4p9_step_12, k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] + bad := ⟨none, {(6, 2), (5, 2), (4, 2), (2, 2)}⟩ + + +private def k9t4p9_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, ∅, ∅, ∅], + #[{1, 2, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 4, 5, 6, 7}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 2 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_0) 0 j = k9t4p9_template_matrix_0 0 j := by decide + +private theorem k9t4p9_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_0) 1 j = k9t4p9_template_matrix_0 1 j := by decide + +private theorem k9t4p9_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_0) 2 j = k9t4p9_template_matrix_0 2 j := by decide + +private theorem k9t4p9_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_0) 3 j = k9t4p9_template_matrix_0 3 j := by decide + +private theorem k9t4p9_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_0) 4 j = k9t4p9_template_matrix_0 4 j := by decide + +private theorem k9t4p9_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_0) 5 j = k9t4p9_template_matrix_0 5 j := by decide + +private theorem k9t4p9_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_0) 6 j = k9t4p9_template_matrix_0 6 j := by decide + +private theorem k9t4p9_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_0) 7 j = k9t4p9_template_matrix_0 7 j := by decide + +private theorem k9t4p9_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_0) 8 j = k9t4p9_template_matrix_0 8 j := by decide + +private theorem k9t4p9_template_matrix_0_eq : (templateMatrix k9t4p9_templates_block_0) = k9t4p9_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t4p9_template_matrix_0_eq_row_0 j + + · exact k9t4p9_template_matrix_0_eq_row_1 j + + · exact k9t4p9_template_matrix_0_eq_row_2 j + + · exact k9t4p9_template_matrix_0_eq_row_3 j + + · exact k9t4p9_template_matrix_0_eq_row_4 j + + · exact k9t4p9_template_matrix_0_eq_row_5 j + + · exact k9t4p9_template_matrix_0_eq_row_6 j + + · exact k9t4p9_template_matrix_0_eq_row_7 j + + · exact k9t4p9_template_matrix_0_eq_row_8 j + +private def k9t4p9_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[∅, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[∅, {1, 2, 4, 5, 6, 7}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {2, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 2 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_1) 0 j = k9t4p9_template_matrix_1 0 j := by decide + +private theorem k9t4p9_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_1) 1 j = k9t4p9_template_matrix_1 1 j := by decide + +private theorem k9t4p9_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_1) 2 j = k9t4p9_template_matrix_1 2 j := by decide + +private theorem k9t4p9_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_1) 3 j = k9t4p9_template_matrix_1 3 j := by decide + +private theorem k9t4p9_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_1) 4 j = k9t4p9_template_matrix_1 4 j := by decide + +private theorem k9t4p9_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_1) 5 j = k9t4p9_template_matrix_1 5 j := by decide + +private theorem k9t4p9_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_1) 6 j = k9t4p9_template_matrix_1 6 j := by decide + +private theorem k9t4p9_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_1) 7 j = k9t4p9_template_matrix_1 7 j := by decide + +private theorem k9t4p9_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_1) 8 j = k9t4p9_template_matrix_1 8 j := by decide + +private theorem k9t4p9_template_matrix_1_eq : (templateMatrix k9t4p9_templates_block_1) = k9t4p9_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t4p9_template_matrix_1_eq_row_0 j + + · exact k9t4p9_template_matrix_1_eq_row_1 j + + · exact k9t4p9_template_matrix_1_eq_row_2 j + + · exact k9t4p9_template_matrix_1_eq_row_3 j + + · exact k9t4p9_template_matrix_1_eq_row_4 j + + · exact k9t4p9_template_matrix_1_eq_row_5 j + + · exact k9t4p9_template_matrix_1_eq_row_6 j + + · exact k9t4p9_template_matrix_1_eq_row_7 j + + · exact k9t4p9_template_matrix_1_eq_row_8 j + +private def k9t4p9_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[∅, ∅, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, ∅], + #[∅, ∅, {1, 2, 4, 5, 6, 7}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 2 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {2, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_2) 0 j = k9t4p9_template_matrix_2 0 j := by decide + +private theorem k9t4p9_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_2) 1 j = k9t4p9_template_matrix_2 1 j := by decide + +private theorem k9t4p9_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_2) 2 j = k9t4p9_template_matrix_2 2 j := by decide + +private theorem k9t4p9_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_2) 3 j = k9t4p9_template_matrix_2 3 j := by decide + +private theorem k9t4p9_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_2) 4 j = k9t4p9_template_matrix_2 4 j := by decide + +private theorem k9t4p9_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_2) 5 j = k9t4p9_template_matrix_2 5 j := by decide + +private theorem k9t4p9_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_2) 6 j = k9t4p9_template_matrix_2 6 j := by decide + +private theorem k9t4p9_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_2) 7 j = k9t4p9_template_matrix_2 7 j := by decide + +private theorem k9t4p9_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_2) 8 j = k9t4p9_template_matrix_2 8 j := by decide + +private theorem k9t4p9_template_matrix_2_eq : (templateMatrix k9t4p9_templates_block_2) = k9t4p9_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t4p9_template_matrix_2_eq_row_0 j + + · exact k9t4p9_template_matrix_2_eq_row_1 j + + · exact k9t4p9_template_matrix_2_eq_row_2 j + + · exact k9t4p9_template_matrix_2_eq_row_3 j + + · exact k9t4p9_template_matrix_2_eq_row_4 j + + · exact k9t4p9_template_matrix_2_eq_row_5 j + + · exact k9t4p9_template_matrix_2_eq_row_6 j + + · exact k9t4p9_template_matrix_2_eq_row_7 j + + · exact k9t4p9_template_matrix_2_eq_row_8 j + +private def k9t4p9_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅, ∅], + #[∅, ∅, Finset.Icc 2 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 3 6, ∅, ∅, ∅, ∅], + #[∅, ∅, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 4 7, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_3) 0 j = k9t4p9_template_matrix_3 0 j := by decide + +private theorem k9t4p9_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_3) 1 j = k9t4p9_template_matrix_3 1 j := by decide + +private theorem k9t4p9_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_3) 2 j = k9t4p9_template_matrix_3 2 j := by decide + +private theorem k9t4p9_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_3) 3 j = k9t4p9_template_matrix_3 3 j := by decide + +private theorem k9t4p9_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_3) 4 j = k9t4p9_template_matrix_3 4 j := by decide + +private theorem k9t4p9_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_3) 5 j = k9t4p9_template_matrix_3 5 j := by decide + +private theorem k9t4p9_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_3) 6 j = k9t4p9_template_matrix_3 6 j := by decide + +private theorem k9t4p9_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_3) 7 j = k9t4p9_template_matrix_3 7 j := by decide + +private theorem k9t4p9_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_3) 8 j = k9t4p9_template_matrix_3 8 j := by decide + +private theorem k9t4p9_template_matrix_3_eq : (templateMatrix k9t4p9_templates_block_3) = k9t4p9_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t4p9_template_matrix_3_eq_row_0 j + + · exact k9t4p9_template_matrix_3_eq_row_1 j + + · exact k9t4p9_template_matrix_3_eq_row_2 j + + · exact k9t4p9_template_matrix_3_eq_row_3 j + + · exact k9t4p9_template_matrix_3_eq_row_4 j + + · exact k9t4p9_template_matrix_3_eq_row_5 j + + · exact k9t4p9_template_matrix_3_eq_row_6 j + + · exact k9t4p9_template_matrix_3_eq_row_7 j + + · exact k9t4p9_template_matrix_3_eq_row_8 j + +private def k9t4p9_template_matrix_4 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 2 5, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_template_matrix_4_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_4) 0 j = k9t4p9_template_matrix_4 0 j := by decide + +private theorem k9t4p9_template_matrix_4_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_4) 1 j = k9t4p9_template_matrix_4 1 j := by decide + +private theorem k9t4p9_template_matrix_4_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_4) 2 j = k9t4p9_template_matrix_4 2 j := by decide + +private theorem k9t4p9_template_matrix_4_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_4) 3 j = k9t4p9_template_matrix_4 3 j := by decide + +private theorem k9t4p9_template_matrix_4_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_4) 4 j = k9t4p9_template_matrix_4 4 j := by decide + +private theorem k9t4p9_template_matrix_4_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_4) 5 j = k9t4p9_template_matrix_4 5 j := by decide + +private theorem k9t4p9_template_matrix_4_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_4) 6 j = k9t4p9_template_matrix_4 6 j := by decide + +private theorem k9t4p9_template_matrix_4_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_4) 7 j = k9t4p9_template_matrix_4 7 j := by decide + +private theorem k9t4p9_template_matrix_4_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p9_templates_block_4) 8 j = k9t4p9_template_matrix_4 8 j := by decide + +private theorem k9t4p9_template_matrix_4_eq : (templateMatrix k9t4p9_templates_block_4) = k9t4p9_template_matrix_4 := by + funext i j + fin_cases i + + · exact k9t4p9_template_matrix_4_eq_row_0 j + + · exact k9t4p9_template_matrix_4_eq_row_1 j + + · exact k9t4p9_template_matrix_4_eq_row_2 j + + · exact k9t4p9_template_matrix_4_eq_row_3 j + + · exact k9t4p9_template_matrix_4_eq_row_4 j + + · exact k9t4p9_template_matrix_4_eq_row_5 j + + · exact k9t4p9_template_matrix_4_eq_row_6 j + + · exact k9t4p9_template_matrix_4_eq_row_7 j + + · exact k9t4p9_template_matrix_4_eq_row_8 j + +private theorem k9t4p9_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => ((((k9t4p9_template_matrix_0 i j ∪ k9t4p9_template_matrix_1 i j) ∪ k9t4p9_template_matrix_2 i j) ∪ k9t4p9_template_matrix_3 i j) ∪ k9t4p9_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p9.required i j) 0 j = k9t4p9_state_0 0 j := by decide + +private theorem k9t4p9_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => ((((k9t4p9_template_matrix_0 i j ∪ k9t4p9_template_matrix_1 i j) ∪ k9t4p9_template_matrix_2 i j) ∪ k9t4p9_template_matrix_3 i j) ∪ k9t4p9_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p9.required i j) 1 j = k9t4p9_state_0 1 j := by decide + +private theorem k9t4p9_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => ((((k9t4p9_template_matrix_0 i j ∪ k9t4p9_template_matrix_1 i j) ∪ k9t4p9_template_matrix_2 i j) ∪ k9t4p9_template_matrix_3 i j) ∪ k9t4p9_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p9.required i j) 2 j = k9t4p9_state_0 2 j := by decide + +private theorem k9t4p9_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => ((((k9t4p9_template_matrix_0 i j ∪ k9t4p9_template_matrix_1 i j) ∪ k9t4p9_template_matrix_2 i j) ∪ k9t4p9_template_matrix_3 i j) ∪ k9t4p9_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p9.required i j) 3 j = k9t4p9_state_0 3 j := by decide + +private theorem k9t4p9_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => ((((k9t4p9_template_matrix_0 i j ∪ k9t4p9_template_matrix_1 i j) ∪ k9t4p9_template_matrix_2 i j) ∪ k9t4p9_template_matrix_3 i j) ∪ k9t4p9_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p9.required i j) 4 j = k9t4p9_state_0 4 j := by decide + +private theorem k9t4p9_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => ((((k9t4p9_template_matrix_0 i j ∪ k9t4p9_template_matrix_1 i j) ∪ k9t4p9_template_matrix_2 i j) ∪ k9t4p9_template_matrix_3 i j) ∪ k9t4p9_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p9.required i j) 5 j = k9t4p9_state_0 5 j := by decide + +private theorem k9t4p9_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => ((((k9t4p9_template_matrix_0 i j ∪ k9t4p9_template_matrix_1 i j) ∪ k9t4p9_template_matrix_2 i j) ∪ k9t4p9_template_matrix_3 i j) ∪ k9t4p9_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p9.required i j) 6 j = k9t4p9_state_0 6 j := by decide + +private theorem k9t4p9_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => ((((k9t4p9_template_matrix_0 i j ∪ k9t4p9_template_matrix_1 i j) ∪ k9t4p9_template_matrix_2 i j) ∪ k9t4p9_template_matrix_3 i j) ∪ k9t4p9_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p9.required i j) 7 j = k9t4p9_state_0 7 j := by decide + +private theorem k9t4p9_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => ((((k9t4p9_template_matrix_0 i j ∪ k9t4p9_template_matrix_1 i j) ∪ k9t4p9_template_matrix_2 i j) ∪ k9t4p9_template_matrix_3 i j) ∪ k9t4p9_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p9.required i j) 8 j = k9t4p9_state_0 8 j := by decide + +private theorem k9t4p9_initial_merged_eq : (fun i j => ((((k9t4p9_template_matrix_0 i j ∪ k9t4p9_template_matrix_1 i j) ∪ k9t4p9_template_matrix_2 i j) ∪ k9t4p9_template_matrix_3 i j) ∪ k9t4p9_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p9.required i j) = k9t4p9_state_0 := by + funext i j + fin_cases i + + · exact k9t4p9_initial_merged_eq_row_0 j + + · exact k9t4p9_initial_merged_eq_row_1 j + + · exact k9t4p9_initial_merged_eq_row_2 j + + · exact k9t4p9_initial_merged_eq_row_3 j + + · exact k9t4p9_initial_merged_eq_row_4 j + + · exact k9t4p9_initial_merged_eq_row_5 j + + · exact k9t4p9_initial_merged_eq_row_6 j + + · exact k9t4p9_initial_merged_eq_row_7 j + + · exact k9t4p9_initial_merged_eq_row_8 j + +private theorem k9t4p9_initial_eq : k9t4p9.initialMatrix 9 = k9t4p9_state_0 := by + funext i j + change templateMatrix (k9t4p9_templates_block_0 ++ k9t4p9_templates_block_1 ++ k9t4p9_templates_block_2 ++ k9t4p9_templates_block_3 ++ k9t4p9_templates_block_4) i j ∪ requiredMatrix 9 k9t4p9.required i j = _ + simp only [templateMatrix_append, k9t4p9_template_matrix_0_eq, k9t4p9_template_matrix_1_eq, k9t4p9_template_matrix_2_eq, k9t4p9_template_matrix_3_eq, k9t4p9_template_matrix_4_eq] + exact congrFun (congrFun k9t4p9_initial_merged_eq i) j + +private def k9t4p9_state_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 8, {1, 2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 1 6, ∅, {1, 2}, {1, 2}], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, {1, 2}, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, {1, 2}, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_0_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p9_state_0 a b ∪ requiredMatrix 9 k9t4p9_step_0_data.required a b) 0 j = k9t4p9_local_0 0 j := by decide + +private theorem k9t4p9_local_0_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p9_state_0 a b ∪ requiredMatrix 9 k9t4p9_step_0_data.required a b) 1 j = k9t4p9_local_0 1 j := by decide + +private theorem k9t4p9_local_0_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p9_state_0 a b ∪ requiredMatrix 9 k9t4p9_step_0_data.required a b) 2 j = k9t4p9_local_0 2 j := by decide + +private theorem k9t4p9_local_0_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p9_state_0 a b ∪ requiredMatrix 9 k9t4p9_step_0_data.required a b) 3 j = k9t4p9_local_0 3 j := by decide + +private theorem k9t4p9_local_0_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p9_state_0 a b ∪ requiredMatrix 9 k9t4p9_step_0_data.required a b) 4 j = k9t4p9_local_0 4 j := by decide + +private theorem k9t4p9_local_0_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p9_state_0 a b ∪ requiredMatrix 9 k9t4p9_step_0_data.required a b) 5 j = k9t4p9_local_0 5 j := by decide + +private theorem k9t4p9_local_0_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p9_state_0 a b ∪ requiredMatrix 9 k9t4p9_step_0_data.required a b) 6 j = k9t4p9_local_0 6 j := by decide + +private theorem k9t4p9_local_0_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p9_state_0 a b ∪ requiredMatrix 9 k9t4p9_step_0_data.required a b) 7 j = k9t4p9_local_0 7 j := by decide + +private theorem k9t4p9_local_0_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p9_state_0 a b ∪ requiredMatrix 9 k9t4p9_step_0_data.required a b) 8 j = k9t4p9_local_0 8 j := by decide + +private theorem k9t4p9_local_0_eq : (fun a b => k9t4p9_state_0 a b ∪ requiredMatrix 9 k9t4p9_step_0_data.required a b) = k9t4p9_local_0 := by + funext i j + fin_cases i + + · exact k9t4p9_local_0_eq_row_0 j + + · exact k9t4p9_local_0_eq_row_1 j + + · exact k9t4p9_local_0_eq_row_2 j + + · exact k9t4p9_local_0_eq_row_3 j + + · exact k9t4p9_local_0_eq_row_4 j + + · exact k9t4p9_local_0_eq_row_5 j + + · exact k9t4p9_local_0_eq_row_6 j + + · exact k9t4p9_local_0_eq_row_7 j + + · exact k9t4p9_local_0_eq_row_8 j + +private theorem k9t4p9_local_0_paths : ∀ p ∈ k9t4p9_step_0_data.required, p.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_0_data.i k9t4p9_step_0_data.j) 9 := by decide + +private theorem k9t4p9_local_0_bad : k9t4p9_step_0_data.bad.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_0_data.i k9t4p9_step_0_data.j) k9t4p9_local_0 9 4 := by decide + +private theorem k9t4p9_step_0_check : k9t4p9_step_0.Check k9t4p9.graph k9t4p9_state_0 9 4 := by + change k9t4p9_step_0_data.Check k9t4p9.graph k9t4p9_state_0 9 4 + refine ⟨k9t4p9_local_0_paths, ?_⟩ + rw [k9t4p9_local_0_eq] + exact k9t4p9_local_0_bad + +private theorem k9t4p9_update_0 : k9t4p9_step_0.apply k9t4p9_state_0 = k9t4p9_state_1 := by + have h : ∀ i j : Fin 9, k9t4p9_step_0.apply k9t4p9_state_0 i j = k9t4p9_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[{0, 2, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_1_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p9_state_1 a b ∪ requiredMatrix 9 k9t4p9_step_1_data.required a b) 0 j = k9t4p9_local_1 0 j := by decide + +private theorem k9t4p9_local_1_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p9_state_1 a b ∪ requiredMatrix 9 k9t4p9_step_1_data.required a b) 1 j = k9t4p9_local_1 1 j := by decide + +private theorem k9t4p9_local_1_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p9_state_1 a b ∪ requiredMatrix 9 k9t4p9_step_1_data.required a b) 2 j = k9t4p9_local_1 2 j := by decide + +private theorem k9t4p9_local_1_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p9_state_1 a b ∪ requiredMatrix 9 k9t4p9_step_1_data.required a b) 3 j = k9t4p9_local_1 3 j := by decide + +private theorem k9t4p9_local_1_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p9_state_1 a b ∪ requiredMatrix 9 k9t4p9_step_1_data.required a b) 4 j = k9t4p9_local_1 4 j := by decide + +private theorem k9t4p9_local_1_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p9_state_1 a b ∪ requiredMatrix 9 k9t4p9_step_1_data.required a b) 5 j = k9t4p9_local_1 5 j := by decide + +private theorem k9t4p9_local_1_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p9_state_1 a b ∪ requiredMatrix 9 k9t4p9_step_1_data.required a b) 6 j = k9t4p9_local_1 6 j := by decide + +private theorem k9t4p9_local_1_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p9_state_1 a b ∪ requiredMatrix 9 k9t4p9_step_1_data.required a b) 7 j = k9t4p9_local_1 7 j := by decide + +private theorem k9t4p9_local_1_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p9_state_1 a b ∪ requiredMatrix 9 k9t4p9_step_1_data.required a b) 8 j = k9t4p9_local_1 8 j := by decide + +private theorem k9t4p9_local_1_eq : (fun a b => k9t4p9_state_1 a b ∪ requiredMatrix 9 k9t4p9_step_1_data.required a b) = k9t4p9_local_1 := by + funext i j + fin_cases i + + · exact k9t4p9_local_1_eq_row_0 j + + · exact k9t4p9_local_1_eq_row_1 j + + · exact k9t4p9_local_1_eq_row_2 j + + · exact k9t4p9_local_1_eq_row_3 j + + · exact k9t4p9_local_1_eq_row_4 j + + · exact k9t4p9_local_1_eq_row_5 j + + · exact k9t4p9_local_1_eq_row_6 j + + · exact k9t4p9_local_1_eq_row_7 j + + · exact k9t4p9_local_1_eq_row_8 j + +private theorem k9t4p9_local_1_paths : ∀ p ∈ k9t4p9_step_1_data.required, p.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_1_data.i k9t4p9_step_1_data.j) 9 := by decide + +private theorem k9t4p9_local_1_bad : k9t4p9_step_1_data.bad.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_1_data.i k9t4p9_step_1_data.j) k9t4p9_local_1 9 4 := by decide + +private theorem k9t4p9_step_1_check : k9t4p9_step_1.Check k9t4p9.graph k9t4p9_state_1 9 4 := by + change k9t4p9_step_1_data.Check k9t4p9.graph k9t4p9_state_1 9 4 + refine ⟨k9t4p9_local_1_paths, ?_⟩ + rw [k9t4p9_local_1_eq] + exact k9t4p9_local_1_bad + +private theorem k9t4p9_update_1 : k9t4p9_step_1.apply k9t4p9_state_1 = k9t4p9_state_2 := by + have h : ∀ i j : Fin 9, k9t4p9_step_1.apply k9t4p9_state_1 i j = k9t4p9_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 1 5, {0, 1}, Finset.Icc 0 5, {1}, Finset.Icc 0 4, {1}, {0, 1}, {0, 1}, {0, 1}], + #[Finset.Icc 1 5, ∅, {1, 2, 5, 6, 7, 8}, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{0, 1}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1}, {1, 2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {0, 1, 4, 5, 6, 7}], + #[{1}, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 0 5, ∅, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, {1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, {0, 1, 4, 5, 6, 7}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_2_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1, 2}, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, {3}, {1}, {0}, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, {3}, ∅, ∅, ∅, {0}, ∅, {0}, ∅, ∅], + #[∅, {1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0}, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_2_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_0) 0 j = k9t4p9_local_2_required_0 0 j := by decide + +private theorem k9t4p9_local_2_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_0) 1 j = k9t4p9_local_2_required_0 1 j := by decide + +private theorem k9t4p9_local_2_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_0) 2 j = k9t4p9_local_2_required_0 2 j := by decide + +private theorem k9t4p9_local_2_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_0) 3 j = k9t4p9_local_2_required_0 3 j := by decide + +private theorem k9t4p9_local_2_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_0) 4 j = k9t4p9_local_2_required_0 4 j := by decide + +private theorem k9t4p9_local_2_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_0) 5 j = k9t4p9_local_2_required_0 5 j := by decide + +private theorem k9t4p9_local_2_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_0) 6 j = k9t4p9_local_2_required_0 6 j := by decide + +private theorem k9t4p9_local_2_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_0) 7 j = k9t4p9_local_2_required_0 7 j := by decide + +private theorem k9t4p9_local_2_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_0) 8 j = k9t4p9_local_2_required_0 8 j := by decide + +private theorem k9t4p9_local_2_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_0) 9 j = k9t4p9_local_2_required_0 9 j := by decide + +private theorem k9t4p9_local_2_required_0_eq : (requiredMatrix 9 k9t4p9_step_2_required_block_0) = k9t4p9_local_2_required_0 := by + funext i j + fin_cases i + + · exact k9t4p9_local_2_required_0_eq_row_0 j + + · exact k9t4p9_local_2_required_0_eq_row_1 j + + · exact k9t4p9_local_2_required_0_eq_row_2 j + + · exact k9t4p9_local_2_required_0_eq_row_3 j + + · exact k9t4p9_local_2_required_0_eq_row_4 j + + · exact k9t4p9_local_2_required_0_eq_row_5 j + + · exact k9t4p9_local_2_required_0_eq_row_6 j + + · exact k9t4p9_local_2_required_0_eq_row_7 j + + · exact k9t4p9_local_2_required_0_eq_row_8 j + + · exact k9t4p9_local_2_required_0_eq_row_9 j + +private theorem k9t4p9_local_2_path_0_0 : (⟨1, 0, [2, 3, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_0_1 : (⟨1, 0, [9, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_0_2 : (⟨1, 7, [0, 6, 5, 4, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_0_3 : (⟨1, 7, [0, 6, 5, 4, 3, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_0_4 : (⟨1, 4, [0, 6, 7, 8, 9, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_0_5 : (⟨1, 5, [0, 6, 7, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_0_6 : (⟨3, 0, [2, 1, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_0_7 : (⟨3, 0, [2, 1, 9, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_0_8 : (⟨3, 7, [2, 1, 0, 6, 5, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_0_9 : (⟨3, 5, [2, 1, 0, 6, 7, 8, 9, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_0_10 : (⟨3, 1, [2, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_0_11 : (⟨3, 0, [2, 9, 8, 7, 6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_paths_block_0 : ∀ p ∈ k9t4p9_step_2_required_block_0, p.Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by + simp only [k9t4p9_step_2_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_2_path_0_0, k9t4p9_local_2_path_0_1, k9t4p9_local_2_path_0_2, k9t4p9_local_2_path_0_3, k9t4p9_local_2_path_0_4, k9t4p9_local_2_path_0_5, k9t4p9_local_2_path_0_6, k9t4p9_local_2_path_0_7, k9t4p9_local_2_path_0_8, k9t4p9_local_2_path_0_9, k9t4p9_local_2_path_0_10, k9t4p9_local_2_path_0_11⟩ + +private def k9t4p9_local_2_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, Finset.Icc 0 4, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, {0}, ∅, {0}, ∅, ∅, ∅, {1}, {0, 1}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_2_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_1) 0 j = k9t4p9_local_2_required_1 0 j := by decide + +private theorem k9t4p9_local_2_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_1) 1 j = k9t4p9_local_2_required_1 1 j := by decide + +private theorem k9t4p9_local_2_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_1) 2 j = k9t4p9_local_2_required_1 2 j := by decide + +private theorem k9t4p9_local_2_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_1) 3 j = k9t4p9_local_2_required_1 3 j := by decide + +private theorem k9t4p9_local_2_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_1) 4 j = k9t4p9_local_2_required_1 4 j := by decide + +private theorem k9t4p9_local_2_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_1) 5 j = k9t4p9_local_2_required_1 5 j := by decide + +private theorem k9t4p9_local_2_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_1) 6 j = k9t4p9_local_2_required_1 6 j := by decide + +private theorem k9t4p9_local_2_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_1) 7 j = k9t4p9_local_2_required_1 7 j := by decide + +private theorem k9t4p9_local_2_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_1) 8 j = k9t4p9_local_2_required_1 8 j := by decide + +private theorem k9t4p9_local_2_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_1) 9 j = k9t4p9_local_2_required_1 9 j := by decide + +private theorem k9t4p9_local_2_required_1_eq : (requiredMatrix 9 k9t4p9_step_2_required_block_1) = k9t4p9_local_2_required_1 := by + funext i j + fin_cases i + + · exact k9t4p9_local_2_required_1_eq_row_0 j + + · exact k9t4p9_local_2_required_1_eq_row_1 j + + · exact k9t4p9_local_2_required_1_eq_row_2 j + + · exact k9t4p9_local_2_required_1_eq_row_3 j + + · exact k9t4p9_local_2_required_1_eq_row_4 j + + · exact k9t4p9_local_2_required_1_eq_row_5 j + + · exact k9t4p9_local_2_required_1_eq_row_6 j + + · exact k9t4p9_local_2_required_1_eq_row_7 j + + · exact k9t4p9_local_2_required_1_eq_row_8 j + + · exact k9t4p9_local_2_required_1_eq_row_9 j + +private theorem k9t4p9_local_2_path_1_0 : (⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_1_1 : (⟨5, 0, [4, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_1_2 : (⟨5, 3, [4, 1, 0, 6, 7, 8, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_1_3 : (⟨5, 9, [4, 2, 1, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_1_4 : (⟨5, 0, [4, 2, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_1_5 : (⟨5, 8, [4, 2, 9, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_1_6 : (⟨5, 0, [4, 3, 2, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_1_7 : (⟨5, 9, [4, 3, 2, 1, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_1_8 : (⟨5, 0, [4, 3, 2, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_1_9 : (⟨5, 7, [4, 3, 2, 9, 1, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_1_10 : (⟨5, 8, [4, 3, 2, 9, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_1_11 : (⟨5, 1, [4, 3, 2, 9, 8, 7, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_paths_block_1 : ∀ p ∈ k9t4p9_step_2_required_block_1, p.Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by + simp only [k9t4p9_step_2_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_2_path_1_0, k9t4p9_local_2_path_1_1, k9t4p9_local_2_path_1_2, k9t4p9_local_2_path_1_3, k9t4p9_local_2_path_1_4, k9t4p9_local_2_path_1_5, k9t4p9_local_2_path_1_6, k9t4p9_local_2_path_1_7, k9t4p9_local_2_path_1_8, k9t4p9_local_2_path_1_9, k9t4p9_local_2_path_1_10, k9t4p9_local_2_path_1_11⟩ + +private def k9t4p9_local_2_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, {4, 5}, {1}, {0, 1}, {1}, {1}, {0, 1}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_2_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_2) 0 j = k9t4p9_local_2_required_2 0 j := by decide + +private theorem k9t4p9_local_2_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_2) 1 j = k9t4p9_local_2_required_2 1 j := by decide + +private theorem k9t4p9_local_2_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_2) 2 j = k9t4p9_local_2_required_2 2 j := by decide + +private theorem k9t4p9_local_2_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_2) 3 j = k9t4p9_local_2_required_2 3 j := by decide + +private theorem k9t4p9_local_2_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_2) 4 j = k9t4p9_local_2_required_2 4 j := by decide + +private theorem k9t4p9_local_2_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_2) 5 j = k9t4p9_local_2_required_2 5 j := by decide + +private theorem k9t4p9_local_2_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_2) 6 j = k9t4p9_local_2_required_2 6 j := by decide + +private theorem k9t4p9_local_2_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_2) 7 j = k9t4p9_local_2_required_2 7 j := by decide + +private theorem k9t4p9_local_2_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_2) 8 j = k9t4p9_local_2_required_2 8 j := by decide + +private theorem k9t4p9_local_2_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_2) 9 j = k9t4p9_local_2_required_2 9 j := by decide + +private theorem k9t4p9_local_2_required_2_eq : (requiredMatrix 9 k9t4p9_step_2_required_block_2) = k9t4p9_local_2_required_2 := by + funext i j + fin_cases i + + · exact k9t4p9_local_2_required_2_eq_row_0 j + + · exact k9t4p9_local_2_required_2_eq_row_1 j + + · exact k9t4p9_local_2_required_2_eq_row_2 j + + · exact k9t4p9_local_2_required_2_eq_row_3 j + + · exact k9t4p9_local_2_required_2_eq_row_4 j + + · exact k9t4p9_local_2_required_2_eq_row_5 j + + · exact k9t4p9_local_2_required_2_eq_row_6 j + + · exact k9t4p9_local_2_required_2_eq_row_7 j + + · exact k9t4p9_local_2_required_2_eq_row_8 j + + · exact k9t4p9_local_2_required_2_eq_row_9 j + +private theorem k9t4p9_local_2_path_2_0 : (⟨5, 7, [6, 0, 1, 2, 3, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_2_1 : (⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_2_2 : (⟨0, 6, [1, 2, 3, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_2_3 : (⟨0, 5, [1, 2, 3, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_2_4 : (⟨0, 9, [1, 2, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_2_5 : (⟨0, 5, [1, 2, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_2_6 : (⟨0, 4, [1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_2_7 : (⟨0, 3, [1, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_2_8 : (⟨0, 7, [1, 9, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_2_9 : (⟨0, 8, [1, 9, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_2_10 : (⟨0, 3, [1, 9, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_2_11 : (⟨0, 8, [1, 9, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_paths_block_2 : ∀ p ∈ k9t4p9_step_2_required_block_2, p.Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by + simp only [k9t4p9_step_2_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_2_path_2_0, k9t4p9_local_2_path_2_1, k9t4p9_local_2_path_2_2, k9t4p9_local_2_path_2_3, k9t4p9_local_2_path_2_4, k9t4p9_local_2_path_2_5, k9t4p9_local_2_path_2_6, k9t4p9_local_2_path_2_7, k9t4p9_local_2_path_2_8, k9t4p9_local_2_path_2_9, k9t4p9_local_2_path_2_10, k9t4p9_local_2_path_2_11⟩ + +private def k9t4p9_local_2_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 1 5, {0, 1}, Finset.Icc 0 3, ∅, ∅, ∅, {0}, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_2_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_3) 0 j = k9t4p9_local_2_required_3 0 j := by decide + +private theorem k9t4p9_local_2_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_3) 1 j = k9t4p9_local_2_required_3 1 j := by decide + +private theorem k9t4p9_local_2_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_3) 2 j = k9t4p9_local_2_required_3 2 j := by decide + +private theorem k9t4p9_local_2_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_3) 3 j = k9t4p9_local_2_required_3 3 j := by decide + +private theorem k9t4p9_local_2_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_3) 4 j = k9t4p9_local_2_required_3 4 j := by decide + +private theorem k9t4p9_local_2_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_3) 5 j = k9t4p9_local_2_required_3 5 j := by decide + +private theorem k9t4p9_local_2_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_3) 6 j = k9t4p9_local_2_required_3 6 j := by decide + +private theorem k9t4p9_local_2_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_3) 7 j = k9t4p9_local_2_required_3 7 j := by decide + +private theorem k9t4p9_local_2_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_3) 8 j = k9t4p9_local_2_required_3 8 j := by decide + +private theorem k9t4p9_local_2_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_2_required_block_3) 9 j = k9t4p9_local_2_required_3 9 j := by decide + +private theorem k9t4p9_local_2_required_3_eq : (requiredMatrix 9 k9t4p9_step_2_required_block_3) = k9t4p9_local_2_required_3 := by + funext i j + fin_cases i + + · exact k9t4p9_local_2_required_3_eq_row_0 j + + · exact k9t4p9_local_2_required_3_eq_row_1 j + + · exact k9t4p9_local_2_required_3_eq_row_2 j + + · exact k9t4p9_local_2_required_3_eq_row_3 j + + · exact k9t4p9_local_2_required_3_eq_row_4 j + + · exact k9t4p9_local_2_required_3_eq_row_5 j + + · exact k9t4p9_local_2_required_3_eq_row_6 j + + · exact k9t4p9_local_2_required_3_eq_row_7 j + + · exact k9t4p9_local_2_required_3_eq_row_8 j + + · exact k9t4p9_local_2_required_3_eq_row_9 j + +private theorem k9t4p9_local_2_path_3_0 : (⟨0, 2, [1, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_3_1 : (⟨0, 3, [1, 9, 8, 7, 6, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_3_2 : (⟨0, 3, [1, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_3_3 : (⟨0, 2, [1, 9, 8, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_3_4 : (⟨0, 1, [6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_3_5 : (⟨0, 3, [6, 5, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_3_6 : (⟨0, 3, [6, 5, 4, 1, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_3_7 : (⟨0, 1, [6, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_3_8 : (⟨0, 1, [6, 5, 4, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_3_9 : (⟨0, 7, [6, 5, 4, 3, 2, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_3_10 : (⟨0, 1, [6, 5, 4, 3, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_path_3_11 : (⟨0, 1, [6, 7, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by decide + +private theorem k9t4p9_local_2_paths_block_3 : ∀ p ∈ k9t4p9_step_2_required_block_3, p.Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by + simp only [k9t4p9_step_2_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_2_path_3_0, k9t4p9_local_2_path_3_1, k9t4p9_local_2_path_3_2, k9t4p9_local_2_path_3_3, k9t4p9_local_2_path_3_4, k9t4p9_local_2_path_3_5, k9t4p9_local_2_path_3_6, k9t4p9_local_2_path_3_7, k9t4p9_local_2_path_3_8, k9t4p9_local_2_path_3_9, k9t4p9_local_2_path_3_10, k9t4p9_local_2_path_3_11⟩ + +private theorem k9t4p9_local_2_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_2 a b ∪ ((((k9t4p9_local_2_required_0 a b ∪ k9t4p9_local_2_required_1 a b) ∪ k9t4p9_local_2_required_2 a b) ∪ k9t4p9_local_2_required_3 a b))) 0 j = k9t4p9_local_2 0 j := by decide + +private theorem k9t4p9_local_2_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_2 a b ∪ ((((k9t4p9_local_2_required_0 a b ∪ k9t4p9_local_2_required_1 a b) ∪ k9t4p9_local_2_required_2 a b) ∪ k9t4p9_local_2_required_3 a b))) 1 j = k9t4p9_local_2 1 j := by decide + +private theorem k9t4p9_local_2_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_2 a b ∪ ((((k9t4p9_local_2_required_0 a b ∪ k9t4p9_local_2_required_1 a b) ∪ k9t4p9_local_2_required_2 a b) ∪ k9t4p9_local_2_required_3 a b))) 2 j = k9t4p9_local_2 2 j := by decide + +private theorem k9t4p9_local_2_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_2 a b ∪ ((((k9t4p9_local_2_required_0 a b ∪ k9t4p9_local_2_required_1 a b) ∪ k9t4p9_local_2_required_2 a b) ∪ k9t4p9_local_2_required_3 a b))) 3 j = k9t4p9_local_2 3 j := by decide + +private theorem k9t4p9_local_2_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_2 a b ∪ ((((k9t4p9_local_2_required_0 a b ∪ k9t4p9_local_2_required_1 a b) ∪ k9t4p9_local_2_required_2 a b) ∪ k9t4p9_local_2_required_3 a b))) 4 j = k9t4p9_local_2 4 j := by decide + +private theorem k9t4p9_local_2_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_2 a b ∪ ((((k9t4p9_local_2_required_0 a b ∪ k9t4p9_local_2_required_1 a b) ∪ k9t4p9_local_2_required_2 a b) ∪ k9t4p9_local_2_required_3 a b))) 5 j = k9t4p9_local_2 5 j := by decide + +private theorem k9t4p9_local_2_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_2 a b ∪ ((((k9t4p9_local_2_required_0 a b ∪ k9t4p9_local_2_required_1 a b) ∪ k9t4p9_local_2_required_2 a b) ∪ k9t4p9_local_2_required_3 a b))) 6 j = k9t4p9_local_2 6 j := by decide + +private theorem k9t4p9_local_2_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_2 a b ∪ ((((k9t4p9_local_2_required_0 a b ∪ k9t4p9_local_2_required_1 a b) ∪ k9t4p9_local_2_required_2 a b) ∪ k9t4p9_local_2_required_3 a b))) 7 j = k9t4p9_local_2 7 j := by decide + +private theorem k9t4p9_local_2_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_2 a b ∪ ((((k9t4p9_local_2_required_0 a b ∪ k9t4p9_local_2_required_1 a b) ∪ k9t4p9_local_2_required_2 a b) ∪ k9t4p9_local_2_required_3 a b))) 8 j = k9t4p9_local_2 8 j := by decide + +private theorem k9t4p9_local_2_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_2 a b ∪ ((((k9t4p9_local_2_required_0 a b ∪ k9t4p9_local_2_required_1 a b) ∪ k9t4p9_local_2_required_2 a b) ∪ k9t4p9_local_2_required_3 a b))) 9 j = k9t4p9_local_2 9 j := by decide + +private theorem k9t4p9_local_2_merged_eq : (fun a b => freshMatrix k9t4p9_state_2 a b ∪ ((((k9t4p9_local_2_required_0 a b ∪ k9t4p9_local_2_required_1 a b) ∪ k9t4p9_local_2_required_2 a b) ∪ k9t4p9_local_2_required_3 a b))) = k9t4p9_local_2 := by + funext i j + fin_cases i + + · exact k9t4p9_local_2_merged_eq_row_0 j + + · exact k9t4p9_local_2_merged_eq_row_1 j + + · exact k9t4p9_local_2_merged_eq_row_2 j + + · exact k9t4p9_local_2_merged_eq_row_3 j + + · exact k9t4p9_local_2_merged_eq_row_4 j + + · exact k9t4p9_local_2_merged_eq_row_5 j + + · exact k9t4p9_local_2_merged_eq_row_6 j + + · exact k9t4p9_local_2_merged_eq_row_7 j + + · exact k9t4p9_local_2_merged_eq_row_8 j + + · exact k9t4p9_local_2_merged_eq_row_9 j + +private theorem k9t4p9_local_2_eq : (fun a b => freshMatrix k9t4p9_state_2 a b ∪ requiredMatrix 9 k9t4p9_step_2_data.required a b) = k9t4p9_local_2 := by + funext a b + change freshMatrix k9t4p9_state_2 a b ∪ requiredMatrix 9 (k9t4p9_step_2_required_block_0 ++ k9t4p9_step_2_required_block_1 ++ k9t4p9_step_2_required_block_2 ++ k9t4p9_step_2_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p9_local_2_required_0_eq, k9t4p9_local_2_required_1_eq, k9t4p9_local_2_required_2_eq, k9t4p9_local_2_required_3_eq] + exact congrFun (congrFun k9t4p9_local_2_merged_eq a) b + +private theorem k9t4p9_local_2_paths : ∀ p ∈ k9t4p9_step_2_data.required, p.Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 := by + change ∀ p ∈ (k9t4p9_step_2_required_block_0 ++ k9t4p9_step_2_required_block_1 ++ k9t4p9_step_2_required_block_2 ++ k9t4p9_step_2_required_block_3), p.Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p9_local_2_paths_block_0, k9t4p9_local_2_paths_block_1⟩, k9t4p9_local_2_paths_block_2⟩, k9t4p9_local_2_paths_block_3⟩ + +private theorem k9t4p9_local_2_bad : k9t4p9_step_2_data.bad.Check (freshGraph k9t4p9.graph k9t4p9_step_2_data.i k9t4p9_step_2_data.j) k9t4p9_local_2 9 4 := by decide + +private theorem k9t4p9_step_2_check : k9t4p9_step_2.Check k9t4p9.graph k9t4p9_state_2 9 4 := by + change k9t4p9_step_2_data.Check k9t4p9.graph k9t4p9_state_2 9 4 + refine ⟨by decide, k9t4p9_local_2_paths, ?_⟩ + rw [k9t4p9_local_2_eq] + exact k9t4p9_local_2_bad + +private theorem k9t4p9_update_2 : k9t4p9_step_2.apply k9t4p9_state_2 = k9t4p9_state_3 := by + have h : ∀ i j : Fin 9, k9t4p9_step_2.apply k9t4p9_state_2 i j = k9t4p9_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_4 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_3_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p9_state_3 a b ∪ requiredMatrix 9 k9t4p9_step_3_data.required a b) 0 j = k9t4p9_local_3 0 j := by decide + +private theorem k9t4p9_local_3_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p9_state_3 a b ∪ requiredMatrix 9 k9t4p9_step_3_data.required a b) 1 j = k9t4p9_local_3 1 j := by decide + +private theorem k9t4p9_local_3_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p9_state_3 a b ∪ requiredMatrix 9 k9t4p9_step_3_data.required a b) 2 j = k9t4p9_local_3 2 j := by decide + +private theorem k9t4p9_local_3_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p9_state_3 a b ∪ requiredMatrix 9 k9t4p9_step_3_data.required a b) 3 j = k9t4p9_local_3 3 j := by decide + +private theorem k9t4p9_local_3_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p9_state_3 a b ∪ requiredMatrix 9 k9t4p9_step_3_data.required a b) 4 j = k9t4p9_local_3 4 j := by decide + +private theorem k9t4p9_local_3_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p9_state_3 a b ∪ requiredMatrix 9 k9t4p9_step_3_data.required a b) 5 j = k9t4p9_local_3 5 j := by decide + +private theorem k9t4p9_local_3_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p9_state_3 a b ∪ requiredMatrix 9 k9t4p9_step_3_data.required a b) 6 j = k9t4p9_local_3 6 j := by decide + +private theorem k9t4p9_local_3_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p9_state_3 a b ∪ requiredMatrix 9 k9t4p9_step_3_data.required a b) 7 j = k9t4p9_local_3 7 j := by decide + +private theorem k9t4p9_local_3_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p9_state_3 a b ∪ requiredMatrix 9 k9t4p9_step_3_data.required a b) 8 j = k9t4p9_local_3 8 j := by decide + +private theorem k9t4p9_local_3_eq : (fun a b => k9t4p9_state_3 a b ∪ requiredMatrix 9 k9t4p9_step_3_data.required a b) = k9t4p9_local_3 := by + funext i j + fin_cases i + + · exact k9t4p9_local_3_eq_row_0 j + + · exact k9t4p9_local_3_eq_row_1 j + + · exact k9t4p9_local_3_eq_row_2 j + + · exact k9t4p9_local_3_eq_row_3 j + + · exact k9t4p9_local_3_eq_row_4 j + + · exact k9t4p9_local_3_eq_row_5 j + + · exact k9t4p9_local_3_eq_row_6 j + + · exact k9t4p9_local_3_eq_row_7 j + + · exact k9t4p9_local_3_eq_row_8 j + +private theorem k9t4p9_local_3_paths : ∀ p ∈ k9t4p9_step_3_data.required, p.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_3_data.i k9t4p9_step_3_data.j) 9 := by decide + +private theorem k9t4p9_local_3_bad : k9t4p9_step_3_data.bad.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_3_data.i k9t4p9_step_3_data.j) k9t4p9_local_3 9 4 := by decide + +private theorem k9t4p9_step_3_check : k9t4p9_step_3.Check k9t4p9.graph k9t4p9_state_3 9 4 := by + change k9t4p9_step_3_data.Check k9t4p9.graph k9t4p9_state_3 9 4 + refine ⟨k9t4p9_local_3_paths, ?_⟩ + rw [k9t4p9_local_3_eq] + exact k9t4p9_local_3_bad + +private theorem k9t4p9_update_3 : k9t4p9_step_3.apply k9t4p9_state_3 = k9t4p9_state_4 := by + have h : ∀ i j : Fin 9, k9t4p9_step_3.apply k9t4p9_state_3 i j = k9t4p9_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_5 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 5, {1}, {0, 1}, {1}, Finset.Icc 0 4, {1}, Finset.Icc 0 5, {1}, {1}], + #[Finset.Icc 0 5, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, {0, 2, 3, 4, 5}, Finset.Icc 1 5, Finset.Icc 1 7, {2, 3}], + #[{0, 1}, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1}, {1, 2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {1, 2}, ∅, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5, 6}, {1, 4, 5, 6, 7}], + #[{1}, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 0 5, {1, 2}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[{1}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1}, {1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, {1, 4, 5, 6, 7}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_4_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, ∅, {1, 2, 4}, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, {1}, {0}, ∅, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, {1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 4}, {0}, ∅, {0}, ∅, ∅, ∅, ∅, {1}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_4_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_0) 0 j = k9t4p9_local_4_required_0 0 j := by decide + +private theorem k9t4p9_local_4_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_0) 1 j = k9t4p9_local_4_required_0 1 j := by decide + +private theorem k9t4p9_local_4_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_0) 2 j = k9t4p9_local_4_required_0 2 j := by decide + +private theorem k9t4p9_local_4_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_0) 3 j = k9t4p9_local_4_required_0 3 j := by decide + +private theorem k9t4p9_local_4_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_0) 4 j = k9t4p9_local_4_required_0 4 j := by decide + +private theorem k9t4p9_local_4_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_0) 5 j = k9t4p9_local_4_required_0 5 j := by decide + +private theorem k9t4p9_local_4_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_0) 6 j = k9t4p9_local_4_required_0 6 j := by decide + +private theorem k9t4p9_local_4_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_0) 7 j = k9t4p9_local_4_required_0 7 j := by decide + +private theorem k9t4p9_local_4_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_0) 8 j = k9t4p9_local_4_required_0 8 j := by decide + +private theorem k9t4p9_local_4_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_0) 9 j = k9t4p9_local_4_required_0 9 j := by decide + +private theorem k9t4p9_local_4_required_0_eq : (requiredMatrix 9 k9t4p9_step_4_required_block_0) = k9t4p9_local_4_required_0 := by + funext i j + fin_cases i + + · exact k9t4p9_local_4_required_0_eq_row_0 j + + · exact k9t4p9_local_4_required_0_eq_row_1 j + + · exact k9t4p9_local_4_required_0_eq_row_2 j + + · exact k9t4p9_local_4_required_0_eq_row_3 j + + · exact k9t4p9_local_4_required_0_eq_row_4 j + + · exact k9t4p9_local_4_required_0_eq_row_5 j + + · exact k9t4p9_local_4_required_0_eq_row_6 j + + · exact k9t4p9_local_4_required_0_eq_row_7 j + + · exact k9t4p9_local_4_required_0_eq_row_8 j + + · exact k9t4p9_local_4_required_0_eq_row_9 j + +private theorem k9t4p9_local_4_path_0_0 : (⟨1, 7, [2, 0, 6, 5, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_0_1 : (⟨1, 0, [9, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_0_2 : (⟨1, 0, [9, 8, 7, 6, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_0_3 : (⟨1, 0, [9, 8, 7, 6, 5, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_0_4 : (⟨1, 4, [9, 8, 7, 6, 0, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_0_5 : (⟨1, 5, [9, 8, 7, 6, 0, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_0_6 : (⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_0_7 : (⟨5, 9, [4, 1, 2, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_0_8 : (⟨5, 0, [4, 1, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_0_9 : (⟨5, 8, [4, 1, 9, 2, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_0_10 : (⟨5, 0, [4, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_0_11 : (⟨5, 3, [4, 1, 9, 8, 7, 6, 0, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_paths_block_0 : ∀ p ∈ k9t4p9_step_4_required_block_0, p.Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by + simp only [k9t4p9_step_4_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_4_path_0_0, k9t4p9_local_4_path_0_1, k9t4p9_local_4_path_0_2, k9t4p9_local_4_path_0_3, k9t4p9_local_4_path_0_4, k9t4p9_local_4_path_0_5, k9t4p9_local_4_path_0_6, k9t4p9_local_4_path_0_7, k9t4p9_local_4_path_0_8, k9t4p9_local_4_path_0_9, k9t4p9_local_4_path_0_10, k9t4p9_local_4_path_0_11⟩ + +private def k9t4p9_local_4_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, {0, 3}, ∅, {0, 1, 2}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[{0, 3}, {0}, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, {0}, {1}, {0, 1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_4_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_1) 0 j = k9t4p9_local_4_required_1 0 j := by decide + +private theorem k9t4p9_local_4_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_1) 1 j = k9t4p9_local_4_required_1 1 j := by decide + +private theorem k9t4p9_local_4_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_1) 2 j = k9t4p9_local_4_required_1 2 j := by decide + +private theorem k9t4p9_local_4_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_1) 3 j = k9t4p9_local_4_required_1 3 j := by decide + +private theorem k9t4p9_local_4_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_1) 4 j = k9t4p9_local_4_required_1 4 j := by decide + +private theorem k9t4p9_local_4_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_1) 5 j = k9t4p9_local_4_required_1 5 j := by decide + +private theorem k9t4p9_local_4_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_1) 6 j = k9t4p9_local_4_required_1 6 j := by decide + +private theorem k9t4p9_local_4_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_1) 7 j = k9t4p9_local_4_required_1 7 j := by decide + +private theorem k9t4p9_local_4_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_1) 8 j = k9t4p9_local_4_required_1 8 j := by decide + +private theorem k9t4p9_local_4_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_1) 9 j = k9t4p9_local_4_required_1 9 j := by decide + +private theorem k9t4p9_local_4_required_1_eq : (requiredMatrix 9 k9t4p9_step_4_required_block_1) = k9t4p9_local_4_required_1 := by + funext i j + fin_cases i + + · exact k9t4p9_local_4_required_1_eq_row_0 j + + · exact k9t4p9_local_4_required_1_eq_row_1 j + + · exact k9t4p9_local_4_required_1_eq_row_2 j + + · exact k9t4p9_local_4_required_1_eq_row_3 j + + · exact k9t4p9_local_4_required_1_eq_row_4 j + + · exact k9t4p9_local_4_required_1_eq_row_5 j + + · exact k9t4p9_local_4_required_1_eq_row_6 j + + · exact k9t4p9_local_4_required_1_eq_row_7 j + + · exact k9t4p9_local_4_required_1_eq_row_8 j + + · exact k9t4p9_local_4_required_1_eq_row_9 j + +private theorem k9t4p9_local_4_path_1_0 : (⟨5, 0, [4, 3, 2, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_1_1 : (⟨5, 1, [4, 3, 2, 0, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_1_2 : (⟨5, 0, [4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_1_3 : (⟨5, 7, [6, 0, 2, 1, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_1_4 : (⟨5, 7, [6, 0, 2, 3, 4, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_1_5 : (⟨7, 0, [6, 5, 4, 1, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_1_6 : (⟨7, 0, [8, 9, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_1_7 : (⟨7, 0, [8, 9, 1, 2, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_1_8 : (⟨7, 4, [8, 9, 1, 2, 0, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_1_9 : (⟨7, 3, [8, 9, 1, 2, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_1_10 : (⟨7, 5, [8, 9, 1, 4, 2, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_1_11 : (⟨7, 5, [8, 9, 1, 4, 3, 2, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_paths_block_1 : ∀ p ∈ k9t4p9_step_4_required_block_1, p.Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by + simp only [k9t4p9_step_4_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_4_path_1_0, k9t4p9_local_4_path_1_1, k9t4p9_local_4_path_1_2, k9t4p9_local_4_path_1_3, k9t4p9_local_4_path_1_4, k9t4p9_local_4_path_1_5, k9t4p9_local_4_path_1_6, k9t4p9_local_4_path_1_7, k9t4p9_local_4_path_1_8, k9t4p9_local_4_path_1_9, k9t4p9_local_4_path_1_10, k9t4p9_local_4_path_1_11⟩ + +private def k9t4p9_local_4_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {5}, ∅, {0}, {1}, {1}, ∅, {2, 3, 4}, {1}, {1}], + #[{5}, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, {2}, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 3, 4}, {1}, {1}, ∅, {2}, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_4_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_2) 0 j = k9t4p9_local_4_required_2 0 j := by decide + +private theorem k9t4p9_local_4_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_2) 1 j = k9t4p9_local_4_required_2 1 j := by decide + +private theorem k9t4p9_local_4_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_2) 2 j = k9t4p9_local_4_required_2 2 j := by decide + +private theorem k9t4p9_local_4_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_2) 3 j = k9t4p9_local_4_required_2 3 j := by decide + +private theorem k9t4p9_local_4_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_2) 4 j = k9t4p9_local_4_required_2 4 j := by decide + +private theorem k9t4p9_local_4_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_2) 5 j = k9t4p9_local_4_required_2 5 j := by decide + +private theorem k9t4p9_local_4_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_2) 6 j = k9t4p9_local_4_required_2 6 j := by decide + +private theorem k9t4p9_local_4_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_2) 7 j = k9t4p9_local_4_required_2 7 j := by decide + +private theorem k9t4p9_local_4_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_2) 8 j = k9t4p9_local_4_required_2 8 j := by decide + +private theorem k9t4p9_local_4_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_2) 9 j = k9t4p9_local_4_required_2 9 j := by decide + +private theorem k9t4p9_local_4_required_2_eq : (requiredMatrix 9 k9t4p9_step_4_required_block_2) = k9t4p9_local_4_required_2 := by + funext i j + fin_cases i + + · exact k9t4p9_local_4_required_2_eq_row_0 j + + · exact k9t4p9_local_4_required_2_eq_row_1 j + + · exact k9t4p9_local_4_required_2_eq_row_2 j + + · exact k9t4p9_local_4_required_2_eq_row_3 j + + · exact k9t4p9_local_4_required_2_eq_row_4 j + + · exact k9t4p9_local_4_required_2_eq_row_5 j + + · exact k9t4p9_local_4_required_2_eq_row_6 j + + · exact k9t4p9_local_4_required_2_eq_row_7 j + + · exact k9t4p9_local_4_required_2_eq_row_8 j + + · exact k9t4p9_local_4_required_2_eq_row_9 j + +private theorem k9t4p9_local_4_path_2_0 : (⟨7, 2, [8, 9, 1, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_2_1 : (⟨7, 4, [8, 9, 2, 0, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_2_2 : (⟨7, 1, [8, 9, 2, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_2_3 : (⟨0, 7, [2, 1, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_2_4 : (⟨0, 9, [2, 1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_2_5 : (⟨0, 5, [2, 1, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_2_6 : (⟨0, 7, [2, 1, 9, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_2_7 : (⟨0, 8, [2, 1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_2_8 : (⟨0, 7, [2, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_2_9 : (⟨0, 4, [2, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_2_10 : (⟨0, 3, [2, 1, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_2_11 : (⟨0, 1, [2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_paths_block_2 : ∀ p ∈ k9t4p9_step_4_required_block_2, p.Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by + simp only [k9t4p9_step_4_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_4_path_2_0, k9t4p9_local_4_path_2_1, k9t4p9_local_4_path_2_2, k9t4p9_local_4_path_2_3, k9t4p9_local_4_path_2_4, k9t4p9_local_4_path_2_5, k9t4p9_local_4_path_2_6, k9t4p9_local_4_path_2_7, k9t4p9_local_4_path_2_8, k9t4p9_local_4_path_2_9, k9t4p9_local_4_path_2_10, k9t4p9_local_4_path_2_11⟩ + +private def k9t4p9_local_4_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {1}, {1}, ∅, {0}, {1}, {0, 1, 5}, ∅, ∅], + #[Finset.Icc 0 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_4_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_3) 0 j = k9t4p9_local_4_required_3 0 j := by decide + +private theorem k9t4p9_local_4_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_3) 1 j = k9t4p9_local_4_required_3 1 j := by decide + +private theorem k9t4p9_local_4_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_3) 2 j = k9t4p9_local_4_required_3 2 j := by decide + +private theorem k9t4p9_local_4_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_3) 3 j = k9t4p9_local_4_required_3 3 j := by decide + +private theorem k9t4p9_local_4_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_3) 4 j = k9t4p9_local_4_required_3 4 j := by decide + +private theorem k9t4p9_local_4_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_3) 5 j = k9t4p9_local_4_required_3 5 j := by decide + +private theorem k9t4p9_local_4_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_3) 6 j = k9t4p9_local_4_required_3 6 j := by decide + +private theorem k9t4p9_local_4_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_3) 7 j = k9t4p9_local_4_required_3 7 j := by decide + +private theorem k9t4p9_local_4_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_3) 8 j = k9t4p9_local_4_required_3 8 j := by decide + +private theorem k9t4p9_local_4_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_4_required_block_3) 9 j = k9t4p9_local_4_required_3 9 j := by decide + +private theorem k9t4p9_local_4_required_3_eq : (requiredMatrix 9 k9t4p9_step_4_required_block_3) = k9t4p9_local_4_required_3 := by + funext i j + fin_cases i + + · exact k9t4p9_local_4_required_3_eq_row_0 j + + · exact k9t4p9_local_4_required_3_eq_row_1 j + + · exact k9t4p9_local_4_required_3_eq_row_2 j + + · exact k9t4p9_local_4_required_3_eq_row_3 j + + · exact k9t4p9_local_4_required_3_eq_row_4 j + + · exact k9t4p9_local_4_required_3_eq_row_5 j + + · exact k9t4p9_local_4_required_3_eq_row_6 j + + · exact k9t4p9_local_4_required_3_eq_row_7 j + + · exact k9t4p9_local_4_required_3_eq_row_8 j + + · exact k9t4p9_local_4_required_3_eq_row_9 j + +private theorem k9t4p9_local_4_path_3_0 : (⟨0, 6, [2, 3, 4, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_3_1 : (⟨0, 5, [2, 3, 4, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_3_2 : (⟨0, 1, [2, 3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_3_3 : (⟨0, 1, [2, 3, 4, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_3_4 : (⟨0, 1, [2, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_3_5 : (⟨0, 7, [2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_3_6 : (⟨0, 3, [2, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_3_7 : (⟨0, 7, [6, 5, 4, 1, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_3_8 : (⟨0, 1, [6, 5, 4, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_3_9 : (⟨0, 7, [6, 5, 4, 3, 2, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_3_10 : (⟨0, 1, [6, 5, 4, 3, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_path_3_11 : (⟨0, 2, [6, 7, 8, 9, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by decide + +private theorem k9t4p9_local_4_paths_block_3 : ∀ p ∈ k9t4p9_step_4_required_block_3, p.Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by + simp only [k9t4p9_step_4_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_4_path_3_0, k9t4p9_local_4_path_3_1, k9t4p9_local_4_path_3_2, k9t4p9_local_4_path_3_3, k9t4p9_local_4_path_3_4, k9t4p9_local_4_path_3_5, k9t4p9_local_4_path_3_6, k9t4p9_local_4_path_3_7, k9t4p9_local_4_path_3_8, k9t4p9_local_4_path_3_9, k9t4p9_local_4_path_3_10, k9t4p9_local_4_path_3_11⟩ + +private theorem k9t4p9_local_4_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_4 a b ∪ ((((k9t4p9_local_4_required_0 a b ∪ k9t4p9_local_4_required_1 a b) ∪ k9t4p9_local_4_required_2 a b) ∪ k9t4p9_local_4_required_3 a b))) 0 j = k9t4p9_local_4 0 j := by decide + +private theorem k9t4p9_local_4_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_4 a b ∪ ((((k9t4p9_local_4_required_0 a b ∪ k9t4p9_local_4_required_1 a b) ∪ k9t4p9_local_4_required_2 a b) ∪ k9t4p9_local_4_required_3 a b))) 1 j = k9t4p9_local_4 1 j := by decide + +private theorem k9t4p9_local_4_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_4 a b ∪ ((((k9t4p9_local_4_required_0 a b ∪ k9t4p9_local_4_required_1 a b) ∪ k9t4p9_local_4_required_2 a b) ∪ k9t4p9_local_4_required_3 a b))) 2 j = k9t4p9_local_4 2 j := by decide + +private theorem k9t4p9_local_4_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_4 a b ∪ ((((k9t4p9_local_4_required_0 a b ∪ k9t4p9_local_4_required_1 a b) ∪ k9t4p9_local_4_required_2 a b) ∪ k9t4p9_local_4_required_3 a b))) 3 j = k9t4p9_local_4 3 j := by decide + +private theorem k9t4p9_local_4_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_4 a b ∪ ((((k9t4p9_local_4_required_0 a b ∪ k9t4p9_local_4_required_1 a b) ∪ k9t4p9_local_4_required_2 a b) ∪ k9t4p9_local_4_required_3 a b))) 4 j = k9t4p9_local_4 4 j := by decide + +private theorem k9t4p9_local_4_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_4 a b ∪ ((((k9t4p9_local_4_required_0 a b ∪ k9t4p9_local_4_required_1 a b) ∪ k9t4p9_local_4_required_2 a b) ∪ k9t4p9_local_4_required_3 a b))) 5 j = k9t4p9_local_4 5 j := by decide + +private theorem k9t4p9_local_4_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_4 a b ∪ ((((k9t4p9_local_4_required_0 a b ∪ k9t4p9_local_4_required_1 a b) ∪ k9t4p9_local_4_required_2 a b) ∪ k9t4p9_local_4_required_3 a b))) 6 j = k9t4p9_local_4 6 j := by decide + +private theorem k9t4p9_local_4_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_4 a b ∪ ((((k9t4p9_local_4_required_0 a b ∪ k9t4p9_local_4_required_1 a b) ∪ k9t4p9_local_4_required_2 a b) ∪ k9t4p9_local_4_required_3 a b))) 7 j = k9t4p9_local_4 7 j := by decide + +private theorem k9t4p9_local_4_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_4 a b ∪ ((((k9t4p9_local_4_required_0 a b ∪ k9t4p9_local_4_required_1 a b) ∪ k9t4p9_local_4_required_2 a b) ∪ k9t4p9_local_4_required_3 a b))) 8 j = k9t4p9_local_4 8 j := by decide + +private theorem k9t4p9_local_4_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_4 a b ∪ ((((k9t4p9_local_4_required_0 a b ∪ k9t4p9_local_4_required_1 a b) ∪ k9t4p9_local_4_required_2 a b) ∪ k9t4p9_local_4_required_3 a b))) 9 j = k9t4p9_local_4 9 j := by decide + +private theorem k9t4p9_local_4_merged_eq : (fun a b => freshMatrix k9t4p9_state_4 a b ∪ ((((k9t4p9_local_4_required_0 a b ∪ k9t4p9_local_4_required_1 a b) ∪ k9t4p9_local_4_required_2 a b) ∪ k9t4p9_local_4_required_3 a b))) = k9t4p9_local_4 := by + funext i j + fin_cases i + + · exact k9t4p9_local_4_merged_eq_row_0 j + + · exact k9t4p9_local_4_merged_eq_row_1 j + + · exact k9t4p9_local_4_merged_eq_row_2 j + + · exact k9t4p9_local_4_merged_eq_row_3 j + + · exact k9t4p9_local_4_merged_eq_row_4 j + + · exact k9t4p9_local_4_merged_eq_row_5 j + + · exact k9t4p9_local_4_merged_eq_row_6 j + + · exact k9t4p9_local_4_merged_eq_row_7 j + + · exact k9t4p9_local_4_merged_eq_row_8 j + + · exact k9t4p9_local_4_merged_eq_row_9 j + +private theorem k9t4p9_local_4_eq : (fun a b => freshMatrix k9t4p9_state_4 a b ∪ requiredMatrix 9 k9t4p9_step_4_data.required a b) = k9t4p9_local_4 := by + funext a b + change freshMatrix k9t4p9_state_4 a b ∪ requiredMatrix 9 (k9t4p9_step_4_required_block_0 ++ k9t4p9_step_4_required_block_1 ++ k9t4p9_step_4_required_block_2 ++ k9t4p9_step_4_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p9_local_4_required_0_eq, k9t4p9_local_4_required_1_eq, k9t4p9_local_4_required_2_eq, k9t4p9_local_4_required_3_eq] + exact congrFun (congrFun k9t4p9_local_4_merged_eq a) b + +private theorem k9t4p9_local_4_paths : ∀ p ∈ k9t4p9_step_4_data.required, p.Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 := by + change ∀ p ∈ (k9t4p9_step_4_required_block_0 ++ k9t4p9_step_4_required_block_1 ++ k9t4p9_step_4_required_block_2 ++ k9t4p9_step_4_required_block_3), p.Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p9_local_4_paths_block_0, k9t4p9_local_4_paths_block_1⟩, k9t4p9_local_4_paths_block_2⟩, k9t4p9_local_4_paths_block_3⟩ + +private theorem k9t4p9_local_4_bad : k9t4p9_step_4_data.bad.Check (freshGraph k9t4p9.graph k9t4p9_step_4_data.i k9t4p9_step_4_data.j) k9t4p9_local_4 9 4 := by decide + +private theorem k9t4p9_step_4_check : k9t4p9_step_4.Check k9t4p9.graph k9t4p9_state_4 9 4 := by + change k9t4p9_step_4_data.Check k9t4p9.graph k9t4p9_state_4 9 4 + refine ⟨by decide, k9t4p9_local_4_paths, ?_⟩ + rw [k9t4p9_local_4_eq] + exact k9t4p9_local_4_bad + +private theorem k9t4p9_update_4 : k9t4p9_step_4.apply k9t4p9_state_4 = k9t4p9_state_5 := by + have h : ∀ i j : Fin 9, k9t4p9_step_4.apply k9t4p9_state_4 i j = k9t4p9_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_6 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_5 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_5_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p9_state_5 a b ∪ requiredMatrix 9 k9t4p9_step_5_data.required a b) 0 j = k9t4p9_local_5 0 j := by decide + +private theorem k9t4p9_local_5_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p9_state_5 a b ∪ requiredMatrix 9 k9t4p9_step_5_data.required a b) 1 j = k9t4p9_local_5 1 j := by decide + +private theorem k9t4p9_local_5_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p9_state_5 a b ∪ requiredMatrix 9 k9t4p9_step_5_data.required a b) 2 j = k9t4p9_local_5 2 j := by decide + +private theorem k9t4p9_local_5_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p9_state_5 a b ∪ requiredMatrix 9 k9t4p9_step_5_data.required a b) 3 j = k9t4p9_local_5 3 j := by decide + +private theorem k9t4p9_local_5_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p9_state_5 a b ∪ requiredMatrix 9 k9t4p9_step_5_data.required a b) 4 j = k9t4p9_local_5 4 j := by decide + +private theorem k9t4p9_local_5_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p9_state_5 a b ∪ requiredMatrix 9 k9t4p9_step_5_data.required a b) 5 j = k9t4p9_local_5 5 j := by decide + +private theorem k9t4p9_local_5_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p9_state_5 a b ∪ requiredMatrix 9 k9t4p9_step_5_data.required a b) 6 j = k9t4p9_local_5 6 j := by decide + +private theorem k9t4p9_local_5_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p9_state_5 a b ∪ requiredMatrix 9 k9t4p9_step_5_data.required a b) 7 j = k9t4p9_local_5 7 j := by decide + +private theorem k9t4p9_local_5_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p9_state_5 a b ∪ requiredMatrix 9 k9t4p9_step_5_data.required a b) 8 j = k9t4p9_local_5 8 j := by decide + +private theorem k9t4p9_local_5_eq : (fun a b => k9t4p9_state_5 a b ∪ requiredMatrix 9 k9t4p9_step_5_data.required a b) = k9t4p9_local_5 := by + funext i j + fin_cases i + + · exact k9t4p9_local_5_eq_row_0 j + + · exact k9t4p9_local_5_eq_row_1 j + + · exact k9t4p9_local_5_eq_row_2 j + + · exact k9t4p9_local_5_eq_row_3 j + + · exact k9t4p9_local_5_eq_row_4 j + + · exact k9t4p9_local_5_eq_row_5 j + + · exact k9t4p9_local_5_eq_row_6 j + + · exact k9t4p9_local_5_eq_row_7 j + + · exact k9t4p9_local_5_eq_row_8 j + +private theorem k9t4p9_local_5_paths : ∀ p ∈ k9t4p9_step_5_data.required, p.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_5_data.i k9t4p9_step_5_data.j) 9 := by decide + +private theorem k9t4p9_local_5_bad : k9t4p9_step_5_data.bad.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_5_data.i k9t4p9_step_5_data.j) k9t4p9_local_5 9 4 := by decide + +private theorem k9t4p9_step_5_check : k9t4p9_step_5.Check k9t4p9.graph k9t4p9_state_5 9 4 := by + change k9t4p9_step_5_data.Check k9t4p9.graph k9t4p9_state_5 9 4 + refine ⟨k9t4p9_local_5_paths, ?_⟩ + rw [k9t4p9_local_5_eq] + exact k9t4p9_local_5_bad + +private theorem k9t4p9_update_5 : k9t4p9_step_5.apply k9t4p9_state_5 = k9t4p9_state_6 := by + have h : ∀ i j : Fin 9, k9t4p9_step_5.apply k9t4p9_state_5 i j = k9t4p9_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_7 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_6 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_6_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p9_state_6 a b ∪ requiredMatrix 9 k9t4p9_step_6_data.required a b) 0 j = k9t4p9_local_6 0 j := by decide + +private theorem k9t4p9_local_6_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p9_state_6 a b ∪ requiredMatrix 9 k9t4p9_step_6_data.required a b) 1 j = k9t4p9_local_6 1 j := by decide + +private theorem k9t4p9_local_6_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p9_state_6 a b ∪ requiredMatrix 9 k9t4p9_step_6_data.required a b) 2 j = k9t4p9_local_6 2 j := by decide + +private theorem k9t4p9_local_6_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p9_state_6 a b ∪ requiredMatrix 9 k9t4p9_step_6_data.required a b) 3 j = k9t4p9_local_6 3 j := by decide + +private theorem k9t4p9_local_6_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p9_state_6 a b ∪ requiredMatrix 9 k9t4p9_step_6_data.required a b) 4 j = k9t4p9_local_6 4 j := by decide + +private theorem k9t4p9_local_6_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p9_state_6 a b ∪ requiredMatrix 9 k9t4p9_step_6_data.required a b) 5 j = k9t4p9_local_6 5 j := by decide + +private theorem k9t4p9_local_6_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p9_state_6 a b ∪ requiredMatrix 9 k9t4p9_step_6_data.required a b) 6 j = k9t4p9_local_6 6 j := by decide + +private theorem k9t4p9_local_6_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p9_state_6 a b ∪ requiredMatrix 9 k9t4p9_step_6_data.required a b) 7 j = k9t4p9_local_6 7 j := by decide + +private theorem k9t4p9_local_6_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p9_state_6 a b ∪ requiredMatrix 9 k9t4p9_step_6_data.required a b) 8 j = k9t4p9_local_6 8 j := by decide + +private theorem k9t4p9_local_6_eq : (fun a b => k9t4p9_state_6 a b ∪ requiredMatrix 9 k9t4p9_step_6_data.required a b) = k9t4p9_local_6 := by + funext i j + fin_cases i + + · exact k9t4p9_local_6_eq_row_0 j + + · exact k9t4p9_local_6_eq_row_1 j + + · exact k9t4p9_local_6_eq_row_2 j + + · exact k9t4p9_local_6_eq_row_3 j + + · exact k9t4p9_local_6_eq_row_4 j + + · exact k9t4p9_local_6_eq_row_5 j + + · exact k9t4p9_local_6_eq_row_6 j + + · exact k9t4p9_local_6_eq_row_7 j + + · exact k9t4p9_local_6_eq_row_8 j + +private theorem k9t4p9_local_6_paths : ∀ p ∈ k9t4p9_step_6_data.required, p.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_6_data.i k9t4p9_step_6_data.j) 9 := by decide + +private theorem k9t4p9_local_6_bad : k9t4p9_step_6_data.bad.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_6_data.i k9t4p9_step_6_data.j) k9t4p9_local_6 9 4 := by decide + +private theorem k9t4p9_step_6_check : k9t4p9_step_6.Check k9t4p9.graph k9t4p9_state_6 9 4 := by + change k9t4p9_step_6_data.Check k9t4p9.graph k9t4p9_state_6 9 4 + refine ⟨k9t4p9_local_6_paths, ?_⟩ + rw [k9t4p9_local_6_eq] + exact k9t4p9_local_6_bad + +private theorem k9t4p9_update_6 : k9t4p9_step_6.apply k9t4p9_state_6 = k9t4p9_state_7 := by + have h : ∀ i j : Fin 9, k9t4p9_step_6.apply k9t4p9_state_6 i j = k9t4p9_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_8 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[{0, 2, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_7 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_7_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p9_state_7 a b ∪ requiredMatrix 9 k9t4p9_step_7_data.required a b) 0 j = k9t4p9_local_7 0 j := by decide + +private theorem k9t4p9_local_7_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p9_state_7 a b ∪ requiredMatrix 9 k9t4p9_step_7_data.required a b) 1 j = k9t4p9_local_7 1 j := by decide + +private theorem k9t4p9_local_7_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p9_state_7 a b ∪ requiredMatrix 9 k9t4p9_step_7_data.required a b) 2 j = k9t4p9_local_7 2 j := by decide + +private theorem k9t4p9_local_7_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p9_state_7 a b ∪ requiredMatrix 9 k9t4p9_step_7_data.required a b) 3 j = k9t4p9_local_7 3 j := by decide + +private theorem k9t4p9_local_7_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p9_state_7 a b ∪ requiredMatrix 9 k9t4p9_step_7_data.required a b) 4 j = k9t4p9_local_7 4 j := by decide + +private theorem k9t4p9_local_7_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p9_state_7 a b ∪ requiredMatrix 9 k9t4p9_step_7_data.required a b) 5 j = k9t4p9_local_7 5 j := by decide + +private theorem k9t4p9_local_7_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p9_state_7 a b ∪ requiredMatrix 9 k9t4p9_step_7_data.required a b) 6 j = k9t4p9_local_7 6 j := by decide + +private theorem k9t4p9_local_7_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p9_state_7 a b ∪ requiredMatrix 9 k9t4p9_step_7_data.required a b) 7 j = k9t4p9_local_7 7 j := by decide + +private theorem k9t4p9_local_7_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p9_state_7 a b ∪ requiredMatrix 9 k9t4p9_step_7_data.required a b) 8 j = k9t4p9_local_7 8 j := by decide + +private theorem k9t4p9_local_7_eq : (fun a b => k9t4p9_state_7 a b ∪ requiredMatrix 9 k9t4p9_step_7_data.required a b) = k9t4p9_local_7 := by + funext i j + fin_cases i + + · exact k9t4p9_local_7_eq_row_0 j + + · exact k9t4p9_local_7_eq_row_1 j + + · exact k9t4p9_local_7_eq_row_2 j + + · exact k9t4p9_local_7_eq_row_3 j + + · exact k9t4p9_local_7_eq_row_4 j + + · exact k9t4p9_local_7_eq_row_5 j + + · exact k9t4p9_local_7_eq_row_6 j + + · exact k9t4p9_local_7_eq_row_7 j + + · exact k9t4p9_local_7_eq_row_8 j + +private theorem k9t4p9_local_7_paths : ∀ p ∈ k9t4p9_step_7_data.required, p.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_7_data.i k9t4p9_step_7_data.j) 9 := by decide + +private theorem k9t4p9_local_7_bad : k9t4p9_step_7_data.bad.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_7_data.i k9t4p9_step_7_data.j) k9t4p9_local_7 9 4 := by decide + +private theorem k9t4p9_step_7_check : k9t4p9_step_7.Check k9t4p9.graph k9t4p9_state_7 9 4 := by + change k9t4p9_step_7_data.Check k9t4p9.graph k9t4p9_state_7 9 4 + refine ⟨k9t4p9_local_7_paths, ?_⟩ + rw [k9t4p9_local_7_eq] + exact k9t4p9_local_7_bad + +private theorem k9t4p9_update_7 : k9t4p9_step_7.apply k9t4p9_state_7 = k9t4p9_state_8 := by + have h : ∀ i j : Fin 9, k9t4p9_step_7.apply k9t4p9_state_7 i j = k9t4p9_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_9 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_8 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 1 5, {0, 1}, {0, 1}, {1}, {0, 1}, Finset.Icc 0 4, {1}, Finset.Icc 0 4, {0, 1}], + #[Finset.Icc 1 5, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, {0, 2, 3, 4, 5, 6}, Finset.Icc 0 7, {1, 2, 3, 5, 6, 7, 8}], + #[{0, 1}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 0 7, {2, 3}], + #[{0, 1}, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1}, {2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, {1}, ∅], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}], + #[{1}, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 6, {1}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, {1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, {0, 1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_8_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1, 2}, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, {0, 1}, {1}, {0}, ∅, ∅, ∅, ∅, {1}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0}, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_8_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_0) 0 j = k9t4p9_local_8_required_0 0 j := by decide + +private theorem k9t4p9_local_8_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_0) 1 j = k9t4p9_local_8_required_0 1 j := by decide + +private theorem k9t4p9_local_8_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_0) 2 j = k9t4p9_local_8_required_0 2 j := by decide + +private theorem k9t4p9_local_8_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_0) 3 j = k9t4p9_local_8_required_0 3 j := by decide + +private theorem k9t4p9_local_8_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_0) 4 j = k9t4p9_local_8_required_0 4 j := by decide + +private theorem k9t4p9_local_8_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_0) 5 j = k9t4p9_local_8_required_0 5 j := by decide + +private theorem k9t4p9_local_8_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_0) 6 j = k9t4p9_local_8_required_0 6 j := by decide + +private theorem k9t4p9_local_8_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_0) 7 j = k9t4p9_local_8_required_0 7 j := by decide + +private theorem k9t4p9_local_8_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_0) 8 j = k9t4p9_local_8_required_0 8 j := by decide + +private theorem k9t4p9_local_8_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_0) 9 j = k9t4p9_local_8_required_0 9 j := by decide + +private theorem k9t4p9_local_8_required_0_eq : (requiredMatrix 9 k9t4p9_step_8_required_block_0) = k9t4p9_local_8_required_0 := by + funext i j + fin_cases i + + · exact k9t4p9_local_8_required_0_eq_row_0 j + + · exact k9t4p9_local_8_required_0_eq_row_1 j + + · exact k9t4p9_local_8_required_0_eq_row_2 j + + · exact k9t4p9_local_8_required_0_eq_row_3 j + + · exact k9t4p9_local_8_required_0_eq_row_4 j + + · exact k9t4p9_local_8_required_0_eq_row_5 j + + · exact k9t4p9_local_8_required_0_eq_row_6 j + + · exact k9t4p9_local_8_required_0_eq_row_7 j + + · exact k9t4p9_local_8_required_0_eq_row_8 j + + · exact k9t4p9_local_8_required_0_eq_row_9 j + +private theorem k9t4p9_local_8_path_0_0 : (⟨1, 0, [9, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_0_1 : (⟨1, 0, [9, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_0_2 : (⟨1, 8, [0, 7, 6, 5, 4, 3, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_0_3 : (⟨1, 6, [0, 7, 8, 9, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_0_4 : (⟨1, 6, [0, 7, 8, 9, 2, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_0_5 : (⟨6, 0, [5, 4, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_0_6 : (⟨6, 2, [5, 4, 1, 0, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_0_7 : (⟨6, 3, [5, 4, 1, 0, 7, 8, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_0_8 : (⟨6, 9, [5, 4, 2, 1, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_0_9 : (⟨6, 8, [5, 4, 2, 9, 1, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_0_10 : (⟨6, 1, [5, 4, 2, 9, 8, 7, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_0_11 : (⟨6, 0, [5, 4, 3, 2, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_paths_block_0 : ∀ p ∈ k9t4p9_step_8_required_block_0, p.Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by + simp only [k9t4p9_step_8_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_8_path_0_0, k9t4p9_local_8_path_0_1, k9t4p9_local_8_path_0_2, k9t4p9_local_8_path_0_3, k9t4p9_local_8_path_0_4, k9t4p9_local_8_path_0_5, k9t4p9_local_8_path_0_6, k9t4p9_local_8_path_0_7, k9t4p9_local_8_path_0_8, k9t4p9_local_8_path_0_9, k9t4p9_local_8_path_0_10, k9t4p9_local_8_path_0_11⟩ + +private def k9t4p9_local_8_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, {0}, {0}, {1}, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_8_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_1) 0 j = k9t4p9_local_8_required_1 0 j := by decide + +private theorem k9t4p9_local_8_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_1) 1 j = k9t4p9_local_8_required_1 1 j := by decide + +private theorem k9t4p9_local_8_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_1) 2 j = k9t4p9_local_8_required_1 2 j := by decide + +private theorem k9t4p9_local_8_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_1) 3 j = k9t4p9_local_8_required_1 3 j := by decide + +private theorem k9t4p9_local_8_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_1) 4 j = k9t4p9_local_8_required_1 4 j := by decide + +private theorem k9t4p9_local_8_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_1) 5 j = k9t4p9_local_8_required_1 5 j := by decide + +private theorem k9t4p9_local_8_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_1) 6 j = k9t4p9_local_8_required_1 6 j := by decide + +private theorem k9t4p9_local_8_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_1) 7 j = k9t4p9_local_8_required_1 7 j := by decide + +private theorem k9t4p9_local_8_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_1) 8 j = k9t4p9_local_8_required_1 8 j := by decide + +private theorem k9t4p9_local_8_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_1) 9 j = k9t4p9_local_8_required_1 9 j := by decide + +private theorem k9t4p9_local_8_required_1_eq : (requiredMatrix 9 k9t4p9_step_8_required_block_1) = k9t4p9_local_8_required_1 := by + funext i j + fin_cases i + + · exact k9t4p9_local_8_required_1_eq_row_0 j + + · exact k9t4p9_local_8_required_1_eq_row_1 j + + · exact k9t4p9_local_8_required_1_eq_row_2 j + + · exact k9t4p9_local_8_required_1_eq_row_3 j + + · exact k9t4p9_local_8_required_1_eq_row_4 j + + · exact k9t4p9_local_8_required_1_eq_row_5 j + + · exact k9t4p9_local_8_required_1_eq_row_6 j + + · exact k9t4p9_local_8_required_1_eq_row_7 j + + · exact k9t4p9_local_8_required_1_eq_row_8 j + + · exact k9t4p9_local_8_required_1_eq_row_9 j + +private theorem k9t4p9_local_8_path_1_0 : (⟨6, 9, [5, 4, 3, 2, 1, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_1_1 : (⟨6, 8, [5, 4, 3, 2, 9, 1, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_1_2 : (⟨6, 1, [5, 4, 3, 2, 9, 8, 7, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_1_3 : (⟨8, 6, [7, 0, 1, 9, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_1_4 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_1_5 : (⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_1_6 : (⟨8, 0, [9, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_1_7 : (⟨8, 3, [9, 1, 0, 7, 6, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_1_8 : (⟨8, 2, [9, 1, 0, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_1_9 : (⟨8, 4, [9, 2, 1, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_1_10 : (⟨8, 0, [9, 2, 3, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_1_11 : (⟨8, 6, [9, 2, 3, 4, 1, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_paths_block_1 : ∀ p ∈ k9t4p9_step_8_required_block_1, p.Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by + simp only [k9t4p9_step_8_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_8_path_1_0, k9t4p9_local_8_path_1_1, k9t4p9_local_8_path_1_2, k9t4p9_local_8_path_1_3, k9t4p9_local_8_path_1_4, k9t4p9_local_8_path_1_5, k9t4p9_local_8_path_1_6, k9t4p9_local_8_path_1_7, k9t4p9_local_8_path_1_8, k9t4p9_local_8_path_1_9, k9t4p9_local_8_path_1_10, k9t4p9_local_8_path_1_11⟩ + +private def k9t4p9_local_8_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {1}, {0, 1}, {1, 2}, {1}, {4}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{4}, {0}, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_8_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_2) 0 j = k9t4p9_local_8_required_2 0 j := by decide + +private theorem k9t4p9_local_8_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_2) 1 j = k9t4p9_local_8_required_2 1 j := by decide + +private theorem k9t4p9_local_8_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_2) 2 j = k9t4p9_local_8_required_2 2 j := by decide + +private theorem k9t4p9_local_8_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_2) 3 j = k9t4p9_local_8_required_2 3 j := by decide + +private theorem k9t4p9_local_8_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_2) 4 j = k9t4p9_local_8_required_2 4 j := by decide + +private theorem k9t4p9_local_8_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_2) 5 j = k9t4p9_local_8_required_2 5 j := by decide + +private theorem k9t4p9_local_8_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_2) 6 j = k9t4p9_local_8_required_2 6 j := by decide + +private theorem k9t4p9_local_8_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_2) 7 j = k9t4p9_local_8_required_2 7 j := by decide + +private theorem k9t4p9_local_8_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_2) 8 j = k9t4p9_local_8_required_2 8 j := by decide + +private theorem k9t4p9_local_8_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_2) 9 j = k9t4p9_local_8_required_2 9 j := by decide + +private theorem k9t4p9_local_8_required_2_eq : (requiredMatrix 9 k9t4p9_step_8_required_block_2) = k9t4p9_local_8_required_2 := by + funext i j + fin_cases i + + · exact k9t4p9_local_8_required_2_eq_row_0 j + + · exact k9t4p9_local_8_required_2_eq_row_1 j + + · exact k9t4p9_local_8_required_2_eq_row_2 j + + · exact k9t4p9_local_8_required_2_eq_row_3 j + + · exact k9t4p9_local_8_required_2_eq_row_4 j + + · exact k9t4p9_local_8_required_2_eq_row_5 j + + · exact k9t4p9_local_8_required_2_eq_row_6 j + + · exact k9t4p9_local_8_required_2_eq_row_7 j + + · exact k9t4p9_local_8_required_2_eq_row_8 j + + · exact k9t4p9_local_8_required_2_eq_row_9 j + +private theorem k9t4p9_local_8_path_2_0 : (⟨8, 5, [9, 2, 3, 4, 1, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_2_1 : (⟨8, 1, [9, 2, 3, 4, 5, 6, 7, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_2_2 : (⟨8, 0, [9, 2, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_2_3 : (⟨8, 5, [9, 2, 4, 1, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_2_4 : (⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_2_5 : (⟨0, 6, [1, 2, 3, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_2_6 : (⟨0, 5, [1, 2, 3, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_2_7 : (⟨0, 9, [1, 2, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_2_8 : (⟨0, 5, [1, 2, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_2_9 : (⟨0, 4, [1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_2_10 : (⟨0, 6, [1, 9, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_2_11 : (⟨0, 7, [1, 9, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_paths_block_2 : ∀ p ∈ k9t4p9_step_8_required_block_2, p.Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by + simp only [k9t4p9_step_8_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_8_path_2_0, k9t4p9_local_8_path_2_1, k9t4p9_local_8_path_2_2, k9t4p9_local_8_path_2_3, k9t4p9_local_8_path_2_4, k9t4p9_local_8_path_2_5, k9t4p9_local_8_path_2_6, k9t4p9_local_8_path_2_7, k9t4p9_local_8_path_2_8, k9t4p9_local_8_path_2_9, k9t4p9_local_8_path_2_10, k9t4p9_local_8_path_2_11⟩ + +private def k9t4p9_local_8_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 1 4, {0, 1}, {0, 1}, ∅, ∅, {3, 4}, ∅, {0, 1}, ∅], + #[Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_8_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_3) 0 j = k9t4p9_local_8_required_3 0 j := by decide + +private theorem k9t4p9_local_8_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_3) 1 j = k9t4p9_local_8_required_3 1 j := by decide + +private theorem k9t4p9_local_8_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_3) 2 j = k9t4p9_local_8_required_3 2 j := by decide + +private theorem k9t4p9_local_8_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_3) 3 j = k9t4p9_local_8_required_3 3 j := by decide + +private theorem k9t4p9_local_8_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_3) 4 j = k9t4p9_local_8_required_3 4 j := by decide + +private theorem k9t4p9_local_8_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_3) 5 j = k9t4p9_local_8_required_3 5 j := by decide + +private theorem k9t4p9_local_8_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_3) 6 j = k9t4p9_local_8_required_3 6 j := by decide + +private theorem k9t4p9_local_8_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_3) 7 j = k9t4p9_local_8_required_3 7 j := by decide + +private theorem k9t4p9_local_8_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_3) 8 j = k9t4p9_local_8_required_3 8 j := by decide + +private theorem k9t4p9_local_8_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_3) 9 j = k9t4p9_local_8_required_3 9 j := by decide + +private theorem k9t4p9_local_8_required_3_eq : (requiredMatrix 9 k9t4p9_step_8_required_block_3) = k9t4p9_local_8_required_3 := by + funext i j + fin_cases i + + · exact k9t4p9_local_8_required_3_eq_row_0 j + + · exact k9t4p9_local_8_required_3_eq_row_1 j + + · exact k9t4p9_local_8_required_3_eq_row_2 j + + · exact k9t4p9_local_8_required_3_eq_row_3 j + + · exact k9t4p9_local_8_required_3_eq_row_4 j + + · exact k9t4p9_local_8_required_3_eq_row_5 j + + · exact k9t4p9_local_8_required_3_eq_row_6 j + + · exact k9t4p9_local_8_required_3_eq_row_7 j + + · exact k9t4p9_local_8_required_3_eq_row_8 j + + · exact k9t4p9_local_8_required_3_eq_row_9 j + +private theorem k9t4p9_local_8_path_3_0 : (⟨0, 8, [1, 9, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_3_1 : (⟨0, 6, [1, 9, 2, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_3_2 : (⟨0, 8, [1, 9, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_3_3 : (⟨0, 6, [1, 9, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_3_4 : (⟨0, 2, [1, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_3_5 : (⟨0, 3, [1, 9, 8, 7, 6, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_3_6 : (⟨0, 3, [1, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_3_7 : (⟨0, 2, [1, 9, 8, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_3_8 : (⟨0, 1, [7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_3_9 : (⟨0, 1, [7, 6, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_3_10 : (⟨0, 1, [7, 6, 5, 4, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_3_11 : (⟨0, 1, [7, 6, 5, 4, 3, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_paths_block_3 : ∀ p ∈ k9t4p9_step_8_required_block_3, p.Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by + simp only [k9t4p9_step_8_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_8_path_3_0, k9t4p9_local_8_path_3_1, k9t4p9_local_8_path_3_2, k9t4p9_local_8_path_3_3, k9t4p9_local_8_path_3_4, k9t4p9_local_8_path_3_5, k9t4p9_local_8_path_3_6, k9t4p9_local_8_path_3_7, k9t4p9_local_8_path_3_8, k9t4p9_local_8_path_3_9, k9t4p9_local_8_path_3_10, k9t4p9_local_8_path_3_11⟩ + +private def k9t4p9_local_8_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {5}, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[{5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_8_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_4) 0 j = k9t4p9_local_8_required_4 0 j := by decide + +private theorem k9t4p9_local_8_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_4) 1 j = k9t4p9_local_8_required_4 1 j := by decide + +private theorem k9t4p9_local_8_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_4) 2 j = k9t4p9_local_8_required_4 2 j := by decide + +private theorem k9t4p9_local_8_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_4) 3 j = k9t4p9_local_8_required_4 3 j := by decide + +private theorem k9t4p9_local_8_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_4) 4 j = k9t4p9_local_8_required_4 4 j := by decide + +private theorem k9t4p9_local_8_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_4) 5 j = k9t4p9_local_8_required_4 5 j := by decide + +private theorem k9t4p9_local_8_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_4) 6 j = k9t4p9_local_8_required_4 6 j := by decide + +private theorem k9t4p9_local_8_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_4) 7 j = k9t4p9_local_8_required_4 7 j := by decide + +private theorem k9t4p9_local_8_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_4) 8 j = k9t4p9_local_8_required_4 8 j := by decide + +private theorem k9t4p9_local_8_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_8_required_block_4) 9 j = k9t4p9_local_8_required_4 9 j := by decide + +private theorem k9t4p9_local_8_required_4_eq : (requiredMatrix 9 k9t4p9_step_8_required_block_4) = k9t4p9_local_8_required_4 := by + funext i j + fin_cases i + + · exact k9t4p9_local_8_required_4_eq_row_0 j + + · exact k9t4p9_local_8_required_4_eq_row_1 j + + · exact k9t4p9_local_8_required_4_eq_row_2 j + + · exact k9t4p9_local_8_required_4_eq_row_3 j + + · exact k9t4p9_local_8_required_4_eq_row_4 j + + · exact k9t4p9_local_8_required_4_eq_row_5 j + + · exact k9t4p9_local_8_required_4_eq_row_6 j + + · exact k9t4p9_local_8_required_4_eq_row_7 j + + · exact k9t4p9_local_8_required_4_eq_row_8 j + + · exact k9t4p9_local_8_required_4_eq_row_9 j + +private theorem k9t4p9_local_8_path_4_0 : (⟨0, 1, [7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_path_4_1 : (⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by decide + +private theorem k9t4p9_local_8_paths_block_4 : ∀ p ∈ k9t4p9_step_8_required_block_4, p.Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by + simp only [k9t4p9_step_8_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_8_path_4_0, k9t4p9_local_8_path_4_1⟩ + +private theorem k9t4p9_local_8_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_8 a b ∪ (((((k9t4p9_local_8_required_0 a b ∪ k9t4p9_local_8_required_1 a b) ∪ k9t4p9_local_8_required_2 a b) ∪ k9t4p9_local_8_required_3 a b) ∪ k9t4p9_local_8_required_4 a b))) 0 j = k9t4p9_local_8 0 j := by decide + +private theorem k9t4p9_local_8_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_8 a b ∪ (((((k9t4p9_local_8_required_0 a b ∪ k9t4p9_local_8_required_1 a b) ∪ k9t4p9_local_8_required_2 a b) ∪ k9t4p9_local_8_required_3 a b) ∪ k9t4p9_local_8_required_4 a b))) 1 j = k9t4p9_local_8 1 j := by decide + +private theorem k9t4p9_local_8_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_8 a b ∪ (((((k9t4p9_local_8_required_0 a b ∪ k9t4p9_local_8_required_1 a b) ∪ k9t4p9_local_8_required_2 a b) ∪ k9t4p9_local_8_required_3 a b) ∪ k9t4p9_local_8_required_4 a b))) 2 j = k9t4p9_local_8 2 j := by decide + +private theorem k9t4p9_local_8_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_8 a b ∪ (((((k9t4p9_local_8_required_0 a b ∪ k9t4p9_local_8_required_1 a b) ∪ k9t4p9_local_8_required_2 a b) ∪ k9t4p9_local_8_required_3 a b) ∪ k9t4p9_local_8_required_4 a b))) 3 j = k9t4p9_local_8 3 j := by decide + +private theorem k9t4p9_local_8_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_8 a b ∪ (((((k9t4p9_local_8_required_0 a b ∪ k9t4p9_local_8_required_1 a b) ∪ k9t4p9_local_8_required_2 a b) ∪ k9t4p9_local_8_required_3 a b) ∪ k9t4p9_local_8_required_4 a b))) 4 j = k9t4p9_local_8 4 j := by decide + +private theorem k9t4p9_local_8_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_8 a b ∪ (((((k9t4p9_local_8_required_0 a b ∪ k9t4p9_local_8_required_1 a b) ∪ k9t4p9_local_8_required_2 a b) ∪ k9t4p9_local_8_required_3 a b) ∪ k9t4p9_local_8_required_4 a b))) 5 j = k9t4p9_local_8 5 j := by decide + +private theorem k9t4p9_local_8_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_8 a b ∪ (((((k9t4p9_local_8_required_0 a b ∪ k9t4p9_local_8_required_1 a b) ∪ k9t4p9_local_8_required_2 a b) ∪ k9t4p9_local_8_required_3 a b) ∪ k9t4p9_local_8_required_4 a b))) 6 j = k9t4p9_local_8 6 j := by decide + +private theorem k9t4p9_local_8_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_8 a b ∪ (((((k9t4p9_local_8_required_0 a b ∪ k9t4p9_local_8_required_1 a b) ∪ k9t4p9_local_8_required_2 a b) ∪ k9t4p9_local_8_required_3 a b) ∪ k9t4p9_local_8_required_4 a b))) 7 j = k9t4p9_local_8 7 j := by decide + +private theorem k9t4p9_local_8_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_8 a b ∪ (((((k9t4p9_local_8_required_0 a b ∪ k9t4p9_local_8_required_1 a b) ∪ k9t4p9_local_8_required_2 a b) ∪ k9t4p9_local_8_required_3 a b) ∪ k9t4p9_local_8_required_4 a b))) 8 j = k9t4p9_local_8 8 j := by decide + +private theorem k9t4p9_local_8_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_8 a b ∪ (((((k9t4p9_local_8_required_0 a b ∪ k9t4p9_local_8_required_1 a b) ∪ k9t4p9_local_8_required_2 a b) ∪ k9t4p9_local_8_required_3 a b) ∪ k9t4p9_local_8_required_4 a b))) 9 j = k9t4p9_local_8 9 j := by decide + +private theorem k9t4p9_local_8_merged_eq : (fun a b => freshMatrix k9t4p9_state_8 a b ∪ (((((k9t4p9_local_8_required_0 a b ∪ k9t4p9_local_8_required_1 a b) ∪ k9t4p9_local_8_required_2 a b) ∪ k9t4p9_local_8_required_3 a b) ∪ k9t4p9_local_8_required_4 a b))) = k9t4p9_local_8 := by + funext i j + fin_cases i + + · exact k9t4p9_local_8_merged_eq_row_0 j + + · exact k9t4p9_local_8_merged_eq_row_1 j + + · exact k9t4p9_local_8_merged_eq_row_2 j + + · exact k9t4p9_local_8_merged_eq_row_3 j + + · exact k9t4p9_local_8_merged_eq_row_4 j + + · exact k9t4p9_local_8_merged_eq_row_5 j + + · exact k9t4p9_local_8_merged_eq_row_6 j + + · exact k9t4p9_local_8_merged_eq_row_7 j + + · exact k9t4p9_local_8_merged_eq_row_8 j + + · exact k9t4p9_local_8_merged_eq_row_9 j + +private theorem k9t4p9_local_8_eq : (fun a b => freshMatrix k9t4p9_state_8 a b ∪ requiredMatrix 9 k9t4p9_step_8_data.required a b) = k9t4p9_local_8 := by + funext a b + change freshMatrix k9t4p9_state_8 a b ∪ requiredMatrix 9 (k9t4p9_step_8_required_block_0 ++ k9t4p9_step_8_required_block_1 ++ k9t4p9_step_8_required_block_2 ++ k9t4p9_step_8_required_block_3 ++ k9t4p9_step_8_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t4p9_local_8_required_0_eq, k9t4p9_local_8_required_1_eq, k9t4p9_local_8_required_2_eq, k9t4p9_local_8_required_3_eq, k9t4p9_local_8_required_4_eq] + exact congrFun (congrFun k9t4p9_local_8_merged_eq a) b + +private theorem k9t4p9_local_8_paths : ∀ p ∈ k9t4p9_step_8_data.required, p.Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 := by + change ∀ p ∈ (k9t4p9_step_8_required_block_0 ++ k9t4p9_step_8_required_block_1 ++ k9t4p9_step_8_required_block_2 ++ k9t4p9_step_8_required_block_3 ++ k9t4p9_step_8_required_block_4), p.Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t4p9_local_8_paths_block_0, k9t4p9_local_8_paths_block_1⟩, k9t4p9_local_8_paths_block_2⟩, k9t4p9_local_8_paths_block_3⟩, k9t4p9_local_8_paths_block_4⟩ + +private theorem k9t4p9_local_8_bad : k9t4p9_step_8_data.bad.Check (freshGraph k9t4p9.graph k9t4p9_step_8_data.i k9t4p9_step_8_data.j) k9t4p9_local_8 9 4 := by decide + +private theorem k9t4p9_step_8_check : k9t4p9_step_8.Check k9t4p9.graph k9t4p9_state_8 9 4 := by + change k9t4p9_step_8_data.Check k9t4p9.graph k9t4p9_state_8 9 4 + refine ⟨by decide, k9t4p9_local_8_paths, ?_⟩ + rw [k9t4p9_local_8_eq] + exact k9t4p9_local_8_bad + +private theorem k9t4p9_update_8 : k9t4p9_step_8.apply k9t4p9_state_8 = k9t4p9_state_9 := by + have h : ∀ i j : Fin 9, k9t4p9_step_8.apply k9t4p9_state_8 i j = k9t4p9_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_10 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_9 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_9_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p9_state_9 a b ∪ requiredMatrix 9 k9t4p9_step_9_data.required a b) 0 j = k9t4p9_local_9 0 j := by decide + +private theorem k9t4p9_local_9_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p9_state_9 a b ∪ requiredMatrix 9 k9t4p9_step_9_data.required a b) 1 j = k9t4p9_local_9 1 j := by decide + +private theorem k9t4p9_local_9_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p9_state_9 a b ∪ requiredMatrix 9 k9t4p9_step_9_data.required a b) 2 j = k9t4p9_local_9 2 j := by decide + +private theorem k9t4p9_local_9_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p9_state_9 a b ∪ requiredMatrix 9 k9t4p9_step_9_data.required a b) 3 j = k9t4p9_local_9 3 j := by decide + +private theorem k9t4p9_local_9_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p9_state_9 a b ∪ requiredMatrix 9 k9t4p9_step_9_data.required a b) 4 j = k9t4p9_local_9 4 j := by decide + +private theorem k9t4p9_local_9_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p9_state_9 a b ∪ requiredMatrix 9 k9t4p9_step_9_data.required a b) 5 j = k9t4p9_local_9 5 j := by decide + +private theorem k9t4p9_local_9_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p9_state_9 a b ∪ requiredMatrix 9 k9t4p9_step_9_data.required a b) 6 j = k9t4p9_local_9 6 j := by decide + +private theorem k9t4p9_local_9_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p9_state_9 a b ∪ requiredMatrix 9 k9t4p9_step_9_data.required a b) 7 j = k9t4p9_local_9 7 j := by decide + +private theorem k9t4p9_local_9_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p9_state_9 a b ∪ requiredMatrix 9 k9t4p9_step_9_data.required a b) 8 j = k9t4p9_local_9 8 j := by decide + +private theorem k9t4p9_local_9_eq : (fun a b => k9t4p9_state_9 a b ∪ requiredMatrix 9 k9t4p9_step_9_data.required a b) = k9t4p9_local_9 := by + funext i j + fin_cases i + + · exact k9t4p9_local_9_eq_row_0 j + + · exact k9t4p9_local_9_eq_row_1 j + + · exact k9t4p9_local_9_eq_row_2 j + + · exact k9t4p9_local_9_eq_row_3 j + + · exact k9t4p9_local_9_eq_row_4 j + + · exact k9t4p9_local_9_eq_row_5 j + + · exact k9t4p9_local_9_eq_row_6 j + + · exact k9t4p9_local_9_eq_row_7 j + + · exact k9t4p9_local_9_eq_row_8 j + +private theorem k9t4p9_local_9_paths : ∀ p ∈ k9t4p9_step_9_data.required, p.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_9_data.i k9t4p9_step_9_data.j) 9 := by decide + +private theorem k9t4p9_local_9_bad : k9t4p9_step_9_data.bad.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_9_data.i k9t4p9_step_9_data.j) k9t4p9_local_9 9 4 := by decide + +private theorem k9t4p9_step_9_check : k9t4p9_step_9.Check k9t4p9.graph k9t4p9_state_9 9 4 := by + change k9t4p9_step_9_data.Check k9t4p9.graph k9t4p9_state_9 9 4 + refine ⟨k9t4p9_local_9_paths, ?_⟩ + rw [k9t4p9_local_9_eq] + exact k9t4p9_local_9_bad + +private theorem k9t4p9_update_9 : k9t4p9_step_9.apply k9t4p9_state_9 = k9t4p9_state_10 := by + have h : ∀ i j : Fin 9, k9t4p9_step_9.apply k9t4p9_state_9 i j = k9t4p9_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_11 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_10 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 5, ∅, Finset.Icc 0 5, {1}, {0, 1}, {0, 1}, ∅, Finset.Icc 0 5, {1}], + #[Finset.Icc 0 5, ∅, {1, 2, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[∅, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1}, {2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, {1, 2}, ∅], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 0 6, Finset.Icc 4 7], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[∅, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 5, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, {1, 2}, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1}, {1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_10_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, {3}, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, {3}, ∅, ∅, ∅, ∅, {0}, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_10_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_0) 0 j = k9t4p9_local_10_required_0 0 j := by decide + +private theorem k9t4p9_local_10_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_0) 1 j = k9t4p9_local_10_required_0 1 j := by decide + +private theorem k9t4p9_local_10_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_0) 2 j = k9t4p9_local_10_required_0 2 j := by decide + +private theorem k9t4p9_local_10_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_0) 3 j = k9t4p9_local_10_required_0 3 j := by decide + +private theorem k9t4p9_local_10_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_0) 4 j = k9t4p9_local_10_required_0 4 j := by decide + +private theorem k9t4p9_local_10_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_0) 5 j = k9t4p9_local_10_required_0 5 j := by decide + +private theorem k9t4p9_local_10_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_0) 6 j = k9t4p9_local_10_required_0 6 j := by decide + +private theorem k9t4p9_local_10_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_0) 7 j = k9t4p9_local_10_required_0 7 j := by decide + +private theorem k9t4p9_local_10_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_0) 8 j = k9t4p9_local_10_required_0 8 j := by decide + +private theorem k9t4p9_local_10_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_0) 9 j = k9t4p9_local_10_required_0 9 j := by decide + +private theorem k9t4p9_local_10_required_0_eq : (requiredMatrix 9 k9t4p9_step_10_required_block_0) = k9t4p9_local_10_required_0 := by + funext i j + fin_cases i + + · exact k9t4p9_local_10_required_0_eq_row_0 j + + · exact k9t4p9_local_10_required_0_eq_row_1 j + + · exact k9t4p9_local_10_required_0_eq_row_2 j + + · exact k9t4p9_local_10_required_0_eq_row_3 j + + · exact k9t4p9_local_10_required_0_eq_row_4 j + + · exact k9t4p9_local_10_required_0_eq_row_5 j + + · exact k9t4p9_local_10_required_0_eq_row_6 j + + · exact k9t4p9_local_10_required_0_eq_row_7 j + + · exact k9t4p9_local_10_required_0_eq_row_8 j + + · exact k9t4p9_local_10_required_0_eq_row_9 j + +private theorem k9t4p9_local_10_path_0_0 : (⟨1, 0, [9, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_0_1 : (⟨1, 0, [9, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_0_2 : (⟨1, 0, [9, 8, 7, 6, 5, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_0_3 : (⟨1, 6, [9, 8, 7, 0, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_0_4 : (⟨1, 6, [9, 8, 7, 0, 2, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_0_5 : (⟨3, 0, [2, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_0_6 : (⟨3, 0, [2, 1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_0_7 : (⟨3, 0, [2, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_0_8 : (⟨3, 0, [2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_0_9 : (⟨3, 8, [2, 0, 7, 6, 5, 4, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_0_10 : (⟨3, 1, [2, 0, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_0_11 : (⟨3, 6, [2, 0, 7, 8, 9, 1, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_paths_block_0 : ∀ p ∈ k9t4p9_step_10_required_block_0, p.Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by + simp only [k9t4p9_step_10_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_10_path_0_0, k9t4p9_local_10_path_0_1, k9t4p9_local_10_path_0_2, k9t4p9_local_10_path_0_3, k9t4p9_local_10_path_0_4, k9t4p9_local_10_path_0_5, k9t4p9_local_10_path_0_6, k9t4p9_local_10_path_0_7, k9t4p9_local_10_path_0_8, k9t4p9_local_10_path_0_9, k9t4p9_local_10_path_0_10, k9t4p9_local_10_path_0_11⟩ + +private def k9t4p9_local_10_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, {0, 5}, ∅, ∅, ∅, ∅, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, {0}, {1, 2}, {0, 1, 2}, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_10_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_1) 0 j = k9t4p9_local_10_required_1 0 j := by decide + +private theorem k9t4p9_local_10_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_1) 1 j = k9t4p9_local_10_required_1 1 j := by decide + +private theorem k9t4p9_local_10_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_1) 2 j = k9t4p9_local_10_required_1 2 j := by decide + +private theorem k9t4p9_local_10_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_1) 3 j = k9t4p9_local_10_required_1 3 j := by decide + +private theorem k9t4p9_local_10_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_1) 4 j = k9t4p9_local_10_required_1 4 j := by decide + +private theorem k9t4p9_local_10_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_1) 5 j = k9t4p9_local_10_required_1 5 j := by decide + +private theorem k9t4p9_local_10_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_1) 6 j = k9t4p9_local_10_required_1 6 j := by decide + +private theorem k9t4p9_local_10_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_1) 7 j = k9t4p9_local_10_required_1 7 j := by decide + +private theorem k9t4p9_local_10_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_1) 8 j = k9t4p9_local_10_required_1 8 j := by decide + +private theorem k9t4p9_local_10_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_1) 9 j = k9t4p9_local_10_required_1 9 j := by decide + +private theorem k9t4p9_local_10_required_1_eq : (requiredMatrix 9 k9t4p9_step_10_required_block_1) = k9t4p9_local_10_required_1 := by + funext i j + fin_cases i + + · exact k9t4p9_local_10_required_1_eq_row_0 j + + · exact k9t4p9_local_10_required_1_eq_row_1 j + + · exact k9t4p9_local_10_required_1_eq_row_2 j + + · exact k9t4p9_local_10_required_1_eq_row_3 j + + · exact k9t4p9_local_10_required_1_eq_row_4 j + + · exact k9t4p9_local_10_required_1_eq_row_5 j + + · exact k9t4p9_local_10_required_1_eq_row_6 j + + · exact k9t4p9_local_10_required_1_eq_row_7 j + + · exact k9t4p9_local_10_required_1_eq_row_8 j + + · exact k9t4p9_local_10_required_1_eq_row_9 j + +private theorem k9t4p9_local_10_path_1_0 : (⟨3, 0, [4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_1_1 : (⟨3, 0, [4, 5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_1_2 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_1_3 : (⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_1_4 : (⟨8, 5, [9, 1, 2, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_1_5 : (⟨8, 4, [9, 1, 2, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_1_6 : (⟨8, 3, [9, 1, 2, 0, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_1_7 : (⟨8, 5, [9, 1, 4, 2, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_1_8 : (⟨8, 6, [9, 1, 4, 3, 2, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_1_9 : (⟨8, 5, [9, 1, 4, 3, 2, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_1_10 : (⟨8, 0, [9, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_1_11 : (⟨8, 4, [9, 2, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_paths_block_1 : ∀ p ∈ k9t4p9_step_10_required_block_1, p.Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by + simp only [k9t4p9_step_10_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_10_path_1_0, k9t4p9_local_10_path_1_1, k9t4p9_local_10_path_1_2, k9t4p9_local_10_path_1_3, k9t4p9_local_10_path_1_4, k9t4p9_local_10_path_1_5, k9t4p9_local_10_path_1_6, k9t4p9_local_10_path_1_7, k9t4p9_local_10_path_1_8, k9t4p9_local_10_path_1_9, k9t4p9_local_10_path_1_10, k9t4p9_local_10_path_1_11⟩ + +private def k9t4p9_local_10_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {5}, ∅, {0}, {1}, {0, 1}, {1}, ∅, Finset.Icc 1 5, {1}], + #[{5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_10_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_2) 0 j = k9t4p9_local_10_required_2 0 j := by decide + +private theorem k9t4p9_local_10_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_2) 1 j = k9t4p9_local_10_required_2 1 j := by decide + +private theorem k9t4p9_local_10_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_2) 2 j = k9t4p9_local_10_required_2 2 j := by decide + +private theorem k9t4p9_local_10_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_2) 3 j = k9t4p9_local_10_required_2 3 j := by decide + +private theorem k9t4p9_local_10_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_2) 4 j = k9t4p9_local_10_required_2 4 j := by decide + +private theorem k9t4p9_local_10_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_2) 5 j = k9t4p9_local_10_required_2 5 j := by decide + +private theorem k9t4p9_local_10_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_2) 6 j = k9t4p9_local_10_required_2 6 j := by decide + +private theorem k9t4p9_local_10_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_2) 7 j = k9t4p9_local_10_required_2 7 j := by decide + +private theorem k9t4p9_local_10_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_2) 8 j = k9t4p9_local_10_required_2 8 j := by decide + +private theorem k9t4p9_local_10_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_2) 9 j = k9t4p9_local_10_required_2 9 j := by decide + +private theorem k9t4p9_local_10_required_2_eq : (requiredMatrix 9 k9t4p9_step_10_required_block_2) = k9t4p9_local_10_required_2 := by + funext i j + fin_cases i + + · exact k9t4p9_local_10_required_2_eq_row_0 j + + · exact k9t4p9_local_10_required_2_eq_row_1 j + + · exact k9t4p9_local_10_required_2_eq_row_2 j + + · exact k9t4p9_local_10_required_2_eq_row_3 j + + · exact k9t4p9_local_10_required_2_eq_row_4 j + + · exact k9t4p9_local_10_required_2_eq_row_5 j + + · exact k9t4p9_local_10_required_2_eq_row_6 j + + · exact k9t4p9_local_10_required_2_eq_row_7 j + + · exact k9t4p9_local_10_required_2_eq_row_8 j + + · exact k9t4p9_local_10_required_2_eq_row_9 j + +private theorem k9t4p9_local_10_path_2_0 : (⟨0, 8, [2, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_2_1 : (⟨0, 9, [2, 1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_2_2 : (⟨0, 8, [2, 1, 4, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_2_3 : (⟨0, 5, [2, 1, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_2_4 : (⟨0, 8, [2, 1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_2_5 : (⟨0, 8, [2, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_2_6 : (⟨0, 4, [2, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_2_7 : (⟨0, 3, [2, 1, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_2_8 : (⟨0, 1, [2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_2_9 : (⟨0, 8, [2, 3, 4, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_2_10 : (⟨0, 6, [2, 3, 4, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_2_11 : (⟨0, 5, [2, 3, 4, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_paths_block_2 : ∀ p ∈ k9t4p9_step_10_required_block_2, p.Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by + simp only [k9t4p9_step_10_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_10_path_2_0, k9t4p9_local_10_path_2_1, k9t4p9_local_10_path_2_2, k9t4p9_local_10_path_2_3, k9t4p9_local_10_path_2_4, k9t4p9_local_10_path_2_5, k9t4p9_local_10_path_2_6, k9t4p9_local_10_path_2_7, k9t4p9_local_10_path_2_8, k9t4p9_local_10_path_2_9, k9t4p9_local_10_path_2_10, k9t4p9_local_10_path_2_11⟩ + +private def k9t4p9_local_10_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 4, ∅, {1}, ∅, ∅, {0}, ∅, {0}, ∅], + #[Finset.Icc 0 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_10_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_3) 0 j = k9t4p9_local_10_required_3 0 j := by decide + +private theorem k9t4p9_local_10_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_3) 1 j = k9t4p9_local_10_required_3 1 j := by decide + +private theorem k9t4p9_local_10_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_3) 2 j = k9t4p9_local_10_required_3 2 j := by decide + +private theorem k9t4p9_local_10_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_3) 3 j = k9t4p9_local_10_required_3 3 j := by decide + +private theorem k9t4p9_local_10_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_3) 4 j = k9t4p9_local_10_required_3 4 j := by decide + +private theorem k9t4p9_local_10_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_3) 5 j = k9t4p9_local_10_required_3 5 j := by decide + +private theorem k9t4p9_local_10_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_3) 6 j = k9t4p9_local_10_required_3 6 j := by decide + +private theorem k9t4p9_local_10_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_3) 7 j = k9t4p9_local_10_required_3 7 j := by decide + +private theorem k9t4p9_local_10_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_3) 8 j = k9t4p9_local_10_required_3 8 j := by decide + +private theorem k9t4p9_local_10_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_10_required_block_3) 9 j = k9t4p9_local_10_required_3 9 j := by decide + +private theorem k9t4p9_local_10_required_3_eq : (requiredMatrix 9 k9t4p9_step_10_required_block_3) = k9t4p9_local_10_required_3 := by + funext i j + fin_cases i + + · exact k9t4p9_local_10_required_3_eq_row_0 j + + · exact k9t4p9_local_10_required_3_eq_row_1 j + + · exact k9t4p9_local_10_required_3_eq_row_2 j + + · exact k9t4p9_local_10_required_3_eq_row_3 j + + · exact k9t4p9_local_10_required_3_eq_row_4 j + + · exact k9t4p9_local_10_required_3_eq_row_5 j + + · exact k9t4p9_local_10_required_3_eq_row_6 j + + · exact k9t4p9_local_10_required_3_eq_row_7 j + + · exact k9t4p9_local_10_required_3_eq_row_8 j + + · exact k9t4p9_local_10_required_3_eq_row_9 j + +private theorem k9t4p9_local_10_path_3_0 : (⟨0, 1, [2, 3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_3_1 : (⟨0, 1, [2, 3, 4, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_3_2 : (⟨0, 1, [2, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_3_3 : (⟨0, 3, [2, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_3_4 : (⟨0, 1, [7, 6, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_3_5 : (⟨0, 1, [7, 6, 5, 4, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_3_6 : (⟨0, 8, [7, 6, 5, 4, 3, 2, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_path_3_7 : (⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by decide + +private theorem k9t4p9_local_10_paths_block_3 : ∀ p ∈ k9t4p9_step_10_required_block_3, p.Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by + simp only [k9t4p9_step_10_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_10_path_3_0, k9t4p9_local_10_path_3_1, k9t4p9_local_10_path_3_2, k9t4p9_local_10_path_3_3, k9t4p9_local_10_path_3_4, k9t4p9_local_10_path_3_5, k9t4p9_local_10_path_3_6, k9t4p9_local_10_path_3_7⟩ + +private theorem k9t4p9_local_10_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_10 a b ∪ ((((k9t4p9_local_10_required_0 a b ∪ k9t4p9_local_10_required_1 a b) ∪ k9t4p9_local_10_required_2 a b) ∪ k9t4p9_local_10_required_3 a b))) 0 j = k9t4p9_local_10 0 j := by decide + +private theorem k9t4p9_local_10_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_10 a b ∪ ((((k9t4p9_local_10_required_0 a b ∪ k9t4p9_local_10_required_1 a b) ∪ k9t4p9_local_10_required_2 a b) ∪ k9t4p9_local_10_required_3 a b))) 1 j = k9t4p9_local_10 1 j := by decide + +private theorem k9t4p9_local_10_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_10 a b ∪ ((((k9t4p9_local_10_required_0 a b ∪ k9t4p9_local_10_required_1 a b) ∪ k9t4p9_local_10_required_2 a b) ∪ k9t4p9_local_10_required_3 a b))) 2 j = k9t4p9_local_10 2 j := by decide + +private theorem k9t4p9_local_10_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_10 a b ∪ ((((k9t4p9_local_10_required_0 a b ∪ k9t4p9_local_10_required_1 a b) ∪ k9t4p9_local_10_required_2 a b) ∪ k9t4p9_local_10_required_3 a b))) 3 j = k9t4p9_local_10 3 j := by decide + +private theorem k9t4p9_local_10_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_10 a b ∪ ((((k9t4p9_local_10_required_0 a b ∪ k9t4p9_local_10_required_1 a b) ∪ k9t4p9_local_10_required_2 a b) ∪ k9t4p9_local_10_required_3 a b))) 4 j = k9t4p9_local_10 4 j := by decide + +private theorem k9t4p9_local_10_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_10 a b ∪ ((((k9t4p9_local_10_required_0 a b ∪ k9t4p9_local_10_required_1 a b) ∪ k9t4p9_local_10_required_2 a b) ∪ k9t4p9_local_10_required_3 a b))) 5 j = k9t4p9_local_10 5 j := by decide + +private theorem k9t4p9_local_10_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_10 a b ∪ ((((k9t4p9_local_10_required_0 a b ∪ k9t4p9_local_10_required_1 a b) ∪ k9t4p9_local_10_required_2 a b) ∪ k9t4p9_local_10_required_3 a b))) 6 j = k9t4p9_local_10 6 j := by decide + +private theorem k9t4p9_local_10_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_10 a b ∪ ((((k9t4p9_local_10_required_0 a b ∪ k9t4p9_local_10_required_1 a b) ∪ k9t4p9_local_10_required_2 a b) ∪ k9t4p9_local_10_required_3 a b))) 7 j = k9t4p9_local_10 7 j := by decide + +private theorem k9t4p9_local_10_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_10 a b ∪ ((((k9t4p9_local_10_required_0 a b ∪ k9t4p9_local_10_required_1 a b) ∪ k9t4p9_local_10_required_2 a b) ∪ k9t4p9_local_10_required_3 a b))) 8 j = k9t4p9_local_10 8 j := by decide + +private theorem k9t4p9_local_10_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_10 a b ∪ ((((k9t4p9_local_10_required_0 a b ∪ k9t4p9_local_10_required_1 a b) ∪ k9t4p9_local_10_required_2 a b) ∪ k9t4p9_local_10_required_3 a b))) 9 j = k9t4p9_local_10 9 j := by decide + +private theorem k9t4p9_local_10_merged_eq : (fun a b => freshMatrix k9t4p9_state_10 a b ∪ ((((k9t4p9_local_10_required_0 a b ∪ k9t4p9_local_10_required_1 a b) ∪ k9t4p9_local_10_required_2 a b) ∪ k9t4p9_local_10_required_3 a b))) = k9t4p9_local_10 := by + funext i j + fin_cases i + + · exact k9t4p9_local_10_merged_eq_row_0 j + + · exact k9t4p9_local_10_merged_eq_row_1 j + + · exact k9t4p9_local_10_merged_eq_row_2 j + + · exact k9t4p9_local_10_merged_eq_row_3 j + + · exact k9t4p9_local_10_merged_eq_row_4 j + + · exact k9t4p9_local_10_merged_eq_row_5 j + + · exact k9t4p9_local_10_merged_eq_row_6 j + + · exact k9t4p9_local_10_merged_eq_row_7 j + + · exact k9t4p9_local_10_merged_eq_row_8 j + + · exact k9t4p9_local_10_merged_eq_row_9 j + +private theorem k9t4p9_local_10_eq : (fun a b => freshMatrix k9t4p9_state_10 a b ∪ requiredMatrix 9 k9t4p9_step_10_data.required a b) = k9t4p9_local_10 := by + funext a b + change freshMatrix k9t4p9_state_10 a b ∪ requiredMatrix 9 (k9t4p9_step_10_required_block_0 ++ k9t4p9_step_10_required_block_1 ++ k9t4p9_step_10_required_block_2 ++ k9t4p9_step_10_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p9_local_10_required_0_eq, k9t4p9_local_10_required_1_eq, k9t4p9_local_10_required_2_eq, k9t4p9_local_10_required_3_eq] + exact congrFun (congrFun k9t4p9_local_10_merged_eq a) b + +private theorem k9t4p9_local_10_paths : ∀ p ∈ k9t4p9_step_10_data.required, p.Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 := by + change ∀ p ∈ (k9t4p9_step_10_required_block_0 ++ k9t4p9_step_10_required_block_1 ++ k9t4p9_step_10_required_block_2 ++ k9t4p9_step_10_required_block_3), p.Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p9_local_10_paths_block_0, k9t4p9_local_10_paths_block_1⟩, k9t4p9_local_10_paths_block_2⟩, k9t4p9_local_10_paths_block_3⟩ + +private theorem k9t4p9_local_10_bad : k9t4p9_step_10_data.bad.Check (freshGraph k9t4p9.graph k9t4p9_step_10_data.i k9t4p9_step_10_data.j) k9t4p9_local_10 9 4 := by decide + +private theorem k9t4p9_step_10_check : k9t4p9_step_10.Check k9t4p9.graph k9t4p9_state_10 9 4 := by + change k9t4p9_step_10_data.Check k9t4p9.graph k9t4p9_state_10 9 4 + refine ⟨by decide, k9t4p9_local_10_paths, ?_⟩ + rw [k9t4p9_local_10_eq] + exact k9t4p9_local_10_bad + +private theorem k9t4p9_update_10 : k9t4p9_step_10.apply k9t4p9_state_10 = k9t4p9_state_11 := by + have h : ∀ i j : Fin 9, k9t4p9_step_10.apply k9t4p9_state_10 i j = k9t4p9_state_11 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_12 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_11 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, {1, 2}, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, {1, 2}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_11_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p9_state_11 a b ∪ requiredMatrix 9 k9t4p9_step_11_data.required a b) 0 j = k9t4p9_local_11 0 j := by decide + +private theorem k9t4p9_local_11_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p9_state_11 a b ∪ requiredMatrix 9 k9t4p9_step_11_data.required a b) 1 j = k9t4p9_local_11 1 j := by decide + +private theorem k9t4p9_local_11_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p9_state_11 a b ∪ requiredMatrix 9 k9t4p9_step_11_data.required a b) 2 j = k9t4p9_local_11 2 j := by decide + +private theorem k9t4p9_local_11_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p9_state_11 a b ∪ requiredMatrix 9 k9t4p9_step_11_data.required a b) 3 j = k9t4p9_local_11 3 j := by decide + +private theorem k9t4p9_local_11_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p9_state_11 a b ∪ requiredMatrix 9 k9t4p9_step_11_data.required a b) 4 j = k9t4p9_local_11 4 j := by decide + +private theorem k9t4p9_local_11_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p9_state_11 a b ∪ requiredMatrix 9 k9t4p9_step_11_data.required a b) 5 j = k9t4p9_local_11 5 j := by decide + +private theorem k9t4p9_local_11_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p9_state_11 a b ∪ requiredMatrix 9 k9t4p9_step_11_data.required a b) 6 j = k9t4p9_local_11 6 j := by decide + +private theorem k9t4p9_local_11_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p9_state_11 a b ∪ requiredMatrix 9 k9t4p9_step_11_data.required a b) 7 j = k9t4p9_local_11 7 j := by decide + +private theorem k9t4p9_local_11_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p9_state_11 a b ∪ requiredMatrix 9 k9t4p9_step_11_data.required a b) 8 j = k9t4p9_local_11 8 j := by decide + +private theorem k9t4p9_local_11_eq : (fun a b => k9t4p9_state_11 a b ∪ requiredMatrix 9 k9t4p9_step_11_data.required a b) = k9t4p9_local_11 := by + funext i j + fin_cases i + + · exact k9t4p9_local_11_eq_row_0 j + + · exact k9t4p9_local_11_eq_row_1 j + + · exact k9t4p9_local_11_eq_row_2 j + + · exact k9t4p9_local_11_eq_row_3 j + + · exact k9t4p9_local_11_eq_row_4 j + + · exact k9t4p9_local_11_eq_row_5 j + + · exact k9t4p9_local_11_eq_row_6 j + + · exact k9t4p9_local_11_eq_row_7 j + + · exact k9t4p9_local_11_eq_row_8 j + +private theorem k9t4p9_local_11_paths : ∀ p ∈ k9t4p9_step_11_data.required, p.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_11_data.i k9t4p9_step_11_data.j) 9 := by decide + +private theorem k9t4p9_local_11_bad : k9t4p9_step_11_data.bad.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_11_data.i k9t4p9_step_11_data.j) k9t4p9_local_11 9 4 := by decide + +private theorem k9t4p9_step_11_check : k9t4p9_step_11.Check k9t4p9.graph k9t4p9_state_11 9 4 := by + change k9t4p9_step_11_data.Check k9t4p9.graph k9t4p9_state_11 9 4 + refine ⟨k9t4p9_local_11_paths, ?_⟩ + rw [k9t4p9_local_11_eq] + exact k9t4p9_local_11_bad + +private theorem k9t4p9_update_11 : k9t4p9_step_11.apply k9t4p9_state_11 = k9t4p9_state_12 := by + have h : ∀ i j : Fin 9, k9t4p9_step_11.apply k9t4p9_state_11 i j = k9t4p9_state_12 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_13 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_12 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_12_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p9_state_12 a b ∪ requiredMatrix 9 k9t4p9_step_12_data.required a b) 0 j = k9t4p9_local_12 0 j := by decide + +private theorem k9t4p9_local_12_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p9_state_12 a b ∪ requiredMatrix 9 k9t4p9_step_12_data.required a b) 1 j = k9t4p9_local_12 1 j := by decide + +private theorem k9t4p9_local_12_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p9_state_12 a b ∪ requiredMatrix 9 k9t4p9_step_12_data.required a b) 2 j = k9t4p9_local_12 2 j := by decide + +private theorem k9t4p9_local_12_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p9_state_12 a b ∪ requiredMatrix 9 k9t4p9_step_12_data.required a b) 3 j = k9t4p9_local_12 3 j := by decide + +private theorem k9t4p9_local_12_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p9_state_12 a b ∪ requiredMatrix 9 k9t4p9_step_12_data.required a b) 4 j = k9t4p9_local_12 4 j := by decide + +private theorem k9t4p9_local_12_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p9_state_12 a b ∪ requiredMatrix 9 k9t4p9_step_12_data.required a b) 5 j = k9t4p9_local_12 5 j := by decide + +private theorem k9t4p9_local_12_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p9_state_12 a b ∪ requiredMatrix 9 k9t4p9_step_12_data.required a b) 6 j = k9t4p9_local_12 6 j := by decide + +private theorem k9t4p9_local_12_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p9_state_12 a b ∪ requiredMatrix 9 k9t4p9_step_12_data.required a b) 7 j = k9t4p9_local_12 7 j := by decide + +private theorem k9t4p9_local_12_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p9_state_12 a b ∪ requiredMatrix 9 k9t4p9_step_12_data.required a b) 8 j = k9t4p9_local_12 8 j := by decide + +private theorem k9t4p9_local_12_eq : (fun a b => k9t4p9_state_12 a b ∪ requiredMatrix 9 k9t4p9_step_12_data.required a b) = k9t4p9_local_12 := by + funext i j + fin_cases i + + · exact k9t4p9_local_12_eq_row_0 j + + · exact k9t4p9_local_12_eq_row_1 j + + · exact k9t4p9_local_12_eq_row_2 j + + · exact k9t4p9_local_12_eq_row_3 j + + · exact k9t4p9_local_12_eq_row_4 j + + · exact k9t4p9_local_12_eq_row_5 j + + · exact k9t4p9_local_12_eq_row_6 j + + · exact k9t4p9_local_12_eq_row_7 j + + · exact k9t4p9_local_12_eq_row_8 j + +private theorem k9t4p9_local_12_paths : ∀ p ∈ k9t4p9_step_12_data.required, p.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_12_data.i k9t4p9_step_12_data.j) 9 := by decide + +private theorem k9t4p9_local_12_bad : k9t4p9_step_12_data.bad.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_12_data.i k9t4p9_step_12_data.j) k9t4p9_local_12 9 4 := by decide + +private theorem k9t4p9_step_12_check : k9t4p9_step_12.Check k9t4p9.graph k9t4p9_state_12 9 4 := by + change k9t4p9_step_12_data.Check k9t4p9.graph k9t4p9_state_12 9 4 + refine ⟨k9t4p9_local_12_paths, ?_⟩ + rw [k9t4p9_local_12_eq] + exact k9t4p9_local_12_bad + +private theorem k9t4p9_update_12 : k9t4p9_step_12.apply k9t4p9_state_12 = k9t4p9_state_13 := by + have h : ∀ i j : Fin 9, k9t4p9_step_12.apply k9t4p9_state_12 i j = k9t4p9_state_13 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_14 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_13 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, Finset.Icc 0 4, ∅, Finset.Icc 0 4, {0}, ∅, Finset.Icc 0 4, ∅], + #[∅, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[∅, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 0 4, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, {2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0}, ∅, ∅], + #[Finset.Icc 0 4, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 0 6, {1, 2, 4, 5, 6, 7}], + #[{0}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_13_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_13 a b ∪ requiredMatrix 9 k9t4p9_step_13_data.required a b) 0 j = k9t4p9_local_13 0 j := by decide + +private theorem k9t4p9_local_13_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_13 a b ∪ requiredMatrix 9 k9t4p9_step_13_data.required a b) 1 j = k9t4p9_local_13 1 j := by decide + +private theorem k9t4p9_local_13_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_13 a b ∪ requiredMatrix 9 k9t4p9_step_13_data.required a b) 2 j = k9t4p9_local_13 2 j := by decide + +private theorem k9t4p9_local_13_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_13 a b ∪ requiredMatrix 9 k9t4p9_step_13_data.required a b) 3 j = k9t4p9_local_13 3 j := by decide + +private theorem k9t4p9_local_13_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_13 a b ∪ requiredMatrix 9 k9t4p9_step_13_data.required a b) 4 j = k9t4p9_local_13 4 j := by decide + +private theorem k9t4p9_local_13_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_13 a b ∪ requiredMatrix 9 k9t4p9_step_13_data.required a b) 5 j = k9t4p9_local_13 5 j := by decide + +private theorem k9t4p9_local_13_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_13 a b ∪ requiredMatrix 9 k9t4p9_step_13_data.required a b) 6 j = k9t4p9_local_13 6 j := by decide + +private theorem k9t4p9_local_13_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_13 a b ∪ requiredMatrix 9 k9t4p9_step_13_data.required a b) 7 j = k9t4p9_local_13 7 j := by decide + +private theorem k9t4p9_local_13_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_13 a b ∪ requiredMatrix 9 k9t4p9_step_13_data.required a b) 8 j = k9t4p9_local_13 8 j := by decide + +private theorem k9t4p9_local_13_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_13 a b ∪ requiredMatrix 9 k9t4p9_step_13_data.required a b) 9 j = k9t4p9_local_13 9 j := by decide + +private theorem k9t4p9_local_13_eq : (fun a b => freshMatrix k9t4p9_state_13 a b ∪ requiredMatrix 9 k9t4p9_step_13_data.required a b) = k9t4p9_local_13 := by + funext i j + fin_cases i + + · exact k9t4p9_local_13_eq_row_0 j + + · exact k9t4p9_local_13_eq_row_1 j + + · exact k9t4p9_local_13_eq_row_2 j + + · exact k9t4p9_local_13_eq_row_3 j + + · exact k9t4p9_local_13_eq_row_4 j + + · exact k9t4p9_local_13_eq_row_5 j + + · exact k9t4p9_local_13_eq_row_6 j + + · exact k9t4p9_local_13_eq_row_7 j + + · exact k9t4p9_local_13_eq_row_8 j + + · exact k9t4p9_local_13_eq_row_9 j + +private theorem k9t4p9_local_13_paths : ∀ p ∈ k9t4p9_step_13_data.required, p.Check (freshGraph k9t4p9.graph k9t4p9_step_13_data.i k9t4p9_step_13_data.j) 9 := by decide + +private theorem k9t4p9_local_13_bad : k9t4p9_step_13_data.bad.Check (freshGraph k9t4p9.graph k9t4p9_step_13_data.i k9t4p9_step_13_data.j) k9t4p9_local_13 9 4 := by decide + +private theorem k9t4p9_step_13_check : k9t4p9_step_13.Check k9t4p9.graph k9t4p9_state_13 9 4 := by + change k9t4p9_step_13_data.Check k9t4p9.graph k9t4p9_state_13 9 4 + refine ⟨by decide, k9t4p9_local_13_paths, ?_⟩ + rw [k9t4p9_local_13_eq] + exact k9t4p9_local_13_bad + +private theorem k9t4p9_update_13 : k9t4p9_step_13.apply k9t4p9_state_13 = k9t4p9_state_14 := by + have h : ∀ i j : Fin 9, k9t4p9_step_13.apply k9t4p9_state_13 i j = k9t4p9_state_14 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_15 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_14 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_14_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p9_state_14 a b ∪ requiredMatrix 9 k9t4p9_step_14_data.required a b) 0 j = k9t4p9_local_14 0 j := by decide + +private theorem k9t4p9_local_14_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p9_state_14 a b ∪ requiredMatrix 9 k9t4p9_step_14_data.required a b) 1 j = k9t4p9_local_14 1 j := by decide + +private theorem k9t4p9_local_14_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p9_state_14 a b ∪ requiredMatrix 9 k9t4p9_step_14_data.required a b) 2 j = k9t4p9_local_14 2 j := by decide + +private theorem k9t4p9_local_14_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p9_state_14 a b ∪ requiredMatrix 9 k9t4p9_step_14_data.required a b) 3 j = k9t4p9_local_14 3 j := by decide + +private theorem k9t4p9_local_14_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p9_state_14 a b ∪ requiredMatrix 9 k9t4p9_step_14_data.required a b) 4 j = k9t4p9_local_14 4 j := by decide + +private theorem k9t4p9_local_14_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p9_state_14 a b ∪ requiredMatrix 9 k9t4p9_step_14_data.required a b) 5 j = k9t4p9_local_14 5 j := by decide + +private theorem k9t4p9_local_14_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p9_state_14 a b ∪ requiredMatrix 9 k9t4p9_step_14_data.required a b) 6 j = k9t4p9_local_14 6 j := by decide + +private theorem k9t4p9_local_14_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p9_state_14 a b ∪ requiredMatrix 9 k9t4p9_step_14_data.required a b) 7 j = k9t4p9_local_14 7 j := by decide + +private theorem k9t4p9_local_14_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p9_state_14 a b ∪ requiredMatrix 9 k9t4p9_step_14_data.required a b) 8 j = k9t4p9_local_14 8 j := by decide + +private theorem k9t4p9_local_14_eq : (fun a b => k9t4p9_state_14 a b ∪ requiredMatrix 9 k9t4p9_step_14_data.required a b) = k9t4p9_local_14 := by + funext i j + fin_cases i + + · exact k9t4p9_local_14_eq_row_0 j + + · exact k9t4p9_local_14_eq_row_1 j + + · exact k9t4p9_local_14_eq_row_2 j + + · exact k9t4p9_local_14_eq_row_3 j + + · exact k9t4p9_local_14_eq_row_4 j + + · exact k9t4p9_local_14_eq_row_5 j + + · exact k9t4p9_local_14_eq_row_6 j + + · exact k9t4p9_local_14_eq_row_7 j + + · exact k9t4p9_local_14_eq_row_8 j + +private theorem k9t4p9_local_14_paths : ∀ p ∈ k9t4p9_step_14_data.required, p.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_14_data.i k9t4p9_step_14_data.j) 9 := by decide + +private theorem k9t4p9_local_14_bad : k9t4p9_step_14_data.bad.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_14_data.i k9t4p9_step_14_data.j) k9t4p9_local_14 9 4 := by decide + +private theorem k9t4p9_step_14_check : k9t4p9_step_14.Check k9t4p9.graph k9t4p9_state_14 9 4 := by + change k9t4p9_step_14_data.Check k9t4p9.graph k9t4p9_state_14 9 4 + refine ⟨k9t4p9_local_14_paths, ?_⟩ + rw [k9t4p9_local_14_eq] + exact k9t4p9_local_14_bad + +private theorem k9t4p9_update_14 : k9t4p9_step_14.apply k9t4p9_state_14 = k9t4p9_state_15 := by + have h : ∀ i j : Fin 9, k9t4p9_step_14.apply k9t4p9_state_14 i j = k9t4p9_state_15 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_16 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_15 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0}, {0}, Finset.Icc 0 4, {0}, ∅, Finset.Icc 0 3, ∅, Finset.Icc 0 4, ∅], + #[{0}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{0}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 0 4, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{0}, {2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}, ∅, ∅], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 3, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1}], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, {1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_15_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, {0, 1, 2}, ∅, ∅, Finset.Icc 0 3, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, {1}, {0}, {0, 1}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_15_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_0) 0 j = k9t4p9_local_15_required_0 0 j := by decide + +private theorem k9t4p9_local_15_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_0) 1 j = k9t4p9_local_15_required_0 1 j := by decide + +private theorem k9t4p9_local_15_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_0) 2 j = k9t4p9_local_15_required_0 2 j := by decide + +private theorem k9t4p9_local_15_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_0) 3 j = k9t4p9_local_15_required_0 3 j := by decide + +private theorem k9t4p9_local_15_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_0) 4 j = k9t4p9_local_15_required_0 4 j := by decide + +private theorem k9t4p9_local_15_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_0) 5 j = k9t4p9_local_15_required_0 5 j := by decide + +private theorem k9t4p9_local_15_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_0) 6 j = k9t4p9_local_15_required_0 6 j := by decide + +private theorem k9t4p9_local_15_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_0) 7 j = k9t4p9_local_15_required_0 7 j := by decide + +private theorem k9t4p9_local_15_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_0) 8 j = k9t4p9_local_15_required_0 8 j := by decide + +private theorem k9t4p9_local_15_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_0) 9 j = k9t4p9_local_15_required_0 9 j := by decide + +private theorem k9t4p9_local_15_required_0_eq : (requiredMatrix 9 k9t4p9_step_15_required_block_0) = k9t4p9_local_15_required_0 := by + funext i j + fin_cases i + + · exact k9t4p9_local_15_required_0_eq_row_0 j + + · exact k9t4p9_local_15_required_0_eq_row_1 j + + · exact k9t4p9_local_15_required_0_eq_row_2 j + + · exact k9t4p9_local_15_required_0_eq_row_3 j + + · exact k9t4p9_local_15_required_0_eq_row_4 j + + · exact k9t4p9_local_15_required_0_eq_row_5 j + + · exact k9t4p9_local_15_required_0_eq_row_6 j + + · exact k9t4p9_local_15_required_0_eq_row_7 j + + · exact k9t4p9_local_15_required_0_eq_row_8 j + + · exact k9t4p9_local_15_required_0_eq_row_9 j + +private theorem k9t4p9_local_15_path_0_0 : (⟨3, 0, [2, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_0_1 : (⟨3, 0, [2, 1, 4, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_0_2 : (⟨3, 6, [2, 1, 4, 9, 8, 7, 0, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_0_3 : (⟨3, 0, [2, 1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_0_4 : (⟨6, 0, [5, 4, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_0_5 : (⟨6, 0, [5, 4, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_0_6 : (⟨6, 0, [5, 4, 3, 2, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_0_7 : (⟨6, 0, [5, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_0_8 : (⟨6, 4, [5, 0, 7, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_0_9 : (⟨6, 4, [5, 0, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_0_10 : (⟨6, 3, [5, 0, 7, 8, 9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_0_11 : (⟨6, 2, [5, 0, 7, 8, 9, 1, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_paths_block_0 : ∀ p ∈ k9t4p9_step_15_required_block_0, p.Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by + simp only [k9t4p9_step_15_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_15_path_0_0, k9t4p9_local_15_path_0_1, k9t4p9_local_15_path_0_2, k9t4p9_local_15_path_0_3, k9t4p9_local_15_path_0_4, k9t4p9_local_15_path_0_5, k9t4p9_local_15_path_0_6, k9t4p9_local_15_path_0_7, k9t4p9_local_15_path_0_8, k9t4p9_local_15_path_0_9, k9t4p9_local_15_path_0_10, k9t4p9_local_15_path_0_11⟩ + +private def k9t4p9_local_15_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, {0}, ∅, ∅, ∅, ∅, ∅, {0, 1}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_15_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_1) 0 j = k9t4p9_local_15_required_1 0 j := by decide + +private theorem k9t4p9_local_15_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_1) 1 j = k9t4p9_local_15_required_1 1 j := by decide + +private theorem k9t4p9_local_15_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_1) 2 j = k9t4p9_local_15_required_1 2 j := by decide + +private theorem k9t4p9_local_15_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_1) 3 j = k9t4p9_local_15_required_1 3 j := by decide + +private theorem k9t4p9_local_15_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_1) 4 j = k9t4p9_local_15_required_1 4 j := by decide + +private theorem k9t4p9_local_15_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_1) 5 j = k9t4p9_local_15_required_1 5 j := by decide + +private theorem k9t4p9_local_15_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_1) 6 j = k9t4p9_local_15_required_1 6 j := by decide + +private theorem k9t4p9_local_15_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_1) 7 j = k9t4p9_local_15_required_1 7 j := by decide + +private theorem k9t4p9_local_15_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_1) 8 j = k9t4p9_local_15_required_1 8 j := by decide + +private theorem k9t4p9_local_15_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_1) 9 j = k9t4p9_local_15_required_1 9 j := by decide + +private theorem k9t4p9_local_15_required_1_eq : (requiredMatrix 9 k9t4p9_step_15_required_block_1) = k9t4p9_local_15_required_1 := by + funext i j + fin_cases i + + · exact k9t4p9_local_15_required_1_eq_row_0 j + + · exact k9t4p9_local_15_required_1_eq_row_1 j + + · exact k9t4p9_local_15_required_1_eq_row_2 j + + · exact k9t4p9_local_15_required_1_eq_row_3 j + + · exact k9t4p9_local_15_required_1_eq_row_4 j + + · exact k9t4p9_local_15_required_1_eq_row_5 j + + · exact k9t4p9_local_15_required_1_eq_row_6 j + + · exact k9t4p9_local_15_required_1_eq_row_7 j + + · exact k9t4p9_local_15_required_1_eq_row_8 j + + · exact k9t4p9_local_15_required_1_eq_row_9 j + +private theorem k9t4p9_local_15_path_1_0 : (⟨6, 2, [5, 0, 7, 8, 9, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_1_1 : (⟨6, 1, [5, 0, 7, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_1_2 : (⟨6, 1, [5, 0, 7, 8, 9, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_1_3 : (⟨6, 8, [7, 0, 5, 4, 1, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_1_4 : (⟨6, 9, [7, 0, 5, 4, 3, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_1_5 : (⟨6, 8, [7, 0, 5, 4, 3, 2, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_1_6 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_1_7 : (⟨8, 0, [9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_1_8 : (⟨8, 6, [9, 1, 2, 3, 4, 5, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_1_9 : (⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_1_10 : (⟨8, 0, [9, 1, 2, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_1_11 : (⟨8, 6, [9, 1, 2, 4, 5, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_paths_block_1 : ∀ p ∈ k9t4p9_step_15_required_block_1, p.Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by + simp only [k9t4p9_step_15_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_15_path_1_0, k9t4p9_local_15_path_1_1, k9t4p9_local_15_path_1_2, k9t4p9_local_15_path_1_3, k9t4p9_local_15_path_1_4, k9t4p9_local_15_path_1_5, k9t4p9_local_15_path_1_6, k9t4p9_local_15_path_1_7, k9t4p9_local_15_path_1_8, k9t4p9_local_15_path_1_9, k9t4p9_local_15_path_1_10, k9t4p9_local_15_path_1_11⟩ + +private def k9t4p9_local_15_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0}, {0}, Finset.Icc 0 4, {0}, ∅, {0}, ∅, {0, 4}, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_15_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_2) 0 j = k9t4p9_local_15_required_2 0 j := by decide + +private theorem k9t4p9_local_15_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_2) 1 j = k9t4p9_local_15_required_2 1 j := by decide + +private theorem k9t4p9_local_15_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_2) 2 j = k9t4p9_local_15_required_2 2 j := by decide + +private theorem k9t4p9_local_15_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_2) 3 j = k9t4p9_local_15_required_2 3 j := by decide + +private theorem k9t4p9_local_15_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_2) 4 j = k9t4p9_local_15_required_2 4 j := by decide + +private theorem k9t4p9_local_15_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_2) 5 j = k9t4p9_local_15_required_2 5 j := by decide + +private theorem k9t4p9_local_15_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_2) 6 j = k9t4p9_local_15_required_2 6 j := by decide + +private theorem k9t4p9_local_15_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_2) 7 j = k9t4p9_local_15_required_2 7 j := by decide + +private theorem k9t4p9_local_15_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_2) 8 j = k9t4p9_local_15_required_2 8 j := by decide + +private theorem k9t4p9_local_15_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_15_required_block_2) 9 j = k9t4p9_local_15_required_2 9 j := by decide + +private theorem k9t4p9_local_15_required_2_eq : (requiredMatrix 9 k9t4p9_step_15_required_block_2) = k9t4p9_local_15_required_2 := by + funext i j + fin_cases i + + · exact k9t4p9_local_15_required_2_eq_row_0 j + + · exact k9t4p9_local_15_required_2_eq_row_1 j + + · exact k9t4p9_local_15_required_2_eq_row_2 j + + · exact k9t4p9_local_15_required_2_eq_row_3 j + + · exact k9t4p9_local_15_required_2_eq_row_4 j + + · exact k9t4p9_local_15_required_2_eq_row_5 j + + · exact k9t4p9_local_15_required_2_eq_row_6 j + + · exact k9t4p9_local_15_required_2_eq_row_7 j + + · exact k9t4p9_local_15_required_2_eq_row_8 j + + · exact k9t4p9_local_15_required_2_eq_row_9 j + +private theorem k9t4p9_local_15_path_2_0 : (⟨8, 0, [9, 1, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_2_1 : (⟨0, 3, [5, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_2_2 : (⟨0, 3, [5, 4, 1, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_2_3 : (⟨0, 6, [5, 4, 3, 2, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_2_4 : (⟨0, 3, [5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_2_5 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_2_6 : (⟨0, 3, [5, 6, 7, 8, 9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_2_7 : (⟨0, 2, [5, 6, 7, 8, 9, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_2_8 : (⟨0, 3, [5, 6, 7, 8, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_2_9 : (⟨0, 1, [5, 6, 7, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_path_2_10 : (⟨0, 8, [7, 6, 5, 4, 3, 2, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by decide + +private theorem k9t4p9_local_15_paths_block_2 : ∀ p ∈ k9t4p9_step_15_required_block_2, p.Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by + simp only [k9t4p9_step_15_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_15_path_2_0, k9t4p9_local_15_path_2_1, k9t4p9_local_15_path_2_2, k9t4p9_local_15_path_2_3, k9t4p9_local_15_path_2_4, k9t4p9_local_15_path_2_5, k9t4p9_local_15_path_2_6, k9t4p9_local_15_path_2_7, k9t4p9_local_15_path_2_8, k9t4p9_local_15_path_2_9, k9t4p9_local_15_path_2_10⟩ + +private theorem k9t4p9_local_15_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_15 a b ∪ (((k9t4p9_local_15_required_0 a b ∪ k9t4p9_local_15_required_1 a b) ∪ k9t4p9_local_15_required_2 a b))) 0 j = k9t4p9_local_15 0 j := by decide + +private theorem k9t4p9_local_15_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_15 a b ∪ (((k9t4p9_local_15_required_0 a b ∪ k9t4p9_local_15_required_1 a b) ∪ k9t4p9_local_15_required_2 a b))) 1 j = k9t4p9_local_15 1 j := by decide + +private theorem k9t4p9_local_15_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_15 a b ∪ (((k9t4p9_local_15_required_0 a b ∪ k9t4p9_local_15_required_1 a b) ∪ k9t4p9_local_15_required_2 a b))) 2 j = k9t4p9_local_15 2 j := by decide + +private theorem k9t4p9_local_15_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_15 a b ∪ (((k9t4p9_local_15_required_0 a b ∪ k9t4p9_local_15_required_1 a b) ∪ k9t4p9_local_15_required_2 a b))) 3 j = k9t4p9_local_15 3 j := by decide + +private theorem k9t4p9_local_15_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_15 a b ∪ (((k9t4p9_local_15_required_0 a b ∪ k9t4p9_local_15_required_1 a b) ∪ k9t4p9_local_15_required_2 a b))) 4 j = k9t4p9_local_15 4 j := by decide + +private theorem k9t4p9_local_15_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_15 a b ∪ (((k9t4p9_local_15_required_0 a b ∪ k9t4p9_local_15_required_1 a b) ∪ k9t4p9_local_15_required_2 a b))) 5 j = k9t4p9_local_15 5 j := by decide + +private theorem k9t4p9_local_15_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_15 a b ∪ (((k9t4p9_local_15_required_0 a b ∪ k9t4p9_local_15_required_1 a b) ∪ k9t4p9_local_15_required_2 a b))) 6 j = k9t4p9_local_15 6 j := by decide + +private theorem k9t4p9_local_15_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_15 a b ∪ (((k9t4p9_local_15_required_0 a b ∪ k9t4p9_local_15_required_1 a b) ∪ k9t4p9_local_15_required_2 a b))) 7 j = k9t4p9_local_15 7 j := by decide + +private theorem k9t4p9_local_15_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_15 a b ∪ (((k9t4p9_local_15_required_0 a b ∪ k9t4p9_local_15_required_1 a b) ∪ k9t4p9_local_15_required_2 a b))) 8 j = k9t4p9_local_15 8 j := by decide + +private theorem k9t4p9_local_15_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_15 a b ∪ (((k9t4p9_local_15_required_0 a b ∪ k9t4p9_local_15_required_1 a b) ∪ k9t4p9_local_15_required_2 a b))) 9 j = k9t4p9_local_15 9 j := by decide + +private theorem k9t4p9_local_15_merged_eq : (fun a b => freshMatrix k9t4p9_state_15 a b ∪ (((k9t4p9_local_15_required_0 a b ∪ k9t4p9_local_15_required_1 a b) ∪ k9t4p9_local_15_required_2 a b))) = k9t4p9_local_15 := by + funext i j + fin_cases i + + · exact k9t4p9_local_15_merged_eq_row_0 j + + · exact k9t4p9_local_15_merged_eq_row_1 j + + · exact k9t4p9_local_15_merged_eq_row_2 j + + · exact k9t4p9_local_15_merged_eq_row_3 j + + · exact k9t4p9_local_15_merged_eq_row_4 j + + · exact k9t4p9_local_15_merged_eq_row_5 j + + · exact k9t4p9_local_15_merged_eq_row_6 j + + · exact k9t4p9_local_15_merged_eq_row_7 j + + · exact k9t4p9_local_15_merged_eq_row_8 j + + · exact k9t4p9_local_15_merged_eq_row_9 j + +private theorem k9t4p9_local_15_eq : (fun a b => freshMatrix k9t4p9_state_15 a b ∪ requiredMatrix 9 k9t4p9_step_15_data.required a b) = k9t4p9_local_15 := by + funext a b + change freshMatrix k9t4p9_state_15 a b ∪ requiredMatrix 9 (k9t4p9_step_15_required_block_0 ++ k9t4p9_step_15_required_block_1 ++ k9t4p9_step_15_required_block_2) a b = _ + simp only [requiredMatrix_append, k9t4p9_local_15_required_0_eq, k9t4p9_local_15_required_1_eq, k9t4p9_local_15_required_2_eq] + exact congrFun (congrFun k9t4p9_local_15_merged_eq a) b + +private theorem k9t4p9_local_15_paths : ∀ p ∈ k9t4p9_step_15_data.required, p.Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 := by + change ∀ p ∈ (k9t4p9_step_15_required_block_0 ++ k9t4p9_step_15_required_block_1 ++ k9t4p9_step_15_required_block_2), p.Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨k9t4p9_local_15_paths_block_0, k9t4p9_local_15_paths_block_1⟩, k9t4p9_local_15_paths_block_2⟩ + +private theorem k9t4p9_local_15_bad : k9t4p9_step_15_data.bad.Check (freshGraph k9t4p9.graph k9t4p9_step_15_data.i k9t4p9_step_15_data.j) k9t4p9_local_15 9 4 := by decide + +private theorem k9t4p9_step_15_check : k9t4p9_step_15.Check k9t4p9.graph k9t4p9_state_15 9 4 := by + change k9t4p9_step_15_data.Check k9t4p9.graph k9t4p9_state_15 9 4 + refine ⟨by decide, k9t4p9_local_15_paths, ?_⟩ + rw [k9t4p9_local_15_eq] + exact k9t4p9_local_15_bad + +private theorem k9t4p9_update_15 : k9t4p9_step_15.apply k9t4p9_state_15 = k9t4p9_state_16 := by + have h : ∀ i j : Fin 9, k9t4p9_step_15.apply k9t4p9_state_15 i j = k9t4p9_state_16 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_17 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_16 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 8], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 7], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, {1, 2}], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 1 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 8, {1, 2, 3}, Finset.Icc 1 7, {1, 2}, Finset.Icc 1 7, ∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_16_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p9_state_16 a b ∪ requiredMatrix 9 k9t4p9_step_16_data.required a b) 0 j = k9t4p9_local_16 0 j := by decide + +private theorem k9t4p9_local_16_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p9_state_16 a b ∪ requiredMatrix 9 k9t4p9_step_16_data.required a b) 1 j = k9t4p9_local_16 1 j := by decide + +private theorem k9t4p9_local_16_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p9_state_16 a b ∪ requiredMatrix 9 k9t4p9_step_16_data.required a b) 2 j = k9t4p9_local_16 2 j := by decide + +private theorem k9t4p9_local_16_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p9_state_16 a b ∪ requiredMatrix 9 k9t4p9_step_16_data.required a b) 3 j = k9t4p9_local_16 3 j := by decide + +private theorem k9t4p9_local_16_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p9_state_16 a b ∪ requiredMatrix 9 k9t4p9_step_16_data.required a b) 4 j = k9t4p9_local_16 4 j := by decide + +private theorem k9t4p9_local_16_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p9_state_16 a b ∪ requiredMatrix 9 k9t4p9_step_16_data.required a b) 5 j = k9t4p9_local_16 5 j := by decide + +private theorem k9t4p9_local_16_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p9_state_16 a b ∪ requiredMatrix 9 k9t4p9_step_16_data.required a b) 6 j = k9t4p9_local_16 6 j := by decide + +private theorem k9t4p9_local_16_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p9_state_16 a b ∪ requiredMatrix 9 k9t4p9_step_16_data.required a b) 7 j = k9t4p9_local_16 7 j := by decide + +private theorem k9t4p9_local_16_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p9_state_16 a b ∪ requiredMatrix 9 k9t4p9_step_16_data.required a b) 8 j = k9t4p9_local_16 8 j := by decide + +private theorem k9t4p9_local_16_eq : (fun a b => k9t4p9_state_16 a b ∪ requiredMatrix 9 k9t4p9_step_16_data.required a b) = k9t4p9_local_16 := by + funext i j + fin_cases i + + · exact k9t4p9_local_16_eq_row_0 j + + · exact k9t4p9_local_16_eq_row_1 j + + · exact k9t4p9_local_16_eq_row_2 j + + · exact k9t4p9_local_16_eq_row_3 j + + · exact k9t4p9_local_16_eq_row_4 j + + · exact k9t4p9_local_16_eq_row_5 j + + · exact k9t4p9_local_16_eq_row_6 j + + · exact k9t4p9_local_16_eq_row_7 j + + · exact k9t4p9_local_16_eq_row_8 j + +private theorem k9t4p9_local_16_paths : ∀ p ∈ k9t4p9_step_16_data.required, p.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_16_data.i k9t4p9_step_16_data.j) 9 := by decide + +private theorem k9t4p9_local_16_bad : k9t4p9_step_16_data.bad.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_16_data.i k9t4p9_step_16_data.j) k9t4p9_local_16 9 4 := by decide + +private theorem k9t4p9_step_16_check : k9t4p9_step_16.Check k9t4p9.graph k9t4p9_state_16 9 4 := by + change k9t4p9_step_16_data.Check k9t4p9.graph k9t4p9_state_16 9 4 + refine ⟨k9t4p9_local_16_paths, ?_⟩ + rw [k9t4p9_local_16_eq] + exact k9t4p9_local_16_bad + +private theorem k9t4p9_update_16 : k9t4p9_step_16.apply k9t4p9_state_16 = k9t4p9_state_17 := by + have h : ∀ i j : Fin 9, k9t4p9_step_16.apply k9t4p9_state_16 i j = k9t4p9_state_17 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_18 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 3, 4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, {0, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_17 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_17_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p9_state_17 a b ∪ requiredMatrix 9 k9t4p9_step_17_data.required a b) 0 j = k9t4p9_local_17 0 j := by decide + +private theorem k9t4p9_local_17_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p9_state_17 a b ∪ requiredMatrix 9 k9t4p9_step_17_data.required a b) 1 j = k9t4p9_local_17 1 j := by decide + +private theorem k9t4p9_local_17_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p9_state_17 a b ∪ requiredMatrix 9 k9t4p9_step_17_data.required a b) 2 j = k9t4p9_local_17 2 j := by decide + +private theorem k9t4p9_local_17_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p9_state_17 a b ∪ requiredMatrix 9 k9t4p9_step_17_data.required a b) 3 j = k9t4p9_local_17 3 j := by decide + +private theorem k9t4p9_local_17_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p9_state_17 a b ∪ requiredMatrix 9 k9t4p9_step_17_data.required a b) 4 j = k9t4p9_local_17 4 j := by decide + +private theorem k9t4p9_local_17_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p9_state_17 a b ∪ requiredMatrix 9 k9t4p9_step_17_data.required a b) 5 j = k9t4p9_local_17 5 j := by decide + +private theorem k9t4p9_local_17_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p9_state_17 a b ∪ requiredMatrix 9 k9t4p9_step_17_data.required a b) 6 j = k9t4p9_local_17 6 j := by decide + +private theorem k9t4p9_local_17_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p9_state_17 a b ∪ requiredMatrix 9 k9t4p9_step_17_data.required a b) 7 j = k9t4p9_local_17 7 j := by decide + +private theorem k9t4p9_local_17_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p9_state_17 a b ∪ requiredMatrix 9 k9t4p9_step_17_data.required a b) 8 j = k9t4p9_local_17 8 j := by decide + +private theorem k9t4p9_local_17_eq : (fun a b => k9t4p9_state_17 a b ∪ requiredMatrix 9 k9t4p9_step_17_data.required a b) = k9t4p9_local_17 := by + funext i j + fin_cases i + + · exact k9t4p9_local_17_eq_row_0 j + + · exact k9t4p9_local_17_eq_row_1 j + + · exact k9t4p9_local_17_eq_row_2 j + + · exact k9t4p9_local_17_eq_row_3 j + + · exact k9t4p9_local_17_eq_row_4 j + + · exact k9t4p9_local_17_eq_row_5 j + + · exact k9t4p9_local_17_eq_row_6 j + + · exact k9t4p9_local_17_eq_row_7 j + + · exact k9t4p9_local_17_eq_row_8 j + +private theorem k9t4p9_local_17_paths : ∀ p ∈ k9t4p9_step_17_data.required, p.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_17_data.i k9t4p9_step_17_data.j) 9 := by decide + +private theorem k9t4p9_local_17_bad : k9t4p9_step_17_data.bad.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_17_data.i k9t4p9_step_17_data.j) k9t4p9_local_17 9 4 := by decide + +private theorem k9t4p9_step_17_check : k9t4p9_step_17.Check k9t4p9.graph k9t4p9_state_17 9 4 := by + change k9t4p9_step_17_data.Check k9t4p9.graph k9t4p9_state_17 9 4 + refine ⟨k9t4p9_local_17_paths, ?_⟩ + rw [k9t4p9_local_17_eq] + exact k9t4p9_local_17_bad + +private theorem k9t4p9_update_17 : k9t4p9_step_17.apply k9t4p9_state_17 = k9t4p9_state_18 := by + have h : ∀ i j : Fin 9, k9t4p9_step_17.apply k9t4p9_state_17 i j = k9t4p9_state_18 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_19 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_18 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, Finset.Icc 0 5, {0, 1}, ∅, Finset.Icc 0 4, Finset.Icc 0 4, ∅, {0, 1}], + #[{0, 1}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{0, 1}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 0 5, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{0, 1}, {2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}, ∅, ∅], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 3, 4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1}], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, {0, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, {1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, {0, 1}, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_18_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, Finset.Icc 0 5, ∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 5, ∅, ∅, ∅, ∅, ∅, {0}, {0}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, ∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_18_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_0) 0 j = k9t4p9_local_18_required_0 0 j := by decide + +private theorem k9t4p9_local_18_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_0) 1 j = k9t4p9_local_18_required_0 1 j := by decide + +private theorem k9t4p9_local_18_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_0) 2 j = k9t4p9_local_18_required_0 2 j := by decide + +private theorem k9t4p9_local_18_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_0) 3 j = k9t4p9_local_18_required_0 3 j := by decide + +private theorem k9t4p9_local_18_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_0) 4 j = k9t4p9_local_18_required_0 4 j := by decide + +private theorem k9t4p9_local_18_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_0) 5 j = k9t4p9_local_18_required_0 5 j := by decide + +private theorem k9t4p9_local_18_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_0) 6 j = k9t4p9_local_18_required_0 6 j := by decide + +private theorem k9t4p9_local_18_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_0) 7 j = k9t4p9_local_18_required_0 7 j := by decide + +private theorem k9t4p9_local_18_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_0) 8 j = k9t4p9_local_18_required_0 8 j := by decide + +private theorem k9t4p9_local_18_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_0) 9 j = k9t4p9_local_18_required_0 9 j := by decide + +private theorem k9t4p9_local_18_required_0_eq : (requiredMatrix 9 k9t4p9_step_18_required_block_0) = k9t4p9_local_18_required_0 := by + funext i j + fin_cases i + + · exact k9t4p9_local_18_required_0_eq_row_0 j + + · exact k9t4p9_local_18_required_0_eq_row_1 j + + · exact k9t4p9_local_18_required_0_eq_row_2 j + + · exact k9t4p9_local_18_required_0_eq_row_3 j + + · exact k9t4p9_local_18_required_0_eq_row_4 j + + · exact k9t4p9_local_18_required_0_eq_row_5 j + + · exact k9t4p9_local_18_required_0_eq_row_6 j + + · exact k9t4p9_local_18_required_0_eq_row_7 j + + · exact k9t4p9_local_18_required_0_eq_row_8 j + + · exact k9t4p9_local_18_required_0_eq_row_9 j + +private theorem k9t4p9_local_18_path_0_0 : (⟨3, 7, [2, 1, 4, 9, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_0_1 : (⟨3, 0, [2, 1, 9, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_0_2 : (⟨3, 0, [2, 1, 9, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_0_3 : (⟨3, 6, [2, 1, 9, 4, 5, 0, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_0_4 : (⟨3, 0, [2, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_0_5 : (⟨3, 0, [2, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_0_6 : (⟨3, 0, [2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_0_7 : (⟨3, 0, [2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_0_8 : (⟨6, 0, [5, 4, 1, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_0_9 : (⟨6, 0, [5, 4, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_0_10 : (⟨6, 0, [5, 4, 3, 2, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_0_11 : (⟨6, 0, [5, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_paths_block_0 : ∀ p ∈ k9t4p9_step_18_required_block_0, p.Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by + simp only [k9t4p9_step_18_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_18_path_0_0, k9t4p9_local_18_path_0_1, k9t4p9_local_18_path_0_2, k9t4p9_local_18_path_0_3, k9t4p9_local_18_path_0_4, k9t4p9_local_18_path_0_5, k9t4p9_local_18_path_0_6, k9t4p9_local_18_path_0_7, k9t4p9_local_18_path_0_8, k9t4p9_local_18_path_0_9, k9t4p9_local_18_path_0_10, k9t4p9_local_18_path_0_11⟩ + +private def k9t4p9_local_18_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, {0}, Finset.Icc 0 3, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, {0, 1}, {1}, {0}, {1}, ∅, ∅, ∅, ∅, {0, 1}], + #[Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_18_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_1) 0 j = k9t4p9_local_18_required_1 0 j := by decide + +private theorem k9t4p9_local_18_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_1) 1 j = k9t4p9_local_18_required_1 1 j := by decide + +private theorem k9t4p9_local_18_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_1) 2 j = k9t4p9_local_18_required_1 2 j := by decide + +private theorem k9t4p9_local_18_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_1) 3 j = k9t4p9_local_18_required_1 3 j := by decide + +private theorem k9t4p9_local_18_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_1) 4 j = k9t4p9_local_18_required_1 4 j := by decide + +private theorem k9t4p9_local_18_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_1) 5 j = k9t4p9_local_18_required_1 5 j := by decide + +private theorem k9t4p9_local_18_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_1) 6 j = k9t4p9_local_18_required_1 6 j := by decide + +private theorem k9t4p9_local_18_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_1) 7 j = k9t4p9_local_18_required_1 7 j := by decide + +private theorem k9t4p9_local_18_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_1) 8 j = k9t4p9_local_18_required_1 8 j := by decide + +private theorem k9t4p9_local_18_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_1) 9 j = k9t4p9_local_18_required_1 9 j := by decide + +private theorem k9t4p9_local_18_required_1_eq : (requiredMatrix 9 k9t4p9_step_18_required_block_1) = k9t4p9_local_18_required_1 := by + funext i j + fin_cases i + + · exact k9t4p9_local_18_required_1_eq_row_0 j + + · exact k9t4p9_local_18_required_1_eq_row_1 j + + · exact k9t4p9_local_18_required_1_eq_row_2 j + + · exact k9t4p9_local_18_required_1_eq_row_3 j + + · exact k9t4p9_local_18_required_1_eq_row_4 j + + · exact k9t4p9_local_18_required_1_eq_row_5 j + + · exact k9t4p9_local_18_required_1_eq_row_6 j + + · exact k9t4p9_local_18_required_1_eq_row_7 j + + · exact k9t4p9_local_18_required_1_eq_row_8 j + + · exact k9t4p9_local_18_required_1_eq_row_9 j + +private theorem k9t4p9_local_18_path_1_0 : (⟨6, 4, [5, 0, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_1_1 : (⟨6, 2, [5, 0, 8, 9, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_1_2 : (⟨6, 1, [5, 0, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_1_3 : (⟨6, 0, [7, 8, 9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_1_4 : (⟨6, 9, [7, 8, 0, 5, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_1_5 : (⟨6, 3, [7, 8, 0, 5, 4, 1, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_1_6 : (⟨6, 9, [7, 8, 0, 5, 4, 3, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_1_7 : (⟨6, 1, [7, 8, 0, 5, 4, 3, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_1_8 : (⟨7, 0, [6, 5, 4, 1, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_1_9 : (⟨7, 0, [6, 5, 4, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_1_10 : (⟨7, 0, [6, 5, 4, 3, 2, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_1_11 : (⟨7, 0, [6, 5, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_paths_block_1 : ∀ p ∈ k9t4p9_step_18_required_block_1, p.Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by + simp only [k9t4p9_step_18_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_18_path_1_0, k9t4p9_local_18_path_1_1, k9t4p9_local_18_path_1_2, k9t4p9_local_18_path_1_3, k9t4p9_local_18_path_1_4, k9t4p9_local_18_path_1_5, k9t4p9_local_18_path_1_6, k9t4p9_local_18_path_1_7, k9t4p9_local_18_path_1_8, k9t4p9_local_18_path_1_9, k9t4p9_local_18_path_1_10, k9t4p9_local_18_path_1_11⟩ + +private def k9t4p9_local_18_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, {1, 4}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 4}, {0, 1}, {0, 1}, {0}, {0, 1}, ∅, ∅, ∅, ∅, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_18_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_2) 0 j = k9t4p9_local_18_required_2 0 j := by decide + +private theorem k9t4p9_local_18_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_2) 1 j = k9t4p9_local_18_required_2 1 j := by decide + +private theorem k9t4p9_local_18_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_2) 2 j = k9t4p9_local_18_required_2 2 j := by decide + +private theorem k9t4p9_local_18_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_2) 3 j = k9t4p9_local_18_required_2 3 j := by decide + +private theorem k9t4p9_local_18_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_2) 4 j = k9t4p9_local_18_required_2 4 j := by decide + +private theorem k9t4p9_local_18_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_2) 5 j = k9t4p9_local_18_required_2 5 j := by decide + +private theorem k9t4p9_local_18_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_2) 6 j = k9t4p9_local_18_required_2 6 j := by decide + +private theorem k9t4p9_local_18_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_2) 7 j = k9t4p9_local_18_required_2 7 j := by decide + +private theorem k9t4p9_local_18_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_2) 8 j = k9t4p9_local_18_required_2 8 j := by decide + +private theorem k9t4p9_local_18_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_2) 9 j = k9t4p9_local_18_required_2 9 j := by decide + +private theorem k9t4p9_local_18_required_2_eq : (requiredMatrix 9 k9t4p9_step_18_required_block_2) = k9t4p9_local_18_required_2 := by + funext i j + fin_cases i + + · exact k9t4p9_local_18_required_2_eq_row_0 j + + · exact k9t4p9_local_18_required_2_eq_row_1 j + + · exact k9t4p9_local_18_required_2_eq_row_2 j + + · exact k9t4p9_local_18_required_2_eq_row_3 j + + · exact k9t4p9_local_18_required_2_eq_row_4 j + + · exact k9t4p9_local_18_required_2_eq_row_5 j + + · exact k9t4p9_local_18_required_2_eq_row_6 j + + · exact k9t4p9_local_18_required_2_eq_row_7 j + + · exact k9t4p9_local_18_required_2_eq_row_8 j + + · exact k9t4p9_local_18_required_2_eq_row_9 j + +private theorem k9t4p9_local_18_path_2_0 : (⟨7, 4, [6, 5, 0, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_2_1 : (⟨7, 4, [6, 5, 0, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_2_2 : (⟨7, 3, [6, 5, 0, 8, 9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_2_3 : (⟨7, 2, [6, 5, 0, 8, 9, 1, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_2_4 : (⟨7, 2, [6, 5, 0, 8, 9, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_2_5 : (⟨7, 1, [6, 5, 0, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_2_6 : (⟨7, 1, [6, 5, 0, 8, 9, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_2_7 : (⟨7, 0, [8, 9, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_2_8 : (⟨7, 9, [8, 0, 5, 4, 3, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_2_9 : (⟨0, 6, [5, 4, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_2_10 : (⟨0, 7, [5, 4, 3, 2, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_2_11 : (⟨0, 6, [5, 4, 3, 2, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_paths_block_2 : ∀ p ∈ k9t4p9_step_18_required_block_2, p.Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by + simp only [k9t4p9_step_18_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_18_path_2_0, k9t4p9_local_18_path_2_1, k9t4p9_local_18_path_2_2, k9t4p9_local_18_path_2_3, k9t4p9_local_18_path_2_4, k9t4p9_local_18_path_2_5, k9t4p9_local_18_path_2_6, k9t4p9_local_18_path_2_7, k9t4p9_local_18_path_2_8, k9t4p9_local_18_path_2_9, k9t4p9_local_18_path_2_10, k9t4p9_local_18_path_2_11⟩ + +private def k9t4p9_local_18_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, {0, 1}, {0, 1}, ∅, ∅, {0}, ∅, {0, 1}], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_18_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_3) 0 j = k9t4p9_local_18_required_3 0 j := by decide + +private theorem k9t4p9_local_18_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_3) 1 j = k9t4p9_local_18_required_3 1 j := by decide + +private theorem k9t4p9_local_18_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_3) 2 j = k9t4p9_local_18_required_3 2 j := by decide + +private theorem k9t4p9_local_18_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_3) 3 j = k9t4p9_local_18_required_3 3 j := by decide + +private theorem k9t4p9_local_18_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_3) 4 j = k9t4p9_local_18_required_3 4 j := by decide + +private theorem k9t4p9_local_18_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_3) 5 j = k9t4p9_local_18_required_3 5 j := by decide + +private theorem k9t4p9_local_18_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_3) 6 j = k9t4p9_local_18_required_3 6 j := by decide + +private theorem k9t4p9_local_18_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_3) 7 j = k9t4p9_local_18_required_3 7 j := by decide + +private theorem k9t4p9_local_18_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_3) 8 j = k9t4p9_local_18_required_3 8 j := by decide + +private theorem k9t4p9_local_18_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_18_required_block_3) 9 j = k9t4p9_local_18_required_3 9 j := by decide + +private theorem k9t4p9_local_18_required_3_eq : (requiredMatrix 9 k9t4p9_step_18_required_block_3) = k9t4p9_local_18_required_3 := by + funext i j + fin_cases i + + · exact k9t4p9_local_18_required_3_eq_row_0 j + + · exact k9t4p9_local_18_required_3_eq_row_1 j + + · exact k9t4p9_local_18_required_3_eq_row_2 j + + · exact k9t4p9_local_18_required_3_eq_row_3 j + + · exact k9t4p9_local_18_required_3_eq_row_4 j + + · exact k9t4p9_local_18_required_3_eq_row_5 j + + · exact k9t4p9_local_18_required_3_eq_row_6 j + + · exact k9t4p9_local_18_required_3_eq_row_7 j + + · exact k9t4p9_local_18_required_3_eq_row_8 j + + · exact k9t4p9_local_18_required_3_eq_row_9 j + +private theorem k9t4p9_local_18_path_3_0 : (⟨0, 3, [5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_3_1 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_3_2 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_3_3 : (⟨0, 3, [5, 6, 7, 8, 9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_3_4 : (⟨0, 2, [5, 6, 7, 8, 9, 1, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_3_5 : (⟨0, 2, [5, 6, 7, 8, 9, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_3_6 : (⟨0, 1, [5, 6, 7, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_3_7 : (⟨0, 1, [5, 6, 7, 8, 9, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_3_8 : (⟨0, 9, [8, 7, 6, 5, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_3_9 : (⟨0, 9, [8, 7, 6, 5, 4, 3, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_path_3_10 : (⟨0, 7, [8, 9, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by decide + +private theorem k9t4p9_local_18_paths_block_3 : ∀ p ∈ k9t4p9_step_18_required_block_3, p.Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by + simp only [k9t4p9_step_18_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_18_path_3_0, k9t4p9_local_18_path_3_1, k9t4p9_local_18_path_3_2, k9t4p9_local_18_path_3_3, k9t4p9_local_18_path_3_4, k9t4p9_local_18_path_3_5, k9t4p9_local_18_path_3_6, k9t4p9_local_18_path_3_7, k9t4p9_local_18_path_3_8, k9t4p9_local_18_path_3_9, k9t4p9_local_18_path_3_10⟩ + +private theorem k9t4p9_local_18_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_18 a b ∪ ((((k9t4p9_local_18_required_0 a b ∪ k9t4p9_local_18_required_1 a b) ∪ k9t4p9_local_18_required_2 a b) ∪ k9t4p9_local_18_required_3 a b))) 0 j = k9t4p9_local_18 0 j := by decide + +private theorem k9t4p9_local_18_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_18 a b ∪ ((((k9t4p9_local_18_required_0 a b ∪ k9t4p9_local_18_required_1 a b) ∪ k9t4p9_local_18_required_2 a b) ∪ k9t4p9_local_18_required_3 a b))) 1 j = k9t4p9_local_18 1 j := by decide + +private theorem k9t4p9_local_18_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_18 a b ∪ ((((k9t4p9_local_18_required_0 a b ∪ k9t4p9_local_18_required_1 a b) ∪ k9t4p9_local_18_required_2 a b) ∪ k9t4p9_local_18_required_3 a b))) 2 j = k9t4p9_local_18 2 j := by decide + +private theorem k9t4p9_local_18_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_18 a b ∪ ((((k9t4p9_local_18_required_0 a b ∪ k9t4p9_local_18_required_1 a b) ∪ k9t4p9_local_18_required_2 a b) ∪ k9t4p9_local_18_required_3 a b))) 3 j = k9t4p9_local_18 3 j := by decide + +private theorem k9t4p9_local_18_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_18 a b ∪ ((((k9t4p9_local_18_required_0 a b ∪ k9t4p9_local_18_required_1 a b) ∪ k9t4p9_local_18_required_2 a b) ∪ k9t4p9_local_18_required_3 a b))) 4 j = k9t4p9_local_18 4 j := by decide + +private theorem k9t4p9_local_18_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_18 a b ∪ ((((k9t4p9_local_18_required_0 a b ∪ k9t4p9_local_18_required_1 a b) ∪ k9t4p9_local_18_required_2 a b) ∪ k9t4p9_local_18_required_3 a b))) 5 j = k9t4p9_local_18 5 j := by decide + +private theorem k9t4p9_local_18_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_18 a b ∪ ((((k9t4p9_local_18_required_0 a b ∪ k9t4p9_local_18_required_1 a b) ∪ k9t4p9_local_18_required_2 a b) ∪ k9t4p9_local_18_required_3 a b))) 6 j = k9t4p9_local_18 6 j := by decide + +private theorem k9t4p9_local_18_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_18 a b ∪ ((((k9t4p9_local_18_required_0 a b ∪ k9t4p9_local_18_required_1 a b) ∪ k9t4p9_local_18_required_2 a b) ∪ k9t4p9_local_18_required_3 a b))) 7 j = k9t4p9_local_18 7 j := by decide + +private theorem k9t4p9_local_18_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_18 a b ∪ ((((k9t4p9_local_18_required_0 a b ∪ k9t4p9_local_18_required_1 a b) ∪ k9t4p9_local_18_required_2 a b) ∪ k9t4p9_local_18_required_3 a b))) 8 j = k9t4p9_local_18 8 j := by decide + +private theorem k9t4p9_local_18_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_18 a b ∪ ((((k9t4p9_local_18_required_0 a b ∪ k9t4p9_local_18_required_1 a b) ∪ k9t4p9_local_18_required_2 a b) ∪ k9t4p9_local_18_required_3 a b))) 9 j = k9t4p9_local_18 9 j := by decide + +private theorem k9t4p9_local_18_merged_eq : (fun a b => freshMatrix k9t4p9_state_18 a b ∪ ((((k9t4p9_local_18_required_0 a b ∪ k9t4p9_local_18_required_1 a b) ∪ k9t4p9_local_18_required_2 a b) ∪ k9t4p9_local_18_required_3 a b))) = k9t4p9_local_18 := by + funext i j + fin_cases i + + · exact k9t4p9_local_18_merged_eq_row_0 j + + · exact k9t4p9_local_18_merged_eq_row_1 j + + · exact k9t4p9_local_18_merged_eq_row_2 j + + · exact k9t4p9_local_18_merged_eq_row_3 j + + · exact k9t4p9_local_18_merged_eq_row_4 j + + · exact k9t4p9_local_18_merged_eq_row_5 j + + · exact k9t4p9_local_18_merged_eq_row_6 j + + · exact k9t4p9_local_18_merged_eq_row_7 j + + · exact k9t4p9_local_18_merged_eq_row_8 j + + · exact k9t4p9_local_18_merged_eq_row_9 j + +private theorem k9t4p9_local_18_eq : (fun a b => freshMatrix k9t4p9_state_18 a b ∪ requiredMatrix 9 k9t4p9_step_18_data.required a b) = k9t4p9_local_18 := by + funext a b + change freshMatrix k9t4p9_state_18 a b ∪ requiredMatrix 9 (k9t4p9_step_18_required_block_0 ++ k9t4p9_step_18_required_block_1 ++ k9t4p9_step_18_required_block_2 ++ k9t4p9_step_18_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p9_local_18_required_0_eq, k9t4p9_local_18_required_1_eq, k9t4p9_local_18_required_2_eq, k9t4p9_local_18_required_3_eq] + exact congrFun (congrFun k9t4p9_local_18_merged_eq a) b + +private theorem k9t4p9_local_18_paths : ∀ p ∈ k9t4p9_step_18_data.required, p.Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 := by + change ∀ p ∈ (k9t4p9_step_18_required_block_0 ++ k9t4p9_step_18_required_block_1 ++ k9t4p9_step_18_required_block_2 ++ k9t4p9_step_18_required_block_3), p.Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p9_local_18_paths_block_0, k9t4p9_local_18_paths_block_1⟩, k9t4p9_local_18_paths_block_2⟩, k9t4p9_local_18_paths_block_3⟩ + +private theorem k9t4p9_local_18_bad : k9t4p9_step_18_data.bad.Check (freshGraph k9t4p9.graph k9t4p9_step_18_data.i k9t4p9_step_18_data.j) k9t4p9_local_18 9 4 := by decide + +private theorem k9t4p9_step_18_check : k9t4p9_step_18.Check k9t4p9.graph k9t4p9_state_18 9 4 := by + change k9t4p9_step_18_data.Check k9t4p9.graph k9t4p9_state_18 9 4 + refine ⟨by decide, k9t4p9_local_18_paths, ?_⟩ + rw [k9t4p9_local_18_eq] + exact k9t4p9_local_18_bad + +private theorem k9t4p9_update_18 : k9t4p9_step_18.apply k9t4p9_state_18 = k9t4p9_state_19 := by + have h : ∀ i j : Fin 9, k9t4p9_step_18.apply k9t4p9_state_18 i j = k9t4p9_state_19 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_20 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_19 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_19_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p9_state_19 a b ∪ requiredMatrix 9 k9t4p9_step_19_data.required a b) 0 j = k9t4p9_local_19 0 j := by decide + +private theorem k9t4p9_local_19_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p9_state_19 a b ∪ requiredMatrix 9 k9t4p9_step_19_data.required a b) 1 j = k9t4p9_local_19 1 j := by decide + +private theorem k9t4p9_local_19_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p9_state_19 a b ∪ requiredMatrix 9 k9t4p9_step_19_data.required a b) 2 j = k9t4p9_local_19 2 j := by decide + +private theorem k9t4p9_local_19_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p9_state_19 a b ∪ requiredMatrix 9 k9t4p9_step_19_data.required a b) 3 j = k9t4p9_local_19 3 j := by decide + +private theorem k9t4p9_local_19_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p9_state_19 a b ∪ requiredMatrix 9 k9t4p9_step_19_data.required a b) 4 j = k9t4p9_local_19 4 j := by decide + +private theorem k9t4p9_local_19_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p9_state_19 a b ∪ requiredMatrix 9 k9t4p9_step_19_data.required a b) 5 j = k9t4p9_local_19 5 j := by decide + +private theorem k9t4p9_local_19_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p9_state_19 a b ∪ requiredMatrix 9 k9t4p9_step_19_data.required a b) 6 j = k9t4p9_local_19 6 j := by decide + +private theorem k9t4p9_local_19_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p9_state_19 a b ∪ requiredMatrix 9 k9t4p9_step_19_data.required a b) 7 j = k9t4p9_local_19 7 j := by decide + +private theorem k9t4p9_local_19_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p9_state_19 a b ∪ requiredMatrix 9 k9t4p9_step_19_data.required a b) 8 j = k9t4p9_local_19 8 j := by decide + +private theorem k9t4p9_local_19_eq : (fun a b => k9t4p9_state_19 a b ∪ requiredMatrix 9 k9t4p9_step_19_data.required a b) = k9t4p9_local_19 := by + funext i j + fin_cases i + + · exact k9t4p9_local_19_eq_row_0 j + + · exact k9t4p9_local_19_eq_row_1 j + + · exact k9t4p9_local_19_eq_row_2 j + + · exact k9t4p9_local_19_eq_row_3 j + + · exact k9t4p9_local_19_eq_row_4 j + + · exact k9t4p9_local_19_eq_row_5 j + + · exact k9t4p9_local_19_eq_row_6 j + + · exact k9t4p9_local_19_eq_row_7 j + + · exact k9t4p9_local_19_eq_row_8 j + +private theorem k9t4p9_local_19_paths : ∀ p ∈ k9t4p9_step_19_data.required, p.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_19_data.i k9t4p9_step_19_data.j) 9 := by decide + +private theorem k9t4p9_local_19_bad : k9t4p9_step_19_data.bad.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_19_data.i k9t4p9_step_19_data.j) k9t4p9_local_19 9 4 := by decide + +private theorem k9t4p9_step_19_check : k9t4p9_step_19.Check k9t4p9.graph k9t4p9_state_19 9 4 := by + change k9t4p9_step_19_data.Check k9t4p9.graph k9t4p9_state_19 9 4 + refine ⟨k9t4p9_local_19_paths, ?_⟩ + rw [k9t4p9_local_19_eq] + exact k9t4p9_local_19_bad + +private theorem k9t4p9_update_19 : k9t4p9_step_19.apply k9t4p9_state_19 = k9t4p9_state_20 := by + have h : ∀ i j : Fin 9, k9t4p9_step_19.apply k9t4p9_state_19 i j = k9t4p9_state_20 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_21 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 4 7], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_20 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0}, ∅, Finset.Icc 0 4, ∅, Finset.Icc 0 4, ∅, Finset.Icc 0 3, ∅, {0}], + #[{0}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[∅, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 0 4, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[∅, {2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 0 4, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 4 7], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0}, {1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 0 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_20_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_20 a b ∪ requiredMatrix 9 k9t4p9_step_20_data.required a b) 0 j = k9t4p9_local_20 0 j := by decide + +private theorem k9t4p9_local_20_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_20 a b ∪ requiredMatrix 9 k9t4p9_step_20_data.required a b) 1 j = k9t4p9_local_20 1 j := by decide + +private theorem k9t4p9_local_20_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_20 a b ∪ requiredMatrix 9 k9t4p9_step_20_data.required a b) 2 j = k9t4p9_local_20 2 j := by decide + +private theorem k9t4p9_local_20_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_20 a b ∪ requiredMatrix 9 k9t4p9_step_20_data.required a b) 3 j = k9t4p9_local_20 3 j := by decide + +private theorem k9t4p9_local_20_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_20 a b ∪ requiredMatrix 9 k9t4p9_step_20_data.required a b) 4 j = k9t4p9_local_20 4 j := by decide + +private theorem k9t4p9_local_20_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_20 a b ∪ requiredMatrix 9 k9t4p9_step_20_data.required a b) 5 j = k9t4p9_local_20 5 j := by decide + +private theorem k9t4p9_local_20_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_20 a b ∪ requiredMatrix 9 k9t4p9_step_20_data.required a b) 6 j = k9t4p9_local_20 6 j := by decide + +private theorem k9t4p9_local_20_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_20 a b ∪ requiredMatrix 9 k9t4p9_step_20_data.required a b) 7 j = k9t4p9_local_20 7 j := by decide + +private theorem k9t4p9_local_20_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_20 a b ∪ requiredMatrix 9 k9t4p9_step_20_data.required a b) 8 j = k9t4p9_local_20 8 j := by decide + +private theorem k9t4p9_local_20_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_20 a b ∪ requiredMatrix 9 k9t4p9_step_20_data.required a b) 9 j = k9t4p9_local_20 9 j := by decide + +private theorem k9t4p9_local_20_eq : (fun a b => freshMatrix k9t4p9_state_20 a b ∪ requiredMatrix 9 k9t4p9_step_20_data.required a b) = k9t4p9_local_20 := by + funext i j + fin_cases i + + · exact k9t4p9_local_20_eq_row_0 j + + · exact k9t4p9_local_20_eq_row_1 j + + · exact k9t4p9_local_20_eq_row_2 j + + · exact k9t4p9_local_20_eq_row_3 j + + · exact k9t4p9_local_20_eq_row_4 j + + · exact k9t4p9_local_20_eq_row_5 j + + · exact k9t4p9_local_20_eq_row_6 j + + · exact k9t4p9_local_20_eq_row_7 j + + · exact k9t4p9_local_20_eq_row_8 j + + · exact k9t4p9_local_20_eq_row_9 j + +private theorem k9t4p9_local_20_paths : ∀ p ∈ k9t4p9_step_20_data.required, p.Check (freshGraph k9t4p9.graph k9t4p9_step_20_data.i k9t4p9_step_20_data.j) 9 := by decide + +private theorem k9t4p9_local_20_bad : k9t4p9_step_20_data.bad.Check (freshGraph k9t4p9.graph k9t4p9_step_20_data.i k9t4p9_step_20_data.j) k9t4p9_local_20 9 4 := by decide + +private theorem k9t4p9_step_20_check : k9t4p9_step_20.Check k9t4p9.graph k9t4p9_state_20 9 4 := by + change k9t4p9_step_20_data.Check k9t4p9.graph k9t4p9_state_20 9 4 + refine ⟨by decide, k9t4p9_local_20_paths, ?_⟩ + rw [k9t4p9_local_20_eq] + exact k9t4p9_local_20_bad + +private theorem k9t4p9_update_20 : k9t4p9_step_20.apply k9t4p9_state_20 = k9t4p9_state_21 := by + have h : ∀ i j : Fin 9, k9t4p9_step_20.apply k9t4p9_state_20 i j = k9t4p9_state_21 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_22 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, {1, 4, 5, 6, 7}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_21 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, {0, 1}, ∅, {0, 1}, {1}, Finset.Icc 0 4, ∅], + #[Finset.Icc 0 5, ∅, {1, 2, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3, 5, 6, 7, 8}], + #[{0, 1}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 7, {2, 3}], + #[Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{0, 1}, {2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, {0, 1}, ∅], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 4 7], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[{1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 6, {0, 1}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, Finset.Icc 4 7, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_21_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, {0, 3, 4}, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, {0, 1}, {1}, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 3, 4}, ∅, ∅, ∅, ∅, ∅, {0}, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0}, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_21_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_0) 0 j = k9t4p9_local_21_required_0 0 j := by decide + +private theorem k9t4p9_local_21_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_0) 1 j = k9t4p9_local_21_required_0 1 j := by decide + +private theorem k9t4p9_local_21_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_0) 2 j = k9t4p9_local_21_required_0 2 j := by decide + +private theorem k9t4p9_local_21_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_0) 3 j = k9t4p9_local_21_required_0 3 j := by decide + +private theorem k9t4p9_local_21_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_0) 4 j = k9t4p9_local_21_required_0 4 j := by decide + +private theorem k9t4p9_local_21_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_0) 5 j = k9t4p9_local_21_required_0 5 j := by decide + +private theorem k9t4p9_local_21_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_0) 6 j = k9t4p9_local_21_required_0 6 j := by decide + +private theorem k9t4p9_local_21_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_0) 7 j = k9t4p9_local_21_required_0 7 j := by decide + +private theorem k9t4p9_local_21_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_0) 8 j = k9t4p9_local_21_required_0 8 j := by decide + +private theorem k9t4p9_local_21_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_0) 9 j = k9t4p9_local_21_required_0 9 j := by decide + +private theorem k9t4p9_local_21_required_0_eq : (requiredMatrix 9 k9t4p9_step_21_required_block_0) = k9t4p9_local_21_required_0 := by + funext i j + fin_cases i + + · exact k9t4p9_local_21_required_0_eq_row_0 j + + · exact k9t4p9_local_21_required_0_eq_row_1 j + + · exact k9t4p9_local_21_required_0_eq_row_2 j + + · exact k9t4p9_local_21_required_0_eq_row_3 j + + · exact k9t4p9_local_21_required_0_eq_row_4 j + + · exact k9t4p9_local_21_required_0_eq_row_5 j + + · exact k9t4p9_local_21_required_0_eq_row_6 j + + · exact k9t4p9_local_21_required_0_eq_row_7 j + + · exact k9t4p9_local_21_required_0_eq_row_8 j + + · exact k9t4p9_local_21_required_0_eq_row_9 j + +private theorem k9t4p9_local_21_path_0_0 : (⟨1, 0, [2, 3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_0_1 : (⟨1, 7, [2, 3, 4, 5, 0, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_0_2 : (⟨1, 6, [2, 3, 4, 5, 0, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_0_3 : (⟨1, 8, [2, 3, 4, 9, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_0_4 : (⟨1, 0, [2, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_0_5 : (⟨1, 6, [2, 4, 5, 0, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_0_6 : (⟨1, 0, [2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_0_7 : (⟨3, 0, [2, 1, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_0_8 : (⟨3, 0, [2, 1, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_0_9 : (⟨3, 6, [2, 1, 4, 5, 0, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_0_10 : (⟨3, 8, [2, 1, 4, 9, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_0_11 : (⟨3, 0, [2, 1, 9, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_paths_block_0 : ∀ p ∈ k9t4p9_step_21_required_block_0, p.Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by + simp only [k9t4p9_step_21_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_21_path_0_0, k9t4p9_local_21_path_0_1, k9t4p9_local_21_path_0_2, k9t4p9_local_21_path_0_3, k9t4p9_local_21_path_0_4, k9t4p9_local_21_path_0_5, k9t4p9_local_21_path_0_6, k9t4p9_local_21_path_0_7, k9t4p9_local_21_path_0_8, k9t4p9_local_21_path_0_9, k9t4p9_local_21_path_0_10, k9t4p9_local_21_path_0_11⟩ + +private def k9t4p9_local_21_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, {1, 2, 5}, ∅, ∅, {1}, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, {3}, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[{1, 2, 5}, {3}, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, {0}, {0}, {0}, {0, 1}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_21_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_1) 0 j = k9t4p9_local_21_required_1 0 j := by decide + +private theorem k9t4p9_local_21_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_1) 1 j = k9t4p9_local_21_required_1 1 j := by decide + +private theorem k9t4p9_local_21_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_1) 2 j = k9t4p9_local_21_required_1 2 j := by decide + +private theorem k9t4p9_local_21_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_1) 3 j = k9t4p9_local_21_required_1 3 j := by decide + +private theorem k9t4p9_local_21_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_1) 4 j = k9t4p9_local_21_required_1 4 j := by decide + +private theorem k9t4p9_local_21_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_1) 5 j = k9t4p9_local_21_required_1 5 j := by decide + +private theorem k9t4p9_local_21_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_1) 6 j = k9t4p9_local_21_required_1 6 j := by decide + +private theorem k9t4p9_local_21_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_1) 7 j = k9t4p9_local_21_required_1 7 j := by decide + +private theorem k9t4p9_local_21_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_1) 8 j = k9t4p9_local_21_required_1 8 j := by decide + +private theorem k9t4p9_local_21_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_1) 9 j = k9t4p9_local_21_required_1 9 j := by decide + +private theorem k9t4p9_local_21_required_1_eq : (requiredMatrix 9 k9t4p9_step_21_required_block_1) = k9t4p9_local_21_required_1 := by + funext i j + fin_cases i + + · exact k9t4p9_local_21_required_1_eq_row_0 j + + · exact k9t4p9_local_21_required_1_eq_row_1 j + + · exact k9t4p9_local_21_required_1_eq_row_2 j + + · exact k9t4p9_local_21_required_1_eq_row_3 j + + · exact k9t4p9_local_21_required_1_eq_row_4 j + + · exact k9t4p9_local_21_required_1_eq_row_5 j + + · exact k9t4p9_local_21_required_1_eq_row_6 j + + · exact k9t4p9_local_21_required_1_eq_row_7 j + + · exact k9t4p9_local_21_required_1_eq_row_8 j + + · exact k9t4p9_local_21_required_1_eq_row_9 j + +private theorem k9t4p9_local_21_path_1_0 : (⟨3, 0, [2, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_1_1 : (⟨3, 0, [2, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_1_2 : (⟨3, 0, [2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_1_3 : (⟨3, 1, [2, 9, 0, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_1_4 : (⟨8, 0, [7, 6, 5, 4, 1, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_1_5 : (⟨8, 0, [7, 6, 5, 4, 3, 2, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_1_6 : (⟨8, 4, [7, 6, 5, 0, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_1_7 : (⟨8, 4, [7, 6, 5, 0, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_1_8 : (⟨8, 3, [7, 6, 5, 0, 9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_1_9 : (⟨8, 2, [7, 6, 5, 0, 9, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_1_10 : (⟨8, 1, [7, 6, 5, 0, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_1_11 : (⟨0, 6, [5, 4, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_paths_block_1 : ∀ p ∈ k9t4p9_step_21_required_block_1, p.Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by + simp only [k9t4p9_step_21_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_21_path_1_0, k9t4p9_local_21_path_1_1, k9t4p9_local_21_path_1_2, k9t4p9_local_21_path_1_3, k9t4p9_local_21_path_1_4, k9t4p9_local_21_path_1_5, k9t4p9_local_21_path_1_6, k9t4p9_local_21_path_1_7, k9t4p9_local_21_path_1_8, k9t4p9_local_21_path_1_9, k9t4p9_local_21_path_1_10, k9t4p9_local_21_path_1_11⟩ + +private def k9t4p9_local_21_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {3, 4, 5}, {0}, ∅, {0, 1}, ∅, {0}, {1}, {0, 1, 2, 4}, ∅], + #[{3, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_21_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_2) 0 j = k9t4p9_local_21_required_2 0 j := by decide + +private theorem k9t4p9_local_21_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_2) 1 j = k9t4p9_local_21_required_2 1 j := by decide + +private theorem k9t4p9_local_21_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_2) 2 j = k9t4p9_local_21_required_2 2 j := by decide + +private theorem k9t4p9_local_21_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_2) 3 j = k9t4p9_local_21_required_2 3 j := by decide + +private theorem k9t4p9_local_21_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_2) 4 j = k9t4p9_local_21_required_2 4 j := by decide + +private theorem k9t4p9_local_21_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_2) 5 j = k9t4p9_local_21_required_2 5 j := by decide + +private theorem k9t4p9_local_21_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_2) 6 j = k9t4p9_local_21_required_2 6 j := by decide + +private theorem k9t4p9_local_21_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_2) 7 j = k9t4p9_local_21_required_2 7 j := by decide + +private theorem k9t4p9_local_21_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_2) 8 j = k9t4p9_local_21_required_2 8 j := by decide + +private theorem k9t4p9_local_21_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_2) 9 j = k9t4p9_local_21_required_2 9 j := by decide + +private theorem k9t4p9_local_21_required_2_eq : (requiredMatrix 9 k9t4p9_step_21_required_block_2) = k9t4p9_local_21_required_2 := by + funext i j + fin_cases i + + · exact k9t4p9_local_21_required_2_eq_row_0 j + + · exact k9t4p9_local_21_required_2_eq_row_1 j + + · exact k9t4p9_local_21_required_2_eq_row_2 j + + · exact k9t4p9_local_21_required_2_eq_row_3 j + + · exact k9t4p9_local_21_required_2_eq_row_4 j + + · exact k9t4p9_local_21_required_2_eq_row_5 j + + · exact k9t4p9_local_21_required_2_eq_row_6 j + + · exact k9t4p9_local_21_required_2_eq_row_7 j + + · exact k9t4p9_local_21_required_2_eq_row_8 j + + · exact k9t4p9_local_21_required_2_eq_row_9 j + +private theorem k9t4p9_local_21_path_2_0 : (⟨0, 8, [5, 4, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_2_1 : (⟨0, 6, [5, 4, 3, 2, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_2_2 : (⟨0, 1, [5, 4, 3, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_2_3 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_2_4 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_2_5 : (⟨0, 2, [5, 6, 7, 8, 9, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_2_6 : (⟨0, 7, [9, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_2_7 : (⟨0, 8, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_2_8 : (⟨0, 8, [9, 1, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_2_9 : (⟨0, 8, [9, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_2_10 : (⟨0, 1, [9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_2_11 : (⟨0, 1, [9, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_paths_block_2 : ∀ p ∈ k9t4p9_step_21_required_block_2, p.Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by + simp only [k9t4p9_step_21_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_21_path_2_0, k9t4p9_local_21_path_2_1, k9t4p9_local_21_path_2_2, k9t4p9_local_21_path_2_3, k9t4p9_local_21_path_2_4, k9t4p9_local_21_path_2_5, k9t4p9_local_21_path_2_6, k9t4p9_local_21_path_2_7, k9t4p9_local_21_path_2_8, k9t4p9_local_21_path_2_9, k9t4p9_local_21_path_2_10, k9t4p9_local_21_path_2_11⟩ + +private def k9t4p9_local_21_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, {1}, {0, 1}, ∅, ∅, ∅, ∅, {3}, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_21_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_3) 0 j = k9t4p9_local_21_required_3 0 j := by decide + +private theorem k9t4p9_local_21_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_3) 1 j = k9t4p9_local_21_required_3 1 j := by decide + +private theorem k9t4p9_local_21_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_3) 2 j = k9t4p9_local_21_required_3 2 j := by decide + +private theorem k9t4p9_local_21_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_3) 3 j = k9t4p9_local_21_required_3 3 j := by decide + +private theorem k9t4p9_local_21_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_3) 4 j = k9t4p9_local_21_required_3 4 j := by decide + +private theorem k9t4p9_local_21_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_3) 5 j = k9t4p9_local_21_required_3 5 j := by decide + +private theorem k9t4p9_local_21_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_3) 6 j = k9t4p9_local_21_required_3 6 j := by decide + +private theorem k9t4p9_local_21_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_3) 7 j = k9t4p9_local_21_required_3 7 j := by decide + +private theorem k9t4p9_local_21_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_3) 8 j = k9t4p9_local_21_required_3 8 j := by decide + +private theorem k9t4p9_local_21_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p9_step_21_required_block_3) 9 j = k9t4p9_local_21_required_3 9 j := by decide + +private theorem k9t4p9_local_21_required_3_eq : (requiredMatrix 9 k9t4p9_step_21_required_block_3) = k9t4p9_local_21_required_3 := by + funext i j + fin_cases i + + · exact k9t4p9_local_21_required_3_eq_row_0 j + + · exact k9t4p9_local_21_required_3_eq_row_1 j + + · exact k9t4p9_local_21_required_3_eq_row_2 j + + · exact k9t4p9_local_21_required_3_eq_row_3 j + + · exact k9t4p9_local_21_required_3_eq_row_4 j + + · exact k9t4p9_local_21_required_3_eq_row_5 j + + · exact k9t4p9_local_21_required_3_eq_row_6 j + + · exact k9t4p9_local_21_required_3_eq_row_7 j + + · exact k9t4p9_local_21_required_3_eq_row_8 j + + · exact k9t4p9_local_21_required_3_eq_row_9 j + +private theorem k9t4p9_local_21_path_3_0 : (⟨0, 8, [9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_3_1 : (⟨0, 1, [9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_3_2 : (⟨0, 2, [9, 8, 7, 6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_3_3 : (⟨0, 3, [9, 8, 7, 6, 5, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_3_4 : (⟨0, 1, [9, 8, 7, 6, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_3_5 : (⟨0, 3, [9, 8, 7, 6, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_path_3_6 : (⟨0, 1, [9, 8, 7, 6, 5, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by decide + +private theorem k9t4p9_local_21_paths_block_3 : ∀ p ∈ k9t4p9_step_21_required_block_3, p.Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by + simp only [k9t4p9_step_21_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_local_21_path_3_0, k9t4p9_local_21_path_3_1, k9t4p9_local_21_path_3_2, k9t4p9_local_21_path_3_3, k9t4p9_local_21_path_3_4, k9t4p9_local_21_path_3_5, k9t4p9_local_21_path_3_6⟩ + +private theorem k9t4p9_local_21_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_21 a b ∪ ((((k9t4p9_local_21_required_0 a b ∪ k9t4p9_local_21_required_1 a b) ∪ k9t4p9_local_21_required_2 a b) ∪ k9t4p9_local_21_required_3 a b))) 0 j = k9t4p9_local_21 0 j := by decide + +private theorem k9t4p9_local_21_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_21 a b ∪ ((((k9t4p9_local_21_required_0 a b ∪ k9t4p9_local_21_required_1 a b) ∪ k9t4p9_local_21_required_2 a b) ∪ k9t4p9_local_21_required_3 a b))) 1 j = k9t4p9_local_21 1 j := by decide + +private theorem k9t4p9_local_21_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_21 a b ∪ ((((k9t4p9_local_21_required_0 a b ∪ k9t4p9_local_21_required_1 a b) ∪ k9t4p9_local_21_required_2 a b) ∪ k9t4p9_local_21_required_3 a b))) 2 j = k9t4p9_local_21 2 j := by decide + +private theorem k9t4p9_local_21_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_21 a b ∪ ((((k9t4p9_local_21_required_0 a b ∪ k9t4p9_local_21_required_1 a b) ∪ k9t4p9_local_21_required_2 a b) ∪ k9t4p9_local_21_required_3 a b))) 3 j = k9t4p9_local_21 3 j := by decide + +private theorem k9t4p9_local_21_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_21 a b ∪ ((((k9t4p9_local_21_required_0 a b ∪ k9t4p9_local_21_required_1 a b) ∪ k9t4p9_local_21_required_2 a b) ∪ k9t4p9_local_21_required_3 a b))) 4 j = k9t4p9_local_21 4 j := by decide + +private theorem k9t4p9_local_21_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_21 a b ∪ ((((k9t4p9_local_21_required_0 a b ∪ k9t4p9_local_21_required_1 a b) ∪ k9t4p9_local_21_required_2 a b) ∪ k9t4p9_local_21_required_3 a b))) 5 j = k9t4p9_local_21 5 j := by decide + +private theorem k9t4p9_local_21_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_21 a b ∪ ((((k9t4p9_local_21_required_0 a b ∪ k9t4p9_local_21_required_1 a b) ∪ k9t4p9_local_21_required_2 a b) ∪ k9t4p9_local_21_required_3 a b))) 6 j = k9t4p9_local_21 6 j := by decide + +private theorem k9t4p9_local_21_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_21 a b ∪ ((((k9t4p9_local_21_required_0 a b ∪ k9t4p9_local_21_required_1 a b) ∪ k9t4p9_local_21_required_2 a b) ∪ k9t4p9_local_21_required_3 a b))) 7 j = k9t4p9_local_21 7 j := by decide + +private theorem k9t4p9_local_21_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_21 a b ∪ ((((k9t4p9_local_21_required_0 a b ∪ k9t4p9_local_21_required_1 a b) ∪ k9t4p9_local_21_required_2 a b) ∪ k9t4p9_local_21_required_3 a b))) 8 j = k9t4p9_local_21 8 j := by decide + +private theorem k9t4p9_local_21_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_21 a b ∪ ((((k9t4p9_local_21_required_0 a b ∪ k9t4p9_local_21_required_1 a b) ∪ k9t4p9_local_21_required_2 a b) ∪ k9t4p9_local_21_required_3 a b))) 9 j = k9t4p9_local_21 9 j := by decide + +private theorem k9t4p9_local_21_merged_eq : (fun a b => freshMatrix k9t4p9_state_21 a b ∪ ((((k9t4p9_local_21_required_0 a b ∪ k9t4p9_local_21_required_1 a b) ∪ k9t4p9_local_21_required_2 a b) ∪ k9t4p9_local_21_required_3 a b))) = k9t4p9_local_21 := by + funext i j + fin_cases i + + · exact k9t4p9_local_21_merged_eq_row_0 j + + · exact k9t4p9_local_21_merged_eq_row_1 j + + · exact k9t4p9_local_21_merged_eq_row_2 j + + · exact k9t4p9_local_21_merged_eq_row_3 j + + · exact k9t4p9_local_21_merged_eq_row_4 j + + · exact k9t4p9_local_21_merged_eq_row_5 j + + · exact k9t4p9_local_21_merged_eq_row_6 j + + · exact k9t4p9_local_21_merged_eq_row_7 j + + · exact k9t4p9_local_21_merged_eq_row_8 j + + · exact k9t4p9_local_21_merged_eq_row_9 j + +private theorem k9t4p9_local_21_eq : (fun a b => freshMatrix k9t4p9_state_21 a b ∪ requiredMatrix 9 k9t4p9_step_21_data.required a b) = k9t4p9_local_21 := by + funext a b + change freshMatrix k9t4p9_state_21 a b ∪ requiredMatrix 9 (k9t4p9_step_21_required_block_0 ++ k9t4p9_step_21_required_block_1 ++ k9t4p9_step_21_required_block_2 ++ k9t4p9_step_21_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p9_local_21_required_0_eq, k9t4p9_local_21_required_1_eq, k9t4p9_local_21_required_2_eq, k9t4p9_local_21_required_3_eq] + exact congrFun (congrFun k9t4p9_local_21_merged_eq a) b + +private theorem k9t4p9_local_21_paths : ∀ p ∈ k9t4p9_step_21_data.required, p.Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 := by + change ∀ p ∈ (k9t4p9_step_21_required_block_0 ++ k9t4p9_step_21_required_block_1 ++ k9t4p9_step_21_required_block_2 ++ k9t4p9_step_21_required_block_3), p.Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p9_local_21_paths_block_0, k9t4p9_local_21_paths_block_1⟩, k9t4p9_local_21_paths_block_2⟩, k9t4p9_local_21_paths_block_3⟩ + +private theorem k9t4p9_local_21_bad : k9t4p9_step_21_data.bad.Check (freshGraph k9t4p9.graph k9t4p9_step_21_data.i k9t4p9_step_21_data.j) k9t4p9_local_21 9 4 := by decide + +private theorem k9t4p9_step_21_check : k9t4p9_step_21.Check k9t4p9.graph k9t4p9_state_21 9 4 := by + change k9t4p9_step_21_data.Check k9t4p9.graph k9t4p9_state_21 9 4 + refine ⟨by decide, k9t4p9_local_21_paths, ?_⟩ + rw [k9t4p9_local_21_eq] + exact k9t4p9_local_21_bad + +private theorem k9t4p9_update_21 : k9t4p9_step_21.apply k9t4p9_state_21 = k9t4p9_state_22 := by + have h : ∀ i j : Fin 9, k9t4p9_step_21.apply k9t4p9_state_21 i j = k9t4p9_state_22 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_23 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, {1, 4, 5, 6, 7}, {0}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_22 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 0 6, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, {1, 4, 5, 6, 7}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_22_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p9_state_22 a b ∪ requiredMatrix 9 k9t4p9_step_22_data.required a b) 0 j = k9t4p9_local_22 0 j := by decide + +private theorem k9t4p9_local_22_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p9_state_22 a b ∪ requiredMatrix 9 k9t4p9_step_22_data.required a b) 1 j = k9t4p9_local_22 1 j := by decide + +private theorem k9t4p9_local_22_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p9_state_22 a b ∪ requiredMatrix 9 k9t4p9_step_22_data.required a b) 2 j = k9t4p9_local_22 2 j := by decide + +private theorem k9t4p9_local_22_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p9_state_22 a b ∪ requiredMatrix 9 k9t4p9_step_22_data.required a b) 3 j = k9t4p9_local_22 3 j := by decide + +private theorem k9t4p9_local_22_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p9_state_22 a b ∪ requiredMatrix 9 k9t4p9_step_22_data.required a b) 4 j = k9t4p9_local_22 4 j := by decide + +private theorem k9t4p9_local_22_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p9_state_22 a b ∪ requiredMatrix 9 k9t4p9_step_22_data.required a b) 5 j = k9t4p9_local_22 5 j := by decide + +private theorem k9t4p9_local_22_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p9_state_22 a b ∪ requiredMatrix 9 k9t4p9_step_22_data.required a b) 6 j = k9t4p9_local_22 6 j := by decide + +private theorem k9t4p9_local_22_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p9_state_22 a b ∪ requiredMatrix 9 k9t4p9_step_22_data.required a b) 7 j = k9t4p9_local_22 7 j := by decide + +private theorem k9t4p9_local_22_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p9_state_22 a b ∪ requiredMatrix 9 k9t4p9_step_22_data.required a b) 8 j = k9t4p9_local_22 8 j := by decide + +private theorem k9t4p9_local_22_eq : (fun a b => k9t4p9_state_22 a b ∪ requiredMatrix 9 k9t4p9_step_22_data.required a b) = k9t4p9_local_22 := by + funext i j + fin_cases i + + · exact k9t4p9_local_22_eq_row_0 j + + · exact k9t4p9_local_22_eq_row_1 j + + · exact k9t4p9_local_22_eq_row_2 j + + · exact k9t4p9_local_22_eq_row_3 j + + · exact k9t4p9_local_22_eq_row_4 j + + · exact k9t4p9_local_22_eq_row_5 j + + · exact k9t4p9_local_22_eq_row_6 j + + · exact k9t4p9_local_22_eq_row_7 j + + · exact k9t4p9_local_22_eq_row_8 j + +private theorem k9t4p9_local_22_paths : ∀ p ∈ k9t4p9_step_22_data.required, p.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_22_data.i k9t4p9_step_22_data.j) 9 := by decide + +private theorem k9t4p9_local_22_bad : k9t4p9_step_22_data.bad.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_22_data.i k9t4p9_step_22_data.j) k9t4p9_local_22 9 4 := by decide + +private theorem k9t4p9_step_22_check : k9t4p9_step_22.Check k9t4p9.graph k9t4p9_state_22 9 4 := by + change k9t4p9_step_22_data.Check k9t4p9.graph k9t4p9_state_22 9 4 + refine ⟨k9t4p9_local_22_paths, ?_⟩ + rw [k9t4p9_local_22_eq] + exact k9t4p9_local_22_bad + +private theorem k9t4p9_update_22 : k9t4p9_step_22.apply k9t4p9_state_22 = k9t4p9_state_23 := by + have h : ∀ i j : Fin 9, k9t4p9_step_22.apply k9t4p9_state_22 i j = k9t4p9_state_23 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_24 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, {1, 4, 5, 6, 7}, {0, 1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_23 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, {0, 1, 2}, ∅, {0, 1, 2}, ∅, ∅, {0, 1, 2}, ∅], + #[{0, 1, 2}, ∅, {1, 2, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[∅, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{0, 1, 2}, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[∅, {2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, {1, 2}, ∅], + #[{0, 1, 2}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 0 6, {1, 4, 5, 6, 7}], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0}], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[{0, 1, 2}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, {1, 2}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, {1, 4, 5, 6, 7}, {0}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_23_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_23 a b ∪ requiredMatrix 9 k9t4p9_step_23_data.required a b) 0 j = k9t4p9_local_23 0 j := by decide + +private theorem k9t4p9_local_23_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_23 a b ∪ requiredMatrix 9 k9t4p9_step_23_data.required a b) 1 j = k9t4p9_local_23 1 j := by decide + +private theorem k9t4p9_local_23_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_23 a b ∪ requiredMatrix 9 k9t4p9_step_23_data.required a b) 2 j = k9t4p9_local_23 2 j := by decide + +private theorem k9t4p9_local_23_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_23 a b ∪ requiredMatrix 9 k9t4p9_step_23_data.required a b) 3 j = k9t4p9_local_23 3 j := by decide + +private theorem k9t4p9_local_23_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_23 a b ∪ requiredMatrix 9 k9t4p9_step_23_data.required a b) 4 j = k9t4p9_local_23 4 j := by decide + +private theorem k9t4p9_local_23_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_23 a b ∪ requiredMatrix 9 k9t4p9_step_23_data.required a b) 5 j = k9t4p9_local_23 5 j := by decide + +private theorem k9t4p9_local_23_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_23 a b ∪ requiredMatrix 9 k9t4p9_step_23_data.required a b) 6 j = k9t4p9_local_23 6 j := by decide + +private theorem k9t4p9_local_23_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_23 a b ∪ requiredMatrix 9 k9t4p9_step_23_data.required a b) 7 j = k9t4p9_local_23 7 j := by decide + +private theorem k9t4p9_local_23_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_23 a b ∪ requiredMatrix 9 k9t4p9_step_23_data.required a b) 8 j = k9t4p9_local_23 8 j := by decide + +private theorem k9t4p9_local_23_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_23 a b ∪ requiredMatrix 9 k9t4p9_step_23_data.required a b) 9 j = k9t4p9_local_23 9 j := by decide + +private theorem k9t4p9_local_23_eq : (fun a b => freshMatrix k9t4p9_state_23 a b ∪ requiredMatrix 9 k9t4p9_step_23_data.required a b) = k9t4p9_local_23 := by + funext i j + fin_cases i + + · exact k9t4p9_local_23_eq_row_0 j + + · exact k9t4p9_local_23_eq_row_1 j + + · exact k9t4p9_local_23_eq_row_2 j + + · exact k9t4p9_local_23_eq_row_3 j + + · exact k9t4p9_local_23_eq_row_4 j + + · exact k9t4p9_local_23_eq_row_5 j + + · exact k9t4p9_local_23_eq_row_6 j + + · exact k9t4p9_local_23_eq_row_7 j + + · exact k9t4p9_local_23_eq_row_8 j + + · exact k9t4p9_local_23_eq_row_9 j + +private theorem k9t4p9_local_23_paths : ∀ p ∈ k9t4p9_step_23_data.required, p.Check (freshGraph k9t4p9.graph k9t4p9_step_23_data.i k9t4p9_step_23_data.j) 9 := by decide + +private theorem k9t4p9_local_23_bad : k9t4p9_step_23_data.bad.Check (freshGraph k9t4p9.graph k9t4p9_step_23_data.i k9t4p9_step_23_data.j) k9t4p9_local_23 9 4 := by decide + +private theorem k9t4p9_step_23_check : k9t4p9_step_23.Check k9t4p9.graph k9t4p9_state_23 9 4 := by + change k9t4p9_step_23_data.Check k9t4p9.graph k9t4p9_state_23 9 4 + refine ⟨by decide, k9t4p9_local_23_paths, ?_⟩ + rw [k9t4p9_local_23_eq] + exact k9t4p9_local_23_bad + +private theorem k9t4p9_update_23 : k9t4p9_step_23.apply k9t4p9_state_23 = k9t4p9_state_24 := by + have h : ∀ i j : Fin 9, k9t4p9_step_23.apply k9t4p9_state_23 i j = k9t4p9_state_24 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_25 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, {1, 4, 5, 6, 7}, {0, 1}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_24 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, {1, 4, 5, 6, 7}, {0, 1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_24_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p9_state_24 a b ∪ requiredMatrix 9 k9t4p9_step_24_data.required a b) 0 j = k9t4p9_local_24 0 j := by decide + +private theorem k9t4p9_local_24_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p9_state_24 a b ∪ requiredMatrix 9 k9t4p9_step_24_data.required a b) 1 j = k9t4p9_local_24 1 j := by decide + +private theorem k9t4p9_local_24_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p9_state_24 a b ∪ requiredMatrix 9 k9t4p9_step_24_data.required a b) 2 j = k9t4p9_local_24 2 j := by decide + +private theorem k9t4p9_local_24_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p9_state_24 a b ∪ requiredMatrix 9 k9t4p9_step_24_data.required a b) 3 j = k9t4p9_local_24 3 j := by decide + +private theorem k9t4p9_local_24_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p9_state_24 a b ∪ requiredMatrix 9 k9t4p9_step_24_data.required a b) 4 j = k9t4p9_local_24 4 j := by decide + +private theorem k9t4p9_local_24_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p9_state_24 a b ∪ requiredMatrix 9 k9t4p9_step_24_data.required a b) 5 j = k9t4p9_local_24 5 j := by decide + +private theorem k9t4p9_local_24_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p9_state_24 a b ∪ requiredMatrix 9 k9t4p9_step_24_data.required a b) 6 j = k9t4p9_local_24 6 j := by decide + +private theorem k9t4p9_local_24_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p9_state_24 a b ∪ requiredMatrix 9 k9t4p9_step_24_data.required a b) 7 j = k9t4p9_local_24 7 j := by decide + +private theorem k9t4p9_local_24_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p9_state_24 a b ∪ requiredMatrix 9 k9t4p9_step_24_data.required a b) 8 j = k9t4p9_local_24 8 j := by decide + +private theorem k9t4p9_local_24_eq : (fun a b => k9t4p9_state_24 a b ∪ requiredMatrix 9 k9t4p9_step_24_data.required a b) = k9t4p9_local_24 := by + funext i j + fin_cases i + + · exact k9t4p9_local_24_eq_row_0 j + + · exact k9t4p9_local_24_eq_row_1 j + + · exact k9t4p9_local_24_eq_row_2 j + + · exact k9t4p9_local_24_eq_row_3 j + + · exact k9t4p9_local_24_eq_row_4 j + + · exact k9t4p9_local_24_eq_row_5 j + + · exact k9t4p9_local_24_eq_row_6 j + + · exact k9t4p9_local_24_eq_row_7 j + + · exact k9t4p9_local_24_eq_row_8 j + +private theorem k9t4p9_local_24_paths : ∀ p ∈ k9t4p9_step_24_data.required, p.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_24_data.i k9t4p9_step_24_data.j) 9 := by decide + +private theorem k9t4p9_local_24_bad : k9t4p9_step_24_data.bad.Check (addedEdgeGraph k9t4p9.graph k9t4p9_step_24_data.i k9t4p9_step_24_data.j) k9t4p9_local_24 9 4 := by decide + +private theorem k9t4p9_step_24_check : k9t4p9_step_24.Check k9t4p9.graph k9t4p9_state_24 9 4 := by + change k9t4p9_step_24_data.Check k9t4p9.graph k9t4p9_state_24 9 4 + refine ⟨k9t4p9_local_24_paths, ?_⟩ + rw [k9t4p9_local_24_eq] + exact k9t4p9_local_24_bad + +private theorem k9t4p9_update_24 : k9t4p9_step_24.apply k9t4p9_state_24 = k9t4p9_state_25 := by + have h : ∀ i j : Fin 9, k9t4p9_step_24.apply k9t4p9_state_24 i j = k9t4p9_state_25 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p9_state_26 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[{1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, {1, 4, 5, 6, 7}, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p9_local_25 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0}, ∅, Finset.Icc 0 4, ∅, ∅, Finset.Icc 0 4, ∅, Finset.Icc 0 3, ∅], + #[{0}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3, 5, 6, 7, 8}], + #[∅, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 4, 5, 6, 7}, {2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {2, 3}], + #[Finset.Icc 0 4, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[∅, {2, 3, 5, 6, 7, 8}, {2, 3}, {1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, {0, 1}, ∅, ∅], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {1, 4, 5, 6, 7}], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}], + #[Finset.Icc 0 3, Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 0 6, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {2, 3}, Finset.Icc 1 7, ∅, {1, 4, 5, 6, 7}, {0, 1}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p9_local_25_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_25 a b ∪ requiredMatrix 9 k9t4p9_step_25_data.required a b) 0 j = k9t4p9_local_25 0 j := by decide + +private theorem k9t4p9_local_25_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_25 a b ∪ requiredMatrix 9 k9t4p9_step_25_data.required a b) 1 j = k9t4p9_local_25 1 j := by decide + +private theorem k9t4p9_local_25_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_25 a b ∪ requiredMatrix 9 k9t4p9_step_25_data.required a b) 2 j = k9t4p9_local_25 2 j := by decide + +private theorem k9t4p9_local_25_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_25 a b ∪ requiredMatrix 9 k9t4p9_step_25_data.required a b) 3 j = k9t4p9_local_25 3 j := by decide + +private theorem k9t4p9_local_25_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_25 a b ∪ requiredMatrix 9 k9t4p9_step_25_data.required a b) 4 j = k9t4p9_local_25 4 j := by decide + +private theorem k9t4p9_local_25_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_25 a b ∪ requiredMatrix 9 k9t4p9_step_25_data.required a b) 5 j = k9t4p9_local_25 5 j := by decide + +private theorem k9t4p9_local_25_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_25 a b ∪ requiredMatrix 9 k9t4p9_step_25_data.required a b) 6 j = k9t4p9_local_25 6 j := by decide + +private theorem k9t4p9_local_25_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_25 a b ∪ requiredMatrix 9 k9t4p9_step_25_data.required a b) 7 j = k9t4p9_local_25 7 j := by decide + +private theorem k9t4p9_local_25_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_25 a b ∪ requiredMatrix 9 k9t4p9_step_25_data.required a b) 8 j = k9t4p9_local_25 8 j := by decide + +private theorem k9t4p9_local_25_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p9_state_25 a b ∪ requiredMatrix 9 k9t4p9_step_25_data.required a b) 9 j = k9t4p9_local_25 9 j := by decide + +private theorem k9t4p9_local_25_eq : (fun a b => freshMatrix k9t4p9_state_25 a b ∪ requiredMatrix 9 k9t4p9_step_25_data.required a b) = k9t4p9_local_25 := by + funext i j + fin_cases i + + · exact k9t4p9_local_25_eq_row_0 j + + · exact k9t4p9_local_25_eq_row_1 j + + · exact k9t4p9_local_25_eq_row_2 j + + · exact k9t4p9_local_25_eq_row_3 j + + · exact k9t4p9_local_25_eq_row_4 j + + · exact k9t4p9_local_25_eq_row_5 j + + · exact k9t4p9_local_25_eq_row_6 j + + · exact k9t4p9_local_25_eq_row_7 j + + · exact k9t4p9_local_25_eq_row_8 j + + · exact k9t4p9_local_25_eq_row_9 j + +private theorem k9t4p9_local_25_paths : ∀ p ∈ k9t4p9_step_25_data.required, p.Check (freshGraph k9t4p9.graph k9t4p9_step_25_data.i k9t4p9_step_25_data.j) 9 := by decide + +private theorem k9t4p9_local_25_bad : k9t4p9_step_25_data.bad.Check (freshGraph k9t4p9.graph k9t4p9_step_25_data.i k9t4p9_step_25_data.j) k9t4p9_local_25 9 4 := by decide + +private theorem k9t4p9_step_25_check : k9t4p9_step_25.Check k9t4p9.graph k9t4p9_state_25 9 4 := by + change k9t4p9_step_25_data.Check k9t4p9.graph k9t4p9_state_25 9 4 + refine ⟨by decide, k9t4p9_local_25_paths, ?_⟩ + rw [k9t4p9_local_25_eq] + exact k9t4p9_local_25_bad + +private theorem k9t4p9_update_25 : k9t4p9_step_25.apply k9t4p9_state_25 = k9t4p9_state_26 := by + have h : ∀ i j : Fin 9, k9t4p9_step_25.apply k9t4p9_state_25 i j = k9t4p9_state_26 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k9t4p9_closure_26 : ClosureCheck k9t4p9.graph k9t4p9_state_26 9 4 [] := by trivial + +private theorem k9t4p9_closure_25 : ClosureCheck k9t4p9.graph k9t4p9_state_25 9 4 [k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_25_check + · rw [k9t4p9_update_25] + exact k9t4p9_closure_26 + +private theorem k9t4p9_closure_24 : ClosureCheck k9t4p9.graph k9t4p9_state_24 9 4 [k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_24_check + · rw [k9t4p9_update_24] + exact k9t4p9_closure_25 + +private theorem k9t4p9_closure_23 : ClosureCheck k9t4p9.graph k9t4p9_state_23 9 4 [k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_23_check + · rw [k9t4p9_update_23] + exact k9t4p9_closure_24 + +private theorem k9t4p9_closure_22 : ClosureCheck k9t4p9.graph k9t4p9_state_22 9 4 [k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_22_check + · rw [k9t4p9_update_22] + exact k9t4p9_closure_23 + +private theorem k9t4p9_closure_21 : ClosureCheck k9t4p9.graph k9t4p9_state_21 9 4 [k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_21_check + · rw [k9t4p9_update_21] + exact k9t4p9_closure_22 + +private theorem k9t4p9_closure_20 : ClosureCheck k9t4p9.graph k9t4p9_state_20 9 4 [k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_20_check + · rw [k9t4p9_update_20] + exact k9t4p9_closure_21 + +private theorem k9t4p9_closure_19 : ClosureCheck k9t4p9.graph k9t4p9_state_19 9 4 [k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_19_check + · rw [k9t4p9_update_19] + exact k9t4p9_closure_20 + +private theorem k9t4p9_closure_18 : ClosureCheck k9t4p9.graph k9t4p9_state_18 9 4 [k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_18_check + · rw [k9t4p9_update_18] + exact k9t4p9_closure_19 + +private theorem k9t4p9_closure_17 : ClosureCheck k9t4p9.graph k9t4p9_state_17 9 4 [k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_17_check + · rw [k9t4p9_update_17] + exact k9t4p9_closure_18 + +private theorem k9t4p9_closure_16 : ClosureCheck k9t4p9.graph k9t4p9_state_16 9 4 [k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_16_check + · rw [k9t4p9_update_16] + exact k9t4p9_closure_17 + +private theorem k9t4p9_closure_15 : ClosureCheck k9t4p9.graph k9t4p9_state_15 9 4 [k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_15_check + · rw [k9t4p9_update_15] + exact k9t4p9_closure_16 + +private theorem k9t4p9_closure_14 : ClosureCheck k9t4p9.graph k9t4p9_state_14 9 4 [k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_14_check + · rw [k9t4p9_update_14] + exact k9t4p9_closure_15 + +private theorem k9t4p9_closure_13 : ClosureCheck k9t4p9.graph k9t4p9_state_13 9 4 [k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_13_check + · rw [k9t4p9_update_13] + exact k9t4p9_closure_14 + +private theorem k9t4p9_closure_12 : ClosureCheck k9t4p9.graph k9t4p9_state_12 9 4 [k9t4p9_step_12, k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_12_check + · rw [k9t4p9_update_12] + exact k9t4p9_closure_13 + +private theorem k9t4p9_closure_11 : ClosureCheck k9t4p9.graph k9t4p9_state_11 9 4 [k9t4p9_step_11, k9t4p9_step_12, k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_11_check + · rw [k9t4p9_update_11] + exact k9t4p9_closure_12 + +private theorem k9t4p9_closure_10 : ClosureCheck k9t4p9.graph k9t4p9_state_10 9 4 [k9t4p9_step_10, k9t4p9_step_11, k9t4p9_step_12, k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_10_check + · rw [k9t4p9_update_10] + exact k9t4p9_closure_11 + +private theorem k9t4p9_closure_9 : ClosureCheck k9t4p9.graph k9t4p9_state_9 9 4 [k9t4p9_step_9, k9t4p9_step_10, k9t4p9_step_11, k9t4p9_step_12, k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_9_check + · rw [k9t4p9_update_9] + exact k9t4p9_closure_10 + +private theorem k9t4p9_closure_8 : ClosureCheck k9t4p9.graph k9t4p9_state_8 9 4 [k9t4p9_step_8, k9t4p9_step_9, k9t4p9_step_10, k9t4p9_step_11, k9t4p9_step_12, k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_8_check + · rw [k9t4p9_update_8] + exact k9t4p9_closure_9 + +private theorem k9t4p9_closure_7 : ClosureCheck k9t4p9.graph k9t4p9_state_7 9 4 [k9t4p9_step_7, k9t4p9_step_8, k9t4p9_step_9, k9t4p9_step_10, k9t4p9_step_11, k9t4p9_step_12, k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_7_check + · rw [k9t4p9_update_7] + exact k9t4p9_closure_8 + +private theorem k9t4p9_closure_6 : ClosureCheck k9t4p9.graph k9t4p9_state_6 9 4 [k9t4p9_step_6, k9t4p9_step_7, k9t4p9_step_8, k9t4p9_step_9, k9t4p9_step_10, k9t4p9_step_11, k9t4p9_step_12, k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_6_check + · rw [k9t4p9_update_6] + exact k9t4p9_closure_7 + +private theorem k9t4p9_closure_5 : ClosureCheck k9t4p9.graph k9t4p9_state_5 9 4 [k9t4p9_step_5, k9t4p9_step_6, k9t4p9_step_7, k9t4p9_step_8, k9t4p9_step_9, k9t4p9_step_10, k9t4p9_step_11, k9t4p9_step_12, k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_5_check + · rw [k9t4p9_update_5] + exact k9t4p9_closure_6 + +private theorem k9t4p9_closure_4 : ClosureCheck k9t4p9.graph k9t4p9_state_4 9 4 [k9t4p9_step_4, k9t4p9_step_5, k9t4p9_step_6, k9t4p9_step_7, k9t4p9_step_8, k9t4p9_step_9, k9t4p9_step_10, k9t4p9_step_11, k9t4p9_step_12, k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_4_check + · rw [k9t4p9_update_4] + exact k9t4p9_closure_5 + +private theorem k9t4p9_closure_3 : ClosureCheck k9t4p9.graph k9t4p9_state_3 9 4 [k9t4p9_step_3, k9t4p9_step_4, k9t4p9_step_5, k9t4p9_step_6, k9t4p9_step_7, k9t4p9_step_8, k9t4p9_step_9, k9t4p9_step_10, k9t4p9_step_11, k9t4p9_step_12, k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_3_check + · rw [k9t4p9_update_3] + exact k9t4p9_closure_4 + +private theorem k9t4p9_closure_2 : ClosureCheck k9t4p9.graph k9t4p9_state_2 9 4 [k9t4p9_step_2, k9t4p9_step_3, k9t4p9_step_4, k9t4p9_step_5, k9t4p9_step_6, k9t4p9_step_7, k9t4p9_step_8, k9t4p9_step_9, k9t4p9_step_10, k9t4p9_step_11, k9t4p9_step_12, k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_2_check + · rw [k9t4p9_update_2] + exact k9t4p9_closure_3 + +private theorem k9t4p9_closure_1 : ClosureCheck k9t4p9.graph k9t4p9_state_1 9 4 [k9t4p9_step_1, k9t4p9_step_2, k9t4p9_step_3, k9t4p9_step_4, k9t4p9_step_5, k9t4p9_step_6, k9t4p9_step_7, k9t4p9_step_8, k9t4p9_step_9, k9t4p9_step_10, k9t4p9_step_11, k9t4p9_step_12, k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_1_check + · rw [k9t4p9_update_1] + exact k9t4p9_closure_2 + +private theorem k9t4p9_closure_0 : ClosureCheck k9t4p9.graph k9t4p9_state_0 9 4 [k9t4p9_step_0, k9t4p9_step_1, k9t4p9_step_2, k9t4p9_step_3, k9t4p9_step_4, k9t4p9_step_5, k9t4p9_step_6, k9t4p9_step_7, k9t4p9_step_8, k9t4p9_step_9, k9t4p9_step_10, k9t4p9_step_11, k9t4p9_step_12, k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] := by + constructor + · exact k9t4p9_step_0_check + · rw [k9t4p9_update_0] + exact k9t4p9_closure_1 + +private theorem k9t4p9_matrix_eq : k9t4p9.matrix 9 = k9t4p9_state_26 := by + change closureMatrix (k9t4p9.initialMatrix 9) _ = _ + rw [k9t4p9_initial_eq] + change closureMatrix k9t4p9_state_0 [k9t4p9_step_0, k9t4p9_step_1, k9t4p9_step_2, k9t4p9_step_3, k9t4p9_step_4, k9t4p9_step_5, k9t4p9_step_6, k9t4p9_step_7, k9t4p9_step_8, k9t4p9_step_9, k9t4p9_step_10, k9t4p9_step_11, k9t4p9_step_12, k9t4p9_step_13, k9t4p9_step_14, k9t4p9_step_15, k9t4p9_step_16, k9t4p9_step_17, k9t4p9_step_18, k9t4p9_step_19, k9t4p9_step_20, k9t4p9_step_21, k9t4p9_step_22, k9t4p9_step_23, k9t4p9_step_24, k9t4p9_step_25] = _ + simp only [closureMatrix] + rw [k9t4p9_update_0, k9t4p9_update_1, k9t4p9_update_2, k9t4p9_update_3, k9t4p9_update_4, k9t4p9_update_5, k9t4p9_update_6, k9t4p9_update_7, k9t4p9_update_8, k9t4p9_update_9, k9t4p9_update_10, k9t4p9_update_11, k9t4p9_update_12, k9t4p9_update_13, k9t4p9_update_14, k9t4p9_update_15, k9t4p9_update_16, k9t4p9_update_17, k9t4p9_update_18, k9t4p9_update_19, k9t4p9_update_20, k9t4p9_update_21, k9t4p9_update_22, k9t4p9_update_23, k9t4p9_update_24, k9t4p9_update_25] + +private theorem k9t4p9_part_0 : k9t4p9.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p9_part_1 : k9t4p9.chains.map List.length = ([[], [1, 4]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p9_part_2 : k9t4p9.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p9.clique))) = ([[], [1, 4]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p9_templates_item_0 : (⟨0, 1, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6, 7, 8]], [], [], 2, 2⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_2 : (⟨0, 1, [], [], [2, 3, 4, 5, 6, 7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_3 : (⟨0, 2, [], [], [1], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_4 : (⟨0, 2, [[3, 4, 5, 6, 7, 8]], [], [1], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_5 : (⟨0, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_6 : (⟨0, 3, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_7 : (⟨0, 3, [], [], [4, 5, 6, 7, 8], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_8 : (⟨0, 4, [], [], [3], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_9 : (⟨0, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_10 : (⟨0, 5, [], [], [4, 3], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_11 : (⟨0, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_12 : (⟨0, 6, [], [], [5, 4, 3], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_13 : (⟨0, 6, [], [], [7, 8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_14 : (⟨0, 7, [], [], [6, 5, 4, 3], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_15 : (⟨0, 7, [], [], [8], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_16 : (⟨0, 8, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_17 : (⟨0, 8, [], [], [7, 6, 5, 4, 3], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_18 : (⟨0, 8, [], [], [7, 6, 5, 4, 3, 2, 1], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_19 : (⟨1, 2, [], [], [3], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_20 : (⟨1, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_21 : (⟨1, 3, [], [], [4, 5, 6, 7, 8], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_22 : (⟨1, 4, [], [], [3], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_23 : (⟨1, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_24 : (⟨1, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_25 : (⟨1, 6, [], [], [5, 4, 3], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_26 : (⟨1, 7, [], [], [6, 5, 4, 3], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_27 : (⟨1, 7, [], [], [8], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_28 : (⟨1, 8, [], [], [7, 6, 5, 4, 3], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_29 : (⟨2, 3, [], [1], [], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_30 : (⟨2, 3, [], [1], [4, 5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_31 : (⟨2, 4, [], [1], [3], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_32 : (⟨2, 4, [], [1], [5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_33 : (⟨2, 5, [], [1], [4, 3], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_34 : (⟨2, 5, [], [1], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_35 : (⟨2, 6, [], [1], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_36 : (⟨2, 6, [], [1], [7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_37 : (⟨2, 7, [], [1], [6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_38 : (⟨2, 7, [], [1], [8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_39 : (⟨2, 8, [], [1], [], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_40 : (⟨2, 8, [], [1], [7, 6, 5, 4, 3], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_41 : (⟨3, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_42 : (⟨3, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_43 : (⟨4, 5, [], [3], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_44 : (⟨4, 6, [], [3], [7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_45 : (⟨4, 7, [], [3], [8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_46 : (⟨4, 8, [], [3], [], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_47 : (⟨5, 6, [], [3, 4], [7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_48 : (⟨5, 7, [], [3, 4], [8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_49 : (⟨6, 7, [], [3, 4, 5], [8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_50 : (⟨6, 8, [], [3, 4, 5], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_item_51 : (⟨7, 8, [], [3, 4, 5, 6], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p9_templates_block_0_check : ∀ T ∈ k9t4p9_templates_block_0, T.Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p9_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_templates_item_0, k9t4p9_templates_item_1, k9t4p9_templates_item_2, k9t4p9_templates_item_3, k9t4p9_templates_item_4, k9t4p9_templates_item_5, k9t4p9_templates_item_6, k9t4p9_templates_item_7, k9t4p9_templates_item_8, k9t4p9_templates_item_9, k9t4p9_templates_item_10, k9t4p9_templates_item_11⟩ + +private theorem k9t4p9_templates_block_1_check : ∀ T ∈ k9t4p9_templates_block_1, T.Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p9_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_templates_item_12, k9t4p9_templates_item_13, k9t4p9_templates_item_14, k9t4p9_templates_item_15, k9t4p9_templates_item_16, k9t4p9_templates_item_17, k9t4p9_templates_item_18, k9t4p9_templates_item_19, k9t4p9_templates_item_20, k9t4p9_templates_item_21, k9t4p9_templates_item_22, k9t4p9_templates_item_23⟩ + +private theorem k9t4p9_templates_block_2_check : ∀ T ∈ k9t4p9_templates_block_2, T.Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p9_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_templates_item_24, k9t4p9_templates_item_25, k9t4p9_templates_item_26, k9t4p9_templates_item_27, k9t4p9_templates_item_28, k9t4p9_templates_item_29, k9t4p9_templates_item_30, k9t4p9_templates_item_31, k9t4p9_templates_item_32, k9t4p9_templates_item_33, k9t4p9_templates_item_34, k9t4p9_templates_item_35⟩ + +private theorem k9t4p9_templates_block_3_check : ∀ T ∈ k9t4p9_templates_block_3, T.Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p9_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_templates_item_36, k9t4p9_templates_item_37, k9t4p9_templates_item_38, k9t4p9_templates_item_39, k9t4p9_templates_item_40, k9t4p9_templates_item_41, k9t4p9_templates_item_42, k9t4p9_templates_item_43, k9t4p9_templates_item_44, k9t4p9_templates_item_45, k9t4p9_templates_item_46, k9t4p9_templates_item_47⟩ + +private theorem k9t4p9_templates_block_4_check : ∀ T ∈ k9t4p9_templates_block_4, T.Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p9_templates_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_templates_item_48, k9t4p9_templates_item_49, k9t4p9_templates_item_50, k9t4p9_templates_item_51⟩ + +private theorem k9t4p9_part_3 : ∀ T ∈ k9t4p9.templates, T.Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t4p9_templates_block_0 ++ k9t4p9_templates_block_1 ++ k9t4p9_templates_block_2 ++ k9t4p9_templates_block_3 ++ k9t4p9_templates_block_4), T.Check k9t4p9.graph k9t4p9.clique 9 (patternAmount ([[], [1, 4]] : List (List ℕ))) (([[], [1, 4]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t4p9_templates_block_0_check, k9t4p9_templates_block_1_check⟩, k9t4p9_templates_block_2_check⟩, k9t4p9_templates_block_3_check⟩, k9t4p9_templates_block_4_check⟩ + +private theorem k9t4p9_required_item_0 : (⟨2, 5, [3, 4]⟩ : RequiredPathData (Fin 9)).Check k9t4p9.graph 9 := by decide + +private theorem k9t4p9_required_item_1 : (⟨2, 8, [3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 9)).Check k9t4p9.graph 9 := by decide + +private theorem k9t4p9_part_4 : ∀ p ∈ k9t4p9.required, p.Check k9t4p9.graph 9 := by + simp only [k9t4p9, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p9_required_item_0, k9t4p9_required_item_1⟩ + +private theorem k9t4p9_part_5 : ClosureCheck k9t4p9.graph (k9t4p9.initialMatrix 9) 9 4 k9t4p9.closure := by + rw [k9t4p9_initial_eq] + exact k9t4p9_closure_0 + +private theorem k9t4p9_part_6 : k9t4p9.bad.Check k9t4p9.graph (k9t4p9.matrix 9) 9 4 := by + rw [k9t4p9_matrix_eq] + decide + +theorem k9t4p9_check : k9t4p9.Check 9 4 [[], [1, 4]] := + ⟨k9t4p9_part_0, k9t4p9_part_1, k9t4p9_part_2, k9t4p9_part_3, k9t4p9_part_4, k9t4p9_part_5, k9t4p9_part_6⟩ +def k9t4p10 : LayoutCertificate 8 where + chains := [[0], [1, 2, 3, 4, 5, 6, 7]] + clique := {0, 1, 4, 7} + templates := [⟨0, 1, [], [], [2, 3, 4, 5, 6, 7], 1, 2⟩, + ⟨0, 2, [], [], [1], 3, 7⟩, + ⟨0, 2, [], [], [3, 4], 2, 6⟩, + ⟨0, 2, [], [], [3, 4, 5, 6, 7], 1, 3⟩, + ⟨0, 3, [], [], [2, 1], 2, 6⟩, + ⟨0, 3, [[4, 5, 6, 7]], [], [2, 1], 1, 2⟩, + ⟨0, 5, [], [], [6, 7], 2, 6⟩, + ⟨0, 5, [[1, 2, 3, 4]], [], [6, 7], 1, 2⟩, + ⟨0, 6, [], [], [5, 4], 2, 6⟩, + ⟨0, 6, [], [], [5, 4, 3, 2, 1], 1, 3⟩, + ⟨0, 7, [], [], [6, 5, 4, 3, 2, 1], 1, 2⟩, + ⟨1, 2, [], [], [3, 4], 2, 6⟩, + ⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 3⟩, + ⟨2, 3, [], [1], [4], 2, 6⟩, + ⟨2, 3, [], [1], [4, 5, 6, 7], 1, 3⟩, + ⟨2, 5, [], [1], [4], 2, 6⟩, + ⟨2, 5, [], [1], [6, 7], 1, 5⟩, + ⟨2, 6, [], [1], [5, 4], 1, 5⟩, + ⟨2, 6, [], [1], [7], 2, 6⟩, + ⟨3, 4, [], [1, 2], [], 2, 6⟩, + ⟨3, 4, [], [1, 2], [5, 6, 7], 1, 3⟩, + ⟨3, 5, [], [1, 2], [4], 1, 5⟩, + ⟨3, 6, [], [1, 2], [5, 4], 1, 4⟩, + ⟨3, 6, [], [1, 2], [7], 1, 5⟩, + ⟨3, 6, [], [4], [7], 2, 6⟩, + ⟨3, 7, [], [1, 2], [], 2, 6⟩, + ⟨3, 7, [], [1, 2], [6, 5, 4], 1, 3⟩, + ⟨5, 6, [], [4], [7], 2, 6⟩, + ⟨5, 6, [], [1, 2, 3, 4], [7], 1, 3⟩, + ⟨6, 7, [], [4, 5], [], 2, 6⟩, + ⟨6, 7, [], [1, 2, 3, 4, 5], [], 1, 3⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (3, 3), (2, 3), (6, 3)}⟩ + + +private def k9t4p10_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, {1, 2}, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, {1, 2}], + #[{1, 2}, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[{1, 2}, ∅, ∅, Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p10_initial_eq_row_0 : ∀ j : Fin 8, (k9t4p10.initialMatrix 9) 0 j = k9t4p10_state_0 0 j := by decide + +private theorem k9t4p10_initial_eq_row_1 : ∀ j : Fin 8, (k9t4p10.initialMatrix 9) 1 j = k9t4p10_state_0 1 j := by decide + +private theorem k9t4p10_initial_eq_row_2 : ∀ j : Fin 8, (k9t4p10.initialMatrix 9) 2 j = k9t4p10_state_0 2 j := by decide + +private theorem k9t4p10_initial_eq_row_3 : ∀ j : Fin 8, (k9t4p10.initialMatrix 9) 3 j = k9t4p10_state_0 3 j := by decide + +private theorem k9t4p10_initial_eq_row_4 : ∀ j : Fin 8, (k9t4p10.initialMatrix 9) 4 j = k9t4p10_state_0 4 j := by decide + +private theorem k9t4p10_initial_eq_row_5 : ∀ j : Fin 8, (k9t4p10.initialMatrix 9) 5 j = k9t4p10_state_0 5 j := by decide + +private theorem k9t4p10_initial_eq_row_6 : ∀ j : Fin 8, (k9t4p10.initialMatrix 9) 6 j = k9t4p10_state_0 6 j := by decide + +private theorem k9t4p10_initial_eq_row_7 : ∀ j : Fin 8, (k9t4p10.initialMatrix 9) 7 j = k9t4p10_state_0 7 j := by decide + +private theorem k9t4p10_initial_eq : (k9t4p10.initialMatrix 9) = k9t4p10_state_0 := by + funext i j + fin_cases i + + · exact k9t4p10_initial_eq_row_0 j + + · exact k9t4p10_initial_eq_row_1 j + + · exact k9t4p10_initial_eq_row_2 j + + · exact k9t4p10_initial_eq_row_3 j + + · exact k9t4p10_initial_eq_row_4 j + + · exact k9t4p10_initial_eq_row_5 j + + · exact k9t4p10_initial_eq_row_6 j + + · exact k9t4p10_initial_eq_row_7 j + +private theorem k9t4p10_closure_0 : ClosureCheck k9t4p10.graph k9t4p10_state_0 9 4 [] := by trivial + +private theorem k9t4p10_matrix_eq : k9t4p10.matrix 9 = k9t4p10_state_0 := by + change closureMatrix (k9t4p10.initialMatrix 9) _ = _ + rw [k9t4p10_initial_eq] + change closureMatrix k9t4p10_state_0 [] = _ + rfl + +private theorem k9t4p10_part_0 : k9t4p10.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p10_part_1 : k9t4p10.chains.map List.length = ([[], [2, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p10_part_2 : k9t4p10.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p10.clique))) = ([[], [2, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p10_templates_item_0 : (⟨0, 1, [], [], [2, 3, 4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_1 : (⟨0, 2, [], [], [1], 3, 7⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_2 : (⟨0, 2, [], [], [3, 4], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_3 : (⟨0, 2, [], [], [3, 4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_4 : (⟨0, 3, [], [], [2, 1], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_5 : (⟨0, 3, [[4, 5, 6, 7]], [], [2, 1], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_6 : (⟨0, 5, [], [], [6, 7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_7 : (⟨0, 5, [[1, 2, 3, 4]], [], [6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_8 : (⟨0, 6, [], [], [5, 4], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_9 : (⟨0, 6, [], [], [5, 4, 3, 2, 1], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_10 : (⟨0, 7, [], [], [6, 5, 4, 3, 2, 1], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_11 : (⟨1, 2, [], [], [3, 4], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_12 : (⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_13 : (⟨2, 3, [], [1], [4], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_14 : (⟨2, 3, [], [1], [4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_15 : (⟨2, 5, [], [1], [4], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_16 : (⟨2, 5, [], [1], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_17 : (⟨2, 6, [], [1], [5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_18 : (⟨2, 6, [], [1], [7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_19 : (⟨3, 4, [], [1, 2], [], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_20 : (⟨3, 4, [], [1, 2], [5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_21 : (⟨3, 5, [], [1, 2], [4], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_22 : (⟨3, 6, [], [1, 2], [5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_23 : (⟨3, 6, [], [1, 2], [7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_24 : (⟨3, 6, [], [4], [7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_25 : (⟨3, 7, [], [1, 2], [], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_26 : (⟨3, 7, [], [1, 2], [6, 5, 4], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_27 : (⟨5, 6, [], [4], [7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_28 : (⟨5, 6, [], [1, 2, 3, 4], [7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_29 : (⟨6, 7, [], [4, 5], [], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_templates_item_30 : (⟨6, 7, [], [1, 2, 3, 4, 5], [], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p10_part_3 : ∀ T ∈ k9t4p10.templates, T.Check k9t4p10.graph k9t4p10.clique 9 (patternAmount ([[], [2, 2]] : List (List ℕ))) (([[], [2, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p10, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p10_templates_item_0, k9t4p10_templates_item_1, k9t4p10_templates_item_2, k9t4p10_templates_item_3, k9t4p10_templates_item_4, k9t4p10_templates_item_5, k9t4p10_templates_item_6, k9t4p10_templates_item_7, k9t4p10_templates_item_8, k9t4p10_templates_item_9, k9t4p10_templates_item_10, k9t4p10_templates_item_11, k9t4p10_templates_item_12, k9t4p10_templates_item_13, k9t4p10_templates_item_14, k9t4p10_templates_item_15, k9t4p10_templates_item_16, k9t4p10_templates_item_17, k9t4p10_templates_item_18, k9t4p10_templates_item_19, k9t4p10_templates_item_20, k9t4p10_templates_item_21, k9t4p10_templates_item_22, k9t4p10_templates_item_23, k9t4p10_templates_item_24, k9t4p10_templates_item_25, k9t4p10_templates_item_26, k9t4p10_templates_item_27, k9t4p10_templates_item_28, k9t4p10_templates_item_29, k9t4p10_templates_item_30⟩ + +private theorem k9t4p10_part_4 : ∀ p ∈ k9t4p10.required, p.Check k9t4p10.graph 9 := by decide + +private theorem k9t4p10_part_5 : ClosureCheck k9t4p10.graph (k9t4p10.initialMatrix 9) 9 4 k9t4p10.closure := by + rw [k9t4p10_initial_eq] + exact k9t4p10_closure_0 + +private theorem k9t4p10_part_6 : k9t4p10.bad.Check k9t4p10.graph (k9t4p10.matrix 9) 9 4 := by + rw [k9t4p10_matrix_eq] + decide + +theorem k9t4p10_check : k9t4p10.Check 9 4 [[], [2, 2]] := + ⟨k9t4p10_part_0, k9t4p10_part_1, k9t4p10_part_2, k9t4p10_part_3, k9t4p10_part_4, k9t4p10_part_5, k9t4p10_part_6⟩ +def k9t4p11 : LayoutCertificate 9 where + chains := [[0], [1, 2, 3, 4, 5, 6, 7, 8]] + clique := {0, 1, 4, 8} + templates := [⟨0, 1, [], [], [2, 3, 4, 5, 6, 7, 8], 1, 1⟩, + ⟨0, 2, [], [], [1], 4, 7⟩, + ⟨0, 2, [], [], [3, 4], 3, 6⟩, + ⟨0, 2, [[4, 5, 6, 7, 8]], [], [1], 2, 2⟩, + ⟨0, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩, + ⟨0, 3, [], [], [2, 1], 3, 6⟩, + ⟨0, 3, [[4, 5, 6, 7, 8]], [], [2, 1], 1, 1⟩, + ⟨0, 3, [], [], [4, 5, 6, 7, 8], 2, 3⟩, + ⟨0, 5, [], [], [6, 7, 8], 2, 5⟩, + ⟨0, 5, [[1, 2, 3, 4]], [], [6, 7, 8], 1, 1⟩, + ⟨0, 7, [], [], [6, 5, 4], 2, 5⟩, + ⟨0, 7, [], [], [8], 4, 7⟩, + ⟨0, 7, [], [], [6, 5, 4, 3, 2, 1], 1, 2⟩, + ⟨0, 8, [], [], [7, 6, 5, 4, 3, 2, 1], 1, 1⟩, + ⟨1, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩, + ⟨2, 3, [], [1], [4], 3, 6⟩, + ⟨2, 3, [], [1], [4, 5, 6, 7, 8], 1, 2⟩, + ⟨2, 5, [], [1], [6, 7, 8], 1, 4⟩, + ⟨2, 6, [], [1], [5, 4], 2, 5⟩, + ⟨2, 6, [], [4, 3], [7, 8], 1, 4⟩, + ⟨2, 7, [], [1], [6, 5, 4], 1, 4⟩, + ⟨2, 7, [], [1], [8], 3, 6⟩, + ⟨3, 4, [], [1, 2], [5, 6, 7, 8], 1, 2⟩, + ⟨3, 5, [], [1, 2], [4], 2, 5⟩, + ⟨3, 5, [], [1, 2], [6, 7, 8], 1, 3⟩, + ⟨3, 6, [], [1, 2], [5, 4], 1, 4⟩, + ⟨3, 7, [], [1, 2], [6, 5, 4], 1, 3⟩, + ⟨3, 7, [], [1, 2], [8], 2, 5⟩, + ⟨3, 7, [], [4], [8], 3, 6⟩, + ⟨3, 8, [], [1, 2], [7, 6, 5, 4], 1, 2⟩, + ⟨6, 7, [], [4, 5], [8], 2, 5⟩, + ⟨6, 7, [], [1, 2, 3, 4, 5], [8], 1, 2⟩, + ⟨7, 8, [], [4, 5, 6], [], 2, 5⟩, + ⟨7, 8, [], [1, 2, 3, 4, 5, 6], [], 1, 2⟩] + required := [] + closure := [] + bad := ⟨none, {(2, 3), (3, 3), (0, 3), (7, 3)}⟩ + + +private def k9t4p11_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 7, {1}], + #[{1}, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, {1, 2}, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, {1, 2}, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 6, {1, 2}], + #[∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅, ∅, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1}, ∅, ∅, {1, 2}, ∅, ∅, ∅, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p11_initial_eq_row_0 : ∀ j : Fin 9, (k9t4p11.initialMatrix 9) 0 j = k9t4p11_state_0 0 j := by decide + +private theorem k9t4p11_initial_eq_row_1 : ∀ j : Fin 9, (k9t4p11.initialMatrix 9) 1 j = k9t4p11_state_0 1 j := by decide + +private theorem k9t4p11_initial_eq_row_2 : ∀ j : Fin 9, (k9t4p11.initialMatrix 9) 2 j = k9t4p11_state_0 2 j := by decide + +private theorem k9t4p11_initial_eq_row_3 : ∀ j : Fin 9, (k9t4p11.initialMatrix 9) 3 j = k9t4p11_state_0 3 j := by decide + +private theorem k9t4p11_initial_eq_row_4 : ∀ j : Fin 9, (k9t4p11.initialMatrix 9) 4 j = k9t4p11_state_0 4 j := by decide + +private theorem k9t4p11_initial_eq_row_5 : ∀ j : Fin 9, (k9t4p11.initialMatrix 9) 5 j = k9t4p11_state_0 5 j := by decide + +private theorem k9t4p11_initial_eq_row_6 : ∀ j : Fin 9, (k9t4p11.initialMatrix 9) 6 j = k9t4p11_state_0 6 j := by decide + +private theorem k9t4p11_initial_eq_row_7 : ∀ j : Fin 9, (k9t4p11.initialMatrix 9) 7 j = k9t4p11_state_0 7 j := by decide + +private theorem k9t4p11_initial_eq_row_8 : ∀ j : Fin 9, (k9t4p11.initialMatrix 9) 8 j = k9t4p11_state_0 8 j := by decide + +private theorem k9t4p11_initial_eq : (k9t4p11.initialMatrix 9) = k9t4p11_state_0 := by + funext i j + fin_cases i + + · exact k9t4p11_initial_eq_row_0 j + + · exact k9t4p11_initial_eq_row_1 j + + · exact k9t4p11_initial_eq_row_2 j + + · exact k9t4p11_initial_eq_row_3 j + + · exact k9t4p11_initial_eq_row_4 j + + · exact k9t4p11_initial_eq_row_5 j + + · exact k9t4p11_initial_eq_row_6 j + + · exact k9t4p11_initial_eq_row_7 j + + · exact k9t4p11_initial_eq_row_8 j + +private theorem k9t4p11_closure_0 : ClosureCheck k9t4p11.graph k9t4p11_state_0 9 4 [] := by trivial + +private theorem k9t4p11_matrix_eq : k9t4p11.matrix 9 = k9t4p11_state_0 := by + change closureMatrix (k9t4p11.initialMatrix 9) _ = _ + rw [k9t4p11_initial_eq] + change closureMatrix k9t4p11_state_0 [] = _ + rfl + +private theorem k9t4p11_part_0 : k9t4p11.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p11_part_1 : k9t4p11.chains.map List.length = ([[], [2, 3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p11_part_2 : k9t4p11.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p11.clique))) = ([[], [2, 3]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p11_templates_item_0 : (⟨0, 1, [], [], [2, 3, 4, 5, 6, 7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_1 : (⟨0, 2, [], [], [1], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_2 : (⟨0, 2, [], [], [3, 4], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_3 : (⟨0, 2, [[4, 5, 6, 7, 8]], [], [1], 2, 2⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_4 : (⟨0, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_5 : (⟨0, 3, [], [], [2, 1], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_6 : (⟨0, 3, [[4, 5, 6, 7, 8]], [], [2, 1], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_7 : (⟨0, 3, [], [], [4, 5, 6, 7, 8], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_8 : (⟨0, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_9 : (⟨0, 5, [[1, 2, 3, 4]], [], [6, 7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_10 : (⟨0, 7, [], [], [6, 5, 4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_11 : (⟨0, 7, [], [], [8], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_12 : (⟨0, 7, [], [], [6, 5, 4, 3, 2, 1], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_13 : (⟨0, 8, [], [], [7, 6, 5, 4, 3, 2, 1], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_14 : (⟨1, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_15 : (⟨2, 3, [], [1], [4], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_16 : (⟨2, 3, [], [1], [4, 5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_17 : (⟨2, 5, [], [1], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_18 : (⟨2, 6, [], [1], [5, 4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_19 : (⟨2, 6, [], [4, 3], [7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_20 : (⟨2, 7, [], [1], [6, 5, 4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_21 : (⟨2, 7, [], [1], [8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_22 : (⟨3, 4, [], [1, 2], [5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_23 : (⟨3, 5, [], [1, 2], [4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_24 : (⟨3, 5, [], [1, 2], [6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_25 : (⟨3, 6, [], [1, 2], [5, 4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_26 : (⟨3, 7, [], [1, 2], [6, 5, 4], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_27 : (⟨3, 7, [], [1, 2], [8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_28 : (⟨3, 7, [], [4], [8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_29 : (⟨3, 8, [], [1, 2], [7, 6, 5, 4], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_30 : (⟨6, 7, [], [4, 5], [8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_31 : (⟨6, 7, [], [1, 2, 3, 4, 5], [8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_32 : (⟨7, 8, [], [4, 5, 6], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_templates_item_33 : (⟨7, 8, [], [1, 2, 3, 4, 5, 6], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p11_part_3 : ∀ T ∈ k9t4p11.templates, T.Check k9t4p11.graph k9t4p11.clique 9 (patternAmount ([[], [2, 3]] : List (List ℕ))) (([[], [2, 3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p11, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p11_templates_item_0, k9t4p11_templates_item_1, k9t4p11_templates_item_2, k9t4p11_templates_item_3, k9t4p11_templates_item_4, k9t4p11_templates_item_5, k9t4p11_templates_item_6, k9t4p11_templates_item_7, k9t4p11_templates_item_8, k9t4p11_templates_item_9, k9t4p11_templates_item_10, k9t4p11_templates_item_11, k9t4p11_templates_item_12, k9t4p11_templates_item_13, k9t4p11_templates_item_14, k9t4p11_templates_item_15, k9t4p11_templates_item_16, k9t4p11_templates_item_17, k9t4p11_templates_item_18, k9t4p11_templates_item_19, k9t4p11_templates_item_20, k9t4p11_templates_item_21, k9t4p11_templates_item_22, k9t4p11_templates_item_23, k9t4p11_templates_item_24, k9t4p11_templates_item_25, k9t4p11_templates_item_26, k9t4p11_templates_item_27, k9t4p11_templates_item_28, k9t4p11_templates_item_29, k9t4p11_templates_item_30, k9t4p11_templates_item_31, k9t4p11_templates_item_32, k9t4p11_templates_item_33⟩ + +private theorem k9t4p11_part_4 : ∀ p ∈ k9t4p11.required, p.Check k9t4p11.graph 9 := by decide + +private theorem k9t4p11_part_5 : ClosureCheck k9t4p11.graph (k9t4p11.initialMatrix 9) 9 4 k9t4p11.closure := by + rw [k9t4p11_initial_eq] + exact k9t4p11_closure_0 + +private theorem k9t4p11_part_6 : k9t4p11.bad.Check k9t4p11.graph (k9t4p11.matrix 9) 9 4 := by + rw [k9t4p11_matrix_eq] + decide + +theorem k9t4p11_check : k9t4p11.Check 9 4 [[], [2, 3]] := + ⟨k9t4p11_part_0, k9t4p11_part_1, k9t4p11_part_2, k9t4p11_part_3, k9t4p11_part_4, k9t4p11_part_5, k9t4p11_part_6⟩ +def k9t4p12 : LayoutCertificate 6 where + chains := [[0, 1, 2], [3, 4, 5]] + clique := {0, 2, 3, 5} + templates := [⟨0, 1, [], [], [2], 1, 7⟩, + ⟨0, 3, [], [], [], 2, 8⟩, + ⟨0, 3, [], [2, 1], [4, 5], 1, 4⟩, + ⟨0, 4, [], [], [3], 1, 7⟩, + ⟨0, 5, [], [2, 1], [4, 3], 1, 4⟩, + ⟨1, 2, [], [0], [], 1, 7⟩, + ⟨1, 3, [], [0], [], 1, 7⟩, + ⟨1, 4, [], [0], [3], 1, 6⟩, + ⟨1, 5, [], [0], [], 1, 7⟩, + ⟨2, 3, [], [0, 1], [4, 5], 1, 4⟩, + ⟨2, 4, [], [], [3], 1, 7⟩, + ⟨3, 4, [], [], [5], 1, 7⟩, + ⟨4, 5, [], [3], [], 1, 7⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 2), (4, 2), (0, 2), (3, 2)}⟩ + + +private def k9t4p12_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 7, ∅, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 4], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[Finset.Icc 1 4, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p12_initial_eq_row_0 : ∀ j : Fin 6, (k9t4p12.initialMatrix 9) 0 j = k9t4p12_state_0 0 j := by decide + +private theorem k9t4p12_initial_eq_row_1 : ∀ j : Fin 6, (k9t4p12.initialMatrix 9) 1 j = k9t4p12_state_0 1 j := by decide + +private theorem k9t4p12_initial_eq_row_2 : ∀ j : Fin 6, (k9t4p12.initialMatrix 9) 2 j = k9t4p12_state_0 2 j := by decide + +private theorem k9t4p12_initial_eq_row_3 : ∀ j : Fin 6, (k9t4p12.initialMatrix 9) 3 j = k9t4p12_state_0 3 j := by decide + +private theorem k9t4p12_initial_eq_row_4 : ∀ j : Fin 6, (k9t4p12.initialMatrix 9) 4 j = k9t4p12_state_0 4 j := by decide + +private theorem k9t4p12_initial_eq_row_5 : ∀ j : Fin 6, (k9t4p12.initialMatrix 9) 5 j = k9t4p12_state_0 5 j := by decide + +private theorem k9t4p12_initial_eq : (k9t4p12.initialMatrix 9) = k9t4p12_state_0 := by + funext i j + fin_cases i + + · exact k9t4p12_initial_eq_row_0 j + + · exact k9t4p12_initial_eq_row_1 j + + · exact k9t4p12_initial_eq_row_2 j + + · exact k9t4p12_initial_eq_row_3 j + + · exact k9t4p12_initial_eq_row_4 j + + · exact k9t4p12_initial_eq_row_5 j + +private theorem k9t4p12_closure_0 : ClosureCheck k9t4p12.graph k9t4p12_state_0 9 4 [] := by trivial + +private theorem k9t4p12_matrix_eq : k9t4p12.matrix 9 = k9t4p12_state_0 := by + change closureMatrix (k9t4p12.initialMatrix 9) _ = _ + rw [k9t4p12_initial_eq] + change closureMatrix k9t4p12_state_0 [] = _ + rfl + +private theorem k9t4p12_part_0 : k9t4p12.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p12_part_1 : k9t4p12.chains.map List.length = ([[1], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p12_part_2 : k9t4p12.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p12.clique))) = ([[1], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p12_templates_item_0 : (⟨0, 1, [], [], [2], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p12.graph k9t4p12.clique 9 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p12_templates_item_1 : (⟨0, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 6)).Check k9t4p12.graph k9t4p12.clique 9 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p12_templates_item_2 : (⟨0, 3, [], [2, 1], [4, 5], 1, 4⟩ : TemplateData (Fin 6)).Check k9t4p12.graph k9t4p12.clique 9 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p12_templates_item_3 : (⟨0, 4, [], [], [3], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p12.graph k9t4p12.clique 9 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p12_templates_item_4 : (⟨0, 5, [], [2, 1], [4, 3], 1, 4⟩ : TemplateData (Fin 6)).Check k9t4p12.graph k9t4p12.clique 9 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p12_templates_item_5 : (⟨1, 2, [], [0], [], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p12.graph k9t4p12.clique 9 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p12_templates_item_6 : (⟨1, 3, [], [0], [], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p12.graph k9t4p12.clique 9 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p12_templates_item_7 : (⟨1, 4, [], [0], [3], 1, 6⟩ : TemplateData (Fin 6)).Check k9t4p12.graph k9t4p12.clique 9 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p12_templates_item_8 : (⟨1, 5, [], [0], [], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p12.graph k9t4p12.clique 9 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p12_templates_item_9 : (⟨2, 3, [], [0, 1], [4, 5], 1, 4⟩ : TemplateData (Fin 6)).Check k9t4p12.graph k9t4p12.clique 9 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p12_templates_item_10 : (⟨2, 4, [], [], [3], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p12.graph k9t4p12.clique 9 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p12_templates_item_11 : (⟨3, 4, [], [], [5], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p12.graph k9t4p12.clique 9 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p12_templates_item_12 : (⟨4, 5, [], [3], [], 1, 7⟩ : TemplateData (Fin 6)).Check k9t4p12.graph k9t4p12.clique 9 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p12_part_3 : ∀ T ∈ k9t4p12.templates, T.Check k9t4p12.graph k9t4p12.clique 9 (patternAmount ([[1], [1]] : List (List ℕ))) (([[1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p12, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p12_templates_item_0, k9t4p12_templates_item_1, k9t4p12_templates_item_2, k9t4p12_templates_item_3, k9t4p12_templates_item_4, k9t4p12_templates_item_5, k9t4p12_templates_item_6, k9t4p12_templates_item_7, k9t4p12_templates_item_8, k9t4p12_templates_item_9, k9t4p12_templates_item_10, k9t4p12_templates_item_11, k9t4p12_templates_item_12⟩ + +private theorem k9t4p12_part_4 : ∀ p ∈ k9t4p12.required, p.Check k9t4p12.graph 9 := by decide + +private theorem k9t4p12_part_5 : ClosureCheck k9t4p12.graph (k9t4p12.initialMatrix 9) 9 4 k9t4p12.closure := by + rw [k9t4p12_initial_eq] + exact k9t4p12_closure_0 + +private theorem k9t4p12_part_6 : k9t4p12.bad.Check k9t4p12.graph (k9t4p12.matrix 9) 9 4 := by + rw [k9t4p12_matrix_eq] + decide + +theorem k9t4p12_check : k9t4p12.Check 9 4 [[1], [1]] := + ⟨k9t4p12_part_0, k9t4p12_part_1, k9t4p12_part_2, k9t4p12_part_3, k9t4p12_part_4, k9t4p12_part_5, k9t4p12_part_6⟩ +def k9t4p13 : LayoutCertificate 7 where + chains := [[0, 1, 2], [3, 4, 5, 6]] + clique := {0, 2, 3, 6} + templates := [⟨0, 1, [], [], [2], 2, 7⟩, + ⟨0, 1, [[3, 4, 5, 6]], [], [2], 1, 3⟩, + ⟨0, 3, [], [], [4, 5, 6], 2, 5⟩, + ⟨0, 3, [], [2, 1], [4, 5, 6], 1, 3⟩, + ⟨0, 4, [], [], [3], 2, 7⟩, + ⟨0, 4, [], [], [5, 6], 1, 6⟩, + ⟨0, 5, [], [], [4, 3], 1, 6⟩, + ⟨0, 6, [], [], [5, 4, 3], 2, 5⟩, + ⟨0, 6, [], [2, 1], [5, 4, 3], 1, 3⟩, + ⟨1, 2, [], [0], [], 2, 7⟩, + ⟨1, 2, [[3, 4, 5, 6]], [0], [], 1, 3⟩, + ⟨1, 3, [], [0], [], 2, 7⟩, + ⟨1, 3, [], [0], [4, 5, 6], 1, 4⟩, + ⟨1, 4, [], [0], [3], 1, 6⟩, + ⟨1, 5, [], [0], [4, 3], 1, 5⟩, + ⟨1, 5, [], [0], [6], 1, 6⟩, + ⟨1, 6, [], [0], [], 2, 7⟩, + ⟨1, 6, [], [0], [5, 4, 3], 1, 4⟩, + ⟨2, 4, [], [], [3], 2, 7⟩, + ⟨2, 4, [], [], [5, 6], 1, 6⟩, + ⟨2, 5, [], [], [4, 3], 1, 6⟩, + ⟨3, 4, [], [], [5, 6], 1, 6⟩, + ⟨4, 5, [], [3], [6], 1, 6⟩, + ⟨5, 6, [], [3, 4], [], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 3), (0, 3), (4, 3), (5, 3)}⟩ + + +private def k9t4p13_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, ∅, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[Finset.Icc 1 5, Finset.Icc 1 7, ∅, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p13_initial_eq_row_0 : ∀ j : Fin 7, (k9t4p13.initialMatrix 9) 0 j = k9t4p13_state_0 0 j := by decide + +private theorem k9t4p13_initial_eq_row_1 : ∀ j : Fin 7, (k9t4p13.initialMatrix 9) 1 j = k9t4p13_state_0 1 j := by decide + +private theorem k9t4p13_initial_eq_row_2 : ∀ j : Fin 7, (k9t4p13.initialMatrix 9) 2 j = k9t4p13_state_0 2 j := by decide + +private theorem k9t4p13_initial_eq_row_3 : ∀ j : Fin 7, (k9t4p13.initialMatrix 9) 3 j = k9t4p13_state_0 3 j := by decide + +private theorem k9t4p13_initial_eq_row_4 : ∀ j : Fin 7, (k9t4p13.initialMatrix 9) 4 j = k9t4p13_state_0 4 j := by decide + +private theorem k9t4p13_initial_eq_row_5 : ∀ j : Fin 7, (k9t4p13.initialMatrix 9) 5 j = k9t4p13_state_0 5 j := by decide + +private theorem k9t4p13_initial_eq_row_6 : ∀ j : Fin 7, (k9t4p13.initialMatrix 9) 6 j = k9t4p13_state_0 6 j := by decide + +private theorem k9t4p13_initial_eq : (k9t4p13.initialMatrix 9) = k9t4p13_state_0 := by + funext i j + fin_cases i + + · exact k9t4p13_initial_eq_row_0 j + + · exact k9t4p13_initial_eq_row_1 j + + · exact k9t4p13_initial_eq_row_2 j + + · exact k9t4p13_initial_eq_row_3 j + + · exact k9t4p13_initial_eq_row_4 j + + · exact k9t4p13_initial_eq_row_5 j + + · exact k9t4p13_initial_eq_row_6 j + +private theorem k9t4p13_closure_0 : ClosureCheck k9t4p13.graph k9t4p13_state_0 9 4 [] := by trivial + +private theorem k9t4p13_matrix_eq : k9t4p13.matrix 9 = k9t4p13_state_0 := by + change closureMatrix (k9t4p13.initialMatrix 9) _ = _ + rw [k9t4p13_initial_eq] + change closureMatrix k9t4p13_state_0 [] = _ + rfl + +private theorem k9t4p13_part_0 : k9t4p13.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p13_part_1 : k9t4p13.chains.map List.length = ([[1], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p13_part_2 : k9t4p13.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p13.clique))) = ([[1], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p13_templates_item_0 : (⟨0, 1, [], [], [2], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6]], [], [2], 1, 3⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_2 : (⟨0, 3, [], [], [4, 5, 6], 2, 5⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_3 : (⟨0, 3, [], [2, 1], [4, 5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_4 : (⟨0, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_5 : (⟨0, 4, [], [], [5, 6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_6 : (⟨0, 5, [], [], [4, 3], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_7 : (⟨0, 6, [], [], [5, 4, 3], 2, 5⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_8 : (⟨0, 6, [], [2, 1], [5, 4, 3], 1, 3⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_9 : (⟨1, 2, [], [0], [], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_10 : (⟨1, 2, [[3, 4, 5, 6]], [0], [], 1, 3⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_11 : (⟨1, 3, [], [0], [], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_12 : (⟨1, 3, [], [0], [4, 5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_13 : (⟨1, 4, [], [0], [3], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_14 : (⟨1, 5, [], [0], [4, 3], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_15 : (⟨1, 5, [], [0], [6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_16 : (⟨1, 6, [], [0], [], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_17 : (⟨1, 6, [], [0], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_18 : (⟨2, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_19 : (⟨2, 4, [], [], [5, 6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_20 : (⟨2, 5, [], [], [4, 3], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_21 : (⟨3, 4, [], [], [5, 6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_22 : (⟨4, 5, [], [3], [6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_templates_item_23 : (⟨5, 6, [], [3, 4], [], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p13_part_3 : ∀ T ∈ k9t4p13.templates, T.Check k9t4p13.graph k9t4p13.clique 9 (patternAmount ([[1], [2]] : List (List ℕ))) (([[1], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p13, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p13_templates_item_0, k9t4p13_templates_item_1, k9t4p13_templates_item_2, k9t4p13_templates_item_3, k9t4p13_templates_item_4, k9t4p13_templates_item_5, k9t4p13_templates_item_6, k9t4p13_templates_item_7, k9t4p13_templates_item_8, k9t4p13_templates_item_9, k9t4p13_templates_item_10, k9t4p13_templates_item_11, k9t4p13_templates_item_12, k9t4p13_templates_item_13, k9t4p13_templates_item_14, k9t4p13_templates_item_15, k9t4p13_templates_item_16, k9t4p13_templates_item_17, k9t4p13_templates_item_18, k9t4p13_templates_item_19, k9t4p13_templates_item_20, k9t4p13_templates_item_21, k9t4p13_templates_item_22, k9t4p13_templates_item_23⟩ + +private theorem k9t4p13_part_4 : ∀ p ∈ k9t4p13.required, p.Check k9t4p13.graph 9 := by decide + +private theorem k9t4p13_part_5 : ClosureCheck k9t4p13.graph (k9t4p13.initialMatrix 9) 9 4 k9t4p13.closure := by + rw [k9t4p13_initial_eq] + exact k9t4p13_closure_0 + +private theorem k9t4p13_part_6 : k9t4p13.bad.Check k9t4p13.graph (k9t4p13.matrix 9) 9 4 := by + rw [k9t4p13_matrix_eq] + decide + +theorem k9t4p13_check : k9t4p13.Check 9 4 [[1], [2]] := + ⟨k9t4p13_part_0, k9t4p13_part_1, k9t4p13_part_2, k9t4p13_part_3, k9t4p13_part_4, k9t4p13_part_5, k9t4p13_part_6⟩ +def k9t4p14 : LayoutCertificate 8 where + chains := [[0, 1, 2], [3, 4, 5, 6, 7]] + clique := {0, 2, 3, 7} + templates := [⟨0, 1, [], [], [2], 3, 7⟩, + ⟨0, 1, [[3, 4, 5, 6, 7]], [], [2], 1, 2⟩, + ⟨0, 3, [], [], [], 4, 8⟩, + ⟨0, 3, [], [], [4, 5, 6, 7], 2, 4⟩, + ⟨0, 3, [], [2, 1], [4, 5, 6, 7], 1, 2⟩, + ⟨0, 4, [], [], [3], 3, 7⟩, + ⟨0, 4, [], [], [5, 6, 7], 1, 5⟩, + ⟨0, 6, [], [], [5, 4, 3], 1, 5⟩, + ⟨0, 7, [], [], [6, 5, 4, 3], 2, 4⟩, + ⟨0, 7, [], [2, 1], [6, 5, 4, 3], 1, 2⟩, + ⟨1, 2, [[3, 4, 5, 6, 7]], [0], [], 1, 2⟩, + ⟨1, 3, [], [0], [], 3, 7⟩, + ⟨1, 3, [], [0], [4, 5, 6, 7], 1, 3⟩, + ⟨1, 4, [], [0], [3], 2, 6⟩, + ⟨1, 4, [], [0], [5, 6, 7], 1, 4⟩, + ⟨1, 5, [], [0], [4, 3], 1, 5⟩, + ⟨1, 6, [], [0], [5, 4, 3], 1, 4⟩, + ⟨1, 7, [], [0], [6, 5, 4, 3], 1, 3⟩, + ⟨2, 3, [], [0, 1], [4, 5, 6, 7], 1, 2⟩, + ⟨2, 4, [], [], [5, 6, 7], 1, 5⟩, + ⟨3, 4, [], [], [5, 6, 7], 1, 5⟩, + ⟨4, 5, [], [3], [6, 7], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 3), (0, 3), (4, 3), (3, 2)}⟩ + + +private def k9t4p14_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, ∅, Finset.Icc 1 8, Finset.Icc 1 7, ∅, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 7, ∅, {1, 2}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[∅, {1, 2}, ∅, {1, 2}, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 7, {1, 2}, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p14_initial_eq_row_0 : ∀ j : Fin 8, (k9t4p14.initialMatrix 9) 0 j = k9t4p14_state_0 0 j := by decide + +private theorem k9t4p14_initial_eq_row_1 : ∀ j : Fin 8, (k9t4p14.initialMatrix 9) 1 j = k9t4p14_state_0 1 j := by decide + +private theorem k9t4p14_initial_eq_row_2 : ∀ j : Fin 8, (k9t4p14.initialMatrix 9) 2 j = k9t4p14_state_0 2 j := by decide + +private theorem k9t4p14_initial_eq_row_3 : ∀ j : Fin 8, (k9t4p14.initialMatrix 9) 3 j = k9t4p14_state_0 3 j := by decide + +private theorem k9t4p14_initial_eq_row_4 : ∀ j : Fin 8, (k9t4p14.initialMatrix 9) 4 j = k9t4p14_state_0 4 j := by decide + +private theorem k9t4p14_initial_eq_row_5 : ∀ j : Fin 8, (k9t4p14.initialMatrix 9) 5 j = k9t4p14_state_0 5 j := by decide + +private theorem k9t4p14_initial_eq_row_6 : ∀ j : Fin 8, (k9t4p14.initialMatrix 9) 6 j = k9t4p14_state_0 6 j := by decide + +private theorem k9t4p14_initial_eq_row_7 : ∀ j : Fin 8, (k9t4p14.initialMatrix 9) 7 j = k9t4p14_state_0 7 j := by decide + +private theorem k9t4p14_initial_eq : (k9t4p14.initialMatrix 9) = k9t4p14_state_0 := by + funext i j + fin_cases i + + · exact k9t4p14_initial_eq_row_0 j + + · exact k9t4p14_initial_eq_row_1 j + + · exact k9t4p14_initial_eq_row_2 j + + · exact k9t4p14_initial_eq_row_3 j + + · exact k9t4p14_initial_eq_row_4 j + + · exact k9t4p14_initial_eq_row_5 j + + · exact k9t4p14_initial_eq_row_6 j + + · exact k9t4p14_initial_eq_row_7 j + +private theorem k9t4p14_closure_0 : ClosureCheck k9t4p14.graph k9t4p14_state_0 9 4 [] := by trivial + +private theorem k9t4p14_matrix_eq : k9t4p14.matrix 9 = k9t4p14_state_0 := by + change closureMatrix (k9t4p14.initialMatrix 9) _ = _ + rw [k9t4p14_initial_eq] + change closureMatrix k9t4p14_state_0 [] = _ + rfl + +private theorem k9t4p14_part_0 : k9t4p14.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p14_part_1 : k9t4p14.chains.map List.length = ([[1], [3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p14_part_2 : k9t4p14.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p14.clique))) = ([[1], [3]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p14_templates_item_0 : (⟨0, 1, [], [], [2], 3, 7⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6, 7]], [], [2], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_2 : (⟨0, 3, [], [], [], 4, 8⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_3 : (⟨0, 3, [], [], [4, 5, 6, 7], 2, 4⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_4 : (⟨0, 3, [], [2, 1], [4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_5 : (⟨0, 4, [], [], [3], 3, 7⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_6 : (⟨0, 4, [], [], [5, 6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_7 : (⟨0, 6, [], [], [5, 4, 3], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_8 : (⟨0, 7, [], [], [6, 5, 4, 3], 2, 4⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_9 : (⟨0, 7, [], [2, 1], [6, 5, 4, 3], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_10 : (⟨1, 2, [[3, 4, 5, 6, 7]], [0], [], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_11 : (⟨1, 3, [], [0], [], 3, 7⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_12 : (⟨1, 3, [], [0], [4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_13 : (⟨1, 4, [], [0], [3], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_14 : (⟨1, 4, [], [0], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_15 : (⟨1, 5, [], [0], [4, 3], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_16 : (⟨1, 6, [], [0], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_17 : (⟨1, 7, [], [0], [6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_18 : (⟨2, 3, [], [0, 1], [4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_19 : (⟨2, 4, [], [], [5, 6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_20 : (⟨3, 4, [], [], [5, 6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_templates_item_21 : (⟨4, 5, [], [3], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p14_part_3 : ∀ T ∈ k9t4p14.templates, T.Check k9t4p14.graph k9t4p14.clique 9 (patternAmount ([[1], [3]] : List (List ℕ))) (([[1], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p14, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p14_templates_item_0, k9t4p14_templates_item_1, k9t4p14_templates_item_2, k9t4p14_templates_item_3, k9t4p14_templates_item_4, k9t4p14_templates_item_5, k9t4p14_templates_item_6, k9t4p14_templates_item_7, k9t4p14_templates_item_8, k9t4p14_templates_item_9, k9t4p14_templates_item_10, k9t4p14_templates_item_11, k9t4p14_templates_item_12, k9t4p14_templates_item_13, k9t4p14_templates_item_14, k9t4p14_templates_item_15, k9t4p14_templates_item_16, k9t4p14_templates_item_17, k9t4p14_templates_item_18, k9t4p14_templates_item_19, k9t4p14_templates_item_20, k9t4p14_templates_item_21⟩ + +private theorem k9t4p14_part_4 : ∀ p ∈ k9t4p14.required, p.Check k9t4p14.graph 9 := by decide + +private theorem k9t4p14_part_5 : ClosureCheck k9t4p14.graph (k9t4p14.initialMatrix 9) 9 4 k9t4p14.closure := by + rw [k9t4p14_initial_eq] + exact k9t4p14_closure_0 + +private theorem k9t4p14_part_6 : k9t4p14.bad.Check k9t4p14.graph (k9t4p14.matrix 9) 9 4 := by + rw [k9t4p14_matrix_eq] + decide + +theorem k9t4p14_check : k9t4p14.Check 9 4 [[1], [3]] := + ⟨k9t4p14_part_0, k9t4p14_part_1, k9t4p14_part_2, k9t4p14_part_3, k9t4p14_part_4, k9t4p14_part_5, k9t4p14_part_6⟩ +private def k9t4p15_step_0_data : EdgeAttachmentData 9 := ⟨4, 1, [⟨0, 5, [1, 4, 3, 2, 8, 7, 6]⟩, ⟨0, 2, [1, 4, 5, 6, 7, 8, 3]⟩, ⟨0, 1, [2, 8, 7, 6, 5, 4]⟩, ⟨0, 3, [8, 2, 1, 4]⟩, ⟨1, 0, [4, 5, 6, 7, 8]⟩, ⟨1, 2, [4, 5, 6, 7, 8, 0]⟩, ⟨1, 0, [4, 5, 6, 7, 8, 2]⟩, ⟨1, 3, [4, 5, 6, 7, 8]⟩, ⟨3, 7, [0, 1, 4, 5, 6]⟩, ⟨3, 8, [0, 1, 4, 5, 6, 7]⟩, ⟨3, 7, [0, 2, 1, 4, 5, 6]⟩, ⟨3, 8, [0, 2, 1, 4, 5, 6, 7]⟩, ⟨3, 7, [0, 8, 2, 1, 4, 5, 6]⟩, ⟨3, 5, [4, 1, 0, 2, 8, 7, 6]⟩, ⟨7, 3, [6, 5, 4, 1, 0, 8, 2]⟩, ⟨7, 3, [6, 5, 4, 1, 0, 8]⟩], ⟨none, {(1, 3), (0, 3), (3, 3), (7, 3)}⟩⟩ + +private def k9t4p15_step_0 : ClosureStep 9 := .edge k9t4p15_step_0_data + +private def k9t4p15_step_1_data : EdgeAttachmentData 9 := ⟨5, 0, [⟨1, 2, [0, 5, 4, 3, 8]⟩, ⟨1, 2, [0, 5, 6, 7, 8, 3]⟩, ⟨1, 0, [2, 3, 8, 7, 6, 5]⟩, ⟨2, 6, [1, 0, 5, 4, 3, 8, 7]⟩, ⟨2, 1, [3, 8, 7, 6, 5, 0]⟩, ⟨4, 8, [3, 2, 0, 5, 6, 7]⟩, ⟨4, 8, [3, 2, 1, 0, 5, 6, 7]⟩, ⟨4, 7, [3, 8, 2, 0, 5, 6]⟩, ⟨4, 7, [3, 8, 2, 1, 0, 5, 6]⟩, ⟨4, 6, [5, 0, 1, 2, 3, 8, 7]⟩, ⟨7, 4, [6, 5, 0, 1, 2, 8, 3]⟩, ⟨7, 4, [8, 3, 2, 1, 0, 5]⟩], ⟨none, {(1, 3), (4, 3), (2, 3), (7, 3)}⟩⟩ + +private def k9t4p15_step_1 : ClosureStep 9 := .edge k9t4p15_step_1_data + +private def k9t4p15_step_2_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨2, 0, [1, 3, 4, 9, 8, 7, 6]⟩, ⟨2, 0, [1, 3, 9, 4, 5, 6]⟩, ⟨2, 7, [1, 0, 6, 5, 4, 3, 9, 8]⟩, ⟨2, 3, [1, 0, 6, 5, 4, 9]⟩, ⟨2, 5, [1, 0, 6, 7, 8, 9, 3, 4]⟩, ⟨2, 4, [3, 1, 0, 6, 5]⟩, ⟨2, 1, [3, 9, 4, 5, 6, 0]⟩, ⟨2, 0, [3, 9, 8, 7, 6, 5, 4, 1]⟩, ⟨4, 0, [1, 2, 3, 9, 8, 7, 6]⟩, ⟨4, 0, [1, 3, 9, 8, 7, 6]⟩, ⟨4, 9, [3, 1, 0, 6, 7, 8]⟩, ⟨4, 9, [3, 2, 1, 0, 6, 7, 8]⟩] + +private def k9t4p15_step_2_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨4, 0, [5, 6, 7, 8, 9, 3, 2, 1]⟩, ⟨4, 7, [5, 6, 0, 1, 2, 3, 9, 8]⟩, ⟨4, 7, [5, 6, 0, 1, 3, 9, 8]⟩, ⟨4, 8, [9, 3, 1, 0, 6, 7]⟩, ⟨4, 7, [9, 3, 2, 1, 0, 6]⟩, ⟨4, 8, [9, 3, 2, 1, 0, 6, 7]⟩, ⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 3, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 9, 8, 7, 6]⟩, ⟨5, 2, [4, 1, 0, 6, 7, 8, 9, 3]⟩, ⟨5, 9, [4, 3, 1, 0, 6, 7, 8]⟩, ⟨5, 9, [4, 3, 2, 1, 0, 6, 7, 8]⟩] + +private def k9t4p15_step_2_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨5, 0, [4, 9, 3, 1]⟩, ⟨5, 8, [4, 9, 3, 1, 0, 6, 7]⟩, ⟨5, 0, [4, 9, 3, 2, 1]⟩, ⟨5, 7, [4, 9, 3, 2, 1, 0, 6]⟩, ⟨5, 8, [4, 9, 3, 2, 1, 0, 6, 7]⟩, ⟨5, 3, [4, 9, 8, 7, 6, 0, 1, 2]⟩, ⟨5, 7, [6, 0, 1, 2, 3, 4, 9, 8]⟩, ⟨5, 4, [6, 0, 1]⟩, ⟨0, 4, [1, 2, 3]⟩, ⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 6, [1, 2, 3, 4, 9, 8, 7]⟩] + +private def k9t4p15_step_2_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 5, [1, 2, 3, 4, 9, 8, 7, 6]⟩, ⟨0, 4, [1, 2, 3, 9]⟩, ⟨0, 7, [1, 2, 3, 9, 4, 5, 6]⟩, ⟨0, 8, [1, 2, 3, 9, 4, 5, 6, 7]⟩, ⟨0, 5, [1, 2, 3, 9, 8, 7, 6]⟩, ⟨0, 4, [1, 2, 3, 9, 8, 7, 6, 5]⟩, ⟨0, 9, [1, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 4, [1, 3, 9, 8, 7, 6, 5]⟩, ⟨0, 2, [1, 4, 3]⟩, ⟨0, 3, [1, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 2, [1, 4, 5, 6, 7, 8, 9, 3]⟩, ⟨0, 2, [1, 4, 9, 3]⟩] + +private def k9t4p15_step_2_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 4, [1, 9, 8, 7, 6, 5]⟩, ⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩, ⟨0, 2, [6, 5, 4, 1, 3]⟩, ⟨0, 2, [6, 5, 4, 1, 9, 3]⟩, ⟨0, 4, [6, 7, 8, 9, 1]⟩, ⟨0, 2, [6, 7, 8, 9, 1, 4, 3]⟩, ⟨0, 1, [6, 7, 8, 9, 4, 3, 2]⟩] + +private def k9t4p15_step_2_data : FreshAttachmentData 9 := ⟨5, 0, k9t4p15_step_2_required_block_0 ++ k9t4p15_step_2_required_block_1 ++ k9t4p15_step_2_required_block_2 ++ k9t4p15_step_2_required_block_3 ++ k9t4p15_step_2_required_block_4, ⟨none, {(5, 2), (0, 2), (2, 3), (4, 3)}⟩⟩ + +private def k9t4p15_step_2 : ClosureStep 9 := .fresh k9t4p15_step_2_data + +private def k9t4p15_step_3_data : EdgeAttachmentData 9 := ⟨5, 1, [⟨0, 6, [1, 5, 4, 3, 2, 8, 7]⟩, ⟨0, 1, [2, 3, 8, 7, 6, 5]⟩, ⟨1, 0, [5, 4, 3, 8, 2]⟩, ⟨1, 2, [5, 6, 7, 8, 0, 3]⟩, ⟨1, 0, [5, 6, 7, 8, 2, 3]⟩, ⟨4, 8, [3, 0, 1, 5, 6, 7]⟩, ⟨4, 7, [3, 0, 2, 1, 5, 6]⟩, ⟨4, 8, [3, 0, 2, 1, 5, 6, 7]⟩, ⟨4, 7, [3, 0, 8, 2, 1, 5, 6]⟩, ⟨4, 6, [5, 1, 0, 2, 3, 8, 7]⟩, ⟨7, 4, [6, 5, 1, 0, 8, 2, 3]⟩, ⟨7, 4, [8, 0, 3, 2, 1, 5]⟩], ⟨none, {(1, 3), (4, 3), (0, 3), (7, 3)}⟩⟩ + +private def k9t4p15_step_3 : ClosureStep 9 := .edge k9t4p15_step_3_data + +private def k9t4p15_step_4_data : EdgeAttachmentData 9 := ⟨5, 2, [⟨0, 6, [1, 2, 5, 4, 3, 8, 7]⟩, ⟨0, 1, [3, 8, 7, 6, 5, 2]⟩, ⟨1, 2, [0, 3, 8, 7, 6, 5]⟩, ⟨1, 0, [2, 5, 4, 3, 8]⟩, ⟨1, 0, [2, 5, 6, 7, 8, 3]⟩, ⟨4, 8, [3, 0, 1, 2, 5, 6, 7]⟩, ⟨4, 8, [3, 0, 2, 5, 6, 7]⟩, ⟨4, 7, [3, 0, 8, 2, 5, 6]⟩, ⟨4, 7, [3, 8, 0, 1, 2, 5, 6]⟩, ⟨4, 6, [5, 2, 1, 0, 3, 8, 7]⟩, ⟨7, 4, [6, 5, 2, 1, 0, 8, 3]⟩, ⟨7, 4, [8, 3, 0, 1, 2, 5]⟩], ⟨none, {(1, 3), (4, 3), (0, 3), (7, 3)}⟩⟩ + +private def k9t4p15_step_4 : ClosureStep 9 := .edge k9t4p15_step_4_data + +private def k9t4p15_step_5_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨2, 0, [1, 3, 4, 9, 8, 7, 6]⟩, ⟨2, 4, [1, 3, 0, 6, 5]⟩, ⟨2, 7, [1, 3, 0, 6, 5, 4, 9, 8]⟩, ⟨2, 0, [1, 9, 3, 4, 5, 6]⟩, ⟨2, 3, [1, 9, 4, 5, 6, 0]⟩, ⟨2, 0, [1, 9, 8, 7, 6, 5, 4, 3]⟩, ⟨2, 5, [1, 9, 8, 7, 6, 0, 3, 4]⟩, ⟨2, 1, [3, 0, 6, 5, 4, 9]⟩, ⟨4, 0, [1, 2, 3, 9, 8, 7, 6]⟩, ⟨4, 9, [1, 2, 3, 0, 6, 7, 8]⟩, ⟨4, 0, [1, 3, 9, 8, 7, 6]⟩, ⟨4, 9, [1, 3, 0, 6, 7, 8]⟩] + +private def k9t4p15_step_5_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨4, 8, [1, 9, 3, 0, 6, 7]⟩, ⟨4, 0, [5, 6, 7, 8, 9, 1, 2, 3]⟩, ⟨4, 7, [5, 6, 0, 3, 1, 9, 8]⟩, ⟨4, 7, [5, 6, 0, 3, 2, 1, 9, 8]⟩, ⟨4, 7, [9, 1, 2, 3, 0, 6]⟩, ⟨4, 8, [9, 1, 2, 3, 0, 6, 7]⟩, ⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩, ⟨5, 9, [4, 1, 2, 3, 0, 6, 7, 8]⟩, ⟨5, 0, [4, 1, 3, 9, 8, 7, 6]⟩, ⟨5, 9, [4, 1, 3, 0, 6, 7, 8]⟩, ⟨5, 0, [4, 1, 9, 3]⟩, ⟨5, 8, [4, 1, 9, 3, 0, 6, 7]⟩] + +private def k9t4p15_step_5_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨5, 0, [4, 1, 9, 8, 7, 6]⟩, ⟨5, 2, [4, 1, 9, 8, 7, 6, 0, 3]⟩, ⟨5, 0, [4, 9, 1, 2, 3]⟩, ⟨5, 7, [4, 9, 1, 2, 3, 0, 6]⟩, ⟨5, 8, [4, 9, 1, 2, 3, 0, 6, 7]⟩, ⟨5, 1, [4, 9, 8, 7, 6, 0, 3, 2]⟩, ⟨5, 7, [6, 0, 3, 2, 1, 4, 9, 8]⟩, ⟨5, 4, [6, 0, 3]⟩, ⟨0, 9, [3, 1, 4, 5, 6, 7, 8]⟩, ⟨0, 5, [3, 1, 4, 9, 8, 7, 6]⟩, ⟨0, 4, [3, 1, 9]⟩, ⟨0, 8, [3, 1, 9, 4, 5, 6, 7]⟩] + +private def k9t4p15_step_5_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 4, [3, 1, 9, 8, 7, 6, 5]⟩, ⟨0, 9, [3, 2, 1, 4, 5, 6, 7, 8]⟩, ⟨0, 6, [3, 2, 1, 4, 9, 8, 7]⟩, ⟨0, 5, [3, 2, 1, 4, 9, 8, 7, 6]⟩, ⟨0, 4, [3, 2, 1, 9]⟩, ⟨0, 7, [3, 2, 1, 9, 4, 5, 6]⟩, ⟨0, 8, [3, 2, 1, 9, 4, 5, 6, 7]⟩, ⟨0, 4, [3, 2, 1, 9, 8, 7, 6, 5]⟩, ⟨0, 2, [3, 4, 1]⟩, ⟨0, 1, [3, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 2, [3, 4, 5, 6, 7, 8, 9, 1]⟩, ⟨0, 2, [3, 4, 9, 1]⟩] + +private def k9t4p15_step_5_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 4, [3, 9, 8, 7, 6, 5]⟩, ⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩, ⟨0, 2, [6, 5, 4, 1, 3]⟩, ⟨0, 2, [6, 5, 4, 1, 9, 3]⟩, ⟨0, 4, [6, 7, 8, 9, 1]⟩, ⟨0, 2, [6, 7, 8, 9, 1, 4, 3]⟩, ⟨0, 3, [6, 7, 8, 9, 4, 1, 2]⟩] + +private def k9t4p15_step_5_data : FreshAttachmentData 9 := ⟨5, 2, k9t4p15_step_5_required_block_0 ++ k9t4p15_step_5_required_block_1 ++ k9t4p15_step_5_required_block_2 ++ k9t4p15_step_5_required_block_3 ++ k9t4p15_step_5_required_block_4, ⟨none, {(5, 2), (0, 2), (2, 3), (4, 3)}⟩⟩ + +private def k9t4p15_step_5 : ClosureStep 9 := .fresh k9t4p15_step_5_data + +private def k9t4p15_step_6_data : FreshAttachmentData 9 := ⟨5, 3, [⟨2, 0, [1, 3, 9, 8, 7, 6, 5, 4]⟩, ⟨2, 5, [1, 3, 9, 8, 7, 6, 0, 4]⟩, ⟨2, 0, [1, 9, 3, 4, 5, 6]⟩, ⟨2, 0, [1, 9, 8, 7, 6, 5, 4]⟩, ⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 3, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 9, 8, 7, 6]⟩, ⟨5, 3, [4, 0, 6, 7, 8, 9, 1, 2]⟩, ⟨5, 2, [4, 0, 6, 7, 8, 9, 1, 3]⟩, ⟨5, 1, [4, 0, 6, 7, 8, 9, 3, 2]⟩, ⟨5, 8, [6, 0, 4, 1, 2, 3, 9]⟩, ⟨5, 7, [6, 0, 4, 1, 2, 3, 9, 8]⟩, ⟨5, 7, [6, 0, 4, 1, 3, 9, 8]⟩, ⟨7, 0, [8, 9, 1, 2, 3, 4, 5, 6]⟩, ⟨7, 5, [8, 9, 1, 2, 3, 4, 0, 6]⟩, ⟨7, 0, [8, 9, 1, 3, 4, 5, 6]⟩, ⟨7, 5, [8, 9, 1, 3, 4, 0, 6]⟩, ⟨0, 7, [4, 1, 2, 3, 9, 8]⟩, ⟨0, 5, [4, 1, 2, 3, 9, 8, 7, 6]⟩, ⟨0, 7, [4, 1, 3, 9, 8]⟩, ⟨0, 2, [4, 1, 9, 3]⟩, ⟨0, 2, [4, 5, 6, 7, 8, 9, 1]⟩, ⟨0, 3, [4, 5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 2, [4, 5, 6, 7, 8, 9, 1, 3]⟩, ⟨0, 1, [4, 5, 6, 7, 8, 9, 3, 2]⟩, ⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩, ⟨0, 2, [6, 5, 4, 1, 3]⟩, ⟨0, 7, [6, 5, 4, 1, 3, 9, 8]⟩, ⟨0, 2, [6, 5, 4, 1, 9, 3]⟩], ⟨none, {(5, 2), (0, 1), (2, 3), (7, 2)}⟩⟩ + +private def k9t4p15_step_6 : ClosureStep 9 := .fresh k9t4p15_step_6_data + +private def k9t4p15_step_7_data : EdgeAttachmentData 9 := ⟨6, 0, [⟨1, 2, [0, 6, 5, 4, 3]⟩, ⟨1, 2, [0, 6, 5, 4, 3, 8]⟩, ⟨1, 0, [2, 8, 3, 4, 5, 6]⟩, ⟨2, 5, [1, 0, 6, 7, 8, 3, 4]⟩, ⟨2, 1, [8, 3, 4, 5, 6, 0]⟩, ⟨4, 7, [3, 8, 2, 1, 0, 6]⟩, ⟨4, 7, [5, 6, 0, 1, 2, 3, 8]⟩, ⟨7, 5, [6, 0, 1, 2, 8, 3, 4]⟩, ⟨7, 3, [8, 2, 0, 6, 5, 4]⟩, ⟨7, 3, [8, 2, 1, 0, 6, 5, 4]⟩, ⟨7, 4, [8, 2, 3, 0, 6, 5]⟩, ⟨7, 4, [8, 3, 2, 1, 0, 6, 5]⟩], ⟨none, {(1, 3), (7, 3), (2, 3), (4, 3)}⟩⟩ + +private def k9t4p15_step_7 : ClosureStep 9 := .edge k9t4p15_step_7_data + +private def k9t4p15_step_8_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨2, 0, [1, 3, 4, 9, 8, 7]⟩, ⟨2, 0, [1, 3, 9, 4, 5, 6, 7]⟩, ⟨2, 3, [1, 0, 7, 6, 5, 4]⟩, ⟨2, 8, [1, 0, 7, 6, 5, 4, 3, 9]⟩, ⟨2, 6, [1, 0, 7, 8, 9, 3, 4, 5]⟩, ⟨2, 9, [3, 1, 0, 7, 8]⟩, ⟨2, 1, [3, 4, 9, 8, 7, 0]⟩, ⟨2, 0, [3, 9, 8, 7, 6, 5, 4, 1]⟩, ⟨8, 6, [7, 0, 1, 2, 3, 9, 4, 5]⟩, ⟨8, 9, [7, 0, 1]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩] + +private def k9t4p15_step_8_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨8, 0, [9, 1, 4, 5, 6, 7]⟩, ⟨8, 2, [9, 1, 0, 7, 6, 5, 4, 3]⟩, ⟨8, 4, [9, 3, 1, 0, 7, 6, 5]⟩, ⟨8, 4, [9, 3, 2, 1, 0, 7, 6, 5]⟩, ⟨8, 0, [9, 3, 4, 1]⟩, ⟨8, 5, [9, 3, 4, 1, 0, 7, 6]⟩, ⟨8, 0, [9, 4, 3, 2, 1]⟩, ⟨8, 6, [9, 4, 3, 2, 1, 0, 7]⟩, ⟨8, 5, [9, 4, 3, 2, 1, 0, 7, 6]⟩, ⟨8, 3, [9, 4, 5, 6, 7, 0, 1, 2]⟩, ⟨9, 0, [1, 2, 3, 4, 5, 6, 7]⟩, ⟨9, 0, [1, 3, 4, 5, 6, 7]⟩] + +private def k9t4p15_step_8_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨9, 4, [3, 1, 0, 7, 6, 5]⟩, ⟨9, 4, [3, 2, 1, 0, 7, 6, 5]⟩, ⟨9, 5, [3, 4, 1, 0, 7, 6]⟩, ⟨9, 6, [4, 3, 2, 1, 0, 7]⟩, ⟨9, 5, [4, 3, 2, 1, 0, 7, 6]⟩, ⟨9, 0, [8, 7, 6, 5, 4, 3, 2, 1]⟩, ⟨9, 6, [8, 7, 0, 1, 2, 3, 4, 5]⟩, ⟨9, 6, [8, 7, 0, 1, 3, 4, 5]⟩, ⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 9, [1, 2, 3, 4]⟩, ⟨0, 6, [1, 2, 3, 4, 9, 8, 7]⟩] + +private def k9t4p15_step_8_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 5, [1, 2, 3, 4, 9, 8, 7, 6]⟩, ⟨0, 9, [1, 2, 3]⟩, ⟨0, 7, [1, 2, 3, 9, 4, 5, 6]⟩, ⟨0, 8, [1, 2, 3, 9, 4, 5, 6, 7]⟩, ⟨0, 5, [1, 2, 3, 9, 8, 7, 6]⟩, ⟨0, 4, [1, 2, 3, 9, 8, 7, 6, 5]⟩, ⟨0, 9, [1, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 4, [1, 3, 9, 8, 7, 6, 5]⟩, ⟨0, 2, [1, 4, 3]⟩, ⟨0, 9, [1, 4, 5, 6, 7, 8]⟩, ⟨0, 3, [1, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 2, [1, 4, 5, 6, 7, 8, 9, 3]⟩] + +private def k9t4p15_step_8_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 2, [1, 4, 9, 3]⟩, ⟨0, 2, [7, 6, 5, 4, 1]⟩, ⟨0, 2, [7, 6, 5, 4, 1, 3]⟩, ⟨0, 9, [7, 6, 5, 4, 1]⟩, ⟨0, 2, [7, 6, 5, 4, 1, 9, 3]⟩, ⟨0, 1, [7, 6, 5, 4, 9, 3, 2]⟩, ⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩] + +private def k9t4p15_step_8_data : FreshAttachmentData 9 := ⟨6, 0, k9t4p15_step_8_required_block_0 ++ k9t4p15_step_8_required_block_1 ++ k9t4p15_step_8_required_block_2 ++ k9t4p15_step_8_required_block_3 ++ k9t4p15_step_8_required_block_4, ⟨none, {(8, 2), (0, 2), (2, 3), (9, 3)}⟩⟩ + +private def k9t4p15_step_8 : ClosureStep 9 := .fresh k9t4p15_step_8_data + +private def k9t4p15_step_9_data : EdgeAttachmentData 9 := ⟨6, 1, [⟨0, 1, [8, 2, 3, 4, 5, 6]⟩, ⟨0, 5, [8, 7, 6, 1, 2, 3, 4]⟩, ⟨1, 2, [6, 5, 4, 3, 0, 8]⟩, ⟨1, 0, [6, 5, 4, 3, 8]⟩, ⟨1, 0, [6, 5, 4, 3, 8, 2]⟩, ⟨4, 7, [3, 0, 8, 2, 1, 6]⟩, ⟨4, 7, [5, 6, 1, 0, 2, 3, 8]⟩, ⟨7, 5, [6, 1, 0, 8, 2, 3, 4]⟩, ⟨7, 3, [8, 0, 1, 6, 5, 4]⟩, ⟨7, 4, [8, 0, 2, 1, 6, 5]⟩, ⟨7, 3, [8, 0, 2, 1, 6, 5, 4]⟩, ⟨7, 4, [8, 0, 3, 2, 1, 6, 5]⟩], ⟨none, {(1, 3), (7, 3), (0, 3), (4, 3)}⟩⟩ + +private def k9t4p15_step_9 : ClosureStep 9 := .edge k9t4p15_step_9_data + +private def k9t4p15_step_10_data : EdgeAttachmentData 9 := ⟨6, 2, [⟨0, 5, [1, 2, 6, 7, 8, 3, 4]⟩, ⟨0, 1, [8, 3, 4, 5, 6, 2]⟩, ⟨1, 2, [0, 8, 3, 4, 5, 6]⟩, ⟨1, 0, [2, 6, 5, 4, 3]⟩, ⟨1, 0, [2, 6, 5, 4, 3, 8]⟩, ⟨4, 7, [3, 8, 0, 1, 2, 6]⟩, ⟨4, 7, [5, 6, 2, 1, 0, 3, 8]⟩, ⟨7, 5, [6, 2, 1, 0, 8, 3, 4]⟩, ⟨7, 4, [8, 0, 1, 2, 6, 5]⟩, ⟨7, 3, [8, 0, 1, 2, 6, 5, 4]⟩, ⟨7, 3, [8, 0, 2, 6, 5, 4]⟩, ⟨7, 4, [8, 3, 0, 1, 2, 6, 5]⟩], ⟨none, {(1, 3), (7, 3), (0, 3), (4, 3)}⟩⟩ + +private def k9t4p15_step_10 : ClosureStep 9 := .edge k9t4p15_step_10_data + +private def k9t4p15_step_11_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨2, 8, [1, 3, 0, 7, 6, 5, 4, 9]⟩, ⟨2, 9, [1, 3, 0, 7, 8]⟩, ⟨2, 3, [1, 4, 9, 8, 7, 0]⟩, ⟨2, 0, [1, 9, 3, 4, 5, 6, 7]⟩, ⟨2, 0, [1, 9, 4, 5, 6, 7]⟩, ⟨2, 0, [1, 9, 8, 7, 6, 5, 4, 3]⟩, ⟨2, 6, [1, 9, 8, 7, 0, 3, 4, 5]⟩, ⟨2, 1, [3, 0, 7, 6, 5, 4]⟩, ⟨8, 6, [7, 0, 3, 2, 1, 9, 4, 5]⟩, ⟨8, 9, [7, 0, 3]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 3]⟩] + +private def k9t4p15_step_11_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨8, 5, [9, 1, 2, 3, 0, 7, 6]⟩, ⟨8, 4, [9, 1, 2, 3, 0, 7, 6, 5]⟩, ⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩, ⟨8, 4, [9, 1, 3, 0, 7, 6, 5]⟩, ⟨8, 0, [9, 1, 4, 5, 6, 7]⟩, ⟨8, 2, [9, 1, 4, 5, 6, 7, 0, 3]⟩, ⟨8, 0, [9, 4, 1, 2, 3]⟩, ⟨8, 6, [9, 4, 1, 2, 3, 0, 7]⟩, ⟨8, 5, [9, 4, 1, 2, 3, 0, 7, 6]⟩, ⟨8, 1, [9, 4, 5, 6, 7, 0, 3, 2]⟩, ⟨9, 0, [1, 2, 3, 4, 5, 6, 7]⟩, ⟨9, 5, [1, 2, 3, 0, 7, 6]⟩] + +private def k9t4p15_step_11_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨9, 4, [1, 2, 3, 0, 7, 6, 5]⟩, ⟨9, 0, [1, 3, 4, 5, 6, 7]⟩, ⟨9, 4, [1, 3, 0, 7, 6, 5]⟩, ⟨9, 6, [4, 1, 2, 3, 0, 7]⟩, ⟨9, 5, [4, 1, 2, 3, 0, 7, 6]⟩, ⟨9, 0, [8, 7, 6, 5, 4, 1, 2, 3]⟩, ⟨9, 6, [8, 7, 0, 3, 1, 4, 5]⟩, ⟨9, 6, [8, 7, 0, 3, 2, 1, 4, 5]⟩, ⟨0, 9, [3, 1, 4, 5, 6, 7, 8]⟩, ⟨0, 9, [3, 1, 4]⟩, ⟨0, 5, [3, 1, 4, 9, 8, 7, 6]⟩, ⟨0, 8, [3, 1, 9, 4, 5, 6, 7]⟩] + +private def k9t4p15_step_11_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 4, [3, 1, 9, 8, 7, 6, 5]⟩, ⟨0, 9, [3, 2, 1, 4, 5, 6, 7, 8]⟩, ⟨0, 9, [3, 2, 1, 4]⟩, ⟨0, 6, [3, 2, 1, 4, 9, 8, 7]⟩, ⟨0, 5, [3, 2, 1, 4, 9, 8, 7, 6]⟩, ⟨0, 7, [3, 2, 1, 9, 4, 5, 6]⟩, ⟨0, 8, [3, 2, 1, 9, 4, 5, 6, 7]⟩, ⟨0, 4, [3, 2, 1, 9, 8, 7, 6, 5]⟩, ⟨0, 2, [3, 4, 1]⟩, ⟨0, 9, [3, 4, 5, 6, 7, 8]⟩, ⟨0, 1, [3, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 2, [3, 4, 5, 6, 7, 8, 9, 1]⟩] + +private def k9t4p15_step_11_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 2, [3, 4, 9, 1]⟩, ⟨0, 2, [7, 6, 5, 4, 1]⟩, ⟨0, 2, [7, 6, 5, 4, 1, 3]⟩, ⟨0, 9, [7, 6, 5, 4, 1]⟩, ⟨0, 2, [7, 6, 5, 4, 1, 9, 3]⟩, ⟨0, 3, [7, 6, 5, 4, 9, 1, 2]⟩, ⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩] + +private def k9t4p15_step_11_data : FreshAttachmentData 9 := ⟨6, 2, k9t4p15_step_11_required_block_0 ++ k9t4p15_step_11_required_block_1 ++ k9t4p15_step_11_required_block_2 ++ k9t4p15_step_11_required_block_3 ++ k9t4p15_step_11_required_block_4, ⟨none, {(8, 2), (0, 2), (2, 3), (9, 3)}⟩⟩ + +private def k9t4p15_step_11 : ClosureStep 9 := .fresh k9t4p15_step_11_data + +private def k9t4p15_step_12_data : FreshAttachmentData 9 := ⟨6, 3, [⟨2, 0, [1, 3, 9, 8, 7, 6, 5, 4]⟩, ⟨2, 6, [1, 3, 9, 8, 7, 0, 4, 5]⟩, ⟨2, 0, [1, 9, 3, 4, 5, 6, 7]⟩, ⟨2, 0, [1, 9, 4, 5, 6, 7]⟩, ⟨2, 3, [1, 9, 8, 7, 0, 4]⟩, ⟨2, 1, [3, 9, 8, 7, 0, 4]⟩, ⟨5, 0, [4, 1, 2, 3, 9, 8, 7]⟩, ⟨5, 0, [4, 1, 3, 9, 8, 7]⟩, ⟨5, 0, [6, 7, 8, 9, 1, 2, 3, 4]⟩, ⟨5, 9, [6, 7, 0, 4, 1, 2, 3]⟩, ⟨5, 8, [6, 7, 0, 4, 1, 2, 3, 9]⟩, ⟨5, 9, [6, 7, 0, 4, 1, 3]⟩, ⟨5, 8, [6, 7, 0, 4, 1, 3, 9]⟩, ⟨5, 8, [6, 7, 0, 4, 1, 9]⟩, ⟨6, 0, [5, 4, 1, 2, 3, 9, 8, 7]⟩, ⟨6, 0, [5, 4, 1, 3, 9, 8, 7]⟩, ⟨6, 3, [5, 4, 0, 7, 8, 9, 1, 2]⟩, ⟨6, 3, [5, 4, 0, 7, 8, 9, 1]⟩, ⟨6, 2, [5, 4, 0, 7, 8, 9, 1, 3]⟩, ⟨6, 1, [5, 4, 0, 7, 8, 9, 3]⟩, ⟨6, 1, [5, 4, 0, 7, 8, 9, 3, 2]⟩, ⟨6, 8, [7, 0, 4, 1, 2, 3, 9]⟩, ⟨6, 5, [7, 0, 4]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 6, [9, 1, 2, 3, 4, 0, 7]⟩, ⟨8, 5, [9, 1, 2, 3, 4, 0, 7, 6]⟩, ⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩, ⟨8, 5, [9, 1, 3, 4, 0, 7, 6]⟩, ⟨8, 0, [9, 1, 4, 5, 6, 7]⟩, ⟨8, 5, [9, 1, 4, 0, 7, 6]⟩], ⟨none, {(6, 2), (8, 3), (5, 3), (2, 3)}⟩⟩ + +private def k9t4p15_step_12 : ClosureStep 9 := .fresh k9t4p15_step_12_data + +private def k9t4p15_step_13_data : EdgeAttachmentData 9 := ⟨6, 4, [⟨0, 5, [1, 2, 3, 8, 7, 6, 4]⟩, ⟨0, 3, [8, 7, 6, 4]⟩, ⟨0, 1, [8, 7, 6, 4, 3, 2]⟩, ⟨3, 5, [0, 1, 2, 8, 7, 6, 4]⟩, ⟨5, 3, [4, 6, 7, 8, 0, 1, 2]⟩, ⟨5, 2, [4, 6, 7, 8, 3, 0, 1]⟩, ⟨5, 0, [4, 6, 7, 8, 3, 2, 1]⟩, ⟨5, 3, [6, 4]⟩, ⟨5, 7, [6, 4, 3, 0, 1, 2, 8]⟩], ⟨none, {(5, 3), (0, 3), (3, 3), (4, 1)}⟩⟩ + +private def k9t4p15_step_13 : ClosureStep 9 := .edge k9t4p15_step_13_data + +private def k9t4p15_step_14_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [2, 3, 4, 9, 8, 7, 6, 5]⟩, ⟨1, 6, [2, 3, 4, 9, 8, 7, 0, 5]⟩, ⟨1, 0, [2, 3, 9, 4, 5, 6, 7]⟩, ⟨1, 6, [2, 3, 9, 4, 5, 0, 7]⟩, ⟨1, 0, [9, 3, 4, 5, 6, 7]⟩, ⟨6, 0, [5, 4, 1, 2, 3, 9, 8, 7]⟩, ⟨6, 0, [5, 4, 1, 3, 9, 8, 7]⟩, ⟨6, 0, [5, 4, 1, 9, 8, 7]⟩, ⟨6, 0, [5, 4, 9, 8, 7]⟩, ⟨6, 3, [5, 0, 7, 8, 9, 1, 2]⟩, ⟨6, 4, [5, 0, 7, 8, 9, 1, 2, 3]⟩, ⟨6, 4, [5, 0, 7, 8, 9, 1, 3]⟩] + +private def k9t4p15_step_14_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨6, 2, [5, 0, 7, 8, 9, 1, 4, 3]⟩, ⟨6, 1, [5, 0, 7, 8, 9, 3, 4]⟩, ⟨6, 3, [5, 0, 7, 8, 9, 4, 1, 2]⟩, ⟨6, 1, [5, 0, 7, 8, 9, 4, 3, 2]⟩, ⟨6, 9, [7, 0, 5, 4, 1, 2, 3]⟩, ⟨6, 8, [7, 0, 5, 4, 1, 2, 3, 9]⟩, ⟨6, 8, [7, 0, 5, 4, 1, 3, 9]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5]⟩, ⟨8, 6, [9, 1, 2, 3, 4, 5, 0, 7]⟩, ⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 3, 4, 5]⟩] + +private def k9t4p15_step_14_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 6, [9, 1, 3, 4, 5, 0, 7]⟩, ⟨8, 0, [9, 1, 4, 5]⟩, ⟨0, 6, [5, 4, 1, 2, 3, 9, 8, 7]⟩, ⟨0, 1, [5, 4, 9, 3]⟩, ⟨0, 1, [5, 4, 9, 3, 2]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩, ⟨0, 2, [5, 6, 7, 8, 9, 1, 4, 3]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 3]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 3, 4]⟩, ⟨0, 3, [5, 6, 7, 8, 9, 4, 1, 2]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 4, 3, 2]⟩, ⟨0, 8, [7, 6, 5, 4, 1, 2, 3, 9]⟩] + +private def k9t4p15_step_14_data : FreshAttachmentData 9 := ⟨6, 4, k9t4p15_step_14_required_block_0 ++ k9t4p15_step_14_required_block_1 ++ k9t4p15_step_14_required_block_2, ⟨none, {(6, 2), (8, 3), (0, 1), (1, 3)}⟩⟩ + +private def k9t4p15_step_14 : ClosureStep 9 := .fresh k9t4p15_step_14_data + +private def k9t4p15_step_15_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨4, 0, [1, 2, 3, 9, 8, 7, 6, 5]⟩, ⟨4, 6, [1, 2, 3, 9, 8, 0, 5]⟩, ⟨4, 7, [1, 2, 3, 9, 8, 0, 5, 6]⟩, ⟨4, 0, [1, 3, 9, 8, 7, 6, 5]⟩, ⟨4, 7, [1, 3, 9, 8, 0, 5, 6]⟩, ⟨4, 0, [1, 9, 8, 7, 6, 5]⟩, ⟨4, 7, [1, 9, 8, 0, 5, 6]⟩, ⟨6, 0, [5, 4, 1, 2, 3, 9, 8]⟩, ⟨6, 0, [5, 4, 1, 3, 9, 8]⟩, ⟨6, 0, [5, 4, 1, 9, 8]⟩, ⟨6, 0, [5, 4, 9, 8]⟩, ⟨6, 4, [5, 0, 8, 9, 1, 2, 3]⟩] + +private def k9t4p15_step_15_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨6, 3, [5, 0, 8, 9, 4, 1, 2]⟩, ⟨6, 1, [5, 0, 8, 9, 4, 3, 2]⟩, ⟨6, 0, [7, 8, 9, 1, 2, 3, 4, 5]⟩, ⟨6, 9, [7, 8, 0, 5, 4, 1, 2, 3]⟩, ⟨6, 9, [7, 8, 0, 5, 4, 1, 3]⟩, ⟨6, 2, [7, 8, 0, 5, 4, 1, 9, 3]⟩, ⟨6, 3, [7, 8, 0, 5, 4, 9, 1, 2]⟩, ⟨6, 1, [7, 8, 0, 5, 4, 9, 3, 2]⟩, ⟨7, 0, [6, 5, 4, 1, 2, 3, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 3, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 9, 8]⟩] + +private def k9t4p15_step_15_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨7, 3, [6, 5, 0, 8, 9, 1, 2]⟩, ⟨7, 4, [6, 5, 0, 8, 9, 1, 2, 3]⟩, ⟨7, 4, [6, 5, 0, 8, 9, 1, 3]⟩, ⟨7, 4, [6, 5, 0, 8, 9, 1]⟩, ⟨7, 2, [6, 5, 0, 8, 9, 1, 4, 3]⟩, ⟨7, 1, [6, 5, 0, 8, 9, 3, 4]⟩, ⟨7, 3, [6, 5, 0, 8, 9, 4, 1, 2]⟩, ⟨7, 1, [6, 5, 0, 8, 9, 4, 3, 2]⟩, ⟨7, 0, [8, 9, 4, 5]⟩, ⟨7, 9, [8, 0, 5, 4, 1, 2, 3]⟩, ⟨0, 7, [5, 4, 1, 2, 3, 9, 8]⟩, ⟨0, 6, [5, 4, 1, 2, 3, 9, 8, 7]⟩] + +private def k9t4p15_step_15_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 6, [5, 4, 1, 3, 9, 8, 7]⟩, ⟨0, 3, [5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩, ⟨0, 2, [5, 6, 7, 8, 9, 1, 3]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 3]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1]⟩, ⟨0, 2, [5, 6, 7, 8, 9, 1, 4, 3]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 3, 4]⟩, ⟨0, 4, [5, 6, 7, 8, 9]⟩, ⟨0, 3, [5, 6, 7, 8, 9, 4, 1, 2]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 4, 3, 2]⟩, ⟨0, 9, [8, 7, 6, 5, 4, 1, 2, 3]⟩] + +private def k9t4p15_step_15_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 9, [8, 7, 6, 5, 4, 1, 3]⟩, ⟨0, 7, [8, 9, 1, 2, 3, 4, 5, 6]⟩, ⟨0, 4, [8, 9, 1, 3]⟩, ⟨0, 4, [8, 9, 1]⟩] + +private def k9t4p15_step_15_data : FreshAttachmentData 9 := ⟨7, 4, k9t4p15_step_15_required_block_0 ++ k9t4p15_step_15_required_block_1 ++ k9t4p15_step_15_required_block_2 ++ k9t4p15_step_15_required_block_3 ++ k9t4p15_step_15_required_block_4, ⟨none, {(6, 2), (7, 2), (0, 2), (4, 3)}⟩⟩ + +private def k9t4p15_step_15 : ClosureStep 9 := .fresh k9t4p15_step_15_data + +private def k9t4p15_step_16_data : EdgeAttachmentData 9 := ⟨7, 5, [⟨0, 6, [1, 2, 8, 3, 4, 5, 7]⟩, ⟨0, 8, [3, 4, 5, 7]⟩, ⟨0, 1, [8, 7, 5, 4, 3, 2]⟩, ⟨6, 8, [5, 7]⟩, ⟨6, 4, [5, 7, 8, 0, 1, 2, 3]⟩, ⟨6, 8, [7, 5, 4, 3, 0, 1, 2]⟩, ⟨6, 2, [7, 5, 4, 3, 8, 0, 1]⟩, ⟨6, 0, [7, 5, 4, 3, 8, 2, 1]⟩, ⟨8, 6, [0, 1, 2, 3, 4, 5, 7]⟩], ⟨none, {(6, 3), (0, 3), (8, 3), (7, 1)}⟩⟩ + +private def k9t4p15_step_16 : ClosureStep 9 := .edge k9t4p15_step_16_data + +private def k9t4p15_step_17_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [2, 3, 9, 4, 5, 6, 7, 8]⟩, ⟨1, 7, [2, 3, 9, 4, 5, 6, 0, 8]⟩, ⟨1, 0, [9, 3, 4, 5, 6, 7, 8]⟩, ⟨1, 7, [9, 3, 4, 5, 6, 0, 8]⟩, ⟨1, 0, [9, 4, 5, 6, 7, 8]⟩, ⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩, ⟨5, 7, [4, 1, 2, 3, 9, 8, 0, 6]⟩, ⟨5, 0, [4, 1, 3, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 3, 9, 8]⟩, ⟨5, 7, [4, 1, 3, 9, 8, 0, 6]⟩, ⟨5, 0, [4, 1, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 9, 8]⟩] + +private def k9t4p15_step_17_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨7, 0, [6, 5, 4, 1, 2, 3, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 3, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 9, 8]⟩, ⟨7, 4, [6, 0, 8, 9, 1, 2, 3]⟩, ⟨7, 5, [6, 0, 8, 9, 1, 2, 3, 4]⟩, ⟨7, 5, [6, 0, 8, 9, 1, 3, 4]⟩, ⟨7, 3, [6, 0, 8, 9, 4, 1, 2]⟩, ⟨7, 1, [6, 0, 8, 9, 4, 3, 2]⟩, ⟨7, 9, [8, 0, 6, 5, 4, 1, 2, 3]⟩, ⟨7, 9, [8, 0, 6, 5, 4, 1, 3]⟩, ⟨7, 2, [8, 0, 6, 5, 4, 1, 9, 3]⟩] + +private def k9t4p15_step_17_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨7, 3, [8, 0, 6, 5, 4, 9, 1, 2]⟩, ⟨7, 1, [8, 0, 6, 5, 4, 9, 3, 2]⟩, ⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩, ⟨0, 1, [6, 5, 4, 9]⟩, ⟨0, 1, [6, 5, 4, 9, 3]⟩, ⟨0, 1, [6, 5, 4, 9, 3, 2]⟩, ⟨0, 5, [6, 7, 8, 9, 1, 2, 3, 4]⟩, ⟨0, 1, [6, 7, 8, 9, 4, 3, 2]⟩, ⟨0, 9, [8, 7, 6, 5, 4, 1, 2, 3]⟩, ⟨0, 2, [8, 7, 6, 5, 4, 1, 9, 3]⟩, ⟨0, 3, [8, 7, 6, 5, 4, 9, 1, 2]⟩, ⟨0, 1, [8, 7, 6, 5, 4, 9, 3, 2]⟩] + +private def k9t4p15_step_17_data : FreshAttachmentData 9 := ⟨7, 5, k9t4p15_step_17_required_block_0 ++ k9t4p15_step_17_required_block_1 ++ k9t4p15_step_17_required_block_2, ⟨none, {(7, 2), (5, 3), (0, 1), (1, 3)}⟩⟩ + +private def k9t4p15_step_17 : ClosureStep 9 := .fresh k9t4p15_step_17_data + +private def k9t4p15_step_18_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 6, [2, 3, 4, 5, 0, 9, 8, 7]⟩, ⟨1, 0, [2, 3, 4, 9, 8, 7, 6, 5]⟩, ⟨1, 7, [2, 3, 4, 9, 0, 5, 6]⟩, ⟨1, 8, [2, 3, 4, 9, 0, 5, 6, 7]⟩, ⟨1, 0, [2, 3, 9, 8, 7, 6, 5]⟩, ⟨1, 6, [3, 4, 5, 0, 9, 8, 7]⟩, ⟨1, 0, [3, 9, 8, 7, 6, 5]⟩, ⟨4, 0, [1, 2, 3, 9, 8, 7, 6, 5]⟩, ⟨4, 7, [1, 2, 3, 9, 0, 5, 6]⟩, ⟨4, 8, [1, 2, 3, 9, 0, 5, 6, 7]⟩, ⟨4, 0, [1, 3, 9, 8, 7, 6, 5]⟩, ⟨4, 7, [1, 3, 9, 0, 5, 6]⟩] + +private def k9t4p15_step_18_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨4, 8, [1, 3, 9, 0, 5, 6, 7]⟩, ⟨4, 0, [1, 9, 8, 7, 6, 5]⟩, ⟨4, 8, [1, 9, 0, 5, 6, 7]⟩, ⟨4, 1, [5, 0, 9, 3]⟩, ⟨8, 0, [7, 6, 5, 4, 1, 2, 3, 9]⟩, ⟨8, 0, [7, 6, 5, 4, 1, 3, 9]⟩, ⟨8, 4, [7, 6, 5, 0, 9, 1, 2, 3]⟩, ⟨8, 4, [7, 6, 5, 0, 9, 1, 3]⟩, ⟨8, 4, [7, 6, 5, 0, 9, 1]⟩, ⟨8, 2, [7, 6, 5, 0, 9, 1, 4, 3]⟩, ⟨8, 4, [7, 6, 5, 0, 9]⟩, ⟨8, 3, [7, 6, 5, 0, 9, 4, 1, 2]⟩] + +private def k9t4p15_step_18_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 1, [7, 6, 5, 0, 9, 4, 3, 2]⟩, ⟨0, 6, [5, 4, 1, 2, 3, 9, 8, 7]⟩, ⟨0, 6, [5, 4, 1, 3, 9, 8, 7]⟩, ⟨0, 8, [5, 4, 1, 9]⟩, ⟨0, 1, [5, 4, 9, 3, 2]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 3]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1]⟩, ⟨0, 4, [9, 1, 2, 3]⟩, ⟨0, 7, [9, 1, 2, 3, 4, 5, 6]⟩, ⟨0, 8, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 4, [9, 1, 3]⟩] + +private def k9t4p15_step_18_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 8, [9, 1, 3, 4, 5, 6, 7]⟩, ⟨0, 8, [9, 1, 4, 5, 6, 7]⟩, ⟨0, 1, [9, 3, 4]⟩, ⟨0, 1, [9, 4, 3, 2]⟩, ⟨0, 8, [9, 4, 5, 6, 7]⟩, ⟨0, 4, [9, 8, 7, 6, 5]⟩, ⟨0, 1, [9, 8, 7, 6, 5, 4]⟩, ⟨0, 2, [9, 8, 7, 6, 5, 4, 1]⟩, ⟨0, 3, [9, 8, 7, 6, 5, 4, 1, 2]⟩, ⟨0, 3, [9, 8, 7, 6, 5, 4, 1]⟩, ⟨0, 2, [9, 8, 7, 6, 5, 4, 1, 3]⟩, ⟨0, 1, [9, 8, 7, 6, 5, 4, 3]⟩] + +private def k9t4p15_step_18_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 1, [9, 8, 7, 6, 5, 4, 3, 2]⟩] + +private def k9t4p15_step_18_data : FreshAttachmentData 9 := ⟨8, 4, k9t4p15_step_18_required_block_0 ++ k9t4p15_step_18_required_block_1 ++ k9t4p15_step_18_required_block_2 ++ k9t4p15_step_18_required_block_3 ++ k9t4p15_step_18_required_block_4, ⟨none, {(0, 2), (8, 2), (4, 3), (1, 3)}⟩⟩ + +private def k9t4p15_step_18 : ClosureStep 9 := .fresh k9t4p15_step_18_data + +private def k9t4p15_step_19_data : FreshAttachmentData 9 := ⟨8, 5, [⟨2, 0, [1, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨2, 7, [1, 3, 4, 5, 6, 0, 9, 8]⟩, ⟨2, 0, [1, 3, 4, 9, 8, 7, 6]⟩, ⟨2, 0, [1, 9, 3, 4, 5, 6]⟩, ⟨2, 3, [1, 9, 0, 6, 5, 4]⟩, ⟨2, 1, [3, 9, 0, 6, 5, 4]⟩, ⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩, ⟨5, 7, [4, 1, 2, 3, 9, 0, 6]⟩, ⟨5, 8, [4, 1, 2, 3, 9, 0, 6, 7]⟩, ⟨5, 0, [4, 1, 3, 9, 8, 7, 6]⟩, ⟨5, 8, [4, 1, 3, 9, 0, 6, 7]⟩, ⟨5, 0, [4, 1, 9, 8, 7, 6]⟩, ⟨5, 8, [4, 1, 9, 0, 6, 7]⟩, ⟨7, 0, [6, 5, 4, 1, 2, 3, 9]⟩, ⟨7, 5, [6, 0, 9, 1, 2, 3, 4]⟩, ⟨7, 8, [6, 0, 9]⟩, ⟨7, 0, [8, 9, 1, 2, 3, 4, 5, 6]⟩, ⟨7, 3, [8, 9, 0, 6, 5, 4, 1, 2]⟩, ⟨7, 3, [8, 9, 0, 6, 5, 4, 1]⟩, ⟨7, 2, [8, 9, 0, 6, 5, 4, 1, 3]⟩, ⟨7, 1, [8, 9, 0, 6, 5, 4, 3]⟩, ⟨7, 1, [8, 9, 0, 6, 5, 4, 3, 2]⟩, ⟨8, 0, [7, 6, 5, 4, 1, 2, 3, 9]⟩, ⟨8, 4, [7, 6, 0, 9, 1, 2, 3]⟩, ⟨8, 5, [7, 6, 0, 9, 1, 2, 3, 4]⟩, ⟨8, 4, [7, 6, 0, 9, 1, 3]⟩, ⟨8, 5, [7, 6, 0, 9, 1, 3, 4]⟩, ⟨8, 5, [7, 6, 0, 9, 1, 4]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6]⟩, ⟨8, 0, [9, 1, 3, 4, 5, 6]⟩], ⟨none, {(5, 3), (7, 2), (8, 3), (2, 3)}⟩⟩ + +private def k9t4p15_step_19 : ClosureStep 9 := .fresh k9t4p15_step_19_data + +private def k9t4p15_step_20_data : FreshAttachmentData 9 := ⟨8, 6, [⟨2, 0, [1, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨2, 8, [1, 3, 4, 5, 6, 7, 0, 9]⟩, ⟨2, 0, [1, 9, 3, 4, 5, 6, 7]⟩, ⟨2, 0, [1, 9, 4, 5, 6, 7]⟩, ⟨6, 0, [5, 4, 1, 2, 3, 9, 8, 7]⟩, ⟨6, 8, [5, 4, 1, 2, 3, 9, 0, 7]⟩, ⟨6, 0, [5, 4, 1, 3, 9, 8, 7]⟩, ⟨6, 8, [5, 4, 1, 3, 9, 0, 7]⟩, ⟨8, 5, [7, 0, 9, 1, 2, 3, 4]⟩, ⟨8, 6, [7, 0, 9, 1, 2, 3, 4, 5]⟩, ⟨8, 6, [7, 0, 9, 1, 3, 4, 5]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 4, 5, 6, 7]⟩, ⟨8, 3, [9, 0, 7, 6, 5, 4, 1, 2]⟩, ⟨8, 2, [9, 0, 7, 6, 5, 4, 1, 3]⟩, ⟨8, 1, [9, 0, 7, 6, 5, 4, 3, 2]⟩, ⟨0, 2, [7, 6, 5, 4, 1]⟩, ⟨0, 2, [7, 6, 5, 4, 1, 3]⟩, ⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩, ⟨0, 6, [7, 8, 9, 1, 3, 4, 5]⟩, ⟨0, 6, [9, 1, 2, 3, 4, 5]⟩, ⟨0, 8, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 6, [9, 1, 3, 4, 5]⟩, ⟨0, 2, [9, 1, 4, 3]⟩, ⟨0, 2, [9, 8, 7, 6, 5, 4, 1]⟩, ⟨0, 3, [9, 8, 7, 6, 5, 4, 1, 2]⟩, ⟨0, 2, [9, 8, 7, 6, 5, 4, 1, 3]⟩, ⟨0, 1, [9, 8, 7, 6, 5, 4, 3, 2]⟩], ⟨none, {(8, 2), (0, 1), (2, 3), (6, 2)}⟩⟩ + +private def k9t4p15_step_20 : ClosureStep 9 := .fresh k9t4p15_step_20_data + +private def k9t4p15_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [], [], [2], 4, 7⟩, ⟨0, 1, [[3, 4, 5, 6, 7, 8]], [], [2], 1, 1⟩, ⟨0, 2, [[3, 4, 5, 6, 7, 8]], [], [], 2, 2⟩, ⟨0, 3, [], [], [], 5, 8⟩, ⟨0, 3, [], [], [4, 5, 6, 7, 8], 2, 3⟩, ⟨0, 3, [], [2, 1], [4, 5, 6, 7, 8], 1, 1⟩, ⟨0, 4, [], [], [3], 4, 7⟩, ⟨0, 4, [], [], [5, 6, 7, 8], 1, 4⟩, ⟨0, 5, [], [], [4, 3], 3, 6⟩, ⟨0, 5, [], [], [6, 7, 8], 2, 5⟩, ⟨0, 6, [], [], [5, 4, 3], 2, 5⟩, ⟨0, 6, [], [], [7, 8], 3, 6⟩] + +private def k9t4p15_templates_block_1 : List (TemplateData (Fin 9)) := [⟨0, 7, [], [], [6, 5, 4, 3], 1, 4⟩, ⟨0, 7, [], [], [8], 4, 7⟩, ⟨0, 8, [], [], [], 5, 8⟩, ⟨0, 8, [], [], [7, 6, 5, 4, 3], 2, 3⟩, ⟨0, 8, [], [2, 1], [7, 6, 5, 4, 3], 1, 1⟩, ⟨1, 2, [], [0], [], 4, 7⟩, ⟨1, 2, [[3, 4, 5, 6, 7, 8]], [0], [], 1, 1⟩, ⟨1, 3, [], [0], [], 4, 7⟩, ⟨1, 3, [], [0], [4, 5, 6, 7, 8], 1, 2⟩, ⟨1, 4, [], [0], [3], 3, 6⟩, ⟨1, 4, [], [0], [5, 6, 7, 8], 1, 3⟩, ⟨1, 5, [], [0], [4, 3], 2, 5⟩] + +private def k9t4p15_templates_block_2 : List (TemplateData (Fin 9)) := [⟨1, 5, [], [0], [6, 7, 8], 1, 4⟩, ⟨1, 6, [], [0], [5, 4, 3], 1, 4⟩, ⟨1, 6, [], [0], [7, 8], 2, 5⟩, ⟨1, 7, [], [0], [6, 5, 4, 3], 1, 3⟩, ⟨1, 7, [], [0], [8], 3, 6⟩, ⟨1, 8, [], [0], [], 4, 7⟩, ⟨1, 8, [], [0], [7, 6, 5, 4, 3], 1, 2⟩, ⟨2, 3, [], [], [4, 5, 6, 7, 8], 2, 3⟩, ⟨2, 3, [], [0, 1], [4, 5, 6, 7, 8], 1, 1⟩, ⟨2, 4, [], [], [3], 4, 7⟩, ⟨2, 4, [], [], [5, 6, 7, 8], 1, 4⟩, ⟨2, 5, [], [], [6, 7, 8], 2, 5⟩] + +private def k9t4p15_templates_block_3 : List (TemplateData (Fin 9)) := [⟨2, 6, [], [], [5, 4, 3], 2, 5⟩, ⟨2, 7, [], [], [6, 5, 4, 3], 1, 4⟩, ⟨2, 7, [], [], [8], 4, 7⟩, ⟨2, 8, [], [], [7, 6, 5, 4, 3], 2, 3⟩, ⟨2, 8, [], [0, 1], [7, 6, 5, 4, 3], 1, 1⟩, ⟨3, 4, [], [], [5, 6, 7, 8], 1, 4⟩, ⟨3, 5, [], [], [6, 7, 8], 2, 5⟩, ⟨3, 6, [], [], [7, 8], 3, 6⟩, ⟨3, 7, [], [], [8], 4, 7⟩, ⟨4, 5, [], [3], [6, 7, 8], 1, 4⟩, ⟨4, 6, [], [3], [7, 8], 2, 5⟩, ⟨4, 7, [], [3], [8], 3, 6⟩] + +private def k9t4p15_templates_block_4 : List (TemplateData (Fin 9)) := [⟨5, 6, [], [3, 4], [7, 8], 1, 4⟩, ⟨5, 7, [], [3, 4], [8], 2, 5⟩, ⟨6, 7, [], [3, 4, 5], [8], 1, 4⟩, ⟨6, 8, [], [3, 4, 5], [], 2, 5⟩, ⟨7, 8, [], [3, 4, 5, 6], [], 1, 4⟩] + +def k9t4p15 : LayoutCertificate 9 where + chains := [[0, 1, 2], [3, 4, 5, 6, 7, 8]] + clique := {0, 2, 3, 8} + templates := k9t4p15_templates_block_0 ++ k9t4p15_templates_block_1 ++ k9t4p15_templates_block_2 ++ k9t4p15_templates_block_3 ++ k9t4p15_templates_block_4 + required := [] + closure := [k9t4p15_step_0, k9t4p15_step_1, k9t4p15_step_2, k9t4p15_step_3, k9t4p15_step_4, k9t4p15_step_5, k9t4p15_step_6, k9t4p15_step_7, k9t4p15_step_8, k9t4p15_step_9, k9t4p15_step_10, k9t4p15_step_11, k9t4p15_step_12, k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] + bad := ⟨none, {(5, 2), (6, 2), (0, 3), (4, 2)}⟩ + + +private def k9t4p15_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 6, ∅, ∅], + #[{1, 4, 5, 6, 7}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 2 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 2 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_0) 0 j = k9t4p15_template_matrix_0 0 j := by decide + +private theorem k9t4p15_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_0) 1 j = k9t4p15_template_matrix_0 1 j := by decide + +private theorem k9t4p15_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_0) 2 j = k9t4p15_template_matrix_0 2 j := by decide + +private theorem k9t4p15_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_0) 3 j = k9t4p15_template_matrix_0 3 j := by decide + +private theorem k9t4p15_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_0) 4 j = k9t4p15_template_matrix_0 4 j := by decide + +private theorem k9t4p15_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_0) 5 j = k9t4p15_template_matrix_0 5 j := by decide + +private theorem k9t4p15_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_0) 6 j = k9t4p15_template_matrix_0 6 j := by decide + +private theorem k9t4p15_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_0) 7 j = k9t4p15_template_matrix_0 7 j := by decide + +private theorem k9t4p15_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_0) 8 j = k9t4p15_template_matrix_0 8 j := by decide + +private theorem k9t4p15_template_matrix_0_eq : (templateMatrix k9t4p15_templates_block_0) = k9t4p15_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t4p15_template_matrix_0_eq_row_0 j + + · exact k9t4p15_template_matrix_0_eq_row_1 j + + · exact k9t4p15_template_matrix_0_eq_row_2 j + + · exact k9t4p15_template_matrix_0_eq_row_3 j + + · exact k9t4p15_template_matrix_0_eq_row_4 j + + · exact k9t4p15_template_matrix_0_eq_row_5 j + + · exact k9t4p15_template_matrix_0_eq_row_6 j + + · exact k9t4p15_template_matrix_0_eq_row_7 j + + · exact k9t4p15_template_matrix_0_eq_row_8 j + +private def k9t4p15_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[∅, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 6, Finset.Icc 2 5, ∅, ∅, ∅], + #[∅, {1, 4, 5, 6, 7}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {1, 2, 4, 5, 6, 7}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 2 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_1) 0 j = k9t4p15_template_matrix_1 0 j := by decide + +private theorem k9t4p15_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_1) 1 j = k9t4p15_template_matrix_1 1 j := by decide + +private theorem k9t4p15_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_1) 2 j = k9t4p15_template_matrix_1 2 j := by decide + +private theorem k9t4p15_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_1) 3 j = k9t4p15_template_matrix_1 3 j := by decide + +private theorem k9t4p15_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_1) 4 j = k9t4p15_template_matrix_1 4 j := by decide + +private theorem k9t4p15_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_1) 5 j = k9t4p15_template_matrix_1 5 j := by decide + +private theorem k9t4p15_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_1) 6 j = k9t4p15_template_matrix_1 6 j := by decide + +private theorem k9t4p15_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_1) 7 j = k9t4p15_template_matrix_1 7 j := by decide + +private theorem k9t4p15_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_1) 8 j = k9t4p15_template_matrix_1 8 j := by decide + +private theorem k9t4p15_template_matrix_1_eq : (templateMatrix k9t4p15_templates_block_1) = k9t4p15_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t4p15_template_matrix_1_eq_row_0 j + + · exact k9t4p15_template_matrix_1_eq_row_1 j + + · exact k9t4p15_template_matrix_1_eq_row_2 j + + · exact k9t4p15_template_matrix_1_eq_row_3 j + + · exact k9t4p15_template_matrix_1_eq_row_4 j + + · exact k9t4p15_template_matrix_1_eq_row_5 j + + · exact k9t4p15_template_matrix_1_eq_row_6 j + + · exact k9t4p15_template_matrix_1_eq_row_7 j + + · exact k9t4p15_template_matrix_1_eq_row_8 j + +private def k9t4p15_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[∅, ∅, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, ∅, ∅, ∅], + #[∅, ∅, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {1, 2, 4, 5, 6, 7}, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_2) 0 j = k9t4p15_template_matrix_2 0 j := by decide + +private theorem k9t4p15_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_2) 1 j = k9t4p15_template_matrix_2 1 j := by decide + +private theorem k9t4p15_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_2) 2 j = k9t4p15_template_matrix_2 2 j := by decide + +private theorem k9t4p15_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_2) 3 j = k9t4p15_template_matrix_2 3 j := by decide + +private theorem k9t4p15_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_2) 4 j = k9t4p15_template_matrix_2 4 j := by decide + +private theorem k9t4p15_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_2) 5 j = k9t4p15_template_matrix_2 5 j := by decide + +private theorem k9t4p15_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_2) 6 j = k9t4p15_template_matrix_2 6 j := by decide + +private theorem k9t4p15_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_2) 7 j = k9t4p15_template_matrix_2 7 j := by decide + +private theorem k9t4p15_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_2) 8 j = k9t4p15_template_matrix_2 8 j := by decide + +private theorem k9t4p15_template_matrix_2_eq : (templateMatrix k9t4p15_templates_block_2) = k9t4p15_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t4p15_template_matrix_2_eq_row_0 j + + · exact k9t4p15_template_matrix_2_eq_row_1 j + + · exact k9t4p15_template_matrix_2_eq_row_2 j + + · exact k9t4p15_template_matrix_2_eq_row_3 j + + · exact k9t4p15_template_matrix_2_eq_row_4 j + + · exact k9t4p15_template_matrix_2_eq_row_5 j + + · exact k9t4p15_template_matrix_2_eq_row_6 j + + · exact k9t4p15_template_matrix_2_eq_row_7 j + + · exact k9t4p15_template_matrix_2_eq_row_8 j + +private def k9t4p15_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[∅, ∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, ∅, ∅, ∅, ∅], + #[∅, ∅, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_3) 0 j = k9t4p15_template_matrix_3 0 j := by decide + +private theorem k9t4p15_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_3) 1 j = k9t4p15_template_matrix_3 1 j := by decide + +private theorem k9t4p15_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_3) 2 j = k9t4p15_template_matrix_3 2 j := by decide + +private theorem k9t4p15_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_3) 3 j = k9t4p15_template_matrix_3 3 j := by decide + +private theorem k9t4p15_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_3) 4 j = k9t4p15_template_matrix_3 4 j := by decide + +private theorem k9t4p15_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_3) 5 j = k9t4p15_template_matrix_3 5 j := by decide + +private theorem k9t4p15_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_3) 6 j = k9t4p15_template_matrix_3 6 j := by decide + +private theorem k9t4p15_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_3) 7 j = k9t4p15_template_matrix_3 7 j := by decide + +private theorem k9t4p15_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_3) 8 j = k9t4p15_template_matrix_3 8 j := by decide + +private theorem k9t4p15_template_matrix_3_eq : (templateMatrix k9t4p15_templates_block_3) = k9t4p15_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t4p15_template_matrix_3_eq_row_0 j + + · exact k9t4p15_template_matrix_3_eq_row_1 j + + · exact k9t4p15_template_matrix_3_eq_row_2 j + + · exact k9t4p15_template_matrix_3_eq_row_3 j + + · exact k9t4p15_template_matrix_3_eq_row_4 j + + · exact k9t4p15_template_matrix_3_eq_row_5 j + + · exact k9t4p15_template_matrix_3_eq_row_6 j + + · exact k9t4p15_template_matrix_3_eq_row_7 j + + · exact k9t4p15_template_matrix_3_eq_row_8 j + +private def k9t4p15_template_matrix_4 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_template_matrix_4_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_4) 0 j = k9t4p15_template_matrix_4 0 j := by decide + +private theorem k9t4p15_template_matrix_4_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_4) 1 j = k9t4p15_template_matrix_4 1 j := by decide + +private theorem k9t4p15_template_matrix_4_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_4) 2 j = k9t4p15_template_matrix_4 2 j := by decide + +private theorem k9t4p15_template_matrix_4_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_4) 3 j = k9t4p15_template_matrix_4 3 j := by decide + +private theorem k9t4p15_template_matrix_4_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_4) 4 j = k9t4p15_template_matrix_4 4 j := by decide + +private theorem k9t4p15_template_matrix_4_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_4) 5 j = k9t4p15_template_matrix_4 5 j := by decide + +private theorem k9t4p15_template_matrix_4_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_4) 6 j = k9t4p15_template_matrix_4 6 j := by decide + +private theorem k9t4p15_template_matrix_4_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_4) 7 j = k9t4p15_template_matrix_4 7 j := by decide + +private theorem k9t4p15_template_matrix_4_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p15_templates_block_4) 8 j = k9t4p15_template_matrix_4 8 j := by decide + +private theorem k9t4p15_template_matrix_4_eq : (templateMatrix k9t4p15_templates_block_4) = k9t4p15_template_matrix_4 := by + funext i j + fin_cases i + + · exact k9t4p15_template_matrix_4_eq_row_0 j + + · exact k9t4p15_template_matrix_4_eq_row_1 j + + · exact k9t4p15_template_matrix_4_eq_row_2 j + + · exact k9t4p15_template_matrix_4_eq_row_3 j + + · exact k9t4p15_template_matrix_4_eq_row_4 j + + · exact k9t4p15_template_matrix_4_eq_row_5 j + + · exact k9t4p15_template_matrix_4_eq_row_6 j + + · exact k9t4p15_template_matrix_4_eq_row_7 j + + · exact k9t4p15_template_matrix_4_eq_row_8 j + +private theorem k9t4p15_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => ((((k9t4p15_template_matrix_0 i j ∪ k9t4p15_template_matrix_1 i j) ∪ k9t4p15_template_matrix_2 i j) ∪ k9t4p15_template_matrix_3 i j) ∪ k9t4p15_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p15.required i j) 0 j = k9t4p15_state_0 0 j := by decide + +private theorem k9t4p15_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => ((((k9t4p15_template_matrix_0 i j ∪ k9t4p15_template_matrix_1 i j) ∪ k9t4p15_template_matrix_2 i j) ∪ k9t4p15_template_matrix_3 i j) ∪ k9t4p15_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p15.required i j) 1 j = k9t4p15_state_0 1 j := by decide + +private theorem k9t4p15_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => ((((k9t4p15_template_matrix_0 i j ∪ k9t4p15_template_matrix_1 i j) ∪ k9t4p15_template_matrix_2 i j) ∪ k9t4p15_template_matrix_3 i j) ∪ k9t4p15_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p15.required i j) 2 j = k9t4p15_state_0 2 j := by decide + +private theorem k9t4p15_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => ((((k9t4p15_template_matrix_0 i j ∪ k9t4p15_template_matrix_1 i j) ∪ k9t4p15_template_matrix_2 i j) ∪ k9t4p15_template_matrix_3 i j) ∪ k9t4p15_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p15.required i j) 3 j = k9t4p15_state_0 3 j := by decide + +private theorem k9t4p15_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => ((((k9t4p15_template_matrix_0 i j ∪ k9t4p15_template_matrix_1 i j) ∪ k9t4p15_template_matrix_2 i j) ∪ k9t4p15_template_matrix_3 i j) ∪ k9t4p15_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p15.required i j) 4 j = k9t4p15_state_0 4 j := by decide + +private theorem k9t4p15_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => ((((k9t4p15_template_matrix_0 i j ∪ k9t4p15_template_matrix_1 i j) ∪ k9t4p15_template_matrix_2 i j) ∪ k9t4p15_template_matrix_3 i j) ∪ k9t4p15_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p15.required i j) 5 j = k9t4p15_state_0 5 j := by decide + +private theorem k9t4p15_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => ((((k9t4p15_template_matrix_0 i j ∪ k9t4p15_template_matrix_1 i j) ∪ k9t4p15_template_matrix_2 i j) ∪ k9t4p15_template_matrix_3 i j) ∪ k9t4p15_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p15.required i j) 6 j = k9t4p15_state_0 6 j := by decide + +private theorem k9t4p15_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => ((((k9t4p15_template_matrix_0 i j ∪ k9t4p15_template_matrix_1 i j) ∪ k9t4p15_template_matrix_2 i j) ∪ k9t4p15_template_matrix_3 i j) ∪ k9t4p15_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p15.required i j) 7 j = k9t4p15_state_0 7 j := by decide + +private theorem k9t4p15_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => ((((k9t4p15_template_matrix_0 i j ∪ k9t4p15_template_matrix_1 i j) ∪ k9t4p15_template_matrix_2 i j) ∪ k9t4p15_template_matrix_3 i j) ∪ k9t4p15_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p15.required i j) 8 j = k9t4p15_state_0 8 j := by decide + +private theorem k9t4p15_initial_merged_eq : (fun i j => ((((k9t4p15_template_matrix_0 i j ∪ k9t4p15_template_matrix_1 i j) ∪ k9t4p15_template_matrix_2 i j) ∪ k9t4p15_template_matrix_3 i j) ∪ k9t4p15_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p15.required i j) = k9t4p15_state_0 := by + funext i j + fin_cases i + + · exact k9t4p15_initial_merged_eq_row_0 j + + · exact k9t4p15_initial_merged_eq_row_1 j + + · exact k9t4p15_initial_merged_eq_row_2 j + + · exact k9t4p15_initial_merged_eq_row_3 j + + · exact k9t4p15_initial_merged_eq_row_4 j + + · exact k9t4p15_initial_merged_eq_row_5 j + + · exact k9t4p15_initial_merged_eq_row_6 j + + · exact k9t4p15_initial_merged_eq_row_7 j + + · exact k9t4p15_initial_merged_eq_row_8 j + +private theorem k9t4p15_initial_eq : k9t4p15.initialMatrix 9 = k9t4p15_state_0 := by + funext i j + change templateMatrix (k9t4p15_templates_block_0 ++ k9t4p15_templates_block_1 ++ k9t4p15_templates_block_2 ++ k9t4p15_templates_block_3 ++ k9t4p15_templates_block_4) i j ∪ requiredMatrix 9 k9t4p15.required i j = _ + simp only [templateMatrix_append, k9t4p15_template_matrix_0_eq, k9t4p15_template_matrix_1_eq, k9t4p15_template_matrix_2_eq, k9t4p15_template_matrix_3_eq, k9t4p15_template_matrix_4_eq] + exact congrFun (congrFun k9t4p15_initial_merged_eq i) j + +private def k9t4p15_state_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 7, {1, 2}, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{1, 2}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 1 7, {1, 2}], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, {1, 2}, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_0_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p15_state_0 a b ∪ requiredMatrix 9 k9t4p15_step_0_data.required a b) 0 j = k9t4p15_local_0 0 j := by decide + +private theorem k9t4p15_local_0_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p15_state_0 a b ∪ requiredMatrix 9 k9t4p15_step_0_data.required a b) 1 j = k9t4p15_local_0 1 j := by decide + +private theorem k9t4p15_local_0_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p15_state_0 a b ∪ requiredMatrix 9 k9t4p15_step_0_data.required a b) 2 j = k9t4p15_local_0 2 j := by decide + +private theorem k9t4p15_local_0_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p15_state_0 a b ∪ requiredMatrix 9 k9t4p15_step_0_data.required a b) 3 j = k9t4p15_local_0 3 j := by decide + +private theorem k9t4p15_local_0_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p15_state_0 a b ∪ requiredMatrix 9 k9t4p15_step_0_data.required a b) 4 j = k9t4p15_local_0 4 j := by decide + +private theorem k9t4p15_local_0_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p15_state_0 a b ∪ requiredMatrix 9 k9t4p15_step_0_data.required a b) 5 j = k9t4p15_local_0 5 j := by decide + +private theorem k9t4p15_local_0_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p15_state_0 a b ∪ requiredMatrix 9 k9t4p15_step_0_data.required a b) 6 j = k9t4p15_local_0 6 j := by decide + +private theorem k9t4p15_local_0_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p15_state_0 a b ∪ requiredMatrix 9 k9t4p15_step_0_data.required a b) 7 j = k9t4p15_local_0 7 j := by decide + +private theorem k9t4p15_local_0_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p15_state_0 a b ∪ requiredMatrix 9 k9t4p15_step_0_data.required a b) 8 j = k9t4p15_local_0 8 j := by decide + +private theorem k9t4p15_local_0_eq : (fun a b => k9t4p15_state_0 a b ∪ requiredMatrix 9 k9t4p15_step_0_data.required a b) = k9t4p15_local_0 := by + funext i j + fin_cases i + + · exact k9t4p15_local_0_eq_row_0 j + + · exact k9t4p15_local_0_eq_row_1 j + + · exact k9t4p15_local_0_eq_row_2 j + + · exact k9t4p15_local_0_eq_row_3 j + + · exact k9t4p15_local_0_eq_row_4 j + + · exact k9t4p15_local_0_eq_row_5 j + + · exact k9t4p15_local_0_eq_row_6 j + + · exact k9t4p15_local_0_eq_row_7 j + + · exact k9t4p15_local_0_eq_row_8 j + +private theorem k9t4p15_local_0_paths : ∀ p ∈ k9t4p15_step_0_data.required, p.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_0_data.i k9t4p15_step_0_data.j) 9 := by decide + +private theorem k9t4p15_local_0_bad : k9t4p15_step_0_data.bad.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_0_data.i k9t4p15_step_0_data.j) k9t4p15_local_0 9 4 := by decide + +private theorem k9t4p15_step_0_check : k9t4p15_step_0.Check k9t4p15.graph k9t4p15_state_0 9 4 := by + change k9t4p15_step_0_data.Check k9t4p15.graph k9t4p15_state_0 9 4 + refine ⟨k9t4p15_local_0_paths, ?_⟩ + rw [k9t4p15_local_0_eq] + exact k9t4p15_local_0_bad + +private theorem k9t4p15_update_0 : k9t4p15_step_0.apply k9t4p15_state_0 = k9t4p15_state_1 := by + have h : ∀ i j : Fin 9, k9t4p15_step_0.apply k9t4p15_state_0 i j = k9t4p15_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[{0, 2, 3, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, Finset.Icc 1 7, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 1 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_1_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p15_state_1 a b ∪ requiredMatrix 9 k9t4p15_step_1_data.required a b) 0 j = k9t4p15_local_1 0 j := by decide + +private theorem k9t4p15_local_1_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p15_state_1 a b ∪ requiredMatrix 9 k9t4p15_step_1_data.required a b) 1 j = k9t4p15_local_1 1 j := by decide + +private theorem k9t4p15_local_1_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p15_state_1 a b ∪ requiredMatrix 9 k9t4p15_step_1_data.required a b) 2 j = k9t4p15_local_1 2 j := by decide + +private theorem k9t4p15_local_1_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p15_state_1 a b ∪ requiredMatrix 9 k9t4p15_step_1_data.required a b) 3 j = k9t4p15_local_1 3 j := by decide + +private theorem k9t4p15_local_1_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p15_state_1 a b ∪ requiredMatrix 9 k9t4p15_step_1_data.required a b) 4 j = k9t4p15_local_1 4 j := by decide + +private theorem k9t4p15_local_1_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p15_state_1 a b ∪ requiredMatrix 9 k9t4p15_step_1_data.required a b) 5 j = k9t4p15_local_1 5 j := by decide + +private theorem k9t4p15_local_1_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p15_state_1 a b ∪ requiredMatrix 9 k9t4p15_step_1_data.required a b) 6 j = k9t4p15_local_1 6 j := by decide + +private theorem k9t4p15_local_1_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p15_state_1 a b ∪ requiredMatrix 9 k9t4p15_step_1_data.required a b) 7 j = k9t4p15_local_1 7 j := by decide + +private theorem k9t4p15_local_1_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p15_state_1 a b ∪ requiredMatrix 9 k9t4p15_step_1_data.required a b) 8 j = k9t4p15_local_1 8 j := by decide + +private theorem k9t4p15_local_1_eq : (fun a b => k9t4p15_state_1 a b ∪ requiredMatrix 9 k9t4p15_step_1_data.required a b) = k9t4p15_local_1 := by + funext i j + fin_cases i + + · exact k9t4p15_local_1_eq_row_0 j + + · exact k9t4p15_local_1_eq_row_1 j + + · exact k9t4p15_local_1_eq_row_2 j + + · exact k9t4p15_local_1_eq_row_3 j + + · exact k9t4p15_local_1_eq_row_4 j + + · exact k9t4p15_local_1_eq_row_5 j + + · exact k9t4p15_local_1_eq_row_6 j + + · exact k9t4p15_local_1_eq_row_7 j + + · exact k9t4p15_local_1_eq_row_8 j + +private theorem k9t4p15_local_1_paths : ∀ p ∈ k9t4p15_step_1_data.required, p.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_1_data.i k9t4p15_step_1_data.j) 9 := by decide + +private theorem k9t4p15_local_1_bad : k9t4p15_step_1_data.bad.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_1_data.i k9t4p15_step_1_data.j) k9t4p15_local_1 9 4 := by decide + +private theorem k9t4p15_step_1_check : k9t4p15_step_1.Check k9t4p15.graph k9t4p15_state_1 9 4 := by + change k9t4p15_step_1_data.Check k9t4p15.graph k9t4p15_state_1 9 4 + refine ⟨k9t4p15_local_1_paths, ?_⟩ + rw [k9t4p15_local_1_eq] + exact k9t4p15_local_1_bad + +private theorem k9t4p15_update_1 : k9t4p15_step_1.apply k9t4p15_state_1 = k9t4p15_state_2 := by + have h : ∀ i j : Fin 9, k9t4p15_step_1.apply k9t4p15_state_1 i j = k9t4p15_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1}, Finset.Icc 0 5, {1}, Finset.Icc 0 5, Finset.Icc 0 4, {1}, {0, 1}, {0, 1}, {0, 1}], + #[{1}, ∅, {1, 2, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 0 5, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{1}, {2}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 0 5, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 0 6, {1, 2, 4, 5, 6, 7}, {1, 2}], + #[Finset.Icc 0 4, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {0, 1}], + #[{1}, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[{0, 1}, Finset.Icc 2 6, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, {1, 2}, {0, 1}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_2_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {0, 1, 2}, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, {2}, ∅, {2}, {3}, {0}, ∅, {0}, ∅, ∅], + #[∅, ∅, {2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, {3}, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}], + #[∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_2_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_0) 0 j = k9t4p15_local_2_required_0 0 j := by decide + +private theorem k9t4p15_local_2_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_0) 1 j = k9t4p15_local_2_required_0 1 j := by decide + +private theorem k9t4p15_local_2_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_0) 2 j = k9t4p15_local_2_required_0 2 j := by decide + +private theorem k9t4p15_local_2_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_0) 3 j = k9t4p15_local_2_required_0 3 j := by decide + +private theorem k9t4p15_local_2_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_0) 4 j = k9t4p15_local_2_required_0 4 j := by decide + +private theorem k9t4p15_local_2_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_0) 5 j = k9t4p15_local_2_required_0 5 j := by decide + +private theorem k9t4p15_local_2_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_0) 6 j = k9t4p15_local_2_required_0 6 j := by decide + +private theorem k9t4p15_local_2_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_0) 7 j = k9t4p15_local_2_required_0 7 j := by decide + +private theorem k9t4p15_local_2_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_0) 8 j = k9t4p15_local_2_required_0 8 j := by decide + +private theorem k9t4p15_local_2_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_0) 9 j = k9t4p15_local_2_required_0 9 j := by decide + +private theorem k9t4p15_local_2_required_0_eq : (requiredMatrix 9 k9t4p15_step_2_required_block_0) = k9t4p15_local_2_required_0 := by + funext i j + fin_cases i + + · exact k9t4p15_local_2_required_0_eq_row_0 j + + · exact k9t4p15_local_2_required_0_eq_row_1 j + + · exact k9t4p15_local_2_required_0_eq_row_2 j + + · exact k9t4p15_local_2_required_0_eq_row_3 j + + · exact k9t4p15_local_2_required_0_eq_row_4 j + + · exact k9t4p15_local_2_required_0_eq_row_5 j + + · exact k9t4p15_local_2_required_0_eq_row_6 j + + · exact k9t4p15_local_2_required_0_eq_row_7 j + + · exact k9t4p15_local_2_required_0_eq_row_8 j + + · exact k9t4p15_local_2_required_0_eq_row_9 j + +private theorem k9t4p15_local_2_path_0_0 : (⟨2, 0, [1, 3, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_0_1 : (⟨2, 0, [1, 3, 9, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_0_2 : (⟨2, 7, [1, 0, 6, 5, 4, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_0_3 : (⟨2, 3, [1, 0, 6, 5, 4, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_0_4 : (⟨2, 5, [1, 0, 6, 7, 8, 9, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_0_5 : (⟨2, 4, [3, 1, 0, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_0_6 : (⟨2, 1, [3, 9, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_0_7 : (⟨2, 0, [3, 9, 8, 7, 6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_0_8 : (⟨4, 0, [1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_0_9 : (⟨4, 0, [1, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_0_10 : (⟨4, 9, [3, 1, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_0_11 : (⟨4, 9, [3, 2, 1, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_paths_block_0 : ∀ p ∈ k9t4p15_step_2_required_block_0, p.Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by + simp only [k9t4p15_step_2_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_2_path_0_0, k9t4p15_local_2_path_0_1, k9t4p15_local_2_path_0_2, k9t4p15_local_2_path_0_3, k9t4p15_local_2_path_0_4, k9t4p15_local_2_path_0_5, k9t4p15_local_2_path_0_6, k9t4p15_local_2_path_0_7, k9t4p15_local_2_path_0_8, k9t4p15_local_2_path_0_9, k9t4p15_local_2_path_0_10, k9t4p15_local_2_path_0_11⟩ + +private def k9t4p15_local_2_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {0}, {0, 1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, {1, 2}, ∅], + #[{0, 1, 2}, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_2_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_1) 0 j = k9t4p15_local_2_required_1 0 j := by decide + +private theorem k9t4p15_local_2_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_1) 1 j = k9t4p15_local_2_required_1 1 j := by decide + +private theorem k9t4p15_local_2_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_1) 2 j = k9t4p15_local_2_required_1 2 j := by decide + +private theorem k9t4p15_local_2_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_1) 3 j = k9t4p15_local_2_required_1 3 j := by decide + +private theorem k9t4p15_local_2_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_1) 4 j = k9t4p15_local_2_required_1 4 j := by decide + +private theorem k9t4p15_local_2_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_1) 5 j = k9t4p15_local_2_required_1 5 j := by decide + +private theorem k9t4p15_local_2_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_1) 6 j = k9t4p15_local_2_required_1 6 j := by decide + +private theorem k9t4p15_local_2_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_1) 7 j = k9t4p15_local_2_required_1 7 j := by decide + +private theorem k9t4p15_local_2_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_1) 8 j = k9t4p15_local_2_required_1 8 j := by decide + +private theorem k9t4p15_local_2_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_1) 9 j = k9t4p15_local_2_required_1 9 j := by decide + +private theorem k9t4p15_local_2_required_1_eq : (requiredMatrix 9 k9t4p15_step_2_required_block_1) = k9t4p15_local_2_required_1 := by + funext i j + fin_cases i + + · exact k9t4p15_local_2_required_1_eq_row_0 j + + · exact k9t4p15_local_2_required_1_eq_row_1 j + + · exact k9t4p15_local_2_required_1_eq_row_2 j + + · exact k9t4p15_local_2_required_1_eq_row_3 j + + · exact k9t4p15_local_2_required_1_eq_row_4 j + + · exact k9t4p15_local_2_required_1_eq_row_5 j + + · exact k9t4p15_local_2_required_1_eq_row_6 j + + · exact k9t4p15_local_2_required_1_eq_row_7 j + + · exact k9t4p15_local_2_required_1_eq_row_8 j + + · exact k9t4p15_local_2_required_1_eq_row_9 j + +private theorem k9t4p15_local_2_path_1_0 : (⟨4, 0, [5, 6, 7, 8, 9, 3, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_1_1 : (⟨4, 7, [5, 6, 0, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_1_2 : (⟨4, 7, [5, 6, 0, 1, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_1_3 : (⟨4, 8, [9, 3, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_1_4 : (⟨4, 7, [9, 3, 2, 1, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_1_5 : (⟨4, 8, [9, 3, 2, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_1_6 : (⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_1_7 : (⟨5, 0, [4, 1, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_1_8 : (⟨5, 0, [4, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_1_9 : (⟨5, 2, [4, 1, 0, 6, 7, 8, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_1_10 : (⟨5, 9, [4, 3, 1, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_1_11 : (⟨5, 9, [4, 3, 2, 1, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_paths_block_1 : ∀ p ∈ k9t4p15_step_2_required_block_1, p.Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by + simp only [k9t4p15_step_2_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_2_path_1_0, k9t4p15_local_2_path_1_1, k9t4p15_local_2_path_1_2, k9t4p15_local_2_path_1_3, k9t4p15_local_2_path_1_4, k9t4p15_local_2_path_1_5, k9t4p15_local_2_path_1_6, k9t4p15_local_2_path_1_7, k9t4p15_local_2_path_1_8, k9t4p15_local_2_path_1_9, k9t4p15_local_2_path_1_10, k9t4p15_local_2_path_1_11⟩ + +private def k9t4p15_local_2_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {5}, {3, 4}, {1}, ∅, {1}, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[{5}, ∅, ∅, ∅, ∅, {5}, ∅, ∅, ∅, ∅], + #[{3, 4}, ∅, ∅, {0}, {5}, ∅, ∅, {0, 1}, {0, 1}, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_2_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_2) 0 j = k9t4p15_local_2_required_2 0 j := by decide + +private theorem k9t4p15_local_2_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_2) 1 j = k9t4p15_local_2_required_2 1 j := by decide + +private theorem k9t4p15_local_2_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_2) 2 j = k9t4p15_local_2_required_2 2 j := by decide + +private theorem k9t4p15_local_2_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_2) 3 j = k9t4p15_local_2_required_2 3 j := by decide + +private theorem k9t4p15_local_2_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_2) 4 j = k9t4p15_local_2_required_2 4 j := by decide + +private theorem k9t4p15_local_2_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_2) 5 j = k9t4p15_local_2_required_2 5 j := by decide + +private theorem k9t4p15_local_2_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_2) 6 j = k9t4p15_local_2_required_2 6 j := by decide + +private theorem k9t4p15_local_2_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_2) 7 j = k9t4p15_local_2_required_2 7 j := by decide + +private theorem k9t4p15_local_2_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_2) 8 j = k9t4p15_local_2_required_2 8 j := by decide + +private theorem k9t4p15_local_2_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_2) 9 j = k9t4p15_local_2_required_2 9 j := by decide + +private theorem k9t4p15_local_2_required_2_eq : (requiredMatrix 9 k9t4p15_step_2_required_block_2) = k9t4p15_local_2_required_2 := by + funext i j + fin_cases i + + · exact k9t4p15_local_2_required_2_eq_row_0 j + + · exact k9t4p15_local_2_required_2_eq_row_1 j + + · exact k9t4p15_local_2_required_2_eq_row_2 j + + · exact k9t4p15_local_2_required_2_eq_row_3 j + + · exact k9t4p15_local_2_required_2_eq_row_4 j + + · exact k9t4p15_local_2_required_2_eq_row_5 j + + · exact k9t4p15_local_2_required_2_eq_row_6 j + + · exact k9t4p15_local_2_required_2_eq_row_7 j + + · exact k9t4p15_local_2_required_2_eq_row_8 j + + · exact k9t4p15_local_2_required_2_eq_row_9 j + +private theorem k9t4p15_local_2_path_2_0 : (⟨5, 0, [4, 9, 3, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_2_1 : (⟨5, 8, [4, 9, 3, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_2_2 : (⟨5, 0, [4, 9, 3, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_2_3 : (⟨5, 7, [4, 9, 3, 2, 1, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_2_4 : (⟨5, 8, [4, 9, 3, 2, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_2_5 : (⟨5, 3, [4, 9, 8, 7, 6, 0, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_2_6 : (⟨5, 7, [6, 0, 1, 2, 3, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_2_7 : (⟨5, 4, [6, 0, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_2_8 : (⟨0, 4, [1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_2_9 : (⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_2_10 : (⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_2_11 : (⟨0, 6, [1, 2, 3, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_paths_block_2 : ∀ p ∈ k9t4p15_step_2_required_block_2, p.Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by + simp only [k9t4p15_step_2_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_2_path_2_0, k9t4p15_local_2_path_2_1, k9t4p15_local_2_path_2_2, k9t4p15_local_2_path_2_3, k9t4p15_local_2_path_2_4, k9t4p15_local_2_path_2_5, k9t4p15_local_2_path_2_6, k9t4p15_local_2_path_2_7, k9t4p15_local_2_path_2_8, k9t4p15_local_2_path_2_9, k9t4p15_local_2_path_2_10, k9t4p15_local_2_path_2_11⟩ + +private def k9t4p15_local_2_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {0, 4, 5}, {1}, {0, 1, 4}, {0, 1}, ∅, {1}, {0}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_2_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_3) 0 j = k9t4p15_local_2_required_3 0 j := by decide + +private theorem k9t4p15_local_2_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_3) 1 j = k9t4p15_local_2_required_3 1 j := by decide + +private theorem k9t4p15_local_2_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_3) 2 j = k9t4p15_local_2_required_3 2 j := by decide + +private theorem k9t4p15_local_2_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_3) 3 j = k9t4p15_local_2_required_3 3 j := by decide + +private theorem k9t4p15_local_2_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_3) 4 j = k9t4p15_local_2_required_3 4 j := by decide + +private theorem k9t4p15_local_2_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_3) 5 j = k9t4p15_local_2_required_3 5 j := by decide + +private theorem k9t4p15_local_2_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_3) 6 j = k9t4p15_local_2_required_3 6 j := by decide + +private theorem k9t4p15_local_2_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_3) 7 j = k9t4p15_local_2_required_3 7 j := by decide + +private theorem k9t4p15_local_2_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_3) 8 j = k9t4p15_local_2_required_3 8 j := by decide + +private theorem k9t4p15_local_2_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_3) 9 j = k9t4p15_local_2_required_3 9 j := by decide + +private theorem k9t4p15_local_2_required_3_eq : (requiredMatrix 9 k9t4p15_step_2_required_block_3) = k9t4p15_local_2_required_3 := by + funext i j + fin_cases i + + · exact k9t4p15_local_2_required_3_eq_row_0 j + + · exact k9t4p15_local_2_required_3_eq_row_1 j + + · exact k9t4p15_local_2_required_3_eq_row_2 j + + · exact k9t4p15_local_2_required_3_eq_row_3 j + + · exact k9t4p15_local_2_required_3_eq_row_4 j + + · exact k9t4p15_local_2_required_3_eq_row_5 j + + · exact k9t4p15_local_2_required_3_eq_row_6 j + + · exact k9t4p15_local_2_required_3_eq_row_7 j + + · exact k9t4p15_local_2_required_3_eq_row_8 j + + · exact k9t4p15_local_2_required_3_eq_row_9 j + +private theorem k9t4p15_local_2_path_3_0 : (⟨0, 5, [1, 2, 3, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_3_1 : (⟨0, 4, [1, 2, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_3_2 : (⟨0, 7, [1, 2, 3, 9, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_3_3 : (⟨0, 8, [1, 2, 3, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_3_4 : (⟨0, 5, [1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_3_5 : (⟨0, 4, [1, 2, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_3_6 : (⟨0, 9, [1, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_3_7 : (⟨0, 4, [1, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_3_8 : (⟨0, 2, [1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_3_9 : (⟨0, 3, [1, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_3_10 : (⟨0, 2, [1, 4, 5, 6, 7, 8, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_3_11 : (⟨0, 2, [1, 4, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_paths_block_3 : ∀ p ∈ k9t4p15_step_2_required_block_3, p.Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by + simp only [k9t4p15_step_2_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_2_path_3_0, k9t4p15_local_2_path_3_1, k9t4p15_local_2_path_3_2, k9t4p15_local_2_path_3_3, k9t4p15_local_2_path_3_4, k9t4p15_local_2_path_3_5, k9t4p15_local_2_path_3_6, k9t4p15_local_2_path_3_7, k9t4p15_local_2_path_3_8, k9t4p15_local_2_path_3_9, k9t4p15_local_2_path_3_10, k9t4p15_local_2_path_3_11⟩ + +private def k9t4p15_local_2_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1}, {1, 2, 3}, ∅, {2, 3}, ∅, ∅, {0}, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_2_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_4) 0 j = k9t4p15_local_2_required_4 0 j := by decide + +private theorem k9t4p15_local_2_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_4) 1 j = k9t4p15_local_2_required_4 1 j := by decide + +private theorem k9t4p15_local_2_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_4) 2 j = k9t4p15_local_2_required_4 2 j := by decide + +private theorem k9t4p15_local_2_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_4) 3 j = k9t4p15_local_2_required_4 3 j := by decide + +private theorem k9t4p15_local_2_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_4) 4 j = k9t4p15_local_2_required_4 4 j := by decide + +private theorem k9t4p15_local_2_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_4) 5 j = k9t4p15_local_2_required_4 5 j := by decide + +private theorem k9t4p15_local_2_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_4) 6 j = k9t4p15_local_2_required_4 6 j := by decide + +private theorem k9t4p15_local_2_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_4) 7 j = k9t4p15_local_2_required_4 7 j := by decide + +private theorem k9t4p15_local_2_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_4) 8 j = k9t4p15_local_2_required_4 8 j := by decide + +private theorem k9t4p15_local_2_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_2_required_block_4) 9 j = k9t4p15_local_2_required_4 9 j := by decide + +private theorem k9t4p15_local_2_required_4_eq : (requiredMatrix 9 k9t4p15_step_2_required_block_4) = k9t4p15_local_2_required_4 := by + funext i j + fin_cases i + + · exact k9t4p15_local_2_required_4_eq_row_0 j + + · exact k9t4p15_local_2_required_4_eq_row_1 j + + · exact k9t4p15_local_2_required_4_eq_row_2 j + + · exact k9t4p15_local_2_required_4_eq_row_3 j + + · exact k9t4p15_local_2_required_4_eq_row_4 j + + · exact k9t4p15_local_2_required_4_eq_row_5 j + + · exact k9t4p15_local_2_required_4_eq_row_6 j + + · exact k9t4p15_local_2_required_4_eq_row_7 j + + · exact k9t4p15_local_2_required_4_eq_row_8 j + + · exact k9t4p15_local_2_required_4_eq_row_9 j + +private theorem k9t4p15_local_2_path_4_0 : (⟨0, 4, [1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_4_1 : (⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_4_2 : (⟨0, 2, [6, 5, 4, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_4_3 : (⟨0, 2, [6, 5, 4, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_4_4 : (⟨0, 4, [6, 7, 8, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_4_5 : (⟨0, 2, [6, 7, 8, 9, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_path_4_6 : (⟨0, 1, [6, 7, 8, 9, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by decide + +private theorem k9t4p15_local_2_paths_block_4 : ∀ p ∈ k9t4p15_step_2_required_block_4, p.Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by + simp only [k9t4p15_step_2_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_2_path_4_0, k9t4p15_local_2_path_4_1, k9t4p15_local_2_path_4_2, k9t4p15_local_2_path_4_3, k9t4p15_local_2_path_4_4, k9t4p15_local_2_path_4_5, k9t4p15_local_2_path_4_6⟩ + +private theorem k9t4p15_local_2_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_2 a b ∪ (((((k9t4p15_local_2_required_0 a b ∪ k9t4p15_local_2_required_1 a b) ∪ k9t4p15_local_2_required_2 a b) ∪ k9t4p15_local_2_required_3 a b) ∪ k9t4p15_local_2_required_4 a b))) 0 j = k9t4p15_local_2 0 j := by decide + +private theorem k9t4p15_local_2_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_2 a b ∪ (((((k9t4p15_local_2_required_0 a b ∪ k9t4p15_local_2_required_1 a b) ∪ k9t4p15_local_2_required_2 a b) ∪ k9t4p15_local_2_required_3 a b) ∪ k9t4p15_local_2_required_4 a b))) 1 j = k9t4p15_local_2 1 j := by decide + +private theorem k9t4p15_local_2_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_2 a b ∪ (((((k9t4p15_local_2_required_0 a b ∪ k9t4p15_local_2_required_1 a b) ∪ k9t4p15_local_2_required_2 a b) ∪ k9t4p15_local_2_required_3 a b) ∪ k9t4p15_local_2_required_4 a b))) 2 j = k9t4p15_local_2 2 j := by decide + +private theorem k9t4p15_local_2_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_2 a b ∪ (((((k9t4p15_local_2_required_0 a b ∪ k9t4p15_local_2_required_1 a b) ∪ k9t4p15_local_2_required_2 a b) ∪ k9t4p15_local_2_required_3 a b) ∪ k9t4p15_local_2_required_4 a b))) 3 j = k9t4p15_local_2 3 j := by decide + +private theorem k9t4p15_local_2_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_2 a b ∪ (((((k9t4p15_local_2_required_0 a b ∪ k9t4p15_local_2_required_1 a b) ∪ k9t4p15_local_2_required_2 a b) ∪ k9t4p15_local_2_required_3 a b) ∪ k9t4p15_local_2_required_4 a b))) 4 j = k9t4p15_local_2 4 j := by decide + +private theorem k9t4p15_local_2_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_2 a b ∪ (((((k9t4p15_local_2_required_0 a b ∪ k9t4p15_local_2_required_1 a b) ∪ k9t4p15_local_2_required_2 a b) ∪ k9t4p15_local_2_required_3 a b) ∪ k9t4p15_local_2_required_4 a b))) 5 j = k9t4p15_local_2 5 j := by decide + +private theorem k9t4p15_local_2_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_2 a b ∪ (((((k9t4p15_local_2_required_0 a b ∪ k9t4p15_local_2_required_1 a b) ∪ k9t4p15_local_2_required_2 a b) ∪ k9t4p15_local_2_required_3 a b) ∪ k9t4p15_local_2_required_4 a b))) 6 j = k9t4p15_local_2 6 j := by decide + +private theorem k9t4p15_local_2_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_2 a b ∪ (((((k9t4p15_local_2_required_0 a b ∪ k9t4p15_local_2_required_1 a b) ∪ k9t4p15_local_2_required_2 a b) ∪ k9t4p15_local_2_required_3 a b) ∪ k9t4p15_local_2_required_4 a b))) 7 j = k9t4p15_local_2 7 j := by decide + +private theorem k9t4p15_local_2_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_2 a b ∪ (((((k9t4p15_local_2_required_0 a b ∪ k9t4p15_local_2_required_1 a b) ∪ k9t4p15_local_2_required_2 a b) ∪ k9t4p15_local_2_required_3 a b) ∪ k9t4p15_local_2_required_4 a b))) 8 j = k9t4p15_local_2 8 j := by decide + +private theorem k9t4p15_local_2_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_2 a b ∪ (((((k9t4p15_local_2_required_0 a b ∪ k9t4p15_local_2_required_1 a b) ∪ k9t4p15_local_2_required_2 a b) ∪ k9t4p15_local_2_required_3 a b) ∪ k9t4p15_local_2_required_4 a b))) 9 j = k9t4p15_local_2 9 j := by decide + +private theorem k9t4p15_local_2_merged_eq : (fun a b => freshMatrix k9t4p15_state_2 a b ∪ (((((k9t4p15_local_2_required_0 a b ∪ k9t4p15_local_2_required_1 a b) ∪ k9t4p15_local_2_required_2 a b) ∪ k9t4p15_local_2_required_3 a b) ∪ k9t4p15_local_2_required_4 a b))) = k9t4p15_local_2 := by + funext i j + fin_cases i + + · exact k9t4p15_local_2_merged_eq_row_0 j + + · exact k9t4p15_local_2_merged_eq_row_1 j + + · exact k9t4p15_local_2_merged_eq_row_2 j + + · exact k9t4p15_local_2_merged_eq_row_3 j + + · exact k9t4p15_local_2_merged_eq_row_4 j + + · exact k9t4p15_local_2_merged_eq_row_5 j + + · exact k9t4p15_local_2_merged_eq_row_6 j + + · exact k9t4p15_local_2_merged_eq_row_7 j + + · exact k9t4p15_local_2_merged_eq_row_8 j + + · exact k9t4p15_local_2_merged_eq_row_9 j + +private theorem k9t4p15_local_2_eq : (fun a b => freshMatrix k9t4p15_state_2 a b ∪ requiredMatrix 9 k9t4p15_step_2_data.required a b) = k9t4p15_local_2 := by + funext a b + change freshMatrix k9t4p15_state_2 a b ∪ requiredMatrix 9 (k9t4p15_step_2_required_block_0 ++ k9t4p15_step_2_required_block_1 ++ k9t4p15_step_2_required_block_2 ++ k9t4p15_step_2_required_block_3 ++ k9t4p15_step_2_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t4p15_local_2_required_0_eq, k9t4p15_local_2_required_1_eq, k9t4p15_local_2_required_2_eq, k9t4p15_local_2_required_3_eq, k9t4p15_local_2_required_4_eq] + exact congrFun (congrFun k9t4p15_local_2_merged_eq a) b + +private theorem k9t4p15_local_2_paths : ∀ p ∈ k9t4p15_step_2_data.required, p.Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 := by + change ∀ p ∈ (k9t4p15_step_2_required_block_0 ++ k9t4p15_step_2_required_block_1 ++ k9t4p15_step_2_required_block_2 ++ k9t4p15_step_2_required_block_3 ++ k9t4p15_step_2_required_block_4), p.Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t4p15_local_2_paths_block_0, k9t4p15_local_2_paths_block_1⟩, k9t4p15_local_2_paths_block_2⟩, k9t4p15_local_2_paths_block_3⟩, k9t4p15_local_2_paths_block_4⟩ + +private theorem k9t4p15_local_2_bad : k9t4p15_step_2_data.bad.Check (freshGraph k9t4p15.graph k9t4p15_step_2_data.i k9t4p15_step_2_data.j) k9t4p15_local_2 9 4 := by decide + +private theorem k9t4p15_step_2_check : k9t4p15_step_2.Check k9t4p15.graph k9t4p15_state_2 9 4 := by + change k9t4p15_step_2_data.Check k9t4p15.graph k9t4p15_state_2 9 4 + refine ⟨by decide, k9t4p15_local_2_paths, ?_⟩ + rw [k9t4p15_local_2_eq] + exact k9t4p15_local_2_bad + +private theorem k9t4p15_update_2 : k9t4p15_step_2.apply k9t4p15_state_2 = k9t4p15_state_3 := by + have h : ∀ i j : Fin 9, k9t4p15_step_2.apply k9t4p15_state_2 i j = k9t4p15_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_4 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 7, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_3_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p15_state_3 a b ∪ requiredMatrix 9 k9t4p15_step_3_data.required a b) 0 j = k9t4p15_local_3 0 j := by decide + +private theorem k9t4p15_local_3_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p15_state_3 a b ∪ requiredMatrix 9 k9t4p15_step_3_data.required a b) 1 j = k9t4p15_local_3 1 j := by decide + +private theorem k9t4p15_local_3_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p15_state_3 a b ∪ requiredMatrix 9 k9t4p15_step_3_data.required a b) 2 j = k9t4p15_local_3 2 j := by decide + +private theorem k9t4p15_local_3_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p15_state_3 a b ∪ requiredMatrix 9 k9t4p15_step_3_data.required a b) 3 j = k9t4p15_local_3 3 j := by decide + +private theorem k9t4p15_local_3_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p15_state_3 a b ∪ requiredMatrix 9 k9t4p15_step_3_data.required a b) 4 j = k9t4p15_local_3 4 j := by decide + +private theorem k9t4p15_local_3_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p15_state_3 a b ∪ requiredMatrix 9 k9t4p15_step_3_data.required a b) 5 j = k9t4p15_local_3 5 j := by decide + +private theorem k9t4p15_local_3_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p15_state_3 a b ∪ requiredMatrix 9 k9t4p15_step_3_data.required a b) 6 j = k9t4p15_local_3 6 j := by decide + +private theorem k9t4p15_local_3_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p15_state_3 a b ∪ requiredMatrix 9 k9t4p15_step_3_data.required a b) 7 j = k9t4p15_local_3 7 j := by decide + +private theorem k9t4p15_local_3_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p15_state_3 a b ∪ requiredMatrix 9 k9t4p15_step_3_data.required a b) 8 j = k9t4p15_local_3 8 j := by decide + +private theorem k9t4p15_local_3_eq : (fun a b => k9t4p15_state_3 a b ∪ requiredMatrix 9 k9t4p15_step_3_data.required a b) = k9t4p15_local_3 := by + funext i j + fin_cases i + + · exact k9t4p15_local_3_eq_row_0 j + + · exact k9t4p15_local_3_eq_row_1 j + + · exact k9t4p15_local_3_eq_row_2 j + + · exact k9t4p15_local_3_eq_row_3 j + + · exact k9t4p15_local_3_eq_row_4 j + + · exact k9t4p15_local_3_eq_row_5 j + + · exact k9t4p15_local_3_eq_row_6 j + + · exact k9t4p15_local_3_eq_row_7 j + + · exact k9t4p15_local_3_eq_row_8 j + +private theorem k9t4p15_local_3_paths : ∀ p ∈ k9t4p15_step_3_data.required, p.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_3_data.i k9t4p15_step_3_data.j) 9 := by decide + +private theorem k9t4p15_local_3_bad : k9t4p15_step_3_data.bad.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_3_data.i k9t4p15_step_3_data.j) k9t4p15_local_3 9 4 := by decide + +private theorem k9t4p15_step_3_check : k9t4p15_step_3.Check k9t4p15.graph k9t4p15_state_3 9 4 := by + change k9t4p15_step_3_data.Check k9t4p15.graph k9t4p15_state_3 9 4 + refine ⟨k9t4p15_local_3_paths, ?_⟩ + rw [k9t4p15_local_3_eq] + exact k9t4p15_local_3_bad + +private theorem k9t4p15_update_3 : k9t4p15_step_3.apply k9t4p15_state_3 = k9t4p15_state_4 := by + have h : ∀ i j : Fin 9, k9t4p15_step_3.apply k9t4p15_state_3 i j = k9t4p15_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_5 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_4 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 7, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_4_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p15_state_4 a b ∪ requiredMatrix 9 k9t4p15_step_4_data.required a b) 0 j = k9t4p15_local_4 0 j := by decide + +private theorem k9t4p15_local_4_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p15_state_4 a b ∪ requiredMatrix 9 k9t4p15_step_4_data.required a b) 1 j = k9t4p15_local_4 1 j := by decide + +private theorem k9t4p15_local_4_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p15_state_4 a b ∪ requiredMatrix 9 k9t4p15_step_4_data.required a b) 2 j = k9t4p15_local_4 2 j := by decide + +private theorem k9t4p15_local_4_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p15_state_4 a b ∪ requiredMatrix 9 k9t4p15_step_4_data.required a b) 3 j = k9t4p15_local_4 3 j := by decide + +private theorem k9t4p15_local_4_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p15_state_4 a b ∪ requiredMatrix 9 k9t4p15_step_4_data.required a b) 4 j = k9t4p15_local_4 4 j := by decide + +private theorem k9t4p15_local_4_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p15_state_4 a b ∪ requiredMatrix 9 k9t4p15_step_4_data.required a b) 5 j = k9t4p15_local_4 5 j := by decide + +private theorem k9t4p15_local_4_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p15_state_4 a b ∪ requiredMatrix 9 k9t4p15_step_4_data.required a b) 6 j = k9t4p15_local_4 6 j := by decide + +private theorem k9t4p15_local_4_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p15_state_4 a b ∪ requiredMatrix 9 k9t4p15_step_4_data.required a b) 7 j = k9t4p15_local_4 7 j := by decide + +private theorem k9t4p15_local_4_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p15_state_4 a b ∪ requiredMatrix 9 k9t4p15_step_4_data.required a b) 8 j = k9t4p15_local_4 8 j := by decide + +private theorem k9t4p15_local_4_eq : (fun a b => k9t4p15_state_4 a b ∪ requiredMatrix 9 k9t4p15_step_4_data.required a b) = k9t4p15_local_4 := by + funext i j + fin_cases i + + · exact k9t4p15_local_4_eq_row_0 j + + · exact k9t4p15_local_4_eq_row_1 j + + · exact k9t4p15_local_4_eq_row_2 j + + · exact k9t4p15_local_4_eq_row_3 j + + · exact k9t4p15_local_4_eq_row_4 j + + · exact k9t4p15_local_4_eq_row_5 j + + · exact k9t4p15_local_4_eq_row_6 j + + · exact k9t4p15_local_4_eq_row_7 j + + · exact k9t4p15_local_4_eq_row_8 j + +private theorem k9t4p15_local_4_paths : ∀ p ∈ k9t4p15_step_4_data.required, p.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_4_data.i k9t4p15_step_4_data.j) 9 := by decide + +private theorem k9t4p15_local_4_bad : k9t4p15_step_4_data.bad.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_4_data.i k9t4p15_step_4_data.j) k9t4p15_local_4 9 4 := by decide + +private theorem k9t4p15_step_4_check : k9t4p15_step_4.Check k9t4p15.graph k9t4p15_state_4 9 4 := by + change k9t4p15_step_4_data.Check k9t4p15.graph k9t4p15_state_4 9 4 + refine ⟨k9t4p15_local_4_paths, ?_⟩ + rw [k9t4p15_local_4_eq] + exact k9t4p15_local_4_bad + +private theorem k9t4p15_update_4 : k9t4p15_step_4.apply k9t4p15_state_4 = k9t4p15_state_5 := by + have h : ∀ i j : Fin 9, k9t4p15_step_4.apply k9t4p15_state_4 i j = k9t4p15_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_6 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_5 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1}, Finset.Icc 0 5, {1}, Finset.Icc 0 5, Finset.Icc 0 4, {1}, {0, 1}, {0, 1}, {0, 1}], + #[{1}, ∅, {1, 2, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 0 5, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{1}, {2}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 0 5, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, {1, 2, 3}, ∅, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 0 6, {1, 2, 4, 5, 6, 7}, {1, 2}], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {0, 1}], + #[{1}, Finset.Icc 0 6, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[{0, 1}, Finset.Icc 2 6, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, {1, 2}, {0, 1}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_5_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {0, 1, 2}, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, {2}, ∅, {2}, {3}, {0}, ∅, {0}, ∅, ∅], + #[∅, ∅, {2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, {3}, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}], + #[∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_5_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_0) 0 j = k9t4p15_local_5_required_0 0 j := by decide + +private theorem k9t4p15_local_5_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_0) 1 j = k9t4p15_local_5_required_0 1 j := by decide + +private theorem k9t4p15_local_5_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_0) 2 j = k9t4p15_local_5_required_0 2 j := by decide + +private theorem k9t4p15_local_5_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_0) 3 j = k9t4p15_local_5_required_0 3 j := by decide + +private theorem k9t4p15_local_5_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_0) 4 j = k9t4p15_local_5_required_0 4 j := by decide + +private theorem k9t4p15_local_5_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_0) 5 j = k9t4p15_local_5_required_0 5 j := by decide + +private theorem k9t4p15_local_5_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_0) 6 j = k9t4p15_local_5_required_0 6 j := by decide + +private theorem k9t4p15_local_5_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_0) 7 j = k9t4p15_local_5_required_0 7 j := by decide + +private theorem k9t4p15_local_5_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_0) 8 j = k9t4p15_local_5_required_0 8 j := by decide + +private theorem k9t4p15_local_5_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_0) 9 j = k9t4p15_local_5_required_0 9 j := by decide + +private theorem k9t4p15_local_5_required_0_eq : (requiredMatrix 9 k9t4p15_step_5_required_block_0) = k9t4p15_local_5_required_0 := by + funext i j + fin_cases i + + · exact k9t4p15_local_5_required_0_eq_row_0 j + + · exact k9t4p15_local_5_required_0_eq_row_1 j + + · exact k9t4p15_local_5_required_0_eq_row_2 j + + · exact k9t4p15_local_5_required_0_eq_row_3 j + + · exact k9t4p15_local_5_required_0_eq_row_4 j + + · exact k9t4p15_local_5_required_0_eq_row_5 j + + · exact k9t4p15_local_5_required_0_eq_row_6 j + + · exact k9t4p15_local_5_required_0_eq_row_7 j + + · exact k9t4p15_local_5_required_0_eq_row_8 j + + · exact k9t4p15_local_5_required_0_eq_row_9 j + +private theorem k9t4p15_local_5_path_0_0 : (⟨2, 0, [1, 3, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_0_1 : (⟨2, 4, [1, 3, 0, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_0_2 : (⟨2, 7, [1, 3, 0, 6, 5, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_0_3 : (⟨2, 0, [1, 9, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_0_4 : (⟨2, 3, [1, 9, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_0_5 : (⟨2, 0, [1, 9, 8, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_0_6 : (⟨2, 5, [1, 9, 8, 7, 6, 0, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_0_7 : (⟨2, 1, [3, 0, 6, 5, 4, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_0_8 : (⟨4, 0, [1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_0_9 : (⟨4, 9, [1, 2, 3, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_0_10 : (⟨4, 0, [1, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_0_11 : (⟨4, 9, [1, 3, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_paths_block_0 : ∀ p ∈ k9t4p15_step_5_required_block_0, p.Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by + simp only [k9t4p15_step_5_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_5_path_0_0, k9t4p15_local_5_path_0_1, k9t4p15_local_5_path_0_2, k9t4p15_local_5_path_0_3, k9t4p15_local_5_path_0_4, k9t4p15_local_5_path_0_5, k9t4p15_local_5_path_0_6, k9t4p15_local_5_path_0_7, k9t4p15_local_5_path_0_8, k9t4p15_local_5_path_0_9, k9t4p15_local_5_path_0_10, k9t4p15_local_5_path_0_11⟩ + +private def k9t4p15_local_5_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {0}, {0, 1, 4}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, {1, 2}, ∅], + #[{0, 1, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1, 2}, {1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_5_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_1) 0 j = k9t4p15_local_5_required_1 0 j := by decide + +private theorem k9t4p15_local_5_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_1) 1 j = k9t4p15_local_5_required_1 1 j := by decide + +private theorem k9t4p15_local_5_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_1) 2 j = k9t4p15_local_5_required_1 2 j := by decide + +private theorem k9t4p15_local_5_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_1) 3 j = k9t4p15_local_5_required_1 3 j := by decide + +private theorem k9t4p15_local_5_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_1) 4 j = k9t4p15_local_5_required_1 4 j := by decide + +private theorem k9t4p15_local_5_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_1) 5 j = k9t4p15_local_5_required_1 5 j := by decide + +private theorem k9t4p15_local_5_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_1) 6 j = k9t4p15_local_5_required_1 6 j := by decide + +private theorem k9t4p15_local_5_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_1) 7 j = k9t4p15_local_5_required_1 7 j := by decide + +private theorem k9t4p15_local_5_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_1) 8 j = k9t4p15_local_5_required_1 8 j := by decide + +private theorem k9t4p15_local_5_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_1) 9 j = k9t4p15_local_5_required_1 9 j := by decide + +private theorem k9t4p15_local_5_required_1_eq : (requiredMatrix 9 k9t4p15_step_5_required_block_1) = k9t4p15_local_5_required_1 := by + funext i j + fin_cases i + + · exact k9t4p15_local_5_required_1_eq_row_0 j + + · exact k9t4p15_local_5_required_1_eq_row_1 j + + · exact k9t4p15_local_5_required_1_eq_row_2 j + + · exact k9t4p15_local_5_required_1_eq_row_3 j + + · exact k9t4p15_local_5_required_1_eq_row_4 j + + · exact k9t4p15_local_5_required_1_eq_row_5 j + + · exact k9t4p15_local_5_required_1_eq_row_6 j + + · exact k9t4p15_local_5_required_1_eq_row_7 j + + · exact k9t4p15_local_5_required_1_eq_row_8 j + + · exact k9t4p15_local_5_required_1_eq_row_9 j + +private theorem k9t4p15_local_5_path_1_0 : (⟨4, 8, [1, 9, 3, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_1_1 : (⟨4, 0, [5, 6, 7, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_1_2 : (⟨4, 7, [5, 6, 0, 3, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_1_3 : (⟨4, 7, [5, 6, 0, 3, 2, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_1_4 : (⟨4, 7, [9, 1, 2, 3, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_1_5 : (⟨4, 8, [9, 1, 2, 3, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_1_6 : (⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_1_7 : (⟨5, 9, [4, 1, 2, 3, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_1_8 : (⟨5, 0, [4, 1, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_1_9 : (⟨5, 9, [4, 1, 3, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_1_10 : (⟨5, 0, [4, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_1_11 : (⟨5, 8, [4, 1, 9, 3, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_paths_block_1 : ∀ p ∈ k9t4p15_step_5_required_block_1, p.Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by + simp only [k9t4p15_step_5_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_5_path_1_0, k9t4p15_local_5_path_1_1, k9t4p15_local_5_path_1_2, k9t4p15_local_5_path_1_3, k9t4p15_local_5_path_1_4, k9t4p15_local_5_path_1_5, k9t4p15_local_5_path_1_6, k9t4p15_local_5_path_1_7, k9t4p15_local_5_path_1_8, k9t4p15_local_5_path_1_9, k9t4p15_local_5_path_1_10, k9t4p15_local_5_path_1_11⟩ + +private def k9t4p15_local_5_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {5}, {1, 2, 3}, ∅, ∅, {1}, {1}], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{5}, ∅, ∅, ∅, ∅, {5}, ∅, ∅, ∅, ∅], + #[{1, 2, 3}, {0}, {0}, ∅, {5}, ∅, ∅, {0, 1}, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_5_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_2) 0 j = k9t4p15_local_5_required_2 0 j := by decide + +private theorem k9t4p15_local_5_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_2) 1 j = k9t4p15_local_5_required_2 1 j := by decide + +private theorem k9t4p15_local_5_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_2) 2 j = k9t4p15_local_5_required_2 2 j := by decide + +private theorem k9t4p15_local_5_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_2) 3 j = k9t4p15_local_5_required_2 3 j := by decide + +private theorem k9t4p15_local_5_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_2) 4 j = k9t4p15_local_5_required_2 4 j := by decide + +private theorem k9t4p15_local_5_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_2) 5 j = k9t4p15_local_5_required_2 5 j := by decide + +private theorem k9t4p15_local_5_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_2) 6 j = k9t4p15_local_5_required_2 6 j := by decide + +private theorem k9t4p15_local_5_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_2) 7 j = k9t4p15_local_5_required_2 7 j := by decide + +private theorem k9t4p15_local_5_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_2) 8 j = k9t4p15_local_5_required_2 8 j := by decide + +private theorem k9t4p15_local_5_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_2) 9 j = k9t4p15_local_5_required_2 9 j := by decide + +private theorem k9t4p15_local_5_required_2_eq : (requiredMatrix 9 k9t4p15_step_5_required_block_2) = k9t4p15_local_5_required_2 := by + funext i j + fin_cases i + + · exact k9t4p15_local_5_required_2_eq_row_0 j + + · exact k9t4p15_local_5_required_2_eq_row_1 j + + · exact k9t4p15_local_5_required_2_eq_row_2 j + + · exact k9t4p15_local_5_required_2_eq_row_3 j + + · exact k9t4p15_local_5_required_2_eq_row_4 j + + · exact k9t4p15_local_5_required_2_eq_row_5 j + + · exact k9t4p15_local_5_required_2_eq_row_6 j + + · exact k9t4p15_local_5_required_2_eq_row_7 j + + · exact k9t4p15_local_5_required_2_eq_row_8 j + + · exact k9t4p15_local_5_required_2_eq_row_9 j + +private theorem k9t4p15_local_5_path_2_0 : (⟨5, 0, [4, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_2_1 : (⟨5, 2, [4, 1, 9, 8, 7, 6, 0, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_2_2 : (⟨5, 0, [4, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_2_3 : (⟨5, 7, [4, 9, 1, 2, 3, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_2_4 : (⟨5, 8, [4, 9, 1, 2, 3, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_2_5 : (⟨5, 1, [4, 9, 8, 7, 6, 0, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_2_6 : (⟨5, 7, [6, 0, 3, 2, 1, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_2_7 : (⟨5, 4, [6, 0, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_2_8 : (⟨0, 9, [3, 1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_2_9 : (⟨0, 5, [3, 1, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_2_10 : (⟨0, 4, [3, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_2_11 : (⟨0, 8, [3, 1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_paths_block_2 : ∀ p ∈ k9t4p15_step_5_required_block_2, p.Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by + simp only [k9t4p15_step_5_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_5_path_2_0, k9t4p15_local_5_path_2_1, k9t4p15_local_5_path_2_2, k9t4p15_local_5_path_2_3, k9t4p15_local_5_path_2_4, k9t4p15_local_5_path_2_5, k9t4p15_local_5_path_2_6, k9t4p15_local_5_path_2_7, k9t4p15_local_5_path_2_8, k9t4p15_local_5_path_2_9, k9t4p15_local_5_path_2_10, k9t4p15_local_5_path_2_11⟩ + +private def k9t4p15_local_5_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1}, {0, 4, 5}, ∅, {0, 1, 4}, {0}, {1}, {1}, {0}, {0}], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_5_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_3) 0 j = k9t4p15_local_5_required_3 0 j := by decide + +private theorem k9t4p15_local_5_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_3) 1 j = k9t4p15_local_5_required_3 1 j := by decide + +private theorem k9t4p15_local_5_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_3) 2 j = k9t4p15_local_5_required_3 2 j := by decide + +private theorem k9t4p15_local_5_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_3) 3 j = k9t4p15_local_5_required_3 3 j := by decide + +private theorem k9t4p15_local_5_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_3) 4 j = k9t4p15_local_5_required_3 4 j := by decide + +private theorem k9t4p15_local_5_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_3) 5 j = k9t4p15_local_5_required_3 5 j := by decide + +private theorem k9t4p15_local_5_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_3) 6 j = k9t4p15_local_5_required_3 6 j := by decide + +private theorem k9t4p15_local_5_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_3) 7 j = k9t4p15_local_5_required_3 7 j := by decide + +private theorem k9t4p15_local_5_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_3) 8 j = k9t4p15_local_5_required_3 8 j := by decide + +private theorem k9t4p15_local_5_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_3) 9 j = k9t4p15_local_5_required_3 9 j := by decide + +private theorem k9t4p15_local_5_required_3_eq : (requiredMatrix 9 k9t4p15_step_5_required_block_3) = k9t4p15_local_5_required_3 := by + funext i j + fin_cases i + + · exact k9t4p15_local_5_required_3_eq_row_0 j + + · exact k9t4p15_local_5_required_3_eq_row_1 j + + · exact k9t4p15_local_5_required_3_eq_row_2 j + + · exact k9t4p15_local_5_required_3_eq_row_3 j + + · exact k9t4p15_local_5_required_3_eq_row_4 j + + · exact k9t4p15_local_5_required_3_eq_row_5 j + + · exact k9t4p15_local_5_required_3_eq_row_6 j + + · exact k9t4p15_local_5_required_3_eq_row_7 j + + · exact k9t4p15_local_5_required_3_eq_row_8 j + + · exact k9t4p15_local_5_required_3_eq_row_9 j + +private theorem k9t4p15_local_5_path_3_0 : (⟨0, 4, [3, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_3_1 : (⟨0, 9, [3, 2, 1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_3_2 : (⟨0, 6, [3, 2, 1, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_3_3 : (⟨0, 5, [3, 2, 1, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_3_4 : (⟨0, 4, [3, 2, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_3_5 : (⟨0, 7, [3, 2, 1, 9, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_3_6 : (⟨0, 8, [3, 2, 1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_3_7 : (⟨0, 4, [3, 2, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_3_8 : (⟨0, 2, [3, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_3_9 : (⟨0, 1, [3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_3_10 : (⟨0, 2, [3, 4, 5, 6, 7, 8, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_3_11 : (⟨0, 2, [3, 4, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_paths_block_3 : ∀ p ∈ k9t4p15_step_5_required_block_3, p.Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by + simp only [k9t4p15_step_5_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_5_path_3_0, k9t4p15_local_5_path_3_1, k9t4p15_local_5_path_3_2, k9t4p15_local_5_path_3_3, k9t4p15_local_5_path_3_4, k9t4p15_local_5_path_3_5, k9t4p15_local_5_path_3_6, k9t4p15_local_5_path_3_7, k9t4p15_local_5_path_3_8, k9t4p15_local_5_path_3_9, k9t4p15_local_5_path_3_10, k9t4p15_local_5_path_3_11⟩ + +private def k9t4p15_local_5_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {1, 2, 3}, {1}, {2, 3}, ∅, ∅, {0}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_5_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_4) 0 j = k9t4p15_local_5_required_4 0 j := by decide + +private theorem k9t4p15_local_5_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_4) 1 j = k9t4p15_local_5_required_4 1 j := by decide + +private theorem k9t4p15_local_5_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_4) 2 j = k9t4p15_local_5_required_4 2 j := by decide + +private theorem k9t4p15_local_5_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_4) 3 j = k9t4p15_local_5_required_4 3 j := by decide + +private theorem k9t4p15_local_5_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_4) 4 j = k9t4p15_local_5_required_4 4 j := by decide + +private theorem k9t4p15_local_5_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_4) 5 j = k9t4p15_local_5_required_4 5 j := by decide + +private theorem k9t4p15_local_5_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_4) 6 j = k9t4p15_local_5_required_4 6 j := by decide + +private theorem k9t4p15_local_5_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_4) 7 j = k9t4p15_local_5_required_4 7 j := by decide + +private theorem k9t4p15_local_5_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_4) 8 j = k9t4p15_local_5_required_4 8 j := by decide + +private theorem k9t4p15_local_5_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_5_required_block_4) 9 j = k9t4p15_local_5_required_4 9 j := by decide + +private theorem k9t4p15_local_5_required_4_eq : (requiredMatrix 9 k9t4p15_step_5_required_block_4) = k9t4p15_local_5_required_4 := by + funext i j + fin_cases i + + · exact k9t4p15_local_5_required_4_eq_row_0 j + + · exact k9t4p15_local_5_required_4_eq_row_1 j + + · exact k9t4p15_local_5_required_4_eq_row_2 j + + · exact k9t4p15_local_5_required_4_eq_row_3 j + + · exact k9t4p15_local_5_required_4_eq_row_4 j + + · exact k9t4p15_local_5_required_4_eq_row_5 j + + · exact k9t4p15_local_5_required_4_eq_row_6 j + + · exact k9t4p15_local_5_required_4_eq_row_7 j + + · exact k9t4p15_local_5_required_4_eq_row_8 j + + · exact k9t4p15_local_5_required_4_eq_row_9 j + +private theorem k9t4p15_local_5_path_4_0 : (⟨0, 4, [3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_4_1 : (⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_4_2 : (⟨0, 2, [6, 5, 4, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_4_3 : (⟨0, 2, [6, 5, 4, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_4_4 : (⟨0, 4, [6, 7, 8, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_4_5 : (⟨0, 2, [6, 7, 8, 9, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_path_4_6 : (⟨0, 3, [6, 7, 8, 9, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by decide + +private theorem k9t4p15_local_5_paths_block_4 : ∀ p ∈ k9t4p15_step_5_required_block_4, p.Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by + simp only [k9t4p15_step_5_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_5_path_4_0, k9t4p15_local_5_path_4_1, k9t4p15_local_5_path_4_2, k9t4p15_local_5_path_4_3, k9t4p15_local_5_path_4_4, k9t4p15_local_5_path_4_5, k9t4p15_local_5_path_4_6⟩ + +private theorem k9t4p15_local_5_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_5 a b ∪ (((((k9t4p15_local_5_required_0 a b ∪ k9t4p15_local_5_required_1 a b) ∪ k9t4p15_local_5_required_2 a b) ∪ k9t4p15_local_5_required_3 a b) ∪ k9t4p15_local_5_required_4 a b))) 0 j = k9t4p15_local_5 0 j := by decide + +private theorem k9t4p15_local_5_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_5 a b ∪ (((((k9t4p15_local_5_required_0 a b ∪ k9t4p15_local_5_required_1 a b) ∪ k9t4p15_local_5_required_2 a b) ∪ k9t4p15_local_5_required_3 a b) ∪ k9t4p15_local_5_required_4 a b))) 1 j = k9t4p15_local_5 1 j := by decide + +private theorem k9t4p15_local_5_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_5 a b ∪ (((((k9t4p15_local_5_required_0 a b ∪ k9t4p15_local_5_required_1 a b) ∪ k9t4p15_local_5_required_2 a b) ∪ k9t4p15_local_5_required_3 a b) ∪ k9t4p15_local_5_required_4 a b))) 2 j = k9t4p15_local_5 2 j := by decide + +private theorem k9t4p15_local_5_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_5 a b ∪ (((((k9t4p15_local_5_required_0 a b ∪ k9t4p15_local_5_required_1 a b) ∪ k9t4p15_local_5_required_2 a b) ∪ k9t4p15_local_5_required_3 a b) ∪ k9t4p15_local_5_required_4 a b))) 3 j = k9t4p15_local_5 3 j := by decide + +private theorem k9t4p15_local_5_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_5 a b ∪ (((((k9t4p15_local_5_required_0 a b ∪ k9t4p15_local_5_required_1 a b) ∪ k9t4p15_local_5_required_2 a b) ∪ k9t4p15_local_5_required_3 a b) ∪ k9t4p15_local_5_required_4 a b))) 4 j = k9t4p15_local_5 4 j := by decide + +private theorem k9t4p15_local_5_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_5 a b ∪ (((((k9t4p15_local_5_required_0 a b ∪ k9t4p15_local_5_required_1 a b) ∪ k9t4p15_local_5_required_2 a b) ∪ k9t4p15_local_5_required_3 a b) ∪ k9t4p15_local_5_required_4 a b))) 5 j = k9t4p15_local_5 5 j := by decide + +private theorem k9t4p15_local_5_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_5 a b ∪ (((((k9t4p15_local_5_required_0 a b ∪ k9t4p15_local_5_required_1 a b) ∪ k9t4p15_local_5_required_2 a b) ∪ k9t4p15_local_5_required_3 a b) ∪ k9t4p15_local_5_required_4 a b))) 6 j = k9t4p15_local_5 6 j := by decide + +private theorem k9t4p15_local_5_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_5 a b ∪ (((((k9t4p15_local_5_required_0 a b ∪ k9t4p15_local_5_required_1 a b) ∪ k9t4p15_local_5_required_2 a b) ∪ k9t4p15_local_5_required_3 a b) ∪ k9t4p15_local_5_required_4 a b))) 7 j = k9t4p15_local_5 7 j := by decide + +private theorem k9t4p15_local_5_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_5 a b ∪ (((((k9t4p15_local_5_required_0 a b ∪ k9t4p15_local_5_required_1 a b) ∪ k9t4p15_local_5_required_2 a b) ∪ k9t4p15_local_5_required_3 a b) ∪ k9t4p15_local_5_required_4 a b))) 8 j = k9t4p15_local_5 8 j := by decide + +private theorem k9t4p15_local_5_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_5 a b ∪ (((((k9t4p15_local_5_required_0 a b ∪ k9t4p15_local_5_required_1 a b) ∪ k9t4p15_local_5_required_2 a b) ∪ k9t4p15_local_5_required_3 a b) ∪ k9t4p15_local_5_required_4 a b))) 9 j = k9t4p15_local_5 9 j := by decide + +private theorem k9t4p15_local_5_merged_eq : (fun a b => freshMatrix k9t4p15_state_5 a b ∪ (((((k9t4p15_local_5_required_0 a b ∪ k9t4p15_local_5_required_1 a b) ∪ k9t4p15_local_5_required_2 a b) ∪ k9t4p15_local_5_required_3 a b) ∪ k9t4p15_local_5_required_4 a b))) = k9t4p15_local_5 := by + funext i j + fin_cases i + + · exact k9t4p15_local_5_merged_eq_row_0 j + + · exact k9t4p15_local_5_merged_eq_row_1 j + + · exact k9t4p15_local_5_merged_eq_row_2 j + + · exact k9t4p15_local_5_merged_eq_row_3 j + + · exact k9t4p15_local_5_merged_eq_row_4 j + + · exact k9t4p15_local_5_merged_eq_row_5 j + + · exact k9t4p15_local_5_merged_eq_row_6 j + + · exact k9t4p15_local_5_merged_eq_row_7 j + + · exact k9t4p15_local_5_merged_eq_row_8 j + + · exact k9t4p15_local_5_merged_eq_row_9 j + +private theorem k9t4p15_local_5_eq : (fun a b => freshMatrix k9t4p15_state_5 a b ∪ requiredMatrix 9 k9t4p15_step_5_data.required a b) = k9t4p15_local_5 := by + funext a b + change freshMatrix k9t4p15_state_5 a b ∪ requiredMatrix 9 (k9t4p15_step_5_required_block_0 ++ k9t4p15_step_5_required_block_1 ++ k9t4p15_step_5_required_block_2 ++ k9t4p15_step_5_required_block_3 ++ k9t4p15_step_5_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t4p15_local_5_required_0_eq, k9t4p15_local_5_required_1_eq, k9t4p15_local_5_required_2_eq, k9t4p15_local_5_required_3_eq, k9t4p15_local_5_required_4_eq] + exact congrFun (congrFun k9t4p15_local_5_merged_eq a) b + +private theorem k9t4p15_local_5_paths : ∀ p ∈ k9t4p15_step_5_data.required, p.Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 := by + change ∀ p ∈ (k9t4p15_step_5_required_block_0 ++ k9t4p15_step_5_required_block_1 ++ k9t4p15_step_5_required_block_2 ++ k9t4p15_step_5_required_block_3 ++ k9t4p15_step_5_required_block_4), p.Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t4p15_local_5_paths_block_0, k9t4p15_local_5_paths_block_1⟩, k9t4p15_local_5_paths_block_2⟩, k9t4p15_local_5_paths_block_3⟩, k9t4p15_local_5_paths_block_4⟩ + +private theorem k9t4p15_local_5_bad : k9t4p15_step_5_data.bad.Check (freshGraph k9t4p15.graph k9t4p15_step_5_data.i k9t4p15_step_5_data.j) k9t4p15_local_5 9 4 := by decide + +private theorem k9t4p15_step_5_check : k9t4p15_step_5.Check k9t4p15.graph k9t4p15_state_5 9 4 := by + change k9t4p15_step_5_data.Check k9t4p15.graph k9t4p15_state_5 9 4 + refine ⟨by decide, k9t4p15_local_5_paths, ?_⟩ + rw [k9t4p15_local_5_eq] + exact k9t4p15_local_5_bad + +private theorem k9t4p15_update_5 : k9t4p15_step_5.apply k9t4p15_state_5 = k9t4p15_state_6 := by + have h : ∀ i j : Fin 9, k9t4p15_step_5.apply k9t4p15_state_5 i j = k9t4p15_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_7 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_6 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0}, Finset.Icc 0 4, {0}, ∅, Finset.Icc 0 3, ∅, Finset.Icc 0 3, ∅, ∅], + #[{0}, ∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 0 4, {1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{0}, {2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 0 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5, 6}, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 3, Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, {1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_6_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_6 a b ∪ requiredMatrix 9 k9t4p15_step_6_data.required a b) 0 j = k9t4p15_local_6 0 j := by decide + +private theorem k9t4p15_local_6_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_6 a b ∪ requiredMatrix 9 k9t4p15_step_6_data.required a b) 1 j = k9t4p15_local_6 1 j := by decide + +private theorem k9t4p15_local_6_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_6 a b ∪ requiredMatrix 9 k9t4p15_step_6_data.required a b) 2 j = k9t4p15_local_6 2 j := by decide + +private theorem k9t4p15_local_6_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_6 a b ∪ requiredMatrix 9 k9t4p15_step_6_data.required a b) 3 j = k9t4p15_local_6 3 j := by decide + +private theorem k9t4p15_local_6_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_6 a b ∪ requiredMatrix 9 k9t4p15_step_6_data.required a b) 4 j = k9t4p15_local_6 4 j := by decide + +private theorem k9t4p15_local_6_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_6 a b ∪ requiredMatrix 9 k9t4p15_step_6_data.required a b) 5 j = k9t4p15_local_6 5 j := by decide + +private theorem k9t4p15_local_6_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_6 a b ∪ requiredMatrix 9 k9t4p15_step_6_data.required a b) 6 j = k9t4p15_local_6 6 j := by decide + +private theorem k9t4p15_local_6_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_6 a b ∪ requiredMatrix 9 k9t4p15_step_6_data.required a b) 7 j = k9t4p15_local_6 7 j := by decide + +private theorem k9t4p15_local_6_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_6 a b ∪ requiredMatrix 9 k9t4p15_step_6_data.required a b) 8 j = k9t4p15_local_6 8 j := by decide + +private theorem k9t4p15_local_6_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_6 a b ∪ requiredMatrix 9 k9t4p15_step_6_data.required a b) 9 j = k9t4p15_local_6 9 j := by decide + +private theorem k9t4p15_local_6_eq : (fun a b => freshMatrix k9t4p15_state_6 a b ∪ requiredMatrix 9 k9t4p15_step_6_data.required a b) = k9t4p15_local_6 := by + funext i j + fin_cases i + + · exact k9t4p15_local_6_eq_row_0 j + + · exact k9t4p15_local_6_eq_row_1 j + + · exact k9t4p15_local_6_eq_row_2 j + + · exact k9t4p15_local_6_eq_row_3 j + + · exact k9t4p15_local_6_eq_row_4 j + + · exact k9t4p15_local_6_eq_row_5 j + + · exact k9t4p15_local_6_eq_row_6 j + + · exact k9t4p15_local_6_eq_row_7 j + + · exact k9t4p15_local_6_eq_row_8 j + + · exact k9t4p15_local_6_eq_row_9 j + +private theorem k9t4p15_local_6_paths : ∀ p ∈ k9t4p15_step_6_data.required, p.Check (freshGraph k9t4p15.graph k9t4p15_step_6_data.i k9t4p15_step_6_data.j) 9 := by decide + +private theorem k9t4p15_local_6_bad : k9t4p15_step_6_data.bad.Check (freshGraph k9t4p15.graph k9t4p15_step_6_data.i k9t4p15_step_6_data.j) k9t4p15_local_6 9 4 := by decide + +private theorem k9t4p15_step_6_check : k9t4p15_step_6.Check k9t4p15.graph k9t4p15_state_6 9 4 := by + change k9t4p15_step_6_data.Check k9t4p15.graph k9t4p15_state_6 9 4 + refine ⟨by decide, k9t4p15_local_6_paths, ?_⟩ + rw [k9t4p15_local_6_eq] + exact k9t4p15_local_6_bad + +private theorem k9t4p15_update_6 : k9t4p15_step_6.apply k9t4p15_state_6 = k9t4p15_state_7 := by + have h : ∀ i j : Fin 9, k9t4p15_step_6.apply k9t4p15_state_6 i j = k9t4p15_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_8 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[{0, 2, 3, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_7 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 4, 5, 6, 7}, ∅, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, Finset.Icc 1 7, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, {1, 2, 4, 5, 6, 7}, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_7_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p15_state_7 a b ∪ requiredMatrix 9 k9t4p15_step_7_data.required a b) 0 j = k9t4p15_local_7 0 j := by decide + +private theorem k9t4p15_local_7_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p15_state_7 a b ∪ requiredMatrix 9 k9t4p15_step_7_data.required a b) 1 j = k9t4p15_local_7 1 j := by decide + +private theorem k9t4p15_local_7_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p15_state_7 a b ∪ requiredMatrix 9 k9t4p15_step_7_data.required a b) 2 j = k9t4p15_local_7 2 j := by decide + +private theorem k9t4p15_local_7_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p15_state_7 a b ∪ requiredMatrix 9 k9t4p15_step_7_data.required a b) 3 j = k9t4p15_local_7 3 j := by decide + +private theorem k9t4p15_local_7_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p15_state_7 a b ∪ requiredMatrix 9 k9t4p15_step_7_data.required a b) 4 j = k9t4p15_local_7 4 j := by decide + +private theorem k9t4p15_local_7_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p15_state_7 a b ∪ requiredMatrix 9 k9t4p15_step_7_data.required a b) 5 j = k9t4p15_local_7 5 j := by decide + +private theorem k9t4p15_local_7_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p15_state_7 a b ∪ requiredMatrix 9 k9t4p15_step_7_data.required a b) 6 j = k9t4p15_local_7 6 j := by decide + +private theorem k9t4p15_local_7_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p15_state_7 a b ∪ requiredMatrix 9 k9t4p15_step_7_data.required a b) 7 j = k9t4p15_local_7 7 j := by decide + +private theorem k9t4p15_local_7_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p15_state_7 a b ∪ requiredMatrix 9 k9t4p15_step_7_data.required a b) 8 j = k9t4p15_local_7 8 j := by decide + +private theorem k9t4p15_local_7_eq : (fun a b => k9t4p15_state_7 a b ∪ requiredMatrix 9 k9t4p15_step_7_data.required a b) = k9t4p15_local_7 := by + funext i j + fin_cases i + + · exact k9t4p15_local_7_eq_row_0 j + + · exact k9t4p15_local_7_eq_row_1 j + + · exact k9t4p15_local_7_eq_row_2 j + + · exact k9t4p15_local_7_eq_row_3 j + + · exact k9t4p15_local_7_eq_row_4 j + + · exact k9t4p15_local_7_eq_row_5 j + + · exact k9t4p15_local_7_eq_row_6 j + + · exact k9t4p15_local_7_eq_row_7 j + + · exact k9t4p15_local_7_eq_row_8 j + +private theorem k9t4p15_local_7_paths : ∀ p ∈ k9t4p15_step_7_data.required, p.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_7_data.i k9t4p15_step_7_data.j) 9 := by decide + +private theorem k9t4p15_local_7_bad : k9t4p15_step_7_data.bad.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_7_data.i k9t4p15_step_7_data.j) k9t4p15_local_7 9 4 := by decide + +private theorem k9t4p15_step_7_check : k9t4p15_step_7.Check k9t4p15.graph k9t4p15_state_7 9 4 := by + change k9t4p15_step_7_data.Check k9t4p15.graph k9t4p15_state_7 9 4 + refine ⟨k9t4p15_local_7_paths, ?_⟩ + rw [k9t4p15_local_7_eq] + exact k9t4p15_local_7_bad + +private theorem k9t4p15_update_7 : k9t4p15_step_7.apply k9t4p15_state_7 = k9t4p15_state_8 := by + have h : ∀ i j : Fin 9, k9t4p15_step_7.apply k9t4p15_state_7 i j = k9t4p15_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_9 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_8 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1}, Finset.Icc 0 5, {1}, {0, 1}, {0, 1}, {0, 1}, {1}, Finset.Icc 0 4, Finset.Icc 0 5], + #[{1}, ∅, {1, 2, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 0 5, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1}, {2}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 0 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, {0, 1, 4, 5, 6, 7}, {1, 2}], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, {1, 2}], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 2}], + #[{1}, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 7, {0, 1, 4, 5, 6, 7}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 5], + #[Finset.Icc 0 5, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, {1, 2, 3}, {1, 2}, {1, 2}, {0, 1, 2}, Finset.Icc 2 5, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_8_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, {2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, {2}, ∅, {2}, ∅, ∅, {0}, ∅, {0}, {3}], + #[∅, ∅, {2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, {0}, ∅, ∅, ∅, {0}, ∅, ∅, {5}], + #[∅, ∅, {3}, ∅, ∅, ∅, ∅, ∅, {5}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_8_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_0) 0 j = k9t4p15_local_8_required_0 0 j := by decide + +private theorem k9t4p15_local_8_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_0) 1 j = k9t4p15_local_8_required_0 1 j := by decide + +private theorem k9t4p15_local_8_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_0) 2 j = k9t4p15_local_8_required_0 2 j := by decide + +private theorem k9t4p15_local_8_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_0) 3 j = k9t4p15_local_8_required_0 3 j := by decide + +private theorem k9t4p15_local_8_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_0) 4 j = k9t4p15_local_8_required_0 4 j := by decide + +private theorem k9t4p15_local_8_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_0) 5 j = k9t4p15_local_8_required_0 5 j := by decide + +private theorem k9t4p15_local_8_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_0) 6 j = k9t4p15_local_8_required_0 6 j := by decide + +private theorem k9t4p15_local_8_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_0) 7 j = k9t4p15_local_8_required_0 7 j := by decide + +private theorem k9t4p15_local_8_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_0) 8 j = k9t4p15_local_8_required_0 8 j := by decide + +private theorem k9t4p15_local_8_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_0) 9 j = k9t4p15_local_8_required_0 9 j := by decide + +private theorem k9t4p15_local_8_required_0_eq : (requiredMatrix 9 k9t4p15_step_8_required_block_0) = k9t4p15_local_8_required_0 := by + funext i j + fin_cases i + + · exact k9t4p15_local_8_required_0_eq_row_0 j + + · exact k9t4p15_local_8_required_0_eq_row_1 j + + · exact k9t4p15_local_8_required_0_eq_row_2 j + + · exact k9t4p15_local_8_required_0_eq_row_3 j + + · exact k9t4p15_local_8_required_0_eq_row_4 j + + · exact k9t4p15_local_8_required_0_eq_row_5 j + + · exact k9t4p15_local_8_required_0_eq_row_6 j + + · exact k9t4p15_local_8_required_0_eq_row_7 j + + · exact k9t4p15_local_8_required_0_eq_row_8 j + + · exact k9t4p15_local_8_required_0_eq_row_9 j + +private theorem k9t4p15_local_8_path_0_0 : (⟨2, 0, [1, 3, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_0_1 : (⟨2, 0, [1, 3, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_0_2 : (⟨2, 3, [1, 0, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_0_3 : (⟨2, 8, [1, 0, 7, 6, 5, 4, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_0_4 : (⟨2, 6, [1, 0, 7, 8, 9, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_0_5 : (⟨2, 9, [3, 1, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_0_6 : (⟨2, 1, [3, 4, 9, 8, 7, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_0_7 : (⟨2, 0, [3, 9, 8, 7, 6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_0_8 : (⟨8, 6, [7, 0, 1, 2, 3, 9, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_0_9 : (⟨8, 9, [7, 0, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_0_10 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_0_11 : (⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_paths_block_0 : ∀ p ∈ k9t4p15_step_8_required_block_0, p.Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by + simp only [k9t4p15_step_8_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_8_path_0_0, k9t4p15_local_8_path_0_1, k9t4p15_local_8_path_0_2, k9t4p15_local_8_path_0_3, k9t4p15_local_8_path_0_4, k9t4p15_local_8_path_0_5, k9t4p15_local_8_path_0_6, k9t4p15_local_8_path_0_7, k9t4p15_local_8_path_0_8, k9t4p15_local_8_path_0_9, k9t4p15_local_8_path_0_10, k9t4p15_local_8_path_0_11⟩ + +private def k9t4p15_local_8_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {2, 3, 4}, {1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 3, 4}, ∅, {0}, {0}, {0, 1}, {0, 1}, {1}, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_8_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_1) 0 j = k9t4p15_local_8_required_1 0 j := by decide + +private theorem k9t4p15_local_8_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_1) 1 j = k9t4p15_local_8_required_1 1 j := by decide + +private theorem k9t4p15_local_8_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_1) 2 j = k9t4p15_local_8_required_1 2 j := by decide + +private theorem k9t4p15_local_8_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_1) 3 j = k9t4p15_local_8_required_1 3 j := by decide + +private theorem k9t4p15_local_8_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_1) 4 j = k9t4p15_local_8_required_1 4 j := by decide + +private theorem k9t4p15_local_8_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_1) 5 j = k9t4p15_local_8_required_1 5 j := by decide + +private theorem k9t4p15_local_8_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_1) 6 j = k9t4p15_local_8_required_1 6 j := by decide + +private theorem k9t4p15_local_8_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_1) 7 j = k9t4p15_local_8_required_1 7 j := by decide + +private theorem k9t4p15_local_8_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_1) 8 j = k9t4p15_local_8_required_1 8 j := by decide + +private theorem k9t4p15_local_8_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_1) 9 j = k9t4p15_local_8_required_1 9 j := by decide + +private theorem k9t4p15_local_8_required_1_eq : (requiredMatrix 9 k9t4p15_step_8_required_block_1) = k9t4p15_local_8_required_1 := by + funext i j + fin_cases i + + · exact k9t4p15_local_8_required_1_eq_row_0 j + + · exact k9t4p15_local_8_required_1_eq_row_1 j + + · exact k9t4p15_local_8_required_1_eq_row_2 j + + · exact k9t4p15_local_8_required_1_eq_row_3 j + + · exact k9t4p15_local_8_required_1_eq_row_4 j + + · exact k9t4p15_local_8_required_1_eq_row_5 j + + · exact k9t4p15_local_8_required_1_eq_row_6 j + + · exact k9t4p15_local_8_required_1_eq_row_7 j + + · exact k9t4p15_local_8_required_1_eq_row_8 j + + · exact k9t4p15_local_8_required_1_eq_row_9 j + +private theorem k9t4p15_local_8_path_1_0 : (⟨8, 0, [9, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_1_1 : (⟨8, 2, [9, 1, 0, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_1_2 : (⟨8, 4, [9, 3, 1, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_1_3 : (⟨8, 4, [9, 3, 2, 1, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_1_4 : (⟨8, 0, [9, 3, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_1_5 : (⟨8, 5, [9, 3, 4, 1, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_1_6 : (⟨8, 0, [9, 4, 3, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_1_7 : (⟨8, 6, [9, 4, 3, 2, 1, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_1_8 : (⟨8, 5, [9, 4, 3, 2, 1, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_1_9 : (⟨8, 3, [9, 4, 5, 6, 7, 0, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_1_10 : (⟨9, 0, [1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_1_11 : (⟨9, 0, [1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_paths_block_1 : ∀ p ∈ k9t4p15_step_8_required_block_1, p.Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by + simp only [k9t4p15_step_8_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_8_path_1_0, k9t4p15_local_8_path_1_1, k9t4p15_local_8_path_1_2, k9t4p15_local_8_path_1_3, k9t4p15_local_8_path_1_4, k9t4p15_local_8_path_1_5, k9t4p15_local_8_path_1_6, k9t4p15_local_8_path_1_7, k9t4p15_local_8_path_1_8, k9t4p15_local_8_path_1_9, k9t4p15_local_8_path_1_10, k9t4p15_local_8_path_1_11⟩ + +private def k9t4p15_local_8_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, {1}, {0, 4}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 4}, ∅, ∅, ∅, {1, 2}, {1, 2}, {0, 1, 2}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_8_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_2) 0 j = k9t4p15_local_8_required_2 0 j := by decide + +private theorem k9t4p15_local_8_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_2) 1 j = k9t4p15_local_8_required_2 1 j := by decide + +private theorem k9t4p15_local_8_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_2) 2 j = k9t4p15_local_8_required_2 2 j := by decide + +private theorem k9t4p15_local_8_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_2) 3 j = k9t4p15_local_8_required_2 3 j := by decide + +private theorem k9t4p15_local_8_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_2) 4 j = k9t4p15_local_8_required_2 4 j := by decide + +private theorem k9t4p15_local_8_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_2) 5 j = k9t4p15_local_8_required_2 5 j := by decide + +private theorem k9t4p15_local_8_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_2) 6 j = k9t4p15_local_8_required_2 6 j := by decide + +private theorem k9t4p15_local_8_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_2) 7 j = k9t4p15_local_8_required_2 7 j := by decide + +private theorem k9t4p15_local_8_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_2) 8 j = k9t4p15_local_8_required_2 8 j := by decide + +private theorem k9t4p15_local_8_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_2) 9 j = k9t4p15_local_8_required_2 9 j := by decide + +private theorem k9t4p15_local_8_required_2_eq : (requiredMatrix 9 k9t4p15_step_8_required_block_2) = k9t4p15_local_8_required_2 := by + funext i j + fin_cases i + + · exact k9t4p15_local_8_required_2_eq_row_0 j + + · exact k9t4p15_local_8_required_2_eq_row_1 j + + · exact k9t4p15_local_8_required_2_eq_row_2 j + + · exact k9t4p15_local_8_required_2_eq_row_3 j + + · exact k9t4p15_local_8_required_2_eq_row_4 j + + · exact k9t4p15_local_8_required_2_eq_row_5 j + + · exact k9t4p15_local_8_required_2_eq_row_6 j + + · exact k9t4p15_local_8_required_2_eq_row_7 j + + · exact k9t4p15_local_8_required_2_eq_row_8 j + + · exact k9t4p15_local_8_required_2_eq_row_9 j + +private theorem k9t4p15_local_8_path_2_0 : (⟨9, 4, [3, 1, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_2_1 : (⟨9, 4, [3, 2, 1, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_2_2 : (⟨9, 5, [3, 4, 1, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_2_3 : (⟨9, 6, [4, 3, 2, 1, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_2_4 : (⟨9, 5, [4, 3, 2, 1, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_2_5 : (⟨9, 0, [8, 7, 6, 5, 4, 3, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_2_6 : (⟨9, 6, [8, 7, 0, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_2_7 : (⟨9, 6, [8, 7, 0, 1, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_2_8 : (⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_2_9 : (⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_2_10 : (⟨0, 9, [1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_2_11 : (⟨0, 6, [1, 2, 3, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_paths_block_2 : ∀ p ∈ k9t4p15_step_8_required_block_2, p.Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by + simp only [k9t4p15_step_8_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_8_path_2_0, k9t4p15_local_8_path_2_1, k9t4p15_local_8_path_2_2, k9t4p15_local_8_path_2_3, k9t4p15_local_8_path_2_4, k9t4p15_local_8_path_2_5, k9t4p15_local_8_path_2_6, k9t4p15_local_8_path_2_7, k9t4p15_local_8_path_2_8, k9t4p15_local_8_path_2_9, k9t4p15_local_8_path_2_10, k9t4p15_local_8_path_2_11⟩ + +private def k9t4p15_local_8_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {0, 5}, {1}, {0, 1}, {0, 1}, ∅, {1}, {0}, {1, 2, 5}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_8_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_3) 0 j = k9t4p15_local_8_required_3 0 j := by decide + +private theorem k9t4p15_local_8_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_3) 1 j = k9t4p15_local_8_required_3 1 j := by decide + +private theorem k9t4p15_local_8_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_3) 2 j = k9t4p15_local_8_required_3 2 j := by decide + +private theorem k9t4p15_local_8_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_3) 3 j = k9t4p15_local_8_required_3 3 j := by decide + +private theorem k9t4p15_local_8_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_3) 4 j = k9t4p15_local_8_required_3 4 j := by decide + +private theorem k9t4p15_local_8_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_3) 5 j = k9t4p15_local_8_required_3 5 j := by decide + +private theorem k9t4p15_local_8_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_3) 6 j = k9t4p15_local_8_required_3 6 j := by decide + +private theorem k9t4p15_local_8_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_3) 7 j = k9t4p15_local_8_required_3 7 j := by decide + +private theorem k9t4p15_local_8_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_3) 8 j = k9t4p15_local_8_required_3 8 j := by decide + +private theorem k9t4p15_local_8_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_3) 9 j = k9t4p15_local_8_required_3 9 j := by decide + +private theorem k9t4p15_local_8_required_3_eq : (requiredMatrix 9 k9t4p15_step_8_required_block_3) = k9t4p15_local_8_required_3 := by + funext i j + fin_cases i + + · exact k9t4p15_local_8_required_3_eq_row_0 j + + · exact k9t4p15_local_8_required_3_eq_row_1 j + + · exact k9t4p15_local_8_required_3_eq_row_2 j + + · exact k9t4p15_local_8_required_3_eq_row_3 j + + · exact k9t4p15_local_8_required_3_eq_row_4 j + + · exact k9t4p15_local_8_required_3_eq_row_5 j + + · exact k9t4p15_local_8_required_3_eq_row_6 j + + · exact k9t4p15_local_8_required_3_eq_row_7 j + + · exact k9t4p15_local_8_required_3_eq_row_8 j + + · exact k9t4p15_local_8_required_3_eq_row_9 j + +private theorem k9t4p15_local_8_path_3_0 : (⟨0, 5, [1, 2, 3, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_3_1 : (⟨0, 9, [1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_3_2 : (⟨0, 7, [1, 2, 3, 9, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_3_3 : (⟨0, 8, [1, 2, 3, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_3_4 : (⟨0, 5, [1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_3_5 : (⟨0, 4, [1, 2, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_3_6 : (⟨0, 9, [1, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_3_7 : (⟨0, 4, [1, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_3_8 : (⟨0, 2, [1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_3_9 : (⟨0, 9, [1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_3_10 : (⟨0, 3, [1, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_3_11 : (⟨0, 2, [1, 4, 5, 6, 7, 8, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_paths_block_3 : ∀ p ∈ k9t4p15_step_8_required_block_3, p.Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by + simp only [k9t4p15_step_8_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_8_path_3_0, k9t4p15_local_8_path_3_1, k9t4p15_local_8_path_3_2, k9t4p15_local_8_path_3_3, k9t4p15_local_8_path_3_4, k9t4p15_local_8_path_3_5, k9t4p15_local_8_path_3_6, k9t4p15_local_8_path_3_7, k9t4p15_local_8_path_3_8, k9t4p15_local_8_path_3_9, k9t4p15_local_8_path_3_10, k9t4p15_local_8_path_3_11⟩ + +private def k9t4p15_local_8_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1}, Finset.Icc 1 4, ∅, ∅, ∅, {0}, ∅, ∅, {3}], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_8_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_4) 0 j = k9t4p15_local_8_required_4 0 j := by decide + +private theorem k9t4p15_local_8_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_4) 1 j = k9t4p15_local_8_required_4 1 j := by decide + +private theorem k9t4p15_local_8_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_4) 2 j = k9t4p15_local_8_required_4 2 j := by decide + +private theorem k9t4p15_local_8_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_4) 3 j = k9t4p15_local_8_required_4 3 j := by decide + +private theorem k9t4p15_local_8_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_4) 4 j = k9t4p15_local_8_required_4 4 j := by decide + +private theorem k9t4p15_local_8_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_4) 5 j = k9t4p15_local_8_required_4 5 j := by decide + +private theorem k9t4p15_local_8_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_4) 6 j = k9t4p15_local_8_required_4 6 j := by decide + +private theorem k9t4p15_local_8_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_4) 7 j = k9t4p15_local_8_required_4 7 j := by decide + +private theorem k9t4p15_local_8_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_4) 8 j = k9t4p15_local_8_required_4 8 j := by decide + +private theorem k9t4p15_local_8_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_8_required_block_4) 9 j = k9t4p15_local_8_required_4 9 j := by decide + +private theorem k9t4p15_local_8_required_4_eq : (requiredMatrix 9 k9t4p15_step_8_required_block_4) = k9t4p15_local_8_required_4 := by + funext i j + fin_cases i + + · exact k9t4p15_local_8_required_4_eq_row_0 j + + · exact k9t4p15_local_8_required_4_eq_row_1 j + + · exact k9t4p15_local_8_required_4_eq_row_2 j + + · exact k9t4p15_local_8_required_4_eq_row_3 j + + · exact k9t4p15_local_8_required_4_eq_row_4 j + + · exact k9t4p15_local_8_required_4_eq_row_5 j + + · exact k9t4p15_local_8_required_4_eq_row_6 j + + · exact k9t4p15_local_8_required_4_eq_row_7 j + + · exact k9t4p15_local_8_required_4_eq_row_8 j + + · exact k9t4p15_local_8_required_4_eq_row_9 j + +private theorem k9t4p15_local_8_path_4_0 : (⟨0, 2, [1, 4, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_4_1 : (⟨0, 2, [7, 6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_4_2 : (⟨0, 2, [7, 6, 5, 4, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_4_3 : (⟨0, 9, [7, 6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_4_4 : (⟨0, 2, [7, 6, 5, 4, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_4_5 : (⟨0, 1, [7, 6, 5, 4, 9, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_path_4_6 : (⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by decide + +private theorem k9t4p15_local_8_paths_block_4 : ∀ p ∈ k9t4p15_step_8_required_block_4, p.Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by + simp only [k9t4p15_step_8_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_8_path_4_0, k9t4p15_local_8_path_4_1, k9t4p15_local_8_path_4_2, k9t4p15_local_8_path_4_3, k9t4p15_local_8_path_4_4, k9t4p15_local_8_path_4_5, k9t4p15_local_8_path_4_6⟩ + +private theorem k9t4p15_local_8_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_8 a b ∪ (((((k9t4p15_local_8_required_0 a b ∪ k9t4p15_local_8_required_1 a b) ∪ k9t4p15_local_8_required_2 a b) ∪ k9t4p15_local_8_required_3 a b) ∪ k9t4p15_local_8_required_4 a b))) 0 j = k9t4p15_local_8 0 j := by decide + +private theorem k9t4p15_local_8_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_8 a b ∪ (((((k9t4p15_local_8_required_0 a b ∪ k9t4p15_local_8_required_1 a b) ∪ k9t4p15_local_8_required_2 a b) ∪ k9t4p15_local_8_required_3 a b) ∪ k9t4p15_local_8_required_4 a b))) 1 j = k9t4p15_local_8 1 j := by decide + +private theorem k9t4p15_local_8_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_8 a b ∪ (((((k9t4p15_local_8_required_0 a b ∪ k9t4p15_local_8_required_1 a b) ∪ k9t4p15_local_8_required_2 a b) ∪ k9t4p15_local_8_required_3 a b) ∪ k9t4p15_local_8_required_4 a b))) 2 j = k9t4p15_local_8 2 j := by decide + +private theorem k9t4p15_local_8_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_8 a b ∪ (((((k9t4p15_local_8_required_0 a b ∪ k9t4p15_local_8_required_1 a b) ∪ k9t4p15_local_8_required_2 a b) ∪ k9t4p15_local_8_required_3 a b) ∪ k9t4p15_local_8_required_4 a b))) 3 j = k9t4p15_local_8 3 j := by decide + +private theorem k9t4p15_local_8_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_8 a b ∪ (((((k9t4p15_local_8_required_0 a b ∪ k9t4p15_local_8_required_1 a b) ∪ k9t4p15_local_8_required_2 a b) ∪ k9t4p15_local_8_required_3 a b) ∪ k9t4p15_local_8_required_4 a b))) 4 j = k9t4p15_local_8 4 j := by decide + +private theorem k9t4p15_local_8_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_8 a b ∪ (((((k9t4p15_local_8_required_0 a b ∪ k9t4p15_local_8_required_1 a b) ∪ k9t4p15_local_8_required_2 a b) ∪ k9t4p15_local_8_required_3 a b) ∪ k9t4p15_local_8_required_4 a b))) 5 j = k9t4p15_local_8 5 j := by decide + +private theorem k9t4p15_local_8_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_8 a b ∪ (((((k9t4p15_local_8_required_0 a b ∪ k9t4p15_local_8_required_1 a b) ∪ k9t4p15_local_8_required_2 a b) ∪ k9t4p15_local_8_required_3 a b) ∪ k9t4p15_local_8_required_4 a b))) 6 j = k9t4p15_local_8 6 j := by decide + +private theorem k9t4p15_local_8_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_8 a b ∪ (((((k9t4p15_local_8_required_0 a b ∪ k9t4p15_local_8_required_1 a b) ∪ k9t4p15_local_8_required_2 a b) ∪ k9t4p15_local_8_required_3 a b) ∪ k9t4p15_local_8_required_4 a b))) 7 j = k9t4p15_local_8 7 j := by decide + +private theorem k9t4p15_local_8_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_8 a b ∪ (((((k9t4p15_local_8_required_0 a b ∪ k9t4p15_local_8_required_1 a b) ∪ k9t4p15_local_8_required_2 a b) ∪ k9t4p15_local_8_required_3 a b) ∪ k9t4p15_local_8_required_4 a b))) 8 j = k9t4p15_local_8 8 j := by decide + +private theorem k9t4p15_local_8_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_8 a b ∪ (((((k9t4p15_local_8_required_0 a b ∪ k9t4p15_local_8_required_1 a b) ∪ k9t4p15_local_8_required_2 a b) ∪ k9t4p15_local_8_required_3 a b) ∪ k9t4p15_local_8_required_4 a b))) 9 j = k9t4p15_local_8 9 j := by decide + +private theorem k9t4p15_local_8_merged_eq : (fun a b => freshMatrix k9t4p15_state_8 a b ∪ (((((k9t4p15_local_8_required_0 a b ∪ k9t4p15_local_8_required_1 a b) ∪ k9t4p15_local_8_required_2 a b) ∪ k9t4p15_local_8_required_3 a b) ∪ k9t4p15_local_8_required_4 a b))) = k9t4p15_local_8 := by + funext i j + fin_cases i + + · exact k9t4p15_local_8_merged_eq_row_0 j + + · exact k9t4p15_local_8_merged_eq_row_1 j + + · exact k9t4p15_local_8_merged_eq_row_2 j + + · exact k9t4p15_local_8_merged_eq_row_3 j + + · exact k9t4p15_local_8_merged_eq_row_4 j + + · exact k9t4p15_local_8_merged_eq_row_5 j + + · exact k9t4p15_local_8_merged_eq_row_6 j + + · exact k9t4p15_local_8_merged_eq_row_7 j + + · exact k9t4p15_local_8_merged_eq_row_8 j + + · exact k9t4p15_local_8_merged_eq_row_9 j + +private theorem k9t4p15_local_8_eq : (fun a b => freshMatrix k9t4p15_state_8 a b ∪ requiredMatrix 9 k9t4p15_step_8_data.required a b) = k9t4p15_local_8 := by + funext a b + change freshMatrix k9t4p15_state_8 a b ∪ requiredMatrix 9 (k9t4p15_step_8_required_block_0 ++ k9t4p15_step_8_required_block_1 ++ k9t4p15_step_8_required_block_2 ++ k9t4p15_step_8_required_block_3 ++ k9t4p15_step_8_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t4p15_local_8_required_0_eq, k9t4p15_local_8_required_1_eq, k9t4p15_local_8_required_2_eq, k9t4p15_local_8_required_3_eq, k9t4p15_local_8_required_4_eq] + exact congrFun (congrFun k9t4p15_local_8_merged_eq a) b + +private theorem k9t4p15_local_8_paths : ∀ p ∈ k9t4p15_step_8_data.required, p.Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 := by + change ∀ p ∈ (k9t4p15_step_8_required_block_0 ++ k9t4p15_step_8_required_block_1 ++ k9t4p15_step_8_required_block_2 ++ k9t4p15_step_8_required_block_3 ++ k9t4p15_step_8_required_block_4), p.Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t4p15_local_8_paths_block_0, k9t4p15_local_8_paths_block_1⟩, k9t4p15_local_8_paths_block_2⟩, k9t4p15_local_8_paths_block_3⟩, k9t4p15_local_8_paths_block_4⟩ + +private theorem k9t4p15_local_8_bad : k9t4p15_step_8_data.bad.Check (freshGraph k9t4p15.graph k9t4p15_step_8_data.i k9t4p15_step_8_data.j) k9t4p15_local_8 9 4 := by decide + +private theorem k9t4p15_step_8_check : k9t4p15_step_8.Check k9t4p15.graph k9t4p15_state_8 9 4 := by + change k9t4p15_step_8_data.Check k9t4p15.graph k9t4p15_state_8 9 4 + refine ⟨by decide, k9t4p15_local_8_paths, ?_⟩ + rw [k9t4p15_local_8_eq] + exact k9t4p15_local_8_bad + +private theorem k9t4p15_update_8 : k9t4p15_step_8.apply k9t4p15_state_8 = k9t4p15_state_9 := by + have h : ∀ i j : Fin 9, k9t4p15_step_8.apply k9t4p15_state_8 i j = k9t4p15_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_10 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_9 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 7, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, {1, 2, 4, 5, 6, 7}, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_9_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p15_state_9 a b ∪ requiredMatrix 9 k9t4p15_step_9_data.required a b) 0 j = k9t4p15_local_9 0 j := by decide + +private theorem k9t4p15_local_9_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p15_state_9 a b ∪ requiredMatrix 9 k9t4p15_step_9_data.required a b) 1 j = k9t4p15_local_9 1 j := by decide + +private theorem k9t4p15_local_9_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p15_state_9 a b ∪ requiredMatrix 9 k9t4p15_step_9_data.required a b) 2 j = k9t4p15_local_9 2 j := by decide + +private theorem k9t4p15_local_9_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p15_state_9 a b ∪ requiredMatrix 9 k9t4p15_step_9_data.required a b) 3 j = k9t4p15_local_9 3 j := by decide + +private theorem k9t4p15_local_9_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p15_state_9 a b ∪ requiredMatrix 9 k9t4p15_step_9_data.required a b) 4 j = k9t4p15_local_9 4 j := by decide + +private theorem k9t4p15_local_9_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p15_state_9 a b ∪ requiredMatrix 9 k9t4p15_step_9_data.required a b) 5 j = k9t4p15_local_9 5 j := by decide + +private theorem k9t4p15_local_9_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p15_state_9 a b ∪ requiredMatrix 9 k9t4p15_step_9_data.required a b) 6 j = k9t4p15_local_9 6 j := by decide + +private theorem k9t4p15_local_9_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p15_state_9 a b ∪ requiredMatrix 9 k9t4p15_step_9_data.required a b) 7 j = k9t4p15_local_9 7 j := by decide + +private theorem k9t4p15_local_9_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p15_state_9 a b ∪ requiredMatrix 9 k9t4p15_step_9_data.required a b) 8 j = k9t4p15_local_9 8 j := by decide + +private theorem k9t4p15_local_9_eq : (fun a b => k9t4p15_state_9 a b ∪ requiredMatrix 9 k9t4p15_step_9_data.required a b) = k9t4p15_local_9 := by + funext i j + fin_cases i + + · exact k9t4p15_local_9_eq_row_0 j + + · exact k9t4p15_local_9_eq_row_1 j + + · exact k9t4p15_local_9_eq_row_2 j + + · exact k9t4p15_local_9_eq_row_3 j + + · exact k9t4p15_local_9_eq_row_4 j + + · exact k9t4p15_local_9_eq_row_5 j + + · exact k9t4p15_local_9_eq_row_6 j + + · exact k9t4p15_local_9_eq_row_7 j + + · exact k9t4p15_local_9_eq_row_8 j + +private theorem k9t4p15_local_9_paths : ∀ p ∈ k9t4p15_step_9_data.required, p.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_9_data.i k9t4p15_step_9_data.j) 9 := by decide + +private theorem k9t4p15_local_9_bad : k9t4p15_step_9_data.bad.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_9_data.i k9t4p15_step_9_data.j) k9t4p15_local_9 9 4 := by decide + +private theorem k9t4p15_step_9_check : k9t4p15_step_9.Check k9t4p15.graph k9t4p15_state_9 9 4 := by + change k9t4p15_step_9_data.Check k9t4p15.graph k9t4p15_state_9 9 4 + refine ⟨k9t4p15_local_9_paths, ?_⟩ + rw [k9t4p15_local_9_eq] + exact k9t4p15_local_9_bad + +private theorem k9t4p15_update_9 : k9t4p15_step_9.apply k9t4p15_state_9 = k9t4p15_state_10 := by + have h : ∀ i j : Fin 9, k9t4p15_step_9.apply k9t4p15_state_9 i j = k9t4p15_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_11 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_10 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 7, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 1 7, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, {1, 2, 4, 5, 6, 7}, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_10_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p15_state_10 a b ∪ requiredMatrix 9 k9t4p15_step_10_data.required a b) 0 j = k9t4p15_local_10 0 j := by decide + +private theorem k9t4p15_local_10_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p15_state_10 a b ∪ requiredMatrix 9 k9t4p15_step_10_data.required a b) 1 j = k9t4p15_local_10 1 j := by decide + +private theorem k9t4p15_local_10_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p15_state_10 a b ∪ requiredMatrix 9 k9t4p15_step_10_data.required a b) 2 j = k9t4p15_local_10 2 j := by decide + +private theorem k9t4p15_local_10_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p15_state_10 a b ∪ requiredMatrix 9 k9t4p15_step_10_data.required a b) 3 j = k9t4p15_local_10 3 j := by decide + +private theorem k9t4p15_local_10_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p15_state_10 a b ∪ requiredMatrix 9 k9t4p15_step_10_data.required a b) 4 j = k9t4p15_local_10 4 j := by decide + +private theorem k9t4p15_local_10_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p15_state_10 a b ∪ requiredMatrix 9 k9t4p15_step_10_data.required a b) 5 j = k9t4p15_local_10 5 j := by decide + +private theorem k9t4p15_local_10_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p15_state_10 a b ∪ requiredMatrix 9 k9t4p15_step_10_data.required a b) 6 j = k9t4p15_local_10 6 j := by decide + +private theorem k9t4p15_local_10_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p15_state_10 a b ∪ requiredMatrix 9 k9t4p15_step_10_data.required a b) 7 j = k9t4p15_local_10 7 j := by decide + +private theorem k9t4p15_local_10_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p15_state_10 a b ∪ requiredMatrix 9 k9t4p15_step_10_data.required a b) 8 j = k9t4p15_local_10 8 j := by decide + +private theorem k9t4p15_local_10_eq : (fun a b => k9t4p15_state_10 a b ∪ requiredMatrix 9 k9t4p15_step_10_data.required a b) = k9t4p15_local_10 := by + funext i j + fin_cases i + + · exact k9t4p15_local_10_eq_row_0 j + + · exact k9t4p15_local_10_eq_row_1 j + + · exact k9t4p15_local_10_eq_row_2 j + + · exact k9t4p15_local_10_eq_row_3 j + + · exact k9t4p15_local_10_eq_row_4 j + + · exact k9t4p15_local_10_eq_row_5 j + + · exact k9t4p15_local_10_eq_row_6 j + + · exact k9t4p15_local_10_eq_row_7 j + + · exact k9t4p15_local_10_eq_row_8 j + +private theorem k9t4p15_local_10_paths : ∀ p ∈ k9t4p15_step_10_data.required, p.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_10_data.i k9t4p15_step_10_data.j) 9 := by decide + +private theorem k9t4p15_local_10_bad : k9t4p15_step_10_data.bad.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_10_data.i k9t4p15_step_10_data.j) k9t4p15_local_10 9 4 := by decide + +private theorem k9t4p15_step_10_check : k9t4p15_step_10.Check k9t4p15.graph k9t4p15_state_10 9 4 := by + change k9t4p15_step_10_data.Check k9t4p15.graph k9t4p15_state_10 9 4 + refine ⟨k9t4p15_local_10_paths, ?_⟩ + rw [k9t4p15_local_10_eq] + exact k9t4p15_local_10_bad + +private theorem k9t4p15_update_10 : k9t4p15_step_10.apply k9t4p15_state_10 = k9t4p15_state_11 := by + have h : ∀ i j : Fin 9, k9t4p15_step_10.apply k9t4p15_state_10 i j = k9t4p15_state_11 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_12 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_11 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1}, Finset.Icc 0 5, {1}, {0, 1}, {0, 1}, {0, 1}, {1}, Finset.Icc 0 4, Finset.Icc 0 5], + #[{1}, ∅, {1, 2, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 0 5, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 7], + #[{1}, {2}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 1 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, {0, 1, 4, 5, 6, 7}, {1, 2}], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, {1, 2}], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 2}], + #[{1}, Finset.Icc 0 6, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 7, {0, 1, 4, 5, 6, 7}, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 5], + #[Finset.Icc 0 5, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, {1, 2, 3}, {1, 2}, {1, 2}, {0, 1, 2}, Finset.Icc 2 5, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_11_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅, {0, 4}, ∅], + #[∅, ∅, {2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, {2}, ∅, {2}, ∅, ∅, {0}, ∅, {0}, {3}], + #[∅, ∅, {2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 4}, ∅, {0}, ∅, ∅, ∅, {0}, ∅, ∅, {5}], + #[∅, ∅, {3}, ∅, ∅, ∅, ∅, ∅, {5}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_11_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_0) 0 j = k9t4p15_local_11_required_0 0 j := by decide + +private theorem k9t4p15_local_11_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_0) 1 j = k9t4p15_local_11_required_0 1 j := by decide + +private theorem k9t4p15_local_11_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_0) 2 j = k9t4p15_local_11_required_0 2 j := by decide + +private theorem k9t4p15_local_11_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_0) 3 j = k9t4p15_local_11_required_0 3 j := by decide + +private theorem k9t4p15_local_11_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_0) 4 j = k9t4p15_local_11_required_0 4 j := by decide + +private theorem k9t4p15_local_11_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_0) 5 j = k9t4p15_local_11_required_0 5 j := by decide + +private theorem k9t4p15_local_11_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_0) 6 j = k9t4p15_local_11_required_0 6 j := by decide + +private theorem k9t4p15_local_11_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_0) 7 j = k9t4p15_local_11_required_0 7 j := by decide + +private theorem k9t4p15_local_11_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_0) 8 j = k9t4p15_local_11_required_0 8 j := by decide + +private theorem k9t4p15_local_11_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_0) 9 j = k9t4p15_local_11_required_0 9 j := by decide + +private theorem k9t4p15_local_11_required_0_eq : (requiredMatrix 9 k9t4p15_step_11_required_block_0) = k9t4p15_local_11_required_0 := by + funext i j + fin_cases i + + · exact k9t4p15_local_11_required_0_eq_row_0 j + + · exact k9t4p15_local_11_required_0_eq_row_1 j + + · exact k9t4p15_local_11_required_0_eq_row_2 j + + · exact k9t4p15_local_11_required_0_eq_row_3 j + + · exact k9t4p15_local_11_required_0_eq_row_4 j + + · exact k9t4p15_local_11_required_0_eq_row_5 j + + · exact k9t4p15_local_11_required_0_eq_row_6 j + + · exact k9t4p15_local_11_required_0_eq_row_7 j + + · exact k9t4p15_local_11_required_0_eq_row_8 j + + · exact k9t4p15_local_11_required_0_eq_row_9 j + +private theorem k9t4p15_local_11_path_0_0 : (⟨2, 8, [1, 3, 0, 7, 6, 5, 4, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_0_1 : (⟨2, 9, [1, 3, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_0_2 : (⟨2, 3, [1, 4, 9, 8, 7, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_0_3 : (⟨2, 0, [1, 9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_0_4 : (⟨2, 0, [1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_0_5 : (⟨2, 0, [1, 9, 8, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_0_6 : (⟨2, 6, [1, 9, 8, 7, 0, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_0_7 : (⟨2, 1, [3, 0, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_0_8 : (⟨8, 6, [7, 0, 3, 2, 1, 9, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_0_9 : (⟨8, 9, [7, 0, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_0_10 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_0_11 : (⟨8, 0, [9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_paths_block_0 : ∀ p ∈ k9t4p15_step_11_required_block_0, p.Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by + simp only [k9t4p15_step_11_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_11_path_0_0, k9t4p15_local_11_path_0_1, k9t4p15_local_11_path_0_2, k9t4p15_local_11_path_0_3, k9t4p15_local_11_path_0_4, k9t4p15_local_11_path_0_5, k9t4p15_local_11_path_0_6, k9t4p15_local_11_path_0_7, k9t4p15_local_11_path_0_8, k9t4p15_local_11_path_0_9, k9t4p15_local_11_path_0_10, k9t4p15_local_11_path_0_11⟩ + +private def k9t4p15_local_11_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2, 3}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, {2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 3}, {0}, {0}, ∅, {0, 1}, {0, 1}, {1}, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, {2}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_11_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_1) 0 j = k9t4p15_local_11_required_1 0 j := by decide + +private theorem k9t4p15_local_11_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_1) 1 j = k9t4p15_local_11_required_1 1 j := by decide + +private theorem k9t4p15_local_11_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_1) 2 j = k9t4p15_local_11_required_1 2 j := by decide + +private theorem k9t4p15_local_11_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_1) 3 j = k9t4p15_local_11_required_1 3 j := by decide + +private theorem k9t4p15_local_11_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_1) 4 j = k9t4p15_local_11_required_1 4 j := by decide + +private theorem k9t4p15_local_11_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_1) 5 j = k9t4p15_local_11_required_1 5 j := by decide + +private theorem k9t4p15_local_11_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_1) 6 j = k9t4p15_local_11_required_1 6 j := by decide + +private theorem k9t4p15_local_11_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_1) 7 j = k9t4p15_local_11_required_1 7 j := by decide + +private theorem k9t4p15_local_11_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_1) 8 j = k9t4p15_local_11_required_1 8 j := by decide + +private theorem k9t4p15_local_11_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_1) 9 j = k9t4p15_local_11_required_1 9 j := by decide + +private theorem k9t4p15_local_11_required_1_eq : (requiredMatrix 9 k9t4p15_step_11_required_block_1) = k9t4p15_local_11_required_1 := by + funext i j + fin_cases i + + · exact k9t4p15_local_11_required_1_eq_row_0 j + + · exact k9t4p15_local_11_required_1_eq_row_1 j + + · exact k9t4p15_local_11_required_1_eq_row_2 j + + · exact k9t4p15_local_11_required_1_eq_row_3 j + + · exact k9t4p15_local_11_required_1_eq_row_4 j + + · exact k9t4p15_local_11_required_1_eq_row_5 j + + · exact k9t4p15_local_11_required_1_eq_row_6 j + + · exact k9t4p15_local_11_required_1_eq_row_7 j + + · exact k9t4p15_local_11_required_1_eq_row_8 j + + · exact k9t4p15_local_11_required_1_eq_row_9 j + +private theorem k9t4p15_local_11_path_1_0 : (⟨8, 5, [9, 1, 2, 3, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_1_1 : (⟨8, 4, [9, 1, 2, 3, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_1_2 : (⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_1_3 : (⟨8, 4, [9, 1, 3, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_1_4 : (⟨8, 0, [9, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_1_5 : (⟨8, 2, [9, 1, 4, 5, 6, 7, 0, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_1_6 : (⟨8, 0, [9, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_1_7 : (⟨8, 6, [9, 4, 1, 2, 3, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_1_8 : (⟨8, 5, [9, 4, 1, 2, 3, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_1_9 : (⟨8, 1, [9, 4, 5, 6, 7, 0, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_1_10 : (⟨9, 0, [1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_1_11 : (⟨9, 5, [1, 2, 3, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_paths_block_1 : ∀ p ∈ k9t4p15_step_11_required_block_1, p.Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by + simp only [k9t4p15_step_11_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_11_path_1_0, k9t4p15_local_11_path_1_1, k9t4p15_local_11_path_1_2, k9t4p15_local_11_path_1_3, k9t4p15_local_11_path_1_4, k9t4p15_local_11_path_1_5, k9t4p15_local_11_path_1_6, k9t4p15_local_11_path_1_7, k9t4p15_local_11_path_1_8, k9t4p15_local_11_path_1_9, k9t4p15_local_11_path_1_10, k9t4p15_local_11_path_1_11⟩ + +private def k9t4p15_local_11_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, {1}, {0, 1, 2, 5}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2, 5}, ∅, ∅, ∅, {1, 2}, {1}, {0, 1, 2}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_11_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_2) 0 j = k9t4p15_local_11_required_2 0 j := by decide + +private theorem k9t4p15_local_11_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_2) 1 j = k9t4p15_local_11_required_2 1 j := by decide + +private theorem k9t4p15_local_11_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_2) 2 j = k9t4p15_local_11_required_2 2 j := by decide + +private theorem k9t4p15_local_11_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_2) 3 j = k9t4p15_local_11_required_2 3 j := by decide + +private theorem k9t4p15_local_11_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_2) 4 j = k9t4p15_local_11_required_2 4 j := by decide + +private theorem k9t4p15_local_11_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_2) 5 j = k9t4p15_local_11_required_2 5 j := by decide + +private theorem k9t4p15_local_11_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_2) 6 j = k9t4p15_local_11_required_2 6 j := by decide + +private theorem k9t4p15_local_11_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_2) 7 j = k9t4p15_local_11_required_2 7 j := by decide + +private theorem k9t4p15_local_11_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_2) 8 j = k9t4p15_local_11_required_2 8 j := by decide + +private theorem k9t4p15_local_11_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_2) 9 j = k9t4p15_local_11_required_2 9 j := by decide + +private theorem k9t4p15_local_11_required_2_eq : (requiredMatrix 9 k9t4p15_step_11_required_block_2) = k9t4p15_local_11_required_2 := by + funext i j + fin_cases i + + · exact k9t4p15_local_11_required_2_eq_row_0 j + + · exact k9t4p15_local_11_required_2_eq_row_1 j + + · exact k9t4p15_local_11_required_2_eq_row_2 j + + · exact k9t4p15_local_11_required_2_eq_row_3 j + + · exact k9t4p15_local_11_required_2_eq_row_4 j + + · exact k9t4p15_local_11_required_2_eq_row_5 j + + · exact k9t4p15_local_11_required_2_eq_row_6 j + + · exact k9t4p15_local_11_required_2_eq_row_7 j + + · exact k9t4p15_local_11_required_2_eq_row_8 j + + · exact k9t4p15_local_11_required_2_eq_row_9 j + +private theorem k9t4p15_local_11_path_2_0 : (⟨9, 4, [1, 2, 3, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_2_1 : (⟨9, 0, [1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_2_2 : (⟨9, 4, [1, 3, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_2_3 : (⟨9, 6, [4, 1, 2, 3, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_2_4 : (⟨9, 5, [4, 1, 2, 3, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_2_5 : (⟨9, 0, [8, 7, 6, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_2_6 : (⟨9, 6, [8, 7, 0, 3, 1, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_2_7 : (⟨9, 6, [8, 7, 0, 3, 2, 1, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_2_8 : (⟨0, 9, [3, 1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_2_9 : (⟨0, 9, [3, 1, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_2_10 : (⟨0, 5, [3, 1, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_2_11 : (⟨0, 8, [3, 1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_paths_block_2 : ∀ p ∈ k9t4p15_step_11_required_block_2, p.Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by + simp only [k9t4p15_step_11_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_11_path_2_0, k9t4p15_local_11_path_2_1, k9t4p15_local_11_path_2_2, k9t4p15_local_11_path_2_3, k9t4p15_local_11_path_2_4, k9t4p15_local_11_path_2_5, k9t4p15_local_11_path_2_6, k9t4p15_local_11_path_2_7, k9t4p15_local_11_path_2_8, k9t4p15_local_11_path_2_9, k9t4p15_local_11_path_2_10, k9t4p15_local_11_path_2_11⟩ + +private def k9t4p15_local_11_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1}, {0, 5}, ∅, {0, 1}, {0}, {1}, {1}, {0}, {0, 2, 4}], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 2, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_11_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_3) 0 j = k9t4p15_local_11_required_3 0 j := by decide + +private theorem k9t4p15_local_11_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_3) 1 j = k9t4p15_local_11_required_3 1 j := by decide + +private theorem k9t4p15_local_11_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_3) 2 j = k9t4p15_local_11_required_3 2 j := by decide + +private theorem k9t4p15_local_11_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_3) 3 j = k9t4p15_local_11_required_3 3 j := by decide + +private theorem k9t4p15_local_11_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_3) 4 j = k9t4p15_local_11_required_3 4 j := by decide + +private theorem k9t4p15_local_11_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_3) 5 j = k9t4p15_local_11_required_3 5 j := by decide + +private theorem k9t4p15_local_11_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_3) 6 j = k9t4p15_local_11_required_3 6 j := by decide + +private theorem k9t4p15_local_11_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_3) 7 j = k9t4p15_local_11_required_3 7 j := by decide + +private theorem k9t4p15_local_11_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_3) 8 j = k9t4p15_local_11_required_3 8 j := by decide + +private theorem k9t4p15_local_11_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_3) 9 j = k9t4p15_local_11_required_3 9 j := by decide + +private theorem k9t4p15_local_11_required_3_eq : (requiredMatrix 9 k9t4p15_step_11_required_block_3) = k9t4p15_local_11_required_3 := by + funext i j + fin_cases i + + · exact k9t4p15_local_11_required_3_eq_row_0 j + + · exact k9t4p15_local_11_required_3_eq_row_1 j + + · exact k9t4p15_local_11_required_3_eq_row_2 j + + · exact k9t4p15_local_11_required_3_eq_row_3 j + + · exact k9t4p15_local_11_required_3_eq_row_4 j + + · exact k9t4p15_local_11_required_3_eq_row_5 j + + · exact k9t4p15_local_11_required_3_eq_row_6 j + + · exact k9t4p15_local_11_required_3_eq_row_7 j + + · exact k9t4p15_local_11_required_3_eq_row_8 j + + · exact k9t4p15_local_11_required_3_eq_row_9 j + +private theorem k9t4p15_local_11_path_3_0 : (⟨0, 4, [3, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_3_1 : (⟨0, 9, [3, 2, 1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_3_2 : (⟨0, 9, [3, 2, 1, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_3_3 : (⟨0, 6, [3, 2, 1, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_3_4 : (⟨0, 5, [3, 2, 1, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_3_5 : (⟨0, 7, [3, 2, 1, 9, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_3_6 : (⟨0, 8, [3, 2, 1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_3_7 : (⟨0, 4, [3, 2, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_3_8 : (⟨0, 2, [3, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_3_9 : (⟨0, 9, [3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_3_10 : (⟨0, 1, [3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_3_11 : (⟨0, 2, [3, 4, 5, 6, 7, 8, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_paths_block_3 : ∀ p ∈ k9t4p15_step_11_required_block_3, p.Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by + simp only [k9t4p15_step_11_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_11_path_3_0, k9t4p15_local_11_path_3_1, k9t4p15_local_11_path_3_2, k9t4p15_local_11_path_3_3, k9t4p15_local_11_path_3_4, k9t4p15_local_11_path_3_5, k9t4p15_local_11_path_3_6, k9t4p15_local_11_path_3_7, k9t4p15_local_11_path_3_8, k9t4p15_local_11_path_3_9, k9t4p15_local_11_path_3_10, k9t4p15_local_11_path_3_11⟩ + +private def k9t4p15_local_11_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, Finset.Icc 1 4, {1}, ∅, ∅, {0}, ∅, ∅, {3}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_11_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_4) 0 j = k9t4p15_local_11_required_4 0 j := by decide + +private theorem k9t4p15_local_11_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_4) 1 j = k9t4p15_local_11_required_4 1 j := by decide + +private theorem k9t4p15_local_11_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_4) 2 j = k9t4p15_local_11_required_4 2 j := by decide + +private theorem k9t4p15_local_11_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_4) 3 j = k9t4p15_local_11_required_4 3 j := by decide + +private theorem k9t4p15_local_11_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_4) 4 j = k9t4p15_local_11_required_4 4 j := by decide + +private theorem k9t4p15_local_11_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_4) 5 j = k9t4p15_local_11_required_4 5 j := by decide + +private theorem k9t4p15_local_11_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_4) 6 j = k9t4p15_local_11_required_4 6 j := by decide + +private theorem k9t4p15_local_11_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_4) 7 j = k9t4p15_local_11_required_4 7 j := by decide + +private theorem k9t4p15_local_11_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_4) 8 j = k9t4p15_local_11_required_4 8 j := by decide + +private theorem k9t4p15_local_11_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_11_required_block_4) 9 j = k9t4p15_local_11_required_4 9 j := by decide + +private theorem k9t4p15_local_11_required_4_eq : (requiredMatrix 9 k9t4p15_step_11_required_block_4) = k9t4p15_local_11_required_4 := by + funext i j + fin_cases i + + · exact k9t4p15_local_11_required_4_eq_row_0 j + + · exact k9t4p15_local_11_required_4_eq_row_1 j + + · exact k9t4p15_local_11_required_4_eq_row_2 j + + · exact k9t4p15_local_11_required_4_eq_row_3 j + + · exact k9t4p15_local_11_required_4_eq_row_4 j + + · exact k9t4p15_local_11_required_4_eq_row_5 j + + · exact k9t4p15_local_11_required_4_eq_row_6 j + + · exact k9t4p15_local_11_required_4_eq_row_7 j + + · exact k9t4p15_local_11_required_4_eq_row_8 j + + · exact k9t4p15_local_11_required_4_eq_row_9 j + +private theorem k9t4p15_local_11_path_4_0 : (⟨0, 2, [3, 4, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_4_1 : (⟨0, 2, [7, 6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_4_2 : (⟨0, 2, [7, 6, 5, 4, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_4_3 : (⟨0, 9, [7, 6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_4_4 : (⟨0, 2, [7, 6, 5, 4, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_4_5 : (⟨0, 3, [7, 6, 5, 4, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_path_4_6 : (⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by decide + +private theorem k9t4p15_local_11_paths_block_4 : ∀ p ∈ k9t4p15_step_11_required_block_4, p.Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by + simp only [k9t4p15_step_11_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_11_path_4_0, k9t4p15_local_11_path_4_1, k9t4p15_local_11_path_4_2, k9t4p15_local_11_path_4_3, k9t4p15_local_11_path_4_4, k9t4p15_local_11_path_4_5, k9t4p15_local_11_path_4_6⟩ + +private theorem k9t4p15_local_11_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_11 a b ∪ (((((k9t4p15_local_11_required_0 a b ∪ k9t4p15_local_11_required_1 a b) ∪ k9t4p15_local_11_required_2 a b) ∪ k9t4p15_local_11_required_3 a b) ∪ k9t4p15_local_11_required_4 a b))) 0 j = k9t4p15_local_11 0 j := by decide + +private theorem k9t4p15_local_11_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_11 a b ∪ (((((k9t4p15_local_11_required_0 a b ∪ k9t4p15_local_11_required_1 a b) ∪ k9t4p15_local_11_required_2 a b) ∪ k9t4p15_local_11_required_3 a b) ∪ k9t4p15_local_11_required_4 a b))) 1 j = k9t4p15_local_11 1 j := by decide + +private theorem k9t4p15_local_11_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_11 a b ∪ (((((k9t4p15_local_11_required_0 a b ∪ k9t4p15_local_11_required_1 a b) ∪ k9t4p15_local_11_required_2 a b) ∪ k9t4p15_local_11_required_3 a b) ∪ k9t4p15_local_11_required_4 a b))) 2 j = k9t4p15_local_11 2 j := by decide + +private theorem k9t4p15_local_11_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_11 a b ∪ (((((k9t4p15_local_11_required_0 a b ∪ k9t4p15_local_11_required_1 a b) ∪ k9t4p15_local_11_required_2 a b) ∪ k9t4p15_local_11_required_3 a b) ∪ k9t4p15_local_11_required_4 a b))) 3 j = k9t4p15_local_11 3 j := by decide + +private theorem k9t4p15_local_11_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_11 a b ∪ (((((k9t4p15_local_11_required_0 a b ∪ k9t4p15_local_11_required_1 a b) ∪ k9t4p15_local_11_required_2 a b) ∪ k9t4p15_local_11_required_3 a b) ∪ k9t4p15_local_11_required_4 a b))) 4 j = k9t4p15_local_11 4 j := by decide + +private theorem k9t4p15_local_11_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_11 a b ∪ (((((k9t4p15_local_11_required_0 a b ∪ k9t4p15_local_11_required_1 a b) ∪ k9t4p15_local_11_required_2 a b) ∪ k9t4p15_local_11_required_3 a b) ∪ k9t4p15_local_11_required_4 a b))) 5 j = k9t4p15_local_11 5 j := by decide + +private theorem k9t4p15_local_11_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_11 a b ∪ (((((k9t4p15_local_11_required_0 a b ∪ k9t4p15_local_11_required_1 a b) ∪ k9t4p15_local_11_required_2 a b) ∪ k9t4p15_local_11_required_3 a b) ∪ k9t4p15_local_11_required_4 a b))) 6 j = k9t4p15_local_11 6 j := by decide + +private theorem k9t4p15_local_11_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_11 a b ∪ (((((k9t4p15_local_11_required_0 a b ∪ k9t4p15_local_11_required_1 a b) ∪ k9t4p15_local_11_required_2 a b) ∪ k9t4p15_local_11_required_3 a b) ∪ k9t4p15_local_11_required_4 a b))) 7 j = k9t4p15_local_11 7 j := by decide + +private theorem k9t4p15_local_11_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_11 a b ∪ (((((k9t4p15_local_11_required_0 a b ∪ k9t4p15_local_11_required_1 a b) ∪ k9t4p15_local_11_required_2 a b) ∪ k9t4p15_local_11_required_3 a b) ∪ k9t4p15_local_11_required_4 a b))) 8 j = k9t4p15_local_11 8 j := by decide + +private theorem k9t4p15_local_11_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_11 a b ∪ (((((k9t4p15_local_11_required_0 a b ∪ k9t4p15_local_11_required_1 a b) ∪ k9t4p15_local_11_required_2 a b) ∪ k9t4p15_local_11_required_3 a b) ∪ k9t4p15_local_11_required_4 a b))) 9 j = k9t4p15_local_11 9 j := by decide + +private theorem k9t4p15_local_11_merged_eq : (fun a b => freshMatrix k9t4p15_state_11 a b ∪ (((((k9t4p15_local_11_required_0 a b ∪ k9t4p15_local_11_required_1 a b) ∪ k9t4p15_local_11_required_2 a b) ∪ k9t4p15_local_11_required_3 a b) ∪ k9t4p15_local_11_required_4 a b))) = k9t4p15_local_11 := by + funext i j + fin_cases i + + · exact k9t4p15_local_11_merged_eq_row_0 j + + · exact k9t4p15_local_11_merged_eq_row_1 j + + · exact k9t4p15_local_11_merged_eq_row_2 j + + · exact k9t4p15_local_11_merged_eq_row_3 j + + · exact k9t4p15_local_11_merged_eq_row_4 j + + · exact k9t4p15_local_11_merged_eq_row_5 j + + · exact k9t4p15_local_11_merged_eq_row_6 j + + · exact k9t4p15_local_11_merged_eq_row_7 j + + · exact k9t4p15_local_11_merged_eq_row_8 j + + · exact k9t4p15_local_11_merged_eq_row_9 j + +private theorem k9t4p15_local_11_eq : (fun a b => freshMatrix k9t4p15_state_11 a b ∪ requiredMatrix 9 k9t4p15_step_11_data.required a b) = k9t4p15_local_11 := by + funext a b + change freshMatrix k9t4p15_state_11 a b ∪ requiredMatrix 9 (k9t4p15_step_11_required_block_0 ++ k9t4p15_step_11_required_block_1 ++ k9t4p15_step_11_required_block_2 ++ k9t4p15_step_11_required_block_3 ++ k9t4p15_step_11_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t4p15_local_11_required_0_eq, k9t4p15_local_11_required_1_eq, k9t4p15_local_11_required_2_eq, k9t4p15_local_11_required_3_eq, k9t4p15_local_11_required_4_eq] + exact congrFun (congrFun k9t4p15_local_11_merged_eq a) b + +private theorem k9t4p15_local_11_paths : ∀ p ∈ k9t4p15_step_11_data.required, p.Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 := by + change ∀ p ∈ (k9t4p15_step_11_required_block_0 ++ k9t4p15_step_11_required_block_1 ++ k9t4p15_step_11_required_block_2 ++ k9t4p15_step_11_required_block_3 ++ k9t4p15_step_11_required_block_4), p.Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t4p15_local_11_paths_block_0, k9t4p15_local_11_paths_block_1⟩, k9t4p15_local_11_paths_block_2⟩, k9t4p15_local_11_paths_block_3⟩, k9t4p15_local_11_paths_block_4⟩ + +private theorem k9t4p15_local_11_bad : k9t4p15_step_11_data.bad.Check (freshGraph k9t4p15.graph k9t4p15_step_11_data.i k9t4p15_step_11_data.j) k9t4p15_local_11 9 4 := by decide + +private theorem k9t4p15_step_11_check : k9t4p15_step_11.Check k9t4p15.graph k9t4p15_state_11 9 4 := by + change k9t4p15_step_11_data.Check k9t4p15.graph k9t4p15_state_11 9 4 + refine ⟨by decide, k9t4p15_local_11_paths, ?_⟩ + rw [k9t4p15_local_11_eq] + exact k9t4p15_local_11_bad + +private theorem k9t4p15_update_11 : k9t4p15_step_11.apply k9t4p15_state_11 = k9t4p15_state_12 := by + have h : ∀ i j : Fin 9, k9t4p15_step_11.apply k9t4p15_state_11 i j = k9t4p15_state_12 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_13 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 3, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_12 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {0, 1, 2}, ∅, ∅, {0, 1, 2}, {0, 1}, ∅, {0, 1, 2}, ∅], + #[∅, ∅, {1, 2, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{0, 1, 2}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[∅, {2}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 4 7, ∅], + #[{0, 1, 2}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 5, Finset.Icc 2 5, Finset.Icc 0 6, {1, 2}], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[{0, 1, 2}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, {1, 2}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_12_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_12 a b ∪ requiredMatrix 9 k9t4p15_step_12_data.required a b) 0 j = k9t4p15_local_12 0 j := by decide + +private theorem k9t4p15_local_12_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_12 a b ∪ requiredMatrix 9 k9t4p15_step_12_data.required a b) 1 j = k9t4p15_local_12 1 j := by decide + +private theorem k9t4p15_local_12_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_12 a b ∪ requiredMatrix 9 k9t4p15_step_12_data.required a b) 2 j = k9t4p15_local_12 2 j := by decide + +private theorem k9t4p15_local_12_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_12 a b ∪ requiredMatrix 9 k9t4p15_step_12_data.required a b) 3 j = k9t4p15_local_12 3 j := by decide + +private theorem k9t4p15_local_12_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_12 a b ∪ requiredMatrix 9 k9t4p15_step_12_data.required a b) 4 j = k9t4p15_local_12 4 j := by decide + +private theorem k9t4p15_local_12_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_12 a b ∪ requiredMatrix 9 k9t4p15_step_12_data.required a b) 5 j = k9t4p15_local_12 5 j := by decide + +private theorem k9t4p15_local_12_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_12 a b ∪ requiredMatrix 9 k9t4p15_step_12_data.required a b) 6 j = k9t4p15_local_12 6 j := by decide + +private theorem k9t4p15_local_12_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_12 a b ∪ requiredMatrix 9 k9t4p15_step_12_data.required a b) 7 j = k9t4p15_local_12 7 j := by decide + +private theorem k9t4p15_local_12_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_12 a b ∪ requiredMatrix 9 k9t4p15_step_12_data.required a b) 8 j = k9t4p15_local_12 8 j := by decide + +private theorem k9t4p15_local_12_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_12 a b ∪ requiredMatrix 9 k9t4p15_step_12_data.required a b) 9 j = k9t4p15_local_12 9 j := by decide + +private theorem k9t4p15_local_12_eq : (fun a b => freshMatrix k9t4p15_state_12 a b ∪ requiredMatrix 9 k9t4p15_step_12_data.required a b) = k9t4p15_local_12 := by + funext i j + fin_cases i + + · exact k9t4p15_local_12_eq_row_0 j + + · exact k9t4p15_local_12_eq_row_1 j + + · exact k9t4p15_local_12_eq_row_2 j + + · exact k9t4p15_local_12_eq_row_3 j + + · exact k9t4p15_local_12_eq_row_4 j + + · exact k9t4p15_local_12_eq_row_5 j + + · exact k9t4p15_local_12_eq_row_6 j + + · exact k9t4p15_local_12_eq_row_7 j + + · exact k9t4p15_local_12_eq_row_8 j + + · exact k9t4p15_local_12_eq_row_9 j + +private theorem k9t4p15_local_12_paths : ∀ p ∈ k9t4p15_step_12_data.required, p.Check (freshGraph k9t4p15.graph k9t4p15_step_12_data.i k9t4p15_step_12_data.j) 9 := by decide + +private theorem k9t4p15_local_12_bad : k9t4p15_step_12_data.bad.Check (freshGraph k9t4p15.graph k9t4p15_step_12_data.i k9t4p15_step_12_data.j) k9t4p15_local_12 9 4 := by decide + +private theorem k9t4p15_step_12_check : k9t4p15_step_12.Check k9t4p15.graph k9t4p15_state_12 9 4 := by + change k9t4p15_step_12_data.Check k9t4p15.graph k9t4p15_state_12 9 4 + refine ⟨by decide, k9t4p15_local_12_paths, ?_⟩ + rw [k9t4p15_local_12_eq] + exact k9t4p15_local_12_bad + +private theorem k9t4p15_update_12 : k9t4p15_step_12.apply k9t4p15_state_12 = k9t4p15_state_13 := by + have h : ∀ i j : Fin 9, k9t4p15_step_12.apply k9t4p15_state_12 i j = k9t4p15_state_13 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_14 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 3, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_13 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {2}, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 6, {1, 3, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_13_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p15_state_13 a b ∪ requiredMatrix 9 k9t4p15_step_13_data.required a b) 0 j = k9t4p15_local_13 0 j := by decide + +private theorem k9t4p15_local_13_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p15_state_13 a b ∪ requiredMatrix 9 k9t4p15_step_13_data.required a b) 1 j = k9t4p15_local_13 1 j := by decide + +private theorem k9t4p15_local_13_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p15_state_13 a b ∪ requiredMatrix 9 k9t4p15_step_13_data.required a b) 2 j = k9t4p15_local_13 2 j := by decide + +private theorem k9t4p15_local_13_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p15_state_13 a b ∪ requiredMatrix 9 k9t4p15_step_13_data.required a b) 3 j = k9t4p15_local_13 3 j := by decide + +private theorem k9t4p15_local_13_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p15_state_13 a b ∪ requiredMatrix 9 k9t4p15_step_13_data.required a b) 4 j = k9t4p15_local_13 4 j := by decide + +private theorem k9t4p15_local_13_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p15_state_13 a b ∪ requiredMatrix 9 k9t4p15_step_13_data.required a b) 5 j = k9t4p15_local_13 5 j := by decide + +private theorem k9t4p15_local_13_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p15_state_13 a b ∪ requiredMatrix 9 k9t4p15_step_13_data.required a b) 6 j = k9t4p15_local_13 6 j := by decide + +private theorem k9t4p15_local_13_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p15_state_13 a b ∪ requiredMatrix 9 k9t4p15_step_13_data.required a b) 7 j = k9t4p15_local_13 7 j := by decide + +private theorem k9t4p15_local_13_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p15_state_13 a b ∪ requiredMatrix 9 k9t4p15_step_13_data.required a b) 8 j = k9t4p15_local_13 8 j := by decide + +private theorem k9t4p15_local_13_eq : (fun a b => k9t4p15_state_13 a b ∪ requiredMatrix 9 k9t4p15_step_13_data.required a b) = k9t4p15_local_13 := by + funext i j + fin_cases i + + · exact k9t4p15_local_13_eq_row_0 j + + · exact k9t4p15_local_13_eq_row_1 j + + · exact k9t4p15_local_13_eq_row_2 j + + · exact k9t4p15_local_13_eq_row_3 j + + · exact k9t4p15_local_13_eq_row_4 j + + · exact k9t4p15_local_13_eq_row_5 j + + · exact k9t4p15_local_13_eq_row_6 j + + · exact k9t4p15_local_13_eq_row_7 j + + · exact k9t4p15_local_13_eq_row_8 j + +private theorem k9t4p15_local_13_paths : ∀ p ∈ k9t4p15_step_13_data.required, p.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_13_data.i k9t4p15_step_13_data.j) 9 := by decide + +private theorem k9t4p15_local_13_bad : k9t4p15_step_13_data.bad.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_13_data.i k9t4p15_step_13_data.j) k9t4p15_local_13 9 4 := by decide + +private theorem k9t4p15_step_13_check : k9t4p15_step_13.Check k9t4p15.graph k9t4p15_state_13 9 4 := by + change k9t4p15_step_13_data.Check k9t4p15.graph k9t4p15_state_13 9 4 + refine ⟨k9t4p15_local_13_paths, ?_⟩ + rw [k9t4p15_local_13_eq] + exact k9t4p15_local_13_bad + +private theorem k9t4p15_update_13 : k9t4p15_step_13.apply k9t4p15_state_13 = k9t4p15_state_14 := by + have h : ∀ i j : Fin 9, k9t4p15_step_13.apply k9t4p15_state_13 i j = k9t4p15_state_14 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_15 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 3, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_14 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, {0}, ∅, Finset.Icc 0 3, ∅, Finset.Icc 0 4, ∅], + #[Finset.Icc 0 4, ∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{0}, {1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{0}, {2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{0}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[∅, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1}], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, {1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_14_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, {0, 1}, ∅, {1}, {0, 1}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_14_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_0) 0 j = k9t4p15_local_14_required_0 0 j := by decide + +private theorem k9t4p15_local_14_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_0) 1 j = k9t4p15_local_14_required_0 1 j := by decide + +private theorem k9t4p15_local_14_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_0) 2 j = k9t4p15_local_14_required_0 2 j := by decide + +private theorem k9t4p15_local_14_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_0) 3 j = k9t4p15_local_14_required_0 3 j := by decide + +private theorem k9t4p15_local_14_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_0) 4 j = k9t4p15_local_14_required_0 4 j := by decide + +private theorem k9t4p15_local_14_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_0) 5 j = k9t4p15_local_14_required_0 5 j := by decide + +private theorem k9t4p15_local_14_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_0) 6 j = k9t4p15_local_14_required_0 6 j := by decide + +private theorem k9t4p15_local_14_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_0) 7 j = k9t4p15_local_14_required_0 7 j := by decide + +private theorem k9t4p15_local_14_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_0) 8 j = k9t4p15_local_14_required_0 8 j := by decide + +private theorem k9t4p15_local_14_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_0) 9 j = k9t4p15_local_14_required_0 9 j := by decide + +private theorem k9t4p15_local_14_required_0_eq : (requiredMatrix 9 k9t4p15_step_14_required_block_0) = k9t4p15_local_14_required_0 := by + funext i j + fin_cases i + + · exact k9t4p15_local_14_required_0_eq_row_0 j + + · exact k9t4p15_local_14_required_0_eq_row_1 j + + · exact k9t4p15_local_14_required_0_eq_row_2 j + + · exact k9t4p15_local_14_required_0_eq_row_3 j + + · exact k9t4p15_local_14_required_0_eq_row_4 j + + · exact k9t4p15_local_14_required_0_eq_row_5 j + + · exact k9t4p15_local_14_required_0_eq_row_6 j + + · exact k9t4p15_local_14_required_0_eq_row_7 j + + · exact k9t4p15_local_14_required_0_eq_row_8 j + + · exact k9t4p15_local_14_required_0_eq_row_9 j + +private theorem k9t4p15_local_14_path_0_0 : (⟨1, 0, [2, 3, 4, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_0_1 : (⟨1, 6, [2, 3, 4, 9, 8, 7, 0, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_0_2 : (⟨1, 0, [2, 3, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_0_3 : (⟨1, 6, [2, 3, 9, 4, 5, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_0_4 : (⟨1, 0, [9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_0_5 : (⟨6, 0, [5, 4, 1, 2, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_0_6 : (⟨6, 0, [5, 4, 1, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_0_7 : (⟨6, 0, [5, 4, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_0_8 : (⟨6, 0, [5, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_0_9 : (⟨6, 3, [5, 0, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_0_10 : (⟨6, 4, [5, 0, 7, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_0_11 : (⟨6, 4, [5, 0, 7, 8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_paths_block_0 : ∀ p ∈ k9t4p15_step_14_required_block_0, p.Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by + simp only [k9t4p15_step_14_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_14_path_0_0, k9t4p15_local_14_path_0_1, k9t4p15_local_14_path_0_2, k9t4p15_local_14_path_0_3, k9t4p15_local_14_path_0_4, k9t4p15_local_14_path_0_5, k9t4p15_local_14_path_0_6, k9t4p15_local_14_path_0_7, k9t4p15_local_14_path_0_8, k9t4p15_local_14_path_0_9, k9t4p15_local_14_path_0_10, k9t4p15_local_14_path_0_11⟩ + +private def k9t4p15_local_14_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, {0}, {0}, ∅, ∅, ∅, ∅, {0, 1}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_14_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_1) 0 j = k9t4p15_local_14_required_1 0 j := by decide + +private theorem k9t4p15_local_14_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_1) 1 j = k9t4p15_local_14_required_1 1 j := by decide + +private theorem k9t4p15_local_14_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_1) 2 j = k9t4p15_local_14_required_1 2 j := by decide + +private theorem k9t4p15_local_14_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_1) 3 j = k9t4p15_local_14_required_1 3 j := by decide + +private theorem k9t4p15_local_14_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_1) 4 j = k9t4p15_local_14_required_1 4 j := by decide + +private theorem k9t4p15_local_14_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_1) 5 j = k9t4p15_local_14_required_1 5 j := by decide + +private theorem k9t4p15_local_14_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_1) 6 j = k9t4p15_local_14_required_1 6 j := by decide + +private theorem k9t4p15_local_14_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_1) 7 j = k9t4p15_local_14_required_1 7 j := by decide + +private theorem k9t4p15_local_14_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_1) 8 j = k9t4p15_local_14_required_1 8 j := by decide + +private theorem k9t4p15_local_14_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_1) 9 j = k9t4p15_local_14_required_1 9 j := by decide + +private theorem k9t4p15_local_14_required_1_eq : (requiredMatrix 9 k9t4p15_step_14_required_block_1) = k9t4p15_local_14_required_1 := by + funext i j + fin_cases i + + · exact k9t4p15_local_14_required_1_eq_row_0 j + + · exact k9t4p15_local_14_required_1_eq_row_1 j + + · exact k9t4p15_local_14_required_1_eq_row_2 j + + · exact k9t4p15_local_14_required_1_eq_row_3 j + + · exact k9t4p15_local_14_required_1_eq_row_4 j + + · exact k9t4p15_local_14_required_1_eq_row_5 j + + · exact k9t4p15_local_14_required_1_eq_row_6 j + + · exact k9t4p15_local_14_required_1_eq_row_7 j + + · exact k9t4p15_local_14_required_1_eq_row_8 j + + · exact k9t4p15_local_14_required_1_eq_row_9 j + +private theorem k9t4p15_local_14_path_1_0 : (⟨6, 2, [5, 0, 7, 8, 9, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_1_1 : (⟨6, 1, [5, 0, 7, 8, 9, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_1_2 : (⟨6, 3, [5, 0, 7, 8, 9, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_1_3 : (⟨6, 1, [5, 0, 7, 8, 9, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_1_4 : (⟨6, 9, [7, 0, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_1_5 : (⟨6, 8, [7, 0, 5, 4, 1, 2, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_1_6 : (⟨6, 8, [7, 0, 5, 4, 1, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_1_7 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_1_8 : (⟨8, 0, [9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_1_9 : (⟨8, 6, [9, 1, 2, 3, 4, 5, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_1_10 : (⟨8, 0, [9, 1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_1_11 : (⟨8, 0, [9, 1, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_paths_block_1 : ∀ p ∈ k9t4p15_step_14_required_block_1, p.Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by + simp only [k9t4p15_step_14_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_14_path_1_0, k9t4p15_local_14_path_1_1, k9t4p15_local_14_path_1_2, k9t4p15_local_14_path_1_3, k9t4p15_local_14_path_1_4, k9t4p15_local_14_path_1_5, k9t4p15_local_14_path_1_6, k9t4p15_local_14_path_1_7, k9t4p15_local_14_path_1_8, k9t4p15_local_14_path_1_9, k9t4p15_local_14_path_1_10, k9t4p15_local_14_path_1_11⟩ + +private def k9t4p15_local_14_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, {0}, ∅, {0}, ∅, {0, 4}, ∅], + #[Finset.Icc 0 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 4}, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_14_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_2) 0 j = k9t4p15_local_14_required_2 0 j := by decide + +private theorem k9t4p15_local_14_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_2) 1 j = k9t4p15_local_14_required_2 1 j := by decide + +private theorem k9t4p15_local_14_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_2) 2 j = k9t4p15_local_14_required_2 2 j := by decide + +private theorem k9t4p15_local_14_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_2) 3 j = k9t4p15_local_14_required_2 3 j := by decide + +private theorem k9t4p15_local_14_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_2) 4 j = k9t4p15_local_14_required_2 4 j := by decide + +private theorem k9t4p15_local_14_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_2) 5 j = k9t4p15_local_14_required_2 5 j := by decide + +private theorem k9t4p15_local_14_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_2) 6 j = k9t4p15_local_14_required_2 6 j := by decide + +private theorem k9t4p15_local_14_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_2) 7 j = k9t4p15_local_14_required_2 7 j := by decide + +private theorem k9t4p15_local_14_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_2) 8 j = k9t4p15_local_14_required_2 8 j := by decide + +private theorem k9t4p15_local_14_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_14_required_block_2) 9 j = k9t4p15_local_14_required_2 9 j := by decide + +private theorem k9t4p15_local_14_required_2_eq : (requiredMatrix 9 k9t4p15_step_14_required_block_2) = k9t4p15_local_14_required_2 := by + funext i j + fin_cases i + + · exact k9t4p15_local_14_required_2_eq_row_0 j + + · exact k9t4p15_local_14_required_2_eq_row_1 j + + · exact k9t4p15_local_14_required_2_eq_row_2 j + + · exact k9t4p15_local_14_required_2_eq_row_3 j + + · exact k9t4p15_local_14_required_2_eq_row_4 j + + · exact k9t4p15_local_14_required_2_eq_row_5 j + + · exact k9t4p15_local_14_required_2_eq_row_6 j + + · exact k9t4p15_local_14_required_2_eq_row_7 j + + · exact k9t4p15_local_14_required_2_eq_row_8 j + + · exact k9t4p15_local_14_required_2_eq_row_9 j + +private theorem k9t4p15_local_14_path_2_0 : (⟨8, 6, [9, 1, 3, 4, 5, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_2_1 : (⟨8, 0, [9, 1, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_2_2 : (⟨0, 6, [5, 4, 1, 2, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_2_3 : (⟨0, 1, [5, 4, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_2_4 : (⟨0, 1, [5, 4, 9, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_2_5 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_2_6 : (⟨0, 2, [5, 6, 7, 8, 9, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_2_7 : (⟨0, 1, [5, 6, 7, 8, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_2_8 : (⟨0, 1, [5, 6, 7, 8, 9, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_2_9 : (⟨0, 3, [5, 6, 7, 8, 9, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_2_10 : (⟨0, 1, [5, 6, 7, 8, 9, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_path_2_11 : (⟨0, 8, [7, 6, 5, 4, 1, 2, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by decide + +private theorem k9t4p15_local_14_paths_block_2 : ∀ p ∈ k9t4p15_step_14_required_block_2, p.Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by + simp only [k9t4p15_step_14_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_14_path_2_0, k9t4p15_local_14_path_2_1, k9t4p15_local_14_path_2_2, k9t4p15_local_14_path_2_3, k9t4p15_local_14_path_2_4, k9t4p15_local_14_path_2_5, k9t4p15_local_14_path_2_6, k9t4p15_local_14_path_2_7, k9t4p15_local_14_path_2_8, k9t4p15_local_14_path_2_9, k9t4p15_local_14_path_2_10, k9t4p15_local_14_path_2_11⟩ + +private theorem k9t4p15_local_14_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_14 a b ∪ (((k9t4p15_local_14_required_0 a b ∪ k9t4p15_local_14_required_1 a b) ∪ k9t4p15_local_14_required_2 a b))) 0 j = k9t4p15_local_14 0 j := by decide + +private theorem k9t4p15_local_14_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_14 a b ∪ (((k9t4p15_local_14_required_0 a b ∪ k9t4p15_local_14_required_1 a b) ∪ k9t4p15_local_14_required_2 a b))) 1 j = k9t4p15_local_14 1 j := by decide + +private theorem k9t4p15_local_14_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_14 a b ∪ (((k9t4p15_local_14_required_0 a b ∪ k9t4p15_local_14_required_1 a b) ∪ k9t4p15_local_14_required_2 a b))) 2 j = k9t4p15_local_14 2 j := by decide + +private theorem k9t4p15_local_14_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_14 a b ∪ (((k9t4p15_local_14_required_0 a b ∪ k9t4p15_local_14_required_1 a b) ∪ k9t4p15_local_14_required_2 a b))) 3 j = k9t4p15_local_14 3 j := by decide + +private theorem k9t4p15_local_14_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_14 a b ∪ (((k9t4p15_local_14_required_0 a b ∪ k9t4p15_local_14_required_1 a b) ∪ k9t4p15_local_14_required_2 a b))) 4 j = k9t4p15_local_14 4 j := by decide + +private theorem k9t4p15_local_14_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_14 a b ∪ (((k9t4p15_local_14_required_0 a b ∪ k9t4p15_local_14_required_1 a b) ∪ k9t4p15_local_14_required_2 a b))) 5 j = k9t4p15_local_14 5 j := by decide + +private theorem k9t4p15_local_14_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_14 a b ∪ (((k9t4p15_local_14_required_0 a b ∪ k9t4p15_local_14_required_1 a b) ∪ k9t4p15_local_14_required_2 a b))) 6 j = k9t4p15_local_14 6 j := by decide + +private theorem k9t4p15_local_14_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_14 a b ∪ (((k9t4p15_local_14_required_0 a b ∪ k9t4p15_local_14_required_1 a b) ∪ k9t4p15_local_14_required_2 a b))) 7 j = k9t4p15_local_14 7 j := by decide + +private theorem k9t4p15_local_14_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_14 a b ∪ (((k9t4p15_local_14_required_0 a b ∪ k9t4p15_local_14_required_1 a b) ∪ k9t4p15_local_14_required_2 a b))) 8 j = k9t4p15_local_14 8 j := by decide + +private theorem k9t4p15_local_14_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_14 a b ∪ (((k9t4p15_local_14_required_0 a b ∪ k9t4p15_local_14_required_1 a b) ∪ k9t4p15_local_14_required_2 a b))) 9 j = k9t4p15_local_14 9 j := by decide + +private theorem k9t4p15_local_14_merged_eq : (fun a b => freshMatrix k9t4p15_state_14 a b ∪ (((k9t4p15_local_14_required_0 a b ∪ k9t4p15_local_14_required_1 a b) ∪ k9t4p15_local_14_required_2 a b))) = k9t4p15_local_14 := by + funext i j + fin_cases i + + · exact k9t4p15_local_14_merged_eq_row_0 j + + · exact k9t4p15_local_14_merged_eq_row_1 j + + · exact k9t4p15_local_14_merged_eq_row_2 j + + · exact k9t4p15_local_14_merged_eq_row_3 j + + · exact k9t4p15_local_14_merged_eq_row_4 j + + · exact k9t4p15_local_14_merged_eq_row_5 j + + · exact k9t4p15_local_14_merged_eq_row_6 j + + · exact k9t4p15_local_14_merged_eq_row_7 j + + · exact k9t4p15_local_14_merged_eq_row_8 j + + · exact k9t4p15_local_14_merged_eq_row_9 j + +private theorem k9t4p15_local_14_eq : (fun a b => freshMatrix k9t4p15_state_14 a b ∪ requiredMatrix 9 k9t4p15_step_14_data.required a b) = k9t4p15_local_14 := by + funext a b + change freshMatrix k9t4p15_state_14 a b ∪ requiredMatrix 9 (k9t4p15_step_14_required_block_0 ++ k9t4p15_step_14_required_block_1 ++ k9t4p15_step_14_required_block_2) a b = _ + simp only [requiredMatrix_append, k9t4p15_local_14_required_0_eq, k9t4p15_local_14_required_1_eq, k9t4p15_local_14_required_2_eq] + exact congrFun (congrFun k9t4p15_local_14_merged_eq a) b + +private theorem k9t4p15_local_14_paths : ∀ p ∈ k9t4p15_step_14_data.required, p.Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 := by + change ∀ p ∈ (k9t4p15_step_14_required_block_0 ++ k9t4p15_step_14_required_block_1 ++ k9t4p15_step_14_required_block_2), p.Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨k9t4p15_local_14_paths_block_0, k9t4p15_local_14_paths_block_1⟩, k9t4p15_local_14_paths_block_2⟩ + +private theorem k9t4p15_local_14_bad : k9t4p15_step_14_data.bad.Check (freshGraph k9t4p15.graph k9t4p15_step_14_data.i k9t4p15_step_14_data.j) k9t4p15_local_14 9 4 := by decide + +private theorem k9t4p15_step_14_check : k9t4p15_step_14.Check k9t4p15.graph k9t4p15_state_14 9 4 := by + change k9t4p15_step_14_data.Check k9t4p15.graph k9t4p15_state_14 9 4 + refine ⟨by decide, k9t4p15_local_14_paths, ?_⟩ + rw [k9t4p15_local_14_eq] + exact k9t4p15_local_14_bad + +private theorem k9t4p15_update_14 : k9t4p15_step_14.apply k9t4p15_state_14 = k9t4p15_state_15 := by + have h : ∀ i j : Fin 9, k9t4p15_step_14.apply k9t4p15_state_14 i j = k9t4p15_state_15 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_16 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 3, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, {1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_15 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, {0, 1}, Finset.Icc 0 5, ∅, Finset.Icc 0 4, Finset.Icc 0 4, ∅, {0, 1}], + #[{0, 1}, ∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{0, 1}, {1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{0, 1}, {2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 0 5, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 4 7, ∅], + #[∅, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1}], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5], + #[∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, {0, 1}, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_15_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, Finset.Icc 1 4, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, {1}, {0, 1, 2}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_15_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_0) 0 j = k9t4p15_local_15_required_0 0 j := by decide + +private theorem k9t4p15_local_15_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_0) 1 j = k9t4p15_local_15_required_0 1 j := by decide + +private theorem k9t4p15_local_15_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_0) 2 j = k9t4p15_local_15_required_0 2 j := by decide + +private theorem k9t4p15_local_15_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_0) 3 j = k9t4p15_local_15_required_0 3 j := by decide + +private theorem k9t4p15_local_15_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_0) 4 j = k9t4p15_local_15_required_0 4 j := by decide + +private theorem k9t4p15_local_15_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_0) 5 j = k9t4p15_local_15_required_0 5 j := by decide + +private theorem k9t4p15_local_15_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_0) 6 j = k9t4p15_local_15_required_0 6 j := by decide + +private theorem k9t4p15_local_15_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_0) 7 j = k9t4p15_local_15_required_0 7 j := by decide + +private theorem k9t4p15_local_15_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_0) 8 j = k9t4p15_local_15_required_0 8 j := by decide + +private theorem k9t4p15_local_15_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_0) 9 j = k9t4p15_local_15_required_0 9 j := by decide + +private theorem k9t4p15_local_15_required_0_eq : (requiredMatrix 9 k9t4p15_step_15_required_block_0) = k9t4p15_local_15_required_0 := by + funext i j + fin_cases i + + · exact k9t4p15_local_15_required_0_eq_row_0 j + + · exact k9t4p15_local_15_required_0_eq_row_1 j + + · exact k9t4p15_local_15_required_0_eq_row_2 j + + · exact k9t4p15_local_15_required_0_eq_row_3 j + + · exact k9t4p15_local_15_required_0_eq_row_4 j + + · exact k9t4p15_local_15_required_0_eq_row_5 j + + · exact k9t4p15_local_15_required_0_eq_row_6 j + + · exact k9t4p15_local_15_required_0_eq_row_7 j + + · exact k9t4p15_local_15_required_0_eq_row_8 j + + · exact k9t4p15_local_15_required_0_eq_row_9 j + +private theorem k9t4p15_local_15_path_0_0 : (⟨4, 0, [1, 2, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_0_1 : (⟨4, 6, [1, 2, 3, 9, 8, 0, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_0_2 : (⟨4, 7, [1, 2, 3, 9, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_0_3 : (⟨4, 0, [1, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_0_4 : (⟨4, 7, [1, 3, 9, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_0_5 : (⟨4, 0, [1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_0_6 : (⟨4, 7, [1, 9, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_0_7 : (⟨6, 0, [5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_0_8 : (⟨6, 0, [5, 4, 1, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_0_9 : (⟨6, 0, [5, 4, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_0_10 : (⟨6, 0, [5, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_0_11 : (⟨6, 4, [5, 0, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_paths_block_0 : ∀ p ∈ k9t4p15_step_15_required_block_0, p.Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by + simp only [k9t4p15_step_15_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_15_path_0_0, k9t4p15_local_15_path_0_1, k9t4p15_local_15_path_0_2, k9t4p15_local_15_path_0_3, k9t4p15_local_15_path_0_4, k9t4p15_local_15_path_0_5, k9t4p15_local_15_path_0_6, k9t4p15_local_15_path_0_7, k9t4p15_local_15_path_0_8, k9t4p15_local_15_path_0_9, k9t4p15_local_15_path_0_10, k9t4p15_local_15_path_0_11⟩ + +private def k9t4p15_local_15_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, {0}, Finset.Icc 0 3, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, {0, 1}, {0}, {0, 1}, ∅, ∅, ∅, ∅, ∅, {0, 1}], + #[Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_15_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_1) 0 j = k9t4p15_local_15_required_1 0 j := by decide + +private theorem k9t4p15_local_15_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_1) 1 j = k9t4p15_local_15_required_1 1 j := by decide + +private theorem k9t4p15_local_15_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_1) 2 j = k9t4p15_local_15_required_1 2 j := by decide + +private theorem k9t4p15_local_15_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_1) 3 j = k9t4p15_local_15_required_1 3 j := by decide + +private theorem k9t4p15_local_15_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_1) 4 j = k9t4p15_local_15_required_1 4 j := by decide + +private theorem k9t4p15_local_15_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_1) 5 j = k9t4p15_local_15_required_1 5 j := by decide + +private theorem k9t4p15_local_15_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_1) 6 j = k9t4p15_local_15_required_1 6 j := by decide + +private theorem k9t4p15_local_15_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_1) 7 j = k9t4p15_local_15_required_1 7 j := by decide + +private theorem k9t4p15_local_15_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_1) 8 j = k9t4p15_local_15_required_1 8 j := by decide + +private theorem k9t4p15_local_15_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_1) 9 j = k9t4p15_local_15_required_1 9 j := by decide + +private theorem k9t4p15_local_15_required_1_eq : (requiredMatrix 9 k9t4p15_step_15_required_block_1) = k9t4p15_local_15_required_1 := by + funext i j + fin_cases i + + · exact k9t4p15_local_15_required_1_eq_row_0 j + + · exact k9t4p15_local_15_required_1_eq_row_1 j + + · exact k9t4p15_local_15_required_1_eq_row_2 j + + · exact k9t4p15_local_15_required_1_eq_row_3 j + + · exact k9t4p15_local_15_required_1_eq_row_4 j + + · exact k9t4p15_local_15_required_1_eq_row_5 j + + · exact k9t4p15_local_15_required_1_eq_row_6 j + + · exact k9t4p15_local_15_required_1_eq_row_7 j + + · exact k9t4p15_local_15_required_1_eq_row_8 j + + · exact k9t4p15_local_15_required_1_eq_row_9 j + +private theorem k9t4p15_local_15_path_1_0 : (⟨6, 3, [5, 0, 8, 9, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_1_1 : (⟨6, 1, [5, 0, 8, 9, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_1_2 : (⟨6, 0, [7, 8, 9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_1_3 : (⟨6, 9, [7, 8, 0, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_1_4 : (⟨6, 9, [7, 8, 0, 5, 4, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_1_5 : (⟨6, 2, [7, 8, 0, 5, 4, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_1_6 : (⟨6, 3, [7, 8, 0, 5, 4, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_1_7 : (⟨6, 1, [7, 8, 0, 5, 4, 9, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_1_8 : (⟨7, 0, [6, 5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_1_9 : (⟨7, 0, [6, 5, 4, 1, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_1_10 : (⟨7, 0, [6, 5, 4, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_1_11 : (⟨7, 0, [6, 5, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_paths_block_1 : ∀ p ∈ k9t4p15_step_15_required_block_1, p.Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by + simp only [k9t4p15_step_15_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_15_path_1_0, k9t4p15_local_15_path_1_1, k9t4p15_local_15_path_1_2, k9t4p15_local_15_path_1_3, k9t4p15_local_15_path_1_4, k9t4p15_local_15_path_1_5, k9t4p15_local_15_path_1_6, k9t4p15_local_15_path_1_7, k9t4p15_local_15_path_1_8, k9t4p15_local_15_path_1_9, k9t4p15_local_15_path_1_10, k9t4p15_local_15_path_1_11⟩ + +private def k9t4p15_local_15_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, {0}, {1, 4}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 4}, {0, 1}, {0}, {0, 1}, {0, 1, 2}, ∅, ∅, ∅, ∅, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_15_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_2) 0 j = k9t4p15_local_15_required_2 0 j := by decide + +private theorem k9t4p15_local_15_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_2) 1 j = k9t4p15_local_15_required_2 1 j := by decide + +private theorem k9t4p15_local_15_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_2) 2 j = k9t4p15_local_15_required_2 2 j := by decide + +private theorem k9t4p15_local_15_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_2) 3 j = k9t4p15_local_15_required_2 3 j := by decide + +private theorem k9t4p15_local_15_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_2) 4 j = k9t4p15_local_15_required_2 4 j := by decide + +private theorem k9t4p15_local_15_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_2) 5 j = k9t4p15_local_15_required_2 5 j := by decide + +private theorem k9t4p15_local_15_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_2) 6 j = k9t4p15_local_15_required_2 6 j := by decide + +private theorem k9t4p15_local_15_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_2) 7 j = k9t4p15_local_15_required_2 7 j := by decide + +private theorem k9t4p15_local_15_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_2) 8 j = k9t4p15_local_15_required_2 8 j := by decide + +private theorem k9t4p15_local_15_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_2) 9 j = k9t4p15_local_15_required_2 9 j := by decide + +private theorem k9t4p15_local_15_required_2_eq : (requiredMatrix 9 k9t4p15_step_15_required_block_2) = k9t4p15_local_15_required_2 := by + funext i j + fin_cases i + + · exact k9t4p15_local_15_required_2_eq_row_0 j + + · exact k9t4p15_local_15_required_2_eq_row_1 j + + · exact k9t4p15_local_15_required_2_eq_row_2 j + + · exact k9t4p15_local_15_required_2_eq_row_3 j + + · exact k9t4p15_local_15_required_2_eq_row_4 j + + · exact k9t4p15_local_15_required_2_eq_row_5 j + + · exact k9t4p15_local_15_required_2_eq_row_6 j + + · exact k9t4p15_local_15_required_2_eq_row_7 j + + · exact k9t4p15_local_15_required_2_eq_row_8 j + + · exact k9t4p15_local_15_required_2_eq_row_9 j + +private theorem k9t4p15_local_15_path_2_0 : (⟨7, 3, [6, 5, 0, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_2_1 : (⟨7, 4, [6, 5, 0, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_2_2 : (⟨7, 4, [6, 5, 0, 8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_2_3 : (⟨7, 4, [6, 5, 0, 8, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_2_4 : (⟨7, 2, [6, 5, 0, 8, 9, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_2_5 : (⟨7, 1, [6, 5, 0, 8, 9, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_2_6 : (⟨7, 3, [6, 5, 0, 8, 9, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_2_7 : (⟨7, 1, [6, 5, 0, 8, 9, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_2_8 : (⟨7, 0, [8, 9, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_2_9 : (⟨7, 9, [8, 0, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_2_10 : (⟨0, 7, [5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_2_11 : (⟨0, 6, [5, 4, 1, 2, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_paths_block_2 : ∀ p ∈ k9t4p15_step_15_required_block_2, p.Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by + simp only [k9t4p15_step_15_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_15_path_2_0, k9t4p15_local_15_path_2_1, k9t4p15_local_15_path_2_2, k9t4p15_local_15_path_2_3, k9t4p15_local_15_path_2_4, k9t4p15_local_15_path_2_5, k9t4p15_local_15_path_2_6, k9t4p15_local_15_path_2_7, k9t4p15_local_15_path_2_8, k9t4p15_local_15_path_2_9, k9t4p15_local_15_path_2_10, k9t4p15_local_15_path_2_11⟩ + +private def k9t4p15_local_15_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, {0, 1}, Finset.Icc 0 3, ∅, {1}, ∅, ∅, {0}], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_15_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_3) 0 j = k9t4p15_local_15_required_3 0 j := by decide + +private theorem k9t4p15_local_15_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_3) 1 j = k9t4p15_local_15_required_3 1 j := by decide + +private theorem k9t4p15_local_15_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_3) 2 j = k9t4p15_local_15_required_3 2 j := by decide + +private theorem k9t4p15_local_15_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_3) 3 j = k9t4p15_local_15_required_3 3 j := by decide + +private theorem k9t4p15_local_15_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_3) 4 j = k9t4p15_local_15_required_3 4 j := by decide + +private theorem k9t4p15_local_15_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_3) 5 j = k9t4p15_local_15_required_3 5 j := by decide + +private theorem k9t4p15_local_15_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_3) 6 j = k9t4p15_local_15_required_3 6 j := by decide + +private theorem k9t4p15_local_15_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_3) 7 j = k9t4p15_local_15_required_3 7 j := by decide + +private theorem k9t4p15_local_15_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_3) 8 j = k9t4p15_local_15_required_3 8 j := by decide + +private theorem k9t4p15_local_15_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_3) 9 j = k9t4p15_local_15_required_3 9 j := by decide + +private theorem k9t4p15_local_15_required_3_eq : (requiredMatrix 9 k9t4p15_step_15_required_block_3) = k9t4p15_local_15_required_3 := by + funext i j + fin_cases i + + · exact k9t4p15_local_15_required_3_eq_row_0 j + + · exact k9t4p15_local_15_required_3_eq_row_1 j + + · exact k9t4p15_local_15_required_3_eq_row_2 j + + · exact k9t4p15_local_15_required_3_eq_row_3 j + + · exact k9t4p15_local_15_required_3_eq_row_4 j + + · exact k9t4p15_local_15_required_3_eq_row_5 j + + · exact k9t4p15_local_15_required_3_eq_row_6 j + + · exact k9t4p15_local_15_required_3_eq_row_7 j + + · exact k9t4p15_local_15_required_3_eq_row_8 j + + · exact k9t4p15_local_15_required_3_eq_row_9 j + +private theorem k9t4p15_local_15_path_3_0 : (⟨0, 6, [5, 4, 1, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_3_1 : (⟨0, 3, [5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_3_2 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_3_3 : (⟨0, 2, [5, 6, 7, 8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_3_4 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_3_5 : (⟨0, 4, [5, 6, 7, 8, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_3_6 : (⟨0, 2, [5, 6, 7, 8, 9, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_3_7 : (⟨0, 1, [5, 6, 7, 8, 9, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_3_8 : (⟨0, 4, [5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_3_9 : (⟨0, 3, [5, 6, 7, 8, 9, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_3_10 : (⟨0, 1, [5, 6, 7, 8, 9, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_3_11 : (⟨0, 9, [8, 7, 6, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_paths_block_3 : ∀ p ∈ k9t4p15_step_15_required_block_3, p.Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by + simp only [k9t4p15_step_15_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_15_path_3_0, k9t4p15_local_15_path_3_1, k9t4p15_local_15_path_3_2, k9t4p15_local_15_path_3_3, k9t4p15_local_15_path_3_4, k9t4p15_local_15_path_3_5, k9t4p15_local_15_path_3_6, k9t4p15_local_15_path_3_7, k9t4p15_local_15_path_3_8, k9t4p15_local_15_path_3_9, k9t4p15_local_15_path_3_10, k9t4p15_local_15_path_3_11⟩ + +private def k9t4p15_local_15_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {4, 5}, ∅, ∅, {0}, ∅, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_15_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_4) 0 j = k9t4p15_local_15_required_4 0 j := by decide + +private theorem k9t4p15_local_15_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_4) 1 j = k9t4p15_local_15_required_4 1 j := by decide + +private theorem k9t4p15_local_15_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_4) 2 j = k9t4p15_local_15_required_4 2 j := by decide + +private theorem k9t4p15_local_15_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_4) 3 j = k9t4p15_local_15_required_4 3 j := by decide + +private theorem k9t4p15_local_15_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_4) 4 j = k9t4p15_local_15_required_4 4 j := by decide + +private theorem k9t4p15_local_15_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_4) 5 j = k9t4p15_local_15_required_4 5 j := by decide + +private theorem k9t4p15_local_15_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_4) 6 j = k9t4p15_local_15_required_4 6 j := by decide + +private theorem k9t4p15_local_15_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_4) 7 j = k9t4p15_local_15_required_4 7 j := by decide + +private theorem k9t4p15_local_15_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_4) 8 j = k9t4p15_local_15_required_4 8 j := by decide + +private theorem k9t4p15_local_15_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_15_required_block_4) 9 j = k9t4p15_local_15_required_4 9 j := by decide + +private theorem k9t4p15_local_15_required_4_eq : (requiredMatrix 9 k9t4p15_step_15_required_block_4) = k9t4p15_local_15_required_4 := by + funext i j + fin_cases i + + · exact k9t4p15_local_15_required_4_eq_row_0 j + + · exact k9t4p15_local_15_required_4_eq_row_1 j + + · exact k9t4p15_local_15_required_4_eq_row_2 j + + · exact k9t4p15_local_15_required_4_eq_row_3 j + + · exact k9t4p15_local_15_required_4_eq_row_4 j + + · exact k9t4p15_local_15_required_4_eq_row_5 j + + · exact k9t4p15_local_15_required_4_eq_row_6 j + + · exact k9t4p15_local_15_required_4_eq_row_7 j + + · exact k9t4p15_local_15_required_4_eq_row_8 j + + · exact k9t4p15_local_15_required_4_eq_row_9 j + +private theorem k9t4p15_local_15_path_4_0 : (⟨0, 9, [8, 7, 6, 5, 4, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_4_1 : (⟨0, 7, [8, 9, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_4_2 : (⟨0, 4, [8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_path_4_3 : (⟨0, 4, [8, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by decide + +private theorem k9t4p15_local_15_paths_block_4 : ∀ p ∈ k9t4p15_step_15_required_block_4, p.Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by + simp only [k9t4p15_step_15_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_15_path_4_0, k9t4p15_local_15_path_4_1, k9t4p15_local_15_path_4_2, k9t4p15_local_15_path_4_3⟩ + +private theorem k9t4p15_local_15_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_15 a b ∪ (((((k9t4p15_local_15_required_0 a b ∪ k9t4p15_local_15_required_1 a b) ∪ k9t4p15_local_15_required_2 a b) ∪ k9t4p15_local_15_required_3 a b) ∪ k9t4p15_local_15_required_4 a b))) 0 j = k9t4p15_local_15 0 j := by decide + +private theorem k9t4p15_local_15_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_15 a b ∪ (((((k9t4p15_local_15_required_0 a b ∪ k9t4p15_local_15_required_1 a b) ∪ k9t4p15_local_15_required_2 a b) ∪ k9t4p15_local_15_required_3 a b) ∪ k9t4p15_local_15_required_4 a b))) 1 j = k9t4p15_local_15 1 j := by decide + +private theorem k9t4p15_local_15_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_15 a b ∪ (((((k9t4p15_local_15_required_0 a b ∪ k9t4p15_local_15_required_1 a b) ∪ k9t4p15_local_15_required_2 a b) ∪ k9t4p15_local_15_required_3 a b) ∪ k9t4p15_local_15_required_4 a b))) 2 j = k9t4p15_local_15 2 j := by decide + +private theorem k9t4p15_local_15_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_15 a b ∪ (((((k9t4p15_local_15_required_0 a b ∪ k9t4p15_local_15_required_1 a b) ∪ k9t4p15_local_15_required_2 a b) ∪ k9t4p15_local_15_required_3 a b) ∪ k9t4p15_local_15_required_4 a b))) 3 j = k9t4p15_local_15 3 j := by decide + +private theorem k9t4p15_local_15_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_15 a b ∪ (((((k9t4p15_local_15_required_0 a b ∪ k9t4p15_local_15_required_1 a b) ∪ k9t4p15_local_15_required_2 a b) ∪ k9t4p15_local_15_required_3 a b) ∪ k9t4p15_local_15_required_4 a b))) 4 j = k9t4p15_local_15 4 j := by decide + +private theorem k9t4p15_local_15_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_15 a b ∪ (((((k9t4p15_local_15_required_0 a b ∪ k9t4p15_local_15_required_1 a b) ∪ k9t4p15_local_15_required_2 a b) ∪ k9t4p15_local_15_required_3 a b) ∪ k9t4p15_local_15_required_4 a b))) 5 j = k9t4p15_local_15 5 j := by decide + +private theorem k9t4p15_local_15_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_15 a b ∪ (((((k9t4p15_local_15_required_0 a b ∪ k9t4p15_local_15_required_1 a b) ∪ k9t4p15_local_15_required_2 a b) ∪ k9t4p15_local_15_required_3 a b) ∪ k9t4p15_local_15_required_4 a b))) 6 j = k9t4p15_local_15 6 j := by decide + +private theorem k9t4p15_local_15_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_15 a b ∪ (((((k9t4p15_local_15_required_0 a b ∪ k9t4p15_local_15_required_1 a b) ∪ k9t4p15_local_15_required_2 a b) ∪ k9t4p15_local_15_required_3 a b) ∪ k9t4p15_local_15_required_4 a b))) 7 j = k9t4p15_local_15 7 j := by decide + +private theorem k9t4p15_local_15_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_15 a b ∪ (((((k9t4p15_local_15_required_0 a b ∪ k9t4p15_local_15_required_1 a b) ∪ k9t4p15_local_15_required_2 a b) ∪ k9t4p15_local_15_required_3 a b) ∪ k9t4p15_local_15_required_4 a b))) 8 j = k9t4p15_local_15 8 j := by decide + +private theorem k9t4p15_local_15_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_15 a b ∪ (((((k9t4p15_local_15_required_0 a b ∪ k9t4p15_local_15_required_1 a b) ∪ k9t4p15_local_15_required_2 a b) ∪ k9t4p15_local_15_required_3 a b) ∪ k9t4p15_local_15_required_4 a b))) 9 j = k9t4p15_local_15 9 j := by decide + +private theorem k9t4p15_local_15_merged_eq : (fun a b => freshMatrix k9t4p15_state_15 a b ∪ (((((k9t4p15_local_15_required_0 a b ∪ k9t4p15_local_15_required_1 a b) ∪ k9t4p15_local_15_required_2 a b) ∪ k9t4p15_local_15_required_3 a b) ∪ k9t4p15_local_15_required_4 a b))) = k9t4p15_local_15 := by + funext i j + fin_cases i + + · exact k9t4p15_local_15_merged_eq_row_0 j + + · exact k9t4p15_local_15_merged_eq_row_1 j + + · exact k9t4p15_local_15_merged_eq_row_2 j + + · exact k9t4p15_local_15_merged_eq_row_3 j + + · exact k9t4p15_local_15_merged_eq_row_4 j + + · exact k9t4p15_local_15_merged_eq_row_5 j + + · exact k9t4p15_local_15_merged_eq_row_6 j + + · exact k9t4p15_local_15_merged_eq_row_7 j + + · exact k9t4p15_local_15_merged_eq_row_8 j + + · exact k9t4p15_local_15_merged_eq_row_9 j + +private theorem k9t4p15_local_15_eq : (fun a b => freshMatrix k9t4p15_state_15 a b ∪ requiredMatrix 9 k9t4p15_step_15_data.required a b) = k9t4p15_local_15 := by + funext a b + change freshMatrix k9t4p15_state_15 a b ∪ requiredMatrix 9 (k9t4p15_step_15_required_block_0 ++ k9t4p15_step_15_required_block_1 ++ k9t4p15_step_15_required_block_2 ++ k9t4p15_step_15_required_block_3 ++ k9t4p15_step_15_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t4p15_local_15_required_0_eq, k9t4p15_local_15_required_1_eq, k9t4p15_local_15_required_2_eq, k9t4p15_local_15_required_3_eq, k9t4p15_local_15_required_4_eq] + exact congrFun (congrFun k9t4p15_local_15_merged_eq a) b + +private theorem k9t4p15_local_15_paths : ∀ p ∈ k9t4p15_step_15_data.required, p.Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 := by + change ∀ p ∈ (k9t4p15_step_15_required_block_0 ++ k9t4p15_step_15_required_block_1 ++ k9t4p15_step_15_required_block_2 ++ k9t4p15_step_15_required_block_3 ++ k9t4p15_step_15_required_block_4), p.Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t4p15_local_15_paths_block_0, k9t4p15_local_15_paths_block_1⟩, k9t4p15_local_15_paths_block_2⟩, k9t4p15_local_15_paths_block_3⟩, k9t4p15_local_15_paths_block_4⟩ + +private theorem k9t4p15_local_15_bad : k9t4p15_step_15_data.bad.Check (freshGraph k9t4p15.graph k9t4p15_step_15_data.i k9t4p15_step_15_data.j) k9t4p15_local_15 9 4 := by decide + +private theorem k9t4p15_step_15_check : k9t4p15_step_15.Check k9t4p15.graph k9t4p15_state_15 9 4 := by + change k9t4p15_step_15_data.Check k9t4p15.graph k9t4p15_state_15 9 4 + refine ⟨by decide, k9t4p15_local_15_paths, ?_⟩ + rw [k9t4p15_local_15_eq] + exact k9t4p15_local_15_bad + +private theorem k9t4p15_update_15 : k9t4p15_step_15.apply k9t4p15_state_15 = k9t4p15_state_16 := by + have h : ∀ i j : Fin 9, k9t4p15_step_15.apply k9t4p15_state_15 i j = k9t4p15_state_16 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_17 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 3, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, {1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_16 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 8], + #[{1, 2, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 3, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 6], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, {1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[Finset.Icc 1 8, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_16_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p15_state_16 a b ∪ requiredMatrix 9 k9t4p15_step_16_data.required a b) 0 j = k9t4p15_local_16 0 j := by decide + +private theorem k9t4p15_local_16_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p15_state_16 a b ∪ requiredMatrix 9 k9t4p15_step_16_data.required a b) 1 j = k9t4p15_local_16 1 j := by decide + +private theorem k9t4p15_local_16_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p15_state_16 a b ∪ requiredMatrix 9 k9t4p15_step_16_data.required a b) 2 j = k9t4p15_local_16 2 j := by decide + +private theorem k9t4p15_local_16_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p15_state_16 a b ∪ requiredMatrix 9 k9t4p15_step_16_data.required a b) 3 j = k9t4p15_local_16 3 j := by decide + +private theorem k9t4p15_local_16_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p15_state_16 a b ∪ requiredMatrix 9 k9t4p15_step_16_data.required a b) 4 j = k9t4p15_local_16 4 j := by decide + +private theorem k9t4p15_local_16_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p15_state_16 a b ∪ requiredMatrix 9 k9t4p15_step_16_data.required a b) 5 j = k9t4p15_local_16 5 j := by decide + +private theorem k9t4p15_local_16_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p15_state_16 a b ∪ requiredMatrix 9 k9t4p15_step_16_data.required a b) 6 j = k9t4p15_local_16 6 j := by decide + +private theorem k9t4p15_local_16_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p15_state_16 a b ∪ requiredMatrix 9 k9t4p15_step_16_data.required a b) 7 j = k9t4p15_local_16 7 j := by decide + +private theorem k9t4p15_local_16_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p15_state_16 a b ∪ requiredMatrix 9 k9t4p15_step_16_data.required a b) 8 j = k9t4p15_local_16 8 j := by decide + +private theorem k9t4p15_local_16_eq : (fun a b => k9t4p15_state_16 a b ∪ requiredMatrix 9 k9t4p15_step_16_data.required a b) = k9t4p15_local_16 := by + funext i j + fin_cases i + + · exact k9t4p15_local_16_eq_row_0 j + + · exact k9t4p15_local_16_eq_row_1 j + + · exact k9t4p15_local_16_eq_row_2 j + + · exact k9t4p15_local_16_eq_row_3 j + + · exact k9t4p15_local_16_eq_row_4 j + + · exact k9t4p15_local_16_eq_row_5 j + + · exact k9t4p15_local_16_eq_row_6 j + + · exact k9t4p15_local_16_eq_row_7 j + + · exact k9t4p15_local_16_eq_row_8 j + +private theorem k9t4p15_local_16_paths : ∀ p ∈ k9t4p15_step_16_data.required, p.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_16_data.i k9t4p15_step_16_data.j) 9 := by decide + +private theorem k9t4p15_local_16_bad : k9t4p15_step_16_data.bad.Check (addedEdgeGraph k9t4p15.graph k9t4p15_step_16_data.i k9t4p15_step_16_data.j) k9t4p15_local_16 9 4 := by decide + +private theorem k9t4p15_step_16_check : k9t4p15_step_16.Check k9t4p15.graph k9t4p15_state_16 9 4 := by + change k9t4p15_step_16_data.Check k9t4p15.graph k9t4p15_state_16 9 4 + refine ⟨k9t4p15_local_16_paths, ?_⟩ + rw [k9t4p15_local_16_eq] + exact k9t4p15_local_16_bad + +private theorem k9t4p15_update_16 : k9t4p15_step_16.apply k9t4p15_state_16 = k9t4p15_state_17 := by + have h : ∀ i j : Fin 9, k9t4p15_step_16.apply k9t4p15_state_16 i j = k9t4p15_state_17 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_18 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 3, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_17 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, ∅, Finset.Icc 0 4, ∅, Finset.Icc 0 3, ∅, {0}], + #[Finset.Icc 0 4, ∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{0}, {1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{0}, {2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 3, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 0 4, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5, 6}, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5], + #[∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, {1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 0 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_17_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, ∅, Finset.Icc 0 4, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_17_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_0) 0 j = k9t4p15_local_17_required_0 0 j := by decide + +private theorem k9t4p15_local_17_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_0) 1 j = k9t4p15_local_17_required_0 1 j := by decide + +private theorem k9t4p15_local_17_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_0) 2 j = k9t4p15_local_17_required_0 2 j := by decide + +private theorem k9t4p15_local_17_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_0) 3 j = k9t4p15_local_17_required_0 3 j := by decide + +private theorem k9t4p15_local_17_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_0) 4 j = k9t4p15_local_17_required_0 4 j := by decide + +private theorem k9t4p15_local_17_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_0) 5 j = k9t4p15_local_17_required_0 5 j := by decide + +private theorem k9t4p15_local_17_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_0) 6 j = k9t4p15_local_17_required_0 6 j := by decide + +private theorem k9t4p15_local_17_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_0) 7 j = k9t4p15_local_17_required_0 7 j := by decide + +private theorem k9t4p15_local_17_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_0) 8 j = k9t4p15_local_17_required_0 8 j := by decide + +private theorem k9t4p15_local_17_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_0) 9 j = k9t4p15_local_17_required_0 9 j := by decide + +private theorem k9t4p15_local_17_required_0_eq : (requiredMatrix 9 k9t4p15_step_17_required_block_0) = k9t4p15_local_17_required_0 := by + funext i j + fin_cases i + + · exact k9t4p15_local_17_required_0_eq_row_0 j + + · exact k9t4p15_local_17_required_0_eq_row_1 j + + · exact k9t4p15_local_17_required_0_eq_row_2 j + + · exact k9t4p15_local_17_required_0_eq_row_3 j + + · exact k9t4p15_local_17_required_0_eq_row_4 j + + · exact k9t4p15_local_17_required_0_eq_row_5 j + + · exact k9t4p15_local_17_required_0_eq_row_6 j + + · exact k9t4p15_local_17_required_0_eq_row_7 j + + · exact k9t4p15_local_17_required_0_eq_row_8 j + + · exact k9t4p15_local_17_required_0_eq_row_9 j + +private theorem k9t4p15_local_17_path_0_0 : (⟨1, 0, [2, 3, 9, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_0_1 : (⟨1, 7, [2, 3, 9, 4, 5, 6, 0, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_0_2 : (⟨1, 0, [9, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_0_3 : (⟨1, 7, [9, 3, 4, 5, 6, 0, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_0_4 : (⟨1, 0, [9, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_0_5 : (⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_0_6 : (⟨5, 7, [4, 1, 2, 3, 9, 8, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_0_7 : (⟨5, 0, [4, 1, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_0_8 : (⟨5, 0, [4, 1, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_0_9 : (⟨5, 7, [4, 1, 3, 9, 8, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_0_10 : (⟨5, 0, [4, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_0_11 : (⟨5, 0, [4, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_paths_block_0 : ∀ p ∈ k9t4p15_step_17_required_block_0, p.Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by + simp only [k9t4p15_step_17_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_17_path_0_0, k9t4p15_local_17_path_0_1, k9t4p15_local_17_path_0_2, k9t4p15_local_17_path_0_3, k9t4p15_local_17_path_0_4, k9t4p15_local_17_path_0_5, k9t4p15_local_17_path_0_6, k9t4p15_local_17_path_0_7, k9t4p15_local_17_path_0_8, k9t4p15_local_17_path_0_9, k9t4p15_local_17_path_0_10, k9t4p15_local_17_path_0_11⟩ + +private def k9t4p15_local_17_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, {1}, {0}, {1}, {1}, {0, 1}, ∅, ∅, ∅, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_17_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_1) 0 j = k9t4p15_local_17_required_1 0 j := by decide + +private theorem k9t4p15_local_17_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_1) 1 j = k9t4p15_local_17_required_1 1 j := by decide + +private theorem k9t4p15_local_17_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_1) 2 j = k9t4p15_local_17_required_1 2 j := by decide + +private theorem k9t4p15_local_17_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_1) 3 j = k9t4p15_local_17_required_1 3 j := by decide + +private theorem k9t4p15_local_17_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_1) 4 j = k9t4p15_local_17_required_1 4 j := by decide + +private theorem k9t4p15_local_17_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_1) 5 j = k9t4p15_local_17_required_1 5 j := by decide + +private theorem k9t4p15_local_17_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_1) 6 j = k9t4p15_local_17_required_1 6 j := by decide + +private theorem k9t4p15_local_17_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_1) 7 j = k9t4p15_local_17_required_1 7 j := by decide + +private theorem k9t4p15_local_17_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_1) 8 j = k9t4p15_local_17_required_1 8 j := by decide + +private theorem k9t4p15_local_17_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_1) 9 j = k9t4p15_local_17_required_1 9 j := by decide + +private theorem k9t4p15_local_17_required_1_eq : (requiredMatrix 9 k9t4p15_step_17_required_block_1) = k9t4p15_local_17_required_1 := by + funext i j + fin_cases i + + · exact k9t4p15_local_17_required_1_eq_row_0 j + + · exact k9t4p15_local_17_required_1_eq_row_1 j + + · exact k9t4p15_local_17_required_1_eq_row_2 j + + · exact k9t4p15_local_17_required_1_eq_row_3 j + + · exact k9t4p15_local_17_required_1_eq_row_4 j + + · exact k9t4p15_local_17_required_1_eq_row_5 j + + · exact k9t4p15_local_17_required_1_eq_row_6 j + + · exact k9t4p15_local_17_required_1_eq_row_7 j + + · exact k9t4p15_local_17_required_1_eq_row_8 j + + · exact k9t4p15_local_17_required_1_eq_row_9 j + +private theorem k9t4p15_local_17_path_1_0 : (⟨7, 0, [6, 5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_1_1 : (⟨7, 0, [6, 5, 4, 1, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_1_2 : (⟨7, 0, [6, 5, 4, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_1_3 : (⟨7, 0, [6, 5, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_1_4 : (⟨7, 4, [6, 0, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_1_5 : (⟨7, 5, [6, 0, 8, 9, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_1_6 : (⟨7, 5, [6, 0, 8, 9, 1, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_1_7 : (⟨7, 3, [6, 0, 8, 9, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_1_8 : (⟨7, 1, [6, 0, 8, 9, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_1_9 : (⟨7, 9, [8, 0, 6, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_1_10 : (⟨7, 9, [8, 0, 6, 5, 4, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_1_11 : (⟨7, 2, [8, 0, 6, 5, 4, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_paths_block_1 : ∀ p ∈ k9t4p15_step_17_required_block_1, p.Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by + simp only [k9t4p15_step_17_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_17_path_1_0, k9t4p15_local_17_path_1_1, k9t4p15_local_17_path_1_2, k9t4p15_local_17_path_1_3, k9t4p15_local_17_path_1_4, k9t4p15_local_17_path_1_5, k9t4p15_local_17_path_1_6, k9t4p15_local_17_path_1_7, k9t4p15_local_17_path_1_8, k9t4p15_local_17_path_1_9, k9t4p15_local_17_path_1_10, k9t4p15_local_17_path_1_11⟩ + +private def k9t4p15_local_17_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, ∅, {0}, ∅, {0}, ∅, {0}], + #[Finset.Icc 0 4, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, {0}, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_17_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_2) 0 j = k9t4p15_local_17_required_2 0 j := by decide + +private theorem k9t4p15_local_17_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_2) 1 j = k9t4p15_local_17_required_2 1 j := by decide + +private theorem k9t4p15_local_17_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_2) 2 j = k9t4p15_local_17_required_2 2 j := by decide + +private theorem k9t4p15_local_17_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_2) 3 j = k9t4p15_local_17_required_2 3 j := by decide + +private theorem k9t4p15_local_17_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_2) 4 j = k9t4p15_local_17_required_2 4 j := by decide + +private theorem k9t4p15_local_17_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_2) 5 j = k9t4p15_local_17_required_2 5 j := by decide + +private theorem k9t4p15_local_17_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_2) 6 j = k9t4p15_local_17_required_2 6 j := by decide + +private theorem k9t4p15_local_17_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_2) 7 j = k9t4p15_local_17_required_2 7 j := by decide + +private theorem k9t4p15_local_17_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_2) 8 j = k9t4p15_local_17_required_2 8 j := by decide + +private theorem k9t4p15_local_17_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_17_required_block_2) 9 j = k9t4p15_local_17_required_2 9 j := by decide + +private theorem k9t4p15_local_17_required_2_eq : (requiredMatrix 9 k9t4p15_step_17_required_block_2) = k9t4p15_local_17_required_2 := by + funext i j + fin_cases i + + · exact k9t4p15_local_17_required_2_eq_row_0 j + + · exact k9t4p15_local_17_required_2_eq_row_1 j + + · exact k9t4p15_local_17_required_2_eq_row_2 j + + · exact k9t4p15_local_17_required_2_eq_row_3 j + + · exact k9t4p15_local_17_required_2_eq_row_4 j + + · exact k9t4p15_local_17_required_2_eq_row_5 j + + · exact k9t4p15_local_17_required_2_eq_row_6 j + + · exact k9t4p15_local_17_required_2_eq_row_7 j + + · exact k9t4p15_local_17_required_2_eq_row_8 j + + · exact k9t4p15_local_17_required_2_eq_row_9 j + +private theorem k9t4p15_local_17_path_2_0 : (⟨7, 3, [8, 0, 6, 5, 4, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_2_1 : (⟨7, 1, [8, 0, 6, 5, 4, 9, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_2_2 : (⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_2_3 : (⟨0, 1, [6, 5, 4, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_2_4 : (⟨0, 1, [6, 5, 4, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_2_5 : (⟨0, 1, [6, 5, 4, 9, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_2_6 : (⟨0, 5, [6, 7, 8, 9, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_2_7 : (⟨0, 1, [6, 7, 8, 9, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_2_8 : (⟨0, 9, [8, 7, 6, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_2_9 : (⟨0, 2, [8, 7, 6, 5, 4, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_2_10 : (⟨0, 3, [8, 7, 6, 5, 4, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_path_2_11 : (⟨0, 1, [8, 7, 6, 5, 4, 9, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by decide + +private theorem k9t4p15_local_17_paths_block_2 : ∀ p ∈ k9t4p15_step_17_required_block_2, p.Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by + simp only [k9t4p15_step_17_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_17_path_2_0, k9t4p15_local_17_path_2_1, k9t4p15_local_17_path_2_2, k9t4p15_local_17_path_2_3, k9t4p15_local_17_path_2_4, k9t4p15_local_17_path_2_5, k9t4p15_local_17_path_2_6, k9t4p15_local_17_path_2_7, k9t4p15_local_17_path_2_8, k9t4p15_local_17_path_2_9, k9t4p15_local_17_path_2_10, k9t4p15_local_17_path_2_11⟩ + +private theorem k9t4p15_local_17_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_17 a b ∪ (((k9t4p15_local_17_required_0 a b ∪ k9t4p15_local_17_required_1 a b) ∪ k9t4p15_local_17_required_2 a b))) 0 j = k9t4p15_local_17 0 j := by decide + +private theorem k9t4p15_local_17_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_17 a b ∪ (((k9t4p15_local_17_required_0 a b ∪ k9t4p15_local_17_required_1 a b) ∪ k9t4p15_local_17_required_2 a b))) 1 j = k9t4p15_local_17 1 j := by decide + +private theorem k9t4p15_local_17_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_17 a b ∪ (((k9t4p15_local_17_required_0 a b ∪ k9t4p15_local_17_required_1 a b) ∪ k9t4p15_local_17_required_2 a b))) 2 j = k9t4p15_local_17 2 j := by decide + +private theorem k9t4p15_local_17_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_17 a b ∪ (((k9t4p15_local_17_required_0 a b ∪ k9t4p15_local_17_required_1 a b) ∪ k9t4p15_local_17_required_2 a b))) 3 j = k9t4p15_local_17 3 j := by decide + +private theorem k9t4p15_local_17_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_17 a b ∪ (((k9t4p15_local_17_required_0 a b ∪ k9t4p15_local_17_required_1 a b) ∪ k9t4p15_local_17_required_2 a b))) 4 j = k9t4p15_local_17 4 j := by decide + +private theorem k9t4p15_local_17_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_17 a b ∪ (((k9t4p15_local_17_required_0 a b ∪ k9t4p15_local_17_required_1 a b) ∪ k9t4p15_local_17_required_2 a b))) 5 j = k9t4p15_local_17 5 j := by decide + +private theorem k9t4p15_local_17_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_17 a b ∪ (((k9t4p15_local_17_required_0 a b ∪ k9t4p15_local_17_required_1 a b) ∪ k9t4p15_local_17_required_2 a b))) 6 j = k9t4p15_local_17 6 j := by decide + +private theorem k9t4p15_local_17_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_17 a b ∪ (((k9t4p15_local_17_required_0 a b ∪ k9t4p15_local_17_required_1 a b) ∪ k9t4p15_local_17_required_2 a b))) 7 j = k9t4p15_local_17 7 j := by decide + +private theorem k9t4p15_local_17_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_17 a b ∪ (((k9t4p15_local_17_required_0 a b ∪ k9t4p15_local_17_required_1 a b) ∪ k9t4p15_local_17_required_2 a b))) 8 j = k9t4p15_local_17 8 j := by decide + +private theorem k9t4p15_local_17_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_17 a b ∪ (((k9t4p15_local_17_required_0 a b ∪ k9t4p15_local_17_required_1 a b) ∪ k9t4p15_local_17_required_2 a b))) 9 j = k9t4p15_local_17 9 j := by decide + +private theorem k9t4p15_local_17_merged_eq : (fun a b => freshMatrix k9t4p15_state_17 a b ∪ (((k9t4p15_local_17_required_0 a b ∪ k9t4p15_local_17_required_1 a b) ∪ k9t4p15_local_17_required_2 a b))) = k9t4p15_local_17 := by + funext i j + fin_cases i + + · exact k9t4p15_local_17_merged_eq_row_0 j + + · exact k9t4p15_local_17_merged_eq_row_1 j + + · exact k9t4p15_local_17_merged_eq_row_2 j + + · exact k9t4p15_local_17_merged_eq_row_3 j + + · exact k9t4p15_local_17_merged_eq_row_4 j + + · exact k9t4p15_local_17_merged_eq_row_5 j + + · exact k9t4p15_local_17_merged_eq_row_6 j + + · exact k9t4p15_local_17_merged_eq_row_7 j + + · exact k9t4p15_local_17_merged_eq_row_8 j + + · exact k9t4p15_local_17_merged_eq_row_9 j + +private theorem k9t4p15_local_17_eq : (fun a b => freshMatrix k9t4p15_state_17 a b ∪ requiredMatrix 9 k9t4p15_step_17_data.required a b) = k9t4p15_local_17 := by + funext a b + change freshMatrix k9t4p15_state_17 a b ∪ requiredMatrix 9 (k9t4p15_step_17_required_block_0 ++ k9t4p15_step_17_required_block_1 ++ k9t4p15_step_17_required_block_2) a b = _ + simp only [requiredMatrix_append, k9t4p15_local_17_required_0_eq, k9t4p15_local_17_required_1_eq, k9t4p15_local_17_required_2_eq] + exact congrFun (congrFun k9t4p15_local_17_merged_eq a) b + +private theorem k9t4p15_local_17_paths : ∀ p ∈ k9t4p15_step_17_data.required, p.Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 := by + change ∀ p ∈ (k9t4p15_step_17_required_block_0 ++ k9t4p15_step_17_required_block_1 ++ k9t4p15_step_17_required_block_2), p.Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨k9t4p15_local_17_paths_block_0, k9t4p15_local_17_paths_block_1⟩, k9t4p15_local_17_paths_block_2⟩ + +private theorem k9t4p15_local_17_bad : k9t4p15_step_17_data.bad.Check (freshGraph k9t4p15.graph k9t4p15_step_17_data.i k9t4p15_step_17_data.j) k9t4p15_local_17 9 4 := by decide + +private theorem k9t4p15_step_17_check : k9t4p15_step_17.Check k9t4p15.graph k9t4p15_state_17 9 4 := by + change k9t4p15_step_17_data.Check k9t4p15.graph k9t4p15_state_17 9 4 + refine ⟨by decide, k9t4p15_local_17_paths, ?_⟩ + rw [k9t4p15_local_17_eq] + exact k9t4p15_local_17_bad + +private theorem k9t4p15_update_17 : k9t4p15_step_17.apply k9t4p15_state_17 = k9t4p15_state_18 := by + have h : ∀ i j : Fin 9, k9t4p15_step_17.apply k9t4p15_state_17 i j = k9t4p15_state_18 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_19 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 3, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5, 6}, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, {1}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_18 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 5, {0, 1}, {0, 1}, Finset.Icc 0 5, ∅, {0, 1}, {1}, Finset.Icc 0 4, ∅], + #[Finset.Icc 0 5, ∅, {1, 4, 5, 6, 7}, {2}, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3, 5, 6, 7, 8}], + #[{0, 1}, {1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 4, 5, 6, 7}], + #[{0, 1}, {2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 7, {1, 2, 3}], + #[Finset.Icc 0 5, Finset.Icc 1 8, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 0 7, ∅], + #[∅, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5, 6}, ∅], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[{1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 0 7, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_18_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, {0, 1}, {1}, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {1}, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, {0}, ∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_18_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_0) 0 j = k9t4p15_local_18_required_0 0 j := by decide + +private theorem k9t4p15_local_18_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_0) 1 j = k9t4p15_local_18_required_0 1 j := by decide + +private theorem k9t4p15_local_18_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_0) 2 j = k9t4p15_local_18_required_0 2 j := by decide + +private theorem k9t4p15_local_18_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_0) 3 j = k9t4p15_local_18_required_0 3 j := by decide + +private theorem k9t4p15_local_18_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_0) 4 j = k9t4p15_local_18_required_0 4 j := by decide + +private theorem k9t4p15_local_18_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_0) 5 j = k9t4p15_local_18_required_0 5 j := by decide + +private theorem k9t4p15_local_18_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_0) 6 j = k9t4p15_local_18_required_0 6 j := by decide + +private theorem k9t4p15_local_18_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_0) 7 j = k9t4p15_local_18_required_0 7 j := by decide + +private theorem k9t4p15_local_18_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_0) 8 j = k9t4p15_local_18_required_0 8 j := by decide + +private theorem k9t4p15_local_18_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_0) 9 j = k9t4p15_local_18_required_0 9 j := by decide + +private theorem k9t4p15_local_18_required_0_eq : (requiredMatrix 9 k9t4p15_step_18_required_block_0) = k9t4p15_local_18_required_0 := by + funext i j + fin_cases i + + · exact k9t4p15_local_18_required_0_eq_row_0 j + + · exact k9t4p15_local_18_required_0_eq_row_1 j + + · exact k9t4p15_local_18_required_0_eq_row_2 j + + · exact k9t4p15_local_18_required_0_eq_row_3 j + + · exact k9t4p15_local_18_required_0_eq_row_4 j + + · exact k9t4p15_local_18_required_0_eq_row_5 j + + · exact k9t4p15_local_18_required_0_eq_row_6 j + + · exact k9t4p15_local_18_required_0_eq_row_7 j + + · exact k9t4p15_local_18_required_0_eq_row_8 j + + · exact k9t4p15_local_18_required_0_eq_row_9 j + +private theorem k9t4p15_local_18_path_0_0 : (⟨1, 6, [2, 3, 4, 5, 0, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_0_1 : (⟨1, 0, [2, 3, 4, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_0_2 : (⟨1, 7, [2, 3, 4, 9, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_0_3 : (⟨1, 8, [2, 3, 4, 9, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_0_4 : (⟨1, 0, [2, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_0_5 : (⟨1, 6, [3, 4, 5, 0, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_0_6 : (⟨1, 0, [3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_0_7 : (⟨4, 0, [1, 2, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_0_8 : (⟨4, 7, [1, 2, 3, 9, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_0_9 : (⟨4, 8, [1, 2, 3, 9, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_0_10 : (⟨4, 0, [1, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_0_11 : (⟨4, 7, [1, 3, 9, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_paths_block_0 : ∀ p ∈ k9t4p15_step_18_required_block_0, p.Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by + simp only [k9t4p15_step_18_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_18_path_0_0, k9t4p15_local_18_path_0_1, k9t4p15_local_18_path_0_2, k9t4p15_local_18_path_0_3, k9t4p15_local_18_path_0_4, k9t4p15_local_18_path_0_5, k9t4p15_local_18_path_0_6, k9t4p15_local_18_path_0_7, k9t4p15_local_18_path_0_8, k9t4p15_local_18_path_0_9, k9t4p15_local_18_path_0_10, k9t4p15_local_18_path_0_11⟩ + +private def k9t4p15_local_18_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {2}, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, {4}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[{2}, {4}, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, {0}, {0}, Finset.Icc 0 3, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_18_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_1) 0 j = k9t4p15_local_18_required_1 0 j := by decide + +private theorem k9t4p15_local_18_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_1) 1 j = k9t4p15_local_18_required_1 1 j := by decide + +private theorem k9t4p15_local_18_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_1) 2 j = k9t4p15_local_18_required_1 2 j := by decide + +private theorem k9t4p15_local_18_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_1) 3 j = k9t4p15_local_18_required_1 3 j := by decide + +private theorem k9t4p15_local_18_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_1) 4 j = k9t4p15_local_18_required_1 4 j := by decide + +private theorem k9t4p15_local_18_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_1) 5 j = k9t4p15_local_18_required_1 5 j := by decide + +private theorem k9t4p15_local_18_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_1) 6 j = k9t4p15_local_18_required_1 6 j := by decide + +private theorem k9t4p15_local_18_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_1) 7 j = k9t4p15_local_18_required_1 7 j := by decide + +private theorem k9t4p15_local_18_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_1) 8 j = k9t4p15_local_18_required_1 8 j := by decide + +private theorem k9t4p15_local_18_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_1) 9 j = k9t4p15_local_18_required_1 9 j := by decide + +private theorem k9t4p15_local_18_required_1_eq : (requiredMatrix 9 k9t4p15_step_18_required_block_1) = k9t4p15_local_18_required_1 := by + funext i j + fin_cases i + + · exact k9t4p15_local_18_required_1_eq_row_0 j + + · exact k9t4p15_local_18_required_1_eq_row_1 j + + · exact k9t4p15_local_18_required_1_eq_row_2 j + + · exact k9t4p15_local_18_required_1_eq_row_3 j + + · exact k9t4p15_local_18_required_1_eq_row_4 j + + · exact k9t4p15_local_18_required_1_eq_row_5 j + + · exact k9t4p15_local_18_required_1_eq_row_6 j + + · exact k9t4p15_local_18_required_1_eq_row_7 j + + · exact k9t4p15_local_18_required_1_eq_row_8 j + + · exact k9t4p15_local_18_required_1_eq_row_9 j + +private theorem k9t4p15_local_18_path_1_0 : (⟨4, 8, [1, 3, 9, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_1_1 : (⟨4, 0, [1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_1_2 : (⟨4, 8, [1, 9, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_1_3 : (⟨4, 1, [5, 0, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_1_4 : (⟨8, 0, [7, 6, 5, 4, 1, 2, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_1_5 : (⟨8, 0, [7, 6, 5, 4, 1, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_1_6 : (⟨8, 4, [7, 6, 5, 0, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_1_7 : (⟨8, 4, [7, 6, 5, 0, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_1_8 : (⟨8, 4, [7, 6, 5, 0, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_1_9 : (⟨8, 2, [7, 6, 5, 0, 9, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_1_10 : (⟨8, 4, [7, 6, 5, 0, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_1_11 : (⟨8, 3, [7, 6, 5, 0, 9, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_paths_block_1 : ∀ p ∈ k9t4p15_step_18_required_block_1, p.Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by + simp only [k9t4p15_step_18_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_18_path_1_0, k9t4p15_local_18_path_1_1, k9t4p15_local_18_path_1_2, k9t4p15_local_18_path_1_3, k9t4p15_local_18_path_1_4, k9t4p15_local_18_path_1_5, k9t4p15_local_18_path_1_6, k9t4p15_local_18_path_1_7, k9t4p15_local_18_path_1_8, k9t4p15_local_18_path_1_9, k9t4p15_local_18_path_1_10, k9t4p15_local_18_path_1_11⟩ + +private def k9t4p15_local_18_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {3}, ∅, ∅, {0, 1, 2, 4, 5}, ∅, {0, 1}, {1}, {0, 4}, ∅], + #[{3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 4}, {0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_18_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_2) 0 j = k9t4p15_local_18_required_2 0 j := by decide + +private theorem k9t4p15_local_18_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_2) 1 j = k9t4p15_local_18_required_2 1 j := by decide + +private theorem k9t4p15_local_18_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_2) 2 j = k9t4p15_local_18_required_2 2 j := by decide + +private theorem k9t4p15_local_18_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_2) 3 j = k9t4p15_local_18_required_2 3 j := by decide + +private theorem k9t4p15_local_18_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_2) 4 j = k9t4p15_local_18_required_2 4 j := by decide + +private theorem k9t4p15_local_18_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_2) 5 j = k9t4p15_local_18_required_2 5 j := by decide + +private theorem k9t4p15_local_18_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_2) 6 j = k9t4p15_local_18_required_2 6 j := by decide + +private theorem k9t4p15_local_18_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_2) 7 j = k9t4p15_local_18_required_2 7 j := by decide + +private theorem k9t4p15_local_18_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_2) 8 j = k9t4p15_local_18_required_2 8 j := by decide + +private theorem k9t4p15_local_18_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_2) 9 j = k9t4p15_local_18_required_2 9 j := by decide + +private theorem k9t4p15_local_18_required_2_eq : (requiredMatrix 9 k9t4p15_step_18_required_block_2) = k9t4p15_local_18_required_2 := by + funext i j + fin_cases i + + · exact k9t4p15_local_18_required_2_eq_row_0 j + + · exact k9t4p15_local_18_required_2_eq_row_1 j + + · exact k9t4p15_local_18_required_2_eq_row_2 j + + · exact k9t4p15_local_18_required_2_eq_row_3 j + + · exact k9t4p15_local_18_required_2_eq_row_4 j + + · exact k9t4p15_local_18_required_2_eq_row_5 j + + · exact k9t4p15_local_18_required_2_eq_row_6 j + + · exact k9t4p15_local_18_required_2_eq_row_7 j + + · exact k9t4p15_local_18_required_2_eq_row_8 j + + · exact k9t4p15_local_18_required_2_eq_row_9 j + +private theorem k9t4p15_local_18_path_2_0 : (⟨8, 1, [7, 6, 5, 0, 9, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_2_1 : (⟨0, 6, [5, 4, 1, 2, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_2_2 : (⟨0, 6, [5, 4, 1, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_2_3 : (⟨0, 8, [5, 4, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_2_4 : (⟨0, 1, [5, 4, 9, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_2_5 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_2_6 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_2_7 : (⟨0, 4, [5, 6, 7, 8, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_2_8 : (⟨0, 4, [9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_2_9 : (⟨0, 7, [9, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_2_10 : (⟨0, 8, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_2_11 : (⟨0, 4, [9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_paths_block_2 : ∀ p ∈ k9t4p15_step_18_required_block_2, p.Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by + simp only [k9t4p15_step_18_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_18_path_2_0, k9t4p15_local_18_path_2_1, k9t4p15_local_18_path_2_2, k9t4p15_local_18_path_2_3, k9t4p15_local_18_path_2_4, k9t4p15_local_18_path_2_5, k9t4p15_local_18_path_2_6, k9t4p15_local_18_path_2_7, k9t4p15_local_18_path_2_8, k9t4p15_local_18_path_2_9, k9t4p15_local_18_path_2_10, k9t4p15_local_18_path_2_11⟩ + +private def k9t4p15_local_18_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1, 2, 4, 5}, {0, 1}, {0, 1}, {3}, ∅, ∅, ∅, {1, 2, 3}, ∅], + #[{1, 2, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_18_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_3) 0 j = k9t4p15_local_18_required_3 0 j := by decide + +private theorem k9t4p15_local_18_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_3) 1 j = k9t4p15_local_18_required_3 1 j := by decide + +private theorem k9t4p15_local_18_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_3) 2 j = k9t4p15_local_18_required_3 2 j := by decide + +private theorem k9t4p15_local_18_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_3) 3 j = k9t4p15_local_18_required_3 3 j := by decide + +private theorem k9t4p15_local_18_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_3) 4 j = k9t4p15_local_18_required_3 4 j := by decide + +private theorem k9t4p15_local_18_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_3) 5 j = k9t4p15_local_18_required_3 5 j := by decide + +private theorem k9t4p15_local_18_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_3) 6 j = k9t4p15_local_18_required_3 6 j := by decide + +private theorem k9t4p15_local_18_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_3) 7 j = k9t4p15_local_18_required_3 7 j := by decide + +private theorem k9t4p15_local_18_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_3) 8 j = k9t4p15_local_18_required_3 8 j := by decide + +private theorem k9t4p15_local_18_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_3) 9 j = k9t4p15_local_18_required_3 9 j := by decide + +private theorem k9t4p15_local_18_required_3_eq : (requiredMatrix 9 k9t4p15_step_18_required_block_3) = k9t4p15_local_18_required_3 := by + funext i j + fin_cases i + + · exact k9t4p15_local_18_required_3_eq_row_0 j + + · exact k9t4p15_local_18_required_3_eq_row_1 j + + · exact k9t4p15_local_18_required_3_eq_row_2 j + + · exact k9t4p15_local_18_required_3_eq_row_3 j + + · exact k9t4p15_local_18_required_3_eq_row_4 j + + · exact k9t4p15_local_18_required_3_eq_row_5 j + + · exact k9t4p15_local_18_required_3_eq_row_6 j + + · exact k9t4p15_local_18_required_3_eq_row_7 j + + · exact k9t4p15_local_18_required_3_eq_row_8 j + + · exact k9t4p15_local_18_required_3_eq_row_9 j + +private theorem k9t4p15_local_18_path_3_0 : (⟨0, 8, [9, 1, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_3_1 : (⟨0, 8, [9, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_3_2 : (⟨0, 1, [9, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_3_3 : (⟨0, 1, [9, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_3_4 : (⟨0, 8, [9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_3_5 : (⟨0, 4, [9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_3_6 : (⟨0, 1, [9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_3_7 : (⟨0, 2, [9, 8, 7, 6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_3_8 : (⟨0, 3, [9, 8, 7, 6, 5, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_3_9 : (⟨0, 3, [9, 8, 7, 6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_3_10 : (⟨0, 2, [9, 8, 7, 6, 5, 4, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_path_3_11 : (⟨0, 1, [9, 8, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_paths_block_3 : ∀ p ∈ k9t4p15_step_18_required_block_3, p.Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by + simp only [k9t4p15_step_18_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_local_18_path_3_0, k9t4p15_local_18_path_3_1, k9t4p15_local_18_path_3_2, k9t4p15_local_18_path_3_3, k9t4p15_local_18_path_3_4, k9t4p15_local_18_path_3_5, k9t4p15_local_18_path_3_6, k9t4p15_local_18_path_3_7, k9t4p15_local_18_path_3_8, k9t4p15_local_18_path_3_9, k9t4p15_local_18_path_3_10, k9t4p15_local_18_path_3_11⟩ + +private def k9t4p15_local_18_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_18_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_4) 0 j = k9t4p15_local_18_required_4 0 j := by decide + +private theorem k9t4p15_local_18_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_4) 1 j = k9t4p15_local_18_required_4 1 j := by decide + +private theorem k9t4p15_local_18_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_4) 2 j = k9t4p15_local_18_required_4 2 j := by decide + +private theorem k9t4p15_local_18_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_4) 3 j = k9t4p15_local_18_required_4 3 j := by decide + +private theorem k9t4p15_local_18_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_4) 4 j = k9t4p15_local_18_required_4 4 j := by decide + +private theorem k9t4p15_local_18_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_4) 5 j = k9t4p15_local_18_required_4 5 j := by decide + +private theorem k9t4p15_local_18_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_4) 6 j = k9t4p15_local_18_required_4 6 j := by decide + +private theorem k9t4p15_local_18_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_4) 7 j = k9t4p15_local_18_required_4 7 j := by decide + +private theorem k9t4p15_local_18_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_4) 8 j = k9t4p15_local_18_required_4 8 j := by decide + +private theorem k9t4p15_local_18_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p15_step_18_required_block_4) 9 j = k9t4p15_local_18_required_4 9 j := by decide + +private theorem k9t4p15_local_18_required_4_eq : (requiredMatrix 9 k9t4p15_step_18_required_block_4) = k9t4p15_local_18_required_4 := by + funext i j + fin_cases i + + · exact k9t4p15_local_18_required_4_eq_row_0 j + + · exact k9t4p15_local_18_required_4_eq_row_1 j + + · exact k9t4p15_local_18_required_4_eq_row_2 j + + · exact k9t4p15_local_18_required_4_eq_row_3 j + + · exact k9t4p15_local_18_required_4_eq_row_4 j + + · exact k9t4p15_local_18_required_4_eq_row_5 j + + · exact k9t4p15_local_18_required_4_eq_row_6 j + + · exact k9t4p15_local_18_required_4_eq_row_7 j + + · exact k9t4p15_local_18_required_4_eq_row_8 j + + · exact k9t4p15_local_18_required_4_eq_row_9 j + +private theorem k9t4p15_local_18_path_4_0 : (⟨0, 1, [9, 8, 7, 6, 5, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by decide + +private theorem k9t4p15_local_18_paths_block_4 : ∀ p ∈ k9t4p15_step_18_required_block_4, p.Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by + simp only [k9t4p15_step_18_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact k9t4p15_local_18_path_4_0 + +private theorem k9t4p15_local_18_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_18 a b ∪ (((((k9t4p15_local_18_required_0 a b ∪ k9t4p15_local_18_required_1 a b) ∪ k9t4p15_local_18_required_2 a b) ∪ k9t4p15_local_18_required_3 a b) ∪ k9t4p15_local_18_required_4 a b))) 0 j = k9t4p15_local_18 0 j := by decide + +private theorem k9t4p15_local_18_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_18 a b ∪ (((((k9t4p15_local_18_required_0 a b ∪ k9t4p15_local_18_required_1 a b) ∪ k9t4p15_local_18_required_2 a b) ∪ k9t4p15_local_18_required_3 a b) ∪ k9t4p15_local_18_required_4 a b))) 1 j = k9t4p15_local_18 1 j := by decide + +private theorem k9t4p15_local_18_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_18 a b ∪ (((((k9t4p15_local_18_required_0 a b ∪ k9t4p15_local_18_required_1 a b) ∪ k9t4p15_local_18_required_2 a b) ∪ k9t4p15_local_18_required_3 a b) ∪ k9t4p15_local_18_required_4 a b))) 2 j = k9t4p15_local_18 2 j := by decide + +private theorem k9t4p15_local_18_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_18 a b ∪ (((((k9t4p15_local_18_required_0 a b ∪ k9t4p15_local_18_required_1 a b) ∪ k9t4p15_local_18_required_2 a b) ∪ k9t4p15_local_18_required_3 a b) ∪ k9t4p15_local_18_required_4 a b))) 3 j = k9t4p15_local_18 3 j := by decide + +private theorem k9t4p15_local_18_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_18 a b ∪ (((((k9t4p15_local_18_required_0 a b ∪ k9t4p15_local_18_required_1 a b) ∪ k9t4p15_local_18_required_2 a b) ∪ k9t4p15_local_18_required_3 a b) ∪ k9t4p15_local_18_required_4 a b))) 4 j = k9t4p15_local_18 4 j := by decide + +private theorem k9t4p15_local_18_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_18 a b ∪ (((((k9t4p15_local_18_required_0 a b ∪ k9t4p15_local_18_required_1 a b) ∪ k9t4p15_local_18_required_2 a b) ∪ k9t4p15_local_18_required_3 a b) ∪ k9t4p15_local_18_required_4 a b))) 5 j = k9t4p15_local_18 5 j := by decide + +private theorem k9t4p15_local_18_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_18 a b ∪ (((((k9t4p15_local_18_required_0 a b ∪ k9t4p15_local_18_required_1 a b) ∪ k9t4p15_local_18_required_2 a b) ∪ k9t4p15_local_18_required_3 a b) ∪ k9t4p15_local_18_required_4 a b))) 6 j = k9t4p15_local_18 6 j := by decide + +private theorem k9t4p15_local_18_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_18 a b ∪ (((((k9t4p15_local_18_required_0 a b ∪ k9t4p15_local_18_required_1 a b) ∪ k9t4p15_local_18_required_2 a b) ∪ k9t4p15_local_18_required_3 a b) ∪ k9t4p15_local_18_required_4 a b))) 7 j = k9t4p15_local_18 7 j := by decide + +private theorem k9t4p15_local_18_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_18 a b ∪ (((((k9t4p15_local_18_required_0 a b ∪ k9t4p15_local_18_required_1 a b) ∪ k9t4p15_local_18_required_2 a b) ∪ k9t4p15_local_18_required_3 a b) ∪ k9t4p15_local_18_required_4 a b))) 8 j = k9t4p15_local_18 8 j := by decide + +private theorem k9t4p15_local_18_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_18 a b ∪ (((((k9t4p15_local_18_required_0 a b ∪ k9t4p15_local_18_required_1 a b) ∪ k9t4p15_local_18_required_2 a b) ∪ k9t4p15_local_18_required_3 a b) ∪ k9t4p15_local_18_required_4 a b))) 9 j = k9t4p15_local_18 9 j := by decide + +private theorem k9t4p15_local_18_merged_eq : (fun a b => freshMatrix k9t4p15_state_18 a b ∪ (((((k9t4p15_local_18_required_0 a b ∪ k9t4p15_local_18_required_1 a b) ∪ k9t4p15_local_18_required_2 a b) ∪ k9t4p15_local_18_required_3 a b) ∪ k9t4p15_local_18_required_4 a b))) = k9t4p15_local_18 := by + funext i j + fin_cases i + + · exact k9t4p15_local_18_merged_eq_row_0 j + + · exact k9t4p15_local_18_merged_eq_row_1 j + + · exact k9t4p15_local_18_merged_eq_row_2 j + + · exact k9t4p15_local_18_merged_eq_row_3 j + + · exact k9t4p15_local_18_merged_eq_row_4 j + + · exact k9t4p15_local_18_merged_eq_row_5 j + + · exact k9t4p15_local_18_merged_eq_row_6 j + + · exact k9t4p15_local_18_merged_eq_row_7 j + + · exact k9t4p15_local_18_merged_eq_row_8 j + + · exact k9t4p15_local_18_merged_eq_row_9 j + +private theorem k9t4p15_local_18_eq : (fun a b => freshMatrix k9t4p15_state_18 a b ∪ requiredMatrix 9 k9t4p15_step_18_data.required a b) = k9t4p15_local_18 := by + funext a b + change freshMatrix k9t4p15_state_18 a b ∪ requiredMatrix 9 (k9t4p15_step_18_required_block_0 ++ k9t4p15_step_18_required_block_1 ++ k9t4p15_step_18_required_block_2 ++ k9t4p15_step_18_required_block_3 ++ k9t4p15_step_18_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t4p15_local_18_required_0_eq, k9t4p15_local_18_required_1_eq, k9t4p15_local_18_required_2_eq, k9t4p15_local_18_required_3_eq, k9t4p15_local_18_required_4_eq] + exact congrFun (congrFun k9t4p15_local_18_merged_eq a) b + +private theorem k9t4p15_local_18_paths : ∀ p ∈ k9t4p15_step_18_data.required, p.Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 := by + change ∀ p ∈ (k9t4p15_step_18_required_block_0 ++ k9t4p15_step_18_required_block_1 ++ k9t4p15_step_18_required_block_2 ++ k9t4p15_step_18_required_block_3 ++ k9t4p15_step_18_required_block_4), p.Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t4p15_local_18_paths_block_0, k9t4p15_local_18_paths_block_1⟩, k9t4p15_local_18_paths_block_2⟩, k9t4p15_local_18_paths_block_3⟩, k9t4p15_local_18_paths_block_4⟩ + +private theorem k9t4p15_local_18_bad : k9t4p15_step_18_data.bad.Check (freshGraph k9t4p15.graph k9t4p15_step_18_data.i k9t4p15_step_18_data.j) k9t4p15_local_18 9 4 := by decide + +private theorem k9t4p15_step_18_check : k9t4p15_step_18.Check k9t4p15.graph k9t4p15_state_18 9 4 := by + change k9t4p15_step_18_data.Check k9t4p15.graph k9t4p15_state_18 9 4 + refine ⟨by decide, k9t4p15_local_18_paths, ?_⟩ + rw [k9t4p15_local_18_eq] + exact k9t4p15_local_18_bad + +private theorem k9t4p15_update_18 : k9t4p15_step_18.apply k9t4p15_state_18 = k9t4p15_state_19 := by + have h : ∀ i j : Fin 9, k9t4p15_step_18.apply k9t4p15_state_18 i j = k9t4p15_state_19 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_20 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 3, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5, 6}, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, {1}, {1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_19 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {0, 1, 2}, ∅, ∅, {0, 1, 2}, ∅, {0, 1}, {0, 1, 2}, ∅], + #[∅, ∅, {1, 2, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{0, 1, 2}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[∅, {2}, {1, 2, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 3, 4, 5, 6}, {1, 2, 4, 5, 6, 7}, ∅], + #[{0, 1, 2}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 0 6, {1}], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 5, Finset.Icc 2 5], + #[{0, 1, 2}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 5, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, {1}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_19_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_19 a b ∪ requiredMatrix 9 k9t4p15_step_19_data.required a b) 0 j = k9t4p15_local_19 0 j := by decide + +private theorem k9t4p15_local_19_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_19 a b ∪ requiredMatrix 9 k9t4p15_step_19_data.required a b) 1 j = k9t4p15_local_19 1 j := by decide + +private theorem k9t4p15_local_19_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_19 a b ∪ requiredMatrix 9 k9t4p15_step_19_data.required a b) 2 j = k9t4p15_local_19 2 j := by decide + +private theorem k9t4p15_local_19_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_19 a b ∪ requiredMatrix 9 k9t4p15_step_19_data.required a b) 3 j = k9t4p15_local_19 3 j := by decide + +private theorem k9t4p15_local_19_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_19 a b ∪ requiredMatrix 9 k9t4p15_step_19_data.required a b) 4 j = k9t4p15_local_19 4 j := by decide + +private theorem k9t4p15_local_19_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_19 a b ∪ requiredMatrix 9 k9t4p15_step_19_data.required a b) 5 j = k9t4p15_local_19 5 j := by decide + +private theorem k9t4p15_local_19_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_19 a b ∪ requiredMatrix 9 k9t4p15_step_19_data.required a b) 6 j = k9t4p15_local_19 6 j := by decide + +private theorem k9t4p15_local_19_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_19 a b ∪ requiredMatrix 9 k9t4p15_step_19_data.required a b) 7 j = k9t4p15_local_19 7 j := by decide + +private theorem k9t4p15_local_19_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_19 a b ∪ requiredMatrix 9 k9t4p15_step_19_data.required a b) 8 j = k9t4p15_local_19 8 j := by decide + +private theorem k9t4p15_local_19_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_19 a b ∪ requiredMatrix 9 k9t4p15_step_19_data.required a b) 9 j = k9t4p15_local_19 9 j := by decide + +private theorem k9t4p15_local_19_eq : (fun a b => freshMatrix k9t4p15_state_19 a b ∪ requiredMatrix 9 k9t4p15_step_19_data.required a b) = k9t4p15_local_19 := by + funext i j + fin_cases i + + · exact k9t4p15_local_19_eq_row_0 j + + · exact k9t4p15_local_19_eq_row_1 j + + · exact k9t4p15_local_19_eq_row_2 j + + · exact k9t4p15_local_19_eq_row_3 j + + · exact k9t4p15_local_19_eq_row_4 j + + · exact k9t4p15_local_19_eq_row_5 j + + · exact k9t4p15_local_19_eq_row_6 j + + · exact k9t4p15_local_19_eq_row_7 j + + · exact k9t4p15_local_19_eq_row_8 j + + · exact k9t4p15_local_19_eq_row_9 j + +private theorem k9t4p15_local_19_paths : ∀ p ∈ k9t4p15_step_19_data.required, p.Check (freshGraph k9t4p15.graph k9t4p15_step_19_data.i k9t4p15_step_19_data.j) 9 := by decide + +private theorem k9t4p15_local_19_bad : k9t4p15_step_19_data.bad.Check (freshGraph k9t4p15.graph k9t4p15_step_19_data.i k9t4p15_step_19_data.j) k9t4p15_local_19 9 4 := by decide + +private theorem k9t4p15_step_19_check : k9t4p15_step_19.Check k9t4p15.graph k9t4p15_state_19 9 4 := by + change k9t4p15_step_19_data.Check k9t4p15.graph k9t4p15_state_19 9 4 + refine ⟨by decide, k9t4p15_local_19_paths, ?_⟩ + rw [k9t4p15_local_19_eq] + exact k9t4p15_local_19_bad + +private theorem k9t4p15_update_19 : k9t4p15_step_19.apply k9t4p15_state_19 = k9t4p15_state_20 := by + have h : ∀ i j : Fin 9, k9t4p15_step_19.apply k9t4p15_state_19 i j = k9t4p15_state_20 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p15_state_21 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3, 5, 6, 7, 8}], + #[{1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 4, 5, 6, 7}], + #[{2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 3, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5, 6}, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 4 7, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, {1}, {1}, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p15_local_20 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0}, Finset.Icc 0 4, {0}, ∅, ∅, Finset.Icc 0 3, ∅, Finset.Icc 0 3, ∅], + #[{0}, ∅, {1, 4, 5, 6, 7}, {2}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3, 5, 6, 7, 8}], + #[Finset.Icc 0 4, {1, 4, 5, 6, 7}, ∅, {1, 4, 5, 6, 7}, {1, 2, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 4, 5, 6, 7}], + #[{0}, {2}, {1, 4, 5, 6, 7}, ∅, {1, 2, 3}, Finset.Icc 1 7, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 7, {1, 2, 3}], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, {1, 3, 4, 5, 6}, Finset.Icc 4 7, ∅], + #[∅, Finset.Icc 1 7, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1, 3, 4, 5, 6}, {1}], + #[Finset.Icc 0 3, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1}], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 3, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 4 7, {1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, {1, 2, 3}, ∅, {1}, {1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p15_local_20_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_20 a b ∪ requiredMatrix 9 k9t4p15_step_20_data.required a b) 0 j = k9t4p15_local_20 0 j := by decide + +private theorem k9t4p15_local_20_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_20 a b ∪ requiredMatrix 9 k9t4p15_step_20_data.required a b) 1 j = k9t4p15_local_20 1 j := by decide + +private theorem k9t4p15_local_20_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_20 a b ∪ requiredMatrix 9 k9t4p15_step_20_data.required a b) 2 j = k9t4p15_local_20 2 j := by decide + +private theorem k9t4p15_local_20_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_20 a b ∪ requiredMatrix 9 k9t4p15_step_20_data.required a b) 3 j = k9t4p15_local_20 3 j := by decide + +private theorem k9t4p15_local_20_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_20 a b ∪ requiredMatrix 9 k9t4p15_step_20_data.required a b) 4 j = k9t4p15_local_20 4 j := by decide + +private theorem k9t4p15_local_20_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_20 a b ∪ requiredMatrix 9 k9t4p15_step_20_data.required a b) 5 j = k9t4p15_local_20 5 j := by decide + +private theorem k9t4p15_local_20_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_20 a b ∪ requiredMatrix 9 k9t4p15_step_20_data.required a b) 6 j = k9t4p15_local_20 6 j := by decide + +private theorem k9t4p15_local_20_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_20 a b ∪ requiredMatrix 9 k9t4p15_step_20_data.required a b) 7 j = k9t4p15_local_20 7 j := by decide + +private theorem k9t4p15_local_20_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_20 a b ∪ requiredMatrix 9 k9t4p15_step_20_data.required a b) 8 j = k9t4p15_local_20 8 j := by decide + +private theorem k9t4p15_local_20_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p15_state_20 a b ∪ requiredMatrix 9 k9t4p15_step_20_data.required a b) 9 j = k9t4p15_local_20 9 j := by decide + +private theorem k9t4p15_local_20_eq : (fun a b => freshMatrix k9t4p15_state_20 a b ∪ requiredMatrix 9 k9t4p15_step_20_data.required a b) = k9t4p15_local_20 := by + funext i j + fin_cases i + + · exact k9t4p15_local_20_eq_row_0 j + + · exact k9t4p15_local_20_eq_row_1 j + + · exact k9t4p15_local_20_eq_row_2 j + + · exact k9t4p15_local_20_eq_row_3 j + + · exact k9t4p15_local_20_eq_row_4 j + + · exact k9t4p15_local_20_eq_row_5 j + + · exact k9t4p15_local_20_eq_row_6 j + + · exact k9t4p15_local_20_eq_row_7 j + + · exact k9t4p15_local_20_eq_row_8 j + + · exact k9t4p15_local_20_eq_row_9 j + +private theorem k9t4p15_local_20_paths : ∀ p ∈ k9t4p15_step_20_data.required, p.Check (freshGraph k9t4p15.graph k9t4p15_step_20_data.i k9t4p15_step_20_data.j) 9 := by decide + +private theorem k9t4p15_local_20_bad : k9t4p15_step_20_data.bad.Check (freshGraph k9t4p15.graph k9t4p15_step_20_data.i k9t4p15_step_20_data.j) k9t4p15_local_20 9 4 := by decide + +private theorem k9t4p15_step_20_check : k9t4p15_step_20.Check k9t4p15.graph k9t4p15_state_20 9 4 := by + change k9t4p15_step_20_data.Check k9t4p15.graph k9t4p15_state_20 9 4 + refine ⟨by decide, k9t4p15_local_20_paths, ?_⟩ + rw [k9t4p15_local_20_eq] + exact k9t4p15_local_20_bad + +private theorem k9t4p15_update_20 : k9t4p15_step_20.apply k9t4p15_state_20 = k9t4p15_state_21 := by + have h : ∀ i j : Fin 9, k9t4p15_step_20.apply k9t4p15_state_20 i j = k9t4p15_state_21 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k9t4p15_closure_21 : ClosureCheck k9t4p15.graph k9t4p15_state_21 9 4 [] := by trivial + +private theorem k9t4p15_closure_20 : ClosureCheck k9t4p15.graph k9t4p15_state_20 9 4 [k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_20_check + · rw [k9t4p15_update_20] + exact k9t4p15_closure_21 + +private theorem k9t4p15_closure_19 : ClosureCheck k9t4p15.graph k9t4p15_state_19 9 4 [k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_19_check + · rw [k9t4p15_update_19] + exact k9t4p15_closure_20 + +private theorem k9t4p15_closure_18 : ClosureCheck k9t4p15.graph k9t4p15_state_18 9 4 [k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_18_check + · rw [k9t4p15_update_18] + exact k9t4p15_closure_19 + +private theorem k9t4p15_closure_17 : ClosureCheck k9t4p15.graph k9t4p15_state_17 9 4 [k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_17_check + · rw [k9t4p15_update_17] + exact k9t4p15_closure_18 + +private theorem k9t4p15_closure_16 : ClosureCheck k9t4p15.graph k9t4p15_state_16 9 4 [k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_16_check + · rw [k9t4p15_update_16] + exact k9t4p15_closure_17 + +private theorem k9t4p15_closure_15 : ClosureCheck k9t4p15.graph k9t4p15_state_15 9 4 [k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_15_check + · rw [k9t4p15_update_15] + exact k9t4p15_closure_16 + +private theorem k9t4p15_closure_14 : ClosureCheck k9t4p15.graph k9t4p15_state_14 9 4 [k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_14_check + · rw [k9t4p15_update_14] + exact k9t4p15_closure_15 + +private theorem k9t4p15_closure_13 : ClosureCheck k9t4p15.graph k9t4p15_state_13 9 4 [k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_13_check + · rw [k9t4p15_update_13] + exact k9t4p15_closure_14 + +private theorem k9t4p15_closure_12 : ClosureCheck k9t4p15.graph k9t4p15_state_12 9 4 [k9t4p15_step_12, k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_12_check + · rw [k9t4p15_update_12] + exact k9t4p15_closure_13 + +private theorem k9t4p15_closure_11 : ClosureCheck k9t4p15.graph k9t4p15_state_11 9 4 [k9t4p15_step_11, k9t4p15_step_12, k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_11_check + · rw [k9t4p15_update_11] + exact k9t4p15_closure_12 + +private theorem k9t4p15_closure_10 : ClosureCheck k9t4p15.graph k9t4p15_state_10 9 4 [k9t4p15_step_10, k9t4p15_step_11, k9t4p15_step_12, k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_10_check + · rw [k9t4p15_update_10] + exact k9t4p15_closure_11 + +private theorem k9t4p15_closure_9 : ClosureCheck k9t4p15.graph k9t4p15_state_9 9 4 [k9t4p15_step_9, k9t4p15_step_10, k9t4p15_step_11, k9t4p15_step_12, k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_9_check + · rw [k9t4p15_update_9] + exact k9t4p15_closure_10 + +private theorem k9t4p15_closure_8 : ClosureCheck k9t4p15.graph k9t4p15_state_8 9 4 [k9t4p15_step_8, k9t4p15_step_9, k9t4p15_step_10, k9t4p15_step_11, k9t4p15_step_12, k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_8_check + · rw [k9t4p15_update_8] + exact k9t4p15_closure_9 + +private theorem k9t4p15_closure_7 : ClosureCheck k9t4p15.graph k9t4p15_state_7 9 4 [k9t4p15_step_7, k9t4p15_step_8, k9t4p15_step_9, k9t4p15_step_10, k9t4p15_step_11, k9t4p15_step_12, k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_7_check + · rw [k9t4p15_update_7] + exact k9t4p15_closure_8 + +private theorem k9t4p15_closure_6 : ClosureCheck k9t4p15.graph k9t4p15_state_6 9 4 [k9t4p15_step_6, k9t4p15_step_7, k9t4p15_step_8, k9t4p15_step_9, k9t4p15_step_10, k9t4p15_step_11, k9t4p15_step_12, k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_6_check + · rw [k9t4p15_update_6] + exact k9t4p15_closure_7 + +private theorem k9t4p15_closure_5 : ClosureCheck k9t4p15.graph k9t4p15_state_5 9 4 [k9t4p15_step_5, k9t4p15_step_6, k9t4p15_step_7, k9t4p15_step_8, k9t4p15_step_9, k9t4p15_step_10, k9t4p15_step_11, k9t4p15_step_12, k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_5_check + · rw [k9t4p15_update_5] + exact k9t4p15_closure_6 + +private theorem k9t4p15_closure_4 : ClosureCheck k9t4p15.graph k9t4p15_state_4 9 4 [k9t4p15_step_4, k9t4p15_step_5, k9t4p15_step_6, k9t4p15_step_7, k9t4p15_step_8, k9t4p15_step_9, k9t4p15_step_10, k9t4p15_step_11, k9t4p15_step_12, k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_4_check + · rw [k9t4p15_update_4] + exact k9t4p15_closure_5 + +private theorem k9t4p15_closure_3 : ClosureCheck k9t4p15.graph k9t4p15_state_3 9 4 [k9t4p15_step_3, k9t4p15_step_4, k9t4p15_step_5, k9t4p15_step_6, k9t4p15_step_7, k9t4p15_step_8, k9t4p15_step_9, k9t4p15_step_10, k9t4p15_step_11, k9t4p15_step_12, k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_3_check + · rw [k9t4p15_update_3] + exact k9t4p15_closure_4 + +private theorem k9t4p15_closure_2 : ClosureCheck k9t4p15.graph k9t4p15_state_2 9 4 [k9t4p15_step_2, k9t4p15_step_3, k9t4p15_step_4, k9t4p15_step_5, k9t4p15_step_6, k9t4p15_step_7, k9t4p15_step_8, k9t4p15_step_9, k9t4p15_step_10, k9t4p15_step_11, k9t4p15_step_12, k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_2_check + · rw [k9t4p15_update_2] + exact k9t4p15_closure_3 + +private theorem k9t4p15_closure_1 : ClosureCheck k9t4p15.graph k9t4p15_state_1 9 4 [k9t4p15_step_1, k9t4p15_step_2, k9t4p15_step_3, k9t4p15_step_4, k9t4p15_step_5, k9t4p15_step_6, k9t4p15_step_7, k9t4p15_step_8, k9t4p15_step_9, k9t4p15_step_10, k9t4p15_step_11, k9t4p15_step_12, k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_1_check + · rw [k9t4p15_update_1] + exact k9t4p15_closure_2 + +private theorem k9t4p15_closure_0 : ClosureCheck k9t4p15.graph k9t4p15_state_0 9 4 [k9t4p15_step_0, k9t4p15_step_1, k9t4p15_step_2, k9t4p15_step_3, k9t4p15_step_4, k9t4p15_step_5, k9t4p15_step_6, k9t4p15_step_7, k9t4p15_step_8, k9t4p15_step_9, k9t4p15_step_10, k9t4p15_step_11, k9t4p15_step_12, k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] := by + constructor + · exact k9t4p15_step_0_check + · rw [k9t4p15_update_0] + exact k9t4p15_closure_1 + +private theorem k9t4p15_matrix_eq : k9t4p15.matrix 9 = k9t4p15_state_21 := by + change closureMatrix (k9t4p15.initialMatrix 9) _ = _ + rw [k9t4p15_initial_eq] + change closureMatrix k9t4p15_state_0 [k9t4p15_step_0, k9t4p15_step_1, k9t4p15_step_2, k9t4p15_step_3, k9t4p15_step_4, k9t4p15_step_5, k9t4p15_step_6, k9t4p15_step_7, k9t4p15_step_8, k9t4p15_step_9, k9t4p15_step_10, k9t4p15_step_11, k9t4p15_step_12, k9t4p15_step_13, k9t4p15_step_14, k9t4p15_step_15, k9t4p15_step_16, k9t4p15_step_17, k9t4p15_step_18, k9t4p15_step_19, k9t4p15_step_20] = _ + simp only [closureMatrix] + rw [k9t4p15_update_0, k9t4p15_update_1, k9t4p15_update_2, k9t4p15_update_3, k9t4p15_update_4, k9t4p15_update_5, k9t4p15_update_6, k9t4p15_update_7, k9t4p15_update_8, k9t4p15_update_9, k9t4p15_update_10, k9t4p15_update_11, k9t4p15_update_12, k9t4p15_update_13, k9t4p15_update_14, k9t4p15_update_15, k9t4p15_update_16, k9t4p15_update_17, k9t4p15_update_18, k9t4p15_update_19, k9t4p15_update_20] + +private theorem k9t4p15_part_0 : k9t4p15.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p15_part_1 : k9t4p15.chains.map List.length = ([[1], [4]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p15_part_2 : k9t4p15.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p15.clique))) = ([[1], [4]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p15_templates_item_0 : (⟨0, 1, [], [], [2], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6, 7, 8]], [], [2], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_2 : (⟨0, 2, [[3, 4, 5, 6, 7, 8]], [], [], 2, 2⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_3 : (⟨0, 3, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_4 : (⟨0, 3, [], [], [4, 5, 6, 7, 8], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_5 : (⟨0, 3, [], [2, 1], [4, 5, 6, 7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_6 : (⟨0, 4, [], [], [3], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_7 : (⟨0, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_8 : (⟨0, 5, [], [], [4, 3], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_9 : (⟨0, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_10 : (⟨0, 6, [], [], [5, 4, 3], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_11 : (⟨0, 6, [], [], [7, 8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_12 : (⟨0, 7, [], [], [6, 5, 4, 3], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_13 : (⟨0, 7, [], [], [8], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_14 : (⟨0, 8, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_15 : (⟨0, 8, [], [], [7, 6, 5, 4, 3], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_16 : (⟨0, 8, [], [2, 1], [7, 6, 5, 4, 3], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_17 : (⟨1, 2, [], [0], [], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_18 : (⟨1, 2, [[3, 4, 5, 6, 7, 8]], [0], [], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_19 : (⟨1, 3, [], [0], [], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_20 : (⟨1, 3, [], [0], [4, 5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_21 : (⟨1, 4, [], [0], [3], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_22 : (⟨1, 4, [], [0], [5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_23 : (⟨1, 5, [], [0], [4, 3], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_24 : (⟨1, 5, [], [0], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_25 : (⟨1, 6, [], [0], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_26 : (⟨1, 6, [], [0], [7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_27 : (⟨1, 7, [], [0], [6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_28 : (⟨1, 7, [], [0], [8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_29 : (⟨1, 8, [], [0], [], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_30 : (⟨1, 8, [], [0], [7, 6, 5, 4, 3], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_31 : (⟨2, 3, [], [], [4, 5, 6, 7, 8], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_32 : (⟨2, 3, [], [0, 1], [4, 5, 6, 7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_33 : (⟨2, 4, [], [], [3], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_34 : (⟨2, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_35 : (⟨2, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_36 : (⟨2, 6, [], [], [5, 4, 3], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_37 : (⟨2, 7, [], [], [6, 5, 4, 3], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_38 : (⟨2, 7, [], [], [8], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_39 : (⟨2, 8, [], [], [7, 6, 5, 4, 3], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_40 : (⟨2, 8, [], [0, 1], [7, 6, 5, 4, 3], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_41 : (⟨3, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_42 : (⟨3, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_43 : (⟨3, 6, [], [], [7, 8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_44 : (⟨3, 7, [], [], [8], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_45 : (⟨4, 5, [], [3], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_46 : (⟨4, 6, [], [3], [7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_47 : (⟨4, 7, [], [3], [8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_48 : (⟨5, 6, [], [3, 4], [7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_49 : (⟨5, 7, [], [3, 4], [8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_50 : (⟨6, 7, [], [3, 4, 5], [8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_51 : (⟨6, 8, [], [3, 4, 5], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_item_52 : (⟨7, 8, [], [3, 4, 5, 6], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p15_templates_block_0_check : ∀ T ∈ k9t4p15_templates_block_0, T.Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p15_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_templates_item_0, k9t4p15_templates_item_1, k9t4p15_templates_item_2, k9t4p15_templates_item_3, k9t4p15_templates_item_4, k9t4p15_templates_item_5, k9t4p15_templates_item_6, k9t4p15_templates_item_7, k9t4p15_templates_item_8, k9t4p15_templates_item_9, k9t4p15_templates_item_10, k9t4p15_templates_item_11⟩ + +private theorem k9t4p15_templates_block_1_check : ∀ T ∈ k9t4p15_templates_block_1, T.Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p15_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_templates_item_12, k9t4p15_templates_item_13, k9t4p15_templates_item_14, k9t4p15_templates_item_15, k9t4p15_templates_item_16, k9t4p15_templates_item_17, k9t4p15_templates_item_18, k9t4p15_templates_item_19, k9t4p15_templates_item_20, k9t4p15_templates_item_21, k9t4p15_templates_item_22, k9t4p15_templates_item_23⟩ + +private theorem k9t4p15_templates_block_2_check : ∀ T ∈ k9t4p15_templates_block_2, T.Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p15_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_templates_item_24, k9t4p15_templates_item_25, k9t4p15_templates_item_26, k9t4p15_templates_item_27, k9t4p15_templates_item_28, k9t4p15_templates_item_29, k9t4p15_templates_item_30, k9t4p15_templates_item_31, k9t4p15_templates_item_32, k9t4p15_templates_item_33, k9t4p15_templates_item_34, k9t4p15_templates_item_35⟩ + +private theorem k9t4p15_templates_block_3_check : ∀ T ∈ k9t4p15_templates_block_3, T.Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p15_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_templates_item_36, k9t4p15_templates_item_37, k9t4p15_templates_item_38, k9t4p15_templates_item_39, k9t4p15_templates_item_40, k9t4p15_templates_item_41, k9t4p15_templates_item_42, k9t4p15_templates_item_43, k9t4p15_templates_item_44, k9t4p15_templates_item_45, k9t4p15_templates_item_46, k9t4p15_templates_item_47⟩ + +private theorem k9t4p15_templates_block_4_check : ∀ T ∈ k9t4p15_templates_block_4, T.Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p15_templates_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p15_templates_item_48, k9t4p15_templates_item_49, k9t4p15_templates_item_50, k9t4p15_templates_item_51, k9t4p15_templates_item_52⟩ + +private theorem k9t4p15_part_3 : ∀ T ∈ k9t4p15.templates, T.Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t4p15_templates_block_0 ++ k9t4p15_templates_block_1 ++ k9t4p15_templates_block_2 ++ k9t4p15_templates_block_3 ++ k9t4p15_templates_block_4), T.Check k9t4p15.graph k9t4p15.clique 9 (patternAmount ([[1], [4]] : List (List ℕ))) (([[1], [4]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t4p15_templates_block_0_check, k9t4p15_templates_block_1_check⟩, k9t4p15_templates_block_2_check⟩, k9t4p15_templates_block_3_check⟩, k9t4p15_templates_block_4_check⟩ + +private theorem k9t4p15_part_4 : ∀ p ∈ k9t4p15.required, p.Check k9t4p15.graph 9 := by decide + +private theorem k9t4p15_part_5 : ClosureCheck k9t4p15.graph (k9t4p15.initialMatrix 9) 9 4 k9t4p15.closure := by + rw [k9t4p15_initial_eq] + exact k9t4p15_closure_0 + +private theorem k9t4p15_part_6 : k9t4p15.bad.Check k9t4p15.graph (k9t4p15.matrix 9) 9 4 := by + rw [k9t4p15_matrix_eq] + decide + +theorem k9t4p15_check : k9t4p15.Check 9 4 [[1], [4]] := + ⟨k9t4p15_part_0, k9t4p15_part_1, k9t4p15_part_2, k9t4p15_part_3, k9t4p15_part_4, k9t4p15_part_5, k9t4p15_part_6⟩ +def k9t4p16 : LayoutCertificate 7 where + chains := [[0, 1, 2, 3, 4, 5, 6]] + clique := {0, 2, 4, 6} + templates := [⟨0, 1, [], [], [2], 2, 7⟩, + ⟨0, 1, [], [], [2, 3, 4], 1, 5⟩, + ⟨0, 3, [], [], [2], 2, 7⟩, + ⟨0, 3, [], [2, 1], [4], 1, 5⟩, + ⟨0, 5, [], [], [4], 2, 7⟩, + ⟨0, 5, [], [2, 1], [4], 1, 5⟩, + ⟨1, 2, [], [0], [], 2, 7⟩, + ⟨1, 2, [], [0], [3, 4], 1, 5⟩, + ⟨1, 3, [], [0], [2], 1, 6⟩, + ⟨1, 4, [], [0], [], 2, 7⟩, + ⟨1, 4, [], [0], [3, 2], 1, 5⟩, + ⟨1, 5, [], [0], [4], 1, 6⟩, + ⟨1, 6, [], [0], [], 2, 7⟩, + ⟨1, 6, [[2, 3, 4]], [0], [], 1, 4⟩, + ⟨2, 3, [], [], [4], 2, 7⟩, + ⟨2, 3, [], [0, 1], [4], 1, 5⟩, + ⟨2, 5, [], [], [4], 2, 7⟩, + ⟨2, 5, [], [0, 1], [4], 1, 5⟩, + ⟨3, 4, [], [2], [], 2, 7⟩, + ⟨3, 4, [], [0, 1, 2], [], 1, 5⟩, + ⟨3, 5, [], [2], [4], 1, 6⟩, + ⟨3, 6, [], [2], [], 2, 7⟩, + ⟨3, 6, [], [0, 1, 2], [], 1, 5⟩, + ⟨4, 5, [], [], [6], 2, 7⟩, + ⟨4, 5, [[0, 1, 2]], [], [6], 1, 4⟩, + ⟨5, 6, [], [4], [], 2, 7⟩, + ⟨5, 6, [[0, 1, 2]], [4], [], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 3), (3, 3), (5, 3), (0, 3)}⟩ + + +private def k9t4p16_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p16_initial_eq_row_0 : ∀ j : Fin 7, (k9t4p16.initialMatrix 9) 0 j = k9t4p16_state_0 0 j := by decide + +private theorem k9t4p16_initial_eq_row_1 : ∀ j : Fin 7, (k9t4p16.initialMatrix 9) 1 j = k9t4p16_state_0 1 j := by decide + +private theorem k9t4p16_initial_eq_row_2 : ∀ j : Fin 7, (k9t4p16.initialMatrix 9) 2 j = k9t4p16_state_0 2 j := by decide + +private theorem k9t4p16_initial_eq_row_3 : ∀ j : Fin 7, (k9t4p16.initialMatrix 9) 3 j = k9t4p16_state_0 3 j := by decide + +private theorem k9t4p16_initial_eq_row_4 : ∀ j : Fin 7, (k9t4p16.initialMatrix 9) 4 j = k9t4p16_state_0 4 j := by decide + +private theorem k9t4p16_initial_eq_row_5 : ∀ j : Fin 7, (k9t4p16.initialMatrix 9) 5 j = k9t4p16_state_0 5 j := by decide + +private theorem k9t4p16_initial_eq_row_6 : ∀ j : Fin 7, (k9t4p16.initialMatrix 9) 6 j = k9t4p16_state_0 6 j := by decide + +private theorem k9t4p16_initial_eq : (k9t4p16.initialMatrix 9) = k9t4p16_state_0 := by + funext i j + fin_cases i + + · exact k9t4p16_initial_eq_row_0 j + + · exact k9t4p16_initial_eq_row_1 j + + · exact k9t4p16_initial_eq_row_2 j + + · exact k9t4p16_initial_eq_row_3 j + + · exact k9t4p16_initial_eq_row_4 j + + · exact k9t4p16_initial_eq_row_5 j + + · exact k9t4p16_initial_eq_row_6 j + +private theorem k9t4p16_closure_0 : ClosureCheck k9t4p16.graph k9t4p16_state_0 9 4 [] := by trivial + +private theorem k9t4p16_matrix_eq : k9t4p16.matrix 9 = k9t4p16_state_0 := by + change closureMatrix (k9t4p16.initialMatrix 9) _ = _ + rw [k9t4p16_initial_eq] + change closureMatrix k9t4p16_state_0 [] = _ + rfl + +private theorem k9t4p16_part_0 : k9t4p16.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p16_part_1 : k9t4p16.chains.map List.length = ([[1, 1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p16_part_2 : k9t4p16.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p16.clique))) = ([[1, 1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p16_templates_item_0 : (⟨0, 1, [], [], [2], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_2 : (⟨0, 3, [], [], [2], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_3 : (⟨0, 3, [], [2, 1], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_4 : (⟨0, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_5 : (⟨0, 5, [], [2, 1], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_6 : (⟨1, 2, [], [0], [], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_7 : (⟨1, 2, [], [0], [3, 4], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_8 : (⟨1, 3, [], [0], [2], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_9 : (⟨1, 4, [], [0], [], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_10 : (⟨1, 4, [], [0], [3, 2], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_11 : (⟨1, 5, [], [0], [4], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_12 : (⟨1, 6, [], [0], [], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_13 : (⟨1, 6, [[2, 3, 4]], [0], [], 1, 4⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_14 : (⟨2, 3, [], [], [4], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_15 : (⟨2, 3, [], [0, 1], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_16 : (⟨2, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_17 : (⟨2, 5, [], [0, 1], [4], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_18 : (⟨3, 4, [], [2], [], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_19 : (⟨3, 4, [], [0, 1, 2], [], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_20 : (⟨3, 5, [], [2], [4], 1, 6⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_21 : (⟨3, 6, [], [2], [], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_22 : (⟨3, 6, [], [0, 1, 2], [], 1, 5⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_23 : (⟨4, 5, [], [], [6], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_24 : (⟨4, 5, [[0, 1, 2]], [], [6], 1, 4⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_25 : (⟨5, 6, [], [4], [], 2, 7⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_templates_item_26 : (⟨5, 6, [[0, 1, 2]], [4], [], 1, 4⟩ : TemplateData (Fin 7)).Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p16_part_3 : ∀ T ∈ k9t4p16.templates, T.Check k9t4p16.graph k9t4p16.clique 9 (patternAmount ([[1, 1, 1]] : List (List ℕ))) (([[1, 1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p16, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p16_templates_item_0, k9t4p16_templates_item_1, k9t4p16_templates_item_2, k9t4p16_templates_item_3, k9t4p16_templates_item_4, k9t4p16_templates_item_5, k9t4p16_templates_item_6, k9t4p16_templates_item_7, k9t4p16_templates_item_8, k9t4p16_templates_item_9, k9t4p16_templates_item_10, k9t4p16_templates_item_11, k9t4p16_templates_item_12, k9t4p16_templates_item_13, k9t4p16_templates_item_14, k9t4p16_templates_item_15, k9t4p16_templates_item_16, k9t4p16_templates_item_17, k9t4p16_templates_item_18, k9t4p16_templates_item_19, k9t4p16_templates_item_20, k9t4p16_templates_item_21, k9t4p16_templates_item_22, k9t4p16_templates_item_23, k9t4p16_templates_item_24, k9t4p16_templates_item_25, k9t4p16_templates_item_26⟩ + +private theorem k9t4p16_part_4 : ∀ p ∈ k9t4p16.required, p.Check k9t4p16.graph 9 := by decide + +private theorem k9t4p16_part_5 : ClosureCheck k9t4p16.graph (k9t4p16.initialMatrix 9) 9 4 k9t4p16.closure := by + rw [k9t4p16_initial_eq] + exact k9t4p16_closure_0 + +private theorem k9t4p16_part_6 : k9t4p16.bad.Check k9t4p16.graph (k9t4p16.matrix 9) 9 4 := by + rw [k9t4p16_matrix_eq] + decide + +theorem k9t4p16_check : k9t4p16.Check 9 4 [[1, 1, 1]] := + ⟨k9t4p16_part_0, k9t4p16_part_1, k9t4p16_part_2, k9t4p16_part_3, k9t4p16_part_4, k9t4p16_part_5, k9t4p16_part_6⟩ +private def k9t4p17_templates_block_0 : List (TemplateData (Fin 8)) := [⟨0, 1, [], [], [2, 3, 4], 2, 5⟩, ⟨0, 1, [[4, 5, 6, 7]], [], [2], 1, 3⟩, ⟨0, 3, [], [2, 1], [4], 2, 5⟩, ⟨0, 3, [[4, 5, 6, 7]], [], [2], 1, 3⟩, ⟨0, 5, [], [], [6, 7], 2, 6⟩, ⟨0, 5, [], [2, 1], [6, 7], 1, 4⟩, ⟨0, 6, [], [], [5, 4], 2, 6⟩, ⟨0, 6, [], [2, 1], [5, 4], 1, 4⟩, ⟨1, 2, [], [0], [3, 4], 2, 5⟩, ⟨1, 2, [[4, 5, 6, 7]], [0], [], 1, 3⟩, ⟨1, 3, [], [0], [2], 2, 6⟩, ⟨1, 3, [[4, 5, 6, 7]], [0], [2], 1, 2⟩] + +private def k9t4p17_templates_block_1 : List (TemplateData (Fin 8)) := [⟨1, 4, [], [0], [3, 2], 2, 5⟩, ⟨1, 4, [], [0], [5, 6, 7], 1, 4⟩, ⟨1, 5, [], [0], [4], 2, 6⟩, ⟨1, 5, [], [0], [6, 7], 1, 5⟩, ⟨1, 6, [], [0], [5, 4], 1, 5⟩, ⟨1, 6, [], [0], [7], 2, 6⟩, ⟨1, 7, [[2, 3, 4]], [0], [], 2, 4⟩, ⟨1, 7, [], [0], [6, 5, 4], 1, 4⟩, ⟨2, 3, [], [0, 1], [4], 2, 5⟩, ⟨2, 3, [], [], [4, 5, 6, 7], 1, 4⟩, ⟨2, 5, [], [], [6, 7], 2, 6⟩, ⟨2, 5, [], [0, 1], [6, 7], 1, 4⟩] + +private def k9t4p17_templates_block_2 : List (TemplateData (Fin 8)) := [⟨2, 6, [], [], [5, 4], 2, 6⟩, ⟨2, 6, [], [0, 1], [5, 4], 1, 4⟩, ⟨3, 4, [], [0, 1, 2], [], 2, 5⟩, ⟨3, 4, [], [2], [5, 6, 7], 1, 4⟩, ⟨3, 5, [], [2], [4], 2, 6⟩, ⟨3, 5, [], [2], [6, 7], 1, 5⟩, ⟨3, 6, [], [2], [5, 4], 1, 5⟩, ⟨3, 6, [], [2], [7], 2, 6⟩, ⟨3, 7, [], [0, 1, 2], [], 2, 5⟩, ⟨3, 7, [], [2], [6, 5, 4], 1, 4⟩, ⟨4, 5, [], [], [6, 7], 2, 6⟩, ⟨4, 5, [[0, 1, 2]], [], [6, 7], 1, 3⟩] + +private def k9t4p17_templates_block_3 : List (TemplateData (Fin 8)) := [⟨5, 6, [], [4], [7], 2, 6⟩, ⟨5, 6, [[0, 1, 2]], [4], [7], 1, 3⟩, ⟨6, 7, [], [4, 5], [], 2, 6⟩, ⟨6, 7, [[0, 1, 2]], [4, 5], [], 1, 3⟩] + +def k9t4p17 : LayoutCertificate 8 where + chains := [[0, 1, 2, 3, 4, 5, 6, 7]] + clique := {0, 2, 4, 7} + templates := k9t4p17_templates_block_0 ++ k9t4p17_templates_block_1 ++ k9t4p17_templates_block_2 ++ k9t4p17_templates_block_3 + required := [] + closure := [] + bad := ⟨none, {(1, 3), (3, 3), (5, 3), (6, 3)}⟩ + + +private def k9t4p17_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5], + #[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[∅, Finset.Icc 1 4, ∅, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p17_template_matrix_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p17_template_matrix_0_eq_row_0 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_0) 0 j = k9t4p17_template_matrix_0 0 j := by decide + +private theorem k9t4p17_template_matrix_0_eq_row_1 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_0) 1 j = k9t4p17_template_matrix_0 1 j := by decide + +private theorem k9t4p17_template_matrix_0_eq_row_2 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_0) 2 j = k9t4p17_template_matrix_0 2 j := by decide + +private theorem k9t4p17_template_matrix_0_eq_row_3 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_0) 3 j = k9t4p17_template_matrix_0 3 j := by decide + +private theorem k9t4p17_template_matrix_0_eq_row_4 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_0) 4 j = k9t4p17_template_matrix_0 4 j := by decide + +private theorem k9t4p17_template_matrix_0_eq_row_5 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_0) 5 j = k9t4p17_template_matrix_0 5 j := by decide + +private theorem k9t4p17_template_matrix_0_eq_row_6 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_0) 6 j = k9t4p17_template_matrix_0 6 j := by decide + +private theorem k9t4p17_template_matrix_0_eq_row_7 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_0) 7 j = k9t4p17_template_matrix_0 7 j := by decide + +private theorem k9t4p17_template_matrix_0_eq : (templateMatrix k9t4p17_templates_block_0) = k9t4p17_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t4p17_template_matrix_0_eq_row_0 j + + · exact k9t4p17_template_matrix_0_eq_row_1 j + + · exact k9t4p17_template_matrix_0_eq_row_2 j + + · exact k9t4p17_template_matrix_0_eq_row_3 j + + · exact k9t4p17_template_matrix_0_eq_row_4 j + + · exact k9t4p17_template_matrix_0_eq_row_5 j + + · exact k9t4p17_template_matrix_0_eq_row_6 j + + · exact k9t4p17_template_matrix_0_eq_row_7 j + +private def k9t4p17_template_matrix_1 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, ∅, ∅], + #[∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p17_template_matrix_1_eq_row_0 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_1) 0 j = k9t4p17_template_matrix_1 0 j := by decide + +private theorem k9t4p17_template_matrix_1_eq_row_1 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_1) 1 j = k9t4p17_template_matrix_1 1 j := by decide + +private theorem k9t4p17_template_matrix_1_eq_row_2 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_1) 2 j = k9t4p17_template_matrix_1 2 j := by decide + +private theorem k9t4p17_template_matrix_1_eq_row_3 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_1) 3 j = k9t4p17_template_matrix_1 3 j := by decide + +private theorem k9t4p17_template_matrix_1_eq_row_4 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_1) 4 j = k9t4p17_template_matrix_1 4 j := by decide + +private theorem k9t4p17_template_matrix_1_eq_row_5 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_1) 5 j = k9t4p17_template_matrix_1 5 j := by decide + +private theorem k9t4p17_template_matrix_1_eq_row_6 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_1) 6 j = k9t4p17_template_matrix_1 6 j := by decide + +private theorem k9t4p17_template_matrix_1_eq_row_7 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_1) 7 j = k9t4p17_template_matrix_1 7 j := by decide + +private theorem k9t4p17_template_matrix_1_eq : (templateMatrix k9t4p17_templates_block_1) = k9t4p17_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t4p17_template_matrix_1_eq_row_0 j + + · exact k9t4p17_template_matrix_1_eq_row_1 j + + · exact k9t4p17_template_matrix_1_eq_row_2 j + + · exact k9t4p17_template_matrix_1_eq_row_3 j + + · exact k9t4p17_template_matrix_1_eq_row_4 j + + · exact k9t4p17_template_matrix_1_eq_row_5 j + + · exact k9t4p17_template_matrix_1_eq_row_6 j + + · exact k9t4p17_template_matrix_1_eq_row_7 j + +private def k9t4p17_template_matrix_2 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p17_template_matrix_2_eq_row_0 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_2) 0 j = k9t4p17_template_matrix_2 0 j := by decide + +private theorem k9t4p17_template_matrix_2_eq_row_1 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_2) 1 j = k9t4p17_template_matrix_2 1 j := by decide + +private theorem k9t4p17_template_matrix_2_eq_row_2 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_2) 2 j = k9t4p17_template_matrix_2 2 j := by decide + +private theorem k9t4p17_template_matrix_2_eq_row_3 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_2) 3 j = k9t4p17_template_matrix_2 3 j := by decide + +private theorem k9t4p17_template_matrix_2_eq_row_4 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_2) 4 j = k9t4p17_template_matrix_2 4 j := by decide + +private theorem k9t4p17_template_matrix_2_eq_row_5 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_2) 5 j = k9t4p17_template_matrix_2 5 j := by decide + +private theorem k9t4p17_template_matrix_2_eq_row_6 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_2) 6 j = k9t4p17_template_matrix_2 6 j := by decide + +private theorem k9t4p17_template_matrix_2_eq_row_7 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_2) 7 j = k9t4p17_template_matrix_2 7 j := by decide + +private theorem k9t4p17_template_matrix_2_eq : (templateMatrix k9t4p17_templates_block_2) = k9t4p17_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t4p17_template_matrix_2_eq_row_0 j + + · exact k9t4p17_template_matrix_2_eq_row_1 j + + · exact k9t4p17_template_matrix_2_eq_row_2 j + + · exact k9t4p17_template_matrix_2_eq_row_3 j + + · exact k9t4p17_template_matrix_2_eq_row_4 j + + · exact k9t4p17_template_matrix_2_eq_row_5 j + + · exact k9t4p17_template_matrix_2_eq_row_6 j + + · exact k9t4p17_template_matrix_2_eq_row_7 j + +private def k9t4p17_template_matrix_3 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p17_template_matrix_3_eq_row_0 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_3) 0 j = k9t4p17_template_matrix_3 0 j := by decide + +private theorem k9t4p17_template_matrix_3_eq_row_1 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_3) 1 j = k9t4p17_template_matrix_3 1 j := by decide + +private theorem k9t4p17_template_matrix_3_eq_row_2 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_3) 2 j = k9t4p17_template_matrix_3 2 j := by decide + +private theorem k9t4p17_template_matrix_3_eq_row_3 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_3) 3 j = k9t4p17_template_matrix_3 3 j := by decide + +private theorem k9t4p17_template_matrix_3_eq_row_4 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_3) 4 j = k9t4p17_template_matrix_3 4 j := by decide + +private theorem k9t4p17_template_matrix_3_eq_row_5 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_3) 5 j = k9t4p17_template_matrix_3 5 j := by decide + +private theorem k9t4p17_template_matrix_3_eq_row_6 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_3) 6 j = k9t4p17_template_matrix_3 6 j := by decide + +private theorem k9t4p17_template_matrix_3_eq_row_7 : ∀ j : Fin 8, (templateMatrix k9t4p17_templates_block_3) 7 j = k9t4p17_template_matrix_3 7 j := by decide + +private theorem k9t4p17_template_matrix_3_eq : (templateMatrix k9t4p17_templates_block_3) = k9t4p17_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t4p17_template_matrix_3_eq_row_0 j + + · exact k9t4p17_template_matrix_3_eq_row_1 j + + · exact k9t4p17_template_matrix_3_eq_row_2 j + + · exact k9t4p17_template_matrix_3_eq_row_3 j + + · exact k9t4p17_template_matrix_3_eq_row_4 j + + · exact k9t4p17_template_matrix_3_eq_row_5 j + + · exact k9t4p17_template_matrix_3_eq_row_6 j + + · exact k9t4p17_template_matrix_3_eq_row_7 j + +private theorem k9t4p17_initial_merged_eq_row_0 : ∀ j : Fin 8, (fun i j => (((k9t4p17_template_matrix_0 i j ∪ k9t4p17_template_matrix_1 i j) ∪ k9t4p17_template_matrix_2 i j) ∪ k9t4p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p17.required i j) 0 j = k9t4p17_state_0 0 j := by decide + +private theorem k9t4p17_initial_merged_eq_row_1 : ∀ j : Fin 8, (fun i j => (((k9t4p17_template_matrix_0 i j ∪ k9t4p17_template_matrix_1 i j) ∪ k9t4p17_template_matrix_2 i j) ∪ k9t4p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p17.required i j) 1 j = k9t4p17_state_0 1 j := by decide + +private theorem k9t4p17_initial_merged_eq_row_2 : ∀ j : Fin 8, (fun i j => (((k9t4p17_template_matrix_0 i j ∪ k9t4p17_template_matrix_1 i j) ∪ k9t4p17_template_matrix_2 i j) ∪ k9t4p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p17.required i j) 2 j = k9t4p17_state_0 2 j := by decide + +private theorem k9t4p17_initial_merged_eq_row_3 : ∀ j : Fin 8, (fun i j => (((k9t4p17_template_matrix_0 i j ∪ k9t4p17_template_matrix_1 i j) ∪ k9t4p17_template_matrix_2 i j) ∪ k9t4p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p17.required i j) 3 j = k9t4p17_state_0 3 j := by decide + +private theorem k9t4p17_initial_merged_eq_row_4 : ∀ j : Fin 8, (fun i j => (((k9t4p17_template_matrix_0 i j ∪ k9t4p17_template_matrix_1 i j) ∪ k9t4p17_template_matrix_2 i j) ∪ k9t4p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p17.required i j) 4 j = k9t4p17_state_0 4 j := by decide + +private theorem k9t4p17_initial_merged_eq_row_5 : ∀ j : Fin 8, (fun i j => (((k9t4p17_template_matrix_0 i j ∪ k9t4p17_template_matrix_1 i j) ∪ k9t4p17_template_matrix_2 i j) ∪ k9t4p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p17.required i j) 5 j = k9t4p17_state_0 5 j := by decide + +private theorem k9t4p17_initial_merged_eq_row_6 : ∀ j : Fin 8, (fun i j => (((k9t4p17_template_matrix_0 i j ∪ k9t4p17_template_matrix_1 i j) ∪ k9t4p17_template_matrix_2 i j) ∪ k9t4p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p17.required i j) 6 j = k9t4p17_state_0 6 j := by decide + +private theorem k9t4p17_initial_merged_eq_row_7 : ∀ j : Fin 8, (fun i j => (((k9t4p17_template_matrix_0 i j ∪ k9t4p17_template_matrix_1 i j) ∪ k9t4p17_template_matrix_2 i j) ∪ k9t4p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p17.required i j) 7 j = k9t4p17_state_0 7 j := by decide + +private theorem k9t4p17_initial_merged_eq : (fun i j => (((k9t4p17_template_matrix_0 i j ∪ k9t4p17_template_matrix_1 i j) ∪ k9t4p17_template_matrix_2 i j) ∪ k9t4p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p17.required i j) = k9t4p17_state_0 := by + funext i j + fin_cases i + + · exact k9t4p17_initial_merged_eq_row_0 j + + · exact k9t4p17_initial_merged_eq_row_1 j + + · exact k9t4p17_initial_merged_eq_row_2 j + + · exact k9t4p17_initial_merged_eq_row_3 j + + · exact k9t4p17_initial_merged_eq_row_4 j + + · exact k9t4p17_initial_merged_eq_row_5 j + + · exact k9t4p17_initial_merged_eq_row_6 j + + · exact k9t4p17_initial_merged_eq_row_7 j + +private theorem k9t4p17_initial_eq : k9t4p17.initialMatrix 9 = k9t4p17_state_0 := by + funext i j + change templateMatrix (k9t4p17_templates_block_0 ++ k9t4p17_templates_block_1 ++ k9t4p17_templates_block_2 ++ k9t4p17_templates_block_3) i j ∪ requiredMatrix 9 k9t4p17.required i j = _ + simp only [templateMatrix_append, k9t4p17_template_matrix_0_eq, k9t4p17_template_matrix_1_eq, k9t4p17_template_matrix_2_eq, k9t4p17_template_matrix_3_eq] + exact congrFun (congrFun k9t4p17_initial_merged_eq i) j + +private theorem k9t4p17_closure_0 : ClosureCheck k9t4p17.graph k9t4p17_state_0 9 4 [] := by trivial + +private theorem k9t4p17_matrix_eq : k9t4p17.matrix 9 = k9t4p17_state_0 := by + change closureMatrix (k9t4p17.initialMatrix 9) _ = _ + rw [k9t4p17_initial_eq] + change closureMatrix k9t4p17_state_0 [] = _ + rfl + +private theorem k9t4p17_part_0 : k9t4p17.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p17_part_1 : k9t4p17.chains.map List.length = ([[1, 1, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p17_part_2 : k9t4p17.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p17.clique))) = ([[1, 1, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p17_templates_item_0 : (⟨0, 1, [], [], [2, 3, 4], 2, 5⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_1 : (⟨0, 1, [[4, 5, 6, 7]], [], [2], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_2 : (⟨0, 3, [], [2, 1], [4], 2, 5⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_3 : (⟨0, 3, [[4, 5, 6, 7]], [], [2], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_4 : (⟨0, 5, [], [], [6, 7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_5 : (⟨0, 5, [], [2, 1], [6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_6 : (⟨0, 6, [], [], [5, 4], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_7 : (⟨0, 6, [], [2, 1], [5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_8 : (⟨1, 2, [], [0], [3, 4], 2, 5⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_9 : (⟨1, 2, [[4, 5, 6, 7]], [0], [], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_10 : (⟨1, 3, [], [0], [2], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_11 : (⟨1, 3, [[4, 5, 6, 7]], [0], [2], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_12 : (⟨1, 4, [], [0], [3, 2], 2, 5⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_13 : (⟨1, 4, [], [0], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_14 : (⟨1, 5, [], [0], [4], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_15 : (⟨1, 5, [], [0], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_16 : (⟨1, 6, [], [0], [5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_17 : (⟨1, 6, [], [0], [7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_18 : (⟨1, 7, [[2, 3, 4]], [0], [], 2, 4⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_19 : (⟨1, 7, [], [0], [6, 5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_20 : (⟨2, 3, [], [0, 1], [4], 2, 5⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_21 : (⟨2, 3, [], [], [4, 5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_22 : (⟨2, 5, [], [], [6, 7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_23 : (⟨2, 5, [], [0, 1], [6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_24 : (⟨2, 6, [], [], [5, 4], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_25 : (⟨2, 6, [], [0, 1], [5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_26 : (⟨3, 4, [], [0, 1, 2], [], 2, 5⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_27 : (⟨3, 4, [], [2], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_28 : (⟨3, 5, [], [2], [4], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_29 : (⟨3, 5, [], [2], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_30 : (⟨3, 6, [], [2], [5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_31 : (⟨3, 6, [], [2], [7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_32 : (⟨3, 7, [], [0, 1, 2], [], 2, 5⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_33 : (⟨3, 7, [], [2], [6, 5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_34 : (⟨4, 5, [], [], [6, 7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_35 : (⟨4, 5, [[0, 1, 2]], [], [6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_36 : (⟨5, 6, [], [4], [7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_37 : (⟨5, 6, [[0, 1, 2]], [4], [7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_38 : (⟨6, 7, [], [4, 5], [], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_item_39 : (⟨6, 7, [[0, 1, 2]], [4, 5], [], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p17_templates_block_0_check : ∀ T ∈ k9t4p17_templates_block_0, T.Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p17_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p17_templates_item_0, k9t4p17_templates_item_1, k9t4p17_templates_item_2, k9t4p17_templates_item_3, k9t4p17_templates_item_4, k9t4p17_templates_item_5, k9t4p17_templates_item_6, k9t4p17_templates_item_7, k9t4p17_templates_item_8, k9t4p17_templates_item_9, k9t4p17_templates_item_10, k9t4p17_templates_item_11⟩ + +private theorem k9t4p17_templates_block_1_check : ∀ T ∈ k9t4p17_templates_block_1, T.Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p17_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p17_templates_item_12, k9t4p17_templates_item_13, k9t4p17_templates_item_14, k9t4p17_templates_item_15, k9t4p17_templates_item_16, k9t4p17_templates_item_17, k9t4p17_templates_item_18, k9t4p17_templates_item_19, k9t4p17_templates_item_20, k9t4p17_templates_item_21, k9t4p17_templates_item_22, k9t4p17_templates_item_23⟩ + +private theorem k9t4p17_templates_block_2_check : ∀ T ∈ k9t4p17_templates_block_2, T.Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p17_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p17_templates_item_24, k9t4p17_templates_item_25, k9t4p17_templates_item_26, k9t4p17_templates_item_27, k9t4p17_templates_item_28, k9t4p17_templates_item_29, k9t4p17_templates_item_30, k9t4p17_templates_item_31, k9t4p17_templates_item_32, k9t4p17_templates_item_33, k9t4p17_templates_item_34, k9t4p17_templates_item_35⟩ + +private theorem k9t4p17_templates_block_3_check : ∀ T ∈ k9t4p17_templates_block_3, T.Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p17_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p17_templates_item_36, k9t4p17_templates_item_37, k9t4p17_templates_item_38, k9t4p17_templates_item_39⟩ + +private theorem k9t4p17_part_3 : ∀ T ∈ k9t4p17.templates, T.Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t4p17_templates_block_0 ++ k9t4p17_templates_block_1 ++ k9t4p17_templates_block_2 ++ k9t4p17_templates_block_3), T.Check k9t4p17.graph k9t4p17.clique 9 (patternAmount ([[1, 1, 2]] : List (List ℕ))) (([[1, 1, 2]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p17_templates_block_0_check, k9t4p17_templates_block_1_check⟩, k9t4p17_templates_block_2_check⟩, k9t4p17_templates_block_3_check⟩ + +private theorem k9t4p17_part_4 : ∀ p ∈ k9t4p17.required, p.Check k9t4p17.graph 9 := by decide + +private theorem k9t4p17_part_5 : ClosureCheck k9t4p17.graph (k9t4p17.initialMatrix 9) 9 4 k9t4p17.closure := by + rw [k9t4p17_initial_eq] + exact k9t4p17_closure_0 + +private theorem k9t4p17_part_6 : k9t4p17.bad.Check k9t4p17.graph (k9t4p17.matrix 9) 9 4 := by + rw [k9t4p17_matrix_eq] + decide + +theorem k9t4p17_check : k9t4p17.Check 9 4 [[1, 1, 2]] := + ⟨k9t4p17_part_0, k9t4p17_part_1, k9t4p17_part_2, k9t4p17_part_3, k9t4p17_part_4, k9t4p17_part_5, k9t4p17_part_6⟩ +def k9t4p18 : LayoutCertificate 9 where + chains := [[0, 1, 2, 3, 4, 5, 6, 7, 8]] + clique := {0, 2, 4, 8} + templates := [⟨0, 1, [], [], [2], 4, 7⟩, + ⟨0, 1, [], [], [2, 3, 4], 3, 5⟩, + ⟨0, 1, [[4, 5, 6, 7, 8]], [], [2], 1, 2⟩, + ⟨0, 3, [], [], [2], 4, 7⟩, + ⟨0, 3, [], [2, 1], [4], 3, 5⟩, + ⟨0, 3, [[4, 5, 6, 7, 8]], [], [2], 1, 2⟩, + ⟨0, 5, [], [], [4], 4, 7⟩, + ⟨0, 5, [], [], [6, 7, 8], 2, 5⟩, + ⟨0, 5, [], [2, 1], [6, 7, 8], 1, 3⟩, + ⟨0, 7, [], [], [6, 5, 4], 2, 5⟩, + ⟨0, 7, [], [2, 1], [6, 5, 4], 1, 3⟩, + ⟨1, 2, [[4, 5, 6, 7, 8]], [0], [], 1, 2⟩, + ⟨1, 3, [], [0], [2], 3, 6⟩, + ⟨1, 3, [[4, 5, 6, 7, 8]], [0], [2], 1, 1⟩, + ⟨1, 3, [], [0], [4, 5, 6, 7, 8], 1, 2⟩, + ⟨1, 4, [], [0], [5, 6, 7, 8], 1, 3⟩, + ⟨1, 5, [], [0], [4], 3, 6⟩, + ⟨1, 5, [], [0], [6, 7, 8], 1, 4⟩, + ⟨1, 6, [], [0], [5, 4], 2, 5⟩, + ⟨1, 6, [], [0], [5, 4, 3, 2], 1, 3⟩, + ⟨1, 7, [], [0], [6, 5, 4], 1, 4⟩, + ⟨1, 8, [], [0], [7, 6, 5, 4], 1, 3⟩, + ⟨2, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩, + ⟨2, 5, [], [], [6, 7, 8], 2, 5⟩, + ⟨2, 5, [], [0, 1], [6, 7, 8], 1, 3⟩, + ⟨3, 4, [], [2], [5, 6, 7, 8], 1, 3⟩, + ⟨3, 5, [], [2], [4], 3, 6⟩, + ⟨3, 5, [], [2], [6, 7, 8], 1, 4⟩, + ⟨3, 6, [], [2], [5, 4], 2, 5⟩, + ⟨3, 6, [], [0, 1, 2], [5, 4], 1, 3⟩, + ⟨3, 7, [], [2], [6, 5, 4], 1, 4⟩, + ⟨3, 8, [], [2], [7, 6, 5, 4], 1, 3⟩, + ⟨4, 5, [], [], [6, 7, 8], 2, 5⟩, + ⟨4, 5, [[0, 1, 2]], [], [6, 7, 8], 1, 2⟩, + ⟨5, 6, [], [4], [7, 8], 2, 5⟩, + ⟨5, 6, [[0, 1, 2]], [4], [7, 8], 1, 2⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 3), (3, 3), (5, 3), (0, 3)}⟩ + + +private def k9t4p18_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 7, ∅, {1, 2}, Finset.Icc 1 6, {1, 2, 3}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[∅, {1, 2}, ∅, {1, 2, 3}, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[∅, {1, 2, 3}, ∅, {1, 2, 3}, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅], + #[∅, {1, 2, 3}, ∅, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p18_initial_eq_row_0 : ∀ j : Fin 9, (k9t4p18.initialMatrix 9) 0 j = k9t4p18_state_0 0 j := by decide + +private theorem k9t4p18_initial_eq_row_1 : ∀ j : Fin 9, (k9t4p18.initialMatrix 9) 1 j = k9t4p18_state_0 1 j := by decide + +private theorem k9t4p18_initial_eq_row_2 : ∀ j : Fin 9, (k9t4p18.initialMatrix 9) 2 j = k9t4p18_state_0 2 j := by decide + +private theorem k9t4p18_initial_eq_row_3 : ∀ j : Fin 9, (k9t4p18.initialMatrix 9) 3 j = k9t4p18_state_0 3 j := by decide + +private theorem k9t4p18_initial_eq_row_4 : ∀ j : Fin 9, (k9t4p18.initialMatrix 9) 4 j = k9t4p18_state_0 4 j := by decide + +private theorem k9t4p18_initial_eq_row_5 : ∀ j : Fin 9, (k9t4p18.initialMatrix 9) 5 j = k9t4p18_state_0 5 j := by decide + +private theorem k9t4p18_initial_eq_row_6 : ∀ j : Fin 9, (k9t4p18.initialMatrix 9) 6 j = k9t4p18_state_0 6 j := by decide + +private theorem k9t4p18_initial_eq_row_7 : ∀ j : Fin 9, (k9t4p18.initialMatrix 9) 7 j = k9t4p18_state_0 7 j := by decide + +private theorem k9t4p18_initial_eq_row_8 : ∀ j : Fin 9, (k9t4p18.initialMatrix 9) 8 j = k9t4p18_state_0 8 j := by decide + +private theorem k9t4p18_initial_eq : (k9t4p18.initialMatrix 9) = k9t4p18_state_0 := by + funext i j + fin_cases i + + · exact k9t4p18_initial_eq_row_0 j + + · exact k9t4p18_initial_eq_row_1 j + + · exact k9t4p18_initial_eq_row_2 j + + · exact k9t4p18_initial_eq_row_3 j + + · exact k9t4p18_initial_eq_row_4 j + + · exact k9t4p18_initial_eq_row_5 j + + · exact k9t4p18_initial_eq_row_6 j + + · exact k9t4p18_initial_eq_row_7 j + + · exact k9t4p18_initial_eq_row_8 j + +private theorem k9t4p18_closure_0 : ClosureCheck k9t4p18.graph k9t4p18_state_0 9 4 [] := by trivial + +private theorem k9t4p18_matrix_eq : k9t4p18.matrix 9 = k9t4p18_state_0 := by + change closureMatrix (k9t4p18.initialMatrix 9) _ = _ + rw [k9t4p18_initial_eq] + change closureMatrix k9t4p18_state_0 [] = _ + rfl + +private theorem k9t4p18_part_0 : k9t4p18.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p18_part_1 : k9t4p18.chains.map List.length = ([[1, 1, 3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p18_part_2 : k9t4p18.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p18.clique))) = ([[1, 1, 3]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p18_templates_item_0 : (⟨0, 1, [], [], [2], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4], 3, 5⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_2 : (⟨0, 1, [[4, 5, 6, 7, 8]], [], [2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_3 : (⟨0, 3, [], [], [2], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_4 : (⟨0, 3, [], [2, 1], [4], 3, 5⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_5 : (⟨0, 3, [[4, 5, 6, 7, 8]], [], [2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_6 : (⟨0, 5, [], [], [4], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_7 : (⟨0, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_8 : (⟨0, 5, [], [2, 1], [6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_9 : (⟨0, 7, [], [], [6, 5, 4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_10 : (⟨0, 7, [], [2, 1], [6, 5, 4], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_11 : (⟨1, 2, [[4, 5, 6, 7, 8]], [0], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_12 : (⟨1, 3, [], [0], [2], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_13 : (⟨1, 3, [[4, 5, 6, 7, 8]], [0], [2], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_14 : (⟨1, 3, [], [0], [4, 5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_15 : (⟨1, 4, [], [0], [5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_16 : (⟨1, 5, [], [0], [4], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_17 : (⟨1, 5, [], [0], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_18 : (⟨1, 6, [], [0], [5, 4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_19 : (⟨1, 6, [], [0], [5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_20 : (⟨1, 7, [], [0], [6, 5, 4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_21 : (⟨1, 8, [], [0], [7, 6, 5, 4], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_22 : (⟨2, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_23 : (⟨2, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_24 : (⟨2, 5, [], [0, 1], [6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_25 : (⟨3, 4, [], [2], [5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_26 : (⟨3, 5, [], [2], [4], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_27 : (⟨3, 5, [], [2], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_28 : (⟨3, 6, [], [2], [5, 4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_29 : (⟨3, 6, [], [0, 1, 2], [5, 4], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_30 : (⟨3, 7, [], [2], [6, 5, 4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_31 : (⟨3, 8, [], [2], [7, 6, 5, 4], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_32 : (⟨4, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_33 : (⟨4, 5, [[0, 1, 2]], [], [6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_34 : (⟨5, 6, [], [4], [7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_templates_item_35 : (⟨5, 6, [[0, 1, 2]], [4], [7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p18_part_3 : ∀ T ∈ k9t4p18.templates, T.Check k9t4p18.graph k9t4p18.clique 9 (patternAmount ([[1, 1, 3]] : List (List ℕ))) (([[1, 1, 3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p18, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p18_templates_item_0, k9t4p18_templates_item_1, k9t4p18_templates_item_2, k9t4p18_templates_item_3, k9t4p18_templates_item_4, k9t4p18_templates_item_5, k9t4p18_templates_item_6, k9t4p18_templates_item_7, k9t4p18_templates_item_8, k9t4p18_templates_item_9, k9t4p18_templates_item_10, k9t4p18_templates_item_11, k9t4p18_templates_item_12, k9t4p18_templates_item_13, k9t4p18_templates_item_14, k9t4p18_templates_item_15, k9t4p18_templates_item_16, k9t4p18_templates_item_17, k9t4p18_templates_item_18, k9t4p18_templates_item_19, k9t4p18_templates_item_20, k9t4p18_templates_item_21, k9t4p18_templates_item_22, k9t4p18_templates_item_23, k9t4p18_templates_item_24, k9t4p18_templates_item_25, k9t4p18_templates_item_26, k9t4p18_templates_item_27, k9t4p18_templates_item_28, k9t4p18_templates_item_29, k9t4p18_templates_item_30, k9t4p18_templates_item_31, k9t4p18_templates_item_32, k9t4p18_templates_item_33, k9t4p18_templates_item_34, k9t4p18_templates_item_35⟩ + +private theorem k9t4p18_part_4 : ∀ p ∈ k9t4p18.required, p.Check k9t4p18.graph 9 := by decide + +private theorem k9t4p18_part_5 : ClosureCheck k9t4p18.graph (k9t4p18.initialMatrix 9) 9 4 k9t4p18.closure := by + rw [k9t4p18_initial_eq] + exact k9t4p18_closure_0 + +private theorem k9t4p18_part_6 : k9t4p18.bad.Check k9t4p18.graph (k9t4p18.matrix 9) 9 4 := by + rw [k9t4p18_matrix_eq] + decide + +theorem k9t4p18_check : k9t4p18.Check 9 4 [[1, 1, 3]] := + ⟨k9t4p18_part_0, k9t4p18_part_1, k9t4p18_part_2, k9t4p18_part_3, k9t4p18_part_4, k9t4p18_part_5, k9t4p18_part_6⟩ +def k9t4p19 : LayoutCertificate 8 where + chains := [[0, 1, 2, 3, 4, 5, 6, 7]] + clique := {0, 2, 5, 7} + templates := [⟨0, 1, [], [], [2, 3, 4, 5], 1, 4⟩, + ⟨0, 3, [], [], [4, 5], 2, 6⟩, + ⟨0, 3, [], [2, 1], [4, 5], 1, 4⟩, + ⟨0, 4, [], [], [3, 2], 2, 6⟩, + ⟨0, 4, [[5, 6, 7]], [], [3, 2], 1, 3⟩, + ⟨0, 6, [], [2, 1], [5], 2, 5⟩, + ⟨0, 6, [], [], [5, 4, 3, 2], 1, 4⟩, + ⟨1, 2, [], [0], [3, 4, 5], 1, 4⟩, + ⟨1, 3, [], [0], [2], 2, 6⟩, + ⟨1, 3, [], [0], [4, 5], 1, 5⟩, + ⟨1, 4, [], [0], [3, 2], 1, 5⟩, + ⟨1, 4, [], [0], [5], 2, 6⟩, + ⟨1, 5, [], [0], [4, 3, 2], 1, 4⟩, + ⟨1, 6, [], [0], [5], 2, 6⟩, + ⟨1, 6, [], [0], [5, 4, 3, 2], 1, 3⟩, + ⟨1, 7, [[2, 3, 4, 5]], [0], [], 1, 3⟩, + ⟨2, 3, [], [], [4, 5], 2, 6⟩, + ⟨2, 3, [], [0, 1], [4, 5], 1, 4⟩, + ⟨2, 6, [], [0, 1], [5], 2, 5⟩, + ⟨2, 6, [], [5, 4, 3], [7], 1, 4⟩, + ⟨3, 4, [], [2], [5], 2, 6⟩, + ⟨3, 4, [], [0, 1, 2], [5], 1, 4⟩, + ⟨3, 6, [], [2], [5], 2, 6⟩, + ⟨3, 6, [], [5, 4], [7], 1, 5⟩, + ⟨3, 7, [], [5, 4], [], 2, 6⟩, + ⟨3, 7, [[0, 1, 2]], [5, 4], [], 1, 3⟩, + ⟨4, 5, [], [2, 3], [], 2, 6⟩, + ⟨4, 5, [], [0, 1, 2, 3], [], 1, 4⟩, + ⟨4, 6, [], [2, 3], [5], 1, 5⟩, + ⟨4, 6, [], [5], [7], 2, 6⟩, + ⟨4, 7, [], [2, 3], [], 2, 6⟩, + ⟨4, 7, [], [0, 1, 2, 3], [], 1, 4⟩, + ⟨5, 6, [[0, 1, 2]], [], [7], 2, 4⟩, + ⟨5, 6, [], [2, 3, 4], [7], 1, 4⟩, + ⟨6, 7, [[0, 1, 2]], [5], [], 2, 4⟩, + ⟨6, 7, [], [2, 3, 4, 5], [], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 3), (6, 3), (3, 3), (4, 3)}⟩ + + +private def k9t4p19_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 4, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 6, {1, 2, 3}], + #[∅, Finset.Icc 1 4, ∅, Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[∅, Finset.Icc 1 4, ∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3}, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p19_initial_eq_row_0 : ∀ j : Fin 8, (k9t4p19.initialMatrix 9) 0 j = k9t4p19_state_0 0 j := by decide + +private theorem k9t4p19_initial_eq_row_1 : ∀ j : Fin 8, (k9t4p19.initialMatrix 9) 1 j = k9t4p19_state_0 1 j := by decide + +private theorem k9t4p19_initial_eq_row_2 : ∀ j : Fin 8, (k9t4p19.initialMatrix 9) 2 j = k9t4p19_state_0 2 j := by decide + +private theorem k9t4p19_initial_eq_row_3 : ∀ j : Fin 8, (k9t4p19.initialMatrix 9) 3 j = k9t4p19_state_0 3 j := by decide + +private theorem k9t4p19_initial_eq_row_4 : ∀ j : Fin 8, (k9t4p19.initialMatrix 9) 4 j = k9t4p19_state_0 4 j := by decide + +private theorem k9t4p19_initial_eq_row_5 : ∀ j : Fin 8, (k9t4p19.initialMatrix 9) 5 j = k9t4p19_state_0 5 j := by decide + +private theorem k9t4p19_initial_eq_row_6 : ∀ j : Fin 8, (k9t4p19.initialMatrix 9) 6 j = k9t4p19_state_0 6 j := by decide + +private theorem k9t4p19_initial_eq_row_7 : ∀ j : Fin 8, (k9t4p19.initialMatrix 9) 7 j = k9t4p19_state_0 7 j := by decide + +private theorem k9t4p19_initial_eq : (k9t4p19.initialMatrix 9) = k9t4p19_state_0 := by + funext i j + fin_cases i + + · exact k9t4p19_initial_eq_row_0 j + + · exact k9t4p19_initial_eq_row_1 j + + · exact k9t4p19_initial_eq_row_2 j + + · exact k9t4p19_initial_eq_row_3 j + + · exact k9t4p19_initial_eq_row_4 j + + · exact k9t4p19_initial_eq_row_5 j + + · exact k9t4p19_initial_eq_row_6 j + + · exact k9t4p19_initial_eq_row_7 j + +private theorem k9t4p19_closure_0 : ClosureCheck k9t4p19.graph k9t4p19_state_0 9 4 [] := by trivial + +private theorem k9t4p19_matrix_eq : k9t4p19.matrix 9 = k9t4p19_state_0 := by + change closureMatrix (k9t4p19.initialMatrix 9) _ = _ + rw [k9t4p19_initial_eq] + change closureMatrix k9t4p19_state_0 [] = _ + rfl + +private theorem k9t4p19_part_0 : k9t4p19.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p19_part_1 : k9t4p19.chains.map List.length = ([[1, 2, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p19_part_2 : k9t4p19.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p19.clique))) = ([[1, 2, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p19_templates_item_0 : (⟨0, 1, [], [], [2, 3, 4, 5], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_1 : (⟨0, 3, [], [], [4, 5], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_2 : (⟨0, 3, [], [2, 1], [4, 5], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_3 : (⟨0, 4, [], [], [3, 2], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_4 : (⟨0, 4, [[5, 6, 7]], [], [3, 2], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_5 : (⟨0, 6, [], [2, 1], [5], 2, 5⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_6 : (⟨0, 6, [], [], [5, 4, 3, 2], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_7 : (⟨1, 2, [], [0], [3, 4, 5], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_8 : (⟨1, 3, [], [0], [2], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_9 : (⟨1, 3, [], [0], [4, 5], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_10 : (⟨1, 4, [], [0], [3, 2], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_11 : (⟨1, 4, [], [0], [5], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_12 : (⟨1, 5, [], [0], [4, 3, 2], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_13 : (⟨1, 6, [], [0], [5], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_14 : (⟨1, 6, [], [0], [5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_15 : (⟨1, 7, [[2, 3, 4, 5]], [0], [], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_16 : (⟨2, 3, [], [], [4, 5], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_17 : (⟨2, 3, [], [0, 1], [4, 5], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_18 : (⟨2, 6, [], [0, 1], [5], 2, 5⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_19 : (⟨2, 6, [], [5, 4, 3], [7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_20 : (⟨3, 4, [], [2], [5], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_21 : (⟨3, 4, [], [0, 1, 2], [5], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_22 : (⟨3, 6, [], [2], [5], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_23 : (⟨3, 6, [], [5, 4], [7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_24 : (⟨3, 7, [], [5, 4], [], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_25 : (⟨3, 7, [[0, 1, 2]], [5, 4], [], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_26 : (⟨4, 5, [], [2, 3], [], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_27 : (⟨4, 5, [], [0, 1, 2, 3], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_28 : (⟨4, 6, [], [2, 3], [5], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_29 : (⟨4, 6, [], [5], [7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_30 : (⟨4, 7, [], [2, 3], [], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_31 : (⟨4, 7, [], [0, 1, 2, 3], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_32 : (⟨5, 6, [[0, 1, 2]], [], [7], 2, 4⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_33 : (⟨5, 6, [], [2, 3, 4], [7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_34 : (⟨6, 7, [[0, 1, 2]], [5], [], 2, 4⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_templates_item_35 : (⟨6, 7, [], [2, 3, 4, 5], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p19_part_3 : ∀ T ∈ k9t4p19.templates, T.Check k9t4p19.graph k9t4p19.clique 9 (patternAmount ([[1, 2, 1]] : List (List ℕ))) (([[1, 2, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p19, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p19_templates_item_0, k9t4p19_templates_item_1, k9t4p19_templates_item_2, k9t4p19_templates_item_3, k9t4p19_templates_item_4, k9t4p19_templates_item_5, k9t4p19_templates_item_6, k9t4p19_templates_item_7, k9t4p19_templates_item_8, k9t4p19_templates_item_9, k9t4p19_templates_item_10, k9t4p19_templates_item_11, k9t4p19_templates_item_12, k9t4p19_templates_item_13, k9t4p19_templates_item_14, k9t4p19_templates_item_15, k9t4p19_templates_item_16, k9t4p19_templates_item_17, k9t4p19_templates_item_18, k9t4p19_templates_item_19, k9t4p19_templates_item_20, k9t4p19_templates_item_21, k9t4p19_templates_item_22, k9t4p19_templates_item_23, k9t4p19_templates_item_24, k9t4p19_templates_item_25, k9t4p19_templates_item_26, k9t4p19_templates_item_27, k9t4p19_templates_item_28, k9t4p19_templates_item_29, k9t4p19_templates_item_30, k9t4p19_templates_item_31, k9t4p19_templates_item_32, k9t4p19_templates_item_33, k9t4p19_templates_item_34, k9t4p19_templates_item_35⟩ + +private theorem k9t4p19_part_4 : ∀ p ∈ k9t4p19.required, p.Check k9t4p19.graph 9 := by decide + +private theorem k9t4p19_part_5 : ClosureCheck k9t4p19.graph (k9t4p19.initialMatrix 9) 9 4 k9t4p19.closure := by + rw [k9t4p19_initial_eq] + exact k9t4p19_closure_0 + +private theorem k9t4p19_part_6 : k9t4p19.bad.Check k9t4p19.graph (k9t4p19.matrix 9) 9 4 := by + rw [k9t4p19_matrix_eq] + decide + +theorem k9t4p19_check : k9t4p19.Check 9 4 [[1, 2, 1]] := + ⟨k9t4p19_part_0, k9t4p19_part_1, k9t4p19_part_2, k9t4p19_part_3, k9t4p19_part_4, k9t4p19_part_5, k9t4p19_part_6⟩ +private def k9t4p20_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [], [], [2, 3, 4, 5], 2, 4⟩, ⟨0, 1, [], [], [2, 3, 4, 5, 6, 7, 8], 1, 1⟩, ⟨0, 3, [], [2, 1], [4, 5], 2, 4⟩, ⟨0, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩, ⟨0, 4, [[5, 6, 7, 8]], [], [3, 2], 1, 2⟩, ⟨0, 7, [], [2, 1], [6, 5], 2, 4⟩, ⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩, ⟨1, 2, [], [0], [3, 4, 5], 2, 4⟩, ⟨1, 2, [], [0], [3, 4, 5, 6, 7, 8], 1, 1⟩, ⟨1, 3, [], [0], [2], 3, 6⟩, ⟨1, 3, [], [0], [4, 5], 2, 5⟩, ⟨1, 3, [[5, 6, 7, 8]], [0], [2], 1, 2⟩] + +private def k9t4p20_templates_block_1 : List (TemplateData (Fin 9)) := [⟨1, 4, [], [0], [3, 2], 2, 5⟩, ⟨1, 4, [], [0], [5], 3, 6⟩, ⟨1, 4, [[5, 6, 7, 8]], [0], [3, 2], 1, 1⟩, ⟨1, 6, [], [0], [7, 8], 2, 5⟩, ⟨1, 6, [], [0], [5, 4, 3, 2], 1, 3⟩, ⟨1, 7, [], [0], [6, 5], 2, 5⟩, ⟨1, 7, [], [0], [8], 3, 6⟩, ⟨1, 7, [], [0], [6, 5, 4, 3, 2], 1, 2⟩, ⟨1, 8, [[2, 3, 4, 5]], [0], [], 2, 3⟩, ⟨1, 8, [], [0], [7, 6, 5, 4, 3, 2], 1, 1⟩, ⟨2, 3, [], [0, 1], [4, 5], 2, 4⟩, ⟨2, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩] + +private def k9t4p20_templates_block_2 : List (TemplateData (Fin 9)) := [⟨3, 4, [], [2], [5], 3, 6⟩, ⟨3, 4, [], [0, 1, 2], [5], 2, 4⟩, ⟨3, 4, [], [2], [5, 6, 7, 8], 1, 3⟩, ⟨3, 6, [], [2], [7, 8], 2, 5⟩, ⟨3, 6, [], [5, 4], [7, 8], 1, 4⟩, ⟨3, 7, [], [2], [6, 5], 2, 5⟩, ⟨3, 7, [], [2], [8], 3, 6⟩, ⟨3, 7, [], [0, 1, 2], [6, 5], 1, 3⟩, ⟨4, 5, [], [0, 1, 2, 3], [], 2, 4⟩, ⟨4, 5, [], [2, 3], [6, 7, 8], 1, 3⟩, ⟨4, 6, [], [2, 3], [5], 2, 5⟩, ⟨4, 6, [], [2, 3], [7, 8], 1, 4⟩] + +private def k9t4p20_templates_block_3 : List (TemplateData (Fin 9)) := [⟨4, 7, [], [2, 3], [6, 5], 1, 4⟩, ⟨4, 7, [], [2, 3], [8], 2, 5⟩, ⟨4, 7, [], [5], [8], 3, 6⟩, ⟨4, 8, [], [0, 1, 2, 3], [], 2, 4⟩, ⟨4, 8, [], [2, 3], [7, 6, 5], 1, 3⟩, ⟨6, 7, [[0, 1, 2]], [5], [8], 2, 3⟩, ⟨6, 7, [], [2, 3, 4, 5], [8], 1, 3⟩, ⟨7, 8, [[0, 1, 2]], [5, 6], [], 2, 3⟩, ⟨7, 8, [], [2, 3, 4, 5, 6], [], 1, 3⟩] + +def k9t4p20 : LayoutCertificate 9 where + chains := [[0, 1, 2, 3, 4, 5, 6, 7, 8]] + clique := {0, 2, 5, 8} + templates := k9t4p20_templates_block_0 ++ k9t4p20_templates_block_1 ++ k9t4p20_templates_block_2 ++ k9t4p20_templates_block_3 + required := [] + closure := [] + bad := ⟨none, {(1, 3), (3, 3), (7, 3), (4, 3)}⟩ + + +private def k9t4p20_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {1, 2}, ∅, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 5, Finset.Icc 1 6, ∅], + #[{1, 2}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2, 3}, ∅, ∅, Finset.Icc 1 4, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p20_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {1, 2}, ∅, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p20_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_0) 0 j = k9t4p20_template_matrix_0 0 j := by decide + +private theorem k9t4p20_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_0) 1 j = k9t4p20_template_matrix_0 1 j := by decide + +private theorem k9t4p20_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_0) 2 j = k9t4p20_template_matrix_0 2 j := by decide + +private theorem k9t4p20_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_0) 3 j = k9t4p20_template_matrix_0 3 j := by decide + +private theorem k9t4p20_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_0) 4 j = k9t4p20_template_matrix_0 4 j := by decide + +private theorem k9t4p20_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_0) 5 j = k9t4p20_template_matrix_0 5 j := by decide + +private theorem k9t4p20_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_0) 6 j = k9t4p20_template_matrix_0 6 j := by decide + +private theorem k9t4p20_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_0) 7 j = k9t4p20_template_matrix_0 7 j := by decide + +private theorem k9t4p20_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_0) 8 j = k9t4p20_template_matrix_0 8 j := by decide + +private theorem k9t4p20_template_matrix_0_eq : (templateMatrix k9t4p20_templates_block_0) = k9t4p20_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t4p20_template_matrix_0_eq_row_0 j + + · exact k9t4p20_template_matrix_0_eq_row_1 j + + · exact k9t4p20_template_matrix_0_eq_row_2 j + + · exact k9t4p20_template_matrix_0_eq_row_3 j + + · exact k9t4p20_template_matrix_0_eq_row_4 j + + · exact k9t4p20_template_matrix_0_eq_row_5 j + + · exact k9t4p20_template_matrix_0_eq_row_6 j + + · exact k9t4p20_template_matrix_0_eq_row_7 j + + · exact k9t4p20_template_matrix_0_eq_row_8 j + +private def k9t4p20_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[∅, ∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p20_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_1) 0 j = k9t4p20_template_matrix_1 0 j := by decide + +private theorem k9t4p20_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_1) 1 j = k9t4p20_template_matrix_1 1 j := by decide + +private theorem k9t4p20_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_1) 2 j = k9t4p20_template_matrix_1 2 j := by decide + +private theorem k9t4p20_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_1) 3 j = k9t4p20_template_matrix_1 3 j := by decide + +private theorem k9t4p20_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_1) 4 j = k9t4p20_template_matrix_1 4 j := by decide + +private theorem k9t4p20_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_1) 5 j = k9t4p20_template_matrix_1 5 j := by decide + +private theorem k9t4p20_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_1) 6 j = k9t4p20_template_matrix_1 6 j := by decide + +private theorem k9t4p20_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_1) 7 j = k9t4p20_template_matrix_1 7 j := by decide + +private theorem k9t4p20_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_1) 8 j = k9t4p20_template_matrix_1 8 j := by decide + +private theorem k9t4p20_template_matrix_1_eq : (templateMatrix k9t4p20_templates_block_1) = k9t4p20_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t4p20_template_matrix_1_eq_row_0 j + + · exact k9t4p20_template_matrix_1_eq_row_1 j + + · exact k9t4p20_template_matrix_1_eq_row_2 j + + · exact k9t4p20_template_matrix_1_eq_row_3 j + + · exact k9t4p20_template_matrix_1_eq_row_4 j + + · exact k9t4p20_template_matrix_1_eq_row_5 j + + · exact k9t4p20_template_matrix_1_eq_row_6 j + + · exact k9t4p20_template_matrix_1_eq_row_7 j + + · exact k9t4p20_template_matrix_1_eq_row_8 j + +private def k9t4p20_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 5, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p20_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_2) 0 j = k9t4p20_template_matrix_2 0 j := by decide + +private theorem k9t4p20_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_2) 1 j = k9t4p20_template_matrix_2 1 j := by decide + +private theorem k9t4p20_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_2) 2 j = k9t4p20_template_matrix_2 2 j := by decide + +private theorem k9t4p20_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_2) 3 j = k9t4p20_template_matrix_2 3 j := by decide + +private theorem k9t4p20_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_2) 4 j = k9t4p20_template_matrix_2 4 j := by decide + +private theorem k9t4p20_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_2) 5 j = k9t4p20_template_matrix_2 5 j := by decide + +private theorem k9t4p20_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_2) 6 j = k9t4p20_template_matrix_2 6 j := by decide + +private theorem k9t4p20_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_2) 7 j = k9t4p20_template_matrix_2 7 j := by decide + +private theorem k9t4p20_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_2) 8 j = k9t4p20_template_matrix_2 8 j := by decide + +private theorem k9t4p20_template_matrix_2_eq : (templateMatrix k9t4p20_templates_block_2) = k9t4p20_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t4p20_template_matrix_2_eq_row_0 j + + · exact k9t4p20_template_matrix_2_eq_row_1 j + + · exact k9t4p20_template_matrix_2_eq_row_2 j + + · exact k9t4p20_template_matrix_2_eq_row_3 j + + · exact k9t4p20_template_matrix_2_eq_row_4 j + + · exact k9t4p20_template_matrix_2_eq_row_5 j + + · exact k9t4p20_template_matrix_2_eq_row_6 j + + · exact k9t4p20_template_matrix_2_eq_row_7 j + + · exact k9t4p20_template_matrix_2_eq_row_8 j + +private def k9t4p20_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2, 3}, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p20_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_3) 0 j = k9t4p20_template_matrix_3 0 j := by decide + +private theorem k9t4p20_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_3) 1 j = k9t4p20_template_matrix_3 1 j := by decide + +private theorem k9t4p20_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_3) 2 j = k9t4p20_template_matrix_3 2 j := by decide + +private theorem k9t4p20_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_3) 3 j = k9t4p20_template_matrix_3 3 j := by decide + +private theorem k9t4p20_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_3) 4 j = k9t4p20_template_matrix_3 4 j := by decide + +private theorem k9t4p20_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_3) 5 j = k9t4p20_template_matrix_3 5 j := by decide + +private theorem k9t4p20_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_3) 6 j = k9t4p20_template_matrix_3 6 j := by decide + +private theorem k9t4p20_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_3) 7 j = k9t4p20_template_matrix_3 7 j := by decide + +private theorem k9t4p20_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p20_templates_block_3) 8 j = k9t4p20_template_matrix_3 8 j := by decide + +private theorem k9t4p20_template_matrix_3_eq : (templateMatrix k9t4p20_templates_block_3) = k9t4p20_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t4p20_template_matrix_3_eq_row_0 j + + · exact k9t4p20_template_matrix_3_eq_row_1 j + + · exact k9t4p20_template_matrix_3_eq_row_2 j + + · exact k9t4p20_template_matrix_3_eq_row_3 j + + · exact k9t4p20_template_matrix_3_eq_row_4 j + + · exact k9t4p20_template_matrix_3_eq_row_5 j + + · exact k9t4p20_template_matrix_3_eq_row_6 j + + · exact k9t4p20_template_matrix_3_eq_row_7 j + + · exact k9t4p20_template_matrix_3_eq_row_8 j + +private theorem k9t4p20_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => (((k9t4p20_template_matrix_0 i j ∪ k9t4p20_template_matrix_1 i j) ∪ k9t4p20_template_matrix_2 i j) ∪ k9t4p20_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p20.required i j) 0 j = k9t4p20_state_0 0 j := by decide + +private theorem k9t4p20_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => (((k9t4p20_template_matrix_0 i j ∪ k9t4p20_template_matrix_1 i j) ∪ k9t4p20_template_matrix_2 i j) ∪ k9t4p20_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p20.required i j) 1 j = k9t4p20_state_0 1 j := by decide + +private theorem k9t4p20_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => (((k9t4p20_template_matrix_0 i j ∪ k9t4p20_template_matrix_1 i j) ∪ k9t4p20_template_matrix_2 i j) ∪ k9t4p20_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p20.required i j) 2 j = k9t4p20_state_0 2 j := by decide + +private theorem k9t4p20_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => (((k9t4p20_template_matrix_0 i j ∪ k9t4p20_template_matrix_1 i j) ∪ k9t4p20_template_matrix_2 i j) ∪ k9t4p20_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p20.required i j) 3 j = k9t4p20_state_0 3 j := by decide + +private theorem k9t4p20_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => (((k9t4p20_template_matrix_0 i j ∪ k9t4p20_template_matrix_1 i j) ∪ k9t4p20_template_matrix_2 i j) ∪ k9t4p20_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p20.required i j) 4 j = k9t4p20_state_0 4 j := by decide + +private theorem k9t4p20_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => (((k9t4p20_template_matrix_0 i j ∪ k9t4p20_template_matrix_1 i j) ∪ k9t4p20_template_matrix_2 i j) ∪ k9t4p20_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p20.required i j) 5 j = k9t4p20_state_0 5 j := by decide + +private theorem k9t4p20_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => (((k9t4p20_template_matrix_0 i j ∪ k9t4p20_template_matrix_1 i j) ∪ k9t4p20_template_matrix_2 i j) ∪ k9t4p20_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p20.required i j) 6 j = k9t4p20_state_0 6 j := by decide + +private theorem k9t4p20_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => (((k9t4p20_template_matrix_0 i j ∪ k9t4p20_template_matrix_1 i j) ∪ k9t4p20_template_matrix_2 i j) ∪ k9t4p20_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p20.required i j) 7 j = k9t4p20_state_0 7 j := by decide + +private theorem k9t4p20_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => (((k9t4p20_template_matrix_0 i j ∪ k9t4p20_template_matrix_1 i j) ∪ k9t4p20_template_matrix_2 i j) ∪ k9t4p20_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p20.required i j) 8 j = k9t4p20_state_0 8 j := by decide + +private theorem k9t4p20_initial_merged_eq : (fun i j => (((k9t4p20_template_matrix_0 i j ∪ k9t4p20_template_matrix_1 i j) ∪ k9t4p20_template_matrix_2 i j) ∪ k9t4p20_template_matrix_3 i j) ∪ requiredMatrix 9 k9t4p20.required i j) = k9t4p20_state_0 := by + funext i j + fin_cases i + + · exact k9t4p20_initial_merged_eq_row_0 j + + · exact k9t4p20_initial_merged_eq_row_1 j + + · exact k9t4p20_initial_merged_eq_row_2 j + + · exact k9t4p20_initial_merged_eq_row_3 j + + · exact k9t4p20_initial_merged_eq_row_4 j + + · exact k9t4p20_initial_merged_eq_row_5 j + + · exact k9t4p20_initial_merged_eq_row_6 j + + · exact k9t4p20_initial_merged_eq_row_7 j + + · exact k9t4p20_initial_merged_eq_row_8 j + +private theorem k9t4p20_initial_eq : k9t4p20.initialMatrix 9 = k9t4p20_state_0 := by + funext i j + change templateMatrix (k9t4p20_templates_block_0 ++ k9t4p20_templates_block_1 ++ k9t4p20_templates_block_2 ++ k9t4p20_templates_block_3) i j ∪ requiredMatrix 9 k9t4p20.required i j = _ + simp only [templateMatrix_append, k9t4p20_template_matrix_0_eq, k9t4p20_template_matrix_1_eq, k9t4p20_template_matrix_2_eq, k9t4p20_template_matrix_3_eq] + exact congrFun (congrFun k9t4p20_initial_merged_eq i) j + +private theorem k9t4p20_closure_0 : ClosureCheck k9t4p20.graph k9t4p20_state_0 9 4 [] := by trivial + +private theorem k9t4p20_matrix_eq : k9t4p20.matrix 9 = k9t4p20_state_0 := by + change closureMatrix (k9t4p20.initialMatrix 9) _ = _ + rw [k9t4p20_initial_eq] + change closureMatrix k9t4p20_state_0 [] = _ + rfl + +private theorem k9t4p20_part_0 : k9t4p20.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p20_part_1 : k9t4p20.chains.map List.length = ([[1, 2, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p20_part_2 : k9t4p20.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p20.clique))) = ([[1, 2, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p20_templates_item_0 : (⟨0, 1, [], [], [2, 3, 4, 5], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5, 6, 7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_2 : (⟨0, 3, [], [2, 1], [4, 5], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_3 : (⟨0, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_4 : (⟨0, 4, [[5, 6, 7, 8]], [], [3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_5 : (⟨0, 7, [], [2, 1], [6, 5], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_6 : (⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_7 : (⟨1, 2, [], [0], [3, 4, 5], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_8 : (⟨1, 2, [], [0], [3, 4, 5, 6, 7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_9 : (⟨1, 3, [], [0], [2], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_10 : (⟨1, 3, [], [0], [4, 5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_11 : (⟨1, 3, [[5, 6, 7, 8]], [0], [2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_12 : (⟨1, 4, [], [0], [3, 2], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_13 : (⟨1, 4, [], [0], [5], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_14 : (⟨1, 4, [[5, 6, 7, 8]], [0], [3, 2], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_15 : (⟨1, 6, [], [0], [7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_16 : (⟨1, 6, [], [0], [5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_17 : (⟨1, 7, [], [0], [6, 5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_18 : (⟨1, 7, [], [0], [8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_19 : (⟨1, 7, [], [0], [6, 5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_20 : (⟨1, 8, [[2, 3, 4, 5]], [0], [], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_21 : (⟨1, 8, [], [0], [7, 6, 5, 4, 3, 2], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_22 : (⟨2, 3, [], [0, 1], [4, 5], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_23 : (⟨2, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_24 : (⟨3, 4, [], [2], [5], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_25 : (⟨3, 4, [], [0, 1, 2], [5], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_26 : (⟨3, 4, [], [2], [5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_27 : (⟨3, 6, [], [2], [7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_28 : (⟨3, 6, [], [5, 4], [7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_29 : (⟨3, 7, [], [2], [6, 5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_30 : (⟨3, 7, [], [2], [8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_31 : (⟨3, 7, [], [0, 1, 2], [6, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_32 : (⟨4, 5, [], [0, 1, 2, 3], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_33 : (⟨4, 5, [], [2, 3], [6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_34 : (⟨4, 6, [], [2, 3], [5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_35 : (⟨4, 6, [], [2, 3], [7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_36 : (⟨4, 7, [], [2, 3], [6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_37 : (⟨4, 7, [], [2, 3], [8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_38 : (⟨4, 7, [], [5], [8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_39 : (⟨4, 8, [], [0, 1, 2, 3], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_40 : (⟨4, 8, [], [2, 3], [7, 6, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_41 : (⟨6, 7, [[0, 1, 2]], [5], [8], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_42 : (⟨6, 7, [], [2, 3, 4, 5], [8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_43 : (⟨7, 8, [[0, 1, 2]], [5, 6], [], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_item_44 : (⟨7, 8, [], [2, 3, 4, 5, 6], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p20_templates_block_0_check : ∀ T ∈ k9t4p20_templates_block_0, T.Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p20_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p20_templates_item_0, k9t4p20_templates_item_1, k9t4p20_templates_item_2, k9t4p20_templates_item_3, k9t4p20_templates_item_4, k9t4p20_templates_item_5, k9t4p20_templates_item_6, k9t4p20_templates_item_7, k9t4p20_templates_item_8, k9t4p20_templates_item_9, k9t4p20_templates_item_10, k9t4p20_templates_item_11⟩ + +private theorem k9t4p20_templates_block_1_check : ∀ T ∈ k9t4p20_templates_block_1, T.Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p20_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p20_templates_item_12, k9t4p20_templates_item_13, k9t4p20_templates_item_14, k9t4p20_templates_item_15, k9t4p20_templates_item_16, k9t4p20_templates_item_17, k9t4p20_templates_item_18, k9t4p20_templates_item_19, k9t4p20_templates_item_20, k9t4p20_templates_item_21, k9t4p20_templates_item_22, k9t4p20_templates_item_23⟩ + +private theorem k9t4p20_templates_block_2_check : ∀ T ∈ k9t4p20_templates_block_2, T.Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p20_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p20_templates_item_24, k9t4p20_templates_item_25, k9t4p20_templates_item_26, k9t4p20_templates_item_27, k9t4p20_templates_item_28, k9t4p20_templates_item_29, k9t4p20_templates_item_30, k9t4p20_templates_item_31, k9t4p20_templates_item_32, k9t4p20_templates_item_33, k9t4p20_templates_item_34, k9t4p20_templates_item_35⟩ + +private theorem k9t4p20_templates_block_3_check : ∀ T ∈ k9t4p20_templates_block_3, T.Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p20_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p20_templates_item_36, k9t4p20_templates_item_37, k9t4p20_templates_item_38, k9t4p20_templates_item_39, k9t4p20_templates_item_40, k9t4p20_templates_item_41, k9t4p20_templates_item_42, k9t4p20_templates_item_43, k9t4p20_templates_item_44⟩ + +private theorem k9t4p20_part_3 : ∀ T ∈ k9t4p20.templates, T.Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t4p20_templates_block_0 ++ k9t4p20_templates_block_1 ++ k9t4p20_templates_block_2 ++ k9t4p20_templates_block_3), T.Check k9t4p20.graph k9t4p20.clique 9 (patternAmount ([[1, 2, 2]] : List (List ℕ))) (([[1, 2, 2]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p20_templates_block_0_check, k9t4p20_templates_block_1_check⟩, k9t4p20_templates_block_2_check⟩, k9t4p20_templates_block_3_check⟩ + +private theorem k9t4p20_part_4 : ∀ p ∈ k9t4p20.required, p.Check k9t4p20.graph 9 := by decide + +private theorem k9t4p20_part_5 : ClosureCheck k9t4p20.graph (k9t4p20.initialMatrix 9) 9 4 k9t4p20.closure := by + rw [k9t4p20_initial_eq] + exact k9t4p20_closure_0 + +private theorem k9t4p20_part_6 : k9t4p20.bad.Check k9t4p20.graph (k9t4p20.matrix 9) 9 4 := by + rw [k9t4p20_matrix_eq] + decide + +theorem k9t4p20_check : k9t4p20.Check 9 4 [[1, 2, 2]] := + ⟨k9t4p20_part_0, k9t4p20_part_1, k9t4p20_part_2, k9t4p20_part_3, k9t4p20_part_4, k9t4p20_part_5, k9t4p20_part_6⟩ +def k9t4p21 : LayoutCertificate 9 where + chains := [[0, 1, 2, 3, 4, 5, 6, 7, 8]] + clique := {0, 2, 6, 8} + templates := [⟨0, 1, [], [], [2], 4, 7⟩, + ⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 3⟩, + ⟨0, 3, [], [], [2], 4, 7⟩, + ⟨0, 3, [], [], [4, 5, 6], 2, 5⟩, + ⟨0, 3, [], [2, 1], [4, 5, 6], 1, 3⟩, + ⟨0, 5, [], [], [4, 3, 2], 2, 5⟩, + ⟨0, 5, [[6, 7, 8]], [], [4, 3, 2], 1, 2⟩, + ⟨0, 7, [], [], [6], 4, 7⟩, + ⟨0, 7, [], [2, 1], [6], 3, 5⟩, + ⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩, + ⟨1, 2, [], [0], [3, 4, 5, 6], 1, 3⟩, + ⟨1, 3, [], [0], [2], 3, 6⟩, + ⟨1, 3, [], [0], [4, 5, 6], 1, 4⟩, + ⟨1, 4, [], [0], [3, 2], 2, 5⟩, + ⟨1, 4, [[6, 7, 8]], [0], [3, 2], 1, 2⟩, + ⟨1, 5, [], [0], [4, 3, 2], 1, 4⟩, + ⟨1, 6, [], [0], [5, 4, 3, 2], 1, 3⟩, + ⟨1, 7, [], [0], [6], 3, 6⟩, + ⟨1, 7, [], [0], [6, 5, 4, 3, 2], 1, 2⟩, + ⟨1, 8, [[2, 3, 4, 5, 6]], [0], [], 1, 2⟩, + ⟨2, 3, [], [], [4, 5, 6], 2, 5⟩, + ⟨2, 3, [], [0, 1], [4, 5, 6], 1, 3⟩, + ⟨2, 7, [], [6, 5, 4, 3], [8], 1, 3⟩, + ⟨3, 4, [], [2], [5, 6], 2, 5⟩, + ⟨3, 4, [], [0, 1, 2], [5, 6], 1, 3⟩, + ⟨3, 7, [], [2], [6], 3, 6⟩, + ⟨3, 7, [], [6, 5, 4], [8], 1, 4⟩, + ⟨3, 8, [], [6, 5, 4], [], 2, 5⟩, + ⟨3, 8, [[0, 1, 2]], [6, 5, 4], [], 1, 2⟩, + ⟨4, 7, [], [2, 3], [6], 2, 5⟩, + ⟨4, 7, [], [0, 1, 2, 3], [6], 1, 3⟩, + ⟨5, 7, [], [2, 3, 4], [6], 1, 4⟩, + ⟨6, 7, [], [2, 3, 4, 5], [8], 1, 3⟩, + ⟨7, 8, [], [2, 3, 4, 5, 6], [], 1, 3⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 3), (7, 3), (3, 3), (0, 3)}⟩ + + +private def k9t4p21_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, ∅, {1, 2, 3}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}, Finset.Icc 1 6, {1, 2}], + #[∅, {1, 2, 3}, ∅, Finset.Icc 1 5, ∅, ∅, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 5], + #[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅], + #[∅, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅, {1, 2, 3}, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, {1, 2, 3}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}], + #[∅, {1, 2}, ∅, Finset.Icc 1 5, ∅, ∅, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p21_initial_eq_row_0 : ∀ j : Fin 9, (k9t4p21.initialMatrix 9) 0 j = k9t4p21_state_0 0 j := by decide + +private theorem k9t4p21_initial_eq_row_1 : ∀ j : Fin 9, (k9t4p21.initialMatrix 9) 1 j = k9t4p21_state_0 1 j := by decide + +private theorem k9t4p21_initial_eq_row_2 : ∀ j : Fin 9, (k9t4p21.initialMatrix 9) 2 j = k9t4p21_state_0 2 j := by decide + +private theorem k9t4p21_initial_eq_row_3 : ∀ j : Fin 9, (k9t4p21.initialMatrix 9) 3 j = k9t4p21_state_0 3 j := by decide + +private theorem k9t4p21_initial_eq_row_4 : ∀ j : Fin 9, (k9t4p21.initialMatrix 9) 4 j = k9t4p21_state_0 4 j := by decide + +private theorem k9t4p21_initial_eq_row_5 : ∀ j : Fin 9, (k9t4p21.initialMatrix 9) 5 j = k9t4p21_state_0 5 j := by decide + +private theorem k9t4p21_initial_eq_row_6 : ∀ j : Fin 9, (k9t4p21.initialMatrix 9) 6 j = k9t4p21_state_0 6 j := by decide + +private theorem k9t4p21_initial_eq_row_7 : ∀ j : Fin 9, (k9t4p21.initialMatrix 9) 7 j = k9t4p21_state_0 7 j := by decide + +private theorem k9t4p21_initial_eq_row_8 : ∀ j : Fin 9, (k9t4p21.initialMatrix 9) 8 j = k9t4p21_state_0 8 j := by decide + +private theorem k9t4p21_initial_eq : (k9t4p21.initialMatrix 9) = k9t4p21_state_0 := by + funext i j + fin_cases i + + · exact k9t4p21_initial_eq_row_0 j + + · exact k9t4p21_initial_eq_row_1 j + + · exact k9t4p21_initial_eq_row_2 j + + · exact k9t4p21_initial_eq_row_3 j + + · exact k9t4p21_initial_eq_row_4 j + + · exact k9t4p21_initial_eq_row_5 j + + · exact k9t4p21_initial_eq_row_6 j + + · exact k9t4p21_initial_eq_row_7 j + + · exact k9t4p21_initial_eq_row_8 j + +private theorem k9t4p21_closure_0 : ClosureCheck k9t4p21.graph k9t4p21_state_0 9 4 [] := by trivial + +private theorem k9t4p21_matrix_eq : k9t4p21.matrix 9 = k9t4p21_state_0 := by + change closureMatrix (k9t4p21.initialMatrix 9) _ = _ + rw [k9t4p21_initial_eq] + change closureMatrix k9t4p21_state_0 [] = _ + rfl + +private theorem k9t4p21_part_0 : k9t4p21.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p21_part_1 : k9t4p21.chains.map List.length = ([[1, 3, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p21_part_2 : k9t4p21.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p21.clique))) = ([[1, 3, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p21_templates_item_0 : (⟨0, 1, [], [], [2], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_2 : (⟨0, 3, [], [], [2], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_3 : (⟨0, 3, [], [], [4, 5, 6], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_4 : (⟨0, 3, [], [2, 1], [4, 5, 6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_5 : (⟨0, 5, [], [], [4, 3, 2], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_6 : (⟨0, 5, [[6, 7, 8]], [], [4, 3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_7 : (⟨0, 7, [], [], [6], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_8 : (⟨0, 7, [], [2, 1], [6], 3, 5⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_9 : (⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_10 : (⟨1, 2, [], [0], [3, 4, 5, 6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_11 : (⟨1, 3, [], [0], [2], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_12 : (⟨1, 3, [], [0], [4, 5, 6], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_13 : (⟨1, 4, [], [0], [3, 2], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_14 : (⟨1, 4, [[6, 7, 8]], [0], [3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_15 : (⟨1, 5, [], [0], [4, 3, 2], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_16 : (⟨1, 6, [], [0], [5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_17 : (⟨1, 7, [], [0], [6], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_18 : (⟨1, 7, [], [0], [6, 5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_19 : (⟨1, 8, [[2, 3, 4, 5, 6]], [0], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_20 : (⟨2, 3, [], [], [4, 5, 6], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_21 : (⟨2, 3, [], [0, 1], [4, 5, 6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_22 : (⟨2, 7, [], [6, 5, 4, 3], [8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_23 : (⟨3, 4, [], [2], [5, 6], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_24 : (⟨3, 4, [], [0, 1, 2], [5, 6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_25 : (⟨3, 7, [], [2], [6], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_26 : (⟨3, 7, [], [6, 5, 4], [8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_27 : (⟨3, 8, [], [6, 5, 4], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_28 : (⟨3, 8, [[0, 1, 2]], [6, 5, 4], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_29 : (⟨4, 7, [], [2, 3], [6], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_30 : (⟨4, 7, [], [0, 1, 2, 3], [6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_31 : (⟨5, 7, [], [2, 3, 4], [6], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_32 : (⟨6, 7, [], [2, 3, 4, 5], [8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_templates_item_33 : (⟨7, 8, [], [2, 3, 4, 5, 6], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p21_part_3 : ∀ T ∈ k9t4p21.templates, T.Check k9t4p21.graph k9t4p21.clique 9 (patternAmount ([[1, 3, 1]] : List (List ℕ))) (([[1, 3, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p21, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p21_templates_item_0, k9t4p21_templates_item_1, k9t4p21_templates_item_2, k9t4p21_templates_item_3, k9t4p21_templates_item_4, k9t4p21_templates_item_5, k9t4p21_templates_item_6, k9t4p21_templates_item_7, k9t4p21_templates_item_8, k9t4p21_templates_item_9, k9t4p21_templates_item_10, k9t4p21_templates_item_11, k9t4p21_templates_item_12, k9t4p21_templates_item_13, k9t4p21_templates_item_14, k9t4p21_templates_item_15, k9t4p21_templates_item_16, k9t4p21_templates_item_17, k9t4p21_templates_item_18, k9t4p21_templates_item_19, k9t4p21_templates_item_20, k9t4p21_templates_item_21, k9t4p21_templates_item_22, k9t4p21_templates_item_23, k9t4p21_templates_item_24, k9t4p21_templates_item_25, k9t4p21_templates_item_26, k9t4p21_templates_item_27, k9t4p21_templates_item_28, k9t4p21_templates_item_29, k9t4p21_templates_item_30, k9t4p21_templates_item_31, k9t4p21_templates_item_32, k9t4p21_templates_item_33⟩ + +private theorem k9t4p21_part_4 : ∀ p ∈ k9t4p21.required, p.Check k9t4p21.graph 9 := by decide + +private theorem k9t4p21_part_5 : ClosureCheck k9t4p21.graph (k9t4p21.initialMatrix 9) 9 4 k9t4p21.closure := by + rw [k9t4p21_initial_eq] + exact k9t4p21_closure_0 + +private theorem k9t4p21_part_6 : k9t4p21.bad.Check k9t4p21.graph (k9t4p21.matrix 9) 9 4 := by + rw [k9t4p21_matrix_eq] + decide + +theorem k9t4p21_check : k9t4p21.Check 9 4 [[1, 3, 1]] := + ⟨k9t4p21_part_0, k9t4p21_part_1, k9t4p21_part_2, k9t4p21_part_3, k9t4p21_part_4, k9t4p21_part_5, k9t4p21_part_6⟩ +def k9t4p22 : LayoutCertificate 8 where + chains := [[0, 1, 2, 3], [4, 5, 6, 7]] + clique := {0, 3, 4, 7} + templates := [⟨0, 1, [], [], [2, 3], 2, 6⟩, + ⟨0, 1, [[4, 5, 6, 7]], [], [2, 3], 1, 2⟩, + ⟨0, 5, [], [], [6, 7], 2, 6⟩, + ⟨0, 5, [], [3, 2, 1], [6, 7], 1, 3⟩, + ⟨0, 6, [], [], [5, 4], 2, 6⟩, + ⟨0, 6, [], [3, 2, 1], [5, 4], 1, 3⟩, + ⟨1, 2, [], [0], [3], 2, 6⟩, + ⟨1, 2, [[4, 5, 6, 7]], [0], [3], 1, 2⟩, + ⟨1, 4, [], [3, 2], [], 2, 6⟩, + ⟨1, 4, [], [3, 2], [5, 6, 7], 1, 3⟩, + ⟨1, 5, [], [0], [4], 2, 6⟩, + ⟨1, 5, [], [0], [6, 7], 1, 5⟩, + ⟨1, 6, [], [0], [5, 4], 1, 5⟩, + ⟨1, 6, [], [0], [7], 2, 6⟩, + ⟨1, 7, [], [3, 2], [], 2, 6⟩, + ⟨1, 7, [], [3, 2], [6, 5, 4], 1, 3⟩, + ⟨2, 3, [], [0, 1], [], 2, 6⟩, + ⟨2, 3, [[4, 5, 6, 7]], [0, 1], [], 1, 2⟩, + ⟨2, 4, [], [0, 1], [], 2, 6⟩, + ⟨2, 4, [], [0, 1], [5, 6, 7], 1, 3⟩, + ⟨2, 5, [], [0, 1], [4], 1, 5⟩, + ⟨2, 5, [], [3], [4], 2, 6⟩, + ⟨2, 6, [], [0, 1], [5, 4], 1, 4⟩, + ⟨2, 6, [], [0, 1], [7], 1, 5⟩, + ⟨2, 6, [], [3], [7], 2, 6⟩, + ⟨2, 7, [], [0, 1], [], 2, 6⟩, + ⟨2, 7, [], [0, 1], [6, 5, 4], 1, 3⟩, + ⟨3, 5, [], [], [6, 7], 2, 6⟩, + ⟨3, 5, [], [0, 1, 2], [6, 7], 1, 3⟩, + ⟨3, 6, [], [], [5, 4], 2, 6⟩, + ⟨3, 6, [], [0, 1, 2], [5, 4], 1, 3⟩, + ⟨4, 5, [], [], [6, 7], 2, 6⟩, + ⟨4, 5, [[0, 1, 2, 3]], [], [6, 7], 1, 2⟩, + ⟨5, 6, [], [4], [7], 2, 6⟩, + ⟨5, 6, [[0, 1, 2, 3]], [4], [7], 1, 2⟩, + ⟨6, 7, [], [4, 5], [], 2, 6⟩, + ⟨6, 7, [[0, 1, 2, 3]], [4, 5], [], 1, 2⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 3), (2, 3), (5, 3), (6, 3)}⟩ + + +private def k9t4p22_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p22_initial_eq_row_0 : ∀ j : Fin 8, (k9t4p22.initialMatrix 9) 0 j = k9t4p22_state_0 0 j := by decide + +private theorem k9t4p22_initial_eq_row_1 : ∀ j : Fin 8, (k9t4p22.initialMatrix 9) 1 j = k9t4p22_state_0 1 j := by decide + +private theorem k9t4p22_initial_eq_row_2 : ∀ j : Fin 8, (k9t4p22.initialMatrix 9) 2 j = k9t4p22_state_0 2 j := by decide + +private theorem k9t4p22_initial_eq_row_3 : ∀ j : Fin 8, (k9t4p22.initialMatrix 9) 3 j = k9t4p22_state_0 3 j := by decide + +private theorem k9t4p22_initial_eq_row_4 : ∀ j : Fin 8, (k9t4p22.initialMatrix 9) 4 j = k9t4p22_state_0 4 j := by decide + +private theorem k9t4p22_initial_eq_row_5 : ∀ j : Fin 8, (k9t4p22.initialMatrix 9) 5 j = k9t4p22_state_0 5 j := by decide + +private theorem k9t4p22_initial_eq_row_6 : ∀ j : Fin 8, (k9t4p22.initialMatrix 9) 6 j = k9t4p22_state_0 6 j := by decide + +private theorem k9t4p22_initial_eq_row_7 : ∀ j : Fin 8, (k9t4p22.initialMatrix 9) 7 j = k9t4p22_state_0 7 j := by decide + +private theorem k9t4p22_initial_eq : (k9t4p22.initialMatrix 9) = k9t4p22_state_0 := by + funext i j + fin_cases i + + · exact k9t4p22_initial_eq_row_0 j + + · exact k9t4p22_initial_eq_row_1 j + + · exact k9t4p22_initial_eq_row_2 j + + · exact k9t4p22_initial_eq_row_3 j + + · exact k9t4p22_initial_eq_row_4 j + + · exact k9t4p22_initial_eq_row_5 j + + · exact k9t4p22_initial_eq_row_6 j + + · exact k9t4p22_initial_eq_row_7 j + +private theorem k9t4p22_closure_0 : ClosureCheck k9t4p22.graph k9t4p22_state_0 9 4 [] := by trivial + +private theorem k9t4p22_matrix_eq : k9t4p22.matrix 9 = k9t4p22_state_0 := by + change closureMatrix (k9t4p22.initialMatrix 9) _ = _ + rw [k9t4p22_initial_eq] + change closureMatrix k9t4p22_state_0 [] = _ + rfl + +private theorem k9t4p22_part_0 : k9t4p22.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p22_part_1 : k9t4p22.chains.map List.length = ([[2], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p22_part_2 : k9t4p22.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p22.clique))) = ([[2], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p22_templates_item_0 : (⟨0, 1, [], [], [2, 3], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_1 : (⟨0, 1, [[4, 5, 6, 7]], [], [2, 3], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_2 : (⟨0, 5, [], [], [6, 7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_3 : (⟨0, 5, [], [3, 2, 1], [6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_4 : (⟨0, 6, [], [], [5, 4], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_5 : (⟨0, 6, [], [3, 2, 1], [5, 4], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_6 : (⟨1, 2, [], [0], [3], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_7 : (⟨1, 2, [[4, 5, 6, 7]], [0], [3], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_8 : (⟨1, 4, [], [3, 2], [], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_9 : (⟨1, 4, [], [3, 2], [5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_10 : (⟨1, 5, [], [0], [4], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_11 : (⟨1, 5, [], [0], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_12 : (⟨1, 6, [], [0], [5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_13 : (⟨1, 6, [], [0], [7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_14 : (⟨1, 7, [], [3, 2], [], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_15 : (⟨1, 7, [], [3, 2], [6, 5, 4], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_16 : (⟨2, 3, [], [0, 1], [], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_17 : (⟨2, 3, [[4, 5, 6, 7]], [0, 1], [], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_18 : (⟨2, 4, [], [0, 1], [], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_19 : (⟨2, 4, [], [0, 1], [5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_20 : (⟨2, 5, [], [0, 1], [4], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_21 : (⟨2, 5, [], [3], [4], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_22 : (⟨2, 6, [], [0, 1], [5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_23 : (⟨2, 6, [], [0, 1], [7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_24 : (⟨2, 6, [], [3], [7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_25 : (⟨2, 7, [], [0, 1], [], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_26 : (⟨2, 7, [], [0, 1], [6, 5, 4], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_27 : (⟨3, 5, [], [], [6, 7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_28 : (⟨3, 5, [], [0, 1, 2], [6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_29 : (⟨3, 6, [], [], [5, 4], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_30 : (⟨3, 6, [], [0, 1, 2], [5, 4], 1, 3⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_31 : (⟨4, 5, [], [], [6, 7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_32 : (⟨4, 5, [[0, 1, 2, 3]], [], [6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_33 : (⟨5, 6, [], [4], [7], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_34 : (⟨5, 6, [[0, 1, 2, 3]], [4], [7], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_35 : (⟨6, 7, [], [4, 5], [], 2, 6⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_templates_item_36 : (⟨6, 7, [[0, 1, 2, 3]], [4, 5], [], 1, 2⟩ : TemplateData (Fin 8)).Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p22_part_3 : ∀ T ∈ k9t4p22.templates, T.Check k9t4p22.graph k9t4p22.clique 9 (patternAmount ([[2], [2]] : List (List ℕ))) (([[2], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p22, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p22_templates_item_0, k9t4p22_templates_item_1, k9t4p22_templates_item_2, k9t4p22_templates_item_3, k9t4p22_templates_item_4, k9t4p22_templates_item_5, k9t4p22_templates_item_6, k9t4p22_templates_item_7, k9t4p22_templates_item_8, k9t4p22_templates_item_9, k9t4p22_templates_item_10, k9t4p22_templates_item_11, k9t4p22_templates_item_12, k9t4p22_templates_item_13, k9t4p22_templates_item_14, k9t4p22_templates_item_15, k9t4p22_templates_item_16, k9t4p22_templates_item_17, k9t4p22_templates_item_18, k9t4p22_templates_item_19, k9t4p22_templates_item_20, k9t4p22_templates_item_21, k9t4p22_templates_item_22, k9t4p22_templates_item_23, k9t4p22_templates_item_24, k9t4p22_templates_item_25, k9t4p22_templates_item_26, k9t4p22_templates_item_27, k9t4p22_templates_item_28, k9t4p22_templates_item_29, k9t4p22_templates_item_30, k9t4p22_templates_item_31, k9t4p22_templates_item_32, k9t4p22_templates_item_33, k9t4p22_templates_item_34, k9t4p22_templates_item_35, k9t4p22_templates_item_36⟩ + +private theorem k9t4p22_part_4 : ∀ p ∈ k9t4p22.required, p.Check k9t4p22.graph 9 := by decide + +private theorem k9t4p22_part_5 : ClosureCheck k9t4p22.graph (k9t4p22.initialMatrix 9) 9 4 k9t4p22.closure := by + rw [k9t4p22_initial_eq] + exact k9t4p22_closure_0 + +private theorem k9t4p22_part_6 : k9t4p22.bad.Check k9t4p22.graph (k9t4p22.matrix 9) 9 4 := by + rw [k9t4p22_matrix_eq] + decide + +theorem k9t4p22_check : k9t4p22.Check 9 4 [[2], [2]] := + ⟨k9t4p22_part_0, k9t4p22_part_1, k9t4p22_part_2, k9t4p22_part_3, k9t4p22_part_4, k9t4p22_part_5, k9t4p22_part_6⟩ +private def k9t4p23_step_0_data : EdgeAttachmentData 9 := ⟨2, 0, [⟨2, 3, [0, 4, 5, 6, 7, 8]⟩, ⟨3, 8, [2, 0, 4, 5, 6, 7]⟩, ⟨3, 4, [2, 0, 8, 7, 6, 5]⟩, ⟨3, 2, [8, 7, 6, 5, 4, 0]⟩, ⟨3, 1, [8, 7, 6, 5, 4, 0, 2]⟩], ⟨none, {(2, 3), (5, 3), (3, 3), (4, 2)}⟩⟩ + +private def k9t4p23_step_0 : ClosureStep 9 := .edge k9t4p23_step_0_data + +private def k9t4p23_step_1_data : EdgeAttachmentData 9 := ⟨3, 1, [⟨0, 8, [1, 3, 4, 5, 6, 7]⟩, ⟨0, 4, [1, 3, 8, 7, 6, 5]⟩, ⟨0, 1, [8, 7, 6, 5, 4, 3]⟩, ⟨0, 2, [8, 7, 6, 5, 4, 3, 1]⟩, ⟨1, 0, [3, 4, 5, 6, 7, 8]⟩], ⟨none, {(1, 3), (5, 3), (0, 3), (4, 2)}⟩⟩ + +private def k9t4p23_step_1 : ClosureStep 9 := .edge k9t4p23_step_1_data + +private def k9t4p23_step_2_data : EdgeAttachmentData 9 := ⟨4, 1, [⟨1, 0, [4, 5, 6, 7, 8, 3]⟩, ⟨1, 2, [4, 5, 6, 7, 8, 3]⟩, ⟨2, 3, [1, 4, 5, 6, 7, 8]⟩, ⟨2, 0, [1, 4, 5, 6, 7, 8, 3]⟩, ⟨2, 1, [3, 8, 7, 6, 5, 4]⟩], ⟨none, {(1, 3), (2, 3), (5, 3), (6, 2)}⟩⟩ + +private def k9t4p23_step_2 : ClosureStep 9 := .edge k9t4p23_step_2_data + +private def k9t4p23_step_3_data : EdgeAttachmentData 9 := ⟨5, 0, [⟨1, 2, [0, 5, 6, 7, 8, 3]⟩, ⟨1, 0, [2, 3, 8, 7, 6, 5]⟩, ⟨2, 3, [1, 0, 5, 6, 7, 8]⟩, ⟨2, 1, [3, 8, 7, 6, 5, 0]⟩, ⟨4, 7, [3, 2, 1, 0, 5, 6]⟩, ⟨4, 8, [3, 2, 1, 0, 5, 6, 7]⟩, ⟨4, 6, [5, 0, 1, 2, 3, 8, 7]⟩, ⟨4, 7, [8, 3, 2, 1, 0, 5, 6]⟩, ⟨7, 4, [6, 5, 0, 1, 2, 3, 8]⟩, ⟨7, 4, [8, 3, 2, 1, 0, 5]⟩], ⟨none, {(1, 3), (2, 3), (7, 3), (4, 3)}⟩⟩ + +private def k9t4p23_step_3 : ClosureStep 9 := .edge k9t4p23_step_3_data + +private def k9t4p23_step_4_data : EdgeAttachmentData 9 := ⟨5, 1, [⟨0, 3, [1, 5, 4, 8]⟩, ⟨0, 4, [1, 5, 6, 7, 8, 3]⟩, ⟨0, 2, [1, 5, 6, 7, 8, 4, 3]⟩, ⟨0, 6, [3, 2, 1, 5, 4, 8, 7]⟩, ⟨0, 8, [3, 2, 1, 5, 6, 7]⟩, ⟨0, 1, [3, 4, 8, 7, 6, 5]⟩, ⟨0, 3, [4, 8, 7, 6, 5, 1, 2]⟩, ⟨0, 2, [8, 3, 4, 5, 1]⟩, ⟨0, 3, [8, 7, 6, 5, 1, 2]⟩, ⟨2, 3, [1, 5, 6, 7, 8, 0]⟩, ⟨2, 0, [1, 5, 6, 7, 8, 3, 4]⟩, ⟨2, 1, [3, 0, 8, 7, 6, 5]⟩, ⟨3, 4, [0, 1, 5, 6, 7, 8]⟩, ⟨3, 2, [0, 8, 7, 6, 5, 1]⟩, ⟨3, 6, [2, 1, 5, 4, 0, 8, 7]⟩, ⟨3, 0, [2, 1, 5, 6, 7, 8]⟩, ⟨3, 0, [2, 1, 5, 6, 7, 8, 4]⟩, ⟨3, 8, [4, 0, 1, 5, 6, 7]⟩, ⟨4, 3, [0, 1, 5, 6, 7, 8]⟩, ⟨4, 7, [0, 3, 2, 1, 5, 6]⟩, ⟨4, 8, [0, 3, 2, 1, 5, 6, 7]⟩, ⟨4, 7, [0, 8, 3, 2, 1, 5, 6]⟩, ⟨4, 8, [3, 0, 1, 5, 6, 7]⟩, ⟨4, 0, [3, 8, 7, 6, 5, 1]⟩, ⟨4, 6, [5, 1, 2, 3, 0, 8, 7]⟩], ⟨none, {(0, 3), (2, 3), (4, 3), (3, 3)}⟩⟩ + +private def k9t4p23_step_4 : ClosureStep 9 := .edge k9t4p23_step_4_data + +private def k9t4p23_step_5_data : EdgeAttachmentData 9 := ⟨5, 2, [⟨0, 6, [1, 2, 5, 4, 3, 8, 7]⟩, ⟨0, 3, [1, 2, 5, 6, 7, 8]⟩, ⟨0, 3, [1, 2, 5, 6, 7, 8, 4]⟩, ⟨0, 1, [3, 8, 7, 6, 5, 2]⟩, ⟨0, 8, [4, 3, 2, 5, 6, 7]⟩, ⟨0, 4, [8, 7, 6, 5, 2, 3]⟩, ⟨1, 2, [0, 3, 8, 7, 6, 5]⟩, ⟨1, 3, [0, 4, 8, 7, 6, 5, 2]⟩, ⟨1, 3, [0, 8, 4, 5, 2]⟩, ⟨1, 0, [2, 5, 6, 7, 8, 3]⟩, ⟨3, 6, [0, 1, 2, 5, 4, 8, 7]⟩, ⟨3, 8, [0, 1, 2, 5, 6, 7]⟩, ⟨3, 2, [0, 4, 8, 7, 6, 5]⟩, ⟨3, 1, [0, 4, 8, 7, 6, 5, 2]⟩, ⟨3, 0, [2, 5, 4, 8]⟩, ⟨3, 4, [2, 5, 6, 7, 8, 0]⟩, ⟨3, 0, [4, 8, 7, 6, 5, 2, 1]⟩, ⟨3, 0, [8, 7, 6, 5, 2, 1]⟩, ⟨4, 8, [0, 1, 2, 5, 6, 7]⟩, ⟨4, 7, [0, 8, 3, 2, 5, 6]⟩, ⟨4, 3, [0, 8, 7, 6, 5, 2]⟩, ⟨4, 8, [3, 0, 1, 2, 5, 6, 7]⟩, ⟨4, 6, [5, 2, 1, 0, 3, 8, 7]⟩, ⟨4, 7, [8, 3, 0, 1, 2, 5, 6]⟩, ⟨4, 0, [8, 7, 6, 5, 2, 1]⟩], ⟨none, {(1, 3), (3, 3), (4, 3), (0, 3)}⟩⟩ + +private def k9t4p23_step_5 : ClosureStep 9 := .edge k9t4p23_step_5_data + +private def k9t4p23_step_6_data : EdgeAttachmentData 9 := ⟨5, 3, [⟨1, 2, [0, 8, 7, 6, 5, 3]⟩, ⟨1, 0, [2, 3, 5, 6, 7, 8]⟩, ⟨2, 3, [1, 0, 8, 7, 6, 5]⟩, ⟨2, 1, [3, 5, 6, 7, 8, 0]⟩, ⟨4, 7, [0, 1, 2, 3, 5, 6]⟩, ⟨4, 8, [0, 1, 2, 3, 5, 6, 7]⟩, ⟨4, 6, [5, 3, 2, 1, 0, 8, 7]⟩, ⟨4, 7, [8, 0, 1, 2, 3, 5, 6]⟩, ⟨7, 4, [6, 5, 3, 2, 1, 0, 8]⟩, ⟨7, 4, [8, 0, 1, 2, 3, 5]⟩], ⟨none, {(2, 3), (1, 3), (7, 3), (4, 3)}⟩⟩ + +private def k9t4p23_step_6 : ClosureStep 9 := .edge k9t4p23_step_6_data + +private def k9t4p23_step_7_data : EdgeAttachmentData 9 := ⟨6, 0, [⟨1, 2, [0, 6, 5, 4, 8, 3]⟩, ⟨1, 0, [2, 3, 8, 4, 5, 6]⟩, ⟨2, 3, [1, 0, 6, 5, 4, 8]⟩, ⟨2, 1, [3, 8, 4, 5, 6, 0]⟩, ⟨5, 8, [4, 3, 2, 1, 0, 6, 7]⟩, ⟨5, 7, [4, 8, 3, 2, 1, 0, 6]⟩, ⟨5, 8, [6, 0, 1, 2, 3, 4]⟩, ⟨7, 4, [6, 0, 1, 2, 3, 8]⟩, ⟨7, 4, [8, 3, 2, 1, 0, 6, 5]⟩, ⟨7, 5, [8, 4, 3, 2, 1, 0, 6]⟩], ⟨none, {(5, 3), (7, 3), (2, 3), (1, 3)}⟩⟩ + +private def k9t4p23_step_7 : ClosureStep 9 := .edge k9t4p23_step_7_data + +private def k9t4p23_step_8_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨3, 0, [2, 1, 4, 9, 5, 6, 7]⟩, ⟨3, 0, [2, 1, 4, 9, 8, 7]⟩, ⟨3, 4, [2, 1, 0, 7, 6, 5]⟩, ⟨3, 8, [2, 1, 0, 7, 6, 5, 4, 9]⟩, ⟨3, 6, [2, 1, 0, 7, 8, 9, 4, 5]⟩, ⟨3, 2, [4, 9, 8, 7, 0, 1]⟩, ⟨6, 0, [5, 1, 2, 3, 4, 9, 8, 7]⟩, ⟨6, 0, [5, 1, 4, 9, 8, 7]⟩, ⟨6, 0, [5, 1, 9, 8, 7]⟩, ⟨6, 2, [5, 1, 0, 7, 8, 9, 4, 3]⟩, ⟨6, 8, [5, 4, 3, 2, 1, 0, 7]⟩, ⟨6, 9, [5, 4, 3, 2, 1, 0, 7, 8]⟩] + +private def k9t4p23_step_8_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨6, 3, [5, 4, 9, 8, 7, 0, 1, 2]⟩, ⟨6, 0, [5, 9, 4, 1]⟩, ⟨6, 8, [5, 9, 4, 3, 2, 1, 0, 7]⟩, ⟨6, 4, [5, 9, 8, 7, 0, 1, 2, 3]⟩, ⟨6, 0, [7, 8, 9, 4, 3, 2, 1]⟩, ⟨6, 9, [7, 0, 1, 2, 3, 4, 5]⟩, ⟨8, 0, [7, 6, 5, 4, 3, 2, 1]⟩, ⟨8, 5, [7, 0, 1, 2, 3, 4, 9]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 5, 6, 7]⟩, ⟨8, 2, [9, 1, 0, 7, 6, 5, 4, 3]⟩] + +private def k9t4p23_step_8_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 6, [9, 4, 3, 2, 1, 0, 7]⟩, ⟨8, 5, [9, 4, 3, 2, 1, 0, 7, 6]⟩, ⟨8, 0, [9, 4, 5, 1]⟩, ⟨8, 3, [9, 4, 5, 6, 7, 0, 1, 2]⟩, ⟨8, 6, [9, 5, 4, 3, 2, 1, 0, 7]⟩, ⟨8, 4, [9, 5, 6, 7, 0, 1, 2, 3]⟩, ⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 6, [1, 2, 3, 4, 5, 9, 8, 7]⟩, ⟨0, 7, [1, 2, 3, 4, 9, 5, 6]⟩, ⟨0, 8, [1, 2, 3, 4, 9, 5, 6, 7]⟩, ⟨0, 6, [1, 2, 3, 4, 9, 8, 7]⟩] + +private def k9t4p23_step_8_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 5, [1, 2, 3, 4, 9, 8, 7, 6]⟩, ⟨0, 3, [1, 5, 4]⟩, ⟨0, 3, [1, 5, 6, 7, 8, 9, 4]⟩, ⟨0, 2, [1, 5, 6, 7, 8, 9, 4, 3]⟩, ⟨0, 3, [1, 5, 9, 4]⟩, ⟨0, 3, [7, 6, 5, 1, 2]⟩, ⟨0, 9, [7, 6, 5, 1, 2, 3, 4]⟩, ⟨0, 3, [7, 6, 5, 1, 9, 4]⟩, ⟨0, 2, [7, 6, 5, 1, 9, 4, 3]⟩, ⟨0, 4, [7, 6, 5, 9, 1, 2, 3]⟩, ⟨0, 1, [7, 6, 5, 9, 4, 3, 2]⟩, ⟨0, 5, [7, 8, 9, 1, 2, 3, 4]⟩] + +private def k9t4p23_step_8_data : FreshAttachmentData 9 := ⟨6, 0, k9t4p23_step_8_required_block_0 ++ k9t4p23_step_8_required_block_1 ++ k9t4p23_step_8_required_block_2 ++ k9t4p23_step_8_required_block_3, ⟨none, {(6, 2), (8, 2), (0, 2), (3, 3)}⟩⟩ + +private def k9t4p23_step_8 : ClosureStep 9 := .fresh k9t4p23_step_8_data + +private def k9t4p23_step_9_data : EdgeAttachmentData 9 := ⟨6, 1, [⟨1, 2, [6, 5, 4, 0, 8, 3]⟩, ⟨2, 3, [1, 6, 5, 4, 0, 8]⟩, ⟨2, 1, [3, 0, 8, 4, 5, 6]⟩, ⟨5, 8, [4, 0, 3, 2, 1, 6, 7]⟩, ⟨5, 7, [4, 0, 8, 3, 2, 1, 6]⟩, ⟨5, 8, [4, 3, 0, 1, 6, 7]⟩, ⟨7, 4, [8, 0, 3, 2, 1, 6, 5]⟩, ⟨7, 5, [8, 0, 4, 3, 2, 1, 6]⟩, ⟨7, 4, [8, 3, 0, 1, 6, 5]⟩], ⟨none, {(5, 3), (7, 3), (2, 3), (1, 3)}⟩⟩ + +private def k9t4p23_step_9 : ClosureStep 9 := .edge k9t4p23_step_9_data + +private def k9t4p23_step_10_data : EdgeAttachmentData 9 := ⟨6, 2, [⟨1, 2, [0, 8, 3, 4, 5, 6]⟩, ⟨1, 0, [2, 6, 5, 4, 8, 3]⟩, ⟨2, 1, [6, 5, 4, 8, 3, 0]⟩, ⟨5, 8, [4, 0, 1, 2, 6, 7]⟩, ⟨5, 8, [4, 3, 0, 1, 2, 6, 7]⟩, ⟨5, 7, [4, 8, 3, 0, 1, 2, 6]⟩, ⟨7, 4, [8, 0, 1, 2, 6, 5]⟩, ⟨7, 4, [8, 3, 0, 1, 2, 6, 5]⟩, ⟨7, 5, [8, 3, 4, 0, 1, 2, 6]⟩], ⟨none, {(5, 3), (7, 3), (1, 3), (2, 3)}⟩⟩ + +private def k9t4p23_step_10 : ClosureStep 9 := .edge k9t4p23_step_10_data + +private def k9t4p23_step_11_data : EdgeAttachmentData 9 := ⟨6, 3, [⟨1, 2, [0, 8, 4, 5, 6, 3]⟩, ⟨1, 0, [2, 3, 6, 5, 4, 8]⟩, ⟨2, 3, [1, 0, 8, 4, 5, 6]⟩, ⟨2, 1, [3, 6, 5, 4, 8, 0]⟩, ⟨5, 8, [4, 0, 1, 2, 3, 6, 7]⟩, ⟨5, 7, [4, 8, 0, 1, 2, 3, 6]⟩, ⟨5, 8, [6, 3, 2, 1, 0, 4]⟩, ⟨7, 4, [6, 3, 2, 1, 0, 8]⟩, ⟨7, 4, [8, 0, 1, 2, 3, 6, 5]⟩, ⟨7, 5, [8, 4, 0, 1, 2, 3, 6]⟩], ⟨none, {(5, 3), (7, 3), (1, 3), (2, 3)}⟩⟩ + +private def k9t4p23_step_11 : ClosureStep 9 := .edge k9t4p23_step_11_data + +private def k9t4p23_step_12_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨2, 0, [1, 9, 4, 5, 6, 7]⟩, ⟨2, 0, [1, 9, 8, 7, 6, 5, 4]⟩, ⟨2, 3, [1, 9, 8, 7, 0, 4]⟩, ⟨2, 1, [3, 4, 0, 7, 6, 5]⟩, ⟨2, 8, [3, 4, 0, 7, 6, 5, 1, 9]⟩, ⟨2, 6, [3, 4, 0, 7, 8, 9, 1, 5]⟩, ⟨6, 0, [5, 1, 2, 3, 4, 9, 8, 7]⟩, ⟨6, 8, [5, 1, 2, 3, 4, 0, 7]⟩, ⟨6, 9, [5, 1, 2, 3, 4, 0, 7, 8]⟩, ⟨6, 0, [5, 1, 4, 9, 8, 7]⟩, ⟨6, 0, [5, 1, 9, 4]⟩, ⟨6, 0, [5, 1, 9, 8, 7]⟩] + +private def k9t4p23_step_12_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨6, 2, [5, 1, 9, 8, 7, 0, 4, 3]⟩, ⟨6, 8, [5, 9, 1, 2, 3, 4, 0, 7]⟩, ⟨6, 3, [5, 9, 8, 7, 0, 4, 1, 2]⟩, ⟨6, 1, [5, 9, 8, 7, 0, 4, 3, 2]⟩, ⟨6, 0, [7, 8, 9, 1, 2, 3, 4]⟩, ⟨6, 9, [7, 0, 4, 3, 2, 1, 5]⟩, ⟨8, 0, [7, 6, 5, 1, 2, 3, 4]⟩, ⟨8, 5, [7, 0, 4, 3, 2, 1, 9]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 3, 4]⟩, ⟨8, 6, [9, 1, 2, 3, 4, 0, 7]⟩, ⟨8, 5, [9, 1, 2, 3, 4, 0, 7, 6]⟩] + +private def k9t4p23_step_12_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 0, [9, 1, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 5, 4]⟩, ⟨8, 2, [9, 1, 5, 6, 7, 0, 4, 3]⟩, ⟨8, 3, [9, 4, 0, 7, 6, 5, 1, 2]⟩, ⟨8, 6, [9, 5, 1, 2, 3, 4, 0, 7]⟩, ⟨8, 1, [9, 5, 6, 7, 0, 4, 3, 2]⟩, ⟨0, 8, [4, 3, 2, 1, 5, 6, 7]⟩, ⟨0, 9, [4, 3, 2, 1, 5, 6, 7, 8]⟩, ⟨0, 6, [4, 3, 2, 1, 5, 9, 8, 7]⟩, ⟨0, 7, [4, 3, 2, 1, 9, 5, 6]⟩, ⟨0, 8, [4, 3, 2, 1, 9, 5, 6, 7]⟩, ⟨0, 6, [4, 3, 2, 1, 9, 8, 7]⟩] + +private def k9t4p23_step_12_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 5, [4, 3, 2, 1, 9, 8, 7, 6]⟩, ⟨0, 2, [4, 5, 1]⟩, ⟨0, 2, [4, 5, 6, 7, 8, 9, 1]⟩, ⟨0, 3, [4, 5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 2, [4, 5, 9, 1]⟩, ⟨0, 9, [7, 6, 5, 1, 2, 3, 4]⟩, ⟨0, 2, [7, 6, 5, 1, 4, 3]⟩, ⟨0, 2, [7, 6, 5, 9, 1]⟩, ⟨0, 4, [7, 6, 5, 9, 1, 2, 3]⟩, ⟨0, 3, [7, 6, 5, 9, 4, 1, 2]⟩, ⟨0, 1, [7, 6, 5, 9, 4, 3, 2]⟩, ⟨0, 5, [7, 8, 9, 1, 2, 3, 4]⟩] + +private def k9t4p23_step_12_data : FreshAttachmentData 9 := ⟨6, 3, k9t4p23_step_12_required_block_0 ++ k9t4p23_step_12_required_block_1 ++ k9t4p23_step_12_required_block_2 ++ k9t4p23_step_12_required_block_3, ⟨none, {(6, 2), (8, 2), (0, 2), (2, 3)}⟩⟩ + +private def k9t4p23_step_12 : ClosureStep 9 := .fresh k9t4p23_step_12_data + +private def k9t4p23_step_13_data : EdgeAttachmentData 9 := ⟨6, 4, [⟨1, 2, [0, 8, 7, 6, 4, 3]⟩, ⟨1, 0, [2, 3, 8, 7, 6, 4]⟩, ⟨2, 3, [1, 0, 8, 7, 6, 4]⟩, ⟨2, 1, [3, 8, 7, 6, 4, 0]⟩, ⟨5, 7, [6, 4, 0, 1, 2, 3, 8]⟩, ⟨7, 5, [8, 0, 1, 2, 3, 4, 6]⟩], ⟨none, {(1, 3), (2, 3), (7, 3), (5, 3)}⟩⟩ + +private def k9t4p23_step_13 : ClosureStep 9 := .edge k9t4p23_step_13_data + +private def k9t4p23_step_14_data : EdgeAttachmentData 9 := ⟨7, 1, [⟨0, 8, [1, 7, 6, 5, 4, 3]⟩, ⟨0, 3, [1, 7, 6, 5, 4, 8]⟩, ⟨0, 2, [1, 7, 8, 4, 3]⟩, ⟨0, 4, [3, 2, 1, 7, 6, 5]⟩, ⟨0, 1, [8, 3, 4, 5, 6, 7]⟩, ⟨0, 2, [8, 3, 4, 5, 6, 7, 1]⟩, ⟨0, 3, [8, 4, 5, 6, 7, 1, 2]⟩, ⟨0, 3, [8, 7, 1, 2]⟩, ⟨0, 6, [8, 7, 1, 2, 3, 4, 5]⟩, ⟨2, 3, [1, 7, 6, 5, 4, 0]⟩, ⟨2, 0, [1, 7, 6, 5, 4, 8, 3]⟩, ⟨2, 1, [3, 0, 4, 5, 6, 7]⟩, ⟨3, 8, [0, 1, 7, 6, 5, 4]⟩, ⟨3, 2, [0, 4, 5, 6, 7, 1]⟩, ⟨3, 0, [2, 1, 7, 6, 5, 4, 8]⟩, ⟨3, 6, [2, 1, 7, 8, 0, 4, 5]⟩, ⟨3, 4, [8, 0, 1, 7, 6, 5]⟩, ⟨3, 0, [8, 4, 5, 6, 7, 1]⟩, ⟨8, 3, [0, 1, 7, 6, 5, 4]⟩, ⟨8, 5, [0, 3, 2, 1, 7, 6]⟩, ⟨8, 4, [0, 3, 2, 1, 7, 6, 5]⟩, ⟨8, 5, [0, 4, 3, 2, 1, 7, 6]⟩, ⟨8, 4, [3, 0, 1, 7, 6, 5]⟩, ⟨8, 0, [3, 4, 5, 6, 7, 1]⟩, ⟨8, 6, [7, 1, 2, 3, 0, 4, 5]⟩], ⟨none, {(0, 3), (2, 3), (8, 3), (3, 3)}⟩⟩ + +private def k9t4p23_step_14 : ClosureStep 9 := .edge k9t4p23_step_14_data + +private def k9t4p23_step_15_data : EdgeAttachmentData 9 := ⟨7, 5, [⟨1, 2, [0, 8, 7, 5, 4, 3]⟩, ⟨1, 0, [2, 3, 8, 7, 5, 4]⟩, ⟨2, 3, [1, 0, 8, 7, 5, 4]⟩, ⟨2, 1, [3, 8, 7, 5, 4, 0]⟩, ⟨4, 6, [0, 1, 2, 3, 8, 7, 5]⟩, ⟨4, 3, [5, 7, 8, 0, 1, 2]⟩, ⟨4, 0, [5, 7, 8, 3, 2, 1]⟩, ⟨4, 5, [8, 7]⟩], ⟨none, {(1, 3), (2, 3), (4, 3), (5, 3)}⟩⟩ + +private def k9t4p23_step_15 : ClosureStep 9 := .edge k9t4p23_step_15_data + +private def k9t4p23_step_16_data : EdgeAttachmentData 9 := ⟨8, 1, [⟨1, 0, [8, 7, 6, 5, 4, 3]⟩, ⟨1, 2, [8, 7, 6, 5, 4, 3]⟩, ⟨2, 3, [1, 8, 7, 6, 5, 4]⟩, ⟨2, 0, [1, 8, 7, 6, 5, 4, 3]⟩, ⟨2, 1, [3, 4, 5, 6, 7, 8]⟩], ⟨none, {(1, 3), (2, 3), (5, 3), (4, 2)}⟩⟩ + +private def k9t4p23_step_16 : ClosureStep 9 := .edge k9t4p23_step_16_data + +private def k9t4p23_step_17_data : FreshAttachmentData 9 := ⟨8, 5, [⟨2, 0, [1, 4, 5, 9, 8, 7, 6]⟩, ⟨2, 0, [1, 4, 9, 8, 7, 6]⟩, ⟨2, 3, [1, 9, 0, 6, 5, 4]⟩, ⟨2, 7, [3, 4, 1, 5, 6, 0, 9, 8]⟩, ⟨2, 0, [3, 4, 1, 5, 9, 8, 7, 6]⟩, ⟨2, 8, [3, 4, 1, 5, 9, 0, 6, 7]⟩, ⟨2, 1, [3, 4, 9, 0, 6, 5]⟩, ⟨3, 7, [2, 1, 4, 5, 6, 0, 9, 8]⟩, ⟨3, 0, [2, 1, 4, 5, 9, 8, 7, 6]⟩, ⟨3, 8, [2, 1, 4, 5, 9, 0, 6, 7]⟩, ⟨3, 0, [2, 1, 4, 9, 8, 7, 6]⟩, ⟨3, 0, [2, 1, 9, 4, 5, 6]⟩, ⟨3, 4, [2, 1, 9, 0, 6, 5]⟩, ⟨3, 2, [4, 9, 0, 6, 5, 1]⟩, ⟨7, 0, [6, 5, 1, 2, 3, 4, 9]⟩, ⟨7, 5, [6, 0, 9, 1, 2, 3, 4]⟩, ⟨7, 4, [6, 0, 9, 5, 1, 2, 3]⟩, ⟨7, 1, [6, 0, 9, 5, 4, 3, 2]⟩, ⟨7, 0, [8, 9, 1, 2, 3, 4, 5, 6]⟩, ⟨7, 4, [8, 9, 0, 6, 5, 1, 2, 3]⟩, ⟨7, 2, [8, 9, 0, 6, 5, 1, 4, 3]⟩, ⟨7, 3, [8, 9, 0, 6, 5, 4, 1, 2]⟩, ⟨7, 1, [8, 9, 0, 6, 5, 4, 3, 2]⟩, ⟨8, 0, [7, 6, 5, 1, 2, 3, 4, 9]⟩, ⟨8, 5, [7, 6, 0, 9, 1, 2, 3, 4]⟩, ⟨8, 2, [7, 6, 0, 9, 1, 5, 4, 3]⟩, ⟨8, 3, [7, 6, 0, 9, 4, 5, 1, 2]⟩, ⟨8, 4, [7, 6, 0, 9, 5, 1, 2, 3]⟩, ⟨8, 1, [7, 6, 0, 9, 5, 4, 3, 2]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6]⟩], ⟨none, {(7, 2), (2, 3), (3, 3), (8, 2)}⟩⟩ + +private def k9t4p23_step_17 : ClosureStep 9 := .fresh k9t4p23_step_17_data + +private def k9t4p23_step_18_data : EdgeAttachmentData 9 := ⟨8, 6, [⟨1, 2, [0, 8, 6, 5, 4, 3]⟩, ⟨1, 0, [2, 3, 8, 6, 5, 4]⟩, ⟨2, 3, [1, 0, 8, 6, 5, 4]⟩, ⟨2, 1, [3, 8, 6, 5, 4, 0]⟩, ⟨5, 7, [4, 0, 1, 2, 3, 8, 6]⟩, ⟨7, 5, [6, 8, 0, 1, 2, 3, 4]⟩], ⟨none, {(1, 3), (2, 3), (5, 3), (7, 3)}⟩⟩ + +private def k9t4p23_step_18 : ClosureStep 9 := .edge k9t4p23_step_18_data + +private def k9t4p23_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [], [], [2, 3], 3, 6⟩, ⟨0, 1, [[4, 5, 6, 7, 8]], [], [2, 3], 1, 1⟩, ⟨0, 2, [], [], [3], 4, 7⟩, ⟨0, 2, [[4, 5, 6, 7, 8]], [], [3], 2, 2⟩, ⟨0, 3, [], [], [], 5, 8⟩, ⟨0, 3, [[4, 5, 6, 7, 8]], [], [], 3, 3⟩, ⟨0, 4, [], [], [], 5, 8⟩, ⟨0, 4, [], [3, 2, 1], [], 4, 5⟩, ⟨0, 4, [], [], [5, 6, 7, 8], 3, 4⟩, ⟨0, 4, [], [3, 2, 1], [5, 6, 7, 8], 1, 1⟩, ⟨0, 5, [], [], [4], 4, 7⟩, ⟨0, 5, [], [], [6, 7, 8], 2, 5⟩] + +private def k9t4p23_templates_block_1 : List (TemplateData (Fin 9)) := [⟨0, 5, [], [3, 2, 1], [6, 7, 8], 1, 2⟩, ⟨0, 6, [], [3, 2, 1], [5, 4], 2, 3⟩, ⟨0, 7, [], [], [6, 5, 4], 2, 5⟩, ⟨0, 7, [], [3, 2, 1], [6, 5, 4], 1, 2⟩, ⟨0, 8, [], [], [], 5, 8⟩, ⟨0, 8, [], [3, 2, 1], [], 4, 5⟩, ⟨0, 8, [], [], [7, 6, 5, 4], 3, 4⟩, ⟨0, 8, [], [3, 2, 1], [7, 6, 5, 4], 1, 1⟩, ⟨1, 2, [], [0], [3], 3, 6⟩, ⟨1, 2, [[4, 5, 6, 7, 8]], [0], [3], 1, 1⟩, ⟨1, 3, [], [0], [], 4, 7⟩, ⟨1, 3, [[4, 5, 6, 7, 8]], [0], [], 2, 2⟩] + +private def k9t4p23_templates_block_2 : List (TemplateData (Fin 9)) := [⟨1, 4, [], [0], [], 4, 7⟩, ⟨1, 4, [], [3, 2], [], 3, 6⟩, ⟨1, 4, [], [0], [5, 6, 7, 8], 2, 3⟩, ⟨1, 4, [], [3, 2], [5, 6, 7, 8], 1, 2⟩, ⟨1, 5, [], [0], [4], 3, 6⟩, ⟨1, 5, [], [0], [6, 7, 8], 1, 4⟩, ⟨1, 6, [], [0], [5, 4], 2, 5⟩, ⟨1, 6, [], [3, 2], [5, 4], 1, 4⟩, ⟨1, 7, [], [0], [6, 5, 4], 1, 4⟩, ⟨1, 7, [], [0], [8], 3, 6⟩, ⟨1, 8, [], [0], [7, 6, 5, 4], 2, 3⟩, ⟨1, 8, [], [3, 2], [7, 6, 5, 4], 1, 2⟩] + +private def k9t4p23_templates_block_3 : List (TemplateData (Fin 9)) := [⟨2, 3, [], [0, 1], [], 3, 6⟩, ⟨2, 3, [[4, 5, 6, 7, 8]], [0, 1], [], 1, 1⟩, ⟨2, 4, [], [0, 1], [], 3, 6⟩, ⟨2, 4, [], [0, 1], [5, 6, 7, 8], 1, 2⟩, ⟨2, 5, [], [0, 1], [4], 2, 5⟩, ⟨2, 5, [], [0, 1], [6, 7, 8], 1, 3⟩, ⟨2, 5, [], [3], [4], 3, 6⟩, ⟨2, 6, [], [0, 1], [5, 4], 1, 4⟩, ⟨2, 6, [], [3], [5, 4], 2, 5⟩, ⟨2, 7, [], [0, 1], [6, 5, 4], 1, 3⟩, ⟨2, 7, [], [0, 1], [8], 2, 5⟩, ⟨2, 7, [], [3], [8], 3, 6⟩] + +private def k9t4p23_templates_block_4 : List (TemplateData (Fin 9)) := [⟨2, 8, [], [0, 1], [], 3, 6⟩, ⟨2, 8, [], [0, 1], [7, 6, 5, 4], 1, 2⟩, ⟨3, 4, [], [], [], 5, 8⟩, ⟨3, 4, [], [0, 1, 2], [], 4, 5⟩, ⟨3, 4, [], [], [5, 6, 7, 8], 3, 4⟩, ⟨3, 4, [], [0, 1, 2], [5, 6, 7, 8], 1, 1⟩, ⟨3, 5, [], [], [4], 4, 7⟩, ⟨3, 5, [], [], [6, 7, 8], 2, 5⟩, ⟨3, 5, [], [0, 1, 2], [6, 7, 8], 1, 2⟩, ⟨3, 6, [], [0, 1, 2], [5, 4], 2, 3⟩, ⟨3, 7, [], [], [6, 5, 4], 2, 5⟩, ⟨3, 7, [], [0, 1, 2], [6, 5, 4], 1, 2⟩] + +private def k9t4p23_templates_block_5 : List (TemplateData (Fin 9)) := [⟨3, 8, [], [], [], 5, 8⟩, ⟨3, 8, [], [0, 1, 2], [], 4, 5⟩, ⟨3, 8, [], [], [7, 6, 5, 4], 3, 4⟩, ⟨3, 8, [], [0, 1, 2], [7, 6, 5, 4], 1, 1⟩, ⟨4, 5, [], [], [6, 7, 8], 2, 5⟩, ⟨4, 5, [[0, 1, 2, 3]], [], [6, 7, 8], 1, 1⟩, ⟨4, 6, [[0, 1, 2, 3]], [], [7, 8], 2, 2⟩, ⟨4, 7, [], [], [8], 4, 7⟩, ⟨4, 7, [[0, 1, 2, 3]], [], [8], 3, 3⟩, ⟨5, 6, [], [4], [7, 8], 2, 5⟩, ⟨5, 6, [[0, 1, 2, 3]], [4], [7, 8], 1, 1⟩, ⟨5, 7, [], [4], [8], 3, 6⟩] + +private def k9t4p23_templates_block_6 : List (TemplateData (Fin 9)) := [⟨5, 7, [[0, 1, 2, 3]], [4], [8], 2, 2⟩, ⟨6, 7, [], [4, 5], [8], 2, 5⟩, ⟨6, 7, [[0, 1, 2, 3]], [4, 5], [8], 1, 1⟩, ⟨6, 8, [[0, 1, 2, 3]], [4, 5], [], 2, 2⟩, ⟨7, 8, [], [4, 5, 6], [], 2, 5⟩, ⟨7, 8, [[0, 1, 2, 3]], [4, 5, 6], [], 1, 1⟩] + +def k9t4p23 : LayoutCertificate 9 where + chains := [[0, 1, 2, 3], [4, 5, 6, 7, 8]] + clique := {0, 3, 4, 8} + templates := k9t4p23_templates_block_0 ++ k9t4p23_templates_block_1 ++ k9t4p23_templates_block_2 ++ k9t4p23_templates_block_3 ++ k9t4p23_templates_block_4 ++ k9t4p23_templates_block_5 ++ k9t4p23_templates_block_6 + required := [] + closure := [k9t4p23_step_0, k9t4p23_step_1, k9t4p23_step_2, k9t4p23_step_3, k9t4p23_step_4, k9t4p23_step_5, k9t4p23_step_6, k9t4p23_step_7, k9t4p23_step_8, k9t4p23_step_9, k9t4p23_step_10, k9t4p23_step_11, k9t4p23_step_12, k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] + bad := ⟨none, {(5, 2), (6, 2), (1, 1), (2, 0), (0, 0)}⟩ + + +private def k9t4p23_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 2 7, ∅, ∅, ∅], + #[{1, 3, 4, 5, 6}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 4, 5, 6, 7}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 3, 4, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 2 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_0) 0 j = k9t4p23_template_matrix_0 0 j := by decide + +private theorem k9t4p23_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_0) 1 j = k9t4p23_template_matrix_0 1 j := by decide + +private theorem k9t4p23_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_0) 2 j = k9t4p23_template_matrix_0 2 j := by decide + +private theorem k9t4p23_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_0) 3 j = k9t4p23_template_matrix_0 3 j := by decide + +private theorem k9t4p23_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_0) 4 j = k9t4p23_template_matrix_0 4 j := by decide + +private theorem k9t4p23_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_0) 5 j = k9t4p23_template_matrix_0 5 j := by decide + +private theorem k9t4p23_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_0) 6 j = k9t4p23_template_matrix_0 6 j := by decide + +private theorem k9t4p23_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_0) 7 j = k9t4p23_template_matrix_0 7 j := by decide + +private theorem k9t4p23_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_0) 8 j = k9t4p23_template_matrix_0 8 j := by decide + +private theorem k9t4p23_template_matrix_0_eq : (templateMatrix k9t4p23_templates_block_0) = k9t4p23_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t4p23_template_matrix_0_eq_row_0 j + + · exact k9t4p23_template_matrix_0_eq_row_1 j + + · exact k9t4p23_template_matrix_0_eq_row_2 j + + · exact k9t4p23_template_matrix_0_eq_row_3 j + + · exact k9t4p23_template_matrix_0_eq_row_4 j + + · exact k9t4p23_template_matrix_0_eq_row_5 j + + · exact k9t4p23_template_matrix_0_eq_row_6 j + + · exact k9t4p23_template_matrix_0_eq_row_7 j + + · exact k9t4p23_template_matrix_0_eq_row_8 j + +private def k9t4p23_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, {1, 2}, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[∅, ∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, ∅, ∅, ∅, ∅, ∅], + #[∅, {1, 3, 4, 5, 6}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {2, 4, 5, 6, 7}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 3, 4, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_1) 0 j = k9t4p23_template_matrix_1 0 j := by decide + +private theorem k9t4p23_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_1) 1 j = k9t4p23_template_matrix_1 1 j := by decide + +private theorem k9t4p23_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_1) 2 j = k9t4p23_template_matrix_1 2 j := by decide + +private theorem k9t4p23_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_1) 3 j = k9t4p23_template_matrix_1 3 j := by decide + +private theorem k9t4p23_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_1) 4 j = k9t4p23_template_matrix_1 4 j := by decide + +private theorem k9t4p23_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_1) 5 j = k9t4p23_template_matrix_1 5 j := by decide + +private theorem k9t4p23_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_1) 6 j = k9t4p23_template_matrix_1 6 j := by decide + +private theorem k9t4p23_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_1) 7 j = k9t4p23_template_matrix_1 7 j := by decide + +private theorem k9t4p23_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_1) 8 j = k9t4p23_template_matrix_1 8 j := by decide + +private theorem k9t4p23_template_matrix_1_eq : (templateMatrix k9t4p23_templates_block_1) = k9t4p23_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t4p23_template_matrix_1_eq_row_0 j + + · exact k9t4p23_template_matrix_1_eq_row_1 j + + · exact k9t4p23_template_matrix_1_eq_row_2 j + + · exact k9t4p23_template_matrix_1_eq_row_3 j + + · exact k9t4p23_template_matrix_1_eq_row_4 j + + · exact k9t4p23_template_matrix_1_eq_row_5 j + + · exact k9t4p23_template_matrix_1_eq_row_6 j + + · exact k9t4p23_template_matrix_1_eq_row_7 j + + · exact k9t4p23_template_matrix_1_eq_row_8 j + +private def k9t4p23_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_2) 0 j = k9t4p23_template_matrix_2 0 j := by decide + +private theorem k9t4p23_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_2) 1 j = k9t4p23_template_matrix_2 1 j := by decide + +private theorem k9t4p23_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_2) 2 j = k9t4p23_template_matrix_2 2 j := by decide + +private theorem k9t4p23_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_2) 3 j = k9t4p23_template_matrix_2 3 j := by decide + +private theorem k9t4p23_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_2) 4 j = k9t4p23_template_matrix_2 4 j := by decide + +private theorem k9t4p23_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_2) 5 j = k9t4p23_template_matrix_2 5 j := by decide + +private theorem k9t4p23_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_2) 6 j = k9t4p23_template_matrix_2 6 j := by decide + +private theorem k9t4p23_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_2) 7 j = k9t4p23_template_matrix_2 7 j := by decide + +private theorem k9t4p23_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_2) 8 j = k9t4p23_template_matrix_2 8 j := by decide + +private theorem k9t4p23_template_matrix_2_eq : (templateMatrix k9t4p23_templates_block_2) = k9t4p23_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t4p23_template_matrix_2_eq_row_0 j + + · exact k9t4p23_template_matrix_2_eq_row_1 j + + · exact k9t4p23_template_matrix_2_eq_row_2 j + + · exact k9t4p23_template_matrix_2_eq_row_3 j + + · exact k9t4p23_template_matrix_2_eq_row_4 j + + · exact k9t4p23_template_matrix_2_eq_row_5 j + + · exact k9t4p23_template_matrix_2_eq_row_6 j + + · exact k9t4p23_template_matrix_2_eq_row_7 j + + · exact k9t4p23_template_matrix_2_eq_row_8 j + +private def k9t4p23_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, ∅], + #[∅, ∅, {1, 3, 4, 5, 6}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_3) 0 j = k9t4p23_template_matrix_3 0 j := by decide + +private theorem k9t4p23_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_3) 1 j = k9t4p23_template_matrix_3 1 j := by decide + +private theorem k9t4p23_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_3) 2 j = k9t4p23_template_matrix_3 2 j := by decide + +private theorem k9t4p23_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_3) 3 j = k9t4p23_template_matrix_3 3 j := by decide + +private theorem k9t4p23_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_3) 4 j = k9t4p23_template_matrix_3 4 j := by decide + +private theorem k9t4p23_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_3) 5 j = k9t4p23_template_matrix_3 5 j := by decide + +private theorem k9t4p23_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_3) 6 j = k9t4p23_template_matrix_3 6 j := by decide + +private theorem k9t4p23_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_3) 7 j = k9t4p23_template_matrix_3 7 j := by decide + +private theorem k9t4p23_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_3) 8 j = k9t4p23_template_matrix_3 8 j := by decide + +private theorem k9t4p23_template_matrix_3_eq : (templateMatrix k9t4p23_templates_block_3) = k9t4p23_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t4p23_template_matrix_3_eq_row_0 j + + · exact k9t4p23_template_matrix_3_eq_row_1 j + + · exact k9t4p23_template_matrix_3_eq_row_2 j + + · exact k9t4p23_template_matrix_3_eq_row_3 j + + · exact k9t4p23_template_matrix_3_eq_row_4 j + + · exact k9t4p23_template_matrix_3_eq_row_5 j + + · exact k9t4p23_template_matrix_3_eq_row_6 j + + · exact k9t4p23_template_matrix_3_eq_row_7 j + + · exact k9t4p23_template_matrix_3_eq_row_8 j + +private def k9t4p23_template_matrix_4 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6], + #[∅, ∅, ∅, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, ∅], + #[∅, ∅, ∅, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {2, 3}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_template_matrix_4_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_4) 0 j = k9t4p23_template_matrix_4 0 j := by decide + +private theorem k9t4p23_template_matrix_4_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_4) 1 j = k9t4p23_template_matrix_4 1 j := by decide + +private theorem k9t4p23_template_matrix_4_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_4) 2 j = k9t4p23_template_matrix_4 2 j := by decide + +private theorem k9t4p23_template_matrix_4_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_4) 3 j = k9t4p23_template_matrix_4 3 j := by decide + +private theorem k9t4p23_template_matrix_4_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_4) 4 j = k9t4p23_template_matrix_4 4 j := by decide + +private theorem k9t4p23_template_matrix_4_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_4) 5 j = k9t4p23_template_matrix_4 5 j := by decide + +private theorem k9t4p23_template_matrix_4_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_4) 6 j = k9t4p23_template_matrix_4 6 j := by decide + +private theorem k9t4p23_template_matrix_4_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_4) 7 j = k9t4p23_template_matrix_4 7 j := by decide + +private theorem k9t4p23_template_matrix_4_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_4) 8 j = k9t4p23_template_matrix_4 8 j := by decide + +private theorem k9t4p23_template_matrix_4_eq : (templateMatrix k9t4p23_templates_block_4) = k9t4p23_template_matrix_4 := by + funext i j + fin_cases i + + · exact k9t4p23_template_matrix_4_eq_row_0 j + + · exact k9t4p23_template_matrix_4_eq_row_1 j + + · exact k9t4p23_template_matrix_4_eq_row_2 j + + · exact k9t4p23_template_matrix_4_eq_row_3 j + + · exact k9t4p23_template_matrix_4_eq_row_4 j + + · exact k9t4p23_template_matrix_4_eq_row_5 j + + · exact k9t4p23_template_matrix_4_eq_row_6 j + + · exact k9t4p23_template_matrix_4_eq_row_7 j + + · exact k9t4p23_template_matrix_4_eq_row_8 j + +private def k9t4p23_template_matrix_5 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 3, 4, 5, 6, 7, 8}], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 3 6, ∅], + #[∅, ∅, ∅, ∅, {2}, Finset.Icc 1 5, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 3 7, Finset.Icc 3 6, ∅, ∅, ∅], + #[∅, ∅, ∅, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_template_matrix_5_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_5) 0 j = k9t4p23_template_matrix_5 0 j := by decide + +private theorem k9t4p23_template_matrix_5_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_5) 1 j = k9t4p23_template_matrix_5 1 j := by decide + +private theorem k9t4p23_template_matrix_5_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_5) 2 j = k9t4p23_template_matrix_5 2 j := by decide + +private theorem k9t4p23_template_matrix_5_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_5) 3 j = k9t4p23_template_matrix_5 3 j := by decide + +private theorem k9t4p23_template_matrix_5_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_5) 4 j = k9t4p23_template_matrix_5 4 j := by decide + +private theorem k9t4p23_template_matrix_5_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_5) 5 j = k9t4p23_template_matrix_5 5 j := by decide + +private theorem k9t4p23_template_matrix_5_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_5) 6 j = k9t4p23_template_matrix_5 6 j := by decide + +private theorem k9t4p23_template_matrix_5_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_5) 7 j = k9t4p23_template_matrix_5 7 j := by decide + +private theorem k9t4p23_template_matrix_5_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_5) 8 j = k9t4p23_template_matrix_5 8 j := by decide + +private theorem k9t4p23_template_matrix_5_eq : (templateMatrix k9t4p23_templates_block_5) = k9t4p23_template_matrix_5 := by + funext i j + fin_cases i + + · exact k9t4p23_template_matrix_5_eq_row_0 j + + · exact k9t4p23_template_matrix_5_eq_row_1 j + + · exact k9t4p23_template_matrix_5_eq_row_2 j + + · exact k9t4p23_template_matrix_5_eq_row_3 j + + · exact k9t4p23_template_matrix_5_eq_row_4 j + + · exact k9t4p23_template_matrix_5_eq_row_5 j + + · exact k9t4p23_template_matrix_5_eq_row_6 j + + · exact k9t4p23_template_matrix_5_eq_row_7 j + + · exact k9t4p23_template_matrix_5_eq_row_8 j + +private def k9t4p23_template_matrix_6 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 5, {2}], + #[∅, ∅, ∅, ∅, ∅, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[∅, ∅, ∅, ∅, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_template_matrix_6_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_6) 0 j = k9t4p23_template_matrix_6 0 j := by decide + +private theorem k9t4p23_template_matrix_6_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_6) 1 j = k9t4p23_template_matrix_6 1 j := by decide + +private theorem k9t4p23_template_matrix_6_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_6) 2 j = k9t4p23_template_matrix_6 2 j := by decide + +private theorem k9t4p23_template_matrix_6_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_6) 3 j = k9t4p23_template_matrix_6 3 j := by decide + +private theorem k9t4p23_template_matrix_6_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_6) 4 j = k9t4p23_template_matrix_6 4 j := by decide + +private theorem k9t4p23_template_matrix_6_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_6) 5 j = k9t4p23_template_matrix_6 5 j := by decide + +private theorem k9t4p23_template_matrix_6_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_6) 6 j = k9t4p23_template_matrix_6 6 j := by decide + +private theorem k9t4p23_template_matrix_6_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_6) 7 j = k9t4p23_template_matrix_6 7 j := by decide + +private theorem k9t4p23_template_matrix_6_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p23_templates_block_6) 8 j = k9t4p23_template_matrix_6 8 j := by decide + +private theorem k9t4p23_template_matrix_6_eq : (templateMatrix k9t4p23_templates_block_6) = k9t4p23_template_matrix_6 := by + funext i j + fin_cases i + + · exact k9t4p23_template_matrix_6_eq_row_0 j + + · exact k9t4p23_template_matrix_6_eq_row_1 j + + · exact k9t4p23_template_matrix_6_eq_row_2 j + + · exact k9t4p23_template_matrix_6_eq_row_3 j + + · exact k9t4p23_template_matrix_6_eq_row_4 j + + · exact k9t4p23_template_matrix_6_eq_row_5 j + + · exact k9t4p23_template_matrix_6_eq_row_6 j + + · exact k9t4p23_template_matrix_6_eq_row_7 j + + · exact k9t4p23_template_matrix_6_eq_row_8 j + +private theorem k9t4p23_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => ((((((k9t4p23_template_matrix_0 i j ∪ k9t4p23_template_matrix_1 i j) ∪ k9t4p23_template_matrix_2 i j) ∪ k9t4p23_template_matrix_3 i j) ∪ k9t4p23_template_matrix_4 i j) ∪ k9t4p23_template_matrix_5 i j) ∪ k9t4p23_template_matrix_6 i j) ∪ requiredMatrix 9 k9t4p23.required i j) 0 j = k9t4p23_state_0 0 j := by decide + +private theorem k9t4p23_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => ((((((k9t4p23_template_matrix_0 i j ∪ k9t4p23_template_matrix_1 i j) ∪ k9t4p23_template_matrix_2 i j) ∪ k9t4p23_template_matrix_3 i j) ∪ k9t4p23_template_matrix_4 i j) ∪ k9t4p23_template_matrix_5 i j) ∪ k9t4p23_template_matrix_6 i j) ∪ requiredMatrix 9 k9t4p23.required i j) 1 j = k9t4p23_state_0 1 j := by decide + +private theorem k9t4p23_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => ((((((k9t4p23_template_matrix_0 i j ∪ k9t4p23_template_matrix_1 i j) ∪ k9t4p23_template_matrix_2 i j) ∪ k9t4p23_template_matrix_3 i j) ∪ k9t4p23_template_matrix_4 i j) ∪ k9t4p23_template_matrix_5 i j) ∪ k9t4p23_template_matrix_6 i j) ∪ requiredMatrix 9 k9t4p23.required i j) 2 j = k9t4p23_state_0 2 j := by decide + +private theorem k9t4p23_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => ((((((k9t4p23_template_matrix_0 i j ∪ k9t4p23_template_matrix_1 i j) ∪ k9t4p23_template_matrix_2 i j) ∪ k9t4p23_template_matrix_3 i j) ∪ k9t4p23_template_matrix_4 i j) ∪ k9t4p23_template_matrix_5 i j) ∪ k9t4p23_template_matrix_6 i j) ∪ requiredMatrix 9 k9t4p23.required i j) 3 j = k9t4p23_state_0 3 j := by decide + +private theorem k9t4p23_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => ((((((k9t4p23_template_matrix_0 i j ∪ k9t4p23_template_matrix_1 i j) ∪ k9t4p23_template_matrix_2 i j) ∪ k9t4p23_template_matrix_3 i j) ∪ k9t4p23_template_matrix_4 i j) ∪ k9t4p23_template_matrix_5 i j) ∪ k9t4p23_template_matrix_6 i j) ∪ requiredMatrix 9 k9t4p23.required i j) 4 j = k9t4p23_state_0 4 j := by decide + +private theorem k9t4p23_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => ((((((k9t4p23_template_matrix_0 i j ∪ k9t4p23_template_matrix_1 i j) ∪ k9t4p23_template_matrix_2 i j) ∪ k9t4p23_template_matrix_3 i j) ∪ k9t4p23_template_matrix_4 i j) ∪ k9t4p23_template_matrix_5 i j) ∪ k9t4p23_template_matrix_6 i j) ∪ requiredMatrix 9 k9t4p23.required i j) 5 j = k9t4p23_state_0 5 j := by decide + +private theorem k9t4p23_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => ((((((k9t4p23_template_matrix_0 i j ∪ k9t4p23_template_matrix_1 i j) ∪ k9t4p23_template_matrix_2 i j) ∪ k9t4p23_template_matrix_3 i j) ∪ k9t4p23_template_matrix_4 i j) ∪ k9t4p23_template_matrix_5 i j) ∪ k9t4p23_template_matrix_6 i j) ∪ requiredMatrix 9 k9t4p23.required i j) 6 j = k9t4p23_state_0 6 j := by decide + +private theorem k9t4p23_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => ((((((k9t4p23_template_matrix_0 i j ∪ k9t4p23_template_matrix_1 i j) ∪ k9t4p23_template_matrix_2 i j) ∪ k9t4p23_template_matrix_3 i j) ∪ k9t4p23_template_matrix_4 i j) ∪ k9t4p23_template_matrix_5 i j) ∪ k9t4p23_template_matrix_6 i j) ∪ requiredMatrix 9 k9t4p23.required i j) 7 j = k9t4p23_state_0 7 j := by decide + +private theorem k9t4p23_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => ((((((k9t4p23_template_matrix_0 i j ∪ k9t4p23_template_matrix_1 i j) ∪ k9t4p23_template_matrix_2 i j) ∪ k9t4p23_template_matrix_3 i j) ∪ k9t4p23_template_matrix_4 i j) ∪ k9t4p23_template_matrix_5 i j) ∪ k9t4p23_template_matrix_6 i j) ∪ requiredMatrix 9 k9t4p23.required i j) 8 j = k9t4p23_state_0 8 j := by decide + +private theorem k9t4p23_initial_merged_eq : (fun i j => ((((((k9t4p23_template_matrix_0 i j ∪ k9t4p23_template_matrix_1 i j) ∪ k9t4p23_template_matrix_2 i j) ∪ k9t4p23_template_matrix_3 i j) ∪ k9t4p23_template_matrix_4 i j) ∪ k9t4p23_template_matrix_5 i j) ∪ k9t4p23_template_matrix_6 i j) ∪ requiredMatrix 9 k9t4p23.required i j) = k9t4p23_state_0 := by + funext i j + fin_cases i + + · exact k9t4p23_initial_merged_eq_row_0 j + + · exact k9t4p23_initial_merged_eq_row_1 j + + · exact k9t4p23_initial_merged_eq_row_2 j + + · exact k9t4p23_initial_merged_eq_row_3 j + + · exact k9t4p23_initial_merged_eq_row_4 j + + · exact k9t4p23_initial_merged_eq_row_5 j + + · exact k9t4p23_initial_merged_eq_row_6 j + + · exact k9t4p23_initial_merged_eq_row_7 j + + · exact k9t4p23_initial_merged_eq_row_8 j + +private theorem k9t4p23_initial_eq : k9t4p23.initialMatrix 9 = k9t4p23_state_0 := by + funext i j + change templateMatrix (k9t4p23_templates_block_0 ++ k9t4p23_templates_block_1 ++ k9t4p23_templates_block_2 ++ k9t4p23_templates_block_3 ++ k9t4p23_templates_block_4 ++ k9t4p23_templates_block_5 ++ k9t4p23_templates_block_6) i j ∪ requiredMatrix 9 k9t4p23.required i j = _ + simp only [templateMatrix_append, k9t4p23_template_matrix_0_eq, k9t4p23_template_matrix_1_eq, k9t4p23_template_matrix_2_eq, k9t4p23_template_matrix_3_eq, k9t4p23_template_matrix_4_eq, k9t4p23_template_matrix_5_eq, k9t4p23_template_matrix_6_eq] + exact congrFun (congrFun k9t4p23_initial_merged_eq i) j + +private def k9t4p23_state_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {1, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 8, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, Finset.Icc 1 8], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 8, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, Finset.Icc 1 8, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_0_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_0 a b ∪ requiredMatrix 9 k9t4p23_step_0_data.required a b) 0 j = k9t4p23_local_0 0 j := by decide + +private theorem k9t4p23_local_0_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_0 a b ∪ requiredMatrix 9 k9t4p23_step_0_data.required a b) 1 j = k9t4p23_local_0 1 j := by decide + +private theorem k9t4p23_local_0_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_0 a b ∪ requiredMatrix 9 k9t4p23_step_0_data.required a b) 2 j = k9t4p23_local_0 2 j := by decide + +private theorem k9t4p23_local_0_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_0 a b ∪ requiredMatrix 9 k9t4p23_step_0_data.required a b) 3 j = k9t4p23_local_0 3 j := by decide + +private theorem k9t4p23_local_0_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_0 a b ∪ requiredMatrix 9 k9t4p23_step_0_data.required a b) 4 j = k9t4p23_local_0 4 j := by decide + +private theorem k9t4p23_local_0_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_0 a b ∪ requiredMatrix 9 k9t4p23_step_0_data.required a b) 5 j = k9t4p23_local_0 5 j := by decide + +private theorem k9t4p23_local_0_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_0 a b ∪ requiredMatrix 9 k9t4p23_step_0_data.required a b) 6 j = k9t4p23_local_0 6 j := by decide + +private theorem k9t4p23_local_0_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_0 a b ∪ requiredMatrix 9 k9t4p23_step_0_data.required a b) 7 j = k9t4p23_local_0 7 j := by decide + +private theorem k9t4p23_local_0_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_0 a b ∪ requiredMatrix 9 k9t4p23_step_0_data.required a b) 8 j = k9t4p23_local_0 8 j := by decide + +private theorem k9t4p23_local_0_eq : (fun a b => k9t4p23_state_0 a b ∪ requiredMatrix 9 k9t4p23_step_0_data.required a b) = k9t4p23_local_0 := by + funext i j + fin_cases i + + · exact k9t4p23_local_0_eq_row_0 j + + · exact k9t4p23_local_0_eq_row_1 j + + · exact k9t4p23_local_0_eq_row_2 j + + · exact k9t4p23_local_0_eq_row_3 j + + · exact k9t4p23_local_0_eq_row_4 j + + · exact k9t4p23_local_0_eq_row_5 j + + · exact k9t4p23_local_0_eq_row_6 j + + · exact k9t4p23_local_0_eq_row_7 j + + · exact k9t4p23_local_0_eq_row_8 j + +private theorem k9t4p23_local_0_paths : ∀ p ∈ k9t4p23_step_0_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_0_data.i k9t4p23_step_0_data.j) 9 := by decide + +private theorem k9t4p23_local_0_bad : k9t4p23_step_0_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_0_data.i k9t4p23_step_0_data.j) k9t4p23_local_0 9 4 := by decide + +private theorem k9t4p23_step_0_check : k9t4p23_step_0.Check k9t4p23.graph k9t4p23_state_0 9 4 := by + change k9t4p23_step_0_data.Check k9t4p23.graph k9t4p23_state_0 9 4 + refine ⟨k9t4p23_local_0_paths, ?_⟩ + rw [k9t4p23_local_0_eq] + exact k9t4p23_local_0_bad + +private theorem k9t4p23_update_0 : k9t4p23_step_0.apply k9t4p23_state_0 = k9t4p23_state_1 := by + have h : ∀ i j : Fin 9, k9t4p23_step_0.apply k9t4p23_state_0 i j = k9t4p23_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {0, 1, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, Finset.Icc 1 8, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, Finset.Icc 1 8], + #[Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6}, {2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 1, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[Finset.Icc 1 8, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_1_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_1 a b ∪ requiredMatrix 9 k9t4p23_step_1_data.required a b) 0 j = k9t4p23_local_1 0 j := by decide + +private theorem k9t4p23_local_1_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_1 a b ∪ requiredMatrix 9 k9t4p23_step_1_data.required a b) 1 j = k9t4p23_local_1 1 j := by decide + +private theorem k9t4p23_local_1_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_1 a b ∪ requiredMatrix 9 k9t4p23_step_1_data.required a b) 2 j = k9t4p23_local_1 2 j := by decide + +private theorem k9t4p23_local_1_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_1 a b ∪ requiredMatrix 9 k9t4p23_step_1_data.required a b) 3 j = k9t4p23_local_1 3 j := by decide + +private theorem k9t4p23_local_1_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_1 a b ∪ requiredMatrix 9 k9t4p23_step_1_data.required a b) 4 j = k9t4p23_local_1 4 j := by decide + +private theorem k9t4p23_local_1_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_1 a b ∪ requiredMatrix 9 k9t4p23_step_1_data.required a b) 5 j = k9t4p23_local_1 5 j := by decide + +private theorem k9t4p23_local_1_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_1 a b ∪ requiredMatrix 9 k9t4p23_step_1_data.required a b) 6 j = k9t4p23_local_1 6 j := by decide + +private theorem k9t4p23_local_1_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_1 a b ∪ requiredMatrix 9 k9t4p23_step_1_data.required a b) 7 j = k9t4p23_local_1 7 j := by decide + +private theorem k9t4p23_local_1_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_1 a b ∪ requiredMatrix 9 k9t4p23_step_1_data.required a b) 8 j = k9t4p23_local_1 8 j := by decide + +private theorem k9t4p23_local_1_eq : (fun a b => k9t4p23_state_1 a b ∪ requiredMatrix 9 k9t4p23_step_1_data.required a b) = k9t4p23_local_1 := by + funext i j + fin_cases i + + · exact k9t4p23_local_1_eq_row_0 j + + · exact k9t4p23_local_1_eq_row_1 j + + · exact k9t4p23_local_1_eq_row_2 j + + · exact k9t4p23_local_1_eq_row_3 j + + · exact k9t4p23_local_1_eq_row_4 j + + · exact k9t4p23_local_1_eq_row_5 j + + · exact k9t4p23_local_1_eq_row_6 j + + · exact k9t4p23_local_1_eq_row_7 j + + · exact k9t4p23_local_1_eq_row_8 j + +private theorem k9t4p23_local_1_paths : ∀ p ∈ k9t4p23_step_1_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_1_data.i k9t4p23_step_1_data.j) 9 := by decide + +private theorem k9t4p23_local_1_bad : k9t4p23_step_1_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_1_data.i k9t4p23_step_1_data.j) k9t4p23_local_1 9 4 := by decide + +private theorem k9t4p23_step_1_check : k9t4p23_step_1.Check k9t4p23.graph k9t4p23_state_1 9 4 := by + change k9t4p23_step_1_data.Check k9t4p23.graph k9t4p23_state_1 9 4 + refine ⟨k9t4p23_local_1_paths, ?_⟩ + rw [k9t4p23_local_1_eq] + exact k9t4p23_local_1_bad + +private theorem k9t4p23_update_1 : k9t4p23_step_1.apply k9t4p23_state_1 = k9t4p23_state_2 := by + have h : ∀ i j : Fin 9, k9t4p23_step_1.apply k9t4p23_state_1 i j = k9t4p23_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {0, 1, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 1, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_2_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_2 a b ∪ requiredMatrix 9 k9t4p23_step_2_data.required a b) 0 j = k9t4p23_local_2 0 j := by decide + +private theorem k9t4p23_local_2_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_2 a b ∪ requiredMatrix 9 k9t4p23_step_2_data.required a b) 1 j = k9t4p23_local_2 1 j := by decide + +private theorem k9t4p23_local_2_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_2 a b ∪ requiredMatrix 9 k9t4p23_step_2_data.required a b) 2 j = k9t4p23_local_2 2 j := by decide + +private theorem k9t4p23_local_2_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_2 a b ∪ requiredMatrix 9 k9t4p23_step_2_data.required a b) 3 j = k9t4p23_local_2 3 j := by decide + +private theorem k9t4p23_local_2_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_2 a b ∪ requiredMatrix 9 k9t4p23_step_2_data.required a b) 4 j = k9t4p23_local_2 4 j := by decide + +private theorem k9t4p23_local_2_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_2 a b ∪ requiredMatrix 9 k9t4p23_step_2_data.required a b) 5 j = k9t4p23_local_2 5 j := by decide + +private theorem k9t4p23_local_2_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_2 a b ∪ requiredMatrix 9 k9t4p23_step_2_data.required a b) 6 j = k9t4p23_local_2 6 j := by decide + +private theorem k9t4p23_local_2_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_2 a b ∪ requiredMatrix 9 k9t4p23_step_2_data.required a b) 7 j = k9t4p23_local_2 7 j := by decide + +private theorem k9t4p23_local_2_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_2 a b ∪ requiredMatrix 9 k9t4p23_step_2_data.required a b) 8 j = k9t4p23_local_2 8 j := by decide + +private theorem k9t4p23_local_2_eq : (fun a b => k9t4p23_state_2 a b ∪ requiredMatrix 9 k9t4p23_step_2_data.required a b) = k9t4p23_local_2 := by + funext i j + fin_cases i + + · exact k9t4p23_local_2_eq_row_0 j + + · exact k9t4p23_local_2_eq_row_1 j + + · exact k9t4p23_local_2_eq_row_2 j + + · exact k9t4p23_local_2_eq_row_3 j + + · exact k9t4p23_local_2_eq_row_4 j + + · exact k9t4p23_local_2_eq_row_5 j + + · exact k9t4p23_local_2_eq_row_6 j + + · exact k9t4p23_local_2_eq_row_7 j + + · exact k9t4p23_local_2_eq_row_8 j + +private theorem k9t4p23_local_2_paths : ∀ p ∈ k9t4p23_step_2_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_2_data.i k9t4p23_step_2_data.j) 9 := by decide + +private theorem k9t4p23_local_2_bad : k9t4p23_step_2_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_2_data.i k9t4p23_step_2_data.j) k9t4p23_local_2 9 4 := by decide + +private theorem k9t4p23_step_2_check : k9t4p23_step_2.Check k9t4p23.graph k9t4p23_state_2 9 4 := by + change k9t4p23_step_2_data.Check k9t4p23.graph k9t4p23_state_2 9 4 + refine ⟨k9t4p23_local_2_paths, ?_⟩ + rw [k9t4p23_local_2_eq] + exact k9t4p23_local_2_bad + +private theorem k9t4p23_update_2 : k9t4p23_step_2.apply k9t4p23_state_2 = k9t4p23_state_3 := by + have h : ∀ i j : Fin 9, k9t4p23_step_2.apply k9t4p23_state_2 i j = k9t4p23_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_4 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {1, 2}, Finset.Icc 1 7, {1}], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {1, 2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, {1}, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_3_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_3 a b ∪ requiredMatrix 9 k9t4p23_step_3_data.required a b) 0 j = k9t4p23_local_3 0 j := by decide + +private theorem k9t4p23_local_3_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_3 a b ∪ requiredMatrix 9 k9t4p23_step_3_data.required a b) 1 j = k9t4p23_local_3 1 j := by decide + +private theorem k9t4p23_local_3_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_3 a b ∪ requiredMatrix 9 k9t4p23_step_3_data.required a b) 2 j = k9t4p23_local_3 2 j := by decide + +private theorem k9t4p23_local_3_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_3 a b ∪ requiredMatrix 9 k9t4p23_step_3_data.required a b) 3 j = k9t4p23_local_3 3 j := by decide + +private theorem k9t4p23_local_3_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_3 a b ∪ requiredMatrix 9 k9t4p23_step_3_data.required a b) 4 j = k9t4p23_local_3 4 j := by decide + +private theorem k9t4p23_local_3_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_3 a b ∪ requiredMatrix 9 k9t4p23_step_3_data.required a b) 5 j = k9t4p23_local_3 5 j := by decide + +private theorem k9t4p23_local_3_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_3 a b ∪ requiredMatrix 9 k9t4p23_step_3_data.required a b) 6 j = k9t4p23_local_3 6 j := by decide + +private theorem k9t4p23_local_3_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_3 a b ∪ requiredMatrix 9 k9t4p23_step_3_data.required a b) 7 j = k9t4p23_local_3 7 j := by decide + +private theorem k9t4p23_local_3_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_3 a b ∪ requiredMatrix 9 k9t4p23_step_3_data.required a b) 8 j = k9t4p23_local_3 8 j := by decide + +private theorem k9t4p23_local_3_eq : (fun a b => k9t4p23_state_3 a b ∪ requiredMatrix 9 k9t4p23_step_3_data.required a b) = k9t4p23_local_3 := by + funext i j + fin_cases i + + · exact k9t4p23_local_3_eq_row_0 j + + · exact k9t4p23_local_3_eq_row_1 j + + · exact k9t4p23_local_3_eq_row_2 j + + · exact k9t4p23_local_3_eq_row_3 j + + · exact k9t4p23_local_3_eq_row_4 j + + · exact k9t4p23_local_3_eq_row_5 j + + · exact k9t4p23_local_3_eq_row_6 j + + · exact k9t4p23_local_3_eq_row_7 j + + · exact k9t4p23_local_3_eq_row_8 j + +private theorem k9t4p23_local_3_paths : ∀ p ∈ k9t4p23_step_3_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_3_data.i k9t4p23_step_3_data.j) 9 := by decide + +private theorem k9t4p23_local_3_bad : k9t4p23_step_3_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_3_data.i k9t4p23_step_3_data.j) k9t4p23_local_3 9 4 := by decide + +private theorem k9t4p23_step_3_check : k9t4p23_step_3.Check k9t4p23.graph k9t4p23_state_3 9 4 := by + change k9t4p23_step_3_data.Check k9t4p23.graph k9t4p23_state_3 9 4 + refine ⟨k9t4p23_local_3_paths, ?_⟩ + rw [k9t4p23_local_3_eq] + exact k9t4p23_local_3_bad + +private theorem k9t4p23_update_3 : k9t4p23_step_3.apply k9t4p23_state_3 = k9t4p23_state_4 := by + have h : ∀ i j : Fin 9, k9t4p23_step_3.apply k9t4p23_state_3 i j = k9t4p23_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_5 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_4 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 0 7, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 0 7, {1, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 8], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 0 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 8, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 8, Finset.Icc 1 7, {1, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 0 7, Finset.Icc 1 6, Finset.Icc 1 8, ∅, Finset.Icc 1 5, {1, 2}, Finset.Icc 1 7, {1, 2}], + #[Finset.Icc 0 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{1, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {1, 2, 3}, {1, 2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[Finset.Icc 1 8, {1, 2, 3}, Finset.Icc 1 6, Finset.Icc 1 8, {1, 2}, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_4_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_4 a b ∪ requiredMatrix 9 k9t4p23_step_4_data.required a b) 0 j = k9t4p23_local_4 0 j := by decide + +private theorem k9t4p23_local_4_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_4 a b ∪ requiredMatrix 9 k9t4p23_step_4_data.required a b) 1 j = k9t4p23_local_4 1 j := by decide + +private theorem k9t4p23_local_4_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_4 a b ∪ requiredMatrix 9 k9t4p23_step_4_data.required a b) 2 j = k9t4p23_local_4 2 j := by decide + +private theorem k9t4p23_local_4_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_4 a b ∪ requiredMatrix 9 k9t4p23_step_4_data.required a b) 3 j = k9t4p23_local_4 3 j := by decide + +private theorem k9t4p23_local_4_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_4 a b ∪ requiredMatrix 9 k9t4p23_step_4_data.required a b) 4 j = k9t4p23_local_4 4 j := by decide + +private theorem k9t4p23_local_4_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_4 a b ∪ requiredMatrix 9 k9t4p23_step_4_data.required a b) 5 j = k9t4p23_local_4 5 j := by decide + +private theorem k9t4p23_local_4_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_4 a b ∪ requiredMatrix 9 k9t4p23_step_4_data.required a b) 6 j = k9t4p23_local_4 6 j := by decide + +private theorem k9t4p23_local_4_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_4 a b ∪ requiredMatrix 9 k9t4p23_step_4_data.required a b) 7 j = k9t4p23_local_4 7 j := by decide + +private theorem k9t4p23_local_4_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_4 a b ∪ requiredMatrix 9 k9t4p23_step_4_data.required a b) 8 j = k9t4p23_local_4 8 j := by decide + +private theorem k9t4p23_local_4_eq : (fun a b => k9t4p23_state_4 a b ∪ requiredMatrix 9 k9t4p23_step_4_data.required a b) = k9t4p23_local_4 := by + funext i j + fin_cases i + + · exact k9t4p23_local_4_eq_row_0 j + + · exact k9t4p23_local_4_eq_row_1 j + + · exact k9t4p23_local_4_eq_row_2 j + + · exact k9t4p23_local_4_eq_row_3 j + + · exact k9t4p23_local_4_eq_row_4 j + + · exact k9t4p23_local_4_eq_row_5 j + + · exact k9t4p23_local_4_eq_row_6 j + + · exact k9t4p23_local_4_eq_row_7 j + + · exact k9t4p23_local_4_eq_row_8 j + +private theorem k9t4p23_local_4_paths : ∀ p ∈ k9t4p23_step_4_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_4_data.i k9t4p23_step_4_data.j) 9 := by decide + +private theorem k9t4p23_local_4_bad : k9t4p23_step_4_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_4_data.i k9t4p23_step_4_data.j) k9t4p23_local_4 9 4 := by decide + +private theorem k9t4p23_step_4_check : k9t4p23_step_4.Check k9t4p23.graph k9t4p23_state_4 9 4 := by + change k9t4p23_step_4_data.Check k9t4p23.graph k9t4p23_state_4 9 4 + refine ⟨k9t4p23_local_4_paths, ?_⟩ + rw [k9t4p23_local_4_eq] + exact k9t4p23_local_4_bad + +private theorem k9t4p23_update_4 : k9t4p23_step_4.apply k9t4p23_state_4 = k9t4p23_state_5 := by + have h : ∀ i j : Fin 9, k9t4p23_step_4.apply k9t4p23_state_4 i j = k9t4p23_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_6 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_5 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 0 7, {1, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 8], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 8, Finset.Icc 0 7, Finset.Icc 1 6, ∅, Finset.Icc 1 8, Finset.Icc 1 7, {1, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 0 7, Finset.Icc 1 6, Finset.Icc 1 8, ∅, Finset.Icc 1 5, {1, 2}, Finset.Icc 1 7, {1, 2}], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{1, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {1, 2, 3}, {1, 2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[Finset.Icc 1 8, {1, 2, 3}, Finset.Icc 1 6, Finset.Icc 1 8, {1, 2}, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_5_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_5 a b ∪ requiredMatrix 9 k9t4p23_step_5_data.required a b) 0 j = k9t4p23_local_5 0 j := by decide + +private theorem k9t4p23_local_5_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_5 a b ∪ requiredMatrix 9 k9t4p23_step_5_data.required a b) 1 j = k9t4p23_local_5 1 j := by decide + +private theorem k9t4p23_local_5_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_5 a b ∪ requiredMatrix 9 k9t4p23_step_5_data.required a b) 2 j = k9t4p23_local_5 2 j := by decide + +private theorem k9t4p23_local_5_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_5 a b ∪ requiredMatrix 9 k9t4p23_step_5_data.required a b) 3 j = k9t4p23_local_5 3 j := by decide + +private theorem k9t4p23_local_5_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_5 a b ∪ requiredMatrix 9 k9t4p23_step_5_data.required a b) 4 j = k9t4p23_local_5 4 j := by decide + +private theorem k9t4p23_local_5_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_5 a b ∪ requiredMatrix 9 k9t4p23_step_5_data.required a b) 5 j = k9t4p23_local_5 5 j := by decide + +private theorem k9t4p23_local_5_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_5 a b ∪ requiredMatrix 9 k9t4p23_step_5_data.required a b) 6 j = k9t4p23_local_5 6 j := by decide + +private theorem k9t4p23_local_5_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_5 a b ∪ requiredMatrix 9 k9t4p23_step_5_data.required a b) 7 j = k9t4p23_local_5 7 j := by decide + +private theorem k9t4p23_local_5_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_5 a b ∪ requiredMatrix 9 k9t4p23_step_5_data.required a b) 8 j = k9t4p23_local_5 8 j := by decide + +private theorem k9t4p23_local_5_eq : (fun a b => k9t4p23_state_5 a b ∪ requiredMatrix 9 k9t4p23_step_5_data.required a b) = k9t4p23_local_5 := by + funext i j + fin_cases i + + · exact k9t4p23_local_5_eq_row_0 j + + · exact k9t4p23_local_5_eq_row_1 j + + · exact k9t4p23_local_5_eq_row_2 j + + · exact k9t4p23_local_5_eq_row_3 j + + · exact k9t4p23_local_5_eq_row_4 j + + · exact k9t4p23_local_5_eq_row_5 j + + · exact k9t4p23_local_5_eq_row_6 j + + · exact k9t4p23_local_5_eq_row_7 j + + · exact k9t4p23_local_5_eq_row_8 j + +private theorem k9t4p23_local_5_paths : ∀ p ∈ k9t4p23_step_5_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_5_data.i k9t4p23_step_5_data.j) 9 := by decide + +private theorem k9t4p23_local_5_bad : k9t4p23_step_5_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_5_data.i k9t4p23_step_5_data.j) k9t4p23_local_5 9 4 := by decide + +private theorem k9t4p23_step_5_check : k9t4p23_step_5.Check k9t4p23.graph k9t4p23_state_5 9 4 := by + change k9t4p23_step_5_data.Check k9t4p23.graph k9t4p23_state_5 9 4 + refine ⟨k9t4p23_local_5_paths, ?_⟩ + rw [k9t4p23_local_5_eq] + exact k9t4p23_local_5_bad + +private theorem k9t4p23_update_5 : k9t4p23_step_5.apply k9t4p23_state_5 = k9t4p23_state_6 := by + have h : ∀ i j : Fin 9, k9t4p23_step_5.apply k9t4p23_state_5 i j = k9t4p23_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_7 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_6 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 1 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {1, 2}, Finset.Icc 1 7, {1}], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {1, 2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, {1}, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_6_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_6 a b ∪ requiredMatrix 9 k9t4p23_step_6_data.required a b) 0 j = k9t4p23_local_6 0 j := by decide + +private theorem k9t4p23_local_6_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_6 a b ∪ requiredMatrix 9 k9t4p23_step_6_data.required a b) 1 j = k9t4p23_local_6 1 j := by decide + +private theorem k9t4p23_local_6_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_6 a b ∪ requiredMatrix 9 k9t4p23_step_6_data.required a b) 2 j = k9t4p23_local_6 2 j := by decide + +private theorem k9t4p23_local_6_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_6 a b ∪ requiredMatrix 9 k9t4p23_step_6_data.required a b) 3 j = k9t4p23_local_6 3 j := by decide + +private theorem k9t4p23_local_6_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_6 a b ∪ requiredMatrix 9 k9t4p23_step_6_data.required a b) 4 j = k9t4p23_local_6 4 j := by decide + +private theorem k9t4p23_local_6_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_6 a b ∪ requiredMatrix 9 k9t4p23_step_6_data.required a b) 5 j = k9t4p23_local_6 5 j := by decide + +private theorem k9t4p23_local_6_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_6 a b ∪ requiredMatrix 9 k9t4p23_step_6_data.required a b) 6 j = k9t4p23_local_6 6 j := by decide + +private theorem k9t4p23_local_6_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_6 a b ∪ requiredMatrix 9 k9t4p23_step_6_data.required a b) 7 j = k9t4p23_local_6 7 j := by decide + +private theorem k9t4p23_local_6_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_6 a b ∪ requiredMatrix 9 k9t4p23_step_6_data.required a b) 8 j = k9t4p23_local_6 8 j := by decide + +private theorem k9t4p23_local_6_eq : (fun a b => k9t4p23_state_6 a b ∪ requiredMatrix 9 k9t4p23_step_6_data.required a b) = k9t4p23_local_6 := by + funext i j + fin_cases i + + · exact k9t4p23_local_6_eq_row_0 j + + · exact k9t4p23_local_6_eq_row_1 j + + · exact k9t4p23_local_6_eq_row_2 j + + · exact k9t4p23_local_6_eq_row_3 j + + · exact k9t4p23_local_6_eq_row_4 j + + · exact k9t4p23_local_6_eq_row_5 j + + · exact k9t4p23_local_6_eq_row_6 j + + · exact k9t4p23_local_6_eq_row_7 j + + · exact k9t4p23_local_6_eq_row_8 j + +private theorem k9t4p23_local_6_paths : ∀ p ∈ k9t4p23_step_6_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_6_data.i k9t4p23_step_6_data.j) 9 := by decide + +private theorem k9t4p23_local_6_bad : k9t4p23_step_6_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_6_data.i k9t4p23_step_6_data.j) k9t4p23_local_6 9 4 := by decide + +private theorem k9t4p23_step_6_check : k9t4p23_step_6.Check k9t4p23.graph k9t4p23_state_6 9 4 := by + change k9t4p23_step_6_data.Check k9t4p23.graph k9t4p23_state_6 9 4 + refine ⟨k9t4p23_local_6_paths, ?_⟩ + rw [k9t4p23_local_6_eq] + exact k9t4p23_local_6_bad + +private theorem k9t4p23_update_6 : k9t4p23_step_6.apply k9t4p23_state_6 = k9t4p23_state_7 := by + have h : ∀ i j : Fin 9, k9t4p23_step_6.apply k9t4p23_state_6 i j = k9t4p23_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_8 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {0, 2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[{0, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_7 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 1 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[{2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, {1, 2}, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_7_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_7 a b ∪ requiredMatrix 9 k9t4p23_step_7_data.required a b) 0 j = k9t4p23_local_7 0 j := by decide + +private theorem k9t4p23_local_7_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_7 a b ∪ requiredMatrix 9 k9t4p23_step_7_data.required a b) 1 j = k9t4p23_local_7 1 j := by decide + +private theorem k9t4p23_local_7_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_7 a b ∪ requiredMatrix 9 k9t4p23_step_7_data.required a b) 2 j = k9t4p23_local_7 2 j := by decide + +private theorem k9t4p23_local_7_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_7 a b ∪ requiredMatrix 9 k9t4p23_step_7_data.required a b) 3 j = k9t4p23_local_7 3 j := by decide + +private theorem k9t4p23_local_7_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_7 a b ∪ requiredMatrix 9 k9t4p23_step_7_data.required a b) 4 j = k9t4p23_local_7 4 j := by decide + +private theorem k9t4p23_local_7_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_7 a b ∪ requiredMatrix 9 k9t4p23_step_7_data.required a b) 5 j = k9t4p23_local_7 5 j := by decide + +private theorem k9t4p23_local_7_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_7 a b ∪ requiredMatrix 9 k9t4p23_step_7_data.required a b) 6 j = k9t4p23_local_7 6 j := by decide + +private theorem k9t4p23_local_7_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_7 a b ∪ requiredMatrix 9 k9t4p23_step_7_data.required a b) 7 j = k9t4p23_local_7 7 j := by decide + +private theorem k9t4p23_local_7_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_7 a b ∪ requiredMatrix 9 k9t4p23_step_7_data.required a b) 8 j = k9t4p23_local_7 8 j := by decide + +private theorem k9t4p23_local_7_eq : (fun a b => k9t4p23_state_7 a b ∪ requiredMatrix 9 k9t4p23_step_7_data.required a b) = k9t4p23_local_7 := by + funext i j + fin_cases i + + · exact k9t4p23_local_7_eq_row_0 j + + · exact k9t4p23_local_7_eq_row_1 j + + · exact k9t4p23_local_7_eq_row_2 j + + · exact k9t4p23_local_7_eq_row_3 j + + · exact k9t4p23_local_7_eq_row_4 j + + · exact k9t4p23_local_7_eq_row_5 j + + · exact k9t4p23_local_7_eq_row_6 j + + · exact k9t4p23_local_7_eq_row_7 j + + · exact k9t4p23_local_7_eq_row_8 j + +private theorem k9t4p23_local_7_paths : ∀ p ∈ k9t4p23_step_7_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_7_data.i k9t4p23_step_7_data.j) 9 := by decide + +private theorem k9t4p23_local_7_bad : k9t4p23_step_7_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_7_data.i k9t4p23_step_7_data.j) k9t4p23_local_7 9 4 := by decide + +private theorem k9t4p23_step_7_check : k9t4p23_step_7.Check k9t4p23.graph k9t4p23_state_7 9 4 := by + change k9t4p23_step_7_data.Check k9t4p23.graph k9t4p23_state_7 9 4 + refine ⟨k9t4p23_local_7_paths, ?_⟩ + rw [k9t4p23_local_7_eq] + exact k9t4p23_local_7_bad + +private theorem k9t4p23_update_7 : k9t4p23_step_7.apply k9t4p23_state_7 = k9t4p23_state_8 := by + have h : ∀ i j : Fin 9, k9t4p23_step_7.apply k9t4p23_state_7 i j = k9t4p23_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_9 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 3, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_8 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1}, {0, 1}, Finset.Icc 1 5, {1}, {0, 1}, Finset.Icc 0 4, {1}, Finset.Icc 0 4, {0, 1}], + #[{1}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {0, 2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{0, 1}, {1, 3, 4, 5, 6}, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 0 6, {1, 2, 3}], + #[Finset.Icc 1 5, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 1 6], + #[{1}, {3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 0 5, {1, 3, 4, 5, 6, 7, 8}], + #[{0, 1}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, {0, 1, 3, 4, 5, 6, 7}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 0 6, {0, 1}], + #[{1}, {0, 2, 3}, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 0 4, Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{0, 1}, {1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, {0, 1}, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_8_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, {1, 2}, ∅, ∅, {0, 2, 3}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {2}, ∅, ∅, {0}, ∅, ∅, ∅], + #[{1, 2}, ∅, {2}, ∅, {2}, ∅, {0}, ∅, {0}, ∅], + #[∅, ∅, ∅, {2}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 2, 3}, ∅, {0}, {0}, ∅, ∅, ∅, ∅, {1}, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {0}, ∅, ∅, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_8_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_0) 0 j = k9t4p23_local_8_required_0 0 j := by decide + +private theorem k9t4p23_local_8_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_0) 1 j = k9t4p23_local_8_required_0 1 j := by decide + +private theorem k9t4p23_local_8_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_0) 2 j = k9t4p23_local_8_required_0 2 j := by decide + +private theorem k9t4p23_local_8_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_0) 3 j = k9t4p23_local_8_required_0 3 j := by decide + +private theorem k9t4p23_local_8_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_0) 4 j = k9t4p23_local_8_required_0 4 j := by decide + +private theorem k9t4p23_local_8_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_0) 5 j = k9t4p23_local_8_required_0 5 j := by decide + +private theorem k9t4p23_local_8_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_0) 6 j = k9t4p23_local_8_required_0 6 j := by decide + +private theorem k9t4p23_local_8_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_0) 7 j = k9t4p23_local_8_required_0 7 j := by decide + +private theorem k9t4p23_local_8_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_0) 8 j = k9t4p23_local_8_required_0 8 j := by decide + +private theorem k9t4p23_local_8_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_0) 9 j = k9t4p23_local_8_required_0 9 j := by decide + +private theorem k9t4p23_local_8_required_0_eq : (requiredMatrix 9 k9t4p23_step_8_required_block_0) = k9t4p23_local_8_required_0 := by + funext i j + fin_cases i + + · exact k9t4p23_local_8_required_0_eq_row_0 j + + · exact k9t4p23_local_8_required_0_eq_row_1 j + + · exact k9t4p23_local_8_required_0_eq_row_2 j + + · exact k9t4p23_local_8_required_0_eq_row_3 j + + · exact k9t4p23_local_8_required_0_eq_row_4 j + + · exact k9t4p23_local_8_required_0_eq_row_5 j + + · exact k9t4p23_local_8_required_0_eq_row_6 j + + · exact k9t4p23_local_8_required_0_eq_row_7 j + + · exact k9t4p23_local_8_required_0_eq_row_8 j + + · exact k9t4p23_local_8_required_0_eq_row_9 j + +private theorem k9t4p23_local_8_path_0_0 : (⟨3, 0, [2, 1, 4, 9, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_0_1 : (⟨3, 0, [2, 1, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_0_2 : (⟨3, 4, [2, 1, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_0_3 : (⟨3, 8, [2, 1, 0, 7, 6, 5, 4, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_0_4 : (⟨3, 6, [2, 1, 0, 7, 8, 9, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_0_5 : (⟨3, 2, [4, 9, 8, 7, 0, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_0_6 : (⟨6, 0, [5, 1, 2, 3, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_0_7 : (⟨6, 0, [5, 1, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_0_8 : (⟨6, 0, [5, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_0_9 : (⟨6, 2, [5, 1, 0, 7, 8, 9, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_0_10 : (⟨6, 8, [5, 4, 3, 2, 1, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_0_11 : (⟨6, 9, [5, 4, 3, 2, 1, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_paths_block_0 : ∀ p ∈ k9t4p23_step_8_required_block_0, p.Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by + simp only [k9t4p23_step_8_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p23_local_8_path_0_0, k9t4p23_local_8_path_0_1, k9t4p23_local_8_path_0_2, k9t4p23_local_8_path_0_3, k9t4p23_local_8_path_0_4, k9t4p23_local_8_path_0_5, k9t4p23_local_8_path_0_6, k9t4p23_local_8_path_0_7, k9t4p23_local_8_path_0_8, k9t4p23_local_8_path_0_9, k9t4p23_local_8_path_0_10, k9t4p23_local_8_path_0_11⟩ + +private def k9t4p23_local_8_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, {1, 4}, ∅, Finset.Icc 0 3, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[{1, 4}, ∅, ∅, {0}, {0}, ∅, ∅, ∅, {0}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, ∅, {0}, ∅, ∅, {1}, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_8_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_1) 0 j = k9t4p23_local_8_required_1 0 j := by decide + +private theorem k9t4p23_local_8_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_1) 1 j = k9t4p23_local_8_required_1 1 j := by decide + +private theorem k9t4p23_local_8_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_1) 2 j = k9t4p23_local_8_required_1 2 j := by decide + +private theorem k9t4p23_local_8_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_1) 3 j = k9t4p23_local_8_required_1 3 j := by decide + +private theorem k9t4p23_local_8_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_1) 4 j = k9t4p23_local_8_required_1 4 j := by decide + +private theorem k9t4p23_local_8_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_1) 5 j = k9t4p23_local_8_required_1 5 j := by decide + +private theorem k9t4p23_local_8_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_1) 6 j = k9t4p23_local_8_required_1 6 j := by decide + +private theorem k9t4p23_local_8_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_1) 7 j = k9t4p23_local_8_required_1 7 j := by decide + +private theorem k9t4p23_local_8_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_1) 8 j = k9t4p23_local_8_required_1 8 j := by decide + +private theorem k9t4p23_local_8_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_1) 9 j = k9t4p23_local_8_required_1 9 j := by decide + +private theorem k9t4p23_local_8_required_1_eq : (requiredMatrix 9 k9t4p23_step_8_required_block_1) = k9t4p23_local_8_required_1 := by + funext i j + fin_cases i + + · exact k9t4p23_local_8_required_1_eq_row_0 j + + · exact k9t4p23_local_8_required_1_eq_row_1 j + + · exact k9t4p23_local_8_required_1_eq_row_2 j + + · exact k9t4p23_local_8_required_1_eq_row_3 j + + · exact k9t4p23_local_8_required_1_eq_row_4 j + + · exact k9t4p23_local_8_required_1_eq_row_5 j + + · exact k9t4p23_local_8_required_1_eq_row_6 j + + · exact k9t4p23_local_8_required_1_eq_row_7 j + + · exact k9t4p23_local_8_required_1_eq_row_8 j + + · exact k9t4p23_local_8_required_1_eq_row_9 j + +private theorem k9t4p23_local_8_path_1_0 : (⟨6, 3, [5, 4, 9, 8, 7, 0, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_1_1 : (⟨6, 0, [5, 9, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_1_2 : (⟨6, 8, [5, 9, 4, 3, 2, 1, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_1_3 : (⟨6, 4, [5, 9, 8, 7, 0, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_1_4 : (⟨6, 0, [7, 8, 9, 4, 3, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_1_5 : (⟨6, 9, [7, 0, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_1_6 : (⟨8, 0, [7, 6, 5, 4, 3, 2, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_1_7 : (⟨8, 5, [7, 0, 1, 2, 3, 4, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_1_8 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_1_9 : (⟨8, 0, [9, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_1_10 : (⟨8, 0, [9, 1, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_1_11 : (⟨8, 2, [9, 1, 0, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_paths_block_1 : ∀ p ∈ k9t4p23_step_8_required_block_1, p.Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by + simp only [k9t4p23_step_8_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p23_local_8_path_1_0, k9t4p23_local_8_path_1_1, k9t4p23_local_8_path_1_2, k9t4p23_local_8_path_1_3, k9t4p23_local_8_path_1_4, k9t4p23_local_8_path_1_5, k9t4p23_local_8_path_1_6, k9t4p23_local_8_path_1_7, k9t4p23_local_8_path_1_8, k9t4p23_local_8_path_1_9, k9t4p23_local_8_path_1_10, k9t4p23_local_8_path_1_11⟩ + +private def k9t4p23_local_8_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, {1}, {0, 1, 4}, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 4}, ∅, ∅, {0}, {0}, {0}, {0, 1}, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_8_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_2) 0 j = k9t4p23_local_8_required_2 0 j := by decide + +private theorem k9t4p23_local_8_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_2) 1 j = k9t4p23_local_8_required_2 1 j := by decide + +private theorem k9t4p23_local_8_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_2) 2 j = k9t4p23_local_8_required_2 2 j := by decide + +private theorem k9t4p23_local_8_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_2) 3 j = k9t4p23_local_8_required_2 3 j := by decide + +private theorem k9t4p23_local_8_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_2) 4 j = k9t4p23_local_8_required_2 4 j := by decide + +private theorem k9t4p23_local_8_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_2) 5 j = k9t4p23_local_8_required_2 5 j := by decide + +private theorem k9t4p23_local_8_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_2) 6 j = k9t4p23_local_8_required_2 6 j := by decide + +private theorem k9t4p23_local_8_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_2) 7 j = k9t4p23_local_8_required_2 7 j := by decide + +private theorem k9t4p23_local_8_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_2) 8 j = k9t4p23_local_8_required_2 8 j := by decide + +private theorem k9t4p23_local_8_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_2) 9 j = k9t4p23_local_8_required_2 9 j := by decide + +private theorem k9t4p23_local_8_required_2_eq : (requiredMatrix 9 k9t4p23_step_8_required_block_2) = k9t4p23_local_8_required_2 := by + funext i j + fin_cases i + + · exact k9t4p23_local_8_required_2_eq_row_0 j + + · exact k9t4p23_local_8_required_2_eq_row_1 j + + · exact k9t4p23_local_8_required_2_eq_row_2 j + + · exact k9t4p23_local_8_required_2_eq_row_3 j + + · exact k9t4p23_local_8_required_2_eq_row_4 j + + · exact k9t4p23_local_8_required_2_eq_row_5 j + + · exact k9t4p23_local_8_required_2_eq_row_6 j + + · exact k9t4p23_local_8_required_2_eq_row_7 j + + · exact k9t4p23_local_8_required_2_eq_row_8 j + + · exact k9t4p23_local_8_required_2_eq_row_9 j + +private theorem k9t4p23_local_8_path_2_0 : (⟨8, 6, [9, 4, 3, 2, 1, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_2_1 : (⟨8, 5, [9, 4, 3, 2, 1, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_2_2 : (⟨8, 0, [9, 4, 5, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_2_3 : (⟨8, 3, [9, 4, 5, 6, 7, 0, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_2_4 : (⟨8, 6, [9, 5, 4, 3, 2, 1, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_2_5 : (⟨8, 4, [9, 5, 6, 7, 0, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_2_6 : (⟨0, 8, [1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_2_7 : (⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_2_8 : (⟨0, 6, [1, 2, 3, 4, 5, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_2_9 : (⟨0, 7, [1, 2, 3, 4, 9, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_2_10 : (⟨0, 8, [1, 2, 3, 4, 9, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_2_11 : (⟨0, 6, [1, 2, 3, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_paths_block_2 : ∀ p ∈ k9t4p23_step_8_required_block_2, p.Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by + simp only [k9t4p23_step_8_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p23_local_8_path_2_0, k9t4p23_local_8_path_2_1, k9t4p23_local_8_path_2_2, k9t4p23_local_8_path_2_3, k9t4p23_local_8_path_2_4, k9t4p23_local_8_path_2_5, k9t4p23_local_8_path_2_6, k9t4p23_local_8_path_2_7, k9t4p23_local_8_path_2_8, k9t4p23_local_8_path_2_9, k9t4p23_local_8_path_2_10, k9t4p23_local_8_path_2_11⟩ + +private def k9t4p23_local_8_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1}, {0, 1}, Finset.Icc 1 5, {1}, {0, 1}, ∅, ∅, ∅, {1}], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_8_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_3) 0 j = k9t4p23_local_8_required_3 0 j := by decide + +private theorem k9t4p23_local_8_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_3) 1 j = k9t4p23_local_8_required_3 1 j := by decide + +private theorem k9t4p23_local_8_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_3) 2 j = k9t4p23_local_8_required_3 2 j := by decide + +private theorem k9t4p23_local_8_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_3) 3 j = k9t4p23_local_8_required_3 3 j := by decide + +private theorem k9t4p23_local_8_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_3) 4 j = k9t4p23_local_8_required_3 4 j := by decide + +private theorem k9t4p23_local_8_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_3) 5 j = k9t4p23_local_8_required_3 5 j := by decide + +private theorem k9t4p23_local_8_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_3) 6 j = k9t4p23_local_8_required_3 6 j := by decide + +private theorem k9t4p23_local_8_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_3) 7 j = k9t4p23_local_8_required_3 7 j := by decide + +private theorem k9t4p23_local_8_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_3) 8 j = k9t4p23_local_8_required_3 8 j := by decide + +private theorem k9t4p23_local_8_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_8_required_block_3) 9 j = k9t4p23_local_8_required_3 9 j := by decide + +private theorem k9t4p23_local_8_required_3_eq : (requiredMatrix 9 k9t4p23_step_8_required_block_3) = k9t4p23_local_8_required_3 := by + funext i j + fin_cases i + + · exact k9t4p23_local_8_required_3_eq_row_0 j + + · exact k9t4p23_local_8_required_3_eq_row_1 j + + · exact k9t4p23_local_8_required_3_eq_row_2 j + + · exact k9t4p23_local_8_required_3_eq_row_3 j + + · exact k9t4p23_local_8_required_3_eq_row_4 j + + · exact k9t4p23_local_8_required_3_eq_row_5 j + + · exact k9t4p23_local_8_required_3_eq_row_6 j + + · exact k9t4p23_local_8_required_3_eq_row_7 j + + · exact k9t4p23_local_8_required_3_eq_row_8 j + + · exact k9t4p23_local_8_required_3_eq_row_9 j + +private theorem k9t4p23_local_8_path_3_0 : (⟨0, 5, [1, 2, 3, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_3_1 : (⟨0, 3, [1, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_3_2 : (⟨0, 3, [1, 5, 6, 7, 8, 9, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_3_3 : (⟨0, 2, [1, 5, 6, 7, 8, 9, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_3_4 : (⟨0, 3, [1, 5, 9, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_3_5 : (⟨0, 3, [7, 6, 5, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_3_6 : (⟨0, 9, [7, 6, 5, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_3_7 : (⟨0, 3, [7, 6, 5, 1, 9, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_3_8 : (⟨0, 2, [7, 6, 5, 1, 9, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_3_9 : (⟨0, 4, [7, 6, 5, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_3_10 : (⟨0, 1, [7, 6, 5, 9, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_path_3_11 : (⟨0, 5, [7, 8, 9, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by decide + +private theorem k9t4p23_local_8_paths_block_3 : ∀ p ∈ k9t4p23_step_8_required_block_3, p.Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by + simp only [k9t4p23_step_8_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p23_local_8_path_3_0, k9t4p23_local_8_path_3_1, k9t4p23_local_8_path_3_2, k9t4p23_local_8_path_3_3, k9t4p23_local_8_path_3_4, k9t4p23_local_8_path_3_5, k9t4p23_local_8_path_3_6, k9t4p23_local_8_path_3_7, k9t4p23_local_8_path_3_8, k9t4p23_local_8_path_3_9, k9t4p23_local_8_path_3_10, k9t4p23_local_8_path_3_11⟩ + +private theorem k9t4p23_local_8_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_8 a b ∪ ((((k9t4p23_local_8_required_0 a b ∪ k9t4p23_local_8_required_1 a b) ∪ k9t4p23_local_8_required_2 a b) ∪ k9t4p23_local_8_required_3 a b))) 0 j = k9t4p23_local_8 0 j := by decide + +private theorem k9t4p23_local_8_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_8 a b ∪ ((((k9t4p23_local_8_required_0 a b ∪ k9t4p23_local_8_required_1 a b) ∪ k9t4p23_local_8_required_2 a b) ∪ k9t4p23_local_8_required_3 a b))) 1 j = k9t4p23_local_8 1 j := by decide + +private theorem k9t4p23_local_8_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_8 a b ∪ ((((k9t4p23_local_8_required_0 a b ∪ k9t4p23_local_8_required_1 a b) ∪ k9t4p23_local_8_required_2 a b) ∪ k9t4p23_local_8_required_3 a b))) 2 j = k9t4p23_local_8 2 j := by decide + +private theorem k9t4p23_local_8_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_8 a b ∪ ((((k9t4p23_local_8_required_0 a b ∪ k9t4p23_local_8_required_1 a b) ∪ k9t4p23_local_8_required_2 a b) ∪ k9t4p23_local_8_required_3 a b))) 3 j = k9t4p23_local_8 3 j := by decide + +private theorem k9t4p23_local_8_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_8 a b ∪ ((((k9t4p23_local_8_required_0 a b ∪ k9t4p23_local_8_required_1 a b) ∪ k9t4p23_local_8_required_2 a b) ∪ k9t4p23_local_8_required_3 a b))) 4 j = k9t4p23_local_8 4 j := by decide + +private theorem k9t4p23_local_8_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_8 a b ∪ ((((k9t4p23_local_8_required_0 a b ∪ k9t4p23_local_8_required_1 a b) ∪ k9t4p23_local_8_required_2 a b) ∪ k9t4p23_local_8_required_3 a b))) 5 j = k9t4p23_local_8 5 j := by decide + +private theorem k9t4p23_local_8_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_8 a b ∪ ((((k9t4p23_local_8_required_0 a b ∪ k9t4p23_local_8_required_1 a b) ∪ k9t4p23_local_8_required_2 a b) ∪ k9t4p23_local_8_required_3 a b))) 6 j = k9t4p23_local_8 6 j := by decide + +private theorem k9t4p23_local_8_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_8 a b ∪ ((((k9t4p23_local_8_required_0 a b ∪ k9t4p23_local_8_required_1 a b) ∪ k9t4p23_local_8_required_2 a b) ∪ k9t4p23_local_8_required_3 a b))) 7 j = k9t4p23_local_8 7 j := by decide + +private theorem k9t4p23_local_8_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_8 a b ∪ ((((k9t4p23_local_8_required_0 a b ∪ k9t4p23_local_8_required_1 a b) ∪ k9t4p23_local_8_required_2 a b) ∪ k9t4p23_local_8_required_3 a b))) 8 j = k9t4p23_local_8 8 j := by decide + +private theorem k9t4p23_local_8_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_8 a b ∪ ((((k9t4p23_local_8_required_0 a b ∪ k9t4p23_local_8_required_1 a b) ∪ k9t4p23_local_8_required_2 a b) ∪ k9t4p23_local_8_required_3 a b))) 9 j = k9t4p23_local_8 9 j := by decide + +private theorem k9t4p23_local_8_merged_eq : (fun a b => freshMatrix k9t4p23_state_8 a b ∪ ((((k9t4p23_local_8_required_0 a b ∪ k9t4p23_local_8_required_1 a b) ∪ k9t4p23_local_8_required_2 a b) ∪ k9t4p23_local_8_required_3 a b))) = k9t4p23_local_8 := by + funext i j + fin_cases i + + · exact k9t4p23_local_8_merged_eq_row_0 j + + · exact k9t4p23_local_8_merged_eq_row_1 j + + · exact k9t4p23_local_8_merged_eq_row_2 j + + · exact k9t4p23_local_8_merged_eq_row_3 j + + · exact k9t4p23_local_8_merged_eq_row_4 j + + · exact k9t4p23_local_8_merged_eq_row_5 j + + · exact k9t4p23_local_8_merged_eq_row_6 j + + · exact k9t4p23_local_8_merged_eq_row_7 j + + · exact k9t4p23_local_8_merged_eq_row_8 j + + · exact k9t4p23_local_8_merged_eq_row_9 j + +private theorem k9t4p23_local_8_eq : (fun a b => freshMatrix k9t4p23_state_8 a b ∪ requiredMatrix 9 k9t4p23_step_8_data.required a b) = k9t4p23_local_8 := by + funext a b + change freshMatrix k9t4p23_state_8 a b ∪ requiredMatrix 9 (k9t4p23_step_8_required_block_0 ++ k9t4p23_step_8_required_block_1 ++ k9t4p23_step_8_required_block_2 ++ k9t4p23_step_8_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p23_local_8_required_0_eq, k9t4p23_local_8_required_1_eq, k9t4p23_local_8_required_2_eq, k9t4p23_local_8_required_3_eq] + exact congrFun (congrFun k9t4p23_local_8_merged_eq a) b + +private theorem k9t4p23_local_8_paths : ∀ p ∈ k9t4p23_step_8_data.required, p.Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 := by + change ∀ p ∈ (k9t4p23_step_8_required_block_0 ++ k9t4p23_step_8_required_block_1 ++ k9t4p23_step_8_required_block_2 ++ k9t4p23_step_8_required_block_3), p.Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p23_local_8_paths_block_0, k9t4p23_local_8_paths_block_1⟩, k9t4p23_local_8_paths_block_2⟩, k9t4p23_local_8_paths_block_3⟩ + +private theorem k9t4p23_local_8_bad : k9t4p23_step_8_data.bad.Check (freshGraph k9t4p23.graph k9t4p23_step_8_data.i k9t4p23_step_8_data.j) k9t4p23_local_8 9 4 := by decide + +private theorem k9t4p23_step_8_check : k9t4p23_step_8.Check k9t4p23.graph k9t4p23_state_8 9 4 := by + change k9t4p23_step_8_data.Check k9t4p23.graph k9t4p23_state_8 9 4 + refine ⟨by decide, k9t4p23_local_8_paths, ?_⟩ + rw [k9t4p23_local_8_eq] + exact k9t4p23_local_8_bad + +private theorem k9t4p23_update_8 : k9t4p23_step_8.apply k9t4p23_state_8 = k9t4p23_state_9 := by + have h : ∀ i j : Fin 9, k9t4p23_step_8.apply k9t4p23_state_8 i j = k9t4p23_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_10 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_9 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 1 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 0 3, Finset.Icc 1 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, {1, 2}, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_9_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_9 a b ∪ requiredMatrix 9 k9t4p23_step_9_data.required a b) 0 j = k9t4p23_local_9 0 j := by decide + +private theorem k9t4p23_local_9_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_9 a b ∪ requiredMatrix 9 k9t4p23_step_9_data.required a b) 1 j = k9t4p23_local_9 1 j := by decide + +private theorem k9t4p23_local_9_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_9 a b ∪ requiredMatrix 9 k9t4p23_step_9_data.required a b) 2 j = k9t4p23_local_9 2 j := by decide + +private theorem k9t4p23_local_9_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_9 a b ∪ requiredMatrix 9 k9t4p23_step_9_data.required a b) 3 j = k9t4p23_local_9 3 j := by decide + +private theorem k9t4p23_local_9_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_9 a b ∪ requiredMatrix 9 k9t4p23_step_9_data.required a b) 4 j = k9t4p23_local_9 4 j := by decide + +private theorem k9t4p23_local_9_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_9 a b ∪ requiredMatrix 9 k9t4p23_step_9_data.required a b) 5 j = k9t4p23_local_9 5 j := by decide + +private theorem k9t4p23_local_9_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_9 a b ∪ requiredMatrix 9 k9t4p23_step_9_data.required a b) 6 j = k9t4p23_local_9 6 j := by decide + +private theorem k9t4p23_local_9_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_9 a b ∪ requiredMatrix 9 k9t4p23_step_9_data.required a b) 7 j = k9t4p23_local_9 7 j := by decide + +private theorem k9t4p23_local_9_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_9 a b ∪ requiredMatrix 9 k9t4p23_step_9_data.required a b) 8 j = k9t4p23_local_9 8 j := by decide + +private theorem k9t4p23_local_9_eq : (fun a b => k9t4p23_state_9 a b ∪ requiredMatrix 9 k9t4p23_step_9_data.required a b) = k9t4p23_local_9 := by + funext i j + fin_cases i + + · exact k9t4p23_local_9_eq_row_0 j + + · exact k9t4p23_local_9_eq_row_1 j + + · exact k9t4p23_local_9_eq_row_2 j + + · exact k9t4p23_local_9_eq_row_3 j + + · exact k9t4p23_local_9_eq_row_4 j + + · exact k9t4p23_local_9_eq_row_5 j + + · exact k9t4p23_local_9_eq_row_6 j + + · exact k9t4p23_local_9_eq_row_7 j + + · exact k9t4p23_local_9_eq_row_8 j + +private theorem k9t4p23_local_9_paths : ∀ p ∈ k9t4p23_step_9_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_9_data.i k9t4p23_step_9_data.j) 9 := by decide + +private theorem k9t4p23_local_9_bad : k9t4p23_step_9_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_9_data.i k9t4p23_step_9_data.j) k9t4p23_local_9 9 4 := by decide + +private theorem k9t4p23_step_9_check : k9t4p23_step_9.Check k9t4p23.graph k9t4p23_state_9 9 4 := by + change k9t4p23_step_9_data.Check k9t4p23.graph k9t4p23_state_9 9 4 + refine ⟨k9t4p23_local_9_paths, ?_⟩ + rw [k9t4p23_local_9_eq] + exact k9t4p23_local_9_bad + +private theorem k9t4p23_update_9 : k9t4p23_step_9.apply k9t4p23_state_9 = k9t4p23_state_10 := by + have h : ∀ i j : Fin 9, k9t4p23_step_9.apply k9t4p23_state_9 i j = k9t4p23_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_11 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_10 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 1 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 1 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, {1, 2}, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_10_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_10 a b ∪ requiredMatrix 9 k9t4p23_step_10_data.required a b) 0 j = k9t4p23_local_10 0 j := by decide + +private theorem k9t4p23_local_10_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_10 a b ∪ requiredMatrix 9 k9t4p23_step_10_data.required a b) 1 j = k9t4p23_local_10 1 j := by decide + +private theorem k9t4p23_local_10_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_10 a b ∪ requiredMatrix 9 k9t4p23_step_10_data.required a b) 2 j = k9t4p23_local_10 2 j := by decide + +private theorem k9t4p23_local_10_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_10 a b ∪ requiredMatrix 9 k9t4p23_step_10_data.required a b) 3 j = k9t4p23_local_10 3 j := by decide + +private theorem k9t4p23_local_10_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_10 a b ∪ requiredMatrix 9 k9t4p23_step_10_data.required a b) 4 j = k9t4p23_local_10 4 j := by decide + +private theorem k9t4p23_local_10_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_10 a b ∪ requiredMatrix 9 k9t4p23_step_10_data.required a b) 5 j = k9t4p23_local_10 5 j := by decide + +private theorem k9t4p23_local_10_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_10 a b ∪ requiredMatrix 9 k9t4p23_step_10_data.required a b) 6 j = k9t4p23_local_10 6 j := by decide + +private theorem k9t4p23_local_10_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_10 a b ∪ requiredMatrix 9 k9t4p23_step_10_data.required a b) 7 j = k9t4p23_local_10 7 j := by decide + +private theorem k9t4p23_local_10_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_10 a b ∪ requiredMatrix 9 k9t4p23_step_10_data.required a b) 8 j = k9t4p23_local_10 8 j := by decide + +private theorem k9t4p23_local_10_eq : (fun a b => k9t4p23_state_10 a b ∪ requiredMatrix 9 k9t4p23_step_10_data.required a b) = k9t4p23_local_10 := by + funext i j + fin_cases i + + · exact k9t4p23_local_10_eq_row_0 j + + · exact k9t4p23_local_10_eq_row_1 j + + · exact k9t4p23_local_10_eq_row_2 j + + · exact k9t4p23_local_10_eq_row_3 j + + · exact k9t4p23_local_10_eq_row_4 j + + · exact k9t4p23_local_10_eq_row_5 j + + · exact k9t4p23_local_10_eq_row_6 j + + · exact k9t4p23_local_10_eq_row_7 j + + · exact k9t4p23_local_10_eq_row_8 j + +private theorem k9t4p23_local_10_paths : ∀ p ∈ k9t4p23_step_10_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_10_data.i k9t4p23_step_10_data.j) 9 := by decide + +private theorem k9t4p23_local_10_bad : k9t4p23_step_10_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_10_data.i k9t4p23_step_10_data.j) k9t4p23_local_10 9 4 := by decide + +private theorem k9t4p23_step_10_check : k9t4p23_step_10.Check k9t4p23.graph k9t4p23_state_10 9 4 := by + change k9t4p23_step_10_data.Check k9t4p23.graph k9t4p23_state_10 9 4 + refine ⟨k9t4p23_local_10_paths, ?_⟩ + rw [k9t4p23_local_10_eq] + exact k9t4p23_local_10_bad + +private theorem k9t4p23_update_10 : k9t4p23_step_10.apply k9t4p23_state_10 = k9t4p23_state_11 := by + have h : ∀ i j : Fin 9, k9t4p23_step_10.apply k9t4p23_state_10 i j = k9t4p23_state_11 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_12 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {0, 2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, {0, 2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_11 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 1 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, {2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, {1, 2}, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_11_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_11 a b ∪ requiredMatrix 9 k9t4p23_step_11_data.required a b) 0 j = k9t4p23_local_11 0 j := by decide + +private theorem k9t4p23_local_11_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_11 a b ∪ requiredMatrix 9 k9t4p23_step_11_data.required a b) 1 j = k9t4p23_local_11 1 j := by decide + +private theorem k9t4p23_local_11_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_11 a b ∪ requiredMatrix 9 k9t4p23_step_11_data.required a b) 2 j = k9t4p23_local_11 2 j := by decide + +private theorem k9t4p23_local_11_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_11 a b ∪ requiredMatrix 9 k9t4p23_step_11_data.required a b) 3 j = k9t4p23_local_11 3 j := by decide + +private theorem k9t4p23_local_11_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_11 a b ∪ requiredMatrix 9 k9t4p23_step_11_data.required a b) 4 j = k9t4p23_local_11 4 j := by decide + +private theorem k9t4p23_local_11_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_11 a b ∪ requiredMatrix 9 k9t4p23_step_11_data.required a b) 5 j = k9t4p23_local_11 5 j := by decide + +private theorem k9t4p23_local_11_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_11 a b ∪ requiredMatrix 9 k9t4p23_step_11_data.required a b) 6 j = k9t4p23_local_11 6 j := by decide + +private theorem k9t4p23_local_11_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_11 a b ∪ requiredMatrix 9 k9t4p23_step_11_data.required a b) 7 j = k9t4p23_local_11 7 j := by decide + +private theorem k9t4p23_local_11_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_11 a b ∪ requiredMatrix 9 k9t4p23_step_11_data.required a b) 8 j = k9t4p23_local_11 8 j := by decide + +private theorem k9t4p23_local_11_eq : (fun a b => k9t4p23_state_11 a b ∪ requiredMatrix 9 k9t4p23_step_11_data.required a b) = k9t4p23_local_11 := by + funext i j + fin_cases i + + · exact k9t4p23_local_11_eq_row_0 j + + · exact k9t4p23_local_11_eq_row_1 j + + · exact k9t4p23_local_11_eq_row_2 j + + · exact k9t4p23_local_11_eq_row_3 j + + · exact k9t4p23_local_11_eq_row_4 j + + · exact k9t4p23_local_11_eq_row_5 j + + · exact k9t4p23_local_11_eq_row_6 j + + · exact k9t4p23_local_11_eq_row_7 j + + · exact k9t4p23_local_11_eq_row_8 j + +private theorem k9t4p23_local_11_paths : ∀ p ∈ k9t4p23_step_11_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_11_data.i k9t4p23_step_11_data.j) 9 := by decide + +private theorem k9t4p23_local_11_bad : k9t4p23_step_11_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_11_data.i k9t4p23_step_11_data.j) k9t4p23_local_11 9 4 := by decide + +private theorem k9t4p23_step_11_check : k9t4p23_step_11.Check k9t4p23.graph k9t4p23_state_11 9 4 := by + change k9t4p23_step_11_data.Check k9t4p23.graph k9t4p23_state_11 9 4 + refine ⟨k9t4p23_local_11_paths, ?_⟩ + rw [k9t4p23_local_11_eq] + exact k9t4p23_local_11_bad + +private theorem k9t4p23_update_11 : k9t4p23_step_11.apply k9t4p23_state_11 = k9t4p23_state_12 := by + have h : ∀ i j : Fin 9, k9t4p23_step_11.apply k9t4p23_state_11 i j = k9t4p23_state_12 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_13 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 3, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_12 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1}, Finset.Icc 1 5, {0, 1}, {1}, {0, 1}, Finset.Icc 0 4, {1}, Finset.Icc 0 4, {0, 1}], + #[{1}, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 0 5, {1, 3, 4, 5, 6, 7, 8}], + #[Finset.Icc 1 5, Finset.Icc 1 6, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[{0, 1}, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 6], + #[{1}, {3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, {0, 2, 3}, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{0, 1}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, {0, 1, 3, 4, 5, 6, 7}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 0 6, {0, 1}], + #[{1}, Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, {0, 2, 3}, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 0 4, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 5, {0, 1, 3, 4, 5, 6, 7}, Finset.Icc 0 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{0, 1}, {1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, {0, 1}, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_12_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {1, 2}, ∅, ∅, ∅, {0, 2, 3, 4}, ∅, ∅, ∅], + #[∅, ∅, {2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, {2}, ∅, {2}, ∅, ∅, {0}, ∅, {0}, ∅], + #[∅, ∅, {2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 2, 3, 4}, ∅, {0}, ∅, ∅, ∅, ∅, ∅, {1}, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {0}, ∅, ∅, ∅, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_12_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_0) 0 j = k9t4p23_local_12_required_0 0 j := by decide + +private theorem k9t4p23_local_12_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_0) 1 j = k9t4p23_local_12_required_0 1 j := by decide + +private theorem k9t4p23_local_12_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_0) 2 j = k9t4p23_local_12_required_0 2 j := by decide + +private theorem k9t4p23_local_12_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_0) 3 j = k9t4p23_local_12_required_0 3 j := by decide + +private theorem k9t4p23_local_12_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_0) 4 j = k9t4p23_local_12_required_0 4 j := by decide + +private theorem k9t4p23_local_12_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_0) 5 j = k9t4p23_local_12_required_0 5 j := by decide + +private theorem k9t4p23_local_12_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_0) 6 j = k9t4p23_local_12_required_0 6 j := by decide + +private theorem k9t4p23_local_12_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_0) 7 j = k9t4p23_local_12_required_0 7 j := by decide + +private theorem k9t4p23_local_12_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_0) 8 j = k9t4p23_local_12_required_0 8 j := by decide + +private theorem k9t4p23_local_12_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_0) 9 j = k9t4p23_local_12_required_0 9 j := by decide + +private theorem k9t4p23_local_12_required_0_eq : (requiredMatrix 9 k9t4p23_step_12_required_block_0) = k9t4p23_local_12_required_0 := by + funext i j + fin_cases i + + · exact k9t4p23_local_12_required_0_eq_row_0 j + + · exact k9t4p23_local_12_required_0_eq_row_1 j + + · exact k9t4p23_local_12_required_0_eq_row_2 j + + · exact k9t4p23_local_12_required_0_eq_row_3 j + + · exact k9t4p23_local_12_required_0_eq_row_4 j + + · exact k9t4p23_local_12_required_0_eq_row_5 j + + · exact k9t4p23_local_12_required_0_eq_row_6 j + + · exact k9t4p23_local_12_required_0_eq_row_7 j + + · exact k9t4p23_local_12_required_0_eq_row_8 j + + · exact k9t4p23_local_12_required_0_eq_row_9 j + +private theorem k9t4p23_local_12_path_0_0 : (⟨2, 0, [1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_0_1 : (⟨2, 0, [1, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_0_2 : (⟨2, 3, [1, 9, 8, 7, 0, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_0_3 : (⟨2, 1, [3, 4, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_0_4 : (⟨2, 8, [3, 4, 0, 7, 6, 5, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_0_5 : (⟨2, 6, [3, 4, 0, 7, 8, 9, 1, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_0_6 : (⟨6, 0, [5, 1, 2, 3, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_0_7 : (⟨6, 8, [5, 1, 2, 3, 4, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_0_8 : (⟨6, 9, [5, 1, 2, 3, 4, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_0_9 : (⟨6, 0, [5, 1, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_0_10 : (⟨6, 0, [5, 1, 9, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_0_11 : (⟨6, 0, [5, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_paths_block_0 : ∀ p ∈ k9t4p23_step_12_required_block_0, p.Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by + simp only [k9t4p23_step_12_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p23_local_12_path_0_0, k9t4p23_local_12_path_0_1, k9t4p23_local_12_path_0_2, k9t4p23_local_12_path_0_3, k9t4p23_local_12_path_0_4, k9t4p23_local_12_path_0_5, k9t4p23_local_12_path_0_6, k9t4p23_local_12_path_0_7, k9t4p23_local_12_path_0_8, k9t4p23_local_12_path_0_9, k9t4p23_local_12_path_0_10, k9t4p23_local_12_path_0_11⟩ + +private def k9t4p23_local_12_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, {0, 1, 3}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[{1}, {0}, {0}, {0}, ∅, ∅, ∅, ∅, {0, 1}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 3}, ∅, ∅, ∅, ∅, {0, 1}, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_12_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_1) 0 j = k9t4p23_local_12_required_1 0 j := by decide + +private theorem k9t4p23_local_12_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_1) 1 j = k9t4p23_local_12_required_1 1 j := by decide + +private theorem k9t4p23_local_12_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_1) 2 j = k9t4p23_local_12_required_1 2 j := by decide + +private theorem k9t4p23_local_12_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_1) 3 j = k9t4p23_local_12_required_1 3 j := by decide + +private theorem k9t4p23_local_12_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_1) 4 j = k9t4p23_local_12_required_1 4 j := by decide + +private theorem k9t4p23_local_12_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_1) 5 j = k9t4p23_local_12_required_1 5 j := by decide + +private theorem k9t4p23_local_12_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_1) 6 j = k9t4p23_local_12_required_1 6 j := by decide + +private theorem k9t4p23_local_12_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_1) 7 j = k9t4p23_local_12_required_1 7 j := by decide + +private theorem k9t4p23_local_12_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_1) 8 j = k9t4p23_local_12_required_1 8 j := by decide + +private theorem k9t4p23_local_12_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_1) 9 j = k9t4p23_local_12_required_1 9 j := by decide + +private theorem k9t4p23_local_12_required_1_eq : (requiredMatrix 9 k9t4p23_step_12_required_block_1) = k9t4p23_local_12_required_1 := by + funext i j + fin_cases i + + · exact k9t4p23_local_12_required_1_eq_row_0 j + + · exact k9t4p23_local_12_required_1_eq_row_1 j + + · exact k9t4p23_local_12_required_1_eq_row_2 j + + · exact k9t4p23_local_12_required_1_eq_row_3 j + + · exact k9t4p23_local_12_required_1_eq_row_4 j + + · exact k9t4p23_local_12_required_1_eq_row_5 j + + · exact k9t4p23_local_12_required_1_eq_row_6 j + + · exact k9t4p23_local_12_required_1_eq_row_7 j + + · exact k9t4p23_local_12_required_1_eq_row_8 j + + · exact k9t4p23_local_12_required_1_eq_row_9 j + +private theorem k9t4p23_local_12_path_1_0 : (⟨6, 2, [5, 1, 9, 8, 7, 0, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_1_1 : (⟨6, 8, [5, 9, 1, 2, 3, 4, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_1_2 : (⟨6, 3, [5, 9, 8, 7, 0, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_1_3 : (⟨6, 1, [5, 9, 8, 7, 0, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_1_4 : (⟨6, 0, [7, 8, 9, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_1_5 : (⟨6, 9, [7, 0, 4, 3, 2, 1, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_1_6 : (⟨8, 0, [7, 6, 5, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_1_7 : (⟨8, 5, [7, 0, 4, 3, 2, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_1_8 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_1_9 : (⟨8, 0, [9, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_1_10 : (⟨8, 6, [9, 1, 2, 3, 4, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_1_11 : (⟨8, 5, [9, 1, 2, 3, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_paths_block_1 : ∀ p ∈ k9t4p23_step_12_required_block_1, p.Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by + simp only [k9t4p23_step_12_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p23_local_12_path_1_0, k9t4p23_local_12_path_1_1, k9t4p23_local_12_path_1_2, k9t4p23_local_12_path_1_3, k9t4p23_local_12_path_1_4, k9t4p23_local_12_path_1_5, k9t4p23_local_12_path_1_6, k9t4p23_local_12_path_1_7, k9t4p23_local_12_path_1_8, k9t4p23_local_12_path_1_9, k9t4p23_local_12_path_1_10, k9t4p23_local_12_path_1_11⟩ + +private def k9t4p23_local_12_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, {1}, {0, 1, 2, 4}, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2, 4}, {0}, {0}, {0}, ∅, ∅, {0}, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_12_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_2) 0 j = k9t4p23_local_12_required_2 0 j := by decide + +private theorem k9t4p23_local_12_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_2) 1 j = k9t4p23_local_12_required_2 1 j := by decide + +private theorem k9t4p23_local_12_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_2) 2 j = k9t4p23_local_12_required_2 2 j := by decide + +private theorem k9t4p23_local_12_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_2) 3 j = k9t4p23_local_12_required_2 3 j := by decide + +private theorem k9t4p23_local_12_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_2) 4 j = k9t4p23_local_12_required_2 4 j := by decide + +private theorem k9t4p23_local_12_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_2) 5 j = k9t4p23_local_12_required_2 5 j := by decide + +private theorem k9t4p23_local_12_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_2) 6 j = k9t4p23_local_12_required_2 6 j := by decide + +private theorem k9t4p23_local_12_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_2) 7 j = k9t4p23_local_12_required_2 7 j := by decide + +private theorem k9t4p23_local_12_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_2) 8 j = k9t4p23_local_12_required_2 8 j := by decide + +private theorem k9t4p23_local_12_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_2) 9 j = k9t4p23_local_12_required_2 9 j := by decide + +private theorem k9t4p23_local_12_required_2_eq : (requiredMatrix 9 k9t4p23_step_12_required_block_2) = k9t4p23_local_12_required_2 := by + funext i j + fin_cases i + + · exact k9t4p23_local_12_required_2_eq_row_0 j + + · exact k9t4p23_local_12_required_2_eq_row_1 j + + · exact k9t4p23_local_12_required_2_eq_row_2 j + + · exact k9t4p23_local_12_required_2_eq_row_3 j + + · exact k9t4p23_local_12_required_2_eq_row_4 j + + · exact k9t4p23_local_12_required_2_eq_row_5 j + + · exact k9t4p23_local_12_required_2_eq_row_6 j + + · exact k9t4p23_local_12_required_2_eq_row_7 j + + · exact k9t4p23_local_12_required_2_eq_row_8 j + + · exact k9t4p23_local_12_required_2_eq_row_9 j + +private theorem k9t4p23_local_12_path_2_0 : (⟨8, 0, [9, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_2_1 : (⟨8, 0, [9, 1, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_2_2 : (⟨8, 2, [9, 1, 5, 6, 7, 0, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_2_3 : (⟨8, 3, [9, 4, 0, 7, 6, 5, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_2_4 : (⟨8, 6, [9, 5, 1, 2, 3, 4, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_2_5 : (⟨8, 1, [9, 5, 6, 7, 0, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_2_6 : (⟨0, 8, [4, 3, 2, 1, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_2_7 : (⟨0, 9, [4, 3, 2, 1, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_2_8 : (⟨0, 6, [4, 3, 2, 1, 5, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_2_9 : (⟨0, 7, [4, 3, 2, 1, 9, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_2_10 : (⟨0, 8, [4, 3, 2, 1, 9, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_2_11 : (⟨0, 6, [4, 3, 2, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_paths_block_2 : ∀ p ∈ k9t4p23_step_12_required_block_2, p.Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by + simp only [k9t4p23_step_12_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p23_local_12_path_2_0, k9t4p23_local_12_path_2_1, k9t4p23_local_12_path_2_2, k9t4p23_local_12_path_2_3, k9t4p23_local_12_path_2_4, k9t4p23_local_12_path_2_5, k9t4p23_local_12_path_2_6, k9t4p23_local_12_path_2_7, k9t4p23_local_12_path_2_8, k9t4p23_local_12_path_2_9, k9t4p23_local_12_path_2_10, k9t4p23_local_12_path_2_11⟩ + +private def k9t4p23_local_12_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1}, Finset.Icc 1 5, {0, 1}, {1}, {0, 1}, ∅, ∅, ∅, {1}], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_12_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_3) 0 j = k9t4p23_local_12_required_3 0 j := by decide + +private theorem k9t4p23_local_12_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_3) 1 j = k9t4p23_local_12_required_3 1 j := by decide + +private theorem k9t4p23_local_12_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_3) 2 j = k9t4p23_local_12_required_3 2 j := by decide + +private theorem k9t4p23_local_12_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_3) 3 j = k9t4p23_local_12_required_3 3 j := by decide + +private theorem k9t4p23_local_12_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_3) 4 j = k9t4p23_local_12_required_3 4 j := by decide + +private theorem k9t4p23_local_12_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_3) 5 j = k9t4p23_local_12_required_3 5 j := by decide + +private theorem k9t4p23_local_12_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_3) 6 j = k9t4p23_local_12_required_3 6 j := by decide + +private theorem k9t4p23_local_12_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_3) 7 j = k9t4p23_local_12_required_3 7 j := by decide + +private theorem k9t4p23_local_12_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_3) 8 j = k9t4p23_local_12_required_3 8 j := by decide + +private theorem k9t4p23_local_12_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t4p23_step_12_required_block_3) 9 j = k9t4p23_local_12_required_3 9 j := by decide + +private theorem k9t4p23_local_12_required_3_eq : (requiredMatrix 9 k9t4p23_step_12_required_block_3) = k9t4p23_local_12_required_3 := by + funext i j + fin_cases i + + · exact k9t4p23_local_12_required_3_eq_row_0 j + + · exact k9t4p23_local_12_required_3_eq_row_1 j + + · exact k9t4p23_local_12_required_3_eq_row_2 j + + · exact k9t4p23_local_12_required_3_eq_row_3 j + + · exact k9t4p23_local_12_required_3_eq_row_4 j + + · exact k9t4p23_local_12_required_3_eq_row_5 j + + · exact k9t4p23_local_12_required_3_eq_row_6 j + + · exact k9t4p23_local_12_required_3_eq_row_7 j + + · exact k9t4p23_local_12_required_3_eq_row_8 j + + · exact k9t4p23_local_12_required_3_eq_row_9 j + +private theorem k9t4p23_local_12_path_3_0 : (⟨0, 5, [4, 3, 2, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_3_1 : (⟨0, 2, [4, 5, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_3_2 : (⟨0, 2, [4, 5, 6, 7, 8, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_3_3 : (⟨0, 3, [4, 5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_3_4 : (⟨0, 2, [4, 5, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_3_5 : (⟨0, 9, [7, 6, 5, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_3_6 : (⟨0, 2, [7, 6, 5, 1, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_3_7 : (⟨0, 2, [7, 6, 5, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_3_8 : (⟨0, 4, [7, 6, 5, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_3_9 : (⟨0, 3, [7, 6, 5, 9, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_3_10 : (⟨0, 1, [7, 6, 5, 9, 4, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_path_3_11 : (⟨0, 5, [7, 8, 9, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by decide + +private theorem k9t4p23_local_12_paths_block_3 : ∀ p ∈ k9t4p23_step_12_required_block_3, p.Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by + simp only [k9t4p23_step_12_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p23_local_12_path_3_0, k9t4p23_local_12_path_3_1, k9t4p23_local_12_path_3_2, k9t4p23_local_12_path_3_3, k9t4p23_local_12_path_3_4, k9t4p23_local_12_path_3_5, k9t4p23_local_12_path_3_6, k9t4p23_local_12_path_3_7, k9t4p23_local_12_path_3_8, k9t4p23_local_12_path_3_9, k9t4p23_local_12_path_3_10, k9t4p23_local_12_path_3_11⟩ + +private theorem k9t4p23_local_12_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_12 a b ∪ ((((k9t4p23_local_12_required_0 a b ∪ k9t4p23_local_12_required_1 a b) ∪ k9t4p23_local_12_required_2 a b) ∪ k9t4p23_local_12_required_3 a b))) 0 j = k9t4p23_local_12 0 j := by decide + +private theorem k9t4p23_local_12_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_12 a b ∪ ((((k9t4p23_local_12_required_0 a b ∪ k9t4p23_local_12_required_1 a b) ∪ k9t4p23_local_12_required_2 a b) ∪ k9t4p23_local_12_required_3 a b))) 1 j = k9t4p23_local_12 1 j := by decide + +private theorem k9t4p23_local_12_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_12 a b ∪ ((((k9t4p23_local_12_required_0 a b ∪ k9t4p23_local_12_required_1 a b) ∪ k9t4p23_local_12_required_2 a b) ∪ k9t4p23_local_12_required_3 a b))) 2 j = k9t4p23_local_12 2 j := by decide + +private theorem k9t4p23_local_12_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_12 a b ∪ ((((k9t4p23_local_12_required_0 a b ∪ k9t4p23_local_12_required_1 a b) ∪ k9t4p23_local_12_required_2 a b) ∪ k9t4p23_local_12_required_3 a b))) 3 j = k9t4p23_local_12 3 j := by decide + +private theorem k9t4p23_local_12_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_12 a b ∪ ((((k9t4p23_local_12_required_0 a b ∪ k9t4p23_local_12_required_1 a b) ∪ k9t4p23_local_12_required_2 a b) ∪ k9t4p23_local_12_required_3 a b))) 4 j = k9t4p23_local_12 4 j := by decide + +private theorem k9t4p23_local_12_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_12 a b ∪ ((((k9t4p23_local_12_required_0 a b ∪ k9t4p23_local_12_required_1 a b) ∪ k9t4p23_local_12_required_2 a b) ∪ k9t4p23_local_12_required_3 a b))) 5 j = k9t4p23_local_12 5 j := by decide + +private theorem k9t4p23_local_12_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_12 a b ∪ ((((k9t4p23_local_12_required_0 a b ∪ k9t4p23_local_12_required_1 a b) ∪ k9t4p23_local_12_required_2 a b) ∪ k9t4p23_local_12_required_3 a b))) 6 j = k9t4p23_local_12 6 j := by decide + +private theorem k9t4p23_local_12_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_12 a b ∪ ((((k9t4p23_local_12_required_0 a b ∪ k9t4p23_local_12_required_1 a b) ∪ k9t4p23_local_12_required_2 a b) ∪ k9t4p23_local_12_required_3 a b))) 7 j = k9t4p23_local_12 7 j := by decide + +private theorem k9t4p23_local_12_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_12 a b ∪ ((((k9t4p23_local_12_required_0 a b ∪ k9t4p23_local_12_required_1 a b) ∪ k9t4p23_local_12_required_2 a b) ∪ k9t4p23_local_12_required_3 a b))) 8 j = k9t4p23_local_12 8 j := by decide + +private theorem k9t4p23_local_12_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_12 a b ∪ ((((k9t4p23_local_12_required_0 a b ∪ k9t4p23_local_12_required_1 a b) ∪ k9t4p23_local_12_required_2 a b) ∪ k9t4p23_local_12_required_3 a b))) 9 j = k9t4p23_local_12 9 j := by decide + +private theorem k9t4p23_local_12_merged_eq : (fun a b => freshMatrix k9t4p23_state_12 a b ∪ ((((k9t4p23_local_12_required_0 a b ∪ k9t4p23_local_12_required_1 a b) ∪ k9t4p23_local_12_required_2 a b) ∪ k9t4p23_local_12_required_3 a b))) = k9t4p23_local_12 := by + funext i j + fin_cases i + + · exact k9t4p23_local_12_merged_eq_row_0 j + + · exact k9t4p23_local_12_merged_eq_row_1 j + + · exact k9t4p23_local_12_merged_eq_row_2 j + + · exact k9t4p23_local_12_merged_eq_row_3 j + + · exact k9t4p23_local_12_merged_eq_row_4 j + + · exact k9t4p23_local_12_merged_eq_row_5 j + + · exact k9t4p23_local_12_merged_eq_row_6 j + + · exact k9t4p23_local_12_merged_eq_row_7 j + + · exact k9t4p23_local_12_merged_eq_row_8 j + + · exact k9t4p23_local_12_merged_eq_row_9 j + +private theorem k9t4p23_local_12_eq : (fun a b => freshMatrix k9t4p23_state_12 a b ∪ requiredMatrix 9 k9t4p23_step_12_data.required a b) = k9t4p23_local_12 := by + funext a b + change freshMatrix k9t4p23_state_12 a b ∪ requiredMatrix 9 (k9t4p23_step_12_required_block_0 ++ k9t4p23_step_12_required_block_1 ++ k9t4p23_step_12_required_block_2 ++ k9t4p23_step_12_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t4p23_local_12_required_0_eq, k9t4p23_local_12_required_1_eq, k9t4p23_local_12_required_2_eq, k9t4p23_local_12_required_3_eq] + exact congrFun (congrFun k9t4p23_local_12_merged_eq a) b + +private theorem k9t4p23_local_12_paths : ∀ p ∈ k9t4p23_step_12_data.required, p.Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 := by + change ∀ p ∈ (k9t4p23_step_12_required_block_0 ++ k9t4p23_step_12_required_block_1 ++ k9t4p23_step_12_required_block_2 ++ k9t4p23_step_12_required_block_3), p.Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t4p23_local_12_paths_block_0, k9t4p23_local_12_paths_block_1⟩, k9t4p23_local_12_paths_block_2⟩, k9t4p23_local_12_paths_block_3⟩ + +private theorem k9t4p23_local_12_bad : k9t4p23_step_12_data.bad.Check (freshGraph k9t4p23.graph k9t4p23_step_12_data.i k9t4p23_step_12_data.j) k9t4p23_local_12 9 4 := by decide + +private theorem k9t4p23_step_12_check : k9t4p23_step_12.Check k9t4p23.graph k9t4p23_state_12 9 4 := by + change k9t4p23_step_12_data.Check k9t4p23.graph k9t4p23_state_12 9 4 + refine ⟨by decide, k9t4p23_local_12_paths, ?_⟩ + rw [k9t4p23_local_12_eq] + exact k9t4p23_local_12_bad + +private theorem k9t4p23_update_12 : k9t4p23_step_12.apply k9t4p23_state_12 = k9t4p23_state_13 := by + have h : ∀ i j : Fin 9, k9t4p23_step_12.apply k9t4p23_state_12 i j = k9t4p23_state_13 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_14 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {0, 2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 3, {0, 2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_13 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 3, {2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_13_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_13 a b ∪ requiredMatrix 9 k9t4p23_step_13_data.required a b) 0 j = k9t4p23_local_13 0 j := by decide + +private theorem k9t4p23_local_13_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_13 a b ∪ requiredMatrix 9 k9t4p23_step_13_data.required a b) 1 j = k9t4p23_local_13 1 j := by decide + +private theorem k9t4p23_local_13_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_13 a b ∪ requiredMatrix 9 k9t4p23_step_13_data.required a b) 2 j = k9t4p23_local_13 2 j := by decide + +private theorem k9t4p23_local_13_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_13 a b ∪ requiredMatrix 9 k9t4p23_step_13_data.required a b) 3 j = k9t4p23_local_13 3 j := by decide + +private theorem k9t4p23_local_13_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_13 a b ∪ requiredMatrix 9 k9t4p23_step_13_data.required a b) 4 j = k9t4p23_local_13 4 j := by decide + +private theorem k9t4p23_local_13_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_13 a b ∪ requiredMatrix 9 k9t4p23_step_13_data.required a b) 5 j = k9t4p23_local_13 5 j := by decide + +private theorem k9t4p23_local_13_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_13 a b ∪ requiredMatrix 9 k9t4p23_step_13_data.required a b) 6 j = k9t4p23_local_13 6 j := by decide + +private theorem k9t4p23_local_13_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_13 a b ∪ requiredMatrix 9 k9t4p23_step_13_data.required a b) 7 j = k9t4p23_local_13 7 j := by decide + +private theorem k9t4p23_local_13_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_13 a b ∪ requiredMatrix 9 k9t4p23_step_13_data.required a b) 8 j = k9t4p23_local_13 8 j := by decide + +private theorem k9t4p23_local_13_eq : (fun a b => k9t4p23_state_13 a b ∪ requiredMatrix 9 k9t4p23_step_13_data.required a b) = k9t4p23_local_13 := by + funext i j + fin_cases i + + · exact k9t4p23_local_13_eq_row_0 j + + · exact k9t4p23_local_13_eq_row_1 j + + · exact k9t4p23_local_13_eq_row_2 j + + · exact k9t4p23_local_13_eq_row_3 j + + · exact k9t4p23_local_13_eq_row_4 j + + · exact k9t4p23_local_13_eq_row_5 j + + · exact k9t4p23_local_13_eq_row_6 j + + · exact k9t4p23_local_13_eq_row_7 j + + · exact k9t4p23_local_13_eq_row_8 j + +private theorem k9t4p23_local_13_paths : ∀ p ∈ k9t4p23_step_13_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_13_data.i k9t4p23_step_13_data.j) 9 := by decide + +private theorem k9t4p23_local_13_bad : k9t4p23_step_13_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_13_data.i k9t4p23_step_13_data.j) k9t4p23_local_13 9 4 := by decide + +private theorem k9t4p23_step_13_check : k9t4p23_step_13.Check k9t4p23.graph k9t4p23_state_13 9 4 := by + change k9t4p23_step_13_data.Check k9t4p23.graph k9t4p23_state_13 9 4 + refine ⟨k9t4p23_local_13_paths, ?_⟩ + rw [k9t4p23_local_13_eq] + exact k9t4p23_local_13_bad + +private theorem k9t4p23_update_13 : k9t4p23_step_13.apply k9t4p23_state_13 = k9t4p23_state_14 := by + have h : ∀ i j : Fin 9, k9t4p23_step_13.apply k9t4p23_state_13 i j = k9t4p23_state_14 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_15 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {0, 2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 3, {0, 2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_14 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 0 7, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, Finset.Icc 1 8], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, {1, 2, 3}], + #[Finset.Icc 0 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 8, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 8, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 0 7, Finset.Icc 1 6, Finset.Icc 1 8, ∅, Finset.Icc 1 5, {0, 2}, Finset.Icc 3 7, {1, 2}], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 2 6, {1, 2}], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 3, {0, 2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {1, 2}], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[Finset.Icc 1 8, {1, 2, 3}, Finset.Icc 1 6, Finset.Icc 1 8, {1, 2}, {1, 2}, {1, 2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_14_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_14 a b ∪ requiredMatrix 9 k9t4p23_step_14_data.required a b) 0 j = k9t4p23_local_14 0 j := by decide + +private theorem k9t4p23_local_14_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_14 a b ∪ requiredMatrix 9 k9t4p23_step_14_data.required a b) 1 j = k9t4p23_local_14 1 j := by decide + +private theorem k9t4p23_local_14_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_14 a b ∪ requiredMatrix 9 k9t4p23_step_14_data.required a b) 2 j = k9t4p23_local_14 2 j := by decide + +private theorem k9t4p23_local_14_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_14 a b ∪ requiredMatrix 9 k9t4p23_step_14_data.required a b) 3 j = k9t4p23_local_14 3 j := by decide + +private theorem k9t4p23_local_14_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_14 a b ∪ requiredMatrix 9 k9t4p23_step_14_data.required a b) 4 j = k9t4p23_local_14 4 j := by decide + +private theorem k9t4p23_local_14_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_14 a b ∪ requiredMatrix 9 k9t4p23_step_14_data.required a b) 5 j = k9t4p23_local_14 5 j := by decide + +private theorem k9t4p23_local_14_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_14 a b ∪ requiredMatrix 9 k9t4p23_step_14_data.required a b) 6 j = k9t4p23_local_14 6 j := by decide + +private theorem k9t4p23_local_14_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_14 a b ∪ requiredMatrix 9 k9t4p23_step_14_data.required a b) 7 j = k9t4p23_local_14 7 j := by decide + +private theorem k9t4p23_local_14_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_14 a b ∪ requiredMatrix 9 k9t4p23_step_14_data.required a b) 8 j = k9t4p23_local_14 8 j := by decide + +private theorem k9t4p23_local_14_eq : (fun a b => k9t4p23_state_14 a b ∪ requiredMatrix 9 k9t4p23_step_14_data.required a b) = k9t4p23_local_14 := by + funext i j + fin_cases i + + · exact k9t4p23_local_14_eq_row_0 j + + · exact k9t4p23_local_14_eq_row_1 j + + · exact k9t4p23_local_14_eq_row_2 j + + · exact k9t4p23_local_14_eq_row_3 j + + · exact k9t4p23_local_14_eq_row_4 j + + · exact k9t4p23_local_14_eq_row_5 j + + · exact k9t4p23_local_14_eq_row_6 j + + · exact k9t4p23_local_14_eq_row_7 j + + · exact k9t4p23_local_14_eq_row_8 j + +private theorem k9t4p23_local_14_paths : ∀ p ∈ k9t4p23_step_14_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_14_data.i k9t4p23_step_14_data.j) 9 := by decide + +private theorem k9t4p23_local_14_bad : k9t4p23_step_14_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_14_data.i k9t4p23_step_14_data.j) k9t4p23_local_14 9 4 := by decide + +private theorem k9t4p23_step_14_check : k9t4p23_step_14.Check k9t4p23.graph k9t4p23_state_14 9 4 := by + change k9t4p23_step_14_data.Check k9t4p23.graph k9t4p23_state_14 9 4 + refine ⟨k9t4p23_local_14_paths, ?_⟩ + rw [k9t4p23_local_14_eq] + exact k9t4p23_local_14_bad + +private theorem k9t4p23_update_14 : k9t4p23_step_14.apply k9t4p23_state_14 = k9t4p23_state_15 := by + have h : ∀ i j : Fin 9, k9t4p23_step_14.apply k9t4p23_state_14 i j = k9t4p23_state_15 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_16 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {0, 2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {0, 2, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 3, {0, 2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_15 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, Finset.Icc 1 8, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[{0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 8, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[Finset.Icc 1 8, Finset.Icc 0 7, Finset.Icc 1 6, Finset.Icc 1 8, ∅, Finset.Icc 1 6, {0, 1, 2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 6, ∅, Finset.Icc 1 5, Finset.Icc 2 6, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 3, {0, 1, 2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 2 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_15_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_15 a b ∪ requiredMatrix 9 k9t4p23_step_15_data.required a b) 0 j = k9t4p23_local_15 0 j := by decide + +private theorem k9t4p23_local_15_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_15 a b ∪ requiredMatrix 9 k9t4p23_step_15_data.required a b) 1 j = k9t4p23_local_15 1 j := by decide + +private theorem k9t4p23_local_15_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_15 a b ∪ requiredMatrix 9 k9t4p23_step_15_data.required a b) 2 j = k9t4p23_local_15 2 j := by decide + +private theorem k9t4p23_local_15_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_15 a b ∪ requiredMatrix 9 k9t4p23_step_15_data.required a b) 3 j = k9t4p23_local_15 3 j := by decide + +private theorem k9t4p23_local_15_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_15 a b ∪ requiredMatrix 9 k9t4p23_step_15_data.required a b) 4 j = k9t4p23_local_15 4 j := by decide + +private theorem k9t4p23_local_15_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_15 a b ∪ requiredMatrix 9 k9t4p23_step_15_data.required a b) 5 j = k9t4p23_local_15 5 j := by decide + +private theorem k9t4p23_local_15_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_15 a b ∪ requiredMatrix 9 k9t4p23_step_15_data.required a b) 6 j = k9t4p23_local_15 6 j := by decide + +private theorem k9t4p23_local_15_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_15 a b ∪ requiredMatrix 9 k9t4p23_step_15_data.required a b) 7 j = k9t4p23_local_15 7 j := by decide + +private theorem k9t4p23_local_15_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_15 a b ∪ requiredMatrix 9 k9t4p23_step_15_data.required a b) 8 j = k9t4p23_local_15 8 j := by decide + +private theorem k9t4p23_local_15_eq : (fun a b => k9t4p23_state_15 a b ∪ requiredMatrix 9 k9t4p23_step_15_data.required a b) = k9t4p23_local_15 := by + funext i j + fin_cases i + + · exact k9t4p23_local_15_eq_row_0 j + + · exact k9t4p23_local_15_eq_row_1 j + + · exact k9t4p23_local_15_eq_row_2 j + + · exact k9t4p23_local_15_eq_row_3 j + + · exact k9t4p23_local_15_eq_row_4 j + + · exact k9t4p23_local_15_eq_row_5 j + + · exact k9t4p23_local_15_eq_row_6 j + + · exact k9t4p23_local_15_eq_row_7 j + + · exact k9t4p23_local_15_eq_row_8 j + +private theorem k9t4p23_local_15_paths : ∀ p ∈ k9t4p23_step_15_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_15_data.i k9t4p23_step_15_data.j) 9 := by decide + +private theorem k9t4p23_local_15_bad : k9t4p23_step_15_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_15_data.i k9t4p23_step_15_data.j) k9t4p23_local_15 9 4 := by decide + +private theorem k9t4p23_step_15_check : k9t4p23_step_15.Check k9t4p23.graph k9t4p23_state_15 9 4 := by + change k9t4p23_step_15_data.Check k9t4p23.graph k9t4p23_state_15 9 4 + refine ⟨k9t4p23_local_15_paths, ?_⟩ + rw [k9t4p23_local_15_eq] + exact k9t4p23_local_15_bad + +private theorem k9t4p23_update_15 : k9t4p23_step_15.apply k9t4p23_state_15 = k9t4p23_state_16 := by + have h : ∀ i j : Fin 9, k9t4p23_step_15.apply k9t4p23_state_15 i j = k9t4p23_state_16 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_17 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 0 3], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {0, 2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {0, 2, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 3, {0, 2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 3, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_16 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {0, 1, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, {1, 2, 3}], + #[{0, 1, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {0, 2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {0, 2, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 3, {0, 2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, {1, 2, 3}, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_16_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_16 a b ∪ requiredMatrix 9 k9t4p23_step_16_data.required a b) 0 j = k9t4p23_local_16 0 j := by decide + +private theorem k9t4p23_local_16_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_16 a b ∪ requiredMatrix 9 k9t4p23_step_16_data.required a b) 1 j = k9t4p23_local_16 1 j := by decide + +private theorem k9t4p23_local_16_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_16 a b ∪ requiredMatrix 9 k9t4p23_step_16_data.required a b) 2 j = k9t4p23_local_16 2 j := by decide + +private theorem k9t4p23_local_16_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_16 a b ∪ requiredMatrix 9 k9t4p23_step_16_data.required a b) 3 j = k9t4p23_local_16 3 j := by decide + +private theorem k9t4p23_local_16_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_16 a b ∪ requiredMatrix 9 k9t4p23_step_16_data.required a b) 4 j = k9t4p23_local_16 4 j := by decide + +private theorem k9t4p23_local_16_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_16 a b ∪ requiredMatrix 9 k9t4p23_step_16_data.required a b) 5 j = k9t4p23_local_16 5 j := by decide + +private theorem k9t4p23_local_16_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_16 a b ∪ requiredMatrix 9 k9t4p23_step_16_data.required a b) 6 j = k9t4p23_local_16 6 j := by decide + +private theorem k9t4p23_local_16_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_16 a b ∪ requiredMatrix 9 k9t4p23_step_16_data.required a b) 7 j = k9t4p23_local_16 7 j := by decide + +private theorem k9t4p23_local_16_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_16 a b ∪ requiredMatrix 9 k9t4p23_step_16_data.required a b) 8 j = k9t4p23_local_16 8 j := by decide + +private theorem k9t4p23_local_16_eq : (fun a b => k9t4p23_state_16 a b ∪ requiredMatrix 9 k9t4p23_step_16_data.required a b) = k9t4p23_local_16 := by + funext i j + fin_cases i + + · exact k9t4p23_local_16_eq_row_0 j + + · exact k9t4p23_local_16_eq_row_1 j + + · exact k9t4p23_local_16_eq_row_2 j + + · exact k9t4p23_local_16_eq_row_3 j + + · exact k9t4p23_local_16_eq_row_4 j + + · exact k9t4p23_local_16_eq_row_5 j + + · exact k9t4p23_local_16_eq_row_6 j + + · exact k9t4p23_local_16_eq_row_7 j + + · exact k9t4p23_local_16_eq_row_8 j + +private theorem k9t4p23_local_16_paths : ∀ p ∈ k9t4p23_step_16_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_16_data.i k9t4p23_step_16_data.j) 9 := by decide + +private theorem k9t4p23_local_16_bad : k9t4p23_step_16_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_16_data.i k9t4p23_step_16_data.j) k9t4p23_local_16 9 4 := by decide + +private theorem k9t4p23_step_16_check : k9t4p23_step_16.Check k9t4p23.graph k9t4p23_state_16 9 4 := by + change k9t4p23_step_16_data.Check k9t4p23.graph k9t4p23_state_16 9 4 + refine ⟨k9t4p23_local_16_paths, ?_⟩ + rw [k9t4p23_local_16_eq] + exact k9t4p23_local_16_bad + +private theorem k9t4p23_update_16 : k9t4p23_step_16.apply k9t4p23_state_16 = k9t4p23_state_17 := by + have h : ∀ i j : Fin 9, k9t4p23_step_16.apply k9t4p23_state_16 i j = k9t4p23_state_17 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_18 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 0 3], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {0, 2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {0, 2, 3, 4, 5, 6}, {1}], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 3, {0, 2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 3, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, {1}, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_17 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {0, 1, 2}, {0, 1, 2}, ∅, ∅, ∅, {0, 1}, {0, 1}, ∅], + #[∅, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 0 5, {1, 3, 4, 5, 6, 7, 8}], + #[{0, 1, 2}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 0 3], + #[{0, 1, 2}, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 1 6], + #[∅, {3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 0 5, {1, 3, 4, 5, 6, 7, 8}], + #[∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {0, 1, 2}, {0, 3, 4, 5, 6, 7}, ∅], + #[∅, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {0, 2, 3, 4, 5, 6}, ∅], + #[{0, 1}, Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 3, {0, 1, 2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[{0, 1}, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, {0, 3, 4, 5, 6, 7}, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 3, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, ∅, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_17_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_17 a b ∪ requiredMatrix 9 k9t4p23_step_17_data.required a b) 0 j = k9t4p23_local_17 0 j := by decide + +private theorem k9t4p23_local_17_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_17 a b ∪ requiredMatrix 9 k9t4p23_step_17_data.required a b) 1 j = k9t4p23_local_17 1 j := by decide + +private theorem k9t4p23_local_17_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_17 a b ∪ requiredMatrix 9 k9t4p23_step_17_data.required a b) 2 j = k9t4p23_local_17 2 j := by decide + +private theorem k9t4p23_local_17_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_17 a b ∪ requiredMatrix 9 k9t4p23_step_17_data.required a b) 3 j = k9t4p23_local_17 3 j := by decide + +private theorem k9t4p23_local_17_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_17 a b ∪ requiredMatrix 9 k9t4p23_step_17_data.required a b) 4 j = k9t4p23_local_17 4 j := by decide + +private theorem k9t4p23_local_17_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_17 a b ∪ requiredMatrix 9 k9t4p23_step_17_data.required a b) 5 j = k9t4p23_local_17 5 j := by decide + +private theorem k9t4p23_local_17_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_17 a b ∪ requiredMatrix 9 k9t4p23_step_17_data.required a b) 6 j = k9t4p23_local_17 6 j := by decide + +private theorem k9t4p23_local_17_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_17 a b ∪ requiredMatrix 9 k9t4p23_step_17_data.required a b) 7 j = k9t4p23_local_17 7 j := by decide + +private theorem k9t4p23_local_17_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_17 a b ∪ requiredMatrix 9 k9t4p23_step_17_data.required a b) 8 j = k9t4p23_local_17 8 j := by decide + +private theorem k9t4p23_local_17_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t4p23_state_17 a b ∪ requiredMatrix 9 k9t4p23_step_17_data.required a b) 9 j = k9t4p23_local_17 9 j := by decide + +private theorem k9t4p23_local_17_eq : (fun a b => freshMatrix k9t4p23_state_17 a b ∪ requiredMatrix 9 k9t4p23_step_17_data.required a b) = k9t4p23_local_17 := by + funext i j + fin_cases i + + · exact k9t4p23_local_17_eq_row_0 j + + · exact k9t4p23_local_17_eq_row_1 j + + · exact k9t4p23_local_17_eq_row_2 j + + · exact k9t4p23_local_17_eq_row_3 j + + · exact k9t4p23_local_17_eq_row_4 j + + · exact k9t4p23_local_17_eq_row_5 j + + · exact k9t4p23_local_17_eq_row_6 j + + · exact k9t4p23_local_17_eq_row_7 j + + · exact k9t4p23_local_17_eq_row_8 j + + · exact k9t4p23_local_17_eq_row_9 j + +private theorem k9t4p23_local_17_paths : ∀ p ∈ k9t4p23_step_17_data.required, p.Check (freshGraph k9t4p23.graph k9t4p23_step_17_data.i k9t4p23_step_17_data.j) 9 := by decide + +private theorem k9t4p23_local_17_bad : k9t4p23_step_17_data.bad.Check (freshGraph k9t4p23.graph k9t4p23_step_17_data.i k9t4p23_step_17_data.j) k9t4p23_local_17 9 4 := by decide + +private theorem k9t4p23_step_17_check : k9t4p23_step_17.Check k9t4p23.graph k9t4p23_state_17 9 4 := by + change k9t4p23_step_17_data.Check k9t4p23.graph k9t4p23_state_17 9 4 + refine ⟨by decide, k9t4p23_local_17_paths, ?_⟩ + rw [k9t4p23_local_17_eq] + exact k9t4p23_local_17_bad + +private theorem k9t4p23_update_17 : k9t4p23_step_17.apply k9t4p23_state_17 = k9t4p23_state_18 := by + have h : ∀ i j : Fin 9, k9t4p23_step_17.apply k9t4p23_state_17 i j = k9t4p23_state_18 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t4p23_state_19 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 0 3], + #[{0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, {1, 3, 4, 5, 6}, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {0, 2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {0, 2, 3, 4, 5, 6}, {1}], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 3, {0, 2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {0, 2}], + #[Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 3, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, {1}, {0, 2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p23_local_18 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, {3, 5, 6, 7, 8}, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, {0, 2, 4, 5, 6, 7}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 0 3], + #[{0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[{3, 5, 6, 7, 8}, {0, 2, 4, 5, 6, 7}, Finset.Icc 1 6, ∅, {1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 3, Finset.Icc 1 5, {1, 3, 4, 5, 6, 7, 8}], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, Finset.Icc 1 5, {0, 2}, Finset.Icc 3 7, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 0 6, {1}], + #[Finset.Icc 0 3, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 3, {0, 2}, Finset.Icc 1 5, ∅, Finset.Icc 1 5, {2}], + #[Finset.Icc 1 5, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 3 7, Finset.Icc 0 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5], + #[{1, 3, 4, 5, 6, 7, 8}, Finset.Icc 0 3, Finset.Icc 1 6, {1, 3, 4, 5, 6, 7, 8}, ∅, {1}, {2}, Finset.Icc 1 5, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p23_local_18_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t4p23_state_18 a b ∪ requiredMatrix 9 k9t4p23_step_18_data.required a b) 0 j = k9t4p23_local_18 0 j := by decide + +private theorem k9t4p23_local_18_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t4p23_state_18 a b ∪ requiredMatrix 9 k9t4p23_step_18_data.required a b) 1 j = k9t4p23_local_18 1 j := by decide + +private theorem k9t4p23_local_18_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t4p23_state_18 a b ∪ requiredMatrix 9 k9t4p23_step_18_data.required a b) 2 j = k9t4p23_local_18 2 j := by decide + +private theorem k9t4p23_local_18_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t4p23_state_18 a b ∪ requiredMatrix 9 k9t4p23_step_18_data.required a b) 3 j = k9t4p23_local_18 3 j := by decide + +private theorem k9t4p23_local_18_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t4p23_state_18 a b ∪ requiredMatrix 9 k9t4p23_step_18_data.required a b) 4 j = k9t4p23_local_18 4 j := by decide + +private theorem k9t4p23_local_18_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t4p23_state_18 a b ∪ requiredMatrix 9 k9t4p23_step_18_data.required a b) 5 j = k9t4p23_local_18 5 j := by decide + +private theorem k9t4p23_local_18_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t4p23_state_18 a b ∪ requiredMatrix 9 k9t4p23_step_18_data.required a b) 6 j = k9t4p23_local_18 6 j := by decide + +private theorem k9t4p23_local_18_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t4p23_state_18 a b ∪ requiredMatrix 9 k9t4p23_step_18_data.required a b) 7 j = k9t4p23_local_18 7 j := by decide + +private theorem k9t4p23_local_18_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t4p23_state_18 a b ∪ requiredMatrix 9 k9t4p23_step_18_data.required a b) 8 j = k9t4p23_local_18 8 j := by decide + +private theorem k9t4p23_local_18_eq : (fun a b => k9t4p23_state_18 a b ∪ requiredMatrix 9 k9t4p23_step_18_data.required a b) = k9t4p23_local_18 := by + funext i j + fin_cases i + + · exact k9t4p23_local_18_eq_row_0 j + + · exact k9t4p23_local_18_eq_row_1 j + + · exact k9t4p23_local_18_eq_row_2 j + + · exact k9t4p23_local_18_eq_row_3 j + + · exact k9t4p23_local_18_eq_row_4 j + + · exact k9t4p23_local_18_eq_row_5 j + + · exact k9t4p23_local_18_eq_row_6 j + + · exact k9t4p23_local_18_eq_row_7 j + + · exact k9t4p23_local_18_eq_row_8 j + +private theorem k9t4p23_local_18_paths : ∀ p ∈ k9t4p23_step_18_data.required, p.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_18_data.i k9t4p23_step_18_data.j) 9 := by decide + +private theorem k9t4p23_local_18_bad : k9t4p23_step_18_data.bad.Check (addedEdgeGraph k9t4p23.graph k9t4p23_step_18_data.i k9t4p23_step_18_data.j) k9t4p23_local_18 9 4 := by decide + +private theorem k9t4p23_step_18_check : k9t4p23_step_18.Check k9t4p23.graph k9t4p23_state_18 9 4 := by + change k9t4p23_step_18_data.Check k9t4p23.graph k9t4p23_state_18 9 4 + refine ⟨k9t4p23_local_18_paths, ?_⟩ + rw [k9t4p23_local_18_eq] + exact k9t4p23_local_18_bad + +private theorem k9t4p23_update_18 : k9t4p23_step_18.apply k9t4p23_state_18 = k9t4p23_state_19 := by + have h : ∀ i j : Fin 9, k9t4p23_step_18.apply k9t4p23_state_18 i j = k9t4p23_state_19 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k9t4p23_closure_19 : ClosureCheck k9t4p23.graph k9t4p23_state_19 9 4 [] := by trivial + +private theorem k9t4p23_closure_18 : ClosureCheck k9t4p23.graph k9t4p23_state_18 9 4 [k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_18_check + · rw [k9t4p23_update_18] + exact k9t4p23_closure_19 + +private theorem k9t4p23_closure_17 : ClosureCheck k9t4p23.graph k9t4p23_state_17 9 4 [k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_17_check + · rw [k9t4p23_update_17] + exact k9t4p23_closure_18 + +private theorem k9t4p23_closure_16 : ClosureCheck k9t4p23.graph k9t4p23_state_16 9 4 [k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_16_check + · rw [k9t4p23_update_16] + exact k9t4p23_closure_17 + +private theorem k9t4p23_closure_15 : ClosureCheck k9t4p23.graph k9t4p23_state_15 9 4 [k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_15_check + · rw [k9t4p23_update_15] + exact k9t4p23_closure_16 + +private theorem k9t4p23_closure_14 : ClosureCheck k9t4p23.graph k9t4p23_state_14 9 4 [k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_14_check + · rw [k9t4p23_update_14] + exact k9t4p23_closure_15 + +private theorem k9t4p23_closure_13 : ClosureCheck k9t4p23.graph k9t4p23_state_13 9 4 [k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_13_check + · rw [k9t4p23_update_13] + exact k9t4p23_closure_14 + +private theorem k9t4p23_closure_12 : ClosureCheck k9t4p23.graph k9t4p23_state_12 9 4 [k9t4p23_step_12, k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_12_check + · rw [k9t4p23_update_12] + exact k9t4p23_closure_13 + +private theorem k9t4p23_closure_11 : ClosureCheck k9t4p23.graph k9t4p23_state_11 9 4 [k9t4p23_step_11, k9t4p23_step_12, k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_11_check + · rw [k9t4p23_update_11] + exact k9t4p23_closure_12 + +private theorem k9t4p23_closure_10 : ClosureCheck k9t4p23.graph k9t4p23_state_10 9 4 [k9t4p23_step_10, k9t4p23_step_11, k9t4p23_step_12, k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_10_check + · rw [k9t4p23_update_10] + exact k9t4p23_closure_11 + +private theorem k9t4p23_closure_9 : ClosureCheck k9t4p23.graph k9t4p23_state_9 9 4 [k9t4p23_step_9, k9t4p23_step_10, k9t4p23_step_11, k9t4p23_step_12, k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_9_check + · rw [k9t4p23_update_9] + exact k9t4p23_closure_10 + +private theorem k9t4p23_closure_8 : ClosureCheck k9t4p23.graph k9t4p23_state_8 9 4 [k9t4p23_step_8, k9t4p23_step_9, k9t4p23_step_10, k9t4p23_step_11, k9t4p23_step_12, k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_8_check + · rw [k9t4p23_update_8] + exact k9t4p23_closure_9 + +private theorem k9t4p23_closure_7 : ClosureCheck k9t4p23.graph k9t4p23_state_7 9 4 [k9t4p23_step_7, k9t4p23_step_8, k9t4p23_step_9, k9t4p23_step_10, k9t4p23_step_11, k9t4p23_step_12, k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_7_check + · rw [k9t4p23_update_7] + exact k9t4p23_closure_8 + +private theorem k9t4p23_closure_6 : ClosureCheck k9t4p23.graph k9t4p23_state_6 9 4 [k9t4p23_step_6, k9t4p23_step_7, k9t4p23_step_8, k9t4p23_step_9, k9t4p23_step_10, k9t4p23_step_11, k9t4p23_step_12, k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_6_check + · rw [k9t4p23_update_6] + exact k9t4p23_closure_7 + +private theorem k9t4p23_closure_5 : ClosureCheck k9t4p23.graph k9t4p23_state_5 9 4 [k9t4p23_step_5, k9t4p23_step_6, k9t4p23_step_7, k9t4p23_step_8, k9t4p23_step_9, k9t4p23_step_10, k9t4p23_step_11, k9t4p23_step_12, k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_5_check + · rw [k9t4p23_update_5] + exact k9t4p23_closure_6 + +private theorem k9t4p23_closure_4 : ClosureCheck k9t4p23.graph k9t4p23_state_4 9 4 [k9t4p23_step_4, k9t4p23_step_5, k9t4p23_step_6, k9t4p23_step_7, k9t4p23_step_8, k9t4p23_step_9, k9t4p23_step_10, k9t4p23_step_11, k9t4p23_step_12, k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_4_check + · rw [k9t4p23_update_4] + exact k9t4p23_closure_5 + +private theorem k9t4p23_closure_3 : ClosureCheck k9t4p23.graph k9t4p23_state_3 9 4 [k9t4p23_step_3, k9t4p23_step_4, k9t4p23_step_5, k9t4p23_step_6, k9t4p23_step_7, k9t4p23_step_8, k9t4p23_step_9, k9t4p23_step_10, k9t4p23_step_11, k9t4p23_step_12, k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_3_check + · rw [k9t4p23_update_3] + exact k9t4p23_closure_4 + +private theorem k9t4p23_closure_2 : ClosureCheck k9t4p23.graph k9t4p23_state_2 9 4 [k9t4p23_step_2, k9t4p23_step_3, k9t4p23_step_4, k9t4p23_step_5, k9t4p23_step_6, k9t4p23_step_7, k9t4p23_step_8, k9t4p23_step_9, k9t4p23_step_10, k9t4p23_step_11, k9t4p23_step_12, k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_2_check + · rw [k9t4p23_update_2] + exact k9t4p23_closure_3 + +private theorem k9t4p23_closure_1 : ClosureCheck k9t4p23.graph k9t4p23_state_1 9 4 [k9t4p23_step_1, k9t4p23_step_2, k9t4p23_step_3, k9t4p23_step_4, k9t4p23_step_5, k9t4p23_step_6, k9t4p23_step_7, k9t4p23_step_8, k9t4p23_step_9, k9t4p23_step_10, k9t4p23_step_11, k9t4p23_step_12, k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_1_check + · rw [k9t4p23_update_1] + exact k9t4p23_closure_2 + +private theorem k9t4p23_closure_0 : ClosureCheck k9t4p23.graph k9t4p23_state_0 9 4 [k9t4p23_step_0, k9t4p23_step_1, k9t4p23_step_2, k9t4p23_step_3, k9t4p23_step_4, k9t4p23_step_5, k9t4p23_step_6, k9t4p23_step_7, k9t4p23_step_8, k9t4p23_step_9, k9t4p23_step_10, k9t4p23_step_11, k9t4p23_step_12, k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] := by + constructor + · exact k9t4p23_step_0_check + · rw [k9t4p23_update_0] + exact k9t4p23_closure_1 + +private theorem k9t4p23_matrix_eq : k9t4p23.matrix 9 = k9t4p23_state_19 := by + change closureMatrix (k9t4p23.initialMatrix 9) _ = _ + rw [k9t4p23_initial_eq] + change closureMatrix k9t4p23_state_0 [k9t4p23_step_0, k9t4p23_step_1, k9t4p23_step_2, k9t4p23_step_3, k9t4p23_step_4, k9t4p23_step_5, k9t4p23_step_6, k9t4p23_step_7, k9t4p23_step_8, k9t4p23_step_9, k9t4p23_step_10, k9t4p23_step_11, k9t4p23_step_12, k9t4p23_step_13, k9t4p23_step_14, k9t4p23_step_15, k9t4p23_step_16, k9t4p23_step_17, k9t4p23_step_18] = _ + simp only [closureMatrix] + rw [k9t4p23_update_0, k9t4p23_update_1, k9t4p23_update_2, k9t4p23_update_3, k9t4p23_update_4, k9t4p23_update_5, k9t4p23_update_6, k9t4p23_update_7, k9t4p23_update_8, k9t4p23_update_9, k9t4p23_update_10, k9t4p23_update_11, k9t4p23_update_12, k9t4p23_update_13, k9t4p23_update_14, k9t4p23_update_15, k9t4p23_update_16, k9t4p23_update_17, k9t4p23_update_18] + +private theorem k9t4p23_part_0 : k9t4p23.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p23_part_1 : k9t4p23.chains.map List.length = ([[2], [3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p23_part_2 : k9t4p23.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p23.clique))) = ([[2], [3]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p23_templates_item_0 : (⟨0, 1, [], [], [2, 3], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_1 : (⟨0, 1, [[4, 5, 6, 7, 8]], [], [2, 3], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_2 : (⟨0, 2, [], [], [3], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_3 : (⟨0, 2, [[4, 5, 6, 7, 8]], [], [3], 2, 2⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_4 : (⟨0, 3, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_5 : (⟨0, 3, [[4, 5, 6, 7, 8]], [], [], 3, 3⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_6 : (⟨0, 4, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_7 : (⟨0, 4, [], [3, 2, 1], [], 4, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_8 : (⟨0, 4, [], [], [5, 6, 7, 8], 3, 4⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_9 : (⟨0, 4, [], [3, 2, 1], [5, 6, 7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_10 : (⟨0, 5, [], [], [4], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_11 : (⟨0, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_12 : (⟨0, 5, [], [3, 2, 1], [6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_13 : (⟨0, 6, [], [3, 2, 1], [5, 4], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_14 : (⟨0, 7, [], [], [6, 5, 4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_15 : (⟨0, 7, [], [3, 2, 1], [6, 5, 4], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_16 : (⟨0, 8, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_17 : (⟨0, 8, [], [3, 2, 1], [], 4, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_18 : (⟨0, 8, [], [], [7, 6, 5, 4], 3, 4⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_19 : (⟨0, 8, [], [3, 2, 1], [7, 6, 5, 4], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_20 : (⟨1, 2, [], [0], [3], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_21 : (⟨1, 2, [[4, 5, 6, 7, 8]], [0], [3], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_22 : (⟨1, 3, [], [0], [], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_23 : (⟨1, 3, [[4, 5, 6, 7, 8]], [0], [], 2, 2⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_24 : (⟨1, 4, [], [0], [], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_25 : (⟨1, 4, [], [3, 2], [], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_26 : (⟨1, 4, [], [0], [5, 6, 7, 8], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_27 : (⟨1, 4, [], [3, 2], [5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_28 : (⟨1, 5, [], [0], [4], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_29 : (⟨1, 5, [], [0], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_30 : (⟨1, 6, [], [0], [5, 4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_31 : (⟨1, 6, [], [3, 2], [5, 4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_32 : (⟨1, 7, [], [0], [6, 5, 4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_33 : (⟨1, 7, [], [0], [8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_34 : (⟨1, 8, [], [0], [7, 6, 5, 4], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_35 : (⟨1, 8, [], [3, 2], [7, 6, 5, 4], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_36 : (⟨2, 3, [], [0, 1], [], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_37 : (⟨2, 3, [[4, 5, 6, 7, 8]], [0, 1], [], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_38 : (⟨2, 4, [], [0, 1], [], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_39 : (⟨2, 4, [], [0, 1], [5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_40 : (⟨2, 5, [], [0, 1], [4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_41 : (⟨2, 5, [], [0, 1], [6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_42 : (⟨2, 5, [], [3], [4], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_43 : (⟨2, 6, [], [0, 1], [5, 4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_44 : (⟨2, 6, [], [3], [5, 4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_45 : (⟨2, 7, [], [0, 1], [6, 5, 4], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_46 : (⟨2, 7, [], [0, 1], [8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_47 : (⟨2, 7, [], [3], [8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_48 : (⟨2, 8, [], [0, 1], [], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_49 : (⟨2, 8, [], [0, 1], [7, 6, 5, 4], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_50 : (⟨3, 4, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_51 : (⟨3, 4, [], [0, 1, 2], [], 4, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_52 : (⟨3, 4, [], [], [5, 6, 7, 8], 3, 4⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_53 : (⟨3, 4, [], [0, 1, 2], [5, 6, 7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_54 : (⟨3, 5, [], [], [4], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_55 : (⟨3, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_56 : (⟨3, 5, [], [0, 1, 2], [6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_57 : (⟨3, 6, [], [0, 1, 2], [5, 4], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_58 : (⟨3, 7, [], [], [6, 5, 4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_59 : (⟨3, 7, [], [0, 1, 2], [6, 5, 4], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_60 : (⟨3, 8, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_61 : (⟨3, 8, [], [0, 1, 2], [], 4, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_62 : (⟨3, 8, [], [], [7, 6, 5, 4], 3, 4⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_63 : (⟨3, 8, [], [0, 1, 2], [7, 6, 5, 4], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_64 : (⟨4, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_65 : (⟨4, 5, [[0, 1, 2, 3]], [], [6, 7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_66 : (⟨4, 6, [[0, 1, 2, 3]], [], [7, 8], 2, 2⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_67 : (⟨4, 7, [], [], [8], 4, 7⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_68 : (⟨4, 7, [[0, 1, 2, 3]], [], [8], 3, 3⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_69 : (⟨5, 6, [], [4], [7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_70 : (⟨5, 6, [[0, 1, 2, 3]], [4], [7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_71 : (⟨5, 7, [], [4], [8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_72 : (⟨5, 7, [[0, 1, 2, 3]], [4], [8], 2, 2⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_73 : (⟨6, 7, [], [4, 5], [8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_74 : (⟨6, 7, [[0, 1, 2, 3]], [4, 5], [8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_75 : (⟨6, 8, [[0, 1, 2, 3]], [4, 5], [], 2, 2⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_76 : (⟨7, 8, [], [4, 5, 6], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_item_77 : (⟨7, 8, [[0, 1, 2, 3]], [4, 5, 6], [], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p23_templates_block_0_check : ∀ T ∈ k9t4p23_templates_block_0, T.Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p23_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p23_templates_item_0, k9t4p23_templates_item_1, k9t4p23_templates_item_2, k9t4p23_templates_item_3, k9t4p23_templates_item_4, k9t4p23_templates_item_5, k9t4p23_templates_item_6, k9t4p23_templates_item_7, k9t4p23_templates_item_8, k9t4p23_templates_item_9, k9t4p23_templates_item_10, k9t4p23_templates_item_11⟩ + +private theorem k9t4p23_templates_block_1_check : ∀ T ∈ k9t4p23_templates_block_1, T.Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p23_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p23_templates_item_12, k9t4p23_templates_item_13, k9t4p23_templates_item_14, k9t4p23_templates_item_15, k9t4p23_templates_item_16, k9t4p23_templates_item_17, k9t4p23_templates_item_18, k9t4p23_templates_item_19, k9t4p23_templates_item_20, k9t4p23_templates_item_21, k9t4p23_templates_item_22, k9t4p23_templates_item_23⟩ + +private theorem k9t4p23_templates_block_2_check : ∀ T ∈ k9t4p23_templates_block_2, T.Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p23_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p23_templates_item_24, k9t4p23_templates_item_25, k9t4p23_templates_item_26, k9t4p23_templates_item_27, k9t4p23_templates_item_28, k9t4p23_templates_item_29, k9t4p23_templates_item_30, k9t4p23_templates_item_31, k9t4p23_templates_item_32, k9t4p23_templates_item_33, k9t4p23_templates_item_34, k9t4p23_templates_item_35⟩ + +private theorem k9t4p23_templates_block_3_check : ∀ T ∈ k9t4p23_templates_block_3, T.Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p23_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p23_templates_item_36, k9t4p23_templates_item_37, k9t4p23_templates_item_38, k9t4p23_templates_item_39, k9t4p23_templates_item_40, k9t4p23_templates_item_41, k9t4p23_templates_item_42, k9t4p23_templates_item_43, k9t4p23_templates_item_44, k9t4p23_templates_item_45, k9t4p23_templates_item_46, k9t4p23_templates_item_47⟩ + +private theorem k9t4p23_templates_block_4_check : ∀ T ∈ k9t4p23_templates_block_4, T.Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p23_templates_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p23_templates_item_48, k9t4p23_templates_item_49, k9t4p23_templates_item_50, k9t4p23_templates_item_51, k9t4p23_templates_item_52, k9t4p23_templates_item_53, k9t4p23_templates_item_54, k9t4p23_templates_item_55, k9t4p23_templates_item_56, k9t4p23_templates_item_57, k9t4p23_templates_item_58, k9t4p23_templates_item_59⟩ + +private theorem k9t4p23_templates_block_5_check : ∀ T ∈ k9t4p23_templates_block_5, T.Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p23_templates_block_5, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p23_templates_item_60, k9t4p23_templates_item_61, k9t4p23_templates_item_62, k9t4p23_templates_item_63, k9t4p23_templates_item_64, k9t4p23_templates_item_65, k9t4p23_templates_item_66, k9t4p23_templates_item_67, k9t4p23_templates_item_68, k9t4p23_templates_item_69, k9t4p23_templates_item_70, k9t4p23_templates_item_71⟩ + +private theorem k9t4p23_templates_block_6_check : ∀ T ∈ k9t4p23_templates_block_6, T.Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p23_templates_block_6, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p23_templates_item_72, k9t4p23_templates_item_73, k9t4p23_templates_item_74, k9t4p23_templates_item_75, k9t4p23_templates_item_76, k9t4p23_templates_item_77⟩ + +private theorem k9t4p23_part_3 : ∀ T ∈ k9t4p23.templates, T.Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t4p23_templates_block_0 ++ k9t4p23_templates_block_1 ++ k9t4p23_templates_block_2 ++ k9t4p23_templates_block_3 ++ k9t4p23_templates_block_4 ++ k9t4p23_templates_block_5 ++ k9t4p23_templates_block_6), T.Check k9t4p23.graph k9t4p23.clique 9 (patternAmount ([[2], [3]] : List (List ℕ))) (([[2], [3]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨⟨⟨k9t4p23_templates_block_0_check, k9t4p23_templates_block_1_check⟩, k9t4p23_templates_block_2_check⟩, k9t4p23_templates_block_3_check⟩, k9t4p23_templates_block_4_check⟩, k9t4p23_templates_block_5_check⟩, k9t4p23_templates_block_6_check⟩ + +private theorem k9t4p23_part_4 : ∀ p ∈ k9t4p23.required, p.Check k9t4p23.graph 9 := by decide + +private theorem k9t4p23_part_5 : ClosureCheck k9t4p23.graph (k9t4p23.initialMatrix 9) 9 4 k9t4p23.closure := by + rw [k9t4p23_initial_eq] + exact k9t4p23_closure_0 + +private theorem k9t4p23_part_6 : k9t4p23.bad.Check k9t4p23.graph (k9t4p23.matrix 9) 9 4 := by + rw [k9t4p23_matrix_eq] + decide + +theorem k9t4p23_check : k9t4p23.Check 9 4 [[2], [3]] := + ⟨k9t4p23_part_0, k9t4p23_part_1, k9t4p23_part_2, k9t4p23_part_3, k9t4p23_part_4, k9t4p23_part_5, k9t4p23_part_6⟩ +private def k9t4p24_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [], [], [2, 3, 4, 5], 2, 4⟩, ⟨0, 1, [[5, 6, 7, 8]], [], [2, 3], 1, 2⟩, ⟨0, 4, [], [3, 2, 1], [5], 2, 4⟩, ⟨0, 4, [], [3, 2, 1], [5, 6, 7, 8], 1, 1⟩, ⟨0, 6, [], [3, 2, 1], [5], 2, 4⟩, ⟨0, 6, [], [3, 2, 1], [7, 8], 1, 3⟩, ⟨1, 2, [], [0], [3], 3, 6⟩, ⟨1, 2, [], [0], [3, 4, 5], 2, 4⟩, ⟨1, 2, [[5, 6, 7, 8]], [0], [3], 1, 2⟩, ⟨1, 4, [], [0], [3], 3, 6⟩, ⟨1, 4, [], [3, 2], [5], 2, 5⟩, ⟨1, 4, [[5, 6, 7, 8]], [0], [3], 1, 2⟩] + +private def k9t4p24_templates_block_1 : List (TemplateData (Fin 9)) := [⟨1, 5, [], [0], [6, 7, 8], 2, 4⟩, ⟨1, 5, [], [3, 2], [6, 7, 8], 1, 3⟩, ⟨1, 6, [], [0], [5], 3, 6⟩, ⟨1, 6, [], [0], [7, 8], 2, 5⟩, ⟨1, 6, [], [3, 2], [7, 8], 1, 4⟩, ⟨1, 7, [], [0], [6, 5], 2, 5⟩, ⟨1, 7, [], [3, 2], [6, 5], 1, 4⟩, ⟨1, 8, [], [5, 4, 3, 2], [], 2, 4⟩, ⟨1, 8, [], [3, 2], [7, 6, 5], 1, 3⟩, ⟨2, 3, [], [0, 1], [4, 5], 2, 4⟩, ⟨2, 3, [[5, 6, 7, 8]], [0, 1], [], 1, 2⟩, ⟨2, 4, [], [0, 1], [3], 2, 5⟩] + +private def k9t4p24_templates_block_2 : List (TemplateData (Fin 9)) := [⟨2, 4, [], [3], [5], 3, 6⟩, ⟨2, 4, [[5, 6, 7, 8]], [0, 1], [3], 1, 1⟩, ⟨2, 5, [], [0, 1], [4, 3], 2, 4⟩, ⟨2, 5, [], [0, 1], [6, 7, 8], 1, 3⟩, ⟨2, 6, [], [0, 1], [5], 2, 5⟩, ⟨2, 6, [], [0, 1], [7, 8], 1, 4⟩, ⟨2, 6, [], [3], [5], 3, 6⟩, ⟨2, 7, [], [0, 1], [6, 5], 1, 4⟩, ⟨2, 8, [[3, 4, 5]], [0, 1], [], 2, 3⟩, ⟨2, 8, [], [0, 1], [7, 6, 5], 1, 3⟩, ⟨3, 4, [], [0, 1, 2], [5], 2, 4⟩, ⟨3, 4, [], [0, 1, 2], [5, 6, 7, 8], 1, 1⟩] + +private def k9t4p24_templates_block_3 : List (TemplateData (Fin 9)) := [⟨3, 6, [], [0, 1, 2], [5], 2, 4⟩, ⟨3, 6, [], [0, 1, 2], [7, 8], 1, 3⟩, ⟨4, 5, [], [0, 1, 2, 3], [], 2, 4⟩, ⟨4, 5, [], [0, 1, 2, 3], [6, 7, 8], 1, 1⟩, ⟨4, 6, [], [3], [5], 3, 6⟩, ⟨4, 6, [], [3], [7, 8], 2, 5⟩, ⟨4, 6, [], [0, 1, 2, 3], [5], 1, 3⟩, ⟨4, 7, [], [3], [6, 5], 2, 5⟩, ⟨4, 7, [], [0, 1, 2, 3], [6, 5], 1, 2⟩, ⟨4, 8, [], [0, 1, 2, 3], [], 2, 4⟩, ⟨4, 8, [], [0, 1, 2, 3], [7, 6, 5], 1, 1⟩, ⟨5, 6, [[0, 1, 2, 3]], [], [7, 8], 1, 2⟩] + +private def k9t4p24_templates_block_4 : List (TemplateData (Fin 9)) := [⟨6, 7, [[0, 1, 2, 3]], [5], [8], 1, 2⟩] + +def k9t4p24 : LayoutCertificate 9 where + chains := [[0, 1, 2, 3, 4, 5, 6, 7, 8]] + clique := {0, 3, 5, 8} + templates := k9t4p24_templates_block_0 ++ k9t4p24_templates_block_1 ++ k9t4p24_templates_block_2 ++ k9t4p24_templates_block_3 ++ k9t4p24_templates_block_4 + required := [] + closure := [] + bad := ⟨none, {(4, 3), (1, 3), (2, 3), (6, 3)}⟩ + + +private def k9t4p24_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 4, ∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅, ∅], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 4, {1, 2, 3}], + #[∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[∅, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅, {1, 2}, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 6, {1, 2}, ∅, {1, 2}, ∅], + #[∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 5, ∅, {1, 2}, ∅, ∅], + #[∅, Finset.Icc 1 4, {1, 2, 3}, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t4p24_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 4, ∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅, ∅], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p24_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_0) 0 j = k9t4p24_template_matrix_0 0 j := by decide + +private theorem k9t4p24_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_0) 1 j = k9t4p24_template_matrix_0 1 j := by decide + +private theorem k9t4p24_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_0) 2 j = k9t4p24_template_matrix_0 2 j := by decide + +private theorem k9t4p24_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_0) 3 j = k9t4p24_template_matrix_0 3 j := by decide + +private theorem k9t4p24_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_0) 4 j = k9t4p24_template_matrix_0 4 j := by decide + +private theorem k9t4p24_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_0) 5 j = k9t4p24_template_matrix_0 5 j := by decide + +private theorem k9t4p24_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_0) 6 j = k9t4p24_template_matrix_0 6 j := by decide + +private theorem k9t4p24_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_0) 7 j = k9t4p24_template_matrix_0 7 j := by decide + +private theorem k9t4p24_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_0) 8 j = k9t4p24_template_matrix_0 8 j := by decide + +private theorem k9t4p24_template_matrix_0_eq : (templateMatrix k9t4p24_templates_block_0) = k9t4p24_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t4p24_template_matrix_0_eq_row_0 j + + · exact k9t4p24_template_matrix_0_eq_row_1 j + + · exact k9t4p24_template_matrix_0_eq_row_2 j + + · exact k9t4p24_template_matrix_0_eq_row_3 j + + · exact k9t4p24_template_matrix_0_eq_row_4 j + + · exact k9t4p24_template_matrix_0_eq_row_5 j + + · exact k9t4p24_template_matrix_0_eq_row_6 j + + · exact k9t4p24_template_matrix_0_eq_row_7 j + + · exact k9t4p24_template_matrix_0_eq_row_8 j + +private def k9t4p24_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[∅, ∅, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 2 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p24_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_1) 0 j = k9t4p24_template_matrix_1 0 j := by decide + +private theorem k9t4p24_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_1) 1 j = k9t4p24_template_matrix_1 1 j := by decide + +private theorem k9t4p24_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_1) 2 j = k9t4p24_template_matrix_1 2 j := by decide + +private theorem k9t4p24_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_1) 3 j = k9t4p24_template_matrix_1 3 j := by decide + +private theorem k9t4p24_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_1) 4 j = k9t4p24_template_matrix_1 4 j := by decide + +private theorem k9t4p24_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_1) 5 j = k9t4p24_template_matrix_1 5 j := by decide + +private theorem k9t4p24_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_1) 6 j = k9t4p24_template_matrix_1 6 j := by decide + +private theorem k9t4p24_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_1) 7 j = k9t4p24_template_matrix_1 7 j := by decide + +private theorem k9t4p24_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_1) 8 j = k9t4p24_template_matrix_1 8 j := by decide + +private theorem k9t4p24_template_matrix_1_eq : (templateMatrix k9t4p24_templates_block_1) = k9t4p24_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t4p24_template_matrix_1_eq_row_0 j + + · exact k9t4p24_template_matrix_1_eq_row_1 j + + · exact k9t4p24_template_matrix_1_eq_row_2 j + + · exact k9t4p24_template_matrix_1_eq_row_3 j + + · exact k9t4p24_template_matrix_1_eq_row_4 j + + · exact k9t4p24_template_matrix_1_eq_row_5 j + + · exact k9t4p24_template_matrix_1_eq_row_6 j + + · exact k9t4p24_template_matrix_1_eq_row_7 j + + · exact k9t4p24_template_matrix_1_eq_row_8 j + +private def k9t4p24_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 4, {1, 2, 3}], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[∅, ∅, {1, 3, 4, 5, 6}, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p24_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_2) 0 j = k9t4p24_template_matrix_2 0 j := by decide + +private theorem k9t4p24_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_2) 1 j = k9t4p24_template_matrix_2 1 j := by decide + +private theorem k9t4p24_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_2) 2 j = k9t4p24_template_matrix_2 2 j := by decide + +private theorem k9t4p24_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_2) 3 j = k9t4p24_template_matrix_2 3 j := by decide + +private theorem k9t4p24_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_2) 4 j = k9t4p24_template_matrix_2 4 j := by decide + +private theorem k9t4p24_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_2) 5 j = k9t4p24_template_matrix_2 5 j := by decide + +private theorem k9t4p24_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_2) 6 j = k9t4p24_template_matrix_2 6 j := by decide + +private theorem k9t4p24_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_2) 7 j = k9t4p24_template_matrix_2 7 j := by decide + +private theorem k9t4p24_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_2) 8 j = k9t4p24_template_matrix_2 8 j := by decide + +private theorem k9t4p24_template_matrix_2_eq : (templateMatrix k9t4p24_templates_block_2) = k9t4p24_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t4p24_template_matrix_2_eq_row_0 j + + · exact k9t4p24_template_matrix_2_eq_row_1 j + + · exact k9t4p24_template_matrix_2_eq_row_2 j + + · exact k9t4p24_template_matrix_2_eq_row_3 j + + · exact k9t4p24_template_matrix_2_eq_row_4 j + + · exact k9t4p24_template_matrix_2_eq_row_5 j + + · exact k9t4p24_template_matrix_2_eq_row_6 j + + · exact k9t4p24_template_matrix_2_eq_row_7 j + + · exact k9t4p24_template_matrix_2_eq_row_8 j + +private def k9t4p24_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, {1, 2}, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 4, Finset.Icc 1 6, {1, 2}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p24_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_3) 0 j = k9t4p24_template_matrix_3 0 j := by decide + +private theorem k9t4p24_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_3) 1 j = k9t4p24_template_matrix_3 1 j := by decide + +private theorem k9t4p24_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_3) 2 j = k9t4p24_template_matrix_3 2 j := by decide + +private theorem k9t4p24_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_3) 3 j = k9t4p24_template_matrix_3 3 j := by decide + +private theorem k9t4p24_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_3) 4 j = k9t4p24_template_matrix_3 4 j := by decide + +private theorem k9t4p24_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_3) 5 j = k9t4p24_template_matrix_3 5 j := by decide + +private theorem k9t4p24_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_3) 6 j = k9t4p24_template_matrix_3 6 j := by decide + +private theorem k9t4p24_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_3) 7 j = k9t4p24_template_matrix_3 7 j := by decide + +private theorem k9t4p24_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_3) 8 j = k9t4p24_template_matrix_3 8 j := by decide + +private theorem k9t4p24_template_matrix_3_eq : (templateMatrix k9t4p24_templates_block_3) = k9t4p24_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t4p24_template_matrix_3_eq_row_0 j + + · exact k9t4p24_template_matrix_3_eq_row_1 j + + · exact k9t4p24_template_matrix_3_eq_row_2 j + + · exact k9t4p24_template_matrix_3_eq_row_3 j + + · exact k9t4p24_template_matrix_3_eq_row_4 j + + · exact k9t4p24_template_matrix_3_eq_row_5 j + + · exact k9t4p24_template_matrix_3_eq_row_6 j + + · exact k9t4p24_template_matrix_3_eq_row_7 j + + · exact k9t4p24_template_matrix_3_eq_row_8 j + +private def k9t4p24_template_matrix_4 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t4p24_template_matrix_4_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_4) 0 j = k9t4p24_template_matrix_4 0 j := by decide + +private theorem k9t4p24_template_matrix_4_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_4) 1 j = k9t4p24_template_matrix_4 1 j := by decide + +private theorem k9t4p24_template_matrix_4_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_4) 2 j = k9t4p24_template_matrix_4 2 j := by decide + +private theorem k9t4p24_template_matrix_4_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_4) 3 j = k9t4p24_template_matrix_4 3 j := by decide + +private theorem k9t4p24_template_matrix_4_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_4) 4 j = k9t4p24_template_matrix_4 4 j := by decide + +private theorem k9t4p24_template_matrix_4_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_4) 5 j = k9t4p24_template_matrix_4 5 j := by decide + +private theorem k9t4p24_template_matrix_4_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_4) 6 j = k9t4p24_template_matrix_4 6 j := by decide + +private theorem k9t4p24_template_matrix_4_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_4) 7 j = k9t4p24_template_matrix_4 7 j := by decide + +private theorem k9t4p24_template_matrix_4_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t4p24_templates_block_4) 8 j = k9t4p24_template_matrix_4 8 j := by decide + +private theorem k9t4p24_template_matrix_4_eq : (templateMatrix k9t4p24_templates_block_4) = k9t4p24_template_matrix_4 := by + funext i j + fin_cases i + + · exact k9t4p24_template_matrix_4_eq_row_0 j + + · exact k9t4p24_template_matrix_4_eq_row_1 j + + · exact k9t4p24_template_matrix_4_eq_row_2 j + + · exact k9t4p24_template_matrix_4_eq_row_3 j + + · exact k9t4p24_template_matrix_4_eq_row_4 j + + · exact k9t4p24_template_matrix_4_eq_row_5 j + + · exact k9t4p24_template_matrix_4_eq_row_6 j + + · exact k9t4p24_template_matrix_4_eq_row_7 j + + · exact k9t4p24_template_matrix_4_eq_row_8 j + +private theorem k9t4p24_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => ((((k9t4p24_template_matrix_0 i j ∪ k9t4p24_template_matrix_1 i j) ∪ k9t4p24_template_matrix_2 i j) ∪ k9t4p24_template_matrix_3 i j) ∪ k9t4p24_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p24.required i j) 0 j = k9t4p24_state_0 0 j := by decide + +private theorem k9t4p24_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => ((((k9t4p24_template_matrix_0 i j ∪ k9t4p24_template_matrix_1 i j) ∪ k9t4p24_template_matrix_2 i j) ∪ k9t4p24_template_matrix_3 i j) ∪ k9t4p24_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p24.required i j) 1 j = k9t4p24_state_0 1 j := by decide + +private theorem k9t4p24_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => ((((k9t4p24_template_matrix_0 i j ∪ k9t4p24_template_matrix_1 i j) ∪ k9t4p24_template_matrix_2 i j) ∪ k9t4p24_template_matrix_3 i j) ∪ k9t4p24_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p24.required i j) 2 j = k9t4p24_state_0 2 j := by decide + +private theorem k9t4p24_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => ((((k9t4p24_template_matrix_0 i j ∪ k9t4p24_template_matrix_1 i j) ∪ k9t4p24_template_matrix_2 i j) ∪ k9t4p24_template_matrix_3 i j) ∪ k9t4p24_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p24.required i j) 3 j = k9t4p24_state_0 3 j := by decide + +private theorem k9t4p24_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => ((((k9t4p24_template_matrix_0 i j ∪ k9t4p24_template_matrix_1 i j) ∪ k9t4p24_template_matrix_2 i j) ∪ k9t4p24_template_matrix_3 i j) ∪ k9t4p24_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p24.required i j) 4 j = k9t4p24_state_0 4 j := by decide + +private theorem k9t4p24_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => ((((k9t4p24_template_matrix_0 i j ∪ k9t4p24_template_matrix_1 i j) ∪ k9t4p24_template_matrix_2 i j) ∪ k9t4p24_template_matrix_3 i j) ∪ k9t4p24_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p24.required i j) 5 j = k9t4p24_state_0 5 j := by decide + +private theorem k9t4p24_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => ((((k9t4p24_template_matrix_0 i j ∪ k9t4p24_template_matrix_1 i j) ∪ k9t4p24_template_matrix_2 i j) ∪ k9t4p24_template_matrix_3 i j) ∪ k9t4p24_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p24.required i j) 6 j = k9t4p24_state_0 6 j := by decide + +private theorem k9t4p24_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => ((((k9t4p24_template_matrix_0 i j ∪ k9t4p24_template_matrix_1 i j) ∪ k9t4p24_template_matrix_2 i j) ∪ k9t4p24_template_matrix_3 i j) ∪ k9t4p24_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p24.required i j) 7 j = k9t4p24_state_0 7 j := by decide + +private theorem k9t4p24_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => ((((k9t4p24_template_matrix_0 i j ∪ k9t4p24_template_matrix_1 i j) ∪ k9t4p24_template_matrix_2 i j) ∪ k9t4p24_template_matrix_3 i j) ∪ k9t4p24_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p24.required i j) 8 j = k9t4p24_state_0 8 j := by decide + +private theorem k9t4p24_initial_merged_eq : (fun i j => ((((k9t4p24_template_matrix_0 i j ∪ k9t4p24_template_matrix_1 i j) ∪ k9t4p24_template_matrix_2 i j) ∪ k9t4p24_template_matrix_3 i j) ∪ k9t4p24_template_matrix_4 i j) ∪ requiredMatrix 9 k9t4p24.required i j) = k9t4p24_state_0 := by + funext i j + fin_cases i + + · exact k9t4p24_initial_merged_eq_row_0 j + + · exact k9t4p24_initial_merged_eq_row_1 j + + · exact k9t4p24_initial_merged_eq_row_2 j + + · exact k9t4p24_initial_merged_eq_row_3 j + + · exact k9t4p24_initial_merged_eq_row_4 j + + · exact k9t4p24_initial_merged_eq_row_5 j + + · exact k9t4p24_initial_merged_eq_row_6 j + + · exact k9t4p24_initial_merged_eq_row_7 j + + · exact k9t4p24_initial_merged_eq_row_8 j + +private theorem k9t4p24_initial_eq : k9t4p24.initialMatrix 9 = k9t4p24_state_0 := by + funext i j + change templateMatrix (k9t4p24_templates_block_0 ++ k9t4p24_templates_block_1 ++ k9t4p24_templates_block_2 ++ k9t4p24_templates_block_3 ++ k9t4p24_templates_block_4) i j ∪ requiredMatrix 9 k9t4p24.required i j = _ + simp only [templateMatrix_append, k9t4p24_template_matrix_0_eq, k9t4p24_template_matrix_1_eq, k9t4p24_template_matrix_2_eq, k9t4p24_template_matrix_3_eq, k9t4p24_template_matrix_4_eq] + exact congrFun (congrFun k9t4p24_initial_merged_eq i) j + +private theorem k9t4p24_closure_0 : ClosureCheck k9t4p24.graph k9t4p24_state_0 9 4 [] := by trivial + +private theorem k9t4p24_matrix_eq : k9t4p24.matrix 9 = k9t4p24_state_0 := by + change closureMatrix (k9t4p24.initialMatrix 9) _ = _ + rw [k9t4p24_initial_eq] + change closureMatrix k9t4p24_state_0 [] = _ + rfl + +private theorem k9t4p24_part_0 : k9t4p24.chains.flatten = List.finRange _ := by decide + +private theorem k9t4p24_part_1 : k9t4p24.chains.map List.length = ([[2, 1, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t4p24_part_2 : k9t4p24.chains.map (fun l => l.map (fun i => decide (i ∈ k9t4p24.clique))) = ([[2, 1, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t4p24_templates_item_0 : (⟨0, 1, [], [], [2, 3, 4, 5], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_1 : (⟨0, 1, [[5, 6, 7, 8]], [], [2, 3], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_2 : (⟨0, 4, [], [3, 2, 1], [5], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_3 : (⟨0, 4, [], [3, 2, 1], [5, 6, 7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_4 : (⟨0, 6, [], [3, 2, 1], [5], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_5 : (⟨0, 6, [], [3, 2, 1], [7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_6 : (⟨1, 2, [], [0], [3], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_7 : (⟨1, 2, [], [0], [3, 4, 5], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_8 : (⟨1, 2, [[5, 6, 7, 8]], [0], [3], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_9 : (⟨1, 4, [], [0], [3], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_10 : (⟨1, 4, [], [3, 2], [5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_11 : (⟨1, 4, [[5, 6, 7, 8]], [0], [3], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_12 : (⟨1, 5, [], [0], [6, 7, 8], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_13 : (⟨1, 5, [], [3, 2], [6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_14 : (⟨1, 6, [], [0], [5], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_15 : (⟨1, 6, [], [0], [7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_16 : (⟨1, 6, [], [3, 2], [7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_17 : (⟨1, 7, [], [0], [6, 5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_18 : (⟨1, 7, [], [3, 2], [6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_19 : (⟨1, 8, [], [5, 4, 3, 2], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_20 : (⟨1, 8, [], [3, 2], [7, 6, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_21 : (⟨2, 3, [], [0, 1], [4, 5], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_22 : (⟨2, 3, [[5, 6, 7, 8]], [0, 1], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_23 : (⟨2, 4, [], [0, 1], [3], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_24 : (⟨2, 4, [], [3], [5], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_25 : (⟨2, 4, [[5, 6, 7, 8]], [0, 1], [3], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_26 : (⟨2, 5, [], [0, 1], [4, 3], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_27 : (⟨2, 5, [], [0, 1], [6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_28 : (⟨2, 6, [], [0, 1], [5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_29 : (⟨2, 6, [], [0, 1], [7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_30 : (⟨2, 6, [], [3], [5], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_31 : (⟨2, 7, [], [0, 1], [6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_32 : (⟨2, 8, [[3, 4, 5]], [0, 1], [], 2, 3⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_33 : (⟨2, 8, [], [0, 1], [7, 6, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_34 : (⟨3, 4, [], [0, 1, 2], [5], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_35 : (⟨3, 4, [], [0, 1, 2], [5, 6, 7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_36 : (⟨3, 6, [], [0, 1, 2], [5], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_37 : (⟨3, 6, [], [0, 1, 2], [7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_38 : (⟨4, 5, [], [0, 1, 2, 3], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_39 : (⟨4, 5, [], [0, 1, 2, 3], [6, 7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_40 : (⟨4, 6, [], [3], [5], 3, 6⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_41 : (⟨4, 6, [], [3], [7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_42 : (⟨4, 6, [], [0, 1, 2, 3], [5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_43 : (⟨4, 7, [], [3], [6, 5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_44 : (⟨4, 7, [], [0, 1, 2, 3], [6, 5], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_45 : (⟨4, 8, [], [0, 1, 2, 3], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_46 : (⟨4, 8, [], [0, 1, 2, 3], [7, 6, 5], 1, 1⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_47 : (⟨5, 6, [[0, 1, 2, 3]], [], [7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_item_48 : (⟨6, 7, [[0, 1, 2, 3]], [5], [8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t4p24_templates_block_0_check : ∀ T ∈ k9t4p24_templates_block_0, T.Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p24_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p24_templates_item_0, k9t4p24_templates_item_1, k9t4p24_templates_item_2, k9t4p24_templates_item_3, k9t4p24_templates_item_4, k9t4p24_templates_item_5, k9t4p24_templates_item_6, k9t4p24_templates_item_7, k9t4p24_templates_item_8, k9t4p24_templates_item_9, k9t4p24_templates_item_10, k9t4p24_templates_item_11⟩ + +private theorem k9t4p24_templates_block_1_check : ∀ T ∈ k9t4p24_templates_block_1, T.Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p24_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p24_templates_item_12, k9t4p24_templates_item_13, k9t4p24_templates_item_14, k9t4p24_templates_item_15, k9t4p24_templates_item_16, k9t4p24_templates_item_17, k9t4p24_templates_item_18, k9t4p24_templates_item_19, k9t4p24_templates_item_20, k9t4p24_templates_item_21, k9t4p24_templates_item_22, k9t4p24_templates_item_23⟩ + +private theorem k9t4p24_templates_block_2_check : ∀ T ∈ k9t4p24_templates_block_2, T.Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p24_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p24_templates_item_24, k9t4p24_templates_item_25, k9t4p24_templates_item_26, k9t4p24_templates_item_27, k9t4p24_templates_item_28, k9t4p24_templates_item_29, k9t4p24_templates_item_30, k9t4p24_templates_item_31, k9t4p24_templates_item_32, k9t4p24_templates_item_33, k9t4p24_templates_item_34, k9t4p24_templates_item_35⟩ + +private theorem k9t4p24_templates_block_3_check : ∀ T ∈ k9t4p24_templates_block_3, T.Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p24_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t4p24_templates_item_36, k9t4p24_templates_item_37, k9t4p24_templates_item_38, k9t4p24_templates_item_39, k9t4p24_templates_item_40, k9t4p24_templates_item_41, k9t4p24_templates_item_42, k9t4p24_templates_item_43, k9t4p24_templates_item_44, k9t4p24_templates_item_45, k9t4p24_templates_item_46, k9t4p24_templates_item_47⟩ + +private theorem k9t4p24_templates_block_4_check : ∀ T ∈ k9t4p24_templates_block_4, T.Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t4p24_templates_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact k9t4p24_templates_item_48 + +private theorem k9t4p24_part_3 : ∀ T ∈ k9t4p24.templates, T.Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t4p24_templates_block_0 ++ k9t4p24_templates_block_1 ++ k9t4p24_templates_block_2 ++ k9t4p24_templates_block_3 ++ k9t4p24_templates_block_4), T.Check k9t4p24.graph k9t4p24.clique 9 (patternAmount ([[2, 1, 2]] : List (List ℕ))) (([[2, 1, 2]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t4p24_templates_block_0_check, k9t4p24_templates_block_1_check⟩, k9t4p24_templates_block_2_check⟩, k9t4p24_templates_block_3_check⟩, k9t4p24_templates_block_4_check⟩ + +private theorem k9t4p24_part_4 : ∀ p ∈ k9t4p24.required, p.Check k9t4p24.graph 9 := by decide + +private theorem k9t4p24_part_5 : ClosureCheck k9t4p24.graph (k9t4p24.initialMatrix 9) 9 4 k9t4p24.closure := by + rw [k9t4p24_initial_eq] + exact k9t4p24_closure_0 + +private theorem k9t4p24_part_6 : k9t4p24.bad.Check k9t4p24.graph (k9t4p24.matrix 9) 9 4 := by + rw [k9t4p24_matrix_eq] + decide + +theorem k9t4p24_check : k9t4p24.Check 9 4 [[2, 1, 2]] := + ⟨k9t4p24_part_0, k9t4p24_part_1, k9t4p24_part_2, k9t4p24_part_3, k9t4p24_part_4, k9t4p24_part_5, k9t4p24_part_6⟩ +def k9t5p0 : LayoutCertificate 5 where + chains := [[0], [1], [2], [3], [4]] + clique := {0, 1, 2, 3, 4} + templates := [⟨0, 1, [], [], [], 1, 8⟩, + ⟨0, 2, [], [], [], 1, 8⟩, + ⟨0, 3, [], [], [], 1, 8⟩, + ⟨0, 4, [], [], [], 1, 8⟩, + ⟨1, 2, [], [], [], 1, 8⟩, + ⟨1, 3, [], [], [], 1, 8⟩, + ⟨1, 4, [], [], [], 1, 8⟩, + ⟨2, 3, [], [], [], 1, 8⟩, + ⟨2, 4, [], [], [], 1, 8⟩, + ⟨3, 4, [], [], [], 1, 8⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 2), (1, 2), (2, 2), (3, 2)}⟩ + + +private def k9t5p0_state_0 : ForbiddenMatrix 5 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p0_initial_eq_row_0 : ∀ j : Fin 5, (k9t5p0.initialMatrix 9) 0 j = k9t5p0_state_0 0 j := by decide + +private theorem k9t5p0_initial_eq_row_1 : ∀ j : Fin 5, (k9t5p0.initialMatrix 9) 1 j = k9t5p0_state_0 1 j := by decide + +private theorem k9t5p0_initial_eq_row_2 : ∀ j : Fin 5, (k9t5p0.initialMatrix 9) 2 j = k9t5p0_state_0 2 j := by decide + +private theorem k9t5p0_initial_eq_row_3 : ∀ j : Fin 5, (k9t5p0.initialMatrix 9) 3 j = k9t5p0_state_0 3 j := by decide + +private theorem k9t5p0_initial_eq_row_4 : ∀ j : Fin 5, (k9t5p0.initialMatrix 9) 4 j = k9t5p0_state_0 4 j := by decide + +private theorem k9t5p0_initial_eq : (k9t5p0.initialMatrix 9) = k9t5p0_state_0 := by + funext i j + fin_cases i + + · exact k9t5p0_initial_eq_row_0 j + + · exact k9t5p0_initial_eq_row_1 j + + · exact k9t5p0_initial_eq_row_2 j + + · exact k9t5p0_initial_eq_row_3 j + + · exact k9t5p0_initial_eq_row_4 j + +private theorem k9t5p0_closure_0 : ClosureCheck k9t5p0.graph k9t5p0_state_0 9 5 [] := by trivial + +private theorem k9t5p0_matrix_eq : k9t5p0.matrix 9 = k9t5p0_state_0 := by + change closureMatrix (k9t5p0.initialMatrix 9) _ = _ + rw [k9t5p0_initial_eq] + change closureMatrix k9t5p0_state_0 [] = _ + rfl + +private theorem k9t5p0_part_0 : k9t5p0.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p0_part_1 : k9t5p0.chains.map List.length = ([[], [], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p0_part_2 : k9t5p0.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p0.clique))) = ([[], [], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 8⟩ : TemplateData (Fin 5)).Check k9t5p0.graph k9t5p0.clique 9 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 8⟩ : TemplateData (Fin 5)).Check k9t5p0.graph k9t5p0.clique 9 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 8⟩ : TemplateData (Fin 5)).Check k9t5p0.graph k9t5p0.clique 9 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p0_templates_item_3 : (⟨0, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 5)).Check k9t5p0.graph k9t5p0.clique 9 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p0_templates_item_4 : (⟨1, 2, [], [], [], 1, 8⟩ : TemplateData (Fin 5)).Check k9t5p0.graph k9t5p0.clique 9 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p0_templates_item_5 : (⟨1, 3, [], [], [], 1, 8⟩ : TemplateData (Fin 5)).Check k9t5p0.graph k9t5p0.clique 9 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p0_templates_item_6 : (⟨1, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 5)).Check k9t5p0.graph k9t5p0.clique 9 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p0_templates_item_7 : (⟨2, 3, [], [], [], 1, 8⟩ : TemplateData (Fin 5)).Check k9t5p0.graph k9t5p0.clique 9 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p0_templates_item_8 : (⟨2, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 5)).Check k9t5p0.graph k9t5p0.clique 9 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p0_templates_item_9 : (⟨3, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 5)).Check k9t5p0.graph k9t5p0.clique 9 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p0_part_3 : ∀ T ∈ k9t5p0.templates, T.Check k9t5p0.graph k9t5p0.clique 9 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p0_templates_item_0, k9t5p0_templates_item_1, k9t5p0_templates_item_2, k9t5p0_templates_item_3, k9t5p0_templates_item_4, k9t5p0_templates_item_5, k9t5p0_templates_item_6, k9t5p0_templates_item_7, k9t5p0_templates_item_8, k9t5p0_templates_item_9⟩ + +private theorem k9t5p0_part_4 : ∀ p ∈ k9t5p0.required, p.Check k9t5p0.graph 9 := by decide + +private theorem k9t5p0_part_5 : ClosureCheck k9t5p0.graph (k9t5p0.initialMatrix 9) 9 5 k9t5p0.closure := by + rw [k9t5p0_initial_eq] + exact k9t5p0_closure_0 + +private theorem k9t5p0_part_6 : k9t5p0.bad.Check k9t5p0.graph (k9t5p0.matrix 9) 9 5 := by + rw [k9t5p0_matrix_eq] + decide + +theorem k9t5p0_check : k9t5p0.Check 9 5 [[], [], [], [], []] := + ⟨k9t5p0_part_0, k9t5p0_part_1, k9t5p0_part_2, k9t5p0_part_3, k9t5p0_part_4, k9t5p0_part_5, k9t5p0_part_6⟩ +def k9t5p1 : LayoutCertificate 6 where + chains := [[0], [1], [2], [3, 4, 5]] + clique := {0, 1, 2, 3, 5} + templates := [⟨0, 1, [], [], [], 2, 8⟩, + ⟨0, 1, [[3, 4, 5]], [], [], 1, 5⟩, + ⟨0, 2, [], [], [], 2, 8⟩, + ⟨0, 2, [[3, 4, 5]], [], [], 1, 5⟩, + ⟨0, 3, [], [], [], 2, 8⟩, + ⟨0, 3, [], [], [4, 5], 1, 6⟩, + ⟨0, 4, [], [], [3], 1, 7⟩, + ⟨0, 5, [], [], [], 2, 8⟩, + ⟨0, 5, [], [], [4, 3], 1, 6⟩, + ⟨1, 2, [], [], [], 2, 8⟩, + ⟨1, 2, [[3, 4, 5]], [], [], 1, 5⟩, + ⟨1, 3, [], [], [], 2, 8⟩, + ⟨1, 3, [], [], [4, 5], 1, 6⟩, + ⟨1, 4, [], [], [3], 1, 7⟩, + ⟨1, 5, [], [], [], 2, 8⟩, + ⟨1, 5, [], [], [4, 3], 1, 6⟩, + ⟨2, 3, [], [], [], 2, 8⟩, + ⟨2, 3, [], [], [4, 5], 1, 6⟩, + ⟨2, 4, [], [], [3], 1, 7⟩, + ⟨2, 5, [], [], [], 2, 8⟩, + ⟨2, 5, [], [], [4, 3], 1, 6⟩, + ⟨3, 4, [], [], [5], 1, 7⟩, + ⟨4, 5, [], [3], [], 1, 7⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3), (4, 3)}⟩ + + +private def k9t5p1_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p1_initial_eq_row_0 : ∀ j : Fin 6, (k9t5p1.initialMatrix 9) 0 j = k9t5p1_state_0 0 j := by decide + +private theorem k9t5p1_initial_eq_row_1 : ∀ j : Fin 6, (k9t5p1.initialMatrix 9) 1 j = k9t5p1_state_0 1 j := by decide + +private theorem k9t5p1_initial_eq_row_2 : ∀ j : Fin 6, (k9t5p1.initialMatrix 9) 2 j = k9t5p1_state_0 2 j := by decide + +private theorem k9t5p1_initial_eq_row_3 : ∀ j : Fin 6, (k9t5p1.initialMatrix 9) 3 j = k9t5p1_state_0 3 j := by decide + +private theorem k9t5p1_initial_eq_row_4 : ∀ j : Fin 6, (k9t5p1.initialMatrix 9) 4 j = k9t5p1_state_0 4 j := by decide + +private theorem k9t5p1_initial_eq_row_5 : ∀ j : Fin 6, (k9t5p1.initialMatrix 9) 5 j = k9t5p1_state_0 5 j := by decide + +private theorem k9t5p1_initial_eq : (k9t5p1.initialMatrix 9) = k9t5p1_state_0 := by + funext i j + fin_cases i + + · exact k9t5p1_initial_eq_row_0 j + + · exact k9t5p1_initial_eq_row_1 j + + · exact k9t5p1_initial_eq_row_2 j + + · exact k9t5p1_initial_eq_row_3 j + + · exact k9t5p1_initial_eq_row_4 j + + · exact k9t5p1_initial_eq_row_5 j + +private theorem k9t5p1_closure_0 : ClosureCheck k9t5p1.graph k9t5p1_state_0 9 5 [] := by trivial + +private theorem k9t5p1_matrix_eq : k9t5p1.matrix 9 = k9t5p1_state_0 := by + change closureMatrix (k9t5p1.initialMatrix 9) _ = _ + rw [k9t5p1_initial_eq] + change closureMatrix k9t5p1_state_0 [] = _ + rfl + +private theorem k9t5p1_part_0 : k9t5p1.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p1_part_1 : k9t5p1.chains.map List.length = ([[], [], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p1_part_2 : k9t5p1.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p1.clique))) = ([[], [], [], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 8⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_1 : (⟨0, 1, [[3, 4, 5]], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_2 : (⟨0, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_3 : (⟨0, 2, [[3, 4, 5]], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_4 : (⟨0, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_5 : (⟨0, 3, [], [], [4, 5], 1, 6⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_6 : (⟨0, 4, [], [], [3], 1, 7⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_7 : (⟨0, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_8 : (⟨0, 5, [], [], [4, 3], 1, 6⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_9 : (⟨1, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_10 : (⟨1, 2, [[3, 4, 5]], [], [], 1, 5⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_11 : (⟨1, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_12 : (⟨1, 3, [], [], [4, 5], 1, 6⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_13 : (⟨1, 4, [], [], [3], 1, 7⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_14 : (⟨1, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_15 : (⟨1, 5, [], [], [4, 3], 1, 6⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_16 : (⟨2, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_17 : (⟨2, 3, [], [], [4, 5], 1, 6⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_18 : (⟨2, 4, [], [], [3], 1, 7⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_19 : (⟨2, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_20 : (⟨2, 5, [], [], [4, 3], 1, 6⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_21 : (⟨3, 4, [], [], [5], 1, 7⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_templates_item_22 : (⟨4, 5, [], [3], [], 1, 7⟩ : TemplateData (Fin 6)).Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p1_part_3 : ∀ T ∈ k9t5p1.templates, T.Check k9t5p1.graph k9t5p1.clique 9 (patternAmount ([[], [], [], [1]] : List (List ℕ))) (([[], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p1_templates_item_0, k9t5p1_templates_item_1, k9t5p1_templates_item_2, k9t5p1_templates_item_3, k9t5p1_templates_item_4, k9t5p1_templates_item_5, k9t5p1_templates_item_6, k9t5p1_templates_item_7, k9t5p1_templates_item_8, k9t5p1_templates_item_9, k9t5p1_templates_item_10, k9t5p1_templates_item_11, k9t5p1_templates_item_12, k9t5p1_templates_item_13, k9t5p1_templates_item_14, k9t5p1_templates_item_15, k9t5p1_templates_item_16, k9t5p1_templates_item_17, k9t5p1_templates_item_18, k9t5p1_templates_item_19, k9t5p1_templates_item_20, k9t5p1_templates_item_21, k9t5p1_templates_item_22⟩ + +private theorem k9t5p1_part_4 : ∀ p ∈ k9t5p1.required, p.Check k9t5p1.graph 9 := by decide + +private theorem k9t5p1_part_5 : ClosureCheck k9t5p1.graph (k9t5p1.initialMatrix 9) 9 5 k9t5p1.closure := by + rw [k9t5p1_initial_eq] + exact k9t5p1_closure_0 + +private theorem k9t5p1_part_6 : k9t5p1.bad.Check k9t5p1.graph (k9t5p1.matrix 9) 9 5 := by + rw [k9t5p1_matrix_eq] + decide + +theorem k9t5p1_check : k9t5p1.Check 9 5 [[], [], [], [1]] := + ⟨k9t5p1_part_0, k9t5p1_part_1, k9t5p1_part_2, k9t5p1_part_3, k9t5p1_part_4, k9t5p1_part_5, k9t5p1_part_6⟩ +def k9t5p2 : LayoutCertificate 7 where + chains := [[0], [1], [2], [3, 4, 5, 6]] + clique := {0, 1, 2, 3, 6} + templates := [⟨0, 1, [], [], [], 3, 8⟩, + ⟨0, 1, [[3, 4, 5, 6]], [], [], 1, 4⟩, + ⟨0, 2, [], [], [], 3, 8⟩, + ⟨0, 2, [[3, 4, 5, 6]], [], [], 1, 4⟩, + ⟨0, 3, [], [], [4, 5, 6], 1, 5⟩, + ⟨0, 4, [], [], [3], 2, 7⟩, + ⟨0, 4, [], [], [5, 6], 1, 6⟩, + ⟨0, 5, [], [], [4, 3], 1, 6⟩, + ⟨0, 6, [], [], [5, 4, 3], 1, 5⟩, + ⟨1, 2, [], [], [], 3, 8⟩, + ⟨1, 2, [[3, 4, 5, 6]], [], [], 1, 4⟩, + ⟨1, 3, [], [], [4, 5, 6], 1, 5⟩, + ⟨1, 4, [], [], [3], 2, 7⟩, + ⟨1, 4, [], [], [5, 6], 1, 6⟩, + ⟨1, 5, [], [], [4, 3], 1, 6⟩, + ⟨1, 6, [], [], [5, 4, 3], 1, 5⟩, + ⟨2, 3, [], [], [4, 5, 6], 1, 5⟩, + ⟨2, 4, [], [], [3], 2, 7⟩, + ⟨2, 4, [], [], [5, 6], 1, 6⟩, + ⟨2, 5, [], [], [4, 3], 1, 6⟩, + ⟨2, 6, [], [], [5, 4, 3], 1, 5⟩, + ⟨3, 4, [], [], [5, 6], 1, 6⟩, + ⟨4, 5, [], [3], [6], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3), (4, 3)}⟩ + + +private def k9t5p2_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p2_initial_eq_row_0 : ∀ j : Fin 7, (k9t5p2.initialMatrix 9) 0 j = k9t5p2_state_0 0 j := by decide + +private theorem k9t5p2_initial_eq_row_1 : ∀ j : Fin 7, (k9t5p2.initialMatrix 9) 1 j = k9t5p2_state_0 1 j := by decide + +private theorem k9t5p2_initial_eq_row_2 : ∀ j : Fin 7, (k9t5p2.initialMatrix 9) 2 j = k9t5p2_state_0 2 j := by decide + +private theorem k9t5p2_initial_eq_row_3 : ∀ j : Fin 7, (k9t5p2.initialMatrix 9) 3 j = k9t5p2_state_0 3 j := by decide + +private theorem k9t5p2_initial_eq_row_4 : ∀ j : Fin 7, (k9t5p2.initialMatrix 9) 4 j = k9t5p2_state_0 4 j := by decide + +private theorem k9t5p2_initial_eq_row_5 : ∀ j : Fin 7, (k9t5p2.initialMatrix 9) 5 j = k9t5p2_state_0 5 j := by decide + +private theorem k9t5p2_initial_eq_row_6 : ∀ j : Fin 7, (k9t5p2.initialMatrix 9) 6 j = k9t5p2_state_0 6 j := by decide + +private theorem k9t5p2_initial_eq : (k9t5p2.initialMatrix 9) = k9t5p2_state_0 := by + funext i j + fin_cases i + + · exact k9t5p2_initial_eq_row_0 j + + · exact k9t5p2_initial_eq_row_1 j + + · exact k9t5p2_initial_eq_row_2 j + + · exact k9t5p2_initial_eq_row_3 j + + · exact k9t5p2_initial_eq_row_4 j + + · exact k9t5p2_initial_eq_row_5 j + + · exact k9t5p2_initial_eq_row_6 j + +private theorem k9t5p2_closure_0 : ClosureCheck k9t5p2.graph k9t5p2_state_0 9 5 [] := by trivial + +private theorem k9t5p2_matrix_eq : k9t5p2.matrix 9 = k9t5p2_state_0 := by + change closureMatrix (k9t5p2.initialMatrix 9) _ = _ + rw [k9t5p2_initial_eq] + change closureMatrix k9t5p2_state_0 [] = _ + rfl + +private theorem k9t5p2_part_0 : k9t5p2.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p2_part_1 : k9t5p2.chains.map List.length = ([[], [], [], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p2_part_2 : k9t5p2.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p2.clique))) = ([[], [], [], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p2_templates_item_0 : (⟨0, 1, [], [], [], 3, 8⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6]], [], [], 1, 4⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_2 : (⟨0, 2, [], [], [], 3, 8⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_3 : (⟨0, 2, [[3, 4, 5, 6]], [], [], 1, 4⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_4 : (⟨0, 3, [], [], [4, 5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_5 : (⟨0, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_6 : (⟨0, 4, [], [], [5, 6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_7 : (⟨0, 5, [], [], [4, 3], 1, 6⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_8 : (⟨0, 6, [], [], [5, 4, 3], 1, 5⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_9 : (⟨1, 2, [], [], [], 3, 8⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_10 : (⟨1, 2, [[3, 4, 5, 6]], [], [], 1, 4⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_11 : (⟨1, 3, [], [], [4, 5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_12 : (⟨1, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_13 : (⟨1, 4, [], [], [5, 6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_14 : (⟨1, 5, [], [], [4, 3], 1, 6⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_15 : (⟨1, 6, [], [], [5, 4, 3], 1, 5⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_16 : (⟨2, 3, [], [], [4, 5, 6], 1, 5⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_17 : (⟨2, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_18 : (⟨2, 4, [], [], [5, 6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_19 : (⟨2, 5, [], [], [4, 3], 1, 6⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_20 : (⟨2, 6, [], [], [5, 4, 3], 1, 5⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_21 : (⟨3, 4, [], [], [5, 6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_templates_item_22 : (⟨4, 5, [], [3], [6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p2_part_3 : ∀ T ∈ k9t5p2.templates, T.Check k9t5p2.graph k9t5p2.clique 9 (patternAmount ([[], [], [], [2]] : List (List ℕ))) (([[], [], [], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p2_templates_item_0, k9t5p2_templates_item_1, k9t5p2_templates_item_2, k9t5p2_templates_item_3, k9t5p2_templates_item_4, k9t5p2_templates_item_5, k9t5p2_templates_item_6, k9t5p2_templates_item_7, k9t5p2_templates_item_8, k9t5p2_templates_item_9, k9t5p2_templates_item_10, k9t5p2_templates_item_11, k9t5p2_templates_item_12, k9t5p2_templates_item_13, k9t5p2_templates_item_14, k9t5p2_templates_item_15, k9t5p2_templates_item_16, k9t5p2_templates_item_17, k9t5p2_templates_item_18, k9t5p2_templates_item_19, k9t5p2_templates_item_20, k9t5p2_templates_item_21, k9t5p2_templates_item_22⟩ + +private theorem k9t5p2_part_4 : ∀ p ∈ k9t5p2.required, p.Check k9t5p2.graph 9 := by decide + +private theorem k9t5p2_part_5 : ClosureCheck k9t5p2.graph (k9t5p2.initialMatrix 9) 9 5 k9t5p2.closure := by + rw [k9t5p2_initial_eq] + exact k9t5p2_closure_0 + +private theorem k9t5p2_part_6 : k9t5p2.bad.Check k9t5p2.graph (k9t5p2.matrix 9) 9 5 := by + rw [k9t5p2_matrix_eq] + decide + +theorem k9t5p2_check : k9t5p2.Check 9 5 [[], [], [], [2]] := + ⟨k9t5p2_part_0, k9t5p2_part_1, k9t5p2_part_2, k9t5p2_part_3, k9t5p2_part_4, k9t5p2_part_5, k9t5p2_part_6⟩ +def k9t5p3 : LayoutCertificate 8 where + chains := [[0], [1], [2], [3, 4, 5, 6, 7]] + clique := {0, 1, 2, 3, 7} + templates := [⟨0, 1, [], [], [], 4, 8⟩, + ⟨0, 1, [[3, 4, 5, 6, 7]], [], [], 1, 3⟩, + ⟨0, 2, [], [], [], 4, 8⟩, + ⟨0, 2, [[3, 4, 5, 6, 7]], [], [], 1, 3⟩, + ⟨0, 3, [], [], [4, 5, 6, 7], 1, 4⟩, + ⟨0, 4, [], [], [3], 3, 7⟩, + ⟨0, 4, [], [], [5, 6, 7], 1, 5⟩, + ⟨0, 6, [], [], [5, 4, 3], 1, 5⟩, + ⟨0, 7, [], [], [6, 5, 4, 3], 1, 4⟩, + ⟨1, 2, [], [], [], 4, 8⟩, + ⟨1, 2, [[3, 4, 5, 6, 7]], [], [], 1, 3⟩, + ⟨1, 3, [], [], [4, 5, 6, 7], 1, 4⟩, + ⟨1, 4, [], [], [3], 3, 7⟩, + ⟨1, 4, [], [], [5, 6, 7], 1, 5⟩, + ⟨1, 6, [], [], [5, 4, 3], 1, 5⟩, + ⟨1, 7, [], [], [6, 5, 4, 3], 1, 4⟩, + ⟨2, 3, [], [], [4, 5, 6, 7], 1, 4⟩, + ⟨2, 4, [], [], [3], 3, 7⟩, + ⟨2, 4, [], [], [5, 6, 7], 1, 5⟩, + ⟨2, 6, [], [], [5, 4, 3], 1, 5⟩, + ⟨2, 7, [], [], [6, 5, 4, 3], 1, 4⟩, + ⟨3, 4, [], [], [5, 6, 7], 1, 5⟩, + ⟨4, 5, [], [3], [6, 7], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3), (4, 3)}⟩ + + +private def k9t5p3_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 4, Finset.Icc 1 7, ∅, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 4, Finset.Icc 1 7, ∅, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 4, Finset.Icc 1 7, ∅, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p3_initial_eq_row_0 : ∀ j : Fin 8, (k9t5p3.initialMatrix 9) 0 j = k9t5p3_state_0 0 j := by decide + +private theorem k9t5p3_initial_eq_row_1 : ∀ j : Fin 8, (k9t5p3.initialMatrix 9) 1 j = k9t5p3_state_0 1 j := by decide + +private theorem k9t5p3_initial_eq_row_2 : ∀ j : Fin 8, (k9t5p3.initialMatrix 9) 2 j = k9t5p3_state_0 2 j := by decide + +private theorem k9t5p3_initial_eq_row_3 : ∀ j : Fin 8, (k9t5p3.initialMatrix 9) 3 j = k9t5p3_state_0 3 j := by decide + +private theorem k9t5p3_initial_eq_row_4 : ∀ j : Fin 8, (k9t5p3.initialMatrix 9) 4 j = k9t5p3_state_0 4 j := by decide + +private theorem k9t5p3_initial_eq_row_5 : ∀ j : Fin 8, (k9t5p3.initialMatrix 9) 5 j = k9t5p3_state_0 5 j := by decide + +private theorem k9t5p3_initial_eq_row_6 : ∀ j : Fin 8, (k9t5p3.initialMatrix 9) 6 j = k9t5p3_state_0 6 j := by decide + +private theorem k9t5p3_initial_eq_row_7 : ∀ j : Fin 8, (k9t5p3.initialMatrix 9) 7 j = k9t5p3_state_0 7 j := by decide + +private theorem k9t5p3_initial_eq : (k9t5p3.initialMatrix 9) = k9t5p3_state_0 := by + funext i j + fin_cases i + + · exact k9t5p3_initial_eq_row_0 j + + · exact k9t5p3_initial_eq_row_1 j + + · exact k9t5p3_initial_eq_row_2 j + + · exact k9t5p3_initial_eq_row_3 j + + · exact k9t5p3_initial_eq_row_4 j + + · exact k9t5p3_initial_eq_row_5 j + + · exact k9t5p3_initial_eq_row_6 j + + · exact k9t5p3_initial_eq_row_7 j + +private theorem k9t5p3_closure_0 : ClosureCheck k9t5p3.graph k9t5p3_state_0 9 5 [] := by trivial + +private theorem k9t5p3_matrix_eq : k9t5p3.matrix 9 = k9t5p3_state_0 := by + change closureMatrix (k9t5p3.initialMatrix 9) _ = _ + rw [k9t5p3_initial_eq] + change closureMatrix k9t5p3_state_0 [] = _ + rfl + +private theorem k9t5p3_part_0 : k9t5p3.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p3_part_1 : k9t5p3.chains.map List.length = ([[], [], [], [3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p3_part_2 : k9t5p3.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p3.clique))) = ([[], [], [], [3]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p3_templates_item_0 : (⟨0, 1, [], [], [], 4, 8⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6, 7]], [], [], 1, 3⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_2 : (⟨0, 2, [], [], [], 4, 8⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_3 : (⟨0, 2, [[3, 4, 5, 6, 7]], [], [], 1, 3⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_4 : (⟨0, 3, [], [], [4, 5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_5 : (⟨0, 4, [], [], [3], 3, 7⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_6 : (⟨0, 4, [], [], [5, 6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_7 : (⟨0, 6, [], [], [5, 4, 3], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_8 : (⟨0, 7, [], [], [6, 5, 4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_9 : (⟨1, 2, [], [], [], 4, 8⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_10 : (⟨1, 2, [[3, 4, 5, 6, 7]], [], [], 1, 3⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_11 : (⟨1, 3, [], [], [4, 5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_12 : (⟨1, 4, [], [], [3], 3, 7⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_13 : (⟨1, 4, [], [], [5, 6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_14 : (⟨1, 6, [], [], [5, 4, 3], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_15 : (⟨1, 7, [], [], [6, 5, 4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_16 : (⟨2, 3, [], [], [4, 5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_17 : (⟨2, 4, [], [], [3], 3, 7⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_18 : (⟨2, 4, [], [], [5, 6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_19 : (⟨2, 6, [], [], [5, 4, 3], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_20 : (⟨2, 7, [], [], [6, 5, 4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_21 : (⟨3, 4, [], [], [5, 6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_templates_item_22 : (⟨4, 5, [], [3], [6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p3_part_3 : ∀ T ∈ k9t5p3.templates, T.Check k9t5p3.graph k9t5p3.clique 9 (patternAmount ([[], [], [], [3]] : List (List ℕ))) (([[], [], [], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p3_templates_item_0, k9t5p3_templates_item_1, k9t5p3_templates_item_2, k9t5p3_templates_item_3, k9t5p3_templates_item_4, k9t5p3_templates_item_5, k9t5p3_templates_item_6, k9t5p3_templates_item_7, k9t5p3_templates_item_8, k9t5p3_templates_item_9, k9t5p3_templates_item_10, k9t5p3_templates_item_11, k9t5p3_templates_item_12, k9t5p3_templates_item_13, k9t5p3_templates_item_14, k9t5p3_templates_item_15, k9t5p3_templates_item_16, k9t5p3_templates_item_17, k9t5p3_templates_item_18, k9t5p3_templates_item_19, k9t5p3_templates_item_20, k9t5p3_templates_item_21, k9t5p3_templates_item_22⟩ + +private theorem k9t5p3_part_4 : ∀ p ∈ k9t5p3.required, p.Check k9t5p3.graph 9 := by decide + +private theorem k9t5p3_part_5 : ClosureCheck k9t5p3.graph (k9t5p3.initialMatrix 9) 9 5 k9t5p3.closure := by + rw [k9t5p3_initial_eq] + exact k9t5p3_closure_0 + +private theorem k9t5p3_part_6 : k9t5p3.bad.Check k9t5p3.graph (k9t5p3.matrix 9) 9 5 := by + rw [k9t5p3_matrix_eq] + decide + +theorem k9t5p3_check : k9t5p3.Check 9 5 [[], [], [], [3]] := + ⟨k9t5p3_part_0, k9t5p3_part_1, k9t5p3_part_2, k9t5p3_part_3, k9t5p3_part_4, k9t5p3_part_5, k9t5p3_part_6⟩ +private def k9t5p4_step_0_data : EdgeAttachmentData 9 := ⟨4, 0, [⟨0, 5, [4, 3, 1, 2, 8, 7, 6]⟩, ⟨0, 1, [4, 3, 2, 8]⟩, ⟨0, 1, [4, 5, 6, 7, 8]⟩, ⟨1, 5, [0, 4, 3, 2, 8, 7, 6]⟩, ⟨5, 2, [6, 7, 8, 0, 4, 3, 1]⟩, ⟨5, 1, [6, 7, 8, 0, 4, 3, 2]⟩, ⟨5, 3, [6, 7, 8, 1, 2, 0, 4]⟩, ⟨5, 0, [6, 7, 8, 1, 2, 3, 4]⟩], ⟨none, {(0, 3), (1, 3), (5, 3), (3, 0)}⟩⟩ + +private def k9t5p4_step_0 : ClosureStep 9 := .edge k9t5p4_step_0_data + +private def k9t5p4_step_1_data : EdgeAttachmentData 9 := ⟨4, 1, [⟨0, 5, [1, 4, 3, 2, 8, 7, 6]⟩, ⟨1, 5, [4, 3, 0, 2, 8, 7, 6]⟩, ⟨1, 0, [4, 3, 2, 8]⟩, ⟨1, 0, [4, 5, 6, 7, 8]⟩, ⟨5, 2, [6, 7, 8, 0, 1, 4, 3]⟩, ⟨5, 3, [6, 7, 8, 0, 2, 1, 4]⟩, ⟨5, 1, [6, 7, 8, 0, 2, 3, 4]⟩, ⟨5, 0, [6, 7, 8, 1, 4, 3, 2]⟩], ⟨none, {(1, 3), (0, 3), (5, 3), (3, 0)}⟩⟩ + +private def k9t5p4_step_1 : ClosureStep 9 := .edge k9t5p4_step_1_data + +private def k9t5p4_step_2_data : EdgeAttachmentData 9 := ⟨4, 2, [⟨0, 5, [1, 2, 4, 3, 8, 7, 6]⟩, ⟨2, 5, [4, 3, 0, 1, 8, 7, 6]⟩, ⟨2, 0, [4, 3, 1, 8]⟩, ⟨2, 0, [4, 5, 6, 7, 8]⟩, ⟨5, 3, [6, 7, 8, 0, 1, 2, 4]⟩, ⟨5, 2, [6, 7, 8, 0, 1, 3, 4]⟩, ⟨5, 1, [6, 7, 8, 0, 2, 4, 3]⟩, ⟨5, 0, [6, 7, 8, 1, 2, 4, 3]⟩], ⟨none, {(2, 3), (0, 3), (5, 3), (3, 0)}⟩⟩ + +private def k9t5p4_step_2 : ClosureStep 9 := .edge k9t5p4_step_2_data + +private def k9t5p4_step_3_data : EdgeAttachmentData 9 := ⟨5, 0, [⟨0, 2, [5, 4, 3, 1]⟩, ⟨0, 6, [5, 4, 3, 1, 2, 8, 7]⟩, ⟨0, 2, [5, 4, 3, 1, 8]⟩, ⟨0, 1, [5, 4, 3, 2]⟩, ⟨0, 1, [5, 4, 3, 2, 8]⟩, ⟨1, 2, [0, 5, 4, 3]⟩, ⟨1, 6, [0, 5, 4, 3, 2, 8, 7]⟩, ⟨1, 2, [0, 5, 4, 3, 8]⟩, ⟨2, 6, [0, 5, 4, 3, 1, 8, 7]⟩, ⟨4, 8, [3, 1, 0, 5, 6, 7]⟩, ⟨4, 8, [3, 1, 2, 0, 5, 6, 7]⟩, ⟨4, 7, [3, 1, 8, 0, 5, 6]⟩, ⟨4, 7, [3, 1, 8, 2, 0, 5, 6]⟩, ⟨4, 6, [5, 0, 1, 2, 3, 8, 7]⟩], ⟨none, {(0, 3), (1, 3), (2, 3), (4, 3)}⟩⟩ + +private def k9t5p4_step_3 : ClosureStep 9 := .edge k9t5p4_step_3_data + +private def k9t5p4_step_4_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [2, 3, 4, 9, 8, 7, 6]⟩, ⟨1, 0, [2, 9, 3, 4, 5, 6]⟩, ⟨1, 7, [0, 6, 5, 4, 2, 3, 9, 8]⟩, ⟨1, 7, [0, 6, 5, 4, 2, 9, 8]⟩, ⟨1, 5, [0, 6, 7, 8, 9, 2, 3, 4]⟩, ⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 9, 8, 7, 6]⟩, ⟨5, 3, [4, 1, 0, 6, 7, 8, 9, 2]⟩, ⟨5, 2, [4, 1, 0, 6, 7, 8, 9, 3]⟩, ⟨5, 9, [4, 2, 1, 0, 6, 7, 8]⟩, ⟨5, 9, [4, 2, 3, 1, 0, 6, 7, 8]⟩] + +private def k9t5p4_step_4_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨5, 1, [4, 2, 3, 9, 8, 7, 6, 0]⟩, ⟨5, 0, [4, 2, 9, 1]⟩, ⟨5, 8, [4, 2, 9, 1, 0, 6, 7]⟩, ⟨5, 0, [4, 2, 9, 3, 1]⟩, ⟨5, 7, [4, 2, 9, 3, 1, 0, 6]⟩, ⟨5, 8, [4, 2, 9, 3, 1, 0, 6, 7]⟩, ⟨5, 7, [6, 0, 1, 2, 3, 4, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 2, 9, 3, 1]⟩, ⟨7, 5, [6, 0, 1, 2, 9, 3, 4]⟩, ⟨7, 0, [8, 9, 1, 2, 3, 4, 5, 6]⟩, ⟨7, 2, [8, 9, 1, 0, 6, 5, 4]⟩, ⟨7, 3, [8, 9, 1, 0, 6, 5, 4, 2]⟩] + +private def k9t5p4_step_4_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨7, 3, [8, 9, 1, 0, 6, 5, 4]⟩, ⟨7, 2, [8, 9, 1, 0, 6, 5, 4, 3]⟩, ⟨7, 4, [8, 9, 2, 1, 0, 6, 5]⟩, ⟨7, 4, [8, 9, 2, 3, 1, 0, 6, 5]⟩, ⟨7, 5, [8, 9, 2, 3, 4, 1, 0, 6]⟩, ⟨7, 1, [8, 9, 2, 3, 4, 5, 6, 0]⟩, ⟨7, 1, [8, 9, 2, 4, 5, 6, 0]⟩, ⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 6, [1, 2, 3, 4, 9, 8, 7]⟩, ⟨0, 5, [1, 2, 3, 4, 9, 8, 7, 6]⟩, ⟨0, 7, [1, 2, 3, 9, 8]⟩, ⟨0, 5, [1, 2, 3, 9, 8, 7, 6]⟩] + +private def k9t5p4_step_4_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 4, [1, 2, 3, 9, 8, 7, 6, 5]⟩, ⟨0, 9, [1, 2, 4, 5, 6, 7, 8]⟩, ⟨0, 7, [1, 2, 9, 3, 4, 5, 6]⟩, ⟨0, 8, [1, 2, 9, 3, 4, 5, 6, 7]⟩, ⟨0, 7, [1, 2, 9, 4, 5, 6]⟩, ⟨0, 8, [1, 2, 9, 4, 5, 6, 7]⟩, ⟨0, 7, [1, 2, 9, 8]⟩, ⟨0, 4, [1, 2, 9, 8, 7, 6, 5]⟩, ⟨0, 3, [1, 2, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 2, [1, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 2, [1, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 3, [1, 4, 5, 6, 7, 8, 9]⟩] + +private def k9t5p4_step_4_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 1, [6, 5, 4]⟩, ⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩, ⟨0, 1, [6, 5, 4, 2]⟩, ⟨0, 1, [6, 5, 4, 2, 9]⟩, ⟨0, 1, [6, 5, 4, 2, 9, 3]⟩, ⟨0, 1, [6, 7, 8, 9, 2, 3, 4]⟩] + +private def k9t5p4_step_4_data : FreshAttachmentData 9 := ⟨5, 0, k9t5p4_step_4_required_block_0 ++ k9t5p4_step_4_required_block_1 ++ k9t5p4_step_4_required_block_2 ++ k9t5p4_step_4_required_block_3 ++ k9t5p4_step_4_required_block_4, ⟨none, {(5, 2), (0, 2), (1, 3), (7, 2)}⟩⟩ + +private def k9t5p4_step_4 : ClosureStep 9 := .fresh k9t5p4_step_4_data + +private def k9t5p4_step_5_data : EdgeAttachmentData 9 := ⟨5, 1, [⟨0, 2, [1, 5, 4, 3]⟩, ⟨0, 6, [1, 5, 4, 3, 2, 8, 7]⟩, ⟨0, 2, [8, 1, 5, 4, 3]⟩, ⟨0, 1, [8, 2, 3, 4, 5]⟩, ⟨0, 1, [8, 3, 4, 5]⟩, ⟨1, 2, [5, 4, 3, 0]⟩, ⟨1, 6, [5, 4, 3, 0, 2, 8, 7]⟩, ⟨1, 2, [5, 4, 3, 0, 8]⟩, ⟨2, 6, [0, 1, 5, 4, 3, 8, 7]⟩, ⟨4, 8, [3, 0, 1, 5, 6, 7]⟩, ⟨4, 8, [3, 0, 2, 1, 5, 6, 7]⟩, ⟨4, 7, [3, 0, 8, 1, 5, 6]⟩, ⟨4, 7, [3, 0, 8, 2, 1, 5, 6]⟩, ⟨4, 6, [5, 1, 0, 2, 3, 8, 7]⟩], ⟨none, {(0, 3), (1, 3), (2, 3), (4, 3)}⟩⟩ + +private def k9t5p4_step_5 : ClosureStep 9 := .edge k9t5p4_step_5_data + +private def k9t5p4_step_6_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨2, 0, [1, 3, 4, 9, 8, 7, 6]⟩, ⟨2, 0, [1, 9, 3, 4, 5, 6]⟩, ⟨2, 7, [0, 6, 5, 4, 1, 3, 9, 8]⟩, ⟨2, 7, [0, 6, 5, 4, 1, 9, 8]⟩, ⟨2, 5, [0, 6, 7, 8, 9, 1, 3, 4]⟩, ⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩, ⟨5, 9, [4, 1, 2, 0, 6, 7, 8]⟩, ⟨5, 9, [4, 1, 3, 2, 0, 6, 7, 8]⟩, ⟨5, 2, [4, 1, 3, 9, 8, 7, 6, 0]⟩, ⟨5, 0, [4, 1, 9, 2]⟩, ⟨5, 8, [4, 1, 9, 2, 0, 6, 7]⟩] + +private def k9t5p4_step_6_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨5, 0, [4, 1, 9, 3, 2]⟩, ⟨5, 7, [4, 1, 9, 3, 2, 0, 6]⟩, ⟨5, 8, [4, 1, 9, 3, 2, 0, 6, 7]⟩, ⟨5, 0, [4, 1, 9, 8, 7, 6]⟩, ⟨5, 3, [4, 1, 9, 8, 7, 6, 0, 2]⟩, ⟨5, 1, [4, 2, 0, 6, 7, 8, 9, 3]⟩, ⟨5, 7, [6, 0, 2, 1, 3, 4, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 9, 3, 2]⟩, ⟨7, 5, [6, 0, 2, 1, 9, 3, 4]⟩, ⟨7, 0, [8, 9, 1, 2, 3, 4, 5, 6]⟩, ⟨7, 4, [8, 9, 1, 2, 0, 6, 5]⟩, ⟨7, 3, [8, 9, 1, 2, 0, 6, 5, 4]⟩] + +private def k9t5p4_step_6_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨7, 4, [8, 9, 1, 3, 2, 0, 6, 5]⟩, ⟨7, 5, [8, 9, 1, 3, 4, 2, 0, 6]⟩, ⟨7, 2, [8, 9, 1, 3, 4, 5, 6, 0]⟩, ⟨7, 2, [8, 9, 1, 4, 5, 6, 0]⟩, ⟨7, 1, [8, 9, 2, 0, 6, 5, 4]⟩, ⟨7, 3, [8, 9, 2, 0, 6, 5, 4]⟩, ⟨7, 1, [8, 9, 2, 0, 6, 5, 4, 3]⟩, ⟨0, 9, [2, 1, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 6, [2, 1, 3, 4, 9, 8, 7]⟩, ⟨0, 5, [2, 1, 3, 4, 9, 8, 7, 6]⟩, ⟨0, 7, [2, 1, 3, 9, 8]⟩, ⟨0, 5, [2, 1, 3, 9, 8, 7, 6]⟩] + +private def k9t5p4_step_6_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 4, [2, 1, 3, 9, 8, 7, 6, 5]⟩, ⟨0, 9, [2, 1, 4, 5, 6, 7, 8]⟩, ⟨0, 7, [2, 1, 9, 3, 4, 5, 6]⟩, ⟨0, 8, [2, 1, 9, 3, 4, 5, 6, 7]⟩, ⟨0, 7, [2, 1, 9, 4, 5, 6]⟩, ⟨0, 8, [2, 1, 9, 4, 5, 6, 7]⟩, ⟨0, 7, [2, 1, 9, 8]⟩, ⟨0, 4, [2, 1, 9, 8, 7, 6, 5]⟩, ⟨0, 3, [2, 1, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 1, [2, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 1, [2, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 3, [2, 4, 5, 6, 7, 8, 9]⟩] + +private def k9t5p4_step_6_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 2, [6, 5, 4, 1]⟩, ⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩, ⟨0, 2, [6, 5, 4, 1, 9]⟩, ⟨0, 2, [6, 5, 4, 1, 9, 3]⟩, ⟨0, 2, [6, 5, 4]⟩, ⟨0, 2, [6, 7, 8, 9, 1, 3, 4]⟩] + +private def k9t5p4_step_6_data : FreshAttachmentData 9 := ⟨5, 1, k9t5p4_step_6_required_block_0 ++ k9t5p4_step_6_required_block_1 ++ k9t5p4_step_6_required_block_2 ++ k9t5p4_step_6_required_block_3 ++ k9t5p4_step_6_required_block_4, ⟨none, {(5, 2), (0, 2), (2, 3), (7, 2)}⟩⟩ + +private def k9t5p4_step_6 : ClosureStep 9 := .fresh k9t5p4_step_6_data + +private def k9t5p4_step_7_data : EdgeAttachmentData 9 := ⟨5, 2, [⟨0, 6, [1, 2, 5, 4, 3, 8, 7]⟩, ⟨0, 1, [2, 5, 4, 3]⟩, ⟨0, 2, [8, 1, 3, 4, 5]⟩, ⟨0, 1, [8, 2, 5, 4, 3]⟩, ⟨0, 2, [8, 3, 4, 5]⟩, ⟨1, 6, [0, 2, 5, 4, 3, 8, 7]⟩, ⟨1, 2, [0, 3, 4, 5]⟩, ⟨1, 2, [0, 8, 3, 4, 5]⟩, ⟨2, 6, [5, 4, 3, 0, 1, 8, 7]⟩, ⟨4, 8, [3, 0, 1, 2, 5, 6, 7]⟩, ⟨4, 8, [3, 0, 2, 5, 6, 7]⟩, ⟨4, 7, [3, 0, 8, 1, 2, 5, 6]⟩, ⟨4, 7, [3, 0, 8, 2, 5, 6]⟩, ⟨4, 6, [5, 2, 0, 1, 3, 8, 7]⟩], ⟨none, {(0, 3), (1, 3), (2, 3), (4, 3)}⟩⟩ + +private def k9t5p4_step_7 : ClosureStep 9 := .edge k9t5p4_step_7_data + +private def k9t5p4_step_8_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨3, 0, [1, 2, 4, 9, 8, 7, 6]⟩, ⟨3, 0, [1, 9, 2, 4, 5, 6]⟩, ⟨3, 7, [0, 6, 5, 4, 1, 2, 9, 8]⟩, ⟨3, 7, [0, 6, 5, 4, 1, 9, 8]⟩, ⟨3, 5, [0, 6, 7, 8, 9, 1, 2, 4]⟩, ⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩, ⟨5, 9, [4, 1, 2, 3, 0, 6, 7, 8]⟩, ⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩, ⟨5, 3, [4, 1, 2, 9, 8, 7, 6, 0]⟩, ⟨5, 9, [4, 1, 3, 0, 6, 7, 8]⟩, ⟨5, 0, [4, 1, 9, 2, 3]⟩, ⟨5, 7, [4, 1, 9, 2, 3, 0, 6]⟩] + +private def k9t5p4_step_8_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨5, 8, [4, 1, 9, 2, 3, 0, 6, 7]⟩, ⟨5, 0, [4, 1, 9, 3]⟩, ⟨5, 8, [4, 1, 9, 3, 0, 6, 7]⟩, ⟨5, 0, [4, 1, 9, 8, 7, 6]⟩, ⟨5, 2, [4, 1, 9, 8, 7, 6, 0, 3]⟩, ⟨5, 1, [4, 2, 9, 8, 7, 6, 0, 3]⟩, ⟨5, 7, [6, 0, 3, 1, 2, 4, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 9, 2, 3]⟩, ⟨7, 5, [6, 0, 3, 1, 9, 2, 4]⟩, ⟨7, 0, [8, 9, 1, 2, 3, 4, 5, 6]⟩, ⟨7, 4, [8, 9, 1, 2, 3, 0, 6, 5]⟩, ⟨7, 5, [8, 9, 1, 2, 4, 3, 0, 6]⟩] + +private def k9t5p4_step_8_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨7, 3, [8, 9, 1, 2, 4, 5, 6, 0]⟩, ⟨7, 4, [8, 9, 1, 3, 0, 6, 5]⟩, ⟨7, 2, [8, 9, 1, 3, 0, 6, 5, 4]⟩, ⟨7, 3, [8, 9, 1, 4, 5, 6, 0]⟩, ⟨7, 1, [8, 9, 2, 3, 0, 6, 5, 4]⟩, ⟨7, 1, [8, 9, 3, 0, 6, 5, 4]⟩, ⟨7, 2, [8, 9, 3, 0, 6, 5, 4]⟩, ⟨0, 9, [3, 1, 2, 4, 5, 6, 7, 8]⟩, ⟨0, 6, [3, 1, 2, 4, 9, 8, 7]⟩, ⟨0, 5, [3, 1, 2, 4, 9, 8, 7, 6]⟩, ⟨0, 7, [3, 1, 2, 9, 8]⟩, ⟨0, 5, [3, 1, 2, 9, 8, 7, 6]⟩] + +private def k9t5p4_step_8_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 4, [3, 1, 2, 9, 8, 7, 6, 5]⟩, ⟨0, 9, [3, 1, 4, 5, 6, 7, 8]⟩, ⟨0, 7, [3, 1, 9, 2, 4, 5, 6]⟩, ⟨0, 8, [3, 1, 9, 2, 4, 5, 6, 7]⟩, ⟨0, 7, [3, 1, 9, 4, 5, 6]⟩, ⟨0, 8, [3, 1, 9, 4, 5, 6, 7]⟩, ⟨0, 7, [3, 1, 9, 8]⟩, ⟨0, 4, [3, 1, 9, 8, 7, 6, 5]⟩, ⟨0, 2, [3, 1, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 1, [3, 2, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 1, [3, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 2, [3, 4, 5, 6, 7, 8, 9]⟩] + +private def k9t5p4_step_8_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩, ⟨0, 3, [6, 5, 4, 1]⟩, ⟨0, 3, [6, 5, 4, 1, 9, 2]⟩, ⟨0, 3, [6, 5, 4, 1, 9]⟩, ⟨0, 3, [6, 5, 4]⟩, ⟨0, 3, [6, 7, 8, 9, 1, 2, 4]⟩] + +private def k9t5p4_step_8_data : FreshAttachmentData 9 := ⟨5, 2, k9t5p4_step_8_required_block_0 ++ k9t5p4_step_8_required_block_1 ++ k9t5p4_step_8_required_block_2 ++ k9t5p4_step_8_required_block_3 ++ k9t5p4_step_8_required_block_4, ⟨none, {(5, 2), (0, 2), (3, 3), (7, 2)}⟩⟩ + +private def k9t5p4_step_8 : ClosureStep 9 := .fresh k9t5p4_step_8_data + +private def k9t5p4_step_9_data : EdgeAttachmentData 9 := ⟨6, 0, [⟨0, 1, [6, 5, 4, 3]⟩, ⟨0, 2, [6, 5, 4, 3, 1]⟩, ⟨0, 2, [6, 5, 4, 3]⟩, ⟨0, 1, [6, 5, 4, 3, 2]⟩, ⟨0, 5, [6, 7, 8, 1, 2, 3, 4]⟩, ⟨1, 2, [0, 6, 5, 4, 3]⟩, ⟨1, 2, [0, 6, 7, 8]⟩, ⟨1, 5, [0, 6, 7, 8, 2, 3, 4]⟩, ⟨2, 5, [0, 6, 7, 8, 1, 3, 4]⟩, ⟨7, 5, [6, 0, 1, 8, 2, 3, 4]⟩, ⟨7, 3, [8, 1, 0, 6, 5, 4]⟩, ⟨7, 4, [8, 1, 2, 0, 6, 5]⟩, ⟨7, 3, [8, 1, 2, 0, 6, 5, 4]⟩, ⟨7, 4, [8, 1, 2, 3, 0, 6, 5]⟩], ⟨none, {(0, 3), (1, 3), (2, 3), (7, 3)}⟩⟩ + +private def k9t5p4_step_9 : ClosureStep 9 := .edge k9t5p4_step_9_data + +private def k9t5p4_step_10_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [2, 9, 3, 4, 5, 6, 7]⟩, ⟨1, 0, [2, 9, 4, 5, 6, 7]⟩, ⟨1, 8, [0, 7, 6, 5, 4, 2, 3, 9]⟩, ⟨1, 6, [0, 7, 8, 9, 2, 3, 4, 5]⟩, ⟨1, 6, [0, 7, 8, 9, 2, 4, 5]⟩, ⟨5, 0, [4, 1, 2, 3, 9, 8, 7]⟩, ⟨5, 0, [4, 1, 2, 9, 8, 7]⟩, ⟨5, 9, [4, 2, 1, 0, 7, 8]⟩, ⟨5, 9, [4, 2, 3, 1, 0, 7, 8]⟩, ⟨5, 8, [4, 2, 9, 1, 0, 7]⟩, ⟨5, 8, [4, 2, 9, 3, 1, 0, 7]⟩, ⟨5, 0, [6, 7, 8, 9, 2, 3, 4, 1]⟩] + +private def k9t5p4_step_10_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨5, 8, [6, 7, 0, 1, 2, 3, 4, 9]⟩, ⟨8, 6, [7, 0, 1, 2, 9, 3, 4, 5]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 4, 5, 6, 7]⟩, ⟨8, 3, [9, 1, 0, 7, 6, 5, 4, 2]⟩, ⟨8, 2, [9, 1, 0, 7, 6, 5, 4, 3]⟩, ⟨8, 5, [9, 2, 1, 0, 7, 6]⟩, ⟨8, 4, [9, 2, 1, 0, 7, 6, 5]⟩, ⟨8, 0, [9, 2, 3, 1]⟩, ⟨8, 5, [9, 2, 3, 1, 0, 7, 6]⟩, ⟨8, 4, [9, 2, 3, 1, 0, 7, 6, 5]⟩] + +private def k9t5p4_step_10_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 0, [9, 2, 3, 4, 1]⟩, ⟨8, 6, [9, 2, 3, 4, 1, 0, 7]⟩, ⟨8, 5, [9, 2, 3, 4, 1, 0, 7, 6]⟩, ⟨8, 1, [9, 2, 3, 4, 5, 6, 7, 0]⟩, ⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 6, [1, 2, 3, 4, 9, 8, 7]⟩, ⟨0, 5, [1, 2, 3, 4, 9, 8, 7, 6]⟩, ⟨0, 5, [1, 2, 3, 9, 8, 7, 6]⟩, ⟨0, 4, [1, 2, 3, 9, 8, 7, 6, 5]⟩, ⟨0, 5, [1, 2, 4]⟩, ⟨0, 9, [1, 2, 4, 5, 6, 7, 8]⟩, ⟨0, 5, [1, 2, 9, 3, 4]⟩] + +private def k9t5p4_step_10_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 7, [1, 2, 9, 3, 4, 5, 6]⟩, ⟨0, 8, [1, 2, 9, 3, 4, 5, 6, 7]⟩, ⟨0, 5, [1, 2, 9, 4]⟩, ⟨0, 8, [1, 2, 9, 4, 5, 6, 7]⟩, ⟨0, 5, [1, 2, 9, 8, 7, 6]⟩, ⟨0, 4, [1, 2, 9, 8, 7, 6, 5]⟩, ⟨0, 3, [1, 2, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 2, [1, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 2, [1, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 3, [1, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 1, [7, 6, 5, 4]⟩, ⟨0, 1, [7, 6, 5, 4, 2]⟩] + +private def k9t5p4_step_10_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 1, [7, 6, 5, 4, 2, 9]⟩, ⟨0, 1, [7, 6, 5, 4, 2, 9, 3]⟩, ⟨0, 1, [7, 8, 9]⟩, ⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩] + +private def k9t5p4_step_10_data : FreshAttachmentData 9 := ⟨6, 0, k9t5p4_step_10_required_block_0 ++ k9t5p4_step_10_required_block_1 ++ k9t5p4_step_10_required_block_2 ++ k9t5p4_step_10_required_block_3 ++ k9t5p4_step_10_required_block_4, ⟨none, {(8, 2), (0, 2), (1, 3), (5, 3)}⟩⟩ + +private def k9t5p4_step_10 : ClosureStep 9 := .fresh k9t5p4_step_10_data + +private def k9t5p4_step_11_data : EdgeAttachmentData 9 := ⟨6, 1, [⟨0, 1, [2, 8, 7, 6]⟩, ⟨0, 1, [8, 3, 4, 5, 6]⟩, ⟨0, 2, [8, 7, 6, 1]⟩, ⟨0, 5, [8, 7, 6, 1, 2, 3, 4]⟩, ⟨0, 2, [8, 7, 6, 1, 3]⟩, ⟨1, 2, [6, 5, 4, 3, 0]⟩, ⟨1, 2, [6, 5, 4, 3]⟩, ⟨1, 5, [6, 7, 8, 0, 2, 3, 4]⟩, ⟨2, 5, [0, 8, 7, 6, 1, 3, 4]⟩, ⟨7, 5, [6, 1, 0, 8, 2, 3, 4]⟩, ⟨7, 3, [8, 0, 1, 6, 5, 4]⟩, ⟨7, 4, [8, 0, 2, 1, 6, 5]⟩, ⟨7, 3, [8, 0, 2, 1, 6, 5, 4]⟩, ⟨7, 4, [8, 0, 2, 3, 1, 6, 5]⟩], ⟨none, {(0, 3), (1, 3), (2, 3), (7, 3)}⟩⟩ + +private def k9t5p4_step_11 : ClosureStep 9 := .edge k9t5p4_step_11_data + +private def k9t5p4_step_12_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨2, 0, [1, 9, 3, 4, 5, 6, 7]⟩, ⟨2, 0, [1, 9, 4, 5, 6, 7]⟩, ⟨2, 8, [0, 7, 6, 5, 4, 1, 3, 9]⟩, ⟨2, 6, [0, 7, 8, 9, 1, 3, 4, 5]⟩, ⟨2, 6, [0, 7, 8, 9, 1, 4, 5]⟩, ⟨5, 0, [4, 1, 2, 3, 9, 8, 7]⟩, ⟨5, 0, [4, 1, 2, 9, 8, 7]⟩, ⟨5, 9, [4, 1, 2, 0, 7, 8]⟩, ⟨5, 9, [4, 1, 3, 2, 0, 7, 8]⟩, ⟨5, 8, [4, 1, 9, 2, 0, 7]⟩, ⟨5, 8, [4, 1, 9, 3, 2, 0, 7]⟩, ⟨5, 0, [6, 7, 8, 9, 1, 3, 4, 2]⟩] + +private def k9t5p4_step_12_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨5, 8, [6, 7, 0, 2, 1, 3, 4, 9]⟩, ⟨8, 6, [7, 0, 2, 1, 9, 3, 4, 5]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩, ⟨8, 5, [9, 1, 2, 0, 7, 6]⟩, ⟨8, 4, [9, 1, 2, 0, 7, 6, 5]⟩, ⟨8, 3, [9, 1, 2, 0, 7, 6, 5, 4]⟩, ⟨8, 0, [9, 1, 3, 2]⟩, ⟨8, 5, [9, 1, 3, 2, 0, 7, 6]⟩, ⟨8, 4, [9, 1, 3, 2, 0, 7, 6, 5]⟩, ⟨8, 0, [9, 1, 3, 4, 2]⟩, ⟨8, 6, [9, 1, 3, 4, 2, 0, 7]⟩] + +private def k9t5p4_step_12_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 5, [9, 1, 3, 4, 2, 0, 7, 6]⟩, ⟨8, 2, [9, 1, 3, 4, 5, 6, 7, 0]⟩, ⟨8, 0, [9, 1, 4, 5, 6, 7]⟩, ⟨8, 1, [9, 2, 0, 7, 6, 5, 4, 3]⟩, ⟨0, 9, [2, 1, 3, 4, 5, 6, 7, 8]⟩, ⟨0, 6, [2, 1, 3, 4, 9, 8, 7]⟩, ⟨0, 5, [2, 1, 3, 4, 9, 8, 7, 6]⟩, ⟨0, 5, [2, 1, 3, 9, 8, 7, 6]⟩, ⟨0, 4, [2, 1, 3, 9, 8, 7, 6, 5]⟩, ⟨0, 5, [2, 1, 4]⟩, ⟨0, 9, [2, 1, 4, 5, 6, 7, 8]⟩, ⟨0, 5, [2, 1, 9, 3, 4]⟩] + +private def k9t5p4_step_12_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 7, [2, 1, 9, 3, 4, 5, 6]⟩, ⟨0, 8, [2, 1, 9, 3, 4, 5, 6, 7]⟩, ⟨0, 5, [2, 1, 9, 4]⟩, ⟨0, 8, [2, 1, 9, 4, 5, 6, 7]⟩, ⟨0, 5, [2, 1, 9, 8, 7, 6]⟩, ⟨0, 4, [2, 1, 9, 8, 7, 6, 5]⟩, ⟨0, 3, [2, 1, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 1, [2, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 1, [2, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 3, [2, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 2, [7, 6, 5, 4, 1]⟩, ⟨0, 2, [7, 6, 5, 4, 1, 9]⟩] + +private def k9t5p4_step_12_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 2, [7, 6, 5, 4, 1, 9, 3]⟩, ⟨0, 2, [7, 6, 5, 4]⟩, ⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩, ⟨0, 2, [7, 8, 9]⟩] + +private def k9t5p4_step_12_data : FreshAttachmentData 9 := ⟨6, 1, k9t5p4_step_12_required_block_0 ++ k9t5p4_step_12_required_block_1 ++ k9t5p4_step_12_required_block_2 ++ k9t5p4_step_12_required_block_3 ++ k9t5p4_step_12_required_block_4, ⟨none, {(8, 2), (0, 2), (2, 3), (5, 3)}⟩⟩ + +private def k9t5p4_step_12 : ClosureStep 9 := .fresh k9t5p4_step_12_data + +private def k9t5p4_step_13_data : EdgeAttachmentData 9 := ⟨6, 2, [⟨0, 2, [1, 8, 7, 6]⟩, ⟨0, 2, [8, 3, 4, 5, 6]⟩, ⟨0, 1, [8, 7, 6, 2]⟩, ⟨0, 5, [8, 7, 6, 2, 1, 3, 4]⟩, ⟨0, 1, [8, 7, 6, 2, 3]⟩, ⟨1, 2, [0, 3, 4, 5, 6]⟩, ⟨1, 2, [0, 8, 7, 6]⟩, ⟨1, 5, [0, 8, 7, 6, 2, 3, 4]⟩, ⟨2, 5, [6, 7, 8, 0, 1, 3, 4]⟩, ⟨7, 5, [6, 2, 0, 8, 1, 3, 4]⟩, ⟨7, 4, [8, 0, 1, 2, 6, 5]⟩, ⟨7, 3, [8, 0, 1, 2, 6, 5, 4]⟩, ⟨7, 4, [8, 0, 1, 3, 2, 6, 5]⟩, ⟨7, 3, [8, 0, 2, 6, 5, 4]⟩], ⟨none, {(0, 3), (1, 3), (2, 3), (7, 3)}⟩⟩ + +private def k9t5p4_step_13 : ClosureStep 9 := .edge k9t5p4_step_13_data + +private def k9t5p4_step_14_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨3, 0, [1, 9, 2, 4, 5, 6, 7]⟩, ⟨3, 0, [1, 9, 4, 5, 6, 7]⟩, ⟨3, 8, [0, 7, 6, 5, 4, 1, 2, 9]⟩, ⟨3, 6, [0, 7, 8, 9, 1, 2, 4, 5]⟩, ⟨3, 6, [0, 7, 8, 9, 1, 4, 5]⟩, ⟨5, 0, [4, 1, 2, 3, 9, 8, 7]⟩, ⟨5, 9, [4, 1, 2, 3, 0, 7, 8]⟩, ⟨5, 0, [4, 1, 2, 9, 8, 7]⟩, ⟨5, 9, [4, 1, 3, 0, 7, 8]⟩, ⟨5, 8, [4, 1, 9, 2, 3, 0, 7]⟩, ⟨5, 8, [4, 1, 9, 3, 0, 7]⟩, ⟨5, 0, [6, 7, 8, 9, 1, 2, 4, 3]⟩] + +private def k9t5p4_step_14_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨5, 8, [6, 7, 0, 3, 1, 2, 4, 9]⟩, ⟨8, 6, [7, 0, 3, 1, 9, 2, 4, 5]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 3]⟩, ⟨8, 5, [9, 1, 2, 3, 0, 7, 6]⟩, ⟨8, 4, [9, 1, 2, 3, 0, 7, 6, 5]⟩, ⟨8, 0, [9, 1, 2, 4, 3]⟩, ⟨8, 6, [9, 1, 2, 4, 3, 0, 7]⟩, ⟨8, 5, [9, 1, 2, 4, 3, 0, 7, 6]⟩, ⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩, ⟨8, 3, [9, 1, 2, 4, 5, 6, 7, 0]⟩, ⟨8, 5, [9, 1, 3, 0, 7, 6]⟩] + +private def k9t5p4_step_14_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 4, [9, 1, 3, 0, 7, 6, 5]⟩, ⟨8, 2, [9, 1, 3, 0, 7, 6, 5, 4]⟩, ⟨8, 0, [9, 1, 4, 5, 6, 7]⟩, ⟨8, 1, [9, 2, 3, 0, 7, 6, 5, 4]⟩, ⟨0, 9, [3, 1, 2, 4, 5, 6, 7, 8]⟩, ⟨0, 6, [3, 1, 2, 4, 9, 8, 7]⟩, ⟨0, 5, [3, 1, 2, 4, 9, 8, 7, 6]⟩, ⟨0, 5, [3, 1, 2, 9, 8, 7, 6]⟩, ⟨0, 4, [3, 1, 2, 9, 8, 7, 6, 5]⟩, ⟨0, 5, [3, 1, 4]⟩, ⟨0, 9, [3, 1, 4, 5, 6, 7, 8]⟩, ⟨0, 5, [3, 1, 9, 2, 4]⟩] + +private def k9t5p4_step_14_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 7, [3, 1, 9, 2, 4, 5, 6]⟩, ⟨0, 8, [3, 1, 9, 2, 4, 5, 6, 7]⟩, ⟨0, 5, [3, 1, 9, 4]⟩, ⟨0, 8, [3, 1, 9, 4, 5, 6, 7]⟩, ⟨0, 5, [3, 1, 9, 8, 7, 6]⟩, ⟨0, 4, [3, 1, 9, 8, 7, 6, 5]⟩, ⟨0, 2, [3, 1, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 1, [3, 2, 9, 8, 7, 6, 5, 4]⟩, ⟨0, 1, [3, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 2, [3, 4, 5, 6, 7, 8, 9]⟩, ⟨0, 3, [7, 6, 5, 4, 1]⟩, ⟨0, 3, [7, 6, 5, 4, 1, 9, 2]⟩] + +private def k9t5p4_step_14_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 3, [7, 6, 5, 4, 1, 9]⟩, ⟨0, 3, [7, 6, 5, 4]⟩, ⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩, ⟨0, 3, [7, 8, 9]⟩] + +private def k9t5p4_step_14_data : FreshAttachmentData 9 := ⟨6, 2, k9t5p4_step_14_required_block_0 ++ k9t5p4_step_14_required_block_1 ++ k9t5p4_step_14_required_block_2 ++ k9t5p4_step_14_required_block_3 ++ k9t5p4_step_14_required_block_4, ⟨none, {(8, 2), (0, 2), (3, 3), (5, 3)}⟩⟩ + +private def k9t5p4_step_14 : ClosureStep 9 := .fresh k9t5p4_step_14_data + +private def k9t5p4_step_15_data : EdgeAttachmentData 9 := ⟨6, 3, [⟨0, 5, [1, 2, 8, 7, 6, 3, 4]⟩, ⟨0, 1, [8, 7, 6, 3]⟩, ⟨0, 2, [8, 7, 6, 3, 1]⟩, ⟨0, 2, [8, 7, 6, 3]⟩, ⟨0, 1, [8, 7, 6, 3, 2]⟩, ⟨1, 5, [0, 2, 8, 7, 6, 3, 4]⟩, ⟨1, 2, [0, 8, 7, 6, 3]⟩, ⟨1, 2, [8, 7, 6, 3]⟩, ⟨2, 5, [0, 1, 8, 7, 6, 3, 4]⟩, ⟨7, 4, [8, 0, 1, 2, 3, 6, 5]⟩, ⟨7, 4, [8, 0, 1, 3, 6, 5]⟩], ⟨none, {(0, 3), (1, 3), (2, 3), (7, 3)}⟩⟩ + +private def k9t5p4_step_15 : ClosureStep 9 := .edge k9t5p4_step_15_data + +private def k9t5p4_step_16_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [2, 3, 9, 8, 7, 6, 5, 4]⟩, ⟨1, 6, [2, 3, 9, 8, 7, 0, 4, 5]⟩, ⟨1, 6, [2, 9, 8, 7, 0, 4, 5]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6, 7]⟩, ⟨1, 0, [9, 2, 3, 4]⟩, ⟨1, 0, [9, 2, 4, 5, 6, 7]⟩, ⟨1, 0, [9, 4, 5, 6, 7]⟩, ⟨5, 0, [4, 1, 2, 3, 9, 8, 7]⟩, ⟨5, 0, [4, 1, 2, 9, 8, 7]⟩, ⟨5, 0, [4, 1, 9, 8, 7]⟩, ⟨5, 0, [4, 9, 8, 7]⟩, ⟨5, 0, [6, 7, 8, 9, 1, 2, 3, 4]⟩] + +private def k9t5p4_step_16_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨5, 9, [6, 7, 0, 4, 1, 2, 3]⟩, ⟨5, 8, [6, 7, 0, 4, 1, 2, 3, 9]⟩, ⟨5, 9, [6, 7, 0, 4, 1, 2]⟩, ⟨5, 8, [6, 7, 0, 4, 1, 2, 9]⟩, ⟨5, 8, [6, 7, 0, 4, 1, 9]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 3, 4]⟩, ⟨8, 6, [9, 1, 2, 3, 4, 0, 7]⟩, ⟨8, 5, [9, 1, 2, 3, 4, 0, 7, 6]⟩, ⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 4]⟩, ⟨8, 5, [9, 1, 2, 4, 0, 7, 6]⟩] + +private def k9t5p4_step_16_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 0, [9, 1, 4, 5, 6, 7]⟩, ⟨8, 5, [9, 1, 4, 0, 7, 6]⟩, ⟨0, 5, [4, 1, 2, 3, 9, 8, 7, 6]⟩, ⟨0, 3, [4, 5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 2, [4, 5, 6, 7, 8, 9, 1, 3]⟩, ⟨0, 1, [4, 5, 6, 7, 8, 9, 2, 3]⟩, ⟨0, 8, [7, 6, 5, 4, 1, 2, 3, 9]⟩, ⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩] + +private def k9t5p4_step_16_data : FreshAttachmentData 9 := ⟨6, 3, k9t5p4_step_16_required_block_0 ++ k9t5p4_step_16_required_block_1 ++ k9t5p4_step_16_required_block_2, ⟨none, {(8, 3), (5, 3), (1, 3), (0, 1)}⟩⟩ + +private def k9t5p4_step_16 : ClosureStep 9 := .fresh k9t5p4_step_16_data + +private def k9t5p4_step_17_data : EdgeAttachmentData 9 := ⟨6, 4, [⟨0, 5, [1, 2, 3, 8, 7, 6, 4]⟩, ⟨0, 3, [8, 7, 6, 4]⟩, ⟨0, 1, [8, 7, 6, 4, 3]⟩, ⟨3, 5, [0, 1, 2, 8, 7, 6, 4]⟩, ⟨5, 3, [4, 6, 7, 8, 0, 1, 2]⟩, ⟨5, 2, [4, 6, 7, 8, 0, 1, 3]⟩, ⟨5, 1, [4, 6, 7, 8, 0, 2, 3]⟩, ⟨5, 0, [4, 6, 7, 8, 1, 2, 3]⟩, ⟨5, 3, [6, 4]⟩, ⟨5, 7, [6, 4, 3, 0, 1, 2, 8]⟩], ⟨none, {(5, 3), (0, 3), (3, 3), (1, 0)}⟩⟩ + +private def k9t5p4_step_17 : ClosureStep 9 := .edge k9t5p4_step_17_data + +private def k9t5p4_step_18_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [2, 3, 4, 9, 8, 7, 6, 5]⟩, ⟨1, 6, [2, 3, 4, 9, 8, 7, 0, 5]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6, 7]⟩, ⟨1, 6, [9, 2, 3, 4, 5, 0, 7]⟩, ⟨1, 0, [9, 2, 4, 5, 6, 7]⟩, ⟨6, 0, [5, 4, 1, 2, 3, 9, 8, 7]⟩, ⟨6, 0, [5, 4, 1, 2, 9, 8, 7]⟩, ⟨6, 0, [5, 4, 1, 9, 8, 7]⟩, ⟨6, 0, [5, 4, 9, 8, 7]⟩, ⟨6, 3, [5, 0, 7, 8, 9, 1, 2]⟩, ⟨6, 4, [5, 0, 7, 8, 9, 1, 2, 3]⟩, ⟨6, 4, [5, 0, 7, 8, 9, 1, 2]⟩] + +private def k9t5p4_step_18_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨6, 3, [5, 0, 7, 8, 9, 1, 2, 4]⟩, ⟨6, 2, [5, 0, 7, 8, 9, 1, 3]⟩, ⟨6, 2, [5, 0, 7, 8, 9, 1, 3, 4]⟩, ⟨6, 1, [5, 0, 7, 8, 9, 2, 3]⟩, ⟨6, 1, [5, 0, 7, 8, 9, 2, 3, 4]⟩, ⟨6, 9, [7, 0, 5, 4, 1, 2, 3]⟩, ⟨6, 8, [7, 0, 5, 4, 1, 2, 3, 9]⟩, ⟨6, 8, [7, 0, 5, 4, 1, 2, 9]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5]⟩, ⟨8, 6, [9, 1, 2, 3, 4, 5, 0, 7]⟩, ⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩] + +private def k9t5p4_step_18_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 0, [9, 1, 2, 4, 5]⟩, ⟨8, 6, [9, 1, 2, 4, 5, 0, 7]⟩, ⟨8, 0, [9, 1, 4, 5]⟩, ⟨0, 6, [5, 4, 1, 2, 3, 9, 8, 7]⟩, ⟨0, 1, [5, 4, 2, 9]⟩, ⟨0, 1, [5, 4, 2, 9, 3]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩, ⟨0, 3, [5, 6, 7, 8, 9, 1, 2, 4]⟩, ⟨0, 2, [5, 6, 7, 8, 9, 1, 3, 4]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 2]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 2, 3]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 2, 3, 4]⟩] + +private def k9t5p4_step_18_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 8, [7, 6, 5, 4, 1, 2, 3, 9]⟩] + +private def k9t5p4_step_18_data : FreshAttachmentData 9 := ⟨6, 4, k9t5p4_step_18_required_block_0 ++ k9t5p4_step_18_required_block_1 ++ k9t5p4_step_18_required_block_2 ++ k9t5p4_step_18_required_block_3, ⟨none, {(6, 2), (8, 3), (0, 1), (1, 3)}⟩⟩ + +private def k9t5p4_step_18 : ClosureStep 9 := .fresh k9t5p4_step_18_data + +private def k9t5p4_step_19_data : EdgeAttachmentData 9 := ⟨7, 0, [⟨0, 1, [7, 6, 5, 4, 3]⟩, ⟨0, 6, [7, 8, 1, 2, 3, 4, 5]⟩, ⟨0, 1, [7, 8, 2, 3]⟩, ⟨1, 6, [0, 7, 8, 2, 3, 4, 5]⟩, ⟨4, 8, [3, 1, 2, 0, 7]⟩, ⟨4, 8, [5, 6, 7, 0, 1, 2, 3]⟩, ⟨4, 8, [5, 6, 7, 0, 1, 2]⟩], ⟨none, {(0, 3), (1, 3), (4, 3), (8, 0)}⟩⟩ + +private def k9t5p4_step_19 : ClosureStep 9 := .edge k9t5p4_step_19_data + +private def k9t5p4_step_20_data : EdgeAttachmentData 9 := ⟨7, 4, [⟨0, 6, [1, 2, 3, 8, 7, 4, 5]⟩, ⟨0, 3, [1, 8, 7, 4]⟩, ⟨0, 5, [8, 1, 2, 3, 4, 7, 6]⟩, ⟨0, 1, [8, 7, 4, 3]⟩, ⟨0, 2, [8, 7, 4, 3, 1]⟩, ⟨0, 2, [8, 7, 4, 3]⟩, ⟨0, 1, [8, 7, 4, 3, 2]⟩, ⟨1, 6, [0, 2, 3, 8, 7, 4, 5]⟩, ⟨1, 5, [0, 8, 2, 3, 4, 7, 6]⟩, ⟨1, 3, [0, 8, 7, 4]⟩, ⟨1, 2, [0, 8, 7, 4, 3]⟩, ⟨1, 2, [8, 7, 4, 3]⟩, ⟨2, 6, [0, 1, 3, 8, 7, 4, 5]⟩, ⟨2, 5, [0, 8, 1, 3, 4, 7, 6]⟩, ⟨2, 3, [0, 8, 7, 4]⟩, ⟨3, 6, [0, 1, 2, 8, 7, 4, 5]⟩, ⟨3, 6, [0, 1, 8, 7, 4, 5]⟩], ⟨none, {(0, 3), (1, 3), (2, 3), (3, 3)}⟩⟩ + +private def k9t5p4_step_20 : ClosureStep 9 := .edge k9t5p4_step_20_data + +private def k9t5p4_step_21_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨4, 0, [1, 2, 3, 9, 8, 7, 6, 5]⟩, ⟨4, 6, [1, 2, 3, 9, 8, 0, 5]⟩, ⟨4, 7, [1, 2, 3, 9, 8, 0, 5, 6]⟩, ⟨4, 0, [1, 2, 9, 8, 7, 6, 5]⟩, ⟨4, 7, [1, 2, 9, 8, 0, 5, 6]⟩, ⟨4, 0, [1, 9, 8, 7, 6, 5]⟩, ⟨4, 7, [1, 9, 8, 0, 5, 6]⟩, ⟨6, 0, [5, 4, 1, 2, 3, 9, 8]⟩, ⟨6, 0, [5, 4, 1, 2, 9, 8]⟩, ⟨6, 0, [5, 4, 1, 9, 8]⟩, ⟨6, 0, [5, 4, 9, 8]⟩, ⟨6, 4, [5, 0, 8, 9, 1, 2, 3]⟩] + +private def k9t5p4_step_21_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨6, 3, [5, 0, 8, 9, 1, 2, 4]⟩, ⟨6, 2, [5, 0, 8, 9, 1, 3, 4]⟩, ⟨6, 1, [5, 0, 8, 9, 2, 3, 4]⟩, ⟨6, 0, [7, 8, 9, 1, 2, 3, 4, 5]⟩, ⟨6, 9, [7, 8, 0, 5, 4, 1, 2, 3]⟩, ⟨6, 9, [7, 8, 0, 5, 4, 1, 2]⟩, ⟨6, 3, [7, 8, 0, 5, 4, 1, 9, 2]⟩, ⟨6, 2, [7, 8, 0, 5, 4, 1, 9, 3]⟩, ⟨6, 1, [7, 8, 0, 5, 4, 2, 9, 3]⟩, ⟨7, 0, [6, 5, 4, 1, 2, 3, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 2, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 9, 8]⟩] + +private def k9t5p4_step_21_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨7, 0, [6, 5, 4, 9, 8]⟩, ⟨7, 3, [6, 5, 0, 8, 9, 1, 2]⟩, ⟨7, 4, [6, 5, 0, 8, 9, 1, 2, 3]⟩, ⟨7, 4, [6, 5, 0, 8, 9, 1, 2]⟩, ⟨7, 3, [6, 5, 0, 8, 9, 1, 2, 4]⟩, ⟨7, 2, [6, 5, 0, 8, 9, 1, 3]⟩, ⟨7, 2, [6, 5, 0, 8, 9, 1, 3, 4]⟩, ⟨7, 4, [6, 5, 0, 8, 9, 1]⟩, ⟨7, 1, [6, 5, 0, 8, 9, 2, 3]⟩, ⟨7, 1, [6, 5, 0, 8, 9, 2, 3, 4]⟩, ⟨7, 0, [8, 9, 4, 5]⟩, ⟨7, 9, [8, 0, 5, 4, 1, 2, 3]⟩] + +private def k9t5p4_step_21_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 7, [5, 4, 1, 2, 3, 9, 8]⟩, ⟨0, 6, [5, 4, 1, 2, 3, 9, 8, 7]⟩, ⟨0, 6, [5, 4, 1, 2, 9, 8, 7]⟩, ⟨0, 3, [5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 3, [5, 6, 7, 8, 9, 1, 2, 4]⟩, ⟨0, 2, [5, 6, 7, 8, 9, 1, 3]⟩, ⟨0, 2, [5, 6, 7, 8, 9, 1, 3, 4]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 2, 3]⟩, ⟨0, 1, [5, 6, 7, 8, 9, 2, 3, 4]⟩] + +private def k9t5p4_step_21_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 4, [5, 6, 7, 8, 9]⟩, ⟨0, 9, [8, 7, 6, 5, 4, 1, 2, 3]⟩, ⟨0, 9, [8, 7, 6, 5, 4, 1, 2]⟩, ⟨0, 7, [8, 9, 1, 2, 3, 4, 5, 6]⟩, ⟨0, 4, [8, 9, 1, 2]⟩, ⟨0, 4, [8, 9, 1]⟩] + +private def k9t5p4_step_21_data : FreshAttachmentData 9 := ⟨7, 4, k9t5p4_step_21_required_block_0 ++ k9t5p4_step_21_required_block_1 ++ k9t5p4_step_21_required_block_2 ++ k9t5p4_step_21_required_block_3 ++ k9t5p4_step_21_required_block_4, ⟨none, {(6, 2), (7, 2), (0, 2), (4, 3)}⟩⟩ + +private def k9t5p4_step_21 : ClosureStep 9 := .fresh k9t5p4_step_21_data + +private def k9t5p4_step_22_data : EdgeAttachmentData 9 := ⟨7, 5, [⟨0, 6, [8, 1, 2, 3, 4, 5, 7]⟩, ⟨0, 1, [8, 7, 5, 4, 3]⟩, ⟨4, 6, [3, 0, 1, 2, 8, 7, 5]⟩, ⟨6, 4, [5, 7, 8, 0, 1, 2, 3]⟩, ⟨6, 4, [7, 5]⟩, ⟨6, 8, [7, 5, 4, 3, 0, 1, 2]⟩, ⟨6, 2, [7, 5, 4, 3, 0, 8, 1]⟩, ⟨6, 1, [7, 5, 4, 3, 0, 8, 2]⟩, ⟨6, 0, [7, 5, 4, 3, 1, 8, 2]⟩], ⟨none, {(6, 3), (0, 3), (4, 3), (1, 0)}⟩⟩ + +private def k9t5p4_step_22 : ClosureStep 9 := .edge k9t5p4_step_22_data + +private def k9t5p4_step_23_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [9, 2, 3, 4, 5, 6, 7, 8]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6]⟩, ⟨1, 7, [9, 2, 3, 4, 5, 6, 0, 8]⟩, ⟨1, 0, [9, 2, 4, 5, 6, 7, 8]⟩, ⟨1, 7, [9, 2, 4, 5, 6, 0, 8]⟩, ⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩, ⟨5, 7, [4, 1, 2, 3, 9, 8, 0, 6]⟩, ⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 2, 9, 8]⟩, ⟨5, 7, [4, 1, 2, 9, 8, 0, 6]⟩, ⟨5, 0, [4, 1, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 9, 8]⟩] + +private def k9t5p4_step_23_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨7, 0, [6, 5, 4, 1, 2, 3, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 2, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 1, 9, 8]⟩, ⟨7, 0, [6, 5, 4, 9, 8]⟩, ⟨7, 4, [6, 0, 8, 9, 1, 2, 3]⟩, ⟨7, 5, [6, 0, 8, 9, 1, 2, 3, 4]⟩, ⟨7, 3, [6, 0, 8, 9, 1, 2, 4]⟩, ⟨7, 5, [6, 0, 8, 9, 1, 2, 4]⟩, ⟨7, 2, [6, 0, 8, 9, 1, 3, 4]⟩, ⟨7, 1, [6, 0, 8, 9, 2, 3, 4]⟩, ⟨7, 9, [8, 0, 6, 5, 4, 1, 2, 3]⟩, ⟨7, 9, [8, 0, 6, 5, 4, 1, 2]⟩] + +private def k9t5p4_step_23_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨7, 3, [8, 0, 6, 5, 4, 1, 9, 2]⟩, ⟨7, 2, [8, 0, 6, 5, 4, 1, 9, 3]⟩, ⟨7, 1, [8, 0, 6, 5, 4, 2, 9, 3]⟩, ⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩, ⟨0, 1, [6, 5, 4, 2]⟩, ⟨0, 1, [6, 5, 4, 2, 9]⟩, ⟨0, 1, [6, 5, 4, 2, 9, 3]⟩, ⟨0, 5, [6, 7, 8, 9, 1, 2, 3, 4]⟩, ⟨0, 1, [6, 7, 8, 9, 2, 3, 4]⟩, ⟨0, 9, [8, 7, 6, 5, 4, 1, 2, 3]⟩, ⟨0, 3, [8, 7, 6, 5, 4, 1, 9, 2]⟩, ⟨0, 2, [8, 7, 6, 5, 4, 1, 9, 3]⟩] + +private def k9t5p4_step_23_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 1, [8, 7, 6, 5, 4, 2, 9, 3]⟩] + +private def k9t5p4_step_23_data : FreshAttachmentData 9 := ⟨7, 5, k9t5p4_step_23_required_block_0 ++ k9t5p4_step_23_required_block_1 ++ k9t5p4_step_23_required_block_2 ++ k9t5p4_step_23_required_block_3, ⟨none, {(7, 2), (5, 3), (0, 1), (1, 3)}⟩⟩ + +private def k9t5p4_step_23 : ClosureStep 9 := .fresh k9t5p4_step_23_data + +private def k9t5p4_step_24_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [2, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨1, 7, [2, 3, 4, 5, 0, 9, 8]⟩, ⟨1, 6, [2, 3, 4, 5, 0, 9, 8, 7]⟩, ⟨1, 8, [2, 3, 4, 9, 0, 5, 6, 7]⟩, ⟨1, 0, [2, 3, 9, 8, 7, 6, 5]⟩, ⟨1, 6, [2, 4, 5, 0, 9, 8, 7]⟩, ⟨1, 0, [2, 9, 8, 7, 6, 5]⟩, ⟨1, 0, [9, 2, 3, 4, 5]⟩, ⟨1, 0, [9, 2, 4, 5]⟩, ⟨1, 0, [9, 4, 5]⟩, ⟨1, 2, [9, 0, 5, 4]⟩, ⟨1, 3, [9, 0, 5, 4, 2]⟩] + +private def k9t5p4_step_24_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨1, 3, [9, 0, 5, 4]⟩, ⟨1, 2, [9, 0, 5, 4, 3]⟩, ⟨2, 0, [1, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨2, 7, [1, 3, 4, 5, 0, 9, 8]⟩, ⟨2, 6, [1, 3, 4, 5, 0, 9, 8, 7]⟩, ⟨2, 8, [1, 3, 4, 9, 0, 5, 6, 7]⟩, ⟨2, 0, [1, 3, 9, 8, 7, 6, 5]⟩, ⟨2, 0, [1, 3, 9]⟩, ⟨2, 6, [1, 4, 5, 0, 9, 8, 7]⟩, ⟨2, 0, [1, 9, 3, 4, 5]⟩, ⟨2, 0, [1, 9, 4, 5]⟩, ⟨2, 0, [1, 9, 8, 7, 6, 5]⟩] + +private def k9t5p4_step_24_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨2, 3, [1, 9, 0, 5, 4]⟩, ⟨2, 3, [9, 0, 5, 4]⟩, ⟨3, 0, [1, 2, 4, 5, 6, 7, 8, 9]⟩, ⟨3, 7, [1, 2, 4, 5, 0, 9, 8]⟩, ⟨3, 6, [1, 2, 4, 5, 0, 9, 8, 7]⟩, ⟨3, 8, [1, 2, 4, 9, 0, 5, 6, 7]⟩, ⟨3, 0, [1, 2, 9, 8, 7, 6, 5]⟩, ⟨3, 0, [1, 2, 9]⟩, ⟨3, 6, [1, 4, 5, 0, 9, 8, 7]⟩, ⟨3, 0, [1, 9, 2, 4, 5]⟩, ⟨3, 0, [1, 9, 4, 5]⟩, ⟨3, 0, [1, 9, 8, 7, 6, 5]⟩] + +private def k9t5p4_step_24_required_block_3 : List (RequiredPathData (Fin 10)) := [⟨0, 6, [5, 4, 1, 2, 3, 9, 8, 7]⟩, ⟨0, 6, [5, 4, 1, 2, 9, 8, 7]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩, ⟨0, 4, [5, 6, 7, 8, 9, 1, 2]⟩, ⟨0, 7, [9, 1, 2, 3, 4, 5, 6]⟩, ⟨0, 8, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 8, [9, 1, 2, 4, 5, 6, 7]⟩, ⟨0, 2, [9, 8, 7, 6, 5, 4, 1]⟩, ⟨0, 3, [9, 8, 7, 6, 5, 4, 1, 2]⟩, ⟨0, 3, [9, 8, 7, 6, 5, 4, 1]⟩, ⟨0, 2, [9, 8, 7, 6, 5, 4, 1, 3]⟩, ⟨0, 1, [9, 8, 7, 6, 5, 4, 2]⟩] + +private def k9t5p4_step_24_required_block_4 : List (RequiredPathData (Fin 10)) := [⟨0, 1, [9, 8, 7, 6, 5, 4, 2, 3]⟩] + +private def k9t5p4_step_24_data : FreshAttachmentData 9 := ⟨8, 4, k9t5p4_step_24_required_block_0 ++ k9t5p4_step_24_required_block_1 ++ k9t5p4_step_24_required_block_2 ++ k9t5p4_step_24_required_block_3 ++ k9t5p4_step_24_required_block_4, ⟨none, {(1, 3), (2, 3), (3, 3), (0, 2)}⟩⟩ + +private def k9t5p4_step_24 : ClosureStep 9 := .fresh k9t5p4_step_24_data + +private def k9t5p4_step_25_data : EdgeAttachmentData 9 := ⟨8, 5, [⟨0, 6, [1, 2, 3, 4, 5, 8, 7]⟩, ⟨0, 1, [8, 5, 4, 3]⟩, ⟨0, 2, [8, 5, 4, 3, 1]⟩, ⟨0, 2, [8, 5, 4, 3]⟩, ⟨0, 1, [8, 5, 4, 3, 2]⟩, ⟨1, 6, [0, 2, 3, 4, 5, 8, 7]⟩, ⟨1, 2, [0, 8, 5, 4, 3]⟩, ⟨1, 2, [8, 5, 4, 3]⟩, ⟨2, 6, [0, 1, 3, 4, 5, 8, 7]⟩, ⟨4, 7, [3, 0, 1, 2, 8, 5, 6]⟩, ⟨4, 7, [3, 0, 1, 8, 5, 6]⟩], ⟨none, {(0, 3), (1, 3), (2, 3), (4, 3)}⟩⟩ + +private def k9t5p4_step_25 : ClosureStep 9 := .edge k9t5p4_step_25_data + +private def k9t5p4_step_26_required_block_0 : List (RequiredPathData (Fin 10)) := [⟨1, 0, [2, 3, 4, 5, 6, 7, 8, 9]⟩, ⟨1, 7, [2, 3, 4, 5, 6, 0, 9, 8]⟩, ⟨1, 0, [2, 3, 4, 9, 8, 7, 6]⟩, ⟨1, 7, [2, 4, 5, 6, 0, 9, 8]⟩, ⟨1, 0, [9, 2, 3, 4, 5, 6]⟩, ⟨1, 0, [9, 2, 4, 5, 6]⟩, ⟨1, 0, [9, 4, 5, 6]⟩, ⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩, ⟨5, 0, [4, 1, 2, 3, 9]⟩, ⟨5, 7, [4, 1, 2, 3, 9, 0, 6]⟩, ⟨5, 8, [4, 1, 2, 3, 9, 0, 6, 7]⟩, ⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩] + +private def k9t5p4_step_26_required_block_1 : List (RequiredPathData (Fin 10)) := [⟨5, 0, [4, 1, 2, 9]⟩, ⟨5, 8, [4, 1, 2, 9, 0, 6, 7]⟩, ⟨5, 0, [4, 1, 9, 8, 7, 6]⟩, ⟨5, 8, [4, 1, 9, 0, 6, 7]⟩, ⟨8, 0, [7, 6, 5, 4, 1, 2, 3, 9]⟩, ⟨8, 4, [7, 6, 0, 9, 1, 2, 3]⟩, ⟨8, 5, [7, 6, 0, 9, 1, 2, 3, 4]⟩, ⟨8, 4, [7, 6, 0, 9, 1, 2]⟩, ⟨8, 5, [7, 6, 0, 9, 1, 2, 4]⟩, ⟨8, 5, [7, 6, 0, 9, 1, 4]⟩, ⟨8, 0, [9, 1, 2, 3, 4, 5, 6]⟩, ⟨8, 0, [9, 1, 2, 4, 5, 6]⟩] + +private def k9t5p4_step_26_required_block_2 : List (RequiredPathData (Fin 10)) := [⟨8, 0, [9, 1, 4, 5, 6]⟩, ⟨8, 0, [9, 4, 5, 6]⟩, ⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩, ⟨0, 5, [6, 7, 8, 9, 1, 2, 3, 4]⟩, ⟨0, 8, [9, 1, 2, 3, 4, 5, 6, 7]⟩, ⟨0, 3, [9, 8, 7, 6, 5, 4, 1, 2]⟩, ⟨0, 2, [9, 8, 7, 6, 5, 4, 1, 3]⟩, ⟨0, 1, [9, 8, 7, 6, 5, 4, 2, 3]⟩] + +private def k9t5p4_step_26_data : FreshAttachmentData 9 := ⟨8, 5, k9t5p4_step_26_required_block_0 ++ k9t5p4_step_26_required_block_1 ++ k9t5p4_step_26_required_block_2, ⟨none, {(5, 3), (8, 3), (1, 3), (0, 1)}⟩⟩ + +private def k9t5p4_step_26 : ClosureStep 9 := .fresh k9t5p4_step_26_data + +private def k9t5p4_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [], [], [], 5, 8⟩, ⟨0, 1, [[3, 4, 5, 6, 7, 8]], [], [], 1, 2⟩, ⟨0, 2, [], [], [], 5, 8⟩, ⟨0, 2, [[3, 4, 5, 6, 7, 8]], [], [], 1, 2⟩, ⟨0, 3, [], [], [], 5, 8⟩, ⟨0, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩, ⟨0, 4, [], [], [3], 4, 7⟩, ⟨0, 4, [], [], [5, 6, 7, 8], 1, 4⟩, ⟨0, 5, [], [], [4, 3], 3, 6⟩, ⟨0, 5, [], [], [6, 7, 8], 2, 5⟩, ⟨0, 6, [], [], [5, 4, 3], 2, 5⟩, ⟨0, 6, [], [], [7, 8], 3, 6⟩] + +private def k9t5p4_templates_block_1 : List (TemplateData (Fin 9)) := [⟨0, 7, [], [], [6, 5, 4, 3], 1, 4⟩, ⟨0, 7, [], [], [8], 4, 7⟩, ⟨0, 8, [], [], [7, 6, 5, 4, 3], 1, 3⟩, ⟨1, 2, [], [], [], 5, 8⟩, ⟨1, 2, [[3, 4, 5, 6, 7, 8]], [], [], 1, 2⟩, ⟨1, 3, [], [], [], 5, 8⟩, ⟨1, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩, ⟨1, 4, [], [], [3], 4, 7⟩, ⟨1, 4, [], [], [5, 6, 7, 8], 1, 4⟩, ⟨1, 5, [], [], [4, 3], 3, 6⟩, ⟨1, 5, [], [], [6, 7, 8], 2, 5⟩, ⟨1, 6, [], [], [5, 4, 3], 2, 5⟩] + +private def k9t5p4_templates_block_2 : List (TemplateData (Fin 9)) := [⟨1, 7, [], [], [6, 5, 4, 3], 1, 4⟩, ⟨1, 7, [], [], [8], 4, 7⟩, ⟨1, 8, [], [], [7, 6, 5, 4, 3], 1, 3⟩, ⟨2, 3, [], [], [], 5, 8⟩, ⟨2, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩, ⟨2, 4, [], [], [3], 4, 7⟩, ⟨2, 4, [], [], [5, 6, 7, 8], 1, 4⟩, ⟨2, 5, [], [], [4, 3], 3, 6⟩, ⟨2, 5, [], [], [6, 7, 8], 2, 5⟩, ⟨2, 6, [], [], [5, 4, 3], 2, 5⟩, ⟨2, 7, [], [], [6, 5, 4, 3], 1, 4⟩, ⟨2, 7, [], [], [8], 4, 7⟩] + +private def k9t5p4_templates_block_3 : List (TemplateData (Fin 9)) := [⟨2, 8, [], [], [7, 6, 5, 4, 3], 1, 3⟩, ⟨3, 4, [], [], [5, 6, 7, 8], 1, 4⟩, ⟨3, 5, [], [], [6, 7, 8], 2, 5⟩, ⟨3, 6, [], [], [7, 8], 3, 6⟩, ⟨4, 5, [], [3], [6, 7, 8], 1, 4⟩, ⟨4, 6, [], [3], [7, 8], 2, 5⟩, ⟨4, 7, [], [3], [8], 3, 6⟩, ⟨5, 6, [], [3, 4], [7, 8], 1, 4⟩, ⟨5, 7, [], [3, 4], [8], 2, 5⟩, ⟨6, 7, [], [3, 4, 5], [8], 1, 4⟩, ⟨6, 8, [], [3, 4, 5], [], 2, 5⟩, ⟨7, 8, [], [3, 4, 5, 6], [], 1, 4⟩] + +def k9t5p4 : LayoutCertificate 9 where + chains := [[0], [1], [2], [3, 4, 5, 6, 7, 8]] + clique := {0, 1, 2, 3, 8} + templates := k9t5p4_templates_block_0 ++ k9t5p4_templates_block_1 ++ k9t5p4_templates_block_2 ++ k9t5p4_templates_block_3 + required := [] + closure := [k9t5p4_step_0, k9t5p4_step_1, k9t5p4_step_2, k9t5p4_step_3, k9t5p4_step_4, k9t5p4_step_5, k9t5p4_step_6, k9t5p4_step_7, k9t5p4_step_8, k9t5p4_step_9, k9t5p4_step_10, k9t5p4_step_11, k9t5p4_step_12, k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] + bad := ⟨none, {(5, 2), (6, 2), (4, 2), (0, 2)}⟩ + + +private def k9t5p4_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 6, ∅, ∅], + #[{1, 2, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 2 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 2 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_0) 0 j = k9t5p4_template_matrix_0 0 j := by decide + +private theorem k9t5p4_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_0) 1 j = k9t5p4_template_matrix_0 1 j := by decide + +private theorem k9t5p4_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_0) 2 j = k9t5p4_template_matrix_0 2 j := by decide + +private theorem k9t5p4_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_0) 3 j = k9t5p4_template_matrix_0 3 j := by decide + +private theorem k9t5p4_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_0) 4 j = k9t5p4_template_matrix_0 4 j := by decide + +private theorem k9t5p4_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_0) 5 j = k9t5p4_template_matrix_0 5 j := by decide + +private theorem k9t5p4_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_0) 6 j = k9t5p4_template_matrix_0 6 j := by decide + +private theorem k9t5p4_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_0) 7 j = k9t5p4_template_matrix_0 7 j := by decide + +private theorem k9t5p4_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_0) 8 j = k9t5p4_template_matrix_0 8 j := by decide + +private theorem k9t5p4_template_matrix_0_eq : (templateMatrix k9t5p4_templates_block_0) = k9t5p4_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t5p4_template_matrix_0_eq_row_0 j + + · exact k9t5p4_template_matrix_0_eq_row_1 j + + · exact k9t5p4_template_matrix_0_eq_row_2 j + + · exact k9t5p4_template_matrix_0_eq_row_3 j + + · exact k9t5p4_template_matrix_0_eq_row_4 j + + · exact k9t5p4_template_matrix_0_eq_row_5 j + + · exact k9t5p4_template_matrix_0_eq_row_6 j + + · exact k9t5p4_template_matrix_0_eq_row_7 j + + · exact k9t5p4_template_matrix_0_eq_row_8 j + +private def k9t5p4_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, {1, 2, 3}], + #[∅, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 5, ∅, ∅], + #[∅, {1, 2, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 2 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 2 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_1) 0 j = k9t5p4_template_matrix_1 0 j := by decide + +private theorem k9t5p4_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_1) 1 j = k9t5p4_template_matrix_1 1 j := by decide + +private theorem k9t5p4_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_1) 2 j = k9t5p4_template_matrix_1 2 j := by decide + +private theorem k9t5p4_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_1) 3 j = k9t5p4_template_matrix_1 3 j := by decide + +private theorem k9t5p4_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_1) 4 j = k9t5p4_template_matrix_1 4 j := by decide + +private theorem k9t5p4_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_1) 5 j = k9t5p4_template_matrix_1 5 j := by decide + +private theorem k9t5p4_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_1) 6 j = k9t5p4_template_matrix_1 6 j := by decide + +private theorem k9t5p4_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_1) 7 j = k9t5p4_template_matrix_1 7 j := by decide + +private theorem k9t5p4_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_1) 8 j = k9t5p4_template_matrix_1 8 j := by decide + +private theorem k9t5p4_template_matrix_1_eq : (templateMatrix k9t5p4_templates_block_1) = k9t5p4_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t5p4_template_matrix_1_eq_row_0 j + + · exact k9t5p4_template_matrix_1_eq_row_1 j + + · exact k9t5p4_template_matrix_1_eq_row_2 j + + · exact k9t5p4_template_matrix_1_eq_row_3 j + + · exact k9t5p4_template_matrix_1_eq_row_4 j + + · exact k9t5p4_template_matrix_1_eq_row_5 j + + · exact k9t5p4_template_matrix_1_eq_row_6 j + + · exact k9t5p4_template_matrix_1_eq_row_7 j + + · exact k9t5p4_template_matrix_1_eq_row_8 j + +private def k9t5p4_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, {1, 2, 3}], + #[∅, ∅, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, ∅], + #[∅, ∅, {1, 2, 3, 5, 6, 7, 8}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 2 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 2 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_2) 0 j = k9t5p4_template_matrix_2 0 j := by decide + +private theorem k9t5p4_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_2) 1 j = k9t5p4_template_matrix_2 1 j := by decide + +private theorem k9t5p4_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_2) 2 j = k9t5p4_template_matrix_2 2 j := by decide + +private theorem k9t5p4_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_2) 3 j = k9t5p4_template_matrix_2 3 j := by decide + +private theorem k9t5p4_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_2) 4 j = k9t5p4_template_matrix_2 4 j := by decide + +private theorem k9t5p4_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_2) 5 j = k9t5p4_template_matrix_2 5 j := by decide + +private theorem k9t5p4_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_2) 6 j = k9t5p4_template_matrix_2 6 j := by decide + +private theorem k9t5p4_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_2) 7 j = k9t5p4_template_matrix_2 7 j := by decide + +private theorem k9t5p4_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_2) 8 j = k9t5p4_template_matrix_2 8 j := by decide + +private theorem k9t5p4_template_matrix_2_eq : (templateMatrix k9t5p4_templates_block_2) = k9t5p4_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t5p4_template_matrix_2_eq_row_0 j + + · exact k9t5p4_template_matrix_2_eq_row_1 j + + · exact k9t5p4_template_matrix_2_eq_row_2 j + + · exact k9t5p4_template_matrix_2_eq_row_3 j + + · exact k9t5p4_template_matrix_2_eq_row_4 j + + · exact k9t5p4_template_matrix_2_eq_row_5 j + + · exact k9t5p4_template_matrix_2_eq_row_6 j + + · exact k9t5p4_template_matrix_2_eq_row_7 j + + · exact k9t5p4_template_matrix_2_eq_row_8 j + +private def k9t5p4_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2, 3}], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[∅, ∅, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[∅, ∅, ∅, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, ∅, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_3) 0 j = k9t5p4_template_matrix_3 0 j := by decide + +private theorem k9t5p4_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_3) 1 j = k9t5p4_template_matrix_3 1 j := by decide + +private theorem k9t5p4_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_3) 2 j = k9t5p4_template_matrix_3 2 j := by decide + +private theorem k9t5p4_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_3) 3 j = k9t5p4_template_matrix_3 3 j := by decide + +private theorem k9t5p4_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_3) 4 j = k9t5p4_template_matrix_3 4 j := by decide + +private theorem k9t5p4_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_3) 5 j = k9t5p4_template_matrix_3 5 j := by decide + +private theorem k9t5p4_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_3) 6 j = k9t5p4_template_matrix_3 6 j := by decide + +private theorem k9t5p4_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_3) 7 j = k9t5p4_template_matrix_3 7 j := by decide + +private theorem k9t5p4_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p4_templates_block_3) 8 j = k9t5p4_template_matrix_3 8 j := by decide + +private theorem k9t5p4_template_matrix_3_eq : (templateMatrix k9t5p4_templates_block_3) = k9t5p4_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t5p4_template_matrix_3_eq_row_0 j + + · exact k9t5p4_template_matrix_3_eq_row_1 j + + · exact k9t5p4_template_matrix_3_eq_row_2 j + + · exact k9t5p4_template_matrix_3_eq_row_3 j + + · exact k9t5p4_template_matrix_3_eq_row_4 j + + · exact k9t5p4_template_matrix_3_eq_row_5 j + + · exact k9t5p4_template_matrix_3_eq_row_6 j + + · exact k9t5p4_template_matrix_3_eq_row_7 j + + · exact k9t5p4_template_matrix_3_eq_row_8 j + +private theorem k9t5p4_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => (((k9t5p4_template_matrix_0 i j ∪ k9t5p4_template_matrix_1 i j) ∪ k9t5p4_template_matrix_2 i j) ∪ k9t5p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p4.required i j) 0 j = k9t5p4_state_0 0 j := by decide + +private theorem k9t5p4_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => (((k9t5p4_template_matrix_0 i j ∪ k9t5p4_template_matrix_1 i j) ∪ k9t5p4_template_matrix_2 i j) ∪ k9t5p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p4.required i j) 1 j = k9t5p4_state_0 1 j := by decide + +private theorem k9t5p4_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => (((k9t5p4_template_matrix_0 i j ∪ k9t5p4_template_matrix_1 i j) ∪ k9t5p4_template_matrix_2 i j) ∪ k9t5p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p4.required i j) 2 j = k9t5p4_state_0 2 j := by decide + +private theorem k9t5p4_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => (((k9t5p4_template_matrix_0 i j ∪ k9t5p4_template_matrix_1 i j) ∪ k9t5p4_template_matrix_2 i j) ∪ k9t5p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p4.required i j) 3 j = k9t5p4_state_0 3 j := by decide + +private theorem k9t5p4_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => (((k9t5p4_template_matrix_0 i j ∪ k9t5p4_template_matrix_1 i j) ∪ k9t5p4_template_matrix_2 i j) ∪ k9t5p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p4.required i j) 4 j = k9t5p4_state_0 4 j := by decide + +private theorem k9t5p4_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => (((k9t5p4_template_matrix_0 i j ∪ k9t5p4_template_matrix_1 i j) ∪ k9t5p4_template_matrix_2 i j) ∪ k9t5p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p4.required i j) 5 j = k9t5p4_state_0 5 j := by decide + +private theorem k9t5p4_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => (((k9t5p4_template_matrix_0 i j ∪ k9t5p4_template_matrix_1 i j) ∪ k9t5p4_template_matrix_2 i j) ∪ k9t5p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p4.required i j) 6 j = k9t5p4_state_0 6 j := by decide + +private theorem k9t5p4_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => (((k9t5p4_template_matrix_0 i j ∪ k9t5p4_template_matrix_1 i j) ∪ k9t5p4_template_matrix_2 i j) ∪ k9t5p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p4.required i j) 7 j = k9t5p4_state_0 7 j := by decide + +private theorem k9t5p4_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => (((k9t5p4_template_matrix_0 i j ∪ k9t5p4_template_matrix_1 i j) ∪ k9t5p4_template_matrix_2 i j) ∪ k9t5p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p4.required i j) 8 j = k9t5p4_state_0 8 j := by decide + +private theorem k9t5p4_initial_merged_eq : (fun i j => (((k9t5p4_template_matrix_0 i j ∪ k9t5p4_template_matrix_1 i j) ∪ k9t5p4_template_matrix_2 i j) ∪ k9t5p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p4.required i j) = k9t5p4_state_0 := by + funext i j + fin_cases i + + · exact k9t5p4_initial_merged_eq_row_0 j + + · exact k9t5p4_initial_merged_eq_row_1 j + + · exact k9t5p4_initial_merged_eq_row_2 j + + · exact k9t5p4_initial_merged_eq_row_3 j + + · exact k9t5p4_initial_merged_eq_row_4 j + + · exact k9t5p4_initial_merged_eq_row_5 j + + · exact k9t5p4_initial_merged_eq_row_6 j + + · exact k9t5p4_initial_merged_eq_row_7 j + + · exact k9t5p4_initial_merged_eq_row_8 j + +private theorem k9t5p4_initial_eq : k9t5p4.initialMatrix 9 = k9t5p4_state_0 := by + funext i j + change templateMatrix (k9t5p4_templates_block_0 ++ k9t5p4_templates_block_1 ++ k9t5p4_templates_block_2 ++ k9t5p4_templates_block_3) i j ∪ requiredMatrix 9 k9t5p4.required i j = _ + simp only [templateMatrix_append, k9t5p4_template_matrix_0_eq, k9t5p4_template_matrix_1_eq, k9t5p4_template_matrix_2_eq, k9t5p4_template_matrix_3_eq] + exact congrFun (congrFun k9t5p4_initial_merged_eq i) j + +private def k9t5p4_state_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_0_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t5p4_state_0 a b ∪ requiredMatrix 9 k9t5p4_step_0_data.required a b) 0 j = k9t5p4_local_0 0 j := by decide + +private theorem k9t5p4_local_0_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t5p4_state_0 a b ∪ requiredMatrix 9 k9t5p4_step_0_data.required a b) 1 j = k9t5p4_local_0 1 j := by decide + +private theorem k9t5p4_local_0_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t5p4_state_0 a b ∪ requiredMatrix 9 k9t5p4_step_0_data.required a b) 2 j = k9t5p4_local_0 2 j := by decide + +private theorem k9t5p4_local_0_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t5p4_state_0 a b ∪ requiredMatrix 9 k9t5p4_step_0_data.required a b) 3 j = k9t5p4_local_0 3 j := by decide + +private theorem k9t5p4_local_0_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t5p4_state_0 a b ∪ requiredMatrix 9 k9t5p4_step_0_data.required a b) 4 j = k9t5p4_local_0 4 j := by decide + +private theorem k9t5p4_local_0_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t5p4_state_0 a b ∪ requiredMatrix 9 k9t5p4_step_0_data.required a b) 5 j = k9t5p4_local_0 5 j := by decide + +private theorem k9t5p4_local_0_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t5p4_state_0 a b ∪ requiredMatrix 9 k9t5p4_step_0_data.required a b) 6 j = k9t5p4_local_0 6 j := by decide + +private theorem k9t5p4_local_0_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t5p4_state_0 a b ∪ requiredMatrix 9 k9t5p4_step_0_data.required a b) 7 j = k9t5p4_local_0 7 j := by decide + +private theorem k9t5p4_local_0_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t5p4_state_0 a b ∪ requiredMatrix 9 k9t5p4_step_0_data.required a b) 8 j = k9t5p4_local_0 8 j := by decide + +private theorem k9t5p4_local_0_eq : (fun a b => k9t5p4_state_0 a b ∪ requiredMatrix 9 k9t5p4_step_0_data.required a b) = k9t5p4_local_0 := by + funext i j + fin_cases i + + · exact k9t5p4_local_0_eq_row_0 j + + · exact k9t5p4_local_0_eq_row_1 j + + · exact k9t5p4_local_0_eq_row_2 j + + · exact k9t5p4_local_0_eq_row_3 j + + · exact k9t5p4_local_0_eq_row_4 j + + · exact k9t5p4_local_0_eq_row_5 j + + · exact k9t5p4_local_0_eq_row_6 j + + · exact k9t5p4_local_0_eq_row_7 j + + · exact k9t5p4_local_0_eq_row_8 j + +private theorem k9t5p4_local_0_paths : ∀ p ∈ k9t5p4_step_0_data.required, p.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_0_data.i k9t5p4_step_0_data.j) 9 := by decide + +private theorem k9t5p4_local_0_bad : k9t5p4_step_0_data.bad.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_0_data.i k9t5p4_step_0_data.j) k9t5p4_local_0 9 5 := by decide + +private theorem k9t5p4_step_0_check : k9t5p4_step_0.Check k9t5p4.graph k9t5p4_state_0 9 5 := by + change k9t5p4_step_0_data.Check k9t5p4.graph k9t5p4_state_0 9 5 + refine ⟨k9t5p4_local_0_paths, ?_⟩ + rw [k9t5p4_local_0_eq] + exact k9t5p4_local_0_bad + +private theorem k9t5p4_update_0 : k9t5p4_step_0.apply k9t5p4_state_0 = k9t5p4_state_1 := by + have h : ∀ i j : Fin 9, k9t5p4_step_0.apply k9t5p4_state_0 i j = k9t5p4_state_1 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_1_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t5p4_state_1 a b ∪ requiredMatrix 9 k9t5p4_step_1_data.required a b) 0 j = k9t5p4_local_1 0 j := by decide + +private theorem k9t5p4_local_1_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t5p4_state_1 a b ∪ requiredMatrix 9 k9t5p4_step_1_data.required a b) 1 j = k9t5p4_local_1 1 j := by decide + +private theorem k9t5p4_local_1_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t5p4_state_1 a b ∪ requiredMatrix 9 k9t5p4_step_1_data.required a b) 2 j = k9t5p4_local_1 2 j := by decide + +private theorem k9t5p4_local_1_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t5p4_state_1 a b ∪ requiredMatrix 9 k9t5p4_step_1_data.required a b) 3 j = k9t5p4_local_1 3 j := by decide + +private theorem k9t5p4_local_1_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t5p4_state_1 a b ∪ requiredMatrix 9 k9t5p4_step_1_data.required a b) 4 j = k9t5p4_local_1 4 j := by decide + +private theorem k9t5p4_local_1_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t5p4_state_1 a b ∪ requiredMatrix 9 k9t5p4_step_1_data.required a b) 5 j = k9t5p4_local_1 5 j := by decide + +private theorem k9t5p4_local_1_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t5p4_state_1 a b ∪ requiredMatrix 9 k9t5p4_step_1_data.required a b) 6 j = k9t5p4_local_1 6 j := by decide + +private theorem k9t5p4_local_1_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t5p4_state_1 a b ∪ requiredMatrix 9 k9t5p4_step_1_data.required a b) 7 j = k9t5p4_local_1 7 j := by decide + +private theorem k9t5p4_local_1_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t5p4_state_1 a b ∪ requiredMatrix 9 k9t5p4_step_1_data.required a b) 8 j = k9t5p4_local_1 8 j := by decide + +private theorem k9t5p4_local_1_eq : (fun a b => k9t5p4_state_1 a b ∪ requiredMatrix 9 k9t5p4_step_1_data.required a b) = k9t5p4_local_1 := by + funext i j + fin_cases i + + · exact k9t5p4_local_1_eq_row_0 j + + · exact k9t5p4_local_1_eq_row_1 j + + · exact k9t5p4_local_1_eq_row_2 j + + · exact k9t5p4_local_1_eq_row_3 j + + · exact k9t5p4_local_1_eq_row_4 j + + · exact k9t5p4_local_1_eq_row_5 j + + · exact k9t5p4_local_1_eq_row_6 j + + · exact k9t5p4_local_1_eq_row_7 j + + · exact k9t5p4_local_1_eq_row_8 j + +private theorem k9t5p4_local_1_paths : ∀ p ∈ k9t5p4_step_1_data.required, p.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_1_data.i k9t5p4_step_1_data.j) 9 := by decide + +private theorem k9t5p4_local_1_bad : k9t5p4_step_1_data.bad.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_1_data.i k9t5p4_step_1_data.j) k9t5p4_local_1 9 5 := by decide + +private theorem k9t5p4_step_1_check : k9t5p4_step_1.Check k9t5p4.graph k9t5p4_state_1 9 5 := by + change k9t5p4_step_1_data.Check k9t5p4.graph k9t5p4_state_1 9 5 + refine ⟨k9t5p4_local_1_paths, ?_⟩ + rw [k9t5p4_local_1_eq] + exact k9t5p4_local_1_bad + +private theorem k9t5p4_update_1 : k9t5p4_step_1.apply k9t5p4_state_1 = k9t5p4_state_2 := by + have h : ∀ i j : Fin 9, k9t5p4_step_1.apply k9t5p4_state_1 i j = k9t5p4_state_2 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_2_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t5p4_state_2 a b ∪ requiredMatrix 9 k9t5p4_step_2_data.required a b) 0 j = k9t5p4_local_2 0 j := by decide + +private theorem k9t5p4_local_2_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t5p4_state_2 a b ∪ requiredMatrix 9 k9t5p4_step_2_data.required a b) 1 j = k9t5p4_local_2 1 j := by decide + +private theorem k9t5p4_local_2_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t5p4_state_2 a b ∪ requiredMatrix 9 k9t5p4_step_2_data.required a b) 2 j = k9t5p4_local_2 2 j := by decide + +private theorem k9t5p4_local_2_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t5p4_state_2 a b ∪ requiredMatrix 9 k9t5p4_step_2_data.required a b) 3 j = k9t5p4_local_2 3 j := by decide + +private theorem k9t5p4_local_2_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t5p4_state_2 a b ∪ requiredMatrix 9 k9t5p4_step_2_data.required a b) 4 j = k9t5p4_local_2 4 j := by decide + +private theorem k9t5p4_local_2_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t5p4_state_2 a b ∪ requiredMatrix 9 k9t5p4_step_2_data.required a b) 5 j = k9t5p4_local_2 5 j := by decide + +private theorem k9t5p4_local_2_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t5p4_state_2 a b ∪ requiredMatrix 9 k9t5p4_step_2_data.required a b) 6 j = k9t5p4_local_2 6 j := by decide + +private theorem k9t5p4_local_2_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t5p4_state_2 a b ∪ requiredMatrix 9 k9t5p4_step_2_data.required a b) 7 j = k9t5p4_local_2 7 j := by decide + +private theorem k9t5p4_local_2_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t5p4_state_2 a b ∪ requiredMatrix 9 k9t5p4_step_2_data.required a b) 8 j = k9t5p4_local_2 8 j := by decide + +private theorem k9t5p4_local_2_eq : (fun a b => k9t5p4_state_2 a b ∪ requiredMatrix 9 k9t5p4_step_2_data.required a b) = k9t5p4_local_2 := by + funext i j + fin_cases i + + · exact k9t5p4_local_2_eq_row_0 j + + · exact k9t5p4_local_2_eq_row_1 j + + · exact k9t5p4_local_2_eq_row_2 j + + · exact k9t5p4_local_2_eq_row_3 j + + · exact k9t5p4_local_2_eq_row_4 j + + · exact k9t5p4_local_2_eq_row_5 j + + · exact k9t5p4_local_2_eq_row_6 j + + · exact k9t5p4_local_2_eq_row_7 j + + · exact k9t5p4_local_2_eq_row_8 j + +private theorem k9t5p4_local_2_paths : ∀ p ∈ k9t5p4_step_2_data.required, p.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_2_data.i k9t5p4_step_2_data.j) 9 := by decide + +private theorem k9t5p4_local_2_bad : k9t5p4_step_2_data.bad.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_2_data.i k9t5p4_step_2_data.j) k9t5p4_local_2 9 5 := by decide + +private theorem k9t5p4_step_2_check : k9t5p4_step_2.Check k9t5p4.graph k9t5p4_state_2 9 5 := by + change k9t5p4_step_2_data.Check k9t5p4.graph k9t5p4_state_2 9 5 + refine ⟨k9t5p4_local_2_paths, ?_⟩ + rw [k9t5p4_local_2_eq] + exact k9t5p4_local_2_bad + +private theorem k9t5p4_update_2 : k9t5p4_step_2.apply k9t5p4_state_2 = k9t5p4_state_3 := by + have h : ∀ i j : Fin 9, k9t5p4_step_2.apply k9t5p4_state_2 i j = k9t5p4_state_3 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_4 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[{0, 2, 3, 4, 5, 6}, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {1, 2}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_3_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t5p4_state_3 a b ∪ requiredMatrix 9 k9t5p4_step_3_data.required a b) 0 j = k9t5p4_local_3 0 j := by decide + +private theorem k9t5p4_local_3_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t5p4_state_3 a b ∪ requiredMatrix 9 k9t5p4_step_3_data.required a b) 1 j = k9t5p4_local_3 1 j := by decide + +private theorem k9t5p4_local_3_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t5p4_state_3 a b ∪ requiredMatrix 9 k9t5p4_step_3_data.required a b) 2 j = k9t5p4_local_3 2 j := by decide + +private theorem k9t5p4_local_3_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t5p4_state_3 a b ∪ requiredMatrix 9 k9t5p4_step_3_data.required a b) 3 j = k9t5p4_local_3 3 j := by decide + +private theorem k9t5p4_local_3_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t5p4_state_3 a b ∪ requiredMatrix 9 k9t5p4_step_3_data.required a b) 4 j = k9t5p4_local_3 4 j := by decide + +private theorem k9t5p4_local_3_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t5p4_state_3 a b ∪ requiredMatrix 9 k9t5p4_step_3_data.required a b) 5 j = k9t5p4_local_3 5 j := by decide + +private theorem k9t5p4_local_3_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t5p4_state_3 a b ∪ requiredMatrix 9 k9t5p4_step_3_data.required a b) 6 j = k9t5p4_local_3 6 j := by decide + +private theorem k9t5p4_local_3_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t5p4_state_3 a b ∪ requiredMatrix 9 k9t5p4_step_3_data.required a b) 7 j = k9t5p4_local_3 7 j := by decide + +private theorem k9t5p4_local_3_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t5p4_state_3 a b ∪ requiredMatrix 9 k9t5p4_step_3_data.required a b) 8 j = k9t5p4_local_3 8 j := by decide + +private theorem k9t5p4_local_3_eq : (fun a b => k9t5p4_state_3 a b ∪ requiredMatrix 9 k9t5p4_step_3_data.required a b) = k9t5p4_local_3 := by + funext i j + fin_cases i + + · exact k9t5p4_local_3_eq_row_0 j + + · exact k9t5p4_local_3_eq_row_1 j + + · exact k9t5p4_local_3_eq_row_2 j + + · exact k9t5p4_local_3_eq_row_3 j + + · exact k9t5p4_local_3_eq_row_4 j + + · exact k9t5p4_local_3_eq_row_5 j + + · exact k9t5p4_local_3_eq_row_6 j + + · exact k9t5p4_local_3_eq_row_7 j + + · exact k9t5p4_local_3_eq_row_8 j + +private theorem k9t5p4_local_3_paths : ∀ p ∈ k9t5p4_step_3_data.required, p.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_3_data.i k9t5p4_step_3_data.j) 9 := by decide + +private theorem k9t5p4_local_3_bad : k9t5p4_step_3_data.bad.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_3_data.i k9t5p4_step_3_data.j) k9t5p4_local_3 9 5 := by decide + +private theorem k9t5p4_step_3_check : k9t5p4_step_3.Check k9t5p4.graph k9t5p4_state_3 9 5 := by + change k9t5p4_step_3_data.Check k9t5p4.graph k9t5p4_state_3 9 5 + refine ⟨k9t5p4_local_3_paths, ?_⟩ + rw [k9t5p4_local_3_eq] + exact k9t5p4_local_3_bad + +private theorem k9t5p4_update_3 : k9t5p4_step_3.apply k9t5p4_state_3 = k9t5p4_state_4 := by + have h : ∀ i j : Fin 9, k9t5p4_step_3.apply k9t5p4_state_3 i j = k9t5p4_state_4 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_5 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 1 5, {0, 1}, {0, 1}, {0, 1}, Finset.Icc 0 4, {1}, Finset.Icc 0 4, {0, 1}, {0, 1}], + #[Finset.Icc 1 5, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {0, 1}], + #[{1}, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, {1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {0, 1}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_4_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1, 2}, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, {0}, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, {0}, {0}, {0}, ∅, ∅, ∅, ∅, ∅, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_4_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_0) 0 j = k9t5p4_local_4_required_0 0 j := by decide + +private theorem k9t5p4_local_4_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_0) 1 j = k9t5p4_local_4_required_0 1 j := by decide + +private theorem k9t5p4_local_4_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_0) 2 j = k9t5p4_local_4_required_0 2 j := by decide + +private theorem k9t5p4_local_4_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_0) 3 j = k9t5p4_local_4_required_0 3 j := by decide + +private theorem k9t5p4_local_4_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_0) 4 j = k9t5p4_local_4_required_0 4 j := by decide + +private theorem k9t5p4_local_4_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_0) 5 j = k9t5p4_local_4_required_0 5 j := by decide + +private theorem k9t5p4_local_4_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_0) 6 j = k9t5p4_local_4_required_0 6 j := by decide + +private theorem k9t5p4_local_4_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_0) 7 j = k9t5p4_local_4_required_0 7 j := by decide + +private theorem k9t5p4_local_4_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_0) 8 j = k9t5p4_local_4_required_0 8 j := by decide + +private theorem k9t5p4_local_4_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_0) 9 j = k9t5p4_local_4_required_0 9 j := by decide + +private theorem k9t5p4_local_4_required_0_eq : (requiredMatrix 9 k9t5p4_step_4_required_block_0) = k9t5p4_local_4_required_0 := by + funext i j + fin_cases i + + · exact k9t5p4_local_4_required_0_eq_row_0 j + + · exact k9t5p4_local_4_required_0_eq_row_1 j + + · exact k9t5p4_local_4_required_0_eq_row_2 j + + · exact k9t5p4_local_4_required_0_eq_row_3 j + + · exact k9t5p4_local_4_required_0_eq_row_4 j + + · exact k9t5p4_local_4_required_0_eq_row_5 j + + · exact k9t5p4_local_4_required_0_eq_row_6 j + + · exact k9t5p4_local_4_required_0_eq_row_7 j + + · exact k9t5p4_local_4_required_0_eq_row_8 j + + · exact k9t5p4_local_4_required_0_eq_row_9 j + +private theorem k9t5p4_local_4_path_0_0 : (⟨1, 0, [2, 3, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_0_1 : (⟨1, 0, [2, 9, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_0_2 : (⟨1, 7, [0, 6, 5, 4, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_0_3 : (⟨1, 7, [0, 6, 5, 4, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_0_4 : (⟨1, 5, [0, 6, 7, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_0_5 : (⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_0_6 : (⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_0_7 : (⟨5, 0, [4, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_0_8 : (⟨5, 3, [4, 1, 0, 6, 7, 8, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_0_9 : (⟨5, 2, [4, 1, 0, 6, 7, 8, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_0_10 : (⟨5, 9, [4, 2, 1, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_0_11 : (⟨5, 9, [4, 2, 3, 1, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_paths_block_0 : ∀ p ∈ k9t5p4_step_4_required_block_0, p.Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by + simp only [k9t5p4_step_4_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_4_path_0_0, k9t5p4_local_4_path_0_1, k9t5p4_local_4_path_0_2, k9t5p4_local_4_path_0_3, k9t5p4_local_4_path_0_4, k9t5p4_local_4_path_0_5, k9t5p4_local_4_path_0_6, k9t5p4_local_4_path_0_7, k9t5p4_local_4_path_0_8, k9t5p4_local_4_path_0_9, k9t5p4_local_4_path_0_10, k9t5p4_local_4_path_0_11⟩ + +private def k9t5p4_local_4_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, {3, 4}, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3, 4}, {0}, ∅, ∅, ∅, ∅, ∅, {0, 1}, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, {1}, {0}, ∅, {0, 1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_4_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_1) 0 j = k9t5p4_local_4_required_1 0 j := by decide + +private theorem k9t5p4_local_4_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_1) 1 j = k9t5p4_local_4_required_1 1 j := by decide + +private theorem k9t5p4_local_4_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_1) 2 j = k9t5p4_local_4_required_1 2 j := by decide + +private theorem k9t5p4_local_4_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_1) 3 j = k9t5p4_local_4_required_1 3 j := by decide + +private theorem k9t5p4_local_4_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_1) 4 j = k9t5p4_local_4_required_1 4 j := by decide + +private theorem k9t5p4_local_4_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_1) 5 j = k9t5p4_local_4_required_1 5 j := by decide + +private theorem k9t5p4_local_4_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_1) 6 j = k9t5p4_local_4_required_1 6 j := by decide + +private theorem k9t5p4_local_4_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_1) 7 j = k9t5p4_local_4_required_1 7 j := by decide + +private theorem k9t5p4_local_4_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_1) 8 j = k9t5p4_local_4_required_1 8 j := by decide + +private theorem k9t5p4_local_4_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_1) 9 j = k9t5p4_local_4_required_1 9 j := by decide + +private theorem k9t5p4_local_4_required_1_eq : (requiredMatrix 9 k9t5p4_step_4_required_block_1) = k9t5p4_local_4_required_1 := by + funext i j + fin_cases i + + · exact k9t5p4_local_4_required_1_eq_row_0 j + + · exact k9t5p4_local_4_required_1_eq_row_1 j + + · exact k9t5p4_local_4_required_1_eq_row_2 j + + · exact k9t5p4_local_4_required_1_eq_row_3 j + + · exact k9t5p4_local_4_required_1_eq_row_4 j + + · exact k9t5p4_local_4_required_1_eq_row_5 j + + · exact k9t5p4_local_4_required_1_eq_row_6 j + + · exact k9t5p4_local_4_required_1_eq_row_7 j + + · exact k9t5p4_local_4_required_1_eq_row_8 j + + · exact k9t5p4_local_4_required_1_eq_row_9 j + +private theorem k9t5p4_local_4_path_1_0 : (⟨5, 1, [4, 2, 3, 9, 8, 7, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_1_1 : (⟨5, 0, [4, 2, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_1_2 : (⟨5, 8, [4, 2, 9, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_1_3 : (⟨5, 0, [4, 2, 9, 3, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_1_4 : (⟨5, 7, [4, 2, 9, 3, 1, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_1_5 : (⟨5, 8, [4, 2, 9, 3, 1, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_1_6 : (⟨5, 7, [6, 0, 1, 2, 3, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_1_7 : (⟨7, 0, [6, 5, 4, 2, 9, 3, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_1_8 : (⟨7, 5, [6, 0, 1, 2, 9, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_1_9 : (⟨7, 0, [8, 9, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_1_10 : (⟨7, 2, [8, 9, 1, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_1_11 : (⟨7, 3, [8, 9, 1, 0, 6, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_paths_block_1 : ∀ p ∈ k9t5p4_step_4_required_block_1, p.Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by + simp only [k9t5p4_step_4_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_4_path_1_0, k9t5p4_local_4_path_1_1, k9t5p4_local_4_path_1_2, k9t5p4_local_4_path_1_3, k9t5p4_local_4_path_1_4, k9t5p4_local_4_path_1_5, k9t5p4_local_4_path_1_6, k9t5p4_local_4_path_1_7, k9t5p4_local_4_path_1_8, k9t5p4_local_4_path_1_9, k9t5p4_local_4_path_1_10, k9t5p4_local_4_path_1_11⟩ + +private def k9t5p4_local_4_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, {0, 1}, {1}, {3}, ∅, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3}, {0, 1}, {0}, {1}, {0, 1}, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_4_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_2) 0 j = k9t5p4_local_4_required_2 0 j := by decide + +private theorem k9t5p4_local_4_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_2) 1 j = k9t5p4_local_4_required_2 1 j := by decide + +private theorem k9t5p4_local_4_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_2) 2 j = k9t5p4_local_4_required_2 2 j := by decide + +private theorem k9t5p4_local_4_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_2) 3 j = k9t5p4_local_4_required_2 3 j := by decide + +private theorem k9t5p4_local_4_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_2) 4 j = k9t5p4_local_4_required_2 4 j := by decide + +private theorem k9t5p4_local_4_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_2) 5 j = k9t5p4_local_4_required_2 5 j := by decide + +private theorem k9t5p4_local_4_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_2) 6 j = k9t5p4_local_4_required_2 6 j := by decide + +private theorem k9t5p4_local_4_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_2) 7 j = k9t5p4_local_4_required_2 7 j := by decide + +private theorem k9t5p4_local_4_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_2) 8 j = k9t5p4_local_4_required_2 8 j := by decide + +private theorem k9t5p4_local_4_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_2) 9 j = k9t5p4_local_4_required_2 9 j := by decide + +private theorem k9t5p4_local_4_required_2_eq : (requiredMatrix 9 k9t5p4_step_4_required_block_2) = k9t5p4_local_4_required_2 := by + funext i j + fin_cases i + + · exact k9t5p4_local_4_required_2_eq_row_0 j + + · exact k9t5p4_local_4_required_2_eq_row_1 j + + · exact k9t5p4_local_4_required_2_eq_row_2 j + + · exact k9t5p4_local_4_required_2_eq_row_3 j + + · exact k9t5p4_local_4_required_2_eq_row_4 j + + · exact k9t5p4_local_4_required_2_eq_row_5 j + + · exact k9t5p4_local_4_required_2_eq_row_6 j + + · exact k9t5p4_local_4_required_2_eq_row_7 j + + · exact k9t5p4_local_4_required_2_eq_row_8 j + + · exact k9t5p4_local_4_required_2_eq_row_9 j + +private theorem k9t5p4_local_4_path_2_0 : (⟨7, 3, [8, 9, 1, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_2_1 : (⟨7, 2, [8, 9, 1, 0, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_2_2 : (⟨7, 4, [8, 9, 2, 1, 0, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_2_3 : (⟨7, 4, [8, 9, 2, 3, 1, 0, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_2_4 : (⟨7, 5, [8, 9, 2, 3, 4, 1, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_2_5 : (⟨7, 1, [8, 9, 2, 3, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_2_6 : (⟨7, 1, [8, 9, 2, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_2_7 : (⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_2_8 : (⟨0, 6, [1, 2, 3, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_2_9 : (⟨0, 5, [1, 2, 3, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_2_10 : (⟨0, 7, [1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_2_11 : (⟨0, 5, [1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_paths_block_2 : ∀ p ∈ k9t5p4_step_4_required_block_2, p.Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by + simp only [k9t5p4_step_4_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_4_path_2_0, k9t5p4_local_4_path_2_1, k9t5p4_local_4_path_2_2, k9t5p4_local_4_path_2_3, k9t5p4_local_4_path_2_4, k9t5p4_local_4_path_2_5, k9t5p4_local_4_path_2_6, k9t5p4_local_4_path_2_7, k9t5p4_local_4_path_2_8, k9t5p4_local_4_path_2_9, k9t5p4_local_4_path_2_10, k9t5p4_local_4_path_2_11⟩ + +private def k9t5p4_local_4_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {0, 1}, {0, 1}, {0, 1}, ∅, ∅, {1, 2, 4}, {0, 1}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_4_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_3) 0 j = k9t5p4_local_4_required_3 0 j := by decide + +private theorem k9t5p4_local_4_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_3) 1 j = k9t5p4_local_4_required_3 1 j := by decide + +private theorem k9t5p4_local_4_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_3) 2 j = k9t5p4_local_4_required_3 2 j := by decide + +private theorem k9t5p4_local_4_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_3) 3 j = k9t5p4_local_4_required_3 3 j := by decide + +private theorem k9t5p4_local_4_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_3) 4 j = k9t5p4_local_4_required_3 4 j := by decide + +private theorem k9t5p4_local_4_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_3) 5 j = k9t5p4_local_4_required_3 5 j := by decide + +private theorem k9t5p4_local_4_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_3) 6 j = k9t5p4_local_4_required_3 6 j := by decide + +private theorem k9t5p4_local_4_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_3) 7 j = k9t5p4_local_4_required_3 7 j := by decide + +private theorem k9t5p4_local_4_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_3) 8 j = k9t5p4_local_4_required_3 8 j := by decide + +private theorem k9t5p4_local_4_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_3) 9 j = k9t5p4_local_4_required_3 9 j := by decide + +private theorem k9t5p4_local_4_required_3_eq : (requiredMatrix 9 k9t5p4_step_4_required_block_3) = k9t5p4_local_4_required_3 := by + funext i j + fin_cases i + + · exact k9t5p4_local_4_required_3_eq_row_0 j + + · exact k9t5p4_local_4_required_3_eq_row_1 j + + · exact k9t5p4_local_4_required_3_eq_row_2 j + + · exact k9t5p4_local_4_required_3_eq_row_3 j + + · exact k9t5p4_local_4_required_3_eq_row_4 j + + · exact k9t5p4_local_4_required_3_eq_row_5 j + + · exact k9t5p4_local_4_required_3_eq_row_6 j + + · exact k9t5p4_local_4_required_3_eq_row_7 j + + · exact k9t5p4_local_4_required_3_eq_row_8 j + + · exact k9t5p4_local_4_required_3_eq_row_9 j + +private theorem k9t5p4_local_4_path_3_0 : (⟨0, 4, [1, 2, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_3_1 : (⟨0, 9, [1, 2, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_3_2 : (⟨0, 7, [1, 2, 9, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_3_3 : (⟨0, 8, [1, 2, 9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_3_4 : (⟨0, 7, [1, 2, 9, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_3_5 : (⟨0, 8, [1, 2, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_3_6 : (⟨0, 7, [1, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_3_7 : (⟨0, 4, [1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_3_8 : (⟨0, 3, [1, 2, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_3_9 : (⟨0, 2, [1, 3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_3_10 : (⟨0, 2, [1, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_3_11 : (⟨0, 3, [1, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_paths_block_3 : ∀ p ∈ k9t5p4_step_4_required_block_3, p.Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by + simp only [k9t5p4_step_4_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_4_path_3_0, k9t5p4_local_4_path_3_1, k9t5p4_local_4_path_3_2, k9t5p4_local_4_path_3_3, k9t5p4_local_4_path_3_4, k9t5p4_local_4_path_3_5, k9t5p4_local_4_path_3_6, k9t5p4_local_4_path_3_7, k9t5p4_local_4_path_3_8, k9t5p4_local_4_path_3_9, k9t5p4_local_4_path_3_10, k9t5p4_local_4_path_3_11⟩ + +private def k9t5p4_local_4_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_4_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_4) 0 j = k9t5p4_local_4_required_4 0 j := by decide + +private theorem k9t5p4_local_4_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_4) 1 j = k9t5p4_local_4_required_4 1 j := by decide + +private theorem k9t5p4_local_4_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_4) 2 j = k9t5p4_local_4_required_4 2 j := by decide + +private theorem k9t5p4_local_4_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_4) 3 j = k9t5p4_local_4_required_4 3 j := by decide + +private theorem k9t5p4_local_4_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_4) 4 j = k9t5p4_local_4_required_4 4 j := by decide + +private theorem k9t5p4_local_4_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_4) 5 j = k9t5p4_local_4_required_4 5 j := by decide + +private theorem k9t5p4_local_4_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_4) 6 j = k9t5p4_local_4_required_4 6 j := by decide + +private theorem k9t5p4_local_4_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_4) 7 j = k9t5p4_local_4_required_4 7 j := by decide + +private theorem k9t5p4_local_4_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_4) 8 j = k9t5p4_local_4_required_4 8 j := by decide + +private theorem k9t5p4_local_4_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_4_required_block_4) 9 j = k9t5p4_local_4_required_4 9 j := by decide + +private theorem k9t5p4_local_4_required_4_eq : (requiredMatrix 9 k9t5p4_step_4_required_block_4) = k9t5p4_local_4_required_4 := by + funext i j + fin_cases i + + · exact k9t5p4_local_4_required_4_eq_row_0 j + + · exact k9t5p4_local_4_required_4_eq_row_1 j + + · exact k9t5p4_local_4_required_4_eq_row_2 j + + · exact k9t5p4_local_4_required_4_eq_row_3 j + + · exact k9t5p4_local_4_required_4_eq_row_4 j + + · exact k9t5p4_local_4_required_4_eq_row_5 j + + · exact k9t5p4_local_4_required_4_eq_row_6 j + + · exact k9t5p4_local_4_required_4_eq_row_7 j + + · exact k9t5p4_local_4_required_4_eq_row_8 j + + · exact k9t5p4_local_4_required_4_eq_row_9 j + +private theorem k9t5p4_local_4_path_4_0 : (⟨0, 1, [6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_4_1 : (⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_4_2 : (⟨0, 1, [6, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_4_3 : (⟨0, 1, [6, 5, 4, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_4_4 : (⟨0, 1, [6, 5, 4, 2, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_path_4_5 : (⟨0, 1, [6, 7, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by decide + +private theorem k9t5p4_local_4_paths_block_4 : ∀ p ∈ k9t5p4_step_4_required_block_4, p.Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by + simp only [k9t5p4_step_4_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_4_path_4_0, k9t5p4_local_4_path_4_1, k9t5p4_local_4_path_4_2, k9t5p4_local_4_path_4_3, k9t5p4_local_4_path_4_4, k9t5p4_local_4_path_4_5⟩ + +private theorem k9t5p4_local_4_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_4 a b ∪ (((((k9t5p4_local_4_required_0 a b ∪ k9t5p4_local_4_required_1 a b) ∪ k9t5p4_local_4_required_2 a b) ∪ k9t5p4_local_4_required_3 a b) ∪ k9t5p4_local_4_required_4 a b))) 0 j = k9t5p4_local_4 0 j := by decide + +private theorem k9t5p4_local_4_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_4 a b ∪ (((((k9t5p4_local_4_required_0 a b ∪ k9t5p4_local_4_required_1 a b) ∪ k9t5p4_local_4_required_2 a b) ∪ k9t5p4_local_4_required_3 a b) ∪ k9t5p4_local_4_required_4 a b))) 1 j = k9t5p4_local_4 1 j := by decide + +private theorem k9t5p4_local_4_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_4 a b ∪ (((((k9t5p4_local_4_required_0 a b ∪ k9t5p4_local_4_required_1 a b) ∪ k9t5p4_local_4_required_2 a b) ∪ k9t5p4_local_4_required_3 a b) ∪ k9t5p4_local_4_required_4 a b))) 2 j = k9t5p4_local_4 2 j := by decide + +private theorem k9t5p4_local_4_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_4 a b ∪ (((((k9t5p4_local_4_required_0 a b ∪ k9t5p4_local_4_required_1 a b) ∪ k9t5p4_local_4_required_2 a b) ∪ k9t5p4_local_4_required_3 a b) ∪ k9t5p4_local_4_required_4 a b))) 3 j = k9t5p4_local_4 3 j := by decide + +private theorem k9t5p4_local_4_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_4 a b ∪ (((((k9t5p4_local_4_required_0 a b ∪ k9t5p4_local_4_required_1 a b) ∪ k9t5p4_local_4_required_2 a b) ∪ k9t5p4_local_4_required_3 a b) ∪ k9t5p4_local_4_required_4 a b))) 4 j = k9t5p4_local_4 4 j := by decide + +private theorem k9t5p4_local_4_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_4 a b ∪ (((((k9t5p4_local_4_required_0 a b ∪ k9t5p4_local_4_required_1 a b) ∪ k9t5p4_local_4_required_2 a b) ∪ k9t5p4_local_4_required_3 a b) ∪ k9t5p4_local_4_required_4 a b))) 5 j = k9t5p4_local_4 5 j := by decide + +private theorem k9t5p4_local_4_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_4 a b ∪ (((((k9t5p4_local_4_required_0 a b ∪ k9t5p4_local_4_required_1 a b) ∪ k9t5p4_local_4_required_2 a b) ∪ k9t5p4_local_4_required_3 a b) ∪ k9t5p4_local_4_required_4 a b))) 6 j = k9t5p4_local_4 6 j := by decide + +private theorem k9t5p4_local_4_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_4 a b ∪ (((((k9t5p4_local_4_required_0 a b ∪ k9t5p4_local_4_required_1 a b) ∪ k9t5p4_local_4_required_2 a b) ∪ k9t5p4_local_4_required_3 a b) ∪ k9t5p4_local_4_required_4 a b))) 7 j = k9t5p4_local_4 7 j := by decide + +private theorem k9t5p4_local_4_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_4 a b ∪ (((((k9t5p4_local_4_required_0 a b ∪ k9t5p4_local_4_required_1 a b) ∪ k9t5p4_local_4_required_2 a b) ∪ k9t5p4_local_4_required_3 a b) ∪ k9t5p4_local_4_required_4 a b))) 8 j = k9t5p4_local_4 8 j := by decide + +private theorem k9t5p4_local_4_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_4 a b ∪ (((((k9t5p4_local_4_required_0 a b ∪ k9t5p4_local_4_required_1 a b) ∪ k9t5p4_local_4_required_2 a b) ∪ k9t5p4_local_4_required_3 a b) ∪ k9t5p4_local_4_required_4 a b))) 9 j = k9t5p4_local_4 9 j := by decide + +private theorem k9t5p4_local_4_merged_eq : (fun a b => freshMatrix k9t5p4_state_4 a b ∪ (((((k9t5p4_local_4_required_0 a b ∪ k9t5p4_local_4_required_1 a b) ∪ k9t5p4_local_4_required_2 a b) ∪ k9t5p4_local_4_required_3 a b) ∪ k9t5p4_local_4_required_4 a b))) = k9t5p4_local_4 := by + funext i j + fin_cases i + + · exact k9t5p4_local_4_merged_eq_row_0 j + + · exact k9t5p4_local_4_merged_eq_row_1 j + + · exact k9t5p4_local_4_merged_eq_row_2 j + + · exact k9t5p4_local_4_merged_eq_row_3 j + + · exact k9t5p4_local_4_merged_eq_row_4 j + + · exact k9t5p4_local_4_merged_eq_row_5 j + + · exact k9t5p4_local_4_merged_eq_row_6 j + + · exact k9t5p4_local_4_merged_eq_row_7 j + + · exact k9t5p4_local_4_merged_eq_row_8 j + + · exact k9t5p4_local_4_merged_eq_row_9 j + +private theorem k9t5p4_local_4_eq : (fun a b => freshMatrix k9t5p4_state_4 a b ∪ requiredMatrix 9 k9t5p4_step_4_data.required a b) = k9t5p4_local_4 := by + funext a b + change freshMatrix k9t5p4_state_4 a b ∪ requiredMatrix 9 (k9t5p4_step_4_required_block_0 ++ k9t5p4_step_4_required_block_1 ++ k9t5p4_step_4_required_block_2 ++ k9t5p4_step_4_required_block_3 ++ k9t5p4_step_4_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t5p4_local_4_required_0_eq, k9t5p4_local_4_required_1_eq, k9t5p4_local_4_required_2_eq, k9t5p4_local_4_required_3_eq, k9t5p4_local_4_required_4_eq] + exact congrFun (congrFun k9t5p4_local_4_merged_eq a) b + +private theorem k9t5p4_local_4_paths : ∀ p ∈ k9t5p4_step_4_data.required, p.Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 := by + change ∀ p ∈ (k9t5p4_step_4_required_block_0 ++ k9t5p4_step_4_required_block_1 ++ k9t5p4_step_4_required_block_2 ++ k9t5p4_step_4_required_block_3 ++ k9t5p4_step_4_required_block_4), p.Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t5p4_local_4_paths_block_0, k9t5p4_local_4_paths_block_1⟩, k9t5p4_local_4_paths_block_2⟩, k9t5p4_local_4_paths_block_3⟩, k9t5p4_local_4_paths_block_4⟩ + +private theorem k9t5p4_local_4_bad : k9t5p4_step_4_data.bad.Check (freshGraph k9t5p4.graph k9t5p4_step_4_data.i k9t5p4_step_4_data.j) k9t5p4_local_4 9 5 := by decide + +private theorem k9t5p4_step_4_check : k9t5p4_step_4.Check k9t5p4.graph k9t5p4_state_4 9 5 := by + change k9t5p4_step_4_data.Check k9t5p4.graph k9t5p4_state_4 9 5 + refine ⟨by decide, k9t5p4_local_4_paths, ?_⟩ + rw [k9t5p4_local_4_eq] + exact k9t5p4_local_4_bad + +private theorem k9t5p4_update_4 : k9t5p4_step_4.apply k9t5p4_state_4 = k9t5p4_state_5 := by + have h : ∀ i j : Fin 9, k9t5p4_step_4.apply k9t5p4_state_4 i j = k9t5p4_state_5 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_6 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_5 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {1, 2}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_5_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t5p4_state_5 a b ∪ requiredMatrix 9 k9t5p4_step_5_data.required a b) 0 j = k9t5p4_local_5 0 j := by decide + +private theorem k9t5p4_local_5_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t5p4_state_5 a b ∪ requiredMatrix 9 k9t5p4_step_5_data.required a b) 1 j = k9t5p4_local_5 1 j := by decide + +private theorem k9t5p4_local_5_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t5p4_state_5 a b ∪ requiredMatrix 9 k9t5p4_step_5_data.required a b) 2 j = k9t5p4_local_5 2 j := by decide + +private theorem k9t5p4_local_5_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t5p4_state_5 a b ∪ requiredMatrix 9 k9t5p4_step_5_data.required a b) 3 j = k9t5p4_local_5 3 j := by decide + +private theorem k9t5p4_local_5_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t5p4_state_5 a b ∪ requiredMatrix 9 k9t5p4_step_5_data.required a b) 4 j = k9t5p4_local_5 4 j := by decide + +private theorem k9t5p4_local_5_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t5p4_state_5 a b ∪ requiredMatrix 9 k9t5p4_step_5_data.required a b) 5 j = k9t5p4_local_5 5 j := by decide + +private theorem k9t5p4_local_5_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t5p4_state_5 a b ∪ requiredMatrix 9 k9t5p4_step_5_data.required a b) 6 j = k9t5p4_local_5 6 j := by decide + +private theorem k9t5p4_local_5_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t5p4_state_5 a b ∪ requiredMatrix 9 k9t5p4_step_5_data.required a b) 7 j = k9t5p4_local_5 7 j := by decide + +private theorem k9t5p4_local_5_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t5p4_state_5 a b ∪ requiredMatrix 9 k9t5p4_step_5_data.required a b) 8 j = k9t5p4_local_5 8 j := by decide + +private theorem k9t5p4_local_5_eq : (fun a b => k9t5p4_state_5 a b ∪ requiredMatrix 9 k9t5p4_step_5_data.required a b) = k9t5p4_local_5 := by + funext i j + fin_cases i + + · exact k9t5p4_local_5_eq_row_0 j + + · exact k9t5p4_local_5_eq_row_1 j + + · exact k9t5p4_local_5_eq_row_2 j + + · exact k9t5p4_local_5_eq_row_3 j + + · exact k9t5p4_local_5_eq_row_4 j + + · exact k9t5p4_local_5_eq_row_5 j + + · exact k9t5p4_local_5_eq_row_6 j + + · exact k9t5p4_local_5_eq_row_7 j + + · exact k9t5p4_local_5_eq_row_8 j + +private theorem k9t5p4_local_5_paths : ∀ p ∈ k9t5p4_step_5_data.required, p.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_5_data.i k9t5p4_step_5_data.j) 9 := by decide + +private theorem k9t5p4_local_5_bad : k9t5p4_step_5_data.bad.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_5_data.i k9t5p4_step_5_data.j) k9t5p4_local_5 9 5 := by decide + +private theorem k9t5p4_step_5_check : k9t5p4_step_5.Check k9t5p4.graph k9t5p4_state_5 9 5 := by + change k9t5p4_step_5_data.Check k9t5p4.graph k9t5p4_state_5 9 5 + refine ⟨k9t5p4_local_5_paths, ?_⟩ + rw [k9t5p4_local_5_eq] + exact k9t5p4_local_5_bad + +private theorem k9t5p4_update_5 : k9t5p4_step_5.apply k9t5p4_state_5 = k9t5p4_state_6 := by + have h : ∀ i j : Fin 9, k9t5p4_step_5.apply k9t5p4_state_5 i j = k9t5p4_state_6 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_7 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_6 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1}, Finset.Icc 1 5, {0, 1}, {0, 1}, Finset.Icc 0 4, {1}, Finset.Icc 0 4, {0, 1}, {0, 1}], + #[{0, 1}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 5, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {0, 1}], + #[{1}, Finset.Icc 0 6, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, {1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {0, 1}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_6_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {1, 2}, ∅, ∅, {0, 1, 4}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, {0}, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 4}, ∅, {0}, ∅, ∅, ∅, ∅, ∅, {1}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_6_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_0) 0 j = k9t5p4_local_6_required_0 0 j := by decide + +private theorem k9t5p4_local_6_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_0) 1 j = k9t5p4_local_6_required_0 1 j := by decide + +private theorem k9t5p4_local_6_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_0) 2 j = k9t5p4_local_6_required_0 2 j := by decide + +private theorem k9t5p4_local_6_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_0) 3 j = k9t5p4_local_6_required_0 3 j := by decide + +private theorem k9t5p4_local_6_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_0) 4 j = k9t5p4_local_6_required_0 4 j := by decide + +private theorem k9t5p4_local_6_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_0) 5 j = k9t5p4_local_6_required_0 5 j := by decide + +private theorem k9t5p4_local_6_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_0) 6 j = k9t5p4_local_6_required_0 6 j := by decide + +private theorem k9t5p4_local_6_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_0) 7 j = k9t5p4_local_6_required_0 7 j := by decide + +private theorem k9t5p4_local_6_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_0) 8 j = k9t5p4_local_6_required_0 8 j := by decide + +private theorem k9t5p4_local_6_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_0) 9 j = k9t5p4_local_6_required_0 9 j := by decide + +private theorem k9t5p4_local_6_required_0_eq : (requiredMatrix 9 k9t5p4_step_6_required_block_0) = k9t5p4_local_6_required_0 := by + funext i j + fin_cases i + + · exact k9t5p4_local_6_required_0_eq_row_0 j + + · exact k9t5p4_local_6_required_0_eq_row_1 j + + · exact k9t5p4_local_6_required_0_eq_row_2 j + + · exact k9t5p4_local_6_required_0_eq_row_3 j + + · exact k9t5p4_local_6_required_0_eq_row_4 j + + · exact k9t5p4_local_6_required_0_eq_row_5 j + + · exact k9t5p4_local_6_required_0_eq_row_6 j + + · exact k9t5p4_local_6_required_0_eq_row_7 j + + · exact k9t5p4_local_6_required_0_eq_row_8 j + + · exact k9t5p4_local_6_required_0_eq_row_9 j + +private theorem k9t5p4_local_6_path_0_0 : (⟨2, 0, [1, 3, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_0_1 : (⟨2, 0, [1, 9, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_0_2 : (⟨2, 7, [0, 6, 5, 4, 1, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_0_3 : (⟨2, 7, [0, 6, 5, 4, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_0_4 : (⟨2, 5, [0, 6, 7, 8, 9, 1, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_0_5 : (⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_0_6 : (⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_0_7 : (⟨5, 9, [4, 1, 2, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_0_8 : (⟨5, 9, [4, 1, 3, 2, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_0_9 : (⟨5, 2, [4, 1, 3, 9, 8, 7, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_0_10 : (⟨5, 0, [4, 1, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_0_11 : (⟨5, 8, [4, 1, 9, 2, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_paths_block_0 : ∀ p ∈ k9t5p4_step_6_required_block_0, p.Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by + simp only [k9t5p4_step_6_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_6_path_0_0, k9t5p4_local_6_path_0_1, k9t5p4_local_6_path_0_2, k9t5p4_local_6_path_0_3, k9t5p4_local_6_path_0_4, k9t5p4_local_6_path_0_5, k9t5p4_local_6_path_0_6, k9t5p4_local_6_path_0_7, k9t5p4_local_6_path_0_8, k9t5p4_local_6_path_0_9, k9t5p4_local_6_path_0_10, k9t5p4_local_6_path_0_11⟩ + +private def k9t5p4_local_6_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, {2, 3}, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, {0}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[{2, 3}, {0}, ∅, {0}, ∅, ∅, ∅, {0, 1}, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, {0}, {1}, {0, 1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_6_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_1) 0 j = k9t5p4_local_6_required_1 0 j := by decide + +private theorem k9t5p4_local_6_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_1) 1 j = k9t5p4_local_6_required_1 1 j := by decide + +private theorem k9t5p4_local_6_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_1) 2 j = k9t5p4_local_6_required_1 2 j := by decide + +private theorem k9t5p4_local_6_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_1) 3 j = k9t5p4_local_6_required_1 3 j := by decide + +private theorem k9t5p4_local_6_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_1) 4 j = k9t5p4_local_6_required_1 4 j := by decide + +private theorem k9t5p4_local_6_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_1) 5 j = k9t5p4_local_6_required_1 5 j := by decide + +private theorem k9t5p4_local_6_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_1) 6 j = k9t5p4_local_6_required_1 6 j := by decide + +private theorem k9t5p4_local_6_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_1) 7 j = k9t5p4_local_6_required_1 7 j := by decide + +private theorem k9t5p4_local_6_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_1) 8 j = k9t5p4_local_6_required_1 8 j := by decide + +private theorem k9t5p4_local_6_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_1) 9 j = k9t5p4_local_6_required_1 9 j := by decide + +private theorem k9t5p4_local_6_required_1_eq : (requiredMatrix 9 k9t5p4_step_6_required_block_1) = k9t5p4_local_6_required_1 := by + funext i j + fin_cases i + + · exact k9t5p4_local_6_required_1_eq_row_0 j + + · exact k9t5p4_local_6_required_1_eq_row_1 j + + · exact k9t5p4_local_6_required_1_eq_row_2 j + + · exact k9t5p4_local_6_required_1_eq_row_3 j + + · exact k9t5p4_local_6_required_1_eq_row_4 j + + · exact k9t5p4_local_6_required_1_eq_row_5 j + + · exact k9t5p4_local_6_required_1_eq_row_6 j + + · exact k9t5p4_local_6_required_1_eq_row_7 j + + · exact k9t5p4_local_6_required_1_eq_row_8 j + + · exact k9t5p4_local_6_required_1_eq_row_9 j + +private theorem k9t5p4_local_6_path_1_0 : (⟨5, 0, [4, 1, 9, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_1_1 : (⟨5, 7, [4, 1, 9, 3, 2, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_1_2 : (⟨5, 8, [4, 1, 9, 3, 2, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_1_3 : (⟨5, 0, [4, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_1_4 : (⟨5, 3, [4, 1, 9, 8, 7, 6, 0, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_1_5 : (⟨5, 1, [4, 2, 0, 6, 7, 8, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_1_6 : (⟨5, 7, [6, 0, 2, 1, 3, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_1_7 : (⟨7, 0, [6, 5, 4, 1, 9, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_1_8 : (⟨7, 5, [6, 0, 2, 1, 9, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_1_9 : (⟨7, 0, [8, 9, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_1_10 : (⟨7, 4, [8, 9, 1, 2, 0, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_1_11 : (⟨7, 3, [8, 9, 1, 2, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_paths_block_1 : ∀ p ∈ k9t5p4_step_6_required_block_1, p.Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by + simp only [k9t5p4_step_6_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_6_path_1_0, k9t5p4_local_6_path_1_1, k9t5p4_local_6_path_1_2, k9t5p4_local_6_path_1_3, k9t5p4_local_6_path_1_4, k9t5p4_local_6_path_1_5, k9t5p4_local_6_path_1_6, k9t5p4_local_6_path_1_7, k9t5p4_local_6_path_1_8, k9t5p4_local_6_path_1_9, k9t5p4_local_6_path_1_10, k9t5p4_local_6_path_1_11⟩ + +private def k9t5p4_local_6_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, {0, 1}, {1}, {3}, ∅, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3}, {0, 1}, {0, 1}, {1}, {0}, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_6_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_2) 0 j = k9t5p4_local_6_required_2 0 j := by decide + +private theorem k9t5p4_local_6_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_2) 1 j = k9t5p4_local_6_required_2 1 j := by decide + +private theorem k9t5p4_local_6_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_2) 2 j = k9t5p4_local_6_required_2 2 j := by decide + +private theorem k9t5p4_local_6_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_2) 3 j = k9t5p4_local_6_required_2 3 j := by decide + +private theorem k9t5p4_local_6_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_2) 4 j = k9t5p4_local_6_required_2 4 j := by decide + +private theorem k9t5p4_local_6_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_2) 5 j = k9t5p4_local_6_required_2 5 j := by decide + +private theorem k9t5p4_local_6_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_2) 6 j = k9t5p4_local_6_required_2 6 j := by decide + +private theorem k9t5p4_local_6_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_2) 7 j = k9t5p4_local_6_required_2 7 j := by decide + +private theorem k9t5p4_local_6_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_2) 8 j = k9t5p4_local_6_required_2 8 j := by decide + +private theorem k9t5p4_local_6_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_2) 9 j = k9t5p4_local_6_required_2 9 j := by decide + +private theorem k9t5p4_local_6_required_2_eq : (requiredMatrix 9 k9t5p4_step_6_required_block_2) = k9t5p4_local_6_required_2 := by + funext i j + fin_cases i + + · exact k9t5p4_local_6_required_2_eq_row_0 j + + · exact k9t5p4_local_6_required_2_eq_row_1 j + + · exact k9t5p4_local_6_required_2_eq_row_2 j + + · exact k9t5p4_local_6_required_2_eq_row_3 j + + · exact k9t5p4_local_6_required_2_eq_row_4 j + + · exact k9t5p4_local_6_required_2_eq_row_5 j + + · exact k9t5p4_local_6_required_2_eq_row_6 j + + · exact k9t5p4_local_6_required_2_eq_row_7 j + + · exact k9t5p4_local_6_required_2_eq_row_8 j + + · exact k9t5p4_local_6_required_2_eq_row_9 j + +private theorem k9t5p4_local_6_path_2_0 : (⟨7, 4, [8, 9, 1, 3, 2, 0, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_2_1 : (⟨7, 5, [8, 9, 1, 3, 4, 2, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_2_2 : (⟨7, 2, [8, 9, 1, 3, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_2_3 : (⟨7, 2, [8, 9, 1, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_2_4 : (⟨7, 1, [8, 9, 2, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_2_5 : (⟨7, 3, [8, 9, 2, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_2_6 : (⟨7, 1, [8, 9, 2, 0, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_2_7 : (⟨0, 9, [2, 1, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_2_8 : (⟨0, 6, [2, 1, 3, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_2_9 : (⟨0, 5, [2, 1, 3, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_2_10 : (⟨0, 7, [2, 1, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_2_11 : (⟨0, 5, [2, 1, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_paths_block_2 : ∀ p ∈ k9t5p4_step_6_required_block_2, p.Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by + simp only [k9t5p4_step_6_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_6_path_2_0, k9t5p4_local_6_path_2_1, k9t5p4_local_6_path_2_2, k9t5p4_local_6_path_2_3, k9t5p4_local_6_path_2_4, k9t5p4_local_6_path_2_5, k9t5p4_local_6_path_2_6, k9t5p4_local_6_path_2_7, k9t5p4_local_6_path_2_8, k9t5p4_local_6_path_2_9, k9t5p4_local_6_path_2_10, k9t5p4_local_6_path_2_11⟩ + +private def k9t5p4_local_6_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1}, ∅, {0, 1}, {0, 1}, ∅, ∅, {1, 2, 4}, {0, 1}, {1}], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_6_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_3) 0 j = k9t5p4_local_6_required_3 0 j := by decide + +private theorem k9t5p4_local_6_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_3) 1 j = k9t5p4_local_6_required_3 1 j := by decide + +private theorem k9t5p4_local_6_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_3) 2 j = k9t5p4_local_6_required_3 2 j := by decide + +private theorem k9t5p4_local_6_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_3) 3 j = k9t5p4_local_6_required_3 3 j := by decide + +private theorem k9t5p4_local_6_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_3) 4 j = k9t5p4_local_6_required_3 4 j := by decide + +private theorem k9t5p4_local_6_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_3) 5 j = k9t5p4_local_6_required_3 5 j := by decide + +private theorem k9t5p4_local_6_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_3) 6 j = k9t5p4_local_6_required_3 6 j := by decide + +private theorem k9t5p4_local_6_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_3) 7 j = k9t5p4_local_6_required_3 7 j := by decide + +private theorem k9t5p4_local_6_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_3) 8 j = k9t5p4_local_6_required_3 8 j := by decide + +private theorem k9t5p4_local_6_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_3) 9 j = k9t5p4_local_6_required_3 9 j := by decide + +private theorem k9t5p4_local_6_required_3_eq : (requiredMatrix 9 k9t5p4_step_6_required_block_3) = k9t5p4_local_6_required_3 := by + funext i j + fin_cases i + + · exact k9t5p4_local_6_required_3_eq_row_0 j + + · exact k9t5p4_local_6_required_3_eq_row_1 j + + · exact k9t5p4_local_6_required_3_eq_row_2 j + + · exact k9t5p4_local_6_required_3_eq_row_3 j + + · exact k9t5p4_local_6_required_3_eq_row_4 j + + · exact k9t5p4_local_6_required_3_eq_row_5 j + + · exact k9t5p4_local_6_required_3_eq_row_6 j + + · exact k9t5p4_local_6_required_3_eq_row_7 j + + · exact k9t5p4_local_6_required_3_eq_row_8 j + + · exact k9t5p4_local_6_required_3_eq_row_9 j + +private theorem k9t5p4_local_6_path_3_0 : (⟨0, 4, [2, 1, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_3_1 : (⟨0, 9, [2, 1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_3_2 : (⟨0, 7, [2, 1, 9, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_3_3 : (⟨0, 8, [2, 1, 9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_3_4 : (⟨0, 7, [2, 1, 9, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_3_5 : (⟨0, 8, [2, 1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_3_6 : (⟨0, 7, [2, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_3_7 : (⟨0, 4, [2, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_3_8 : (⟨0, 3, [2, 1, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_3_9 : (⟨0, 1, [2, 3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_3_10 : (⟨0, 1, [2, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_3_11 : (⟨0, 3, [2, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_paths_block_3 : ∀ p ∈ k9t5p4_step_6_required_block_3, p.Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by + simp only [k9t5p4_step_6_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_6_path_3_0, k9t5p4_local_6_path_3_1, k9t5p4_local_6_path_3_2, k9t5p4_local_6_path_3_3, k9t5p4_local_6_path_3_4, k9t5p4_local_6_path_3_5, k9t5p4_local_6_path_3_6, k9t5p4_local_6_path_3_7, k9t5p4_local_6_path_3_8, k9t5p4_local_6_path_3_9, k9t5p4_local_6_path_3_10, k9t5p4_local_6_path_3_11⟩ + +private def k9t5p4_local_6_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_6_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_4) 0 j = k9t5p4_local_6_required_4 0 j := by decide + +private theorem k9t5p4_local_6_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_4) 1 j = k9t5p4_local_6_required_4 1 j := by decide + +private theorem k9t5p4_local_6_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_4) 2 j = k9t5p4_local_6_required_4 2 j := by decide + +private theorem k9t5p4_local_6_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_4) 3 j = k9t5p4_local_6_required_4 3 j := by decide + +private theorem k9t5p4_local_6_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_4) 4 j = k9t5p4_local_6_required_4 4 j := by decide + +private theorem k9t5p4_local_6_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_4) 5 j = k9t5p4_local_6_required_4 5 j := by decide + +private theorem k9t5p4_local_6_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_4) 6 j = k9t5p4_local_6_required_4 6 j := by decide + +private theorem k9t5p4_local_6_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_4) 7 j = k9t5p4_local_6_required_4 7 j := by decide + +private theorem k9t5p4_local_6_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_4) 8 j = k9t5p4_local_6_required_4 8 j := by decide + +private theorem k9t5p4_local_6_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_6_required_block_4) 9 j = k9t5p4_local_6_required_4 9 j := by decide + +private theorem k9t5p4_local_6_required_4_eq : (requiredMatrix 9 k9t5p4_step_6_required_block_4) = k9t5p4_local_6_required_4 := by + funext i j + fin_cases i + + · exact k9t5p4_local_6_required_4_eq_row_0 j + + · exact k9t5p4_local_6_required_4_eq_row_1 j + + · exact k9t5p4_local_6_required_4_eq_row_2 j + + · exact k9t5p4_local_6_required_4_eq_row_3 j + + · exact k9t5p4_local_6_required_4_eq_row_4 j + + · exact k9t5p4_local_6_required_4_eq_row_5 j + + · exact k9t5p4_local_6_required_4_eq_row_6 j + + · exact k9t5p4_local_6_required_4_eq_row_7 j + + · exact k9t5p4_local_6_required_4_eq_row_8 j + + · exact k9t5p4_local_6_required_4_eq_row_9 j + +private theorem k9t5p4_local_6_path_4_0 : (⟨0, 2, [6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_4_1 : (⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_4_2 : (⟨0, 2, [6, 5, 4, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_4_3 : (⟨0, 2, [6, 5, 4, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_4_4 : (⟨0, 2, [6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_path_4_5 : (⟨0, 2, [6, 7, 8, 9, 1, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by decide + +private theorem k9t5p4_local_6_paths_block_4 : ∀ p ∈ k9t5p4_step_6_required_block_4, p.Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by + simp only [k9t5p4_step_6_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_6_path_4_0, k9t5p4_local_6_path_4_1, k9t5p4_local_6_path_4_2, k9t5p4_local_6_path_4_3, k9t5p4_local_6_path_4_4, k9t5p4_local_6_path_4_5⟩ + +private theorem k9t5p4_local_6_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_6 a b ∪ (((((k9t5p4_local_6_required_0 a b ∪ k9t5p4_local_6_required_1 a b) ∪ k9t5p4_local_6_required_2 a b) ∪ k9t5p4_local_6_required_3 a b) ∪ k9t5p4_local_6_required_4 a b))) 0 j = k9t5p4_local_6 0 j := by decide + +private theorem k9t5p4_local_6_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_6 a b ∪ (((((k9t5p4_local_6_required_0 a b ∪ k9t5p4_local_6_required_1 a b) ∪ k9t5p4_local_6_required_2 a b) ∪ k9t5p4_local_6_required_3 a b) ∪ k9t5p4_local_6_required_4 a b))) 1 j = k9t5p4_local_6 1 j := by decide + +private theorem k9t5p4_local_6_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_6 a b ∪ (((((k9t5p4_local_6_required_0 a b ∪ k9t5p4_local_6_required_1 a b) ∪ k9t5p4_local_6_required_2 a b) ∪ k9t5p4_local_6_required_3 a b) ∪ k9t5p4_local_6_required_4 a b))) 2 j = k9t5p4_local_6 2 j := by decide + +private theorem k9t5p4_local_6_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_6 a b ∪ (((((k9t5p4_local_6_required_0 a b ∪ k9t5p4_local_6_required_1 a b) ∪ k9t5p4_local_6_required_2 a b) ∪ k9t5p4_local_6_required_3 a b) ∪ k9t5p4_local_6_required_4 a b))) 3 j = k9t5p4_local_6 3 j := by decide + +private theorem k9t5p4_local_6_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_6 a b ∪ (((((k9t5p4_local_6_required_0 a b ∪ k9t5p4_local_6_required_1 a b) ∪ k9t5p4_local_6_required_2 a b) ∪ k9t5p4_local_6_required_3 a b) ∪ k9t5p4_local_6_required_4 a b))) 4 j = k9t5p4_local_6 4 j := by decide + +private theorem k9t5p4_local_6_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_6 a b ∪ (((((k9t5p4_local_6_required_0 a b ∪ k9t5p4_local_6_required_1 a b) ∪ k9t5p4_local_6_required_2 a b) ∪ k9t5p4_local_6_required_3 a b) ∪ k9t5p4_local_6_required_4 a b))) 5 j = k9t5p4_local_6 5 j := by decide + +private theorem k9t5p4_local_6_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_6 a b ∪ (((((k9t5p4_local_6_required_0 a b ∪ k9t5p4_local_6_required_1 a b) ∪ k9t5p4_local_6_required_2 a b) ∪ k9t5p4_local_6_required_3 a b) ∪ k9t5p4_local_6_required_4 a b))) 6 j = k9t5p4_local_6 6 j := by decide + +private theorem k9t5p4_local_6_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_6 a b ∪ (((((k9t5p4_local_6_required_0 a b ∪ k9t5p4_local_6_required_1 a b) ∪ k9t5p4_local_6_required_2 a b) ∪ k9t5p4_local_6_required_3 a b) ∪ k9t5p4_local_6_required_4 a b))) 7 j = k9t5p4_local_6 7 j := by decide + +private theorem k9t5p4_local_6_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_6 a b ∪ (((((k9t5p4_local_6_required_0 a b ∪ k9t5p4_local_6_required_1 a b) ∪ k9t5p4_local_6_required_2 a b) ∪ k9t5p4_local_6_required_3 a b) ∪ k9t5p4_local_6_required_4 a b))) 8 j = k9t5p4_local_6 8 j := by decide + +private theorem k9t5p4_local_6_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_6 a b ∪ (((((k9t5p4_local_6_required_0 a b ∪ k9t5p4_local_6_required_1 a b) ∪ k9t5p4_local_6_required_2 a b) ∪ k9t5p4_local_6_required_3 a b) ∪ k9t5p4_local_6_required_4 a b))) 9 j = k9t5p4_local_6 9 j := by decide + +private theorem k9t5p4_local_6_merged_eq : (fun a b => freshMatrix k9t5p4_state_6 a b ∪ (((((k9t5p4_local_6_required_0 a b ∪ k9t5p4_local_6_required_1 a b) ∪ k9t5p4_local_6_required_2 a b) ∪ k9t5p4_local_6_required_3 a b) ∪ k9t5p4_local_6_required_4 a b))) = k9t5p4_local_6 := by + funext i j + fin_cases i + + · exact k9t5p4_local_6_merged_eq_row_0 j + + · exact k9t5p4_local_6_merged_eq_row_1 j + + · exact k9t5p4_local_6_merged_eq_row_2 j + + · exact k9t5p4_local_6_merged_eq_row_3 j + + · exact k9t5p4_local_6_merged_eq_row_4 j + + · exact k9t5p4_local_6_merged_eq_row_5 j + + · exact k9t5p4_local_6_merged_eq_row_6 j + + · exact k9t5p4_local_6_merged_eq_row_7 j + + · exact k9t5p4_local_6_merged_eq_row_8 j + + · exact k9t5p4_local_6_merged_eq_row_9 j + +private theorem k9t5p4_local_6_eq : (fun a b => freshMatrix k9t5p4_state_6 a b ∪ requiredMatrix 9 k9t5p4_step_6_data.required a b) = k9t5p4_local_6 := by + funext a b + change freshMatrix k9t5p4_state_6 a b ∪ requiredMatrix 9 (k9t5p4_step_6_required_block_0 ++ k9t5p4_step_6_required_block_1 ++ k9t5p4_step_6_required_block_2 ++ k9t5p4_step_6_required_block_3 ++ k9t5p4_step_6_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t5p4_local_6_required_0_eq, k9t5p4_local_6_required_1_eq, k9t5p4_local_6_required_2_eq, k9t5p4_local_6_required_3_eq, k9t5p4_local_6_required_4_eq] + exact congrFun (congrFun k9t5p4_local_6_merged_eq a) b + +private theorem k9t5p4_local_6_paths : ∀ p ∈ k9t5p4_step_6_data.required, p.Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 := by + change ∀ p ∈ (k9t5p4_step_6_required_block_0 ++ k9t5p4_step_6_required_block_1 ++ k9t5p4_step_6_required_block_2 ++ k9t5p4_step_6_required_block_3 ++ k9t5p4_step_6_required_block_4), p.Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t5p4_local_6_paths_block_0, k9t5p4_local_6_paths_block_1⟩, k9t5p4_local_6_paths_block_2⟩, k9t5p4_local_6_paths_block_3⟩, k9t5p4_local_6_paths_block_4⟩ + +private theorem k9t5p4_local_6_bad : k9t5p4_step_6_data.bad.Check (freshGraph k9t5p4.graph k9t5p4_step_6_data.i k9t5p4_step_6_data.j) k9t5p4_local_6 9 5 := by decide + +private theorem k9t5p4_step_6_check : k9t5p4_step_6.Check k9t5p4.graph k9t5p4_state_6 9 5 := by + change k9t5p4_step_6_data.Check k9t5p4.graph k9t5p4_state_6 9 5 + refine ⟨by decide, k9t5p4_local_6_paths, ?_⟩ + rw [k9t5p4_local_6_eq] + exact k9t5p4_local_6_bad + +private theorem k9t5p4_update_6 : k9t5p4_step_6.apply k9t5p4_state_6 = k9t5p4_state_7 := by + have h : ∀ i j : Fin 9, k9t5p4_step_6.apply k9t5p4_state_6 i j = k9t5p4_state_7 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_8 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_7 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 2 6, Finset.Icc 1 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, {1, 2}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {1, 2}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_7_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t5p4_state_7 a b ∪ requiredMatrix 9 k9t5p4_step_7_data.required a b) 0 j = k9t5p4_local_7 0 j := by decide + +private theorem k9t5p4_local_7_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t5p4_state_7 a b ∪ requiredMatrix 9 k9t5p4_step_7_data.required a b) 1 j = k9t5p4_local_7 1 j := by decide + +private theorem k9t5p4_local_7_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t5p4_state_7 a b ∪ requiredMatrix 9 k9t5p4_step_7_data.required a b) 2 j = k9t5p4_local_7 2 j := by decide + +private theorem k9t5p4_local_7_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t5p4_state_7 a b ∪ requiredMatrix 9 k9t5p4_step_7_data.required a b) 3 j = k9t5p4_local_7 3 j := by decide + +private theorem k9t5p4_local_7_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t5p4_state_7 a b ∪ requiredMatrix 9 k9t5p4_step_7_data.required a b) 4 j = k9t5p4_local_7 4 j := by decide + +private theorem k9t5p4_local_7_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t5p4_state_7 a b ∪ requiredMatrix 9 k9t5p4_step_7_data.required a b) 5 j = k9t5p4_local_7 5 j := by decide + +private theorem k9t5p4_local_7_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t5p4_state_7 a b ∪ requiredMatrix 9 k9t5p4_step_7_data.required a b) 6 j = k9t5p4_local_7 6 j := by decide + +private theorem k9t5p4_local_7_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t5p4_state_7 a b ∪ requiredMatrix 9 k9t5p4_step_7_data.required a b) 7 j = k9t5p4_local_7 7 j := by decide + +private theorem k9t5p4_local_7_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t5p4_state_7 a b ∪ requiredMatrix 9 k9t5p4_step_7_data.required a b) 8 j = k9t5p4_local_7 8 j := by decide + +private theorem k9t5p4_local_7_eq : (fun a b => k9t5p4_state_7 a b ∪ requiredMatrix 9 k9t5p4_step_7_data.required a b) = k9t5p4_local_7 := by + funext i j + fin_cases i + + · exact k9t5p4_local_7_eq_row_0 j + + · exact k9t5p4_local_7_eq_row_1 j + + · exact k9t5p4_local_7_eq_row_2 j + + · exact k9t5p4_local_7_eq_row_3 j + + · exact k9t5p4_local_7_eq_row_4 j + + · exact k9t5p4_local_7_eq_row_5 j + + · exact k9t5p4_local_7_eq_row_6 j + + · exact k9t5p4_local_7_eq_row_7 j + + · exact k9t5p4_local_7_eq_row_8 j + +private theorem k9t5p4_local_7_paths : ∀ p ∈ k9t5p4_step_7_data.required, p.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_7_data.i k9t5p4_step_7_data.j) 9 := by decide + +private theorem k9t5p4_local_7_bad : k9t5p4_step_7_data.bad.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_7_data.i k9t5p4_step_7_data.j) k9t5p4_local_7 9 5 := by decide + +private theorem k9t5p4_step_7_check : k9t5p4_step_7.Check k9t5p4.graph k9t5p4_state_7 9 5 := by + change k9t5p4_step_7_data.Check k9t5p4.graph k9t5p4_state_7 9 5 + refine ⟨k9t5p4_local_7_paths, ?_⟩ + rw [k9t5p4_local_7_eq] + exact k9t5p4_local_7_bad + +private theorem k9t5p4_update_7 : k9t5p4_step_7.apply k9t5p4_state_7 = k9t5p4_state_8 := by + have h : ∀ i j : Fin 9, k9t5p4_step_7.apply k9t5p4_state_7 i j = k9t5p4_state_8 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_9 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_8 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, Finset.Icc 1 5, {0, 1}, Finset.Icc 0 4, {1}, Finset.Icc 0 4, {0, 1}, {0, 1}], + #[{0, 1}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 5, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, {0, 2, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {0, 1}], + #[{1}, Finset.Icc 0 6, Finset.Icc 0 6, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[{0, 1}, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, {1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {0, 1}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_8_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, {1, 2}, ∅, {0, 1, 3}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, {0}, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 3}, ∅, ∅, {0}, ∅, ∅, ∅, {1}, ∅, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {0, 1}, ∅, {1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_8_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_0) 0 j = k9t5p4_local_8_required_0 0 j := by decide + +private theorem k9t5p4_local_8_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_0) 1 j = k9t5p4_local_8_required_0 1 j := by decide + +private theorem k9t5p4_local_8_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_0) 2 j = k9t5p4_local_8_required_0 2 j := by decide + +private theorem k9t5p4_local_8_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_0) 3 j = k9t5p4_local_8_required_0 3 j := by decide + +private theorem k9t5p4_local_8_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_0) 4 j = k9t5p4_local_8_required_0 4 j := by decide + +private theorem k9t5p4_local_8_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_0) 5 j = k9t5p4_local_8_required_0 5 j := by decide + +private theorem k9t5p4_local_8_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_0) 6 j = k9t5p4_local_8_required_0 6 j := by decide + +private theorem k9t5p4_local_8_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_0) 7 j = k9t5p4_local_8_required_0 7 j := by decide + +private theorem k9t5p4_local_8_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_0) 8 j = k9t5p4_local_8_required_0 8 j := by decide + +private theorem k9t5p4_local_8_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_0) 9 j = k9t5p4_local_8_required_0 9 j := by decide + +private theorem k9t5p4_local_8_required_0_eq : (requiredMatrix 9 k9t5p4_step_8_required_block_0) = k9t5p4_local_8_required_0 := by + funext i j + fin_cases i + + · exact k9t5p4_local_8_required_0_eq_row_0 j + + · exact k9t5p4_local_8_required_0_eq_row_1 j + + · exact k9t5p4_local_8_required_0_eq_row_2 j + + · exact k9t5p4_local_8_required_0_eq_row_3 j + + · exact k9t5p4_local_8_required_0_eq_row_4 j + + · exact k9t5p4_local_8_required_0_eq_row_5 j + + · exact k9t5p4_local_8_required_0_eq_row_6 j + + · exact k9t5p4_local_8_required_0_eq_row_7 j + + · exact k9t5p4_local_8_required_0_eq_row_8 j + + · exact k9t5p4_local_8_required_0_eq_row_9 j + +private theorem k9t5p4_local_8_path_0_0 : (⟨3, 0, [1, 2, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_0_1 : (⟨3, 0, [1, 9, 2, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_0_2 : (⟨3, 7, [0, 6, 5, 4, 1, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_0_3 : (⟨3, 7, [0, 6, 5, 4, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_0_4 : (⟨3, 5, [0, 6, 7, 8, 9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_0_5 : (⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_0_6 : (⟨5, 9, [4, 1, 2, 3, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_0_7 : (⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_0_8 : (⟨5, 3, [4, 1, 2, 9, 8, 7, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_0_9 : (⟨5, 9, [4, 1, 3, 0, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_0_10 : (⟨5, 0, [4, 1, 9, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_0_11 : (⟨5, 7, [4, 1, 9, 2, 3, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_paths_block_0 : ∀ p ∈ k9t5p4_step_8_required_block_0, p.Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by + simp only [k9t5p4_step_8_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_8_path_0_0, k9t5p4_local_8_path_0_1, k9t5p4_local_8_path_0_2, k9t5p4_local_8_path_0_3, k9t5p4_local_8_path_0_4, k9t5p4_local_8_path_0_5, k9t5p4_local_8_path_0_6, k9t5p4_local_8_path_0_7, k9t5p4_local_8_path_0_8, k9t5p4_local_8_path_0_9, k9t5p4_local_8_path_0_10, k9t5p4_local_8_path_0_11⟩ + +private def k9t5p4_local_8_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, {2, 4}, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[{2, 4}, {0}, {0}, ∅, ∅, ∅, ∅, {0, 1}, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, {0}, {0, 1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_8_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_1) 0 j = k9t5p4_local_8_required_1 0 j := by decide + +private theorem k9t5p4_local_8_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_1) 1 j = k9t5p4_local_8_required_1 1 j := by decide + +private theorem k9t5p4_local_8_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_1) 2 j = k9t5p4_local_8_required_1 2 j := by decide + +private theorem k9t5p4_local_8_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_1) 3 j = k9t5p4_local_8_required_1 3 j := by decide + +private theorem k9t5p4_local_8_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_1) 4 j = k9t5p4_local_8_required_1 4 j := by decide + +private theorem k9t5p4_local_8_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_1) 5 j = k9t5p4_local_8_required_1 5 j := by decide + +private theorem k9t5p4_local_8_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_1) 6 j = k9t5p4_local_8_required_1 6 j := by decide + +private theorem k9t5p4_local_8_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_1) 7 j = k9t5p4_local_8_required_1 7 j := by decide + +private theorem k9t5p4_local_8_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_1) 8 j = k9t5p4_local_8_required_1 8 j := by decide + +private theorem k9t5p4_local_8_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_1) 9 j = k9t5p4_local_8_required_1 9 j := by decide + +private theorem k9t5p4_local_8_required_1_eq : (requiredMatrix 9 k9t5p4_step_8_required_block_1) = k9t5p4_local_8_required_1 := by + funext i j + fin_cases i + + · exact k9t5p4_local_8_required_1_eq_row_0 j + + · exact k9t5p4_local_8_required_1_eq_row_1 j + + · exact k9t5p4_local_8_required_1_eq_row_2 j + + · exact k9t5p4_local_8_required_1_eq_row_3 j + + · exact k9t5p4_local_8_required_1_eq_row_4 j + + · exact k9t5p4_local_8_required_1_eq_row_5 j + + · exact k9t5p4_local_8_required_1_eq_row_6 j + + · exact k9t5p4_local_8_required_1_eq_row_7 j + + · exact k9t5p4_local_8_required_1_eq_row_8 j + + · exact k9t5p4_local_8_required_1_eq_row_9 j + +private theorem k9t5p4_local_8_path_1_0 : (⟨5, 8, [4, 1, 9, 2, 3, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_1_1 : (⟨5, 0, [4, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_1_2 : (⟨5, 8, [4, 1, 9, 3, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_1_3 : (⟨5, 0, [4, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_1_4 : (⟨5, 2, [4, 1, 9, 8, 7, 6, 0, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_1_5 : (⟨5, 1, [4, 2, 9, 8, 7, 6, 0, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_1_6 : (⟨5, 7, [6, 0, 3, 1, 2, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_1_7 : (⟨7, 0, [6, 5, 4, 1, 9, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_1_8 : (⟨7, 5, [6, 0, 3, 1, 9, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_1_9 : (⟨7, 0, [8, 9, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_1_10 : (⟨7, 4, [8, 9, 1, 2, 3, 0, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_1_11 : (⟨7, 5, [8, 9, 1, 2, 4, 3, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_paths_block_1 : ∀ p ∈ k9t5p4_step_8_required_block_1, p.Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by + simp only [k9t5p4_step_8_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_8_path_1_0, k9t5p4_local_8_path_1_1, k9t5p4_local_8_path_1_2, k9t5p4_local_8_path_1_3, k9t5p4_local_8_path_1_4, k9t5p4_local_8_path_1_5, k9t5p4_local_8_path_1_6, k9t5p4_local_8_path_1_7, k9t5p4_local_8_path_1_8, k9t5p4_local_8_path_1_9, k9t5p4_local_8_path_1_10, k9t5p4_local_8_path_1_11⟩ + +private def k9t5p4_local_8_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, {0, 1}, {1}, {3}, ∅, {0}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3}, {0, 1}, {0, 1}, {0, 1}, {1}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_8_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_2) 0 j = k9t5p4_local_8_required_2 0 j := by decide + +private theorem k9t5p4_local_8_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_2) 1 j = k9t5p4_local_8_required_2 1 j := by decide + +private theorem k9t5p4_local_8_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_2) 2 j = k9t5p4_local_8_required_2 2 j := by decide + +private theorem k9t5p4_local_8_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_2) 3 j = k9t5p4_local_8_required_2 3 j := by decide + +private theorem k9t5p4_local_8_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_2) 4 j = k9t5p4_local_8_required_2 4 j := by decide + +private theorem k9t5p4_local_8_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_2) 5 j = k9t5p4_local_8_required_2 5 j := by decide + +private theorem k9t5p4_local_8_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_2) 6 j = k9t5p4_local_8_required_2 6 j := by decide + +private theorem k9t5p4_local_8_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_2) 7 j = k9t5p4_local_8_required_2 7 j := by decide + +private theorem k9t5p4_local_8_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_2) 8 j = k9t5p4_local_8_required_2 8 j := by decide + +private theorem k9t5p4_local_8_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_2) 9 j = k9t5p4_local_8_required_2 9 j := by decide + +private theorem k9t5p4_local_8_required_2_eq : (requiredMatrix 9 k9t5p4_step_8_required_block_2) = k9t5p4_local_8_required_2 := by + funext i j + fin_cases i + + · exact k9t5p4_local_8_required_2_eq_row_0 j + + · exact k9t5p4_local_8_required_2_eq_row_1 j + + · exact k9t5p4_local_8_required_2_eq_row_2 j + + · exact k9t5p4_local_8_required_2_eq_row_3 j + + · exact k9t5p4_local_8_required_2_eq_row_4 j + + · exact k9t5p4_local_8_required_2_eq_row_5 j + + · exact k9t5p4_local_8_required_2_eq_row_6 j + + · exact k9t5p4_local_8_required_2_eq_row_7 j + + · exact k9t5p4_local_8_required_2_eq_row_8 j + + · exact k9t5p4_local_8_required_2_eq_row_9 j + +private theorem k9t5p4_local_8_path_2_0 : (⟨7, 3, [8, 9, 1, 2, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_2_1 : (⟨7, 4, [8, 9, 1, 3, 0, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_2_2 : (⟨7, 2, [8, 9, 1, 3, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_2_3 : (⟨7, 3, [8, 9, 1, 4, 5, 6, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_2_4 : (⟨7, 1, [8, 9, 2, 3, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_2_5 : (⟨7, 1, [8, 9, 3, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_2_6 : (⟨7, 2, [8, 9, 3, 0, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_2_7 : (⟨0, 9, [3, 1, 2, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_2_8 : (⟨0, 6, [3, 1, 2, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_2_9 : (⟨0, 5, [3, 1, 2, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_2_10 : (⟨0, 7, [3, 1, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_2_11 : (⟨0, 5, [3, 1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_paths_block_2 : ∀ p ∈ k9t5p4_step_8_required_block_2, p.Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by + simp only [k9t5p4_step_8_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_8_path_2_0, k9t5p4_local_8_path_2_1, k9t5p4_local_8_path_2_2, k9t5p4_local_8_path_2_3, k9t5p4_local_8_path_2_4, k9t5p4_local_8_path_2_5, k9t5p4_local_8_path_2_6, k9t5p4_local_8_path_2_7, k9t5p4_local_8_path_2_8, k9t5p4_local_8_path_2_9, k9t5p4_local_8_path_2_10, k9t5p4_local_8_path_2_11⟩ + +private def k9t5p4_local_8_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, ∅, {0, 1}, ∅, ∅, {1, 2, 4}, {0, 1}, {1}], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_8_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_3) 0 j = k9t5p4_local_8_required_3 0 j := by decide + +private theorem k9t5p4_local_8_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_3) 1 j = k9t5p4_local_8_required_3 1 j := by decide + +private theorem k9t5p4_local_8_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_3) 2 j = k9t5p4_local_8_required_3 2 j := by decide + +private theorem k9t5p4_local_8_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_3) 3 j = k9t5p4_local_8_required_3 3 j := by decide + +private theorem k9t5p4_local_8_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_3) 4 j = k9t5p4_local_8_required_3 4 j := by decide + +private theorem k9t5p4_local_8_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_3) 5 j = k9t5p4_local_8_required_3 5 j := by decide + +private theorem k9t5p4_local_8_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_3) 6 j = k9t5p4_local_8_required_3 6 j := by decide + +private theorem k9t5p4_local_8_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_3) 7 j = k9t5p4_local_8_required_3 7 j := by decide + +private theorem k9t5p4_local_8_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_3) 8 j = k9t5p4_local_8_required_3 8 j := by decide + +private theorem k9t5p4_local_8_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_3) 9 j = k9t5p4_local_8_required_3 9 j := by decide + +private theorem k9t5p4_local_8_required_3_eq : (requiredMatrix 9 k9t5p4_step_8_required_block_3) = k9t5p4_local_8_required_3 := by + funext i j + fin_cases i + + · exact k9t5p4_local_8_required_3_eq_row_0 j + + · exact k9t5p4_local_8_required_3_eq_row_1 j + + · exact k9t5p4_local_8_required_3_eq_row_2 j + + · exact k9t5p4_local_8_required_3_eq_row_3 j + + · exact k9t5p4_local_8_required_3_eq_row_4 j + + · exact k9t5p4_local_8_required_3_eq_row_5 j + + · exact k9t5p4_local_8_required_3_eq_row_6 j + + · exact k9t5p4_local_8_required_3_eq_row_7 j + + · exact k9t5p4_local_8_required_3_eq_row_8 j + + · exact k9t5p4_local_8_required_3_eq_row_9 j + +private theorem k9t5p4_local_8_path_3_0 : (⟨0, 4, [3, 1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_3_1 : (⟨0, 9, [3, 1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_3_2 : (⟨0, 7, [3, 1, 9, 2, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_3_3 : (⟨0, 8, [3, 1, 9, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_3_4 : (⟨0, 7, [3, 1, 9, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_3_5 : (⟨0, 8, [3, 1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_3_6 : (⟨0, 7, [3, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_3_7 : (⟨0, 4, [3, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_3_8 : (⟨0, 2, [3, 1, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_3_9 : (⟨0, 1, [3, 2, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_3_10 : (⟨0, 1, [3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_3_11 : (⟨0, 2, [3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_paths_block_3 : ∀ p ∈ k9t5p4_step_8_required_block_3, p.Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by + simp only [k9t5p4_step_8_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_8_path_3_0, k9t5p4_local_8_path_3_1, k9t5p4_local_8_path_3_2, k9t5p4_local_8_path_3_3, k9t5p4_local_8_path_3_4, k9t5p4_local_8_path_3_5, k9t5p4_local_8_path_3_6, k9t5p4_local_8_path_3_7, k9t5p4_local_8_path_3_8, k9t5p4_local_8_path_3_9, k9t5p4_local_8_path_3_10, k9t5p4_local_8_path_3_11⟩ + +private def k9t5p4_local_8_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, {0}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_8_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_4) 0 j = k9t5p4_local_8_required_4 0 j := by decide + +private theorem k9t5p4_local_8_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_4) 1 j = k9t5p4_local_8_required_4 1 j := by decide + +private theorem k9t5p4_local_8_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_4) 2 j = k9t5p4_local_8_required_4 2 j := by decide + +private theorem k9t5p4_local_8_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_4) 3 j = k9t5p4_local_8_required_4 3 j := by decide + +private theorem k9t5p4_local_8_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_4) 4 j = k9t5p4_local_8_required_4 4 j := by decide + +private theorem k9t5p4_local_8_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_4) 5 j = k9t5p4_local_8_required_4 5 j := by decide + +private theorem k9t5p4_local_8_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_4) 6 j = k9t5p4_local_8_required_4 6 j := by decide + +private theorem k9t5p4_local_8_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_4) 7 j = k9t5p4_local_8_required_4 7 j := by decide + +private theorem k9t5p4_local_8_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_4) 8 j = k9t5p4_local_8_required_4 8 j := by decide + +private theorem k9t5p4_local_8_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_8_required_block_4) 9 j = k9t5p4_local_8_required_4 9 j := by decide + +private theorem k9t5p4_local_8_required_4_eq : (requiredMatrix 9 k9t5p4_step_8_required_block_4) = k9t5p4_local_8_required_4 := by + funext i j + fin_cases i + + · exact k9t5p4_local_8_required_4_eq_row_0 j + + · exact k9t5p4_local_8_required_4_eq_row_1 j + + · exact k9t5p4_local_8_required_4_eq_row_2 j + + · exact k9t5p4_local_8_required_4_eq_row_3 j + + · exact k9t5p4_local_8_required_4_eq_row_4 j + + · exact k9t5p4_local_8_required_4_eq_row_5 j + + · exact k9t5p4_local_8_required_4_eq_row_6 j + + · exact k9t5p4_local_8_required_4_eq_row_7 j + + · exact k9t5p4_local_8_required_4_eq_row_8 j + + · exact k9t5p4_local_8_required_4_eq_row_9 j + +private theorem k9t5p4_local_8_path_4_0 : (⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_4_1 : (⟨0, 3, [6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_4_2 : (⟨0, 3, [6, 5, 4, 1, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_4_3 : (⟨0, 3, [6, 5, 4, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_4_4 : (⟨0, 3, [6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_path_4_5 : (⟨0, 3, [6, 7, 8, 9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by decide + +private theorem k9t5p4_local_8_paths_block_4 : ∀ p ∈ k9t5p4_step_8_required_block_4, p.Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by + simp only [k9t5p4_step_8_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_8_path_4_0, k9t5p4_local_8_path_4_1, k9t5p4_local_8_path_4_2, k9t5p4_local_8_path_4_3, k9t5p4_local_8_path_4_4, k9t5p4_local_8_path_4_5⟩ + +private theorem k9t5p4_local_8_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_8 a b ∪ (((((k9t5p4_local_8_required_0 a b ∪ k9t5p4_local_8_required_1 a b) ∪ k9t5p4_local_8_required_2 a b) ∪ k9t5p4_local_8_required_3 a b) ∪ k9t5p4_local_8_required_4 a b))) 0 j = k9t5p4_local_8 0 j := by decide + +private theorem k9t5p4_local_8_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_8 a b ∪ (((((k9t5p4_local_8_required_0 a b ∪ k9t5p4_local_8_required_1 a b) ∪ k9t5p4_local_8_required_2 a b) ∪ k9t5p4_local_8_required_3 a b) ∪ k9t5p4_local_8_required_4 a b))) 1 j = k9t5p4_local_8 1 j := by decide + +private theorem k9t5p4_local_8_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_8 a b ∪ (((((k9t5p4_local_8_required_0 a b ∪ k9t5p4_local_8_required_1 a b) ∪ k9t5p4_local_8_required_2 a b) ∪ k9t5p4_local_8_required_3 a b) ∪ k9t5p4_local_8_required_4 a b))) 2 j = k9t5p4_local_8 2 j := by decide + +private theorem k9t5p4_local_8_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_8 a b ∪ (((((k9t5p4_local_8_required_0 a b ∪ k9t5p4_local_8_required_1 a b) ∪ k9t5p4_local_8_required_2 a b) ∪ k9t5p4_local_8_required_3 a b) ∪ k9t5p4_local_8_required_4 a b))) 3 j = k9t5p4_local_8 3 j := by decide + +private theorem k9t5p4_local_8_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_8 a b ∪ (((((k9t5p4_local_8_required_0 a b ∪ k9t5p4_local_8_required_1 a b) ∪ k9t5p4_local_8_required_2 a b) ∪ k9t5p4_local_8_required_3 a b) ∪ k9t5p4_local_8_required_4 a b))) 4 j = k9t5p4_local_8 4 j := by decide + +private theorem k9t5p4_local_8_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_8 a b ∪ (((((k9t5p4_local_8_required_0 a b ∪ k9t5p4_local_8_required_1 a b) ∪ k9t5p4_local_8_required_2 a b) ∪ k9t5p4_local_8_required_3 a b) ∪ k9t5p4_local_8_required_4 a b))) 5 j = k9t5p4_local_8 5 j := by decide + +private theorem k9t5p4_local_8_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_8 a b ∪ (((((k9t5p4_local_8_required_0 a b ∪ k9t5p4_local_8_required_1 a b) ∪ k9t5p4_local_8_required_2 a b) ∪ k9t5p4_local_8_required_3 a b) ∪ k9t5p4_local_8_required_4 a b))) 6 j = k9t5p4_local_8 6 j := by decide + +private theorem k9t5p4_local_8_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_8 a b ∪ (((((k9t5p4_local_8_required_0 a b ∪ k9t5p4_local_8_required_1 a b) ∪ k9t5p4_local_8_required_2 a b) ∪ k9t5p4_local_8_required_3 a b) ∪ k9t5p4_local_8_required_4 a b))) 7 j = k9t5p4_local_8 7 j := by decide + +private theorem k9t5p4_local_8_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_8 a b ∪ (((((k9t5p4_local_8_required_0 a b ∪ k9t5p4_local_8_required_1 a b) ∪ k9t5p4_local_8_required_2 a b) ∪ k9t5p4_local_8_required_3 a b) ∪ k9t5p4_local_8_required_4 a b))) 8 j = k9t5p4_local_8 8 j := by decide + +private theorem k9t5p4_local_8_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_8 a b ∪ (((((k9t5p4_local_8_required_0 a b ∪ k9t5p4_local_8_required_1 a b) ∪ k9t5p4_local_8_required_2 a b) ∪ k9t5p4_local_8_required_3 a b) ∪ k9t5p4_local_8_required_4 a b))) 9 j = k9t5p4_local_8 9 j := by decide + +private theorem k9t5p4_local_8_merged_eq : (fun a b => freshMatrix k9t5p4_state_8 a b ∪ (((((k9t5p4_local_8_required_0 a b ∪ k9t5p4_local_8_required_1 a b) ∪ k9t5p4_local_8_required_2 a b) ∪ k9t5p4_local_8_required_3 a b) ∪ k9t5p4_local_8_required_4 a b))) = k9t5p4_local_8 := by + funext i j + fin_cases i + + · exact k9t5p4_local_8_merged_eq_row_0 j + + · exact k9t5p4_local_8_merged_eq_row_1 j + + · exact k9t5p4_local_8_merged_eq_row_2 j + + · exact k9t5p4_local_8_merged_eq_row_3 j + + · exact k9t5p4_local_8_merged_eq_row_4 j + + · exact k9t5p4_local_8_merged_eq_row_5 j + + · exact k9t5p4_local_8_merged_eq_row_6 j + + · exact k9t5p4_local_8_merged_eq_row_7 j + + · exact k9t5p4_local_8_merged_eq_row_8 j + + · exact k9t5p4_local_8_merged_eq_row_9 j + +private theorem k9t5p4_local_8_eq : (fun a b => freshMatrix k9t5p4_state_8 a b ∪ requiredMatrix 9 k9t5p4_step_8_data.required a b) = k9t5p4_local_8 := by + funext a b + change freshMatrix k9t5p4_state_8 a b ∪ requiredMatrix 9 (k9t5p4_step_8_required_block_0 ++ k9t5p4_step_8_required_block_1 ++ k9t5p4_step_8_required_block_2 ++ k9t5p4_step_8_required_block_3 ++ k9t5p4_step_8_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t5p4_local_8_required_0_eq, k9t5p4_local_8_required_1_eq, k9t5p4_local_8_required_2_eq, k9t5p4_local_8_required_3_eq, k9t5p4_local_8_required_4_eq] + exact congrFun (congrFun k9t5p4_local_8_merged_eq a) b + +private theorem k9t5p4_local_8_paths : ∀ p ∈ k9t5p4_step_8_data.required, p.Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 := by + change ∀ p ∈ (k9t5p4_step_8_required_block_0 ++ k9t5p4_step_8_required_block_1 ++ k9t5p4_step_8_required_block_2 ++ k9t5p4_step_8_required_block_3 ++ k9t5p4_step_8_required_block_4), p.Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t5p4_local_8_paths_block_0, k9t5p4_local_8_paths_block_1⟩, k9t5p4_local_8_paths_block_2⟩, k9t5p4_local_8_paths_block_3⟩, k9t5p4_local_8_paths_block_4⟩ + +private theorem k9t5p4_local_8_bad : k9t5p4_step_8_data.bad.Check (freshGraph k9t5p4.graph k9t5p4_step_8_data.i k9t5p4_step_8_data.j) k9t5p4_local_8 9 5 := by decide + +private theorem k9t5p4_step_8_check : k9t5p4_step_8.Check k9t5p4.graph k9t5p4_state_8 9 5 := by + change k9t5p4_step_8_data.Check k9t5p4.graph k9t5p4_state_8 9 5 + refine ⟨by decide, k9t5p4_local_8_paths, ?_⟩ + rw [k9t5p4_local_8_eq] + exact k9t5p4_local_8_bad + +private theorem k9t5p4_update_8 : k9t5p4_step_8.apply k9t5p4_state_8 = k9t5p4_state_9 := by + have h : ∀ i j : Fin 9, k9t5p4_step_8.apply k9t5p4_state_8 i j = k9t5p4_state_9 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_10 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, {0, 2, 3, 4, 5, 6}, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[{0, 2, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_9 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 6, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, {1, 2}, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[Finset.Icc 2 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, {1, 2}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_9_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t5p4_state_9 a b ∪ requiredMatrix 9 k9t5p4_step_9_data.required a b) 0 j = k9t5p4_local_9 0 j := by decide + +private theorem k9t5p4_local_9_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t5p4_state_9 a b ∪ requiredMatrix 9 k9t5p4_step_9_data.required a b) 1 j = k9t5p4_local_9 1 j := by decide + +private theorem k9t5p4_local_9_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t5p4_state_9 a b ∪ requiredMatrix 9 k9t5p4_step_9_data.required a b) 2 j = k9t5p4_local_9 2 j := by decide + +private theorem k9t5p4_local_9_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t5p4_state_9 a b ∪ requiredMatrix 9 k9t5p4_step_9_data.required a b) 3 j = k9t5p4_local_9 3 j := by decide + +private theorem k9t5p4_local_9_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t5p4_state_9 a b ∪ requiredMatrix 9 k9t5p4_step_9_data.required a b) 4 j = k9t5p4_local_9 4 j := by decide + +private theorem k9t5p4_local_9_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t5p4_state_9 a b ∪ requiredMatrix 9 k9t5p4_step_9_data.required a b) 5 j = k9t5p4_local_9 5 j := by decide + +private theorem k9t5p4_local_9_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t5p4_state_9 a b ∪ requiredMatrix 9 k9t5p4_step_9_data.required a b) 6 j = k9t5p4_local_9 6 j := by decide + +private theorem k9t5p4_local_9_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t5p4_state_9 a b ∪ requiredMatrix 9 k9t5p4_step_9_data.required a b) 7 j = k9t5p4_local_9 7 j := by decide + +private theorem k9t5p4_local_9_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t5p4_state_9 a b ∪ requiredMatrix 9 k9t5p4_step_9_data.required a b) 8 j = k9t5p4_local_9 8 j := by decide + +private theorem k9t5p4_local_9_eq : (fun a b => k9t5p4_state_9 a b ∪ requiredMatrix 9 k9t5p4_step_9_data.required a b) = k9t5p4_local_9 := by + funext i j + fin_cases i + + · exact k9t5p4_local_9_eq_row_0 j + + · exact k9t5p4_local_9_eq_row_1 j + + · exact k9t5p4_local_9_eq_row_2 j + + · exact k9t5p4_local_9_eq_row_3 j + + · exact k9t5p4_local_9_eq_row_4 j + + · exact k9t5p4_local_9_eq_row_5 j + + · exact k9t5p4_local_9_eq_row_6 j + + · exact k9t5p4_local_9_eq_row_7 j + + · exact k9t5p4_local_9_eq_row_8 j + +private theorem k9t5p4_local_9_paths : ∀ p ∈ k9t5p4_step_9_data.required, p.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_9_data.i k9t5p4_step_9_data.j) 9 := by decide + +private theorem k9t5p4_local_9_bad : k9t5p4_step_9_data.bad.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_9_data.i k9t5p4_step_9_data.j) k9t5p4_local_9 9 5 := by decide + +private theorem k9t5p4_step_9_check : k9t5p4_step_9.Check k9t5p4.graph k9t5p4_state_9 9 5 := by + change k9t5p4_step_9_data.Check k9t5p4.graph k9t5p4_state_9 9 5 + refine ⟨k9t5p4_local_9_paths, ?_⟩ + rw [k9t5p4_local_9_eq] + exact k9t5p4_local_9_bad + +private theorem k9t5p4_update_9 : k9t5p4_step_9.apply k9t5p4_state_9 = k9t5p4_state_10 := by + have h : ∀ i j : Fin 9, k9t5p4_step_9.apply k9t5p4_state_9 i j = k9t5p4_state_10 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_11 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_10 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 1 5, {0, 1}, {0, 1}, {0, 1}, Finset.Icc 0 5, {0, 1}, {1}, Finset.Icc 0 4, {0, 1}], + #[Finset.Icc 1 5, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, {0, 2, 3, 4, 5, 6}, Finset.Icc 0 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 0 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 0 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, {0, 1}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 0 6, {1, 2}], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[{1}, {0, 2, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, {0, 1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, {1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {1, 2}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_10_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1, 2}, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, {1, 2}], + #[∅, {0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0}, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_10_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_0) 0 j = k9t5p4_local_10_required_0 0 j := by decide + +private theorem k9t5p4_local_10_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_0) 1 j = k9t5p4_local_10_required_0 1 j := by decide + +private theorem k9t5p4_local_10_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_0) 2 j = k9t5p4_local_10_required_0 2 j := by decide + +private theorem k9t5p4_local_10_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_0) 3 j = k9t5p4_local_10_required_0 3 j := by decide + +private theorem k9t5p4_local_10_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_0) 4 j = k9t5p4_local_10_required_0 4 j := by decide + +private theorem k9t5p4_local_10_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_0) 5 j = k9t5p4_local_10_required_0 5 j := by decide + +private theorem k9t5p4_local_10_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_0) 6 j = k9t5p4_local_10_required_0 6 j := by decide + +private theorem k9t5p4_local_10_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_0) 7 j = k9t5p4_local_10_required_0 7 j := by decide + +private theorem k9t5p4_local_10_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_0) 8 j = k9t5p4_local_10_required_0 8 j := by decide + +private theorem k9t5p4_local_10_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_0) 9 j = k9t5p4_local_10_required_0 9 j := by decide + +private theorem k9t5p4_local_10_required_0_eq : (requiredMatrix 9 k9t5p4_step_10_required_block_0) = k9t5p4_local_10_required_0 := by + funext i j + fin_cases i + + · exact k9t5p4_local_10_required_0_eq_row_0 j + + · exact k9t5p4_local_10_required_0_eq_row_1 j + + · exact k9t5p4_local_10_required_0_eq_row_2 j + + · exact k9t5p4_local_10_required_0_eq_row_3 j + + · exact k9t5p4_local_10_required_0_eq_row_4 j + + · exact k9t5p4_local_10_required_0_eq_row_5 j + + · exact k9t5p4_local_10_required_0_eq_row_6 j + + · exact k9t5p4_local_10_required_0_eq_row_7 j + + · exact k9t5p4_local_10_required_0_eq_row_8 j + + · exact k9t5p4_local_10_required_0_eq_row_9 j + +private theorem k9t5p4_local_10_path_0_0 : (⟨1, 0, [2, 9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_0_1 : (⟨1, 0, [2, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_0_2 : (⟨1, 8, [0, 7, 6, 5, 4, 2, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_0_3 : (⟨1, 6, [0, 7, 8, 9, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_0_4 : (⟨1, 6, [0, 7, 8, 9, 2, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_0_5 : (⟨5, 0, [4, 1, 2, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_0_6 : (⟨5, 0, [4, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_0_7 : (⟨5, 9, [4, 2, 1, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_0_8 : (⟨5, 9, [4, 2, 3, 1, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_0_9 : (⟨5, 8, [4, 2, 9, 1, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_0_10 : (⟨5, 8, [4, 2, 9, 3, 1, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_0_11 : (⟨5, 0, [6, 7, 8, 9, 2, 3, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_paths_block_0 : ∀ p ∈ k9t5p4_step_10_required_block_0, p.Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by + simp only [k9t5p4_step_10_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_10_path_0_0, k9t5p4_local_10_path_0_1, k9t5p4_local_10_path_0_2, k9t5p4_local_10_path_0_3, k9t5p4_local_10_path_0_4, k9t5p4_local_10_path_0_5, k9t5p4_local_10_path_0_6, k9t5p4_local_10_path_0_7, k9t5p4_local_10_path_0_8, k9t5p4_local_10_path_0_9, k9t5p4_local_10_path_0_10, k9t5p4_local_10_path_0_11⟩ + +private def k9t5p4_local_10_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2, 4}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2, 4}, ∅, {0}, {0}, {0, 1}, {0, 1, 2}, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_10_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_1) 0 j = k9t5p4_local_10_required_1 0 j := by decide + +private theorem k9t5p4_local_10_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_1) 1 j = k9t5p4_local_10_required_1 1 j := by decide + +private theorem k9t5p4_local_10_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_1) 2 j = k9t5p4_local_10_required_1 2 j := by decide + +private theorem k9t5p4_local_10_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_1) 3 j = k9t5p4_local_10_required_1 3 j := by decide + +private theorem k9t5p4_local_10_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_1) 4 j = k9t5p4_local_10_required_1 4 j := by decide + +private theorem k9t5p4_local_10_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_1) 5 j = k9t5p4_local_10_required_1 5 j := by decide + +private theorem k9t5p4_local_10_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_1) 6 j = k9t5p4_local_10_required_1 6 j := by decide + +private theorem k9t5p4_local_10_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_1) 7 j = k9t5p4_local_10_required_1 7 j := by decide + +private theorem k9t5p4_local_10_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_1) 8 j = k9t5p4_local_10_required_1 8 j := by decide + +private theorem k9t5p4_local_10_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_1) 9 j = k9t5p4_local_10_required_1 9 j := by decide + +private theorem k9t5p4_local_10_required_1_eq : (requiredMatrix 9 k9t5p4_step_10_required_block_1) = k9t5p4_local_10_required_1 := by + funext i j + fin_cases i + + · exact k9t5p4_local_10_required_1_eq_row_0 j + + · exact k9t5p4_local_10_required_1_eq_row_1 j + + · exact k9t5p4_local_10_required_1_eq_row_2 j + + · exact k9t5p4_local_10_required_1_eq_row_3 j + + · exact k9t5p4_local_10_required_1_eq_row_4 j + + · exact k9t5p4_local_10_required_1_eq_row_5 j + + · exact k9t5p4_local_10_required_1_eq_row_6 j + + · exact k9t5p4_local_10_required_1_eq_row_7 j + + · exact k9t5p4_local_10_required_1_eq_row_8 j + + · exact k9t5p4_local_10_required_1_eq_row_9 j + +private theorem k9t5p4_local_10_path_1_0 : (⟨5, 8, [6, 7, 0, 1, 2, 3, 4, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_1_1 : (⟨8, 6, [7, 0, 1, 2, 9, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_1_2 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_1_3 : (⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_1_4 : (⟨8, 0, [9, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_1_5 : (⟨8, 3, [9, 1, 0, 7, 6, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_1_6 : (⟨8, 2, [9, 1, 0, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_1_7 : (⟨8, 5, [9, 2, 1, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_1_8 : (⟨8, 4, [9, 2, 1, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_1_9 : (⟨8, 0, [9, 2, 3, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_1_10 : (⟨8, 5, [9, 2, 3, 1, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_1_11 : (⟨8, 4, [9, 2, 3, 1, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_paths_block_1 : ∀ p ∈ k9t5p4_step_10_required_block_1, p.Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by + simp only [k9t5p4_step_10_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_10_path_1_0, k9t5p4_local_10_path_1_1, k9t5p4_local_10_path_1_2, k9t5p4_local_10_path_1_3, k9t5p4_local_10_path_1_4, k9t5p4_local_10_path_1_5, k9t5p4_local_10_path_1_6, k9t5p4_local_10_path_1_7, k9t5p4_local_10_path_1_8, k9t5p4_local_10_path_1_9, k9t5p4_local_10_path_1_10, k9t5p4_local_10_path_1_11⟩ + +private def k9t5p4_local_10_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {0}, {0, 1, 3, 5}, {1}, ∅, {3}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 3, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3}, {0}, ∅, ∅, ∅, {0}, {1}, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_10_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_2) 0 j = k9t5p4_local_10_required_2 0 j := by decide + +private theorem k9t5p4_local_10_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_2) 1 j = k9t5p4_local_10_required_2 1 j := by decide + +private theorem k9t5p4_local_10_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_2) 2 j = k9t5p4_local_10_required_2 2 j := by decide + +private theorem k9t5p4_local_10_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_2) 3 j = k9t5p4_local_10_required_2 3 j := by decide + +private theorem k9t5p4_local_10_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_2) 4 j = k9t5p4_local_10_required_2 4 j := by decide + +private theorem k9t5p4_local_10_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_2) 5 j = k9t5p4_local_10_required_2 5 j := by decide + +private theorem k9t5p4_local_10_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_2) 6 j = k9t5p4_local_10_required_2 6 j := by decide + +private theorem k9t5p4_local_10_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_2) 7 j = k9t5p4_local_10_required_2 7 j := by decide + +private theorem k9t5p4_local_10_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_2) 8 j = k9t5p4_local_10_required_2 8 j := by decide + +private theorem k9t5p4_local_10_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_2) 9 j = k9t5p4_local_10_required_2 9 j := by decide + +private theorem k9t5p4_local_10_required_2_eq : (requiredMatrix 9 k9t5p4_step_10_required_block_2) = k9t5p4_local_10_required_2 := by + funext i j + fin_cases i + + · exact k9t5p4_local_10_required_2_eq_row_0 j + + · exact k9t5p4_local_10_required_2_eq_row_1 j + + · exact k9t5p4_local_10_required_2_eq_row_2 j + + · exact k9t5p4_local_10_required_2_eq_row_3 j + + · exact k9t5p4_local_10_required_2_eq_row_4 j + + · exact k9t5p4_local_10_required_2_eq_row_5 j + + · exact k9t5p4_local_10_required_2_eq_row_6 j + + · exact k9t5p4_local_10_required_2_eq_row_7 j + + · exact k9t5p4_local_10_required_2_eq_row_8 j + + · exact k9t5p4_local_10_required_2_eq_row_9 j + +private theorem k9t5p4_local_10_path_2_0 : (⟨8, 0, [9, 2, 3, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_2_1 : (⟨8, 6, [9, 2, 3, 4, 1, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_2_2 : (⟨8, 5, [9, 2, 3, 4, 1, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_2_3 : (⟨8, 1, [9, 2, 3, 4, 5, 6, 7, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_2_4 : (⟨0, 9, [1, 2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_2_5 : (⟨0, 6, [1, 2, 3, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_2_6 : (⟨0, 5, [1, 2, 3, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_2_7 : (⟨0, 5, [1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_2_8 : (⟨0, 4, [1, 2, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_2_9 : (⟨0, 5, [1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_2_10 : (⟨0, 9, [1, 2, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_2_11 : (⟨0, 5, [1, 2, 9, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_paths_block_2 : ∀ p ∈ k9t5p4_step_10_required_block_2, p.Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by + simp only [k9t5p4_step_10_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_10_path_2_0, k9t5p4_local_10_path_2_1, k9t5p4_local_10_path_2_2, k9t5p4_local_10_path_2_3, k9t5p4_local_10_path_2_4, k9t5p4_local_10_path_2_5, k9t5p4_local_10_path_2_6, k9t5p4_local_10_path_2_7, k9t5p4_local_10_path_2_8, k9t5p4_local_10_path_2_9, k9t5p4_local_10_path_2_10, k9t5p4_local_10_path_2_11⟩ + +private def k9t5p4_local_10_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {3, 4}, {0, 1}, {0, 1}, {1}, {2, 4}, ∅, {1}, {0, 1}, ∅], + #[{3, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_10_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_3) 0 j = k9t5p4_local_10_required_3 0 j := by decide + +private theorem k9t5p4_local_10_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_3) 1 j = k9t5p4_local_10_required_3 1 j := by decide + +private theorem k9t5p4_local_10_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_3) 2 j = k9t5p4_local_10_required_3 2 j := by decide + +private theorem k9t5p4_local_10_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_3) 3 j = k9t5p4_local_10_required_3 3 j := by decide + +private theorem k9t5p4_local_10_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_3) 4 j = k9t5p4_local_10_required_3 4 j := by decide + +private theorem k9t5p4_local_10_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_3) 5 j = k9t5p4_local_10_required_3 5 j := by decide + +private theorem k9t5p4_local_10_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_3) 6 j = k9t5p4_local_10_required_3 6 j := by decide + +private theorem k9t5p4_local_10_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_3) 7 j = k9t5p4_local_10_required_3 7 j := by decide + +private theorem k9t5p4_local_10_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_3) 8 j = k9t5p4_local_10_required_3 8 j := by decide + +private theorem k9t5p4_local_10_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_3) 9 j = k9t5p4_local_10_required_3 9 j := by decide + +private theorem k9t5p4_local_10_required_3_eq : (requiredMatrix 9 k9t5p4_step_10_required_block_3) = k9t5p4_local_10_required_3 := by + funext i j + fin_cases i + + · exact k9t5p4_local_10_required_3_eq_row_0 j + + · exact k9t5p4_local_10_required_3_eq_row_1 j + + · exact k9t5p4_local_10_required_3_eq_row_2 j + + · exact k9t5p4_local_10_required_3_eq_row_3 j + + · exact k9t5p4_local_10_required_3_eq_row_4 j + + · exact k9t5p4_local_10_required_3_eq_row_5 j + + · exact k9t5p4_local_10_required_3_eq_row_6 j + + · exact k9t5p4_local_10_required_3_eq_row_7 j + + · exact k9t5p4_local_10_required_3_eq_row_8 j + + · exact k9t5p4_local_10_required_3_eq_row_9 j + +private theorem k9t5p4_local_10_path_3_0 : (⟨0, 7, [1, 2, 9, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_3_1 : (⟨0, 8, [1, 2, 9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_3_2 : (⟨0, 5, [1, 2, 9, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_3_3 : (⟨0, 8, [1, 2, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_3_4 : (⟨0, 5, [1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_3_5 : (⟨0, 4, [1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_3_6 : (⟨0, 3, [1, 2, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_3_7 : (⟨0, 2, [1, 3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_3_8 : (⟨0, 2, [1, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_3_9 : (⟨0, 3, [1, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_3_10 : (⟨0, 1, [7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_3_11 : (⟨0, 1, [7, 6, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_paths_block_3 : ∀ p ∈ k9t5p4_step_10_required_block_3, p.Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by + simp only [k9t5p4_step_10_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_10_path_3_0, k9t5p4_local_10_path_3_1, k9t5p4_local_10_path_3_2, k9t5p4_local_10_path_3_3, k9t5p4_local_10_path_3_4, k9t5p4_local_10_path_3_5, k9t5p4_local_10_path_3_6, k9t5p4_local_10_path_3_7, k9t5p4_local_10_path_3_8, k9t5p4_local_10_path_3_9, k9t5p4_local_10_path_3_10, k9t5p4_local_10_path_3_11⟩ + +private def k9t5p4_local_10_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1, 2, 5}, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[{1, 2, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_10_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_4) 0 j = k9t5p4_local_10_required_4 0 j := by decide + +private theorem k9t5p4_local_10_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_4) 1 j = k9t5p4_local_10_required_4 1 j := by decide + +private theorem k9t5p4_local_10_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_4) 2 j = k9t5p4_local_10_required_4 2 j := by decide + +private theorem k9t5p4_local_10_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_4) 3 j = k9t5p4_local_10_required_4 3 j := by decide + +private theorem k9t5p4_local_10_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_4) 4 j = k9t5p4_local_10_required_4 4 j := by decide + +private theorem k9t5p4_local_10_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_4) 5 j = k9t5p4_local_10_required_4 5 j := by decide + +private theorem k9t5p4_local_10_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_4) 6 j = k9t5p4_local_10_required_4 6 j := by decide + +private theorem k9t5p4_local_10_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_4) 7 j = k9t5p4_local_10_required_4 7 j := by decide + +private theorem k9t5p4_local_10_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_4) 8 j = k9t5p4_local_10_required_4 8 j := by decide + +private theorem k9t5p4_local_10_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_10_required_block_4) 9 j = k9t5p4_local_10_required_4 9 j := by decide + +private theorem k9t5p4_local_10_required_4_eq : (requiredMatrix 9 k9t5p4_step_10_required_block_4) = k9t5p4_local_10_required_4 := by + funext i j + fin_cases i + + · exact k9t5p4_local_10_required_4_eq_row_0 j + + · exact k9t5p4_local_10_required_4_eq_row_1 j + + · exact k9t5p4_local_10_required_4_eq_row_2 j + + · exact k9t5p4_local_10_required_4_eq_row_3 j + + · exact k9t5p4_local_10_required_4_eq_row_4 j + + · exact k9t5p4_local_10_required_4_eq_row_5 j + + · exact k9t5p4_local_10_required_4_eq_row_6 j + + · exact k9t5p4_local_10_required_4_eq_row_7 j + + · exact k9t5p4_local_10_required_4_eq_row_8 j + + · exact k9t5p4_local_10_required_4_eq_row_9 j + +private theorem k9t5p4_local_10_path_4_0 : (⟨0, 1, [7, 6, 5, 4, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_4_1 : (⟨0, 1, [7, 6, 5, 4, 2, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_4_2 : (⟨0, 1, [7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_path_4_3 : (⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by decide + +private theorem k9t5p4_local_10_paths_block_4 : ∀ p ∈ k9t5p4_step_10_required_block_4, p.Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by + simp only [k9t5p4_step_10_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_10_path_4_0, k9t5p4_local_10_path_4_1, k9t5p4_local_10_path_4_2, k9t5p4_local_10_path_4_3⟩ + +private theorem k9t5p4_local_10_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_10 a b ∪ (((((k9t5p4_local_10_required_0 a b ∪ k9t5p4_local_10_required_1 a b) ∪ k9t5p4_local_10_required_2 a b) ∪ k9t5p4_local_10_required_3 a b) ∪ k9t5p4_local_10_required_4 a b))) 0 j = k9t5p4_local_10 0 j := by decide + +private theorem k9t5p4_local_10_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_10 a b ∪ (((((k9t5p4_local_10_required_0 a b ∪ k9t5p4_local_10_required_1 a b) ∪ k9t5p4_local_10_required_2 a b) ∪ k9t5p4_local_10_required_3 a b) ∪ k9t5p4_local_10_required_4 a b))) 1 j = k9t5p4_local_10 1 j := by decide + +private theorem k9t5p4_local_10_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_10 a b ∪ (((((k9t5p4_local_10_required_0 a b ∪ k9t5p4_local_10_required_1 a b) ∪ k9t5p4_local_10_required_2 a b) ∪ k9t5p4_local_10_required_3 a b) ∪ k9t5p4_local_10_required_4 a b))) 2 j = k9t5p4_local_10 2 j := by decide + +private theorem k9t5p4_local_10_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_10 a b ∪ (((((k9t5p4_local_10_required_0 a b ∪ k9t5p4_local_10_required_1 a b) ∪ k9t5p4_local_10_required_2 a b) ∪ k9t5p4_local_10_required_3 a b) ∪ k9t5p4_local_10_required_4 a b))) 3 j = k9t5p4_local_10 3 j := by decide + +private theorem k9t5p4_local_10_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_10 a b ∪ (((((k9t5p4_local_10_required_0 a b ∪ k9t5p4_local_10_required_1 a b) ∪ k9t5p4_local_10_required_2 a b) ∪ k9t5p4_local_10_required_3 a b) ∪ k9t5p4_local_10_required_4 a b))) 4 j = k9t5p4_local_10 4 j := by decide + +private theorem k9t5p4_local_10_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_10 a b ∪ (((((k9t5p4_local_10_required_0 a b ∪ k9t5p4_local_10_required_1 a b) ∪ k9t5p4_local_10_required_2 a b) ∪ k9t5p4_local_10_required_3 a b) ∪ k9t5p4_local_10_required_4 a b))) 5 j = k9t5p4_local_10 5 j := by decide + +private theorem k9t5p4_local_10_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_10 a b ∪ (((((k9t5p4_local_10_required_0 a b ∪ k9t5p4_local_10_required_1 a b) ∪ k9t5p4_local_10_required_2 a b) ∪ k9t5p4_local_10_required_3 a b) ∪ k9t5p4_local_10_required_4 a b))) 6 j = k9t5p4_local_10 6 j := by decide + +private theorem k9t5p4_local_10_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_10 a b ∪ (((((k9t5p4_local_10_required_0 a b ∪ k9t5p4_local_10_required_1 a b) ∪ k9t5p4_local_10_required_2 a b) ∪ k9t5p4_local_10_required_3 a b) ∪ k9t5p4_local_10_required_4 a b))) 7 j = k9t5p4_local_10 7 j := by decide + +private theorem k9t5p4_local_10_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_10 a b ∪ (((((k9t5p4_local_10_required_0 a b ∪ k9t5p4_local_10_required_1 a b) ∪ k9t5p4_local_10_required_2 a b) ∪ k9t5p4_local_10_required_3 a b) ∪ k9t5p4_local_10_required_4 a b))) 8 j = k9t5p4_local_10 8 j := by decide + +private theorem k9t5p4_local_10_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_10 a b ∪ (((((k9t5p4_local_10_required_0 a b ∪ k9t5p4_local_10_required_1 a b) ∪ k9t5p4_local_10_required_2 a b) ∪ k9t5p4_local_10_required_3 a b) ∪ k9t5p4_local_10_required_4 a b))) 9 j = k9t5p4_local_10 9 j := by decide + +private theorem k9t5p4_local_10_merged_eq : (fun a b => freshMatrix k9t5p4_state_10 a b ∪ (((((k9t5p4_local_10_required_0 a b ∪ k9t5p4_local_10_required_1 a b) ∪ k9t5p4_local_10_required_2 a b) ∪ k9t5p4_local_10_required_3 a b) ∪ k9t5p4_local_10_required_4 a b))) = k9t5p4_local_10 := by + funext i j + fin_cases i + + · exact k9t5p4_local_10_merged_eq_row_0 j + + · exact k9t5p4_local_10_merged_eq_row_1 j + + · exact k9t5p4_local_10_merged_eq_row_2 j + + · exact k9t5p4_local_10_merged_eq_row_3 j + + · exact k9t5p4_local_10_merged_eq_row_4 j + + · exact k9t5p4_local_10_merged_eq_row_5 j + + · exact k9t5p4_local_10_merged_eq_row_6 j + + · exact k9t5p4_local_10_merged_eq_row_7 j + + · exact k9t5p4_local_10_merged_eq_row_8 j + + · exact k9t5p4_local_10_merged_eq_row_9 j + +private theorem k9t5p4_local_10_eq : (fun a b => freshMatrix k9t5p4_state_10 a b ∪ requiredMatrix 9 k9t5p4_step_10_data.required a b) = k9t5p4_local_10 := by + funext a b + change freshMatrix k9t5p4_state_10 a b ∪ requiredMatrix 9 (k9t5p4_step_10_required_block_0 ++ k9t5p4_step_10_required_block_1 ++ k9t5p4_step_10_required_block_2 ++ k9t5p4_step_10_required_block_3 ++ k9t5p4_step_10_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t5p4_local_10_required_0_eq, k9t5p4_local_10_required_1_eq, k9t5p4_local_10_required_2_eq, k9t5p4_local_10_required_3_eq, k9t5p4_local_10_required_4_eq] + exact congrFun (congrFun k9t5p4_local_10_merged_eq a) b + +private theorem k9t5p4_local_10_paths : ∀ p ∈ k9t5p4_step_10_data.required, p.Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 := by + change ∀ p ∈ (k9t5p4_step_10_required_block_0 ++ k9t5p4_step_10_required_block_1 ++ k9t5p4_step_10_required_block_2 ++ k9t5p4_step_10_required_block_3 ++ k9t5p4_step_10_required_block_4), p.Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t5p4_local_10_paths_block_0, k9t5p4_local_10_paths_block_1⟩, k9t5p4_local_10_paths_block_2⟩, k9t5p4_local_10_paths_block_3⟩, k9t5p4_local_10_paths_block_4⟩ + +private theorem k9t5p4_local_10_bad : k9t5p4_step_10_data.bad.Check (freshGraph k9t5p4.graph k9t5p4_step_10_data.i k9t5p4_step_10_data.j) k9t5p4_local_10 9 5 := by decide + +private theorem k9t5p4_step_10_check : k9t5p4_step_10.Check k9t5p4.graph k9t5p4_state_10 9 5 := by + change k9t5p4_step_10_data.Check k9t5p4.graph k9t5p4_state_10 9 5 + refine ⟨by decide, k9t5p4_local_10_paths, ?_⟩ + rw [k9t5p4_local_10_eq] + exact k9t5p4_local_10_bad + +private theorem k9t5p4_update_10 : k9t5p4_step_10.apply k9t5p4_state_10 = k9t5p4_state_11 := by + have h : ∀ i j : Fin 9, k9t5p4_step_10.apply k9t5p4_state_10 i j = k9t5p4_state_11 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_12 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_11 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, {1, 2}, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, {1, 2}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_11_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t5p4_state_11 a b ∪ requiredMatrix 9 k9t5p4_step_11_data.required a b) 0 j = k9t5p4_local_11 0 j := by decide + +private theorem k9t5p4_local_11_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t5p4_state_11 a b ∪ requiredMatrix 9 k9t5p4_step_11_data.required a b) 1 j = k9t5p4_local_11 1 j := by decide + +private theorem k9t5p4_local_11_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t5p4_state_11 a b ∪ requiredMatrix 9 k9t5p4_step_11_data.required a b) 2 j = k9t5p4_local_11 2 j := by decide + +private theorem k9t5p4_local_11_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t5p4_state_11 a b ∪ requiredMatrix 9 k9t5p4_step_11_data.required a b) 3 j = k9t5p4_local_11 3 j := by decide + +private theorem k9t5p4_local_11_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t5p4_state_11 a b ∪ requiredMatrix 9 k9t5p4_step_11_data.required a b) 4 j = k9t5p4_local_11 4 j := by decide + +private theorem k9t5p4_local_11_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t5p4_state_11 a b ∪ requiredMatrix 9 k9t5p4_step_11_data.required a b) 5 j = k9t5p4_local_11 5 j := by decide + +private theorem k9t5p4_local_11_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t5p4_state_11 a b ∪ requiredMatrix 9 k9t5p4_step_11_data.required a b) 6 j = k9t5p4_local_11 6 j := by decide + +private theorem k9t5p4_local_11_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t5p4_state_11 a b ∪ requiredMatrix 9 k9t5p4_step_11_data.required a b) 7 j = k9t5p4_local_11 7 j := by decide + +private theorem k9t5p4_local_11_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t5p4_state_11 a b ∪ requiredMatrix 9 k9t5p4_step_11_data.required a b) 8 j = k9t5p4_local_11 8 j := by decide + +private theorem k9t5p4_local_11_eq : (fun a b => k9t5p4_state_11 a b ∪ requiredMatrix 9 k9t5p4_step_11_data.required a b) = k9t5p4_local_11 := by + funext i j + fin_cases i + + · exact k9t5p4_local_11_eq_row_0 j + + · exact k9t5p4_local_11_eq_row_1 j + + · exact k9t5p4_local_11_eq_row_2 j + + · exact k9t5p4_local_11_eq_row_3 j + + · exact k9t5p4_local_11_eq_row_4 j + + · exact k9t5p4_local_11_eq_row_5 j + + · exact k9t5p4_local_11_eq_row_6 j + + · exact k9t5p4_local_11_eq_row_7 j + + · exact k9t5p4_local_11_eq_row_8 j + +private theorem k9t5p4_local_11_paths : ∀ p ∈ k9t5p4_step_11_data.required, p.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_11_data.i k9t5p4_step_11_data.j) 9 := by decide + +private theorem k9t5p4_local_11_bad : k9t5p4_step_11_data.bad.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_11_data.i k9t5p4_step_11_data.j) k9t5p4_local_11 9 5 := by decide + +private theorem k9t5p4_step_11_check : k9t5p4_step_11.Check k9t5p4.graph k9t5p4_state_11 9 5 := by + change k9t5p4_step_11_data.Check k9t5p4.graph k9t5p4_state_11 9 5 + refine ⟨k9t5p4_local_11_paths, ?_⟩ + rw [k9t5p4_local_11_eq] + exact k9t5p4_local_11_bad + +private theorem k9t5p4_update_11 : k9t5p4_step_11.apply k9t5p4_state_11 = k9t5p4_state_12 := by + have h : ∀ i j : Fin 9, k9t5p4_step_11.apply k9t5p4_state_11 i j = k9t5p4_state_12 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_13 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_12 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1}, Finset.Icc 1 5, {0, 1}, {0, 1}, Finset.Icc 0 5, {0, 1}, {1}, Finset.Icc 0 4, {0, 1}], + #[{0, 1}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[Finset.Icc 1 5, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 0 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 0 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, {0, 1}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 0 6, {1, 2}], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[{1}, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, {0, 1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, {1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {1, 2}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_12_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {1, 2}, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, {1, 2}], + #[∅, ∅, {0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {0}, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_12_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_0) 0 j = k9t5p4_local_12_required_0 0 j := by decide + +private theorem k9t5p4_local_12_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_0) 1 j = k9t5p4_local_12_required_0 1 j := by decide + +private theorem k9t5p4_local_12_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_0) 2 j = k9t5p4_local_12_required_0 2 j := by decide + +private theorem k9t5p4_local_12_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_0) 3 j = k9t5p4_local_12_required_0 3 j := by decide + +private theorem k9t5p4_local_12_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_0) 4 j = k9t5p4_local_12_required_0 4 j := by decide + +private theorem k9t5p4_local_12_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_0) 5 j = k9t5p4_local_12_required_0 5 j := by decide + +private theorem k9t5p4_local_12_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_0) 6 j = k9t5p4_local_12_required_0 6 j := by decide + +private theorem k9t5p4_local_12_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_0) 7 j = k9t5p4_local_12_required_0 7 j := by decide + +private theorem k9t5p4_local_12_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_0) 8 j = k9t5p4_local_12_required_0 8 j := by decide + +private theorem k9t5p4_local_12_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_0) 9 j = k9t5p4_local_12_required_0 9 j := by decide + +private theorem k9t5p4_local_12_required_0_eq : (requiredMatrix 9 k9t5p4_step_12_required_block_0) = k9t5p4_local_12_required_0 := by + funext i j + fin_cases i + + · exact k9t5p4_local_12_required_0_eq_row_0 j + + · exact k9t5p4_local_12_required_0_eq_row_1 j + + · exact k9t5p4_local_12_required_0_eq_row_2 j + + · exact k9t5p4_local_12_required_0_eq_row_3 j + + · exact k9t5p4_local_12_required_0_eq_row_4 j + + · exact k9t5p4_local_12_required_0_eq_row_5 j + + · exact k9t5p4_local_12_required_0_eq_row_6 j + + · exact k9t5p4_local_12_required_0_eq_row_7 j + + · exact k9t5p4_local_12_required_0_eq_row_8 j + + · exact k9t5p4_local_12_required_0_eq_row_9 j + +private theorem k9t5p4_local_12_path_0_0 : (⟨2, 0, [1, 9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_0_1 : (⟨2, 0, [1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_0_2 : (⟨2, 8, [0, 7, 6, 5, 4, 1, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_0_3 : (⟨2, 6, [0, 7, 8, 9, 1, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_0_4 : (⟨2, 6, [0, 7, 8, 9, 1, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_0_5 : (⟨5, 0, [4, 1, 2, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_0_6 : (⟨5, 0, [4, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_0_7 : (⟨5, 9, [4, 1, 2, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_0_8 : (⟨5, 9, [4, 1, 3, 2, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_0_9 : (⟨5, 8, [4, 1, 9, 2, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_0_10 : (⟨5, 8, [4, 1, 9, 3, 2, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_0_11 : (⟨5, 0, [6, 7, 8, 9, 1, 3, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_paths_block_0 : ∀ p ∈ k9t5p4_step_12_required_block_0, p.Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by + simp only [k9t5p4_step_12_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_12_path_0_0, k9t5p4_local_12_path_0_1, k9t5p4_local_12_path_0_2, k9t5p4_local_12_path_0_3, k9t5p4_local_12_path_0_4, k9t5p4_local_12_path_0_5, k9t5p4_local_12_path_0_6, k9t5p4_local_12_path_0_7, k9t5p4_local_12_path_0_8, k9t5p4_local_12_path_0_9, k9t5p4_local_12_path_0_10, k9t5p4_local_12_path_0_11⟩ + +private def k9t5p4_local_12_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 3, 4}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 3, 4}, ∅, ∅, {0}, {0, 1}, {0, 1, 2}, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_12_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_1) 0 j = k9t5p4_local_12_required_1 0 j := by decide + +private theorem k9t5p4_local_12_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_1) 1 j = k9t5p4_local_12_required_1 1 j := by decide + +private theorem k9t5p4_local_12_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_1) 2 j = k9t5p4_local_12_required_1 2 j := by decide + +private theorem k9t5p4_local_12_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_1) 3 j = k9t5p4_local_12_required_1 3 j := by decide + +private theorem k9t5p4_local_12_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_1) 4 j = k9t5p4_local_12_required_1 4 j := by decide + +private theorem k9t5p4_local_12_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_1) 5 j = k9t5p4_local_12_required_1 5 j := by decide + +private theorem k9t5p4_local_12_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_1) 6 j = k9t5p4_local_12_required_1 6 j := by decide + +private theorem k9t5p4_local_12_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_1) 7 j = k9t5p4_local_12_required_1 7 j := by decide + +private theorem k9t5p4_local_12_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_1) 8 j = k9t5p4_local_12_required_1 8 j := by decide + +private theorem k9t5p4_local_12_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_1) 9 j = k9t5p4_local_12_required_1 9 j := by decide + +private theorem k9t5p4_local_12_required_1_eq : (requiredMatrix 9 k9t5p4_step_12_required_block_1) = k9t5p4_local_12_required_1 := by + funext i j + fin_cases i + + · exact k9t5p4_local_12_required_1_eq_row_0 j + + · exact k9t5p4_local_12_required_1_eq_row_1 j + + · exact k9t5p4_local_12_required_1_eq_row_2 j + + · exact k9t5p4_local_12_required_1_eq_row_3 j + + · exact k9t5p4_local_12_required_1_eq_row_4 j + + · exact k9t5p4_local_12_required_1_eq_row_5 j + + · exact k9t5p4_local_12_required_1_eq_row_6 j + + · exact k9t5p4_local_12_required_1_eq_row_7 j + + · exact k9t5p4_local_12_required_1_eq_row_8 j + + · exact k9t5p4_local_12_required_1_eq_row_9 j + +private theorem k9t5p4_local_12_path_1_0 : (⟨5, 8, [6, 7, 0, 2, 1, 3, 4, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_1_1 : (⟨8, 6, [7, 0, 2, 1, 9, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_1_2 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_1_3 : (⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_1_4 : (⟨8, 5, [9, 1, 2, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_1_5 : (⟨8, 4, [9, 1, 2, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_1_6 : (⟨8, 3, [9, 1, 2, 0, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_1_7 : (⟨8, 0, [9, 1, 3, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_1_8 : (⟨8, 5, [9, 1, 3, 2, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_1_9 : (⟨8, 4, [9, 1, 3, 2, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_1_10 : (⟨8, 0, [9, 1, 3, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_1_11 : (⟨8, 6, [9, 1, 3, 4, 2, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_paths_block_1 : ∀ p ∈ k9t5p4_step_12_required_block_1, p.Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by + simp only [k9t5p4_step_12_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_12_path_1_0, k9t5p4_local_12_path_1_1, k9t5p4_local_12_path_1_2, k9t5p4_local_12_path_1_3, k9t5p4_local_12_path_1_4, k9t5p4_local_12_path_1_5, k9t5p4_local_12_path_1_6, k9t5p4_local_12_path_1_7, k9t5p4_local_12_path_1_8, k9t5p4_local_12_path_1_9, k9t5p4_local_12_path_1_10, k9t5p4_local_12_path_1_11⟩ + +private def k9t5p4_local_12_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {0}, {0, 1, 3, 5}, {1}, ∅, {2}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 3, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, {0}, {0}, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_12_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_2) 0 j = k9t5p4_local_12_required_2 0 j := by decide + +private theorem k9t5p4_local_12_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_2) 1 j = k9t5p4_local_12_required_2 1 j := by decide + +private theorem k9t5p4_local_12_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_2) 2 j = k9t5p4_local_12_required_2 2 j := by decide + +private theorem k9t5p4_local_12_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_2) 3 j = k9t5p4_local_12_required_2 3 j := by decide + +private theorem k9t5p4_local_12_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_2) 4 j = k9t5p4_local_12_required_2 4 j := by decide + +private theorem k9t5p4_local_12_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_2) 5 j = k9t5p4_local_12_required_2 5 j := by decide + +private theorem k9t5p4_local_12_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_2) 6 j = k9t5p4_local_12_required_2 6 j := by decide + +private theorem k9t5p4_local_12_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_2) 7 j = k9t5p4_local_12_required_2 7 j := by decide + +private theorem k9t5p4_local_12_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_2) 8 j = k9t5p4_local_12_required_2 8 j := by decide + +private theorem k9t5p4_local_12_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_2) 9 j = k9t5p4_local_12_required_2 9 j := by decide + +private theorem k9t5p4_local_12_required_2_eq : (requiredMatrix 9 k9t5p4_step_12_required_block_2) = k9t5p4_local_12_required_2 := by + funext i j + fin_cases i + + · exact k9t5p4_local_12_required_2_eq_row_0 j + + · exact k9t5p4_local_12_required_2_eq_row_1 j + + · exact k9t5p4_local_12_required_2_eq_row_2 j + + · exact k9t5p4_local_12_required_2_eq_row_3 j + + · exact k9t5p4_local_12_required_2_eq_row_4 j + + · exact k9t5p4_local_12_required_2_eq_row_5 j + + · exact k9t5p4_local_12_required_2_eq_row_6 j + + · exact k9t5p4_local_12_required_2_eq_row_7 j + + · exact k9t5p4_local_12_required_2_eq_row_8 j + + · exact k9t5p4_local_12_required_2_eq_row_9 j + +private theorem k9t5p4_local_12_path_2_0 : (⟨8, 5, [9, 1, 3, 4, 2, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_2_1 : (⟨8, 2, [9, 1, 3, 4, 5, 6, 7, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_2_2 : (⟨8, 0, [9, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_2_3 : (⟨8, 1, [9, 2, 0, 7, 6, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_2_4 : (⟨0, 9, [2, 1, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_2_5 : (⟨0, 6, [2, 1, 3, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_2_6 : (⟨0, 5, [2, 1, 3, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_2_7 : (⟨0, 5, [2, 1, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_2_8 : (⟨0, 4, [2, 1, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_2_9 : (⟨0, 5, [2, 1, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_2_10 : (⟨0, 9, [2, 1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_2_11 : (⟨0, 5, [2, 1, 9, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_paths_block_2 : ∀ p ∈ k9t5p4_step_12_required_block_2, p.Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by + simp only [k9t5p4_step_12_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_12_path_2_0, k9t5p4_local_12_path_2_1, k9t5p4_local_12_path_2_2, k9t5p4_local_12_path_2_3, k9t5p4_local_12_path_2_4, k9t5p4_local_12_path_2_5, k9t5p4_local_12_path_2_6, k9t5p4_local_12_path_2_7, k9t5p4_local_12_path_2_8, k9t5p4_local_12_path_2_9, k9t5p4_local_12_path_2_10, k9t5p4_local_12_path_2_11⟩ + +private def k9t5p4_local_12_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1}, {2, 3}, {0, 1}, {1}, {2, 4}, ∅, {1}, {0, 1}, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_12_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_3) 0 j = k9t5p4_local_12_required_3 0 j := by decide + +private theorem k9t5p4_local_12_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_3) 1 j = k9t5p4_local_12_required_3 1 j := by decide + +private theorem k9t5p4_local_12_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_3) 2 j = k9t5p4_local_12_required_3 2 j := by decide + +private theorem k9t5p4_local_12_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_3) 3 j = k9t5p4_local_12_required_3 3 j := by decide + +private theorem k9t5p4_local_12_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_3) 4 j = k9t5p4_local_12_required_3 4 j := by decide + +private theorem k9t5p4_local_12_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_3) 5 j = k9t5p4_local_12_required_3 5 j := by decide + +private theorem k9t5p4_local_12_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_3) 6 j = k9t5p4_local_12_required_3 6 j := by decide + +private theorem k9t5p4_local_12_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_3) 7 j = k9t5p4_local_12_required_3 7 j := by decide + +private theorem k9t5p4_local_12_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_3) 8 j = k9t5p4_local_12_required_3 8 j := by decide + +private theorem k9t5p4_local_12_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_3) 9 j = k9t5p4_local_12_required_3 9 j := by decide + +private theorem k9t5p4_local_12_required_3_eq : (requiredMatrix 9 k9t5p4_step_12_required_block_3) = k9t5p4_local_12_required_3 := by + funext i j + fin_cases i + + · exact k9t5p4_local_12_required_3_eq_row_0 j + + · exact k9t5p4_local_12_required_3_eq_row_1 j + + · exact k9t5p4_local_12_required_3_eq_row_2 j + + · exact k9t5p4_local_12_required_3_eq_row_3 j + + · exact k9t5p4_local_12_required_3_eq_row_4 j + + · exact k9t5p4_local_12_required_3_eq_row_5 j + + · exact k9t5p4_local_12_required_3_eq_row_6 j + + · exact k9t5p4_local_12_required_3_eq_row_7 j + + · exact k9t5p4_local_12_required_3_eq_row_8 j + + · exact k9t5p4_local_12_required_3_eq_row_9 j + +private theorem k9t5p4_local_12_path_3_0 : (⟨0, 7, [2, 1, 9, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_3_1 : (⟨0, 8, [2, 1, 9, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_3_2 : (⟨0, 5, [2, 1, 9, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_3_3 : (⟨0, 8, [2, 1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_3_4 : (⟨0, 5, [2, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_3_5 : (⟨0, 4, [2, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_3_6 : (⟨0, 3, [2, 1, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_3_7 : (⟨0, 1, [2, 3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_3_8 : (⟨0, 1, [2, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_3_9 : (⟨0, 3, [2, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_3_10 : (⟨0, 2, [7, 6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_3_11 : (⟨0, 2, [7, 6, 5, 4, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_paths_block_3 : ∀ p ∈ k9t5p4_step_12_required_block_3, p.Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by + simp only [k9t5p4_step_12_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_12_path_3_0, k9t5p4_local_12_path_3_1, k9t5p4_local_12_path_3_2, k9t5p4_local_12_path_3_3, k9t5p4_local_12_path_3_4, k9t5p4_local_12_path_3_5, k9t5p4_local_12_path_3_6, k9t5p4_local_12_path_3_7, k9t5p4_local_12_path_3_8, k9t5p4_local_12_path_3_9, k9t5p4_local_12_path_3_10, k9t5p4_local_12_path_3_11⟩ + +private def k9t5p4_local_12_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, {1, 4, 5}, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_12_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_4) 0 j = k9t5p4_local_12_required_4 0 j := by decide + +private theorem k9t5p4_local_12_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_4) 1 j = k9t5p4_local_12_required_4 1 j := by decide + +private theorem k9t5p4_local_12_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_4) 2 j = k9t5p4_local_12_required_4 2 j := by decide + +private theorem k9t5p4_local_12_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_4) 3 j = k9t5p4_local_12_required_4 3 j := by decide + +private theorem k9t5p4_local_12_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_4) 4 j = k9t5p4_local_12_required_4 4 j := by decide + +private theorem k9t5p4_local_12_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_4) 5 j = k9t5p4_local_12_required_4 5 j := by decide + +private theorem k9t5p4_local_12_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_4) 6 j = k9t5p4_local_12_required_4 6 j := by decide + +private theorem k9t5p4_local_12_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_4) 7 j = k9t5p4_local_12_required_4 7 j := by decide + +private theorem k9t5p4_local_12_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_4) 8 j = k9t5p4_local_12_required_4 8 j := by decide + +private theorem k9t5p4_local_12_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_12_required_block_4) 9 j = k9t5p4_local_12_required_4 9 j := by decide + +private theorem k9t5p4_local_12_required_4_eq : (requiredMatrix 9 k9t5p4_step_12_required_block_4) = k9t5p4_local_12_required_4 := by + funext i j + fin_cases i + + · exact k9t5p4_local_12_required_4_eq_row_0 j + + · exact k9t5p4_local_12_required_4_eq_row_1 j + + · exact k9t5p4_local_12_required_4_eq_row_2 j + + · exact k9t5p4_local_12_required_4_eq_row_3 j + + · exact k9t5p4_local_12_required_4_eq_row_4 j + + · exact k9t5p4_local_12_required_4_eq_row_5 j + + · exact k9t5p4_local_12_required_4_eq_row_6 j + + · exact k9t5p4_local_12_required_4_eq_row_7 j + + · exact k9t5p4_local_12_required_4_eq_row_8 j + + · exact k9t5p4_local_12_required_4_eq_row_9 j + +private theorem k9t5p4_local_12_path_4_0 : (⟨0, 2, [7, 6, 5, 4, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_4_1 : (⟨0, 2, [7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_4_2 : (⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_path_4_3 : (⟨0, 2, [7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by decide + +private theorem k9t5p4_local_12_paths_block_4 : ∀ p ∈ k9t5p4_step_12_required_block_4, p.Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by + simp only [k9t5p4_step_12_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_12_path_4_0, k9t5p4_local_12_path_4_1, k9t5p4_local_12_path_4_2, k9t5p4_local_12_path_4_3⟩ + +private theorem k9t5p4_local_12_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_12 a b ∪ (((((k9t5p4_local_12_required_0 a b ∪ k9t5p4_local_12_required_1 a b) ∪ k9t5p4_local_12_required_2 a b) ∪ k9t5p4_local_12_required_3 a b) ∪ k9t5p4_local_12_required_4 a b))) 0 j = k9t5p4_local_12 0 j := by decide + +private theorem k9t5p4_local_12_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_12 a b ∪ (((((k9t5p4_local_12_required_0 a b ∪ k9t5p4_local_12_required_1 a b) ∪ k9t5p4_local_12_required_2 a b) ∪ k9t5p4_local_12_required_3 a b) ∪ k9t5p4_local_12_required_4 a b))) 1 j = k9t5p4_local_12 1 j := by decide + +private theorem k9t5p4_local_12_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_12 a b ∪ (((((k9t5p4_local_12_required_0 a b ∪ k9t5p4_local_12_required_1 a b) ∪ k9t5p4_local_12_required_2 a b) ∪ k9t5p4_local_12_required_3 a b) ∪ k9t5p4_local_12_required_4 a b))) 2 j = k9t5p4_local_12 2 j := by decide + +private theorem k9t5p4_local_12_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_12 a b ∪ (((((k9t5p4_local_12_required_0 a b ∪ k9t5p4_local_12_required_1 a b) ∪ k9t5p4_local_12_required_2 a b) ∪ k9t5p4_local_12_required_3 a b) ∪ k9t5p4_local_12_required_4 a b))) 3 j = k9t5p4_local_12 3 j := by decide + +private theorem k9t5p4_local_12_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_12 a b ∪ (((((k9t5p4_local_12_required_0 a b ∪ k9t5p4_local_12_required_1 a b) ∪ k9t5p4_local_12_required_2 a b) ∪ k9t5p4_local_12_required_3 a b) ∪ k9t5p4_local_12_required_4 a b))) 4 j = k9t5p4_local_12 4 j := by decide + +private theorem k9t5p4_local_12_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_12 a b ∪ (((((k9t5p4_local_12_required_0 a b ∪ k9t5p4_local_12_required_1 a b) ∪ k9t5p4_local_12_required_2 a b) ∪ k9t5p4_local_12_required_3 a b) ∪ k9t5p4_local_12_required_4 a b))) 5 j = k9t5p4_local_12 5 j := by decide + +private theorem k9t5p4_local_12_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_12 a b ∪ (((((k9t5p4_local_12_required_0 a b ∪ k9t5p4_local_12_required_1 a b) ∪ k9t5p4_local_12_required_2 a b) ∪ k9t5p4_local_12_required_3 a b) ∪ k9t5p4_local_12_required_4 a b))) 6 j = k9t5p4_local_12 6 j := by decide + +private theorem k9t5p4_local_12_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_12 a b ∪ (((((k9t5p4_local_12_required_0 a b ∪ k9t5p4_local_12_required_1 a b) ∪ k9t5p4_local_12_required_2 a b) ∪ k9t5p4_local_12_required_3 a b) ∪ k9t5p4_local_12_required_4 a b))) 7 j = k9t5p4_local_12 7 j := by decide + +private theorem k9t5p4_local_12_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_12 a b ∪ (((((k9t5p4_local_12_required_0 a b ∪ k9t5p4_local_12_required_1 a b) ∪ k9t5p4_local_12_required_2 a b) ∪ k9t5p4_local_12_required_3 a b) ∪ k9t5p4_local_12_required_4 a b))) 8 j = k9t5p4_local_12 8 j := by decide + +private theorem k9t5p4_local_12_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_12 a b ∪ (((((k9t5p4_local_12_required_0 a b ∪ k9t5p4_local_12_required_1 a b) ∪ k9t5p4_local_12_required_2 a b) ∪ k9t5p4_local_12_required_3 a b) ∪ k9t5p4_local_12_required_4 a b))) 9 j = k9t5p4_local_12 9 j := by decide + +private theorem k9t5p4_local_12_merged_eq : (fun a b => freshMatrix k9t5p4_state_12 a b ∪ (((((k9t5p4_local_12_required_0 a b ∪ k9t5p4_local_12_required_1 a b) ∪ k9t5p4_local_12_required_2 a b) ∪ k9t5p4_local_12_required_3 a b) ∪ k9t5p4_local_12_required_4 a b))) = k9t5p4_local_12 := by + funext i j + fin_cases i + + · exact k9t5p4_local_12_merged_eq_row_0 j + + · exact k9t5p4_local_12_merged_eq_row_1 j + + · exact k9t5p4_local_12_merged_eq_row_2 j + + · exact k9t5p4_local_12_merged_eq_row_3 j + + · exact k9t5p4_local_12_merged_eq_row_4 j + + · exact k9t5p4_local_12_merged_eq_row_5 j + + · exact k9t5p4_local_12_merged_eq_row_6 j + + · exact k9t5p4_local_12_merged_eq_row_7 j + + · exact k9t5p4_local_12_merged_eq_row_8 j + + · exact k9t5p4_local_12_merged_eq_row_9 j + +private theorem k9t5p4_local_12_eq : (fun a b => freshMatrix k9t5p4_state_12 a b ∪ requiredMatrix 9 k9t5p4_step_12_data.required a b) = k9t5p4_local_12 := by + funext a b + change freshMatrix k9t5p4_state_12 a b ∪ requiredMatrix 9 (k9t5p4_step_12_required_block_0 ++ k9t5p4_step_12_required_block_1 ++ k9t5p4_step_12_required_block_2 ++ k9t5p4_step_12_required_block_3 ++ k9t5p4_step_12_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t5p4_local_12_required_0_eq, k9t5p4_local_12_required_1_eq, k9t5p4_local_12_required_2_eq, k9t5p4_local_12_required_3_eq, k9t5p4_local_12_required_4_eq] + exact congrFun (congrFun k9t5p4_local_12_merged_eq a) b + +private theorem k9t5p4_local_12_paths : ∀ p ∈ k9t5p4_step_12_data.required, p.Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 := by + change ∀ p ∈ (k9t5p4_step_12_required_block_0 ++ k9t5p4_step_12_required_block_1 ++ k9t5p4_step_12_required_block_2 ++ k9t5p4_step_12_required_block_3 ++ k9t5p4_step_12_required_block_4), p.Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t5p4_local_12_paths_block_0, k9t5p4_local_12_paths_block_1⟩, k9t5p4_local_12_paths_block_2⟩, k9t5p4_local_12_paths_block_3⟩, k9t5p4_local_12_paths_block_4⟩ + +private theorem k9t5p4_local_12_bad : k9t5p4_step_12_data.bad.Check (freshGraph k9t5p4.graph k9t5p4_step_12_data.i k9t5p4_step_12_data.j) k9t5p4_local_12 9 5 := by decide + +private theorem k9t5p4_step_12_check : k9t5p4_step_12.Check k9t5p4.graph k9t5p4_state_12 9 5 := by + change k9t5p4_step_12_data.Check k9t5p4.graph k9t5p4_state_12 9 5 + refine ⟨by decide, k9t5p4_local_12_paths, ?_⟩ + rw [k9t5p4_local_12_eq] + exact k9t5p4_local_12_bad + +private theorem k9t5p4_update_12 : k9t5p4_step_12.apply k9t5p4_state_12 = k9t5p4_state_13 := by + have h : ∀ i j : Fin 9, k9t5p4_step_12.apply k9t5p4_state_12 i j = k9t5p4_state_13 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_14 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_13 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, {1, 2}, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 2 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, {1, 2}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_13_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t5p4_state_13 a b ∪ requiredMatrix 9 k9t5p4_step_13_data.required a b) 0 j = k9t5p4_local_13 0 j := by decide + +private theorem k9t5p4_local_13_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t5p4_state_13 a b ∪ requiredMatrix 9 k9t5p4_step_13_data.required a b) 1 j = k9t5p4_local_13 1 j := by decide + +private theorem k9t5p4_local_13_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t5p4_state_13 a b ∪ requiredMatrix 9 k9t5p4_step_13_data.required a b) 2 j = k9t5p4_local_13 2 j := by decide + +private theorem k9t5p4_local_13_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t5p4_state_13 a b ∪ requiredMatrix 9 k9t5p4_step_13_data.required a b) 3 j = k9t5p4_local_13 3 j := by decide + +private theorem k9t5p4_local_13_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t5p4_state_13 a b ∪ requiredMatrix 9 k9t5p4_step_13_data.required a b) 4 j = k9t5p4_local_13 4 j := by decide + +private theorem k9t5p4_local_13_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t5p4_state_13 a b ∪ requiredMatrix 9 k9t5p4_step_13_data.required a b) 5 j = k9t5p4_local_13 5 j := by decide + +private theorem k9t5p4_local_13_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t5p4_state_13 a b ∪ requiredMatrix 9 k9t5p4_step_13_data.required a b) 6 j = k9t5p4_local_13 6 j := by decide + +private theorem k9t5p4_local_13_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t5p4_state_13 a b ∪ requiredMatrix 9 k9t5p4_step_13_data.required a b) 7 j = k9t5p4_local_13 7 j := by decide + +private theorem k9t5p4_local_13_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t5p4_state_13 a b ∪ requiredMatrix 9 k9t5p4_step_13_data.required a b) 8 j = k9t5p4_local_13 8 j := by decide + +private theorem k9t5p4_local_13_eq : (fun a b => k9t5p4_state_13 a b ∪ requiredMatrix 9 k9t5p4_step_13_data.required a b) = k9t5p4_local_13 := by + funext i j + fin_cases i + + · exact k9t5p4_local_13_eq_row_0 j + + · exact k9t5p4_local_13_eq_row_1 j + + · exact k9t5p4_local_13_eq_row_2 j + + · exact k9t5p4_local_13_eq_row_3 j + + · exact k9t5p4_local_13_eq_row_4 j + + · exact k9t5p4_local_13_eq_row_5 j + + · exact k9t5p4_local_13_eq_row_6 j + + · exact k9t5p4_local_13_eq_row_7 j + + · exact k9t5p4_local_13_eq_row_8 j + +private theorem k9t5p4_local_13_paths : ∀ p ∈ k9t5p4_step_13_data.required, p.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_13_data.i k9t5p4_step_13_data.j) 9 := by decide + +private theorem k9t5p4_local_13_bad : k9t5p4_step_13_data.bad.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_13_data.i k9t5p4_step_13_data.j) k9t5p4_local_13 9 5 := by decide + +private theorem k9t5p4_step_13_check : k9t5p4_step_13.Check k9t5p4.graph k9t5p4_state_13 9 5 := by + change k9t5p4_step_13_data.Check k9t5p4.graph k9t5p4_state_13 9 5 + refine ⟨k9t5p4_local_13_paths, ?_⟩ + rw [k9t5p4_local_13_eq] + exact k9t5p4_local_13_bad + +private theorem k9t5p4_update_13 : k9t5p4_step_13.apply k9t5p4_state_13 = k9t5p4_state_14 := by + have h : ∀ i j : Fin 9, k9t5p4_step_13.apply k9t5p4_state_13 i j = k9t5p4_state_14 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_15 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_14 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, Finset.Icc 1 5, {0, 1}, Finset.Icc 0 5, {0, 1}, {1}, Finset.Icc 0 4, {0, 1}], + #[{0, 1}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 7, {1, 2, 3}], + #[Finset.Icc 1 5, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, {0, 2, 3, 4, 5}, Finset.Icc 0 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, {0, 1}, ∅], + #[Finset.Icc 0 5, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 0 6, {1, 2}], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[{1}, Finset.Icc 0 6, Finset.Icc 0 5, {0, 2, 3, 4, 5}, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, {0, 1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, {1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {1, 2}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_14_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, {1, 2}, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 2}, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, {1, 2}], + #[∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {0}, ∅, {1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_14_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_0) 0 j = k9t5p4_local_14_required_0 0 j := by decide + +private theorem k9t5p4_local_14_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_0) 1 j = k9t5p4_local_14_required_0 1 j := by decide + +private theorem k9t5p4_local_14_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_0) 2 j = k9t5p4_local_14_required_0 2 j := by decide + +private theorem k9t5p4_local_14_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_0) 3 j = k9t5p4_local_14_required_0 3 j := by decide + +private theorem k9t5p4_local_14_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_0) 4 j = k9t5p4_local_14_required_0 4 j := by decide + +private theorem k9t5p4_local_14_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_0) 5 j = k9t5p4_local_14_required_0 5 j := by decide + +private theorem k9t5p4_local_14_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_0) 6 j = k9t5p4_local_14_required_0 6 j := by decide + +private theorem k9t5p4_local_14_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_0) 7 j = k9t5p4_local_14_required_0 7 j := by decide + +private theorem k9t5p4_local_14_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_0) 8 j = k9t5p4_local_14_required_0 8 j := by decide + +private theorem k9t5p4_local_14_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_0) 9 j = k9t5p4_local_14_required_0 9 j := by decide + +private theorem k9t5p4_local_14_required_0_eq : (requiredMatrix 9 k9t5p4_step_14_required_block_0) = k9t5p4_local_14_required_0 := by + funext i j + fin_cases i + + · exact k9t5p4_local_14_required_0_eq_row_0 j + + · exact k9t5p4_local_14_required_0_eq_row_1 j + + · exact k9t5p4_local_14_required_0_eq_row_2 j + + · exact k9t5p4_local_14_required_0_eq_row_3 j + + · exact k9t5p4_local_14_required_0_eq_row_4 j + + · exact k9t5p4_local_14_required_0_eq_row_5 j + + · exact k9t5p4_local_14_required_0_eq_row_6 j + + · exact k9t5p4_local_14_required_0_eq_row_7 j + + · exact k9t5p4_local_14_required_0_eq_row_8 j + + · exact k9t5p4_local_14_required_0_eq_row_9 j + +private theorem k9t5p4_local_14_path_0_0 : (⟨3, 0, [1, 9, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_0_1 : (⟨3, 0, [1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_0_2 : (⟨3, 8, [0, 7, 6, 5, 4, 1, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_0_3 : (⟨3, 6, [0, 7, 8, 9, 1, 2, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_0_4 : (⟨3, 6, [0, 7, 8, 9, 1, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_0_5 : (⟨5, 0, [4, 1, 2, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_0_6 : (⟨5, 9, [4, 1, 2, 3, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_0_7 : (⟨5, 0, [4, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_0_8 : (⟨5, 9, [4, 1, 3, 0, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_0_9 : (⟨5, 8, [4, 1, 9, 2, 3, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_0_10 : (⟨5, 8, [4, 1, 9, 3, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_0_11 : (⟨5, 0, [6, 7, 8, 9, 1, 2, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_paths_block_0 : ∀ p ∈ k9t5p4_step_14_required_block_0, p.Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by + simp only [k9t5p4_step_14_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_14_path_0_0, k9t5p4_local_14_path_0_1, k9t5p4_local_14_path_0_2, k9t5p4_local_14_path_0_3, k9t5p4_local_14_path_0_4, k9t5p4_local_14_path_0_5, k9t5p4_local_14_path_0_6, k9t5p4_local_14_path_0_7, k9t5p4_local_14_path_0_8, k9t5p4_local_14_path_0_9, k9t5p4_local_14_path_0_10, k9t5p4_local_14_path_0_11⟩ + +private def k9t5p4_local_14_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 3, 4}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 3, 4}, ∅, ∅, {0}, {0}, {0, 1, 2}, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_14_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_1) 0 j = k9t5p4_local_14_required_1 0 j := by decide + +private theorem k9t5p4_local_14_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_1) 1 j = k9t5p4_local_14_required_1 1 j := by decide + +private theorem k9t5p4_local_14_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_1) 2 j = k9t5p4_local_14_required_1 2 j := by decide + +private theorem k9t5p4_local_14_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_1) 3 j = k9t5p4_local_14_required_1 3 j := by decide + +private theorem k9t5p4_local_14_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_1) 4 j = k9t5p4_local_14_required_1 4 j := by decide + +private theorem k9t5p4_local_14_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_1) 5 j = k9t5p4_local_14_required_1 5 j := by decide + +private theorem k9t5p4_local_14_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_1) 6 j = k9t5p4_local_14_required_1 6 j := by decide + +private theorem k9t5p4_local_14_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_1) 7 j = k9t5p4_local_14_required_1 7 j := by decide + +private theorem k9t5p4_local_14_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_1) 8 j = k9t5p4_local_14_required_1 8 j := by decide + +private theorem k9t5p4_local_14_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_1) 9 j = k9t5p4_local_14_required_1 9 j := by decide + +private theorem k9t5p4_local_14_required_1_eq : (requiredMatrix 9 k9t5p4_step_14_required_block_1) = k9t5p4_local_14_required_1 := by + funext i j + fin_cases i + + · exact k9t5p4_local_14_required_1_eq_row_0 j + + · exact k9t5p4_local_14_required_1_eq_row_1 j + + · exact k9t5p4_local_14_required_1_eq_row_2 j + + · exact k9t5p4_local_14_required_1_eq_row_3 j + + · exact k9t5p4_local_14_required_1_eq_row_4 j + + · exact k9t5p4_local_14_required_1_eq_row_5 j + + · exact k9t5p4_local_14_required_1_eq_row_6 j + + · exact k9t5p4_local_14_required_1_eq_row_7 j + + · exact k9t5p4_local_14_required_1_eq_row_8 j + + · exact k9t5p4_local_14_required_1_eq_row_9 j + +private theorem k9t5p4_local_14_path_1_0 : (⟨5, 8, [6, 7, 0, 3, 1, 2, 4, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_1_1 : (⟨8, 6, [7, 0, 3, 1, 9, 2, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_1_2 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_1_3 : (⟨8, 0, [9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_1_4 : (⟨8, 5, [9, 1, 2, 3, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_1_5 : (⟨8, 4, [9, 1, 2, 3, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_1_6 : (⟨8, 0, [9, 1, 2, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_1_7 : (⟨8, 6, [9, 1, 2, 4, 3, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_1_8 : (⟨8, 5, [9, 1, 2, 4, 3, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_1_9 : (⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_1_10 : (⟨8, 3, [9, 1, 2, 4, 5, 6, 7, 0]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_1_11 : (⟨8, 5, [9, 1, 3, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_paths_block_1 : ∀ p ∈ k9t5p4_step_14_required_block_1, p.Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by + simp only [k9t5p4_step_14_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_14_path_1_0, k9t5p4_local_14_path_1_1, k9t5p4_local_14_path_1_2, k9t5p4_local_14_path_1_3, k9t5p4_local_14_path_1_4, k9t5p4_local_14_path_1_5, k9t5p4_local_14_path_1_6, k9t5p4_local_14_path_1_7, k9t5p4_local_14_path_1_8, k9t5p4_local_14_path_1_9, k9t5p4_local_14_path_1_10, k9t5p4_local_14_path_1_11⟩ + +private def k9t5p4_local_14_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {0}, {0, 1, 3, 5}, {1}, ∅, {2}, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[{0, 1, 3, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2}, {0}, {0}, ∅, {1}, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_14_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_2) 0 j = k9t5p4_local_14_required_2 0 j := by decide + +private theorem k9t5p4_local_14_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_2) 1 j = k9t5p4_local_14_required_2 1 j := by decide + +private theorem k9t5p4_local_14_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_2) 2 j = k9t5p4_local_14_required_2 2 j := by decide + +private theorem k9t5p4_local_14_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_2) 3 j = k9t5p4_local_14_required_2 3 j := by decide + +private theorem k9t5p4_local_14_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_2) 4 j = k9t5p4_local_14_required_2 4 j := by decide + +private theorem k9t5p4_local_14_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_2) 5 j = k9t5p4_local_14_required_2 5 j := by decide + +private theorem k9t5p4_local_14_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_2) 6 j = k9t5p4_local_14_required_2 6 j := by decide + +private theorem k9t5p4_local_14_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_2) 7 j = k9t5p4_local_14_required_2 7 j := by decide + +private theorem k9t5p4_local_14_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_2) 8 j = k9t5p4_local_14_required_2 8 j := by decide + +private theorem k9t5p4_local_14_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_2) 9 j = k9t5p4_local_14_required_2 9 j := by decide + +private theorem k9t5p4_local_14_required_2_eq : (requiredMatrix 9 k9t5p4_step_14_required_block_2) = k9t5p4_local_14_required_2 := by + funext i j + fin_cases i + + · exact k9t5p4_local_14_required_2_eq_row_0 j + + · exact k9t5p4_local_14_required_2_eq_row_1 j + + · exact k9t5p4_local_14_required_2_eq_row_2 j + + · exact k9t5p4_local_14_required_2_eq_row_3 j + + · exact k9t5p4_local_14_required_2_eq_row_4 j + + · exact k9t5p4_local_14_required_2_eq_row_5 j + + · exact k9t5p4_local_14_required_2_eq_row_6 j + + · exact k9t5p4_local_14_required_2_eq_row_7 j + + · exact k9t5p4_local_14_required_2_eq_row_8 j + + · exact k9t5p4_local_14_required_2_eq_row_9 j + +private theorem k9t5p4_local_14_path_2_0 : (⟨8, 4, [9, 1, 3, 0, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_2_1 : (⟨8, 2, [9, 1, 3, 0, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_2_2 : (⟨8, 0, [9, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_2_3 : (⟨8, 1, [9, 2, 3, 0, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_2_4 : (⟨0, 9, [3, 1, 2, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_2_5 : (⟨0, 6, [3, 1, 2, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_2_6 : (⟨0, 5, [3, 1, 2, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_2_7 : (⟨0, 5, [3, 1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_2_8 : (⟨0, 4, [3, 1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_2_9 : (⟨0, 5, [3, 1, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_2_10 : (⟨0, 9, [3, 1, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_2_11 : (⟨0, 5, [3, 1, 9, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_paths_block_2 : ∀ p ∈ k9t5p4_step_14_required_block_2, p.Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by + simp only [k9t5p4_step_14_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_14_path_2_0, k9t5p4_local_14_path_2_1, k9t5p4_local_14_path_2_2, k9t5p4_local_14_path_2_3, k9t5p4_local_14_path_2_4, k9t5p4_local_14_path_2_5, k9t5p4_local_14_path_2_6, k9t5p4_local_14_path_2_7, k9t5p4_local_14_path_2_8, k9t5p4_local_14_path_2_9, k9t5p4_local_14_path_2_10, k9t5p4_local_14_path_2_11⟩ + +private def k9t5p4_local_14_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, {1, 3}, {1}, {2, 4}, ∅, {1}, {0, 1}, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1, 3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_14_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_3) 0 j = k9t5p4_local_14_required_3 0 j := by decide + +private theorem k9t5p4_local_14_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_3) 1 j = k9t5p4_local_14_required_3 1 j := by decide + +private theorem k9t5p4_local_14_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_3) 2 j = k9t5p4_local_14_required_3 2 j := by decide + +private theorem k9t5p4_local_14_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_3) 3 j = k9t5p4_local_14_required_3 3 j := by decide + +private theorem k9t5p4_local_14_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_3) 4 j = k9t5p4_local_14_required_3 4 j := by decide + +private theorem k9t5p4_local_14_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_3) 5 j = k9t5p4_local_14_required_3 5 j := by decide + +private theorem k9t5p4_local_14_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_3) 6 j = k9t5p4_local_14_required_3 6 j := by decide + +private theorem k9t5p4_local_14_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_3) 7 j = k9t5p4_local_14_required_3 7 j := by decide + +private theorem k9t5p4_local_14_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_3) 8 j = k9t5p4_local_14_required_3 8 j := by decide + +private theorem k9t5p4_local_14_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_3) 9 j = k9t5p4_local_14_required_3 9 j := by decide + +private theorem k9t5p4_local_14_required_3_eq : (requiredMatrix 9 k9t5p4_step_14_required_block_3) = k9t5p4_local_14_required_3 := by + funext i j + fin_cases i + + · exact k9t5p4_local_14_required_3_eq_row_0 j + + · exact k9t5p4_local_14_required_3_eq_row_1 j + + · exact k9t5p4_local_14_required_3_eq_row_2 j + + · exact k9t5p4_local_14_required_3_eq_row_3 j + + · exact k9t5p4_local_14_required_3_eq_row_4 j + + · exact k9t5p4_local_14_required_3_eq_row_5 j + + · exact k9t5p4_local_14_required_3_eq_row_6 j + + · exact k9t5p4_local_14_required_3_eq_row_7 j + + · exact k9t5p4_local_14_required_3_eq_row_8 j + + · exact k9t5p4_local_14_required_3_eq_row_9 j + +private theorem k9t5p4_local_14_path_3_0 : (⟨0, 7, [3, 1, 9, 2, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_3_1 : (⟨0, 8, [3, 1, 9, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_3_2 : (⟨0, 5, [3, 1, 9, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_3_3 : (⟨0, 8, [3, 1, 9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_3_4 : (⟨0, 5, [3, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_3_5 : (⟨0, 4, [3, 1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_3_6 : (⟨0, 2, [3, 1, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_3_7 : (⟨0, 1, [3, 2, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_3_8 : (⟨0, 1, [3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_3_9 : (⟨0, 2, [3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_3_10 : (⟨0, 3, [7, 6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_3_11 : (⟨0, 3, [7, 6, 5, 4, 1, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_paths_block_3 : ∀ p ∈ k9t5p4_step_14_required_block_3, p.Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by + simp only [k9t5p4_step_14_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_14_path_3_0, k9t5p4_local_14_path_3_1, k9t5p4_local_14_path_3_2, k9t5p4_local_14_path_3_3, k9t5p4_local_14_path_3_4, k9t5p4_local_14_path_3_5, k9t5p4_local_14_path_3_6, k9t5p4_local_14_path_3_7, k9t5p4_local_14_path_3_8, k9t5p4_local_14_path_3_9, k9t5p4_local_14_path_3_10, k9t5p4_local_14_path_3_11⟩ + +private def k9t5p4_local_14_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, {2, 4, 5}, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{2, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_14_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_4) 0 j = k9t5p4_local_14_required_4 0 j := by decide + +private theorem k9t5p4_local_14_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_4) 1 j = k9t5p4_local_14_required_4 1 j := by decide + +private theorem k9t5p4_local_14_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_4) 2 j = k9t5p4_local_14_required_4 2 j := by decide + +private theorem k9t5p4_local_14_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_4) 3 j = k9t5p4_local_14_required_4 3 j := by decide + +private theorem k9t5p4_local_14_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_4) 4 j = k9t5p4_local_14_required_4 4 j := by decide + +private theorem k9t5p4_local_14_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_4) 5 j = k9t5p4_local_14_required_4 5 j := by decide + +private theorem k9t5p4_local_14_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_4) 6 j = k9t5p4_local_14_required_4 6 j := by decide + +private theorem k9t5p4_local_14_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_4) 7 j = k9t5p4_local_14_required_4 7 j := by decide + +private theorem k9t5p4_local_14_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_4) 8 j = k9t5p4_local_14_required_4 8 j := by decide + +private theorem k9t5p4_local_14_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_14_required_block_4) 9 j = k9t5p4_local_14_required_4 9 j := by decide + +private theorem k9t5p4_local_14_required_4_eq : (requiredMatrix 9 k9t5p4_step_14_required_block_4) = k9t5p4_local_14_required_4 := by + funext i j + fin_cases i + + · exact k9t5p4_local_14_required_4_eq_row_0 j + + · exact k9t5p4_local_14_required_4_eq_row_1 j + + · exact k9t5p4_local_14_required_4_eq_row_2 j + + · exact k9t5p4_local_14_required_4_eq_row_3 j + + · exact k9t5p4_local_14_required_4_eq_row_4 j + + · exact k9t5p4_local_14_required_4_eq_row_5 j + + · exact k9t5p4_local_14_required_4_eq_row_6 j + + · exact k9t5p4_local_14_required_4_eq_row_7 j + + · exact k9t5p4_local_14_required_4_eq_row_8 j + + · exact k9t5p4_local_14_required_4_eq_row_9 j + +private theorem k9t5p4_local_14_path_4_0 : (⟨0, 3, [7, 6, 5, 4, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_4_1 : (⟨0, 3, [7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_4_2 : (⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_path_4_3 : (⟨0, 3, [7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by decide + +private theorem k9t5p4_local_14_paths_block_4 : ∀ p ∈ k9t5p4_step_14_required_block_4, p.Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by + simp only [k9t5p4_step_14_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_14_path_4_0, k9t5p4_local_14_path_4_1, k9t5p4_local_14_path_4_2, k9t5p4_local_14_path_4_3⟩ + +private theorem k9t5p4_local_14_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_14 a b ∪ (((((k9t5p4_local_14_required_0 a b ∪ k9t5p4_local_14_required_1 a b) ∪ k9t5p4_local_14_required_2 a b) ∪ k9t5p4_local_14_required_3 a b) ∪ k9t5p4_local_14_required_4 a b))) 0 j = k9t5p4_local_14 0 j := by decide + +private theorem k9t5p4_local_14_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_14 a b ∪ (((((k9t5p4_local_14_required_0 a b ∪ k9t5p4_local_14_required_1 a b) ∪ k9t5p4_local_14_required_2 a b) ∪ k9t5p4_local_14_required_3 a b) ∪ k9t5p4_local_14_required_4 a b))) 1 j = k9t5p4_local_14 1 j := by decide + +private theorem k9t5p4_local_14_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_14 a b ∪ (((((k9t5p4_local_14_required_0 a b ∪ k9t5p4_local_14_required_1 a b) ∪ k9t5p4_local_14_required_2 a b) ∪ k9t5p4_local_14_required_3 a b) ∪ k9t5p4_local_14_required_4 a b))) 2 j = k9t5p4_local_14 2 j := by decide + +private theorem k9t5p4_local_14_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_14 a b ∪ (((((k9t5p4_local_14_required_0 a b ∪ k9t5p4_local_14_required_1 a b) ∪ k9t5p4_local_14_required_2 a b) ∪ k9t5p4_local_14_required_3 a b) ∪ k9t5p4_local_14_required_4 a b))) 3 j = k9t5p4_local_14 3 j := by decide + +private theorem k9t5p4_local_14_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_14 a b ∪ (((((k9t5p4_local_14_required_0 a b ∪ k9t5p4_local_14_required_1 a b) ∪ k9t5p4_local_14_required_2 a b) ∪ k9t5p4_local_14_required_3 a b) ∪ k9t5p4_local_14_required_4 a b))) 4 j = k9t5p4_local_14 4 j := by decide + +private theorem k9t5p4_local_14_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_14 a b ∪ (((((k9t5p4_local_14_required_0 a b ∪ k9t5p4_local_14_required_1 a b) ∪ k9t5p4_local_14_required_2 a b) ∪ k9t5p4_local_14_required_3 a b) ∪ k9t5p4_local_14_required_4 a b))) 5 j = k9t5p4_local_14 5 j := by decide + +private theorem k9t5p4_local_14_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_14 a b ∪ (((((k9t5p4_local_14_required_0 a b ∪ k9t5p4_local_14_required_1 a b) ∪ k9t5p4_local_14_required_2 a b) ∪ k9t5p4_local_14_required_3 a b) ∪ k9t5p4_local_14_required_4 a b))) 6 j = k9t5p4_local_14 6 j := by decide + +private theorem k9t5p4_local_14_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_14 a b ∪ (((((k9t5p4_local_14_required_0 a b ∪ k9t5p4_local_14_required_1 a b) ∪ k9t5p4_local_14_required_2 a b) ∪ k9t5p4_local_14_required_3 a b) ∪ k9t5p4_local_14_required_4 a b))) 7 j = k9t5p4_local_14 7 j := by decide + +private theorem k9t5p4_local_14_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_14 a b ∪ (((((k9t5p4_local_14_required_0 a b ∪ k9t5p4_local_14_required_1 a b) ∪ k9t5p4_local_14_required_2 a b) ∪ k9t5p4_local_14_required_3 a b) ∪ k9t5p4_local_14_required_4 a b))) 8 j = k9t5p4_local_14 8 j := by decide + +private theorem k9t5p4_local_14_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_14 a b ∪ (((((k9t5p4_local_14_required_0 a b ∪ k9t5p4_local_14_required_1 a b) ∪ k9t5p4_local_14_required_2 a b) ∪ k9t5p4_local_14_required_3 a b) ∪ k9t5p4_local_14_required_4 a b))) 9 j = k9t5p4_local_14 9 j := by decide + +private theorem k9t5p4_local_14_merged_eq : (fun a b => freshMatrix k9t5p4_state_14 a b ∪ (((((k9t5p4_local_14_required_0 a b ∪ k9t5p4_local_14_required_1 a b) ∪ k9t5p4_local_14_required_2 a b) ∪ k9t5p4_local_14_required_3 a b) ∪ k9t5p4_local_14_required_4 a b))) = k9t5p4_local_14 := by + funext i j + fin_cases i + + · exact k9t5p4_local_14_merged_eq_row_0 j + + · exact k9t5p4_local_14_merged_eq_row_1 j + + · exact k9t5p4_local_14_merged_eq_row_2 j + + · exact k9t5p4_local_14_merged_eq_row_3 j + + · exact k9t5p4_local_14_merged_eq_row_4 j + + · exact k9t5p4_local_14_merged_eq_row_5 j + + · exact k9t5p4_local_14_merged_eq_row_6 j + + · exact k9t5p4_local_14_merged_eq_row_7 j + + · exact k9t5p4_local_14_merged_eq_row_8 j + + · exact k9t5p4_local_14_merged_eq_row_9 j + +private theorem k9t5p4_local_14_eq : (fun a b => freshMatrix k9t5p4_state_14 a b ∪ requiredMatrix 9 k9t5p4_step_14_data.required a b) = k9t5p4_local_14 := by + funext a b + change freshMatrix k9t5p4_state_14 a b ∪ requiredMatrix 9 (k9t5p4_step_14_required_block_0 ++ k9t5p4_step_14_required_block_1 ++ k9t5p4_step_14_required_block_2 ++ k9t5p4_step_14_required_block_3 ++ k9t5p4_step_14_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t5p4_local_14_required_0_eq, k9t5p4_local_14_required_1_eq, k9t5p4_local_14_required_2_eq, k9t5p4_local_14_required_3_eq, k9t5p4_local_14_required_4_eq] + exact congrFun (congrFun k9t5p4_local_14_merged_eq a) b + +private theorem k9t5p4_local_14_paths : ∀ p ∈ k9t5p4_step_14_data.required, p.Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 := by + change ∀ p ∈ (k9t5p4_step_14_required_block_0 ++ k9t5p4_step_14_required_block_1 ++ k9t5p4_step_14_required_block_2 ++ k9t5p4_step_14_required_block_3 ++ k9t5p4_step_14_required_block_4), p.Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t5p4_local_14_paths_block_0, k9t5p4_local_14_paths_block_1⟩, k9t5p4_local_14_paths_block_2⟩, k9t5p4_local_14_paths_block_3⟩, k9t5p4_local_14_paths_block_4⟩ + +private theorem k9t5p4_local_14_bad : k9t5p4_step_14_data.bad.Check (freshGraph k9t5p4.graph k9t5p4_step_14_data.i k9t5p4_step_14_data.j) k9t5p4_local_14 9 5 := by decide + +private theorem k9t5p4_step_14_check : k9t5p4_step_14.Check k9t5p4.graph k9t5p4_state_14 9 5 := by + change k9t5p4_step_14_data.Check k9t5p4.graph k9t5p4_state_14 9 5 + refine ⟨by decide, k9t5p4_local_14_paths, ?_⟩ + rw [k9t5p4_local_14_eq] + exact k9t5p4_local_14_bad + +private theorem k9t5p4_update_14 : k9t5p4_step_14.apply k9t5p4_state_14 = k9t5p4_state_15 := by + have h : ∀ i j : Fin 9, k9t5p4_step_14.apply k9t5p4_state_14 i j = k9t5p4_state_15 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_16 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_15 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 1 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_15_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t5p4_state_15 a b ∪ requiredMatrix 9 k9t5p4_step_15_data.required a b) 0 j = k9t5p4_local_15 0 j := by decide + +private theorem k9t5p4_local_15_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t5p4_state_15 a b ∪ requiredMatrix 9 k9t5p4_step_15_data.required a b) 1 j = k9t5p4_local_15 1 j := by decide + +private theorem k9t5p4_local_15_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t5p4_state_15 a b ∪ requiredMatrix 9 k9t5p4_step_15_data.required a b) 2 j = k9t5p4_local_15 2 j := by decide + +private theorem k9t5p4_local_15_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t5p4_state_15 a b ∪ requiredMatrix 9 k9t5p4_step_15_data.required a b) 3 j = k9t5p4_local_15 3 j := by decide + +private theorem k9t5p4_local_15_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t5p4_state_15 a b ∪ requiredMatrix 9 k9t5p4_step_15_data.required a b) 4 j = k9t5p4_local_15 4 j := by decide + +private theorem k9t5p4_local_15_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t5p4_state_15 a b ∪ requiredMatrix 9 k9t5p4_step_15_data.required a b) 5 j = k9t5p4_local_15 5 j := by decide + +private theorem k9t5p4_local_15_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t5p4_state_15 a b ∪ requiredMatrix 9 k9t5p4_step_15_data.required a b) 6 j = k9t5p4_local_15 6 j := by decide + +private theorem k9t5p4_local_15_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t5p4_state_15 a b ∪ requiredMatrix 9 k9t5p4_step_15_data.required a b) 7 j = k9t5p4_local_15 7 j := by decide + +private theorem k9t5p4_local_15_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t5p4_state_15 a b ∪ requiredMatrix 9 k9t5p4_step_15_data.required a b) 8 j = k9t5p4_local_15 8 j := by decide + +private theorem k9t5p4_local_15_eq : (fun a b => k9t5p4_state_15 a b ∪ requiredMatrix 9 k9t5p4_step_15_data.required a b) = k9t5p4_local_15 := by + funext i j + fin_cases i + + · exact k9t5p4_local_15_eq_row_0 j + + · exact k9t5p4_local_15_eq_row_1 j + + · exact k9t5p4_local_15_eq_row_2 j + + · exact k9t5p4_local_15_eq_row_3 j + + · exact k9t5p4_local_15_eq_row_4 j + + · exact k9t5p4_local_15_eq_row_5 j + + · exact k9t5p4_local_15_eq_row_6 j + + · exact k9t5p4_local_15_eq_row_7 j + + · exact k9t5p4_local_15_eq_row_8 j + +private theorem k9t5p4_local_15_paths : ∀ p ∈ k9t5p4_step_15_data.required, p.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_15_data.i k9t5p4_step_15_data.j) 9 := by decide + +private theorem k9t5p4_local_15_bad : k9t5p4_step_15_data.bad.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_15_data.i k9t5p4_step_15_data.j) k9t5p4_local_15 9 5 := by decide + +private theorem k9t5p4_step_15_check : k9t5p4_step_15.Check k9t5p4.graph k9t5p4_state_15 9 5 := by + change k9t5p4_step_15_data.Check k9t5p4.graph k9t5p4_state_15 9 5 + refine ⟨k9t5p4_local_15_paths, ?_⟩ + rw [k9t5p4_local_15_eq] + exact k9t5p4_local_15_bad + +private theorem k9t5p4_update_15 : k9t5p4_step_15.apply k9t5p4_state_15 = k9t5p4_state_16 := by + have h : ∀ i j : Fin 9, k9t5p4_step_15.apply k9t5p4_state_15 i j = k9t5p4_state_16 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_17 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_16 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, ∅, Finset.Icc 0 4, {0}, ∅, Finset.Icc 0 4, ∅], + #[Finset.Icc 0 4, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[{0}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{0}, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 0 6, {1, 2}], + #[{0}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {1, 2}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_16_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 4, ∅, ∅, ∅, Finset.Icc 0 4, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_16_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_0) 0 j = k9t5p4_local_16_required_0 0 j := by decide + +private theorem k9t5p4_local_16_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_0) 1 j = k9t5p4_local_16_required_0 1 j := by decide + +private theorem k9t5p4_local_16_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_0) 2 j = k9t5p4_local_16_required_0 2 j := by decide + +private theorem k9t5p4_local_16_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_0) 3 j = k9t5p4_local_16_required_0 3 j := by decide + +private theorem k9t5p4_local_16_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_0) 4 j = k9t5p4_local_16_required_0 4 j := by decide + +private theorem k9t5p4_local_16_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_0) 5 j = k9t5p4_local_16_required_0 5 j := by decide + +private theorem k9t5p4_local_16_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_0) 6 j = k9t5p4_local_16_required_0 6 j := by decide + +private theorem k9t5p4_local_16_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_0) 7 j = k9t5p4_local_16_required_0 7 j := by decide + +private theorem k9t5p4_local_16_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_0) 8 j = k9t5p4_local_16_required_0 8 j := by decide + +private theorem k9t5p4_local_16_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_0) 9 j = k9t5p4_local_16_required_0 9 j := by decide + +private theorem k9t5p4_local_16_required_0_eq : (requiredMatrix 9 k9t5p4_step_16_required_block_0) = k9t5p4_local_16_required_0 := by + funext i j + fin_cases i + + · exact k9t5p4_local_16_required_0_eq_row_0 j + + · exact k9t5p4_local_16_required_0_eq_row_1 j + + · exact k9t5p4_local_16_required_0_eq_row_2 j + + · exact k9t5p4_local_16_required_0_eq_row_3 j + + · exact k9t5p4_local_16_required_0_eq_row_4 j + + · exact k9t5p4_local_16_required_0_eq_row_5 j + + · exact k9t5p4_local_16_required_0_eq_row_6 j + + · exact k9t5p4_local_16_required_0_eq_row_7 j + + · exact k9t5p4_local_16_required_0_eq_row_8 j + + · exact k9t5p4_local_16_required_0_eq_row_9 j + +private theorem k9t5p4_local_16_path_0_0 : (⟨1, 0, [2, 3, 9, 8, 7, 6, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_0_1 : (⟨1, 6, [2, 3, 9, 8, 7, 0, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_0_2 : (⟨1, 6, [2, 9, 8, 7, 0, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_0_3 : (⟨1, 0, [9, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_0_4 : (⟨1, 0, [9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_0_5 : (⟨1, 0, [9, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_0_6 : (⟨1, 0, [9, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_0_7 : (⟨5, 0, [4, 1, 2, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_0_8 : (⟨5, 0, [4, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_0_9 : (⟨5, 0, [4, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_0_10 : (⟨5, 0, [4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_0_11 : (⟨5, 0, [6, 7, 8, 9, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_paths_block_0 : ∀ p ∈ k9t5p4_step_16_required_block_0, p.Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by + simp only [k9t5p4_step_16_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_16_path_0_0, k9t5p4_local_16_path_0_1, k9t5p4_local_16_path_0_2, k9t5p4_local_16_path_0_3, k9t5p4_local_16_path_0_4, k9t5p4_local_16_path_0_5, k9t5p4_local_16_path_0_6, k9t5p4_local_16_path_0_7, k9t5p4_local_16_path_0_8, k9t5p4_local_16_path_0_9, k9t5p4_local_16_path_0_10, k9t5p4_local_16_path_0_11⟩ + +private def k9t5p4_local_16_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 3, 4}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, {1, 2}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 3, 4}, ∅, ∅, ∅, ∅, {0, 1, 2}, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {1, 2}, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_16_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_1) 0 j = k9t5p4_local_16_required_1 0 j := by decide + +private theorem k9t5p4_local_16_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_1) 1 j = k9t5p4_local_16_required_1 1 j := by decide + +private theorem k9t5p4_local_16_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_1) 2 j = k9t5p4_local_16_required_1 2 j := by decide + +private theorem k9t5p4_local_16_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_1) 3 j = k9t5p4_local_16_required_1 3 j := by decide + +private theorem k9t5p4_local_16_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_1) 4 j = k9t5p4_local_16_required_1 4 j := by decide + +private theorem k9t5p4_local_16_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_1) 5 j = k9t5p4_local_16_required_1 5 j := by decide + +private theorem k9t5p4_local_16_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_1) 6 j = k9t5p4_local_16_required_1 6 j := by decide + +private theorem k9t5p4_local_16_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_1) 7 j = k9t5p4_local_16_required_1 7 j := by decide + +private theorem k9t5p4_local_16_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_1) 8 j = k9t5p4_local_16_required_1 8 j := by decide + +private theorem k9t5p4_local_16_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_1) 9 j = k9t5p4_local_16_required_1 9 j := by decide + +private theorem k9t5p4_local_16_required_1_eq : (requiredMatrix 9 k9t5p4_step_16_required_block_1) = k9t5p4_local_16_required_1 := by + funext i j + fin_cases i + + · exact k9t5p4_local_16_required_1_eq_row_0 j + + · exact k9t5p4_local_16_required_1_eq_row_1 j + + · exact k9t5p4_local_16_required_1_eq_row_2 j + + · exact k9t5p4_local_16_required_1_eq_row_3 j + + · exact k9t5p4_local_16_required_1_eq_row_4 j + + · exact k9t5p4_local_16_required_1_eq_row_5 j + + · exact k9t5p4_local_16_required_1_eq_row_6 j + + · exact k9t5p4_local_16_required_1_eq_row_7 j + + · exact k9t5p4_local_16_required_1_eq_row_8 j + + · exact k9t5p4_local_16_required_1_eq_row_9 j + +private theorem k9t5p4_local_16_path_1_0 : (⟨5, 9, [6, 7, 0, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_1_1 : (⟨5, 8, [6, 7, 0, 4, 1, 2, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_1_2 : (⟨5, 9, [6, 7, 0, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_1_3 : (⟨5, 8, [6, 7, 0, 4, 1, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_1_4 : (⟨5, 8, [6, 7, 0, 4, 1, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_1_5 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_1_6 : (⟨8, 0, [9, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_1_7 : (⟨8, 6, [9, 1, 2, 3, 4, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_1_8 : (⟨8, 5, [9, 1, 2, 3, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_1_9 : (⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_1_10 : (⟨8, 0, [9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_1_11 : (⟨8, 5, [9, 1, 2, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_paths_block_1 : ∀ p ∈ k9t5p4_step_16_required_block_1, p.Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by + simp only [k9t5p4_step_16_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_16_path_1_0, k9t5p4_local_16_path_1_1, k9t5p4_local_16_path_1_2, k9t5p4_local_16_path_1_3, k9t5p4_local_16_path_1_4, k9t5p4_local_16_path_1_5, k9t5p4_local_16_path_1_6, k9t5p4_local_16_path_1_7, k9t5p4_local_16_path_1_8, k9t5p4_local_16_path_1_9, k9t5p4_local_16_path_1_10, k9t5p4_local_16_path_1_11⟩ + +private def k9t5p4_local_16_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0}, {0}, {0}, ∅, {0}, {0}, ∅, {0, 2}, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {2}, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 2}, ∅, ∅, ∅, ∅, {2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_16_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_2) 0 j = k9t5p4_local_16_required_2 0 j := by decide + +private theorem k9t5p4_local_16_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_2) 1 j = k9t5p4_local_16_required_2 1 j := by decide + +private theorem k9t5p4_local_16_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_2) 2 j = k9t5p4_local_16_required_2 2 j := by decide + +private theorem k9t5p4_local_16_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_2) 3 j = k9t5p4_local_16_required_2 3 j := by decide + +private theorem k9t5p4_local_16_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_2) 4 j = k9t5p4_local_16_required_2 4 j := by decide + +private theorem k9t5p4_local_16_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_2) 5 j = k9t5p4_local_16_required_2 5 j := by decide + +private theorem k9t5p4_local_16_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_2) 6 j = k9t5p4_local_16_required_2 6 j := by decide + +private theorem k9t5p4_local_16_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_2) 7 j = k9t5p4_local_16_required_2 7 j := by decide + +private theorem k9t5p4_local_16_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_2) 8 j = k9t5p4_local_16_required_2 8 j := by decide + +private theorem k9t5p4_local_16_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_16_required_block_2) 9 j = k9t5p4_local_16_required_2 9 j := by decide + +private theorem k9t5p4_local_16_required_2_eq : (requiredMatrix 9 k9t5p4_step_16_required_block_2) = k9t5p4_local_16_required_2 := by + funext i j + fin_cases i + + · exact k9t5p4_local_16_required_2_eq_row_0 j + + · exact k9t5p4_local_16_required_2_eq_row_1 j + + · exact k9t5p4_local_16_required_2_eq_row_2 j + + · exact k9t5p4_local_16_required_2_eq_row_3 j + + · exact k9t5p4_local_16_required_2_eq_row_4 j + + · exact k9t5p4_local_16_required_2_eq_row_5 j + + · exact k9t5p4_local_16_required_2_eq_row_6 j + + · exact k9t5p4_local_16_required_2_eq_row_7 j + + · exact k9t5p4_local_16_required_2_eq_row_8 j + + · exact k9t5p4_local_16_required_2_eq_row_9 j + +private theorem k9t5p4_local_16_path_2_0 : (⟨8, 0, [9, 1, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_2_1 : (⟨8, 5, [9, 1, 4, 0, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_2_2 : (⟨0, 5, [4, 1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_2_3 : (⟨0, 3, [4, 5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_2_4 : (⟨0, 2, [4, 5, 6, 7, 8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_2_5 : (⟨0, 1, [4, 5, 6, 7, 8, 9, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_2_6 : (⟨0, 8, [7, 6, 5, 4, 1, 2, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_path_2_7 : (⟨0, 6, [7, 8, 9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by decide + +private theorem k9t5p4_local_16_paths_block_2 : ∀ p ∈ k9t5p4_step_16_required_block_2, p.Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by + simp only [k9t5p4_step_16_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_16_path_2_0, k9t5p4_local_16_path_2_1, k9t5p4_local_16_path_2_2, k9t5p4_local_16_path_2_3, k9t5p4_local_16_path_2_4, k9t5p4_local_16_path_2_5, k9t5p4_local_16_path_2_6, k9t5p4_local_16_path_2_7⟩ + +private theorem k9t5p4_local_16_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_16 a b ∪ (((k9t5p4_local_16_required_0 a b ∪ k9t5p4_local_16_required_1 a b) ∪ k9t5p4_local_16_required_2 a b))) 0 j = k9t5p4_local_16 0 j := by decide + +private theorem k9t5p4_local_16_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_16 a b ∪ (((k9t5p4_local_16_required_0 a b ∪ k9t5p4_local_16_required_1 a b) ∪ k9t5p4_local_16_required_2 a b))) 1 j = k9t5p4_local_16 1 j := by decide + +private theorem k9t5p4_local_16_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_16 a b ∪ (((k9t5p4_local_16_required_0 a b ∪ k9t5p4_local_16_required_1 a b) ∪ k9t5p4_local_16_required_2 a b))) 2 j = k9t5p4_local_16 2 j := by decide + +private theorem k9t5p4_local_16_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_16 a b ∪ (((k9t5p4_local_16_required_0 a b ∪ k9t5p4_local_16_required_1 a b) ∪ k9t5p4_local_16_required_2 a b))) 3 j = k9t5p4_local_16 3 j := by decide + +private theorem k9t5p4_local_16_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_16 a b ∪ (((k9t5p4_local_16_required_0 a b ∪ k9t5p4_local_16_required_1 a b) ∪ k9t5p4_local_16_required_2 a b))) 4 j = k9t5p4_local_16 4 j := by decide + +private theorem k9t5p4_local_16_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_16 a b ∪ (((k9t5p4_local_16_required_0 a b ∪ k9t5p4_local_16_required_1 a b) ∪ k9t5p4_local_16_required_2 a b))) 5 j = k9t5p4_local_16 5 j := by decide + +private theorem k9t5p4_local_16_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_16 a b ∪ (((k9t5p4_local_16_required_0 a b ∪ k9t5p4_local_16_required_1 a b) ∪ k9t5p4_local_16_required_2 a b))) 6 j = k9t5p4_local_16 6 j := by decide + +private theorem k9t5p4_local_16_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_16 a b ∪ (((k9t5p4_local_16_required_0 a b ∪ k9t5p4_local_16_required_1 a b) ∪ k9t5p4_local_16_required_2 a b))) 7 j = k9t5p4_local_16 7 j := by decide + +private theorem k9t5p4_local_16_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_16 a b ∪ (((k9t5p4_local_16_required_0 a b ∪ k9t5p4_local_16_required_1 a b) ∪ k9t5p4_local_16_required_2 a b))) 8 j = k9t5p4_local_16 8 j := by decide + +private theorem k9t5p4_local_16_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_16 a b ∪ (((k9t5p4_local_16_required_0 a b ∪ k9t5p4_local_16_required_1 a b) ∪ k9t5p4_local_16_required_2 a b))) 9 j = k9t5p4_local_16 9 j := by decide + +private theorem k9t5p4_local_16_merged_eq : (fun a b => freshMatrix k9t5p4_state_16 a b ∪ (((k9t5p4_local_16_required_0 a b ∪ k9t5p4_local_16_required_1 a b) ∪ k9t5p4_local_16_required_2 a b))) = k9t5p4_local_16 := by + funext i j + fin_cases i + + · exact k9t5p4_local_16_merged_eq_row_0 j + + · exact k9t5p4_local_16_merged_eq_row_1 j + + · exact k9t5p4_local_16_merged_eq_row_2 j + + · exact k9t5p4_local_16_merged_eq_row_3 j + + · exact k9t5p4_local_16_merged_eq_row_4 j + + · exact k9t5p4_local_16_merged_eq_row_5 j + + · exact k9t5p4_local_16_merged_eq_row_6 j + + · exact k9t5p4_local_16_merged_eq_row_7 j + + · exact k9t5p4_local_16_merged_eq_row_8 j + + · exact k9t5p4_local_16_merged_eq_row_9 j + +private theorem k9t5p4_local_16_eq : (fun a b => freshMatrix k9t5p4_state_16 a b ∪ requiredMatrix 9 k9t5p4_step_16_data.required a b) = k9t5p4_local_16 := by + funext a b + change freshMatrix k9t5p4_state_16 a b ∪ requiredMatrix 9 (k9t5p4_step_16_required_block_0 ++ k9t5p4_step_16_required_block_1 ++ k9t5p4_step_16_required_block_2) a b = _ + simp only [requiredMatrix_append, k9t5p4_local_16_required_0_eq, k9t5p4_local_16_required_1_eq, k9t5p4_local_16_required_2_eq] + exact congrFun (congrFun k9t5p4_local_16_merged_eq a) b + +private theorem k9t5p4_local_16_paths : ∀ p ∈ k9t5p4_step_16_data.required, p.Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 := by + change ∀ p ∈ (k9t5p4_step_16_required_block_0 ++ k9t5p4_step_16_required_block_1 ++ k9t5p4_step_16_required_block_2), p.Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨k9t5p4_local_16_paths_block_0, k9t5p4_local_16_paths_block_1⟩, k9t5p4_local_16_paths_block_2⟩ + +private theorem k9t5p4_local_16_bad : k9t5p4_step_16_data.bad.Check (freshGraph k9t5p4.graph k9t5p4_step_16_data.i k9t5p4_step_16_data.j) k9t5p4_local_16 9 5 := by decide + +private theorem k9t5p4_step_16_check : k9t5p4_step_16.Check k9t5p4.graph k9t5p4_state_16 9 5 := by + change k9t5p4_step_16_data.Check k9t5p4.graph k9t5p4_state_16 9 5 + refine ⟨by decide, k9t5p4_local_16_paths, ?_⟩ + rw [k9t5p4_local_16_eq] + exact k9t5p4_local_16_bad + +private theorem k9t5p4_update_16 : k9t5p4_step_16.apply k9t5p4_state_16 = k9t5p4_state_17 := by + have h : ∀ i j : Fin 9, k9t5p4_step_16.apply k9t5p4_state_16 i j = k9t5p4_state_17 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_18 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_17 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, Finset.Icc 1 8, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 1 6, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_17_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t5p4_state_17 a b ∪ requiredMatrix 9 k9t5p4_step_17_data.required a b) 0 j = k9t5p4_local_17 0 j := by decide + +private theorem k9t5p4_local_17_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t5p4_state_17 a b ∪ requiredMatrix 9 k9t5p4_step_17_data.required a b) 1 j = k9t5p4_local_17 1 j := by decide + +private theorem k9t5p4_local_17_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t5p4_state_17 a b ∪ requiredMatrix 9 k9t5p4_step_17_data.required a b) 2 j = k9t5p4_local_17 2 j := by decide + +private theorem k9t5p4_local_17_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t5p4_state_17 a b ∪ requiredMatrix 9 k9t5p4_step_17_data.required a b) 3 j = k9t5p4_local_17 3 j := by decide + +private theorem k9t5p4_local_17_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t5p4_state_17 a b ∪ requiredMatrix 9 k9t5p4_step_17_data.required a b) 4 j = k9t5p4_local_17 4 j := by decide + +private theorem k9t5p4_local_17_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t5p4_state_17 a b ∪ requiredMatrix 9 k9t5p4_step_17_data.required a b) 5 j = k9t5p4_local_17 5 j := by decide + +private theorem k9t5p4_local_17_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t5p4_state_17 a b ∪ requiredMatrix 9 k9t5p4_step_17_data.required a b) 6 j = k9t5p4_local_17 6 j := by decide + +private theorem k9t5p4_local_17_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t5p4_state_17 a b ∪ requiredMatrix 9 k9t5p4_step_17_data.required a b) 7 j = k9t5p4_local_17 7 j := by decide + +private theorem k9t5p4_local_17_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t5p4_state_17 a b ∪ requiredMatrix 9 k9t5p4_step_17_data.required a b) 8 j = k9t5p4_local_17 8 j := by decide + +private theorem k9t5p4_local_17_eq : (fun a b => k9t5p4_state_17 a b ∪ requiredMatrix 9 k9t5p4_step_17_data.required a b) = k9t5p4_local_17 := by + funext i j + fin_cases i + + · exact k9t5p4_local_17_eq_row_0 j + + · exact k9t5p4_local_17_eq_row_1 j + + · exact k9t5p4_local_17_eq_row_2 j + + · exact k9t5p4_local_17_eq_row_3 j + + · exact k9t5p4_local_17_eq_row_4 j + + · exact k9t5p4_local_17_eq_row_5 j + + · exact k9t5p4_local_17_eq_row_6 j + + · exact k9t5p4_local_17_eq_row_7 j + + · exact k9t5p4_local_17_eq_row_8 j + +private theorem k9t5p4_local_17_paths : ∀ p ∈ k9t5p4_step_17_data.required, p.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_17_data.i k9t5p4_step_17_data.j) 9 := by decide + +private theorem k9t5p4_local_17_bad : k9t5p4_step_17_data.bad.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_17_data.i k9t5p4_step_17_data.j) k9t5p4_local_17 9 5 := by decide + +private theorem k9t5p4_step_17_check : k9t5p4_step_17.Check k9t5p4.graph k9t5p4_state_17 9 5 := by + change k9t5p4_step_17_data.Check k9t5p4.graph k9t5p4_state_17 9 5 + refine ⟨k9t5p4_local_17_paths, ?_⟩ + rw [k9t5p4_local_17_eq] + exact k9t5p4_local_17_bad + +private theorem k9t5p4_update_17 : k9t5p4_step_17.apply k9t5p4_state_17 = k9t5p4_state_18 := by + have h : ∀ i j : Fin 9, k9t5p4_step_17.apply k9t5p4_state_17 i j = k9t5p4_state_18 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_19 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_18 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, {0}, ∅, Finset.Icc 0 3, ∅, Finset.Icc 0 4, ∅], + #[Finset.Icc 0 4, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[{0}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{0}, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{0}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[∅, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {1}], + #[∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, {1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_18_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, {0, 1}, ∅, {1}, {0, 1}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_18_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_0) 0 j = k9t5p4_local_18_required_0 0 j := by decide + +private theorem k9t5p4_local_18_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_0) 1 j = k9t5p4_local_18_required_0 1 j := by decide + +private theorem k9t5p4_local_18_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_0) 2 j = k9t5p4_local_18_required_0 2 j := by decide + +private theorem k9t5p4_local_18_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_0) 3 j = k9t5p4_local_18_required_0 3 j := by decide + +private theorem k9t5p4_local_18_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_0) 4 j = k9t5p4_local_18_required_0 4 j := by decide + +private theorem k9t5p4_local_18_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_0) 5 j = k9t5p4_local_18_required_0 5 j := by decide + +private theorem k9t5p4_local_18_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_0) 6 j = k9t5p4_local_18_required_0 6 j := by decide + +private theorem k9t5p4_local_18_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_0) 7 j = k9t5p4_local_18_required_0 7 j := by decide + +private theorem k9t5p4_local_18_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_0) 8 j = k9t5p4_local_18_required_0 8 j := by decide + +private theorem k9t5p4_local_18_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_0) 9 j = k9t5p4_local_18_required_0 9 j := by decide + +private theorem k9t5p4_local_18_required_0_eq : (requiredMatrix 9 k9t5p4_step_18_required_block_0) = k9t5p4_local_18_required_0 := by + funext i j + fin_cases i + + · exact k9t5p4_local_18_required_0_eq_row_0 j + + · exact k9t5p4_local_18_required_0_eq_row_1 j + + · exact k9t5p4_local_18_required_0_eq_row_2 j + + · exact k9t5p4_local_18_required_0_eq_row_3 j + + · exact k9t5p4_local_18_required_0_eq_row_4 j + + · exact k9t5p4_local_18_required_0_eq_row_5 j + + · exact k9t5p4_local_18_required_0_eq_row_6 j + + · exact k9t5p4_local_18_required_0_eq_row_7 j + + · exact k9t5p4_local_18_required_0_eq_row_8 j + + · exact k9t5p4_local_18_required_0_eq_row_9 j + +private theorem k9t5p4_local_18_path_0_0 : (⟨1, 0, [2, 3, 4, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_0_1 : (⟨1, 6, [2, 3, 4, 9, 8, 7, 0, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_0_2 : (⟨1, 0, [9, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_0_3 : (⟨1, 6, [9, 2, 3, 4, 5, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_0_4 : (⟨1, 0, [9, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_0_5 : (⟨6, 0, [5, 4, 1, 2, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_0_6 : (⟨6, 0, [5, 4, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_0_7 : (⟨6, 0, [5, 4, 1, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_0_8 : (⟨6, 0, [5, 4, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_0_9 : (⟨6, 3, [5, 0, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_0_10 : (⟨6, 4, [5, 0, 7, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_0_11 : (⟨6, 4, [5, 0, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_paths_block_0 : ∀ p ∈ k9t5p4_step_18_required_block_0, p.Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by + simp only [k9t5p4_step_18_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_18_path_0_0, k9t5p4_local_18_path_0_1, k9t5p4_local_18_path_0_2, k9t5p4_local_18_path_0_3, k9t5p4_local_18_path_0_4, k9t5p4_local_18_path_0_5, k9t5p4_local_18_path_0_6, k9t5p4_local_18_path_0_7, k9t5p4_local_18_path_0_8, k9t5p4_local_18_path_0_9, k9t5p4_local_18_path_0_10, k9t5p4_local_18_path_0_11⟩ + +private def k9t5p4_local_18_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, {0, 1}, {0}, ∅, ∅, ∅, ∅, {0, 1}, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_18_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_1) 0 j = k9t5p4_local_18_required_1 0 j := by decide + +private theorem k9t5p4_local_18_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_1) 1 j = k9t5p4_local_18_required_1 1 j := by decide + +private theorem k9t5p4_local_18_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_1) 2 j = k9t5p4_local_18_required_1 2 j := by decide + +private theorem k9t5p4_local_18_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_1) 3 j = k9t5p4_local_18_required_1 3 j := by decide + +private theorem k9t5p4_local_18_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_1) 4 j = k9t5p4_local_18_required_1 4 j := by decide + +private theorem k9t5p4_local_18_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_1) 5 j = k9t5p4_local_18_required_1 5 j := by decide + +private theorem k9t5p4_local_18_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_1) 6 j = k9t5p4_local_18_required_1 6 j := by decide + +private theorem k9t5p4_local_18_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_1) 7 j = k9t5p4_local_18_required_1 7 j := by decide + +private theorem k9t5p4_local_18_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_1) 8 j = k9t5p4_local_18_required_1 8 j := by decide + +private theorem k9t5p4_local_18_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_1) 9 j = k9t5p4_local_18_required_1 9 j := by decide + +private theorem k9t5p4_local_18_required_1_eq : (requiredMatrix 9 k9t5p4_step_18_required_block_1) = k9t5p4_local_18_required_1 := by + funext i j + fin_cases i + + · exact k9t5p4_local_18_required_1_eq_row_0 j + + · exact k9t5p4_local_18_required_1_eq_row_1 j + + · exact k9t5p4_local_18_required_1_eq_row_2 j + + · exact k9t5p4_local_18_required_1_eq_row_3 j + + · exact k9t5p4_local_18_required_1_eq_row_4 j + + · exact k9t5p4_local_18_required_1_eq_row_5 j + + · exact k9t5p4_local_18_required_1_eq_row_6 j + + · exact k9t5p4_local_18_required_1_eq_row_7 j + + · exact k9t5p4_local_18_required_1_eq_row_8 j + + · exact k9t5p4_local_18_required_1_eq_row_9 j + +private theorem k9t5p4_local_18_path_1_0 : (⟨6, 3, [5, 0, 7, 8, 9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_1_1 : (⟨6, 2, [5, 0, 7, 8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_1_2 : (⟨6, 2, [5, 0, 7, 8, 9, 1, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_1_3 : (⟨6, 1, [5, 0, 7, 8, 9, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_1_4 : (⟨6, 1, [5, 0, 7, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_1_5 : (⟨6, 9, [7, 0, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_1_6 : (⟨6, 8, [7, 0, 5, 4, 1, 2, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_1_7 : (⟨6, 8, [7, 0, 5, 4, 1, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_1_8 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_1_9 : (⟨8, 0, [9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_1_10 : (⟨8, 6, [9, 1, 2, 3, 4, 5, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_1_11 : (⟨8, 0, [9, 1, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_paths_block_1 : ∀ p ∈ k9t5p4_step_18_required_block_1, p.Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by + simp only [k9t5p4_step_18_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_18_path_1_0, k9t5p4_local_18_path_1_1, k9t5p4_local_18_path_1_2, k9t5p4_local_18_path_1_3, k9t5p4_local_18_path_1_4, k9t5p4_local_18_path_1_5, k9t5p4_local_18_path_1_6, k9t5p4_local_18_path_1_7, k9t5p4_local_18_path_1_8, k9t5p4_local_18_path_1_9, k9t5p4_local_18_path_1_10, k9t5p4_local_18_path_1_11⟩ + +private def k9t5p4_local_18_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, {0}, ∅, {0}, ∅, {3, 4}, ∅], + #[Finset.Icc 0 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3, 4}, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_18_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_2) 0 j = k9t5p4_local_18_required_2 0 j := by decide + +private theorem k9t5p4_local_18_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_2) 1 j = k9t5p4_local_18_required_2 1 j := by decide + +private theorem k9t5p4_local_18_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_2) 2 j = k9t5p4_local_18_required_2 2 j := by decide + +private theorem k9t5p4_local_18_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_2) 3 j = k9t5p4_local_18_required_2 3 j := by decide + +private theorem k9t5p4_local_18_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_2) 4 j = k9t5p4_local_18_required_2 4 j := by decide + +private theorem k9t5p4_local_18_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_2) 5 j = k9t5p4_local_18_required_2 5 j := by decide + +private theorem k9t5p4_local_18_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_2) 6 j = k9t5p4_local_18_required_2 6 j := by decide + +private theorem k9t5p4_local_18_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_2) 7 j = k9t5p4_local_18_required_2 7 j := by decide + +private theorem k9t5p4_local_18_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_2) 8 j = k9t5p4_local_18_required_2 8 j := by decide + +private theorem k9t5p4_local_18_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_2) 9 j = k9t5p4_local_18_required_2 9 j := by decide + +private theorem k9t5p4_local_18_required_2_eq : (requiredMatrix 9 k9t5p4_step_18_required_block_2) = k9t5p4_local_18_required_2 := by + funext i j + fin_cases i + + · exact k9t5p4_local_18_required_2_eq_row_0 j + + · exact k9t5p4_local_18_required_2_eq_row_1 j + + · exact k9t5p4_local_18_required_2_eq_row_2 j + + · exact k9t5p4_local_18_required_2_eq_row_3 j + + · exact k9t5p4_local_18_required_2_eq_row_4 j + + · exact k9t5p4_local_18_required_2_eq_row_5 j + + · exact k9t5p4_local_18_required_2_eq_row_6 j + + · exact k9t5p4_local_18_required_2_eq_row_7 j + + · exact k9t5p4_local_18_required_2_eq_row_8 j + + · exact k9t5p4_local_18_required_2_eq_row_9 j + +private theorem k9t5p4_local_18_path_2_0 : (⟨8, 0, [9, 1, 2, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_2_1 : (⟨8, 6, [9, 1, 2, 4, 5, 0, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_2_2 : (⟨8, 0, [9, 1, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_2_3 : (⟨0, 6, [5, 4, 1, 2, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_2_4 : (⟨0, 1, [5, 4, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_2_5 : (⟨0, 1, [5, 4, 2, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_2_6 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_2_7 : (⟨0, 3, [5, 6, 7, 8, 9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_2_8 : (⟨0, 2, [5, 6, 7, 8, 9, 1, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_2_9 : (⟨0, 1, [5, 6, 7, 8, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_2_10 : (⟨0, 1, [5, 6, 7, 8, 9, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_path_2_11 : (⟨0, 1, [5, 6, 7, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_paths_block_2 : ∀ p ∈ k9t5p4_step_18_required_block_2, p.Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by + simp only [k9t5p4_step_18_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_18_path_2_0, k9t5p4_local_18_path_2_1, k9t5p4_local_18_path_2_2, k9t5p4_local_18_path_2_3, k9t5p4_local_18_path_2_4, k9t5p4_local_18_path_2_5, k9t5p4_local_18_path_2_6, k9t5p4_local_18_path_2_7, k9t5p4_local_18_path_2_8, k9t5p4_local_18_path_2_9, k9t5p4_local_18_path_2_10, k9t5p4_local_18_path_2_11⟩ + +private def k9t5p4_local_18_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_18_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_3) 0 j = k9t5p4_local_18_required_3 0 j := by decide + +private theorem k9t5p4_local_18_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_3) 1 j = k9t5p4_local_18_required_3 1 j := by decide + +private theorem k9t5p4_local_18_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_3) 2 j = k9t5p4_local_18_required_3 2 j := by decide + +private theorem k9t5p4_local_18_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_3) 3 j = k9t5p4_local_18_required_3 3 j := by decide + +private theorem k9t5p4_local_18_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_3) 4 j = k9t5p4_local_18_required_3 4 j := by decide + +private theorem k9t5p4_local_18_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_3) 5 j = k9t5p4_local_18_required_3 5 j := by decide + +private theorem k9t5p4_local_18_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_3) 6 j = k9t5p4_local_18_required_3 6 j := by decide + +private theorem k9t5p4_local_18_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_3) 7 j = k9t5p4_local_18_required_3 7 j := by decide + +private theorem k9t5p4_local_18_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_3) 8 j = k9t5p4_local_18_required_3 8 j := by decide + +private theorem k9t5p4_local_18_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_18_required_block_3) 9 j = k9t5p4_local_18_required_3 9 j := by decide + +private theorem k9t5p4_local_18_required_3_eq : (requiredMatrix 9 k9t5p4_step_18_required_block_3) = k9t5p4_local_18_required_3 := by + funext i j + fin_cases i + + · exact k9t5p4_local_18_required_3_eq_row_0 j + + · exact k9t5p4_local_18_required_3_eq_row_1 j + + · exact k9t5p4_local_18_required_3_eq_row_2 j + + · exact k9t5p4_local_18_required_3_eq_row_3 j + + · exact k9t5p4_local_18_required_3_eq_row_4 j + + · exact k9t5p4_local_18_required_3_eq_row_5 j + + · exact k9t5p4_local_18_required_3_eq_row_6 j + + · exact k9t5p4_local_18_required_3_eq_row_7 j + + · exact k9t5p4_local_18_required_3_eq_row_8 j + + · exact k9t5p4_local_18_required_3_eq_row_9 j + +private theorem k9t5p4_local_18_path_3_0 : (⟨0, 8, [7, 6, 5, 4, 1, 2, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by decide + +private theorem k9t5p4_local_18_paths_block_3 : ∀ p ∈ k9t5p4_step_18_required_block_3, p.Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by + simp only [k9t5p4_step_18_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact k9t5p4_local_18_path_3_0 + +private theorem k9t5p4_local_18_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_18 a b ∪ ((((k9t5p4_local_18_required_0 a b ∪ k9t5p4_local_18_required_1 a b) ∪ k9t5p4_local_18_required_2 a b) ∪ k9t5p4_local_18_required_3 a b))) 0 j = k9t5p4_local_18 0 j := by decide + +private theorem k9t5p4_local_18_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_18 a b ∪ ((((k9t5p4_local_18_required_0 a b ∪ k9t5p4_local_18_required_1 a b) ∪ k9t5p4_local_18_required_2 a b) ∪ k9t5p4_local_18_required_3 a b))) 1 j = k9t5p4_local_18 1 j := by decide + +private theorem k9t5p4_local_18_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_18 a b ∪ ((((k9t5p4_local_18_required_0 a b ∪ k9t5p4_local_18_required_1 a b) ∪ k9t5p4_local_18_required_2 a b) ∪ k9t5p4_local_18_required_3 a b))) 2 j = k9t5p4_local_18 2 j := by decide + +private theorem k9t5p4_local_18_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_18 a b ∪ ((((k9t5p4_local_18_required_0 a b ∪ k9t5p4_local_18_required_1 a b) ∪ k9t5p4_local_18_required_2 a b) ∪ k9t5p4_local_18_required_3 a b))) 3 j = k9t5p4_local_18 3 j := by decide + +private theorem k9t5p4_local_18_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_18 a b ∪ ((((k9t5p4_local_18_required_0 a b ∪ k9t5p4_local_18_required_1 a b) ∪ k9t5p4_local_18_required_2 a b) ∪ k9t5p4_local_18_required_3 a b))) 4 j = k9t5p4_local_18 4 j := by decide + +private theorem k9t5p4_local_18_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_18 a b ∪ ((((k9t5p4_local_18_required_0 a b ∪ k9t5p4_local_18_required_1 a b) ∪ k9t5p4_local_18_required_2 a b) ∪ k9t5p4_local_18_required_3 a b))) 5 j = k9t5p4_local_18 5 j := by decide + +private theorem k9t5p4_local_18_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_18 a b ∪ ((((k9t5p4_local_18_required_0 a b ∪ k9t5p4_local_18_required_1 a b) ∪ k9t5p4_local_18_required_2 a b) ∪ k9t5p4_local_18_required_3 a b))) 6 j = k9t5p4_local_18 6 j := by decide + +private theorem k9t5p4_local_18_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_18 a b ∪ ((((k9t5p4_local_18_required_0 a b ∪ k9t5p4_local_18_required_1 a b) ∪ k9t5p4_local_18_required_2 a b) ∪ k9t5p4_local_18_required_3 a b))) 7 j = k9t5p4_local_18 7 j := by decide + +private theorem k9t5p4_local_18_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_18 a b ∪ ((((k9t5p4_local_18_required_0 a b ∪ k9t5p4_local_18_required_1 a b) ∪ k9t5p4_local_18_required_2 a b) ∪ k9t5p4_local_18_required_3 a b))) 8 j = k9t5p4_local_18 8 j := by decide + +private theorem k9t5p4_local_18_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_18 a b ∪ ((((k9t5p4_local_18_required_0 a b ∪ k9t5p4_local_18_required_1 a b) ∪ k9t5p4_local_18_required_2 a b) ∪ k9t5p4_local_18_required_3 a b))) 9 j = k9t5p4_local_18 9 j := by decide + +private theorem k9t5p4_local_18_merged_eq : (fun a b => freshMatrix k9t5p4_state_18 a b ∪ ((((k9t5p4_local_18_required_0 a b ∪ k9t5p4_local_18_required_1 a b) ∪ k9t5p4_local_18_required_2 a b) ∪ k9t5p4_local_18_required_3 a b))) = k9t5p4_local_18 := by + funext i j + fin_cases i + + · exact k9t5p4_local_18_merged_eq_row_0 j + + · exact k9t5p4_local_18_merged_eq_row_1 j + + · exact k9t5p4_local_18_merged_eq_row_2 j + + · exact k9t5p4_local_18_merged_eq_row_3 j + + · exact k9t5p4_local_18_merged_eq_row_4 j + + · exact k9t5p4_local_18_merged_eq_row_5 j + + · exact k9t5p4_local_18_merged_eq_row_6 j + + · exact k9t5p4_local_18_merged_eq_row_7 j + + · exact k9t5p4_local_18_merged_eq_row_8 j + + · exact k9t5p4_local_18_merged_eq_row_9 j + +private theorem k9t5p4_local_18_eq : (fun a b => freshMatrix k9t5p4_state_18 a b ∪ requiredMatrix 9 k9t5p4_step_18_data.required a b) = k9t5p4_local_18 := by + funext a b + change freshMatrix k9t5p4_state_18 a b ∪ requiredMatrix 9 (k9t5p4_step_18_required_block_0 ++ k9t5p4_step_18_required_block_1 ++ k9t5p4_step_18_required_block_2 ++ k9t5p4_step_18_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t5p4_local_18_required_0_eq, k9t5p4_local_18_required_1_eq, k9t5p4_local_18_required_2_eq, k9t5p4_local_18_required_3_eq] + exact congrFun (congrFun k9t5p4_local_18_merged_eq a) b + +private theorem k9t5p4_local_18_paths : ∀ p ∈ k9t5p4_step_18_data.required, p.Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 := by + change ∀ p ∈ (k9t5p4_step_18_required_block_0 ++ k9t5p4_step_18_required_block_1 ++ k9t5p4_step_18_required_block_2 ++ k9t5p4_step_18_required_block_3), p.Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t5p4_local_18_paths_block_0, k9t5p4_local_18_paths_block_1⟩, k9t5p4_local_18_paths_block_2⟩, k9t5p4_local_18_paths_block_3⟩ + +private theorem k9t5p4_local_18_bad : k9t5p4_step_18_data.bad.Check (freshGraph k9t5p4.graph k9t5p4_step_18_data.i k9t5p4_step_18_data.j) k9t5p4_local_18 9 5 := by decide + +private theorem k9t5p4_step_18_check : k9t5p4_step_18.Check k9t5p4.graph k9t5p4_state_18 9 5 := by + change k9t5p4_step_18_data.Check k9t5p4.graph k9t5p4_state_18 9 5 + refine ⟨by decide, k9t5p4_local_18_paths, ?_⟩ + rw [k9t5p4_local_18_eq] + exact k9t5p4_local_18_bad + +private theorem k9t5p4_update_18 : k9t5p4_step_18.apply k9t5p4_state_18 = k9t5p4_state_19 := by + have h : ∀ i j : Fin 9, k9t5p4_step_18.apply k9t5p4_state_18 i j = k9t5p4_state_19 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_20 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_19 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, {1, 2, 3}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {1, 2, 3}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_19_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t5p4_state_19 a b ∪ requiredMatrix 9 k9t5p4_step_19_data.required a b) 0 j = k9t5p4_local_19 0 j := by decide + +private theorem k9t5p4_local_19_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t5p4_state_19 a b ∪ requiredMatrix 9 k9t5p4_step_19_data.required a b) 1 j = k9t5p4_local_19 1 j := by decide + +private theorem k9t5p4_local_19_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t5p4_state_19 a b ∪ requiredMatrix 9 k9t5p4_step_19_data.required a b) 2 j = k9t5p4_local_19 2 j := by decide + +private theorem k9t5p4_local_19_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t5p4_state_19 a b ∪ requiredMatrix 9 k9t5p4_step_19_data.required a b) 3 j = k9t5p4_local_19 3 j := by decide + +private theorem k9t5p4_local_19_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t5p4_state_19 a b ∪ requiredMatrix 9 k9t5p4_step_19_data.required a b) 4 j = k9t5p4_local_19 4 j := by decide + +private theorem k9t5p4_local_19_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t5p4_state_19 a b ∪ requiredMatrix 9 k9t5p4_step_19_data.required a b) 5 j = k9t5p4_local_19 5 j := by decide + +private theorem k9t5p4_local_19_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t5p4_state_19 a b ∪ requiredMatrix 9 k9t5p4_step_19_data.required a b) 6 j = k9t5p4_local_19 6 j := by decide + +private theorem k9t5p4_local_19_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t5p4_state_19 a b ∪ requiredMatrix 9 k9t5p4_step_19_data.required a b) 7 j = k9t5p4_local_19 7 j := by decide + +private theorem k9t5p4_local_19_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t5p4_state_19 a b ∪ requiredMatrix 9 k9t5p4_step_19_data.required a b) 8 j = k9t5p4_local_19 8 j := by decide + +private theorem k9t5p4_local_19_eq : (fun a b => k9t5p4_state_19 a b ∪ requiredMatrix 9 k9t5p4_step_19_data.required a b) = k9t5p4_local_19 := by + funext i j + fin_cases i + + · exact k9t5p4_local_19_eq_row_0 j + + · exact k9t5p4_local_19_eq_row_1 j + + · exact k9t5p4_local_19_eq_row_2 j + + · exact k9t5p4_local_19_eq_row_3 j + + · exact k9t5p4_local_19_eq_row_4 j + + · exact k9t5p4_local_19_eq_row_5 j + + · exact k9t5p4_local_19_eq_row_6 j + + · exact k9t5p4_local_19_eq_row_7 j + + · exact k9t5p4_local_19_eq_row_8 j + +private theorem k9t5p4_local_19_paths : ∀ p ∈ k9t5p4_step_19_data.required, p.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_19_data.i k9t5p4_step_19_data.j) 9 := by decide + +private theorem k9t5p4_local_19_bad : k9t5p4_step_19_data.bad.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_19_data.i k9t5p4_step_19_data.j) k9t5p4_local_19 9 5 := by decide + +private theorem k9t5p4_step_19_check : k9t5p4_step_19.Check k9t5p4.graph k9t5p4_state_19 9 5 := by + change k9t5p4_step_19_data.Check k9t5p4.graph k9t5p4_state_19 9 5 + refine ⟨k9t5p4_local_19_paths, ?_⟩ + rw [k9t5p4_local_19_eq] + exact k9t5p4_local_19_bad + +private theorem k9t5p4_update_19 : k9t5p4_step_19.apply k9t5p4_state_19 = k9t5p4_state_20 := by + have h : ∀ i j : Fin 9, k9t5p4_step_19.apply k9t5p4_state_19 i j = k9t5p4_state_20 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_21 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_20 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 4, Finset.Icc 2 5, Finset.Icc 0 6, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 3 6, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 3 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_20_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t5p4_state_20 a b ∪ requiredMatrix 9 k9t5p4_step_20_data.required a b) 0 j = k9t5p4_local_20 0 j := by decide + +private theorem k9t5p4_local_20_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t5p4_state_20 a b ∪ requiredMatrix 9 k9t5p4_step_20_data.required a b) 1 j = k9t5p4_local_20 1 j := by decide + +private theorem k9t5p4_local_20_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t5p4_state_20 a b ∪ requiredMatrix 9 k9t5p4_step_20_data.required a b) 2 j = k9t5p4_local_20 2 j := by decide + +private theorem k9t5p4_local_20_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t5p4_state_20 a b ∪ requiredMatrix 9 k9t5p4_step_20_data.required a b) 3 j = k9t5p4_local_20 3 j := by decide + +private theorem k9t5p4_local_20_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t5p4_state_20 a b ∪ requiredMatrix 9 k9t5p4_step_20_data.required a b) 4 j = k9t5p4_local_20 4 j := by decide + +private theorem k9t5p4_local_20_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t5p4_state_20 a b ∪ requiredMatrix 9 k9t5p4_step_20_data.required a b) 5 j = k9t5p4_local_20 5 j := by decide + +private theorem k9t5p4_local_20_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t5p4_state_20 a b ∪ requiredMatrix 9 k9t5p4_step_20_data.required a b) 6 j = k9t5p4_local_20 6 j := by decide + +private theorem k9t5p4_local_20_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t5p4_state_20 a b ∪ requiredMatrix 9 k9t5p4_step_20_data.required a b) 7 j = k9t5p4_local_20 7 j := by decide + +private theorem k9t5p4_local_20_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t5p4_state_20 a b ∪ requiredMatrix 9 k9t5p4_step_20_data.required a b) 8 j = k9t5p4_local_20 8 j := by decide + +private theorem k9t5p4_local_20_eq : (fun a b => k9t5p4_state_20 a b ∪ requiredMatrix 9 k9t5p4_step_20_data.required a b) = k9t5p4_local_20 := by + funext i j + fin_cases i + + · exact k9t5p4_local_20_eq_row_0 j + + · exact k9t5p4_local_20_eq_row_1 j + + · exact k9t5p4_local_20_eq_row_2 j + + · exact k9t5p4_local_20_eq_row_3 j + + · exact k9t5p4_local_20_eq_row_4 j + + · exact k9t5p4_local_20_eq_row_5 j + + · exact k9t5p4_local_20_eq_row_6 j + + · exact k9t5p4_local_20_eq_row_7 j + + · exact k9t5p4_local_20_eq_row_8 j + +private theorem k9t5p4_local_20_paths : ∀ p ∈ k9t5p4_step_20_data.required, p.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_20_data.i k9t5p4_step_20_data.j) 9 := by decide + +private theorem k9t5p4_local_20_bad : k9t5p4_step_20_data.bad.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_20_data.i k9t5p4_step_20_data.j) k9t5p4_local_20 9 5 := by decide + +private theorem k9t5p4_step_20_check : k9t5p4_step_20.Check k9t5p4.graph k9t5p4_state_20 9 5 := by + change k9t5p4_step_20_data.Check k9t5p4.graph k9t5p4_state_20 9 5 + refine ⟨k9t5p4_local_20_paths, ?_⟩ + rw [k9t5p4_local_20_eq] + exact k9t5p4_local_20_bad + +private theorem k9t5p4_update_20 : k9t5p4_step_20.apply k9t5p4_state_20 = k9t5p4_state_21 := by + have h : ∀ i j : Fin 9, k9t5p4_step_20.apply k9t5p4_state_20 i j = k9t5p4_state_21 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_22 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_21 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, {0, 1}, Finset.Icc 0 5, ∅, Finset.Icc 0 4, Finset.Icc 0 4, ∅, {0, 1}], + #[{0, 1}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 0 5, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 0 6, ∅, ∅], + #[∅, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1}], + #[Finset.Icc 0 4, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5], + #[∅, Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0, 1}, {1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, {0, 1}, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_21_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, Finset.Icc 1 4, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, {1}, {0, 1, 2}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_21_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_0) 0 j = k9t5p4_local_21_required_0 0 j := by decide + +private theorem k9t5p4_local_21_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_0) 1 j = k9t5p4_local_21_required_0 1 j := by decide + +private theorem k9t5p4_local_21_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_0) 2 j = k9t5p4_local_21_required_0 2 j := by decide + +private theorem k9t5p4_local_21_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_0) 3 j = k9t5p4_local_21_required_0 3 j := by decide + +private theorem k9t5p4_local_21_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_0) 4 j = k9t5p4_local_21_required_0 4 j := by decide + +private theorem k9t5p4_local_21_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_0) 5 j = k9t5p4_local_21_required_0 5 j := by decide + +private theorem k9t5p4_local_21_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_0) 6 j = k9t5p4_local_21_required_0 6 j := by decide + +private theorem k9t5p4_local_21_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_0) 7 j = k9t5p4_local_21_required_0 7 j := by decide + +private theorem k9t5p4_local_21_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_0) 8 j = k9t5p4_local_21_required_0 8 j := by decide + +private theorem k9t5p4_local_21_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_0) 9 j = k9t5p4_local_21_required_0 9 j := by decide + +private theorem k9t5p4_local_21_required_0_eq : (requiredMatrix 9 k9t5p4_step_21_required_block_0) = k9t5p4_local_21_required_0 := by + funext i j + fin_cases i + + · exact k9t5p4_local_21_required_0_eq_row_0 j + + · exact k9t5p4_local_21_required_0_eq_row_1 j + + · exact k9t5p4_local_21_required_0_eq_row_2 j + + · exact k9t5p4_local_21_required_0_eq_row_3 j + + · exact k9t5p4_local_21_required_0_eq_row_4 j + + · exact k9t5p4_local_21_required_0_eq_row_5 j + + · exact k9t5p4_local_21_required_0_eq_row_6 j + + · exact k9t5p4_local_21_required_0_eq_row_7 j + + · exact k9t5p4_local_21_required_0_eq_row_8 j + + · exact k9t5p4_local_21_required_0_eq_row_9 j + +private theorem k9t5p4_local_21_path_0_0 : (⟨4, 0, [1, 2, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_0_1 : (⟨4, 6, [1, 2, 3, 9, 8, 0, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_0_2 : (⟨4, 7, [1, 2, 3, 9, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_0_3 : (⟨4, 0, [1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_0_4 : (⟨4, 7, [1, 2, 9, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_0_5 : (⟨4, 0, [1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_0_6 : (⟨4, 7, [1, 9, 8, 0, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_0_7 : (⟨6, 0, [5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_0_8 : (⟨6, 0, [5, 4, 1, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_0_9 : (⟨6, 0, [5, 4, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_0_10 : (⟨6, 0, [5, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_0_11 : (⟨6, 4, [5, 0, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_paths_block_0 : ∀ p ∈ k9t5p4_step_21_required_block_0, p.Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by + simp only [k9t5p4_step_21_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_21_path_0_0, k9t5p4_local_21_path_0_1, k9t5p4_local_21_path_0_2, k9t5p4_local_21_path_0_3, k9t5p4_local_21_path_0_4, k9t5p4_local_21_path_0_5, k9t5p4_local_21_path_0_6, k9t5p4_local_21_path_0_7, k9t5p4_local_21_path_0_8, k9t5p4_local_21_path_0_9, k9t5p4_local_21_path_0_10, k9t5p4_local_21_path_0_11⟩ + +private def k9t5p4_local_21_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, {0}, {0, 1, 2}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, {0, 1}, {0, 1}, {0, 1}, ∅, ∅, ∅, ∅, ∅, {0, 1}], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_21_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_1) 0 j = k9t5p4_local_21_required_1 0 j := by decide + +private theorem k9t5p4_local_21_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_1) 1 j = k9t5p4_local_21_required_1 1 j := by decide + +private theorem k9t5p4_local_21_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_1) 2 j = k9t5p4_local_21_required_1 2 j := by decide + +private theorem k9t5p4_local_21_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_1) 3 j = k9t5p4_local_21_required_1 3 j := by decide + +private theorem k9t5p4_local_21_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_1) 4 j = k9t5p4_local_21_required_1 4 j := by decide + +private theorem k9t5p4_local_21_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_1) 5 j = k9t5p4_local_21_required_1 5 j := by decide + +private theorem k9t5p4_local_21_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_1) 6 j = k9t5p4_local_21_required_1 6 j := by decide + +private theorem k9t5p4_local_21_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_1) 7 j = k9t5p4_local_21_required_1 7 j := by decide + +private theorem k9t5p4_local_21_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_1) 8 j = k9t5p4_local_21_required_1 8 j := by decide + +private theorem k9t5p4_local_21_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_1) 9 j = k9t5p4_local_21_required_1 9 j := by decide + +private theorem k9t5p4_local_21_required_1_eq : (requiredMatrix 9 k9t5p4_step_21_required_block_1) = k9t5p4_local_21_required_1 := by + funext i j + fin_cases i + + · exact k9t5p4_local_21_required_1_eq_row_0 j + + · exact k9t5p4_local_21_required_1_eq_row_1 j + + · exact k9t5p4_local_21_required_1_eq_row_2 j + + · exact k9t5p4_local_21_required_1_eq_row_3 j + + · exact k9t5p4_local_21_required_1_eq_row_4 j + + · exact k9t5p4_local_21_required_1_eq_row_5 j + + · exact k9t5p4_local_21_required_1_eq_row_6 j + + · exact k9t5p4_local_21_required_1_eq_row_7 j + + · exact k9t5p4_local_21_required_1_eq_row_8 j + + · exact k9t5p4_local_21_required_1_eq_row_9 j + +private theorem k9t5p4_local_21_path_1_0 : (⟨6, 3, [5, 0, 8, 9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_1_1 : (⟨6, 2, [5, 0, 8, 9, 1, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_1_2 : (⟨6, 1, [5, 0, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_1_3 : (⟨6, 0, [7, 8, 9, 1, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_1_4 : (⟨6, 9, [7, 8, 0, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_1_5 : (⟨6, 9, [7, 8, 0, 5, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_1_6 : (⟨6, 3, [7, 8, 0, 5, 4, 1, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_1_7 : (⟨6, 2, [7, 8, 0, 5, 4, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_1_8 : (⟨6, 1, [7, 8, 0, 5, 4, 2, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_1_9 : (⟨7, 0, [6, 5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_1_10 : (⟨7, 0, [6, 5, 4, 1, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_1_11 : (⟨7, 0, [6, 5, 4, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_paths_block_1 : ∀ p ∈ k9t5p4_step_21_required_block_1, p.Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by + simp only [k9t5p4_step_21_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_21_path_1_0, k9t5p4_local_21_path_1_1, k9t5p4_local_21_path_1_2, k9t5p4_local_21_path_1_3, k9t5p4_local_21_path_1_4, k9t5p4_local_21_path_1_5, k9t5p4_local_21_path_1_6, k9t5p4_local_21_path_1_7, k9t5p4_local_21_path_1_8, k9t5p4_local_21_path_1_9, k9t5p4_local_21_path_1_10, k9t5p4_local_21_path_1_11⟩ + +private def k9t5p4_local_21_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, {3, 4}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3, 4}, {0, 1}, {0, 1}, {0, 1}, {0, 1, 2}, ∅, ∅, ∅, ∅, {1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_21_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_2) 0 j = k9t5p4_local_21_required_2 0 j := by decide + +private theorem k9t5p4_local_21_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_2) 1 j = k9t5p4_local_21_required_2 1 j := by decide + +private theorem k9t5p4_local_21_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_2) 2 j = k9t5p4_local_21_required_2 2 j := by decide + +private theorem k9t5p4_local_21_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_2) 3 j = k9t5p4_local_21_required_2 3 j := by decide + +private theorem k9t5p4_local_21_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_2) 4 j = k9t5p4_local_21_required_2 4 j := by decide + +private theorem k9t5p4_local_21_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_2) 5 j = k9t5p4_local_21_required_2 5 j := by decide + +private theorem k9t5p4_local_21_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_2) 6 j = k9t5p4_local_21_required_2 6 j := by decide + +private theorem k9t5p4_local_21_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_2) 7 j = k9t5p4_local_21_required_2 7 j := by decide + +private theorem k9t5p4_local_21_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_2) 8 j = k9t5p4_local_21_required_2 8 j := by decide + +private theorem k9t5p4_local_21_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_2) 9 j = k9t5p4_local_21_required_2 9 j := by decide + +private theorem k9t5p4_local_21_required_2_eq : (requiredMatrix 9 k9t5p4_step_21_required_block_2) = k9t5p4_local_21_required_2 := by + funext i j + fin_cases i + + · exact k9t5p4_local_21_required_2_eq_row_0 j + + · exact k9t5p4_local_21_required_2_eq_row_1 j + + · exact k9t5p4_local_21_required_2_eq_row_2 j + + · exact k9t5p4_local_21_required_2_eq_row_3 j + + · exact k9t5p4_local_21_required_2_eq_row_4 j + + · exact k9t5p4_local_21_required_2_eq_row_5 j + + · exact k9t5p4_local_21_required_2_eq_row_6 j + + · exact k9t5p4_local_21_required_2_eq_row_7 j + + · exact k9t5p4_local_21_required_2_eq_row_8 j + + · exact k9t5p4_local_21_required_2_eq_row_9 j + +private theorem k9t5p4_local_21_path_2_0 : (⟨7, 0, [6, 5, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_2_1 : (⟨7, 3, [6, 5, 0, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_2_2 : (⟨7, 4, [6, 5, 0, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_2_3 : (⟨7, 4, [6, 5, 0, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_2_4 : (⟨7, 3, [6, 5, 0, 8, 9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_2_5 : (⟨7, 2, [6, 5, 0, 8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_2_6 : (⟨7, 2, [6, 5, 0, 8, 9, 1, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_2_7 : (⟨7, 4, [6, 5, 0, 8, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_2_8 : (⟨7, 1, [6, 5, 0, 8, 9, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_2_9 : (⟨7, 1, [6, 5, 0, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_2_10 : (⟨7, 0, [8, 9, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_2_11 : (⟨7, 9, [8, 0, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_paths_block_2 : ∀ p ∈ k9t5p4_step_21_required_block_2, p.Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by + simp only [k9t5p4_step_21_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_21_path_2_0, k9t5p4_local_21_path_2_1, k9t5p4_local_21_path_2_2, k9t5p4_local_21_path_2_3, k9t5p4_local_21_path_2_4, k9t5p4_local_21_path_2_5, k9t5p4_local_21_path_2_6, k9t5p4_local_21_path_2_7, k9t5p4_local_21_path_2_8, k9t5p4_local_21_path_2_9, k9t5p4_local_21_path_2_10, k9t5p4_local_21_path_2_11⟩ + +private def k9t5p4_local_21_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1}, {0, 1}, {0, 1}, {0, 1, 2}, ∅, {0, 1}, {1}, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_21_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_3) 0 j = k9t5p4_local_21_required_3 0 j := by decide + +private theorem k9t5p4_local_21_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_3) 1 j = k9t5p4_local_21_required_3 1 j := by decide + +private theorem k9t5p4_local_21_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_3) 2 j = k9t5p4_local_21_required_3 2 j := by decide + +private theorem k9t5p4_local_21_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_3) 3 j = k9t5p4_local_21_required_3 3 j := by decide + +private theorem k9t5p4_local_21_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_3) 4 j = k9t5p4_local_21_required_3 4 j := by decide + +private theorem k9t5p4_local_21_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_3) 5 j = k9t5p4_local_21_required_3 5 j := by decide + +private theorem k9t5p4_local_21_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_3) 6 j = k9t5p4_local_21_required_3 6 j := by decide + +private theorem k9t5p4_local_21_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_3) 7 j = k9t5p4_local_21_required_3 7 j := by decide + +private theorem k9t5p4_local_21_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_3) 8 j = k9t5p4_local_21_required_3 8 j := by decide + +private theorem k9t5p4_local_21_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_3) 9 j = k9t5p4_local_21_required_3 9 j := by decide + +private theorem k9t5p4_local_21_required_3_eq : (requiredMatrix 9 k9t5p4_step_21_required_block_3) = k9t5p4_local_21_required_3 := by + funext i j + fin_cases i + + · exact k9t5p4_local_21_required_3_eq_row_0 j + + · exact k9t5p4_local_21_required_3_eq_row_1 j + + · exact k9t5p4_local_21_required_3_eq_row_2 j + + · exact k9t5p4_local_21_required_3_eq_row_3 j + + · exact k9t5p4_local_21_required_3_eq_row_4 j + + · exact k9t5p4_local_21_required_3_eq_row_5 j + + · exact k9t5p4_local_21_required_3_eq_row_6 j + + · exact k9t5p4_local_21_required_3_eq_row_7 j + + · exact k9t5p4_local_21_required_3_eq_row_8 j + + · exact k9t5p4_local_21_required_3_eq_row_9 j + +private theorem k9t5p4_local_21_path_3_0 : (⟨0, 7, [5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_3_1 : (⟨0, 6, [5, 4, 1, 2, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_3_2 : (⟨0, 6, [5, 4, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_3_3 : (⟨0, 3, [5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_3_4 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_3_5 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_3_6 : (⟨0, 3, [5, 6, 7, 8, 9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_3_7 : (⟨0, 2, [5, 6, 7, 8, 9, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_3_8 : (⟨0, 2, [5, 6, 7, 8, 9, 1, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_3_9 : (⟨0, 4, [5, 6, 7, 8, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_3_10 : (⟨0, 1, [5, 6, 7, 8, 9, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_3_11 : (⟨0, 1, [5, 6, 7, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_paths_block_3 : ∀ p ∈ k9t5p4_step_21_required_block_3, p.Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by + simp only [k9t5p4_step_21_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_21_path_3_0, k9t5p4_local_21_path_3_1, k9t5p4_local_21_path_3_2, k9t5p4_local_21_path_3_3, k9t5p4_local_21_path_3_4, k9t5p4_local_21_path_3_5, k9t5p4_local_21_path_3_6, k9t5p4_local_21_path_3_7, k9t5p4_local_21_path_3_8, k9t5p4_local_21_path_3_9, k9t5p4_local_21_path_3_10, k9t5p4_local_21_path_3_11⟩ + +private def k9t5p4_local_21_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, {3, 4, 5}, ∅, ∅, {0}, ∅, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{3, 4, 5}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_21_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_4) 0 j = k9t5p4_local_21_required_4 0 j := by decide + +private theorem k9t5p4_local_21_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_4) 1 j = k9t5p4_local_21_required_4 1 j := by decide + +private theorem k9t5p4_local_21_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_4) 2 j = k9t5p4_local_21_required_4 2 j := by decide + +private theorem k9t5p4_local_21_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_4) 3 j = k9t5p4_local_21_required_4 3 j := by decide + +private theorem k9t5p4_local_21_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_4) 4 j = k9t5p4_local_21_required_4 4 j := by decide + +private theorem k9t5p4_local_21_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_4) 5 j = k9t5p4_local_21_required_4 5 j := by decide + +private theorem k9t5p4_local_21_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_4) 6 j = k9t5p4_local_21_required_4 6 j := by decide + +private theorem k9t5p4_local_21_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_4) 7 j = k9t5p4_local_21_required_4 7 j := by decide + +private theorem k9t5p4_local_21_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_4) 8 j = k9t5p4_local_21_required_4 8 j := by decide + +private theorem k9t5p4_local_21_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_21_required_block_4) 9 j = k9t5p4_local_21_required_4 9 j := by decide + +private theorem k9t5p4_local_21_required_4_eq : (requiredMatrix 9 k9t5p4_step_21_required_block_4) = k9t5p4_local_21_required_4 := by + funext i j + fin_cases i + + · exact k9t5p4_local_21_required_4_eq_row_0 j + + · exact k9t5p4_local_21_required_4_eq_row_1 j + + · exact k9t5p4_local_21_required_4_eq_row_2 j + + · exact k9t5p4_local_21_required_4_eq_row_3 j + + · exact k9t5p4_local_21_required_4_eq_row_4 j + + · exact k9t5p4_local_21_required_4_eq_row_5 j + + · exact k9t5p4_local_21_required_4_eq_row_6 j + + · exact k9t5p4_local_21_required_4_eq_row_7 j + + · exact k9t5p4_local_21_required_4_eq_row_8 j + + · exact k9t5p4_local_21_required_4_eq_row_9 j + +private theorem k9t5p4_local_21_path_4_0 : (⟨0, 4, [5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_4_1 : (⟨0, 9, [8, 7, 6, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_4_2 : (⟨0, 9, [8, 7, 6, 5, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_4_3 : (⟨0, 7, [8, 9, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_4_4 : (⟨0, 4, [8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_path_4_5 : (⟨0, 4, [8, 9, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by decide + +private theorem k9t5p4_local_21_paths_block_4 : ∀ p ∈ k9t5p4_step_21_required_block_4, p.Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by + simp only [k9t5p4_step_21_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_21_path_4_0, k9t5p4_local_21_path_4_1, k9t5p4_local_21_path_4_2, k9t5p4_local_21_path_4_3, k9t5p4_local_21_path_4_4, k9t5p4_local_21_path_4_5⟩ + +private theorem k9t5p4_local_21_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_21 a b ∪ (((((k9t5p4_local_21_required_0 a b ∪ k9t5p4_local_21_required_1 a b) ∪ k9t5p4_local_21_required_2 a b) ∪ k9t5p4_local_21_required_3 a b) ∪ k9t5p4_local_21_required_4 a b))) 0 j = k9t5p4_local_21 0 j := by decide + +private theorem k9t5p4_local_21_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_21 a b ∪ (((((k9t5p4_local_21_required_0 a b ∪ k9t5p4_local_21_required_1 a b) ∪ k9t5p4_local_21_required_2 a b) ∪ k9t5p4_local_21_required_3 a b) ∪ k9t5p4_local_21_required_4 a b))) 1 j = k9t5p4_local_21 1 j := by decide + +private theorem k9t5p4_local_21_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_21 a b ∪ (((((k9t5p4_local_21_required_0 a b ∪ k9t5p4_local_21_required_1 a b) ∪ k9t5p4_local_21_required_2 a b) ∪ k9t5p4_local_21_required_3 a b) ∪ k9t5p4_local_21_required_4 a b))) 2 j = k9t5p4_local_21 2 j := by decide + +private theorem k9t5p4_local_21_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_21 a b ∪ (((((k9t5p4_local_21_required_0 a b ∪ k9t5p4_local_21_required_1 a b) ∪ k9t5p4_local_21_required_2 a b) ∪ k9t5p4_local_21_required_3 a b) ∪ k9t5p4_local_21_required_4 a b))) 3 j = k9t5p4_local_21 3 j := by decide + +private theorem k9t5p4_local_21_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_21 a b ∪ (((((k9t5p4_local_21_required_0 a b ∪ k9t5p4_local_21_required_1 a b) ∪ k9t5p4_local_21_required_2 a b) ∪ k9t5p4_local_21_required_3 a b) ∪ k9t5p4_local_21_required_4 a b))) 4 j = k9t5p4_local_21 4 j := by decide + +private theorem k9t5p4_local_21_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_21 a b ∪ (((((k9t5p4_local_21_required_0 a b ∪ k9t5p4_local_21_required_1 a b) ∪ k9t5p4_local_21_required_2 a b) ∪ k9t5p4_local_21_required_3 a b) ∪ k9t5p4_local_21_required_4 a b))) 5 j = k9t5p4_local_21 5 j := by decide + +private theorem k9t5p4_local_21_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_21 a b ∪ (((((k9t5p4_local_21_required_0 a b ∪ k9t5p4_local_21_required_1 a b) ∪ k9t5p4_local_21_required_2 a b) ∪ k9t5p4_local_21_required_3 a b) ∪ k9t5p4_local_21_required_4 a b))) 6 j = k9t5p4_local_21 6 j := by decide + +private theorem k9t5p4_local_21_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_21 a b ∪ (((((k9t5p4_local_21_required_0 a b ∪ k9t5p4_local_21_required_1 a b) ∪ k9t5p4_local_21_required_2 a b) ∪ k9t5p4_local_21_required_3 a b) ∪ k9t5p4_local_21_required_4 a b))) 7 j = k9t5p4_local_21 7 j := by decide + +private theorem k9t5p4_local_21_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_21 a b ∪ (((((k9t5p4_local_21_required_0 a b ∪ k9t5p4_local_21_required_1 a b) ∪ k9t5p4_local_21_required_2 a b) ∪ k9t5p4_local_21_required_3 a b) ∪ k9t5p4_local_21_required_4 a b))) 8 j = k9t5p4_local_21 8 j := by decide + +private theorem k9t5p4_local_21_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_21 a b ∪ (((((k9t5p4_local_21_required_0 a b ∪ k9t5p4_local_21_required_1 a b) ∪ k9t5p4_local_21_required_2 a b) ∪ k9t5p4_local_21_required_3 a b) ∪ k9t5p4_local_21_required_4 a b))) 9 j = k9t5p4_local_21 9 j := by decide + +private theorem k9t5p4_local_21_merged_eq : (fun a b => freshMatrix k9t5p4_state_21 a b ∪ (((((k9t5p4_local_21_required_0 a b ∪ k9t5p4_local_21_required_1 a b) ∪ k9t5p4_local_21_required_2 a b) ∪ k9t5p4_local_21_required_3 a b) ∪ k9t5p4_local_21_required_4 a b))) = k9t5p4_local_21 := by + funext i j + fin_cases i + + · exact k9t5p4_local_21_merged_eq_row_0 j + + · exact k9t5p4_local_21_merged_eq_row_1 j + + · exact k9t5p4_local_21_merged_eq_row_2 j + + · exact k9t5p4_local_21_merged_eq_row_3 j + + · exact k9t5p4_local_21_merged_eq_row_4 j + + · exact k9t5p4_local_21_merged_eq_row_5 j + + · exact k9t5p4_local_21_merged_eq_row_6 j + + · exact k9t5p4_local_21_merged_eq_row_7 j + + · exact k9t5p4_local_21_merged_eq_row_8 j + + · exact k9t5p4_local_21_merged_eq_row_9 j + +private theorem k9t5p4_local_21_eq : (fun a b => freshMatrix k9t5p4_state_21 a b ∪ requiredMatrix 9 k9t5p4_step_21_data.required a b) = k9t5p4_local_21 := by + funext a b + change freshMatrix k9t5p4_state_21 a b ∪ requiredMatrix 9 (k9t5p4_step_21_required_block_0 ++ k9t5p4_step_21_required_block_1 ++ k9t5p4_step_21_required_block_2 ++ k9t5p4_step_21_required_block_3 ++ k9t5p4_step_21_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t5p4_local_21_required_0_eq, k9t5p4_local_21_required_1_eq, k9t5p4_local_21_required_2_eq, k9t5p4_local_21_required_3_eq, k9t5p4_local_21_required_4_eq] + exact congrFun (congrFun k9t5p4_local_21_merged_eq a) b + +private theorem k9t5p4_local_21_paths : ∀ p ∈ k9t5p4_step_21_data.required, p.Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 := by + change ∀ p ∈ (k9t5p4_step_21_required_block_0 ++ k9t5p4_step_21_required_block_1 ++ k9t5p4_step_21_required_block_2 ++ k9t5p4_step_21_required_block_3 ++ k9t5p4_step_21_required_block_4), p.Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t5p4_local_21_paths_block_0, k9t5p4_local_21_paths_block_1⟩, k9t5p4_local_21_paths_block_2⟩, k9t5p4_local_21_paths_block_3⟩, k9t5p4_local_21_paths_block_4⟩ + +private theorem k9t5p4_local_21_bad : k9t5p4_step_21_data.bad.Check (freshGraph k9t5p4.graph k9t5p4_step_21_data.i k9t5p4_step_21_data.j) k9t5p4_local_21 9 5 := by decide + +private theorem k9t5p4_step_21_check : k9t5p4_step_21.Check k9t5p4.graph k9t5p4_state_21 9 5 := by + change k9t5p4_step_21_data.Check k9t5p4.graph k9t5p4_state_21 9 5 + refine ⟨by decide, k9t5p4_local_21_paths, ?_⟩ + rw [k9t5p4_local_21_eq] + exact k9t5p4_local_21_bad + +private theorem k9t5p4_update_21 : k9t5p4_step_21.apply k9t5p4_state_21 = k9t5p4_state_22 := by + have h : ∀ i j : Fin 9, k9t5p4_step_21.apply k9t5p4_state_21 i j = k9t5p4_state_22 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_23 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_22 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 6, {0, 1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5], + #[Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 1 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_22_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t5p4_state_22 a b ∪ requiredMatrix 9 k9t5p4_step_22_data.required a b) 0 j = k9t5p4_local_22 0 j := by decide + +private theorem k9t5p4_local_22_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t5p4_state_22 a b ∪ requiredMatrix 9 k9t5p4_step_22_data.required a b) 1 j = k9t5p4_local_22 1 j := by decide + +private theorem k9t5p4_local_22_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t5p4_state_22 a b ∪ requiredMatrix 9 k9t5p4_step_22_data.required a b) 2 j = k9t5p4_local_22 2 j := by decide + +private theorem k9t5p4_local_22_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t5p4_state_22 a b ∪ requiredMatrix 9 k9t5p4_step_22_data.required a b) 3 j = k9t5p4_local_22 3 j := by decide + +private theorem k9t5p4_local_22_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t5p4_state_22 a b ∪ requiredMatrix 9 k9t5p4_step_22_data.required a b) 4 j = k9t5p4_local_22 4 j := by decide + +private theorem k9t5p4_local_22_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t5p4_state_22 a b ∪ requiredMatrix 9 k9t5p4_step_22_data.required a b) 5 j = k9t5p4_local_22 5 j := by decide + +private theorem k9t5p4_local_22_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t5p4_state_22 a b ∪ requiredMatrix 9 k9t5p4_step_22_data.required a b) 6 j = k9t5p4_local_22 6 j := by decide + +private theorem k9t5p4_local_22_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t5p4_state_22 a b ∪ requiredMatrix 9 k9t5p4_step_22_data.required a b) 7 j = k9t5p4_local_22 7 j := by decide + +private theorem k9t5p4_local_22_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t5p4_state_22 a b ∪ requiredMatrix 9 k9t5p4_step_22_data.required a b) 8 j = k9t5p4_local_22 8 j := by decide + +private theorem k9t5p4_local_22_eq : (fun a b => k9t5p4_state_22 a b ∪ requiredMatrix 9 k9t5p4_step_22_data.required a b) = k9t5p4_local_22 := by + funext i j + fin_cases i + + · exact k9t5p4_local_22_eq_row_0 j + + · exact k9t5p4_local_22_eq_row_1 j + + · exact k9t5p4_local_22_eq_row_2 j + + · exact k9t5p4_local_22_eq_row_3 j + + · exact k9t5p4_local_22_eq_row_4 j + + · exact k9t5p4_local_22_eq_row_5 j + + · exact k9t5p4_local_22_eq_row_6 j + + · exact k9t5p4_local_22_eq_row_7 j + + · exact k9t5p4_local_22_eq_row_8 j + +private theorem k9t5p4_local_22_paths : ∀ p ∈ k9t5p4_step_22_data.required, p.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_22_data.i k9t5p4_step_22_data.j) 9 := by decide + +private theorem k9t5p4_local_22_bad : k9t5p4_step_22_data.bad.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_22_data.i k9t5p4_step_22_data.j) k9t5p4_local_22 9 5 := by decide + +private theorem k9t5p4_step_22_check : k9t5p4_step_22.Check k9t5p4.graph k9t5p4_state_22 9 5 := by + change k9t5p4_step_22_data.Check k9t5p4.graph k9t5p4_state_22 9 5 + refine ⟨k9t5p4_local_22_paths, ?_⟩ + rw [k9t5p4_local_22_eq] + exact k9t5p4_local_22_bad + +private theorem k9t5p4_update_22 : k9t5p4_step_22.apply k9t5p4_state_22 = k9t5p4_state_23 := by + have h : ∀ i j : Fin 9, k9t5p4_step_22.apply k9t5p4_state_22 i j = k9t5p4_state_23 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_24 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_23 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, ∅, Finset.Icc 0 4, ∅, Finset.Icc 0 3, ∅, {0}], + #[Finset.Icc 0 4, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[{0}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{0}, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[∅, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {0, 2, 3, 4, 5}, ∅], + #[Finset.Icc 0 3, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5], + #[∅, Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, {0, 2, 3, 4, 5}, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{0}, {1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 0 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_23_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0, 1, 2}, ∅, ∅, ∅, Finset.Icc 0 4, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, ∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_23_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_0) 0 j = k9t5p4_local_23_required_0 0 j := by decide + +private theorem k9t5p4_local_23_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_0) 1 j = k9t5p4_local_23_required_0 1 j := by decide + +private theorem k9t5p4_local_23_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_0) 2 j = k9t5p4_local_23_required_0 2 j := by decide + +private theorem k9t5p4_local_23_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_0) 3 j = k9t5p4_local_23_required_0 3 j := by decide + +private theorem k9t5p4_local_23_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_0) 4 j = k9t5p4_local_23_required_0 4 j := by decide + +private theorem k9t5p4_local_23_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_0) 5 j = k9t5p4_local_23_required_0 5 j := by decide + +private theorem k9t5p4_local_23_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_0) 6 j = k9t5p4_local_23_required_0 6 j := by decide + +private theorem k9t5p4_local_23_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_0) 7 j = k9t5p4_local_23_required_0 7 j := by decide + +private theorem k9t5p4_local_23_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_0) 8 j = k9t5p4_local_23_required_0 8 j := by decide + +private theorem k9t5p4_local_23_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_0) 9 j = k9t5p4_local_23_required_0 9 j := by decide + +private theorem k9t5p4_local_23_required_0_eq : (requiredMatrix 9 k9t5p4_step_23_required_block_0) = k9t5p4_local_23_required_0 := by + funext i j + fin_cases i + + · exact k9t5p4_local_23_required_0_eq_row_0 j + + · exact k9t5p4_local_23_required_0_eq_row_1 j + + · exact k9t5p4_local_23_required_0_eq_row_2 j + + · exact k9t5p4_local_23_required_0_eq_row_3 j + + · exact k9t5p4_local_23_required_0_eq_row_4 j + + · exact k9t5p4_local_23_required_0_eq_row_5 j + + · exact k9t5p4_local_23_required_0_eq_row_6 j + + · exact k9t5p4_local_23_required_0_eq_row_7 j + + · exact k9t5p4_local_23_required_0_eq_row_8 j + + · exact k9t5p4_local_23_required_0_eq_row_9 j + +private theorem k9t5p4_local_23_path_0_0 : (⟨1, 0, [9, 2, 3, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_0_1 : (⟨1, 0, [9, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_0_2 : (⟨1, 7, [9, 2, 3, 4, 5, 6, 0, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_0_3 : (⟨1, 0, [9, 2, 4, 5, 6, 7, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_0_4 : (⟨1, 7, [9, 2, 4, 5, 6, 0, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_0_5 : (⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_0_6 : (⟨5, 7, [4, 1, 2, 3, 9, 8, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_0_7 : (⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_0_8 : (⟨5, 0, [4, 1, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_0_9 : (⟨5, 7, [4, 1, 2, 9, 8, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_0_10 : (⟨5, 0, [4, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_0_11 : (⟨5, 0, [4, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_paths_block_0 : ∀ p ∈ k9t5p4_step_23_required_block_0, p.Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by + simp only [k9t5p4_step_23_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_23_path_0_0, k9t5p4_local_23_path_0_1, k9t5p4_local_23_path_0_2, k9t5p4_local_23_path_0_3, k9t5p4_local_23_path_0_4, k9t5p4_local_23_path_0_5, k9t5p4_local_23_path_0_6, k9t5p4_local_23_path_0_7, k9t5p4_local_23_path_0_8, k9t5p4_local_23_path_0_9, k9t5p4_local_23_path_0_10, k9t5p4_local_23_path_0_11⟩ + +private def k9t5p4_local_23_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 0 3, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 3, {1}, {1}, {1}, {1}, {0, 1}, ∅, ∅, ∅, {0, 1}], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_23_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_1) 0 j = k9t5p4_local_23_required_1 0 j := by decide + +private theorem k9t5p4_local_23_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_1) 1 j = k9t5p4_local_23_required_1 1 j := by decide + +private theorem k9t5p4_local_23_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_1) 2 j = k9t5p4_local_23_required_1 2 j := by decide + +private theorem k9t5p4_local_23_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_1) 3 j = k9t5p4_local_23_required_1 3 j := by decide + +private theorem k9t5p4_local_23_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_1) 4 j = k9t5p4_local_23_required_1 4 j := by decide + +private theorem k9t5p4_local_23_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_1) 5 j = k9t5p4_local_23_required_1 5 j := by decide + +private theorem k9t5p4_local_23_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_1) 6 j = k9t5p4_local_23_required_1 6 j := by decide + +private theorem k9t5p4_local_23_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_1) 7 j = k9t5p4_local_23_required_1 7 j := by decide + +private theorem k9t5p4_local_23_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_1) 8 j = k9t5p4_local_23_required_1 8 j := by decide + +private theorem k9t5p4_local_23_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_1) 9 j = k9t5p4_local_23_required_1 9 j := by decide + +private theorem k9t5p4_local_23_required_1_eq : (requiredMatrix 9 k9t5p4_step_23_required_block_1) = k9t5p4_local_23_required_1 := by + funext i j + fin_cases i + + · exact k9t5p4_local_23_required_1_eq_row_0 j + + · exact k9t5p4_local_23_required_1_eq_row_1 j + + · exact k9t5p4_local_23_required_1_eq_row_2 j + + · exact k9t5p4_local_23_required_1_eq_row_3 j + + · exact k9t5p4_local_23_required_1_eq_row_4 j + + · exact k9t5p4_local_23_required_1_eq_row_5 j + + · exact k9t5p4_local_23_required_1_eq_row_6 j + + · exact k9t5p4_local_23_required_1_eq_row_7 j + + · exact k9t5p4_local_23_required_1_eq_row_8 j + + · exact k9t5p4_local_23_required_1_eq_row_9 j + +private theorem k9t5p4_local_23_path_1_0 : (⟨7, 0, [6, 5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_1_1 : (⟨7, 0, [6, 5, 4, 1, 2, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_1_2 : (⟨7, 0, [6, 5, 4, 1, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_1_3 : (⟨7, 0, [6, 5, 4, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_1_4 : (⟨7, 4, [6, 0, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_1_5 : (⟨7, 5, [6, 0, 8, 9, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_1_6 : (⟨7, 3, [6, 0, 8, 9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_1_7 : (⟨7, 5, [6, 0, 8, 9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_1_8 : (⟨7, 2, [6, 0, 8, 9, 1, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_1_9 : (⟨7, 1, [6, 0, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_1_10 : (⟨7, 9, [8, 0, 6, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_1_11 : (⟨7, 9, [8, 0, 6, 5, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_paths_block_1 : ∀ p ∈ k9t5p4_step_23_required_block_1, p.Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by + simp only [k9t5p4_step_23_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_23_path_1_0, k9t5p4_local_23_path_1_1, k9t5p4_local_23_path_1_2, k9t5p4_local_23_path_1_3, k9t5p4_local_23_path_1_4, k9t5p4_local_23_path_1_5, k9t5p4_local_23_path_1_6, k9t5p4_local_23_path_1_7, k9t5p4_local_23_path_1_8, k9t5p4_local_23_path_1_9, k9t5p4_local_23_path_1_10, k9t5p4_local_23_path_1_11⟩ + +private def k9t5p4_local_23_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 1 4, {0}, {0}, ∅, {0}, ∅, {0}, ∅, {0}], + #[Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, {0}, {0}, {0}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_23_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_2) 0 j = k9t5p4_local_23_required_2 0 j := by decide + +private theorem k9t5p4_local_23_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_2) 1 j = k9t5p4_local_23_required_2 1 j := by decide + +private theorem k9t5p4_local_23_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_2) 2 j = k9t5p4_local_23_required_2 2 j := by decide + +private theorem k9t5p4_local_23_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_2) 3 j = k9t5p4_local_23_required_2 3 j := by decide + +private theorem k9t5p4_local_23_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_2) 4 j = k9t5p4_local_23_required_2 4 j := by decide + +private theorem k9t5p4_local_23_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_2) 5 j = k9t5p4_local_23_required_2 5 j := by decide + +private theorem k9t5p4_local_23_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_2) 6 j = k9t5p4_local_23_required_2 6 j := by decide + +private theorem k9t5p4_local_23_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_2) 7 j = k9t5p4_local_23_required_2 7 j := by decide + +private theorem k9t5p4_local_23_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_2) 8 j = k9t5p4_local_23_required_2 8 j := by decide + +private theorem k9t5p4_local_23_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_2) 9 j = k9t5p4_local_23_required_2 9 j := by decide + +private theorem k9t5p4_local_23_required_2_eq : (requiredMatrix 9 k9t5p4_step_23_required_block_2) = k9t5p4_local_23_required_2 := by + funext i j + fin_cases i + + · exact k9t5p4_local_23_required_2_eq_row_0 j + + · exact k9t5p4_local_23_required_2_eq_row_1 j + + · exact k9t5p4_local_23_required_2_eq_row_2 j + + · exact k9t5p4_local_23_required_2_eq_row_3 j + + · exact k9t5p4_local_23_required_2_eq_row_4 j + + · exact k9t5p4_local_23_required_2_eq_row_5 j + + · exact k9t5p4_local_23_required_2_eq_row_6 j + + · exact k9t5p4_local_23_required_2_eq_row_7 j + + · exact k9t5p4_local_23_required_2_eq_row_8 j + + · exact k9t5p4_local_23_required_2_eq_row_9 j + +private theorem k9t5p4_local_23_path_2_0 : (⟨7, 3, [8, 0, 6, 5, 4, 1, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_2_1 : (⟨7, 2, [8, 0, 6, 5, 4, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_2_2 : (⟨7, 1, [8, 0, 6, 5, 4, 2, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_2_3 : (⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_2_4 : (⟨0, 1, [6, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_2_5 : (⟨0, 1, [6, 5, 4, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_2_6 : (⟨0, 1, [6, 5, 4, 2, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_2_7 : (⟨0, 5, [6, 7, 8, 9, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_2_8 : (⟨0, 1, [6, 7, 8, 9, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_2_9 : (⟨0, 9, [8, 7, 6, 5, 4, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_2_10 : (⟨0, 3, [8, 7, 6, 5, 4, 1, 9, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_path_2_11 : (⟨0, 2, [8, 7, 6, 5, 4, 1, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_paths_block_2 : ∀ p ∈ k9t5p4_step_23_required_block_2, p.Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by + simp only [k9t5p4_step_23_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_23_path_2_0, k9t5p4_local_23_path_2_1, k9t5p4_local_23_path_2_2, k9t5p4_local_23_path_2_3, k9t5p4_local_23_path_2_4, k9t5p4_local_23_path_2_5, k9t5p4_local_23_path_2_6, k9t5p4_local_23_path_2_7, k9t5p4_local_23_path_2_8, k9t5p4_local_23_path_2_9, k9t5p4_local_23_path_2_10, k9t5p4_local_23_path_2_11⟩ + +private def k9t5p4_local_23_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_23_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_3) 0 j = k9t5p4_local_23_required_3 0 j := by decide + +private theorem k9t5p4_local_23_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_3) 1 j = k9t5p4_local_23_required_3 1 j := by decide + +private theorem k9t5p4_local_23_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_3) 2 j = k9t5p4_local_23_required_3 2 j := by decide + +private theorem k9t5p4_local_23_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_3) 3 j = k9t5p4_local_23_required_3 3 j := by decide + +private theorem k9t5p4_local_23_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_3) 4 j = k9t5p4_local_23_required_3 4 j := by decide + +private theorem k9t5p4_local_23_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_3) 5 j = k9t5p4_local_23_required_3 5 j := by decide + +private theorem k9t5p4_local_23_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_3) 6 j = k9t5p4_local_23_required_3 6 j := by decide + +private theorem k9t5p4_local_23_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_3) 7 j = k9t5p4_local_23_required_3 7 j := by decide + +private theorem k9t5p4_local_23_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_3) 8 j = k9t5p4_local_23_required_3 8 j := by decide + +private theorem k9t5p4_local_23_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_23_required_block_3) 9 j = k9t5p4_local_23_required_3 9 j := by decide + +private theorem k9t5p4_local_23_required_3_eq : (requiredMatrix 9 k9t5p4_step_23_required_block_3) = k9t5p4_local_23_required_3 := by + funext i j + fin_cases i + + · exact k9t5p4_local_23_required_3_eq_row_0 j + + · exact k9t5p4_local_23_required_3_eq_row_1 j + + · exact k9t5p4_local_23_required_3_eq_row_2 j + + · exact k9t5p4_local_23_required_3_eq_row_3 j + + · exact k9t5p4_local_23_required_3_eq_row_4 j + + · exact k9t5p4_local_23_required_3_eq_row_5 j + + · exact k9t5p4_local_23_required_3_eq_row_6 j + + · exact k9t5p4_local_23_required_3_eq_row_7 j + + · exact k9t5p4_local_23_required_3_eq_row_8 j + + · exact k9t5p4_local_23_required_3_eq_row_9 j + +private theorem k9t5p4_local_23_path_3_0 : (⟨0, 1, [8, 7, 6, 5, 4, 2, 9, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by decide + +private theorem k9t5p4_local_23_paths_block_3 : ∀ p ∈ k9t5p4_step_23_required_block_3, p.Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by + simp only [k9t5p4_step_23_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact k9t5p4_local_23_path_3_0 + +private theorem k9t5p4_local_23_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_23 a b ∪ ((((k9t5p4_local_23_required_0 a b ∪ k9t5p4_local_23_required_1 a b) ∪ k9t5p4_local_23_required_2 a b) ∪ k9t5p4_local_23_required_3 a b))) 0 j = k9t5p4_local_23 0 j := by decide + +private theorem k9t5p4_local_23_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_23 a b ∪ ((((k9t5p4_local_23_required_0 a b ∪ k9t5p4_local_23_required_1 a b) ∪ k9t5p4_local_23_required_2 a b) ∪ k9t5p4_local_23_required_3 a b))) 1 j = k9t5p4_local_23 1 j := by decide + +private theorem k9t5p4_local_23_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_23 a b ∪ ((((k9t5p4_local_23_required_0 a b ∪ k9t5p4_local_23_required_1 a b) ∪ k9t5p4_local_23_required_2 a b) ∪ k9t5p4_local_23_required_3 a b))) 2 j = k9t5p4_local_23 2 j := by decide + +private theorem k9t5p4_local_23_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_23 a b ∪ ((((k9t5p4_local_23_required_0 a b ∪ k9t5p4_local_23_required_1 a b) ∪ k9t5p4_local_23_required_2 a b) ∪ k9t5p4_local_23_required_3 a b))) 3 j = k9t5p4_local_23 3 j := by decide + +private theorem k9t5p4_local_23_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_23 a b ∪ ((((k9t5p4_local_23_required_0 a b ∪ k9t5p4_local_23_required_1 a b) ∪ k9t5p4_local_23_required_2 a b) ∪ k9t5p4_local_23_required_3 a b))) 4 j = k9t5p4_local_23 4 j := by decide + +private theorem k9t5p4_local_23_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_23 a b ∪ ((((k9t5p4_local_23_required_0 a b ∪ k9t5p4_local_23_required_1 a b) ∪ k9t5p4_local_23_required_2 a b) ∪ k9t5p4_local_23_required_3 a b))) 5 j = k9t5p4_local_23 5 j := by decide + +private theorem k9t5p4_local_23_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_23 a b ∪ ((((k9t5p4_local_23_required_0 a b ∪ k9t5p4_local_23_required_1 a b) ∪ k9t5p4_local_23_required_2 a b) ∪ k9t5p4_local_23_required_3 a b))) 6 j = k9t5p4_local_23 6 j := by decide + +private theorem k9t5p4_local_23_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_23 a b ∪ ((((k9t5p4_local_23_required_0 a b ∪ k9t5p4_local_23_required_1 a b) ∪ k9t5p4_local_23_required_2 a b) ∪ k9t5p4_local_23_required_3 a b))) 7 j = k9t5p4_local_23 7 j := by decide + +private theorem k9t5p4_local_23_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_23 a b ∪ ((((k9t5p4_local_23_required_0 a b ∪ k9t5p4_local_23_required_1 a b) ∪ k9t5p4_local_23_required_2 a b) ∪ k9t5p4_local_23_required_3 a b))) 8 j = k9t5p4_local_23 8 j := by decide + +private theorem k9t5p4_local_23_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_23 a b ∪ ((((k9t5p4_local_23_required_0 a b ∪ k9t5p4_local_23_required_1 a b) ∪ k9t5p4_local_23_required_2 a b) ∪ k9t5p4_local_23_required_3 a b))) 9 j = k9t5p4_local_23 9 j := by decide + +private theorem k9t5p4_local_23_merged_eq : (fun a b => freshMatrix k9t5p4_state_23 a b ∪ ((((k9t5p4_local_23_required_0 a b ∪ k9t5p4_local_23_required_1 a b) ∪ k9t5p4_local_23_required_2 a b) ∪ k9t5p4_local_23_required_3 a b))) = k9t5p4_local_23 := by + funext i j + fin_cases i + + · exact k9t5p4_local_23_merged_eq_row_0 j + + · exact k9t5p4_local_23_merged_eq_row_1 j + + · exact k9t5p4_local_23_merged_eq_row_2 j + + · exact k9t5p4_local_23_merged_eq_row_3 j + + · exact k9t5p4_local_23_merged_eq_row_4 j + + · exact k9t5p4_local_23_merged_eq_row_5 j + + · exact k9t5p4_local_23_merged_eq_row_6 j + + · exact k9t5p4_local_23_merged_eq_row_7 j + + · exact k9t5p4_local_23_merged_eq_row_8 j + + · exact k9t5p4_local_23_merged_eq_row_9 j + +private theorem k9t5p4_local_23_eq : (fun a b => freshMatrix k9t5p4_state_23 a b ∪ requiredMatrix 9 k9t5p4_step_23_data.required a b) = k9t5p4_local_23 := by + funext a b + change freshMatrix k9t5p4_state_23 a b ∪ requiredMatrix 9 (k9t5p4_step_23_required_block_0 ++ k9t5p4_step_23_required_block_1 ++ k9t5p4_step_23_required_block_2 ++ k9t5p4_step_23_required_block_3) a b = _ + simp only [requiredMatrix_append, k9t5p4_local_23_required_0_eq, k9t5p4_local_23_required_1_eq, k9t5p4_local_23_required_2_eq, k9t5p4_local_23_required_3_eq] + exact congrFun (congrFun k9t5p4_local_23_merged_eq a) b + +private theorem k9t5p4_local_23_paths : ∀ p ∈ k9t5p4_step_23_data.required, p.Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 := by + change ∀ p ∈ (k9t5p4_step_23_required_block_0 ++ k9t5p4_step_23_required_block_1 ++ k9t5p4_step_23_required_block_2 ++ k9t5p4_step_23_required_block_3), p.Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t5p4_local_23_paths_block_0, k9t5p4_local_23_paths_block_1⟩, k9t5p4_local_23_paths_block_2⟩, k9t5p4_local_23_paths_block_3⟩ + +private theorem k9t5p4_local_23_bad : k9t5p4_step_23_data.bad.Check (freshGraph k9t5p4.graph k9t5p4_step_23_data.i k9t5p4_step_23_data.j) k9t5p4_local_23 9 5 := by decide + +private theorem k9t5p4_step_23_check : k9t5p4_step_23.Check k9t5p4.graph k9t5p4_state_23 9 5 := by + change k9t5p4_step_23_data.Check k9t5p4.graph k9t5p4_state_23 9 5 + refine ⟨by decide, k9t5p4_local_23_paths, ?_⟩ + rw [k9t5p4_local_23_eq] + exact k9t5p4_local_23_bad + +private theorem k9t5p4_update_23 : k9t5p4_step_23.apply k9t5p4_state_23 = k9t5p4_state_24 := by + have h : ∀ i j : Fin 9, k9t5p4_step_23.apply k9t5p4_state_23 i j = k9t5p4_state_24 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_25 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {1}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_24 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 5, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1}, ∅, {0, 1}, {1}, {0, 1}, ∅], + #[Finset.Icc 0 5, ∅, Finset.Icc 1 8, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[Finset.Icc 0 5, Finset.Icc 1 8, ∅, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 7, {1, 2, 3}], + #[Finset.Icc 0 5, Finset.Icc 1 8, Finset.Icc 1 8, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 7, {1, 2, 3}], + #[{0, 1}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[∅, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, ∅], + #[{0, 1}, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[{1}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[{0, 1}, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_24_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 5, ∅, {4}, {3}, ∅, ∅, {0, 1}, {1}, {0}, ∅], + #[∅, {4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {3}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_24_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_0) 0 j = k9t5p4_local_24_required_0 0 j := by decide + +private theorem k9t5p4_local_24_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_0) 1 j = k9t5p4_local_24_required_0 1 j := by decide + +private theorem k9t5p4_local_24_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_0) 2 j = k9t5p4_local_24_required_0 2 j := by decide + +private theorem k9t5p4_local_24_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_0) 3 j = k9t5p4_local_24_required_0 3 j := by decide + +private theorem k9t5p4_local_24_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_0) 4 j = k9t5p4_local_24_required_0 4 j := by decide + +private theorem k9t5p4_local_24_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_0) 5 j = k9t5p4_local_24_required_0 5 j := by decide + +private theorem k9t5p4_local_24_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_0) 6 j = k9t5p4_local_24_required_0 6 j := by decide + +private theorem k9t5p4_local_24_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_0) 7 j = k9t5p4_local_24_required_0 7 j := by decide + +private theorem k9t5p4_local_24_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_0) 8 j = k9t5p4_local_24_required_0 8 j := by decide + +private theorem k9t5p4_local_24_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_0) 9 j = k9t5p4_local_24_required_0 9 j := by decide + +private theorem k9t5p4_local_24_required_0_eq : (requiredMatrix 9 k9t5p4_step_24_required_block_0) = k9t5p4_local_24_required_0 := by + funext i j + fin_cases i + + · exact k9t5p4_local_24_required_0_eq_row_0 j + + · exact k9t5p4_local_24_required_0_eq_row_1 j + + · exact k9t5p4_local_24_required_0_eq_row_2 j + + · exact k9t5p4_local_24_required_0_eq_row_3 j + + · exact k9t5p4_local_24_required_0_eq_row_4 j + + · exact k9t5p4_local_24_required_0_eq_row_5 j + + · exact k9t5p4_local_24_required_0_eq_row_6 j + + · exact k9t5p4_local_24_required_0_eq_row_7 j + + · exact k9t5p4_local_24_required_0_eq_row_8 j + + · exact k9t5p4_local_24_required_0_eq_row_9 j + +private theorem k9t5p4_local_24_path_0_0 : (⟨1, 0, [2, 3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_0_1 : (⟨1, 7, [2, 3, 4, 5, 0, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_0_2 : (⟨1, 6, [2, 3, 4, 5, 0, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_0_3 : (⟨1, 8, [2, 3, 4, 9, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_0_4 : (⟨1, 0, [2, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_0_5 : (⟨1, 6, [2, 4, 5, 0, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_0_6 : (⟨1, 0, [2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_0_7 : (⟨1, 0, [9, 2, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_0_8 : (⟨1, 0, [9, 2, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_0_9 : (⟨1, 0, [9, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_0_10 : (⟨1, 2, [9, 0, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_0_11 : (⟨1, 3, [9, 0, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_paths_block_0 : ∀ p ∈ k9t5p4_step_24_required_block_0, p.Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by + simp only [k9t5p4_step_24_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_24_path_0_0, k9t5p4_local_24_path_0_1, k9t5p4_local_24_path_0_2, k9t5p4_local_24_path_0_3, k9t5p4_local_24_path_0_4, k9t5p4_local_24_path_0_5, k9t5p4_local_24_path_0_6, k9t5p4_local_24_path_0_7, k9t5p4_local_24_path_0_8, k9t5p4_local_24_path_0_9, k9t5p4_local_24_path_0_10, k9t5p4_local_24_path_0_11⟩ + +private def k9t5p4_local_24_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, Finset.Icc 0 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {3}, {4}, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 5, {3}, ∅, ∅, ∅, ∅, {0, 1}, {1}, {0}, ∅], + #[∅, {4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_24_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_1) 0 j = k9t5p4_local_24_required_1 0 j := by decide + +private theorem k9t5p4_local_24_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_1) 1 j = k9t5p4_local_24_required_1 1 j := by decide + +private theorem k9t5p4_local_24_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_1) 2 j = k9t5p4_local_24_required_1 2 j := by decide + +private theorem k9t5p4_local_24_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_1) 3 j = k9t5p4_local_24_required_1 3 j := by decide + +private theorem k9t5p4_local_24_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_1) 4 j = k9t5p4_local_24_required_1 4 j := by decide + +private theorem k9t5p4_local_24_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_1) 5 j = k9t5p4_local_24_required_1 5 j := by decide + +private theorem k9t5p4_local_24_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_1) 6 j = k9t5p4_local_24_required_1 6 j := by decide + +private theorem k9t5p4_local_24_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_1) 7 j = k9t5p4_local_24_required_1 7 j := by decide + +private theorem k9t5p4_local_24_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_1) 8 j = k9t5p4_local_24_required_1 8 j := by decide + +private theorem k9t5p4_local_24_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_1) 9 j = k9t5p4_local_24_required_1 9 j := by decide + +private theorem k9t5p4_local_24_required_1_eq : (requiredMatrix 9 k9t5p4_step_24_required_block_1) = k9t5p4_local_24_required_1 := by + funext i j + fin_cases i + + · exact k9t5p4_local_24_required_1_eq_row_0 j + + · exact k9t5p4_local_24_required_1_eq_row_1 j + + · exact k9t5p4_local_24_required_1_eq_row_2 j + + · exact k9t5p4_local_24_required_1_eq_row_3 j + + · exact k9t5p4_local_24_required_1_eq_row_4 j + + · exact k9t5p4_local_24_required_1_eq_row_5 j + + · exact k9t5p4_local_24_required_1_eq_row_6 j + + · exact k9t5p4_local_24_required_1_eq_row_7 j + + · exact k9t5p4_local_24_required_1_eq_row_8 j + + · exact k9t5p4_local_24_required_1_eq_row_9 j + +private theorem k9t5p4_local_24_path_1_0 : (⟨1, 3, [9, 0, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_1_1 : (⟨1, 2, [9, 0, 5, 4, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_1_2 : (⟨2, 0, [1, 3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_1_3 : (⟨2, 7, [1, 3, 4, 5, 0, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_1_4 : (⟨2, 6, [1, 3, 4, 5, 0, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_1_5 : (⟨2, 8, [1, 3, 4, 9, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_1_6 : (⟨2, 0, [1, 3, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_1_7 : (⟨2, 0, [1, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_1_8 : (⟨2, 6, [1, 4, 5, 0, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_1_9 : (⟨2, 0, [1, 9, 3, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_1_10 : (⟨2, 0, [1, 9, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_1_11 : (⟨2, 0, [1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_paths_block_1 : ∀ p ∈ k9t5p4_step_24_required_block_1, p.Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by + simp only [k9t5p4_step_24_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_24_path_1_0, k9t5p4_local_24_path_1_1, k9t5p4_local_24_path_1_2, k9t5p4_local_24_path_1_3, k9t5p4_local_24_path_1_4, k9t5p4_local_24_path_1_5, k9t5p4_local_24_path_1_6, k9t5p4_local_24_path_1_7, k9t5p4_local_24_path_1_8, k9t5p4_local_24_path_1_9, k9t5p4_local_24_path_1_10, k9t5p4_local_24_path_1_11⟩ + +private def k9t5p4_local_24_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, Finset.Icc 0 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {3, 4}, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 5, ∅, {3, 4}, ∅, ∅, ∅, {0, 1}, {1}, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {0, 1}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_24_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_2) 0 j = k9t5p4_local_24_required_2 0 j := by decide + +private theorem k9t5p4_local_24_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_2) 1 j = k9t5p4_local_24_required_2 1 j := by decide + +private theorem k9t5p4_local_24_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_2) 2 j = k9t5p4_local_24_required_2 2 j := by decide + +private theorem k9t5p4_local_24_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_2) 3 j = k9t5p4_local_24_required_2 3 j := by decide + +private theorem k9t5p4_local_24_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_2) 4 j = k9t5p4_local_24_required_2 4 j := by decide + +private theorem k9t5p4_local_24_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_2) 5 j = k9t5p4_local_24_required_2 5 j := by decide + +private theorem k9t5p4_local_24_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_2) 6 j = k9t5p4_local_24_required_2 6 j := by decide + +private theorem k9t5p4_local_24_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_2) 7 j = k9t5p4_local_24_required_2 7 j := by decide + +private theorem k9t5p4_local_24_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_2) 8 j = k9t5p4_local_24_required_2 8 j := by decide + +private theorem k9t5p4_local_24_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_2) 9 j = k9t5p4_local_24_required_2 9 j := by decide + +private theorem k9t5p4_local_24_required_2_eq : (requiredMatrix 9 k9t5p4_step_24_required_block_2) = k9t5p4_local_24_required_2 := by + funext i j + fin_cases i + + · exact k9t5p4_local_24_required_2_eq_row_0 j + + · exact k9t5p4_local_24_required_2_eq_row_1 j + + · exact k9t5p4_local_24_required_2_eq_row_2 j + + · exact k9t5p4_local_24_required_2_eq_row_3 j + + · exact k9t5p4_local_24_required_2_eq_row_4 j + + · exact k9t5p4_local_24_required_2_eq_row_5 j + + · exact k9t5p4_local_24_required_2_eq_row_6 j + + · exact k9t5p4_local_24_required_2_eq_row_7 j + + · exact k9t5p4_local_24_required_2_eq_row_8 j + + · exact k9t5p4_local_24_required_2_eq_row_9 j + +private theorem k9t5p4_local_24_path_2_0 : (⟨2, 3, [1, 9, 0, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_2_1 : (⟨2, 3, [9, 0, 5, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_2_2 : (⟨3, 0, [1, 2, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_2_3 : (⟨3, 7, [1, 2, 4, 5, 0, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_2_4 : (⟨3, 6, [1, 2, 4, 5, 0, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_2_5 : (⟨3, 8, [1, 2, 4, 9, 0, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_2_6 : (⟨3, 0, [1, 2, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_2_7 : (⟨3, 0, [1, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_2_8 : (⟨3, 6, [1, 4, 5, 0, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_2_9 : (⟨3, 0, [1, 9, 2, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_2_10 : (⟨3, 0, [1, 9, 4, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_2_11 : (⟨3, 0, [1, 9, 8, 7, 6, 5]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_paths_block_2 : ∀ p ∈ k9t5p4_step_24_required_block_2, p.Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by + simp only [k9t5p4_step_24_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_24_path_2_0, k9t5p4_local_24_path_2_1, k9t5p4_local_24_path_2_2, k9t5p4_local_24_path_2_3, k9t5p4_local_24_path_2_4, k9t5p4_local_24_path_2_5, k9t5p4_local_24_path_2_6, k9t5p4_local_24_path_2_7, k9t5p4_local_24_path_2_8, k9t5p4_local_24_path_2_9, k9t5p4_local_24_path_2_10, k9t5p4_local_24_path_2_11⟩ + +private def k9t5p4_local_24_required_3 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {1}, {0, 1}, {0, 1}, {0, 1}, ∅, {0, 1}, {1}, {0, 1}, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_24_required_3_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_3) 0 j = k9t5p4_local_24_required_3 0 j := by decide + +private theorem k9t5p4_local_24_required_3_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_3) 1 j = k9t5p4_local_24_required_3 1 j := by decide + +private theorem k9t5p4_local_24_required_3_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_3) 2 j = k9t5p4_local_24_required_3 2 j := by decide + +private theorem k9t5p4_local_24_required_3_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_3) 3 j = k9t5p4_local_24_required_3 3 j := by decide + +private theorem k9t5p4_local_24_required_3_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_3) 4 j = k9t5p4_local_24_required_3 4 j := by decide + +private theorem k9t5p4_local_24_required_3_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_3) 5 j = k9t5p4_local_24_required_3 5 j := by decide + +private theorem k9t5p4_local_24_required_3_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_3) 6 j = k9t5p4_local_24_required_3 6 j := by decide + +private theorem k9t5p4_local_24_required_3_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_3) 7 j = k9t5p4_local_24_required_3 7 j := by decide + +private theorem k9t5p4_local_24_required_3_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_3) 8 j = k9t5p4_local_24_required_3 8 j := by decide + +private theorem k9t5p4_local_24_required_3_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_3) 9 j = k9t5p4_local_24_required_3 9 j := by decide + +private theorem k9t5p4_local_24_required_3_eq : (requiredMatrix 9 k9t5p4_step_24_required_block_3) = k9t5p4_local_24_required_3 := by + funext i j + fin_cases i + + · exact k9t5p4_local_24_required_3_eq_row_0 j + + · exact k9t5p4_local_24_required_3_eq_row_1 j + + · exact k9t5p4_local_24_required_3_eq_row_2 j + + · exact k9t5p4_local_24_required_3_eq_row_3 j + + · exact k9t5p4_local_24_required_3_eq_row_4 j + + · exact k9t5p4_local_24_required_3_eq_row_5 j + + · exact k9t5p4_local_24_required_3_eq_row_6 j + + · exact k9t5p4_local_24_required_3_eq_row_7 j + + · exact k9t5p4_local_24_required_3_eq_row_8 j + + · exact k9t5p4_local_24_required_3_eq_row_9 j + +private theorem k9t5p4_local_24_path_3_0 : (⟨0, 6, [5, 4, 1, 2, 3, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_3_1 : (⟨0, 6, [5, 4, 1, 2, 9, 8, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_3_2 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_3_3 : (⟨0, 4, [5, 6, 7, 8, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_3_4 : (⟨0, 7, [9, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_3_5 : (⟨0, 8, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_3_6 : (⟨0, 8, [9, 1, 2, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_3_7 : (⟨0, 2, [9, 8, 7, 6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_3_8 : (⟨0, 3, [9, 8, 7, 6, 5, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_3_9 : (⟨0, 3, [9, 8, 7, 6, 5, 4, 1]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_3_10 : (⟨0, 2, [9, 8, 7, 6, 5, 4, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_path_3_11 : (⟨0, 1, [9, 8, 7, 6, 5, 4, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_paths_block_3 : ∀ p ∈ k9t5p4_step_24_required_block_3, p.Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by + simp only [k9t5p4_step_24_required_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_24_path_3_0, k9t5p4_local_24_path_3_1, k9t5p4_local_24_path_3_2, k9t5p4_local_24_path_3_3, k9t5p4_local_24_path_3_4, k9t5p4_local_24_path_3_5, k9t5p4_local_24_path_3_6, k9t5p4_local_24_path_3_7, k9t5p4_local_24_path_3_8, k9t5p4_local_24_path_3_9, k9t5p4_local_24_path_3_10, k9t5p4_local_24_path_3_11⟩ + +private def k9t5p4_local_24_required_4 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_24_required_4_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_4) 0 j = k9t5p4_local_24_required_4 0 j := by decide + +private theorem k9t5p4_local_24_required_4_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_4) 1 j = k9t5p4_local_24_required_4 1 j := by decide + +private theorem k9t5p4_local_24_required_4_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_4) 2 j = k9t5p4_local_24_required_4 2 j := by decide + +private theorem k9t5p4_local_24_required_4_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_4) 3 j = k9t5p4_local_24_required_4 3 j := by decide + +private theorem k9t5p4_local_24_required_4_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_4) 4 j = k9t5p4_local_24_required_4 4 j := by decide + +private theorem k9t5p4_local_24_required_4_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_4) 5 j = k9t5p4_local_24_required_4 5 j := by decide + +private theorem k9t5p4_local_24_required_4_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_4) 6 j = k9t5p4_local_24_required_4 6 j := by decide + +private theorem k9t5p4_local_24_required_4_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_4) 7 j = k9t5p4_local_24_required_4 7 j := by decide + +private theorem k9t5p4_local_24_required_4_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_4) 8 j = k9t5p4_local_24_required_4 8 j := by decide + +private theorem k9t5p4_local_24_required_4_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_24_required_block_4) 9 j = k9t5p4_local_24_required_4 9 j := by decide + +private theorem k9t5p4_local_24_required_4_eq : (requiredMatrix 9 k9t5p4_step_24_required_block_4) = k9t5p4_local_24_required_4 := by + funext i j + fin_cases i + + · exact k9t5p4_local_24_required_4_eq_row_0 j + + · exact k9t5p4_local_24_required_4_eq_row_1 j + + · exact k9t5p4_local_24_required_4_eq_row_2 j + + · exact k9t5p4_local_24_required_4_eq_row_3 j + + · exact k9t5p4_local_24_required_4_eq_row_4 j + + · exact k9t5p4_local_24_required_4_eq_row_5 j + + · exact k9t5p4_local_24_required_4_eq_row_6 j + + · exact k9t5p4_local_24_required_4_eq_row_7 j + + · exact k9t5p4_local_24_required_4_eq_row_8 j + + · exact k9t5p4_local_24_required_4_eq_row_9 j + +private theorem k9t5p4_local_24_path_4_0 : (⟨0, 1, [9, 8, 7, 6, 5, 4, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by decide + +private theorem k9t5p4_local_24_paths_block_4 : ∀ p ∈ k9t5p4_step_24_required_block_4, p.Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by + simp only [k9t5p4_step_24_required_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact k9t5p4_local_24_path_4_0 + +private theorem k9t5p4_local_24_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_24 a b ∪ (((((k9t5p4_local_24_required_0 a b ∪ k9t5p4_local_24_required_1 a b) ∪ k9t5p4_local_24_required_2 a b) ∪ k9t5p4_local_24_required_3 a b) ∪ k9t5p4_local_24_required_4 a b))) 0 j = k9t5p4_local_24 0 j := by decide + +private theorem k9t5p4_local_24_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_24 a b ∪ (((((k9t5p4_local_24_required_0 a b ∪ k9t5p4_local_24_required_1 a b) ∪ k9t5p4_local_24_required_2 a b) ∪ k9t5p4_local_24_required_3 a b) ∪ k9t5p4_local_24_required_4 a b))) 1 j = k9t5p4_local_24 1 j := by decide + +private theorem k9t5p4_local_24_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_24 a b ∪ (((((k9t5p4_local_24_required_0 a b ∪ k9t5p4_local_24_required_1 a b) ∪ k9t5p4_local_24_required_2 a b) ∪ k9t5p4_local_24_required_3 a b) ∪ k9t5p4_local_24_required_4 a b))) 2 j = k9t5p4_local_24 2 j := by decide + +private theorem k9t5p4_local_24_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_24 a b ∪ (((((k9t5p4_local_24_required_0 a b ∪ k9t5p4_local_24_required_1 a b) ∪ k9t5p4_local_24_required_2 a b) ∪ k9t5p4_local_24_required_3 a b) ∪ k9t5p4_local_24_required_4 a b))) 3 j = k9t5p4_local_24 3 j := by decide + +private theorem k9t5p4_local_24_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_24 a b ∪ (((((k9t5p4_local_24_required_0 a b ∪ k9t5p4_local_24_required_1 a b) ∪ k9t5p4_local_24_required_2 a b) ∪ k9t5p4_local_24_required_3 a b) ∪ k9t5p4_local_24_required_4 a b))) 4 j = k9t5p4_local_24 4 j := by decide + +private theorem k9t5p4_local_24_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_24 a b ∪ (((((k9t5p4_local_24_required_0 a b ∪ k9t5p4_local_24_required_1 a b) ∪ k9t5p4_local_24_required_2 a b) ∪ k9t5p4_local_24_required_3 a b) ∪ k9t5p4_local_24_required_4 a b))) 5 j = k9t5p4_local_24 5 j := by decide + +private theorem k9t5p4_local_24_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_24 a b ∪ (((((k9t5p4_local_24_required_0 a b ∪ k9t5p4_local_24_required_1 a b) ∪ k9t5p4_local_24_required_2 a b) ∪ k9t5p4_local_24_required_3 a b) ∪ k9t5p4_local_24_required_4 a b))) 6 j = k9t5p4_local_24 6 j := by decide + +private theorem k9t5p4_local_24_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_24 a b ∪ (((((k9t5p4_local_24_required_0 a b ∪ k9t5p4_local_24_required_1 a b) ∪ k9t5p4_local_24_required_2 a b) ∪ k9t5p4_local_24_required_3 a b) ∪ k9t5p4_local_24_required_4 a b))) 7 j = k9t5p4_local_24 7 j := by decide + +private theorem k9t5p4_local_24_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_24 a b ∪ (((((k9t5p4_local_24_required_0 a b ∪ k9t5p4_local_24_required_1 a b) ∪ k9t5p4_local_24_required_2 a b) ∪ k9t5p4_local_24_required_3 a b) ∪ k9t5p4_local_24_required_4 a b))) 8 j = k9t5p4_local_24 8 j := by decide + +private theorem k9t5p4_local_24_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_24 a b ∪ (((((k9t5p4_local_24_required_0 a b ∪ k9t5p4_local_24_required_1 a b) ∪ k9t5p4_local_24_required_2 a b) ∪ k9t5p4_local_24_required_3 a b) ∪ k9t5p4_local_24_required_4 a b))) 9 j = k9t5p4_local_24 9 j := by decide + +private theorem k9t5p4_local_24_merged_eq : (fun a b => freshMatrix k9t5p4_state_24 a b ∪ (((((k9t5p4_local_24_required_0 a b ∪ k9t5p4_local_24_required_1 a b) ∪ k9t5p4_local_24_required_2 a b) ∪ k9t5p4_local_24_required_3 a b) ∪ k9t5p4_local_24_required_4 a b))) = k9t5p4_local_24 := by + funext i j + fin_cases i + + · exact k9t5p4_local_24_merged_eq_row_0 j + + · exact k9t5p4_local_24_merged_eq_row_1 j + + · exact k9t5p4_local_24_merged_eq_row_2 j + + · exact k9t5p4_local_24_merged_eq_row_3 j + + · exact k9t5p4_local_24_merged_eq_row_4 j + + · exact k9t5p4_local_24_merged_eq_row_5 j + + · exact k9t5p4_local_24_merged_eq_row_6 j + + · exact k9t5p4_local_24_merged_eq_row_7 j + + · exact k9t5p4_local_24_merged_eq_row_8 j + + · exact k9t5p4_local_24_merged_eq_row_9 j + +private theorem k9t5p4_local_24_eq : (fun a b => freshMatrix k9t5p4_state_24 a b ∪ requiredMatrix 9 k9t5p4_step_24_data.required a b) = k9t5p4_local_24 := by + funext a b + change freshMatrix k9t5p4_state_24 a b ∪ requiredMatrix 9 (k9t5p4_step_24_required_block_0 ++ k9t5p4_step_24_required_block_1 ++ k9t5p4_step_24_required_block_2 ++ k9t5p4_step_24_required_block_3 ++ k9t5p4_step_24_required_block_4) a b = _ + simp only [requiredMatrix_append, k9t5p4_local_24_required_0_eq, k9t5p4_local_24_required_1_eq, k9t5p4_local_24_required_2_eq, k9t5p4_local_24_required_3_eq, k9t5p4_local_24_required_4_eq] + exact congrFun (congrFun k9t5p4_local_24_merged_eq a) b + +private theorem k9t5p4_local_24_paths : ∀ p ∈ k9t5p4_step_24_data.required, p.Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 := by + change ∀ p ∈ (k9t5p4_step_24_required_block_0 ++ k9t5p4_step_24_required_block_1 ++ k9t5p4_step_24_required_block_2 ++ k9t5p4_step_24_required_block_3 ++ k9t5p4_step_24_required_block_4), p.Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t5p4_local_24_paths_block_0, k9t5p4_local_24_paths_block_1⟩, k9t5p4_local_24_paths_block_2⟩, k9t5p4_local_24_paths_block_3⟩, k9t5p4_local_24_paths_block_4⟩ + +private theorem k9t5p4_local_24_bad : k9t5p4_step_24_data.bad.Check (freshGraph k9t5p4.graph k9t5p4_step_24_data.i k9t5p4_step_24_data.j) k9t5p4_local_24 9 5 := by decide + +private theorem k9t5p4_step_24_check : k9t5p4_step_24.Check k9t5p4.graph k9t5p4_state_24 9 5 := by + change k9t5p4_step_24_data.Check k9t5p4.graph k9t5p4_state_24 9 5 + refine ⟨by decide, k9t5p4_local_24_paths, ?_⟩ + rw [k9t5p4_local_24_eq] + exact k9t5p4_local_24_bad + +private theorem k9t5p4_update_24 : k9t5p4_step_24.apply k9t5p4_state_24 = k9t5p4_state_25 := by + have h : ∀ i j : Fin 9, k9t5p4_step_24.apply k9t5p4_state_24 i j = k9t5p4_state_25 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_26 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {1}, {0}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_25 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 0 6, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, ∅], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {1}, ∅, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_25_eq_row_0 : ∀ j : Fin 9, (fun a b => k9t5p4_state_25 a b ∪ requiredMatrix 9 k9t5p4_step_25_data.required a b) 0 j = k9t5p4_local_25 0 j := by decide + +private theorem k9t5p4_local_25_eq_row_1 : ∀ j : Fin 9, (fun a b => k9t5p4_state_25 a b ∪ requiredMatrix 9 k9t5p4_step_25_data.required a b) 1 j = k9t5p4_local_25 1 j := by decide + +private theorem k9t5p4_local_25_eq_row_2 : ∀ j : Fin 9, (fun a b => k9t5p4_state_25 a b ∪ requiredMatrix 9 k9t5p4_step_25_data.required a b) 2 j = k9t5p4_local_25 2 j := by decide + +private theorem k9t5p4_local_25_eq_row_3 : ∀ j : Fin 9, (fun a b => k9t5p4_state_25 a b ∪ requiredMatrix 9 k9t5p4_step_25_data.required a b) 3 j = k9t5p4_local_25 3 j := by decide + +private theorem k9t5p4_local_25_eq_row_4 : ∀ j : Fin 9, (fun a b => k9t5p4_state_25 a b ∪ requiredMatrix 9 k9t5p4_step_25_data.required a b) 4 j = k9t5p4_local_25 4 j := by decide + +private theorem k9t5p4_local_25_eq_row_5 : ∀ j : Fin 9, (fun a b => k9t5p4_state_25 a b ∪ requiredMatrix 9 k9t5p4_step_25_data.required a b) 5 j = k9t5p4_local_25 5 j := by decide + +private theorem k9t5p4_local_25_eq_row_6 : ∀ j : Fin 9, (fun a b => k9t5p4_state_25 a b ∪ requiredMatrix 9 k9t5p4_step_25_data.required a b) 6 j = k9t5p4_local_25 6 j := by decide + +private theorem k9t5p4_local_25_eq_row_7 : ∀ j : Fin 9, (fun a b => k9t5p4_state_25 a b ∪ requiredMatrix 9 k9t5p4_step_25_data.required a b) 7 j = k9t5p4_local_25 7 j := by decide + +private theorem k9t5p4_local_25_eq_row_8 : ∀ j : Fin 9, (fun a b => k9t5p4_state_25 a b ∪ requiredMatrix 9 k9t5p4_step_25_data.required a b) 8 j = k9t5p4_local_25 8 j := by decide + +private theorem k9t5p4_local_25_eq : (fun a b => k9t5p4_state_25 a b ∪ requiredMatrix 9 k9t5p4_step_25_data.required a b) = k9t5p4_local_25 := by + funext i j + fin_cases i + + · exact k9t5p4_local_25_eq_row_0 j + + · exact k9t5p4_local_25_eq_row_1 j + + · exact k9t5p4_local_25_eq_row_2 j + + · exact k9t5p4_local_25_eq_row_3 j + + · exact k9t5p4_local_25_eq_row_4 j + + · exact k9t5p4_local_25_eq_row_5 j + + · exact k9t5p4_local_25_eq_row_6 j + + · exact k9t5p4_local_25_eq_row_7 j + + · exact k9t5p4_local_25_eq_row_8 j + +private theorem k9t5p4_local_25_paths : ∀ p ∈ k9t5p4_step_25_data.required, p.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_25_data.i k9t5p4_step_25_data.j) 9 := by decide + +private theorem k9t5p4_local_25_bad : k9t5p4_step_25_data.bad.Check (addedEdgeGraph k9t5p4.graph k9t5p4_step_25_data.i k9t5p4_step_25_data.j) k9t5p4_local_25 9 5 := by decide + +private theorem k9t5p4_step_25_check : k9t5p4_step_25.Check k9t5p4.graph k9t5p4_state_25 9 5 := by + change k9t5p4_step_25_data.Check k9t5p4.graph k9t5p4_state_25 9 5 + refine ⟨k9t5p4_local_25_paths, ?_⟩ + rw [k9t5p4_local_25_eq] + exact k9t5p4_local_25_bad + +private theorem k9t5p4_update_25 : k9t5p4_step_25.apply k9t5p4_state_25 = k9t5p4_state_26 := by + have h : ∀ i j : Fin 9, k9t5p4_step_25.apply k9t5p4_state_25 i j = k9t5p4_state_26 i j := by decide + exact funext (fun i => funext (h i)) + +private def k9t5p4_state_27 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, ∅, ∅], + #[Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, {1}], + #[Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0, 1}], + #[Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {1}, {0, 1}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_26 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 4, {0}, {0}, ∅, Finset.Icc 0 4, ∅, {0}, Finset.Icc 0 4, ∅], + #[Finset.Icc 0 4, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 7, {1, 2, 3}], + #[{0}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[{0}, {1, 2, 5, 6, 7, 8}, {1, 2, 5, 6, 7, 8}, ∅, {1, 2, 3, 5, 6, 7, 8}, Finset.Icc 0 7, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 7, {1, 2, 3}], + #[∅, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, {1, 2, 3, 5, 6, 7, 8}, ∅, Finset.Icc 1 4, Finset.Icc 2 5, {0, 1, 3, 4, 5, 6}, {1, 2}, ∅], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 0 7, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, Finset.Icc 0 6, {1}], + #[∅, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 0 6, Finset.Icc 2 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 5, {0}], + #[{0}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 0 5, {0, 1, 3, 4, 5, 6}, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 2 5], + #[Finset.Icc 0 4, Finset.Icc 0 7, Finset.Icc 1 7, Finset.Icc 1 7, {1, 2}, Finset.Icc 0 6, Finset.Icc 0 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, {1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, {1}, {0}, Finset.Icc 2 5, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p4_local_26_required_0 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, Finset.Icc 0 4, ∅, ∅, ∅, {0, 1, 3}, ∅, ∅, ∅, ∅], + #[Finset.Icc 0 4, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1}, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 3}, ∅, ∅, ∅, ∅, ∅, ∅, {1}, {0}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, {0, 1}, ∅, ∅, ∅, {1}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, {0}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_26_required_0_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_0) 0 j = k9t5p4_local_26_required_0 0 j := by decide + +private theorem k9t5p4_local_26_required_0_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_0) 1 j = k9t5p4_local_26_required_0 1 j := by decide + +private theorem k9t5p4_local_26_required_0_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_0) 2 j = k9t5p4_local_26_required_0 2 j := by decide + +private theorem k9t5p4_local_26_required_0_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_0) 3 j = k9t5p4_local_26_required_0 3 j := by decide + +private theorem k9t5p4_local_26_required_0_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_0) 4 j = k9t5p4_local_26_required_0 4 j := by decide + +private theorem k9t5p4_local_26_required_0_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_0) 5 j = k9t5p4_local_26_required_0 5 j := by decide + +private theorem k9t5p4_local_26_required_0_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_0) 6 j = k9t5p4_local_26_required_0 6 j := by decide + +private theorem k9t5p4_local_26_required_0_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_0) 7 j = k9t5p4_local_26_required_0 7 j := by decide + +private theorem k9t5p4_local_26_required_0_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_0) 8 j = k9t5p4_local_26_required_0 8 j := by decide + +private theorem k9t5p4_local_26_required_0_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_0) 9 j = k9t5p4_local_26_required_0 9 j := by decide + +private theorem k9t5p4_local_26_required_0_eq : (requiredMatrix 9 k9t5p4_step_26_required_block_0) = k9t5p4_local_26_required_0 := by + funext i j + fin_cases i + + · exact k9t5p4_local_26_required_0_eq_row_0 j + + · exact k9t5p4_local_26_required_0_eq_row_1 j + + · exact k9t5p4_local_26_required_0_eq_row_2 j + + · exact k9t5p4_local_26_required_0_eq_row_3 j + + · exact k9t5p4_local_26_required_0_eq_row_4 j + + · exact k9t5p4_local_26_required_0_eq_row_5 j + + · exact k9t5p4_local_26_required_0_eq_row_6 j + + · exact k9t5p4_local_26_required_0_eq_row_7 j + + · exact k9t5p4_local_26_required_0_eq_row_8 j + + · exact k9t5p4_local_26_required_0_eq_row_9 j + +private theorem k9t5p4_local_26_path_0_0 : (⟨1, 0, [2, 3, 4, 5, 6, 7, 8, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_0_1 : (⟨1, 7, [2, 3, 4, 5, 6, 0, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_0_2 : (⟨1, 0, [2, 3, 4, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_0_3 : (⟨1, 7, [2, 4, 5, 6, 0, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_0_4 : (⟨1, 0, [9, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_0_5 : (⟨1, 0, [9, 2, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_0_6 : (⟨1, 0, [9, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_0_7 : (⟨5, 0, [4, 1, 2, 3, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_0_8 : (⟨5, 0, [4, 1, 2, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_0_9 : (⟨5, 7, [4, 1, 2, 3, 9, 0, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_0_10 : (⟨5, 8, [4, 1, 2, 3, 9, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_0_11 : (⟨5, 0, [4, 1, 2, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_paths_block_0 : ∀ p ∈ k9t5p4_step_26_required_block_0, p.Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by + simp only [k9t5p4_step_26_required_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_26_path_0_0, k9t5p4_local_26_path_0_1, k9t5p4_local_26_path_0_2, k9t5p4_local_26_path_0_3, k9t5p4_local_26_path_0_4, k9t5p4_local_26_path_0_5, k9t5p4_local_26_path_0_6, k9t5p4_local_26_path_0_7, k9t5p4_local_26_path_0_8, k9t5p4_local_26_path_0_9, k9t5p4_local_26_path_0_10, k9t5p4_local_26_path_0_11⟩ + +private def k9t5p4_local_26_required_1 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, {2, 4}, ∅, ∅, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {1, 2}, ∅], + #[{2, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, {0, 1, 2}, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 1, 2}, ∅, ∅, ∅, {1, 2}, {0, 1, 2}, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_26_required_1_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_1) 0 j = k9t5p4_local_26_required_1 0 j := by decide + +private theorem k9t5p4_local_26_required_1_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_1) 1 j = k9t5p4_local_26_required_1 1 j := by decide + +private theorem k9t5p4_local_26_required_1_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_1) 2 j = k9t5p4_local_26_required_1 2 j := by decide + +private theorem k9t5p4_local_26_required_1_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_1) 3 j = k9t5p4_local_26_required_1 3 j := by decide + +private theorem k9t5p4_local_26_required_1_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_1) 4 j = k9t5p4_local_26_required_1 4 j := by decide + +private theorem k9t5p4_local_26_required_1_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_1) 5 j = k9t5p4_local_26_required_1 5 j := by decide + +private theorem k9t5p4_local_26_required_1_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_1) 6 j = k9t5p4_local_26_required_1 6 j := by decide + +private theorem k9t5p4_local_26_required_1_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_1) 7 j = k9t5p4_local_26_required_1 7 j := by decide + +private theorem k9t5p4_local_26_required_1_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_1) 8 j = k9t5p4_local_26_required_1 8 j := by decide + +private theorem k9t5p4_local_26_required_1_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_1) 9 j = k9t5p4_local_26_required_1 9 j := by decide + +private theorem k9t5p4_local_26_required_1_eq : (requiredMatrix 9 k9t5p4_step_26_required_block_1) = k9t5p4_local_26_required_1 := by + funext i j + fin_cases i + + · exact k9t5p4_local_26_required_1_eq_row_0 j + + · exact k9t5p4_local_26_required_1_eq_row_1 j + + · exact k9t5p4_local_26_required_1_eq_row_2 j + + · exact k9t5p4_local_26_required_1_eq_row_3 j + + · exact k9t5p4_local_26_required_1_eq_row_4 j + + · exact k9t5p4_local_26_required_1_eq_row_5 j + + · exact k9t5p4_local_26_required_1_eq_row_6 j + + · exact k9t5p4_local_26_required_1_eq_row_7 j + + · exact k9t5p4_local_26_required_1_eq_row_8 j + + · exact k9t5p4_local_26_required_1_eq_row_9 j + +private theorem k9t5p4_local_26_path_1_0 : (⟨5, 0, [4, 1, 2, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_1_1 : (⟨5, 8, [4, 1, 2, 9, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_1_2 : (⟨5, 0, [4, 1, 9, 8, 7, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_1_3 : (⟨5, 8, [4, 1, 9, 0, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_1_4 : (⟨8, 0, [7, 6, 5, 4, 1, 2, 3, 9]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_1_5 : (⟨8, 4, [7, 6, 0, 9, 1, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_1_6 : (⟨8, 5, [7, 6, 0, 9, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_1_7 : (⟨8, 4, [7, 6, 0, 9, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_1_8 : (⟨8, 5, [7, 6, 0, 9, 1, 2, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_1_9 : (⟨8, 5, [7, 6, 0, 9, 1, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_1_10 : (⟨8, 0, [9, 1, 2, 3, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_1_11 : (⟨8, 0, [9, 1, 2, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_paths_block_1 : ∀ p ∈ k9t5p4_step_26_required_block_1, p.Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by + simp only [k9t5p4_step_26_required_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_26_path_1_0, k9t5p4_local_26_path_1_1, k9t5p4_local_26_path_1_2, k9t5p4_local_26_path_1_3, k9t5p4_local_26_path_1_4, k9t5p4_local_26_path_1_5, k9t5p4_local_26_path_1_6, k9t5p4_local_26_path_1_7, k9t5p4_local_26_path_1_8, k9t5p4_local_26_path_1_9, k9t5p4_local_26_path_1_10, k9t5p4_local_26_path_1_11⟩ + +private def k9t5p4_local_26_required_2 : ForbiddenMatrix 10 := + fun i j => ((#[#[∅, {0}, {0}, {0}, ∅, {0}, ∅, {0}, {0, 3, 4}, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[{0, 3, 4}, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p4_local_26_required_2_eq_row_0 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_2) 0 j = k9t5p4_local_26_required_2 0 j := by decide + +private theorem k9t5p4_local_26_required_2_eq_row_1 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_2) 1 j = k9t5p4_local_26_required_2 1 j := by decide + +private theorem k9t5p4_local_26_required_2_eq_row_2 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_2) 2 j = k9t5p4_local_26_required_2 2 j := by decide + +private theorem k9t5p4_local_26_required_2_eq_row_3 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_2) 3 j = k9t5p4_local_26_required_2 3 j := by decide + +private theorem k9t5p4_local_26_required_2_eq_row_4 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_2) 4 j = k9t5p4_local_26_required_2 4 j := by decide + +private theorem k9t5p4_local_26_required_2_eq_row_5 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_2) 5 j = k9t5p4_local_26_required_2 5 j := by decide + +private theorem k9t5p4_local_26_required_2_eq_row_6 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_2) 6 j = k9t5p4_local_26_required_2 6 j := by decide + +private theorem k9t5p4_local_26_required_2_eq_row_7 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_2) 7 j = k9t5p4_local_26_required_2 7 j := by decide + +private theorem k9t5p4_local_26_required_2_eq_row_8 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_2) 8 j = k9t5p4_local_26_required_2 8 j := by decide + +private theorem k9t5p4_local_26_required_2_eq_row_9 : ∀ j : Fin 10, (requiredMatrix 9 k9t5p4_step_26_required_block_2) 9 j = k9t5p4_local_26_required_2 9 j := by decide + +private theorem k9t5p4_local_26_required_2_eq : (requiredMatrix 9 k9t5p4_step_26_required_block_2) = k9t5p4_local_26_required_2 := by + funext i j + fin_cases i + + · exact k9t5p4_local_26_required_2_eq_row_0 j + + · exact k9t5p4_local_26_required_2_eq_row_1 j + + · exact k9t5p4_local_26_required_2_eq_row_2 j + + · exact k9t5p4_local_26_required_2_eq_row_3 j + + · exact k9t5p4_local_26_required_2_eq_row_4 j + + · exact k9t5p4_local_26_required_2_eq_row_5 j + + · exact k9t5p4_local_26_required_2_eq_row_6 j + + · exact k9t5p4_local_26_required_2_eq_row_7 j + + · exact k9t5p4_local_26_required_2_eq_row_8 j + + · exact k9t5p4_local_26_required_2_eq_row_9 j + +private theorem k9t5p4_local_26_path_2_0 : (⟨8, 0, [9, 1, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_2_1 : (⟨8, 0, [9, 4, 5, 6]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_2_2 : (⟨0, 7, [6, 5, 4, 1, 2, 3, 9, 8]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_2_3 : (⟨0, 5, [6, 7, 8, 9, 1, 2, 3, 4]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_2_4 : (⟨0, 8, [9, 1, 2, 3, 4, 5, 6, 7]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_2_5 : (⟨0, 3, [9, 8, 7, 6, 5, 4, 1, 2]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_2_6 : (⟨0, 2, [9, 8, 7, 6, 5, 4, 1, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_path_2_7 : (⟨0, 1, [9, 8, 7, 6, 5, 4, 2, 3]⟩ : RequiredPathData (Fin 10)).Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by decide + +private theorem k9t5p4_local_26_paths_block_2 : ∀ p ∈ k9t5p4_step_26_required_block_2, p.Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by + simp only [k9t5p4_step_26_required_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_local_26_path_2_0, k9t5p4_local_26_path_2_1, k9t5p4_local_26_path_2_2, k9t5p4_local_26_path_2_3, k9t5p4_local_26_path_2_4, k9t5p4_local_26_path_2_5, k9t5p4_local_26_path_2_6, k9t5p4_local_26_path_2_7⟩ + +private theorem k9t5p4_local_26_merged_eq_row_0 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_26 a b ∪ (((k9t5p4_local_26_required_0 a b ∪ k9t5p4_local_26_required_1 a b) ∪ k9t5p4_local_26_required_2 a b))) 0 j = k9t5p4_local_26 0 j := by decide + +private theorem k9t5p4_local_26_merged_eq_row_1 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_26 a b ∪ (((k9t5p4_local_26_required_0 a b ∪ k9t5p4_local_26_required_1 a b) ∪ k9t5p4_local_26_required_2 a b))) 1 j = k9t5p4_local_26 1 j := by decide + +private theorem k9t5p4_local_26_merged_eq_row_2 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_26 a b ∪ (((k9t5p4_local_26_required_0 a b ∪ k9t5p4_local_26_required_1 a b) ∪ k9t5p4_local_26_required_2 a b))) 2 j = k9t5p4_local_26 2 j := by decide + +private theorem k9t5p4_local_26_merged_eq_row_3 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_26 a b ∪ (((k9t5p4_local_26_required_0 a b ∪ k9t5p4_local_26_required_1 a b) ∪ k9t5p4_local_26_required_2 a b))) 3 j = k9t5p4_local_26 3 j := by decide + +private theorem k9t5p4_local_26_merged_eq_row_4 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_26 a b ∪ (((k9t5p4_local_26_required_0 a b ∪ k9t5p4_local_26_required_1 a b) ∪ k9t5p4_local_26_required_2 a b))) 4 j = k9t5p4_local_26 4 j := by decide + +private theorem k9t5p4_local_26_merged_eq_row_5 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_26 a b ∪ (((k9t5p4_local_26_required_0 a b ∪ k9t5p4_local_26_required_1 a b) ∪ k9t5p4_local_26_required_2 a b))) 5 j = k9t5p4_local_26 5 j := by decide + +private theorem k9t5p4_local_26_merged_eq_row_6 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_26 a b ∪ (((k9t5p4_local_26_required_0 a b ∪ k9t5p4_local_26_required_1 a b) ∪ k9t5p4_local_26_required_2 a b))) 6 j = k9t5p4_local_26 6 j := by decide + +private theorem k9t5p4_local_26_merged_eq_row_7 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_26 a b ∪ (((k9t5p4_local_26_required_0 a b ∪ k9t5p4_local_26_required_1 a b) ∪ k9t5p4_local_26_required_2 a b))) 7 j = k9t5p4_local_26 7 j := by decide + +private theorem k9t5p4_local_26_merged_eq_row_8 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_26 a b ∪ (((k9t5p4_local_26_required_0 a b ∪ k9t5p4_local_26_required_1 a b) ∪ k9t5p4_local_26_required_2 a b))) 8 j = k9t5p4_local_26 8 j := by decide + +private theorem k9t5p4_local_26_merged_eq_row_9 : ∀ j : Fin 10, (fun a b => freshMatrix k9t5p4_state_26 a b ∪ (((k9t5p4_local_26_required_0 a b ∪ k9t5p4_local_26_required_1 a b) ∪ k9t5p4_local_26_required_2 a b))) 9 j = k9t5p4_local_26 9 j := by decide + +private theorem k9t5p4_local_26_merged_eq : (fun a b => freshMatrix k9t5p4_state_26 a b ∪ (((k9t5p4_local_26_required_0 a b ∪ k9t5p4_local_26_required_1 a b) ∪ k9t5p4_local_26_required_2 a b))) = k9t5p4_local_26 := by + funext i j + fin_cases i + + · exact k9t5p4_local_26_merged_eq_row_0 j + + · exact k9t5p4_local_26_merged_eq_row_1 j + + · exact k9t5p4_local_26_merged_eq_row_2 j + + · exact k9t5p4_local_26_merged_eq_row_3 j + + · exact k9t5p4_local_26_merged_eq_row_4 j + + · exact k9t5p4_local_26_merged_eq_row_5 j + + · exact k9t5p4_local_26_merged_eq_row_6 j + + · exact k9t5p4_local_26_merged_eq_row_7 j + + · exact k9t5p4_local_26_merged_eq_row_8 j + + · exact k9t5p4_local_26_merged_eq_row_9 j + +private theorem k9t5p4_local_26_eq : (fun a b => freshMatrix k9t5p4_state_26 a b ∪ requiredMatrix 9 k9t5p4_step_26_data.required a b) = k9t5p4_local_26 := by + funext a b + change freshMatrix k9t5p4_state_26 a b ∪ requiredMatrix 9 (k9t5p4_step_26_required_block_0 ++ k9t5p4_step_26_required_block_1 ++ k9t5p4_step_26_required_block_2) a b = _ + simp only [requiredMatrix_append, k9t5p4_local_26_required_0_eq, k9t5p4_local_26_required_1_eq, k9t5p4_local_26_required_2_eq] + exact congrFun (congrFun k9t5p4_local_26_merged_eq a) b + +private theorem k9t5p4_local_26_paths : ∀ p ∈ k9t5p4_step_26_data.required, p.Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 := by + change ∀ p ∈ (k9t5p4_step_26_required_block_0 ++ k9t5p4_step_26_required_block_1 ++ k9t5p4_step_26_required_block_2), p.Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) 9 + simp only [List.forall_mem_append] + exact ⟨⟨k9t5p4_local_26_paths_block_0, k9t5p4_local_26_paths_block_1⟩, k9t5p4_local_26_paths_block_2⟩ + +private theorem k9t5p4_local_26_bad : k9t5p4_step_26_data.bad.Check (freshGraph k9t5p4.graph k9t5p4_step_26_data.i k9t5p4_step_26_data.j) k9t5p4_local_26 9 5 := by decide + +private theorem k9t5p4_step_26_check : k9t5p4_step_26.Check k9t5p4.graph k9t5p4_state_26 9 5 := by + change k9t5p4_step_26_data.Check k9t5p4.graph k9t5p4_state_26 9 5 + refine ⟨by decide, k9t5p4_local_26_paths, ?_⟩ + rw [k9t5p4_local_26_eq] + exact k9t5p4_local_26_bad + +private theorem k9t5p4_update_26 : k9t5p4_step_26.apply k9t5p4_state_26 = k9t5p4_state_27 := by + have h : ∀ i j : Fin 9, k9t5p4_step_26.apply k9t5p4_state_26 i j = k9t5p4_state_27 i j := by decide + exact funext (fun i => funext (h i)) + +private theorem k9t5p4_closure_27 : ClosureCheck k9t5p4.graph k9t5p4_state_27 9 5 [] := by trivial + +private theorem k9t5p4_closure_26 : ClosureCheck k9t5p4.graph k9t5p4_state_26 9 5 [k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_26_check + · rw [k9t5p4_update_26] + exact k9t5p4_closure_27 + +private theorem k9t5p4_closure_25 : ClosureCheck k9t5p4.graph k9t5p4_state_25 9 5 [k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_25_check + · rw [k9t5p4_update_25] + exact k9t5p4_closure_26 + +private theorem k9t5p4_closure_24 : ClosureCheck k9t5p4.graph k9t5p4_state_24 9 5 [k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_24_check + · rw [k9t5p4_update_24] + exact k9t5p4_closure_25 + +private theorem k9t5p4_closure_23 : ClosureCheck k9t5p4.graph k9t5p4_state_23 9 5 [k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_23_check + · rw [k9t5p4_update_23] + exact k9t5p4_closure_24 + +private theorem k9t5p4_closure_22 : ClosureCheck k9t5p4.graph k9t5p4_state_22 9 5 [k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_22_check + · rw [k9t5p4_update_22] + exact k9t5p4_closure_23 + +private theorem k9t5p4_closure_21 : ClosureCheck k9t5p4.graph k9t5p4_state_21 9 5 [k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_21_check + · rw [k9t5p4_update_21] + exact k9t5p4_closure_22 + +private theorem k9t5p4_closure_20 : ClosureCheck k9t5p4.graph k9t5p4_state_20 9 5 [k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_20_check + · rw [k9t5p4_update_20] + exact k9t5p4_closure_21 + +private theorem k9t5p4_closure_19 : ClosureCheck k9t5p4.graph k9t5p4_state_19 9 5 [k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_19_check + · rw [k9t5p4_update_19] + exact k9t5p4_closure_20 + +private theorem k9t5p4_closure_18 : ClosureCheck k9t5p4.graph k9t5p4_state_18 9 5 [k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_18_check + · rw [k9t5p4_update_18] + exact k9t5p4_closure_19 + +private theorem k9t5p4_closure_17 : ClosureCheck k9t5p4.graph k9t5p4_state_17 9 5 [k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_17_check + · rw [k9t5p4_update_17] + exact k9t5p4_closure_18 + +private theorem k9t5p4_closure_16 : ClosureCheck k9t5p4.graph k9t5p4_state_16 9 5 [k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_16_check + · rw [k9t5p4_update_16] + exact k9t5p4_closure_17 + +private theorem k9t5p4_closure_15 : ClosureCheck k9t5p4.graph k9t5p4_state_15 9 5 [k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_15_check + · rw [k9t5p4_update_15] + exact k9t5p4_closure_16 + +private theorem k9t5p4_closure_14 : ClosureCheck k9t5p4.graph k9t5p4_state_14 9 5 [k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_14_check + · rw [k9t5p4_update_14] + exact k9t5p4_closure_15 + +private theorem k9t5p4_closure_13 : ClosureCheck k9t5p4.graph k9t5p4_state_13 9 5 [k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_13_check + · rw [k9t5p4_update_13] + exact k9t5p4_closure_14 + +private theorem k9t5p4_closure_12 : ClosureCheck k9t5p4.graph k9t5p4_state_12 9 5 [k9t5p4_step_12, k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_12_check + · rw [k9t5p4_update_12] + exact k9t5p4_closure_13 + +private theorem k9t5p4_closure_11 : ClosureCheck k9t5p4.graph k9t5p4_state_11 9 5 [k9t5p4_step_11, k9t5p4_step_12, k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_11_check + · rw [k9t5p4_update_11] + exact k9t5p4_closure_12 + +private theorem k9t5p4_closure_10 : ClosureCheck k9t5p4.graph k9t5p4_state_10 9 5 [k9t5p4_step_10, k9t5p4_step_11, k9t5p4_step_12, k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_10_check + · rw [k9t5p4_update_10] + exact k9t5p4_closure_11 + +private theorem k9t5p4_closure_9 : ClosureCheck k9t5p4.graph k9t5p4_state_9 9 5 [k9t5p4_step_9, k9t5p4_step_10, k9t5p4_step_11, k9t5p4_step_12, k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_9_check + · rw [k9t5p4_update_9] + exact k9t5p4_closure_10 + +private theorem k9t5p4_closure_8 : ClosureCheck k9t5p4.graph k9t5p4_state_8 9 5 [k9t5p4_step_8, k9t5p4_step_9, k9t5p4_step_10, k9t5p4_step_11, k9t5p4_step_12, k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_8_check + · rw [k9t5p4_update_8] + exact k9t5p4_closure_9 + +private theorem k9t5p4_closure_7 : ClosureCheck k9t5p4.graph k9t5p4_state_7 9 5 [k9t5p4_step_7, k9t5p4_step_8, k9t5p4_step_9, k9t5p4_step_10, k9t5p4_step_11, k9t5p4_step_12, k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_7_check + · rw [k9t5p4_update_7] + exact k9t5p4_closure_8 + +private theorem k9t5p4_closure_6 : ClosureCheck k9t5p4.graph k9t5p4_state_6 9 5 [k9t5p4_step_6, k9t5p4_step_7, k9t5p4_step_8, k9t5p4_step_9, k9t5p4_step_10, k9t5p4_step_11, k9t5p4_step_12, k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_6_check + · rw [k9t5p4_update_6] + exact k9t5p4_closure_7 + +private theorem k9t5p4_closure_5 : ClosureCheck k9t5p4.graph k9t5p4_state_5 9 5 [k9t5p4_step_5, k9t5p4_step_6, k9t5p4_step_7, k9t5p4_step_8, k9t5p4_step_9, k9t5p4_step_10, k9t5p4_step_11, k9t5p4_step_12, k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_5_check + · rw [k9t5p4_update_5] + exact k9t5p4_closure_6 + +private theorem k9t5p4_closure_4 : ClosureCheck k9t5p4.graph k9t5p4_state_4 9 5 [k9t5p4_step_4, k9t5p4_step_5, k9t5p4_step_6, k9t5p4_step_7, k9t5p4_step_8, k9t5p4_step_9, k9t5p4_step_10, k9t5p4_step_11, k9t5p4_step_12, k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_4_check + · rw [k9t5p4_update_4] + exact k9t5p4_closure_5 + +private theorem k9t5p4_closure_3 : ClosureCheck k9t5p4.graph k9t5p4_state_3 9 5 [k9t5p4_step_3, k9t5p4_step_4, k9t5p4_step_5, k9t5p4_step_6, k9t5p4_step_7, k9t5p4_step_8, k9t5p4_step_9, k9t5p4_step_10, k9t5p4_step_11, k9t5p4_step_12, k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_3_check + · rw [k9t5p4_update_3] + exact k9t5p4_closure_4 + +private theorem k9t5p4_closure_2 : ClosureCheck k9t5p4.graph k9t5p4_state_2 9 5 [k9t5p4_step_2, k9t5p4_step_3, k9t5p4_step_4, k9t5p4_step_5, k9t5p4_step_6, k9t5p4_step_7, k9t5p4_step_8, k9t5p4_step_9, k9t5p4_step_10, k9t5p4_step_11, k9t5p4_step_12, k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_2_check + · rw [k9t5p4_update_2] + exact k9t5p4_closure_3 + +private theorem k9t5p4_closure_1 : ClosureCheck k9t5p4.graph k9t5p4_state_1 9 5 [k9t5p4_step_1, k9t5p4_step_2, k9t5p4_step_3, k9t5p4_step_4, k9t5p4_step_5, k9t5p4_step_6, k9t5p4_step_7, k9t5p4_step_8, k9t5p4_step_9, k9t5p4_step_10, k9t5p4_step_11, k9t5p4_step_12, k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_1_check + · rw [k9t5p4_update_1] + exact k9t5p4_closure_2 + +private theorem k9t5p4_closure_0 : ClosureCheck k9t5p4.graph k9t5p4_state_0 9 5 [k9t5p4_step_0, k9t5p4_step_1, k9t5p4_step_2, k9t5p4_step_3, k9t5p4_step_4, k9t5p4_step_5, k9t5p4_step_6, k9t5p4_step_7, k9t5p4_step_8, k9t5p4_step_9, k9t5p4_step_10, k9t5p4_step_11, k9t5p4_step_12, k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] := by + constructor + · exact k9t5p4_step_0_check + · rw [k9t5p4_update_0] + exact k9t5p4_closure_1 + +private theorem k9t5p4_matrix_eq : k9t5p4.matrix 9 = k9t5p4_state_27 := by + change closureMatrix (k9t5p4.initialMatrix 9) _ = _ + rw [k9t5p4_initial_eq] + change closureMatrix k9t5p4_state_0 [k9t5p4_step_0, k9t5p4_step_1, k9t5p4_step_2, k9t5p4_step_3, k9t5p4_step_4, k9t5p4_step_5, k9t5p4_step_6, k9t5p4_step_7, k9t5p4_step_8, k9t5p4_step_9, k9t5p4_step_10, k9t5p4_step_11, k9t5p4_step_12, k9t5p4_step_13, k9t5p4_step_14, k9t5p4_step_15, k9t5p4_step_16, k9t5p4_step_17, k9t5p4_step_18, k9t5p4_step_19, k9t5p4_step_20, k9t5p4_step_21, k9t5p4_step_22, k9t5p4_step_23, k9t5p4_step_24, k9t5p4_step_25, k9t5p4_step_26] = _ + simp only [closureMatrix] + rw [k9t5p4_update_0, k9t5p4_update_1, k9t5p4_update_2, k9t5p4_update_3, k9t5p4_update_4, k9t5p4_update_5, k9t5p4_update_6, k9t5p4_update_7, k9t5p4_update_8, k9t5p4_update_9, k9t5p4_update_10, k9t5p4_update_11, k9t5p4_update_12, k9t5p4_update_13, k9t5p4_update_14, k9t5p4_update_15, k9t5p4_update_16, k9t5p4_update_17, k9t5p4_update_18, k9t5p4_update_19, k9t5p4_update_20, k9t5p4_update_21, k9t5p4_update_22, k9t5p4_update_23, k9t5p4_update_24, k9t5p4_update_25, k9t5p4_update_26] + +private theorem k9t5p4_part_0 : k9t5p4.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p4_part_1 : k9t5p4.chains.map List.length = ([[], [], [], [4]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p4_part_2 : k9t5p4.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p4.clique))) = ([[], [], [], [4]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p4_templates_item_0 : (⟨0, 1, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6, 7, 8]], [], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_2 : (⟨0, 2, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_3 : (⟨0, 2, [[3, 4, 5, 6, 7, 8]], [], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_4 : (⟨0, 3, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_5 : (⟨0, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_6 : (⟨0, 4, [], [], [3], 4, 7⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_7 : (⟨0, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_8 : (⟨0, 5, [], [], [4, 3], 3, 6⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_9 : (⟨0, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_10 : (⟨0, 6, [], [], [5, 4, 3], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_11 : (⟨0, 6, [], [], [7, 8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_12 : (⟨0, 7, [], [], [6, 5, 4, 3], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_13 : (⟨0, 7, [], [], [8], 4, 7⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_14 : (⟨0, 8, [], [], [7, 6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_15 : (⟨1, 2, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_16 : (⟨1, 2, [[3, 4, 5, 6, 7, 8]], [], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_17 : (⟨1, 3, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_18 : (⟨1, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_19 : (⟨1, 4, [], [], [3], 4, 7⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_20 : (⟨1, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_21 : (⟨1, 5, [], [], [4, 3], 3, 6⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_22 : (⟨1, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_23 : (⟨1, 6, [], [], [5, 4, 3], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_24 : (⟨1, 7, [], [], [6, 5, 4, 3], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_25 : (⟨1, 7, [], [], [8], 4, 7⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_26 : (⟨1, 8, [], [], [7, 6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_27 : (⟨2, 3, [], [], [], 5, 8⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_28 : (⟨2, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_29 : (⟨2, 4, [], [], [3], 4, 7⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_30 : (⟨2, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_31 : (⟨2, 5, [], [], [4, 3], 3, 6⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_32 : (⟨2, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_33 : (⟨2, 6, [], [], [5, 4, 3], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_34 : (⟨2, 7, [], [], [6, 5, 4, 3], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_35 : (⟨2, 7, [], [], [8], 4, 7⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_36 : (⟨2, 8, [], [], [7, 6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_37 : (⟨3, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_38 : (⟨3, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_39 : (⟨3, 6, [], [], [7, 8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_40 : (⟨4, 5, [], [3], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_41 : (⟨4, 6, [], [3], [7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_42 : (⟨4, 7, [], [3], [8], 3, 6⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_43 : (⟨5, 6, [], [3, 4], [7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_44 : (⟨5, 7, [], [3, 4], [8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_45 : (⟨6, 7, [], [3, 4, 5], [8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_46 : (⟨6, 8, [], [3, 4, 5], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_item_47 : (⟨7, 8, [], [3, 4, 5, 6], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p4_templates_block_0_check : ∀ T ∈ k9t5p4_templates_block_0, T.Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p4_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_templates_item_0, k9t5p4_templates_item_1, k9t5p4_templates_item_2, k9t5p4_templates_item_3, k9t5p4_templates_item_4, k9t5p4_templates_item_5, k9t5p4_templates_item_6, k9t5p4_templates_item_7, k9t5p4_templates_item_8, k9t5p4_templates_item_9, k9t5p4_templates_item_10, k9t5p4_templates_item_11⟩ + +private theorem k9t5p4_templates_block_1_check : ∀ T ∈ k9t5p4_templates_block_1, T.Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p4_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_templates_item_12, k9t5p4_templates_item_13, k9t5p4_templates_item_14, k9t5p4_templates_item_15, k9t5p4_templates_item_16, k9t5p4_templates_item_17, k9t5p4_templates_item_18, k9t5p4_templates_item_19, k9t5p4_templates_item_20, k9t5p4_templates_item_21, k9t5p4_templates_item_22, k9t5p4_templates_item_23⟩ + +private theorem k9t5p4_templates_block_2_check : ∀ T ∈ k9t5p4_templates_block_2, T.Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p4_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_templates_item_24, k9t5p4_templates_item_25, k9t5p4_templates_item_26, k9t5p4_templates_item_27, k9t5p4_templates_item_28, k9t5p4_templates_item_29, k9t5p4_templates_item_30, k9t5p4_templates_item_31, k9t5p4_templates_item_32, k9t5p4_templates_item_33, k9t5p4_templates_item_34, k9t5p4_templates_item_35⟩ + +private theorem k9t5p4_templates_block_3_check : ∀ T ∈ k9t5p4_templates_block_3, T.Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p4_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p4_templates_item_36, k9t5p4_templates_item_37, k9t5p4_templates_item_38, k9t5p4_templates_item_39, k9t5p4_templates_item_40, k9t5p4_templates_item_41, k9t5p4_templates_item_42, k9t5p4_templates_item_43, k9t5p4_templates_item_44, k9t5p4_templates_item_45, k9t5p4_templates_item_46, k9t5p4_templates_item_47⟩ + +private theorem k9t5p4_part_3 : ∀ T ∈ k9t5p4.templates, T.Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t5p4_templates_block_0 ++ k9t5p4_templates_block_1 ++ k9t5p4_templates_block_2 ++ k9t5p4_templates_block_3), T.Check k9t5p4.graph k9t5p4.clique 9 (patternAmount ([[], [], [], [4]] : List (List ℕ))) (([[], [], [], [4]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t5p4_templates_block_0_check, k9t5p4_templates_block_1_check⟩, k9t5p4_templates_block_2_check⟩, k9t5p4_templates_block_3_check⟩ + +private theorem k9t5p4_part_4 : ∀ p ∈ k9t5p4.required, p.Check k9t5p4.graph 9 := by decide + +private theorem k9t5p4_part_5 : ClosureCheck k9t5p4.graph (k9t5p4.initialMatrix 9) 9 5 k9t5p4.closure := by + rw [k9t5p4_initial_eq] + exact k9t5p4_closure_0 + +private theorem k9t5p4_part_6 : k9t5p4.bad.Check k9t5p4.graph (k9t5p4.matrix 9) 9 5 := by + rw [k9t5p4_matrix_eq] + decide + +theorem k9t5p4_check : k9t5p4.Check 9 5 [[], [], [], [4]] := + ⟨k9t5p4_part_0, k9t5p4_part_1, k9t5p4_part_2, k9t5p4_part_3, k9t5p4_part_4, k9t5p4_part_5, k9t5p4_part_6⟩ +def k9t5p5 : LayoutCertificate 7 where + chains := [[0], [1], [2, 3, 4, 5, 6]] + clique := {0, 1, 2, 4, 6} + templates := [⟨0, 1, [], [], [], 2, 8⟩, + ⟨0, 1, [[2, 3, 4, 5, 6]], [], [], 1, 3⟩, + ⟨0, 2, [], [], [], 2, 8⟩, + ⟨0, 2, [], [], [3, 4, 5, 6], 1, 4⟩, + ⟨0, 3, [], [], [2], 1, 7⟩, + ⟨0, 5, [], [], [4], 1, 7⟩, + ⟨0, 6, [], [], [], 2, 8⟩, + ⟨0, 6, [], [], [5, 4, 3, 2], 1, 4⟩, + ⟨1, 2, [], [], [], 2, 8⟩, + ⟨1, 2, [], [], [3, 4, 5, 6], 1, 4⟩, + ⟨1, 3, [], [], [2], 1, 7⟩, + ⟨1, 5, [], [], [4], 1, 7⟩, + ⟨1, 6, [], [], [], 2, 8⟩, + ⟨1, 6, [], [], [5, 4, 3, 2], 1, 4⟩, + ⟨2, 3, [], [], [4], 1, 7⟩, + ⟨2, 5, [], [], [4], 1, 7⟩, + ⟨3, 4, [], [2], [], 1, 7⟩, + ⟨3, 5, [], [2], [4], 1, 6⟩, + ⟨3, 6, [], [2], [], 1, 7⟩, + ⟨4, 5, [], [], [6], 1, 7⟩, + ⟨5, 6, [], [4], [], 1, 7⟩] + required := [] + closure := [] + bad := ⟨none, {(3, 3), (5, 3), (0, 3), (1, 3)}⟩ + + +private def k9t5p5_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p5_initial_eq_row_0 : ∀ j : Fin 7, (k9t5p5.initialMatrix 9) 0 j = k9t5p5_state_0 0 j := by decide + +private theorem k9t5p5_initial_eq_row_1 : ∀ j : Fin 7, (k9t5p5.initialMatrix 9) 1 j = k9t5p5_state_0 1 j := by decide + +private theorem k9t5p5_initial_eq_row_2 : ∀ j : Fin 7, (k9t5p5.initialMatrix 9) 2 j = k9t5p5_state_0 2 j := by decide + +private theorem k9t5p5_initial_eq_row_3 : ∀ j : Fin 7, (k9t5p5.initialMatrix 9) 3 j = k9t5p5_state_0 3 j := by decide + +private theorem k9t5p5_initial_eq_row_4 : ∀ j : Fin 7, (k9t5p5.initialMatrix 9) 4 j = k9t5p5_state_0 4 j := by decide + +private theorem k9t5p5_initial_eq_row_5 : ∀ j : Fin 7, (k9t5p5.initialMatrix 9) 5 j = k9t5p5_state_0 5 j := by decide + +private theorem k9t5p5_initial_eq_row_6 : ∀ j : Fin 7, (k9t5p5.initialMatrix 9) 6 j = k9t5p5_state_0 6 j := by decide + +private theorem k9t5p5_initial_eq : (k9t5p5.initialMatrix 9) = k9t5p5_state_0 := by + funext i j + fin_cases i + + · exact k9t5p5_initial_eq_row_0 j + + · exact k9t5p5_initial_eq_row_1 j + + · exact k9t5p5_initial_eq_row_2 j + + · exact k9t5p5_initial_eq_row_3 j + + · exact k9t5p5_initial_eq_row_4 j + + · exact k9t5p5_initial_eq_row_5 j + + · exact k9t5p5_initial_eq_row_6 j + +private theorem k9t5p5_closure_0 : ClosureCheck k9t5p5.graph k9t5p5_state_0 9 5 [] := by trivial + +private theorem k9t5p5_matrix_eq : k9t5p5.matrix 9 = k9t5p5_state_0 := by + change closureMatrix (k9t5p5.initialMatrix 9) _ = _ + rw [k9t5p5_initial_eq] + change closureMatrix k9t5p5_state_0 [] = _ + rfl + +private theorem k9t5p5_part_0 : k9t5p5.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p5_part_1 : k9t5p5.chains.map List.length = ([[], [], [1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p5_part_2 : k9t5p5.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p5.clique))) = ([[], [], [1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p5_templates_item_0 : (⟨0, 1, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_1 : (⟨0, 1, [[2, 3, 4, 5, 6]], [], [], 1, 3⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_2 : (⟨0, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_3 : (⟨0, 2, [], [], [3, 4, 5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_4 : (⟨0, 3, [], [], [2], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_5 : (⟨0, 5, [], [], [4], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_6 : (⟨0, 6, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_7 : (⟨0, 6, [], [], [5, 4, 3, 2], 1, 4⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_8 : (⟨1, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_9 : (⟨1, 2, [], [], [3, 4, 5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_10 : (⟨1, 3, [], [], [2], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_11 : (⟨1, 5, [], [], [4], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_12 : (⟨1, 6, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_13 : (⟨1, 6, [], [], [5, 4, 3, 2], 1, 4⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_14 : (⟨2, 3, [], [], [4], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_15 : (⟨2, 5, [], [], [4], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_16 : (⟨3, 4, [], [2], [], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_17 : (⟨3, 5, [], [2], [4], 1, 6⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_18 : (⟨3, 6, [], [2], [], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_19 : (⟨4, 5, [], [], [6], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_templates_item_20 : (⟨5, 6, [], [4], [], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p5_part_3 : ∀ T ∈ k9t5p5.templates, T.Check k9t5p5.graph k9t5p5.clique 9 (patternAmount ([[], [], [1, 1]] : List (List ℕ))) (([[], [], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p5, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p5_templates_item_0, k9t5p5_templates_item_1, k9t5p5_templates_item_2, k9t5p5_templates_item_3, k9t5p5_templates_item_4, k9t5p5_templates_item_5, k9t5p5_templates_item_6, k9t5p5_templates_item_7, k9t5p5_templates_item_8, k9t5p5_templates_item_9, k9t5p5_templates_item_10, k9t5p5_templates_item_11, k9t5p5_templates_item_12, k9t5p5_templates_item_13, k9t5p5_templates_item_14, k9t5p5_templates_item_15, k9t5p5_templates_item_16, k9t5p5_templates_item_17, k9t5p5_templates_item_18, k9t5p5_templates_item_19, k9t5p5_templates_item_20⟩ + +private theorem k9t5p5_part_4 : ∀ p ∈ k9t5p5.required, p.Check k9t5p5.graph 9 := by decide + +private theorem k9t5p5_part_5 : ClosureCheck k9t5p5.graph (k9t5p5.initialMatrix 9) 9 5 k9t5p5.closure := by + rw [k9t5p5_initial_eq] + exact k9t5p5_closure_0 + +private theorem k9t5p5_part_6 : k9t5p5.bad.Check k9t5p5.graph (k9t5p5.matrix 9) 9 5 := by + rw [k9t5p5_matrix_eq] + decide + +theorem k9t5p5_check : k9t5p5.Check 9 5 [[], [], [1, 1]] := + ⟨k9t5p5_part_0, k9t5p5_part_1, k9t5p5_part_2, k9t5p5_part_3, k9t5p5_part_4, k9t5p5_part_5, k9t5p5_part_6⟩ +def k9t5p6 : LayoutCertificate 8 where + chains := [[0], [1], [2, 3, 4, 5, 6, 7]] + clique := {0, 1, 2, 4, 7} + templates := [⟨0, 1, [], [], [], 3, 8⟩, + ⟨0, 1, [[4, 5, 6, 7]], [], [], 2, 4⟩, + ⟨0, 1, [[2, 3, 4, 5, 6, 7]], [], [], 1, 2⟩, + ⟨0, 2, [[4, 5, 6, 7]], [], [], 2, 4⟩, + ⟨0, 2, [], [], [3, 4, 5, 6, 7], 1, 3⟩, + ⟨0, 3, [], [], [2], 2, 7⟩, + ⟨0, 3, [[4, 5, 6, 7]], [], [2], 1, 3⟩, + ⟨0, 5, [], [], [4], 2, 7⟩, + ⟨0, 5, [], [], [6, 7], 1, 6⟩, + ⟨0, 6, [], [], [5, 4], 1, 6⟩, + ⟨0, 7, [], [], [6, 5, 4], 2, 5⟩, + ⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩, + ⟨1, 2, [[4, 5, 6, 7]], [], [], 2, 4⟩, + ⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 3⟩, + ⟨1, 3, [], [], [2], 2, 7⟩, + ⟨1, 3, [[4, 5, 6, 7]], [], [2], 1, 3⟩, + ⟨1, 5, [], [], [4], 2, 7⟩, + ⟨1, 5, [], [], [6, 7], 1, 6⟩, + ⟨1, 6, [], [], [5, 4], 1, 6⟩, + ⟨1, 7, [], [], [6, 5, 4], 2, 5⟩, + ⟨1, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩, + ⟨2, 3, [], [], [4], 2, 7⟩, + ⟨2, 3, [], [], [4, 5, 6, 7], 1, 4⟩, + ⟨2, 6, [], [], [5, 4], 1, 6⟩, + ⟨3, 4, [], [2], [], 2, 7⟩, + ⟨3, 4, [], [2], [5, 6, 7], 1, 4⟩, + ⟨3, 5, [], [2], [4], 1, 6⟩, + ⟨3, 6, [], [2], [5, 4], 1, 5⟩, + ⟨3, 6, [], [2], [7], 1, 6⟩, + ⟨3, 7, [], [2], [], 2, 7⟩, + ⟨3, 7, [], [2], [6, 5, 4], 1, 4⟩, + ⟨5, 6, [], [4], [7], 1, 6⟩, + ⟨6, 7, [], [4, 5], [], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(3, 3), (0, 3), (1, 3), (6, 3)}⟩ + + +private def k9t5p6_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 4, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 4, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p6_initial_eq_row_0 : ∀ j : Fin 8, (k9t5p6.initialMatrix 9) 0 j = k9t5p6_state_0 0 j := by decide + +private theorem k9t5p6_initial_eq_row_1 : ∀ j : Fin 8, (k9t5p6.initialMatrix 9) 1 j = k9t5p6_state_0 1 j := by decide + +private theorem k9t5p6_initial_eq_row_2 : ∀ j : Fin 8, (k9t5p6.initialMatrix 9) 2 j = k9t5p6_state_0 2 j := by decide + +private theorem k9t5p6_initial_eq_row_3 : ∀ j : Fin 8, (k9t5p6.initialMatrix 9) 3 j = k9t5p6_state_0 3 j := by decide + +private theorem k9t5p6_initial_eq_row_4 : ∀ j : Fin 8, (k9t5p6.initialMatrix 9) 4 j = k9t5p6_state_0 4 j := by decide + +private theorem k9t5p6_initial_eq_row_5 : ∀ j : Fin 8, (k9t5p6.initialMatrix 9) 5 j = k9t5p6_state_0 5 j := by decide + +private theorem k9t5p6_initial_eq_row_6 : ∀ j : Fin 8, (k9t5p6.initialMatrix 9) 6 j = k9t5p6_state_0 6 j := by decide + +private theorem k9t5p6_initial_eq_row_7 : ∀ j : Fin 8, (k9t5p6.initialMatrix 9) 7 j = k9t5p6_state_0 7 j := by decide + +private theorem k9t5p6_initial_eq : (k9t5p6.initialMatrix 9) = k9t5p6_state_0 := by + funext i j + fin_cases i + + · exact k9t5p6_initial_eq_row_0 j + + · exact k9t5p6_initial_eq_row_1 j + + · exact k9t5p6_initial_eq_row_2 j + + · exact k9t5p6_initial_eq_row_3 j + + · exact k9t5p6_initial_eq_row_4 j + + · exact k9t5p6_initial_eq_row_5 j + + · exact k9t5p6_initial_eq_row_6 j + + · exact k9t5p6_initial_eq_row_7 j + +private theorem k9t5p6_closure_0 : ClosureCheck k9t5p6.graph k9t5p6_state_0 9 5 [] := by trivial + +private theorem k9t5p6_matrix_eq : k9t5p6.matrix 9 = k9t5p6_state_0 := by + change closureMatrix (k9t5p6.initialMatrix 9) _ = _ + rw [k9t5p6_initial_eq] + change closureMatrix k9t5p6_state_0 [] = _ + rfl + +private theorem k9t5p6_part_0 : k9t5p6.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p6_part_1 : k9t5p6.chains.map List.length = ([[], [], [1, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p6_part_2 : k9t5p6.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p6.clique))) = ([[], [], [1, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p6_templates_item_0 : (⟨0, 1, [], [], [], 3, 8⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_1 : (⟨0, 1, [[4, 5, 6, 7]], [], [], 2, 4⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_2 : (⟨0, 1, [[2, 3, 4, 5, 6, 7]], [], [], 1, 2⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_3 : (⟨0, 2, [[4, 5, 6, 7]], [], [], 2, 4⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_4 : (⟨0, 2, [], [], [3, 4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_5 : (⟨0, 3, [], [], [2], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_6 : (⟨0, 3, [[4, 5, 6, 7]], [], [2], 1, 3⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_7 : (⟨0, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_8 : (⟨0, 5, [], [], [6, 7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_9 : (⟨0, 6, [], [], [5, 4], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_10 : (⟨0, 7, [], [], [6, 5, 4], 2, 5⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_11 : (⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_12 : (⟨1, 2, [[4, 5, 6, 7]], [], [], 2, 4⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_13 : (⟨1, 2, [], [], [3, 4, 5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_14 : (⟨1, 3, [], [], [2], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_15 : (⟨1, 3, [[4, 5, 6, 7]], [], [2], 1, 3⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_16 : (⟨1, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_17 : (⟨1, 5, [], [], [6, 7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_18 : (⟨1, 6, [], [], [5, 4], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_19 : (⟨1, 7, [], [], [6, 5, 4], 2, 5⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_20 : (⟨1, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_21 : (⟨2, 3, [], [], [4], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_22 : (⟨2, 3, [], [], [4, 5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_23 : (⟨2, 6, [], [], [5, 4], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_24 : (⟨3, 4, [], [2], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_25 : (⟨3, 4, [], [2], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_26 : (⟨3, 5, [], [2], [4], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_27 : (⟨3, 6, [], [2], [5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_28 : (⟨3, 6, [], [2], [7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_29 : (⟨3, 7, [], [2], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_30 : (⟨3, 7, [], [2], [6, 5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_31 : (⟨5, 6, [], [4], [7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_templates_item_32 : (⟨6, 7, [], [4, 5], [], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p6_part_3 : ∀ T ∈ k9t5p6.templates, T.Check k9t5p6.graph k9t5p6.clique 9 (patternAmount ([[], [], [1, 2]] : List (List ℕ))) (([[], [], [1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p6, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p6_templates_item_0, k9t5p6_templates_item_1, k9t5p6_templates_item_2, k9t5p6_templates_item_3, k9t5p6_templates_item_4, k9t5p6_templates_item_5, k9t5p6_templates_item_6, k9t5p6_templates_item_7, k9t5p6_templates_item_8, k9t5p6_templates_item_9, k9t5p6_templates_item_10, k9t5p6_templates_item_11, k9t5p6_templates_item_12, k9t5p6_templates_item_13, k9t5p6_templates_item_14, k9t5p6_templates_item_15, k9t5p6_templates_item_16, k9t5p6_templates_item_17, k9t5p6_templates_item_18, k9t5p6_templates_item_19, k9t5p6_templates_item_20, k9t5p6_templates_item_21, k9t5p6_templates_item_22, k9t5p6_templates_item_23, k9t5p6_templates_item_24, k9t5p6_templates_item_25, k9t5p6_templates_item_26, k9t5p6_templates_item_27, k9t5p6_templates_item_28, k9t5p6_templates_item_29, k9t5p6_templates_item_30, k9t5p6_templates_item_31, k9t5p6_templates_item_32⟩ + +private theorem k9t5p6_part_4 : ∀ p ∈ k9t5p6.required, p.Check k9t5p6.graph 9 := by decide + +private theorem k9t5p6_part_5 : ClosureCheck k9t5p6.graph (k9t5p6.initialMatrix 9) 9 5 k9t5p6.closure := by + rw [k9t5p6_initial_eq] + exact k9t5p6_closure_0 + +private theorem k9t5p6_part_6 : k9t5p6.bad.Check k9t5p6.graph (k9t5p6.matrix 9) 9 5 := by + rw [k9t5p6_matrix_eq] + decide + +theorem k9t5p6_check : k9t5p6.Check 9 5 [[], [], [1, 2]] := + ⟨k9t5p6_part_0, k9t5p6_part_1, k9t5p6_part_2, k9t5p6_part_3, k9t5p6_part_4, k9t5p6_part_5, k9t5p6_part_6⟩ +def k9t5p7 : LayoutCertificate 9 where + chains := [[0], [1], [2, 3, 4, 5, 6, 7, 8]] + clique := {0, 1, 2, 4, 8} + templates := [⟨0, 1, [], [], [], 4, 8⟩, + ⟨0, 1, [[4, 5, 6, 7, 8]], [], [], 2, 3⟩, + ⟨0, 1, [[2, 3, 4, 5, 6, 7, 8]], [], [], 1, 1⟩, + ⟨0, 2, [], [], [], 4, 8⟩, + ⟨0, 2, [[4, 5, 6, 7, 8]], [], [], 2, 3⟩, + ⟨0, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩, + ⟨0, 3, [], [], [2], 3, 7⟩, + ⟨0, 3, [[4, 5, 6, 7, 8]], [], [2], 1, 2⟩, + ⟨0, 5, [], [], [6, 7, 8], 1, 5⟩, + ⟨0, 7, [], [], [6, 5, 4], 1, 5⟩, + ⟨0, 8, [], [], [7, 6, 5, 4], 2, 4⟩, + ⟨0, 8, [], [], [7, 6, 5, 4, 3, 2], 1, 2⟩, + ⟨1, 2, [], [], [], 4, 8⟩, + ⟨1, 2, [[4, 5, 6, 7, 8]], [], [], 2, 3⟩, + ⟨1, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩, + ⟨1, 3, [], [], [2], 3, 7⟩, + ⟨1, 3, [[4, 5, 6, 7, 8]], [], [2], 1, 2⟩, + ⟨1, 5, [], [], [6, 7, 8], 1, 5⟩, + ⟨1, 7, [], [], [6, 5, 4], 1, 5⟩, + ⟨1, 8, [], [], [7, 6, 5, 4], 2, 4⟩, + ⟨1, 8, [], [], [7, 6, 5, 4, 3, 2], 1, 2⟩, + ⟨2, 3, [], [], [4], 3, 7⟩, + ⟨2, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩, + ⟨2, 5, [], [], [6, 7, 8], 1, 5⟩, + ⟨2, 7, [], [], [6, 5, 4], 1, 5⟩, + ⟨3, 4, [], [2], [5, 6, 7, 8], 1, 3⟩, + ⟨3, 5, [], [2], [4], 2, 6⟩, + ⟨3, 5, [], [2], [6, 7, 8], 1, 4⟩, + ⟨3, 6, [], [2], [5, 4], 1, 5⟩, + ⟨3, 7, [], [2], [6, 5, 4], 1, 4⟩, + ⟨3, 8, [], [2], [7, 6, 5, 4], 1, 3⟩] + required := [] + closure := [] + bad := ⟨none, {(3, 3), (0, 3), (1, 3), (2, 3)}⟩ + + +private def k9t5p7_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 7, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, {1, 2, 3}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[∅, ∅, ∅, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, ∅, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p7_initial_eq_row_0 : ∀ j : Fin 9, (k9t5p7.initialMatrix 9) 0 j = k9t5p7_state_0 0 j := by decide + +private theorem k9t5p7_initial_eq_row_1 : ∀ j : Fin 9, (k9t5p7.initialMatrix 9) 1 j = k9t5p7_state_0 1 j := by decide + +private theorem k9t5p7_initial_eq_row_2 : ∀ j : Fin 9, (k9t5p7.initialMatrix 9) 2 j = k9t5p7_state_0 2 j := by decide + +private theorem k9t5p7_initial_eq_row_3 : ∀ j : Fin 9, (k9t5p7.initialMatrix 9) 3 j = k9t5p7_state_0 3 j := by decide + +private theorem k9t5p7_initial_eq_row_4 : ∀ j : Fin 9, (k9t5p7.initialMatrix 9) 4 j = k9t5p7_state_0 4 j := by decide + +private theorem k9t5p7_initial_eq_row_5 : ∀ j : Fin 9, (k9t5p7.initialMatrix 9) 5 j = k9t5p7_state_0 5 j := by decide + +private theorem k9t5p7_initial_eq_row_6 : ∀ j : Fin 9, (k9t5p7.initialMatrix 9) 6 j = k9t5p7_state_0 6 j := by decide + +private theorem k9t5p7_initial_eq_row_7 : ∀ j : Fin 9, (k9t5p7.initialMatrix 9) 7 j = k9t5p7_state_0 7 j := by decide + +private theorem k9t5p7_initial_eq_row_8 : ∀ j : Fin 9, (k9t5p7.initialMatrix 9) 8 j = k9t5p7_state_0 8 j := by decide + +private theorem k9t5p7_initial_eq : (k9t5p7.initialMatrix 9) = k9t5p7_state_0 := by + funext i j + fin_cases i + + · exact k9t5p7_initial_eq_row_0 j + + · exact k9t5p7_initial_eq_row_1 j + + · exact k9t5p7_initial_eq_row_2 j + + · exact k9t5p7_initial_eq_row_3 j + + · exact k9t5p7_initial_eq_row_4 j + + · exact k9t5p7_initial_eq_row_5 j + + · exact k9t5p7_initial_eq_row_6 j + + · exact k9t5p7_initial_eq_row_7 j + + · exact k9t5p7_initial_eq_row_8 j + +private theorem k9t5p7_closure_0 : ClosureCheck k9t5p7.graph k9t5p7_state_0 9 5 [] := by trivial + +private theorem k9t5p7_matrix_eq : k9t5p7.matrix 9 = k9t5p7_state_0 := by + change closureMatrix (k9t5p7.initialMatrix 9) _ = _ + rw [k9t5p7_initial_eq] + change closureMatrix k9t5p7_state_0 [] = _ + rfl + +private theorem k9t5p7_part_0 : k9t5p7.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p7_part_1 : k9t5p7.chains.map List.length = ([[], [], [1, 3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p7_part_2 : k9t5p7.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p7.clique))) = ([[], [], [1, 3]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p7_templates_item_0 : (⟨0, 1, [], [], [], 4, 8⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_1 : (⟨0, 1, [[4, 5, 6, 7, 8]], [], [], 2, 3⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_2 : (⟨0, 1, [[2, 3, 4, 5, 6, 7, 8]], [], [], 1, 1⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_3 : (⟨0, 2, [], [], [], 4, 8⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_4 : (⟨0, 2, [[4, 5, 6, 7, 8]], [], [], 2, 3⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_5 : (⟨0, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_6 : (⟨0, 3, [], [], [2], 3, 7⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_7 : (⟨0, 3, [[4, 5, 6, 7, 8]], [], [2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_8 : (⟨0, 5, [], [], [6, 7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_9 : (⟨0, 7, [], [], [6, 5, 4], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_10 : (⟨0, 8, [], [], [7, 6, 5, 4], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_11 : (⟨0, 8, [], [], [7, 6, 5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_12 : (⟨1, 2, [], [], [], 4, 8⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_13 : (⟨1, 2, [[4, 5, 6, 7, 8]], [], [], 2, 3⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_14 : (⟨1, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_15 : (⟨1, 3, [], [], [2], 3, 7⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_16 : (⟨1, 3, [[4, 5, 6, 7, 8]], [], [2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_17 : (⟨1, 5, [], [], [6, 7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_18 : (⟨1, 7, [], [], [6, 5, 4], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_19 : (⟨1, 8, [], [], [7, 6, 5, 4], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_20 : (⟨1, 8, [], [], [7, 6, 5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_21 : (⟨2, 3, [], [], [4], 3, 7⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_22 : (⟨2, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_23 : (⟨2, 5, [], [], [6, 7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_24 : (⟨2, 7, [], [], [6, 5, 4], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_25 : (⟨3, 4, [], [2], [5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_26 : (⟨3, 5, [], [2], [4], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_27 : (⟨3, 5, [], [2], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_28 : (⟨3, 6, [], [2], [5, 4], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_29 : (⟨3, 7, [], [2], [6, 5, 4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_templates_item_30 : (⟨3, 8, [], [2], [7, 6, 5, 4], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p7_part_3 : ∀ T ∈ k9t5p7.templates, T.Check k9t5p7.graph k9t5p7.clique 9 (patternAmount ([[], [], [1, 3]] : List (List ℕ))) (([[], [], [1, 3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p7, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p7_templates_item_0, k9t5p7_templates_item_1, k9t5p7_templates_item_2, k9t5p7_templates_item_3, k9t5p7_templates_item_4, k9t5p7_templates_item_5, k9t5p7_templates_item_6, k9t5p7_templates_item_7, k9t5p7_templates_item_8, k9t5p7_templates_item_9, k9t5p7_templates_item_10, k9t5p7_templates_item_11, k9t5p7_templates_item_12, k9t5p7_templates_item_13, k9t5p7_templates_item_14, k9t5p7_templates_item_15, k9t5p7_templates_item_16, k9t5p7_templates_item_17, k9t5p7_templates_item_18, k9t5p7_templates_item_19, k9t5p7_templates_item_20, k9t5p7_templates_item_21, k9t5p7_templates_item_22, k9t5p7_templates_item_23, k9t5p7_templates_item_24, k9t5p7_templates_item_25, k9t5p7_templates_item_26, k9t5p7_templates_item_27, k9t5p7_templates_item_28, k9t5p7_templates_item_29, k9t5p7_templates_item_30⟩ + +private theorem k9t5p7_part_4 : ∀ p ∈ k9t5p7.required, p.Check k9t5p7.graph 9 := by decide + +private theorem k9t5p7_part_5 : ClosureCheck k9t5p7.graph (k9t5p7.initialMatrix 9) 9 5 k9t5p7.closure := by + rw [k9t5p7_initial_eq] + exact k9t5p7_closure_0 + +private theorem k9t5p7_part_6 : k9t5p7.bad.Check k9t5p7.graph (k9t5p7.matrix 9) 9 5 := by + rw [k9t5p7_matrix_eq] + decide + +theorem k9t5p7_check : k9t5p7.Check 9 5 [[], [], [1, 3]] := + ⟨k9t5p7_part_0, k9t5p7_part_1, k9t5p7_part_2, k9t5p7_part_3, k9t5p7_part_4, k9t5p7_part_5, k9t5p7_part_6⟩ +def k9t5p8 : LayoutCertificate 9 where + chains := [[0], [1], [2, 3, 4, 5, 6, 7, 8]] + clique := {0, 1, 2, 5, 8} + templates := [⟨0, 1, [[2, 3, 4, 5, 6, 7, 8]], [], [], 1, 1⟩, + ⟨0, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩, + ⟨0, 3, [], [], [2], 3, 7⟩, + ⟨0, 3, [], [], [4, 5], 2, 6⟩, + ⟨0, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩, + ⟨0, 4, [], [], [3, 2], 2, 6⟩, + ⟨0, 4, [[5, 6, 7, 8]], [], [3, 2], 1, 2⟩, + ⟨0, 6, [], [], [7, 8], 2, 6⟩, + ⟨0, 6, [[2, 3, 4, 5]], [], [7, 8], 1, 2⟩, + ⟨0, 7, [], [], [6, 5], 2, 6⟩, + ⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩, + ⟨0, 8, [], [], [7, 6, 5, 4, 3, 2], 1, 2⟩, + ⟨1, 3, [], [], [4, 5], 2, 6⟩, + ⟨1, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩, + ⟨1, 4, [], [], [3, 2], 2, 6⟩, + ⟨1, 4, [[5, 6, 7, 8]], [], [3, 2], 1, 2⟩, + ⟨1, 7, [], [], [6, 5], 2, 6⟩, + ⟨1, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩, + ⟨2, 3, [], [], [4, 5], 2, 6⟩, + ⟨2, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩, + ⟨3, 4, [], [2], [5], 2, 6⟩, + ⟨3, 4, [], [2], [5, 6, 7, 8], 1, 3⟩, + ⟨3, 6, [], [2], [5], 2, 6⟩, + ⟨3, 6, [], [2], [7, 8], 1, 5⟩, + ⟨3, 7, [], [2], [6, 5], 1, 5⟩, + ⟨3, 7, [], [2], [8], 2, 6⟩, + ⟨4, 5, [], [2, 3], [], 2, 6⟩, + ⟨4, 5, [], [2, 3], [6, 7, 8], 1, 3⟩, + ⟨4, 6, [], [2, 3], [5], 1, 5⟩, + ⟨4, 7, [], [2, 3], [6, 5], 1, 4⟩, + ⟨4, 7, [], [2, 3], [8], 1, 5⟩, + ⟨4, 7, [], [5], [8], 2, 6⟩, + ⟨4, 8, [], [2, 3], [], 2, 6⟩, + ⟨4, 8, [], [2, 3], [7, 6, 5], 1, 3⟩, + ⟨6, 7, [], [5], [8], 2, 6⟩, + ⟨6, 7, [], [2, 3, 4, 5], [8], 1, 3⟩, + ⟨7, 8, [], [5, 6], [], 2, 6⟩, + ⟨7, 8, [], [2, 3, 4, 5, 6], [], 1, 3⟩] + required := [] + closure := [] + bad := ⟨none, {(3, 3), (7, 3), (4, 3), (0, 3)}⟩ + + +private def k9t5p8_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, {1}, {1, 2}, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, {1, 2}], + #[{1}, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 6, ∅], + #[{1, 2}, ∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[{1, 2}, ∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p8_initial_eq_row_0 : ∀ j : Fin 9, (k9t5p8.initialMatrix 9) 0 j = k9t5p8_state_0 0 j := by decide + +private theorem k9t5p8_initial_eq_row_1 : ∀ j : Fin 9, (k9t5p8.initialMatrix 9) 1 j = k9t5p8_state_0 1 j := by decide + +private theorem k9t5p8_initial_eq_row_2 : ∀ j : Fin 9, (k9t5p8.initialMatrix 9) 2 j = k9t5p8_state_0 2 j := by decide + +private theorem k9t5p8_initial_eq_row_3 : ∀ j : Fin 9, (k9t5p8.initialMatrix 9) 3 j = k9t5p8_state_0 3 j := by decide + +private theorem k9t5p8_initial_eq_row_4 : ∀ j : Fin 9, (k9t5p8.initialMatrix 9) 4 j = k9t5p8_state_0 4 j := by decide + +private theorem k9t5p8_initial_eq_row_5 : ∀ j : Fin 9, (k9t5p8.initialMatrix 9) 5 j = k9t5p8_state_0 5 j := by decide + +private theorem k9t5p8_initial_eq_row_6 : ∀ j : Fin 9, (k9t5p8.initialMatrix 9) 6 j = k9t5p8_state_0 6 j := by decide + +private theorem k9t5p8_initial_eq_row_7 : ∀ j : Fin 9, (k9t5p8.initialMatrix 9) 7 j = k9t5p8_state_0 7 j := by decide + +private theorem k9t5p8_initial_eq_row_8 : ∀ j : Fin 9, (k9t5p8.initialMatrix 9) 8 j = k9t5p8_state_0 8 j := by decide + +private theorem k9t5p8_initial_eq : (k9t5p8.initialMatrix 9) = k9t5p8_state_0 := by + funext i j + fin_cases i + + · exact k9t5p8_initial_eq_row_0 j + + · exact k9t5p8_initial_eq_row_1 j + + · exact k9t5p8_initial_eq_row_2 j + + · exact k9t5p8_initial_eq_row_3 j + + · exact k9t5p8_initial_eq_row_4 j + + · exact k9t5p8_initial_eq_row_5 j + + · exact k9t5p8_initial_eq_row_6 j + + · exact k9t5p8_initial_eq_row_7 j + + · exact k9t5p8_initial_eq_row_8 j + +private theorem k9t5p8_closure_0 : ClosureCheck k9t5p8.graph k9t5p8_state_0 9 5 [] := by trivial + +private theorem k9t5p8_matrix_eq : k9t5p8.matrix 9 = k9t5p8_state_0 := by + change closureMatrix (k9t5p8.initialMatrix 9) _ = _ + rw [k9t5p8_initial_eq] + change closureMatrix k9t5p8_state_0 [] = _ + rfl + +private theorem k9t5p8_part_0 : k9t5p8.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p8_part_1 : k9t5p8.chains.map List.length = ([[], [], [2, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p8_part_2 : k9t5p8.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p8.clique))) = ([[], [], [2, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p8_templates_item_0 : (⟨0, 1, [[2, 3, 4, 5, 6, 7, 8]], [], [], 1, 1⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_1 : (⟨0, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_2 : (⟨0, 3, [], [], [2], 3, 7⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_3 : (⟨0, 3, [], [], [4, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_4 : (⟨0, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_5 : (⟨0, 4, [], [], [3, 2], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_6 : (⟨0, 4, [[5, 6, 7, 8]], [], [3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_7 : (⟨0, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_8 : (⟨0, 6, [[2, 3, 4, 5]], [], [7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_9 : (⟨0, 7, [], [], [6, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_10 : (⟨0, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_11 : (⟨0, 8, [], [], [7, 6, 5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_12 : (⟨1, 3, [], [], [4, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_13 : (⟨1, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_14 : (⟨1, 4, [], [], [3, 2], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_15 : (⟨1, 4, [[5, 6, 7, 8]], [], [3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_16 : (⟨1, 7, [], [], [6, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_17 : (⟨1, 7, [], [], [6, 5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_18 : (⟨2, 3, [], [], [4, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_19 : (⟨2, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_20 : (⟨3, 4, [], [2], [5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_21 : (⟨3, 4, [], [2], [5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_22 : (⟨3, 6, [], [2], [5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_23 : (⟨3, 6, [], [2], [7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_24 : (⟨3, 7, [], [2], [6, 5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_25 : (⟨3, 7, [], [2], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_26 : (⟨4, 5, [], [2, 3], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_27 : (⟨4, 5, [], [2, 3], [6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_28 : (⟨4, 6, [], [2, 3], [5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_29 : (⟨4, 7, [], [2, 3], [6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_30 : (⟨4, 7, [], [2, 3], [8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_31 : (⟨4, 7, [], [5], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_32 : (⟨4, 8, [], [2, 3], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_33 : (⟨4, 8, [], [2, 3], [7, 6, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_34 : (⟨6, 7, [], [5], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_35 : (⟨6, 7, [], [2, 3, 4, 5], [8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_36 : (⟨7, 8, [], [5, 6], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_templates_item_37 : (⟨7, 8, [], [2, 3, 4, 5, 6], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p8_part_3 : ∀ T ∈ k9t5p8.templates, T.Check k9t5p8.graph k9t5p8.clique 9 (patternAmount ([[], [], [2, 2]] : List (List ℕ))) (([[], [], [2, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p8, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p8_templates_item_0, k9t5p8_templates_item_1, k9t5p8_templates_item_2, k9t5p8_templates_item_3, k9t5p8_templates_item_4, k9t5p8_templates_item_5, k9t5p8_templates_item_6, k9t5p8_templates_item_7, k9t5p8_templates_item_8, k9t5p8_templates_item_9, k9t5p8_templates_item_10, k9t5p8_templates_item_11, k9t5p8_templates_item_12, k9t5p8_templates_item_13, k9t5p8_templates_item_14, k9t5p8_templates_item_15, k9t5p8_templates_item_16, k9t5p8_templates_item_17, k9t5p8_templates_item_18, k9t5p8_templates_item_19, k9t5p8_templates_item_20, k9t5p8_templates_item_21, k9t5p8_templates_item_22, k9t5p8_templates_item_23, k9t5p8_templates_item_24, k9t5p8_templates_item_25, k9t5p8_templates_item_26, k9t5p8_templates_item_27, k9t5p8_templates_item_28, k9t5p8_templates_item_29, k9t5p8_templates_item_30, k9t5p8_templates_item_31, k9t5p8_templates_item_32, k9t5p8_templates_item_33, k9t5p8_templates_item_34, k9t5p8_templates_item_35, k9t5p8_templates_item_36, k9t5p8_templates_item_37⟩ + +private theorem k9t5p8_part_4 : ∀ p ∈ k9t5p8.required, p.Check k9t5p8.graph 9 := by decide + +private theorem k9t5p8_part_5 : ClosureCheck k9t5p8.graph (k9t5p8.initialMatrix 9) 9 5 k9t5p8.closure := by + rw [k9t5p8_initial_eq] + exact k9t5p8_closure_0 + +private theorem k9t5p8_part_6 : k9t5p8.bad.Check k9t5p8.graph (k9t5p8.matrix 9) 9 5 := by + rw [k9t5p8_matrix_eq] + decide + +theorem k9t5p8_check : k9t5p8.Check 9 5 [[], [], [2, 2]] := + ⟨k9t5p8_part_0, k9t5p8_part_1, k9t5p8_part_2, k9t5p8_part_3, k9t5p8_part_4, k9t5p8_part_5, k9t5p8_part_6⟩ +def k9t5p9 : LayoutCertificate 7 where + chains := [[0], [1, 2, 3], [4, 5, 6]] + clique := {0, 1, 3, 4, 6} + templates := [⟨0, 1, [], [], [], 2, 8⟩, + ⟨0, 1, [[4, 5, 6]], [], [2, 3], 1, 3⟩, + ⟨0, 2, [], [], [1], 1, 7⟩, + ⟨0, 3, [], [], [], 2, 8⟩, + ⟨0, 3, [[4, 5, 6]], [], [2, 1], 1, 3⟩, + ⟨0, 4, [], [], [], 2, 8⟩, + ⟨0, 4, [[1, 2, 3]], [], [5, 6], 1, 3⟩, + ⟨0, 5, [], [], [4], 1, 7⟩, + ⟨0, 6, [], [], [], 2, 8⟩, + ⟨0, 6, [[1, 2, 3]], [], [5, 4], 1, 3⟩, + ⟨1, 2, [], [], [3], 1, 7⟩, + ⟨1, 4, [], [], [], 2, 8⟩, + ⟨1, 4, [], [3, 2], [5, 6], 1, 4⟩, + ⟨1, 5, [], [], [4], 1, 7⟩, + ⟨1, 6, [], [], [], 2, 8⟩, + ⟨1, 6, [], [3, 2], [5, 4], 1, 4⟩, + ⟨2, 3, [], [1], [], 1, 7⟩, + ⟨2, 4, [], [1], [], 1, 7⟩, + ⟨2, 5, [], [1], [4], 1, 6⟩, + ⟨2, 6, [], [1], [], 1, 7⟩, + ⟨3, 5, [], [], [4], 1, 7⟩, + ⟨4, 5, [], [], [6], 1, 7⟩, + ⟨5, 6, [], [4], [], 1, 7⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (2, 3), (5, 3), (1, 3)}⟩ + + +private def k9t5p9_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p9_initial_eq_row_0 : ∀ j : Fin 7, (k9t5p9.initialMatrix 9) 0 j = k9t5p9_state_0 0 j := by decide + +private theorem k9t5p9_initial_eq_row_1 : ∀ j : Fin 7, (k9t5p9.initialMatrix 9) 1 j = k9t5p9_state_0 1 j := by decide + +private theorem k9t5p9_initial_eq_row_2 : ∀ j : Fin 7, (k9t5p9.initialMatrix 9) 2 j = k9t5p9_state_0 2 j := by decide + +private theorem k9t5p9_initial_eq_row_3 : ∀ j : Fin 7, (k9t5p9.initialMatrix 9) 3 j = k9t5p9_state_0 3 j := by decide + +private theorem k9t5p9_initial_eq_row_4 : ∀ j : Fin 7, (k9t5p9.initialMatrix 9) 4 j = k9t5p9_state_0 4 j := by decide + +private theorem k9t5p9_initial_eq_row_5 : ∀ j : Fin 7, (k9t5p9.initialMatrix 9) 5 j = k9t5p9_state_0 5 j := by decide + +private theorem k9t5p9_initial_eq_row_6 : ∀ j : Fin 7, (k9t5p9.initialMatrix 9) 6 j = k9t5p9_state_0 6 j := by decide + +private theorem k9t5p9_initial_eq : (k9t5p9.initialMatrix 9) = k9t5p9_state_0 := by + funext i j + fin_cases i + + · exact k9t5p9_initial_eq_row_0 j + + · exact k9t5p9_initial_eq_row_1 j + + · exact k9t5p9_initial_eq_row_2 j + + · exact k9t5p9_initial_eq_row_3 j + + · exact k9t5p9_initial_eq_row_4 j + + · exact k9t5p9_initial_eq_row_5 j + + · exact k9t5p9_initial_eq_row_6 j + +private theorem k9t5p9_closure_0 : ClosureCheck k9t5p9.graph k9t5p9_state_0 9 5 [] := by trivial + +private theorem k9t5p9_matrix_eq : k9t5p9.matrix 9 = k9t5p9_state_0 := by + change closureMatrix (k9t5p9.initialMatrix 9) _ = _ + rw [k9t5p9_initial_eq] + change closureMatrix k9t5p9_state_0 [] = _ + rfl + +private theorem k9t5p9_part_0 : k9t5p9.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p9_part_1 : k9t5p9.chains.map List.length = ([[], [1], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p9_part_2 : k9t5p9.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p9.clique))) = ([[], [1], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p9_templates_item_0 : (⟨0, 1, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_1 : (⟨0, 1, [[4, 5, 6]], [], [2, 3], 1, 3⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_2 : (⟨0, 2, [], [], [1], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_3 : (⟨0, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_4 : (⟨0, 3, [[4, 5, 6]], [], [2, 1], 1, 3⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_5 : (⟨0, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_6 : (⟨0, 4, [[1, 2, 3]], [], [5, 6], 1, 3⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_7 : (⟨0, 5, [], [], [4], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_8 : (⟨0, 6, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_9 : (⟨0, 6, [[1, 2, 3]], [], [5, 4], 1, 3⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_10 : (⟨1, 2, [], [], [3], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_11 : (⟨1, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_12 : (⟨1, 4, [], [3, 2], [5, 6], 1, 4⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_13 : (⟨1, 5, [], [], [4], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_14 : (⟨1, 6, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_15 : (⟨1, 6, [], [3, 2], [5, 4], 1, 4⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_16 : (⟨2, 3, [], [1], [], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_17 : (⟨2, 4, [], [1], [], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_18 : (⟨2, 5, [], [1], [4], 1, 6⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_19 : (⟨2, 6, [], [1], [], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_20 : (⟨3, 5, [], [], [4], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_21 : (⟨4, 5, [], [], [6], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_templates_item_22 : (⟨5, 6, [], [4], [], 1, 7⟩ : TemplateData (Fin 7)).Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p9_part_3 : ∀ T ∈ k9t5p9.templates, T.Check k9t5p9.graph k9t5p9.clique 9 (patternAmount ([[], [1], [1]] : List (List ℕ))) (([[], [1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p9, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p9_templates_item_0, k9t5p9_templates_item_1, k9t5p9_templates_item_2, k9t5p9_templates_item_3, k9t5p9_templates_item_4, k9t5p9_templates_item_5, k9t5p9_templates_item_6, k9t5p9_templates_item_7, k9t5p9_templates_item_8, k9t5p9_templates_item_9, k9t5p9_templates_item_10, k9t5p9_templates_item_11, k9t5p9_templates_item_12, k9t5p9_templates_item_13, k9t5p9_templates_item_14, k9t5p9_templates_item_15, k9t5p9_templates_item_16, k9t5p9_templates_item_17, k9t5p9_templates_item_18, k9t5p9_templates_item_19, k9t5p9_templates_item_20, k9t5p9_templates_item_21, k9t5p9_templates_item_22⟩ + +private theorem k9t5p9_part_4 : ∀ p ∈ k9t5p9.required, p.Check k9t5p9.graph 9 := by decide + +private theorem k9t5p9_part_5 : ClosureCheck k9t5p9.graph (k9t5p9.initialMatrix 9) 9 5 k9t5p9.closure := by + rw [k9t5p9_initial_eq] + exact k9t5p9_closure_0 + +private theorem k9t5p9_part_6 : k9t5p9.bad.Check k9t5p9.graph (k9t5p9.matrix 9) 9 5 := by + rw [k9t5p9_matrix_eq] + decide + +theorem k9t5p9_check : k9t5p9.Check 9 5 [[], [1], [1]] := + ⟨k9t5p9_part_0, k9t5p9_part_1, k9t5p9_part_2, k9t5p9_part_3, k9t5p9_part_4, k9t5p9_part_5, k9t5p9_part_6⟩ +def k9t5p10 : LayoutCertificate 8 where + chains := [[0], [1, 2, 3], [4, 5, 6, 7]] + clique := {0, 1, 3, 4, 7} + templates := [⟨0, 1, [], [], [], 3, 8⟩, + ⟨0, 1, [[4, 5, 6, 7]], [], [], 2, 4⟩, + ⟨0, 1, [[4, 5, 6, 7]], [], [2, 3], 1, 2⟩, + ⟨0, 2, [], [], [1], 2, 7⟩, + ⟨0, 2, [[4, 5, 6, 7]], [], [1], 1, 3⟩, + ⟨0, 3, [[4, 5, 6, 7]], [], [], 2, 4⟩, + ⟨0, 3, [[4, 5, 6, 7]], [], [2, 1], 1, 2⟩, + ⟨0, 4, [], [], [5, 6, 7], 2, 5⟩, + ⟨0, 4, [[1, 2, 3]], [], [5, 6, 7], 1, 2⟩, + ⟨0, 5, [], [], [4], 2, 7⟩, + ⟨0, 5, [], [], [6, 7], 1, 6⟩, + ⟨0, 6, [], [], [5, 4], 1, 6⟩, + ⟨0, 7, [], [], [6, 5, 4], 2, 5⟩, + ⟨0, 7, [[1, 2, 3]], [], [6, 5, 4], 1, 2⟩, + ⟨1, 2, [], [], [3], 2, 7⟩, + ⟨1, 2, [[4, 5, 6, 7]], [], [3], 1, 3⟩, + ⟨1, 4, [], [], [5, 6, 7], 2, 5⟩, + ⟨1, 4, [], [3, 2], [5, 6, 7], 1, 3⟩, + ⟨1, 5, [], [], [4], 2, 7⟩, + ⟨1, 5, [], [], [6, 7], 1, 6⟩, + ⟨1, 6, [], [], [5, 4], 1, 6⟩, + ⟨1, 7, [], [], [6, 5, 4], 2, 5⟩, + ⟨1, 7, [], [3, 2], [6, 5, 4], 1, 3⟩, + ⟨2, 3, [], [1], [], 2, 7⟩, + ⟨2, 3, [[4, 5, 6, 7]], [1], [], 1, 3⟩, + ⟨2, 4, [], [1], [], 2, 7⟩, + ⟨2, 4, [], [1], [5, 6, 7], 1, 4⟩, + ⟨2, 5, [], [1], [4], 1, 6⟩, + ⟨2, 6, [], [1], [5, 4], 1, 5⟩, + ⟨2, 7, [], [1], [], 2, 7⟩, + ⟨2, 7, [], [1], [6, 5, 4], 1, 4⟩, + ⟨3, 5, [], [], [4], 2, 7⟩, + ⟨3, 5, [], [], [6, 7], 1, 6⟩, + ⟨4, 5, [], [], [6, 7], 1, 6⟩, + ⟨5, 6, [], [4], [7], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (2, 3), (1, 3), (5, 3)}⟩ + + +private def k9t5p10_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 7], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p10_initial_eq_row_0 : ∀ j : Fin 8, (k9t5p10.initialMatrix 9) 0 j = k9t5p10_state_0 0 j := by decide + +private theorem k9t5p10_initial_eq_row_1 : ∀ j : Fin 8, (k9t5p10.initialMatrix 9) 1 j = k9t5p10_state_0 1 j := by decide + +private theorem k9t5p10_initial_eq_row_2 : ∀ j : Fin 8, (k9t5p10.initialMatrix 9) 2 j = k9t5p10_state_0 2 j := by decide + +private theorem k9t5p10_initial_eq_row_3 : ∀ j : Fin 8, (k9t5p10.initialMatrix 9) 3 j = k9t5p10_state_0 3 j := by decide + +private theorem k9t5p10_initial_eq_row_4 : ∀ j : Fin 8, (k9t5p10.initialMatrix 9) 4 j = k9t5p10_state_0 4 j := by decide + +private theorem k9t5p10_initial_eq_row_5 : ∀ j : Fin 8, (k9t5p10.initialMatrix 9) 5 j = k9t5p10_state_0 5 j := by decide + +private theorem k9t5p10_initial_eq_row_6 : ∀ j : Fin 8, (k9t5p10.initialMatrix 9) 6 j = k9t5p10_state_0 6 j := by decide + +private theorem k9t5p10_initial_eq_row_7 : ∀ j : Fin 8, (k9t5p10.initialMatrix 9) 7 j = k9t5p10_state_0 7 j := by decide + +private theorem k9t5p10_initial_eq : (k9t5p10.initialMatrix 9) = k9t5p10_state_0 := by + funext i j + fin_cases i + + · exact k9t5p10_initial_eq_row_0 j + + · exact k9t5p10_initial_eq_row_1 j + + · exact k9t5p10_initial_eq_row_2 j + + · exact k9t5p10_initial_eq_row_3 j + + · exact k9t5p10_initial_eq_row_4 j + + · exact k9t5p10_initial_eq_row_5 j + + · exact k9t5p10_initial_eq_row_6 j + + · exact k9t5p10_initial_eq_row_7 j + +private theorem k9t5p10_closure_0 : ClosureCheck k9t5p10.graph k9t5p10_state_0 9 5 [] := by trivial + +private theorem k9t5p10_matrix_eq : k9t5p10.matrix 9 = k9t5p10_state_0 := by + change closureMatrix (k9t5p10.initialMatrix 9) _ = _ + rw [k9t5p10_initial_eq] + change closureMatrix k9t5p10_state_0 [] = _ + rfl + +private theorem k9t5p10_part_0 : k9t5p10.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p10_part_1 : k9t5p10.chains.map List.length = ([[], [1], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p10_part_2 : k9t5p10.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p10.clique))) = ([[], [1], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p10_templates_item_0 : (⟨0, 1, [], [], [], 3, 8⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_1 : (⟨0, 1, [[4, 5, 6, 7]], [], [], 2, 4⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_2 : (⟨0, 1, [[4, 5, 6, 7]], [], [2, 3], 1, 2⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_3 : (⟨0, 2, [], [], [1], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_4 : (⟨0, 2, [[4, 5, 6, 7]], [], [1], 1, 3⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_5 : (⟨0, 3, [[4, 5, 6, 7]], [], [], 2, 4⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_6 : (⟨0, 3, [[4, 5, 6, 7]], [], [2, 1], 1, 2⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_7 : (⟨0, 4, [], [], [5, 6, 7], 2, 5⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_8 : (⟨0, 4, [[1, 2, 3]], [], [5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_9 : (⟨0, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_10 : (⟨0, 5, [], [], [6, 7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_11 : (⟨0, 6, [], [], [5, 4], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_12 : (⟨0, 7, [], [], [6, 5, 4], 2, 5⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_13 : (⟨0, 7, [[1, 2, 3]], [], [6, 5, 4], 1, 2⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_14 : (⟨1, 2, [], [], [3], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_15 : (⟨1, 2, [[4, 5, 6, 7]], [], [3], 1, 3⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_16 : (⟨1, 4, [], [], [5, 6, 7], 2, 5⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_17 : (⟨1, 4, [], [3, 2], [5, 6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_18 : (⟨1, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_19 : (⟨1, 5, [], [], [6, 7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_20 : (⟨1, 6, [], [], [5, 4], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_21 : (⟨1, 7, [], [], [6, 5, 4], 2, 5⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_22 : (⟨1, 7, [], [3, 2], [6, 5, 4], 1, 3⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_23 : (⟨2, 3, [], [1], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_24 : (⟨2, 3, [[4, 5, 6, 7]], [1], [], 1, 3⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_25 : (⟨2, 4, [], [1], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_26 : (⟨2, 4, [], [1], [5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_27 : (⟨2, 5, [], [1], [4], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_28 : (⟨2, 6, [], [1], [5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_29 : (⟨2, 7, [], [1], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_30 : (⟨2, 7, [], [1], [6, 5, 4], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_31 : (⟨3, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_32 : (⟨3, 5, [], [], [6, 7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_33 : (⟨4, 5, [], [], [6, 7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_templates_item_34 : (⟨5, 6, [], [4], [7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p10_part_3 : ∀ T ∈ k9t5p10.templates, T.Check k9t5p10.graph k9t5p10.clique 9 (patternAmount ([[], [1], [2]] : List (List ℕ))) (([[], [1], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p10, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p10_templates_item_0, k9t5p10_templates_item_1, k9t5p10_templates_item_2, k9t5p10_templates_item_3, k9t5p10_templates_item_4, k9t5p10_templates_item_5, k9t5p10_templates_item_6, k9t5p10_templates_item_7, k9t5p10_templates_item_8, k9t5p10_templates_item_9, k9t5p10_templates_item_10, k9t5p10_templates_item_11, k9t5p10_templates_item_12, k9t5p10_templates_item_13, k9t5p10_templates_item_14, k9t5p10_templates_item_15, k9t5p10_templates_item_16, k9t5p10_templates_item_17, k9t5p10_templates_item_18, k9t5p10_templates_item_19, k9t5p10_templates_item_20, k9t5p10_templates_item_21, k9t5p10_templates_item_22, k9t5p10_templates_item_23, k9t5p10_templates_item_24, k9t5p10_templates_item_25, k9t5p10_templates_item_26, k9t5p10_templates_item_27, k9t5p10_templates_item_28, k9t5p10_templates_item_29, k9t5p10_templates_item_30, k9t5p10_templates_item_31, k9t5p10_templates_item_32, k9t5p10_templates_item_33, k9t5p10_templates_item_34⟩ + +private theorem k9t5p10_part_4 : ∀ p ∈ k9t5p10.required, p.Check k9t5p10.graph 9 := by decide + +private theorem k9t5p10_part_5 : ClosureCheck k9t5p10.graph (k9t5p10.initialMatrix 9) 9 5 k9t5p10.closure := by + rw [k9t5p10_initial_eq] + exact k9t5p10_closure_0 + +private theorem k9t5p10_part_6 : k9t5p10.bad.Check k9t5p10.graph (k9t5p10.matrix 9) 9 5 := by + rw [k9t5p10_matrix_eq] + decide + +theorem k9t5p10_check : k9t5p10.Check 9 5 [[], [1], [2]] := + ⟨k9t5p10_part_0, k9t5p10_part_1, k9t5p10_part_2, k9t5p10_part_3, k9t5p10_part_4, k9t5p10_part_5, k9t5p10_part_6⟩ +def k9t5p11 : LayoutCertificate 9 where + chains := [[0], [1, 2, 3], [4, 5, 6, 7, 8]] + clique := {0, 1, 3, 4, 8} + templates := [⟨0, 1, [], [], [], 4, 8⟩, + ⟨0, 1, [[4, 5, 6, 7, 8]], [], [], 2, 3⟩, + ⟨0, 1, [[4, 5, 6, 7, 8]], [], [2, 3], 1, 1⟩, + ⟨0, 2, [], [], [1], 3, 7⟩, + ⟨0, 2, [[4, 5, 6, 7, 8]], [], [1], 1, 2⟩, + ⟨0, 3, [[4, 5, 6, 7, 8]], [], [], 2, 3⟩, + ⟨0, 3, [[4, 5, 6, 7, 8]], [], [2, 1], 1, 1⟩, + ⟨0, 4, [], [], [5, 6, 7, 8], 2, 4⟩, + ⟨0, 4, [[1, 2, 3]], [], [5, 6, 7, 8], 1, 1⟩, + ⟨0, 5, [], [], [4], 3, 7⟩, + ⟨0, 5, [], [], [6, 7, 8], 1, 5⟩, + ⟨0, 7, [], [], [6, 5, 4], 1, 5⟩, + ⟨0, 8, [], [], [7, 6, 5, 4], 2, 4⟩, + ⟨0, 8, [[1, 2, 3]], [], [7, 6, 5, 4], 1, 1⟩, + ⟨1, 2, [], [], [3], 3, 7⟩, + ⟨1, 2, [[4, 5, 6, 7, 8]], [], [3], 1, 2⟩, + ⟨1, 4, [], [], [5, 6, 7, 8], 2, 4⟩, + ⟨1, 4, [], [3, 2], [5, 6, 7, 8], 1, 2⟩, + ⟨1, 5, [], [], [4], 3, 7⟩, + ⟨1, 5, [], [], [6, 7, 8], 1, 5⟩, + ⟨1, 7, [], [], [6, 5, 4], 1, 5⟩, + ⟨1, 8, [], [], [7, 6, 5, 4], 2, 4⟩, + ⟨1, 8, [], [3, 2], [7, 6, 5, 4], 1, 2⟩, + ⟨2, 3, [[4, 5, 6, 7, 8]], [1], [], 1, 2⟩, + ⟨2, 4, [], [1], [5, 6, 7, 8], 1, 3⟩, + ⟨2, 5, [], [1], [4], 2, 6⟩, + ⟨2, 5, [], [1], [6, 7, 8], 1, 4⟩, + ⟨2, 6, [], [1], [5, 4], 1, 5⟩, + ⟨2, 7, [], [1], [6, 5, 4], 1, 4⟩, + ⟨2, 8, [], [1], [7, 6, 5, 4], 1, 3⟩, + ⟨3, 5, [], [], [6, 7, 8], 1, 5⟩, + ⟨4, 5, [], [], [6, 7, 8], 1, 5⟩, + ⟨5, 6, [], [4], [7, 8], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(2, 3), (0, 3), (1, 3), (5, 3)}⟩ + + +private def k9t5p11_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 7, {1, 2, 3}, Finset.Icc 1 4, Finset.Icc 1 7, ∅, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 4, Finset.Icc 1 7, ∅, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, {1, 2}, {1, 2, 3}, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, {1, 2, 3}], + #[{1, 2, 3}, ∅, {1, 2}, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 3}, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅], + #[∅, ∅, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p11_initial_eq_row_0 : ∀ j : Fin 9, (k9t5p11.initialMatrix 9) 0 j = k9t5p11_state_0 0 j := by decide + +private theorem k9t5p11_initial_eq_row_1 : ∀ j : Fin 9, (k9t5p11.initialMatrix 9) 1 j = k9t5p11_state_0 1 j := by decide + +private theorem k9t5p11_initial_eq_row_2 : ∀ j : Fin 9, (k9t5p11.initialMatrix 9) 2 j = k9t5p11_state_0 2 j := by decide + +private theorem k9t5p11_initial_eq_row_3 : ∀ j : Fin 9, (k9t5p11.initialMatrix 9) 3 j = k9t5p11_state_0 3 j := by decide + +private theorem k9t5p11_initial_eq_row_4 : ∀ j : Fin 9, (k9t5p11.initialMatrix 9) 4 j = k9t5p11_state_0 4 j := by decide + +private theorem k9t5p11_initial_eq_row_5 : ∀ j : Fin 9, (k9t5p11.initialMatrix 9) 5 j = k9t5p11_state_0 5 j := by decide + +private theorem k9t5p11_initial_eq_row_6 : ∀ j : Fin 9, (k9t5p11.initialMatrix 9) 6 j = k9t5p11_state_0 6 j := by decide + +private theorem k9t5p11_initial_eq_row_7 : ∀ j : Fin 9, (k9t5p11.initialMatrix 9) 7 j = k9t5p11_state_0 7 j := by decide + +private theorem k9t5p11_initial_eq_row_8 : ∀ j : Fin 9, (k9t5p11.initialMatrix 9) 8 j = k9t5p11_state_0 8 j := by decide + +private theorem k9t5p11_initial_eq : (k9t5p11.initialMatrix 9) = k9t5p11_state_0 := by + funext i j + fin_cases i + + · exact k9t5p11_initial_eq_row_0 j + + · exact k9t5p11_initial_eq_row_1 j + + · exact k9t5p11_initial_eq_row_2 j + + · exact k9t5p11_initial_eq_row_3 j + + · exact k9t5p11_initial_eq_row_4 j + + · exact k9t5p11_initial_eq_row_5 j + + · exact k9t5p11_initial_eq_row_6 j + + · exact k9t5p11_initial_eq_row_7 j + + · exact k9t5p11_initial_eq_row_8 j + +private theorem k9t5p11_closure_0 : ClosureCheck k9t5p11.graph k9t5p11_state_0 9 5 [] := by trivial + +private theorem k9t5p11_matrix_eq : k9t5p11.matrix 9 = k9t5p11_state_0 := by + change closureMatrix (k9t5p11.initialMatrix 9) _ = _ + rw [k9t5p11_initial_eq] + change closureMatrix k9t5p11_state_0 [] = _ + rfl + +private theorem k9t5p11_part_0 : k9t5p11.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p11_part_1 : k9t5p11.chains.map List.length = ([[], [1], [3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p11_part_2 : k9t5p11.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p11.clique))) = ([[], [1], [3]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p11_templates_item_0 : (⟨0, 1, [], [], [], 4, 8⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_1 : (⟨0, 1, [[4, 5, 6, 7, 8]], [], [], 2, 3⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_2 : (⟨0, 1, [[4, 5, 6, 7, 8]], [], [2, 3], 1, 1⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_3 : (⟨0, 2, [], [], [1], 3, 7⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_4 : (⟨0, 2, [[4, 5, 6, 7, 8]], [], [1], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_5 : (⟨0, 3, [[4, 5, 6, 7, 8]], [], [], 2, 3⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_6 : (⟨0, 3, [[4, 5, 6, 7, 8]], [], [2, 1], 1, 1⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_7 : (⟨0, 4, [], [], [5, 6, 7, 8], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_8 : (⟨0, 4, [[1, 2, 3]], [], [5, 6, 7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_9 : (⟨0, 5, [], [], [4], 3, 7⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_10 : (⟨0, 5, [], [], [6, 7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_11 : (⟨0, 7, [], [], [6, 5, 4], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_12 : (⟨0, 8, [], [], [7, 6, 5, 4], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_13 : (⟨0, 8, [[1, 2, 3]], [], [7, 6, 5, 4], 1, 1⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_14 : (⟨1, 2, [], [], [3], 3, 7⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_15 : (⟨1, 2, [[4, 5, 6, 7, 8]], [], [3], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_16 : (⟨1, 4, [], [], [5, 6, 7, 8], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_17 : (⟨1, 4, [], [3, 2], [5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_18 : (⟨1, 5, [], [], [4], 3, 7⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_19 : (⟨1, 5, [], [], [6, 7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_20 : (⟨1, 7, [], [], [6, 5, 4], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_21 : (⟨1, 8, [], [], [7, 6, 5, 4], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_22 : (⟨1, 8, [], [3, 2], [7, 6, 5, 4], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_23 : (⟨2, 3, [[4, 5, 6, 7, 8]], [1], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_24 : (⟨2, 4, [], [1], [5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_25 : (⟨2, 5, [], [1], [4], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_26 : (⟨2, 5, [], [1], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_27 : (⟨2, 6, [], [1], [5, 4], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_28 : (⟨2, 7, [], [1], [6, 5, 4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_29 : (⟨2, 8, [], [1], [7, 6, 5, 4], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_30 : (⟨3, 5, [], [], [6, 7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_31 : (⟨4, 5, [], [], [6, 7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_templates_item_32 : (⟨5, 6, [], [4], [7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p11_part_3 : ∀ T ∈ k9t5p11.templates, T.Check k9t5p11.graph k9t5p11.clique 9 (patternAmount ([[], [1], [3]] : List (List ℕ))) (([[], [1], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p11, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p11_templates_item_0, k9t5p11_templates_item_1, k9t5p11_templates_item_2, k9t5p11_templates_item_3, k9t5p11_templates_item_4, k9t5p11_templates_item_5, k9t5p11_templates_item_6, k9t5p11_templates_item_7, k9t5p11_templates_item_8, k9t5p11_templates_item_9, k9t5p11_templates_item_10, k9t5p11_templates_item_11, k9t5p11_templates_item_12, k9t5p11_templates_item_13, k9t5p11_templates_item_14, k9t5p11_templates_item_15, k9t5p11_templates_item_16, k9t5p11_templates_item_17, k9t5p11_templates_item_18, k9t5p11_templates_item_19, k9t5p11_templates_item_20, k9t5p11_templates_item_21, k9t5p11_templates_item_22, k9t5p11_templates_item_23, k9t5p11_templates_item_24, k9t5p11_templates_item_25, k9t5p11_templates_item_26, k9t5p11_templates_item_27, k9t5p11_templates_item_28, k9t5p11_templates_item_29, k9t5p11_templates_item_30, k9t5p11_templates_item_31, k9t5p11_templates_item_32⟩ + +private theorem k9t5p11_part_4 : ∀ p ∈ k9t5p11.required, p.Check k9t5p11.graph 9 := by decide + +private theorem k9t5p11_part_5 : ClosureCheck k9t5p11.graph (k9t5p11.initialMatrix 9) 9 5 k9t5p11.closure := by + rw [k9t5p11_initial_eq] + exact k9t5p11_closure_0 + +private theorem k9t5p11_part_6 : k9t5p11.bad.Check k9t5p11.graph (k9t5p11.matrix 9) 9 5 := by + rw [k9t5p11_matrix_eq] + decide + +theorem k9t5p11_check : k9t5p11.Check 9 5 [[], [1], [3]] := + ⟨k9t5p11_part_0, k9t5p11_part_1, k9t5p11_part_2, k9t5p11_part_3, k9t5p11_part_4, k9t5p11_part_5, k9t5p11_part_6⟩ +def k9t5p12 : LayoutCertificate 8 where + chains := [[0], [1, 2, 3, 4, 5, 6, 7]] + clique := {0, 1, 3, 5, 7} + templates := [⟨0, 1, [], [], [2, 3], 2, 6⟩, + ⟨0, 1, [], [], [2, 3, 4, 5, 6, 7], 1, 2⟩, + ⟨0, 2, [], [], [1], 2, 7⟩, + ⟨0, 2, [[3, 4, 5]], [], [1], 1, 4⟩, + ⟨0, 4, [], [], [3], 2, 7⟩, + ⟨0, 4, [], [], [3, 2, 1], 1, 5⟩, + ⟨0, 6, [], [], [5], 2, 7⟩, + ⟨0, 6, [[1, 2, 3]], [], [5], 1, 4⟩, + ⟨0, 7, [[1, 2, 3]], [], [], 2, 5⟩, + ⟨0, 7, [], [], [6, 5, 4, 3, 2, 1], 1, 2⟩, + ⟨1, 2, [], [], [3], 2, 7⟩, + ⟨1, 2, [], [], [3, 4, 5], 1, 5⟩, + ⟨1, 4, [], [], [3], 2, 7⟩, + ⟨1, 4, [], [3, 2], [5], 1, 5⟩, + ⟨1, 6, [], [], [5], 2, 7⟩, + ⟨1, 6, [], [3, 2], [5], 1, 5⟩, + ⟨2, 3, [], [1], [], 2, 7⟩, + ⟨2, 3, [], [1], [4, 5], 1, 5⟩, + ⟨2, 4, [], [1], [3], 1, 6⟩, + ⟨2, 5, [], [1], [], 2, 7⟩, + ⟨2, 5, [], [1], [4, 3], 1, 5⟩, + ⟨2, 6, [], [1], [5], 1, 6⟩, + ⟨2, 7, [], [1], [], 2, 7⟩, + ⟨2, 7, [[3, 4, 5]], [1], [], 1, 4⟩, + ⟨3, 4, [], [], [5], 2, 7⟩, + ⟨3, 4, [], [1, 2], [5], 1, 5⟩, + ⟨3, 6, [], [], [5], 2, 7⟩, + ⟨3, 6, [], [1, 2], [5], 1, 5⟩, + ⟨4, 5, [], [3], [], 2, 7⟩, + ⟨4, 5, [], [1, 2, 3], [], 1, 5⟩, + ⟨4, 6, [], [3], [5], 1, 6⟩, + ⟨4, 7, [], [3], [], 2, 7⟩, + ⟨4, 7, [], [1, 2, 3], [], 1, 5⟩, + ⟨5, 6, [], [], [7], 2, 7⟩, + ⟨5, 6, [[1, 2, 3]], [], [7], 1, 4⟩, + ⟨6, 7, [], [5], [], 2, 7⟩, + ⟨6, 7, [[1, 2, 3]], [5], [], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(2, 3), (4, 3), (6, 3), (0, 3)}⟩ + + +private def k9t5p12_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 5], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p12_initial_eq_row_0 : ∀ j : Fin 8, (k9t5p12.initialMatrix 9) 0 j = k9t5p12_state_0 0 j := by decide + +private theorem k9t5p12_initial_eq_row_1 : ∀ j : Fin 8, (k9t5p12.initialMatrix 9) 1 j = k9t5p12_state_0 1 j := by decide + +private theorem k9t5p12_initial_eq_row_2 : ∀ j : Fin 8, (k9t5p12.initialMatrix 9) 2 j = k9t5p12_state_0 2 j := by decide + +private theorem k9t5p12_initial_eq_row_3 : ∀ j : Fin 8, (k9t5p12.initialMatrix 9) 3 j = k9t5p12_state_0 3 j := by decide + +private theorem k9t5p12_initial_eq_row_4 : ∀ j : Fin 8, (k9t5p12.initialMatrix 9) 4 j = k9t5p12_state_0 4 j := by decide + +private theorem k9t5p12_initial_eq_row_5 : ∀ j : Fin 8, (k9t5p12.initialMatrix 9) 5 j = k9t5p12_state_0 5 j := by decide + +private theorem k9t5p12_initial_eq_row_6 : ∀ j : Fin 8, (k9t5p12.initialMatrix 9) 6 j = k9t5p12_state_0 6 j := by decide + +private theorem k9t5p12_initial_eq_row_7 : ∀ j : Fin 8, (k9t5p12.initialMatrix 9) 7 j = k9t5p12_state_0 7 j := by decide + +private theorem k9t5p12_initial_eq : (k9t5p12.initialMatrix 9) = k9t5p12_state_0 := by + funext i j + fin_cases i + + · exact k9t5p12_initial_eq_row_0 j + + · exact k9t5p12_initial_eq_row_1 j + + · exact k9t5p12_initial_eq_row_2 j + + · exact k9t5p12_initial_eq_row_3 j + + · exact k9t5p12_initial_eq_row_4 j + + · exact k9t5p12_initial_eq_row_5 j + + · exact k9t5p12_initial_eq_row_6 j + + · exact k9t5p12_initial_eq_row_7 j + +private theorem k9t5p12_closure_0 : ClosureCheck k9t5p12.graph k9t5p12_state_0 9 5 [] := by trivial + +private theorem k9t5p12_matrix_eq : k9t5p12.matrix 9 = k9t5p12_state_0 := by + change closureMatrix (k9t5p12.initialMatrix 9) _ = _ + rw [k9t5p12_initial_eq] + change closureMatrix k9t5p12_state_0 [] = _ + rfl + +private theorem k9t5p12_part_0 : k9t5p12.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p12_part_1 : k9t5p12.chains.map List.length = ([[], [1, 1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p12_part_2 : k9t5p12.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p12.clique))) = ([[], [1, 1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p12_templates_item_0 : (⟨0, 1, [], [], [2, 3], 2, 6⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_2 : (⟨0, 2, [], [], [1], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_3 : (⟨0, 2, [[3, 4, 5]], [], [1], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_4 : (⟨0, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_5 : (⟨0, 4, [], [], [3, 2, 1], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_6 : (⟨0, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_7 : (⟨0, 6, [[1, 2, 3]], [], [5], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_8 : (⟨0, 7, [[1, 2, 3]], [], [], 2, 5⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_9 : (⟨0, 7, [], [], [6, 5, 4, 3, 2, 1], 1, 2⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_10 : (⟨1, 2, [], [], [3], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_11 : (⟨1, 2, [], [], [3, 4, 5], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_12 : (⟨1, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_13 : (⟨1, 4, [], [3, 2], [5], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_14 : (⟨1, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_15 : (⟨1, 6, [], [3, 2], [5], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_16 : (⟨2, 3, [], [1], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_17 : (⟨2, 3, [], [1], [4, 5], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_18 : (⟨2, 4, [], [1], [3], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_19 : (⟨2, 5, [], [1], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_20 : (⟨2, 5, [], [1], [4, 3], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_21 : (⟨2, 6, [], [1], [5], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_22 : (⟨2, 7, [], [1], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_23 : (⟨2, 7, [[3, 4, 5]], [1], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_24 : (⟨3, 4, [], [], [5], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_25 : (⟨3, 4, [], [1, 2], [5], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_26 : (⟨3, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_27 : (⟨3, 6, [], [1, 2], [5], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_28 : (⟨4, 5, [], [3], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_29 : (⟨4, 5, [], [1, 2, 3], [], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_30 : (⟨4, 6, [], [3], [5], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_31 : (⟨4, 7, [], [3], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_32 : (⟨4, 7, [], [1, 2, 3], [], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_33 : (⟨5, 6, [], [], [7], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_34 : (⟨5, 6, [[1, 2, 3]], [], [7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_35 : (⟨6, 7, [], [5], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_templates_item_36 : (⟨6, 7, [[1, 2, 3]], [5], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p12_part_3 : ∀ T ∈ k9t5p12.templates, T.Check k9t5p12.graph k9t5p12.clique 9 (patternAmount ([[], [1, 1, 1]] : List (List ℕ))) (([[], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p12, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p12_templates_item_0, k9t5p12_templates_item_1, k9t5p12_templates_item_2, k9t5p12_templates_item_3, k9t5p12_templates_item_4, k9t5p12_templates_item_5, k9t5p12_templates_item_6, k9t5p12_templates_item_7, k9t5p12_templates_item_8, k9t5p12_templates_item_9, k9t5p12_templates_item_10, k9t5p12_templates_item_11, k9t5p12_templates_item_12, k9t5p12_templates_item_13, k9t5p12_templates_item_14, k9t5p12_templates_item_15, k9t5p12_templates_item_16, k9t5p12_templates_item_17, k9t5p12_templates_item_18, k9t5p12_templates_item_19, k9t5p12_templates_item_20, k9t5p12_templates_item_21, k9t5p12_templates_item_22, k9t5p12_templates_item_23, k9t5p12_templates_item_24, k9t5p12_templates_item_25, k9t5p12_templates_item_26, k9t5p12_templates_item_27, k9t5p12_templates_item_28, k9t5p12_templates_item_29, k9t5p12_templates_item_30, k9t5p12_templates_item_31, k9t5p12_templates_item_32, k9t5p12_templates_item_33, k9t5p12_templates_item_34, k9t5p12_templates_item_35, k9t5p12_templates_item_36⟩ + +private theorem k9t5p12_part_4 : ∀ p ∈ k9t5p12.required, p.Check k9t5p12.graph 9 := by decide + +private theorem k9t5p12_part_5 : ClosureCheck k9t5p12.graph (k9t5p12.initialMatrix 9) 9 5 k9t5p12.closure := by + rw [k9t5p12_initial_eq] + exact k9t5p12_closure_0 + +private theorem k9t5p12_part_6 : k9t5p12.bad.Check k9t5p12.graph (k9t5p12.matrix 9) 9 5 := by + rw [k9t5p12_matrix_eq] + decide + +theorem k9t5p12_check : k9t5p12.Check 9 5 [[], [1, 1, 1]] := + ⟨k9t5p12_part_0, k9t5p12_part_1, k9t5p12_part_2, k9t5p12_part_3, k9t5p12_part_4, k9t5p12_part_5, k9t5p12_part_6⟩ +private def k9t5p13_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 2, [[3, 4, 5]], [], [1], 2, 4⟩, ⟨0, 2, [[5, 6, 7, 8]], [], [1], 1, 3⟩, ⟨0, 4, [], [], [3, 2, 1], 2, 5⟩, ⟨0, 4, [[5, 6, 7, 8]], [], [3], 1, 3⟩, ⟨0, 6, [], [], [7, 8], 2, 6⟩, ⟨0, 6, [[1, 2, 3]], [], [7, 8], 1, 3⟩, ⟨0, 7, [], [], [6, 5], 2, 6⟩, ⟨0, 7, [[1, 2, 3]], [], [6, 5], 1, 3⟩, ⟨1, 2, [], [], [3, 4, 5], 2, 5⟩, ⟨1, 2, [[5, 6, 7, 8]], [], [3], 1, 3⟩, ⟨1, 4, [], [3, 2], [5], 2, 5⟩, ⟨1, 4, [[5, 6, 7, 8]], [], [3], 1, 3⟩] + +private def k9t5p13_templates_block_1 : List (TemplateData (Fin 9)) := [⟨1, 6, [], [], [7, 8], 2, 6⟩, ⟨1, 6, [], [3, 2], [7, 8], 1, 4⟩, ⟨1, 7, [], [], [6, 5], 2, 6⟩, ⟨1, 7, [], [3, 2], [6, 5], 1, 4⟩, ⟨2, 3, [], [1], [4, 5], 2, 5⟩, ⟨2, 3, [[5, 6, 7, 8]], [1], [], 1, 3⟩, ⟨2, 4, [], [1], [3], 2, 6⟩, ⟨2, 4, [[5, 6, 7, 8]], [1], [3], 1, 2⟩, ⟨2, 5, [], [1], [4, 3], 2, 5⟩, ⟨2, 5, [], [1], [6, 7, 8], 1, 4⟩, ⟨2, 6, [], [1], [5], 2, 6⟩, ⟨2, 6, [], [1], [7, 8], 1, 5⟩] + +private def k9t5p13_templates_block_2 : List (TemplateData (Fin 9)) := [⟨2, 7, [], [1], [6, 5], 1, 5⟩, ⟨2, 7, [], [1], [8], 2, 6⟩, ⟨2, 8, [[3, 4, 5]], [1], [], 2, 4⟩, ⟨2, 8, [], [1], [7, 6, 5], 1, 4⟩, ⟨3, 4, [], [1, 2], [5], 2, 5⟩, ⟨3, 4, [], [], [5, 6, 7, 8], 1, 4⟩, ⟨3, 6, [], [], [7, 8], 2, 6⟩, ⟨3, 6, [], [1, 2], [7, 8], 1, 4⟩, ⟨3, 7, [], [], [6, 5], 2, 6⟩, ⟨3, 7, [], [1, 2], [6, 5], 1, 4⟩, ⟨4, 5, [], [1, 2, 3], [], 2, 5⟩, ⟨4, 5, [], [3], [6, 7, 8], 1, 4⟩] + +private def k9t5p13_templates_block_3 : List (TemplateData (Fin 9)) := [⟨4, 6, [], [3], [5], 2, 6⟩, ⟨4, 6, [], [3], [7, 8], 1, 5⟩, ⟨4, 7, [], [3], [6, 5], 1, 5⟩, ⟨4, 7, [], [3], [8], 2, 6⟩, ⟨4, 8, [], [1, 2, 3], [], 2, 5⟩, ⟨4, 8, [], [3], [7, 6, 5], 1, 4⟩, ⟨5, 6, [], [], [7, 8], 2, 6⟩, ⟨5, 6, [[1, 2, 3]], [], [7, 8], 1, 3⟩, ⟨6, 7, [], [5], [8], 2, 6⟩, ⟨6, 7, [[1, 2, 3]], [5], [8], 1, 3⟩, ⟨7, 8, [], [5, 6], [], 2, 6⟩, ⟨7, 8, [[1, 2, 3]], [5, 6], [], 1, 3⟩] + +def k9t5p13 : LayoutCertificate 9 where + chains := [[0], [1, 2, 3, 4, 5, 6, 7, 8]] + clique := {0, 1, 3, 5, 8} + templates := k9t5p13_templates_block_0 ++ k9t5p13_templates_block_1 ++ k9t5p13_templates_block_2 ++ k9t5p13_templates_block_3 + required := [] + closure := [] + bad := ⟨none, {(2, 3), (4, 3), (7, 3), (6, 3)}⟩ + + +private def k9t5p13_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5], + #[∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p13_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p13_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_0) 0 j = k9t5p13_template_matrix_0 0 j := by decide + +private theorem k9t5p13_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_0) 1 j = k9t5p13_template_matrix_0 1 j := by decide + +private theorem k9t5p13_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_0) 2 j = k9t5p13_template_matrix_0 2 j := by decide + +private theorem k9t5p13_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_0) 3 j = k9t5p13_template_matrix_0 3 j := by decide + +private theorem k9t5p13_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_0) 4 j = k9t5p13_template_matrix_0 4 j := by decide + +private theorem k9t5p13_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_0) 5 j = k9t5p13_template_matrix_0 5 j := by decide + +private theorem k9t5p13_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_0) 6 j = k9t5p13_template_matrix_0 6 j := by decide + +private theorem k9t5p13_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_0) 7 j = k9t5p13_template_matrix_0 7 j := by decide + +private theorem k9t5p13_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_0) 8 j = k9t5p13_template_matrix_0 8 j := by decide + +private theorem k9t5p13_template_matrix_0_eq : (templateMatrix k9t5p13_templates_block_0) = k9t5p13_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t5p13_template_matrix_0_eq_row_0 j + + · exact k9t5p13_template_matrix_0_eq_row_1 j + + · exact k9t5p13_template_matrix_0_eq_row_2 j + + · exact k9t5p13_template_matrix_0_eq_row_3 j + + · exact k9t5p13_template_matrix_0_eq_row_4 j + + · exact k9t5p13_template_matrix_0_eq_row_5 j + + · exact k9t5p13_template_matrix_0_eq_row_6 j + + · exact k9t5p13_template_matrix_0_eq_row_7 j + + · exact k9t5p13_template_matrix_0_eq_row_8 j + +private def k9t5p13_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, ∅, ∅], + #[∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p13_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_1) 0 j = k9t5p13_template_matrix_1 0 j := by decide + +private theorem k9t5p13_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_1) 1 j = k9t5p13_template_matrix_1 1 j := by decide + +private theorem k9t5p13_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_1) 2 j = k9t5p13_template_matrix_1 2 j := by decide + +private theorem k9t5p13_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_1) 3 j = k9t5p13_template_matrix_1 3 j := by decide + +private theorem k9t5p13_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_1) 4 j = k9t5p13_template_matrix_1 4 j := by decide + +private theorem k9t5p13_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_1) 5 j = k9t5p13_template_matrix_1 5 j := by decide + +private theorem k9t5p13_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_1) 6 j = k9t5p13_template_matrix_1 6 j := by decide + +private theorem k9t5p13_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_1) 7 j = k9t5p13_template_matrix_1 7 j := by decide + +private theorem k9t5p13_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_1) 8 j = k9t5p13_template_matrix_1 8 j := by decide + +private theorem k9t5p13_template_matrix_1_eq : (templateMatrix k9t5p13_templates_block_1) = k9t5p13_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t5p13_template_matrix_1_eq_row_0 j + + · exact k9t5p13_template_matrix_1_eq_row_1 j + + · exact k9t5p13_template_matrix_1_eq_row_2 j + + · exact k9t5p13_template_matrix_1_eq_row_3 j + + · exact k9t5p13_template_matrix_1_eq_row_4 j + + · exact k9t5p13_template_matrix_1_eq_row_5 j + + · exact k9t5p13_template_matrix_1_eq_row_6 j + + · exact k9t5p13_template_matrix_1_eq_row_7 j + + · exact k9t5p13_template_matrix_1_eq_row_8 j + +private def k9t5p13_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, ∅, ∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p13_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_2) 0 j = k9t5p13_template_matrix_2 0 j := by decide + +private theorem k9t5p13_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_2) 1 j = k9t5p13_template_matrix_2 1 j := by decide + +private theorem k9t5p13_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_2) 2 j = k9t5p13_template_matrix_2 2 j := by decide + +private theorem k9t5p13_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_2) 3 j = k9t5p13_template_matrix_2 3 j := by decide + +private theorem k9t5p13_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_2) 4 j = k9t5p13_template_matrix_2 4 j := by decide + +private theorem k9t5p13_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_2) 5 j = k9t5p13_template_matrix_2 5 j := by decide + +private theorem k9t5p13_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_2) 6 j = k9t5p13_template_matrix_2 6 j := by decide + +private theorem k9t5p13_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_2) 7 j = k9t5p13_template_matrix_2 7 j := by decide + +private theorem k9t5p13_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_2) 8 j = k9t5p13_template_matrix_2 8 j := by decide + +private theorem k9t5p13_template_matrix_2_eq : (templateMatrix k9t5p13_templates_block_2) = k9t5p13_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t5p13_template_matrix_2_eq_row_0 j + + · exact k9t5p13_template_matrix_2_eq_row_1 j + + · exact k9t5p13_template_matrix_2_eq_row_2 j + + · exact k9t5p13_template_matrix_2_eq_row_3 j + + · exact k9t5p13_template_matrix_2_eq_row_4 j + + · exact k9t5p13_template_matrix_2_eq_row_5 j + + · exact k9t5p13_template_matrix_2_eq_row_6 j + + · exact k9t5p13_template_matrix_2_eq_row_7 j + + · exact k9t5p13_template_matrix_2_eq_row_8 j + +private def k9t5p13_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[∅, ∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p13_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_3) 0 j = k9t5p13_template_matrix_3 0 j := by decide + +private theorem k9t5p13_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_3) 1 j = k9t5p13_template_matrix_3 1 j := by decide + +private theorem k9t5p13_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_3) 2 j = k9t5p13_template_matrix_3 2 j := by decide + +private theorem k9t5p13_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_3) 3 j = k9t5p13_template_matrix_3 3 j := by decide + +private theorem k9t5p13_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_3) 4 j = k9t5p13_template_matrix_3 4 j := by decide + +private theorem k9t5p13_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_3) 5 j = k9t5p13_template_matrix_3 5 j := by decide + +private theorem k9t5p13_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_3) 6 j = k9t5p13_template_matrix_3 6 j := by decide + +private theorem k9t5p13_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_3) 7 j = k9t5p13_template_matrix_3 7 j := by decide + +private theorem k9t5p13_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p13_templates_block_3) 8 j = k9t5p13_template_matrix_3 8 j := by decide + +private theorem k9t5p13_template_matrix_3_eq : (templateMatrix k9t5p13_templates_block_3) = k9t5p13_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t5p13_template_matrix_3_eq_row_0 j + + · exact k9t5p13_template_matrix_3_eq_row_1 j + + · exact k9t5p13_template_matrix_3_eq_row_2 j + + · exact k9t5p13_template_matrix_3_eq_row_3 j + + · exact k9t5p13_template_matrix_3_eq_row_4 j + + · exact k9t5p13_template_matrix_3_eq_row_5 j + + · exact k9t5p13_template_matrix_3_eq_row_6 j + + · exact k9t5p13_template_matrix_3_eq_row_7 j + + · exact k9t5p13_template_matrix_3_eq_row_8 j + +private theorem k9t5p13_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => (((k9t5p13_template_matrix_0 i j ∪ k9t5p13_template_matrix_1 i j) ∪ k9t5p13_template_matrix_2 i j) ∪ k9t5p13_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p13.required i j) 0 j = k9t5p13_state_0 0 j := by decide + +private theorem k9t5p13_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => (((k9t5p13_template_matrix_0 i j ∪ k9t5p13_template_matrix_1 i j) ∪ k9t5p13_template_matrix_2 i j) ∪ k9t5p13_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p13.required i j) 1 j = k9t5p13_state_0 1 j := by decide + +private theorem k9t5p13_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => (((k9t5p13_template_matrix_0 i j ∪ k9t5p13_template_matrix_1 i j) ∪ k9t5p13_template_matrix_2 i j) ∪ k9t5p13_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p13.required i j) 2 j = k9t5p13_state_0 2 j := by decide + +private theorem k9t5p13_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => (((k9t5p13_template_matrix_0 i j ∪ k9t5p13_template_matrix_1 i j) ∪ k9t5p13_template_matrix_2 i j) ∪ k9t5p13_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p13.required i j) 3 j = k9t5p13_state_0 3 j := by decide + +private theorem k9t5p13_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => (((k9t5p13_template_matrix_0 i j ∪ k9t5p13_template_matrix_1 i j) ∪ k9t5p13_template_matrix_2 i j) ∪ k9t5p13_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p13.required i j) 4 j = k9t5p13_state_0 4 j := by decide + +private theorem k9t5p13_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => (((k9t5p13_template_matrix_0 i j ∪ k9t5p13_template_matrix_1 i j) ∪ k9t5p13_template_matrix_2 i j) ∪ k9t5p13_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p13.required i j) 5 j = k9t5p13_state_0 5 j := by decide + +private theorem k9t5p13_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => (((k9t5p13_template_matrix_0 i j ∪ k9t5p13_template_matrix_1 i j) ∪ k9t5p13_template_matrix_2 i j) ∪ k9t5p13_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p13.required i j) 6 j = k9t5p13_state_0 6 j := by decide + +private theorem k9t5p13_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => (((k9t5p13_template_matrix_0 i j ∪ k9t5p13_template_matrix_1 i j) ∪ k9t5p13_template_matrix_2 i j) ∪ k9t5p13_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p13.required i j) 7 j = k9t5p13_state_0 7 j := by decide + +private theorem k9t5p13_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => (((k9t5p13_template_matrix_0 i j ∪ k9t5p13_template_matrix_1 i j) ∪ k9t5p13_template_matrix_2 i j) ∪ k9t5p13_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p13.required i j) 8 j = k9t5p13_state_0 8 j := by decide + +private theorem k9t5p13_initial_merged_eq : (fun i j => (((k9t5p13_template_matrix_0 i j ∪ k9t5p13_template_matrix_1 i j) ∪ k9t5p13_template_matrix_2 i j) ∪ k9t5p13_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p13.required i j) = k9t5p13_state_0 := by + funext i j + fin_cases i + + · exact k9t5p13_initial_merged_eq_row_0 j + + · exact k9t5p13_initial_merged_eq_row_1 j + + · exact k9t5p13_initial_merged_eq_row_2 j + + · exact k9t5p13_initial_merged_eq_row_3 j + + · exact k9t5p13_initial_merged_eq_row_4 j + + · exact k9t5p13_initial_merged_eq_row_5 j + + · exact k9t5p13_initial_merged_eq_row_6 j + + · exact k9t5p13_initial_merged_eq_row_7 j + + · exact k9t5p13_initial_merged_eq_row_8 j + +private theorem k9t5p13_initial_eq : k9t5p13.initialMatrix 9 = k9t5p13_state_0 := by + funext i j + change templateMatrix (k9t5p13_templates_block_0 ++ k9t5p13_templates_block_1 ++ k9t5p13_templates_block_2 ++ k9t5p13_templates_block_3) i j ∪ requiredMatrix 9 k9t5p13.required i j = _ + simp only [templateMatrix_append, k9t5p13_template_matrix_0_eq, k9t5p13_template_matrix_1_eq, k9t5p13_template_matrix_2_eq, k9t5p13_template_matrix_3_eq] + exact congrFun (congrFun k9t5p13_initial_merged_eq i) j + +private theorem k9t5p13_closure_0 : ClosureCheck k9t5p13.graph k9t5p13_state_0 9 5 [] := by trivial + +private theorem k9t5p13_matrix_eq : k9t5p13.matrix 9 = k9t5p13_state_0 := by + change closureMatrix (k9t5p13.initialMatrix 9) _ = _ + rw [k9t5p13_initial_eq] + change closureMatrix k9t5p13_state_0 [] = _ + rfl + +private theorem k9t5p13_part_0 : k9t5p13.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p13_part_1 : k9t5p13.chains.map List.length = ([[], [1, 1, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p13_part_2 : k9t5p13.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p13.clique))) = ([[], [1, 1, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p13_templates_item_0 : (⟨0, 2, [[3, 4, 5]], [], [1], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_1 : (⟨0, 2, [[5, 6, 7, 8]], [], [1], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_2 : (⟨0, 4, [], [], [3, 2, 1], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_3 : (⟨0, 4, [[5, 6, 7, 8]], [], [3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_4 : (⟨0, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_5 : (⟨0, 6, [[1, 2, 3]], [], [7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_6 : (⟨0, 7, [], [], [6, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_7 : (⟨0, 7, [[1, 2, 3]], [], [6, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_8 : (⟨1, 2, [], [], [3, 4, 5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_9 : (⟨1, 2, [[5, 6, 7, 8]], [], [3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_10 : (⟨1, 4, [], [3, 2], [5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_11 : (⟨1, 4, [[5, 6, 7, 8]], [], [3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_12 : (⟨1, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_13 : (⟨1, 6, [], [3, 2], [7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_14 : (⟨1, 7, [], [], [6, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_15 : (⟨1, 7, [], [3, 2], [6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_16 : (⟨2, 3, [], [1], [4, 5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_17 : (⟨2, 3, [[5, 6, 7, 8]], [1], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_18 : (⟨2, 4, [], [1], [3], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_19 : (⟨2, 4, [[5, 6, 7, 8]], [1], [3], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_20 : (⟨2, 5, [], [1], [4, 3], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_21 : (⟨2, 5, [], [1], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_22 : (⟨2, 6, [], [1], [5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_23 : (⟨2, 6, [], [1], [7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_24 : (⟨2, 7, [], [1], [6, 5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_25 : (⟨2, 7, [], [1], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_26 : (⟨2, 8, [[3, 4, 5]], [1], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_27 : (⟨2, 8, [], [1], [7, 6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_28 : (⟨3, 4, [], [1, 2], [5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_29 : (⟨3, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_30 : (⟨3, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_31 : (⟨3, 6, [], [1, 2], [7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_32 : (⟨3, 7, [], [], [6, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_33 : (⟨3, 7, [], [1, 2], [6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_34 : (⟨4, 5, [], [1, 2, 3], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_35 : (⟨4, 5, [], [3], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_36 : (⟨4, 6, [], [3], [5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_37 : (⟨4, 6, [], [3], [7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_38 : (⟨4, 7, [], [3], [6, 5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_39 : (⟨4, 7, [], [3], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_40 : (⟨4, 8, [], [1, 2, 3], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_41 : (⟨4, 8, [], [3], [7, 6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_42 : (⟨5, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_43 : (⟨5, 6, [[1, 2, 3]], [], [7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_44 : (⟨6, 7, [], [5], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_45 : (⟨6, 7, [[1, 2, 3]], [5], [8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_46 : (⟨7, 8, [], [5, 6], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_item_47 : (⟨7, 8, [[1, 2, 3]], [5, 6], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p13_templates_block_0_check : ∀ T ∈ k9t5p13_templates_block_0, T.Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p13_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p13_templates_item_0, k9t5p13_templates_item_1, k9t5p13_templates_item_2, k9t5p13_templates_item_3, k9t5p13_templates_item_4, k9t5p13_templates_item_5, k9t5p13_templates_item_6, k9t5p13_templates_item_7, k9t5p13_templates_item_8, k9t5p13_templates_item_9, k9t5p13_templates_item_10, k9t5p13_templates_item_11⟩ + +private theorem k9t5p13_templates_block_1_check : ∀ T ∈ k9t5p13_templates_block_1, T.Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p13_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p13_templates_item_12, k9t5p13_templates_item_13, k9t5p13_templates_item_14, k9t5p13_templates_item_15, k9t5p13_templates_item_16, k9t5p13_templates_item_17, k9t5p13_templates_item_18, k9t5p13_templates_item_19, k9t5p13_templates_item_20, k9t5p13_templates_item_21, k9t5p13_templates_item_22, k9t5p13_templates_item_23⟩ + +private theorem k9t5p13_templates_block_2_check : ∀ T ∈ k9t5p13_templates_block_2, T.Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p13_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p13_templates_item_24, k9t5p13_templates_item_25, k9t5p13_templates_item_26, k9t5p13_templates_item_27, k9t5p13_templates_item_28, k9t5p13_templates_item_29, k9t5p13_templates_item_30, k9t5p13_templates_item_31, k9t5p13_templates_item_32, k9t5p13_templates_item_33, k9t5p13_templates_item_34, k9t5p13_templates_item_35⟩ + +private theorem k9t5p13_templates_block_3_check : ∀ T ∈ k9t5p13_templates_block_3, T.Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p13_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p13_templates_item_36, k9t5p13_templates_item_37, k9t5p13_templates_item_38, k9t5p13_templates_item_39, k9t5p13_templates_item_40, k9t5p13_templates_item_41, k9t5p13_templates_item_42, k9t5p13_templates_item_43, k9t5p13_templates_item_44, k9t5p13_templates_item_45, k9t5p13_templates_item_46, k9t5p13_templates_item_47⟩ + +private theorem k9t5p13_part_3 : ∀ T ∈ k9t5p13.templates, T.Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t5p13_templates_block_0 ++ k9t5p13_templates_block_1 ++ k9t5p13_templates_block_2 ++ k9t5p13_templates_block_3), T.Check k9t5p13.graph k9t5p13.clique 9 (patternAmount ([[], [1, 1, 2]] : List (List ℕ))) (([[], [1, 1, 2]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t5p13_templates_block_0_check, k9t5p13_templates_block_1_check⟩, k9t5p13_templates_block_2_check⟩, k9t5p13_templates_block_3_check⟩ + +private theorem k9t5p13_part_4 : ∀ p ∈ k9t5p13.required, p.Check k9t5p13.graph 9 := by decide + +private theorem k9t5p13_part_5 : ClosureCheck k9t5p13.graph (k9t5p13.initialMatrix 9) 9 5 k9t5p13.closure := by + rw [k9t5p13_initial_eq] + exact k9t5p13_closure_0 + +private theorem k9t5p13_part_6 : k9t5p13.bad.Check k9t5p13.graph (k9t5p13.matrix 9) 9 5 := by + rw [k9t5p13_matrix_eq] + decide + +theorem k9t5p13_check : k9t5p13.Check 9 5 [[], [1, 1, 2]] := + ⟨k9t5p13_part_0, k9t5p13_part_1, k9t5p13_part_2, k9t5p13_part_3, k9t5p13_part_4, k9t5p13_part_5, k9t5p13_part_6⟩ +private def k9t5p14_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 2, [[3, 4, 5, 6]], [], [1], 1, 3⟩, ⟨0, 4, [], [], [5, 6], 2, 6⟩, ⟨0, 4, [[1, 2, 3]], [], [5, 6], 1, 3⟩, ⟨0, 5, [], [], [4, 3], 2, 6⟩, ⟨0, 5, [], [], [4, 3, 2, 1], 1, 4⟩, ⟨0, 7, [[1, 2, 3]], [], [6], 2, 4⟩, ⟨0, 7, [], [], [6, 5, 4, 3], 1, 4⟩, ⟨1, 2, [], [], [3, 4, 5, 6], 1, 4⟩, ⟨1, 4, [], [], [5, 6], 2, 6⟩, ⟨1, 4, [], [3, 2], [5, 6], 1, 4⟩, ⟨1, 5, [], [], [4, 3], 2, 6⟩, ⟨1, 5, [[6, 7, 8]], [], [4, 3], 1, 3⟩] + +private def k9t5p14_templates_block_1 : List (TemplateData (Fin 9)) := [⟨1, 7, [], [3, 2], [6], 2, 5⟩, ⟨1, 7, [], [], [6, 5, 4, 3], 1, 4⟩, ⟨2, 3, [], [1], [4, 5, 6], 1, 4⟩, ⟨2, 4, [], [1], [3], 2, 6⟩, ⟨2, 4, [], [1], [5, 6], 1, 5⟩, ⟨2, 5, [], [1], [4, 3], 1, 5⟩, ⟨2, 5, [], [1], [6], 2, 6⟩, ⟨2, 6, [], [1], [5, 4, 3], 1, 4⟩, ⟨2, 7, [], [1], [6], 2, 6⟩, ⟨2, 7, [], [1], [6, 5, 4, 3], 1, 3⟩, ⟨2, 8, [[3, 4, 5, 6]], [1], [], 1, 3⟩, ⟨3, 4, [], [], [5, 6], 2, 6⟩] + +private def k9t5p14_templates_block_2 : List (TemplateData (Fin 9)) := [⟨3, 4, [], [1, 2], [5, 6], 1, 4⟩, ⟨3, 7, [], [1, 2], [6], 2, 5⟩, ⟨3, 7, [], [6, 5, 4], [8], 1, 4⟩, ⟨4, 5, [], [3], [6], 2, 6⟩, ⟨4, 5, [], [1, 2, 3], [6], 1, 4⟩, ⟨4, 7, [], [3], [6], 2, 6⟩, ⟨4, 7, [], [6, 5], [8], 1, 5⟩, ⟨4, 8, [], [6, 5], [], 2, 6⟩, ⟨4, 8, [[1, 2, 3]], [6, 5], [], 1, 3⟩, ⟨5, 6, [], [3, 4], [], 2, 6⟩, ⟨5, 6, [], [1, 2, 3, 4], [], 1, 4⟩, ⟨5, 7, [], [3, 4], [6], 1, 5⟩] + +private def k9t5p14_templates_block_3 : List (TemplateData (Fin 9)) := [⟨5, 7, [], [6], [8], 2, 6⟩, ⟨5, 8, [], [3, 4], [], 2, 6⟩, ⟨5, 8, [], [1, 2, 3, 4], [], 1, 4⟩, ⟨6, 7, [[1, 2, 3]], [], [8], 2, 4⟩, ⟨6, 7, [], [3, 4, 5], [8], 1, 4⟩, ⟨7, 8, [[1, 2, 3]], [6], [], 2, 4⟩, ⟨7, 8, [], [3, 4, 5, 6], [], 1, 4⟩] + +def k9t5p14 : LayoutCertificate 9 where + chains := [[0], [1, 2, 3, 4, 5, 6, 7, 8]] + clique := {0, 1, 3, 6, 8} + templates := k9t5p14_templates_block_0 ++ k9t5p14_templates_block_1 ++ k9t5p14_templates_block_2 ++ k9t5p14_templates_block_3 + required := [] + closure := [] + bad := ⟨none, {(2, 3), (7, 3), (4, 3), (5, 3)}⟩ + + +private def k9t5p14_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, {1, 2, 3}, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅], + #[∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅], + #[{1, 2, 3}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 6, {1, 2, 3}], + #[∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[∅, ∅, Finset.Icc 1 4, ∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, ∅, {1, 2, 3}, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p14_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, {1, 2, 3}, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅], + #[∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅], + #[{1, 2, 3}, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p14_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_0) 0 j = k9t5p14_template_matrix_0 0 j := by decide + +private theorem k9t5p14_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_0) 1 j = k9t5p14_template_matrix_0 1 j := by decide + +private theorem k9t5p14_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_0) 2 j = k9t5p14_template_matrix_0 2 j := by decide + +private theorem k9t5p14_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_0) 3 j = k9t5p14_template_matrix_0 3 j := by decide + +private theorem k9t5p14_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_0) 4 j = k9t5p14_template_matrix_0 4 j := by decide + +private theorem k9t5p14_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_0) 5 j = k9t5p14_template_matrix_0 5 j := by decide + +private theorem k9t5p14_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_0) 6 j = k9t5p14_template_matrix_0 6 j := by decide + +private theorem k9t5p14_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_0) 7 j = k9t5p14_template_matrix_0 7 j := by decide + +private theorem k9t5p14_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_0) 8 j = k9t5p14_template_matrix_0 8 j := by decide + +private theorem k9t5p14_template_matrix_0_eq : (templateMatrix k9t5p14_templates_block_0) = k9t5p14_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t5p14_template_matrix_0_eq_row_0 j + + · exact k9t5p14_template_matrix_0_eq_row_1 j + + · exact k9t5p14_template_matrix_0_eq_row_2 j + + · exact k9t5p14_template_matrix_0_eq_row_3 j + + · exact k9t5p14_template_matrix_0_eq_row_4 j + + · exact k9t5p14_template_matrix_0_eq_row_5 j + + · exact k9t5p14_template_matrix_0_eq_row_6 j + + · exact k9t5p14_template_matrix_0_eq_row_7 j + + · exact k9t5p14_template_matrix_0_eq_row_8 j + +private def k9t5p14_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 5, ∅], + #[∅, ∅, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 6, {1, 2, 3}], + #[∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 2 6, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, Finset.Icc 2 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, {1, 2, 3}, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p14_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_1) 0 j = k9t5p14_template_matrix_1 0 j := by decide + +private theorem k9t5p14_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_1) 1 j = k9t5p14_template_matrix_1 1 j := by decide + +private theorem k9t5p14_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_1) 2 j = k9t5p14_template_matrix_1 2 j := by decide + +private theorem k9t5p14_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_1) 3 j = k9t5p14_template_matrix_1 3 j := by decide + +private theorem k9t5p14_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_1) 4 j = k9t5p14_template_matrix_1 4 j := by decide + +private theorem k9t5p14_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_1) 5 j = k9t5p14_template_matrix_1 5 j := by decide + +private theorem k9t5p14_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_1) 6 j = k9t5p14_template_matrix_1 6 j := by decide + +private theorem k9t5p14_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_1) 7 j = k9t5p14_template_matrix_1 7 j := by decide + +private theorem k9t5p14_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_1) 8 j = k9t5p14_template_matrix_1 8 j := by decide + +private theorem k9t5p14_template_matrix_1_eq : (templateMatrix k9t5p14_templates_block_1) = k9t5p14_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t5p14_template_matrix_1_eq_row_0 j + + · exact k9t5p14_template_matrix_1_eq_row_1 j + + · exact k9t5p14_template_matrix_1_eq_row_2 j + + · exact k9t5p14_template_matrix_1_eq_row_3 j + + · exact k9t5p14_template_matrix_1_eq_row_4 j + + · exact k9t5p14_template_matrix_1_eq_row_5 j + + · exact k9t5p14_template_matrix_1_eq_row_6 j + + · exact k9t5p14_template_matrix_1_eq_row_7 j + + · exact k9t5p14_template_matrix_1_eq_row_8 j + +private def k9t5p14_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, ∅, Finset.Icc 1 5, ∅], + #[∅, ∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 5, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p14_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_2) 0 j = k9t5p14_template_matrix_2 0 j := by decide + +private theorem k9t5p14_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_2) 1 j = k9t5p14_template_matrix_2 1 j := by decide + +private theorem k9t5p14_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_2) 2 j = k9t5p14_template_matrix_2 2 j := by decide + +private theorem k9t5p14_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_2) 3 j = k9t5p14_template_matrix_2 3 j := by decide + +private theorem k9t5p14_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_2) 4 j = k9t5p14_template_matrix_2 4 j := by decide + +private theorem k9t5p14_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_2) 5 j = k9t5p14_template_matrix_2 5 j := by decide + +private theorem k9t5p14_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_2) 6 j = k9t5p14_template_matrix_2 6 j := by decide + +private theorem k9t5p14_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_2) 7 j = k9t5p14_template_matrix_2 7 j := by decide + +private theorem k9t5p14_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_2) 8 j = k9t5p14_template_matrix_2 8 j := by decide + +private theorem k9t5p14_template_matrix_2_eq : (templateMatrix k9t5p14_templates_block_2) = k9t5p14_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t5p14_template_matrix_2_eq_row_0 j + + · exact k9t5p14_template_matrix_2_eq_row_1 j + + · exact k9t5p14_template_matrix_2_eq_row_2 j + + · exact k9t5p14_template_matrix_2_eq_row_3 j + + · exact k9t5p14_template_matrix_2_eq_row_4 j + + · exact k9t5p14_template_matrix_2_eq_row_5 j + + · exact k9t5p14_template_matrix_2_eq_row_6 j + + · exact k9t5p14_template_matrix_2_eq_row_7 j + + · exact k9t5p14_template_matrix_2_eq_row_8 j + +private def k9t5p14_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 2 6, Finset.Icc 1 6], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 2 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p14_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_3) 0 j = k9t5p14_template_matrix_3 0 j := by decide + +private theorem k9t5p14_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_3) 1 j = k9t5p14_template_matrix_3 1 j := by decide + +private theorem k9t5p14_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_3) 2 j = k9t5p14_template_matrix_3 2 j := by decide + +private theorem k9t5p14_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_3) 3 j = k9t5p14_template_matrix_3 3 j := by decide + +private theorem k9t5p14_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_3) 4 j = k9t5p14_template_matrix_3 4 j := by decide + +private theorem k9t5p14_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_3) 5 j = k9t5p14_template_matrix_3 5 j := by decide + +private theorem k9t5p14_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_3) 6 j = k9t5p14_template_matrix_3 6 j := by decide + +private theorem k9t5p14_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_3) 7 j = k9t5p14_template_matrix_3 7 j := by decide + +private theorem k9t5p14_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p14_templates_block_3) 8 j = k9t5p14_template_matrix_3 8 j := by decide + +private theorem k9t5p14_template_matrix_3_eq : (templateMatrix k9t5p14_templates_block_3) = k9t5p14_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t5p14_template_matrix_3_eq_row_0 j + + · exact k9t5p14_template_matrix_3_eq_row_1 j + + · exact k9t5p14_template_matrix_3_eq_row_2 j + + · exact k9t5p14_template_matrix_3_eq_row_3 j + + · exact k9t5p14_template_matrix_3_eq_row_4 j + + · exact k9t5p14_template_matrix_3_eq_row_5 j + + · exact k9t5p14_template_matrix_3_eq_row_6 j + + · exact k9t5p14_template_matrix_3_eq_row_7 j + + · exact k9t5p14_template_matrix_3_eq_row_8 j + +private theorem k9t5p14_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => (((k9t5p14_template_matrix_0 i j ∪ k9t5p14_template_matrix_1 i j) ∪ k9t5p14_template_matrix_2 i j) ∪ k9t5p14_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p14.required i j) 0 j = k9t5p14_state_0 0 j := by decide + +private theorem k9t5p14_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => (((k9t5p14_template_matrix_0 i j ∪ k9t5p14_template_matrix_1 i j) ∪ k9t5p14_template_matrix_2 i j) ∪ k9t5p14_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p14.required i j) 1 j = k9t5p14_state_0 1 j := by decide + +private theorem k9t5p14_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => (((k9t5p14_template_matrix_0 i j ∪ k9t5p14_template_matrix_1 i j) ∪ k9t5p14_template_matrix_2 i j) ∪ k9t5p14_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p14.required i j) 2 j = k9t5p14_state_0 2 j := by decide + +private theorem k9t5p14_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => (((k9t5p14_template_matrix_0 i j ∪ k9t5p14_template_matrix_1 i j) ∪ k9t5p14_template_matrix_2 i j) ∪ k9t5p14_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p14.required i j) 3 j = k9t5p14_state_0 3 j := by decide + +private theorem k9t5p14_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => (((k9t5p14_template_matrix_0 i j ∪ k9t5p14_template_matrix_1 i j) ∪ k9t5p14_template_matrix_2 i j) ∪ k9t5p14_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p14.required i j) 4 j = k9t5p14_state_0 4 j := by decide + +private theorem k9t5p14_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => (((k9t5p14_template_matrix_0 i j ∪ k9t5p14_template_matrix_1 i j) ∪ k9t5p14_template_matrix_2 i j) ∪ k9t5p14_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p14.required i j) 5 j = k9t5p14_state_0 5 j := by decide + +private theorem k9t5p14_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => (((k9t5p14_template_matrix_0 i j ∪ k9t5p14_template_matrix_1 i j) ∪ k9t5p14_template_matrix_2 i j) ∪ k9t5p14_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p14.required i j) 6 j = k9t5p14_state_0 6 j := by decide + +private theorem k9t5p14_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => (((k9t5p14_template_matrix_0 i j ∪ k9t5p14_template_matrix_1 i j) ∪ k9t5p14_template_matrix_2 i j) ∪ k9t5p14_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p14.required i j) 7 j = k9t5p14_state_0 7 j := by decide + +private theorem k9t5p14_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => (((k9t5p14_template_matrix_0 i j ∪ k9t5p14_template_matrix_1 i j) ∪ k9t5p14_template_matrix_2 i j) ∪ k9t5p14_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p14.required i j) 8 j = k9t5p14_state_0 8 j := by decide + +private theorem k9t5p14_initial_merged_eq : (fun i j => (((k9t5p14_template_matrix_0 i j ∪ k9t5p14_template_matrix_1 i j) ∪ k9t5p14_template_matrix_2 i j) ∪ k9t5p14_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p14.required i j) = k9t5p14_state_0 := by + funext i j + fin_cases i + + · exact k9t5p14_initial_merged_eq_row_0 j + + · exact k9t5p14_initial_merged_eq_row_1 j + + · exact k9t5p14_initial_merged_eq_row_2 j + + · exact k9t5p14_initial_merged_eq_row_3 j + + · exact k9t5p14_initial_merged_eq_row_4 j + + · exact k9t5p14_initial_merged_eq_row_5 j + + · exact k9t5p14_initial_merged_eq_row_6 j + + · exact k9t5p14_initial_merged_eq_row_7 j + + · exact k9t5p14_initial_merged_eq_row_8 j + +private theorem k9t5p14_initial_eq : k9t5p14.initialMatrix 9 = k9t5p14_state_0 := by + funext i j + change templateMatrix (k9t5p14_templates_block_0 ++ k9t5p14_templates_block_1 ++ k9t5p14_templates_block_2 ++ k9t5p14_templates_block_3) i j ∪ requiredMatrix 9 k9t5p14.required i j = _ + simp only [templateMatrix_append, k9t5p14_template_matrix_0_eq, k9t5p14_template_matrix_1_eq, k9t5p14_template_matrix_2_eq, k9t5p14_template_matrix_3_eq] + exact congrFun (congrFun k9t5p14_initial_merged_eq i) j + +private theorem k9t5p14_closure_0 : ClosureCheck k9t5p14.graph k9t5p14_state_0 9 5 [] := by trivial + +private theorem k9t5p14_matrix_eq : k9t5p14.matrix 9 = k9t5p14_state_0 := by + change closureMatrix (k9t5p14.initialMatrix 9) _ = _ + rw [k9t5p14_initial_eq] + change closureMatrix k9t5p14_state_0 [] = _ + rfl + +private theorem k9t5p14_part_0 : k9t5p14.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p14_part_1 : k9t5p14.chains.map List.length = ([[], [1, 2, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p14_part_2 : k9t5p14.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p14.clique))) = ([[], [1, 2, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p14_templates_item_0 : (⟨0, 2, [[3, 4, 5, 6]], [], [1], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_1 : (⟨0, 4, [], [], [5, 6], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_2 : (⟨0, 4, [[1, 2, 3]], [], [5, 6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_3 : (⟨0, 5, [], [], [4, 3], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_4 : (⟨0, 5, [], [], [4, 3, 2, 1], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_5 : (⟨0, 7, [[1, 2, 3]], [], [6], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_6 : (⟨0, 7, [], [], [6, 5, 4, 3], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_7 : (⟨1, 2, [], [], [3, 4, 5, 6], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_8 : (⟨1, 4, [], [], [5, 6], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_9 : (⟨1, 4, [], [3, 2], [5, 6], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_10 : (⟨1, 5, [], [], [4, 3], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_11 : (⟨1, 5, [[6, 7, 8]], [], [4, 3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_12 : (⟨1, 7, [], [3, 2], [6], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_13 : (⟨1, 7, [], [], [6, 5, 4, 3], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_14 : (⟨2, 3, [], [1], [4, 5, 6], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_15 : (⟨2, 4, [], [1], [3], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_16 : (⟨2, 4, [], [1], [5, 6], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_17 : (⟨2, 5, [], [1], [4, 3], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_18 : (⟨2, 5, [], [1], [6], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_19 : (⟨2, 6, [], [1], [5, 4, 3], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_20 : (⟨2, 7, [], [1], [6], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_21 : (⟨2, 7, [], [1], [6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_22 : (⟨2, 8, [[3, 4, 5, 6]], [1], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_23 : (⟨3, 4, [], [], [5, 6], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_24 : (⟨3, 4, [], [1, 2], [5, 6], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_25 : (⟨3, 7, [], [1, 2], [6], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_26 : (⟨3, 7, [], [6, 5, 4], [8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_27 : (⟨4, 5, [], [3], [6], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_28 : (⟨4, 5, [], [1, 2, 3], [6], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_29 : (⟨4, 7, [], [3], [6], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_30 : (⟨4, 7, [], [6, 5], [8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_31 : (⟨4, 8, [], [6, 5], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_32 : (⟨4, 8, [[1, 2, 3]], [6, 5], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_33 : (⟨5, 6, [], [3, 4], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_34 : (⟨5, 6, [], [1, 2, 3, 4], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_35 : (⟨5, 7, [], [3, 4], [6], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_36 : (⟨5, 7, [], [6], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_37 : (⟨5, 8, [], [3, 4], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_38 : (⟨5, 8, [], [1, 2, 3, 4], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_39 : (⟨6, 7, [[1, 2, 3]], [], [8], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_40 : (⟨6, 7, [], [3, 4, 5], [8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_41 : (⟨7, 8, [[1, 2, 3]], [6], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_item_42 : (⟨7, 8, [], [3, 4, 5, 6], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p14_templates_block_0_check : ∀ T ∈ k9t5p14_templates_block_0, T.Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p14_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p14_templates_item_0, k9t5p14_templates_item_1, k9t5p14_templates_item_2, k9t5p14_templates_item_3, k9t5p14_templates_item_4, k9t5p14_templates_item_5, k9t5p14_templates_item_6, k9t5p14_templates_item_7, k9t5p14_templates_item_8, k9t5p14_templates_item_9, k9t5p14_templates_item_10, k9t5p14_templates_item_11⟩ + +private theorem k9t5p14_templates_block_1_check : ∀ T ∈ k9t5p14_templates_block_1, T.Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p14_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p14_templates_item_12, k9t5p14_templates_item_13, k9t5p14_templates_item_14, k9t5p14_templates_item_15, k9t5p14_templates_item_16, k9t5p14_templates_item_17, k9t5p14_templates_item_18, k9t5p14_templates_item_19, k9t5p14_templates_item_20, k9t5p14_templates_item_21, k9t5p14_templates_item_22, k9t5p14_templates_item_23⟩ + +private theorem k9t5p14_templates_block_2_check : ∀ T ∈ k9t5p14_templates_block_2, T.Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p14_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p14_templates_item_24, k9t5p14_templates_item_25, k9t5p14_templates_item_26, k9t5p14_templates_item_27, k9t5p14_templates_item_28, k9t5p14_templates_item_29, k9t5p14_templates_item_30, k9t5p14_templates_item_31, k9t5p14_templates_item_32, k9t5p14_templates_item_33, k9t5p14_templates_item_34, k9t5p14_templates_item_35⟩ + +private theorem k9t5p14_templates_block_3_check : ∀ T ∈ k9t5p14_templates_block_3, T.Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p14_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p14_templates_item_36, k9t5p14_templates_item_37, k9t5p14_templates_item_38, k9t5p14_templates_item_39, k9t5p14_templates_item_40, k9t5p14_templates_item_41, k9t5p14_templates_item_42⟩ + +private theorem k9t5p14_part_3 : ∀ T ∈ k9t5p14.templates, T.Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t5p14_templates_block_0 ++ k9t5p14_templates_block_1 ++ k9t5p14_templates_block_2 ++ k9t5p14_templates_block_3), T.Check k9t5p14.graph k9t5p14.clique 9 (patternAmount ([[], [1, 2, 1]] : List (List ℕ))) (([[], [1, 2, 1]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t5p14_templates_block_0_check, k9t5p14_templates_block_1_check⟩, k9t5p14_templates_block_2_check⟩, k9t5p14_templates_block_3_check⟩ + +private theorem k9t5p14_part_4 : ∀ p ∈ k9t5p14.required, p.Check k9t5p14.graph 9 := by decide + +private theorem k9t5p14_part_5 : ClosureCheck k9t5p14.graph (k9t5p14.initialMatrix 9) 9 5 k9t5p14.closure := by + rw [k9t5p14_initial_eq] + exact k9t5p14_closure_0 + +private theorem k9t5p14_part_6 : k9t5p14.bad.Check k9t5p14.graph (k9t5p14.matrix 9) 9 5 := by + rw [k9t5p14_matrix_eq] + decide + +theorem k9t5p14_check : k9t5p14.Check 9 5 [[], [1, 2, 1]] := + ⟨k9t5p14_part_0, k9t5p14_part_1, k9t5p14_part_2, k9t5p14_part_3, k9t5p14_part_4, k9t5p14_part_5, k9t5p14_part_6⟩ +private def k9t5p15_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 2, [], [], [3, 4], 2, 6⟩, ⟨0, 2, [[5, 6, 7, 8]], [], [3, 4], 1, 2⟩, ⟨0, 3, [], [], [2, 1], 2, 6⟩, ⟨0, 3, [[5, 6, 7, 8]], [], [2, 1], 1, 2⟩, ⟨0, 6, [], [], [7, 8], 2, 6⟩, ⟨0, 6, [[1, 2, 3, 4]], [], [7, 8], 1, 2⟩, ⟨0, 7, [], [], [6, 5], 2, 6⟩, ⟨0, 7, [[1, 2, 3, 4]], [], [6, 5], 1, 2⟩, ⟨1, 2, [], [], [3, 4], 2, 6⟩, ⟨1, 2, [[5, 6, 7, 8]], [], [3, 4], 1, 2⟩, ⟨1, 6, [], [], [7, 8], 2, 6⟩, ⟨1, 6, [], [4, 3, 2], [7, 8], 1, 3⟩] + +private def k9t5p15_templates_block_1 : List (TemplateData (Fin 9)) := [⟨1, 7, [], [], [6, 5], 2, 6⟩, ⟨1, 7, [], [4, 3, 2], [6, 5], 1, 3⟩, ⟨2, 3, [], [1], [4], 2, 6⟩, ⟨2, 3, [[5, 6, 7, 8]], [1], [4], 1, 2⟩, ⟨2, 5, [], [4, 3], [], 2, 6⟩, ⟨2, 5, [], [4, 3], [6, 7, 8], 1, 3⟩, ⟨2, 6, [], [1], [5], 2, 6⟩, ⟨2, 6, [], [1], [7, 8], 1, 5⟩, ⟨2, 7, [], [1], [6, 5], 1, 5⟩, ⟨2, 7, [], [1], [8], 2, 6⟩, ⟨2, 8, [], [4, 3], [], 2, 6⟩, ⟨2, 8, [], [4, 3], [7, 6, 5], 1, 3⟩] + +private def k9t5p15_templates_block_2 : List (TemplateData (Fin 9)) := [⟨3, 4, [], [1, 2], [], 2, 6⟩, ⟨3, 4, [[5, 6, 7, 8]], [1, 2], [], 1, 2⟩, ⟨3, 5, [], [1, 2], [], 2, 6⟩, ⟨3, 5, [], [1, 2], [6, 7, 8], 1, 3⟩, ⟨3, 6, [], [1, 2], [5], 1, 5⟩, ⟨3, 6, [], [4], [5], 2, 6⟩, ⟨3, 7, [], [1, 2], [6, 5], 1, 4⟩, ⟨3, 7, [], [1, 2], [8], 1, 5⟩, ⟨3, 7, [], [4], [8], 2, 6⟩, ⟨3, 8, [], [1, 2], [], 2, 6⟩, ⟨3, 8, [], [1, 2], [7, 6, 5], 1, 3⟩, ⟨4, 6, [], [], [7, 8], 2, 6⟩] + +private def k9t5p15_templates_block_3 : List (TemplateData (Fin 9)) := [⟨4, 6, [], [1, 2, 3], [7, 8], 1, 3⟩, ⟨4, 7, [], [], [6, 5], 2, 6⟩, ⟨4, 7, [], [1, 2, 3], [6, 5], 1, 3⟩, ⟨5, 6, [], [], [7, 8], 2, 6⟩, ⟨5, 6, [[1, 2, 3, 4]], [], [7, 8], 1, 2⟩, ⟨6, 7, [], [5], [8], 2, 6⟩, ⟨6, 7, [[1, 2, 3, 4]], [5], [8], 1, 2⟩, ⟨7, 8, [], [5, 6], [], 2, 6⟩, ⟨7, 8, [[1, 2, 3, 4]], [5, 6], [], 1, 2⟩] + +def k9t5p15 : LayoutCertificate 9 where + chains := [[0], [1, 2, 3, 4], [5, 6, 7, 8]] + clique := {0, 1, 4, 5, 8} + templates := k9t5p15_templates_block_0 ++ k9t5p15_templates_block_1 ++ k9t5p15_templates_block_2 ++ k9t5p15_templates_block_3 + required := [] + closure := [] + bad := ⟨none, {(2, 3), (3, 3), (6, 3), (7, 3)}⟩ + + +private def k9t5p15_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p15_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p15_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_0) 0 j = k9t5p15_template_matrix_0 0 j := by decide + +private theorem k9t5p15_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_0) 1 j = k9t5p15_template_matrix_0 1 j := by decide + +private theorem k9t5p15_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_0) 2 j = k9t5p15_template_matrix_0 2 j := by decide + +private theorem k9t5p15_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_0) 3 j = k9t5p15_template_matrix_0 3 j := by decide + +private theorem k9t5p15_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_0) 4 j = k9t5p15_template_matrix_0 4 j := by decide + +private theorem k9t5p15_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_0) 5 j = k9t5p15_template_matrix_0 5 j := by decide + +private theorem k9t5p15_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_0) 6 j = k9t5p15_template_matrix_0 6 j := by decide + +private theorem k9t5p15_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_0) 7 j = k9t5p15_template_matrix_0 7 j := by decide + +private theorem k9t5p15_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_0) 8 j = k9t5p15_template_matrix_0 8 j := by decide + +private theorem k9t5p15_template_matrix_0_eq : (templateMatrix k9t5p15_templates_block_0) = k9t5p15_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t5p15_template_matrix_0_eq_row_0 j + + · exact k9t5p15_template_matrix_0_eq_row_1 j + + · exact k9t5p15_template_matrix_0_eq_row_2 j + + · exact k9t5p15_template_matrix_0_eq_row_3 j + + · exact k9t5p15_template_matrix_0_eq_row_4 j + + · exact k9t5p15_template_matrix_0_eq_row_5 j + + · exact k9t5p15_template_matrix_0_eq_row_6 j + + · exact k9t5p15_template_matrix_0_eq_row_7 j + + · exact k9t5p15_template_matrix_0_eq_row_8 j + +private def k9t5p15_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p15_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_1) 0 j = k9t5p15_template_matrix_1 0 j := by decide + +private theorem k9t5p15_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_1) 1 j = k9t5p15_template_matrix_1 1 j := by decide + +private theorem k9t5p15_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_1) 2 j = k9t5p15_template_matrix_1 2 j := by decide + +private theorem k9t5p15_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_1) 3 j = k9t5p15_template_matrix_1 3 j := by decide + +private theorem k9t5p15_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_1) 4 j = k9t5p15_template_matrix_1 4 j := by decide + +private theorem k9t5p15_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_1) 5 j = k9t5p15_template_matrix_1 5 j := by decide + +private theorem k9t5p15_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_1) 6 j = k9t5p15_template_matrix_1 6 j := by decide + +private theorem k9t5p15_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_1) 7 j = k9t5p15_template_matrix_1 7 j := by decide + +private theorem k9t5p15_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_1) 8 j = k9t5p15_template_matrix_1 8 j := by decide + +private theorem k9t5p15_template_matrix_1_eq : (templateMatrix k9t5p15_templates_block_1) = k9t5p15_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t5p15_template_matrix_1_eq_row_0 j + + · exact k9t5p15_template_matrix_1_eq_row_1 j + + · exact k9t5p15_template_matrix_1_eq_row_2 j + + · exact k9t5p15_template_matrix_1_eq_row_3 j + + · exact k9t5p15_template_matrix_1_eq_row_4 j + + · exact k9t5p15_template_matrix_1_eq_row_5 j + + · exact k9t5p15_template_matrix_1_eq_row_6 j + + · exact k9t5p15_template_matrix_1_eq_row_7 j + + · exact k9t5p15_template_matrix_1_eq_row_8 j + +private def k9t5p15_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6], + #[∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, Finset.Icc 2 6, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 2 6, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p15_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_2) 0 j = k9t5p15_template_matrix_2 0 j := by decide + +private theorem k9t5p15_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_2) 1 j = k9t5p15_template_matrix_2 1 j := by decide + +private theorem k9t5p15_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_2) 2 j = k9t5p15_template_matrix_2 2 j := by decide + +private theorem k9t5p15_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_2) 3 j = k9t5p15_template_matrix_2 3 j := by decide + +private theorem k9t5p15_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_2) 4 j = k9t5p15_template_matrix_2 4 j := by decide + +private theorem k9t5p15_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_2) 5 j = k9t5p15_template_matrix_2 5 j := by decide + +private theorem k9t5p15_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_2) 6 j = k9t5p15_template_matrix_2 6 j := by decide + +private theorem k9t5p15_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_2) 7 j = k9t5p15_template_matrix_2 7 j := by decide + +private theorem k9t5p15_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_2) 8 j = k9t5p15_template_matrix_2 8 j := by decide + +private theorem k9t5p15_template_matrix_2_eq : (templateMatrix k9t5p15_templates_block_2) = k9t5p15_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t5p15_template_matrix_2_eq_row_0 j + + · exact k9t5p15_template_matrix_2_eq_row_1 j + + · exact k9t5p15_template_matrix_2_eq_row_2 j + + · exact k9t5p15_template_matrix_2_eq_row_3 j + + · exact k9t5p15_template_matrix_2_eq_row_4 j + + · exact k9t5p15_template_matrix_2_eq_row_5 j + + · exact k9t5p15_template_matrix_2_eq_row_6 j + + · exact k9t5p15_template_matrix_2_eq_row_7 j + + · exact k9t5p15_template_matrix_2_eq_row_8 j + +private def k9t5p15_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, {1, 2, 3}, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅], + #[∅, ∅, ∅, ∅, {1, 2, 3}, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p15_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_3) 0 j = k9t5p15_template_matrix_3 0 j := by decide + +private theorem k9t5p15_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_3) 1 j = k9t5p15_template_matrix_3 1 j := by decide + +private theorem k9t5p15_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_3) 2 j = k9t5p15_template_matrix_3 2 j := by decide + +private theorem k9t5p15_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_3) 3 j = k9t5p15_template_matrix_3 3 j := by decide + +private theorem k9t5p15_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_3) 4 j = k9t5p15_template_matrix_3 4 j := by decide + +private theorem k9t5p15_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_3) 5 j = k9t5p15_template_matrix_3 5 j := by decide + +private theorem k9t5p15_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_3) 6 j = k9t5p15_template_matrix_3 6 j := by decide + +private theorem k9t5p15_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_3) 7 j = k9t5p15_template_matrix_3 7 j := by decide + +private theorem k9t5p15_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p15_templates_block_3) 8 j = k9t5p15_template_matrix_3 8 j := by decide + +private theorem k9t5p15_template_matrix_3_eq : (templateMatrix k9t5p15_templates_block_3) = k9t5p15_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t5p15_template_matrix_3_eq_row_0 j + + · exact k9t5p15_template_matrix_3_eq_row_1 j + + · exact k9t5p15_template_matrix_3_eq_row_2 j + + · exact k9t5p15_template_matrix_3_eq_row_3 j + + · exact k9t5p15_template_matrix_3_eq_row_4 j + + · exact k9t5p15_template_matrix_3_eq_row_5 j + + · exact k9t5p15_template_matrix_3_eq_row_6 j + + · exact k9t5p15_template_matrix_3_eq_row_7 j + + · exact k9t5p15_template_matrix_3_eq_row_8 j + +private theorem k9t5p15_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => (((k9t5p15_template_matrix_0 i j ∪ k9t5p15_template_matrix_1 i j) ∪ k9t5p15_template_matrix_2 i j) ∪ k9t5p15_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p15.required i j) 0 j = k9t5p15_state_0 0 j := by decide + +private theorem k9t5p15_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => (((k9t5p15_template_matrix_0 i j ∪ k9t5p15_template_matrix_1 i j) ∪ k9t5p15_template_matrix_2 i j) ∪ k9t5p15_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p15.required i j) 1 j = k9t5p15_state_0 1 j := by decide + +private theorem k9t5p15_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => (((k9t5p15_template_matrix_0 i j ∪ k9t5p15_template_matrix_1 i j) ∪ k9t5p15_template_matrix_2 i j) ∪ k9t5p15_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p15.required i j) 2 j = k9t5p15_state_0 2 j := by decide + +private theorem k9t5p15_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => (((k9t5p15_template_matrix_0 i j ∪ k9t5p15_template_matrix_1 i j) ∪ k9t5p15_template_matrix_2 i j) ∪ k9t5p15_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p15.required i j) 3 j = k9t5p15_state_0 3 j := by decide + +private theorem k9t5p15_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => (((k9t5p15_template_matrix_0 i j ∪ k9t5p15_template_matrix_1 i j) ∪ k9t5p15_template_matrix_2 i j) ∪ k9t5p15_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p15.required i j) 4 j = k9t5p15_state_0 4 j := by decide + +private theorem k9t5p15_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => (((k9t5p15_template_matrix_0 i j ∪ k9t5p15_template_matrix_1 i j) ∪ k9t5p15_template_matrix_2 i j) ∪ k9t5p15_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p15.required i j) 5 j = k9t5p15_state_0 5 j := by decide + +private theorem k9t5p15_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => (((k9t5p15_template_matrix_0 i j ∪ k9t5p15_template_matrix_1 i j) ∪ k9t5p15_template_matrix_2 i j) ∪ k9t5p15_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p15.required i j) 6 j = k9t5p15_state_0 6 j := by decide + +private theorem k9t5p15_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => (((k9t5p15_template_matrix_0 i j ∪ k9t5p15_template_matrix_1 i j) ∪ k9t5p15_template_matrix_2 i j) ∪ k9t5p15_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p15.required i j) 7 j = k9t5p15_state_0 7 j := by decide + +private theorem k9t5p15_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => (((k9t5p15_template_matrix_0 i j ∪ k9t5p15_template_matrix_1 i j) ∪ k9t5p15_template_matrix_2 i j) ∪ k9t5p15_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p15.required i j) 8 j = k9t5p15_state_0 8 j := by decide + +private theorem k9t5p15_initial_merged_eq : (fun i j => (((k9t5p15_template_matrix_0 i j ∪ k9t5p15_template_matrix_1 i j) ∪ k9t5p15_template_matrix_2 i j) ∪ k9t5p15_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p15.required i j) = k9t5p15_state_0 := by + funext i j + fin_cases i + + · exact k9t5p15_initial_merged_eq_row_0 j + + · exact k9t5p15_initial_merged_eq_row_1 j + + · exact k9t5p15_initial_merged_eq_row_2 j + + · exact k9t5p15_initial_merged_eq_row_3 j + + · exact k9t5p15_initial_merged_eq_row_4 j + + · exact k9t5p15_initial_merged_eq_row_5 j + + · exact k9t5p15_initial_merged_eq_row_6 j + + · exact k9t5p15_initial_merged_eq_row_7 j + + · exact k9t5p15_initial_merged_eq_row_8 j + +private theorem k9t5p15_initial_eq : k9t5p15.initialMatrix 9 = k9t5p15_state_0 := by + funext i j + change templateMatrix (k9t5p15_templates_block_0 ++ k9t5p15_templates_block_1 ++ k9t5p15_templates_block_2 ++ k9t5p15_templates_block_3) i j ∪ requiredMatrix 9 k9t5p15.required i j = _ + simp only [templateMatrix_append, k9t5p15_template_matrix_0_eq, k9t5p15_template_matrix_1_eq, k9t5p15_template_matrix_2_eq, k9t5p15_template_matrix_3_eq] + exact congrFun (congrFun k9t5p15_initial_merged_eq i) j + +private theorem k9t5p15_closure_0 : ClosureCheck k9t5p15.graph k9t5p15_state_0 9 5 [] := by trivial + +private theorem k9t5p15_matrix_eq : k9t5p15.matrix 9 = k9t5p15_state_0 := by + change closureMatrix (k9t5p15.initialMatrix 9) _ = _ + rw [k9t5p15_initial_eq] + change closureMatrix k9t5p15_state_0 [] = _ + rfl + +private theorem k9t5p15_part_0 : k9t5p15.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p15_part_1 : k9t5p15.chains.map List.length = ([[], [2], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p15_part_2 : k9t5p15.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p15.clique))) = ([[], [2], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p15_templates_item_0 : (⟨0, 2, [], [], [3, 4], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_1 : (⟨0, 2, [[5, 6, 7, 8]], [], [3, 4], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_2 : (⟨0, 3, [], [], [2, 1], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_3 : (⟨0, 3, [[5, 6, 7, 8]], [], [2, 1], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_4 : (⟨0, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_5 : (⟨0, 6, [[1, 2, 3, 4]], [], [7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_6 : (⟨0, 7, [], [], [6, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_7 : (⟨0, 7, [[1, 2, 3, 4]], [], [6, 5], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_8 : (⟨1, 2, [], [], [3, 4], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_9 : (⟨1, 2, [[5, 6, 7, 8]], [], [3, 4], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_10 : (⟨1, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_11 : (⟨1, 6, [], [4, 3, 2], [7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_12 : (⟨1, 7, [], [], [6, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_13 : (⟨1, 7, [], [4, 3, 2], [6, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_14 : (⟨2, 3, [], [1], [4], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_15 : (⟨2, 3, [[5, 6, 7, 8]], [1], [4], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_16 : (⟨2, 5, [], [4, 3], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_17 : (⟨2, 5, [], [4, 3], [6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_18 : (⟨2, 6, [], [1], [5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_19 : (⟨2, 6, [], [1], [7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_20 : (⟨2, 7, [], [1], [6, 5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_21 : (⟨2, 7, [], [1], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_22 : (⟨2, 8, [], [4, 3], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_23 : (⟨2, 8, [], [4, 3], [7, 6, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_24 : (⟨3, 4, [], [1, 2], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_25 : (⟨3, 4, [[5, 6, 7, 8]], [1, 2], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_26 : (⟨3, 5, [], [1, 2], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_27 : (⟨3, 5, [], [1, 2], [6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_28 : (⟨3, 6, [], [1, 2], [5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_29 : (⟨3, 6, [], [4], [5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_30 : (⟨3, 7, [], [1, 2], [6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_31 : (⟨3, 7, [], [1, 2], [8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_32 : (⟨3, 7, [], [4], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_33 : (⟨3, 8, [], [1, 2], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_34 : (⟨3, 8, [], [1, 2], [7, 6, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_35 : (⟨4, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_36 : (⟨4, 6, [], [1, 2, 3], [7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_37 : (⟨4, 7, [], [], [6, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_38 : (⟨4, 7, [], [1, 2, 3], [6, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_39 : (⟨5, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_40 : (⟨5, 6, [[1, 2, 3, 4]], [], [7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_41 : (⟨6, 7, [], [5], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_42 : (⟨6, 7, [[1, 2, 3, 4]], [5], [8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_43 : (⟨7, 8, [], [5, 6], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_item_44 : (⟨7, 8, [[1, 2, 3, 4]], [5, 6], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p15_templates_block_0_check : ∀ T ∈ k9t5p15_templates_block_0, T.Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p15_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p15_templates_item_0, k9t5p15_templates_item_1, k9t5p15_templates_item_2, k9t5p15_templates_item_3, k9t5p15_templates_item_4, k9t5p15_templates_item_5, k9t5p15_templates_item_6, k9t5p15_templates_item_7, k9t5p15_templates_item_8, k9t5p15_templates_item_9, k9t5p15_templates_item_10, k9t5p15_templates_item_11⟩ + +private theorem k9t5p15_templates_block_1_check : ∀ T ∈ k9t5p15_templates_block_1, T.Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p15_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p15_templates_item_12, k9t5p15_templates_item_13, k9t5p15_templates_item_14, k9t5p15_templates_item_15, k9t5p15_templates_item_16, k9t5p15_templates_item_17, k9t5p15_templates_item_18, k9t5p15_templates_item_19, k9t5p15_templates_item_20, k9t5p15_templates_item_21, k9t5p15_templates_item_22, k9t5p15_templates_item_23⟩ + +private theorem k9t5p15_templates_block_2_check : ∀ T ∈ k9t5p15_templates_block_2, T.Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p15_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p15_templates_item_24, k9t5p15_templates_item_25, k9t5p15_templates_item_26, k9t5p15_templates_item_27, k9t5p15_templates_item_28, k9t5p15_templates_item_29, k9t5p15_templates_item_30, k9t5p15_templates_item_31, k9t5p15_templates_item_32, k9t5p15_templates_item_33, k9t5p15_templates_item_34, k9t5p15_templates_item_35⟩ + +private theorem k9t5p15_templates_block_3_check : ∀ T ∈ k9t5p15_templates_block_3, T.Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p15_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p15_templates_item_36, k9t5p15_templates_item_37, k9t5p15_templates_item_38, k9t5p15_templates_item_39, k9t5p15_templates_item_40, k9t5p15_templates_item_41, k9t5p15_templates_item_42, k9t5p15_templates_item_43, k9t5p15_templates_item_44⟩ + +private theorem k9t5p15_part_3 : ∀ T ∈ k9t5p15.templates, T.Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t5p15_templates_block_0 ++ k9t5p15_templates_block_1 ++ k9t5p15_templates_block_2 ++ k9t5p15_templates_block_3), T.Check k9t5p15.graph k9t5p15.clique 9 (patternAmount ([[], [2], [2]] : List (List ℕ))) (([[], [2], [2]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t5p15_templates_block_0_check, k9t5p15_templates_block_1_check⟩, k9t5p15_templates_block_2_check⟩, k9t5p15_templates_block_3_check⟩ + +private theorem k9t5p15_part_4 : ∀ p ∈ k9t5p15.required, p.Check k9t5p15.graph 9 := by decide + +private theorem k9t5p15_part_5 : ClosureCheck k9t5p15.graph (k9t5p15.initialMatrix 9) 9 5 k9t5p15.closure := by + rw [k9t5p15_initial_eq] + exact k9t5p15_closure_0 + +private theorem k9t5p15_part_6 : k9t5p15.bad.Check k9t5p15.graph (k9t5p15.matrix 9) 9 5 := by + rw [k9t5p15_matrix_eq] + decide + +theorem k9t5p15_check : k9t5p15.Check 9 5 [[], [2], [2]] := + ⟨k9t5p15_part_0, k9t5p15_part_1, k9t5p15_part_2, k9t5p15_part_3, k9t5p15_part_4, k9t5p15_part_5, k9t5p15_part_6⟩ +def k9t5p16 : LayoutCertificate 8 where + chains := [[0, 1, 2], [3, 4, 5, 6, 7]] + clique := {0, 2, 3, 5, 7} + templates := [⟨0, 1, [], [], [2], 2, 7⟩, + ⟨0, 1, [[3, 4, 5]], [], [2], 1, 4⟩, + ⟨0, 3, [], [2, 1], [], 2, 6⟩, + ⟨0, 3, [], [2, 1], [4, 5, 6, 7], 1, 2⟩, + ⟨0, 4, [], [], [3], 2, 7⟩, + ⟨0, 4, [], [2, 1], [3], 1, 5⟩, + ⟨0, 6, [], [], [5], 2, 7⟩, + ⟨0, 6, [], [2, 1], [5], 1, 5⟩, + ⟨0, 7, [], [2, 1], [], 2, 6⟩, + ⟨0, 7, [], [2, 1], [6, 5, 4, 3], 1, 2⟩, + ⟨1, 2, [], [0], [], 2, 7⟩, + ⟨1, 2, [[3, 4, 5]], [0], [], 1, 4⟩, + ⟨1, 3, [], [0], [], 2, 7⟩, + ⟨1, 3, [], [0], [4, 5], 1, 5⟩, + ⟨1, 4, [], [0], [3], 1, 6⟩, + ⟨1, 5, [], [0], [], 2, 7⟩, + ⟨1, 5, [], [0], [4, 3], 1, 5⟩, + ⟨1, 6, [], [0], [5], 1, 6⟩, + ⟨1, 7, [], [0], [], 2, 7⟩, + ⟨1, 7, [[3, 4, 5]], [0], [], 1, 4⟩, + ⟨2, 4, [], [], [3], 2, 7⟩, + ⟨2, 4, [], [0, 1], [3], 1, 5⟩, + ⟨2, 6, [], [], [5], 2, 7⟩, + ⟨2, 6, [], [0, 1], [5], 1, 5⟩, + ⟨3, 4, [], [], [5], 2, 7⟩, + ⟨3, 4, [[0, 1, 2]], [], [5], 1, 4⟩, + ⟨3, 6, [], [], [5], 2, 7⟩, + ⟨3, 6, [[0, 1, 2]], [], [5], 1, 4⟩, + ⟨4, 5, [], [3], [], 2, 7⟩, + ⟨4, 5, [[0, 1, 2]], [3], [], 1, 4⟩, + ⟨4, 6, [], [3], [5], 1, 6⟩, + ⟨4, 7, [], [3], [], 2, 7⟩, + ⟨4, 7, [[0, 1, 2]], [3], [], 1, 4⟩, + ⟨5, 6, [], [], [7], 2, 7⟩, + ⟨5, 6, [[0, 1, 2]], [], [7], 1, 4⟩, + ⟨6, 7, [], [5], [], 2, 7⟩, + ⟨6, 7, [[0, 1, 2]], [5], [], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(1, 3), (4, 3), (6, 3), (0, 3)}⟩ + + +private def k9t5p16_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 7, ∅, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[Finset.Icc 1 6, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p16_initial_eq_row_0 : ∀ j : Fin 8, (k9t5p16.initialMatrix 9) 0 j = k9t5p16_state_0 0 j := by decide + +private theorem k9t5p16_initial_eq_row_1 : ∀ j : Fin 8, (k9t5p16.initialMatrix 9) 1 j = k9t5p16_state_0 1 j := by decide + +private theorem k9t5p16_initial_eq_row_2 : ∀ j : Fin 8, (k9t5p16.initialMatrix 9) 2 j = k9t5p16_state_0 2 j := by decide + +private theorem k9t5p16_initial_eq_row_3 : ∀ j : Fin 8, (k9t5p16.initialMatrix 9) 3 j = k9t5p16_state_0 3 j := by decide + +private theorem k9t5p16_initial_eq_row_4 : ∀ j : Fin 8, (k9t5p16.initialMatrix 9) 4 j = k9t5p16_state_0 4 j := by decide + +private theorem k9t5p16_initial_eq_row_5 : ∀ j : Fin 8, (k9t5p16.initialMatrix 9) 5 j = k9t5p16_state_0 5 j := by decide + +private theorem k9t5p16_initial_eq_row_6 : ∀ j : Fin 8, (k9t5p16.initialMatrix 9) 6 j = k9t5p16_state_0 6 j := by decide + +private theorem k9t5p16_initial_eq_row_7 : ∀ j : Fin 8, (k9t5p16.initialMatrix 9) 7 j = k9t5p16_state_0 7 j := by decide + +private theorem k9t5p16_initial_eq : (k9t5p16.initialMatrix 9) = k9t5p16_state_0 := by + funext i j + fin_cases i + + · exact k9t5p16_initial_eq_row_0 j + + · exact k9t5p16_initial_eq_row_1 j + + · exact k9t5p16_initial_eq_row_2 j + + · exact k9t5p16_initial_eq_row_3 j + + · exact k9t5p16_initial_eq_row_4 j + + · exact k9t5p16_initial_eq_row_5 j + + · exact k9t5p16_initial_eq_row_6 j + + · exact k9t5p16_initial_eq_row_7 j + +private theorem k9t5p16_closure_0 : ClosureCheck k9t5p16.graph k9t5p16_state_0 9 5 [] := by trivial + +private theorem k9t5p16_matrix_eq : k9t5p16.matrix 9 = k9t5p16_state_0 := by + change closureMatrix (k9t5p16.initialMatrix 9) _ = _ + rw [k9t5p16_initial_eq] + change closureMatrix k9t5p16_state_0 [] = _ + rfl + +private theorem k9t5p16_part_0 : k9t5p16.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p16_part_1 : k9t5p16.chains.map List.length = ([[1], [1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p16_part_2 : k9t5p16.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p16.clique))) = ([[1], [1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p16_templates_item_0 : (⟨0, 1, [], [], [2], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_1 : (⟨0, 1, [[3, 4, 5]], [], [2], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_2 : (⟨0, 3, [], [2, 1], [], 2, 6⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_3 : (⟨0, 3, [], [2, 1], [4, 5, 6, 7], 1, 2⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_4 : (⟨0, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_5 : (⟨0, 4, [], [2, 1], [3], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_6 : (⟨0, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_7 : (⟨0, 6, [], [2, 1], [5], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_8 : (⟨0, 7, [], [2, 1], [], 2, 6⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_9 : (⟨0, 7, [], [2, 1], [6, 5, 4, 3], 1, 2⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_10 : (⟨1, 2, [], [0], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_11 : (⟨1, 2, [[3, 4, 5]], [0], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_12 : (⟨1, 3, [], [0], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_13 : (⟨1, 3, [], [0], [4, 5], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_14 : (⟨1, 4, [], [0], [3], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_15 : (⟨1, 5, [], [0], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_16 : (⟨1, 5, [], [0], [4, 3], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_17 : (⟨1, 6, [], [0], [5], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_18 : (⟨1, 7, [], [0], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_19 : (⟨1, 7, [[3, 4, 5]], [0], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_20 : (⟨2, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_21 : (⟨2, 4, [], [0, 1], [3], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_22 : (⟨2, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_23 : (⟨2, 6, [], [0, 1], [5], 1, 5⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_24 : (⟨3, 4, [], [], [5], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_25 : (⟨3, 4, [[0, 1, 2]], [], [5], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_26 : (⟨3, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_27 : (⟨3, 6, [[0, 1, 2]], [], [5], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_28 : (⟨4, 5, [], [3], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_29 : (⟨4, 5, [[0, 1, 2]], [3], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_30 : (⟨4, 6, [], [3], [5], 1, 6⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_31 : (⟨4, 7, [], [3], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_32 : (⟨4, 7, [[0, 1, 2]], [3], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_33 : (⟨5, 6, [], [], [7], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_34 : (⟨5, 6, [[0, 1, 2]], [], [7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_35 : (⟨6, 7, [], [5], [], 2, 7⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_templates_item_36 : (⟨6, 7, [[0, 1, 2]], [5], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p16_part_3 : ∀ T ∈ k9t5p16.templates, T.Check k9t5p16.graph k9t5p16.clique 9 (patternAmount ([[1], [1, 1]] : List (List ℕ))) (([[1], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p16, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p16_templates_item_0, k9t5p16_templates_item_1, k9t5p16_templates_item_2, k9t5p16_templates_item_3, k9t5p16_templates_item_4, k9t5p16_templates_item_5, k9t5p16_templates_item_6, k9t5p16_templates_item_7, k9t5p16_templates_item_8, k9t5p16_templates_item_9, k9t5p16_templates_item_10, k9t5p16_templates_item_11, k9t5p16_templates_item_12, k9t5p16_templates_item_13, k9t5p16_templates_item_14, k9t5p16_templates_item_15, k9t5p16_templates_item_16, k9t5p16_templates_item_17, k9t5p16_templates_item_18, k9t5p16_templates_item_19, k9t5p16_templates_item_20, k9t5p16_templates_item_21, k9t5p16_templates_item_22, k9t5p16_templates_item_23, k9t5p16_templates_item_24, k9t5p16_templates_item_25, k9t5p16_templates_item_26, k9t5p16_templates_item_27, k9t5p16_templates_item_28, k9t5p16_templates_item_29, k9t5p16_templates_item_30, k9t5p16_templates_item_31, k9t5p16_templates_item_32, k9t5p16_templates_item_33, k9t5p16_templates_item_34, k9t5p16_templates_item_35, k9t5p16_templates_item_36⟩ + +private theorem k9t5p16_part_4 : ∀ p ∈ k9t5p16.required, p.Check k9t5p16.graph 9 := by decide + +private theorem k9t5p16_part_5 : ClosureCheck k9t5p16.graph (k9t5p16.initialMatrix 9) 9 5 k9t5p16.closure := by + rw [k9t5p16_initial_eq] + exact k9t5p16_closure_0 + +private theorem k9t5p16_part_6 : k9t5p16.bad.Check k9t5p16.graph (k9t5p16.matrix 9) 9 5 := by + rw [k9t5p16_matrix_eq] + decide + +theorem k9t5p16_check : k9t5p16.Check 9 5 [[1], [1, 1]] := + ⟨k9t5p16_part_0, k9t5p16_part_1, k9t5p16_part_2, k9t5p16_part_3, k9t5p16_part_4, k9t5p16_part_5, k9t5p16_part_6⟩ +private def k9t5p17_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [[3, 4, 5]], [], [2], 2, 4⟩, ⟨0, 1, [[5, 6, 7, 8]], [], [2], 1, 3⟩, ⟨0, 4, [], [2, 1], [3], 2, 5⟩, ⟨0, 4, [[5, 6, 7, 8]], [], [3], 1, 3⟩, ⟨0, 6, [], [], [7, 8], 2, 6⟩, ⟨0, 6, [], [2, 1], [7, 8], 1, 4⟩, ⟨0, 7, [], [], [6, 5], 2, 6⟩, ⟨0, 7, [], [2, 1], [6, 5], 1, 4⟩, ⟨1, 2, [[3, 4, 5]], [0], [], 2, 4⟩, ⟨1, 2, [[5, 6, 7, 8]], [0], [], 1, 3⟩, ⟨1, 3, [], [0], [4, 5], 2, 5⟩, ⟨1, 3, [[5, 6, 7, 8]], [0], [], 1, 3⟩] + +private def k9t5p17_templates_block_1 : List (TemplateData (Fin 9)) := [⟨1, 4, [], [0], [3], 2, 6⟩, ⟨1, 4, [[5, 6, 7, 8]], [0], [3], 1, 2⟩, ⟨1, 5, [], [0], [4, 3], 2, 5⟩, ⟨1, 5, [], [0], [6, 7, 8], 1, 4⟩, ⟨1, 6, [], [0], [5], 2, 6⟩, ⟨1, 6, [], [0], [7, 8], 1, 5⟩, ⟨1, 7, [], [0], [6, 5], 1, 5⟩, ⟨1, 7, [], [0], [8], 2, 6⟩, ⟨1, 8, [[3, 4, 5]], [0], [], 2, 4⟩, ⟨1, 8, [], [0], [7, 6, 5], 1, 4⟩, ⟨2, 4, [], [0, 1], [3], 2, 5⟩, ⟨2, 4, [[5, 6, 7, 8]], [], [3], 1, 3⟩] + +private def k9t5p17_templates_block_2 : List (TemplateData (Fin 9)) := [⟨2, 6, [], [], [7, 8], 2, 6⟩, ⟨2, 6, [], [0, 1], [7, 8], 1, 4⟩, ⟨2, 7, [], [], [6, 5], 2, 6⟩, ⟨2, 7, [], [0, 1], [6, 5], 1, 4⟩, ⟨3, 4, [[0, 1, 2]], [], [5], 2, 4⟩, ⟨3, 4, [], [], [5, 6, 7, 8], 1, 4⟩, ⟨3, 6, [], [], [7, 8], 2, 6⟩, ⟨3, 6, [[0, 1, 2]], [], [7, 8], 1, 3⟩, ⟨3, 7, [], [], [6, 5], 2, 6⟩, ⟨3, 7, [[0, 1, 2]], [], [6, 5], 1, 3⟩, ⟨4, 5, [[0, 1, 2]], [3], [], 2, 4⟩, ⟨4, 5, [], [3], [6, 7, 8], 1, 4⟩] + +private def k9t5p17_templates_block_3 : List (TemplateData (Fin 9)) := [⟨4, 6, [], [3], [5], 2, 6⟩, ⟨4, 6, [], [3], [7, 8], 1, 5⟩, ⟨4, 7, [], [3], [6, 5], 1, 5⟩, ⟨4, 7, [], [3], [8], 2, 6⟩, ⟨4, 8, [[0, 1, 2]], [3], [], 2, 4⟩, ⟨4, 8, [], [3], [7, 6, 5], 1, 4⟩, ⟨5, 6, [], [], [7, 8], 2, 6⟩, ⟨5, 6, [[0, 1, 2]], [], [7, 8], 1, 3⟩, ⟨6, 7, [], [5], [8], 2, 6⟩, ⟨6, 7, [[0, 1, 2]], [5], [8], 1, 3⟩, ⟨7, 8, [], [5, 6], [], 2, 6⟩, ⟨7, 8, [[0, 1, 2]], [5, 6], [], 1, 3⟩] + +def k9t5p17 : LayoutCertificate 9 where + chains := [[0, 1, 2], [3, 4, 5, 6, 7, 8]] + clique := {0, 2, 3, 5, 8} + templates := k9t5p17_templates_block_0 ++ k9t5p17_templates_block_1 ++ k9t5p17_templates_block_2 ++ k9t5p17_templates_block_3 + required := [] + closure := [] + bad := ⟨none, {(1, 3), (4, 3), (7, 3), (6, 3)}⟩ + + +private def k9t5p17_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 4, ∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, Finset.Icc 1 4, ∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[∅, Finset.Icc 1 4, ∅, ∅, Finset.Icc 1 4, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p17_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 4, ∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p17_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_0) 0 j = k9t5p17_template_matrix_0 0 j := by decide + +private theorem k9t5p17_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_0) 1 j = k9t5p17_template_matrix_0 1 j := by decide + +private theorem k9t5p17_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_0) 2 j = k9t5p17_template_matrix_0 2 j := by decide + +private theorem k9t5p17_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_0) 3 j = k9t5p17_template_matrix_0 3 j := by decide + +private theorem k9t5p17_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_0) 4 j = k9t5p17_template_matrix_0 4 j := by decide + +private theorem k9t5p17_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_0) 5 j = k9t5p17_template_matrix_0 5 j := by decide + +private theorem k9t5p17_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_0) 6 j = k9t5p17_template_matrix_0 6 j := by decide + +private theorem k9t5p17_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_0) 7 j = k9t5p17_template_matrix_0 7 j := by decide + +private theorem k9t5p17_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_0) 8 j = k9t5p17_template_matrix_0 8 j := by decide + +private theorem k9t5p17_template_matrix_0_eq : (templateMatrix k9t5p17_templates_block_0) = k9t5p17_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t5p17_template_matrix_0_eq_row_0 j + + · exact k9t5p17_template_matrix_0_eq_row_1 j + + · exact k9t5p17_template_matrix_0_eq_row_2 j + + · exact k9t5p17_template_matrix_0_eq_row_3 j + + · exact k9t5p17_template_matrix_0_eq_row_4 j + + · exact k9t5p17_template_matrix_0_eq_row_5 j + + · exact k9t5p17_template_matrix_0_eq_row_6 j + + · exact k9t5p17_template_matrix_0_eq_row_7 j + + · exact k9t5p17_template_matrix_0_eq_row_8 j + +private def k9t5p17_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, ∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p17_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_1) 0 j = k9t5p17_template_matrix_1 0 j := by decide + +private theorem k9t5p17_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_1) 1 j = k9t5p17_template_matrix_1 1 j := by decide + +private theorem k9t5p17_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_1) 2 j = k9t5p17_template_matrix_1 2 j := by decide + +private theorem k9t5p17_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_1) 3 j = k9t5p17_template_matrix_1 3 j := by decide + +private theorem k9t5p17_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_1) 4 j = k9t5p17_template_matrix_1 4 j := by decide + +private theorem k9t5p17_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_1) 5 j = k9t5p17_template_matrix_1 5 j := by decide + +private theorem k9t5p17_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_1) 6 j = k9t5p17_template_matrix_1 6 j := by decide + +private theorem k9t5p17_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_1) 7 j = k9t5p17_template_matrix_1 7 j := by decide + +private theorem k9t5p17_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_1) 8 j = k9t5p17_template_matrix_1 8 j := by decide + +private theorem k9t5p17_template_matrix_1_eq : (templateMatrix k9t5p17_templates_block_1) = k9t5p17_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t5p17_template_matrix_1_eq_row_0 j + + · exact k9t5p17_template_matrix_1_eq_row_1 j + + · exact k9t5p17_template_matrix_1_eq_row_2 j + + · exact k9t5p17_template_matrix_1_eq_row_3 j + + · exact k9t5p17_template_matrix_1_eq_row_4 j + + · exact k9t5p17_template_matrix_1_eq_row_5 j + + · exact k9t5p17_template_matrix_1_eq_row_6 j + + · exact k9t5p17_template_matrix_1_eq_row_7 j + + · exact k9t5p17_template_matrix_1_eq_row_8 j + +private def k9t5p17_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p17_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_2) 0 j = k9t5p17_template_matrix_2 0 j := by decide + +private theorem k9t5p17_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_2) 1 j = k9t5p17_template_matrix_2 1 j := by decide + +private theorem k9t5p17_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_2) 2 j = k9t5p17_template_matrix_2 2 j := by decide + +private theorem k9t5p17_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_2) 3 j = k9t5p17_template_matrix_2 3 j := by decide + +private theorem k9t5p17_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_2) 4 j = k9t5p17_template_matrix_2 4 j := by decide + +private theorem k9t5p17_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_2) 5 j = k9t5p17_template_matrix_2 5 j := by decide + +private theorem k9t5p17_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_2) 6 j = k9t5p17_template_matrix_2 6 j := by decide + +private theorem k9t5p17_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_2) 7 j = k9t5p17_template_matrix_2 7 j := by decide + +private theorem k9t5p17_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_2) 8 j = k9t5p17_template_matrix_2 8 j := by decide + +private theorem k9t5p17_template_matrix_2_eq : (templateMatrix k9t5p17_templates_block_2) = k9t5p17_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t5p17_template_matrix_2_eq_row_0 j + + · exact k9t5p17_template_matrix_2_eq_row_1 j + + · exact k9t5p17_template_matrix_2_eq_row_2 j + + · exact k9t5p17_template_matrix_2_eq_row_3 j + + · exact k9t5p17_template_matrix_2_eq_row_4 j + + · exact k9t5p17_template_matrix_2_eq_row_5 j + + · exact k9t5p17_template_matrix_2_eq_row_6 j + + · exact k9t5p17_template_matrix_2_eq_row_7 j + + · exact k9t5p17_template_matrix_2_eq_row_8 j + +private def k9t5p17_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p17_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_3) 0 j = k9t5p17_template_matrix_3 0 j := by decide + +private theorem k9t5p17_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_3) 1 j = k9t5p17_template_matrix_3 1 j := by decide + +private theorem k9t5p17_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_3) 2 j = k9t5p17_template_matrix_3 2 j := by decide + +private theorem k9t5p17_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_3) 3 j = k9t5p17_template_matrix_3 3 j := by decide + +private theorem k9t5p17_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_3) 4 j = k9t5p17_template_matrix_3 4 j := by decide + +private theorem k9t5p17_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_3) 5 j = k9t5p17_template_matrix_3 5 j := by decide + +private theorem k9t5p17_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_3) 6 j = k9t5p17_template_matrix_3 6 j := by decide + +private theorem k9t5p17_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_3) 7 j = k9t5p17_template_matrix_3 7 j := by decide + +private theorem k9t5p17_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p17_templates_block_3) 8 j = k9t5p17_template_matrix_3 8 j := by decide + +private theorem k9t5p17_template_matrix_3_eq : (templateMatrix k9t5p17_templates_block_3) = k9t5p17_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t5p17_template_matrix_3_eq_row_0 j + + · exact k9t5p17_template_matrix_3_eq_row_1 j + + · exact k9t5p17_template_matrix_3_eq_row_2 j + + · exact k9t5p17_template_matrix_3_eq_row_3 j + + · exact k9t5p17_template_matrix_3_eq_row_4 j + + · exact k9t5p17_template_matrix_3_eq_row_5 j + + · exact k9t5p17_template_matrix_3_eq_row_6 j + + · exact k9t5p17_template_matrix_3_eq_row_7 j + + · exact k9t5p17_template_matrix_3_eq_row_8 j + +private theorem k9t5p17_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => (((k9t5p17_template_matrix_0 i j ∪ k9t5p17_template_matrix_1 i j) ∪ k9t5p17_template_matrix_2 i j) ∪ k9t5p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p17.required i j) 0 j = k9t5p17_state_0 0 j := by decide + +private theorem k9t5p17_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => (((k9t5p17_template_matrix_0 i j ∪ k9t5p17_template_matrix_1 i j) ∪ k9t5p17_template_matrix_2 i j) ∪ k9t5p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p17.required i j) 1 j = k9t5p17_state_0 1 j := by decide + +private theorem k9t5p17_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => (((k9t5p17_template_matrix_0 i j ∪ k9t5p17_template_matrix_1 i j) ∪ k9t5p17_template_matrix_2 i j) ∪ k9t5p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p17.required i j) 2 j = k9t5p17_state_0 2 j := by decide + +private theorem k9t5p17_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => (((k9t5p17_template_matrix_0 i j ∪ k9t5p17_template_matrix_1 i j) ∪ k9t5p17_template_matrix_2 i j) ∪ k9t5p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p17.required i j) 3 j = k9t5p17_state_0 3 j := by decide + +private theorem k9t5p17_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => (((k9t5p17_template_matrix_0 i j ∪ k9t5p17_template_matrix_1 i j) ∪ k9t5p17_template_matrix_2 i j) ∪ k9t5p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p17.required i j) 4 j = k9t5p17_state_0 4 j := by decide + +private theorem k9t5p17_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => (((k9t5p17_template_matrix_0 i j ∪ k9t5p17_template_matrix_1 i j) ∪ k9t5p17_template_matrix_2 i j) ∪ k9t5p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p17.required i j) 5 j = k9t5p17_state_0 5 j := by decide + +private theorem k9t5p17_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => (((k9t5p17_template_matrix_0 i j ∪ k9t5p17_template_matrix_1 i j) ∪ k9t5p17_template_matrix_2 i j) ∪ k9t5p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p17.required i j) 6 j = k9t5p17_state_0 6 j := by decide + +private theorem k9t5p17_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => (((k9t5p17_template_matrix_0 i j ∪ k9t5p17_template_matrix_1 i j) ∪ k9t5p17_template_matrix_2 i j) ∪ k9t5p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p17.required i j) 7 j = k9t5p17_state_0 7 j := by decide + +private theorem k9t5p17_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => (((k9t5p17_template_matrix_0 i j ∪ k9t5p17_template_matrix_1 i j) ∪ k9t5p17_template_matrix_2 i j) ∪ k9t5p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p17.required i j) 8 j = k9t5p17_state_0 8 j := by decide + +private theorem k9t5p17_initial_merged_eq : (fun i j => (((k9t5p17_template_matrix_0 i j ∪ k9t5p17_template_matrix_1 i j) ∪ k9t5p17_template_matrix_2 i j) ∪ k9t5p17_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p17.required i j) = k9t5p17_state_0 := by + funext i j + fin_cases i + + · exact k9t5p17_initial_merged_eq_row_0 j + + · exact k9t5p17_initial_merged_eq_row_1 j + + · exact k9t5p17_initial_merged_eq_row_2 j + + · exact k9t5p17_initial_merged_eq_row_3 j + + · exact k9t5p17_initial_merged_eq_row_4 j + + · exact k9t5p17_initial_merged_eq_row_5 j + + · exact k9t5p17_initial_merged_eq_row_6 j + + · exact k9t5p17_initial_merged_eq_row_7 j + + · exact k9t5p17_initial_merged_eq_row_8 j + +private theorem k9t5p17_initial_eq : k9t5p17.initialMatrix 9 = k9t5p17_state_0 := by + funext i j + change templateMatrix (k9t5p17_templates_block_0 ++ k9t5p17_templates_block_1 ++ k9t5p17_templates_block_2 ++ k9t5p17_templates_block_3) i j ∪ requiredMatrix 9 k9t5p17.required i j = _ + simp only [templateMatrix_append, k9t5p17_template_matrix_0_eq, k9t5p17_template_matrix_1_eq, k9t5p17_template_matrix_2_eq, k9t5p17_template_matrix_3_eq] + exact congrFun (congrFun k9t5p17_initial_merged_eq i) j + +private theorem k9t5p17_closure_0 : ClosureCheck k9t5p17.graph k9t5p17_state_0 9 5 [] := by trivial + +private theorem k9t5p17_matrix_eq : k9t5p17.matrix 9 = k9t5p17_state_0 := by + change closureMatrix (k9t5p17.initialMatrix 9) _ = _ + rw [k9t5p17_initial_eq] + change closureMatrix k9t5p17_state_0 [] = _ + rfl + +private theorem k9t5p17_part_0 : k9t5p17.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p17_part_1 : k9t5p17.chains.map List.length = ([[1], [1, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p17_part_2 : k9t5p17.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p17.clique))) = ([[1], [1, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p17_templates_item_0 : (⟨0, 1, [[3, 4, 5]], [], [2], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_1 : (⟨0, 1, [[5, 6, 7, 8]], [], [2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_2 : (⟨0, 4, [], [2, 1], [3], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_3 : (⟨0, 4, [[5, 6, 7, 8]], [], [3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_4 : (⟨0, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_5 : (⟨0, 6, [], [2, 1], [7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_6 : (⟨0, 7, [], [], [6, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_7 : (⟨0, 7, [], [2, 1], [6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_8 : (⟨1, 2, [[3, 4, 5]], [0], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_9 : (⟨1, 2, [[5, 6, 7, 8]], [0], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_10 : (⟨1, 3, [], [0], [4, 5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_11 : (⟨1, 3, [[5, 6, 7, 8]], [0], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_12 : (⟨1, 4, [], [0], [3], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_13 : (⟨1, 4, [[5, 6, 7, 8]], [0], [3], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_14 : (⟨1, 5, [], [0], [4, 3], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_15 : (⟨1, 5, [], [0], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_16 : (⟨1, 6, [], [0], [5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_17 : (⟨1, 6, [], [0], [7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_18 : (⟨1, 7, [], [0], [6, 5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_19 : (⟨1, 7, [], [0], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_20 : (⟨1, 8, [[3, 4, 5]], [0], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_21 : (⟨1, 8, [], [0], [7, 6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_22 : (⟨2, 4, [], [0, 1], [3], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_23 : (⟨2, 4, [[5, 6, 7, 8]], [], [3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_24 : (⟨2, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_25 : (⟨2, 6, [], [0, 1], [7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_26 : (⟨2, 7, [], [], [6, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_27 : (⟨2, 7, [], [0, 1], [6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_28 : (⟨3, 4, [[0, 1, 2]], [], [5], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_29 : (⟨3, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_30 : (⟨3, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_31 : (⟨3, 6, [[0, 1, 2]], [], [7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_32 : (⟨3, 7, [], [], [6, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_33 : (⟨3, 7, [[0, 1, 2]], [], [6, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_34 : (⟨4, 5, [[0, 1, 2]], [3], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_35 : (⟨4, 5, [], [3], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_36 : (⟨4, 6, [], [3], [5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_37 : (⟨4, 6, [], [3], [7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_38 : (⟨4, 7, [], [3], [6, 5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_39 : (⟨4, 7, [], [3], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_40 : (⟨4, 8, [[0, 1, 2]], [3], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_41 : (⟨4, 8, [], [3], [7, 6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_42 : (⟨5, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_43 : (⟨5, 6, [[0, 1, 2]], [], [7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_44 : (⟨6, 7, [], [5], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_45 : (⟨6, 7, [[0, 1, 2]], [5], [8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_46 : (⟨7, 8, [], [5, 6], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_item_47 : (⟨7, 8, [[0, 1, 2]], [5, 6], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p17_templates_block_0_check : ∀ T ∈ k9t5p17_templates_block_0, T.Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p17_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p17_templates_item_0, k9t5p17_templates_item_1, k9t5p17_templates_item_2, k9t5p17_templates_item_3, k9t5p17_templates_item_4, k9t5p17_templates_item_5, k9t5p17_templates_item_6, k9t5p17_templates_item_7, k9t5p17_templates_item_8, k9t5p17_templates_item_9, k9t5p17_templates_item_10, k9t5p17_templates_item_11⟩ + +private theorem k9t5p17_templates_block_1_check : ∀ T ∈ k9t5p17_templates_block_1, T.Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p17_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p17_templates_item_12, k9t5p17_templates_item_13, k9t5p17_templates_item_14, k9t5p17_templates_item_15, k9t5p17_templates_item_16, k9t5p17_templates_item_17, k9t5p17_templates_item_18, k9t5p17_templates_item_19, k9t5p17_templates_item_20, k9t5p17_templates_item_21, k9t5p17_templates_item_22, k9t5p17_templates_item_23⟩ + +private theorem k9t5p17_templates_block_2_check : ∀ T ∈ k9t5p17_templates_block_2, T.Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p17_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p17_templates_item_24, k9t5p17_templates_item_25, k9t5p17_templates_item_26, k9t5p17_templates_item_27, k9t5p17_templates_item_28, k9t5p17_templates_item_29, k9t5p17_templates_item_30, k9t5p17_templates_item_31, k9t5p17_templates_item_32, k9t5p17_templates_item_33, k9t5p17_templates_item_34, k9t5p17_templates_item_35⟩ + +private theorem k9t5p17_templates_block_3_check : ∀ T ∈ k9t5p17_templates_block_3, T.Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p17_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p17_templates_item_36, k9t5p17_templates_item_37, k9t5p17_templates_item_38, k9t5p17_templates_item_39, k9t5p17_templates_item_40, k9t5p17_templates_item_41, k9t5p17_templates_item_42, k9t5p17_templates_item_43, k9t5p17_templates_item_44, k9t5p17_templates_item_45, k9t5p17_templates_item_46, k9t5p17_templates_item_47⟩ + +private theorem k9t5p17_part_3 : ∀ T ∈ k9t5p17.templates, T.Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t5p17_templates_block_0 ++ k9t5p17_templates_block_1 ++ k9t5p17_templates_block_2 ++ k9t5p17_templates_block_3), T.Check k9t5p17.graph k9t5p17.clique 9 (patternAmount ([[1], [1, 2]] : List (List ℕ))) (([[1], [1, 2]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t5p17_templates_block_0_check, k9t5p17_templates_block_1_check⟩, k9t5p17_templates_block_2_check⟩, k9t5p17_templates_block_3_check⟩ + +private theorem k9t5p17_part_4 : ∀ p ∈ k9t5p17.required, p.Check k9t5p17.graph 9 := by decide + +private theorem k9t5p17_part_5 : ClosureCheck k9t5p17.graph (k9t5p17.initialMatrix 9) 9 5 k9t5p17.closure := by + rw [k9t5p17_initial_eq] + exact k9t5p17_closure_0 + +private theorem k9t5p17_part_6 : k9t5p17.bad.Check k9t5p17.graph (k9t5p17.matrix 9) 9 5 := by + rw [k9t5p17_matrix_eq] + decide + +theorem k9t5p17_check : k9t5p17.Check 9 5 [[1], [1, 2]] := + ⟨k9t5p17_part_0, k9t5p17_part_1, k9t5p17_part_2, k9t5p17_part_3, k9t5p17_part_4, k9t5p17_part_5, k9t5p17_part_6⟩ +private def k9t5p18_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [], [], [2, 3, 4], 2, 5⟩, ⟨0, 1, [[5, 6, 7, 8]], [], [2], 1, 3⟩, ⟨0, 3, [], [2, 1], [4], 2, 5⟩, ⟨0, 3, [[5, 6, 7, 8]], [], [2], 1, 3⟩, ⟨0, 6, [], [], [7, 8], 2, 6⟩, ⟨0, 6, [], [2, 1], [7, 8], 1, 4⟩, ⟨0, 7, [], [], [6, 5], 2, 6⟩, ⟨0, 7, [], [2, 1], [6, 5], 1, 4⟩, ⟨1, 2, [], [0], [3, 4], 2, 5⟩, ⟨1, 2, [[5, 6, 7, 8]], [0], [], 1, 3⟩, ⟨1, 3, [], [0], [2], 2, 6⟩, ⟨1, 3, [[5, 6, 7, 8]], [0], [2], 1, 2⟩] + +private def k9t5p18_templates_block_1 : List (TemplateData (Fin 9)) := [⟨1, 4, [], [0], [3, 2], 2, 5⟩, ⟨1, 4, [[5, 6, 7, 8]], [0], [], 1, 3⟩, ⟨1, 5, [[2, 3, 4]], [0], [], 2, 4⟩, ⟨1, 5, [], [0], [6, 7, 8], 1, 4⟩, ⟨1, 6, [], [0], [5], 2, 6⟩, ⟨1, 6, [], [0], [7, 8], 1, 5⟩, ⟨1, 7, [], [0], [6, 5], 1, 5⟩, ⟨1, 7, [], [0], [8], 2, 6⟩, ⟨1, 8, [[2, 3, 4]], [0], [], 2, 4⟩, ⟨1, 8, [], [0], [7, 6, 5], 1, 4⟩, ⟨2, 3, [], [0, 1], [4], 2, 5⟩, ⟨2, 3, [[5, 6, 7, 8]], [], [4], 1, 3⟩] + +private def k9t5p18_templates_block_2 : List (TemplateData (Fin 9)) := [⟨2, 6, [], [], [7, 8], 2, 6⟩, ⟨2, 6, [], [0, 1], [7, 8], 1, 4⟩, ⟨2, 7, [], [], [6, 5], 2, 6⟩, ⟨2, 7, [], [0, 1], [6, 5], 1, 4⟩, ⟨3, 4, [], [0, 1, 2], [], 2, 5⟩, ⟨3, 4, [[5, 6, 7, 8]], [2], [], 1, 3⟩, ⟨3, 5, [], [0, 1, 2], [], 2, 5⟩, ⟨3, 5, [], [2], [6, 7, 8], 1, 4⟩, ⟨3, 6, [], [2], [5], 2, 6⟩, ⟨3, 6, [], [2], [7, 8], 1, 5⟩, ⟨3, 7, [], [2], [6, 5], 1, 5⟩, ⟨3, 7, [], [2], [8], 2, 6⟩] + +private def k9t5p18_templates_block_3 : List (TemplateData (Fin 9)) := [⟨3, 8, [], [0, 1, 2], [], 2, 5⟩, ⟨3, 8, [], [2], [7, 6, 5], 1, 4⟩, ⟨4, 6, [], [], [7, 8], 2, 6⟩, ⟨4, 6, [[0, 1, 2]], [], [7, 8], 1, 3⟩, ⟨4, 7, [], [], [6, 5], 2, 6⟩, ⟨4, 7, [[0, 1, 2]], [], [6, 5], 1, 3⟩, ⟨5, 6, [], [], [7, 8], 2, 6⟩, ⟨5, 6, [[0, 1, 2]], [], [7, 8], 1, 3⟩, ⟨6, 7, [], [5], [8], 2, 6⟩, ⟨6, 7, [[0, 1, 2]], [5], [8], 1, 3⟩, ⟨7, 8, [], [5, 6], [], 2, 6⟩, ⟨7, 8, [[0, 1, 2]], [5, 6], [], 1, 3⟩] + +def k9t5p18 : LayoutCertificate 9 where + chains := [[0, 1, 2, 3, 4], [5, 6, 7, 8]] + clique := {0, 2, 4, 5, 8} + templates := k9t5p18_templates_block_0 ++ k9t5p18_templates_block_1 ++ k9t5p18_templates_block_2 ++ k9t5p18_templates_block_3 + required := [] + closure := [] + bad := ⟨none, {(1, 3), (3, 3), (6, 3), (7, 3)}⟩ + + +private def k9t5p18_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5], + #[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[∅, Finset.Icc 1 4, ∅, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 6, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[∅, Finset.Icc 1 4, ∅, Finset.Icc 1 5, ∅, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p18_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p18_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_0) 0 j = k9t5p18_template_matrix_0 0 j := by decide + +private theorem k9t5p18_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_0) 1 j = k9t5p18_template_matrix_0 1 j := by decide + +private theorem k9t5p18_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_0) 2 j = k9t5p18_template_matrix_0 2 j := by decide + +private theorem k9t5p18_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_0) 3 j = k9t5p18_template_matrix_0 3 j := by decide + +private theorem k9t5p18_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_0) 4 j = k9t5p18_template_matrix_0 4 j := by decide + +private theorem k9t5p18_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_0) 5 j = k9t5p18_template_matrix_0 5 j := by decide + +private theorem k9t5p18_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_0) 6 j = k9t5p18_template_matrix_0 6 j := by decide + +private theorem k9t5p18_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_0) 7 j = k9t5p18_template_matrix_0 7 j := by decide + +private theorem k9t5p18_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_0) 8 j = k9t5p18_template_matrix_0 8 j := by decide + +private theorem k9t5p18_template_matrix_0_eq : (templateMatrix k9t5p18_templates_block_0) = k9t5p18_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t5p18_template_matrix_0_eq_row_0 j + + · exact k9t5p18_template_matrix_0_eq_row_1 j + + · exact k9t5p18_template_matrix_0_eq_row_2 j + + · exact k9t5p18_template_matrix_0_eq_row_3 j + + · exact k9t5p18_template_matrix_0_eq_row_4 j + + · exact k9t5p18_template_matrix_0_eq_row_5 j + + · exact k9t5p18_template_matrix_0_eq_row_6 j + + · exact k9t5p18_template_matrix_0_eq_row_7 j + + · exact k9t5p18_template_matrix_0_eq_row_8 j + +private def k9t5p18_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 5, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p18_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_1) 0 j = k9t5p18_template_matrix_1 0 j := by decide + +private theorem k9t5p18_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_1) 1 j = k9t5p18_template_matrix_1 1 j := by decide + +private theorem k9t5p18_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_1) 2 j = k9t5p18_template_matrix_1 2 j := by decide + +private theorem k9t5p18_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_1) 3 j = k9t5p18_template_matrix_1 3 j := by decide + +private theorem k9t5p18_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_1) 4 j = k9t5p18_template_matrix_1 4 j := by decide + +private theorem k9t5p18_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_1) 5 j = k9t5p18_template_matrix_1 5 j := by decide + +private theorem k9t5p18_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_1) 6 j = k9t5p18_template_matrix_1 6 j := by decide + +private theorem k9t5p18_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_1) 7 j = k9t5p18_template_matrix_1 7 j := by decide + +private theorem k9t5p18_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_1) 8 j = k9t5p18_template_matrix_1 8 j := by decide + +private theorem k9t5p18_template_matrix_1_eq : (templateMatrix k9t5p18_templates_block_1) = k9t5p18_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t5p18_template_matrix_1_eq_row_0 j + + · exact k9t5p18_template_matrix_1_eq_row_1 j + + · exact k9t5p18_template_matrix_1_eq_row_2 j + + · exact k9t5p18_template_matrix_1_eq_row_3 j + + · exact k9t5p18_template_matrix_1_eq_row_4 j + + · exact k9t5p18_template_matrix_1_eq_row_5 j + + · exact k9t5p18_template_matrix_1_eq_row_6 j + + · exact k9t5p18_template_matrix_1_eq_row_7 j + + · exact k9t5p18_template_matrix_1_eq_row_8 j + +private def k9t5p18_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p18_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_2) 0 j = k9t5p18_template_matrix_2 0 j := by decide + +private theorem k9t5p18_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_2) 1 j = k9t5p18_template_matrix_2 1 j := by decide + +private theorem k9t5p18_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_2) 2 j = k9t5p18_template_matrix_2 2 j := by decide + +private theorem k9t5p18_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_2) 3 j = k9t5p18_template_matrix_2 3 j := by decide + +private theorem k9t5p18_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_2) 4 j = k9t5p18_template_matrix_2 4 j := by decide + +private theorem k9t5p18_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_2) 5 j = k9t5p18_template_matrix_2 5 j := by decide + +private theorem k9t5p18_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_2) 6 j = k9t5p18_template_matrix_2 6 j := by decide + +private theorem k9t5p18_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_2) 7 j = k9t5p18_template_matrix_2 7 j := by decide + +private theorem k9t5p18_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_2) 8 j = k9t5p18_template_matrix_2 8 j := by decide + +private theorem k9t5p18_template_matrix_2_eq : (templateMatrix k9t5p18_templates_block_2) = k9t5p18_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t5p18_template_matrix_2_eq_row_0 j + + · exact k9t5p18_template_matrix_2_eq_row_1 j + + · exact k9t5p18_template_matrix_2_eq_row_2 j + + · exact k9t5p18_template_matrix_2_eq_row_3 j + + · exact k9t5p18_template_matrix_2_eq_row_4 j + + · exact k9t5p18_template_matrix_2_eq_row_5 j + + · exact k9t5p18_template_matrix_2_eq_row_6 j + + · exact k9t5p18_template_matrix_2_eq_row_7 j + + · exact k9t5p18_template_matrix_2_eq_row_8 j + +private def k9t5p18_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 5], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6, ∅, Finset.Icc 1 6], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, Finset.Icc 1 6, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p18_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_3) 0 j = k9t5p18_template_matrix_3 0 j := by decide + +private theorem k9t5p18_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_3) 1 j = k9t5p18_template_matrix_3 1 j := by decide + +private theorem k9t5p18_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_3) 2 j = k9t5p18_template_matrix_3 2 j := by decide + +private theorem k9t5p18_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_3) 3 j = k9t5p18_template_matrix_3 3 j := by decide + +private theorem k9t5p18_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_3) 4 j = k9t5p18_template_matrix_3 4 j := by decide + +private theorem k9t5p18_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_3) 5 j = k9t5p18_template_matrix_3 5 j := by decide + +private theorem k9t5p18_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_3) 6 j = k9t5p18_template_matrix_3 6 j := by decide + +private theorem k9t5p18_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_3) 7 j = k9t5p18_template_matrix_3 7 j := by decide + +private theorem k9t5p18_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p18_templates_block_3) 8 j = k9t5p18_template_matrix_3 8 j := by decide + +private theorem k9t5p18_template_matrix_3_eq : (templateMatrix k9t5p18_templates_block_3) = k9t5p18_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t5p18_template_matrix_3_eq_row_0 j + + · exact k9t5p18_template_matrix_3_eq_row_1 j + + · exact k9t5p18_template_matrix_3_eq_row_2 j + + · exact k9t5p18_template_matrix_3_eq_row_3 j + + · exact k9t5p18_template_matrix_3_eq_row_4 j + + · exact k9t5p18_template_matrix_3_eq_row_5 j + + · exact k9t5p18_template_matrix_3_eq_row_6 j + + · exact k9t5p18_template_matrix_3_eq_row_7 j + + · exact k9t5p18_template_matrix_3_eq_row_8 j + +private theorem k9t5p18_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => (((k9t5p18_template_matrix_0 i j ∪ k9t5p18_template_matrix_1 i j) ∪ k9t5p18_template_matrix_2 i j) ∪ k9t5p18_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p18.required i j) 0 j = k9t5p18_state_0 0 j := by decide + +private theorem k9t5p18_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => (((k9t5p18_template_matrix_0 i j ∪ k9t5p18_template_matrix_1 i j) ∪ k9t5p18_template_matrix_2 i j) ∪ k9t5p18_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p18.required i j) 1 j = k9t5p18_state_0 1 j := by decide + +private theorem k9t5p18_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => (((k9t5p18_template_matrix_0 i j ∪ k9t5p18_template_matrix_1 i j) ∪ k9t5p18_template_matrix_2 i j) ∪ k9t5p18_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p18.required i j) 2 j = k9t5p18_state_0 2 j := by decide + +private theorem k9t5p18_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => (((k9t5p18_template_matrix_0 i j ∪ k9t5p18_template_matrix_1 i j) ∪ k9t5p18_template_matrix_2 i j) ∪ k9t5p18_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p18.required i j) 3 j = k9t5p18_state_0 3 j := by decide + +private theorem k9t5p18_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => (((k9t5p18_template_matrix_0 i j ∪ k9t5p18_template_matrix_1 i j) ∪ k9t5p18_template_matrix_2 i j) ∪ k9t5p18_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p18.required i j) 4 j = k9t5p18_state_0 4 j := by decide + +private theorem k9t5p18_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => (((k9t5p18_template_matrix_0 i j ∪ k9t5p18_template_matrix_1 i j) ∪ k9t5p18_template_matrix_2 i j) ∪ k9t5p18_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p18.required i j) 5 j = k9t5p18_state_0 5 j := by decide + +private theorem k9t5p18_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => (((k9t5p18_template_matrix_0 i j ∪ k9t5p18_template_matrix_1 i j) ∪ k9t5p18_template_matrix_2 i j) ∪ k9t5p18_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p18.required i j) 6 j = k9t5p18_state_0 6 j := by decide + +private theorem k9t5p18_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => (((k9t5p18_template_matrix_0 i j ∪ k9t5p18_template_matrix_1 i j) ∪ k9t5p18_template_matrix_2 i j) ∪ k9t5p18_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p18.required i j) 7 j = k9t5p18_state_0 7 j := by decide + +private theorem k9t5p18_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => (((k9t5p18_template_matrix_0 i j ∪ k9t5p18_template_matrix_1 i j) ∪ k9t5p18_template_matrix_2 i j) ∪ k9t5p18_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p18.required i j) 8 j = k9t5p18_state_0 8 j := by decide + +private theorem k9t5p18_initial_merged_eq : (fun i j => (((k9t5p18_template_matrix_0 i j ∪ k9t5p18_template_matrix_1 i j) ∪ k9t5p18_template_matrix_2 i j) ∪ k9t5p18_template_matrix_3 i j) ∪ requiredMatrix 9 k9t5p18.required i j) = k9t5p18_state_0 := by + funext i j + fin_cases i + + · exact k9t5p18_initial_merged_eq_row_0 j + + · exact k9t5p18_initial_merged_eq_row_1 j + + · exact k9t5p18_initial_merged_eq_row_2 j + + · exact k9t5p18_initial_merged_eq_row_3 j + + · exact k9t5p18_initial_merged_eq_row_4 j + + · exact k9t5p18_initial_merged_eq_row_5 j + + · exact k9t5p18_initial_merged_eq_row_6 j + + · exact k9t5p18_initial_merged_eq_row_7 j + + · exact k9t5p18_initial_merged_eq_row_8 j + +private theorem k9t5p18_initial_eq : k9t5p18.initialMatrix 9 = k9t5p18_state_0 := by + funext i j + change templateMatrix (k9t5p18_templates_block_0 ++ k9t5p18_templates_block_1 ++ k9t5p18_templates_block_2 ++ k9t5p18_templates_block_3) i j ∪ requiredMatrix 9 k9t5p18.required i j = _ + simp only [templateMatrix_append, k9t5p18_template_matrix_0_eq, k9t5p18_template_matrix_1_eq, k9t5p18_template_matrix_2_eq, k9t5p18_template_matrix_3_eq] + exact congrFun (congrFun k9t5p18_initial_merged_eq i) j + +private theorem k9t5p18_closure_0 : ClosureCheck k9t5p18.graph k9t5p18_state_0 9 5 [] := by trivial + +private theorem k9t5p18_matrix_eq : k9t5p18.matrix 9 = k9t5p18_state_0 := by + change closureMatrix (k9t5p18.initialMatrix 9) _ = _ + rw [k9t5p18_initial_eq] + change closureMatrix k9t5p18_state_0 [] = _ + rfl + +private theorem k9t5p18_part_0 : k9t5p18.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p18_part_1 : k9t5p18.chains.map List.length = ([[1, 1], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p18_part_2 : k9t5p18.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p18.clique))) = ([[1, 1], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p18_templates_item_0 : (⟨0, 1, [], [], [2, 3, 4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_1 : (⟨0, 1, [[5, 6, 7, 8]], [], [2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_2 : (⟨0, 3, [], [2, 1], [4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_3 : (⟨0, 3, [[5, 6, 7, 8]], [], [2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_4 : (⟨0, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_5 : (⟨0, 6, [], [2, 1], [7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_6 : (⟨0, 7, [], [], [6, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_7 : (⟨0, 7, [], [2, 1], [6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_8 : (⟨1, 2, [], [0], [3, 4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_9 : (⟨1, 2, [[5, 6, 7, 8]], [0], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_10 : (⟨1, 3, [], [0], [2], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_11 : (⟨1, 3, [[5, 6, 7, 8]], [0], [2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_12 : (⟨1, 4, [], [0], [3, 2], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_13 : (⟨1, 4, [[5, 6, 7, 8]], [0], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_14 : (⟨1, 5, [[2, 3, 4]], [0], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_15 : (⟨1, 5, [], [0], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_16 : (⟨1, 6, [], [0], [5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_17 : (⟨1, 6, [], [0], [7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_18 : (⟨1, 7, [], [0], [6, 5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_19 : (⟨1, 7, [], [0], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_20 : (⟨1, 8, [[2, 3, 4]], [0], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_21 : (⟨1, 8, [], [0], [7, 6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_22 : (⟨2, 3, [], [0, 1], [4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_23 : (⟨2, 3, [[5, 6, 7, 8]], [], [4], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_24 : (⟨2, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_25 : (⟨2, 6, [], [0, 1], [7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_26 : (⟨2, 7, [], [], [6, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_27 : (⟨2, 7, [], [0, 1], [6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_28 : (⟨3, 4, [], [0, 1, 2], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_29 : (⟨3, 4, [[5, 6, 7, 8]], [2], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_30 : (⟨3, 5, [], [0, 1, 2], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_31 : (⟨3, 5, [], [2], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_32 : (⟨3, 6, [], [2], [5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_33 : (⟨3, 6, [], [2], [7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_34 : (⟨3, 7, [], [2], [6, 5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_35 : (⟨3, 7, [], [2], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_36 : (⟨3, 8, [], [0, 1, 2], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_37 : (⟨3, 8, [], [2], [7, 6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_38 : (⟨4, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_39 : (⟨4, 6, [[0, 1, 2]], [], [7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_40 : (⟨4, 7, [], [], [6, 5], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_41 : (⟨4, 7, [[0, 1, 2]], [], [6, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_42 : (⟨5, 6, [], [], [7, 8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_43 : (⟨5, 6, [[0, 1, 2]], [], [7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_44 : (⟨6, 7, [], [5], [8], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_45 : (⟨6, 7, [[0, 1, 2]], [5], [8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_46 : (⟨7, 8, [], [5, 6], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_item_47 : (⟨7, 8, [[0, 1, 2]], [5, 6], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p18_templates_block_0_check : ∀ T ∈ k9t5p18_templates_block_0, T.Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p18_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p18_templates_item_0, k9t5p18_templates_item_1, k9t5p18_templates_item_2, k9t5p18_templates_item_3, k9t5p18_templates_item_4, k9t5p18_templates_item_5, k9t5p18_templates_item_6, k9t5p18_templates_item_7, k9t5p18_templates_item_8, k9t5p18_templates_item_9, k9t5p18_templates_item_10, k9t5p18_templates_item_11⟩ + +private theorem k9t5p18_templates_block_1_check : ∀ T ∈ k9t5p18_templates_block_1, T.Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p18_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p18_templates_item_12, k9t5p18_templates_item_13, k9t5p18_templates_item_14, k9t5p18_templates_item_15, k9t5p18_templates_item_16, k9t5p18_templates_item_17, k9t5p18_templates_item_18, k9t5p18_templates_item_19, k9t5p18_templates_item_20, k9t5p18_templates_item_21, k9t5p18_templates_item_22, k9t5p18_templates_item_23⟩ + +private theorem k9t5p18_templates_block_2_check : ∀ T ∈ k9t5p18_templates_block_2, T.Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p18_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p18_templates_item_24, k9t5p18_templates_item_25, k9t5p18_templates_item_26, k9t5p18_templates_item_27, k9t5p18_templates_item_28, k9t5p18_templates_item_29, k9t5p18_templates_item_30, k9t5p18_templates_item_31, k9t5p18_templates_item_32, k9t5p18_templates_item_33, k9t5p18_templates_item_34, k9t5p18_templates_item_35⟩ + +private theorem k9t5p18_templates_block_3_check : ∀ T ∈ k9t5p18_templates_block_3, T.Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p18_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p18_templates_item_36, k9t5p18_templates_item_37, k9t5p18_templates_item_38, k9t5p18_templates_item_39, k9t5p18_templates_item_40, k9t5p18_templates_item_41, k9t5p18_templates_item_42, k9t5p18_templates_item_43, k9t5p18_templates_item_44, k9t5p18_templates_item_45, k9t5p18_templates_item_46, k9t5p18_templates_item_47⟩ + +private theorem k9t5p18_part_3 : ∀ T ∈ k9t5p18.templates, T.Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t5p18_templates_block_0 ++ k9t5p18_templates_block_1 ++ k9t5p18_templates_block_2 ++ k9t5p18_templates_block_3), T.Check k9t5p18.graph k9t5p18.clique 9 (patternAmount ([[1, 1], [2]] : List (List ℕ))) (([[1, 1], [2]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t5p18_templates_block_0_check, k9t5p18_templates_block_1_check⟩, k9t5p18_templates_block_2_check⟩, k9t5p18_templates_block_3_check⟩ + +private theorem k9t5p18_part_4 : ∀ p ∈ k9t5p18.required, p.Check k9t5p18.graph 9 := by decide + +private theorem k9t5p18_part_5 : ClosureCheck k9t5p18.graph (k9t5p18.initialMatrix 9) 9 5 k9t5p18.closure := by + rw [k9t5p18_initial_eq] + exact k9t5p18_closure_0 + +private theorem k9t5p18_part_6 : k9t5p18.bad.Check k9t5p18.graph (k9t5p18.matrix 9) 9 5 := by + rw [k9t5p18_matrix_eq] + decide + +theorem k9t5p18_check : k9t5p18.Check 9 5 [[1, 1], [2]] := + ⟨k9t5p18_part_0, k9t5p18_part_1, k9t5p18_part_2, k9t5p18_part_3, k9t5p18_part_4, k9t5p18_part_5, k9t5p18_part_6⟩ +private def k9t5p19_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [], [], [2, 3, 4], 2, 5⟩, ⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 3⟩, ⟨0, 3, [], [2, 1], [4], 2, 5⟩, ⟨0, 3, [], [2, 1], [4, 5, 6], 1, 3⟩, ⟨0, 5, [], [2, 1], [4], 2, 5⟩, ⟨0, 5, [], [4, 3, 2, 1], [6], 1, 3⟩, ⟨0, 7, [], [2, 1], [6], 2, 5⟩, ⟨0, 7, [], [4, 3, 2, 1], [6], 1, 3⟩, ⟨1, 2, [], [0], [3, 4], 2, 5⟩, ⟨1, 2, [], [0], [3, 4, 5, 6], 1, 3⟩, ⟨1, 3, [], [0], [2], 2, 6⟩, ⟨1, 3, [[4, 5, 6]], [0], [2], 1, 3⟩] + +private def k9t5p19_templates_block_1 : List (TemplateData (Fin 9)) := [⟨1, 4, [], [0], [3, 2], 2, 5⟩, ⟨1, 4, [[6, 7, 8]], [0], [3, 2], 1, 2⟩, ⟨1, 5, [], [0], [4], 2, 6⟩, ⟨1, 5, [], [0], [4, 3, 2], 1, 4⟩, ⟨1, 6, [[2, 3, 4]], [0], [], 2, 4⟩, ⟨1, 6, [], [0], [5, 4, 3, 2], 1, 3⟩, ⟨1, 7, [], [0], [6], 2, 6⟩, ⟨1, 7, [[2, 3, 4]], [0], [6], 1, 3⟩, ⟨1, 8, [[2, 3, 4]], [0], [], 2, 4⟩, ⟨1, 8, [[2, 3, 4, 5, 6]], [0], [], 1, 2⟩, ⟨2, 3, [], [0, 1], [4], 2, 5⟩, ⟨2, 3, [], [0, 1], [4, 5, 6], 1, 3⟩] + +private def k9t5p19_templates_block_2 : List (TemplateData (Fin 9)) := [⟨2, 5, [], [0, 1], [4], 2, 5⟩, ⟨2, 5, [[6, 7, 8]], [0, 1], [4], 1, 2⟩, ⟨2, 7, [], [0, 1], [6], 2, 5⟩, ⟨2, 7, [], [0, 1], [6, 5, 4], 1, 3⟩, ⟨3, 4, [], [0, 1, 2], [], 2, 5⟩, ⟨3, 4, [], [0, 1, 2], [5, 6], 1, 3⟩, ⟨3, 5, [], [2], [4], 2, 6⟩, ⟨3, 5, [], [0, 1, 2], [4], 1, 4⟩, ⟨3, 6, [], [0, 1, 2], [], 2, 5⟩, ⟨3, 6, [], [0, 1, 2], [5, 4], 1, 3⟩, ⟨3, 7, [], [2], [6], 2, 6⟩, ⟨3, 7, [], [0, 1, 2], [6], 1, 4⟩] + +private def k9t5p19_templates_block_3 : List (TemplateData (Fin 9)) := [⟨3, 8, [], [0, 1, 2], [], 2, 5⟩, ⟨3, 8, [[4, 5, 6]], [0, 1, 2], [], 1, 2⟩, ⟨4, 5, [[0, 1, 2]], [], [6], 2, 4⟩, ⟨4, 5, [], [0, 1, 2, 3], [6], 1, 3⟩, ⟨4, 7, [[0, 1, 2]], [], [6], 2, 4⟩, ⟨4, 7, [], [0, 1, 2, 3], [6], 1, 3⟩, ⟨5, 6, [[0, 1, 2]], [4], [], 2, 4⟩, ⟨5, 6, [], [0, 1, 2, 3, 4], [], 1, 3⟩, ⟨5, 7, [], [4], [6], 2, 6⟩, ⟨5, 7, [[0, 1, 2]], [4], [6], 1, 3⟩, ⟨5, 8, [[0, 1, 2]], [4], [], 2, 4⟩, ⟨5, 8, [], [0, 1, 2, 3, 4], [], 1, 3⟩] + +private def k9t5p19_templates_block_4 : List (TemplateData (Fin 9)) := [⟨6, 7, [[0, 1, 2]], [], [8], 2, 4⟩, ⟨6, 7, [[0, 1, 2, 3, 4]], [], [8], 1, 2⟩, ⟨7, 8, [[0, 1, 2]], [6], [], 2, 4⟩, ⟨7, 8, [[0, 1, 2, 3, 4]], [6], [], 1, 2⟩] + +def k9t5p19 : LayoutCertificate 9 where + chains := [[0, 1, 2, 3, 4, 5, 6, 7, 8]] + clique := {0, 2, 4, 6, 8} + templates := k9t5p19_templates_block_0 ++ k9t5p19_templates_block_1 ++ k9t5p19_templates_block_2 ++ k9t5p19_templates_block_3 ++ k9t5p19_templates_block_4 + required := [] + closure := [] + bad := ⟨none, {(1, 3), (3, 3), (5, 3), (7, 3)}⟩ + + +private def k9t5p19_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5], + #[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, Finset.Icc 1 4, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 4, ∅, Finset.Icc 1 4], + #[∅, Finset.Icc 1 4, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t5p19_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p19_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_0) 0 j = k9t5p19_template_matrix_0 0 j := by decide + +private theorem k9t5p19_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_0) 1 j = k9t5p19_template_matrix_0 1 j := by decide + +private theorem k9t5p19_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_0) 2 j = k9t5p19_template_matrix_0 2 j := by decide + +private theorem k9t5p19_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_0) 3 j = k9t5p19_template_matrix_0 3 j := by decide + +private theorem k9t5p19_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_0) 4 j = k9t5p19_template_matrix_0 4 j := by decide + +private theorem k9t5p19_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_0) 5 j = k9t5p19_template_matrix_0 5 j := by decide + +private theorem k9t5p19_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_0) 6 j = k9t5p19_template_matrix_0 6 j := by decide + +private theorem k9t5p19_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_0) 7 j = k9t5p19_template_matrix_0 7 j := by decide + +private theorem k9t5p19_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_0) 8 j = k9t5p19_template_matrix_0 8 j := by decide + +private theorem k9t5p19_template_matrix_0_eq : (templateMatrix k9t5p19_templates_block_0) = k9t5p19_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t5p19_template_matrix_0_eq_row_0 j + + · exact k9t5p19_template_matrix_0_eq_row_1 j + + · exact k9t5p19_template_matrix_0_eq_row_2 j + + · exact k9t5p19_template_matrix_0_eq_row_3 j + + · exact k9t5p19_template_matrix_0_eq_row_4 j + + · exact k9t5p19_template_matrix_0_eq_row_5 j + + · exact k9t5p19_template_matrix_0_eq_row_6 j + + · exact k9t5p19_template_matrix_0_eq_row_7 j + + · exact k9t5p19_template_matrix_0_eq_row_8 j + +private def k9t5p19_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p19_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_1) 0 j = k9t5p19_template_matrix_1 0 j := by decide + +private theorem k9t5p19_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_1) 1 j = k9t5p19_template_matrix_1 1 j := by decide + +private theorem k9t5p19_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_1) 2 j = k9t5p19_template_matrix_1 2 j := by decide + +private theorem k9t5p19_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_1) 3 j = k9t5p19_template_matrix_1 3 j := by decide + +private theorem k9t5p19_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_1) 4 j = k9t5p19_template_matrix_1 4 j := by decide + +private theorem k9t5p19_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_1) 5 j = k9t5p19_template_matrix_1 5 j := by decide + +private theorem k9t5p19_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_1) 6 j = k9t5p19_template_matrix_1 6 j := by decide + +private theorem k9t5p19_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_1) 7 j = k9t5p19_template_matrix_1 7 j := by decide + +private theorem k9t5p19_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_1) 8 j = k9t5p19_template_matrix_1 8 j := by decide + +private theorem k9t5p19_template_matrix_1_eq : (templateMatrix k9t5p19_templates_block_1) = k9t5p19_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t5p19_template_matrix_1_eq_row_0 j + + · exact k9t5p19_template_matrix_1_eq_row_1 j + + · exact k9t5p19_template_matrix_1_eq_row_2 j + + · exact k9t5p19_template_matrix_1_eq_row_3 j + + · exact k9t5p19_template_matrix_1_eq_row_4 j + + · exact k9t5p19_template_matrix_1_eq_row_5 j + + · exact k9t5p19_template_matrix_1_eq_row_6 j + + · exact k9t5p19_template_matrix_1_eq_row_7 j + + · exact k9t5p19_template_matrix_1_eq_row_8 j + +private def k9t5p19_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 5, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 6, ∅], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 5, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 5, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p19_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_2) 0 j = k9t5p19_template_matrix_2 0 j := by decide + +private theorem k9t5p19_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_2) 1 j = k9t5p19_template_matrix_2 1 j := by decide + +private theorem k9t5p19_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_2) 2 j = k9t5p19_template_matrix_2 2 j := by decide + +private theorem k9t5p19_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_2) 3 j = k9t5p19_template_matrix_2 3 j := by decide + +private theorem k9t5p19_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_2) 4 j = k9t5p19_template_matrix_2 4 j := by decide + +private theorem k9t5p19_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_2) 5 j = k9t5p19_template_matrix_2 5 j := by decide + +private theorem k9t5p19_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_2) 6 j = k9t5p19_template_matrix_2 6 j := by decide + +private theorem k9t5p19_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_2) 7 j = k9t5p19_template_matrix_2 7 j := by decide + +private theorem k9t5p19_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_2) 8 j = k9t5p19_template_matrix_2 8 j := by decide + +private theorem k9t5p19_template_matrix_2_eq : (templateMatrix k9t5p19_templates_block_2) = k9t5p19_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t5p19_template_matrix_2_eq_row_0 j + + · exact k9t5p19_template_matrix_2_eq_row_1 j + + · exact k9t5p19_template_matrix_2_eq_row_2 j + + · exact k9t5p19_template_matrix_2_eq_row_3 j + + · exact k9t5p19_template_matrix_2_eq_row_4 j + + · exact k9t5p19_template_matrix_2_eq_row_5 j + + · exact k9t5p19_template_matrix_2_eq_row_6 j + + · exact k9t5p19_template_matrix_2_eq_row_7 j + + · exact k9t5p19_template_matrix_2_eq_row_8 j + +private def k9t5p19_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 5], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 6, Finset.Icc 1 4], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 4, Finset.Icc 1 6, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 5, ∅, Finset.Icc 1 4, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t5p19_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_3) 0 j = k9t5p19_template_matrix_3 0 j := by decide + +private theorem k9t5p19_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_3) 1 j = k9t5p19_template_matrix_3 1 j := by decide + +private theorem k9t5p19_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_3) 2 j = k9t5p19_template_matrix_3 2 j := by decide + +private theorem k9t5p19_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_3) 3 j = k9t5p19_template_matrix_3 3 j := by decide + +private theorem k9t5p19_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_3) 4 j = k9t5p19_template_matrix_3 4 j := by decide + +private theorem k9t5p19_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_3) 5 j = k9t5p19_template_matrix_3 5 j := by decide + +private theorem k9t5p19_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_3) 6 j = k9t5p19_template_matrix_3 6 j := by decide + +private theorem k9t5p19_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_3) 7 j = k9t5p19_template_matrix_3 7 j := by decide + +private theorem k9t5p19_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_3) 8 j = k9t5p19_template_matrix_3 8 j := by decide + +private theorem k9t5p19_template_matrix_3_eq : (templateMatrix k9t5p19_templates_block_3) = k9t5p19_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t5p19_template_matrix_3_eq_row_0 j + + · exact k9t5p19_template_matrix_3_eq_row_1 j + + · exact k9t5p19_template_matrix_3_eq_row_2 j + + · exact k9t5p19_template_matrix_3_eq_row_3 j + + · exact k9t5p19_template_matrix_3_eq_row_4 j + + · exact k9t5p19_template_matrix_3_eq_row_5 j + + · exact k9t5p19_template_matrix_3_eq_row_6 j + + · exact k9t5p19_template_matrix_3_eq_row_7 j + + · exact k9t5p19_template_matrix_3_eq_row_8 j + +private def k9t5p19_template_matrix_4 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, 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 ∅ + +private theorem k9t5p19_template_matrix_4_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_4) 0 j = k9t5p19_template_matrix_4 0 j := by decide + +private theorem k9t5p19_template_matrix_4_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_4) 1 j = k9t5p19_template_matrix_4 1 j := by decide + +private theorem k9t5p19_template_matrix_4_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_4) 2 j = k9t5p19_template_matrix_4 2 j := by decide + +private theorem k9t5p19_template_matrix_4_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_4) 3 j = k9t5p19_template_matrix_4 3 j := by decide + +private theorem k9t5p19_template_matrix_4_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_4) 4 j = k9t5p19_template_matrix_4 4 j := by decide + +private theorem k9t5p19_template_matrix_4_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_4) 5 j = k9t5p19_template_matrix_4 5 j := by decide + +private theorem k9t5p19_template_matrix_4_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_4) 6 j = k9t5p19_template_matrix_4 6 j := by decide + +private theorem k9t5p19_template_matrix_4_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_4) 7 j = k9t5p19_template_matrix_4 7 j := by decide + +private theorem k9t5p19_template_matrix_4_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t5p19_templates_block_4) 8 j = k9t5p19_template_matrix_4 8 j := by decide + +private theorem k9t5p19_template_matrix_4_eq : (templateMatrix k9t5p19_templates_block_4) = k9t5p19_template_matrix_4 := by + funext i j + fin_cases i + + · exact k9t5p19_template_matrix_4_eq_row_0 j + + · exact k9t5p19_template_matrix_4_eq_row_1 j + + · exact k9t5p19_template_matrix_4_eq_row_2 j + + · exact k9t5p19_template_matrix_4_eq_row_3 j + + · exact k9t5p19_template_matrix_4_eq_row_4 j + + · exact k9t5p19_template_matrix_4_eq_row_5 j + + · exact k9t5p19_template_matrix_4_eq_row_6 j + + · exact k9t5p19_template_matrix_4_eq_row_7 j + + · exact k9t5p19_template_matrix_4_eq_row_8 j + +private theorem k9t5p19_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => ((((k9t5p19_template_matrix_0 i j ∪ k9t5p19_template_matrix_1 i j) ∪ k9t5p19_template_matrix_2 i j) ∪ k9t5p19_template_matrix_3 i j) ∪ k9t5p19_template_matrix_4 i j) ∪ requiredMatrix 9 k9t5p19.required i j) 0 j = k9t5p19_state_0 0 j := by decide + +private theorem k9t5p19_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => ((((k9t5p19_template_matrix_0 i j ∪ k9t5p19_template_matrix_1 i j) ∪ k9t5p19_template_matrix_2 i j) ∪ k9t5p19_template_matrix_3 i j) ∪ k9t5p19_template_matrix_4 i j) ∪ requiredMatrix 9 k9t5p19.required i j) 1 j = k9t5p19_state_0 1 j := by decide + +private theorem k9t5p19_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => ((((k9t5p19_template_matrix_0 i j ∪ k9t5p19_template_matrix_1 i j) ∪ k9t5p19_template_matrix_2 i j) ∪ k9t5p19_template_matrix_3 i j) ∪ k9t5p19_template_matrix_4 i j) ∪ requiredMatrix 9 k9t5p19.required i j) 2 j = k9t5p19_state_0 2 j := by decide + +private theorem k9t5p19_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => ((((k9t5p19_template_matrix_0 i j ∪ k9t5p19_template_matrix_1 i j) ∪ k9t5p19_template_matrix_2 i j) ∪ k9t5p19_template_matrix_3 i j) ∪ k9t5p19_template_matrix_4 i j) ∪ requiredMatrix 9 k9t5p19.required i j) 3 j = k9t5p19_state_0 3 j := by decide + +private theorem k9t5p19_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => ((((k9t5p19_template_matrix_0 i j ∪ k9t5p19_template_matrix_1 i j) ∪ k9t5p19_template_matrix_2 i j) ∪ k9t5p19_template_matrix_3 i j) ∪ k9t5p19_template_matrix_4 i j) ∪ requiredMatrix 9 k9t5p19.required i j) 4 j = k9t5p19_state_0 4 j := by decide + +private theorem k9t5p19_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => ((((k9t5p19_template_matrix_0 i j ∪ k9t5p19_template_matrix_1 i j) ∪ k9t5p19_template_matrix_2 i j) ∪ k9t5p19_template_matrix_3 i j) ∪ k9t5p19_template_matrix_4 i j) ∪ requiredMatrix 9 k9t5p19.required i j) 5 j = k9t5p19_state_0 5 j := by decide + +private theorem k9t5p19_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => ((((k9t5p19_template_matrix_0 i j ∪ k9t5p19_template_matrix_1 i j) ∪ k9t5p19_template_matrix_2 i j) ∪ k9t5p19_template_matrix_3 i j) ∪ k9t5p19_template_matrix_4 i j) ∪ requiredMatrix 9 k9t5p19.required i j) 6 j = k9t5p19_state_0 6 j := by decide + +private theorem k9t5p19_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => ((((k9t5p19_template_matrix_0 i j ∪ k9t5p19_template_matrix_1 i j) ∪ k9t5p19_template_matrix_2 i j) ∪ k9t5p19_template_matrix_3 i j) ∪ k9t5p19_template_matrix_4 i j) ∪ requiredMatrix 9 k9t5p19.required i j) 7 j = k9t5p19_state_0 7 j := by decide + +private theorem k9t5p19_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => ((((k9t5p19_template_matrix_0 i j ∪ k9t5p19_template_matrix_1 i j) ∪ k9t5p19_template_matrix_2 i j) ∪ k9t5p19_template_matrix_3 i j) ∪ k9t5p19_template_matrix_4 i j) ∪ requiredMatrix 9 k9t5p19.required i j) 8 j = k9t5p19_state_0 8 j := by decide + +private theorem k9t5p19_initial_merged_eq : (fun i j => ((((k9t5p19_template_matrix_0 i j ∪ k9t5p19_template_matrix_1 i j) ∪ k9t5p19_template_matrix_2 i j) ∪ k9t5p19_template_matrix_3 i j) ∪ k9t5p19_template_matrix_4 i j) ∪ requiredMatrix 9 k9t5p19.required i j) = k9t5p19_state_0 := by + funext i j + fin_cases i + + · exact k9t5p19_initial_merged_eq_row_0 j + + · exact k9t5p19_initial_merged_eq_row_1 j + + · exact k9t5p19_initial_merged_eq_row_2 j + + · exact k9t5p19_initial_merged_eq_row_3 j + + · exact k9t5p19_initial_merged_eq_row_4 j + + · exact k9t5p19_initial_merged_eq_row_5 j + + · exact k9t5p19_initial_merged_eq_row_6 j + + · exact k9t5p19_initial_merged_eq_row_7 j + + · exact k9t5p19_initial_merged_eq_row_8 j + +private theorem k9t5p19_initial_eq : k9t5p19.initialMatrix 9 = k9t5p19_state_0 := by + funext i j + change templateMatrix (k9t5p19_templates_block_0 ++ k9t5p19_templates_block_1 ++ k9t5p19_templates_block_2 ++ k9t5p19_templates_block_3 ++ k9t5p19_templates_block_4) i j ∪ requiredMatrix 9 k9t5p19.required i j = _ + simp only [templateMatrix_append, k9t5p19_template_matrix_0_eq, k9t5p19_template_matrix_1_eq, k9t5p19_template_matrix_2_eq, k9t5p19_template_matrix_3_eq, k9t5p19_template_matrix_4_eq] + exact congrFun (congrFun k9t5p19_initial_merged_eq i) j + +private theorem k9t5p19_closure_0 : ClosureCheck k9t5p19.graph k9t5p19_state_0 9 5 [] := by trivial + +private theorem k9t5p19_matrix_eq : k9t5p19.matrix 9 = k9t5p19_state_0 := by + change closureMatrix (k9t5p19.initialMatrix 9) _ = _ + rw [k9t5p19_initial_eq] + change closureMatrix k9t5p19_state_0 [] = _ + rfl + +private theorem k9t5p19_part_0 : k9t5p19.chains.flatten = List.finRange _ := by decide + +private theorem k9t5p19_part_1 : k9t5p19.chains.map List.length = ([[1, 1, 1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t5p19_part_2 : k9t5p19.chains.map (fun l => l.map (fun i => decide (i ∈ k9t5p19.clique))) = ([[1, 1, 1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t5p19_templates_item_0 : (⟨0, 1, [], [], [2, 3, 4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4, 5, 6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_2 : (⟨0, 3, [], [2, 1], [4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_3 : (⟨0, 3, [], [2, 1], [4, 5, 6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_4 : (⟨0, 5, [], [2, 1], [4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_5 : (⟨0, 5, [], [4, 3, 2, 1], [6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_6 : (⟨0, 7, [], [2, 1], [6], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_7 : (⟨0, 7, [], [4, 3, 2, 1], [6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_8 : (⟨1, 2, [], [0], [3, 4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_9 : (⟨1, 2, [], [0], [3, 4, 5, 6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_10 : (⟨1, 3, [], [0], [2], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_11 : (⟨1, 3, [[4, 5, 6]], [0], [2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_12 : (⟨1, 4, [], [0], [3, 2], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_13 : (⟨1, 4, [[6, 7, 8]], [0], [3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_14 : (⟨1, 5, [], [0], [4], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_15 : (⟨1, 5, [], [0], [4, 3, 2], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_16 : (⟨1, 6, [[2, 3, 4]], [0], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_17 : (⟨1, 6, [], [0], [5, 4, 3, 2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_18 : (⟨1, 7, [], [0], [6], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_19 : (⟨1, 7, [[2, 3, 4]], [0], [6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_20 : (⟨1, 8, [[2, 3, 4]], [0], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_21 : (⟨1, 8, [[2, 3, 4, 5, 6]], [0], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_22 : (⟨2, 3, [], [0, 1], [4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_23 : (⟨2, 3, [], [0, 1], [4, 5, 6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_24 : (⟨2, 5, [], [0, 1], [4], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_25 : (⟨2, 5, [[6, 7, 8]], [0, 1], [4], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_26 : (⟨2, 7, [], [0, 1], [6], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_27 : (⟨2, 7, [], [0, 1], [6, 5, 4], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_28 : (⟨3, 4, [], [0, 1, 2], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_29 : (⟨3, 4, [], [0, 1, 2], [5, 6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_30 : (⟨3, 5, [], [2], [4], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_31 : (⟨3, 5, [], [0, 1, 2], [4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_32 : (⟨3, 6, [], [0, 1, 2], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_33 : (⟨3, 6, [], [0, 1, 2], [5, 4], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_34 : (⟨3, 7, [], [2], [6], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_35 : (⟨3, 7, [], [0, 1, 2], [6], 1, 4⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_36 : (⟨3, 8, [], [0, 1, 2], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_37 : (⟨3, 8, [[4, 5, 6]], [0, 1, 2], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_38 : (⟨4, 5, [[0, 1, 2]], [], [6], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_39 : (⟨4, 5, [], [0, 1, 2, 3], [6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_40 : (⟨4, 7, [[0, 1, 2]], [], [6], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_41 : (⟨4, 7, [], [0, 1, 2, 3], [6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_42 : (⟨5, 6, [[0, 1, 2]], [4], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_43 : (⟨5, 6, [], [0, 1, 2, 3, 4], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_44 : (⟨5, 7, [], [4], [6], 2, 6⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_45 : (⟨5, 7, [[0, 1, 2]], [4], [6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_46 : (⟨5, 8, [[0, 1, 2]], [4], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_47 : (⟨5, 8, [], [0, 1, 2, 3, 4], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_48 : (⟨6, 7, [[0, 1, 2]], [], [8], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_49 : (⟨6, 7, [[0, 1, 2, 3, 4]], [], [8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_50 : (⟨7, 8, [[0, 1, 2]], [6], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_item_51 : (⟨7, 8, [[0, 1, 2, 3, 4]], [6], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t5p19_templates_block_0_check : ∀ T ∈ k9t5p19_templates_block_0, T.Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p19_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p19_templates_item_0, k9t5p19_templates_item_1, k9t5p19_templates_item_2, k9t5p19_templates_item_3, k9t5p19_templates_item_4, k9t5p19_templates_item_5, k9t5p19_templates_item_6, k9t5p19_templates_item_7, k9t5p19_templates_item_8, k9t5p19_templates_item_9, k9t5p19_templates_item_10, k9t5p19_templates_item_11⟩ + +private theorem k9t5p19_templates_block_1_check : ∀ T ∈ k9t5p19_templates_block_1, T.Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p19_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p19_templates_item_12, k9t5p19_templates_item_13, k9t5p19_templates_item_14, k9t5p19_templates_item_15, k9t5p19_templates_item_16, k9t5p19_templates_item_17, k9t5p19_templates_item_18, k9t5p19_templates_item_19, k9t5p19_templates_item_20, k9t5p19_templates_item_21, k9t5p19_templates_item_22, k9t5p19_templates_item_23⟩ + +private theorem k9t5p19_templates_block_2_check : ∀ T ∈ k9t5p19_templates_block_2, T.Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p19_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p19_templates_item_24, k9t5p19_templates_item_25, k9t5p19_templates_item_26, k9t5p19_templates_item_27, k9t5p19_templates_item_28, k9t5p19_templates_item_29, k9t5p19_templates_item_30, k9t5p19_templates_item_31, k9t5p19_templates_item_32, k9t5p19_templates_item_33, k9t5p19_templates_item_34, k9t5p19_templates_item_35⟩ + +private theorem k9t5p19_templates_block_3_check : ∀ T ∈ k9t5p19_templates_block_3, T.Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p19_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p19_templates_item_36, k9t5p19_templates_item_37, k9t5p19_templates_item_38, k9t5p19_templates_item_39, k9t5p19_templates_item_40, k9t5p19_templates_item_41, k9t5p19_templates_item_42, k9t5p19_templates_item_43, k9t5p19_templates_item_44, k9t5p19_templates_item_45, k9t5p19_templates_item_46, k9t5p19_templates_item_47⟩ + +private theorem k9t5p19_templates_block_4_check : ∀ T ∈ k9t5p19_templates_block_4, T.Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t5p19_templates_block_4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t5p19_templates_item_48, k9t5p19_templates_item_49, k9t5p19_templates_item_50, k9t5p19_templates_item_51⟩ + +private theorem k9t5p19_part_3 : ∀ T ∈ k9t5p19.templates, T.Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t5p19_templates_block_0 ++ k9t5p19_templates_block_1 ++ k9t5p19_templates_block_2 ++ k9t5p19_templates_block_3 ++ k9t5p19_templates_block_4), T.Check k9t5p19.graph k9t5p19.clique 9 (patternAmount ([[1, 1, 1, 1]] : List (List ℕ))) (([[1, 1, 1, 1]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨⟨k9t5p19_templates_block_0_check, k9t5p19_templates_block_1_check⟩, k9t5p19_templates_block_2_check⟩, k9t5p19_templates_block_3_check⟩, k9t5p19_templates_block_4_check⟩ + +private theorem k9t5p19_part_4 : ∀ p ∈ k9t5p19.required, p.Check k9t5p19.graph 9 := by decide + +private theorem k9t5p19_part_5 : ClosureCheck k9t5p19.graph (k9t5p19.initialMatrix 9) 9 5 k9t5p19.closure := by + rw [k9t5p19_initial_eq] + exact k9t5p19_closure_0 + +private theorem k9t5p19_part_6 : k9t5p19.bad.Check k9t5p19.graph (k9t5p19.matrix 9) 9 5 := by + rw [k9t5p19_matrix_eq] + decide + +theorem k9t5p19_check : k9t5p19.Check 9 5 [[1, 1, 1, 1]] := + ⟨k9t5p19_part_0, k9t5p19_part_1, k9t5p19_part_2, k9t5p19_part_3, k9t5p19_part_4, k9t5p19_part_5, k9t5p19_part_6⟩ +def k9t6p0 : LayoutCertificate 6 where + chains := [[0], [1], [2], [3], [4], [5]] + clique := {0, 1, 2, 3, 4, 5} + templates := [⟨0, 1, [], [], [], 1, 8⟩, + ⟨0, 2, [], [], [], 1, 8⟩, + ⟨0, 3, [], [], [], 1, 8⟩, + ⟨0, 4, [], [], [], 1, 8⟩, + ⟨0, 5, [], [], [], 1, 8⟩, + ⟨1, 2, [], [], [], 1, 8⟩, + ⟨1, 3, [], [], [], 1, 8⟩, + ⟨1, 4, [], [], [], 1, 8⟩, + ⟨1, 5, [], [], [], 1, 8⟩, + ⟨2, 3, [], [], [], 1, 8⟩, + ⟨2, 4, [], [], [], 1, 8⟩, + ⟨2, 5, [], [], [], 1, 8⟩, + ⟨3, 4, [], [], [], 1, 8⟩, + ⟨3, 5, [], [], [], 1, 8⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3), (3, 3)}⟩ + + +private def k9t6p0_state_0 : ForbiddenMatrix 6 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p0_initial_eq_row_0 : ∀ j : Fin 6, (k9t6p0.initialMatrix 9) 0 j = k9t6p0_state_0 0 j := by decide + +private theorem k9t6p0_initial_eq_row_1 : ∀ j : Fin 6, (k9t6p0.initialMatrix 9) 1 j = k9t6p0_state_0 1 j := by decide + +private theorem k9t6p0_initial_eq_row_2 : ∀ j : Fin 6, (k9t6p0.initialMatrix 9) 2 j = k9t6p0_state_0 2 j := by decide + +private theorem k9t6p0_initial_eq_row_3 : ∀ j : Fin 6, (k9t6p0.initialMatrix 9) 3 j = k9t6p0_state_0 3 j := by decide + +private theorem k9t6p0_initial_eq_row_4 : ∀ j : Fin 6, (k9t6p0.initialMatrix 9) 4 j = k9t6p0_state_0 4 j := by decide + +private theorem k9t6p0_initial_eq_row_5 : ∀ j : Fin 6, (k9t6p0.initialMatrix 9) 5 j = k9t6p0_state_0 5 j := by decide + +private theorem k9t6p0_initial_eq : (k9t6p0.initialMatrix 9) = k9t6p0_state_0 := by + funext i j + fin_cases i + + · exact k9t6p0_initial_eq_row_0 j + + · exact k9t6p0_initial_eq_row_1 j + + · exact k9t6p0_initial_eq_row_2 j + + · exact k9t6p0_initial_eq_row_3 j + + · exact k9t6p0_initial_eq_row_4 j + + · exact k9t6p0_initial_eq_row_5 j + +private theorem k9t6p0_closure_0 : ClosureCheck k9t6p0.graph k9t6p0_state_0 9 6 [] := by trivial + +private theorem k9t6p0_matrix_eq : k9t6p0.matrix 9 = k9t6p0_state_0 := by + change closureMatrix (k9t6p0.initialMatrix 9) _ = _ + rw [k9t6p0_initial_eq] + change closureMatrix k9t6p0_state_0 [] = _ + rfl + +private theorem k9t6p0_part_0 : k9t6p0.chains.flatten = List.finRange _ := by decide + +private theorem k9t6p0_part_1 : k9t6p0.chains.map List.length = ([[], [], [], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t6p0_part_2 : k9t6p0.chains.map (fun l => l.map (fun i => decide (i ∈ k9t6p0.clique))) = ([[], [], [], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k9t6p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 8⟩ : TemplateData (Fin 6)).Check k9t6p0.graph k9t6p0.clique 9 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 8⟩ : TemplateData (Fin 6)).Check k9t6p0.graph k9t6p0.clique 9 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 8⟩ : TemplateData (Fin 6)).Check k9t6p0.graph k9t6p0.clique 9 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p0_templates_item_3 : (⟨0, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 6)).Check k9t6p0.graph k9t6p0.clique 9 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p0_templates_item_4 : (⟨0, 5, [], [], [], 1, 8⟩ : TemplateData (Fin 6)).Check k9t6p0.graph k9t6p0.clique 9 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p0_templates_item_5 : (⟨1, 2, [], [], [], 1, 8⟩ : TemplateData (Fin 6)).Check k9t6p0.graph k9t6p0.clique 9 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p0_templates_item_6 : (⟨1, 3, [], [], [], 1, 8⟩ : TemplateData (Fin 6)).Check k9t6p0.graph k9t6p0.clique 9 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p0_templates_item_7 : (⟨1, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 6)).Check k9t6p0.graph k9t6p0.clique 9 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p0_templates_item_8 : (⟨1, 5, [], [], [], 1, 8⟩ : TemplateData (Fin 6)).Check k9t6p0.graph k9t6p0.clique 9 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p0_templates_item_9 : (⟨2, 3, [], [], [], 1, 8⟩ : TemplateData (Fin 6)).Check k9t6p0.graph k9t6p0.clique 9 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p0_templates_item_10 : (⟨2, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 6)).Check k9t6p0.graph k9t6p0.clique 9 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p0_templates_item_11 : (⟨2, 5, [], [], [], 1, 8⟩ : TemplateData (Fin 6)).Check k9t6p0.graph k9t6p0.clique 9 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p0_templates_item_12 : (⟨3, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 6)).Check k9t6p0.graph k9t6p0.clique 9 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p0_templates_item_13 : (⟨3, 5, [], [], [], 1, 8⟩ : TemplateData (Fin 6)).Check k9t6p0.graph k9t6p0.clique 9 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p0_part_3 : ∀ T ∈ k9t6p0.templates, T.Check k9t6p0.graph k9t6p0.clique 9 (patternAmount ([[], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p0_templates_item_0, k9t6p0_templates_item_1, k9t6p0_templates_item_2, k9t6p0_templates_item_3, k9t6p0_templates_item_4, k9t6p0_templates_item_5, k9t6p0_templates_item_6, k9t6p0_templates_item_7, k9t6p0_templates_item_8, k9t6p0_templates_item_9, k9t6p0_templates_item_10, k9t6p0_templates_item_11, k9t6p0_templates_item_12, k9t6p0_templates_item_13⟩ + +private theorem k9t6p0_part_4 : ∀ p ∈ k9t6p0.required, p.Check k9t6p0.graph 9 := by decide + +private theorem k9t6p0_part_5 : ClosureCheck k9t6p0.graph (k9t6p0.initialMatrix 9) 9 6 k9t6p0.closure := by + rw [k9t6p0_initial_eq] + exact k9t6p0_closure_0 + +private theorem k9t6p0_part_6 : k9t6p0.bad.Check k9t6p0.graph (k9t6p0.matrix 9) 9 6 := by + rw [k9t6p0_matrix_eq] + decide + +theorem k9t6p0_check : k9t6p0.Check 9 6 [[], [], [], [], [], []] := + ⟨k9t6p0_part_0, k9t6p0_part_1, k9t6p0_part_2, k9t6p0_part_3, k9t6p0_part_4, k9t6p0_part_5, k9t6p0_part_6⟩ +def k9t6p1 : LayoutCertificate 7 where + chains := [[0], [1], [2], [3], [4, 5, 6]] + clique := {0, 1, 2, 3, 4, 6} + templates := [⟨0, 1, [], [], [], 2, 8⟩, + ⟨0, 1, [[4, 5, 6]], [], [], 1, 5⟩, + ⟨0, 2, [], [], [], 2, 8⟩, + ⟨0, 2, [[4, 5, 6]], [], [], 1, 5⟩, + ⟨0, 3, [], [], [], 2, 8⟩, + ⟨0, 3, [[4, 5, 6]], [], [], 1, 5⟩, + ⟨0, 4, [], [], [], 2, 8⟩, + ⟨0, 4, [], [], [5, 6], 1, 6⟩, + ⟨0, 5, [], [], [4], 1, 7⟩, + ⟨0, 6, [], [], [], 2, 8⟩, + ⟨0, 6, [], [], [5, 4], 1, 6⟩, + ⟨1, 2, [], [], [], 2, 8⟩, + ⟨1, 2, [[4, 5, 6]], [], [], 1, 5⟩, + ⟨1, 3, [], [], [], 2, 8⟩, + ⟨1, 3, [[4, 5, 6]], [], [], 1, 5⟩, + ⟨1, 4, [], [], [], 2, 8⟩, + ⟨1, 4, [], [], [5, 6], 1, 6⟩, + ⟨1, 5, [], [], [4], 1, 7⟩, + ⟨1, 6, [], [], [], 2, 8⟩, + ⟨1, 6, [], [], [5, 4], 1, 6⟩, + ⟨2, 3, [], [], [], 2, 8⟩, + ⟨2, 3, [[4, 5, 6]], [], [], 1, 5⟩, + ⟨2, 4, [], [], [], 2, 8⟩, + ⟨2, 4, [], [], [5, 6], 1, 6⟩, + ⟨2, 5, [], [], [4], 1, 7⟩, + ⟨2, 6, [], [], [], 2, 8⟩, + ⟨2, 6, [], [], [5, 4], 1, 6⟩, + ⟨3, 4, [], [], [], 2, 8⟩, + ⟨3, 4, [], [], [5, 6], 1, 6⟩, + ⟨3, 5, [], [], [4], 1, 7⟩, + ⟨3, 6, [], [], [], 2, 8⟩, + ⟨3, 6, [], [], [5, 4], 1, 6⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3), (3, 3)}⟩ + + +private def k9t6p1_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p1_initial_eq_row_0 : ∀ j : Fin 7, (k9t6p1.initialMatrix 9) 0 j = k9t6p1_state_0 0 j := by decide + +private theorem k9t6p1_initial_eq_row_1 : ∀ j : Fin 7, (k9t6p1.initialMatrix 9) 1 j = k9t6p1_state_0 1 j := by decide + +private theorem k9t6p1_initial_eq_row_2 : ∀ j : Fin 7, (k9t6p1.initialMatrix 9) 2 j = k9t6p1_state_0 2 j := by decide + +private theorem k9t6p1_initial_eq_row_3 : ∀ j : Fin 7, (k9t6p1.initialMatrix 9) 3 j = k9t6p1_state_0 3 j := by decide + +private theorem k9t6p1_initial_eq_row_4 : ∀ j : Fin 7, (k9t6p1.initialMatrix 9) 4 j = k9t6p1_state_0 4 j := by decide + +private theorem k9t6p1_initial_eq_row_5 : ∀ j : Fin 7, (k9t6p1.initialMatrix 9) 5 j = k9t6p1_state_0 5 j := by decide + +private theorem k9t6p1_initial_eq_row_6 : ∀ j : Fin 7, (k9t6p1.initialMatrix 9) 6 j = k9t6p1_state_0 6 j := by decide + +private theorem k9t6p1_initial_eq : (k9t6p1.initialMatrix 9) = k9t6p1_state_0 := by + funext i j + fin_cases i + + · exact k9t6p1_initial_eq_row_0 j + + · exact k9t6p1_initial_eq_row_1 j + + · exact k9t6p1_initial_eq_row_2 j + + · exact k9t6p1_initial_eq_row_3 j + + · exact k9t6p1_initial_eq_row_4 j + + · exact k9t6p1_initial_eq_row_5 j + + · exact k9t6p1_initial_eq_row_6 j + +private theorem k9t6p1_closure_0 : ClosureCheck k9t6p1.graph k9t6p1_state_0 9 6 [] := by trivial + +private theorem k9t6p1_matrix_eq : k9t6p1.matrix 9 = k9t6p1_state_0 := by + change closureMatrix (k9t6p1.initialMatrix 9) _ = _ + rw [k9t6p1_initial_eq] + change closureMatrix k9t6p1_state_0 [] = _ + rfl + +private theorem k9t6p1_part_0 : k9t6p1.chains.flatten = List.finRange _ := by decide + +private theorem k9t6p1_part_1 : k9t6p1.chains.map List.length = ([[], [], [], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t6p1_part_2 : k9t6p1.chains.map (fun l => l.map (fun i => decide (i ∈ k9t6p1.clique))) = ([[], [], [], [], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t6p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_1 : (⟨0, 1, [[4, 5, 6]], [], [], 1, 5⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_2 : (⟨0, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_3 : (⟨0, 2, [[4, 5, 6]], [], [], 1, 5⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_4 : (⟨0, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_5 : (⟨0, 3, [[4, 5, 6]], [], [], 1, 5⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_6 : (⟨0, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_7 : (⟨0, 4, [], [], [5, 6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_8 : (⟨0, 5, [], [], [4], 1, 7⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_9 : (⟨0, 6, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_10 : (⟨0, 6, [], [], [5, 4], 1, 6⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_11 : (⟨1, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_12 : (⟨1, 2, [[4, 5, 6]], [], [], 1, 5⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_13 : (⟨1, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_14 : (⟨1, 3, [[4, 5, 6]], [], [], 1, 5⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_15 : (⟨1, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_16 : (⟨1, 4, [], [], [5, 6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_17 : (⟨1, 5, [], [], [4], 1, 7⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_18 : (⟨1, 6, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_19 : (⟨1, 6, [], [], [5, 4], 1, 6⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_20 : (⟨2, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_21 : (⟨2, 3, [[4, 5, 6]], [], [], 1, 5⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_22 : (⟨2, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_23 : (⟨2, 4, [], [], [5, 6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_24 : (⟨2, 5, [], [], [4], 1, 7⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_25 : (⟨2, 6, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_26 : (⟨2, 6, [], [], [5, 4], 1, 6⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_27 : (⟨3, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_28 : (⟨3, 4, [], [], [5, 6], 1, 6⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_29 : (⟨3, 5, [], [], [4], 1, 7⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_30 : (⟨3, 6, [], [], [], 2, 8⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_templates_item_31 : (⟨3, 6, [], [], [5, 4], 1, 6⟩ : TemplateData (Fin 7)).Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p1_part_3 : ∀ T ∈ k9t6p1.templates, T.Check k9t6p1.graph k9t6p1.clique 9 (patternAmount ([[], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p1_templates_item_0, k9t6p1_templates_item_1, k9t6p1_templates_item_2, k9t6p1_templates_item_3, k9t6p1_templates_item_4, k9t6p1_templates_item_5, k9t6p1_templates_item_6, k9t6p1_templates_item_7, k9t6p1_templates_item_8, k9t6p1_templates_item_9, k9t6p1_templates_item_10, k9t6p1_templates_item_11, k9t6p1_templates_item_12, k9t6p1_templates_item_13, k9t6p1_templates_item_14, k9t6p1_templates_item_15, k9t6p1_templates_item_16, k9t6p1_templates_item_17, k9t6p1_templates_item_18, k9t6p1_templates_item_19, k9t6p1_templates_item_20, k9t6p1_templates_item_21, k9t6p1_templates_item_22, k9t6p1_templates_item_23, k9t6p1_templates_item_24, k9t6p1_templates_item_25, k9t6p1_templates_item_26, k9t6p1_templates_item_27, k9t6p1_templates_item_28, k9t6p1_templates_item_29, k9t6p1_templates_item_30, k9t6p1_templates_item_31⟩ + +private theorem k9t6p1_part_4 : ∀ p ∈ k9t6p1.required, p.Check k9t6p1.graph 9 := by decide + +private theorem k9t6p1_part_5 : ClosureCheck k9t6p1.graph (k9t6p1.initialMatrix 9) 9 6 k9t6p1.closure := by + rw [k9t6p1_initial_eq] + exact k9t6p1_closure_0 + +private theorem k9t6p1_part_6 : k9t6p1.bad.Check k9t6p1.graph (k9t6p1.matrix 9) 9 6 := by + rw [k9t6p1_matrix_eq] + decide + +theorem k9t6p1_check : k9t6p1.Check 9 6 [[], [], [], [], [1]] := + ⟨k9t6p1_part_0, k9t6p1_part_1, k9t6p1_part_2, k9t6p1_part_3, k9t6p1_part_4, k9t6p1_part_5, k9t6p1_part_6⟩ +def k9t6p2 : LayoutCertificate 8 where + chains := [[0], [1], [2], [3], [4, 5, 6, 7]] + clique := {0, 1, 2, 3, 4, 7} + templates := [⟨0, 1, [], [], [], 3, 8⟩, + ⟨0, 1, [[4, 5, 6, 7]], [], [], 1, 4⟩, + ⟨0, 2, [], [], [], 3, 8⟩, + ⟨0, 2, [[4, 5, 6, 7]], [], [], 1, 4⟩, + ⟨0, 3, [], [], [], 3, 8⟩, + ⟨0, 3, [[4, 5, 6, 7]], [], [], 1, 4⟩, + ⟨0, 4, [], [], [5, 6, 7], 1, 5⟩, + ⟨0, 5, [], [], [4], 2, 7⟩, + ⟨0, 5, [], [], [6, 7], 1, 6⟩, + ⟨0, 6, [], [], [5, 4], 1, 6⟩, + ⟨0, 7, [], [], [6, 5, 4], 1, 5⟩, + ⟨1, 2, [], [], [], 3, 8⟩, + ⟨1, 2, [[4, 5, 6, 7]], [], [], 1, 4⟩, + ⟨1, 3, [], [], [], 3, 8⟩, + ⟨1, 3, [[4, 5, 6, 7]], [], [], 1, 4⟩, + ⟨1, 4, [], [], [5, 6, 7], 1, 5⟩, + ⟨1, 5, [], [], [4], 2, 7⟩, + ⟨1, 5, [], [], [6, 7], 1, 6⟩, + ⟨1, 6, [], [], [5, 4], 1, 6⟩, + ⟨1, 7, [], [], [6, 5, 4], 1, 5⟩, + ⟨2, 3, [], [], [], 3, 8⟩, + ⟨2, 3, [[4, 5, 6, 7]], [], [], 1, 4⟩, + ⟨2, 4, [], [], [5, 6, 7], 1, 5⟩, + ⟨2, 5, [], [], [4], 2, 7⟩, + ⟨2, 5, [], [], [6, 7], 1, 6⟩, + ⟨2, 6, [], [], [5, 4], 1, 6⟩, + ⟨2, 7, [], [], [6, 5, 4], 1, 5⟩, + ⟨3, 4, [], [], [5, 6, 7], 1, 5⟩, + ⟨3, 5, [], [], [4], 2, 7⟩, + ⟨3, 5, [], [], [6, 7], 1, 6⟩, + ⟨3, 6, [], [], [5, 4], 1, 6⟩, + ⟨3, 7, [], [], [6, 5, 4], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3), (3, 3)}⟩ + + +private def k9t6p2_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p2_initial_eq_row_0 : ∀ j : Fin 8, (k9t6p2.initialMatrix 9) 0 j = k9t6p2_state_0 0 j := by decide + +private theorem k9t6p2_initial_eq_row_1 : ∀ j : Fin 8, (k9t6p2.initialMatrix 9) 1 j = k9t6p2_state_0 1 j := by decide + +private theorem k9t6p2_initial_eq_row_2 : ∀ j : Fin 8, (k9t6p2.initialMatrix 9) 2 j = k9t6p2_state_0 2 j := by decide + +private theorem k9t6p2_initial_eq_row_3 : ∀ j : Fin 8, (k9t6p2.initialMatrix 9) 3 j = k9t6p2_state_0 3 j := by decide + +private theorem k9t6p2_initial_eq_row_4 : ∀ j : Fin 8, (k9t6p2.initialMatrix 9) 4 j = k9t6p2_state_0 4 j := by decide + +private theorem k9t6p2_initial_eq_row_5 : ∀ j : Fin 8, (k9t6p2.initialMatrix 9) 5 j = k9t6p2_state_0 5 j := by decide + +private theorem k9t6p2_initial_eq_row_6 : ∀ j : Fin 8, (k9t6p2.initialMatrix 9) 6 j = k9t6p2_state_0 6 j := by decide + +private theorem k9t6p2_initial_eq_row_7 : ∀ j : Fin 8, (k9t6p2.initialMatrix 9) 7 j = k9t6p2_state_0 7 j := by decide + +private theorem k9t6p2_initial_eq : (k9t6p2.initialMatrix 9) = k9t6p2_state_0 := by + funext i j + fin_cases i + + · exact k9t6p2_initial_eq_row_0 j + + · exact k9t6p2_initial_eq_row_1 j + + · exact k9t6p2_initial_eq_row_2 j + + · exact k9t6p2_initial_eq_row_3 j + + · exact k9t6p2_initial_eq_row_4 j + + · exact k9t6p2_initial_eq_row_5 j + + · exact k9t6p2_initial_eq_row_6 j + + · exact k9t6p2_initial_eq_row_7 j + +private theorem k9t6p2_closure_0 : ClosureCheck k9t6p2.graph k9t6p2_state_0 9 6 [] := by trivial + +private theorem k9t6p2_matrix_eq : k9t6p2.matrix 9 = k9t6p2_state_0 := by + change closureMatrix (k9t6p2.initialMatrix 9) _ = _ + rw [k9t6p2_initial_eq] + change closureMatrix k9t6p2_state_0 [] = _ + rfl + +private theorem k9t6p2_part_0 : k9t6p2.chains.flatten = List.finRange _ := by decide + +private theorem k9t6p2_part_1 : k9t6p2.chains.map List.length = ([[], [], [], [], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t6p2_part_2 : k9t6p2.chains.map (fun l => l.map (fun i => decide (i ∈ k9t6p2.clique))) = ([[], [], [], [], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t6p2_templates_item_0 : (⟨0, 1, [], [], [], 3, 8⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_1 : (⟨0, 1, [[4, 5, 6, 7]], [], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_2 : (⟨0, 2, [], [], [], 3, 8⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_3 : (⟨0, 2, [[4, 5, 6, 7]], [], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_4 : (⟨0, 3, [], [], [], 3, 8⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_5 : (⟨0, 3, [[4, 5, 6, 7]], [], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_6 : (⟨0, 4, [], [], [5, 6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_7 : (⟨0, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_8 : (⟨0, 5, [], [], [6, 7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_9 : (⟨0, 6, [], [], [5, 4], 1, 6⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_10 : (⟨0, 7, [], [], [6, 5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_11 : (⟨1, 2, [], [], [], 3, 8⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_12 : (⟨1, 2, [[4, 5, 6, 7]], [], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_13 : (⟨1, 3, [], [], [], 3, 8⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_14 : (⟨1, 3, [[4, 5, 6, 7]], [], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_15 : (⟨1, 4, [], [], [5, 6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_16 : (⟨1, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_17 : (⟨1, 5, [], [], [6, 7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_18 : (⟨1, 6, [], [], [5, 4], 1, 6⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_19 : (⟨1, 7, [], [], [6, 5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_20 : (⟨2, 3, [], [], [], 3, 8⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_21 : (⟨2, 3, [[4, 5, 6, 7]], [], [], 1, 4⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_22 : (⟨2, 4, [], [], [5, 6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_23 : (⟨2, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_24 : (⟨2, 5, [], [], [6, 7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_25 : (⟨2, 6, [], [], [5, 4], 1, 6⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_26 : (⟨2, 7, [], [], [6, 5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_27 : (⟨3, 4, [], [], [5, 6, 7], 1, 5⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_28 : (⟨3, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_29 : (⟨3, 5, [], [], [6, 7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_30 : (⟨3, 6, [], [], [5, 4], 1, 6⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_templates_item_31 : (⟨3, 7, [], [], [6, 5, 4], 1, 5⟩ : TemplateData (Fin 8)).Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p2_part_3 : ∀ T ∈ k9t6p2.templates, T.Check k9t6p2.graph k9t6p2.clique 9 (patternAmount ([[], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p2_templates_item_0, k9t6p2_templates_item_1, k9t6p2_templates_item_2, k9t6p2_templates_item_3, k9t6p2_templates_item_4, k9t6p2_templates_item_5, k9t6p2_templates_item_6, k9t6p2_templates_item_7, k9t6p2_templates_item_8, k9t6p2_templates_item_9, k9t6p2_templates_item_10, k9t6p2_templates_item_11, k9t6p2_templates_item_12, k9t6p2_templates_item_13, k9t6p2_templates_item_14, k9t6p2_templates_item_15, k9t6p2_templates_item_16, k9t6p2_templates_item_17, k9t6p2_templates_item_18, k9t6p2_templates_item_19, k9t6p2_templates_item_20, k9t6p2_templates_item_21, k9t6p2_templates_item_22, k9t6p2_templates_item_23, k9t6p2_templates_item_24, k9t6p2_templates_item_25, k9t6p2_templates_item_26, k9t6p2_templates_item_27, k9t6p2_templates_item_28, k9t6p2_templates_item_29, k9t6p2_templates_item_30, k9t6p2_templates_item_31⟩ + +private theorem k9t6p2_part_4 : ∀ p ∈ k9t6p2.required, p.Check k9t6p2.graph 9 := by decide + +private theorem k9t6p2_part_5 : ClosureCheck k9t6p2.graph (k9t6p2.initialMatrix 9) 9 6 k9t6p2.closure := by + rw [k9t6p2_initial_eq] + exact k9t6p2_closure_0 + +private theorem k9t6p2_part_6 : k9t6p2.bad.Check k9t6p2.graph (k9t6p2.matrix 9) 9 6 := by + rw [k9t6p2_matrix_eq] + decide + +theorem k9t6p2_check : k9t6p2.Check 9 6 [[], [], [], [], [2]] := + ⟨k9t6p2_part_0, k9t6p2_part_1, k9t6p2_part_2, k9t6p2_part_3, k9t6p2_part_4, k9t6p2_part_5, k9t6p2_part_6⟩ +def k9t6p3 : LayoutCertificate 9 where + chains := [[0], [1], [2], [3], [4, 5, 6, 7, 8]] + clique := {0, 1, 2, 3, 4, 8} + templates := [⟨0, 1, [], [], [], 4, 8⟩, + ⟨0, 1, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩, + ⟨0, 2, [], [], [], 4, 8⟩, + ⟨0, 2, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩, + ⟨0, 3, [], [], [], 4, 8⟩, + ⟨0, 3, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩, + ⟨0, 4, [], [], [5, 6, 7, 8], 1, 4⟩, + ⟨0, 5, [], [], [6, 7, 8], 1, 5⟩, + ⟨0, 7, [], [], [6, 5, 4], 1, 5⟩, + ⟨0, 8, [], [], [7, 6, 5, 4], 1, 4⟩, + ⟨1, 2, [], [], [], 4, 8⟩, + ⟨1, 2, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩, + ⟨1, 3, [], [], [], 4, 8⟩, + ⟨1, 3, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩, + ⟨1, 4, [], [], [5, 6, 7, 8], 1, 4⟩, + ⟨1, 5, [], [], [6, 7, 8], 1, 5⟩, + ⟨1, 7, [], [], [6, 5, 4], 1, 5⟩, + ⟨1, 8, [], [], [7, 6, 5, 4], 1, 4⟩, + ⟨2, 3, [], [], [], 4, 8⟩, + ⟨2, 3, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩, + ⟨2, 4, [], [], [5, 6, 7, 8], 1, 4⟩, + ⟨2, 5, [], [], [6, 7, 8], 1, 5⟩, + ⟨2, 7, [], [], [6, 5, 4], 1, 5⟩, + ⟨2, 8, [], [], [7, 6, 5, 4], 1, 4⟩, + ⟨3, 4, [], [], [5, 6, 7, 8], 1, 4⟩, + ⟨3, 5, [], [], [6, 7, 8], 1, 5⟩, + ⟨3, 7, [], [], [6, 5, 4], 1, 5⟩, + ⟨3, 8, [], [], [7, 6, 5, 4], 1, 4⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3), (3, 3)}⟩ + + +private def k9t6p3_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 4, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 4, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 4, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 4, Finset.Icc 1 5, ∅, Finset.Icc 1 5, Finset.Icc 1 4], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[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 ∅ + +private theorem k9t6p3_initial_eq_row_0 : ∀ j : Fin 9, (k9t6p3.initialMatrix 9) 0 j = k9t6p3_state_0 0 j := by decide + +private theorem k9t6p3_initial_eq_row_1 : ∀ j : Fin 9, (k9t6p3.initialMatrix 9) 1 j = k9t6p3_state_0 1 j := by decide + +private theorem k9t6p3_initial_eq_row_2 : ∀ j : Fin 9, (k9t6p3.initialMatrix 9) 2 j = k9t6p3_state_0 2 j := by decide + +private theorem k9t6p3_initial_eq_row_3 : ∀ j : Fin 9, (k9t6p3.initialMatrix 9) 3 j = k9t6p3_state_0 3 j := by decide + +private theorem k9t6p3_initial_eq_row_4 : ∀ j : Fin 9, (k9t6p3.initialMatrix 9) 4 j = k9t6p3_state_0 4 j := by decide + +private theorem k9t6p3_initial_eq_row_5 : ∀ j : Fin 9, (k9t6p3.initialMatrix 9) 5 j = k9t6p3_state_0 5 j := by decide + +private theorem k9t6p3_initial_eq_row_6 : ∀ j : Fin 9, (k9t6p3.initialMatrix 9) 6 j = k9t6p3_state_0 6 j := by decide + +private theorem k9t6p3_initial_eq_row_7 : ∀ j : Fin 9, (k9t6p3.initialMatrix 9) 7 j = k9t6p3_state_0 7 j := by decide + +private theorem k9t6p3_initial_eq_row_8 : ∀ j : Fin 9, (k9t6p3.initialMatrix 9) 8 j = k9t6p3_state_0 8 j := by decide + +private theorem k9t6p3_initial_eq : (k9t6p3.initialMatrix 9) = k9t6p3_state_0 := by + funext i j + fin_cases i + + · exact k9t6p3_initial_eq_row_0 j + + · exact k9t6p3_initial_eq_row_1 j + + · exact k9t6p3_initial_eq_row_2 j + + · exact k9t6p3_initial_eq_row_3 j + + · exact k9t6p3_initial_eq_row_4 j + + · exact k9t6p3_initial_eq_row_5 j + + · exact k9t6p3_initial_eq_row_6 j + + · exact k9t6p3_initial_eq_row_7 j + + · exact k9t6p3_initial_eq_row_8 j + +private theorem k9t6p3_closure_0 : ClosureCheck k9t6p3.graph k9t6p3_state_0 9 6 [] := by trivial + +private theorem k9t6p3_matrix_eq : k9t6p3.matrix 9 = k9t6p3_state_0 := by + change closureMatrix (k9t6p3.initialMatrix 9) _ = _ + rw [k9t6p3_initial_eq] + change closureMatrix k9t6p3_state_0 [] = _ + rfl + +private theorem k9t6p3_part_0 : k9t6p3.chains.flatten = List.finRange _ := by decide + +private theorem k9t6p3_part_1 : k9t6p3.chains.map List.length = ([[], [], [], [], [3]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t6p3_part_2 : k9t6p3.chains.map (fun l => l.map (fun i => decide (i ∈ k9t6p3.clique))) = ([[], [], [], [], [3]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t6p3_templates_item_0 : (⟨0, 1, [], [], [], 4, 8⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_1 : (⟨0, 1, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_2 : (⟨0, 2, [], [], [], 4, 8⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_3 : (⟨0, 2, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_4 : (⟨0, 3, [], [], [], 4, 8⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_5 : (⟨0, 3, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_6 : (⟨0, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_7 : (⟨0, 5, [], [], [6, 7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_8 : (⟨0, 7, [], [], [6, 5, 4], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_9 : (⟨0, 8, [], [], [7, 6, 5, 4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_10 : (⟨1, 2, [], [], [], 4, 8⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_11 : (⟨1, 2, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_12 : (⟨1, 3, [], [], [], 4, 8⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_13 : (⟨1, 3, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_14 : (⟨1, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_15 : (⟨1, 5, [], [], [6, 7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_16 : (⟨1, 7, [], [], [6, 5, 4], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_17 : (⟨1, 8, [], [], [7, 6, 5, 4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_18 : (⟨2, 3, [], [], [], 4, 8⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_19 : (⟨2, 3, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_20 : (⟨2, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_21 : (⟨2, 5, [], [], [6, 7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_22 : (⟨2, 7, [], [], [6, 5, 4], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_23 : (⟨2, 8, [], [], [7, 6, 5, 4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_24 : (⟨3, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_25 : (⟨3, 5, [], [], [6, 7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_26 : (⟨3, 7, [], [], [6, 5, 4], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_templates_item_27 : (⟨3, 8, [], [], [7, 6, 5, 4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p3_part_3 : ∀ T ∈ k9t6p3.templates, T.Check k9t6p3.graph k9t6p3.clique 9 (patternAmount ([[], [], [], [], [3]] : List (List ℕ))) (([[], [], [], [], [3]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p3_templates_item_0, k9t6p3_templates_item_1, k9t6p3_templates_item_2, k9t6p3_templates_item_3, k9t6p3_templates_item_4, k9t6p3_templates_item_5, k9t6p3_templates_item_6, k9t6p3_templates_item_7, k9t6p3_templates_item_8, k9t6p3_templates_item_9, k9t6p3_templates_item_10, k9t6p3_templates_item_11, k9t6p3_templates_item_12, k9t6p3_templates_item_13, k9t6p3_templates_item_14, k9t6p3_templates_item_15, k9t6p3_templates_item_16, k9t6p3_templates_item_17, k9t6p3_templates_item_18, k9t6p3_templates_item_19, k9t6p3_templates_item_20, k9t6p3_templates_item_21, k9t6p3_templates_item_22, k9t6p3_templates_item_23, k9t6p3_templates_item_24, k9t6p3_templates_item_25, k9t6p3_templates_item_26, k9t6p3_templates_item_27⟩ + +private theorem k9t6p3_part_4 : ∀ p ∈ k9t6p3.required, p.Check k9t6p3.graph 9 := by decide + +private theorem k9t6p3_part_5 : ClosureCheck k9t6p3.graph (k9t6p3.initialMatrix 9) 9 6 k9t6p3.closure := by + rw [k9t6p3_initial_eq] + exact k9t6p3_closure_0 + +private theorem k9t6p3_part_6 : k9t6p3.bad.Check k9t6p3.graph (k9t6p3.matrix 9) 9 6 := by + rw [k9t6p3_matrix_eq] + decide + +theorem k9t6p3_check : k9t6p3.Check 9 6 [[], [], [], [], [3]] := + ⟨k9t6p3_part_0, k9t6p3_part_1, k9t6p3_part_2, k9t6p3_part_3, k9t6p3_part_4, k9t6p3_part_5, k9t6p3_part_6⟩ +def k9t6p4 : LayoutCertificate 8 where + chains := [[0], [1], [2], [3, 4, 5, 6, 7]] + clique := {0, 1, 2, 3, 5, 7} + templates := [⟨0, 1, [], [], [], 2, 8⟩, + ⟨0, 1, [[3, 4, 5, 6, 7]], [], [], 1, 3⟩, + ⟨0, 2, [], [], [], 2, 8⟩, + ⟨0, 2, [[3, 4, 5, 6, 7]], [], [], 1, 3⟩, + ⟨0, 3, [], [], [], 2, 8⟩, + ⟨0, 3, [], [], [4, 5, 6, 7], 1, 4⟩, + ⟨0, 4, [], [], [3], 1, 7⟩, + ⟨0, 6, [], [], [5], 1, 7⟩, + ⟨0, 7, [], [], [], 2, 8⟩, + ⟨0, 7, [], [], [6, 5, 4, 3], 1, 4⟩, + ⟨1, 2, [], [], [], 2, 8⟩, + ⟨1, 2, [[3, 4, 5, 6, 7]], [], [], 1, 3⟩, + ⟨1, 3, [], [], [], 2, 8⟩, + ⟨1, 3, [], [], [4, 5, 6, 7], 1, 4⟩, + ⟨1, 4, [], [], [3], 1, 7⟩, + ⟨1, 6, [], [], [5], 1, 7⟩, + ⟨1, 7, [], [], [], 2, 8⟩, + ⟨1, 7, [], [], [6, 5, 4, 3], 1, 4⟩, + ⟨2, 4, [], [], [3], 1, 7⟩, + ⟨2, 6, [], [], [5], 1, 7⟩, + ⟨3, 4, [], [], [5], 1, 7⟩, + ⟨3, 6, [], [], [5], 1, 7⟩, + ⟨4, 5, [], [3], [], 1, 7⟩, + ⟨4, 6, [], [3], [5], 1, 6⟩, + ⟨4, 7, [], [3], [], 1, 7⟩, + ⟨5, 6, [], [], [7], 1, 7⟩, + ⟨6, 7, [], [5], [], 1, 7⟩] + required := [] + closure := [] + bad := ⟨none, {(4, 3), (6, 3), (0, 3), (1, 3)}⟩ + + +private def k9t6p4_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p4_initial_eq_row_0 : ∀ j : Fin 8, (k9t6p4.initialMatrix 9) 0 j = k9t6p4_state_0 0 j := by decide + +private theorem k9t6p4_initial_eq_row_1 : ∀ j : Fin 8, (k9t6p4.initialMatrix 9) 1 j = k9t6p4_state_0 1 j := by decide + +private theorem k9t6p4_initial_eq_row_2 : ∀ j : Fin 8, (k9t6p4.initialMatrix 9) 2 j = k9t6p4_state_0 2 j := by decide + +private theorem k9t6p4_initial_eq_row_3 : ∀ j : Fin 8, (k9t6p4.initialMatrix 9) 3 j = k9t6p4_state_0 3 j := by decide + +private theorem k9t6p4_initial_eq_row_4 : ∀ j : Fin 8, (k9t6p4.initialMatrix 9) 4 j = k9t6p4_state_0 4 j := by decide + +private theorem k9t6p4_initial_eq_row_5 : ∀ j : Fin 8, (k9t6p4.initialMatrix 9) 5 j = k9t6p4_state_0 5 j := by decide + +private theorem k9t6p4_initial_eq_row_6 : ∀ j : Fin 8, (k9t6p4.initialMatrix 9) 6 j = k9t6p4_state_0 6 j := by decide + +private theorem k9t6p4_initial_eq_row_7 : ∀ j : Fin 8, (k9t6p4.initialMatrix 9) 7 j = k9t6p4_state_0 7 j := by decide + +private theorem k9t6p4_initial_eq : (k9t6p4.initialMatrix 9) = k9t6p4_state_0 := by + funext i j + fin_cases i + + · exact k9t6p4_initial_eq_row_0 j + + · exact k9t6p4_initial_eq_row_1 j + + · exact k9t6p4_initial_eq_row_2 j + + · exact k9t6p4_initial_eq_row_3 j + + · exact k9t6p4_initial_eq_row_4 j + + · exact k9t6p4_initial_eq_row_5 j + + · exact k9t6p4_initial_eq_row_6 j + + · exact k9t6p4_initial_eq_row_7 j + +private theorem k9t6p4_closure_0 : ClosureCheck k9t6p4.graph k9t6p4_state_0 9 6 [] := by trivial + +private theorem k9t6p4_matrix_eq : k9t6p4.matrix 9 = k9t6p4_state_0 := by + change closureMatrix (k9t6p4.initialMatrix 9) _ = _ + rw [k9t6p4_initial_eq] + change closureMatrix k9t6p4_state_0 [] = _ + rfl + +private theorem k9t6p4_part_0 : k9t6p4.chains.flatten = List.finRange _ := by decide + +private theorem k9t6p4_part_1 : k9t6p4.chains.map List.length = ([[], [], [], [1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t6p4_part_2 : k9t6p4.chains.map (fun l => l.map (fun i => decide (i ∈ k9t6p4.clique))) = ([[], [], [], [1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t6p4_templates_item_0 : (⟨0, 1, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_1 : (⟨0, 1, [[3, 4, 5, 6, 7]], [], [], 1, 3⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_2 : (⟨0, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_3 : (⟨0, 2, [[3, 4, 5, 6, 7]], [], [], 1, 3⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_4 : (⟨0, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_5 : (⟨0, 3, [], [], [4, 5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_6 : (⟨0, 4, [], [], [3], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_7 : (⟨0, 6, [], [], [5], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_8 : (⟨0, 7, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_9 : (⟨0, 7, [], [], [6, 5, 4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_10 : (⟨1, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_11 : (⟨1, 2, [[3, 4, 5, 6, 7]], [], [], 1, 3⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_12 : (⟨1, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_13 : (⟨1, 3, [], [], [4, 5, 6, 7], 1, 4⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_14 : (⟨1, 4, [], [], [3], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_15 : (⟨1, 6, [], [], [5], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_16 : (⟨1, 7, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_17 : (⟨1, 7, [], [], [6, 5, 4, 3], 1, 4⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_18 : (⟨2, 4, [], [], [3], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_19 : (⟨2, 6, [], [], [5], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_20 : (⟨3, 4, [], [], [5], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_21 : (⟨3, 6, [], [], [5], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_22 : (⟨4, 5, [], [3], [], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_23 : (⟨4, 6, [], [3], [5], 1, 6⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_24 : (⟨4, 7, [], [3], [], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_25 : (⟨5, 6, [], [], [7], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_templates_item_26 : (⟨6, 7, [], [5], [], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p4_part_3 : ∀ T ∈ k9t6p4.templates, T.Check k9t6p4.graph k9t6p4.clique 9 (patternAmount ([[], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p4, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p4_templates_item_0, k9t6p4_templates_item_1, k9t6p4_templates_item_2, k9t6p4_templates_item_3, k9t6p4_templates_item_4, k9t6p4_templates_item_5, k9t6p4_templates_item_6, k9t6p4_templates_item_7, k9t6p4_templates_item_8, k9t6p4_templates_item_9, k9t6p4_templates_item_10, k9t6p4_templates_item_11, k9t6p4_templates_item_12, k9t6p4_templates_item_13, k9t6p4_templates_item_14, k9t6p4_templates_item_15, k9t6p4_templates_item_16, k9t6p4_templates_item_17, k9t6p4_templates_item_18, k9t6p4_templates_item_19, k9t6p4_templates_item_20, k9t6p4_templates_item_21, k9t6p4_templates_item_22, k9t6p4_templates_item_23, k9t6p4_templates_item_24, k9t6p4_templates_item_25, k9t6p4_templates_item_26⟩ + +private theorem k9t6p4_part_4 : ∀ p ∈ k9t6p4.required, p.Check k9t6p4.graph 9 := by decide + +private theorem k9t6p4_part_5 : ClosureCheck k9t6p4.graph (k9t6p4.initialMatrix 9) 9 6 k9t6p4.closure := by + rw [k9t6p4_initial_eq] + exact k9t6p4_closure_0 + +private theorem k9t6p4_part_6 : k9t6p4.bad.Check k9t6p4.graph (k9t6p4.matrix 9) 9 6 := by + rw [k9t6p4_matrix_eq] + decide + +theorem k9t6p4_check : k9t6p4.Check 9 6 [[], [], [], [1, 1]] := + ⟨k9t6p4_part_0, k9t6p4_part_1, k9t6p4_part_2, k9t6p4_part_3, k9t6p4_part_4, k9t6p4_part_5, k9t6p4_part_6⟩ +private def k9t6p5_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [], [], [], 3, 8⟩, ⟨0, 1, [[5, 6, 7, 8]], [], [], 2, 4⟩, ⟨0, 1, [[3, 4, 5, 6, 7, 8]], [], [], 1, 2⟩, ⟨0, 2, [], [], [], 3, 8⟩, ⟨0, 2, [[5, 6, 7, 8]], [], [], 2, 4⟩, ⟨0, 2, [[3, 4, 5, 6, 7, 8]], [], [], 1, 2⟩, ⟨0, 3, [[5, 6, 7, 8]], [], [], 2, 4⟩, ⟨0, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩, ⟨0, 4, [], [], [3], 2, 7⟩, ⟨0, 4, [[5, 6, 7, 8]], [], [3], 1, 3⟩, ⟨0, 6, [], [], [5], 2, 7⟩, ⟨0, 6, [], [], [7, 8], 1, 6⟩] + +private def k9t6p5_templates_block_1 : List (TemplateData (Fin 9)) := [⟨0, 7, [], [], [6, 5], 1, 6⟩, ⟨0, 8, [], [], [7, 6, 5], 2, 5⟩, ⟨0, 8, [], [], [7, 6, 5, 4, 3], 1, 3⟩, ⟨1, 2, [], [], [], 3, 8⟩, ⟨1, 2, [[5, 6, 7, 8]], [], [], 2, 4⟩, ⟨1, 2, [[3, 4, 5, 6, 7, 8]], [], [], 1, 2⟩, ⟨1, 3, [[5, 6, 7, 8]], [], [], 2, 4⟩, ⟨1, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩, ⟨1, 4, [], [], [3], 2, 7⟩, ⟨1, 4, [[5, 6, 7, 8]], [], [3], 1, 3⟩, ⟨1, 6, [], [], [5], 2, 7⟩, ⟨1, 6, [], [], [7, 8], 1, 6⟩] + +private def k9t6p5_templates_block_2 : List (TemplateData (Fin 9)) := [⟨1, 7, [], [], [6, 5], 1, 6⟩, ⟨1, 8, [], [], [7, 6, 5], 2, 5⟩, ⟨1, 8, [], [], [7, 6, 5, 4, 3], 1, 3⟩, ⟨2, 3, [[5, 6, 7, 8]], [], [], 2, 4⟩, ⟨2, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩, ⟨2, 4, [], [], [3], 2, 7⟩, ⟨2, 4, [[5, 6, 7, 8]], [], [3], 1, 3⟩, ⟨2, 6, [], [], [5], 2, 7⟩, ⟨2, 6, [], [], [7, 8], 1, 6⟩, ⟨2, 7, [], [], [6, 5], 1, 6⟩, ⟨2, 8, [], [], [7, 6, 5], 2, 5⟩, ⟨2, 8, [], [], [7, 6, 5, 4, 3], 1, 3⟩] + +private def k9t6p5_templates_block_3 : List (TemplateData (Fin 9)) := [⟨3, 4, [], [], [5], 2, 7⟩, ⟨3, 4, [], [], [5, 6, 7, 8], 1, 4⟩, ⟨4, 5, [], [3], [], 2, 7⟩, ⟨4, 5, [], [3], [6, 7, 8], 1, 4⟩, ⟨4, 6, [], [3], [5], 1, 6⟩, ⟨4, 7, [], [3], [6, 5], 1, 5⟩, ⟨4, 8, [], [3], [], 2, 7⟩, ⟨4, 8, [], [3], [7, 6, 5], 1, 4⟩] + +def k9t6p5 : LayoutCertificate 9 where + chains := [[0], [1], [2], [3, 4, 5, 6, 7, 8]] + clique := {0, 1, 2, 3, 5, 8} + templates := k9t6p5_templates_block_0 ++ k9t6p5_templates_block_1 ++ k9t6p5_templates_block_2 ++ k9t6p5_templates_block_3 + required := [] + closure := [] + bad := ⟨none, {(4, 3), (0, 3), (1, 3), (2, 3)}⟩ + + +private def k9t6p5_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 4, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 4, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 4, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 7], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t6p5_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 4, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p5_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_0) 0 j = k9t6p5_template_matrix_0 0 j := by decide + +private theorem k9t6p5_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_0) 1 j = k9t6p5_template_matrix_0 1 j := by decide + +private theorem k9t6p5_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_0) 2 j = k9t6p5_template_matrix_0 2 j := by decide + +private theorem k9t6p5_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_0) 3 j = k9t6p5_template_matrix_0 3 j := by decide + +private theorem k9t6p5_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_0) 4 j = k9t6p5_template_matrix_0 4 j := by decide + +private theorem k9t6p5_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_0) 5 j = k9t6p5_template_matrix_0 5 j := by decide + +private theorem k9t6p5_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_0) 6 j = k9t6p5_template_matrix_0 6 j := by decide + +private theorem k9t6p5_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_0) 7 j = k9t6p5_template_matrix_0 7 j := by decide + +private theorem k9t6p5_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_0) 8 j = k9t6p5_template_matrix_0 8 j := by decide + +private theorem k9t6p5_template_matrix_0_eq : (templateMatrix k9t6p5_templates_block_0) = k9t6p5_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t6p5_template_matrix_0_eq_row_0 j + + · exact k9t6p5_template_matrix_0_eq_row_1 j + + · exact k9t6p5_template_matrix_0_eq_row_2 j + + · exact k9t6p5_template_matrix_0_eq_row_3 j + + · exact k9t6p5_template_matrix_0_eq_row_4 j + + · exact k9t6p5_template_matrix_0_eq_row_5 j + + · exact k9t6p5_template_matrix_0_eq_row_6 j + + · exact k9t6p5_template_matrix_0_eq_row_7 j + + · exact k9t6p5_template_matrix_0_eq_row_8 j + +private def k9t6p5_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 5], + #[∅, ∅, Finset.Icc 1 8, Finset.Icc 1 4, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, ∅], + #[∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p5_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_1) 0 j = k9t6p5_template_matrix_1 0 j := by decide + +private theorem k9t6p5_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_1) 1 j = k9t6p5_template_matrix_1 1 j := by decide + +private theorem k9t6p5_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_1) 2 j = k9t6p5_template_matrix_1 2 j := by decide + +private theorem k9t6p5_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_1) 3 j = k9t6p5_template_matrix_1 3 j := by decide + +private theorem k9t6p5_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_1) 4 j = k9t6p5_template_matrix_1 4 j := by decide + +private theorem k9t6p5_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_1) 5 j = k9t6p5_template_matrix_1 5 j := by decide + +private theorem k9t6p5_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_1) 6 j = k9t6p5_template_matrix_1 6 j := by decide + +private theorem k9t6p5_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_1) 7 j = k9t6p5_template_matrix_1 7 j := by decide + +private theorem k9t6p5_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_1) 8 j = k9t6p5_template_matrix_1 8 j := by decide + +private theorem k9t6p5_template_matrix_1_eq : (templateMatrix k9t6p5_templates_block_1) = k9t6p5_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t6p5_template_matrix_1_eq_row_0 j + + · exact k9t6p5_template_matrix_1_eq_row_1 j + + · exact k9t6p5_template_matrix_1_eq_row_2 j + + · exact k9t6p5_template_matrix_1_eq_row_3 j + + · exact k9t6p5_template_matrix_1_eq_row_4 j + + · exact k9t6p5_template_matrix_1_eq_row_5 j + + · exact k9t6p5_template_matrix_1_eq_row_6 j + + · exact k9t6p5_template_matrix_1_eq_row_7 j + + · exact k9t6p5_template_matrix_1_eq_row_8 j + +private def k9t6p5_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 5], + #[∅, ∅, ∅, Finset.Icc 1 4, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[∅, ∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p5_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_2) 0 j = k9t6p5_template_matrix_2 0 j := by decide + +private theorem k9t6p5_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_2) 1 j = k9t6p5_template_matrix_2 1 j := by decide + +private theorem k9t6p5_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_2) 2 j = k9t6p5_template_matrix_2 2 j := by decide + +private theorem k9t6p5_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_2) 3 j = k9t6p5_template_matrix_2 3 j := by decide + +private theorem k9t6p5_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_2) 4 j = k9t6p5_template_matrix_2 4 j := by decide + +private theorem k9t6p5_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_2) 5 j = k9t6p5_template_matrix_2 5 j := by decide + +private theorem k9t6p5_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_2) 6 j = k9t6p5_template_matrix_2 6 j := by decide + +private theorem k9t6p5_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_2) 7 j = k9t6p5_template_matrix_2 7 j := by decide + +private theorem k9t6p5_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_2) 8 j = k9t6p5_template_matrix_2 8 j := by decide + +private theorem k9t6p5_template_matrix_2_eq : (templateMatrix k9t6p5_templates_block_2) = k9t6p5_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t6p5_template_matrix_2_eq_row_0 j + + · exact k9t6p5_template_matrix_2_eq_row_1 j + + · exact k9t6p5_template_matrix_2_eq_row_2 j + + · exact k9t6p5_template_matrix_2_eq_row_3 j + + · exact k9t6p5_template_matrix_2_eq_row_4 j + + · exact k9t6p5_template_matrix_2_eq_row_5 j + + · exact k9t6p5_template_matrix_2_eq_row_6 j + + · exact k9t6p5_template_matrix_2_eq_row_7 j + + · exact k9t6p5_template_matrix_2_eq_row_8 j + +private def k9t6p5_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 7], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p5_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_3) 0 j = k9t6p5_template_matrix_3 0 j := by decide + +private theorem k9t6p5_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_3) 1 j = k9t6p5_template_matrix_3 1 j := by decide + +private theorem k9t6p5_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_3) 2 j = k9t6p5_template_matrix_3 2 j := by decide + +private theorem k9t6p5_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_3) 3 j = k9t6p5_template_matrix_3 3 j := by decide + +private theorem k9t6p5_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_3) 4 j = k9t6p5_template_matrix_3 4 j := by decide + +private theorem k9t6p5_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_3) 5 j = k9t6p5_template_matrix_3 5 j := by decide + +private theorem k9t6p5_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_3) 6 j = k9t6p5_template_matrix_3 6 j := by decide + +private theorem k9t6p5_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_3) 7 j = k9t6p5_template_matrix_3 7 j := by decide + +private theorem k9t6p5_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p5_templates_block_3) 8 j = k9t6p5_template_matrix_3 8 j := by decide + +private theorem k9t6p5_template_matrix_3_eq : (templateMatrix k9t6p5_templates_block_3) = k9t6p5_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t6p5_template_matrix_3_eq_row_0 j + + · exact k9t6p5_template_matrix_3_eq_row_1 j + + · exact k9t6p5_template_matrix_3_eq_row_2 j + + · exact k9t6p5_template_matrix_3_eq_row_3 j + + · exact k9t6p5_template_matrix_3_eq_row_4 j + + · exact k9t6p5_template_matrix_3_eq_row_5 j + + · exact k9t6p5_template_matrix_3_eq_row_6 j + + · exact k9t6p5_template_matrix_3_eq_row_7 j + + · exact k9t6p5_template_matrix_3_eq_row_8 j + +private theorem k9t6p5_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => (((k9t6p5_template_matrix_0 i j ∪ k9t6p5_template_matrix_1 i j) ∪ k9t6p5_template_matrix_2 i j) ∪ k9t6p5_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p5.required i j) 0 j = k9t6p5_state_0 0 j := by decide + +private theorem k9t6p5_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => (((k9t6p5_template_matrix_0 i j ∪ k9t6p5_template_matrix_1 i j) ∪ k9t6p5_template_matrix_2 i j) ∪ k9t6p5_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p5.required i j) 1 j = k9t6p5_state_0 1 j := by decide + +private theorem k9t6p5_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => (((k9t6p5_template_matrix_0 i j ∪ k9t6p5_template_matrix_1 i j) ∪ k9t6p5_template_matrix_2 i j) ∪ k9t6p5_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p5.required i j) 2 j = k9t6p5_state_0 2 j := by decide + +private theorem k9t6p5_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => (((k9t6p5_template_matrix_0 i j ∪ k9t6p5_template_matrix_1 i j) ∪ k9t6p5_template_matrix_2 i j) ∪ k9t6p5_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p5.required i j) 3 j = k9t6p5_state_0 3 j := by decide + +private theorem k9t6p5_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => (((k9t6p5_template_matrix_0 i j ∪ k9t6p5_template_matrix_1 i j) ∪ k9t6p5_template_matrix_2 i j) ∪ k9t6p5_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p5.required i j) 4 j = k9t6p5_state_0 4 j := by decide + +private theorem k9t6p5_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => (((k9t6p5_template_matrix_0 i j ∪ k9t6p5_template_matrix_1 i j) ∪ k9t6p5_template_matrix_2 i j) ∪ k9t6p5_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p5.required i j) 5 j = k9t6p5_state_0 5 j := by decide + +private theorem k9t6p5_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => (((k9t6p5_template_matrix_0 i j ∪ k9t6p5_template_matrix_1 i j) ∪ k9t6p5_template_matrix_2 i j) ∪ k9t6p5_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p5.required i j) 6 j = k9t6p5_state_0 6 j := by decide + +private theorem k9t6p5_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => (((k9t6p5_template_matrix_0 i j ∪ k9t6p5_template_matrix_1 i j) ∪ k9t6p5_template_matrix_2 i j) ∪ k9t6p5_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p5.required i j) 7 j = k9t6p5_state_0 7 j := by decide + +private theorem k9t6p5_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => (((k9t6p5_template_matrix_0 i j ∪ k9t6p5_template_matrix_1 i j) ∪ k9t6p5_template_matrix_2 i j) ∪ k9t6p5_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p5.required i j) 8 j = k9t6p5_state_0 8 j := by decide + +private theorem k9t6p5_initial_merged_eq : (fun i j => (((k9t6p5_template_matrix_0 i j ∪ k9t6p5_template_matrix_1 i j) ∪ k9t6p5_template_matrix_2 i j) ∪ k9t6p5_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p5.required i j) = k9t6p5_state_0 := by + funext i j + fin_cases i + + · exact k9t6p5_initial_merged_eq_row_0 j + + · exact k9t6p5_initial_merged_eq_row_1 j + + · exact k9t6p5_initial_merged_eq_row_2 j + + · exact k9t6p5_initial_merged_eq_row_3 j + + · exact k9t6p5_initial_merged_eq_row_4 j + + · exact k9t6p5_initial_merged_eq_row_5 j + + · exact k9t6p5_initial_merged_eq_row_6 j + + · exact k9t6p5_initial_merged_eq_row_7 j + + · exact k9t6p5_initial_merged_eq_row_8 j + +private theorem k9t6p5_initial_eq : k9t6p5.initialMatrix 9 = k9t6p5_state_0 := by + funext i j + change templateMatrix (k9t6p5_templates_block_0 ++ k9t6p5_templates_block_1 ++ k9t6p5_templates_block_2 ++ k9t6p5_templates_block_3) i j ∪ requiredMatrix 9 k9t6p5.required i j = _ + simp only [templateMatrix_append, k9t6p5_template_matrix_0_eq, k9t6p5_template_matrix_1_eq, k9t6p5_template_matrix_2_eq, k9t6p5_template_matrix_3_eq] + exact congrFun (congrFun k9t6p5_initial_merged_eq i) j + +private theorem k9t6p5_closure_0 : ClosureCheck k9t6p5.graph k9t6p5_state_0 9 6 [] := by trivial + +private theorem k9t6p5_matrix_eq : k9t6p5.matrix 9 = k9t6p5_state_0 := by + change closureMatrix (k9t6p5.initialMatrix 9) _ = _ + rw [k9t6p5_initial_eq] + change closureMatrix k9t6p5_state_0 [] = _ + rfl + +private theorem k9t6p5_part_0 : k9t6p5.chains.flatten = List.finRange _ := by decide + +private theorem k9t6p5_part_1 : k9t6p5.chains.map List.length = ([[], [], [], [1, 2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t6p5_part_2 : k9t6p5.chains.map (fun l => l.map (fun i => decide (i ∈ k9t6p5.clique))) = ([[], [], [], [1, 2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t6p5_templates_item_0 : (⟨0, 1, [], [], [], 3, 8⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_1 : (⟨0, 1, [[5, 6, 7, 8]], [], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_2 : (⟨0, 1, [[3, 4, 5, 6, 7, 8]], [], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_3 : (⟨0, 2, [], [], [], 3, 8⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_4 : (⟨0, 2, [[5, 6, 7, 8]], [], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_5 : (⟨0, 2, [[3, 4, 5, 6, 7, 8]], [], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_6 : (⟨0, 3, [[5, 6, 7, 8]], [], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_7 : (⟨0, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_8 : (⟨0, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_9 : (⟨0, 4, [[5, 6, 7, 8]], [], [3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_10 : (⟨0, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_11 : (⟨0, 6, [], [], [7, 8], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_12 : (⟨0, 7, [], [], [6, 5], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_13 : (⟨0, 8, [], [], [7, 6, 5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_14 : (⟨0, 8, [], [], [7, 6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_15 : (⟨1, 2, [], [], [], 3, 8⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_16 : (⟨1, 2, [[5, 6, 7, 8]], [], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_17 : (⟨1, 2, [[3, 4, 5, 6, 7, 8]], [], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_18 : (⟨1, 3, [[5, 6, 7, 8]], [], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_19 : (⟨1, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_20 : (⟨1, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_21 : (⟨1, 4, [[5, 6, 7, 8]], [], [3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_22 : (⟨1, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_23 : (⟨1, 6, [], [], [7, 8], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_24 : (⟨1, 7, [], [], [6, 5], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_25 : (⟨1, 8, [], [], [7, 6, 5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_26 : (⟨1, 8, [], [], [7, 6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_27 : (⟨2, 3, [[5, 6, 7, 8]], [], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_28 : (⟨2, 3, [], [], [4, 5, 6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_29 : (⟨2, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_30 : (⟨2, 4, [[5, 6, 7, 8]], [], [3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_31 : (⟨2, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_32 : (⟨2, 6, [], [], [7, 8], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_33 : (⟨2, 7, [], [], [6, 5], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_34 : (⟨2, 8, [], [], [7, 6, 5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_35 : (⟨2, 8, [], [], [7, 6, 5, 4, 3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_36 : (⟨3, 4, [], [], [5], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_37 : (⟨3, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_38 : (⟨4, 5, [], [3], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_39 : (⟨4, 5, [], [3], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_40 : (⟨4, 6, [], [3], [5], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_41 : (⟨4, 7, [], [3], [6, 5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_42 : (⟨4, 8, [], [3], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_item_43 : (⟨4, 8, [], [3], [7, 6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p5_templates_block_0_check : ∀ T ∈ k9t6p5_templates_block_0, T.Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p5_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p5_templates_item_0, k9t6p5_templates_item_1, k9t6p5_templates_item_2, k9t6p5_templates_item_3, k9t6p5_templates_item_4, k9t6p5_templates_item_5, k9t6p5_templates_item_6, k9t6p5_templates_item_7, k9t6p5_templates_item_8, k9t6p5_templates_item_9, k9t6p5_templates_item_10, k9t6p5_templates_item_11⟩ + +private theorem k9t6p5_templates_block_1_check : ∀ T ∈ k9t6p5_templates_block_1, T.Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p5_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p5_templates_item_12, k9t6p5_templates_item_13, k9t6p5_templates_item_14, k9t6p5_templates_item_15, k9t6p5_templates_item_16, k9t6p5_templates_item_17, k9t6p5_templates_item_18, k9t6p5_templates_item_19, k9t6p5_templates_item_20, k9t6p5_templates_item_21, k9t6p5_templates_item_22, k9t6p5_templates_item_23⟩ + +private theorem k9t6p5_templates_block_2_check : ∀ T ∈ k9t6p5_templates_block_2, T.Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p5_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p5_templates_item_24, k9t6p5_templates_item_25, k9t6p5_templates_item_26, k9t6p5_templates_item_27, k9t6p5_templates_item_28, k9t6p5_templates_item_29, k9t6p5_templates_item_30, k9t6p5_templates_item_31, k9t6p5_templates_item_32, k9t6p5_templates_item_33, k9t6p5_templates_item_34, k9t6p5_templates_item_35⟩ + +private theorem k9t6p5_templates_block_3_check : ∀ T ∈ k9t6p5_templates_block_3, T.Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p5_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p5_templates_item_36, k9t6p5_templates_item_37, k9t6p5_templates_item_38, k9t6p5_templates_item_39, k9t6p5_templates_item_40, k9t6p5_templates_item_41, k9t6p5_templates_item_42, k9t6p5_templates_item_43⟩ + +private theorem k9t6p5_part_3 : ∀ T ∈ k9t6p5.templates, T.Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t6p5_templates_block_0 ++ k9t6p5_templates_block_1 ++ k9t6p5_templates_block_2 ++ k9t6p5_templates_block_3), T.Check k9t6p5.graph k9t6p5.clique 9 (patternAmount ([[], [], [], [1, 2]] : List (List ℕ))) (([[], [], [], [1, 2]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t6p5_templates_block_0_check, k9t6p5_templates_block_1_check⟩, k9t6p5_templates_block_2_check⟩, k9t6p5_templates_block_3_check⟩ + +private theorem k9t6p5_part_4 : ∀ p ∈ k9t6p5.required, p.Check k9t6p5.graph 9 := by decide + +private theorem k9t6p5_part_5 : ClosureCheck k9t6p5.graph (k9t6p5.initialMatrix 9) 9 6 k9t6p5.closure := by + rw [k9t6p5_initial_eq] + exact k9t6p5_closure_0 + +private theorem k9t6p5_part_6 : k9t6p5.bad.Check k9t6p5.graph (k9t6p5.matrix 9) 9 6 := by + rw [k9t6p5_matrix_eq] + decide + +theorem k9t6p5_check : k9t6p5.Check 9 6 [[], [], [], [1, 2]] := + ⟨k9t6p5_part_0, k9t6p5_part_1, k9t6p5_part_2, k9t6p5_part_3, k9t6p5_part_4, k9t6p5_part_5, k9t6p5_part_6⟩ +def k9t6p6 : LayoutCertificate 8 where + chains := [[0], [1], [2, 3, 4], [5, 6, 7]] + clique := {0, 1, 2, 4, 5, 7} + templates := [⟨0, 1, [], [], [], 2, 8⟩, + ⟨0, 1, [[2, 3, 4], [5, 6, 7]], [], [], 1, 2⟩, + ⟨0, 2, [], [], [], 2, 8⟩, + ⟨0, 2, [[5, 6, 7]], [], [3, 4], 1, 3⟩, + ⟨0, 3, [], [], [2], 1, 7⟩, + ⟨0, 4, [], [], [], 2, 8⟩, + ⟨0, 4, [[5, 6, 7]], [], [3, 2], 1, 3⟩, + ⟨0, 5, [], [], [], 2, 8⟩, + ⟨0, 5, [[2, 3, 4]], [], [6, 7], 1, 3⟩, + ⟨0, 6, [], [], [5], 1, 7⟩, + ⟨0, 7, [], [], [], 2, 8⟩, + ⟨0, 7, [[2, 3, 4]], [], [6, 5], 1, 3⟩, + ⟨1, 2, [], [], [], 2, 8⟩, + ⟨1, 2, [[5, 6, 7]], [], [3, 4], 1, 3⟩, + ⟨1, 3, [], [], [2], 1, 7⟩, + ⟨1, 4, [], [], [], 2, 8⟩, + ⟨1, 4, [[5, 6, 7]], [], [3, 2], 1, 3⟩, + ⟨1, 5, [], [], [], 2, 8⟩, + ⟨1, 5, [[2, 3, 4]], [], [6, 7], 1, 3⟩, + ⟨1, 6, [], [], [5], 1, 7⟩, + ⟨1, 7, [], [], [], 2, 8⟩, + ⟨1, 7, [[2, 3, 4]], [], [6, 5], 1, 3⟩, + ⟨2, 3, [], [], [4], 1, 7⟩, + ⟨2, 6, [], [], [5], 1, 7⟩, + ⟨3, 4, [], [2], [], 1, 7⟩, + ⟨3, 5, [], [2], [], 1, 7⟩, + ⟨3, 6, [], [2], [5], 1, 6⟩, + ⟨3, 7, [], [2], [], 1, 7⟩, + ⟨4, 6, [], [], [5], 1, 7⟩, + ⟨5, 6, [], [], [7], 1, 7⟩, + ⟨6, 7, [], [5], [], 1, 7⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (3, 3), (6, 3)}⟩ + + +private def k9t6p6_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p6_initial_eq_row_0 : ∀ j : Fin 8, (k9t6p6.initialMatrix 9) 0 j = k9t6p6_state_0 0 j := by decide + +private theorem k9t6p6_initial_eq_row_1 : ∀ j : Fin 8, (k9t6p6.initialMatrix 9) 1 j = k9t6p6_state_0 1 j := by decide + +private theorem k9t6p6_initial_eq_row_2 : ∀ j : Fin 8, (k9t6p6.initialMatrix 9) 2 j = k9t6p6_state_0 2 j := by decide + +private theorem k9t6p6_initial_eq_row_3 : ∀ j : Fin 8, (k9t6p6.initialMatrix 9) 3 j = k9t6p6_state_0 3 j := by decide + +private theorem k9t6p6_initial_eq_row_4 : ∀ j : Fin 8, (k9t6p6.initialMatrix 9) 4 j = k9t6p6_state_0 4 j := by decide + +private theorem k9t6p6_initial_eq_row_5 : ∀ j : Fin 8, (k9t6p6.initialMatrix 9) 5 j = k9t6p6_state_0 5 j := by decide + +private theorem k9t6p6_initial_eq_row_6 : ∀ j : Fin 8, (k9t6p6.initialMatrix 9) 6 j = k9t6p6_state_0 6 j := by decide + +private theorem k9t6p6_initial_eq_row_7 : ∀ j : Fin 8, (k9t6p6.initialMatrix 9) 7 j = k9t6p6_state_0 7 j := by decide + +private theorem k9t6p6_initial_eq : (k9t6p6.initialMatrix 9) = k9t6p6_state_0 := by + funext i j + fin_cases i + + · exact k9t6p6_initial_eq_row_0 j + + · exact k9t6p6_initial_eq_row_1 j + + · exact k9t6p6_initial_eq_row_2 j + + · exact k9t6p6_initial_eq_row_3 j + + · exact k9t6p6_initial_eq_row_4 j + + · exact k9t6p6_initial_eq_row_5 j + + · exact k9t6p6_initial_eq_row_6 j + + · exact k9t6p6_initial_eq_row_7 j + +private theorem k9t6p6_closure_0 : ClosureCheck k9t6p6.graph k9t6p6_state_0 9 6 [] := by trivial + +private theorem k9t6p6_matrix_eq : k9t6p6.matrix 9 = k9t6p6_state_0 := by + change closureMatrix (k9t6p6.initialMatrix 9) _ = _ + rw [k9t6p6_initial_eq] + change closureMatrix k9t6p6_state_0 [] = _ + rfl + +private theorem k9t6p6_part_0 : k9t6p6.chains.flatten = List.finRange _ := by decide + +private theorem k9t6p6_part_1 : k9t6p6.chains.map List.length = ([[], [], [1], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t6p6_part_2 : k9t6p6.chains.map (fun l => l.map (fun i => decide (i ∈ k9t6p6.clique))) = ([[], [], [1], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t6p6_templates_item_0 : (⟨0, 1, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_1 : (⟨0, 1, [[2, 3, 4], [5, 6, 7]], [], [], 1, 2⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_2 : (⟨0, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_3 : (⟨0, 2, [[5, 6, 7]], [], [3, 4], 1, 3⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_4 : (⟨0, 3, [], [], [2], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_5 : (⟨0, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_6 : (⟨0, 4, [[5, 6, 7]], [], [3, 2], 1, 3⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_7 : (⟨0, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_8 : (⟨0, 5, [[2, 3, 4]], [], [6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_9 : (⟨0, 6, [], [], [5], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_10 : (⟨0, 7, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_11 : (⟨0, 7, [[2, 3, 4]], [], [6, 5], 1, 3⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_12 : (⟨1, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_13 : (⟨1, 2, [[5, 6, 7]], [], [3, 4], 1, 3⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_14 : (⟨1, 3, [], [], [2], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_15 : (⟨1, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_16 : (⟨1, 4, [[5, 6, 7]], [], [3, 2], 1, 3⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_17 : (⟨1, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_18 : (⟨1, 5, [[2, 3, 4]], [], [6, 7], 1, 3⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_19 : (⟨1, 6, [], [], [5], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_20 : (⟨1, 7, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_21 : (⟨1, 7, [[2, 3, 4]], [], [6, 5], 1, 3⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_22 : (⟨2, 3, [], [], [4], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_23 : (⟨2, 6, [], [], [5], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_24 : (⟨3, 4, [], [2], [], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_25 : (⟨3, 5, [], [2], [], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_26 : (⟨3, 6, [], [2], [5], 1, 6⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_27 : (⟨3, 7, [], [2], [], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_28 : (⟨4, 6, [], [], [5], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_29 : (⟨5, 6, [], [], [7], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_templates_item_30 : (⟨6, 7, [], [5], [], 1, 7⟩ : TemplateData (Fin 8)).Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p6_part_3 : ∀ T ∈ k9t6p6.templates, T.Check k9t6p6.graph k9t6p6.clique 9 (patternAmount ([[], [], [1], [1]] : List (List ℕ))) (([[], [], [1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p6, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p6_templates_item_0, k9t6p6_templates_item_1, k9t6p6_templates_item_2, k9t6p6_templates_item_3, k9t6p6_templates_item_4, k9t6p6_templates_item_5, k9t6p6_templates_item_6, k9t6p6_templates_item_7, k9t6p6_templates_item_8, k9t6p6_templates_item_9, k9t6p6_templates_item_10, k9t6p6_templates_item_11, k9t6p6_templates_item_12, k9t6p6_templates_item_13, k9t6p6_templates_item_14, k9t6p6_templates_item_15, k9t6p6_templates_item_16, k9t6p6_templates_item_17, k9t6p6_templates_item_18, k9t6p6_templates_item_19, k9t6p6_templates_item_20, k9t6p6_templates_item_21, k9t6p6_templates_item_22, k9t6p6_templates_item_23, k9t6p6_templates_item_24, k9t6p6_templates_item_25, k9t6p6_templates_item_26, k9t6p6_templates_item_27, k9t6p6_templates_item_28, k9t6p6_templates_item_29, k9t6p6_templates_item_30⟩ + +private theorem k9t6p6_part_4 : ∀ p ∈ k9t6p6.required, p.Check k9t6p6.graph 9 := by decide + +private theorem k9t6p6_part_5 : ClosureCheck k9t6p6.graph (k9t6p6.initialMatrix 9) 9 6 k9t6p6.closure := by + rw [k9t6p6_initial_eq] + exact k9t6p6_closure_0 + +private theorem k9t6p6_part_6 : k9t6p6.bad.Check k9t6p6.graph (k9t6p6.matrix 9) 9 6 := by + rw [k9t6p6_matrix_eq] + decide + +theorem k9t6p6_check : k9t6p6.Check 9 6 [[], [], [1], [1]] := + ⟨k9t6p6_part_0, k9t6p6_part_1, k9t6p6_part_2, k9t6p6_part_3, k9t6p6_part_4, k9t6p6_part_5, k9t6p6_part_6⟩ +private def k9t6p7_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [], [], [], 3, 8⟩, ⟨0, 1, [[5, 6, 7, 8]], [], [], 2, 4⟩, ⟨0, 1, [[2, 3, 4], [5, 6, 7, 8]], [], [], 1, 1⟩, ⟨0, 2, [], [], [], 3, 8⟩, ⟨0, 2, [[5, 6, 7, 8]], [], [], 2, 4⟩, ⟨0, 2, [[5, 6, 7, 8]], [], [3, 4], 1, 2⟩, ⟨0, 3, [], [], [2], 2, 7⟩, ⟨0, 3, [[5, 6, 7, 8]], [], [2], 1, 3⟩, ⟨0, 4, [[5, 6, 7, 8]], [], [], 2, 4⟩, ⟨0, 4, [[5, 6, 7, 8]], [], [3, 2], 1, 2⟩, ⟨0, 5, [], [], [6, 7, 8], 2, 5⟩, ⟨0, 5, [[2, 3, 4]], [], [6, 7, 8], 1, 2⟩] + +private def k9t6p7_templates_block_1 : List (TemplateData (Fin 9)) := [⟨0, 6, [], [], [5], 2, 7⟩, ⟨0, 6, [], [], [7, 8], 1, 6⟩, ⟨0, 7, [], [], [6, 5], 1, 6⟩, ⟨0, 8, [], [], [7, 6, 5], 2, 5⟩, ⟨0, 8, [[2, 3, 4]], [], [7, 6, 5], 1, 2⟩, ⟨1, 2, [], [], [], 3, 8⟩, ⟨1, 2, [[5, 6, 7, 8]], [], [], 2, 4⟩, ⟨1, 2, [[5, 6, 7, 8]], [], [3, 4], 1, 2⟩, ⟨1, 3, [], [], [2], 2, 7⟩, ⟨1, 3, [[5, 6, 7, 8]], [], [2], 1, 3⟩, ⟨1, 4, [[5, 6, 7, 8]], [], [], 2, 4⟩, ⟨1, 4, [[5, 6, 7, 8]], [], [3, 2], 1, 2⟩] + +private def k9t6p7_templates_block_2 : List (TemplateData (Fin 9)) := [⟨1, 5, [], [], [6, 7, 8], 2, 5⟩, ⟨1, 5, [[2, 3, 4]], [], [6, 7, 8], 1, 2⟩, ⟨1, 6, [], [], [5], 2, 7⟩, ⟨1, 6, [], [], [7, 8], 1, 6⟩, ⟨1, 7, [], [], [6, 5], 1, 6⟩, ⟨1, 8, [], [], [7, 6, 5], 2, 5⟩, ⟨1, 8, [[2, 3, 4]], [], [7, 6, 5], 1, 2⟩, ⟨2, 3, [], [], [4], 2, 7⟩, ⟨2, 3, [[5, 6, 7, 8]], [], [4], 1, 3⟩, ⟨2, 5, [], [], [6, 7, 8], 2, 5⟩, ⟨2, 5, [], [4, 3], [6, 7, 8], 1, 3⟩, ⟨2, 6, [], [], [5], 2, 7⟩] + +private def k9t6p7_templates_block_3 : List (TemplateData (Fin 9)) := [⟨2, 6, [], [], [7, 8], 1, 6⟩, ⟨2, 7, [], [], [6, 5], 1, 6⟩, ⟨2, 8, [], [], [7, 6, 5], 2, 5⟩, ⟨2, 8, [], [4, 3], [7, 6, 5], 1, 3⟩, ⟨3, 4, [], [2], [], 2, 7⟩, ⟨3, 4, [[5, 6, 7, 8]], [2], [], 1, 3⟩, ⟨3, 5, [], [2], [], 2, 7⟩, ⟨3, 5, [], [2], [6, 7, 8], 1, 4⟩, ⟨3, 6, [], [2], [5], 1, 6⟩, ⟨3, 7, [], [2], [6, 5], 1, 5⟩, ⟨3, 8, [], [2], [], 2, 7⟩, ⟨3, 8, [], [2], [7, 6, 5], 1, 4⟩] + +def k9t6p7 : LayoutCertificate 9 where + chains := [[0], [1], [2, 3, 4], [5, 6, 7, 8]] + clique := {0, 1, 2, 4, 5, 8} + templates := k9t6p7_templates_block_0 ++ k9t6p7_templates_block_1 ++ k9t6p7_templates_block_2 ++ k9t6p7_templates_block_3 + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (3, 3), (2, 3)}⟩ + + +private def k9t6p7_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 7], + #[Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t6p7_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 4, Finset.Icc 1 5, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p7_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_0) 0 j = k9t6p7_template_matrix_0 0 j := by decide + +private theorem k9t6p7_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_0) 1 j = k9t6p7_template_matrix_0 1 j := by decide + +private theorem k9t6p7_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_0) 2 j = k9t6p7_template_matrix_0 2 j := by decide + +private theorem k9t6p7_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_0) 3 j = k9t6p7_template_matrix_0 3 j := by decide + +private theorem k9t6p7_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_0) 4 j = k9t6p7_template_matrix_0 4 j := by decide + +private theorem k9t6p7_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_0) 5 j = k9t6p7_template_matrix_0 5 j := by decide + +private theorem k9t6p7_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_0) 6 j = k9t6p7_template_matrix_0 6 j := by decide + +private theorem k9t6p7_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_0) 7 j = k9t6p7_template_matrix_0 7 j := by decide + +private theorem k9t6p7_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_0) 8 j = k9t6p7_template_matrix_0 8 j := by decide + +private theorem k9t6p7_template_matrix_0_eq : (templateMatrix k9t6p7_templates_block_0) = k9t6p7_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t6p7_template_matrix_0_eq_row_0 j + + · exact k9t6p7_template_matrix_0_eq_row_1 j + + · exact k9t6p7_template_matrix_0_eq_row_2 j + + · exact k9t6p7_template_matrix_0_eq_row_3 j + + · exact k9t6p7_template_matrix_0_eq_row_4 j + + · exact k9t6p7_template_matrix_0_eq_row_5 j + + · exact k9t6p7_template_matrix_0_eq_row_6 j + + · exact k9t6p7_template_matrix_0_eq_row_7 j + + · exact k9t6p7_template_matrix_0_eq_row_8 j + +private def k9t6p7_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[∅, ∅, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 4, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p7_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_1) 0 j = k9t6p7_template_matrix_1 0 j := by decide + +private theorem k9t6p7_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_1) 1 j = k9t6p7_template_matrix_1 1 j := by decide + +private theorem k9t6p7_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_1) 2 j = k9t6p7_template_matrix_1 2 j := by decide + +private theorem k9t6p7_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_1) 3 j = k9t6p7_template_matrix_1 3 j := by decide + +private theorem k9t6p7_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_1) 4 j = k9t6p7_template_matrix_1 4 j := by decide + +private theorem k9t6p7_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_1) 5 j = k9t6p7_template_matrix_1 5 j := by decide + +private theorem k9t6p7_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_1) 6 j = k9t6p7_template_matrix_1 6 j := by decide + +private theorem k9t6p7_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_1) 7 j = k9t6p7_template_matrix_1 7 j := by decide + +private theorem k9t6p7_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_1) 8 j = k9t6p7_template_matrix_1 8 j := by decide + +private theorem k9t6p7_template_matrix_1_eq : (templateMatrix k9t6p7_templates_block_1) = k9t6p7_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t6p7_template_matrix_1_eq_row_0 j + + · exact k9t6p7_template_matrix_1_eq_row_1 j + + · exact k9t6p7_template_matrix_1_eq_row_2 j + + · exact k9t6p7_template_matrix_1_eq_row_3 j + + · exact k9t6p7_template_matrix_1_eq_row_4 j + + · exact k9t6p7_template_matrix_1_eq_row_5 j + + · exact k9t6p7_template_matrix_1_eq_row_6 j + + · exact k9t6p7_template_matrix_1_eq_row_7 j + + · exact k9t6p7_template_matrix_1_eq_row_8 j + +private def k9t6p7_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 5, Finset.Icc 2 7, ∅, ∅], + #[∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, Finset.Icc 2 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p7_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_2) 0 j = k9t6p7_template_matrix_2 0 j := by decide + +private theorem k9t6p7_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_2) 1 j = k9t6p7_template_matrix_2 1 j := by decide + +private theorem k9t6p7_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_2) 2 j = k9t6p7_template_matrix_2 2 j := by decide + +private theorem k9t6p7_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_2) 3 j = k9t6p7_template_matrix_2 3 j := by decide + +private theorem k9t6p7_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_2) 4 j = k9t6p7_template_matrix_2 4 j := by decide + +private theorem k9t6p7_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_2) 5 j = k9t6p7_template_matrix_2 5 j := by decide + +private theorem k9t6p7_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_2) 6 j = k9t6p7_template_matrix_2 6 j := by decide + +private theorem k9t6p7_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_2) 7 j = k9t6p7_template_matrix_2 7 j := by decide + +private theorem k9t6p7_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_2) 8 j = k9t6p7_template_matrix_2 8 j := by decide + +private theorem k9t6p7_template_matrix_2_eq : (templateMatrix k9t6p7_templates_block_2) = k9t6p7_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t6p7_template_matrix_2_eq_row_0 j + + · exact k9t6p7_template_matrix_2_eq_row_1 j + + · exact k9t6p7_template_matrix_2_eq_row_2 j + + · exact k9t6p7_template_matrix_2_eq_row_3 j + + · exact k9t6p7_template_matrix_2_eq_row_4 j + + · exact k9t6p7_template_matrix_2_eq_row_5 j + + · exact k9t6p7_template_matrix_2_eq_row_6 j + + · exact k9t6p7_template_matrix_2_eq_row_7 j + + · exact k9t6p7_template_matrix_2_eq_row_8 j + +private def k9t6p7_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 5], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 7], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 5, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p7_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_3) 0 j = k9t6p7_template_matrix_3 0 j := by decide + +private theorem k9t6p7_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_3) 1 j = k9t6p7_template_matrix_3 1 j := by decide + +private theorem k9t6p7_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_3) 2 j = k9t6p7_template_matrix_3 2 j := by decide + +private theorem k9t6p7_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_3) 3 j = k9t6p7_template_matrix_3 3 j := by decide + +private theorem k9t6p7_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_3) 4 j = k9t6p7_template_matrix_3 4 j := by decide + +private theorem k9t6p7_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_3) 5 j = k9t6p7_template_matrix_3 5 j := by decide + +private theorem k9t6p7_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_3) 6 j = k9t6p7_template_matrix_3 6 j := by decide + +private theorem k9t6p7_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_3) 7 j = k9t6p7_template_matrix_3 7 j := by decide + +private theorem k9t6p7_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p7_templates_block_3) 8 j = k9t6p7_template_matrix_3 8 j := by decide + +private theorem k9t6p7_template_matrix_3_eq : (templateMatrix k9t6p7_templates_block_3) = k9t6p7_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t6p7_template_matrix_3_eq_row_0 j + + · exact k9t6p7_template_matrix_3_eq_row_1 j + + · exact k9t6p7_template_matrix_3_eq_row_2 j + + · exact k9t6p7_template_matrix_3_eq_row_3 j + + · exact k9t6p7_template_matrix_3_eq_row_4 j + + · exact k9t6p7_template_matrix_3_eq_row_5 j + + · exact k9t6p7_template_matrix_3_eq_row_6 j + + · exact k9t6p7_template_matrix_3_eq_row_7 j + + · exact k9t6p7_template_matrix_3_eq_row_8 j + +private theorem k9t6p7_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => (((k9t6p7_template_matrix_0 i j ∪ k9t6p7_template_matrix_1 i j) ∪ k9t6p7_template_matrix_2 i j) ∪ k9t6p7_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p7.required i j) 0 j = k9t6p7_state_0 0 j := by decide + +private theorem k9t6p7_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => (((k9t6p7_template_matrix_0 i j ∪ k9t6p7_template_matrix_1 i j) ∪ k9t6p7_template_matrix_2 i j) ∪ k9t6p7_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p7.required i j) 1 j = k9t6p7_state_0 1 j := by decide + +private theorem k9t6p7_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => (((k9t6p7_template_matrix_0 i j ∪ k9t6p7_template_matrix_1 i j) ∪ k9t6p7_template_matrix_2 i j) ∪ k9t6p7_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p7.required i j) 2 j = k9t6p7_state_0 2 j := by decide + +private theorem k9t6p7_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => (((k9t6p7_template_matrix_0 i j ∪ k9t6p7_template_matrix_1 i j) ∪ k9t6p7_template_matrix_2 i j) ∪ k9t6p7_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p7.required i j) 3 j = k9t6p7_state_0 3 j := by decide + +private theorem k9t6p7_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => (((k9t6p7_template_matrix_0 i j ∪ k9t6p7_template_matrix_1 i j) ∪ k9t6p7_template_matrix_2 i j) ∪ k9t6p7_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p7.required i j) 4 j = k9t6p7_state_0 4 j := by decide + +private theorem k9t6p7_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => (((k9t6p7_template_matrix_0 i j ∪ k9t6p7_template_matrix_1 i j) ∪ k9t6p7_template_matrix_2 i j) ∪ k9t6p7_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p7.required i j) 5 j = k9t6p7_state_0 5 j := by decide + +private theorem k9t6p7_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => (((k9t6p7_template_matrix_0 i j ∪ k9t6p7_template_matrix_1 i j) ∪ k9t6p7_template_matrix_2 i j) ∪ k9t6p7_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p7.required i j) 6 j = k9t6p7_state_0 6 j := by decide + +private theorem k9t6p7_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => (((k9t6p7_template_matrix_0 i j ∪ k9t6p7_template_matrix_1 i j) ∪ k9t6p7_template_matrix_2 i j) ∪ k9t6p7_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p7.required i j) 7 j = k9t6p7_state_0 7 j := by decide + +private theorem k9t6p7_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => (((k9t6p7_template_matrix_0 i j ∪ k9t6p7_template_matrix_1 i j) ∪ k9t6p7_template_matrix_2 i j) ∪ k9t6p7_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p7.required i j) 8 j = k9t6p7_state_0 8 j := by decide + +private theorem k9t6p7_initial_merged_eq : (fun i j => (((k9t6p7_template_matrix_0 i j ∪ k9t6p7_template_matrix_1 i j) ∪ k9t6p7_template_matrix_2 i j) ∪ k9t6p7_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p7.required i j) = k9t6p7_state_0 := by + funext i j + fin_cases i + + · exact k9t6p7_initial_merged_eq_row_0 j + + · exact k9t6p7_initial_merged_eq_row_1 j + + · exact k9t6p7_initial_merged_eq_row_2 j + + · exact k9t6p7_initial_merged_eq_row_3 j + + · exact k9t6p7_initial_merged_eq_row_4 j + + · exact k9t6p7_initial_merged_eq_row_5 j + + · exact k9t6p7_initial_merged_eq_row_6 j + + · exact k9t6p7_initial_merged_eq_row_7 j + + · exact k9t6p7_initial_merged_eq_row_8 j + +private theorem k9t6p7_initial_eq : k9t6p7.initialMatrix 9 = k9t6p7_state_0 := by + funext i j + change templateMatrix (k9t6p7_templates_block_0 ++ k9t6p7_templates_block_1 ++ k9t6p7_templates_block_2 ++ k9t6p7_templates_block_3) i j ∪ requiredMatrix 9 k9t6p7.required i j = _ + simp only [templateMatrix_append, k9t6p7_template_matrix_0_eq, k9t6p7_template_matrix_1_eq, k9t6p7_template_matrix_2_eq, k9t6p7_template_matrix_3_eq] + exact congrFun (congrFun k9t6p7_initial_merged_eq i) j + +private theorem k9t6p7_closure_0 : ClosureCheck k9t6p7.graph k9t6p7_state_0 9 6 [] := by trivial + +private theorem k9t6p7_matrix_eq : k9t6p7.matrix 9 = k9t6p7_state_0 := by + change closureMatrix (k9t6p7.initialMatrix 9) _ = _ + rw [k9t6p7_initial_eq] + change closureMatrix k9t6p7_state_0 [] = _ + rfl + +private theorem k9t6p7_part_0 : k9t6p7.chains.flatten = List.finRange _ := by decide + +private theorem k9t6p7_part_1 : k9t6p7.chains.map List.length = ([[], [], [1], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t6p7_part_2 : k9t6p7.chains.map (fun l => l.map (fun i => decide (i ∈ k9t6p7.clique))) = ([[], [], [1], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t6p7_templates_item_0 : (⟨0, 1, [], [], [], 3, 8⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_1 : (⟨0, 1, [[5, 6, 7, 8]], [], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_2 : (⟨0, 1, [[2, 3, 4], [5, 6, 7, 8]], [], [], 1, 1⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_3 : (⟨0, 2, [], [], [], 3, 8⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_4 : (⟨0, 2, [[5, 6, 7, 8]], [], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_5 : (⟨0, 2, [[5, 6, 7, 8]], [], [3, 4], 1, 2⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_6 : (⟨0, 3, [], [], [2], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_7 : (⟨0, 3, [[5, 6, 7, 8]], [], [2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_8 : (⟨0, 4, [[5, 6, 7, 8]], [], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_9 : (⟨0, 4, [[5, 6, 7, 8]], [], [3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_10 : (⟨0, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_11 : (⟨0, 5, [[2, 3, 4]], [], [6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_12 : (⟨0, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_13 : (⟨0, 6, [], [], [7, 8], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_14 : (⟨0, 7, [], [], [6, 5], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_15 : (⟨0, 8, [], [], [7, 6, 5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_16 : (⟨0, 8, [[2, 3, 4]], [], [7, 6, 5], 1, 2⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_17 : (⟨1, 2, [], [], [], 3, 8⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_18 : (⟨1, 2, [[5, 6, 7, 8]], [], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_19 : (⟨1, 2, [[5, 6, 7, 8]], [], [3, 4], 1, 2⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_20 : (⟨1, 3, [], [], [2], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_21 : (⟨1, 3, [[5, 6, 7, 8]], [], [2], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_22 : (⟨1, 4, [[5, 6, 7, 8]], [], [], 2, 4⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_23 : (⟨1, 4, [[5, 6, 7, 8]], [], [3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_24 : (⟨1, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_25 : (⟨1, 5, [[2, 3, 4]], [], [6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_26 : (⟨1, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_27 : (⟨1, 6, [], [], [7, 8], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_28 : (⟨1, 7, [], [], [6, 5], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_29 : (⟨1, 8, [], [], [7, 6, 5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_30 : (⟨1, 8, [[2, 3, 4]], [], [7, 6, 5], 1, 2⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_31 : (⟨2, 3, [], [], [4], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_32 : (⟨2, 3, [[5, 6, 7, 8]], [], [4], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_33 : (⟨2, 5, [], [], [6, 7, 8], 2, 5⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_34 : (⟨2, 5, [], [4, 3], [6, 7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_35 : (⟨2, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_36 : (⟨2, 6, [], [], [7, 8], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_37 : (⟨2, 7, [], [], [6, 5], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_38 : (⟨2, 8, [], [], [7, 6, 5], 2, 5⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_39 : (⟨2, 8, [], [4, 3], [7, 6, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_40 : (⟨3, 4, [], [2], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_41 : (⟨3, 4, [[5, 6, 7, 8]], [2], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_42 : (⟨3, 5, [], [2], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_43 : (⟨3, 5, [], [2], [6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_44 : (⟨3, 6, [], [2], [5], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_45 : (⟨3, 7, [], [2], [6, 5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_46 : (⟨3, 8, [], [2], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_item_47 : (⟨3, 8, [], [2], [7, 6, 5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p7_templates_block_0_check : ∀ T ∈ k9t6p7_templates_block_0, T.Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p7_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p7_templates_item_0, k9t6p7_templates_item_1, k9t6p7_templates_item_2, k9t6p7_templates_item_3, k9t6p7_templates_item_4, k9t6p7_templates_item_5, k9t6p7_templates_item_6, k9t6p7_templates_item_7, k9t6p7_templates_item_8, k9t6p7_templates_item_9, k9t6p7_templates_item_10, k9t6p7_templates_item_11⟩ + +private theorem k9t6p7_templates_block_1_check : ∀ T ∈ k9t6p7_templates_block_1, T.Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p7_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p7_templates_item_12, k9t6p7_templates_item_13, k9t6p7_templates_item_14, k9t6p7_templates_item_15, k9t6p7_templates_item_16, k9t6p7_templates_item_17, k9t6p7_templates_item_18, k9t6p7_templates_item_19, k9t6p7_templates_item_20, k9t6p7_templates_item_21, k9t6p7_templates_item_22, k9t6p7_templates_item_23⟩ + +private theorem k9t6p7_templates_block_2_check : ∀ T ∈ k9t6p7_templates_block_2, T.Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p7_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p7_templates_item_24, k9t6p7_templates_item_25, k9t6p7_templates_item_26, k9t6p7_templates_item_27, k9t6p7_templates_item_28, k9t6p7_templates_item_29, k9t6p7_templates_item_30, k9t6p7_templates_item_31, k9t6p7_templates_item_32, k9t6p7_templates_item_33, k9t6p7_templates_item_34, k9t6p7_templates_item_35⟩ + +private theorem k9t6p7_templates_block_3_check : ∀ T ∈ k9t6p7_templates_block_3, T.Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p7_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p7_templates_item_36, k9t6p7_templates_item_37, k9t6p7_templates_item_38, k9t6p7_templates_item_39, k9t6p7_templates_item_40, k9t6p7_templates_item_41, k9t6p7_templates_item_42, k9t6p7_templates_item_43, k9t6p7_templates_item_44, k9t6p7_templates_item_45, k9t6p7_templates_item_46, k9t6p7_templates_item_47⟩ + +private theorem k9t6p7_part_3 : ∀ T ∈ k9t6p7.templates, T.Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t6p7_templates_block_0 ++ k9t6p7_templates_block_1 ++ k9t6p7_templates_block_2 ++ k9t6p7_templates_block_3), T.Check k9t6p7.graph k9t6p7.clique 9 (patternAmount ([[], [], [1], [2]] : List (List ℕ))) (([[], [], [1], [2]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t6p7_templates_block_0_check, k9t6p7_templates_block_1_check⟩, k9t6p7_templates_block_2_check⟩, k9t6p7_templates_block_3_check⟩ + +private theorem k9t6p7_part_4 : ∀ p ∈ k9t6p7.required, p.Check k9t6p7.graph 9 := by decide + +private theorem k9t6p7_part_5 : ClosureCheck k9t6p7.graph (k9t6p7.initialMatrix 9) 9 6 k9t6p7.closure := by + rw [k9t6p7_initial_eq] + exact k9t6p7_closure_0 + +private theorem k9t6p7_part_6 : k9t6p7.bad.Check k9t6p7.graph (k9t6p7.matrix 9) 9 6 := by + rw [k9t6p7_matrix_eq] + decide + +theorem k9t6p7_check : k9t6p7.Check 9 6 [[], [], [1], [2]] := + ⟨k9t6p7_part_0, k9t6p7_part_1, k9t6p7_part_2, k9t6p7_part_3, k9t6p7_part_4, k9t6p7_part_5, k9t6p7_part_6⟩ +private def k9t6p8_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [[2, 3, 4]], [], [], 2, 5⟩, ⟨0, 1, [[2, 3, 4, 5, 6, 7, 8]], [], [], 1, 1⟩, ⟨0, 2, [], [], [3, 4], 2, 6⟩, ⟨0, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩, ⟨0, 3, [], [], [2], 2, 7⟩, ⟨0, 3, [[4, 5, 6]], [], [2], 1, 4⟩, ⟨0, 5, [], [], [4], 2, 7⟩, ⟨0, 5, [], [], [4, 3, 2], 1, 5⟩, ⟨0, 7, [], [], [6], 2, 7⟩, ⟨0, 7, [[2, 3, 4]], [], [6], 1, 4⟩, ⟨0, 8, [[2, 3, 4]], [], [], 2, 5⟩, ⟨0, 8, [], [], [7, 6, 5, 4, 3, 2], 1, 2⟩] + +private def k9t6p8_templates_block_1 : List (TemplateData (Fin 9)) := [⟨1, 3, [], [], [2], 2, 7⟩, ⟨1, 3, [[4, 5, 6]], [], [2], 1, 4⟩, ⟨1, 5, [], [], [4], 2, 7⟩, ⟨1, 5, [], [], [4, 3, 2], 1, 5⟩, ⟨1, 7, [], [], [6], 2, 7⟩, ⟨1, 7, [[2, 3, 4]], [], [6], 1, 4⟩, ⟨2, 3, [], [], [4], 2, 7⟩, ⟨2, 3, [], [], [4, 5, 6], 1, 5⟩, ⟨2, 5, [], [], [4], 2, 7⟩, ⟨2, 5, [], [4, 3], [6], 1, 5⟩, ⟨2, 7, [], [], [6], 2, 7⟩, ⟨2, 7, [], [4, 3], [6], 1, 5⟩] + +private def k9t6p8_templates_block_2 : List (TemplateData (Fin 9)) := [⟨3, 4, [], [2], [], 2, 7⟩, ⟨3, 4, [], [2], [5, 6], 1, 5⟩, ⟨3, 5, [], [2], [4], 1, 6⟩, ⟨3, 6, [], [2], [], 2, 7⟩, ⟨3, 6, [], [2], [5, 4], 1, 5⟩, ⟨3, 7, [], [2], [6], 1, 6⟩, ⟨3, 8, [], [2], [], 2, 7⟩, ⟨3, 8, [[4, 5, 6]], [2], [], 1, 4⟩, ⟨4, 5, [], [], [6], 2, 7⟩, ⟨4, 5, [], [2, 3], [6], 1, 5⟩, ⟨4, 7, [], [], [6], 2, 7⟩, ⟨4, 7, [], [2, 3], [6], 1, 5⟩] + +private def k9t6p8_templates_block_3 : List (TemplateData (Fin 9)) := [⟨5, 6, [], [4], [], 2, 7⟩, ⟨5, 6, [], [2, 3, 4], [], 1, 5⟩, ⟨5, 7, [], [4], [6], 1, 6⟩, ⟨5, 8, [], [4], [], 2, 7⟩, ⟨5, 8, [], [2, 3, 4], [], 1, 5⟩, ⟨6, 7, [], [], [8], 2, 7⟩, ⟨6, 7, [[2, 3, 4]], [], [8], 1, 4⟩, ⟨7, 8, [], [6], [], 2, 7⟩, ⟨7, 8, [[2, 3, 4]], [6], [], 1, 4⟩] + +def k9t6p8 : LayoutCertificate 9 where + chains := [[0], [1], [2, 3, 4, 5, 6, 7, 8]] + clique := {0, 1, 2, 4, 6, 8} + templates := k9t6p8_templates_block_0 ++ k9t6p8_templates_block_1 ++ k9t6p8_templates_block_2 ++ k9t6p8_templates_block_3 + required := [] + closure := [] + bad := ⟨none, {(3, 3), (5, 3), (7, 3), (0, 3)}⟩ + + +private def k9t6p8_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 6, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[Finset.Icc 1 5, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t6p8_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 5, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 5], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p8_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_0) 0 j = k9t6p8_template_matrix_0 0 j := by decide + +private theorem k9t6p8_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_0) 1 j = k9t6p8_template_matrix_0 1 j := by decide + +private theorem k9t6p8_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_0) 2 j = k9t6p8_template_matrix_0 2 j := by decide + +private theorem k9t6p8_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_0) 3 j = k9t6p8_template_matrix_0 3 j := by decide + +private theorem k9t6p8_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_0) 4 j = k9t6p8_template_matrix_0 4 j := by decide + +private theorem k9t6p8_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_0) 5 j = k9t6p8_template_matrix_0 5 j := by decide + +private theorem k9t6p8_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_0) 6 j = k9t6p8_template_matrix_0 6 j := by decide + +private theorem k9t6p8_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_0) 7 j = k9t6p8_template_matrix_0 7 j := by decide + +private theorem k9t6p8_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_0) 8 j = k9t6p8_template_matrix_0 8 j := by decide + +private theorem k9t6p8_template_matrix_0_eq : (templateMatrix k9t6p8_templates_block_0) = k9t6p8_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t6p8_template_matrix_0_eq_row_0 j + + · exact k9t6p8_template_matrix_0_eq_row_1 j + + · exact k9t6p8_template_matrix_0_eq_row_2 j + + · exact k9t6p8_template_matrix_0_eq_row_3 j + + · exact k9t6p8_template_matrix_0_eq_row_4 j + + · exact k9t6p8_template_matrix_0_eq_row_5 j + + · exact k9t6p8_template_matrix_0_eq_row_6 j + + · exact k9t6p8_template_matrix_0_eq_row_7 j + + · exact k9t6p8_template_matrix_0_eq_row_8 j + +private def k9t6p8_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p8_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_1) 0 j = k9t6p8_template_matrix_1 0 j := by decide + +private theorem k9t6p8_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_1) 1 j = k9t6p8_template_matrix_1 1 j := by decide + +private theorem k9t6p8_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_1) 2 j = k9t6p8_template_matrix_1 2 j := by decide + +private theorem k9t6p8_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_1) 3 j = k9t6p8_template_matrix_1 3 j := by decide + +private theorem k9t6p8_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_1) 4 j = k9t6p8_template_matrix_1 4 j := by decide + +private theorem k9t6p8_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_1) 5 j = k9t6p8_template_matrix_1 5 j := by decide + +private theorem k9t6p8_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_1) 6 j = k9t6p8_template_matrix_1 6 j := by decide + +private theorem k9t6p8_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_1) 7 j = k9t6p8_template_matrix_1 7 j := by decide + +private theorem k9t6p8_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_1) 8 j = k9t6p8_template_matrix_1 8 j := by decide + +private theorem k9t6p8_template_matrix_1_eq : (templateMatrix k9t6p8_templates_block_1) = k9t6p8_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t6p8_template_matrix_1_eq_row_0 j + + · exact k9t6p8_template_matrix_1_eq_row_1 j + + · exact k9t6p8_template_matrix_1_eq_row_2 j + + · exact k9t6p8_template_matrix_1_eq_row_3 j + + · exact k9t6p8_template_matrix_1_eq_row_4 j + + · exact k9t6p8_template_matrix_1_eq_row_5 j + + · exact k9t6p8_template_matrix_1_eq_row_6 j + + · exact k9t6p8_template_matrix_1_eq_row_7 j + + · exact k9t6p8_template_matrix_1_eq_row_8 j + +private def k9t6p8_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p8_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_2) 0 j = k9t6p8_template_matrix_2 0 j := by decide + +private theorem k9t6p8_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_2) 1 j = k9t6p8_template_matrix_2 1 j := by decide + +private theorem k9t6p8_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_2) 2 j = k9t6p8_template_matrix_2 2 j := by decide + +private theorem k9t6p8_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_2) 3 j = k9t6p8_template_matrix_2 3 j := by decide + +private theorem k9t6p8_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_2) 4 j = k9t6p8_template_matrix_2 4 j := by decide + +private theorem k9t6p8_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_2) 5 j = k9t6p8_template_matrix_2 5 j := by decide + +private theorem k9t6p8_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_2) 6 j = k9t6p8_template_matrix_2 6 j := by decide + +private theorem k9t6p8_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_2) 7 j = k9t6p8_template_matrix_2 7 j := by decide + +private theorem k9t6p8_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_2) 8 j = k9t6p8_template_matrix_2 8 j := by decide + +private theorem k9t6p8_template_matrix_2_eq : (templateMatrix k9t6p8_templates_block_2) = k9t6p8_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t6p8_template_matrix_2_eq_row_0 j + + · exact k9t6p8_template_matrix_2_eq_row_1 j + + · exact k9t6p8_template_matrix_2_eq_row_2 j + + · exact k9t6p8_template_matrix_2_eq_row_3 j + + · exact k9t6p8_template_matrix_2_eq_row_4 j + + · exact k9t6p8_template_matrix_2_eq_row_5 j + + · exact k9t6p8_template_matrix_2_eq_row_6 j + + · exact k9t6p8_template_matrix_2_eq_row_7 j + + · exact k9t6p8_template_matrix_2_eq_row_8 j + +private def k9t6p8_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p8_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_3) 0 j = k9t6p8_template_matrix_3 0 j := by decide + +private theorem k9t6p8_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_3) 1 j = k9t6p8_template_matrix_3 1 j := by decide + +private theorem k9t6p8_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_3) 2 j = k9t6p8_template_matrix_3 2 j := by decide + +private theorem k9t6p8_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_3) 3 j = k9t6p8_template_matrix_3 3 j := by decide + +private theorem k9t6p8_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_3) 4 j = k9t6p8_template_matrix_3 4 j := by decide + +private theorem k9t6p8_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_3) 5 j = k9t6p8_template_matrix_3 5 j := by decide + +private theorem k9t6p8_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_3) 6 j = k9t6p8_template_matrix_3 6 j := by decide + +private theorem k9t6p8_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_3) 7 j = k9t6p8_template_matrix_3 7 j := by decide + +private theorem k9t6p8_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p8_templates_block_3) 8 j = k9t6p8_template_matrix_3 8 j := by decide + +private theorem k9t6p8_template_matrix_3_eq : (templateMatrix k9t6p8_templates_block_3) = k9t6p8_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t6p8_template_matrix_3_eq_row_0 j + + · exact k9t6p8_template_matrix_3_eq_row_1 j + + · exact k9t6p8_template_matrix_3_eq_row_2 j + + · exact k9t6p8_template_matrix_3_eq_row_3 j + + · exact k9t6p8_template_matrix_3_eq_row_4 j + + · exact k9t6p8_template_matrix_3_eq_row_5 j + + · exact k9t6p8_template_matrix_3_eq_row_6 j + + · exact k9t6p8_template_matrix_3_eq_row_7 j + + · exact k9t6p8_template_matrix_3_eq_row_8 j + +private theorem k9t6p8_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => (((k9t6p8_template_matrix_0 i j ∪ k9t6p8_template_matrix_1 i j) ∪ k9t6p8_template_matrix_2 i j) ∪ k9t6p8_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p8.required i j) 0 j = k9t6p8_state_0 0 j := by decide + +private theorem k9t6p8_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => (((k9t6p8_template_matrix_0 i j ∪ k9t6p8_template_matrix_1 i j) ∪ k9t6p8_template_matrix_2 i j) ∪ k9t6p8_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p8.required i j) 1 j = k9t6p8_state_0 1 j := by decide + +private theorem k9t6p8_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => (((k9t6p8_template_matrix_0 i j ∪ k9t6p8_template_matrix_1 i j) ∪ k9t6p8_template_matrix_2 i j) ∪ k9t6p8_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p8.required i j) 2 j = k9t6p8_state_0 2 j := by decide + +private theorem k9t6p8_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => (((k9t6p8_template_matrix_0 i j ∪ k9t6p8_template_matrix_1 i j) ∪ k9t6p8_template_matrix_2 i j) ∪ k9t6p8_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p8.required i j) 3 j = k9t6p8_state_0 3 j := by decide + +private theorem k9t6p8_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => (((k9t6p8_template_matrix_0 i j ∪ k9t6p8_template_matrix_1 i j) ∪ k9t6p8_template_matrix_2 i j) ∪ k9t6p8_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p8.required i j) 4 j = k9t6p8_state_0 4 j := by decide + +private theorem k9t6p8_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => (((k9t6p8_template_matrix_0 i j ∪ k9t6p8_template_matrix_1 i j) ∪ k9t6p8_template_matrix_2 i j) ∪ k9t6p8_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p8.required i j) 5 j = k9t6p8_state_0 5 j := by decide + +private theorem k9t6p8_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => (((k9t6p8_template_matrix_0 i j ∪ k9t6p8_template_matrix_1 i j) ∪ k9t6p8_template_matrix_2 i j) ∪ k9t6p8_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p8.required i j) 6 j = k9t6p8_state_0 6 j := by decide + +private theorem k9t6p8_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => (((k9t6p8_template_matrix_0 i j ∪ k9t6p8_template_matrix_1 i j) ∪ k9t6p8_template_matrix_2 i j) ∪ k9t6p8_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p8.required i j) 7 j = k9t6p8_state_0 7 j := by decide + +private theorem k9t6p8_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => (((k9t6p8_template_matrix_0 i j ∪ k9t6p8_template_matrix_1 i j) ∪ k9t6p8_template_matrix_2 i j) ∪ k9t6p8_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p8.required i j) 8 j = k9t6p8_state_0 8 j := by decide + +private theorem k9t6p8_initial_merged_eq : (fun i j => (((k9t6p8_template_matrix_0 i j ∪ k9t6p8_template_matrix_1 i j) ∪ k9t6p8_template_matrix_2 i j) ∪ k9t6p8_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p8.required i j) = k9t6p8_state_0 := by + funext i j + fin_cases i + + · exact k9t6p8_initial_merged_eq_row_0 j + + · exact k9t6p8_initial_merged_eq_row_1 j + + · exact k9t6p8_initial_merged_eq_row_2 j + + · exact k9t6p8_initial_merged_eq_row_3 j + + · exact k9t6p8_initial_merged_eq_row_4 j + + · exact k9t6p8_initial_merged_eq_row_5 j + + · exact k9t6p8_initial_merged_eq_row_6 j + + · exact k9t6p8_initial_merged_eq_row_7 j + + · exact k9t6p8_initial_merged_eq_row_8 j + +private theorem k9t6p8_initial_eq : k9t6p8.initialMatrix 9 = k9t6p8_state_0 := by + funext i j + change templateMatrix (k9t6p8_templates_block_0 ++ k9t6p8_templates_block_1 ++ k9t6p8_templates_block_2 ++ k9t6p8_templates_block_3) i j ∪ requiredMatrix 9 k9t6p8.required i j = _ + simp only [templateMatrix_append, k9t6p8_template_matrix_0_eq, k9t6p8_template_matrix_1_eq, k9t6p8_template_matrix_2_eq, k9t6p8_template_matrix_3_eq] + exact congrFun (congrFun k9t6p8_initial_merged_eq i) j + +private theorem k9t6p8_closure_0 : ClosureCheck k9t6p8.graph k9t6p8_state_0 9 6 [] := by trivial + +private theorem k9t6p8_matrix_eq : k9t6p8.matrix 9 = k9t6p8_state_0 := by + change closureMatrix (k9t6p8.initialMatrix 9) _ = _ + rw [k9t6p8_initial_eq] + change closureMatrix k9t6p8_state_0 [] = _ + rfl + +private theorem k9t6p8_part_0 : k9t6p8.chains.flatten = List.finRange _ := by decide + +private theorem k9t6p8_part_1 : k9t6p8.chains.map List.length = ([[], [], [1, 1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t6p8_part_2 : k9t6p8.chains.map (fun l => l.map (fun i => decide (i ∈ k9t6p8.clique))) = ([[], [], [1, 1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t6p8_templates_item_0 : (⟨0, 1, [[2, 3, 4]], [], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_1 : (⟨0, 1, [[2, 3, 4, 5, 6, 7, 8]], [], [], 1, 1⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_2 : (⟨0, 2, [], [], [3, 4], 2, 6⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_3 : (⟨0, 2, [], [], [3, 4, 5, 6, 7, 8], 1, 2⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_4 : (⟨0, 3, [], [], [2], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_5 : (⟨0, 3, [[4, 5, 6]], [], [2], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_6 : (⟨0, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_7 : (⟨0, 5, [], [], [4, 3, 2], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_8 : (⟨0, 7, [], [], [6], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_9 : (⟨0, 7, [[2, 3, 4]], [], [6], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_10 : (⟨0, 8, [[2, 3, 4]], [], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_11 : (⟨0, 8, [], [], [7, 6, 5, 4, 3, 2], 1, 2⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_12 : (⟨1, 3, [], [], [2], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_13 : (⟨1, 3, [[4, 5, 6]], [], [2], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_14 : (⟨1, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_15 : (⟨1, 5, [], [], [4, 3, 2], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_16 : (⟨1, 7, [], [], [6], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_17 : (⟨1, 7, [[2, 3, 4]], [], [6], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_18 : (⟨2, 3, [], [], [4], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_19 : (⟨2, 3, [], [], [4, 5, 6], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_20 : (⟨2, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_21 : (⟨2, 5, [], [4, 3], [6], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_22 : (⟨2, 7, [], [], [6], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_23 : (⟨2, 7, [], [4, 3], [6], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_24 : (⟨3, 4, [], [2], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_25 : (⟨3, 4, [], [2], [5, 6], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_26 : (⟨3, 5, [], [2], [4], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_27 : (⟨3, 6, [], [2], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_28 : (⟨3, 6, [], [2], [5, 4], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_29 : (⟨3, 7, [], [2], [6], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_30 : (⟨3, 8, [], [2], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_31 : (⟨3, 8, [[4, 5, 6]], [2], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_32 : (⟨4, 5, [], [], [6], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_33 : (⟨4, 5, [], [2, 3], [6], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_34 : (⟨4, 7, [], [], [6], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_35 : (⟨4, 7, [], [2, 3], [6], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_36 : (⟨5, 6, [], [4], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_37 : (⟨5, 6, [], [2, 3, 4], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_38 : (⟨5, 7, [], [4], [6], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_39 : (⟨5, 8, [], [4], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_40 : (⟨5, 8, [], [2, 3, 4], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_41 : (⟨6, 7, [], [], [8], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_42 : (⟨6, 7, [[2, 3, 4]], [], [8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_43 : (⟨7, 8, [], [6], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_item_44 : (⟨7, 8, [[2, 3, 4]], [6], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p8_templates_block_0_check : ∀ T ∈ k9t6p8_templates_block_0, T.Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p8_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p8_templates_item_0, k9t6p8_templates_item_1, k9t6p8_templates_item_2, k9t6p8_templates_item_3, k9t6p8_templates_item_4, k9t6p8_templates_item_5, k9t6p8_templates_item_6, k9t6p8_templates_item_7, k9t6p8_templates_item_8, k9t6p8_templates_item_9, k9t6p8_templates_item_10, k9t6p8_templates_item_11⟩ + +private theorem k9t6p8_templates_block_1_check : ∀ T ∈ k9t6p8_templates_block_1, T.Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p8_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p8_templates_item_12, k9t6p8_templates_item_13, k9t6p8_templates_item_14, k9t6p8_templates_item_15, k9t6p8_templates_item_16, k9t6p8_templates_item_17, k9t6p8_templates_item_18, k9t6p8_templates_item_19, k9t6p8_templates_item_20, k9t6p8_templates_item_21, k9t6p8_templates_item_22, k9t6p8_templates_item_23⟩ + +private theorem k9t6p8_templates_block_2_check : ∀ T ∈ k9t6p8_templates_block_2, T.Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p8_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p8_templates_item_24, k9t6p8_templates_item_25, k9t6p8_templates_item_26, k9t6p8_templates_item_27, k9t6p8_templates_item_28, k9t6p8_templates_item_29, k9t6p8_templates_item_30, k9t6p8_templates_item_31, k9t6p8_templates_item_32, k9t6p8_templates_item_33, k9t6p8_templates_item_34, k9t6p8_templates_item_35⟩ + +private theorem k9t6p8_templates_block_3_check : ∀ T ∈ k9t6p8_templates_block_3, T.Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p8_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p8_templates_item_36, k9t6p8_templates_item_37, k9t6p8_templates_item_38, k9t6p8_templates_item_39, k9t6p8_templates_item_40, k9t6p8_templates_item_41, k9t6p8_templates_item_42, k9t6p8_templates_item_43, k9t6p8_templates_item_44⟩ + +private theorem k9t6p8_part_3 : ∀ T ∈ k9t6p8.templates, T.Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t6p8_templates_block_0 ++ k9t6p8_templates_block_1 ++ k9t6p8_templates_block_2 ++ k9t6p8_templates_block_3), T.Check k9t6p8.graph k9t6p8.clique 9 (patternAmount ([[], [], [1, 1, 1]] : List (List ℕ))) (([[], [], [1, 1, 1]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t6p8_templates_block_0_check, k9t6p8_templates_block_1_check⟩, k9t6p8_templates_block_2_check⟩, k9t6p8_templates_block_3_check⟩ + +private theorem k9t6p8_part_4 : ∀ p ∈ k9t6p8.required, p.Check k9t6p8.graph 9 := by decide + +private theorem k9t6p8_part_5 : ClosureCheck k9t6p8.graph (k9t6p8.initialMatrix 9) 9 6 k9t6p8.closure := by + rw [k9t6p8_initial_eq] + exact k9t6p8_closure_0 + +private theorem k9t6p8_part_6 : k9t6p8.bad.Check k9t6p8.graph (k9t6p8.matrix 9) 9 6 := by + rw [k9t6p8_matrix_eq] + decide + +theorem k9t6p8_check : k9t6p8.Check 9 6 [[], [], [1, 1, 1]] := + ⟨k9t6p8_part_0, k9t6p8_part_1, k9t6p8_part_2, k9t6p8_part_3, k9t6p8_part_4, k9t6p8_part_5, k9t6p8_part_6⟩ +private def k9t6p9_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [], [], [2, 3], 2, 6⟩, ⟨0, 1, [[4, 5, 6, 7, 8]], [], [2, 3], 1, 1⟩, ⟨0, 2, [], [], [1], 2, 7⟩, ⟨0, 2, [[4, 5, 6]], [], [1], 1, 4⟩, ⟨0, 3, [], [], [2, 1], 2, 6⟩, ⟨0, 3, [[4, 5, 6, 7, 8]], [], [2, 1], 1, 1⟩, ⟨0, 4, [[1, 2, 3]], [], [], 2, 5⟩, ⟨0, 4, [[1, 2, 3]], [], [5, 6, 7, 8], 1, 1⟩, ⟨0, 5, [], [], [4], 2, 7⟩, ⟨0, 5, [[1, 2, 3]], [], [4], 1, 4⟩, ⟨0, 7, [], [], [6], 2, 7⟩, ⟨0, 7, [[1, 2, 3]], [], [6], 1, 4⟩] + +private def k9t6p9_templates_block_1 : List (TemplateData (Fin 9)) := [⟨0, 8, [[1, 2, 3]], [], [], 2, 5⟩, ⟨0, 8, [[1, 2, 3]], [], [7, 6, 5, 4], 1, 1⟩, ⟨1, 2, [], [], [3], 2, 7⟩, ⟨1, 2, [[4, 5, 6]], [], [3], 1, 4⟩, ⟨1, 5, [], [], [4], 2, 7⟩, ⟨1, 5, [], [3, 2], [4], 1, 5⟩, ⟨1, 7, [], [], [6], 2, 7⟩, ⟨1, 7, [], [3, 2], [6], 1, 5⟩, ⟨2, 3, [], [1], [], 2, 7⟩, ⟨2, 3, [[4, 5, 6]], [1], [], 1, 4⟩, ⟨2, 4, [], [1], [], 2, 7⟩, ⟨2, 4, [], [1], [5, 6], 1, 5⟩] + +private def k9t6p9_templates_block_2 : List (TemplateData (Fin 9)) := [⟨2, 5, [], [1], [4], 1, 6⟩, ⟨2, 6, [], [1], [], 2, 7⟩, ⟨2, 6, [], [1], [5, 4], 1, 5⟩, ⟨2, 7, [], [1], [6], 1, 6⟩, ⟨2, 8, [], [1], [], 2, 7⟩, ⟨2, 8, [[4, 5, 6]], [1], [], 1, 4⟩, ⟨3, 5, [], [], [4], 2, 7⟩, ⟨3, 5, [], [1, 2], [4], 1, 5⟩, ⟨3, 7, [], [], [6], 2, 7⟩, ⟨3, 7, [], [1, 2], [6], 1, 5⟩, ⟨4, 5, [], [], [6], 2, 7⟩, ⟨4, 5, [[1, 2, 3]], [], [6], 1, 4⟩] + +private def k9t6p9_templates_block_3 : List (TemplateData (Fin 9)) := [⟨4, 7, [], [], [6], 2, 7⟩, ⟨4, 7, [[1, 2, 3]], [], [6], 1, 4⟩, ⟨5, 6, [], [4], [], 2, 7⟩, ⟨5, 6, [[1, 2, 3]], [4], [], 1, 4⟩, ⟨5, 7, [], [4], [6], 1, 6⟩, ⟨5, 8, [], [4], [], 2, 7⟩, ⟨5, 8, [[1, 2, 3]], [4], [], 1, 4⟩, ⟨6, 7, [], [], [8], 2, 7⟩, ⟨6, 7, [[1, 2, 3]], [], [8], 1, 4⟩, ⟨7, 8, [], [6], [], 2, 7⟩, ⟨7, 8, [[1, 2, 3]], [6], [], 1, 4⟩] + +def k9t6p9 : LayoutCertificate 9 where + chains := [[0], [1, 2, 3], [4, 5, 6, 7, 8]] + clique := {0, 1, 3, 4, 6, 8} + templates := k9t6p9_templates_block_0 ++ k9t6p9_templates_block_1 ++ k9t6p9_templates_block_2 ++ k9t6p9_templates_block_3 + required := [] + closure := [] + bad := ⟨none, {(2, 3), (5, 3), (7, 3), (0, 3)}⟩ + + +private def k9t6p9_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 5], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[Finset.Icc 1 5, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t6p9_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p9_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_0) 0 j = k9t6p9_template_matrix_0 0 j := by decide + +private theorem k9t6p9_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_0) 1 j = k9t6p9_template_matrix_0 1 j := by decide + +private theorem k9t6p9_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_0) 2 j = k9t6p9_template_matrix_0 2 j := by decide + +private theorem k9t6p9_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_0) 3 j = k9t6p9_template_matrix_0 3 j := by decide + +private theorem k9t6p9_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_0) 4 j = k9t6p9_template_matrix_0 4 j := by decide + +private theorem k9t6p9_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_0) 5 j = k9t6p9_template_matrix_0 5 j := by decide + +private theorem k9t6p9_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_0) 6 j = k9t6p9_template_matrix_0 6 j := by decide + +private theorem k9t6p9_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_0) 7 j = k9t6p9_template_matrix_0 7 j := by decide + +private theorem k9t6p9_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_0) 8 j = k9t6p9_template_matrix_0 8 j := by decide + +private theorem k9t6p9_template_matrix_0_eq : (templateMatrix k9t6p9_templates_block_0) = k9t6p9_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t6p9_template_matrix_0_eq_row_0 j + + · exact k9t6p9_template_matrix_0_eq_row_1 j + + · exact k9t6p9_template_matrix_0_eq_row_2 j + + · exact k9t6p9_template_matrix_0_eq_row_3 j + + · exact k9t6p9_template_matrix_0_eq_row_4 j + + · exact k9t6p9_template_matrix_0_eq_row_5 j + + · exact k9t6p9_template_matrix_0_eq_row_6 j + + · exact k9t6p9_template_matrix_0_eq_row_7 j + + · exact k9t6p9_template_matrix_0_eq_row_8 j + +private def k9t6p9_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 5], + #[∅, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p9_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_1) 0 j = k9t6p9_template_matrix_1 0 j := by decide + +private theorem k9t6p9_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_1) 1 j = k9t6p9_template_matrix_1 1 j := by decide + +private theorem k9t6p9_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_1) 2 j = k9t6p9_template_matrix_1 2 j := by decide + +private theorem k9t6p9_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_1) 3 j = k9t6p9_template_matrix_1 3 j := by decide + +private theorem k9t6p9_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_1) 4 j = k9t6p9_template_matrix_1 4 j := by decide + +private theorem k9t6p9_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_1) 5 j = k9t6p9_template_matrix_1 5 j := by decide + +private theorem k9t6p9_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_1) 6 j = k9t6p9_template_matrix_1 6 j := by decide + +private theorem k9t6p9_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_1) 7 j = k9t6p9_template_matrix_1 7 j := by decide + +private theorem k9t6p9_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_1) 8 j = k9t6p9_template_matrix_1 8 j := by decide + +private theorem k9t6p9_template_matrix_1_eq : (templateMatrix k9t6p9_templates_block_1) = k9t6p9_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t6p9_template_matrix_1_eq_row_0 j + + · exact k9t6p9_template_matrix_1_eq_row_1 j + + · exact k9t6p9_template_matrix_1_eq_row_2 j + + · exact k9t6p9_template_matrix_1_eq_row_3 j + + · exact k9t6p9_template_matrix_1_eq_row_4 j + + · exact k9t6p9_template_matrix_1_eq_row_5 j + + · exact k9t6p9_template_matrix_1_eq_row_6 j + + · exact k9t6p9_template_matrix_1_eq_row_7 j + + · exact k9t6p9_template_matrix_1_eq_row_8 j + +private def k9t6p9_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 6, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p9_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_2) 0 j = k9t6p9_template_matrix_2 0 j := by decide + +private theorem k9t6p9_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_2) 1 j = k9t6p9_template_matrix_2 1 j := by decide + +private theorem k9t6p9_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_2) 2 j = k9t6p9_template_matrix_2 2 j := by decide + +private theorem k9t6p9_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_2) 3 j = k9t6p9_template_matrix_2 3 j := by decide + +private theorem k9t6p9_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_2) 4 j = k9t6p9_template_matrix_2 4 j := by decide + +private theorem k9t6p9_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_2) 5 j = k9t6p9_template_matrix_2 5 j := by decide + +private theorem k9t6p9_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_2) 6 j = k9t6p9_template_matrix_2 6 j := by decide + +private theorem k9t6p9_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_2) 7 j = k9t6p9_template_matrix_2 7 j := by decide + +private theorem k9t6p9_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_2) 8 j = k9t6p9_template_matrix_2 8 j := by decide + +private theorem k9t6p9_template_matrix_2_eq : (templateMatrix k9t6p9_templates_block_2) = k9t6p9_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t6p9_template_matrix_2_eq_row_0 j + + · exact k9t6p9_template_matrix_2_eq_row_1 j + + · exact k9t6p9_template_matrix_2_eq_row_2 j + + · exact k9t6p9_template_matrix_2_eq_row_3 j + + · exact k9t6p9_template_matrix_2_eq_row_4 j + + · exact k9t6p9_template_matrix_2_eq_row_5 j + + · exact k9t6p9_template_matrix_2_eq_row_6 j + + · exact k9t6p9_template_matrix_2_eq_row_7 j + + · exact k9t6p9_template_matrix_2_eq_row_8 j + +private def k9t6p9_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p9_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_3) 0 j = k9t6p9_template_matrix_3 0 j := by decide + +private theorem k9t6p9_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_3) 1 j = k9t6p9_template_matrix_3 1 j := by decide + +private theorem k9t6p9_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_3) 2 j = k9t6p9_template_matrix_3 2 j := by decide + +private theorem k9t6p9_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_3) 3 j = k9t6p9_template_matrix_3 3 j := by decide + +private theorem k9t6p9_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_3) 4 j = k9t6p9_template_matrix_3 4 j := by decide + +private theorem k9t6p9_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_3) 5 j = k9t6p9_template_matrix_3 5 j := by decide + +private theorem k9t6p9_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_3) 6 j = k9t6p9_template_matrix_3 6 j := by decide + +private theorem k9t6p9_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_3) 7 j = k9t6p9_template_matrix_3 7 j := by decide + +private theorem k9t6p9_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p9_templates_block_3) 8 j = k9t6p9_template_matrix_3 8 j := by decide + +private theorem k9t6p9_template_matrix_3_eq : (templateMatrix k9t6p9_templates_block_3) = k9t6p9_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t6p9_template_matrix_3_eq_row_0 j + + · exact k9t6p9_template_matrix_3_eq_row_1 j + + · exact k9t6p9_template_matrix_3_eq_row_2 j + + · exact k9t6p9_template_matrix_3_eq_row_3 j + + · exact k9t6p9_template_matrix_3_eq_row_4 j + + · exact k9t6p9_template_matrix_3_eq_row_5 j + + · exact k9t6p9_template_matrix_3_eq_row_6 j + + · exact k9t6p9_template_matrix_3_eq_row_7 j + + · exact k9t6p9_template_matrix_3_eq_row_8 j + +private theorem k9t6p9_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => (((k9t6p9_template_matrix_0 i j ∪ k9t6p9_template_matrix_1 i j) ∪ k9t6p9_template_matrix_2 i j) ∪ k9t6p9_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p9.required i j) 0 j = k9t6p9_state_0 0 j := by decide + +private theorem k9t6p9_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => (((k9t6p9_template_matrix_0 i j ∪ k9t6p9_template_matrix_1 i j) ∪ k9t6p9_template_matrix_2 i j) ∪ k9t6p9_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p9.required i j) 1 j = k9t6p9_state_0 1 j := by decide + +private theorem k9t6p9_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => (((k9t6p9_template_matrix_0 i j ∪ k9t6p9_template_matrix_1 i j) ∪ k9t6p9_template_matrix_2 i j) ∪ k9t6p9_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p9.required i j) 2 j = k9t6p9_state_0 2 j := by decide + +private theorem k9t6p9_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => (((k9t6p9_template_matrix_0 i j ∪ k9t6p9_template_matrix_1 i j) ∪ k9t6p9_template_matrix_2 i j) ∪ k9t6p9_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p9.required i j) 3 j = k9t6p9_state_0 3 j := by decide + +private theorem k9t6p9_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => (((k9t6p9_template_matrix_0 i j ∪ k9t6p9_template_matrix_1 i j) ∪ k9t6p9_template_matrix_2 i j) ∪ k9t6p9_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p9.required i j) 4 j = k9t6p9_state_0 4 j := by decide + +private theorem k9t6p9_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => (((k9t6p9_template_matrix_0 i j ∪ k9t6p9_template_matrix_1 i j) ∪ k9t6p9_template_matrix_2 i j) ∪ k9t6p9_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p9.required i j) 5 j = k9t6p9_state_0 5 j := by decide + +private theorem k9t6p9_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => (((k9t6p9_template_matrix_0 i j ∪ k9t6p9_template_matrix_1 i j) ∪ k9t6p9_template_matrix_2 i j) ∪ k9t6p9_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p9.required i j) 6 j = k9t6p9_state_0 6 j := by decide + +private theorem k9t6p9_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => (((k9t6p9_template_matrix_0 i j ∪ k9t6p9_template_matrix_1 i j) ∪ k9t6p9_template_matrix_2 i j) ∪ k9t6p9_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p9.required i j) 7 j = k9t6p9_state_0 7 j := by decide + +private theorem k9t6p9_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => (((k9t6p9_template_matrix_0 i j ∪ k9t6p9_template_matrix_1 i j) ∪ k9t6p9_template_matrix_2 i j) ∪ k9t6p9_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p9.required i j) 8 j = k9t6p9_state_0 8 j := by decide + +private theorem k9t6p9_initial_merged_eq : (fun i j => (((k9t6p9_template_matrix_0 i j ∪ k9t6p9_template_matrix_1 i j) ∪ k9t6p9_template_matrix_2 i j) ∪ k9t6p9_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p9.required i j) = k9t6p9_state_0 := by + funext i j + fin_cases i + + · exact k9t6p9_initial_merged_eq_row_0 j + + · exact k9t6p9_initial_merged_eq_row_1 j + + · exact k9t6p9_initial_merged_eq_row_2 j + + · exact k9t6p9_initial_merged_eq_row_3 j + + · exact k9t6p9_initial_merged_eq_row_4 j + + · exact k9t6p9_initial_merged_eq_row_5 j + + · exact k9t6p9_initial_merged_eq_row_6 j + + · exact k9t6p9_initial_merged_eq_row_7 j + + · exact k9t6p9_initial_merged_eq_row_8 j + +private theorem k9t6p9_initial_eq : k9t6p9.initialMatrix 9 = k9t6p9_state_0 := by + funext i j + change templateMatrix (k9t6p9_templates_block_0 ++ k9t6p9_templates_block_1 ++ k9t6p9_templates_block_2 ++ k9t6p9_templates_block_3) i j ∪ requiredMatrix 9 k9t6p9.required i j = _ + simp only [templateMatrix_append, k9t6p9_template_matrix_0_eq, k9t6p9_template_matrix_1_eq, k9t6p9_template_matrix_2_eq, k9t6p9_template_matrix_3_eq] + exact congrFun (congrFun k9t6p9_initial_merged_eq i) j + +private theorem k9t6p9_closure_0 : ClosureCheck k9t6p9.graph k9t6p9_state_0 9 6 [] := by trivial + +private theorem k9t6p9_matrix_eq : k9t6p9.matrix 9 = k9t6p9_state_0 := by + change closureMatrix (k9t6p9.initialMatrix 9) _ = _ + rw [k9t6p9_initial_eq] + change closureMatrix k9t6p9_state_0 [] = _ + rfl + +private theorem k9t6p9_part_0 : k9t6p9.chains.flatten = List.finRange _ := by decide + +private theorem k9t6p9_part_1 : k9t6p9.chains.map List.length = ([[], [1], [1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t6p9_part_2 : k9t6p9.chains.map (fun l => l.map (fun i => decide (i ∈ k9t6p9.clique))) = ([[], [1], [1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t6p9_templates_item_0 : (⟨0, 1, [], [], [2, 3], 2, 6⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_1 : (⟨0, 1, [[4, 5, 6, 7, 8]], [], [2, 3], 1, 1⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_2 : (⟨0, 2, [], [], [1], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_3 : (⟨0, 2, [[4, 5, 6]], [], [1], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_4 : (⟨0, 3, [], [], [2, 1], 2, 6⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_5 : (⟨0, 3, [[4, 5, 6, 7, 8]], [], [2, 1], 1, 1⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_6 : (⟨0, 4, [[1, 2, 3]], [], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_7 : (⟨0, 4, [[1, 2, 3]], [], [5, 6, 7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_8 : (⟨0, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_9 : (⟨0, 5, [[1, 2, 3]], [], [4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_10 : (⟨0, 7, [], [], [6], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_11 : (⟨0, 7, [[1, 2, 3]], [], [6], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_12 : (⟨0, 8, [[1, 2, 3]], [], [], 2, 5⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_13 : (⟨0, 8, [[1, 2, 3]], [], [7, 6, 5, 4], 1, 1⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_14 : (⟨1, 2, [], [], [3], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_15 : (⟨1, 2, [[4, 5, 6]], [], [3], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_16 : (⟨1, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_17 : (⟨1, 5, [], [3, 2], [4], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_18 : (⟨1, 7, [], [], [6], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_19 : (⟨1, 7, [], [3, 2], [6], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_20 : (⟨2, 3, [], [1], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_21 : (⟨2, 3, [[4, 5, 6]], [1], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_22 : (⟨2, 4, [], [1], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_23 : (⟨2, 4, [], [1], [5, 6], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_24 : (⟨2, 5, [], [1], [4], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_25 : (⟨2, 6, [], [1], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_26 : (⟨2, 6, [], [1], [5, 4], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_27 : (⟨2, 7, [], [1], [6], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_28 : (⟨2, 8, [], [1], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_29 : (⟨2, 8, [[4, 5, 6]], [1], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_30 : (⟨3, 5, [], [], [4], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_31 : (⟨3, 5, [], [1, 2], [4], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_32 : (⟨3, 7, [], [], [6], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_33 : (⟨3, 7, [], [1, 2], [6], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_34 : (⟨4, 5, [], [], [6], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_35 : (⟨4, 5, [[1, 2, 3]], [], [6], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_36 : (⟨4, 7, [], [], [6], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_37 : (⟨4, 7, [[1, 2, 3]], [], [6], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_38 : (⟨5, 6, [], [4], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_39 : (⟨5, 6, [[1, 2, 3]], [4], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_40 : (⟨5, 7, [], [4], [6], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_41 : (⟨5, 8, [], [4], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_42 : (⟨5, 8, [[1, 2, 3]], [4], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_43 : (⟨6, 7, [], [], [8], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_44 : (⟨6, 7, [[1, 2, 3]], [], [8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_45 : (⟨7, 8, [], [6], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_item_46 : (⟨7, 8, [[1, 2, 3]], [6], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p9_templates_block_0_check : ∀ T ∈ k9t6p9_templates_block_0, T.Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p9_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p9_templates_item_0, k9t6p9_templates_item_1, k9t6p9_templates_item_2, k9t6p9_templates_item_3, k9t6p9_templates_item_4, k9t6p9_templates_item_5, k9t6p9_templates_item_6, k9t6p9_templates_item_7, k9t6p9_templates_item_8, k9t6p9_templates_item_9, k9t6p9_templates_item_10, k9t6p9_templates_item_11⟩ + +private theorem k9t6p9_templates_block_1_check : ∀ T ∈ k9t6p9_templates_block_1, T.Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p9_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p9_templates_item_12, k9t6p9_templates_item_13, k9t6p9_templates_item_14, k9t6p9_templates_item_15, k9t6p9_templates_item_16, k9t6p9_templates_item_17, k9t6p9_templates_item_18, k9t6p9_templates_item_19, k9t6p9_templates_item_20, k9t6p9_templates_item_21, k9t6p9_templates_item_22, k9t6p9_templates_item_23⟩ + +private theorem k9t6p9_templates_block_2_check : ∀ T ∈ k9t6p9_templates_block_2, T.Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p9_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p9_templates_item_24, k9t6p9_templates_item_25, k9t6p9_templates_item_26, k9t6p9_templates_item_27, k9t6p9_templates_item_28, k9t6p9_templates_item_29, k9t6p9_templates_item_30, k9t6p9_templates_item_31, k9t6p9_templates_item_32, k9t6p9_templates_item_33, k9t6p9_templates_item_34, k9t6p9_templates_item_35⟩ + +private theorem k9t6p9_templates_block_3_check : ∀ T ∈ k9t6p9_templates_block_3, T.Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p9_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p9_templates_item_36, k9t6p9_templates_item_37, k9t6p9_templates_item_38, k9t6p9_templates_item_39, k9t6p9_templates_item_40, k9t6p9_templates_item_41, k9t6p9_templates_item_42, k9t6p9_templates_item_43, k9t6p9_templates_item_44, k9t6p9_templates_item_45, k9t6p9_templates_item_46⟩ + +private theorem k9t6p9_part_3 : ∀ T ∈ k9t6p9.templates, T.Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t6p9_templates_block_0 ++ k9t6p9_templates_block_1 ++ k9t6p9_templates_block_2 ++ k9t6p9_templates_block_3), T.Check k9t6p9.graph k9t6p9.clique 9 (patternAmount ([[], [1], [1, 1]] : List (List ℕ))) (([[], [1], [1, 1]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t6p9_templates_block_0_check, k9t6p9_templates_block_1_check⟩, k9t6p9_templates_block_2_check⟩, k9t6p9_templates_block_3_check⟩ + +private theorem k9t6p9_part_4 : ∀ p ∈ k9t6p9.required, p.Check k9t6p9.graph 9 := by decide + +private theorem k9t6p9_part_5 : ClosureCheck k9t6p9.graph (k9t6p9.initialMatrix 9) 9 6 k9t6p9.closure := by + rw [k9t6p9_initial_eq] + exact k9t6p9_closure_0 + +private theorem k9t6p9_part_6 : k9t6p9.bad.Check k9t6p9.graph (k9t6p9.matrix 9) 9 6 := by + rw [k9t6p9_matrix_eq] + decide + +theorem k9t6p9_check : k9t6p9.Check 9 6 [[], [1], [1, 1]] := + ⟨k9t6p9_part_0, k9t6p9_part_1, k9t6p9_part_2, k9t6p9_part_3, k9t6p9_part_4, k9t6p9_part_5, k9t6p9_part_6⟩ +private def k9t6p10_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [], [], [2], 2, 7⟩, ⟨0, 1, [[3, 4, 5]], [], [2], 1, 4⟩, ⟨0, 3, [], [2, 1], [], 2, 6⟩, ⟨0, 3, [[6, 7, 8]], [2, 1], [4, 5], 1, 1⟩, ⟨0, 4, [], [], [3], 2, 7⟩, ⟨0, 4, [], [2, 1], [3], 1, 5⟩, ⟨0, 5, [], [2, 1], [], 2, 6⟩, ⟨0, 5, [[6, 7, 8]], [2, 1], [4, 3], 1, 1⟩, ⟨0, 6, [], [2, 1], [], 2, 6⟩, ⟨0, 6, [[3, 4, 5]], [2, 1], [7, 8], 1, 1⟩, ⟨0, 7, [], [], [6], 2, 7⟩, ⟨0, 7, [], [2, 1], [6], 1, 5⟩] + +private def k9t6p10_templates_block_1 : List (TemplateData (Fin 9)) := [⟨0, 8, [], [2, 1], [], 2, 6⟩, ⟨0, 8, [[3, 4, 5]], [2, 1], [7, 6], 1, 1⟩, ⟨1, 2, [], [0], [], 2, 7⟩, ⟨1, 2, [[3, 4, 5]], [0], [], 1, 4⟩, ⟨1, 3, [], [0], [], 2, 7⟩, ⟨1, 3, [], [0], [4, 5], 1, 5⟩, ⟨1, 4, [], [0], [3], 1, 6⟩, ⟨1, 5, [], [0], [], 2, 7⟩, ⟨1, 5, [], [0], [4, 3], 1, 5⟩, ⟨1, 6, [], [0], [], 2, 7⟩, ⟨1, 6, [[3, 4, 5]], [0], [], 1, 4⟩, ⟨1, 7, [], [0], [6], 1, 6⟩] + +private def k9t6p10_templates_block_2 : List (TemplateData (Fin 9)) := [⟨1, 8, [], [0], [], 2, 7⟩, ⟨1, 8, [[3, 4, 5]], [0], [], 1, 4⟩, ⟨2, 4, [], [], [3], 2, 7⟩, ⟨2, 4, [], [0, 1], [3], 1, 5⟩, ⟨2, 7, [], [], [6], 2, 7⟩, ⟨2, 7, [], [0, 1], [6], 1, 5⟩, ⟨3, 4, [], [], [5], 2, 7⟩, ⟨3, 4, [[0, 1, 2]], [], [5], 1, 4⟩, ⟨3, 7, [], [], [6], 2, 7⟩, ⟨3, 7, [[0, 1, 2]], [], [6], 1, 4⟩, ⟨4, 5, [], [3], [], 2, 7⟩, ⟨4, 5, [[0, 1, 2]], [3], [], 1, 4⟩] + +private def k9t6p10_templates_block_3 : List (TemplateData (Fin 9)) := [⟨4, 6, [], [3], [], 2, 7⟩, ⟨4, 6, [[0, 1, 2]], [3], [], 1, 4⟩, ⟨4, 7, [], [3], [6], 1, 6⟩, ⟨4, 8, [], [3], [], 2, 7⟩, ⟨4, 8, [[0, 1, 2]], [3], [], 1, 4⟩, ⟨5, 7, [], [], [6], 2, 7⟩, ⟨5, 7, [[0, 1, 2]], [], [6], 1, 4⟩, ⟨6, 7, [], [], [8], 2, 7⟩, ⟨6, 7, [[0, 1, 2]], [], [8], 1, 4⟩, ⟨7, 8, [], [6], [], 2, 7⟩, ⟨7, 8, [[0, 1, 2]], [6], [], 1, 4⟩] + +def k9t6p10 : LayoutCertificate 9 where + chains := [[0, 1, 2], [3, 4, 5], [6, 7, 8]] + clique := {0, 2, 3, 5, 6, 8} + templates := k9t6p10_templates_block_0 ++ k9t6p10_templates_block_1 ++ k9t6p10_templates_block_2 ++ k9t6p10_templates_block_3 + required := [] + closure := [] + bad := ⟨none, {(1, 3), (4, 3), (7, 3), (0, 3)}⟩ + + +private def k9t6p10_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 7, ∅, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6], + #[Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 6, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[Finset.Icc 1 6, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t6p10_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 7, ∅, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p10_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_0) 0 j = k9t6p10_template_matrix_0 0 j := by decide + +private theorem k9t6p10_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_0) 1 j = k9t6p10_template_matrix_0 1 j := by decide + +private theorem k9t6p10_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_0) 2 j = k9t6p10_template_matrix_0 2 j := by decide + +private theorem k9t6p10_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_0) 3 j = k9t6p10_template_matrix_0 3 j := by decide + +private theorem k9t6p10_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_0) 4 j = k9t6p10_template_matrix_0 4 j := by decide + +private theorem k9t6p10_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_0) 5 j = k9t6p10_template_matrix_0 5 j := by decide + +private theorem k9t6p10_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_0) 6 j = k9t6p10_template_matrix_0 6 j := by decide + +private theorem k9t6p10_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_0) 7 j = k9t6p10_template_matrix_0 7 j := by decide + +private theorem k9t6p10_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_0) 8 j = k9t6p10_template_matrix_0 8 j := by decide + +private theorem k9t6p10_template_matrix_0_eq : (templateMatrix k9t6p10_templates_block_0) = k9t6p10_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t6p10_template_matrix_0_eq_row_0 j + + · exact k9t6p10_template_matrix_0_eq_row_1 j + + · exact k9t6p10_template_matrix_0_eq_row_2 j + + · exact k9t6p10_template_matrix_0_eq_row_3 j + + · exact k9t6p10_template_matrix_0_eq_row_4 j + + · exact k9t6p10_template_matrix_0_eq_row_5 j + + · exact k9t6p10_template_matrix_0_eq_row_6 j + + · exact k9t6p10_template_matrix_0_eq_row_7 j + + · exact k9t6p10_template_matrix_0_eq_row_8 j + +private def k9t6p10_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6], + #[∅, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p10_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_1) 0 j = k9t6p10_template_matrix_1 0 j := by decide + +private theorem k9t6p10_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_1) 1 j = k9t6p10_template_matrix_1 1 j := by decide + +private theorem k9t6p10_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_1) 2 j = k9t6p10_template_matrix_1 2 j := by decide + +private theorem k9t6p10_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_1) 3 j = k9t6p10_template_matrix_1 3 j := by decide + +private theorem k9t6p10_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_1) 4 j = k9t6p10_template_matrix_1 4 j := by decide + +private theorem k9t6p10_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_1) 5 j = k9t6p10_template_matrix_1 5 j := by decide + +private theorem k9t6p10_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_1) 6 j = k9t6p10_template_matrix_1 6 j := by decide + +private theorem k9t6p10_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_1) 7 j = k9t6p10_template_matrix_1 7 j := by decide + +private theorem k9t6p10_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_1) 8 j = k9t6p10_template_matrix_1 8 j := by decide + +private theorem k9t6p10_template_matrix_1_eq : (templateMatrix k9t6p10_templates_block_1) = k9t6p10_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t6p10_template_matrix_1_eq_row_0 j + + · exact k9t6p10_template_matrix_1_eq_row_1 j + + · exact k9t6p10_template_matrix_1_eq_row_2 j + + · exact k9t6p10_template_matrix_1_eq_row_3 j + + · exact k9t6p10_template_matrix_1_eq_row_4 j + + · exact k9t6p10_template_matrix_1_eq_row_5 j + + · exact k9t6p10_template_matrix_1_eq_row_6 j + + · exact k9t6p10_template_matrix_1_eq_row_7 j + + · exact k9t6p10_template_matrix_1_eq_row_8 j + +private def k9t6p10_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅], + #[∅, ∅, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p10_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_2) 0 j = k9t6p10_template_matrix_2 0 j := by decide + +private theorem k9t6p10_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_2) 1 j = k9t6p10_template_matrix_2 1 j := by decide + +private theorem k9t6p10_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_2) 2 j = k9t6p10_template_matrix_2 2 j := by decide + +private theorem k9t6p10_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_2) 3 j = k9t6p10_template_matrix_2 3 j := by decide + +private theorem k9t6p10_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_2) 4 j = k9t6p10_template_matrix_2 4 j := by decide + +private theorem k9t6p10_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_2) 5 j = k9t6p10_template_matrix_2 5 j := by decide + +private theorem k9t6p10_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_2) 6 j = k9t6p10_template_matrix_2 6 j := by decide + +private theorem k9t6p10_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_2) 7 j = k9t6p10_template_matrix_2 7 j := by decide + +private theorem k9t6p10_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_2) 8 j = k9t6p10_template_matrix_2 8 j := by decide + +private theorem k9t6p10_template_matrix_2_eq : (templateMatrix k9t6p10_templates_block_2) = k9t6p10_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t6p10_template_matrix_2_eq_row_0 j + + · exact k9t6p10_template_matrix_2_eq_row_1 j + + · exact k9t6p10_template_matrix_2_eq_row_2 j + + · exact k9t6p10_template_matrix_2_eq_row_3 j + + · exact k9t6p10_template_matrix_2_eq_row_4 j + + · exact k9t6p10_template_matrix_2_eq_row_5 j + + · exact k9t6p10_template_matrix_2_eq_row_6 j + + · exact k9t6p10_template_matrix_2_eq_row_7 j + + · exact k9t6p10_template_matrix_2_eq_row_8 j + +private def k9t6p10_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t6p10_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_3) 0 j = k9t6p10_template_matrix_3 0 j := by decide + +private theorem k9t6p10_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_3) 1 j = k9t6p10_template_matrix_3 1 j := by decide + +private theorem k9t6p10_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_3) 2 j = k9t6p10_template_matrix_3 2 j := by decide + +private theorem k9t6p10_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_3) 3 j = k9t6p10_template_matrix_3 3 j := by decide + +private theorem k9t6p10_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_3) 4 j = k9t6p10_template_matrix_3 4 j := by decide + +private theorem k9t6p10_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_3) 5 j = k9t6p10_template_matrix_3 5 j := by decide + +private theorem k9t6p10_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_3) 6 j = k9t6p10_template_matrix_3 6 j := by decide + +private theorem k9t6p10_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_3) 7 j = k9t6p10_template_matrix_3 7 j := by decide + +private theorem k9t6p10_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t6p10_templates_block_3) 8 j = k9t6p10_template_matrix_3 8 j := by decide + +private theorem k9t6p10_template_matrix_3_eq : (templateMatrix k9t6p10_templates_block_3) = k9t6p10_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t6p10_template_matrix_3_eq_row_0 j + + · exact k9t6p10_template_matrix_3_eq_row_1 j + + · exact k9t6p10_template_matrix_3_eq_row_2 j + + · exact k9t6p10_template_matrix_3_eq_row_3 j + + · exact k9t6p10_template_matrix_3_eq_row_4 j + + · exact k9t6p10_template_matrix_3_eq_row_5 j + + · exact k9t6p10_template_matrix_3_eq_row_6 j + + · exact k9t6p10_template_matrix_3_eq_row_7 j + + · exact k9t6p10_template_matrix_3_eq_row_8 j + +private theorem k9t6p10_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => (((k9t6p10_template_matrix_0 i j ∪ k9t6p10_template_matrix_1 i j) ∪ k9t6p10_template_matrix_2 i j) ∪ k9t6p10_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p10.required i j) 0 j = k9t6p10_state_0 0 j := by decide + +private theorem k9t6p10_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => (((k9t6p10_template_matrix_0 i j ∪ k9t6p10_template_matrix_1 i j) ∪ k9t6p10_template_matrix_2 i j) ∪ k9t6p10_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p10.required i j) 1 j = k9t6p10_state_0 1 j := by decide + +private theorem k9t6p10_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => (((k9t6p10_template_matrix_0 i j ∪ k9t6p10_template_matrix_1 i j) ∪ k9t6p10_template_matrix_2 i j) ∪ k9t6p10_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p10.required i j) 2 j = k9t6p10_state_0 2 j := by decide + +private theorem k9t6p10_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => (((k9t6p10_template_matrix_0 i j ∪ k9t6p10_template_matrix_1 i j) ∪ k9t6p10_template_matrix_2 i j) ∪ k9t6p10_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p10.required i j) 3 j = k9t6p10_state_0 3 j := by decide + +private theorem k9t6p10_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => (((k9t6p10_template_matrix_0 i j ∪ k9t6p10_template_matrix_1 i j) ∪ k9t6p10_template_matrix_2 i j) ∪ k9t6p10_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p10.required i j) 4 j = k9t6p10_state_0 4 j := by decide + +private theorem k9t6p10_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => (((k9t6p10_template_matrix_0 i j ∪ k9t6p10_template_matrix_1 i j) ∪ k9t6p10_template_matrix_2 i j) ∪ k9t6p10_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p10.required i j) 5 j = k9t6p10_state_0 5 j := by decide + +private theorem k9t6p10_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => (((k9t6p10_template_matrix_0 i j ∪ k9t6p10_template_matrix_1 i j) ∪ k9t6p10_template_matrix_2 i j) ∪ k9t6p10_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p10.required i j) 6 j = k9t6p10_state_0 6 j := by decide + +private theorem k9t6p10_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => (((k9t6p10_template_matrix_0 i j ∪ k9t6p10_template_matrix_1 i j) ∪ k9t6p10_template_matrix_2 i j) ∪ k9t6p10_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p10.required i j) 7 j = k9t6p10_state_0 7 j := by decide + +private theorem k9t6p10_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => (((k9t6p10_template_matrix_0 i j ∪ k9t6p10_template_matrix_1 i j) ∪ k9t6p10_template_matrix_2 i j) ∪ k9t6p10_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p10.required i j) 8 j = k9t6p10_state_0 8 j := by decide + +private theorem k9t6p10_initial_merged_eq : (fun i j => (((k9t6p10_template_matrix_0 i j ∪ k9t6p10_template_matrix_1 i j) ∪ k9t6p10_template_matrix_2 i j) ∪ k9t6p10_template_matrix_3 i j) ∪ requiredMatrix 9 k9t6p10.required i j) = k9t6p10_state_0 := by + funext i j + fin_cases i + + · exact k9t6p10_initial_merged_eq_row_0 j + + · exact k9t6p10_initial_merged_eq_row_1 j + + · exact k9t6p10_initial_merged_eq_row_2 j + + · exact k9t6p10_initial_merged_eq_row_3 j + + · exact k9t6p10_initial_merged_eq_row_4 j + + · exact k9t6p10_initial_merged_eq_row_5 j + + · exact k9t6p10_initial_merged_eq_row_6 j + + · exact k9t6p10_initial_merged_eq_row_7 j + + · exact k9t6p10_initial_merged_eq_row_8 j + +private theorem k9t6p10_initial_eq : k9t6p10.initialMatrix 9 = k9t6p10_state_0 := by + funext i j + change templateMatrix (k9t6p10_templates_block_0 ++ k9t6p10_templates_block_1 ++ k9t6p10_templates_block_2 ++ k9t6p10_templates_block_3) i j ∪ requiredMatrix 9 k9t6p10.required i j = _ + simp only [templateMatrix_append, k9t6p10_template_matrix_0_eq, k9t6p10_template_matrix_1_eq, k9t6p10_template_matrix_2_eq, k9t6p10_template_matrix_3_eq] + exact congrFun (congrFun k9t6p10_initial_merged_eq i) j + +private theorem k9t6p10_closure_0 : ClosureCheck k9t6p10.graph k9t6p10_state_0 9 6 [] := by trivial + +private theorem k9t6p10_matrix_eq : k9t6p10.matrix 9 = k9t6p10_state_0 := by + change closureMatrix (k9t6p10.initialMatrix 9) _ = _ + rw [k9t6p10_initial_eq] + change closureMatrix k9t6p10_state_0 [] = _ + rfl + +private theorem k9t6p10_part_0 : k9t6p10.chains.flatten = List.finRange _ := by decide + +private theorem k9t6p10_part_1 : k9t6p10.chains.map List.length = ([[1], [1], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t6p10_part_2 : k9t6p10.chains.map (fun l => l.map (fun i => decide (i ∈ k9t6p10.clique))) = ([[1], [1], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t6p10_templates_item_0 : (⟨0, 1, [], [], [2], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_1 : (⟨0, 1, [[3, 4, 5]], [], [2], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_2 : (⟨0, 3, [], [2, 1], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_3 : (⟨0, 3, [[6, 7, 8]], [2, 1], [4, 5], 1, 1⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_4 : (⟨0, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_5 : (⟨0, 4, [], [2, 1], [3], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_6 : (⟨0, 5, [], [2, 1], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_7 : (⟨0, 5, [[6, 7, 8]], [2, 1], [4, 3], 1, 1⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_8 : (⟨0, 6, [], [2, 1], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_9 : (⟨0, 6, [[3, 4, 5]], [2, 1], [7, 8], 1, 1⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_10 : (⟨0, 7, [], [], [6], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_11 : (⟨0, 7, [], [2, 1], [6], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_12 : (⟨0, 8, [], [2, 1], [], 2, 6⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_13 : (⟨0, 8, [[3, 4, 5]], [2, 1], [7, 6], 1, 1⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_14 : (⟨1, 2, [], [0], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_15 : (⟨1, 2, [[3, 4, 5]], [0], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_16 : (⟨1, 3, [], [0], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_17 : (⟨1, 3, [], [0], [4, 5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_18 : (⟨1, 4, [], [0], [3], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_19 : (⟨1, 5, [], [0], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_20 : (⟨1, 5, [], [0], [4, 3], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_21 : (⟨1, 6, [], [0], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_22 : (⟨1, 6, [[3, 4, 5]], [0], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_23 : (⟨1, 7, [], [0], [6], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_24 : (⟨1, 8, [], [0], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_25 : (⟨1, 8, [[3, 4, 5]], [0], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_26 : (⟨2, 4, [], [], [3], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_27 : (⟨2, 4, [], [0, 1], [3], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_28 : (⟨2, 7, [], [], [6], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_29 : (⟨2, 7, [], [0, 1], [6], 1, 5⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_30 : (⟨3, 4, [], [], [5], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_31 : (⟨3, 4, [[0, 1, 2]], [], [5], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_32 : (⟨3, 7, [], [], [6], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_33 : (⟨3, 7, [[0, 1, 2]], [], [6], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_34 : (⟨4, 5, [], [3], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_35 : (⟨4, 5, [[0, 1, 2]], [3], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_36 : (⟨4, 6, [], [3], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_37 : (⟨4, 6, [[0, 1, 2]], [3], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_38 : (⟨4, 7, [], [3], [6], 1, 6⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_39 : (⟨4, 8, [], [3], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_40 : (⟨4, 8, [[0, 1, 2]], [3], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_41 : (⟨5, 7, [], [], [6], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_42 : (⟨5, 7, [[0, 1, 2]], [], [6], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_43 : (⟨6, 7, [], [], [8], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_44 : (⟨6, 7, [[0, 1, 2]], [], [8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_45 : (⟨7, 8, [], [6], [], 2, 7⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_item_46 : (⟨7, 8, [[0, 1, 2]], [6], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t6p10_templates_block_0_check : ∀ T ∈ k9t6p10_templates_block_0, T.Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p10_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p10_templates_item_0, k9t6p10_templates_item_1, k9t6p10_templates_item_2, k9t6p10_templates_item_3, k9t6p10_templates_item_4, k9t6p10_templates_item_5, k9t6p10_templates_item_6, k9t6p10_templates_item_7, k9t6p10_templates_item_8, k9t6p10_templates_item_9, k9t6p10_templates_item_10, k9t6p10_templates_item_11⟩ + +private theorem k9t6p10_templates_block_1_check : ∀ T ∈ k9t6p10_templates_block_1, T.Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p10_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p10_templates_item_12, k9t6p10_templates_item_13, k9t6p10_templates_item_14, k9t6p10_templates_item_15, k9t6p10_templates_item_16, k9t6p10_templates_item_17, k9t6p10_templates_item_18, k9t6p10_templates_item_19, k9t6p10_templates_item_20, k9t6p10_templates_item_21, k9t6p10_templates_item_22, k9t6p10_templates_item_23⟩ + +private theorem k9t6p10_templates_block_2_check : ∀ T ∈ k9t6p10_templates_block_2, T.Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p10_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p10_templates_item_24, k9t6p10_templates_item_25, k9t6p10_templates_item_26, k9t6p10_templates_item_27, k9t6p10_templates_item_28, k9t6p10_templates_item_29, k9t6p10_templates_item_30, k9t6p10_templates_item_31, k9t6p10_templates_item_32, k9t6p10_templates_item_33, k9t6p10_templates_item_34, k9t6p10_templates_item_35⟩ + +private theorem k9t6p10_templates_block_3_check : ∀ T ∈ k9t6p10_templates_block_3, T.Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t6p10_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t6p10_templates_item_36, k9t6p10_templates_item_37, k9t6p10_templates_item_38, k9t6p10_templates_item_39, k9t6p10_templates_item_40, k9t6p10_templates_item_41, k9t6p10_templates_item_42, k9t6p10_templates_item_43, k9t6p10_templates_item_44, k9t6p10_templates_item_45, k9t6p10_templates_item_46⟩ + +private theorem k9t6p10_part_3 : ∀ T ∈ k9t6p10.templates, T.Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t6p10_templates_block_0 ++ k9t6p10_templates_block_1 ++ k9t6p10_templates_block_2 ++ k9t6p10_templates_block_3), T.Check k9t6p10.graph k9t6p10.clique 9 (patternAmount ([[1], [1], [1]] : List (List ℕ))) (([[1], [1], [1]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t6p10_templates_block_0_check, k9t6p10_templates_block_1_check⟩, k9t6p10_templates_block_2_check⟩, k9t6p10_templates_block_3_check⟩ + +private theorem k9t6p10_part_4 : ∀ p ∈ k9t6p10.required, p.Check k9t6p10.graph 9 := by decide + +private theorem k9t6p10_part_5 : ClosureCheck k9t6p10.graph (k9t6p10.initialMatrix 9) 9 6 k9t6p10.closure := by + rw [k9t6p10_initial_eq] + exact k9t6p10_closure_0 + +private theorem k9t6p10_part_6 : k9t6p10.bad.Check k9t6p10.graph (k9t6p10.matrix 9) 9 6 := by + rw [k9t6p10_matrix_eq] + decide + +theorem k9t6p10_check : k9t6p10.Check 9 6 [[1], [1], [1]] := + ⟨k9t6p10_part_0, k9t6p10_part_1, k9t6p10_part_2, k9t6p10_part_3, k9t6p10_part_4, k9t6p10_part_5, k9t6p10_part_6⟩ +def k9t7p0 : LayoutCertificate 7 where + chains := [[0], [1], [2], [3], [4], [5], [6]] + clique := {0, 1, 2, 3, 4, 5, 6} + templates := [⟨0, 1, [], [], [], 1, 8⟩, + ⟨0, 2, [], [], [], 1, 8⟩, + ⟨0, 3, [], [], [], 1, 8⟩, + ⟨0, 4, [], [], [], 1, 8⟩, + ⟨0, 5, [], [], [], 1, 8⟩, + ⟨0, 6, [], [], [], 1, 8⟩, + ⟨1, 2, [], [], [], 1, 8⟩, + ⟨1, 3, [], [], [], 1, 8⟩, + ⟨1, 4, [], [], [], 1, 8⟩, + ⟨1, 5, [], [], [], 1, 8⟩, + ⟨1, 6, [], [], [], 1, 8⟩, + ⟨2, 3, [], [], [], 1, 8⟩, + ⟨2, 4, [], [], [], 1, 8⟩, + ⟨2, 5, [], [], [], 1, 8⟩, + ⟨2, 6, [], [], [], 1, 8⟩, + ⟨3, 4, [], [], [], 1, 8⟩, + ⟨3, 5, [], [], [], 1, 8⟩, + ⟨3, 6, [], [], [], 1, 8⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3), (3, 3)}⟩ + + +private def k9t7p0_state_0 : ForbiddenMatrix 7 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t7p0_initial_eq_row_0 : ∀ j : Fin 7, (k9t7p0.initialMatrix 9) 0 j = k9t7p0_state_0 0 j := by decide + +private theorem k9t7p0_initial_eq_row_1 : ∀ j : Fin 7, (k9t7p0.initialMatrix 9) 1 j = k9t7p0_state_0 1 j := by decide + +private theorem k9t7p0_initial_eq_row_2 : ∀ j : Fin 7, (k9t7p0.initialMatrix 9) 2 j = k9t7p0_state_0 2 j := by decide + +private theorem k9t7p0_initial_eq_row_3 : ∀ j : Fin 7, (k9t7p0.initialMatrix 9) 3 j = k9t7p0_state_0 3 j := by decide + +private theorem k9t7p0_initial_eq_row_4 : ∀ j : Fin 7, (k9t7p0.initialMatrix 9) 4 j = k9t7p0_state_0 4 j := by decide + +private theorem k9t7p0_initial_eq_row_5 : ∀ j : Fin 7, (k9t7p0.initialMatrix 9) 5 j = k9t7p0_state_0 5 j := by decide + +private theorem k9t7p0_initial_eq_row_6 : ∀ j : Fin 7, (k9t7p0.initialMatrix 9) 6 j = k9t7p0_state_0 6 j := by decide + +private theorem k9t7p0_initial_eq : (k9t7p0.initialMatrix 9) = k9t7p0_state_0 := by + funext i j + fin_cases i + + · exact k9t7p0_initial_eq_row_0 j + + · exact k9t7p0_initial_eq_row_1 j + + · exact k9t7p0_initial_eq_row_2 j + + · exact k9t7p0_initial_eq_row_3 j + + · exact k9t7p0_initial_eq_row_4 j + + · exact k9t7p0_initial_eq_row_5 j + + · exact k9t7p0_initial_eq_row_6 j + +private theorem k9t7p0_closure_0 : ClosureCheck k9t7p0.graph k9t7p0_state_0 9 7 [] := by trivial + +private theorem k9t7p0_matrix_eq : k9t7p0.matrix 9 = k9t7p0_state_0 := by + change closureMatrix (k9t7p0.initialMatrix 9) _ = _ + rw [k9t7p0_initial_eq] + change closureMatrix k9t7p0_state_0 [] = _ + rfl + +private theorem k9t7p0_part_0 : k9t7p0.chains.flatten = List.finRange _ := by decide + +private theorem k9t7p0_part_1 : k9t7p0.chains.map List.length = ([[], [], [], [], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t7p0_part_2 : k9t7p0.chains.map (fun l => l.map (fun i => decide (i ∈ k9t7p0.clique))) = ([[], [], [], [], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k9t7p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_3 : (⟨0, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_4 : (⟨0, 5, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_5 : (⟨0, 6, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_6 : (⟨1, 2, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_7 : (⟨1, 3, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_8 : (⟨1, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_9 : (⟨1, 5, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_10 : (⟨1, 6, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_11 : (⟨2, 3, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_12 : (⟨2, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_13 : (⟨2, 5, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_14 : (⟨2, 6, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_15 : (⟨3, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_16 : (⟨3, 5, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_templates_item_17 : (⟨3, 6, [], [], [], 1, 8⟩ : TemplateData (Fin 7)).Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p0_part_3 : ∀ T ∈ k9t7p0.templates, T.Check k9t7p0.graph k9t7p0.clique 9 (patternAmount ([[], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k9t7p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t7p0_templates_item_0, k9t7p0_templates_item_1, k9t7p0_templates_item_2, k9t7p0_templates_item_3, k9t7p0_templates_item_4, k9t7p0_templates_item_5, k9t7p0_templates_item_6, k9t7p0_templates_item_7, k9t7p0_templates_item_8, k9t7p0_templates_item_9, k9t7p0_templates_item_10, k9t7p0_templates_item_11, k9t7p0_templates_item_12, k9t7p0_templates_item_13, k9t7p0_templates_item_14, k9t7p0_templates_item_15, k9t7p0_templates_item_16, k9t7p0_templates_item_17⟩ + +private theorem k9t7p0_part_4 : ∀ p ∈ k9t7p0.required, p.Check k9t7p0.graph 9 := by decide + +private theorem k9t7p0_part_5 : ClosureCheck k9t7p0.graph (k9t7p0.initialMatrix 9) 9 7 k9t7p0.closure := by + rw [k9t7p0_initial_eq] + exact k9t7p0_closure_0 + +private theorem k9t7p0_part_6 : k9t7p0.bad.Check k9t7p0.graph (k9t7p0.matrix 9) 9 7 := by + rw [k9t7p0_matrix_eq] + decide + +theorem k9t7p0_check : k9t7p0.Check 9 7 [[], [], [], [], [], [], []] := + ⟨k9t7p0_part_0, k9t7p0_part_1, k9t7p0_part_2, k9t7p0_part_3, k9t7p0_part_4, k9t7p0_part_5, k9t7p0_part_6⟩ +private def k9t7p1_templates_block_0 : List (TemplateData (Fin 8)) := [⟨0, 1, [], [], [], 2, 8⟩, ⟨0, 1, [[5, 6, 7]], [], [], 1, 5⟩, ⟨0, 2, [], [], [], 2, 8⟩, ⟨0, 2, [[5, 6, 7]], [], [], 1, 5⟩, ⟨0, 3, [], [], [], 2, 8⟩, ⟨0, 3, [[5, 6, 7]], [], [], 1, 5⟩, ⟨0, 4, [], [], [], 2, 8⟩, ⟨0, 4, [[5, 6, 7]], [], [], 1, 5⟩, ⟨0, 5, [], [], [], 2, 8⟩, ⟨0, 5, [], [], [6, 7], 1, 6⟩, ⟨0, 6, [], [], [5], 1, 7⟩, ⟨0, 7, [], [], [], 2, 8⟩] + +private def k9t7p1_templates_block_1 : List (TemplateData (Fin 8)) := [⟨0, 7, [], [], [6, 5], 1, 6⟩, ⟨1, 2, [], [], [], 2, 8⟩, ⟨1, 2, [[5, 6, 7]], [], [], 1, 5⟩, ⟨1, 3, [], [], [], 2, 8⟩, ⟨1, 3, [[5, 6, 7]], [], [], 1, 5⟩, ⟨1, 4, [], [], [], 2, 8⟩, ⟨1, 4, [[5, 6, 7]], [], [], 1, 5⟩, ⟨1, 5, [], [], [], 2, 8⟩, ⟨1, 5, [], [], [6, 7], 1, 6⟩, ⟨1, 6, [], [], [5], 1, 7⟩, ⟨1, 7, [], [], [], 2, 8⟩, ⟨1, 7, [], [], [6, 5], 1, 6⟩] + +private def k9t7p1_templates_block_2 : List (TemplateData (Fin 8)) := [⟨2, 3, [], [], [], 2, 8⟩, ⟨2, 3, [[5, 6, 7]], [], [], 1, 5⟩, ⟨2, 4, [], [], [], 2, 8⟩, ⟨2, 4, [[5, 6, 7]], [], [], 1, 5⟩, ⟨2, 5, [], [], [], 2, 8⟩, ⟨2, 5, [], [], [6, 7], 1, 6⟩, ⟨2, 6, [], [], [5], 1, 7⟩, ⟨2, 7, [], [], [], 2, 8⟩, ⟨2, 7, [], [], [6, 5], 1, 6⟩, ⟨3, 4, [], [], [], 2, 8⟩, ⟨3, 4, [[5, 6, 7]], [], [], 1, 5⟩, ⟨3, 5, [], [], [], 2, 8⟩] + +private def k9t7p1_templates_block_3 : List (TemplateData (Fin 8)) := [⟨3, 5, [], [], [6, 7], 1, 6⟩, ⟨3, 6, [], [], [5], 1, 7⟩, ⟨3, 7, [], [], [], 2, 8⟩, ⟨3, 7, [], [], [6, 5], 1, 6⟩] + +def k9t7p1 : LayoutCertificate 8 where + chains := [[0], [1], [2], [3], [4], [5, 6, 7]] + clique := {0, 1, 2, 3, 4, 5, 7} + templates := k9t7p1_templates_block_0 ++ k9t7p1_templates_block_1 ++ k9t7p1_templates_block_2 ++ k9t7p1_templates_block_3 + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3), (3, 3)}⟩ + + +private def k9t7p1_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t7p1_template_matrix_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 2 8], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 2 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t7p1_template_matrix_0_eq_row_0 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_0) 0 j = k9t7p1_template_matrix_0 0 j := by decide + +private theorem k9t7p1_template_matrix_0_eq_row_1 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_0) 1 j = k9t7p1_template_matrix_0 1 j := by decide + +private theorem k9t7p1_template_matrix_0_eq_row_2 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_0) 2 j = k9t7p1_template_matrix_0 2 j := by decide + +private theorem k9t7p1_template_matrix_0_eq_row_3 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_0) 3 j = k9t7p1_template_matrix_0 3 j := by decide + +private theorem k9t7p1_template_matrix_0_eq_row_4 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_0) 4 j = k9t7p1_template_matrix_0 4 j := by decide + +private theorem k9t7p1_template_matrix_0_eq_row_5 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_0) 5 j = k9t7p1_template_matrix_0 5 j := by decide + +private theorem k9t7p1_template_matrix_0_eq_row_6 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_0) 6 j = k9t7p1_template_matrix_0 6 j := by decide + +private theorem k9t7p1_template_matrix_0_eq_row_7 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_0) 7 j = k9t7p1_template_matrix_0 7 j := by decide + +private theorem k9t7p1_template_matrix_0_eq : (templateMatrix k9t7p1_templates_block_0) = k9t7p1_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t7p1_template_matrix_0_eq_row_0 j + + · exact k9t7p1_template_matrix_0_eq_row_1 j + + · exact k9t7p1_template_matrix_0_eq_row_2 j + + · exact k9t7p1_template_matrix_0_eq_row_3 j + + · exact k9t7p1_template_matrix_0_eq_row_4 j + + · exact k9t7p1_template_matrix_0_eq_row_5 j + + · exact k9t7p1_template_matrix_0_eq_row_6 j + + · exact k9t7p1_template_matrix_0_eq_row_7 j + +private def k9t7p1_template_matrix_1 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6], + #[∅, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t7p1_template_matrix_1_eq_row_0 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_1) 0 j = k9t7p1_template_matrix_1 0 j := by decide + +private theorem k9t7p1_template_matrix_1_eq_row_1 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_1) 1 j = k9t7p1_template_matrix_1 1 j := by decide + +private theorem k9t7p1_template_matrix_1_eq_row_2 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_1) 2 j = k9t7p1_template_matrix_1 2 j := by decide + +private theorem k9t7p1_template_matrix_1_eq_row_3 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_1) 3 j = k9t7p1_template_matrix_1 3 j := by decide + +private theorem k9t7p1_template_matrix_1_eq_row_4 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_1) 4 j = k9t7p1_template_matrix_1 4 j := by decide + +private theorem k9t7p1_template_matrix_1_eq_row_5 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_1) 5 j = k9t7p1_template_matrix_1 5 j := by decide + +private theorem k9t7p1_template_matrix_1_eq_row_6 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_1) 6 j = k9t7p1_template_matrix_1 6 j := by decide + +private theorem k9t7p1_template_matrix_1_eq_row_7 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_1) 7 j = k9t7p1_template_matrix_1 7 j := by decide + +private theorem k9t7p1_template_matrix_1_eq : (templateMatrix k9t7p1_templates_block_1) = k9t7p1_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t7p1_template_matrix_1_eq_row_0 j + + · exact k9t7p1_template_matrix_1_eq_row_1 j + + · exact k9t7p1_template_matrix_1_eq_row_2 j + + · exact k9t7p1_template_matrix_1_eq_row_3 j + + · exact k9t7p1_template_matrix_1_eq_row_4 j + + · exact k9t7p1_template_matrix_1_eq_row_5 j + + · exact k9t7p1_template_matrix_1_eq_row_6 j + + · exact k9t7p1_template_matrix_1_eq_row_7 j + +private def k9t7p1_template_matrix_2 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[∅, ∅, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 2 8, ∅, ∅], + #[∅, ∅, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 8, Finset.Icc 2 8, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t7p1_template_matrix_2_eq_row_0 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_2) 0 j = k9t7p1_template_matrix_2 0 j := by decide + +private theorem k9t7p1_template_matrix_2_eq_row_1 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_2) 1 j = k9t7p1_template_matrix_2 1 j := by decide + +private theorem k9t7p1_template_matrix_2_eq_row_2 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_2) 2 j = k9t7p1_template_matrix_2 2 j := by decide + +private theorem k9t7p1_template_matrix_2_eq_row_3 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_2) 3 j = k9t7p1_template_matrix_2 3 j := by decide + +private theorem k9t7p1_template_matrix_2_eq_row_4 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_2) 4 j = k9t7p1_template_matrix_2 4 j := by decide + +private theorem k9t7p1_template_matrix_2_eq_row_5 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_2) 5 j = k9t7p1_template_matrix_2 5 j := by decide + +private theorem k9t7p1_template_matrix_2_eq_row_6 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_2) 6 j = k9t7p1_template_matrix_2 6 j := by decide + +private theorem k9t7p1_template_matrix_2_eq_row_7 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_2) 7 j = k9t7p1_template_matrix_2 7 j := by decide + +private theorem k9t7p1_template_matrix_2_eq : (templateMatrix k9t7p1_templates_block_2) = k9t7p1_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t7p1_template_matrix_2_eq_row_0 j + + · exact k9t7p1_template_matrix_2_eq_row_1 j + + · exact k9t7p1_template_matrix_2_eq_row_2 j + + · exact k9t7p1_template_matrix_2_eq_row_3 j + + · exact k9t7p1_template_matrix_2_eq_row_4 j + + · exact k9t7p1_template_matrix_2_eq_row_5 j + + · exact k9t7p1_template_matrix_2_eq_row_6 j + + · exact k9t7p1_template_matrix_2_eq_row_7 j + +private def k9t7p1_template_matrix_3 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 8], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t7p1_template_matrix_3_eq_row_0 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_3) 0 j = k9t7p1_template_matrix_3 0 j := by decide + +private theorem k9t7p1_template_matrix_3_eq_row_1 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_3) 1 j = k9t7p1_template_matrix_3 1 j := by decide + +private theorem k9t7p1_template_matrix_3_eq_row_2 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_3) 2 j = k9t7p1_template_matrix_3 2 j := by decide + +private theorem k9t7p1_template_matrix_3_eq_row_3 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_3) 3 j = k9t7p1_template_matrix_3 3 j := by decide + +private theorem k9t7p1_template_matrix_3_eq_row_4 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_3) 4 j = k9t7p1_template_matrix_3 4 j := by decide + +private theorem k9t7p1_template_matrix_3_eq_row_5 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_3) 5 j = k9t7p1_template_matrix_3 5 j := by decide + +private theorem k9t7p1_template_matrix_3_eq_row_6 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_3) 6 j = k9t7p1_template_matrix_3 6 j := by decide + +private theorem k9t7p1_template_matrix_3_eq_row_7 : ∀ j : Fin 8, (templateMatrix k9t7p1_templates_block_3) 7 j = k9t7p1_template_matrix_3 7 j := by decide + +private theorem k9t7p1_template_matrix_3_eq : (templateMatrix k9t7p1_templates_block_3) = k9t7p1_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t7p1_template_matrix_3_eq_row_0 j + + · exact k9t7p1_template_matrix_3_eq_row_1 j + + · exact k9t7p1_template_matrix_3_eq_row_2 j + + · exact k9t7p1_template_matrix_3_eq_row_3 j + + · exact k9t7p1_template_matrix_3_eq_row_4 j + + · exact k9t7p1_template_matrix_3_eq_row_5 j + + · exact k9t7p1_template_matrix_3_eq_row_6 j + + · exact k9t7p1_template_matrix_3_eq_row_7 j + +private theorem k9t7p1_initial_merged_eq_row_0 : ∀ j : Fin 8, (fun i j => (((k9t7p1_template_matrix_0 i j ∪ k9t7p1_template_matrix_1 i j) ∪ k9t7p1_template_matrix_2 i j) ∪ k9t7p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p1.required i j) 0 j = k9t7p1_state_0 0 j := by decide + +private theorem k9t7p1_initial_merged_eq_row_1 : ∀ j : Fin 8, (fun i j => (((k9t7p1_template_matrix_0 i j ∪ k9t7p1_template_matrix_1 i j) ∪ k9t7p1_template_matrix_2 i j) ∪ k9t7p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p1.required i j) 1 j = k9t7p1_state_0 1 j := by decide + +private theorem k9t7p1_initial_merged_eq_row_2 : ∀ j : Fin 8, (fun i j => (((k9t7p1_template_matrix_0 i j ∪ k9t7p1_template_matrix_1 i j) ∪ k9t7p1_template_matrix_2 i j) ∪ k9t7p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p1.required i j) 2 j = k9t7p1_state_0 2 j := by decide + +private theorem k9t7p1_initial_merged_eq_row_3 : ∀ j : Fin 8, (fun i j => (((k9t7p1_template_matrix_0 i j ∪ k9t7p1_template_matrix_1 i j) ∪ k9t7p1_template_matrix_2 i j) ∪ k9t7p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p1.required i j) 3 j = k9t7p1_state_0 3 j := by decide + +private theorem k9t7p1_initial_merged_eq_row_4 : ∀ j : Fin 8, (fun i j => (((k9t7p1_template_matrix_0 i j ∪ k9t7p1_template_matrix_1 i j) ∪ k9t7p1_template_matrix_2 i j) ∪ k9t7p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p1.required i j) 4 j = k9t7p1_state_0 4 j := by decide + +private theorem k9t7p1_initial_merged_eq_row_5 : ∀ j : Fin 8, (fun i j => (((k9t7p1_template_matrix_0 i j ∪ k9t7p1_template_matrix_1 i j) ∪ k9t7p1_template_matrix_2 i j) ∪ k9t7p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p1.required i j) 5 j = k9t7p1_state_0 5 j := by decide + +private theorem k9t7p1_initial_merged_eq_row_6 : ∀ j : Fin 8, (fun i j => (((k9t7p1_template_matrix_0 i j ∪ k9t7p1_template_matrix_1 i j) ∪ k9t7p1_template_matrix_2 i j) ∪ k9t7p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p1.required i j) 6 j = k9t7p1_state_0 6 j := by decide + +private theorem k9t7p1_initial_merged_eq_row_7 : ∀ j : Fin 8, (fun i j => (((k9t7p1_template_matrix_0 i j ∪ k9t7p1_template_matrix_1 i j) ∪ k9t7p1_template_matrix_2 i j) ∪ k9t7p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p1.required i j) 7 j = k9t7p1_state_0 7 j := by decide + +private theorem k9t7p1_initial_merged_eq : (fun i j => (((k9t7p1_template_matrix_0 i j ∪ k9t7p1_template_matrix_1 i j) ∪ k9t7p1_template_matrix_2 i j) ∪ k9t7p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p1.required i j) = k9t7p1_state_0 := by + funext i j + fin_cases i + + · exact k9t7p1_initial_merged_eq_row_0 j + + · exact k9t7p1_initial_merged_eq_row_1 j + + · exact k9t7p1_initial_merged_eq_row_2 j + + · exact k9t7p1_initial_merged_eq_row_3 j + + · exact k9t7p1_initial_merged_eq_row_4 j + + · exact k9t7p1_initial_merged_eq_row_5 j + + · exact k9t7p1_initial_merged_eq_row_6 j + + · exact k9t7p1_initial_merged_eq_row_7 j + +private theorem k9t7p1_initial_eq : k9t7p1.initialMatrix 9 = k9t7p1_state_0 := by + funext i j + change templateMatrix (k9t7p1_templates_block_0 ++ k9t7p1_templates_block_1 ++ k9t7p1_templates_block_2 ++ k9t7p1_templates_block_3) i j ∪ requiredMatrix 9 k9t7p1.required i j = _ + simp only [templateMatrix_append, k9t7p1_template_matrix_0_eq, k9t7p1_template_matrix_1_eq, k9t7p1_template_matrix_2_eq, k9t7p1_template_matrix_3_eq] + exact congrFun (congrFun k9t7p1_initial_merged_eq i) j + +private theorem k9t7p1_closure_0 : ClosureCheck k9t7p1.graph k9t7p1_state_0 9 7 [] := by trivial + +private theorem k9t7p1_matrix_eq : k9t7p1.matrix 9 = k9t7p1_state_0 := by + change closureMatrix (k9t7p1.initialMatrix 9) _ = _ + rw [k9t7p1_initial_eq] + change closureMatrix k9t7p1_state_0 [] = _ + rfl + +private theorem k9t7p1_part_0 : k9t7p1.chains.flatten = List.finRange _ := by decide + +private theorem k9t7p1_part_1 : k9t7p1.chains.map List.length = ([[], [], [], [], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t7p1_part_2 : k9t7p1.chains.map (fun l => l.map (fun i => decide (i ∈ k9t7p1.clique))) = ([[], [], [], [], [], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t7p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_1 : (⟨0, 1, [[5, 6, 7]], [], [], 1, 5⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_2 : (⟨0, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_3 : (⟨0, 2, [[5, 6, 7]], [], [], 1, 5⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_4 : (⟨0, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_5 : (⟨0, 3, [[5, 6, 7]], [], [], 1, 5⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_6 : (⟨0, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_7 : (⟨0, 4, [[5, 6, 7]], [], [], 1, 5⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_8 : (⟨0, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_9 : (⟨0, 5, [], [], [6, 7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_10 : (⟨0, 6, [], [], [5], 1, 7⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_11 : (⟨0, 7, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_12 : (⟨0, 7, [], [], [6, 5], 1, 6⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_13 : (⟨1, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_14 : (⟨1, 2, [[5, 6, 7]], [], [], 1, 5⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_15 : (⟨1, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_16 : (⟨1, 3, [[5, 6, 7]], [], [], 1, 5⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_17 : (⟨1, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_18 : (⟨1, 4, [[5, 6, 7]], [], [], 1, 5⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_19 : (⟨1, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_20 : (⟨1, 5, [], [], [6, 7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_21 : (⟨1, 6, [], [], [5], 1, 7⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_22 : (⟨1, 7, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_23 : (⟨1, 7, [], [], [6, 5], 1, 6⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_24 : (⟨2, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_25 : (⟨2, 3, [[5, 6, 7]], [], [], 1, 5⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_26 : (⟨2, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_27 : (⟨2, 4, [[5, 6, 7]], [], [], 1, 5⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_28 : (⟨2, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_29 : (⟨2, 5, [], [], [6, 7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_30 : (⟨2, 6, [], [], [5], 1, 7⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_31 : (⟨2, 7, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_32 : (⟨2, 7, [], [], [6, 5], 1, 6⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_33 : (⟨3, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_34 : (⟨3, 4, [[5, 6, 7]], [], [], 1, 5⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_35 : (⟨3, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_36 : (⟨3, 5, [], [], [6, 7], 1, 6⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_37 : (⟨3, 6, [], [], [5], 1, 7⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_38 : (⟨3, 7, [], [], [], 2, 8⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_item_39 : (⟨3, 7, [], [], [6, 5], 1, 6⟩ : TemplateData (Fin 8)).Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p1_templates_block_0_check : ∀ T ∈ k9t7p1_templates_block_0, T.Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t7p1_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t7p1_templates_item_0, k9t7p1_templates_item_1, k9t7p1_templates_item_2, k9t7p1_templates_item_3, k9t7p1_templates_item_4, k9t7p1_templates_item_5, k9t7p1_templates_item_6, k9t7p1_templates_item_7, k9t7p1_templates_item_8, k9t7p1_templates_item_9, k9t7p1_templates_item_10, k9t7p1_templates_item_11⟩ + +private theorem k9t7p1_templates_block_1_check : ∀ T ∈ k9t7p1_templates_block_1, T.Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t7p1_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t7p1_templates_item_12, k9t7p1_templates_item_13, k9t7p1_templates_item_14, k9t7p1_templates_item_15, k9t7p1_templates_item_16, k9t7p1_templates_item_17, k9t7p1_templates_item_18, k9t7p1_templates_item_19, k9t7p1_templates_item_20, k9t7p1_templates_item_21, k9t7p1_templates_item_22, k9t7p1_templates_item_23⟩ + +private theorem k9t7p1_templates_block_2_check : ∀ T ∈ k9t7p1_templates_block_2, T.Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t7p1_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t7p1_templates_item_24, k9t7p1_templates_item_25, k9t7p1_templates_item_26, k9t7p1_templates_item_27, k9t7p1_templates_item_28, k9t7p1_templates_item_29, k9t7p1_templates_item_30, k9t7p1_templates_item_31, k9t7p1_templates_item_32, k9t7p1_templates_item_33, k9t7p1_templates_item_34, k9t7p1_templates_item_35⟩ + +private theorem k9t7p1_templates_block_3_check : ∀ T ∈ k9t7p1_templates_block_3, T.Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t7p1_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t7p1_templates_item_36, k9t7p1_templates_item_37, k9t7p1_templates_item_38, k9t7p1_templates_item_39⟩ + +private theorem k9t7p1_part_3 : ∀ T ∈ k9t7p1.templates, T.Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t7p1_templates_block_0 ++ k9t7p1_templates_block_1 ++ k9t7p1_templates_block_2 ++ k9t7p1_templates_block_3), T.Check k9t7p1.graph k9t7p1.clique 9 (patternAmount ([[], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t7p1_templates_block_0_check, k9t7p1_templates_block_1_check⟩, k9t7p1_templates_block_2_check⟩, k9t7p1_templates_block_3_check⟩ + +private theorem k9t7p1_part_4 : ∀ p ∈ k9t7p1.required, p.Check k9t7p1.graph 9 := by decide + +private theorem k9t7p1_part_5 : ClosureCheck k9t7p1.graph (k9t7p1.initialMatrix 9) 9 7 k9t7p1.closure := by + rw [k9t7p1_initial_eq] + exact k9t7p1_closure_0 + +private theorem k9t7p1_part_6 : k9t7p1.bad.Check k9t7p1.graph (k9t7p1.matrix 9) 9 7 := by + rw [k9t7p1_matrix_eq] + decide + +theorem k9t7p1_check : k9t7p1.Check 9 7 [[], [], [], [], [], [1]] := + ⟨k9t7p1_part_0, k9t7p1_part_1, k9t7p1_part_2, k9t7p1_part_3, k9t7p1_part_4, k9t7p1_part_5, k9t7p1_part_6⟩ +def k9t7p2 : LayoutCertificate 9 where + chains := [[0], [1], [2], [3], [4], [5, 6, 7, 8]] + clique := {0, 1, 2, 3, 4, 5, 8} + templates := [⟨0, 1, [], [], [], 3, 8⟩, + ⟨0, 1, [[5, 6, 7, 8]], [], [], 1, 4⟩, + ⟨0, 2, [], [], [], 3, 8⟩, + ⟨0, 2, [[5, 6, 7, 8]], [], [], 1, 4⟩, + ⟨0, 3, [], [], [], 3, 8⟩, + ⟨0, 3, [[5, 6, 7, 8]], [], [], 1, 4⟩, + ⟨0, 4, [[5, 6, 7, 8]], [], [], 1, 4⟩, + ⟨0, 5, [], [], [6, 7, 8], 1, 5⟩, + ⟨0, 6, [], [], [5], 2, 7⟩, + ⟨0, 6, [], [], [7, 8], 1, 6⟩, + ⟨0, 7, [], [], [6, 5], 1, 6⟩, + ⟨0, 8, [], [], [7, 6, 5], 1, 5⟩, + ⟨1, 2, [], [], [], 3, 8⟩, + ⟨1, 2, [[5, 6, 7, 8]], [], [], 1, 4⟩, + ⟨1, 3, [], [], [], 3, 8⟩, + ⟨1, 3, [[5, 6, 7, 8]], [], [], 1, 4⟩, + ⟨1, 4, [[5, 6, 7, 8]], [], [], 1, 4⟩, + ⟨1, 5, [], [], [6, 7, 8], 1, 5⟩, + ⟨1, 6, [], [], [5], 2, 7⟩, + ⟨1, 6, [], [], [7, 8], 1, 6⟩, + ⟨1, 7, [], [], [6, 5], 1, 6⟩, + ⟨1, 8, [], [], [7, 6, 5], 1, 5⟩, + ⟨2, 3, [], [], [], 3, 8⟩, + ⟨2, 3, [[5, 6, 7, 8]], [], [], 1, 4⟩, + ⟨2, 4, [[5, 6, 7, 8]], [], [], 1, 4⟩, + ⟨2, 5, [], [], [6, 7, 8], 1, 5⟩, + ⟨2, 6, [], [], [5], 2, 7⟩, + ⟨2, 6, [], [], [7, 8], 1, 6⟩, + ⟨2, 7, [], [], [6, 5], 1, 6⟩, + ⟨2, 8, [], [], [7, 6, 5], 1, 5⟩, + ⟨3, 4, [[5, 6, 7, 8]], [], [], 1, 4⟩, + ⟨3, 5, [], [], [6, 7, 8], 1, 5⟩, + ⟨3, 6, [], [], [5], 2, 7⟩, + ⟨3, 6, [], [], [7, 8], 1, 6⟩, + ⟨3, 7, [], [], [6, 5], 1, 6⟩, + ⟨3, 8, [], [], [7, 6, 5], 1, 5⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3), (3, 3)}⟩ + + +private def k9t7p2_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 4, Finset.Icc 1 5, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 5], + #[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, Finset.Icc 1 6, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, Finset.Icc 1 5, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t7p2_initial_eq_row_0 : ∀ j : Fin 9, (k9t7p2.initialMatrix 9) 0 j = k9t7p2_state_0 0 j := by decide + +private theorem k9t7p2_initial_eq_row_1 : ∀ j : Fin 9, (k9t7p2.initialMatrix 9) 1 j = k9t7p2_state_0 1 j := by decide + +private theorem k9t7p2_initial_eq_row_2 : ∀ j : Fin 9, (k9t7p2.initialMatrix 9) 2 j = k9t7p2_state_0 2 j := by decide + +private theorem k9t7p2_initial_eq_row_3 : ∀ j : Fin 9, (k9t7p2.initialMatrix 9) 3 j = k9t7p2_state_0 3 j := by decide + +private theorem k9t7p2_initial_eq_row_4 : ∀ j : Fin 9, (k9t7p2.initialMatrix 9) 4 j = k9t7p2_state_0 4 j := by decide + +private theorem k9t7p2_initial_eq_row_5 : ∀ j : Fin 9, (k9t7p2.initialMatrix 9) 5 j = k9t7p2_state_0 5 j := by decide + +private theorem k9t7p2_initial_eq_row_6 : ∀ j : Fin 9, (k9t7p2.initialMatrix 9) 6 j = k9t7p2_state_0 6 j := by decide + +private theorem k9t7p2_initial_eq_row_7 : ∀ j : Fin 9, (k9t7p2.initialMatrix 9) 7 j = k9t7p2_state_0 7 j := by decide + +private theorem k9t7p2_initial_eq_row_8 : ∀ j : Fin 9, (k9t7p2.initialMatrix 9) 8 j = k9t7p2_state_0 8 j := by decide + +private theorem k9t7p2_initial_eq : (k9t7p2.initialMatrix 9) = k9t7p2_state_0 := by + funext i j + fin_cases i + + · exact k9t7p2_initial_eq_row_0 j + + · exact k9t7p2_initial_eq_row_1 j + + · exact k9t7p2_initial_eq_row_2 j + + · exact k9t7p2_initial_eq_row_3 j + + · exact k9t7p2_initial_eq_row_4 j + + · exact k9t7p2_initial_eq_row_5 j + + · exact k9t7p2_initial_eq_row_6 j + + · exact k9t7p2_initial_eq_row_7 j + + · exact k9t7p2_initial_eq_row_8 j + +private theorem k9t7p2_closure_0 : ClosureCheck k9t7p2.graph k9t7p2_state_0 9 7 [] := by trivial + +private theorem k9t7p2_matrix_eq : k9t7p2.matrix 9 = k9t7p2_state_0 := by + change closureMatrix (k9t7p2.initialMatrix 9) _ = _ + rw [k9t7p2_initial_eq] + change closureMatrix k9t7p2_state_0 [] = _ + rfl + +private theorem k9t7p2_part_0 : k9t7p2.chains.flatten = List.finRange _ := by decide + +private theorem k9t7p2_part_1 : k9t7p2.chains.map List.length = ([[], [], [], [], [], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t7p2_part_2 : k9t7p2.chains.map (fun l => l.map (fun i => decide (i ∈ k9t7p2.clique))) = ([[], [], [], [], [], [2]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t7p2_templates_item_0 : (⟨0, 1, [], [], [], 3, 8⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_1 : (⟨0, 1, [[5, 6, 7, 8]], [], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_2 : (⟨0, 2, [], [], [], 3, 8⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_3 : (⟨0, 2, [[5, 6, 7, 8]], [], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_4 : (⟨0, 3, [], [], [], 3, 8⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_5 : (⟨0, 3, [[5, 6, 7, 8]], [], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_6 : (⟨0, 4, [[5, 6, 7, 8]], [], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_7 : (⟨0, 5, [], [], [6, 7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_8 : (⟨0, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_9 : (⟨0, 6, [], [], [7, 8], 1, 6⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_10 : (⟨0, 7, [], [], [6, 5], 1, 6⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_11 : (⟨0, 8, [], [], [7, 6, 5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_12 : (⟨1, 2, [], [], [], 3, 8⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_13 : (⟨1, 2, [[5, 6, 7, 8]], [], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_14 : (⟨1, 3, [], [], [], 3, 8⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_15 : (⟨1, 3, [[5, 6, 7, 8]], [], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_16 : (⟨1, 4, [[5, 6, 7, 8]], [], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_17 : (⟨1, 5, [], [], [6, 7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_18 : (⟨1, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_19 : (⟨1, 6, [], [], [7, 8], 1, 6⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_20 : (⟨1, 7, [], [], [6, 5], 1, 6⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_21 : (⟨1, 8, [], [], [7, 6, 5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_22 : (⟨2, 3, [], [], [], 3, 8⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_23 : (⟨2, 3, [[5, 6, 7, 8]], [], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_24 : (⟨2, 4, [[5, 6, 7, 8]], [], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_25 : (⟨2, 5, [], [], [6, 7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_26 : (⟨2, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_27 : (⟨2, 6, [], [], [7, 8], 1, 6⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_28 : (⟨2, 7, [], [], [6, 5], 1, 6⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_29 : (⟨2, 8, [], [], [7, 6, 5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_30 : (⟨3, 4, [[5, 6, 7, 8]], [], [], 1, 4⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_31 : (⟨3, 5, [], [], [6, 7, 8], 1, 5⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_32 : (⟨3, 6, [], [], [5], 2, 7⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_33 : (⟨3, 6, [], [], [7, 8], 1, 6⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_34 : (⟨3, 7, [], [], [6, 5], 1, 6⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_templates_item_35 : (⟨3, 8, [], [], [7, 6, 5], 1, 5⟩ : TemplateData (Fin 9)).Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p2_part_3 : ∀ T ∈ k9t7p2.templates, T.Check k9t7p2.graph k9t7p2.clique 9 (patternAmount ([[], [], [], [], [], [2]] : List (List ℕ))) (([[], [], [], [], [], [2]] : List (List ℕ)).map List.length).sum := by + simp only [k9t7p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t7p2_templates_item_0, k9t7p2_templates_item_1, k9t7p2_templates_item_2, k9t7p2_templates_item_3, k9t7p2_templates_item_4, k9t7p2_templates_item_5, k9t7p2_templates_item_6, k9t7p2_templates_item_7, k9t7p2_templates_item_8, k9t7p2_templates_item_9, k9t7p2_templates_item_10, k9t7p2_templates_item_11, k9t7p2_templates_item_12, k9t7p2_templates_item_13, k9t7p2_templates_item_14, k9t7p2_templates_item_15, k9t7p2_templates_item_16, k9t7p2_templates_item_17, k9t7p2_templates_item_18, k9t7p2_templates_item_19, k9t7p2_templates_item_20, k9t7p2_templates_item_21, k9t7p2_templates_item_22, k9t7p2_templates_item_23, k9t7p2_templates_item_24, k9t7p2_templates_item_25, k9t7p2_templates_item_26, k9t7p2_templates_item_27, k9t7p2_templates_item_28, k9t7p2_templates_item_29, k9t7p2_templates_item_30, k9t7p2_templates_item_31, k9t7p2_templates_item_32, k9t7p2_templates_item_33, k9t7p2_templates_item_34, k9t7p2_templates_item_35⟩ + +private theorem k9t7p2_part_4 : ∀ p ∈ k9t7p2.required, p.Check k9t7p2.graph 9 := by decide + +private theorem k9t7p2_part_5 : ClosureCheck k9t7p2.graph (k9t7p2.initialMatrix 9) 9 7 k9t7p2.closure := by + rw [k9t7p2_initial_eq] + exact k9t7p2_closure_0 + +private theorem k9t7p2_part_6 : k9t7p2.bad.Check k9t7p2.graph (k9t7p2.matrix 9) 9 7 := by + rw [k9t7p2_matrix_eq] + decide + +theorem k9t7p2_check : k9t7p2.Check 9 7 [[], [], [], [], [], [2]] := + ⟨k9t7p2_part_0, k9t7p2_part_1, k9t7p2_part_2, k9t7p2_part_3, k9t7p2_part_4, k9t7p2_part_5, k9t7p2_part_6⟩ +def k9t7p3 : LayoutCertificate 9 where + chains := [[0], [1], [2], [3], [4, 5, 6, 7, 8]] + clique := {0, 1, 2, 3, 4, 6, 8} + templates := [⟨0, 1, [], [], [], 2, 8⟩, + ⟨0, 1, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩, + ⟨0, 2, [], [], [], 2, 8⟩, + ⟨0, 2, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩, + ⟨0, 3, [], [], [], 2, 8⟩, + ⟨0, 3, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩, + ⟨0, 4, [], [], [], 2, 8⟩, + ⟨0, 4, [], [], [5, 6, 7, 8], 1, 4⟩, + ⟨0, 5, [], [], [4], 1, 7⟩, + ⟨0, 7, [], [], [6], 1, 7⟩, + ⟨0, 8, [], [], [], 2, 8⟩, + ⟨0, 8, [], [], [7, 6, 5, 4], 1, 4⟩, + ⟨1, 2, [], [], [], 2, 8⟩, + ⟨1, 2, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩, + ⟨1, 3, [], [], [], 2, 8⟩, + ⟨1, 3, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩, + ⟨1, 4, [], [], [], 2, 8⟩, + ⟨1, 4, [], [], [5, 6, 7, 8], 1, 4⟩, + ⟨1, 5, [], [], [4], 1, 7⟩, + ⟨1, 7, [], [], [6], 1, 7⟩, + ⟨1, 8, [], [], [], 2, 8⟩, + ⟨1, 8, [], [], [7, 6, 5, 4], 1, 4⟩, + ⟨2, 5, [], [], [4], 1, 7⟩, + ⟨2, 7, [], [], [6], 1, 7⟩, + ⟨3, 5, [], [], [4], 1, 7⟩, + ⟨3, 7, [], [], [6], 1, 7⟩, + ⟨4, 5, [], [], [6], 1, 7⟩, + ⟨4, 7, [], [], [6], 1, 7⟩, + ⟨5, 6, [], [4], [], 1, 7⟩, + ⟨5, 7, [], [4], [6], 1, 6⟩, + ⟨5, 8, [], [4], [], 1, 7⟩, + ⟨6, 7, [], [], [8], 1, 7⟩, + ⟨7, 8, [], [6], [], 1, 7⟩] + required := [] + closure := [] + bad := ⟨none, {(5, 3), (7, 3), (0, 3), (1, 3)}⟩ + + +private def k9t7p3_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7, ∅, Finset.Icc 1 7], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t7p3_initial_eq_row_0 : ∀ j : Fin 9, (k9t7p3.initialMatrix 9) 0 j = k9t7p3_state_0 0 j := by decide + +private theorem k9t7p3_initial_eq_row_1 : ∀ j : Fin 9, (k9t7p3.initialMatrix 9) 1 j = k9t7p3_state_0 1 j := by decide + +private theorem k9t7p3_initial_eq_row_2 : ∀ j : Fin 9, (k9t7p3.initialMatrix 9) 2 j = k9t7p3_state_0 2 j := by decide + +private theorem k9t7p3_initial_eq_row_3 : ∀ j : Fin 9, (k9t7p3.initialMatrix 9) 3 j = k9t7p3_state_0 3 j := by decide + +private theorem k9t7p3_initial_eq_row_4 : ∀ j : Fin 9, (k9t7p3.initialMatrix 9) 4 j = k9t7p3_state_0 4 j := by decide + +private theorem k9t7p3_initial_eq_row_5 : ∀ j : Fin 9, (k9t7p3.initialMatrix 9) 5 j = k9t7p3_state_0 5 j := by decide + +private theorem k9t7p3_initial_eq_row_6 : ∀ j : Fin 9, (k9t7p3.initialMatrix 9) 6 j = k9t7p3_state_0 6 j := by decide + +private theorem k9t7p3_initial_eq_row_7 : ∀ j : Fin 9, (k9t7p3.initialMatrix 9) 7 j = k9t7p3_state_0 7 j := by decide + +private theorem k9t7p3_initial_eq_row_8 : ∀ j : Fin 9, (k9t7p3.initialMatrix 9) 8 j = k9t7p3_state_0 8 j := by decide + +private theorem k9t7p3_initial_eq : (k9t7p3.initialMatrix 9) = k9t7p3_state_0 := by + funext i j + fin_cases i + + · exact k9t7p3_initial_eq_row_0 j + + · exact k9t7p3_initial_eq_row_1 j + + · exact k9t7p3_initial_eq_row_2 j + + · exact k9t7p3_initial_eq_row_3 j + + · exact k9t7p3_initial_eq_row_4 j + + · exact k9t7p3_initial_eq_row_5 j + + · exact k9t7p3_initial_eq_row_6 j + + · exact k9t7p3_initial_eq_row_7 j + + · exact k9t7p3_initial_eq_row_8 j + +private theorem k9t7p3_closure_0 : ClosureCheck k9t7p3.graph k9t7p3_state_0 9 7 [] := by trivial + +private theorem k9t7p3_matrix_eq : k9t7p3.matrix 9 = k9t7p3_state_0 := by + change closureMatrix (k9t7p3.initialMatrix 9) _ = _ + rw [k9t7p3_initial_eq] + change closureMatrix k9t7p3_state_0 [] = _ + rfl + +private theorem k9t7p3_part_0 : k9t7p3.chains.flatten = List.finRange _ := by decide + +private theorem k9t7p3_part_1 : k9t7p3.chains.map List.length = ([[], [], [], [], [1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t7p3_part_2 : k9t7p3.chains.map (fun l => l.map (fun i => decide (i ∈ k9t7p3.clique))) = ([[], [], [], [], [1, 1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t7p3_templates_item_0 : (⟨0, 1, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_1 : (⟨0, 1, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_2 : (⟨0, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_3 : (⟨0, 2, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_4 : (⟨0, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_5 : (⟨0, 3, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_6 : (⟨0, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_7 : (⟨0, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_8 : (⟨0, 5, [], [], [4], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_9 : (⟨0, 7, [], [], [6], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_10 : (⟨0, 8, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_11 : (⟨0, 8, [], [], [7, 6, 5, 4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_12 : (⟨1, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_13 : (⟨1, 2, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_14 : (⟨1, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_15 : (⟨1, 3, [[4, 5, 6, 7, 8]], [], [], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_16 : (⟨1, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_17 : (⟨1, 4, [], [], [5, 6, 7, 8], 1, 4⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_18 : (⟨1, 5, [], [], [4], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_19 : (⟨1, 7, [], [], [6], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_20 : (⟨1, 8, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_21 : (⟨1, 8, [], [], [7, 6, 5, 4], 1, 4⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_22 : (⟨2, 5, [], [], [4], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_23 : (⟨2, 7, [], [], [6], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_24 : (⟨3, 5, [], [], [4], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_25 : (⟨3, 7, [], [], [6], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_26 : (⟨4, 5, [], [], [6], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_27 : (⟨4, 7, [], [], [6], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_28 : (⟨5, 6, [], [4], [], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_29 : (⟨5, 7, [], [4], [6], 1, 6⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_30 : (⟨5, 8, [], [4], [], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_31 : (⟨6, 7, [], [], [8], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_templates_item_32 : (⟨7, 8, [], [6], [], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p3_part_3 : ∀ T ∈ k9t7p3.templates, T.Check k9t7p3.graph k9t7p3.clique 9 (patternAmount ([[], [], [], [], [1, 1]] : List (List ℕ))) (([[], [], [], [], [1, 1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t7p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t7p3_templates_item_0, k9t7p3_templates_item_1, k9t7p3_templates_item_2, k9t7p3_templates_item_3, k9t7p3_templates_item_4, k9t7p3_templates_item_5, k9t7p3_templates_item_6, k9t7p3_templates_item_7, k9t7p3_templates_item_8, k9t7p3_templates_item_9, k9t7p3_templates_item_10, k9t7p3_templates_item_11, k9t7p3_templates_item_12, k9t7p3_templates_item_13, k9t7p3_templates_item_14, k9t7p3_templates_item_15, k9t7p3_templates_item_16, k9t7p3_templates_item_17, k9t7p3_templates_item_18, k9t7p3_templates_item_19, k9t7p3_templates_item_20, k9t7p3_templates_item_21, k9t7p3_templates_item_22, k9t7p3_templates_item_23, k9t7p3_templates_item_24, k9t7p3_templates_item_25, k9t7p3_templates_item_26, k9t7p3_templates_item_27, k9t7p3_templates_item_28, k9t7p3_templates_item_29, k9t7p3_templates_item_30, k9t7p3_templates_item_31, k9t7p3_templates_item_32⟩ + +private theorem k9t7p3_part_4 : ∀ p ∈ k9t7p3.required, p.Check k9t7p3.graph 9 := by decide + +private theorem k9t7p3_part_5 : ClosureCheck k9t7p3.graph (k9t7p3.initialMatrix 9) 9 7 k9t7p3.closure := by + rw [k9t7p3_initial_eq] + exact k9t7p3_closure_0 + +private theorem k9t7p3_part_6 : k9t7p3.bad.Check k9t7p3.graph (k9t7p3.matrix 9) 9 7 := by + rw [k9t7p3_matrix_eq] + decide + +theorem k9t7p3_check : k9t7p3.Check 9 7 [[], [], [], [], [1, 1]] := + ⟨k9t7p3_part_0, k9t7p3_part_1, k9t7p3_part_2, k9t7p3_part_3, k9t7p3_part_4, k9t7p3_part_5, k9t7p3_part_6⟩ +private def k9t7p4_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [], [], [], 2, 8⟩, ⟨0, 1, [[3, 4, 5], [6, 7, 8]], [], [], 1, 2⟩, ⟨0, 2, [], [], [], 2, 8⟩, ⟨0, 2, [[3, 4, 5], [6, 7, 8]], [], [], 1, 2⟩, ⟨0, 3, [], [], [], 2, 8⟩, ⟨0, 3, [[6, 7, 8]], [], [4, 5], 1, 3⟩, ⟨0, 4, [], [], [3], 1, 7⟩, ⟨0, 5, [], [], [], 2, 8⟩, ⟨0, 5, [[6, 7, 8]], [], [4, 3], 1, 3⟩, ⟨0, 6, [], [], [], 2, 8⟩, ⟨0, 6, [[3, 4, 5]], [], [7, 8], 1, 3⟩, ⟨0, 7, [], [], [6], 1, 7⟩] + +private def k9t7p4_templates_block_1 : List (TemplateData (Fin 9)) := [⟨0, 8, [], [], [], 2, 8⟩, ⟨0, 8, [[3, 4, 5]], [], [7, 6], 1, 3⟩, ⟨1, 2, [], [], [], 2, 8⟩, ⟨1, 2, [[3, 4, 5], [6, 7, 8]], [], [], 1, 2⟩, ⟨1, 3, [], [], [], 2, 8⟩, ⟨1, 3, [[6, 7, 8]], [], [4, 5], 1, 3⟩, ⟨1, 4, [], [], [3], 1, 7⟩, ⟨1, 5, [], [], [], 2, 8⟩, ⟨1, 5, [[6, 7, 8]], [], [4, 3], 1, 3⟩, ⟨1, 6, [], [], [], 2, 8⟩, ⟨1, 6, [[3, 4, 5]], [], [7, 8], 1, 3⟩, ⟨1, 7, [], [], [6], 1, 7⟩] + +private def k9t7p4_templates_block_2 : List (TemplateData (Fin 9)) := [⟨1, 8, [], [], [], 2, 8⟩, ⟨1, 8, [[3, 4, 5]], [], [7, 6], 1, 3⟩, ⟨2, 3, [], [], [], 2, 8⟩, ⟨2, 3, [[6, 7, 8]], [], [4, 5], 1, 3⟩, ⟨2, 4, [], [], [3], 1, 7⟩, ⟨2, 5, [], [], [], 2, 8⟩, ⟨2, 5, [[6, 7, 8]], [], [4, 3], 1, 3⟩, ⟨2, 6, [], [], [], 2, 8⟩, ⟨2, 6, [[3, 4, 5]], [], [7, 8], 1, 3⟩, ⟨2, 7, [], [], [6], 1, 7⟩, ⟨2, 8, [], [], [], 2, 8⟩, ⟨2, 8, [[3, 4, 5]], [], [7, 6], 1, 3⟩] + +private def k9t7p4_templates_block_3 : List (TemplateData (Fin 9)) := [⟨3, 4, [], [], [5], 1, 7⟩, ⟨4, 5, [], [3], [], 1, 7⟩, ⟨4, 6, [], [3], [], 1, 7⟩, ⟨4, 7, [], [3], [6], 1, 6⟩, ⟨4, 8, [], [3], [], 1, 7⟩] + +def k9t7p4 : LayoutCertificate 9 where + chains := [[0], [1], [2], [3, 4, 5], [6, 7, 8]] + clique := {0, 1, 2, 3, 5, 6, 8} + templates := k9t7p4_templates_block_0 ++ k9t7p4_templates_block_1 ++ k9t7p4_templates_block_2 ++ k9t7p4_templates_block_3 + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3), (4, 3)}⟩ + + +private def k9t7p4_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t7p4_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t7p4_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_0) 0 j = k9t7p4_template_matrix_0 0 j := by decide + +private theorem k9t7p4_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_0) 1 j = k9t7p4_template_matrix_0 1 j := by decide + +private theorem k9t7p4_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_0) 2 j = k9t7p4_template_matrix_0 2 j := by decide + +private theorem k9t7p4_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_0) 3 j = k9t7p4_template_matrix_0 3 j := by decide + +private theorem k9t7p4_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_0) 4 j = k9t7p4_template_matrix_0 4 j := by decide + +private theorem k9t7p4_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_0) 5 j = k9t7p4_template_matrix_0 5 j := by decide + +private theorem k9t7p4_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_0) 6 j = k9t7p4_template_matrix_0 6 j := by decide + +private theorem k9t7p4_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_0) 7 j = k9t7p4_template_matrix_0 7 j := by decide + +private theorem k9t7p4_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_0) 8 j = k9t7p4_template_matrix_0 8 j := by decide + +private theorem k9t7p4_template_matrix_0_eq : (templateMatrix k9t7p4_templates_block_0) = k9t7p4_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t7p4_template_matrix_0_eq_row_0 j + + · exact k9t7p4_template_matrix_0_eq_row_1 j + + · exact k9t7p4_template_matrix_0_eq_row_2 j + + · exact k9t7p4_template_matrix_0_eq_row_3 j + + · exact k9t7p4_template_matrix_0_eq_row_4 j + + · exact k9t7p4_template_matrix_0_eq_row_5 j + + · exact k9t7p4_template_matrix_0_eq_row_6 j + + · exact k9t7p4_template_matrix_0_eq_row_7 j + + · exact k9t7p4_template_matrix_0_eq_row_8 j + +private def k9t7p4_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 8], + #[∅, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, ∅], + #[∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t7p4_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_1) 0 j = k9t7p4_template_matrix_1 0 j := by decide + +private theorem k9t7p4_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_1) 1 j = k9t7p4_template_matrix_1 1 j := by decide + +private theorem k9t7p4_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_1) 2 j = k9t7p4_template_matrix_1 2 j := by decide + +private theorem k9t7p4_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_1) 3 j = k9t7p4_template_matrix_1 3 j := by decide + +private theorem k9t7p4_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_1) 4 j = k9t7p4_template_matrix_1 4 j := by decide + +private theorem k9t7p4_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_1) 5 j = k9t7p4_template_matrix_1 5 j := by decide + +private theorem k9t7p4_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_1) 6 j = k9t7p4_template_matrix_1 6 j := by decide + +private theorem k9t7p4_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_1) 7 j = k9t7p4_template_matrix_1 7 j := by decide + +private theorem k9t7p4_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_1) 8 j = k9t7p4_template_matrix_1 8 j := by decide + +private theorem k9t7p4_template_matrix_1_eq : (templateMatrix k9t7p4_templates_block_1) = k9t7p4_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t7p4_template_matrix_1_eq_row_0 j + + · exact k9t7p4_template_matrix_1_eq_row_1 j + + · exact k9t7p4_template_matrix_1_eq_row_2 j + + · exact k9t7p4_template_matrix_1_eq_row_3 j + + · exact k9t7p4_template_matrix_1_eq_row_4 j + + · exact k9t7p4_template_matrix_1_eq_row_5 j + + · exact k9t7p4_template_matrix_1_eq_row_6 j + + · exact k9t7p4_template_matrix_1_eq_row_7 j + + · exact k9t7p4_template_matrix_1_eq_row_8 j + +private def k9t7p4_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 8], + #[∅, ∅, ∅, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[∅, ∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t7p4_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_2) 0 j = k9t7p4_template_matrix_2 0 j := by decide + +private theorem k9t7p4_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_2) 1 j = k9t7p4_template_matrix_2 1 j := by decide + +private theorem k9t7p4_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_2) 2 j = k9t7p4_template_matrix_2 2 j := by decide + +private theorem k9t7p4_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_2) 3 j = k9t7p4_template_matrix_2 3 j := by decide + +private theorem k9t7p4_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_2) 4 j = k9t7p4_template_matrix_2 4 j := by decide + +private theorem k9t7p4_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_2) 5 j = k9t7p4_template_matrix_2 5 j := by decide + +private theorem k9t7p4_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_2) 6 j = k9t7p4_template_matrix_2 6 j := by decide + +private theorem k9t7p4_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_2) 7 j = k9t7p4_template_matrix_2 7 j := by decide + +private theorem k9t7p4_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_2) 8 j = k9t7p4_template_matrix_2 8 j := by decide + +private theorem k9t7p4_template_matrix_2_eq : (templateMatrix k9t7p4_templates_block_2) = k9t7p4_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t7p4_template_matrix_2_eq_row_0 j + + · exact k9t7p4_template_matrix_2_eq_row_1 j + + · exact k9t7p4_template_matrix_2_eq_row_2 j + + · exact k9t7p4_template_matrix_2_eq_row_3 j + + · exact k9t7p4_template_matrix_2_eq_row_4 j + + · exact k9t7p4_template_matrix_2_eq_row_5 j + + · exact k9t7p4_template_matrix_2_eq_row_6 j + + · exact k9t7p4_template_matrix_2_eq_row_7 j + + · exact k9t7p4_template_matrix_2_eq_row_8 j + +private def k9t7p4_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 7, ∅, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 6, Finset.Icc 1 7], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 6, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t7p4_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_3) 0 j = k9t7p4_template_matrix_3 0 j := by decide + +private theorem k9t7p4_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_3) 1 j = k9t7p4_template_matrix_3 1 j := by decide + +private theorem k9t7p4_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_3) 2 j = k9t7p4_template_matrix_3 2 j := by decide + +private theorem k9t7p4_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_3) 3 j = k9t7p4_template_matrix_3 3 j := by decide + +private theorem k9t7p4_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_3) 4 j = k9t7p4_template_matrix_3 4 j := by decide + +private theorem k9t7p4_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_3) 5 j = k9t7p4_template_matrix_3 5 j := by decide + +private theorem k9t7p4_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_3) 6 j = k9t7p4_template_matrix_3 6 j := by decide + +private theorem k9t7p4_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_3) 7 j = k9t7p4_template_matrix_3 7 j := by decide + +private theorem k9t7p4_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t7p4_templates_block_3) 8 j = k9t7p4_template_matrix_3 8 j := by decide + +private theorem k9t7p4_template_matrix_3_eq : (templateMatrix k9t7p4_templates_block_3) = k9t7p4_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t7p4_template_matrix_3_eq_row_0 j + + · exact k9t7p4_template_matrix_3_eq_row_1 j + + · exact k9t7p4_template_matrix_3_eq_row_2 j + + · exact k9t7p4_template_matrix_3_eq_row_3 j + + · exact k9t7p4_template_matrix_3_eq_row_4 j + + · exact k9t7p4_template_matrix_3_eq_row_5 j + + · exact k9t7p4_template_matrix_3_eq_row_6 j + + · exact k9t7p4_template_matrix_3_eq_row_7 j + + · exact k9t7p4_template_matrix_3_eq_row_8 j + +private theorem k9t7p4_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => (((k9t7p4_template_matrix_0 i j ∪ k9t7p4_template_matrix_1 i j) ∪ k9t7p4_template_matrix_2 i j) ∪ k9t7p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p4.required i j) 0 j = k9t7p4_state_0 0 j := by decide + +private theorem k9t7p4_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => (((k9t7p4_template_matrix_0 i j ∪ k9t7p4_template_matrix_1 i j) ∪ k9t7p4_template_matrix_2 i j) ∪ k9t7p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p4.required i j) 1 j = k9t7p4_state_0 1 j := by decide + +private theorem k9t7p4_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => (((k9t7p4_template_matrix_0 i j ∪ k9t7p4_template_matrix_1 i j) ∪ k9t7p4_template_matrix_2 i j) ∪ k9t7p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p4.required i j) 2 j = k9t7p4_state_0 2 j := by decide + +private theorem k9t7p4_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => (((k9t7p4_template_matrix_0 i j ∪ k9t7p4_template_matrix_1 i j) ∪ k9t7p4_template_matrix_2 i j) ∪ k9t7p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p4.required i j) 3 j = k9t7p4_state_0 3 j := by decide + +private theorem k9t7p4_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => (((k9t7p4_template_matrix_0 i j ∪ k9t7p4_template_matrix_1 i j) ∪ k9t7p4_template_matrix_2 i j) ∪ k9t7p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p4.required i j) 4 j = k9t7p4_state_0 4 j := by decide + +private theorem k9t7p4_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => (((k9t7p4_template_matrix_0 i j ∪ k9t7p4_template_matrix_1 i j) ∪ k9t7p4_template_matrix_2 i j) ∪ k9t7p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p4.required i j) 5 j = k9t7p4_state_0 5 j := by decide + +private theorem k9t7p4_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => (((k9t7p4_template_matrix_0 i j ∪ k9t7p4_template_matrix_1 i j) ∪ k9t7p4_template_matrix_2 i j) ∪ k9t7p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p4.required i j) 6 j = k9t7p4_state_0 6 j := by decide + +private theorem k9t7p4_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => (((k9t7p4_template_matrix_0 i j ∪ k9t7p4_template_matrix_1 i j) ∪ k9t7p4_template_matrix_2 i j) ∪ k9t7p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p4.required i j) 7 j = k9t7p4_state_0 7 j := by decide + +private theorem k9t7p4_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => (((k9t7p4_template_matrix_0 i j ∪ k9t7p4_template_matrix_1 i j) ∪ k9t7p4_template_matrix_2 i j) ∪ k9t7p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p4.required i j) 8 j = k9t7p4_state_0 8 j := by decide + +private theorem k9t7p4_initial_merged_eq : (fun i j => (((k9t7p4_template_matrix_0 i j ∪ k9t7p4_template_matrix_1 i j) ∪ k9t7p4_template_matrix_2 i j) ∪ k9t7p4_template_matrix_3 i j) ∪ requiredMatrix 9 k9t7p4.required i j) = k9t7p4_state_0 := by + funext i j + fin_cases i + + · exact k9t7p4_initial_merged_eq_row_0 j + + · exact k9t7p4_initial_merged_eq_row_1 j + + · exact k9t7p4_initial_merged_eq_row_2 j + + · exact k9t7p4_initial_merged_eq_row_3 j + + · exact k9t7p4_initial_merged_eq_row_4 j + + · exact k9t7p4_initial_merged_eq_row_5 j + + · exact k9t7p4_initial_merged_eq_row_6 j + + · exact k9t7p4_initial_merged_eq_row_7 j + + · exact k9t7p4_initial_merged_eq_row_8 j + +private theorem k9t7p4_initial_eq : k9t7p4.initialMatrix 9 = k9t7p4_state_0 := by + funext i j + change templateMatrix (k9t7p4_templates_block_0 ++ k9t7p4_templates_block_1 ++ k9t7p4_templates_block_2 ++ k9t7p4_templates_block_3) i j ∪ requiredMatrix 9 k9t7p4.required i j = _ + simp only [templateMatrix_append, k9t7p4_template_matrix_0_eq, k9t7p4_template_matrix_1_eq, k9t7p4_template_matrix_2_eq, k9t7p4_template_matrix_3_eq] + exact congrFun (congrFun k9t7p4_initial_merged_eq i) j + +private theorem k9t7p4_closure_0 : ClosureCheck k9t7p4.graph k9t7p4_state_0 9 7 [] := by trivial + +private theorem k9t7p4_matrix_eq : k9t7p4.matrix 9 = k9t7p4_state_0 := by + change closureMatrix (k9t7p4.initialMatrix 9) _ = _ + rw [k9t7p4_initial_eq] + change closureMatrix k9t7p4_state_0 [] = _ + rfl + +private theorem k9t7p4_part_0 : k9t7p4.chains.flatten = List.finRange _ := by decide + +private theorem k9t7p4_part_1 : k9t7p4.chains.map List.length = ([[], [], [], [1], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t7p4_part_2 : k9t7p4.chains.map (fun l => l.map (fun i => decide (i ∈ k9t7p4.clique))) = ([[], [], [], [1], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t7p4_templates_item_0 : (⟨0, 1, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_1 : (⟨0, 1, [[3, 4, 5], [6, 7, 8]], [], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_2 : (⟨0, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_3 : (⟨0, 2, [[3, 4, 5], [6, 7, 8]], [], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_4 : (⟨0, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_5 : (⟨0, 3, [[6, 7, 8]], [], [4, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_6 : (⟨0, 4, [], [], [3], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_7 : (⟨0, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_8 : (⟨0, 5, [[6, 7, 8]], [], [4, 3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_9 : (⟨0, 6, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_10 : (⟨0, 6, [[3, 4, 5]], [], [7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_11 : (⟨0, 7, [], [], [6], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_12 : (⟨0, 8, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_13 : (⟨0, 8, [[3, 4, 5]], [], [7, 6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_14 : (⟨1, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_15 : (⟨1, 2, [[3, 4, 5], [6, 7, 8]], [], [], 1, 2⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_16 : (⟨1, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_17 : (⟨1, 3, [[6, 7, 8]], [], [4, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_18 : (⟨1, 4, [], [], [3], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_19 : (⟨1, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_20 : (⟨1, 5, [[6, 7, 8]], [], [4, 3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_21 : (⟨1, 6, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_22 : (⟨1, 6, [[3, 4, 5]], [], [7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_23 : (⟨1, 7, [], [], [6], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_24 : (⟨1, 8, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_25 : (⟨1, 8, [[3, 4, 5]], [], [7, 6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_26 : (⟨2, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_27 : (⟨2, 3, [[6, 7, 8]], [], [4, 5], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_28 : (⟨2, 4, [], [], [3], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_29 : (⟨2, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_30 : (⟨2, 5, [[6, 7, 8]], [], [4, 3], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_31 : (⟨2, 6, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_32 : (⟨2, 6, [[3, 4, 5]], [], [7, 8], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_33 : (⟨2, 7, [], [], [6], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_34 : (⟨2, 8, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_35 : (⟨2, 8, [[3, 4, 5]], [], [7, 6], 1, 3⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_36 : (⟨3, 4, [], [], [5], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_37 : (⟨4, 5, [], [3], [], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_38 : (⟨4, 6, [], [3], [], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_39 : (⟨4, 7, [], [3], [6], 1, 6⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_item_40 : (⟨4, 8, [], [3], [], 1, 7⟩ : TemplateData (Fin 9)).Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t7p4_templates_block_0_check : ∀ T ∈ k9t7p4_templates_block_0, T.Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t7p4_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t7p4_templates_item_0, k9t7p4_templates_item_1, k9t7p4_templates_item_2, k9t7p4_templates_item_3, k9t7p4_templates_item_4, k9t7p4_templates_item_5, k9t7p4_templates_item_6, k9t7p4_templates_item_7, k9t7p4_templates_item_8, k9t7p4_templates_item_9, k9t7p4_templates_item_10, k9t7p4_templates_item_11⟩ + +private theorem k9t7p4_templates_block_1_check : ∀ T ∈ k9t7p4_templates_block_1, T.Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t7p4_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t7p4_templates_item_12, k9t7p4_templates_item_13, k9t7p4_templates_item_14, k9t7p4_templates_item_15, k9t7p4_templates_item_16, k9t7p4_templates_item_17, k9t7p4_templates_item_18, k9t7p4_templates_item_19, k9t7p4_templates_item_20, k9t7p4_templates_item_21, k9t7p4_templates_item_22, k9t7p4_templates_item_23⟩ + +private theorem k9t7p4_templates_block_2_check : ∀ T ∈ k9t7p4_templates_block_2, T.Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t7p4_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t7p4_templates_item_24, k9t7p4_templates_item_25, k9t7p4_templates_item_26, k9t7p4_templates_item_27, k9t7p4_templates_item_28, k9t7p4_templates_item_29, k9t7p4_templates_item_30, k9t7p4_templates_item_31, k9t7p4_templates_item_32, k9t7p4_templates_item_33, k9t7p4_templates_item_34, k9t7p4_templates_item_35⟩ + +private theorem k9t7p4_templates_block_3_check : ∀ T ∈ k9t7p4_templates_block_3, T.Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t7p4_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t7p4_templates_item_36, k9t7p4_templates_item_37, k9t7p4_templates_item_38, k9t7p4_templates_item_39, k9t7p4_templates_item_40⟩ + +private theorem k9t7p4_part_3 : ∀ T ∈ k9t7p4.templates, T.Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t7p4_templates_block_0 ++ k9t7p4_templates_block_1 ++ k9t7p4_templates_block_2 ++ k9t7p4_templates_block_3), T.Check k9t7p4.graph k9t7p4.clique 9 (patternAmount ([[], [], [], [1], [1]] : List (List ℕ))) (([[], [], [], [1], [1]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t7p4_templates_block_0_check, k9t7p4_templates_block_1_check⟩, k9t7p4_templates_block_2_check⟩, k9t7p4_templates_block_3_check⟩ + +private theorem k9t7p4_part_4 : ∀ p ∈ k9t7p4.required, p.Check k9t7p4.graph 9 := by decide + +private theorem k9t7p4_part_5 : ClosureCheck k9t7p4.graph (k9t7p4.initialMatrix 9) 9 7 k9t7p4.closure := by + rw [k9t7p4_initial_eq] + exact k9t7p4_closure_0 + +private theorem k9t7p4_part_6 : k9t7p4.bad.Check k9t7p4.graph (k9t7p4.matrix 9) 9 7 := by + rw [k9t7p4_matrix_eq] + decide + +theorem k9t7p4_check : k9t7p4.Check 9 7 [[], [], [], [1], [1]] := + ⟨k9t7p4_part_0, k9t7p4_part_1, k9t7p4_part_2, k9t7p4_part_3, k9t7p4_part_4, k9t7p4_part_5, k9t7p4_part_6⟩ +def k9t8p0 : LayoutCertificate 8 where + chains := [[0], [1], [2], [3], [4], [5], [6], [7]] + clique := {0, 1, 2, 3, 4, 5, 6, 7} + templates := [⟨0, 1, [], [], [], 1, 8⟩, + ⟨0, 2, [], [], [], 1, 8⟩, + ⟨0, 3, [], [], [], 1, 8⟩, + ⟨0, 4, [], [], [], 1, 8⟩, + ⟨0, 5, [], [], [], 1, 8⟩, + ⟨0, 6, [], [], [], 1, 8⟩, + ⟨0, 7, [], [], [], 1, 8⟩, + ⟨1, 2, [], [], [], 1, 8⟩, + ⟨1, 3, [], [], [], 1, 8⟩, + ⟨1, 4, [], [], [], 1, 8⟩, + ⟨1, 5, [], [], [], 1, 8⟩, + ⟨1, 6, [], [], [], 1, 8⟩, + ⟨1, 7, [], [], [], 1, 8⟩, + ⟨2, 3, [], [], [], 1, 8⟩, + ⟨2, 4, [], [], [], 1, 8⟩, + ⟨2, 5, [], [], [], 1, 8⟩, + ⟨2, 6, [], [], [], 1, 8⟩, + ⟨2, 7, [], [], [], 1, 8⟩, + ⟨3, 4, [], [], [], 1, 8⟩, + ⟨3, 5, [], [], [], 1, 8⟩, + ⟨3, 6, [], [], [], 1, 8⟩, + ⟨3, 7, [], [], [], 1, 8⟩] + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3), (3, 3)}⟩ + + +private def k9t8p0_state_0 : ForbiddenMatrix 8 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t8p0_initial_eq_row_0 : ∀ j : Fin 8, (k9t8p0.initialMatrix 9) 0 j = k9t8p0_state_0 0 j := by decide + +private theorem k9t8p0_initial_eq_row_1 : ∀ j : Fin 8, (k9t8p0.initialMatrix 9) 1 j = k9t8p0_state_0 1 j := by decide + +private theorem k9t8p0_initial_eq_row_2 : ∀ j : Fin 8, (k9t8p0.initialMatrix 9) 2 j = k9t8p0_state_0 2 j := by decide + +private theorem k9t8p0_initial_eq_row_3 : ∀ j : Fin 8, (k9t8p0.initialMatrix 9) 3 j = k9t8p0_state_0 3 j := by decide + +private theorem k9t8p0_initial_eq_row_4 : ∀ j : Fin 8, (k9t8p0.initialMatrix 9) 4 j = k9t8p0_state_0 4 j := by decide + +private theorem k9t8p0_initial_eq_row_5 : ∀ j : Fin 8, (k9t8p0.initialMatrix 9) 5 j = k9t8p0_state_0 5 j := by decide + +private theorem k9t8p0_initial_eq_row_6 : ∀ j : Fin 8, (k9t8p0.initialMatrix 9) 6 j = k9t8p0_state_0 6 j := by decide + +private theorem k9t8p0_initial_eq_row_7 : ∀ j : Fin 8, (k9t8p0.initialMatrix 9) 7 j = k9t8p0_state_0 7 j := by decide + +private theorem k9t8p0_initial_eq : (k9t8p0.initialMatrix 9) = k9t8p0_state_0 := by + funext i j + fin_cases i + + · exact k9t8p0_initial_eq_row_0 j + + · exact k9t8p0_initial_eq_row_1 j + + · exact k9t8p0_initial_eq_row_2 j + + · exact k9t8p0_initial_eq_row_3 j + + · exact k9t8p0_initial_eq_row_4 j + + · exact k9t8p0_initial_eq_row_5 j + + · exact k9t8p0_initial_eq_row_6 j + + · exact k9t8p0_initial_eq_row_7 j + +private theorem k9t8p0_closure_0 : ClosureCheck k9t8p0.graph k9t8p0_state_0 9 8 [] := by trivial + +private theorem k9t8p0_matrix_eq : k9t8p0.matrix 9 = k9t8p0_state_0 := by + change closureMatrix (k9t8p0.initialMatrix 9) _ = _ + rw [k9t8p0_initial_eq] + change closureMatrix k9t8p0_state_0 [] = _ + rfl + +private theorem k9t8p0_part_0 : k9t8p0.chains.flatten = List.finRange _ := by decide + +private theorem k9t8p0_part_1 : k9t8p0.chains.map List.length = ([[], [], [], [], [], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t8p0_part_2 : k9t8p0.chains.map (fun l => l.map (fun i => decide (i ∈ k9t8p0.clique))) = ([[], [], [], [], [], [], [], []] : List (List ℕ)).map profileMask := by decide + +private theorem k9t8p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_3 : (⟨0, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_4 : (⟨0, 5, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_5 : (⟨0, 6, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_6 : (⟨0, 7, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_7 : (⟨1, 2, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_8 : (⟨1, 3, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_9 : (⟨1, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_10 : (⟨1, 5, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_11 : (⟨1, 6, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_12 : (⟨1, 7, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_13 : (⟨2, 3, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_14 : (⟨2, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_15 : (⟨2, 5, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_16 : (⟨2, 6, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_17 : (⟨2, 7, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_18 : (⟨3, 4, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_19 : (⟨3, 5, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_20 : (⟨3, 6, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_templates_item_21 : (⟨3, 7, [], [], [], 1, 8⟩ : TemplateData (Fin 8)).Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p0_part_3 : ∀ T ∈ k9t8p0.templates, T.Check k9t8p0.graph k9t8p0.clique 9 (patternAmount ([[], [], [], [], [], [], [], []] : List (List ℕ))) (([[], [], [], [], [], [], [], []] : List (List ℕ)).map List.length).sum := by + simp only [k9t8p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t8p0_templates_item_0, k9t8p0_templates_item_1, k9t8p0_templates_item_2, k9t8p0_templates_item_3, k9t8p0_templates_item_4, k9t8p0_templates_item_5, k9t8p0_templates_item_6, k9t8p0_templates_item_7, k9t8p0_templates_item_8, k9t8p0_templates_item_9, k9t8p0_templates_item_10, k9t8p0_templates_item_11, k9t8p0_templates_item_12, k9t8p0_templates_item_13, k9t8p0_templates_item_14, k9t8p0_templates_item_15, k9t8p0_templates_item_16, k9t8p0_templates_item_17, k9t8p0_templates_item_18, k9t8p0_templates_item_19, k9t8p0_templates_item_20, k9t8p0_templates_item_21⟩ + +private theorem k9t8p0_part_4 : ∀ p ∈ k9t8p0.required, p.Check k9t8p0.graph 9 := by decide + +private theorem k9t8p0_part_5 : ClosureCheck k9t8p0.graph (k9t8p0.initialMatrix 9) 9 8 k9t8p0.closure := by + rw [k9t8p0_initial_eq] + exact k9t8p0_closure_0 + +private theorem k9t8p0_part_6 : k9t8p0.bad.Check k9t8p0.graph (k9t8p0.matrix 9) 9 8 := by + rw [k9t8p0_matrix_eq] + decide + +theorem k9t8p0_check : k9t8p0.Check 9 8 [[], [], [], [], [], [], [], []] := + ⟨k9t8p0_part_0, k9t8p0_part_1, k9t8p0_part_2, k9t8p0_part_3, k9t8p0_part_4, k9t8p0_part_5, k9t8p0_part_6⟩ +private def k9t8p1_templates_block_0 : List (TemplateData (Fin 9)) := [⟨0, 1, [], [], [], 2, 8⟩, ⟨0, 1, [[6, 7, 8]], [], [], 1, 5⟩, ⟨0, 2, [], [], [], 2, 8⟩, ⟨0, 2, [[6, 7, 8]], [], [], 1, 5⟩, ⟨0, 3, [], [], [], 2, 8⟩, ⟨0, 3, [[6, 7, 8]], [], [], 1, 5⟩, ⟨0, 4, [], [], [], 2, 8⟩, ⟨0, 4, [[6, 7, 8]], [], [], 1, 5⟩, ⟨0, 5, [], [], [], 2, 8⟩, ⟨0, 5, [[6, 7, 8]], [], [], 1, 5⟩, ⟨0, 6, [], [], [], 2, 8⟩, ⟨0, 6, [], [], [7, 8], 1, 6⟩] + +private def k9t8p1_templates_block_1 : List (TemplateData (Fin 9)) := [⟨0, 7, [], [], [6], 1, 7⟩, ⟨0, 8, [], [], [], 2, 8⟩, ⟨0, 8, [], [], [7, 6], 1, 6⟩, ⟨1, 2, [], [], [], 2, 8⟩, ⟨1, 2, [[6, 7, 8]], [], [], 1, 5⟩, ⟨1, 3, [], [], [], 2, 8⟩, ⟨1, 3, [[6, 7, 8]], [], [], 1, 5⟩, ⟨1, 4, [], [], [], 2, 8⟩, ⟨1, 4, [[6, 7, 8]], [], [], 1, 5⟩, ⟨1, 5, [], [], [], 2, 8⟩, ⟨1, 5, [[6, 7, 8]], [], [], 1, 5⟩, ⟨1, 6, [], [], [], 2, 8⟩] + +private def k9t8p1_templates_block_2 : List (TemplateData (Fin 9)) := [⟨1, 6, [], [], [7, 8], 1, 6⟩, ⟨1, 7, [], [], [6], 1, 7⟩, ⟨1, 8, [], [], [], 2, 8⟩, ⟨1, 8, [], [], [7, 6], 1, 6⟩, ⟨2, 3, [], [], [], 2, 8⟩, ⟨2, 3, [[6, 7, 8]], [], [], 1, 5⟩, ⟨2, 4, [], [], [], 2, 8⟩, ⟨2, 4, [[6, 7, 8]], [], [], 1, 5⟩, ⟨2, 5, [], [], [], 2, 8⟩, ⟨2, 5, [[6, 7, 8]], [], [], 1, 5⟩, ⟨2, 6, [], [], [], 2, 8⟩, ⟨2, 6, [], [], [7, 8], 1, 6⟩] + +private def k9t8p1_templates_block_3 : List (TemplateData (Fin 9)) := [⟨2, 7, [], [], [6], 1, 7⟩, ⟨2, 8, [], [], [], 2, 8⟩, ⟨2, 8, [], [], [7, 6], 1, 6⟩, ⟨3, 4, [], [], [], 2, 8⟩, ⟨3, 4, [[6, 7, 8]], [], [], 1, 5⟩, ⟨3, 5, [], [], [], 2, 8⟩, ⟨3, 5, [[6, 7, 8]], [], [], 1, 5⟩, ⟨3, 6, [], [], [], 2, 8⟩, ⟨3, 6, [], [], [7, 8], 1, 6⟩, ⟨3, 7, [], [], [6], 1, 7⟩, ⟨3, 8, [], [], [], 2, 8⟩, ⟨3, 8, [], [], [7, 6], 1, 6⟩] + +def k9t8p1 : LayoutCertificate 9 where + chains := [[0], [1], [2], [3], [4], [5], [6, 7, 8]] + clique := {0, 1, 2, 3, 4, 5, 6, 8} + templates := k9t8p1_templates_block_0 ++ k9t8p1_templates_block_1 ++ k9t8p1_templates_block_2 ++ k9t8p1_templates_block_3 + required := [] + closure := [] + bad := ⟨none, {(0, 3), (1, 3), (2, 3), (3, 3)}⟩ + + +private def k9t8p1_state_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private def k9t8p1_template_matrix_0 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t8p1_template_matrix_0_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_0) 0 j = k9t8p1_template_matrix_0 0 j := by decide + +private theorem k9t8p1_template_matrix_0_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_0) 1 j = k9t8p1_template_matrix_0 1 j := by decide + +private theorem k9t8p1_template_matrix_0_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_0) 2 j = k9t8p1_template_matrix_0 2 j := by decide + +private theorem k9t8p1_template_matrix_0_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_0) 3 j = k9t8p1_template_matrix_0 3 j := by decide + +private theorem k9t8p1_template_matrix_0_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_0) 4 j = k9t8p1_template_matrix_0 4 j := by decide + +private theorem k9t8p1_template_matrix_0_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_0) 5 j = k9t8p1_template_matrix_0 5 j := by decide + +private theorem k9t8p1_template_matrix_0_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_0) 6 j = k9t8p1_template_matrix_0 6 j := by decide + +private theorem k9t8p1_template_matrix_0_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_0) 7 j = k9t8p1_template_matrix_0 7 j := by decide + +private theorem k9t8p1_template_matrix_0_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_0) 8 j = k9t8p1_template_matrix_0 8 j := by decide + +private theorem k9t8p1_template_matrix_0_eq : (templateMatrix k9t8p1_templates_block_0) = k9t8p1_template_matrix_0 := by + funext i j + fin_cases i + + · exact k9t8p1_template_matrix_0_eq_row_0 j + + · exact k9t8p1_template_matrix_0_eq_row_1 j + + · exact k9t8p1_template_matrix_0_eq_row_2 j + + · exact k9t8p1_template_matrix_0_eq_row_3 j + + · exact k9t8p1_template_matrix_0_eq_row_4 j + + · exact k9t8p1_template_matrix_0_eq_row_5 j + + · exact k9t8p1_template_matrix_0_eq_row_6 j + + · exact k9t8p1_template_matrix_0_eq_row_7 j + + · exact k9t8p1_template_matrix_0_eq_row_8 j + +private def k9t8p1_template_matrix_1 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, Finset.Icc 1 8], + #[∅, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 2 8, ∅, ∅], + #[∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 2 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t8p1_template_matrix_1_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_1) 0 j = k9t8p1_template_matrix_1 0 j := by decide + +private theorem k9t8p1_template_matrix_1_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_1) 1 j = k9t8p1_template_matrix_1 1 j := by decide + +private theorem k9t8p1_template_matrix_1_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_1) 2 j = k9t8p1_template_matrix_1 2 j := by decide + +private theorem k9t8p1_template_matrix_1_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_1) 3 j = k9t8p1_template_matrix_1 3 j := by decide + +private theorem k9t8p1_template_matrix_1_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_1) 4 j = k9t8p1_template_matrix_1 4 j := by decide + +private theorem k9t8p1_template_matrix_1_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_1) 5 j = k9t8p1_template_matrix_1 5 j := by decide + +private theorem k9t8p1_template_matrix_1_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_1) 6 j = k9t8p1_template_matrix_1 6 j := by decide + +private theorem k9t8p1_template_matrix_1_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_1) 7 j = k9t8p1_template_matrix_1 7 j := by decide + +private theorem k9t8p1_template_matrix_1_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_1) 8 j = k9t8p1_template_matrix_1 8 j := by decide + +private theorem k9t8p1_template_matrix_1_eq : (templateMatrix k9t8p1_templates_block_1) = k9t8p1_template_matrix_1 := by + funext i j + fin_cases i + + · exact k9t8p1_template_matrix_1_eq_row_0 j + + · exact k9t8p1_template_matrix_1_eq_row_1 j + + · exact k9t8p1_template_matrix_1_eq_row_2 j + + · exact k9t8p1_template_matrix_1_eq_row_3 j + + · exact k9t8p1_template_matrix_1_eq_row_4 j + + · exact k9t8p1_template_matrix_1_eq_row_5 j + + · exact k9t8p1_template_matrix_1_eq_row_6 j + + · exact k9t8p1_template_matrix_1_eq_row_7 j + + · exact k9t8p1_template_matrix_1_eq_row_8 j + +private def k9t8p1_template_matrix_2 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 6, Finset.Icc 1 7, Finset.Icc 1 8], + #[∅, ∅, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅], + #[∅, ∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 6, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t8p1_template_matrix_2_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_2) 0 j = k9t8p1_template_matrix_2 0 j := by decide + +private theorem k9t8p1_template_matrix_2_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_2) 1 j = k9t8p1_template_matrix_2 1 j := by decide + +private theorem k9t8p1_template_matrix_2_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_2) 2 j = k9t8p1_template_matrix_2 2 j := by decide + +private theorem k9t8p1_template_matrix_2_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_2) 3 j = k9t8p1_template_matrix_2 3 j := by decide + +private theorem k9t8p1_template_matrix_2_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_2) 4 j = k9t8p1_template_matrix_2 4 j := by decide + +private theorem k9t8p1_template_matrix_2_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_2) 5 j = k9t8p1_template_matrix_2 5 j := by decide + +private theorem k9t8p1_template_matrix_2_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_2) 6 j = k9t8p1_template_matrix_2 6 j := by decide + +private theorem k9t8p1_template_matrix_2_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_2) 7 j = k9t8p1_template_matrix_2 7 j := by decide + +private theorem k9t8p1_template_matrix_2_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_2) 8 j = k9t8p1_template_matrix_2 8 j := by decide + +private theorem k9t8p1_template_matrix_2_eq : (templateMatrix k9t8p1_templates_block_2) = k9t8p1_template_matrix_2 := by + funext i j + fin_cases i + + · exact k9t8p1_template_matrix_2_eq_row_0 j + + · exact k9t8p1_template_matrix_2_eq_row_1 j + + · exact k9t8p1_template_matrix_2_eq_row_2 j + + · exact k9t8p1_template_matrix_2_eq_row_3 j + + · exact k9t8p1_template_matrix_2_eq_row_4 j + + · exact k9t8p1_template_matrix_2_eq_row_5 j + + · exact k9t8p1_template_matrix_2_eq_row_6 j + + · exact k9t8p1_template_matrix_2_eq_row_7 j + + · exact k9t8p1_template_matrix_2_eq_row_8 j + +private def k9t8p1_template_matrix_3 : ForbiddenMatrix 9 := + fun i j => ((#[#[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, ∅, ∅, ∅, ∅, Finset.Icc 1 7, Finset.Icc 1 8], + #[∅, ∅, ∅, ∅, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 8, Finset.Icc 1 7, Finset.Icc 1 8], + #[∅, ∅, ∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, ∅, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 7, Finset.Icc 1 7, ∅, ∅, ∅, ∅, ∅], + #[∅, ∅, Finset.Icc 1 8, Finset.Icc 1 8, ∅, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅ + +private theorem k9t8p1_template_matrix_3_eq_row_0 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_3) 0 j = k9t8p1_template_matrix_3 0 j := by decide + +private theorem k9t8p1_template_matrix_3_eq_row_1 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_3) 1 j = k9t8p1_template_matrix_3 1 j := by decide + +private theorem k9t8p1_template_matrix_3_eq_row_2 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_3) 2 j = k9t8p1_template_matrix_3 2 j := by decide + +private theorem k9t8p1_template_matrix_3_eq_row_3 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_3) 3 j = k9t8p1_template_matrix_3 3 j := by decide + +private theorem k9t8p1_template_matrix_3_eq_row_4 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_3) 4 j = k9t8p1_template_matrix_3 4 j := by decide + +private theorem k9t8p1_template_matrix_3_eq_row_5 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_3) 5 j = k9t8p1_template_matrix_3 5 j := by decide + +private theorem k9t8p1_template_matrix_3_eq_row_6 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_3) 6 j = k9t8p1_template_matrix_3 6 j := by decide + +private theorem k9t8p1_template_matrix_3_eq_row_7 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_3) 7 j = k9t8p1_template_matrix_3 7 j := by decide + +private theorem k9t8p1_template_matrix_3_eq_row_8 : ∀ j : Fin 9, (templateMatrix k9t8p1_templates_block_3) 8 j = k9t8p1_template_matrix_3 8 j := by decide + +private theorem k9t8p1_template_matrix_3_eq : (templateMatrix k9t8p1_templates_block_3) = k9t8p1_template_matrix_3 := by + funext i j + fin_cases i + + · exact k9t8p1_template_matrix_3_eq_row_0 j + + · exact k9t8p1_template_matrix_3_eq_row_1 j + + · exact k9t8p1_template_matrix_3_eq_row_2 j + + · exact k9t8p1_template_matrix_3_eq_row_3 j + + · exact k9t8p1_template_matrix_3_eq_row_4 j + + · exact k9t8p1_template_matrix_3_eq_row_5 j + + · exact k9t8p1_template_matrix_3_eq_row_6 j + + · exact k9t8p1_template_matrix_3_eq_row_7 j + + · exact k9t8p1_template_matrix_3_eq_row_8 j + +private theorem k9t8p1_initial_merged_eq_row_0 : ∀ j : Fin 9, (fun i j => (((k9t8p1_template_matrix_0 i j ∪ k9t8p1_template_matrix_1 i j) ∪ k9t8p1_template_matrix_2 i j) ∪ k9t8p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t8p1.required i j) 0 j = k9t8p1_state_0 0 j := by decide + +private theorem k9t8p1_initial_merged_eq_row_1 : ∀ j : Fin 9, (fun i j => (((k9t8p1_template_matrix_0 i j ∪ k9t8p1_template_matrix_1 i j) ∪ k9t8p1_template_matrix_2 i j) ∪ k9t8p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t8p1.required i j) 1 j = k9t8p1_state_0 1 j := by decide + +private theorem k9t8p1_initial_merged_eq_row_2 : ∀ j : Fin 9, (fun i j => (((k9t8p1_template_matrix_0 i j ∪ k9t8p1_template_matrix_1 i j) ∪ k9t8p1_template_matrix_2 i j) ∪ k9t8p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t8p1.required i j) 2 j = k9t8p1_state_0 2 j := by decide + +private theorem k9t8p1_initial_merged_eq_row_3 : ∀ j : Fin 9, (fun i j => (((k9t8p1_template_matrix_0 i j ∪ k9t8p1_template_matrix_1 i j) ∪ k9t8p1_template_matrix_2 i j) ∪ k9t8p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t8p1.required i j) 3 j = k9t8p1_state_0 3 j := by decide + +private theorem k9t8p1_initial_merged_eq_row_4 : ∀ j : Fin 9, (fun i j => (((k9t8p1_template_matrix_0 i j ∪ k9t8p1_template_matrix_1 i j) ∪ k9t8p1_template_matrix_2 i j) ∪ k9t8p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t8p1.required i j) 4 j = k9t8p1_state_0 4 j := by decide + +private theorem k9t8p1_initial_merged_eq_row_5 : ∀ j : Fin 9, (fun i j => (((k9t8p1_template_matrix_0 i j ∪ k9t8p1_template_matrix_1 i j) ∪ k9t8p1_template_matrix_2 i j) ∪ k9t8p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t8p1.required i j) 5 j = k9t8p1_state_0 5 j := by decide + +private theorem k9t8p1_initial_merged_eq_row_6 : ∀ j : Fin 9, (fun i j => (((k9t8p1_template_matrix_0 i j ∪ k9t8p1_template_matrix_1 i j) ∪ k9t8p1_template_matrix_2 i j) ∪ k9t8p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t8p1.required i j) 6 j = k9t8p1_state_0 6 j := by decide + +private theorem k9t8p1_initial_merged_eq_row_7 : ∀ j : Fin 9, (fun i j => (((k9t8p1_template_matrix_0 i j ∪ k9t8p1_template_matrix_1 i j) ∪ k9t8p1_template_matrix_2 i j) ∪ k9t8p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t8p1.required i j) 7 j = k9t8p1_state_0 7 j := by decide + +private theorem k9t8p1_initial_merged_eq_row_8 : ∀ j : Fin 9, (fun i j => (((k9t8p1_template_matrix_0 i j ∪ k9t8p1_template_matrix_1 i j) ∪ k9t8p1_template_matrix_2 i j) ∪ k9t8p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t8p1.required i j) 8 j = k9t8p1_state_0 8 j := by decide + +private theorem k9t8p1_initial_merged_eq : (fun i j => (((k9t8p1_template_matrix_0 i j ∪ k9t8p1_template_matrix_1 i j) ∪ k9t8p1_template_matrix_2 i j) ∪ k9t8p1_template_matrix_3 i j) ∪ requiredMatrix 9 k9t8p1.required i j) = k9t8p1_state_0 := by + funext i j + fin_cases i + + · exact k9t8p1_initial_merged_eq_row_0 j + + · exact k9t8p1_initial_merged_eq_row_1 j + + · exact k9t8p1_initial_merged_eq_row_2 j + + · exact k9t8p1_initial_merged_eq_row_3 j + + · exact k9t8p1_initial_merged_eq_row_4 j + + · exact k9t8p1_initial_merged_eq_row_5 j + + · exact k9t8p1_initial_merged_eq_row_6 j + + · exact k9t8p1_initial_merged_eq_row_7 j + + · exact k9t8p1_initial_merged_eq_row_8 j + +private theorem k9t8p1_initial_eq : k9t8p1.initialMatrix 9 = k9t8p1_state_0 := by + funext i j + change templateMatrix (k9t8p1_templates_block_0 ++ k9t8p1_templates_block_1 ++ k9t8p1_templates_block_2 ++ k9t8p1_templates_block_3) i j ∪ requiredMatrix 9 k9t8p1.required i j = _ + simp only [templateMatrix_append, k9t8p1_template_matrix_0_eq, k9t8p1_template_matrix_1_eq, k9t8p1_template_matrix_2_eq, k9t8p1_template_matrix_3_eq] + exact congrFun (congrFun k9t8p1_initial_merged_eq i) j + +private theorem k9t8p1_closure_0 : ClosureCheck k9t8p1.graph k9t8p1_state_0 9 8 [] := by trivial + +private theorem k9t8p1_matrix_eq : k9t8p1.matrix 9 = k9t8p1_state_0 := by + change closureMatrix (k9t8p1.initialMatrix 9) _ = _ + rw [k9t8p1_initial_eq] + change closureMatrix k9t8p1_state_0 [] = _ + rfl + +private theorem k9t8p1_part_0 : k9t8p1.chains.flatten = List.finRange _ := by decide + +private theorem k9t8p1_part_1 : k9t8p1.chains.map List.length = ([[], [], [], [], [], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide + +private theorem k9t8p1_part_2 : k9t8p1.chains.map (fun l => l.map (fun i => decide (i ∈ k9t8p1.clique))) = ([[], [], [], [], [], [], [1]] : List (List ℕ)).map profileMask := by decide + +private theorem k9t8p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_1 : (⟨0, 1, [[6, 7, 8]], [], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_2 : (⟨0, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_3 : (⟨0, 2, [[6, 7, 8]], [], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_4 : (⟨0, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_5 : (⟨0, 3, [[6, 7, 8]], [], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_6 : (⟨0, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_7 : (⟨0, 4, [[6, 7, 8]], [], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_8 : (⟨0, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_9 : (⟨0, 5, [[6, 7, 8]], [], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_10 : (⟨0, 6, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_11 : (⟨0, 6, [], [], [7, 8], 1, 6⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_12 : (⟨0, 7, [], [], [6], 1, 7⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_13 : (⟨0, 8, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_14 : (⟨0, 8, [], [], [7, 6], 1, 6⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_15 : (⟨1, 2, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_16 : (⟨1, 2, [[6, 7, 8]], [], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_17 : (⟨1, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_18 : (⟨1, 3, [[6, 7, 8]], [], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_19 : (⟨1, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_20 : (⟨1, 4, [[6, 7, 8]], [], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_21 : (⟨1, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_22 : (⟨1, 5, [[6, 7, 8]], [], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_23 : (⟨1, 6, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_24 : (⟨1, 6, [], [], [7, 8], 1, 6⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_25 : (⟨1, 7, [], [], [6], 1, 7⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_26 : (⟨1, 8, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_27 : (⟨1, 8, [], [], [7, 6], 1, 6⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_28 : (⟨2, 3, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_29 : (⟨2, 3, [[6, 7, 8]], [], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_30 : (⟨2, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_31 : (⟨2, 4, [[6, 7, 8]], [], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_32 : (⟨2, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_33 : (⟨2, 5, [[6, 7, 8]], [], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_34 : (⟨2, 6, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_35 : (⟨2, 6, [], [], [7, 8], 1, 6⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_36 : (⟨2, 7, [], [], [6], 1, 7⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_37 : (⟨2, 8, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_38 : (⟨2, 8, [], [], [7, 6], 1, 6⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_39 : (⟨3, 4, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_40 : (⟨3, 4, [[6, 7, 8]], [], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_41 : (⟨3, 5, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_42 : (⟨3, 5, [[6, 7, 8]], [], [], 1, 5⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_43 : (⟨3, 6, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_44 : (⟨3, 6, [], [], [7, 8], 1, 6⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_45 : (⟨3, 7, [], [], [6], 1, 7⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_46 : (⟨3, 8, [], [], [], 2, 8⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_item_47 : (⟨3, 8, [], [], [7, 6], 1, 6⟩ : TemplateData (Fin 9)).Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by decide + +private theorem k9t8p1_templates_block_0_check : ∀ T ∈ k9t8p1_templates_block_0, T.Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t8p1_templates_block_0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t8p1_templates_item_0, k9t8p1_templates_item_1, k9t8p1_templates_item_2, k9t8p1_templates_item_3, k9t8p1_templates_item_4, k9t8p1_templates_item_5, k9t8p1_templates_item_6, k9t8p1_templates_item_7, k9t8p1_templates_item_8, k9t8p1_templates_item_9, k9t8p1_templates_item_10, k9t8p1_templates_item_11⟩ + +private theorem k9t8p1_templates_block_1_check : ∀ T ∈ k9t8p1_templates_block_1, T.Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t8p1_templates_block_1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t8p1_templates_item_12, k9t8p1_templates_item_13, k9t8p1_templates_item_14, k9t8p1_templates_item_15, k9t8p1_templates_item_16, k9t8p1_templates_item_17, k9t8p1_templates_item_18, k9t8p1_templates_item_19, k9t8p1_templates_item_20, k9t8p1_templates_item_21, k9t8p1_templates_item_22, k9t8p1_templates_item_23⟩ + +private theorem k9t8p1_templates_block_2_check : ∀ T ∈ k9t8p1_templates_block_2, T.Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t8p1_templates_block_2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t8p1_templates_item_24, k9t8p1_templates_item_25, k9t8p1_templates_item_26, k9t8p1_templates_item_27, k9t8p1_templates_item_28, k9t8p1_templates_item_29, k9t8p1_templates_item_30, k9t8p1_templates_item_31, k9t8p1_templates_item_32, k9t8p1_templates_item_33, k9t8p1_templates_item_34, k9t8p1_templates_item_35⟩ + +private theorem k9t8p1_templates_block_3_check : ∀ T ∈ k9t8p1_templates_block_3, T.Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by + simp only [k9t8p1_templates_block_3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true] + exact ⟨k9t8p1_templates_item_36, k9t8p1_templates_item_37, k9t8p1_templates_item_38, k9t8p1_templates_item_39, k9t8p1_templates_item_40, k9t8p1_templates_item_41, k9t8p1_templates_item_42, k9t8p1_templates_item_43, k9t8p1_templates_item_44, k9t8p1_templates_item_45, k9t8p1_templates_item_46, k9t8p1_templates_item_47⟩ + +private theorem k9t8p1_part_3 : ∀ T ∈ k9t8p1.templates, T.Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum := by + change ∀ T ∈ (k9t8p1_templates_block_0 ++ k9t8p1_templates_block_1 ++ k9t8p1_templates_block_2 ++ k9t8p1_templates_block_3), T.Check k9t8p1.graph k9t8p1.clique 9 (patternAmount ([[], [], [], [], [], [], [1]] : List (List ℕ))) (([[], [], [], [], [], [], [1]] : List (List ℕ)).map List.length).sum + simp only [List.forall_mem_append] + exact ⟨⟨⟨k9t8p1_templates_block_0_check, k9t8p1_templates_block_1_check⟩, k9t8p1_templates_block_2_check⟩, k9t8p1_templates_block_3_check⟩ + +private theorem k9t8p1_part_4 : ∀ p ∈ k9t8p1.required, p.Check k9t8p1.graph 9 := by decide + +private theorem k9t8p1_part_5 : ClosureCheck k9t8p1.graph (k9t8p1.initialMatrix 9) 9 8 k9t8p1.closure := by + rw [k9t8p1_initial_eq] + exact k9t8p1_closure_0 + +private theorem k9t8p1_part_6 : k9t8p1.bad.Check k9t8p1.graph (k9t8p1.matrix 9) 9 8 := by + rw [k9t8p1_matrix_eq] + decide + +theorem k9t8p1_check : k9t8p1.Check 9 8 [[], [], [], [], [], [], [1]] := + ⟨k9t8p1_part_0, k9t8p1_part_1, k9t8p1_part_2, k9t8p1_part_3, k9t8p1_part_4, k9t8p1_part_5, k9t8p1_part_6⟩ +end CycleClique.Construction.Certificates + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertifiedRamseyReduction.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertifiedRamseyReduction.lean new file mode 100644 index 0000000000000000000000000000000000000000..23b5d663c4457f1aa7b118e5eb9cd2dd8f08f32e --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertifiedRamseyReduction.lean @@ -0,0 +1,58 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CanonicalRawCoverage +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiniteRangeReduction +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RamseyMainReduction + +namespace OAI + +/-! Mathematical assembly for a fixed cycle parameter, once its concrete +finite certificate coverage has been proved. -/ + +namespace CycleClique.Construction +open scoped Classical + +def CertificateCoverageAt (k : ℕ) : Prop := + ∀ t, 3 ≤ t → t ≤ k → t ≤ 8 → k / 2 ≤ t → + ∀ P ∈ pathPatterns t (k - t), HasCheckedCertificate k t P + +theorem no_expanded_counterexample_of_coverage (hCE : CEAlphaTwo) {k : ℕ} + (hcoverage : CertificateCoverageAt k) + {V : Type} [Fintype V] {G : SimpleGraph V} {a : ℕ} + (hk : 5 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) + (hcard : Fintype.card V = k * a + 1) (hI : IndependenceBound G a) + (hcycle : ¬ HasCycle G (k + 1)) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) : False := by + classical + obtain ⟨_, hω3, hωhi, hhalf⟩ := + finite_range_clique_bounds hCE hk ha hak hcard hI hcycle hexpand + obtain ⟨Q, hQ⟩ := G.exists_isNClique_cliqueNum + have hQcard := hQ.card_eq + have hQk : Q.card ≤ k := by omega + obtain ⟨S, hopt⟩ := ExpandedPathSystem.exists_optimal G Q k + obtain ⟨P, U, hP, hUv, hUa, hUe, hp, hne⟩ := hopt.exists_canonical_raw + obtain ⟨n, c, hc⟩ := hcoverage Q.card (by omega) hQk (by omega) (by omega) P hP + exact c.false_of_check hCE hk (by omega) hQk hQ.isClique hcycle (by omega) + (fun I hi => (hI I hi).trans hak) hexpand hopt U hUv hUa hUe hp hne hc + +theorem cycle_clique_upper_of_coverage (hCE : CEAlphaTwo) {k a : ℕ} + (hk : 5 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) (hcoverage : CertificateCoverageAt k) : + RamseyProperty (k + 1) (a + 1) (k * a + 1) := by + apply ramseyProperty_of_expanded_exclusion (by omega) ha hak + intro b hb hbk G hcycle hI hexpand + exact no_expanded_counterexample_of_coverage hCE hcoverage hk hb hbk (by simp) hI hcycle hexpand + +theorem isRamseyNumber_of_certificate_coverage (hCE : CEAlphaTwo) {m n : ℕ} + (hm : 6 ≤ m) (hn : 3 ≤ n) (hnm : n ≤ m) + (hcoverage : CertificateCoverageAt (m - 1)) : + IsRamseyNumber m n ((m - 1) * (n - 1) + 1) := by + have hm' : m - 1 + 1 = m := by omega + have hn' : n - 1 + 1 = n := by omega + apply isRamseyNumber_of_upper_lower + · simpa only [hm', hn'] using cycle_clique_upper_of_coverage hCE + (k := m - 1) (a := n - 1) (by omega) (by omega) (by omega) hcoverage + · exact blockGraph_not_ramsey (by omega) (by omega) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ChainCounts.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ChainCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..30c0a7e68a6eb8e767f043f059fe43f8e46579da --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ChainCounts.lean @@ -0,0 +1,149 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.NormalizeChains + +namespace OAI + +/-! Count assigned paths before and after deleting singleton chain pieces. -/ + +namespace CycleClique.Construction +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +noncomputable def chainCliqueCount (Q : Finset V) (l : List V) : ℕ := by + classical + exact (l.filter (fun v => decide (v ∈ Q))).length + +noncomputable def rawAssignedCount (Q : Finset V) (C : List (List V)) : ℕ := + (C.map (fun l => chainCliqueCount Q l - 1)).sum + +@[simp] theorem chainCliqueCount_append (A B : List V) : + chainCliqueCount Q (A ++ B) = chainCliqueCount Q A + chainCliqueCount Q B := by + classical + simp [chainCliqueCount, List.filter_append] + +@[simp] theorem chainCliqueCount_reverse (A : List V) : + chainCliqueCount Q A.reverse = chainCliqueCount Q A := by + classical + simp [chainCliqueCount, List.filter_reverse] + +theorem chainCliqueCount_eq_zero {J : List V} (hJ : ∀ z ∈ J, z ∉ Q) : + chainCliqueCount Q J = 0 := by + classical + simp only [chainCliqueCount, List.length_eq_zero_iff, List.filter_eq_nil_iff] + intro z hz + simpa using hJ z hz + +@[simp] theorem rawAssignedCount_append (A B : List (List V)) : + rawAssignedCount Q (A ++ B) = rawAssignedCount Q A + rawAssignedCount Q B := by + simp [rawAssignedCount] + +theorem chainCliqueCount_pos {l : List V} (hne : l ≠ []) + (hhead : ∀ v ∈ l.head?, v ∈ Q) : 1 ≤ chainCliqueCount Q l := by + classical + have hm : l.head hne ∈ l.filter (fun v => decide (v ∈ Q)) := by + apply List.mem_filter.mpr + exact ⟨List.head_mem hne, by simpa using hhead _ (List.head?_eq_some_head hne)⟩ + exact List.length_pos_iff.mpr (List.ne_nil_of_mem hm) + +theorem chainCliqueCount_pos_last {l : List V} (hne : l ≠ []) + (hlast : ∀ v ∈ l.getLast?, v ∈ Q) : 1 ≤ chainCliqueCount Q l := by + rw [← chainCliqueCount_reverse] + exact chainCliqueCount_pos (by simpa using hne) (by simpa using hlast) + +theorem chainCliqueCount_flatten (C : List (List V)) : + chainCliqueCount Q C.flatten = (C.map (chainCliqueCount Q)).sum := by + classical + simp only [chainCliqueCount, List.filter_flatten, List.length_flatten, List.map_map, + Function.comp_def] + rfl + +theorem rawAssignedCount_add_length (C : List (List V)) + (hpos : ∀ l ∈ C, 1 ≤ chainCliqueCount Q l) : + rawAssignedCount Q C + C.length = chainCliqueCount Q C.flatten := by + rw [chainCliqueCount_flatten] + induction C with + | nil => simp [rawAssignedCount] + | cons l C ih => + have hl := hpos l (by simp) + have hi := ih (fun l hl => hpos l (by simp [hl])) + simp only [rawAssignedCount, List.map_cons, List.sum_cons, List.length_cons] at hi ⊢ + omega + +theorem ExpandedPathSystem.incident_eq_chainCliqueCount (S : ExpandedPathSystem G Q) : + S.incident = chainCliqueCount Q S.chains.flatten := by + classical + have heq : S.vertices ∩ Q = + (S.chains.flatten.filter (fun v => decide (v ∈ Q))).toFinset := by + ext v + simp [ExpandedPathSystem.vertices] + aesop + unfold incident + rw [heq, List.toFinset_card_of_nodup (S.flatten_nodup.filter _)] + rfl + +theorem ExpandedPathSystem.assignedCount_eq_raw (S : ExpandedPathSystem G Q) : + S.assignedCount = rawAssignedCount Q S.chains := by + have hpos : ∀ l ∈ S.chains, 1 ≤ chainCliqueCount Q l := by + intro l hl + apply chainCliqueCount_pos + · intro heq + have hh := S.nontrivial l hl + simp [heq] at hh + · exact (S.endpoints l hl).1 + have h := rawAssignedCount_add_length S.chains hpos + rw [← S.incident_eq_chainCliqueCount] at h + unfold assignedCount + omega + +theorem short_chainCliqueCount {l : List V} (hne : l ≠ []) + (hends : (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q)) + (hsteps : l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q))) + (hlen : l.length < 3) : chainCliqueCount Q l = 1 := by + classical + cases l with + | nil => exact False.elim (hne rfl) + | cons x l => + cases l with + | nil => + have hx := hends.1 x (by simp) + simp [chainCliqueCount, hx] + | cons y l => + have hy := short_chain_in_clique hends hsteps hlen + have hxQ := hy x (by simp) + have hyQ := hy y (by simp) + exact False.elim ((List.isChain_cons_cons.mp hsteps).1 ⟨hxQ, hyQ⟩) + +theorem short_chainCliqueCount_le {l : List V} + (hends : (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q)) + (hsteps : l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q))) + (hlen : l.length < 3) : chainCliqueCount Q l ≤ 1 := by + by_cases he : l = [] + · subst l + simp [chainCliqueCount] + · rw [short_chainCliqueCount he hends hsteps hlen] + +theorem normalizeChains_assignedCount (C : List (List V)) + (hpaths : ∀ l ∈ C, l.Nodup ∧ l.IsChain G.Adj) + (hdis : C.Pairwise List.Disjoint) + (hends : ∀ l ∈ C, (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q)) + (hsteps : ∀ l ∈ C, l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q))) : + (normalizeChains C hpaths hdis hends hsteps).assignedCount = rawAssignedCount Q C := by + classical + rw [ExpandedPathSystem.assignedCount_eq_raw] + change rawAssignedCount Q (C.filter (fun l => decide (3 ≤ l.length))) = _ + induction C with + | nil => simp [rawAssignedCount] + | cons l C ih => + have ht := ih (fun l hl => hpaths l (by simp [hl])) + (List.pairwise_cons.mp hdis).2 + (fun l hl => hends l (by simp [hl])) + (fun l hl => hsteps l (by simp [hl])) + by_cases hl : 3 ≤ l.length + · simpa [List.filter_cons, hl, rawAssignedCount] using + congrArg (fun n => chainCliqueCount Q l - 1 + n) ht + · have hc := short_chainCliqueCount_le + (hends l (by simp)) (hsteps l (by simp)) (by omega) + have hz : chainCliqueCount Q l - 1 = 0 := by omega + simpa [List.filter_cons, hl, rawAssignedCount, hz] using ht + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CliqueThree.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CliqueThree.lean new file mode 100644 index 0000000000000000000000000000000000000000..eeb37a7c34ab0628523e25b6f96e65df40cdbf66 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CliqueThree.lean @@ -0,0 +1,35 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Size +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LargeClique +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LowerBound +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Monotonicity + +namespace OAI + +/-! The `n=3`, `m≥6` part of the formula, conditional on the same precise +published Hamiltonicity input as the size test. -/ + +namespace CycleClique.Construction +theorem cycle_clique_three_upper (hCE : CEAlphaTwo) {k : ℕ} (hk : 5 ≤ k) : + RamseyProperty (k + 1) 3 (2 * k + 1) := by + intro G + by_cases hc : HasCycle G (k + 1) + · exact Or.inl hc + · apply Or.inr + apply size_test_graph hCE hk (show 1 ≤ k by omega) hc + (cliqueNum_le_of_no_cycle (by omega) hc) + simp only [Fintype.card_fin] + omega + +theorem cycle_clique_three_ge_six (hCE : CEAlphaTwo) {m : ℕ} (hm : 6 ≤ m) : + IsRamseyNumber m 3 ((m - 1) * 2 + 1) := by + have hk : 5 ≤ m - 1 := by omega + have hm' : m - 1 + 1 = m := by omega + apply isRamseyNumber_of_upper_lower + · simpa only [hm', Nat.mul_comm] using cycle_clique_three_upper hCE hk + · simpa only [hm', Nat.mul_comm] using + (blockGraph_not_ramsey (a := 2) (k := m - 1) (m := m) (n := 3) + (by omega) (by omega)) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CliqueTraversal.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CliqueTraversal.lean new file mode 100644 index 0000000000000000000000000000000000000000..6874ab5e6fb2e10f2dafb07cb75935bb245b6d5f --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CliqueTraversal.lean @@ -0,0 +1,87 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LongestPaths +import Mathlib.Data.List.ChainOfFn +import Mathlib.Data.List.FinRange + +namespace OAI + +/-! Simple paths through all clique vertices with prescribed distinct ends. -/ + +namespace CycleClique.Construction +theorem indexedPath_ofFn_chain {V : Type*} {G : SimpleGraph V} {r : ℕ} + {f : Fin (r + 1) → V} (hf : IsIndexedPath G f) : + (List.ofFn f).Nodup ∧ (List.ofFn f).IsChain G.Adj := by + refine ⟨List.nodup_ofFn.mpr hf.1, List.isChain_ofFn.mpr ?_⟩ + intro i hi + exact hf.2 ⟨i, by omega⟩ + +theorem indexedPath_of_list {V : Type*} {G : SimpleGraph V} {r : ℕ} + (L : List V) (hL : L.Nodup) (hchain : L.IsChain G.Adj) (hlen : L.length = r + 1) : + IsIndexedPath G (fun i : Fin (r + 1) => L.get (Fin.cast hlen.symm i)) := by + refine ⟨hL.injective_get.comp (Fin.cast_injective _), ?_⟩ + intro i + exact (List.isChain_iff_getElem.mp hchain) i.val (by have := i.isLt; omega) + +private theorem chain_of_pairwise {V : Type*} {R : V → V → Prop} {L : List V} + (h : L.Pairwise R) : L.IsChain R := by + induction h with + | nil => exact .nil + | @cons a l hrel _ ih => + exact ih.cons (fun b hb => hrel b (List.mem_of_mem_head? hb)) + +theorem chain_of_clique_nodup {V : Type*} {G : SimpleGraph V} {E : Finset V} + (hclique : G.IsClique (E : Set V)) {L : List V} (hL : L.Nodup) + (hmem : ∀ v ∈ L, v ∈ E) : L.IsChain G.Adj := by + apply chain_of_pairwise + exact hL.pairwise_of_forall_ne + (fun a ha b hb hab => hclique (hmem a ha) (hmem b hb) hab) + +theorem exists_clique_traversal {V : Type*} [DecidableEq V] + {G : SimpleGraph V} {E : Finset V} (hclique : G.IsClique (E : Set V)) + {a b : V} (ha : a ∈ E) (hb : b ∈ E) (hab : a ≠ b) : + ∃ L : List V, L.Nodup ∧ L.IsChain G.Adj ∧ L.length = E.card ∧ + L.head? = some a ∧ L.getLast? = some b ∧ ∀ v ∈ L, v ∈ E := by + classical + let M := ((E.erase a).erase b).toList + let L := a :: (M ++ [b]) + have hM : ∀ v ∈ M, v ∈ E ∧ v ≠ a ∧ v ≠ b := by + intro v hv + have hm : v ∈ (E.erase a).erase b := by simpa [M] using hv + exact ⟨Finset.mem_of_mem_erase (Finset.mem_of_mem_erase hm), + (Finset.mem_erase.mp (Finset.mem_of_mem_erase hm)).1, + (Finset.mem_erase.mp hm).1⟩ + have hL : L.Nodup := by + apply List.nodup_cons.mpr + constructor + · intro h + rcases List.mem_append.mp h with h | h + · exact (hM a h).2.1 rfl + · have heq : a = b := by simpa using h + exact hab heq + · apply List.nodup_append.mpr + refine ⟨Finset.nodup_toList _, by simp, ?_⟩ + intro v hv b' hb' heq + have hb'eq : b' = b := by simpa using hb' + exact (hM v hv).2.2 (heq.trans hb'eq) + have hmem : ∀ v ∈ L, v ∈ E := by + intro v hv + rcases List.mem_cons.mp hv with rfl | hv + · exact ha + · rcases List.mem_append.mp hv with hv | hv + · exact (hM v hv).1 + · have heq : v = b := by simpa using hv + exact heq ▸ hb + have hlen : L.length = E.card := by + have hea := Finset.card_erase_add_one ha + have hba : b ∈ E.erase a := Finset.mem_erase.mpr ⟨hab.symm, hb⟩ + have heb := Finset.card_erase_add_one hba + dsimp [L, M] + simp only [List.length_cons, List.length_append, Finset.length_toList, List.length_nil] + omega + exact ⟨L, hL, chain_of_clique_nodup hclique hL hmem, hlen, rfl, + by + change ((a :: M) ++ [b]).getLast? = some b + exact List.getLast?_append_cons (a :: M) b [], hmem⟩ + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ClosedIndexed.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ClosedIndexed.lean new file mode 100644 index 0000000000000000000000000000000000000000..2915720de3e3d3f18f5ca5143af452ce8b2e6eeb --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ClosedIndexed.lean @@ -0,0 +1,67 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ColouredPathStart +import Mathlib.Algebra.Group.Fin.Basic + +namespace OAI + +/-! An indexed path whose endpoints are adjacent can be started at any of its vertices. -/ + +namespace CycleClique.Construction +theorem cycleNext_eq_add_one {r : ℕ} (i : Fin (r + 1)) : cycleNext i = i + 1 := by + cases r with + | zero => + apply Fin.ext + have h₁ := (cycleNext i).isLt + have h₂ := (i + 1).isLt + omega + | succ r => apply Fin.ext; rfl + +theorem indexedPath_closed_cycle {V : Type*} {G : SimpleGraph V} {r : ℕ} + {f : Fin (r + 1) → V} (hf : IsIndexedPath G f) + (hclose : G.Adj (f (Fin.last r)) (f 0)) : + ∀ i, G.Adj (f i) (f (cycleNext i)) := by + intro i + by_cases hi : i.val = r + · have heq : i = Fin.last r := Fin.ext hi + have hn : cycleNext i = 0 := by + apply Fin.ext + simp only [cycleNext, hi, Nat.mod_self, Fin.val_zero] + rw [hn, heq] + exact hclose + · let j : Fin r := ⟨i.val, by have := i.isLt; omega⟩ + have hleft : j.castSucc = i := Fin.ext rfl + have hright : j.succ = cycleNext i := by + apply Fin.ext + exact (Nat.mod_eq_of_lt (by have := i.isLt; omega)).symm + simpa only [hleft, hright] using hf.2 j + +theorem indexedPath_closed_ending {V : Type*} {G : SimpleGraph V} {r : ℕ} + {f : Fin (r + 1) → V} (hf : IsIndexedPath G f) + (hclose : G.Adj (f (Fin.last r)) (f 0)) (j : Fin (r + 1)) : + ∃ g : Fin (r + 1) → V, IsIndexedPath G g ∧ + g (Fin.last r) = f j ∧ Set.range g = Set.range f := by + let c := j - Fin.last r + let g : Fin (r + 1) → V := fun i => f (i + c) + have hadd : ∀ i : Fin r, i.succ = i.castSucc + (1 : Fin (r + 1)) := by + intro i + apply Fin.ext + rw [Fin.val_add_one_of_lt (show i.castSucc < Fin.last r from i.isLt)] + rfl + have hg : IsIndexedPath G g := by + refine ⟨hf.1.comp (fun a b h => add_right_cancel h), ?_⟩ + intro i + have h := indexedPath_closed_cycle hf hclose (i.castSucc + c) + simpa only [g, cycleNext_eq_add_one, hadd, add_assoc, add_comm 1 c] using h + refine ⟨g, hg, ?_, ?_⟩ + · change f (Fin.last r + (j - Fin.last r)) = f j + congr 1 + abel + · ext v + constructor + · rintro ⟨i, rfl⟩ + exact ⟨i + c, rfl⟩ + · rintro ⟨i, rfl⟩ + exact ⟨i - c, by simp [g]⟩ + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ClosureCertificates.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ClosureCertificates.lean new file mode 100644 index 0000000000000000000000000000000000000000..18c74a9bb3797f45e46bd93f18ebfb9f809f3eb8 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ClosureCertificates.lean @@ -0,0 +1,90 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiniteAttachments + +namespace OAI + +/-! Soundness of the checker's hypothetical zero/one attachment rules. +Each local contradiction is witnessed by explicit required paths and a +checked bad state; inherited constraints refer only to earlier states. -/ + +namespace CycleClique.Construction +structure EdgeAttachmentData (n : ℕ) where + i : Fin n + j : Fin n + required : List (RequiredPathData (Fin n)) + bad : BadData n + deriving DecidableEq + +structure FreshAttachmentData (n : ℕ) where + i : Fin n + j : Fin n + required : List (RequiredPathData (Fin (n + 1))) + bad : BadData (n + 1) + deriving DecidableEq + +variable {n : ℕ} + +def EdgeAttachmentData.Check (H : SimpleGraph (Fin n)) (M : ForbiddenMatrix n) + (k t : ℕ) (c : EdgeAttachmentData n) : Prop := + (∀ p ∈ c.required, p.Check (addedEdgeGraph H c.i c.j) k) ∧ + c.bad.Check (addedEdgeGraph H c.i c.j) + (fun a b => M a b ∪ requiredMatrix k c.required a b) k t + +def FreshAttachmentData.Check (H : SimpleGraph (Fin n)) (M : ForbiddenMatrix n) + (k t : ℕ) (c : FreshAttachmentData n) : Prop := + c.i ≠ c.j ∧ (∀ p ∈ c.required, p.Check (freshGraph H c.i c.j) k) ∧ + c.bad.Check (freshGraph H c.i c.j) + (fun a b => freshMatrix M a b ∪ requiredMatrix k c.required a b) k t + +instance (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] (M : ForbiddenMatrix n) + (k t : ℕ) (c : EdgeAttachmentData n) : Decidable (c.Check H M k t) := + inferInstanceAs (Decidable (_ ∧ _)) + +instance (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] (M : ForbiddenMatrix n) + (k t : ℕ) (c : FreshAttachmentData n) : Decidable (c.Check H M k t) := + inferInstanceAs (Decidable (_ ∧ _)) + +variable {V : Type} [Fintype V] {G : SimpleGraph V} {H : SimpleGraph (Fin n)} + +theorem EdgeAttachmentData.forbids (hCE : CEAlphaTwo) {k t : ℕ} + (hk : 5 ≤ k) (ht : 1 ≤ t) (hcycle : ¬ HasCycle G (k + 1)) + (hclique : G.cliqueNum ≤ t) (hbound : IndependenceBound G k) + (f : H →g G) (hf : Function.Injective f) {X : Finset V} + (hfX : ∀ i, f i ∈ X) (hX : X.card = n) + {M : ForbiddenMatrix n} (hM : M.Sound G X f) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (c : EdgeAttachmentData n) (hc : c.Check H M k t) : + ¬ OutsidePath G (X : Set V) (f c.i) (f c.j) 0 := by + intro h + let F := addedEdgeHom f (outsidePath_zero.mp h) + have hR := requiredMatrix_sound (by omega) hcycle F hf hfX c.required hc.1 + exact c.bad.false_of_check hCE hk ht hcycle hclique hbound F hf hfX hX + (hM.union hR) hexpand hc.2 + +theorem FreshAttachmentData.forbids (hCE : CEAlphaTwo) {k t : ℕ} + (hk : 5 ≤ k) (ht : 1 ≤ t) (hcycle : ¬ HasCycle G (k + 1)) + (hclique : G.cliqueNum ≤ t) (hbound : IndependenceBound G k) + (f : H →g G) (hf : Function.Injective f) {X : Finset V} + (hfX : ∀ i, f i ∈ X) (hX : X.card = n) + {M : ForbiddenMatrix n} (hM : M.Sound G X f) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (c : FreshAttachmentData n) (hc : c.Check H M k t) : + ¬ OutsidePath G (X : Set V) (f c.i) (f c.j) 1 := by + classical + intro h + obtain ⟨z, hz, hiz, hjz⟩ := (outsidePath_one_iff_common_neighbor + (fun he => hc.1 (hf he))).mp h + have hjz' := hjz.symm + let F := freshHom f z hiz hjz' + have hF := freshHom_injective f hf hfX hz hiz hjz' + have hFX := freshHom_mem f hfX hiz hjz' + have hX' : (insert z X).card = n + 1 := by rw [Finset.card_insert_of_notMem hz, hX] + have hM' := freshMatrix_sound f hM hiz hjz' + have hR := requiredMatrix_sound (by omega) hcycle F hF hFX c.required hc.2.1 + exact c.bad.false_of_check hCE hk ht hcycle hclique hbound F hF hFX hX' + (hM'.union hR) hexpand hc.2.2 + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ClosureSteps.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ClosureSteps.lean new file mode 100644 index 0000000000000000000000000000000000000000..a52ea7a7268220d95ac7cebcbaf7e67062524fd6 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ClosureSteps.lean @@ -0,0 +1,110 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ClosureCertificates + +namespace OAI + +/-! A finite sequence of locally checked hypothetical attachments builds +only sound forbidden entries. Every step reads the preceding matrix. -/ + +namespace CycleClique.Construction +inductive ClosureStep (n : ℕ) + | edge : EdgeAttachmentData n → ClosureStep n + | fresh : FreshAttachmentData n → ClosureStep n + deriving DecidableEq + +namespace ClosureStep + +variable {n : ℕ} + +def source : ClosureStep n → Fin n + | .edge c => c.i + | .fresh c => c.i + +def target : ClosureStep n → Fin n + | .edge c => c.j + | .fresh c => c.j + +def parameter : ClosureStep n → ℕ + | .edge _ => 0 + | .fresh _ => 1 + +def Check (H : SimpleGraph (Fin n)) (M : ForbiddenMatrix n) (k t : ℕ) : ClosureStep n → Prop + | .edge c => c.Check H M k t + | .fresh c => c.Check H M k t + +instance (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] (M : ForbiddenMatrix n) + (k t : ℕ) (c : ClosureStep n) : Decidable (c.Check H M k t) := by + cases c <;> dsimp only [Check] <;> infer_instance + +def entryMatrix (c : ClosureStep n) : ForbiddenMatrix n := fun i j => + if (i = c.source ∧ j = c.target) ∨ (i = c.target ∧ j = c.source) + then {c.parameter} else ∅ + +def apply (c : ClosureStep n) (M : ForbiddenMatrix n) : ForbiddenMatrix n := + fun i j => M i j ∪ c.entryMatrix i j + +end ClosureStep + +variable {n : ℕ} + +def closureMatrix (M : ForbiddenMatrix n) : List (ClosureStep n) → ForbiddenMatrix n + | [] => M + | c :: C => closureMatrix (c.apply M) C + +def ClosureCheck (H : SimpleGraph (Fin n)) (M : ForbiddenMatrix n) (k t : ℕ) : + List (ClosureStep n) → Prop + | [] => True + | c :: C => c.Check H M k t ∧ ClosureCheck H (c.apply M) k t C + +instance (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] (M : ForbiddenMatrix n) + (k t : ℕ) (C : List (ClosureStep n)) : Decidable (ClosureCheck H M k t C) := by + induction C generalizing M with + | nil => exact isTrue trivial + | cons c C ih => + letI := ih (c.apply M) + exact inferInstanceAs (Decidable (_ ∧ _)) + +variable {V : Type} [Fintype V] {G : SimpleGraph V} {H : SimpleGraph (Fin n)} + +theorem ClosureStep.apply_sound (hCE : CEAlphaTwo) {k t : ℕ} + (hk : 5 ≤ k) (ht : 1 ≤ t) (hcycle : ¬ HasCycle G (k + 1)) + (hclique : G.cliqueNum ≤ t) (hbound : IndependenceBound G k) + (f : H →g G) (hf : Function.Injective f) {X : Finset V} + (hfX : ∀ i, f i ∈ X) (hX : X.card = n) + {M : ForbiddenMatrix n} (hM : M.Sound G X f) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (c : ClosureStep n) (hc : c.Check H M k t) : (c.apply M).Sound G X f := by + have hb : ¬ OutsidePath G (X : Set V) (f c.source) (f c.target) c.parameter := by + cases c with + | edge c => exact c.forbids hCE hk ht hcycle hclique hbound f hf hfX hX hM hexpand hc + | fresh c => exact c.forbids hCE hk ht hcycle hclique hbound f hf hfX hX hM hexpand hc + apply hM.union + intro i j d hd + have hpair : (i = c.source ∧ j = c.target) ∨ (i = c.target ∧ j = c.source) := by + by_contra hn + simp only [ClosureStep.entryMatrix, hn, ↓reduceIte, Finset.notMem_empty] at hd + have heq : d = c.parameter := by + simpa only [ClosureStep.entryMatrix, hpair, ↓reduceIte, Finset.mem_singleton] using hd + subst d + rcases hpair with ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩ + · exact hb + · exact fun h => hb h.reverse + +theorem closureMatrix_sound (hCE : CEAlphaTwo) {k t : ℕ} + (hk : 5 ≤ k) (ht : 1 ≤ t) (hcycle : ¬ HasCycle G (k + 1)) + (hclique : G.cliqueNum ≤ t) (hbound : IndependenceBound G k) + (f : H →g G) (hf : Function.Injective f) {X : Finset V} + (hfX : ∀ i, f i ∈ X) (hX : X.card = n) + {M : ForbiddenMatrix n} (hM : M.Sound G X f) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (C : List (ClosureStep n)) (hC : ClosureCheck H M k t C) : + (closureMatrix M C).Sound G X f := by + induction C generalizing M with + | nil => exact hM + | cons c C ih => + exact ih (c.apply_sound hCE hk ht hcycle hclique hbound f hf hfX hX hM hexpand hC.1) hC.2 + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ColouredPath.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ColouredPath.lean new file mode 100644 index 0000000000000000000000000000000000000000..99a0a8cfe1c0cc8caad310bf1b79bba1306261b3 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ColouredPath.lean @@ -0,0 +1,49 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PathRotation +import Mathlib.Combinatorics.SimpleGraph.Bipartite +import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected + +namespace OAI + +/-! +# Starting the coloured-path argument + +The first step of manuscript Lemma `clq:coloured-path` is proved by +walk induction: preservation of colour across two steps, together with +one monochromatic edge, makes the colour constant on its component. +-/ + +namespace CycleClique.Construction +private theorem color_eq_of_walk {V : Type*} {G : SimpleGraph V} (χ : V → Fin 2) + (htwo : ∀ {u x v}, G.Adj u x → G.Adj x v → χ u = χ v) + {u v w : V} (p : G.Walk v w) (huv : G.Adj u v) (heq : χ u = χ v) : χ w = χ v := by + induction p generalizing u with + | nil => rfl + | @cons v z w hvz p ih => + have hχ : χ v = χ z := heq.symm.trans (htwo huv hvz) + exact (ih hvz hχ).trans hχ.symm + +/-- In a connected nonbipartite graph, any nonconstant two-colouring +has differently coloured vertices sharing a neighbour. -/ +theorem differently_colored_common_neighbors {V : Type*} {G : SimpleGraph V} + (hconnected : G.Connected) (hnonbipartite : ¬ G.IsBipartite) + (χ : V → Fin 2) (hnonconstant : ∃ u v, χ u ≠ χ v) : + ∃ x y z, G.Adj x y ∧ G.Adj x z ∧ χ y ≠ χ z := by + classical + by_contra hnone + have htwo : ∀ {u x v}, G.Adj u x → G.Adj x v → χ u = χ v := by + intro u x v hux hxv + by_contra hχ + exact hnone ⟨x, u, v, hux.symm, hxv, hχ⟩ + have hproper : ∀ {u v}, G.Adj u v → χ u ≠ χ v := by + intro u v huv heq + have hconstant : ∀ w, χ w = χ v := by + intro w + obtain ⟨p⟩ := hconnected v w + exact color_eq_of_walk χ htwo p huv heq + obtain ⟨a, b, hab⟩ := hnonconstant + exact hab ((hconstant a).trans (hconstant b).symm) + exact hnonbipartite ⟨SimpleGraph.Coloring.mk χ hproper⟩ + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ColouredPathFull.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ColouredPathFull.lean new file mode 100644 index 0000000000000000000000000000000000000000..ad34d138daac5743c59fe4074c378ab3bc4152c1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ColouredPathFull.lean @@ -0,0 +1,160 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.EndpointStructure +import OAI.Combinatorics.Ramsey.CycleClique.Construction.DeletionOrder +import OAI.Combinatorics.Ramsey.CycleClique.Construction.AttachmentResidual +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ResidualPaths + +namespace OAI + +/-! The full prescribed-length coloured-path lemma of manuscript Section 3. -/ + +namespace CycleClique.Construction +private noncomputable def indexedSupport {V : Type*} {r : ℕ} + (f : Fin (r + 1) → V) : Finset V := by + classical + exact Finset.univ.image f + +private theorem mem_indexedSupport {V : Type*} {r : ℕ} {f : Fin (r + 1) → V} {v : V} : + v ∈ indexedSupport f ↔ ∃ i, f i = v := by + classical + simp [indexedSupport] + +private theorem indexedSupport_range {V : Type*} {r : ℕ} (f : Fin (r + 1) → V) : + Set.range f = (indexedSupport f : Set V) := by + ext v + exact mem_indexedSupport.symm + +private theorem indexedSupport_card {V : Type*} {r : ℕ} {f : Fin (r + 1) → V} + (hf : Function.Injective f) : (indexedSupport f).card = r + 1 := by + classical + rw [indexedSupport, Finset.card_image_of_injective _ hf, Finset.card_univ, Fintype.card_fin] + +/-- Prescribed-length paths with differently coloured endpoints. -/ +theorem colored_path_prescribed_length {V : Type*} [Fintype V] [DecidableEq V] + {H : SimpleGraph V} {s : ℕ} (hs : 4 ≤ s) + (hconn : H.Connected) (hnonbip : ¬ H.IsBipartite) (hno : H.cliqueNum < s) + (hdegree : ∀ v, s ≤ (H.neighborSet v).ncard) + (hpair : ∀ a b, a ≠ b → ¬ H.Adj a b → + 2 * s ≤ (closedNeighborhood H {a, b}).card) + (χ : V → Fin 2) (hnonconstant : ∃ a b, χ a ≠ χ b) + {ℓ : ℕ} (hℓ : 1 ≤ ℓ) (hℓmax : ℓ ≤ 2 * s - 2) : + ∃ g : Fin (ℓ + 1) → V, IsIndexedPath H g ∧ χ (g 0) ≠ χ (g (Fin.last ℓ)) := by + classical + by_contra hnone + obtain ⟨x, y, z, hxy, hxz, hyz⟩ := + differently_colored_common_neighbors hconn hnonbip χ hnonconstant + let D := H.induce {v | v ≠ y ∧ v ≠ z} + let x' : {v : V | v ≠ y ∧ v ≠ z} := ⟨x, hxy.ne, hxz.ne⟩ + let C := D.connectedComponentMk x' + let U := componentVertices C + have hxU : x ∈ U := mem_componentVertices.mpr + ⟨⟨x', SimpleGraph.ConnectedComponent.connectedComponentMk_mem⟩, rfl⟩ + obtain ⟨hyU, hzU⟩ := deleted_not_componentVertices C + change y ∉ U at hyU + change z ∉ U at hzU + have hUavoid : ∀ a ∈ U, a ≠ y ∧ a ≠ z := fun a ha => + ⟨ne_of_mem_of_not_mem ha hyU, ne_of_mem_of_not_mem ha hzU⟩ + have hcoverU : ∀ a ∈ U, ∀ b, H.Adj a b → b ∈ U ∨ b = y ∨ b = z := by + intro a ha b hab + exact componentVertices_neighbor_cover C ha hab + have hUconn : (H.induce (U : Set V)).Connected := componentVertices_connected C + obtain ⟨r, f, hf, hstart, hfU, hmax⟩ := exists_longest_path_in H U hxU + let W := indexedSupport f + have hWcard : W.card = r + 1 := indexedSupport_card hf.1 + have hWU : W ⊆ U := by + intro v hv + obtain ⟨i, rfl⟩ := mem_indexedSupport.mp hv + exact hfU i + have hspanning : IsSpanningPath H x W f := ⟨hf.1, hf.2, hstart, indexedSupport_range f⟩ + have havoid : ∀ i, f i ≠ y ∧ f i ≠ z := fun i => hUavoid _ (hfU i) + have hrshort := no_colored_path_start_bound hxy hxz χ hyz hℓ hnone hf hstart havoid + have hshort : W.card + 2 < 2 * s := by omega + let E := pathEnds H x W r + have hstructure := endpoint_structure hs hno hdegree hpair hyU hzU hWU hcoverU + hspanning hWcard hshort hmax + obtain ⟨hEclique, hElower, hEupper, u, huU, huE, htwo, hfull, w, hw, hwy, hwz⟩ := hstructure + change H.IsClique (E : Set V) at hEclique + change s - 2 ≤ E.card at hElower + change E.card ≤ s - 1 at hEupper + change u ∈ U at huU + change u ∉ E at huE + change w ∈ E at hw + have hEU : E ⊆ U := (pathEnds_subset H x W r).trans hWU + have hattach : ∀ e ∈ E, ∀ v ∈ U, H.Adj e v → v ∉ E → v = u := by + intro e he v hv hev hvE + rcases hfull e he v hev with hv' | hvu | rfl | rfl + · exact False.elim (hvE hv') + · exact hvu + · exact False.elim (hyU hv) + · exact False.elim (hzU hv) + have hUnotclique := not_clique_of_two_deleted_neighborhoods + ⟨x, hxU⟩ hyU hno (fun v _ => hdegree v) hcoverU + have hUorder := two_deleted_component_order hUnotclique hcoverU hpair + let T := U \ E + have hTset : (T : Set V) = {v | v ∈ U ∧ v ∉ E} := by ext v; simp [T] + have hTsum : T.card + E.card = U.card := Finset.card_sdiff_add_card_eq_card hEU + have hTcard : 2 ≤ T.card := by omega + have huT : u ∈ T := Finset.mem_sdiff.mpr ⟨huU, huE⟩ + have hTconn : (H.induce (T : Set V)).Connected := by + rw [hTset] + exact connected_induce_difference_single_attachment hUconn huU huE hattach + obtain ⟨q, g, hg, hgstart, hgT, hgmax⟩ := exists_longest_path_in H T huT + have hq : 1 ≤ q := restricted_longest_nontrivial hTconn hTcard huT hgmax + let R := indexedSupport g + let v := g (Fin.last q) + have hRcard : R.card = q + 1 := indexedSupport_card hg.1 + have hRT : R ⊆ T := by + intro a ha + obtain ⟨i, rfl⟩ := mem_indexedSupport.mp ha + exact hgT i + have hvR : v ∈ R := mem_indexedSupport.mpr ⟨Fin.last q, rfl⟩ + have huR : u ∈ R := mem_indexedSupport.mpr ⟨0, hgstart⟩ + have hvU : v ∈ U := (Finset.mem_sdiff.mp (hRT hvR)).1 + have hvE : v ∉ E := (Finset.mem_sdiff.mp (hRT hvR)).2 + have hvu : v ≠ u := by + intro heq + have hidx := hg.1 (heq.trans hgstart.symm) + have hval := congrArg Fin.val hidx + simp only [Fin.val_last, Fin.val_zero] at hval + omega + have hspanningR : IsSpanningPath H u R g := + ⟨hg.1, hg.2, hgstart, indexedSupport_range g⟩ + have hvEnd : v ∈ pathEnds H u R q := mem_pathEnds.mpr ⟨g, hspanningR, rfl⟩ + have hcoverv : ∀ a, H.Adj v a → a ∈ R ∨ a = y ∨ a = z := by + intro a hva + rcases hcoverU v hvU a hva with haU | hay | haz + · have haE : a ∉ E := by + intro ha + exact hvu (hattach a ha v hvU hva.symm hvE) + have haT : a ∈ T := Finset.mem_sdiff.mpr ⟨haU, haE⟩ + exact Or.inl (restricted_endpoint_neighbors hRT hgmax hvEnd a haT hva) + · exact Or.inr (Or.inl hay) + · exact Or.inr (Or.inr haz) + have hvw : v ≠ w := (ne_of_mem_of_not_mem hw hvE).symm + have hnonadj : ¬ H.Adj v w := fun h => hvu (hattach w hw v hvU h.symm hvE) + have hcombined := endpoint_residual_order huR hvR hw hcoverv (hfull w hw) + (hpair v w hvw hnonadj) + change 2 * s - 2 ≤ E.card + R.card at hcombined + have hRlist := indexedPath_ofFn_chain hg + have hRhead : (List.ofFn g).head? = some u := by rw [List.ofFn_succ]; simp [hgstart] + have hRmem : ∀ a ∈ List.ofFn g, a ∈ R := by + intro a ha + exact mem_indexedSupport.mpr ((List.mem_ofFn' g a).mp ha) + have hRoutside : ∀ a ∈ List.ofFn g, a ∉ E := by + intro a ha + exact (Finset.mem_sdiff.mp (hRT (hRmem a ha))).2 + obtain ⟨L, hL, hLchain, hLhead, hLlen, hLmem⟩ := clique_join_remaining_path + hEclique hw htwo (List.ofFn g) hRlist.1 hRlist.2 hRhead hRoutside + have hLavoid : ∀ a ∈ L, a ≠ y ∧ a ≠ z := by + intro a ha + have haU : a ∈ U := by + rcases hLmem a ha with haE | haR + · exact hEU haE + · exact (Finset.mem_sdiff.mp (hRT (hRmem a haR))).1 + exact hUavoid a haU + have hLshort := no_colored_path_list_bound hwy hwz χ hyz hℓ hnone hL hLchain hLhead hLavoid + simp only [List.length_ofFn] at hLlen + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ColouredPathStart.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ColouredPathStart.lean new file mode 100644 index 0000000000000000000000000000000000000000..34d7d13f9aba6abe342e593a9b3f751311b93a97 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ColouredPathStart.lean @@ -0,0 +1,74 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ColouredPath +import OAI.Combinatorics.Ramsey.CycleClique.Construction.DeletedComponent + +namespace OAI + +/-! Initial longest-path obstruction in the coloured-path proof. -/ + +namespace CycleClique.Construction +theorem indexedPath_prefix {V : Type*} {G : SimpleGraph V} {q r : ℕ} + {f : Fin (q + 1) → V} (hf : IsIndexedPath G f) (hrq : r ≤ q) : + IsIndexedPath G (fun i : Fin (r + 1) => f (Fin.castLE (by omega) i)) := by + refine ⟨hf.1.comp (Fin.castLE_injective _), ?_⟩ + intro i + exact hf.2 ⟨i.val, by have := i.isLt; omega⟩ + +theorem indexedPath_cons {V : Type*} {G : SimpleGraph V} {r : ℕ} + {f : Fin (r + 1) → V} (hf : IsIndexedPath G f) {v : V} + (hv : v ∉ Set.range f) (hadj : G.Adj v (f 0)) : + IsIndexedPath G (Fin.cons v f) := by + refine ⟨Fin.cons_injective_iff.mpr ⟨hv, hf.1⟩, ?_⟩ + intro i + refine Fin.cases ?_ (fun j => ?_) i + · simpa using hadj + · have heq : j.succ.castSucc = j.castSucc.succ := Fin.ext rfl + rw [heq] + simpa only [Fin.cons_succ] using hf.2 j + +/-- One of two differently coloured common neighbours can prefix any +path avoiding them, producing different colours at its two ends. -/ +theorem colored_path_of_common_neighbor {V : Type*} {H : SimpleGraph V} + {x y z : V} (hxy : H.Adj x y) (hxz : H.Adj x z) + (χ : V → Fin 2) (hyz : χ y ≠ χ z) {q : ℕ} + {f : Fin (q + 1) → V} (hf : IsIndexedPath H f) (hstart : f 0 = x) + (havoid : ∀ i, f i ≠ y ∧ f i ≠ z) : + ∃ g : Fin (q + 1 + 1) → V, IsIndexedPath H g ∧ + χ (g 0) ≠ χ (g (Fin.last (q + 1))) := by + have hyavoid : y ∉ Set.range f := by + rintro ⟨i, hi⟩ + exact (havoid i).1 hi + have hzavoid : z ∉ Set.range f := by + rintro ⟨i, hi⟩ + exact (havoid i).2 hi + by_cases hycol : χ y = χ (f (Fin.last q)) + · refine ⟨Fin.cons z f, indexedPath_cons hf hzavoid (by rw [hstart]; exact hxz.symm), ?_⟩ + simp only [Fin.cons_zero, Fin.cons_last] + intro hzcol + exact hyz (hycol.trans hzcol.symm) + · refine ⟨Fin.cons y f, indexedPath_cons hf hyavoid (by rw [hstart]; exact hxy.symm), ?_⟩ + simpa only [Fin.cons_zero, Fin.cons_last] using hycol + +/-- Under failure of the desired exact-length coloured path, every +path starting at the common neighbour in the deletion has smaller order. -/ +theorem no_colored_path_start_bound {V : Type*} {H : SimpleGraph V} + {x y z : V} (hxy : H.Adj x y) (hxz : H.Adj x z) + (χ : V → Fin 2) (hyz : χ y ≠ χ z) {ℓ : ℕ} (hℓ : 1 ≤ ℓ) + (hno : ¬ ∃ g : Fin (ℓ + 1) → V, IsIndexedPath H g ∧ + χ (g 0) ≠ χ (g (Fin.last ℓ))) + {q : ℕ} {f : Fin (q + 1) → V} (hf : IsIndexedPath H f) (hstart : f 0 = x) + (havoid : ∀ i, f i ≠ y ∧ f i ≠ z) : q + 1 < ℓ := by + cases ℓ with + | zero => omega + | succ ℓ => + by_contra hn + have hbound : ℓ ≤ q := by omega + let f' : Fin (ℓ + 1) → V := fun i => f (Fin.castLE (by omega) i) + have hf' : IsIndexedPath H f' := indexedPath_prefix hf hbound + have hstart' : f' 0 = x := hstart + have havoid' : ∀ i, f' i ≠ y ∧ f' i ≠ z := fun i => havoid _ + obtain ⟨g, hg, hcolor⟩ := colored_path_of_common_neighbor hxy hxz χ hyz hf' hstart' havoid' + exact hno ⟨g, hg, hcolor⟩ + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ComponentVertices.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ComponentVertices.lean new file mode 100644 index 0000000000000000000000000000000000000000..a9af36e5130c318f799a1a99b32ff73ff907f5e7 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ComponentVertices.lean @@ -0,0 +1,99 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.DeletedComponent + +namespace OAI + +/-! Realizing a component of the two-vertex deletion as ambient vertices. -/ + +namespace CycleClique.Construction +def deletedComponentEmbedding {V : Type*} {H : SimpleGraph V} {y z : V} + (C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) : C ↪ V := + ⟨fun v => v.val.val, fun _ _ h => Subtype.ext (Subtype.ext h)⟩ + +noncomputable def componentVertices {V : Type*} [Fintype V] + {H : SimpleGraph V} {y z : V} + (C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) : Finset V := by + classical + exact Finset.univ.map (deletedComponentEmbedding C) + +@[simp] theorem mem_componentVertices {V : Type*} [Fintype V] + {H : SimpleGraph V} {y z v : V} + {C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent} : + v ∈ componentVertices C ↔ ∃ u : C, u.val.val = v := by + classical + constructor + · intro hv + change v ∈ Finset.univ.map (deletedComponentEmbedding C) at hv + obtain ⟨u, _, hu⟩ := Finset.mem_map.mp hv + exact ⟨u, hu⟩ + · rintro ⟨u, hu⟩ + change v ∈ Finset.univ.map (deletedComponentEmbedding C) + exact Finset.mem_map.mpr ⟨u, Finset.mem_univ _, hu⟩ + +theorem deleted_not_componentVertices {V : Type*} [Fintype V] + {H : SimpleGraph V} {y z : V} + (C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) : + y ∉ componentVertices C ∧ z ∉ componentVertices C := by + constructor + · rintro hy + obtain ⟨u, hu⟩ := mem_componentVertices.mp hy + exact u.val.property.1 hu + · rintro hz + obtain ⟨u, hu⟩ := mem_componentVertices.mp hz + exact u.val.property.2 hu + +theorem componentVertices_neighbor_cover {V : Type*} [Fintype V] + {H : SimpleGraph V} {y z : V} + (C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) + {u v : V} (hu : u ∈ componentVertices C) (h : H.Adj u v) : + v ∈ componentVertices C ∨ v = y ∨ v = z := by + obtain ⟨u', rfl⟩ := mem_componentVertices.mp hu + rcases deleted_component_neighbor_cover C u' h with hy | hz | ⟨w, _, hw⟩ + · exact Or.inr (Or.inl hy) + · exact Or.inr (Or.inr hz) + · exact Or.inl (mem_componentVertices.mpr ⟨w, hw⟩) + +theorem componentVertices_connected {V : Type*} [Fintype V] + {H : SimpleGraph V} {y z : V} + (C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) : + (H.induce (componentVertices C : Set V)).Connected := by + classical + let f : C → (componentVertices C : Set V) := fun u => + ⟨u.val.val, mem_componentVertices.mpr ⟨u, rfl⟩⟩ + let φ : C.toSimpleGraph →g H.induce (componentVertices C : Set V) := + { toFun := f, map_rel' := fun h => h } + have hsurj : Function.Surjective φ := by + intro v + obtain ⟨u, hu⟩ := mem_componentVertices.mp v.property + exact ⟨u, Subtype.ext hu⟩ + exact C.connected_toSimpleGraph.map φ hsurj + +/-- Restriction to a vertex set closed under all other neighbours loses +at most the two deleted neighbours. -/ +theorem induced_degree_loss_pair {V : Type*} [Fintype V] + {H : SimpleGraph V} {U : Finset V} {y z : V} + (hcover : ∀ u ∈ U, ∀ v, H.Adj u v → v ∈ U ∨ v = y ∨ v = z) + (u : (U : Set V)) : + (H.neighborSet u.val).ncard ≤ ((H.induce (U : Set V)).neighborSet u).ncard + 2 := by + classical + let K := H.induce (U : Set V) + let N : Finset V := (K.neighborFinset u).map ⟨Subtype.val, Subtype.val_injective⟩ + have hsub : H.neighborFinset u.val ⊆ N ∪ {y, z} := by + intro v hv + have hadj := (H.mem_neighborFinset u.val v).mp hv + rcases hcover u.val u.property v hadj with hvU | rfl | rfl + · let w : (U : Set V) := ⟨v, hvU⟩ + have hw : w ∈ K.neighborFinset u := (K.mem_neighborFinset u w).mpr hadj + exact Finset.mem_union_left _ (Finset.mem_map.mpr ⟨w, hw, rfl⟩) + · simp + · simp + have hcard := (Finset.card_le_card hsub).trans (Finset.card_union_le N {y, z}) + have hpair : ({y, z} : Finset V).card ≤ 2 := Finset.card_le_two + have hN : N.card = (K.neighborFinset u).card := Finset.card_map _ + rw [hN] at hcard + have hdegree : (H.neighborFinset u.val).card ≤ (K.neighborFinset u).card + 2 := by omega + simpa only [SimpleGraph.card_neighborFinset_eq_degree, + SimpleGraph.ncard_neighborSet] using hdegree + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ConditionalMain.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ConditionalMain.lean new file mode 100644 index 0000000000000000000000000000000000000000..1eca46ad2afd13c03cbd544503322c357789df11 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ConditionalMain.lean @@ -0,0 +1,41 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.AllCheckedCertificates +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RamseyFromFiniteCoverage + +namespace OAI + +/-! The full main Ramsey theorem, conditional only on the precisely stated +published Chvátal–Erdős input. Finite obstruction inputs are discharged by +kernel-checked concrete certificates and their exhaustive coverage. -/ + +namespace CycleClique.Construction +theorem finiteCertificateCoverage : FiniteCertificateCoverage := + fun _ _ hk hk' ht htk ht' hhalf => checked_certificate_coverage hk hk' ht htk ht' hhalf + +theorem no_expanded_counterexample (hCE : CEAlphaTwo) + {V : Type} [Fintype V] {G : SimpleGraph V} {k a : ℕ} + (hk : 5 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) + (hcard : Fintype.card V = k * a + 1) (hI : IndependenceBound G a) + (hcycle : ¬ HasCycle G (k + 1)) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) : False := + no_expanded_counterexample_of_finite_coverage hCE finiteCertificateCoverage + hk ha hak hcard hI hcycle hexpand + +theorem cycle_clique_upper (hCE : CEAlphaTwo) {k a : ℕ} + (hk : 3 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) : + RamseyProperty (k + 1) (a + 1) (k * a + 1) := + cycle_clique_upper_of_finite_coverage hCE finiteCertificateCoverage hk ha hak + +theorem cycle_clique_main (hCE : CEAlphaTwo) {m n : ℕ} + (hn : 3 ≤ n) (hnm : n ≤ m) (hexcept : (m, n) ≠ (3, 3)) : + IsRamseyNumber m n ((m - 1) * (n - 1) + 1) := + cycle_clique_main_of_finite_coverage hCE finiteCertificateCoverage hn hnm hexcept + +theorem cycle_clique_ramsey (hCE : CEAlphaTwo) {m n : ℕ} + (hn : 3 ≤ n) (hnm : n ≤ m) : + IsRamseyNumber m n (if m = 3 ∧ n = 3 then 6 else (m - 1) * (n - 1) + 1) := + cycle_clique_ramsey_of_finite_coverage hCE finiteCertificateCoverage hn hnm + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ConnectedLongPath.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ConnectedLongPath.lean new file mode 100644 index 0000000000000000000000000000000000000000..611c7728d41eeac42c73cded65f660b9b97ca525 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ConnectedLongPath.lean @@ -0,0 +1,104 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.GlobalLongest +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PathRotation + +namespace OAI + +/-! A connected graph of minimum degree s has a path of order at least min(|V|,2s+1). -/ + +namespace CycleClique.Construction +private theorem last_degree_index_bound {V : Type*} [Fintype V] {G : SimpleGraph V} [DecidableRel G.Adj] + {r : ℕ} {f : Fin (r + 1) → V} + (hcover : ∀ v, G.Adj (f (Fin.last r)) v → v ∈ Set.range f) : + (G.neighborSet (f (Fin.last r))).ncard ≤ + (Finset.univ.filter (fun i : Fin r => G.Adj (f (Fin.last r)) (f i.castSucc))).card := by + classical + let A := Finset.univ.filter (fun i : Fin r => G.Adj (f (Fin.last r)) (f i.castSucc)) + have hsub : G.neighborFinset (f (Fin.last r)) ⊆ A.image (fun i => f i.castSucc) := by + intro v hv + have hadj := (G.mem_neighborFinset _ _).mp hv + obtain ⟨j, hj⟩ := hcover v hadj + have hjne : j ≠ Fin.last r := fun h => hadj.ne (by simpa only [h] using hj) + have hjlt : j.val < r := by + have := j.isLt + have hneq : j.val ≠ r := fun h => hjne (Fin.ext h) + omega + let i : Fin r := ⟨j.val, hjlt⟩ + have hij : i.castSucc = j := Fin.ext rfl + apply Finset.mem_image.mpr + refine ⟨i, ?_, ?_⟩ + · simp only [A, Finset.mem_filter, Finset.mem_univ, true_and] + rwa [hij, hj] + · simpa only [hij] using hj + have h := (Finset.card_le_card hsub).trans (Finset.card_image_le) + simpa only [SimpleGraph.card_neighborFinset_eq_degree, SimpleGraph.ncard_neighborSet] using h + +private theorem first_degree_index_bound {V : Type*} [Fintype V] {G : SimpleGraph V} [DecidableRel G.Adj] + {r : ℕ} {f : Fin (r + 1) → V} + (hcover : ∀ v, G.Adj (f 0) v → v ∈ Set.range f) : + (G.neighborSet (f 0)).ncard ≤ + (Finset.univ.filter (fun i : Fin r => G.Adj (f 0) (f i.succ))).card := by + classical + let B := Finset.univ.filter (fun i : Fin r => G.Adj (f 0) (f i.succ)) + have hsub : G.neighborFinset (f 0) ⊆ B.image (fun i => f i.succ) := by + intro v hv + have hadj := (G.mem_neighborFinset _ _).mp hv + obtain ⟨j, hj⟩ := hcover v hadj + have hjne : j ≠ 0 := fun h => hadj.ne (by simpa only [h] using hj) + have hjpos : 1 ≤ j.val := by + have hneq : j.val ≠ 0 := fun h => hjne (Fin.ext (by simpa only [Fin.val_zero] using h)) + omega + let i : Fin r := ⟨j.val - 1, by have := j.isLt; omega⟩ + have hij : i.succ = j := by apply Fin.ext; dsimp [i]; omega + apply Finset.mem_image.mpr + refine ⟨i, ?_, ?_⟩ + · simp only [B, Finset.mem_filter, Finset.mem_univ, true_and] + rwa [hij, hj] + · simpa only [hij] using hj + have h := (Finset.card_le_card hsub).trans (Finset.card_image_le) + simpa only [SimpleGraph.card_neighborFinset_eq_degree, SimpleGraph.ncard_neighborSet] using h + +/-- Manuscript Lemma `clq:long-path`, in the application-sized form. -/ +theorem connected_long_path {V : Type*} [Fintype V] {G : SimpleGraph V} {s k : ℕ} + (hconn : G.Connected) (hdegree : ∀ v, s ≤ (G.neighborSet v).ncard) + (hk : k ≤ 2 * s + 1) (hcard : k ≤ Fintype.card V) : + ∃ r, ∃ f : Fin (r + 1) → V, IsIndexedPath G f ∧ k ≤ r + 1 := by + classical + let : Nonempty V := hconn.nonempty + obtain ⟨r, f, hf, hmax⟩ := exists_longest_path G + refine ⟨r, f, hf, ?_⟩ + by_contra hshort + have hlast : ∀ v, G.Adj (f (Fin.last r)) v → v ∈ Set.range f := + longest_path_endpoint_neighbors hf rfl (fun q g hg _ => hmax q g hg) + have hfirst : ∀ v, G.Adj (f 0) v → v ∈ Set.range f := by + intro v hv + have hrev := longest_path_endpoint_neighbors (indexedPath_reverse hf) rfl + (fun q g hg _ => hmax q g hg) v (by simpa using hv) + obtain ⟨j, hj⟩ := hrev + exact ⟨j.rev, hj⟩ + let A := Finset.univ.filter (fun i : Fin r => G.Adj (f (Fin.last r)) (f i.castSucc)) + let B := Finset.univ.filter (fun i : Fin r => G.Adj (f 0) (f i.succ)) + have hA : s ≤ A.card := (hdegree _).trans (last_degree_index_bound hlast) + have hB : s ≤ B.card := (hdegree _).trans (first_degree_index_bound hfirst) + have hnotdisjoint : ¬ Disjoint A B := by + intro hdisjoint + have h := Finset.card_union_of_disjoint hdisjoint + have hbound : (A ∪ B).card ≤ r := by + have hsub : A ∪ B ⊆ Finset.univ := Finset.subset_univ _ + simpa only [Finset.card_univ, Fintype.card_fin] using Finset.card_le_card hsub + omega + obtain ⟨p, hpA, hpB⟩ := Finset.not_disjoint_iff.mp hnotdisjoint + have hpA' := (Finset.mem_filter.mp hpA).2 + have hpB' := (Finset.mem_filter.mp hpB).2 + obtain ⟨hrotinj, hrotchain, hrotfirst, hrotlast, _⟩ := rotate_path f hf.1 hf.2 p hpA' + have hrot : IsIndexedPath G (f ∘ rotationIndex p) := ⟨hrotinj, hrotchain⟩ + have hclose : G.Adj ((f ∘ rotationIndex p) (Fin.last r)) ((f ∘ rotationIndex p) 0) := by + rw [hrotfirst, hrotlast] + exact hpB'.symm + have hsurj := closed_longest_path_surjective hconn hrot hmax hclose + have hfull := Fintype.card_le_of_surjective _ hsurj + simp only [Fintype.card_fin] at hfull + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK10.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK10.lean new file mode 100644 index 0000000000000000000000000000000000000000..a9846aa8166d65f643bdf7ff8cc7506a546b47f7 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK10.lean @@ -0,0 +1,3374 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK10 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage + +namespace OAI + +namespace CycleClique.Construction.CertifiedCoverage + +private theorem k10t5_cover8 : ∀ P ∈ pathPatterns 0 5 [], HasCheckedCertificate 10 5 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p0, Certificates.k10t5p0_check⟩ + +private theorem k10t5_cover7 : ∀ P ∈ pathPatterns 1 5 [], HasCheckedCertificate 10 5 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k10t5_cover8 + +private theorem k10t5_cover9 : ∀ P ∈ pathPatterns 0 4 [1], HasCheckedCertificate 10 5 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p1, Certificates.k10t5p1_check⟩ + +private theorem k10t5_cover10 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 10 5 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p2, Certificates.k10t5p2_check⟩ + +private theorem k10t5_cover11 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 10 5 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p3, Certificates.k10t5p3_check⟩ + +private theorem k10t5_cover12 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 10 5 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p4, Certificates.k10t5p4_check⟩ + +private theorem k10t5_cover13 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 10 5 ([[], [], [], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p5, Certificates.k10t5p5_check⟩ + +private theorem k10t5_cover6 : ∀ P ∈ pathPatterns 2 5 [], HasCheckedCertificate 10 5 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t5_cover7 + · intro q + fin_cases q + · exact by + intro _ + exact k10t5_cover9 + · exact by + intro _ + exact k10t5_cover10 + · exact by + intro _ + exact k10t5_cover11 + · exact by + intro _ + exact k10t5_cover12 + · exact by + intro _ + exact k10t5_cover13 + +private theorem k10t5_cover14 : ∀ P ∈ pathPatterns 1 4 [1], HasCheckedCertificate 10 5 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover15 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 10 5 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p6, Certificates.k10t5p6_check⟩ + +private theorem k10t5_cover16 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 10 5 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p7, Certificates.k10t5p7_check⟩ + +private theorem k10t5_cover17 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 10 5 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p8, Certificates.k10t5p8_check⟩ + +private theorem k10t5_cover18 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 10 5 ([[], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p9, Certificates.k10t5p9_check⟩ + +private theorem k10t5_cover19 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 10 5 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover20 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 10 5 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p10, Certificates.k10t5p10_check⟩ + +private theorem k10t5_cover21 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 10 5 ([[], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p11, Certificates.k10t5p11_check⟩ + +private theorem k10t5_cover22 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 10 5 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover23 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 10 5 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover24 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 10 5 ([[], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover5 : ∀ P ∈ pathPatterns 3 5 [], HasCheckedCertificate 10 5 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t5_cover6 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover14 + · intro q + fin_cases q + · exact by + intro _ + exact k10t5_cover15 + · exact by + intro _ + exact k10t5_cover16 + · exact by + intro _ + exact k10t5_cover17 + · exact by + intro _ + exact k10t5_cover18 + · exact by + constructor + · exact by + intro _ + exact k10t5_cover19 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k10t5_cover20 + · exact by + intro _ + exact k10t5_cover21 + · exact by + constructor + · exact by + intro _ + exact k10t5_cover22 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k10t5_cover23 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k10t5_cover24 + · intro q + exact Fin.elim0 q + +private theorem k10t5_cover26 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 10 5 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p12, Certificates.k10t5p12_check⟩ + +private theorem k10t5_cover27 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 10 5 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p13, Certificates.k10t5p13_check⟩ + +private theorem k10t5_cover28 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 10 5 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p14, Certificates.k10t5p14_check⟩ + +private theorem k10t5_cover29 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 10 5 ([[], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p15, Certificates.k10t5p15_check⟩ + +private theorem k10t5_cover25 : ∀ P ∈ pathPatterns 2 4 [1], HasCheckedCertificate 10 5 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k10t5_cover26 + · exact by + intro _ + exact k10t5_cover27 + · exact by + intro _ + exact k10t5_cover28 + · exact by + intro _ + exact k10t5_cover29 + +private theorem k10t5_cover30 : ∀ P ∈ pathPatterns 1 3 [1, 1], HasCheckedCertificate 10 5 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover31 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1], HasCheckedCertificate 10 5 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p16, Certificates.k10t5p16_check⟩ + +private theorem k10t5_cover32 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2], HasCheckedCertificate 10 5 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p17, Certificates.k10t5p17_check⟩ + +private theorem k10t5_cover33 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3], HasCheckedCertificate 10 5 ([[], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p18, Certificates.k10t5p18_check⟩ + +private theorem k10t5_cover34 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 10 5 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover35 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 10 5 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p19, Certificates.k10t5p19_check⟩ + +private theorem k10t5_cover36 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 10 5 ([[], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p20, Certificates.k10t5p20_check⟩ + +private theorem k10t5_cover37 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 10 5 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover38 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 10 5 ([[], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p21, Certificates.k10t5p21_check⟩ + +private theorem k10t5_cover39 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 10 5 ([[], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover41 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 10 5 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p22, Certificates.k10t5p22_check⟩ + +private theorem k10t5_cover42 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 10 5 ([[], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p23, Certificates.k10t5p23_check⟩ + +private theorem k10t5_cover40 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 10 5 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k10t5_cover41 + · exact by + intro _ + exact k10t5_cover42 + +private theorem k10t5_cover43 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 10 5 ([[], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p24, Certificates.k10t5p24_check⟩ + +private theorem k10t5_cover44 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 10 5 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover45 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 10 5 ([[], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover46 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 10 5 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k10t5_cover47 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 10 5 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k10t5_cover48 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 10 5 ([[], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t5_seq4 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 10 5 ([[]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k10t5_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover25 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover30 + · intro q + fin_cases q + · exact by + intro _ + exact k10t5_cover31 + · exact by + intro _ + exact k10t5_cover32 + · exact by + intro _ + exact k10t5_cover33 + · exact by + constructor + · exact by + intro _ + exact k10t5_cover34 + · intro q + fin_cases q + · exact by + intro _ + exact k10t5_cover35 + · exact by + intro _ + exact k10t5_cover36 + · exact by + constructor + · exact by + intro _ + exact k10t5_cover37 + · intro q + fin_cases q + · exact by + intro _ + exact k10t5_cover38 + · exact by + constructor + · exact by + intro _ + exact k10t5_cover39 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover40 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k10t5_cover43 + · exact by + constructor + · exact by + intro _ + exact k10t5_cover44 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k10t5_cover45 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover46 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover47 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover48 + · intro q + exact Fin.elim0 q + +private theorem k10t5_cover3 : ∀ P ∈ pathPatterns 4 5 [], HasCheckedCertificate 10 5 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact k10t5_seq4 + + +private theorem k10t5_cover50 : ∀ P ∈ pathPatterns 1 3 [1], HasCheckedCertificate 10 5 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover51 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 10 5 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p25, Certificates.k10t5p25_check⟩ + +private theorem k10t5_cover52 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 10 5 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p26, Certificates.k10t5p26_check⟩ + +private theorem k10t5_cover53 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 10 5 ([[1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p27, Certificates.k10t5p27_check⟩ + +private theorem k10t5_cover54 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 10 5 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover55 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 10 5 ([[1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p28, Certificates.k10t5p28_check⟩ + +private theorem k10t5_cover56 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 10 5 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover57 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 10 5 ([[1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover49 : ∀ P ∈ pathPatterns 3 4 [1], HasCheckedCertificate 10 5 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover50 + · intro q + fin_cases q + · exact by + intro _ + exact k10t5_cover51 + · exact by + intro _ + exact k10t5_cover52 + · exact by + intro _ + exact k10t5_cover53 + · exact by + constructor + · exact by + intro _ + exact k10t5_cover54 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k10t5_cover55 + · exact by + constructor + · exact by + intro _ + exact k10t5_cover56 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k10t5_cover57 + · intro q + exact Fin.elim0 q + +private theorem k10t5_cover59 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 10 5 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p29, Certificates.k10t5p29_check⟩ + +private theorem k10t5_cover60 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 10 5 ([[1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p30, Certificates.k10t5p30_check⟩ + +private theorem k10t5_cover58 : ∀ P ∈ pathPatterns 2 3 [1, 1], HasCheckedCertificate 10 5 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k10t5_cover59 + · exact by + intro _ + exact k10t5_cover60 + +private theorem k10t5_cover61 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1], HasCheckedCertificate 10 5 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover62 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1], HasCheckedCertificate 10 5 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p31, Certificates.k10t5p31_check⟩ + +private theorem k10t5_cover63 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2], HasCheckedCertificate 10 5 ([[1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p32, Certificates.k10t5p32_check⟩ + +private theorem k10t5_cover64 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2], HasCheckedCertificate 10 5 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover65 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1], HasCheckedCertificate 10 5 ([[1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p33, Certificates.k10t5p33_check⟩ + +private theorem k10t5_cover66 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3], HasCheckedCertificate 10 5 ([[1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover68 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 10 5 ([[1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t5p34, Certificates.k10t5p34_check⟩ + +private theorem k10t5_cover67 : ∀ P ∈ pathPatterns 2 2 [1, 2], HasCheckedCertificate 10 5 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k10t5_cover68 + +private theorem k10t5_cover69 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1], HasCheckedCertificate 10 5 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover70 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2], HasCheckedCertificate 10 5 ([[1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover71 : ∀ P ∈ pathPatterns 2 1 [1, 3], HasCheckedCertificate 10 5 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k10t5_cover72 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1], HasCheckedCertificate 10 5 ([[1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover73 : ∀ P ∈ pathPatterns 2 0 [1, 4], HasCheckedCertificate 10 5 ([[1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t5_cover75 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 10 5 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover76 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 10 5 ([[2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover74 : ∀ P ∈ pathPatterns 3 3 [2], HasCheckedCertificate 10 5 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k10t5_cover75 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k10t5_cover76 + · intro q + exact Fin.elim0 q + +private theorem k10t5_cover77 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2], HasCheckedCertificate 10 5 ([[2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k10t5_cover78 : ∀ P ∈ pathPatterns 2 1 [2, 2], HasCheckedCertificate 10 5 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k10t5_cover79 : ∀ P ∈ pathPatterns 2 0 [2, 3], HasCheckedCertificate 10 5 ([[2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t5_cover80 : ∀ P ∈ pathPatterns 3 2 [3], HasCheckedCertificate 10 5 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t5_cover81 : ∀ P ∈ pathPatterns 3 1 [4], HasCheckedCertificate 10 5 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t5_cover82 : ∀ P ∈ pathPatterns 3 0 [5], HasCheckedCertificate 10 5 ([[5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t5_seq2 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 10 5 ([] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k10t5_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover49 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover58 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover61 + · intro q + fin_cases q + · exact by + intro _ + exact k10t5_cover62 + · exact by + intro _ + exact k10t5_cover63 + · exact by + constructor + · exact by + intro _ + exact k10t5_cover64 + · intro q + fin_cases q + · exact by + intro _ + exact k10t5_cover65 + · exact by + constructor + · exact by + intro _ + exact k10t5_cover66 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover67 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover69 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k10t5_cover70 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover71 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover72 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover73 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover74 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k10t5_cover77 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover78 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover79 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover80 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover81 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t5_cover82 + · intro q + exact Fin.elim0 q + +private theorem k10t5_cover1 : ∀ P ∈ pathPatterns 5 5 [], HasCheckedCertificate 10 5 ([] ++ P) := by + apply pathPatterns_forall_step + exact k10t5_seq2 + + +theorem coverage_k10_t5 : + ∀ P ∈ pathPatterns 5 5, HasCheckedCertificate 10 5 P := + k10t5_cover1 + +private theorem k10t6_cover7 : ∀ P ∈ pathPatterns 0 4 [], HasCheckedCertificate 10 6 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p0, Certificates.k10t6p0_check⟩ + +private theorem k10t6_cover6 : ∀ P ∈ pathPatterns 1 4 [], HasCheckedCertificate 10 6 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k10t6_cover7 + +private theorem k10t6_cover8 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 10 6 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p1, Certificates.k10t6p1_check⟩ + +private theorem k10t6_cover9 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 10 6 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p2, Certificates.k10t6p2_check⟩ + +private theorem k10t6_cover10 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 10 6 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p3, Certificates.k10t6p3_check⟩ + +private theorem k10t6_cover11 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 10 6 ([[], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p4, Certificates.k10t6p4_check⟩ + +private theorem k10t6_cover5 : ∀ P ∈ pathPatterns 2 4 [], HasCheckedCertificate 10 6 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t6_cover6 + · intro q + fin_cases q + · exact by + intro _ + exact k10t6_cover8 + · exact by + intro _ + exact k10t6_cover9 + · exact by + intro _ + exact k10t6_cover10 + · exact by + intro _ + exact k10t6_cover11 + +private theorem k10t6_cover12 : ∀ P ∈ pathPatterns 1 3 [1], HasCheckedCertificate 10 6 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover13 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 10 6 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p5, Certificates.k10t6p5_check⟩ + +private theorem k10t6_cover14 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 10 6 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p6, Certificates.k10t6p6_check⟩ + +private theorem k10t6_cover15 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 10 6 ([[], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p7, Certificates.k10t6p7_check⟩ + +private theorem k10t6_cover16 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 10 6 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover17 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 10 6 ([[], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p8, Certificates.k10t6p8_check⟩ + +private theorem k10t6_cover18 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 10 6 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover19 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 10 6 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover4 : ∀ P ∈ pathPatterns 3 4 [], HasCheckedCertificate 10 6 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t6_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover12 + · intro q + fin_cases q + · exact by + intro _ + exact k10t6_cover13 + · exact by + intro _ + exact k10t6_cover14 + · exact by + intro _ + exact k10t6_cover15 + · exact by + constructor + · exact by + intro _ + exact k10t6_cover16 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k10t6_cover17 + · exact by + constructor + · exact by + intro _ + exact k10t6_cover18 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k10t6_cover19 + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover21 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 10 6 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p9, Certificates.k10t6p9_check⟩ + +private theorem k10t6_cover22 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 10 6 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p10, Certificates.k10t6p10_check⟩ + +private theorem k10t6_cover23 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 10 6 ([[], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p11, Certificates.k10t6p11_check⟩ + +private theorem k10t6_cover20 : ∀ P ∈ pathPatterns 2 3 [1], HasCheckedCertificate 10 6 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k10t6_cover21 + · exact by + intro _ + exact k10t6_cover22 + · exact by + intro _ + exact k10t6_cover23 + +private theorem k10t6_cover24 : ∀ P ∈ pathPatterns 1 2 [1, 1], HasCheckedCertificate 10 6 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover25 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1], HasCheckedCertificate 10 6 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p12, Certificates.k10t6p12_check⟩ + +private theorem k10t6_cover26 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2], HasCheckedCertificate 10 6 ([[], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p13, Certificates.k10t6p13_check⟩ + +private theorem k10t6_cover27 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 10 6 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover28 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 10 6 ([[], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p14, Certificates.k10t6p14_check⟩ + +private theorem k10t6_cover29 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 10 6 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover31 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 10 6 ([[], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p15, Certificates.k10t6p15_check⟩ + +private theorem k10t6_cover30 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 10 6 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k10t6_cover31 + +private theorem k10t6_cover32 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 10 6 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover33 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 10 6 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k10t6_cover34 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 10 6 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover3 : ∀ P ∈ pathPatterns 4 4 [], HasCheckedCertificate 10 6 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t6_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover20 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover24 + · intro q + fin_cases q + · exact by + intro _ + exact k10t6_cover25 + · exact by + intro _ + exact k10t6_cover26 + · exact by + constructor + · exact by + intro _ + exact k10t6_cover27 + · intro q + fin_cases q + · exact by + intro _ + exact k10t6_cover28 + · exact by + constructor + · exact by + intro _ + exact k10t6_cover29 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover30 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k10t6_cover32 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover33 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover34 + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover36 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 10 6 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover37 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 10 6 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p16, Certificates.k10t6p16_check⟩ + +private theorem k10t6_cover38 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 10 6 ([[], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p17, Certificates.k10t6p17_check⟩ + +private theorem k10t6_cover39 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 10 6 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover40 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 10 6 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover35 : ∀ P ∈ pathPatterns 3 3 [1], HasCheckedCertificate 10 6 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover36 + · intro q + fin_cases q + · exact by + intro _ + exact k10t6_cover37 + · exact by + intro _ + exact k10t6_cover38 + · exact by + constructor + · exact by + intro _ + exact k10t6_cover39 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k10t6_cover40 + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover42 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 10 6 ([[], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p18, Certificates.k10t6p18_check⟩ + +private theorem k10t6_cover41 : ∀ P ∈ pathPatterns 2 2 [1, 1], HasCheckedCertificate 10 6 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k10t6_cover42 + +private theorem k10t6_cover43 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1], HasCheckedCertificate 10 6 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover44 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1], HasCheckedCertificate 10 6 ([[], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p19, Certificates.k10t6p19_check⟩ + +private theorem k10t6_cover45 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2], HasCheckedCertificate 10 6 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover46 : ∀ P ∈ pathPatterns 2 1 [1, 2], HasCheckedCertificate 10 6 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k10t6_cover47 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1], HasCheckedCertificate 10 6 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover48 : ∀ P ∈ pathPatterns 2 0 [1, 3], HasCheckedCertificate 10 6 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover50 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 10 6 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover49 : ∀ P ∈ pathPatterns 3 2 [2], HasCheckedCertificate 10 6 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k10t6_cover50 + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover51 : ∀ P ∈ pathPatterns 2 0 [2, 2], HasCheckedCertificate 10 6 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover52 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 10 6 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover53 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 10 6 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover2 : ∀ P ∈ pathPatterns 5 4 [], HasCheckedCertificate 10 6 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t6_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover35 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover41 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover43 + · intro q + fin_cases q + · exact by + intro _ + exact k10t6_cover44 + · exact by + constructor + · exact by + intro _ + exact k10t6_cover45 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover46 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover47 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover48 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover49 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover51 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover52 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover53 + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover56 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 10 6 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p20, Certificates.k10t6p20_check⟩ + +private theorem k10t6_cover57 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 10 6 ([[1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p21, Certificates.k10t6p21_check⟩ + +private theorem k10t6_cover55 : ∀ P ∈ pathPatterns 2 2 [1], HasCheckedCertificate 10 6 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k10t6_cover56 + · exact by + intro _ + exact k10t6_cover57 + +private theorem k10t6_cover58 : ∀ P ∈ pathPatterns 1 1 [1, 1], HasCheckedCertificate 10 6 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover59 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1], HasCheckedCertificate 10 6 ([[1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p22, Certificates.k10t6p22_check⟩ + +private theorem k10t6_cover60 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 10 6 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover61 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 10 6 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k10t6_cover62 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 10 6 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover54 : ∀ P ∈ pathPatterns 4 3 [1], HasCheckedCertificate 10 6 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover55 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover58 + · intro q + fin_cases q + · exact by + intro _ + exact k10t6_cover59 + · exact by + constructor + · exact by + intro _ + exact k10t6_cover60 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover61 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover62 + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover64 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 10 6 ([[1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t6p23, Certificates.k10t6p23_check⟩ + +private theorem k10t6_cover65 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 10 6 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover63 : ∀ P ∈ pathPatterns 3 2 [1, 1], HasCheckedCertificate 10 6 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k10t6_cover64 + · exact by + constructor + · exact by + intro _ + exact k10t6_cover65 + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover66 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1], HasCheckedCertificate 10 6 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k10t6_cover67 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1], HasCheckedCertificate 10 6 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k10t6_cover68 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2], HasCheckedCertificate 10 6 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover69 : ∀ P ∈ pathPatterns 3 1 [1, 2], HasCheckedCertificate 10 6 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover70 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1], HasCheckedCertificate 10 6 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover71 : ∀ P ∈ pathPatterns 3 0 [1, 3], HasCheckedCertificate 10 6 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover73 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 10 6 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover72 : ∀ P ∈ pathPatterns 4 2 [2], HasCheckedCertificate 10 6 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover73 + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover74 : ∀ P ∈ pathPatterns 3 0 [2, 2], HasCheckedCertificate 10 6 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover75 : ∀ P ∈ pathPatterns 4 1 [3], HasCheckedCertificate 10 6 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover76 : ∀ P ∈ pathPatterns 4 0 [4], HasCheckedCertificate 10 6 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t6_cover1 : ∀ P ∈ pathPatterns 6 4 [], HasCheckedCertificate 10 6 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t6_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover54 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover63 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover66 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover67 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover68 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover69 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover70 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover71 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover72 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover74 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover75 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t6_cover76 + · intro q + exact Fin.elim0 q + +theorem coverage_k10_t6 : + ∀ P ∈ pathPatterns 6 4, HasCheckedCertificate 10 6 P := + k10t6_cover1 + +private theorem k10t7_cover8 : ∀ P ∈ pathPatterns 0 3 [], HasCheckedCertificate 10 7 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t7p0, Certificates.k10t7p0_check⟩ + +private theorem k10t7_cover7 : ∀ P ∈ pathPatterns 1 3 [], HasCheckedCertificate 10 7 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k10t7_cover8 + +private theorem k10t7_cover9 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 10 7 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t7p1, Certificates.k10t7p1_check⟩ + +private theorem k10t7_cover10 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 10 7 ([[], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t7p2, Certificates.k10t7p2_check⟩ + +private theorem k10t7_cover11 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 10 7 ([[], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t7p3, Certificates.k10t7p3_check⟩ + +private theorem k10t7_cover6 : ∀ P ∈ pathPatterns 2 3 [], HasCheckedCertificate 10 7 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t7_cover7 + · intro q + fin_cases q + · exact by + intro _ + exact k10t7_cover9 + · exact by + intro _ + exact k10t7_cover10 + · exact by + intro _ + exact k10t7_cover11 + +private theorem k10t7_cover12 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 10 7 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k10t7_cover13 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 10 7 ([[], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t7p4, Certificates.k10t7p4_check⟩ + +private theorem k10t7_cover14 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 10 7 ([[], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t7p5, Certificates.k10t7p5_check⟩ + +private theorem k10t7_cover15 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 10 7 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k10t7_cover16 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 10 7 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k10t7_cover5 : ∀ P ∈ pathPatterns 3 3 [], HasCheckedCertificate 10 7 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t7_cover6 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover12 + · intro q + fin_cases q + · exact by + intro _ + exact k10t7_cover13 + · exact by + intro _ + exact k10t7_cover14 + · exact by + constructor + · exact by + intro _ + exact k10t7_cover15 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k10t7_cover16 + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover18 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 10 7 ([[], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t7p6, Certificates.k10t7p6_check⟩ + +private theorem k10t7_cover19 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 10 7 ([[], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t7p7, Certificates.k10t7p7_check⟩ + +private theorem k10t7_cover17 : ∀ P ∈ pathPatterns 2 2 [1], HasCheckedCertificate 10 7 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k10t7_cover18 + · exact by + intro _ + exact k10t7_cover19 + +private theorem k10t7_cover20 : ∀ P ∈ pathPatterns 1 1 [1, 1], HasCheckedCertificate 10 7 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k10t7_cover21 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1], HasCheckedCertificate 10 7 ([[], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t7p8, Certificates.k10t7p8_check⟩ + +private theorem k10t7_cover22 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 10 7 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k10t7_cover23 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 10 7 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k10t7_cover24 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 10 7 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover4 : ∀ P ∈ pathPatterns 4 3 [], HasCheckedCertificate 10 7 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t7_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover17 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover20 + · intro q + fin_cases q + · exact by + intro _ + exact k10t7_cover21 + · exact by + constructor + · exact by + intro _ + exact k10t7_cover22 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover23 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover24 + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover26 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 10 7 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k10t7_cover27 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 10 7 ([[], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t7p9, Certificates.k10t7p9_check⟩ + +private theorem k10t7_cover28 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 10 7 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k10t7_cover25 : ∀ P ∈ pathPatterns 3 2 [1], HasCheckedCertificate 10 7 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover26 + · intro q + fin_cases q + · exact by + intro _ + exact k10t7_cover27 + · exact by + constructor + · exact by + intro _ + exact k10t7_cover28 + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover29 : ∀ P ∈ pathPatterns 2 1 [1, 1], HasCheckedCertificate 10 7 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k10t7_cover30 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1], HasCheckedCertificate 10 7 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k10t7_cover31 : ∀ P ∈ pathPatterns 2 0 [1, 2], HasCheckedCertificate 10 7 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover32 : ∀ P ∈ pathPatterns 3 1 [2], HasCheckedCertificate 10 7 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover33 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 10 7 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover3 : ∀ P ∈ pathPatterns 5 3 [], HasCheckedCertificate 10 7 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t7_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover25 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover29 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover30 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover31 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover32 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover33 + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover36 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 10 7 ([[], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t7p10, Certificates.k10t7p10_check⟩ + +private theorem k10t7_cover35 : ∀ P ∈ pathPatterns 2 1 [1], HasCheckedCertificate 10 7 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k10t7_cover36 + +private theorem k10t7_cover37 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 10 7 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k10t7_cover38 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 10 7 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover34 : ∀ P ∈ pathPatterns 4 2 [1], HasCheckedCertificate 10 7 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover35 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover37 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover38 + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover39 : ∀ P ∈ pathPatterns 3 1 [1, 1], HasCheckedCertificate 10 7 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover40 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1], HasCheckedCertificate 10 7 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover41 : ∀ P ∈ pathPatterns 3 0 [1, 2], HasCheckedCertificate 10 7 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover42 : ∀ P ∈ pathPatterns 4 1 [2], HasCheckedCertificate 10 7 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover43 : ∀ P ∈ pathPatterns 4 0 [3], HasCheckedCertificate 10 7 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover2 : ∀ P ∈ pathPatterns 6 3 [], HasCheckedCertificate 10 7 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t7_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover34 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover39 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover40 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover41 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover42 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover43 + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover46 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 10 7 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k10t7_cover45 : ∀ P ∈ pathPatterns 3 1 [1], HasCheckedCertificate 10 7 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover46 + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover47 : ∀ P ∈ pathPatterns 2 0 [1, 1], HasCheckedCertificate 10 7 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover48 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 10 7 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover44 : ∀ P ∈ pathPatterns 5 2 [1], HasCheckedCertificate 10 7 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover45 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover47 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover48 + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover49 : ∀ P ∈ pathPatterns 4 1 [1, 1], HasCheckedCertificate 10 7 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover50 : ∀ P ∈ pathPatterns 3 0 [1, 1, 1], HasCheckedCertificate 10 7 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover51 : ∀ P ∈ pathPatterns 4 0 [1, 2], HasCheckedCertificate 10 7 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover52 : ∀ P ∈ pathPatterns 5 1 [2], HasCheckedCertificate 10 7 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover53 : ∀ P ∈ pathPatterns 5 0 [3], HasCheckedCertificate 10 7 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t7_cover1 : ∀ P ∈ pathPatterns 7 3 [], HasCheckedCertificate 10 7 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t7_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover44 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover49 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover50 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover51 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover52 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t7_cover53 + · intro q + exact Fin.elim0 q + +theorem coverage_k10_t7 : + ∀ P ∈ pathPatterns 7 3, HasCheckedCertificate 10 7 P := + k10t7_cover1 + +private theorem k10t8_cover9 : ∀ P ∈ pathPatterns 0 2 [], HasCheckedCertificate 10 8 ([[], [], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t8p0, Certificates.k10t8p0_check⟩ + +private theorem k10t8_cover8 : ∀ P ∈ pathPatterns 1 2 [], HasCheckedCertificate 10 8 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k10t8_cover9 + +private theorem k10t8_cover10 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 10 8 ([[], [], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t8p1, Certificates.k10t8p1_check⟩ + +private theorem k10t8_cover11 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 10 8 ([[], [], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t8p2, Certificates.k10t8p2_check⟩ + +private theorem k10t8_cover7 : ∀ P ∈ pathPatterns 2 2 [], HasCheckedCertificate 10 8 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t8_cover8 + · intro q + fin_cases q + · exact by + intro _ + exact k10t8_cover10 + · exact by + intro _ + exact k10t8_cover11 + +private theorem k10t8_cover12 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 10 8 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k10t8_cover13 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 10 8 ([[], [], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t8p3, Certificates.k10t8p3_check⟩ + +private theorem k10t8_cover14 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 10 8 ([[], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k10t8_cover6 : ∀ P ∈ pathPatterns 3 2 [], HasCheckedCertificate 10 8 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t8_cover7 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover12 + · intro q + fin_cases q + · exact by + intro _ + exact k10t8_cover13 + · exact by + constructor + · exact by + intro _ + exact k10t8_cover14 + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover16 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 10 8 ([[], [], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k10t8p4, Certificates.k10t8p4_check⟩ + +private theorem k10t8_cover15 : ∀ P ∈ pathPatterns 2 1 [1], HasCheckedCertificate 10 8 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k10t8_cover16 + +private theorem k10t8_cover17 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 10 8 ([[], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k10t8_cover18 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 10 8 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover5 : ∀ P ∈ pathPatterns 4 2 [], HasCheckedCertificate 10 8 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t8_cover6 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover15 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover17 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover18 + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover20 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 10 8 ([[], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k10t8_cover19 : ∀ P ∈ pathPatterns 3 1 [1], HasCheckedCertificate 10 8 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover20 + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover21 : ∀ P ∈ pathPatterns 2 0 [1, 1], HasCheckedCertificate 10 8 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover22 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 10 8 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover4 : ∀ P ∈ pathPatterns 5 2 [], HasCheckedCertificate 10 8 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t8_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover19 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover21 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover22 + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover24 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 10 8 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover23 : ∀ P ∈ pathPatterns 4 1 [1], HasCheckedCertificate 10 8 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover24 + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover25 : ∀ P ∈ pathPatterns 3 0 [1, 1], HasCheckedCertificate 10 8 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover26 : ∀ P ∈ pathPatterns 4 0 [2], HasCheckedCertificate 10 8 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover3 : ∀ P ∈ pathPatterns 6 2 [], HasCheckedCertificate 10 8 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t8_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover23 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover25 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover26 + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover28 : ∀ P ∈ pathPatterns 3 0 [1], HasCheckedCertificate 10 8 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover27 : ∀ P ∈ pathPatterns 5 1 [1], HasCheckedCertificate 10 8 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover28 + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover29 : ∀ P ∈ pathPatterns 4 0 [1, 1], HasCheckedCertificate 10 8 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover30 : ∀ P ∈ pathPatterns 5 0 [2], HasCheckedCertificate 10 8 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover2 : ∀ P ∈ pathPatterns 7 2 [], HasCheckedCertificate 10 8 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t8_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover27 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover29 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover30 + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover32 : ∀ P ∈ pathPatterns 4 0 [1], HasCheckedCertificate 10 8 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover31 : ∀ P ∈ pathPatterns 6 1 [1], HasCheckedCertificate 10 8 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover32 + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover33 : ∀ P ∈ pathPatterns 5 0 [1, 1], HasCheckedCertificate 10 8 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover34 : ∀ P ∈ pathPatterns 6 0 [2], HasCheckedCertificate 10 8 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k10t8_cover1 : ∀ P ∈ pathPatterns 8 2 [], HasCheckedCertificate 10 8 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k10t8_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover31 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover33 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k10t8_cover34 + · intro q + exact Fin.elim0 q + +theorem coverage_k10_t8 : + ∀ P ∈ pathPatterns 8 2, HasCheckedCertificate 10 8 P := + k10t8_cover1 + +end CycleClique.Construction.CertifiedCoverage + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK11.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK11.lean new file mode 100644 index 0000000000000000000000000000000000000000..07d8e0a466ed8bd12e1cb8968d6389f777b02afd --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK11.lean @@ -0,0 +1,6053 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK11 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage + +namespace OAI + +namespace CycleClique.Construction.CertifiedCoverage + +private theorem k11t5_cover8 : ∀ P ∈ pathPatterns 0 6 [], HasCheckedCertificate 11 5 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p0, Certificates.k11t5p0_check⟩ + +private theorem k11t5_cover7 : ∀ P ∈ pathPatterns 1 6 [], HasCheckedCertificate 11 5 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k11t5_cover8 + +private theorem k11t5_cover9 : ∀ P ∈ pathPatterns 0 5 [1], HasCheckedCertificate 11 5 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p1, Certificates.k11t5p1_check⟩ + +private theorem k11t5_cover10 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 11 5 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p2, Certificates.k11t5p2_check⟩ + +private theorem k11t5_cover11 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 11 5 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p3, Certificates.k11t5p3_check⟩ + +private theorem k11t5_cover12 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 11 5 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p4, Certificates.k11t5p4_check⟩ + +private theorem k11t5_cover13 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 11 5 ([[], [], [], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p5, Certificates.k11t5p5_check⟩ + +private theorem k11t5_cover14 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 11 5 ([[], [], [], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p6, Certificates.k11t5p6_check⟩ + +private theorem k11t5_cover6 : ∀ P ∈ pathPatterns 2 6 [], HasCheckedCertificate 11 5 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t5_cover7 + · intro q + fin_cases q + · exact by + intro _ + exact k11t5_cover9 + · exact by + intro _ + exact k11t5_cover10 + · exact by + intro _ + exact k11t5_cover11 + · exact by + intro _ + exact k11t5_cover12 + · exact by + intro _ + exact k11t5_cover13 + · exact by + intro _ + exact k11t5_cover14 + +private theorem k11t5_cover15 : ∀ P ∈ pathPatterns 1 5 [1], HasCheckedCertificate 11 5 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover16 : ∀ P ∈ pathPatterns 0 4 [1, 1], HasCheckedCertificate 11 5 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p7, Certificates.k11t5p7_check⟩ + +private theorem k11t5_cover17 : ∀ P ∈ pathPatterns 0 3 [1, 2], HasCheckedCertificate 11 5 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p8, Certificates.k11t5p8_check⟩ + +private theorem k11t5_cover18 : ∀ P ∈ pathPatterns 0 2 [1, 3], HasCheckedCertificate 11 5 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p9, Certificates.k11t5p9_check⟩ + +private theorem k11t5_cover19 : ∀ P ∈ pathPatterns 0 1 [1, 4], HasCheckedCertificate 11 5 ([[], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p10, Certificates.k11t5p10_check⟩ + +private theorem k11t5_cover20 : ∀ P ∈ pathPatterns 0 0 [1, 5], HasCheckedCertificate 11 5 ([[], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p11, Certificates.k11t5p11_check⟩ + +private theorem k11t5_cover21 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 11 5 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover22 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 11 5 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p12, Certificates.k11t5p12_check⟩ + +private theorem k11t5_cover23 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 11 5 ([[], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p13, Certificates.k11t5p13_check⟩ + +private theorem k11t5_cover24 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 11 5 ([[], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p14, Certificates.k11t5p14_check⟩ + +private theorem k11t5_cover25 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 11 5 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover26 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 11 5 ([[], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p15, Certificates.k11t5p15_check⟩ + +private theorem k11t5_cover27 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 11 5 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover28 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 11 5 ([[], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover29 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 11 5 ([[], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover5 : ∀ P ∈ pathPatterns 3 6 [], HasCheckedCertificate 11 5 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t5_cover6 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover15 + · intro q + fin_cases q + · exact by + intro _ + exact k11t5_cover16 + · exact by + intro _ + exact k11t5_cover17 + · exact by + intro _ + exact k11t5_cover18 + · exact by + intro _ + exact k11t5_cover19 + · exact by + intro _ + exact k11t5_cover20 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover21 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k11t5_cover22 + · exact by + intro _ + exact k11t5_cover23 + · exact by + intro _ + exact k11t5_cover24 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover25 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k11t5_cover26 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover27 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k11t5_cover28 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k11t5_cover29 + · intro q + exact Fin.elim0 q + +private theorem k11t5_cover31 : ∀ P ∈ pathPatterns 0 4 [1], HasCheckedCertificate 11 5 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p16, Certificates.k11t5p16_check⟩ + +private theorem k11t5_cover32 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 11 5 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p17, Certificates.k11t5p17_check⟩ + +private theorem k11t5_cover33 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 11 5 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p18, Certificates.k11t5p18_check⟩ + +private theorem k11t5_cover34 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 11 5 ([[], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p19, Certificates.k11t5p19_check⟩ + +private theorem k11t5_cover35 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 11 5 ([[], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p20, Certificates.k11t5p20_check⟩ + +private theorem k11t5_cover30 : ∀ P ∈ pathPatterns 2 5 [1], HasCheckedCertificate 11 5 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k11t5_cover31 + · exact by + intro _ + exact k11t5_cover32 + · exact by + intro _ + exact k11t5_cover33 + · exact by + intro _ + exact k11t5_cover34 + · exact by + intro _ + exact k11t5_cover35 + +private theorem k11t5_cover36 : ∀ P ∈ pathPatterns 1 4 [1, 1], HasCheckedCertificate 11 5 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover37 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1], HasCheckedCertificate 11 5 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p21, Certificates.k11t5p21_check⟩ + +private theorem k11t5_cover38 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2], HasCheckedCertificate 11 5 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p22, Certificates.k11t5p22_check⟩ + +private theorem k11t5_cover39 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3], HasCheckedCertificate 11 5 ([[], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p23, Certificates.k11t5p23_check⟩ + +private theorem k11t5_cover40 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4], HasCheckedCertificate 11 5 ([[], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p24, Certificates.k11t5p24_check⟩ + +private theorem k11t5_cover41 : ∀ P ∈ pathPatterns 1 3 [1, 2], HasCheckedCertificate 11 5 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover42 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1], HasCheckedCertificate 11 5 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p25, Certificates.k11t5p25_check⟩ + +private theorem k11t5_cover43 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2], HasCheckedCertificate 11 5 ([[], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p26, Certificates.k11t5p26_check⟩ + +private theorem k11t5_cover44 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3], HasCheckedCertificate 11 5 ([[], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p27, Certificates.k11t5p27_check⟩ + +private theorem k11t5_cover45 : ∀ P ∈ pathPatterns 1 2 [1, 3], HasCheckedCertificate 11 5 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover46 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1], HasCheckedCertificate 11 5 ([[], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p28, Certificates.k11t5p28_check⟩ + +private theorem k11t5_cover47 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2], HasCheckedCertificate 11 5 ([[], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p29, Certificates.k11t5p29_check⟩ + +private theorem k11t5_cover48 : ∀ P ∈ pathPatterns 1 1 [1, 4], HasCheckedCertificate 11 5 ([[], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover49 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1], HasCheckedCertificate 11 5 ([[], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p30, Certificates.k11t5p30_check⟩ + +private theorem k11t5_cover50 : ∀ P ∈ pathPatterns 1 0 [1, 5], HasCheckedCertificate 11 5 ([[], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover52 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 11 5 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p31, Certificates.k11t5p31_check⟩ + +private theorem k11t5_cover53 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 11 5 ([[], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p32, Certificates.k11t5p32_check⟩ + +private theorem k11t5_cover54 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 11 5 ([[], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p33, Certificates.k11t5p33_check⟩ + +private theorem k11t5_cover51 : ∀ P ∈ pathPatterns 2 4 [2], HasCheckedCertificate 11 5 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k11t5_cover52 + · exact by + intro _ + exact k11t5_cover53 + · exact by + intro _ + exact k11t5_cover54 + +private theorem k11t5_cover55 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2], HasCheckedCertificate 11 5 ([[], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p34, Certificates.k11t5p34_check⟩ + +private theorem k11t5_cover56 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3], HasCheckedCertificate 11 5 ([[], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p35, Certificates.k11t5p35_check⟩ + +private theorem k11t5_cover57 : ∀ P ∈ pathPatterns 1 2 [2, 2], HasCheckedCertificate 11 5 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover58 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2], HasCheckedCertificate 11 5 ([[], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p36, Certificates.k11t5p36_check⟩ + +private theorem k11t5_cover59 : ∀ P ∈ pathPatterns 1 1 [2, 3], HasCheckedCertificate 11 5 ([[], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover60 : ∀ P ∈ pathPatterns 1 0 [2, 4], HasCheckedCertificate 11 5 ([[], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover62 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 11 5 ([[], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p37, Certificates.k11t5p37_check⟩ + +private theorem k11t5_cover61 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 11 5 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k11t5_cover62 + +private theorem k11t5_cover63 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 11 5 ([[], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover64 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 11 5 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k11t5_cover65 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 11 5 ([[], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t5_cover66 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 11 5 ([[], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t5_seq4 : amountSequenceForall 3 6 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 11 5 ([[]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k11t5_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover30 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover36 + · intro q + fin_cases q + · exact by + intro _ + exact k11t5_cover37 + · exact by + intro _ + exact k11t5_cover38 + · exact by + intro _ + exact k11t5_cover39 + · exact by + intro _ + exact k11t5_cover40 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover41 + · intro q + fin_cases q + · exact by + intro _ + exact k11t5_cover42 + · exact by + intro _ + exact k11t5_cover43 + · exact by + intro _ + exact k11t5_cover44 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover45 + · intro q + fin_cases q + · exact by + intro _ + exact k11t5_cover46 + · exact by + intro _ + exact k11t5_cover47 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover48 + · intro q + fin_cases q + · exact by + intro _ + exact k11t5_cover49 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover50 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover51 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k11t5_cover55 + · exact by + intro _ + exact k11t5_cover56 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover57 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k11t5_cover58 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover59 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k11t5_cover60 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover61 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k11t5_cover63 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover64 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover65 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover66 + · intro q + exact Fin.elim0 q + +private theorem k11t5_cover3 : ∀ P ∈ pathPatterns 4 6 [], HasCheckedCertificate 11 5 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact k11t5_seq4 + + +private theorem k11t5_cover69 : ∀ P ∈ pathPatterns 1 4 [1], HasCheckedCertificate 11 5 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover70 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 11 5 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p38, Certificates.k11t5p38_check⟩ + +private theorem k11t5_cover71 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 11 5 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p39, Certificates.k11t5p39_check⟩ + +private theorem k11t5_cover72 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 11 5 ([[1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p40, Certificates.k11t5p40_check⟩ + +private theorem k11t5_cover73 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 11 5 ([[1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p41, Certificates.k11t5p41_check⟩ + +private theorem k11t5_cover74 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 11 5 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover75 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 11 5 ([[1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p42, Certificates.k11t5p42_check⟩ + +private theorem k11t5_cover76 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 11 5 ([[1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p43, Certificates.k11t5p43_check⟩ + +private theorem k11t5_cover77 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 11 5 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover78 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 11 5 ([[1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover79 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 11 5 ([[1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover68 : ∀ P ∈ pathPatterns 3 5 [1], HasCheckedCertificate 11 5 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover69 + · intro q + fin_cases q + · exact by + intro _ + exact k11t5_cover70 + · exact by + intro _ + exact k11t5_cover71 + · exact by + intro _ + exact k11t5_cover72 + · exact by + intro _ + exact k11t5_cover73 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover74 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k11t5_cover75 + · exact by + intro _ + exact k11t5_cover76 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover77 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k11t5_cover78 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k11t5_cover79 + · intro q + exact Fin.elim0 q + +private theorem k11t5_cover81 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 11 5 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p44, Certificates.k11t5p44_check⟩ + +private theorem k11t5_cover82 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 11 5 ([[1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p45, Certificates.k11t5p45_check⟩ + +private theorem k11t5_cover83 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 11 5 ([[1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p46, Certificates.k11t5p46_check⟩ + +private theorem k11t5_cover80 : ∀ P ∈ pathPatterns 2 4 [1, 1], HasCheckedCertificate 11 5 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k11t5_cover81 + · exact by + intro _ + exact k11t5_cover82 + · exact by + intro _ + exact k11t5_cover83 + +private theorem k11t5_cover84 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1], HasCheckedCertificate 11 5 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover85 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1], HasCheckedCertificate 11 5 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p47, Certificates.k11t5p47_check⟩ + +private theorem k11t5_cover86 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2], HasCheckedCertificate 11 5 ([[1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p48, Certificates.k11t5p48_check⟩ + +private theorem k11t5_cover87 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3], HasCheckedCertificate 11 5 ([[1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p49, Certificates.k11t5p49_check⟩ + +private theorem k11t5_cover88 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2], HasCheckedCertificate 11 5 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover89 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1], HasCheckedCertificate 11 5 ([[1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p50, Certificates.k11t5p50_check⟩ + +private theorem k11t5_cover90 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2], HasCheckedCertificate 11 5 ([[1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p51, Certificates.k11t5p51_check⟩ + +private theorem k11t5_cover91 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3], HasCheckedCertificate 11 5 ([[1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover92 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1], HasCheckedCertificate 11 5 ([[1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p52, Certificates.k11t5p52_check⟩ + +private theorem k11t5_cover93 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4], HasCheckedCertificate 11 5 ([[1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover95 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 11 5 ([[1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p53, Certificates.k11t5p53_check⟩ + +private theorem k11t5_cover96 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 11 5 ([[1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p54, Certificates.k11t5p54_check⟩ + +private theorem k11t5_cover94 : ∀ P ∈ pathPatterns 2 3 [1, 2], HasCheckedCertificate 11 5 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k11t5_cover95 + · exact by + intro _ + exact k11t5_cover96 + +private theorem k11t5_cover97 : ∀ P ∈ pathPatterns 1 2 [1, 2, 1], HasCheckedCertificate 11 5 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover98 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2], HasCheckedCertificate 11 5 ([[1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p55, Certificates.k11t5p55_check⟩ + +private theorem k11t5_cover99 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2], HasCheckedCertificate 11 5 ([[1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover100 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 1], HasCheckedCertificate 11 5 ([[1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p56, Certificates.k11t5p56_check⟩ + +private theorem k11t5_cover101 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3], HasCheckedCertificate 11 5 ([[1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover103 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 11 5 ([[1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p57, Certificates.k11t5p57_check⟩ + +private theorem k11t5_cover102 : ∀ P ∈ pathPatterns 2 2 [1, 3], HasCheckedCertificate 11 5 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k11t5_cover103 + +private theorem k11t5_cover104 : ∀ P ∈ pathPatterns 1 1 [1, 3, 1], HasCheckedCertificate 11 5 ([[1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover105 : ∀ P ∈ pathPatterns 1 0 [1, 3, 2], HasCheckedCertificate 11 5 ([[1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover106 : ∀ P ∈ pathPatterns 2 1 [1, 4], HasCheckedCertificate 11 5 ([[1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t5_cover107 : ∀ P ∈ pathPatterns 1 0 [1, 4, 1], HasCheckedCertificate 11 5 ([[1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover108 : ∀ P ∈ pathPatterns 2 0 [1, 5], HasCheckedCertificate 11 5 ([[1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t5_seq67 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 11 5 ([] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k11t5_cover68 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover80 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover84 + · intro q + fin_cases q + · exact by + intro _ + exact k11t5_cover85 + · exact by + intro _ + exact k11t5_cover86 + · exact by + intro _ + exact k11t5_cover87 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover88 + · intro q + fin_cases q + · exact by + intro _ + exact k11t5_cover89 + · exact by + intro _ + exact k11t5_cover90 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover91 + · intro q + fin_cases q + · exact by + intro _ + exact k11t5_cover92 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover93 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover94 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover97 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k11t5_cover98 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover99 + · intro q + fin_cases q + · exact by + intro _ + exact k11t5_cover100 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover101 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover102 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover104 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k11t5_cover105 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover106 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover107 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover108 + · intro q + exact Fin.elim0 q + +private theorem k11t5_cover110 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 11 5 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover111 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 11 5 ([[2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p58, Certificates.k11t5p58_check⟩ + +private theorem k11t5_cover112 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 11 5 ([[2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover113 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 11 5 ([[2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover109 : ∀ P ∈ pathPatterns 3 4 [2], HasCheckedCertificate 11 5 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k11t5_cover110 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k11t5_cover111 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover112 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k11t5_cover113 + · intro q + exact Fin.elim0 q + +private theorem k11t5_cover114 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 2], HasCheckedCertificate 11 5 ([[2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t5p59, Certificates.k11t5p59_check⟩ + +private theorem k11t5_cover115 : ∀ P ∈ pathPatterns 1 1 [2, 1, 2], HasCheckedCertificate 11 5 ([[2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover116 : ∀ P ∈ pathPatterns 1 0 [2, 1, 3], HasCheckedCertificate 11 5 ([[2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover117 : ∀ P ∈ pathPatterns 2 2 [2, 2], HasCheckedCertificate 11 5 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k11t5_cover118 : ∀ P ∈ pathPatterns 1 0 [2, 2, 2], HasCheckedCertificate 11 5 ([[2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover119 : ∀ P ∈ pathPatterns 2 1 [2, 3], HasCheckedCertificate 11 5 ([[2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t5_cover120 : ∀ P ∈ pathPatterns 2 0 [2, 4], HasCheckedCertificate 11 5 ([[2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t5_cover122 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 11 5 ([[3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k11t5_cover121 : ∀ P ∈ pathPatterns 3 3 [3], HasCheckedCertificate 11 5 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k11t5_cover122 + · intro q + exact Fin.elim0 q + +private theorem k11t5_cover123 : ∀ P ∈ pathPatterns 2 0 [3, 3], HasCheckedCertificate 11 5 ([[3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t5_cover124 : ∀ P ∈ pathPatterns 3 2 [4], HasCheckedCertificate 11 5 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t5_cover125 : ∀ P ∈ pathPatterns 3 1 [5], HasCheckedCertificate 11 5 ([[5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t5_cover126 : ∀ P ∈ pathPatterns 3 0 [6], HasCheckedCertificate 11 5 ([[6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t5_seq2 : amountSequenceForall 4 6 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 11 5 ([] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k11t5_cover3 + · intro q + fin_cases q + · exact k11t5_seq67 + + · exact by + constructor + · exact by + intro _ + exact k11t5_cover109 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k11t5_cover114 + · exact by + constructor + · exact by + intro _ + exact k11t5_cover115 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k11t5_cover116 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover117 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k11t5_cover118 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover119 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover120 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover121 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover123 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover124 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover125 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t5_cover126 + · intro q + exact Fin.elim0 q + +private theorem k11t5_cover1 : ∀ P ∈ pathPatterns 5 6 [], HasCheckedCertificate 11 5 ([] ++ P) := by + apply pathPatterns_forall_step + exact k11t5_seq2 + + +theorem coverage_k11_t5 : + ∀ P ∈ pathPatterns 5 6, HasCheckedCertificate 11 5 P := + k11t5_cover1 + +private theorem k11t6_cover10 : ∀ P ∈ pathPatterns 0 5 [], HasCheckedCertificate 11 6 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p0, Certificates.k11t6p0_check⟩ + +private theorem k11t6_cover9 : ∀ P ∈ pathPatterns 1 5 [], HasCheckedCertificate 11 6 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k11t6_cover10 + +private theorem k11t6_cover11 : ∀ P ∈ pathPatterns 0 4 [1], HasCheckedCertificate 11 6 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p1, Certificates.k11t6p1_check⟩ + +private theorem k11t6_cover12 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 11 6 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p2, Certificates.k11t6p2_check⟩ + +private theorem k11t6_cover13 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 11 6 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p3, Certificates.k11t6p3_check⟩ + +private theorem k11t6_cover14 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 11 6 ([[], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p4, Certificates.k11t6p4_check⟩ + +private theorem k11t6_cover15 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 11 6 ([[], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p5, Certificates.k11t6p5_check⟩ + +private theorem k11t6_cover8 : ∀ P ∈ pathPatterns 2 5 [], HasCheckedCertificate 11 6 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t6_cover9 + · intro q + fin_cases q + · exact by + intro _ + exact k11t6_cover11 + · exact by + intro _ + exact k11t6_cover12 + · exact by + intro _ + exact k11t6_cover13 + · exact by + intro _ + exact k11t6_cover14 + · exact by + intro _ + exact k11t6_cover15 + +private theorem k11t6_cover16 : ∀ P ∈ pathPatterns 1 4 [1], HasCheckedCertificate 11 6 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover17 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 11 6 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p6, Certificates.k11t6p6_check⟩ + +private theorem k11t6_cover18 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 11 6 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p7, Certificates.k11t6p7_check⟩ + +private theorem k11t6_cover19 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 11 6 ([[], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p8, Certificates.k11t6p8_check⟩ + +private theorem k11t6_cover20 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 11 6 ([[], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p9, Certificates.k11t6p9_check⟩ + +private theorem k11t6_cover21 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 11 6 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover22 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 11 6 ([[], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p10, Certificates.k11t6p10_check⟩ + +private theorem k11t6_cover23 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 11 6 ([[], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p11, Certificates.k11t6p11_check⟩ + +private theorem k11t6_cover24 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 11 6 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover25 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 11 6 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover26 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 11 6 ([[], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover7 : ∀ P ∈ pathPatterns 3 5 [], HasCheckedCertificate 11 6 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t6_cover8 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover16 + · intro q + fin_cases q + · exact by + intro _ + exact k11t6_cover17 + · exact by + intro _ + exact k11t6_cover18 + · exact by + intro _ + exact k11t6_cover19 + · exact by + intro _ + exact k11t6_cover20 + · exact by + constructor + · exact by + intro _ + exact k11t6_cover21 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k11t6_cover22 + · exact by + intro _ + exact k11t6_cover23 + · exact by + constructor + · exact by + intro _ + exact k11t6_cover24 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k11t6_cover25 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k11t6_cover26 + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover28 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 11 6 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p12, Certificates.k11t6p12_check⟩ + +private theorem k11t6_cover29 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 11 6 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p13, Certificates.k11t6p13_check⟩ + +private theorem k11t6_cover30 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 11 6 ([[], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p14, Certificates.k11t6p14_check⟩ + +private theorem k11t6_cover31 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 11 6 ([[], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p15, Certificates.k11t6p15_check⟩ + +private theorem k11t6_cover27 : ∀ P ∈ pathPatterns 2 4 [1], HasCheckedCertificate 11 6 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k11t6_cover28 + · exact by + intro _ + exact k11t6_cover29 + · exact by + intro _ + exact k11t6_cover30 + · exact by + intro _ + exact k11t6_cover31 + +private theorem k11t6_cover32 : ∀ P ∈ pathPatterns 1 3 [1, 1], HasCheckedCertificate 11 6 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover33 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1], HasCheckedCertificate 11 6 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p16, Certificates.k11t6p16_check⟩ + +private theorem k11t6_cover34 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2], HasCheckedCertificate 11 6 ([[], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p17, Certificates.k11t6p17_check⟩ + +private theorem k11t6_cover35 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3], HasCheckedCertificate 11 6 ([[], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p18, Certificates.k11t6p18_check⟩ + +private theorem k11t6_cover36 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 11 6 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover37 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 11 6 ([[], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p19, Certificates.k11t6p19_check⟩ + +private theorem k11t6_cover38 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 11 6 ([[], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p20, Certificates.k11t6p20_check⟩ + +private theorem k11t6_cover39 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 11 6 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover40 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 11 6 ([[], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p21, Certificates.k11t6p21_check⟩ + +private theorem k11t6_cover41 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 11 6 ([[], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover43 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 11 6 ([[], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p22, Certificates.k11t6p22_check⟩ + +private theorem k11t6_cover44 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 11 6 ([[], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p23, Certificates.k11t6p23_check⟩ + +private theorem k11t6_cover42 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 11 6 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k11t6_cover43 + · exact by + intro _ + exact k11t6_cover44 + +private theorem k11t6_cover45 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 11 6 ([[], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p24, Certificates.k11t6p24_check⟩ + +private theorem k11t6_cover46 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 11 6 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover47 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 11 6 ([[], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover48 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 11 6 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k11t6_cover49 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 11 6 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t6_cover50 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 11 6 ([[], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_seq6 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 11 6 ([[], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k11t6_cover7 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover27 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover32 + · intro q + fin_cases q + · exact by + intro _ + exact k11t6_cover33 + · exact by + intro _ + exact k11t6_cover34 + · exact by + intro _ + exact k11t6_cover35 + · exact by + constructor + · exact by + intro _ + exact k11t6_cover36 + · intro q + fin_cases q + · exact by + intro _ + exact k11t6_cover37 + · exact by + intro _ + exact k11t6_cover38 + · exact by + constructor + · exact by + intro _ + exact k11t6_cover39 + · intro q + fin_cases q + · exact by + intro _ + exact k11t6_cover40 + · exact by + constructor + · exact by + intro _ + exact k11t6_cover41 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover42 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k11t6_cover45 + · exact by + constructor + · exact by + intro _ + exact k11t6_cover46 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k11t6_cover47 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover48 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover49 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover50 + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover5 : ∀ P ∈ pathPatterns 4 5 [], HasCheckedCertificate 11 6 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact k11t6_seq6 + + +private theorem k11t6_cover52 : ∀ P ∈ pathPatterns 1 3 [1], HasCheckedCertificate 11 6 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover53 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 11 6 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p25, Certificates.k11t6p25_check⟩ + +private theorem k11t6_cover54 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 11 6 ([[], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p26, Certificates.k11t6p26_check⟩ + +private theorem k11t6_cover55 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 11 6 ([[], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p27, Certificates.k11t6p27_check⟩ + +private theorem k11t6_cover56 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 11 6 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover57 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 11 6 ([[], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p28, Certificates.k11t6p28_check⟩ + +private theorem k11t6_cover58 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 11 6 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover59 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 11 6 ([[], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover51 : ∀ P ∈ pathPatterns 3 4 [1], HasCheckedCertificate 11 6 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover52 + · intro q + fin_cases q + · exact by + intro _ + exact k11t6_cover53 + · exact by + intro _ + exact k11t6_cover54 + · exact by + intro _ + exact k11t6_cover55 + · exact by + constructor + · exact by + intro _ + exact k11t6_cover56 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k11t6_cover57 + · exact by + constructor + · exact by + intro _ + exact k11t6_cover58 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k11t6_cover59 + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover61 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 11 6 ([[], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p29, Certificates.k11t6p29_check⟩ + +private theorem k11t6_cover62 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 11 6 ([[], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p30, Certificates.k11t6p30_check⟩ + +private theorem k11t6_cover60 : ∀ P ∈ pathPatterns 2 3 [1, 1], HasCheckedCertificate 11 6 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k11t6_cover61 + · exact by + intro _ + exact k11t6_cover62 + +private theorem k11t6_cover63 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1], HasCheckedCertificate 11 6 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover64 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1], HasCheckedCertificate 11 6 ([[], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p31, Certificates.k11t6p31_check⟩ + +private theorem k11t6_cover65 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2], HasCheckedCertificate 11 6 ([[], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p32, Certificates.k11t6p32_check⟩ + +private theorem k11t6_cover66 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2], HasCheckedCertificate 11 6 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover67 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1], HasCheckedCertificate 11 6 ([[], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p33, Certificates.k11t6p33_check⟩ + +private theorem k11t6_cover68 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3], HasCheckedCertificate 11 6 ([[], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover70 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 11 6 ([[], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p34, Certificates.k11t6p34_check⟩ + +private theorem k11t6_cover69 : ∀ P ∈ pathPatterns 2 2 [1, 2], HasCheckedCertificate 11 6 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k11t6_cover70 + +private theorem k11t6_cover71 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1], HasCheckedCertificate 11 6 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover72 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2], HasCheckedCertificate 11 6 ([[], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover73 : ∀ P ∈ pathPatterns 2 1 [1, 3], HasCheckedCertificate 11 6 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t6_cover74 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1], HasCheckedCertificate 11 6 ([[], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover75 : ∀ P ∈ pathPatterns 2 0 [1, 4], HasCheckedCertificate 11 6 ([[], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover77 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 11 6 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover78 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 11 6 ([[], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover76 : ∀ P ∈ pathPatterns 3 3 [2], HasCheckedCertificate 11 6 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k11t6_cover77 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k11t6_cover78 + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover79 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2], HasCheckedCertificate 11 6 ([[], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover80 : ∀ P ∈ pathPatterns 2 1 [2, 2], HasCheckedCertificate 11 6 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t6_cover81 : ∀ P ∈ pathPatterns 2 0 [2, 3], HasCheckedCertificate 11 6 ([[], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover82 : ∀ P ∈ pathPatterns 3 2 [3], HasCheckedCertificate 11 6 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover83 : ∀ P ∈ pathPatterns 3 1 [4], HasCheckedCertificate 11 6 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover84 : ∀ P ∈ pathPatterns 3 0 [5], HasCheckedCertificate 11 6 ([[], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_seq4 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 11 6 ([[]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k11t6_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover51 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover60 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover63 + · intro q + fin_cases q + · exact by + intro _ + exact k11t6_cover64 + · exact by + intro _ + exact k11t6_cover65 + · exact by + constructor + · exact by + intro _ + exact k11t6_cover66 + · intro q + fin_cases q + · exact by + intro _ + exact k11t6_cover67 + · exact by + constructor + · exact by + intro _ + exact k11t6_cover68 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover69 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover71 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k11t6_cover72 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover73 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover74 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover75 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover76 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k11t6_cover79 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover80 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover81 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover82 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover83 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover84 + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover3 : ∀ P ∈ pathPatterns 5 5 [], HasCheckedCertificate 11 6 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact k11t6_seq4 + + +private theorem k11t6_cover87 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 11 6 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p35, Certificates.k11t6p35_check⟩ + +private theorem k11t6_cover88 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 11 6 ([[1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p36, Certificates.k11t6p36_check⟩ + +private theorem k11t6_cover89 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 11 6 ([[1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p37, Certificates.k11t6p37_check⟩ + +private theorem k11t6_cover86 : ∀ P ∈ pathPatterns 2 3 [1], HasCheckedCertificate 11 6 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k11t6_cover87 + · exact by + intro _ + exact k11t6_cover88 + · exact by + intro _ + exact k11t6_cover89 + +private theorem k11t6_cover90 : ∀ P ∈ pathPatterns 1 2 [1, 1], HasCheckedCertificate 11 6 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover91 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1], HasCheckedCertificate 11 6 ([[1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p38, Certificates.k11t6p38_check⟩ + +private theorem k11t6_cover92 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2], HasCheckedCertificate 11 6 ([[1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p39, Certificates.k11t6p39_check⟩ + +private theorem k11t6_cover93 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 11 6 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover94 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 11 6 ([[1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p40, Certificates.k11t6p40_check⟩ + +private theorem k11t6_cover95 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 11 6 ([[1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover97 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 11 6 ([[1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p41, Certificates.k11t6p41_check⟩ + +private theorem k11t6_cover96 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 11 6 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k11t6_cover97 + +private theorem k11t6_cover98 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 11 6 ([[1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover99 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 11 6 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t6_cover100 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 11 6 ([[1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover85 : ∀ P ∈ pathPatterns 4 4 [1], HasCheckedCertificate 11 6 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover86 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover90 + · intro q + fin_cases q + · exact by + intro _ + exact k11t6_cover91 + · exact by + intro _ + exact k11t6_cover92 + · exact by + constructor + · exact by + intro _ + exact k11t6_cover93 + · intro q + fin_cases q + · exact by + intro _ + exact k11t6_cover94 + · exact by + constructor + · exact by + intro _ + exact k11t6_cover95 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover96 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k11t6_cover98 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover99 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover100 + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover102 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 11 6 ([[1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p42, Certificates.k11t6p42_check⟩ + +private theorem k11t6_cover103 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 11 6 ([[1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p43, Certificates.k11t6p43_check⟩ + +private theorem k11t6_cover104 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 11 6 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover105 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 11 6 ([[1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover101 : ∀ P ∈ pathPatterns 3 3 [1, 1], HasCheckedCertificate 11 6 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k11t6_cover102 + · exact by + intro _ + exact k11t6_cover103 + · exact by + constructor + · exact by + intro _ + exact k11t6_cover104 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k11t6_cover105 + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover107 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 11 6 ([[1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p44, Certificates.k11t6p44_check⟩ + +private theorem k11t6_cover106 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1], HasCheckedCertificate 11 6 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k11t6_cover107 + +private theorem k11t6_cover108 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1], HasCheckedCertificate 11 6 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover109 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1], HasCheckedCertificate 11 6 ([[1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t6p45, Certificates.k11t6p45_check⟩ + +private theorem k11t6_cover110 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2], HasCheckedCertificate 11 6 ([[1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover111 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2], HasCheckedCertificate 11 6 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t6_cover112 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1], HasCheckedCertificate 11 6 ([[1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover113 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3], HasCheckedCertificate 11 6 ([[1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover115 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 11 6 ([[1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k11t6_cover114 : ∀ P ∈ pathPatterns 3 2 [1, 2], HasCheckedCertificate 11 6 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k11t6_cover115 + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover116 : ∀ P ∈ pathPatterns 2 1 [1, 2, 1], HasCheckedCertificate 11 6 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t6_cover117 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2], HasCheckedCertificate 11 6 ([[1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover118 : ∀ P ∈ pathPatterns 3 1 [1, 3], HasCheckedCertificate 11 6 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover119 : ∀ P ∈ pathPatterns 2 0 [1, 3, 1], HasCheckedCertificate 11 6 ([[1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover120 : ∀ P ∈ pathPatterns 3 0 [1, 4], HasCheckedCertificate 11 6 ([[1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover122 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 11 6 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t6_cover123 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 11 6 ([[2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover121 : ∀ P ∈ pathPatterns 4 3 [2], HasCheckedCertificate 11 6 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover122 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover123 + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover124 : ∀ P ∈ pathPatterns 2 0 [2, 1, 2], HasCheckedCertificate 11 6 ([[2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover125 : ∀ P ∈ pathPatterns 3 1 [2, 2], HasCheckedCertificate 11 6 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover126 : ∀ P ∈ pathPatterns 3 0 [2, 3], HasCheckedCertificate 11 6 ([[2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover127 : ∀ P ∈ pathPatterns 4 2 [3], HasCheckedCertificate 11 6 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover128 : ∀ P ∈ pathPatterns 4 1 [4], HasCheckedCertificate 11 6 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover129 : ∀ P ∈ pathPatterns 4 0 [5], HasCheckedCertificate 11 6 ([[5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t6_seq2 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 11 6 ([] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k11t6_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover85 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover101 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover106 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover108 + · intro q + fin_cases q + · exact by + intro _ + exact k11t6_cover109 + · exact by + constructor + · exact by + intro _ + exact k11t6_cover110 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover111 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover112 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover113 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover114 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover116 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover117 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover118 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover119 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover120 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover121 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover124 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover125 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover126 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover127 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover128 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t6_cover129 + · intro q + exact Fin.elim0 q + +private theorem k11t6_cover1 : ∀ P ∈ pathPatterns 6 5 [], HasCheckedCertificate 11 6 ([] ++ P) := by + apply pathPatterns_forall_step + exact k11t6_seq2 + + +theorem coverage_k11_t6 : + ∀ P ∈ pathPatterns 6 5, HasCheckedCertificate 11 6 P := + k11t6_cover1 + +private theorem k11t7_cover8 : ∀ P ∈ pathPatterns 0 4 [], HasCheckedCertificate 11 7 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p0, Certificates.k11t7p0_check⟩ + +private theorem k11t7_cover7 : ∀ P ∈ pathPatterns 1 4 [], HasCheckedCertificate 11 7 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k11t7_cover8 + +private theorem k11t7_cover9 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 11 7 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p1, Certificates.k11t7p1_check⟩ + +private theorem k11t7_cover10 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 11 7 ([[], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p2, Certificates.k11t7p2_check⟩ + +private theorem k11t7_cover11 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 11 7 ([[], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p3, Certificates.k11t7p3_check⟩ + +private theorem k11t7_cover12 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 11 7 ([[], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p4, Certificates.k11t7p4_check⟩ + +private theorem k11t7_cover6 : ∀ P ∈ pathPatterns 2 4 [], HasCheckedCertificate 11 7 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t7_cover7 + · intro q + fin_cases q + · exact by + intro _ + exact k11t7_cover9 + · exact by + intro _ + exact k11t7_cover10 + · exact by + intro _ + exact k11t7_cover11 + · exact by + intro _ + exact k11t7_cover12 + +private theorem k11t7_cover13 : ∀ P ∈ pathPatterns 1 3 [1], HasCheckedCertificate 11 7 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover14 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 11 7 ([[], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p5, Certificates.k11t7p5_check⟩ + +private theorem k11t7_cover15 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 11 7 ([[], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p6, Certificates.k11t7p6_check⟩ + +private theorem k11t7_cover16 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 11 7 ([[], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p7, Certificates.k11t7p7_check⟩ + +private theorem k11t7_cover17 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 11 7 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover18 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 11 7 ([[], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p8, Certificates.k11t7p8_check⟩ + +private theorem k11t7_cover19 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 11 7 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover20 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 11 7 ([[], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover5 : ∀ P ∈ pathPatterns 3 4 [], HasCheckedCertificate 11 7 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t7_cover6 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover13 + · intro q + fin_cases q + · exact by + intro _ + exact k11t7_cover14 + · exact by + intro _ + exact k11t7_cover15 + · exact by + intro _ + exact k11t7_cover16 + · exact by + constructor + · exact by + intro _ + exact k11t7_cover17 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k11t7_cover18 + · exact by + constructor + · exact by + intro _ + exact k11t7_cover19 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k11t7_cover20 + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover22 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 11 7 ([[], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p9, Certificates.k11t7p9_check⟩ + +private theorem k11t7_cover23 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 11 7 ([[], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p10, Certificates.k11t7p10_check⟩ + +private theorem k11t7_cover24 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 11 7 ([[], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p11, Certificates.k11t7p11_check⟩ + +private theorem k11t7_cover21 : ∀ P ∈ pathPatterns 2 3 [1], HasCheckedCertificate 11 7 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k11t7_cover22 + · exact by + intro _ + exact k11t7_cover23 + · exact by + intro _ + exact k11t7_cover24 + +private theorem k11t7_cover25 : ∀ P ∈ pathPatterns 1 2 [1, 1], HasCheckedCertificate 11 7 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover26 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1], HasCheckedCertificate 11 7 ([[], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p12, Certificates.k11t7p12_check⟩ + +private theorem k11t7_cover27 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2], HasCheckedCertificate 11 7 ([[], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p13, Certificates.k11t7p13_check⟩ + +private theorem k11t7_cover28 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 11 7 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover29 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 11 7 ([[], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p14, Certificates.k11t7p14_check⟩ + +private theorem k11t7_cover30 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 11 7 ([[], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover32 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 11 7 ([[], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p15, Certificates.k11t7p15_check⟩ + +private theorem k11t7_cover31 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 11 7 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k11t7_cover32 + +private theorem k11t7_cover33 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 11 7 ([[], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover34 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 11 7 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t7_cover35 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 11 7 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover4 : ∀ P ∈ pathPatterns 4 4 [], HasCheckedCertificate 11 7 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t7_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover21 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover25 + · intro q + fin_cases q + · exact by + intro _ + exact k11t7_cover26 + · exact by + intro _ + exact k11t7_cover27 + · exact by + constructor + · exact by + intro _ + exact k11t7_cover28 + · intro q + fin_cases q + · exact by + intro _ + exact k11t7_cover29 + · exact by + constructor + · exact by + intro _ + exact k11t7_cover30 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover31 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k11t7_cover33 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover34 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover35 + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover37 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 11 7 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover38 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 11 7 ([[], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p16, Certificates.k11t7p16_check⟩ + +private theorem k11t7_cover39 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 11 7 ([[], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p17, Certificates.k11t7p17_check⟩ + +private theorem k11t7_cover40 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 11 7 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover41 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 11 7 ([[], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover36 : ∀ P ∈ pathPatterns 3 3 [1], HasCheckedCertificate 11 7 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover37 + · intro q + fin_cases q + · exact by + intro _ + exact k11t7_cover38 + · exact by + intro _ + exact k11t7_cover39 + · exact by + constructor + · exact by + intro _ + exact k11t7_cover40 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k11t7_cover41 + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover43 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 11 7 ([[], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p18, Certificates.k11t7p18_check⟩ + +private theorem k11t7_cover42 : ∀ P ∈ pathPatterns 2 2 [1, 1], HasCheckedCertificate 11 7 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k11t7_cover43 + +private theorem k11t7_cover44 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1], HasCheckedCertificate 11 7 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover45 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1], HasCheckedCertificate 11 7 ([[], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p19, Certificates.k11t7p19_check⟩ + +private theorem k11t7_cover46 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2], HasCheckedCertificate 11 7 ([[], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover47 : ∀ P ∈ pathPatterns 2 1 [1, 2], HasCheckedCertificate 11 7 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t7_cover48 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1], HasCheckedCertificate 11 7 ([[], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover49 : ∀ P ∈ pathPatterns 2 0 [1, 3], HasCheckedCertificate 11 7 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover51 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 11 7 ([[], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover50 : ∀ P ∈ pathPatterns 3 2 [2], HasCheckedCertificate 11 7 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k11t7_cover51 + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover52 : ∀ P ∈ pathPatterns 2 0 [2, 2], HasCheckedCertificate 11 7 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover53 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 11 7 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover54 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 11 7 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover3 : ∀ P ∈ pathPatterns 5 4 [], HasCheckedCertificate 11 7 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t7_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover36 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover42 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover44 + · intro q + fin_cases q + · exact by + intro _ + exact k11t7_cover45 + · exact by + constructor + · exact by + intro _ + exact k11t7_cover46 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover47 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover48 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover49 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover50 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover52 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover53 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover54 + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover57 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 11 7 ([[], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p20, Certificates.k11t7p20_check⟩ + +private theorem k11t7_cover58 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 11 7 ([[], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p21, Certificates.k11t7p21_check⟩ + +private theorem k11t7_cover56 : ∀ P ∈ pathPatterns 2 2 [1], HasCheckedCertificate 11 7 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k11t7_cover57 + · exact by + intro _ + exact k11t7_cover58 + +private theorem k11t7_cover59 : ∀ P ∈ pathPatterns 1 1 [1, 1], HasCheckedCertificate 11 7 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover60 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1], HasCheckedCertificate 11 7 ([[], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p22, Certificates.k11t7p22_check⟩ + +private theorem k11t7_cover61 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 11 7 ([[], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover62 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 11 7 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t7_cover63 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 11 7 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover55 : ∀ P ∈ pathPatterns 4 3 [1], HasCheckedCertificate 11 7 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover56 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover59 + · intro q + fin_cases q + · exact by + intro _ + exact k11t7_cover60 + · exact by + constructor + · exact by + intro _ + exact k11t7_cover61 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover62 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover63 + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover65 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 11 7 ([[], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p23, Certificates.k11t7p23_check⟩ + +private theorem k11t7_cover66 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 11 7 ([[], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover64 : ∀ P ∈ pathPatterns 3 2 [1, 1], HasCheckedCertificate 11 7 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k11t7_cover65 + · exact by + constructor + · exact by + intro _ + exact k11t7_cover66 + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover67 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1], HasCheckedCertificate 11 7 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t7_cover68 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1], HasCheckedCertificate 11 7 ([[], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover69 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2], HasCheckedCertificate 11 7 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover70 : ∀ P ∈ pathPatterns 3 1 [1, 2], HasCheckedCertificate 11 7 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover71 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1], HasCheckedCertificate 11 7 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover72 : ∀ P ∈ pathPatterns 3 0 [1, 3], HasCheckedCertificate 11 7 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover74 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 11 7 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover73 : ∀ P ∈ pathPatterns 4 2 [2], HasCheckedCertificate 11 7 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover74 + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover75 : ∀ P ∈ pathPatterns 3 0 [2, 2], HasCheckedCertificate 11 7 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover76 : ∀ P ∈ pathPatterns 4 1 [3], HasCheckedCertificate 11 7 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover77 : ∀ P ∈ pathPatterns 4 0 [4], HasCheckedCertificate 11 7 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover2 : ∀ P ∈ pathPatterns 6 4 [], HasCheckedCertificate 11 7 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t7_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover55 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover64 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover67 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover68 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover69 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover70 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover71 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover72 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover73 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover75 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover76 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover77 + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover80 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 11 7 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover81 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 11 7 ([[1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t7p24, Certificates.k11t7p24_check⟩ + +private theorem k11t7_cover82 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 11 7 ([[1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover79 : ∀ P ∈ pathPatterns 3 2 [1], HasCheckedCertificate 11 7 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover80 + · intro q + fin_cases q + · exact by + intro _ + exact k11t7_cover81 + · exact by + constructor + · exact by + intro _ + exact k11t7_cover82 + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover83 : ∀ P ∈ pathPatterns 2 1 [1, 1], HasCheckedCertificate 11 7 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t7_cover84 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1], HasCheckedCertificate 11 7 ([[1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover85 : ∀ P ∈ pathPatterns 2 0 [1, 2], HasCheckedCertificate 11 7 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover86 : ∀ P ∈ pathPatterns 3 1 [2], HasCheckedCertificate 11 7 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover87 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 11 7 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover78 : ∀ P ∈ pathPatterns 5 3 [1], HasCheckedCertificate 11 7 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover79 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover83 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover84 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover85 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover86 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover87 + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover89 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 11 7 ([[1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t7_cover90 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 11 7 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover88 : ∀ P ∈ pathPatterns 4 2 [1, 1], HasCheckedCertificate 11 7 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover89 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover90 + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover91 : ∀ P ∈ pathPatterns 3 1 [1, 1, 1], HasCheckedCertificate 11 7 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover92 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 1], HasCheckedCertificate 11 7 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover93 : ∀ P ∈ pathPatterns 3 0 [1, 1, 2], HasCheckedCertificate 11 7 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover94 : ∀ P ∈ pathPatterns 4 1 [1, 2], HasCheckedCertificate 11 7 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover95 : ∀ P ∈ pathPatterns 3 0 [1, 2, 1], HasCheckedCertificate 11 7 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover96 : ∀ P ∈ pathPatterns 4 0 [1, 3], HasCheckedCertificate 11 7 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover98 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 11 7 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover97 : ∀ P ∈ pathPatterns 5 2 [2], HasCheckedCertificate 11 7 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover98 + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover99 : ∀ P ∈ pathPatterns 4 0 [2, 2], HasCheckedCertificate 11 7 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover100 : ∀ P ∈ pathPatterns 5 1 [3], HasCheckedCertificate 11 7 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover101 : ∀ P ∈ pathPatterns 5 0 [4], HasCheckedCertificate 11 7 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t7_cover1 : ∀ P ∈ pathPatterns 7 4 [], HasCheckedCertificate 11 7 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t7_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover78 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover88 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover91 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover92 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover93 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover94 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover95 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover96 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover97 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover99 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover100 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t7_cover101 + · intro q + exact Fin.elim0 q + +theorem coverage_k11_t7 : + ∀ P ∈ pathPatterns 7 4, HasCheckedCertificate 11 7 P := + k11t7_cover1 + +private theorem k11t8_cover9 : ∀ P ∈ pathPatterns 0 3 [], HasCheckedCertificate 11 8 ([[], [], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t8p0, Certificates.k11t8p0_check⟩ + +private theorem k11t8_cover8 : ∀ P ∈ pathPatterns 1 3 [], HasCheckedCertificate 11 8 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k11t8_cover9 + +private theorem k11t8_cover10 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 11 8 ([[], [], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t8p1, Certificates.k11t8p1_check⟩ + +private theorem k11t8_cover11 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 11 8 ([[], [], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t8p2, Certificates.k11t8p2_check⟩ + +private theorem k11t8_cover12 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 11 8 ([[], [], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t8p3, Certificates.k11t8p3_check⟩ + +private theorem k11t8_cover7 : ∀ P ∈ pathPatterns 2 3 [], HasCheckedCertificate 11 8 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t8_cover8 + · intro q + fin_cases q + · exact by + intro _ + exact k11t8_cover10 + · exact by + intro _ + exact k11t8_cover11 + · exact by + intro _ + exact k11t8_cover12 + +private theorem k11t8_cover13 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 11 8 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k11t8_cover14 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 11 8 ([[], [], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t8p4, Certificates.k11t8p4_check⟩ + +private theorem k11t8_cover15 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 11 8 ([[], [], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t8p5, Certificates.k11t8p5_check⟩ + +private theorem k11t8_cover16 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 11 8 ([[], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k11t8_cover17 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 11 8 ([[], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k11t8_cover6 : ∀ P ∈ pathPatterns 3 3 [], HasCheckedCertificate 11 8 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t8_cover7 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover13 + · intro q + fin_cases q + · exact by + intro _ + exact k11t8_cover14 + · exact by + intro _ + exact k11t8_cover15 + · exact by + constructor + · exact by + intro _ + exact k11t8_cover16 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k11t8_cover17 + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover19 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 11 8 ([[], [], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t8p6, Certificates.k11t8p6_check⟩ + +private theorem k11t8_cover20 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 11 8 ([[], [], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t8p7, Certificates.k11t8p7_check⟩ + +private theorem k11t8_cover18 : ∀ P ∈ pathPatterns 2 2 [1], HasCheckedCertificate 11 8 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k11t8_cover19 + · exact by + intro _ + exact k11t8_cover20 + +private theorem k11t8_cover21 : ∀ P ∈ pathPatterns 1 1 [1, 1], HasCheckedCertificate 11 8 ([[], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t8_cover22 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1], HasCheckedCertificate 11 8 ([[], [], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t8p8, Certificates.k11t8p8_check⟩ + +private theorem k11t8_cover23 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 11 8 ([[], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k11t8_cover24 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 11 8 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t8_cover25 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 11 8 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover5 : ∀ P ∈ pathPatterns 4 3 [], HasCheckedCertificate 11 8 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t8_cover6 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover18 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover21 + · intro q + fin_cases q + · exact by + intro _ + exact k11t8_cover22 + · exact by + constructor + · exact by + intro _ + exact k11t8_cover23 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover24 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover25 + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover27 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 11 8 ([[], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k11t8_cover28 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 11 8 ([[], [], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t8p9, Certificates.k11t8p9_check⟩ + +private theorem k11t8_cover29 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 11 8 ([[], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k11t8_cover26 : ∀ P ∈ pathPatterns 3 2 [1], HasCheckedCertificate 11 8 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover27 + · intro q + fin_cases q + · exact by + intro _ + exact k11t8_cover28 + · exact by + constructor + · exact by + intro _ + exact k11t8_cover29 + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover30 : ∀ P ∈ pathPatterns 2 1 [1, 1], HasCheckedCertificate 11 8 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k11t8_cover31 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1], HasCheckedCertificate 11 8 ([[], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t8_cover32 : ∀ P ∈ pathPatterns 2 0 [1, 2], HasCheckedCertificate 11 8 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover33 : ∀ P ∈ pathPatterns 3 1 [2], HasCheckedCertificate 11 8 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover34 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 11 8 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover4 : ∀ P ∈ pathPatterns 5 3 [], HasCheckedCertificate 11 8 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t8_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover26 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover30 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover31 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover32 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover33 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover34 + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover37 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 11 8 ([[], [], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k11t8p10, Certificates.k11t8p10_check⟩ + +private theorem k11t8_cover36 : ∀ P ∈ pathPatterns 2 1 [1], HasCheckedCertificate 11 8 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k11t8_cover37 + +private theorem k11t8_cover38 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 11 8 ([[], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k11t8_cover39 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 11 8 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover35 : ∀ P ∈ pathPatterns 4 2 [1], HasCheckedCertificate 11 8 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover36 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover38 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover39 + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover40 : ∀ P ∈ pathPatterns 3 1 [1, 1], HasCheckedCertificate 11 8 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover41 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1], HasCheckedCertificate 11 8 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover42 : ∀ P ∈ pathPatterns 3 0 [1, 2], HasCheckedCertificate 11 8 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover43 : ∀ P ∈ pathPatterns 4 1 [2], HasCheckedCertificate 11 8 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover44 : ∀ P ∈ pathPatterns 4 0 [3], HasCheckedCertificate 11 8 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover3 : ∀ P ∈ pathPatterns 6 3 [], HasCheckedCertificate 11 8 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t8_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover35 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover40 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover41 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover42 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover43 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover44 + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover47 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 11 8 ([[], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k11t8_cover46 : ∀ P ∈ pathPatterns 3 1 [1], HasCheckedCertificate 11 8 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover47 + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover48 : ∀ P ∈ pathPatterns 2 0 [1, 1], HasCheckedCertificate 11 8 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover49 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 11 8 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover45 : ∀ P ∈ pathPatterns 5 2 [1], HasCheckedCertificate 11 8 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover46 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover48 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover49 + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover50 : ∀ P ∈ pathPatterns 4 1 [1, 1], HasCheckedCertificate 11 8 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover51 : ∀ P ∈ pathPatterns 3 0 [1, 1, 1], HasCheckedCertificate 11 8 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover52 : ∀ P ∈ pathPatterns 4 0 [1, 2], HasCheckedCertificate 11 8 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover53 : ∀ P ∈ pathPatterns 5 1 [2], HasCheckedCertificate 11 8 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover54 : ∀ P ∈ pathPatterns 5 0 [3], HasCheckedCertificate 11 8 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover2 : ∀ P ∈ pathPatterns 7 3 [], HasCheckedCertificate 11 8 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t8_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover45 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover50 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover51 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover52 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover53 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover54 + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover57 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 11 8 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover56 : ∀ P ∈ pathPatterns 4 1 [1], HasCheckedCertificate 11 8 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover57 + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover58 : ∀ P ∈ pathPatterns 3 0 [1, 1], HasCheckedCertificate 11 8 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover59 : ∀ P ∈ pathPatterns 4 0 [2], HasCheckedCertificate 11 8 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover55 : ∀ P ∈ pathPatterns 6 2 [1], HasCheckedCertificate 11 8 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover56 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover58 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover59 + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover60 : ∀ P ∈ pathPatterns 5 1 [1, 1], HasCheckedCertificate 11 8 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover61 : ∀ P ∈ pathPatterns 4 0 [1, 1, 1], HasCheckedCertificate 11 8 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover62 : ∀ P ∈ pathPatterns 5 0 [1, 2], HasCheckedCertificate 11 8 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover63 : ∀ P ∈ pathPatterns 6 1 [2], HasCheckedCertificate 11 8 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover64 : ∀ P ∈ pathPatterns 6 0 [3], HasCheckedCertificate 11 8 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k11t8_cover1 : ∀ P ∈ pathPatterns 8 3 [], HasCheckedCertificate 11 8 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k11t8_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover55 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover60 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover61 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover62 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover63 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k11t8_cover64 + · intro q + exact Fin.elim0 q + +theorem coverage_k11_t8 : + ∀ P ∈ pathPatterns 8 3, HasCheckedCertificate 11 8 P := + k11t8_cover1 + +end CycleClique.Construction.CertifiedCoverage + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK12.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK12.lean new file mode 100644 index 0000000000000000000000000000000000000000..7bb35559c87918277b7b0d0bdbea0a69eb34213f --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK12.lean @@ -0,0 +1,8148 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK12 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage + +namespace OAI + +namespace CycleClique.Construction.CertifiedCoverage + +private theorem k12t6_cover10 : ∀ P ∈ pathPatterns 0 6 [], HasCheckedCertificate 12 6 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p0, Certificates.k12t6p0_check⟩ + +private theorem k12t6_cover9 : ∀ P ∈ pathPatterns 1 6 [], HasCheckedCertificate 12 6 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k12t6_cover10 + +private theorem k12t6_cover11 : ∀ P ∈ pathPatterns 0 5 [1], HasCheckedCertificate 12 6 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p1, Certificates.k12t6p1_check⟩ + +private theorem k12t6_cover12 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 12 6 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p2, Certificates.k12t6p2_check⟩ + +private theorem k12t6_cover13 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 12 6 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p3, Certificates.k12t6p3_check⟩ + +private theorem k12t6_cover14 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 12 6 ([[], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p4, Certificates.k12t6p4_check⟩ + +private theorem k12t6_cover15 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 12 6 ([[], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p5, Certificates.k12t6p5_check⟩ + +private theorem k12t6_cover16 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 12 6 ([[], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p6, Certificates.k12t6p6_check⟩ + +private theorem k12t6_cover8 : ∀ P ∈ pathPatterns 2 6 [], HasCheckedCertificate 12 6 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k12t6_cover9 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover11 + · exact by + intro _ + exact k12t6_cover12 + · exact by + intro _ + exact k12t6_cover13 + · exact by + intro _ + exact k12t6_cover14 + · exact by + intro _ + exact k12t6_cover15 + · exact by + intro _ + exact k12t6_cover16 + +private theorem k12t6_cover17 : ∀ P ∈ pathPatterns 1 5 [1], HasCheckedCertificate 12 6 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover18 : ∀ P ∈ pathPatterns 0 4 [1, 1], HasCheckedCertificate 12 6 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p7, Certificates.k12t6p7_check⟩ + +private theorem k12t6_cover19 : ∀ P ∈ pathPatterns 0 3 [1, 2], HasCheckedCertificate 12 6 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p8, Certificates.k12t6p8_check⟩ + +private theorem k12t6_cover20 : ∀ P ∈ pathPatterns 0 2 [1, 3], HasCheckedCertificate 12 6 ([[], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p9, Certificates.k12t6p9_check⟩ + +private theorem k12t6_cover21 : ∀ P ∈ pathPatterns 0 1 [1, 4], HasCheckedCertificate 12 6 ([[], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p10, Certificates.k12t6p10_check⟩ + +private theorem k12t6_cover22 : ∀ P ∈ pathPatterns 0 0 [1, 5], HasCheckedCertificate 12 6 ([[], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p11, Certificates.k12t6p11_check⟩ + +private theorem k12t6_cover23 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 12 6 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover24 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 12 6 ([[], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p12, Certificates.k12t6p12_check⟩ + +private theorem k12t6_cover25 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 12 6 ([[], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p13, Certificates.k12t6p13_check⟩ + +private theorem k12t6_cover26 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 12 6 ([[], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p14, Certificates.k12t6p14_check⟩ + +private theorem k12t6_cover27 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 12 6 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover28 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 12 6 ([[], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p15, Certificates.k12t6p15_check⟩ + +private theorem k12t6_cover29 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 12 6 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover30 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 12 6 ([[], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover31 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 12 6 ([[], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover7 : ∀ P ∈ pathPatterns 3 6 [], HasCheckedCertificate 12 6 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k12t6_cover8 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover17 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover18 + · exact by + intro _ + exact k12t6_cover19 + · exact by + intro _ + exact k12t6_cover20 + · exact by + intro _ + exact k12t6_cover21 + · exact by + intro _ + exact k12t6_cover22 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover23 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k12t6_cover24 + · exact by + intro _ + exact k12t6_cover25 + · exact by + intro _ + exact k12t6_cover26 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover27 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k12t6_cover28 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover29 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover30 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover31 + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover33 : ∀ P ∈ pathPatterns 0 4 [1], HasCheckedCertificate 12 6 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p16, Certificates.k12t6p16_check⟩ + +private theorem k12t6_cover34 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 12 6 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p17, Certificates.k12t6p17_check⟩ + +private theorem k12t6_cover35 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 12 6 ([[], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p18, Certificates.k12t6p18_check⟩ + +private theorem k12t6_cover36 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 12 6 ([[], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p19, Certificates.k12t6p19_check⟩ + +private theorem k12t6_cover37 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 12 6 ([[], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p20, Certificates.k12t6p20_check⟩ + +private theorem k12t6_cover32 : ∀ P ∈ pathPatterns 2 5 [1], HasCheckedCertificate 12 6 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover33 + · exact by + intro _ + exact k12t6_cover34 + · exact by + intro _ + exact k12t6_cover35 + · exact by + intro _ + exact k12t6_cover36 + · exact by + intro _ + exact k12t6_cover37 + +private theorem k12t6_cover38 : ∀ P ∈ pathPatterns 1 4 [1, 1], HasCheckedCertificate 12 6 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover39 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1], HasCheckedCertificate 12 6 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p21, Certificates.k12t6p21_check⟩ + +private theorem k12t6_cover40 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2], HasCheckedCertificate 12 6 ([[], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p22, Certificates.k12t6p22_check⟩ + +private theorem k12t6_cover41 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3], HasCheckedCertificate 12 6 ([[], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p23, Certificates.k12t6p23_check⟩ + +private theorem k12t6_cover42 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4], HasCheckedCertificate 12 6 ([[], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p24, Certificates.k12t6p24_check⟩ + +private theorem k12t6_cover43 : ∀ P ∈ pathPatterns 1 3 [1, 2], HasCheckedCertificate 12 6 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover44 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1], HasCheckedCertificate 12 6 ([[], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p25, Certificates.k12t6p25_check⟩ + +private theorem k12t6_cover45 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2], HasCheckedCertificate 12 6 ([[], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p26, Certificates.k12t6p26_check⟩ + +private theorem k12t6_cover46 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3], HasCheckedCertificate 12 6 ([[], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p27, Certificates.k12t6p27_check⟩ + +private theorem k12t6_cover47 : ∀ P ∈ pathPatterns 1 2 [1, 3], HasCheckedCertificate 12 6 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover48 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1], HasCheckedCertificate 12 6 ([[], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p28, Certificates.k12t6p28_check⟩ + +private theorem k12t6_cover49 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2], HasCheckedCertificate 12 6 ([[], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p29, Certificates.k12t6p29_check⟩ + +private theorem k12t6_cover50 : ∀ P ∈ pathPatterns 1 1 [1, 4], HasCheckedCertificate 12 6 ([[], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover51 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1], HasCheckedCertificate 12 6 ([[], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p30, Certificates.k12t6p30_check⟩ + +private theorem k12t6_cover52 : ∀ P ∈ pathPatterns 1 0 [1, 5], HasCheckedCertificate 12 6 ([[], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover54 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 12 6 ([[], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p31, Certificates.k12t6p31_check⟩ + +private theorem k12t6_cover55 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 12 6 ([[], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p32, Certificates.k12t6p32_check⟩ + +private theorem k12t6_cover56 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 12 6 ([[], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p33, Certificates.k12t6p33_check⟩ + +private theorem k12t6_cover53 : ∀ P ∈ pathPatterns 2 4 [2], HasCheckedCertificate 12 6 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t6_cover54 + · exact by + intro _ + exact k12t6_cover55 + · exact by + intro _ + exact k12t6_cover56 + +private theorem k12t6_cover57 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2], HasCheckedCertificate 12 6 ([[], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p34, Certificates.k12t6p34_check⟩ + +private theorem k12t6_cover58 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3], HasCheckedCertificate 12 6 ([[], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p35, Certificates.k12t6p35_check⟩ + +private theorem k12t6_cover59 : ∀ P ∈ pathPatterns 1 2 [2, 2], HasCheckedCertificate 12 6 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover60 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2], HasCheckedCertificate 12 6 ([[], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p36, Certificates.k12t6p36_check⟩ + +private theorem k12t6_cover61 : ∀ P ∈ pathPatterns 1 1 [2, 3], HasCheckedCertificate 12 6 ([[], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover62 : ∀ P ∈ pathPatterns 1 0 [2, 4], HasCheckedCertificate 12 6 ([[], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover64 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 12 6 ([[], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p37, Certificates.k12t6p37_check⟩ + +private theorem k12t6_cover63 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 12 6 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k12t6_cover64 + +private theorem k12t6_cover65 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 12 6 ([[], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover66 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 12 6 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k12t6_cover67 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 12 6 ([[], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t6_cover68 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 12 6 ([[], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_seq6 : amountSequenceForall 3 6 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 12 6 ([[], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k12t6_cover7 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover32 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover38 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover39 + · exact by + intro _ + exact k12t6_cover40 + · exact by + intro _ + exact k12t6_cover41 + · exact by + intro _ + exact k12t6_cover42 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover43 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover44 + · exact by + intro _ + exact k12t6_cover45 + · exact by + intro _ + exact k12t6_cover46 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover47 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover48 + · exact by + intro _ + exact k12t6_cover49 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover50 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover51 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover52 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover53 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k12t6_cover57 + · exact by + intro _ + exact k12t6_cover58 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover59 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k12t6_cover60 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover61 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover62 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover63 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover65 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover66 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover67 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover68 + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover5 : ∀ P ∈ pathPatterns 4 6 [], HasCheckedCertificate 12 6 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact k12t6_seq6 + + +private theorem k12t6_cover71 : ∀ P ∈ pathPatterns 1 4 [1], HasCheckedCertificate 12 6 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover72 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 12 6 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p38, Certificates.k12t6p38_check⟩ + +private theorem k12t6_cover73 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 12 6 ([[], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p39, Certificates.k12t6p39_check⟩ + +private theorem k12t6_cover74 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 12 6 ([[], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p40, Certificates.k12t6p40_check⟩ + +private theorem k12t6_cover75 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 12 6 ([[], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p41, Certificates.k12t6p41_check⟩ + +private theorem k12t6_cover76 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 12 6 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover77 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 12 6 ([[], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p42, Certificates.k12t6p42_check⟩ + +private theorem k12t6_cover78 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 12 6 ([[], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p43, Certificates.k12t6p43_check⟩ + +private theorem k12t6_cover79 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 12 6 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover80 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 12 6 ([[], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover81 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 12 6 ([[], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover70 : ∀ P ∈ pathPatterns 3 5 [1], HasCheckedCertificate 12 6 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover71 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover72 + · exact by + intro _ + exact k12t6_cover73 + · exact by + intro _ + exact k12t6_cover74 + · exact by + intro _ + exact k12t6_cover75 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover76 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k12t6_cover77 + · exact by + intro _ + exact k12t6_cover78 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover79 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover80 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover81 + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover83 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 12 6 ([[], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p44, Certificates.k12t6p44_check⟩ + +private theorem k12t6_cover84 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 12 6 ([[], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p45, Certificates.k12t6p45_check⟩ + +private theorem k12t6_cover85 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 12 6 ([[], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p46, Certificates.k12t6p46_check⟩ + +private theorem k12t6_cover82 : ∀ P ∈ pathPatterns 2 4 [1, 1], HasCheckedCertificate 12 6 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t6_cover83 + · exact by + intro _ + exact k12t6_cover84 + · exact by + intro _ + exact k12t6_cover85 + +private theorem k12t6_cover86 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1], HasCheckedCertificate 12 6 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover87 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1], HasCheckedCertificate 12 6 ([[], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p47, Certificates.k12t6p47_check⟩ + +private theorem k12t6_cover88 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2], HasCheckedCertificate 12 6 ([[], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p48, Certificates.k12t6p48_check⟩ + +private theorem k12t6_cover89 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3], HasCheckedCertificate 12 6 ([[], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p49, Certificates.k12t6p49_check⟩ + +private theorem k12t6_cover90 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2], HasCheckedCertificate 12 6 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover91 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1], HasCheckedCertificate 12 6 ([[], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p50, Certificates.k12t6p50_check⟩ + +private theorem k12t6_cover92 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2], HasCheckedCertificate 12 6 ([[], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p51, Certificates.k12t6p51_check⟩ + +private theorem k12t6_cover93 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3], HasCheckedCertificate 12 6 ([[], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover94 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1], HasCheckedCertificate 12 6 ([[], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p52, Certificates.k12t6p52_check⟩ + +private theorem k12t6_cover95 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4], HasCheckedCertificate 12 6 ([[], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover97 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 12 6 ([[], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p53, Certificates.k12t6p53_check⟩ + +private theorem k12t6_cover98 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 12 6 ([[], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p54, Certificates.k12t6p54_check⟩ + +private theorem k12t6_cover96 : ∀ P ∈ pathPatterns 2 3 [1, 2], HasCheckedCertificate 12 6 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t6_cover97 + · exact by + intro _ + exact k12t6_cover98 + +private theorem k12t6_cover99 : ∀ P ∈ pathPatterns 1 2 [1, 2, 1], HasCheckedCertificate 12 6 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover100 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2], HasCheckedCertificate 12 6 ([[], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p55, Certificates.k12t6p55_check⟩ + +private theorem k12t6_cover101 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2], HasCheckedCertificate 12 6 ([[], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover102 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 1], HasCheckedCertificate 12 6 ([[], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p56, Certificates.k12t6p56_check⟩ + +private theorem k12t6_cover103 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3], HasCheckedCertificate 12 6 ([[], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover105 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 12 6 ([[], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p57, Certificates.k12t6p57_check⟩ + +private theorem k12t6_cover104 : ∀ P ∈ pathPatterns 2 2 [1, 3], HasCheckedCertificate 12 6 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t6_cover105 + +private theorem k12t6_cover106 : ∀ P ∈ pathPatterns 1 1 [1, 3, 1], HasCheckedCertificate 12 6 ([[], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover107 : ∀ P ∈ pathPatterns 1 0 [1, 3, 2], HasCheckedCertificate 12 6 ([[], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover108 : ∀ P ∈ pathPatterns 2 1 [1, 4], HasCheckedCertificate 12 6 ([[], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t6_cover109 : ∀ P ∈ pathPatterns 1 0 [1, 4, 1], HasCheckedCertificate 12 6 ([[], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover110 : ∀ P ∈ pathPatterns 2 0 [1, 5], HasCheckedCertificate 12 6 ([[], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_seq69 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 12 6 ([[]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k12t6_cover70 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover82 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover86 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover87 + · exact by + intro _ + exact k12t6_cover88 + · exact by + intro _ + exact k12t6_cover89 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover90 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover91 + · exact by + intro _ + exact k12t6_cover92 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover93 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover94 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover95 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover96 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover99 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k12t6_cover100 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover101 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover102 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover103 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover104 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover106 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover107 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover108 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover109 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover110 + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover112 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 12 6 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover113 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 12 6 ([[], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p58, Certificates.k12t6p58_check⟩ + +private theorem k12t6_cover114 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 12 6 ([[], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover115 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 12 6 ([[], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover111 : ∀ P ∈ pathPatterns 3 4 [2], HasCheckedCertificate 12 6 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover112 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k12t6_cover113 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover114 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover115 + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover116 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 2], HasCheckedCertificate 12 6 ([[], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p59, Certificates.k12t6p59_check⟩ + +private theorem k12t6_cover117 : ∀ P ∈ pathPatterns 1 1 [2, 1, 2], HasCheckedCertificate 12 6 ([[], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover118 : ∀ P ∈ pathPatterns 1 0 [2, 1, 3], HasCheckedCertificate 12 6 ([[], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover119 : ∀ P ∈ pathPatterns 2 2 [2, 2], HasCheckedCertificate 12 6 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k12t6_cover120 : ∀ P ∈ pathPatterns 1 0 [2, 2, 2], HasCheckedCertificate 12 6 ([[], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover121 : ∀ P ∈ pathPatterns 2 1 [2, 3], HasCheckedCertificate 12 6 ([[], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t6_cover122 : ∀ P ∈ pathPatterns 2 0 [2, 4], HasCheckedCertificate 12 6 ([[], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover124 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 12 6 ([[], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover123 : ∀ P ∈ pathPatterns 3 3 [3], HasCheckedCertificate 12 6 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover124 + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover125 : ∀ P ∈ pathPatterns 2 0 [3, 3], HasCheckedCertificate 12 6 ([[], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover126 : ∀ P ∈ pathPatterns 3 2 [4], HasCheckedCertificate 12 6 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover127 : ∀ P ∈ pathPatterns 3 1 [5], HasCheckedCertificate 12 6 ([[], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover128 : ∀ P ∈ pathPatterns 3 0 [6], HasCheckedCertificate 12 6 ([[], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_seq4 : amountSequenceForall 4 6 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 12 6 ([[]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k12t6_cover5 + · intro q + fin_cases q + · exact k12t6_seq69 + + · exact by + constructor + · exact by + intro _ + exact k12t6_cover111 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k12t6_cover116 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover117 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover118 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover119 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover120 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover121 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover122 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover123 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover125 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover126 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover127 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover128 + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover3 : ∀ P ∈ pathPatterns 5 6 [], HasCheckedCertificate 12 6 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact k12t6_seq4 + + +private theorem k12t6_cover133 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 12 6 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p60, Certificates.k12t6p60_check⟩ + +private theorem k12t6_cover134 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 12 6 ([[1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p61, Certificates.k12t6p61_check⟩ + +private theorem k12t6_cover135 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 12 6 ([[1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p62, Certificates.k12t6p62_check⟩ + +private theorem k12t6_cover136 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 12 6 ([[1], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p63, Certificates.k12t6p63_check⟩ + +private theorem k12t6_cover132 : ∀ P ∈ pathPatterns 2 4 [1], HasCheckedCertificate 12 6 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover133 + · exact by + intro _ + exact k12t6_cover134 + · exact by + intro _ + exact k12t6_cover135 + · exact by + intro _ + exact k12t6_cover136 + +private theorem k12t6_cover137 : ∀ P ∈ pathPatterns 1 3 [1, 1], HasCheckedCertificate 12 6 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover138 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1], HasCheckedCertificate 12 6 ([[1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p64, Certificates.k12t6p64_check⟩ + +private theorem k12t6_cover139 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2], HasCheckedCertificate 12 6 ([[1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p65, Certificates.k12t6p65_check⟩ + +private theorem k12t6_cover140 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3], HasCheckedCertificate 12 6 ([[1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p66, Certificates.k12t6p66_check⟩ + +private theorem k12t6_cover141 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 12 6 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover142 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 12 6 ([[1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p67, Certificates.k12t6p67_check⟩ + +private theorem k12t6_cover143 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 12 6 ([[1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p68, Certificates.k12t6p68_check⟩ + +private theorem k12t6_cover144 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 12 6 ([[1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover145 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 12 6 ([[1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p69, Certificates.k12t6p69_check⟩ + +private theorem k12t6_cover146 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 12 6 ([[1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover148 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 12 6 ([[1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p70, Certificates.k12t6p70_check⟩ + +private theorem k12t6_cover149 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 12 6 ([[1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p71, Certificates.k12t6p71_check⟩ + +private theorem k12t6_cover147 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 12 6 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t6_cover148 + · exact by + intro _ + exact k12t6_cover149 + +private theorem k12t6_cover150 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 12 6 ([[1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p72, Certificates.k12t6p72_check⟩ + +private theorem k12t6_cover151 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 12 6 ([[1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover152 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 12 6 ([[1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover153 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 12 6 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k12t6_cover154 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 12 6 ([[1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t6_cover155 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 12 6 ([[1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_seq131 : amountSequenceForall 3 5 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 12 6 ([[1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover132 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover137 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover138 + · exact by + intro _ + exact k12t6_cover139 + · exact by + intro _ + exact k12t6_cover140 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover141 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover142 + · exact by + intro _ + exact k12t6_cover143 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover144 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover145 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover146 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover147 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k12t6_cover150 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover151 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover152 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover153 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover154 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover155 + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover130 : ∀ P ∈ pathPatterns 4 5 [1], HasCheckedCertificate 12 6 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact k12t6_seq131 + + +private theorem k12t6_cover157 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 12 6 ([[1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p73, Certificates.k12t6p73_check⟩ + +private theorem k12t6_cover158 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 12 6 ([[1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p74, Certificates.k12t6p74_check⟩ + +private theorem k12t6_cover159 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 12 6 ([[1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p75, Certificates.k12t6p75_check⟩ + +private theorem k12t6_cover160 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 12 6 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover161 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 12 6 ([[1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p76, Certificates.k12t6p76_check⟩ + +private theorem k12t6_cover162 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 12 6 ([[1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover163 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 12 6 ([[1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover156 : ∀ P ∈ pathPatterns 3 4 [1, 1], HasCheckedCertificate 12 6 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover157 + · exact by + intro _ + exact k12t6_cover158 + · exact by + intro _ + exact k12t6_cover159 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover160 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k12t6_cover161 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover162 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover163 + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover165 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 12 6 ([[1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p77, Certificates.k12t6p77_check⟩ + +private theorem k12t6_cover166 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 12 6 ([[1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p78, Certificates.k12t6p78_check⟩ + +private theorem k12t6_cover164 : ∀ P ∈ pathPatterns 2 3 [1, 1, 1], HasCheckedCertificate 12 6 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t6_cover165 + · exact by + intro _ + exact k12t6_cover166 + +private theorem k12t6_cover167 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 1], HasCheckedCertificate 12 6 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover168 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 1], HasCheckedCertificate 12 6 ([[1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p79, Certificates.k12t6p79_check⟩ + +private theorem k12t6_cover169 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 2], HasCheckedCertificate 12 6 ([[1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p80, Certificates.k12t6p80_check⟩ + +private theorem k12t6_cover170 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 2], HasCheckedCertificate 12 6 ([[1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover171 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 1], HasCheckedCertificate 12 6 ([[1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p81, Certificates.k12t6p81_check⟩ + +private theorem k12t6_cover172 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 3], HasCheckedCertificate 12 6 ([[1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover174 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 12 6 ([[1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p82, Certificates.k12t6p82_check⟩ + +private theorem k12t6_cover173 : ∀ P ∈ pathPatterns 2 2 [1, 1, 2], HasCheckedCertificate 12 6 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t6_cover174 + +private theorem k12t6_cover175 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 1], HasCheckedCertificate 12 6 ([[1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover176 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 1], HasCheckedCertificate 12 6 ([[1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p83, Certificates.k12t6p83_check⟩ + +private theorem k12t6_cover177 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 2], HasCheckedCertificate 12 6 ([[1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover178 : ∀ P ∈ pathPatterns 2 1 [1, 1, 3], HasCheckedCertificate 12 6 ([[1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t6_cover179 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 1], HasCheckedCertificate 12 6 ([[1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover180 : ∀ P ∈ pathPatterns 2 0 [1, 1, 4], HasCheckedCertificate 12 6 ([[1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover182 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 12 6 ([[1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p84, Certificates.k12t6p84_check⟩ + +private theorem k12t6_cover183 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 12 6 ([[1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover184 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 12 6 ([[1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover181 : ∀ P ∈ pathPatterns 3 3 [1, 2], HasCheckedCertificate 12 6 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k12t6_cover182 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover183 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover184 + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover186 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 12 6 ([[1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p85, Certificates.k12t6p85_check⟩ + +private theorem k12t6_cover185 : ∀ P ∈ pathPatterns 2 2 [1, 2, 1], HasCheckedCertificate 12 6 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t6_cover186 + +private theorem k12t6_cover187 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 2], HasCheckedCertificate 12 6 ([[1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover188 : ∀ P ∈ pathPatterns 2 1 [1, 2, 2], HasCheckedCertificate 12 6 ([[1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t6_cover189 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 1], HasCheckedCertificate 12 6 ([[1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover190 : ∀ P ∈ pathPatterns 2 0 [1, 2, 3], HasCheckedCertificate 12 6 ([[1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover192 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 12 6 ([[1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover191 : ∀ P ∈ pathPatterns 3 2 [1, 3], HasCheckedCertificate 12 6 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover192 + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover193 : ∀ P ∈ pathPatterns 2 1 [1, 3, 1], HasCheckedCertificate 12 6 ([[1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t6_cover194 : ∀ P ∈ pathPatterns 2 0 [1, 3, 2], HasCheckedCertificate 12 6 ([[1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover195 : ∀ P ∈ pathPatterns 3 1 [1, 4], HasCheckedCertificate 12 6 ([[1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover196 : ∀ P ∈ pathPatterns 2 0 [1, 4, 1], HasCheckedCertificate 12 6 ([[1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover197 : ∀ P ∈ pathPatterns 3 0 [1, 5], HasCheckedCertificate 12 6 ([[1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_seq129 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 12 6 ([] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k12t6_cover130 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover156 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover164 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover167 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover168 + · exact by + intro _ + exact k12t6_cover169 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover170 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover171 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover172 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover173 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover175 + · intro q + fin_cases q + · exact by + intro _ + exact k12t6_cover176 + · exact by + constructor + · exact by + intro _ + exact k12t6_cover177 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover178 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover179 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover180 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover181 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover185 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover187 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover188 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover189 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover190 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover191 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover193 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover194 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover195 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover196 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover197 + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover200 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 12 6 ([[2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t6p86, Certificates.k12t6p86_check⟩ + +private theorem k12t6_cover199 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 12 6 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t6_cover200 + +private theorem k12t6_cover201 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 12 6 ([[2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover202 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 12 6 ([[2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t6_cover203 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 12 6 ([[2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover198 : ∀ P ∈ pathPatterns 4 4 [2], HasCheckedCertificate 12 6 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover199 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover201 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover202 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover203 + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover204 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 2], HasCheckedCertificate 12 6 ([[2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t6_cover205 : ∀ P ∈ pathPatterns 2 1 [2, 1, 2], HasCheckedCertificate 12 6 ([[2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t6_cover206 : ∀ P ∈ pathPatterns 2 0 [2, 1, 3], HasCheckedCertificate 12 6 ([[2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover207 : ∀ P ∈ pathPatterns 3 2 [2, 2], HasCheckedCertificate 12 6 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover208 : ∀ P ∈ pathPatterns 2 0 [2, 2, 2], HasCheckedCertificate 12 6 ([[2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover209 : ∀ P ∈ pathPatterns 3 1 [2, 3], HasCheckedCertificate 12 6 ([[2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover210 : ∀ P ∈ pathPatterns 3 0 [2, 4], HasCheckedCertificate 12 6 ([[2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover212 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 12 6 ([[3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover211 : ∀ P ∈ pathPatterns 4 3 [3], HasCheckedCertificate 12 6 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover212 + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover213 : ∀ P ∈ pathPatterns 3 0 [3, 3], HasCheckedCertificate 12 6 ([[3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover214 : ∀ P ∈ pathPatterns 4 2 [4], HasCheckedCertificate 12 6 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover215 : ∀ P ∈ pathPatterns 4 1 [5], HasCheckedCertificate 12 6 ([[5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover216 : ∀ P ∈ pathPatterns 4 0 [6], HasCheckedCertificate 12 6 ([[6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t6_seq2 : amountSequenceForall 5 6 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 12 6 ([] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k12t6_cover3 + · intro q + fin_cases q + · exact k12t6_seq129 + + · exact by + constructor + · exact by + intro _ + exact k12t6_cover198 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t6_cover204 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover205 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover206 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover207 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover208 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover209 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover210 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover211 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover213 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover214 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover215 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t6_cover216 + · intro q + exact Fin.elim0 q + +private theorem k12t6_cover1 : ∀ P ∈ pathPatterns 6 6 [], HasCheckedCertificate 12 6 ([] ++ P) := by + apply pathPatterns_forall_step + exact k12t6_seq2 + + +theorem coverage_k12_t6 : + ∀ P ∈ pathPatterns 6 6, HasCheckedCertificate 12 6 P := + k12t6_cover1 + +private theorem k12t7_cover12 : ∀ P ∈ pathPatterns 0 5 [], HasCheckedCertificate 12 7 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p0, Certificates.k12t7p0_check⟩ + +private theorem k12t7_cover11 : ∀ P ∈ pathPatterns 1 5 [], HasCheckedCertificate 12 7 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k12t7_cover12 + +private theorem k12t7_cover13 : ∀ P ∈ pathPatterns 0 4 [1], HasCheckedCertificate 12 7 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p1, Certificates.k12t7p1_check⟩ + +private theorem k12t7_cover14 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 12 7 ([[], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p2, Certificates.k12t7p2_check⟩ + +private theorem k12t7_cover15 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 12 7 ([[], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p3, Certificates.k12t7p3_check⟩ + +private theorem k12t7_cover16 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 12 7 ([[], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p4, Certificates.k12t7p4_check⟩ + +private theorem k12t7_cover17 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 12 7 ([[], [], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p5, Certificates.k12t7p5_check⟩ + +private theorem k12t7_cover10 : ∀ P ∈ pathPatterns 2 5 [], HasCheckedCertificate 12 7 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k12t7_cover11 + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover13 + · exact by + intro _ + exact k12t7_cover14 + · exact by + intro _ + exact k12t7_cover15 + · exact by + intro _ + exact k12t7_cover16 + · exact by + intro _ + exact k12t7_cover17 + +private theorem k12t7_cover18 : ∀ P ∈ pathPatterns 1 4 [1], HasCheckedCertificate 12 7 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover19 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 12 7 ([[], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p6, Certificates.k12t7p6_check⟩ + +private theorem k12t7_cover20 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 12 7 ([[], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p7, Certificates.k12t7p7_check⟩ + +private theorem k12t7_cover21 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 12 7 ([[], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p8, Certificates.k12t7p8_check⟩ + +private theorem k12t7_cover22 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 12 7 ([[], [], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p9, Certificates.k12t7p9_check⟩ + +private theorem k12t7_cover23 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 12 7 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover24 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 12 7 ([[], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p10, Certificates.k12t7p10_check⟩ + +private theorem k12t7_cover25 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 12 7 ([[], [], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p11, Certificates.k12t7p11_check⟩ + +private theorem k12t7_cover26 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 12 7 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover27 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 12 7 ([[], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover28 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 12 7 ([[], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover9 : ∀ P ∈ pathPatterns 3 5 [], HasCheckedCertificate 12 7 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k12t7_cover10 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover18 + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover19 + · exact by + intro _ + exact k12t7_cover20 + · exact by + intro _ + exact k12t7_cover21 + · exact by + intro _ + exact k12t7_cover22 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover23 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k12t7_cover24 + · exact by + intro _ + exact k12t7_cover25 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover26 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k12t7_cover27 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k12t7_cover28 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover30 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 12 7 ([[], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p12, Certificates.k12t7p12_check⟩ + +private theorem k12t7_cover31 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 12 7 ([[], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p13, Certificates.k12t7p13_check⟩ + +private theorem k12t7_cover32 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 12 7 ([[], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p14, Certificates.k12t7p14_check⟩ + +private theorem k12t7_cover33 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 12 7 ([[], [], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p15, Certificates.k12t7p15_check⟩ + +private theorem k12t7_cover29 : ∀ P ∈ pathPatterns 2 4 [1], HasCheckedCertificate 12 7 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover30 + · exact by + intro _ + exact k12t7_cover31 + · exact by + intro _ + exact k12t7_cover32 + · exact by + intro _ + exact k12t7_cover33 + +private theorem k12t7_cover34 : ∀ P ∈ pathPatterns 1 3 [1, 1], HasCheckedCertificate 12 7 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover35 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1], HasCheckedCertificate 12 7 ([[], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p16, Certificates.k12t7p16_check⟩ + +private theorem k12t7_cover36 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2], HasCheckedCertificate 12 7 ([[], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p17, Certificates.k12t7p17_check⟩ + +private theorem k12t7_cover37 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3], HasCheckedCertificate 12 7 ([[], [], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p18, Certificates.k12t7p18_check⟩ + +private theorem k12t7_cover38 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 12 7 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover39 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 12 7 ([[], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p19, Certificates.k12t7p19_check⟩ + +private theorem k12t7_cover40 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 12 7 ([[], [], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p20, Certificates.k12t7p20_check⟩ + +private theorem k12t7_cover41 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 12 7 ([[], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover42 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 12 7 ([[], [], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p21, Certificates.k12t7p21_check⟩ + +private theorem k12t7_cover43 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 12 7 ([[], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover45 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 12 7 ([[], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p22, Certificates.k12t7p22_check⟩ + +private theorem k12t7_cover46 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 12 7 ([[], [], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p23, Certificates.k12t7p23_check⟩ + +private theorem k12t7_cover44 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 12 7 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t7_cover45 + · exact by + intro _ + exact k12t7_cover46 + +private theorem k12t7_cover47 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 12 7 ([[], [], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p24, Certificates.k12t7p24_check⟩ + +private theorem k12t7_cover48 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 12 7 ([[], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover49 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 12 7 ([[], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover50 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 12 7 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k12t7_cover51 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 12 7 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t7_cover52 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 12 7 ([[], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_seq8 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 12 7 ([[], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k12t7_cover9 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover29 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover34 + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover35 + · exact by + intro _ + exact k12t7_cover36 + · exact by + intro _ + exact k12t7_cover37 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover38 + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover39 + · exact by + intro _ + exact k12t7_cover40 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover41 + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover42 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover43 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover44 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k12t7_cover47 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover48 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t7_cover49 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover50 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover51 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover52 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover7 : ∀ P ∈ pathPatterns 4 5 [], HasCheckedCertificate 12 7 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k12t7_seq8 + + +private theorem k12t7_cover54 : ∀ P ∈ pathPatterns 1 3 [1], HasCheckedCertificate 12 7 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover55 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 12 7 ([[], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p25, Certificates.k12t7p25_check⟩ + +private theorem k12t7_cover56 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 12 7 ([[], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p26, Certificates.k12t7p26_check⟩ + +private theorem k12t7_cover57 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 12 7 ([[], [], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p27, Certificates.k12t7p27_check⟩ + +private theorem k12t7_cover58 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 12 7 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover59 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 12 7 ([[], [], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p28, Certificates.k12t7p28_check⟩ + +private theorem k12t7_cover60 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 12 7 ([[], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover61 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 12 7 ([[], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover53 : ∀ P ∈ pathPatterns 3 4 [1], HasCheckedCertificate 12 7 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover54 + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover55 + · exact by + intro _ + exact k12t7_cover56 + · exact by + intro _ + exact k12t7_cover57 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover58 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k12t7_cover59 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover60 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k12t7_cover61 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover63 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 12 7 ([[], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p29, Certificates.k12t7p29_check⟩ + +private theorem k12t7_cover64 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 12 7 ([[], [], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p30, Certificates.k12t7p30_check⟩ + +private theorem k12t7_cover62 : ∀ P ∈ pathPatterns 2 3 [1, 1], HasCheckedCertificate 12 7 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t7_cover63 + · exact by + intro _ + exact k12t7_cover64 + +private theorem k12t7_cover65 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1], HasCheckedCertificate 12 7 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover66 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1], HasCheckedCertificate 12 7 ([[], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p31, Certificates.k12t7p31_check⟩ + +private theorem k12t7_cover67 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2], HasCheckedCertificate 12 7 ([[], [], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p32, Certificates.k12t7p32_check⟩ + +private theorem k12t7_cover68 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2], HasCheckedCertificate 12 7 ([[], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover69 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1], HasCheckedCertificate 12 7 ([[], [], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p33, Certificates.k12t7p33_check⟩ + +private theorem k12t7_cover70 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3], HasCheckedCertificate 12 7 ([[], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover72 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 12 7 ([[], [], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p34, Certificates.k12t7p34_check⟩ + +private theorem k12t7_cover71 : ∀ P ∈ pathPatterns 2 2 [1, 2], HasCheckedCertificate 12 7 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t7_cover72 + +private theorem k12t7_cover73 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1], HasCheckedCertificate 12 7 ([[], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover74 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2], HasCheckedCertificate 12 7 ([[], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover75 : ∀ P ∈ pathPatterns 2 1 [1, 3], HasCheckedCertificate 12 7 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t7_cover76 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1], HasCheckedCertificate 12 7 ([[], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover77 : ∀ P ∈ pathPatterns 2 0 [1, 4], HasCheckedCertificate 12 7 ([[], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover79 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 12 7 ([[], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover80 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 12 7 ([[], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover78 : ∀ P ∈ pathPatterns 3 3 [2], HasCheckedCertificate 12 7 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k12t7_cover79 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t7_cover80 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover81 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2], HasCheckedCertificate 12 7 ([[], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover82 : ∀ P ∈ pathPatterns 2 1 [2, 2], HasCheckedCertificate 12 7 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t7_cover83 : ∀ P ∈ pathPatterns 2 0 [2, 3], HasCheckedCertificate 12 7 ([[], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover84 : ∀ P ∈ pathPatterns 3 2 [3], HasCheckedCertificate 12 7 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover85 : ∀ P ∈ pathPatterns 3 1 [4], HasCheckedCertificate 12 7 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover86 : ∀ P ∈ pathPatterns 3 0 [5], HasCheckedCertificate 12 7 ([[], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_seq6 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 12 7 ([[], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k12t7_cover7 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover53 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover62 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover65 + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover66 + · exact by + intro _ + exact k12t7_cover67 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover68 + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover69 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover70 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover71 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover73 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k12t7_cover74 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover75 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover76 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover77 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover78 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t7_cover81 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover82 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover83 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover84 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover85 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover86 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover5 : ∀ P ∈ pathPatterns 5 5 [], HasCheckedCertificate 12 7 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact k12t7_seq6 + + +private theorem k12t7_cover89 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 12 7 ([[], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p35, Certificates.k12t7p35_check⟩ + +private theorem k12t7_cover90 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 12 7 ([[], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p36, Certificates.k12t7p36_check⟩ + +private theorem k12t7_cover91 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 12 7 ([[], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p37, Certificates.k12t7p37_check⟩ + +private theorem k12t7_cover88 : ∀ P ∈ pathPatterns 2 3 [1], HasCheckedCertificate 12 7 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover89 + · exact by + intro _ + exact k12t7_cover90 + · exact by + intro _ + exact k12t7_cover91 + +private theorem k12t7_cover92 : ∀ P ∈ pathPatterns 1 2 [1, 1], HasCheckedCertificate 12 7 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover93 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1], HasCheckedCertificate 12 7 ([[], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p38, Certificates.k12t7p38_check⟩ + +private theorem k12t7_cover94 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2], HasCheckedCertificate 12 7 ([[], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p39, Certificates.k12t7p39_check⟩ + +private theorem k12t7_cover95 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 12 7 ([[], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover96 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 12 7 ([[], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p40, Certificates.k12t7p40_check⟩ + +private theorem k12t7_cover97 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 12 7 ([[], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover99 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 12 7 ([[], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p41, Certificates.k12t7p41_check⟩ + +private theorem k12t7_cover98 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 12 7 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t7_cover99 + +private theorem k12t7_cover100 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 12 7 ([[], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover101 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 12 7 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t7_cover102 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 12 7 ([[], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover87 : ∀ P ∈ pathPatterns 4 4 [1], HasCheckedCertificate 12 7 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover88 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover92 + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover93 + · exact by + intro _ + exact k12t7_cover94 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover95 + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover96 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover97 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover98 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t7_cover100 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover101 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover102 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover104 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 12 7 ([[], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p42, Certificates.k12t7p42_check⟩ + +private theorem k12t7_cover105 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 12 7 ([[], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p43, Certificates.k12t7p43_check⟩ + +private theorem k12t7_cover106 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 12 7 ([[], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover107 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 12 7 ([[], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover103 : ∀ P ∈ pathPatterns 3 3 [1, 1], HasCheckedCertificate 12 7 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover104 + · exact by + intro _ + exact k12t7_cover105 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover106 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t7_cover107 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover109 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 12 7 ([[], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p44, Certificates.k12t7p44_check⟩ + +private theorem k12t7_cover108 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1], HasCheckedCertificate 12 7 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t7_cover109 + +private theorem k12t7_cover110 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1], HasCheckedCertificate 12 7 ([[], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover111 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1], HasCheckedCertificate 12 7 ([[], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p45, Certificates.k12t7p45_check⟩ + +private theorem k12t7_cover112 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2], HasCheckedCertificate 12 7 ([[], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover113 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2], HasCheckedCertificate 12 7 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t7_cover114 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1], HasCheckedCertificate 12 7 ([[], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover115 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3], HasCheckedCertificate 12 7 ([[], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover117 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 12 7 ([[], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover116 : ∀ P ∈ pathPatterns 3 2 [1, 2], HasCheckedCertificate 12 7 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k12t7_cover117 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover118 : ∀ P ∈ pathPatterns 2 1 [1, 2, 1], HasCheckedCertificate 12 7 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t7_cover119 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2], HasCheckedCertificate 12 7 ([[], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover120 : ∀ P ∈ pathPatterns 3 1 [1, 3], HasCheckedCertificate 12 7 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover121 : ∀ P ∈ pathPatterns 2 0 [1, 3, 1], HasCheckedCertificate 12 7 ([[], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover122 : ∀ P ∈ pathPatterns 3 0 [1, 4], HasCheckedCertificate 12 7 ([[], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover124 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 12 7 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t7_cover125 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 12 7 ([[], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover123 : ∀ P ∈ pathPatterns 4 3 [2], HasCheckedCertificate 12 7 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover124 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover125 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover126 : ∀ P ∈ pathPatterns 2 0 [2, 1, 2], HasCheckedCertificate 12 7 ([[], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover127 : ∀ P ∈ pathPatterns 3 1 [2, 2], HasCheckedCertificate 12 7 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover128 : ∀ P ∈ pathPatterns 3 0 [2, 3], HasCheckedCertificate 12 7 ([[], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover129 : ∀ P ∈ pathPatterns 4 2 [3], HasCheckedCertificate 12 7 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover130 : ∀ P ∈ pathPatterns 4 1 [4], HasCheckedCertificate 12 7 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover131 : ∀ P ∈ pathPatterns 4 0 [5], HasCheckedCertificate 12 7 ([[], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_seq4 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 12 7 ([[]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k12t7_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover87 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover103 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover108 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover110 + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover111 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover112 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover113 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover114 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover115 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover116 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover118 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover119 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover120 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover121 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover122 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover123 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover126 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover127 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover128 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover129 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover130 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover131 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover3 : ∀ P ∈ pathPatterns 6 5 [], HasCheckedCertificate 12 7 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact k12t7_seq4 + + +private theorem k12t7_cover134 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 12 7 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover135 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 12 7 ([[1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p46, Certificates.k12t7p46_check⟩ + +private theorem k12t7_cover136 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 12 7 ([[1], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p47, Certificates.k12t7p47_check⟩ + +private theorem k12t7_cover137 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 12 7 ([[1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover138 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 12 7 ([[1], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover133 : ∀ P ∈ pathPatterns 3 3 [1], HasCheckedCertificate 12 7 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover134 + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover135 + · exact by + intro _ + exact k12t7_cover136 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover137 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t7_cover138 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover140 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 12 7 ([[1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p48, Certificates.k12t7p48_check⟩ + +private theorem k12t7_cover139 : ∀ P ∈ pathPatterns 2 2 [1, 1], HasCheckedCertificate 12 7 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t7_cover140 + +private theorem k12t7_cover141 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1], HasCheckedCertificate 12 7 ([[1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover142 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1], HasCheckedCertificate 12 7 ([[1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p49, Certificates.k12t7p49_check⟩ + +private theorem k12t7_cover143 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2], HasCheckedCertificate 12 7 ([[1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover144 : ∀ P ∈ pathPatterns 2 1 [1, 2], HasCheckedCertificate 12 7 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t7_cover145 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1], HasCheckedCertificate 12 7 ([[1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover146 : ∀ P ∈ pathPatterns 2 0 [1, 3], HasCheckedCertificate 12 7 ([[1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover148 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 12 7 ([[1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover147 : ∀ P ∈ pathPatterns 3 2 [2], HasCheckedCertificate 12 7 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k12t7_cover148 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover149 : ∀ P ∈ pathPatterns 2 0 [2, 2], HasCheckedCertificate 12 7 ([[1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover150 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 12 7 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover151 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 12 7 ([[1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover132 : ∀ P ∈ pathPatterns 5 4 [1], HasCheckedCertificate 12 7 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover133 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover139 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover141 + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover142 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover143 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover144 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover145 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover146 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover147 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover149 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover150 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover151 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover153 : ∀ P ∈ pathPatterns 1 1 [1, 1], HasCheckedCertificate 12 7 ([[1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover154 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1], HasCheckedCertificate 12 7 ([[1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t7p50, Certificates.k12t7p50_check⟩ + +private theorem k12t7_cover155 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 12 7 ([[1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover156 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 12 7 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t7_cover157 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 12 7 ([[1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover152 : ∀ P ∈ pathPatterns 4 3 [1, 1], HasCheckedCertificate 12 7 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover153 + · intro q + fin_cases q + · exact by + intro _ + exact k12t7_cover154 + · exact by + constructor + · exact by + intro _ + exact k12t7_cover155 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover156 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover157 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover159 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 12 7 ([[1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover158 : ∀ P ∈ pathPatterns 3 2 [1, 1, 1], HasCheckedCertificate 12 7 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k12t7_cover159 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover160 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 1], HasCheckedCertificate 12 7 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t7_cover161 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 1], HasCheckedCertificate 12 7 ([[1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t7_cover162 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 2], HasCheckedCertificate 12 7 ([[1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover163 : ∀ P ∈ pathPatterns 3 1 [1, 1, 2], HasCheckedCertificate 12 7 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover164 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 1], HasCheckedCertificate 12 7 ([[1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover165 : ∀ P ∈ pathPatterns 3 0 [1, 1, 3], HasCheckedCertificate 12 7 ([[1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover167 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 12 7 ([[1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover166 : ∀ P ∈ pathPatterns 4 2 [1, 2], HasCheckedCertificate 12 7 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover167 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover168 : ∀ P ∈ pathPatterns 3 1 [1, 2, 1], HasCheckedCertificate 12 7 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover169 : ∀ P ∈ pathPatterns 3 0 [1, 2, 2], HasCheckedCertificate 12 7 ([[1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover170 : ∀ P ∈ pathPatterns 4 1 [1, 3], HasCheckedCertificate 12 7 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover171 : ∀ P ∈ pathPatterns 3 0 [1, 3, 1], HasCheckedCertificate 12 7 ([[1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover172 : ∀ P ∈ pathPatterns 4 0 [1, 4], HasCheckedCertificate 12 7 ([[1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover174 : ∀ P ∈ pathPatterns 3 1 [2], HasCheckedCertificate 12 7 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover175 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 12 7 ([[2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover173 : ∀ P ∈ pathPatterns 5 3 [2], HasCheckedCertificate 12 7 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover174 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover175 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover176 : ∀ P ∈ pathPatterns 3 0 [2, 1, 2], HasCheckedCertificate 12 7 ([[2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover177 : ∀ P ∈ pathPatterns 4 1 [2, 2], HasCheckedCertificate 12 7 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover178 : ∀ P ∈ pathPatterns 4 0 [2, 3], HasCheckedCertificate 12 7 ([[2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover179 : ∀ P ∈ pathPatterns 5 2 [3], HasCheckedCertificate 12 7 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover180 : ∀ P ∈ pathPatterns 5 1 [4], HasCheckedCertificate 12 7 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover181 : ∀ P ∈ pathPatterns 5 0 [5], HasCheckedCertificate 12 7 ([[5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t7_seq2 : amountSequenceForall 6 5 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 12 7 ([] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k12t7_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover132 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover152 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover158 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover160 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover161 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover162 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover163 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover164 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover165 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover166 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover168 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover169 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover170 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover171 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover172 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover173 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover176 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover177 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover178 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover179 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover180 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t7_cover181 + · intro q + exact Fin.elim0 q + +private theorem k12t7_cover1 : ∀ P ∈ pathPatterns 7 5 [], HasCheckedCertificate 12 7 ([] ++ P) := by + apply pathPatterns_forall_step + exact k12t7_seq2 + + +theorem coverage_k12_t7 : + ∀ P ∈ pathPatterns 7 5, HasCheckedCertificate 12 7 P := + k12t7_cover1 + +private theorem k12t8_cover9 : ∀ P ∈ pathPatterns 0 4 [], HasCheckedCertificate 12 8 ([[], [], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p0, Certificates.k12t8p0_check⟩ + +private theorem k12t8_cover8 : ∀ P ∈ pathPatterns 1 4 [], HasCheckedCertificate 12 8 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k12t8_cover9 + +private theorem k12t8_cover10 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 12 8 ([[], [], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p1, Certificates.k12t8p1_check⟩ + +private theorem k12t8_cover11 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 12 8 ([[], [], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p2, Certificates.k12t8p2_check⟩ + +private theorem k12t8_cover12 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 12 8 ([[], [], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p3, Certificates.k12t8p3_check⟩ + +private theorem k12t8_cover13 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 12 8 ([[], [], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p4, Certificates.k12t8p4_check⟩ + +private theorem k12t8_cover7 : ∀ P ∈ pathPatterns 2 4 [], HasCheckedCertificate 12 8 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k12t8_cover8 + · intro q + fin_cases q + · exact by + intro _ + exact k12t8_cover10 + · exact by + intro _ + exact k12t8_cover11 + · exact by + intro _ + exact k12t8_cover12 + · exact by + intro _ + exact k12t8_cover13 + +private theorem k12t8_cover14 : ∀ P ∈ pathPatterns 1 3 [1], HasCheckedCertificate 12 8 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover15 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 12 8 ([[], [], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p5, Certificates.k12t8p5_check⟩ + +private theorem k12t8_cover16 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 12 8 ([[], [], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p6, Certificates.k12t8p6_check⟩ + +private theorem k12t8_cover17 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 12 8 ([[], [], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p7, Certificates.k12t8p7_check⟩ + +private theorem k12t8_cover18 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 12 8 ([[], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover19 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 12 8 ([[], [], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p8, Certificates.k12t8p8_check⟩ + +private theorem k12t8_cover20 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 12 8 ([[], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover21 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 12 8 ([[], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover6 : ∀ P ∈ pathPatterns 3 4 [], HasCheckedCertificate 12 8 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k12t8_cover7 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover14 + · intro q + fin_cases q + · exact by + intro _ + exact k12t8_cover15 + · exact by + intro _ + exact k12t8_cover16 + · exact by + intro _ + exact k12t8_cover17 + · exact by + constructor + · exact by + intro _ + exact k12t8_cover18 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k12t8_cover19 + · exact by + constructor + · exact by + intro _ + exact k12t8_cover20 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k12t8_cover21 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover23 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 12 8 ([[], [], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p9, Certificates.k12t8p9_check⟩ + +private theorem k12t8_cover24 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 12 8 ([[], [], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p10, Certificates.k12t8p10_check⟩ + +private theorem k12t8_cover25 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 12 8 ([[], [], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p11, Certificates.k12t8p11_check⟩ + +private theorem k12t8_cover22 : ∀ P ∈ pathPatterns 2 3 [1], HasCheckedCertificate 12 8 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k12t8_cover23 + · exact by + intro _ + exact k12t8_cover24 + · exact by + intro _ + exact k12t8_cover25 + +private theorem k12t8_cover26 : ∀ P ∈ pathPatterns 1 2 [1, 1], HasCheckedCertificate 12 8 ([[], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover27 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1], HasCheckedCertificate 12 8 ([[], [], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p12, Certificates.k12t8p12_check⟩ + +private theorem k12t8_cover28 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2], HasCheckedCertificate 12 8 ([[], [], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p13, Certificates.k12t8p13_check⟩ + +private theorem k12t8_cover29 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 12 8 ([[], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover30 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 12 8 ([[], [], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p14, Certificates.k12t8p14_check⟩ + +private theorem k12t8_cover31 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 12 8 ([[], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover33 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 12 8 ([[], [], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p15, Certificates.k12t8p15_check⟩ + +private theorem k12t8_cover32 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 12 8 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t8_cover33 + +private theorem k12t8_cover34 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 12 8 ([[], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover35 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 12 8 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t8_cover36 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 12 8 ([[], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover5 : ∀ P ∈ pathPatterns 4 4 [], HasCheckedCertificate 12 8 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k12t8_cover6 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover22 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover26 + · intro q + fin_cases q + · exact by + intro _ + exact k12t8_cover27 + · exact by + intro _ + exact k12t8_cover28 + · exact by + constructor + · exact by + intro _ + exact k12t8_cover29 + · intro q + fin_cases q + · exact by + intro _ + exact k12t8_cover30 + · exact by + constructor + · exact by + intro _ + exact k12t8_cover31 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover32 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t8_cover34 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover35 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover36 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover38 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 12 8 ([[], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover39 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 12 8 ([[], [], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p16, Certificates.k12t8p16_check⟩ + +private theorem k12t8_cover40 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 12 8 ([[], [], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p17, Certificates.k12t8p17_check⟩ + +private theorem k12t8_cover41 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 12 8 ([[], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover42 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 12 8 ([[], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover37 : ∀ P ∈ pathPatterns 3 3 [1], HasCheckedCertificate 12 8 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover38 + · intro q + fin_cases q + · exact by + intro _ + exact k12t8_cover39 + · exact by + intro _ + exact k12t8_cover40 + · exact by + constructor + · exact by + intro _ + exact k12t8_cover41 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k12t8_cover42 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover44 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 12 8 ([[], [], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p18, Certificates.k12t8p18_check⟩ + +private theorem k12t8_cover43 : ∀ P ∈ pathPatterns 2 2 [1, 1], HasCheckedCertificate 12 8 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k12t8_cover44 + +private theorem k12t8_cover45 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1], HasCheckedCertificate 12 8 ([[], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover46 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1], HasCheckedCertificate 12 8 ([[], [], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p19, Certificates.k12t8p19_check⟩ + +private theorem k12t8_cover47 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2], HasCheckedCertificate 12 8 ([[], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover48 : ∀ P ∈ pathPatterns 2 1 [1, 2], HasCheckedCertificate 12 8 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t8_cover49 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1], HasCheckedCertificate 12 8 ([[], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover50 : ∀ P ∈ pathPatterns 2 0 [1, 3], HasCheckedCertificate 12 8 ([[], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover52 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 12 8 ([[], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover51 : ∀ P ∈ pathPatterns 3 2 [2], HasCheckedCertificate 12 8 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k12t8_cover52 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover53 : ∀ P ∈ pathPatterns 2 0 [2, 2], HasCheckedCertificate 12 8 ([[], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover54 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 12 8 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover55 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 12 8 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover4 : ∀ P ∈ pathPatterns 5 4 [], HasCheckedCertificate 12 8 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k12t8_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover37 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover43 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover45 + · intro q + fin_cases q + · exact by + intro _ + exact k12t8_cover46 + · exact by + constructor + · exact by + intro _ + exact k12t8_cover47 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover48 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover49 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover50 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover51 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover53 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover54 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover55 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover58 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 12 8 ([[], [], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p20, Certificates.k12t8p20_check⟩ + +private theorem k12t8_cover59 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 12 8 ([[], [], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p21, Certificates.k12t8p21_check⟩ + +private theorem k12t8_cover57 : ∀ P ∈ pathPatterns 2 2 [1], HasCheckedCertificate 12 8 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k12t8_cover58 + · exact by + intro _ + exact k12t8_cover59 + +private theorem k12t8_cover60 : ∀ P ∈ pathPatterns 1 1 [1, 1], HasCheckedCertificate 12 8 ([[], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover61 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1], HasCheckedCertificate 12 8 ([[], [], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p22, Certificates.k12t8p22_check⟩ + +private theorem k12t8_cover62 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 12 8 ([[], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover63 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 12 8 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t8_cover64 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 12 8 ([[], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover56 : ∀ P ∈ pathPatterns 4 3 [1], HasCheckedCertificate 12 8 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover57 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover60 + · intro q + fin_cases q + · exact by + intro _ + exact k12t8_cover61 + · exact by + constructor + · exact by + intro _ + exact k12t8_cover62 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover63 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover64 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover66 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 12 8 ([[], [], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p23, Certificates.k12t8p23_check⟩ + +private theorem k12t8_cover67 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 12 8 ([[], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover65 : ∀ P ∈ pathPatterns 3 2 [1, 1], HasCheckedCertificate 12 8 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k12t8_cover66 + · exact by + constructor + · exact by + intro _ + exact k12t8_cover67 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover68 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1], HasCheckedCertificate 12 8 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t8_cover69 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1], HasCheckedCertificate 12 8 ([[], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover70 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2], HasCheckedCertificate 12 8 ([[], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover71 : ∀ P ∈ pathPatterns 3 1 [1, 2], HasCheckedCertificate 12 8 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover72 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1], HasCheckedCertificate 12 8 ([[], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover73 : ∀ P ∈ pathPatterns 3 0 [1, 3], HasCheckedCertificate 12 8 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover75 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 12 8 ([[], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover74 : ∀ P ∈ pathPatterns 4 2 [2], HasCheckedCertificate 12 8 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover75 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover76 : ∀ P ∈ pathPatterns 3 0 [2, 2], HasCheckedCertificate 12 8 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover77 : ∀ P ∈ pathPatterns 4 1 [3], HasCheckedCertificate 12 8 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover78 : ∀ P ∈ pathPatterns 4 0 [4], HasCheckedCertificate 12 8 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover3 : ∀ P ∈ pathPatterns 6 4 [], HasCheckedCertificate 12 8 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k12t8_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover56 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover65 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover68 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover69 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover70 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover71 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover72 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover73 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover74 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover76 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover77 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover78 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover81 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 12 8 ([[], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover82 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 12 8 ([[], [1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p24, Certificates.k12t8p24_check⟩ + +private theorem k12t8_cover83 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 12 8 ([[], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover80 : ∀ P ∈ pathPatterns 3 2 [1], HasCheckedCertificate 12 8 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover81 + · intro q + fin_cases q + · exact by + intro _ + exact k12t8_cover82 + · exact by + constructor + · exact by + intro _ + exact k12t8_cover83 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover84 : ∀ P ∈ pathPatterns 2 1 [1, 1], HasCheckedCertificate 12 8 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k12t8_cover85 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1], HasCheckedCertificate 12 8 ([[], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover86 : ∀ P ∈ pathPatterns 2 0 [1, 2], HasCheckedCertificate 12 8 ([[], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover87 : ∀ P ∈ pathPatterns 3 1 [2], HasCheckedCertificate 12 8 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover88 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 12 8 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover79 : ∀ P ∈ pathPatterns 5 3 [1], HasCheckedCertificate 12 8 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover80 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover84 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover85 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover86 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover87 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover88 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover90 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 12 8 ([[], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover91 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 12 8 ([[], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover89 : ∀ P ∈ pathPatterns 4 2 [1, 1], HasCheckedCertificate 12 8 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover90 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover91 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover92 : ∀ P ∈ pathPatterns 3 1 [1, 1, 1], HasCheckedCertificate 12 8 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover93 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 1], HasCheckedCertificate 12 8 ([[], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover94 : ∀ P ∈ pathPatterns 3 0 [1, 1, 2], HasCheckedCertificate 12 8 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover95 : ∀ P ∈ pathPatterns 4 1 [1, 2], HasCheckedCertificate 12 8 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover96 : ∀ P ∈ pathPatterns 3 0 [1, 2, 1], HasCheckedCertificate 12 8 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover97 : ∀ P ∈ pathPatterns 4 0 [1, 3], HasCheckedCertificate 12 8 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover99 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 12 8 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover98 : ∀ P ∈ pathPatterns 5 2 [2], HasCheckedCertificate 12 8 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover99 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover100 : ∀ P ∈ pathPatterns 4 0 [2, 2], HasCheckedCertificate 12 8 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover101 : ∀ P ∈ pathPatterns 5 1 [3], HasCheckedCertificate 12 8 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover102 : ∀ P ∈ pathPatterns 5 0 [4], HasCheckedCertificate 12 8 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover2 : ∀ P ∈ pathPatterns 7 4 [], HasCheckedCertificate 12 8 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k12t8_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover79 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover89 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover92 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover93 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover94 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover95 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover96 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover97 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover98 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover100 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover101 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover102 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover106 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 12 8 ([[1], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k12t8p25, Certificates.k12t8p25_check⟩ + +private theorem k12t8_cover105 : ∀ P ∈ pathPatterns 2 1 [1], HasCheckedCertificate 12 8 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k12t8_cover106 + +private theorem k12t8_cover107 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 12 8 ([[1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k12t8_cover108 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 12 8 ([[1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover104 : ∀ P ∈ pathPatterns 4 2 [1], HasCheckedCertificate 12 8 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover105 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover107 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover108 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover109 : ∀ P ∈ pathPatterns 3 1 [1, 1], HasCheckedCertificate 12 8 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover110 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1], HasCheckedCertificate 12 8 ([[1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover111 : ∀ P ∈ pathPatterns 3 0 [1, 2], HasCheckedCertificate 12 8 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover112 : ∀ P ∈ pathPatterns 4 1 [2], HasCheckedCertificate 12 8 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover113 : ∀ P ∈ pathPatterns 4 0 [3], HasCheckedCertificate 12 8 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover103 : ∀ P ∈ pathPatterns 6 3 [1], HasCheckedCertificate 12 8 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover104 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover109 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover110 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover111 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover112 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover113 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover115 : ∀ P ∈ pathPatterns 2 0 [1, 1], HasCheckedCertificate 12 8 ([[1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover116 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 12 8 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover114 : ∀ P ∈ pathPatterns 5 2 [1, 1], HasCheckedCertificate 12 8 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover115 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover116 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover117 : ∀ P ∈ pathPatterns 4 1 [1, 1, 1], HasCheckedCertificate 12 8 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover118 : ∀ P ∈ pathPatterns 3 0 [1, 1, 1, 1], HasCheckedCertificate 12 8 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover119 : ∀ P ∈ pathPatterns 4 0 [1, 1, 2], HasCheckedCertificate 12 8 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover120 : ∀ P ∈ pathPatterns 5 1 [1, 2], HasCheckedCertificate 12 8 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover121 : ∀ P ∈ pathPatterns 4 0 [1, 2, 1], HasCheckedCertificate 12 8 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover122 : ∀ P ∈ pathPatterns 5 0 [1, 3], HasCheckedCertificate 12 8 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover124 : ∀ P ∈ pathPatterns 4 0 [2], HasCheckedCertificate 12 8 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover123 : ∀ P ∈ pathPatterns 6 2 [2], HasCheckedCertificate 12 8 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover124 + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover125 : ∀ P ∈ pathPatterns 5 0 [2, 2], HasCheckedCertificate 12 8 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover126 : ∀ P ∈ pathPatterns 6 1 [3], HasCheckedCertificate 12 8 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover127 : ∀ P ∈ pathPatterns 6 0 [4], HasCheckedCertificate 12 8 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k12t8_cover1 : ∀ P ∈ pathPatterns 8 4 [], HasCheckedCertificate 12 8 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k12t8_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover103 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover114 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover117 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover118 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover119 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover120 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover121 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover122 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover123 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover125 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover126 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k12t8_cover127 + · intro q + exact Fin.elim0 q + +theorem coverage_k12_t8 : + ∀ P ∈ pathPatterns 8 4, HasCheckedCertificate 12 8 P := + k12t8_cover1 + +end CycleClique.Construction.CertifiedCoverage + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK13.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK13.lean new file mode 100644 index 0000000000000000000000000000000000000000..a87c56210a381206a3ac5da061b4bc42373de7f5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK13.lean @@ -0,0 +1,14429 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK13 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage + +namespace OAI + +namespace CycleClique.Construction.CertifiedCoverage + +private theorem k13t6_cover11 : ∀ P ∈ pathPatterns 0 7 [], HasCheckedCertificate 13 6 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p0, Certificates.k13t6p0_check⟩ + +private theorem k13t6_cover10 : ∀ P ∈ pathPatterns 1 7 [], HasCheckedCertificate 13 6 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k13t6_cover11 + +private theorem k13t6_cover12 : ∀ P ∈ pathPatterns 0 6 [1], HasCheckedCertificate 13 6 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p1, Certificates.k13t6p1_check⟩ + +private theorem k13t6_cover13 : ∀ P ∈ pathPatterns 0 5 [2], HasCheckedCertificate 13 6 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p2, Certificates.k13t6p2_check⟩ + +private theorem k13t6_cover14 : ∀ P ∈ pathPatterns 0 4 [3], HasCheckedCertificate 13 6 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p3, Certificates.k13t6p3_check⟩ + +private theorem k13t6_cover15 : ∀ P ∈ pathPatterns 0 3 [4], HasCheckedCertificate 13 6 ([[], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p4, Certificates.k13t6p4_check⟩ + +private theorem k13t6_cover16 : ∀ P ∈ pathPatterns 0 2 [5], HasCheckedCertificate 13 6 ([[], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p5, Certificates.k13t6p5_check⟩ + +private theorem k13t6_cover17 : ∀ P ∈ pathPatterns 0 1 [6], HasCheckedCertificate 13 6 ([[], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p6, Certificates.k13t6p6_check⟩ + +private theorem k13t6_cover18 : ∀ P ∈ pathPatterns 0 0 [7], HasCheckedCertificate 13 6 ([[], [], [], [], [7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p7, Certificates.k13t6p7_check⟩ + +private theorem k13t6_cover9 : ∀ P ∈ pathPatterns 2 7 [], HasCheckedCertificate 13 6 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k13t6_cover10 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover12 + · exact by + intro _ + exact k13t6_cover13 + · exact by + intro _ + exact k13t6_cover14 + · exact by + intro _ + exact k13t6_cover15 + · exact by + intro _ + exact k13t6_cover16 + · exact by + intro _ + exact k13t6_cover17 + · exact by + intro _ + exact k13t6_cover18 + +private theorem k13t6_cover19 : ∀ P ∈ pathPatterns 1 6 [1], HasCheckedCertificate 13 6 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover20 : ∀ P ∈ pathPatterns 0 5 [1, 1], HasCheckedCertificate 13 6 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p8, Certificates.k13t6p8_check⟩ + +private theorem k13t6_cover21 : ∀ P ∈ pathPatterns 0 4 [1, 2], HasCheckedCertificate 13 6 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p9, Certificates.k13t6p9_check⟩ + +private theorem k13t6_cover22 : ∀ P ∈ pathPatterns 0 3 [1, 3], HasCheckedCertificate 13 6 ([[], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p10, Certificates.k13t6p10_check⟩ + +private theorem k13t6_cover23 : ∀ P ∈ pathPatterns 0 2 [1, 4], HasCheckedCertificate 13 6 ([[], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p11, Certificates.k13t6p11_check⟩ + +private theorem k13t6_cover24 : ∀ P ∈ pathPatterns 0 1 [1, 5], HasCheckedCertificate 13 6 ([[], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p12, Certificates.k13t6p12_check⟩ + +private theorem k13t6_cover25 : ∀ P ∈ pathPatterns 0 0 [1, 6], HasCheckedCertificate 13 6 ([[], [], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p13, Certificates.k13t6p13_check⟩ + +private theorem k13t6_cover26 : ∀ P ∈ pathPatterns 1 5 [2], HasCheckedCertificate 13 6 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover27 : ∀ P ∈ pathPatterns 0 3 [2, 2], HasCheckedCertificate 13 6 ([[], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p14, Certificates.k13t6p14_check⟩ + +private theorem k13t6_cover28 : ∀ P ∈ pathPatterns 0 2 [2, 3], HasCheckedCertificate 13 6 ([[], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p15, Certificates.k13t6p15_check⟩ + +private theorem k13t6_cover29 : ∀ P ∈ pathPatterns 0 1 [2, 4], HasCheckedCertificate 13 6 ([[], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p16, Certificates.k13t6p16_check⟩ + +private theorem k13t6_cover30 : ∀ P ∈ pathPatterns 0 0 [2, 5], HasCheckedCertificate 13 6 ([[], [], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p17, Certificates.k13t6p17_check⟩ + +private theorem k13t6_cover31 : ∀ P ∈ pathPatterns 1 4 [3], HasCheckedCertificate 13 6 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover32 : ∀ P ∈ pathPatterns 0 1 [3, 3], HasCheckedCertificate 13 6 ([[], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p18, Certificates.k13t6p18_check⟩ + +private theorem k13t6_cover33 : ∀ P ∈ pathPatterns 0 0 [3, 4], HasCheckedCertificate 13 6 ([[], [], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p19, Certificates.k13t6p19_check⟩ + +private theorem k13t6_cover34 : ∀ P ∈ pathPatterns 1 3 [4], HasCheckedCertificate 13 6 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover35 : ∀ P ∈ pathPatterns 1 2 [5], HasCheckedCertificate 13 6 ([[], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover36 : ∀ P ∈ pathPatterns 1 1 [6], HasCheckedCertificate 13 6 ([[], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover37 : ∀ P ∈ pathPatterns 1 0 [7], HasCheckedCertificate 13 6 ([[], [], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + +private theorem k13t6_seq8 : amountSequenceForall 2 7 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (2 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 6 ([[], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t6_cover9 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover19 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover20 + · exact by + intro _ + exact k13t6_cover21 + · exact by + intro _ + exact k13t6_cover22 + · exact by + intro _ + exact k13t6_cover23 + · exact by + intro _ + exact k13t6_cover24 + · exact by + intro _ + exact k13t6_cover25 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover26 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k13t6_cover27 + · exact by + intro _ + exact k13t6_cover28 + · exact by + intro _ + exact k13t6_cover29 + · exact by + intro _ + exact k13t6_cover30 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover31 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k13t6_cover32 + · exact by + intro _ + exact k13t6_cover33 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover34 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover35 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover36 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover37 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover7 : ∀ P ∈ pathPatterns 3 7 [], HasCheckedCertificate 13 6 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k13t6_seq8 + + +private theorem k13t6_cover39 : ∀ P ∈ pathPatterns 0 5 [1], HasCheckedCertificate 13 6 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p20, Certificates.k13t6p20_check⟩ + +private theorem k13t6_cover40 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 13 6 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p21, Certificates.k13t6p21_check⟩ + +private theorem k13t6_cover41 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 13 6 ([[], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p22, Certificates.k13t6p22_check⟩ + +private theorem k13t6_cover42 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 13 6 ([[], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p23, Certificates.k13t6p23_check⟩ + +private theorem k13t6_cover43 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 13 6 ([[], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p24, Certificates.k13t6p24_check⟩ + +private theorem k13t6_cover44 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 13 6 ([[], [], [1], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p25, Certificates.k13t6p25_check⟩ + +private theorem k13t6_cover38 : ∀ P ∈ pathPatterns 2 6 [1], HasCheckedCertificate 13 6 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover39 + · exact by + intro _ + exact k13t6_cover40 + · exact by + intro _ + exact k13t6_cover41 + · exact by + intro _ + exact k13t6_cover42 + · exact by + intro _ + exact k13t6_cover43 + · exact by + intro _ + exact k13t6_cover44 + +private theorem k13t6_cover45 : ∀ P ∈ pathPatterns 1 5 [1, 1], HasCheckedCertificate 13 6 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover46 : ∀ P ∈ pathPatterns 0 4 [1, 1, 1], HasCheckedCertificate 13 6 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p26, Certificates.k13t6p26_check⟩ + +private theorem k13t6_cover47 : ∀ P ∈ pathPatterns 0 3 [1, 1, 2], HasCheckedCertificate 13 6 ([[], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p27, Certificates.k13t6p27_check⟩ + +private theorem k13t6_cover48 : ∀ P ∈ pathPatterns 0 2 [1, 1, 3], HasCheckedCertificate 13 6 ([[], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p28, Certificates.k13t6p28_check⟩ + +private theorem k13t6_cover49 : ∀ P ∈ pathPatterns 0 1 [1, 1, 4], HasCheckedCertificate 13 6 ([[], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p29, Certificates.k13t6p29_check⟩ + +private theorem k13t6_cover50 : ∀ P ∈ pathPatterns 0 0 [1, 1, 5], HasCheckedCertificate 13 6 ([[], [], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p30, Certificates.k13t6p30_check⟩ + +private theorem k13t6_cover51 : ∀ P ∈ pathPatterns 1 4 [1, 2], HasCheckedCertificate 13 6 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover52 : ∀ P ∈ pathPatterns 0 3 [1, 2, 1], HasCheckedCertificate 13 6 ([[], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p31, Certificates.k13t6p31_check⟩ + +private theorem k13t6_cover53 : ∀ P ∈ pathPatterns 0 2 [1, 2, 2], HasCheckedCertificate 13 6 ([[], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p32, Certificates.k13t6p32_check⟩ + +private theorem k13t6_cover54 : ∀ P ∈ pathPatterns 0 1 [1, 2, 3], HasCheckedCertificate 13 6 ([[], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p33, Certificates.k13t6p33_check⟩ + +private theorem k13t6_cover55 : ∀ P ∈ pathPatterns 0 0 [1, 2, 4], HasCheckedCertificate 13 6 ([[], [], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p34, Certificates.k13t6p34_check⟩ + +private theorem k13t6_cover56 : ∀ P ∈ pathPatterns 1 3 [1, 3], HasCheckedCertificate 13 6 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover57 : ∀ P ∈ pathPatterns 0 2 [1, 3, 1], HasCheckedCertificate 13 6 ([[], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p35, Certificates.k13t6p35_check⟩ + +private theorem k13t6_cover58 : ∀ P ∈ pathPatterns 0 1 [1, 3, 2], HasCheckedCertificate 13 6 ([[], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p36, Certificates.k13t6p36_check⟩ + +private theorem k13t6_cover59 : ∀ P ∈ pathPatterns 0 0 [1, 3, 3], HasCheckedCertificate 13 6 ([[], [], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p37, Certificates.k13t6p37_check⟩ + +private theorem k13t6_cover60 : ∀ P ∈ pathPatterns 1 2 [1, 4], HasCheckedCertificate 13 6 ([[], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover61 : ∀ P ∈ pathPatterns 0 1 [1, 4, 1], HasCheckedCertificate 13 6 ([[], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p38, Certificates.k13t6p38_check⟩ + +private theorem k13t6_cover62 : ∀ P ∈ pathPatterns 0 0 [1, 4, 2], HasCheckedCertificate 13 6 ([[], [], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p39, Certificates.k13t6p39_check⟩ + +private theorem k13t6_cover63 : ∀ P ∈ pathPatterns 1 1 [1, 5], HasCheckedCertificate 13 6 ([[], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover64 : ∀ P ∈ pathPatterns 0 0 [1, 5, 1], HasCheckedCertificate 13 6 ([[], [], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p40, Certificates.k13t6p40_check⟩ + +private theorem k13t6_cover65 : ∀ P ∈ pathPatterns 1 0 [1, 6], HasCheckedCertificate 13 6 ([[], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover67 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 13 6 ([[], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p41, Certificates.k13t6p41_check⟩ + +private theorem k13t6_cover68 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 13 6 ([[], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p42, Certificates.k13t6p42_check⟩ + +private theorem k13t6_cover69 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 13 6 ([[], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p43, Certificates.k13t6p43_check⟩ + +private theorem k13t6_cover70 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 13 6 ([[], [], [2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p44, Certificates.k13t6p44_check⟩ + +private theorem k13t6_cover66 : ∀ P ∈ pathPatterns 2 5 [2], HasCheckedCertificate 13 6 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t6_cover67 + · exact by + intro _ + exact k13t6_cover68 + · exact by + intro _ + exact k13t6_cover69 + · exact by + intro _ + exact k13t6_cover70 + +private theorem k13t6_cover71 : ∀ P ∈ pathPatterns 0 2 [2, 1, 2], HasCheckedCertificate 13 6 ([[], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p45, Certificates.k13t6p45_check⟩ + +private theorem k13t6_cover72 : ∀ P ∈ pathPatterns 0 1 [2, 1, 3], HasCheckedCertificate 13 6 ([[], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p46, Certificates.k13t6p46_check⟩ + +private theorem k13t6_cover73 : ∀ P ∈ pathPatterns 0 0 [2, 1, 4], HasCheckedCertificate 13 6 ([[], [], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p47, Certificates.k13t6p47_check⟩ + +private theorem k13t6_cover74 : ∀ P ∈ pathPatterns 1 3 [2, 2], HasCheckedCertificate 13 6 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover75 : ∀ P ∈ pathPatterns 0 1 [2, 2, 2], HasCheckedCertificate 13 6 ([[], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p48, Certificates.k13t6p48_check⟩ + +private theorem k13t6_cover76 : ∀ P ∈ pathPatterns 0 0 [2, 2, 3], HasCheckedCertificate 13 6 ([[], [], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p49, Certificates.k13t6p49_check⟩ + +private theorem k13t6_cover77 : ∀ P ∈ pathPatterns 1 2 [2, 3], HasCheckedCertificate 13 6 ([[], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover78 : ∀ P ∈ pathPatterns 0 0 [2, 3, 2], HasCheckedCertificate 13 6 ([[], [], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p50, Certificates.k13t6p50_check⟩ + +private theorem k13t6_cover79 : ∀ P ∈ pathPatterns 1 1 [2, 4], HasCheckedCertificate 13 6 ([[], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover80 : ∀ P ∈ pathPatterns 1 0 [2, 5], HasCheckedCertificate 13 6 ([[], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover82 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 13 6 ([[], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p51, Certificates.k13t6p51_check⟩ + +private theorem k13t6_cover83 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 13 6 ([[], [], [3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p52, Certificates.k13t6p52_check⟩ + +private theorem k13t6_cover81 : ∀ P ∈ pathPatterns 2 4 [3], HasCheckedCertificate 13 6 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k13t6_cover82 + · exact by + intro _ + exact k13t6_cover83 + +private theorem k13t6_cover84 : ∀ P ∈ pathPatterns 0 0 [3, 1, 3], HasCheckedCertificate 13 6 ([[], [], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p53, Certificates.k13t6p53_check⟩ + +private theorem k13t6_cover85 : ∀ P ∈ pathPatterns 1 1 [3, 3], HasCheckedCertificate 13 6 ([[], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover86 : ∀ P ∈ pathPatterns 1 0 [3, 4], HasCheckedCertificate 13 6 ([[], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover87 : ∀ P ∈ pathPatterns 2 3 [4], HasCheckedCertificate 13 6 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + +private theorem k13t6_cover88 : ∀ P ∈ pathPatterns 2 2 [5], HasCheckedCertificate 13 6 ([[], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + +private theorem k13t6_cover89 : ∀ P ∈ pathPatterns 2 1 [6], HasCheckedCertificate 13 6 ([[], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t6_cover90 : ∀ P ∈ pathPatterns 2 0 [7], HasCheckedCertificate 13 6 ([[], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_seq6 : amountSequenceForall 3 7 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 6 ([[], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t6_cover7 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover38 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover45 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover46 + · exact by + intro _ + exact k13t6_cover47 + · exact by + intro _ + exact k13t6_cover48 + · exact by + intro _ + exact k13t6_cover49 + · exact by + intro _ + exact k13t6_cover50 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover51 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover52 + · exact by + intro _ + exact k13t6_cover53 + · exact by + intro _ + exact k13t6_cover54 + · exact by + intro _ + exact k13t6_cover55 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover56 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover57 + · exact by + intro _ + exact k13t6_cover58 + · exact by + intro _ + exact k13t6_cover59 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover60 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover61 + · exact by + intro _ + exact k13t6_cover62 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover63 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover64 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover65 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover66 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k13t6_cover71 + · exact by + intro _ + exact k13t6_cover72 + · exact by + intro _ + exact k13t6_cover73 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover74 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k13t6_cover75 + · exact by + intro _ + exact k13t6_cover76 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover77 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + intro _ + exact k13t6_cover78 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover79 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover80 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover81 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + intro _ + exact k13t6_cover84 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover85 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover86 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover87 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover88 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover89 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover90 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover5 : ∀ P ∈ pathPatterns 4 7 [], HasCheckedCertificate 13 6 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact k13t6_seq6 + + +private theorem k13t6_cover93 : ∀ P ∈ pathPatterns 1 5 [1], HasCheckedCertificate 13 6 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover94 : ∀ P ∈ pathPatterns 0 4 [1, 1], HasCheckedCertificate 13 6 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p54, Certificates.k13t6p54_check⟩ + +private theorem k13t6_cover95 : ∀ P ∈ pathPatterns 0 3 [1, 2], HasCheckedCertificate 13 6 ([[], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p55, Certificates.k13t6p55_check⟩ + +private theorem k13t6_cover96 : ∀ P ∈ pathPatterns 0 2 [1, 3], HasCheckedCertificate 13 6 ([[], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p56, Certificates.k13t6p56_check⟩ + +private theorem k13t6_cover97 : ∀ P ∈ pathPatterns 0 1 [1, 4], HasCheckedCertificate 13 6 ([[], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p57, Certificates.k13t6p57_check⟩ + +private theorem k13t6_cover98 : ∀ P ∈ pathPatterns 0 0 [1, 5], HasCheckedCertificate 13 6 ([[], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p58, Certificates.k13t6p58_check⟩ + +private theorem k13t6_cover99 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 13 6 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover100 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 13 6 ([[], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p59, Certificates.k13t6p59_check⟩ + +private theorem k13t6_cover101 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 13 6 ([[], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p60, Certificates.k13t6p60_check⟩ + +private theorem k13t6_cover102 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 13 6 ([[], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p61, Certificates.k13t6p61_check⟩ + +private theorem k13t6_cover103 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 13 6 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover104 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 13 6 ([[], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p62, Certificates.k13t6p62_check⟩ + +private theorem k13t6_cover105 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 13 6 ([[], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover106 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 13 6 ([[], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover107 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 13 6 ([[], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover92 : ∀ P ∈ pathPatterns 3 6 [1], HasCheckedCertificate 13 6 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover93 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover94 + · exact by + intro _ + exact k13t6_cover95 + · exact by + intro _ + exact k13t6_cover96 + · exact by + intro _ + exact k13t6_cover97 + · exact by + intro _ + exact k13t6_cover98 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover99 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k13t6_cover100 + · exact by + intro _ + exact k13t6_cover101 + · exact by + intro _ + exact k13t6_cover102 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover103 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k13t6_cover104 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover105 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover106 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover107 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover109 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 13 6 ([[], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p63, Certificates.k13t6p63_check⟩ + +private theorem k13t6_cover110 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 13 6 ([[], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p64, Certificates.k13t6p64_check⟩ + +private theorem k13t6_cover111 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 13 6 ([[], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p65, Certificates.k13t6p65_check⟩ + +private theorem k13t6_cover112 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 13 6 ([[], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p66, Certificates.k13t6p66_check⟩ + +private theorem k13t6_cover108 : ∀ P ∈ pathPatterns 2 5 [1, 1], HasCheckedCertificate 13 6 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t6_cover109 + · exact by + intro _ + exact k13t6_cover110 + · exact by + intro _ + exact k13t6_cover111 + · exact by + intro _ + exact k13t6_cover112 + +private theorem k13t6_cover113 : ∀ P ∈ pathPatterns 1 4 [1, 1, 1], HasCheckedCertificate 13 6 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover114 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 1], HasCheckedCertificate 13 6 ([[], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p67, Certificates.k13t6p67_check⟩ + +private theorem k13t6_cover115 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 2], HasCheckedCertificate 13 6 ([[], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p68, Certificates.k13t6p68_check⟩ + +private theorem k13t6_cover116 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 3], HasCheckedCertificate 13 6 ([[], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p69, Certificates.k13t6p69_check⟩ + +private theorem k13t6_cover117 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 4], HasCheckedCertificate 13 6 ([[], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p70, Certificates.k13t6p70_check⟩ + +private theorem k13t6_cover118 : ∀ P ∈ pathPatterns 1 3 [1, 1, 2], HasCheckedCertificate 13 6 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover119 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2, 1], HasCheckedCertificate 13 6 ([[], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p71, Certificates.k13t6p71_check⟩ + +private theorem k13t6_cover120 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 2], HasCheckedCertificate 13 6 ([[], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p72, Certificates.k13t6p72_check⟩ + +private theorem k13t6_cover121 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 3], HasCheckedCertificate 13 6 ([[], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p73, Certificates.k13t6p73_check⟩ + +private theorem k13t6_cover122 : ∀ P ∈ pathPatterns 1 2 [1, 1, 3], HasCheckedCertificate 13 6 ([[], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover123 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3, 1], HasCheckedCertificate 13 6 ([[], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p74, Certificates.k13t6p74_check⟩ + +private theorem k13t6_cover124 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 2], HasCheckedCertificate 13 6 ([[], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p75, Certificates.k13t6p75_check⟩ + +private theorem k13t6_cover125 : ∀ P ∈ pathPatterns 1 1 [1, 1, 4], HasCheckedCertificate 13 6 ([[], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover126 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4, 1], HasCheckedCertificate 13 6 ([[], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p76, Certificates.k13t6p76_check⟩ + +private theorem k13t6_cover127 : ∀ P ∈ pathPatterns 1 0 [1, 1, 5], HasCheckedCertificate 13 6 ([[], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover129 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 13 6 ([[], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p77, Certificates.k13t6p77_check⟩ + +private theorem k13t6_cover130 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 13 6 ([[], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p78, Certificates.k13t6p78_check⟩ + +private theorem k13t6_cover131 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 13 6 ([[], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p79, Certificates.k13t6p79_check⟩ + +private theorem k13t6_cover128 : ∀ P ∈ pathPatterns 2 4 [1, 2], HasCheckedCertificate 13 6 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t6_cover129 + · exact by + intro _ + exact k13t6_cover130 + · exact by + intro _ + exact k13t6_cover131 + +private theorem k13t6_cover132 : ∀ P ∈ pathPatterns 1 3 [1, 2, 1], HasCheckedCertificate 13 6 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover133 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 2], HasCheckedCertificate 13 6 ([[], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p80, Certificates.k13t6p80_check⟩ + +private theorem k13t6_cover134 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 3], HasCheckedCertificate 13 6 ([[], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p81, Certificates.k13t6p81_check⟩ + +private theorem k13t6_cover135 : ∀ P ∈ pathPatterns 1 2 [1, 2, 2], HasCheckedCertificate 13 6 ([[], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover136 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2, 1], HasCheckedCertificate 13 6 ([[], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p82, Certificates.k13t6p82_check⟩ + +private theorem k13t6_cover137 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 2], HasCheckedCertificate 13 6 ([[], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p83, Certificates.k13t6p83_check⟩ + +private theorem k13t6_cover138 : ∀ P ∈ pathPatterns 1 1 [1, 2, 3], HasCheckedCertificate 13 6 ([[], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover139 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3, 1], HasCheckedCertificate 13 6 ([[], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p84, Certificates.k13t6p84_check⟩ + +private theorem k13t6_cover140 : ∀ P ∈ pathPatterns 1 0 [1, 2, 4], HasCheckedCertificate 13 6 ([[], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover142 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 13 6 ([[], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p85, Certificates.k13t6p85_check⟩ + +private theorem k13t6_cover143 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 13 6 ([[], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p86, Certificates.k13t6p86_check⟩ + +private theorem k13t6_cover141 : ∀ P ∈ pathPatterns 2 3 [1, 3], HasCheckedCertificate 13 6 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t6_cover142 + · exact by + intro _ + exact k13t6_cover143 + +private theorem k13t6_cover144 : ∀ P ∈ pathPatterns 1 2 [1, 3, 1], HasCheckedCertificate 13 6 ([[], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover145 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 2], HasCheckedCertificate 13 6 ([[], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p87, Certificates.k13t6p87_check⟩ + +private theorem k13t6_cover146 : ∀ P ∈ pathPatterns 1 1 [1, 3, 2], HasCheckedCertificate 13 6 ([[], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover147 : ∀ P ∈ pathPatterns 1 0 [1, 3, 3], HasCheckedCertificate 13 6 ([[], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover149 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 6 ([[], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p88, Certificates.k13t6p88_check⟩ + +private theorem k13t6_cover148 : ∀ P ∈ pathPatterns 2 2 [1, 4], HasCheckedCertificate 13 6 ([[], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t6_cover149 + +private theorem k13t6_cover150 : ∀ P ∈ pathPatterns 1 1 [1, 4, 1], HasCheckedCertificate 13 6 ([[], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover151 : ∀ P ∈ pathPatterns 1 0 [1, 4, 2], HasCheckedCertificate 13 6 ([[], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover152 : ∀ P ∈ pathPatterns 2 1 [1, 5], HasCheckedCertificate 13 6 ([[], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t6_cover153 : ∀ P ∈ pathPatterns 1 0 [1, 5, 1], HasCheckedCertificate 13 6 ([[], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover154 : ∀ P ∈ pathPatterns 2 0 [1, 6], HasCheckedCertificate 13 6 ([[], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_seq91 : amountSequenceForall 3 6 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (7 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 13 6 ([[]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t6_cover92 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover108 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover113 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover114 + · exact by + intro _ + exact k13t6_cover115 + · exact by + intro _ + exact k13t6_cover116 + · exact by + intro _ + exact k13t6_cover117 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover118 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover119 + · exact by + intro _ + exact k13t6_cover120 + · exact by + intro _ + exact k13t6_cover121 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover122 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover123 + · exact by + intro _ + exact k13t6_cover124 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover125 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover126 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover127 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover128 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover132 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k13t6_cover133 + · exact by + intro _ + exact k13t6_cover134 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover135 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover136 + · exact by + intro _ + exact k13t6_cover137 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover138 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover139 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover140 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover141 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover144 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + intro _ + exact k13t6_cover145 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover146 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover147 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover148 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover150 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover151 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover152 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover153 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover154 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover157 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 13 6 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover158 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 13 6 ([[], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p89, Certificates.k13t6p89_check⟩ + +private theorem k13t6_cover159 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 13 6 ([[], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p90, Certificates.k13t6p90_check⟩ + +private theorem k13t6_cover160 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 13 6 ([[], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover161 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 13 6 ([[], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover162 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 13 6 ([[], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover156 : ∀ P ∈ pathPatterns 3 5 [2], HasCheckedCertificate 13 6 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover157 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k13t6_cover158 + · exact by + intro _ + exact k13t6_cover159 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover160 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover161 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover162 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover163 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 2], HasCheckedCertificate 13 6 ([[], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p91, Certificates.k13t6p91_check⟩ + +private theorem k13t6_cover164 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 3], HasCheckedCertificate 13 6 ([[], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p92, Certificates.k13t6p92_check⟩ + +private theorem k13t6_cover165 : ∀ P ∈ pathPatterns 1 2 [2, 1, 2], HasCheckedCertificate 13 6 ([[], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover166 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 2], HasCheckedCertificate 13 6 ([[], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p93, Certificates.k13t6p93_check⟩ + +private theorem k13t6_cover167 : ∀ P ∈ pathPatterns 1 1 [2, 1, 3], HasCheckedCertificate 13 6 ([[], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover168 : ∀ P ∈ pathPatterns 1 0 [2, 1, 4], HasCheckedCertificate 13 6 ([[], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover170 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 13 6 ([[], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p94, Certificates.k13t6p94_check⟩ + +private theorem k13t6_cover169 : ∀ P ∈ pathPatterns 2 3 [2, 2], HasCheckedCertificate 13 6 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k13t6_cover170 + +private theorem k13t6_cover171 : ∀ P ∈ pathPatterns 1 1 [2, 2, 2], HasCheckedCertificate 13 6 ([[], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover172 : ∀ P ∈ pathPatterns 1 0 [2, 2, 3], HasCheckedCertificate 13 6 ([[], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover173 : ∀ P ∈ pathPatterns 2 2 [2, 3], HasCheckedCertificate 13 6 ([[], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k13t6_cover174 : ∀ P ∈ pathPatterns 1 0 [2, 3, 2], HasCheckedCertificate 13 6 ([[], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover175 : ∀ P ∈ pathPatterns 2 1 [2, 4], HasCheckedCertificate 13 6 ([[], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t6_cover176 : ∀ P ∈ pathPatterns 2 0 [2, 5], HasCheckedCertificate 13 6 ([[], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_seq155 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([2] ++ tail).length) (7 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 13 6 ([[]] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t6_cover156 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k13t6_cover163 + · exact by + intro _ + exact k13t6_cover164 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover165 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + intro _ + exact k13t6_cover166 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover167 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover168 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover169 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover171 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover172 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover173 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover174 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover175 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover176 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover178 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 13 6 ([[], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover179 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 13 6 ([[], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover177 : ∀ P ∈ pathPatterns 3 4 [3], HasCheckedCertificate 13 6 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover178 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover179 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover180 : ∀ P ∈ pathPatterns 1 0 [3, 1, 3], HasCheckedCertificate 13 6 ([[], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover181 : ∀ P ∈ pathPatterns 2 1 [3, 3], HasCheckedCertificate 13 6 ([[], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t6_cover182 : ∀ P ∈ pathPatterns 2 0 [3, 4], HasCheckedCertificate 13 6 ([[], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover183 : ∀ P ∈ pathPatterns 3 3 [4], HasCheckedCertificate 13 6 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover184 : ∀ P ∈ pathPatterns 3 2 [5], HasCheckedCertificate 13 6 ([[], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover185 : ∀ P ∈ pathPatterns 3 1 [6], HasCheckedCertificate 13 6 ([[], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover186 : ∀ P ∈ pathPatterns 3 0 [7], HasCheckedCertificate 13 6 ([[], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_seq4 : amountSequenceForall 4 7 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 6 ([[]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t6_cover5 + · intro q + fin_cases q + · exact k13t6_seq91 + + · exact k13t6_seq155 + + · exact by + constructor + · exact by + intro _ + exact k13t6_cover177 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover180 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover181 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover182 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover183 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover184 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover185 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover186 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover3 : ∀ P ∈ pathPatterns 5 7 [], HasCheckedCertificate 13 6 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact k13t6_seq4 + + +private theorem k13t6_cover191 : ∀ P ∈ pathPatterns 0 4 [1], HasCheckedCertificate 13 6 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p95, Certificates.k13t6p95_check⟩ + +private theorem k13t6_cover192 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 13 6 ([[1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p96, Certificates.k13t6p96_check⟩ + +private theorem k13t6_cover193 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 13 6 ([[1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p97, Certificates.k13t6p97_check⟩ + +private theorem k13t6_cover194 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 13 6 ([[1], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p98, Certificates.k13t6p98_check⟩ + +private theorem k13t6_cover195 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 13 6 ([[1], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p99, Certificates.k13t6p99_check⟩ + +private theorem k13t6_cover190 : ∀ P ∈ pathPatterns 2 5 [1], HasCheckedCertificate 13 6 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover191 + · exact by + intro _ + exact k13t6_cover192 + · exact by + intro _ + exact k13t6_cover193 + · exact by + intro _ + exact k13t6_cover194 + · exact by + intro _ + exact k13t6_cover195 + +private theorem k13t6_cover196 : ∀ P ∈ pathPatterns 1 4 [1, 1], HasCheckedCertificate 13 6 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover197 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1], HasCheckedCertificate 13 6 ([[1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p100, Certificates.k13t6p100_check⟩ + +private theorem k13t6_cover198 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2], HasCheckedCertificate 13 6 ([[1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p101, Certificates.k13t6p101_check⟩ + +private theorem k13t6_cover199 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3], HasCheckedCertificate 13 6 ([[1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p102, Certificates.k13t6p102_check⟩ + +private theorem k13t6_cover200 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4], HasCheckedCertificate 13 6 ([[1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p103, Certificates.k13t6p103_check⟩ + +private theorem k13t6_cover201 : ∀ P ∈ pathPatterns 1 3 [1, 2], HasCheckedCertificate 13 6 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover202 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1], HasCheckedCertificate 13 6 ([[1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p104, Certificates.k13t6p104_check⟩ + +private theorem k13t6_cover203 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2], HasCheckedCertificate 13 6 ([[1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p105, Certificates.k13t6p105_check⟩ + +private theorem k13t6_cover204 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3], HasCheckedCertificate 13 6 ([[1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p106, Certificates.k13t6p106_check⟩ + +private theorem k13t6_cover205 : ∀ P ∈ pathPatterns 1 2 [1, 3], HasCheckedCertificate 13 6 ([[1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover206 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1], HasCheckedCertificate 13 6 ([[1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p107, Certificates.k13t6p107_check⟩ + +private theorem k13t6_cover207 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2], HasCheckedCertificate 13 6 ([[1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p108, Certificates.k13t6p108_check⟩ + +private theorem k13t6_cover208 : ∀ P ∈ pathPatterns 1 1 [1, 4], HasCheckedCertificate 13 6 ([[1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover209 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1], HasCheckedCertificate 13 6 ([[1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p109, Certificates.k13t6p109_check⟩ + +private theorem k13t6_cover210 : ∀ P ∈ pathPatterns 1 0 [1, 5], HasCheckedCertificate 13 6 ([[1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover212 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 13 6 ([[1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p110, Certificates.k13t6p110_check⟩ + +private theorem k13t6_cover213 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 13 6 ([[1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p111, Certificates.k13t6p111_check⟩ + +private theorem k13t6_cover214 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 13 6 ([[1], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p112, Certificates.k13t6p112_check⟩ + +private theorem k13t6_cover211 : ∀ P ∈ pathPatterns 2 4 [2], HasCheckedCertificate 13 6 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t6_cover212 + · exact by + intro _ + exact k13t6_cover213 + · exact by + intro _ + exact k13t6_cover214 + +private theorem k13t6_cover215 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2], HasCheckedCertificate 13 6 ([[1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p113, Certificates.k13t6p113_check⟩ + +private theorem k13t6_cover216 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3], HasCheckedCertificate 13 6 ([[1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p114, Certificates.k13t6p114_check⟩ + +private theorem k13t6_cover217 : ∀ P ∈ pathPatterns 1 2 [2, 2], HasCheckedCertificate 13 6 ([[1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover218 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2], HasCheckedCertificate 13 6 ([[1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p115, Certificates.k13t6p115_check⟩ + +private theorem k13t6_cover219 : ∀ P ∈ pathPatterns 1 1 [2, 3], HasCheckedCertificate 13 6 ([[1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover220 : ∀ P ∈ pathPatterns 1 0 [2, 4], HasCheckedCertificate 13 6 ([[1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover222 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 13 6 ([[1], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p116, Certificates.k13t6p116_check⟩ + +private theorem k13t6_cover221 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 13 6 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k13t6_cover222 + +private theorem k13t6_cover223 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 13 6 ([[1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover224 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 13 6 ([[1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k13t6_cover225 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 13 6 ([[1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t6_cover226 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 13 6 ([[1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_seq189 : amountSequenceForall 3 6 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 6 ([[1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover190 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover196 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover197 + · exact by + intro _ + exact k13t6_cover198 + · exact by + intro _ + exact k13t6_cover199 + · exact by + intro _ + exact k13t6_cover200 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover201 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover202 + · exact by + intro _ + exact k13t6_cover203 + · exact by + intro _ + exact k13t6_cover204 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover205 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover206 + · exact by + intro _ + exact k13t6_cover207 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover208 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover209 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover210 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover211 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k13t6_cover215 + · exact by + intro _ + exact k13t6_cover216 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover217 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k13t6_cover218 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover219 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover220 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover221 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover223 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover224 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover225 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover226 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover188 : ∀ P ∈ pathPatterns 4 6 [1], HasCheckedCertificate 13 6 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact k13t6_seq189 + + +private theorem k13t6_cover229 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 13 6 ([[1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p117, Certificates.k13t6p117_check⟩ + +private theorem k13t6_cover230 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 13 6 ([[1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p118, Certificates.k13t6p118_check⟩ + +private theorem k13t6_cover231 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 13 6 ([[1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p119, Certificates.k13t6p119_check⟩ + +private theorem k13t6_cover232 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 13 6 ([[1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p120, Certificates.k13t6p120_check⟩ + +private theorem k13t6_cover233 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 13 6 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover234 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 13 6 ([[1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p121, Certificates.k13t6p121_check⟩ + +private theorem k13t6_cover235 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 13 6 ([[1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p122, Certificates.k13t6p122_check⟩ + +private theorem k13t6_cover236 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 13 6 ([[1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover237 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 13 6 ([[1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover238 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 13 6 ([[1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover228 : ∀ P ∈ pathPatterns 3 5 [1, 1], HasCheckedCertificate 13 6 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover229 + · exact by + intro _ + exact k13t6_cover230 + · exact by + intro _ + exact k13t6_cover231 + · exact by + intro _ + exact k13t6_cover232 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover233 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k13t6_cover234 + · exact by + intro _ + exact k13t6_cover235 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover236 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover237 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover238 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover240 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 13 6 ([[1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p123, Certificates.k13t6p123_check⟩ + +private theorem k13t6_cover241 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 13 6 ([[1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p124, Certificates.k13t6p124_check⟩ + +private theorem k13t6_cover242 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 13 6 ([[1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p125, Certificates.k13t6p125_check⟩ + +private theorem k13t6_cover239 : ∀ P ∈ pathPatterns 2 4 [1, 1, 1], HasCheckedCertificate 13 6 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t6_cover240 + · exact by + intro _ + exact k13t6_cover241 + · exact by + intro _ + exact k13t6_cover242 + +private theorem k13t6_cover243 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1, 1], HasCheckedCertificate 13 6 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover244 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1, 1], HasCheckedCertificate 13 6 ([[1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p126, Certificates.k13t6p126_check⟩ + +private theorem k13t6_cover245 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 2], HasCheckedCertificate 13 6 ([[1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p127, Certificates.k13t6p127_check⟩ + +private theorem k13t6_cover246 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 3], HasCheckedCertificate 13 6 ([[1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p128, Certificates.k13t6p128_check⟩ + +private theorem k13t6_cover247 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 2], HasCheckedCertificate 13 6 ([[1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover248 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2, 1], HasCheckedCertificate 13 6 ([[1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p129, Certificates.k13t6p129_check⟩ + +private theorem k13t6_cover249 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 2], HasCheckedCertificate 13 6 ([[1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p130, Certificates.k13t6p130_check⟩ + +private theorem k13t6_cover250 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 3], HasCheckedCertificate 13 6 ([[1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover251 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3, 1], HasCheckedCertificate 13 6 ([[1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p131, Certificates.k13t6p131_check⟩ + +private theorem k13t6_cover252 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 4], HasCheckedCertificate 13 6 ([[1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover254 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 13 6 ([[1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p132, Certificates.k13t6p132_check⟩ + +private theorem k13t6_cover255 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 13 6 ([[1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p133, Certificates.k13t6p133_check⟩ + +private theorem k13t6_cover253 : ∀ P ∈ pathPatterns 2 3 [1, 1, 2], HasCheckedCertificate 13 6 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t6_cover254 + · exact by + intro _ + exact k13t6_cover255 + +private theorem k13t6_cover256 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2, 1], HasCheckedCertificate 13 6 ([[1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover257 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1, 1], HasCheckedCertificate 13 6 ([[1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p134, Certificates.k13t6p134_check⟩ + +private theorem k13t6_cover258 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 2], HasCheckedCertificate 13 6 ([[1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p135, Certificates.k13t6p135_check⟩ + +private theorem k13t6_cover259 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 2], HasCheckedCertificate 13 6 ([[1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover260 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2, 1], HasCheckedCertificate 13 6 ([[1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p136, Certificates.k13t6p136_check⟩ + +private theorem k13t6_cover261 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 3], HasCheckedCertificate 13 6 ([[1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover263 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 6 ([[1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p137, Certificates.k13t6p137_check⟩ + +private theorem k13t6_cover262 : ∀ P ∈ pathPatterns 2 2 [1, 1, 3], HasCheckedCertificate 13 6 ([[1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t6_cover263 + +private theorem k13t6_cover264 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3, 1], HasCheckedCertificate 13 6 ([[1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover265 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1, 1], HasCheckedCertificate 13 6 ([[1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p138, Certificates.k13t6p138_check⟩ + +private theorem k13t6_cover266 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 2], HasCheckedCertificate 13 6 ([[1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover267 : ∀ P ∈ pathPatterns 2 1 [1, 1, 4], HasCheckedCertificate 13 6 ([[1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t6_cover268 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4, 1], HasCheckedCertificate 13 6 ([[1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover269 : ∀ P ∈ pathPatterns 2 0 [1, 1, 5], HasCheckedCertificate 13 6 ([[1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_seq227 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1, 1] ++ tail).length) (7 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 13 6 ([] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t6_cover228 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover239 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover243 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover244 + · exact by + intro _ + exact k13t6_cover245 + · exact by + intro _ + exact k13t6_cover246 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover247 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover248 + · exact by + intro _ + exact k13t6_cover249 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover250 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover251 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover252 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover253 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover256 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover257 + · exact by + intro _ + exact k13t6_cover258 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover259 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover260 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover261 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover262 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover264 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover265 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover266 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover267 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover268 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover269 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover271 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 13 6 ([[1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p139, Certificates.k13t6p139_check⟩ + +private theorem k13t6_cover272 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 13 6 ([[1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p140, Certificates.k13t6p140_check⟩ + +private theorem k13t6_cover273 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 13 6 ([[1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover274 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 13 6 ([[1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p141, Certificates.k13t6p141_check⟩ + +private theorem k13t6_cover275 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 13 6 ([[1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover276 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 13 6 ([[1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover270 : ∀ P ∈ pathPatterns 3 4 [1, 2], HasCheckedCertificate 13 6 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k13t6_cover271 + · exact by + intro _ + exact k13t6_cover272 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover273 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k13t6_cover274 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover275 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover276 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover278 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 13 6 ([[1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p142, Certificates.k13t6p142_check⟩ + +private theorem k13t6_cover279 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 13 6 ([[1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p143, Certificates.k13t6p143_check⟩ + +private theorem k13t6_cover277 : ∀ P ∈ pathPatterns 2 3 [1, 2, 1], HasCheckedCertificate 13 6 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t6_cover278 + · exact by + intro _ + exact k13t6_cover279 + +private theorem k13t6_cover280 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 2], HasCheckedCertificate 13 6 ([[1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p144, Certificates.k13t6p144_check⟩ + +private theorem k13t6_cover281 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 2], HasCheckedCertificate 13 6 ([[1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover282 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2, 1], HasCheckedCertificate 13 6 ([[1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p145, Certificates.k13t6p145_check⟩ + +private theorem k13t6_cover283 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 3], HasCheckedCertificate 13 6 ([[1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover285 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 6 ([[1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p146, Certificates.k13t6p146_check⟩ + +private theorem k13t6_cover284 : ∀ P ∈ pathPatterns 2 2 [1, 2, 2], HasCheckedCertificate 13 6 ([[1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t6_cover285 + +private theorem k13t6_cover286 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2, 1], HasCheckedCertificate 13 6 ([[1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover287 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 2], HasCheckedCertificate 13 6 ([[1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover288 : ∀ P ∈ pathPatterns 2 1 [1, 2, 3], HasCheckedCertificate 13 6 ([[1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t6_cover289 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3, 1], HasCheckedCertificate 13 6 ([[1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover290 : ∀ P ∈ pathPatterns 2 0 [1, 2, 4], HasCheckedCertificate 13 6 ([[1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover292 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 13 6 ([[1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover293 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 13 6 ([[1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover291 : ∀ P ∈ pathPatterns 3 3 [1, 3], HasCheckedCertificate 13 6 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover292 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover293 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover295 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 6 ([[1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p147, Certificates.k13t6p147_check⟩ + +private theorem k13t6_cover294 : ∀ P ∈ pathPatterns 2 2 [1, 3, 1], HasCheckedCertificate 13 6 ([[1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t6_cover295 + +private theorem k13t6_cover296 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1, 2], HasCheckedCertificate 13 6 ([[1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover297 : ∀ P ∈ pathPatterns 2 1 [1, 3, 2], HasCheckedCertificate 13 6 ([[1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t6_cover298 : ∀ P ∈ pathPatterns 2 0 [1, 3, 3], HasCheckedCertificate 13 6 ([[1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover300 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 13 6 ([[1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover299 : ∀ P ∈ pathPatterns 3 2 [1, 4], HasCheckedCertificate 13 6 ([[1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover300 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover301 : ∀ P ∈ pathPatterns 2 1 [1, 4, 1], HasCheckedCertificate 13 6 ([[1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t6_cover302 : ∀ P ∈ pathPatterns 2 0 [1, 4, 2], HasCheckedCertificate 13 6 ([[1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover303 : ∀ P ∈ pathPatterns 3 1 [1, 5], HasCheckedCertificate 13 6 ([[1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover304 : ∀ P ∈ pathPatterns 2 0 [1, 5, 1], HasCheckedCertificate 13 6 ([[1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover305 : ∀ P ∈ pathPatterns 3 0 [1, 6], HasCheckedCertificate 13 6 ([[1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_seq187 : amountSequenceForall 4 6 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1] ++ tail).length) (7 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 13 6 ([] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t6_cover188 + · intro q + fin_cases q + · exact k13t6_seq227 + + · exact by + constructor + · exact by + intro _ + exact k13t6_cover270 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover277 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · exact by + intro _ + exact k13t6_cover280 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover281 + · intro q + fin_cases q + · exact by + intro _ + exact k13t6_cover282 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover283 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover284 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover286 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover287 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover288 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover289 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover290 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover291 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover294 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover296 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover297 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover298 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover299 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover301 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover302 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover303 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover304 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover305 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover310 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 13 6 ([[2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p148, Certificates.k13t6p148_check⟩ + +private theorem k13t6_cover311 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 13 6 ([[2], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p149, Certificates.k13t6p149_check⟩ + +private theorem k13t6_cover309 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 13 6 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t6_cover310 + · exact by + intro _ + exact k13t6_cover311 + +private theorem k13t6_cover312 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 13 6 ([[2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p150, Certificates.k13t6p150_check⟩ + +private theorem k13t6_cover313 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 13 6 ([[2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover314 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 13 6 ([[2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover315 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 13 6 ([[2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k13t6_cover316 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 13 6 ([[2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t6_cover317 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 13 6 ([[2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_seq308 : amountSequenceForall 3 5 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 6 ([[2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover309 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k13t6_cover312 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover313 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover314 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover315 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover316 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover317 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover307 : ∀ P ∈ pathPatterns 4 5 [2], HasCheckedCertificate 13 6 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact k13t6_seq308 + + +private theorem k13t6_cover318 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 1, 2], HasCheckedCertificate 13 6 ([[2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t6p151, Certificates.k13t6p151_check⟩ + +private theorem k13t6_cover319 : ∀ P ∈ pathPatterns 1 1 [2, 1, 1, 2], HasCheckedCertificate 13 6 ([[2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover320 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 3], HasCheckedCertificate 13 6 ([[2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover321 : ∀ P ∈ pathPatterns 2 2 [2, 1, 2], HasCheckedCertificate 13 6 ([[2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k13t6_cover322 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2, 2], HasCheckedCertificate 13 6 ([[2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover323 : ∀ P ∈ pathPatterns 2 1 [2, 1, 3], HasCheckedCertificate 13 6 ([[2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t6_cover324 : ∀ P ∈ pathPatterns 2 0 [2, 1, 4], HasCheckedCertificate 13 6 ([[2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover326 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 13 6 ([[2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t6_cover325 : ∀ P ∈ pathPatterns 3 3 [2, 2], HasCheckedCertificate 13 6 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover326 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover327 : ∀ P ∈ pathPatterns 2 1 [2, 2, 2], HasCheckedCertificate 13 6 ([[2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t6_cover328 : ∀ P ∈ pathPatterns 2 0 [2, 2, 3], HasCheckedCertificate 13 6 ([[2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover329 : ∀ P ∈ pathPatterns 3 2 [2, 3], HasCheckedCertificate 13 6 ([[2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover330 : ∀ P ∈ pathPatterns 2 0 [2, 3, 2], HasCheckedCertificate 13 6 ([[2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover331 : ∀ P ∈ pathPatterns 3 1 [2, 4], HasCheckedCertificate 13 6 ([[2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover332 : ∀ P ∈ pathPatterns 3 0 [2, 5], HasCheckedCertificate 13 6 ([[2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_seq306 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([2] ++ tail).length) (7 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 13 6 ([] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t6_cover307 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · exact by + intro _ + exact k13t6_cover318 + · exact by + constructor + · exact by + intro _ + exact k13t6_cover319 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover320 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover321 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t6_cover322 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover323 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover324 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover325 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover327 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover328 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover329 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover330 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover331 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover332 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover334 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 13 6 ([[3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t6_cover335 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 13 6 ([[3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover333 : ∀ P ∈ pathPatterns 4 4 [3], HasCheckedCertificate 13 6 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover334 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover335 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover336 : ∀ P ∈ pathPatterns 2 0 [3, 1, 3], HasCheckedCertificate 13 6 ([[3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover337 : ∀ P ∈ pathPatterns 3 1 [3, 3], HasCheckedCertificate 13 6 ([[3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover338 : ∀ P ∈ pathPatterns 3 0 [3, 4], HasCheckedCertificate 13 6 ([[3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover339 : ∀ P ∈ pathPatterns 4 3 [4], HasCheckedCertificate 13 6 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover340 : ∀ P ∈ pathPatterns 4 2 [5], HasCheckedCertificate 13 6 ([[5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover341 : ∀ P ∈ pathPatterns 4 1 [6], HasCheckedCertificate 13 6 ([[6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover342 : ∀ P ∈ pathPatterns 4 0 [7], HasCheckedCertificate 13 6 ([[7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t6_seq2 : amountSequenceForall 5 7 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 6 ([] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t6_cover3 + · intro q + fin_cases q + · exact k13t6_seq187 + + · exact k13t6_seq306 + + · exact by + constructor + · exact by + intro _ + exact k13t6_cover333 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover336 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover337 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover338 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover339 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover340 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover341 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t6_cover342 + · intro q + exact Fin.elim0 q + +private theorem k13t6_cover1 : ∀ P ∈ pathPatterns 6 7 [], HasCheckedCertificate 13 6 ([] ++ P) := by + apply pathPatterns_forall_step + exact k13t6_seq2 + + +theorem coverage_k13_t6 : + ∀ P ∈ pathPatterns 6 7, HasCheckedCertificate 13 6 P := + k13t6_cover1 + +private theorem k13t7_cover12 : ∀ P ∈ pathPatterns 0 6 [], HasCheckedCertificate 13 7 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p0, Certificates.k13t7p0_check⟩ + +private theorem k13t7_cover11 : ∀ P ∈ pathPatterns 1 6 [], HasCheckedCertificate 13 7 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k13t7_cover12 + +private theorem k13t7_cover13 : ∀ P ∈ pathPatterns 0 5 [1], HasCheckedCertificate 13 7 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p1, Certificates.k13t7p1_check⟩ + +private theorem k13t7_cover14 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 13 7 ([[], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p2, Certificates.k13t7p2_check⟩ + +private theorem k13t7_cover15 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 13 7 ([[], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p3, Certificates.k13t7p3_check⟩ + +private theorem k13t7_cover16 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 13 7 ([[], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p4, Certificates.k13t7p4_check⟩ + +private theorem k13t7_cover17 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 13 7 ([[], [], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p5, Certificates.k13t7p5_check⟩ + +private theorem k13t7_cover18 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 13 7 ([[], [], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p6, Certificates.k13t7p6_check⟩ + +private theorem k13t7_cover10 : ∀ P ∈ pathPatterns 2 6 [], HasCheckedCertificate 13 7 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k13t7_cover11 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover13 + · exact by + intro _ + exact k13t7_cover14 + · exact by + intro _ + exact k13t7_cover15 + · exact by + intro _ + exact k13t7_cover16 + · exact by + intro _ + exact k13t7_cover17 + · exact by + intro _ + exact k13t7_cover18 + +private theorem k13t7_cover19 : ∀ P ∈ pathPatterns 1 5 [1], HasCheckedCertificate 13 7 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover20 : ∀ P ∈ pathPatterns 0 4 [1, 1], HasCheckedCertificate 13 7 ([[], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p7, Certificates.k13t7p7_check⟩ + +private theorem k13t7_cover21 : ∀ P ∈ pathPatterns 0 3 [1, 2], HasCheckedCertificate 13 7 ([[], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p8, Certificates.k13t7p8_check⟩ + +private theorem k13t7_cover22 : ∀ P ∈ pathPatterns 0 2 [1, 3], HasCheckedCertificate 13 7 ([[], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p9, Certificates.k13t7p9_check⟩ + +private theorem k13t7_cover23 : ∀ P ∈ pathPatterns 0 1 [1, 4], HasCheckedCertificate 13 7 ([[], [], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p10, Certificates.k13t7p10_check⟩ + +private theorem k13t7_cover24 : ∀ P ∈ pathPatterns 0 0 [1, 5], HasCheckedCertificate 13 7 ([[], [], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p11, Certificates.k13t7p11_check⟩ + +private theorem k13t7_cover25 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 13 7 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover26 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 13 7 ([[], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p12, Certificates.k13t7p12_check⟩ + +private theorem k13t7_cover27 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 13 7 ([[], [], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p13, Certificates.k13t7p13_check⟩ + +private theorem k13t7_cover28 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 13 7 ([[], [], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p14, Certificates.k13t7p14_check⟩ + +private theorem k13t7_cover29 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 13 7 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover30 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 13 7 ([[], [], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p15, Certificates.k13t7p15_check⟩ + +private theorem k13t7_cover31 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 13 7 ([[], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover32 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 13 7 ([[], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover33 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 13 7 ([[], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover9 : ∀ P ∈ pathPatterns 3 6 [], HasCheckedCertificate 13 7 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k13t7_cover10 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover19 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover20 + · exact by + intro _ + exact k13t7_cover21 + · exact by + intro _ + exact k13t7_cover22 + · exact by + intro _ + exact k13t7_cover23 + · exact by + intro _ + exact k13t7_cover24 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover25 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k13t7_cover26 + · exact by + intro _ + exact k13t7_cover27 + · exact by + intro _ + exact k13t7_cover28 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover29 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k13t7_cover30 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover31 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover32 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover33 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover35 : ∀ P ∈ pathPatterns 0 4 [1], HasCheckedCertificate 13 7 ([[], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p16, Certificates.k13t7p16_check⟩ + +private theorem k13t7_cover36 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 13 7 ([[], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p17, Certificates.k13t7p17_check⟩ + +private theorem k13t7_cover37 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 13 7 ([[], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p18, Certificates.k13t7p18_check⟩ + +private theorem k13t7_cover38 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 13 7 ([[], [], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p19, Certificates.k13t7p19_check⟩ + +private theorem k13t7_cover39 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 13 7 ([[], [], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p20, Certificates.k13t7p20_check⟩ + +private theorem k13t7_cover34 : ∀ P ∈ pathPatterns 2 5 [1], HasCheckedCertificate 13 7 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover35 + · exact by + intro _ + exact k13t7_cover36 + · exact by + intro _ + exact k13t7_cover37 + · exact by + intro _ + exact k13t7_cover38 + · exact by + intro _ + exact k13t7_cover39 + +private theorem k13t7_cover40 : ∀ P ∈ pathPatterns 1 4 [1, 1], HasCheckedCertificate 13 7 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover41 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1], HasCheckedCertificate 13 7 ([[], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p21, Certificates.k13t7p21_check⟩ + +private theorem k13t7_cover42 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2], HasCheckedCertificate 13 7 ([[], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p22, Certificates.k13t7p22_check⟩ + +private theorem k13t7_cover43 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3], HasCheckedCertificate 13 7 ([[], [], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p23, Certificates.k13t7p23_check⟩ + +private theorem k13t7_cover44 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4], HasCheckedCertificate 13 7 ([[], [], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p24, Certificates.k13t7p24_check⟩ + +private theorem k13t7_cover45 : ∀ P ∈ pathPatterns 1 3 [1, 2], HasCheckedCertificate 13 7 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover46 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1], HasCheckedCertificate 13 7 ([[], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p25, Certificates.k13t7p25_check⟩ + +private theorem k13t7_cover47 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2], HasCheckedCertificate 13 7 ([[], [], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p26, Certificates.k13t7p26_check⟩ + +private theorem k13t7_cover48 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3], HasCheckedCertificate 13 7 ([[], [], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p27, Certificates.k13t7p27_check⟩ + +private theorem k13t7_cover49 : ∀ P ∈ pathPatterns 1 2 [1, 3], HasCheckedCertificate 13 7 ([[], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover50 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1], HasCheckedCertificate 13 7 ([[], [], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p28, Certificates.k13t7p28_check⟩ + +private theorem k13t7_cover51 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2], HasCheckedCertificate 13 7 ([[], [], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p29, Certificates.k13t7p29_check⟩ + +private theorem k13t7_cover52 : ∀ P ∈ pathPatterns 1 1 [1, 4], HasCheckedCertificate 13 7 ([[], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover53 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1], HasCheckedCertificate 13 7 ([[], [], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p30, Certificates.k13t7p30_check⟩ + +private theorem k13t7_cover54 : ∀ P ∈ pathPatterns 1 0 [1, 5], HasCheckedCertificate 13 7 ([[], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover56 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 13 7 ([[], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p31, Certificates.k13t7p31_check⟩ + +private theorem k13t7_cover57 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 13 7 ([[], [], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p32, Certificates.k13t7p32_check⟩ + +private theorem k13t7_cover58 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 13 7 ([[], [], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p33, Certificates.k13t7p33_check⟩ + +private theorem k13t7_cover55 : ∀ P ∈ pathPatterns 2 4 [2], HasCheckedCertificate 13 7 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t7_cover56 + · exact by + intro _ + exact k13t7_cover57 + · exact by + intro _ + exact k13t7_cover58 + +private theorem k13t7_cover59 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2], HasCheckedCertificate 13 7 ([[], [], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p34, Certificates.k13t7p34_check⟩ + +private theorem k13t7_cover60 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3], HasCheckedCertificate 13 7 ([[], [], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p35, Certificates.k13t7p35_check⟩ + +private theorem k13t7_cover61 : ∀ P ∈ pathPatterns 1 2 [2, 2], HasCheckedCertificate 13 7 ([[], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover62 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2], HasCheckedCertificate 13 7 ([[], [], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p36, Certificates.k13t7p36_check⟩ + +private theorem k13t7_cover63 : ∀ P ∈ pathPatterns 1 1 [2, 3], HasCheckedCertificate 13 7 ([[], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover64 : ∀ P ∈ pathPatterns 1 0 [2, 4], HasCheckedCertificate 13 7 ([[], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover66 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 13 7 ([[], [], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p37, Certificates.k13t7p37_check⟩ + +private theorem k13t7_cover65 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 13 7 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k13t7_cover66 + +private theorem k13t7_cover67 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 13 7 ([[], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover68 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 13 7 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k13t7_cover69 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 13 7 ([[], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t7_cover70 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 13 7 ([[], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_seq8 : amountSequenceForall 3 6 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 7 ([[], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t7_cover9 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover34 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover40 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover41 + · exact by + intro _ + exact k13t7_cover42 + · exact by + intro _ + exact k13t7_cover43 + · exact by + intro _ + exact k13t7_cover44 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover45 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover46 + · exact by + intro _ + exact k13t7_cover47 + · exact by + intro _ + exact k13t7_cover48 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover49 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover50 + · exact by + intro _ + exact k13t7_cover51 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover52 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover53 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover54 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover55 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k13t7_cover59 + · exact by + intro _ + exact k13t7_cover60 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover61 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k13t7_cover62 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover63 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover64 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover65 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover67 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover68 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover69 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover70 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover7 : ∀ P ∈ pathPatterns 4 6 [], HasCheckedCertificate 13 7 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k13t7_seq8 + + +private theorem k13t7_cover73 : ∀ P ∈ pathPatterns 1 4 [1], HasCheckedCertificate 13 7 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover74 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 13 7 ([[], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p38, Certificates.k13t7p38_check⟩ + +private theorem k13t7_cover75 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 13 7 ([[], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p39, Certificates.k13t7p39_check⟩ + +private theorem k13t7_cover76 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 13 7 ([[], [], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p40, Certificates.k13t7p40_check⟩ + +private theorem k13t7_cover77 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 13 7 ([[], [], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p41, Certificates.k13t7p41_check⟩ + +private theorem k13t7_cover78 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 13 7 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover79 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 13 7 ([[], [], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p42, Certificates.k13t7p42_check⟩ + +private theorem k13t7_cover80 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 13 7 ([[], [], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p43, Certificates.k13t7p43_check⟩ + +private theorem k13t7_cover81 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 13 7 ([[], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover82 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 13 7 ([[], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover83 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 13 7 ([[], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover72 : ∀ P ∈ pathPatterns 3 5 [1], HasCheckedCertificate 13 7 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover73 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover74 + · exact by + intro _ + exact k13t7_cover75 + · exact by + intro _ + exact k13t7_cover76 + · exact by + intro _ + exact k13t7_cover77 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover78 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k13t7_cover79 + · exact by + intro _ + exact k13t7_cover80 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover81 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover82 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover83 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover85 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 13 7 ([[], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p44, Certificates.k13t7p44_check⟩ + +private theorem k13t7_cover86 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 13 7 ([[], [], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p45, Certificates.k13t7p45_check⟩ + +private theorem k13t7_cover87 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 13 7 ([[], [], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p46, Certificates.k13t7p46_check⟩ + +private theorem k13t7_cover84 : ∀ P ∈ pathPatterns 2 4 [1, 1], HasCheckedCertificate 13 7 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t7_cover85 + · exact by + intro _ + exact k13t7_cover86 + · exact by + intro _ + exact k13t7_cover87 + +private theorem k13t7_cover88 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1], HasCheckedCertificate 13 7 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover89 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1], HasCheckedCertificate 13 7 ([[], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p47, Certificates.k13t7p47_check⟩ + +private theorem k13t7_cover90 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2], HasCheckedCertificate 13 7 ([[], [], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p48, Certificates.k13t7p48_check⟩ + +private theorem k13t7_cover91 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3], HasCheckedCertificate 13 7 ([[], [], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p49, Certificates.k13t7p49_check⟩ + +private theorem k13t7_cover92 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2], HasCheckedCertificate 13 7 ([[], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover93 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1], HasCheckedCertificate 13 7 ([[], [], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p50, Certificates.k13t7p50_check⟩ + +private theorem k13t7_cover94 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2], HasCheckedCertificate 13 7 ([[], [], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p51, Certificates.k13t7p51_check⟩ + +private theorem k13t7_cover95 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3], HasCheckedCertificate 13 7 ([[], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover96 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1], HasCheckedCertificate 13 7 ([[], [], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p52, Certificates.k13t7p52_check⟩ + +private theorem k13t7_cover97 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4], HasCheckedCertificate 13 7 ([[], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover99 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 13 7 ([[], [], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p53, Certificates.k13t7p53_check⟩ + +private theorem k13t7_cover100 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 13 7 ([[], [], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p54, Certificates.k13t7p54_check⟩ + +private theorem k13t7_cover98 : ∀ P ∈ pathPatterns 2 3 [1, 2], HasCheckedCertificate 13 7 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t7_cover99 + · exact by + intro _ + exact k13t7_cover100 + +private theorem k13t7_cover101 : ∀ P ∈ pathPatterns 1 2 [1, 2, 1], HasCheckedCertificate 13 7 ([[], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover102 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2], HasCheckedCertificate 13 7 ([[], [], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p55, Certificates.k13t7p55_check⟩ + +private theorem k13t7_cover103 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2], HasCheckedCertificate 13 7 ([[], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover104 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 1], HasCheckedCertificate 13 7 ([[], [], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p56, Certificates.k13t7p56_check⟩ + +private theorem k13t7_cover105 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3], HasCheckedCertificate 13 7 ([[], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover107 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 7 ([[], [], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p57, Certificates.k13t7p57_check⟩ + +private theorem k13t7_cover106 : ∀ P ∈ pathPatterns 2 2 [1, 3], HasCheckedCertificate 13 7 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t7_cover107 + +private theorem k13t7_cover108 : ∀ P ∈ pathPatterns 1 1 [1, 3, 1], HasCheckedCertificate 13 7 ([[], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover109 : ∀ P ∈ pathPatterns 1 0 [1, 3, 2], HasCheckedCertificate 13 7 ([[], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover110 : ∀ P ∈ pathPatterns 2 1 [1, 4], HasCheckedCertificate 13 7 ([[], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t7_cover111 : ∀ P ∈ pathPatterns 1 0 [1, 4, 1], HasCheckedCertificate 13 7 ([[], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover112 : ∀ P ∈ pathPatterns 2 0 [1, 5], HasCheckedCertificate 13 7 ([[], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_seq71 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 13 7 ([[], []] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t7_cover72 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover84 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover88 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover89 + · exact by + intro _ + exact k13t7_cover90 + · exact by + intro _ + exact k13t7_cover91 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover92 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover93 + · exact by + intro _ + exact k13t7_cover94 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover95 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover96 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover97 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover98 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover101 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k13t7_cover102 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover103 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover104 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover105 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover106 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover108 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover109 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover110 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover111 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover112 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover114 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 13 7 ([[], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover115 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 13 7 ([[], [], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p58, Certificates.k13t7p58_check⟩ + +private theorem k13t7_cover116 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 13 7 ([[], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover117 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 13 7 ([[], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover113 : ∀ P ∈ pathPatterns 3 4 [2], HasCheckedCertificate 13 7 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover114 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k13t7_cover115 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover116 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover117 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover118 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 2], HasCheckedCertificate 13 7 ([[], [], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p59, Certificates.k13t7p59_check⟩ + +private theorem k13t7_cover119 : ∀ P ∈ pathPatterns 1 1 [2, 1, 2], HasCheckedCertificate 13 7 ([[], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover120 : ∀ P ∈ pathPatterns 1 0 [2, 1, 3], HasCheckedCertificate 13 7 ([[], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover121 : ∀ P ∈ pathPatterns 2 2 [2, 2], HasCheckedCertificate 13 7 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k13t7_cover122 : ∀ P ∈ pathPatterns 1 0 [2, 2, 2], HasCheckedCertificate 13 7 ([[], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover123 : ∀ P ∈ pathPatterns 2 1 [2, 3], HasCheckedCertificate 13 7 ([[], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t7_cover124 : ∀ P ∈ pathPatterns 2 0 [2, 4], HasCheckedCertificate 13 7 ([[], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover126 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 13 7 ([[], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover125 : ∀ P ∈ pathPatterns 3 3 [3], HasCheckedCertificate 13 7 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover126 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover127 : ∀ P ∈ pathPatterns 2 0 [3, 3], HasCheckedCertificate 13 7 ([[], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover128 : ∀ P ∈ pathPatterns 3 2 [4], HasCheckedCertificate 13 7 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover129 : ∀ P ∈ pathPatterns 3 1 [5], HasCheckedCertificate 13 7 ([[], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover130 : ∀ P ∈ pathPatterns 3 0 [6], HasCheckedCertificate 13 7 ([[], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_seq6 : amountSequenceForall 4 6 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 7 ([[], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t7_cover7 + · intro q + fin_cases q + · exact k13t7_seq71 + + · exact by + constructor + · exact by + intro _ + exact k13t7_cover113 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k13t7_cover118 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover119 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover120 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover121 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover122 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover123 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover124 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover125 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover127 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover128 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover129 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover130 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover5 : ∀ P ∈ pathPatterns 5 6 [], HasCheckedCertificate 13 7 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact k13t7_seq6 + + +private theorem k13t7_cover135 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 13 7 ([[], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p60, Certificates.k13t7p60_check⟩ + +private theorem k13t7_cover136 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 13 7 ([[], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p61, Certificates.k13t7p61_check⟩ + +private theorem k13t7_cover137 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 13 7 ([[], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p62, Certificates.k13t7p62_check⟩ + +private theorem k13t7_cover138 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 13 7 ([[], [1], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p63, Certificates.k13t7p63_check⟩ + +private theorem k13t7_cover134 : ∀ P ∈ pathPatterns 2 4 [1], HasCheckedCertificate 13 7 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover135 + · exact by + intro _ + exact k13t7_cover136 + · exact by + intro _ + exact k13t7_cover137 + · exact by + intro _ + exact k13t7_cover138 + +private theorem k13t7_cover139 : ∀ P ∈ pathPatterns 1 3 [1, 1], HasCheckedCertificate 13 7 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover140 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1], HasCheckedCertificate 13 7 ([[], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p64, Certificates.k13t7p64_check⟩ + +private theorem k13t7_cover141 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2], HasCheckedCertificate 13 7 ([[], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p65, Certificates.k13t7p65_check⟩ + +private theorem k13t7_cover142 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3], HasCheckedCertificate 13 7 ([[], [1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p66, Certificates.k13t7p66_check⟩ + +private theorem k13t7_cover143 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 13 7 ([[], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover144 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 13 7 ([[], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p67, Certificates.k13t7p67_check⟩ + +private theorem k13t7_cover145 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 13 7 ([[], [1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p68, Certificates.k13t7p68_check⟩ + +private theorem k13t7_cover146 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 13 7 ([[], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover147 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 13 7 ([[], [1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p69, Certificates.k13t7p69_check⟩ + +private theorem k13t7_cover148 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 13 7 ([[], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover150 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 13 7 ([[], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p70, Certificates.k13t7p70_check⟩ + +private theorem k13t7_cover151 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 13 7 ([[], [1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p71, Certificates.k13t7p71_check⟩ + +private theorem k13t7_cover149 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 13 7 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t7_cover150 + · exact by + intro _ + exact k13t7_cover151 + +private theorem k13t7_cover152 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 13 7 ([[], [1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p72, Certificates.k13t7p72_check⟩ + +private theorem k13t7_cover153 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 13 7 ([[], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover154 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 13 7 ([[], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover155 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 13 7 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k13t7_cover156 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 13 7 ([[], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t7_cover157 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 13 7 ([[], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_seq133 : amountSequenceForall 3 5 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 7 ([[], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover134 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover139 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover140 + · exact by + intro _ + exact k13t7_cover141 + · exact by + intro _ + exact k13t7_cover142 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover143 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover144 + · exact by + intro _ + exact k13t7_cover145 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover146 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover147 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover148 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover149 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k13t7_cover152 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover153 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover154 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover155 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover156 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover157 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover132 : ∀ P ∈ pathPatterns 4 5 [1], HasCheckedCertificate 13 7 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k13t7_seq133 + + +private theorem k13t7_cover159 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 13 7 ([[], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p73, Certificates.k13t7p73_check⟩ + +private theorem k13t7_cover160 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 13 7 ([[], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p74, Certificates.k13t7p74_check⟩ + +private theorem k13t7_cover161 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 13 7 ([[], [1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p75, Certificates.k13t7p75_check⟩ + +private theorem k13t7_cover162 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 13 7 ([[], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover163 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 13 7 ([[], [1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p76, Certificates.k13t7p76_check⟩ + +private theorem k13t7_cover164 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 13 7 ([[], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover165 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 13 7 ([[], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover158 : ∀ P ∈ pathPatterns 3 4 [1, 1], HasCheckedCertificate 13 7 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover159 + · exact by + intro _ + exact k13t7_cover160 + · exact by + intro _ + exact k13t7_cover161 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover162 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k13t7_cover163 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover164 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover165 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover167 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 13 7 ([[], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p77, Certificates.k13t7p77_check⟩ + +private theorem k13t7_cover168 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 13 7 ([[], [1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p78, Certificates.k13t7p78_check⟩ + +private theorem k13t7_cover166 : ∀ P ∈ pathPatterns 2 3 [1, 1, 1], HasCheckedCertificate 13 7 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t7_cover167 + · exact by + intro _ + exact k13t7_cover168 + +private theorem k13t7_cover169 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 1], HasCheckedCertificate 13 7 ([[], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover170 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 1], HasCheckedCertificate 13 7 ([[], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p79, Certificates.k13t7p79_check⟩ + +private theorem k13t7_cover171 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 2], HasCheckedCertificate 13 7 ([[], [1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p80, Certificates.k13t7p80_check⟩ + +private theorem k13t7_cover172 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 2], HasCheckedCertificate 13 7 ([[], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover173 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 1], HasCheckedCertificate 13 7 ([[], [1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p81, Certificates.k13t7p81_check⟩ + +private theorem k13t7_cover174 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 3], HasCheckedCertificate 13 7 ([[], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover176 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 7 ([[], [1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p82, Certificates.k13t7p82_check⟩ + +private theorem k13t7_cover175 : ∀ P ∈ pathPatterns 2 2 [1, 1, 2], HasCheckedCertificate 13 7 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t7_cover176 + +private theorem k13t7_cover177 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 1], HasCheckedCertificate 13 7 ([[], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover178 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 1], HasCheckedCertificate 13 7 ([[], [1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p83, Certificates.k13t7p83_check⟩ + +private theorem k13t7_cover179 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 2], HasCheckedCertificate 13 7 ([[], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover180 : ∀ P ∈ pathPatterns 2 1 [1, 1, 3], HasCheckedCertificate 13 7 ([[], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t7_cover181 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 1], HasCheckedCertificate 13 7 ([[], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover182 : ∀ P ∈ pathPatterns 2 0 [1, 1, 4], HasCheckedCertificate 13 7 ([[], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover184 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 13 7 ([[], [1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p84, Certificates.k13t7p84_check⟩ + +private theorem k13t7_cover185 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 13 7 ([[], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover186 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 13 7 ([[], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover183 : ∀ P ∈ pathPatterns 3 3 [1, 2], HasCheckedCertificate 13 7 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k13t7_cover184 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover185 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover186 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover188 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 7 ([[], [1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p85, Certificates.k13t7p85_check⟩ + +private theorem k13t7_cover187 : ∀ P ∈ pathPatterns 2 2 [1, 2, 1], HasCheckedCertificate 13 7 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t7_cover188 + +private theorem k13t7_cover189 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 2], HasCheckedCertificate 13 7 ([[], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover190 : ∀ P ∈ pathPatterns 2 1 [1, 2, 2], HasCheckedCertificate 13 7 ([[], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t7_cover191 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 1], HasCheckedCertificate 13 7 ([[], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover192 : ∀ P ∈ pathPatterns 2 0 [1, 2, 3], HasCheckedCertificate 13 7 ([[], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover194 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 13 7 ([[], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover193 : ∀ P ∈ pathPatterns 3 2 [1, 3], HasCheckedCertificate 13 7 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover194 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover195 : ∀ P ∈ pathPatterns 2 1 [1, 3, 1], HasCheckedCertificate 13 7 ([[], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t7_cover196 : ∀ P ∈ pathPatterns 2 0 [1, 3, 2], HasCheckedCertificate 13 7 ([[], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover197 : ∀ P ∈ pathPatterns 3 1 [1, 4], HasCheckedCertificate 13 7 ([[], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover198 : ∀ P ∈ pathPatterns 2 0 [1, 4, 1], HasCheckedCertificate 13 7 ([[], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover199 : ∀ P ∈ pathPatterns 3 0 [1, 5], HasCheckedCertificate 13 7 ([[], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_seq131 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 13 7 ([[]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t7_cover132 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover158 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover166 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover169 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover170 + · exact by + intro _ + exact k13t7_cover171 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover172 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover173 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover174 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover175 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover177 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover178 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover179 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover180 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover181 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover182 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover183 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover187 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover189 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover190 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover191 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover192 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover193 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover195 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover196 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover197 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover198 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover199 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover202 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 7 ([[], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p86, Certificates.k13t7p86_check⟩ + +private theorem k13t7_cover201 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 13 7 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t7_cover202 + +private theorem k13t7_cover203 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 13 7 ([[], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover204 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 13 7 ([[], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t7_cover205 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 13 7 ([[], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover200 : ∀ P ∈ pathPatterns 4 4 [2], HasCheckedCertificate 13 7 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover201 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover203 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover204 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover205 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover206 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 2], HasCheckedCertificate 13 7 ([[], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover207 : ∀ P ∈ pathPatterns 2 1 [2, 1, 2], HasCheckedCertificate 13 7 ([[], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t7_cover208 : ∀ P ∈ pathPatterns 2 0 [2, 1, 3], HasCheckedCertificate 13 7 ([[], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover209 : ∀ P ∈ pathPatterns 3 2 [2, 2], HasCheckedCertificate 13 7 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover210 : ∀ P ∈ pathPatterns 2 0 [2, 2, 2], HasCheckedCertificate 13 7 ([[], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover211 : ∀ P ∈ pathPatterns 3 1 [2, 3], HasCheckedCertificate 13 7 ([[], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover212 : ∀ P ∈ pathPatterns 3 0 [2, 4], HasCheckedCertificate 13 7 ([[], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover214 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 13 7 ([[], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover213 : ∀ P ∈ pathPatterns 4 3 [3], HasCheckedCertificate 13 7 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover214 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover215 : ∀ P ∈ pathPatterns 3 0 [3, 3], HasCheckedCertificate 13 7 ([[], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover216 : ∀ P ∈ pathPatterns 4 2 [4], HasCheckedCertificate 13 7 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover217 : ∀ P ∈ pathPatterns 4 1 [5], HasCheckedCertificate 13 7 ([[], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover218 : ∀ P ∈ pathPatterns 4 0 [6], HasCheckedCertificate 13 7 ([[], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_seq4 : amountSequenceForall 5 6 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 7 ([[]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t7_cover5 + · intro q + fin_cases q + · exact k13t7_seq131 + + · exact by + constructor + · exact by + intro _ + exact k13t7_cover200 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover206 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover207 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover208 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover209 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover210 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover211 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover212 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover213 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover215 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover216 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover217 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover218 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover3 : ∀ P ∈ pathPatterns 6 6 [], HasCheckedCertificate 13 7 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact k13t7_seq4 + + +private theorem k13t7_cover223 : ∀ P ∈ pathPatterns 1 3 [1], HasCheckedCertificate 13 7 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover224 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 13 7 ([[1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p87, Certificates.k13t7p87_check⟩ + +private theorem k13t7_cover225 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 13 7 ([[1], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p88, Certificates.k13t7p88_check⟩ + +private theorem k13t7_cover226 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 13 7 ([[1], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p89, Certificates.k13t7p89_check⟩ + +private theorem k13t7_cover227 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 13 7 ([[1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover228 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 13 7 ([[1], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p90, Certificates.k13t7p90_check⟩ + +private theorem k13t7_cover229 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 13 7 ([[1], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover230 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 13 7 ([[1], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover222 : ∀ P ∈ pathPatterns 3 4 [1], HasCheckedCertificate 13 7 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover223 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover224 + · exact by + intro _ + exact k13t7_cover225 + · exact by + intro _ + exact k13t7_cover226 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover227 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k13t7_cover228 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover229 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover230 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover232 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 13 7 ([[1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p91, Certificates.k13t7p91_check⟩ + +private theorem k13t7_cover233 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 13 7 ([[1], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p92, Certificates.k13t7p92_check⟩ + +private theorem k13t7_cover231 : ∀ P ∈ pathPatterns 2 3 [1, 1], HasCheckedCertificate 13 7 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t7_cover232 + · exact by + intro _ + exact k13t7_cover233 + +private theorem k13t7_cover234 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1], HasCheckedCertificate 13 7 ([[1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover235 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1], HasCheckedCertificate 13 7 ([[1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p93, Certificates.k13t7p93_check⟩ + +private theorem k13t7_cover236 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2], HasCheckedCertificate 13 7 ([[1], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p94, Certificates.k13t7p94_check⟩ + +private theorem k13t7_cover237 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2], HasCheckedCertificate 13 7 ([[1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover238 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1], HasCheckedCertificate 13 7 ([[1], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p95, Certificates.k13t7p95_check⟩ + +private theorem k13t7_cover239 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3], HasCheckedCertificate 13 7 ([[1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover241 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 7 ([[1], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p96, Certificates.k13t7p96_check⟩ + +private theorem k13t7_cover240 : ∀ P ∈ pathPatterns 2 2 [1, 2], HasCheckedCertificate 13 7 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t7_cover241 + +private theorem k13t7_cover242 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1], HasCheckedCertificate 13 7 ([[1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover243 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2], HasCheckedCertificate 13 7 ([[1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover244 : ∀ P ∈ pathPatterns 2 1 [1, 3], HasCheckedCertificate 13 7 ([[1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t7_cover245 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1], HasCheckedCertificate 13 7 ([[1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover246 : ∀ P ∈ pathPatterns 2 0 [1, 4], HasCheckedCertificate 13 7 ([[1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover248 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 13 7 ([[1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover249 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 13 7 ([[1], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover247 : ∀ P ∈ pathPatterns 3 3 [2], HasCheckedCertificate 13 7 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover248 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover249 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover250 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2], HasCheckedCertificate 13 7 ([[1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover251 : ∀ P ∈ pathPatterns 2 1 [2, 2], HasCheckedCertificate 13 7 ([[1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t7_cover252 : ∀ P ∈ pathPatterns 2 0 [2, 3], HasCheckedCertificate 13 7 ([[1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover253 : ∀ P ∈ pathPatterns 3 2 [3], HasCheckedCertificate 13 7 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover254 : ∀ P ∈ pathPatterns 3 1 [4], HasCheckedCertificate 13 7 ([[1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover255 : ∀ P ∈ pathPatterns 3 0 [5], HasCheckedCertificate 13 7 ([[1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_seq221 : amountSequenceForall 4 5 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 7 ([[1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover222 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover231 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover234 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover235 + · exact by + intro _ + exact k13t7_cover236 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover237 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover238 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover239 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover240 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover242 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover243 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover244 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover245 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover246 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover247 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover250 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover251 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover252 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover253 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover254 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover255 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover220 : ∀ P ∈ pathPatterns 5 5 [1], HasCheckedCertificate 13 7 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact k13t7_seq221 + + +private theorem k13t7_cover257 : ∀ P ∈ pathPatterns 1 2 [1, 1], HasCheckedCertificate 13 7 ([[1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover258 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1], HasCheckedCertificate 13 7 ([[1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p97, Certificates.k13t7p97_check⟩ + +private theorem k13t7_cover259 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2], HasCheckedCertificate 13 7 ([[1, 1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p98, Certificates.k13t7p98_check⟩ + +private theorem k13t7_cover260 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 13 7 ([[1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover261 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 13 7 ([[1, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p99, Certificates.k13t7p99_check⟩ + +private theorem k13t7_cover262 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 13 7 ([[1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover264 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 7 ([[1, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p100, Certificates.k13t7p100_check⟩ + +private theorem k13t7_cover263 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 13 7 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t7_cover264 + +private theorem k13t7_cover265 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 13 7 ([[1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover266 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 13 7 ([[1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t7_cover267 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 13 7 ([[1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover256 : ∀ P ∈ pathPatterns 4 4 [1, 1], HasCheckedCertificate 13 7 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover257 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover258 + · exact by + intro _ + exact k13t7_cover259 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover260 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover261 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover262 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover263 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover265 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover266 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover267 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover269 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 13 7 ([[1, 1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p101, Certificates.k13t7p101_check⟩ + +private theorem k13t7_cover270 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 13 7 ([[1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover271 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 13 7 ([[1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover268 : ∀ P ∈ pathPatterns 3 3 [1, 1, 1], HasCheckedCertificate 13 7 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k13t7_cover269 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover270 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover271 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover273 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 7 ([[1, 1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p102, Certificates.k13t7p102_check⟩ + +private theorem k13t7_cover272 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1, 1], HasCheckedCertificate 13 7 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t7_cover273 + +private theorem k13t7_cover274 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1, 1], HasCheckedCertificate 13 7 ([[1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover275 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1, 1], HasCheckedCertificate 13 7 ([[1, 1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t7p103, Certificates.k13t7p103_check⟩ + +private theorem k13t7_cover276 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 2], HasCheckedCertificate 13 7 ([[1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover277 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 2], HasCheckedCertificate 13 7 ([[1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t7_cover278 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2, 1], HasCheckedCertificate 13 7 ([[1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover279 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 3], HasCheckedCertificate 13 7 ([[1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover281 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 13 7 ([[1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover280 : ∀ P ∈ pathPatterns 3 2 [1, 1, 2], HasCheckedCertificate 13 7 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover281 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover282 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2, 1], HasCheckedCertificate 13 7 ([[1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t7_cover283 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1, 1], HasCheckedCertificate 13 7 ([[1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover284 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 2], HasCheckedCertificate 13 7 ([[1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover285 : ∀ P ∈ pathPatterns 3 1 [1, 1, 3], HasCheckedCertificate 13 7 ([[1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover286 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3, 1], HasCheckedCertificate 13 7 ([[1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover287 : ∀ P ∈ pathPatterns 3 0 [1, 1, 4], HasCheckedCertificate 13 7 ([[1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover289 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 13 7 ([[1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover290 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 13 7 ([[1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t7_cover291 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 13 7 ([[1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover288 : ∀ P ∈ pathPatterns 4 3 [1, 2], HasCheckedCertificate 13 7 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover289 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover290 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover291 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover293 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 13 7 ([[1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover292 : ∀ P ∈ pathPatterns 3 2 [1, 2, 1], HasCheckedCertificate 13 7 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover293 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover294 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 2], HasCheckedCertificate 13 7 ([[1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover295 : ∀ P ∈ pathPatterns 3 1 [1, 2, 2], HasCheckedCertificate 13 7 ([[1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover296 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2, 1], HasCheckedCertificate 13 7 ([[1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover297 : ∀ P ∈ pathPatterns 3 0 [1, 2, 3], HasCheckedCertificate 13 7 ([[1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover299 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 13 7 ([[1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover298 : ∀ P ∈ pathPatterns 4 2 [1, 3], HasCheckedCertificate 13 7 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover299 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover300 : ∀ P ∈ pathPatterns 3 1 [1, 3, 1], HasCheckedCertificate 13 7 ([[1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover301 : ∀ P ∈ pathPatterns 3 0 [1, 3, 2], HasCheckedCertificate 13 7 ([[1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover302 : ∀ P ∈ pathPatterns 4 1 [1, 4], HasCheckedCertificate 13 7 ([[1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover303 : ∀ P ∈ pathPatterns 3 0 [1, 4, 1], HasCheckedCertificate 13 7 ([[1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover304 : ∀ P ∈ pathPatterns 4 0 [1, 5], HasCheckedCertificate 13 7 ([[1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_seq219 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 13 7 ([] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t7_cover220 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover256 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover268 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover272 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover274 + · intro q + fin_cases q + · exact by + intro _ + exact k13t7_cover275 + · exact by + constructor + · exact by + intro _ + exact k13t7_cover276 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover277 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover278 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover279 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover280 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover282 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover283 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover284 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover285 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover286 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover287 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover288 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover292 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover294 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover295 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover296 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover297 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover298 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover300 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover301 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover302 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover303 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover304 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover307 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 13 7 ([[2], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t7_cover306 : ∀ P ∈ pathPatterns 3 2 [2], HasCheckedCertificate 13 7 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t7_cover307 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover308 : ∀ P ∈ pathPatterns 2 0 [2, 2], HasCheckedCertificate 13 7 ([[2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover309 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 13 7 ([[2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover310 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 13 7 ([[2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover305 : ∀ P ∈ pathPatterns 5 4 [2], HasCheckedCertificate 13 7 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover306 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover308 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover309 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover310 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover311 : ∀ P ∈ pathPatterns 2 0 [2, 1, 1, 2], HasCheckedCertificate 13 7 ([[2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover312 : ∀ P ∈ pathPatterns 3 1 [2, 1, 2], HasCheckedCertificate 13 7 ([[2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover313 : ∀ P ∈ pathPatterns 3 0 [2, 1, 3], HasCheckedCertificate 13 7 ([[2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover314 : ∀ P ∈ pathPatterns 4 2 [2, 2], HasCheckedCertificate 13 7 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover315 : ∀ P ∈ pathPatterns 3 0 [2, 2, 2], HasCheckedCertificate 13 7 ([[2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover316 : ∀ P ∈ pathPatterns 4 1 [2, 3], HasCheckedCertificate 13 7 ([[2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover317 : ∀ P ∈ pathPatterns 4 0 [2, 4], HasCheckedCertificate 13 7 ([[2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover319 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 13 7 ([[3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover318 : ∀ P ∈ pathPatterns 5 3 [3], HasCheckedCertificate 13 7 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover319 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover320 : ∀ P ∈ pathPatterns 4 0 [3, 3], HasCheckedCertificate 13 7 ([[3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover321 : ∀ P ∈ pathPatterns 5 2 [4], HasCheckedCertificate 13 7 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover322 : ∀ P ∈ pathPatterns 5 1 [5], HasCheckedCertificate 13 7 ([[5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover323 : ∀ P ∈ pathPatterns 5 0 [6], HasCheckedCertificate 13 7 ([[6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t7_seq2 : amountSequenceForall 6 6 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 7 ([] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t7_cover3 + · intro q + fin_cases q + · exact k13t7_seq219 + + · exact by + constructor + · exact by + intro _ + exact k13t7_cover305 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover311 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover312 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover313 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover314 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover315 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover316 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover317 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover318 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover320 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover321 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover322 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t7_cover323 + · intro q + exact Fin.elim0 q + +private theorem k13t7_cover1 : ∀ P ∈ pathPatterns 7 6 [], HasCheckedCertificate 13 7 ([] ++ P) := by + apply pathPatterns_forall_step + exact k13t7_seq2 + + +theorem coverage_k13_t7 : + ∀ P ∈ pathPatterns 7 6, HasCheckedCertificate 13 7 P := + k13t7_cover1 + +private theorem k13t8_cover14 : ∀ P ∈ pathPatterns 0 5 [], HasCheckedCertificate 13 8 ([[], [], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p0, Certificates.k13t8p0_check⟩ + +private theorem k13t8_cover13 : ∀ P ∈ pathPatterns 1 5 [], HasCheckedCertificate 13 8 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k13t8_cover14 + +private theorem k13t8_cover15 : ∀ P ∈ pathPatterns 0 4 [1], HasCheckedCertificate 13 8 ([[], [], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p1, Certificates.k13t8p1_check⟩ + +private theorem k13t8_cover16 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 13 8 ([[], [], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p2, Certificates.k13t8p2_check⟩ + +private theorem k13t8_cover17 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 13 8 ([[], [], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p3, Certificates.k13t8p3_check⟩ + +private theorem k13t8_cover18 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 13 8 ([[], [], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p4, Certificates.k13t8p4_check⟩ + +private theorem k13t8_cover19 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 13 8 ([[], [], [], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p5, Certificates.k13t8p5_check⟩ + +private theorem k13t8_cover12 : ∀ P ∈ pathPatterns 2 5 [], HasCheckedCertificate 13 8 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k13t8_cover13 + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover15 + · exact by + intro _ + exact k13t8_cover16 + · exact by + intro _ + exact k13t8_cover17 + · exact by + intro _ + exact k13t8_cover18 + · exact by + intro _ + exact k13t8_cover19 + +private theorem k13t8_cover20 : ∀ P ∈ pathPatterns 1 4 [1], HasCheckedCertificate 13 8 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover21 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 13 8 ([[], [], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p6, Certificates.k13t8p6_check⟩ + +private theorem k13t8_cover22 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 13 8 ([[], [], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p7, Certificates.k13t8p7_check⟩ + +private theorem k13t8_cover23 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 13 8 ([[], [], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p8, Certificates.k13t8p8_check⟩ + +private theorem k13t8_cover24 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 13 8 ([[], [], [], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p9, Certificates.k13t8p9_check⟩ + +private theorem k13t8_cover25 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 13 8 ([[], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover26 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 13 8 ([[], [], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p10, Certificates.k13t8p10_check⟩ + +private theorem k13t8_cover27 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 13 8 ([[], [], [], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p11, Certificates.k13t8p11_check⟩ + +private theorem k13t8_cover28 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 13 8 ([[], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover29 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 13 8 ([[], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover30 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 13 8 ([[], [], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover11 : ∀ P ∈ pathPatterns 3 5 [], HasCheckedCertificate 13 8 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k13t8_cover12 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover20 + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover21 + · exact by + intro _ + exact k13t8_cover22 + · exact by + intro _ + exact k13t8_cover23 + · exact by + intro _ + exact k13t8_cover24 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover25 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k13t8_cover26 + · exact by + intro _ + exact k13t8_cover27 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover28 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k13t8_cover29 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k13t8_cover30 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover32 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 13 8 ([[], [], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p12, Certificates.k13t8p12_check⟩ + +private theorem k13t8_cover33 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 13 8 ([[], [], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p13, Certificates.k13t8p13_check⟩ + +private theorem k13t8_cover34 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 13 8 ([[], [], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p14, Certificates.k13t8p14_check⟩ + +private theorem k13t8_cover35 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 13 8 ([[], [], [], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p15, Certificates.k13t8p15_check⟩ + +private theorem k13t8_cover31 : ∀ P ∈ pathPatterns 2 4 [1], HasCheckedCertificate 13 8 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover32 + · exact by + intro _ + exact k13t8_cover33 + · exact by + intro _ + exact k13t8_cover34 + · exact by + intro _ + exact k13t8_cover35 + +private theorem k13t8_cover36 : ∀ P ∈ pathPatterns 1 3 [1, 1], HasCheckedCertificate 13 8 ([[], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover37 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1], HasCheckedCertificate 13 8 ([[], [], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p16, Certificates.k13t8p16_check⟩ + +private theorem k13t8_cover38 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2], HasCheckedCertificate 13 8 ([[], [], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p17, Certificates.k13t8p17_check⟩ + +private theorem k13t8_cover39 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3], HasCheckedCertificate 13 8 ([[], [], [], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p18, Certificates.k13t8p18_check⟩ + +private theorem k13t8_cover40 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 13 8 ([[], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover41 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 13 8 ([[], [], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p19, Certificates.k13t8p19_check⟩ + +private theorem k13t8_cover42 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 13 8 ([[], [], [], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p20, Certificates.k13t8p20_check⟩ + +private theorem k13t8_cover43 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 13 8 ([[], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover44 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 13 8 ([[], [], [], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p21, Certificates.k13t8p21_check⟩ + +private theorem k13t8_cover45 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 13 8 ([[], [], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover47 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 13 8 ([[], [], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p22, Certificates.k13t8p22_check⟩ + +private theorem k13t8_cover48 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 13 8 ([[], [], [], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p23, Certificates.k13t8p23_check⟩ + +private theorem k13t8_cover46 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 13 8 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t8_cover47 + · exact by + intro _ + exact k13t8_cover48 + +private theorem k13t8_cover49 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 13 8 ([[], [], [], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p24, Certificates.k13t8p24_check⟩ + +private theorem k13t8_cover50 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 13 8 ([[], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover51 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 13 8 ([[], [], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover52 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 13 8 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k13t8_cover53 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 13 8 ([[], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t8_cover54 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 13 8 ([[], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_seq10 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 8 ([[], [], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t8_cover11 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover31 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover36 + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover37 + · exact by + intro _ + exact k13t8_cover38 + · exact by + intro _ + exact k13t8_cover39 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover40 + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover41 + · exact by + intro _ + exact k13t8_cover42 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover43 + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover44 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover45 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover46 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k13t8_cover49 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover50 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t8_cover51 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover52 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover53 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover54 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover9 : ∀ P ∈ pathPatterns 4 5 [], HasCheckedCertificate 13 8 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k13t8_seq10 + + +private theorem k13t8_cover56 : ∀ P ∈ pathPatterns 1 3 [1], HasCheckedCertificate 13 8 ([[], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover57 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 13 8 ([[], [], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p25, Certificates.k13t8p25_check⟩ + +private theorem k13t8_cover58 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 13 8 ([[], [], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p26, Certificates.k13t8p26_check⟩ + +private theorem k13t8_cover59 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 13 8 ([[], [], [], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p27, Certificates.k13t8p27_check⟩ + +private theorem k13t8_cover60 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 13 8 ([[], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover61 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 13 8 ([[], [], [], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p28, Certificates.k13t8p28_check⟩ + +private theorem k13t8_cover62 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 13 8 ([[], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover63 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 13 8 ([[], [], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover55 : ∀ P ∈ pathPatterns 3 4 [1], HasCheckedCertificate 13 8 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover56 + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover57 + · exact by + intro _ + exact k13t8_cover58 + · exact by + intro _ + exact k13t8_cover59 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover60 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k13t8_cover61 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover62 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k13t8_cover63 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover65 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 13 8 ([[], [], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p29, Certificates.k13t8p29_check⟩ + +private theorem k13t8_cover66 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 13 8 ([[], [], [], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p30, Certificates.k13t8p30_check⟩ + +private theorem k13t8_cover64 : ∀ P ∈ pathPatterns 2 3 [1, 1], HasCheckedCertificate 13 8 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t8_cover65 + · exact by + intro _ + exact k13t8_cover66 + +private theorem k13t8_cover67 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1], HasCheckedCertificate 13 8 ([[], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover68 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1], HasCheckedCertificate 13 8 ([[], [], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p31, Certificates.k13t8p31_check⟩ + +private theorem k13t8_cover69 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2], HasCheckedCertificate 13 8 ([[], [], [], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p32, Certificates.k13t8p32_check⟩ + +private theorem k13t8_cover70 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2], HasCheckedCertificate 13 8 ([[], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover71 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1], HasCheckedCertificate 13 8 ([[], [], [], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p33, Certificates.k13t8p33_check⟩ + +private theorem k13t8_cover72 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3], HasCheckedCertificate 13 8 ([[], [], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover74 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 8 ([[], [], [], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p34, Certificates.k13t8p34_check⟩ + +private theorem k13t8_cover73 : ∀ P ∈ pathPatterns 2 2 [1, 2], HasCheckedCertificate 13 8 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t8_cover74 + +private theorem k13t8_cover75 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1], HasCheckedCertificate 13 8 ([[], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover76 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2], HasCheckedCertificate 13 8 ([[], [], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover77 : ∀ P ∈ pathPatterns 2 1 [1, 3], HasCheckedCertificate 13 8 ([[], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t8_cover78 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1], HasCheckedCertificate 13 8 ([[], [], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover79 : ∀ P ∈ pathPatterns 2 0 [1, 4], HasCheckedCertificate 13 8 ([[], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover81 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 13 8 ([[], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover82 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 13 8 ([[], [], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover80 : ∀ P ∈ pathPatterns 3 3 [2], HasCheckedCertificate 13 8 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t8_cover81 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t8_cover82 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover83 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2], HasCheckedCertificate 13 8 ([[], [], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover84 : ∀ P ∈ pathPatterns 2 1 [2, 2], HasCheckedCertificate 13 8 ([[], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t8_cover85 : ∀ P ∈ pathPatterns 2 0 [2, 3], HasCheckedCertificate 13 8 ([[], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover86 : ∀ P ∈ pathPatterns 3 2 [3], HasCheckedCertificate 13 8 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover87 : ∀ P ∈ pathPatterns 3 1 [4], HasCheckedCertificate 13 8 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover88 : ∀ P ∈ pathPatterns 3 0 [5], HasCheckedCertificate 13 8 ([[], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_seq8 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 8 ([[], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t8_cover9 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover55 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover64 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover67 + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover68 + · exact by + intro _ + exact k13t8_cover69 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover70 + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover71 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover72 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover73 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover75 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t8_cover76 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover77 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover78 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover79 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover80 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t8_cover83 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover84 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover85 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover86 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover87 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover88 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover7 : ∀ P ∈ pathPatterns 5 5 [], HasCheckedCertificate 13 8 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k13t8_seq8 + + +private theorem k13t8_cover91 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 13 8 ([[], [], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p35, Certificates.k13t8p35_check⟩ + +private theorem k13t8_cover92 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 13 8 ([[], [], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p36, Certificates.k13t8p36_check⟩ + +private theorem k13t8_cover93 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 13 8 ([[], [], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p37, Certificates.k13t8p37_check⟩ + +private theorem k13t8_cover90 : ∀ P ∈ pathPatterns 2 3 [1], HasCheckedCertificate 13 8 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover91 + · exact by + intro _ + exact k13t8_cover92 + · exact by + intro _ + exact k13t8_cover93 + +private theorem k13t8_cover94 : ∀ P ∈ pathPatterns 1 2 [1, 1], HasCheckedCertificate 13 8 ([[], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover95 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1], HasCheckedCertificate 13 8 ([[], [], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p38, Certificates.k13t8p38_check⟩ + +private theorem k13t8_cover96 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2], HasCheckedCertificate 13 8 ([[], [], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p39, Certificates.k13t8p39_check⟩ + +private theorem k13t8_cover97 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 13 8 ([[], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover98 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 13 8 ([[], [], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p40, Certificates.k13t8p40_check⟩ + +private theorem k13t8_cover99 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 13 8 ([[], [], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover101 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 8 ([[], [], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p41, Certificates.k13t8p41_check⟩ + +private theorem k13t8_cover100 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 13 8 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t8_cover101 + +private theorem k13t8_cover102 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 13 8 ([[], [], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover103 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 13 8 ([[], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t8_cover104 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 13 8 ([[], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover89 : ∀ P ∈ pathPatterns 4 4 [1], HasCheckedCertificate 13 8 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover90 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover94 + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover95 + · exact by + intro _ + exact k13t8_cover96 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover97 + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover98 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover99 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover100 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t8_cover102 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover103 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover104 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover106 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 13 8 ([[], [], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p42, Certificates.k13t8p42_check⟩ + +private theorem k13t8_cover107 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 13 8 ([[], [], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p43, Certificates.k13t8p43_check⟩ + +private theorem k13t8_cover108 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 13 8 ([[], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover109 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 13 8 ([[], [], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover105 : ∀ P ∈ pathPatterns 3 3 [1, 1], HasCheckedCertificate 13 8 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover106 + · exact by + intro _ + exact k13t8_cover107 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover108 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t8_cover109 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover111 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 8 ([[], [], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p44, Certificates.k13t8p44_check⟩ + +private theorem k13t8_cover110 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1], HasCheckedCertificate 13 8 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t8_cover111 + +private theorem k13t8_cover112 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1], HasCheckedCertificate 13 8 ([[], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover113 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1], HasCheckedCertificate 13 8 ([[], [], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p45, Certificates.k13t8p45_check⟩ + +private theorem k13t8_cover114 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2], HasCheckedCertificate 13 8 ([[], [], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover115 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2], HasCheckedCertificate 13 8 ([[], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t8_cover116 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1], HasCheckedCertificate 13 8 ([[], [], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover117 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3], HasCheckedCertificate 13 8 ([[], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover119 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 13 8 ([[], [], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover118 : ∀ P ∈ pathPatterns 3 2 [1, 2], HasCheckedCertificate 13 8 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t8_cover119 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover120 : ∀ P ∈ pathPatterns 2 1 [1, 2, 1], HasCheckedCertificate 13 8 ([[], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t8_cover121 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2], HasCheckedCertificate 13 8 ([[], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover122 : ∀ P ∈ pathPatterns 3 1 [1, 3], HasCheckedCertificate 13 8 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover123 : ∀ P ∈ pathPatterns 2 0 [1, 3, 1], HasCheckedCertificate 13 8 ([[], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover124 : ∀ P ∈ pathPatterns 3 0 [1, 4], HasCheckedCertificate 13 8 ([[], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover126 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 13 8 ([[], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t8_cover127 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 13 8 ([[], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover125 : ∀ P ∈ pathPatterns 4 3 [2], HasCheckedCertificate 13 8 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover126 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover127 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover128 : ∀ P ∈ pathPatterns 2 0 [2, 1, 2], HasCheckedCertificate 13 8 ([[], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover129 : ∀ P ∈ pathPatterns 3 1 [2, 2], HasCheckedCertificate 13 8 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover130 : ∀ P ∈ pathPatterns 3 0 [2, 3], HasCheckedCertificate 13 8 ([[], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover131 : ∀ P ∈ pathPatterns 4 2 [3], HasCheckedCertificate 13 8 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover132 : ∀ P ∈ pathPatterns 4 1 [4], HasCheckedCertificate 13 8 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover133 : ∀ P ∈ pathPatterns 4 0 [5], HasCheckedCertificate 13 8 ([[], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_seq6 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 8 ([[], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t8_cover7 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover89 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover105 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover110 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover112 + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover113 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover114 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover115 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover116 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover117 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover118 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover120 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover121 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover122 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover123 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover124 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover125 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover128 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover129 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover130 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover131 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover132 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover133 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover5 : ∀ P ∈ pathPatterns 6 5 [], HasCheckedCertificate 13 8 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact k13t8_seq6 + + +private theorem k13t8_cover136 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 13 8 ([[], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover137 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 13 8 ([[], [1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p46, Certificates.k13t8p46_check⟩ + +private theorem k13t8_cover138 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 13 8 ([[], [1], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p47, Certificates.k13t8p47_check⟩ + +private theorem k13t8_cover139 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 13 8 ([[], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover140 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 13 8 ([[], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover135 : ∀ P ∈ pathPatterns 3 3 [1], HasCheckedCertificate 13 8 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover136 + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover137 + · exact by + intro _ + exact k13t8_cover138 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover139 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k13t8_cover140 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover142 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 8 ([[], [1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p48, Certificates.k13t8p48_check⟩ + +private theorem k13t8_cover141 : ∀ P ∈ pathPatterns 2 2 [1, 1], HasCheckedCertificate 13 8 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k13t8_cover142 + +private theorem k13t8_cover143 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1], HasCheckedCertificate 13 8 ([[], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover144 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1], HasCheckedCertificate 13 8 ([[], [1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p49, Certificates.k13t8p49_check⟩ + +private theorem k13t8_cover145 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2], HasCheckedCertificate 13 8 ([[], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover146 : ∀ P ∈ pathPatterns 2 1 [1, 2], HasCheckedCertificate 13 8 ([[], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t8_cover147 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1], HasCheckedCertificate 13 8 ([[], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover148 : ∀ P ∈ pathPatterns 2 0 [1, 3], HasCheckedCertificate 13 8 ([[], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover150 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 13 8 ([[], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover149 : ∀ P ∈ pathPatterns 3 2 [2], HasCheckedCertificate 13 8 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t8_cover150 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover151 : ∀ P ∈ pathPatterns 2 0 [2, 2], HasCheckedCertificate 13 8 ([[], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover152 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 13 8 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover153 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 13 8 ([[], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover134 : ∀ P ∈ pathPatterns 5 4 [1], HasCheckedCertificate 13 8 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover135 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover141 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover143 + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover144 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover145 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover146 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover147 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover148 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover149 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover151 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover152 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover153 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover155 : ∀ P ∈ pathPatterns 1 1 [1, 1], HasCheckedCertificate 13 8 ([[], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover156 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1], HasCheckedCertificate 13 8 ([[], [1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p50, Certificates.k13t8p50_check⟩ + +private theorem k13t8_cover157 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 13 8 ([[], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover158 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 13 8 ([[], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t8_cover159 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 13 8 ([[], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover154 : ∀ P ∈ pathPatterns 4 3 [1, 1], HasCheckedCertificate 13 8 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover155 + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover156 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover157 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover158 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover159 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover161 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 13 8 ([[], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover160 : ∀ P ∈ pathPatterns 3 2 [1, 1, 1], HasCheckedCertificate 13 8 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k13t8_cover161 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover162 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 1], HasCheckedCertificate 13 8 ([[], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t8_cover163 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 1], HasCheckedCertificate 13 8 ([[], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover164 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 2], HasCheckedCertificate 13 8 ([[], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover165 : ∀ P ∈ pathPatterns 3 1 [1, 1, 2], HasCheckedCertificate 13 8 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover166 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 1], HasCheckedCertificate 13 8 ([[], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover167 : ∀ P ∈ pathPatterns 3 0 [1, 1, 3], HasCheckedCertificate 13 8 ([[], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover169 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 13 8 ([[], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover168 : ∀ P ∈ pathPatterns 4 2 [1, 2], HasCheckedCertificate 13 8 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover169 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover170 : ∀ P ∈ pathPatterns 3 1 [1, 2, 1], HasCheckedCertificate 13 8 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover171 : ∀ P ∈ pathPatterns 3 0 [1, 2, 2], HasCheckedCertificate 13 8 ([[], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover172 : ∀ P ∈ pathPatterns 4 1 [1, 3], HasCheckedCertificate 13 8 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover173 : ∀ P ∈ pathPatterns 3 0 [1, 3, 1], HasCheckedCertificate 13 8 ([[], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover174 : ∀ P ∈ pathPatterns 4 0 [1, 4], HasCheckedCertificate 13 8 ([[], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover176 : ∀ P ∈ pathPatterns 3 1 [2], HasCheckedCertificate 13 8 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover177 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 13 8 ([[], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover175 : ∀ P ∈ pathPatterns 5 3 [2], HasCheckedCertificate 13 8 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover176 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover177 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover178 : ∀ P ∈ pathPatterns 3 0 [2, 1, 2], HasCheckedCertificate 13 8 ([[], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover179 : ∀ P ∈ pathPatterns 4 1 [2, 2], HasCheckedCertificate 13 8 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover180 : ∀ P ∈ pathPatterns 4 0 [2, 3], HasCheckedCertificate 13 8 ([[], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover181 : ∀ P ∈ pathPatterns 5 2 [3], HasCheckedCertificate 13 8 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover182 : ∀ P ∈ pathPatterns 5 1 [4], HasCheckedCertificate 13 8 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover183 : ∀ P ∈ pathPatterns 5 0 [5], HasCheckedCertificate 13 8 ([[], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_seq4 : amountSequenceForall 6 5 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 8 ([[]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t8_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover134 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover154 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover160 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover162 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover163 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover164 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover165 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover166 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover167 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover168 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover170 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover171 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover172 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover173 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover174 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover175 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover178 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover179 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover180 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover181 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover182 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover183 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover3 : ∀ P ∈ pathPatterns 7 5 [], HasCheckedCertificate 13 8 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact k13t8_seq4 + + +private theorem k13t8_cover187 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 13 8 ([[1], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p51, Certificates.k13t8p51_check⟩ + +private theorem k13t8_cover188 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 13 8 ([[1], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p52, Certificates.k13t8p52_check⟩ + +private theorem k13t8_cover186 : ∀ P ∈ pathPatterns 2 2 [1], HasCheckedCertificate 13 8 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover187 + · exact by + intro _ + exact k13t8_cover188 + +private theorem k13t8_cover189 : ∀ P ∈ pathPatterns 1 1 [1, 1], HasCheckedCertificate 13 8 ([[1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover190 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1], HasCheckedCertificate 13 8 ([[1], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p53, Certificates.k13t8p53_check⟩ + +private theorem k13t8_cover191 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 13 8 ([[1], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover192 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 13 8 ([[1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t8_cover193 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 13 8 ([[1], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover185 : ∀ P ∈ pathPatterns 4 3 [1], HasCheckedCertificate 13 8 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover186 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover189 + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover190 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover191 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover192 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover193 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover195 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 13 8 ([[1], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k13t8p54, Certificates.k13t8p54_check⟩ + +private theorem k13t8_cover196 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 13 8 ([[1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover194 : ∀ P ∈ pathPatterns 3 2 [1, 1], HasCheckedCertificate 13 8 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k13t8_cover195 + · exact by + constructor + · exact by + intro _ + exact k13t8_cover196 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover197 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1], HasCheckedCertificate 13 8 ([[1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t8_cover198 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1], HasCheckedCertificate 13 8 ([[1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover199 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2], HasCheckedCertificate 13 8 ([[1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover200 : ∀ P ∈ pathPatterns 3 1 [1, 2], HasCheckedCertificate 13 8 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover201 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1], HasCheckedCertificate 13 8 ([[1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover202 : ∀ P ∈ pathPatterns 3 0 [1, 3], HasCheckedCertificate 13 8 ([[1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover204 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 13 8 ([[1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover203 : ∀ P ∈ pathPatterns 4 2 [2], HasCheckedCertificate 13 8 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover204 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover205 : ∀ P ∈ pathPatterns 3 0 [2, 2], HasCheckedCertificate 13 8 ([[1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover206 : ∀ P ∈ pathPatterns 4 1 [3], HasCheckedCertificate 13 8 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover207 : ∀ P ∈ pathPatterns 4 0 [4], HasCheckedCertificate 13 8 ([[1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover184 : ∀ P ∈ pathPatterns 6 4 [1], HasCheckedCertificate 13 8 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover185 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover194 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover197 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover198 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover199 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover200 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover201 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover202 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover203 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover205 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover206 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover207 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover209 : ∀ P ∈ pathPatterns 2 1 [1, 1], HasCheckedCertificate 13 8 ([[1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k13t8_cover210 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1], HasCheckedCertificate 13 8 ([[1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k13t8_cover211 : ∀ P ∈ pathPatterns 2 0 [1, 2], HasCheckedCertificate 13 8 ([[1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover212 : ∀ P ∈ pathPatterns 3 1 [2], HasCheckedCertificate 13 8 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover213 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 13 8 ([[1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover208 : ∀ P ∈ pathPatterns 5 3 [1, 1], HasCheckedCertificate 13 8 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover209 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover210 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover211 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover212 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover213 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover215 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 13 8 ([[1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover214 : ∀ P ∈ pathPatterns 4 2 [1, 1, 1], HasCheckedCertificate 13 8 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover215 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover216 : ∀ P ∈ pathPatterns 3 1 [1, 1, 1, 1], HasCheckedCertificate 13 8 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover217 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 1, 1], HasCheckedCertificate 13 8 ([[1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover218 : ∀ P ∈ pathPatterns 3 0 [1, 1, 1, 2], HasCheckedCertificate 13 8 ([[1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover219 : ∀ P ∈ pathPatterns 4 1 [1, 1, 2], HasCheckedCertificate 13 8 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover220 : ∀ P ∈ pathPatterns 3 0 [1, 1, 2, 1], HasCheckedCertificate 13 8 ([[1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover221 : ∀ P ∈ pathPatterns 4 0 [1, 1, 3], HasCheckedCertificate 13 8 ([[1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover223 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 13 8 ([[1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover222 : ∀ P ∈ pathPatterns 5 2 [1, 2], HasCheckedCertificate 13 8 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover223 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover224 : ∀ P ∈ pathPatterns 4 1 [1, 2, 1], HasCheckedCertificate 13 8 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover225 : ∀ P ∈ pathPatterns 4 0 [1, 2, 2], HasCheckedCertificate 13 8 ([[1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover226 : ∀ P ∈ pathPatterns 5 1 [1, 3], HasCheckedCertificate 13 8 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover227 : ∀ P ∈ pathPatterns 4 0 [1, 3, 1], HasCheckedCertificate 13 8 ([[1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover228 : ∀ P ∈ pathPatterns 5 0 [1, 4], HasCheckedCertificate 13 8 ([[1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover230 : ∀ P ∈ pathPatterns 4 1 [2], HasCheckedCertificate 13 8 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover231 : ∀ P ∈ pathPatterns 4 0 [3], HasCheckedCertificate 13 8 ([[2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover229 : ∀ P ∈ pathPatterns 6 3 [2], HasCheckedCertificate 13 8 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover230 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover231 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover232 : ∀ P ∈ pathPatterns 4 0 [2, 1, 2], HasCheckedCertificate 13 8 ([[2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover233 : ∀ P ∈ pathPatterns 5 1 [2, 2], HasCheckedCertificate 13 8 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover234 : ∀ P ∈ pathPatterns 5 0 [2, 3], HasCheckedCertificate 13 8 ([[2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover235 : ∀ P ∈ pathPatterns 6 2 [3], HasCheckedCertificate 13 8 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover236 : ∀ P ∈ pathPatterns 6 1 [4], HasCheckedCertificate 13 8 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover237 : ∀ P ∈ pathPatterns 6 0 [5], HasCheckedCertificate 13 8 ([[5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k13t8_seq2 : amountSequenceForall 7 5 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 13 8 ([] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k13t8_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover184 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover208 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover214 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover216 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover217 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover218 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover219 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover220 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover221 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover222 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover224 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover225 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover226 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover227 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover228 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover229 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover232 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover233 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover234 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover235 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover236 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k13t8_cover237 + · intro q + exact Fin.elim0 q + +private theorem k13t8_cover1 : ∀ P ∈ pathPatterns 8 5 [], HasCheckedCertificate 13 8 ([] ++ P) := by + apply pathPatterns_forall_step + exact k13t8_seq2 + + +theorem coverage_k13_t8 : + ∀ P ∈ pathPatterns 8 5, HasCheckedCertificate 13 8 P := + k13t8_cover1 + +end CycleClique.Construction.CertifiedCoverage + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK14.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK14.lean new file mode 100644 index 0000000000000000000000000000000000000000..6851d3b2f596a88f0e66c7968a00ce37518ac2e2 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK14.lean @@ -0,0 +1,16918 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK14 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage + +namespace OAI + +namespace CycleClique.Construction.CertifiedCoverage + +private theorem k14t7_cover13 : ∀ P ∈ pathPatterns 0 7 [], HasCheckedCertificate 14 7 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p0, Certificates.k14t7p0_check⟩ + +private theorem k14t7_cover12 : ∀ P ∈ pathPatterns 1 7 [], HasCheckedCertificate 14 7 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k14t7_cover13 + +private theorem k14t7_cover14 : ∀ P ∈ pathPatterns 0 6 [1], HasCheckedCertificate 14 7 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p1, Certificates.k14t7p1_check⟩ + +private theorem k14t7_cover15 : ∀ P ∈ pathPatterns 0 5 [2], HasCheckedCertificate 14 7 ([[], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p2, Certificates.k14t7p2_check⟩ + +private theorem k14t7_cover16 : ∀ P ∈ pathPatterns 0 4 [3], HasCheckedCertificate 14 7 ([[], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p3, Certificates.k14t7p3_check⟩ + +private theorem k14t7_cover17 : ∀ P ∈ pathPatterns 0 3 [4], HasCheckedCertificate 14 7 ([[], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p4, Certificates.k14t7p4_check⟩ + +private theorem k14t7_cover18 : ∀ P ∈ pathPatterns 0 2 [5], HasCheckedCertificate 14 7 ([[], [], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p5, Certificates.k14t7p5_check⟩ + +private theorem k14t7_cover19 : ∀ P ∈ pathPatterns 0 1 [6], HasCheckedCertificate 14 7 ([[], [], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p6, Certificates.k14t7p6_check⟩ + +private theorem k14t7_cover20 : ∀ P ∈ pathPatterns 0 0 [7], HasCheckedCertificate 14 7 ([[], [], [], [], [], [7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p7, Certificates.k14t7p7_check⟩ + +private theorem k14t7_cover11 : ∀ P ∈ pathPatterns 2 7 [], HasCheckedCertificate 14 7 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k14t7_cover12 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover14 + · exact by + intro _ + exact k14t7_cover15 + · exact by + intro _ + exact k14t7_cover16 + · exact by + intro _ + exact k14t7_cover17 + · exact by + intro _ + exact k14t7_cover18 + · exact by + intro _ + exact k14t7_cover19 + · exact by + intro _ + exact k14t7_cover20 + +private theorem k14t7_cover21 : ∀ P ∈ pathPatterns 1 6 [1], HasCheckedCertificate 14 7 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover22 : ∀ P ∈ pathPatterns 0 5 [1, 1], HasCheckedCertificate 14 7 ([[], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p8, Certificates.k14t7p8_check⟩ + +private theorem k14t7_cover23 : ∀ P ∈ pathPatterns 0 4 [1, 2], HasCheckedCertificate 14 7 ([[], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p9, Certificates.k14t7p9_check⟩ + +private theorem k14t7_cover24 : ∀ P ∈ pathPatterns 0 3 [1, 3], HasCheckedCertificate 14 7 ([[], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p10, Certificates.k14t7p10_check⟩ + +private theorem k14t7_cover25 : ∀ P ∈ pathPatterns 0 2 [1, 4], HasCheckedCertificate 14 7 ([[], [], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p11, Certificates.k14t7p11_check⟩ + +private theorem k14t7_cover26 : ∀ P ∈ pathPatterns 0 1 [1, 5], HasCheckedCertificate 14 7 ([[], [], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p12, Certificates.k14t7p12_check⟩ + +private theorem k14t7_cover27 : ∀ P ∈ pathPatterns 0 0 [1, 6], HasCheckedCertificate 14 7 ([[], [], [], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p13, Certificates.k14t7p13_check⟩ + +private theorem k14t7_cover28 : ∀ P ∈ pathPatterns 1 5 [2], HasCheckedCertificate 14 7 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover29 : ∀ P ∈ pathPatterns 0 3 [2, 2], HasCheckedCertificate 14 7 ([[], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p14, Certificates.k14t7p14_check⟩ + +private theorem k14t7_cover30 : ∀ P ∈ pathPatterns 0 2 [2, 3], HasCheckedCertificate 14 7 ([[], [], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p15, Certificates.k14t7p15_check⟩ + +private theorem k14t7_cover31 : ∀ P ∈ pathPatterns 0 1 [2, 4], HasCheckedCertificate 14 7 ([[], [], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p16, Certificates.k14t7p16_check⟩ + +private theorem k14t7_cover32 : ∀ P ∈ pathPatterns 0 0 [2, 5], HasCheckedCertificate 14 7 ([[], [], [], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p17, Certificates.k14t7p17_check⟩ + +private theorem k14t7_cover33 : ∀ P ∈ pathPatterns 1 4 [3], HasCheckedCertificate 14 7 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover34 : ∀ P ∈ pathPatterns 0 1 [3, 3], HasCheckedCertificate 14 7 ([[], [], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p18, Certificates.k14t7p18_check⟩ + +private theorem k14t7_cover35 : ∀ P ∈ pathPatterns 0 0 [3, 4], HasCheckedCertificate 14 7 ([[], [], [], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p19, Certificates.k14t7p19_check⟩ + +private theorem k14t7_cover36 : ∀ P ∈ pathPatterns 1 3 [4], HasCheckedCertificate 14 7 ([[], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover37 : ∀ P ∈ pathPatterns 1 2 [5], HasCheckedCertificate 14 7 ([[], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover38 : ∀ P ∈ pathPatterns 1 1 [6], HasCheckedCertificate 14 7 ([[], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover39 : ∀ P ∈ pathPatterns 1 0 [7], HasCheckedCertificate 14 7 ([[], [], [], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + +private theorem k14t7_seq10 : amountSequenceForall 2 7 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (2 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 7 ([[], [], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t7_cover11 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover21 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover22 + · exact by + intro _ + exact k14t7_cover23 + · exact by + intro _ + exact k14t7_cover24 + · exact by + intro _ + exact k14t7_cover25 + · exact by + intro _ + exact k14t7_cover26 + · exact by + intro _ + exact k14t7_cover27 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover28 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k14t7_cover29 + · exact by + intro _ + exact k14t7_cover30 + · exact by + intro _ + exact k14t7_cover31 + · exact by + intro _ + exact k14t7_cover32 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover33 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k14t7_cover34 + · exact by + intro _ + exact k14t7_cover35 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover36 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover37 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover38 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover39 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover9 : ∀ P ∈ pathPatterns 3 7 [], HasCheckedCertificate 14 7 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k14t7_seq10 + + +private theorem k14t7_cover41 : ∀ P ∈ pathPatterns 0 5 [1], HasCheckedCertificate 14 7 ([[], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p20, Certificates.k14t7p20_check⟩ + +private theorem k14t7_cover42 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 14 7 ([[], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p21, Certificates.k14t7p21_check⟩ + +private theorem k14t7_cover43 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 14 7 ([[], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p22, Certificates.k14t7p22_check⟩ + +private theorem k14t7_cover44 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 14 7 ([[], [], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p23, Certificates.k14t7p23_check⟩ + +private theorem k14t7_cover45 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 14 7 ([[], [], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p24, Certificates.k14t7p24_check⟩ + +private theorem k14t7_cover46 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 14 7 ([[], [], [], [1], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p25, Certificates.k14t7p25_check⟩ + +private theorem k14t7_cover40 : ∀ P ∈ pathPatterns 2 6 [1], HasCheckedCertificate 14 7 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover41 + · exact by + intro _ + exact k14t7_cover42 + · exact by + intro _ + exact k14t7_cover43 + · exact by + intro _ + exact k14t7_cover44 + · exact by + intro _ + exact k14t7_cover45 + · exact by + intro _ + exact k14t7_cover46 + +private theorem k14t7_cover47 : ∀ P ∈ pathPatterns 1 5 [1, 1], HasCheckedCertificate 14 7 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover48 : ∀ P ∈ pathPatterns 0 4 [1, 1, 1], HasCheckedCertificate 14 7 ([[], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p26, Certificates.k14t7p26_check⟩ + +private theorem k14t7_cover49 : ∀ P ∈ pathPatterns 0 3 [1, 1, 2], HasCheckedCertificate 14 7 ([[], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p27, Certificates.k14t7p27_check⟩ + +private theorem k14t7_cover50 : ∀ P ∈ pathPatterns 0 2 [1, 1, 3], HasCheckedCertificate 14 7 ([[], [], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p28, Certificates.k14t7p28_check⟩ + +private theorem k14t7_cover51 : ∀ P ∈ pathPatterns 0 1 [1, 1, 4], HasCheckedCertificate 14 7 ([[], [], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p29, Certificates.k14t7p29_check⟩ + +private theorem k14t7_cover52 : ∀ P ∈ pathPatterns 0 0 [1, 1, 5], HasCheckedCertificate 14 7 ([[], [], [], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p30, Certificates.k14t7p30_check⟩ + +private theorem k14t7_cover53 : ∀ P ∈ pathPatterns 1 4 [1, 2], HasCheckedCertificate 14 7 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover54 : ∀ P ∈ pathPatterns 0 3 [1, 2, 1], HasCheckedCertificate 14 7 ([[], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p31, Certificates.k14t7p31_check⟩ + +private theorem k14t7_cover55 : ∀ P ∈ pathPatterns 0 2 [1, 2, 2], HasCheckedCertificate 14 7 ([[], [], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p32, Certificates.k14t7p32_check⟩ + +private theorem k14t7_cover56 : ∀ P ∈ pathPatterns 0 1 [1, 2, 3], HasCheckedCertificate 14 7 ([[], [], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p33, Certificates.k14t7p33_check⟩ + +private theorem k14t7_cover57 : ∀ P ∈ pathPatterns 0 0 [1, 2, 4], HasCheckedCertificate 14 7 ([[], [], [], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p34, Certificates.k14t7p34_check⟩ + +private theorem k14t7_cover58 : ∀ P ∈ pathPatterns 1 3 [1, 3], HasCheckedCertificate 14 7 ([[], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover59 : ∀ P ∈ pathPatterns 0 2 [1, 3, 1], HasCheckedCertificate 14 7 ([[], [], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p35, Certificates.k14t7p35_check⟩ + +private theorem k14t7_cover60 : ∀ P ∈ pathPatterns 0 1 [1, 3, 2], HasCheckedCertificate 14 7 ([[], [], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p36, Certificates.k14t7p36_check⟩ + +private theorem k14t7_cover61 : ∀ P ∈ pathPatterns 0 0 [1, 3, 3], HasCheckedCertificate 14 7 ([[], [], [], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p37, Certificates.k14t7p37_check⟩ + +private theorem k14t7_cover62 : ∀ P ∈ pathPatterns 1 2 [1, 4], HasCheckedCertificate 14 7 ([[], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover63 : ∀ P ∈ pathPatterns 0 1 [1, 4, 1], HasCheckedCertificate 14 7 ([[], [], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p38, Certificates.k14t7p38_check⟩ + +private theorem k14t7_cover64 : ∀ P ∈ pathPatterns 0 0 [1, 4, 2], HasCheckedCertificate 14 7 ([[], [], [], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p39, Certificates.k14t7p39_check⟩ + +private theorem k14t7_cover65 : ∀ P ∈ pathPatterns 1 1 [1, 5], HasCheckedCertificate 14 7 ([[], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover66 : ∀ P ∈ pathPatterns 0 0 [1, 5, 1], HasCheckedCertificate 14 7 ([[], [], [], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p40, Certificates.k14t7p40_check⟩ + +private theorem k14t7_cover67 : ∀ P ∈ pathPatterns 1 0 [1, 6], HasCheckedCertificate 14 7 ([[], [], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover69 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 14 7 ([[], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p41, Certificates.k14t7p41_check⟩ + +private theorem k14t7_cover70 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 14 7 ([[], [], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p42, Certificates.k14t7p42_check⟩ + +private theorem k14t7_cover71 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 14 7 ([[], [], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p43, Certificates.k14t7p43_check⟩ + +private theorem k14t7_cover72 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 14 7 ([[], [], [], [2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p44, Certificates.k14t7p44_check⟩ + +private theorem k14t7_cover68 : ∀ P ∈ pathPatterns 2 5 [2], HasCheckedCertificate 14 7 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover69 + · exact by + intro _ + exact k14t7_cover70 + · exact by + intro _ + exact k14t7_cover71 + · exact by + intro _ + exact k14t7_cover72 + +private theorem k14t7_cover73 : ∀ P ∈ pathPatterns 0 2 [2, 1, 2], HasCheckedCertificate 14 7 ([[], [], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p45, Certificates.k14t7p45_check⟩ + +private theorem k14t7_cover74 : ∀ P ∈ pathPatterns 0 1 [2, 1, 3], HasCheckedCertificate 14 7 ([[], [], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p46, Certificates.k14t7p46_check⟩ + +private theorem k14t7_cover75 : ∀ P ∈ pathPatterns 0 0 [2, 1, 4], HasCheckedCertificate 14 7 ([[], [], [], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p47, Certificates.k14t7p47_check⟩ + +private theorem k14t7_cover76 : ∀ P ∈ pathPatterns 1 3 [2, 2], HasCheckedCertificate 14 7 ([[], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover77 : ∀ P ∈ pathPatterns 0 1 [2, 2, 2], HasCheckedCertificate 14 7 ([[], [], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p48, Certificates.k14t7p48_check⟩ + +private theorem k14t7_cover78 : ∀ P ∈ pathPatterns 0 0 [2, 2, 3], HasCheckedCertificate 14 7 ([[], [], [], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p49, Certificates.k14t7p49_check⟩ + +private theorem k14t7_cover79 : ∀ P ∈ pathPatterns 1 2 [2, 3], HasCheckedCertificate 14 7 ([[], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover80 : ∀ P ∈ pathPatterns 0 0 [2, 3, 2], HasCheckedCertificate 14 7 ([[], [], [], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p50, Certificates.k14t7p50_check⟩ + +private theorem k14t7_cover81 : ∀ P ∈ pathPatterns 1 1 [2, 4], HasCheckedCertificate 14 7 ([[], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover82 : ∀ P ∈ pathPatterns 1 0 [2, 5], HasCheckedCertificate 14 7 ([[], [], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover84 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 14 7 ([[], [], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p51, Certificates.k14t7p51_check⟩ + +private theorem k14t7_cover85 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 14 7 ([[], [], [], [3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p52, Certificates.k14t7p52_check⟩ + +private theorem k14t7_cover83 : ∀ P ∈ pathPatterns 2 4 [3], HasCheckedCertificate 14 7 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k14t7_cover84 + · exact by + intro _ + exact k14t7_cover85 + +private theorem k14t7_cover86 : ∀ P ∈ pathPatterns 0 0 [3, 1, 3], HasCheckedCertificate 14 7 ([[], [], [], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p53, Certificates.k14t7p53_check⟩ + +private theorem k14t7_cover87 : ∀ P ∈ pathPatterns 1 1 [3, 3], HasCheckedCertificate 14 7 ([[], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover88 : ∀ P ∈ pathPatterns 1 0 [3, 4], HasCheckedCertificate 14 7 ([[], [], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover89 : ∀ P ∈ pathPatterns 2 3 [4], HasCheckedCertificate 14 7 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + +private theorem k14t7_cover90 : ∀ P ∈ pathPatterns 2 2 [5], HasCheckedCertificate 14 7 ([[], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + +private theorem k14t7_cover91 : ∀ P ∈ pathPatterns 2 1 [6], HasCheckedCertificate 14 7 ([[], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover92 : ∀ P ∈ pathPatterns 2 0 [7], HasCheckedCertificate 14 7 ([[], [], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq8 : amountSequenceForall 3 7 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 7 ([[], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t7_cover9 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover40 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover47 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover48 + · exact by + intro _ + exact k14t7_cover49 + · exact by + intro _ + exact k14t7_cover50 + · exact by + intro _ + exact k14t7_cover51 + · exact by + intro _ + exact k14t7_cover52 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover53 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover54 + · exact by + intro _ + exact k14t7_cover55 + · exact by + intro _ + exact k14t7_cover56 + · exact by + intro _ + exact k14t7_cover57 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover58 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover59 + · exact by + intro _ + exact k14t7_cover60 + · exact by + intro _ + exact k14t7_cover61 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover62 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover63 + · exact by + intro _ + exact k14t7_cover64 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover65 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover66 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover67 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover68 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k14t7_cover73 + · exact by + intro _ + exact k14t7_cover74 + · exact by + intro _ + exact k14t7_cover75 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover76 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k14t7_cover77 + · exact by + intro _ + exact k14t7_cover78 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover79 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + intro _ + exact k14t7_cover80 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover81 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover82 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover83 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + intro _ + exact k14t7_cover86 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover87 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover88 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover89 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover90 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover91 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover92 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover7 : ∀ P ∈ pathPatterns 4 7 [], HasCheckedCertificate 14 7 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k14t7_seq8 + + +private theorem k14t7_cover95 : ∀ P ∈ pathPatterns 1 5 [1], HasCheckedCertificate 14 7 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover96 : ∀ P ∈ pathPatterns 0 4 [1, 1], HasCheckedCertificate 14 7 ([[], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p54, Certificates.k14t7p54_check⟩ + +private theorem k14t7_cover97 : ∀ P ∈ pathPatterns 0 3 [1, 2], HasCheckedCertificate 14 7 ([[], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p55, Certificates.k14t7p55_check⟩ + +private theorem k14t7_cover98 : ∀ P ∈ pathPatterns 0 2 [1, 3], HasCheckedCertificate 14 7 ([[], [], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p56, Certificates.k14t7p56_check⟩ + +private theorem k14t7_cover99 : ∀ P ∈ pathPatterns 0 1 [1, 4], HasCheckedCertificate 14 7 ([[], [], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p57, Certificates.k14t7p57_check⟩ + +private theorem k14t7_cover100 : ∀ P ∈ pathPatterns 0 0 [1, 5], HasCheckedCertificate 14 7 ([[], [], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p58, Certificates.k14t7p58_check⟩ + +private theorem k14t7_cover101 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 14 7 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover102 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 14 7 ([[], [], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p59, Certificates.k14t7p59_check⟩ + +private theorem k14t7_cover103 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 14 7 ([[], [], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p60, Certificates.k14t7p60_check⟩ + +private theorem k14t7_cover104 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 14 7 ([[], [], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p61, Certificates.k14t7p61_check⟩ + +private theorem k14t7_cover105 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 14 7 ([[], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover106 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 14 7 ([[], [], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p62, Certificates.k14t7p62_check⟩ + +private theorem k14t7_cover107 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 14 7 ([[], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover108 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 14 7 ([[], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover109 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 14 7 ([[], [], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover94 : ∀ P ∈ pathPatterns 3 6 [1], HasCheckedCertificate 14 7 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover95 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover96 + · exact by + intro _ + exact k14t7_cover97 + · exact by + intro _ + exact k14t7_cover98 + · exact by + intro _ + exact k14t7_cover99 + · exact by + intro _ + exact k14t7_cover100 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover101 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k14t7_cover102 + · exact by + intro _ + exact k14t7_cover103 + · exact by + intro _ + exact k14t7_cover104 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover105 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k14t7_cover106 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover107 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover108 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover109 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover111 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 14 7 ([[], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p63, Certificates.k14t7p63_check⟩ + +private theorem k14t7_cover112 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 14 7 ([[], [], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p64, Certificates.k14t7p64_check⟩ + +private theorem k14t7_cover113 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 14 7 ([[], [], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p65, Certificates.k14t7p65_check⟩ + +private theorem k14t7_cover114 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 14 7 ([[], [], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p66, Certificates.k14t7p66_check⟩ + +private theorem k14t7_cover110 : ∀ P ∈ pathPatterns 2 5 [1, 1], HasCheckedCertificate 14 7 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover111 + · exact by + intro _ + exact k14t7_cover112 + · exact by + intro _ + exact k14t7_cover113 + · exact by + intro _ + exact k14t7_cover114 + +private theorem k14t7_cover115 : ∀ P ∈ pathPatterns 1 4 [1, 1, 1], HasCheckedCertificate 14 7 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover116 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 1], HasCheckedCertificate 14 7 ([[], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p67, Certificates.k14t7p67_check⟩ + +private theorem k14t7_cover117 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 2], HasCheckedCertificate 14 7 ([[], [], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p68, Certificates.k14t7p68_check⟩ + +private theorem k14t7_cover118 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 3], HasCheckedCertificate 14 7 ([[], [], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p69, Certificates.k14t7p69_check⟩ + +private theorem k14t7_cover119 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 4], HasCheckedCertificate 14 7 ([[], [], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p70, Certificates.k14t7p70_check⟩ + +private theorem k14t7_cover120 : ∀ P ∈ pathPatterns 1 3 [1, 1, 2], HasCheckedCertificate 14 7 ([[], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover121 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2, 1], HasCheckedCertificate 14 7 ([[], [], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p71, Certificates.k14t7p71_check⟩ + +private theorem k14t7_cover122 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 2], HasCheckedCertificate 14 7 ([[], [], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p72, Certificates.k14t7p72_check⟩ + +private theorem k14t7_cover123 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 3], HasCheckedCertificate 14 7 ([[], [], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p73, Certificates.k14t7p73_check⟩ + +private theorem k14t7_cover124 : ∀ P ∈ pathPatterns 1 2 [1, 1, 3], HasCheckedCertificate 14 7 ([[], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover125 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3, 1], HasCheckedCertificate 14 7 ([[], [], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p74, Certificates.k14t7p74_check⟩ + +private theorem k14t7_cover126 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 2], HasCheckedCertificate 14 7 ([[], [], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p75, Certificates.k14t7p75_check⟩ + +private theorem k14t7_cover127 : ∀ P ∈ pathPatterns 1 1 [1, 1, 4], HasCheckedCertificate 14 7 ([[], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover128 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4, 1], HasCheckedCertificate 14 7 ([[], [], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p76, Certificates.k14t7p76_check⟩ + +private theorem k14t7_cover129 : ∀ P ∈ pathPatterns 1 0 [1, 1, 5], HasCheckedCertificate 14 7 ([[], [], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover131 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 14 7 ([[], [], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p77, Certificates.k14t7p77_check⟩ + +private theorem k14t7_cover132 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 14 7 ([[], [], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p78, Certificates.k14t7p78_check⟩ + +private theorem k14t7_cover133 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 14 7 ([[], [], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p79, Certificates.k14t7p79_check⟩ + +private theorem k14t7_cover130 : ∀ P ∈ pathPatterns 2 4 [1, 2], HasCheckedCertificate 14 7 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover131 + · exact by + intro _ + exact k14t7_cover132 + · exact by + intro _ + exact k14t7_cover133 + +private theorem k14t7_cover134 : ∀ P ∈ pathPatterns 1 3 [1, 2, 1], HasCheckedCertificate 14 7 ([[], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover135 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 2], HasCheckedCertificate 14 7 ([[], [], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p80, Certificates.k14t7p80_check⟩ + +private theorem k14t7_cover136 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 3], HasCheckedCertificate 14 7 ([[], [], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p81, Certificates.k14t7p81_check⟩ + +private theorem k14t7_cover137 : ∀ P ∈ pathPatterns 1 2 [1, 2, 2], HasCheckedCertificate 14 7 ([[], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover138 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2, 1], HasCheckedCertificate 14 7 ([[], [], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p82, Certificates.k14t7p82_check⟩ + +private theorem k14t7_cover139 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 2], HasCheckedCertificate 14 7 ([[], [], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p83, Certificates.k14t7p83_check⟩ + +private theorem k14t7_cover140 : ∀ P ∈ pathPatterns 1 1 [1, 2, 3], HasCheckedCertificate 14 7 ([[], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover141 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3, 1], HasCheckedCertificate 14 7 ([[], [], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p84, Certificates.k14t7p84_check⟩ + +private theorem k14t7_cover142 : ∀ P ∈ pathPatterns 1 0 [1, 2, 4], HasCheckedCertificate 14 7 ([[], [], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover144 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 14 7 ([[], [], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p85, Certificates.k14t7p85_check⟩ + +private theorem k14t7_cover145 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 14 7 ([[], [], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p86, Certificates.k14t7p86_check⟩ + +private theorem k14t7_cover143 : ∀ P ∈ pathPatterns 2 3 [1, 3], HasCheckedCertificate 14 7 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover144 + · exact by + intro _ + exact k14t7_cover145 + +private theorem k14t7_cover146 : ∀ P ∈ pathPatterns 1 2 [1, 3, 1], HasCheckedCertificate 14 7 ([[], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover147 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 2], HasCheckedCertificate 14 7 ([[], [], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p87, Certificates.k14t7p87_check⟩ + +private theorem k14t7_cover148 : ∀ P ∈ pathPatterns 1 1 [1, 3, 2], HasCheckedCertificate 14 7 ([[], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover149 : ∀ P ∈ pathPatterns 1 0 [1, 3, 3], HasCheckedCertificate 14 7 ([[], [], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover151 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 7 ([[], [], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p88, Certificates.k14t7p88_check⟩ + +private theorem k14t7_cover150 : ∀ P ∈ pathPatterns 2 2 [1, 4], HasCheckedCertificate 14 7 ([[], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover151 + +private theorem k14t7_cover152 : ∀ P ∈ pathPatterns 1 1 [1, 4, 1], HasCheckedCertificate 14 7 ([[], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover153 : ∀ P ∈ pathPatterns 1 0 [1, 4, 2], HasCheckedCertificate 14 7 ([[], [], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover154 : ∀ P ∈ pathPatterns 2 1 [1, 5], HasCheckedCertificate 14 7 ([[], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover155 : ∀ P ∈ pathPatterns 1 0 [1, 5, 1], HasCheckedCertificate 14 7 ([[], [], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover156 : ∀ P ∈ pathPatterns 2 0 [1, 6], HasCheckedCertificate 14 7 ([[], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq93 : amountSequenceForall 3 6 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (7 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 14 7 ([[], []] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t7_cover94 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover110 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover115 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover116 + · exact by + intro _ + exact k14t7_cover117 + · exact by + intro _ + exact k14t7_cover118 + · exact by + intro _ + exact k14t7_cover119 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover120 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover121 + · exact by + intro _ + exact k14t7_cover122 + · exact by + intro _ + exact k14t7_cover123 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover124 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover125 + · exact by + intro _ + exact k14t7_cover126 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover127 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover128 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover129 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover130 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover134 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k14t7_cover135 + · exact by + intro _ + exact k14t7_cover136 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover137 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover138 + · exact by + intro _ + exact k14t7_cover139 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover140 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover141 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover142 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover143 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover146 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + intro _ + exact k14t7_cover147 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover148 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover149 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover150 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover152 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover153 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover154 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover155 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover156 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover159 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 14 7 ([[], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover160 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 14 7 ([[], [], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p89, Certificates.k14t7p89_check⟩ + +private theorem k14t7_cover161 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 14 7 ([[], [], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p90, Certificates.k14t7p90_check⟩ + +private theorem k14t7_cover162 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 14 7 ([[], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover163 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 14 7 ([[], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover164 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 14 7 ([[], [], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover158 : ∀ P ∈ pathPatterns 3 5 [2], HasCheckedCertificate 14 7 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover159 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k14t7_cover160 + · exact by + intro _ + exact k14t7_cover161 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover162 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover163 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover164 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover165 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 2], HasCheckedCertificate 14 7 ([[], [], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p91, Certificates.k14t7p91_check⟩ + +private theorem k14t7_cover166 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 3], HasCheckedCertificate 14 7 ([[], [], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p92, Certificates.k14t7p92_check⟩ + +private theorem k14t7_cover167 : ∀ P ∈ pathPatterns 1 2 [2, 1, 2], HasCheckedCertificate 14 7 ([[], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover168 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 2], HasCheckedCertificate 14 7 ([[], [], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p93, Certificates.k14t7p93_check⟩ + +private theorem k14t7_cover169 : ∀ P ∈ pathPatterns 1 1 [2, 1, 3], HasCheckedCertificate 14 7 ([[], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover170 : ∀ P ∈ pathPatterns 1 0 [2, 1, 4], HasCheckedCertificate 14 7 ([[], [], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover172 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 14 7 ([[], [], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p94, Certificates.k14t7p94_check⟩ + +private theorem k14t7_cover171 : ∀ P ∈ pathPatterns 2 3 [2, 2], HasCheckedCertificate 14 7 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k14t7_cover172 + +private theorem k14t7_cover173 : ∀ P ∈ pathPatterns 1 1 [2, 2, 2], HasCheckedCertificate 14 7 ([[], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover174 : ∀ P ∈ pathPatterns 1 0 [2, 2, 3], HasCheckedCertificate 14 7 ([[], [], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover175 : ∀ P ∈ pathPatterns 2 2 [2, 3], HasCheckedCertificate 14 7 ([[], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k14t7_cover176 : ∀ P ∈ pathPatterns 1 0 [2, 3, 2], HasCheckedCertificate 14 7 ([[], [], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover177 : ∀ P ∈ pathPatterns 2 1 [2, 4], HasCheckedCertificate 14 7 ([[], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover178 : ∀ P ∈ pathPatterns 2 0 [2, 5], HasCheckedCertificate 14 7 ([[], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq157 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([2] ++ tail).length) (7 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 14 7 ([[], []] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t7_cover158 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k14t7_cover165 + · exact by + intro _ + exact k14t7_cover166 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover167 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + intro _ + exact k14t7_cover168 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover169 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover170 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover171 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover173 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover174 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover175 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover176 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover177 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover178 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover180 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 14 7 ([[], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover181 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 14 7 ([[], [], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover179 : ∀ P ∈ pathPatterns 3 4 [3], HasCheckedCertificate 14 7 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover180 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover181 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover182 : ∀ P ∈ pathPatterns 1 0 [3, 1, 3], HasCheckedCertificate 14 7 ([[], [], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover183 : ∀ P ∈ pathPatterns 2 1 [3, 3], HasCheckedCertificate 14 7 ([[], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover184 : ∀ P ∈ pathPatterns 2 0 [3, 4], HasCheckedCertificate 14 7 ([[], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover185 : ∀ P ∈ pathPatterns 3 3 [4], HasCheckedCertificate 14 7 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover186 : ∀ P ∈ pathPatterns 3 2 [5], HasCheckedCertificate 14 7 ([[], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover187 : ∀ P ∈ pathPatterns 3 1 [6], HasCheckedCertificate 14 7 ([[], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover188 : ∀ P ∈ pathPatterns 3 0 [7], HasCheckedCertificate 14 7 ([[], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq6 : amountSequenceForall 4 7 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 7 ([[], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t7_cover7 + · intro q + fin_cases q + · exact k14t7_seq93 + + · exact k14t7_seq157 + + · exact by + constructor + · exact by + intro _ + exact k14t7_cover179 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover182 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover183 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover184 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover185 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover186 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover187 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover188 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover5 : ∀ P ∈ pathPatterns 5 7 [], HasCheckedCertificate 14 7 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact k14t7_seq6 + + +private theorem k14t7_cover193 : ∀ P ∈ pathPatterns 0 4 [1], HasCheckedCertificate 14 7 ([[], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p95, Certificates.k14t7p95_check⟩ + +private theorem k14t7_cover194 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 14 7 ([[], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p96, Certificates.k14t7p96_check⟩ + +private theorem k14t7_cover195 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 14 7 ([[], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p97, Certificates.k14t7p97_check⟩ + +private theorem k14t7_cover196 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 14 7 ([[], [1], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p98, Certificates.k14t7p98_check⟩ + +private theorem k14t7_cover197 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 14 7 ([[], [1], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p99, Certificates.k14t7p99_check⟩ + +private theorem k14t7_cover192 : ∀ P ∈ pathPatterns 2 5 [1], HasCheckedCertificate 14 7 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover193 + · exact by + intro _ + exact k14t7_cover194 + · exact by + intro _ + exact k14t7_cover195 + · exact by + intro _ + exact k14t7_cover196 + · exact by + intro _ + exact k14t7_cover197 + +private theorem k14t7_cover198 : ∀ P ∈ pathPatterns 1 4 [1, 1], HasCheckedCertificate 14 7 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover199 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1], HasCheckedCertificate 14 7 ([[], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p100, Certificates.k14t7p100_check⟩ + +private theorem k14t7_cover200 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2], HasCheckedCertificate 14 7 ([[], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p101, Certificates.k14t7p101_check⟩ + +private theorem k14t7_cover201 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3], HasCheckedCertificate 14 7 ([[], [1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p102, Certificates.k14t7p102_check⟩ + +private theorem k14t7_cover202 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4], HasCheckedCertificate 14 7 ([[], [1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p103, Certificates.k14t7p103_check⟩ + +private theorem k14t7_cover203 : ∀ P ∈ pathPatterns 1 3 [1, 2], HasCheckedCertificate 14 7 ([[], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover204 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1], HasCheckedCertificate 14 7 ([[], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p104, Certificates.k14t7p104_check⟩ + +private theorem k14t7_cover205 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2], HasCheckedCertificate 14 7 ([[], [1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p105, Certificates.k14t7p105_check⟩ + +private theorem k14t7_cover206 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3], HasCheckedCertificate 14 7 ([[], [1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p106, Certificates.k14t7p106_check⟩ + +private theorem k14t7_cover207 : ∀ P ∈ pathPatterns 1 2 [1, 3], HasCheckedCertificate 14 7 ([[], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover208 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1], HasCheckedCertificate 14 7 ([[], [1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p107, Certificates.k14t7p107_check⟩ + +private theorem k14t7_cover209 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2], HasCheckedCertificate 14 7 ([[], [1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p108, Certificates.k14t7p108_check⟩ + +private theorem k14t7_cover210 : ∀ P ∈ pathPatterns 1 1 [1, 4], HasCheckedCertificate 14 7 ([[], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover211 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1], HasCheckedCertificate 14 7 ([[], [1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p109, Certificates.k14t7p109_check⟩ + +private theorem k14t7_cover212 : ∀ P ∈ pathPatterns 1 0 [1, 5], HasCheckedCertificate 14 7 ([[], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover214 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 14 7 ([[], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p110, Certificates.k14t7p110_check⟩ + +private theorem k14t7_cover215 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 14 7 ([[], [1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p111, Certificates.k14t7p111_check⟩ + +private theorem k14t7_cover216 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 14 7 ([[], [1], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p112, Certificates.k14t7p112_check⟩ + +private theorem k14t7_cover213 : ∀ P ∈ pathPatterns 2 4 [2], HasCheckedCertificate 14 7 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover214 + · exact by + intro _ + exact k14t7_cover215 + · exact by + intro _ + exact k14t7_cover216 + +private theorem k14t7_cover217 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2], HasCheckedCertificate 14 7 ([[], [1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p113, Certificates.k14t7p113_check⟩ + +private theorem k14t7_cover218 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3], HasCheckedCertificate 14 7 ([[], [1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p114, Certificates.k14t7p114_check⟩ + +private theorem k14t7_cover219 : ∀ P ∈ pathPatterns 1 2 [2, 2], HasCheckedCertificate 14 7 ([[], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover220 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2], HasCheckedCertificate 14 7 ([[], [1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p115, Certificates.k14t7p115_check⟩ + +private theorem k14t7_cover221 : ∀ P ∈ pathPatterns 1 1 [2, 3], HasCheckedCertificate 14 7 ([[], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover222 : ∀ P ∈ pathPatterns 1 0 [2, 4], HasCheckedCertificate 14 7 ([[], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover224 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 14 7 ([[], [1], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p116, Certificates.k14t7p116_check⟩ + +private theorem k14t7_cover223 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 14 7 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k14t7_cover224 + +private theorem k14t7_cover225 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 14 7 ([[], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover226 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 14 7 ([[], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k14t7_cover227 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 14 7 ([[], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover228 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 14 7 ([[], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq191 : amountSequenceForall 3 6 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 7 ([[], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover192 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover198 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover199 + · exact by + intro _ + exact k14t7_cover200 + · exact by + intro _ + exact k14t7_cover201 + · exact by + intro _ + exact k14t7_cover202 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover203 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover204 + · exact by + intro _ + exact k14t7_cover205 + · exact by + intro _ + exact k14t7_cover206 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover207 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover208 + · exact by + intro _ + exact k14t7_cover209 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover210 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover211 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover212 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover213 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k14t7_cover217 + · exact by + intro _ + exact k14t7_cover218 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover219 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k14t7_cover220 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover221 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover222 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover223 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover225 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover226 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover227 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover228 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover190 : ∀ P ∈ pathPatterns 4 6 [1], HasCheckedCertificate 14 7 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k14t7_seq191 + + +private theorem k14t7_cover231 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 14 7 ([[], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p117, Certificates.k14t7p117_check⟩ + +private theorem k14t7_cover232 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 14 7 ([[], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p118, Certificates.k14t7p118_check⟩ + +private theorem k14t7_cover233 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 14 7 ([[], [1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p119, Certificates.k14t7p119_check⟩ + +private theorem k14t7_cover234 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 14 7 ([[], [1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p120, Certificates.k14t7p120_check⟩ + +private theorem k14t7_cover235 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 14 7 ([[], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover236 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 14 7 ([[], [1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p121, Certificates.k14t7p121_check⟩ + +private theorem k14t7_cover237 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 14 7 ([[], [1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p122, Certificates.k14t7p122_check⟩ + +private theorem k14t7_cover238 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 14 7 ([[], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover239 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 14 7 ([[], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover240 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 14 7 ([[], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover230 : ∀ P ∈ pathPatterns 3 5 [1, 1], HasCheckedCertificate 14 7 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover231 + · exact by + intro _ + exact k14t7_cover232 + · exact by + intro _ + exact k14t7_cover233 + · exact by + intro _ + exact k14t7_cover234 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover235 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k14t7_cover236 + · exact by + intro _ + exact k14t7_cover237 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover238 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover239 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover240 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover242 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 14 7 ([[], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p123, Certificates.k14t7p123_check⟩ + +private theorem k14t7_cover243 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 14 7 ([[], [1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p124, Certificates.k14t7p124_check⟩ + +private theorem k14t7_cover244 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 14 7 ([[], [1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p125, Certificates.k14t7p125_check⟩ + +private theorem k14t7_cover241 : ∀ P ∈ pathPatterns 2 4 [1, 1, 1], HasCheckedCertificate 14 7 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover242 + · exact by + intro _ + exact k14t7_cover243 + · exact by + intro _ + exact k14t7_cover244 + +private theorem k14t7_cover245 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1, 1], HasCheckedCertificate 14 7 ([[], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover246 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1, 1], HasCheckedCertificate 14 7 ([[], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p126, Certificates.k14t7p126_check⟩ + +private theorem k14t7_cover247 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 2], HasCheckedCertificate 14 7 ([[], [1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p127, Certificates.k14t7p127_check⟩ + +private theorem k14t7_cover248 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 3], HasCheckedCertificate 14 7 ([[], [1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p128, Certificates.k14t7p128_check⟩ + +private theorem k14t7_cover249 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 2], HasCheckedCertificate 14 7 ([[], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover250 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2, 1], HasCheckedCertificate 14 7 ([[], [1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p129, Certificates.k14t7p129_check⟩ + +private theorem k14t7_cover251 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 2], HasCheckedCertificate 14 7 ([[], [1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p130, Certificates.k14t7p130_check⟩ + +private theorem k14t7_cover252 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 3], HasCheckedCertificate 14 7 ([[], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover253 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3, 1], HasCheckedCertificate 14 7 ([[], [1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p131, Certificates.k14t7p131_check⟩ + +private theorem k14t7_cover254 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 4], HasCheckedCertificate 14 7 ([[], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover256 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 14 7 ([[], [1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p132, Certificates.k14t7p132_check⟩ + +private theorem k14t7_cover257 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 14 7 ([[], [1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p133, Certificates.k14t7p133_check⟩ + +private theorem k14t7_cover255 : ∀ P ∈ pathPatterns 2 3 [1, 1, 2], HasCheckedCertificate 14 7 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover256 + · exact by + intro _ + exact k14t7_cover257 + +private theorem k14t7_cover258 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2, 1], HasCheckedCertificate 14 7 ([[], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover259 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1, 1], HasCheckedCertificate 14 7 ([[], [1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p134, Certificates.k14t7p134_check⟩ + +private theorem k14t7_cover260 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 2], HasCheckedCertificate 14 7 ([[], [1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p135, Certificates.k14t7p135_check⟩ + +private theorem k14t7_cover261 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 2], HasCheckedCertificate 14 7 ([[], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover262 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2, 1], HasCheckedCertificate 14 7 ([[], [1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p136, Certificates.k14t7p136_check⟩ + +private theorem k14t7_cover263 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 3], HasCheckedCertificate 14 7 ([[], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover265 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 7 ([[], [1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p137, Certificates.k14t7p137_check⟩ + +private theorem k14t7_cover264 : ∀ P ∈ pathPatterns 2 2 [1, 1, 3], HasCheckedCertificate 14 7 ([[], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover265 + +private theorem k14t7_cover266 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3, 1], HasCheckedCertificate 14 7 ([[], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover267 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1, 1], HasCheckedCertificate 14 7 ([[], [1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p138, Certificates.k14t7p138_check⟩ + +private theorem k14t7_cover268 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 2], HasCheckedCertificate 14 7 ([[], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover269 : ∀ P ∈ pathPatterns 2 1 [1, 1, 4], HasCheckedCertificate 14 7 ([[], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover270 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4, 1], HasCheckedCertificate 14 7 ([[], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover271 : ∀ P ∈ pathPatterns 2 0 [1, 1, 5], HasCheckedCertificate 14 7 ([[], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq229 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1, 1] ++ tail).length) (7 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 14 7 ([[]] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t7_cover230 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover241 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover245 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover246 + · exact by + intro _ + exact k14t7_cover247 + · exact by + intro _ + exact k14t7_cover248 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover249 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover250 + · exact by + intro _ + exact k14t7_cover251 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover252 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover253 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover254 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover255 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover258 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover259 + · exact by + intro _ + exact k14t7_cover260 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover261 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover262 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover263 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover264 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover266 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover267 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover268 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover269 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover270 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover271 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover273 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 14 7 ([[], [1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p139, Certificates.k14t7p139_check⟩ + +private theorem k14t7_cover274 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 14 7 ([[], [1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p140, Certificates.k14t7p140_check⟩ + +private theorem k14t7_cover275 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 14 7 ([[], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover276 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 14 7 ([[], [1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p141, Certificates.k14t7p141_check⟩ + +private theorem k14t7_cover277 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 14 7 ([[], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover278 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 14 7 ([[], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover272 : ∀ P ∈ pathPatterns 3 4 [1, 2], HasCheckedCertificate 14 7 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k14t7_cover273 + · exact by + intro _ + exact k14t7_cover274 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover275 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k14t7_cover276 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover277 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover278 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover280 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 14 7 ([[], [1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p142, Certificates.k14t7p142_check⟩ + +private theorem k14t7_cover281 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 14 7 ([[], [1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p143, Certificates.k14t7p143_check⟩ + +private theorem k14t7_cover279 : ∀ P ∈ pathPatterns 2 3 [1, 2, 1], HasCheckedCertificate 14 7 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover280 + · exact by + intro _ + exact k14t7_cover281 + +private theorem k14t7_cover282 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 2], HasCheckedCertificate 14 7 ([[], [1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p144, Certificates.k14t7p144_check⟩ + +private theorem k14t7_cover283 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 2], HasCheckedCertificate 14 7 ([[], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover284 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2, 1], HasCheckedCertificate 14 7 ([[], [1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p145, Certificates.k14t7p145_check⟩ + +private theorem k14t7_cover285 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 3], HasCheckedCertificate 14 7 ([[], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover287 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 7 ([[], [1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p146, Certificates.k14t7p146_check⟩ + +private theorem k14t7_cover286 : ∀ P ∈ pathPatterns 2 2 [1, 2, 2], HasCheckedCertificate 14 7 ([[], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover287 + +private theorem k14t7_cover288 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2, 1], HasCheckedCertificate 14 7 ([[], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover289 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 2], HasCheckedCertificate 14 7 ([[], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover290 : ∀ P ∈ pathPatterns 2 1 [1, 2, 3], HasCheckedCertificate 14 7 ([[], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover291 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3, 1], HasCheckedCertificate 14 7 ([[], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover292 : ∀ P ∈ pathPatterns 2 0 [1, 2, 4], HasCheckedCertificate 14 7 ([[], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover294 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 14 7 ([[], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover295 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 14 7 ([[], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover293 : ∀ P ∈ pathPatterns 3 3 [1, 3], HasCheckedCertificate 14 7 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover294 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover295 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover297 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 7 ([[], [1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p147, Certificates.k14t7p147_check⟩ + +private theorem k14t7_cover296 : ∀ P ∈ pathPatterns 2 2 [1, 3, 1], HasCheckedCertificate 14 7 ([[], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover297 + +private theorem k14t7_cover298 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1, 2], HasCheckedCertificate 14 7 ([[], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover299 : ∀ P ∈ pathPatterns 2 1 [1, 3, 2], HasCheckedCertificate 14 7 ([[], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover300 : ∀ P ∈ pathPatterns 2 0 [1, 3, 3], HasCheckedCertificate 14 7 ([[], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover302 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 14 7 ([[], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover301 : ∀ P ∈ pathPatterns 3 2 [1, 4], HasCheckedCertificate 14 7 ([[], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover302 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover303 : ∀ P ∈ pathPatterns 2 1 [1, 4, 1], HasCheckedCertificate 14 7 ([[], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover304 : ∀ P ∈ pathPatterns 2 0 [1, 4, 2], HasCheckedCertificate 14 7 ([[], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover305 : ∀ P ∈ pathPatterns 3 1 [1, 5], HasCheckedCertificate 14 7 ([[], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover306 : ∀ P ∈ pathPatterns 2 0 [1, 5, 1], HasCheckedCertificate 14 7 ([[], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover307 : ∀ P ∈ pathPatterns 3 0 [1, 6], HasCheckedCertificate 14 7 ([[], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq189 : amountSequenceForall 4 6 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1] ++ tail).length) (7 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 14 7 ([[]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t7_cover190 + · intro q + fin_cases q + · exact k14t7_seq229 + + · exact by + constructor + · exact by + intro _ + exact k14t7_cover272 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover279 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · exact by + intro _ + exact k14t7_cover282 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover283 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover284 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover285 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover286 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover288 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover289 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover290 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover291 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover292 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover293 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover296 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover298 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover299 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover300 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover301 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover303 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover304 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover305 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover306 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover307 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover312 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 14 7 ([[], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p148, Certificates.k14t7p148_check⟩ + +private theorem k14t7_cover313 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 14 7 ([[], [2], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p149, Certificates.k14t7p149_check⟩ + +private theorem k14t7_cover311 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 14 7 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover312 + · exact by + intro _ + exact k14t7_cover313 + +private theorem k14t7_cover314 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 14 7 ([[], [2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p150, Certificates.k14t7p150_check⟩ + +private theorem k14t7_cover315 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 14 7 ([[], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover316 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 14 7 ([[], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover317 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 14 7 ([[], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k14t7_cover318 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 14 7 ([[], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover319 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 14 7 ([[], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq310 : amountSequenceForall 3 5 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 7 ([[], [2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover311 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k14t7_cover314 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover315 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover316 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover317 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover318 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover319 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover309 : ∀ P ∈ pathPatterns 4 5 [2], HasCheckedCertificate 14 7 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact k14t7_seq310 + + +private theorem k14t7_cover320 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 1, 2], HasCheckedCertificate 14 7 ([[], [2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p151, Certificates.k14t7p151_check⟩ + +private theorem k14t7_cover321 : ∀ P ∈ pathPatterns 1 1 [2, 1, 1, 2], HasCheckedCertificate 14 7 ([[], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover322 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 3], HasCheckedCertificate 14 7 ([[], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover323 : ∀ P ∈ pathPatterns 2 2 [2, 1, 2], HasCheckedCertificate 14 7 ([[], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k14t7_cover324 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2, 2], HasCheckedCertificate 14 7 ([[], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover325 : ∀ P ∈ pathPatterns 2 1 [2, 1, 3], HasCheckedCertificate 14 7 ([[], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover326 : ∀ P ∈ pathPatterns 2 0 [2, 1, 4], HasCheckedCertificate 14 7 ([[], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover328 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 14 7 ([[], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover327 : ∀ P ∈ pathPatterns 3 3 [2, 2], HasCheckedCertificate 14 7 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover328 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover329 : ∀ P ∈ pathPatterns 2 1 [2, 2, 2], HasCheckedCertificate 14 7 ([[], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover330 : ∀ P ∈ pathPatterns 2 0 [2, 2, 3], HasCheckedCertificate 14 7 ([[], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover331 : ∀ P ∈ pathPatterns 3 2 [2, 3], HasCheckedCertificate 14 7 ([[], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover332 : ∀ P ∈ pathPatterns 2 0 [2, 3, 2], HasCheckedCertificate 14 7 ([[], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover333 : ∀ P ∈ pathPatterns 3 1 [2, 4], HasCheckedCertificate 14 7 ([[], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover334 : ∀ P ∈ pathPatterns 3 0 [2, 5], HasCheckedCertificate 14 7 ([[], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq308 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([2] ++ tail).length) (7 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 14 7 ([[]] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t7_cover309 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · exact by + intro _ + exact k14t7_cover320 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover321 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover322 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover323 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover324 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover325 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover326 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover327 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover329 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover330 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover331 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover332 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover333 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover334 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover336 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 14 7 ([[], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover337 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 14 7 ([[], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover335 : ∀ P ∈ pathPatterns 4 4 [3], HasCheckedCertificate 14 7 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover336 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover337 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover338 : ∀ P ∈ pathPatterns 2 0 [3, 1, 3], HasCheckedCertificate 14 7 ([[], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover339 : ∀ P ∈ pathPatterns 3 1 [3, 3], HasCheckedCertificate 14 7 ([[], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover340 : ∀ P ∈ pathPatterns 3 0 [3, 4], HasCheckedCertificate 14 7 ([[], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover341 : ∀ P ∈ pathPatterns 4 3 [4], HasCheckedCertificate 14 7 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover342 : ∀ P ∈ pathPatterns 4 2 [5], HasCheckedCertificate 14 7 ([[], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover343 : ∀ P ∈ pathPatterns 4 1 [6], HasCheckedCertificate 14 7 ([[], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover344 : ∀ P ∈ pathPatterns 4 0 [7], HasCheckedCertificate 14 7 ([[], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq4 : amountSequenceForall 5 7 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 7 ([[]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t7_cover5 + · intro q + fin_cases q + · exact k14t7_seq189 + + · exact k14t7_seq308 + + · exact by + constructor + · exact by + intro _ + exact k14t7_cover335 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover338 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover339 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover340 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover341 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover342 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover343 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover344 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover3 : ∀ P ∈ pathPatterns 6 7 [], HasCheckedCertificate 14 7 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact k14t7_seq4 + + +private theorem k14t7_cover350 : ∀ P ∈ pathPatterns 1 4 [1], HasCheckedCertificate 14 7 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover351 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 14 7 ([[1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p152, Certificates.k14t7p152_check⟩ + +private theorem k14t7_cover352 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 14 7 ([[1], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p153, Certificates.k14t7p153_check⟩ + +private theorem k14t7_cover353 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 14 7 ([[1], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p154, Certificates.k14t7p154_check⟩ + +private theorem k14t7_cover354 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 14 7 ([[1], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p155, Certificates.k14t7p155_check⟩ + +private theorem k14t7_cover355 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 14 7 ([[1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover356 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 14 7 ([[1], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p156, Certificates.k14t7p156_check⟩ + +private theorem k14t7_cover357 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 14 7 ([[1], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p157, Certificates.k14t7p157_check⟩ + +private theorem k14t7_cover358 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 14 7 ([[1], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover359 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 14 7 ([[1], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover360 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 14 7 ([[1], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover349 : ∀ P ∈ pathPatterns 3 5 [1], HasCheckedCertificate 14 7 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover350 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover351 + · exact by + intro _ + exact k14t7_cover352 + · exact by + intro _ + exact k14t7_cover353 + · exact by + intro _ + exact k14t7_cover354 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover355 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k14t7_cover356 + · exact by + intro _ + exact k14t7_cover357 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover358 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover359 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover360 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover362 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 14 7 ([[1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p158, Certificates.k14t7p158_check⟩ + +private theorem k14t7_cover363 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 14 7 ([[1], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p159, Certificates.k14t7p159_check⟩ + +private theorem k14t7_cover364 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 14 7 ([[1], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p160, Certificates.k14t7p160_check⟩ + +private theorem k14t7_cover361 : ∀ P ∈ pathPatterns 2 4 [1, 1], HasCheckedCertificate 14 7 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover362 + · exact by + intro _ + exact k14t7_cover363 + · exact by + intro _ + exact k14t7_cover364 + +private theorem k14t7_cover365 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1], HasCheckedCertificate 14 7 ([[1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover366 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1], HasCheckedCertificate 14 7 ([[1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p161, Certificates.k14t7p161_check⟩ + +private theorem k14t7_cover367 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2], HasCheckedCertificate 14 7 ([[1], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p162, Certificates.k14t7p162_check⟩ + +private theorem k14t7_cover368 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3], HasCheckedCertificate 14 7 ([[1], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p163, Certificates.k14t7p163_check⟩ + +private theorem k14t7_cover369 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2], HasCheckedCertificate 14 7 ([[1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover370 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1], HasCheckedCertificate 14 7 ([[1], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p164, Certificates.k14t7p164_check⟩ + +private theorem k14t7_cover371 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2], HasCheckedCertificate 14 7 ([[1], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p165, Certificates.k14t7p165_check⟩ + +private theorem k14t7_cover372 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3], HasCheckedCertificate 14 7 ([[1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover373 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1], HasCheckedCertificate 14 7 ([[1], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p166, Certificates.k14t7p166_check⟩ + +private theorem k14t7_cover374 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4], HasCheckedCertificate 14 7 ([[1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover376 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 14 7 ([[1], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p167, Certificates.k14t7p167_check⟩ + +private theorem k14t7_cover377 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 14 7 ([[1], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p168, Certificates.k14t7p168_check⟩ + +private theorem k14t7_cover375 : ∀ P ∈ pathPatterns 2 3 [1, 2], HasCheckedCertificate 14 7 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover376 + · exact by + intro _ + exact k14t7_cover377 + +private theorem k14t7_cover378 : ∀ P ∈ pathPatterns 1 2 [1, 2, 1], HasCheckedCertificate 14 7 ([[1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover379 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2], HasCheckedCertificate 14 7 ([[1], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p169, Certificates.k14t7p169_check⟩ + +private theorem k14t7_cover380 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2], HasCheckedCertificate 14 7 ([[1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover381 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 1], HasCheckedCertificate 14 7 ([[1], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p170, Certificates.k14t7p170_check⟩ + +private theorem k14t7_cover382 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3], HasCheckedCertificate 14 7 ([[1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover384 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 7 ([[1], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p171, Certificates.k14t7p171_check⟩ + +private theorem k14t7_cover383 : ∀ P ∈ pathPatterns 2 2 [1, 3], HasCheckedCertificate 14 7 ([[1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover384 + +private theorem k14t7_cover385 : ∀ P ∈ pathPatterns 1 1 [1, 3, 1], HasCheckedCertificate 14 7 ([[1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover386 : ∀ P ∈ pathPatterns 1 0 [1, 3, 2], HasCheckedCertificate 14 7 ([[1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover387 : ∀ P ∈ pathPatterns 2 1 [1, 4], HasCheckedCertificate 14 7 ([[1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover388 : ∀ P ∈ pathPatterns 1 0 [1, 4, 1], HasCheckedCertificate 14 7 ([[1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover389 : ∀ P ∈ pathPatterns 2 0 [1, 5], HasCheckedCertificate 14 7 ([[1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq348 : amountSequenceForall 3 5 (fun tail => + (LexLE [1] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 14 7 ([[1]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t7_cover349 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover361 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover365 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover366 + · exact by + intro _ + exact k14t7_cover367 + · exact by + intro _ + exact k14t7_cover368 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover369 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover370 + · exact by + intro _ + exact k14t7_cover371 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover372 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover373 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover374 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover375 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover378 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k14t7_cover379 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover380 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover381 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover382 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover383 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover385 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover386 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover387 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover388 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover389 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover391 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 14 7 ([[1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover392 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 14 7 ([[1], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p172, Certificates.k14t7p172_check⟩ + +private theorem k14t7_cover393 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 14 7 ([[1], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover394 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 14 7 ([[1], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover390 : ∀ P ∈ pathPatterns 3 4 [2], HasCheckedCertificate 14 7 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover391 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k14t7_cover392 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover393 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover394 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover395 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 2], HasCheckedCertificate 14 7 ([[1], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p173, Certificates.k14t7p173_check⟩ + +private theorem k14t7_cover396 : ∀ P ∈ pathPatterns 1 1 [2, 1, 2], HasCheckedCertificate 14 7 ([[1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover397 : ∀ P ∈ pathPatterns 1 0 [2, 1, 3], HasCheckedCertificate 14 7 ([[1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover398 : ∀ P ∈ pathPatterns 2 2 [2, 2], HasCheckedCertificate 14 7 ([[1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k14t7_cover399 : ∀ P ∈ pathPatterns 1 0 [2, 2, 2], HasCheckedCertificate 14 7 ([[1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover400 : ∀ P ∈ pathPatterns 2 1 [2, 3], HasCheckedCertificate 14 7 ([[1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover401 : ∀ P ∈ pathPatterns 2 0 [2, 4], HasCheckedCertificate 14 7 ([[1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover403 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 14 7 ([[1], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover402 : ∀ P ∈ pathPatterns 3 3 [3], HasCheckedCertificate 14 7 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover403 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover404 : ∀ P ∈ pathPatterns 2 0 [3, 3], HasCheckedCertificate 14 7 ([[1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover405 : ∀ P ∈ pathPatterns 3 2 [4], HasCheckedCertificate 14 7 ([[1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover406 : ∀ P ∈ pathPatterns 3 1 [5], HasCheckedCertificate 14 7 ([[1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover407 : ∀ P ∈ pathPatterns 3 0 [6], HasCheckedCertificate 14 7 ([[1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq347 : amountSequenceForall 4 6 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 7 ([[1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k14t7_seq348 + + · exact by + constructor + · exact by + intro _ + exact k14t7_cover390 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k14t7_cover395 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover396 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover397 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover398 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover399 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover400 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover401 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover402 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover404 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover405 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover406 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover407 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover346 : ∀ P ∈ pathPatterns 5 6 [1], HasCheckedCertificate 14 7 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact k14t7_seq347 + + +private theorem k14t7_cover411 : ∀ P ∈ pathPatterns 1 3 [1, 1], HasCheckedCertificate 14 7 ([[1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover412 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1], HasCheckedCertificate 14 7 ([[1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p174, Certificates.k14t7p174_check⟩ + +private theorem k14t7_cover413 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2], HasCheckedCertificate 14 7 ([[1, 1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p175, Certificates.k14t7p175_check⟩ + +private theorem k14t7_cover414 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3], HasCheckedCertificate 14 7 ([[1, 1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p176, Certificates.k14t7p176_check⟩ + +private theorem k14t7_cover415 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 14 7 ([[1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover416 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 14 7 ([[1, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p177, Certificates.k14t7p177_check⟩ + +private theorem k14t7_cover417 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 14 7 ([[1, 1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p178, Certificates.k14t7p178_check⟩ + +private theorem k14t7_cover418 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 14 7 ([[1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover419 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 14 7 ([[1, 1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p179, Certificates.k14t7p179_check⟩ + +private theorem k14t7_cover420 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 14 7 ([[1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover422 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 14 7 ([[1, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p180, Certificates.k14t7p180_check⟩ + +private theorem k14t7_cover423 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 14 7 ([[1, 1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p181, Certificates.k14t7p181_check⟩ + +private theorem k14t7_cover421 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 14 7 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover422 + · exact by + intro _ + exact k14t7_cover423 + +private theorem k14t7_cover424 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 14 7 ([[1, 1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p182, Certificates.k14t7p182_check⟩ + +private theorem k14t7_cover425 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 14 7 ([[1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover426 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 14 7 ([[1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover427 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 14 7 ([[1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k14t7_cover428 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 14 7 ([[1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover429 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 14 7 ([[1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq410 : amountSequenceForall 3 5 (fun tail => + (LexLE [1, 1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 7 ([[1, 1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover411 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover412 + · exact by + intro _ + exact k14t7_cover413 + · exact by + intro _ + exact k14t7_cover414 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover415 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover416 + · exact by + intro _ + exact k14t7_cover417 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover418 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover419 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover420 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover421 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k14t7_cover424 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover425 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover426 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover427 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover428 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover429 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover409 : ∀ P ∈ pathPatterns 4 5 [1, 1], HasCheckedCertificate 14 7 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact k14t7_seq410 + + +private theorem k14t7_cover431 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 14 7 ([[1, 1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p183, Certificates.k14t7p183_check⟩ + +private theorem k14t7_cover432 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 14 7 ([[1, 1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p184, Certificates.k14t7p184_check⟩ + +private theorem k14t7_cover433 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 14 7 ([[1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover434 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 14 7 ([[1, 1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p185, Certificates.k14t7p185_check⟩ + +private theorem k14t7_cover435 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 14 7 ([[1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover436 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 14 7 ([[1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover430 : ∀ P ∈ pathPatterns 3 4 [1, 1, 1], HasCheckedCertificate 14 7 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k14t7_cover431 + · exact by + intro _ + exact k14t7_cover432 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover433 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k14t7_cover434 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover435 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover436 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover438 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 14 7 ([[1, 1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p186, Certificates.k14t7p186_check⟩ + +private theorem k14t7_cover439 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 14 7 ([[1, 1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p187, Certificates.k14t7p187_check⟩ + +private theorem k14t7_cover437 : ∀ P ∈ pathPatterns 2 3 [1, 1, 1, 1], HasCheckedCertificate 14 7 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover438 + · exact by + intro _ + exact k14t7_cover439 + +private theorem k14t7_cover440 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 1, 1], HasCheckedCertificate 14 7 ([[1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover441 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 1, 1], HasCheckedCertificate 14 7 ([[1, 1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p188, Certificates.k14t7p188_check⟩ + +private theorem k14t7_cover442 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1, 2], HasCheckedCertificate 14 7 ([[1, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p189, Certificates.k14t7p189_check⟩ + +private theorem k14t7_cover443 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1, 2], HasCheckedCertificate 14 7 ([[1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover444 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 2, 1], HasCheckedCertificate 14 7 ([[1, 1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p190, Certificates.k14t7p190_check⟩ + +private theorem k14t7_cover445 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 3], HasCheckedCertificate 14 7 ([[1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover447 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 7 ([[1, 1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p191, Certificates.k14t7p191_check⟩ + +private theorem k14t7_cover446 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1, 2], HasCheckedCertificate 14 7 ([[1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover447 + +private theorem k14t7_cover448 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 2, 1], HasCheckedCertificate 14 7 ([[1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover449 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 1, 1], HasCheckedCertificate 14 7 ([[1, 1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p192, Certificates.k14t7p192_check⟩ + +private theorem k14t7_cover450 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2, 2], HasCheckedCertificate 14 7 ([[1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover451 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 3], HasCheckedCertificate 14 7 ([[1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover452 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 3, 1], HasCheckedCertificate 14 7 ([[1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover453 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 4], HasCheckedCertificate 14 7 ([[1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover455 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 14 7 ([[1, 1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p193, Certificates.k14t7p193_check⟩ + +private theorem k14t7_cover456 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 14 7 ([[1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover457 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 14 7 ([[1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover454 : ∀ P ∈ pathPatterns 3 3 [1, 1, 2], HasCheckedCertificate 14 7 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k14t7_cover455 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover456 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover457 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover459 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 7 ([[1, 1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p194, Certificates.k14t7p194_check⟩ + +private theorem k14t7_cover458 : ∀ P ∈ pathPatterns 2 2 [1, 1, 2, 1], HasCheckedCertificate 14 7 ([[1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover459 + +private theorem k14t7_cover460 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 1, 1], HasCheckedCertificate 14 7 ([[1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover461 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1, 2], HasCheckedCertificate 14 7 ([[1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover462 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2, 2], HasCheckedCertificate 14 7 ([[1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover463 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 2, 1], HasCheckedCertificate 14 7 ([[1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover464 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 3], HasCheckedCertificate 14 7 ([[1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover466 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 14 7 ([[1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover465 : ∀ P ∈ pathPatterns 3 2 [1, 1, 3], HasCheckedCertificate 14 7 ([[1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover466 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover467 : ∀ P ∈ pathPatterns 2 1 [1, 1, 3, 1], HasCheckedCertificate 14 7 ([[1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover468 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 1, 1], HasCheckedCertificate 14 7 ([[1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover469 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3, 2], HasCheckedCertificate 14 7 ([[1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover470 : ∀ P ∈ pathPatterns 3 1 [1, 1, 4], HasCheckedCertificate 14 7 ([[1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover471 : ∀ P ∈ pathPatterns 2 0 [1, 1, 4, 1], HasCheckedCertificate 14 7 ([[1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover472 : ∀ P ∈ pathPatterns 3 0 [1, 1, 5], HasCheckedCertificate 14 7 ([[1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq408 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1, 1] ++ tail).length) (7 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 14 7 ([] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t7_cover409 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover430 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover437 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover440 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover441 + · exact by + intro _ + exact k14t7_cover442 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover443 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover444 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover445 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover446 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover448 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover449 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover450 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover451 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover452 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover453 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover454 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover458 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover460 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 2, 1, 1, 1] ∧ LexLE [1, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover461 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover462 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover463 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover464 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover465 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover467 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover468 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover469 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover470 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover471 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover472 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover474 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 14 7 ([[1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover475 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 14 7 ([[1, 2], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p195, Certificates.k14t7p195_check⟩ + +private theorem k14t7_cover476 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 14 7 ([[1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover478 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 7 ([[1, 2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t7p196, Certificates.k14t7p196_check⟩ + +private theorem k14t7_cover477 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 14 7 ([[1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t7_cover478 + +private theorem k14t7_cover479 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 14 7 ([[1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover480 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 14 7 ([[1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover481 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 14 7 ([[1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover473 : ∀ P ∈ pathPatterns 4 4 [1, 2], HasCheckedCertificate 14 7 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover474 + · intro q + fin_cases q + · exact by + intro _ + exact k14t7_cover475 + · exact by + constructor + · exact by + intro _ + exact k14t7_cover476 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover477 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover479 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover480 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover481 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover483 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 14 7 ([[1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover484 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 14 7 ([[1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover482 : ∀ P ∈ pathPatterns 3 3 [1, 2, 1], HasCheckedCertificate 14 7 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover483 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover484 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover485 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 1, 2], HasCheckedCertificate 14 7 ([[1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover486 : ∀ P ∈ pathPatterns 2 1 [1, 2, 1, 2], HasCheckedCertificate 14 7 ([[1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover487 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 2, 1], HasCheckedCertificate 14 7 ([[1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover488 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 3], HasCheckedCertificate 14 7 ([[1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover490 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 14 7 ([[1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover489 : ∀ P ∈ pathPatterns 3 2 [1, 2, 2], HasCheckedCertificate 14 7 ([[1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover490 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover491 : ∀ P ∈ pathPatterns 2 1 [1, 2, 2, 1], HasCheckedCertificate 14 7 ([[1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover492 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2, 2], HasCheckedCertificate 14 7 ([[1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover493 : ∀ P ∈ pathPatterns 3 1 [1, 2, 3], HasCheckedCertificate 14 7 ([[1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover494 : ∀ P ∈ pathPatterns 2 0 [1, 2, 3, 1], HasCheckedCertificate 14 7 ([[1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover495 : ∀ P ∈ pathPatterns 3 0 [1, 2, 4], HasCheckedCertificate 14 7 ([[1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover497 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 14 7 ([[1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover498 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 14 7 ([[1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover496 : ∀ P ∈ pathPatterns 4 3 [1, 3], HasCheckedCertificate 14 7 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover497 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover498 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover500 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 14 7 ([[1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover499 : ∀ P ∈ pathPatterns 3 2 [1, 3, 1], HasCheckedCertificate 14 7 ([[1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover500 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover501 : ∀ P ∈ pathPatterns 2 0 [1, 3, 1, 2], HasCheckedCertificate 14 7 ([[1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover502 : ∀ P ∈ pathPatterns 3 1 [1, 3, 2], HasCheckedCertificate 14 7 ([[1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover503 : ∀ P ∈ pathPatterns 3 0 [1, 3, 3], HasCheckedCertificate 14 7 ([[1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover505 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 14 7 ([[1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover504 : ∀ P ∈ pathPatterns 4 2 [1, 4], HasCheckedCertificate 14 7 ([[1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover505 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover506 : ∀ P ∈ pathPatterns 3 1 [1, 4, 1], HasCheckedCertificate 14 7 ([[1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover507 : ∀ P ∈ pathPatterns 3 0 [1, 4, 2], HasCheckedCertificate 14 7 ([[1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover508 : ∀ P ∈ pathPatterns 4 1 [1, 5], HasCheckedCertificate 14 7 ([[1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover509 : ∀ P ∈ pathPatterns 3 0 [1, 5, 1], HasCheckedCertificate 14 7 ([[1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover510 : ∀ P ∈ pathPatterns 4 0 [1, 6], HasCheckedCertificate 14 7 ([[1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq345 : amountSequenceForall 5 6 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1] ++ tail).length) (7 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 14 7 ([] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t7_cover346 + · intro q + fin_cases q + · exact k14t7_seq408 + + · exact by + constructor + · exact by + intro _ + exact k14t7_cover473 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover482 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover485 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover486 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover487 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover488 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover489 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover491 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover492 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover493 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover494 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover495 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover496 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover499 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover501 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover502 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover503 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover504 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover506 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover507 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover508 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover509 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover510 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover515 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 14 7 ([[2], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover516 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 14 7 ([[2], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover514 : ∀ P ∈ pathPatterns 3 3 [2], HasCheckedCertificate 14 7 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover515 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover516 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover517 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2], HasCheckedCertificate 14 7 ([[2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover518 : ∀ P ∈ pathPatterns 2 1 [2, 2], HasCheckedCertificate 14 7 ([[2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover519 : ∀ P ∈ pathPatterns 2 0 [2, 3], HasCheckedCertificate 14 7 ([[2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover520 : ∀ P ∈ pathPatterns 3 2 [3], HasCheckedCertificate 14 7 ([[2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover521 : ∀ P ∈ pathPatterns 3 1 [4], HasCheckedCertificate 14 7 ([[2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover522 : ∀ P ∈ pathPatterns 3 0 [5], HasCheckedCertificate 14 7 ([[2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq513 : amountSequenceForall 4 5 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 7 ([[2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover514 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover517 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover518 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover519 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover520 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover521 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover522 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover512 : ∀ P ∈ pathPatterns 5 5 [2], HasCheckedCertificate 14 7 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact k14t7_seq513 + + +private theorem k14t7_cover523 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 1, 2], HasCheckedCertificate 14 7 ([[2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t7_cover524 : ∀ P ∈ pathPatterns 2 1 [2, 1, 1, 2], HasCheckedCertificate 14 7 ([[2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t7_cover525 : ∀ P ∈ pathPatterns 2 0 [2, 1, 1, 3], HasCheckedCertificate 14 7 ([[2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover526 : ∀ P ∈ pathPatterns 3 2 [2, 1, 2], HasCheckedCertificate 14 7 ([[2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover527 : ∀ P ∈ pathPatterns 2 0 [2, 1, 2, 2], HasCheckedCertificate 14 7 ([[2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover528 : ∀ P ∈ pathPatterns 3 1 [2, 1, 3], HasCheckedCertificate 14 7 ([[2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover529 : ∀ P ∈ pathPatterns 3 0 [2, 1, 4], HasCheckedCertificate 14 7 ([[2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover531 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 14 7 ([[2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover530 : ∀ P ∈ pathPatterns 4 3 [2, 2], HasCheckedCertificate 14 7 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover531 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover532 : ∀ P ∈ pathPatterns 3 1 [2, 2, 2], HasCheckedCertificate 14 7 ([[2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover533 : ∀ P ∈ pathPatterns 3 0 [2, 2, 3], HasCheckedCertificate 14 7 ([[2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover534 : ∀ P ∈ pathPatterns 4 2 [2, 3], HasCheckedCertificate 14 7 ([[2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover535 : ∀ P ∈ pathPatterns 3 0 [2, 3, 2], HasCheckedCertificate 14 7 ([[2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover536 : ∀ P ∈ pathPatterns 4 1 [2, 4], HasCheckedCertificate 14 7 ([[2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover537 : ∀ P ∈ pathPatterns 4 0 [2, 5], HasCheckedCertificate 14 7 ([[2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq511 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([2] ++ tail).length) (7 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 14 7 ([] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t7_cover512 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t7_cover523 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover524 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover525 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover526 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover527 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover528 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover529 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover530 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover532 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover533 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover534 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover535 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover536 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover537 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover539 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 14 7 ([[3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover540 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 14 7 ([[3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover538 : ∀ P ∈ pathPatterns 5 4 [3], HasCheckedCertificate 14 7 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover539 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover540 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover541 : ∀ P ∈ pathPatterns 3 0 [3, 1, 3], HasCheckedCertificate 14 7 ([[3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover542 : ∀ P ∈ pathPatterns 4 1 [3, 3], HasCheckedCertificate 14 7 ([[3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover543 : ∀ P ∈ pathPatterns 4 0 [3, 4], HasCheckedCertificate 14 7 ([[3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover544 : ∀ P ∈ pathPatterns 5 3 [4], HasCheckedCertificate 14 7 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover545 : ∀ P ∈ pathPatterns 5 2 [5], HasCheckedCertificate 14 7 ([[5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover546 : ∀ P ∈ pathPatterns 5 1 [6], HasCheckedCertificate 14 7 ([[6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover547 : ∀ P ∈ pathPatterns 5 0 [7], HasCheckedCertificate 14 7 ([[7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t7_seq2 : amountSequenceForall 6 7 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 7 ([] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t7_cover3 + · intro q + fin_cases q + · exact k14t7_seq345 + + · exact k14t7_seq511 + + · exact by + constructor + · exact by + intro _ + exact k14t7_cover538 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover541 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover542 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover543 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover544 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover545 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover546 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t7_cover547 + · intro q + exact Fin.elim0 q + +private theorem k14t7_cover1 : ∀ P ∈ pathPatterns 7 7 [], HasCheckedCertificate 14 7 ([] ++ P) := by + apply pathPatterns_forall_step + exact k14t7_seq2 + + +theorem coverage_k14_t7 : + ∀ P ∈ pathPatterns 7 7, HasCheckedCertificate 14 7 P := + k14t7_cover1 + +private theorem k14t8_cover14 : ∀ P ∈ pathPatterns 0 6 [], HasCheckedCertificate 14 8 ([[], [], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p0, Certificates.k14t8p0_check⟩ + +private theorem k14t8_cover13 : ∀ P ∈ pathPatterns 1 6 [], HasCheckedCertificate 14 8 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k14t8_cover14 + +private theorem k14t8_cover15 : ∀ P ∈ pathPatterns 0 5 [1], HasCheckedCertificate 14 8 ([[], [], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p1, Certificates.k14t8p1_check⟩ + +private theorem k14t8_cover16 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 14 8 ([[], [], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p2, Certificates.k14t8p2_check⟩ + +private theorem k14t8_cover17 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 14 8 ([[], [], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p3, Certificates.k14t8p3_check⟩ + +private theorem k14t8_cover18 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 14 8 ([[], [], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p4, Certificates.k14t8p4_check⟩ + +private theorem k14t8_cover19 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 14 8 ([[], [], [], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p5, Certificates.k14t8p5_check⟩ + +private theorem k14t8_cover20 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 14 8 ([[], [], [], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p6, Certificates.k14t8p6_check⟩ + +private theorem k14t8_cover12 : ∀ P ∈ pathPatterns 2 6 [], HasCheckedCertificate 14 8 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k14t8_cover13 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover15 + · exact by + intro _ + exact k14t8_cover16 + · exact by + intro _ + exact k14t8_cover17 + · exact by + intro _ + exact k14t8_cover18 + · exact by + intro _ + exact k14t8_cover19 + · exact by + intro _ + exact k14t8_cover20 + +private theorem k14t8_cover21 : ∀ P ∈ pathPatterns 1 5 [1], HasCheckedCertificate 14 8 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover22 : ∀ P ∈ pathPatterns 0 4 [1, 1], HasCheckedCertificate 14 8 ([[], [], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p7, Certificates.k14t8p7_check⟩ + +private theorem k14t8_cover23 : ∀ P ∈ pathPatterns 0 3 [1, 2], HasCheckedCertificate 14 8 ([[], [], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p8, Certificates.k14t8p8_check⟩ + +private theorem k14t8_cover24 : ∀ P ∈ pathPatterns 0 2 [1, 3], HasCheckedCertificate 14 8 ([[], [], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p9, Certificates.k14t8p9_check⟩ + +private theorem k14t8_cover25 : ∀ P ∈ pathPatterns 0 1 [1, 4], HasCheckedCertificate 14 8 ([[], [], [], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p10, Certificates.k14t8p10_check⟩ + +private theorem k14t8_cover26 : ∀ P ∈ pathPatterns 0 0 [1, 5], HasCheckedCertificate 14 8 ([[], [], [], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p11, Certificates.k14t8p11_check⟩ + +private theorem k14t8_cover27 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 14 8 ([[], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover28 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 14 8 ([[], [], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p12, Certificates.k14t8p12_check⟩ + +private theorem k14t8_cover29 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 14 8 ([[], [], [], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p13, Certificates.k14t8p13_check⟩ + +private theorem k14t8_cover30 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 14 8 ([[], [], [], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p14, Certificates.k14t8p14_check⟩ + +private theorem k14t8_cover31 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 14 8 ([[], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover32 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 14 8 ([[], [], [], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p15, Certificates.k14t8p15_check⟩ + +private theorem k14t8_cover33 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 14 8 ([[], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover34 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 14 8 ([[], [], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover35 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 14 8 ([[], [], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover11 : ∀ P ∈ pathPatterns 3 6 [], HasCheckedCertificate 14 8 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k14t8_cover12 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover21 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover22 + · exact by + intro _ + exact k14t8_cover23 + · exact by + intro _ + exact k14t8_cover24 + · exact by + intro _ + exact k14t8_cover25 + · exact by + intro _ + exact k14t8_cover26 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover27 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k14t8_cover28 + · exact by + intro _ + exact k14t8_cover29 + · exact by + intro _ + exact k14t8_cover30 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover31 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k14t8_cover32 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover33 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover34 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover35 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover37 : ∀ P ∈ pathPatterns 0 4 [1], HasCheckedCertificate 14 8 ([[], [], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p16, Certificates.k14t8p16_check⟩ + +private theorem k14t8_cover38 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 14 8 ([[], [], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p17, Certificates.k14t8p17_check⟩ + +private theorem k14t8_cover39 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 14 8 ([[], [], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p18, Certificates.k14t8p18_check⟩ + +private theorem k14t8_cover40 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 14 8 ([[], [], [], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p19, Certificates.k14t8p19_check⟩ + +private theorem k14t8_cover41 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 14 8 ([[], [], [], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p20, Certificates.k14t8p20_check⟩ + +private theorem k14t8_cover36 : ∀ P ∈ pathPatterns 2 5 [1], HasCheckedCertificate 14 8 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover37 + · exact by + intro _ + exact k14t8_cover38 + · exact by + intro _ + exact k14t8_cover39 + · exact by + intro _ + exact k14t8_cover40 + · exact by + intro _ + exact k14t8_cover41 + +private theorem k14t8_cover42 : ∀ P ∈ pathPatterns 1 4 [1, 1], HasCheckedCertificate 14 8 ([[], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover43 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1], HasCheckedCertificate 14 8 ([[], [], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p21, Certificates.k14t8p21_check⟩ + +private theorem k14t8_cover44 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2], HasCheckedCertificate 14 8 ([[], [], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p22, Certificates.k14t8p22_check⟩ + +private theorem k14t8_cover45 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3], HasCheckedCertificate 14 8 ([[], [], [], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p23, Certificates.k14t8p23_check⟩ + +private theorem k14t8_cover46 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4], HasCheckedCertificate 14 8 ([[], [], [], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p24, Certificates.k14t8p24_check⟩ + +private theorem k14t8_cover47 : ∀ P ∈ pathPatterns 1 3 [1, 2], HasCheckedCertificate 14 8 ([[], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover48 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1], HasCheckedCertificate 14 8 ([[], [], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p25, Certificates.k14t8p25_check⟩ + +private theorem k14t8_cover49 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2], HasCheckedCertificate 14 8 ([[], [], [], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p26, Certificates.k14t8p26_check⟩ + +private theorem k14t8_cover50 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3], HasCheckedCertificate 14 8 ([[], [], [], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p27, Certificates.k14t8p27_check⟩ + +private theorem k14t8_cover51 : ∀ P ∈ pathPatterns 1 2 [1, 3], HasCheckedCertificate 14 8 ([[], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover52 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1], HasCheckedCertificate 14 8 ([[], [], [], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p28, Certificates.k14t8p28_check⟩ + +private theorem k14t8_cover53 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2], HasCheckedCertificate 14 8 ([[], [], [], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p29, Certificates.k14t8p29_check⟩ + +private theorem k14t8_cover54 : ∀ P ∈ pathPatterns 1 1 [1, 4], HasCheckedCertificate 14 8 ([[], [], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover55 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1], HasCheckedCertificate 14 8 ([[], [], [], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p30, Certificates.k14t8p30_check⟩ + +private theorem k14t8_cover56 : ∀ P ∈ pathPatterns 1 0 [1, 5], HasCheckedCertificate 14 8 ([[], [], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover58 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 14 8 ([[], [], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p31, Certificates.k14t8p31_check⟩ + +private theorem k14t8_cover59 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 14 8 ([[], [], [], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p32, Certificates.k14t8p32_check⟩ + +private theorem k14t8_cover60 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 14 8 ([[], [], [], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p33, Certificates.k14t8p33_check⟩ + +private theorem k14t8_cover57 : ∀ P ∈ pathPatterns 2 4 [2], HasCheckedCertificate 14 8 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover58 + · exact by + intro _ + exact k14t8_cover59 + · exact by + intro _ + exact k14t8_cover60 + +private theorem k14t8_cover61 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2], HasCheckedCertificate 14 8 ([[], [], [], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p34, Certificates.k14t8p34_check⟩ + +private theorem k14t8_cover62 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3], HasCheckedCertificate 14 8 ([[], [], [], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p35, Certificates.k14t8p35_check⟩ + +private theorem k14t8_cover63 : ∀ P ∈ pathPatterns 1 2 [2, 2], HasCheckedCertificate 14 8 ([[], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover64 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2], HasCheckedCertificate 14 8 ([[], [], [], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p36, Certificates.k14t8p36_check⟩ + +private theorem k14t8_cover65 : ∀ P ∈ pathPatterns 1 1 [2, 3], HasCheckedCertificate 14 8 ([[], [], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover66 : ∀ P ∈ pathPatterns 1 0 [2, 4], HasCheckedCertificate 14 8 ([[], [], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover68 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 14 8 ([[], [], [], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p37, Certificates.k14t8p37_check⟩ + +private theorem k14t8_cover67 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 14 8 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k14t8_cover68 + +private theorem k14t8_cover69 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 14 8 ([[], [], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover70 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 14 8 ([[], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k14t8_cover71 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 14 8 ([[], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover72 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 14 8 ([[], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_seq10 : amountSequenceForall 3 6 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 8 ([[], [], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t8_cover11 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover36 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover42 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover43 + · exact by + intro _ + exact k14t8_cover44 + · exact by + intro _ + exact k14t8_cover45 + · exact by + intro _ + exact k14t8_cover46 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover47 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover48 + · exact by + intro _ + exact k14t8_cover49 + · exact by + intro _ + exact k14t8_cover50 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover51 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover52 + · exact by + intro _ + exact k14t8_cover53 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover54 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover55 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover56 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover57 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k14t8_cover61 + · exact by + intro _ + exact k14t8_cover62 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover63 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k14t8_cover64 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover65 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover66 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover67 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover69 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover70 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover71 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover72 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover9 : ∀ P ∈ pathPatterns 4 6 [], HasCheckedCertificate 14 8 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k14t8_seq10 + + +private theorem k14t8_cover75 : ∀ P ∈ pathPatterns 1 4 [1], HasCheckedCertificate 14 8 ([[], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover76 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 14 8 ([[], [], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p38, Certificates.k14t8p38_check⟩ + +private theorem k14t8_cover77 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 14 8 ([[], [], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p39, Certificates.k14t8p39_check⟩ + +private theorem k14t8_cover78 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 14 8 ([[], [], [], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p40, Certificates.k14t8p40_check⟩ + +private theorem k14t8_cover79 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 14 8 ([[], [], [], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p41, Certificates.k14t8p41_check⟩ + +private theorem k14t8_cover80 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 14 8 ([[], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover81 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 14 8 ([[], [], [], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p42, Certificates.k14t8p42_check⟩ + +private theorem k14t8_cover82 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 14 8 ([[], [], [], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p43, Certificates.k14t8p43_check⟩ + +private theorem k14t8_cover83 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 14 8 ([[], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover84 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 14 8 ([[], [], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover85 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 14 8 ([[], [], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover74 : ∀ P ∈ pathPatterns 3 5 [1], HasCheckedCertificate 14 8 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover75 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover76 + · exact by + intro _ + exact k14t8_cover77 + · exact by + intro _ + exact k14t8_cover78 + · exact by + intro _ + exact k14t8_cover79 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover80 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k14t8_cover81 + · exact by + intro _ + exact k14t8_cover82 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover83 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover84 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover85 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover87 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 14 8 ([[], [], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p44, Certificates.k14t8p44_check⟩ + +private theorem k14t8_cover88 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 14 8 ([[], [], [], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p45, Certificates.k14t8p45_check⟩ + +private theorem k14t8_cover89 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 14 8 ([[], [], [], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p46, Certificates.k14t8p46_check⟩ + +private theorem k14t8_cover86 : ∀ P ∈ pathPatterns 2 4 [1, 1], HasCheckedCertificate 14 8 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover87 + · exact by + intro _ + exact k14t8_cover88 + · exact by + intro _ + exact k14t8_cover89 + +private theorem k14t8_cover90 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1], HasCheckedCertificate 14 8 ([[], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover91 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1], HasCheckedCertificate 14 8 ([[], [], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p47, Certificates.k14t8p47_check⟩ + +private theorem k14t8_cover92 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2], HasCheckedCertificate 14 8 ([[], [], [], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p48, Certificates.k14t8p48_check⟩ + +private theorem k14t8_cover93 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3], HasCheckedCertificate 14 8 ([[], [], [], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p49, Certificates.k14t8p49_check⟩ + +private theorem k14t8_cover94 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2], HasCheckedCertificate 14 8 ([[], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover95 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1], HasCheckedCertificate 14 8 ([[], [], [], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p50, Certificates.k14t8p50_check⟩ + +private theorem k14t8_cover96 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2], HasCheckedCertificate 14 8 ([[], [], [], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p51, Certificates.k14t8p51_check⟩ + +private theorem k14t8_cover97 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3], HasCheckedCertificate 14 8 ([[], [], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover98 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1], HasCheckedCertificate 14 8 ([[], [], [], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p52, Certificates.k14t8p52_check⟩ + +private theorem k14t8_cover99 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4], HasCheckedCertificate 14 8 ([[], [], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover101 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 14 8 ([[], [], [], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p53, Certificates.k14t8p53_check⟩ + +private theorem k14t8_cover102 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 14 8 ([[], [], [], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p54, Certificates.k14t8p54_check⟩ + +private theorem k14t8_cover100 : ∀ P ∈ pathPatterns 2 3 [1, 2], HasCheckedCertificate 14 8 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover101 + · exact by + intro _ + exact k14t8_cover102 + +private theorem k14t8_cover103 : ∀ P ∈ pathPatterns 1 2 [1, 2, 1], HasCheckedCertificate 14 8 ([[], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover104 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2], HasCheckedCertificate 14 8 ([[], [], [], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p55, Certificates.k14t8p55_check⟩ + +private theorem k14t8_cover105 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2], HasCheckedCertificate 14 8 ([[], [], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover106 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 1], HasCheckedCertificate 14 8 ([[], [], [], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p56, Certificates.k14t8p56_check⟩ + +private theorem k14t8_cover107 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3], HasCheckedCertificate 14 8 ([[], [], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover109 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 8 ([[], [], [], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p57, Certificates.k14t8p57_check⟩ + +private theorem k14t8_cover108 : ∀ P ∈ pathPatterns 2 2 [1, 3], HasCheckedCertificate 14 8 ([[], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover109 + +private theorem k14t8_cover110 : ∀ P ∈ pathPatterns 1 1 [1, 3, 1], HasCheckedCertificate 14 8 ([[], [], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover111 : ∀ P ∈ pathPatterns 1 0 [1, 3, 2], HasCheckedCertificate 14 8 ([[], [], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover112 : ∀ P ∈ pathPatterns 2 1 [1, 4], HasCheckedCertificate 14 8 ([[], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover113 : ∀ P ∈ pathPatterns 1 0 [1, 4, 1], HasCheckedCertificate 14 8 ([[], [], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover114 : ∀ P ∈ pathPatterns 2 0 [1, 5], HasCheckedCertificate 14 8 ([[], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_seq73 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 14 8 ([[], [], []] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t8_cover74 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover86 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover90 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover91 + · exact by + intro _ + exact k14t8_cover92 + · exact by + intro _ + exact k14t8_cover93 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover94 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover95 + · exact by + intro _ + exact k14t8_cover96 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover97 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover98 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover99 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover100 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover103 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k14t8_cover104 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover105 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover106 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover107 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover108 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover110 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover111 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover112 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover113 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover114 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover116 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 14 8 ([[], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover117 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 14 8 ([[], [], [], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p58, Certificates.k14t8p58_check⟩ + +private theorem k14t8_cover118 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 14 8 ([[], [], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover119 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 14 8 ([[], [], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover115 : ∀ P ∈ pathPatterns 3 4 [2], HasCheckedCertificate 14 8 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover116 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k14t8_cover117 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover118 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover119 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover120 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 2], HasCheckedCertificate 14 8 ([[], [], [], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p59, Certificates.k14t8p59_check⟩ + +private theorem k14t8_cover121 : ∀ P ∈ pathPatterns 1 1 [2, 1, 2], HasCheckedCertificate 14 8 ([[], [], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover122 : ∀ P ∈ pathPatterns 1 0 [2, 1, 3], HasCheckedCertificate 14 8 ([[], [], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover123 : ∀ P ∈ pathPatterns 2 2 [2, 2], HasCheckedCertificate 14 8 ([[], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k14t8_cover124 : ∀ P ∈ pathPatterns 1 0 [2, 2, 2], HasCheckedCertificate 14 8 ([[], [], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover125 : ∀ P ∈ pathPatterns 2 1 [2, 3], HasCheckedCertificate 14 8 ([[], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover126 : ∀ P ∈ pathPatterns 2 0 [2, 4], HasCheckedCertificate 14 8 ([[], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover128 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 14 8 ([[], [], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover127 : ∀ P ∈ pathPatterns 3 3 [3], HasCheckedCertificate 14 8 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover128 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover129 : ∀ P ∈ pathPatterns 2 0 [3, 3], HasCheckedCertificate 14 8 ([[], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover130 : ∀ P ∈ pathPatterns 3 2 [4], HasCheckedCertificate 14 8 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover131 : ∀ P ∈ pathPatterns 3 1 [5], HasCheckedCertificate 14 8 ([[], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover132 : ∀ P ∈ pathPatterns 3 0 [6], HasCheckedCertificate 14 8 ([[], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_seq8 : amountSequenceForall 4 6 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 8 ([[], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t8_cover9 + · intro q + fin_cases q + · exact k14t8_seq73 + + · exact by + constructor + · exact by + intro _ + exact k14t8_cover115 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k14t8_cover120 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover121 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover122 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover123 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover124 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover125 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover126 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover127 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover129 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover130 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover131 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover132 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover7 : ∀ P ∈ pathPatterns 5 6 [], HasCheckedCertificate 14 8 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k14t8_seq8 + + +private theorem k14t8_cover137 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 14 8 ([[], [], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p60, Certificates.k14t8p60_check⟩ + +private theorem k14t8_cover138 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 14 8 ([[], [], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p61, Certificates.k14t8p61_check⟩ + +private theorem k14t8_cover139 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 14 8 ([[], [], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p62, Certificates.k14t8p62_check⟩ + +private theorem k14t8_cover140 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 14 8 ([[], [], [1], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p63, Certificates.k14t8p63_check⟩ + +private theorem k14t8_cover136 : ∀ P ∈ pathPatterns 2 4 [1], HasCheckedCertificate 14 8 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover137 + · exact by + intro _ + exact k14t8_cover138 + · exact by + intro _ + exact k14t8_cover139 + · exact by + intro _ + exact k14t8_cover140 + +private theorem k14t8_cover141 : ∀ P ∈ pathPatterns 1 3 [1, 1], HasCheckedCertificate 14 8 ([[], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover142 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1], HasCheckedCertificate 14 8 ([[], [], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p64, Certificates.k14t8p64_check⟩ + +private theorem k14t8_cover143 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2], HasCheckedCertificate 14 8 ([[], [], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p65, Certificates.k14t8p65_check⟩ + +private theorem k14t8_cover144 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3], HasCheckedCertificate 14 8 ([[], [], [1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p66, Certificates.k14t8p66_check⟩ + +private theorem k14t8_cover145 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 14 8 ([[], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover146 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 14 8 ([[], [], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p67, Certificates.k14t8p67_check⟩ + +private theorem k14t8_cover147 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 14 8 ([[], [], [1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p68, Certificates.k14t8p68_check⟩ + +private theorem k14t8_cover148 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 14 8 ([[], [], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover149 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 14 8 ([[], [], [1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p69, Certificates.k14t8p69_check⟩ + +private theorem k14t8_cover150 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 14 8 ([[], [], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover152 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 14 8 ([[], [], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p70, Certificates.k14t8p70_check⟩ + +private theorem k14t8_cover153 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 14 8 ([[], [], [1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p71, Certificates.k14t8p71_check⟩ + +private theorem k14t8_cover151 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 14 8 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover152 + · exact by + intro _ + exact k14t8_cover153 + +private theorem k14t8_cover154 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 14 8 ([[], [], [1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p72, Certificates.k14t8p72_check⟩ + +private theorem k14t8_cover155 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 14 8 ([[], [], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover156 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 14 8 ([[], [], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover157 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 14 8 ([[], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k14t8_cover158 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 14 8 ([[], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover159 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 14 8 ([[], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_seq135 : amountSequenceForall 3 5 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 8 ([[], [], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover136 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover141 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover142 + · exact by + intro _ + exact k14t8_cover143 + · exact by + intro _ + exact k14t8_cover144 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover145 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover146 + · exact by + intro _ + exact k14t8_cover147 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover148 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover149 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover150 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover151 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k14t8_cover154 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover155 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover156 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover157 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover158 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover159 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover134 : ∀ P ∈ pathPatterns 4 5 [1], HasCheckedCertificate 14 8 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k14t8_seq135 + + +private theorem k14t8_cover161 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 14 8 ([[], [], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p73, Certificates.k14t8p73_check⟩ + +private theorem k14t8_cover162 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 14 8 ([[], [], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p74, Certificates.k14t8p74_check⟩ + +private theorem k14t8_cover163 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 14 8 ([[], [], [1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p75, Certificates.k14t8p75_check⟩ + +private theorem k14t8_cover164 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 14 8 ([[], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover165 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 14 8 ([[], [], [1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p76, Certificates.k14t8p76_check⟩ + +private theorem k14t8_cover166 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 14 8 ([[], [], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover167 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 14 8 ([[], [], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover160 : ∀ P ∈ pathPatterns 3 4 [1, 1], HasCheckedCertificate 14 8 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover161 + · exact by + intro _ + exact k14t8_cover162 + · exact by + intro _ + exact k14t8_cover163 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover164 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k14t8_cover165 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover166 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover167 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover169 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 14 8 ([[], [], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p77, Certificates.k14t8p77_check⟩ + +private theorem k14t8_cover170 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 14 8 ([[], [], [1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p78, Certificates.k14t8p78_check⟩ + +private theorem k14t8_cover168 : ∀ P ∈ pathPatterns 2 3 [1, 1, 1], HasCheckedCertificate 14 8 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover169 + · exact by + intro _ + exact k14t8_cover170 + +private theorem k14t8_cover171 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 1], HasCheckedCertificate 14 8 ([[], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover172 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 1], HasCheckedCertificate 14 8 ([[], [], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p79, Certificates.k14t8p79_check⟩ + +private theorem k14t8_cover173 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 2], HasCheckedCertificate 14 8 ([[], [], [1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p80, Certificates.k14t8p80_check⟩ + +private theorem k14t8_cover174 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 2], HasCheckedCertificate 14 8 ([[], [], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover175 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 1], HasCheckedCertificate 14 8 ([[], [], [1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p81, Certificates.k14t8p81_check⟩ + +private theorem k14t8_cover176 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 3], HasCheckedCertificate 14 8 ([[], [], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover178 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 8 ([[], [], [1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p82, Certificates.k14t8p82_check⟩ + +private theorem k14t8_cover177 : ∀ P ∈ pathPatterns 2 2 [1, 1, 2], HasCheckedCertificate 14 8 ([[], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover178 + +private theorem k14t8_cover179 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 1], HasCheckedCertificate 14 8 ([[], [], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover180 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 1], HasCheckedCertificate 14 8 ([[], [], [1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p83, Certificates.k14t8p83_check⟩ + +private theorem k14t8_cover181 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 2], HasCheckedCertificate 14 8 ([[], [], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover182 : ∀ P ∈ pathPatterns 2 1 [1, 1, 3], HasCheckedCertificate 14 8 ([[], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover183 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 1], HasCheckedCertificate 14 8 ([[], [], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover184 : ∀ P ∈ pathPatterns 2 0 [1, 1, 4], HasCheckedCertificate 14 8 ([[], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover186 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 14 8 ([[], [], [1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p84, Certificates.k14t8p84_check⟩ + +private theorem k14t8_cover187 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 14 8 ([[], [], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover188 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 14 8 ([[], [], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover185 : ∀ P ∈ pathPatterns 3 3 [1, 2], HasCheckedCertificate 14 8 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k14t8_cover186 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover187 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover188 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover190 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 8 ([[], [], [1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p85, Certificates.k14t8p85_check⟩ + +private theorem k14t8_cover189 : ∀ P ∈ pathPatterns 2 2 [1, 2, 1], HasCheckedCertificate 14 8 ([[], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover190 + +private theorem k14t8_cover191 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 2], HasCheckedCertificate 14 8 ([[], [], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover192 : ∀ P ∈ pathPatterns 2 1 [1, 2, 2], HasCheckedCertificate 14 8 ([[], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover193 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 1], HasCheckedCertificate 14 8 ([[], [], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover194 : ∀ P ∈ pathPatterns 2 0 [1, 2, 3], HasCheckedCertificate 14 8 ([[], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover196 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 14 8 ([[], [], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover195 : ∀ P ∈ pathPatterns 3 2 [1, 3], HasCheckedCertificate 14 8 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover196 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover197 : ∀ P ∈ pathPatterns 2 1 [1, 3, 1], HasCheckedCertificate 14 8 ([[], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover198 : ∀ P ∈ pathPatterns 2 0 [1, 3, 2], HasCheckedCertificate 14 8 ([[], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover199 : ∀ P ∈ pathPatterns 3 1 [1, 4], HasCheckedCertificate 14 8 ([[], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover200 : ∀ P ∈ pathPatterns 2 0 [1, 4, 1], HasCheckedCertificate 14 8 ([[], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover201 : ∀ P ∈ pathPatterns 3 0 [1, 5], HasCheckedCertificate 14 8 ([[], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_seq133 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 14 8 ([[], []] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t8_cover134 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover160 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover168 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover171 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover172 + · exact by + intro _ + exact k14t8_cover173 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover174 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover175 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover176 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover177 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover179 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover180 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover181 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover182 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover183 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover184 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover185 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover189 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover191 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover192 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover193 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover194 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover195 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover197 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover198 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover199 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover200 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover201 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover204 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 8 ([[], [], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p86, Certificates.k14t8p86_check⟩ + +private theorem k14t8_cover203 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 14 8 ([[], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover204 + +private theorem k14t8_cover205 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 14 8 ([[], [], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover206 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 14 8 ([[], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover207 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 14 8 ([[], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover202 : ∀ P ∈ pathPatterns 4 4 [2], HasCheckedCertificate 14 8 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover203 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover205 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover206 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover207 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover208 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 2], HasCheckedCertificate 14 8 ([[], [], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover209 : ∀ P ∈ pathPatterns 2 1 [2, 1, 2], HasCheckedCertificate 14 8 ([[], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover210 : ∀ P ∈ pathPatterns 2 0 [2, 1, 3], HasCheckedCertificate 14 8 ([[], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover211 : ∀ P ∈ pathPatterns 3 2 [2, 2], HasCheckedCertificate 14 8 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover212 : ∀ P ∈ pathPatterns 2 0 [2, 2, 2], HasCheckedCertificate 14 8 ([[], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover213 : ∀ P ∈ pathPatterns 3 1 [2, 3], HasCheckedCertificate 14 8 ([[], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover214 : ∀ P ∈ pathPatterns 3 0 [2, 4], HasCheckedCertificate 14 8 ([[], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover216 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 14 8 ([[], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover215 : ∀ P ∈ pathPatterns 4 3 [3], HasCheckedCertificate 14 8 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover216 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover217 : ∀ P ∈ pathPatterns 3 0 [3, 3], HasCheckedCertificate 14 8 ([[], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover218 : ∀ P ∈ pathPatterns 4 2 [4], HasCheckedCertificate 14 8 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover219 : ∀ P ∈ pathPatterns 4 1 [5], HasCheckedCertificate 14 8 ([[], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover220 : ∀ P ∈ pathPatterns 4 0 [6], HasCheckedCertificate 14 8 ([[], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_seq6 : amountSequenceForall 5 6 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 8 ([[], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t8_cover7 + · intro q + fin_cases q + · exact k14t8_seq133 + + · exact by + constructor + · exact by + intro _ + exact k14t8_cover202 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover208 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover209 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover210 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover211 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover212 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover213 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover214 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover215 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover217 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover218 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover219 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover220 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover5 : ∀ P ∈ pathPatterns 6 6 [], HasCheckedCertificate 14 8 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact k14t8_seq6 + + +private theorem k14t8_cover225 : ∀ P ∈ pathPatterns 1 3 [1], HasCheckedCertificate 14 8 ([[], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover226 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 14 8 ([[], [1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p87, Certificates.k14t8p87_check⟩ + +private theorem k14t8_cover227 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 14 8 ([[], [1], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p88, Certificates.k14t8p88_check⟩ + +private theorem k14t8_cover228 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 14 8 ([[], [1], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p89, Certificates.k14t8p89_check⟩ + +private theorem k14t8_cover229 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 14 8 ([[], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover230 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 14 8 ([[], [1], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p90, Certificates.k14t8p90_check⟩ + +private theorem k14t8_cover231 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 14 8 ([[], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover232 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 14 8 ([[], [1], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover224 : ∀ P ∈ pathPatterns 3 4 [1], HasCheckedCertificate 14 8 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover225 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover226 + · exact by + intro _ + exact k14t8_cover227 + · exact by + intro _ + exact k14t8_cover228 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover229 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k14t8_cover230 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover231 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover232 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover234 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 14 8 ([[], [1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p91, Certificates.k14t8p91_check⟩ + +private theorem k14t8_cover235 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 14 8 ([[], [1], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p92, Certificates.k14t8p92_check⟩ + +private theorem k14t8_cover233 : ∀ P ∈ pathPatterns 2 3 [1, 1], HasCheckedCertificate 14 8 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover234 + · exact by + intro _ + exact k14t8_cover235 + +private theorem k14t8_cover236 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1], HasCheckedCertificate 14 8 ([[], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover237 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1], HasCheckedCertificate 14 8 ([[], [1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p93, Certificates.k14t8p93_check⟩ + +private theorem k14t8_cover238 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2], HasCheckedCertificate 14 8 ([[], [1], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p94, Certificates.k14t8p94_check⟩ + +private theorem k14t8_cover239 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2], HasCheckedCertificate 14 8 ([[], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover240 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1], HasCheckedCertificate 14 8 ([[], [1], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p95, Certificates.k14t8p95_check⟩ + +private theorem k14t8_cover241 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3], HasCheckedCertificate 14 8 ([[], [1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover243 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 8 ([[], [1], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p96, Certificates.k14t8p96_check⟩ + +private theorem k14t8_cover242 : ∀ P ∈ pathPatterns 2 2 [1, 2], HasCheckedCertificate 14 8 ([[], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover243 + +private theorem k14t8_cover244 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1], HasCheckedCertificate 14 8 ([[], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover245 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2], HasCheckedCertificate 14 8 ([[], [1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover246 : ∀ P ∈ pathPatterns 2 1 [1, 3], HasCheckedCertificate 14 8 ([[], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover247 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1], HasCheckedCertificate 14 8 ([[], [1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover248 : ∀ P ∈ pathPatterns 2 0 [1, 4], HasCheckedCertificate 14 8 ([[], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover250 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 14 8 ([[], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover251 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 14 8 ([[], [1], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover249 : ∀ P ∈ pathPatterns 3 3 [2], HasCheckedCertificate 14 8 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover250 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover251 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover252 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2], HasCheckedCertificate 14 8 ([[], [1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover253 : ∀ P ∈ pathPatterns 2 1 [2, 2], HasCheckedCertificate 14 8 ([[], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover254 : ∀ P ∈ pathPatterns 2 0 [2, 3], HasCheckedCertificate 14 8 ([[], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover255 : ∀ P ∈ pathPatterns 3 2 [3], HasCheckedCertificate 14 8 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover256 : ∀ P ∈ pathPatterns 3 1 [4], HasCheckedCertificate 14 8 ([[], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover257 : ∀ P ∈ pathPatterns 3 0 [5], HasCheckedCertificate 14 8 ([[], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_seq223 : amountSequenceForall 4 5 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 8 ([[], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover224 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover233 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover236 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover237 + · exact by + intro _ + exact k14t8_cover238 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover239 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover240 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover241 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover242 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover244 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover245 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover246 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover247 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover248 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover249 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover252 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover253 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover254 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover255 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover256 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover257 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover222 : ∀ P ∈ pathPatterns 5 5 [1], HasCheckedCertificate 14 8 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k14t8_seq223 + + +private theorem k14t8_cover259 : ∀ P ∈ pathPatterns 1 2 [1, 1], HasCheckedCertificate 14 8 ([[], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover260 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1], HasCheckedCertificate 14 8 ([[], [1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p97, Certificates.k14t8p97_check⟩ + +private theorem k14t8_cover261 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2], HasCheckedCertificate 14 8 ([[], [1, 1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p98, Certificates.k14t8p98_check⟩ + +private theorem k14t8_cover262 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 14 8 ([[], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover263 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 14 8 ([[], [1, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p99, Certificates.k14t8p99_check⟩ + +private theorem k14t8_cover264 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 14 8 ([[], [1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover266 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 8 ([[], [1, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p100, Certificates.k14t8p100_check⟩ + +private theorem k14t8_cover265 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 14 8 ([[], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover266 + +private theorem k14t8_cover267 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 14 8 ([[], [1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover268 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 14 8 ([[], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover269 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 14 8 ([[], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover258 : ∀ P ∈ pathPatterns 4 4 [1, 1], HasCheckedCertificate 14 8 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover259 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover260 + · exact by + intro _ + exact k14t8_cover261 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover262 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover263 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover264 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover265 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover267 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover268 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover269 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover271 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 14 8 ([[], [1, 1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p101, Certificates.k14t8p101_check⟩ + +private theorem k14t8_cover272 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 14 8 ([[], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover273 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 14 8 ([[], [1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover270 : ∀ P ∈ pathPatterns 3 3 [1, 1, 1], HasCheckedCertificate 14 8 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k14t8_cover271 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover272 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover273 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover275 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 8 ([[], [1, 1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p102, Certificates.k14t8p102_check⟩ + +private theorem k14t8_cover274 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1, 1], HasCheckedCertificate 14 8 ([[], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover275 + +private theorem k14t8_cover276 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1, 1], HasCheckedCertificate 14 8 ([[], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover277 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1, 1], HasCheckedCertificate 14 8 ([[], [1, 1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p103, Certificates.k14t8p103_check⟩ + +private theorem k14t8_cover278 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 2], HasCheckedCertificate 14 8 ([[], [1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover279 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 2], HasCheckedCertificate 14 8 ([[], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover280 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2, 1], HasCheckedCertificate 14 8 ([[], [1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover281 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 3], HasCheckedCertificate 14 8 ([[], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover283 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 14 8 ([[], [1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover282 : ∀ P ∈ pathPatterns 3 2 [1, 1, 2], HasCheckedCertificate 14 8 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover283 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover284 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2, 1], HasCheckedCertificate 14 8 ([[], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover285 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1, 1], HasCheckedCertificate 14 8 ([[], [1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover286 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 2], HasCheckedCertificate 14 8 ([[], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover287 : ∀ P ∈ pathPatterns 3 1 [1, 1, 3], HasCheckedCertificate 14 8 ([[], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover288 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3, 1], HasCheckedCertificate 14 8 ([[], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover289 : ∀ P ∈ pathPatterns 3 0 [1, 1, 4], HasCheckedCertificate 14 8 ([[], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover291 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 14 8 ([[], [1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover292 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 14 8 ([[], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover293 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 14 8 ([[], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover290 : ∀ P ∈ pathPatterns 4 3 [1, 2], HasCheckedCertificate 14 8 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover291 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover292 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover293 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover295 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 14 8 ([[], [1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover294 : ∀ P ∈ pathPatterns 3 2 [1, 2, 1], HasCheckedCertificate 14 8 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover295 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover296 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 2], HasCheckedCertificate 14 8 ([[], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover297 : ∀ P ∈ pathPatterns 3 1 [1, 2, 2], HasCheckedCertificate 14 8 ([[], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover298 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2, 1], HasCheckedCertificate 14 8 ([[], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover299 : ∀ P ∈ pathPatterns 3 0 [1, 2, 3], HasCheckedCertificate 14 8 ([[], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover301 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 14 8 ([[], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover300 : ∀ P ∈ pathPatterns 4 2 [1, 3], HasCheckedCertificate 14 8 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover301 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover302 : ∀ P ∈ pathPatterns 3 1 [1, 3, 1], HasCheckedCertificate 14 8 ([[], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover303 : ∀ P ∈ pathPatterns 3 0 [1, 3, 2], HasCheckedCertificate 14 8 ([[], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover304 : ∀ P ∈ pathPatterns 4 1 [1, 4], HasCheckedCertificate 14 8 ([[], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover305 : ∀ P ∈ pathPatterns 3 0 [1, 4, 1], HasCheckedCertificate 14 8 ([[], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover306 : ∀ P ∈ pathPatterns 4 0 [1, 5], HasCheckedCertificate 14 8 ([[], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_seq221 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 14 8 ([[]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t8_cover222 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover258 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover270 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover274 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover276 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover277 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover278 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover279 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover280 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover281 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover282 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover284 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover285 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover286 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover287 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover288 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover289 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover290 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover294 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover296 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover297 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover298 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover299 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover300 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover302 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover303 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover304 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover305 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover306 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover309 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 14 8 ([[], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover308 : ∀ P ∈ pathPatterns 3 2 [2], HasCheckedCertificate 14 8 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover309 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover310 : ∀ P ∈ pathPatterns 2 0 [2, 2], HasCheckedCertificate 14 8 ([[], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover311 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 14 8 ([[], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover312 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 14 8 ([[], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover307 : ∀ P ∈ pathPatterns 5 4 [2], HasCheckedCertificate 14 8 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover308 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover310 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover311 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover312 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover313 : ∀ P ∈ pathPatterns 2 0 [2, 1, 1, 2], HasCheckedCertificate 14 8 ([[], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover314 : ∀ P ∈ pathPatterns 3 1 [2, 1, 2], HasCheckedCertificate 14 8 ([[], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover315 : ∀ P ∈ pathPatterns 3 0 [2, 1, 3], HasCheckedCertificate 14 8 ([[], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover316 : ∀ P ∈ pathPatterns 4 2 [2, 2], HasCheckedCertificate 14 8 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover317 : ∀ P ∈ pathPatterns 3 0 [2, 2, 2], HasCheckedCertificate 14 8 ([[], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover318 : ∀ P ∈ pathPatterns 4 1 [2, 3], HasCheckedCertificate 14 8 ([[], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover319 : ∀ P ∈ pathPatterns 4 0 [2, 4], HasCheckedCertificate 14 8 ([[], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover321 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 14 8 ([[], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover320 : ∀ P ∈ pathPatterns 5 3 [3], HasCheckedCertificate 14 8 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover321 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover322 : ∀ P ∈ pathPatterns 4 0 [3, 3], HasCheckedCertificate 14 8 ([[], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover323 : ∀ P ∈ pathPatterns 5 2 [4], HasCheckedCertificate 14 8 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover324 : ∀ P ∈ pathPatterns 5 1 [5], HasCheckedCertificate 14 8 ([[], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover325 : ∀ P ∈ pathPatterns 5 0 [6], HasCheckedCertificate 14 8 ([[], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_seq4 : amountSequenceForall 6 6 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 8 ([[]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t8_cover5 + · intro q + fin_cases q + · exact k14t8_seq221 + + · exact by + constructor + · exact by + intro _ + exact k14t8_cover307 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover313 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover314 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover315 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover316 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover317 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover318 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover319 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover320 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover322 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover323 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover324 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover325 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover3 : ∀ P ∈ pathPatterns 7 6 [], HasCheckedCertificate 14 8 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact k14t8_seq4 + + +private theorem k14t8_cover331 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 14 8 ([[1], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p104, Certificates.k14t8p104_check⟩ + +private theorem k14t8_cover332 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 14 8 ([[1], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p105, Certificates.k14t8p105_check⟩ + +private theorem k14t8_cover333 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 14 8 ([[1], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p106, Certificates.k14t8p106_check⟩ + +private theorem k14t8_cover330 : ∀ P ∈ pathPatterns 2 3 [1], HasCheckedCertificate 14 8 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover331 + · exact by + intro _ + exact k14t8_cover332 + · exact by + intro _ + exact k14t8_cover333 + +private theorem k14t8_cover334 : ∀ P ∈ pathPatterns 1 2 [1, 1], HasCheckedCertificate 14 8 ([[1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover335 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1], HasCheckedCertificate 14 8 ([[1], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p107, Certificates.k14t8p107_check⟩ + +private theorem k14t8_cover336 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2], HasCheckedCertificate 14 8 ([[1], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p108, Certificates.k14t8p108_check⟩ + +private theorem k14t8_cover337 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 14 8 ([[1], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover338 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 14 8 ([[1], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p109, Certificates.k14t8p109_check⟩ + +private theorem k14t8_cover339 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 14 8 ([[1], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover341 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 8 ([[1], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p110, Certificates.k14t8p110_check⟩ + +private theorem k14t8_cover340 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 14 8 ([[1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover341 + +private theorem k14t8_cover342 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 14 8 ([[1], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover343 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 14 8 ([[1], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover344 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 14 8 ([[1], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover329 : ∀ P ∈ pathPatterns 4 4 [1], HasCheckedCertificate 14 8 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover330 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover334 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover335 + · exact by + intro _ + exact k14t8_cover336 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover337 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover338 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover339 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover340 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover342 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover343 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover344 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover346 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 14 8 ([[1], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p111, Certificates.k14t8p111_check⟩ + +private theorem k14t8_cover347 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 14 8 ([[1], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p112, Certificates.k14t8p112_check⟩ + +private theorem k14t8_cover348 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 14 8 ([[1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover349 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 14 8 ([[1], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover345 : ∀ P ∈ pathPatterns 3 3 [1, 1], HasCheckedCertificate 14 8 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover346 + · exact by + intro _ + exact k14t8_cover347 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover348 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover349 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover351 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 8 ([[1], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p113, Certificates.k14t8p113_check⟩ + +private theorem k14t8_cover350 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1], HasCheckedCertificate 14 8 ([[1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover351 + +private theorem k14t8_cover352 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1], HasCheckedCertificate 14 8 ([[1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover353 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1], HasCheckedCertificate 14 8 ([[1], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p114, Certificates.k14t8p114_check⟩ + +private theorem k14t8_cover354 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2], HasCheckedCertificate 14 8 ([[1], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover355 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2], HasCheckedCertificate 14 8 ([[1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover356 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1], HasCheckedCertificate 14 8 ([[1], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover357 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3], HasCheckedCertificate 14 8 ([[1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover359 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 14 8 ([[1], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover358 : ∀ P ∈ pathPatterns 3 2 [1, 2], HasCheckedCertificate 14 8 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover359 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover360 : ∀ P ∈ pathPatterns 2 1 [1, 2, 1], HasCheckedCertificate 14 8 ([[1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover361 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2], HasCheckedCertificate 14 8 ([[1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover362 : ∀ P ∈ pathPatterns 3 1 [1, 3], HasCheckedCertificate 14 8 ([[1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover363 : ∀ P ∈ pathPatterns 2 0 [1, 3, 1], HasCheckedCertificate 14 8 ([[1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover364 : ∀ P ∈ pathPatterns 3 0 [1, 4], HasCheckedCertificate 14 8 ([[1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover366 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 14 8 ([[1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover367 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 14 8 ([[1], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover365 : ∀ P ∈ pathPatterns 4 3 [2], HasCheckedCertificate 14 8 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover366 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover367 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover368 : ∀ P ∈ pathPatterns 2 0 [2, 1, 2], HasCheckedCertificate 14 8 ([[1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover369 : ∀ P ∈ pathPatterns 3 1 [2, 2], HasCheckedCertificate 14 8 ([[1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover370 : ∀ P ∈ pathPatterns 3 0 [2, 3], HasCheckedCertificate 14 8 ([[1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover371 : ∀ P ∈ pathPatterns 4 2 [3], HasCheckedCertificate 14 8 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover372 : ∀ P ∈ pathPatterns 4 1 [4], HasCheckedCertificate 14 8 ([[1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover373 : ∀ P ∈ pathPatterns 4 0 [5], HasCheckedCertificate 14 8 ([[1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_seq328 : amountSequenceForall 5 5 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 8 ([[1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover329 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover345 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover350 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover352 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover353 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover354 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover355 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover356 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover357 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover358 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover360 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover361 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover362 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover363 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover364 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover365 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover368 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover369 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover370 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover371 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover372 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover373 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover327 : ∀ P ∈ pathPatterns 6 5 [1], HasCheckedCertificate 14 8 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact k14t8_seq328 + + +private theorem k14t8_cover376 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 14 8 ([[1, 1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p115, Certificates.k14t8p115_check⟩ + +private theorem k14t8_cover375 : ∀ P ∈ pathPatterns 2 2 [1, 1], HasCheckedCertificate 14 8 ([[1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k14t8_cover376 + +private theorem k14t8_cover377 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1], HasCheckedCertificate 14 8 ([[1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover378 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1], HasCheckedCertificate 14 8 ([[1, 1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p116, Certificates.k14t8p116_check⟩ + +private theorem k14t8_cover379 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2], HasCheckedCertificate 14 8 ([[1, 1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover380 : ∀ P ∈ pathPatterns 2 1 [1, 2], HasCheckedCertificate 14 8 ([[1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover381 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1], HasCheckedCertificate 14 8 ([[1, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover382 : ∀ P ∈ pathPatterns 2 0 [1, 3], HasCheckedCertificate 14 8 ([[1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover384 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 14 8 ([[1, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover383 : ∀ P ∈ pathPatterns 3 2 [2], HasCheckedCertificate 14 8 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover384 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover385 : ∀ P ∈ pathPatterns 2 0 [2, 2], HasCheckedCertificate 14 8 ([[1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover386 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 14 8 ([[1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover387 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 14 8 ([[1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover374 : ∀ P ∈ pathPatterns 5 4 [1, 1], HasCheckedCertificate 14 8 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover375 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover377 + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover378 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover379 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover380 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover381 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover382 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover383 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover385 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover386 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover387 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover389 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1], HasCheckedCertificate 14 8 ([[1, 1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k14t8p117, Certificates.k14t8p117_check⟩ + +private theorem k14t8_cover390 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 14 8 ([[1, 1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover391 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 14 8 ([[1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover392 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 14 8 ([[1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover388 : ∀ P ∈ pathPatterns 4 3 [1, 1, 1], HasCheckedCertificate 14 8 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k14t8_cover389 + · exact by + constructor + · exact by + intro _ + exact k14t8_cover390 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover391 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover392 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover394 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 14 8 ([[1, 1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover393 : ∀ P ∈ pathPatterns 3 2 [1, 1, 1, 1], HasCheckedCertificate 14 8 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k14t8_cover394 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover395 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 1, 1], HasCheckedCertificate 14 8 ([[1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k14t8_cover396 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 1, 1], HasCheckedCertificate 14 8 ([[1, 1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k14t8_cover397 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 1, 2], HasCheckedCertificate 14 8 ([[1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover398 : ∀ P ∈ pathPatterns 3 1 [1, 1, 1, 2], HasCheckedCertificate 14 8 ([[1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover399 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 2, 1], HasCheckedCertificate 14 8 ([[1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover400 : ∀ P ∈ pathPatterns 3 0 [1, 1, 1, 3], HasCheckedCertificate 14 8 ([[1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover402 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 14 8 ([[1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover401 : ∀ P ∈ pathPatterns 4 2 [1, 1, 2], HasCheckedCertificate 14 8 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover402 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover403 : ∀ P ∈ pathPatterns 3 1 [1, 1, 2, 1], HasCheckedCertificate 14 8 ([[1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover404 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 1, 1], HasCheckedCertificate 14 8 ([[1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover405 : ∀ P ∈ pathPatterns 3 0 [1, 1, 2, 2], HasCheckedCertificate 14 8 ([[1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover406 : ∀ P ∈ pathPatterns 4 1 [1, 1, 3], HasCheckedCertificate 14 8 ([[1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover407 : ∀ P ∈ pathPatterns 3 0 [1, 1, 3, 1], HasCheckedCertificate 14 8 ([[1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover408 : ∀ P ∈ pathPatterns 4 0 [1, 1, 4], HasCheckedCertificate 14 8 ([[1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover410 : ∀ P ∈ pathPatterns 2 0 [1, 2], HasCheckedCertificate 14 8 ([[1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover411 : ∀ P ∈ pathPatterns 3 1 [2], HasCheckedCertificate 14 8 ([[1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover412 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 14 8 ([[1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover409 : ∀ P ∈ pathPatterns 5 3 [1, 2], HasCheckedCertificate 14 8 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover410 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover411 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover412 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover414 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 14 8 ([[1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover413 : ∀ P ∈ pathPatterns 4 2 [1, 2, 1], HasCheckedCertificate 14 8 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover414 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover415 : ∀ P ∈ pathPatterns 3 0 [1, 2, 1, 2], HasCheckedCertificate 14 8 ([[1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover416 : ∀ P ∈ pathPatterns 4 1 [1, 2, 2], HasCheckedCertificate 14 8 ([[1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover417 : ∀ P ∈ pathPatterns 3 0 [1, 2, 2, 1], HasCheckedCertificate 14 8 ([[1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover418 : ∀ P ∈ pathPatterns 4 0 [1, 2, 3], HasCheckedCertificate 14 8 ([[1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover420 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 14 8 ([[1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover419 : ∀ P ∈ pathPatterns 5 2 [1, 3], HasCheckedCertificate 14 8 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover420 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover421 : ∀ P ∈ pathPatterns 4 1 [1, 3, 1], HasCheckedCertificate 14 8 ([[1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover422 : ∀ P ∈ pathPatterns 4 0 [1, 3, 2], HasCheckedCertificate 14 8 ([[1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover423 : ∀ P ∈ pathPatterns 5 1 [1, 4], HasCheckedCertificate 14 8 ([[1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover424 : ∀ P ∈ pathPatterns 4 0 [1, 4, 1], HasCheckedCertificate 14 8 ([[1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover425 : ∀ P ∈ pathPatterns 5 0 [1, 5], HasCheckedCertificate 14 8 ([[1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_seq326 : amountSequenceForall 6 5 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 14 8 ([] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t8_cover327 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover374 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover388 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover393 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover395 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover396 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover397 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover398 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover399 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover400 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover401 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover403 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover404 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover405 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover406 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover407 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover408 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover409 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover413 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover415 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover416 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover417 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover418 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover419 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover421 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover422 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover423 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover424 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover425 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover428 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 14 8 ([[2], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover427 : ∀ P ∈ pathPatterns 4 2 [2], HasCheckedCertificate 14 8 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover428 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover429 : ∀ P ∈ pathPatterns 3 0 [2, 2], HasCheckedCertificate 14 8 ([[2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover430 : ∀ P ∈ pathPatterns 4 1 [3], HasCheckedCertificate 14 8 ([[2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover431 : ∀ P ∈ pathPatterns 4 0 [4], HasCheckedCertificate 14 8 ([[2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover426 : ∀ P ∈ pathPatterns 6 4 [2], HasCheckedCertificate 14 8 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover427 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover429 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover430 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover431 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover432 : ∀ P ∈ pathPatterns 3 0 [2, 1, 1, 2], HasCheckedCertificate 14 8 ([[2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover433 : ∀ P ∈ pathPatterns 4 1 [2, 1, 2], HasCheckedCertificate 14 8 ([[2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover434 : ∀ P ∈ pathPatterns 4 0 [2, 1, 3], HasCheckedCertificate 14 8 ([[2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover435 : ∀ P ∈ pathPatterns 5 2 [2, 2], HasCheckedCertificate 14 8 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover436 : ∀ P ∈ pathPatterns 4 0 [2, 2, 2], HasCheckedCertificate 14 8 ([[2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover437 : ∀ P ∈ pathPatterns 5 1 [2, 3], HasCheckedCertificate 14 8 ([[2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover438 : ∀ P ∈ pathPatterns 5 0 [2, 4], HasCheckedCertificate 14 8 ([[2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover440 : ∀ P ∈ pathPatterns 4 0 [3], HasCheckedCertificate 14 8 ([[3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover439 : ∀ P ∈ pathPatterns 6 3 [3], HasCheckedCertificate 14 8 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover440 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover441 : ∀ P ∈ pathPatterns 5 0 [3, 3], HasCheckedCertificate 14 8 ([[3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover442 : ∀ P ∈ pathPatterns 6 2 [4], HasCheckedCertificate 14 8 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover443 : ∀ P ∈ pathPatterns 6 1 [5], HasCheckedCertificate 14 8 ([[5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover444 : ∀ P ∈ pathPatterns 6 0 [6], HasCheckedCertificate 14 8 ([[6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k14t8_seq2 : amountSequenceForall 7 6 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 14 8 ([] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k14t8_cover3 + · intro q + fin_cases q + · exact k14t8_seq326 + + · exact by + constructor + · exact by + intro _ + exact k14t8_cover426 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover432 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover433 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover434 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover435 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover436 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover437 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover438 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover439 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover441 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover442 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover443 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k14t8_cover444 + · intro q + exact Fin.elim0 q + +private theorem k14t8_cover1 : ∀ P ∈ pathPatterns 8 6 [], HasCheckedCertificate 14 8 ([] ++ P) := by + apply pathPatterns_forall_step + exact k14t8_seq2 + + +theorem coverage_k14_t8 : + ∀ P ∈ pathPatterns 8 6, HasCheckedCertificate 14 8 P := + k14t8_cover1 + +end CycleClique.Construction.CertifiedCoverage + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK15.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK15.lean new file mode 100644 index 0000000000000000000000000000000000000000..dca28979ee303b2b2b70fce2e430bba30094b8ce --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK15.lean @@ -0,0 +1,29477 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK15 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage + +namespace OAI + +namespace CycleClique.Construction.CertifiedCoverage + +private theorem k15t7_cover13 : ∀ P ∈ pathPatterns 0 8 [], HasCheckedCertificate 15 7 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p0, Certificates.k15t7p0_check⟩ + +private theorem k15t7_cover12 : ∀ P ∈ pathPatterns 1 8 [], HasCheckedCertificate 15 7 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k15t7_cover13 + +private theorem k15t7_cover14 : ∀ P ∈ pathPatterns 0 7 [1], HasCheckedCertificate 15 7 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p1, Certificates.k15t7p1_check⟩ + +private theorem k15t7_cover15 : ∀ P ∈ pathPatterns 0 6 [2], HasCheckedCertificate 15 7 ([[], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p2, Certificates.k15t7p2_check⟩ + +private theorem k15t7_cover16 : ∀ P ∈ pathPatterns 0 5 [3], HasCheckedCertificate 15 7 ([[], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p3, Certificates.k15t7p3_check⟩ + +private theorem k15t7_cover17 : ∀ P ∈ pathPatterns 0 4 [4], HasCheckedCertificate 15 7 ([[], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p4, Certificates.k15t7p4_check⟩ + +private theorem k15t7_cover18 : ∀ P ∈ pathPatterns 0 3 [5], HasCheckedCertificate 15 7 ([[], [], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p5, Certificates.k15t7p5_check⟩ + +private theorem k15t7_cover19 : ∀ P ∈ pathPatterns 0 2 [6], HasCheckedCertificate 15 7 ([[], [], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p6, Certificates.k15t7p6_check⟩ + +private theorem k15t7_cover20 : ∀ P ∈ pathPatterns 0 1 [7], HasCheckedCertificate 15 7 ([[], [], [], [], [], [7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p7, Certificates.k15t7p7_check⟩ + +private theorem k15t7_cover21 : ∀ P ∈ pathPatterns 0 0 [8], HasCheckedCertificate 15 7 ([[], [], [], [], [], [8]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p8, Certificates.k15t7p8_check⟩ + +private theorem k15t7_cover11 : ∀ P ∈ pathPatterns 2 8 [], HasCheckedCertificate 15 7 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k15t7_cover12 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover14 + · exact by + intro _ + exact k15t7_cover15 + · exact by + intro _ + exact k15t7_cover16 + · exact by + intro _ + exact k15t7_cover17 + · exact by + intro _ + exact k15t7_cover18 + · exact by + intro _ + exact k15t7_cover19 + · exact by + intro _ + exact k15t7_cover20 + · exact by + intro _ + exact k15t7_cover21 + +private theorem k15t7_cover22 : ∀ P ∈ pathPatterns 1 7 [1], HasCheckedCertificate 15 7 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover23 : ∀ P ∈ pathPatterns 0 6 [1, 1], HasCheckedCertificate 15 7 ([[], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p9, Certificates.k15t7p9_check⟩ + +private theorem k15t7_cover24 : ∀ P ∈ pathPatterns 0 5 [1, 2], HasCheckedCertificate 15 7 ([[], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p10, Certificates.k15t7p10_check⟩ + +private theorem k15t7_cover25 : ∀ P ∈ pathPatterns 0 4 [1, 3], HasCheckedCertificate 15 7 ([[], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p11, Certificates.k15t7p11_check⟩ + +private theorem k15t7_cover26 : ∀ P ∈ pathPatterns 0 3 [1, 4], HasCheckedCertificate 15 7 ([[], [], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p12, Certificates.k15t7p12_check⟩ + +private theorem k15t7_cover27 : ∀ P ∈ pathPatterns 0 2 [1, 5], HasCheckedCertificate 15 7 ([[], [], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p13, Certificates.k15t7p13_check⟩ + +private theorem k15t7_cover28 : ∀ P ∈ pathPatterns 0 1 [1, 6], HasCheckedCertificate 15 7 ([[], [], [], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p14, Certificates.k15t7p14_check⟩ + +private theorem k15t7_cover29 : ∀ P ∈ pathPatterns 0 0 [1, 7], HasCheckedCertificate 15 7 ([[], [], [], [], [1, 7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p15, Certificates.k15t7p15_check⟩ + +private theorem k15t7_cover30 : ∀ P ∈ pathPatterns 1 6 [2], HasCheckedCertificate 15 7 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover31 : ∀ P ∈ pathPatterns 0 4 [2, 2], HasCheckedCertificate 15 7 ([[], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p16, Certificates.k15t7p16_check⟩ + +private theorem k15t7_cover32 : ∀ P ∈ pathPatterns 0 3 [2, 3], HasCheckedCertificate 15 7 ([[], [], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p17, Certificates.k15t7p17_check⟩ + +private theorem k15t7_cover33 : ∀ P ∈ pathPatterns 0 2 [2, 4], HasCheckedCertificate 15 7 ([[], [], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p18, Certificates.k15t7p18_check⟩ + +private theorem k15t7_cover34 : ∀ P ∈ pathPatterns 0 1 [2, 5], HasCheckedCertificate 15 7 ([[], [], [], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p19, Certificates.k15t7p19_check⟩ + +private theorem k15t7_cover35 : ∀ P ∈ pathPatterns 0 0 [2, 6], HasCheckedCertificate 15 7 ([[], [], [], [], [2, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p20, Certificates.k15t7p20_check⟩ + +private theorem k15t7_cover36 : ∀ P ∈ pathPatterns 1 5 [3], HasCheckedCertificate 15 7 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover37 : ∀ P ∈ pathPatterns 0 2 [3, 3], HasCheckedCertificate 15 7 ([[], [], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p21, Certificates.k15t7p21_check⟩ + +private theorem k15t7_cover38 : ∀ P ∈ pathPatterns 0 1 [3, 4], HasCheckedCertificate 15 7 ([[], [], [], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p22, Certificates.k15t7p22_check⟩ + +private theorem k15t7_cover39 : ∀ P ∈ pathPatterns 0 0 [3, 5], HasCheckedCertificate 15 7 ([[], [], [], [], [3, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p23, Certificates.k15t7p23_check⟩ + +private theorem k15t7_cover40 : ∀ P ∈ pathPatterns 1 4 [4], HasCheckedCertificate 15 7 ([[], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover41 : ∀ P ∈ pathPatterns 0 0 [4, 4], HasCheckedCertificate 15 7 ([[], [], [], [], [4, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p24, Certificates.k15t7p24_check⟩ + +private theorem k15t7_cover42 : ∀ P ∈ pathPatterns 1 3 [5], HasCheckedCertificate 15 7 ([[], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover43 : ∀ P ∈ pathPatterns 1 2 [6], HasCheckedCertificate 15 7 ([[], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover44 : ∀ P ∈ pathPatterns 1 1 [7], HasCheckedCertificate 15 7 ([[], [], [], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover45 : ∀ P ∈ pathPatterns 1 0 [8], HasCheckedCertificate 15 7 ([[], [], [], [], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + +private theorem k15t7_seq10 : amountSequenceForall 2 8 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (2 - ([] ++ tail).length) (8 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 7 ([[], [], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover11 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover22 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover23 + · exact by + intro _ + exact k15t7_cover24 + · exact by + intro _ + exact k15t7_cover25 + · exact by + intro _ + exact k15t7_cover26 + · exact by + intro _ + exact k15t7_cover27 + · exact by + intro _ + exact k15t7_cover28 + · exact by + intro _ + exact k15t7_cover29 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover30 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t7_cover31 + · exact by + intro _ + exact k15t7_cover32 + · exact by + intro _ + exact k15t7_cover33 + · exact by + intro _ + exact k15t7_cover34 + · exact by + intro _ + exact k15t7_cover35 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover36 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k15t7_cover37 + · exact by + intro _ + exact k15t7_cover38 + · exact by + intro _ + exact k15t7_cover39 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover40 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · exact by + intro _ + exact k15t7_cover41 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover42 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover43 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover44 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover45 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover9 : ∀ P ∈ pathPatterns 3 8 [], HasCheckedCertificate 15 7 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k15t7_seq10 + + +private theorem k15t7_cover48 : ∀ P ∈ pathPatterns 0 6 [1], HasCheckedCertificate 15 7 ([[], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p25, Certificates.k15t7p25_check⟩ + +private theorem k15t7_cover49 : ∀ P ∈ pathPatterns 0 5 [2], HasCheckedCertificate 15 7 ([[], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p26, Certificates.k15t7p26_check⟩ + +private theorem k15t7_cover50 : ∀ P ∈ pathPatterns 0 4 [3], HasCheckedCertificate 15 7 ([[], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p27, Certificates.k15t7p27_check⟩ + +private theorem k15t7_cover51 : ∀ P ∈ pathPatterns 0 3 [4], HasCheckedCertificate 15 7 ([[], [], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p28, Certificates.k15t7p28_check⟩ + +private theorem k15t7_cover52 : ∀ P ∈ pathPatterns 0 2 [5], HasCheckedCertificate 15 7 ([[], [], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p29, Certificates.k15t7p29_check⟩ + +private theorem k15t7_cover53 : ∀ P ∈ pathPatterns 0 1 [6], HasCheckedCertificate 15 7 ([[], [], [], [1], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p30, Certificates.k15t7p30_check⟩ + +private theorem k15t7_cover54 : ∀ P ∈ pathPatterns 0 0 [7], HasCheckedCertificate 15 7 ([[], [], [], [1], [7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p31, Certificates.k15t7p31_check⟩ + +private theorem k15t7_cover47 : ∀ P ∈ pathPatterns 2 7 [1], HasCheckedCertificate 15 7 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover48 + · exact by + intro _ + exact k15t7_cover49 + · exact by + intro _ + exact k15t7_cover50 + · exact by + intro _ + exact k15t7_cover51 + · exact by + intro _ + exact k15t7_cover52 + · exact by + intro _ + exact k15t7_cover53 + · exact by + intro _ + exact k15t7_cover54 + +private theorem k15t7_cover55 : ∀ P ∈ pathPatterns 1 6 [1, 1], HasCheckedCertificate 15 7 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover56 : ∀ P ∈ pathPatterns 0 5 [1, 1, 1], HasCheckedCertificate 15 7 ([[], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p32, Certificates.k15t7p32_check⟩ + +private theorem k15t7_cover57 : ∀ P ∈ pathPatterns 0 4 [1, 1, 2], HasCheckedCertificate 15 7 ([[], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p33, Certificates.k15t7p33_check⟩ + +private theorem k15t7_cover58 : ∀ P ∈ pathPatterns 0 3 [1, 1, 3], HasCheckedCertificate 15 7 ([[], [], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p34, Certificates.k15t7p34_check⟩ + +private theorem k15t7_cover59 : ∀ P ∈ pathPatterns 0 2 [1, 1, 4], HasCheckedCertificate 15 7 ([[], [], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p35, Certificates.k15t7p35_check⟩ + +private theorem k15t7_cover60 : ∀ P ∈ pathPatterns 0 1 [1, 1, 5], HasCheckedCertificate 15 7 ([[], [], [], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p36, Certificates.k15t7p36_check⟩ + +private theorem k15t7_cover61 : ∀ P ∈ pathPatterns 0 0 [1, 1, 6], HasCheckedCertificate 15 7 ([[], [], [], [1, 1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p37, Certificates.k15t7p37_check⟩ + +private theorem k15t7_cover62 : ∀ P ∈ pathPatterns 1 5 [1, 2], HasCheckedCertificate 15 7 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover63 : ∀ P ∈ pathPatterns 0 4 [1, 2, 1], HasCheckedCertificate 15 7 ([[], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p38, Certificates.k15t7p38_check⟩ + +private theorem k15t7_cover64 : ∀ P ∈ pathPatterns 0 3 [1, 2, 2], HasCheckedCertificate 15 7 ([[], [], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p39, Certificates.k15t7p39_check⟩ + +private theorem k15t7_cover65 : ∀ P ∈ pathPatterns 0 2 [1, 2, 3], HasCheckedCertificate 15 7 ([[], [], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p40, Certificates.k15t7p40_check⟩ + +private theorem k15t7_cover66 : ∀ P ∈ pathPatterns 0 1 [1, 2, 4], HasCheckedCertificate 15 7 ([[], [], [], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p41, Certificates.k15t7p41_check⟩ + +private theorem k15t7_cover67 : ∀ P ∈ pathPatterns 0 0 [1, 2, 5], HasCheckedCertificate 15 7 ([[], [], [], [1, 2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p42, Certificates.k15t7p42_check⟩ + +private theorem k15t7_cover68 : ∀ P ∈ pathPatterns 1 4 [1, 3], HasCheckedCertificate 15 7 ([[], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover69 : ∀ P ∈ pathPatterns 0 3 [1, 3, 1], HasCheckedCertificate 15 7 ([[], [], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p43, Certificates.k15t7p43_check⟩ + +private theorem k15t7_cover70 : ∀ P ∈ pathPatterns 0 2 [1, 3, 2], HasCheckedCertificate 15 7 ([[], [], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p44, Certificates.k15t7p44_check⟩ + +private theorem k15t7_cover71 : ∀ P ∈ pathPatterns 0 1 [1, 3, 3], HasCheckedCertificate 15 7 ([[], [], [], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p45, Certificates.k15t7p45_check⟩ + +private theorem k15t7_cover72 : ∀ P ∈ pathPatterns 0 0 [1, 3, 4], HasCheckedCertificate 15 7 ([[], [], [], [1, 3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p46, Certificates.k15t7p46_check⟩ + +private theorem k15t7_cover73 : ∀ P ∈ pathPatterns 1 3 [1, 4], HasCheckedCertificate 15 7 ([[], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover74 : ∀ P ∈ pathPatterns 0 2 [1, 4, 1], HasCheckedCertificate 15 7 ([[], [], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p47, Certificates.k15t7p47_check⟩ + +private theorem k15t7_cover75 : ∀ P ∈ pathPatterns 0 1 [1, 4, 2], HasCheckedCertificate 15 7 ([[], [], [], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p48, Certificates.k15t7p48_check⟩ + +private theorem k15t7_cover76 : ∀ P ∈ pathPatterns 0 0 [1, 4, 3], HasCheckedCertificate 15 7 ([[], [], [], [1, 4, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p49, Certificates.k15t7p49_check⟩ + +private theorem k15t7_cover77 : ∀ P ∈ pathPatterns 1 2 [1, 5], HasCheckedCertificate 15 7 ([[], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover78 : ∀ P ∈ pathPatterns 0 1 [1, 5, 1], HasCheckedCertificate 15 7 ([[], [], [], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p50, Certificates.k15t7p50_check⟩ + +private theorem k15t7_cover79 : ∀ P ∈ pathPatterns 0 0 [1, 5, 2], HasCheckedCertificate 15 7 ([[], [], [], [1, 5, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p51, Certificates.k15t7p51_check⟩ + +private theorem k15t7_cover80 : ∀ P ∈ pathPatterns 1 1 [1, 6], HasCheckedCertificate 15 7 ([[], [], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover81 : ∀ P ∈ pathPatterns 0 0 [1, 6, 1], HasCheckedCertificate 15 7 ([[], [], [], [1, 6, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p52, Certificates.k15t7p52_check⟩ + +private theorem k15t7_cover82 : ∀ P ∈ pathPatterns 1 0 [1, 7], HasCheckedCertificate 15 7 ([[], [], [], [1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + +private theorem k15t7_seq46 : amountSequenceForall 2 7 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([1] ++ tail).length) (8 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 15 7 ([[], [], []] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover47 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover55 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover56 + · exact by + intro _ + exact k15t7_cover57 + · exact by + intro _ + exact k15t7_cover58 + · exact by + intro _ + exact k15t7_cover59 + · exact by + intro _ + exact k15t7_cover60 + · exact by + intro _ + exact k15t7_cover61 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover62 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover63 + · exact by + intro _ + exact k15t7_cover64 + · exact by + intro _ + exact k15t7_cover65 + · exact by + intro _ + exact k15t7_cover66 + · exact by + intro _ + exact k15t7_cover67 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover68 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover69 + · exact by + intro _ + exact k15t7_cover70 + · exact by + intro _ + exact k15t7_cover71 + · exact by + intro _ + exact k15t7_cover72 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover73 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover74 + · exact by + intro _ + exact k15t7_cover75 + · exact by + intro _ + exact k15t7_cover76 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover77 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover78 + · exact by + intro _ + exact k15t7_cover79 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover80 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover81 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover82 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover84 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 15 7 ([[], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p53, Certificates.k15t7p53_check⟩ + +private theorem k15t7_cover85 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 15 7 ([[], [], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p54, Certificates.k15t7p54_check⟩ + +private theorem k15t7_cover86 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 15 7 ([[], [], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p55, Certificates.k15t7p55_check⟩ + +private theorem k15t7_cover87 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 15 7 ([[], [], [], [2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p56, Certificates.k15t7p56_check⟩ + +private theorem k15t7_cover88 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 15 7 ([[], [], [], [2], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p57, Certificates.k15t7p57_check⟩ + +private theorem k15t7_cover83 : ∀ P ∈ pathPatterns 2 6 [2], HasCheckedCertificate 15 7 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover84 + · exact by + intro _ + exact k15t7_cover85 + · exact by + intro _ + exact k15t7_cover86 + · exact by + intro _ + exact k15t7_cover87 + · exact by + intro _ + exact k15t7_cover88 + +private theorem k15t7_cover89 : ∀ P ∈ pathPatterns 0 3 [2, 1, 2], HasCheckedCertificate 15 7 ([[], [], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p58, Certificates.k15t7p58_check⟩ + +private theorem k15t7_cover90 : ∀ P ∈ pathPatterns 0 2 [2, 1, 3], HasCheckedCertificate 15 7 ([[], [], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p59, Certificates.k15t7p59_check⟩ + +private theorem k15t7_cover91 : ∀ P ∈ pathPatterns 0 1 [2, 1, 4], HasCheckedCertificate 15 7 ([[], [], [], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p60, Certificates.k15t7p60_check⟩ + +private theorem k15t7_cover92 : ∀ P ∈ pathPatterns 0 0 [2, 1, 5], HasCheckedCertificate 15 7 ([[], [], [], [2, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p61, Certificates.k15t7p61_check⟩ + +private theorem k15t7_cover93 : ∀ P ∈ pathPatterns 1 4 [2, 2], HasCheckedCertificate 15 7 ([[], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover94 : ∀ P ∈ pathPatterns 0 2 [2, 2, 2], HasCheckedCertificate 15 7 ([[], [], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p62, Certificates.k15t7p62_check⟩ + +private theorem k15t7_cover95 : ∀ P ∈ pathPatterns 0 1 [2, 2, 3], HasCheckedCertificate 15 7 ([[], [], [], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p63, Certificates.k15t7p63_check⟩ + +private theorem k15t7_cover96 : ∀ P ∈ pathPatterns 0 0 [2, 2, 4], HasCheckedCertificate 15 7 ([[], [], [], [2, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p64, Certificates.k15t7p64_check⟩ + +private theorem k15t7_cover97 : ∀ P ∈ pathPatterns 1 3 [2, 3], HasCheckedCertificate 15 7 ([[], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover98 : ∀ P ∈ pathPatterns 0 1 [2, 3, 2], HasCheckedCertificate 15 7 ([[], [], [], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p65, Certificates.k15t7p65_check⟩ + +private theorem k15t7_cover99 : ∀ P ∈ pathPatterns 0 0 [2, 3, 3], HasCheckedCertificate 15 7 ([[], [], [], [2, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p66, Certificates.k15t7p66_check⟩ + +private theorem k15t7_cover100 : ∀ P ∈ pathPatterns 1 2 [2, 4], HasCheckedCertificate 15 7 ([[], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover101 : ∀ P ∈ pathPatterns 0 0 [2, 4, 2], HasCheckedCertificate 15 7 ([[], [], [], [2, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p67, Certificates.k15t7p67_check⟩ + +private theorem k15t7_cover102 : ∀ P ∈ pathPatterns 1 1 [2, 5], HasCheckedCertificate 15 7 ([[], [], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover103 : ∀ P ∈ pathPatterns 1 0 [2, 6], HasCheckedCertificate 15 7 ([[], [], [], [2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover105 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 15 7 ([[], [], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p68, Certificates.k15t7p68_check⟩ + +private theorem k15t7_cover106 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 15 7 ([[], [], [], [3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p69, Certificates.k15t7p69_check⟩ + +private theorem k15t7_cover107 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 15 7 ([[], [], [], [3], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p70, Certificates.k15t7p70_check⟩ + +private theorem k15t7_cover104 : ∀ P ∈ pathPatterns 2 5 [3], HasCheckedCertificate 15 7 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k15t7_cover105 + · exact by + intro _ + exact k15t7_cover106 + · exact by + intro _ + exact k15t7_cover107 + +private theorem k15t7_cover108 : ∀ P ∈ pathPatterns 0 1 [3, 1, 3], HasCheckedCertificate 15 7 ([[], [], [], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p71, Certificates.k15t7p71_check⟩ + +private theorem k15t7_cover109 : ∀ P ∈ pathPatterns 0 0 [3, 1, 4], HasCheckedCertificate 15 7 ([[], [], [], [3, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p72, Certificates.k15t7p72_check⟩ + +private theorem k15t7_cover110 : ∀ P ∈ pathPatterns 0 0 [3, 2, 3], HasCheckedCertificate 15 7 ([[], [], [], [3, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p73, Certificates.k15t7p73_check⟩ + +private theorem k15t7_cover111 : ∀ P ∈ pathPatterns 1 2 [3, 3], HasCheckedCertificate 15 7 ([[], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover112 : ∀ P ∈ pathPatterns 1 1 [3, 4], HasCheckedCertificate 15 7 ([[], [], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover113 : ∀ P ∈ pathPatterns 1 0 [3, 5], HasCheckedCertificate 15 7 ([[], [], [], [3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover115 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 7 ([[], [], [], [4], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p74, Certificates.k15t7p74_check⟩ + +private theorem k15t7_cover114 : ∀ P ∈ pathPatterns 2 4 [4], HasCheckedCertificate 15 7 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · exact by + intro _ + exact k15t7_cover115 + +private theorem k15t7_cover116 : ∀ P ∈ pathPatterns 1 0 [4, 4], HasCheckedCertificate 15 7 ([[], [], [], [4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover117 : ∀ P ∈ pathPatterns 2 3 [5], HasCheckedCertificate 15 7 ([[], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + +private theorem k15t7_cover118 : ∀ P ∈ pathPatterns 2 2 [6], HasCheckedCertificate 15 7 ([[], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t7_cover119 : ∀ P ∈ pathPatterns 2 1 [7], HasCheckedCertificate 15 7 ([[], [], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover120 : ∀ P ∈ pathPatterns 2 0 [8], HasCheckedCertificate 15 7 ([[], [], [], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq8 : amountSequenceForall 3 8 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (8 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 7 ([[], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover9 + · intro q + fin_cases q + · exact k15t7_seq46 + + · exact by + constructor + · exact by + intro _ + exact k15t7_cover83 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k15t7_cover89 + · exact by + intro _ + exact k15t7_cover90 + · exact by + intro _ + exact k15t7_cover91 + · exact by + intro _ + exact k15t7_cover92 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover93 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k15t7_cover94 + · exact by + intro _ + exact k15t7_cover95 + · exact by + intro _ + exact k15t7_cover96 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover97 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + intro _ + exact k15t7_cover98 + · exact by + intro _ + exact k15t7_cover99 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover100 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · exact by + intro _ + exact k15t7_cover101 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover102 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover103 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover104 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + intro _ + exact k15t7_cover108 + · exact by + intro _ + exact k15t7_cover109 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · exact by + intro _ + exact k15t7_cover110 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover111 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover112 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover113 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover114 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover116 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover117 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover118 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover119 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover120 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover7 : ∀ P ∈ pathPatterns 4 8 [], HasCheckedCertificate 15 7 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k15t7_seq8 + + +private theorem k15t7_cover124 : ∀ P ∈ pathPatterns 1 6 [1], HasCheckedCertificate 15 7 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover125 : ∀ P ∈ pathPatterns 0 5 [1, 1], HasCheckedCertificate 15 7 ([[], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p75, Certificates.k15t7p75_check⟩ + +private theorem k15t7_cover126 : ∀ P ∈ pathPatterns 0 4 [1, 2], HasCheckedCertificate 15 7 ([[], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p76, Certificates.k15t7p76_check⟩ + +private theorem k15t7_cover127 : ∀ P ∈ pathPatterns 0 3 [1, 3], HasCheckedCertificate 15 7 ([[], [], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p77, Certificates.k15t7p77_check⟩ + +private theorem k15t7_cover128 : ∀ P ∈ pathPatterns 0 2 [1, 4], HasCheckedCertificate 15 7 ([[], [], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p78, Certificates.k15t7p78_check⟩ + +private theorem k15t7_cover129 : ∀ P ∈ pathPatterns 0 1 [1, 5], HasCheckedCertificate 15 7 ([[], [], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p79, Certificates.k15t7p79_check⟩ + +private theorem k15t7_cover130 : ∀ P ∈ pathPatterns 0 0 [1, 6], HasCheckedCertificate 15 7 ([[], [], [1], [1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p80, Certificates.k15t7p80_check⟩ + +private theorem k15t7_cover131 : ∀ P ∈ pathPatterns 1 5 [2], HasCheckedCertificate 15 7 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover132 : ∀ P ∈ pathPatterns 0 3 [2, 2], HasCheckedCertificate 15 7 ([[], [], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p81, Certificates.k15t7p81_check⟩ + +private theorem k15t7_cover133 : ∀ P ∈ pathPatterns 0 2 [2, 3], HasCheckedCertificate 15 7 ([[], [], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p82, Certificates.k15t7p82_check⟩ + +private theorem k15t7_cover134 : ∀ P ∈ pathPatterns 0 1 [2, 4], HasCheckedCertificate 15 7 ([[], [], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p83, Certificates.k15t7p83_check⟩ + +private theorem k15t7_cover135 : ∀ P ∈ pathPatterns 0 0 [2, 5], HasCheckedCertificate 15 7 ([[], [], [1], [2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p84, Certificates.k15t7p84_check⟩ + +private theorem k15t7_cover136 : ∀ P ∈ pathPatterns 1 4 [3], HasCheckedCertificate 15 7 ([[], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover137 : ∀ P ∈ pathPatterns 0 1 [3, 3], HasCheckedCertificate 15 7 ([[], [], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p85, Certificates.k15t7p85_check⟩ + +private theorem k15t7_cover138 : ∀ P ∈ pathPatterns 0 0 [3, 4], HasCheckedCertificate 15 7 ([[], [], [1], [3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p86, Certificates.k15t7p86_check⟩ + +private theorem k15t7_cover139 : ∀ P ∈ pathPatterns 1 3 [4], HasCheckedCertificate 15 7 ([[], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover140 : ∀ P ∈ pathPatterns 1 2 [5], HasCheckedCertificate 15 7 ([[], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover141 : ∀ P ∈ pathPatterns 1 1 [6], HasCheckedCertificate 15 7 ([[], [], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover142 : ∀ P ∈ pathPatterns 1 0 [7], HasCheckedCertificate 15 7 ([[], [], [1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + +private theorem k15t7_seq123 : amountSequenceForall 2 7 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (2 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 7 ([[], [], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover124 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover125 + · exact by + intro _ + exact k15t7_cover126 + · exact by + intro _ + exact k15t7_cover127 + · exact by + intro _ + exact k15t7_cover128 + · exact by + intro _ + exact k15t7_cover129 + · exact by + intro _ + exact k15t7_cover130 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover131 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t7_cover132 + · exact by + intro _ + exact k15t7_cover133 + · exact by + intro _ + exact k15t7_cover134 + · exact by + intro _ + exact k15t7_cover135 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover136 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k15t7_cover137 + · exact by + intro _ + exact k15t7_cover138 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover139 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover140 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover141 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover142 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover122 : ∀ P ∈ pathPatterns 3 7 [1], HasCheckedCertificate 15 7 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k15t7_seq123 + + +private theorem k15t7_cover144 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 15 7 ([[], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p87, Certificates.k15t7p87_check⟩ + +private theorem k15t7_cover145 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 15 7 ([[], [], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p88, Certificates.k15t7p88_check⟩ + +private theorem k15t7_cover146 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 15 7 ([[], [], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p89, Certificates.k15t7p89_check⟩ + +private theorem k15t7_cover147 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 15 7 ([[], [], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p90, Certificates.k15t7p90_check⟩ + +private theorem k15t7_cover148 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 15 7 ([[], [], [1, 1], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p91, Certificates.k15t7p91_check⟩ + +private theorem k15t7_cover143 : ∀ P ∈ pathPatterns 2 6 [1, 1], HasCheckedCertificate 15 7 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover144 + · exact by + intro _ + exact k15t7_cover145 + · exact by + intro _ + exact k15t7_cover146 + · exact by + intro _ + exact k15t7_cover147 + · exact by + intro _ + exact k15t7_cover148 + +private theorem k15t7_cover149 : ∀ P ∈ pathPatterns 1 5 [1, 1, 1], HasCheckedCertificate 15 7 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover150 : ∀ P ∈ pathPatterns 0 4 [1, 1, 1, 1], HasCheckedCertificate 15 7 ([[], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p92, Certificates.k15t7p92_check⟩ + +private theorem k15t7_cover151 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 2], HasCheckedCertificate 15 7 ([[], [], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p93, Certificates.k15t7p93_check⟩ + +private theorem k15t7_cover152 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 3], HasCheckedCertificate 15 7 ([[], [], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p94, Certificates.k15t7p94_check⟩ + +private theorem k15t7_cover153 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 4], HasCheckedCertificate 15 7 ([[], [], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p95, Certificates.k15t7p95_check⟩ + +private theorem k15t7_cover154 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 5], HasCheckedCertificate 15 7 ([[], [], [1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p96, Certificates.k15t7p96_check⟩ + +private theorem k15t7_cover155 : ∀ P ∈ pathPatterns 1 4 [1, 1, 2], HasCheckedCertificate 15 7 ([[], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover156 : ∀ P ∈ pathPatterns 0 3 [1, 1, 2, 1], HasCheckedCertificate 15 7 ([[], [], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p97, Certificates.k15t7p97_check⟩ + +private theorem k15t7_cover157 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2, 2], HasCheckedCertificate 15 7 ([[], [], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p98, Certificates.k15t7p98_check⟩ + +private theorem k15t7_cover158 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 3], HasCheckedCertificate 15 7 ([[], [], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p99, Certificates.k15t7p99_check⟩ + +private theorem k15t7_cover159 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 4], HasCheckedCertificate 15 7 ([[], [], [1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p100, Certificates.k15t7p100_check⟩ + +private theorem k15t7_cover160 : ∀ P ∈ pathPatterns 1 3 [1, 1, 3], HasCheckedCertificate 15 7 ([[], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover161 : ∀ P ∈ pathPatterns 0 2 [1, 1, 3, 1], HasCheckedCertificate 15 7 ([[], [], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p101, Certificates.k15t7p101_check⟩ + +private theorem k15t7_cover162 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3, 2], HasCheckedCertificate 15 7 ([[], [], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p102, Certificates.k15t7p102_check⟩ + +private theorem k15t7_cover163 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 3], HasCheckedCertificate 15 7 ([[], [], [1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p103, Certificates.k15t7p103_check⟩ + +private theorem k15t7_cover164 : ∀ P ∈ pathPatterns 1 2 [1, 1, 4], HasCheckedCertificate 15 7 ([[], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover165 : ∀ P ∈ pathPatterns 0 1 [1, 1, 4, 1], HasCheckedCertificate 15 7 ([[], [], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p104, Certificates.k15t7p104_check⟩ + +private theorem k15t7_cover166 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4, 2], HasCheckedCertificate 15 7 ([[], [], [1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p105, Certificates.k15t7p105_check⟩ + +private theorem k15t7_cover167 : ∀ P ∈ pathPatterns 1 1 [1, 1, 5], HasCheckedCertificate 15 7 ([[], [], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover168 : ∀ P ∈ pathPatterns 0 0 [1, 1, 5, 1], HasCheckedCertificate 15 7 ([[], [], [1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p106, Certificates.k15t7p106_check⟩ + +private theorem k15t7_cover169 : ∀ P ∈ pathPatterns 1 0 [1, 1, 6], HasCheckedCertificate 15 7 ([[], [], [1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover171 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 15 7 ([[], [], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p107, Certificates.k15t7p107_check⟩ + +private theorem k15t7_cover172 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 15 7 ([[], [], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p108, Certificates.k15t7p108_check⟩ + +private theorem k15t7_cover173 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 15 7 ([[], [], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p109, Certificates.k15t7p109_check⟩ + +private theorem k15t7_cover174 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 15 7 ([[], [], [1, 2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p110, Certificates.k15t7p110_check⟩ + +private theorem k15t7_cover170 : ∀ P ∈ pathPatterns 2 5 [1, 2], HasCheckedCertificate 15 7 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover171 + · exact by + intro _ + exact k15t7_cover172 + · exact by + intro _ + exact k15t7_cover173 + · exact by + intro _ + exact k15t7_cover174 + +private theorem k15t7_cover175 : ∀ P ∈ pathPatterns 1 4 [1, 2, 1], HasCheckedCertificate 15 7 ([[], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover176 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1, 2], HasCheckedCertificate 15 7 ([[], [], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p111, Certificates.k15t7p111_check⟩ + +private theorem k15t7_cover177 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 3], HasCheckedCertificate 15 7 ([[], [], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p112, Certificates.k15t7p112_check⟩ + +private theorem k15t7_cover178 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 4], HasCheckedCertificate 15 7 ([[], [], [1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p113, Certificates.k15t7p113_check⟩ + +private theorem k15t7_cover179 : ∀ P ∈ pathPatterns 1 3 [1, 2, 2], HasCheckedCertificate 15 7 ([[], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover180 : ∀ P ∈ pathPatterns 0 2 [1, 2, 2, 1], HasCheckedCertificate 15 7 ([[], [], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p114, Certificates.k15t7p114_check⟩ + +private theorem k15t7_cover181 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2, 2], HasCheckedCertificate 15 7 ([[], [], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p115, Certificates.k15t7p115_check⟩ + +private theorem k15t7_cover182 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 3], HasCheckedCertificate 15 7 ([[], [], [1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p116, Certificates.k15t7p116_check⟩ + +private theorem k15t7_cover183 : ∀ P ∈ pathPatterns 1 2 [1, 2, 3], HasCheckedCertificate 15 7 ([[], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover184 : ∀ P ∈ pathPatterns 0 1 [1, 2, 3, 1], HasCheckedCertificate 15 7 ([[], [], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p117, Certificates.k15t7p117_check⟩ + +private theorem k15t7_cover185 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3, 2], HasCheckedCertificate 15 7 ([[], [], [1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p118, Certificates.k15t7p118_check⟩ + +private theorem k15t7_cover186 : ∀ P ∈ pathPatterns 1 1 [1, 2, 4], HasCheckedCertificate 15 7 ([[], [], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover187 : ∀ P ∈ pathPatterns 0 0 [1, 2, 4, 1], HasCheckedCertificate 15 7 ([[], [], [1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p119, Certificates.k15t7p119_check⟩ + +private theorem k15t7_cover188 : ∀ P ∈ pathPatterns 1 0 [1, 2, 5], HasCheckedCertificate 15 7 ([[], [], [1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover190 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 15 7 ([[], [], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p120, Certificates.k15t7p120_check⟩ + +private theorem k15t7_cover191 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 15 7 ([[], [], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p121, Certificates.k15t7p121_check⟩ + +private theorem k15t7_cover192 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 7 ([[], [], [1, 3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p122, Certificates.k15t7p122_check⟩ + +private theorem k15t7_cover189 : ∀ P ∈ pathPatterns 2 4 [1, 3], HasCheckedCertificate 15 7 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover190 + · exact by + intro _ + exact k15t7_cover191 + · exact by + intro _ + exact k15t7_cover192 + +private theorem k15t7_cover193 : ∀ P ∈ pathPatterns 1 3 [1, 3, 1], HasCheckedCertificate 15 7 ([[], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover194 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1, 2], HasCheckedCertificate 15 7 ([[], [], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p123, Certificates.k15t7p123_check⟩ + +private theorem k15t7_cover195 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 3], HasCheckedCertificate 15 7 ([[], [], [1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p124, Certificates.k15t7p124_check⟩ + +private theorem k15t7_cover196 : ∀ P ∈ pathPatterns 1 2 [1, 3, 2], HasCheckedCertificate 15 7 ([[], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover197 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2, 2], HasCheckedCertificate 15 7 ([[], [], [1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p125, Certificates.k15t7p125_check⟩ + +private theorem k15t7_cover198 : ∀ P ∈ pathPatterns 1 1 [1, 3, 3], HasCheckedCertificate 15 7 ([[], [], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover199 : ∀ P ∈ pathPatterns 0 0 [1, 3, 3, 1], HasCheckedCertificate 15 7 ([[], [], [1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p126, Certificates.k15t7p126_check⟩ + +private theorem k15t7_cover200 : ∀ P ∈ pathPatterns 1 0 [1, 3, 4], HasCheckedCertificate 15 7 ([[], [], [1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover202 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 7 ([[], [], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p127, Certificates.k15t7p127_check⟩ + +private theorem k15t7_cover203 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 7 ([[], [], [1, 4], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p128, Certificates.k15t7p128_check⟩ + +private theorem k15t7_cover201 : ∀ P ∈ pathPatterns 2 3 [1, 4], HasCheckedCertificate 15 7 ([[], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover202 + · exact by + intro _ + exact k15t7_cover203 + +private theorem k15t7_cover204 : ∀ P ∈ pathPatterns 1 2 [1, 4, 1], HasCheckedCertificate 15 7 ([[], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover205 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1, 2], HasCheckedCertificate 15 7 ([[], [], [1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p129, Certificates.k15t7p129_check⟩ + +private theorem k15t7_cover206 : ∀ P ∈ pathPatterns 1 1 [1, 4, 2], HasCheckedCertificate 15 7 ([[], [], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover207 : ∀ P ∈ pathPatterns 1 0 [1, 4, 3], HasCheckedCertificate 15 7 ([[], [], [1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover209 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 7 ([[], [], [1, 5], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p130, Certificates.k15t7p130_check⟩ + +private theorem k15t7_cover208 : ∀ P ∈ pathPatterns 2 2 [1, 5], HasCheckedCertificate 15 7 ([[], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover209 + +private theorem k15t7_cover210 : ∀ P ∈ pathPatterns 1 1 [1, 5, 1], HasCheckedCertificate 15 7 ([[], [], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover211 : ∀ P ∈ pathPatterns 1 0 [1, 5, 2], HasCheckedCertificate 15 7 ([[], [], [1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover212 : ∀ P ∈ pathPatterns 2 1 [1, 6], HasCheckedCertificate 15 7 ([[], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover213 : ∀ P ∈ pathPatterns 1 0 [1, 6, 1], HasCheckedCertificate 15 7 ([[], [], [1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover214 : ∀ P ∈ pathPatterns 2 0 [1, 7], HasCheckedCertificate 15 7 ([[], [], [1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq121 : amountSequenceForall 3 7 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (8 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 15 7 ([[], []] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover122 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover143 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover149 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover150 + · exact by + intro _ + exact k15t7_cover151 + · exact by + intro _ + exact k15t7_cover152 + · exact by + intro _ + exact k15t7_cover153 + · exact by + intro _ + exact k15t7_cover154 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover155 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover156 + · exact by + intro _ + exact k15t7_cover157 + · exact by + intro _ + exact k15t7_cover158 + · exact by + intro _ + exact k15t7_cover159 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover160 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover161 + · exact by + intro _ + exact k15t7_cover162 + · exact by + intro _ + exact k15t7_cover163 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover164 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover165 + · exact by + intro _ + exact k15t7_cover166 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover167 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover168 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover169 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover170 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover175 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k15t7_cover176 + · exact by + intro _ + exact k15t7_cover177 + · exact by + intro _ + exact k15t7_cover178 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover179 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover180 + · exact by + intro _ + exact k15t7_cover181 + · exact by + intro _ + exact k15t7_cover182 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover183 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover184 + · exact by + intro _ + exact k15t7_cover185 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover186 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover187 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover188 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover189 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover193 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + intro _ + exact k15t7_cover194 + · exact by + intro _ + exact k15t7_cover195 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover196 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · exact by + intro _ + exact k15t7_cover197 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover198 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover199 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover200 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover201 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover204 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · exact by + intro _ + exact k15t7_cover205 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover206 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 2, 1] ∧ LexLE [1, 4, 2, 1] [1, 2, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover207 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover208 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover210 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 1, 1] ∧ LexLE [1, 5, 1, 1] [1, 1, 5, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover211 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover212 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover213 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover214 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover217 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 15 7 ([[], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover218 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 15 7 ([[], [], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p131, Certificates.k15t7p131_check⟩ + +private theorem k15t7_cover219 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 15 7 ([[], [], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p132, Certificates.k15t7p132_check⟩ + +private theorem k15t7_cover220 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 15 7 ([[], [], [2], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p133, Certificates.k15t7p133_check⟩ + +private theorem k15t7_cover221 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 15 7 ([[], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover222 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 15 7 ([[], [], [2], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p134, Certificates.k15t7p134_check⟩ + +private theorem k15t7_cover223 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 15 7 ([[], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover224 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 15 7 ([[], [], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover225 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 15 7 ([[], [], [2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover216 : ∀ P ∈ pathPatterns 3 6 [2], HasCheckedCertificate 15 7 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover217 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t7_cover218 + · exact by + intro _ + exact k15t7_cover219 + · exact by + intro _ + exact k15t7_cover220 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover221 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k15t7_cover222 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover223 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover224 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover225 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover226 : ∀ P ∈ pathPatterns 0 2 [2, 1, 1, 2], HasCheckedCertificate 15 7 ([[], [], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p135, Certificates.k15t7p135_check⟩ + +private theorem k15t7_cover227 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 3], HasCheckedCertificate 15 7 ([[], [], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p136, Certificates.k15t7p136_check⟩ + +private theorem k15t7_cover228 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 4], HasCheckedCertificate 15 7 ([[], [], [2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p137, Certificates.k15t7p137_check⟩ + +private theorem k15t7_cover229 : ∀ P ∈ pathPatterns 1 3 [2, 1, 2], HasCheckedCertificate 15 7 ([[], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover230 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2, 2], HasCheckedCertificate 15 7 ([[], [], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p138, Certificates.k15t7p138_check⟩ + +private theorem k15t7_cover231 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 3], HasCheckedCertificate 15 7 ([[], [], [2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p139, Certificates.k15t7p139_check⟩ + +private theorem k15t7_cover232 : ∀ P ∈ pathPatterns 1 2 [2, 1, 3], HasCheckedCertificate 15 7 ([[], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover233 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3, 2], HasCheckedCertificate 15 7 ([[], [], [2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p140, Certificates.k15t7p140_check⟩ + +private theorem k15t7_cover234 : ∀ P ∈ pathPatterns 1 1 [2, 1, 4], HasCheckedCertificate 15 7 ([[], [], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover235 : ∀ P ∈ pathPatterns 1 0 [2, 1, 5], HasCheckedCertificate 15 7 ([[], [], [2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover237 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 15 7 ([[], [], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p141, Certificates.k15t7p141_check⟩ + +private theorem k15t7_cover238 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 7 ([[], [], [2, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p142, Certificates.k15t7p142_check⟩ + +private theorem k15t7_cover236 : ∀ P ∈ pathPatterns 2 4 [2, 2], HasCheckedCertificate 15 7 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k15t7_cover237 + · exact by + intro _ + exact k15t7_cover238 + +private theorem k15t7_cover239 : ∀ P ∈ pathPatterns 0 0 [2, 2, 1, 3], HasCheckedCertificate 15 7 ([[], [], [2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p143, Certificates.k15t7p143_check⟩ + +private theorem k15t7_cover240 : ∀ P ∈ pathPatterns 1 2 [2, 2, 2], HasCheckedCertificate 15 7 ([[], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover241 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2, 2], HasCheckedCertificate 15 7 ([[], [], [2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p144, Certificates.k15t7p144_check⟩ + +private theorem k15t7_cover242 : ∀ P ∈ pathPatterns 1 1 [2, 2, 3], HasCheckedCertificate 15 7 ([[], [], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover243 : ∀ P ∈ pathPatterns 1 0 [2, 2, 4], HasCheckedCertificate 15 7 ([[], [], [2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover245 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 7 ([[], [], [2, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p145, Certificates.k15t7p145_check⟩ + +private theorem k15t7_cover244 : ∀ P ∈ pathPatterns 2 3 [2, 3], HasCheckedCertificate 15 7 ([[], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k15t7_cover245 + +private theorem k15t7_cover246 : ∀ P ∈ pathPatterns 1 1 [2, 3, 2], HasCheckedCertificate 15 7 ([[], [], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover247 : ∀ P ∈ pathPatterns 1 0 [2, 3, 3], HasCheckedCertificate 15 7 ([[], [], [2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover248 : ∀ P ∈ pathPatterns 2 2 [2, 4], HasCheckedCertificate 15 7 ([[], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t7_cover249 : ∀ P ∈ pathPatterns 1 0 [2, 4, 2], HasCheckedCertificate 15 7 ([[], [], [2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover250 : ∀ P ∈ pathPatterns 2 1 [2, 5], HasCheckedCertificate 15 7 ([[], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover251 : ∀ P ∈ pathPatterns 2 0 [2, 6], HasCheckedCertificate 15 7 ([[], [], [2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq215 : amountSequenceForall 3 6 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([2] ++ tail).length) (8 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 15 7 ([[], []] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover216 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k15t7_cover226 + · exact by + intro _ + exact k15t7_cover227 + · exact by + intro _ + exact k15t7_cover228 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover229 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + intro _ + exact k15t7_cover230 + · exact by + intro _ + exact k15t7_cover231 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover232 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · exact by + intro _ + exact k15t7_cover233 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover234 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 4, 1] ∧ LexLE [2, 1, 4, 1] [1, 4, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover235 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover236 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · exact by + intro _ + exact k15t7_cover239 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover240 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · exact by + intro _ + exact k15t7_cover241 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover242 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 3, 1] ∧ LexLE [2, 2, 3, 1] [1, 3, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover243 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover244 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 2] ∧ LexLE [2, 3, 1, 2] [2, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover246 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 1] ∧ LexLE [2, 3, 2, 1] [1, 2, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover247 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover248 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 1] ∧ LexLE [2, 4, 1, 1] [1, 1, 4, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover249 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover250 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover251 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover254 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 15 7 ([[], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover255 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 15 7 ([[], [], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover256 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 15 7 ([[], [], [3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover253 : ∀ P ∈ pathPatterns 3 5 [3], HasCheckedCertificate 15 7 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover254 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover255 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover256 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover257 : ∀ P ∈ pathPatterns 0 0 [3, 1, 1, 3], HasCheckedCertificate 15 7 ([[], [], [3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p146, Certificates.k15t7p146_check⟩ + +private theorem k15t7_cover258 : ∀ P ∈ pathPatterns 1 1 [3, 1, 3], HasCheckedCertificate 15 7 ([[], [], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover259 : ∀ P ∈ pathPatterns 1 0 [3, 1, 4], HasCheckedCertificate 15 7 ([[], [], [3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover260 : ∀ P ∈ pathPatterns 1 0 [3, 2, 3], HasCheckedCertificate 15 7 ([[], [], [3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover261 : ∀ P ∈ pathPatterns 2 2 [3, 3], HasCheckedCertificate 15 7 ([[], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t7_cover262 : ∀ P ∈ pathPatterns 2 1 [3, 4], HasCheckedCertificate 15 7 ([[], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover263 : ∀ P ∈ pathPatterns 2 0 [3, 5], HasCheckedCertificate 15 7 ([[], [], [3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq252 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([3] ++ tail) ∧ LexLE ([3] ++ tail) ([3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([3] ++ tail).length) (8 - ([3] ++ tail).sum) ([3] ++ tail), + HasCheckedCertificate 15 7 ([[], []] ++ (([3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover253 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · exact by + intro _ + exact k15t7_cover257 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 2] ∧ LexLE [3, 1, 2, 2] [2, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover258 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 1] ∧ LexLE [3, 1, 3, 1] [1, 3, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover259 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 2] ∧ LexLE [3, 2, 1, 2] [2, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 1] ∧ LexLE [3, 2, 2, 1] [1, 2, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover260 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover261 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 1] ∧ LexLE [3, 3, 1, 1] [1, 1, 3, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover262 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover263 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover265 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 15 7 ([[], [], [4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover264 : ∀ P ∈ pathPatterns 3 4 [4], HasCheckedCertificate 15 7 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover265 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover266 : ∀ P ∈ pathPatterns 2 0 [4, 4], HasCheckedCertificate 15 7 ([[], [], [4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover267 : ∀ P ∈ pathPatterns 3 3 [5], HasCheckedCertificate 15 7 ([[], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover268 : ∀ P ∈ pathPatterns 3 2 [6], HasCheckedCertificate 15 7 ([[], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover269 : ∀ P ∈ pathPatterns 3 1 [7], HasCheckedCertificate 15 7 ([[], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover270 : ∀ P ∈ pathPatterns 3 0 [8], HasCheckedCertificate 15 7 ([[], [], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq6 : amountSequenceForall 4 8 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (8 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 7 ([[], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover7 + · intro q + fin_cases q + · exact k15t7_seq121 + + · exact k15t7_seq215 + + · exact k15t7_seq252 + + · exact by + constructor + · exact by + intro _ + exact k15t7_cover264 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 2] ∧ LexLE [4, 1, 1, 2] [2, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 1] ∧ LexLE [4, 1, 2, 1] [1, 2, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 1] ∧ LexLE [4, 2, 1, 1] [1, 1, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover266 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover267 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 1] ∧ LexLE [5, 1, 1, 1] [1, 1, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover268 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover269 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover270 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover5 : ∀ P ∈ pathPatterns 5 8 [], HasCheckedCertificate 15 7 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact k15t7_seq6 + + +private theorem k15t7_cover275 : ∀ P ∈ pathPatterns 0 5 [1], HasCheckedCertificate 15 7 ([[], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p147, Certificates.k15t7p147_check⟩ + +private theorem k15t7_cover276 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 15 7 ([[], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p148, Certificates.k15t7p148_check⟩ + +private theorem k15t7_cover277 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 15 7 ([[], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p149, Certificates.k15t7p149_check⟩ + +private theorem k15t7_cover278 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 15 7 ([[], [1], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p150, Certificates.k15t7p150_check⟩ + +private theorem k15t7_cover279 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 15 7 ([[], [1], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p151, Certificates.k15t7p151_check⟩ + +private theorem k15t7_cover280 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 15 7 ([[], [1], [1], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p152, Certificates.k15t7p152_check⟩ + +private theorem k15t7_cover274 : ∀ P ∈ pathPatterns 2 6 [1], HasCheckedCertificate 15 7 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover275 + · exact by + intro _ + exact k15t7_cover276 + · exact by + intro _ + exact k15t7_cover277 + · exact by + intro _ + exact k15t7_cover278 + · exact by + intro _ + exact k15t7_cover279 + · exact by + intro _ + exact k15t7_cover280 + +private theorem k15t7_cover281 : ∀ P ∈ pathPatterns 1 5 [1, 1], HasCheckedCertificate 15 7 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover282 : ∀ P ∈ pathPatterns 0 4 [1, 1, 1], HasCheckedCertificate 15 7 ([[], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p153, Certificates.k15t7p153_check⟩ + +private theorem k15t7_cover283 : ∀ P ∈ pathPatterns 0 3 [1, 1, 2], HasCheckedCertificate 15 7 ([[], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p154, Certificates.k15t7p154_check⟩ + +private theorem k15t7_cover284 : ∀ P ∈ pathPatterns 0 2 [1, 1, 3], HasCheckedCertificate 15 7 ([[], [1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p155, Certificates.k15t7p155_check⟩ + +private theorem k15t7_cover285 : ∀ P ∈ pathPatterns 0 1 [1, 1, 4], HasCheckedCertificate 15 7 ([[], [1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p156, Certificates.k15t7p156_check⟩ + +private theorem k15t7_cover286 : ∀ P ∈ pathPatterns 0 0 [1, 1, 5], HasCheckedCertificate 15 7 ([[], [1], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p157, Certificates.k15t7p157_check⟩ + +private theorem k15t7_cover287 : ∀ P ∈ pathPatterns 1 4 [1, 2], HasCheckedCertificate 15 7 ([[], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover288 : ∀ P ∈ pathPatterns 0 3 [1, 2, 1], HasCheckedCertificate 15 7 ([[], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p158, Certificates.k15t7p158_check⟩ + +private theorem k15t7_cover289 : ∀ P ∈ pathPatterns 0 2 [1, 2, 2], HasCheckedCertificate 15 7 ([[], [1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p159, Certificates.k15t7p159_check⟩ + +private theorem k15t7_cover290 : ∀ P ∈ pathPatterns 0 1 [1, 2, 3], HasCheckedCertificate 15 7 ([[], [1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p160, Certificates.k15t7p160_check⟩ + +private theorem k15t7_cover291 : ∀ P ∈ pathPatterns 0 0 [1, 2, 4], HasCheckedCertificate 15 7 ([[], [1], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p161, Certificates.k15t7p161_check⟩ + +private theorem k15t7_cover292 : ∀ P ∈ pathPatterns 1 3 [1, 3], HasCheckedCertificate 15 7 ([[], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover293 : ∀ P ∈ pathPatterns 0 2 [1, 3, 1], HasCheckedCertificate 15 7 ([[], [1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p162, Certificates.k15t7p162_check⟩ + +private theorem k15t7_cover294 : ∀ P ∈ pathPatterns 0 1 [1, 3, 2], HasCheckedCertificate 15 7 ([[], [1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p163, Certificates.k15t7p163_check⟩ + +private theorem k15t7_cover295 : ∀ P ∈ pathPatterns 0 0 [1, 3, 3], HasCheckedCertificate 15 7 ([[], [1], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p164, Certificates.k15t7p164_check⟩ + +private theorem k15t7_cover296 : ∀ P ∈ pathPatterns 1 2 [1, 4], HasCheckedCertificate 15 7 ([[], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover297 : ∀ P ∈ pathPatterns 0 1 [1, 4, 1], HasCheckedCertificate 15 7 ([[], [1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p165, Certificates.k15t7p165_check⟩ + +private theorem k15t7_cover298 : ∀ P ∈ pathPatterns 0 0 [1, 4, 2], HasCheckedCertificate 15 7 ([[], [1], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p166, Certificates.k15t7p166_check⟩ + +private theorem k15t7_cover299 : ∀ P ∈ pathPatterns 1 1 [1, 5], HasCheckedCertificate 15 7 ([[], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover300 : ∀ P ∈ pathPatterns 0 0 [1, 5, 1], HasCheckedCertificate 15 7 ([[], [1], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p167, Certificates.k15t7p167_check⟩ + +private theorem k15t7_cover301 : ∀ P ∈ pathPatterns 1 0 [1, 6], HasCheckedCertificate 15 7 ([[], [1], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover303 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 15 7 ([[], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p168, Certificates.k15t7p168_check⟩ + +private theorem k15t7_cover304 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 15 7 ([[], [1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p169, Certificates.k15t7p169_check⟩ + +private theorem k15t7_cover305 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 15 7 ([[], [1], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p170, Certificates.k15t7p170_check⟩ + +private theorem k15t7_cover306 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 15 7 ([[], [1], [2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p171, Certificates.k15t7p171_check⟩ + +private theorem k15t7_cover302 : ∀ P ∈ pathPatterns 2 5 [2], HasCheckedCertificate 15 7 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover303 + · exact by + intro _ + exact k15t7_cover304 + · exact by + intro _ + exact k15t7_cover305 + · exact by + intro _ + exact k15t7_cover306 + +private theorem k15t7_cover307 : ∀ P ∈ pathPatterns 0 2 [2, 1, 2], HasCheckedCertificate 15 7 ([[], [1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p172, Certificates.k15t7p172_check⟩ + +private theorem k15t7_cover308 : ∀ P ∈ pathPatterns 0 1 [2, 1, 3], HasCheckedCertificate 15 7 ([[], [1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p173, Certificates.k15t7p173_check⟩ + +private theorem k15t7_cover309 : ∀ P ∈ pathPatterns 0 0 [2, 1, 4], HasCheckedCertificate 15 7 ([[], [1], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p174, Certificates.k15t7p174_check⟩ + +private theorem k15t7_cover310 : ∀ P ∈ pathPatterns 1 3 [2, 2], HasCheckedCertificate 15 7 ([[], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover311 : ∀ P ∈ pathPatterns 0 1 [2, 2, 2], HasCheckedCertificate 15 7 ([[], [1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p175, Certificates.k15t7p175_check⟩ + +private theorem k15t7_cover312 : ∀ P ∈ pathPatterns 0 0 [2, 2, 3], HasCheckedCertificate 15 7 ([[], [1], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p176, Certificates.k15t7p176_check⟩ + +private theorem k15t7_cover313 : ∀ P ∈ pathPatterns 1 2 [2, 3], HasCheckedCertificate 15 7 ([[], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover314 : ∀ P ∈ pathPatterns 0 0 [2, 3, 2], HasCheckedCertificate 15 7 ([[], [1], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p177, Certificates.k15t7p177_check⟩ + +private theorem k15t7_cover315 : ∀ P ∈ pathPatterns 1 1 [2, 4], HasCheckedCertificate 15 7 ([[], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover316 : ∀ P ∈ pathPatterns 1 0 [2, 5], HasCheckedCertificate 15 7 ([[], [1], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover318 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 15 7 ([[], [1], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p178, Certificates.k15t7p178_check⟩ + +private theorem k15t7_cover319 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 7 ([[], [1], [3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p179, Certificates.k15t7p179_check⟩ + +private theorem k15t7_cover317 : ∀ P ∈ pathPatterns 2 4 [3], HasCheckedCertificate 15 7 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k15t7_cover318 + · exact by + intro _ + exact k15t7_cover319 + +private theorem k15t7_cover320 : ∀ P ∈ pathPatterns 0 0 [3, 1, 3], HasCheckedCertificate 15 7 ([[], [1], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p180, Certificates.k15t7p180_check⟩ + +private theorem k15t7_cover321 : ∀ P ∈ pathPatterns 1 1 [3, 3], HasCheckedCertificate 15 7 ([[], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover322 : ∀ P ∈ pathPatterns 1 0 [3, 4], HasCheckedCertificate 15 7 ([[], [1], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover323 : ∀ P ∈ pathPatterns 2 3 [4], HasCheckedCertificate 15 7 ([[], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + +private theorem k15t7_cover324 : ∀ P ∈ pathPatterns 2 2 [5], HasCheckedCertificate 15 7 ([[], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t7_cover325 : ∀ P ∈ pathPatterns 2 1 [6], HasCheckedCertificate 15 7 ([[], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover326 : ∀ P ∈ pathPatterns 2 0 [7], HasCheckedCertificate 15 7 ([[], [1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq273 : amountSequenceForall 3 7 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 7 ([[], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover274 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover281 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover282 + · exact by + intro _ + exact k15t7_cover283 + · exact by + intro _ + exact k15t7_cover284 + · exact by + intro _ + exact k15t7_cover285 + · exact by + intro _ + exact k15t7_cover286 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover287 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover288 + · exact by + intro _ + exact k15t7_cover289 + · exact by + intro _ + exact k15t7_cover290 + · exact by + intro _ + exact k15t7_cover291 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover292 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover293 + · exact by + intro _ + exact k15t7_cover294 + · exact by + intro _ + exact k15t7_cover295 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover296 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover297 + · exact by + intro _ + exact k15t7_cover298 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover299 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover300 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover301 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover302 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k15t7_cover307 + · exact by + intro _ + exact k15t7_cover308 + · exact by + intro _ + exact k15t7_cover309 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover310 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k15t7_cover311 + · exact by + intro _ + exact k15t7_cover312 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover313 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + intro _ + exact k15t7_cover314 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover315 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover316 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover317 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + intro _ + exact k15t7_cover320 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover321 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover322 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover323 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover324 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover325 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover326 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover272 : ∀ P ∈ pathPatterns 4 7 [1], HasCheckedCertificate 15 7 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k15t7_seq273 + + +private theorem k15t7_cover329 : ∀ P ∈ pathPatterns 0 4 [1, 1], HasCheckedCertificate 15 7 ([[], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p181, Certificates.k15t7p181_check⟩ + +private theorem k15t7_cover330 : ∀ P ∈ pathPatterns 0 3 [1, 2], HasCheckedCertificate 15 7 ([[], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p182, Certificates.k15t7p182_check⟩ + +private theorem k15t7_cover331 : ∀ P ∈ pathPatterns 0 2 [1, 3], HasCheckedCertificate 15 7 ([[], [1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p183, Certificates.k15t7p183_check⟩ + +private theorem k15t7_cover332 : ∀ P ∈ pathPatterns 0 1 [1, 4], HasCheckedCertificate 15 7 ([[], [1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p184, Certificates.k15t7p184_check⟩ + +private theorem k15t7_cover333 : ∀ P ∈ pathPatterns 0 0 [1, 5], HasCheckedCertificate 15 7 ([[], [1, 1], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p185, Certificates.k15t7p185_check⟩ + +private theorem k15t7_cover334 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 15 7 ([[], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover335 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 15 7 ([[], [1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p186, Certificates.k15t7p186_check⟩ + +private theorem k15t7_cover336 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 15 7 ([[], [1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p187, Certificates.k15t7p187_check⟩ + +private theorem k15t7_cover337 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 15 7 ([[], [1, 1], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p188, Certificates.k15t7p188_check⟩ + +private theorem k15t7_cover338 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 15 7 ([[], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover339 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 15 7 ([[], [1, 1], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p189, Certificates.k15t7p189_check⟩ + +private theorem k15t7_cover340 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 15 7 ([[], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover341 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 15 7 ([[], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover342 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 15 7 ([[], [1, 1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover328 : ∀ P ∈ pathPatterns 3 6 [1, 1], HasCheckedCertificate 15 7 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover329 + · exact by + intro _ + exact k15t7_cover330 + · exact by + intro _ + exact k15t7_cover331 + · exact by + intro _ + exact k15t7_cover332 + · exact by + intro _ + exact k15t7_cover333 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover334 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t7_cover335 + · exact by + intro _ + exact k15t7_cover336 + · exact by + intro _ + exact k15t7_cover337 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover338 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k15t7_cover339 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover340 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover341 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover342 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover344 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 15 7 ([[], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p190, Certificates.k15t7p190_check⟩ + +private theorem k15t7_cover345 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 15 7 ([[], [1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p191, Certificates.k15t7p191_check⟩ + +private theorem k15t7_cover346 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 15 7 ([[], [1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p192, Certificates.k15t7p192_check⟩ + +private theorem k15t7_cover347 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 15 7 ([[], [1, 1, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p193, Certificates.k15t7p193_check⟩ + +private theorem k15t7_cover343 : ∀ P ∈ pathPatterns 2 5 [1, 1, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover344 + · exact by + intro _ + exact k15t7_cover345 + · exact by + intro _ + exact k15t7_cover346 + · exact by + intro _ + exact k15t7_cover347 + +private theorem k15t7_cover348 : ∀ P ∈ pathPatterns 1 4 [1, 1, 1, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover349 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 1, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p194, Certificates.k15t7p194_check⟩ + +private theorem k15t7_cover350 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1, 2], HasCheckedCertificate 15 7 ([[], [1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p195, Certificates.k15t7p195_check⟩ + +private theorem k15t7_cover351 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 3], HasCheckedCertificate 15 7 ([[], [1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p196, Certificates.k15t7p196_check⟩ + +private theorem k15t7_cover352 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 4], HasCheckedCertificate 15 7 ([[], [1, 1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p197, Certificates.k15t7p197_check⟩ + +private theorem k15t7_cover353 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1, 2], HasCheckedCertificate 15 7 ([[], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover354 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 2, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p198, Certificates.k15t7p198_check⟩ + +private theorem k15t7_cover355 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2, 2], HasCheckedCertificate 15 7 ([[], [1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p199, Certificates.k15t7p199_check⟩ + +private theorem k15t7_cover356 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 3], HasCheckedCertificate 15 7 ([[], [1, 1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p200, Certificates.k15t7p200_check⟩ + +private theorem k15t7_cover357 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 3], HasCheckedCertificate 15 7 ([[], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover358 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 3, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p201, Certificates.k15t7p201_check⟩ + +private theorem k15t7_cover359 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3, 2], HasCheckedCertificate 15 7 ([[], [1, 1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p202, Certificates.k15t7p202_check⟩ + +private theorem k15t7_cover360 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 4], HasCheckedCertificate 15 7 ([[], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover361 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 4, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p203, Certificates.k15t7p203_check⟩ + +private theorem k15t7_cover362 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 5], HasCheckedCertificate 15 7 ([[], [1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover364 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 15 7 ([[], [1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p204, Certificates.k15t7p204_check⟩ + +private theorem k15t7_cover365 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 15 7 ([[], [1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p205, Certificates.k15t7p205_check⟩ + +private theorem k15t7_cover366 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 7 ([[], [1, 1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p206, Certificates.k15t7p206_check⟩ + +private theorem k15t7_cover363 : ∀ P ∈ pathPatterns 2 4 [1, 1, 2], HasCheckedCertificate 15 7 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover364 + · exact by + intro _ + exact k15t7_cover365 + · exact by + intro _ + exact k15t7_cover366 + +private theorem k15t7_cover367 : ∀ P ∈ pathPatterns 1 3 [1, 1, 2, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover368 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2, 1, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p207, Certificates.k15t7p207_check⟩ + +private theorem k15t7_cover369 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1, 2], HasCheckedCertificate 15 7 ([[], [1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p208, Certificates.k15t7p208_check⟩ + +private theorem k15t7_cover370 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 3], HasCheckedCertificate 15 7 ([[], [1, 1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p209, Certificates.k15t7p209_check⟩ + +private theorem k15t7_cover371 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2, 2], HasCheckedCertificate 15 7 ([[], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover372 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 2, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p210, Certificates.k15t7p210_check⟩ + +private theorem k15t7_cover373 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2, 2], HasCheckedCertificate 15 7 ([[], [1, 1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p211, Certificates.k15t7p211_check⟩ + +private theorem k15t7_cover374 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 3], HasCheckedCertificate 15 7 ([[], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover375 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 3, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p212, Certificates.k15t7p212_check⟩ + +private theorem k15t7_cover376 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 4], HasCheckedCertificate 15 7 ([[], [1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover378 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 7 ([[], [1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p213, Certificates.k15t7p213_check⟩ + +private theorem k15t7_cover379 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 7 ([[], [1, 1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p214, Certificates.k15t7p214_check⟩ + +private theorem k15t7_cover377 : ∀ P ∈ pathPatterns 2 3 [1, 1, 3], HasCheckedCertificate 15 7 ([[], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover378 + · exact by + intro _ + exact k15t7_cover379 + +private theorem k15t7_cover380 : ∀ P ∈ pathPatterns 1 2 [1, 1, 3, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover381 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3, 1, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p215, Certificates.k15t7p215_check⟩ + +private theorem k15t7_cover382 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1, 2], HasCheckedCertificate 15 7 ([[], [1, 1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p216, Certificates.k15t7p216_check⟩ + +private theorem k15t7_cover383 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3, 2], HasCheckedCertificate 15 7 ([[], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover384 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 2, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 3, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p217, Certificates.k15t7p217_check⟩ + +private theorem k15t7_cover385 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 3], HasCheckedCertificate 15 7 ([[], [1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover387 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 7 ([[], [1, 1, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p218, Certificates.k15t7p218_check⟩ + +private theorem k15t7_cover386 : ∀ P ∈ pathPatterns 2 2 [1, 1, 4], HasCheckedCertificate 15 7 ([[], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover387 + +private theorem k15t7_cover388 : ∀ P ∈ pathPatterns 1 1 [1, 1, 4, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover389 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4, 1, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 4, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p219, Certificates.k15t7p219_check⟩ + +private theorem k15t7_cover390 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4, 2], HasCheckedCertificate 15 7 ([[], [1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover391 : ∀ P ∈ pathPatterns 2 1 [1, 1, 5], HasCheckedCertificate 15 7 ([[], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover392 : ∀ P ∈ pathPatterns 1 0 [1, 1, 5, 1], HasCheckedCertificate 15 7 ([[], [1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover393 : ∀ P ∈ pathPatterns 2 0 [1, 1, 6], HasCheckedCertificate 15 7 ([[], [1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq327 : amountSequenceForall 3 6 (fun tail => + (LexLE [] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1, 1] ++ tail).length) (8 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 15 7 ([[]] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover328 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover343 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover348 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover349 + · exact by + intro _ + exact k15t7_cover350 + · exact by + intro _ + exact k15t7_cover351 + · exact by + intro _ + exact k15t7_cover352 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover353 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover354 + · exact by + intro _ + exact k15t7_cover355 + · exact by + intro _ + exact k15t7_cover356 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover357 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover358 + · exact by + intro _ + exact k15t7_cover359 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover360 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover361 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover362 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover363 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover367 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover368 + · exact by + intro _ + exact k15t7_cover369 + · exact by + intro _ + exact k15t7_cover370 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover371 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover372 + · exact by + intro _ + exact k15t7_cover373 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover374 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover375 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover376 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover377 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover380 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover381 + · exact by + intro _ + exact k15t7_cover382 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover383 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover384 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover385 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover386 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover388 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover389 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover390 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover391 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover392 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover393 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover396 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 15 7 ([[], [1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p220, Certificates.k15t7p220_check⟩ + +private theorem k15t7_cover397 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 15 7 ([[], [1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p221, Certificates.k15t7p221_check⟩ + +private theorem k15t7_cover398 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 15 7 ([[], [1, 2], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p222, Certificates.k15t7p222_check⟩ + +private theorem k15t7_cover399 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 15 7 ([[], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover400 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 15 7 ([[], [1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p223, Certificates.k15t7p223_check⟩ + +private theorem k15t7_cover401 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 15 7 ([[], [1, 2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p224, Certificates.k15t7p224_check⟩ + +private theorem k15t7_cover402 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 15 7 ([[], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover403 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 15 7 ([[], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover404 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 15 7 ([[], [1, 2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover395 : ∀ P ∈ pathPatterns 3 5 [1, 2], HasCheckedCertificate 15 7 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k15t7_cover396 + · exact by + intro _ + exact k15t7_cover397 + · exact by + intro _ + exact k15t7_cover398 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover399 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t7_cover400 + · exact by + intro _ + exact k15t7_cover401 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover402 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover403 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover404 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover406 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 15 7 ([[], [1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p225, Certificates.k15t7p225_check⟩ + +private theorem k15t7_cover407 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 15 7 ([[], [1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p226, Certificates.k15t7p226_check⟩ + +private theorem k15t7_cover408 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 7 ([[], [1, 2, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p227, Certificates.k15t7p227_check⟩ + +private theorem k15t7_cover405 : ∀ P ∈ pathPatterns 2 4 [1, 2, 1], HasCheckedCertificate 15 7 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover406 + · exact by + intro _ + exact k15t7_cover407 + · exact by + intro _ + exact k15t7_cover408 + +private theorem k15t7_cover409 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 1, 2], HasCheckedCertificate 15 7 ([[], [1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p228, Certificates.k15t7p228_check⟩ + +private theorem k15t7_cover410 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 3], HasCheckedCertificate 15 7 ([[], [1, 2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p229, Certificates.k15t7p229_check⟩ + +private theorem k15t7_cover411 : ∀ P ∈ pathPatterns 1 2 [1, 2, 1, 2], HasCheckedCertificate 15 7 ([[], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover412 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 2, 1], HasCheckedCertificate 15 7 ([[], [1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p230, Certificates.k15t7p230_check⟩ + +private theorem k15t7_cover413 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2, 2], HasCheckedCertificate 15 7 ([[], [1, 2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p231, Certificates.k15t7p231_check⟩ + +private theorem k15t7_cover414 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 3], HasCheckedCertificate 15 7 ([[], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover415 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 3, 1], HasCheckedCertificate 15 7 ([[], [1, 2, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p232, Certificates.k15t7p232_check⟩ + +private theorem k15t7_cover416 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 4], HasCheckedCertificate 15 7 ([[], [1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover418 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 7 ([[], [1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p233, Certificates.k15t7p233_check⟩ + +private theorem k15t7_cover419 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 7 ([[], [1, 2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p234, Certificates.k15t7p234_check⟩ + +private theorem k15t7_cover417 : ∀ P ∈ pathPatterns 2 3 [1, 2, 2], HasCheckedCertificate 15 7 ([[], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover418 + · exact by + intro _ + exact k15t7_cover419 + +private theorem k15t7_cover420 : ∀ P ∈ pathPatterns 1 2 [1, 2, 2, 1], HasCheckedCertificate 15 7 ([[], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover421 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 1, 2], HasCheckedCertificate 15 7 ([[], [1, 2, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p235, Certificates.k15t7p235_check⟩ + +private theorem k15t7_cover422 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2, 2], HasCheckedCertificate 15 7 ([[], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover423 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 2, 1], HasCheckedCertificate 15 7 ([[], [1, 2, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p236, Certificates.k15t7p236_check⟩ + +private theorem k15t7_cover424 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 3], HasCheckedCertificate 15 7 ([[], [1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover426 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 7 ([[], [1, 2, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p237, Certificates.k15t7p237_check⟩ + +private theorem k15t7_cover425 : ∀ P ∈ pathPatterns 2 2 [1, 2, 3], HasCheckedCertificate 15 7 ([[], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover426 + +private theorem k15t7_cover427 : ∀ P ∈ pathPatterns 1 1 [1, 2, 3, 1], HasCheckedCertificate 15 7 ([[], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover428 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3, 2], HasCheckedCertificate 15 7 ([[], [1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover429 : ∀ P ∈ pathPatterns 2 1 [1, 2, 4], HasCheckedCertificate 15 7 ([[], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover430 : ∀ P ∈ pathPatterns 1 0 [1, 2, 4, 1], HasCheckedCertificate 15 7 ([[], [1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover431 : ∀ P ∈ pathPatterns 2 0 [1, 2, 5], HasCheckedCertificate 15 7 ([[], [1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq394 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([1, 2] ++ tail) ∧ LexLE ([1, 2] ++ tail) ([1, 2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1, 2] ++ tail).length) (8 - ([1, 2] ++ tail).sum) ([1, 2] ++ tail), + HasCheckedCertificate 15 7 ([[]] ++ (([1, 2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover395 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover405 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · exact by + intro _ + exact k15t7_cover409 + · exact by + intro _ + exact k15t7_cover410 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover411 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover412 + · exact by + intro _ + exact k15t7_cover413 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover414 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover415 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover416 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover417 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover420 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · exact by + intro _ + exact k15t7_cover421 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover422 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover423 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover424 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover425 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover427 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 3, 1, 1] ∧ LexLE [1, 2, 3, 1, 1] [1, 1, 3, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover428 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover429 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover430 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover431 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover433 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 15 7 ([[], [1, 3], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p238, Certificates.k15t7p238_check⟩ + +private theorem k15t7_cover434 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 15 7 ([[], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover435 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 15 7 ([[], [1, 3], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p239, Certificates.k15t7p239_check⟩ + +private theorem k15t7_cover436 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 15 7 ([[], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover437 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 15 7 ([[], [1, 3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover432 : ∀ P ∈ pathPatterns 3 4 [1, 3], HasCheckedCertificate 15 7 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro _ + exact k15t7_cover433 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover434 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t7_cover435 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover436 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover437 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover439 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 7 ([[], [1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p240, Certificates.k15t7p240_check⟩ + +private theorem k15t7_cover440 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 7 ([[], [1, 3, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p241, Certificates.k15t7p241_check⟩ + +private theorem k15t7_cover438 : ∀ P ∈ pathPatterns 2 3 [1, 3, 1], HasCheckedCertificate 15 7 ([[], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover439 + · exact by + intro _ + exact k15t7_cover440 + +private theorem k15t7_cover441 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 1, 2], HasCheckedCertificate 15 7 ([[], [1, 3, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p242, Certificates.k15t7p242_check⟩ + +private theorem k15t7_cover442 : ∀ P ∈ pathPatterns 1 1 [1, 3, 1, 2], HasCheckedCertificate 15 7 ([[], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover443 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1, 3], HasCheckedCertificate 15 7 ([[], [1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover445 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 7 ([[], [1, 3, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p243, Certificates.k15t7p243_check⟩ + +private theorem k15t7_cover444 : ∀ P ∈ pathPatterns 2 2 [1, 3, 2], HasCheckedCertificate 15 7 ([[], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover445 + +private theorem k15t7_cover446 : ∀ P ∈ pathPatterns 1 0 [1, 3, 2, 2], HasCheckedCertificate 15 7 ([[], [1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover447 : ∀ P ∈ pathPatterns 2 1 [1, 3, 3], HasCheckedCertificate 15 7 ([[], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover448 : ∀ P ∈ pathPatterns 1 0 [1, 3, 3, 1], HasCheckedCertificate 15 7 ([[], [1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover449 : ∀ P ∈ pathPatterns 2 0 [1, 3, 4], HasCheckedCertificate 15 7 ([[], [1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover451 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 15 7 ([[], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover452 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 7 ([[], [1, 4], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover450 : ∀ P ∈ pathPatterns 3 3 [1, 4], HasCheckedCertificate 15 7 ([[], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover451 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover452 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover454 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 7 ([[], [1, 4, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p244, Certificates.k15t7p244_check⟩ + +private theorem k15t7_cover453 : ∀ P ∈ pathPatterns 2 2 [1, 4, 1], HasCheckedCertificate 15 7 ([[], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover454 + +private theorem k15t7_cover455 : ∀ P ∈ pathPatterns 1 0 [1, 4, 1, 2], HasCheckedCertificate 15 7 ([[], [1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover456 : ∀ P ∈ pathPatterns 2 1 [1, 4, 2], HasCheckedCertificate 15 7 ([[], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover457 : ∀ P ∈ pathPatterns 2 0 [1, 4, 3], HasCheckedCertificate 15 7 ([[], [1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover459 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 15 7 ([[], [1, 5], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover458 : ∀ P ∈ pathPatterns 3 2 [1, 5], HasCheckedCertificate 15 7 ([[], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover459 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover460 : ∀ P ∈ pathPatterns 2 1 [1, 5, 1], HasCheckedCertificate 15 7 ([[], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover461 : ∀ P ∈ pathPatterns 2 0 [1, 5, 2], HasCheckedCertificate 15 7 ([[], [1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover462 : ∀ P ∈ pathPatterns 3 1 [1, 6], HasCheckedCertificate 15 7 ([[], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover463 : ∀ P ∈ pathPatterns 2 0 [1, 6, 1], HasCheckedCertificate 15 7 ([[], [1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover464 : ∀ P ∈ pathPatterns 3 0 [1, 7], HasCheckedCertificate 15 7 ([[], [1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq271 : amountSequenceForall 4 7 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1] ++ tail).length) (8 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 15 7 ([[]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover272 + · intro q + fin_cases q + · exact k15t7_seq327 + + · exact k15t7_seq394 + + · exact by + constructor + · exact by + intro _ + exact k15t7_cover432 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover438 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · exact by + intro _ + exact k15t7_cover441 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover442 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 2, 1] ∧ LexLE [1, 3, 1, 2, 1] [1, 2, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover443 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover444 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1, 1] ∧ LexLE [1, 3, 2, 1, 1] [1, 1, 2, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover446 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover447 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover448 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover449 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover450 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover453 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1, 1] ∧ LexLE [1, 4, 1, 1, 1] [1, 1, 1, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover455 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover456 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 2, 1] ∧ LexLE [1, 4, 2, 1] [1, 2, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover457 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover458 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover460 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 1, 1] ∧ LexLE [1, 5, 1, 1] [1, 1, 5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover461 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover462 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover463 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover464 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover469 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 15 7 ([[], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p245, Certificates.k15t7p245_check⟩ + +private theorem k15t7_cover470 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 15 7 ([[], [2], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p246, Certificates.k15t7p246_check⟩ + +private theorem k15t7_cover471 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 7 ([[], [2], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p247, Certificates.k15t7p247_check⟩ + +private theorem k15t7_cover468 : ∀ P ∈ pathPatterns 2 4 [2], HasCheckedCertificate 15 7 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover469 + · exact by + intro _ + exact k15t7_cover470 + · exact by + intro _ + exact k15t7_cover471 + +private theorem k15t7_cover472 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2], HasCheckedCertificate 15 7 ([[], [2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p248, Certificates.k15t7p248_check⟩ + +private theorem k15t7_cover473 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3], HasCheckedCertificate 15 7 ([[], [2], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p249, Certificates.k15t7p249_check⟩ + +private theorem k15t7_cover474 : ∀ P ∈ pathPatterns 1 2 [2, 2], HasCheckedCertificate 15 7 ([[], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover475 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2], HasCheckedCertificate 15 7 ([[], [2], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p250, Certificates.k15t7p250_check⟩ + +private theorem k15t7_cover476 : ∀ P ∈ pathPatterns 1 1 [2, 3], HasCheckedCertificate 15 7 ([[], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover477 : ∀ P ∈ pathPatterns 1 0 [2, 4], HasCheckedCertificate 15 7 ([[], [2], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover479 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 7 ([[], [2], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p251, Certificates.k15t7p251_check⟩ + +private theorem k15t7_cover478 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 15 7 ([[], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k15t7_cover479 + +private theorem k15t7_cover480 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 15 7 ([[], [2], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover481 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 15 7 ([[], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t7_cover482 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 15 7 ([[], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover483 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 15 7 ([[], [2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq467 : amountSequenceForall 3 6 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 7 ([[], [2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 4] ∧ LexLE [1, 1, 4] [4, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 3] ∧ LexLE [1, 2, 3] [3, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 2] ∧ LexLE [1, 3, 2] [2, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4, 1] ∧ LexLE [1, 4, 1] [1, 4, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover468 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k15t7_cover472 + · exact by + intro _ + exact k15t7_cover473 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover474 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k15t7_cover475 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover476 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover477 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover478 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover480 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover481 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover482 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover483 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover466 : ∀ P ∈ pathPatterns 4 6 [2], HasCheckedCertificate 15 7 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact k15t7_seq467 + + +private theorem k15t7_cover485 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 1, 2], HasCheckedCertificate 15 7 ([[], [2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p252, Certificates.k15t7p252_check⟩ + +private theorem k15t7_cover486 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 1, 3], HasCheckedCertificate 15 7 ([[], [2, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p253, Certificates.k15t7p253_check⟩ + +private theorem k15t7_cover487 : ∀ P ∈ pathPatterns 1 2 [2, 1, 1, 2], HasCheckedCertificate 15 7 ([[], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover488 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 2, 2], HasCheckedCertificate 15 7 ([[], [2, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p254, Certificates.k15t7p254_check⟩ + +private theorem k15t7_cover489 : ∀ P ∈ pathPatterns 1 1 [2, 1, 1, 3], HasCheckedCertificate 15 7 ([[], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover490 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 4], HasCheckedCertificate 15 7 ([[], [2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover492 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 7 ([[], [2, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p255, Certificates.k15t7p255_check⟩ + +private theorem k15t7_cover491 : ∀ P ∈ pathPatterns 2 3 [2, 1, 2], HasCheckedCertificate 15 7 ([[], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k15t7_cover492 + +private theorem k15t7_cover493 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 1, 2], HasCheckedCertificate 15 7 ([[], [2, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p256, Certificates.k15t7p256_check⟩ + +private theorem k15t7_cover494 : ∀ P ∈ pathPatterns 1 1 [2, 1, 2, 2], HasCheckedCertificate 15 7 ([[], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover495 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2, 3], HasCheckedCertificate 15 7 ([[], [2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover496 : ∀ P ∈ pathPatterns 2 2 [2, 1, 3], HasCheckedCertificate 15 7 ([[], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t7_cover497 : ∀ P ∈ pathPatterns 1 0 [2, 1, 3, 2], HasCheckedCertificate 15 7 ([[], [2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover498 : ∀ P ∈ pathPatterns 2 1 [2, 1, 4], HasCheckedCertificate 15 7 ([[], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover499 : ∀ P ∈ pathPatterns 2 0 [2, 1, 5], HasCheckedCertificate 15 7 ([[], [2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq484 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([2, 1] ++ tail) ∧ LexLE ([2, 1] ++ tail) ([2, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([2, 1] ++ tail).length) (8 - ([2, 1] ++ tail).sum) ([2, 1] ++ tail), + HasCheckedCertificate 15 7 ([[]] ++ (([2, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · exact by + intro _ + exact k15t7_cover485 + · exact by + intro _ + exact k15t7_cover486 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover487 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · exact by + intro _ + exact k15t7_cover488 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover489 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 3, 1] ∧ LexLE [2, 1, 1, 3, 1] [1, 3, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover490 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover491 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · exact by + intro _ + exact k15t7_cover493 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover494 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 2, 1] ∧ LexLE [2, 1, 2, 2, 1] [1, 2, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover495 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover496 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1, 1] ∧ LexLE [2, 1, 3, 1, 1] [1, 1, 3, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover497 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover498 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 4, 1] ∧ LexLE [2, 1, 4, 1] [1, 4, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover499 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover501 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 15 7 ([[], [2, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p257, Certificates.k15t7p257_check⟩ + +private theorem k15t7_cover502 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 15 7 ([[], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover503 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 15 7 ([[], [2, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover500 : ∀ P ∈ pathPatterns 3 4 [2, 2], HasCheckedCertificate 15 7 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t7_cover501 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover502 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover503 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover504 : ∀ P ∈ pathPatterns 1 0 [2, 2, 1, 3], HasCheckedCertificate 15 7 ([[], [2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover505 : ∀ P ∈ pathPatterns 2 2 [2, 2, 2], HasCheckedCertificate 15 7 ([[], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t7_cover506 : ∀ P ∈ pathPatterns 1 0 [2, 2, 2, 2], HasCheckedCertificate 15 7 ([[], [2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover507 : ∀ P ∈ pathPatterns 2 1 [2, 2, 3], HasCheckedCertificate 15 7 ([[], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover508 : ∀ P ∈ pathPatterns 2 0 [2, 2, 4], HasCheckedCertificate 15 7 ([[], [2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover510 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 7 ([[], [2, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover509 : ∀ P ∈ pathPatterns 3 3 [2, 3], HasCheckedCertificate 15 7 ([[], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover510 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover511 : ∀ P ∈ pathPatterns 2 1 [2, 3, 2], HasCheckedCertificate 15 7 ([[], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover512 : ∀ P ∈ pathPatterns 2 0 [2, 3, 3], HasCheckedCertificate 15 7 ([[], [2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover513 : ∀ P ∈ pathPatterns 3 2 [2, 4], HasCheckedCertificate 15 7 ([[], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover514 : ∀ P ∈ pathPatterns 2 0 [2, 4, 2], HasCheckedCertificate 15 7 ([[], [2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover515 : ∀ P ∈ pathPatterns 3 1 [2, 5], HasCheckedCertificate 15 7 ([[], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover516 : ∀ P ∈ pathPatterns 3 0 [2, 6], HasCheckedCertificate 15 7 ([[], [2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq465 : amountSequenceForall 4 6 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([2] ++ tail).length) (8 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 15 7 ([[]] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover466 + · intro q + fin_cases q + · exact k15t7_seq484 + + · exact by + constructor + · exact by + intro _ + exact k15t7_cover500 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 2] ∧ LexLE [2, 2, 1, 1, 2] [2, 1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2, 1] ∧ LexLE [2, 2, 1, 2, 1] [1, 2, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover504 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover505 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1, 1] ∧ LexLE [2, 2, 2, 1, 1] [1, 1, 2, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover506 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover507 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 3, 1] ∧ LexLE [2, 2, 3, 1] [1, 3, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover508 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover509 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1, 1] ∧ LexLE [2, 3, 1, 1, 1] [1, 1, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 2] ∧ LexLE [2, 3, 1, 2] [2, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover511 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 1] ∧ LexLE [2, 3, 2, 1] [1, 2, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover512 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover513 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 1] ∧ LexLE [2, 4, 1, 1] [1, 1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover514 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover515 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover516 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover520 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 15 7 ([[], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t7_cover521 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 15 7 ([[], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover522 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 15 7 ([[], [3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq519 : amountSequenceForall 3 5 (fun tail => + (LexLE [3] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 7 ([[], [3]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 2] ∧ LexLE [2, 1, 2] [2, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover520 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover521 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover522 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover518 : ∀ P ∈ pathPatterns 4 5 [3], HasCheckedCertificate 15 7 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact k15t7_seq519 + + +private theorem k15t7_cover523 : ∀ P ∈ pathPatterns 1 0 [3, 1, 1, 3], HasCheckedCertificate 15 7 ([[], [3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover524 : ∀ P ∈ pathPatterns 2 1 [3, 1, 3], HasCheckedCertificate 15 7 ([[], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover525 : ∀ P ∈ pathPatterns 2 0 [3, 1, 4], HasCheckedCertificate 15 7 ([[], [3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover526 : ∀ P ∈ pathPatterns 2 0 [3, 2, 3], HasCheckedCertificate 15 7 ([[], [3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover527 : ∀ P ∈ pathPatterns 3 2 [3, 3], HasCheckedCertificate 15 7 ([[], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover528 : ∀ P ∈ pathPatterns 3 1 [3, 4], HasCheckedCertificate 15 7 ([[], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover529 : ∀ P ∈ pathPatterns 3 0 [3, 5], HasCheckedCertificate 15 7 ([[], [3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq517 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([3] ++ tail) ∧ LexLE ([3] ++ tail) ([3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([3] ++ tail).length) (8 - ([3] ++ tail).sum) ([3] ++ tail), + HasCheckedCertificate 15 7 ([[]] ++ (([3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover518 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 2] ∧ LexLE [3, 1, 1, 1, 2] [2, 1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2, 1] ∧ LexLE [3, 1, 1, 2, 1] [1, 2, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover523 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1, 1] ∧ LexLE [3, 1, 2, 1, 1] [1, 1, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 2] ∧ LexLE [3, 1, 2, 2] [2, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover524 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 1] ∧ LexLE [3, 1, 3, 1] [1, 3, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover525 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1, 1] ∧ LexLE [3, 2, 1, 1, 1] [1, 1, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 2] ∧ LexLE [3, 2, 1, 2] [2, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 1] ∧ LexLE [3, 2, 2, 1] [1, 2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover526 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover527 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 1] ∧ LexLE [3, 3, 1, 1] [1, 1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover528 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover529 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover531 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 15 7 ([[], [4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover530 : ∀ P ∈ pathPatterns 4 4 [4], HasCheckedCertificate 15 7 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover531 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover532 : ∀ P ∈ pathPatterns 3 0 [4, 4], HasCheckedCertificate 15 7 ([[], [4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover533 : ∀ P ∈ pathPatterns 4 3 [5], HasCheckedCertificate 15 7 ([[], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover534 : ∀ P ∈ pathPatterns 4 2 [6], HasCheckedCertificate 15 7 ([[], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover535 : ∀ P ∈ pathPatterns 4 1 [7], HasCheckedCertificate 15 7 ([[], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover536 : ∀ P ∈ pathPatterns 4 0 [8], HasCheckedCertificate 15 7 ([[], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq4 : amountSequenceForall 5 8 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (8 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 7 ([[]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover5 + · intro q + fin_cases q + · exact k15t7_seq271 + + · exact k15t7_seq465 + + · exact k15t7_seq517 + + · exact by + constructor + · exact by + intro _ + exact k15t7_cover530 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1, 1] ∧ LexLE [4, 1, 1, 1, 1] [1, 1, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 2] ∧ LexLE [4, 1, 1, 2] [2, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 1] ∧ LexLE [4, 1, 2, 1] [1, 2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 1] ∧ LexLE [4, 2, 1, 1] [1, 1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover532 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover533 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 1] ∧ LexLE [5, 1, 1, 1] [1, 1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover534 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover535 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover536 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover3 : ∀ P ∈ pathPatterns 6 8 [], HasCheckedCertificate 15 7 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact k15t7_seq4 + + +private theorem k15t7_cover542 : ∀ P ∈ pathPatterns 1 5 [1], HasCheckedCertificate 15 7 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover543 : ∀ P ∈ pathPatterns 0 4 [1, 1], HasCheckedCertificate 15 7 ([[1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p258, Certificates.k15t7p258_check⟩ + +private theorem k15t7_cover544 : ∀ P ∈ pathPatterns 0 3 [1, 2], HasCheckedCertificate 15 7 ([[1], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p259, Certificates.k15t7p259_check⟩ + +private theorem k15t7_cover545 : ∀ P ∈ pathPatterns 0 2 [1, 3], HasCheckedCertificate 15 7 ([[1], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p260, Certificates.k15t7p260_check⟩ + +private theorem k15t7_cover546 : ∀ P ∈ pathPatterns 0 1 [1, 4], HasCheckedCertificate 15 7 ([[1], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p261, Certificates.k15t7p261_check⟩ + +private theorem k15t7_cover547 : ∀ P ∈ pathPatterns 0 0 [1, 5], HasCheckedCertificate 15 7 ([[1], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p262, Certificates.k15t7p262_check⟩ + +private theorem k15t7_cover548 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 15 7 ([[1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover549 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 15 7 ([[1], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p263, Certificates.k15t7p263_check⟩ + +private theorem k15t7_cover550 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 15 7 ([[1], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p264, Certificates.k15t7p264_check⟩ + +private theorem k15t7_cover551 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 15 7 ([[1], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p265, Certificates.k15t7p265_check⟩ + +private theorem k15t7_cover552 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 15 7 ([[1], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover553 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 15 7 ([[1], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p266, Certificates.k15t7p266_check⟩ + +private theorem k15t7_cover554 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 15 7 ([[1], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover555 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 15 7 ([[1], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover556 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 15 7 ([[1], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover541 : ∀ P ∈ pathPatterns 3 6 [1], HasCheckedCertificate 15 7 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover542 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover543 + · exact by + intro _ + exact k15t7_cover544 + · exact by + intro _ + exact k15t7_cover545 + · exact by + intro _ + exact k15t7_cover546 + · exact by + intro _ + exact k15t7_cover547 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover548 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t7_cover549 + · exact by + intro _ + exact k15t7_cover550 + · exact by + intro _ + exact k15t7_cover551 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover552 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k15t7_cover553 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover554 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover555 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover556 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover558 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 15 7 ([[1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p267, Certificates.k15t7p267_check⟩ + +private theorem k15t7_cover559 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 15 7 ([[1], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p268, Certificates.k15t7p268_check⟩ + +private theorem k15t7_cover560 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 15 7 ([[1], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p269, Certificates.k15t7p269_check⟩ + +private theorem k15t7_cover561 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 15 7 ([[1], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p270, Certificates.k15t7p270_check⟩ + +private theorem k15t7_cover557 : ∀ P ∈ pathPatterns 2 5 [1, 1], HasCheckedCertificate 15 7 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover558 + · exact by + intro _ + exact k15t7_cover559 + · exact by + intro _ + exact k15t7_cover560 + · exact by + intro _ + exact k15t7_cover561 + +private theorem k15t7_cover562 : ∀ P ∈ pathPatterns 1 4 [1, 1, 1], HasCheckedCertificate 15 7 ([[1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover563 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 1], HasCheckedCertificate 15 7 ([[1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p271, Certificates.k15t7p271_check⟩ + +private theorem k15t7_cover564 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 2], HasCheckedCertificate 15 7 ([[1], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p272, Certificates.k15t7p272_check⟩ + +private theorem k15t7_cover565 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 3], HasCheckedCertificate 15 7 ([[1], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p273, Certificates.k15t7p273_check⟩ + +private theorem k15t7_cover566 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 4], HasCheckedCertificate 15 7 ([[1], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p274, Certificates.k15t7p274_check⟩ + +private theorem k15t7_cover567 : ∀ P ∈ pathPatterns 1 3 [1, 1, 2], HasCheckedCertificate 15 7 ([[1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover568 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2, 1], HasCheckedCertificate 15 7 ([[1], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p275, Certificates.k15t7p275_check⟩ + +private theorem k15t7_cover569 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 2], HasCheckedCertificate 15 7 ([[1], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p276, Certificates.k15t7p276_check⟩ + +private theorem k15t7_cover570 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 3], HasCheckedCertificate 15 7 ([[1], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p277, Certificates.k15t7p277_check⟩ + +private theorem k15t7_cover571 : ∀ P ∈ pathPatterns 1 2 [1, 1, 3], HasCheckedCertificate 15 7 ([[1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover572 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3, 1], HasCheckedCertificate 15 7 ([[1], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p278, Certificates.k15t7p278_check⟩ + +private theorem k15t7_cover573 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 2], HasCheckedCertificate 15 7 ([[1], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p279, Certificates.k15t7p279_check⟩ + +private theorem k15t7_cover574 : ∀ P ∈ pathPatterns 1 1 [1, 1, 4], HasCheckedCertificate 15 7 ([[1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover575 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4, 1], HasCheckedCertificate 15 7 ([[1], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p280, Certificates.k15t7p280_check⟩ + +private theorem k15t7_cover576 : ∀ P ∈ pathPatterns 1 0 [1, 1, 5], HasCheckedCertificate 15 7 ([[1], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover578 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 15 7 ([[1], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p281, Certificates.k15t7p281_check⟩ + +private theorem k15t7_cover579 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 15 7 ([[1], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p282, Certificates.k15t7p282_check⟩ + +private theorem k15t7_cover580 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 7 ([[1], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p283, Certificates.k15t7p283_check⟩ + +private theorem k15t7_cover577 : ∀ P ∈ pathPatterns 2 4 [1, 2], HasCheckedCertificate 15 7 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover578 + · exact by + intro _ + exact k15t7_cover579 + · exact by + intro _ + exact k15t7_cover580 + +private theorem k15t7_cover581 : ∀ P ∈ pathPatterns 1 3 [1, 2, 1], HasCheckedCertificate 15 7 ([[1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover582 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 2], HasCheckedCertificate 15 7 ([[1], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p284, Certificates.k15t7p284_check⟩ + +private theorem k15t7_cover583 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 3], HasCheckedCertificate 15 7 ([[1], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p285, Certificates.k15t7p285_check⟩ + +private theorem k15t7_cover584 : ∀ P ∈ pathPatterns 1 2 [1, 2, 2], HasCheckedCertificate 15 7 ([[1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover585 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2, 1], HasCheckedCertificate 15 7 ([[1], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p286, Certificates.k15t7p286_check⟩ + +private theorem k15t7_cover586 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 2], HasCheckedCertificate 15 7 ([[1], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p287, Certificates.k15t7p287_check⟩ + +private theorem k15t7_cover587 : ∀ P ∈ pathPatterns 1 1 [1, 2, 3], HasCheckedCertificate 15 7 ([[1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover588 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3, 1], HasCheckedCertificate 15 7 ([[1], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p288, Certificates.k15t7p288_check⟩ + +private theorem k15t7_cover589 : ∀ P ∈ pathPatterns 1 0 [1, 2, 4], HasCheckedCertificate 15 7 ([[1], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover591 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 7 ([[1], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p289, Certificates.k15t7p289_check⟩ + +private theorem k15t7_cover592 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 7 ([[1], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p290, Certificates.k15t7p290_check⟩ + +private theorem k15t7_cover590 : ∀ P ∈ pathPatterns 2 3 [1, 3], HasCheckedCertificate 15 7 ([[1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover591 + · exact by + intro _ + exact k15t7_cover592 + +private theorem k15t7_cover593 : ∀ P ∈ pathPatterns 1 2 [1, 3, 1], HasCheckedCertificate 15 7 ([[1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover594 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 2], HasCheckedCertificate 15 7 ([[1], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p291, Certificates.k15t7p291_check⟩ + +private theorem k15t7_cover595 : ∀ P ∈ pathPatterns 1 1 [1, 3, 2], HasCheckedCertificate 15 7 ([[1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover596 : ∀ P ∈ pathPatterns 1 0 [1, 3, 3], HasCheckedCertificate 15 7 ([[1], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover598 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 7 ([[1], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p292, Certificates.k15t7p292_check⟩ + +private theorem k15t7_cover597 : ∀ P ∈ pathPatterns 2 2 [1, 4], HasCheckedCertificate 15 7 ([[1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover598 + +private theorem k15t7_cover599 : ∀ P ∈ pathPatterns 1 1 [1, 4, 1], HasCheckedCertificate 15 7 ([[1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover600 : ∀ P ∈ pathPatterns 1 0 [1, 4, 2], HasCheckedCertificate 15 7 ([[1], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover601 : ∀ P ∈ pathPatterns 2 1 [1, 5], HasCheckedCertificate 15 7 ([[1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover602 : ∀ P ∈ pathPatterns 1 0 [1, 5, 1], HasCheckedCertificate 15 7 ([[1], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover603 : ∀ P ∈ pathPatterns 2 0 [1, 6], HasCheckedCertificate 15 7 ([[1], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq540 : amountSequenceForall 3 6 (fun tail => + (LexLE [1] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (7 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 15 7 ([[1]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover541 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover557 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover562 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover563 + · exact by + intro _ + exact k15t7_cover564 + · exact by + intro _ + exact k15t7_cover565 + · exact by + intro _ + exact k15t7_cover566 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover567 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover568 + · exact by + intro _ + exact k15t7_cover569 + · exact by + intro _ + exact k15t7_cover570 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover571 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover572 + · exact by + intro _ + exact k15t7_cover573 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover574 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover575 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover576 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover577 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover581 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k15t7_cover582 + · exact by + intro _ + exact k15t7_cover583 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover584 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover585 + · exact by + intro _ + exact k15t7_cover586 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover587 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover588 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover589 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover590 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover593 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + intro _ + exact k15t7_cover594 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover595 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover596 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover597 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover599 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover600 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover601 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover602 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover603 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover606 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 15 7 ([[1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover607 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 15 7 ([[1], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p293, Certificates.k15t7p293_check⟩ + +private theorem k15t7_cover608 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 15 7 ([[1], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p294, Certificates.k15t7p294_check⟩ + +private theorem k15t7_cover609 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 15 7 ([[1], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover610 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 15 7 ([[1], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover611 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 15 7 ([[1], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover605 : ∀ P ∈ pathPatterns 3 5 [2], HasCheckedCertificate 15 7 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover606 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t7_cover607 + · exact by + intro _ + exact k15t7_cover608 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover609 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover610 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover611 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover612 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 2], HasCheckedCertificate 15 7 ([[1], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p295, Certificates.k15t7p295_check⟩ + +private theorem k15t7_cover613 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 3], HasCheckedCertificate 15 7 ([[1], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p296, Certificates.k15t7p296_check⟩ + +private theorem k15t7_cover614 : ∀ P ∈ pathPatterns 1 2 [2, 1, 2], HasCheckedCertificate 15 7 ([[1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover615 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 2], HasCheckedCertificate 15 7 ([[1], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p297, Certificates.k15t7p297_check⟩ + +private theorem k15t7_cover616 : ∀ P ∈ pathPatterns 1 1 [2, 1, 3], HasCheckedCertificate 15 7 ([[1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover617 : ∀ P ∈ pathPatterns 1 0 [2, 1, 4], HasCheckedCertificate 15 7 ([[1], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover619 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 7 ([[1], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p298, Certificates.k15t7p298_check⟩ + +private theorem k15t7_cover618 : ∀ P ∈ pathPatterns 2 3 [2, 2], HasCheckedCertificate 15 7 ([[1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k15t7_cover619 + +private theorem k15t7_cover620 : ∀ P ∈ pathPatterns 1 1 [2, 2, 2], HasCheckedCertificate 15 7 ([[1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover621 : ∀ P ∈ pathPatterns 1 0 [2, 2, 3], HasCheckedCertificate 15 7 ([[1], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover622 : ∀ P ∈ pathPatterns 2 2 [2, 3], HasCheckedCertificate 15 7 ([[1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t7_cover623 : ∀ P ∈ pathPatterns 1 0 [2, 3, 2], HasCheckedCertificate 15 7 ([[1], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover624 : ∀ P ∈ pathPatterns 2 1 [2, 4], HasCheckedCertificate 15 7 ([[1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover625 : ∀ P ∈ pathPatterns 2 0 [2, 5], HasCheckedCertificate 15 7 ([[1], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq604 : amountSequenceForall 3 5 (fun tail => + (LexLE [1] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([2] ++ tail).length) (7 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 15 7 ([[1]] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover605 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k15t7_cover612 + · exact by + intro _ + exact k15t7_cover613 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover614 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + intro _ + exact k15t7_cover615 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover616 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover617 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover618 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover620 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover621 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover622 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover623 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover624 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover625 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover627 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 15 7 ([[1], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover628 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 15 7 ([[1], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover626 : ∀ P ∈ pathPatterns 3 4 [3], HasCheckedCertificate 15 7 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover627 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover628 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover629 : ∀ P ∈ pathPatterns 1 0 [3, 1, 3], HasCheckedCertificate 15 7 ([[1], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover630 : ∀ P ∈ pathPatterns 2 1 [3, 3], HasCheckedCertificate 15 7 ([[1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover631 : ∀ P ∈ pathPatterns 2 0 [3, 4], HasCheckedCertificate 15 7 ([[1], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover632 : ∀ P ∈ pathPatterns 3 3 [4], HasCheckedCertificate 15 7 ([[1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover633 : ∀ P ∈ pathPatterns 3 2 [5], HasCheckedCertificate 15 7 ([[1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover634 : ∀ P ∈ pathPatterns 3 1 [6], HasCheckedCertificate 15 7 ([[1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover635 : ∀ P ∈ pathPatterns 3 0 [7], HasCheckedCertificate 15 7 ([[1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq539 : amountSequenceForall 4 7 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 7 ([[1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k15t7_seq540 + + · exact k15t7_seq604 + + · exact by + constructor + · exact by + intro _ + exact k15t7_cover626 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover629 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover630 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover631 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover632 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover633 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover634 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover635 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover538 : ∀ P ∈ pathPatterns 5 7 [1], HasCheckedCertificate 15 7 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact k15t7_seq539 + + +private theorem k15t7_cover639 : ∀ P ∈ pathPatterns 1 4 [1, 1], HasCheckedCertificate 15 7 ([[1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover640 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1], HasCheckedCertificate 15 7 ([[1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p299, Certificates.k15t7p299_check⟩ + +private theorem k15t7_cover641 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2], HasCheckedCertificate 15 7 ([[1, 1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p300, Certificates.k15t7p300_check⟩ + +private theorem k15t7_cover642 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3], HasCheckedCertificate 15 7 ([[1, 1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p301, Certificates.k15t7p301_check⟩ + +private theorem k15t7_cover643 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4], HasCheckedCertificate 15 7 ([[1, 1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p302, Certificates.k15t7p302_check⟩ + +private theorem k15t7_cover644 : ∀ P ∈ pathPatterns 1 3 [1, 2], HasCheckedCertificate 15 7 ([[1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover645 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1], HasCheckedCertificate 15 7 ([[1, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p303, Certificates.k15t7p303_check⟩ + +private theorem k15t7_cover646 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2], HasCheckedCertificate 15 7 ([[1, 1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p304, Certificates.k15t7p304_check⟩ + +private theorem k15t7_cover647 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3], HasCheckedCertificate 15 7 ([[1, 1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p305, Certificates.k15t7p305_check⟩ + +private theorem k15t7_cover648 : ∀ P ∈ pathPatterns 1 2 [1, 3], HasCheckedCertificate 15 7 ([[1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover649 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1], HasCheckedCertificate 15 7 ([[1, 1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p306, Certificates.k15t7p306_check⟩ + +private theorem k15t7_cover650 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2], HasCheckedCertificate 15 7 ([[1, 1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p307, Certificates.k15t7p307_check⟩ + +private theorem k15t7_cover651 : ∀ P ∈ pathPatterns 1 1 [1, 4], HasCheckedCertificate 15 7 ([[1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover652 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1], HasCheckedCertificate 15 7 ([[1, 1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p308, Certificates.k15t7p308_check⟩ + +private theorem k15t7_cover653 : ∀ P ∈ pathPatterns 1 0 [1, 5], HasCheckedCertificate 15 7 ([[1, 1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover655 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 15 7 ([[1, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p309, Certificates.k15t7p309_check⟩ + +private theorem k15t7_cover656 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 15 7 ([[1, 1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p310, Certificates.k15t7p310_check⟩ + +private theorem k15t7_cover657 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 7 ([[1, 1], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p311, Certificates.k15t7p311_check⟩ + +private theorem k15t7_cover654 : ∀ P ∈ pathPatterns 2 4 [2], HasCheckedCertificate 15 7 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover655 + · exact by + intro _ + exact k15t7_cover656 + · exact by + intro _ + exact k15t7_cover657 + +private theorem k15t7_cover658 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2], HasCheckedCertificate 15 7 ([[1, 1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p312, Certificates.k15t7p312_check⟩ + +private theorem k15t7_cover659 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3], HasCheckedCertificate 15 7 ([[1, 1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p313, Certificates.k15t7p313_check⟩ + +private theorem k15t7_cover660 : ∀ P ∈ pathPatterns 1 2 [2, 2], HasCheckedCertificate 15 7 ([[1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover661 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2], HasCheckedCertificate 15 7 ([[1, 1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p314, Certificates.k15t7p314_check⟩ + +private theorem k15t7_cover662 : ∀ P ∈ pathPatterns 1 1 [2, 3], HasCheckedCertificate 15 7 ([[1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover663 : ∀ P ∈ pathPatterns 1 0 [2, 4], HasCheckedCertificate 15 7 ([[1, 1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover665 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 7 ([[1, 1], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p315, Certificates.k15t7p315_check⟩ + +private theorem k15t7_cover664 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 15 7 ([[1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k15t7_cover665 + +private theorem k15t7_cover666 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 15 7 ([[1, 1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover667 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 15 7 ([[1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t7_cover668 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 15 7 ([[1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover669 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 15 7 ([[1, 1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq638 : amountSequenceForall 3 6 (fun tail => + (LexLE [1, 1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 7 ([[1, 1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover639 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover640 + · exact by + intro _ + exact k15t7_cover641 + · exact by + intro _ + exact k15t7_cover642 + · exact by + intro _ + exact k15t7_cover643 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover644 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover645 + · exact by + intro _ + exact k15t7_cover646 + · exact by + intro _ + exact k15t7_cover647 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover648 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover649 + · exact by + intro _ + exact k15t7_cover650 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover651 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover652 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover653 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover654 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k15t7_cover658 + · exact by + intro _ + exact k15t7_cover659 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover660 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k15t7_cover661 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover662 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover663 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover664 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover666 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover667 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover668 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover669 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover637 : ∀ P ∈ pathPatterns 4 6 [1, 1], HasCheckedCertificate 15 7 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact k15t7_seq638 + + +private theorem k15t7_cover672 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 15 7 ([[1, 1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p316, Certificates.k15t7p316_check⟩ + +private theorem k15t7_cover673 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 15 7 ([[1, 1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p317, Certificates.k15t7p317_check⟩ + +private theorem k15t7_cover674 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 15 7 ([[1, 1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p318, Certificates.k15t7p318_check⟩ + +private theorem k15t7_cover675 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 15 7 ([[1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover676 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 15 7 ([[1, 1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p319, Certificates.k15t7p319_check⟩ + +private theorem k15t7_cover677 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 15 7 ([[1, 1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p320, Certificates.k15t7p320_check⟩ + +private theorem k15t7_cover678 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 15 7 ([[1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover679 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 15 7 ([[1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover680 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 15 7 ([[1, 1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover671 : ∀ P ∈ pathPatterns 3 5 [1, 1, 1], HasCheckedCertificate 15 7 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k15t7_cover672 + · exact by + intro _ + exact k15t7_cover673 + · exact by + intro _ + exact k15t7_cover674 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover675 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t7_cover676 + · exact by + intro _ + exact k15t7_cover677 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover678 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover679 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover680 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover682 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 15 7 ([[1, 1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p321, Certificates.k15t7p321_check⟩ + +private theorem k15t7_cover683 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 15 7 ([[1, 1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p322, Certificates.k15t7p322_check⟩ + +private theorem k15t7_cover684 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 7 ([[1, 1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p323, Certificates.k15t7p323_check⟩ + +private theorem k15t7_cover681 : ∀ P ∈ pathPatterns 2 4 [1, 1, 1, 1], HasCheckedCertificate 15 7 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover682 + · exact by + intro _ + exact k15t7_cover683 + · exact by + intro _ + exact k15t7_cover684 + +private theorem k15t7_cover685 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1, 1, 1], HasCheckedCertificate 15 7 ([[1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover686 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1, 1, 1], HasCheckedCertificate 15 7 ([[1, 1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p324, Certificates.k15t7p324_check⟩ + +private theorem k15t7_cover687 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 1, 2], HasCheckedCertificate 15 7 ([[1, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p325, Certificates.k15t7p325_check⟩ + +private theorem k15t7_cover688 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1, 3], HasCheckedCertificate 15 7 ([[1, 1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p326, Certificates.k15t7p326_check⟩ + +private theorem k15t7_cover689 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 1, 2], HasCheckedCertificate 15 7 ([[1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover690 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 2, 1], HasCheckedCertificate 15 7 ([[1, 1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p327, Certificates.k15t7p327_check⟩ + +private theorem k15t7_cover691 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 2, 2], HasCheckedCertificate 15 7 ([[1, 1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p328, Certificates.k15t7p328_check⟩ + +private theorem k15t7_cover692 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1, 3], HasCheckedCertificate 15 7 ([[1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover693 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 3, 1], HasCheckedCertificate 15 7 ([[1, 1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p329, Certificates.k15t7p329_check⟩ + +private theorem k15t7_cover694 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 4], HasCheckedCertificate 15 7 ([[1, 1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover696 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 7 ([[1, 1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p330, Certificates.k15t7p330_check⟩ + +private theorem k15t7_cover697 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 7 ([[1, 1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p331, Certificates.k15t7p331_check⟩ + +private theorem k15t7_cover695 : ∀ P ∈ pathPatterns 2 3 [1, 1, 1, 2], HasCheckedCertificate 15 7 ([[1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover696 + · exact by + intro _ + exact k15t7_cover697 + +private theorem k15t7_cover698 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 2, 1], HasCheckedCertificate 15 7 ([[1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover699 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2, 1, 1], HasCheckedCertificate 15 7 ([[1, 1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p332, Certificates.k15t7p332_check⟩ + +private theorem k15t7_cover700 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 1, 2], HasCheckedCertificate 15 7 ([[1, 1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p333, Certificates.k15t7p333_check⟩ + +private theorem k15t7_cover701 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 2, 2], HasCheckedCertificate 15 7 ([[1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover702 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 2, 1], HasCheckedCertificate 15 7 ([[1, 1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p334, Certificates.k15t7p334_check⟩ + +private theorem k15t7_cover703 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2, 3], HasCheckedCertificate 15 7 ([[1, 1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover705 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 7 ([[1, 1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p335, Certificates.k15t7p335_check⟩ + +private theorem k15t7_cover704 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1, 3], HasCheckedCertificate 15 7 ([[1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover705 + +private theorem k15t7_cover706 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 3, 1], HasCheckedCertificate 15 7 ([[1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover707 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3, 1, 1], HasCheckedCertificate 15 7 ([[1, 1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p336, Certificates.k15t7p336_check⟩ + +private theorem k15t7_cover708 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 3, 2], HasCheckedCertificate 15 7 ([[1, 1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover709 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 4], HasCheckedCertificate 15 7 ([[1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover710 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 4, 1], HasCheckedCertificate 15 7 ([[1, 1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover711 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 5], HasCheckedCertificate 15 7 ([[1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq670 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([1, 1, 1] ++ tail) ∧ LexLE ([1, 1, 1] ++ tail) ([1, 1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1, 1, 1] ++ tail).length) (8 - ([1, 1, 1] ++ tail).sum) ([1, 1, 1] ++ tail), + HasCheckedCertificate 15 7 ([] ++ (([1, 1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover671 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover681 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover685 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover686 + · exact by + intro _ + exact k15t7_cover687 + · exact by + intro _ + exact k15t7_cover688 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover689 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover690 + · exact by + intro _ + exact k15t7_cover691 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover692 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover693 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover694 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover695 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover698 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover699 + · exact by + intro _ + exact k15t7_cover700 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover701 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover702 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover703 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover704 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover706 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover707 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover708 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover709 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover710 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover711 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover713 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 15 7 ([[1, 1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p337, Certificates.k15t7p337_check⟩ + +private theorem k15t7_cover714 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 15 7 ([[1, 1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p338, Certificates.k15t7p338_check⟩ + +private theorem k15t7_cover715 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 15 7 ([[1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover716 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 15 7 ([[1, 1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p339, Certificates.k15t7p339_check⟩ + +private theorem k15t7_cover717 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 15 7 ([[1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover718 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 15 7 ([[1, 1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover712 : ∀ P ∈ pathPatterns 3 4 [1, 1, 2], HasCheckedCertificate 15 7 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k15t7_cover713 + · exact by + intro _ + exact k15t7_cover714 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover715 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t7_cover716 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover717 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover718 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover720 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 7 ([[1, 1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p340, Certificates.k15t7p340_check⟩ + +private theorem k15t7_cover721 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 7 ([[1, 1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p341, Certificates.k15t7p341_check⟩ + +private theorem k15t7_cover719 : ∀ P ∈ pathPatterns 2 3 [1, 1, 2, 1], HasCheckedCertificate 15 7 ([[1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover720 + · exact by + intro _ + exact k15t7_cover721 + +private theorem k15t7_cover722 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2, 1, 1], HasCheckedCertificate 15 7 ([[1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover723 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 1, 2], HasCheckedCertificate 15 7 ([[1, 1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p342, Certificates.k15t7p342_check⟩ + +private theorem k15t7_cover724 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 1, 2], HasCheckedCertificate 15 7 ([[1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover725 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 2, 1], HasCheckedCertificate 15 7 ([[1, 1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p343, Certificates.k15t7p343_check⟩ + +private theorem k15t7_cover726 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1, 3], HasCheckedCertificate 15 7 ([[1, 1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover728 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 7 ([[1, 1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p344, Certificates.k15t7p344_check⟩ + +private theorem k15t7_cover727 : ∀ P ∈ pathPatterns 2 2 [1, 1, 2, 2], HasCheckedCertificate 15 7 ([[1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover728 + +private theorem k15t7_cover729 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 2, 1], HasCheckedCertificate 15 7 ([[1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover730 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2, 1, 1], HasCheckedCertificate 15 7 ([[1, 1, 2, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p345, Certificates.k15t7p345_check⟩ + +private theorem k15t7_cover731 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 2, 2], HasCheckedCertificate 15 7 ([[1, 1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover732 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2, 3], HasCheckedCertificate 15 7 ([[1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover733 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 3, 1], HasCheckedCertificate 15 7 ([[1, 1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover734 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 4], HasCheckedCertificate 15 7 ([[1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover736 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 15 7 ([[1, 1, 3], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p346, Certificates.k15t7p346_check⟩ + +private theorem k15t7_cover737 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 15 7 ([[1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover738 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 7 ([[1, 1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover735 : ∀ P ∈ pathPatterns 3 3 [1, 1, 3], HasCheckedCertificate 15 7 ([[1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k15t7_cover736 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover737 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover738 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover740 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 7 ([[1, 1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p347, Certificates.k15t7p347_check⟩ + +private theorem k15t7_cover739 : ∀ P ∈ pathPatterns 2 2 [1, 1, 3, 1], HasCheckedCertificate 15 7 ([[1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover740 + +private theorem k15t7_cover741 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3, 1, 1], HasCheckedCertificate 15 7 ([[1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover742 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 1, 2], HasCheckedCertificate 15 7 ([[1, 1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover743 : ∀ P ∈ pathPatterns 2 1 [1, 1, 3, 2], HasCheckedCertificate 15 7 ([[1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover744 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 2, 1], HasCheckedCertificate 15 7 ([[1, 1, 3, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover745 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3, 3], HasCheckedCertificate 15 7 ([[1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover747 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 15 7 ([[1, 1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover746 : ∀ P ∈ pathPatterns 3 2 [1, 1, 4], HasCheckedCertificate 15 7 ([[1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover747 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover748 : ∀ P ∈ pathPatterns 2 1 [1, 1, 4, 1], HasCheckedCertificate 15 7 ([[1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover749 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4, 1, 1], HasCheckedCertificate 15 7 ([[1, 1, 4, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover750 : ∀ P ∈ pathPatterns 2 0 [1, 1, 4, 2], HasCheckedCertificate 15 7 ([[1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover751 : ∀ P ∈ pathPatterns 3 1 [1, 1, 5], HasCheckedCertificate 15 7 ([[1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover752 : ∀ P ∈ pathPatterns 2 0 [1, 1, 5, 1], HasCheckedCertificate 15 7 ([[1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover753 : ∀ P ∈ pathPatterns 3 0 [1, 1, 6], HasCheckedCertificate 15 7 ([[1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq636 : amountSequenceForall 4 6 (fun tail => + (LexLE [] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1, 1] ++ tail).length) (8 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 15 7 ([] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover637 + · intro q + fin_cases q + · exact k15t7_seq670 + + · exact by + constructor + · exact by + intro _ + exact k15t7_cover712 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover719 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover722 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 2, 1, 1, 1] ∧ LexLE [1, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 1])) h) + · exact by + intro _ + exact k15t7_cover723 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover724 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover725 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover726 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover727 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover729 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover730 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover731 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover732 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover733 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover734 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover735 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover739 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover741 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 3, 1, 1, 1] ∧ LexLE [1, 1, 3, 1, 1, 1] [1, 1, 1, 3, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover742 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover743 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover744 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover745 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover746 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover748 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover749 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover750 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover751 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover752 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover753 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover757 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 15 7 ([[1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover758 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 15 7 ([[1, 2], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p348, Certificates.k15t7p348_check⟩ + +private theorem k15t7_cover759 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 15 7 ([[1, 2], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p349, Certificates.k15t7p349_check⟩ + +private theorem k15t7_cover760 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 15 7 ([[1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover761 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 15 7 ([[1, 2], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p350, Certificates.k15t7p350_check⟩ + +private theorem k15t7_cover762 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 15 7 ([[1, 2], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover764 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 7 ([[1, 2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p351, Certificates.k15t7p351_check⟩ + +private theorem k15t7_cover765 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 7 ([[1, 2], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p352, Certificates.k15t7p352_check⟩ + +private theorem k15t7_cover763 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 15 7 ([[1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover764 + · exact by + intro _ + exact k15t7_cover765 + +private theorem k15t7_cover766 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 15 7 ([[1, 2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p353, Certificates.k15t7p353_check⟩ + +private theorem k15t7_cover767 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 15 7 ([[1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover768 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 15 7 ([[1, 2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover769 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 15 7 ([[1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t7_cover770 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 15 7 ([[1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover771 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 15 7 ([[1, 2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq756 : amountSequenceForall 3 5 (fun tail => + (LexLE [1, 2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 7 ([[1, 2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover757 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover758 + · exact by + intro _ + exact k15t7_cover759 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover760 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover761 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover762 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover763 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k15t7_cover766 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover767 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover768 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover769 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover770 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover771 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover755 : ∀ P ∈ pathPatterns 4 5 [1, 2], HasCheckedCertificate 15 7 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact k15t7_seq756 + + +private theorem k15t7_cover773 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 15 7 ([[1, 2, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p354, Certificates.k15t7p354_check⟩ + +private theorem k15t7_cover774 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 15 7 ([[1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover775 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 15 7 ([[1, 2, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p355, Certificates.k15t7p355_check⟩ + +private theorem k15t7_cover776 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 15 7 ([[1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover777 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 15 7 ([[1, 2, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover772 : ∀ P ∈ pathPatterns 3 4 [1, 2, 1], HasCheckedCertificate 15 7 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro _ + exact k15t7_cover773 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover774 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t7_cover775 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover776 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover777 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover778 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 1, 2], HasCheckedCertificate 15 7 ([[1, 2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p356, Certificates.k15t7p356_check⟩ + +private theorem k15t7_cover779 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 1, 2], HasCheckedCertificate 15 7 ([[1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover780 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 2, 1], HasCheckedCertificate 15 7 ([[1, 2, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p357, Certificates.k15t7p357_check⟩ + +private theorem k15t7_cover781 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 1, 3], HasCheckedCertificate 15 7 ([[1, 2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover783 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 7 ([[1, 2, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p358, Certificates.k15t7p358_check⟩ + +private theorem k15t7_cover782 : ∀ P ∈ pathPatterns 2 2 [1, 2, 1, 2], HasCheckedCertificate 15 7 ([[1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover783 + +private theorem k15t7_cover784 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 2, 1], HasCheckedCertificate 15 7 ([[1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover785 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 2, 2], HasCheckedCertificate 15 7 ([[1, 2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover786 : ∀ P ∈ pathPatterns 2 1 [1, 2, 1, 3], HasCheckedCertificate 15 7 ([[1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover787 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 3, 1], HasCheckedCertificate 15 7 ([[1, 2, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover788 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 4], HasCheckedCertificate 15 7 ([[1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover790 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 15 7 ([[1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover791 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 7 ([[1, 2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover789 : ∀ P ∈ pathPatterns 3 3 [1, 2, 2], HasCheckedCertificate 15 7 ([[1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover790 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover791 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover793 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 7 ([[1, 2, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p359, Certificates.k15t7p359_check⟩ + +private theorem k15t7_cover792 : ∀ P ∈ pathPatterns 2 2 [1, 2, 2, 1], HasCheckedCertificate 15 7 ([[1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover793 + +private theorem k15t7_cover794 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 1, 2], HasCheckedCertificate 15 7 ([[1, 2, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover795 : ∀ P ∈ pathPatterns 2 1 [1, 2, 2, 2], HasCheckedCertificate 15 7 ([[1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover796 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 2, 1], HasCheckedCertificate 15 7 ([[1, 2, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover797 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2, 3], HasCheckedCertificate 15 7 ([[1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover799 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 15 7 ([[1, 2, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover798 : ∀ P ∈ pathPatterns 3 2 [1, 2, 3], HasCheckedCertificate 15 7 ([[1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover799 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover800 : ∀ P ∈ pathPatterns 2 1 [1, 2, 3, 1], HasCheckedCertificate 15 7 ([[1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover801 : ∀ P ∈ pathPatterns 2 0 [1, 2, 3, 2], HasCheckedCertificate 15 7 ([[1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover802 : ∀ P ∈ pathPatterns 3 1 [1, 2, 4], HasCheckedCertificate 15 7 ([[1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover803 : ∀ P ∈ pathPatterns 2 0 [1, 2, 4, 1], HasCheckedCertificate 15 7 ([[1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover804 : ∀ P ∈ pathPatterns 3 0 [1, 2, 5], HasCheckedCertificate 15 7 ([[1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq754 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([1, 2] ++ tail) ∧ LexLE ([1, 2] ++ tail) ([1, 2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1, 2] ++ tail).length) (8 - ([1, 2] ++ tail).sum) ([1, 2] ++ tail), + HasCheckedCertificate 15 7 ([] ++ (([1, 2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover755 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover772 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 1])) h) + · exact by + intro _ + exact k15t7_cover778 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover779 + · intro q + fin_cases q + · exact by + intro _ + exact k15t7_cover780 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover781 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover782 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover784 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 2, 1, 1] ∧ LexLE [1, 2, 1, 2, 1, 1] [1, 1, 2, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover785 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover786 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover787 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover788 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover789 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover792 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1, 1] ∧ LexLE [1, 2, 2, 1, 1, 1] [1, 1, 1, 2, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover794 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover795 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover796 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover797 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover798 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover800 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 3, 1, 1] ∧ LexLE [1, 2, 3, 1, 1] [1, 1, 3, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover801 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover802 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover803 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover804 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover806 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 15 7 ([[1, 3], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover808 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 7 ([[1, 3], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p360, Certificates.k15t7p360_check⟩ + +private theorem k15t7_cover807 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 15 7 ([[1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t7_cover808 + +private theorem k15t7_cover809 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 15 7 ([[1, 3], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover810 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 15 7 ([[1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover811 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 15 7 ([[1, 3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover805 : ∀ P ∈ pathPatterns 4 4 [1, 3], HasCheckedCertificate 15 7 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover806 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover807 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover809 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover810 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover811 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover813 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 15 7 ([[1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover814 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 7 ([[1, 3, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover812 : ∀ P ∈ pathPatterns 3 3 [1, 3, 1], HasCheckedCertificate 15 7 ([[1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover813 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover814 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover815 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1, 1, 2], HasCheckedCertificate 15 7 ([[1, 3, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover816 : ∀ P ∈ pathPatterns 2 1 [1, 3, 1, 2], HasCheckedCertificate 15 7 ([[1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover817 : ∀ P ∈ pathPatterns 2 0 [1, 3, 1, 3], HasCheckedCertificate 15 7 ([[1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover819 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 15 7 ([[1, 3, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover818 : ∀ P ∈ pathPatterns 3 2 [1, 3, 2], HasCheckedCertificate 15 7 ([[1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover819 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover820 : ∀ P ∈ pathPatterns 2 0 [1, 3, 2, 2], HasCheckedCertificate 15 7 ([[1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover821 : ∀ P ∈ pathPatterns 3 1 [1, 3, 3], HasCheckedCertificate 15 7 ([[1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover822 : ∀ P ∈ pathPatterns 2 0 [1, 3, 3, 1], HasCheckedCertificate 15 7 ([[1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover823 : ∀ P ∈ pathPatterns 3 0 [1, 3, 4], HasCheckedCertificate 15 7 ([[1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover825 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 15 7 ([[1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover826 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 15 7 ([[1, 4], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover824 : ∀ P ∈ pathPatterns 4 3 [1, 4], HasCheckedCertificate 15 7 ([[1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover825 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover826 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover828 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 15 7 ([[1, 4, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover827 : ∀ P ∈ pathPatterns 3 2 [1, 4, 1], HasCheckedCertificate 15 7 ([[1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover828 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover829 : ∀ P ∈ pathPatterns 2 0 [1, 4, 1, 2], HasCheckedCertificate 15 7 ([[1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover830 : ∀ P ∈ pathPatterns 3 1 [1, 4, 2], HasCheckedCertificate 15 7 ([[1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover831 : ∀ P ∈ pathPatterns 3 0 [1, 4, 3], HasCheckedCertificate 15 7 ([[1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover833 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 15 7 ([[1, 5], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover832 : ∀ P ∈ pathPatterns 4 2 [1, 5], HasCheckedCertificate 15 7 ([[1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover833 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover834 : ∀ P ∈ pathPatterns 3 1 [1, 5, 1], HasCheckedCertificate 15 7 ([[1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover835 : ∀ P ∈ pathPatterns 3 0 [1, 5, 2], HasCheckedCertificate 15 7 ([[1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover836 : ∀ P ∈ pathPatterns 4 1 [1, 6], HasCheckedCertificate 15 7 ([[1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover837 : ∀ P ∈ pathPatterns 3 0 [1, 6, 1], HasCheckedCertificate 15 7 ([[1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover838 : ∀ P ∈ pathPatterns 4 0 [1, 7], HasCheckedCertificate 15 7 ([[1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq537 : amountSequenceForall 5 7 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1] ++ tail).length) (8 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 15 7 ([] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover538 + · intro q + fin_cases q + · exact k15t7_seq636 + + · exact k15t7_seq754 + + · exact by + constructor + · exact by + intro _ + exact k15t7_cover805 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover812 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1, 1] [1, 1, 1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover815 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover816 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 2, 1] ∧ LexLE [1, 3, 1, 2, 1] [1, 2, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover817 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover818 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1, 1] ∧ LexLE [1, 3, 2, 1, 1] [1, 1, 2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover820 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover821 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover822 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover823 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover824 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover827 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1, 1] ∧ LexLE [1, 4, 1, 1, 1] [1, 1, 1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover829 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover830 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 2, 1] ∧ LexLE [1, 4, 2, 1] [1, 2, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover831 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover832 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover834 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 1, 1] ∧ LexLE [1, 5, 1, 1] [1, 1, 5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover835 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover836 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover837 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover838 + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq842 : amountSequenceForall 3 5 (fun tail => + (LexLE [2] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 15 7 ([[2]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 3] ∧ LexLE [1, 1, 1, 3] [3, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 2] ∧ LexLE [1, 1, 2, 2] [2, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3, 1] ∧ LexLE [1, 1, 3, 1] [1, 3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 4] ∧ LexLE [1, 1, 4] [4, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 2] ∧ LexLE [1, 2, 1, 2] [2, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2, 1] ∧ LexLE [1, 2, 2, 1] [1, 2, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 3] ∧ LexLE [1, 2, 3] [3, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 2] ∧ LexLE [1, 3, 2] [2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4, 1] ∧ LexLE [1, 4, 1] [1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover844 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 15 7 ([[2], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover845 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 15 7 ([[2], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p361, Certificates.k15t7p361_check⟩ + +private theorem k15t7_cover846 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 15 7 ([[2], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover847 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 15 7 ([[2], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover843 : ∀ P ∈ pathPatterns 3 4 [2], HasCheckedCertificate 15 7 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover844 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t7_cover845 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover846 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover847 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover848 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 2], HasCheckedCertificate 15 7 ([[2], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p362, Certificates.k15t7p362_check⟩ + +private theorem k15t7_cover849 : ∀ P ∈ pathPatterns 1 1 [2, 1, 2], HasCheckedCertificate 15 7 ([[2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover850 : ∀ P ∈ pathPatterns 1 0 [2, 1, 3], HasCheckedCertificate 15 7 ([[2], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover851 : ∀ P ∈ pathPatterns 2 2 [2, 2], HasCheckedCertificate 15 7 ([[2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t7_cover852 : ∀ P ∈ pathPatterns 1 0 [2, 2, 2], HasCheckedCertificate 15 7 ([[2], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover853 : ∀ P ∈ pathPatterns 2 1 [2, 3], HasCheckedCertificate 15 7 ([[2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover854 : ∀ P ∈ pathPatterns 2 0 [2, 4], HasCheckedCertificate 15 7 ([[2], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover856 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 7 ([[2], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover855 : ∀ P ∈ pathPatterns 3 3 [3], HasCheckedCertificate 15 7 ([[2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover856 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover857 : ∀ P ∈ pathPatterns 2 0 [3, 3], HasCheckedCertificate 15 7 ([[2], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover858 : ∀ P ∈ pathPatterns 3 2 [4], HasCheckedCertificate 15 7 ([[2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover859 : ∀ P ∈ pathPatterns 3 1 [5], HasCheckedCertificate 15 7 ([[2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover860 : ∀ P ∈ pathPatterns 3 0 [6], HasCheckedCertificate 15 7 ([[2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq841 : amountSequenceForall 4 6 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 7 ([[2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k15t7_seq842 + + · exact by + constructor + · exact by + intro _ + exact k15t7_cover843 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k15t7_cover848 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover849 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover850 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover851 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover852 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover853 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover854 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover855 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover857 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover858 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover859 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover860 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover840 : ∀ P ∈ pathPatterns 5 6 [2], HasCheckedCertificate 15 7 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact k15t7_seq841 + + +private theorem k15t7_cover862 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 1, 1, 2], HasCheckedCertificate 15 7 ([[2, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t7p363, Certificates.k15t7p363_check⟩ + +private theorem k15t7_cover863 : ∀ P ∈ pathPatterns 1 1 [2, 1, 1, 1, 2], HasCheckedCertificate 15 7 ([[2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover864 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 1, 3], HasCheckedCertificate 15 7 ([[2, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover865 : ∀ P ∈ pathPatterns 2 2 [2, 1, 1, 2], HasCheckedCertificate 15 7 ([[2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t7_cover866 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 2, 2], HasCheckedCertificate 15 7 ([[2, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover867 : ∀ P ∈ pathPatterns 2 1 [2, 1, 1, 3], HasCheckedCertificate 15 7 ([[2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover868 : ∀ P ∈ pathPatterns 2 0 [2, 1, 1, 4], HasCheckedCertificate 15 7 ([[2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover870 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 7 ([[2, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover869 : ∀ P ∈ pathPatterns 3 3 [2, 1, 2], HasCheckedCertificate 15 7 ([[2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover870 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover871 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2, 1, 2], HasCheckedCertificate 15 7 ([[2, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover872 : ∀ P ∈ pathPatterns 2 1 [2, 1, 2, 2], HasCheckedCertificate 15 7 ([[2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover873 : ∀ P ∈ pathPatterns 2 0 [2, 1, 2, 3], HasCheckedCertificate 15 7 ([[2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover874 : ∀ P ∈ pathPatterns 3 2 [2, 1, 3], HasCheckedCertificate 15 7 ([[2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover875 : ∀ P ∈ pathPatterns 2 0 [2, 1, 3, 2], HasCheckedCertificate 15 7 ([[2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover876 : ∀ P ∈ pathPatterns 3 1 [2, 1, 4], HasCheckedCertificate 15 7 ([[2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover877 : ∀ P ∈ pathPatterns 3 0 [2, 1, 5], HasCheckedCertificate 15 7 ([[2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq861 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([2, 1] ++ tail) ∧ LexLE ([2, 1] ++ tail) ([2, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([2, 1] ++ tail).length) (8 - ([2, 1] ++ tail).sum) ([2, 1] ++ tail), + HasCheckedCertificate 15 7 ([] ++ (([2, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 2])) h) + · exact by + intro _ + exact k15t7_cover862 + · exact by + constructor + · exact by + intro _ + exact k15t7_cover863 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 1, 2, 1] [1, 2, 1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover864 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover865 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1, 1] ∧ LexLE [2, 1, 1, 2, 1, 1] [1, 1, 2, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover866 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover867 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 3, 1] ∧ LexLE [2, 1, 1, 3, 1] [1, 3, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover868 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover869 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1, 1] ∧ LexLE [2, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover871 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover872 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 2, 1] ∧ LexLE [2, 1, 2, 2, 1] [1, 2, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover873 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover874 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1, 1] ∧ LexLE [2, 1, 3, 1, 1] [1, 1, 3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover875 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover876 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 4, 1] ∧ LexLE [2, 1, 4, 1] [1, 4, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover877 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover879 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 15 7 ([[2, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t7_cover880 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 15 7 ([[2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t7_cover881 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 15 7 ([[2, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover878 : ∀ P ∈ pathPatterns 4 4 [2, 2], HasCheckedCertificate 15 7 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t7_cover879 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover880 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover881 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover882 : ∀ P ∈ pathPatterns 2 0 [2, 2, 1, 3], HasCheckedCertificate 15 7 ([[2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover883 : ∀ P ∈ pathPatterns 3 2 [2, 2, 2], HasCheckedCertificate 15 7 ([[2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover884 : ∀ P ∈ pathPatterns 2 0 [2, 2, 2, 2], HasCheckedCertificate 15 7 ([[2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover885 : ∀ P ∈ pathPatterns 3 1 [2, 2, 3], HasCheckedCertificate 15 7 ([[2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover886 : ∀ P ∈ pathPatterns 3 0 [2, 2, 4], HasCheckedCertificate 15 7 ([[2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover888 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 15 7 ([[2, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover887 : ∀ P ∈ pathPatterns 4 3 [2, 3], HasCheckedCertificate 15 7 ([[2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover888 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover889 : ∀ P ∈ pathPatterns 3 1 [2, 3, 2], HasCheckedCertificate 15 7 ([[2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover890 : ∀ P ∈ pathPatterns 3 0 [2, 3, 3], HasCheckedCertificate 15 7 ([[2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover891 : ∀ P ∈ pathPatterns 4 2 [2, 4], HasCheckedCertificate 15 7 ([[2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover892 : ∀ P ∈ pathPatterns 3 0 [2, 4, 2], HasCheckedCertificate 15 7 ([[2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover893 : ∀ P ∈ pathPatterns 4 1 [2, 5], HasCheckedCertificate 15 7 ([[2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover894 : ∀ P ∈ pathPatterns 4 0 [2, 6], HasCheckedCertificate 15 7 ([[2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq839 : amountSequenceForall 5 6 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([2] ++ tail).length) (8 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 15 7 ([] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover840 + · intro q + fin_cases q + · exact k15t7_seq861 + + · exact by + constructor + · exact by + intro _ + exact k15t7_cover878 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 2] ∧ LexLE [2, 2, 1, 1, 2] [2, 1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2, 1] ∧ LexLE [2, 2, 1, 2, 1] [1, 2, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover882 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover883 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1, 1] ∧ LexLE [2, 2, 2, 1, 1] [1, 1, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover884 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover885 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 3, 1] ∧ LexLE [2, 2, 3, 1] [1, 3, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover886 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover887 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1, 1] ∧ LexLE [2, 3, 1, 1, 1] [1, 1, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 2] ∧ LexLE [2, 3, 1, 2] [2, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover889 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 1] ∧ LexLE [2, 3, 2, 1] [1, 2, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover890 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover891 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 1] ∧ LexLE [2, 4, 1, 1] [1, 1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover892 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover893 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover894 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover898 : ∀ P ∈ pathPatterns 3 2 [3], HasCheckedCertificate 15 7 ([[3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover899 : ∀ P ∈ pathPatterns 3 1 [4], HasCheckedCertificate 15 7 ([[3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover900 : ∀ P ∈ pathPatterns 3 0 [5], HasCheckedCertificate 15 7 ([[3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq897 : amountSequenceForall 4 5 (fun tail => + (LexLE [3] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 7 ([[3]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 2] ∧ LexLE [2, 1, 2] [2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover898 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover899 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover900 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover896 : ∀ P ∈ pathPatterns 5 5 [3], HasCheckedCertificate 15 7 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact k15t7_seq897 + + +private theorem k15t7_cover901 : ∀ P ∈ pathPatterns 2 0 [3, 1, 1, 3], HasCheckedCertificate 15 7 ([[3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover902 : ∀ P ∈ pathPatterns 3 1 [3, 1, 3], HasCheckedCertificate 15 7 ([[3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover903 : ∀ P ∈ pathPatterns 3 0 [3, 1, 4], HasCheckedCertificate 15 7 ([[3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover904 : ∀ P ∈ pathPatterns 3 0 [3, 2, 3], HasCheckedCertificate 15 7 ([[3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover905 : ∀ P ∈ pathPatterns 4 2 [3, 3], HasCheckedCertificate 15 7 ([[3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover906 : ∀ P ∈ pathPatterns 4 1 [3, 4], HasCheckedCertificate 15 7 ([[3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover907 : ∀ P ∈ pathPatterns 4 0 [3, 5], HasCheckedCertificate 15 7 ([[3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq895 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([3] ++ tail) ∧ LexLE ([3] ++ tail) ([3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([3] ++ tail).length) (8 - ([3] ++ tail).sum) ([3] ++ tail), + HasCheckedCertificate 15 7 ([] ++ (([3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover896 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 2] ∧ LexLE [3, 1, 1, 1, 2] [2, 1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2, 1] ∧ LexLE [3, 1, 1, 2, 1] [1, 2, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover901 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1, 1] ∧ LexLE [3, 1, 2, 1, 1] [1, 1, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 2] ∧ LexLE [3, 1, 2, 2] [2, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover902 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 1] ∧ LexLE [3, 1, 3, 1] [1, 3, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover903 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1, 1] ∧ LexLE [3, 2, 1, 1, 1] [1, 1, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 2] ∧ LexLE [3, 2, 1, 2] [2, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 1] ∧ LexLE [3, 2, 2, 1] [1, 2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover904 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover905 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 1] ∧ LexLE [3, 3, 1, 1] [1, 1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover906 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover907 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover909 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 15 7 ([[4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover908 : ∀ P ∈ pathPatterns 5 4 [4], HasCheckedCertificate 15 7 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover909 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover910 : ∀ P ∈ pathPatterns 4 0 [4, 4], HasCheckedCertificate 15 7 ([[4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover911 : ∀ P ∈ pathPatterns 5 3 [5], HasCheckedCertificate 15 7 ([[5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover912 : ∀ P ∈ pathPatterns 5 2 [6], HasCheckedCertificate 15 7 ([[6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover913 : ∀ P ∈ pathPatterns 5 1 [7], HasCheckedCertificate 15 7 ([[7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover914 : ∀ P ∈ pathPatterns 5 0 [8], HasCheckedCertificate 15 7 ([[8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t7_seq2 : amountSequenceForall 6 8 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([] ++ tail).length) (8 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 7 ([] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t7_cover3 + · intro q + fin_cases q + · exact k15t7_seq537 + + · exact k15t7_seq839 + + · exact k15t7_seq895 + + · exact by + constructor + · exact by + intro _ + exact k15t7_cover908 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1, 1] ∧ LexLE [4, 1, 1, 1, 1] [1, 1, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 2] ∧ LexLE [4, 1, 1, 2] [2, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 1] ∧ LexLE [4, 1, 2, 1] [1, 2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 1] ∧ LexLE [4, 2, 1, 1] [1, 1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover910 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover911 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 1] ∧ LexLE [5, 1, 1, 1] [1, 1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover912 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover913 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t7_cover914 + · intro q + exact Fin.elim0 q + +private theorem k15t7_cover1 : ∀ P ∈ pathPatterns 7 8 [], HasCheckedCertificate 15 7 ([] ++ P) := by + apply pathPatterns_forall_step + exact k15t7_seq2 + + +theorem coverage_k15_t7 : + ∀ P ∈ pathPatterns 7 8, HasCheckedCertificate 15 7 P := + k15t7_cover1 + +private theorem k15t8_cover15 : ∀ P ∈ pathPatterns 0 7 [], HasCheckedCertificate 15 8 ([[], [], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p0, Certificates.k15t8p0_check⟩ + +private theorem k15t8_cover14 : ∀ P ∈ pathPatterns 1 7 [], HasCheckedCertificate 15 8 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k15t8_cover15 + +private theorem k15t8_cover16 : ∀ P ∈ pathPatterns 0 6 [1], HasCheckedCertificate 15 8 ([[], [], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p1, Certificates.k15t8p1_check⟩ + +private theorem k15t8_cover17 : ∀ P ∈ pathPatterns 0 5 [2], HasCheckedCertificate 15 8 ([[], [], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p2, Certificates.k15t8p2_check⟩ + +private theorem k15t8_cover18 : ∀ P ∈ pathPatterns 0 4 [3], HasCheckedCertificate 15 8 ([[], [], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p3, Certificates.k15t8p3_check⟩ + +private theorem k15t8_cover19 : ∀ P ∈ pathPatterns 0 3 [4], HasCheckedCertificate 15 8 ([[], [], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p4, Certificates.k15t8p4_check⟩ + +private theorem k15t8_cover20 : ∀ P ∈ pathPatterns 0 2 [5], HasCheckedCertificate 15 8 ([[], [], [], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p5, Certificates.k15t8p5_check⟩ + +private theorem k15t8_cover21 : ∀ P ∈ pathPatterns 0 1 [6], HasCheckedCertificate 15 8 ([[], [], [], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p6, Certificates.k15t8p6_check⟩ + +private theorem k15t8_cover22 : ∀ P ∈ pathPatterns 0 0 [7], HasCheckedCertificate 15 8 ([[], [], [], [], [], [], [7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p7, Certificates.k15t8p7_check⟩ + +private theorem k15t8_cover13 : ∀ P ∈ pathPatterns 2 7 [], HasCheckedCertificate 15 8 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k15t8_cover14 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover16 + · exact by + intro _ + exact k15t8_cover17 + · exact by + intro _ + exact k15t8_cover18 + · exact by + intro _ + exact k15t8_cover19 + · exact by + intro _ + exact k15t8_cover20 + · exact by + intro _ + exact k15t8_cover21 + · exact by + intro _ + exact k15t8_cover22 + +private theorem k15t8_cover23 : ∀ P ∈ pathPatterns 1 6 [1], HasCheckedCertificate 15 8 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover24 : ∀ P ∈ pathPatterns 0 5 [1, 1], HasCheckedCertificate 15 8 ([[], [], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p8, Certificates.k15t8p8_check⟩ + +private theorem k15t8_cover25 : ∀ P ∈ pathPatterns 0 4 [1, 2], HasCheckedCertificate 15 8 ([[], [], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p9, Certificates.k15t8p9_check⟩ + +private theorem k15t8_cover26 : ∀ P ∈ pathPatterns 0 3 [1, 3], HasCheckedCertificate 15 8 ([[], [], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p10, Certificates.k15t8p10_check⟩ + +private theorem k15t8_cover27 : ∀ P ∈ pathPatterns 0 2 [1, 4], HasCheckedCertificate 15 8 ([[], [], [], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p11, Certificates.k15t8p11_check⟩ + +private theorem k15t8_cover28 : ∀ P ∈ pathPatterns 0 1 [1, 5], HasCheckedCertificate 15 8 ([[], [], [], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p12, Certificates.k15t8p12_check⟩ + +private theorem k15t8_cover29 : ∀ P ∈ pathPatterns 0 0 [1, 6], HasCheckedCertificate 15 8 ([[], [], [], [], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p13, Certificates.k15t8p13_check⟩ + +private theorem k15t8_cover30 : ∀ P ∈ pathPatterns 1 5 [2], HasCheckedCertificate 15 8 ([[], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover31 : ∀ P ∈ pathPatterns 0 3 [2, 2], HasCheckedCertificate 15 8 ([[], [], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p14, Certificates.k15t8p14_check⟩ + +private theorem k15t8_cover32 : ∀ P ∈ pathPatterns 0 2 [2, 3], HasCheckedCertificate 15 8 ([[], [], [], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p15, Certificates.k15t8p15_check⟩ + +private theorem k15t8_cover33 : ∀ P ∈ pathPatterns 0 1 [2, 4], HasCheckedCertificate 15 8 ([[], [], [], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p16, Certificates.k15t8p16_check⟩ + +private theorem k15t8_cover34 : ∀ P ∈ pathPatterns 0 0 [2, 5], HasCheckedCertificate 15 8 ([[], [], [], [], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p17, Certificates.k15t8p17_check⟩ + +private theorem k15t8_cover35 : ∀ P ∈ pathPatterns 1 4 [3], HasCheckedCertificate 15 8 ([[], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover36 : ∀ P ∈ pathPatterns 0 1 [3, 3], HasCheckedCertificate 15 8 ([[], [], [], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p18, Certificates.k15t8p18_check⟩ + +private theorem k15t8_cover37 : ∀ P ∈ pathPatterns 0 0 [3, 4], HasCheckedCertificate 15 8 ([[], [], [], [], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p19, Certificates.k15t8p19_check⟩ + +private theorem k15t8_cover38 : ∀ P ∈ pathPatterns 1 3 [4], HasCheckedCertificate 15 8 ([[], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover39 : ∀ P ∈ pathPatterns 1 2 [5], HasCheckedCertificate 15 8 ([[], [], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover40 : ∀ P ∈ pathPatterns 1 1 [6], HasCheckedCertificate 15 8 ([[], [], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover41 : ∀ P ∈ pathPatterns 1 0 [7], HasCheckedCertificate 15 8 ([[], [], [], [], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + +private theorem k15t8_seq12 : amountSequenceForall 2 7 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (2 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 8 ([[], [], [], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover13 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover23 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover24 + · exact by + intro _ + exact k15t8_cover25 + · exact by + intro _ + exact k15t8_cover26 + · exact by + intro _ + exact k15t8_cover27 + · exact by + intro _ + exact k15t8_cover28 + · exact by + intro _ + exact k15t8_cover29 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover30 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t8_cover31 + · exact by + intro _ + exact k15t8_cover32 + · exact by + intro _ + exact k15t8_cover33 + · exact by + intro _ + exact k15t8_cover34 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover35 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k15t8_cover36 + · exact by + intro _ + exact k15t8_cover37 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover38 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover39 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover40 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover41 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover11 : ∀ P ∈ pathPatterns 3 7 [], HasCheckedCertificate 15 8 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k15t8_seq12 + + +private theorem k15t8_cover43 : ∀ P ∈ pathPatterns 0 5 [1], HasCheckedCertificate 15 8 ([[], [], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p20, Certificates.k15t8p20_check⟩ + +private theorem k15t8_cover44 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 15 8 ([[], [], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p21, Certificates.k15t8p21_check⟩ + +private theorem k15t8_cover45 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 15 8 ([[], [], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p22, Certificates.k15t8p22_check⟩ + +private theorem k15t8_cover46 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 15 8 ([[], [], [], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p23, Certificates.k15t8p23_check⟩ + +private theorem k15t8_cover47 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 15 8 ([[], [], [], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p24, Certificates.k15t8p24_check⟩ + +private theorem k15t8_cover48 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 15 8 ([[], [], [], [], [1], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p25, Certificates.k15t8p25_check⟩ + +private theorem k15t8_cover42 : ∀ P ∈ pathPatterns 2 6 [1], HasCheckedCertificate 15 8 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover43 + · exact by + intro _ + exact k15t8_cover44 + · exact by + intro _ + exact k15t8_cover45 + · exact by + intro _ + exact k15t8_cover46 + · exact by + intro _ + exact k15t8_cover47 + · exact by + intro _ + exact k15t8_cover48 + +private theorem k15t8_cover49 : ∀ P ∈ pathPatterns 1 5 [1, 1], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover50 : ∀ P ∈ pathPatterns 0 4 [1, 1, 1], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p26, Certificates.k15t8p26_check⟩ + +private theorem k15t8_cover51 : ∀ P ∈ pathPatterns 0 3 [1, 1, 2], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p27, Certificates.k15t8p27_check⟩ + +private theorem k15t8_cover52 : ∀ P ∈ pathPatterns 0 2 [1, 1, 3], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p28, Certificates.k15t8p28_check⟩ + +private theorem k15t8_cover53 : ∀ P ∈ pathPatterns 0 1 [1, 1, 4], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p29, Certificates.k15t8p29_check⟩ + +private theorem k15t8_cover54 : ∀ P ∈ pathPatterns 0 0 [1, 1, 5], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p30, Certificates.k15t8p30_check⟩ + +private theorem k15t8_cover55 : ∀ P ∈ pathPatterns 1 4 [1, 2], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover56 : ∀ P ∈ pathPatterns 0 3 [1, 2, 1], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p31, Certificates.k15t8p31_check⟩ + +private theorem k15t8_cover57 : ∀ P ∈ pathPatterns 0 2 [1, 2, 2], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p32, Certificates.k15t8p32_check⟩ + +private theorem k15t8_cover58 : ∀ P ∈ pathPatterns 0 1 [1, 2, 3], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p33, Certificates.k15t8p33_check⟩ + +private theorem k15t8_cover59 : ∀ P ∈ pathPatterns 0 0 [1, 2, 4], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p34, Certificates.k15t8p34_check⟩ + +private theorem k15t8_cover60 : ∀ P ∈ pathPatterns 1 3 [1, 3], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover61 : ∀ P ∈ pathPatterns 0 2 [1, 3, 1], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p35, Certificates.k15t8p35_check⟩ + +private theorem k15t8_cover62 : ∀ P ∈ pathPatterns 0 1 [1, 3, 2], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p36, Certificates.k15t8p36_check⟩ + +private theorem k15t8_cover63 : ∀ P ∈ pathPatterns 0 0 [1, 3, 3], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p37, Certificates.k15t8p37_check⟩ + +private theorem k15t8_cover64 : ∀ P ∈ pathPatterns 1 2 [1, 4], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover65 : ∀ P ∈ pathPatterns 0 1 [1, 4, 1], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p38, Certificates.k15t8p38_check⟩ + +private theorem k15t8_cover66 : ∀ P ∈ pathPatterns 0 0 [1, 4, 2], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p39, Certificates.k15t8p39_check⟩ + +private theorem k15t8_cover67 : ∀ P ∈ pathPatterns 1 1 [1, 5], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover68 : ∀ P ∈ pathPatterns 0 0 [1, 5, 1], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p40, Certificates.k15t8p40_check⟩ + +private theorem k15t8_cover69 : ∀ P ∈ pathPatterns 1 0 [1, 6], HasCheckedCertificate 15 8 ([[], [], [], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover71 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 15 8 ([[], [], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p41, Certificates.k15t8p41_check⟩ + +private theorem k15t8_cover72 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 15 8 ([[], [], [], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p42, Certificates.k15t8p42_check⟩ + +private theorem k15t8_cover73 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 15 8 ([[], [], [], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p43, Certificates.k15t8p43_check⟩ + +private theorem k15t8_cover74 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 15 8 ([[], [], [], [], [2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p44, Certificates.k15t8p44_check⟩ + +private theorem k15t8_cover70 : ∀ P ∈ pathPatterns 2 5 [2], HasCheckedCertificate 15 8 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover71 + · exact by + intro _ + exact k15t8_cover72 + · exact by + intro _ + exact k15t8_cover73 + · exact by + intro _ + exact k15t8_cover74 + +private theorem k15t8_cover75 : ∀ P ∈ pathPatterns 0 2 [2, 1, 2], HasCheckedCertificate 15 8 ([[], [], [], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p45, Certificates.k15t8p45_check⟩ + +private theorem k15t8_cover76 : ∀ P ∈ pathPatterns 0 1 [2, 1, 3], HasCheckedCertificate 15 8 ([[], [], [], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p46, Certificates.k15t8p46_check⟩ + +private theorem k15t8_cover77 : ∀ P ∈ pathPatterns 0 0 [2, 1, 4], HasCheckedCertificate 15 8 ([[], [], [], [], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p47, Certificates.k15t8p47_check⟩ + +private theorem k15t8_cover78 : ∀ P ∈ pathPatterns 1 3 [2, 2], HasCheckedCertificate 15 8 ([[], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover79 : ∀ P ∈ pathPatterns 0 1 [2, 2, 2], HasCheckedCertificate 15 8 ([[], [], [], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p48, Certificates.k15t8p48_check⟩ + +private theorem k15t8_cover80 : ∀ P ∈ pathPatterns 0 0 [2, 2, 3], HasCheckedCertificate 15 8 ([[], [], [], [], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p49, Certificates.k15t8p49_check⟩ + +private theorem k15t8_cover81 : ∀ P ∈ pathPatterns 1 2 [2, 3], HasCheckedCertificate 15 8 ([[], [], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover82 : ∀ P ∈ pathPatterns 0 0 [2, 3, 2], HasCheckedCertificate 15 8 ([[], [], [], [], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p50, Certificates.k15t8p50_check⟩ + +private theorem k15t8_cover83 : ∀ P ∈ pathPatterns 1 1 [2, 4], HasCheckedCertificate 15 8 ([[], [], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover84 : ∀ P ∈ pathPatterns 1 0 [2, 5], HasCheckedCertificate 15 8 ([[], [], [], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover86 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 15 8 ([[], [], [], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p51, Certificates.k15t8p51_check⟩ + +private theorem k15t8_cover87 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 8 ([[], [], [], [], [3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p52, Certificates.k15t8p52_check⟩ + +private theorem k15t8_cover85 : ∀ P ∈ pathPatterns 2 4 [3], HasCheckedCertificate 15 8 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k15t8_cover86 + · exact by + intro _ + exact k15t8_cover87 + +private theorem k15t8_cover88 : ∀ P ∈ pathPatterns 0 0 [3, 1, 3], HasCheckedCertificate 15 8 ([[], [], [], [], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p53, Certificates.k15t8p53_check⟩ + +private theorem k15t8_cover89 : ∀ P ∈ pathPatterns 1 1 [3, 3], HasCheckedCertificate 15 8 ([[], [], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover90 : ∀ P ∈ pathPatterns 1 0 [3, 4], HasCheckedCertificate 15 8 ([[], [], [], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover91 : ∀ P ∈ pathPatterns 2 3 [4], HasCheckedCertificate 15 8 ([[], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + +private theorem k15t8_cover92 : ∀ P ∈ pathPatterns 2 2 [5], HasCheckedCertificate 15 8 ([[], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t8_cover93 : ∀ P ∈ pathPatterns 2 1 [6], HasCheckedCertificate 15 8 ([[], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover94 : ∀ P ∈ pathPatterns 2 0 [7], HasCheckedCertificate 15 8 ([[], [], [], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq10 : amountSequenceForall 3 7 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 8 ([[], [], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover11 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover42 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover49 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover50 + · exact by + intro _ + exact k15t8_cover51 + · exact by + intro _ + exact k15t8_cover52 + · exact by + intro _ + exact k15t8_cover53 + · exact by + intro _ + exact k15t8_cover54 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover55 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover56 + · exact by + intro _ + exact k15t8_cover57 + · exact by + intro _ + exact k15t8_cover58 + · exact by + intro _ + exact k15t8_cover59 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover60 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover61 + · exact by + intro _ + exact k15t8_cover62 + · exact by + intro _ + exact k15t8_cover63 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover64 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover65 + · exact by + intro _ + exact k15t8_cover66 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover67 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover68 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover69 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover70 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k15t8_cover75 + · exact by + intro _ + exact k15t8_cover76 + · exact by + intro _ + exact k15t8_cover77 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover78 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k15t8_cover79 + · exact by + intro _ + exact k15t8_cover80 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover81 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + intro _ + exact k15t8_cover82 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover83 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover84 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover85 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + intro _ + exact k15t8_cover88 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover89 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover90 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover91 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover92 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover93 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover94 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover9 : ∀ P ∈ pathPatterns 4 7 [], HasCheckedCertificate 15 8 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k15t8_seq10 + + +private theorem k15t8_cover97 : ∀ P ∈ pathPatterns 1 5 [1], HasCheckedCertificate 15 8 ([[], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover98 : ∀ P ∈ pathPatterns 0 4 [1, 1], HasCheckedCertificate 15 8 ([[], [], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p54, Certificates.k15t8p54_check⟩ + +private theorem k15t8_cover99 : ∀ P ∈ pathPatterns 0 3 [1, 2], HasCheckedCertificate 15 8 ([[], [], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p55, Certificates.k15t8p55_check⟩ + +private theorem k15t8_cover100 : ∀ P ∈ pathPatterns 0 2 [1, 3], HasCheckedCertificate 15 8 ([[], [], [], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p56, Certificates.k15t8p56_check⟩ + +private theorem k15t8_cover101 : ∀ P ∈ pathPatterns 0 1 [1, 4], HasCheckedCertificate 15 8 ([[], [], [], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p57, Certificates.k15t8p57_check⟩ + +private theorem k15t8_cover102 : ∀ P ∈ pathPatterns 0 0 [1, 5], HasCheckedCertificate 15 8 ([[], [], [], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p58, Certificates.k15t8p58_check⟩ + +private theorem k15t8_cover103 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 15 8 ([[], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover104 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 15 8 ([[], [], [], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p59, Certificates.k15t8p59_check⟩ + +private theorem k15t8_cover105 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 15 8 ([[], [], [], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p60, Certificates.k15t8p60_check⟩ + +private theorem k15t8_cover106 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 15 8 ([[], [], [], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p61, Certificates.k15t8p61_check⟩ + +private theorem k15t8_cover107 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 15 8 ([[], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover108 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 15 8 ([[], [], [], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p62, Certificates.k15t8p62_check⟩ + +private theorem k15t8_cover109 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 15 8 ([[], [], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover110 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 15 8 ([[], [], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover111 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 15 8 ([[], [], [], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover96 : ∀ P ∈ pathPatterns 3 6 [1], HasCheckedCertificate 15 8 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover97 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover98 + · exact by + intro _ + exact k15t8_cover99 + · exact by + intro _ + exact k15t8_cover100 + · exact by + intro _ + exact k15t8_cover101 + · exact by + intro _ + exact k15t8_cover102 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover103 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t8_cover104 + · exact by + intro _ + exact k15t8_cover105 + · exact by + intro _ + exact k15t8_cover106 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover107 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k15t8_cover108 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover109 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover110 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover111 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover113 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 15 8 ([[], [], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p63, Certificates.k15t8p63_check⟩ + +private theorem k15t8_cover114 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 15 8 ([[], [], [], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p64, Certificates.k15t8p64_check⟩ + +private theorem k15t8_cover115 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 15 8 ([[], [], [], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p65, Certificates.k15t8p65_check⟩ + +private theorem k15t8_cover116 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 15 8 ([[], [], [], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p66, Certificates.k15t8p66_check⟩ + +private theorem k15t8_cover112 : ∀ P ∈ pathPatterns 2 5 [1, 1], HasCheckedCertificate 15 8 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover113 + · exact by + intro _ + exact k15t8_cover114 + · exact by + intro _ + exact k15t8_cover115 + · exact by + intro _ + exact k15t8_cover116 + +private theorem k15t8_cover117 : ∀ P ∈ pathPatterns 1 4 [1, 1, 1], HasCheckedCertificate 15 8 ([[], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover118 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 1], HasCheckedCertificate 15 8 ([[], [], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p67, Certificates.k15t8p67_check⟩ + +private theorem k15t8_cover119 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 2], HasCheckedCertificate 15 8 ([[], [], [], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p68, Certificates.k15t8p68_check⟩ + +private theorem k15t8_cover120 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 3], HasCheckedCertificate 15 8 ([[], [], [], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p69, Certificates.k15t8p69_check⟩ + +private theorem k15t8_cover121 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 4], HasCheckedCertificate 15 8 ([[], [], [], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p70, Certificates.k15t8p70_check⟩ + +private theorem k15t8_cover122 : ∀ P ∈ pathPatterns 1 3 [1, 1, 2], HasCheckedCertificate 15 8 ([[], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover123 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2, 1], HasCheckedCertificate 15 8 ([[], [], [], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p71, Certificates.k15t8p71_check⟩ + +private theorem k15t8_cover124 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 2], HasCheckedCertificate 15 8 ([[], [], [], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p72, Certificates.k15t8p72_check⟩ + +private theorem k15t8_cover125 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 3], HasCheckedCertificate 15 8 ([[], [], [], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p73, Certificates.k15t8p73_check⟩ + +private theorem k15t8_cover126 : ∀ P ∈ pathPatterns 1 2 [1, 1, 3], HasCheckedCertificate 15 8 ([[], [], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover127 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3, 1], HasCheckedCertificate 15 8 ([[], [], [], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p74, Certificates.k15t8p74_check⟩ + +private theorem k15t8_cover128 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 2], HasCheckedCertificate 15 8 ([[], [], [], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p75, Certificates.k15t8p75_check⟩ + +private theorem k15t8_cover129 : ∀ P ∈ pathPatterns 1 1 [1, 1, 4], HasCheckedCertificate 15 8 ([[], [], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover130 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4, 1], HasCheckedCertificate 15 8 ([[], [], [], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p76, Certificates.k15t8p76_check⟩ + +private theorem k15t8_cover131 : ∀ P ∈ pathPatterns 1 0 [1, 1, 5], HasCheckedCertificate 15 8 ([[], [], [], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover133 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 15 8 ([[], [], [], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p77, Certificates.k15t8p77_check⟩ + +private theorem k15t8_cover134 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 15 8 ([[], [], [], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p78, Certificates.k15t8p78_check⟩ + +private theorem k15t8_cover135 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 8 ([[], [], [], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p79, Certificates.k15t8p79_check⟩ + +private theorem k15t8_cover132 : ∀ P ∈ pathPatterns 2 4 [1, 2], HasCheckedCertificate 15 8 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover133 + · exact by + intro _ + exact k15t8_cover134 + · exact by + intro _ + exact k15t8_cover135 + +private theorem k15t8_cover136 : ∀ P ∈ pathPatterns 1 3 [1, 2, 1], HasCheckedCertificate 15 8 ([[], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover137 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 2], HasCheckedCertificate 15 8 ([[], [], [], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p80, Certificates.k15t8p80_check⟩ + +private theorem k15t8_cover138 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 3], HasCheckedCertificate 15 8 ([[], [], [], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p81, Certificates.k15t8p81_check⟩ + +private theorem k15t8_cover139 : ∀ P ∈ pathPatterns 1 2 [1, 2, 2], HasCheckedCertificate 15 8 ([[], [], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover140 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2, 1], HasCheckedCertificate 15 8 ([[], [], [], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p82, Certificates.k15t8p82_check⟩ + +private theorem k15t8_cover141 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 2], HasCheckedCertificate 15 8 ([[], [], [], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p83, Certificates.k15t8p83_check⟩ + +private theorem k15t8_cover142 : ∀ P ∈ pathPatterns 1 1 [1, 2, 3], HasCheckedCertificate 15 8 ([[], [], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover143 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3, 1], HasCheckedCertificate 15 8 ([[], [], [], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p84, Certificates.k15t8p84_check⟩ + +private theorem k15t8_cover144 : ∀ P ∈ pathPatterns 1 0 [1, 2, 4], HasCheckedCertificate 15 8 ([[], [], [], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover146 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 8 ([[], [], [], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p85, Certificates.k15t8p85_check⟩ + +private theorem k15t8_cover147 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 8 ([[], [], [], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p86, Certificates.k15t8p86_check⟩ + +private theorem k15t8_cover145 : ∀ P ∈ pathPatterns 2 3 [1, 3], HasCheckedCertificate 15 8 ([[], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover146 + · exact by + intro _ + exact k15t8_cover147 + +private theorem k15t8_cover148 : ∀ P ∈ pathPatterns 1 2 [1, 3, 1], HasCheckedCertificate 15 8 ([[], [], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover149 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 2], HasCheckedCertificate 15 8 ([[], [], [], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p87, Certificates.k15t8p87_check⟩ + +private theorem k15t8_cover150 : ∀ P ∈ pathPatterns 1 1 [1, 3, 2], HasCheckedCertificate 15 8 ([[], [], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover151 : ∀ P ∈ pathPatterns 1 0 [1, 3, 3], HasCheckedCertificate 15 8 ([[], [], [], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover153 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 8 ([[], [], [], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p88, Certificates.k15t8p88_check⟩ + +private theorem k15t8_cover152 : ∀ P ∈ pathPatterns 2 2 [1, 4], HasCheckedCertificate 15 8 ([[], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover153 + +private theorem k15t8_cover154 : ∀ P ∈ pathPatterns 1 1 [1, 4, 1], HasCheckedCertificate 15 8 ([[], [], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover155 : ∀ P ∈ pathPatterns 1 0 [1, 4, 2], HasCheckedCertificate 15 8 ([[], [], [], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover156 : ∀ P ∈ pathPatterns 2 1 [1, 5], HasCheckedCertificate 15 8 ([[], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover157 : ∀ P ∈ pathPatterns 1 0 [1, 5, 1], HasCheckedCertificate 15 8 ([[], [], [], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover158 : ∀ P ∈ pathPatterns 2 0 [1, 6], HasCheckedCertificate 15 8 ([[], [], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq95 : amountSequenceForall 3 6 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (7 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 15 8 ([[], [], []] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover96 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover112 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover117 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover118 + · exact by + intro _ + exact k15t8_cover119 + · exact by + intro _ + exact k15t8_cover120 + · exact by + intro _ + exact k15t8_cover121 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover122 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover123 + · exact by + intro _ + exact k15t8_cover124 + · exact by + intro _ + exact k15t8_cover125 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover126 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover127 + · exact by + intro _ + exact k15t8_cover128 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover129 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover130 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover131 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover132 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover136 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k15t8_cover137 + · exact by + intro _ + exact k15t8_cover138 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover139 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover140 + · exact by + intro _ + exact k15t8_cover141 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover142 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover143 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover144 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover145 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover148 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + intro _ + exact k15t8_cover149 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover150 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover151 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover152 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover154 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover155 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover156 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover157 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover158 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover161 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 15 8 ([[], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover162 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 15 8 ([[], [], [], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p89, Certificates.k15t8p89_check⟩ + +private theorem k15t8_cover163 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 15 8 ([[], [], [], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p90, Certificates.k15t8p90_check⟩ + +private theorem k15t8_cover164 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 15 8 ([[], [], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover165 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 15 8 ([[], [], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover166 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 15 8 ([[], [], [], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover160 : ∀ P ∈ pathPatterns 3 5 [2], HasCheckedCertificate 15 8 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover161 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t8_cover162 + · exact by + intro _ + exact k15t8_cover163 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover164 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover165 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover166 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover167 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 2], HasCheckedCertificate 15 8 ([[], [], [], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p91, Certificates.k15t8p91_check⟩ + +private theorem k15t8_cover168 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 3], HasCheckedCertificate 15 8 ([[], [], [], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p92, Certificates.k15t8p92_check⟩ + +private theorem k15t8_cover169 : ∀ P ∈ pathPatterns 1 2 [2, 1, 2], HasCheckedCertificate 15 8 ([[], [], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover170 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 2], HasCheckedCertificate 15 8 ([[], [], [], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p93, Certificates.k15t8p93_check⟩ + +private theorem k15t8_cover171 : ∀ P ∈ pathPatterns 1 1 [2, 1, 3], HasCheckedCertificate 15 8 ([[], [], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover172 : ∀ P ∈ pathPatterns 1 0 [2, 1, 4], HasCheckedCertificate 15 8 ([[], [], [], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover174 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 8 ([[], [], [], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p94, Certificates.k15t8p94_check⟩ + +private theorem k15t8_cover173 : ∀ P ∈ pathPatterns 2 3 [2, 2], HasCheckedCertificate 15 8 ([[], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k15t8_cover174 + +private theorem k15t8_cover175 : ∀ P ∈ pathPatterns 1 1 [2, 2, 2], HasCheckedCertificate 15 8 ([[], [], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover176 : ∀ P ∈ pathPatterns 1 0 [2, 2, 3], HasCheckedCertificate 15 8 ([[], [], [], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover177 : ∀ P ∈ pathPatterns 2 2 [2, 3], HasCheckedCertificate 15 8 ([[], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t8_cover178 : ∀ P ∈ pathPatterns 1 0 [2, 3, 2], HasCheckedCertificate 15 8 ([[], [], [], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover179 : ∀ P ∈ pathPatterns 2 1 [2, 4], HasCheckedCertificate 15 8 ([[], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover180 : ∀ P ∈ pathPatterns 2 0 [2, 5], HasCheckedCertificate 15 8 ([[], [], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq159 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([2] ++ tail).length) (7 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 15 8 ([[], [], []] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover160 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k15t8_cover167 + · exact by + intro _ + exact k15t8_cover168 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover169 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + intro _ + exact k15t8_cover170 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover171 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover172 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover173 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover175 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover176 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover177 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover178 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover179 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover180 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover182 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 15 8 ([[], [], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover183 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 15 8 ([[], [], [], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover181 : ∀ P ∈ pathPatterns 3 4 [3], HasCheckedCertificate 15 8 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover182 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover183 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover184 : ∀ P ∈ pathPatterns 1 0 [3, 1, 3], HasCheckedCertificate 15 8 ([[], [], [], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover185 : ∀ P ∈ pathPatterns 2 1 [3, 3], HasCheckedCertificate 15 8 ([[], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover186 : ∀ P ∈ pathPatterns 2 0 [3, 4], HasCheckedCertificate 15 8 ([[], [], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover187 : ∀ P ∈ pathPatterns 3 3 [4], HasCheckedCertificate 15 8 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover188 : ∀ P ∈ pathPatterns 3 2 [5], HasCheckedCertificate 15 8 ([[], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover189 : ∀ P ∈ pathPatterns 3 1 [6], HasCheckedCertificate 15 8 ([[], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover190 : ∀ P ∈ pathPatterns 3 0 [7], HasCheckedCertificate 15 8 ([[], [], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq8 : amountSequenceForall 4 7 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 8 ([[], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover9 + · intro q + fin_cases q + · exact k15t8_seq95 + + · exact k15t8_seq159 + + · exact by + constructor + · exact by + intro _ + exact k15t8_cover181 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover184 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover185 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover186 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover187 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover188 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover189 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover190 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover7 : ∀ P ∈ pathPatterns 5 7 [], HasCheckedCertificate 15 8 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k15t8_seq8 + + +private theorem k15t8_cover195 : ∀ P ∈ pathPatterns 0 4 [1], HasCheckedCertificate 15 8 ([[], [], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p95, Certificates.k15t8p95_check⟩ + +private theorem k15t8_cover196 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 15 8 ([[], [], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p96, Certificates.k15t8p96_check⟩ + +private theorem k15t8_cover197 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 15 8 ([[], [], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p97, Certificates.k15t8p97_check⟩ + +private theorem k15t8_cover198 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 15 8 ([[], [], [1], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p98, Certificates.k15t8p98_check⟩ + +private theorem k15t8_cover199 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 15 8 ([[], [], [1], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p99, Certificates.k15t8p99_check⟩ + +private theorem k15t8_cover194 : ∀ P ∈ pathPatterns 2 5 [1], HasCheckedCertificate 15 8 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover195 + · exact by + intro _ + exact k15t8_cover196 + · exact by + intro _ + exact k15t8_cover197 + · exact by + intro _ + exact k15t8_cover198 + · exact by + intro _ + exact k15t8_cover199 + +private theorem k15t8_cover200 : ∀ P ∈ pathPatterns 1 4 [1, 1], HasCheckedCertificate 15 8 ([[], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover201 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1], HasCheckedCertificate 15 8 ([[], [], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p100, Certificates.k15t8p100_check⟩ + +private theorem k15t8_cover202 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2], HasCheckedCertificate 15 8 ([[], [], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p101, Certificates.k15t8p101_check⟩ + +private theorem k15t8_cover203 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3], HasCheckedCertificate 15 8 ([[], [], [1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p102, Certificates.k15t8p102_check⟩ + +private theorem k15t8_cover204 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4], HasCheckedCertificate 15 8 ([[], [], [1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p103, Certificates.k15t8p103_check⟩ + +private theorem k15t8_cover205 : ∀ P ∈ pathPatterns 1 3 [1, 2], HasCheckedCertificate 15 8 ([[], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover206 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1], HasCheckedCertificate 15 8 ([[], [], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p104, Certificates.k15t8p104_check⟩ + +private theorem k15t8_cover207 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2], HasCheckedCertificate 15 8 ([[], [], [1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p105, Certificates.k15t8p105_check⟩ + +private theorem k15t8_cover208 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3], HasCheckedCertificate 15 8 ([[], [], [1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p106, Certificates.k15t8p106_check⟩ + +private theorem k15t8_cover209 : ∀ P ∈ pathPatterns 1 2 [1, 3], HasCheckedCertificate 15 8 ([[], [], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover210 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1], HasCheckedCertificate 15 8 ([[], [], [1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p107, Certificates.k15t8p107_check⟩ + +private theorem k15t8_cover211 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2], HasCheckedCertificate 15 8 ([[], [], [1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p108, Certificates.k15t8p108_check⟩ + +private theorem k15t8_cover212 : ∀ P ∈ pathPatterns 1 1 [1, 4], HasCheckedCertificate 15 8 ([[], [], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover213 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1], HasCheckedCertificate 15 8 ([[], [], [1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p109, Certificates.k15t8p109_check⟩ + +private theorem k15t8_cover214 : ∀ P ∈ pathPatterns 1 0 [1, 5], HasCheckedCertificate 15 8 ([[], [], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover216 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 15 8 ([[], [], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p110, Certificates.k15t8p110_check⟩ + +private theorem k15t8_cover217 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 15 8 ([[], [], [1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p111, Certificates.k15t8p111_check⟩ + +private theorem k15t8_cover218 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 8 ([[], [], [1], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p112, Certificates.k15t8p112_check⟩ + +private theorem k15t8_cover215 : ∀ P ∈ pathPatterns 2 4 [2], HasCheckedCertificate 15 8 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover216 + · exact by + intro _ + exact k15t8_cover217 + · exact by + intro _ + exact k15t8_cover218 + +private theorem k15t8_cover219 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2], HasCheckedCertificate 15 8 ([[], [], [1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p113, Certificates.k15t8p113_check⟩ + +private theorem k15t8_cover220 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3], HasCheckedCertificate 15 8 ([[], [], [1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p114, Certificates.k15t8p114_check⟩ + +private theorem k15t8_cover221 : ∀ P ∈ pathPatterns 1 2 [2, 2], HasCheckedCertificate 15 8 ([[], [], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover222 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2], HasCheckedCertificate 15 8 ([[], [], [1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p115, Certificates.k15t8p115_check⟩ + +private theorem k15t8_cover223 : ∀ P ∈ pathPatterns 1 1 [2, 3], HasCheckedCertificate 15 8 ([[], [], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover224 : ∀ P ∈ pathPatterns 1 0 [2, 4], HasCheckedCertificate 15 8 ([[], [], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover226 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 8 ([[], [], [1], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p116, Certificates.k15t8p116_check⟩ + +private theorem k15t8_cover225 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 15 8 ([[], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k15t8_cover226 + +private theorem k15t8_cover227 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 15 8 ([[], [], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover228 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 15 8 ([[], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t8_cover229 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 15 8 ([[], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover230 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 15 8 ([[], [], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq193 : amountSequenceForall 3 6 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 8 ([[], [], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover194 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover200 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover201 + · exact by + intro _ + exact k15t8_cover202 + · exact by + intro _ + exact k15t8_cover203 + · exact by + intro _ + exact k15t8_cover204 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover205 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover206 + · exact by + intro _ + exact k15t8_cover207 + · exact by + intro _ + exact k15t8_cover208 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover209 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover210 + · exact by + intro _ + exact k15t8_cover211 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover212 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover213 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover214 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover215 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k15t8_cover219 + · exact by + intro _ + exact k15t8_cover220 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover221 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k15t8_cover222 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover223 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover224 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover225 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover227 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover228 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover229 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover230 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover192 : ∀ P ∈ pathPatterns 4 6 [1], HasCheckedCertificate 15 8 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k15t8_seq193 + + +private theorem k15t8_cover233 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 15 8 ([[], [], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p117, Certificates.k15t8p117_check⟩ + +private theorem k15t8_cover234 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 15 8 ([[], [], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p118, Certificates.k15t8p118_check⟩ + +private theorem k15t8_cover235 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 15 8 ([[], [], [1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p119, Certificates.k15t8p119_check⟩ + +private theorem k15t8_cover236 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 15 8 ([[], [], [1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p120, Certificates.k15t8p120_check⟩ + +private theorem k15t8_cover237 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 15 8 ([[], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover238 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 15 8 ([[], [], [1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p121, Certificates.k15t8p121_check⟩ + +private theorem k15t8_cover239 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 15 8 ([[], [], [1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p122, Certificates.k15t8p122_check⟩ + +private theorem k15t8_cover240 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 15 8 ([[], [], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover241 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 15 8 ([[], [], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover242 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 15 8 ([[], [], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover232 : ∀ P ∈ pathPatterns 3 5 [1, 1], HasCheckedCertificate 15 8 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover233 + · exact by + intro _ + exact k15t8_cover234 + · exact by + intro _ + exact k15t8_cover235 + · exact by + intro _ + exact k15t8_cover236 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover237 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t8_cover238 + · exact by + intro _ + exact k15t8_cover239 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover240 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover241 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover242 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover244 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 15 8 ([[], [], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p123, Certificates.k15t8p123_check⟩ + +private theorem k15t8_cover245 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 15 8 ([[], [], [1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p124, Certificates.k15t8p124_check⟩ + +private theorem k15t8_cover246 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 8 ([[], [], [1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p125, Certificates.k15t8p125_check⟩ + +private theorem k15t8_cover243 : ∀ P ∈ pathPatterns 2 4 [1, 1, 1], HasCheckedCertificate 15 8 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover244 + · exact by + intro _ + exact k15t8_cover245 + · exact by + intro _ + exact k15t8_cover246 + +private theorem k15t8_cover247 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1, 1], HasCheckedCertificate 15 8 ([[], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover248 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1, 1], HasCheckedCertificate 15 8 ([[], [], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p126, Certificates.k15t8p126_check⟩ + +private theorem k15t8_cover249 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 2], HasCheckedCertificate 15 8 ([[], [], [1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p127, Certificates.k15t8p127_check⟩ + +private theorem k15t8_cover250 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 3], HasCheckedCertificate 15 8 ([[], [], [1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p128, Certificates.k15t8p128_check⟩ + +private theorem k15t8_cover251 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 2], HasCheckedCertificate 15 8 ([[], [], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover252 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2, 1], HasCheckedCertificate 15 8 ([[], [], [1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p129, Certificates.k15t8p129_check⟩ + +private theorem k15t8_cover253 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 2], HasCheckedCertificate 15 8 ([[], [], [1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p130, Certificates.k15t8p130_check⟩ + +private theorem k15t8_cover254 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 3], HasCheckedCertificate 15 8 ([[], [], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover255 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3, 1], HasCheckedCertificate 15 8 ([[], [], [1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p131, Certificates.k15t8p131_check⟩ + +private theorem k15t8_cover256 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 4], HasCheckedCertificate 15 8 ([[], [], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover258 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 8 ([[], [], [1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p132, Certificates.k15t8p132_check⟩ + +private theorem k15t8_cover259 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 8 ([[], [], [1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p133, Certificates.k15t8p133_check⟩ + +private theorem k15t8_cover257 : ∀ P ∈ pathPatterns 2 3 [1, 1, 2], HasCheckedCertificate 15 8 ([[], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover258 + · exact by + intro _ + exact k15t8_cover259 + +private theorem k15t8_cover260 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2, 1], HasCheckedCertificate 15 8 ([[], [], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover261 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1, 1], HasCheckedCertificate 15 8 ([[], [], [1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p134, Certificates.k15t8p134_check⟩ + +private theorem k15t8_cover262 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 2], HasCheckedCertificate 15 8 ([[], [], [1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p135, Certificates.k15t8p135_check⟩ + +private theorem k15t8_cover263 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 2], HasCheckedCertificate 15 8 ([[], [], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover264 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2, 1], HasCheckedCertificate 15 8 ([[], [], [1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p136, Certificates.k15t8p136_check⟩ + +private theorem k15t8_cover265 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 3], HasCheckedCertificate 15 8 ([[], [], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover267 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 8 ([[], [], [1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p137, Certificates.k15t8p137_check⟩ + +private theorem k15t8_cover266 : ∀ P ∈ pathPatterns 2 2 [1, 1, 3], HasCheckedCertificate 15 8 ([[], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover267 + +private theorem k15t8_cover268 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3, 1], HasCheckedCertificate 15 8 ([[], [], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover269 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1, 1], HasCheckedCertificate 15 8 ([[], [], [1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p138, Certificates.k15t8p138_check⟩ + +private theorem k15t8_cover270 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 2], HasCheckedCertificate 15 8 ([[], [], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover271 : ∀ P ∈ pathPatterns 2 1 [1, 1, 4], HasCheckedCertificate 15 8 ([[], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover272 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4, 1], HasCheckedCertificate 15 8 ([[], [], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover273 : ∀ P ∈ pathPatterns 2 0 [1, 1, 5], HasCheckedCertificate 15 8 ([[], [], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq231 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1, 1] ++ tail).length) (7 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 15 8 ([[], []] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover232 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover243 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover247 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover248 + · exact by + intro _ + exact k15t8_cover249 + · exact by + intro _ + exact k15t8_cover250 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover251 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover252 + · exact by + intro _ + exact k15t8_cover253 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover254 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover255 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover256 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover257 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover260 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover261 + · exact by + intro _ + exact k15t8_cover262 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover263 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover264 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover265 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover266 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover268 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover269 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover270 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover271 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover272 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover273 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover275 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 15 8 ([[], [], [1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p139, Certificates.k15t8p139_check⟩ + +private theorem k15t8_cover276 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 15 8 ([[], [], [1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p140, Certificates.k15t8p140_check⟩ + +private theorem k15t8_cover277 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 15 8 ([[], [], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover278 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 15 8 ([[], [], [1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p141, Certificates.k15t8p141_check⟩ + +private theorem k15t8_cover279 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 15 8 ([[], [], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover280 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 15 8 ([[], [], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover274 : ∀ P ∈ pathPatterns 3 4 [1, 2], HasCheckedCertificate 15 8 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k15t8_cover275 + · exact by + intro _ + exact k15t8_cover276 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover277 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t8_cover278 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover279 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover280 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover282 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 8 ([[], [], [1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p142, Certificates.k15t8p142_check⟩ + +private theorem k15t8_cover283 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 8 ([[], [], [1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p143, Certificates.k15t8p143_check⟩ + +private theorem k15t8_cover281 : ∀ P ∈ pathPatterns 2 3 [1, 2, 1], HasCheckedCertificate 15 8 ([[], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover282 + · exact by + intro _ + exact k15t8_cover283 + +private theorem k15t8_cover284 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 2], HasCheckedCertificate 15 8 ([[], [], [1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p144, Certificates.k15t8p144_check⟩ + +private theorem k15t8_cover285 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 2], HasCheckedCertificate 15 8 ([[], [], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover286 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2, 1], HasCheckedCertificate 15 8 ([[], [], [1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p145, Certificates.k15t8p145_check⟩ + +private theorem k15t8_cover287 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 3], HasCheckedCertificate 15 8 ([[], [], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover289 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 8 ([[], [], [1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p146, Certificates.k15t8p146_check⟩ + +private theorem k15t8_cover288 : ∀ P ∈ pathPatterns 2 2 [1, 2, 2], HasCheckedCertificate 15 8 ([[], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover289 + +private theorem k15t8_cover290 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2, 1], HasCheckedCertificate 15 8 ([[], [], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover291 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 2], HasCheckedCertificate 15 8 ([[], [], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover292 : ∀ P ∈ pathPatterns 2 1 [1, 2, 3], HasCheckedCertificate 15 8 ([[], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover293 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3, 1], HasCheckedCertificate 15 8 ([[], [], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover294 : ∀ P ∈ pathPatterns 2 0 [1, 2, 4], HasCheckedCertificate 15 8 ([[], [], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover296 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 15 8 ([[], [], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover297 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 8 ([[], [], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover295 : ∀ P ∈ pathPatterns 3 3 [1, 3], HasCheckedCertificate 15 8 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover296 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover297 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover299 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 8 ([[], [], [1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p147, Certificates.k15t8p147_check⟩ + +private theorem k15t8_cover298 : ∀ P ∈ pathPatterns 2 2 [1, 3, 1], HasCheckedCertificate 15 8 ([[], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover299 + +private theorem k15t8_cover300 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1, 2], HasCheckedCertificate 15 8 ([[], [], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover301 : ∀ P ∈ pathPatterns 2 1 [1, 3, 2], HasCheckedCertificate 15 8 ([[], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover302 : ∀ P ∈ pathPatterns 2 0 [1, 3, 3], HasCheckedCertificate 15 8 ([[], [], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover304 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 15 8 ([[], [], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover303 : ∀ P ∈ pathPatterns 3 2 [1, 4], HasCheckedCertificate 15 8 ([[], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover304 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover305 : ∀ P ∈ pathPatterns 2 1 [1, 4, 1], HasCheckedCertificate 15 8 ([[], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover306 : ∀ P ∈ pathPatterns 2 0 [1, 4, 2], HasCheckedCertificate 15 8 ([[], [], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover307 : ∀ P ∈ pathPatterns 3 1 [1, 5], HasCheckedCertificate 15 8 ([[], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover308 : ∀ P ∈ pathPatterns 2 0 [1, 5, 1], HasCheckedCertificate 15 8 ([[], [], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover309 : ∀ P ∈ pathPatterns 3 0 [1, 6], HasCheckedCertificate 15 8 ([[], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq191 : amountSequenceForall 4 6 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1] ++ tail).length) (7 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 15 8 ([[], []] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover192 + · intro q + fin_cases q + · exact k15t8_seq231 + + · exact by + constructor + · exact by + intro _ + exact k15t8_cover274 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover281 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · exact by + intro _ + exact k15t8_cover284 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover285 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover286 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover287 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover288 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover290 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover291 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover292 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover293 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover294 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover295 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover298 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover300 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover301 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover302 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover303 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover305 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover306 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover307 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover308 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover309 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover314 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 8 ([[], [], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p148, Certificates.k15t8p148_check⟩ + +private theorem k15t8_cover315 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 8 ([[], [], [2], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p149, Certificates.k15t8p149_check⟩ + +private theorem k15t8_cover313 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 15 8 ([[], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover314 + · exact by + intro _ + exact k15t8_cover315 + +private theorem k15t8_cover316 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 15 8 ([[], [], [2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p150, Certificates.k15t8p150_check⟩ + +private theorem k15t8_cover317 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 15 8 ([[], [], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover318 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 15 8 ([[], [], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover319 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 15 8 ([[], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t8_cover320 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 15 8 ([[], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover321 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 15 8 ([[], [], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq312 : amountSequenceForall 3 5 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 8 ([[], [], [2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover313 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k15t8_cover316 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover317 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover318 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover319 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover320 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover321 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover311 : ∀ P ∈ pathPatterns 4 5 [2], HasCheckedCertificate 15 8 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact k15t8_seq312 + + +private theorem k15t8_cover322 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 1, 2], HasCheckedCertificate 15 8 ([[], [], [2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p151, Certificates.k15t8p151_check⟩ + +private theorem k15t8_cover323 : ∀ P ∈ pathPatterns 1 1 [2, 1, 1, 2], HasCheckedCertificate 15 8 ([[], [], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover324 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 3], HasCheckedCertificate 15 8 ([[], [], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover325 : ∀ P ∈ pathPatterns 2 2 [2, 1, 2], HasCheckedCertificate 15 8 ([[], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t8_cover326 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2, 2], HasCheckedCertificate 15 8 ([[], [], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover327 : ∀ P ∈ pathPatterns 2 1 [2, 1, 3], HasCheckedCertificate 15 8 ([[], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover328 : ∀ P ∈ pathPatterns 2 0 [2, 1, 4], HasCheckedCertificate 15 8 ([[], [], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover330 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 8 ([[], [], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover329 : ∀ P ∈ pathPatterns 3 3 [2, 2], HasCheckedCertificate 15 8 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover330 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover331 : ∀ P ∈ pathPatterns 2 1 [2, 2, 2], HasCheckedCertificate 15 8 ([[], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover332 : ∀ P ∈ pathPatterns 2 0 [2, 2, 3], HasCheckedCertificate 15 8 ([[], [], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover333 : ∀ P ∈ pathPatterns 3 2 [2, 3], HasCheckedCertificate 15 8 ([[], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover334 : ∀ P ∈ pathPatterns 2 0 [2, 3, 2], HasCheckedCertificate 15 8 ([[], [], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover335 : ∀ P ∈ pathPatterns 3 1 [2, 4], HasCheckedCertificate 15 8 ([[], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover336 : ∀ P ∈ pathPatterns 3 0 [2, 5], HasCheckedCertificate 15 8 ([[], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq310 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([2] ++ tail).length) (7 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 15 8 ([[], []] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover311 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · exact by + intro _ + exact k15t8_cover322 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover323 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover324 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover325 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover326 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover327 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover328 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover329 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover331 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover332 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover333 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover334 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover335 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover336 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover338 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 15 8 ([[], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover339 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 15 8 ([[], [], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover337 : ∀ P ∈ pathPatterns 4 4 [3], HasCheckedCertificate 15 8 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover338 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover339 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover340 : ∀ P ∈ pathPatterns 2 0 [3, 1, 3], HasCheckedCertificate 15 8 ([[], [], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover341 : ∀ P ∈ pathPatterns 3 1 [3, 3], HasCheckedCertificate 15 8 ([[], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover342 : ∀ P ∈ pathPatterns 3 0 [3, 4], HasCheckedCertificate 15 8 ([[], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover343 : ∀ P ∈ pathPatterns 4 3 [4], HasCheckedCertificate 15 8 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover344 : ∀ P ∈ pathPatterns 4 2 [5], HasCheckedCertificate 15 8 ([[], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover345 : ∀ P ∈ pathPatterns 4 1 [6], HasCheckedCertificate 15 8 ([[], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover346 : ∀ P ∈ pathPatterns 4 0 [7], HasCheckedCertificate 15 8 ([[], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq6 : amountSequenceForall 5 7 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 8 ([[], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover7 + · intro q + fin_cases q + · exact k15t8_seq191 + + · exact k15t8_seq310 + + · exact by + constructor + · exact by + intro _ + exact k15t8_cover337 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover340 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover341 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover342 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover343 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover344 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover345 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover346 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover5 : ∀ P ∈ pathPatterns 6 7 [], HasCheckedCertificate 15 8 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact k15t8_seq6 + + +private theorem k15t8_cover352 : ∀ P ∈ pathPatterns 1 4 [1], HasCheckedCertificate 15 8 ([[], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover353 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 15 8 ([[], [1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p152, Certificates.k15t8p152_check⟩ + +private theorem k15t8_cover354 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 15 8 ([[], [1], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p153, Certificates.k15t8p153_check⟩ + +private theorem k15t8_cover355 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 15 8 ([[], [1], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p154, Certificates.k15t8p154_check⟩ + +private theorem k15t8_cover356 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 15 8 ([[], [1], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p155, Certificates.k15t8p155_check⟩ + +private theorem k15t8_cover357 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 15 8 ([[], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover358 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 15 8 ([[], [1], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p156, Certificates.k15t8p156_check⟩ + +private theorem k15t8_cover359 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 15 8 ([[], [1], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p157, Certificates.k15t8p157_check⟩ + +private theorem k15t8_cover360 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 15 8 ([[], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover361 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 15 8 ([[], [1], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover362 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 15 8 ([[], [1], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover351 : ∀ P ∈ pathPatterns 3 5 [1], HasCheckedCertificate 15 8 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover352 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover353 + · exact by + intro _ + exact k15t8_cover354 + · exact by + intro _ + exact k15t8_cover355 + · exact by + intro _ + exact k15t8_cover356 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover357 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t8_cover358 + · exact by + intro _ + exact k15t8_cover359 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover360 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover361 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover362 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover364 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 15 8 ([[], [1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p158, Certificates.k15t8p158_check⟩ + +private theorem k15t8_cover365 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 15 8 ([[], [1], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p159, Certificates.k15t8p159_check⟩ + +private theorem k15t8_cover366 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 8 ([[], [1], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p160, Certificates.k15t8p160_check⟩ + +private theorem k15t8_cover363 : ∀ P ∈ pathPatterns 2 4 [1, 1], HasCheckedCertificate 15 8 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover364 + · exact by + intro _ + exact k15t8_cover365 + · exact by + intro _ + exact k15t8_cover366 + +private theorem k15t8_cover367 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1], HasCheckedCertificate 15 8 ([[], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover368 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1], HasCheckedCertificate 15 8 ([[], [1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p161, Certificates.k15t8p161_check⟩ + +private theorem k15t8_cover369 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2], HasCheckedCertificate 15 8 ([[], [1], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p162, Certificates.k15t8p162_check⟩ + +private theorem k15t8_cover370 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3], HasCheckedCertificate 15 8 ([[], [1], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p163, Certificates.k15t8p163_check⟩ + +private theorem k15t8_cover371 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2], HasCheckedCertificate 15 8 ([[], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover372 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1], HasCheckedCertificate 15 8 ([[], [1], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p164, Certificates.k15t8p164_check⟩ + +private theorem k15t8_cover373 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2], HasCheckedCertificate 15 8 ([[], [1], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p165, Certificates.k15t8p165_check⟩ + +private theorem k15t8_cover374 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3], HasCheckedCertificate 15 8 ([[], [1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover375 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1], HasCheckedCertificate 15 8 ([[], [1], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p166, Certificates.k15t8p166_check⟩ + +private theorem k15t8_cover376 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4], HasCheckedCertificate 15 8 ([[], [1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover378 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 8 ([[], [1], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p167, Certificates.k15t8p167_check⟩ + +private theorem k15t8_cover379 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 8 ([[], [1], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p168, Certificates.k15t8p168_check⟩ + +private theorem k15t8_cover377 : ∀ P ∈ pathPatterns 2 3 [1, 2], HasCheckedCertificate 15 8 ([[], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover378 + · exact by + intro _ + exact k15t8_cover379 + +private theorem k15t8_cover380 : ∀ P ∈ pathPatterns 1 2 [1, 2, 1], HasCheckedCertificate 15 8 ([[], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover381 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2], HasCheckedCertificate 15 8 ([[], [1], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p169, Certificates.k15t8p169_check⟩ + +private theorem k15t8_cover382 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2], HasCheckedCertificate 15 8 ([[], [1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover383 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 1], HasCheckedCertificate 15 8 ([[], [1], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p170, Certificates.k15t8p170_check⟩ + +private theorem k15t8_cover384 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3], HasCheckedCertificate 15 8 ([[], [1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover386 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 8 ([[], [1], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p171, Certificates.k15t8p171_check⟩ + +private theorem k15t8_cover385 : ∀ P ∈ pathPatterns 2 2 [1, 3], HasCheckedCertificate 15 8 ([[], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover386 + +private theorem k15t8_cover387 : ∀ P ∈ pathPatterns 1 1 [1, 3, 1], HasCheckedCertificate 15 8 ([[], [1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover388 : ∀ P ∈ pathPatterns 1 0 [1, 3, 2], HasCheckedCertificate 15 8 ([[], [1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover389 : ∀ P ∈ pathPatterns 2 1 [1, 4], HasCheckedCertificate 15 8 ([[], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover390 : ∀ P ∈ pathPatterns 1 0 [1, 4, 1], HasCheckedCertificate 15 8 ([[], [1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover391 : ∀ P ∈ pathPatterns 2 0 [1, 5], HasCheckedCertificate 15 8 ([[], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq350 : amountSequenceForall 3 5 (fun tail => + (LexLE [1] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 15 8 ([[], [1]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover351 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover363 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover367 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover368 + · exact by + intro _ + exact k15t8_cover369 + · exact by + intro _ + exact k15t8_cover370 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover371 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover372 + · exact by + intro _ + exact k15t8_cover373 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover374 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover375 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover376 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover377 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover380 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k15t8_cover381 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover382 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover383 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover384 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover385 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover387 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover388 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover389 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover390 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover391 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover393 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 15 8 ([[], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover394 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 15 8 ([[], [1], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p172, Certificates.k15t8p172_check⟩ + +private theorem k15t8_cover395 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 15 8 ([[], [1], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover396 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 15 8 ([[], [1], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover392 : ∀ P ∈ pathPatterns 3 4 [2], HasCheckedCertificate 15 8 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover393 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t8_cover394 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover395 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover396 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover397 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 2], HasCheckedCertificate 15 8 ([[], [1], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p173, Certificates.k15t8p173_check⟩ + +private theorem k15t8_cover398 : ∀ P ∈ pathPatterns 1 1 [2, 1, 2], HasCheckedCertificate 15 8 ([[], [1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover399 : ∀ P ∈ pathPatterns 1 0 [2, 1, 3], HasCheckedCertificate 15 8 ([[], [1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover400 : ∀ P ∈ pathPatterns 2 2 [2, 2], HasCheckedCertificate 15 8 ([[], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t8_cover401 : ∀ P ∈ pathPatterns 1 0 [2, 2, 2], HasCheckedCertificate 15 8 ([[], [1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover402 : ∀ P ∈ pathPatterns 2 1 [2, 3], HasCheckedCertificate 15 8 ([[], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover403 : ∀ P ∈ pathPatterns 2 0 [2, 4], HasCheckedCertificate 15 8 ([[], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover405 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 8 ([[], [1], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover404 : ∀ P ∈ pathPatterns 3 3 [3], HasCheckedCertificate 15 8 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover405 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover406 : ∀ P ∈ pathPatterns 2 0 [3, 3], HasCheckedCertificate 15 8 ([[], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover407 : ∀ P ∈ pathPatterns 3 2 [4], HasCheckedCertificate 15 8 ([[], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover408 : ∀ P ∈ pathPatterns 3 1 [5], HasCheckedCertificate 15 8 ([[], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover409 : ∀ P ∈ pathPatterns 3 0 [6], HasCheckedCertificate 15 8 ([[], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq349 : amountSequenceForall 4 6 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 8 ([[], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k15t8_seq350 + + · exact by + constructor + · exact by + intro _ + exact k15t8_cover392 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k15t8_cover397 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover398 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover399 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover400 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover401 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover402 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover403 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover404 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover406 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover407 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover408 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover409 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover348 : ∀ P ∈ pathPatterns 5 6 [1], HasCheckedCertificate 15 8 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k15t8_seq349 + + +private theorem k15t8_cover413 : ∀ P ∈ pathPatterns 1 3 [1, 1], HasCheckedCertificate 15 8 ([[], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover414 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1], HasCheckedCertificate 15 8 ([[], [1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p174, Certificates.k15t8p174_check⟩ + +private theorem k15t8_cover415 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2], HasCheckedCertificate 15 8 ([[], [1, 1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p175, Certificates.k15t8p175_check⟩ + +private theorem k15t8_cover416 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3], HasCheckedCertificate 15 8 ([[], [1, 1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p176, Certificates.k15t8p176_check⟩ + +private theorem k15t8_cover417 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 15 8 ([[], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover418 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 15 8 ([[], [1, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p177, Certificates.k15t8p177_check⟩ + +private theorem k15t8_cover419 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 15 8 ([[], [1, 1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p178, Certificates.k15t8p178_check⟩ + +private theorem k15t8_cover420 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 15 8 ([[], [1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover421 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 15 8 ([[], [1, 1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p179, Certificates.k15t8p179_check⟩ + +private theorem k15t8_cover422 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 15 8 ([[], [1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover424 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 8 ([[], [1, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p180, Certificates.k15t8p180_check⟩ + +private theorem k15t8_cover425 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 8 ([[], [1, 1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p181, Certificates.k15t8p181_check⟩ + +private theorem k15t8_cover423 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 15 8 ([[], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover424 + · exact by + intro _ + exact k15t8_cover425 + +private theorem k15t8_cover426 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 15 8 ([[], [1, 1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p182, Certificates.k15t8p182_check⟩ + +private theorem k15t8_cover427 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 15 8 ([[], [1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover428 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 15 8 ([[], [1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover429 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 15 8 ([[], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t8_cover430 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 15 8 ([[], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover431 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 15 8 ([[], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq412 : amountSequenceForall 3 5 (fun tail => + (LexLE [1, 1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 8 ([[], [1, 1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover413 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover414 + · exact by + intro _ + exact k15t8_cover415 + · exact by + intro _ + exact k15t8_cover416 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover417 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover418 + · exact by + intro _ + exact k15t8_cover419 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover420 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover421 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover422 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover423 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k15t8_cover426 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover427 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover428 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover429 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover430 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover431 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover411 : ∀ P ∈ pathPatterns 4 5 [1, 1], HasCheckedCertificate 15 8 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact k15t8_seq412 + + +private theorem k15t8_cover433 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 15 8 ([[], [1, 1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p183, Certificates.k15t8p183_check⟩ + +private theorem k15t8_cover434 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 15 8 ([[], [1, 1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p184, Certificates.k15t8p184_check⟩ + +private theorem k15t8_cover435 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 15 8 ([[], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover436 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 15 8 ([[], [1, 1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p185, Certificates.k15t8p185_check⟩ + +private theorem k15t8_cover437 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 15 8 ([[], [1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover438 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 15 8 ([[], [1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover432 : ∀ P ∈ pathPatterns 3 4 [1, 1, 1], HasCheckedCertificate 15 8 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k15t8_cover433 + · exact by + intro _ + exact k15t8_cover434 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover435 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t8_cover436 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover437 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover438 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover440 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p186, Certificates.k15t8p186_check⟩ + +private theorem k15t8_cover441 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p187, Certificates.k15t8p187_check⟩ + +private theorem k15t8_cover439 : ∀ P ∈ pathPatterns 2 3 [1, 1, 1, 1], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover440 + · exact by + intro _ + exact k15t8_cover441 + +private theorem k15t8_cover442 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 1, 1], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover443 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 1, 1], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p188, Certificates.k15t8p188_check⟩ + +private theorem k15t8_cover444 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1, 2], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p189, Certificates.k15t8p189_check⟩ + +private theorem k15t8_cover445 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1, 2], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover446 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 2, 1], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p190, Certificates.k15t8p190_check⟩ + +private theorem k15t8_cover447 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 3], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover449 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p191, Certificates.k15t8p191_check⟩ + +private theorem k15t8_cover448 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1, 2], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover449 + +private theorem k15t8_cover450 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 2, 1], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover451 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 1, 1], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p192, Certificates.k15t8p192_check⟩ + +private theorem k15t8_cover452 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2, 2], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover453 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 3], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover454 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 3, 1], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover455 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 4], HasCheckedCertificate 15 8 ([[], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover457 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 15 8 ([[], [1, 1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p193, Certificates.k15t8p193_check⟩ + +private theorem k15t8_cover458 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 15 8 ([[], [1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover459 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 8 ([[], [1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover456 : ∀ P ∈ pathPatterns 3 3 [1, 1, 2], HasCheckedCertificate 15 8 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k15t8_cover457 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover458 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover459 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover461 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 8 ([[], [1, 1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p194, Certificates.k15t8p194_check⟩ + +private theorem k15t8_cover460 : ∀ P ∈ pathPatterns 2 2 [1, 1, 2, 1], HasCheckedCertificate 15 8 ([[], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover461 + +private theorem k15t8_cover462 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 1, 1], HasCheckedCertificate 15 8 ([[], [1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover463 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1, 2], HasCheckedCertificate 15 8 ([[], [1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover464 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2, 2], HasCheckedCertificate 15 8 ([[], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover465 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 2, 1], HasCheckedCertificate 15 8 ([[], [1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover466 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 3], HasCheckedCertificate 15 8 ([[], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover468 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 15 8 ([[], [1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover467 : ∀ P ∈ pathPatterns 3 2 [1, 1, 3], HasCheckedCertificate 15 8 ([[], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover468 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover469 : ∀ P ∈ pathPatterns 2 1 [1, 1, 3, 1], HasCheckedCertificate 15 8 ([[], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover470 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 1, 1], HasCheckedCertificate 15 8 ([[], [1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover471 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3, 2], HasCheckedCertificate 15 8 ([[], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover472 : ∀ P ∈ pathPatterns 3 1 [1, 1, 4], HasCheckedCertificate 15 8 ([[], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover473 : ∀ P ∈ pathPatterns 2 0 [1, 1, 4, 1], HasCheckedCertificate 15 8 ([[], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover474 : ∀ P ∈ pathPatterns 3 0 [1, 1, 5], HasCheckedCertificate 15 8 ([[], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq410 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1, 1] ++ tail).length) (7 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 15 8 ([[]] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover411 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover432 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover439 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover442 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover443 + · exact by + intro _ + exact k15t8_cover444 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover445 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover446 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover447 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover448 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover450 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover451 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover452 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover453 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover454 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover455 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover456 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover460 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover462 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 2, 1, 1, 1] ∧ LexLE [1, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover463 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover464 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover465 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover466 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover467 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover469 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover470 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover471 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover472 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover473 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover474 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover476 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 15 8 ([[], [1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover477 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 15 8 ([[], [1, 2], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p195, Certificates.k15t8p195_check⟩ + +private theorem k15t8_cover478 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 15 8 ([[], [1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover480 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 8 ([[], [1, 2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p196, Certificates.k15t8p196_check⟩ + +private theorem k15t8_cover479 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 15 8 ([[], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover480 + +private theorem k15t8_cover481 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 15 8 ([[], [1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover482 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 15 8 ([[], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover483 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 15 8 ([[], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover475 : ∀ P ∈ pathPatterns 4 4 [1, 2], HasCheckedCertificate 15 8 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover476 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover477 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover478 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover479 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover481 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover482 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover483 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover485 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 15 8 ([[], [1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover486 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 8 ([[], [1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover484 : ∀ P ∈ pathPatterns 3 3 [1, 2, 1], HasCheckedCertificate 15 8 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover485 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover486 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover487 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 1, 2], HasCheckedCertificate 15 8 ([[], [1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover488 : ∀ P ∈ pathPatterns 2 1 [1, 2, 1, 2], HasCheckedCertificate 15 8 ([[], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover489 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 2, 1], HasCheckedCertificate 15 8 ([[], [1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover490 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 3], HasCheckedCertificate 15 8 ([[], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover492 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 15 8 ([[], [1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover491 : ∀ P ∈ pathPatterns 3 2 [1, 2, 2], HasCheckedCertificate 15 8 ([[], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover492 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover493 : ∀ P ∈ pathPatterns 2 1 [1, 2, 2, 1], HasCheckedCertificate 15 8 ([[], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover494 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2, 2], HasCheckedCertificate 15 8 ([[], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover495 : ∀ P ∈ pathPatterns 3 1 [1, 2, 3], HasCheckedCertificate 15 8 ([[], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover496 : ∀ P ∈ pathPatterns 2 0 [1, 2, 3, 1], HasCheckedCertificate 15 8 ([[], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover497 : ∀ P ∈ pathPatterns 3 0 [1, 2, 4], HasCheckedCertificate 15 8 ([[], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover499 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 15 8 ([[], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover500 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 15 8 ([[], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover498 : ∀ P ∈ pathPatterns 4 3 [1, 3], HasCheckedCertificate 15 8 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover499 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover500 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover502 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 15 8 ([[], [1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover501 : ∀ P ∈ pathPatterns 3 2 [1, 3, 1], HasCheckedCertificate 15 8 ([[], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover502 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover503 : ∀ P ∈ pathPatterns 2 0 [1, 3, 1, 2], HasCheckedCertificate 15 8 ([[], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover504 : ∀ P ∈ pathPatterns 3 1 [1, 3, 2], HasCheckedCertificate 15 8 ([[], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover505 : ∀ P ∈ pathPatterns 3 0 [1, 3, 3], HasCheckedCertificate 15 8 ([[], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover507 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 15 8 ([[], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover506 : ∀ P ∈ pathPatterns 4 2 [1, 4], HasCheckedCertificate 15 8 ([[], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover507 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover508 : ∀ P ∈ pathPatterns 3 1 [1, 4, 1], HasCheckedCertificate 15 8 ([[], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover509 : ∀ P ∈ pathPatterns 3 0 [1, 4, 2], HasCheckedCertificate 15 8 ([[], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover510 : ∀ P ∈ pathPatterns 4 1 [1, 5], HasCheckedCertificate 15 8 ([[], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover511 : ∀ P ∈ pathPatterns 3 0 [1, 5, 1], HasCheckedCertificate 15 8 ([[], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover512 : ∀ P ∈ pathPatterns 4 0 [1, 6], HasCheckedCertificate 15 8 ([[], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq347 : amountSequenceForall 5 6 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1] ++ tail).length) (7 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 15 8 ([[]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover348 + · intro q + fin_cases q + · exact k15t8_seq410 + + · exact by + constructor + · exact by + intro _ + exact k15t8_cover475 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover484 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover487 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover488 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover489 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover490 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover491 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover493 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover494 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover495 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover496 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover497 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover498 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover501 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover503 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover504 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover505 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover506 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover508 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover509 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover510 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover511 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover512 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover517 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 15 8 ([[], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover518 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 8 ([[], [2], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover516 : ∀ P ∈ pathPatterns 3 3 [2], HasCheckedCertificate 15 8 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover517 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover518 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover519 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2], HasCheckedCertificate 15 8 ([[], [2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover520 : ∀ P ∈ pathPatterns 2 1 [2, 2], HasCheckedCertificate 15 8 ([[], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover521 : ∀ P ∈ pathPatterns 2 0 [2, 3], HasCheckedCertificate 15 8 ([[], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover522 : ∀ P ∈ pathPatterns 3 2 [3], HasCheckedCertificate 15 8 ([[], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover523 : ∀ P ∈ pathPatterns 3 1 [4], HasCheckedCertificate 15 8 ([[], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover524 : ∀ P ∈ pathPatterns 3 0 [5], HasCheckedCertificate 15 8 ([[], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq515 : amountSequenceForall 4 5 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 8 ([[], [2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover516 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover519 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover520 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover521 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover522 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover523 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover524 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover514 : ∀ P ∈ pathPatterns 5 5 [2], HasCheckedCertificate 15 8 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact k15t8_seq515 + + +private theorem k15t8_cover525 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 1, 2], HasCheckedCertificate 15 8 ([[], [2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover526 : ∀ P ∈ pathPatterns 2 1 [2, 1, 1, 2], HasCheckedCertificate 15 8 ([[], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover527 : ∀ P ∈ pathPatterns 2 0 [2, 1, 1, 3], HasCheckedCertificate 15 8 ([[], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover528 : ∀ P ∈ pathPatterns 3 2 [2, 1, 2], HasCheckedCertificate 15 8 ([[], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover529 : ∀ P ∈ pathPatterns 2 0 [2, 1, 2, 2], HasCheckedCertificate 15 8 ([[], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover530 : ∀ P ∈ pathPatterns 3 1 [2, 1, 3], HasCheckedCertificate 15 8 ([[], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover531 : ∀ P ∈ pathPatterns 3 0 [2, 1, 4], HasCheckedCertificate 15 8 ([[], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover533 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 15 8 ([[], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover532 : ∀ P ∈ pathPatterns 4 3 [2, 2], HasCheckedCertificate 15 8 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover533 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover534 : ∀ P ∈ pathPatterns 3 1 [2, 2, 2], HasCheckedCertificate 15 8 ([[], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover535 : ∀ P ∈ pathPatterns 3 0 [2, 2, 3], HasCheckedCertificate 15 8 ([[], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover536 : ∀ P ∈ pathPatterns 4 2 [2, 3], HasCheckedCertificate 15 8 ([[], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover537 : ∀ P ∈ pathPatterns 3 0 [2, 3, 2], HasCheckedCertificate 15 8 ([[], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover538 : ∀ P ∈ pathPatterns 4 1 [2, 4], HasCheckedCertificate 15 8 ([[], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover539 : ∀ P ∈ pathPatterns 4 0 [2, 5], HasCheckedCertificate 15 8 ([[], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq513 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([2] ++ tail).length) (7 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 15 8 ([[]] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover514 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover525 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover526 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover527 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover528 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover529 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover530 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover531 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover532 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover534 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover535 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover536 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover537 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover538 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover539 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover541 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 15 8 ([[], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover542 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 15 8 ([[], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover540 : ∀ P ∈ pathPatterns 5 4 [3], HasCheckedCertificate 15 8 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover541 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover542 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover543 : ∀ P ∈ pathPatterns 3 0 [3, 1, 3], HasCheckedCertificate 15 8 ([[], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover544 : ∀ P ∈ pathPatterns 4 1 [3, 3], HasCheckedCertificate 15 8 ([[], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover545 : ∀ P ∈ pathPatterns 4 0 [3, 4], HasCheckedCertificate 15 8 ([[], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover546 : ∀ P ∈ pathPatterns 5 3 [4], HasCheckedCertificate 15 8 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover547 : ∀ P ∈ pathPatterns 5 2 [5], HasCheckedCertificate 15 8 ([[], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover548 : ∀ P ∈ pathPatterns 5 1 [6], HasCheckedCertificate 15 8 ([[], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover549 : ∀ P ∈ pathPatterns 5 0 [7], HasCheckedCertificate 15 8 ([[], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq4 : amountSequenceForall 6 7 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 8 ([[]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover5 + · intro q + fin_cases q + · exact k15t8_seq347 + + · exact k15t8_seq513 + + · exact by + constructor + · exact by + intro _ + exact k15t8_cover540 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover543 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover544 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover545 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover546 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover547 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover548 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover549 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover3 : ∀ P ∈ pathPatterns 7 7 [], HasCheckedCertificate 15 8 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact k15t8_seq4 + + +private theorem k15t8_cover557 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 15 8 ([[1], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p197, Certificates.k15t8p197_check⟩ + +private theorem k15t8_cover558 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 15 8 ([[1], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p198, Certificates.k15t8p198_check⟩ + +private theorem k15t8_cover559 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 15 8 ([[1], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p199, Certificates.k15t8p199_check⟩ + +private theorem k15t8_cover560 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 15 8 ([[1], [1], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p200, Certificates.k15t8p200_check⟩ + +private theorem k15t8_cover556 : ∀ P ∈ pathPatterns 2 4 [1], HasCheckedCertificate 15 8 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover557 + · exact by + intro _ + exact k15t8_cover558 + · exact by + intro _ + exact k15t8_cover559 + · exact by + intro _ + exact k15t8_cover560 + +private theorem k15t8_cover561 : ∀ P ∈ pathPatterns 1 3 [1, 1], HasCheckedCertificate 15 8 ([[1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover562 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1], HasCheckedCertificate 15 8 ([[1], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p201, Certificates.k15t8p201_check⟩ + +private theorem k15t8_cover563 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2], HasCheckedCertificate 15 8 ([[1], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p202, Certificates.k15t8p202_check⟩ + +private theorem k15t8_cover564 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3], HasCheckedCertificate 15 8 ([[1], [1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p203, Certificates.k15t8p203_check⟩ + +private theorem k15t8_cover565 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 15 8 ([[1], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover566 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 15 8 ([[1], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p204, Certificates.k15t8p204_check⟩ + +private theorem k15t8_cover567 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 15 8 ([[1], [1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p205, Certificates.k15t8p205_check⟩ + +private theorem k15t8_cover568 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 15 8 ([[1], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover569 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 15 8 ([[1], [1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p206, Certificates.k15t8p206_check⟩ + +private theorem k15t8_cover570 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 15 8 ([[1], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover572 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 8 ([[1], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p207, Certificates.k15t8p207_check⟩ + +private theorem k15t8_cover573 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 8 ([[1], [1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p208, Certificates.k15t8p208_check⟩ + +private theorem k15t8_cover571 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 15 8 ([[1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover572 + · exact by + intro _ + exact k15t8_cover573 + +private theorem k15t8_cover574 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 15 8 ([[1], [1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p209, Certificates.k15t8p209_check⟩ + +private theorem k15t8_cover575 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 15 8 ([[1], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover576 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 15 8 ([[1], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover577 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 15 8 ([[1], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k15t8_cover578 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 15 8 ([[1], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover579 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 15 8 ([[1], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq555 : amountSequenceForall 3 5 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 8 ([[1], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover556 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover561 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover562 + · exact by + intro _ + exact k15t8_cover563 + · exact by + intro _ + exact k15t8_cover564 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover565 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover566 + · exact by + intro _ + exact k15t8_cover567 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover568 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover569 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover570 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover571 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k15t8_cover574 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover575 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover576 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover577 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover578 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover579 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover554 : ∀ P ∈ pathPatterns 4 5 [1], HasCheckedCertificate 15 8 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k15t8_seq555 + + +private theorem k15t8_cover581 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 15 8 ([[1], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p210, Certificates.k15t8p210_check⟩ + +private theorem k15t8_cover582 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 15 8 ([[1], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p211, Certificates.k15t8p211_check⟩ + +private theorem k15t8_cover583 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 15 8 ([[1], [1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p212, Certificates.k15t8p212_check⟩ + +private theorem k15t8_cover584 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 15 8 ([[1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover585 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 15 8 ([[1], [1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p213, Certificates.k15t8p213_check⟩ + +private theorem k15t8_cover586 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 15 8 ([[1], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover587 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 15 8 ([[1], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover580 : ∀ P ∈ pathPatterns 3 4 [1, 1], HasCheckedCertificate 15 8 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover581 + · exact by + intro _ + exact k15t8_cover582 + · exact by + intro _ + exact k15t8_cover583 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover584 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k15t8_cover585 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover586 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover587 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover589 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 8 ([[1], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p214, Certificates.k15t8p214_check⟩ + +private theorem k15t8_cover590 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 8 ([[1], [1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p215, Certificates.k15t8p215_check⟩ + +private theorem k15t8_cover588 : ∀ P ∈ pathPatterns 2 3 [1, 1, 1], HasCheckedCertificate 15 8 ([[1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover589 + · exact by + intro _ + exact k15t8_cover590 + +private theorem k15t8_cover591 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 1], HasCheckedCertificate 15 8 ([[1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover592 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 1], HasCheckedCertificate 15 8 ([[1], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p216, Certificates.k15t8p216_check⟩ + +private theorem k15t8_cover593 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 2], HasCheckedCertificate 15 8 ([[1], [1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p217, Certificates.k15t8p217_check⟩ + +private theorem k15t8_cover594 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 2], HasCheckedCertificate 15 8 ([[1], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover595 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 1], HasCheckedCertificate 15 8 ([[1], [1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p218, Certificates.k15t8p218_check⟩ + +private theorem k15t8_cover596 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 3], HasCheckedCertificate 15 8 ([[1], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover598 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 8 ([[1], [1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p219, Certificates.k15t8p219_check⟩ + +private theorem k15t8_cover597 : ∀ P ∈ pathPatterns 2 2 [1, 1, 2], HasCheckedCertificate 15 8 ([[1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover598 + +private theorem k15t8_cover599 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 1], HasCheckedCertificate 15 8 ([[1], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover600 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 1], HasCheckedCertificate 15 8 ([[1], [1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p220, Certificates.k15t8p220_check⟩ + +private theorem k15t8_cover601 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 2], HasCheckedCertificate 15 8 ([[1], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover602 : ∀ P ∈ pathPatterns 2 1 [1, 1, 3], HasCheckedCertificate 15 8 ([[1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover603 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 1], HasCheckedCertificate 15 8 ([[1], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover604 : ∀ P ∈ pathPatterns 2 0 [1, 1, 4], HasCheckedCertificate 15 8 ([[1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover606 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 15 8 ([[1], [1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p221, Certificates.k15t8p221_check⟩ + +private theorem k15t8_cover607 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 15 8 ([[1], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover608 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 8 ([[1], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover605 : ∀ P ∈ pathPatterns 3 3 [1, 2], HasCheckedCertificate 15 8 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k15t8_cover606 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover607 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover608 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover610 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 8 ([[1], [1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p222, Certificates.k15t8p222_check⟩ + +private theorem k15t8_cover609 : ∀ P ∈ pathPatterns 2 2 [1, 2, 1], HasCheckedCertificate 15 8 ([[1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover610 + +private theorem k15t8_cover611 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 2], HasCheckedCertificate 15 8 ([[1], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover612 : ∀ P ∈ pathPatterns 2 1 [1, 2, 2], HasCheckedCertificate 15 8 ([[1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover613 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 1], HasCheckedCertificate 15 8 ([[1], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover614 : ∀ P ∈ pathPatterns 2 0 [1, 2, 3], HasCheckedCertificate 15 8 ([[1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover616 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 15 8 ([[1], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover615 : ∀ P ∈ pathPatterns 3 2 [1, 3], HasCheckedCertificate 15 8 ([[1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover616 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover617 : ∀ P ∈ pathPatterns 2 1 [1, 3, 1], HasCheckedCertificate 15 8 ([[1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover618 : ∀ P ∈ pathPatterns 2 0 [1, 3, 2], HasCheckedCertificate 15 8 ([[1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover619 : ∀ P ∈ pathPatterns 3 1 [1, 4], HasCheckedCertificate 15 8 ([[1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover620 : ∀ P ∈ pathPatterns 2 0 [1, 4, 1], HasCheckedCertificate 15 8 ([[1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover621 : ∀ P ∈ pathPatterns 3 0 [1, 5], HasCheckedCertificate 15 8 ([[1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq553 : amountSequenceForall 4 5 (fun tail => + (LexLE [1] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 15 8 ([[1]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover554 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover580 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover588 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover591 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover592 + · exact by + intro _ + exact k15t8_cover593 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover594 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover595 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover596 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover597 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover599 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover600 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover601 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover602 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover603 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover604 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover605 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover609 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover611 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover612 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover613 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover614 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover615 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover617 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover618 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover619 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover620 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover621 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover624 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 8 ([[1], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p223, Certificates.k15t8p223_check⟩ + +private theorem k15t8_cover623 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 15 8 ([[1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover624 + +private theorem k15t8_cover625 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 15 8 ([[1], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover626 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 15 8 ([[1], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover627 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 15 8 ([[1], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover622 : ∀ P ∈ pathPatterns 4 4 [2], HasCheckedCertificate 15 8 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover623 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover625 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover626 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover627 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover628 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 2], HasCheckedCertificate 15 8 ([[1], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover629 : ∀ P ∈ pathPatterns 2 1 [2, 1, 2], HasCheckedCertificate 15 8 ([[1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover630 : ∀ P ∈ pathPatterns 2 0 [2, 1, 3], HasCheckedCertificate 15 8 ([[1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover631 : ∀ P ∈ pathPatterns 3 2 [2, 2], HasCheckedCertificate 15 8 ([[1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover632 : ∀ P ∈ pathPatterns 2 0 [2, 2, 2], HasCheckedCertificate 15 8 ([[1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover633 : ∀ P ∈ pathPatterns 3 1 [2, 3], HasCheckedCertificate 15 8 ([[1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover634 : ∀ P ∈ pathPatterns 3 0 [2, 4], HasCheckedCertificate 15 8 ([[1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover636 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 15 8 ([[1], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover635 : ∀ P ∈ pathPatterns 4 3 [3], HasCheckedCertificate 15 8 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover636 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover637 : ∀ P ∈ pathPatterns 3 0 [3, 3], HasCheckedCertificate 15 8 ([[1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover638 : ∀ P ∈ pathPatterns 4 2 [4], HasCheckedCertificate 15 8 ([[1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover639 : ∀ P ∈ pathPatterns 4 1 [5], HasCheckedCertificate 15 8 ([[1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover640 : ∀ P ∈ pathPatterns 4 0 [6], HasCheckedCertificate 15 8 ([[1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq552 : amountSequenceForall 5 6 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 8 ([[1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k15t8_seq553 + + · exact by + constructor + · exact by + intro _ + exact k15t8_cover622 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover628 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover629 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover630 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover631 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover632 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover633 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover634 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover635 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover637 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover638 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover639 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover640 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover551 : ∀ P ∈ pathPatterns 6 6 [1], HasCheckedCertificate 15 8 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact k15t8_seq552 + + +private theorem k15t8_cover645 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 15 8 ([[1, 1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p224, Certificates.k15t8p224_check⟩ + +private theorem k15t8_cover646 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 15 8 ([[1, 1], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p225, Certificates.k15t8p225_check⟩ + +private theorem k15t8_cover644 : ∀ P ∈ pathPatterns 2 3 [1, 1], HasCheckedCertificate 15 8 ([[1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover645 + · exact by + intro _ + exact k15t8_cover646 + +private theorem k15t8_cover647 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1], HasCheckedCertificate 15 8 ([[1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover648 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1], HasCheckedCertificate 15 8 ([[1, 1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p226, Certificates.k15t8p226_check⟩ + +private theorem k15t8_cover649 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2], HasCheckedCertificate 15 8 ([[1, 1], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p227, Certificates.k15t8p227_check⟩ + +private theorem k15t8_cover650 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2], HasCheckedCertificate 15 8 ([[1, 1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover651 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1], HasCheckedCertificate 15 8 ([[1, 1], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p228, Certificates.k15t8p228_check⟩ + +private theorem k15t8_cover652 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3], HasCheckedCertificate 15 8 ([[1, 1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover654 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 8 ([[1, 1], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p229, Certificates.k15t8p229_check⟩ + +private theorem k15t8_cover653 : ∀ P ∈ pathPatterns 2 2 [1, 2], HasCheckedCertificate 15 8 ([[1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover654 + +private theorem k15t8_cover655 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1], HasCheckedCertificate 15 8 ([[1, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover656 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2], HasCheckedCertificate 15 8 ([[1, 1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover657 : ∀ P ∈ pathPatterns 2 1 [1, 3], HasCheckedCertificate 15 8 ([[1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover658 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1], HasCheckedCertificate 15 8 ([[1, 1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover659 : ∀ P ∈ pathPatterns 2 0 [1, 4], HasCheckedCertificate 15 8 ([[1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover661 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 15 8 ([[1, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover662 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 8 ([[1, 1], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover660 : ∀ P ∈ pathPatterns 3 3 [2], HasCheckedCertificate 15 8 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover661 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover662 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover663 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2], HasCheckedCertificate 15 8 ([[1, 1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover664 : ∀ P ∈ pathPatterns 2 1 [2, 2], HasCheckedCertificate 15 8 ([[1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover665 : ∀ P ∈ pathPatterns 2 0 [2, 3], HasCheckedCertificate 15 8 ([[1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover666 : ∀ P ∈ pathPatterns 3 2 [3], HasCheckedCertificate 15 8 ([[1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover667 : ∀ P ∈ pathPatterns 3 1 [4], HasCheckedCertificate 15 8 ([[1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover668 : ∀ P ∈ pathPatterns 3 0 [5], HasCheckedCertificate 15 8 ([[1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq643 : amountSequenceForall 4 5 (fun tail => + (LexLE [1, 1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 8 ([[1, 1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover644 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover647 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover648 + · exact by + intro _ + exact k15t8_cover649 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover650 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover651 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover652 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover653 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover655 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover656 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover657 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover658 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover659 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover660 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover663 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover664 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover665 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover666 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover667 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover668 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover642 : ∀ P ∈ pathPatterns 5 5 [1, 1], HasCheckedCertificate 15 8 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact k15t8_seq643 + + +private theorem k15t8_cover670 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1], HasCheckedCertificate 15 8 ([[1, 1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p230, Certificates.k15t8p230_check⟩ + +private theorem k15t8_cover671 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2], HasCheckedCertificate 15 8 ([[1, 1, 1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p231, Certificates.k15t8p231_check⟩ + +private theorem k15t8_cover672 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 15 8 ([[1, 1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover673 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 15 8 ([[1, 1, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p232, Certificates.k15t8p232_check⟩ + +private theorem k15t8_cover674 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 15 8 ([[1, 1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover676 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 8 ([[1, 1, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p233, Certificates.k15t8p233_check⟩ + +private theorem k15t8_cover675 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 15 8 ([[1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover676 + +private theorem k15t8_cover677 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 15 8 ([[1, 1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover678 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 15 8 ([[1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover679 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 15 8 ([[1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover669 : ∀ P ∈ pathPatterns 4 4 [1, 1, 1], HasCheckedCertificate 15 8 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover670 + · exact by + intro _ + exact k15t8_cover671 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover672 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover673 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover674 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover675 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover677 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover678 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover679 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover681 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 15 8 ([[1, 1, 1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p234, Certificates.k15t8p234_check⟩ + +private theorem k15t8_cover682 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 15 8 ([[1, 1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover683 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 15 8 ([[1, 1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover680 : ∀ P ∈ pathPatterns 3 3 [1, 1, 1, 1], HasCheckedCertificate 15 8 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k15t8_cover681 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover682 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover683 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover685 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 15 8 ([[1, 1, 1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p235, Certificates.k15t8p235_check⟩ + +private theorem k15t8_cover684 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1, 1, 1], HasCheckedCertificate 15 8 ([[1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k15t8_cover685 + +private theorem k15t8_cover686 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1, 1, 1], HasCheckedCertificate 15 8 ([[1, 1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover687 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1, 1, 1], HasCheckedCertificate 15 8 ([[1, 1, 1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k15t8p236, Certificates.k15t8p236_check⟩ + +private theorem k15t8_cover688 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 1, 2], HasCheckedCertificate 15 8 ([[1, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover689 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 1, 2], HasCheckedCertificate 15 8 ([[1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover690 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 2, 1], HasCheckedCertificate 15 8 ([[1, 1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover691 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 1, 3], HasCheckedCertificate 15 8 ([[1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover693 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 15 8 ([[1, 1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover692 : ∀ P ∈ pathPatterns 3 2 [1, 1, 1, 2], HasCheckedCertificate 15 8 ([[1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover693 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover694 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 2, 1], HasCheckedCertificate 15 8 ([[1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover695 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2, 1, 1], HasCheckedCertificate 15 8 ([[1, 1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover696 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 2, 2], HasCheckedCertificate 15 8 ([[1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover697 : ∀ P ∈ pathPatterns 3 1 [1, 1, 1, 3], HasCheckedCertificate 15 8 ([[1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover698 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 3, 1], HasCheckedCertificate 15 8 ([[1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover699 : ∀ P ∈ pathPatterns 3 0 [1, 1, 1, 4], HasCheckedCertificate 15 8 ([[1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover701 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 15 8 ([[1, 1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover702 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 15 8 ([[1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover703 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 15 8 ([[1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover700 : ∀ P ∈ pathPatterns 4 3 [1, 1, 2], HasCheckedCertificate 15 8 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover701 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover702 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover703 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover705 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 15 8 ([[1, 1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover704 : ∀ P ∈ pathPatterns 3 2 [1, 1, 2, 1], HasCheckedCertificate 15 8 ([[1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover705 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover706 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2, 1, 1], HasCheckedCertificate 15 8 ([[1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover707 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 1, 2], HasCheckedCertificate 15 8 ([[1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover708 : ∀ P ∈ pathPatterns 3 1 [1, 1, 2, 2], HasCheckedCertificate 15 8 ([[1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover709 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 2, 1], HasCheckedCertificate 15 8 ([[1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover710 : ∀ P ∈ pathPatterns 3 0 [1, 1, 2, 3], HasCheckedCertificate 15 8 ([[1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover712 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 15 8 ([[1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover711 : ∀ P ∈ pathPatterns 4 2 [1, 1, 3], HasCheckedCertificate 15 8 ([[1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover712 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover713 : ∀ P ∈ pathPatterns 3 1 [1, 1, 3, 1], HasCheckedCertificate 15 8 ([[1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover714 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3, 1, 1], HasCheckedCertificate 15 8 ([[1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover715 : ∀ P ∈ pathPatterns 3 0 [1, 1, 3, 2], HasCheckedCertificate 15 8 ([[1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover716 : ∀ P ∈ pathPatterns 4 1 [1, 1, 4], HasCheckedCertificate 15 8 ([[1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover717 : ∀ P ∈ pathPatterns 3 0 [1, 1, 4, 1], HasCheckedCertificate 15 8 ([[1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover718 : ∀ P ∈ pathPatterns 4 0 [1, 1, 5], HasCheckedCertificate 15 8 ([[1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq641 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([1, 1] ++ tail).length) (7 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 15 8 ([] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover642 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover669 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover680 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover684 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover686 + · intro q + fin_cases q + · exact by + intro _ + exact k15t8_cover687 + · exact by + constructor + · exact by + intro _ + exact k15t8_cover688 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover689 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover690 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover691 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover692 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover694 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover695 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover696 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover697 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover698 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover699 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover700 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover704 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover706 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 2, 1, 1, 1] ∧ LexLE [1, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover707 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover708 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover709 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover710 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover711 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover713 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover714 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover715 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover716 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover717 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover718 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover720 : ∀ P ∈ pathPatterns 2 1 [1, 2], HasCheckedCertificate 15 8 ([[1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover721 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1], HasCheckedCertificate 15 8 ([[1, 2], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover722 : ∀ P ∈ pathPatterns 2 0 [1, 3], HasCheckedCertificate 15 8 ([[1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover724 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 15 8 ([[1, 2], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k15t8_cover723 : ∀ P ∈ pathPatterns 3 2 [2], HasCheckedCertificate 15 8 ([[1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k15t8_cover724 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover725 : ∀ P ∈ pathPatterns 2 0 [2, 2], HasCheckedCertificate 15 8 ([[1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover726 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 15 8 ([[1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover727 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 15 8 ([[1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover719 : ∀ P ∈ pathPatterns 5 4 [1, 2], HasCheckedCertificate 15 8 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover720 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover721 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover722 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover723 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover725 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover726 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover727 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover729 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 15 8 ([[1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover730 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 15 8 ([[1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover728 : ∀ P ∈ pathPatterns 4 3 [1, 2, 1], HasCheckedCertificate 15 8 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover729 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover730 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover731 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 1, 2], HasCheckedCertificate 15 8 ([[1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover732 : ∀ P ∈ pathPatterns 3 1 [1, 2, 1, 2], HasCheckedCertificate 15 8 ([[1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover733 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 2, 1], HasCheckedCertificate 15 8 ([[1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover734 : ∀ P ∈ pathPatterns 3 0 [1, 2, 1, 3], HasCheckedCertificate 15 8 ([[1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover736 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 15 8 ([[1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover735 : ∀ P ∈ pathPatterns 4 2 [1, 2, 2], HasCheckedCertificate 15 8 ([[1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover736 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover737 : ∀ P ∈ pathPatterns 3 1 [1, 2, 2, 1], HasCheckedCertificate 15 8 ([[1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover738 : ∀ P ∈ pathPatterns 3 0 [1, 2, 2, 2], HasCheckedCertificate 15 8 ([[1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover739 : ∀ P ∈ pathPatterns 4 1 [1, 2, 3], HasCheckedCertificate 15 8 ([[1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover740 : ∀ P ∈ pathPatterns 3 0 [1, 2, 3, 1], HasCheckedCertificate 15 8 ([[1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover741 : ∀ P ∈ pathPatterns 4 0 [1, 2, 4], HasCheckedCertificate 15 8 ([[1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover743 : ∀ P ∈ pathPatterns 3 1 [2], HasCheckedCertificate 15 8 ([[1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover744 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 15 8 ([[1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover742 : ∀ P ∈ pathPatterns 5 3 [1, 3], HasCheckedCertificate 15 8 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover743 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover744 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover746 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 15 8 ([[1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover745 : ∀ P ∈ pathPatterns 4 2 [1, 3, 1], HasCheckedCertificate 15 8 ([[1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover746 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover747 : ∀ P ∈ pathPatterns 3 0 [1, 3, 1, 2], HasCheckedCertificate 15 8 ([[1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover748 : ∀ P ∈ pathPatterns 4 1 [1, 3, 2], HasCheckedCertificate 15 8 ([[1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover749 : ∀ P ∈ pathPatterns 4 0 [1, 3, 3], HasCheckedCertificate 15 8 ([[1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover751 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 15 8 ([[1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover750 : ∀ P ∈ pathPatterns 5 2 [1, 4], HasCheckedCertificate 15 8 ([[1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover751 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover752 : ∀ P ∈ pathPatterns 4 1 [1, 4, 1], HasCheckedCertificate 15 8 ([[1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover753 : ∀ P ∈ pathPatterns 4 0 [1, 4, 2], HasCheckedCertificate 15 8 ([[1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover754 : ∀ P ∈ pathPatterns 5 1 [1, 5], HasCheckedCertificate 15 8 ([[1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover755 : ∀ P ∈ pathPatterns 4 0 [1, 5, 1], HasCheckedCertificate 15 8 ([[1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover756 : ∀ P ∈ pathPatterns 5 0 [1, 6], HasCheckedCertificate 15 8 ([[1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq550 : amountSequenceForall 6 6 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([1] ++ tail).length) (7 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 15 8 ([] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover551 + · intro q + fin_cases q + · exact k15t8_seq641 + + · exact by + constructor + · exact by + intro _ + exact k15t8_cover719 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover728 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover731 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover732 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover733 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover734 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover735 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover737 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover738 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover739 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover740 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover741 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover742 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover745 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover747 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover748 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover749 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover750 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover752 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover753 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover754 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover755 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover756 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover761 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 15 8 ([[2], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k15t8_cover762 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 15 8 ([[2], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover760 : ∀ P ∈ pathPatterns 4 3 [2], HasCheckedCertificate 15 8 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover761 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover762 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover763 : ∀ P ∈ pathPatterns 2 0 [2, 1, 2], HasCheckedCertificate 15 8 ([[2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover764 : ∀ P ∈ pathPatterns 3 1 [2, 2], HasCheckedCertificate 15 8 ([[2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover765 : ∀ P ∈ pathPatterns 3 0 [2, 3], HasCheckedCertificate 15 8 ([[2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover766 : ∀ P ∈ pathPatterns 4 2 [3], HasCheckedCertificate 15 8 ([[2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover767 : ∀ P ∈ pathPatterns 4 1 [4], HasCheckedCertificate 15 8 ([[2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover768 : ∀ P ∈ pathPatterns 4 0 [5], HasCheckedCertificate 15 8 ([[2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq759 : amountSequenceForall 5 5 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 8 ([[2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1, 1] [1, 1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover760 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover763 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover764 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover765 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover766 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover767 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover768 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover758 : ∀ P ∈ pathPatterns 6 5 [2], HasCheckedCertificate 15 8 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact k15t8_seq759 + + +private theorem k15t8_cover769 : ∀ P ∈ pathPatterns 2 0 [2, 1, 1, 1, 2], HasCheckedCertificate 15 8 ([[2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover770 : ∀ P ∈ pathPatterns 3 1 [2, 1, 1, 2], HasCheckedCertificate 15 8 ([[2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover771 : ∀ P ∈ pathPatterns 3 0 [2, 1, 1, 3], HasCheckedCertificate 15 8 ([[2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover772 : ∀ P ∈ pathPatterns 4 2 [2, 1, 2], HasCheckedCertificate 15 8 ([[2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover773 : ∀ P ∈ pathPatterns 3 0 [2, 1, 2, 2], HasCheckedCertificate 15 8 ([[2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover774 : ∀ P ∈ pathPatterns 4 1 [2, 1, 3], HasCheckedCertificate 15 8 ([[2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover775 : ∀ P ∈ pathPatterns 4 0 [2, 1, 4], HasCheckedCertificate 15 8 ([[2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover777 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 15 8 ([[2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover776 : ∀ P ∈ pathPatterns 5 3 [2, 2], HasCheckedCertificate 15 8 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover777 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover778 : ∀ P ∈ pathPatterns 4 1 [2, 2, 2], HasCheckedCertificate 15 8 ([[2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover779 : ∀ P ∈ pathPatterns 4 0 [2, 2, 3], HasCheckedCertificate 15 8 ([[2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover780 : ∀ P ∈ pathPatterns 5 2 [2, 3], HasCheckedCertificate 15 8 ([[2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover781 : ∀ P ∈ pathPatterns 4 0 [2, 3, 2], HasCheckedCertificate 15 8 ([[2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover782 : ∀ P ∈ pathPatterns 5 1 [2, 4], HasCheckedCertificate 15 8 ([[2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover783 : ∀ P ∈ pathPatterns 5 0 [2, 5], HasCheckedCertificate 15 8 ([[2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq757 : amountSequenceForall 6 5 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([2] ++ tail).length) (7 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 15 8 ([] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover758 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover769 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover770 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover771 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover772 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover773 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover774 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover775 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover776 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover778 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover779 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover780 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover781 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover782 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover783 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover785 : ∀ P ∈ pathPatterns 4 1 [3], HasCheckedCertificate 15 8 ([[3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover786 : ∀ P ∈ pathPatterns 4 0 [4], HasCheckedCertificate 15 8 ([[3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover784 : ∀ P ∈ pathPatterns 6 4 [3], HasCheckedCertificate 15 8 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover785 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover786 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover787 : ∀ P ∈ pathPatterns 4 0 [3, 1, 3], HasCheckedCertificate 15 8 ([[3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover788 : ∀ P ∈ pathPatterns 5 1 [3, 3], HasCheckedCertificate 15 8 ([[3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover789 : ∀ P ∈ pathPatterns 5 0 [3, 4], HasCheckedCertificate 15 8 ([[3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover790 : ∀ P ∈ pathPatterns 6 3 [4], HasCheckedCertificate 15 8 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover791 : ∀ P ∈ pathPatterns 6 2 [5], HasCheckedCertificate 15 8 ([[5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover792 : ∀ P ∈ pathPatterns 6 1 [6], HasCheckedCertificate 15 8 ([[6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover793 : ∀ P ∈ pathPatterns 6 0 [7], HasCheckedCertificate 15 8 ([[7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k15t8_seq2 : amountSequenceForall 7 7 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 15 8 ([] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k15t8_cover3 + · intro q + fin_cases q + · exact k15t8_seq550 + + · exact k15t8_seq757 + + · exact by + constructor + · exact by + intro _ + exact k15t8_cover784 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover787 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover788 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover789 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover790 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover791 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover792 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k15t8_cover793 + · intro q + exact Fin.elim0 q + +private theorem k15t8_cover1 : ∀ P ∈ pathPatterns 8 7 [], HasCheckedCertificate 15 8 ([] ++ P) := by + apply pathPatterns_forall_step + exact k15t8_seq2 + + +theorem coverage_k15_t8 : + ∀ P ∈ pathPatterns 8 7, HasCheckedCertificate 15 8 P := + k15t8_cover1 + +end CycleClique.Construction.CertifiedCoverage + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK16.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK16.lean new file mode 100644 index 0000000000000000000000000000000000000000..e9cb14c1bf340f036712c99615edc27544ae51d4 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK16.lean @@ -0,0 +1,25481 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK16 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage + +namespace OAI + +namespace CycleClique.Construction.CertifiedCoverage + +private theorem k16t8_cover15 : ∀ P ∈ pathPatterns 0 8 [], HasCheckedCertificate 16 8 ([[], [], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p0, Certificates.k16t8p0_check⟩ + +private theorem k16t8_cover14 : ∀ P ∈ pathPatterns 1 8 [], HasCheckedCertificate 16 8 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k16t8_cover15 + +private theorem k16t8_cover16 : ∀ P ∈ pathPatterns 0 7 [1], HasCheckedCertificate 16 8 ([[], [], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p1, Certificates.k16t8p1_check⟩ + +private theorem k16t8_cover17 : ∀ P ∈ pathPatterns 0 6 [2], HasCheckedCertificate 16 8 ([[], [], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p2, Certificates.k16t8p2_check⟩ + +private theorem k16t8_cover18 : ∀ P ∈ pathPatterns 0 5 [3], HasCheckedCertificate 16 8 ([[], [], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p3, Certificates.k16t8p3_check⟩ + +private theorem k16t8_cover19 : ∀ P ∈ pathPatterns 0 4 [4], HasCheckedCertificate 16 8 ([[], [], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p4, Certificates.k16t8p4_check⟩ + +private theorem k16t8_cover20 : ∀ P ∈ pathPatterns 0 3 [5], HasCheckedCertificate 16 8 ([[], [], [], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p5, Certificates.k16t8p5_check⟩ + +private theorem k16t8_cover21 : ∀ P ∈ pathPatterns 0 2 [6], HasCheckedCertificate 16 8 ([[], [], [], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p6, Certificates.k16t8p6_check⟩ + +private theorem k16t8_cover22 : ∀ P ∈ pathPatterns 0 1 [7], HasCheckedCertificate 16 8 ([[], [], [], [], [], [], [7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p7, Certificates.k16t8p7_check⟩ + +private theorem k16t8_cover23 : ∀ P ∈ pathPatterns 0 0 [8], HasCheckedCertificate 16 8 ([[], [], [], [], [], [], [8]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p8, Certificates.k16t8p8_check⟩ + +private theorem k16t8_cover13 : ∀ P ∈ pathPatterns 2 8 [], HasCheckedCertificate 16 8 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k16t8_cover14 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover16 + · exact by + intro _ + exact k16t8_cover17 + · exact by + intro _ + exact k16t8_cover18 + · exact by + intro _ + exact k16t8_cover19 + · exact by + intro _ + exact k16t8_cover20 + · exact by + intro _ + exact k16t8_cover21 + · exact by + intro _ + exact k16t8_cover22 + · exact by + intro _ + exact k16t8_cover23 + +private theorem k16t8_cover24 : ∀ P ∈ pathPatterns 1 7 [1], HasCheckedCertificate 16 8 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover25 : ∀ P ∈ pathPatterns 0 6 [1, 1], HasCheckedCertificate 16 8 ([[], [], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p9, Certificates.k16t8p9_check⟩ + +private theorem k16t8_cover26 : ∀ P ∈ pathPatterns 0 5 [1, 2], HasCheckedCertificate 16 8 ([[], [], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p10, Certificates.k16t8p10_check⟩ + +private theorem k16t8_cover27 : ∀ P ∈ pathPatterns 0 4 [1, 3], HasCheckedCertificate 16 8 ([[], [], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p11, Certificates.k16t8p11_check⟩ + +private theorem k16t8_cover28 : ∀ P ∈ pathPatterns 0 3 [1, 4], HasCheckedCertificate 16 8 ([[], [], [], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p12, Certificates.k16t8p12_check⟩ + +private theorem k16t8_cover29 : ∀ P ∈ pathPatterns 0 2 [1, 5], HasCheckedCertificate 16 8 ([[], [], [], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p13, Certificates.k16t8p13_check⟩ + +private theorem k16t8_cover30 : ∀ P ∈ pathPatterns 0 1 [1, 6], HasCheckedCertificate 16 8 ([[], [], [], [], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p14, Certificates.k16t8p14_check⟩ + +private theorem k16t8_cover31 : ∀ P ∈ pathPatterns 0 0 [1, 7], HasCheckedCertificate 16 8 ([[], [], [], [], [], [1, 7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p15, Certificates.k16t8p15_check⟩ + +private theorem k16t8_cover32 : ∀ P ∈ pathPatterns 1 6 [2], HasCheckedCertificate 16 8 ([[], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover33 : ∀ P ∈ pathPatterns 0 4 [2, 2], HasCheckedCertificate 16 8 ([[], [], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p16, Certificates.k16t8p16_check⟩ + +private theorem k16t8_cover34 : ∀ P ∈ pathPatterns 0 3 [2, 3], HasCheckedCertificate 16 8 ([[], [], [], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p17, Certificates.k16t8p17_check⟩ + +private theorem k16t8_cover35 : ∀ P ∈ pathPatterns 0 2 [2, 4], HasCheckedCertificate 16 8 ([[], [], [], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p18, Certificates.k16t8p18_check⟩ + +private theorem k16t8_cover36 : ∀ P ∈ pathPatterns 0 1 [2, 5], HasCheckedCertificate 16 8 ([[], [], [], [], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p19, Certificates.k16t8p19_check⟩ + +private theorem k16t8_cover37 : ∀ P ∈ pathPatterns 0 0 [2, 6], HasCheckedCertificate 16 8 ([[], [], [], [], [], [2, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p20, Certificates.k16t8p20_check⟩ + +private theorem k16t8_cover38 : ∀ P ∈ pathPatterns 1 5 [3], HasCheckedCertificate 16 8 ([[], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover39 : ∀ P ∈ pathPatterns 0 2 [3, 3], HasCheckedCertificate 16 8 ([[], [], [], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p21, Certificates.k16t8p21_check⟩ + +private theorem k16t8_cover40 : ∀ P ∈ pathPatterns 0 1 [3, 4], HasCheckedCertificate 16 8 ([[], [], [], [], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p22, Certificates.k16t8p22_check⟩ + +private theorem k16t8_cover41 : ∀ P ∈ pathPatterns 0 0 [3, 5], HasCheckedCertificate 16 8 ([[], [], [], [], [], [3, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p23, Certificates.k16t8p23_check⟩ + +private theorem k16t8_cover42 : ∀ P ∈ pathPatterns 1 4 [4], HasCheckedCertificate 16 8 ([[], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover43 : ∀ P ∈ pathPatterns 0 0 [4, 4], HasCheckedCertificate 16 8 ([[], [], [], [], [], [4, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p24, Certificates.k16t8p24_check⟩ + +private theorem k16t8_cover44 : ∀ P ∈ pathPatterns 1 3 [5], HasCheckedCertificate 16 8 ([[], [], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover45 : ∀ P ∈ pathPatterns 1 2 [6], HasCheckedCertificate 16 8 ([[], [], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover46 : ∀ P ∈ pathPatterns 1 1 [7], HasCheckedCertificate 16 8 ([[], [], [], [], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover47 : ∀ P ∈ pathPatterns 1 0 [8], HasCheckedCertificate 16 8 ([[], [], [], [], [], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + +private theorem k16t8_seq12 : amountSequenceForall 2 8 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (2 - ([] ++ tail).length) (8 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[], [], [], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover13 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover24 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover25 + · exact by + intro _ + exact k16t8_cover26 + · exact by + intro _ + exact k16t8_cover27 + · exact by + intro _ + exact k16t8_cover28 + · exact by + intro _ + exact k16t8_cover29 + · exact by + intro _ + exact k16t8_cover30 + · exact by + intro _ + exact k16t8_cover31 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover32 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover33 + · exact by + intro _ + exact k16t8_cover34 + · exact by + intro _ + exact k16t8_cover35 + · exact by + intro _ + exact k16t8_cover36 + · exact by + intro _ + exact k16t8_cover37 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover38 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k16t8_cover39 + · exact by + intro _ + exact k16t8_cover40 + · exact by + intro _ + exact k16t8_cover41 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover42 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · exact by + intro _ + exact k16t8_cover43 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover44 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover45 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover46 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover47 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover11 : ∀ P ∈ pathPatterns 3 8 [], HasCheckedCertificate 16 8 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq12 + + +private theorem k16t8_cover50 : ∀ P ∈ pathPatterns 0 6 [1], HasCheckedCertificate 16 8 ([[], [], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p25, Certificates.k16t8p25_check⟩ + +private theorem k16t8_cover51 : ∀ P ∈ pathPatterns 0 5 [2], HasCheckedCertificate 16 8 ([[], [], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p26, Certificates.k16t8p26_check⟩ + +private theorem k16t8_cover52 : ∀ P ∈ pathPatterns 0 4 [3], HasCheckedCertificate 16 8 ([[], [], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p27, Certificates.k16t8p27_check⟩ + +private theorem k16t8_cover53 : ∀ P ∈ pathPatterns 0 3 [4], HasCheckedCertificate 16 8 ([[], [], [], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p28, Certificates.k16t8p28_check⟩ + +private theorem k16t8_cover54 : ∀ P ∈ pathPatterns 0 2 [5], HasCheckedCertificate 16 8 ([[], [], [], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p29, Certificates.k16t8p29_check⟩ + +private theorem k16t8_cover55 : ∀ P ∈ pathPatterns 0 1 [6], HasCheckedCertificate 16 8 ([[], [], [], [], [1], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p30, Certificates.k16t8p30_check⟩ + +private theorem k16t8_cover56 : ∀ P ∈ pathPatterns 0 0 [7], HasCheckedCertificate 16 8 ([[], [], [], [], [1], [7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p31, Certificates.k16t8p31_check⟩ + +private theorem k16t8_cover49 : ∀ P ∈ pathPatterns 2 7 [1], HasCheckedCertificate 16 8 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover50 + · exact by + intro _ + exact k16t8_cover51 + · exact by + intro _ + exact k16t8_cover52 + · exact by + intro _ + exact k16t8_cover53 + · exact by + intro _ + exact k16t8_cover54 + · exact by + intro _ + exact k16t8_cover55 + · exact by + intro _ + exact k16t8_cover56 + +private theorem k16t8_cover57 : ∀ P ∈ pathPatterns 1 6 [1, 1], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover58 : ∀ P ∈ pathPatterns 0 5 [1, 1, 1], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p32, Certificates.k16t8p32_check⟩ + +private theorem k16t8_cover59 : ∀ P ∈ pathPatterns 0 4 [1, 1, 2], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p33, Certificates.k16t8p33_check⟩ + +private theorem k16t8_cover60 : ∀ P ∈ pathPatterns 0 3 [1, 1, 3], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p34, Certificates.k16t8p34_check⟩ + +private theorem k16t8_cover61 : ∀ P ∈ pathPatterns 0 2 [1, 1, 4], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p35, Certificates.k16t8p35_check⟩ + +private theorem k16t8_cover62 : ∀ P ∈ pathPatterns 0 1 [1, 1, 5], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p36, Certificates.k16t8p36_check⟩ + +private theorem k16t8_cover63 : ∀ P ∈ pathPatterns 0 0 [1, 1, 6], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p37, Certificates.k16t8p37_check⟩ + +private theorem k16t8_cover64 : ∀ P ∈ pathPatterns 1 5 [1, 2], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover65 : ∀ P ∈ pathPatterns 0 4 [1, 2, 1], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p38, Certificates.k16t8p38_check⟩ + +private theorem k16t8_cover66 : ∀ P ∈ pathPatterns 0 3 [1, 2, 2], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p39, Certificates.k16t8p39_check⟩ + +private theorem k16t8_cover67 : ∀ P ∈ pathPatterns 0 2 [1, 2, 3], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p40, Certificates.k16t8p40_check⟩ + +private theorem k16t8_cover68 : ∀ P ∈ pathPatterns 0 1 [1, 2, 4], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p41, Certificates.k16t8p41_check⟩ + +private theorem k16t8_cover69 : ∀ P ∈ pathPatterns 0 0 [1, 2, 5], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p42, Certificates.k16t8p42_check⟩ + +private theorem k16t8_cover70 : ∀ P ∈ pathPatterns 1 4 [1, 3], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover71 : ∀ P ∈ pathPatterns 0 3 [1, 3, 1], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p43, Certificates.k16t8p43_check⟩ + +private theorem k16t8_cover72 : ∀ P ∈ pathPatterns 0 2 [1, 3, 2], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p44, Certificates.k16t8p44_check⟩ + +private theorem k16t8_cover73 : ∀ P ∈ pathPatterns 0 1 [1, 3, 3], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p45, Certificates.k16t8p45_check⟩ + +private theorem k16t8_cover74 : ∀ P ∈ pathPatterns 0 0 [1, 3, 4], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p46, Certificates.k16t8p46_check⟩ + +private theorem k16t8_cover75 : ∀ P ∈ pathPatterns 1 3 [1, 4], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover76 : ∀ P ∈ pathPatterns 0 2 [1, 4, 1], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p47, Certificates.k16t8p47_check⟩ + +private theorem k16t8_cover77 : ∀ P ∈ pathPatterns 0 1 [1, 4, 2], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p48, Certificates.k16t8p48_check⟩ + +private theorem k16t8_cover78 : ∀ P ∈ pathPatterns 0 0 [1, 4, 3], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 4, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p49, Certificates.k16t8p49_check⟩ + +private theorem k16t8_cover79 : ∀ P ∈ pathPatterns 1 2 [1, 5], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover80 : ∀ P ∈ pathPatterns 0 1 [1, 5, 1], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p50, Certificates.k16t8p50_check⟩ + +private theorem k16t8_cover81 : ∀ P ∈ pathPatterns 0 0 [1, 5, 2], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 5, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p51, Certificates.k16t8p51_check⟩ + +private theorem k16t8_cover82 : ∀ P ∈ pathPatterns 1 1 [1, 6], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover83 : ∀ P ∈ pathPatterns 0 0 [1, 6, 1], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 6, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p52, Certificates.k16t8p52_check⟩ + +private theorem k16t8_cover84 : ∀ P ∈ pathPatterns 1 0 [1, 7], HasCheckedCertificate 16 8 ([[], [], [], [], [1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + +private theorem k16t8_seq48 : amountSequenceForall 2 7 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([1] ++ tail).length) (8 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 16 8 ([[], [], [], []] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover49 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover57 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover58 + · exact by + intro _ + exact k16t8_cover59 + · exact by + intro _ + exact k16t8_cover60 + · exact by + intro _ + exact k16t8_cover61 + · exact by + intro _ + exact k16t8_cover62 + · exact by + intro _ + exact k16t8_cover63 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover64 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover65 + · exact by + intro _ + exact k16t8_cover66 + · exact by + intro _ + exact k16t8_cover67 + · exact by + intro _ + exact k16t8_cover68 + · exact by + intro _ + exact k16t8_cover69 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover70 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover71 + · exact by + intro _ + exact k16t8_cover72 + · exact by + intro _ + exact k16t8_cover73 + · exact by + intro _ + exact k16t8_cover74 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover75 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover76 + · exact by + intro _ + exact k16t8_cover77 + · exact by + intro _ + exact k16t8_cover78 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover79 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover80 + · exact by + intro _ + exact k16t8_cover81 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover82 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover83 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover84 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover86 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 16 8 ([[], [], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p53, Certificates.k16t8p53_check⟩ + +private theorem k16t8_cover87 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 16 8 ([[], [], [], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p54, Certificates.k16t8p54_check⟩ + +private theorem k16t8_cover88 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 16 8 ([[], [], [], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p55, Certificates.k16t8p55_check⟩ + +private theorem k16t8_cover89 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 16 8 ([[], [], [], [], [2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p56, Certificates.k16t8p56_check⟩ + +private theorem k16t8_cover90 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 16 8 ([[], [], [], [], [2], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p57, Certificates.k16t8p57_check⟩ + +private theorem k16t8_cover85 : ∀ P ∈ pathPatterns 2 6 [2], HasCheckedCertificate 16 8 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover86 + · exact by + intro _ + exact k16t8_cover87 + · exact by + intro _ + exact k16t8_cover88 + · exact by + intro _ + exact k16t8_cover89 + · exact by + intro _ + exact k16t8_cover90 + +private theorem k16t8_cover91 : ∀ P ∈ pathPatterns 0 3 [2, 1, 2], HasCheckedCertificate 16 8 ([[], [], [], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p58, Certificates.k16t8p58_check⟩ + +private theorem k16t8_cover92 : ∀ P ∈ pathPatterns 0 2 [2, 1, 3], HasCheckedCertificate 16 8 ([[], [], [], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p59, Certificates.k16t8p59_check⟩ + +private theorem k16t8_cover93 : ∀ P ∈ pathPatterns 0 1 [2, 1, 4], HasCheckedCertificate 16 8 ([[], [], [], [], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p60, Certificates.k16t8p60_check⟩ + +private theorem k16t8_cover94 : ∀ P ∈ pathPatterns 0 0 [2, 1, 5], HasCheckedCertificate 16 8 ([[], [], [], [], [2, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p61, Certificates.k16t8p61_check⟩ + +private theorem k16t8_cover95 : ∀ P ∈ pathPatterns 1 4 [2, 2], HasCheckedCertificate 16 8 ([[], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover96 : ∀ P ∈ pathPatterns 0 2 [2, 2, 2], HasCheckedCertificate 16 8 ([[], [], [], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p62, Certificates.k16t8p62_check⟩ + +private theorem k16t8_cover97 : ∀ P ∈ pathPatterns 0 1 [2, 2, 3], HasCheckedCertificate 16 8 ([[], [], [], [], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p63, Certificates.k16t8p63_check⟩ + +private theorem k16t8_cover98 : ∀ P ∈ pathPatterns 0 0 [2, 2, 4], HasCheckedCertificate 16 8 ([[], [], [], [], [2, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p64, Certificates.k16t8p64_check⟩ + +private theorem k16t8_cover99 : ∀ P ∈ pathPatterns 1 3 [2, 3], HasCheckedCertificate 16 8 ([[], [], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover100 : ∀ P ∈ pathPatterns 0 1 [2, 3, 2], HasCheckedCertificate 16 8 ([[], [], [], [], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p65, Certificates.k16t8p65_check⟩ + +private theorem k16t8_cover101 : ∀ P ∈ pathPatterns 0 0 [2, 3, 3], HasCheckedCertificate 16 8 ([[], [], [], [], [2, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p66, Certificates.k16t8p66_check⟩ + +private theorem k16t8_cover102 : ∀ P ∈ pathPatterns 1 2 [2, 4], HasCheckedCertificate 16 8 ([[], [], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover103 : ∀ P ∈ pathPatterns 0 0 [2, 4, 2], HasCheckedCertificate 16 8 ([[], [], [], [], [2, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p67, Certificates.k16t8p67_check⟩ + +private theorem k16t8_cover104 : ∀ P ∈ pathPatterns 1 1 [2, 5], HasCheckedCertificate 16 8 ([[], [], [], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover105 : ∀ P ∈ pathPatterns 1 0 [2, 6], HasCheckedCertificate 16 8 ([[], [], [], [], [2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover107 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 16 8 ([[], [], [], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p68, Certificates.k16t8p68_check⟩ + +private theorem k16t8_cover108 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 16 8 ([[], [], [], [], [3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p69, Certificates.k16t8p69_check⟩ + +private theorem k16t8_cover109 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 16 8 ([[], [], [], [], [3], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p70, Certificates.k16t8p70_check⟩ + +private theorem k16t8_cover106 : ∀ P ∈ pathPatterns 2 5 [3], HasCheckedCertificate 16 8 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k16t8_cover107 + · exact by + intro _ + exact k16t8_cover108 + · exact by + intro _ + exact k16t8_cover109 + +private theorem k16t8_cover110 : ∀ P ∈ pathPatterns 0 1 [3, 1, 3], HasCheckedCertificate 16 8 ([[], [], [], [], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p71, Certificates.k16t8p71_check⟩ + +private theorem k16t8_cover111 : ∀ P ∈ pathPatterns 0 0 [3, 1, 4], HasCheckedCertificate 16 8 ([[], [], [], [], [3, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p72, Certificates.k16t8p72_check⟩ + +private theorem k16t8_cover112 : ∀ P ∈ pathPatterns 0 0 [3, 2, 3], HasCheckedCertificate 16 8 ([[], [], [], [], [3, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p73, Certificates.k16t8p73_check⟩ + +private theorem k16t8_cover113 : ∀ P ∈ pathPatterns 1 2 [3, 3], HasCheckedCertificate 16 8 ([[], [], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover114 : ∀ P ∈ pathPatterns 1 1 [3, 4], HasCheckedCertificate 16 8 ([[], [], [], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover115 : ∀ P ∈ pathPatterns 1 0 [3, 5], HasCheckedCertificate 16 8 ([[], [], [], [], [3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover117 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 16 8 ([[], [], [], [], [4], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p74, Certificates.k16t8p74_check⟩ + +private theorem k16t8_cover116 : ∀ P ∈ pathPatterns 2 4 [4], HasCheckedCertificate 16 8 ([[], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · exact by + intro _ + exact k16t8_cover117 + +private theorem k16t8_cover118 : ∀ P ∈ pathPatterns 1 0 [4, 4], HasCheckedCertificate 16 8 ([[], [], [], [], [4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover119 : ∀ P ∈ pathPatterns 2 3 [5], HasCheckedCertificate 16 8 ([[], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + +private theorem k16t8_cover120 : ∀ P ∈ pathPatterns 2 2 [6], HasCheckedCertificate 16 8 ([[], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover121 : ∀ P ∈ pathPatterns 2 1 [7], HasCheckedCertificate 16 8 ([[], [], [], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover122 : ∀ P ∈ pathPatterns 2 0 [8], HasCheckedCertificate 16 8 ([[], [], [], [], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq10 : amountSequenceForall 3 8 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (8 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[], [], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover11 + · intro q + fin_cases q + · exact k16t8_seq48 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover85 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover91 + · exact by + intro _ + exact k16t8_cover92 + · exact by + intro _ + exact k16t8_cover93 + · exact by + intro _ + exact k16t8_cover94 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover95 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k16t8_cover96 + · exact by + intro _ + exact k16t8_cover97 + · exact by + intro _ + exact k16t8_cover98 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover99 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + intro _ + exact k16t8_cover100 + · exact by + intro _ + exact k16t8_cover101 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover102 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · exact by + intro _ + exact k16t8_cover103 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover104 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover105 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover106 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + intro _ + exact k16t8_cover110 + · exact by + intro _ + exact k16t8_cover111 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · exact by + intro _ + exact k16t8_cover112 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover113 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover114 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover115 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover116 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover118 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover119 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover120 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover121 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover122 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover9 : ∀ P ∈ pathPatterns 4 8 [], HasCheckedCertificate 16 8 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq10 + + +private theorem k16t8_cover126 : ∀ P ∈ pathPatterns 1 6 [1], HasCheckedCertificate 16 8 ([[], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover127 : ∀ P ∈ pathPatterns 0 5 [1, 1], HasCheckedCertificate 16 8 ([[], [], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p75, Certificates.k16t8p75_check⟩ + +private theorem k16t8_cover128 : ∀ P ∈ pathPatterns 0 4 [1, 2], HasCheckedCertificate 16 8 ([[], [], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p76, Certificates.k16t8p76_check⟩ + +private theorem k16t8_cover129 : ∀ P ∈ pathPatterns 0 3 [1, 3], HasCheckedCertificate 16 8 ([[], [], [], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p77, Certificates.k16t8p77_check⟩ + +private theorem k16t8_cover130 : ∀ P ∈ pathPatterns 0 2 [1, 4], HasCheckedCertificate 16 8 ([[], [], [], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p78, Certificates.k16t8p78_check⟩ + +private theorem k16t8_cover131 : ∀ P ∈ pathPatterns 0 1 [1, 5], HasCheckedCertificate 16 8 ([[], [], [], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p79, Certificates.k16t8p79_check⟩ + +private theorem k16t8_cover132 : ∀ P ∈ pathPatterns 0 0 [1, 6], HasCheckedCertificate 16 8 ([[], [], [], [1], [1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p80, Certificates.k16t8p80_check⟩ + +private theorem k16t8_cover133 : ∀ P ∈ pathPatterns 1 5 [2], HasCheckedCertificate 16 8 ([[], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover134 : ∀ P ∈ pathPatterns 0 3 [2, 2], HasCheckedCertificate 16 8 ([[], [], [], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p81, Certificates.k16t8p81_check⟩ + +private theorem k16t8_cover135 : ∀ P ∈ pathPatterns 0 2 [2, 3], HasCheckedCertificate 16 8 ([[], [], [], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p82, Certificates.k16t8p82_check⟩ + +private theorem k16t8_cover136 : ∀ P ∈ pathPatterns 0 1 [2, 4], HasCheckedCertificate 16 8 ([[], [], [], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p83, Certificates.k16t8p83_check⟩ + +private theorem k16t8_cover137 : ∀ P ∈ pathPatterns 0 0 [2, 5], HasCheckedCertificate 16 8 ([[], [], [], [1], [2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p84, Certificates.k16t8p84_check⟩ + +private theorem k16t8_cover138 : ∀ P ∈ pathPatterns 1 4 [3], HasCheckedCertificate 16 8 ([[], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover139 : ∀ P ∈ pathPatterns 0 1 [3, 3], HasCheckedCertificate 16 8 ([[], [], [], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p85, Certificates.k16t8p85_check⟩ + +private theorem k16t8_cover140 : ∀ P ∈ pathPatterns 0 0 [3, 4], HasCheckedCertificate 16 8 ([[], [], [], [1], [3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p86, Certificates.k16t8p86_check⟩ + +private theorem k16t8_cover141 : ∀ P ∈ pathPatterns 1 3 [4], HasCheckedCertificate 16 8 ([[], [], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover142 : ∀ P ∈ pathPatterns 1 2 [5], HasCheckedCertificate 16 8 ([[], [], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover143 : ∀ P ∈ pathPatterns 1 1 [6], HasCheckedCertificate 16 8 ([[], [], [], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover144 : ∀ P ∈ pathPatterns 1 0 [7], HasCheckedCertificate 16 8 ([[], [], [], [1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + +private theorem k16t8_seq125 : amountSequenceForall 2 7 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (2 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[], [], [], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover126 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover127 + · exact by + intro _ + exact k16t8_cover128 + · exact by + intro _ + exact k16t8_cover129 + · exact by + intro _ + exact k16t8_cover130 + · exact by + intro _ + exact k16t8_cover131 + · exact by + intro _ + exact k16t8_cover132 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover133 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover134 + · exact by + intro _ + exact k16t8_cover135 + · exact by + intro _ + exact k16t8_cover136 + · exact by + intro _ + exact k16t8_cover137 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover138 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k16t8_cover139 + · exact by + intro _ + exact k16t8_cover140 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover141 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover142 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover143 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover144 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover124 : ∀ P ∈ pathPatterns 3 7 [1], HasCheckedCertificate 16 8 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq125 + + +private theorem k16t8_cover146 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 16 8 ([[], [], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p87, Certificates.k16t8p87_check⟩ + +private theorem k16t8_cover147 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 16 8 ([[], [], [], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p88, Certificates.k16t8p88_check⟩ + +private theorem k16t8_cover148 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 16 8 ([[], [], [], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p89, Certificates.k16t8p89_check⟩ + +private theorem k16t8_cover149 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 16 8 ([[], [], [], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p90, Certificates.k16t8p90_check⟩ + +private theorem k16t8_cover150 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 16 8 ([[], [], [], [1, 1], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p91, Certificates.k16t8p91_check⟩ + +private theorem k16t8_cover145 : ∀ P ∈ pathPatterns 2 6 [1, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover146 + · exact by + intro _ + exact k16t8_cover147 + · exact by + intro _ + exact k16t8_cover148 + · exact by + intro _ + exact k16t8_cover149 + · exact by + intro _ + exact k16t8_cover150 + +private theorem k16t8_cover151 : ∀ P ∈ pathPatterns 1 5 [1, 1, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover152 : ∀ P ∈ pathPatterns 0 4 [1, 1, 1, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p92, Certificates.k16t8p92_check⟩ + +private theorem k16t8_cover153 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p93, Certificates.k16t8p93_check⟩ + +private theorem k16t8_cover154 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p94, Certificates.k16t8p94_check⟩ + +private theorem k16t8_cover155 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 4], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p95, Certificates.k16t8p95_check⟩ + +private theorem k16t8_cover156 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 5], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p96, Certificates.k16t8p96_check⟩ + +private theorem k16t8_cover157 : ∀ P ∈ pathPatterns 1 4 [1, 1, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover158 : ∀ P ∈ pathPatterns 0 3 [1, 1, 2, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p97, Certificates.k16t8p97_check⟩ + +private theorem k16t8_cover159 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p98, Certificates.k16t8p98_check⟩ + +private theorem k16t8_cover160 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 3], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p99, Certificates.k16t8p99_check⟩ + +private theorem k16t8_cover161 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 4], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p100, Certificates.k16t8p100_check⟩ + +private theorem k16t8_cover162 : ∀ P ∈ pathPatterns 1 3 [1, 1, 3], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover163 : ∀ P ∈ pathPatterns 0 2 [1, 1, 3, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p101, Certificates.k16t8p101_check⟩ + +private theorem k16t8_cover164 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p102, Certificates.k16t8p102_check⟩ + +private theorem k16t8_cover165 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 3], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p103, Certificates.k16t8p103_check⟩ + +private theorem k16t8_cover166 : ∀ P ∈ pathPatterns 1 2 [1, 1, 4], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover167 : ∀ P ∈ pathPatterns 0 1 [1, 1, 4, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p104, Certificates.k16t8p104_check⟩ + +private theorem k16t8_cover168 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p105, Certificates.k16t8p105_check⟩ + +private theorem k16t8_cover169 : ∀ P ∈ pathPatterns 1 1 [1, 1, 5], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover170 : ∀ P ∈ pathPatterns 0 0 [1, 1, 5, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p106, Certificates.k16t8p106_check⟩ + +private theorem k16t8_cover171 : ∀ P ∈ pathPatterns 1 0 [1, 1, 6], HasCheckedCertificate 16 8 ([[], [], [], [1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover173 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 16 8 ([[], [], [], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p107, Certificates.k16t8p107_check⟩ + +private theorem k16t8_cover174 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 16 8 ([[], [], [], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p108, Certificates.k16t8p108_check⟩ + +private theorem k16t8_cover175 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 16 8 ([[], [], [], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p109, Certificates.k16t8p109_check⟩ + +private theorem k16t8_cover176 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 16 8 ([[], [], [], [1, 2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p110, Certificates.k16t8p110_check⟩ + +private theorem k16t8_cover172 : ∀ P ∈ pathPatterns 2 5 [1, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover173 + · exact by + intro _ + exact k16t8_cover174 + · exact by + intro _ + exact k16t8_cover175 + · exact by + intro _ + exact k16t8_cover176 + +private theorem k16t8_cover177 : ∀ P ∈ pathPatterns 1 4 [1, 2, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover178 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p111, Certificates.k16t8p111_check⟩ + +private theorem k16t8_cover179 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 3], HasCheckedCertificate 16 8 ([[], [], [], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p112, Certificates.k16t8p112_check⟩ + +private theorem k16t8_cover180 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 4], HasCheckedCertificate 16 8 ([[], [], [], [1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p113, Certificates.k16t8p113_check⟩ + +private theorem k16t8_cover181 : ∀ P ∈ pathPatterns 1 3 [1, 2, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover182 : ∀ P ∈ pathPatterns 0 2 [1, 2, 2, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p114, Certificates.k16t8p114_check⟩ + +private theorem k16t8_cover183 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p115, Certificates.k16t8p115_check⟩ + +private theorem k16t8_cover184 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 3], HasCheckedCertificate 16 8 ([[], [], [], [1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p116, Certificates.k16t8p116_check⟩ + +private theorem k16t8_cover185 : ∀ P ∈ pathPatterns 1 2 [1, 2, 3], HasCheckedCertificate 16 8 ([[], [], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover186 : ∀ P ∈ pathPatterns 0 1 [1, 2, 3, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p117, Certificates.k16t8p117_check⟩ + +private theorem k16t8_cover187 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p118, Certificates.k16t8p118_check⟩ + +private theorem k16t8_cover188 : ∀ P ∈ pathPatterns 1 1 [1, 2, 4], HasCheckedCertificate 16 8 ([[], [], [], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover189 : ∀ P ∈ pathPatterns 0 0 [1, 2, 4, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p119, Certificates.k16t8p119_check⟩ + +private theorem k16t8_cover190 : ∀ P ∈ pathPatterns 1 0 [1, 2, 5], HasCheckedCertificate 16 8 ([[], [], [], [1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover192 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 16 8 ([[], [], [], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p120, Certificates.k16t8p120_check⟩ + +private theorem k16t8_cover193 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 16 8 ([[], [], [], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p121, Certificates.k16t8p121_check⟩ + +private theorem k16t8_cover194 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 16 8 ([[], [], [], [1, 3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p122, Certificates.k16t8p122_check⟩ + +private theorem k16t8_cover191 : ∀ P ∈ pathPatterns 2 4 [1, 3], HasCheckedCertificate 16 8 ([[], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover192 + · exact by + intro _ + exact k16t8_cover193 + · exact by + intro _ + exact k16t8_cover194 + +private theorem k16t8_cover195 : ∀ P ∈ pathPatterns 1 3 [1, 3, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover196 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p123, Certificates.k16t8p123_check⟩ + +private theorem k16t8_cover197 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 3], HasCheckedCertificate 16 8 ([[], [], [], [1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p124, Certificates.k16t8p124_check⟩ + +private theorem k16t8_cover198 : ∀ P ∈ pathPatterns 1 2 [1, 3, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover199 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p125, Certificates.k16t8p125_check⟩ + +private theorem k16t8_cover200 : ∀ P ∈ pathPatterns 1 1 [1, 3, 3], HasCheckedCertificate 16 8 ([[], [], [], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover201 : ∀ P ∈ pathPatterns 0 0 [1, 3, 3, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p126, Certificates.k16t8p126_check⟩ + +private theorem k16t8_cover202 : ∀ P ∈ pathPatterns 1 0 [1, 3, 4], HasCheckedCertificate 16 8 ([[], [], [], [1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover204 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 16 8 ([[], [], [], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p127, Certificates.k16t8p127_check⟩ + +private theorem k16t8_cover205 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[], [], [], [1, 4], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p128, Certificates.k16t8p128_check⟩ + +private theorem k16t8_cover203 : ∀ P ∈ pathPatterns 2 3 [1, 4], HasCheckedCertificate 16 8 ([[], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover204 + · exact by + intro _ + exact k16t8_cover205 + +private theorem k16t8_cover206 : ∀ P ∈ pathPatterns 1 2 [1, 4, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover207 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p129, Certificates.k16t8p129_check⟩ + +private theorem k16t8_cover208 : ∀ P ∈ pathPatterns 1 1 [1, 4, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover209 : ∀ P ∈ pathPatterns 1 0 [1, 4, 3], HasCheckedCertificate 16 8 ([[], [], [], [1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover211 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[], [], [], [1, 5], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p130, Certificates.k16t8p130_check⟩ + +private theorem k16t8_cover210 : ∀ P ∈ pathPatterns 2 2 [1, 5], HasCheckedCertificate 16 8 ([[], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover211 + +private theorem k16t8_cover212 : ∀ P ∈ pathPatterns 1 1 [1, 5, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover213 : ∀ P ∈ pathPatterns 1 0 [1, 5, 2], HasCheckedCertificate 16 8 ([[], [], [], [1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover214 : ∀ P ∈ pathPatterns 2 1 [1, 6], HasCheckedCertificate 16 8 ([[], [], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover215 : ∀ P ∈ pathPatterns 1 0 [1, 6, 1], HasCheckedCertificate 16 8 ([[], [], [], [1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover216 : ∀ P ∈ pathPatterns 2 0 [1, 7], HasCheckedCertificate 16 8 ([[], [], [], [1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq123 : amountSequenceForall 3 7 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (8 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 16 8 ([[], [], []] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover124 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover145 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover151 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover152 + · exact by + intro _ + exact k16t8_cover153 + · exact by + intro _ + exact k16t8_cover154 + · exact by + intro _ + exact k16t8_cover155 + · exact by + intro _ + exact k16t8_cover156 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover157 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover158 + · exact by + intro _ + exact k16t8_cover159 + · exact by + intro _ + exact k16t8_cover160 + · exact by + intro _ + exact k16t8_cover161 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover162 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover163 + · exact by + intro _ + exact k16t8_cover164 + · exact by + intro _ + exact k16t8_cover165 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover166 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover167 + · exact by + intro _ + exact k16t8_cover168 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover169 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover170 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover171 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover172 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover177 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k16t8_cover178 + · exact by + intro _ + exact k16t8_cover179 + · exact by + intro _ + exact k16t8_cover180 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover181 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover182 + · exact by + intro _ + exact k16t8_cover183 + · exact by + intro _ + exact k16t8_cover184 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover185 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover186 + · exact by + intro _ + exact k16t8_cover187 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover188 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover189 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover190 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover191 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover195 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + intro _ + exact k16t8_cover196 + · exact by + intro _ + exact k16t8_cover197 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover198 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · exact by + intro _ + exact k16t8_cover199 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover200 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover201 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover202 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover203 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover206 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · exact by + intro _ + exact k16t8_cover207 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover208 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 2, 1] ∧ LexLE [1, 4, 2, 1] [1, 2, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover209 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover210 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover212 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 1, 1] ∧ LexLE [1, 5, 1, 1] [1, 1, 5, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover213 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover214 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover215 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover216 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover219 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 16 8 ([[], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover220 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 16 8 ([[], [], [], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p131, Certificates.k16t8p131_check⟩ + +private theorem k16t8_cover221 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 16 8 ([[], [], [], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p132, Certificates.k16t8p132_check⟩ + +private theorem k16t8_cover222 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 16 8 ([[], [], [], [2], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p133, Certificates.k16t8p133_check⟩ + +private theorem k16t8_cover223 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 16 8 ([[], [], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover224 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 16 8 ([[], [], [], [2], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p134, Certificates.k16t8p134_check⟩ + +private theorem k16t8_cover225 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 16 8 ([[], [], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover226 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 16 8 ([[], [], [], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover227 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 16 8 ([[], [], [], [2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover218 : ∀ P ∈ pathPatterns 3 6 [2], HasCheckedCertificate 16 8 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover219 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover220 + · exact by + intro _ + exact k16t8_cover221 + · exact by + intro _ + exact k16t8_cover222 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover223 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k16t8_cover224 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover225 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover226 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover227 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover228 : ∀ P ∈ pathPatterns 0 2 [2, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [], [], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p135, Certificates.k16t8p135_check⟩ + +private theorem k16t8_cover229 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [], [], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p136, Certificates.k16t8p136_check⟩ + +private theorem k16t8_cover230 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 4], HasCheckedCertificate 16 8 ([[], [], [], [2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p137, Certificates.k16t8p137_check⟩ + +private theorem k16t8_cover231 : ∀ P ∈ pathPatterns 1 3 [2, 1, 2], HasCheckedCertificate 16 8 ([[], [], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover232 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2, 2], HasCheckedCertificate 16 8 ([[], [], [], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p138, Certificates.k16t8p138_check⟩ + +private theorem k16t8_cover233 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 3], HasCheckedCertificate 16 8 ([[], [], [], [2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p139, Certificates.k16t8p139_check⟩ + +private theorem k16t8_cover234 : ∀ P ∈ pathPatterns 1 2 [2, 1, 3], HasCheckedCertificate 16 8 ([[], [], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover235 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3, 2], HasCheckedCertificate 16 8 ([[], [], [], [2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p140, Certificates.k16t8p140_check⟩ + +private theorem k16t8_cover236 : ∀ P ∈ pathPatterns 1 1 [2, 1, 4], HasCheckedCertificate 16 8 ([[], [], [], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover237 : ∀ P ∈ pathPatterns 1 0 [2, 1, 5], HasCheckedCertificate 16 8 ([[], [], [], [2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover239 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 16 8 ([[], [], [], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p141, Certificates.k16t8p141_check⟩ + +private theorem k16t8_cover240 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 16 8 ([[], [], [], [2, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p142, Certificates.k16t8p142_check⟩ + +private theorem k16t8_cover238 : ∀ P ∈ pathPatterns 2 4 [2, 2], HasCheckedCertificate 16 8 ([[], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k16t8_cover239 + · exact by + intro _ + exact k16t8_cover240 + +private theorem k16t8_cover241 : ∀ P ∈ pathPatterns 0 0 [2, 2, 1, 3], HasCheckedCertificate 16 8 ([[], [], [], [2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p143, Certificates.k16t8p143_check⟩ + +private theorem k16t8_cover242 : ∀ P ∈ pathPatterns 1 2 [2, 2, 2], HasCheckedCertificate 16 8 ([[], [], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover243 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2, 2], HasCheckedCertificate 16 8 ([[], [], [], [2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p144, Certificates.k16t8p144_check⟩ + +private theorem k16t8_cover244 : ∀ P ∈ pathPatterns 1 1 [2, 2, 3], HasCheckedCertificate 16 8 ([[], [], [], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover245 : ∀ P ∈ pathPatterns 1 0 [2, 2, 4], HasCheckedCertificate 16 8 ([[], [], [], [2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover247 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[], [], [], [2, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p145, Certificates.k16t8p145_check⟩ + +private theorem k16t8_cover246 : ∀ P ∈ pathPatterns 2 3 [2, 3], HasCheckedCertificate 16 8 ([[], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k16t8_cover247 + +private theorem k16t8_cover248 : ∀ P ∈ pathPatterns 1 1 [2, 3, 2], HasCheckedCertificate 16 8 ([[], [], [], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover249 : ∀ P ∈ pathPatterns 1 0 [2, 3, 3], HasCheckedCertificate 16 8 ([[], [], [], [2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover250 : ∀ P ∈ pathPatterns 2 2 [2, 4], HasCheckedCertificate 16 8 ([[], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover251 : ∀ P ∈ pathPatterns 1 0 [2, 4, 2], HasCheckedCertificate 16 8 ([[], [], [], [2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover252 : ∀ P ∈ pathPatterns 2 1 [2, 5], HasCheckedCertificate 16 8 ([[], [], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover253 : ∀ P ∈ pathPatterns 2 0 [2, 6], HasCheckedCertificate 16 8 ([[], [], [], [2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq217 : amountSequenceForall 3 6 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([2] ++ tail).length) (8 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 16 8 ([[], [], []] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover218 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover228 + · exact by + intro _ + exact k16t8_cover229 + · exact by + intro _ + exact k16t8_cover230 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover231 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover232 + · exact by + intro _ + exact k16t8_cover233 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover234 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover235 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover236 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 4, 1] ∧ LexLE [2, 1, 4, 1] [1, 4, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover237 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover238 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · exact by + intro _ + exact k16t8_cover241 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover242 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · exact by + intro _ + exact k16t8_cover243 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover244 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 3, 1] ∧ LexLE [2, 2, 3, 1] [1, 3, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover245 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover246 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 2] ∧ LexLE [2, 3, 1, 2] [2, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover248 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 1] ∧ LexLE [2, 3, 2, 1] [1, 2, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover249 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover250 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 1] ∧ LexLE [2, 4, 1, 1] [1, 1, 4, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover251 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover252 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover253 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover256 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 16 8 ([[], [], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover257 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 16 8 ([[], [], [], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover258 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 16 8 ([[], [], [], [3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover255 : ∀ P ∈ pathPatterns 3 5 [3], HasCheckedCertificate 16 8 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover256 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover257 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover258 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover259 : ∀ P ∈ pathPatterns 0 0 [3, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [], [], [3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p146, Certificates.k16t8p146_check⟩ + +private theorem k16t8_cover260 : ∀ P ∈ pathPatterns 1 1 [3, 1, 3], HasCheckedCertificate 16 8 ([[], [], [], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover261 : ∀ P ∈ pathPatterns 1 0 [3, 1, 4], HasCheckedCertificate 16 8 ([[], [], [], [3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover262 : ∀ P ∈ pathPatterns 1 0 [3, 2, 3], HasCheckedCertificate 16 8 ([[], [], [], [3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover263 : ∀ P ∈ pathPatterns 2 2 [3, 3], HasCheckedCertificate 16 8 ([[], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover264 : ∀ P ∈ pathPatterns 2 1 [3, 4], HasCheckedCertificate 16 8 ([[], [], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover265 : ∀ P ∈ pathPatterns 2 0 [3, 5], HasCheckedCertificate 16 8 ([[], [], [], [3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq254 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([3] ++ tail) ∧ LexLE ([3] ++ tail) ([3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([3] ++ tail).length) (8 - ([3] ++ tail).sum) ([3] ++ tail), + HasCheckedCertificate 16 8 ([[], [], []] ++ (([3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover255 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · exact by + intro _ + exact k16t8_cover259 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 2] ∧ LexLE [3, 1, 2, 2] [2, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover260 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 1] ∧ LexLE [3, 1, 3, 1] [1, 3, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover261 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 2] ∧ LexLE [3, 2, 1, 2] [2, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 1] ∧ LexLE [3, 2, 2, 1] [1, 2, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover262 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover263 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 1] ∧ LexLE [3, 3, 1, 1] [1, 1, 3, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover264 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover265 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover267 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 16 8 ([[], [], [], [4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover266 : ∀ P ∈ pathPatterns 3 4 [4], HasCheckedCertificate 16 8 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover267 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover268 : ∀ P ∈ pathPatterns 2 0 [4, 4], HasCheckedCertificate 16 8 ([[], [], [], [4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover269 : ∀ P ∈ pathPatterns 3 3 [5], HasCheckedCertificate 16 8 ([[], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover270 : ∀ P ∈ pathPatterns 3 2 [6], HasCheckedCertificate 16 8 ([[], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover271 : ∀ P ∈ pathPatterns 3 1 [7], HasCheckedCertificate 16 8 ([[], [], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover272 : ∀ P ∈ pathPatterns 3 0 [8], HasCheckedCertificate 16 8 ([[], [], [], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq8 : amountSequenceForall 4 8 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (8 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover9 + · intro q + fin_cases q + · exact k16t8_seq123 + + · exact k16t8_seq217 + + · exact k16t8_seq254 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover266 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 2] ∧ LexLE [4, 1, 1, 2] [2, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 1] ∧ LexLE [4, 1, 2, 1] [1, 2, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 1] ∧ LexLE [4, 2, 1, 1] [1, 1, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover268 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover269 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 1] ∧ LexLE [5, 1, 1, 1] [1, 1, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover270 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover271 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover272 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover7 : ∀ P ∈ pathPatterns 5 8 [], HasCheckedCertificate 16 8 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq8 + + +private theorem k16t8_cover277 : ∀ P ∈ pathPatterns 0 5 [1], HasCheckedCertificate 16 8 ([[], [], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p147, Certificates.k16t8p147_check⟩ + +private theorem k16t8_cover278 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 16 8 ([[], [], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p148, Certificates.k16t8p148_check⟩ + +private theorem k16t8_cover279 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 16 8 ([[], [], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p149, Certificates.k16t8p149_check⟩ + +private theorem k16t8_cover280 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 16 8 ([[], [], [1], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p150, Certificates.k16t8p150_check⟩ + +private theorem k16t8_cover281 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 16 8 ([[], [], [1], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p151, Certificates.k16t8p151_check⟩ + +private theorem k16t8_cover282 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 16 8 ([[], [], [1], [1], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p152, Certificates.k16t8p152_check⟩ + +private theorem k16t8_cover276 : ∀ P ∈ pathPatterns 2 6 [1], HasCheckedCertificate 16 8 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover277 + · exact by + intro _ + exact k16t8_cover278 + · exact by + intro _ + exact k16t8_cover279 + · exact by + intro _ + exact k16t8_cover280 + · exact by + intro _ + exact k16t8_cover281 + · exact by + intro _ + exact k16t8_cover282 + +private theorem k16t8_cover283 : ∀ P ∈ pathPatterns 1 5 [1, 1], HasCheckedCertificate 16 8 ([[], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover284 : ∀ P ∈ pathPatterns 0 4 [1, 1, 1], HasCheckedCertificate 16 8 ([[], [], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p153, Certificates.k16t8p153_check⟩ + +private theorem k16t8_cover285 : ∀ P ∈ pathPatterns 0 3 [1, 1, 2], HasCheckedCertificate 16 8 ([[], [], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p154, Certificates.k16t8p154_check⟩ + +private theorem k16t8_cover286 : ∀ P ∈ pathPatterns 0 2 [1, 1, 3], HasCheckedCertificate 16 8 ([[], [], [1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p155, Certificates.k16t8p155_check⟩ + +private theorem k16t8_cover287 : ∀ P ∈ pathPatterns 0 1 [1, 1, 4], HasCheckedCertificate 16 8 ([[], [], [1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p156, Certificates.k16t8p156_check⟩ + +private theorem k16t8_cover288 : ∀ P ∈ pathPatterns 0 0 [1, 1, 5], HasCheckedCertificate 16 8 ([[], [], [1], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p157, Certificates.k16t8p157_check⟩ + +private theorem k16t8_cover289 : ∀ P ∈ pathPatterns 1 4 [1, 2], HasCheckedCertificate 16 8 ([[], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover290 : ∀ P ∈ pathPatterns 0 3 [1, 2, 1], HasCheckedCertificate 16 8 ([[], [], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p158, Certificates.k16t8p158_check⟩ + +private theorem k16t8_cover291 : ∀ P ∈ pathPatterns 0 2 [1, 2, 2], HasCheckedCertificate 16 8 ([[], [], [1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p159, Certificates.k16t8p159_check⟩ + +private theorem k16t8_cover292 : ∀ P ∈ pathPatterns 0 1 [1, 2, 3], HasCheckedCertificate 16 8 ([[], [], [1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p160, Certificates.k16t8p160_check⟩ + +private theorem k16t8_cover293 : ∀ P ∈ pathPatterns 0 0 [1, 2, 4], HasCheckedCertificate 16 8 ([[], [], [1], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p161, Certificates.k16t8p161_check⟩ + +private theorem k16t8_cover294 : ∀ P ∈ pathPatterns 1 3 [1, 3], HasCheckedCertificate 16 8 ([[], [], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover295 : ∀ P ∈ pathPatterns 0 2 [1, 3, 1], HasCheckedCertificate 16 8 ([[], [], [1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p162, Certificates.k16t8p162_check⟩ + +private theorem k16t8_cover296 : ∀ P ∈ pathPatterns 0 1 [1, 3, 2], HasCheckedCertificate 16 8 ([[], [], [1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p163, Certificates.k16t8p163_check⟩ + +private theorem k16t8_cover297 : ∀ P ∈ pathPatterns 0 0 [1, 3, 3], HasCheckedCertificate 16 8 ([[], [], [1], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p164, Certificates.k16t8p164_check⟩ + +private theorem k16t8_cover298 : ∀ P ∈ pathPatterns 1 2 [1, 4], HasCheckedCertificate 16 8 ([[], [], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover299 : ∀ P ∈ pathPatterns 0 1 [1, 4, 1], HasCheckedCertificate 16 8 ([[], [], [1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p165, Certificates.k16t8p165_check⟩ + +private theorem k16t8_cover300 : ∀ P ∈ pathPatterns 0 0 [1, 4, 2], HasCheckedCertificate 16 8 ([[], [], [1], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p166, Certificates.k16t8p166_check⟩ + +private theorem k16t8_cover301 : ∀ P ∈ pathPatterns 1 1 [1, 5], HasCheckedCertificate 16 8 ([[], [], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover302 : ∀ P ∈ pathPatterns 0 0 [1, 5, 1], HasCheckedCertificate 16 8 ([[], [], [1], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p167, Certificates.k16t8p167_check⟩ + +private theorem k16t8_cover303 : ∀ P ∈ pathPatterns 1 0 [1, 6], HasCheckedCertificate 16 8 ([[], [], [1], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover305 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 16 8 ([[], [], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p168, Certificates.k16t8p168_check⟩ + +private theorem k16t8_cover306 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 16 8 ([[], [], [1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p169, Certificates.k16t8p169_check⟩ + +private theorem k16t8_cover307 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 16 8 ([[], [], [1], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p170, Certificates.k16t8p170_check⟩ + +private theorem k16t8_cover308 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 16 8 ([[], [], [1], [2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p171, Certificates.k16t8p171_check⟩ + +private theorem k16t8_cover304 : ∀ P ∈ pathPatterns 2 5 [2], HasCheckedCertificate 16 8 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover305 + · exact by + intro _ + exact k16t8_cover306 + · exact by + intro _ + exact k16t8_cover307 + · exact by + intro _ + exact k16t8_cover308 + +private theorem k16t8_cover309 : ∀ P ∈ pathPatterns 0 2 [2, 1, 2], HasCheckedCertificate 16 8 ([[], [], [1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p172, Certificates.k16t8p172_check⟩ + +private theorem k16t8_cover310 : ∀ P ∈ pathPatterns 0 1 [2, 1, 3], HasCheckedCertificate 16 8 ([[], [], [1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p173, Certificates.k16t8p173_check⟩ + +private theorem k16t8_cover311 : ∀ P ∈ pathPatterns 0 0 [2, 1, 4], HasCheckedCertificate 16 8 ([[], [], [1], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p174, Certificates.k16t8p174_check⟩ + +private theorem k16t8_cover312 : ∀ P ∈ pathPatterns 1 3 [2, 2], HasCheckedCertificate 16 8 ([[], [], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover313 : ∀ P ∈ pathPatterns 0 1 [2, 2, 2], HasCheckedCertificate 16 8 ([[], [], [1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p175, Certificates.k16t8p175_check⟩ + +private theorem k16t8_cover314 : ∀ P ∈ pathPatterns 0 0 [2, 2, 3], HasCheckedCertificate 16 8 ([[], [], [1], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p176, Certificates.k16t8p176_check⟩ + +private theorem k16t8_cover315 : ∀ P ∈ pathPatterns 1 2 [2, 3], HasCheckedCertificate 16 8 ([[], [], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover316 : ∀ P ∈ pathPatterns 0 0 [2, 3, 2], HasCheckedCertificate 16 8 ([[], [], [1], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p177, Certificates.k16t8p177_check⟩ + +private theorem k16t8_cover317 : ∀ P ∈ pathPatterns 1 1 [2, 4], HasCheckedCertificate 16 8 ([[], [], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover318 : ∀ P ∈ pathPatterns 1 0 [2, 5], HasCheckedCertificate 16 8 ([[], [], [1], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover320 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 16 8 ([[], [], [1], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p178, Certificates.k16t8p178_check⟩ + +private theorem k16t8_cover321 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 16 8 ([[], [], [1], [3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p179, Certificates.k16t8p179_check⟩ + +private theorem k16t8_cover319 : ∀ P ∈ pathPatterns 2 4 [3], HasCheckedCertificate 16 8 ([[], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k16t8_cover320 + · exact by + intro _ + exact k16t8_cover321 + +private theorem k16t8_cover322 : ∀ P ∈ pathPatterns 0 0 [3, 1, 3], HasCheckedCertificate 16 8 ([[], [], [1], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p180, Certificates.k16t8p180_check⟩ + +private theorem k16t8_cover323 : ∀ P ∈ pathPatterns 1 1 [3, 3], HasCheckedCertificate 16 8 ([[], [], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover324 : ∀ P ∈ pathPatterns 1 0 [3, 4], HasCheckedCertificate 16 8 ([[], [], [1], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover325 : ∀ P ∈ pathPatterns 2 3 [4], HasCheckedCertificate 16 8 ([[], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + +private theorem k16t8_cover326 : ∀ P ∈ pathPatterns 2 2 [5], HasCheckedCertificate 16 8 ([[], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover327 : ∀ P ∈ pathPatterns 2 1 [6], HasCheckedCertificate 16 8 ([[], [], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover328 : ∀ P ∈ pathPatterns 2 0 [7], HasCheckedCertificate 16 8 ([[], [], [1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq275 : amountSequenceForall 3 7 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[], [], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover276 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover283 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover284 + · exact by + intro _ + exact k16t8_cover285 + · exact by + intro _ + exact k16t8_cover286 + · exact by + intro _ + exact k16t8_cover287 + · exact by + intro _ + exact k16t8_cover288 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover289 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover290 + · exact by + intro _ + exact k16t8_cover291 + · exact by + intro _ + exact k16t8_cover292 + · exact by + intro _ + exact k16t8_cover293 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover294 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover295 + · exact by + intro _ + exact k16t8_cover296 + · exact by + intro _ + exact k16t8_cover297 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover298 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover299 + · exact by + intro _ + exact k16t8_cover300 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover301 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover302 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover303 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover304 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover309 + · exact by + intro _ + exact k16t8_cover310 + · exact by + intro _ + exact k16t8_cover311 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover312 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k16t8_cover313 + · exact by + intro _ + exact k16t8_cover314 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover315 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + intro _ + exact k16t8_cover316 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover317 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover318 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover319 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + intro _ + exact k16t8_cover322 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover323 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover324 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover325 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover326 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover327 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover328 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover274 : ∀ P ∈ pathPatterns 4 7 [1], HasCheckedCertificate 16 8 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq275 + + +private theorem k16t8_cover331 : ∀ P ∈ pathPatterns 0 4 [1, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p181, Certificates.k16t8p181_check⟩ + +private theorem k16t8_cover332 : ∀ P ∈ pathPatterns 0 3 [1, 2], HasCheckedCertificate 16 8 ([[], [], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p182, Certificates.k16t8p182_check⟩ + +private theorem k16t8_cover333 : ∀ P ∈ pathPatterns 0 2 [1, 3], HasCheckedCertificate 16 8 ([[], [], [1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p183, Certificates.k16t8p183_check⟩ + +private theorem k16t8_cover334 : ∀ P ∈ pathPatterns 0 1 [1, 4], HasCheckedCertificate 16 8 ([[], [], [1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p184, Certificates.k16t8p184_check⟩ + +private theorem k16t8_cover335 : ∀ P ∈ pathPatterns 0 0 [1, 5], HasCheckedCertificate 16 8 ([[], [], [1, 1], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p185, Certificates.k16t8p185_check⟩ + +private theorem k16t8_cover336 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 16 8 ([[], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover337 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 16 8 ([[], [], [1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p186, Certificates.k16t8p186_check⟩ + +private theorem k16t8_cover338 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 16 8 ([[], [], [1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p187, Certificates.k16t8p187_check⟩ + +private theorem k16t8_cover339 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 16 8 ([[], [], [1, 1], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p188, Certificates.k16t8p188_check⟩ + +private theorem k16t8_cover340 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 16 8 ([[], [], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover341 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 16 8 ([[], [], [1, 1], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p189, Certificates.k16t8p189_check⟩ + +private theorem k16t8_cover342 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 16 8 ([[], [], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover343 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 16 8 ([[], [], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover344 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 16 8 ([[], [], [1, 1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover330 : ∀ P ∈ pathPatterns 3 6 [1, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover331 + · exact by + intro _ + exact k16t8_cover332 + · exact by + intro _ + exact k16t8_cover333 + · exact by + intro _ + exact k16t8_cover334 + · exact by + intro _ + exact k16t8_cover335 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover336 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover337 + · exact by + intro _ + exact k16t8_cover338 + · exact by + intro _ + exact k16t8_cover339 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover340 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k16t8_cover341 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover342 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover343 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover344 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover346 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p190, Certificates.k16t8p190_check⟩ + +private theorem k16t8_cover347 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p191, Certificates.k16t8p191_check⟩ + +private theorem k16t8_cover348 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p192, Certificates.k16t8p192_check⟩ + +private theorem k16t8_cover349 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p193, Certificates.k16t8p193_check⟩ + +private theorem k16t8_cover345 : ∀ P ∈ pathPatterns 2 5 [1, 1, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover346 + · exact by + intro _ + exact k16t8_cover347 + · exact by + intro _ + exact k16t8_cover348 + · exact by + intro _ + exact k16t8_cover349 + +private theorem k16t8_cover350 : ∀ P ∈ pathPatterns 1 4 [1, 1, 1, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover351 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 1, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p194, Certificates.k16t8p194_check⟩ + +private theorem k16t8_cover352 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p195, Certificates.k16t8p195_check⟩ + +private theorem k16t8_cover353 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p196, Certificates.k16t8p196_check⟩ + +private theorem k16t8_cover354 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 4], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p197, Certificates.k16t8p197_check⟩ + +private theorem k16t8_cover355 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover356 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 2, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p198, Certificates.k16t8p198_check⟩ + +private theorem k16t8_cover357 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2, 2], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p199, Certificates.k16t8p199_check⟩ + +private theorem k16t8_cover358 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 3], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p200, Certificates.k16t8p200_check⟩ + +private theorem k16t8_cover359 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover360 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 3, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p201, Certificates.k16t8p201_check⟩ + +private theorem k16t8_cover361 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3, 2], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p202, Certificates.k16t8p202_check⟩ + +private theorem k16t8_cover362 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 4], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover363 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 4, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p203, Certificates.k16t8p203_check⟩ + +private theorem k16t8_cover364 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 5], HasCheckedCertificate 16 8 ([[], [], [1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover366 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 16 8 ([[], [], [1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p204, Certificates.k16t8p204_check⟩ + +private theorem k16t8_cover367 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 16 8 ([[], [], [1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p205, Certificates.k16t8p205_check⟩ + +private theorem k16t8_cover368 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 16 8 ([[], [], [1, 1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p206, Certificates.k16t8p206_check⟩ + +private theorem k16t8_cover365 : ∀ P ∈ pathPatterns 2 4 [1, 1, 2], HasCheckedCertificate 16 8 ([[], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover366 + · exact by + intro _ + exact k16t8_cover367 + · exact by + intro _ + exact k16t8_cover368 + +private theorem k16t8_cover369 : ∀ P ∈ pathPatterns 1 3 [1, 1, 2, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover370 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2, 1, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p207, Certificates.k16t8p207_check⟩ + +private theorem k16t8_cover371 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1, 2], HasCheckedCertificate 16 8 ([[], [], [1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p208, Certificates.k16t8p208_check⟩ + +private theorem k16t8_cover372 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 3], HasCheckedCertificate 16 8 ([[], [], [1, 1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p209, Certificates.k16t8p209_check⟩ + +private theorem k16t8_cover373 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2, 2], HasCheckedCertificate 16 8 ([[], [], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover374 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 2, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p210, Certificates.k16t8p210_check⟩ + +private theorem k16t8_cover375 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2, 2], HasCheckedCertificate 16 8 ([[], [], [1, 1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p211, Certificates.k16t8p211_check⟩ + +private theorem k16t8_cover376 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 3], HasCheckedCertificate 16 8 ([[], [], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover377 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 3, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p212, Certificates.k16t8p212_check⟩ + +private theorem k16t8_cover378 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 4], HasCheckedCertificate 16 8 ([[], [], [1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover380 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 16 8 ([[], [], [1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p213, Certificates.k16t8p213_check⟩ + +private theorem k16t8_cover381 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[], [], [1, 1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p214, Certificates.k16t8p214_check⟩ + +private theorem k16t8_cover379 : ∀ P ∈ pathPatterns 2 3 [1, 1, 3], HasCheckedCertificate 16 8 ([[], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover380 + · exact by + intro _ + exact k16t8_cover381 + +private theorem k16t8_cover382 : ∀ P ∈ pathPatterns 1 2 [1, 1, 3, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover383 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3, 1, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p215, Certificates.k16t8p215_check⟩ + +private theorem k16t8_cover384 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1, 2], HasCheckedCertificate 16 8 ([[], [], [1, 1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p216, Certificates.k16t8p216_check⟩ + +private theorem k16t8_cover385 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3, 2], HasCheckedCertificate 16 8 ([[], [], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover386 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 2, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 3, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p217, Certificates.k16t8p217_check⟩ + +private theorem k16t8_cover387 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 3], HasCheckedCertificate 16 8 ([[], [], [1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover389 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[], [], [1, 1, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p218, Certificates.k16t8p218_check⟩ + +private theorem k16t8_cover388 : ∀ P ∈ pathPatterns 2 2 [1, 1, 4], HasCheckedCertificate 16 8 ([[], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover389 + +private theorem k16t8_cover390 : ∀ P ∈ pathPatterns 1 1 [1, 1, 4, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover391 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4, 1, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 4, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p219, Certificates.k16t8p219_check⟩ + +private theorem k16t8_cover392 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4, 2], HasCheckedCertificate 16 8 ([[], [], [1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover393 : ∀ P ∈ pathPatterns 2 1 [1, 1, 5], HasCheckedCertificate 16 8 ([[], [], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover394 : ∀ P ∈ pathPatterns 1 0 [1, 1, 5, 1], HasCheckedCertificate 16 8 ([[], [], [1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover395 : ∀ P ∈ pathPatterns 2 0 [1, 1, 6], HasCheckedCertificate 16 8 ([[], [], [1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq329 : amountSequenceForall 3 6 (fun tail => + (LexLE [] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1, 1] ++ tail).length) (8 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 16 8 ([[], []] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover330 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover345 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover350 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover351 + · exact by + intro _ + exact k16t8_cover352 + · exact by + intro _ + exact k16t8_cover353 + · exact by + intro _ + exact k16t8_cover354 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover355 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover356 + · exact by + intro _ + exact k16t8_cover357 + · exact by + intro _ + exact k16t8_cover358 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover359 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover360 + · exact by + intro _ + exact k16t8_cover361 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover362 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover363 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover364 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover365 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover369 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover370 + · exact by + intro _ + exact k16t8_cover371 + · exact by + intro _ + exact k16t8_cover372 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover373 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover374 + · exact by + intro _ + exact k16t8_cover375 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover376 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover377 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover378 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover379 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover382 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover383 + · exact by + intro _ + exact k16t8_cover384 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover385 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover386 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover387 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover388 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover390 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover391 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover392 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover393 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover394 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover395 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover398 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 16 8 ([[], [], [1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p220, Certificates.k16t8p220_check⟩ + +private theorem k16t8_cover399 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 16 8 ([[], [], [1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p221, Certificates.k16t8p221_check⟩ + +private theorem k16t8_cover400 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 16 8 ([[], [], [1, 2], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p222, Certificates.k16t8p222_check⟩ + +private theorem k16t8_cover401 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 16 8 ([[], [], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover402 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 16 8 ([[], [], [1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p223, Certificates.k16t8p223_check⟩ + +private theorem k16t8_cover403 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 16 8 ([[], [], [1, 2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p224, Certificates.k16t8p224_check⟩ + +private theorem k16t8_cover404 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 16 8 ([[], [], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover405 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 16 8 ([[], [], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover406 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 16 8 ([[], [], [1, 2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover397 : ∀ P ∈ pathPatterns 3 5 [1, 2], HasCheckedCertificate 16 8 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k16t8_cover398 + · exact by + intro _ + exact k16t8_cover399 + · exact by + intro _ + exact k16t8_cover400 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover401 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover402 + · exact by + intro _ + exact k16t8_cover403 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover404 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover405 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover406 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover408 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 16 8 ([[], [], [1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p225, Certificates.k16t8p225_check⟩ + +private theorem k16t8_cover409 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 16 8 ([[], [], [1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p226, Certificates.k16t8p226_check⟩ + +private theorem k16t8_cover410 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 16 8 ([[], [], [1, 2, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p227, Certificates.k16t8p227_check⟩ + +private theorem k16t8_cover407 : ∀ P ∈ pathPatterns 2 4 [1, 2, 1], HasCheckedCertificate 16 8 ([[], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover408 + · exact by + intro _ + exact k16t8_cover409 + · exact by + intro _ + exact k16t8_cover410 + +private theorem k16t8_cover411 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [], [1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p228, Certificates.k16t8p228_check⟩ + +private theorem k16t8_cover412 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [], [1, 2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p229, Certificates.k16t8p229_check⟩ + +private theorem k16t8_cover413 : ∀ P ∈ pathPatterns 1 2 [1, 2, 1, 2], HasCheckedCertificate 16 8 ([[], [], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover414 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 2, 1], HasCheckedCertificate 16 8 ([[], [], [1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p230, Certificates.k16t8p230_check⟩ + +private theorem k16t8_cover415 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2, 2], HasCheckedCertificate 16 8 ([[], [], [1, 2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p231, Certificates.k16t8p231_check⟩ + +private theorem k16t8_cover416 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 3], HasCheckedCertificate 16 8 ([[], [], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover417 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 3, 1], HasCheckedCertificate 16 8 ([[], [], [1, 2, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p232, Certificates.k16t8p232_check⟩ + +private theorem k16t8_cover418 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 4], HasCheckedCertificate 16 8 ([[], [], [1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover420 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 16 8 ([[], [], [1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p233, Certificates.k16t8p233_check⟩ + +private theorem k16t8_cover421 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[], [], [1, 2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p234, Certificates.k16t8p234_check⟩ + +private theorem k16t8_cover419 : ∀ P ∈ pathPatterns 2 3 [1, 2, 2], HasCheckedCertificate 16 8 ([[], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover420 + · exact by + intro _ + exact k16t8_cover421 + +private theorem k16t8_cover422 : ∀ P ∈ pathPatterns 1 2 [1, 2, 2, 1], HasCheckedCertificate 16 8 ([[], [], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover423 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 1, 2], HasCheckedCertificate 16 8 ([[], [], [1, 2, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p235, Certificates.k16t8p235_check⟩ + +private theorem k16t8_cover424 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2, 2], HasCheckedCertificate 16 8 ([[], [], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover425 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 2, 1], HasCheckedCertificate 16 8 ([[], [], [1, 2, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p236, Certificates.k16t8p236_check⟩ + +private theorem k16t8_cover426 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 3], HasCheckedCertificate 16 8 ([[], [], [1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover428 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[], [], [1, 2, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p237, Certificates.k16t8p237_check⟩ + +private theorem k16t8_cover427 : ∀ P ∈ pathPatterns 2 2 [1, 2, 3], HasCheckedCertificate 16 8 ([[], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover428 + +private theorem k16t8_cover429 : ∀ P ∈ pathPatterns 1 1 [1, 2, 3, 1], HasCheckedCertificate 16 8 ([[], [], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover430 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3, 2], HasCheckedCertificate 16 8 ([[], [], [1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover431 : ∀ P ∈ pathPatterns 2 1 [1, 2, 4], HasCheckedCertificate 16 8 ([[], [], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover432 : ∀ P ∈ pathPatterns 1 0 [1, 2, 4, 1], HasCheckedCertificate 16 8 ([[], [], [1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover433 : ∀ P ∈ pathPatterns 2 0 [1, 2, 5], HasCheckedCertificate 16 8 ([[], [], [1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq396 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([1, 2] ++ tail) ∧ LexLE ([1, 2] ++ tail) ([1, 2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1, 2] ++ tail).length) (8 - ([1, 2] ++ tail).sum) ([1, 2] ++ tail), + HasCheckedCertificate 16 8 ([[], []] ++ (([1, 2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover397 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover407 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · exact by + intro _ + exact k16t8_cover411 + · exact by + intro _ + exact k16t8_cover412 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover413 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover414 + · exact by + intro _ + exact k16t8_cover415 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover416 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover417 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover418 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover419 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover422 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · exact by + intro _ + exact k16t8_cover423 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover424 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover425 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover426 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover427 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover429 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 3, 1, 1] ∧ LexLE [1, 2, 3, 1, 1] [1, 1, 3, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover430 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover431 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover432 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover433 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover435 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 16 8 ([[], [], [1, 3], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p238, Certificates.k16t8p238_check⟩ + +private theorem k16t8_cover436 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 16 8 ([[], [], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover437 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 16 8 ([[], [], [1, 3], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p239, Certificates.k16t8p239_check⟩ + +private theorem k16t8_cover438 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 16 8 ([[], [], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover439 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 16 8 ([[], [], [1, 3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover434 : ∀ P ∈ pathPatterns 3 4 [1, 3], HasCheckedCertificate 16 8 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro _ + exact k16t8_cover435 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover436 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover437 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover438 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover439 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover441 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 16 8 ([[], [], [1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p240, Certificates.k16t8p240_check⟩ + +private theorem k16t8_cover442 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[], [], [1, 3, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p241, Certificates.k16t8p241_check⟩ + +private theorem k16t8_cover440 : ∀ P ∈ pathPatterns 2 3 [1, 3, 1], HasCheckedCertificate 16 8 ([[], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover441 + · exact by + intro _ + exact k16t8_cover442 + +private theorem k16t8_cover443 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [], [1, 3, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p242, Certificates.k16t8p242_check⟩ + +private theorem k16t8_cover444 : ∀ P ∈ pathPatterns 1 1 [1, 3, 1, 2], HasCheckedCertificate 16 8 ([[], [], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover445 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1, 3], HasCheckedCertificate 16 8 ([[], [], [1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover447 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[], [], [1, 3, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p243, Certificates.k16t8p243_check⟩ + +private theorem k16t8_cover446 : ∀ P ∈ pathPatterns 2 2 [1, 3, 2], HasCheckedCertificate 16 8 ([[], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover447 + +private theorem k16t8_cover448 : ∀ P ∈ pathPatterns 1 0 [1, 3, 2, 2], HasCheckedCertificate 16 8 ([[], [], [1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover449 : ∀ P ∈ pathPatterns 2 1 [1, 3, 3], HasCheckedCertificate 16 8 ([[], [], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover450 : ∀ P ∈ pathPatterns 1 0 [1, 3, 3, 1], HasCheckedCertificate 16 8 ([[], [], [1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover451 : ∀ P ∈ pathPatterns 2 0 [1, 3, 4], HasCheckedCertificate 16 8 ([[], [], [1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover453 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 16 8 ([[], [], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover454 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 16 8 ([[], [], [1, 4], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover452 : ∀ P ∈ pathPatterns 3 3 [1, 4], HasCheckedCertificate 16 8 ([[], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover453 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover454 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover456 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[], [], [1, 4, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p244, Certificates.k16t8p244_check⟩ + +private theorem k16t8_cover455 : ∀ P ∈ pathPatterns 2 2 [1, 4, 1], HasCheckedCertificate 16 8 ([[], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover456 + +private theorem k16t8_cover457 : ∀ P ∈ pathPatterns 1 0 [1, 4, 1, 2], HasCheckedCertificate 16 8 ([[], [], [1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover458 : ∀ P ∈ pathPatterns 2 1 [1, 4, 2], HasCheckedCertificate 16 8 ([[], [], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover459 : ∀ P ∈ pathPatterns 2 0 [1, 4, 3], HasCheckedCertificate 16 8 ([[], [], [1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover461 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 16 8 ([[], [], [1, 5], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover460 : ∀ P ∈ pathPatterns 3 2 [1, 5], HasCheckedCertificate 16 8 ([[], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover461 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover462 : ∀ P ∈ pathPatterns 2 1 [1, 5, 1], HasCheckedCertificate 16 8 ([[], [], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover463 : ∀ P ∈ pathPatterns 2 0 [1, 5, 2], HasCheckedCertificate 16 8 ([[], [], [1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover464 : ∀ P ∈ pathPatterns 3 1 [1, 6], HasCheckedCertificate 16 8 ([[], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover465 : ∀ P ∈ pathPatterns 2 0 [1, 6, 1], HasCheckedCertificate 16 8 ([[], [], [1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover466 : ∀ P ∈ pathPatterns 3 0 [1, 7], HasCheckedCertificate 16 8 ([[], [], [1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq273 : amountSequenceForall 4 7 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1] ++ tail).length) (8 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 16 8 ([[], []] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover274 + · intro q + fin_cases q + · exact k16t8_seq329 + + · exact k16t8_seq396 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover434 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover440 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · exact by + intro _ + exact k16t8_cover443 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover444 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 2, 1] ∧ LexLE [1, 3, 1, 2, 1] [1, 2, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover445 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover446 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1, 1] ∧ LexLE [1, 3, 2, 1, 1] [1, 1, 2, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover448 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover449 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover450 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover451 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover452 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover455 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1, 1] ∧ LexLE [1, 4, 1, 1, 1] [1, 1, 1, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover457 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover458 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 2, 1] ∧ LexLE [1, 4, 2, 1] [1, 2, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover459 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover460 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover462 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 1, 1] ∧ LexLE [1, 5, 1, 1] [1, 1, 5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover463 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover464 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover465 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover466 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover471 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 16 8 ([[], [], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p245, Certificates.k16t8p245_check⟩ + +private theorem k16t8_cover472 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 16 8 ([[], [], [2], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p246, Certificates.k16t8p246_check⟩ + +private theorem k16t8_cover473 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 16 8 ([[], [], [2], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p247, Certificates.k16t8p247_check⟩ + +private theorem k16t8_cover470 : ∀ P ∈ pathPatterns 2 4 [2], HasCheckedCertificate 16 8 ([[], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover471 + · exact by + intro _ + exact k16t8_cover472 + · exact by + intro _ + exact k16t8_cover473 + +private theorem k16t8_cover474 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2], HasCheckedCertificate 16 8 ([[], [], [2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p248, Certificates.k16t8p248_check⟩ + +private theorem k16t8_cover475 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3], HasCheckedCertificate 16 8 ([[], [], [2], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p249, Certificates.k16t8p249_check⟩ + +private theorem k16t8_cover476 : ∀ P ∈ pathPatterns 1 2 [2, 2], HasCheckedCertificate 16 8 ([[], [], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover477 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2], HasCheckedCertificate 16 8 ([[], [], [2], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p250, Certificates.k16t8p250_check⟩ + +private theorem k16t8_cover478 : ∀ P ∈ pathPatterns 1 1 [2, 3], HasCheckedCertificate 16 8 ([[], [], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover479 : ∀ P ∈ pathPatterns 1 0 [2, 4], HasCheckedCertificate 16 8 ([[], [], [2], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover481 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[], [], [2], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p251, Certificates.k16t8p251_check⟩ + +private theorem k16t8_cover480 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 16 8 ([[], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k16t8_cover481 + +private theorem k16t8_cover482 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 16 8 ([[], [], [2], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover483 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 16 8 ([[], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover484 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 16 8 ([[], [], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover485 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 16 8 ([[], [], [2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq469 : amountSequenceForall 3 6 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[], [], [2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 4] ∧ LexLE [1, 1, 4] [4, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 3] ∧ LexLE [1, 2, 3] [3, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 2] ∧ LexLE [1, 3, 2] [2, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4, 1] ∧ LexLE [1, 4, 1] [1, 4, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover470 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover474 + · exact by + intro _ + exact k16t8_cover475 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover476 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k16t8_cover477 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover478 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover479 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover480 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover482 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover483 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover484 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover485 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover468 : ∀ P ∈ pathPatterns 4 6 [2], HasCheckedCertificate 16 8 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq469 + + +private theorem k16t8_cover487 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [], [2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p252, Certificates.k16t8p252_check⟩ + +private theorem k16t8_cover488 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [], [2, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p253, Certificates.k16t8p253_check⟩ + +private theorem k16t8_cover489 : ∀ P ∈ pathPatterns 1 2 [2, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover490 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 2, 2], HasCheckedCertificate 16 8 ([[], [], [2, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p254, Certificates.k16t8p254_check⟩ + +private theorem k16t8_cover491 : ∀ P ∈ pathPatterns 1 1 [2, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover492 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 4], HasCheckedCertificate 16 8 ([[], [], [2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover494 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[], [], [2, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p255, Certificates.k16t8p255_check⟩ + +private theorem k16t8_cover493 : ∀ P ∈ pathPatterns 2 3 [2, 1, 2], HasCheckedCertificate 16 8 ([[], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k16t8_cover494 + +private theorem k16t8_cover495 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 1, 2], HasCheckedCertificate 16 8 ([[], [], [2, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p256, Certificates.k16t8p256_check⟩ + +private theorem k16t8_cover496 : ∀ P ∈ pathPatterns 1 1 [2, 1, 2, 2], HasCheckedCertificate 16 8 ([[], [], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover497 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2, 3], HasCheckedCertificate 16 8 ([[], [], [2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover498 : ∀ P ∈ pathPatterns 2 2 [2, 1, 3], HasCheckedCertificate 16 8 ([[], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover499 : ∀ P ∈ pathPatterns 1 0 [2, 1, 3, 2], HasCheckedCertificate 16 8 ([[], [], [2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover500 : ∀ P ∈ pathPatterns 2 1 [2, 1, 4], HasCheckedCertificate 16 8 ([[], [], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover501 : ∀ P ∈ pathPatterns 2 0 [2, 1, 5], HasCheckedCertificate 16 8 ([[], [], [2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq486 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([2, 1] ++ tail) ∧ LexLE ([2, 1] ++ tail) ([2, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([2, 1] ++ tail).length) (8 - ([2, 1] ++ tail).sum) ([2, 1] ++ tail), + HasCheckedCertificate 16 8 ([[], []] ++ (([2, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover487 + · exact by + intro _ + exact k16t8_cover488 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover489 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover490 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover491 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 3, 1] ∧ LexLE [2, 1, 1, 3, 1] [1, 3, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover492 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover493 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover495 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover496 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 2, 1] ∧ LexLE [2, 1, 2, 2, 1] [1, 2, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover497 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover498 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1, 1] ∧ LexLE [2, 1, 3, 1, 1] [1, 1, 3, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover499 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover500 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 4, 1] ∧ LexLE [2, 1, 4, 1] [1, 4, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover501 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover503 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 16 8 ([[], [], [2, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p257, Certificates.k16t8p257_check⟩ + +private theorem k16t8_cover504 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 16 8 ([[], [], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover505 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 16 8 ([[], [], [2, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover502 : ∀ P ∈ pathPatterns 3 4 [2, 2], HasCheckedCertificate 16 8 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover503 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover504 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover505 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover506 : ∀ P ∈ pathPatterns 1 0 [2, 2, 1, 3], HasCheckedCertificate 16 8 ([[], [], [2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover507 : ∀ P ∈ pathPatterns 2 2 [2, 2, 2], HasCheckedCertificate 16 8 ([[], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover508 : ∀ P ∈ pathPatterns 1 0 [2, 2, 2, 2], HasCheckedCertificate 16 8 ([[], [], [2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover509 : ∀ P ∈ pathPatterns 2 1 [2, 2, 3], HasCheckedCertificate 16 8 ([[], [], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover510 : ∀ P ∈ pathPatterns 2 0 [2, 2, 4], HasCheckedCertificate 16 8 ([[], [], [2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover512 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 16 8 ([[], [], [2, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover511 : ∀ P ∈ pathPatterns 3 3 [2, 3], HasCheckedCertificate 16 8 ([[], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover512 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover513 : ∀ P ∈ pathPatterns 2 1 [2, 3, 2], HasCheckedCertificate 16 8 ([[], [], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover514 : ∀ P ∈ pathPatterns 2 0 [2, 3, 3], HasCheckedCertificate 16 8 ([[], [], [2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover515 : ∀ P ∈ pathPatterns 3 2 [2, 4], HasCheckedCertificate 16 8 ([[], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover516 : ∀ P ∈ pathPatterns 2 0 [2, 4, 2], HasCheckedCertificate 16 8 ([[], [], [2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover517 : ∀ P ∈ pathPatterns 3 1 [2, 5], HasCheckedCertificate 16 8 ([[], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover518 : ∀ P ∈ pathPatterns 3 0 [2, 6], HasCheckedCertificate 16 8 ([[], [], [2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq467 : amountSequenceForall 4 6 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([2] ++ tail).length) (8 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 16 8 ([[], []] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover468 + · intro q + fin_cases q + · exact k16t8_seq486 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover502 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 2] ∧ LexLE [2, 2, 1, 1, 2] [2, 1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2, 1] ∧ LexLE [2, 2, 1, 2, 1] [1, 2, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover506 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover507 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1, 1] ∧ LexLE [2, 2, 2, 1, 1] [1, 1, 2, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover508 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover509 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 3, 1] ∧ LexLE [2, 2, 3, 1] [1, 3, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover510 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover511 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1, 1] ∧ LexLE [2, 3, 1, 1, 1] [1, 1, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 2] ∧ LexLE [2, 3, 1, 2] [2, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover513 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 1] ∧ LexLE [2, 3, 2, 1] [1, 2, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover514 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover515 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 1] ∧ LexLE [2, 4, 1, 1] [1, 1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover516 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover517 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover518 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover522 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 16 8 ([[], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover523 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 16 8 ([[], [], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover524 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 16 8 ([[], [], [3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq521 : amountSequenceForall 3 5 (fun tail => + (LexLE [3] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[], [], [3]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 2] ∧ LexLE [2, 1, 2] [2, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover522 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover523 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover524 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover520 : ∀ P ∈ pathPatterns 4 5 [3], HasCheckedCertificate 16 8 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq521 + + +private theorem k16t8_cover525 : ∀ P ∈ pathPatterns 1 0 [3, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [], [3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover526 : ∀ P ∈ pathPatterns 2 1 [3, 1, 3], HasCheckedCertificate 16 8 ([[], [], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover527 : ∀ P ∈ pathPatterns 2 0 [3, 1, 4], HasCheckedCertificate 16 8 ([[], [], [3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover528 : ∀ P ∈ pathPatterns 2 0 [3, 2, 3], HasCheckedCertificate 16 8 ([[], [], [3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover529 : ∀ P ∈ pathPatterns 3 2 [3, 3], HasCheckedCertificate 16 8 ([[], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover530 : ∀ P ∈ pathPatterns 3 1 [3, 4], HasCheckedCertificate 16 8 ([[], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover531 : ∀ P ∈ pathPatterns 3 0 [3, 5], HasCheckedCertificate 16 8 ([[], [], [3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq519 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([3] ++ tail) ∧ LexLE ([3] ++ tail) ([3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([3] ++ tail).length) (8 - ([3] ++ tail).sum) ([3] ++ tail), + HasCheckedCertificate 16 8 ([[], []] ++ (([3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover520 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 2] ∧ LexLE [3, 1, 1, 1, 2] [2, 1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2, 1] ∧ LexLE [3, 1, 1, 2, 1] [1, 2, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover525 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1, 1] ∧ LexLE [3, 1, 2, 1, 1] [1, 1, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 2] ∧ LexLE [3, 1, 2, 2] [2, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover526 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 1] ∧ LexLE [3, 1, 3, 1] [1, 3, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover527 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1, 1] ∧ LexLE [3, 2, 1, 1, 1] [1, 1, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 2] ∧ LexLE [3, 2, 1, 2] [2, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 1] ∧ LexLE [3, 2, 2, 1] [1, 2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover528 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover529 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 1] ∧ LexLE [3, 3, 1, 1] [1, 1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover530 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover531 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover533 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 16 8 ([[], [], [4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover532 : ∀ P ∈ pathPatterns 4 4 [4], HasCheckedCertificate 16 8 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover533 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover534 : ∀ P ∈ pathPatterns 3 0 [4, 4], HasCheckedCertificate 16 8 ([[], [], [4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover535 : ∀ P ∈ pathPatterns 4 3 [5], HasCheckedCertificate 16 8 ([[], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover536 : ∀ P ∈ pathPatterns 4 2 [6], HasCheckedCertificate 16 8 ([[], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover537 : ∀ P ∈ pathPatterns 4 1 [7], HasCheckedCertificate 16 8 ([[], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover538 : ∀ P ∈ pathPatterns 4 0 [8], HasCheckedCertificate 16 8 ([[], [], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq6 : amountSequenceForall 5 8 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (8 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover7 + · intro q + fin_cases q + · exact k16t8_seq273 + + · exact k16t8_seq467 + + · exact k16t8_seq519 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover532 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1, 1] ∧ LexLE [4, 1, 1, 1, 1] [1, 1, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 2] ∧ LexLE [4, 1, 1, 2] [2, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 1] ∧ LexLE [4, 1, 2, 1] [1, 2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 1] ∧ LexLE [4, 2, 1, 1] [1, 1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover534 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover535 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 1] ∧ LexLE [5, 1, 1, 1] [1, 1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover536 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover537 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover538 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover5 : ∀ P ∈ pathPatterns 6 8 [], HasCheckedCertificate 16 8 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq6 + + +private theorem k16t8_cover544 : ∀ P ∈ pathPatterns 1 5 [1], HasCheckedCertificate 16 8 ([[], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover545 : ∀ P ∈ pathPatterns 0 4 [1, 1], HasCheckedCertificate 16 8 ([[], [1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p258, Certificates.k16t8p258_check⟩ + +private theorem k16t8_cover546 : ∀ P ∈ pathPatterns 0 3 [1, 2], HasCheckedCertificate 16 8 ([[], [1], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p259, Certificates.k16t8p259_check⟩ + +private theorem k16t8_cover547 : ∀ P ∈ pathPatterns 0 2 [1, 3], HasCheckedCertificate 16 8 ([[], [1], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p260, Certificates.k16t8p260_check⟩ + +private theorem k16t8_cover548 : ∀ P ∈ pathPatterns 0 1 [1, 4], HasCheckedCertificate 16 8 ([[], [1], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p261, Certificates.k16t8p261_check⟩ + +private theorem k16t8_cover549 : ∀ P ∈ pathPatterns 0 0 [1, 5], HasCheckedCertificate 16 8 ([[], [1], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p262, Certificates.k16t8p262_check⟩ + +private theorem k16t8_cover550 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 16 8 ([[], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover551 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 16 8 ([[], [1], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p263, Certificates.k16t8p263_check⟩ + +private theorem k16t8_cover552 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 16 8 ([[], [1], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p264, Certificates.k16t8p264_check⟩ + +private theorem k16t8_cover553 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 16 8 ([[], [1], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p265, Certificates.k16t8p265_check⟩ + +private theorem k16t8_cover554 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 16 8 ([[], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover555 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 16 8 ([[], [1], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p266, Certificates.k16t8p266_check⟩ + +private theorem k16t8_cover556 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 16 8 ([[], [1], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover557 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 16 8 ([[], [1], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover558 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 16 8 ([[], [1], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover543 : ∀ P ∈ pathPatterns 3 6 [1], HasCheckedCertificate 16 8 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover544 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover545 + · exact by + intro _ + exact k16t8_cover546 + · exact by + intro _ + exact k16t8_cover547 + · exact by + intro _ + exact k16t8_cover548 + · exact by + intro _ + exact k16t8_cover549 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover550 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover551 + · exact by + intro _ + exact k16t8_cover552 + · exact by + intro _ + exact k16t8_cover553 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover554 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k16t8_cover555 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover556 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover557 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover558 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover560 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 16 8 ([[], [1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p267, Certificates.k16t8p267_check⟩ + +private theorem k16t8_cover561 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 16 8 ([[], [1], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p268, Certificates.k16t8p268_check⟩ + +private theorem k16t8_cover562 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 16 8 ([[], [1], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p269, Certificates.k16t8p269_check⟩ + +private theorem k16t8_cover563 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 16 8 ([[], [1], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p270, Certificates.k16t8p270_check⟩ + +private theorem k16t8_cover559 : ∀ P ∈ pathPatterns 2 5 [1, 1], HasCheckedCertificate 16 8 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover560 + · exact by + intro _ + exact k16t8_cover561 + · exact by + intro _ + exact k16t8_cover562 + · exact by + intro _ + exact k16t8_cover563 + +private theorem k16t8_cover564 : ∀ P ∈ pathPatterns 1 4 [1, 1, 1], HasCheckedCertificate 16 8 ([[], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover565 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 1], HasCheckedCertificate 16 8 ([[], [1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p271, Certificates.k16t8p271_check⟩ + +private theorem k16t8_cover566 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [1], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p272, Certificates.k16t8p272_check⟩ + +private theorem k16t8_cover567 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [1], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p273, Certificates.k16t8p273_check⟩ + +private theorem k16t8_cover568 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 4], HasCheckedCertificate 16 8 ([[], [1], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p274, Certificates.k16t8p274_check⟩ + +private theorem k16t8_cover569 : ∀ P ∈ pathPatterns 1 3 [1, 1, 2], HasCheckedCertificate 16 8 ([[], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover570 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2, 1], HasCheckedCertificate 16 8 ([[], [1], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p275, Certificates.k16t8p275_check⟩ + +private theorem k16t8_cover571 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 2], HasCheckedCertificate 16 8 ([[], [1], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p276, Certificates.k16t8p276_check⟩ + +private theorem k16t8_cover572 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 3], HasCheckedCertificate 16 8 ([[], [1], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p277, Certificates.k16t8p277_check⟩ + +private theorem k16t8_cover573 : ∀ P ∈ pathPatterns 1 2 [1, 1, 3], HasCheckedCertificate 16 8 ([[], [1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover574 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3, 1], HasCheckedCertificate 16 8 ([[], [1], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p278, Certificates.k16t8p278_check⟩ + +private theorem k16t8_cover575 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 2], HasCheckedCertificate 16 8 ([[], [1], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p279, Certificates.k16t8p279_check⟩ + +private theorem k16t8_cover576 : ∀ P ∈ pathPatterns 1 1 [1, 1, 4], HasCheckedCertificate 16 8 ([[], [1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover577 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4, 1], HasCheckedCertificate 16 8 ([[], [1], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p280, Certificates.k16t8p280_check⟩ + +private theorem k16t8_cover578 : ∀ P ∈ pathPatterns 1 0 [1, 1, 5], HasCheckedCertificate 16 8 ([[], [1], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover580 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 16 8 ([[], [1], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p281, Certificates.k16t8p281_check⟩ + +private theorem k16t8_cover581 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 16 8 ([[], [1], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p282, Certificates.k16t8p282_check⟩ + +private theorem k16t8_cover582 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 16 8 ([[], [1], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p283, Certificates.k16t8p283_check⟩ + +private theorem k16t8_cover579 : ∀ P ∈ pathPatterns 2 4 [1, 2], HasCheckedCertificate 16 8 ([[], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover580 + · exact by + intro _ + exact k16t8_cover581 + · exact by + intro _ + exact k16t8_cover582 + +private theorem k16t8_cover583 : ∀ P ∈ pathPatterns 1 3 [1, 2, 1], HasCheckedCertificate 16 8 ([[], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover584 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 2], HasCheckedCertificate 16 8 ([[], [1], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p284, Certificates.k16t8p284_check⟩ + +private theorem k16t8_cover585 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 3], HasCheckedCertificate 16 8 ([[], [1], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p285, Certificates.k16t8p285_check⟩ + +private theorem k16t8_cover586 : ∀ P ∈ pathPatterns 1 2 [1, 2, 2], HasCheckedCertificate 16 8 ([[], [1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover587 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2, 1], HasCheckedCertificate 16 8 ([[], [1], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p286, Certificates.k16t8p286_check⟩ + +private theorem k16t8_cover588 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 2], HasCheckedCertificate 16 8 ([[], [1], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p287, Certificates.k16t8p287_check⟩ + +private theorem k16t8_cover589 : ∀ P ∈ pathPatterns 1 1 [1, 2, 3], HasCheckedCertificate 16 8 ([[], [1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover590 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3, 1], HasCheckedCertificate 16 8 ([[], [1], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p288, Certificates.k16t8p288_check⟩ + +private theorem k16t8_cover591 : ∀ P ∈ pathPatterns 1 0 [1, 2, 4], HasCheckedCertificate 16 8 ([[], [1], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover593 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 16 8 ([[], [1], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p289, Certificates.k16t8p289_check⟩ + +private theorem k16t8_cover594 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[], [1], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p290, Certificates.k16t8p290_check⟩ + +private theorem k16t8_cover592 : ∀ P ∈ pathPatterns 2 3 [1, 3], HasCheckedCertificate 16 8 ([[], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover593 + · exact by + intro _ + exact k16t8_cover594 + +private theorem k16t8_cover595 : ∀ P ∈ pathPatterns 1 2 [1, 3, 1], HasCheckedCertificate 16 8 ([[], [1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover596 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 2], HasCheckedCertificate 16 8 ([[], [1], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p291, Certificates.k16t8p291_check⟩ + +private theorem k16t8_cover597 : ∀ P ∈ pathPatterns 1 1 [1, 3, 2], HasCheckedCertificate 16 8 ([[], [1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover598 : ∀ P ∈ pathPatterns 1 0 [1, 3, 3], HasCheckedCertificate 16 8 ([[], [1], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover600 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[], [1], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p292, Certificates.k16t8p292_check⟩ + +private theorem k16t8_cover599 : ∀ P ∈ pathPatterns 2 2 [1, 4], HasCheckedCertificate 16 8 ([[], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover600 + +private theorem k16t8_cover601 : ∀ P ∈ pathPatterns 1 1 [1, 4, 1], HasCheckedCertificate 16 8 ([[], [1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover602 : ∀ P ∈ pathPatterns 1 0 [1, 4, 2], HasCheckedCertificate 16 8 ([[], [1], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover603 : ∀ P ∈ pathPatterns 2 1 [1, 5], HasCheckedCertificate 16 8 ([[], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover604 : ∀ P ∈ pathPatterns 1 0 [1, 5, 1], HasCheckedCertificate 16 8 ([[], [1], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover605 : ∀ P ∈ pathPatterns 2 0 [1, 6], HasCheckedCertificate 16 8 ([[], [1], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq542 : amountSequenceForall 3 6 (fun tail => + (LexLE [1] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (7 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 16 8 ([[], [1]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover543 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover559 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover564 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover565 + · exact by + intro _ + exact k16t8_cover566 + · exact by + intro _ + exact k16t8_cover567 + · exact by + intro _ + exact k16t8_cover568 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover569 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover570 + · exact by + intro _ + exact k16t8_cover571 + · exact by + intro _ + exact k16t8_cover572 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover573 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover574 + · exact by + intro _ + exact k16t8_cover575 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover576 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover577 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover578 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover579 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover583 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k16t8_cover584 + · exact by + intro _ + exact k16t8_cover585 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover586 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover587 + · exact by + intro _ + exact k16t8_cover588 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover589 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover590 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover591 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover592 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover595 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + intro _ + exact k16t8_cover596 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover597 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover598 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover599 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover601 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover602 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover603 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover604 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover605 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover608 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 16 8 ([[], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover609 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 16 8 ([[], [1], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p293, Certificates.k16t8p293_check⟩ + +private theorem k16t8_cover610 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 16 8 ([[], [1], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p294, Certificates.k16t8p294_check⟩ + +private theorem k16t8_cover611 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 16 8 ([[], [1], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover612 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 16 8 ([[], [1], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover613 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 16 8 ([[], [1], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover607 : ∀ P ∈ pathPatterns 3 5 [2], HasCheckedCertificate 16 8 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover608 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover609 + · exact by + intro _ + exact k16t8_cover610 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover611 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover612 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover613 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover614 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [1], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p295, Certificates.k16t8p295_check⟩ + +private theorem k16t8_cover615 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [1], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p296, Certificates.k16t8p296_check⟩ + +private theorem k16t8_cover616 : ∀ P ∈ pathPatterns 1 2 [2, 1, 2], HasCheckedCertificate 16 8 ([[], [1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover617 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 2], HasCheckedCertificate 16 8 ([[], [1], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p297, Certificates.k16t8p297_check⟩ + +private theorem k16t8_cover618 : ∀ P ∈ pathPatterns 1 1 [2, 1, 3], HasCheckedCertificate 16 8 ([[], [1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover619 : ∀ P ∈ pathPatterns 1 0 [2, 1, 4], HasCheckedCertificate 16 8 ([[], [1], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover621 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[], [1], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p298, Certificates.k16t8p298_check⟩ + +private theorem k16t8_cover620 : ∀ P ∈ pathPatterns 2 3 [2, 2], HasCheckedCertificate 16 8 ([[], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k16t8_cover621 + +private theorem k16t8_cover622 : ∀ P ∈ pathPatterns 1 1 [2, 2, 2], HasCheckedCertificate 16 8 ([[], [1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover623 : ∀ P ∈ pathPatterns 1 0 [2, 2, 3], HasCheckedCertificate 16 8 ([[], [1], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover624 : ∀ P ∈ pathPatterns 2 2 [2, 3], HasCheckedCertificate 16 8 ([[], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover625 : ∀ P ∈ pathPatterns 1 0 [2, 3, 2], HasCheckedCertificate 16 8 ([[], [1], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover626 : ∀ P ∈ pathPatterns 2 1 [2, 4], HasCheckedCertificate 16 8 ([[], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover627 : ∀ P ∈ pathPatterns 2 0 [2, 5], HasCheckedCertificate 16 8 ([[], [1], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq606 : amountSequenceForall 3 5 (fun tail => + (LexLE [1] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([2] ++ tail).length) (7 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 16 8 ([[], [1]] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover607 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover614 + · exact by + intro _ + exact k16t8_cover615 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover616 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover617 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover618 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover619 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover620 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover622 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover623 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover624 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover625 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover626 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover627 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover629 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 16 8 ([[], [1], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover630 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 16 8 ([[], [1], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover628 : ∀ P ∈ pathPatterns 3 4 [3], HasCheckedCertificate 16 8 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover629 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover630 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover631 : ∀ P ∈ pathPatterns 1 0 [3, 1, 3], HasCheckedCertificate 16 8 ([[], [1], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover632 : ∀ P ∈ pathPatterns 2 1 [3, 3], HasCheckedCertificate 16 8 ([[], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover633 : ∀ P ∈ pathPatterns 2 0 [3, 4], HasCheckedCertificate 16 8 ([[], [1], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover634 : ∀ P ∈ pathPatterns 3 3 [4], HasCheckedCertificate 16 8 ([[], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover635 : ∀ P ∈ pathPatterns 3 2 [5], HasCheckedCertificate 16 8 ([[], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover636 : ∀ P ∈ pathPatterns 3 1 [6], HasCheckedCertificate 16 8 ([[], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover637 : ∀ P ∈ pathPatterns 3 0 [7], HasCheckedCertificate 16 8 ([[], [1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq541 : amountSequenceForall 4 7 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k16t8_seq542 + + · exact k16t8_seq606 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover628 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover631 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover632 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover633 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover634 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover635 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover636 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover637 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover540 : ∀ P ∈ pathPatterns 5 7 [1], HasCheckedCertificate 16 8 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq541 + + +private theorem k16t8_cover641 : ∀ P ∈ pathPatterns 1 4 [1, 1], HasCheckedCertificate 16 8 ([[], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover642 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1], HasCheckedCertificate 16 8 ([[], [1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p299, Certificates.k16t8p299_check⟩ + +private theorem k16t8_cover643 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p300, Certificates.k16t8p300_check⟩ + +private theorem k16t8_cover644 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3], HasCheckedCertificate 16 8 ([[], [1, 1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p301, Certificates.k16t8p301_check⟩ + +private theorem k16t8_cover645 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4], HasCheckedCertificate 16 8 ([[], [1, 1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p302, Certificates.k16t8p302_check⟩ + +private theorem k16t8_cover646 : ∀ P ∈ pathPatterns 1 3 [1, 2], HasCheckedCertificate 16 8 ([[], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover647 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1], HasCheckedCertificate 16 8 ([[], [1, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p303, Certificates.k16t8p303_check⟩ + +private theorem k16t8_cover648 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2], HasCheckedCertificate 16 8 ([[], [1, 1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p304, Certificates.k16t8p304_check⟩ + +private theorem k16t8_cover649 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3], HasCheckedCertificate 16 8 ([[], [1, 1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p305, Certificates.k16t8p305_check⟩ + +private theorem k16t8_cover650 : ∀ P ∈ pathPatterns 1 2 [1, 3], HasCheckedCertificate 16 8 ([[], [1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover651 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1], HasCheckedCertificate 16 8 ([[], [1, 1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p306, Certificates.k16t8p306_check⟩ + +private theorem k16t8_cover652 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2], HasCheckedCertificate 16 8 ([[], [1, 1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p307, Certificates.k16t8p307_check⟩ + +private theorem k16t8_cover653 : ∀ P ∈ pathPatterns 1 1 [1, 4], HasCheckedCertificate 16 8 ([[], [1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover654 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1], HasCheckedCertificate 16 8 ([[], [1, 1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p308, Certificates.k16t8p308_check⟩ + +private theorem k16t8_cover655 : ∀ P ∈ pathPatterns 1 0 [1, 5], HasCheckedCertificate 16 8 ([[], [1, 1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover657 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 16 8 ([[], [1, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p309, Certificates.k16t8p309_check⟩ + +private theorem k16t8_cover658 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 16 8 ([[], [1, 1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p310, Certificates.k16t8p310_check⟩ + +private theorem k16t8_cover659 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 16 8 ([[], [1, 1], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p311, Certificates.k16t8p311_check⟩ + +private theorem k16t8_cover656 : ∀ P ∈ pathPatterns 2 4 [2], HasCheckedCertificate 16 8 ([[], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover657 + · exact by + intro _ + exact k16t8_cover658 + · exact by + intro _ + exact k16t8_cover659 + +private theorem k16t8_cover660 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p312, Certificates.k16t8p312_check⟩ + +private theorem k16t8_cover661 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3], HasCheckedCertificate 16 8 ([[], [1, 1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p313, Certificates.k16t8p313_check⟩ + +private theorem k16t8_cover662 : ∀ P ∈ pathPatterns 1 2 [2, 2], HasCheckedCertificate 16 8 ([[], [1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover663 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2], HasCheckedCertificate 16 8 ([[], [1, 1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p314, Certificates.k16t8p314_check⟩ + +private theorem k16t8_cover664 : ∀ P ∈ pathPatterns 1 1 [2, 3], HasCheckedCertificate 16 8 ([[], [1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover665 : ∀ P ∈ pathPatterns 1 0 [2, 4], HasCheckedCertificate 16 8 ([[], [1, 1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover667 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[], [1, 1], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p315, Certificates.k16t8p315_check⟩ + +private theorem k16t8_cover666 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 16 8 ([[], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k16t8_cover667 + +private theorem k16t8_cover668 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 16 8 ([[], [1, 1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover669 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 16 8 ([[], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover670 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 16 8 ([[], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover671 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 16 8 ([[], [1, 1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq640 : amountSequenceForall 3 6 (fun tail => + (LexLE [1, 1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[], [1, 1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover641 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover642 + · exact by + intro _ + exact k16t8_cover643 + · exact by + intro _ + exact k16t8_cover644 + · exact by + intro _ + exact k16t8_cover645 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover646 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover647 + · exact by + intro _ + exact k16t8_cover648 + · exact by + intro _ + exact k16t8_cover649 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover650 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover651 + · exact by + intro _ + exact k16t8_cover652 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover653 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover654 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover655 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover656 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover660 + · exact by + intro _ + exact k16t8_cover661 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover662 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k16t8_cover663 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover664 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover665 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover666 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover668 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover669 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover670 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover671 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover639 : ∀ P ∈ pathPatterns 4 6 [1, 1], HasCheckedCertificate 16 8 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq640 + + +private theorem k16t8_cover674 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p316, Certificates.k16t8p316_check⟩ + +private theorem k16t8_cover675 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 16 8 ([[], [1, 1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p317, Certificates.k16t8p317_check⟩ + +private theorem k16t8_cover676 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 16 8 ([[], [1, 1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p318, Certificates.k16t8p318_check⟩ + +private theorem k16t8_cover677 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 16 8 ([[], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover678 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p319, Certificates.k16t8p319_check⟩ + +private theorem k16t8_cover679 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 16 8 ([[], [1, 1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p320, Certificates.k16t8p320_check⟩ + +private theorem k16t8_cover680 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 16 8 ([[], [1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover681 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 16 8 ([[], [1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover682 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 16 8 ([[], [1, 1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover673 : ∀ P ∈ pathPatterns 3 5 [1, 1, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k16t8_cover674 + · exact by + intro _ + exact k16t8_cover675 + · exact by + intro _ + exact k16t8_cover676 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover677 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover678 + · exact by + intro _ + exact k16t8_cover679 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover680 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover681 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover682 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover684 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p321, Certificates.k16t8p321_check⟩ + +private theorem k16t8_cover685 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p322, Certificates.k16t8p322_check⟩ + +private theorem k16t8_cover686 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p323, Certificates.k16t8p323_check⟩ + +private theorem k16t8_cover683 : ∀ P ∈ pathPatterns 2 4 [1, 1, 1, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover684 + · exact by + intro _ + exact k16t8_cover685 + · exact by + intro _ + exact k16t8_cover686 + +private theorem k16t8_cover687 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1, 1, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover688 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1, 1, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p324, Certificates.k16t8p324_check⟩ + +private theorem k16t8_cover689 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p325, Certificates.k16t8p325_check⟩ + +private theorem k16t8_cover690 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p326, Certificates.k16t8p326_check⟩ + +private theorem k16t8_cover691 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover692 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 2, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p327, Certificates.k16t8p327_check⟩ + +private theorem k16t8_cover693 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 2, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p328, Certificates.k16t8p328_check⟩ + +private theorem k16t8_cover694 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover695 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 3, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p329, Certificates.k16t8p329_check⟩ + +private theorem k16t8_cover696 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 4], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover698 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p330, Certificates.k16t8p330_check⟩ + +private theorem k16t8_cover699 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p331, Certificates.k16t8p331_check⟩ + +private theorem k16t8_cover697 : ∀ P ∈ pathPatterns 2 3 [1, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover698 + · exact by + intro _ + exact k16t8_cover699 + +private theorem k16t8_cover700 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 2, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover701 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2, 1, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p332, Certificates.k16t8p332_check⟩ + +private theorem k16t8_cover702 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p333, Certificates.k16t8p333_check⟩ + +private theorem k16t8_cover703 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 2, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover704 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 2, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p334, Certificates.k16t8p334_check⟩ + +private theorem k16t8_cover705 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2, 3], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover707 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p335, Certificates.k16t8p335_check⟩ + +private theorem k16t8_cover706 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover707 + +private theorem k16t8_cover708 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 3, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover709 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3, 1, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p336, Certificates.k16t8p336_check⟩ + +private theorem k16t8_cover710 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 3, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover711 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 4], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover712 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 4, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover713 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 5], HasCheckedCertificate 16 8 ([[], [1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq672 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([1, 1, 1] ++ tail) ∧ LexLE ([1, 1, 1] ++ tail) ([1, 1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1, 1, 1] ++ tail).length) (8 - ([1, 1, 1] ++ tail).sum) ([1, 1, 1] ++ tail), + HasCheckedCertificate 16 8 ([[]] ++ (([1, 1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover673 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover683 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover687 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover688 + · exact by + intro _ + exact k16t8_cover689 + · exact by + intro _ + exact k16t8_cover690 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover691 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover692 + · exact by + intro _ + exact k16t8_cover693 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover694 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover695 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover696 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover697 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover700 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover701 + · exact by + intro _ + exact k16t8_cover702 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover703 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover704 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover705 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover706 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover708 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover709 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover710 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover711 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover712 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover713 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover715 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p337, Certificates.k16t8p337_check⟩ + +private theorem k16t8_cover716 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 16 8 ([[], [1, 1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p338, Certificates.k16t8p338_check⟩ + +private theorem k16t8_cover717 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 16 8 ([[], [1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover718 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p339, Certificates.k16t8p339_check⟩ + +private theorem k16t8_cover719 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 16 8 ([[], [1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover720 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 16 8 ([[], [1, 1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover714 : ∀ P ∈ pathPatterns 3 4 [1, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k16t8_cover715 + · exact by + intro _ + exact k16t8_cover716 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover717 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover718 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover719 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover720 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover722 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p340, Certificates.k16t8p340_check⟩ + +private theorem k16t8_cover723 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p341, Certificates.k16t8p341_check⟩ + +private theorem k16t8_cover721 : ∀ P ∈ pathPatterns 2 3 [1, 1, 2, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover722 + · exact by + intro _ + exact k16t8_cover723 + +private theorem k16t8_cover724 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2, 1, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover725 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p342, Certificates.k16t8p342_check⟩ + +private theorem k16t8_cover726 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover727 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 2, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p343, Certificates.k16t8p343_check⟩ + +private theorem k16t8_cover728 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1, 3], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover730 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p344, Certificates.k16t8p344_check⟩ + +private theorem k16t8_cover729 : ∀ P ∈ pathPatterns 2 2 [1, 1, 2, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover730 + +private theorem k16t8_cover731 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 2, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover732 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2, 1, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p345, Certificates.k16t8p345_check⟩ + +private theorem k16t8_cover733 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 2, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover734 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2, 3], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover735 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 3, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover736 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 4], HasCheckedCertificate 16 8 ([[], [1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover738 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 3], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p346, Certificates.k16t8p346_check⟩ + +private theorem k16t8_cover739 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 16 8 ([[], [1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover740 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 16 8 ([[], [1, 1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover737 : ∀ P ∈ pathPatterns 3 3 [1, 1, 3], HasCheckedCertificate 16 8 ([[], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k16t8_cover738 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover739 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover740 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover742 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[], [1, 1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p347, Certificates.k16t8p347_check⟩ + +private theorem k16t8_cover741 : ∀ P ∈ pathPatterns 2 2 [1, 1, 3, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover742 + +private theorem k16t8_cover743 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3, 1, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover744 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover745 : ∀ P ∈ pathPatterns 2 1 [1, 1, 3, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover746 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 2, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 3, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover747 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3, 3], HasCheckedCertificate 16 8 ([[], [1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover749 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 16 8 ([[], [1, 1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover748 : ∀ P ∈ pathPatterns 3 2 [1, 1, 4], HasCheckedCertificate 16 8 ([[], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover749 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover750 : ∀ P ∈ pathPatterns 2 1 [1, 1, 4, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover751 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4, 1, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 4, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover752 : ∀ P ∈ pathPatterns 2 0 [1, 1, 4, 2], HasCheckedCertificate 16 8 ([[], [1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover753 : ∀ P ∈ pathPatterns 3 1 [1, 1, 5], HasCheckedCertificate 16 8 ([[], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover754 : ∀ P ∈ pathPatterns 2 0 [1, 1, 5, 1], HasCheckedCertificate 16 8 ([[], [1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover755 : ∀ P ∈ pathPatterns 3 0 [1, 1, 6], HasCheckedCertificate 16 8 ([[], [1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq638 : amountSequenceForall 4 6 (fun tail => + (LexLE [] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1, 1] ++ tail).length) (8 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 16 8 ([[]] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover639 + · intro q + fin_cases q + · exact k16t8_seq672 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover714 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover721 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover724 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 2, 1, 1, 1] ∧ LexLE [1, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 1])) h) + · exact by + intro _ + exact k16t8_cover725 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover726 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover727 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover728 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover729 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover731 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover732 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover733 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover734 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover735 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover736 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover737 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover741 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover743 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 3, 1, 1, 1] ∧ LexLE [1, 1, 3, 1, 1, 1] [1, 1, 1, 3, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover744 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover745 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover746 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover747 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover748 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover750 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover751 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover752 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover753 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover754 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover755 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover759 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 16 8 ([[], [1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover760 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 16 8 ([[], [1, 2], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p348, Certificates.k16t8p348_check⟩ + +private theorem k16t8_cover761 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 16 8 ([[], [1, 2], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p349, Certificates.k16t8p349_check⟩ + +private theorem k16t8_cover762 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 16 8 ([[], [1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover763 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 16 8 ([[], [1, 2], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p350, Certificates.k16t8p350_check⟩ + +private theorem k16t8_cover764 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 16 8 ([[], [1, 2], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover766 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 16 8 ([[], [1, 2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p351, Certificates.k16t8p351_check⟩ + +private theorem k16t8_cover767 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[], [1, 2], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p352, Certificates.k16t8p352_check⟩ + +private theorem k16t8_cover765 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 16 8 ([[], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover766 + · exact by + intro _ + exact k16t8_cover767 + +private theorem k16t8_cover768 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p353, Certificates.k16t8p353_check⟩ + +private theorem k16t8_cover769 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 16 8 ([[], [1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover770 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 16 8 ([[], [1, 2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover771 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 16 8 ([[], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover772 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 16 8 ([[], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover773 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 16 8 ([[], [1, 2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq758 : amountSequenceForall 3 5 (fun tail => + (LexLE [1, 2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[], [1, 2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover759 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover760 + · exact by + intro _ + exact k16t8_cover761 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover762 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover763 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover764 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover765 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover768 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover769 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover770 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover771 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover772 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover773 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover757 : ∀ P ∈ pathPatterns 4 5 [1, 2], HasCheckedCertificate 16 8 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq758 + + +private theorem k16t8_cover775 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 16 8 ([[], [1, 2, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p354, Certificates.k16t8p354_check⟩ + +private theorem k16t8_cover776 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 16 8 ([[], [1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover777 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 16 8 ([[], [1, 2, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p355, Certificates.k16t8p355_check⟩ + +private theorem k16t8_cover778 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 16 8 ([[], [1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover779 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 16 8 ([[], [1, 2, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover774 : ∀ P ∈ pathPatterns 3 4 [1, 2, 1], HasCheckedCertificate 16 8 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro _ + exact k16t8_cover775 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover776 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover777 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover778 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover779 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover780 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p356, Certificates.k16t8p356_check⟩ + +private theorem k16t8_cover781 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover782 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 2, 1], HasCheckedCertificate 16 8 ([[], [1, 2, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p357, Certificates.k16t8p357_check⟩ + +private theorem k16t8_cover783 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [1, 2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover785 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[], [1, 2, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p358, Certificates.k16t8p358_check⟩ + +private theorem k16t8_cover784 : ∀ P ∈ pathPatterns 2 2 [1, 2, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover785 + +private theorem k16t8_cover786 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 2, 1], HasCheckedCertificate 16 8 ([[], [1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover787 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 2, 2], HasCheckedCertificate 16 8 ([[], [1, 2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover788 : ∀ P ∈ pathPatterns 2 1 [1, 2, 1, 3], HasCheckedCertificate 16 8 ([[], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover789 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 3, 1], HasCheckedCertificate 16 8 ([[], [1, 2, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover790 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 4], HasCheckedCertificate 16 8 ([[], [1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover792 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 16 8 ([[], [1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover793 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 16 8 ([[], [1, 2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover791 : ∀ P ∈ pathPatterns 3 3 [1, 2, 2], HasCheckedCertificate 16 8 ([[], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover792 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover793 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover795 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[], [1, 2, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p359, Certificates.k16t8p359_check⟩ + +private theorem k16t8_cover794 : ∀ P ∈ pathPatterns 2 2 [1, 2, 2, 1], HasCheckedCertificate 16 8 ([[], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover795 + +private theorem k16t8_cover796 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 2, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover797 : ∀ P ∈ pathPatterns 2 1 [1, 2, 2, 2], HasCheckedCertificate 16 8 ([[], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover798 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 2, 1], HasCheckedCertificate 16 8 ([[], [1, 2, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover799 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2, 3], HasCheckedCertificate 16 8 ([[], [1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover801 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 16 8 ([[], [1, 2, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover800 : ∀ P ∈ pathPatterns 3 2 [1, 2, 3], HasCheckedCertificate 16 8 ([[], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover801 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover802 : ∀ P ∈ pathPatterns 2 1 [1, 2, 3, 1], HasCheckedCertificate 16 8 ([[], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover803 : ∀ P ∈ pathPatterns 2 0 [1, 2, 3, 2], HasCheckedCertificate 16 8 ([[], [1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover804 : ∀ P ∈ pathPatterns 3 1 [1, 2, 4], HasCheckedCertificate 16 8 ([[], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover805 : ∀ P ∈ pathPatterns 2 0 [1, 2, 4, 1], HasCheckedCertificate 16 8 ([[], [1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover806 : ∀ P ∈ pathPatterns 3 0 [1, 2, 5], HasCheckedCertificate 16 8 ([[], [1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq756 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([1, 2] ++ tail) ∧ LexLE ([1, 2] ++ tail) ([1, 2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1, 2] ++ tail).length) (8 - ([1, 2] ++ tail).sum) ([1, 2] ++ tail), + HasCheckedCertificate 16 8 ([[]] ++ (([1, 2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover757 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover774 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 1])) h) + · exact by + intro _ + exact k16t8_cover780 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover781 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover782 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover783 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover784 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover786 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 2, 1, 1] ∧ LexLE [1, 2, 1, 2, 1, 1] [1, 1, 2, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover787 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover788 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover789 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover790 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover791 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover794 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1, 1] ∧ LexLE [1, 2, 2, 1, 1, 1] [1, 1, 1, 2, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover796 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover797 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover798 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover799 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover800 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover802 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 3, 1, 1] ∧ LexLE [1, 2, 3, 1, 1] [1, 1, 3, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover803 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover804 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover805 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover806 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover808 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 16 8 ([[], [1, 3], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover810 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[], [1, 3], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p360, Certificates.k16t8p360_check⟩ + +private theorem k16t8_cover809 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 16 8 ([[], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover810 + +private theorem k16t8_cover811 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 16 8 ([[], [1, 3], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover812 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 16 8 ([[], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover813 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 16 8 ([[], [1, 3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover807 : ∀ P ∈ pathPatterns 4 4 [1, 3], HasCheckedCertificate 16 8 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover808 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover809 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover811 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover812 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover813 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover815 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 16 8 ([[], [1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover816 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 16 8 ([[], [1, 3, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover814 : ∀ P ∈ pathPatterns 3 3 [1, 3, 1], HasCheckedCertificate 16 8 ([[], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover815 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover816 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover817 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 3, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover818 : ∀ P ∈ pathPatterns 2 1 [1, 3, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover819 : ∀ P ∈ pathPatterns 2 0 [1, 3, 1, 3], HasCheckedCertificate 16 8 ([[], [1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover821 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 16 8 ([[], [1, 3, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover820 : ∀ P ∈ pathPatterns 3 2 [1, 3, 2], HasCheckedCertificate 16 8 ([[], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover821 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover822 : ∀ P ∈ pathPatterns 2 0 [1, 3, 2, 2], HasCheckedCertificate 16 8 ([[], [1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover823 : ∀ P ∈ pathPatterns 3 1 [1, 3, 3], HasCheckedCertificate 16 8 ([[], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover824 : ∀ P ∈ pathPatterns 2 0 [1, 3, 3, 1], HasCheckedCertificate 16 8 ([[], [1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover825 : ∀ P ∈ pathPatterns 3 0 [1, 3, 4], HasCheckedCertificate 16 8 ([[], [1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover827 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 16 8 ([[], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover828 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 16 8 ([[], [1, 4], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover826 : ∀ P ∈ pathPatterns 4 3 [1, 4], HasCheckedCertificate 16 8 ([[], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover827 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover828 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover830 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 16 8 ([[], [1, 4, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover829 : ∀ P ∈ pathPatterns 3 2 [1, 4, 1], HasCheckedCertificate 16 8 ([[], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover830 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover831 : ∀ P ∈ pathPatterns 2 0 [1, 4, 1, 2], HasCheckedCertificate 16 8 ([[], [1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover832 : ∀ P ∈ pathPatterns 3 1 [1, 4, 2], HasCheckedCertificate 16 8 ([[], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover833 : ∀ P ∈ pathPatterns 3 0 [1, 4, 3], HasCheckedCertificate 16 8 ([[], [1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover835 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 16 8 ([[], [1, 5], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover834 : ∀ P ∈ pathPatterns 4 2 [1, 5], HasCheckedCertificate 16 8 ([[], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover835 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover836 : ∀ P ∈ pathPatterns 3 1 [1, 5, 1], HasCheckedCertificate 16 8 ([[], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover837 : ∀ P ∈ pathPatterns 3 0 [1, 5, 2], HasCheckedCertificate 16 8 ([[], [1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover838 : ∀ P ∈ pathPatterns 4 1 [1, 6], HasCheckedCertificate 16 8 ([[], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover839 : ∀ P ∈ pathPatterns 3 0 [1, 6, 1], HasCheckedCertificate 16 8 ([[], [1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover840 : ∀ P ∈ pathPatterns 4 0 [1, 7], HasCheckedCertificate 16 8 ([[], [1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq539 : amountSequenceForall 5 7 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1] ++ tail).length) (8 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 16 8 ([[]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover540 + · intro q + fin_cases q + · exact k16t8_seq638 + + · exact k16t8_seq756 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover807 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover814 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1, 1] [1, 1, 1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover817 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover818 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 2, 1] ∧ LexLE [1, 3, 1, 2, 1] [1, 2, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover819 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover820 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1, 1] ∧ LexLE [1, 3, 2, 1, 1] [1, 1, 2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover822 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover823 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover824 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover825 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover826 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover829 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1, 1] ∧ LexLE [1, 4, 1, 1, 1] [1, 1, 1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover831 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover832 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 2, 1] ∧ LexLE [1, 4, 2, 1] [1, 2, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover833 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover834 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover836 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 1, 1] ∧ LexLE [1, 5, 1, 1] [1, 1, 5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover837 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover838 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover839 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover840 + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq844 : amountSequenceForall 3 5 (fun tail => + (LexLE [2] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 16 8 ([[], [2]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 3] ∧ LexLE [1, 1, 1, 3] [3, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 2] ∧ LexLE [1, 1, 2, 2] [2, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3, 1] ∧ LexLE [1, 1, 3, 1] [1, 3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 4] ∧ LexLE [1, 1, 4] [4, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 2] ∧ LexLE [1, 2, 1, 2] [2, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2, 1] ∧ LexLE [1, 2, 2, 1] [1, 2, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 3] ∧ LexLE [1, 2, 3] [3, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 2] ∧ LexLE [1, 3, 2] [2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4, 1] ∧ LexLE [1, 4, 1] [1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover846 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 16 8 ([[], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover847 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 16 8 ([[], [2], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p361, Certificates.k16t8p361_check⟩ + +private theorem k16t8_cover848 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 16 8 ([[], [2], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover849 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 16 8 ([[], [2], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover845 : ∀ P ∈ pathPatterns 3 4 [2], HasCheckedCertificate 16 8 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover846 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover847 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover848 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover849 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover850 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [2], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p362, Certificates.k16t8p362_check⟩ + +private theorem k16t8_cover851 : ∀ P ∈ pathPatterns 1 1 [2, 1, 2], HasCheckedCertificate 16 8 ([[], [2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover852 : ∀ P ∈ pathPatterns 1 0 [2, 1, 3], HasCheckedCertificate 16 8 ([[], [2], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover853 : ∀ P ∈ pathPatterns 2 2 [2, 2], HasCheckedCertificate 16 8 ([[], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover854 : ∀ P ∈ pathPatterns 1 0 [2, 2, 2], HasCheckedCertificate 16 8 ([[], [2], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover855 : ∀ P ∈ pathPatterns 2 1 [2, 3], HasCheckedCertificate 16 8 ([[], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover856 : ∀ P ∈ pathPatterns 2 0 [2, 4], HasCheckedCertificate 16 8 ([[], [2], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover858 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 16 8 ([[], [2], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover857 : ∀ P ∈ pathPatterns 3 3 [3], HasCheckedCertificate 16 8 ([[], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover858 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover859 : ∀ P ∈ pathPatterns 2 0 [3, 3], HasCheckedCertificate 16 8 ([[], [2], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover860 : ∀ P ∈ pathPatterns 3 2 [4], HasCheckedCertificate 16 8 ([[], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover861 : ∀ P ∈ pathPatterns 3 1 [5], HasCheckedCertificate 16 8 ([[], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover862 : ∀ P ∈ pathPatterns 3 0 [6], HasCheckedCertificate 16 8 ([[], [2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq843 : amountSequenceForall 4 6 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[], [2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k16t8_seq844 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover845 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover850 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover851 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover852 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover853 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover854 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover855 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover856 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover857 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover859 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover860 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover861 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover862 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover842 : ∀ P ∈ pathPatterns 5 6 [2], HasCheckedCertificate 16 8 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq843 + + +private theorem k16t8_cover864 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [2, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p363, Certificates.k16t8p363_check⟩ + +private theorem k16t8_cover865 : ∀ P ∈ pathPatterns 1 1 [2, 1, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover866 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [2, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover867 : ∀ P ∈ pathPatterns 2 2 [2, 1, 1, 2], HasCheckedCertificate 16 8 ([[], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover868 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 2, 2], HasCheckedCertificate 16 8 ([[], [2, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover869 : ∀ P ∈ pathPatterns 2 1 [2, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover870 : ∀ P ∈ pathPatterns 2 0 [2, 1, 1, 4], HasCheckedCertificate 16 8 ([[], [2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover872 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 16 8 ([[], [2, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover871 : ∀ P ∈ pathPatterns 3 3 [2, 1, 2], HasCheckedCertificate 16 8 ([[], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover872 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover873 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2, 1, 2], HasCheckedCertificate 16 8 ([[], [2, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover874 : ∀ P ∈ pathPatterns 2 1 [2, 1, 2, 2], HasCheckedCertificate 16 8 ([[], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover875 : ∀ P ∈ pathPatterns 2 0 [2, 1, 2, 3], HasCheckedCertificate 16 8 ([[], [2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover876 : ∀ P ∈ pathPatterns 3 2 [2, 1, 3], HasCheckedCertificate 16 8 ([[], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover877 : ∀ P ∈ pathPatterns 2 0 [2, 1, 3, 2], HasCheckedCertificate 16 8 ([[], [2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover878 : ∀ P ∈ pathPatterns 3 1 [2, 1, 4], HasCheckedCertificate 16 8 ([[], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover879 : ∀ P ∈ pathPatterns 3 0 [2, 1, 5], HasCheckedCertificate 16 8 ([[], [2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq863 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([2, 1] ++ tail) ∧ LexLE ([2, 1] ++ tail) ([2, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([2, 1] ++ tail).length) (8 - ([2, 1] ++ tail).sum) ([2, 1] ++ tail), + HasCheckedCertificate 16 8 ([[]] ++ (([2, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover864 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover865 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 1, 2, 1] [1, 2, 1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover866 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover867 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1, 1] ∧ LexLE [2, 1, 1, 2, 1, 1] [1, 1, 2, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover868 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover869 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 3, 1] ∧ LexLE [2, 1, 1, 3, 1] [1, 3, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover870 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover871 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1, 1] ∧ LexLE [2, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover873 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover874 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 2, 1] ∧ LexLE [2, 1, 2, 2, 1] [1, 2, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover875 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover876 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1, 1] ∧ LexLE [2, 1, 3, 1, 1] [1, 1, 3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover877 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover878 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 4, 1] ∧ LexLE [2, 1, 4, 1] [1, 4, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover879 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover881 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 16 8 ([[], [2, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover882 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 16 8 ([[], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover883 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 16 8 ([[], [2, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover880 : ∀ P ∈ pathPatterns 4 4 [2, 2], HasCheckedCertificate 16 8 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover881 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover882 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover883 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover884 : ∀ P ∈ pathPatterns 2 0 [2, 2, 1, 3], HasCheckedCertificate 16 8 ([[], [2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover885 : ∀ P ∈ pathPatterns 3 2 [2, 2, 2], HasCheckedCertificate 16 8 ([[], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover886 : ∀ P ∈ pathPatterns 2 0 [2, 2, 2, 2], HasCheckedCertificate 16 8 ([[], [2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover887 : ∀ P ∈ pathPatterns 3 1 [2, 2, 3], HasCheckedCertificate 16 8 ([[], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover888 : ∀ P ∈ pathPatterns 3 0 [2, 2, 4], HasCheckedCertificate 16 8 ([[], [2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover890 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 16 8 ([[], [2, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover889 : ∀ P ∈ pathPatterns 4 3 [2, 3], HasCheckedCertificate 16 8 ([[], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover890 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover891 : ∀ P ∈ pathPatterns 3 1 [2, 3, 2], HasCheckedCertificate 16 8 ([[], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover892 : ∀ P ∈ pathPatterns 3 0 [2, 3, 3], HasCheckedCertificate 16 8 ([[], [2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover893 : ∀ P ∈ pathPatterns 4 2 [2, 4], HasCheckedCertificate 16 8 ([[], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover894 : ∀ P ∈ pathPatterns 3 0 [2, 4, 2], HasCheckedCertificate 16 8 ([[], [2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover895 : ∀ P ∈ pathPatterns 4 1 [2, 5], HasCheckedCertificate 16 8 ([[], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover896 : ∀ P ∈ pathPatterns 4 0 [2, 6], HasCheckedCertificate 16 8 ([[], [2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq841 : amountSequenceForall 5 6 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([2] ++ tail).length) (8 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 16 8 ([[]] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover842 + · intro q + fin_cases q + · exact k16t8_seq863 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover880 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 2] ∧ LexLE [2, 2, 1, 1, 2] [2, 1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2, 1] ∧ LexLE [2, 2, 1, 2, 1] [1, 2, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover884 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover885 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1, 1] ∧ LexLE [2, 2, 2, 1, 1] [1, 1, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover886 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover887 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 3, 1] ∧ LexLE [2, 2, 3, 1] [1, 3, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover888 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover889 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1, 1] ∧ LexLE [2, 3, 1, 1, 1] [1, 1, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 2] ∧ LexLE [2, 3, 1, 2] [2, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover891 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 1] ∧ LexLE [2, 3, 2, 1] [1, 2, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover892 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover893 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 1] ∧ LexLE [2, 4, 1, 1] [1, 1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover894 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover895 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover896 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover900 : ∀ P ∈ pathPatterns 3 2 [3], HasCheckedCertificate 16 8 ([[], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover901 : ∀ P ∈ pathPatterns 3 1 [4], HasCheckedCertificate 16 8 ([[], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover902 : ∀ P ∈ pathPatterns 3 0 [5], HasCheckedCertificate 16 8 ([[], [3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq899 : amountSequenceForall 4 5 (fun tail => + (LexLE [3] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[], [3]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 2] ∧ LexLE [2, 1, 2] [2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover900 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover901 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover902 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover898 : ∀ P ∈ pathPatterns 5 5 [3], HasCheckedCertificate 16 8 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq899 + + +private theorem k16t8_cover903 : ∀ P ∈ pathPatterns 2 0 [3, 1, 1, 3], HasCheckedCertificate 16 8 ([[], [3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover904 : ∀ P ∈ pathPatterns 3 1 [3, 1, 3], HasCheckedCertificate 16 8 ([[], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover905 : ∀ P ∈ pathPatterns 3 0 [3, 1, 4], HasCheckedCertificate 16 8 ([[], [3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover906 : ∀ P ∈ pathPatterns 3 0 [3, 2, 3], HasCheckedCertificate 16 8 ([[], [3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover907 : ∀ P ∈ pathPatterns 4 2 [3, 3], HasCheckedCertificate 16 8 ([[], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover908 : ∀ P ∈ pathPatterns 4 1 [3, 4], HasCheckedCertificate 16 8 ([[], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover909 : ∀ P ∈ pathPatterns 4 0 [3, 5], HasCheckedCertificate 16 8 ([[], [3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq897 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([3] ++ tail) ∧ LexLE ([3] ++ tail) ([3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([3] ++ tail).length) (8 - ([3] ++ tail).sum) ([3] ++ tail), + HasCheckedCertificate 16 8 ([[]] ++ (([3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover898 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 2] ∧ LexLE [3, 1, 1, 1, 2] [2, 1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2, 1] ∧ LexLE [3, 1, 1, 2, 1] [1, 2, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover903 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1, 1] ∧ LexLE [3, 1, 2, 1, 1] [1, 1, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 2] ∧ LexLE [3, 1, 2, 2] [2, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover904 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 1] ∧ LexLE [3, 1, 3, 1] [1, 3, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover905 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1, 1] ∧ LexLE [3, 2, 1, 1, 1] [1, 1, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 2] ∧ LexLE [3, 2, 1, 2] [2, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 1] ∧ LexLE [3, 2, 2, 1] [1, 2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover906 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover907 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 1] ∧ LexLE [3, 3, 1, 1] [1, 1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover908 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover909 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover911 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 16 8 ([[], [4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover910 : ∀ P ∈ pathPatterns 5 4 [4], HasCheckedCertificate 16 8 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover911 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover912 : ∀ P ∈ pathPatterns 4 0 [4, 4], HasCheckedCertificate 16 8 ([[], [4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover913 : ∀ P ∈ pathPatterns 5 3 [5], HasCheckedCertificate 16 8 ([[], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover914 : ∀ P ∈ pathPatterns 5 2 [6], HasCheckedCertificate 16 8 ([[], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover915 : ∀ P ∈ pathPatterns 5 1 [7], HasCheckedCertificate 16 8 ([[], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover916 : ∀ P ∈ pathPatterns 5 0 [8], HasCheckedCertificate 16 8 ([[], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq4 : amountSequenceForall 6 8 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([] ++ tail).length) (8 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover5 + · intro q + fin_cases q + · exact k16t8_seq539 + + · exact k16t8_seq841 + + · exact k16t8_seq897 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover910 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1, 1] ∧ LexLE [4, 1, 1, 1, 1] [1, 1, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 2] ∧ LexLE [4, 1, 1, 2] [2, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 1] ∧ LexLE [4, 1, 2, 1] [1, 2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 1] ∧ LexLE [4, 2, 1, 1] [1, 1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover912 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover913 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 1] ∧ LexLE [5, 1, 1, 1] [1, 1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover914 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover915 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover916 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover3 : ∀ P ∈ pathPatterns 7 8 [], HasCheckedCertificate 16 8 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq4 + + +private theorem k16t8_cover924 : ∀ P ∈ pathPatterns 0 4 [1], HasCheckedCertificate 16 8 ([[1], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p364, Certificates.k16t8p364_check⟩ + +private theorem k16t8_cover925 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 16 8 ([[1], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p365, Certificates.k16t8p365_check⟩ + +private theorem k16t8_cover926 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 16 8 ([[1], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p366, Certificates.k16t8p366_check⟩ + +private theorem k16t8_cover927 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 16 8 ([[1], [1], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p367, Certificates.k16t8p367_check⟩ + +private theorem k16t8_cover928 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 16 8 ([[1], [1], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p368, Certificates.k16t8p368_check⟩ + +private theorem k16t8_cover923 : ∀ P ∈ pathPatterns 2 5 [1], HasCheckedCertificate 16 8 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover924 + · exact by + intro _ + exact k16t8_cover925 + · exact by + intro _ + exact k16t8_cover926 + · exact by + intro _ + exact k16t8_cover927 + · exact by + intro _ + exact k16t8_cover928 + +private theorem k16t8_cover929 : ∀ P ∈ pathPatterns 1 4 [1, 1], HasCheckedCertificate 16 8 ([[1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover930 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1], HasCheckedCertificate 16 8 ([[1], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p369, Certificates.k16t8p369_check⟩ + +private theorem k16t8_cover931 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2], HasCheckedCertificate 16 8 ([[1], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p370, Certificates.k16t8p370_check⟩ + +private theorem k16t8_cover932 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3], HasCheckedCertificate 16 8 ([[1], [1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p371, Certificates.k16t8p371_check⟩ + +private theorem k16t8_cover933 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4], HasCheckedCertificate 16 8 ([[1], [1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p372, Certificates.k16t8p372_check⟩ + +private theorem k16t8_cover934 : ∀ P ∈ pathPatterns 1 3 [1, 2], HasCheckedCertificate 16 8 ([[1], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover935 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1], HasCheckedCertificate 16 8 ([[1], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p373, Certificates.k16t8p373_check⟩ + +private theorem k16t8_cover936 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2], HasCheckedCertificate 16 8 ([[1], [1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p374, Certificates.k16t8p374_check⟩ + +private theorem k16t8_cover937 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3], HasCheckedCertificate 16 8 ([[1], [1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p375, Certificates.k16t8p375_check⟩ + +private theorem k16t8_cover938 : ∀ P ∈ pathPatterns 1 2 [1, 3], HasCheckedCertificate 16 8 ([[1], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover939 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1], HasCheckedCertificate 16 8 ([[1], [1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p376, Certificates.k16t8p376_check⟩ + +private theorem k16t8_cover940 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2], HasCheckedCertificate 16 8 ([[1], [1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p377, Certificates.k16t8p377_check⟩ + +private theorem k16t8_cover941 : ∀ P ∈ pathPatterns 1 1 [1, 4], HasCheckedCertificate 16 8 ([[1], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover942 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1], HasCheckedCertificate 16 8 ([[1], [1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p378, Certificates.k16t8p378_check⟩ + +private theorem k16t8_cover943 : ∀ P ∈ pathPatterns 1 0 [1, 5], HasCheckedCertificate 16 8 ([[1], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover945 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 16 8 ([[1], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p379, Certificates.k16t8p379_check⟩ + +private theorem k16t8_cover946 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 16 8 ([[1], [1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p380, Certificates.k16t8p380_check⟩ + +private theorem k16t8_cover947 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 16 8 ([[1], [1], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p381, Certificates.k16t8p381_check⟩ + +private theorem k16t8_cover944 : ∀ P ∈ pathPatterns 2 4 [2], HasCheckedCertificate 16 8 ([[1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover945 + · exact by + intro _ + exact k16t8_cover946 + · exact by + intro _ + exact k16t8_cover947 + +private theorem k16t8_cover948 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2], HasCheckedCertificate 16 8 ([[1], [1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p382, Certificates.k16t8p382_check⟩ + +private theorem k16t8_cover949 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3], HasCheckedCertificate 16 8 ([[1], [1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p383, Certificates.k16t8p383_check⟩ + +private theorem k16t8_cover950 : ∀ P ∈ pathPatterns 1 2 [2, 2], HasCheckedCertificate 16 8 ([[1], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover951 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2], HasCheckedCertificate 16 8 ([[1], [1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p384, Certificates.k16t8p384_check⟩ + +private theorem k16t8_cover952 : ∀ P ∈ pathPatterns 1 1 [2, 3], HasCheckedCertificate 16 8 ([[1], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover953 : ∀ P ∈ pathPatterns 1 0 [2, 4], HasCheckedCertificate 16 8 ([[1], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover955 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[1], [1], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p385, Certificates.k16t8p385_check⟩ + +private theorem k16t8_cover954 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 16 8 ([[1], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k16t8_cover955 + +private theorem k16t8_cover956 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 16 8 ([[1], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover957 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 16 8 ([[1], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover958 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 16 8 ([[1], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover959 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 16 8 ([[1], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq922 : amountSequenceForall 3 6 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[1], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover923 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover929 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover930 + · exact by + intro _ + exact k16t8_cover931 + · exact by + intro _ + exact k16t8_cover932 + · exact by + intro _ + exact k16t8_cover933 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover934 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover935 + · exact by + intro _ + exact k16t8_cover936 + · exact by + intro _ + exact k16t8_cover937 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover938 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover939 + · exact by + intro _ + exact k16t8_cover940 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover941 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover942 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover943 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover944 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover948 + · exact by + intro _ + exact k16t8_cover949 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover950 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k16t8_cover951 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover952 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover953 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover954 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover956 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover957 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover958 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover959 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover921 : ∀ P ∈ pathPatterns 4 6 [1], HasCheckedCertificate 16 8 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq922 + + +private theorem k16t8_cover962 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 16 8 ([[1], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p386, Certificates.k16t8p386_check⟩ + +private theorem k16t8_cover963 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 16 8 ([[1], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p387, Certificates.k16t8p387_check⟩ + +private theorem k16t8_cover964 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 16 8 ([[1], [1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p388, Certificates.k16t8p388_check⟩ + +private theorem k16t8_cover965 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 16 8 ([[1], [1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p389, Certificates.k16t8p389_check⟩ + +private theorem k16t8_cover966 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 16 8 ([[1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover967 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 16 8 ([[1], [1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p390, Certificates.k16t8p390_check⟩ + +private theorem k16t8_cover968 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 16 8 ([[1], [1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p391, Certificates.k16t8p391_check⟩ + +private theorem k16t8_cover969 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 16 8 ([[1], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover970 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 16 8 ([[1], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover971 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 16 8 ([[1], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover961 : ∀ P ∈ pathPatterns 3 5 [1, 1], HasCheckedCertificate 16 8 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover962 + · exact by + intro _ + exact k16t8_cover963 + · exact by + intro _ + exact k16t8_cover964 + · exact by + intro _ + exact k16t8_cover965 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover966 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover967 + · exact by + intro _ + exact k16t8_cover968 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover969 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover970 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover971 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover973 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 16 8 ([[1], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p392, Certificates.k16t8p392_check⟩ + +private theorem k16t8_cover974 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 16 8 ([[1], [1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p393, Certificates.k16t8p393_check⟩ + +private theorem k16t8_cover975 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 16 8 ([[1], [1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p394, Certificates.k16t8p394_check⟩ + +private theorem k16t8_cover972 : ∀ P ∈ pathPatterns 2 4 [1, 1, 1], HasCheckedCertificate 16 8 ([[1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover973 + · exact by + intro _ + exact k16t8_cover974 + · exact by + intro _ + exact k16t8_cover975 + +private theorem k16t8_cover976 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1, 1], HasCheckedCertificate 16 8 ([[1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover977 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1, 1], HasCheckedCertificate 16 8 ([[1], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p395, Certificates.k16t8p395_check⟩ + +private theorem k16t8_cover978 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 2], HasCheckedCertificate 16 8 ([[1], [1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p396, Certificates.k16t8p396_check⟩ + +private theorem k16t8_cover979 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 3], HasCheckedCertificate 16 8 ([[1], [1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p397, Certificates.k16t8p397_check⟩ + +private theorem k16t8_cover980 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 2], HasCheckedCertificate 16 8 ([[1], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover981 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2, 1], HasCheckedCertificate 16 8 ([[1], [1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p398, Certificates.k16t8p398_check⟩ + +private theorem k16t8_cover982 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 2], HasCheckedCertificate 16 8 ([[1], [1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p399, Certificates.k16t8p399_check⟩ + +private theorem k16t8_cover983 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 3], HasCheckedCertificate 16 8 ([[1], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover984 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3, 1], HasCheckedCertificate 16 8 ([[1], [1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p400, Certificates.k16t8p400_check⟩ + +private theorem k16t8_cover985 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 4], HasCheckedCertificate 16 8 ([[1], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover987 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 16 8 ([[1], [1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p401, Certificates.k16t8p401_check⟩ + +private theorem k16t8_cover988 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[1], [1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p402, Certificates.k16t8p402_check⟩ + +private theorem k16t8_cover986 : ∀ P ∈ pathPatterns 2 3 [1, 1, 2], HasCheckedCertificate 16 8 ([[1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover987 + · exact by + intro _ + exact k16t8_cover988 + +private theorem k16t8_cover989 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2, 1], HasCheckedCertificate 16 8 ([[1], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover990 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1, 1], HasCheckedCertificate 16 8 ([[1], [1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p403, Certificates.k16t8p403_check⟩ + +private theorem k16t8_cover991 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 2], HasCheckedCertificate 16 8 ([[1], [1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p404, Certificates.k16t8p404_check⟩ + +private theorem k16t8_cover992 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 2], HasCheckedCertificate 16 8 ([[1], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover993 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2, 1], HasCheckedCertificate 16 8 ([[1], [1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p405, Certificates.k16t8p405_check⟩ + +private theorem k16t8_cover994 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 3], HasCheckedCertificate 16 8 ([[1], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover996 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[1], [1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p406, Certificates.k16t8p406_check⟩ + +private theorem k16t8_cover995 : ∀ P ∈ pathPatterns 2 2 [1, 1, 3], HasCheckedCertificate 16 8 ([[1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover996 + +private theorem k16t8_cover997 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3, 1], HasCheckedCertificate 16 8 ([[1], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover998 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1, 1], HasCheckedCertificate 16 8 ([[1], [1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p407, Certificates.k16t8p407_check⟩ + +private theorem k16t8_cover999 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 2], HasCheckedCertificate 16 8 ([[1], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1000 : ∀ P ∈ pathPatterns 2 1 [1, 1, 4], HasCheckedCertificate 16 8 ([[1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1001 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4, 1], HasCheckedCertificate 16 8 ([[1], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1002 : ∀ P ∈ pathPatterns 2 0 [1, 1, 5], HasCheckedCertificate 16 8 ([[1], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq960 : amountSequenceForall 3 5 (fun tail => + (LexLE [1] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1, 1] ++ tail).length) (7 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 16 8 ([[1]] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover961 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover972 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover976 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover977 + · exact by + intro _ + exact k16t8_cover978 + · exact by + intro _ + exact k16t8_cover979 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover980 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover981 + · exact by + intro _ + exact k16t8_cover982 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover983 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover984 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover985 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover986 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover989 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover990 + · exact by + intro _ + exact k16t8_cover991 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover992 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover993 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover994 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover995 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover997 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover998 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover999 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1000 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1001 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1002 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1004 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 16 8 ([[1], [1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p408, Certificates.k16t8p408_check⟩ + +private theorem k16t8_cover1005 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 16 8 ([[1], [1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p409, Certificates.k16t8p409_check⟩ + +private theorem k16t8_cover1006 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 16 8 ([[1], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1007 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 16 8 ([[1], [1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p410, Certificates.k16t8p410_check⟩ + +private theorem k16t8_cover1008 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 16 8 ([[1], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1009 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 16 8 ([[1], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1003 : ∀ P ∈ pathPatterns 3 4 [1, 2], HasCheckedCertificate 16 8 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k16t8_cover1004 + · exact by + intro _ + exact k16t8_cover1005 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1006 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover1007 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1008 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1009 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1011 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 16 8 ([[1], [1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p411, Certificates.k16t8p411_check⟩ + +private theorem k16t8_cover1012 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[1], [1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p412, Certificates.k16t8p412_check⟩ + +private theorem k16t8_cover1010 : ∀ P ∈ pathPatterns 2 3 [1, 2, 1], HasCheckedCertificate 16 8 ([[1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1011 + · exact by + intro _ + exact k16t8_cover1012 + +private theorem k16t8_cover1013 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 2], HasCheckedCertificate 16 8 ([[1], [1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p413, Certificates.k16t8p413_check⟩ + +private theorem k16t8_cover1014 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 2], HasCheckedCertificate 16 8 ([[1], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1015 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2, 1], HasCheckedCertificate 16 8 ([[1], [1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p414, Certificates.k16t8p414_check⟩ + +private theorem k16t8_cover1016 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 3], HasCheckedCertificate 16 8 ([[1], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1018 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[1], [1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p415, Certificates.k16t8p415_check⟩ + +private theorem k16t8_cover1017 : ∀ P ∈ pathPatterns 2 2 [1, 2, 2], HasCheckedCertificate 16 8 ([[1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1018 + +private theorem k16t8_cover1019 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2, 1], HasCheckedCertificate 16 8 ([[1], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1020 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 2], HasCheckedCertificate 16 8 ([[1], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1021 : ∀ P ∈ pathPatterns 2 1 [1, 2, 3], HasCheckedCertificate 16 8 ([[1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1022 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3, 1], HasCheckedCertificate 16 8 ([[1], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1023 : ∀ P ∈ pathPatterns 2 0 [1, 2, 4], HasCheckedCertificate 16 8 ([[1], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1025 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 16 8 ([[1], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1026 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 16 8 ([[1], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1024 : ∀ P ∈ pathPatterns 3 3 [1, 3], HasCheckedCertificate 16 8 ([[1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1025 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1026 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1028 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[1], [1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p416, Certificates.k16t8p416_check⟩ + +private theorem k16t8_cover1027 : ∀ P ∈ pathPatterns 2 2 [1, 3, 1], HasCheckedCertificate 16 8 ([[1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1028 + +private theorem k16t8_cover1029 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1, 2], HasCheckedCertificate 16 8 ([[1], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1030 : ∀ P ∈ pathPatterns 2 1 [1, 3, 2], HasCheckedCertificate 16 8 ([[1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1031 : ∀ P ∈ pathPatterns 2 0 [1, 3, 3], HasCheckedCertificate 16 8 ([[1], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1033 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 16 8 ([[1], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1032 : ∀ P ∈ pathPatterns 3 2 [1, 4], HasCheckedCertificate 16 8 ([[1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1033 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1034 : ∀ P ∈ pathPatterns 2 1 [1, 4, 1], HasCheckedCertificate 16 8 ([[1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1035 : ∀ P ∈ pathPatterns 2 0 [1, 4, 2], HasCheckedCertificate 16 8 ([[1], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1036 : ∀ P ∈ pathPatterns 3 1 [1, 5], HasCheckedCertificate 16 8 ([[1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1037 : ∀ P ∈ pathPatterns 2 0 [1, 5, 1], HasCheckedCertificate 16 8 ([[1], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1038 : ∀ P ∈ pathPatterns 3 0 [1, 6], HasCheckedCertificate 16 8 ([[1], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq920 : amountSequenceForall 4 6 (fun tail => + (LexLE [1] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1] ++ tail).length) (7 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 16 8 ([[1]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover921 + · intro q + fin_cases q + · exact k16t8_seq960 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1003 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1010 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · exact by + intro _ + exact k16t8_cover1013 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1014 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover1015 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1016 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1017 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1019 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1020 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1021 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1022 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1023 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1024 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1027 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1029 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1030 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1031 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1032 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1034 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1035 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1036 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1037 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1038 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1043 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 16 8 ([[1], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p417, Certificates.k16t8p417_check⟩ + +private theorem k16t8_cover1044 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[1], [2], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p418, Certificates.k16t8p418_check⟩ + +private theorem k16t8_cover1042 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 16 8 ([[1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1043 + · exact by + intro _ + exact k16t8_cover1044 + +private theorem k16t8_cover1045 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 16 8 ([[1], [2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p419, Certificates.k16t8p419_check⟩ + +private theorem k16t8_cover1046 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 16 8 ([[1], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1047 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 16 8 ([[1], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1048 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 16 8 ([[1], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover1049 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 16 8 ([[1], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1050 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 16 8 ([[1], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq1041 : amountSequenceForall 3 5 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[1], [2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1042 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover1045 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1046 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1047 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1048 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1049 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1050 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1040 : ∀ P ∈ pathPatterns 4 5 [2], HasCheckedCertificate 16 8 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq1041 + + +private theorem k16t8_cover1051 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 1, 2], HasCheckedCertificate 16 8 ([[1], [2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p420, Certificates.k16t8p420_check⟩ + +private theorem k16t8_cover1052 : ∀ P ∈ pathPatterns 1 1 [2, 1, 1, 2], HasCheckedCertificate 16 8 ([[1], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1053 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 3], HasCheckedCertificate 16 8 ([[1], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1054 : ∀ P ∈ pathPatterns 2 2 [2, 1, 2], HasCheckedCertificate 16 8 ([[1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover1055 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2, 2], HasCheckedCertificate 16 8 ([[1], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1056 : ∀ P ∈ pathPatterns 2 1 [2, 1, 3], HasCheckedCertificate 16 8 ([[1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1057 : ∀ P ∈ pathPatterns 2 0 [2, 1, 4], HasCheckedCertificate 16 8 ([[1], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1059 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 16 8 ([[1], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1058 : ∀ P ∈ pathPatterns 3 3 [2, 2], HasCheckedCertificate 16 8 ([[1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1059 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1060 : ∀ P ∈ pathPatterns 2 1 [2, 2, 2], HasCheckedCertificate 16 8 ([[1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1061 : ∀ P ∈ pathPatterns 2 0 [2, 2, 3], HasCheckedCertificate 16 8 ([[1], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1062 : ∀ P ∈ pathPatterns 3 2 [2, 3], HasCheckedCertificate 16 8 ([[1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1063 : ∀ P ∈ pathPatterns 2 0 [2, 3, 2], HasCheckedCertificate 16 8 ([[1], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1064 : ∀ P ∈ pathPatterns 3 1 [2, 4], HasCheckedCertificate 16 8 ([[1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1065 : ∀ P ∈ pathPatterns 3 0 [2, 5], HasCheckedCertificate 16 8 ([[1], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq1039 : amountSequenceForall 4 5 (fun tail => + (LexLE [1] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([2] ++ tail).length) (7 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 16 8 ([[1]] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover1040 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover1051 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1052 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1053 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1054 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1055 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1056 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1057 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1058 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1060 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1061 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1062 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1063 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1064 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1065 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1067 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 16 8 ([[1], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1068 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 16 8 ([[1], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1066 : ∀ P ∈ pathPatterns 4 4 [3], HasCheckedCertificate 16 8 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1067 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1068 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1069 : ∀ P ∈ pathPatterns 2 0 [3, 1, 3], HasCheckedCertificate 16 8 ([[1], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1070 : ∀ P ∈ pathPatterns 3 1 [3, 3], HasCheckedCertificate 16 8 ([[1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1071 : ∀ P ∈ pathPatterns 3 0 [3, 4], HasCheckedCertificate 16 8 ([[1], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1072 : ∀ P ∈ pathPatterns 4 3 [4], HasCheckedCertificate 16 8 ([[1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1073 : ∀ P ∈ pathPatterns 4 2 [5], HasCheckedCertificate 16 8 ([[1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1074 : ∀ P ∈ pathPatterns 4 1 [6], HasCheckedCertificate 16 8 ([[1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1075 : ∀ P ∈ pathPatterns 4 0 [7], HasCheckedCertificate 16 8 ([[1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq919 : amountSequenceForall 5 7 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k16t8_seq920 + + · exact k16t8_seq1039 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1066 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1069 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1070 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1071 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1072 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1073 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1074 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1075 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover918 : ∀ P ∈ pathPatterns 6 7 [1], HasCheckedCertificate 16 8 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq919 + + +private theorem k16t8_cover1081 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 16 8 ([[1, 1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p421, Certificates.k16t8p421_check⟩ + +private theorem k16t8_cover1082 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 16 8 ([[1, 1], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p422, Certificates.k16t8p422_check⟩ + +private theorem k16t8_cover1083 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 16 8 ([[1, 1], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p423, Certificates.k16t8p423_check⟩ + +private theorem k16t8_cover1080 : ∀ P ∈ pathPatterns 2 4 [1, 1], HasCheckedCertificate 16 8 ([[1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1081 + · exact by + intro _ + exact k16t8_cover1082 + · exact by + intro _ + exact k16t8_cover1083 + +private theorem k16t8_cover1084 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1], HasCheckedCertificate 16 8 ([[1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1085 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1], HasCheckedCertificate 16 8 ([[1, 1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p424, Certificates.k16t8p424_check⟩ + +private theorem k16t8_cover1086 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2], HasCheckedCertificate 16 8 ([[1, 1], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p425, Certificates.k16t8p425_check⟩ + +private theorem k16t8_cover1087 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3], HasCheckedCertificate 16 8 ([[1, 1], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p426, Certificates.k16t8p426_check⟩ + +private theorem k16t8_cover1088 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2], HasCheckedCertificate 16 8 ([[1, 1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1089 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1], HasCheckedCertificate 16 8 ([[1, 1], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p427, Certificates.k16t8p427_check⟩ + +private theorem k16t8_cover1090 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2], HasCheckedCertificate 16 8 ([[1, 1], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p428, Certificates.k16t8p428_check⟩ + +private theorem k16t8_cover1091 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3], HasCheckedCertificate 16 8 ([[1, 1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1092 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1], HasCheckedCertificate 16 8 ([[1, 1], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p429, Certificates.k16t8p429_check⟩ + +private theorem k16t8_cover1093 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4], HasCheckedCertificate 16 8 ([[1, 1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1095 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 16 8 ([[1, 1], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p430, Certificates.k16t8p430_check⟩ + +private theorem k16t8_cover1096 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[1, 1], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p431, Certificates.k16t8p431_check⟩ + +private theorem k16t8_cover1094 : ∀ P ∈ pathPatterns 2 3 [1, 2], HasCheckedCertificate 16 8 ([[1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1095 + · exact by + intro _ + exact k16t8_cover1096 + +private theorem k16t8_cover1097 : ∀ P ∈ pathPatterns 1 2 [1, 2, 1], HasCheckedCertificate 16 8 ([[1, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1098 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2], HasCheckedCertificate 16 8 ([[1, 1], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p432, Certificates.k16t8p432_check⟩ + +private theorem k16t8_cover1099 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2], HasCheckedCertificate 16 8 ([[1, 1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1100 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 1], HasCheckedCertificate 16 8 ([[1, 1], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p433, Certificates.k16t8p433_check⟩ + +private theorem k16t8_cover1101 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3], HasCheckedCertificate 16 8 ([[1, 1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1103 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[1, 1], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p434, Certificates.k16t8p434_check⟩ + +private theorem k16t8_cover1102 : ∀ P ∈ pathPatterns 2 2 [1, 3], HasCheckedCertificate 16 8 ([[1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1103 + +private theorem k16t8_cover1104 : ∀ P ∈ pathPatterns 1 1 [1, 3, 1], HasCheckedCertificate 16 8 ([[1, 1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1105 : ∀ P ∈ pathPatterns 1 0 [1, 3, 2], HasCheckedCertificate 16 8 ([[1, 1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1106 : ∀ P ∈ pathPatterns 2 1 [1, 4], HasCheckedCertificate 16 8 ([[1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1107 : ∀ P ∈ pathPatterns 1 0 [1, 4, 1], HasCheckedCertificate 16 8 ([[1, 1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1108 : ∀ P ∈ pathPatterns 2 0 [1, 5], HasCheckedCertificate 16 8 ([[1, 1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq1079 : amountSequenceForall 3 5 (fun tail => + (LexLE [1, 1] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 16 8 ([[1, 1]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1080 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1084 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover1085 + · exact by + intro _ + exact k16t8_cover1086 + · exact by + intro _ + exact k16t8_cover1087 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1088 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover1089 + · exact by + intro _ + exact k16t8_cover1090 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1091 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover1092 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1093 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1094 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1097 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k16t8_cover1098 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1099 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover1100 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1101 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1102 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1104 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1105 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1106 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1107 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1108 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1110 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 16 8 ([[1, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1111 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 16 8 ([[1, 1], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p435, Certificates.k16t8p435_check⟩ + +private theorem k16t8_cover1112 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 16 8 ([[1, 1], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1113 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 16 8 ([[1, 1], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1109 : ∀ P ∈ pathPatterns 3 4 [2], HasCheckedCertificate 16 8 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1110 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover1111 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1112 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1113 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1114 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 2], HasCheckedCertificate 16 8 ([[1, 1], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p436, Certificates.k16t8p436_check⟩ + +private theorem k16t8_cover1115 : ∀ P ∈ pathPatterns 1 1 [2, 1, 2], HasCheckedCertificate 16 8 ([[1, 1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1116 : ∀ P ∈ pathPatterns 1 0 [2, 1, 3], HasCheckedCertificate 16 8 ([[1, 1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1117 : ∀ P ∈ pathPatterns 2 2 [2, 2], HasCheckedCertificate 16 8 ([[1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover1118 : ∀ P ∈ pathPatterns 1 0 [2, 2, 2], HasCheckedCertificate 16 8 ([[1, 1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1119 : ∀ P ∈ pathPatterns 2 1 [2, 3], HasCheckedCertificate 16 8 ([[1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1120 : ∀ P ∈ pathPatterns 2 0 [2, 4], HasCheckedCertificate 16 8 ([[1, 1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1122 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 16 8 ([[1, 1], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1121 : ∀ P ∈ pathPatterns 3 3 [3], HasCheckedCertificate 16 8 ([[1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1122 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1123 : ∀ P ∈ pathPatterns 2 0 [3, 3], HasCheckedCertificate 16 8 ([[1, 1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1124 : ∀ P ∈ pathPatterns 3 2 [4], HasCheckedCertificate 16 8 ([[1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1125 : ∀ P ∈ pathPatterns 3 1 [5], HasCheckedCertificate 16 8 ([[1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1126 : ∀ P ∈ pathPatterns 3 0 [6], HasCheckedCertificate 16 8 ([[1, 1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq1078 : amountSequenceForall 4 6 (fun tail => + (LexLE [1, 1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[1, 1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k16t8_seq1079 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1109 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover1114 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1115 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1116 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1117 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1118 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1119 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1120 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1121 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1123 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1124 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1125 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1126 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1077 : ∀ P ∈ pathPatterns 5 6 [1, 1], HasCheckedCertificate 16 8 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq1078 + + +private theorem k16t8_cover1130 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1], HasCheckedCertificate 16 8 ([[1, 1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p437, Certificates.k16t8p437_check⟩ + +private theorem k16t8_cover1131 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2], HasCheckedCertificate 16 8 ([[1, 1, 1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p438, Certificates.k16t8p438_check⟩ + +private theorem k16t8_cover1132 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3], HasCheckedCertificate 16 8 ([[1, 1, 1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p439, Certificates.k16t8p439_check⟩ + +private theorem k16t8_cover1133 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 16 8 ([[1, 1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1134 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 16 8 ([[1, 1, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p440, Certificates.k16t8p440_check⟩ + +private theorem k16t8_cover1135 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 16 8 ([[1, 1, 1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p441, Certificates.k16t8p441_check⟩ + +private theorem k16t8_cover1136 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 16 8 ([[1, 1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1137 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 16 8 ([[1, 1, 1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p442, Certificates.k16t8p442_check⟩ + +private theorem k16t8_cover1138 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 16 8 ([[1, 1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1140 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 16 8 ([[1, 1, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p443, Certificates.k16t8p443_check⟩ + +private theorem k16t8_cover1141 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[1, 1, 1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p444, Certificates.k16t8p444_check⟩ + +private theorem k16t8_cover1139 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 16 8 ([[1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1140 + · exact by + intro _ + exact k16t8_cover1141 + +private theorem k16t8_cover1142 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 16 8 ([[1, 1, 1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p445, Certificates.k16t8p445_check⟩ + +private theorem k16t8_cover1143 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 16 8 ([[1, 1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1144 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 16 8 ([[1, 1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1145 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 16 8 ([[1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k16t8_cover1146 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 16 8 ([[1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1147 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 16 8 ([[1, 1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq1129 : amountSequenceForall 3 5 (fun tail => + (LexLE [1, 1, 1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[1, 1, 1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover1130 + · exact by + intro _ + exact k16t8_cover1131 + · exact by + intro _ + exact k16t8_cover1132 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1133 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover1134 + · exact by + intro _ + exact k16t8_cover1135 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1136 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover1137 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1138 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1139 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k16t8_cover1142 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1143 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1144 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1145 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1146 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1147 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1128 : ∀ P ∈ pathPatterns 4 5 [1, 1, 1], HasCheckedCertificate 16 8 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq1129 + + +private theorem k16t8_cover1149 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 16 8 ([[1, 1, 1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p446, Certificates.k16t8p446_check⟩ + +private theorem k16t8_cover1150 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 16 8 ([[1, 1, 1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p447, Certificates.k16t8p447_check⟩ + +private theorem k16t8_cover1151 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 16 8 ([[1, 1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1152 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 16 8 ([[1, 1, 1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p448, Certificates.k16t8p448_check⟩ + +private theorem k16t8_cover1153 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 16 8 ([[1, 1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1154 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 16 8 ([[1, 1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1148 : ∀ P ∈ pathPatterns 3 4 [1, 1, 1, 1], HasCheckedCertificate 16 8 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k16t8_cover1149 + · exact by + intro _ + exact k16t8_cover1150 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1151 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k16t8_cover1152 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1153 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1154 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1156 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p449, Certificates.k16t8p449_check⟩ + +private theorem k16t8_cover1157 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p450, Certificates.k16t8p450_check⟩ + +private theorem k16t8_cover1155 : ∀ P ∈ pathPatterns 2 3 [1, 1, 1, 1, 1], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1156 + · exact by + intro _ + exact k16t8_cover1157 + +private theorem k16t8_cover1158 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 1, 1, 1], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1159 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 1, 1, 1], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p451, Certificates.k16t8p451_check⟩ + +private theorem k16t8_cover1160 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1, 1, 2], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p452, Certificates.k16t8p452_check⟩ + +private theorem k16t8_cover1161 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1, 1, 2], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1162 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1, 2, 1], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p453, Certificates.k16t8p453_check⟩ + +private theorem k16t8_cover1163 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 1, 3], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1165 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p454, Certificates.k16t8p454_check⟩ + +private theorem k16t8_cover1164 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1, 1, 2], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1165 + +private theorem k16t8_cover1166 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1, 2, 1], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1167 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 2, 1, 1], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p455, Certificates.k16t8p455_check⟩ + +private theorem k16t8_cover1168 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 2, 2], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1169 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 1, 3], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1170 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 3, 1], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1171 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 1, 4], HasCheckedCertificate 16 8 ([[1, 1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1173 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 16 8 ([[1, 1, 1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p456, Certificates.k16t8p456_check⟩ + +private theorem k16t8_cover1174 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 16 8 ([[1, 1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1175 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 16 8 ([[1, 1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1172 : ∀ P ∈ pathPatterns 3 3 [1, 1, 1, 2], HasCheckedCertificate 16 8 ([[1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k16t8_cover1173 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1174 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1175 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1177 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[1, 1, 1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p457, Certificates.k16t8p457_check⟩ + +private theorem k16t8_cover1176 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1, 2, 1], HasCheckedCertificate 16 8 ([[1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1177 + +private theorem k16t8_cover1178 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 2, 1, 1], HasCheckedCertificate 16 8 ([[1, 1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1179 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 1, 1, 1], HasCheckedCertificate 16 8 ([[1, 1, 1, 2, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p458, Certificates.k16t8p458_check⟩ + +private theorem k16t8_cover1180 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2, 1, 2], HasCheckedCertificate 16 8 ([[1, 1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1181 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 2, 2], HasCheckedCertificate 16 8 ([[1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1182 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2, 2, 1], HasCheckedCertificate 16 8 ([[1, 1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1183 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 2, 3], HasCheckedCertificate 16 8 ([[1, 1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1185 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 16 8 ([[1, 1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1184 : ∀ P ∈ pathPatterns 3 2 [1, 1, 1, 3], HasCheckedCertificate 16 8 ([[1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1185 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1186 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 3, 1], HasCheckedCertificate 16 8 ([[1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1187 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 3, 1, 1], HasCheckedCertificate 16 8 ([[1, 1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1188 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 3, 2], HasCheckedCertificate 16 8 ([[1, 1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1189 : ∀ P ∈ pathPatterns 3 1 [1, 1, 1, 4], HasCheckedCertificate 16 8 ([[1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1190 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 4, 1], HasCheckedCertificate 16 8 ([[1, 1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1191 : ∀ P ∈ pathPatterns 3 0 [1, 1, 1, 5], HasCheckedCertificate 16 8 ([[1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq1127 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([1, 1, 1] ++ tail) ∧ LexLE ([1, 1, 1] ++ tail) ([1, 1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([1, 1, 1] ++ tail).length) (8 - ([1, 1, 1] ++ tail).sum) ([1, 1, 1] ++ tail), + HasCheckedCertificate 16 8 ([] ++ (([1, 1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover1128 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1148 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1155 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1158 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover1159 + · exact by + intro _ + exact k16t8_cover1160 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1161 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover1162 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1163 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1164 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1166 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover1167 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1168 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1169 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1170 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1171 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1172 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1176 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1178 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover1179 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1180 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1181 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1182 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1183 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1184 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1186 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1187 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1188 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1189 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1190 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1191 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1193 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2], HasCheckedCertificate 16 8 ([[1, 1, 2], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p459, Certificates.k16t8p459_check⟩ + +private theorem k16t8_cover1194 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 16 8 ([[1, 1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1195 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 16 8 ([[1, 1, 2], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p460, Certificates.k16t8p460_check⟩ + +private theorem k16t8_cover1196 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 16 8 ([[1, 1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1198 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[1, 1, 2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p461, Certificates.k16t8p461_check⟩ + +private theorem k16t8_cover1197 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 16 8 ([[1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1198 + +private theorem k16t8_cover1199 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 16 8 ([[1, 1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1200 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 16 8 ([[1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1201 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 16 8 ([[1, 1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1192 : ∀ P ∈ pathPatterns 4 4 [1, 1, 2], HasCheckedCertificate 16 8 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro _ + exact k16t8_cover1193 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1194 + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover1195 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1196 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1197 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1199 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1200 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1201 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1203 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 16 8 ([[1, 1, 2, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p462, Certificates.k16t8p462_check⟩ + +private theorem k16t8_cover1204 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 16 8 ([[1, 1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1205 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 16 8 ([[1, 1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1202 : ∀ P ∈ pathPatterns 3 3 [1, 1, 2, 1], HasCheckedCertificate 16 8 ([[1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k16t8_cover1203 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1204 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1205 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1207 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[1, 1, 2, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p463, Certificates.k16t8p463_check⟩ + +private theorem k16t8_cover1206 : ∀ P ∈ pathPatterns 2 2 [1, 1, 2, 1, 1], HasCheckedCertificate 16 8 ([[1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1207 + +private theorem k16t8_cover1208 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1, 1, 2], HasCheckedCertificate 16 8 ([[1, 1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1209 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2, 1, 2], HasCheckedCertificate 16 8 ([[1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1210 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1, 2, 1], HasCheckedCertificate 16 8 ([[1, 1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1211 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 1, 3], HasCheckedCertificate 16 8 ([[1, 1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1213 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 16 8 ([[1, 1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1212 : ∀ P ∈ pathPatterns 3 2 [1, 1, 2, 2], HasCheckedCertificate 16 8 ([[1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1213 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1214 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2, 2, 1], HasCheckedCertificate 16 8 ([[1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1215 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 2, 1, 1], HasCheckedCertificate 16 8 ([[1, 1, 2, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1216 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 2, 2], HasCheckedCertificate 16 8 ([[1, 1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1217 : ∀ P ∈ pathPatterns 3 1 [1, 1, 2, 3], HasCheckedCertificate 16 8 ([[1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1218 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 3, 1], HasCheckedCertificate 16 8 ([[1, 1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1219 : ∀ P ∈ pathPatterns 3 0 [1, 1, 2, 4], HasCheckedCertificate 16 8 ([[1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1221 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 16 8 ([[1, 1, 3], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1222 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 16 8 ([[1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1223 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 16 8 ([[1, 1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1220 : ∀ P ∈ pathPatterns 4 3 [1, 1, 3], HasCheckedCertificate 16 8 ([[1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1221 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1222 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1223 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1225 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 16 8 ([[1, 1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1224 : ∀ P ∈ pathPatterns 3 2 [1, 1, 3, 1], HasCheckedCertificate 16 8 ([[1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1225 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1226 : ∀ P ∈ pathPatterns 2 1 [1, 1, 3, 1, 1], HasCheckedCertificate 16 8 ([[1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1227 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3, 1, 2], HasCheckedCertificate 16 8 ([[1, 1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1228 : ∀ P ∈ pathPatterns 3 1 [1, 1, 3, 2], HasCheckedCertificate 16 8 ([[1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1229 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3, 2, 1], HasCheckedCertificate 16 8 ([[1, 1, 3, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1230 : ∀ P ∈ pathPatterns 3 0 [1, 1, 3, 3], HasCheckedCertificate 16 8 ([[1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1232 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 16 8 ([[1, 1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1231 : ∀ P ∈ pathPatterns 4 2 [1, 1, 4], HasCheckedCertificate 16 8 ([[1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1232 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1233 : ∀ P ∈ pathPatterns 3 1 [1, 1, 4, 1], HasCheckedCertificate 16 8 ([[1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1234 : ∀ P ∈ pathPatterns 2 0 [1, 1, 4, 1, 1], HasCheckedCertificate 16 8 ([[1, 1, 4, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1235 : ∀ P ∈ pathPatterns 3 0 [1, 1, 4, 2], HasCheckedCertificate 16 8 ([[1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1236 : ∀ P ∈ pathPatterns 4 1 [1, 1, 5], HasCheckedCertificate 16 8 ([[1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1237 : ∀ P ∈ pathPatterns 3 0 [1, 1, 5, 1], HasCheckedCertificate 16 8 ([[1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1238 : ∀ P ∈ pathPatterns 4 0 [1, 1, 6], HasCheckedCertificate 16 8 ([[1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq1076 : amountSequenceForall 5 6 (fun tail => + (LexLE [] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([1, 1] ++ tail).length) (8 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 16 8 ([] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover1077 + · intro q + fin_cases q + · exact k16t8_seq1127 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1192 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1202 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1206 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 2, 1, 1, 1] ∧ LexLE [1, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 2, 1, 1, 1, 1] ∧ LexLE [1, 1, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1208 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1209 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1210 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1211 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1212 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1214 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1215 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1216 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1217 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1218 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1219 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1220 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1224 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1226 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 3, 1, 1, 1] ∧ LexLE [1, 1, 3, 1, 1, 1] [1, 1, 1, 3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1227 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1228 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1229 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1230 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1231 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1233 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1234 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1235 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1236 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1237 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1238 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1243 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[1, 2], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p464, Certificates.k16t8p464_check⟩ + +private theorem k16t8_cover1242 : ∀ P ∈ pathPatterns 2 2 [1, 2], HasCheckedCertificate 16 8 ([[1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1243 + +private theorem k16t8_cover1244 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1], HasCheckedCertificate 16 8 ([[1, 2], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1245 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2], HasCheckedCertificate 16 8 ([[1, 2], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1246 : ∀ P ∈ pathPatterns 2 1 [1, 3], HasCheckedCertificate 16 8 ([[1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1247 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1], HasCheckedCertificate 16 8 ([[1, 2], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1248 : ∀ P ∈ pathPatterns 2 0 [1, 4], HasCheckedCertificate 16 8 ([[1, 2], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1250 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 16 8 ([[1, 2], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1251 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 16 8 ([[1, 2], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1249 : ∀ P ∈ pathPatterns 3 3 [2], HasCheckedCertificate 16 8 ([[1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1250 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1251 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1252 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2], HasCheckedCertificate 16 8 ([[1, 2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1253 : ∀ P ∈ pathPatterns 2 1 [2, 2], HasCheckedCertificate 16 8 ([[1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1254 : ∀ P ∈ pathPatterns 2 0 [2, 3], HasCheckedCertificate 16 8 ([[1, 2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1255 : ∀ P ∈ pathPatterns 3 2 [3], HasCheckedCertificate 16 8 ([[1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1256 : ∀ P ∈ pathPatterns 3 1 [4], HasCheckedCertificate 16 8 ([[1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1257 : ∀ P ∈ pathPatterns 3 0 [5], HasCheckedCertificate 16 8 ([[1, 2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq1241 : amountSequenceForall 4 5 (fun tail => + (LexLE [1, 2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[1, 2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1242 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1244 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1245 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1246 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1247 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1248 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1249 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1252 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1253 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1254 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1255 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1256 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1257 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1240 : ∀ P ∈ pathPatterns 5 5 [1, 2], HasCheckedCertificate 16 8 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq1241 + + +private theorem k16t8_cover1259 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 16 8 ([[1, 2, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p465, Certificates.k16t8p465_check⟩ + +private theorem k16t8_cover1260 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 16 8 ([[1, 2, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1262 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[1, 2, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p466, Certificates.k16t8p466_check⟩ + +private theorem k16t8_cover1261 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 16 8 ([[1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1262 + +private theorem k16t8_cover1263 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 16 8 ([[1, 2, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1264 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 16 8 ([[1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1265 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 16 8 ([[1, 2, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1258 : ∀ P ∈ pathPatterns 4 4 [1, 2, 1], HasCheckedCertificate 16 8 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k16t8_cover1259 + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1260 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1261 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1263 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1264 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1265 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1266 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 1, 1, 2], HasCheckedCertificate 16 8 ([[1, 2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1267 : ∀ P ∈ pathPatterns 2 1 [1, 2, 1, 1, 2], HasCheckedCertificate 16 8 ([[1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1268 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 1, 2, 1], HasCheckedCertificate 16 8 ([[1, 2, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1269 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 1, 3], HasCheckedCertificate 16 8 ([[1, 2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1271 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 16 8 ([[1, 2, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1270 : ∀ P ∈ pathPatterns 3 2 [1, 2, 1, 2], HasCheckedCertificate 16 8 ([[1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1271 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1272 : ∀ P ∈ pathPatterns 2 1 [1, 2, 1, 2, 1], HasCheckedCertificate 16 8 ([[1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1273 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 2, 2], HasCheckedCertificate 16 8 ([[1, 2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1274 : ∀ P ∈ pathPatterns 3 1 [1, 2, 1, 3], HasCheckedCertificate 16 8 ([[1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1275 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 3, 1], HasCheckedCertificate 16 8 ([[1, 2, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1276 : ∀ P ∈ pathPatterns 3 0 [1, 2, 1, 4], HasCheckedCertificate 16 8 ([[1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1278 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 16 8 ([[1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1279 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 16 8 ([[1, 2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1277 : ∀ P ∈ pathPatterns 4 3 [1, 2, 2], HasCheckedCertificate 16 8 ([[1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1278 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1279 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1281 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 16 8 ([[1, 2, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1280 : ∀ P ∈ pathPatterns 3 2 [1, 2, 2, 1], HasCheckedCertificate 16 8 ([[1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1281 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1282 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2, 1, 2], HasCheckedCertificate 16 8 ([[1, 2, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1283 : ∀ P ∈ pathPatterns 3 1 [1, 2, 2, 2], HasCheckedCertificate 16 8 ([[1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1284 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2, 2, 1], HasCheckedCertificate 16 8 ([[1, 2, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1285 : ∀ P ∈ pathPatterns 3 0 [1, 2, 2, 3], HasCheckedCertificate 16 8 ([[1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1287 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 16 8 ([[1, 2, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1286 : ∀ P ∈ pathPatterns 4 2 [1, 2, 3], HasCheckedCertificate 16 8 ([[1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1287 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1288 : ∀ P ∈ pathPatterns 3 1 [1, 2, 3, 1], HasCheckedCertificate 16 8 ([[1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1289 : ∀ P ∈ pathPatterns 3 0 [1, 2, 3, 2], HasCheckedCertificate 16 8 ([[1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1290 : ∀ P ∈ pathPatterns 4 1 [1, 2, 4], HasCheckedCertificate 16 8 ([[1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1291 : ∀ P ∈ pathPatterns 3 0 [1, 2, 4, 1], HasCheckedCertificate 16 8 ([[1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1292 : ∀ P ∈ pathPatterns 4 0 [1, 2, 5], HasCheckedCertificate 16 8 ([[1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq1239 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([1, 2] ++ tail) ∧ LexLE ([1, 2] ++ tail) ([1, 2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([1, 2] ++ tail).length) (8 - ([1, 2] ++ tail).sum) ([1, 2] ++ tail), + HasCheckedCertificate 16 8 ([] ++ (([1, 2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover1240 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1258 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1266 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1267 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1268 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1269 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1270 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1272 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 2, 1, 1] ∧ LexLE [1, 2, 1, 2, 1, 1] [1, 1, 2, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1273 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1274 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1275 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1276 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1277 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1280 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1, 1] ∧ LexLE [1, 2, 2, 1, 1, 1] [1, 1, 1, 2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1282 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1283 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1284 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1285 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1286 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1288 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 3, 1, 1] ∧ LexLE [1, 2, 3, 1, 1] [1, 1, 3, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1289 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1290 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1291 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1292 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1294 : ∀ P ∈ pathPatterns 2 0 [1, 3], HasCheckedCertificate 16 8 ([[1, 3], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1296 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 16 8 ([[1, 3], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1295 : ∀ P ∈ pathPatterns 3 2 [2], HasCheckedCertificate 16 8 ([[1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1296 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1297 : ∀ P ∈ pathPatterns 2 0 [2, 2], HasCheckedCertificate 16 8 ([[1, 3], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1298 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 16 8 ([[1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1299 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 16 8 ([[1, 3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1293 : ∀ P ∈ pathPatterns 5 4 [1, 3], HasCheckedCertificate 16 8 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1294 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1295 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1297 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1298 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1299 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1301 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 16 8 ([[1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1302 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 16 8 ([[1, 3, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1300 : ∀ P ∈ pathPatterns 4 3 [1, 3, 1], HasCheckedCertificate 16 8 ([[1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1301 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1302 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1303 : ∀ P ∈ pathPatterns 2 0 [1, 3, 1, 1, 2], HasCheckedCertificate 16 8 ([[1, 3, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1304 : ∀ P ∈ pathPatterns 3 1 [1, 3, 1, 2], HasCheckedCertificate 16 8 ([[1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1305 : ∀ P ∈ pathPatterns 3 0 [1, 3, 1, 3], HasCheckedCertificate 16 8 ([[1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1307 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 16 8 ([[1, 3, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1306 : ∀ P ∈ pathPatterns 4 2 [1, 3, 2], HasCheckedCertificate 16 8 ([[1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1307 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1308 : ∀ P ∈ pathPatterns 3 0 [1, 3, 2, 2], HasCheckedCertificate 16 8 ([[1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1309 : ∀ P ∈ pathPatterns 4 1 [1, 3, 3], HasCheckedCertificate 16 8 ([[1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1310 : ∀ P ∈ pathPatterns 3 0 [1, 3, 3, 1], HasCheckedCertificate 16 8 ([[1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1311 : ∀ P ∈ pathPatterns 4 0 [1, 3, 4], HasCheckedCertificate 16 8 ([[1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1313 : ∀ P ∈ pathPatterns 3 1 [2], HasCheckedCertificate 16 8 ([[1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1314 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 16 8 ([[1, 4], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1312 : ∀ P ∈ pathPatterns 5 3 [1, 4], HasCheckedCertificate 16 8 ([[1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1313 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1314 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1316 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 16 8 ([[1, 4, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1315 : ∀ P ∈ pathPatterns 4 2 [1, 4, 1], HasCheckedCertificate 16 8 ([[1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1316 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1317 : ∀ P ∈ pathPatterns 3 0 [1, 4, 1, 2], HasCheckedCertificate 16 8 ([[1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1318 : ∀ P ∈ pathPatterns 4 1 [1, 4, 2], HasCheckedCertificate 16 8 ([[1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1319 : ∀ P ∈ pathPatterns 4 0 [1, 4, 3], HasCheckedCertificate 16 8 ([[1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1321 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 16 8 ([[1, 5], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1320 : ∀ P ∈ pathPatterns 5 2 [1, 5], HasCheckedCertificate 16 8 ([[1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1321 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1322 : ∀ P ∈ pathPatterns 4 1 [1, 5, 1], HasCheckedCertificate 16 8 ([[1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1323 : ∀ P ∈ pathPatterns 4 0 [1, 5, 2], HasCheckedCertificate 16 8 ([[1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1324 : ∀ P ∈ pathPatterns 5 1 [1, 6], HasCheckedCertificate 16 8 ([[1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1325 : ∀ P ∈ pathPatterns 4 0 [1, 6, 1], HasCheckedCertificate 16 8 ([[1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1326 : ∀ P ∈ pathPatterns 5 0 [1, 7], HasCheckedCertificate 16 8 ([[1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq917 : amountSequenceForall 6 7 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([1] ++ tail).length) (8 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 16 8 ([] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover918 + · intro q + fin_cases q + · exact k16t8_seq1076 + + · exact k16t8_seq1239 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1293 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1300 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1, 1] [1, 1, 1, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1303 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1304 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 2, 1] ∧ LexLE [1, 3, 1, 2, 1] [1, 2, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1305 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1306 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1, 1] ∧ LexLE [1, 3, 2, 1, 1] [1, 1, 2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1308 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1309 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1310 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1311 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1312 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1315 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1, 1] ∧ LexLE [1, 4, 1, 1, 1] [1, 1, 1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1317 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1318 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 2, 1] ∧ LexLE [1, 4, 2, 1] [1, 2, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1319 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1320 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1322 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 1, 1] ∧ LexLE [1, 5, 1, 1] [1, 1, 5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1323 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1324 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1325 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1326 + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq1330 : amountSequenceForall 4 5 (fun tail => + (LexLE [2] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 16 8 ([[2]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1, 1] [1, 1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1, 2] ∧ LexLE [1, 1, 1, 1, 2] [2, 1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 2, 1] ∧ LexLE [1, 1, 1, 2, 1] [1, 2, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 3] ∧ LexLE [1, 1, 1, 3] [3, 1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 1, 1] ∧ LexLE [1, 1, 2, 1, 1] [1, 1, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 2] ∧ LexLE [1, 1, 2, 2] [2, 2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3, 1] ∧ LexLE [1, 1, 3, 1] [1, 3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 4] ∧ LexLE [1, 1, 4] [4, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 2] ∧ LexLE [1, 2, 1, 2] [2, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2, 1] ∧ LexLE [1, 2, 2, 1] [1, 2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 3] ∧ LexLE [1, 2, 3] [3, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 2] ∧ LexLE [1, 3, 2] [2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4, 1] ∧ LexLE [1, 4, 1] [1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1333 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 16 8 ([[2], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k16t8p467, Certificates.k16t8p467_check⟩ + +private theorem k16t8_cover1332 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 16 8 ([[2], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k16t8_cover1333 + +private theorem k16t8_cover1334 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 16 8 ([[2], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1335 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 16 8 ([[2], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1336 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 16 8 ([[2], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1331 : ∀ P ∈ pathPatterns 4 4 [2], HasCheckedCertificate 16 8 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1332 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1334 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1335 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1336 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1337 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 2], HasCheckedCertificate 16 8 ([[2], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1338 : ∀ P ∈ pathPatterns 2 1 [2, 1, 2], HasCheckedCertificate 16 8 ([[2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1339 : ∀ P ∈ pathPatterns 2 0 [2, 1, 3], HasCheckedCertificate 16 8 ([[2], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1340 : ∀ P ∈ pathPatterns 3 2 [2, 2], HasCheckedCertificate 16 8 ([[2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1341 : ∀ P ∈ pathPatterns 2 0 [2, 2, 2], HasCheckedCertificate 16 8 ([[2], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1342 : ∀ P ∈ pathPatterns 3 1 [2, 3], HasCheckedCertificate 16 8 ([[2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1343 : ∀ P ∈ pathPatterns 3 0 [2, 4], HasCheckedCertificate 16 8 ([[2], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1345 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 16 8 ([[2], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1344 : ∀ P ∈ pathPatterns 4 3 [3], HasCheckedCertificate 16 8 ([[2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1345 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1346 : ∀ P ∈ pathPatterns 3 0 [3, 3], HasCheckedCertificate 16 8 ([[2], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1347 : ∀ P ∈ pathPatterns 4 2 [4], HasCheckedCertificate 16 8 ([[2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1348 : ∀ P ∈ pathPatterns 4 1 [5], HasCheckedCertificate 16 8 ([[2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1349 : ∀ P ∈ pathPatterns 4 0 [6], HasCheckedCertificate 16 8 ([[2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq1329 : amountSequenceForall 5 6 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k16t8_seq1330 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1331 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1337 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1338 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1339 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1340 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1341 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1342 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1343 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1344 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1346 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1347 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1348 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1349 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1328 : ∀ P ∈ pathPatterns 6 6 [2], HasCheckedCertificate 16 8 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq1329 + + +private theorem k16t8_cover1351 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 1, 1, 2], HasCheckedCertificate 16 8 ([[2, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k16t8_cover1352 : ∀ P ∈ pathPatterns 2 1 [2, 1, 1, 1, 2], HasCheckedCertificate 16 8 ([[2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k16t8_cover1353 : ∀ P ∈ pathPatterns 2 0 [2, 1, 1, 1, 3], HasCheckedCertificate 16 8 ([[2, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1354 : ∀ P ∈ pathPatterns 3 2 [2, 1, 1, 2], HasCheckedCertificate 16 8 ([[2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1355 : ∀ P ∈ pathPatterns 2 0 [2, 1, 1, 2, 2], HasCheckedCertificate 16 8 ([[2, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1356 : ∀ P ∈ pathPatterns 3 1 [2, 1, 1, 3], HasCheckedCertificate 16 8 ([[2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1357 : ∀ P ∈ pathPatterns 3 0 [2, 1, 1, 4], HasCheckedCertificate 16 8 ([[2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1359 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 16 8 ([[2, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1358 : ∀ P ∈ pathPatterns 4 3 [2, 1, 2], HasCheckedCertificate 16 8 ([[2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1359 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1360 : ∀ P ∈ pathPatterns 2 0 [2, 1, 2, 1, 2], HasCheckedCertificate 16 8 ([[2, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1361 : ∀ P ∈ pathPatterns 3 1 [2, 1, 2, 2], HasCheckedCertificate 16 8 ([[2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1362 : ∀ P ∈ pathPatterns 3 0 [2, 1, 2, 3], HasCheckedCertificate 16 8 ([[2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1363 : ∀ P ∈ pathPatterns 4 2 [2, 1, 3], HasCheckedCertificate 16 8 ([[2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1364 : ∀ P ∈ pathPatterns 3 0 [2, 1, 3, 2], HasCheckedCertificate 16 8 ([[2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1365 : ∀ P ∈ pathPatterns 4 1 [2, 1, 4], HasCheckedCertificate 16 8 ([[2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1366 : ∀ P ∈ pathPatterns 4 0 [2, 1, 5], HasCheckedCertificate 16 8 ([[2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq1350 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([2, 1] ++ tail) ∧ LexLE ([2, 1] ++ tail) ([2, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([2, 1] ++ tail).length) (8 - ([2, 1] ++ tail).sum) ([2, 1] ++ tail), + HasCheckedCertificate 16 8 ([] ++ (([2, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1351 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1352 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 1, 2, 1] [1, 2, 1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1353 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1354 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1, 1] ∧ LexLE [2, 1, 1, 2, 1, 1] [1, 1, 2, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1355 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1356 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 3, 1] ∧ LexLE [2, 1, 1, 3, 1] [1, 3, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1357 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1358 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1, 1] ∧ LexLE [2, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1360 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1361 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 2, 1] ∧ LexLE [2, 1, 2, 2, 1] [1, 2, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1362 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1363 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1, 1] ∧ LexLE [2, 1, 3, 1, 1] [1, 1, 3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1364 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1365 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 4, 1] ∧ LexLE [2, 1, 4, 1] [1, 4, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1366 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1368 : ∀ P ∈ pathPatterns 2 0 [2, 2], HasCheckedCertificate 16 8 ([[2, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1369 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 16 8 ([[2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1370 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 16 8 ([[2, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1367 : ∀ P ∈ pathPatterns 5 4 [2, 2], HasCheckedCertificate 16 8 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1368 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1369 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1370 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1371 : ∀ P ∈ pathPatterns 3 0 [2, 2, 1, 3], HasCheckedCertificate 16 8 ([[2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1372 : ∀ P ∈ pathPatterns 4 2 [2, 2, 2], HasCheckedCertificate 16 8 ([[2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1373 : ∀ P ∈ pathPatterns 3 0 [2, 2, 2, 2], HasCheckedCertificate 16 8 ([[2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1374 : ∀ P ∈ pathPatterns 4 1 [2, 2, 3], HasCheckedCertificate 16 8 ([[2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1375 : ∀ P ∈ pathPatterns 4 0 [2, 2, 4], HasCheckedCertificate 16 8 ([[2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1377 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 16 8 ([[2, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1376 : ∀ P ∈ pathPatterns 5 3 [2, 3], HasCheckedCertificate 16 8 ([[2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1377 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1378 : ∀ P ∈ pathPatterns 4 1 [2, 3, 2], HasCheckedCertificate 16 8 ([[2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1379 : ∀ P ∈ pathPatterns 4 0 [2, 3, 3], HasCheckedCertificate 16 8 ([[2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1380 : ∀ P ∈ pathPatterns 5 2 [2, 4], HasCheckedCertificate 16 8 ([[2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1381 : ∀ P ∈ pathPatterns 4 0 [2, 4, 2], HasCheckedCertificate 16 8 ([[2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1382 : ∀ P ∈ pathPatterns 5 1 [2, 5], HasCheckedCertificate 16 8 ([[2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1383 : ∀ P ∈ pathPatterns 5 0 [2, 6], HasCheckedCertificate 16 8 ([[2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq1327 : amountSequenceForall 6 6 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([2] ++ tail).length) (8 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 16 8 ([] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover1328 + · intro q + fin_cases q + · exact k16t8_seq1350 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1367 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 2] ∧ LexLE [2, 2, 1, 1, 2] [2, 1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2, 1] ∧ LexLE [2, 2, 1, 2, 1] [1, 2, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1371 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1372 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1, 1] ∧ LexLE [2, 2, 2, 1, 1] [1, 1, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1373 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1374 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 3, 1] ∧ LexLE [2, 2, 3, 1] [1, 3, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1375 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1376 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1, 1] ∧ LexLE [2, 3, 1, 1, 1] [1, 1, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 2] ∧ LexLE [2, 3, 1, 2] [2, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1378 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 1] ∧ LexLE [2, 3, 2, 1] [1, 2, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1379 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1380 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 1] ∧ LexLE [2, 4, 1, 1] [1, 1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1381 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1382 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1383 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1387 : ∀ P ∈ pathPatterns 4 2 [3], HasCheckedCertificate 16 8 ([[3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1388 : ∀ P ∈ pathPatterns 4 1 [4], HasCheckedCertificate 16 8 ([[3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1389 : ∀ P ∈ pathPatterns 4 0 [5], HasCheckedCertificate 16 8 ([[3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq1386 : amountSequenceForall 5 5 (fun tail => + (LexLE [3] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([[3]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1, 1] [1, 1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 2] ∧ LexLE [2, 1, 2] [2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1387 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1388 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1389 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1385 : ∀ P ∈ pathPatterns 6 5 [3], HasCheckedCertificate 16 8 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq1386 + + +private theorem k16t8_cover1390 : ∀ P ∈ pathPatterns 3 0 [3, 1, 1, 3], HasCheckedCertificate 16 8 ([[3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1391 : ∀ P ∈ pathPatterns 4 1 [3, 1, 3], HasCheckedCertificate 16 8 ([[3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1392 : ∀ P ∈ pathPatterns 4 0 [3, 1, 4], HasCheckedCertificate 16 8 ([[3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1393 : ∀ P ∈ pathPatterns 4 0 [3, 2, 3], HasCheckedCertificate 16 8 ([[3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1394 : ∀ P ∈ pathPatterns 5 2 [3, 3], HasCheckedCertificate 16 8 ([[3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1395 : ∀ P ∈ pathPatterns 5 1 [3, 4], HasCheckedCertificate 16 8 ([[3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1396 : ∀ P ∈ pathPatterns 5 0 [3, 5], HasCheckedCertificate 16 8 ([[3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq1384 : amountSequenceForall 6 5 (fun tail => + (LexLE [] ([3] ++ tail) ∧ LexLE ([3] ++ tail) ([3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([3] ++ tail).length) (8 - ([3] ++ tail).sum) ([3] ++ tail), + HasCheckedCertificate 16 8 ([] ++ (([3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover1385 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 2] ∧ LexLE [3, 1, 1, 1, 2] [2, 1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2, 1] ∧ LexLE [3, 1, 1, 2, 1] [1, 2, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1390 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1, 1] ∧ LexLE [3, 1, 2, 1, 1] [1, 1, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 2] ∧ LexLE [3, 1, 2, 2] [2, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1391 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 1] ∧ LexLE [3, 1, 3, 1] [1, 3, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1392 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1, 1] ∧ LexLE [3, 2, 1, 1, 1] [1, 1, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 2] ∧ LexLE [3, 2, 1, 2] [2, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 1] ∧ LexLE [3, 2, 2, 1] [1, 2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1393 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1394 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 1] ∧ LexLE [3, 3, 1, 1] [1, 1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1395 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1396 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1398 : ∀ P ∈ pathPatterns 4 0 [4], HasCheckedCertificate 16 8 ([[4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1397 : ∀ P ∈ pathPatterns 6 4 [4], HasCheckedCertificate 16 8 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1398 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1399 : ∀ P ∈ pathPatterns 5 0 [4, 4], HasCheckedCertificate 16 8 ([[4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1400 : ∀ P ∈ pathPatterns 6 3 [5], HasCheckedCertificate 16 8 ([[5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1401 : ∀ P ∈ pathPatterns 6 2 [6], HasCheckedCertificate 16 8 ([[6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1402 : ∀ P ∈ pathPatterns 6 1 [7], HasCheckedCertificate 16 8 ([[7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1403 : ∀ P ∈ pathPatterns 6 0 [8], HasCheckedCertificate 16 8 ([[8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k16t8_seq2 : amountSequenceForall 7 8 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([] ++ tail).length) (8 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 16 8 ([] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k16t8_cover3 + · intro q + fin_cases q + · exact k16t8_seq917 + + · exact k16t8_seq1327 + + · exact k16t8_seq1384 + + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1397 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1, 1] ∧ LexLE [4, 1, 1, 1, 1] [1, 1, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 2] ∧ LexLE [4, 1, 1, 2] [2, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 1] ∧ LexLE [4, 1, 2, 1] [1, 2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 1] ∧ LexLE [4, 2, 1, 1] [1, 1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1399 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1400 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 1] ∧ LexLE [5, 1, 1, 1] [1, 1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1401 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1402 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k16t8_cover1403 + · intro q + exact Fin.elim0 q + +private theorem k16t8_cover1 : ∀ P ∈ pathPatterns 8 8 [], HasCheckedCertificate 16 8 ([] ++ P) := by + apply pathPatterns_forall_step + exact k16t8_seq2 + + +theorem coverage_k16_t8 : + ∀ P ∈ pathPatterns 8 8, HasCheckedCertificate 16 8 P := + k16t8_cover1 + +end CycleClique.Construction.CertifiedCoverage + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK17.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK17.lean new file mode 100644 index 0000000000000000000000000000000000000000..1b03566348ea122dcb90e347230e54b8c82bf43f --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK17.lean @@ -0,0 +1,43557 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK17 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage + +namespace OAI + +namespace CycleClique.Construction.CertifiedCoverage + +private theorem k17t8_cover15 : ∀ P ∈ pathPatterns 0 9 [], HasCheckedCertificate 17 8 ([[], [], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p0, Certificates.k17t8p0_check⟩ + +private theorem k17t8_cover14 : ∀ P ∈ pathPatterns 1 9 [], HasCheckedCertificate 17 8 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k17t8_cover15 + +private theorem k17t8_cover16 : ∀ P ∈ pathPatterns 0 8 [1], HasCheckedCertificate 17 8 ([[], [], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p1, Certificates.k17t8p1_check⟩ + +private theorem k17t8_cover17 : ∀ P ∈ pathPatterns 0 7 [2], HasCheckedCertificate 17 8 ([[], [], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p2, Certificates.k17t8p2_check⟩ + +private theorem k17t8_cover18 : ∀ P ∈ pathPatterns 0 6 [3], HasCheckedCertificate 17 8 ([[], [], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p3, Certificates.k17t8p3_check⟩ + +private theorem k17t8_cover19 : ∀ P ∈ pathPatterns 0 5 [4], HasCheckedCertificate 17 8 ([[], [], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p4, Certificates.k17t8p4_check⟩ + +private theorem k17t8_cover20 : ∀ P ∈ pathPatterns 0 4 [5], HasCheckedCertificate 17 8 ([[], [], [], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p5, Certificates.k17t8p5_check⟩ + +private theorem k17t8_cover21 : ∀ P ∈ pathPatterns 0 3 [6], HasCheckedCertificate 17 8 ([[], [], [], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p6, Certificates.k17t8p6_check⟩ + +private theorem k17t8_cover22 : ∀ P ∈ pathPatterns 0 2 [7], HasCheckedCertificate 17 8 ([[], [], [], [], [], [], [7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p7, Certificates.k17t8p7_check⟩ + +private theorem k17t8_cover23 : ∀ P ∈ pathPatterns 0 1 [8], HasCheckedCertificate 17 8 ([[], [], [], [], [], [], [8]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p8, Certificates.k17t8p8_check⟩ + +private theorem k17t8_cover24 : ∀ P ∈ pathPatterns 0 0 [9], HasCheckedCertificate 17 8 ([[], [], [], [], [], [], [9]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p9, Certificates.k17t8p9_check⟩ + +private theorem k17t8_cover13 : ∀ P ∈ pathPatterns 2 9 [], HasCheckedCertificate 17 8 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k17t8_cover14 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover16 + · exact by + intro _ + exact k17t8_cover17 + · exact by + intro _ + exact k17t8_cover18 + · exact by + intro _ + exact k17t8_cover19 + · exact by + intro _ + exact k17t8_cover20 + · exact by + intro _ + exact k17t8_cover21 + · exact by + intro _ + exact k17t8_cover22 + · exact by + intro _ + exact k17t8_cover23 + · exact by + intro _ + exact k17t8_cover24 + +private theorem k17t8_cover25 : ∀ P ∈ pathPatterns 1 8 [1], HasCheckedCertificate 17 8 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover26 : ∀ P ∈ pathPatterns 0 7 [1, 1], HasCheckedCertificate 17 8 ([[], [], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p10, Certificates.k17t8p10_check⟩ + +private theorem k17t8_cover27 : ∀ P ∈ pathPatterns 0 6 [1, 2], HasCheckedCertificate 17 8 ([[], [], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p11, Certificates.k17t8p11_check⟩ + +private theorem k17t8_cover28 : ∀ P ∈ pathPatterns 0 5 [1, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p12, Certificates.k17t8p12_check⟩ + +private theorem k17t8_cover29 : ∀ P ∈ pathPatterns 0 4 [1, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p13, Certificates.k17t8p13_check⟩ + +private theorem k17t8_cover30 : ∀ P ∈ pathPatterns 0 3 [1, 5], HasCheckedCertificate 17 8 ([[], [], [], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p14, Certificates.k17t8p14_check⟩ + +private theorem k17t8_cover31 : ∀ P ∈ pathPatterns 0 2 [1, 6], HasCheckedCertificate 17 8 ([[], [], [], [], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p15, Certificates.k17t8p15_check⟩ + +private theorem k17t8_cover32 : ∀ P ∈ pathPatterns 0 1 [1, 7], HasCheckedCertificate 17 8 ([[], [], [], [], [], [1, 7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p16, Certificates.k17t8p16_check⟩ + +private theorem k17t8_cover33 : ∀ P ∈ pathPatterns 0 0 [1, 8], HasCheckedCertificate 17 8 ([[], [], [], [], [], [1, 8]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p17, Certificates.k17t8p17_check⟩ + +private theorem k17t8_cover34 : ∀ P ∈ pathPatterns 1 7 [2], HasCheckedCertificate 17 8 ([[], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover35 : ∀ P ∈ pathPatterns 0 5 [2, 2], HasCheckedCertificate 17 8 ([[], [], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p18, Certificates.k17t8p18_check⟩ + +private theorem k17t8_cover36 : ∀ P ∈ pathPatterns 0 4 [2, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p19, Certificates.k17t8p19_check⟩ + +private theorem k17t8_cover37 : ∀ P ∈ pathPatterns 0 3 [2, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p20, Certificates.k17t8p20_check⟩ + +private theorem k17t8_cover38 : ∀ P ∈ pathPatterns 0 2 [2, 5], HasCheckedCertificate 17 8 ([[], [], [], [], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p21, Certificates.k17t8p21_check⟩ + +private theorem k17t8_cover39 : ∀ P ∈ pathPatterns 0 1 [2, 6], HasCheckedCertificate 17 8 ([[], [], [], [], [], [2, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p22, Certificates.k17t8p22_check⟩ + +private theorem k17t8_cover40 : ∀ P ∈ pathPatterns 0 0 [2, 7], HasCheckedCertificate 17 8 ([[], [], [], [], [], [2, 7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p23, Certificates.k17t8p23_check⟩ + +private theorem k17t8_cover41 : ∀ P ∈ pathPatterns 1 6 [3], HasCheckedCertificate 17 8 ([[], [], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover42 : ∀ P ∈ pathPatterns 0 3 [3, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p24, Certificates.k17t8p24_check⟩ + +private theorem k17t8_cover43 : ∀ P ∈ pathPatterns 0 2 [3, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p25, Certificates.k17t8p25_check⟩ + +private theorem k17t8_cover44 : ∀ P ∈ pathPatterns 0 1 [3, 5], HasCheckedCertificate 17 8 ([[], [], [], [], [], [3, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p26, Certificates.k17t8p26_check⟩ + +private theorem k17t8_cover45 : ∀ P ∈ pathPatterns 0 0 [3, 6], HasCheckedCertificate 17 8 ([[], [], [], [], [], [3, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p27, Certificates.k17t8p27_check⟩ + +private theorem k17t8_cover46 : ∀ P ∈ pathPatterns 1 5 [4], HasCheckedCertificate 17 8 ([[], [], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover47 : ∀ P ∈ pathPatterns 0 1 [4, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [], [4, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p28, Certificates.k17t8p28_check⟩ + +private theorem k17t8_cover48 : ∀ P ∈ pathPatterns 0 0 [4, 5], HasCheckedCertificate 17 8 ([[], [], [], [], [], [4, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p29, Certificates.k17t8p29_check⟩ + +private theorem k17t8_cover49 : ∀ P ∈ pathPatterns 1 4 [5], HasCheckedCertificate 17 8 ([[], [], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover50 : ∀ P ∈ pathPatterns 1 3 [6], HasCheckedCertificate 17 8 ([[], [], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover51 : ∀ P ∈ pathPatterns 1 2 [7], HasCheckedCertificate 17 8 ([[], [], [], [], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover52 : ∀ P ∈ pathPatterns 1 1 [8], HasCheckedCertificate 17 8 ([[], [], [], [], [], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover53 : ∀ P ∈ pathPatterns 1 0 [9], HasCheckedCertificate 17 8 ([[], [], [], [], [], [9]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [9] [] ∧ LexLE [] [])) h) + +private theorem k17t8_seq12 : amountSequenceForall 2 9 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (2 - ([] ++ tail).length) (9 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [], [], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover13 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover25 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover26 + · exact by + intro _ + exact k17t8_cover27 + · exact by + intro _ + exact k17t8_cover28 + · exact by + intro _ + exact k17t8_cover29 + · exact by + intro _ + exact k17t8_cover30 + · exact by + intro _ + exact k17t8_cover31 + · exact by + intro _ + exact k17t8_cover32 + · exact by + intro _ + exact k17t8_cover33 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover34 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover35 + · exact by + intro _ + exact k17t8_cover36 + · exact by + intro _ + exact k17t8_cover37 + · exact by + intro _ + exact k17t8_cover38 + · exact by + intro _ + exact k17t8_cover39 + · exact by + intro _ + exact k17t8_cover40 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover41 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k17t8_cover42 + · exact by + intro _ + exact k17t8_cover43 + · exact by + intro _ + exact k17t8_cover44 + · exact by + intro _ + exact k17t8_cover45 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover46 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · exact by + intro _ + exact k17t8_cover47 + · exact by + intro _ + exact k17t8_cover48 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover49 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 4] ∧ LexLE [5, 4] [4, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover50 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 3] ∧ LexLE [6, 3] [3, 6])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover51 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 2] ∧ LexLE [7, 2] [2, 7])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover52 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [8, 1] ∧ LexLE [8, 1] [1, 8])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover53 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover11 : ∀ P ∈ pathPatterns 3 9 [], HasCheckedCertificate 17 8 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq12 + + +private theorem k17t8_cover56 : ∀ P ∈ pathPatterns 0 7 [1], HasCheckedCertificate 17 8 ([[], [], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p30, Certificates.k17t8p30_check⟩ + +private theorem k17t8_cover57 : ∀ P ∈ pathPatterns 0 6 [2], HasCheckedCertificate 17 8 ([[], [], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p31, Certificates.k17t8p31_check⟩ + +private theorem k17t8_cover58 : ∀ P ∈ pathPatterns 0 5 [3], HasCheckedCertificate 17 8 ([[], [], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p32, Certificates.k17t8p32_check⟩ + +private theorem k17t8_cover59 : ∀ P ∈ pathPatterns 0 4 [4], HasCheckedCertificate 17 8 ([[], [], [], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p33, Certificates.k17t8p33_check⟩ + +private theorem k17t8_cover60 : ∀ P ∈ pathPatterns 0 3 [5], HasCheckedCertificate 17 8 ([[], [], [], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p34, Certificates.k17t8p34_check⟩ + +private theorem k17t8_cover61 : ∀ P ∈ pathPatterns 0 2 [6], HasCheckedCertificate 17 8 ([[], [], [], [], [1], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p35, Certificates.k17t8p35_check⟩ + +private theorem k17t8_cover62 : ∀ P ∈ pathPatterns 0 1 [7], HasCheckedCertificate 17 8 ([[], [], [], [], [1], [7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p36, Certificates.k17t8p36_check⟩ + +private theorem k17t8_cover63 : ∀ P ∈ pathPatterns 0 0 [8], HasCheckedCertificate 17 8 ([[], [], [], [], [1], [8]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p37, Certificates.k17t8p37_check⟩ + +private theorem k17t8_cover55 : ∀ P ∈ pathPatterns 2 8 [1], HasCheckedCertificate 17 8 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover56 + · exact by + intro _ + exact k17t8_cover57 + · exact by + intro _ + exact k17t8_cover58 + · exact by + intro _ + exact k17t8_cover59 + · exact by + intro _ + exact k17t8_cover60 + · exact by + intro _ + exact k17t8_cover61 + · exact by + intro _ + exact k17t8_cover62 + · exact by + intro _ + exact k17t8_cover63 + +private theorem k17t8_cover64 : ∀ P ∈ pathPatterns 1 7 [1, 1], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover65 : ∀ P ∈ pathPatterns 0 6 [1, 1, 1], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p38, Certificates.k17t8p38_check⟩ + +private theorem k17t8_cover66 : ∀ P ∈ pathPatterns 0 5 [1, 1, 2], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p39, Certificates.k17t8p39_check⟩ + +private theorem k17t8_cover67 : ∀ P ∈ pathPatterns 0 4 [1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p40, Certificates.k17t8p40_check⟩ + +private theorem k17t8_cover68 : ∀ P ∈ pathPatterns 0 3 [1, 1, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p41, Certificates.k17t8p41_check⟩ + +private theorem k17t8_cover69 : ∀ P ∈ pathPatterns 0 2 [1, 1, 5], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p42, Certificates.k17t8p42_check⟩ + +private theorem k17t8_cover70 : ∀ P ∈ pathPatterns 0 1 [1, 1, 6], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p43, Certificates.k17t8p43_check⟩ + +private theorem k17t8_cover71 : ∀ P ∈ pathPatterns 0 0 [1, 1, 7], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 1, 7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p44, Certificates.k17t8p44_check⟩ + +private theorem k17t8_cover72 : ∀ P ∈ pathPatterns 1 6 [1, 2], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover73 : ∀ P ∈ pathPatterns 0 5 [1, 2, 1], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p45, Certificates.k17t8p45_check⟩ + +private theorem k17t8_cover74 : ∀ P ∈ pathPatterns 0 4 [1, 2, 2], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p46, Certificates.k17t8p46_check⟩ + +private theorem k17t8_cover75 : ∀ P ∈ pathPatterns 0 3 [1, 2, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p47, Certificates.k17t8p47_check⟩ + +private theorem k17t8_cover76 : ∀ P ∈ pathPatterns 0 2 [1, 2, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p48, Certificates.k17t8p48_check⟩ + +private theorem k17t8_cover77 : ∀ P ∈ pathPatterns 0 1 [1, 2, 5], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p49, Certificates.k17t8p49_check⟩ + +private theorem k17t8_cover78 : ∀ P ∈ pathPatterns 0 0 [1, 2, 6], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 2, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p50, Certificates.k17t8p50_check⟩ + +private theorem k17t8_cover79 : ∀ P ∈ pathPatterns 1 5 [1, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover80 : ∀ P ∈ pathPatterns 0 4 [1, 3, 1], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p51, Certificates.k17t8p51_check⟩ + +private theorem k17t8_cover81 : ∀ P ∈ pathPatterns 0 3 [1, 3, 2], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p52, Certificates.k17t8p52_check⟩ + +private theorem k17t8_cover82 : ∀ P ∈ pathPatterns 0 2 [1, 3, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p53, Certificates.k17t8p53_check⟩ + +private theorem k17t8_cover83 : ∀ P ∈ pathPatterns 0 1 [1, 3, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p54, Certificates.k17t8p54_check⟩ + +private theorem k17t8_cover84 : ∀ P ∈ pathPatterns 0 0 [1, 3, 5], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 3, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p55, Certificates.k17t8p55_check⟩ + +private theorem k17t8_cover85 : ∀ P ∈ pathPatterns 1 4 [1, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover86 : ∀ P ∈ pathPatterns 0 3 [1, 4, 1], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p56, Certificates.k17t8p56_check⟩ + +private theorem k17t8_cover87 : ∀ P ∈ pathPatterns 0 2 [1, 4, 2], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p57, Certificates.k17t8p57_check⟩ + +private theorem k17t8_cover88 : ∀ P ∈ pathPatterns 0 1 [1, 4, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 4, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p58, Certificates.k17t8p58_check⟩ + +private theorem k17t8_cover89 : ∀ P ∈ pathPatterns 0 0 [1, 4, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 4, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p59, Certificates.k17t8p59_check⟩ + +private theorem k17t8_cover90 : ∀ P ∈ pathPatterns 1 3 [1, 5], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover91 : ∀ P ∈ pathPatterns 0 2 [1, 5, 1], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p60, Certificates.k17t8p60_check⟩ + +private theorem k17t8_cover92 : ∀ P ∈ pathPatterns 0 1 [1, 5, 2], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 5, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p61, Certificates.k17t8p61_check⟩ + +private theorem k17t8_cover93 : ∀ P ∈ pathPatterns 0 0 [1, 5, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 5, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p62, Certificates.k17t8p62_check⟩ + +private theorem k17t8_cover94 : ∀ P ∈ pathPatterns 1 2 [1, 6], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover95 : ∀ P ∈ pathPatterns 0 1 [1, 6, 1], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 6, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p63, Certificates.k17t8p63_check⟩ + +private theorem k17t8_cover96 : ∀ P ∈ pathPatterns 0 0 [1, 6, 2], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 6, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p64, Certificates.k17t8p64_check⟩ + +private theorem k17t8_cover97 : ∀ P ∈ pathPatterns 1 1 [1, 7], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover98 : ∀ P ∈ pathPatterns 0 0 [1, 7, 1], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 7, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p65, Certificates.k17t8p65_check⟩ + +private theorem k17t8_cover99 : ∀ P ∈ pathPatterns 1 0 [1, 8], HasCheckedCertificate 17 8 ([[], [], [], [], [1, 8]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 8] [] ∧ LexLE [] [])) h) + +private theorem k17t8_seq54 : amountSequenceForall 2 8 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([1] ++ tail).length) (9 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 17 8 ([[], [], [], []] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover55 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover64 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover65 + · exact by + intro _ + exact k17t8_cover66 + · exact by + intro _ + exact k17t8_cover67 + · exact by + intro _ + exact k17t8_cover68 + · exact by + intro _ + exact k17t8_cover69 + · exact by + intro _ + exact k17t8_cover70 + · exact by + intro _ + exact k17t8_cover71 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover72 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover73 + · exact by + intro _ + exact k17t8_cover74 + · exact by + intro _ + exact k17t8_cover75 + · exact by + intro _ + exact k17t8_cover76 + · exact by + intro _ + exact k17t8_cover77 + · exact by + intro _ + exact k17t8_cover78 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover79 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover80 + · exact by + intro _ + exact k17t8_cover81 + · exact by + intro _ + exact k17t8_cover82 + · exact by + intro _ + exact k17t8_cover83 + · exact by + intro _ + exact k17t8_cover84 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover85 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover86 + · exact by + intro _ + exact k17t8_cover87 + · exact by + intro _ + exact k17t8_cover88 + · exact by + intro _ + exact k17t8_cover89 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover90 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover91 + · exact by + intro _ + exact k17t8_cover92 + · exact by + intro _ + exact k17t8_cover93 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover94 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover95 + · exact by + intro _ + exact k17t8_cover96 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover97 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover98 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover99 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover102 : ∀ P ∈ pathPatterns 0 5 [2], HasCheckedCertificate 17 8 ([[], [], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p66, Certificates.k17t8p66_check⟩ + +private theorem k17t8_cover103 : ∀ P ∈ pathPatterns 0 4 [3], HasCheckedCertificate 17 8 ([[], [], [], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p67, Certificates.k17t8p67_check⟩ + +private theorem k17t8_cover104 : ∀ P ∈ pathPatterns 0 3 [4], HasCheckedCertificate 17 8 ([[], [], [], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p68, Certificates.k17t8p68_check⟩ + +private theorem k17t8_cover105 : ∀ P ∈ pathPatterns 0 2 [5], HasCheckedCertificate 17 8 ([[], [], [], [], [2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p69, Certificates.k17t8p69_check⟩ + +private theorem k17t8_cover106 : ∀ P ∈ pathPatterns 0 1 [6], HasCheckedCertificate 17 8 ([[], [], [], [], [2], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p70, Certificates.k17t8p70_check⟩ + +private theorem k17t8_cover107 : ∀ P ∈ pathPatterns 0 0 [7], HasCheckedCertificate 17 8 ([[], [], [], [], [2], [7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p71, Certificates.k17t8p71_check⟩ + +private theorem k17t8_cover101 : ∀ P ∈ pathPatterns 2 7 [2], HasCheckedCertificate 17 8 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover102 + · exact by + intro _ + exact k17t8_cover103 + · exact by + intro _ + exact k17t8_cover104 + · exact by + intro _ + exact k17t8_cover105 + · exact by + intro _ + exact k17t8_cover106 + · exact by + intro _ + exact k17t8_cover107 + +private theorem k17t8_cover108 : ∀ P ∈ pathPatterns 0 4 [2, 1, 2], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p72, Certificates.k17t8p72_check⟩ + +private theorem k17t8_cover109 : ∀ P ∈ pathPatterns 0 3 [2, 1, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p73, Certificates.k17t8p73_check⟩ + +private theorem k17t8_cover110 : ∀ P ∈ pathPatterns 0 2 [2, 1, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p74, Certificates.k17t8p74_check⟩ + +private theorem k17t8_cover111 : ∀ P ∈ pathPatterns 0 1 [2, 1, 5], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p75, Certificates.k17t8p75_check⟩ + +private theorem k17t8_cover112 : ∀ P ∈ pathPatterns 0 0 [2, 1, 6], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p76, Certificates.k17t8p76_check⟩ + +private theorem k17t8_cover113 : ∀ P ∈ pathPatterns 1 5 [2, 2], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover114 : ∀ P ∈ pathPatterns 0 3 [2, 2, 2], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p77, Certificates.k17t8p77_check⟩ + +private theorem k17t8_cover115 : ∀ P ∈ pathPatterns 0 2 [2, 2, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p78, Certificates.k17t8p78_check⟩ + +private theorem k17t8_cover116 : ∀ P ∈ pathPatterns 0 1 [2, 2, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p79, Certificates.k17t8p79_check⟩ + +private theorem k17t8_cover117 : ∀ P ∈ pathPatterns 0 0 [2, 2, 5], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p80, Certificates.k17t8p80_check⟩ + +private theorem k17t8_cover118 : ∀ P ∈ pathPatterns 1 4 [2, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover119 : ∀ P ∈ pathPatterns 0 2 [2, 3, 2], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p81, Certificates.k17t8p81_check⟩ + +private theorem k17t8_cover120 : ∀ P ∈ pathPatterns 0 1 [2, 3, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p82, Certificates.k17t8p82_check⟩ + +private theorem k17t8_cover121 : ∀ P ∈ pathPatterns 0 0 [2, 3, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p83, Certificates.k17t8p83_check⟩ + +private theorem k17t8_cover122 : ∀ P ∈ pathPatterns 1 3 [2, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover123 : ∀ P ∈ pathPatterns 0 1 [2, 4, 2], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p84, Certificates.k17t8p84_check⟩ + +private theorem k17t8_cover124 : ∀ P ∈ pathPatterns 0 0 [2, 4, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 4, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p85, Certificates.k17t8p85_check⟩ + +private theorem k17t8_cover125 : ∀ P ∈ pathPatterns 1 2 [2, 5], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover126 : ∀ P ∈ pathPatterns 0 0 [2, 5, 2], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 5, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p86, Certificates.k17t8p86_check⟩ + +private theorem k17t8_cover127 : ∀ P ∈ pathPatterns 1 1 [2, 6], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover128 : ∀ P ∈ pathPatterns 1 0 [2, 7], HasCheckedCertificate 17 8 ([[], [], [], [], [2, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 7] [] ∧ LexLE [] [])) h) + +private theorem k17t8_seq100 : amountSequenceForall 2 7 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([2] ++ tail).length) (9 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 17 8 ([[], [], [], []] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover101 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover108 + · exact by + intro _ + exact k17t8_cover109 + · exact by + intro _ + exact k17t8_cover110 + · exact by + intro _ + exact k17t8_cover111 + · exact by + intro _ + exact k17t8_cover112 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover113 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k17t8_cover114 + · exact by + intro _ + exact k17t8_cover115 + · exact by + intro _ + exact k17t8_cover116 + · exact by + intro _ + exact k17t8_cover117 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover118 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + intro _ + exact k17t8_cover119 + · exact by + intro _ + exact k17t8_cover120 + · exact by + intro _ + exact k17t8_cover121 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover122 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · exact by + intro _ + exact k17t8_cover123 + · exact by + intro _ + exact k17t8_cover124 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover125 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · exact by + intro _ + exact k17t8_cover126 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover127 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 6, 1] ∧ LexLE [2, 6, 1] [1, 6, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover128 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover130 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 17 8 ([[], [], [], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p87, Certificates.k17t8p87_check⟩ + +private theorem k17t8_cover131 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 17 8 ([[], [], [], [], [3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p88, Certificates.k17t8p88_check⟩ + +private theorem k17t8_cover132 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 17 8 ([[], [], [], [], [3], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p89, Certificates.k17t8p89_check⟩ + +private theorem k17t8_cover133 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 17 8 ([[], [], [], [], [3], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p90, Certificates.k17t8p90_check⟩ + +private theorem k17t8_cover129 : ∀ P ∈ pathPatterns 2 6 [3], HasCheckedCertificate 17 8 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover130 + · exact by + intro _ + exact k17t8_cover131 + · exact by + intro _ + exact k17t8_cover132 + · exact by + intro _ + exact k17t8_cover133 + +private theorem k17t8_cover134 : ∀ P ∈ pathPatterns 0 2 [3, 1, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p91, Certificates.k17t8p91_check⟩ + +private theorem k17t8_cover135 : ∀ P ∈ pathPatterns 0 1 [3, 1, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [3, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p92, Certificates.k17t8p92_check⟩ + +private theorem k17t8_cover136 : ∀ P ∈ pathPatterns 0 0 [3, 1, 5], HasCheckedCertificate 17 8 ([[], [], [], [], [3, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p93, Certificates.k17t8p93_check⟩ + +private theorem k17t8_cover137 : ∀ P ∈ pathPatterns 0 1 [3, 2, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [3, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p94, Certificates.k17t8p94_check⟩ + +private theorem k17t8_cover138 : ∀ P ∈ pathPatterns 0 0 [3, 2, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [3, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p95, Certificates.k17t8p95_check⟩ + +private theorem k17t8_cover139 : ∀ P ∈ pathPatterns 1 3 [3, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover140 : ∀ P ∈ pathPatterns 0 0 [3, 3, 3], HasCheckedCertificate 17 8 ([[], [], [], [], [3, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p96, Certificates.k17t8p96_check⟩ + +private theorem k17t8_cover141 : ∀ P ∈ pathPatterns 1 2 [3, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover142 : ∀ P ∈ pathPatterns 1 1 [3, 5], HasCheckedCertificate 17 8 ([[], [], [], [], [3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover143 : ∀ P ∈ pathPatterns 1 0 [3, 6], HasCheckedCertificate 17 8 ([[], [], [], [], [3, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover145 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 17 8 ([[], [], [], [], [4], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p97, Certificates.k17t8p97_check⟩ + +private theorem k17t8_cover146 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 17 8 ([[], [], [], [], [4], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p98, Certificates.k17t8p98_check⟩ + +private theorem k17t8_cover144 : ∀ P ∈ pathPatterns 2 5 [4], HasCheckedCertificate 17 8 ([[], [], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · exact by + intro _ + exact k17t8_cover145 + · exact by + intro _ + exact k17t8_cover146 + +private theorem k17t8_cover147 : ∀ P ∈ pathPatterns 0 0 [4, 1, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [4, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p99, Certificates.k17t8p99_check⟩ + +private theorem k17t8_cover148 : ∀ P ∈ pathPatterns 1 1 [4, 4], HasCheckedCertificate 17 8 ([[], [], [], [], [4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover149 : ∀ P ∈ pathPatterns 1 0 [4, 5], HasCheckedCertificate 17 8 ([[], [], [], [], [4, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover150 : ∀ P ∈ pathPatterns 2 4 [5], HasCheckedCertificate 17 8 ([[], [], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [4] ∧ LexLE [4] [4])) h) + +private theorem k17t8_cover151 : ∀ P ∈ pathPatterns 2 3 [6], HasCheckedCertificate 17 8 ([[], [], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [3] ∧ LexLE [3] [3])) h) + +private theorem k17t8_cover152 : ∀ P ∈ pathPatterns 2 2 [7], HasCheckedCertificate 17 8 ([[], [], [], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover153 : ∀ P ∈ pathPatterns 2 1 [8], HasCheckedCertificate 17 8 ([[], [], [], [], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover154 : ∀ P ∈ pathPatterns 2 0 [9], HasCheckedCertificate 17 8 ([[], [], [], [], [9]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [9] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq10 : amountSequenceForall 3 9 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (9 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover11 + · intro q + fin_cases q + · exact k17t8_seq54 + + · exact k17t8_seq100 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover129 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + intro _ + exact k17t8_cover134 + · exact by + intro _ + exact k17t8_cover135 + · exact by + intro _ + exact k17t8_cover136 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · exact by + intro _ + exact k17t8_cover137 + · exact by + intro _ + exact k17t8_cover138 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover139 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · exact by + intro _ + exact k17t8_cover140 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover141 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 2] ∧ LexLE [3, 4, 2] [2, 4, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover142 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 5, 1] ∧ LexLE [3, 5, 1] [1, 5, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover143 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover144 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · exact by + intro _ + exact k17t8_cover147 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 3] ∧ LexLE [4, 2, 3] [3, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 2] ∧ LexLE [4, 3, 2] [2, 3, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover148 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 4, 1] ∧ LexLE [4, 4, 1] [1, 4, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover149 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover150 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 3] ∧ LexLE [5, 1, 3] [3, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 2] ∧ LexLE [5, 2, 2] [2, 2, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3, 1] ∧ LexLE [5, 3, 1] [1, 3, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 4] ∧ LexLE [5, 4] [4, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover151 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 2] ∧ LexLE [6, 1, 2] [2, 1, 6])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2, 1] ∧ LexLE [6, 2, 1] [1, 2, 6])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 3] ∧ LexLE [6, 3] [3, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover152 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1, 1] ∧ LexLE [7, 1, 1] [1, 1, 7])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 2] ∧ LexLE [7, 2] [2, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover153 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [8, 1] ∧ LexLE [8, 1] [1, 8])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover154 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover9 : ∀ P ∈ pathPatterns 4 9 [], HasCheckedCertificate 17 8 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq10 + + +private theorem k17t8_cover158 : ∀ P ∈ pathPatterns 1 7 [1], HasCheckedCertificate 17 8 ([[], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover159 : ∀ P ∈ pathPatterns 0 6 [1, 1], HasCheckedCertificate 17 8 ([[], [], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p100, Certificates.k17t8p100_check⟩ + +private theorem k17t8_cover160 : ∀ P ∈ pathPatterns 0 5 [1, 2], HasCheckedCertificate 17 8 ([[], [], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p101, Certificates.k17t8p101_check⟩ + +private theorem k17t8_cover161 : ∀ P ∈ pathPatterns 0 4 [1, 3], HasCheckedCertificate 17 8 ([[], [], [], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p102, Certificates.k17t8p102_check⟩ + +private theorem k17t8_cover162 : ∀ P ∈ pathPatterns 0 3 [1, 4], HasCheckedCertificate 17 8 ([[], [], [], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p103, Certificates.k17t8p103_check⟩ + +private theorem k17t8_cover163 : ∀ P ∈ pathPatterns 0 2 [1, 5], HasCheckedCertificate 17 8 ([[], [], [], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p104, Certificates.k17t8p104_check⟩ + +private theorem k17t8_cover164 : ∀ P ∈ pathPatterns 0 1 [1, 6], HasCheckedCertificate 17 8 ([[], [], [], [1], [1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p105, Certificates.k17t8p105_check⟩ + +private theorem k17t8_cover165 : ∀ P ∈ pathPatterns 0 0 [1, 7], HasCheckedCertificate 17 8 ([[], [], [], [1], [1, 7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p106, Certificates.k17t8p106_check⟩ + +private theorem k17t8_cover166 : ∀ P ∈ pathPatterns 1 6 [2], HasCheckedCertificate 17 8 ([[], [], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover167 : ∀ P ∈ pathPatterns 0 4 [2, 2], HasCheckedCertificate 17 8 ([[], [], [], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p107, Certificates.k17t8p107_check⟩ + +private theorem k17t8_cover168 : ∀ P ∈ pathPatterns 0 3 [2, 3], HasCheckedCertificate 17 8 ([[], [], [], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p108, Certificates.k17t8p108_check⟩ + +private theorem k17t8_cover169 : ∀ P ∈ pathPatterns 0 2 [2, 4], HasCheckedCertificate 17 8 ([[], [], [], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p109, Certificates.k17t8p109_check⟩ + +private theorem k17t8_cover170 : ∀ P ∈ pathPatterns 0 1 [2, 5], HasCheckedCertificate 17 8 ([[], [], [], [1], [2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p110, Certificates.k17t8p110_check⟩ + +private theorem k17t8_cover171 : ∀ P ∈ pathPatterns 0 0 [2, 6], HasCheckedCertificate 17 8 ([[], [], [], [1], [2, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p111, Certificates.k17t8p111_check⟩ + +private theorem k17t8_cover172 : ∀ P ∈ pathPatterns 1 5 [3], HasCheckedCertificate 17 8 ([[], [], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover173 : ∀ P ∈ pathPatterns 0 2 [3, 3], HasCheckedCertificate 17 8 ([[], [], [], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p112, Certificates.k17t8p112_check⟩ + +private theorem k17t8_cover174 : ∀ P ∈ pathPatterns 0 1 [3, 4], HasCheckedCertificate 17 8 ([[], [], [], [1], [3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p113, Certificates.k17t8p113_check⟩ + +private theorem k17t8_cover175 : ∀ P ∈ pathPatterns 0 0 [3, 5], HasCheckedCertificate 17 8 ([[], [], [], [1], [3, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p114, Certificates.k17t8p114_check⟩ + +private theorem k17t8_cover176 : ∀ P ∈ pathPatterns 1 4 [4], HasCheckedCertificate 17 8 ([[], [], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover177 : ∀ P ∈ pathPatterns 0 0 [4, 4], HasCheckedCertificate 17 8 ([[], [], [], [1], [4, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p115, Certificates.k17t8p115_check⟩ + +private theorem k17t8_cover178 : ∀ P ∈ pathPatterns 1 3 [5], HasCheckedCertificate 17 8 ([[], [], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover179 : ∀ P ∈ pathPatterns 1 2 [6], HasCheckedCertificate 17 8 ([[], [], [], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover180 : ∀ P ∈ pathPatterns 1 1 [7], HasCheckedCertificate 17 8 ([[], [], [], [1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover181 : ∀ P ∈ pathPatterns 1 0 [8], HasCheckedCertificate 17 8 ([[], [], [], [1], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + +private theorem k17t8_seq157 : amountSequenceForall 2 8 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (2 - ([] ++ tail).length) (8 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [], [], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover158 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover159 + · exact by + intro _ + exact k17t8_cover160 + · exact by + intro _ + exact k17t8_cover161 + · exact by + intro _ + exact k17t8_cover162 + · exact by + intro _ + exact k17t8_cover163 + · exact by + intro _ + exact k17t8_cover164 + · exact by + intro _ + exact k17t8_cover165 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover166 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover167 + · exact by + intro _ + exact k17t8_cover168 + · exact by + intro _ + exact k17t8_cover169 + · exact by + intro _ + exact k17t8_cover170 + · exact by + intro _ + exact k17t8_cover171 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover172 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k17t8_cover173 + · exact by + intro _ + exact k17t8_cover174 + · exact by + intro _ + exact k17t8_cover175 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover176 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · exact by + intro _ + exact k17t8_cover177 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover178 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover179 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover180 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover181 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover156 : ∀ P ∈ pathPatterns 3 8 [1], HasCheckedCertificate 17 8 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq157 + + +private theorem k17t8_cover184 : ∀ P ∈ pathPatterns 0 5 [2], HasCheckedCertificate 17 8 ([[], [], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p116, Certificates.k17t8p116_check⟩ + +private theorem k17t8_cover185 : ∀ P ∈ pathPatterns 0 4 [3], HasCheckedCertificate 17 8 ([[], [], [], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p117, Certificates.k17t8p117_check⟩ + +private theorem k17t8_cover186 : ∀ P ∈ pathPatterns 0 3 [4], HasCheckedCertificate 17 8 ([[], [], [], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p118, Certificates.k17t8p118_check⟩ + +private theorem k17t8_cover187 : ∀ P ∈ pathPatterns 0 2 [5], HasCheckedCertificate 17 8 ([[], [], [], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p119, Certificates.k17t8p119_check⟩ + +private theorem k17t8_cover188 : ∀ P ∈ pathPatterns 0 1 [6], HasCheckedCertificate 17 8 ([[], [], [], [1, 1], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p120, Certificates.k17t8p120_check⟩ + +private theorem k17t8_cover189 : ∀ P ∈ pathPatterns 0 0 [7], HasCheckedCertificate 17 8 ([[], [], [], [1, 1], [7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p121, Certificates.k17t8p121_check⟩ + +private theorem k17t8_cover183 : ∀ P ∈ pathPatterns 2 7 [1, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover184 + · exact by + intro _ + exact k17t8_cover185 + · exact by + intro _ + exact k17t8_cover186 + · exact by + intro _ + exact k17t8_cover187 + · exact by + intro _ + exact k17t8_cover188 + · exact by + intro _ + exact k17t8_cover189 + +private theorem k17t8_cover190 : ∀ P ∈ pathPatterns 1 6 [1, 1, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover191 : ∀ P ∈ pathPatterns 0 5 [1, 1, 1, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p122, Certificates.k17t8p122_check⟩ + +private theorem k17t8_cover192 : ∀ P ∈ pathPatterns 0 4 [1, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p123, Certificates.k17t8p123_check⟩ + +private theorem k17t8_cover193 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p124, Certificates.k17t8p124_check⟩ + +private theorem k17t8_cover194 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p125, Certificates.k17t8p125_check⟩ + +private theorem k17t8_cover195 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 5], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p126, Certificates.k17t8p126_check⟩ + +private theorem k17t8_cover196 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 6], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p127, Certificates.k17t8p127_check⟩ + +private theorem k17t8_cover197 : ∀ P ∈ pathPatterns 1 5 [1, 1, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover198 : ∀ P ∈ pathPatterns 0 4 [1, 1, 2, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p128, Certificates.k17t8p128_check⟩ + +private theorem k17t8_cover199 : ∀ P ∈ pathPatterns 0 3 [1, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p129, Certificates.k17t8p129_check⟩ + +private theorem k17t8_cover200 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p130, Certificates.k17t8p130_check⟩ + +private theorem k17t8_cover201 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 4], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p131, Certificates.k17t8p131_check⟩ + +private theorem k17t8_cover202 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 5], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p132, Certificates.k17t8p132_check⟩ + +private theorem k17t8_cover203 : ∀ P ∈ pathPatterns 1 4 [1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover204 : ∀ P ∈ pathPatterns 0 3 [1, 1, 3, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p133, Certificates.k17t8p133_check⟩ + +private theorem k17t8_cover205 : ∀ P ∈ pathPatterns 0 2 [1, 1, 3, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p134, Certificates.k17t8p134_check⟩ + +private theorem k17t8_cover206 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p135, Certificates.k17t8p135_check⟩ + +private theorem k17t8_cover207 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 4], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p136, Certificates.k17t8p136_check⟩ + +private theorem k17t8_cover208 : ∀ P ∈ pathPatterns 1 3 [1, 1, 4], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover209 : ∀ P ∈ pathPatterns 0 2 [1, 1, 4, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p137, Certificates.k17t8p137_check⟩ + +private theorem k17t8_cover210 : ∀ P ∈ pathPatterns 0 1 [1, 1, 4, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p138, Certificates.k17t8p138_check⟩ + +private theorem k17t8_cover211 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 4, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p139, Certificates.k17t8p139_check⟩ + +private theorem k17t8_cover212 : ∀ P ∈ pathPatterns 1 2 [1, 1, 5], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover213 : ∀ P ∈ pathPatterns 0 1 [1, 1, 5, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p140, Certificates.k17t8p140_check⟩ + +private theorem k17t8_cover214 : ∀ P ∈ pathPatterns 0 0 [1, 1, 5, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 5, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p141, Certificates.k17t8p141_check⟩ + +private theorem k17t8_cover215 : ∀ P ∈ pathPatterns 1 1 [1, 1, 6], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover216 : ∀ P ∈ pathPatterns 0 0 [1, 1, 6, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 6, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p142, Certificates.k17t8p142_check⟩ + +private theorem k17t8_cover217 : ∀ P ∈ pathPatterns 1 0 [1, 1, 7], HasCheckedCertificate 17 8 ([[], [], [], [1, 1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 7] [] ∧ LexLE [] [])) h) + +private theorem k17t8_seq182 : amountSequenceForall 2 7 (fun tail => + (LexLE [] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1, 1] ++ tail).length) (9 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 17 8 ([[], [], []] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover183 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover190 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover191 + · exact by + intro _ + exact k17t8_cover192 + · exact by + intro _ + exact k17t8_cover193 + · exact by + intro _ + exact k17t8_cover194 + · exact by + intro _ + exact k17t8_cover195 + · exact by + intro _ + exact k17t8_cover196 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover197 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover198 + · exact by + intro _ + exact k17t8_cover199 + · exact by + intro _ + exact k17t8_cover200 + · exact by + intro _ + exact k17t8_cover201 + · exact by + intro _ + exact k17t8_cover202 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover203 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover204 + · exact by + intro _ + exact k17t8_cover205 + · exact by + intro _ + exact k17t8_cover206 + · exact by + intro _ + exact k17t8_cover207 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover208 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover209 + · exact by + intro _ + exact k17t8_cover210 + · exact by + intro _ + exact k17t8_cover211 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover212 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover213 + · exact by + intro _ + exact k17t8_cover214 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover215 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover216 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover217 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover219 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 17 8 ([[], [], [], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p143, Certificates.k17t8p143_check⟩ + +private theorem k17t8_cover220 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 17 8 ([[], [], [], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p144, Certificates.k17t8p144_check⟩ + +private theorem k17t8_cover221 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 17 8 ([[], [], [], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p145, Certificates.k17t8p145_check⟩ + +private theorem k17t8_cover222 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 17 8 ([[], [], [], [1, 2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p146, Certificates.k17t8p146_check⟩ + +private theorem k17t8_cover223 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 17 8 ([[], [], [], [1, 2], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p147, Certificates.k17t8p147_check⟩ + +private theorem k17t8_cover218 : ∀ P ∈ pathPatterns 2 6 [1, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover219 + · exact by + intro _ + exact k17t8_cover220 + · exact by + intro _ + exact k17t8_cover221 + · exact by + intro _ + exact k17t8_cover222 + · exact by + intro _ + exact k17t8_cover223 + +private theorem k17t8_cover224 : ∀ P ∈ pathPatterns 1 5 [1, 2, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover225 : ∀ P ∈ pathPatterns 0 3 [1, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p148, Certificates.k17t8p148_check⟩ + +private theorem k17t8_cover226 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p149, Certificates.k17t8p149_check⟩ + +private theorem k17t8_cover227 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 4], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p150, Certificates.k17t8p150_check⟩ + +private theorem k17t8_cover228 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 5], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p151, Certificates.k17t8p151_check⟩ + +private theorem k17t8_cover229 : ∀ P ∈ pathPatterns 1 4 [1, 2, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover230 : ∀ P ∈ pathPatterns 0 3 [1, 2, 2, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p152, Certificates.k17t8p152_check⟩ + +private theorem k17t8_cover231 : ∀ P ∈ pathPatterns 0 2 [1, 2, 2, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p153, Certificates.k17t8p153_check⟩ + +private theorem k17t8_cover232 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p154, Certificates.k17t8p154_check⟩ + +private theorem k17t8_cover233 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 4], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p155, Certificates.k17t8p155_check⟩ + +private theorem k17t8_cover234 : ∀ P ∈ pathPatterns 1 3 [1, 2, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover235 : ∀ P ∈ pathPatterns 0 2 [1, 2, 3, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p156, Certificates.k17t8p156_check⟩ + +private theorem k17t8_cover236 : ∀ P ∈ pathPatterns 0 1 [1, 2, 3, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p157, Certificates.k17t8p157_check⟩ + +private theorem k17t8_cover237 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p158, Certificates.k17t8p158_check⟩ + +private theorem k17t8_cover238 : ∀ P ∈ pathPatterns 1 2 [1, 2, 4], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover239 : ∀ P ∈ pathPatterns 0 1 [1, 2, 4, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p159, Certificates.k17t8p159_check⟩ + +private theorem k17t8_cover240 : ∀ P ∈ pathPatterns 0 0 [1, 2, 4, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p160, Certificates.k17t8p160_check⟩ + +private theorem k17t8_cover241 : ∀ P ∈ pathPatterns 1 1 [1, 2, 5], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover242 : ∀ P ∈ pathPatterns 0 0 [1, 2, 5, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p161, Certificates.k17t8p161_check⟩ + +private theorem k17t8_cover243 : ∀ P ∈ pathPatterns 1 0 [1, 2, 6], HasCheckedCertificate 17 8 ([[], [], [], [1, 2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover245 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 17 8 ([[], [], [], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p162, Certificates.k17t8p162_check⟩ + +private theorem k17t8_cover246 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 17 8 ([[], [], [], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p163, Certificates.k17t8p163_check⟩ + +private theorem k17t8_cover247 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 17 8 ([[], [], [], [1, 3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p164, Certificates.k17t8p164_check⟩ + +private theorem k17t8_cover248 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 17 8 ([[], [], [], [1, 3], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p165, Certificates.k17t8p165_check⟩ + +private theorem k17t8_cover244 : ∀ P ∈ pathPatterns 2 5 [1, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover245 + · exact by + intro _ + exact k17t8_cover246 + · exact by + intro _ + exact k17t8_cover247 + · exact by + intro _ + exact k17t8_cover248 + +private theorem k17t8_cover249 : ∀ P ∈ pathPatterns 1 4 [1, 3, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover250 : ∀ P ∈ pathPatterns 0 2 [1, 3, 1, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p166, Certificates.k17t8p166_check⟩ + +private theorem k17t8_cover251 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p167, Certificates.k17t8p167_check⟩ + +private theorem k17t8_cover252 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 4], HasCheckedCertificate 17 8 ([[], [], [], [1, 3, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p168, Certificates.k17t8p168_check⟩ + +private theorem k17t8_cover253 : ∀ P ∈ pathPatterns 1 3 [1, 3, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover254 : ∀ P ∈ pathPatterns 0 1 [1, 3, 2, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p169, Certificates.k17t8p169_check⟩ + +private theorem k17t8_cover255 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 3, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p170, Certificates.k17t8p170_check⟩ + +private theorem k17t8_cover256 : ∀ P ∈ pathPatterns 1 2 [1, 3, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover257 : ∀ P ∈ pathPatterns 0 1 [1, 3, 3, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p171, Certificates.k17t8p171_check⟩ + +private theorem k17t8_cover258 : ∀ P ∈ pathPatterns 0 0 [1, 3, 3, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 3, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p172, Certificates.k17t8p172_check⟩ + +private theorem k17t8_cover259 : ∀ P ∈ pathPatterns 1 1 [1, 3, 4], HasCheckedCertificate 17 8 ([[], [], [], [1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover260 : ∀ P ∈ pathPatterns 0 0 [1, 3, 4, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 3, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p173, Certificates.k17t8p173_check⟩ + +private theorem k17t8_cover261 : ∀ P ∈ pathPatterns 1 0 [1, 3, 5], HasCheckedCertificate 17 8 ([[], [], [], [1, 3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover263 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 17 8 ([[], [], [], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p174, Certificates.k17t8p174_check⟩ + +private theorem k17t8_cover264 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[], [], [], [1, 4], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p175, Certificates.k17t8p175_check⟩ + +private theorem k17t8_cover265 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[], [], [], [1, 4], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p176, Certificates.k17t8p176_check⟩ + +private theorem k17t8_cover262 : ∀ P ∈ pathPatterns 2 4 [1, 4], HasCheckedCertificate 17 8 ([[], [], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover263 + · exact by + intro _ + exact k17t8_cover264 + · exact by + intro _ + exact k17t8_cover265 + +private theorem k17t8_cover266 : ∀ P ∈ pathPatterns 1 3 [1, 4, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover267 : ∀ P ∈ pathPatterns 0 1 [1, 4, 1, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p177, Certificates.k17t8p177_check⟩ + +private theorem k17t8_cover268 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 4, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p178, Certificates.k17t8p178_check⟩ + +private theorem k17t8_cover269 : ∀ P ∈ pathPatterns 1 2 [1, 4, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover270 : ∀ P ∈ pathPatterns 0 0 [1, 4, 2, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 4, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p179, Certificates.k17t8p179_check⟩ + +private theorem k17t8_cover271 : ∀ P ∈ pathPatterns 1 1 [1, 4, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover272 : ∀ P ∈ pathPatterns 1 0 [1, 4, 4], HasCheckedCertificate 17 8 ([[], [], [], [1, 4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover274 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[], [], [], [1, 5], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p180, Certificates.k17t8p180_check⟩ + +private theorem k17t8_cover275 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [], [], [1, 5], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p181, Certificates.k17t8p181_check⟩ + +private theorem k17t8_cover273 : ∀ P ∈ pathPatterns 2 3 [1, 5], HasCheckedCertificate 17 8 ([[], [], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover274 + · exact by + intro _ + exact k17t8_cover275 + +private theorem k17t8_cover276 : ∀ P ∈ pathPatterns 1 2 [1, 5, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover277 : ∀ P ∈ pathPatterns 0 0 [1, 5, 1, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 5, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p182, Certificates.k17t8p182_check⟩ + +private theorem k17t8_cover278 : ∀ P ∈ pathPatterns 1 1 [1, 5, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover279 : ∀ P ∈ pathPatterns 1 0 [1, 5, 3], HasCheckedCertificate 17 8 ([[], [], [], [1, 5, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover281 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [], [], [1, 6], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p183, Certificates.k17t8p183_check⟩ + +private theorem k17t8_cover280 : ∀ P ∈ pathPatterns 2 2 [1, 6], HasCheckedCertificate 17 8 ([[], [], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover281 + +private theorem k17t8_cover282 : ∀ P ∈ pathPatterns 1 1 [1, 6, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover283 : ∀ P ∈ pathPatterns 1 0 [1, 6, 2], HasCheckedCertificate 17 8 ([[], [], [], [1, 6, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover284 : ∀ P ∈ pathPatterns 2 1 [1, 7], HasCheckedCertificate 17 8 ([[], [], [], [1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover285 : ∀ P ∈ pathPatterns 1 0 [1, 7, 1], HasCheckedCertificate 17 8 ([[], [], [], [1, 7, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover286 : ∀ P ∈ pathPatterns 2 0 [1, 8], HasCheckedCertificate 17 8 ([[], [], [], [1, 8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq155 : amountSequenceForall 3 8 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (9 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 17 8 ([[], [], []] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover156 + · intro q + fin_cases q + · exact k17t8_seq182 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover218 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover224 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k17t8_cover225 + · exact by + intro _ + exact k17t8_cover226 + · exact by + intro _ + exact k17t8_cover227 + · exact by + intro _ + exact k17t8_cover228 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover229 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover230 + · exact by + intro _ + exact k17t8_cover231 + · exact by + intro _ + exact k17t8_cover232 + · exact by + intro _ + exact k17t8_cover233 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover234 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover235 + · exact by + intro _ + exact k17t8_cover236 + · exact by + intro _ + exact k17t8_cover237 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover238 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover239 + · exact by + intro _ + exact k17t8_cover240 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover241 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover242 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover243 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover244 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover249 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + intro _ + exact k17t8_cover250 + · exact by + intro _ + exact k17t8_cover251 + · exact by + intro _ + exact k17t8_cover252 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover253 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · exact by + intro _ + exact k17t8_cover254 + · exact by + intro _ + exact k17t8_cover255 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover256 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover257 + · exact by + intro _ + exact k17t8_cover258 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover259 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover260 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover261 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover262 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover266 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · exact by + intro _ + exact k17t8_cover267 + · exact by + intro _ + exact k17t8_cover268 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover269 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 2, 1] ∧ LexLE [1, 4, 2, 1] [1, 2, 4, 1])) h) + · exact by + intro _ + exact k17t8_cover270 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover271 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 3, 1] ∧ LexLE [1, 4, 3, 1] [1, 3, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover272 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover273 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover276 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 1, 1] ∧ LexLE [1, 5, 1, 1] [1, 1, 5, 1])) h) + · exact by + intro _ + exact k17t8_cover277 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover278 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 2, 1] ∧ LexLE [1, 5, 2, 1] [1, 2, 5, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover279 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover280 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover282 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 6, 1, 1] ∧ LexLE [1, 6, 1, 1] [1, 1, 6, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover283 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover284 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover285 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover286 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover290 : ∀ P ∈ pathPatterns 1 5 [2], HasCheckedCertificate 17 8 ([[], [], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover291 : ∀ P ∈ pathPatterns 0 3 [2, 2], HasCheckedCertificate 17 8 ([[], [], [], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p184, Certificates.k17t8p184_check⟩ + +private theorem k17t8_cover292 : ∀ P ∈ pathPatterns 0 2 [2, 3], HasCheckedCertificate 17 8 ([[], [], [], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p185, Certificates.k17t8p185_check⟩ + +private theorem k17t8_cover293 : ∀ P ∈ pathPatterns 0 1 [2, 4], HasCheckedCertificate 17 8 ([[], [], [], [2], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p186, Certificates.k17t8p186_check⟩ + +private theorem k17t8_cover294 : ∀ P ∈ pathPatterns 0 0 [2, 5], HasCheckedCertificate 17 8 ([[], [], [], [2], [2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p187, Certificates.k17t8p187_check⟩ + +private theorem k17t8_cover295 : ∀ P ∈ pathPatterns 1 4 [3], HasCheckedCertificate 17 8 ([[], [], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover296 : ∀ P ∈ pathPatterns 0 1 [3, 3], HasCheckedCertificate 17 8 ([[], [], [], [2], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p188, Certificates.k17t8p188_check⟩ + +private theorem k17t8_cover297 : ∀ P ∈ pathPatterns 0 0 [3, 4], HasCheckedCertificate 17 8 ([[], [], [], [2], [3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p189, Certificates.k17t8p189_check⟩ + +private theorem k17t8_cover298 : ∀ P ∈ pathPatterns 1 3 [4], HasCheckedCertificate 17 8 ([[], [], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover299 : ∀ P ∈ pathPatterns 1 2 [5], HasCheckedCertificate 17 8 ([[], [], [], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover300 : ∀ P ∈ pathPatterns 1 1 [6], HasCheckedCertificate 17 8 ([[], [], [], [2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover301 : ∀ P ∈ pathPatterns 1 0 [7], HasCheckedCertificate 17 8 ([[], [], [], [2], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + +private theorem k17t8_seq289 : amountSequenceForall 2 7 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (2 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [], [], [2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 6] ∧ LexLE [1, 6] [6, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover290 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover291 + · exact by + intro _ + exact k17t8_cover292 + · exact by + intro _ + exact k17t8_cover293 + · exact by + intro _ + exact k17t8_cover294 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover295 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k17t8_cover296 + · exact by + intro _ + exact k17t8_cover297 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover298 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover299 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover300 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover301 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover288 : ∀ P ∈ pathPatterns 3 7 [2], HasCheckedCertificate 17 8 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq289 + + +private theorem k17t8_cover302 : ∀ P ∈ pathPatterns 0 3 [2, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [], [], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p190, Certificates.k17t8p190_check⟩ + +private theorem k17t8_cover303 : ∀ P ∈ pathPatterns 0 2 [2, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p191, Certificates.k17t8p191_check⟩ + +private theorem k17t8_cover304 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [], [], [2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p192, Certificates.k17t8p192_check⟩ + +private theorem k17t8_cover305 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 5], HasCheckedCertificate 17 8 ([[], [], [], [2, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p193, Certificates.k17t8p193_check⟩ + +private theorem k17t8_cover306 : ∀ P ∈ pathPatterns 1 4 [2, 1, 2], HasCheckedCertificate 17 8 ([[], [], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover307 : ∀ P ∈ pathPatterns 0 2 [2, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [], [], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p194, Certificates.k17t8p194_check⟩ + +private theorem k17t8_cover308 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [], [], [2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p195, Certificates.k17t8p195_check⟩ + +private theorem k17t8_cover309 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 4], HasCheckedCertificate 17 8 ([[], [], [], [2, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p196, Certificates.k17t8p196_check⟩ + +private theorem k17t8_cover310 : ∀ P ∈ pathPatterns 1 3 [2, 1, 3], HasCheckedCertificate 17 8 ([[], [], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover311 : ∀ P ∈ pathPatterns 0 1 [2, 1, 3, 2], HasCheckedCertificate 17 8 ([[], [], [], [2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p197, Certificates.k17t8p197_check⟩ + +private theorem k17t8_cover312 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3, 3], HasCheckedCertificate 17 8 ([[], [], [], [2, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p198, Certificates.k17t8p198_check⟩ + +private theorem k17t8_cover313 : ∀ P ∈ pathPatterns 1 2 [2, 1, 4], HasCheckedCertificate 17 8 ([[], [], [], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover314 : ∀ P ∈ pathPatterns 0 0 [2, 1, 4, 2], HasCheckedCertificate 17 8 ([[], [], [], [2, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p199, Certificates.k17t8p199_check⟩ + +private theorem k17t8_cover315 : ∀ P ∈ pathPatterns 1 1 [2, 1, 5], HasCheckedCertificate 17 8 ([[], [], [], [2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover316 : ∀ P ∈ pathPatterns 1 0 [2, 1, 6], HasCheckedCertificate 17 8 ([[], [], [], [2, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover318 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 17 8 ([[], [], [], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p200, Certificates.k17t8p200_check⟩ + +private theorem k17t8_cover319 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 17 8 ([[], [], [], [2, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p201, Certificates.k17t8p201_check⟩ + +private theorem k17t8_cover320 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 17 8 ([[], [], [], [2, 2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p202, Certificates.k17t8p202_check⟩ + +private theorem k17t8_cover317 : ∀ P ∈ pathPatterns 2 5 [2, 2], HasCheckedCertificate 17 8 ([[], [], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover318 + · exact by + intro _ + exact k17t8_cover319 + · exact by + intro _ + exact k17t8_cover320 + +private theorem k17t8_cover321 : ∀ P ∈ pathPatterns 0 1 [2, 2, 1, 3], HasCheckedCertificate 17 8 ([[], [], [], [2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p203, Certificates.k17t8p203_check⟩ + +private theorem k17t8_cover322 : ∀ P ∈ pathPatterns 0 0 [2, 2, 1, 4], HasCheckedCertificate 17 8 ([[], [], [], [2, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p204, Certificates.k17t8p204_check⟩ + +private theorem k17t8_cover323 : ∀ P ∈ pathPatterns 1 3 [2, 2, 2], HasCheckedCertificate 17 8 ([[], [], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover324 : ∀ P ∈ pathPatterns 0 1 [2, 2, 2, 2], HasCheckedCertificate 17 8 ([[], [], [], [2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p205, Certificates.k17t8p205_check⟩ + +private theorem k17t8_cover325 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2, 3], HasCheckedCertificate 17 8 ([[], [], [], [2, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p206, Certificates.k17t8p206_check⟩ + +private theorem k17t8_cover326 : ∀ P ∈ pathPatterns 1 2 [2, 2, 3], HasCheckedCertificate 17 8 ([[], [], [], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover327 : ∀ P ∈ pathPatterns 0 0 [2, 2, 3, 2], HasCheckedCertificate 17 8 ([[], [], [], [2, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p207, Certificates.k17t8p207_check⟩ + +private theorem k17t8_cover328 : ∀ P ∈ pathPatterns 1 1 [2, 2, 4], HasCheckedCertificate 17 8 ([[], [], [], [2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover329 : ∀ P ∈ pathPatterns 1 0 [2, 2, 5], HasCheckedCertificate 17 8 ([[], [], [], [2, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover331 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[], [], [], [2, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p208, Certificates.k17t8p208_check⟩ + +private theorem k17t8_cover332 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[], [], [], [2, 3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p209, Certificates.k17t8p209_check⟩ + +private theorem k17t8_cover330 : ∀ P ∈ pathPatterns 2 4 [2, 3], HasCheckedCertificate 17 8 ([[], [], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover331 + · exact by + intro _ + exact k17t8_cover332 + +private theorem k17t8_cover333 : ∀ P ∈ pathPatterns 0 0 [2, 3, 1, 3], HasCheckedCertificate 17 8 ([[], [], [], [2, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p210, Certificates.k17t8p210_check⟩ + +private theorem k17t8_cover334 : ∀ P ∈ pathPatterns 1 2 [2, 3, 2], HasCheckedCertificate 17 8 ([[], [], [], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover335 : ∀ P ∈ pathPatterns 1 1 [2, 3, 3], HasCheckedCertificate 17 8 ([[], [], [], [2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover336 : ∀ P ∈ pathPatterns 1 0 [2, 3, 4], HasCheckedCertificate 17 8 ([[], [], [], [2, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover338 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [], [], [2, 4], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p211, Certificates.k17t8p211_check⟩ + +private theorem k17t8_cover337 : ∀ P ∈ pathPatterns 2 3 [2, 4], HasCheckedCertificate 17 8 ([[], [], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover338 + +private theorem k17t8_cover339 : ∀ P ∈ pathPatterns 1 1 [2, 4, 2], HasCheckedCertificate 17 8 ([[], [], [], [2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover340 : ∀ P ∈ pathPatterns 1 0 [2, 4, 3], HasCheckedCertificate 17 8 ([[], [], [], [2, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover341 : ∀ P ∈ pathPatterns 2 2 [2, 5], HasCheckedCertificate 17 8 ([[], [], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover342 : ∀ P ∈ pathPatterns 1 0 [2, 5, 2], HasCheckedCertificate 17 8 ([[], [], [], [2, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover343 : ∀ P ∈ pathPatterns 2 1 [2, 6], HasCheckedCertificate 17 8 ([[], [], [], [2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover344 : ∀ P ∈ pathPatterns 2 0 [2, 7], HasCheckedCertificate 17 8 ([[], [], [], [2, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq287 : amountSequenceForall 3 7 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([2] ++ tail).length) (9 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 17 8 ([[], [], []] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover288 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover302 + · exact by + intro _ + exact k17t8_cover303 + · exact by + intro _ + exact k17t8_cover304 + · exact by + intro _ + exact k17t8_cover305 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover306 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover307 + · exact by + intro _ + exact k17t8_cover308 + · exact by + intro _ + exact k17t8_cover309 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover310 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover311 + · exact by + intro _ + exact k17t8_cover312 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover313 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 4, 1] ∧ LexLE [2, 1, 4, 1] [1, 4, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover314 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover315 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 5, 1] ∧ LexLE [2, 1, 5, 1] [1, 5, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover316 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover317 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · exact by + intro _ + exact k17t8_cover321 + · exact by + intro _ + exact k17t8_cover322 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover323 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · exact by + intro _ + exact k17t8_cover324 + · exact by + intro _ + exact k17t8_cover325 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover326 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 3, 1] ∧ LexLE [2, 2, 3, 1] [1, 3, 2, 2])) h) + · exact by + intro _ + exact k17t8_cover327 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover328 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 4, 1] ∧ LexLE [2, 2, 4, 1] [1, 4, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover329 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover330 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 2] ∧ LexLE [2, 3, 1, 2] [2, 1, 3, 2])) h) + · exact by + intro _ + exact k17t8_cover333 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover334 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 1] ∧ LexLE [2, 3, 2, 1] [1, 2, 3, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 2] ∧ LexLE [2, 3, 2, 2] [2, 2, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover335 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 3, 1] ∧ LexLE [2, 3, 3, 1] [1, 3, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover336 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover337 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 1] ∧ LexLE [2, 4, 1, 1] [1, 1, 4, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 2] ∧ LexLE [2, 4, 1, 2] [2, 1, 4, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover339 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 2, 1] ∧ LexLE [2, 4, 2, 1] [1, 2, 4, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover340 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover341 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1, 1] ∧ LexLE [2, 5, 1, 1] [1, 1, 5, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover342 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover343 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 6, 1] ∧ LexLE [2, 6, 1] [1, 6, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover344 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover347 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 17 8 ([[], [], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover348 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 17 8 ([[], [], [], [3], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p212, Certificates.k17t8p212_check⟩ + +private theorem k17t8_cover349 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 17 8 ([[], [], [], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover350 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 17 8 ([[], [], [], [3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover351 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 17 8 ([[], [], [], [3], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover346 : ∀ P ∈ pathPatterns 3 6 [3], HasCheckedCertificate 17 8 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 4] ∧ LexLE [2, 4] [4, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover347 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k17t8_cover348 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover349 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover350 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover351 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover352 : ∀ P ∈ pathPatterns 0 1 [3, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [], [3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p213, Certificates.k17t8p213_check⟩ + +private theorem k17t8_cover353 : ∀ P ∈ pathPatterns 0 0 [3, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [], [], [3, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p214, Certificates.k17t8p214_check⟩ + +private theorem k17t8_cover354 : ∀ P ∈ pathPatterns 0 0 [3, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [], [], [3, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p215, Certificates.k17t8p215_check⟩ + +private theorem k17t8_cover355 : ∀ P ∈ pathPatterns 1 2 [3, 1, 3], HasCheckedCertificate 17 8 ([[], [], [], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover356 : ∀ P ∈ pathPatterns 1 1 [3, 1, 4], HasCheckedCertificate 17 8 ([[], [], [], [3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover357 : ∀ P ∈ pathPatterns 1 0 [3, 1, 5], HasCheckedCertificate 17 8 ([[], [], [], [3, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover358 : ∀ P ∈ pathPatterns 1 1 [3, 2, 3], HasCheckedCertificate 17 8 ([[], [], [], [3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover359 : ∀ P ∈ pathPatterns 1 0 [3, 2, 4], HasCheckedCertificate 17 8 ([[], [], [], [3, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover360 : ∀ P ∈ pathPatterns 2 3 [3, 3], HasCheckedCertificate 17 8 ([[], [], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [3] ∧ LexLE [3] [3])) h) + +private theorem k17t8_cover361 : ∀ P ∈ pathPatterns 1 0 [3, 3, 3], HasCheckedCertificate 17 8 ([[], [], [], [3, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover362 : ∀ P ∈ pathPatterns 2 2 [3, 4], HasCheckedCertificate 17 8 ([[], [], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover363 : ∀ P ∈ pathPatterns 2 1 [3, 5], HasCheckedCertificate 17 8 ([[], [], [], [3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover364 : ∀ P ∈ pathPatterns 2 0 [3, 6], HasCheckedCertificate 17 8 ([[], [], [], [3, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq345 : amountSequenceForall 3 6 (fun tail => + (LexLE [] ([3] ++ tail) ∧ LexLE ([3] ++ tail) ([3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([3] ++ tail).length) (9 - ([3] ++ tail).sum) ([3] ++ tail), + HasCheckedCertificate 17 8 ([[], [], []] ++ (([3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover346 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · exact by + intro _ + exact k17t8_cover352 + · exact by + intro _ + exact k17t8_cover353 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 2] ∧ LexLE [3, 1, 2, 2] [2, 2, 1, 3])) h) + · exact by + intro _ + exact k17t8_cover354 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover355 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 1] ∧ LexLE [3, 1, 3, 1] [1, 3, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 2] ∧ LexLE [3, 1, 3, 2] [2, 3, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover356 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 4, 1] ∧ LexLE [3, 1, 4, 1] [1, 4, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover357 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 2] ∧ LexLE [3, 2, 1, 2] [2, 1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 3] ∧ LexLE [3, 2, 1, 3] [3, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 1] ∧ LexLE [3, 2, 2, 1] [1, 2, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 2] ∧ LexLE [3, 2, 2, 2] [2, 2, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover358 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 3, 1] ∧ LexLE [3, 2, 3, 1] [1, 3, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover359 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover360 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 1] ∧ LexLE [3, 3, 1, 1] [1, 1, 3, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 2] ∧ LexLE [3, 3, 1, 2] [2, 1, 3, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2, 1] ∧ LexLE [3, 3, 2, 1] [1, 2, 3, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover361 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover362 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1, 1] ∧ LexLE [3, 4, 1, 1] [1, 1, 4, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 2] ∧ LexLE [3, 4, 2] [2, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover363 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 5, 1] ∧ LexLE [3, 5, 1] [1, 5, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover364 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover367 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 17 8 ([[], [], [], [4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover368 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 17 8 ([[], [], [], [4], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover366 : ∀ P ∈ pathPatterns 3 5 [4], HasCheckedCertificate 17 8 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover367 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover368 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover369 : ∀ P ∈ pathPatterns 1 0 [4, 1, 4], HasCheckedCertificate 17 8 ([[], [], [], [4, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover370 : ∀ P ∈ pathPatterns 2 1 [4, 4], HasCheckedCertificate 17 8 ([[], [], [], [4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover371 : ∀ P ∈ pathPatterns 2 0 [4, 5], HasCheckedCertificate 17 8 ([[], [], [], [4, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq365 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([4] ++ tail) ∧ LexLE ([4] ++ tail) ([4] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([4] ++ tail).length) (9 - ([4] ++ tail).sum) ([4] ++ tail), + HasCheckedCertificate 17 8 ([[], [], []] ++ (([4] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover366 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 2] ∧ LexLE [4, 1, 1, 2] [2, 1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 3] ∧ LexLE [4, 1, 1, 3] [3, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 1] ∧ LexLE [4, 1, 2, 1] [1, 2, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 2] ∧ LexLE [4, 1, 2, 2] [2, 2, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3, 1] ∧ LexLE [4, 1, 3, 1] [1, 3, 1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover369 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 1] ∧ LexLE [4, 2, 1, 1] [1, 1, 2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 2] ∧ LexLE [4, 2, 1, 2] [2, 1, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2, 1] ∧ LexLE [4, 2, 2, 1] [1, 2, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 3] ∧ LexLE [4, 2, 3] [3, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1, 1] ∧ LexLE [4, 3, 1, 1] [1, 1, 3, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 2] ∧ LexLE [4, 3, 2] [2, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover370 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 4, 1] ∧ LexLE [4, 4, 1] [1, 4, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover371 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover372 : ∀ P ∈ pathPatterns 3 4 [5], HasCheckedCertificate 17 8 ([[], [], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [4] ∧ LexLE [4] [4])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover373 : ∀ P ∈ pathPatterns 3 3 [6], HasCheckedCertificate 17 8 ([[], [], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover374 : ∀ P ∈ pathPatterns 3 2 [7], HasCheckedCertificate 17 8 ([[], [], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover375 : ∀ P ∈ pathPatterns 3 1 [8], HasCheckedCertificate 17 8 ([[], [], [], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover376 : ∀ P ∈ pathPatterns 3 0 [9], HasCheckedCertificate 17 8 ([[], [], [], [9]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [9] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq8 : amountSequenceForall 4 9 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (9 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover9 + · intro q + fin_cases q + · exact k17t8_seq155 + + · exact k17t8_seq287 + + · exact k17t8_seq345 + + · exact k17t8_seq365 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover372 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 1] ∧ LexLE [5, 1, 1, 1] [1, 1, 1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 2] ∧ LexLE [5, 1, 1, 2] [2, 1, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2, 1] ∧ LexLE [5, 1, 2, 1] [1, 2, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 3] ∧ LexLE [5, 1, 3] [3, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1, 1] ∧ LexLE [5, 2, 1, 1] [1, 1, 2, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 2] ∧ LexLE [5, 2, 2] [2, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3, 1] ∧ LexLE [5, 3, 1] [1, 3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 4] ∧ LexLE [5, 4] [4, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover373 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1, 1] ∧ LexLE [6, 1, 1, 1] [1, 1, 1, 6])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 2] ∧ LexLE [6, 1, 2] [2, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2, 1] ∧ LexLE [6, 2, 1] [1, 2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 3] ∧ LexLE [6, 3] [3, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover374 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1, 1] ∧ LexLE [7, 1, 1] [1, 1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 2] ∧ LexLE [7, 2] [2, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover375 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [8, 1] ∧ LexLE [8, 1] [1, 8])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover376 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover7 : ∀ P ∈ pathPatterns 5 9 [], HasCheckedCertificate 17 8 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq8 + + +private theorem k17t8_cover382 : ∀ P ∈ pathPatterns 0 6 [1], HasCheckedCertificate 17 8 ([[], [], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p216, Certificates.k17t8p216_check⟩ + +private theorem k17t8_cover383 : ∀ P ∈ pathPatterns 0 5 [2], HasCheckedCertificate 17 8 ([[], [], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p217, Certificates.k17t8p217_check⟩ + +private theorem k17t8_cover384 : ∀ P ∈ pathPatterns 0 4 [3], HasCheckedCertificate 17 8 ([[], [], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p218, Certificates.k17t8p218_check⟩ + +private theorem k17t8_cover385 : ∀ P ∈ pathPatterns 0 3 [4], HasCheckedCertificate 17 8 ([[], [], [1], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p219, Certificates.k17t8p219_check⟩ + +private theorem k17t8_cover386 : ∀ P ∈ pathPatterns 0 2 [5], HasCheckedCertificate 17 8 ([[], [], [1], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p220, Certificates.k17t8p220_check⟩ + +private theorem k17t8_cover387 : ∀ P ∈ pathPatterns 0 1 [6], HasCheckedCertificate 17 8 ([[], [], [1], [1], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p221, Certificates.k17t8p221_check⟩ + +private theorem k17t8_cover388 : ∀ P ∈ pathPatterns 0 0 [7], HasCheckedCertificate 17 8 ([[], [], [1], [1], [7]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p222, Certificates.k17t8p222_check⟩ + +private theorem k17t8_cover381 : ∀ P ∈ pathPatterns 2 7 [1], HasCheckedCertificate 17 8 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover382 + · exact by + intro _ + exact k17t8_cover383 + · exact by + intro _ + exact k17t8_cover384 + · exact by + intro _ + exact k17t8_cover385 + · exact by + intro _ + exact k17t8_cover386 + · exact by + intro _ + exact k17t8_cover387 + · exact by + intro _ + exact k17t8_cover388 + +private theorem k17t8_cover389 : ∀ P ∈ pathPatterns 1 6 [1, 1], HasCheckedCertificate 17 8 ([[], [], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover390 : ∀ P ∈ pathPatterns 0 5 [1, 1, 1], HasCheckedCertificate 17 8 ([[], [], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p223, Certificates.k17t8p223_check⟩ + +private theorem k17t8_cover391 : ∀ P ∈ pathPatterns 0 4 [1, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p224, Certificates.k17t8p224_check⟩ + +private theorem k17t8_cover392 : ∀ P ∈ pathPatterns 0 3 [1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p225, Certificates.k17t8p225_check⟩ + +private theorem k17t8_cover393 : ∀ P ∈ pathPatterns 0 2 [1, 1, 4], HasCheckedCertificate 17 8 ([[], [], [1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p226, Certificates.k17t8p226_check⟩ + +private theorem k17t8_cover394 : ∀ P ∈ pathPatterns 0 1 [1, 1, 5], HasCheckedCertificate 17 8 ([[], [], [1], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p227, Certificates.k17t8p227_check⟩ + +private theorem k17t8_cover395 : ∀ P ∈ pathPatterns 0 0 [1, 1, 6], HasCheckedCertificate 17 8 ([[], [], [1], [1, 1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p228, Certificates.k17t8p228_check⟩ + +private theorem k17t8_cover396 : ∀ P ∈ pathPatterns 1 5 [1, 2], HasCheckedCertificate 17 8 ([[], [], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover397 : ∀ P ∈ pathPatterns 0 4 [1, 2, 1], HasCheckedCertificate 17 8 ([[], [], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p229, Certificates.k17t8p229_check⟩ + +private theorem k17t8_cover398 : ∀ P ∈ pathPatterns 0 3 [1, 2, 2], HasCheckedCertificate 17 8 ([[], [], [1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p230, Certificates.k17t8p230_check⟩ + +private theorem k17t8_cover399 : ∀ P ∈ pathPatterns 0 2 [1, 2, 3], HasCheckedCertificate 17 8 ([[], [], [1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p231, Certificates.k17t8p231_check⟩ + +private theorem k17t8_cover400 : ∀ P ∈ pathPatterns 0 1 [1, 2, 4], HasCheckedCertificate 17 8 ([[], [], [1], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p232, Certificates.k17t8p232_check⟩ + +private theorem k17t8_cover401 : ∀ P ∈ pathPatterns 0 0 [1, 2, 5], HasCheckedCertificate 17 8 ([[], [], [1], [1, 2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p233, Certificates.k17t8p233_check⟩ + +private theorem k17t8_cover402 : ∀ P ∈ pathPatterns 1 4 [1, 3], HasCheckedCertificate 17 8 ([[], [], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover403 : ∀ P ∈ pathPatterns 0 3 [1, 3, 1], HasCheckedCertificate 17 8 ([[], [], [1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p234, Certificates.k17t8p234_check⟩ + +private theorem k17t8_cover404 : ∀ P ∈ pathPatterns 0 2 [1, 3, 2], HasCheckedCertificate 17 8 ([[], [], [1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p235, Certificates.k17t8p235_check⟩ + +private theorem k17t8_cover405 : ∀ P ∈ pathPatterns 0 1 [1, 3, 3], HasCheckedCertificate 17 8 ([[], [], [1], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p236, Certificates.k17t8p236_check⟩ + +private theorem k17t8_cover406 : ∀ P ∈ pathPatterns 0 0 [1, 3, 4], HasCheckedCertificate 17 8 ([[], [], [1], [1, 3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p237, Certificates.k17t8p237_check⟩ + +private theorem k17t8_cover407 : ∀ P ∈ pathPatterns 1 3 [1, 4], HasCheckedCertificate 17 8 ([[], [], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover408 : ∀ P ∈ pathPatterns 0 2 [1, 4, 1], HasCheckedCertificate 17 8 ([[], [], [1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p238, Certificates.k17t8p238_check⟩ + +private theorem k17t8_cover409 : ∀ P ∈ pathPatterns 0 1 [1, 4, 2], HasCheckedCertificate 17 8 ([[], [], [1], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p239, Certificates.k17t8p239_check⟩ + +private theorem k17t8_cover410 : ∀ P ∈ pathPatterns 0 0 [1, 4, 3], HasCheckedCertificate 17 8 ([[], [], [1], [1, 4, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p240, Certificates.k17t8p240_check⟩ + +private theorem k17t8_cover411 : ∀ P ∈ pathPatterns 1 2 [1, 5], HasCheckedCertificate 17 8 ([[], [], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover412 : ∀ P ∈ pathPatterns 0 1 [1, 5, 1], HasCheckedCertificate 17 8 ([[], [], [1], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p241, Certificates.k17t8p241_check⟩ + +private theorem k17t8_cover413 : ∀ P ∈ pathPatterns 0 0 [1, 5, 2], HasCheckedCertificate 17 8 ([[], [], [1], [1, 5, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p242, Certificates.k17t8p242_check⟩ + +private theorem k17t8_cover414 : ∀ P ∈ pathPatterns 1 1 [1, 6], HasCheckedCertificate 17 8 ([[], [], [1], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover415 : ∀ P ∈ pathPatterns 0 0 [1, 6, 1], HasCheckedCertificate 17 8 ([[], [], [1], [1, 6, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p243, Certificates.k17t8p243_check⟩ + +private theorem k17t8_cover416 : ∀ P ∈ pathPatterns 1 0 [1, 7], HasCheckedCertificate 17 8 ([[], [], [1], [1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + +private theorem k17t8_seq380 : amountSequenceForall 2 7 (fun tail => + (LexLE [1] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([1] ++ tail).length) (8 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 17 8 ([[], [], [1]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover381 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover389 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover390 + · exact by + intro _ + exact k17t8_cover391 + · exact by + intro _ + exact k17t8_cover392 + · exact by + intro _ + exact k17t8_cover393 + · exact by + intro _ + exact k17t8_cover394 + · exact by + intro _ + exact k17t8_cover395 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover396 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover397 + · exact by + intro _ + exact k17t8_cover398 + · exact by + intro _ + exact k17t8_cover399 + · exact by + intro _ + exact k17t8_cover400 + · exact by + intro _ + exact k17t8_cover401 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover402 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover403 + · exact by + intro _ + exact k17t8_cover404 + · exact by + intro _ + exact k17t8_cover405 + · exact by + intro _ + exact k17t8_cover406 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover407 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover408 + · exact by + intro _ + exact k17t8_cover409 + · exact by + intro _ + exact k17t8_cover410 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover411 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover412 + · exact by + intro _ + exact k17t8_cover413 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover414 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover415 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover416 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover418 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 17 8 ([[], [], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p244, Certificates.k17t8p244_check⟩ + +private theorem k17t8_cover419 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 17 8 ([[], [], [1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p245, Certificates.k17t8p245_check⟩ + +private theorem k17t8_cover420 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 17 8 ([[], [], [1], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p246, Certificates.k17t8p246_check⟩ + +private theorem k17t8_cover421 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 17 8 ([[], [], [1], [2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p247, Certificates.k17t8p247_check⟩ + +private theorem k17t8_cover422 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 17 8 ([[], [], [1], [2], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p248, Certificates.k17t8p248_check⟩ + +private theorem k17t8_cover417 : ∀ P ∈ pathPatterns 2 6 [2], HasCheckedCertificate 17 8 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover418 + · exact by + intro _ + exact k17t8_cover419 + · exact by + intro _ + exact k17t8_cover420 + · exact by + intro _ + exact k17t8_cover421 + · exact by + intro _ + exact k17t8_cover422 + +private theorem k17t8_cover423 : ∀ P ∈ pathPatterns 0 3 [2, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p249, Certificates.k17t8p249_check⟩ + +private theorem k17t8_cover424 : ∀ P ∈ pathPatterns 0 2 [2, 1, 3], HasCheckedCertificate 17 8 ([[], [], [1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p250, Certificates.k17t8p250_check⟩ + +private theorem k17t8_cover425 : ∀ P ∈ pathPatterns 0 1 [2, 1, 4], HasCheckedCertificate 17 8 ([[], [], [1], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p251, Certificates.k17t8p251_check⟩ + +private theorem k17t8_cover426 : ∀ P ∈ pathPatterns 0 0 [2, 1, 5], HasCheckedCertificate 17 8 ([[], [], [1], [2, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p252, Certificates.k17t8p252_check⟩ + +private theorem k17t8_cover427 : ∀ P ∈ pathPatterns 1 4 [2, 2], HasCheckedCertificate 17 8 ([[], [], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover428 : ∀ P ∈ pathPatterns 0 2 [2, 2, 2], HasCheckedCertificate 17 8 ([[], [], [1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p253, Certificates.k17t8p253_check⟩ + +private theorem k17t8_cover429 : ∀ P ∈ pathPatterns 0 1 [2, 2, 3], HasCheckedCertificate 17 8 ([[], [], [1], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p254, Certificates.k17t8p254_check⟩ + +private theorem k17t8_cover430 : ∀ P ∈ pathPatterns 0 0 [2, 2, 4], HasCheckedCertificate 17 8 ([[], [], [1], [2, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p255, Certificates.k17t8p255_check⟩ + +private theorem k17t8_cover431 : ∀ P ∈ pathPatterns 1 3 [2, 3], HasCheckedCertificate 17 8 ([[], [], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover432 : ∀ P ∈ pathPatterns 0 1 [2, 3, 2], HasCheckedCertificate 17 8 ([[], [], [1], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p256, Certificates.k17t8p256_check⟩ + +private theorem k17t8_cover433 : ∀ P ∈ pathPatterns 0 0 [2, 3, 3], HasCheckedCertificate 17 8 ([[], [], [1], [2, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p257, Certificates.k17t8p257_check⟩ + +private theorem k17t8_cover434 : ∀ P ∈ pathPatterns 1 2 [2, 4], HasCheckedCertificate 17 8 ([[], [], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover435 : ∀ P ∈ pathPatterns 0 0 [2, 4, 2], HasCheckedCertificate 17 8 ([[], [], [1], [2, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p258, Certificates.k17t8p258_check⟩ + +private theorem k17t8_cover436 : ∀ P ∈ pathPatterns 1 1 [2, 5], HasCheckedCertificate 17 8 ([[], [], [1], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover437 : ∀ P ∈ pathPatterns 1 0 [2, 6], HasCheckedCertificate 17 8 ([[], [], [1], [2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover439 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 17 8 ([[], [], [1], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p259, Certificates.k17t8p259_check⟩ + +private theorem k17t8_cover440 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 17 8 ([[], [], [1], [3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p260, Certificates.k17t8p260_check⟩ + +private theorem k17t8_cover441 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 17 8 ([[], [], [1], [3], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p261, Certificates.k17t8p261_check⟩ + +private theorem k17t8_cover438 : ∀ P ∈ pathPatterns 2 5 [3], HasCheckedCertificate 17 8 ([[], [], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover439 + · exact by + intro _ + exact k17t8_cover440 + · exact by + intro _ + exact k17t8_cover441 + +private theorem k17t8_cover442 : ∀ P ∈ pathPatterns 0 1 [3, 1, 3], HasCheckedCertificate 17 8 ([[], [], [1], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p262, Certificates.k17t8p262_check⟩ + +private theorem k17t8_cover443 : ∀ P ∈ pathPatterns 0 0 [3, 1, 4], HasCheckedCertificate 17 8 ([[], [], [1], [3, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p263, Certificates.k17t8p263_check⟩ + +private theorem k17t8_cover444 : ∀ P ∈ pathPatterns 0 0 [3, 2, 3], HasCheckedCertificate 17 8 ([[], [], [1], [3, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p264, Certificates.k17t8p264_check⟩ + +private theorem k17t8_cover445 : ∀ P ∈ pathPatterns 1 2 [3, 3], HasCheckedCertificate 17 8 ([[], [], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover446 : ∀ P ∈ pathPatterns 1 1 [3, 4], HasCheckedCertificate 17 8 ([[], [], [1], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover447 : ∀ P ∈ pathPatterns 1 0 [3, 5], HasCheckedCertificate 17 8 ([[], [], [1], [3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover449 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[], [], [1], [4], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p265, Certificates.k17t8p265_check⟩ + +private theorem k17t8_cover448 : ∀ P ∈ pathPatterns 2 4 [4], HasCheckedCertificate 17 8 ([[], [], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · exact by + intro _ + exact k17t8_cover449 + +private theorem k17t8_cover450 : ∀ P ∈ pathPatterns 1 0 [4, 4], HasCheckedCertificate 17 8 ([[], [], [1], [4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover451 : ∀ P ∈ pathPatterns 2 3 [5], HasCheckedCertificate 17 8 ([[], [], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + +private theorem k17t8_cover452 : ∀ P ∈ pathPatterns 2 2 [6], HasCheckedCertificate 17 8 ([[], [], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover453 : ∀ P ∈ pathPatterns 2 1 [7], HasCheckedCertificate 17 8 ([[], [], [1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover454 : ∀ P ∈ pathPatterns 2 0 [8], HasCheckedCertificate 17 8 ([[], [], [1], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq379 : amountSequenceForall 3 8 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (8 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k17t8_seq380 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover417 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover423 + · exact by + intro _ + exact k17t8_cover424 + · exact by + intro _ + exact k17t8_cover425 + · exact by + intro _ + exact k17t8_cover426 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover427 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k17t8_cover428 + · exact by + intro _ + exact k17t8_cover429 + · exact by + intro _ + exact k17t8_cover430 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover431 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + intro _ + exact k17t8_cover432 + · exact by + intro _ + exact k17t8_cover433 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover434 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · exact by + intro _ + exact k17t8_cover435 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover436 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover437 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover438 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + intro _ + exact k17t8_cover442 + · exact by + intro _ + exact k17t8_cover443 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · exact by + intro _ + exact k17t8_cover444 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover445 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover446 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover447 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover448 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover450 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover451 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover452 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover453 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover454 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover378 : ∀ P ∈ pathPatterns 4 8 [1], HasCheckedCertificate 17 8 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq379 + + +private theorem k17t8_cover458 : ∀ P ∈ pathPatterns 0 5 [1, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p266, Certificates.k17t8p266_check⟩ + +private theorem k17t8_cover459 : ∀ P ∈ pathPatterns 0 4 [1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p267, Certificates.k17t8p267_check⟩ + +private theorem k17t8_cover460 : ∀ P ∈ pathPatterns 0 3 [1, 3], HasCheckedCertificate 17 8 ([[], [], [1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p268, Certificates.k17t8p268_check⟩ + +private theorem k17t8_cover461 : ∀ P ∈ pathPatterns 0 2 [1, 4], HasCheckedCertificate 17 8 ([[], [], [1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p269, Certificates.k17t8p269_check⟩ + +private theorem k17t8_cover462 : ∀ P ∈ pathPatterns 0 1 [1, 5], HasCheckedCertificate 17 8 ([[], [], [1, 1], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p270, Certificates.k17t8p270_check⟩ + +private theorem k17t8_cover463 : ∀ P ∈ pathPatterns 0 0 [1, 6], HasCheckedCertificate 17 8 ([[], [], [1, 1], [1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p271, Certificates.k17t8p271_check⟩ + +private theorem k17t8_cover464 : ∀ P ∈ pathPatterns 1 5 [2], HasCheckedCertificate 17 8 ([[], [], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover465 : ∀ P ∈ pathPatterns 0 3 [2, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p272, Certificates.k17t8p272_check⟩ + +private theorem k17t8_cover466 : ∀ P ∈ pathPatterns 0 2 [2, 3], HasCheckedCertificate 17 8 ([[], [], [1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p273, Certificates.k17t8p273_check⟩ + +private theorem k17t8_cover467 : ∀ P ∈ pathPatterns 0 1 [2, 4], HasCheckedCertificate 17 8 ([[], [], [1, 1], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p274, Certificates.k17t8p274_check⟩ + +private theorem k17t8_cover468 : ∀ P ∈ pathPatterns 0 0 [2, 5], HasCheckedCertificate 17 8 ([[], [], [1, 1], [2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p275, Certificates.k17t8p275_check⟩ + +private theorem k17t8_cover469 : ∀ P ∈ pathPatterns 1 4 [3], HasCheckedCertificate 17 8 ([[], [], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover470 : ∀ P ∈ pathPatterns 0 1 [3, 3], HasCheckedCertificate 17 8 ([[], [], [1, 1], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p276, Certificates.k17t8p276_check⟩ + +private theorem k17t8_cover471 : ∀ P ∈ pathPatterns 0 0 [3, 4], HasCheckedCertificate 17 8 ([[], [], [1, 1], [3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p277, Certificates.k17t8p277_check⟩ + +private theorem k17t8_cover472 : ∀ P ∈ pathPatterns 1 3 [4], HasCheckedCertificate 17 8 ([[], [], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover473 : ∀ P ∈ pathPatterns 1 2 [5], HasCheckedCertificate 17 8 ([[], [], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover474 : ∀ P ∈ pathPatterns 1 1 [6], HasCheckedCertificate 17 8 ([[], [], [1, 1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover475 : ∀ P ∈ pathPatterns 1 0 [7], HasCheckedCertificate 17 8 ([[], [], [1, 1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + +private theorem k17t8_seq457 : amountSequenceForall 2 7 (fun tail => + (LexLE [1, 1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (2 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [], [1, 1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover458 + · exact by + intro _ + exact k17t8_cover459 + · exact by + intro _ + exact k17t8_cover460 + · exact by + intro _ + exact k17t8_cover461 + · exact by + intro _ + exact k17t8_cover462 + · exact by + intro _ + exact k17t8_cover463 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover464 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover465 + · exact by + intro _ + exact k17t8_cover466 + · exact by + intro _ + exact k17t8_cover467 + · exact by + intro _ + exact k17t8_cover468 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover469 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k17t8_cover470 + · exact by + intro _ + exact k17t8_cover471 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover472 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover473 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover474 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover475 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover456 : ∀ P ∈ pathPatterns 3 7 [1, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq457 + + +private theorem k17t8_cover477 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p278, Certificates.k17t8p278_check⟩ + +private theorem k17t8_cover478 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p279, Certificates.k17t8p279_check⟩ + +private theorem k17t8_cover479 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p280, Certificates.k17t8p280_check⟩ + +private theorem k17t8_cover480 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p281, Certificates.k17t8p281_check⟩ + +private theorem k17t8_cover481 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p282, Certificates.k17t8p282_check⟩ + +private theorem k17t8_cover476 : ∀ P ∈ pathPatterns 2 6 [1, 1, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover477 + · exact by + intro _ + exact k17t8_cover478 + · exact by + intro _ + exact k17t8_cover479 + · exact by + intro _ + exact k17t8_cover480 + · exact by + intro _ + exact k17t8_cover481 + +private theorem k17t8_cover482 : ∀ P ∈ pathPatterns 1 5 [1, 1, 1, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover483 : ∀ P ∈ pathPatterns 0 4 [1, 1, 1, 1, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p283, Certificates.k17t8p283_check⟩ + +private theorem k17t8_cover484 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p284, Certificates.k17t8p284_check⟩ + +private theorem k17t8_cover485 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p285, Certificates.k17t8p285_check⟩ + +private theorem k17t8_cover486 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p286, Certificates.k17t8p286_check⟩ + +private theorem k17t8_cover487 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 5], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p287, Certificates.k17t8p287_check⟩ + +private theorem k17t8_cover488 : ∀ P ∈ pathPatterns 1 4 [1, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover489 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 2, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p288, Certificates.k17t8p288_check⟩ + +private theorem k17t8_cover490 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p289, Certificates.k17t8p289_check⟩ + +private theorem k17t8_cover491 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p290, Certificates.k17t8p290_check⟩ + +private theorem k17t8_cover492 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 4], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p291, Certificates.k17t8p291_check⟩ + +private theorem k17t8_cover493 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover494 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 3, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p292, Certificates.k17t8p292_check⟩ + +private theorem k17t8_cover495 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 3, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p293, Certificates.k17t8p293_check⟩ + +private theorem k17t8_cover496 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3, 3], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p294, Certificates.k17t8p294_check⟩ + +private theorem k17t8_cover497 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover498 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 4, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p295, Certificates.k17t8p295_check⟩ + +private theorem k17t8_cover499 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 4, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p296, Certificates.k17t8p296_check⟩ + +private theorem k17t8_cover500 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 5], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover501 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 5, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p297, Certificates.k17t8p297_check⟩ + +private theorem k17t8_cover502 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 6], HasCheckedCertificate 17 8 ([[], [], [1, 1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover504 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p298, Certificates.k17t8p298_check⟩ + +private theorem k17t8_cover505 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p299, Certificates.k17t8p299_check⟩ + +private theorem k17t8_cover506 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p300, Certificates.k17t8p300_check⟩ + +private theorem k17t8_cover507 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p301, Certificates.k17t8p301_check⟩ + +private theorem k17t8_cover503 : ∀ P ∈ pathPatterns 2 5 [1, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover504 + · exact by + intro _ + exact k17t8_cover505 + · exact by + intro _ + exact k17t8_cover506 + · exact by + intro _ + exact k17t8_cover507 + +private theorem k17t8_cover508 : ∀ P ∈ pathPatterns 1 4 [1, 1, 2, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover509 : ∀ P ∈ pathPatterns 0 3 [1, 1, 2, 1, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p302, Certificates.k17t8p302_check⟩ + +private theorem k17t8_cover510 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p303, Certificates.k17t8p303_check⟩ + +private theorem k17t8_cover511 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1, 3], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p304, Certificates.k17t8p304_check⟩ + +private theorem k17t8_cover512 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 4], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p305, Certificates.k17t8p305_check⟩ + +private theorem k17t8_cover513 : ∀ P ∈ pathPatterns 1 3 [1, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover514 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2, 2, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p306, Certificates.k17t8p306_check⟩ + +private theorem k17t8_cover515 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 2, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p307, Certificates.k17t8p307_check⟩ + +private theorem k17t8_cover516 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2, 3], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p308, Certificates.k17t8p308_check⟩ + +private theorem k17t8_cover517 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover518 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 3, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p309, Certificates.k17t8p309_check⟩ + +private theorem k17t8_cover519 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 3, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p310, Certificates.k17t8p310_check⟩ + +private theorem k17t8_cover520 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 4], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover521 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 4, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p311, Certificates.k17t8p311_check⟩ + +private theorem k17t8_cover522 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 5], HasCheckedCertificate 17 8 ([[], [], [1, 1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover524 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p312, Certificates.k17t8p312_check⟩ + +private theorem k17t8_cover525 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[], [], [1, 1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p313, Certificates.k17t8p313_check⟩ + +private theorem k17t8_cover526 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[], [], [1, 1, 3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p314, Certificates.k17t8p314_check⟩ + +private theorem k17t8_cover523 : ∀ P ∈ pathPatterns 2 4 [1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover524 + · exact by + intro _ + exact k17t8_cover525 + · exact by + intro _ + exact k17t8_cover526 + +private theorem k17t8_cover527 : ∀ P ∈ pathPatterns 1 3 [1, 1, 3, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover528 : ∀ P ∈ pathPatterns 0 2 [1, 1, 3, 1, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p315, Certificates.k17t8p315_check⟩ + +private theorem k17t8_cover529 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p316, Certificates.k17t8p316_check⟩ + +private theorem k17t8_cover530 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1, 3], HasCheckedCertificate 17 8 ([[], [], [1, 1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p317, Certificates.k17t8p317_check⟩ + +private theorem k17t8_cover531 : ∀ P ∈ pathPatterns 1 2 [1, 1, 3, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover532 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3, 2, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 3, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p318, Certificates.k17t8p318_check⟩ + +private theorem k17t8_cover533 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 2, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p319, Certificates.k17t8p319_check⟩ + +private theorem k17t8_cover534 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3, 3], HasCheckedCertificate 17 8 ([[], [], [1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover535 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 3, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p320, Certificates.k17t8p320_check⟩ + +private theorem k17t8_cover536 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 4], HasCheckedCertificate 17 8 ([[], [], [1, 1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover538 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p321, Certificates.k17t8p321_check⟩ + +private theorem k17t8_cover539 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [], [1, 1, 4], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p322, Certificates.k17t8p322_check⟩ + +private theorem k17t8_cover537 : ∀ P ∈ pathPatterns 2 3 [1, 1, 4], HasCheckedCertificate 17 8 ([[], [], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover538 + · exact by + intro _ + exact k17t8_cover539 + +private theorem k17t8_cover540 : ∀ P ∈ pathPatterns 1 2 [1, 1, 4, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover541 : ∀ P ∈ pathPatterns 0 1 [1, 1, 4, 1, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 4, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p323, Certificates.k17t8p323_check⟩ + +private theorem k17t8_cover542 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p324, Certificates.k17t8p324_check⟩ + +private theorem k17t8_cover543 : ∀ P ∈ pathPatterns 1 1 [1, 1, 4, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover544 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4, 2, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 4, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p325, Certificates.k17t8p325_check⟩ + +private theorem k17t8_cover545 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4, 3], HasCheckedCertificate 17 8 ([[], [], [1, 1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover547 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 5], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p326, Certificates.k17t8p326_check⟩ + +private theorem k17t8_cover546 : ∀ P ∈ pathPatterns 2 2 [1, 1, 5], HasCheckedCertificate 17 8 ([[], [], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover547 + +private theorem k17t8_cover548 : ∀ P ∈ pathPatterns 1 1 [1, 1, 5, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover549 : ∀ P ∈ pathPatterns 0 0 [1, 1, 5, 1, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 5, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p327, Certificates.k17t8p327_check⟩ + +private theorem k17t8_cover550 : ∀ P ∈ pathPatterns 1 0 [1, 1, 5, 2], HasCheckedCertificate 17 8 ([[], [], [1, 1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover551 : ∀ P ∈ pathPatterns 2 1 [1, 1, 6], HasCheckedCertificate 17 8 ([[], [], [1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover552 : ∀ P ∈ pathPatterns 1 0 [1, 1, 6, 1], HasCheckedCertificate 17 8 ([[], [], [1, 1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover553 : ∀ P ∈ pathPatterns 2 0 [1, 1, 7], HasCheckedCertificate 17 8 ([[], [], [1, 1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq455 : amountSequenceForall 3 7 (fun tail => + (LexLE [] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1, 1] ++ tail).length) (9 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 17 8 ([[], []] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover456 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover476 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover482 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover483 + · exact by + intro _ + exact k17t8_cover484 + · exact by + intro _ + exact k17t8_cover485 + · exact by + intro _ + exact k17t8_cover486 + · exact by + intro _ + exact k17t8_cover487 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover488 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover489 + · exact by + intro _ + exact k17t8_cover490 + · exact by + intro _ + exact k17t8_cover491 + · exact by + intro _ + exact k17t8_cover492 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover493 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover494 + · exact by + intro _ + exact k17t8_cover495 + · exact by + intro _ + exact k17t8_cover496 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover497 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover498 + · exact by + intro _ + exact k17t8_cover499 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover500 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover501 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover502 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover503 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover508 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover509 + · exact by + intro _ + exact k17t8_cover510 + · exact by + intro _ + exact k17t8_cover511 + · exact by + intro _ + exact k17t8_cover512 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover513 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover514 + · exact by + intro _ + exact k17t8_cover515 + · exact by + intro _ + exact k17t8_cover516 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover517 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover518 + · exact by + intro _ + exact k17t8_cover519 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover520 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover521 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover522 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover523 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover527 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover528 + · exact by + intro _ + exact k17t8_cover529 + · exact by + intro _ + exact k17t8_cover530 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover531 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover532 + · exact by + intro _ + exact k17t8_cover533 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover534 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover535 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover536 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover537 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover540 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover541 + · exact by + intro _ + exact k17t8_cover542 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover543 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover544 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover545 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover546 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover548 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover549 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover550 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover551 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover552 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover553 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover556 : ∀ P ∈ pathPatterns 0 3 [1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p328, Certificates.k17t8p328_check⟩ + +private theorem k17t8_cover557 : ∀ P ∈ pathPatterns 0 2 [1, 3], HasCheckedCertificate 17 8 ([[], [], [1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p329, Certificates.k17t8p329_check⟩ + +private theorem k17t8_cover558 : ∀ P ∈ pathPatterns 0 1 [1, 4], HasCheckedCertificate 17 8 ([[], [], [1, 2], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p330, Certificates.k17t8p330_check⟩ + +private theorem k17t8_cover559 : ∀ P ∈ pathPatterns 0 0 [1, 5], HasCheckedCertificate 17 8 ([[], [], [1, 2], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p331, Certificates.k17t8p331_check⟩ + +private theorem k17t8_cover560 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 17 8 ([[], [], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover561 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 17 8 ([[], [], [1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p332, Certificates.k17t8p332_check⟩ + +private theorem k17t8_cover562 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 17 8 ([[], [], [1, 2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p333, Certificates.k17t8p333_check⟩ + +private theorem k17t8_cover563 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 17 8 ([[], [], [1, 2], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p334, Certificates.k17t8p334_check⟩ + +private theorem k17t8_cover564 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 17 8 ([[], [], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover565 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 17 8 ([[], [], [1, 2], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p335, Certificates.k17t8p335_check⟩ + +private theorem k17t8_cover566 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 17 8 ([[], [], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover567 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 17 8 ([[], [], [1, 2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover568 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 17 8 ([[], [], [1, 2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover555 : ∀ P ∈ pathPatterns 3 6 [1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k17t8_cover556 + · exact by + intro _ + exact k17t8_cover557 + · exact by + intro _ + exact k17t8_cover558 + · exact by + intro _ + exact k17t8_cover559 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover560 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover561 + · exact by + intro _ + exact k17t8_cover562 + · exact by + intro _ + exact k17t8_cover563 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover564 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k17t8_cover565 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover566 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover567 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover568 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover570 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p336, Certificates.k17t8p336_check⟩ + +private theorem k17t8_cover571 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p337, Certificates.k17t8p337_check⟩ + +private theorem k17t8_cover572 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p338, Certificates.k17t8p338_check⟩ + +private theorem k17t8_cover573 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p339, Certificates.k17t8p339_check⟩ + +private theorem k17t8_cover569 : ∀ P ∈ pathPatterns 2 5 [1, 2, 1], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover570 + · exact by + intro _ + exact k17t8_cover571 + · exact by + intro _ + exact k17t8_cover572 + · exact by + intro _ + exact k17t8_cover573 + +private theorem k17t8_cover574 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p340, Certificates.k17t8p340_check⟩ + +private theorem k17t8_cover575 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p341, Certificates.k17t8p341_check⟩ + +private theorem k17t8_cover576 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p342, Certificates.k17t8p342_check⟩ + +private theorem k17t8_cover577 : ∀ P ∈ pathPatterns 1 3 [1, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover578 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1, 2, 1], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p343, Certificates.k17t8p343_check⟩ + +private theorem k17t8_cover579 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p344, Certificates.k17t8p344_check⟩ + +private theorem k17t8_cover580 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p345, Certificates.k17t8p345_check⟩ + +private theorem k17t8_cover581 : ∀ P ∈ pathPatterns 1 2 [1, 2, 1, 3], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover582 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 3, 1], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p346, Certificates.k17t8p346_check⟩ + +private theorem k17t8_cover583 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 3, 2], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p347, Certificates.k17t8p347_check⟩ + +private theorem k17t8_cover584 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 4], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover585 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 4, 1], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p348, Certificates.k17t8p348_check⟩ + +private theorem k17t8_cover586 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 5], HasCheckedCertificate 17 8 ([[], [], [1, 2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover588 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 17 8 ([[], [], [1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p349, Certificates.k17t8p349_check⟩ + +private theorem k17t8_cover589 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[], [], [1, 2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p350, Certificates.k17t8p350_check⟩ + +private theorem k17t8_cover590 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[], [], [1, 2, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p351, Certificates.k17t8p351_check⟩ + +private theorem k17t8_cover587 : ∀ P ∈ pathPatterns 2 4 [1, 2, 2], HasCheckedCertificate 17 8 ([[], [], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover588 + · exact by + intro _ + exact k17t8_cover589 + · exact by + intro _ + exact k17t8_cover590 + +private theorem k17t8_cover591 : ∀ P ∈ pathPatterns 1 3 [1, 2, 2, 1], HasCheckedCertificate 17 8 ([[], [], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover592 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 2, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p352, Certificates.k17t8p352_check⟩ + +private theorem k17t8_cover593 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 1, 3], HasCheckedCertificate 17 8 ([[], [], [1, 2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p353, Certificates.k17t8p353_check⟩ + +private theorem k17t8_cover594 : ∀ P ∈ pathPatterns 1 2 [1, 2, 2, 2], HasCheckedCertificate 17 8 ([[], [], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover595 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2, 2, 1], HasCheckedCertificate 17 8 ([[], [], [1, 2, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p354, Certificates.k17t8p354_check⟩ + +private theorem k17t8_cover596 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 2, 2], HasCheckedCertificate 17 8 ([[], [], [1, 2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p355, Certificates.k17t8p355_check⟩ + +private theorem k17t8_cover597 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2, 3], HasCheckedCertificate 17 8 ([[], [], [1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover598 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 3, 1], HasCheckedCertificate 17 8 ([[], [], [1, 2, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p356, Certificates.k17t8p356_check⟩ + +private theorem k17t8_cover599 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 4], HasCheckedCertificate 17 8 ([[], [], [1, 2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover601 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[], [], [1, 2, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p357, Certificates.k17t8p357_check⟩ + +private theorem k17t8_cover602 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [], [1, 2, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p358, Certificates.k17t8p358_check⟩ + +private theorem k17t8_cover600 : ∀ P ∈ pathPatterns 2 3 [1, 2, 3], HasCheckedCertificate 17 8 ([[], [], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover601 + · exact by + intro _ + exact k17t8_cover602 + +private theorem k17t8_cover603 : ∀ P ∈ pathPatterns 1 2 [1, 2, 3, 1], HasCheckedCertificate 17 8 ([[], [], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover604 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 2, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p359, Certificates.k17t8p359_check⟩ + +private theorem k17t8_cover605 : ∀ P ∈ pathPatterns 1 1 [1, 2, 3, 2], HasCheckedCertificate 17 8 ([[], [], [1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover606 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3, 2, 1], HasCheckedCertificate 17 8 ([[], [], [1, 2, 3, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p360, Certificates.k17t8p360_check⟩ + +private theorem k17t8_cover607 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3, 3], HasCheckedCertificate 17 8 ([[], [], [1, 2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover609 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [], [1, 2, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p361, Certificates.k17t8p361_check⟩ + +private theorem k17t8_cover608 : ∀ P ∈ pathPatterns 2 2 [1, 2, 4], HasCheckedCertificate 17 8 ([[], [], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover609 + +private theorem k17t8_cover610 : ∀ P ∈ pathPatterns 1 1 [1, 2, 4, 1], HasCheckedCertificate 17 8 ([[], [], [1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover611 : ∀ P ∈ pathPatterns 1 0 [1, 2, 4, 2], HasCheckedCertificate 17 8 ([[], [], [1, 2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover612 : ∀ P ∈ pathPatterns 2 1 [1, 2, 5], HasCheckedCertificate 17 8 ([[], [], [1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover613 : ∀ P ∈ pathPatterns 1 0 [1, 2, 5, 1], HasCheckedCertificate 17 8 ([[], [], [1, 2, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover614 : ∀ P ∈ pathPatterns 2 0 [1, 2, 6], HasCheckedCertificate 17 8 ([[], [], [1, 2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq554 : amountSequenceForall 3 6 (fun tail => + (LexLE [] ([1, 2] ++ tail) ∧ LexLE ([1, 2] ++ tail) ([1, 2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1, 2] ++ tail).length) (9 - ([1, 2] ++ tail).sum) ([1, 2] ++ tail), + HasCheckedCertificate 17 8 ([[], []] ++ (([1, 2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover555 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover569 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · exact by + intro _ + exact k17t8_cover574 + · exact by + intro _ + exact k17t8_cover575 + · exact by + intro _ + exact k17t8_cover576 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover577 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover578 + · exact by + intro _ + exact k17t8_cover579 + · exact by + intro _ + exact k17t8_cover580 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover581 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover582 + · exact by + intro _ + exact k17t8_cover583 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover584 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover585 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover586 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover587 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover591 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · exact by + intro _ + exact k17t8_cover592 + · exact by + intro _ + exact k17t8_cover593 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover594 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover595 + · exact by + intro _ + exact k17t8_cover596 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover597 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover598 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover599 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover600 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover603 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 3, 1, 1] ∧ LexLE [1, 2, 3, 1, 1] [1, 1, 3, 2, 1])) h) + · exact by + intro _ + exact k17t8_cover604 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover605 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover606 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover607 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover608 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover610 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 4, 1, 1] ∧ LexLE [1, 2, 4, 1, 1] [1, 1, 4, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover611 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover612 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover613 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover614 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover617 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 17 8 ([[], [], [1, 3], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p362, Certificates.k17t8p362_check⟩ + +private theorem k17t8_cover618 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 17 8 ([[], [], [1, 3], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p363, Certificates.k17t8p363_check⟩ + +private theorem k17t8_cover619 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 17 8 ([[], [], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover620 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 17 8 ([[], [], [1, 3], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p364, Certificates.k17t8p364_check⟩ + +private theorem k17t8_cover621 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 17 8 ([[], [], [1, 3], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p365, Certificates.k17t8p365_check⟩ + +private theorem k17t8_cover622 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 17 8 ([[], [], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover623 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 17 8 ([[], [], [1, 3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover624 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 17 8 ([[], [], [1, 3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover616 : ∀ P ∈ pathPatterns 3 5 [1, 3], HasCheckedCertificate 17 8 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro _ + exact k17t8_cover617 + · exact by + intro _ + exact k17t8_cover618 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover619 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover620 + · exact by + intro _ + exact k17t8_cover621 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover622 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover623 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover624 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover626 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 17 8 ([[], [], [1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p366, Certificates.k17t8p366_check⟩ + +private theorem k17t8_cover627 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[], [], [1, 3, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p367, Certificates.k17t8p367_check⟩ + +private theorem k17t8_cover628 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[], [], [1, 3, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p368, Certificates.k17t8p368_check⟩ + +private theorem k17t8_cover625 : ∀ P ∈ pathPatterns 2 4 [1, 3, 1], HasCheckedCertificate 17 8 ([[], [], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover626 + · exact by + intro _ + exact k17t8_cover627 + · exact by + intro _ + exact k17t8_cover628 + +private theorem k17t8_cover629 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 3, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p369, Certificates.k17t8p369_check⟩ + +private theorem k17t8_cover630 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [1, 3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p370, Certificates.k17t8p370_check⟩ + +private theorem k17t8_cover631 : ∀ P ∈ pathPatterns 1 2 [1, 3, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover632 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [], [1, 3, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p371, Certificates.k17t8p371_check⟩ + +private theorem k17t8_cover633 : ∀ P ∈ pathPatterns 1 1 [1, 3, 1, 3], HasCheckedCertificate 17 8 ([[], [], [1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover634 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 3, 1], HasCheckedCertificate 17 8 ([[], [], [1, 3, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p372, Certificates.k17t8p372_check⟩ + +private theorem k17t8_cover635 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1, 4], HasCheckedCertificate 17 8 ([[], [], [1, 3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover637 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[], [], [1, 3, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p373, Certificates.k17t8p373_check⟩ + +private theorem k17t8_cover638 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [], [1, 3, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p374, Certificates.k17t8p374_check⟩ + +private theorem k17t8_cover636 : ∀ P ∈ pathPatterns 2 3 [1, 3, 2], HasCheckedCertificate 17 8 ([[], [], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover637 + · exact by + intro _ + exact k17t8_cover638 + +private theorem k17t8_cover639 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 3, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p375, Certificates.k17t8p375_check⟩ + +private theorem k17t8_cover640 : ∀ P ∈ pathPatterns 1 1 [1, 3, 2, 2], HasCheckedCertificate 17 8 ([[], [], [1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover641 : ∀ P ∈ pathPatterns 1 0 [1, 3, 2, 3], HasCheckedCertificate 17 8 ([[], [], [1, 3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover643 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [], [1, 3, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p376, Certificates.k17t8p376_check⟩ + +private theorem k17t8_cover642 : ∀ P ∈ pathPatterns 2 2 [1, 3, 3], HasCheckedCertificate 17 8 ([[], [], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover643 + +private theorem k17t8_cover644 : ∀ P ∈ pathPatterns 1 1 [1, 3, 3, 1], HasCheckedCertificate 17 8 ([[], [], [1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover645 : ∀ P ∈ pathPatterns 1 0 [1, 3, 3, 2], HasCheckedCertificate 17 8 ([[], [], [1, 3, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover646 : ∀ P ∈ pathPatterns 2 1 [1, 3, 4], HasCheckedCertificate 17 8 ([[], [], [1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover647 : ∀ P ∈ pathPatterns 1 0 [1, 3, 4, 1], HasCheckedCertificate 17 8 ([[], [], [1, 3, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover648 : ∀ P ∈ pathPatterns 2 0 [1, 3, 5], HasCheckedCertificate 17 8 ([[], [], [1, 3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq615 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([1, 3] ++ tail) ∧ LexLE ([1, 3] ++ tail) ([1, 3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1, 3] ++ tail).length) (9 - ([1, 3] ++ tail).sum) ([1, 3] ++ tail), + HasCheckedCertificate 17 8 ([[], []] ++ (([1, 3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover616 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover625 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · exact by + intro _ + exact k17t8_cover629 + · exact by + intro _ + exact k17t8_cover630 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover631 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 2, 1] ∧ LexLE [1, 3, 1, 2, 1] [1, 2, 1, 3, 1])) h) + · exact by + intro _ + exact k17t8_cover632 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover633 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover634 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover635 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover636 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1, 1] ∧ LexLE [1, 3, 2, 1, 1] [1, 1, 2, 3, 1])) h) + · exact by + intro _ + exact k17t8_cover639 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover640 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 2, 1] ∧ LexLE [1, 3, 2, 2, 1] [1, 2, 2, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover641 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover642 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover644 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 3, 1, 1] ∧ LexLE [1, 3, 3, 1, 1] [1, 1, 3, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover645 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover646 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover647 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover648 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover650 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 17 8 ([[], [], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover651 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 17 8 ([[], [], [1, 4], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p377, Certificates.k17t8p377_check⟩ + +private theorem k17t8_cover652 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 17 8 ([[], [], [1, 4], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover653 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 17 8 ([[], [], [1, 4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover649 : ∀ P ∈ pathPatterns 3 4 [1, 4], HasCheckedCertificate 17 8 ([[], [], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover650 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover651 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover652 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover653 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover655 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[], [], [1, 4, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p378, Certificates.k17t8p378_check⟩ + +private theorem k17t8_cover656 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [], [1, 4, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p379, Certificates.k17t8p379_check⟩ + +private theorem k17t8_cover654 : ∀ P ∈ pathPatterns 2 3 [1, 4, 1], HasCheckedCertificate 17 8 ([[], [], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover655 + · exact by + intro _ + exact k17t8_cover656 + +private theorem k17t8_cover657 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 4, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p380, Certificates.k17t8p380_check⟩ + +private theorem k17t8_cover658 : ∀ P ∈ pathPatterns 1 1 [1, 4, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover659 : ∀ P ∈ pathPatterns 1 0 [1, 4, 1, 3], HasCheckedCertificate 17 8 ([[], [], [1, 4, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover661 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [], [1, 4, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p381, Certificates.k17t8p381_check⟩ + +private theorem k17t8_cover660 : ∀ P ∈ pathPatterns 2 2 [1, 4, 2], HasCheckedCertificate 17 8 ([[], [], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover661 + +private theorem k17t8_cover662 : ∀ P ∈ pathPatterns 1 0 [1, 4, 2, 2], HasCheckedCertificate 17 8 ([[], [], [1, 4, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover663 : ∀ P ∈ pathPatterns 2 1 [1, 4, 3], HasCheckedCertificate 17 8 ([[], [], [1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover664 : ∀ P ∈ pathPatterns 2 0 [1, 4, 4], HasCheckedCertificate 17 8 ([[], [], [1, 4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover666 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 17 8 ([[], [], [1, 5], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover667 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[], [], [1, 5], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover665 : ∀ P ∈ pathPatterns 3 3 [1, 5], HasCheckedCertificate 17 8 ([[], [], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover666 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover667 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover669 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [], [1, 5, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p382, Certificates.k17t8p382_check⟩ + +private theorem k17t8_cover668 : ∀ P ∈ pathPatterns 2 2 [1, 5, 1], HasCheckedCertificate 17 8 ([[], [], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover669 + +private theorem k17t8_cover670 : ∀ P ∈ pathPatterns 1 0 [1, 5, 1, 2], HasCheckedCertificate 17 8 ([[], [], [1, 5, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover671 : ∀ P ∈ pathPatterns 2 1 [1, 5, 2], HasCheckedCertificate 17 8 ([[], [], [1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover672 : ∀ P ∈ pathPatterns 2 0 [1, 5, 3], HasCheckedCertificate 17 8 ([[], [], [1, 5, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover674 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[], [], [1, 6], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover673 : ∀ P ∈ pathPatterns 3 2 [1, 6], HasCheckedCertificate 17 8 ([[], [], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover674 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover675 : ∀ P ∈ pathPatterns 2 1 [1, 6, 1], HasCheckedCertificate 17 8 ([[], [], [1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover676 : ∀ P ∈ pathPatterns 2 0 [1, 6, 2], HasCheckedCertificate 17 8 ([[], [], [1, 6, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover677 : ∀ P ∈ pathPatterns 3 1 [1, 7], HasCheckedCertificate 17 8 ([[], [], [1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover678 : ∀ P ∈ pathPatterns 2 0 [1, 7, 1], HasCheckedCertificate 17 8 ([[], [], [1, 7, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover679 : ∀ P ∈ pathPatterns 3 0 [1, 8], HasCheckedCertificate 17 8 ([[], [], [1, 8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq377 : amountSequenceForall 4 8 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1] ++ tail).length) (9 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 17 8 ([[], []] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover378 + · intro q + fin_cases q + · exact k17t8_seq455 + + · exact k17t8_seq554 + + · exact k17t8_seq615 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover649 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover654 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1, 1] ∧ LexLE [1, 4, 1, 1, 1] [1, 1, 1, 4, 1])) h) + · exact by + intro _ + exact k17t8_cover657 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover658 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 2, 1] ∧ LexLE [1, 4, 1, 2, 1] [1, 2, 1, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover659 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover660 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 2, 1] ∧ LexLE [1, 4, 2, 1] [1, 2, 4, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 2, 1, 1] ∧ LexLE [1, 4, 2, 1, 1] [1, 1, 2, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover662 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover663 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 3, 1] ∧ LexLE [1, 4, 3, 1] [1, 3, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover664 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover665 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover668 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 1, 1] ∧ LexLE [1, 5, 1, 1] [1, 1, 5, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 1, 1, 1] ∧ LexLE [1, 5, 1, 1, 1] [1, 1, 1, 5, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover670 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover671 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 2, 1] ∧ LexLE [1, 5, 2, 1] [1, 2, 5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover672 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover673 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover675 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 6, 1, 1] ∧ LexLE [1, 6, 1, 1] [1, 1, 6, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover676 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover677 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover678 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover679 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover684 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 17 8 ([[], [], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p383, Certificates.k17t8p383_check⟩ + +private theorem k17t8_cover685 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 17 8 ([[], [], [2], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p384, Certificates.k17t8p384_check⟩ + +private theorem k17t8_cover686 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 17 8 ([[], [], [2], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p385, Certificates.k17t8p385_check⟩ + +private theorem k17t8_cover687 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 17 8 ([[], [], [2], [2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p386, Certificates.k17t8p386_check⟩ + +private theorem k17t8_cover683 : ∀ P ∈ pathPatterns 2 5 [2], HasCheckedCertificate 17 8 ([[], [], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover684 + · exact by + intro _ + exact k17t8_cover685 + · exact by + intro _ + exact k17t8_cover686 + · exact by + intro _ + exact k17t8_cover687 + +private theorem k17t8_cover688 : ∀ P ∈ pathPatterns 0 2 [2, 1, 2], HasCheckedCertificate 17 8 ([[], [], [2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p387, Certificates.k17t8p387_check⟩ + +private theorem k17t8_cover689 : ∀ P ∈ pathPatterns 0 1 [2, 1, 3], HasCheckedCertificate 17 8 ([[], [], [2], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p388, Certificates.k17t8p388_check⟩ + +private theorem k17t8_cover690 : ∀ P ∈ pathPatterns 0 0 [2, 1, 4], HasCheckedCertificate 17 8 ([[], [], [2], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p389, Certificates.k17t8p389_check⟩ + +private theorem k17t8_cover691 : ∀ P ∈ pathPatterns 1 3 [2, 2], HasCheckedCertificate 17 8 ([[], [], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover692 : ∀ P ∈ pathPatterns 0 1 [2, 2, 2], HasCheckedCertificate 17 8 ([[], [], [2], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p390, Certificates.k17t8p390_check⟩ + +private theorem k17t8_cover693 : ∀ P ∈ pathPatterns 0 0 [2, 2, 3], HasCheckedCertificate 17 8 ([[], [], [2], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p391, Certificates.k17t8p391_check⟩ + +private theorem k17t8_cover694 : ∀ P ∈ pathPatterns 1 2 [2, 3], HasCheckedCertificate 17 8 ([[], [], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover695 : ∀ P ∈ pathPatterns 0 0 [2, 3, 2], HasCheckedCertificate 17 8 ([[], [], [2], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p392, Certificates.k17t8p392_check⟩ + +private theorem k17t8_cover696 : ∀ P ∈ pathPatterns 1 1 [2, 4], HasCheckedCertificate 17 8 ([[], [], [2], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover697 : ∀ P ∈ pathPatterns 1 0 [2, 5], HasCheckedCertificate 17 8 ([[], [], [2], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover699 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[], [], [2], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p393, Certificates.k17t8p393_check⟩ + +private theorem k17t8_cover700 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[], [], [2], [3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p394, Certificates.k17t8p394_check⟩ + +private theorem k17t8_cover698 : ∀ P ∈ pathPatterns 2 4 [3], HasCheckedCertificate 17 8 ([[], [], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover699 + · exact by + intro _ + exact k17t8_cover700 + +private theorem k17t8_cover701 : ∀ P ∈ pathPatterns 0 0 [3, 1, 3], HasCheckedCertificate 17 8 ([[], [], [2], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p395, Certificates.k17t8p395_check⟩ + +private theorem k17t8_cover702 : ∀ P ∈ pathPatterns 1 1 [3, 3], HasCheckedCertificate 17 8 ([[], [], [2], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover703 : ∀ P ∈ pathPatterns 1 0 [3, 4], HasCheckedCertificate 17 8 ([[], [], [2], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover704 : ∀ P ∈ pathPatterns 2 3 [4], HasCheckedCertificate 17 8 ([[], [], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + +private theorem k17t8_cover705 : ∀ P ∈ pathPatterns 2 2 [5], HasCheckedCertificate 17 8 ([[], [], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover706 : ∀ P ∈ pathPatterns 2 1 [6], HasCheckedCertificate 17 8 ([[], [], [2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover707 : ∀ P ∈ pathPatterns 2 0 [7], HasCheckedCertificate 17 8 ([[], [], [2], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq682 : amountSequenceForall 3 7 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [], [2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 4] ∧ LexLE [1, 1, 4] [4, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 5] ∧ LexLE [1, 1, 5] [5, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 3] ∧ LexLE [1, 2, 3] [3, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 4] ∧ LexLE [1, 2, 4] [4, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 2] ∧ LexLE [1, 3, 2] [2, 3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 3] ∧ LexLE [1, 3, 3] [3, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4, 1] ∧ LexLE [1, 4, 1] [1, 4, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4, 2] ∧ LexLE [1, 4, 2] [2, 4, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5, 1] ∧ LexLE [1, 5, 1] [1, 5, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 6] ∧ LexLE [1, 6] [6, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover683 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover688 + · exact by + intro _ + exact k17t8_cover689 + · exact by + intro _ + exact k17t8_cover690 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover691 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k17t8_cover692 + · exact by + intro _ + exact k17t8_cover693 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover694 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + intro _ + exact k17t8_cover695 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover696 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover697 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover698 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + intro _ + exact k17t8_cover701 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover702 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover703 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover704 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover705 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover706 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover707 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover681 : ∀ P ∈ pathPatterns 4 7 [2], HasCheckedCertificate 17 8 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq682 + + +private theorem k17t8_cover709 : ∀ P ∈ pathPatterns 0 2 [2, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [], [2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p396, Certificates.k17t8p396_check⟩ + +private theorem k17t8_cover710 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [2, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p397, Certificates.k17t8p397_check⟩ + +private theorem k17t8_cover711 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [], [2, 1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p398, Certificates.k17t8p398_check⟩ + +private theorem k17t8_cover712 : ∀ P ∈ pathPatterns 1 3 [2, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover713 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [], [2, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p399, Certificates.k17t8p399_check⟩ + +private theorem k17t8_cover714 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [], [2, 1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p400, Certificates.k17t8p400_check⟩ + +private theorem k17t8_cover715 : ∀ P ∈ pathPatterns 1 2 [2, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover716 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 3, 2], HasCheckedCertificate 17 8 ([[], [], [2, 1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p401, Certificates.k17t8p401_check⟩ + +private theorem k17t8_cover717 : ∀ P ∈ pathPatterns 1 1 [2, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [], [2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover718 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 5], HasCheckedCertificate 17 8 ([[], [], [2, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover720 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[], [], [2, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p402, Certificates.k17t8p402_check⟩ + +private theorem k17t8_cover721 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[], [], [2, 1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p403, Certificates.k17t8p403_check⟩ + +private theorem k17t8_cover719 : ∀ P ∈ pathPatterns 2 4 [2, 1, 2], HasCheckedCertificate 17 8 ([[], [], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover720 + · exact by + intro _ + exact k17t8_cover721 + +private theorem k17t8_cover722 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [], [2, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p404, Certificates.k17t8p404_check⟩ + +private theorem k17t8_cover723 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 1, 3], HasCheckedCertificate 17 8 ([[], [], [2, 1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p405, Certificates.k17t8p405_check⟩ + +private theorem k17t8_cover724 : ∀ P ∈ pathPatterns 1 2 [2, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover725 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 2, 2], HasCheckedCertificate 17 8 ([[], [], [2, 1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p406, Certificates.k17t8p406_check⟩ + +private theorem k17t8_cover726 : ∀ P ∈ pathPatterns 1 1 [2, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [], [2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover727 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2, 4], HasCheckedCertificate 17 8 ([[], [], [2, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover729 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [], [2, 1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p407, Certificates.k17t8p407_check⟩ + +private theorem k17t8_cover728 : ∀ P ∈ pathPatterns 2 3 [2, 1, 3], HasCheckedCertificate 17 8 ([[], [], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover729 + +private theorem k17t8_cover730 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3, 1, 2], HasCheckedCertificate 17 8 ([[], [], [2, 1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p408, Certificates.k17t8p408_check⟩ + +private theorem k17t8_cover731 : ∀ P ∈ pathPatterns 1 1 [2, 1, 3, 2], HasCheckedCertificate 17 8 ([[], [], [2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover732 : ∀ P ∈ pathPatterns 1 0 [2, 1, 3, 3], HasCheckedCertificate 17 8 ([[], [], [2, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover733 : ∀ P ∈ pathPatterns 2 2 [2, 1, 4], HasCheckedCertificate 17 8 ([[], [], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover734 : ∀ P ∈ pathPatterns 1 0 [2, 1, 4, 2], HasCheckedCertificate 17 8 ([[], [], [2, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover735 : ∀ P ∈ pathPatterns 2 1 [2, 1, 5], HasCheckedCertificate 17 8 ([[], [], [2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover736 : ∀ P ∈ pathPatterns 2 0 [2, 1, 6], HasCheckedCertificate 17 8 ([[], [], [2, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq708 : amountSequenceForall 3 6 (fun tail => + (LexLE [] ([2, 1] ++ tail) ∧ LexLE ([2, 1] ++ tail) ([2, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([2, 1] ++ tail).length) (9 - ([2, 1] ++ tail).sum) ([2, 1] ++ tail), + HasCheckedCertificate 17 8 ([[], []] ++ (([2, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover709 + · exact by + intro _ + exact k17t8_cover710 + · exact by + intro _ + exact k17t8_cover711 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover712 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover713 + · exact by + intro _ + exact k17t8_cover714 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover715 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 3, 1] ∧ LexLE [2, 1, 1, 3, 1] [1, 3, 1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover716 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover717 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 4, 1] ∧ LexLE [2, 1, 1, 4, 1] [1, 4, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover718 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover719 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover722 + · exact by + intro _ + exact k17t8_cover723 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover724 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 2, 1] ∧ LexLE [2, 1, 2, 2, 1] [1, 2, 2, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover725 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover726 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 3, 1] ∧ LexLE [2, 1, 2, 3, 1] [1, 3, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover727 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover728 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1, 1] ∧ LexLE [2, 1, 3, 1, 1] [1, 1, 3, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover730 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover731 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 2, 1] ∧ LexLE [2, 1, 3, 2, 1] [1, 2, 3, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover732 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover733 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 4, 1] ∧ LexLE [2, 1, 4, 1] [1, 4, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 4, 1, 1] ∧ LexLE [2, 1, 4, 1, 1] [1, 1, 4, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover734 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover735 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 5, 1] ∧ LexLE [2, 1, 5, 1] [1, 5, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover736 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover739 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 17 8 ([[], [], [2, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p409, Certificates.k17t8p409_check⟩ + +private theorem k17t8_cover740 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 17 8 ([[], [], [2, 2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p410, Certificates.k17t8p410_check⟩ + +private theorem k17t8_cover741 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 17 8 ([[], [], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover742 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 17 8 ([[], [], [2, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover743 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 17 8 ([[], [], [2, 2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover738 : ∀ P ∈ pathPatterns 3 5 [2, 2], HasCheckedCertificate 17 8 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover739 + · exact by + intro _ + exact k17t8_cover740 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover741 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover742 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover743 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover744 : ∀ P ∈ pathPatterns 0 0 [2, 2, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [2, 2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p411, Certificates.k17t8p411_check⟩ + +private theorem k17t8_cover745 : ∀ P ∈ pathPatterns 0 0 [2, 2, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [], [2, 2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p412, Certificates.k17t8p412_check⟩ + +private theorem k17t8_cover746 : ∀ P ∈ pathPatterns 1 1 [2, 2, 1, 3], HasCheckedCertificate 17 8 ([[], [], [2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover747 : ∀ P ∈ pathPatterns 1 0 [2, 2, 1, 4], HasCheckedCertificate 17 8 ([[], [], [2, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover749 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [], [2, 2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p413, Certificates.k17t8p413_check⟩ + +private theorem k17t8_cover748 : ∀ P ∈ pathPatterns 2 3 [2, 2, 2], HasCheckedCertificate 17 8 ([[], [], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover749 + +private theorem k17t8_cover750 : ∀ P ∈ pathPatterns 1 1 [2, 2, 2, 2], HasCheckedCertificate 17 8 ([[], [], [2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover751 : ∀ P ∈ pathPatterns 1 0 [2, 2, 2, 3], HasCheckedCertificate 17 8 ([[], [], [2, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover752 : ∀ P ∈ pathPatterns 2 2 [2, 2, 3], HasCheckedCertificate 17 8 ([[], [], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover753 : ∀ P ∈ pathPatterns 1 0 [2, 2, 3, 2], HasCheckedCertificate 17 8 ([[], [], [2, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover754 : ∀ P ∈ pathPatterns 2 1 [2, 2, 4], HasCheckedCertificate 17 8 ([[], [], [2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover755 : ∀ P ∈ pathPatterns 2 0 [2, 2, 5], HasCheckedCertificate 17 8 ([[], [], [2, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq737 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([2, 2] ++ tail) ∧ LexLE ([2, 2] ++ tail) ([2, 2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([2, 2] ++ tail).length) (9 - ([2, 2] ++ tail).sum) ([2, 2] ++ tail), + HasCheckedCertificate 17 8 ([[], []] ++ (([2, 2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover738 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 2] ∧ LexLE [2, 2, 1, 1, 2] [2, 1, 1, 2, 2])) h) + · exact by + intro _ + exact k17t8_cover744 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2, 1] ∧ LexLE [2, 2, 1, 2, 1] [1, 2, 1, 2, 2])) h) + · exact by + intro _ + exact k17t8_cover745 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover746 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 3, 1] ∧ LexLE [2, 2, 1, 3, 1] [1, 3, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover747 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover748 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1, 1] ∧ LexLE [2, 2, 2, 1, 1] [1, 1, 2, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1, 2] ∧ LexLE [2, 2, 2, 1, 2] [2, 1, 2, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover750 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 2, 1] ∧ LexLE [2, 2, 2, 2, 1] [1, 2, 2, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover751 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover752 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 3, 1] ∧ LexLE [2, 2, 3, 1] [1, 3, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 3, 1, 1] ∧ LexLE [2, 2, 3, 1, 1] [1, 1, 3, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover753 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover754 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 4, 1] ∧ LexLE [2, 2, 4, 1] [1, 4, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover755 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover757 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 17 8 ([[], [], [2, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover758 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 17 8 ([[], [], [2, 3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover756 : ∀ P ∈ pathPatterns 3 4 [2, 3], HasCheckedCertificate 17 8 ([[], [], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover757 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover758 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover759 : ∀ P ∈ pathPatterns 1 0 [2, 3, 1, 3], HasCheckedCertificate 17 8 ([[], [], [2, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover760 : ∀ P ∈ pathPatterns 2 2 [2, 3, 2], HasCheckedCertificate 17 8 ([[], [], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover761 : ∀ P ∈ pathPatterns 2 1 [2, 3, 3], HasCheckedCertificate 17 8 ([[], [], [2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover762 : ∀ P ∈ pathPatterns 2 0 [2, 3, 4], HasCheckedCertificate 17 8 ([[], [], [2, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover764 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[], [], [2, 4], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover763 : ∀ P ∈ pathPatterns 3 3 [2, 4], HasCheckedCertificate 17 8 ([[], [], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover764 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover765 : ∀ P ∈ pathPatterns 2 1 [2, 4, 2], HasCheckedCertificate 17 8 ([[], [], [2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover766 : ∀ P ∈ pathPatterns 2 0 [2, 4, 3], HasCheckedCertificate 17 8 ([[], [], [2, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover767 : ∀ P ∈ pathPatterns 3 2 [2, 5], HasCheckedCertificate 17 8 ([[], [], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover768 : ∀ P ∈ pathPatterns 2 0 [2, 5, 2], HasCheckedCertificate 17 8 ([[], [], [2, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover769 : ∀ P ∈ pathPatterns 3 1 [2, 6], HasCheckedCertificate 17 8 ([[], [], [2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover770 : ∀ P ∈ pathPatterns 3 0 [2, 7], HasCheckedCertificate 17 8 ([[], [], [2, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq680 : amountSequenceForall 4 7 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([2] ++ tail).length) (9 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 17 8 ([[], []] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover681 + · intro q + fin_cases q + · exact k17t8_seq708 + + · exact k17t8_seq737 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover756 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1, 1] ∧ LexLE [2, 3, 1, 1, 1] [1, 1, 1, 3, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1, 2] ∧ LexLE [2, 3, 1, 1, 2] [2, 1, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 2] ∧ LexLE [2, 3, 1, 2] [2, 1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 2, 1] ∧ LexLE [2, 3, 1, 2, 1] [1, 2, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover759 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover760 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 1] ∧ LexLE [2, 3, 2, 1] [1, 2, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 1, 1] ∧ LexLE [2, 3, 2, 1, 1] [1, 1, 2, 3, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 2] ∧ LexLE [2, 3, 2, 2] [2, 2, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover761 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 3, 1] ∧ LexLE [2, 3, 3, 1] [1, 3, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover762 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover763 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 1] ∧ LexLE [2, 4, 1, 1] [1, 1, 4, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 1, 1] ∧ LexLE [2, 4, 1, 1, 1] [1, 1, 1, 4, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 2] ∧ LexLE [2, 4, 1, 2] [2, 1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover765 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 2, 1] ∧ LexLE [2, 4, 2, 1] [1, 2, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover766 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover767 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1, 1] ∧ LexLE [2, 5, 1, 1] [1, 1, 5, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover768 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover769 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 6, 1] ∧ LexLE [2, 6, 1] [1, 6, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover770 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover775 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [], [3], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p414, Certificates.k17t8p414_check⟩ + +private theorem k17t8_cover774 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 17 8 ([[], [], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover775 + +private theorem k17t8_cover776 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 17 8 ([[], [], [3], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover777 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 17 8 ([[], [], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover778 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 17 8 ([[], [], [3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover779 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 17 8 ([[], [], [3], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq773 : amountSequenceForall 3 6 (fun tail => + (LexLE [3] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [], [3]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 4] ∧ LexLE [1, 1, 4] [4, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 3] ∧ LexLE [1, 2, 3] [3, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3, 2] ∧ LexLE [1, 3, 2] [2, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4, 1] ∧ LexLE [1, 4, 1] [1, 4, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 2] ∧ LexLE [2, 1, 2] [2, 1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 3] ∧ LexLE [2, 1, 3] [3, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2, 2] ∧ LexLE [2, 2, 2] [2, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 4] ∧ LexLE [2, 4] [4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover774 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover776 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover777 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover778 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover779 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover772 : ∀ P ∈ pathPatterns 4 6 [3], HasCheckedCertificate 17 8 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq773 + + +private theorem k17t8_cover781 : ∀ P ∈ pathPatterns 0 0 [3, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [3, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p415, Certificates.k17t8p415_check⟩ + +private theorem k17t8_cover782 : ∀ P ∈ pathPatterns 1 1 [3, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [], [3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover783 : ∀ P ∈ pathPatterns 1 0 [3, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [], [3, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover784 : ∀ P ∈ pathPatterns 1 0 [3, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [], [3, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover785 : ∀ P ∈ pathPatterns 2 2 [3, 1, 3], HasCheckedCertificate 17 8 ([[], [], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover786 : ∀ P ∈ pathPatterns 2 1 [3, 1, 4], HasCheckedCertificate 17 8 ([[], [], [3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover787 : ∀ P ∈ pathPatterns 2 0 [3, 1, 5], HasCheckedCertificate 17 8 ([[], [], [3, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq780 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([3, 1] ++ tail) ∧ LexLE ([3, 1] ++ tail) ([3, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([3, 1] ++ tail).length) (9 - ([3, 1] ++ tail).sum) ([3, 1] ++ tail), + HasCheckedCertificate 17 8 ([[], []] ++ (([3, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 2] ∧ LexLE [3, 1, 1, 1, 2] [2, 1, 1, 1, 3])) h) + · exact by + intro _ + exact k17t8_cover781 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2, 1] ∧ LexLE [3, 1, 1, 2, 1] [1, 2, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2, 2] ∧ LexLE [3, 1, 1, 2, 2] [2, 2, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover782 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 3, 1] ∧ LexLE [3, 1, 1, 3, 1] [1, 3, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover783 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1, 1] ∧ LexLE [3, 1, 2, 1, 1] [1, 1, 2, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1, 2] ∧ LexLE [3, 1, 2, 1, 2] [2, 1, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 2] ∧ LexLE [3, 1, 2, 2] [2, 2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 2, 1] ∧ LexLE [3, 1, 2, 2, 1] [1, 2, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover784 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover785 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 1] ∧ LexLE [3, 1, 3, 1] [1, 3, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 1, 1] ∧ LexLE [3, 1, 3, 1, 1] [1, 1, 3, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 2] ∧ LexLE [3, 1, 3, 2] [2, 3, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover786 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 4, 1] ∧ LexLE [3, 1, 4, 1] [1, 4, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover787 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover788 : ∀ P ∈ pathPatterns 2 1 [3, 2, 3], HasCheckedCertificate 17 8 ([[], [], [3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover789 : ∀ P ∈ pathPatterns 2 0 [3, 2, 4], HasCheckedCertificate 17 8 ([[], [], [3, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover790 : ∀ P ∈ pathPatterns 3 3 [3, 3], HasCheckedCertificate 17 8 ([[], [], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover791 : ∀ P ∈ pathPatterns 2 0 [3, 3, 3], HasCheckedCertificate 17 8 ([[], [], [3, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover792 : ∀ P ∈ pathPatterns 3 2 [3, 4], HasCheckedCertificate 17 8 ([[], [], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover793 : ∀ P ∈ pathPatterns 3 1 [3, 5], HasCheckedCertificate 17 8 ([[], [], [3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover794 : ∀ P ∈ pathPatterns 3 0 [3, 6], HasCheckedCertificate 17 8 ([[], [], [3, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq771 : amountSequenceForall 4 6 (fun tail => + (LexLE [] ([3] ++ tail) ∧ LexLE ([3] ++ tail) ([3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([3] ++ tail).length) (9 - ([3] ++ tail).sum) ([3] ++ tail), + HasCheckedCertificate 17 8 ([[], []] ++ (([3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover772 + · intro q + fin_cases q + · exact k17t8_seq780 + + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1, 1] ∧ LexLE [3, 2, 1, 1, 1] [1, 1, 1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1, 2] ∧ LexLE [3, 2, 1, 1, 2] [2, 1, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 2] ∧ LexLE [3, 2, 1, 2] [2, 1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 2, 1] ∧ LexLE [3, 2, 1, 2, 1] [1, 2, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 3] ∧ LexLE [3, 2, 1, 3] [3, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 1] ∧ LexLE [3, 2, 2, 1] [1, 2, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 1, 1] ∧ LexLE [3, 2, 2, 1, 1] [1, 1, 2, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 2] ∧ LexLE [3, 2, 2, 2] [2, 2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover788 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 3, 1] ∧ LexLE [3, 2, 3, 1] [1, 3, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover789 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover790 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 1] ∧ LexLE [3, 3, 1, 1] [1, 1, 3, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 1, 1] ∧ LexLE [3, 3, 1, 1, 1] [1, 1, 1, 3, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 2] ∧ LexLE [3, 3, 1, 2] [2, 1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2, 1] ∧ LexLE [3, 3, 2, 1] [1, 2, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover791 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover792 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1, 1] ∧ LexLE [3, 4, 1, 1] [1, 1, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 2] ∧ LexLE [3, 4, 2] [2, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover793 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 5, 1] ∧ LexLE [3, 5, 1] [1, 5, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover794 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover798 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 17 8 ([[], [], [4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover799 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 17 8 ([[], [], [4], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq797 : amountSequenceForall 3 5 (fun tail => + (LexLE [4] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [], [4]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1, 2] ∧ LexLE [2, 1, 2] [2, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover798 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover799 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover796 : ∀ P ∈ pathPatterns 4 5 [4], HasCheckedCertificate 17 8 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq797 + + +private theorem k17t8_cover800 : ∀ P ∈ pathPatterns 2 0 [4, 1, 4], HasCheckedCertificate 17 8 ([[], [], [4, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover801 : ∀ P ∈ pathPatterns 3 1 [4, 4], HasCheckedCertificate 17 8 ([[], [], [4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover802 : ∀ P ∈ pathPatterns 3 0 [4, 5], HasCheckedCertificate 17 8 ([[], [], [4, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq795 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([4] ++ tail) ∧ LexLE ([4] ++ tail) ([4] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([4] ++ tail).length) (9 - ([4] ++ tail).sum) ([4] ++ tail), + HasCheckedCertificate 17 8 ([[], []] ++ (([4] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover796 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1, 1] ∧ LexLE [4, 1, 1, 1, 1] [1, 1, 1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1, 2] ∧ LexLE [4, 1, 1, 1, 2] [2, 1, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 2] ∧ LexLE [4, 1, 1, 2] [2, 1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 2, 1] ∧ LexLE [4, 1, 1, 2, 1] [1, 2, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 3] ∧ LexLE [4, 1, 1, 3] [3, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 1] ∧ LexLE [4, 1, 2, 1] [1, 2, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 1, 1] ∧ LexLE [4, 1, 2, 1, 1] [1, 1, 2, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 2] ∧ LexLE [4, 1, 2, 2] [2, 2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3, 1] ∧ LexLE [4, 1, 3, 1] [1, 3, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover800 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 1] ∧ LexLE [4, 2, 1, 1] [1, 1, 2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 1, 1] ∧ LexLE [4, 2, 1, 1, 1] [1, 1, 1, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 2] ∧ LexLE [4, 2, 1, 2] [2, 1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2, 1] ∧ LexLE [4, 2, 2, 1] [1, 2, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 3] ∧ LexLE [4, 2, 3] [3, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1, 1] ∧ LexLE [4, 3, 1, 1] [1, 1, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 2] ∧ LexLE [4, 3, 2] [2, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover801 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 4, 1] ∧ LexLE [4, 4, 1] [1, 4, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover802 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover803 : ∀ P ∈ pathPatterns 4 4 [5], HasCheckedCertificate 17 8 ([[], [], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [4] ∧ LexLE [4] [4])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover804 : ∀ P ∈ pathPatterns 4 3 [6], HasCheckedCertificate 17 8 ([[], [], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover805 : ∀ P ∈ pathPatterns 4 2 [7], HasCheckedCertificate 17 8 ([[], [], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover806 : ∀ P ∈ pathPatterns 4 1 [8], HasCheckedCertificate 17 8 ([[], [], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover807 : ∀ P ∈ pathPatterns 4 0 [9], HasCheckedCertificate 17 8 ([[], [], [9]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [9] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq6 : amountSequenceForall 5 9 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (9 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], []] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover7 + · intro q + fin_cases q + · exact k17t8_seq377 + + · exact k17t8_seq680 + + · exact k17t8_seq771 + + · exact k17t8_seq795 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover803 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 1] ∧ LexLE [5, 1, 1, 1] [1, 1, 1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 1, 1] ∧ LexLE [5, 1, 1, 1, 1] [1, 1, 1, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 2] ∧ LexLE [5, 1, 1, 2] [2, 1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2, 1] ∧ LexLE [5, 1, 2, 1] [1, 2, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 3] ∧ LexLE [5, 1, 3] [3, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1, 1] ∧ LexLE [5, 2, 1, 1] [1, 1, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 2] ∧ LexLE [5, 2, 2] [2, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3, 1] ∧ LexLE [5, 3, 1] [1, 3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 4] ∧ LexLE [5, 4] [4, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover804 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1, 1] ∧ LexLE [6, 1, 1, 1] [1, 1, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 2] ∧ LexLE [6, 1, 2] [2, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2, 1] ∧ LexLE [6, 2, 1] [1, 2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 3] ∧ LexLE [6, 3] [3, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover805 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1, 1] ∧ LexLE [7, 1, 1] [1, 1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 2] ∧ LexLE [7, 2] [2, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover806 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [8, 1] ∧ LexLE [8, 1] [1, 8])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover807 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover5 : ∀ P ∈ pathPatterns 6 9 [], HasCheckedCertificate 17 8 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq6 + + +private theorem k17t8_cover814 : ∀ P ∈ pathPatterns 1 6 [1], HasCheckedCertificate 17 8 ([[], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover815 : ∀ P ∈ pathPatterns 0 5 [1, 1], HasCheckedCertificate 17 8 ([[], [1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p416, Certificates.k17t8p416_check⟩ + +private theorem k17t8_cover816 : ∀ P ∈ pathPatterns 0 4 [1, 2], HasCheckedCertificate 17 8 ([[], [1], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p417, Certificates.k17t8p417_check⟩ + +private theorem k17t8_cover817 : ∀ P ∈ pathPatterns 0 3 [1, 3], HasCheckedCertificate 17 8 ([[], [1], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p418, Certificates.k17t8p418_check⟩ + +private theorem k17t8_cover818 : ∀ P ∈ pathPatterns 0 2 [1, 4], HasCheckedCertificate 17 8 ([[], [1], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p419, Certificates.k17t8p419_check⟩ + +private theorem k17t8_cover819 : ∀ P ∈ pathPatterns 0 1 [1, 5], HasCheckedCertificate 17 8 ([[], [1], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p420, Certificates.k17t8p420_check⟩ + +private theorem k17t8_cover820 : ∀ P ∈ pathPatterns 0 0 [1, 6], HasCheckedCertificate 17 8 ([[], [1], [1], [1, 6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p421, Certificates.k17t8p421_check⟩ + +private theorem k17t8_cover821 : ∀ P ∈ pathPatterns 1 5 [2], HasCheckedCertificate 17 8 ([[], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover822 : ∀ P ∈ pathPatterns 0 3 [2, 2], HasCheckedCertificate 17 8 ([[], [1], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p422, Certificates.k17t8p422_check⟩ + +private theorem k17t8_cover823 : ∀ P ∈ pathPatterns 0 2 [2, 3], HasCheckedCertificate 17 8 ([[], [1], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p423, Certificates.k17t8p423_check⟩ + +private theorem k17t8_cover824 : ∀ P ∈ pathPatterns 0 1 [2, 4], HasCheckedCertificate 17 8 ([[], [1], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p424, Certificates.k17t8p424_check⟩ + +private theorem k17t8_cover825 : ∀ P ∈ pathPatterns 0 0 [2, 5], HasCheckedCertificate 17 8 ([[], [1], [1], [2, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p425, Certificates.k17t8p425_check⟩ + +private theorem k17t8_cover826 : ∀ P ∈ pathPatterns 1 4 [3], HasCheckedCertificate 17 8 ([[], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover827 : ∀ P ∈ pathPatterns 0 1 [3, 3], HasCheckedCertificate 17 8 ([[], [1], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p426, Certificates.k17t8p426_check⟩ + +private theorem k17t8_cover828 : ∀ P ∈ pathPatterns 0 0 [3, 4], HasCheckedCertificate 17 8 ([[], [1], [1], [3, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p427, Certificates.k17t8p427_check⟩ + +private theorem k17t8_cover829 : ∀ P ∈ pathPatterns 1 3 [4], HasCheckedCertificate 17 8 ([[], [1], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover830 : ∀ P ∈ pathPatterns 1 2 [5], HasCheckedCertificate 17 8 ([[], [1], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover831 : ∀ P ∈ pathPatterns 1 1 [6], HasCheckedCertificate 17 8 ([[], [1], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover832 : ∀ P ∈ pathPatterns 1 0 [7], HasCheckedCertificate 17 8 ([[], [1], [1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + +private theorem k17t8_seq813 : amountSequenceForall 2 7 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (2 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [1], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover814 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover815 + · exact by + intro _ + exact k17t8_cover816 + · exact by + intro _ + exact k17t8_cover817 + · exact by + intro _ + exact k17t8_cover818 + · exact by + intro _ + exact k17t8_cover819 + · exact by + intro _ + exact k17t8_cover820 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover821 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover822 + · exact by + intro _ + exact k17t8_cover823 + · exact by + intro _ + exact k17t8_cover824 + · exact by + intro _ + exact k17t8_cover825 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover826 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k17t8_cover827 + · exact by + intro _ + exact k17t8_cover828 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover829 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover830 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover831 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover832 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover812 : ∀ P ∈ pathPatterns 3 7 [1], HasCheckedCertificate 17 8 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq813 + + +private theorem k17t8_cover834 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 17 8 ([[], [1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p428, Certificates.k17t8p428_check⟩ + +private theorem k17t8_cover835 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 17 8 ([[], [1], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p429, Certificates.k17t8p429_check⟩ + +private theorem k17t8_cover836 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 17 8 ([[], [1], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p430, Certificates.k17t8p430_check⟩ + +private theorem k17t8_cover837 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 17 8 ([[], [1], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p431, Certificates.k17t8p431_check⟩ + +private theorem k17t8_cover838 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 17 8 ([[], [1], [1, 1], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p432, Certificates.k17t8p432_check⟩ + +private theorem k17t8_cover833 : ∀ P ∈ pathPatterns 2 6 [1, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover834 + · exact by + intro _ + exact k17t8_cover835 + · exact by + intro _ + exact k17t8_cover836 + · exact by + intro _ + exact k17t8_cover837 + · exact by + intro _ + exact k17t8_cover838 + +private theorem k17t8_cover839 : ∀ P ∈ pathPatterns 1 5 [1, 1, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover840 : ∀ P ∈ pathPatterns 0 4 [1, 1, 1, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p433, Certificates.k17t8p433_check⟩ + +private theorem k17t8_cover841 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p434, Certificates.k17t8p434_check⟩ + +private theorem k17t8_cover842 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p435, Certificates.k17t8p435_check⟩ + +private theorem k17t8_cover843 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p436, Certificates.k17t8p436_check⟩ + +private theorem k17t8_cover844 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 5], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p437, Certificates.k17t8p437_check⟩ + +private theorem k17t8_cover845 : ∀ P ∈ pathPatterns 1 4 [1, 1, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover846 : ∀ P ∈ pathPatterns 0 3 [1, 1, 2, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p438, Certificates.k17t8p438_check⟩ + +private theorem k17t8_cover847 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p439, Certificates.k17t8p439_check⟩ + +private theorem k17t8_cover848 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p440, Certificates.k17t8p440_check⟩ + +private theorem k17t8_cover849 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 4], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p441, Certificates.k17t8p441_check⟩ + +private theorem k17t8_cover850 : ∀ P ∈ pathPatterns 1 3 [1, 1, 3], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover851 : ∀ P ∈ pathPatterns 0 2 [1, 1, 3, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p442, Certificates.k17t8p442_check⟩ + +private theorem k17t8_cover852 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p443, Certificates.k17t8p443_check⟩ + +private theorem k17t8_cover853 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 3], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p444, Certificates.k17t8p444_check⟩ + +private theorem k17t8_cover854 : ∀ P ∈ pathPatterns 1 2 [1, 1, 4], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover855 : ∀ P ∈ pathPatterns 0 1 [1, 1, 4, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p445, Certificates.k17t8p445_check⟩ + +private theorem k17t8_cover856 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p446, Certificates.k17t8p446_check⟩ + +private theorem k17t8_cover857 : ∀ P ∈ pathPatterns 1 1 [1, 1, 5], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover858 : ∀ P ∈ pathPatterns 0 0 [1, 1, 5, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p447, Certificates.k17t8p447_check⟩ + +private theorem k17t8_cover859 : ∀ P ∈ pathPatterns 1 0 [1, 1, 6], HasCheckedCertificate 17 8 ([[], [1], [1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover861 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 17 8 ([[], [1], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p448, Certificates.k17t8p448_check⟩ + +private theorem k17t8_cover862 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 17 8 ([[], [1], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p449, Certificates.k17t8p449_check⟩ + +private theorem k17t8_cover863 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 17 8 ([[], [1], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p450, Certificates.k17t8p450_check⟩ + +private theorem k17t8_cover864 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 17 8 ([[], [1], [1, 2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p451, Certificates.k17t8p451_check⟩ + +private theorem k17t8_cover860 : ∀ P ∈ pathPatterns 2 5 [1, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover861 + · exact by + intro _ + exact k17t8_cover862 + · exact by + intro _ + exact k17t8_cover863 + · exact by + intro _ + exact k17t8_cover864 + +private theorem k17t8_cover865 : ∀ P ∈ pathPatterns 1 4 [1, 2, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover866 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p452, Certificates.k17t8p452_check⟩ + +private theorem k17t8_cover867 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 3], HasCheckedCertificate 17 8 ([[], [1], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p453, Certificates.k17t8p453_check⟩ + +private theorem k17t8_cover868 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 4], HasCheckedCertificate 17 8 ([[], [1], [1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p454, Certificates.k17t8p454_check⟩ + +private theorem k17t8_cover869 : ∀ P ∈ pathPatterns 1 3 [1, 2, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover870 : ∀ P ∈ pathPatterns 0 2 [1, 2, 2, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p455, Certificates.k17t8p455_check⟩ + +private theorem k17t8_cover871 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p456, Certificates.k17t8p456_check⟩ + +private theorem k17t8_cover872 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 3], HasCheckedCertificate 17 8 ([[], [1], [1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p457, Certificates.k17t8p457_check⟩ + +private theorem k17t8_cover873 : ∀ P ∈ pathPatterns 1 2 [1, 2, 3], HasCheckedCertificate 17 8 ([[], [1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover874 : ∀ P ∈ pathPatterns 0 1 [1, 2, 3, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p458, Certificates.k17t8p458_check⟩ + +private theorem k17t8_cover875 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p459, Certificates.k17t8p459_check⟩ + +private theorem k17t8_cover876 : ∀ P ∈ pathPatterns 1 1 [1, 2, 4], HasCheckedCertificate 17 8 ([[], [1], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover877 : ∀ P ∈ pathPatterns 0 0 [1, 2, 4, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p460, Certificates.k17t8p460_check⟩ + +private theorem k17t8_cover878 : ∀ P ∈ pathPatterns 1 0 [1, 2, 5], HasCheckedCertificate 17 8 ([[], [1], [1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover880 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 17 8 ([[], [1], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p461, Certificates.k17t8p461_check⟩ + +private theorem k17t8_cover881 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[], [1], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p462, Certificates.k17t8p462_check⟩ + +private theorem k17t8_cover882 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[], [1], [1, 3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p463, Certificates.k17t8p463_check⟩ + +private theorem k17t8_cover879 : ∀ P ∈ pathPatterns 2 4 [1, 3], HasCheckedCertificate 17 8 ([[], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover880 + · exact by + intro _ + exact k17t8_cover881 + · exact by + intro _ + exact k17t8_cover882 + +private theorem k17t8_cover883 : ∀ P ∈ pathPatterns 1 3 [1, 3, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover884 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p464, Certificates.k17t8p464_check⟩ + +private theorem k17t8_cover885 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 3], HasCheckedCertificate 17 8 ([[], [1], [1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p465, Certificates.k17t8p465_check⟩ + +private theorem k17t8_cover886 : ∀ P ∈ pathPatterns 1 2 [1, 3, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover887 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p466, Certificates.k17t8p466_check⟩ + +private theorem k17t8_cover888 : ∀ P ∈ pathPatterns 1 1 [1, 3, 3], HasCheckedCertificate 17 8 ([[], [1], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover889 : ∀ P ∈ pathPatterns 0 0 [1, 3, 3, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p467, Certificates.k17t8p467_check⟩ + +private theorem k17t8_cover890 : ∀ P ∈ pathPatterns 1 0 [1, 3, 4], HasCheckedCertificate 17 8 ([[], [1], [1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover892 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[], [1], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p468, Certificates.k17t8p468_check⟩ + +private theorem k17t8_cover893 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [1], [1, 4], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p469, Certificates.k17t8p469_check⟩ + +private theorem k17t8_cover891 : ∀ P ∈ pathPatterns 2 3 [1, 4], HasCheckedCertificate 17 8 ([[], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover892 + · exact by + intro _ + exact k17t8_cover893 + +private theorem k17t8_cover894 : ∀ P ∈ pathPatterns 1 2 [1, 4, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover895 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p470, Certificates.k17t8p470_check⟩ + +private theorem k17t8_cover896 : ∀ P ∈ pathPatterns 1 1 [1, 4, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover897 : ∀ P ∈ pathPatterns 1 0 [1, 4, 3], HasCheckedCertificate 17 8 ([[], [1], [1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover899 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [1], [1, 5], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p471, Certificates.k17t8p471_check⟩ + +private theorem k17t8_cover898 : ∀ P ∈ pathPatterns 2 2 [1, 5], HasCheckedCertificate 17 8 ([[], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover899 + +private theorem k17t8_cover900 : ∀ P ∈ pathPatterns 1 1 [1, 5, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover901 : ∀ P ∈ pathPatterns 1 0 [1, 5, 2], HasCheckedCertificate 17 8 ([[], [1], [1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover902 : ∀ P ∈ pathPatterns 2 1 [1, 6], HasCheckedCertificate 17 8 ([[], [1], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover903 : ∀ P ∈ pathPatterns 1 0 [1, 6, 1], HasCheckedCertificate 17 8 ([[], [1], [1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover904 : ∀ P ∈ pathPatterns 2 0 [1, 7], HasCheckedCertificate 17 8 ([[], [1], [1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq811 : amountSequenceForall 3 7 (fun tail => + (LexLE [1] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (8 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 17 8 ([[], [1]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover812 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover833 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover839 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover840 + · exact by + intro _ + exact k17t8_cover841 + · exact by + intro _ + exact k17t8_cover842 + · exact by + intro _ + exact k17t8_cover843 + · exact by + intro _ + exact k17t8_cover844 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover845 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover846 + · exact by + intro _ + exact k17t8_cover847 + · exact by + intro _ + exact k17t8_cover848 + · exact by + intro _ + exact k17t8_cover849 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover850 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover851 + · exact by + intro _ + exact k17t8_cover852 + · exact by + intro _ + exact k17t8_cover853 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover854 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover855 + · exact by + intro _ + exact k17t8_cover856 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover857 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover858 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover859 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover860 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover865 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k17t8_cover866 + · exact by + intro _ + exact k17t8_cover867 + · exact by + intro _ + exact k17t8_cover868 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover869 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover870 + · exact by + intro _ + exact k17t8_cover871 + · exact by + intro _ + exact k17t8_cover872 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover873 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover874 + · exact by + intro _ + exact k17t8_cover875 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover876 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover877 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover878 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover879 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover883 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + intro _ + exact k17t8_cover884 + · exact by + intro _ + exact k17t8_cover885 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover886 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · exact by + intro _ + exact k17t8_cover887 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover888 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover889 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover890 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover891 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover894 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · exact by + intro _ + exact k17t8_cover895 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover896 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 4, 2, 1] ∧ LexLE [1, 4, 2, 1] [1, 2, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover897 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover898 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover900 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 5, 1, 1] ∧ LexLE [1, 5, 1, 1] [1, 1, 5, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover901 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover902 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover903 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover904 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover907 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 17 8 ([[], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover908 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 17 8 ([[], [1], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p472, Certificates.k17t8p472_check⟩ + +private theorem k17t8_cover909 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 17 8 ([[], [1], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p473, Certificates.k17t8p473_check⟩ + +private theorem k17t8_cover910 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 17 8 ([[], [1], [2], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p474, Certificates.k17t8p474_check⟩ + +private theorem k17t8_cover911 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 17 8 ([[], [1], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover912 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 17 8 ([[], [1], [2], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p475, Certificates.k17t8p475_check⟩ + +private theorem k17t8_cover913 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 17 8 ([[], [1], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover914 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 17 8 ([[], [1], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover915 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 17 8 ([[], [1], [2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover906 : ∀ P ∈ pathPatterns 3 6 [2], HasCheckedCertificate 17 8 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover907 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover908 + · exact by + intro _ + exact k17t8_cover909 + · exact by + intro _ + exact k17t8_cover910 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover911 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k17t8_cover912 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover913 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover914 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover915 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover916 : ∀ P ∈ pathPatterns 0 2 [2, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [1], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p476, Certificates.k17t8p476_check⟩ + +private theorem k17t8_cover917 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [1], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p477, Certificates.k17t8p477_check⟩ + +private theorem k17t8_cover918 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [1], [2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p478, Certificates.k17t8p478_check⟩ + +private theorem k17t8_cover919 : ∀ P ∈ pathPatterns 1 3 [2, 1, 2], HasCheckedCertificate 17 8 ([[], [1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover920 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [1], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p479, Certificates.k17t8p479_check⟩ + +private theorem k17t8_cover921 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [1], [2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p480, Certificates.k17t8p480_check⟩ + +private theorem k17t8_cover922 : ∀ P ∈ pathPatterns 1 2 [2, 1, 3], HasCheckedCertificate 17 8 ([[], [1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover923 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3, 2], HasCheckedCertificate 17 8 ([[], [1], [2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p481, Certificates.k17t8p481_check⟩ + +private theorem k17t8_cover924 : ∀ P ∈ pathPatterns 1 1 [2, 1, 4], HasCheckedCertificate 17 8 ([[], [1], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover925 : ∀ P ∈ pathPatterns 1 0 [2, 1, 5], HasCheckedCertificate 17 8 ([[], [1], [2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover927 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[], [1], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p482, Certificates.k17t8p482_check⟩ + +private theorem k17t8_cover928 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[], [1], [2, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p483, Certificates.k17t8p483_check⟩ + +private theorem k17t8_cover926 : ∀ P ∈ pathPatterns 2 4 [2, 2], HasCheckedCertificate 17 8 ([[], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover927 + · exact by + intro _ + exact k17t8_cover928 + +private theorem k17t8_cover929 : ∀ P ∈ pathPatterns 0 0 [2, 2, 1, 3], HasCheckedCertificate 17 8 ([[], [1], [2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p484, Certificates.k17t8p484_check⟩ + +private theorem k17t8_cover930 : ∀ P ∈ pathPatterns 1 2 [2, 2, 2], HasCheckedCertificate 17 8 ([[], [1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover931 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2, 2], HasCheckedCertificate 17 8 ([[], [1], [2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p485, Certificates.k17t8p485_check⟩ + +private theorem k17t8_cover932 : ∀ P ∈ pathPatterns 1 1 [2, 2, 3], HasCheckedCertificate 17 8 ([[], [1], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover933 : ∀ P ∈ pathPatterns 1 0 [2, 2, 4], HasCheckedCertificate 17 8 ([[], [1], [2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover935 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [1], [2, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p486, Certificates.k17t8p486_check⟩ + +private theorem k17t8_cover934 : ∀ P ∈ pathPatterns 2 3 [2, 3], HasCheckedCertificate 17 8 ([[], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover935 + +private theorem k17t8_cover936 : ∀ P ∈ pathPatterns 1 1 [2, 3, 2], HasCheckedCertificate 17 8 ([[], [1], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover937 : ∀ P ∈ pathPatterns 1 0 [2, 3, 3], HasCheckedCertificate 17 8 ([[], [1], [2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover938 : ∀ P ∈ pathPatterns 2 2 [2, 4], HasCheckedCertificate 17 8 ([[], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover939 : ∀ P ∈ pathPatterns 1 0 [2, 4, 2], HasCheckedCertificate 17 8 ([[], [1], [2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover940 : ∀ P ∈ pathPatterns 2 1 [2, 5], HasCheckedCertificate 17 8 ([[], [1], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover941 : ∀ P ∈ pathPatterns 2 0 [2, 6], HasCheckedCertificate 17 8 ([[], [1], [2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq905 : amountSequenceForall 3 6 (fun tail => + (LexLE [1] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([2] ++ tail).length) (8 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 17 8 ([[], [1]] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover906 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover916 + · exact by + intro _ + exact k17t8_cover917 + · exact by + intro _ + exact k17t8_cover918 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover919 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover920 + · exact by + intro _ + exact k17t8_cover921 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover922 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover923 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover924 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 4, 1] ∧ LexLE [2, 1, 4, 1] [1, 4, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover925 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover926 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · exact by + intro _ + exact k17t8_cover929 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover930 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · exact by + intro _ + exact k17t8_cover931 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover932 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 3, 1] ∧ LexLE [2, 2, 3, 1] [1, 3, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover933 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover934 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1, 2] ∧ LexLE [2, 3, 1, 2] [2, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover936 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 2, 1] ∧ LexLE [2, 3, 2, 1] [1, 2, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover937 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover938 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 4, 1, 1] ∧ LexLE [2, 4, 1, 1] [1, 1, 4, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover939 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover940 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover941 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover944 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 17 8 ([[], [1], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover945 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 17 8 ([[], [1], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover946 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 17 8 ([[], [1], [3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover943 : ∀ P ∈ pathPatterns 3 5 [3], HasCheckedCertificate 17 8 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover944 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover945 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover946 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover947 : ∀ P ∈ pathPatterns 0 0 [3, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [1], [3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p487, Certificates.k17t8p487_check⟩ + +private theorem k17t8_cover948 : ∀ P ∈ pathPatterns 1 1 [3, 1, 3], HasCheckedCertificate 17 8 ([[], [1], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover949 : ∀ P ∈ pathPatterns 1 0 [3, 1, 4], HasCheckedCertificate 17 8 ([[], [1], [3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover950 : ∀ P ∈ pathPatterns 1 0 [3, 2, 3], HasCheckedCertificate 17 8 ([[], [1], [3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover951 : ∀ P ∈ pathPatterns 2 2 [3, 3], HasCheckedCertificate 17 8 ([[], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover952 : ∀ P ∈ pathPatterns 2 1 [3, 4], HasCheckedCertificate 17 8 ([[], [1], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover953 : ∀ P ∈ pathPatterns 2 0 [3, 5], HasCheckedCertificate 17 8 ([[], [1], [3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq942 : amountSequenceForall 3 5 (fun tail => + (LexLE [1] ([3] ++ tail) ∧ LexLE ([3] ++ tail) ([3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([3] ++ tail).length) (8 - ([3] ++ tail).sum) ([3] ++ tail), + HasCheckedCertificate 17 8 ([[], [1]] ++ (([3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover943 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · exact by + intro _ + exact k17t8_cover947 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2, 2] ∧ LexLE [3, 1, 2, 2] [2, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover948 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 3, 1] ∧ LexLE [3, 1, 3, 1] [1, 3, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover949 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1, 2] ∧ LexLE [3, 2, 1, 2] [2, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 2, 1] ∧ LexLE [3, 2, 2, 1] [1, 2, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover950 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover951 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 3, 1, 1] ∧ LexLE [3, 3, 1, 1] [1, 1, 3, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover952 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover953 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover955 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 17 8 ([[], [1], [4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover954 : ∀ P ∈ pathPatterns 3 4 [4], HasCheckedCertificate 17 8 ([[], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover955 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover956 : ∀ P ∈ pathPatterns 2 0 [4, 4], HasCheckedCertificate 17 8 ([[], [1], [4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover957 : ∀ P ∈ pathPatterns 3 3 [5], HasCheckedCertificate 17 8 ([[], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover958 : ∀ P ∈ pathPatterns 3 2 [6], HasCheckedCertificate 17 8 ([[], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover959 : ∀ P ∈ pathPatterns 3 1 [7], HasCheckedCertificate 17 8 ([[], [1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover960 : ∀ P ∈ pathPatterns 3 0 [8], HasCheckedCertificate 17 8 ([[], [1], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq810 : amountSequenceForall 4 8 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (8 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k17t8_seq811 + + · exact k17t8_seq905 + + · exact k17t8_seq942 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover954 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1, 2] ∧ LexLE [4, 1, 1, 2] [2, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 2, 1] ∧ LexLE [4, 1, 2, 1] [1, 2, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2, 1, 1] ∧ LexLE [4, 2, 1, 1] [1, 1, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover956 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover957 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1, 1, 1] ∧ LexLE [5, 1, 1, 1] [1, 1, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover958 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover959 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover960 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover809 : ∀ P ∈ pathPatterns 5 8 [1], HasCheckedCertificate 17 8 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq810 + + +private theorem k17t8_cover964 : ∀ P ∈ pathPatterns 1 5 [1, 1], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover965 : ∀ P ∈ pathPatterns 0 4 [1, 1, 1], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p488, Certificates.k17t8p488_check⟩ + +private theorem k17t8_cover966 : ∀ P ∈ pathPatterns 0 3 [1, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p489, Certificates.k17t8p489_check⟩ + +private theorem k17t8_cover967 : ∀ P ∈ pathPatterns 0 2 [1, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p490, Certificates.k17t8p490_check⟩ + +private theorem k17t8_cover968 : ∀ P ∈ pathPatterns 0 1 [1, 1, 4], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p491, Certificates.k17t8p491_check⟩ + +private theorem k17t8_cover969 : ∀ P ∈ pathPatterns 0 0 [1, 1, 5], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p492, Certificates.k17t8p492_check⟩ + +private theorem k17t8_cover970 : ∀ P ∈ pathPatterns 1 4 [1, 2], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover971 : ∀ P ∈ pathPatterns 0 3 [1, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p493, Certificates.k17t8p493_check⟩ + +private theorem k17t8_cover972 : ∀ P ∈ pathPatterns 0 2 [1, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p494, Certificates.k17t8p494_check⟩ + +private theorem k17t8_cover973 : ∀ P ∈ pathPatterns 0 1 [1, 2, 3], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p495, Certificates.k17t8p495_check⟩ + +private theorem k17t8_cover974 : ∀ P ∈ pathPatterns 0 0 [1, 2, 4], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p496, Certificates.k17t8p496_check⟩ + +private theorem k17t8_cover975 : ∀ P ∈ pathPatterns 1 3 [1, 3], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover976 : ∀ P ∈ pathPatterns 0 2 [1, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p497, Certificates.k17t8p497_check⟩ + +private theorem k17t8_cover977 : ∀ P ∈ pathPatterns 0 1 [1, 3, 2], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p498, Certificates.k17t8p498_check⟩ + +private theorem k17t8_cover978 : ∀ P ∈ pathPatterns 0 0 [1, 3, 3], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p499, Certificates.k17t8p499_check⟩ + +private theorem k17t8_cover979 : ∀ P ∈ pathPatterns 1 2 [1, 4], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover980 : ∀ P ∈ pathPatterns 0 1 [1, 4, 1], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p500, Certificates.k17t8p500_check⟩ + +private theorem k17t8_cover981 : ∀ P ∈ pathPatterns 0 0 [1, 4, 2], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p501, Certificates.k17t8p501_check⟩ + +private theorem k17t8_cover982 : ∀ P ∈ pathPatterns 1 1 [1, 5], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover983 : ∀ P ∈ pathPatterns 0 0 [1, 5, 1], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p502, Certificates.k17t8p502_check⟩ + +private theorem k17t8_cover984 : ∀ P ∈ pathPatterns 1 0 [1, 6], HasCheckedCertificate 17 8 ([[], [1, 1], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover986 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 17 8 ([[], [1, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p503, Certificates.k17t8p503_check⟩ + +private theorem k17t8_cover987 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 17 8 ([[], [1, 1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p504, Certificates.k17t8p504_check⟩ + +private theorem k17t8_cover988 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 17 8 ([[], [1, 1], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p505, Certificates.k17t8p505_check⟩ + +private theorem k17t8_cover989 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 17 8 ([[], [1, 1], [2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p506, Certificates.k17t8p506_check⟩ + +private theorem k17t8_cover985 : ∀ P ∈ pathPatterns 2 5 [2], HasCheckedCertificate 17 8 ([[], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover986 + · exact by + intro _ + exact k17t8_cover987 + · exact by + intro _ + exact k17t8_cover988 + · exact by + intro _ + exact k17t8_cover989 + +private theorem k17t8_cover990 : ∀ P ∈ pathPatterns 0 2 [2, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p507, Certificates.k17t8p507_check⟩ + +private theorem k17t8_cover991 : ∀ P ∈ pathPatterns 0 1 [2, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p508, Certificates.k17t8p508_check⟩ + +private theorem k17t8_cover992 : ∀ P ∈ pathPatterns 0 0 [2, 1, 4], HasCheckedCertificate 17 8 ([[], [1, 1], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p509, Certificates.k17t8p509_check⟩ + +private theorem k17t8_cover993 : ∀ P ∈ pathPatterns 1 3 [2, 2], HasCheckedCertificate 17 8 ([[], [1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover994 : ∀ P ∈ pathPatterns 0 1 [2, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p510, Certificates.k17t8p510_check⟩ + +private theorem k17t8_cover995 : ∀ P ∈ pathPatterns 0 0 [2, 2, 3], HasCheckedCertificate 17 8 ([[], [1, 1], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p511, Certificates.k17t8p511_check⟩ + +private theorem k17t8_cover996 : ∀ P ∈ pathPatterns 1 2 [2, 3], HasCheckedCertificate 17 8 ([[], [1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover997 : ∀ P ∈ pathPatterns 0 0 [2, 3, 2], HasCheckedCertificate 17 8 ([[], [1, 1], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p512, Certificates.k17t8p512_check⟩ + +private theorem k17t8_cover998 : ∀ P ∈ pathPatterns 1 1 [2, 4], HasCheckedCertificate 17 8 ([[], [1, 1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover999 : ∀ P ∈ pathPatterns 1 0 [2, 5], HasCheckedCertificate 17 8 ([[], [1, 1], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1001 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[], [1, 1], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p513, Certificates.k17t8p513_check⟩ + +private theorem k17t8_cover1002 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[], [1, 1], [3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p514, Certificates.k17t8p514_check⟩ + +private theorem k17t8_cover1000 : ∀ P ∈ pathPatterns 2 4 [3], HasCheckedCertificate 17 8 ([[], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover1001 + · exact by + intro _ + exact k17t8_cover1002 + +private theorem k17t8_cover1003 : ∀ P ∈ pathPatterns 0 0 [3, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 1], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p515, Certificates.k17t8p515_check⟩ + +private theorem k17t8_cover1004 : ∀ P ∈ pathPatterns 1 1 [3, 3], HasCheckedCertificate 17 8 ([[], [1, 1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1005 : ∀ P ∈ pathPatterns 1 0 [3, 4], HasCheckedCertificate 17 8 ([[], [1, 1], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1006 : ∀ P ∈ pathPatterns 2 3 [4], HasCheckedCertificate 17 8 ([[], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + +private theorem k17t8_cover1007 : ∀ P ∈ pathPatterns 2 2 [5], HasCheckedCertificate 17 8 ([[], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover1008 : ∀ P ∈ pathPatterns 2 1 [6], HasCheckedCertificate 17 8 ([[], [1, 1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1009 : ∀ P ∈ pathPatterns 2 0 [7], HasCheckedCertificate 17 8 ([[], [1, 1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq963 : amountSequenceForall 3 7 (fun tail => + (LexLE [1, 1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [1, 1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover964 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover965 + · exact by + intro _ + exact k17t8_cover966 + · exact by + intro _ + exact k17t8_cover967 + · exact by + intro _ + exact k17t8_cover968 + · exact by + intro _ + exact k17t8_cover969 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover970 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover971 + · exact by + intro _ + exact k17t8_cover972 + · exact by + intro _ + exact k17t8_cover973 + · exact by + intro _ + exact k17t8_cover974 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover975 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover976 + · exact by + intro _ + exact k17t8_cover977 + · exact by + intro _ + exact k17t8_cover978 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover979 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover980 + · exact by + intro _ + exact k17t8_cover981 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover982 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover983 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover984 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover985 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover990 + · exact by + intro _ + exact k17t8_cover991 + · exact by + intro _ + exact k17t8_cover992 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover993 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k17t8_cover994 + · exact by + intro _ + exact k17t8_cover995 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover996 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + intro _ + exact k17t8_cover997 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover998 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover999 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1000 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + intro _ + exact k17t8_cover1003 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1004 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1005 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1006 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1007 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1008 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1009 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover962 : ∀ P ∈ pathPatterns 4 7 [1, 1], HasCheckedCertificate 17 8 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq963 + + +private theorem k17t8_cover1012 : ∀ P ∈ pathPatterns 0 3 [1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p516, Certificates.k17t8p516_check⟩ + +private theorem k17t8_cover1013 : ∀ P ∈ pathPatterns 0 2 [1, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p517, Certificates.k17t8p517_check⟩ + +private theorem k17t8_cover1014 : ∀ P ∈ pathPatterns 0 1 [1, 4], HasCheckedCertificate 17 8 ([[], [1, 1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p518, Certificates.k17t8p518_check⟩ + +private theorem k17t8_cover1015 : ∀ P ∈ pathPatterns 0 0 [1, 5], HasCheckedCertificate 17 8 ([[], [1, 1, 1], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p519, Certificates.k17t8p519_check⟩ + +private theorem k17t8_cover1016 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 17 8 ([[], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1017 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p520, Certificates.k17t8p520_check⟩ + +private theorem k17t8_cover1018 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p521, Certificates.k17t8p521_check⟩ + +private theorem k17t8_cover1019 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 17 8 ([[], [1, 1, 1], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p522, Certificates.k17t8p522_check⟩ + +private theorem k17t8_cover1020 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 17 8 ([[], [1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1021 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 1], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p523, Certificates.k17t8p523_check⟩ + +private theorem k17t8_cover1022 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 17 8 ([[], [1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1023 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 17 8 ([[], [1, 1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1024 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 17 8 ([[], [1, 1, 1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1011 : ∀ P ∈ pathPatterns 3 6 [1, 1, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k17t8_cover1012 + · exact by + intro _ + exact k17t8_cover1013 + · exact by + intro _ + exact k17t8_cover1014 + · exact by + intro _ + exact k17t8_cover1015 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1016 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1017 + · exact by + intro _ + exact k17t8_cover1018 + · exact by + intro _ + exact k17t8_cover1019 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1020 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k17t8_cover1021 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1022 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1023 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1024 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1026 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p524, Certificates.k17t8p524_check⟩ + +private theorem k17t8_cover1027 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p525, Certificates.k17t8p525_check⟩ + +private theorem k17t8_cover1028 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p526, Certificates.k17t8p526_check⟩ + +private theorem k17t8_cover1029 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p527, Certificates.k17t8p527_check⟩ + +private theorem k17t8_cover1025 : ∀ P ∈ pathPatterns 2 5 [1, 1, 1, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1026 + · exact by + intro _ + exact k17t8_cover1027 + · exact by + intro _ + exact k17t8_cover1028 + · exact by + intro _ + exact k17t8_cover1029 + +private theorem k17t8_cover1030 : ∀ P ∈ pathPatterns 1 4 [1, 1, 1, 1, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1031 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 1, 1, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p528, Certificates.k17t8p528_check⟩ + +private theorem k17t8_cover1032 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p529, Certificates.k17t8p529_check⟩ + +private theorem k17t8_cover1033 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p530, Certificates.k17t8p530_check⟩ + +private theorem k17t8_cover1034 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p531, Certificates.k17t8p531_check⟩ + +private theorem k17t8_cover1035 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1036 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p532, Certificates.k17t8p532_check⟩ + +private theorem k17t8_cover1037 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p533, Certificates.k17t8p533_check⟩ + +private theorem k17t8_cover1038 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p534, Certificates.k17t8p534_check⟩ + +private theorem k17t8_cover1039 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1040 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p535, Certificates.k17t8p535_check⟩ + +private theorem k17t8_cover1041 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 3, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p536, Certificates.k17t8p536_check⟩ + +private theorem k17t8_cover1042 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1043 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 4, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p537, Certificates.k17t8p537_check⟩ + +private theorem k17t8_cover1044 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 5], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1046 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p538, Certificates.k17t8p538_check⟩ + +private theorem k17t8_cover1047 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p539, Certificates.k17t8p539_check⟩ + +private theorem k17t8_cover1048 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p540, Certificates.k17t8p540_check⟩ + +private theorem k17t8_cover1045 : ∀ P ∈ pathPatterns 2 4 [1, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1046 + · exact by + intro _ + exact k17t8_cover1047 + · exact by + intro _ + exact k17t8_cover1048 + +private theorem k17t8_cover1049 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1050 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 2, 1, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p541, Certificates.k17t8p541_check⟩ + +private theorem k17t8_cover1051 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p542, Certificates.k17t8p542_check⟩ + +private theorem k17t8_cover1052 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p543, Certificates.k17t8p543_check⟩ + +private theorem k17t8_cover1053 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1054 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p544, Certificates.k17t8p544_check⟩ + +private theorem k17t8_cover1055 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p545, Certificates.k17t8p545_check⟩ + +private theorem k17t8_cover1056 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1057 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p546, Certificates.k17t8p546_check⟩ + +private theorem k17t8_cover1058 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2, 4], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1060 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p547, Certificates.k17t8p547_check⟩ + +private theorem k17t8_cover1061 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p548, Certificates.k17t8p548_check⟩ + +private theorem k17t8_cover1059 : ∀ P ∈ pathPatterns 2 3 [1, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1060 + · exact by + intro _ + exact k17t8_cover1061 + +private theorem k17t8_cover1062 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1063 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 3, 1, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p549, Certificates.k17t8p549_check⟩ + +private theorem k17t8_cover1064 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p550, Certificates.k17t8p550_check⟩ + +private theorem k17t8_cover1065 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 3, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1066 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 3, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p551, Certificates.k17t8p551_check⟩ + +private theorem k17t8_cover1067 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 3, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1069 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p552, Certificates.k17t8p552_check⟩ + +private theorem k17t8_cover1068 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1069 + +private theorem k17t8_cover1070 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 4, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1071 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 4, 1, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 4, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p553, Certificates.k17t8p553_check⟩ + +private theorem k17t8_cover1072 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 4, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1073 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 5], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1074 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 5, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1075 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 6], HasCheckedCertificate 17 8 ([[], [1, 1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1010 : amountSequenceForall 3 6 (fun tail => + (LexLE [] ([1, 1, 1] ++ tail) ∧ LexLE ([1, 1, 1] ++ tail) ([1, 1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1, 1, 1] ++ tail).length) (9 - ([1, 1, 1] ++ tail).sum) ([1, 1, 1] ++ tail), + HasCheckedCertificate 17 8 ([[]] ++ (([1, 1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1011 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1025 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1030 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1031 + · exact by + intro _ + exact k17t8_cover1032 + · exact by + intro _ + exact k17t8_cover1033 + · exact by + intro _ + exact k17t8_cover1034 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1035 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1036 + · exact by + intro _ + exact k17t8_cover1037 + · exact by + intro _ + exact k17t8_cover1038 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1039 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1040 + · exact by + intro _ + exact k17t8_cover1041 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1042 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1043 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1044 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1045 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1049 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1050 + · exact by + intro _ + exact k17t8_cover1051 + · exact by + intro _ + exact k17t8_cover1052 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1053 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1054 + · exact by + intro _ + exact k17t8_cover1055 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1056 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1057 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1058 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1059 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1062 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1063 + · exact by + intro _ + exact k17t8_cover1064 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1065 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1066 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1067 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1068 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1070 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1071 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1072 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1073 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1074 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1075 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1078 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p554, Certificates.k17t8p554_check⟩ + +private theorem k17t8_cover1079 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p555, Certificates.k17t8p555_check⟩ + +private theorem k17t8_cover1080 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 17 8 ([[], [1, 1, 2], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p556, Certificates.k17t8p556_check⟩ + +private theorem k17t8_cover1081 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 17 8 ([[], [1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1082 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p557, Certificates.k17t8p557_check⟩ + +private theorem k17t8_cover1083 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p558, Certificates.k17t8p558_check⟩ + +private theorem k17t8_cover1084 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 17 8 ([[], [1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1085 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 17 8 ([[], [1, 1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1086 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 17 8 ([[], [1, 1, 2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1077 : ∀ P ∈ pathPatterns 3 5 [1, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k17t8_cover1078 + · exact by + intro _ + exact k17t8_cover1079 + · exact by + intro _ + exact k17t8_cover1080 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1081 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1082 + · exact by + intro _ + exact k17t8_cover1083 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1084 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1085 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1086 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1088 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p559, Certificates.k17t8p559_check⟩ + +private theorem k17t8_cover1089 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p560, Certificates.k17t8p560_check⟩ + +private theorem k17t8_cover1090 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p561, Certificates.k17t8p561_check⟩ + +private theorem k17t8_cover1087 : ∀ P ∈ pathPatterns 2 4 [1, 1, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1088 + · exact by + intro _ + exact k17t8_cover1089 + · exact by + intro _ + exact k17t8_cover1090 + +private theorem k17t8_cover1091 : ∀ P ∈ pathPatterns 1 3 [1, 1, 2, 1, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1092 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p562, Certificates.k17t8p562_check⟩ + +private theorem k17t8_cover1093 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p563, Certificates.k17t8p563_check⟩ + +private theorem k17t8_cover1094 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1095 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p564, Certificates.k17t8p564_check⟩ + +private theorem k17t8_cover1096 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p565, Certificates.k17t8p565_check⟩ + +private theorem k17t8_cover1097 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1098 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p566, Certificates.k17t8p566_check⟩ + +private theorem k17t8_cover1099 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1, 4], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1101 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p567, Certificates.k17t8p567_check⟩ + +private theorem k17t8_cover1102 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p568, Certificates.k17t8p568_check⟩ + +private theorem k17t8_cover1100 : ∀ P ∈ pathPatterns 2 3 [1, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1101 + · exact by + intro _ + exact k17t8_cover1102 + +private theorem k17t8_cover1103 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1104 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 2, 1, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p569, Certificates.k17t8p569_check⟩ + +private theorem k17t8_cover1105 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p570, Certificates.k17t8p570_check⟩ + +private theorem k17t8_cover1106 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1107 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p571, Certificates.k17t8p571_check⟩ + +private theorem k17t8_cover1108 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 2, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1110 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p572, Certificates.k17t8p572_check⟩ + +private theorem k17t8_cover1109 : ∀ P ∈ pathPatterns 2 2 [1, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1110 + +private theorem k17t8_cover1111 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1112 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 3, 1, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p573, Certificates.k17t8p573_check⟩ + +private theorem k17t8_cover1113 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 3, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1114 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2, 4], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1115 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 4, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1116 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 5], HasCheckedCertificate 17 8 ([[], [1, 1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1076 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([1, 1, 2] ++ tail) ∧ LexLE ([1, 1, 2] ++ tail) ([1, 1, 2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1, 1, 2] ++ tail).length) (9 - ([1, 1, 2] ++ tail).sum) ([1, 1, 2] ++ tail), + HasCheckedCertificate 17 8 ([[]] ++ (([1, 1, 2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1077 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1087 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1091 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 2, 1, 1, 1] ∧ LexLE [1, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 1])) h) + · exact by + intro _ + exact k17t8_cover1092 + · exact by + intro _ + exact k17t8_cover1093 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1094 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1095 + · exact by + intro _ + exact k17t8_cover1096 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1097 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1098 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1099 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1100 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1103 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1104 + · exact by + intro _ + exact k17t8_cover1105 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1106 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1107 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1108 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1109 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1111 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1112 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1113 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1114 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1115 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1116 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1118 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 3], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p574, Certificates.k17t8p574_check⟩ + +private theorem k17t8_cover1119 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 3], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p575, Certificates.k17t8p575_check⟩ + +private theorem k17t8_cover1120 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 17 8 ([[], [1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1121 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 3], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p576, Certificates.k17t8p576_check⟩ + +private theorem k17t8_cover1122 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 17 8 ([[], [1, 1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1123 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 17 8 ([[], [1, 1, 3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1117 : ∀ P ∈ pathPatterns 3 4 [1, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k17t8_cover1118 + · exact by + intro _ + exact k17t8_cover1119 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1120 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1121 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1122 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1123 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1125 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[], [1, 1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p577, Certificates.k17t8p577_check⟩ + +private theorem k17t8_cover1126 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [1, 1, 3, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p578, Certificates.k17t8p578_check⟩ + +private theorem k17t8_cover1124 : ∀ P ∈ pathPatterns 2 3 [1, 1, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1125 + · exact by + intro _ + exact k17t8_cover1126 + +private theorem k17t8_cover1127 : ∀ P ∈ pathPatterns 1 2 [1, 1, 3, 1, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1128 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 3, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p579, Certificates.k17t8p579_check⟩ + +private theorem k17t8_cover1129 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1130 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 3, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p580, Certificates.k17t8p580_check⟩ + +private theorem k17t8_cover1131 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1133 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [1, 1, 3, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p581, Certificates.k17t8p581_check⟩ + +private theorem k17t8_cover1132 : ∀ P ∈ pathPatterns 2 2 [1, 1, 3, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1133 + +private theorem k17t8_cover1134 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 3, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1135 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1136 : ∀ P ∈ pathPatterns 2 1 [1, 1, 3, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1137 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1138 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3, 4], HasCheckedCertificate 17 8 ([[], [1, 1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1140 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 4], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p582, Certificates.k17t8p582_check⟩ + +private theorem k17t8_cover1141 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 17 8 ([[], [1, 1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1142 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[], [1, 1, 4], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1139 : ∀ P ∈ pathPatterns 3 3 [1, 1, 4], HasCheckedCertificate 17 8 ([[], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k17t8_cover1140 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1141 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1142 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1144 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [1, 1, 4, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p583, Certificates.k17t8p583_check⟩ + +private theorem k17t8_cover1143 : ∀ P ∈ pathPatterns 2 2 [1, 1, 4, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1144 + +private theorem k17t8_cover1145 : ∀ P ∈ pathPatterns 1 1 [1, 1, 4, 1, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 4, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1146 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1147 : ∀ P ∈ pathPatterns 2 1 [1, 1, 4, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1148 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 4, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1149 : ∀ P ∈ pathPatterns 2 0 [1, 1, 4, 3], HasCheckedCertificate 17 8 ([[], [1, 1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1151 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[], [1, 1, 5], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1150 : ∀ P ∈ pathPatterns 3 2 [1, 1, 5], HasCheckedCertificate 17 8 ([[], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1151 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1152 : ∀ P ∈ pathPatterns 2 1 [1, 1, 5, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1153 : ∀ P ∈ pathPatterns 1 0 [1, 1, 5, 1, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 5, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1154 : ∀ P ∈ pathPatterns 2 0 [1, 1, 5, 2], HasCheckedCertificate 17 8 ([[], [1, 1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1155 : ∀ P ∈ pathPatterns 3 1 [1, 1, 6], HasCheckedCertificate 17 8 ([[], [1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1156 : ∀ P ∈ pathPatterns 2 0 [1, 1, 6, 1], HasCheckedCertificate 17 8 ([[], [1, 1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1157 : ∀ P ∈ pathPatterns 3 0 [1, 1, 7], HasCheckedCertificate 17 8 ([[], [1, 1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq961 : amountSequenceForall 4 7 (fun tail => + (LexLE [] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1, 1] ++ tail).length) (9 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 17 8 ([[]] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover962 + · intro q + fin_cases q + · exact k17t8_seq1010 + + · exact k17t8_seq1076 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1117 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1124 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1127 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 3, 1, 1, 1] ∧ LexLE [1, 1, 3, 1, 1, 1] [1, 1, 1, 3, 1, 1])) h) + · exact by + intro _ + exact k17t8_cover1128 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1129 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1130 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1131 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1132 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1134 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 3, 2, 1, 1] ∧ LexLE [1, 1, 3, 2, 1, 1] [1, 1, 2, 3, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1135 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1136 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1137 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1138 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1139 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1143 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1145 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 4, 1, 1, 1] ∧ LexLE [1, 1, 4, 1, 1, 1] [1, 1, 1, 4, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1146 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1147 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1148 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1149 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1150 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1152 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1153 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1154 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1155 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1156 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1157 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1161 : ∀ P ∈ pathPatterns 1 3 [1, 2], HasCheckedCertificate 17 8 ([[], [1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1162 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 2], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p584, Certificates.k17t8p584_check⟩ + +private theorem k17t8_cover1163 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 2], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p585, Certificates.k17t8p585_check⟩ + +private theorem k17t8_cover1164 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3], HasCheckedCertificate 17 8 ([[], [1, 2], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p586, Certificates.k17t8p586_check⟩ + +private theorem k17t8_cover1165 : ∀ P ∈ pathPatterns 1 2 [1, 3], HasCheckedCertificate 17 8 ([[], [1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1166 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 2], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p587, Certificates.k17t8p587_check⟩ + +private theorem k17t8_cover1167 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2], HasCheckedCertificate 17 8 ([[], [1, 2], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p588, Certificates.k17t8p588_check⟩ + +private theorem k17t8_cover1168 : ∀ P ∈ pathPatterns 1 1 [1, 4], HasCheckedCertificate 17 8 ([[], [1, 2], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1169 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1], HasCheckedCertificate 17 8 ([[], [1, 2], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p589, Certificates.k17t8p589_check⟩ + +private theorem k17t8_cover1170 : ∀ P ∈ pathPatterns 1 0 [1, 5], HasCheckedCertificate 17 8 ([[], [1, 2], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1172 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 17 8 ([[], [1, 2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p590, Certificates.k17t8p590_check⟩ + +private theorem k17t8_cover1173 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[], [1, 2], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p591, Certificates.k17t8p591_check⟩ + +private theorem k17t8_cover1174 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[], [1, 2], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p592, Certificates.k17t8p592_check⟩ + +private theorem k17t8_cover1171 : ∀ P ∈ pathPatterns 2 4 [2], HasCheckedCertificate 17 8 ([[], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1172 + · exact by + intro _ + exact k17t8_cover1173 + · exact by + intro _ + exact k17t8_cover1174 + +private theorem k17t8_cover1175 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p593, Certificates.k17t8p593_check⟩ + +private theorem k17t8_cover1176 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 2], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p594, Certificates.k17t8p594_check⟩ + +private theorem k17t8_cover1177 : ∀ P ∈ pathPatterns 1 2 [2, 2], HasCheckedCertificate 17 8 ([[], [1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1178 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 2], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p595, Certificates.k17t8p595_check⟩ + +private theorem k17t8_cover1179 : ∀ P ∈ pathPatterns 1 1 [2, 3], HasCheckedCertificate 17 8 ([[], [1, 2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1180 : ∀ P ∈ pathPatterns 1 0 [2, 4], HasCheckedCertificate 17 8 ([[], [1, 2], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1182 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [1, 2], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p596, Certificates.k17t8p596_check⟩ + +private theorem k17t8_cover1181 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 17 8 ([[], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover1182 + +private theorem k17t8_cover1183 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 17 8 ([[], [1, 2], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1184 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 17 8 ([[], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover1185 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 17 8 ([[], [1, 2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1186 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 17 8 ([[], [1, 2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1160 : amountSequenceForall 3 6 (fun tail => + (LexLE [1, 2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [1, 2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 4] ∧ LexLE [1, 1, 4] [4, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1161 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1162 + · exact by + intro _ + exact k17t8_cover1163 + · exact by + intro _ + exact k17t8_cover1164 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1165 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1166 + · exact by + intro _ + exact k17t8_cover1167 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1168 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1169 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1170 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1171 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1175 + · exact by + intro _ + exact k17t8_cover1176 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1177 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k17t8_cover1178 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1179 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1180 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1181 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1183 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1184 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1185 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1186 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1159 : ∀ P ∈ pathPatterns 4 6 [1, 2], HasCheckedCertificate 17 8 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq1160 + + +private theorem k17t8_cover1189 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 17 8 ([[], [1, 2, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p597, Certificates.k17t8p597_check⟩ + +private theorem k17t8_cover1190 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 17 8 ([[], [1, 2, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p598, Certificates.k17t8p598_check⟩ + +private theorem k17t8_cover1191 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 17 8 ([[], [1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1192 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p599, Certificates.k17t8p599_check⟩ + +private theorem k17t8_cover1193 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 17 8 ([[], [1, 2, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p600, Certificates.k17t8p600_check⟩ + +private theorem k17t8_cover1194 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 17 8 ([[], [1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1195 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 17 8 ([[], [1, 2, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1196 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 17 8 ([[], [1, 2, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1188 : ∀ P ∈ pathPatterns 3 5 [1, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro _ + exact k17t8_cover1189 + · exact by + intro _ + exact k17t8_cover1190 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1191 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1192 + · exact by + intro _ + exact k17t8_cover1193 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1194 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1195 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1196 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1197 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p601, Certificates.k17t8p601_check⟩ + +private theorem k17t8_cover1198 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p602, Certificates.k17t8p602_check⟩ + +private theorem k17t8_cover1199 : ∀ P ∈ pathPatterns 1 2 [1, 2, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1200 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 1, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p603, Certificates.k17t8p603_check⟩ + +private theorem k17t8_cover1201 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p604, Certificates.k17t8p604_check⟩ + +private theorem k17t8_cover1202 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1203 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p605, Certificates.k17t8p605_check⟩ + +private theorem k17t8_cover1204 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1206 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p606, Certificates.k17t8p606_check⟩ + +private theorem k17t8_cover1207 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p607, Certificates.k17t8p607_check⟩ + +private theorem k17t8_cover1205 : ∀ P ∈ pathPatterns 2 3 [1, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1206 + · exact by + intro _ + exact k17t8_cover1207 + +private theorem k17t8_cover1208 : ∀ P ∈ pathPatterns 1 2 [1, 2, 1, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1209 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p608, Certificates.k17t8p608_check⟩ + +private theorem k17t8_cover1210 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1211 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p609, Certificates.k17t8p609_check⟩ + +private theorem k17t8_cover1212 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1214 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p610, Certificates.k17t8p610_check⟩ + +private theorem k17t8_cover1213 : ∀ P ∈ pathPatterns 2 2 [1, 2, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1214 + +private theorem k17t8_cover1215 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1216 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 3, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1217 : ∀ P ∈ pathPatterns 2 1 [1, 2, 1, 4], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1218 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 4, 1], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1219 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 5], HasCheckedCertificate 17 8 ([[], [1, 2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1187 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([1, 2, 1] ++ tail) ∧ LexLE ([1, 2, 1] ++ tail) ([1, 2, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1, 2, 1] ++ tail).length) (9 - ([1, 2, 1] ++ tail).sum) ([1, 2, 1] ++ tail), + HasCheckedCertificate 17 8 ([[]] ++ (([1, 2, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1188 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 1])) h) + · exact by + intro _ + exact k17t8_cover1197 + · exact by + intro _ + exact k17t8_cover1198 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1199 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1200 + · exact by + intro _ + exact k17t8_cover1201 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1202 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1203 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1204 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1205 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1208 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 2, 1, 1] ∧ LexLE [1, 2, 1, 2, 1, 1] [1, 1, 2, 1, 2, 1])) h) + · exact by + intro _ + exact k17t8_cover1209 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1210 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1211 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1212 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1213 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1215 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 3, 1, 1] ∧ LexLE [1, 2, 1, 3, 1, 1] [1, 1, 3, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1216 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1217 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1218 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1219 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1221 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 17 8 ([[], [1, 2, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p611, Certificates.k17t8p611_check⟩ + +private theorem k17t8_cover1222 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 17 8 ([[], [1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1223 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p612, Certificates.k17t8p612_check⟩ + +private theorem k17t8_cover1224 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 17 8 ([[], [1, 2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1225 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 17 8 ([[], [1, 2, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1220 : ∀ P ∈ pathPatterns 3 4 [1, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro _ + exact k17t8_cover1221 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1222 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1223 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1224 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1225 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1227 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[], [1, 2, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p613, Certificates.k17t8p613_check⟩ + +private theorem k17t8_cover1228 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [1, 2, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p614, Certificates.k17t8p614_check⟩ + +private theorem k17t8_cover1226 : ∀ P ∈ pathPatterns 2 3 [1, 2, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1227 + · exact by + intro _ + exact k17t8_cover1228 + +private theorem k17t8_cover1229 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p615, Certificates.k17t8p615_check⟩ + +private theorem k17t8_cover1230 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1231 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1233 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [1, 2, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p616, Certificates.k17t8p616_check⟩ + +private theorem k17t8_cover1232 : ∀ P ∈ pathPatterns 2 2 [1, 2, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1233 + +private theorem k17t8_cover1234 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 2, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1235 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1236 : ∀ P ∈ pathPatterns 2 1 [1, 2, 2, 3], HasCheckedCertificate 17 8 ([[], [1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1237 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 2, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1238 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2, 4], HasCheckedCertificate 17 8 ([[], [1, 2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1240 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 17 8 ([[], [1, 2, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1241 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[], [1, 2, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1239 : ∀ P ∈ pathPatterns 3 3 [1, 2, 3], HasCheckedCertificate 17 8 ([[], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1240 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1241 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1243 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [1, 2, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p617, Certificates.k17t8p617_check⟩ + +private theorem k17t8_cover1242 : ∀ P ∈ pathPatterns 2 2 [1, 2, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1243 + +private theorem k17t8_cover1244 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1245 : ∀ P ∈ pathPatterns 2 1 [1, 2, 3, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1246 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3, 2, 1], HasCheckedCertificate 17 8 ([[], [1, 2, 3, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1247 : ∀ P ∈ pathPatterns 2 0 [1, 2, 3, 3], HasCheckedCertificate 17 8 ([[], [1, 2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1249 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[], [1, 2, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1248 : ∀ P ∈ pathPatterns 3 2 [1, 2, 4], HasCheckedCertificate 17 8 ([[], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1249 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1250 : ∀ P ∈ pathPatterns 2 1 [1, 2, 4, 1], HasCheckedCertificate 17 8 ([[], [1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1251 : ∀ P ∈ pathPatterns 2 0 [1, 2, 4, 2], HasCheckedCertificate 17 8 ([[], [1, 2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1252 : ∀ P ∈ pathPatterns 3 1 [1, 2, 5], HasCheckedCertificate 17 8 ([[], [1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1253 : ∀ P ∈ pathPatterns 2 0 [1, 2, 5, 1], HasCheckedCertificate 17 8 ([[], [1, 2, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1254 : ∀ P ∈ pathPatterns 3 0 [1, 2, 6], HasCheckedCertificate 17 8 ([[], [1, 2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1158 : amountSequenceForall 4 6 (fun tail => + (LexLE [] ([1, 2] ++ tail) ∧ LexLE ([1, 2] ++ tail) ([1, 2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1, 2] ++ tail).length) (9 - ([1, 2] ++ tail).sum) ([1, 2] ++ tail), + HasCheckedCertificate 17 8 ([[]] ++ (([1, 2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1159 + · intro q + fin_cases q + · exact k17t8_seq1187 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1220 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1226 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1, 1] ∧ LexLE [1, 2, 2, 1, 1, 1] [1, 1, 1, 2, 2, 1])) h) + · exact by + intro _ + exact k17t8_cover1229 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1230 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 2, 1] ∧ LexLE [1, 2, 2, 1, 2, 1] [1, 2, 1, 2, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1231 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1232 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1234 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 2, 1, 1] [1, 1, 2, 2, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1235 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1236 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1237 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1238 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1239 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1242 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 3, 1, 1] ∧ LexLE [1, 2, 3, 1, 1] [1, 1, 3, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 3, 1, 1, 1] ∧ LexLE [1, 2, 3, 1, 1, 1] [1, 1, 1, 3, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1244 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1245 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1246 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1247 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1248 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1250 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 4, 1, 1] ∧ LexLE [1, 2, 4, 1, 1] [1, 1, 4, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1251 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1252 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1253 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1254 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1258 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 17 8 ([[], [1, 3], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1259 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 3], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p618, Certificates.k17t8p618_check⟩ + +private theorem k17t8_cover1260 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 17 8 ([[], [1, 3], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1262 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[], [1, 3], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p619, Certificates.k17t8p619_check⟩ + +private theorem k17t8_cover1263 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [1, 3], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p620, Certificates.k17t8p620_check⟩ + +private theorem k17t8_cover1261 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 17 8 ([[], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1262 + · exact by + intro _ + exact k17t8_cover1263 + +private theorem k17t8_cover1264 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 3], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p621, Certificates.k17t8p621_check⟩ + +private theorem k17t8_cover1265 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 17 8 ([[], [1, 3], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1266 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 17 8 ([[], [1, 3], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1267 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 17 8 ([[], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover1268 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 17 8 ([[], [1, 3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1269 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 17 8 ([[], [1, 3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1257 : amountSequenceForall 3 5 (fun tail => + (LexLE [1, 3] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [1, 3]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1258 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1259 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1260 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1261 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1264 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1265 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1266 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1267 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1268 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1269 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1256 : ∀ P ∈ pathPatterns 4 5 [1, 3], HasCheckedCertificate 17 8 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq1257 + + +private theorem k17t8_cover1271 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 17 8 ([[], [1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1272 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 17 8 ([[], [1, 3, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p622, Certificates.k17t8p622_check⟩ + +private theorem k17t8_cover1273 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 17 8 ([[], [1, 3, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1274 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 17 8 ([[], [1, 3, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1270 : ∀ P ∈ pathPatterns 3 4 [1, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1271 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1272 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1273 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1274 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1275 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 3, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p623, Certificates.k17t8p623_check⟩ + +private theorem k17t8_cover1276 : ∀ P ∈ pathPatterns 1 1 [1, 3, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 3, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1277 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1279 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [1, 3, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p624, Certificates.k17t8p624_check⟩ + +private theorem k17t8_cover1278 : ∀ P ∈ pathPatterns 2 2 [1, 3, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1279 + +private theorem k17t8_cover1280 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 3, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1281 : ∀ P ∈ pathPatterns 2 1 [1, 3, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1282 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 3, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1283 : ∀ P ∈ pathPatterns 2 0 [1, 3, 1, 4], HasCheckedCertificate 17 8 ([[], [1, 3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1285 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 17 8 ([[], [1, 3, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1286 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[], [1, 3, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1284 : ∀ P ∈ pathPatterns 3 3 [1, 3, 2], HasCheckedCertificate 17 8 ([[], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1285 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1286 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1287 : ∀ P ∈ pathPatterns 1 0 [1, 3, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 3, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1288 : ∀ P ∈ pathPatterns 2 1 [1, 3, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1289 : ∀ P ∈ pathPatterns 2 0 [1, 3, 2, 3], HasCheckedCertificate 17 8 ([[], [1, 3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1291 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[], [1, 3, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1290 : ∀ P ∈ pathPatterns 3 2 [1, 3, 3], HasCheckedCertificate 17 8 ([[], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1291 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1292 : ∀ P ∈ pathPatterns 2 1 [1, 3, 3, 1], HasCheckedCertificate 17 8 ([[], [1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1293 : ∀ P ∈ pathPatterns 2 0 [1, 3, 3, 2], HasCheckedCertificate 17 8 ([[], [1, 3, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1294 : ∀ P ∈ pathPatterns 3 1 [1, 3, 4], HasCheckedCertificate 17 8 ([[], [1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1295 : ∀ P ∈ pathPatterns 2 0 [1, 3, 4, 1], HasCheckedCertificate 17 8 ([[], [1, 3, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1296 : ∀ P ∈ pathPatterns 3 0 [1, 3, 5], HasCheckedCertificate 17 8 ([[], [1, 3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1255 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([1, 3] ++ tail) ∧ LexLE ([1, 3] ++ tail) ([1, 3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1, 3] ++ tail).length) (9 - ([1, 3] ++ tail).sum) ([1, 3] ++ tail), + HasCheckedCertificate 17 8 ([[]] ++ (([1, 3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1256 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1270 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1, 1] [1, 1, 1, 1, 3, 1])) h) + · exact by + intro _ + exact k17t8_cover1275 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1276 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 2, 1] ∧ LexLE [1, 3, 1, 1, 2, 1] [1, 2, 1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1277 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1278 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 2, 1] ∧ LexLE [1, 3, 1, 2, 1] [1, 2, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 2, 1, 1] ∧ LexLE [1, 3, 1, 2, 1, 1] [1, 1, 2, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1280 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1281 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1282 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1283 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1284 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1, 1] ∧ LexLE [1, 3, 2, 1, 1] [1, 1, 2, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1, 1, 1] ∧ LexLE [1, 3, 2, 1, 1, 1] [1, 1, 1, 2, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1287 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1288 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 2, 1] ∧ LexLE [1, 3, 2, 2, 1] [1, 2, 2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1289 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1290 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1292 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 3, 1, 1] ∧ LexLE [1, 3, 3, 1, 1] [1, 1, 3, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1293 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1294 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1295 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1296 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1299 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[], [1, 4], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p625, Certificates.k17t8p625_check⟩ + +private theorem k17t8_cover1298 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 17 8 ([[], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1299 + +private theorem k17t8_cover1300 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 17 8 ([[], [1, 4], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1301 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 17 8 ([[], [1, 4], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1302 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 17 8 ([[], [1, 4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1297 : ∀ P ∈ pathPatterns 4 4 [1, 4], HasCheckedCertificate 17 8 ([[], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1298 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1300 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1301 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1302 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1304 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 17 8 ([[], [1, 4, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1305 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[], [1, 4, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1303 : ∀ P ∈ pathPatterns 3 3 [1, 4, 1], HasCheckedCertificate 17 8 ([[], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1304 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1305 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1306 : ∀ P ∈ pathPatterns 1 0 [1, 4, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 4, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1307 : ∀ P ∈ pathPatterns 2 1 [1, 4, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1308 : ∀ P ∈ pathPatterns 2 0 [1, 4, 1, 3], HasCheckedCertificate 17 8 ([[], [1, 4, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1310 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[], [1, 4, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1309 : ∀ P ∈ pathPatterns 3 2 [1, 4, 2], HasCheckedCertificate 17 8 ([[], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1310 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1311 : ∀ P ∈ pathPatterns 2 0 [1, 4, 2, 2], HasCheckedCertificate 17 8 ([[], [1, 4, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1312 : ∀ P ∈ pathPatterns 3 1 [1, 4, 3], HasCheckedCertificate 17 8 ([[], [1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1313 : ∀ P ∈ pathPatterns 3 0 [1, 4, 4], HasCheckedCertificate 17 8 ([[], [1, 4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1315 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 17 8 ([[], [1, 5], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1316 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 17 8 ([[], [1, 5], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1314 : ∀ P ∈ pathPatterns 4 3 [1, 5], HasCheckedCertificate 17 8 ([[], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1315 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1316 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1318 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[], [1, 5, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1317 : ∀ P ∈ pathPatterns 3 2 [1, 5, 1], HasCheckedCertificate 17 8 ([[], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1318 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1319 : ∀ P ∈ pathPatterns 2 0 [1, 5, 1, 2], HasCheckedCertificate 17 8 ([[], [1, 5, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1320 : ∀ P ∈ pathPatterns 3 1 [1, 5, 2], HasCheckedCertificate 17 8 ([[], [1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1321 : ∀ P ∈ pathPatterns 3 0 [1, 5, 3], HasCheckedCertificate 17 8 ([[], [1, 5, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1323 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 17 8 ([[], [1, 6], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1322 : ∀ P ∈ pathPatterns 4 2 [1, 6], HasCheckedCertificate 17 8 ([[], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1323 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1324 : ∀ P ∈ pathPatterns 3 1 [1, 6, 1], HasCheckedCertificate 17 8 ([[], [1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1325 : ∀ P ∈ pathPatterns 3 0 [1, 6, 2], HasCheckedCertificate 17 8 ([[], [1, 6, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1326 : ∀ P ∈ pathPatterns 4 1 [1, 7], HasCheckedCertificate 17 8 ([[], [1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1327 : ∀ P ∈ pathPatterns 3 0 [1, 7, 1], HasCheckedCertificate 17 8 ([[], [1, 7, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1328 : ∀ P ∈ pathPatterns 4 0 [1, 8], HasCheckedCertificate 17 8 ([[], [1, 8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq808 : amountSequenceForall 5 8 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([1] ++ tail).length) (9 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 17 8 ([[]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover809 + · intro q + fin_cases q + · exact k17t8_seq961 + + · exact k17t8_seq1158 + + · exact k17t8_seq1255 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1297 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1303 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1, 1] ∧ LexLE [1, 4, 1, 1, 1] [1, 1, 1, 4, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1, 1, 1] ∧ LexLE [1, 4, 1, 1, 1, 1] [1, 1, 1, 1, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1306 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1307 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 2, 1] ∧ LexLE [1, 4, 1, 2, 1] [1, 2, 1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1308 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1309 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 2, 1] ∧ LexLE [1, 4, 2, 1] [1, 2, 4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 2, 1, 1] ∧ LexLE [1, 4, 2, 1, 1] [1, 1, 2, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1311 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1312 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 3, 1] ∧ LexLE [1, 4, 3, 1] [1, 3, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1313 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1314 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1317 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 1, 1] ∧ LexLE [1, 5, 1, 1] [1, 1, 5, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 1, 1, 1] ∧ LexLE [1, 5, 1, 1, 1] [1, 1, 1, 5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1319 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1320 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 2, 1] ∧ LexLE [1, 5, 2, 1] [1, 2, 5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1321 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1322 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1324 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 6, 1, 1] ∧ LexLE [1, 6, 1, 1] [1, 1, 6, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1325 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1326 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1327 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1328 + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1332 : amountSequenceForall 3 6 (fun tail => + (LexLE [2] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (7 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 17 8 ([[], [2]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 3] ∧ LexLE [1, 1, 1, 3] [3, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 4] ∧ LexLE [1, 1, 1, 4] [4, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 2] ∧ LexLE [1, 1, 2, 2] [2, 2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 3] ∧ LexLE [1, 1, 2, 3] [3, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3, 1] ∧ LexLE [1, 1, 3, 1] [1, 3, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3, 2] ∧ LexLE [1, 1, 3, 2] [2, 3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 4] ∧ LexLE [1, 1, 4] [4, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 4, 1] ∧ LexLE [1, 1, 4, 1] [1, 4, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 5] ∧ LexLE [1, 1, 5] [5, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 2] ∧ LexLE [1, 2, 1, 2] [2, 1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 3] ∧ LexLE [1, 2, 1, 3] [3, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2, 1] ∧ LexLE [1, 2, 2, 1] [1, 2, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2, 2] ∧ LexLE [1, 2, 2, 2] [2, 2, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 3] ∧ LexLE [1, 2, 3] [3, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 3, 1] ∧ LexLE [1, 2, 3, 1] [1, 3, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 4] ∧ LexLE [1, 2, 4] [4, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1, 2] ∧ LexLE [1, 3, 1, 2] [2, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 2] ∧ LexLE [1, 3, 2] [2, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 3] ∧ LexLE [1, 3, 3] [3, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4, 1] ∧ LexLE [1, 4, 1] [1, 4, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4, 2] ∧ LexLE [1, 4, 2] [2, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5, 1] ∧ LexLE [1, 5, 1] [1, 5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 6] ∧ LexLE [1, 6] [6, 1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1335 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 17 8 ([[], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1336 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 17 8 ([[], [2], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p626, Certificates.k17t8p626_check⟩ + +private theorem k17t8_cover1337 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 17 8 ([[], [2], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p627, Certificates.k17t8p627_check⟩ + +private theorem k17t8_cover1338 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 17 8 ([[], [2], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1339 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 17 8 ([[], [2], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1340 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 17 8 ([[], [2], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1334 : ∀ P ∈ pathPatterns 3 5 [2], HasCheckedCertificate 17 8 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1335 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1336 + · exact by + intro _ + exact k17t8_cover1337 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1338 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1339 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1340 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1341 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [2], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p628, Certificates.k17t8p628_check⟩ + +private theorem k17t8_cover1342 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [2], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p629, Certificates.k17t8p629_check⟩ + +private theorem k17t8_cover1343 : ∀ P ∈ pathPatterns 1 2 [2, 1, 2], HasCheckedCertificate 17 8 ([[], [2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1344 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [2], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p630, Certificates.k17t8p630_check⟩ + +private theorem k17t8_cover1345 : ∀ P ∈ pathPatterns 1 1 [2, 1, 3], HasCheckedCertificate 17 8 ([[], [2], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1346 : ∀ P ∈ pathPatterns 1 0 [2, 1, 4], HasCheckedCertificate 17 8 ([[], [2], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1348 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [2], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p631, Certificates.k17t8p631_check⟩ + +private theorem k17t8_cover1347 : ∀ P ∈ pathPatterns 2 3 [2, 2], HasCheckedCertificate 17 8 ([[], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover1348 + +private theorem k17t8_cover1349 : ∀ P ∈ pathPatterns 1 1 [2, 2, 2], HasCheckedCertificate 17 8 ([[], [2], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1350 : ∀ P ∈ pathPatterns 1 0 [2, 2, 3], HasCheckedCertificate 17 8 ([[], [2], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1351 : ∀ P ∈ pathPatterns 2 2 [2, 3], HasCheckedCertificate 17 8 ([[], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover1352 : ∀ P ∈ pathPatterns 1 0 [2, 3, 2], HasCheckedCertificate 17 8 ([[], [2], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1353 : ∀ P ∈ pathPatterns 2 1 [2, 4], HasCheckedCertificate 17 8 ([[], [2], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1354 : ∀ P ∈ pathPatterns 2 0 [2, 5], HasCheckedCertificate 17 8 ([[], [2], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1333 : amountSequenceForall 3 5 (fun tail => + (LexLE [2] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([2] ++ tail).length) (7 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 17 8 ([[], [2]] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1334 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1341 + · exact by + intro _ + exact k17t8_cover1342 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1343 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1344 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1345 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1346 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1347 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1349 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1350 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1351 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1352 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1353 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1354 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1356 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 17 8 ([[], [2], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1357 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 17 8 ([[], [2], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1355 : ∀ P ∈ pathPatterns 3 4 [3], HasCheckedCertificate 17 8 ([[], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1356 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1357 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1358 : ∀ P ∈ pathPatterns 1 0 [3, 1, 3], HasCheckedCertificate 17 8 ([[], [2], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1359 : ∀ P ∈ pathPatterns 2 1 [3, 3], HasCheckedCertificate 17 8 ([[], [2], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1360 : ∀ P ∈ pathPatterns 2 0 [3, 4], HasCheckedCertificate 17 8 ([[], [2], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1361 : ∀ P ∈ pathPatterns 3 3 [4], HasCheckedCertificate 17 8 ([[], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1362 : ∀ P ∈ pathPatterns 3 2 [5], HasCheckedCertificate 17 8 ([[], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1363 : ∀ P ∈ pathPatterns 3 1 [6], HasCheckedCertificate 17 8 ([[], [2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1364 : ∀ P ∈ pathPatterns 3 0 [7], HasCheckedCertificate 17 8 ([[], [2], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1331 : amountSequenceForall 4 7 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k17t8_seq1332 + + · exact k17t8_seq1333 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1355 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1358 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1359 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1360 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1361 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1362 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1363 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1364 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1330 : ∀ P ∈ pathPatterns 5 7 [2], HasCheckedCertificate 17 8 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq1331 + + +private theorem k17t8_cover1367 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [2, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p632, Certificates.k17t8p632_check⟩ + +private theorem k17t8_cover1368 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [2, 1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p633, Certificates.k17t8p633_check⟩ + +private theorem k17t8_cover1369 : ∀ P ∈ pathPatterns 1 2 [2, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1370 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [2, 1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p634, Certificates.k17t8p634_check⟩ + +private theorem k17t8_cover1371 : ∀ P ∈ pathPatterns 1 1 [2, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [2, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1372 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [2, 1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1374 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[], [2, 1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p635, Certificates.k17t8p635_check⟩ + +private theorem k17t8_cover1373 : ∀ P ∈ pathPatterns 2 3 [2, 1, 1, 2], HasCheckedCertificate 17 8 ([[], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover1374 + +private theorem k17t8_cover1375 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [2, 1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p636, Certificates.k17t8p636_check⟩ + +private theorem k17t8_cover1376 : ∀ P ∈ pathPatterns 1 1 [2, 1, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [2, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1377 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [2, 1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1378 : ∀ P ∈ pathPatterns 2 2 [2, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover1379 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 3, 2], HasCheckedCertificate 17 8 ([[], [2, 1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1380 : ∀ P ∈ pathPatterns 2 1 [2, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1381 : ∀ P ∈ pathPatterns 2 0 [2, 1, 1, 5], HasCheckedCertificate 17 8 ([[], [2, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1366 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([2, 1, 1] ++ tail) ∧ LexLE ([2, 1, 1] ++ tail) ([2, 1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([2, 1, 1] ++ tail).length) (9 - ([2, 1, 1] ++ tail).sum) ([2, 1, 1] ++ tail), + HasCheckedCertificate 17 8 ([[]] ++ (([2, 1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1367 + · exact by + intro _ + exact k17t8_cover1368 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1369 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 1, 2, 1] [1, 2, 1, 1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1370 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1371 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 3, 1] ∧ LexLE [2, 1, 1, 1, 3, 1] [1, 3, 1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1372 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1373 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1, 1] ∧ LexLE [2, 1, 1, 2, 1, 1] [1, 1, 2, 1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1375 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1376 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 2, 1] ∧ LexLE [2, 1, 1, 2, 2, 1] [1, 2, 2, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1377 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1378 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 3, 1] ∧ LexLE [2, 1, 1, 3, 1] [1, 3, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 3, 1, 1] ∧ LexLE [2, 1, 1, 3, 1, 1] [1, 1, 3, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1379 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1380 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 4, 1] ∧ LexLE [2, 1, 1, 4, 1] [1, 4, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1381 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1383 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 17 8 ([[], [2, 1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p637, Certificates.k17t8p637_check⟩ + +private theorem k17t8_cover1384 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 17 8 ([[], [2, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1385 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 17 8 ([[], [2, 1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1382 : ∀ P ∈ pathPatterns 3 4 [2, 1, 2], HasCheckedCertificate 17 8 ([[], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1383 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1384 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1385 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1386 : ∀ P ∈ pathPatterns 1 1 [2, 1, 2, 1, 2], HasCheckedCertificate 17 8 ([[], [2, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1387 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2, 1, 3], HasCheckedCertificate 17 8 ([[], [2, 1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1388 : ∀ P ∈ pathPatterns 2 2 [2, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover1389 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2, 2, 2], HasCheckedCertificate 17 8 ([[], [2, 1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1390 : ∀ P ∈ pathPatterns 2 1 [2, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1391 : ∀ P ∈ pathPatterns 2 0 [2, 1, 2, 4], HasCheckedCertificate 17 8 ([[], [2, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1393 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[], [2, 1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1392 : ∀ P ∈ pathPatterns 3 3 [2, 1, 3], HasCheckedCertificate 17 8 ([[], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1393 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1394 : ∀ P ∈ pathPatterns 1 0 [2, 1, 3, 1, 2], HasCheckedCertificate 17 8 ([[], [2, 1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1395 : ∀ P ∈ pathPatterns 2 1 [2, 1, 3, 2], HasCheckedCertificate 17 8 ([[], [2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1396 : ∀ P ∈ pathPatterns 2 0 [2, 1, 3, 3], HasCheckedCertificate 17 8 ([[], [2, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1397 : ∀ P ∈ pathPatterns 3 2 [2, 1, 4], HasCheckedCertificate 17 8 ([[], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1398 : ∀ P ∈ pathPatterns 2 0 [2, 1, 4, 2], HasCheckedCertificate 17 8 ([[], [2, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1399 : ∀ P ∈ pathPatterns 3 1 [2, 1, 5], HasCheckedCertificate 17 8 ([[], [2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1400 : ∀ P ∈ pathPatterns 3 0 [2, 1, 6], HasCheckedCertificate 17 8 ([[], [2, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1365 : amountSequenceForall 4 6 (fun tail => + (LexLE [] ([2, 1] ++ tail) ∧ LexLE ([2, 1] ++ tail) ([2, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([2, 1] ++ tail).length) (9 - ([2, 1] ++ tail).sum) ([2, 1] ++ tail), + HasCheckedCertificate 17 8 ([[]] ++ (([2, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact k17t8_seq1366 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1382 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1, 1] ∧ LexLE [2, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1, 2] ∧ LexLE [2, 1, 2, 1, 1, 2] [2, 1, 1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1386 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1, 2, 1] [1, 2, 1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1387 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1388 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 2, 1] ∧ LexLE [2, 1, 2, 2, 1] [1, 2, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 2, 1, 1] ∧ LexLE [2, 1, 2, 2, 1, 1] [1, 1, 2, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1389 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1390 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 3, 1] ∧ LexLE [2, 1, 2, 3, 1] [1, 3, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1391 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1392 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1, 1] ∧ LexLE [2, 1, 3, 1, 1] [1, 1, 3, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1, 1, 1] ∧ LexLE [2, 1, 3, 1, 1, 1] [1, 1, 1, 3, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1394 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1395 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 2, 1] ∧ LexLE [2, 1, 3, 2, 1] [1, 2, 3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1396 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1397 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 4, 1] ∧ LexLE [2, 1, 4, 1] [1, 4, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 4, 1, 1] ∧ LexLE [2, 1, 4, 1, 1] [1, 1, 4, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1398 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1399 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 5, 1] ∧ LexLE [2, 1, 5, 1] [1, 5, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1400 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1404 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 17 8 ([[], [2, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1405 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 17 8 ([[], [2, 2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1406 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 17 8 ([[], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover1407 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 17 8 ([[], [2, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1408 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 17 8 ([[], [2, 2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1403 : amountSequenceForall 3 5 (fun tail => + (LexLE [2, 2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [2, 2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1, 2] ∧ LexLE [2, 1, 2] [2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1404 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1405 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1406 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1407 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1408 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1402 : ∀ P ∈ pathPatterns 4 5 [2, 2], HasCheckedCertificate 17 8 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq1403 + + +private theorem k17t8_cover1409 : ∀ P ∈ pathPatterns 1 0 [2, 2, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [2, 2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1410 : ∀ P ∈ pathPatterns 1 0 [2, 2, 1, 2, 2], HasCheckedCertificate 17 8 ([[], [2, 2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1411 : ∀ P ∈ pathPatterns 2 1 [2, 2, 1, 3], HasCheckedCertificate 17 8 ([[], [2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1412 : ∀ P ∈ pathPatterns 2 0 [2, 2, 1, 4], HasCheckedCertificate 17 8 ([[], [2, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1414 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[], [2, 2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1413 : ∀ P ∈ pathPatterns 3 3 [2, 2, 2], HasCheckedCertificate 17 8 ([[], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1414 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1415 : ∀ P ∈ pathPatterns 2 1 [2, 2, 2, 2], HasCheckedCertificate 17 8 ([[], [2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1416 : ∀ P ∈ pathPatterns 2 0 [2, 2, 2, 3], HasCheckedCertificate 17 8 ([[], [2, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1417 : ∀ P ∈ pathPatterns 3 2 [2, 2, 3], HasCheckedCertificate 17 8 ([[], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1418 : ∀ P ∈ pathPatterns 2 0 [2, 2, 3, 2], HasCheckedCertificate 17 8 ([[], [2, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1419 : ∀ P ∈ pathPatterns 3 1 [2, 2, 4], HasCheckedCertificate 17 8 ([[], [2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1420 : ∀ P ∈ pathPatterns 3 0 [2, 2, 5], HasCheckedCertificate 17 8 ([[], [2, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1401 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([2, 2] ++ tail) ∧ LexLE ([2, 2] ++ tail) ([2, 2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([2, 2] ++ tail).length) (9 - ([2, 2] ++ tail).sum) ([2, 2] ++ tail), + HasCheckedCertificate 17 8 ([[]] ++ (([2, 2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1402 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1, 2] ∧ LexLE [2, 2, 1, 1, 1, 2] [2, 1, 1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 2] ∧ LexLE [2, 2, 1, 1, 2] [2, 1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 2, 1] ∧ LexLE [2, 2, 1, 1, 2, 1] [1, 2, 1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1409 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2, 1] ∧ LexLE [2, 2, 1, 2, 1] [1, 2, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2, 1, 1] ∧ LexLE [2, 2, 1, 2, 1, 1] [1, 1, 2, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1410 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1411 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 3, 1] ∧ LexLE [2, 2, 1, 3, 1] [1, 3, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1412 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1413 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1, 1] ∧ LexLE [2, 2, 2, 1, 1] [1, 1, 2, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1, 1, 1] ∧ LexLE [2, 2, 2, 1, 1, 1] [1, 1, 1, 2, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1, 2] ∧ LexLE [2, 2, 2, 1, 2] [2, 1, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1415 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 2, 1] ∧ LexLE [2, 2, 2, 2, 1] [1, 2, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1416 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1417 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 3, 1] ∧ LexLE [2, 2, 3, 1] [1, 3, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 3, 1, 1] ∧ LexLE [2, 2, 3, 1, 1] [1, 1, 3, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1418 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1419 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 4, 1] ∧ LexLE [2, 2, 4, 1] [1, 4, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1420 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1422 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 17 8 ([[], [2, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1423 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 17 8 ([[], [2, 3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1421 : ∀ P ∈ pathPatterns 4 4 [2, 3], HasCheckedCertificate 17 8 ([[], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1422 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1423 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1424 : ∀ P ∈ pathPatterns 2 0 [2, 3, 1, 3], HasCheckedCertificate 17 8 ([[], [2, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1425 : ∀ P ∈ pathPatterns 3 2 [2, 3, 2], HasCheckedCertificate 17 8 ([[], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1426 : ∀ P ∈ pathPatterns 3 1 [2, 3, 3], HasCheckedCertificate 17 8 ([[], [2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1427 : ∀ P ∈ pathPatterns 3 0 [2, 3, 4], HasCheckedCertificate 17 8 ([[], [2, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1429 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 17 8 ([[], [2, 4], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1428 : ∀ P ∈ pathPatterns 4 3 [2, 4], HasCheckedCertificate 17 8 ([[], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1429 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1430 : ∀ P ∈ pathPatterns 3 1 [2, 4, 2], HasCheckedCertificate 17 8 ([[], [2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1431 : ∀ P ∈ pathPatterns 3 0 [2, 4, 3], HasCheckedCertificate 17 8 ([[], [2, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1432 : ∀ P ∈ pathPatterns 4 2 [2, 5], HasCheckedCertificate 17 8 ([[], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1433 : ∀ P ∈ pathPatterns 3 0 [2, 5, 2], HasCheckedCertificate 17 8 ([[], [2, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1434 : ∀ P ∈ pathPatterns 4 1 [2, 6], HasCheckedCertificate 17 8 ([[], [2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1435 : ∀ P ∈ pathPatterns 4 0 [2, 7], HasCheckedCertificate 17 8 ([[], [2, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1329 : amountSequenceForall 5 7 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([2] ++ tail).length) (9 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 17 8 ([[]] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1330 + · intro q + fin_cases q + · exact k17t8_seq1365 + + · exact k17t8_seq1401 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1421 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1, 1] ∧ LexLE [2, 3, 1, 1, 1] [1, 1, 1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1, 1, 1] ∧ LexLE [2, 3, 1, 1, 1, 1] [1, 1, 1, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1, 2] ∧ LexLE [2, 3, 1, 1, 2] [2, 1, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 2] ∧ LexLE [2, 3, 1, 2] [2, 1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 2, 1] ∧ LexLE [2, 3, 1, 2, 1] [1, 2, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1424 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1425 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 1] ∧ LexLE [2, 3, 2, 1] [1, 2, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 1, 1] ∧ LexLE [2, 3, 2, 1, 1] [1, 1, 2, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 2] ∧ LexLE [2, 3, 2, 2] [2, 2, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1426 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 3, 1] ∧ LexLE [2, 3, 3, 1] [1, 3, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1427 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1428 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 1] ∧ LexLE [2, 4, 1, 1] [1, 1, 4, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 1, 1] ∧ LexLE [2, 4, 1, 1, 1] [1, 1, 1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 2] ∧ LexLE [2, 4, 1, 2] [2, 1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1430 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 2, 1] ∧ LexLE [2, 4, 2, 1] [1, 2, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1431 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1432 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1, 1] ∧ LexLE [2, 5, 1, 1] [1, 1, 5, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1433 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1434 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 6, 1] ∧ LexLE [2, 6, 1] [1, 6, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1435 + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1439 : amountSequenceForall 3 5 (fun tail => + (LexLE [3] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 17 8 ([[], [3]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 3] ∧ LexLE [1, 1, 1, 3] [3, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2, 2] ∧ LexLE [1, 1, 2, 2] [2, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 3, 1] ∧ LexLE [1, 1, 3, 1] [1, 3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 4] ∧ LexLE [1, 1, 4] [4, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1, 2] ∧ LexLE [1, 2, 1, 2] [2, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 2, 1] ∧ LexLE [1, 2, 2, 1] [1, 2, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 3] ∧ LexLE [1, 2, 3] [3, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3, 2] ∧ LexLE [1, 3, 2] [2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4, 1] ∧ LexLE [1, 4, 1] [1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1441 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[], [3], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1440 : ∀ P ∈ pathPatterns 3 3 [3], HasCheckedCertificate 17 8 ([[], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1441 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1442 : ∀ P ∈ pathPatterns 2 0 [3, 3], HasCheckedCertificate 17 8 ([[], [3], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1443 : ∀ P ∈ pathPatterns 3 2 [4], HasCheckedCertificate 17 8 ([[], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1444 : ∀ P ∈ pathPatterns 3 1 [5], HasCheckedCertificate 17 8 ([[], [3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1445 : ∀ P ∈ pathPatterns 3 0 [6], HasCheckedCertificate 17 8 ([[], [3], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1438 : amountSequenceForall 4 6 (fun tail => + (LexLE [3] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [3]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k17t8_seq1439 + + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1, 2] ∧ LexLE [2, 1, 1, 2] [2, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 2] ∧ LexLE [2, 1, 2] [2, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 3] ∧ LexLE [2, 1, 3] [3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2, 2] ∧ LexLE [2, 2, 2] [2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 4] ∧ LexLE [2, 4] [4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1440 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1442 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1443 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1444 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1445 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1437 : ∀ P ∈ pathPatterns 5 6 [3], HasCheckedCertificate 17 8 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq1438 + + +private theorem k17t8_cover1447 : ∀ P ∈ pathPatterns 1 0 [3, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [3, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1448 : ∀ P ∈ pathPatterns 2 1 [3, 1, 1, 3], HasCheckedCertificate 17 8 ([[], [3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1449 : ∀ P ∈ pathPatterns 2 0 [3, 1, 1, 4], HasCheckedCertificate 17 8 ([[], [3, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1450 : ∀ P ∈ pathPatterns 2 0 [3, 1, 2, 3], HasCheckedCertificate 17 8 ([[], [3, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1451 : ∀ P ∈ pathPatterns 3 2 [3, 1, 3], HasCheckedCertificate 17 8 ([[], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1452 : ∀ P ∈ pathPatterns 3 1 [3, 1, 4], HasCheckedCertificate 17 8 ([[], [3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1453 : ∀ P ∈ pathPatterns 3 0 [3, 1, 5], HasCheckedCertificate 17 8 ([[], [3, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1446 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([3, 1] ++ tail) ∧ LexLE ([3, 1] ++ tail) ([3, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([3, 1] ++ tail).length) (9 - ([3, 1] ++ tail).sum) ([3, 1] ++ tail), + HasCheckedCertificate 17 8 ([[]] ++ (([3, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1, 2] ∧ LexLE [3, 1, 1, 1, 1, 2] [2, 1, 1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 2] ∧ LexLE [3, 1, 1, 1, 2] [2, 1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 2, 1] ∧ LexLE [3, 1, 1, 1, 2, 1] [1, 2, 1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1447 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2, 1] ∧ LexLE [3, 1, 1, 2, 1] [1, 2, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2, 1, 1] ∧ LexLE [3, 1, 1, 2, 1, 1] [1, 1, 2, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2, 2] ∧ LexLE [3, 1, 1, 2, 2] [2, 2, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1448 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 3, 1] ∧ LexLE [3, 1, 1, 3, 1] [1, 3, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1449 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1, 1] ∧ LexLE [3, 1, 2, 1, 1] [1, 1, 2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1, 1, 1] ∧ LexLE [3, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1, 2] ∧ LexLE [3, 1, 2, 1, 2] [2, 1, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 2] ∧ LexLE [3, 1, 2, 2] [2, 2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 2, 1] ∧ LexLE [3, 1, 2, 2, 1] [1, 2, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1450 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1451 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 1] ∧ LexLE [3, 1, 3, 1] [1, 3, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 1, 1] ∧ LexLE [3, 1, 3, 1, 1] [1, 1, 3, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 2] ∧ LexLE [3, 1, 3, 2] [2, 3, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1452 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 4, 1] ∧ LexLE [3, 1, 4, 1] [1, 4, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1453 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1454 : ∀ P ∈ pathPatterns 3 1 [3, 2, 3], HasCheckedCertificate 17 8 ([[], [3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1455 : ∀ P ∈ pathPatterns 3 0 [3, 2, 4], HasCheckedCertificate 17 8 ([[], [3, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1456 : ∀ P ∈ pathPatterns 4 3 [3, 3], HasCheckedCertificate 17 8 ([[], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1457 : ∀ P ∈ pathPatterns 3 0 [3, 3, 3], HasCheckedCertificate 17 8 ([[], [3, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1458 : ∀ P ∈ pathPatterns 4 2 [3, 4], HasCheckedCertificate 17 8 ([[], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1459 : ∀ P ∈ pathPatterns 4 1 [3, 5], HasCheckedCertificate 17 8 ([[], [3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1460 : ∀ P ∈ pathPatterns 4 0 [3, 6], HasCheckedCertificate 17 8 ([[], [3, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1436 : amountSequenceForall 5 6 (fun tail => + (LexLE [] ([3] ++ tail) ∧ LexLE ([3] ++ tail) ([3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([3] ++ tail).length) (9 - ([3] ++ tail).sum) ([3] ++ tail), + HasCheckedCertificate 17 8 ([[]] ++ (([3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1437 + · intro q + fin_cases q + · exact k17t8_seq1446 + + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1, 1] ∧ LexLE [3, 2, 1, 1, 1] [1, 1, 1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1, 1, 1] ∧ LexLE [3, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1, 2] ∧ LexLE [3, 2, 1, 1, 2] [2, 1, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 2] ∧ LexLE [3, 2, 1, 2] [2, 1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 2, 1] ∧ LexLE [3, 2, 1, 2, 1] [1, 2, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 3] ∧ LexLE [3, 2, 1, 3] [3, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 1] ∧ LexLE [3, 2, 2, 1] [1, 2, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 1, 1] ∧ LexLE [3, 2, 2, 1, 1] [1, 1, 2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 2] ∧ LexLE [3, 2, 2, 2] [2, 2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1454 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 3, 1] ∧ LexLE [3, 2, 3, 1] [1, 3, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1455 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1456 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 1] ∧ LexLE [3, 3, 1, 1] [1, 1, 3, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 1, 1] ∧ LexLE [3, 3, 1, 1, 1] [1, 1, 1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 2] ∧ LexLE [3, 3, 1, 2] [2, 1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2, 1] ∧ LexLE [3, 3, 2, 1] [1, 2, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1457 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1458 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1, 1] ∧ LexLE [3, 4, 1, 1] [1, 1, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 2] ∧ LexLE [3, 4, 2] [2, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1459 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 5, 1] ∧ LexLE [3, 5, 1] [1, 5, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1460 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1464 : ∀ P ∈ pathPatterns 3 1 [4], HasCheckedCertificate 17 8 ([[], [4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1465 : ∀ P ∈ pathPatterns 3 0 [5], HasCheckedCertificate 17 8 ([[], [4], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1463 : amountSequenceForall 4 5 (fun tail => + (LexLE [4] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[], [4]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1, 2] ∧ LexLE [2, 1, 2] [2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1464 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1465 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1462 : ∀ P ∈ pathPatterns 5 5 [4], HasCheckedCertificate 17 8 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq1463 + + +private theorem k17t8_cover1466 : ∀ P ∈ pathPatterns 3 0 [4, 1, 4], HasCheckedCertificate 17 8 ([[], [4, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1467 : ∀ P ∈ pathPatterns 4 1 [4, 4], HasCheckedCertificate 17 8 ([[], [4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1468 : ∀ P ∈ pathPatterns 4 0 [4, 5], HasCheckedCertificate 17 8 ([[], [4, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1461 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([4] ++ tail) ∧ LexLE ([4] ++ tail) ([4] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([4] ++ tail).length) (9 - ([4] ++ tail).sum) ([4] ++ tail), + HasCheckedCertificate 17 8 ([[]] ++ (([4] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1462 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1, 1] ∧ LexLE [4, 1, 1, 1, 1] [1, 1, 1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1, 1, 1] ∧ LexLE [4, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1, 2] ∧ LexLE [4, 1, 1, 1, 2] [2, 1, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 2] ∧ LexLE [4, 1, 1, 2] [2, 1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 2, 1] ∧ LexLE [4, 1, 1, 2, 1] [1, 2, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 3] ∧ LexLE [4, 1, 1, 3] [3, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 1] ∧ LexLE [4, 1, 2, 1] [1, 2, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 1, 1] ∧ LexLE [4, 1, 2, 1, 1] [1, 1, 2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 2] ∧ LexLE [4, 1, 2, 2] [2, 2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3, 1] ∧ LexLE [4, 1, 3, 1] [1, 3, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1466 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 1] ∧ LexLE [4, 2, 1, 1] [1, 1, 2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 1, 1] ∧ LexLE [4, 2, 1, 1, 1] [1, 1, 1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 2] ∧ LexLE [4, 2, 1, 2] [2, 1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2, 1] ∧ LexLE [4, 2, 2, 1] [1, 2, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 3] ∧ LexLE [4, 2, 3] [3, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1, 1] ∧ LexLE [4, 3, 1, 1] [1, 1, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 2] ∧ LexLE [4, 3, 2] [2, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1467 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 4, 1] ∧ LexLE [4, 4, 1] [1, 4, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1468 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1469 : ∀ P ∈ pathPatterns 5 4 [5], HasCheckedCertificate 17 8 ([[], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [4] ∧ LexLE [4] [4])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1470 : ∀ P ∈ pathPatterns 5 3 [6], HasCheckedCertificate 17 8 ([[], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1471 : ∀ P ∈ pathPatterns 5 2 [7], HasCheckedCertificate 17 8 ([[], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1472 : ∀ P ∈ pathPatterns 5 1 [8], HasCheckedCertificate 17 8 ([[], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1473 : ∀ P ∈ pathPatterns 5 0 [9], HasCheckedCertificate 17 8 ([[], [9]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [9] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq4 : amountSequenceForall 6 9 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (6 - ([] ++ tail).length) (9 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover5 + · intro q + fin_cases q + · exact k17t8_seq808 + + · exact k17t8_seq1329 + + · exact k17t8_seq1436 + + · exact k17t8_seq1461 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1469 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 1] ∧ LexLE [5, 1, 1, 1] [1, 1, 1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 1, 1] ∧ LexLE [5, 1, 1, 1, 1] [1, 1, 1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 2] ∧ LexLE [5, 1, 1, 2] [2, 1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2, 1] ∧ LexLE [5, 1, 2, 1] [1, 2, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 3] ∧ LexLE [5, 1, 3] [3, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1, 1] ∧ LexLE [5, 2, 1, 1] [1, 1, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 2] ∧ LexLE [5, 2, 2] [2, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3, 1] ∧ LexLE [5, 3, 1] [1, 3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 4] ∧ LexLE [5, 4] [4, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1470 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1, 1] ∧ LexLE [6, 1, 1, 1] [1, 1, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 2] ∧ LexLE [6, 1, 2] [2, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2, 1] ∧ LexLE [6, 2, 1] [1, 2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 3] ∧ LexLE [6, 3] [3, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1471 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1, 1] ∧ LexLE [7, 1, 1] [1, 1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 2] ∧ LexLE [7, 2] [2, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1472 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [8, 1] ∧ LexLE [8, 1] [1, 8])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1473 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover3 : ∀ P ∈ pathPatterns 7 9 [], HasCheckedCertificate 17 8 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq4 + + +private theorem k17t8_cover1481 : ∀ P ∈ pathPatterns 0 5 [1], HasCheckedCertificate 17 8 ([[1], [1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p638, Certificates.k17t8p638_check⟩ + +private theorem k17t8_cover1482 : ∀ P ∈ pathPatterns 0 4 [2], HasCheckedCertificate 17 8 ([[1], [1], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p639, Certificates.k17t8p639_check⟩ + +private theorem k17t8_cover1483 : ∀ P ∈ pathPatterns 0 3 [3], HasCheckedCertificate 17 8 ([[1], [1], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p640, Certificates.k17t8p640_check⟩ + +private theorem k17t8_cover1484 : ∀ P ∈ pathPatterns 0 2 [4], HasCheckedCertificate 17 8 ([[1], [1], [1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p641, Certificates.k17t8p641_check⟩ + +private theorem k17t8_cover1485 : ∀ P ∈ pathPatterns 0 1 [5], HasCheckedCertificate 17 8 ([[1], [1], [1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p642, Certificates.k17t8p642_check⟩ + +private theorem k17t8_cover1486 : ∀ P ∈ pathPatterns 0 0 [6], HasCheckedCertificate 17 8 ([[1], [1], [1], [6]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p643, Certificates.k17t8p643_check⟩ + +private theorem k17t8_cover1480 : ∀ P ∈ pathPatterns 2 6 [1], HasCheckedCertificate 17 8 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1481 + · exact by + intro _ + exact k17t8_cover1482 + · exact by + intro _ + exact k17t8_cover1483 + · exact by + intro _ + exact k17t8_cover1484 + · exact by + intro _ + exact k17t8_cover1485 + · exact by + intro _ + exact k17t8_cover1486 + +private theorem k17t8_cover1487 : ∀ P ∈ pathPatterns 1 5 [1, 1], HasCheckedCertificate 17 8 ([[1], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1488 : ∀ P ∈ pathPatterns 0 4 [1, 1, 1], HasCheckedCertificate 17 8 ([[1], [1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p644, Certificates.k17t8p644_check⟩ + +private theorem k17t8_cover1489 : ∀ P ∈ pathPatterns 0 3 [1, 1, 2], HasCheckedCertificate 17 8 ([[1], [1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p645, Certificates.k17t8p645_check⟩ + +private theorem k17t8_cover1490 : ∀ P ∈ pathPatterns 0 2 [1, 1, 3], HasCheckedCertificate 17 8 ([[1], [1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p646, Certificates.k17t8p646_check⟩ + +private theorem k17t8_cover1491 : ∀ P ∈ pathPatterns 0 1 [1, 1, 4], HasCheckedCertificate 17 8 ([[1], [1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p647, Certificates.k17t8p647_check⟩ + +private theorem k17t8_cover1492 : ∀ P ∈ pathPatterns 0 0 [1, 1, 5], HasCheckedCertificate 17 8 ([[1], [1], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p648, Certificates.k17t8p648_check⟩ + +private theorem k17t8_cover1493 : ∀ P ∈ pathPatterns 1 4 [1, 2], HasCheckedCertificate 17 8 ([[1], [1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1494 : ∀ P ∈ pathPatterns 0 3 [1, 2, 1], HasCheckedCertificate 17 8 ([[1], [1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p649, Certificates.k17t8p649_check⟩ + +private theorem k17t8_cover1495 : ∀ P ∈ pathPatterns 0 2 [1, 2, 2], HasCheckedCertificate 17 8 ([[1], [1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p650, Certificates.k17t8p650_check⟩ + +private theorem k17t8_cover1496 : ∀ P ∈ pathPatterns 0 1 [1, 2, 3], HasCheckedCertificate 17 8 ([[1], [1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p651, Certificates.k17t8p651_check⟩ + +private theorem k17t8_cover1497 : ∀ P ∈ pathPatterns 0 0 [1, 2, 4], HasCheckedCertificate 17 8 ([[1], [1], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p652, Certificates.k17t8p652_check⟩ + +private theorem k17t8_cover1498 : ∀ P ∈ pathPatterns 1 3 [1, 3], HasCheckedCertificate 17 8 ([[1], [1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1499 : ∀ P ∈ pathPatterns 0 2 [1, 3, 1], HasCheckedCertificate 17 8 ([[1], [1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p653, Certificates.k17t8p653_check⟩ + +private theorem k17t8_cover1500 : ∀ P ∈ pathPatterns 0 1 [1, 3, 2], HasCheckedCertificate 17 8 ([[1], [1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p654, Certificates.k17t8p654_check⟩ + +private theorem k17t8_cover1501 : ∀ P ∈ pathPatterns 0 0 [1, 3, 3], HasCheckedCertificate 17 8 ([[1], [1], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p655, Certificates.k17t8p655_check⟩ + +private theorem k17t8_cover1502 : ∀ P ∈ pathPatterns 1 2 [1, 4], HasCheckedCertificate 17 8 ([[1], [1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1503 : ∀ P ∈ pathPatterns 0 1 [1, 4, 1], HasCheckedCertificate 17 8 ([[1], [1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p656, Certificates.k17t8p656_check⟩ + +private theorem k17t8_cover1504 : ∀ P ∈ pathPatterns 0 0 [1, 4, 2], HasCheckedCertificate 17 8 ([[1], [1], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p657, Certificates.k17t8p657_check⟩ + +private theorem k17t8_cover1505 : ∀ P ∈ pathPatterns 1 1 [1, 5], HasCheckedCertificate 17 8 ([[1], [1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1506 : ∀ P ∈ pathPatterns 0 0 [1, 5, 1], HasCheckedCertificate 17 8 ([[1], [1], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p658, Certificates.k17t8p658_check⟩ + +private theorem k17t8_cover1507 : ∀ P ∈ pathPatterns 1 0 [1, 6], HasCheckedCertificate 17 8 ([[1], [1], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1509 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 17 8 ([[1], [1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p659, Certificates.k17t8p659_check⟩ + +private theorem k17t8_cover1510 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 17 8 ([[1], [1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p660, Certificates.k17t8p660_check⟩ + +private theorem k17t8_cover1511 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 17 8 ([[1], [1], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p661, Certificates.k17t8p661_check⟩ + +private theorem k17t8_cover1512 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 17 8 ([[1], [1], [2], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p662, Certificates.k17t8p662_check⟩ + +private theorem k17t8_cover1508 : ∀ P ∈ pathPatterns 2 5 [2], HasCheckedCertificate 17 8 ([[1], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1509 + · exact by + intro _ + exact k17t8_cover1510 + · exact by + intro _ + exact k17t8_cover1511 + · exact by + intro _ + exact k17t8_cover1512 + +private theorem k17t8_cover1513 : ∀ P ∈ pathPatterns 0 2 [2, 1, 2], HasCheckedCertificate 17 8 ([[1], [1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p663, Certificates.k17t8p663_check⟩ + +private theorem k17t8_cover1514 : ∀ P ∈ pathPatterns 0 1 [2, 1, 3], HasCheckedCertificate 17 8 ([[1], [1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p664, Certificates.k17t8p664_check⟩ + +private theorem k17t8_cover1515 : ∀ P ∈ pathPatterns 0 0 [2, 1, 4], HasCheckedCertificate 17 8 ([[1], [1], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p665, Certificates.k17t8p665_check⟩ + +private theorem k17t8_cover1516 : ∀ P ∈ pathPatterns 1 3 [2, 2], HasCheckedCertificate 17 8 ([[1], [1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1517 : ∀ P ∈ pathPatterns 0 1 [2, 2, 2], HasCheckedCertificate 17 8 ([[1], [1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p666, Certificates.k17t8p666_check⟩ + +private theorem k17t8_cover1518 : ∀ P ∈ pathPatterns 0 0 [2, 2, 3], HasCheckedCertificate 17 8 ([[1], [1], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p667, Certificates.k17t8p667_check⟩ + +private theorem k17t8_cover1519 : ∀ P ∈ pathPatterns 1 2 [2, 3], HasCheckedCertificate 17 8 ([[1], [1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1520 : ∀ P ∈ pathPatterns 0 0 [2, 3, 2], HasCheckedCertificate 17 8 ([[1], [1], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p668, Certificates.k17t8p668_check⟩ + +private theorem k17t8_cover1521 : ∀ P ∈ pathPatterns 1 1 [2, 4], HasCheckedCertificate 17 8 ([[1], [1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1522 : ∀ P ∈ pathPatterns 1 0 [2, 5], HasCheckedCertificate 17 8 ([[1], [1], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1524 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[1], [1], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p669, Certificates.k17t8p669_check⟩ + +private theorem k17t8_cover1525 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[1], [1], [3], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p670, Certificates.k17t8p670_check⟩ + +private theorem k17t8_cover1523 : ∀ P ∈ pathPatterns 2 4 [3], HasCheckedCertificate 17 8 ([[1], [1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover1524 + · exact by + intro _ + exact k17t8_cover1525 + +private theorem k17t8_cover1526 : ∀ P ∈ pathPatterns 0 0 [3, 1, 3], HasCheckedCertificate 17 8 ([[1], [1], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p671, Certificates.k17t8p671_check⟩ + +private theorem k17t8_cover1527 : ∀ P ∈ pathPatterns 1 1 [3, 3], HasCheckedCertificate 17 8 ([[1], [1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1528 : ∀ P ∈ pathPatterns 1 0 [3, 4], HasCheckedCertificate 17 8 ([[1], [1], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1529 : ∀ P ∈ pathPatterns 2 3 [4], HasCheckedCertificate 17 8 ([[1], [1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + +private theorem k17t8_cover1530 : ∀ P ∈ pathPatterns 2 2 [5], HasCheckedCertificate 17 8 ([[1], [1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover1531 : ∀ P ∈ pathPatterns 2 1 [6], HasCheckedCertificate 17 8 ([[1], [1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1532 : ∀ P ∈ pathPatterns 2 0 [7], HasCheckedCertificate 17 8 ([[1], [1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1479 : amountSequenceForall 3 7 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[1], [1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1480 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1487 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1488 + · exact by + intro _ + exact k17t8_cover1489 + · exact by + intro _ + exact k17t8_cover1490 + · exact by + intro _ + exact k17t8_cover1491 + · exact by + intro _ + exact k17t8_cover1492 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1493 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1494 + · exact by + intro _ + exact k17t8_cover1495 + · exact by + intro _ + exact k17t8_cover1496 + · exact by + intro _ + exact k17t8_cover1497 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1498 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1499 + · exact by + intro _ + exact k17t8_cover1500 + · exact by + intro _ + exact k17t8_cover1501 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1502 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1503 + · exact by + intro _ + exact k17t8_cover1504 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1505 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1506 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1507 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1508 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1513 + · exact by + intro _ + exact k17t8_cover1514 + · exact by + intro _ + exact k17t8_cover1515 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1516 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k17t8_cover1517 + · exact by + intro _ + exact k17t8_cover1518 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1519 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + intro _ + exact k17t8_cover1520 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1521 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1522 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1523 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + intro _ + exact k17t8_cover1526 + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1527 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1528 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1529 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1530 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1531 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1532 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1478 : ∀ P ∈ pathPatterns 4 7 [1], HasCheckedCertificate 17 8 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq1479 + + +private theorem k17t8_cover1535 : ∀ P ∈ pathPatterns 0 4 [1, 1], HasCheckedCertificate 17 8 ([[1], [1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p672, Certificates.k17t8p672_check⟩ + +private theorem k17t8_cover1536 : ∀ P ∈ pathPatterns 0 3 [1, 2], HasCheckedCertificate 17 8 ([[1], [1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p673, Certificates.k17t8p673_check⟩ + +private theorem k17t8_cover1537 : ∀ P ∈ pathPatterns 0 2 [1, 3], HasCheckedCertificate 17 8 ([[1], [1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p674, Certificates.k17t8p674_check⟩ + +private theorem k17t8_cover1538 : ∀ P ∈ pathPatterns 0 1 [1, 4], HasCheckedCertificate 17 8 ([[1], [1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p675, Certificates.k17t8p675_check⟩ + +private theorem k17t8_cover1539 : ∀ P ∈ pathPatterns 0 0 [1, 5], HasCheckedCertificate 17 8 ([[1], [1, 1], [1, 5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p676, Certificates.k17t8p676_check⟩ + +private theorem k17t8_cover1540 : ∀ P ∈ pathPatterns 1 4 [2], HasCheckedCertificate 17 8 ([[1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1541 : ∀ P ∈ pathPatterns 0 2 [2, 2], HasCheckedCertificate 17 8 ([[1], [1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p677, Certificates.k17t8p677_check⟩ + +private theorem k17t8_cover1542 : ∀ P ∈ pathPatterns 0 1 [2, 3], HasCheckedCertificate 17 8 ([[1], [1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p678, Certificates.k17t8p678_check⟩ + +private theorem k17t8_cover1543 : ∀ P ∈ pathPatterns 0 0 [2, 4], HasCheckedCertificate 17 8 ([[1], [1, 1], [2, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p679, Certificates.k17t8p679_check⟩ + +private theorem k17t8_cover1544 : ∀ P ∈ pathPatterns 1 3 [3], HasCheckedCertificate 17 8 ([[1], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1545 : ∀ P ∈ pathPatterns 0 0 [3, 3], HasCheckedCertificate 17 8 ([[1], [1, 1], [3, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p680, Certificates.k17t8p680_check⟩ + +private theorem k17t8_cover1546 : ∀ P ∈ pathPatterns 1 2 [4], HasCheckedCertificate 17 8 ([[1], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1547 : ∀ P ∈ pathPatterns 1 1 [5], HasCheckedCertificate 17 8 ([[1], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1548 : ∀ P ∈ pathPatterns 1 0 [6], HasCheckedCertificate 17 8 ([[1], [1, 1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1534 : ∀ P ∈ pathPatterns 3 6 [1, 1], HasCheckedCertificate 17 8 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1535 + · exact by + intro _ + exact k17t8_cover1536 + · exact by + intro _ + exact k17t8_cover1537 + · exact by + intro _ + exact k17t8_cover1538 + · exact by + intro _ + exact k17t8_cover1539 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1540 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1541 + · exact by + intro _ + exact k17t8_cover1542 + · exact by + intro _ + exact k17t8_cover1543 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1544 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + intro _ + exact k17t8_cover1545 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1546 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1547 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1548 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1550 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 17 8 ([[1], [1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p681, Certificates.k17t8p681_check⟩ + +private theorem k17t8_cover1551 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 17 8 ([[1], [1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p682, Certificates.k17t8p682_check⟩ + +private theorem k17t8_cover1552 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 17 8 ([[1], [1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p683, Certificates.k17t8p683_check⟩ + +private theorem k17t8_cover1553 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 17 8 ([[1], [1, 1, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p684, Certificates.k17t8p684_check⟩ + +private theorem k17t8_cover1549 : ∀ P ∈ pathPatterns 2 5 [1, 1, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1550 + · exact by + intro _ + exact k17t8_cover1551 + · exact by + intro _ + exact k17t8_cover1552 + · exact by + intro _ + exact k17t8_cover1553 + +private theorem k17t8_cover1554 : ∀ P ∈ pathPatterns 1 4 [1, 1, 1, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1555 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 1, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p685, Certificates.k17t8p685_check⟩ + +private theorem k17t8_cover1556 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[1], [1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p686, Certificates.k17t8p686_check⟩ + +private theorem k17t8_cover1557 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[1], [1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p687, Certificates.k17t8p687_check⟩ + +private theorem k17t8_cover1558 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 4], HasCheckedCertificate 17 8 ([[1], [1, 1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p688, Certificates.k17t8p688_check⟩ + +private theorem k17t8_cover1559 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1, 2], HasCheckedCertificate 17 8 ([[1], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1560 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 2, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p689, Certificates.k17t8p689_check⟩ + +private theorem k17t8_cover1561 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2, 2], HasCheckedCertificate 17 8 ([[1], [1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p690, Certificates.k17t8p690_check⟩ + +private theorem k17t8_cover1562 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 3], HasCheckedCertificate 17 8 ([[1], [1, 1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p691, Certificates.k17t8p691_check⟩ + +private theorem k17t8_cover1563 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 3], HasCheckedCertificate 17 8 ([[1], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1564 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 3, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p692, Certificates.k17t8p692_check⟩ + +private theorem k17t8_cover1565 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3, 2], HasCheckedCertificate 17 8 ([[1], [1, 1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p693, Certificates.k17t8p693_check⟩ + +private theorem k17t8_cover1566 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 4], HasCheckedCertificate 17 8 ([[1], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1567 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 4, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p694, Certificates.k17t8p694_check⟩ + +private theorem k17t8_cover1568 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 5], HasCheckedCertificate 17 8 ([[1], [1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1570 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 17 8 ([[1], [1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p695, Certificates.k17t8p695_check⟩ + +private theorem k17t8_cover1571 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[1], [1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p696, Certificates.k17t8p696_check⟩ + +private theorem k17t8_cover1572 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[1], [1, 1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p697, Certificates.k17t8p697_check⟩ + +private theorem k17t8_cover1569 : ∀ P ∈ pathPatterns 2 4 [1, 1, 2], HasCheckedCertificate 17 8 ([[1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1570 + · exact by + intro _ + exact k17t8_cover1571 + · exact by + intro _ + exact k17t8_cover1572 + +private theorem k17t8_cover1573 : ∀ P ∈ pathPatterns 1 3 [1, 1, 2, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1574 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2, 1, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p698, Certificates.k17t8p698_check⟩ + +private theorem k17t8_cover1575 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 1, 2], HasCheckedCertificate 17 8 ([[1], [1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p699, Certificates.k17t8p699_check⟩ + +private theorem k17t8_cover1576 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 3], HasCheckedCertificate 17 8 ([[1], [1, 1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p700, Certificates.k17t8p700_check⟩ + +private theorem k17t8_cover1577 : ∀ P ∈ pathPatterns 1 2 [1, 1, 2, 2], HasCheckedCertificate 17 8 ([[1], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1578 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 2, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p701, Certificates.k17t8p701_check⟩ + +private theorem k17t8_cover1579 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 2, 2], HasCheckedCertificate 17 8 ([[1], [1, 1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p702, Certificates.k17t8p702_check⟩ + +private theorem k17t8_cover1580 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 3], HasCheckedCertificate 17 8 ([[1], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1581 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 3, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p703, Certificates.k17t8p703_check⟩ + +private theorem k17t8_cover1582 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 4], HasCheckedCertificate 17 8 ([[1], [1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1584 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[1], [1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p704, Certificates.k17t8p704_check⟩ + +private theorem k17t8_cover1585 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[1], [1, 1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p705, Certificates.k17t8p705_check⟩ + +private theorem k17t8_cover1583 : ∀ P ∈ pathPatterns 2 3 [1, 1, 3], HasCheckedCertificate 17 8 ([[1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1584 + · exact by + intro _ + exact k17t8_cover1585 + +private theorem k17t8_cover1586 : ∀ P ∈ pathPatterns 1 2 [1, 1, 3, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1587 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3, 1, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p706, Certificates.k17t8p706_check⟩ + +private theorem k17t8_cover1588 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 1, 2], HasCheckedCertificate 17 8 ([[1], [1, 1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p707, Certificates.k17t8p707_check⟩ + +private theorem k17t8_cover1589 : ∀ P ∈ pathPatterns 1 1 [1, 1, 3, 2], HasCheckedCertificate 17 8 ([[1], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1590 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 2, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 3, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p708, Certificates.k17t8p708_check⟩ + +private theorem k17t8_cover1591 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 3], HasCheckedCertificate 17 8 ([[1], [1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1593 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1], [1, 1, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p709, Certificates.k17t8p709_check⟩ + +private theorem k17t8_cover1592 : ∀ P ∈ pathPatterns 2 2 [1, 1, 4], HasCheckedCertificate 17 8 ([[1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1593 + +private theorem k17t8_cover1594 : ∀ P ∈ pathPatterns 1 1 [1, 1, 4, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1595 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4, 1, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 4, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p710, Certificates.k17t8p710_check⟩ + +private theorem k17t8_cover1596 : ∀ P ∈ pathPatterns 1 0 [1, 1, 4, 2], HasCheckedCertificate 17 8 ([[1], [1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1597 : ∀ P ∈ pathPatterns 2 1 [1, 1, 5], HasCheckedCertificate 17 8 ([[1], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1598 : ∀ P ∈ pathPatterns 1 0 [1, 1, 5, 1], HasCheckedCertificate 17 8 ([[1], [1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1599 : ∀ P ∈ pathPatterns 2 0 [1, 1, 6], HasCheckedCertificate 17 8 ([[1], [1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1533 : amountSequenceForall 3 6 (fun tail => + (LexLE [1] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1, 1] ++ tail).length) (8 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 17 8 ([[1]] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1534 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1549 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1554 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1555 + · exact by + intro _ + exact k17t8_cover1556 + · exact by + intro _ + exact k17t8_cover1557 + · exact by + intro _ + exact k17t8_cover1558 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1559 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1560 + · exact by + intro _ + exact k17t8_cover1561 + · exact by + intro _ + exact k17t8_cover1562 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1563 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1564 + · exact by + intro _ + exact k17t8_cover1565 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1566 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1567 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1568 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1569 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1573 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1574 + · exact by + intro _ + exact k17t8_cover1575 + · exact by + intro _ + exact k17t8_cover1576 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1577 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1578 + · exact by + intro _ + exact k17t8_cover1579 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1580 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1581 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1582 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1583 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1586 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1587 + · exact by + intro _ + exact k17t8_cover1588 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1589 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1590 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1591 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1592 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1594 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1595 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1596 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1597 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1598 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1599 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1602 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 17 8 ([[1], [1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p711, Certificates.k17t8p711_check⟩ + +private theorem k17t8_cover1603 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 17 8 ([[1], [1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p712, Certificates.k17t8p712_check⟩ + +private theorem k17t8_cover1604 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 17 8 ([[1], [1, 2], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p713, Certificates.k17t8p713_check⟩ + +private theorem k17t8_cover1605 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 17 8 ([[1], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1606 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 17 8 ([[1], [1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p714, Certificates.k17t8p714_check⟩ + +private theorem k17t8_cover1607 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 17 8 ([[1], [1, 2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p715, Certificates.k17t8p715_check⟩ + +private theorem k17t8_cover1608 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 17 8 ([[1], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1609 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 17 8 ([[1], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1610 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 17 8 ([[1], [1, 2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1601 : ∀ P ∈ pathPatterns 3 5 [1, 2], HasCheckedCertificate 17 8 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k17t8_cover1602 + · exact by + intro _ + exact k17t8_cover1603 + · exact by + intro _ + exact k17t8_cover1604 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1605 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1606 + · exact by + intro _ + exact k17t8_cover1607 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1608 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1609 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1610 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1612 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 17 8 ([[1], [1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p716, Certificates.k17t8p716_check⟩ + +private theorem k17t8_cover1613 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[1], [1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p717, Certificates.k17t8p717_check⟩ + +private theorem k17t8_cover1614 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[1], [1, 2, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p718, Certificates.k17t8p718_check⟩ + +private theorem k17t8_cover1611 : ∀ P ∈ pathPatterns 2 4 [1, 2, 1], HasCheckedCertificate 17 8 ([[1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1612 + · exact by + intro _ + exact k17t8_cover1613 + · exact by + intro _ + exact k17t8_cover1614 + +private theorem k17t8_cover1615 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 1, 2], HasCheckedCertificate 17 8 ([[1], [1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p719, Certificates.k17t8p719_check⟩ + +private theorem k17t8_cover1616 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 3], HasCheckedCertificate 17 8 ([[1], [1, 2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p720, Certificates.k17t8p720_check⟩ + +private theorem k17t8_cover1617 : ∀ P ∈ pathPatterns 1 2 [1, 2, 1, 2], HasCheckedCertificate 17 8 ([[1], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1618 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 2, 1], HasCheckedCertificate 17 8 ([[1], [1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p721, Certificates.k17t8p721_check⟩ + +private theorem k17t8_cover1619 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2, 2], HasCheckedCertificate 17 8 ([[1], [1, 2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p722, Certificates.k17t8p722_check⟩ + +private theorem k17t8_cover1620 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 3], HasCheckedCertificate 17 8 ([[1], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1621 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 3, 1], HasCheckedCertificate 17 8 ([[1], [1, 2, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p723, Certificates.k17t8p723_check⟩ + +private theorem k17t8_cover1622 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 4], HasCheckedCertificate 17 8 ([[1], [1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1624 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[1], [1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p724, Certificates.k17t8p724_check⟩ + +private theorem k17t8_cover1625 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[1], [1, 2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p725, Certificates.k17t8p725_check⟩ + +private theorem k17t8_cover1623 : ∀ P ∈ pathPatterns 2 3 [1, 2, 2], HasCheckedCertificate 17 8 ([[1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1624 + · exact by + intro _ + exact k17t8_cover1625 + +private theorem k17t8_cover1626 : ∀ P ∈ pathPatterns 1 2 [1, 2, 2, 1], HasCheckedCertificate 17 8 ([[1], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1627 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 1, 2], HasCheckedCertificate 17 8 ([[1], [1, 2, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p726, Certificates.k17t8p726_check⟩ + +private theorem k17t8_cover1628 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2, 2], HasCheckedCertificate 17 8 ([[1], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1629 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 2, 1], HasCheckedCertificate 17 8 ([[1], [1, 2, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p727, Certificates.k17t8p727_check⟩ + +private theorem k17t8_cover1630 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 3], HasCheckedCertificate 17 8 ([[1], [1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1632 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1], [1, 2, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p728, Certificates.k17t8p728_check⟩ + +private theorem k17t8_cover1631 : ∀ P ∈ pathPatterns 2 2 [1, 2, 3], HasCheckedCertificate 17 8 ([[1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1632 + +private theorem k17t8_cover1633 : ∀ P ∈ pathPatterns 1 1 [1, 2, 3, 1], HasCheckedCertificate 17 8 ([[1], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1634 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3, 2], HasCheckedCertificate 17 8 ([[1], [1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1635 : ∀ P ∈ pathPatterns 2 1 [1, 2, 4], HasCheckedCertificate 17 8 ([[1], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1636 : ∀ P ∈ pathPatterns 1 0 [1, 2, 4, 1], HasCheckedCertificate 17 8 ([[1], [1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1637 : ∀ P ∈ pathPatterns 2 0 [1, 2, 5], HasCheckedCertificate 17 8 ([[1], [1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1600 : amountSequenceForall 3 5 (fun tail => + (LexLE [1] ([1, 2] ++ tail) ∧ LexLE ([1, 2] ++ tail) ([1, 2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1, 2] ++ tail).length) (8 - ([1, 2] ++ tail).sum) ([1, 2] ++ tail), + HasCheckedCertificate 17 8 ([[1]] ++ (([1, 2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1601 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1611 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · exact by + intro _ + exact k17t8_cover1615 + · exact by + intro _ + exact k17t8_cover1616 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1617 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1618 + · exact by + intro _ + exact k17t8_cover1619 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1620 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1621 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1622 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1623 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1626 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · exact by + intro _ + exact k17t8_cover1627 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1628 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1629 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1630 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1631 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1633 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 2, 3, 1, 1] ∧ LexLE [1, 2, 3, 1, 1] [1, 1, 3, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1634 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1635 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1636 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1637 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1639 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 17 8 ([[1], [1, 3], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p729, Certificates.k17t8p729_check⟩ + +private theorem k17t8_cover1640 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 17 8 ([[1], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1641 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 17 8 ([[1], [1, 3], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p730, Certificates.k17t8p730_check⟩ + +private theorem k17t8_cover1642 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 17 8 ([[1], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1643 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 17 8 ([[1], [1, 3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1638 : ∀ P ∈ pathPatterns 3 4 [1, 3], HasCheckedCertificate 17 8 ([[1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro _ + exact k17t8_cover1639 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1640 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1641 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1642 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1643 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1645 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[1], [1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p731, Certificates.k17t8p731_check⟩ + +private theorem k17t8_cover1646 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[1], [1, 3, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p732, Certificates.k17t8p732_check⟩ + +private theorem k17t8_cover1644 : ∀ P ∈ pathPatterns 2 3 [1, 3, 1], HasCheckedCertificate 17 8 ([[1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1645 + · exact by + intro _ + exact k17t8_cover1646 + +private theorem k17t8_cover1647 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 1, 2], HasCheckedCertificate 17 8 ([[1], [1, 3, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p733, Certificates.k17t8p733_check⟩ + +private theorem k17t8_cover1648 : ∀ P ∈ pathPatterns 1 1 [1, 3, 1, 2], HasCheckedCertificate 17 8 ([[1], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1649 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1, 3], HasCheckedCertificate 17 8 ([[1], [1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1651 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1], [1, 3, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p734, Certificates.k17t8p734_check⟩ + +private theorem k17t8_cover1650 : ∀ P ∈ pathPatterns 2 2 [1, 3, 2], HasCheckedCertificate 17 8 ([[1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1651 + +private theorem k17t8_cover1652 : ∀ P ∈ pathPatterns 1 0 [1, 3, 2, 2], HasCheckedCertificate 17 8 ([[1], [1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1653 : ∀ P ∈ pathPatterns 2 1 [1, 3, 3], HasCheckedCertificate 17 8 ([[1], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1654 : ∀ P ∈ pathPatterns 1 0 [1, 3, 3, 1], HasCheckedCertificate 17 8 ([[1], [1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1655 : ∀ P ∈ pathPatterns 2 0 [1, 3, 4], HasCheckedCertificate 17 8 ([[1], [1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1657 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 17 8 ([[1], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1658 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[1], [1, 4], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1656 : ∀ P ∈ pathPatterns 3 3 [1, 4], HasCheckedCertificate 17 8 ([[1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1657 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1658 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1660 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1], [1, 4, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p735, Certificates.k17t8p735_check⟩ + +private theorem k17t8_cover1659 : ∀ P ∈ pathPatterns 2 2 [1, 4, 1], HasCheckedCertificate 17 8 ([[1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1660 + +private theorem k17t8_cover1661 : ∀ P ∈ pathPatterns 1 0 [1, 4, 1, 2], HasCheckedCertificate 17 8 ([[1], [1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1662 : ∀ P ∈ pathPatterns 2 1 [1, 4, 2], HasCheckedCertificate 17 8 ([[1], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1663 : ∀ P ∈ pathPatterns 2 0 [1, 4, 3], HasCheckedCertificate 17 8 ([[1], [1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1665 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[1], [1, 5], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1664 : ∀ P ∈ pathPatterns 3 2 [1, 5], HasCheckedCertificate 17 8 ([[1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1665 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1666 : ∀ P ∈ pathPatterns 2 1 [1, 5, 1], HasCheckedCertificate 17 8 ([[1], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1667 : ∀ P ∈ pathPatterns 2 0 [1, 5, 2], HasCheckedCertificate 17 8 ([[1], [1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1668 : ∀ P ∈ pathPatterns 3 1 [1, 6], HasCheckedCertificate 17 8 ([[1], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1669 : ∀ P ∈ pathPatterns 2 0 [1, 6, 1], HasCheckedCertificate 17 8 ([[1], [1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1670 : ∀ P ∈ pathPatterns 3 0 [1, 7], HasCheckedCertificate 17 8 ([[1], [1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1477 : amountSequenceForall 4 7 (fun tail => + (LexLE [1] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1] ++ tail).length) (8 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 17 8 ([[1]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1478 + · intro q + fin_cases q + · exact k17t8_seq1533 + + · exact k17t8_seq1600 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1638 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1644 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · exact by + intro _ + exact k17t8_cover1647 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1648 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 1, 2, 1] ∧ LexLE [1, 3, 1, 2, 1] [1, 2, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1649 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1650 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 3, 2, 1, 1] ∧ LexLE [1, 3, 2, 1, 1] [1, 1, 2, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1652 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1653 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1654 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1655 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1656 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1659 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 4, 1, 1, 1] ∧ LexLE [1, 4, 1, 1, 1] [1, 1, 1, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1661 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1662 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 4, 2, 1] ∧ LexLE [1, 4, 2, 1] [1, 2, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1663 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1664 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1666 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [1, 5, 1, 1] ∧ LexLE [1, 5, 1, 1] [1, 1, 5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1667 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1668 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1669 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1670 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1675 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 17 8 ([[1], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p736, Certificates.k17t8p736_check⟩ + +private theorem k17t8_cover1676 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[1], [2], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p737, Certificates.k17t8p737_check⟩ + +private theorem k17t8_cover1677 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[1], [2], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p738, Certificates.k17t8p738_check⟩ + +private theorem k17t8_cover1674 : ∀ P ∈ pathPatterns 2 4 [2], HasCheckedCertificate 17 8 ([[1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1675 + · exact by + intro _ + exact k17t8_cover1676 + · exact by + intro _ + exact k17t8_cover1677 + +private theorem k17t8_cover1678 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2], HasCheckedCertificate 17 8 ([[1], [2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p739, Certificates.k17t8p739_check⟩ + +private theorem k17t8_cover1679 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3], HasCheckedCertificate 17 8 ([[1], [2], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p740, Certificates.k17t8p740_check⟩ + +private theorem k17t8_cover1680 : ∀ P ∈ pathPatterns 1 2 [2, 2], HasCheckedCertificate 17 8 ([[1], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1681 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2], HasCheckedCertificate 17 8 ([[1], [2], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p741, Certificates.k17t8p741_check⟩ + +private theorem k17t8_cover1682 : ∀ P ∈ pathPatterns 1 1 [2, 3], HasCheckedCertificate 17 8 ([[1], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1683 : ∀ P ∈ pathPatterns 1 0 [2, 4], HasCheckedCertificate 17 8 ([[1], [2], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1685 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[1], [2], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p742, Certificates.k17t8p742_check⟩ + +private theorem k17t8_cover1684 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 17 8 ([[1], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover1685 + +private theorem k17t8_cover1686 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 17 8 ([[1], [2], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1687 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 17 8 ([[1], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover1688 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 17 8 ([[1], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1689 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 17 8 ([[1], [2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1673 : amountSequenceForall 3 6 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[1], [2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 4] ∧ LexLE [1, 1, 4] [4, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 3] ∧ LexLE [1, 2, 3] [3, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 2] ∧ LexLE [1, 3, 2] [2, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4, 1] ∧ LexLE [1, 4, 1] [1, 4, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1674 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1678 + · exact by + intro _ + exact k17t8_cover1679 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1680 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k17t8_cover1681 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1682 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1683 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1684 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1686 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1687 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1688 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1689 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1672 : ∀ P ∈ pathPatterns 4 6 [2], HasCheckedCertificate 17 8 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq1673 + + +private theorem k17t8_cover1691 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[1], [2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p743, Certificates.k17t8p743_check⟩ + +private theorem k17t8_cover1692 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[1], [2, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p744, Certificates.k17t8p744_check⟩ + +private theorem k17t8_cover1693 : ∀ P ∈ pathPatterns 1 2 [2, 1, 1, 2], HasCheckedCertificate 17 8 ([[1], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1694 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 2, 2], HasCheckedCertificate 17 8 ([[1], [2, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p745, Certificates.k17t8p745_check⟩ + +private theorem k17t8_cover1695 : ∀ P ∈ pathPatterns 1 1 [2, 1, 1, 3], HasCheckedCertificate 17 8 ([[1], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1696 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 4], HasCheckedCertificate 17 8 ([[1], [2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1698 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[1], [2, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p746, Certificates.k17t8p746_check⟩ + +private theorem k17t8_cover1697 : ∀ P ∈ pathPatterns 2 3 [2, 1, 2], HasCheckedCertificate 17 8 ([[1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover1698 + +private theorem k17t8_cover1699 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 1, 2], HasCheckedCertificate 17 8 ([[1], [2, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p747, Certificates.k17t8p747_check⟩ + +private theorem k17t8_cover1700 : ∀ P ∈ pathPatterns 1 1 [2, 1, 2, 2], HasCheckedCertificate 17 8 ([[1], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1701 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2, 3], HasCheckedCertificate 17 8 ([[1], [2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1702 : ∀ P ∈ pathPatterns 2 2 [2, 1, 3], HasCheckedCertificate 17 8 ([[1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover1703 : ∀ P ∈ pathPatterns 1 0 [2, 1, 3, 2], HasCheckedCertificate 17 8 ([[1], [2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1704 : ∀ P ∈ pathPatterns 2 1 [2, 1, 4], HasCheckedCertificate 17 8 ([[1], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1705 : ∀ P ∈ pathPatterns 2 0 [2, 1, 5], HasCheckedCertificate 17 8 ([[1], [2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1690 : amountSequenceForall 3 5 (fun tail => + (LexLE [1] ([2, 1] ++ tail) ∧ LexLE ([2, 1] ++ tail) ([2, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([2, 1] ++ tail).length) (8 - ([2, 1] ++ tail).sum) ([2, 1] ++ tail), + HasCheckedCertificate 17 8 ([[1]] ++ (([2, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1691 + · exact by + intro _ + exact k17t8_cover1692 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1693 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1694 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1695 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 1, 3, 1] ∧ LexLE [2, 1, 1, 3, 1] [1, 3, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1696 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1697 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1699 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1700 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 2, 2, 1] ∧ LexLE [2, 1, 2, 2, 1] [1, 2, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1701 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1702 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 3, 1, 1] ∧ LexLE [2, 1, 3, 1, 1] [1, 1, 3, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1703 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1704 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1, 4, 1] ∧ LexLE [2, 1, 4, 1] [1, 4, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1705 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1707 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 17 8 ([[1], [2, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p748, Certificates.k17t8p748_check⟩ + +private theorem k17t8_cover1708 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 17 8 ([[1], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1709 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 17 8 ([[1], [2, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1706 : ∀ P ∈ pathPatterns 3 4 [2, 2], HasCheckedCertificate 17 8 ([[1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1707 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1708 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1709 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1710 : ∀ P ∈ pathPatterns 1 0 [2, 2, 1, 3], HasCheckedCertificate 17 8 ([[1], [2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1711 : ∀ P ∈ pathPatterns 2 2 [2, 2, 2], HasCheckedCertificate 17 8 ([[1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover1712 : ∀ P ∈ pathPatterns 1 0 [2, 2, 2, 2], HasCheckedCertificate 17 8 ([[1], [2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1713 : ∀ P ∈ pathPatterns 2 1 [2, 2, 3], HasCheckedCertificate 17 8 ([[1], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1714 : ∀ P ∈ pathPatterns 2 0 [2, 2, 4], HasCheckedCertificate 17 8 ([[1], [2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1716 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[1], [2, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1715 : ∀ P ∈ pathPatterns 3 3 [2, 3], HasCheckedCertificate 17 8 ([[1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1716 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1717 : ∀ P ∈ pathPatterns 2 1 [2, 3, 2], HasCheckedCertificate 17 8 ([[1], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1718 : ∀ P ∈ pathPatterns 2 0 [2, 3, 3], HasCheckedCertificate 17 8 ([[1], [2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1719 : ∀ P ∈ pathPatterns 3 2 [2, 4], HasCheckedCertificate 17 8 ([[1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1720 : ∀ P ∈ pathPatterns 2 0 [2, 4, 2], HasCheckedCertificate 17 8 ([[1], [2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1721 : ∀ P ∈ pathPatterns 3 1 [2, 5], HasCheckedCertificate 17 8 ([[1], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1722 : ∀ P ∈ pathPatterns 3 0 [2, 6], HasCheckedCertificate 17 8 ([[1], [2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1671 : amountSequenceForall 4 6 (fun tail => + (LexLE [1] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([2] ++ tail).length) (8 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 17 8 ([[1]] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1672 + · intro q + fin_cases q + · exact k17t8_seq1690 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1706 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 1, 2] ∧ LexLE [2, 2, 1, 1, 2] [2, 1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 1, 2, 1] ∧ LexLE [2, 2, 1, 2, 1] [1, 2, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1710 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1711 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 2, 1, 1] ∧ LexLE [2, 2, 2, 1, 1] [1, 1, 2, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1712 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1713 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 2, 3, 1] ∧ LexLE [2, 2, 3, 1] [1, 3, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1714 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1715 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1, 1, 1] ∧ LexLE [2, 3, 1, 1, 1] [1, 1, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 1, 2] ∧ LexLE [2, 3, 1, 2] [2, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1717 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 3, 2, 1] ∧ LexLE [2, 3, 2, 1] [1, 2, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1718 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1719 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 4, 1, 1] ∧ LexLE [2, 4, 1, 1] [1, 1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1720 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1721 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1722 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1726 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 17 8 ([[1], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover1727 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 17 8 ([[1], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1728 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 17 8 ([[1], [3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1725 : amountSequenceForall 3 5 (fun tail => + (LexLE [3] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[1], [3]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 2] ∧ LexLE [2, 1, 2] [2, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1726 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1727 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1728 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1724 : ∀ P ∈ pathPatterns 4 5 [3], HasCheckedCertificate 17 8 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq1725 + + +private theorem k17t8_cover1729 : ∀ P ∈ pathPatterns 1 0 [3, 1, 1, 3], HasCheckedCertificate 17 8 ([[1], [3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1730 : ∀ P ∈ pathPatterns 2 1 [3, 1, 3], HasCheckedCertificate 17 8 ([[1], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1731 : ∀ P ∈ pathPatterns 2 0 [3, 1, 4], HasCheckedCertificate 17 8 ([[1], [3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1732 : ∀ P ∈ pathPatterns 2 0 [3, 2, 3], HasCheckedCertificate 17 8 ([[1], [3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1733 : ∀ P ∈ pathPatterns 3 2 [3, 3], HasCheckedCertificate 17 8 ([[1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1734 : ∀ P ∈ pathPatterns 3 1 [3, 4], HasCheckedCertificate 17 8 ([[1], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1735 : ∀ P ∈ pathPatterns 3 0 [3, 5], HasCheckedCertificate 17 8 ([[1], [3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1723 : amountSequenceForall 4 5 (fun tail => + (LexLE [1] ([3] ++ tail) ∧ LexLE ([3] ++ tail) ([3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([3] ++ tail).length) (8 - ([3] ++ tail).sum) ([3] ++ tail), + HasCheckedCertificate 17 8 ([[1]] ++ (([3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1724 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 1, 2] ∧ LexLE [3, 1, 1, 1, 2] [2, 1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 1, 2, 1] ∧ LexLE [3, 1, 1, 2, 1] [1, 2, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1729 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2, 1, 1] ∧ LexLE [3, 1, 2, 1, 1] [1, 1, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 2, 2] ∧ LexLE [3, 1, 2, 2] [2, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1730 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 1, 3, 1] ∧ LexLE [3, 1, 3, 1] [1, 3, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1731 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1, 1, 1] ∧ LexLE [3, 2, 1, 1, 1] [1, 1, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 1, 2] ∧ LexLE [3, 2, 1, 2] [2, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 2, 2, 1] ∧ LexLE [3, 2, 2, 1] [1, 2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1732 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1733 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 3, 1, 1] ∧ LexLE [3, 3, 1, 1] [1, 1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1734 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1735 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1737 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 17 8 ([[1], [4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1736 : ∀ P ∈ pathPatterns 4 4 [4], HasCheckedCertificate 17 8 ([[1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1737 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1738 : ∀ P ∈ pathPatterns 3 0 [4, 4], HasCheckedCertificate 17 8 ([[1], [4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1739 : ∀ P ∈ pathPatterns 4 3 [5], HasCheckedCertificate 17 8 ([[1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1740 : ∀ P ∈ pathPatterns 4 2 [6], HasCheckedCertificate 17 8 ([[1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1741 : ∀ P ∈ pathPatterns 4 1 [7], HasCheckedCertificate 17 8 ([[1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1742 : ∀ P ∈ pathPatterns 4 0 [8], HasCheckedCertificate 17 8 ([[1], [8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1476 : amountSequenceForall 5 8 (fun tail => + (LexLE [1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (8 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k17t8_seq1477 + + · exact k17t8_seq1671 + + · exact k17t8_seq1723 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1736 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1, 1, 1] ∧ LexLE [4, 1, 1, 1, 1] [1, 1, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 1, 2] ∧ LexLE [4, 1, 1, 2] [2, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 2, 1] ∧ LexLE [4, 1, 2, 1] [1, 2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2, 1, 1] ∧ LexLE [4, 2, 1, 1] [1, 1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1738 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1739 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1, 1, 1] ∧ LexLE [5, 1, 1, 1] [1, 1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1740 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1741 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1742 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1475 : ∀ P ∈ pathPatterns 6 8 [1], HasCheckedCertificate 17 8 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq1476 + + +private theorem k17t8_cover1748 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 17 8 ([[1, 1], [1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p749, Certificates.k17t8p749_check⟩ + +private theorem k17t8_cover1749 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 17 8 ([[1, 1], [1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p750, Certificates.k17t8p750_check⟩ + +private theorem k17t8_cover1750 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 17 8 ([[1, 1], [1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p751, Certificates.k17t8p751_check⟩ + +private theorem k17t8_cover1751 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 17 8 ([[1, 1], [1, 1], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p752, Certificates.k17t8p752_check⟩ + +private theorem k17t8_cover1747 : ∀ P ∈ pathPatterns 2 5 [1, 1], HasCheckedCertificate 17 8 ([[1, 1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1748 + · exact by + intro _ + exact k17t8_cover1749 + · exact by + intro _ + exact k17t8_cover1750 + · exact by + intro _ + exact k17t8_cover1751 + +private theorem k17t8_cover1752 : ∀ P ∈ pathPatterns 1 4 [1, 1, 1], HasCheckedCertificate 17 8 ([[1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1753 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1, 1], HasCheckedCertificate 17 8 ([[1, 1], [1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p753, Certificates.k17t8p753_check⟩ + +private theorem k17t8_cover1754 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 1], [1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p754, Certificates.k17t8p754_check⟩ + +private theorem k17t8_cover1755 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 3], HasCheckedCertificate 17 8 ([[1, 1], [1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p755, Certificates.k17t8p755_check⟩ + +private theorem k17t8_cover1756 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 4], HasCheckedCertificate 17 8 ([[1, 1], [1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p756, Certificates.k17t8p756_check⟩ + +private theorem k17t8_cover1757 : ∀ P ∈ pathPatterns 1 3 [1, 1, 2], HasCheckedCertificate 17 8 ([[1, 1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1758 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2, 1], HasCheckedCertificate 17 8 ([[1, 1], [1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p757, Certificates.k17t8p757_check⟩ + +private theorem k17t8_cover1759 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2, 2], HasCheckedCertificate 17 8 ([[1, 1], [1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p758, Certificates.k17t8p758_check⟩ + +private theorem k17t8_cover1760 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 3], HasCheckedCertificate 17 8 ([[1, 1], [1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p759, Certificates.k17t8p759_check⟩ + +private theorem k17t8_cover1761 : ∀ P ∈ pathPatterns 1 2 [1, 1, 3], HasCheckedCertificate 17 8 ([[1, 1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1762 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3, 1], HasCheckedCertificate 17 8 ([[1, 1], [1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p760, Certificates.k17t8p760_check⟩ + +private theorem k17t8_cover1763 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3, 2], HasCheckedCertificate 17 8 ([[1, 1], [1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p761, Certificates.k17t8p761_check⟩ + +private theorem k17t8_cover1764 : ∀ P ∈ pathPatterns 1 1 [1, 1, 4], HasCheckedCertificate 17 8 ([[1, 1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1765 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4, 1], HasCheckedCertificate 17 8 ([[1, 1], [1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p762, Certificates.k17t8p762_check⟩ + +private theorem k17t8_cover1766 : ∀ P ∈ pathPatterns 1 0 [1, 1, 5], HasCheckedCertificate 17 8 ([[1, 1], [1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1768 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 17 8 ([[1, 1], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p763, Certificates.k17t8p763_check⟩ + +private theorem k17t8_cover1769 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[1, 1], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p764, Certificates.k17t8p764_check⟩ + +private theorem k17t8_cover1770 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[1, 1], [1, 2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p765, Certificates.k17t8p765_check⟩ + +private theorem k17t8_cover1767 : ∀ P ∈ pathPatterns 2 4 [1, 2], HasCheckedCertificate 17 8 ([[1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1768 + · exact by + intro _ + exact k17t8_cover1769 + · exact by + intro _ + exact k17t8_cover1770 + +private theorem k17t8_cover1771 : ∀ P ∈ pathPatterns 1 3 [1, 2, 1], HasCheckedCertificate 17 8 ([[1, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1772 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1, 2], HasCheckedCertificate 17 8 ([[1, 1], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p766, Certificates.k17t8p766_check⟩ + +private theorem k17t8_cover1773 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 3], HasCheckedCertificate 17 8 ([[1, 1], [1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p767, Certificates.k17t8p767_check⟩ + +private theorem k17t8_cover1774 : ∀ P ∈ pathPatterns 1 2 [1, 2, 2], HasCheckedCertificate 17 8 ([[1, 1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1775 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2, 1], HasCheckedCertificate 17 8 ([[1, 1], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p768, Certificates.k17t8p768_check⟩ + +private theorem k17t8_cover1776 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 2], HasCheckedCertificate 17 8 ([[1, 1], [1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p769, Certificates.k17t8p769_check⟩ + +private theorem k17t8_cover1777 : ∀ P ∈ pathPatterns 1 1 [1, 2, 3], HasCheckedCertificate 17 8 ([[1, 1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1778 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3, 1], HasCheckedCertificate 17 8 ([[1, 1], [1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p770, Certificates.k17t8p770_check⟩ + +private theorem k17t8_cover1779 : ∀ P ∈ pathPatterns 1 0 [1, 2, 4], HasCheckedCertificate 17 8 ([[1, 1], [1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1781 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[1, 1], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p771, Certificates.k17t8p771_check⟩ + +private theorem k17t8_cover1782 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[1, 1], [1, 3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p772, Certificates.k17t8p772_check⟩ + +private theorem k17t8_cover1780 : ∀ P ∈ pathPatterns 2 3 [1, 3], HasCheckedCertificate 17 8 ([[1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1781 + · exact by + intro _ + exact k17t8_cover1782 + +private theorem k17t8_cover1783 : ∀ P ∈ pathPatterns 1 2 [1, 3, 1], HasCheckedCertificate 17 8 ([[1, 1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1784 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1, 2], HasCheckedCertificate 17 8 ([[1, 1], [1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p773, Certificates.k17t8p773_check⟩ + +private theorem k17t8_cover1785 : ∀ P ∈ pathPatterns 1 1 [1, 3, 2], HasCheckedCertificate 17 8 ([[1, 1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1786 : ∀ P ∈ pathPatterns 1 0 [1, 3, 3], HasCheckedCertificate 17 8 ([[1, 1], [1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1788 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1, 1], [1, 4], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p774, Certificates.k17t8p774_check⟩ + +private theorem k17t8_cover1787 : ∀ P ∈ pathPatterns 2 2 [1, 4], HasCheckedCertificate 17 8 ([[1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1788 + +private theorem k17t8_cover1789 : ∀ P ∈ pathPatterns 1 1 [1, 4, 1], HasCheckedCertificate 17 8 ([[1, 1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1790 : ∀ P ∈ pathPatterns 1 0 [1, 4, 2], HasCheckedCertificate 17 8 ([[1, 1], [1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1791 : ∀ P ∈ pathPatterns 2 1 [1, 5], HasCheckedCertificate 17 8 ([[1, 1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1792 : ∀ P ∈ pathPatterns 1 0 [1, 5, 1], HasCheckedCertificate 17 8 ([[1, 1], [1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1793 : ∀ P ∈ pathPatterns 2 0 [1, 6], HasCheckedCertificate 17 8 ([[1, 1], [1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1746 : amountSequenceForall 3 6 (fun tail => + (LexLE [1, 1] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (7 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 17 8 ([[1, 1]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1747 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1752 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1753 + · exact by + intro _ + exact k17t8_cover1754 + · exact by + intro _ + exact k17t8_cover1755 + · exact by + intro _ + exact k17t8_cover1756 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1757 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1758 + · exact by + intro _ + exact k17t8_cover1759 + · exact by + intro _ + exact k17t8_cover1760 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1761 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1762 + · exact by + intro _ + exact k17t8_cover1763 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1764 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1765 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1766 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1767 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1771 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k17t8_cover1772 + · exact by + intro _ + exact k17t8_cover1773 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1774 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1775 + · exact by + intro _ + exact k17t8_cover1776 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1777 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1778 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1779 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1780 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1783 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + intro _ + exact k17t8_cover1784 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1785 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1786 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1787 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1789 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1790 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1791 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1792 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1793 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1796 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 17 8 ([[1, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1797 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 17 8 ([[1, 1], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p775, Certificates.k17t8p775_check⟩ + +private theorem k17t8_cover1798 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 17 8 ([[1, 1], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p776, Certificates.k17t8p776_check⟩ + +private theorem k17t8_cover1799 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 17 8 ([[1, 1], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1800 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 17 8 ([[1, 1], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1801 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 17 8 ([[1, 1], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1795 : ∀ P ∈ pathPatterns 3 5 [2], HasCheckedCertificate 17 8 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1796 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1797 + · exact by + intro _ + exact k17t8_cover1798 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1799 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1800 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1801 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1802 : ∀ P ∈ pathPatterns 0 1 [2, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 1], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p777, Certificates.k17t8p777_check⟩ + +private theorem k17t8_cover1803 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 3], HasCheckedCertificate 17 8 ([[1, 1], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p778, Certificates.k17t8p778_check⟩ + +private theorem k17t8_cover1804 : ∀ P ∈ pathPatterns 1 2 [2, 1, 2], HasCheckedCertificate 17 8 ([[1, 1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1805 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2, 2], HasCheckedCertificate 17 8 ([[1, 1], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p779, Certificates.k17t8p779_check⟩ + +private theorem k17t8_cover1806 : ∀ P ∈ pathPatterns 1 1 [2, 1, 3], HasCheckedCertificate 17 8 ([[1, 1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1807 : ∀ P ∈ pathPatterns 1 0 [2, 1, 4], HasCheckedCertificate 17 8 ([[1, 1], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1809 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[1, 1], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p780, Certificates.k17t8p780_check⟩ + +private theorem k17t8_cover1808 : ∀ P ∈ pathPatterns 2 3 [2, 2], HasCheckedCertificate 17 8 ([[1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover1809 + +private theorem k17t8_cover1810 : ∀ P ∈ pathPatterns 1 1 [2, 2, 2], HasCheckedCertificate 17 8 ([[1, 1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1811 : ∀ P ∈ pathPatterns 1 0 [2, 2, 3], HasCheckedCertificate 17 8 ([[1, 1], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1812 : ∀ P ∈ pathPatterns 2 2 [2, 3], HasCheckedCertificate 17 8 ([[1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover1813 : ∀ P ∈ pathPatterns 1 0 [2, 3, 2], HasCheckedCertificate 17 8 ([[1, 1], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1814 : ∀ P ∈ pathPatterns 2 1 [2, 4], HasCheckedCertificate 17 8 ([[1, 1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1815 : ∀ P ∈ pathPatterns 2 0 [2, 5], HasCheckedCertificate 17 8 ([[1, 1], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1794 : amountSequenceForall 3 5 (fun tail => + (LexLE [1, 1] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([2] ++ tail).length) (7 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 17 8 ([[1, 1]] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1795 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1802 + · exact by + intro _ + exact k17t8_cover1803 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1804 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1805 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1806 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1807 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1808 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1810 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1811 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1812 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1813 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1814 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1815 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1817 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 17 8 ([[1, 1], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1818 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 17 8 ([[1, 1], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1816 : ∀ P ∈ pathPatterns 3 4 [3], HasCheckedCertificate 17 8 ([[1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1817 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1818 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1819 : ∀ P ∈ pathPatterns 1 0 [3, 1, 3], HasCheckedCertificate 17 8 ([[1, 1], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1820 : ∀ P ∈ pathPatterns 2 1 [3, 3], HasCheckedCertificate 17 8 ([[1, 1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1821 : ∀ P ∈ pathPatterns 2 0 [3, 4], HasCheckedCertificate 17 8 ([[1, 1], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1822 : ∀ P ∈ pathPatterns 3 3 [4], HasCheckedCertificate 17 8 ([[1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1823 : ∀ P ∈ pathPatterns 3 2 [5], HasCheckedCertificate 17 8 ([[1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1824 : ∀ P ∈ pathPatterns 3 1 [6], HasCheckedCertificate 17 8 ([[1, 1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1825 : ∀ P ∈ pathPatterns 3 0 [7], HasCheckedCertificate 17 8 ([[1, 1], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1745 : amountSequenceForall 4 7 (fun tail => + (LexLE [1, 1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[1, 1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k17t8_seq1746 + + · exact k17t8_seq1794 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1816 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1819 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1820 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1821 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1822 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1823 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1824 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1825 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1744 : ∀ P ∈ pathPatterns 5 7 [1, 1], HasCheckedCertificate 17 8 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq1745 + + +private theorem k17t8_cover1829 : ∀ P ∈ pathPatterns 0 3 [1, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 1], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p781, Certificates.k17t8p781_check⟩ + +private theorem k17t8_cover1830 : ∀ P ∈ pathPatterns 0 2 [1, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 1], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p782, Certificates.k17t8p782_check⟩ + +private theorem k17t8_cover1831 : ∀ P ∈ pathPatterns 0 1 [1, 1, 3], HasCheckedCertificate 17 8 ([[1, 1, 1], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p783, Certificates.k17t8p783_check⟩ + +private theorem k17t8_cover1832 : ∀ P ∈ pathPatterns 0 0 [1, 1, 4], HasCheckedCertificate 17 8 ([[1, 1, 1], [1, 1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p784, Certificates.k17t8p784_check⟩ + +private theorem k17t8_cover1833 : ∀ P ∈ pathPatterns 1 3 [1, 2], HasCheckedCertificate 17 8 ([[1, 1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1834 : ∀ P ∈ pathPatterns 0 2 [1, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p785, Certificates.k17t8p785_check⟩ + +private theorem k17t8_cover1835 : ∀ P ∈ pathPatterns 0 1 [1, 2, 2], HasCheckedCertificate 17 8 ([[1, 1, 1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p786, Certificates.k17t8p786_check⟩ + +private theorem k17t8_cover1836 : ∀ P ∈ pathPatterns 0 0 [1, 2, 3], HasCheckedCertificate 17 8 ([[1, 1, 1], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p787, Certificates.k17t8p787_check⟩ + +private theorem k17t8_cover1837 : ∀ P ∈ pathPatterns 1 2 [1, 3], HasCheckedCertificate 17 8 ([[1, 1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1838 : ∀ P ∈ pathPatterns 0 1 [1, 3, 1], HasCheckedCertificate 17 8 ([[1, 1, 1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p788, Certificates.k17t8p788_check⟩ + +private theorem k17t8_cover1839 : ∀ P ∈ pathPatterns 0 0 [1, 3, 2], HasCheckedCertificate 17 8 ([[1, 1, 1], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p789, Certificates.k17t8p789_check⟩ + +private theorem k17t8_cover1840 : ∀ P ∈ pathPatterns 1 1 [1, 4], HasCheckedCertificate 17 8 ([[1, 1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1841 : ∀ P ∈ pathPatterns 0 0 [1, 4, 1], HasCheckedCertificate 17 8 ([[1, 1, 1], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p790, Certificates.k17t8p790_check⟩ + +private theorem k17t8_cover1842 : ∀ P ∈ pathPatterns 1 0 [1, 5], HasCheckedCertificate 17 8 ([[1, 1, 1], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1844 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 17 8 ([[1, 1, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p791, Certificates.k17t8p791_check⟩ + +private theorem k17t8_cover1845 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[1, 1, 1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p792, Certificates.k17t8p792_check⟩ + +private theorem k17t8_cover1846 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[1, 1, 1], [2], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p793, Certificates.k17t8p793_check⟩ + +private theorem k17t8_cover1843 : ∀ P ∈ pathPatterns 2 4 [2], HasCheckedCertificate 17 8 ([[1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1844 + · exact by + intro _ + exact k17t8_cover1845 + · exact by + intro _ + exact k17t8_cover1846 + +private theorem k17t8_cover1847 : ∀ P ∈ pathPatterns 0 1 [2, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p794, Certificates.k17t8p794_check⟩ + +private theorem k17t8_cover1848 : ∀ P ∈ pathPatterns 0 0 [2, 1, 3], HasCheckedCertificate 17 8 ([[1, 1, 1], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p795, Certificates.k17t8p795_check⟩ + +private theorem k17t8_cover1849 : ∀ P ∈ pathPatterns 1 2 [2, 2], HasCheckedCertificate 17 8 ([[1, 1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1850 : ∀ P ∈ pathPatterns 0 0 [2, 2, 2], HasCheckedCertificate 17 8 ([[1, 1, 1], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p796, Certificates.k17t8p796_check⟩ + +private theorem k17t8_cover1851 : ∀ P ∈ pathPatterns 1 1 [2, 3], HasCheckedCertificate 17 8 ([[1, 1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1852 : ∀ P ∈ pathPatterns 1 0 [2, 4], HasCheckedCertificate 17 8 ([[1, 1, 1], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1854 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[1, 1, 1], [3], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p797, Certificates.k17t8p797_check⟩ + +private theorem k17t8_cover1853 : ∀ P ∈ pathPatterns 2 3 [3], HasCheckedCertificate 17 8 ([[1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · exact by + intro _ + exact k17t8_cover1854 + +private theorem k17t8_cover1855 : ∀ P ∈ pathPatterns 1 0 [3, 3], HasCheckedCertificate 17 8 ([[1, 1, 1], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1856 : ∀ P ∈ pathPatterns 2 2 [4], HasCheckedCertificate 17 8 ([[1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover1857 : ∀ P ∈ pathPatterns 2 1 [5], HasCheckedCertificate 17 8 ([[1, 1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1858 : ∀ P ∈ pathPatterns 2 0 [6], HasCheckedCertificate 17 8 ([[1, 1, 1], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1828 : amountSequenceForall 3 6 (fun tail => + (LexLE [1, 1, 1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[1, 1, 1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1829 + · exact by + intro _ + exact k17t8_cover1830 + · exact by + intro _ + exact k17t8_cover1831 + · exact by + intro _ + exact k17t8_cover1832 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1833 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1834 + · exact by + intro _ + exact k17t8_cover1835 + · exact by + intro _ + exact k17t8_cover1836 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1837 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1838 + · exact by + intro _ + exact k17t8_cover1839 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1840 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1841 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1842 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1843 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1847 + · exact by + intro _ + exact k17t8_cover1848 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1849 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + intro _ + exact k17t8_cover1850 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1851 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1852 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1853 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1855 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1856 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1857 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1858 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1827 : ∀ P ∈ pathPatterns 4 6 [1, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq1828 + + +private theorem k17t8_cover1861 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p798, Certificates.k17t8p798_check⟩ + +private theorem k17t8_cover1862 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 17 8 ([[1, 1, 1, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p799, Certificates.k17t8p799_check⟩ + +private theorem k17t8_cover1863 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 17 8 ([[1, 1, 1, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p800, Certificates.k17t8p800_check⟩ + +private theorem k17t8_cover1864 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 17 8 ([[1, 1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1865 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p801, Certificates.k17t8p801_check⟩ + +private theorem k17t8_cover1866 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 17 8 ([[1, 1, 1, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p802, Certificates.k17t8p802_check⟩ + +private theorem k17t8_cover1867 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 17 8 ([[1, 1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1868 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 17 8 ([[1, 1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1869 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 17 8 ([[1, 1, 1, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1860 : ∀ P ∈ pathPatterns 3 5 [1, 1, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k17t8_cover1861 + · exact by + intro _ + exact k17t8_cover1862 + · exact by + intro _ + exact k17t8_cover1863 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1864 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1865 + · exact by + intro _ + exact k17t8_cover1866 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1867 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1868 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1869 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1871 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p803, Certificates.k17t8p803_check⟩ + +private theorem k17t8_cover1872 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p804, Certificates.k17t8p804_check⟩ + +private theorem k17t8_cover1873 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p805, Certificates.k17t8p805_check⟩ + +private theorem k17t8_cover1870 : ∀ P ∈ pathPatterns 2 4 [1, 1, 1, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1871 + · exact by + intro _ + exact k17t8_cover1872 + · exact by + intro _ + exact k17t8_cover1873 + +private theorem k17t8_cover1874 : ∀ P ∈ pathPatterns 1 3 [1, 1, 1, 1, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1875 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1, 1, 1, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p806, Certificates.k17t8p806_check⟩ + +private theorem k17t8_cover1876 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p807, Certificates.k17t8p807_check⟩ + +private theorem k17t8_cover1877 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p808, Certificates.k17t8p808_check⟩ + +private theorem k17t8_cover1878 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1879 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 1, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p809, Certificates.k17t8p809_check⟩ + +private theorem k17t8_cover1880 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1, 2, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p810, Certificates.k17t8p810_check⟩ + +private theorem k17t8_cover1881 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1882 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 1, 3, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p811, Certificates.k17t8p811_check⟩ + +private theorem k17t8_cover1883 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 1, 4], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1885 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p812, Certificates.k17t8p812_check⟩ + +private theorem k17t8_cover1886 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p813, Certificates.k17t8p813_check⟩ + +private theorem k17t8_cover1884 : ∀ P ∈ pathPatterns 2 3 [1, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1885 + · exact by + intro _ + exact k17t8_cover1886 + +private theorem k17t8_cover1887 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 1, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1888 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 1, 2, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p814, Certificates.k17t8p814_check⟩ + +private theorem k17t8_cover1889 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 2, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p815, Certificates.k17t8p815_check⟩ + +private theorem k17t8_cover1890 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1, 2, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1891 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 2, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p816, Certificates.k17t8p816_check⟩ + +private theorem k17t8_cover1892 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 2, 3], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1894 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p817, Certificates.k17t8p817_check⟩ + +private theorem k17t8_cover1893 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1894 + +private theorem k17t8_cover1895 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 1, 3, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1896 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1, 3, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p818, Certificates.k17t8p818_check⟩ + +private theorem k17t8_cover1897 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 3, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1898 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 1, 4], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1899 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 1, 4, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1900 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 1, 5], HasCheckedCertificate 17 8 ([[1, 1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1859 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([1, 1, 1, 1] ++ tail) ∧ LexLE ([1, 1, 1, 1] ++ tail) ([1, 1, 1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([1, 1, 1, 1] ++ tail).length) (9 - ([1, 1, 1, 1] ++ tail).sum) ([1, 1, 1, 1] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([1, 1, 1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1860 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1870 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1874 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1875 + · exact by + intro _ + exact k17t8_cover1876 + · exact by + intro _ + exact k17t8_cover1877 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1878 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1879 + · exact by + intro _ + exact k17t8_cover1880 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1881 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1882 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1883 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1884 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1887 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1888 + · exact by + intro _ + exact k17t8_cover1889 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1890 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1891 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1892 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1893 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1895 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1896 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1897 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1898 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1899 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1900 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1902 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p819, Certificates.k17t8p819_check⟩ + +private theorem k17t8_cover1903 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 17 8 ([[1, 1, 1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p820, Certificates.k17t8p820_check⟩ + +private theorem k17t8_cover1904 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 17 8 ([[1, 1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1905 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p821, Certificates.k17t8p821_check⟩ + +private theorem k17t8_cover1906 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 17 8 ([[1, 1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1907 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 17 8 ([[1, 1, 1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1901 : ∀ P ∈ pathPatterns 3 4 [1, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k17t8_cover1902 + · exact by + intro _ + exact k17t8_cover1903 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1904 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1905 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1906 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1907 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1909 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p822, Certificates.k17t8p822_check⟩ + +private theorem k17t8_cover1910 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p823, Certificates.k17t8p823_check⟩ + +private theorem k17t8_cover1908 : ∀ P ∈ pathPatterns 2 3 [1, 1, 1, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1909 + · exact by + intro _ + exact k17t8_cover1910 + +private theorem k17t8_cover1911 : ∀ P ∈ pathPatterns 1 2 [1, 1, 1, 2, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1912 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1, 2, 1, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p824, Certificates.k17t8p824_check⟩ + +private theorem k17t8_cover1913 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p825, Certificates.k17t8p825_check⟩ + +private theorem k17t8_cover1914 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 2, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1915 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 1, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p826, Certificates.k17t8p826_check⟩ + +private theorem k17t8_cover1916 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2, 1, 3], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1918 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p827, Certificates.k17t8p827_check⟩ + +private theorem k17t8_cover1917 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1, 2, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1918 + +private theorem k17t8_cover1919 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 2, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1920 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 2, 2, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p828, Certificates.k17t8p828_check⟩ + +private theorem k17t8_cover1921 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2, 2, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1922 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 2, 3], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1923 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 2, 3, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1924 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 2, 4], HasCheckedCertificate 17 8 ([[1, 1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1926 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 3], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p829, Certificates.k17t8p829_check⟩ + +private theorem k17t8_cover1927 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 17 8 ([[1, 1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1928 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[1, 1, 1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1925 : ∀ P ∈ pathPatterns 3 3 [1, 1, 1, 3], HasCheckedCertificate 17 8 ([[1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k17t8_cover1926 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1927 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1928 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1930 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1, 1, 1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p830, Certificates.k17t8p830_check⟩ + +private theorem k17t8_cover1929 : ∀ P ∈ pathPatterns 2 2 [1, 1, 1, 3, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1930 + +private theorem k17t8_cover1931 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1, 3, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1932 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 3, 1, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 3, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p831, Certificates.k17t8p831_check⟩ + +private theorem k17t8_cover1933 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 3, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1934 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 3, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1935 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 3, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 3, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1936 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 3, 3], HasCheckedCertificate 17 8 ([[1, 1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1938 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[1, 1, 1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1937 : ∀ P ∈ pathPatterns 3 2 [1, 1, 1, 4], HasCheckedCertificate 17 8 ([[1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1938 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1939 : ∀ P ∈ pathPatterns 2 1 [1, 1, 1, 4, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1940 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1, 4, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 4, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1941 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 4, 2], HasCheckedCertificate 17 8 ([[1, 1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1942 : ∀ P ∈ pathPatterns 3 1 [1, 1, 1, 5], HasCheckedCertificate 17 8 ([[1, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1943 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1, 5, 1], HasCheckedCertificate 17 8 ([[1, 1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1944 : ∀ P ∈ pathPatterns 3 0 [1, 1, 1, 6], HasCheckedCertificate 17 8 ([[1, 1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1826 : amountSequenceForall 4 6 (fun tail => + (LexLE [] ([1, 1, 1] ++ tail) ∧ LexLE ([1, 1, 1] ++ tail) ([1, 1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([1, 1, 1] ++ tail).length) (9 - ([1, 1, 1] ++ tail).sum) ([1, 1, 1] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([1, 1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1827 + · intro q + fin_cases q + · exact k17t8_seq1859 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1901 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1908 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1911 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1912 + · exact by + intro _ + exact k17t8_cover1913 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1914 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1915 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1916 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1917 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1919 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1920 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1921 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1922 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1923 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1924 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1925 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1929 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1931 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1932 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1933 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1934 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1935 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1936 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1937 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1939 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1940 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1941 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1942 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1943 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1944 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1948 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 2], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p832, Certificates.k17t8p832_check⟩ + +private theorem k17t8_cover1949 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3], HasCheckedCertificate 17 8 ([[1, 1, 2], [1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p833, Certificates.k17t8p833_check⟩ + +private theorem k17t8_cover1950 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 17 8 ([[1, 1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1951 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 2], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p834, Certificates.k17t8p834_check⟩ + +private theorem k17t8_cover1952 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 17 8 ([[1, 1, 2], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p835, Certificates.k17t8p835_check⟩ + +private theorem k17t8_cover1953 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 17 8 ([[1, 1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1954 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 17 8 ([[1, 1, 2], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p836, Certificates.k17t8p836_check⟩ + +private theorem k17t8_cover1955 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 17 8 ([[1, 1, 2], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1957 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[1, 1, 2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p837, Certificates.k17t8p837_check⟩ + +private theorem k17t8_cover1958 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[1, 1, 2], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p838, Certificates.k17t8p838_check⟩ + +private theorem k17t8_cover1956 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 17 8 ([[1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1957 + · exact by + intro _ + exact k17t8_cover1958 + +private theorem k17t8_cover1959 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p839, Certificates.k17t8p839_check⟩ + +private theorem k17t8_cover1960 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 17 8 ([[1, 1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1961 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 17 8 ([[1, 1, 2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1962 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 17 8 ([[1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover1963 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 17 8 ([[1, 1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1964 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 17 8 ([[1, 1, 2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1947 : amountSequenceForall 3 5 (fun tail => + (LexLE [1, 1, 2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[1, 1, 2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro _ + exact k17t8_cover1948 + · exact by + intro _ + exact k17t8_cover1949 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1950 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1951 + · exact by + intro _ + exact k17t8_cover1952 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1953 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1954 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1955 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1956 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover1959 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1960 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1961 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1962 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1963 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1964 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1946 : ∀ P ∈ pathPatterns 4 5 [1, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq1947 + + +private theorem k17t8_cover1966 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 17 8 ([[1, 1, 2, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p840, Certificates.k17t8p840_check⟩ + +private theorem k17t8_cover1967 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 17 8 ([[1, 1, 2, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p841, Certificates.k17t8p841_check⟩ + +private theorem k17t8_cover1968 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 17 8 ([[1, 1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1969 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 17 8 ([[1, 1, 2, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p842, Certificates.k17t8p842_check⟩ + +private theorem k17t8_cover1970 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 17 8 ([[1, 1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1971 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 17 8 ([[1, 1, 2, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1965 : ∀ P ∈ pathPatterns 3 4 [1, 1, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k17t8_cover1966 + · exact by + intro _ + exact k17t8_cover1967 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1968 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover1969 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1970 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1971 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1973 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[1, 1, 2, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p843, Certificates.k17t8p843_check⟩ + +private theorem k17t8_cover1974 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[1, 1, 2, 1, 1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p844, Certificates.k17t8p844_check⟩ + +private theorem k17t8_cover1972 : ∀ P ∈ pathPatterns 2 3 [1, 1, 2, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1973 + · exact by + intro _ + exact k17t8_cover1974 + +private theorem k17t8_cover1975 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p845, Certificates.k17t8p845_check⟩ + +private theorem k17t8_cover1976 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1977 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 1, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 2, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p846, Certificates.k17t8p846_check⟩ + +private theorem k17t8_cover1978 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1, 1, 3], HasCheckedCertificate 17 8 ([[1, 1, 2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1980 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1, 1, 2, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p847, Certificates.k17t8p847_check⟩ + +private theorem k17t8_cover1979 : ∀ P ∈ pathPatterns 2 2 [1, 1, 2, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1980 + +private theorem k17t8_cover1981 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 1, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1982 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2, 1, 2, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 2, 1, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p848, Certificates.k17t8p848_check⟩ + +private theorem k17t8_cover1983 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1, 2, 2], HasCheckedCertificate 17 8 ([[1, 1, 2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1984 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2, 1, 3], HasCheckedCertificate 17 8 ([[1, 1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1985 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 1, 3, 1], HasCheckedCertificate 17 8 ([[1, 1, 2, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1986 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 1, 4], HasCheckedCertificate 17 8 ([[1, 1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1988 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 17 8 ([[1, 1, 2, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p849, Certificates.k17t8p849_check⟩ + +private theorem k17t8_cover1989 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 17 8 ([[1, 1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1990 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[1, 1, 2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1987 : ∀ P ∈ pathPatterns 3 3 [1, 1, 2, 2], HasCheckedCertificate 17 8 ([[1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k17t8_cover1988 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1989 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1990 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1992 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1, 1, 2, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p850, Certificates.k17t8p850_check⟩ + +private theorem k17t8_cover1991 : ∀ P ∈ pathPatterns 2 2 [1, 1, 2, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover1992 + +private theorem k17t8_cover1993 : ∀ P ∈ pathPatterns 1 1 [1, 1, 2, 2, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 2, 2, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1994 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 2, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 2, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1995 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2, 2, 2], HasCheckedCertificate 17 8 ([[1, 1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover1996 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 2, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 2, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1997 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 2, 3], HasCheckedCertificate 17 8 ([[1, 1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1999 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[1, 1, 2, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover1998 : ∀ P ∈ pathPatterns 3 2 [1, 1, 2, 3], HasCheckedCertificate 17 8 ([[1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1999 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2000 : ∀ P ∈ pathPatterns 2 1 [1, 1, 2, 3, 1], HasCheckedCertificate 17 8 ([[1, 1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2001 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2, 3, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 2, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2002 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 3, 2], HasCheckedCertificate 17 8 ([[1, 1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2003 : ∀ P ∈ pathPatterns 3 1 [1, 1, 2, 4], HasCheckedCertificate 17 8 ([[1, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2004 : ∀ P ∈ pathPatterns 2 0 [1, 1, 2, 4, 1], HasCheckedCertificate 17 8 ([[1, 1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2005 : ∀ P ∈ pathPatterns 3 0 [1, 1, 2, 5], HasCheckedCertificate 17 8 ([[1, 1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1945 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([1, 1, 2] ++ tail) ∧ LexLE ([1, 1, 2] ++ tail) ([1, 1, 2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([1, 1, 2] ++ tail).length) (9 - ([1, 1, 2] ++ tail).sum) ([1, 1, 2] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([1, 1, 2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1946 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1965 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1972 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 2, 1, 1, 1] ∧ LexLE [1, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 2, 1, 1, 1, 1] ∧ LexLE [1, 1, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 1, 1])) h) + · exact by + intro _ + exact k17t8_cover1975 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1976 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1977 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1978 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1979 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1981 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover1982 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1983 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1984 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1985 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1986 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1987 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1991 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1993 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 2, 2, 1, 1, 1] ∧ LexLE [1, 1, 2, 2, 1, 1, 1] [1, 1, 1, 2, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1994 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1995 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1996 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1997 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover1998 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2000 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2001 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2002 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2003 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2004 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2005 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2007 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 17 8 ([[1, 1, 3], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2008 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 3], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p851, Certificates.k17t8p851_check⟩ + +private theorem k17t8_cover2009 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 17 8 ([[1, 1, 3], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2011 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1, 1, 3], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p852, Certificates.k17t8p852_check⟩ + +private theorem k17t8_cover2010 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 17 8 ([[1, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover2011 + +private theorem k17t8_cover2012 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 17 8 ([[1, 1, 3], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2013 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 17 8 ([[1, 1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2014 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 17 8 ([[1, 1, 3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2006 : ∀ P ∈ pathPatterns 4 4 [1, 1, 3], HasCheckedCertificate 17 8 ([[1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2007 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover2008 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2009 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2010 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2012 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2013 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2014 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2016 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 17 8 ([[1, 1, 3, 1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p853, Certificates.k17t8p853_check⟩ + +private theorem k17t8_cover2017 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 17 8 ([[1, 1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2018 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[1, 1, 3, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2015 : ∀ P ∈ pathPatterns 3 3 [1, 1, 3, 1], HasCheckedCertificate 17 8 ([[1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro _ + exact k17t8_cover2016 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2017 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2018 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2020 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1, 1, 3, 1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p854, Certificates.k17t8p854_check⟩ + +private theorem k17t8_cover2019 : ∀ P ∈ pathPatterns 2 2 [1, 1, 3, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 3, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover2020 + +private theorem k17t8_cover2021 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 3, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2022 : ∀ P ∈ pathPatterns 2 1 [1, 1, 3, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2023 : ∀ P ∈ pathPatterns 1 0 [1, 1, 3, 1, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 3, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2024 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3, 1, 3], HasCheckedCertificate 17 8 ([[1, 1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2026 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[1, 1, 3, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2025 : ∀ P ∈ pathPatterns 3 2 [1, 1, 3, 2], HasCheckedCertificate 17 8 ([[1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2026 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2027 : ∀ P ∈ pathPatterns 2 1 [1, 1, 3, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 3, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2028 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3, 2, 2], HasCheckedCertificate 17 8 ([[1, 1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2029 : ∀ P ∈ pathPatterns 3 1 [1, 1, 3, 3], HasCheckedCertificate 17 8 ([[1, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2030 : ∀ P ∈ pathPatterns 2 0 [1, 1, 3, 3, 1], HasCheckedCertificate 17 8 ([[1, 1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2031 : ∀ P ∈ pathPatterns 3 0 [1, 1, 3, 4], HasCheckedCertificate 17 8 ([[1, 1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2033 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 17 8 ([[1, 1, 4], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2034 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 17 8 ([[1, 1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2035 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 17 8 ([[1, 1, 4], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2032 : ∀ P ∈ pathPatterns 4 3 [1, 1, 4], HasCheckedCertificate 17 8 ([[1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2033 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2034 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2035 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2037 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[1, 1, 4, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2036 : ∀ P ∈ pathPatterns 3 2 [1, 1, 4, 1], HasCheckedCertificate 17 8 ([[1, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2037 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2038 : ∀ P ∈ pathPatterns 2 1 [1, 1, 4, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 4, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2039 : ∀ P ∈ pathPatterns 2 0 [1, 1, 4, 1, 2], HasCheckedCertificate 17 8 ([[1, 1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2040 : ∀ P ∈ pathPatterns 3 1 [1, 1, 4, 2], HasCheckedCertificate 17 8 ([[1, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2041 : ∀ P ∈ pathPatterns 2 0 [1, 1, 4, 2, 1], HasCheckedCertificate 17 8 ([[1, 1, 4, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2042 : ∀ P ∈ pathPatterns 3 0 [1, 1, 4, 3], HasCheckedCertificate 17 8 ([[1, 1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 4, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2044 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 17 8 ([[1, 1, 5], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2043 : ∀ P ∈ pathPatterns 4 2 [1, 1, 5], HasCheckedCertificate 17 8 ([[1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2044 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2045 : ∀ P ∈ pathPatterns 3 1 [1, 1, 5, 1], HasCheckedCertificate 17 8 ([[1, 1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2046 : ∀ P ∈ pathPatterns 2 0 [1, 1, 5, 1, 1], HasCheckedCertificate 17 8 ([[1, 1, 5, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2047 : ∀ P ∈ pathPatterns 3 0 [1, 1, 5, 2], HasCheckedCertificate 17 8 ([[1, 1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 5, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2048 : ∀ P ∈ pathPatterns 4 1 [1, 1, 6], HasCheckedCertificate 17 8 ([[1, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2049 : ∀ P ∈ pathPatterns 3 0 [1, 1, 6, 1], HasCheckedCertificate 17 8 ([[1, 1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 6, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2050 : ∀ P ∈ pathPatterns 4 0 [1, 1, 7], HasCheckedCertificate 17 8 ([[1, 1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1743 : amountSequenceForall 5 7 (fun tail => + (LexLE [] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([1, 1] ++ tail).length) (9 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1744 + · intro q + fin_cases q + · exact k17t8_seq1826 + + · exact k17t8_seq1945 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2006 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2015 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2019 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 3, 1, 1, 1] ∧ LexLE [1, 1, 3, 1, 1, 1] [1, 1, 1, 3, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 3, 1, 1, 1, 1] ∧ LexLE [1, 1, 3, 1, 1, 1, 1] [1, 1, 1, 1, 3, 1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2021 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2022 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2023 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2024 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2025 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2027 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 3, 2, 1, 1] ∧ LexLE [1, 1, 3, 2, 1, 1] [1, 1, 2, 3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2028 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2029 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2030 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2031 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2032 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2036 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2038 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 1, 4, 1, 1, 1] ∧ LexLE [1, 1, 4, 1, 1, 1] [1, 1, 1, 4, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2039 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2040 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2041 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2042 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2043 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2045 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2046 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2047 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2048 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2049 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2050 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2056 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[1, 2], [1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p855, Certificates.k17t8p855_check⟩ + +private theorem k17t8_cover2057 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[1, 2], [1, 2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p856, Certificates.k17t8p856_check⟩ + +private theorem k17t8_cover2055 : ∀ P ∈ pathPatterns 2 3 [1, 2], HasCheckedCertificate 17 8 ([[1, 2], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover2056 + · exact by + intro _ + exact k17t8_cover2057 + +private theorem k17t8_cover2058 : ∀ P ∈ pathPatterns 1 2 [1, 2, 1], HasCheckedCertificate 17 8 ([[1, 2], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2059 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 2], HasCheckedCertificate 17 8 ([[1, 2], [1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p857, Certificates.k17t8p857_check⟩ + +private theorem k17t8_cover2060 : ∀ P ∈ pathPatterns 1 1 [1, 2, 2], HasCheckedCertificate 17 8 ([[1, 2], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2061 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2, 1], HasCheckedCertificate 17 8 ([[1, 2], [1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p858, Certificates.k17t8p858_check⟩ + +private theorem k17t8_cover2062 : ∀ P ∈ pathPatterns 1 0 [1, 2, 3], HasCheckedCertificate 17 8 ([[1, 2], [1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2064 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1, 2], [1, 3], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p859, Certificates.k17t8p859_check⟩ + +private theorem k17t8_cover2063 : ∀ P ∈ pathPatterns 2 2 [1, 3], HasCheckedCertificate 17 8 ([[1, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover2064 + +private theorem k17t8_cover2065 : ∀ P ∈ pathPatterns 1 1 [1, 3, 1], HasCheckedCertificate 17 8 ([[1, 2], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2066 : ∀ P ∈ pathPatterns 1 0 [1, 3, 2], HasCheckedCertificate 17 8 ([[1, 2], [1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2067 : ∀ P ∈ pathPatterns 2 1 [1, 4], HasCheckedCertificate 17 8 ([[1, 2], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2068 : ∀ P ∈ pathPatterns 1 0 [1, 4, 1], HasCheckedCertificate 17 8 ([[1, 2], [1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2069 : ∀ P ∈ pathPatterns 2 0 [1, 5], HasCheckedCertificate 17 8 ([[1, 2], [1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2054 : amountSequenceForall 3 5 (fun tail => + (LexLE [1, 2] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 17 8 ([[1, 2]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 1, 3] ∧ LexLE [1, 1, 1, 3] [3, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 2, 2] ∧ LexLE [1, 1, 2, 2] [2, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 3, 1] ∧ LexLE [1, 1, 3, 1] [1, 3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 1, 4] ∧ LexLE [1, 1, 4] [4, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2055 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2058 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + intro _ + exact k17t8_cover2059 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2060 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover2061 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2062 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2063 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2065 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2066 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2067 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2068 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2069 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2071 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 17 8 ([[1, 2], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2072 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 17 8 ([[1, 2], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p860, Certificates.k17t8p860_check⟩ + +private theorem k17t8_cover2073 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 17 8 ([[1, 2], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2074 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 17 8 ([[1, 2], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2070 : ∀ P ∈ pathPatterns 3 4 [2], HasCheckedCertificate 17 8 ([[1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2071 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k17t8_cover2072 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2073 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2074 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2075 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 2], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p861, Certificates.k17t8p861_check⟩ + +private theorem k17t8_cover2076 : ∀ P ∈ pathPatterns 1 1 [2, 1, 2], HasCheckedCertificate 17 8 ([[1, 2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2077 : ∀ P ∈ pathPatterns 1 0 [2, 1, 3], HasCheckedCertificate 17 8 ([[1, 2], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2078 : ∀ P ∈ pathPatterns 2 2 [2, 2], HasCheckedCertificate 17 8 ([[1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover2079 : ∀ P ∈ pathPatterns 1 0 [2, 2, 2], HasCheckedCertificate 17 8 ([[1, 2], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2080 : ∀ P ∈ pathPatterns 2 1 [2, 3], HasCheckedCertificate 17 8 ([[1, 2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2081 : ∀ P ∈ pathPatterns 2 0 [2, 4], HasCheckedCertificate 17 8 ([[1, 2], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2083 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[1, 2], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2082 : ∀ P ∈ pathPatterns 3 3 [3], HasCheckedCertificate 17 8 ([[1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2083 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2084 : ∀ P ∈ pathPatterns 2 0 [3, 3], HasCheckedCertificate 17 8 ([[1, 2], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2085 : ∀ P ∈ pathPatterns 3 2 [4], HasCheckedCertificate 17 8 ([[1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2086 : ∀ P ∈ pathPatterns 3 1 [5], HasCheckedCertificate 17 8 ([[1, 2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2087 : ∀ P ∈ pathPatterns 3 0 [6], HasCheckedCertificate 17 8 ([[1, 2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2053 : amountSequenceForall 4 6 (fun tail => + (LexLE [1, 2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[1, 2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k17t8_seq2054 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2070 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover2075 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2076 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2077 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2078 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2079 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2080 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2081 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2082 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2084 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2085 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2086 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2087 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2052 : ∀ P ∈ pathPatterns 5 6 [1, 2], HasCheckedCertificate 17 8 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq2053 + + +private theorem k17t8_cover2091 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 17 8 ([[1, 2, 1], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p862, Certificates.k17t8p862_check⟩ + +private theorem k17t8_cover2092 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 17 8 ([[1, 2, 1], [1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p863, Certificates.k17t8p863_check⟩ + +private theorem k17t8_cover2093 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 17 8 ([[1, 2, 1], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2094 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 17 8 ([[1, 2, 1], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p864, Certificates.k17t8p864_check⟩ + +private theorem k17t8_cover2095 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 17 8 ([[1, 2, 1], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2097 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[1, 2, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p865, Certificates.k17t8p865_check⟩ + +private theorem k17t8_cover2098 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[1, 2, 1], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p866, Certificates.k17t8p866_check⟩ + +private theorem k17t8_cover2096 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 17 8 ([[1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover2097 + · exact by + intro _ + exact k17t8_cover2098 + +private theorem k17t8_cover2099 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 17 8 ([[1, 2, 1], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p867, Certificates.k17t8p867_check⟩ + +private theorem k17t8_cover2100 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 17 8 ([[1, 2, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2101 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 17 8 ([[1, 2, 1], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2102 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 17 8 ([[1, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover2103 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 17 8 ([[1, 2, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2104 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 17 8 ([[1, 2, 1], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2090 : amountSequenceForall 3 5 (fun tail => + (LexLE [1, 2, 1] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[1, 2, 1]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover2091 + · exact by + intro _ + exact k17t8_cover2092 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2093 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover2094 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2095 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2096 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover2099 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2100 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2101 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2102 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2103 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2104 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2089 : ∀ P ∈ pathPatterns 4 5 [1, 2, 1], HasCheckedCertificate 17 8 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq2090 + + +private theorem k17t8_cover2105 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 2, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p868, Certificates.k17t8p868_check⟩ + +private theorem k17t8_cover2106 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2107 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1, 1, 1, 2, 1], HasCheckedCertificate 17 8 ([[1, 2, 1, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p869, Certificates.k17t8p869_check⟩ + +private theorem k17t8_cover2108 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[1, 2, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2110 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1, 2, 1, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p870, Certificates.k17t8p870_check⟩ + +private theorem k17t8_cover2109 : ∀ P ∈ pathPatterns 2 2 [1, 2, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover2110 + +private theorem k17t8_cover2111 : ∀ P ∈ pathPatterns 1 1 [1, 2, 1, 1, 2, 1], HasCheckedCertificate 17 8 ([[1, 2, 1, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2112 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 1, 2, 2], HasCheckedCertificate 17 8 ([[1, 2, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2113 : ∀ P ∈ pathPatterns 2 1 [1, 2, 1, 1, 3], HasCheckedCertificate 17 8 ([[1, 2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2114 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 1, 3, 1], HasCheckedCertificate 17 8 ([[1, 2, 1, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2115 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 1, 4], HasCheckedCertificate 17 8 ([[1, 2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2117 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 17 8 ([[1, 2, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2118 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[1, 2, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2116 : ∀ P ∈ pathPatterns 3 3 [1, 2, 1, 2], HasCheckedCertificate 17 8 ([[1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2117 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2118 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2120 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1, 2, 1, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p871, Certificates.k17t8p871_check⟩ + +private theorem k17t8_cover2119 : ∀ P ∈ pathPatterns 2 2 [1, 2, 1, 2, 1], HasCheckedCertificate 17 8 ([[1, 2, 1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover2120 + +private theorem k17t8_cover2121 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 2, 1, 2], HasCheckedCertificate 17 8 ([[1, 2, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2122 : ∀ P ∈ pathPatterns 2 1 [1, 2, 1, 2, 2], HasCheckedCertificate 17 8 ([[1, 2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2123 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1, 2, 2, 1], HasCheckedCertificate 17 8 ([[1, 2, 1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2124 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 2, 3], HasCheckedCertificate 17 8 ([[1, 2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2126 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[1, 2, 1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2125 : ∀ P ∈ pathPatterns 3 2 [1, 2, 1, 3], HasCheckedCertificate 17 8 ([[1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2126 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2127 : ∀ P ∈ pathPatterns 2 1 [1, 2, 1, 3, 1], HasCheckedCertificate 17 8 ([[1, 2, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2128 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 3, 2], HasCheckedCertificate 17 8 ([[1, 2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2129 : ∀ P ∈ pathPatterns 3 1 [1, 2, 1, 4], HasCheckedCertificate 17 8 ([[1, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2130 : ∀ P ∈ pathPatterns 2 0 [1, 2, 1, 4, 1], HasCheckedCertificate 17 8 ([[1, 2, 1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2131 : ∀ P ∈ pathPatterns 3 0 [1, 2, 1, 5], HasCheckedCertificate 17 8 ([[1, 2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2088 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([1, 2, 1] ++ tail) ∧ LexLE ([1, 2, 1] ++ tail) ([1, 2, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([1, 2, 1] ++ tail).length) (9 - ([1, 2, 1] ++ tail).sum) ([1, 2, 1] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([1, 2, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover2089 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 2, 1])) h) + · exact by + intro _ + exact k17t8_cover2105 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2106 + · intro q + fin_cases q + · exact by + intro _ + exact k17t8_cover2107 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2108 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2109 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2111 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1, 2, 1, 1] [1, 1, 2, 1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2112 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2113 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2114 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2115 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2116 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2119 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 2, 1, 1] ∧ LexLE [1, 2, 1, 2, 1, 1] [1, 1, 2, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2121 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2122 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2123 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2124 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2125 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2127 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 1, 3, 1, 1] ∧ LexLE [1, 2, 1, 3, 1, 1] [1, 1, 3, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2128 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2129 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2130 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2131 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2133 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 17 8 ([[1, 2, 2], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2135 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1, 2, 2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p872, Certificates.k17t8p872_check⟩ + +private theorem k17t8_cover2134 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 17 8 ([[1, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover2135 + +private theorem k17t8_cover2136 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 17 8 ([[1, 2, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2137 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 17 8 ([[1, 2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2138 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 17 8 ([[1, 2, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2132 : ∀ P ∈ pathPatterns 4 4 [1, 2, 2], HasCheckedCertificate 17 8 ([[1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2133 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2134 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2136 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2137 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2138 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2140 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 17 8 ([[1, 2, 2, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2141 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[1, 2, 2, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2139 : ∀ P ∈ pathPatterns 3 3 [1, 2, 2, 1], HasCheckedCertificate 17 8 ([[1, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2140 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2141 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2142 : ∀ P ∈ pathPatterns 1 0 [1, 2, 2, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 2, 2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2143 : ∀ P ∈ pathPatterns 2 1 [1, 2, 2, 1, 2], HasCheckedCertificate 17 8 ([[1, 2, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2144 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2, 1, 3], HasCheckedCertificate 17 8 ([[1, 2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2146 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[1, 2, 2, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2145 : ∀ P ∈ pathPatterns 3 2 [1, 2, 2, 2], HasCheckedCertificate 17 8 ([[1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2146 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2147 : ∀ P ∈ pathPatterns 2 1 [1, 2, 2, 2, 1], HasCheckedCertificate 17 8 ([[1, 2, 2, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2148 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2, 2, 2], HasCheckedCertificate 17 8 ([[1, 2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2149 : ∀ P ∈ pathPatterns 3 1 [1, 2, 2, 3], HasCheckedCertificate 17 8 ([[1, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2150 : ∀ P ∈ pathPatterns 2 0 [1, 2, 2, 3, 1], HasCheckedCertificate 17 8 ([[1, 2, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2151 : ∀ P ∈ pathPatterns 3 0 [1, 2, 2, 4], HasCheckedCertificate 17 8 ([[1, 2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2153 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 17 8 ([[1, 2, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2154 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 17 8 ([[1, 2, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2152 : ∀ P ∈ pathPatterns 4 3 [1, 2, 3], HasCheckedCertificate 17 8 ([[1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2153 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2154 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2156 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[1, 2, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2155 : ∀ P ∈ pathPatterns 3 2 [1, 2, 3, 1], HasCheckedCertificate 17 8 ([[1, 2, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2156 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2157 : ∀ P ∈ pathPatterns 2 0 [1, 2, 3, 1, 2], HasCheckedCertificate 17 8 ([[1, 2, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2158 : ∀ P ∈ pathPatterns 3 1 [1, 2, 3, 2], HasCheckedCertificate 17 8 ([[1, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2159 : ∀ P ∈ pathPatterns 2 0 [1, 2, 3, 2, 1], HasCheckedCertificate 17 8 ([[1, 2, 3, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 2, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2160 : ∀ P ∈ pathPatterns 3 0 [1, 2, 3, 3], HasCheckedCertificate 17 8 ([[1, 2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2162 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 17 8 ([[1, 2, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2161 : ∀ P ∈ pathPatterns 4 2 [1, 2, 4], HasCheckedCertificate 17 8 ([[1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2162 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2163 : ∀ P ∈ pathPatterns 3 1 [1, 2, 4, 1], HasCheckedCertificate 17 8 ([[1, 2, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2164 : ∀ P ∈ pathPatterns 3 0 [1, 2, 4, 2], HasCheckedCertificate 17 8 ([[1, 2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2165 : ∀ P ∈ pathPatterns 4 1 [1, 2, 5], HasCheckedCertificate 17 8 ([[1, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2166 : ∀ P ∈ pathPatterns 3 0 [1, 2, 5, 1], HasCheckedCertificate 17 8 ([[1, 2, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2167 : ∀ P ∈ pathPatterns 4 0 [1, 2, 6], HasCheckedCertificate 17 8 ([[1, 2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2051 : amountSequenceForall 5 6 (fun tail => + (LexLE [] ([1, 2] ++ tail) ∧ LexLE ([1, 2] ++ tail) ([1, 2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([1, 2] ++ tail).length) (9 - ([1, 2] ++ tail).sum) ([1, 2] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([1, 2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover2052 + · intro q + fin_cases q + · exact k17t8_seq2088 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2132 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2139 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1, 1] ∧ LexLE [1, 2, 2, 1, 1, 1] [1, 1, 1, 2, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 1, 1, 1] ∧ LexLE [1, 2, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2142 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2143 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 1, 2, 1] ∧ LexLE [1, 2, 2, 1, 2, 1] [1, 2, 1, 2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2144 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2145 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2147 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 2, 1, 1] [1, 1, 2, 2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2148 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2149 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2150 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2151 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2152 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2155 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 3, 1, 1] ∧ LexLE [1, 2, 3, 1, 1] [1, 1, 3, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 3, 1, 1, 1] ∧ LexLE [1, 2, 3, 1, 1, 1] [1, 1, 1, 3, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2157 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2158 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2159 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2160 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2161 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2163 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 2, 4, 1, 1] ∧ LexLE [1, 2, 4, 1, 1] [1, 1, 4, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2164 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2165 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2166 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2167 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2171 : ∀ P ∈ pathPatterns 2 1 [1, 3], HasCheckedCertificate 17 8 ([[1, 3], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2172 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1], HasCheckedCertificate 17 8 ([[1, 3], [1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2173 : ∀ P ∈ pathPatterns 2 0 [1, 4], HasCheckedCertificate 17 8 ([[1, 3], [1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2175 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 17 8 ([[1, 3], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2176 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[1, 3], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2174 : ∀ P ∈ pathPatterns 3 3 [2], HasCheckedCertificate 17 8 ([[1, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2175 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2176 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2177 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2], HasCheckedCertificate 17 8 ([[1, 3], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2178 : ∀ P ∈ pathPatterns 2 1 [2, 2], HasCheckedCertificate 17 8 ([[1, 3], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2179 : ∀ P ∈ pathPatterns 2 0 [2, 3], HasCheckedCertificate 17 8 ([[1, 3], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2180 : ∀ P ∈ pathPatterns 3 2 [3], HasCheckedCertificate 17 8 ([[1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2181 : ∀ P ∈ pathPatterns 3 1 [4], HasCheckedCertificate 17 8 ([[1, 3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2182 : ∀ P ∈ pathPatterns 3 0 [5], HasCheckedCertificate 17 8 ([[1, 3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2170 : amountSequenceForall 4 5 (fun tail => + (LexLE [1, 3] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[1, 3]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2171 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2172 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2173 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2174 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2177 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2178 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2179 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2180 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2181 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2182 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2169 : ∀ P ∈ pathPatterns 5 5 [1, 3], HasCheckedCertificate 17 8 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq2170 + + +private theorem k17t8_cover2185 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 17 8 ([[1, 3, 1], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p873, Certificates.k17t8p873_check⟩ + +private theorem k17t8_cover2184 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 17 8 ([[1, 3, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover2185 + +private theorem k17t8_cover2186 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 17 8 ([[1, 3, 1], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2187 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 17 8 ([[1, 3, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2188 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 17 8 ([[1, 3, 1], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2183 : ∀ P ∈ pathPatterns 4 4 [1, 3, 1], HasCheckedCertificate 17 8 ([[1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2184 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2186 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2187 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2188 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2189 : ∀ P ∈ pathPatterns 1 0 [1, 3, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 3, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2190 : ∀ P ∈ pathPatterns 2 1 [1, 3, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 3, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2191 : ∀ P ∈ pathPatterns 2 0 [1, 3, 1, 1, 3], HasCheckedCertificate 17 8 ([[1, 3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2193 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[1, 3, 1, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2192 : ∀ P ∈ pathPatterns 3 2 [1, 3, 1, 2], HasCheckedCertificate 17 8 ([[1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2193 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2194 : ∀ P ∈ pathPatterns 2 0 [1, 3, 1, 2, 2], HasCheckedCertificate 17 8 ([[1, 3, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2195 : ∀ P ∈ pathPatterns 3 1 [1, 3, 1, 3], HasCheckedCertificate 17 8 ([[1, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2196 : ∀ P ∈ pathPatterns 2 0 [1, 3, 1, 3, 1], HasCheckedCertificate 17 8 ([[1, 3, 1, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2197 : ∀ P ∈ pathPatterns 3 0 [1, 3, 1, 4], HasCheckedCertificate 17 8 ([[1, 3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2199 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 17 8 ([[1, 3, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2200 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 17 8 ([[1, 3, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2198 : ∀ P ∈ pathPatterns 4 3 [1, 3, 2], HasCheckedCertificate 17 8 ([[1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2199 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2200 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2201 : ∀ P ∈ pathPatterns 2 0 [1, 3, 2, 1, 2], HasCheckedCertificate 17 8 ([[1, 3, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2202 : ∀ P ∈ pathPatterns 3 1 [1, 3, 2, 2], HasCheckedCertificate 17 8 ([[1, 3, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2203 : ∀ P ∈ pathPatterns 3 0 [1, 3, 2, 3], HasCheckedCertificate 17 8 ([[1, 3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2205 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 17 8 ([[1, 3, 3], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2204 : ∀ P ∈ pathPatterns 4 2 [1, 3, 3], HasCheckedCertificate 17 8 ([[1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2205 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2206 : ∀ P ∈ pathPatterns 3 1 [1, 3, 3, 1], HasCheckedCertificate 17 8 ([[1, 3, 3, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2207 : ∀ P ∈ pathPatterns 3 0 [1, 3, 3, 2], HasCheckedCertificate 17 8 ([[1, 3, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2208 : ∀ P ∈ pathPatterns 4 1 [1, 3, 4], HasCheckedCertificate 17 8 ([[1, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2209 : ∀ P ∈ pathPatterns 3 0 [1, 3, 4, 1], HasCheckedCertificate 17 8 ([[1, 3, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2210 : ∀ P ∈ pathPatterns 4 0 [1, 3, 5], HasCheckedCertificate 17 8 ([[1, 3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2168 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([1, 3] ++ tail) ∧ LexLE ([1, 3] ++ tail) ([1, 3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([1, 3] ++ tail).length) (9 - ([1, 3] ++ tail).sum) ([1, 3] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([1, 3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover2169 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2183 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1, 1] [1, 1, 1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2189 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2190 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 1, 2, 1] ∧ LexLE [1, 3, 1, 1, 2, 1] [1, 2, 1, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2191 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2192 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 2, 1] ∧ LexLE [1, 3, 1, 2, 1] [1, 2, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 1, 2, 1, 1] ∧ LexLE [1, 3, 1, 2, 1, 1] [1, 1, 2, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2194 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2195 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2196 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2197 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2198 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1, 1] ∧ LexLE [1, 3, 2, 1, 1] [1, 1, 2, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 1, 1, 1] ∧ LexLE [1, 3, 2, 1, 1, 1] [1, 1, 1, 2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2201 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2202 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 2, 2, 1] ∧ LexLE [1, 3, 2, 2, 1] [1, 2, 2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2203 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2204 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2206 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 3, 3, 1, 1] ∧ LexLE [1, 3, 3, 1, 1] [1, 1, 3, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2207 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2208 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2209 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2210 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2213 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 17 8 ([[1, 4], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2212 : ∀ P ∈ pathPatterns 3 2 [2], HasCheckedCertificate 17 8 ([[1, 4], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2213 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2214 : ∀ P ∈ pathPatterns 2 0 [2, 2], HasCheckedCertificate 17 8 ([[1, 4], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2215 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 17 8 ([[1, 4], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2216 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 17 8 ([[1, 4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2211 : ∀ P ∈ pathPatterns 5 4 [1, 4], HasCheckedCertificate 17 8 ([[1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2212 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2214 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2215 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2216 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2218 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 17 8 ([[1, 4, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2219 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 17 8 ([[1, 4, 1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2217 : ∀ P ∈ pathPatterns 4 3 [1, 4, 1], HasCheckedCertificate 17 8 ([[1, 4, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2218 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2219 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2220 : ∀ P ∈ pathPatterns 2 0 [1, 4, 1, 1, 2], HasCheckedCertificate 17 8 ([[1, 4, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2221 : ∀ P ∈ pathPatterns 3 1 [1, 4, 1, 2], HasCheckedCertificate 17 8 ([[1, 4, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2222 : ∀ P ∈ pathPatterns 3 0 [1, 4, 1, 3], HasCheckedCertificate 17 8 ([[1, 4, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2224 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 17 8 ([[1, 4, 2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2223 : ∀ P ∈ pathPatterns 4 2 [1, 4, 2], HasCheckedCertificate 17 8 ([[1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2224 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2225 : ∀ P ∈ pathPatterns 3 0 [1, 4, 2, 2], HasCheckedCertificate 17 8 ([[1, 4, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2226 : ∀ P ∈ pathPatterns 4 1 [1, 4, 3], HasCheckedCertificate 17 8 ([[1, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2227 : ∀ P ∈ pathPatterns 4 0 [1, 4, 4], HasCheckedCertificate 17 8 ([[1, 4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2229 : ∀ P ∈ pathPatterns 3 1 [2], HasCheckedCertificate 17 8 ([[1, 5], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2230 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 17 8 ([[1, 5], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2228 : ∀ P ∈ pathPatterns 5 3 [1, 5], HasCheckedCertificate 17 8 ([[1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2229 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2230 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2232 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 17 8 ([[1, 5, 1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2231 : ∀ P ∈ pathPatterns 4 2 [1, 5, 1], HasCheckedCertificate 17 8 ([[1, 5, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2232 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2233 : ∀ P ∈ pathPatterns 3 0 [1, 5, 1, 2], HasCheckedCertificate 17 8 ([[1, 5, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2234 : ∀ P ∈ pathPatterns 4 1 [1, 5, 2], HasCheckedCertificate 17 8 ([[1, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2235 : ∀ P ∈ pathPatterns 4 0 [1, 5, 3], HasCheckedCertificate 17 8 ([[1, 5, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 5, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2237 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 17 8 ([[1, 6], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2236 : ∀ P ∈ pathPatterns 5 2 [1, 6], HasCheckedCertificate 17 8 ([[1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2237 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2238 : ∀ P ∈ pathPatterns 4 1 [1, 6, 1], HasCheckedCertificate 17 8 ([[1, 6, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2239 : ∀ P ∈ pathPatterns 4 0 [1, 6, 2], HasCheckedCertificate 17 8 ([[1, 6, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 6, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2240 : ∀ P ∈ pathPatterns 5 1 [1, 7], HasCheckedCertificate 17 8 ([[1, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2241 : ∀ P ∈ pathPatterns 4 0 [1, 7, 1], HasCheckedCertificate 17 8 ([[1, 7, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 7, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2242 : ∀ P ∈ pathPatterns 5 0 [1, 8], HasCheckedCertificate 17 8 ([[1, 8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 8] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq1474 : amountSequenceForall 6 8 (fun tail => + (LexLE [] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([1] ++ tail).length) (9 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover1475 + · intro q + fin_cases q + · exact k17t8_seq1743 + + · exact k17t8_seq2051 + + · exact k17t8_seq2168 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2211 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2217 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1, 1] ∧ LexLE [1, 4, 1, 1, 1] [1, 1, 1, 4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 1, 1, 1] ∧ LexLE [1, 4, 1, 1, 1, 1] [1, 1, 1, 1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2220 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2221 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 1, 2, 1] ∧ LexLE [1, 4, 1, 2, 1] [1, 2, 1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2222 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2223 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 2, 1] ∧ LexLE [1, 4, 2, 1] [1, 2, 4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 2, 1, 1] ∧ LexLE [1, 4, 2, 1, 1] [1, 1, 2, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2225 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2226 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 4, 3, 1] ∧ LexLE [1, 4, 3, 1] [1, 3, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2227 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2228 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2231 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 1, 1] ∧ LexLE [1, 5, 1, 1] [1, 1, 5, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 1, 1, 1] ∧ LexLE [1, 5, 1, 1, 1] [1, 1, 1, 5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2233 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2234 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 5, 2, 1] ∧ LexLE [1, 5, 2, 1] [1, 2, 5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2235 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2236 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2238 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [1, 6, 1, 1] ∧ LexLE [1, 6, 1, 1] [1, 1, 6, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2239 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2240 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2241 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2242 + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2247 : amountSequenceForall 3 5 (fun tail => + (LexLE [2] ([1, 1] ++ tail) ∧ LexLE ([1, 1] ++ tail) ([1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1, 1] ++ tail).length) (7 - ([1, 1] ++ tail).sum) ([1, 1] ++ tail), + HasCheckedCertificate 17 8 ([[2]] ++ (([1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1, 1] [1, 1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1, 2] ∧ LexLE [1, 1, 1, 1, 2] [2, 1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 1, 3] ∧ LexLE [1, 1, 1, 1, 3] [3, 1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 2, 1] ∧ LexLE [1, 1, 1, 2, 1] [1, 2, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 2, 2] ∧ LexLE [1, 1, 1, 2, 2] [2, 2, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 3] ∧ LexLE [1, 1, 1, 3] [3, 1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 3, 1] ∧ LexLE [1, 1, 1, 3, 1] [1, 3, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1, 4] ∧ LexLE [1, 1, 1, 4] [4, 1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 1, 1] ∧ LexLE [1, 1, 2, 1, 1] [1, 1, 2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 1, 2] ∧ LexLE [1, 1, 2, 1, 2] [2, 1, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 2] ∧ LexLE [1, 1, 2, 2] [2, 2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 2, 1] ∧ LexLE [1, 1, 2, 2, 1] [1, 2, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2, 3] ∧ LexLE [1, 1, 2, 3] [3, 2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3, 1] ∧ LexLE [1, 1, 3, 1] [1, 3, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3, 1, 1] ∧ LexLE [1, 1, 3, 1, 1] [1, 1, 3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3, 2] ∧ LexLE [1, 1, 3, 2] [2, 3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 4] ∧ LexLE [1, 1, 4] [4, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 4, 1] ∧ LexLE [1, 1, 4, 1] [1, 4, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 5] ∧ LexLE [1, 1, 5] [5, 1, 1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2246 : amountSequenceForall 4 6 (fun tail => + (LexLE [2] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1] ++ tail).length) (7 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 17 8 ([[2]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact k17t8_seq2247 + + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 1, 2] ∧ LexLE [1, 2, 1, 1, 2] [2, 1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 2] ∧ LexLE [1, 2, 1, 2] [2, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 2, 1] ∧ LexLE [1, 2, 1, 2, 1] [1, 2, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1, 3] ∧ LexLE [1, 2, 1, 3] [3, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2, 1] ∧ LexLE [1, 2, 2, 1] [1, 2, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2, 1, 1] ∧ LexLE [1, 2, 2, 1, 1] [1, 1, 2, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2, 2] ∧ LexLE [1, 2, 2, 2] [2, 2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 3] ∧ LexLE [1, 2, 3] [3, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 3, 1] ∧ LexLE [1, 2, 3, 1] [1, 3, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 4] ∧ LexLE [1, 2, 4] [4, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1, 1, 1] ∧ LexLE [1, 3, 1, 1, 1] [1, 1, 1, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1, 2] ∧ LexLE [1, 3, 1, 2] [2, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 2] ∧ LexLE [1, 3, 2] [2, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 2, 1] ∧ LexLE [1, 3, 2, 1] [1, 2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 3] ∧ LexLE [1, 3, 3] [3, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4, 1] ∧ LexLE [1, 4, 1] [1, 4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4, 1, 1] ∧ LexLE [1, 4, 1, 1] [1, 1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4, 2] ∧ LexLE [1, 4, 2] [2, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 5, 1] ∧ LexLE [1, 5, 1] [1, 5, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 6] ∧ LexLE [1, 6] [6, 1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2252 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 17 8 ([[2], [2], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p874, Certificates.k17t8p874_check⟩ + +private theorem k17t8_cover2253 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 17 8 ([[2], [2], [2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p875, Certificates.k17t8p875_check⟩ + +private theorem k17t8_cover2251 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 17 8 ([[2], [2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k17t8_cover2252 + · exact by + intro _ + exact k17t8_cover2253 + +private theorem k17t8_cover2254 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 17 8 ([[2], [2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p876, Certificates.k17t8p876_check⟩ + +private theorem k17t8_cover2255 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 17 8 ([[2], [2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2256 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 17 8 ([[2], [2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2257 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 17 8 ([[2], [2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover2258 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 17 8 ([[2], [2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2259 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 17 8 ([[2], [2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2250 : amountSequenceForall 3 5 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[2], [2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2251 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover2254 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2255 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2256 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2257 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2258 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2259 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2249 : ∀ P ∈ pathPatterns 4 5 [2], HasCheckedCertificate 17 8 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq2250 + + +private theorem k17t8_cover2260 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[2], [2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p877, Certificates.k17t8p877_check⟩ + +private theorem k17t8_cover2261 : ∀ P ∈ pathPatterns 1 1 [2, 1, 1, 2], HasCheckedCertificate 17 8 ([[2], [2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2262 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 3], HasCheckedCertificate 17 8 ([[2], [2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2263 : ∀ P ∈ pathPatterns 2 2 [2, 1, 2], HasCheckedCertificate 17 8 ([[2], [2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover2264 : ∀ P ∈ pathPatterns 1 0 [2, 1, 2, 2], HasCheckedCertificate 17 8 ([[2], [2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2265 : ∀ P ∈ pathPatterns 2 1 [2, 1, 3], HasCheckedCertificate 17 8 ([[2], [2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2266 : ∀ P ∈ pathPatterns 2 0 [2, 1, 4], HasCheckedCertificate 17 8 ([[2], [2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2268 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[2], [2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2267 : ∀ P ∈ pathPatterns 3 3 [2, 2], HasCheckedCertificate 17 8 ([[2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2268 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2269 : ∀ P ∈ pathPatterns 2 1 [2, 2, 2], HasCheckedCertificate 17 8 ([[2], [2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2270 : ∀ P ∈ pathPatterns 2 0 [2, 2, 3], HasCheckedCertificate 17 8 ([[2], [2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2271 : ∀ P ∈ pathPatterns 3 2 [2, 3], HasCheckedCertificate 17 8 ([[2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2272 : ∀ P ∈ pathPatterns 2 0 [2, 3, 2], HasCheckedCertificate 17 8 ([[2], [2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2273 : ∀ P ∈ pathPatterns 3 1 [2, 4], HasCheckedCertificate 17 8 ([[2], [2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2274 : ∀ P ∈ pathPatterns 3 0 [2, 5], HasCheckedCertificate 17 8 ([[2], [2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2248 : amountSequenceForall 4 5 (fun tail => + (LexLE [2] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([2] ++ tail).length) (7 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 17 8 ([[2]] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover2249 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover2260 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2261 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2262 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2263 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2264 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2265 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2266 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2267 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2269 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2270 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2271 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2272 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2273 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2274 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2276 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 17 8 ([[2], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2277 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 17 8 ([[2], [3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2275 : ∀ P ∈ pathPatterns 4 4 [3], HasCheckedCertificate 17 8 ([[2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2276 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2277 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2278 : ∀ P ∈ pathPatterns 2 0 [3, 1, 3], HasCheckedCertificate 17 8 ([[2], [3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2279 : ∀ P ∈ pathPatterns 3 1 [3, 3], HasCheckedCertificate 17 8 ([[2], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2280 : ∀ P ∈ pathPatterns 3 0 [3, 4], HasCheckedCertificate 17 8 ([[2], [3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2281 : ∀ P ∈ pathPatterns 4 3 [4], HasCheckedCertificate 17 8 ([[2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2282 : ∀ P ∈ pathPatterns 4 2 [5], HasCheckedCertificate 17 8 ([[2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2283 : ∀ P ∈ pathPatterns 4 1 [6], HasCheckedCertificate 17 8 ([[2], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2284 : ∀ P ∈ pathPatterns 4 0 [7], HasCheckedCertificate 17 8 ([[2], [7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2245 : amountSequenceForall 5 7 (fun tail => + (LexLE [2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (7 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k17t8_seq2246 + + · exact k17t8_seq2248 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2275 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2278 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2279 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2280 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2281 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2282 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2283 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2284 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2244 : ∀ P ∈ pathPatterns 6 7 [2], HasCheckedCertificate 17 8 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq2245 + + +private theorem k17t8_cover2287 : ∀ P ∈ pathPatterns 0 0 [2, 1, 1, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[2, 1, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k17t8p878, Certificates.k17t8p878_check⟩ + +private theorem k17t8_cover2288 : ∀ P ∈ pathPatterns 1 1 [2, 1, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[2, 1, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2289 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[2, 1, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2290 : ∀ P ∈ pathPatterns 2 2 [2, 1, 1, 1, 2], HasCheckedCertificate 17 8 ([[2, 1, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 2] [2] ∧ LexLE [2] [2])) h) + +private theorem k17t8_cover2291 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 1, 2, 2], HasCheckedCertificate 17 8 ([[2, 1, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2292 : ∀ P ∈ pathPatterns 2 1 [2, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[2, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2293 : ∀ P ∈ pathPatterns 2 0 [2, 1, 1, 1, 4], HasCheckedCertificate 17 8 ([[2, 1, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2295 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 17 8 ([[2, 1, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2294 : ∀ P ∈ pathPatterns 3 3 [2, 1, 1, 2], HasCheckedCertificate 17 8 ([[2, 1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2295 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2296 : ∀ P ∈ pathPatterns 1 0 [2, 1, 1, 2, 1, 2], HasCheckedCertificate 17 8 ([[2, 1, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2297 : ∀ P ∈ pathPatterns 2 1 [2, 1, 1, 2, 2], HasCheckedCertificate 17 8 ([[2, 1, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2298 : ∀ P ∈ pathPatterns 2 0 [2, 1, 1, 2, 3], HasCheckedCertificate 17 8 ([[2, 1, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2299 : ∀ P ∈ pathPatterns 3 2 [2, 1, 1, 3], HasCheckedCertificate 17 8 ([[2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2300 : ∀ P ∈ pathPatterns 2 0 [2, 1, 1, 3, 2], HasCheckedCertificate 17 8 ([[2, 1, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2301 : ∀ P ∈ pathPatterns 3 1 [2, 1, 1, 4], HasCheckedCertificate 17 8 ([[2, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2302 : ∀ P ∈ pathPatterns 3 0 [2, 1, 1, 5], HasCheckedCertificate 17 8 ([[2, 1, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2286 : amountSequenceForall 4 5 (fun tail => + (LexLE [] ([2, 1, 1] ++ tail) ∧ LexLE ([2, 1, 1] ++ tail) ([2, 1, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([2, 1, 1] ++ tail).length) (9 - ([2, 1, 1] ++ tail).sum) ([2, 1, 1] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([2, 1, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 1, 2])) h) + · exact by + intro _ + exact k17t8_cover2287 + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2288 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 1, 1, 2, 1] [1, 2, 1, 1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2289 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2290 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 1, 2, 1] [1, 2, 1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 2, 1, 1] ∧ LexLE [2, 1, 1, 1, 2, 1, 1] [1, 1, 2, 1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2291 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2292 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 1, 3, 1] ∧ LexLE [2, 1, 1, 1, 3, 1] [1, 3, 1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2293 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2294 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1] ∧ LexLE [2, 1, 1, 2, 1] [1, 2, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1, 1] ∧ LexLE [2, 1, 1, 2, 1, 1] [1, 1, 2, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 1, 1, 1] ∧ LexLE [2, 1, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2296 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2297 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 2, 2, 1] ∧ LexLE [2, 1, 1, 2, 2, 1] [1, 2, 2, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2298 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2299 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 3, 1] ∧ LexLE [2, 1, 1, 3, 1] [1, 3, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 3, 1, 1] ∧ LexLE [2, 1, 1, 3, 1, 1] [1, 1, 3, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2300 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2301 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1, 4, 1] ∧ LexLE [2, 1, 1, 4, 1] [1, 4, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2302 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2304 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 17 8 ([[2, 1, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k17t8_cover2305 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 17 8 ([[2, 1, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2306 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 17 8 ([[2, 1, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2303 : ∀ P ∈ pathPatterns 4 4 [2, 1, 2], HasCheckedCertificate 17 8 ([[2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2304 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2305 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2306 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2307 : ∀ P ∈ pathPatterns 2 1 [2, 1, 2, 1, 2], HasCheckedCertificate 17 8 ([[2, 1, 2, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2308 : ∀ P ∈ pathPatterns 2 0 [2, 1, 2, 1, 3], HasCheckedCertificate 17 8 ([[2, 1, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2309 : ∀ P ∈ pathPatterns 3 2 [2, 1, 2, 2], HasCheckedCertificate 17 8 ([[2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2310 : ∀ P ∈ pathPatterns 2 0 [2, 1, 2, 2, 2], HasCheckedCertificate 17 8 ([[2, 1, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2311 : ∀ P ∈ pathPatterns 3 1 [2, 1, 2, 3], HasCheckedCertificate 17 8 ([[2, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2312 : ∀ P ∈ pathPatterns 3 0 [2, 1, 2, 4], HasCheckedCertificate 17 8 ([[2, 1, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2314 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 17 8 ([[2, 1, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2313 : ∀ P ∈ pathPatterns 4 3 [2, 1, 3], HasCheckedCertificate 17 8 ([[2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2314 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2315 : ∀ P ∈ pathPatterns 2 0 [2, 1, 3, 1, 2], HasCheckedCertificate 17 8 ([[2, 1, 3, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2316 : ∀ P ∈ pathPatterns 3 1 [2, 1, 3, 2], HasCheckedCertificate 17 8 ([[2, 1, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2317 : ∀ P ∈ pathPatterns 3 0 [2, 1, 3, 3], HasCheckedCertificate 17 8 ([[2, 1, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2318 : ∀ P ∈ pathPatterns 4 2 [2, 1, 4], HasCheckedCertificate 17 8 ([[2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2319 : ∀ P ∈ pathPatterns 3 0 [2, 1, 4, 2], HasCheckedCertificate 17 8 ([[2, 1, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2320 : ∀ P ∈ pathPatterns 4 1 [2, 1, 5], HasCheckedCertificate 17 8 ([[2, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2321 : ∀ P ∈ pathPatterns 4 0 [2, 1, 6], HasCheckedCertificate 17 8 ([[2, 1, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 1, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2285 : amountSequenceForall 5 6 (fun tail => + (LexLE [] ([2, 1] ++ tail) ∧ LexLE ([2, 1] ++ tail) ([2, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([2, 1] ++ tail).length) (9 - ([2, 1] ++ tail).sum) ([2, 1] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([2, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact k17t8_seq2286 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2303 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1] ∧ LexLE [2, 1, 2, 1, 1] [1, 1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1, 1] ∧ LexLE [2, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1, 1, 1] ∧ LexLE [2, 1, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 1, 2] ∧ LexLE [2, 1, 2, 1, 1, 2] [2, 1, 1, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2307 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1, 2, 1] [1, 2, 1, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2308 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2309 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 2, 1] ∧ LexLE [2, 1, 2, 2, 1] [1, 2, 2, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 2, 1, 1] ∧ LexLE [2, 1, 2, 2, 1, 1] [1, 1, 2, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2310 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2311 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 2, 3, 1] ∧ LexLE [2, 1, 2, 3, 1] [1, 3, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2312 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2313 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1] ∧ LexLE [2, 1, 3, 1] [1, 3, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1, 1] ∧ LexLE [2, 1, 3, 1, 1] [1, 1, 3, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 1, 1, 1] ∧ LexLE [2, 1, 3, 1, 1, 1] [1, 1, 1, 3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2315 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2316 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 3, 2, 1] ∧ LexLE [2, 1, 3, 2, 1] [1, 2, 3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2317 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2318 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 4, 1] ∧ LexLE [2, 1, 4, 1] [1, 4, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 4, 1, 1] ∧ LexLE [2, 1, 4, 1, 1] [1, 1, 4, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2319 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2320 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 5, 1] ∧ LexLE [2, 1, 5, 1] [1, 5, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2321 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2325 : ∀ P ∈ pathPatterns 2 1 [2, 2], HasCheckedCertificate 17 8 ([[2, 2], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k17t8_cover2326 : ∀ P ∈ pathPatterns 2 0 [2, 3], HasCheckedCertificate 17 8 ([[2, 2], [2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2327 : ∀ P ∈ pathPatterns 3 2 [3], HasCheckedCertificate 17 8 ([[2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2328 : ∀ P ∈ pathPatterns 3 1 [4], HasCheckedCertificate 17 8 ([[2, 2], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2329 : ∀ P ∈ pathPatterns 3 0 [5], HasCheckedCertificate 17 8 ([[2, 2], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2324 : amountSequenceForall 4 5 (fun tail => + (LexLE [2, 2] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (4 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[2, 2]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 1, 2] ∧ LexLE [2, 1, 2] [2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2325 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2326 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2327 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2328 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2329 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2323 : ∀ P ∈ pathPatterns 5 5 [2, 2], HasCheckedCertificate 17 8 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq2324 + + +private theorem k17t8_cover2330 : ∀ P ∈ pathPatterns 2 0 [2, 2, 1, 1, 3], HasCheckedCertificate 17 8 ([[2, 2, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2331 : ∀ P ∈ pathPatterns 2 0 [2, 2, 1, 2, 2], HasCheckedCertificate 17 8 ([[2, 2, 1, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2332 : ∀ P ∈ pathPatterns 3 1 [2, 2, 1, 3], HasCheckedCertificate 17 8 ([[2, 2, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2333 : ∀ P ∈ pathPatterns 3 0 [2, 2, 1, 4], HasCheckedCertificate 17 8 ([[2, 2, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2335 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 17 8 ([[2, 2, 2], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2334 : ∀ P ∈ pathPatterns 4 3 [2, 2, 2], HasCheckedCertificate 17 8 ([[2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2335 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2336 : ∀ P ∈ pathPatterns 3 1 [2, 2, 2, 2], HasCheckedCertificate 17 8 ([[2, 2, 2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2337 : ∀ P ∈ pathPatterns 3 0 [2, 2, 2, 3], HasCheckedCertificate 17 8 ([[2, 2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2338 : ∀ P ∈ pathPatterns 4 2 [2, 2, 3], HasCheckedCertificate 17 8 ([[2, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2339 : ∀ P ∈ pathPatterns 3 0 [2, 2, 3, 2], HasCheckedCertificate 17 8 ([[2, 2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2340 : ∀ P ∈ pathPatterns 4 1 [2, 2, 4], HasCheckedCertificate 17 8 ([[2, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2341 : ∀ P ∈ pathPatterns 4 0 [2, 2, 5], HasCheckedCertificate 17 8 ([[2, 2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2322 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([2, 2] ++ tail) ∧ LexLE ([2, 2] ++ tail) ([2, 2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([2, 2] ++ tail).length) (9 - ([2, 2] ++ tail).sum) ([2, 2] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([2, 2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover2323 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1] [1, 1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1, 1, 1] ∧ LexLE [2, 2, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 2, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 1, 2] ∧ LexLE [2, 2, 1, 1, 1, 2] [2, 1, 1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 2] ∧ LexLE [2, 2, 1, 1, 2] [2, 1, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 1, 2, 1] ∧ LexLE [2, 2, 1, 1, 2, 1] [1, 2, 1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2330 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2] ∧ LexLE [2, 2, 1, 2] [2, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2, 1] ∧ LexLE [2, 2, 1, 2, 1] [1, 2, 1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 2, 1, 1] ∧ LexLE [2, 2, 1, 2, 1, 1] [1, 1, 2, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2331 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2332 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1, 3, 1] ∧ LexLE [2, 2, 1, 3, 1] [1, 3, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2333 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2334 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1] ∧ LexLE [2, 2, 2, 1] [1, 2, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1, 1] ∧ LexLE [2, 2, 2, 1, 1] [1, 1, 2, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1, 1, 1] ∧ LexLE [2, 2, 2, 1, 1, 1] [1, 1, 1, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 1, 2] ∧ LexLE [2, 2, 2, 1, 2] [2, 1, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2336 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 2, 2, 1] ∧ LexLE [2, 2, 2, 2, 1] [1, 2, 2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2337 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2338 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 3, 1] ∧ LexLE [2, 2, 3, 1] [1, 3, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 3, 1, 1] ∧ LexLE [2, 2, 3, 1, 1] [1, 1, 3, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2339 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2340 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 4, 1] ∧ LexLE [2, 2, 4, 1] [1, 4, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2341 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2343 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 17 8 ([[2, 3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2344 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 17 8 ([[2, 3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2342 : ∀ P ∈ pathPatterns 5 4 [2, 3], HasCheckedCertificate 17 8 ([[2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2343 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2344 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2345 : ∀ P ∈ pathPatterns 3 0 [2, 3, 1, 3], HasCheckedCertificate 17 8 ([[2, 3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2346 : ∀ P ∈ pathPatterns 4 2 [2, 3, 2], HasCheckedCertificate 17 8 ([[2, 3, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 2] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2347 : ∀ P ∈ pathPatterns 4 1 [2, 3, 3], HasCheckedCertificate 17 8 ([[2, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2348 : ∀ P ∈ pathPatterns 4 0 [2, 3, 4], HasCheckedCertificate 17 8 ([[2, 3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2350 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 17 8 ([[2, 4], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2349 : ∀ P ∈ pathPatterns 5 3 [2, 4], HasCheckedCertificate 17 8 ([[2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2350 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2351 : ∀ P ∈ pathPatterns 4 1 [2, 4, 2], HasCheckedCertificate 17 8 ([[2, 4, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2352 : ∀ P ∈ pathPatterns 4 0 [2, 4, 3], HasCheckedCertificate 17 8 ([[2, 4, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 4, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2353 : ∀ P ∈ pathPatterns 5 2 [2, 5], HasCheckedCertificate 17 8 ([[2, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2354 : ∀ P ∈ pathPatterns 4 0 [2, 5, 2], HasCheckedCertificate 17 8 ([[2, 5, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 5, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2355 : ∀ P ∈ pathPatterns 5 1 [2, 6], HasCheckedCertificate 17 8 ([[2, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 6] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2356 : ∀ P ∈ pathPatterns 5 0 [2, 7], HasCheckedCertificate 17 8 ([[2, 7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 7] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2243 : amountSequenceForall 6 7 (fun tail => + (LexLE [] ([2] ++ tail) ∧ LexLE ([2] ++ tail) ([2] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([2] ++ tail).length) (9 - ([2] ++ tail).sum) ([2] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([2] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover2244 + · intro q + fin_cases q + · exact k17t8_seq2285 + + · exact k17t8_seq2322 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2342 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1] ∧ LexLE [2, 3, 1, 1] [1, 1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1, 1] ∧ LexLE [2, 3, 1, 1, 1] [1, 1, 1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1, 1, 1] ∧ LexLE [2, 3, 1, 1, 1, 1] [1, 1, 1, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 1, 2] ∧ LexLE [2, 3, 1, 1, 2] [2, 1, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 2] ∧ LexLE [2, 3, 1, 2] [2, 1, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 1, 2, 1] ∧ LexLE [2, 3, 1, 2, 1] [1, 2, 1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2345 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2346 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 1] ∧ LexLE [2, 3, 2, 1] [1, 2, 3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 1, 1] ∧ LexLE [2, 3, 2, 1, 1] [1, 1, 2, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 2, 2] ∧ LexLE [2, 3, 2, 2] [2, 2, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2347 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 3, 3, 1] ∧ LexLE [2, 3, 3, 1] [1, 3, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2348 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2349 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1] ∧ LexLE [2, 4, 1] [1, 4, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 1] ∧ LexLE [2, 4, 1, 1] [1, 1, 4, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 1, 1] ∧ LexLE [2, 4, 1, 1, 1] [1, 1, 1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 1, 2] ∧ LexLE [2, 4, 1, 2] [2, 1, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2351 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 4, 2, 1] ∧ LexLE [2, 4, 2, 1] [1, 2, 4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2352 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2353 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1] ∧ LexLE [2, 5, 1] [1, 5, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 5, 1, 1] ∧ LexLE [2, 5, 1, 1] [1, 1, 5, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2354 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2355 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 6, 1] ∧ LexLE [2, 6, 1] [1, 6, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2356 + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2360 : amountSequenceForall 4 5 (fun tail => + (LexLE [3] ([1] ++ tail) ∧ LexLE ([1] ++ tail) ([1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([1] ++ tail).length) (6 - ([1] ++ tail).sum) ([1] ++ tail), + HasCheckedCertificate 17 8 ([[3]] ++ (([1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1, 1] [1, 1, 1, 1, 1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 1, 2] ∧ LexLE [1, 1, 1, 1, 2] [2, 1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 2, 1] ∧ LexLE [1, 1, 1, 2, 1] [1, 2, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1, 3] ∧ LexLE [1, 1, 1, 3] [3, 1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2, 1, 1] ∧ LexLE [1, 1, 2, 1, 1] [1, 1, 2, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 2, 2] ∧ LexLE [1, 1, 2, 2] [2, 2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 3, 1] ∧ LexLE [1, 1, 3, 1] [1, 3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 4] ∧ LexLE [1, 1, 4] [4, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1, 1, 1] ∧ LexLE [1, 2, 1, 1, 1] [1, 1, 1, 2, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 1, 2] ∧ LexLE [1, 2, 1, 2] [2, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 2, 1] ∧ LexLE [1, 2, 2, 1] [1, 2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2, 3] ∧ LexLE [1, 2, 3] [3, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3, 1, 1] ∧ LexLE [1, 3, 1, 1] [1, 1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 3, 2] ∧ LexLE [1, 3, 2] [2, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 4, 1] ∧ LexLE [1, 4, 1] [1, 4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 5] ∧ LexLE [1, 5] [5, 1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2362 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 17 8 ([[3], [3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2361 : ∀ P ∈ pathPatterns 4 3 [3], HasCheckedCertificate 17 8 ([[3], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2362 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2363 : ∀ P ∈ pathPatterns 3 0 [3, 3], HasCheckedCertificate 17 8 ([[3], [3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2364 : ∀ P ∈ pathPatterns 4 2 [4], HasCheckedCertificate 17 8 ([[3], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2365 : ∀ P ∈ pathPatterns 4 1 [5], HasCheckedCertificate 17 8 ([[3], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2366 : ∀ P ∈ pathPatterns 4 0 [6], HasCheckedCertificate 17 8 ([[3], [6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2359 : amountSequenceForall 5 6 (fun tail => + (LexLE [3] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (6 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[3]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact k17t8_seq2360 + + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1, 1, 1] ∧ LexLE [2, 1, 1, 1, 1] [1, 1, 1, 1, 2])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 1, 2] ∧ LexLE [2, 1, 1, 2] [2, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 2] ∧ LexLE [2, 1, 2] [2, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 2, 1] ∧ LexLE [2, 1, 2, 1] [1, 2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 1, 3] ∧ LexLE [2, 1, 3] [3, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2, 1, 1] ∧ LexLE [2, 2, 1, 1] [1, 1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 2, 2] ∧ LexLE [2, 2, 2] [2, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 3, 1] ∧ LexLE [2, 3, 1] [1, 3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2, 4] ∧ LexLE [2, 4] [4, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2361 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2363 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2364 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2365 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2366 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2358 : ∀ P ∈ pathPatterns 6 6 [3], HasCheckedCertificate 17 8 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq2359 + + +private theorem k17t8_cover2368 : ∀ P ∈ pathPatterns 2 0 [3, 1, 1, 1, 3], HasCheckedCertificate 17 8 ([[3, 1, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2369 : ∀ P ∈ pathPatterns 3 1 [3, 1, 1, 3], HasCheckedCertificate 17 8 ([[3, 1, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2370 : ∀ P ∈ pathPatterns 3 0 [3, 1, 1, 4], HasCheckedCertificate 17 8 ([[3, 1, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2371 : ∀ P ∈ pathPatterns 3 0 [3, 1, 2, 3], HasCheckedCertificate 17 8 ([[3, 1, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2372 : ∀ P ∈ pathPatterns 4 2 [3, 1, 3], HasCheckedCertificate 17 8 ([[3, 1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2373 : ∀ P ∈ pathPatterns 4 1 [3, 1, 4], HasCheckedCertificate 17 8 ([[3, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2374 : ∀ P ∈ pathPatterns 4 0 [3, 1, 5], HasCheckedCertificate 17 8 ([[3, 1, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 1, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2367 : amountSequenceForall 5 5 (fun tail => + (LexLE [] ([3, 1] ++ tail) ∧ LexLE ([3, 1] ++ tail) ([3, 1] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([3, 1] ++ tail).length) (9 - ([3, 1] ++ tail).sum) ([3, 1] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([3, 1] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1] ∧ LexLE [3, 1, 1, 1] [1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1] [1, 1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1, 1, 1] ∧ LexLE [3, 1, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 1, 2] ∧ LexLE [3, 1, 1, 1, 1, 2] [2, 1, 1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 2] ∧ LexLE [3, 1, 1, 1, 2] [2, 1, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 1, 2, 1] ∧ LexLE [3, 1, 1, 1, 2, 1] [1, 2, 1, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2368 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2] ∧ LexLE [3, 1, 1, 2] [2, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2, 1] ∧ LexLE [3, 1, 1, 2, 1] [1, 2, 1, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2, 1, 1] ∧ LexLE [3, 1, 1, 2, 1, 1] [1, 1, 2, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 2, 2] ∧ LexLE [3, 1, 1, 2, 2] [2, 2, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2369 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1, 3, 1] ∧ LexLE [3, 1, 1, 3, 1] [1, 3, 1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2370 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2] ∧ LexLE [3, 1, 2] [2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1] ∧ LexLE [3, 1, 2, 1] [1, 2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1, 1] ∧ LexLE [3, 1, 2, 1, 1] [1, 1, 2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1, 1, 1] ∧ LexLE [3, 1, 2, 1, 1, 1] [1, 1, 1, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 1, 2] ∧ LexLE [3, 1, 2, 1, 2] [2, 1, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 2] ∧ LexLE [3, 1, 2, 2] [2, 2, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 2, 2, 1] ∧ LexLE [3, 1, 2, 2, 1] [1, 2, 2, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2371 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2372 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 1] ∧ LexLE [3, 1, 3, 1] [1, 3, 1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 1, 1] ∧ LexLE [3, 1, 3, 1, 1] [1, 1, 3, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 3, 2] ∧ LexLE [3, 1, 3, 2] [2, 3, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2373 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 4, 1] ∧ LexLE [3, 1, 4, 1] [1, 4, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2374 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2375 : ∀ P ∈ pathPatterns 4 1 [3, 2, 3], HasCheckedCertificate 17 8 ([[3, 2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2376 : ∀ P ∈ pathPatterns 4 0 [3, 2, 4], HasCheckedCertificate 17 8 ([[3, 2, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 2, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2377 : ∀ P ∈ pathPatterns 5 3 [3, 3], HasCheckedCertificate 17 8 ([[3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2378 : ∀ P ∈ pathPatterns 4 0 [3, 3, 3], HasCheckedCertificate 17 8 ([[3, 3, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 3, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2379 : ∀ P ∈ pathPatterns 5 2 [3, 4], HasCheckedCertificate 17 8 ([[3, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 4] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2380 : ∀ P ∈ pathPatterns 5 1 [3, 5], HasCheckedCertificate 17 8 ([[3, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 5] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2381 : ∀ P ∈ pathPatterns 5 0 [3, 6], HasCheckedCertificate 17 8 ([[3, 6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3, 6] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2357 : amountSequenceForall 6 6 (fun tail => + (LexLE [] ([3] ++ tail) ∧ LexLE ([3] ++ tail) ([3] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([3] ++ tail).length) (9 - ([3] ++ tail).sum) ([3] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([3] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover2358 + · intro q + fin_cases q + · exact k17t8_seq2367 + + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1] ∧ LexLE [3, 2, 1] [1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1] ∧ LexLE [3, 2, 1, 1] [1, 1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1, 1] ∧ LexLE [3, 2, 1, 1, 1] [1, 1, 1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1, 1, 1] ∧ LexLE [3, 2, 1, 1, 1, 1] [1, 1, 1, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 1, 2] ∧ LexLE [3, 2, 1, 1, 2] [2, 1, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 2] ∧ LexLE [3, 2, 1, 2] [2, 1, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 2, 1] ∧ LexLE [3, 2, 1, 2, 1] [1, 2, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 1, 3] ∧ LexLE [3, 2, 1, 3] [3, 1, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2] ∧ LexLE [3, 2, 2] [2, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 1] ∧ LexLE [3, 2, 2, 1] [1, 2, 2, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 1, 1] ∧ LexLE [3, 2, 2, 1, 1] [1, 1, 2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 2, 2] ∧ LexLE [3, 2, 2, 2] [2, 2, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2375 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2, 3, 1] ∧ LexLE [3, 2, 3, 1] [1, 3, 2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2376 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2377 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1] ∧ LexLE [3, 3, 1] [1, 3, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 1] ∧ LexLE [3, 3, 1, 1] [1, 1, 3, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 1, 1] ∧ LexLE [3, 3, 1, 1, 1] [1, 1, 1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 1, 2] ∧ LexLE [3, 3, 1, 2] [2, 1, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2] ∧ LexLE [3, 3, 2] [2, 3, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 3, 2, 1] ∧ LexLE [3, 3, 2, 1] [1, 2, 3, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2378 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2379 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1] ∧ LexLE [3, 4, 1] [1, 4, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 1, 1] ∧ LexLE [3, 4, 1, 1] [1, 1, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 4, 2] ∧ LexLE [3, 4, 2] [2, 4, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2380 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 5, 1] ∧ LexLE [3, 5, 1] [1, 5, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2381 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2385 : ∀ P ∈ pathPatterns 4 1 [4], HasCheckedCertificate 17 8 ([[4], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2386 : ∀ P ∈ pathPatterns 4 0 [5], HasCheckedCertificate 17 8 ([[4], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2384 : amountSequenceForall 5 5 (fun tail => + (LexLE [4] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (5 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([[4]] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1, 1] [1, 1, 1, 1, 1])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 1, 2] ∧ LexLE [1, 1, 1, 2] [2, 1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 2, 1] ∧ LexLE [1, 1, 2, 1] [1, 2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 1, 3] ∧ LexLE [1, 1, 3] [3, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2, 1, 1] ∧ LexLE [1, 2, 1, 1] [1, 1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 2, 2] ∧ LexLE [1, 2, 2] [2, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 3, 1] ∧ LexLE [1, 3, 1] [1, 3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1, 4] ∧ LexLE [1, 4] [4, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1, 1, 1] ∧ LexLE [2, 1, 1, 1] [1, 1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 1, 2] ∧ LexLE [2, 1, 2] [2, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [2, 3] ∧ LexLE [2, 3] [3, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2385 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2386 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2383 : ∀ P ∈ pathPatterns 6 5 [4], HasCheckedCertificate 17 8 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq2384 + + +private theorem k17t8_cover2387 : ∀ P ∈ pathPatterns 4 0 [4, 1, 4], HasCheckedCertificate 17 8 ([[4, 1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 1, 4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2388 : ∀ P ∈ pathPatterns 5 1 [4, 4], HasCheckedCertificate 17 8 ([[4, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 4] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2389 : ∀ P ∈ pathPatterns 5 0 [4, 5], HasCheckedCertificate 17 8 ([[4, 5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4, 5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2382 : amountSequenceForall 6 5 (fun tail => + (LexLE [] ([4] ++ tail) ∧ LexLE ([4] ++ tail) ([4] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([4] ++ tail).length) (9 - ([4] ++ tail).sum) ([4] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([4] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover2383 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1] ∧ LexLE [4, 1, 1] [1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1] ∧ LexLE [4, 1, 1, 1] [1, 1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1, 1] ∧ LexLE [4, 1, 1, 1, 1] [1, 1, 1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1, 1, 1] ∧ LexLE [4, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 1, 2] ∧ LexLE [4, 1, 1, 1, 2] [2, 1, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 2] ∧ LexLE [4, 1, 1, 2] [2, 1, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 2, 1] ∧ LexLE [4, 1, 1, 2, 1] [1, 2, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 1, 3] ∧ LexLE [4, 1, 1, 3] [3, 1, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2] ∧ LexLE [4, 1, 2] [2, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 1] ∧ LexLE [4, 1, 2, 1] [1, 2, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 1, 1] ∧ LexLE [4, 1, 2, 1, 1] [1, 1, 2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 2, 2] ∧ LexLE [4, 1, 2, 2] [2, 2, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3] ∧ LexLE [4, 1, 3] [3, 1, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1, 3, 1] ∧ LexLE [4, 1, 3, 1] [1, 3, 1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2387 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2] ∧ LexLE [4, 2] [2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1] ∧ LexLE [4, 2, 1] [1, 2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 1] ∧ LexLE [4, 2, 1, 1] [1, 1, 2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 1, 1] ∧ LexLE [4, 2, 1, 1, 1] [1, 1, 1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 1, 2] ∧ LexLE [4, 2, 1, 2] [2, 1, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2] ∧ LexLE [4, 2, 2] [2, 2, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 2, 1] ∧ LexLE [4, 2, 2, 1] [1, 2, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 2, 3] ∧ LexLE [4, 2, 3] [3, 2, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3] ∧ LexLE [4, 3] [3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1] ∧ LexLE [4, 3, 1] [1, 3, 4])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 1, 1] ∧ LexLE [4, 3, 1, 1] [1, 1, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 3, 2] ∧ LexLE [4, 3, 2] [2, 3, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2388 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 4, 1] ∧ LexLE [4, 4, 1] [1, 4, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2389 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2390 : ∀ P ∈ pathPatterns 6 4 [5], HasCheckedCertificate 17 8 ([[5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1, 1, 1] ∧ LexLE [1, 1, 1, 1] [1, 1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 1, 2] ∧ LexLE [1, 1, 2] [2, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 2, 1] ∧ LexLE [1, 2, 1] [1, 2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [1, 3] ∧ LexLE [1, 3] [3, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [2, 2] ∧ LexLE [2, 2] [2, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3] ∧ LexLE [3] [3])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [4] ∧ LexLE [4] [4])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2391 : ∀ P ∈ pathPatterns 6 3 [6], HasCheckedCertificate 17 8 ([[6]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 1, 1] ∧ LexLE [1, 1, 1] [1, 1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [1, 2] ∧ LexLE [1, 2] [2, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2] ∧ LexLE [2] [2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [6] [3] ∧ LexLE [3] [3])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2392 : ∀ P ∈ pathPatterns 6 2 [7], HasCheckedCertificate 17 8 ([[7]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [7] [2] ∧ LexLE [2] [2])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2393 : ∀ P ∈ pathPatterns 6 1 [8], HasCheckedCertificate 17 8 ([[8]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [8] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover2394 : ∀ P ∈ pathPatterns 6 0 [9], HasCheckedCertificate 17 8 ([[9]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [9] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k17t8_seq2 : amountSequenceForall 7 9 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (7 - ([] ++ tail).length) (9 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 17 8 ([] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k17t8_cover3 + · intro q + fin_cases q + · exact k17t8_seq1474 + + · exact k17t8_seq2243 + + · exact k17t8_seq2357 + + · exact k17t8_seq2382 + + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2390 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1] ∧ LexLE [5, 1] [1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1] ∧ LexLE [5, 1, 1] [1, 1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 1] ∧ LexLE [5, 1, 1, 1] [1, 1, 1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 1, 1] ∧ LexLE [5, 1, 1, 1, 1] [1, 1, 1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 1, 2] ∧ LexLE [5, 1, 1, 2] [2, 1, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2] ∧ LexLE [5, 1, 2] [2, 1, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 2, 1] ∧ LexLE [5, 1, 2, 1] [1, 2, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 1, 3] ∧ LexLE [5, 1, 3] [3, 1, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2] ∧ LexLE [5, 2] [2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1] ∧ LexLE [5, 2, 1] [1, 2, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 1, 1] ∧ LexLE [5, 2, 1, 1] [1, 1, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 2, 2] ∧ LexLE [5, 2, 2] [2, 2, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3] ∧ LexLE [5, 3] [3, 5])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 3, 1] ∧ LexLE [5, 3, 1] [1, 3, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [5, 4] ∧ LexLE [5, 4] [4, 5])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2391 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1] ∧ LexLE [6, 1] [1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1] ∧ LexLE [6, 1, 1] [1, 1, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 1, 1] ∧ LexLE [6, 1, 1, 1] [1, 1, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 1, 2] ∧ LexLE [6, 1, 2] [2, 1, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2] ∧ LexLE [6, 2] [2, 6])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 2, 1] ∧ LexLE [6, 2, 1] [1, 2, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [6, 3] ∧ LexLE [6, 3] [3, 6])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2392 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1] ∧ LexLE [7, 1] [1, 7])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 1, 1] ∧ LexLE [7, 1, 1] [1, 1, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [7, 2] ∧ LexLE [7, 2] [2, 7])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2393 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [8, 1] ∧ LexLE [8, 1] [1, 8])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k17t8_cover2394 + · intro q + exact Fin.elim0 q + +private theorem k17t8_cover1 : ∀ P ∈ pathPatterns 8 9 [], HasCheckedCertificate 17 8 ([] ++ P) := by + apply pathPatterns_forall_step + exact k17t8_seq2 + + +theorem coverage_k17_t8 : + ∀ P ∈ pathPatterns 8 9, HasCheckedCertificate 17 8 P := + k17t8_cover1 + +end CycleClique.Construction.CertifiedCoverage + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK5.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK5.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3c6b1ec2addcc5672404bdb03ecc188ba37d703 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK5.lean @@ -0,0 +1,226 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK5 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage + +namespace OAI + +namespace CycleClique.Construction.CertifiedCoverage + +private theorem k5t3_cover4 : ∀ P ∈ pathPatterns 0 2 [], HasCheckedCertificate 5 3 ([[], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k5t3p0, Certificates.k5t3p0_check⟩ + +private theorem k5t3_cover3 : ∀ P ∈ pathPatterns 1 2 [], HasCheckedCertificate 5 3 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k5t3_cover4 + +private theorem k5t3_cover5 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 5 3 ([[], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k5t3p1, Certificates.k5t3p1_check⟩ + +private theorem k5t3_cover6 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 5 3 ([[], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k5t3p2, Certificates.k5t3p2_check⟩ + +private theorem k5t3_cover2 : ∀ P ∈ pathPatterns 2 2 [], HasCheckedCertificate 5 3 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k5t3_cover3 + · intro q + fin_cases q + · exact by + intro _ + exact k5t3_cover5 + · exact by + intro _ + exact k5t3_cover6 + +private theorem k5t3_cover7 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 5 3 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k5t3_cover8 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 5 3 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k5t3p3, Certificates.k5t3p3_check⟩ + +private theorem k5t3_cover9 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 5 3 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k5t3_cover1 : ∀ P ∈ pathPatterns 3 2 [], HasCheckedCertificate 5 3 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k5t3_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k5t3_cover7 + · intro q + fin_cases q + · exact by + intro _ + exact k5t3_cover8 + · exact by + constructor + · exact by + intro _ + exact k5t3_cover9 + · intro q + exact Fin.elim0 q + +theorem coverage_k5_t3 : + ∀ P ∈ pathPatterns 3 2, HasCheckedCertificate 5 3 P := + k5t3_cover1 + +private theorem k5t4_cover5 : ∀ P ∈ pathPatterns 0 1 [], HasCheckedCertificate 5 4 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k5t4p0, Certificates.k5t4p0_check⟩ + +private theorem k5t4_cover4 : ∀ P ∈ pathPatterns 1 1 [], HasCheckedCertificate 5 4 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k5t4_cover5 + +private theorem k5t4_cover6 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 5 4 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k5t4p1, Certificates.k5t4p1_check⟩ + +private theorem k5t4_cover3 : ∀ P ∈ pathPatterns 2 1 [], HasCheckedCertificate 5 4 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k5t4_cover4 + · intro q + fin_cases q + · exact by + intro _ + exact k5t4_cover6 + +private theorem k5t4_cover7 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 5 4 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k5t4_cover2 : ∀ P ∈ pathPatterns 3 1 [], HasCheckedCertificate 5 4 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k5t4_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k5t4_cover7 + · intro q + exact Fin.elim0 q + +private theorem k5t4_cover8 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 5 4 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k5t4_cover1 : ∀ P ∈ pathPatterns 4 1 [], HasCheckedCertificate 5 4 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k5t4_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k5t4_cover8 + · intro q + exact Fin.elim0 q + +theorem coverage_k5_t4 : + ∀ P ∈ pathPatterns 4 1, HasCheckedCertificate 5 4 P := + k5t4_cover1 + +private theorem k5t5_cover6 : ∀ P ∈ pathPatterns 0 0 [], HasCheckedCertificate 5 5 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k5t5p0, Certificates.k5t5p0_check⟩ + +private theorem k5t5_cover5 : ∀ P ∈ pathPatterns 1 0 [], HasCheckedCertificate 5 5 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k5t5_cover6 + +private theorem k5t5_cover4 : ∀ P ∈ pathPatterns 2 0 [], HasCheckedCertificate 5 5 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k5t5_cover5 + · intro q + exact Fin.elim0 q + +private theorem k5t5_cover3 : ∀ P ∈ pathPatterns 3 0 [], HasCheckedCertificate 5 5 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k5t5_cover4 + · intro q + exact Fin.elim0 q + +private theorem k5t5_cover2 : ∀ P ∈ pathPatterns 4 0 [], HasCheckedCertificate 5 5 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k5t5_cover3 + · intro q + exact Fin.elim0 q + +private theorem k5t5_cover1 : ∀ P ∈ pathPatterns 5 0 [], HasCheckedCertificate 5 5 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k5t5_cover2 + · intro q + exact Fin.elim0 q + +theorem coverage_k5_t5 : + ∀ P ∈ pathPatterns 5 0, HasCheckedCertificate 5 5 P := + k5t5_cover1 + +end CycleClique.Construction.CertifiedCoverage + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK6.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK6.lean new file mode 100644 index 0000000000000000000000000000000000000000..a22ca01832e35423df7c68153fb859c2684dbf41 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK6.lean @@ -0,0 +1,438 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK6 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage + +namespace OAI + +namespace CycleClique.Construction.CertifiedCoverage + +private theorem k6t3_cover4 : ∀ P ∈ pathPatterns 0 3 [], HasCheckedCertificate 6 3 ([[], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k6t3p0, Certificates.k6t3p0_check⟩ + +private theorem k6t3_cover3 : ∀ P ∈ pathPatterns 1 3 [], HasCheckedCertificate 6 3 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k6t3_cover4 + +private theorem k6t3_cover5 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 6 3 ([[], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k6t3p1, Certificates.k6t3p1_check⟩ + +private theorem k6t3_cover6 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 6 3 ([[], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k6t3p2, Certificates.k6t3p2_check⟩ + +private theorem k6t3_cover7 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 6 3 ([[], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k6t3p3, Certificates.k6t3p3_check⟩ + +private theorem k6t3_cover2 : ∀ P ∈ pathPatterns 2 3 [], HasCheckedCertificate 6 3 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k6t3_cover3 + · intro q + fin_cases q + · exact by + intro _ + exact k6t3_cover5 + · exact by + intro _ + exact k6t3_cover6 + · exact by + intro _ + exact k6t3_cover7 + +private theorem k6t3_cover8 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 6 3 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k6t3_cover9 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 6 3 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k6t3p4, Certificates.k6t3p4_check⟩ + +private theorem k6t3_cover10 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 6 3 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k6t3p5, Certificates.k6t3p5_check⟩ + +private theorem k6t3_cover11 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 6 3 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k6t3_cover12 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 6 3 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k6t3_cover1 : ∀ P ∈ pathPatterns 3 3 [], HasCheckedCertificate 6 3 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k6t3_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k6t3_cover8 + · intro q + fin_cases q + · exact by + intro _ + exact k6t3_cover9 + · exact by + intro _ + exact k6t3_cover10 + · exact by + constructor + · exact by + intro _ + exact k6t3_cover11 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k6t3_cover12 + · intro q + exact Fin.elim0 q + +theorem coverage_k6_t3 : + ∀ P ∈ pathPatterns 3 3, HasCheckedCertificate 6 3 P := + k6t3_cover1 + +private theorem k6t4_cover5 : ∀ P ∈ pathPatterns 0 2 [], HasCheckedCertificate 6 4 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k6t4p0, Certificates.k6t4p0_check⟩ + +private theorem k6t4_cover4 : ∀ P ∈ pathPatterns 1 2 [], HasCheckedCertificate 6 4 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k6t4_cover5 + +private theorem k6t4_cover6 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 6 4 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k6t4p1, Certificates.k6t4p1_check⟩ + +private theorem k6t4_cover7 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 6 4 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k6t4p2, Certificates.k6t4p2_check⟩ + +private theorem k6t4_cover3 : ∀ P ∈ pathPatterns 2 2 [], HasCheckedCertificate 6 4 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k6t4_cover4 + · intro q + fin_cases q + · exact by + intro _ + exact k6t4_cover6 + · exact by + intro _ + exact k6t4_cover7 + +private theorem k6t4_cover8 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 6 4 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k6t4_cover9 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 6 4 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k6t4p3, Certificates.k6t4p3_check⟩ + +private theorem k6t4_cover10 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 6 4 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k6t4_cover2 : ∀ P ∈ pathPatterns 3 2 [], HasCheckedCertificate 6 4 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k6t4_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k6t4_cover8 + · intro q + fin_cases q + · exact by + intro _ + exact k6t4_cover9 + · exact by + constructor + · exact by + intro _ + exact k6t4_cover10 + · intro q + exact Fin.elim0 q + +private theorem k6t4_cover12 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 6 4 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k6t4p4, Certificates.k6t4p4_check⟩ + +private theorem k6t4_cover11 : ∀ P ∈ pathPatterns 2 1 [1], HasCheckedCertificate 6 4 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k6t4_cover12 + +private theorem k6t4_cover13 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 6 4 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k6t4_cover14 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 6 4 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k6t4_cover1 : ∀ P ∈ pathPatterns 4 2 [], HasCheckedCertificate 6 4 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k6t4_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k6t4_cover11 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k6t4_cover13 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k6t4_cover14 + · intro q + exact Fin.elim0 q + +theorem coverage_k6_t4 : + ∀ P ∈ pathPatterns 4 2, HasCheckedCertificate 6 4 P := + k6t4_cover1 + +private theorem k6t5_cover6 : ∀ P ∈ pathPatterns 0 1 [], HasCheckedCertificate 6 5 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k6t5p0, Certificates.k6t5p0_check⟩ + +private theorem k6t5_cover5 : ∀ P ∈ pathPatterns 1 1 [], HasCheckedCertificate 6 5 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k6t5_cover6 + +private theorem k6t5_cover7 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 6 5 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k6t5p1, Certificates.k6t5p1_check⟩ + +private theorem k6t5_cover4 : ∀ P ∈ pathPatterns 2 1 [], HasCheckedCertificate 6 5 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k6t5_cover5 + · intro q + fin_cases q + · exact by + intro _ + exact k6t5_cover7 + +private theorem k6t5_cover8 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 6 5 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k6t5_cover3 : ∀ P ∈ pathPatterns 3 1 [], HasCheckedCertificate 6 5 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k6t5_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k6t5_cover8 + · intro q + exact Fin.elim0 q + +private theorem k6t5_cover9 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 6 5 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k6t5_cover2 : ∀ P ∈ pathPatterns 4 1 [], HasCheckedCertificate 6 5 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k6t5_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k6t5_cover9 + · intro q + exact Fin.elim0 q + +private theorem k6t5_cover10 : ∀ P ∈ pathPatterns 3 0 [1], HasCheckedCertificate 6 5 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k6t5_cover1 : ∀ P ∈ pathPatterns 5 1 [], HasCheckedCertificate 6 5 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k6t5_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k6t5_cover10 + · intro q + exact Fin.elim0 q + +theorem coverage_k6_t5 : + ∀ P ∈ pathPatterns 5 1, HasCheckedCertificate 6 5 P := + k6t5_cover1 + +private theorem k6t6_cover7 : ∀ P ∈ pathPatterns 0 0 [], HasCheckedCertificate 6 6 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k6t6p0, Certificates.k6t6p0_check⟩ + +private theorem k6t6_cover6 : ∀ P ∈ pathPatterns 1 0 [], HasCheckedCertificate 6 6 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k6t6_cover7 + +private theorem k6t6_cover5 : ∀ P ∈ pathPatterns 2 0 [], HasCheckedCertificate 6 6 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k6t6_cover6 + · intro q + exact Fin.elim0 q + +private theorem k6t6_cover4 : ∀ P ∈ pathPatterns 3 0 [], HasCheckedCertificate 6 6 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k6t6_cover5 + · intro q + exact Fin.elim0 q + +private theorem k6t6_cover3 : ∀ P ∈ pathPatterns 4 0 [], HasCheckedCertificate 6 6 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k6t6_cover4 + · intro q + exact Fin.elim0 q + +private theorem k6t6_cover2 : ∀ P ∈ pathPatterns 5 0 [], HasCheckedCertificate 6 6 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k6t6_cover3 + · intro q + exact Fin.elim0 q + +private theorem k6t6_cover1 : ∀ P ∈ pathPatterns 6 0 [], HasCheckedCertificate 6 6 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k6t6_cover2 + · intro q + exact Fin.elim0 q + +theorem coverage_k6_t6 : + ∀ P ∈ pathPatterns 6 0, HasCheckedCertificate 6 6 P := + k6t6_cover1 + +end CycleClique.Construction.CertifiedCoverage + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK7.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK7.lean new file mode 100644 index 0000000000000000000000000000000000000000..bfe5e23e03d3e962a1b09995a5aa2ac3eaaffd76 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK7.lean @@ -0,0 +1,815 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK7 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage + +namespace OAI + +namespace CycleClique.Construction.CertifiedCoverage + +private theorem k7t3_cover4 : ∀ P ∈ pathPatterns 0 4 [], HasCheckedCertificate 7 3 ([[], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t3p0, Certificates.k7t3p0_check⟩ + +private theorem k7t3_cover3 : ∀ P ∈ pathPatterns 1 4 [], HasCheckedCertificate 7 3 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k7t3_cover4 + +private theorem k7t3_cover5 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 7 3 ([[], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t3p1, Certificates.k7t3p1_check⟩ + +private theorem k7t3_cover6 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 7 3 ([[], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t3p2, Certificates.k7t3p2_check⟩ + +private theorem k7t3_cover7 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 7 3 ([[], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t3p3, Certificates.k7t3p3_check⟩ + +private theorem k7t3_cover8 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 7 3 ([[], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t3p4, Certificates.k7t3p4_check⟩ + +private theorem k7t3_cover2 : ∀ P ∈ pathPatterns 2 4 [], HasCheckedCertificate 7 3 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t3_cover3 + · intro q + fin_cases q + · exact by + intro _ + exact k7t3_cover5 + · exact by + intro _ + exact k7t3_cover6 + · exact by + intro _ + exact k7t3_cover7 + · exact by + intro _ + exact k7t3_cover8 + +private theorem k7t3_cover9 : ∀ P ∈ pathPatterns 1 3 [1], HasCheckedCertificate 7 3 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k7t3_cover10 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 7 3 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t3p5, Certificates.k7t3p5_check⟩ + +private theorem k7t3_cover11 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 7 3 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t3p6, Certificates.k7t3p6_check⟩ + +private theorem k7t3_cover12 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 7 3 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t3p7, Certificates.k7t3p7_check⟩ + +private theorem k7t3_cover13 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 7 3 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k7t3_cover14 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 7 3 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t3p8, Certificates.k7t3p8_check⟩ + +private theorem k7t3_cover15 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 7 3 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k7t3_cover16 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 7 3 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k7t3_cover1 : ∀ P ∈ pathPatterns 3 4 [], HasCheckedCertificate 7 3 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t3_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k7t3_cover9 + · intro q + fin_cases q + · exact by + intro _ + exact k7t3_cover10 + · exact by + intro _ + exact k7t3_cover11 + · exact by + intro _ + exact k7t3_cover12 + · exact by + constructor + · exact by + intro _ + exact k7t3_cover13 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k7t3_cover14 + · exact by + constructor + · exact by + intro _ + exact k7t3_cover15 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k7t3_cover16 + · intro q + exact Fin.elim0 q + +theorem coverage_k7_t3 : + ∀ P ∈ pathPatterns 3 4, HasCheckedCertificate 7 3 P := + k7t3_cover1 + +private theorem k7t4_cover5 : ∀ P ∈ pathPatterns 0 3 [], HasCheckedCertificate 7 4 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t4p0, Certificates.k7t4p0_check⟩ + +private theorem k7t4_cover4 : ∀ P ∈ pathPatterns 1 3 [], HasCheckedCertificate 7 4 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k7t4_cover5 + +private theorem k7t4_cover6 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 7 4 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t4p1, Certificates.k7t4p1_check⟩ + +private theorem k7t4_cover7 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 7 4 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t4p2, Certificates.k7t4p2_check⟩ + +private theorem k7t4_cover8 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 7 4 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t4p3, Certificates.k7t4p3_check⟩ + +private theorem k7t4_cover3 : ∀ P ∈ pathPatterns 2 3 [], HasCheckedCertificate 7 4 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t4_cover4 + · intro q + fin_cases q + · exact by + intro _ + exact k7t4_cover6 + · exact by + intro _ + exact k7t4_cover7 + · exact by + intro _ + exact k7t4_cover8 + +private theorem k7t4_cover9 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 7 4 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k7t4_cover10 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 7 4 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t4p4, Certificates.k7t4p4_check⟩ + +private theorem k7t4_cover11 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 7 4 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t4p5, Certificates.k7t4p5_check⟩ + +private theorem k7t4_cover12 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 7 4 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k7t4_cover13 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 7 4 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k7t4_cover2 : ∀ P ∈ pathPatterns 3 3 [], HasCheckedCertificate 7 4 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t4_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k7t4_cover9 + · intro q + fin_cases q + · exact by + intro _ + exact k7t4_cover10 + · exact by + intro _ + exact k7t4_cover11 + · exact by + constructor + · exact by + intro _ + exact k7t4_cover12 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k7t4_cover13 + · intro q + exact Fin.elim0 q + +private theorem k7t4_cover15 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 7 4 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t4p6, Certificates.k7t4p6_check⟩ + +private theorem k7t4_cover16 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 7 4 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t4p7, Certificates.k7t4p7_check⟩ + +private theorem k7t4_cover14 : ∀ P ∈ pathPatterns 2 2 [1], HasCheckedCertificate 7 4 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k7t4_cover15 + · exact by + intro _ + exact k7t4_cover16 + +private theorem k7t4_cover17 : ∀ P ∈ pathPatterns 1 1 [1, 1], HasCheckedCertificate 7 4 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k7t4_cover18 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1], HasCheckedCertificate 7 4 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t4p8, Certificates.k7t4p8_check⟩ + +private theorem k7t4_cover19 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 7 4 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k7t4_cover20 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 7 4 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k7t4_cover21 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 7 4 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k7t4_cover1 : ∀ P ∈ pathPatterns 4 3 [], HasCheckedCertificate 7 4 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t4_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k7t4_cover14 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k7t4_cover17 + · intro q + fin_cases q + · exact by + intro _ + exact k7t4_cover18 + · exact by + constructor + · exact by + intro _ + exact k7t4_cover19 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k7t4_cover20 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k7t4_cover21 + · intro q + exact Fin.elim0 q + +theorem coverage_k7_t4 : + ∀ P ∈ pathPatterns 4 3, HasCheckedCertificate 7 4 P := + k7t4_cover1 + +private theorem k7t5_cover6 : ∀ P ∈ pathPatterns 0 2 [], HasCheckedCertificate 7 5 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t5p0, Certificates.k7t5p0_check⟩ + +private theorem k7t5_cover5 : ∀ P ∈ pathPatterns 1 2 [], HasCheckedCertificate 7 5 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k7t5_cover6 + +private theorem k7t5_cover7 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 7 5 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t5p1, Certificates.k7t5p1_check⟩ + +private theorem k7t5_cover8 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 7 5 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t5p2, Certificates.k7t5p2_check⟩ + +private theorem k7t5_cover4 : ∀ P ∈ pathPatterns 2 2 [], HasCheckedCertificate 7 5 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t5_cover5 + · intro q + fin_cases q + · exact by + intro _ + exact k7t5_cover7 + · exact by + intro _ + exact k7t5_cover8 + +private theorem k7t5_cover9 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 7 5 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k7t5_cover10 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 7 5 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t5p3, Certificates.k7t5p3_check⟩ + +private theorem k7t5_cover11 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 7 5 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k7t5_cover3 : ∀ P ∈ pathPatterns 3 2 [], HasCheckedCertificate 7 5 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t5_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k7t5_cover9 + · intro q + fin_cases q + · exact by + intro _ + exact k7t5_cover10 + · exact by + constructor + · exact by + intro _ + exact k7t5_cover11 + · intro q + exact Fin.elim0 q + +private theorem k7t5_cover13 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 7 5 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t5p4, Certificates.k7t5p4_check⟩ + +private theorem k7t5_cover12 : ∀ P ∈ pathPatterns 2 1 [1], HasCheckedCertificate 7 5 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k7t5_cover13 + +private theorem k7t5_cover14 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 7 5 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k7t5_cover15 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 7 5 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k7t5_cover2 : ∀ P ∈ pathPatterns 4 2 [], HasCheckedCertificate 7 5 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t5_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k7t5_cover12 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k7t5_cover14 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k7t5_cover15 + · intro q + exact Fin.elim0 q + +private theorem k7t5_cover17 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 7 5 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k7t5_cover16 : ∀ P ∈ pathPatterns 3 1 [1], HasCheckedCertificate 7 5 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k7t5_cover17 + · intro q + exact Fin.elim0 q + +private theorem k7t5_cover18 : ∀ P ∈ pathPatterns 2 0 [1, 1], HasCheckedCertificate 7 5 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k7t5_cover19 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 7 5 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k7t5_cover1 : ∀ P ∈ pathPatterns 5 2 [], HasCheckedCertificate 7 5 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t5_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k7t5_cover16 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k7t5_cover18 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k7t5_cover19 + · intro q + exact Fin.elim0 q + +theorem coverage_k7_t5 : + ∀ P ∈ pathPatterns 5 2, HasCheckedCertificate 7 5 P := + k7t5_cover1 + +private theorem k7t6_cover7 : ∀ P ∈ pathPatterns 0 1 [], HasCheckedCertificate 7 6 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t6p0, Certificates.k7t6p0_check⟩ + +private theorem k7t6_cover6 : ∀ P ∈ pathPatterns 1 1 [], HasCheckedCertificate 7 6 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k7t6_cover7 + +private theorem k7t6_cover8 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 7 6 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t6p1, Certificates.k7t6p1_check⟩ + +private theorem k7t6_cover5 : ∀ P ∈ pathPatterns 2 1 [], HasCheckedCertificate 7 6 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t6_cover6 + · intro q + fin_cases q + · exact by + intro _ + exact k7t6_cover8 + +private theorem k7t6_cover9 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 7 6 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k7t6_cover4 : ∀ P ∈ pathPatterns 3 1 [], HasCheckedCertificate 7 6 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t6_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k7t6_cover9 + · intro q + exact Fin.elim0 q + +private theorem k7t6_cover10 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 7 6 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k7t6_cover3 : ∀ P ∈ pathPatterns 4 1 [], HasCheckedCertificate 7 6 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t6_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k7t6_cover10 + · intro q + exact Fin.elim0 q + +private theorem k7t6_cover11 : ∀ P ∈ pathPatterns 3 0 [1], HasCheckedCertificate 7 6 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k7t6_cover2 : ∀ P ∈ pathPatterns 5 1 [], HasCheckedCertificate 7 6 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t6_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k7t6_cover11 + · intro q + exact Fin.elim0 q + +private theorem k7t6_cover12 : ∀ P ∈ pathPatterns 4 0 [1], HasCheckedCertificate 7 6 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k7t6_cover1 : ∀ P ∈ pathPatterns 6 1 [], HasCheckedCertificate 7 6 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t6_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k7t6_cover12 + · intro q + exact Fin.elim0 q + +theorem coverage_k7_t6 : + ∀ P ∈ pathPatterns 6 1, HasCheckedCertificate 7 6 P := + k7t6_cover1 + +private theorem k7t7_cover8 : ∀ P ∈ pathPatterns 0 0 [], HasCheckedCertificate 7 7 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k7t7p0, Certificates.k7t7p0_check⟩ + +private theorem k7t7_cover7 : ∀ P ∈ pathPatterns 1 0 [], HasCheckedCertificate 7 7 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k7t7_cover8 + +private theorem k7t7_cover6 : ∀ P ∈ pathPatterns 2 0 [], HasCheckedCertificate 7 7 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t7_cover7 + · intro q + exact Fin.elim0 q + +private theorem k7t7_cover5 : ∀ P ∈ pathPatterns 3 0 [], HasCheckedCertificate 7 7 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t7_cover6 + · intro q + exact Fin.elim0 q + +private theorem k7t7_cover4 : ∀ P ∈ pathPatterns 4 0 [], HasCheckedCertificate 7 7 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t7_cover5 + · intro q + exact Fin.elim0 q + +private theorem k7t7_cover3 : ∀ P ∈ pathPatterns 5 0 [], HasCheckedCertificate 7 7 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t7_cover4 + · intro q + exact Fin.elim0 q + +private theorem k7t7_cover2 : ∀ P ∈ pathPatterns 6 0 [], HasCheckedCertificate 7 7 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t7_cover3 + · intro q + exact Fin.elim0 q + +private theorem k7t7_cover1 : ∀ P ∈ pathPatterns 7 0 [], HasCheckedCertificate 7 7 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k7t7_cover2 + · intro q + exact Fin.elim0 q + +theorem coverage_k7_t7 : + ∀ P ∈ pathPatterns 7 0, HasCheckedCertificate 7 7 P := + k7t7_cover1 + +end CycleClique.Construction.CertifiedCoverage + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK8.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK8.lean new file mode 100644 index 0000000000000000000000000000000000000000..7caf342754e2c0498863e05fb9de75aed7778115 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK8.lean @@ -0,0 +1,1290 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK8 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage + +namespace OAI + +namespace CycleClique.Construction.CertifiedCoverage + +private theorem k8t4_cover5 : ∀ P ∈ pathPatterns 0 4 [], HasCheckedCertificate 8 4 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p0, Certificates.k8t4p0_check⟩ + +private theorem k8t4_cover4 : ∀ P ∈ pathPatterns 1 4 [], HasCheckedCertificate 8 4 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k8t4_cover5 + +private theorem k8t4_cover6 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 8 4 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p1, Certificates.k8t4p1_check⟩ + +private theorem k8t4_cover7 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 8 4 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p2, Certificates.k8t4p2_check⟩ + +private theorem k8t4_cover8 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 8 4 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p3, Certificates.k8t4p3_check⟩ + +private theorem k8t4_cover9 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 8 4 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p4, Certificates.k8t4p4_check⟩ + +private theorem k8t4_cover3 : ∀ P ∈ pathPatterns 2 4 [], HasCheckedCertificate 8 4 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t4_cover4 + · intro q + fin_cases q + · exact by + intro _ + exact k8t4_cover6 + · exact by + intro _ + exact k8t4_cover7 + · exact by + intro _ + exact k8t4_cover8 + · exact by + intro _ + exact k8t4_cover9 + +private theorem k8t4_cover10 : ∀ P ∈ pathPatterns 1 3 [1], HasCheckedCertificate 8 4 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k8t4_cover11 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 8 4 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p5, Certificates.k8t4p5_check⟩ + +private theorem k8t4_cover12 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 8 4 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p6, Certificates.k8t4p6_check⟩ + +private theorem k8t4_cover13 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 8 4 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p7, Certificates.k8t4p7_check⟩ + +private theorem k8t4_cover14 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 8 4 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k8t4_cover15 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 8 4 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p8, Certificates.k8t4p8_check⟩ + +private theorem k8t4_cover16 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 8 4 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k8t4_cover17 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 8 4 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k8t4_cover2 : ∀ P ∈ pathPatterns 3 4 [], HasCheckedCertificate 8 4 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t4_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t4_cover10 + · intro q + fin_cases q + · exact by + intro _ + exact k8t4_cover11 + · exact by + intro _ + exact k8t4_cover12 + · exact by + intro _ + exact k8t4_cover13 + · exact by + constructor + · exact by + intro _ + exact k8t4_cover14 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k8t4_cover15 + · exact by + constructor + · exact by + intro _ + exact k8t4_cover16 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k8t4_cover17 + · intro q + exact Fin.elim0 q + +private theorem k8t4_cover19 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 8 4 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p9, Certificates.k8t4p9_check⟩ + +private theorem k8t4_cover20 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 8 4 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p10, Certificates.k8t4p10_check⟩ + +private theorem k8t4_cover21 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 8 4 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p11, Certificates.k8t4p11_check⟩ + +private theorem k8t4_cover18 : ∀ P ∈ pathPatterns 2 3 [1], HasCheckedCertificate 8 4 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k8t4_cover19 + · exact by + intro _ + exact k8t4_cover20 + · exact by + intro _ + exact k8t4_cover21 + +private theorem k8t4_cover22 : ∀ P ∈ pathPatterns 1 2 [1, 1], HasCheckedCertificate 8 4 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k8t4_cover23 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1], HasCheckedCertificate 8 4 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p12, Certificates.k8t4p12_check⟩ + +private theorem k8t4_cover24 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2], HasCheckedCertificate 8 4 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p13, Certificates.k8t4p13_check⟩ + +private theorem k8t4_cover25 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 8 4 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k8t4_cover26 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 8 4 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p14, Certificates.k8t4p14_check⟩ + +private theorem k8t4_cover27 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 8 4 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k8t4_cover29 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 8 4 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t4p15, Certificates.k8t4p15_check⟩ + +private theorem k8t4_cover28 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 8 4 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k8t4_cover29 + +private theorem k8t4_cover30 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 8 4 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k8t4_cover31 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 8 4 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k8t4_cover32 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 8 4 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k8t4_cover1 : ∀ P ∈ pathPatterns 4 4 [], HasCheckedCertificate 8 4 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t4_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t4_cover18 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t4_cover22 + · intro q + fin_cases q + · exact by + intro _ + exact k8t4_cover23 + · exact by + intro _ + exact k8t4_cover24 + · exact by + constructor + · exact by + intro _ + exact k8t4_cover25 + · intro q + fin_cases q + · exact by + intro _ + exact k8t4_cover26 + · exact by + constructor + · exact by + intro _ + exact k8t4_cover27 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k8t4_cover28 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k8t4_cover30 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k8t4_cover31 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k8t4_cover32 + · intro q + exact Fin.elim0 q + +theorem coverage_k8_t4 : + ∀ P ∈ pathPatterns 4 4, HasCheckedCertificate 8 4 P := + k8t4_cover1 + +private theorem k8t5_cover6 : ∀ P ∈ pathPatterns 0 3 [], HasCheckedCertificate 8 5 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t5p0, Certificates.k8t5p0_check⟩ + +private theorem k8t5_cover5 : ∀ P ∈ pathPatterns 1 3 [], HasCheckedCertificate 8 5 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k8t5_cover6 + +private theorem k8t5_cover7 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 8 5 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t5p1, Certificates.k8t5p1_check⟩ + +private theorem k8t5_cover8 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 8 5 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t5p2, Certificates.k8t5p2_check⟩ + +private theorem k8t5_cover9 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 8 5 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t5p3, Certificates.k8t5p3_check⟩ + +private theorem k8t5_cover4 : ∀ P ∈ pathPatterns 2 3 [], HasCheckedCertificate 8 5 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t5_cover5 + · intro q + fin_cases q + · exact by + intro _ + exact k8t5_cover7 + · exact by + intro _ + exact k8t5_cover8 + · exact by + intro _ + exact k8t5_cover9 + +private theorem k8t5_cover10 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 8 5 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k8t5_cover11 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 8 5 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t5p4, Certificates.k8t5p4_check⟩ + +private theorem k8t5_cover12 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 8 5 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t5p5, Certificates.k8t5p5_check⟩ + +private theorem k8t5_cover13 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 8 5 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k8t5_cover14 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 8 5 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k8t5_cover3 : ∀ P ∈ pathPatterns 3 3 [], HasCheckedCertificate 8 5 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t5_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t5_cover10 + · intro q + fin_cases q + · exact by + intro _ + exact k8t5_cover11 + · exact by + intro _ + exact k8t5_cover12 + · exact by + constructor + · exact by + intro _ + exact k8t5_cover13 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k8t5_cover14 + · intro q + exact Fin.elim0 q + +private theorem k8t5_cover16 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 8 5 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t5p6, Certificates.k8t5p6_check⟩ + +private theorem k8t5_cover17 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 8 5 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t5p7, Certificates.k8t5p7_check⟩ + +private theorem k8t5_cover15 : ∀ P ∈ pathPatterns 2 2 [1], HasCheckedCertificate 8 5 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k8t5_cover16 + · exact by + intro _ + exact k8t5_cover17 + +private theorem k8t5_cover18 : ∀ P ∈ pathPatterns 1 1 [1, 1], HasCheckedCertificate 8 5 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k8t5_cover19 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1], HasCheckedCertificate 8 5 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t5p8, Certificates.k8t5p8_check⟩ + +private theorem k8t5_cover20 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 8 5 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k8t5_cover21 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 8 5 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k8t5_cover22 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 8 5 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k8t5_cover2 : ∀ P ∈ pathPatterns 4 3 [], HasCheckedCertificate 8 5 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t5_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t5_cover15 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t5_cover18 + · intro q + fin_cases q + · exact by + intro _ + exact k8t5_cover19 + · exact by + constructor + · exact by + intro _ + exact k8t5_cover20 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k8t5_cover21 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k8t5_cover22 + · intro q + exact Fin.elim0 q + +private theorem k8t5_cover24 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 8 5 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k8t5_cover25 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 8 5 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t5p9, Certificates.k8t5p9_check⟩ + +private theorem k8t5_cover26 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 8 5 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k8t5_cover23 : ∀ P ∈ pathPatterns 3 2 [1], HasCheckedCertificate 8 5 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t5_cover24 + · intro q + fin_cases q + · exact by + intro _ + exact k8t5_cover25 + · exact by + constructor + · exact by + intro _ + exact k8t5_cover26 + · intro q + exact Fin.elim0 q + +private theorem k8t5_cover27 : ∀ P ∈ pathPatterns 2 1 [1, 1], HasCheckedCertificate 8 5 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k8t5_cover28 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1], HasCheckedCertificate 8 5 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k8t5_cover29 : ∀ P ∈ pathPatterns 2 0 [1, 2], HasCheckedCertificate 8 5 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k8t5_cover30 : ∀ P ∈ pathPatterns 3 1 [2], HasCheckedCertificate 8 5 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k8t5_cover31 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 8 5 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k8t5_cover1 : ∀ P ∈ pathPatterns 5 3 [], HasCheckedCertificate 8 5 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t5_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t5_cover23 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t5_cover27 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t5_cover28 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k8t5_cover29 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k8t5_cover30 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k8t5_cover31 + · intro q + exact Fin.elim0 q + +theorem coverage_k8_t5 : + ∀ P ∈ pathPatterns 5 3, HasCheckedCertificate 8 5 P := + k8t5_cover1 + +private theorem k8t6_cover7 : ∀ P ∈ pathPatterns 0 2 [], HasCheckedCertificate 8 6 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t6p0, Certificates.k8t6p0_check⟩ + +private theorem k8t6_cover6 : ∀ P ∈ pathPatterns 1 2 [], HasCheckedCertificate 8 6 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k8t6_cover7 + +private theorem k8t6_cover8 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 8 6 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t6p1, Certificates.k8t6p1_check⟩ + +private theorem k8t6_cover9 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 8 6 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t6p2, Certificates.k8t6p2_check⟩ + +private theorem k8t6_cover5 : ∀ P ∈ pathPatterns 2 2 [], HasCheckedCertificate 8 6 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t6_cover6 + · intro q + fin_cases q + · exact by + intro _ + exact k8t6_cover8 + · exact by + intro _ + exact k8t6_cover9 + +private theorem k8t6_cover10 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 8 6 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k8t6_cover11 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 8 6 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t6p3, Certificates.k8t6p3_check⟩ + +private theorem k8t6_cover12 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 8 6 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k8t6_cover4 : ∀ P ∈ pathPatterns 3 2 [], HasCheckedCertificate 8 6 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t6_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t6_cover10 + · intro q + fin_cases q + · exact by + intro _ + exact k8t6_cover11 + · exact by + constructor + · exact by + intro _ + exact k8t6_cover12 + · intro q + exact Fin.elim0 q + +private theorem k8t6_cover14 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 8 6 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t6p4, Certificates.k8t6p4_check⟩ + +private theorem k8t6_cover13 : ∀ P ∈ pathPatterns 2 1 [1], HasCheckedCertificate 8 6 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k8t6_cover14 + +private theorem k8t6_cover15 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 8 6 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k8t6_cover16 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 8 6 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k8t6_cover3 : ∀ P ∈ pathPatterns 4 2 [], HasCheckedCertificate 8 6 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t6_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t6_cover13 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t6_cover15 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k8t6_cover16 + · intro q + exact Fin.elim0 q + +private theorem k8t6_cover18 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 8 6 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k8t6_cover17 : ∀ P ∈ pathPatterns 3 1 [1], HasCheckedCertificate 8 6 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t6_cover18 + · intro q + exact Fin.elim0 q + +private theorem k8t6_cover19 : ∀ P ∈ pathPatterns 2 0 [1, 1], HasCheckedCertificate 8 6 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k8t6_cover20 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 8 6 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k8t6_cover2 : ∀ P ∈ pathPatterns 5 2 [], HasCheckedCertificate 8 6 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t6_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t6_cover17 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t6_cover19 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k8t6_cover20 + · intro q + exact Fin.elim0 q + +private theorem k8t6_cover22 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 8 6 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k8t6_cover21 : ∀ P ∈ pathPatterns 4 1 [1], HasCheckedCertificate 8 6 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t6_cover22 + · intro q + exact Fin.elim0 q + +private theorem k8t6_cover23 : ∀ P ∈ pathPatterns 3 0 [1, 1], HasCheckedCertificate 8 6 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k8t6_cover24 : ∀ P ∈ pathPatterns 4 0 [2], HasCheckedCertificate 8 6 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k8t6_cover1 : ∀ P ∈ pathPatterns 6 2 [], HasCheckedCertificate 8 6 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t6_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t6_cover21 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t6_cover23 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k8t6_cover24 + · intro q + exact Fin.elim0 q + +theorem coverage_k8_t6 : + ∀ P ∈ pathPatterns 6 2, HasCheckedCertificate 8 6 P := + k8t6_cover1 + +private theorem k8t7_cover8 : ∀ P ∈ pathPatterns 0 1 [], HasCheckedCertificate 8 7 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t7p0, Certificates.k8t7p0_check⟩ + +private theorem k8t7_cover7 : ∀ P ∈ pathPatterns 1 1 [], HasCheckedCertificate 8 7 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k8t7_cover8 + +private theorem k8t7_cover9 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 8 7 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t7p1, Certificates.k8t7p1_check⟩ + +private theorem k8t7_cover6 : ∀ P ∈ pathPatterns 2 1 [], HasCheckedCertificate 8 7 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t7_cover7 + · intro q + fin_cases q + · exact by + intro _ + exact k8t7_cover9 + +private theorem k8t7_cover10 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 8 7 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k8t7_cover5 : ∀ P ∈ pathPatterns 3 1 [], HasCheckedCertificate 8 7 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t7_cover6 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t7_cover10 + · intro q + exact Fin.elim0 q + +private theorem k8t7_cover11 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 8 7 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k8t7_cover4 : ∀ P ∈ pathPatterns 4 1 [], HasCheckedCertificate 8 7 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t7_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t7_cover11 + · intro q + exact Fin.elim0 q + +private theorem k8t7_cover12 : ∀ P ∈ pathPatterns 3 0 [1], HasCheckedCertificate 8 7 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k8t7_cover3 : ∀ P ∈ pathPatterns 5 1 [], HasCheckedCertificate 8 7 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t7_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t7_cover12 + · intro q + exact Fin.elim0 q + +private theorem k8t7_cover13 : ∀ P ∈ pathPatterns 4 0 [1], HasCheckedCertificate 8 7 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k8t7_cover2 : ∀ P ∈ pathPatterns 6 1 [], HasCheckedCertificate 8 7 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t7_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t7_cover13 + · intro q + exact Fin.elim0 q + +private theorem k8t7_cover14 : ∀ P ∈ pathPatterns 5 0 [1], HasCheckedCertificate 8 7 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k8t7_cover1 : ∀ P ∈ pathPatterns 7 1 [], HasCheckedCertificate 8 7 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t7_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k8t7_cover14 + · intro q + exact Fin.elim0 q + +theorem coverage_k8_t7 : + ∀ P ∈ pathPatterns 7 1, HasCheckedCertificate 8 7 P := + k8t7_cover1 + +private theorem k8t8_cover9 : ∀ P ∈ pathPatterns 0 0 [], HasCheckedCertificate 8 8 ([[], [], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k8t8p0, Certificates.k8t8p0_check⟩ + +private theorem k8t8_cover8 : ∀ P ∈ pathPatterns 1 0 [], HasCheckedCertificate 8 8 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k8t8_cover9 + +private theorem k8t8_cover7 : ∀ P ∈ pathPatterns 2 0 [], HasCheckedCertificate 8 8 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t8_cover8 + · intro q + exact Fin.elim0 q + +private theorem k8t8_cover6 : ∀ P ∈ pathPatterns 3 0 [], HasCheckedCertificate 8 8 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t8_cover7 + · intro q + exact Fin.elim0 q + +private theorem k8t8_cover5 : ∀ P ∈ pathPatterns 4 0 [], HasCheckedCertificate 8 8 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t8_cover6 + · intro q + exact Fin.elim0 q + +private theorem k8t8_cover4 : ∀ P ∈ pathPatterns 5 0 [], HasCheckedCertificate 8 8 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t8_cover5 + · intro q + exact Fin.elim0 q + +private theorem k8t8_cover3 : ∀ P ∈ pathPatterns 6 0 [], HasCheckedCertificate 8 8 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t8_cover4 + · intro q + exact Fin.elim0 q + +private theorem k8t8_cover2 : ∀ P ∈ pathPatterns 7 0 [], HasCheckedCertificate 8 8 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t8_cover3 + · intro q + exact Fin.elim0 q + +private theorem k8t8_cover1 : ∀ P ∈ pathPatterns 8 0 [], HasCheckedCertificate 8 8 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k8t8_cover2 + · intro q + exact Fin.elim0 q + +theorem coverage_k8_t8 : + ∀ P ∈ pathPatterns 8 0, HasCheckedCertificate 8 8 P := + k8t8_cover1 + +end CycleClique.Construction.CertifiedCoverage + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK9.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK9.lean new file mode 100644 index 0000000000000000000000000000000000000000..7ae9ae9386d697babe7102acb236895b634823f0 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK9.lean @@ -0,0 +1,2318 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK9 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage + +namespace OAI + +namespace CycleClique.Construction.CertifiedCoverage + +private theorem k9t4_cover6 : ∀ P ∈ pathPatterns 0 5 [], HasCheckedCertificate 9 4 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p0, Certificates.k9t4p0_check⟩ + +private theorem k9t4_cover5 : ∀ P ∈ pathPatterns 1 5 [], HasCheckedCertificate 9 4 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k9t4_cover6 + +private theorem k9t4_cover7 : ∀ P ∈ pathPatterns 0 4 [1], HasCheckedCertificate 9 4 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p1, Certificates.k9t4p1_check⟩ + +private theorem k9t4_cover8 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 9 4 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p2, Certificates.k9t4p2_check⟩ + +private theorem k9t4_cover9 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 9 4 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p3, Certificates.k9t4p3_check⟩ + +private theorem k9t4_cover10 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 9 4 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p4, Certificates.k9t4p4_check⟩ + +private theorem k9t4_cover11 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 9 4 ([[], [], [5]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p5, Certificates.k9t4p5_check⟩ + +private theorem k9t4_cover4 : ∀ P ∈ pathPatterns 2 5 [], HasCheckedCertificate 9 4 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t4_cover5 + · intro q + fin_cases q + · exact by + intro _ + exact k9t4_cover7 + · exact by + intro _ + exact k9t4_cover8 + · exact by + intro _ + exact k9t4_cover9 + · exact by + intro _ + exact k9t4_cover10 + · exact by + intro _ + exact k9t4_cover11 + +private theorem k9t4_cover12 : ∀ P ∈ pathPatterns 1 4 [1], HasCheckedCertificate 9 4 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k9t4_cover13 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 9 4 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p6, Certificates.k9t4p6_check⟩ + +private theorem k9t4_cover14 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 9 4 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p7, Certificates.k9t4p7_check⟩ + +private theorem k9t4_cover15 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 9 4 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p8, Certificates.k9t4p8_check⟩ + +private theorem k9t4_cover16 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 9 4 ([[], [1, 4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p9, Certificates.k9t4p9_check⟩ + +private theorem k9t4_cover17 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 9 4 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k9t4_cover18 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 9 4 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p10, Certificates.k9t4p10_check⟩ + +private theorem k9t4_cover19 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 9 4 ([[], [2, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p11, Certificates.k9t4p11_check⟩ + +private theorem k9t4_cover20 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 9 4 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k9t4_cover21 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 9 4 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k9t4_cover22 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 9 4 ([[], [5]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + +private theorem k9t4_cover3 : ∀ P ∈ pathPatterns 3 5 [], HasCheckedCertificate 9 4 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t4_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t4_cover12 + · intro q + fin_cases q + · exact by + intro _ + exact k9t4_cover13 + · exact by + intro _ + exact k9t4_cover14 + · exact by + intro _ + exact k9t4_cover15 + · exact by + intro _ + exact k9t4_cover16 + · exact by + constructor + · exact by + intro _ + exact k9t4_cover17 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k9t4_cover18 + · exact by + intro _ + exact k9t4_cover19 + · exact by + constructor + · exact by + intro _ + exact k9t4_cover20 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k9t4_cover21 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · exact by + constructor + · exact by + intro _ + exact k9t4_cover22 + · intro q + exact Fin.elim0 q + +private theorem k9t4_cover24 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 9 4 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p12, Certificates.k9t4p12_check⟩ + +private theorem k9t4_cover25 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 9 4 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p13, Certificates.k9t4p13_check⟩ + +private theorem k9t4_cover26 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 9 4 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p14, Certificates.k9t4p14_check⟩ + +private theorem k9t4_cover27 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 9 4 ([[1], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p15, Certificates.k9t4p15_check⟩ + +private theorem k9t4_cover23 : ∀ P ∈ pathPatterns 2 4 [1], HasCheckedCertificate 9 4 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k9t4_cover24 + · exact by + intro _ + exact k9t4_cover25 + · exact by + intro _ + exact k9t4_cover26 + · exact by + intro _ + exact k9t4_cover27 + +private theorem k9t4_cover28 : ∀ P ∈ pathPatterns 1 3 [1, 1], HasCheckedCertificate 9 4 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k9t4_cover29 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1], HasCheckedCertificate 9 4 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p16, Certificates.k9t4p16_check⟩ + +private theorem k9t4_cover30 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2], HasCheckedCertificate 9 4 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p17, Certificates.k9t4p17_check⟩ + +private theorem k9t4_cover31 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3], HasCheckedCertificate 9 4 ([[1, 1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p18, Certificates.k9t4p18_check⟩ + +private theorem k9t4_cover32 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 9 4 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k9t4_cover33 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 9 4 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p19, Certificates.k9t4p19_check⟩ + +private theorem k9t4_cover34 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 9 4 ([[1, 2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p20, Certificates.k9t4p20_check⟩ + +private theorem k9t4_cover35 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 9 4 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k9t4_cover36 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 9 4 ([[1, 3, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p21, Certificates.k9t4p21_check⟩ + +private theorem k9t4_cover37 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 9 4 ([[1, 4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h) + +private theorem k9t4_cover39 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 9 4 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p22, Certificates.k9t4p22_check⟩ + +private theorem k9t4_cover40 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 9 4 ([[2], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p23, Certificates.k9t4p23_check⟩ + +private theorem k9t4_cover38 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 9 4 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k9t4_cover39 + · exact by + intro _ + exact k9t4_cover40 + +private theorem k9t4_cover41 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 9 4 ([[2, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t4p24, Certificates.k9t4p24_check⟩ + +private theorem k9t4_cover42 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 9 4 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k9t4_cover43 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 9 4 ([[2, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h) + +private theorem k9t4_cover44 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 9 4 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h) + +private theorem k9t4_cover45 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 9 4 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h) + +private theorem k9t4_cover46 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 9 4 ([[5]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t4_seq2 : amountSequenceForall 3 5 (fun tail => + (LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) → + ∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail), + HasCheckedCertificate 9 4 ([] ++ (([] ++ tail) :: P))) := +by + constructor + · exact by + intro _ + exact k9t4_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t4_cover23 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t4_cover28 + · intro q + fin_cases q + · exact by + intro _ + exact k9t4_cover29 + · exact by + intro _ + exact k9t4_cover30 + · exact by + intro _ + exact k9t4_cover31 + · exact by + constructor + · exact by + intro _ + exact k9t4_cover32 + · intro q + fin_cases q + · exact by + intro _ + exact k9t4_cover33 + · exact by + intro _ + exact k9t4_cover34 + · exact by + constructor + · exact by + intro _ + exact k9t4_cover35 + · intro q + fin_cases q + · exact by + intro _ + exact k9t4_cover36 + · exact by + constructor + · exact by + intro _ + exact k9t4_cover37 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t4_cover38 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + intro _ + exact k9t4_cover41 + · exact by + constructor + · exact by + intro _ + exact k9t4_cover42 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k9t4_cover43 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t4_cover44 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h) + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t4_cover45 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t4_cover46 + · intro q + exact Fin.elim0 q + +private theorem k9t4_cover1 : ∀ P ∈ pathPatterns 4 5 [], HasCheckedCertificate 9 4 ([] ++ P) := by + apply pathPatterns_forall_step + exact k9t4_seq2 + + +theorem coverage_k9_t4 : + ∀ P ∈ pathPatterns 4 5, HasCheckedCertificate 9 4 P := + k9t4_cover1 + +private theorem k9t5_cover6 : ∀ P ∈ pathPatterns 0 4 [], HasCheckedCertificate 9 5 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p0, Certificates.k9t5p0_check⟩ + +private theorem k9t5_cover5 : ∀ P ∈ pathPatterns 1 4 [], HasCheckedCertificate 9 5 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k9t5_cover6 + +private theorem k9t5_cover7 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 9 5 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p1, Certificates.k9t5p1_check⟩ + +private theorem k9t5_cover8 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 9 5 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p2, Certificates.k9t5p2_check⟩ + +private theorem k9t5_cover9 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 9 5 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p3, Certificates.k9t5p3_check⟩ + +private theorem k9t5_cover10 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 9 5 ([[], [], [], [4]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p4, Certificates.k9t5p4_check⟩ + +private theorem k9t5_cover4 : ∀ P ∈ pathPatterns 2 4 [], HasCheckedCertificate 9 5 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t5_cover5 + · intro q + fin_cases q + · exact by + intro _ + exact k9t5_cover7 + · exact by + intro _ + exact k9t5_cover8 + · exact by + intro _ + exact k9t5_cover9 + · exact by + intro _ + exact k9t5_cover10 + +private theorem k9t5_cover11 : ∀ P ∈ pathPatterns 1 3 [1], HasCheckedCertificate 9 5 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k9t5_cover12 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 9 5 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p5, Certificates.k9t5p5_check⟩ + +private theorem k9t5_cover13 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 9 5 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p6, Certificates.k9t5p6_check⟩ + +private theorem k9t5_cover14 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 9 5 ([[], [], [1, 3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p7, Certificates.k9t5p7_check⟩ + +private theorem k9t5_cover15 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 9 5 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k9t5_cover16 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 9 5 ([[], [], [2, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p8, Certificates.k9t5p8_check⟩ + +private theorem k9t5_cover17 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 9 5 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k9t5_cover18 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 9 5 ([[], [], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + +private theorem k9t5_cover3 : ∀ P ∈ pathPatterns 3 4 [], HasCheckedCertificate 9 5 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t5_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover11 + · intro q + fin_cases q + · exact by + intro _ + exact k9t5_cover12 + · exact by + intro _ + exact k9t5_cover13 + · exact by + intro _ + exact k9t5_cover14 + · exact by + constructor + · exact by + intro _ + exact k9t5_cover15 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + intro _ + exact k9t5_cover16 + · exact by + constructor + · exact by + intro _ + exact k9t5_cover17 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · exact by + constructor + · exact by + intro _ + exact k9t5_cover18 + · intro q + exact Fin.elim0 q + +private theorem k9t5_cover20 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 9 5 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p9, Certificates.k9t5p9_check⟩ + +private theorem k9t5_cover21 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 9 5 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p10, Certificates.k9t5p10_check⟩ + +private theorem k9t5_cover22 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 9 5 ([[], [1], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p11, Certificates.k9t5p11_check⟩ + +private theorem k9t5_cover19 : ∀ P ∈ pathPatterns 2 3 [1], HasCheckedCertificate 9 5 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k9t5_cover20 + · exact by + intro _ + exact k9t5_cover21 + · exact by + intro _ + exact k9t5_cover22 + +private theorem k9t5_cover23 : ∀ P ∈ pathPatterns 1 2 [1, 1], HasCheckedCertificate 9 5 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k9t5_cover24 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1], HasCheckedCertificate 9 5 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p12, Certificates.k9t5p12_check⟩ + +private theorem k9t5_cover25 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2], HasCheckedCertificate 9 5 ([[], [1, 1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p13, Certificates.k9t5p13_check⟩ + +private theorem k9t5_cover26 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 9 5 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k9t5_cover27 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 9 5 ([[], [1, 2, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p14, Certificates.k9t5p14_check⟩ + +private theorem k9t5_cover28 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 9 5 ([[], [1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + +private theorem k9t5_cover30 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 9 5 ([[], [2], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p15, Certificates.k9t5p15_check⟩ + +private theorem k9t5_cover29 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 9 5 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k9t5_cover30 + +private theorem k9t5_cover31 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 9 5 ([[], [2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + +private theorem k9t5_cover32 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 9 5 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + +private theorem k9t5_cover33 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 9 5 ([[], [4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t5_cover2 : ∀ P ∈ pathPatterns 4 4 [], HasCheckedCertificate 9 5 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t5_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover19 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover23 + · intro q + fin_cases q + · exact by + intro _ + exact k9t5_cover24 + · exact by + intro _ + exact k9t5_cover25 + · exact by + constructor + · exact by + intro _ + exact k9t5_cover26 + · intro q + fin_cases q + · exact by + intro _ + exact k9t5_cover27 + · exact by + constructor + · exact by + intro _ + exact k9t5_cover28 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover29 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k9t5_cover31 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover32 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover33 + · intro q + exact Fin.elim0 q + +private theorem k9t5_cover35 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 9 5 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k9t5_cover36 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 9 5 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p16, Certificates.k9t5p16_check⟩ + +private theorem k9t5_cover37 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 9 5 ([[1], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p17, Certificates.k9t5p17_check⟩ + +private theorem k9t5_cover38 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 9 5 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k9t5_cover39 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 9 5 ([[1], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k9t5_cover34 : ∀ P ∈ pathPatterns 3 3 [1], HasCheckedCertificate 9 5 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover35 + · intro q + fin_cases q + · exact by + intro _ + exact k9t5_cover36 + · exact by + intro _ + exact k9t5_cover37 + · exact by + constructor + · exact by + intro _ + exact k9t5_cover38 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k9t5_cover39 + · intro q + exact Fin.elim0 q + +private theorem k9t5_cover41 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 9 5 ([[1, 1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p18, Certificates.k9t5p18_check⟩ + +private theorem k9t5_cover40 : ∀ P ∈ pathPatterns 2 2 [1, 1], HasCheckedCertificate 9 5 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · exact by + intro _ + exact k9t5_cover41 + +private theorem k9t5_cover42 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1], HasCheckedCertificate 9 5 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k9t5_cover43 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1], HasCheckedCertificate 9 5 ([[1, 1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t5p19, Certificates.k9t5p19_check⟩ + +private theorem k9t5_cover44 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2], HasCheckedCertificate 9 5 ([[1, 1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h) + +private theorem k9t5_cover45 : ∀ P ∈ pathPatterns 2 1 [1, 2], HasCheckedCertificate 9 5 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h) + +private theorem k9t5_cover46 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1], HasCheckedCertificate 9 5 ([[1, 2, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h) + +private theorem k9t5_cover47 : ∀ P ∈ pathPatterns 2 0 [1, 3], HasCheckedCertificate 9 5 ([[1, 3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t5_cover49 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 9 5 ([[2], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k9t5_cover48 : ∀ P ∈ pathPatterns 3 2 [2], HasCheckedCertificate 9 5 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h) + · exact by + constructor + · exact by + intro _ + exact k9t5_cover49 + · intro q + exact Fin.elim0 q + +private theorem k9t5_cover50 : ∀ P ∈ pathPatterns 2 0 [2, 2], HasCheckedCertificate 9 5 ([[2, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t5_cover51 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 9 5 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t5_cover52 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 9 5 ([[4]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t5_cover1 : ∀ P ∈ pathPatterns 5 4 [], HasCheckedCertificate 9 5 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t5_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover34 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover40 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover42 + · intro q + fin_cases q + · exact by + intro _ + exact k9t5_cover43 + · exact by + constructor + · exact by + intro _ + exact k9t5_cover44 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover45 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover46 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover47 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover48 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover50 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover51 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t5_cover52 + · intro q + exact Fin.elim0 q + +theorem coverage_k9_t5 : + ∀ P ∈ pathPatterns 5 4, HasCheckedCertificate 9 5 P := + k9t5_cover1 + +private theorem k9t6_cover7 : ∀ P ∈ pathPatterns 0 3 [], HasCheckedCertificate 9 6 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t6p0, Certificates.k9t6p0_check⟩ + +private theorem k9t6_cover6 : ∀ P ∈ pathPatterns 1 3 [], HasCheckedCertificate 9 6 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k9t6_cover7 + +private theorem k9t6_cover8 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 9 6 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t6p1, Certificates.k9t6p1_check⟩ + +private theorem k9t6_cover9 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 9 6 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t6p2, Certificates.k9t6p2_check⟩ + +private theorem k9t6_cover10 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 9 6 ([[], [], [], [], [3]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t6p3, Certificates.k9t6p3_check⟩ + +private theorem k9t6_cover5 : ∀ P ∈ pathPatterns 2 3 [], HasCheckedCertificate 9 6 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t6_cover6 + · intro q + fin_cases q + · exact by + intro _ + exact k9t6_cover8 + · exact by + intro _ + exact k9t6_cover9 + · exact by + intro _ + exact k9t6_cover10 + +private theorem k9t6_cover11 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 9 6 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k9t6_cover12 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 9 6 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t6p4, Certificates.k9t6p4_check⟩ + +private theorem k9t6_cover13 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 9 6 ([[], [], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t6p5, Certificates.k9t6p5_check⟩ + +private theorem k9t6_cover14 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 9 6 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k9t6_cover15 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 9 6 ([[], [], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + +private theorem k9t6_cover4 : ∀ P ∈ pathPatterns 3 3 [], HasCheckedCertificate 9 6 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t6_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover11 + · intro q + fin_cases q + · exact by + intro _ + exact k9t6_cover12 + · exact by + intro _ + exact k9t6_cover13 + · exact by + constructor + · exact by + intro _ + exact k9t6_cover14 + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · exact by + constructor + · exact by + intro _ + exact k9t6_cover15 + · intro q + exact Fin.elim0 q + +private theorem k9t6_cover17 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 9 6 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t6p6, Certificates.k9t6p6_check⟩ + +private theorem k9t6_cover18 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 9 6 ([[], [], [1], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t6p7, Certificates.k9t6p7_check⟩ + +private theorem k9t6_cover16 : ∀ P ∈ pathPatterns 2 2 [1], HasCheckedCertificate 9 6 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k9t6_cover17 + · exact by + intro _ + exact k9t6_cover18 + +private theorem k9t6_cover19 : ∀ P ∈ pathPatterns 1 1 [1, 1], HasCheckedCertificate 9 6 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k9t6_cover20 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1], HasCheckedCertificate 9 6 ([[], [], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t6p8, Certificates.k9t6p8_check⟩ + +private theorem k9t6_cover21 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 9 6 ([[], [], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + +private theorem k9t6_cover22 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 9 6 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + +private theorem k9t6_cover23 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 9 6 ([[], [], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t6_cover3 : ∀ P ∈ pathPatterns 4 3 [], HasCheckedCertificate 9 6 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t6_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover16 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover19 + · intro q + fin_cases q + · exact by + intro _ + exact k9t6_cover20 + · exact by + constructor + · exact by + intro _ + exact k9t6_cover21 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover22 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover23 + · intro q + exact Fin.elim0 q + +private theorem k9t6_cover25 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 9 6 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k9t6_cover26 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 9 6 ([[], [1], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t6p9, Certificates.k9t6p9_check⟩ + +private theorem k9t6_cover27 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 9 6 ([[], [1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k9t6_cover24 : ∀ P ∈ pathPatterns 3 2 [1], HasCheckedCertificate 9 6 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover25 + · intro q + fin_cases q + · exact by + intro _ + exact k9t6_cover26 + · exact by + constructor + · exact by + intro _ + exact k9t6_cover27 + · intro q + exact Fin.elim0 q + +private theorem k9t6_cover28 : ∀ P ∈ pathPatterns 2 1 [1, 1], HasCheckedCertificate 9 6 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + +private theorem k9t6_cover29 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1], HasCheckedCertificate 9 6 ([[], [1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + +private theorem k9t6_cover30 : ∀ P ∈ pathPatterns 2 0 [1, 2], HasCheckedCertificate 9 6 ([[], [1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t6_cover31 : ∀ P ∈ pathPatterns 3 1 [2], HasCheckedCertificate 9 6 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t6_cover32 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 9 6 ([[], [3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t6_cover2 : ∀ P ∈ pathPatterns 5 3 [], HasCheckedCertificate 9 6 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t6_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover24 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover28 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover29 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover30 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover31 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover32 + · intro q + exact Fin.elim0 q + +private theorem k9t6_cover35 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 9 6 ([[1], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t6p10, Certificates.k9t6p10_check⟩ + +private theorem k9t6_cover34 : ∀ P ∈ pathPatterns 2 1 [1], HasCheckedCertificate 9 6 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k9t6_cover35 + +private theorem k9t6_cover36 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 9 6 ([[1], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k9t6_cover37 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 9 6 ([[1], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t6_cover33 : ∀ P ∈ pathPatterns 4 2 [1], HasCheckedCertificate 9 6 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover34 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover36 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover37 + · intro q + exact Fin.elim0 q + +private theorem k9t6_cover38 : ∀ P ∈ pathPatterns 3 1 [1, 1], HasCheckedCertificate 9 6 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t6_cover39 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1], HasCheckedCertificate 9 6 ([[1, 1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t6_cover40 : ∀ P ∈ pathPatterns 3 0 [1, 2], HasCheckedCertificate 9 6 ([[1, 2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t6_cover41 : ∀ P ∈ pathPatterns 4 1 [2], HasCheckedCertificate 9 6 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t6_cover42 : ∀ P ∈ pathPatterns 4 0 [3], HasCheckedCertificate 9 6 ([[3]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t6_cover1 : ∀ P ∈ pathPatterns 6 3 [], HasCheckedCertificate 9 6 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t6_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover33 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover38 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover39 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover40 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover41 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h) + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t6_cover42 + · intro q + exact Fin.elim0 q + +theorem coverage_k9_t6 : + ∀ P ∈ pathPatterns 6 3, HasCheckedCertificate 9 6 P := + k9t6_cover1 + +private theorem k9t7_cover8 : ∀ P ∈ pathPatterns 0 2 [], HasCheckedCertificate 9 7 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t7p0, Certificates.k9t7p0_check⟩ + +private theorem k9t7_cover7 : ∀ P ∈ pathPatterns 1 2 [], HasCheckedCertificate 9 7 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k9t7_cover8 + +private theorem k9t7_cover9 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 9 7 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t7p1, Certificates.k9t7p1_check⟩ + +private theorem k9t7_cover10 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 9 7 ([[], [], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t7p2, Certificates.k9t7p2_check⟩ + +private theorem k9t7_cover6 : ∀ P ∈ pathPatterns 2 2 [], HasCheckedCertificate 9 7 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t7_cover7 + · intro q + fin_cases q + · exact by + intro _ + exact k9t7_cover9 + · exact by + intro _ + exact k9t7_cover10 + +private theorem k9t7_cover11 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 9 7 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k9t7_cover12 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 9 7 ([[], [], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t7p3, Certificates.k9t7p3_check⟩ + +private theorem k9t7_cover13 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 9 7 ([[], [], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + +private theorem k9t7_cover5 : ∀ P ∈ pathPatterns 3 2 [], HasCheckedCertificate 9 7 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t7_cover6 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover11 + · intro q + fin_cases q + · exact by + intro _ + exact k9t7_cover12 + · exact by + constructor + · exact by + intro _ + exact k9t7_cover13 + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover15 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 9 7 ([[], [], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t7p4, Certificates.k9t7p4_check⟩ + +private theorem k9t7_cover14 : ∀ P ∈ pathPatterns 2 1 [1], HasCheckedCertificate 9 7 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + intro _ + exact k9t7_cover15 + +private theorem k9t7_cover16 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 9 7 ([[], [], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + +private theorem k9t7_cover17 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 9 7 ([[], [], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover4 : ∀ P ∈ pathPatterns 4 2 [], HasCheckedCertificate 9 7 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t7_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover14 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover16 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover17 + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover19 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 9 7 ([[], [], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k9t7_cover18 : ∀ P ∈ pathPatterns 3 1 [1], HasCheckedCertificate 9 7 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover19 + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover20 : ∀ P ∈ pathPatterns 2 0 [1, 1], HasCheckedCertificate 9 7 ([[], [], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover21 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 9 7 ([[], [], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover3 : ∀ P ∈ pathPatterns 5 2 [], HasCheckedCertificate 9 7 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t7_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover18 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover20 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover21 + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover23 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 9 7 ([[], [1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover22 : ∀ P ∈ pathPatterns 4 1 [1], HasCheckedCertificate 9 7 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover23 + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover24 : ∀ P ∈ pathPatterns 3 0 [1, 1], HasCheckedCertificate 9 7 ([[], [1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover25 : ∀ P ∈ pathPatterns 4 0 [2], HasCheckedCertificate 9 7 ([[], [2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover2 : ∀ P ∈ pathPatterns 6 2 [], HasCheckedCertificate 9 7 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t7_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover22 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover24 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover25 + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover27 : ∀ P ∈ pathPatterns 3 0 [1], HasCheckedCertificate 9 7 ([[1], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover26 : ∀ P ∈ pathPatterns 5 1 [1], HasCheckedCertificate 9 7 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover27 + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover28 : ∀ P ∈ pathPatterns 4 0 [1, 1], HasCheckedCertificate 9 7 ([[1, 1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover29 : ∀ P ∈ pathPatterns 5 0 [2], HasCheckedCertificate 9 7 ([[2]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t7_cover1 : ∀ P ∈ pathPatterns 7 2 [], HasCheckedCertificate 9 7 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t7_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover26 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover28 + · intro q + exact Fin.elim0 q + · exact by + constructor + · exact by + intro _ + exact k9t7_cover29 + · intro q + exact Fin.elim0 q + +theorem coverage_k9_t7 : + ∀ P ∈ pathPatterns 7 2, HasCheckedCertificate 9 7 P := + k9t7_cover1 + +private theorem k9t8_cover9 : ∀ P ∈ pathPatterns 0 1 [], HasCheckedCertificate 9 8 ([[], [], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t8p0, Certificates.k9t8p0_check⟩ + +private theorem k9t8_cover8 : ∀ P ∈ pathPatterns 1 1 [], HasCheckedCertificate 9 8 ([[], [], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + intro _ + exact k9t8_cover9 + +private theorem k9t8_cover10 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 9 8 ([[], [], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_zero + exact ⟨_, Certificates.k9t8p1, Certificates.k9t8p1_check⟩ + +private theorem k9t8_cover7 : ∀ P ∈ pathPatterns 2 1 [], HasCheckedCertificate 9 8 ([[], [], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t8_cover8 + · intro q + fin_cases q + · exact by + intro _ + exact k9t8_cover10 + +private theorem k9t8_cover11 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 9 8 ([[], [], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + +private theorem k9t8_cover6 : ∀ P ∈ pathPatterns 3 1 [], HasCheckedCertificate 9 8 ([[], [], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t8_cover7 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t8_cover11 + · intro q + exact Fin.elim0 q + +private theorem k9t8_cover12 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 9 8 ([[], [], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t8_cover5 : ∀ P ∈ pathPatterns 4 1 [], HasCheckedCertificate 9 8 ([[], [], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t8_cover6 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t8_cover12 + · intro q + exact Fin.elim0 q + +private theorem k9t8_cover13 : ∀ P ∈ pathPatterns 3 0 [1], HasCheckedCertificate 9 8 ([[], [], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t8_cover4 : ∀ P ∈ pathPatterns 5 1 [], HasCheckedCertificate 9 8 ([[], [], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t8_cover5 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t8_cover13 + · intro q + exact Fin.elim0 q + +private theorem k9t8_cover14 : ∀ P ∈ pathPatterns 4 0 [1], HasCheckedCertificate 9 8 ([[], [], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t8_cover3 : ∀ P ∈ pathPatterns 6 1 [], HasCheckedCertificate 9 8 ([[], []] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t8_cover4 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t8_cover14 + · intro q + exact Fin.elim0 q + +private theorem k9t8_cover15 : ∀ P ∈ pathPatterns 5 0 [1], HasCheckedCertificate 9 8 ([[], [1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t8_cover2 : ∀ P ∈ pathPatterns 7 1 [], HasCheckedCertificate 9 8 ([[]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t8_cover3 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t8_cover15 + · intro q + exact Fin.elim0 q + +private theorem k9t8_cover16 : ∀ P ∈ pathPatterns 6 0 [1], HasCheckedCertificate 9 8 ([[1]] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro h + exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h) + · intro q + exact Fin.elim0 q + +private theorem k9t8_cover1 : ∀ P ∈ pathPatterns 8 1 [], HasCheckedCertificate 9 8 ([] ++ P) := by + apply pathPatterns_forall_step + exact by + constructor + · exact by + intro _ + exact k9t8_cover2 + · intro q + fin_cases q + · exact by + constructor + · exact by + intro _ + exact k9t8_cover16 + · intro q + exact Fin.elim0 q + +theorem coverage_k9_t8 : + ∀ P ∈ pathPatterns 8 1, HasCheckedCertificate 9 8 P := + k9t8_cover1 + +end CycleClique.Construction.CertifiedCoverage + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CycleTwoPaths.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CycleTwoPaths.lean new file mode 100644 index 0000000000000000000000000000000000000000..876c9a902409f7f43a078f920033e567c9edf539 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CycleTwoPaths.lean @@ -0,0 +1,109 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LongestPaths + +namespace OAI + +/-! Closing two internally disjoint indexed paths into their exact cycle. -/ + +namespace CycleClique.Construction +private def twoPathLabel {V : Type*} {a b : ℕ} (_hb : 2 ≤ b) + (f : Fin (a + 1) → V) (g : Fin (b + 1) → V) (i : Fin (a + b)) : V := + if hi : i.val ≤ a then f ⟨i.val, by omega⟩ else g ⟨i.val - a, by have := i.isLt; omega⟩ + +private theorem twoPathLabel_left {V : Type*} {a b : ℕ} (hb : 2 ≤ b) + (f : Fin (a + 1) → V) (g : Fin (b + 1) → V) {i : Fin (a + b)} + (hi : i.val ≤ a) : twoPathLabel hb f g i = f ⟨i.val, by omega⟩ := by + simp only [twoPathLabel, dite_eq_left hi] + +private theorem twoPathLabel_right {V : Type*} {a b : ℕ} (hb : 2 ≤ b) + (f : Fin (a + 1) → V) (g : Fin (b + 1) → V) {i : Fin (a + b)} + (hi : a < i.val) : twoPathLabel hb f g i = g ⟨i.val - a, by have := i.isLt; omega⟩ := by + simp only [twoPathLabel, dite_eq_right (by omega : ¬ i.val ≤ a)] + +theorem cycle_of_two_indexed_paths {V : Type*} {H : SimpleGraph V} {a b : ℕ} + (hb : 2 ≤ b) (f : Fin (a + 1) → V) (g : Fin (b + 1) → V) + (hf : IsIndexedPath H f) (hg : IsIndexedPath H g) + (hstart : g 0 = f (Fin.last a)) (hend : g (Fin.last b) = f 0) + (hdisjoint : ∀ i : Fin (b + 1), 0 < i.val → i.val < b → + ∀ j : Fin (a + 1), f j ≠ g i) : HasCycle H (a + b) := by + let : NeZero b := ⟨by omega⟩ + refine ⟨twoPathLabel hb f g, ?_, ?_⟩ + · intro i j hij + apply Fin.ext + by_cases hi : i.val ≤ a + · by_cases hj : j.val ≤ a + · rw [twoPathLabel_left hb f g hi, twoPathLabel_left hb f g hj] at hij + exact congrArg (fun x : Fin (a + 1) => x.val) (hf.1 hij) + · rw [twoPathLabel_left hb f g hi, twoPathLabel_right hb f g (by omega)] at hij + exact False.elim (hdisjoint ⟨j.val - a, by have := j.isLt; omega⟩ + (by dsimp; omega) (by dsimp; have := j.isLt; omega) _ hij) + · by_cases hj : j.val ≤ a + · rw [twoPathLabel_right hb f g (by omega), twoPathLabel_left hb f g hj] at hij + exact False.elim (hdisjoint ⟨i.val - a, by have := i.isLt; omega⟩ + (by dsimp; omega) (by dsimp; have := i.isLt; omega) _ hij.symm) + · rw [twoPathLabel_right hb f g (by omega), twoPathLabel_right hb f g (by omega)] at hij + have hval := congrArg Fin.val (hg.1 hij) + dsimp at hval + omega + · intro i + by_cases hlast : i.val + 1 = a + b + · have hn : (cycleNext i).val = 0 := by simp [cycleNext, hlast] + have hleft : twoPathLabel hb f g i = g ⟨b - 1, by omega⟩ := by + rw [twoPathLabel_right hb f g (by omega)] + congr 1 + apply Fin.ext + dsimp + omega + have hright : twoPathLabel hb f g (cycleNext i) = f 0 := by + rw [twoPathLabel_left hb f g (by omega)] + congr 1 + apply Fin.ext + simpa only [Fin.val_zero] using hn + rw [hleft, hright, ← hend] + have h := hg.2 ⟨b - 1, by omega⟩ + have hi : (⟨b - 1, by omega⟩ : Fin b).succ = Fin.last b := by + apply Fin.ext + change b - 1 + 1 = b + omega + rw [hi] at h + exact h + · have hn : (cycleNext i).val = i.val + 1 := Nat.mod_eq_of_lt (by have := i.isLt; omega) + by_cases hbefore : i.val < a + · let p : Fin a := ⟨i.val, hbefore⟩ + have hleft : twoPathLabel hb f g i = f p.castSucc := by + rw [twoPathLabel_left hb f g (by omega)] + rfl + have hright : twoPathLabel hb f g (cycleNext i) = f p.succ := by + rw [twoPathLabel_left hb f g (by omega)] + congr 1 + exact Fin.ext hn + rw [hleft, hright] + exact hf.2 p + · by_cases heq : i.val = a + · have hleft : twoPathLabel hb f g i = f (Fin.last a) := by + rw [twoPathLabel_left hb f g (by omega)] + congr 1 + exact Fin.ext heq + have hright : twoPathLabel hb f g (cycleNext i) = g (Fin.succ (0 : Fin b)) := by + rw [twoPathLabel_right hb f g (by omega)] + congr 1 + apply Fin.ext + simp only [Fin.val_succ, Fin.val_zero] + omega + rw [hleft, hright, ← hstart] + exact hg.2 0 + · let p : Fin b := ⟨i.val - a, by have := i.isLt; omega⟩ + have hleft : twoPathLabel hb f g i = g p.castSucc := by + rw [twoPathLabel_right hb f g (by omega)] + rfl + have hright : twoPathLabel hb f g (cycleNext i) = g p.succ := by + rw [twoPathLabel_right hb f g (by omega)] + congr 1 + apply Fin.ext + dsimp [p] + omega + rw [hleft, hright] + exact hg.2 p + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Definitions.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Definitions.lean new file mode 100644 index 0000000000000000000000000000000000000000..2d8cf2602da071198b310d44a33091e4b6388b23 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Definitions.lean @@ -0,0 +1,62 @@ +import Mathlib.Combinatorics.SimpleGraph.Clique +import Mathlib.Data.Fintype.EquivFin +import Mathlib.Tactic + +namespace OAI + +/-! +# Exact cycle–clique Ramsey statements + +The red edges are the edges of `G`; a blue clique is an independent set +in `G`. The cycle is a non-induced copy on exactly `m` distinct vertices. +For the main theorem all cycle lengths are at least three. +-/ + +namespace CycleClique.Construction +variable {V W : Type*} + +/-- Cyclic successor, defined also for the empty index type. -/ +def cycleNext {m : ℕ} (i : Fin m) : Fin m := + ⟨(i.val + 1) % m, Nat.mod_lt _ (lt_of_le_of_lt (Nat.zero_le _) i.isLt)⟩ + +/-- An injectively labelled cycle, including its closing edge. -/ +def HasCycle (G : SimpleGraph V) (m : ℕ) : Prop := + ∃ f : Fin m → V, Function.Injective f ∧ ∀ i, G.Adj (f i) (f (cycleNext i)) + +/-- An independent set of exactly `n` vertices. -/ +def HasIndependent (G : SimpleGraph V) (n : ℕ) : Prop := + ∃ f : Fin n → V, Function.Injective f ∧ ∀ i j, ¬ G.Adj (f i) (f j) + +/-- The red-cycle/blue-clique property at order `N`. -/ +def RamseyProperty (m n N : ℕ) : Prop := + ∀ G : SimpleGraph (Fin N), HasCycle G m ∨ HasIndependent G n + +/-- Specifying the least forcing order avoids an existence convention for `sInf`. -/ +def IsRamseyNumber (m n N : ℕ) : Prop := + RamseyProperty m n N ∧ ∀ M < N, ¬ RamseyProperty m n M + +theorem HasCycle.map {G : SimpleGraph V} {H : SimpleGraph W} {m : ℕ} + (h : HasCycle G m) (f : V → W) (hf : Function.Injective f) + (hadj : ∀ {x y}, G.Adj x y → H.Adj (f x) (f y)) : HasCycle H m := by + obtain ⟨c, hc, he⟩ := h + exact ⟨f ∘ c, hf.comp hc, fun i => hadj (he i)⟩ + +theorem HasIndependent.map {G : SimpleGraph V} {H : SimpleGraph W} {n : ℕ} + (h : HasIndependent G n) (f : V → W) (hf : Function.Injective f) + (hadj : ∀ {x y}, H.Adj (f x) (f y) → G.Adj x y) : HasIndependent H n := by + obtain ⟨c, hc, he⟩ := h + exact ⟨f ∘ c, hf.comp hc, fun i j h => he i j (hadj h)⟩ + +theorem HasIndependent.card_le [Fintype V] {G : SimpleGraph V} {n : ℕ} + (h : HasIndependent G n) : n ≤ Fintype.card V := by + obtain ⟨f, hf, _⟩ := h + simpa using Fintype.card_le_of_injective f hf + +theorem HasCycle.card_le [Fintype V] {G : SimpleGraph V} {m : ℕ} + (h : HasCycle G m) : m ≤ Fintype.card V := by + obtain ⟨f, hf, _⟩ := h + simpa using Fintype.card_le_of_injective f hf + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DeletedComponent.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DeletedComponent.lean new file mode 100644 index 0000000000000000000000000000000000000000..990294105cbea7d1f00497f757ed725be783635f --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DeletedComponent.lean @@ -0,0 +1,70 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LongestPaths + +namespace OAI + +/-! Components after deleting the two common neighbours' endpoints. -/ + +namespace CycleClique.Construction +/-- A neighbour of a vertex in a component after deleting `y,z` is +either one of these two vertices or a neighbour in that component. -/ +theorem deleted_component_neighbor_cover {V : Type*} {H : SimpleGraph V} {y z : V} + (C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) + (u : C) {v : V} (h : H.Adj u.val.val v) : + v = y ∨ v = z ∨ ∃ w : C, C.toSimpleGraph.Adj u w ∧ w.val.val = v := by + by_cases hy : v = y + · exact Or.inl hy + by_cases hz : v = z + · exact Or.inr (Or.inl hz) + let w : {v : V | v ≠ y ∧ v ≠ z} := ⟨v, hy, hz⟩ + have hadj : (H.induce {v | v ≠ y ∧ v ≠ z}).Adj u.val w := h + have hw := C.mem_supp_of_adj_mem_supp u.property hadj + exact Or.inr (Or.inr ⟨⟨w, hw⟩, hadj, rfl⟩) + +theorem deleted_component_degree_loss {V : Type*} [Fintype V] + {H : SimpleGraph V} {y z : V} + (C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) (u : C) : + (H.neighborSet u.val.val).ncard ≤ (C.toSimpleGraph.neighborSet u).ncard + 2 := by + classical + let f : C → V := fun v => v.val.val + have hf : Function.Injective f := by + intro a b h + apply Subtype.ext + exact Subtype.ext h + let N : Finset V := (C.toSimpleGraph.neighborFinset u).map ⟨f, hf⟩ + have hsub : H.neighborFinset u.val.val ⊆ N ∪ {y, z} := by + intro v hv + have hadj := (H.mem_neighborFinset u.val.val v).mp hv + rcases deleted_component_neighbor_cover C u hadj with rfl | rfl | ⟨w, hw, rfl⟩ + · simp + · simp + · exact Finset.mem_union_left _ (Finset.mem_map.mpr + ⟨w, (C.toSimpleGraph.mem_neighborFinset u w).mpr hw, rfl⟩) + have hcard := (Finset.card_le_card hsub).trans (Finset.card_union_le N {y, z}) + have hpair : ({y, z} : Finset V).card ≤ 2 := Finset.card_le_two + have hN : N.card = (C.toSimpleGraph.neighborFinset u).card := Finset.card_map _ + rw [hN] at hcard + have hdegree : (H.neighborFinset u.val.val).card ≤ + (C.toSimpleGraph.neighborFinset u).card + 2 := by omega + simpa only [SimpleGraph.card_neighborFinset_eq_degree, + SimpleGraph.ncard_neighborSet] using hdegree + +theorem deleted_component_min_degree {V : Type*} [Fintype V] + {H : SimpleGraph V} {y z : V} {s : ℕ} + (hdegree : ∀ v, s ≤ (H.neighborSet v).ncard) + (C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) : + ∀ u : C, s - 2 ≤ (C.toSimpleGraph.neighborSet u).ncard := by + intro u + have h := deleted_component_degree_loss C u + have h' := hdegree u.val.val + omega + +theorem deleted_component_cliqueNum_le {V : Type*} [Fintype V] + {H : SimpleGraph V} {y z : V} + (C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) : + C.toSimpleGraph.cliqueNum ≤ H.cliqueNum := by + exact ((H.induce {v | v ≠ y ∧ v ≠ z}).cliqueNum_induce_le C.supp).trans + (H.cliqueNum_induce_le _) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DeletionOrder.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DeletionOrder.lean new file mode 100644 index 0000000000000000000000000000000000000000..dcc8b0814b2aa52f39e67d882602f6f6582d4d88 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DeletionOrder.lean @@ -0,0 +1,83 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ComponentVertices +import OAI.Combinatorics.Ramsey.CycleClique.Construction.EndpointAttachment + +namespace OAI + +/-! A component of the two-vertex deletion is not a clique and has order at least `2s-2`. -/ + +namespace CycleClique.Construction +theorem not_clique_of_two_deleted_neighborhoods {V : Type*} [Fintype V] + {H : SimpleGraph V} {U : Finset V} {y z : V} {s : ℕ} + (hU : U.Nonempty) (hy : y ∉ U) (hno : H.cliqueNum < s) + (hdegree : ∀ u ∈ U, s ≤ (H.neighborSet u).ncard) + (hcover : ∀ u ∈ U, ∀ v, H.Adj u v → v ∈ U ∨ v = y ∨ v = z) : + ¬ H.IsClique (U : Set V) := by + classical + intro hclique + have hUbound := hclique.card_le_cliqueNum + have hcover' : ∀ u ∈ U, ∀ v, H.Adj u v → v ∈ (U.erase u) ∪ {y, z} := by + intro u hu v huv + rcases hcover u hu v huv with hv | rfl | rfl + · exact Finset.mem_union_left _ (Finset.mem_erase.mpr ⟨huv.ne.symm, hv⟩) + · simp + · simp + have hcard : ∀ u ∈ U, ((U.erase u) ∪ {y, z}).card ≤ U.card + 1 := by + intro u hu + have hc := Finset.card_union_le (U.erase u) {y, z} + have he := Finset.card_erase_add_one hu + have hp : ({y, z} : Finset V).card ≤ 2 := Finset.card_le_two + omega + obtain ⟨u, hu⟩ := hU + have hbound := degree_le_of_neighbor_cover (hcover' u hu) + have hc := hcard u hu + have hd := hdegree u hu + have hsize : U.card + 1 = s := by omega + have hadj : ∀ v ∈ U, H.Adj y v := by + intro v hv + apply SimpleGraph.Adj.symm + apply degree_cover_forces_neighbor (hcover' v hv) + (show ((U.erase v) ∪ {y, z}).card ≤ (H.neighborSet v).ncard from + (hcard v hv).trans (hsize.le.trans (hdegree v hv))) + simp + have hlarge := clique_extension_size hclique hy hadj + omega + +theorem two_deleted_component_order {V : Type*} [Fintype V] [DecidableEq V] + {H : SimpleGraph V} {U : Finset V} {y z : V} {s : ℕ} + (hnotclique : ¬ H.IsClique (U : Set V)) + (hcover : ∀ u ∈ U, ∀ v, H.Adj u v → v ∈ U ∨ v = y ∨ v = z) + (hexpand : ∀ a b, a ≠ b → ¬ H.Adj a b → + 2 * s ≤ (closedNeighborhood H {a, b}).card) : + 2 * s - 2 ≤ U.card := by + classical + have hex : ∃ a ∈ U, ∃ b ∈ U, a ≠ b ∧ ¬ H.Adj a b := by + by_contra hn + apply hnotclique + intro a ha b hb hab + by_contra hnab + exact hn ⟨a, ha, b, hb, hab, hnab⟩ + obtain ⟨a, ha, b, hb, hab, hnot⟩ := hex + have hsub : closedNeighborhood H {a, b} ⊆ U ∪ {y, z} := by + intro v hv + rcases mem_closedNeighborhood.mp hv with hv | ⟨w, hw, hwv⟩ + · simp only [Finset.mem_insert, Finset.mem_singleton] at hv + rcases hv with rfl | rfl + · exact Finset.mem_union_left _ ha + · exact Finset.mem_union_left _ hb + · have hwU : w ∈ U := by + simp only [Finset.mem_insert, Finset.mem_singleton] at hw + rcases hw with rfl | rfl + · exact ha + · exact hb + rcases hcover w hwU v hwv with hv | rfl | rfl + · exact Finset.mem_union_left _ hv + · simp + · simp + have hc := (Finset.card_le_card hsub).trans (Finset.card_union_le U {y, z}) + have hp : ({y, z} : Finset V).card ≤ 2 := Finset.card_le_two + have hlow := hexpand a b hab hnot + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DenseLayers.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DenseLayers.lean new file mode 100644 index 0000000000000000000000000000000000000000..cfbfe23fa77b44e0b1ad0f69de17bc45f00019ee --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DenseLayers.lean @@ -0,0 +1,101 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LayerSums + +namespace OAI + +/-! +# A dense distance layer + +The parity-union expansion and the numerical growth contradiction force +a dense layer among the first `s` layers. The even case is weakly dense; +the odd case is strictly dense, as in Proposition `clq:layer-interface`. +-/ + +namespace CycleClique.Construction +theorem exists_dense_distance_layer_even {V : Type*} [Fintype V] + {G : SimpleGraph V} {s : ℕ} (hs : 1 ≤ s) + (hInd : IndependenceBound G (2 * s)) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + 2 * s * I.card + 1 ≤ (closedNeighborhood G I).card) (root : V) : + ∃ i, 1 ≤ i ∧ i ≤ s ∧ (distanceLayer G root i).Nonempty ∧ + s * (G.induce (distanceLayer G root i : Set V)).indepNum ≤ + (distanceLayer G root i).card := by + classical + let α := fun j => (G.induce (distanceLayer G root j : Set V)).indepNum + let p := alternatingSum α + have hzero : α 0 = 1 := distanceLayer_zero_indepNum G root + have hpzero : p 0 = 1 := by simpa [p] using hzero + have hpbound : p s ≤ 2 * s := by + simpa [p, α, alternatingSum, parityIndices] using + parity_layer_independence_bound hInd root s + have hone := distanceLayer_one_nonempty (by omega : 1 ≤ 2 * s) hexpand root + by_contra hn + have hsmall : ∀ j, 1 ≤ j → j ≤ s → (distanceLayer G root j).Nonempty → + (distanceLayer G root j).card < s * α j := by + intro j hj hjs hne + by_contra h + exact hn ⟨j, hj, hjs, hne, (show s * α j ≤ (distanceLayer G root j).card by omega)⟩ + apply even_layer_growth_contradiction hs p hpzero hpbound + intro i his + have hle : ∀ j ∈ Finset.range (i + 1), + (distanceLayer G root (j + 1)).card ≤ s * α (j + 1) := by + intro j hj + by_cases hne : (distanceLayer G root (j + 1)).Nonempty + · exact (hsmall (j + 1) (by omega) (by have := Finset.mem_range.mp hj; omega) hne).le + · rw [Finset.not_nonempty_iff_eq_empty.mp hne, Finset.card_empty] + exact Nat.zero_le _ + have hsum := Finset.sum_lt_sum hle + (show ∃ j ∈ Finset.range (i + 1), + (distanceLayer G root (j + 1)).card < s * α (j + 1) from + ⟨0, Finset.mem_range.mpr (by omega), by + simpa using hsmall 1 (by omega) (by omega) hone⟩) + have hpartition := alternatingSum_shifted_partition α hzero (i := i + 1) (by omega) + simp only [Nat.add_sub_cancel] at hpartition + rw [← Finset.mul_sum, hpartition] at hsum + have hexp := distanceLayer_order_sum (by omega : 1 ≤ 2 * s) hexpand root + (i := i + 1) (by omega) + simp only [Nat.add_sub_cancel] at hexp + exact lt_of_le_of_lt hexp hsum + +theorem exists_dense_distance_layer_odd {V : Type*} [Fintype V] + {G : SimpleGraph V} {s : ℕ} (hs : 2 ≤ s) + (hInd : IndependenceBound G (2 * s + 1)) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + (2 * s + 1) * I.card + 1 ≤ (closedNeighborhood G I).card) (root : V) : + ∃ i, 1 ≤ i ∧ i ≤ s ∧ (distanceLayer G root i).Nonempty ∧ + s * (G.induce (distanceLayer G root i : Set V)).indepNum < + (distanceLayer G root i).card := by + classical + let α := fun j => (G.induce (distanceLayer G root j : Set V)).indepNum + let p := alternatingSum α + have hzero : α 0 = 1 := distanceLayer_zero_indepNum G root + have hpzero : p 0 = 1 := by simpa [p] using hzero + have hpbound : p s ≤ 2 * s + 1 := by + simpa [p, α, alternatingSum, parityIndices] using + parity_layer_independence_bound hInd root s + by_contra hn + have hsmall : ∀ j, 1 ≤ j → j ≤ s → (distanceLayer G root j).Nonempty → + (distanceLayer G root j).card ≤ s * α j := by + intro j hj hjs hne + by_contra h + exact hn ⟨j, hj, hjs, hne, (show s * α j < (distanceLayer G root j).card by omega)⟩ + apply odd_layer_growth_contradiction hs p hpzero hpbound + intro i his + have hle : ∀ j ∈ Finset.range (i + 1), + (distanceLayer G root (j + 1)).card ≤ s * α (j + 1) := by + intro j hj + by_cases hne : (distanceLayer G root (j + 1)).Nonempty + · exact hsmall (j + 1) (by omega) (by have := Finset.mem_range.mp hj; omega) hne + · rw [Finset.not_nonempty_iff_eq_empty.mp hne, Finset.card_empty] + exact Nat.zero_le _ + have hsum := Finset.sum_le_sum hle + have hpartition := alternatingSum_shifted_partition α hzero (i := i + 1) (by omega) + simp only [Nat.add_sub_cancel] at hpartition + rw [← Finset.mul_sum, hpartition] at hsum + have hexp := distanceLayer_order_sum (by omega : 1 ≤ 2 * s + 1) hexpand root + (i := i + 1) (by omega) + simp only [Nat.add_sub_cancel] at hexp + exact hexp.trans hsum + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DenseSubgraph.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DenseSubgraph.lean new file mode 100644 index 0000000000000000000000000000000000000000..539bca4ed812f1180de3c42b47333e7a1464842c --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DenseSubgraph.lean @@ -0,0 +1,139 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.DenseLayers + +namespace OAI + +/-! +# The dense layer interface + +This assembles the minimum-order choice, connectivity, nonbipartiteness, +minimum degree, and independent-pair expansion. These are exactly the +properties used in the path argument in manuscript Section 3. +-/ + +namespace CycleClique.Construction +theorem independent_pair_finset {V : Type*} [DecidableEq V] {G : SimpleGraph V} {x y : V} + (hxy : ¬ G.Adj x y) : G.IsIndepSet (({x, y} : Finset V) : Set V) := by + classical + intro a ha b hb hne hadj + simp only [Finset.mem_coe, Finset.mem_insert, Finset.mem_singleton] at ha hb + rcases ha with rfl | rfl <;> rcases hb with rfl | rfl + · exact hne rfl + · exact hxy hadj + · exact hxy hadj.symm + · exact hne rfl + +theorem complete_of_indepNum_le_one {V : Type*} [Fintype V] + {G : SimpleGraph V} (hα : G.indepNum ≤ 1) : G = ⊤ := by + classical + apply SimpleGraph.isClique_univ.mp + intro x _ y _ hxy + by_contra hn + have h := (independent_pair_finset hn).card_le_indepNum + simp only [Finset.card_pair hxy] at h + omega + +theorem dense_indepNum_two {V : Type*} [Fintype V] [Nonempty V] + {G : SimpleGraph V} {s : ℕ} + (hclique : G.cliqueNum < s) (hdense : s * G.indepNum ≤ Fintype.card V) : + 2 ≤ G.indepNum := by + classical + have hpos := indepNum_pos_of_nonempty G + by_contra hn + have htop := complete_of_indepNum_le_one (G := G) (by omega) + have hfull : G.IsClique ((Finset.univ : Finset V) : Set V) := by rw [htop]; simp + have hc := hfull.card_le_cliqueNum + simp only [Finset.card_univ] at hc + have hmul := Nat.mul_le_mul_left s hpos + simp only [Nat.mul_one] at hmul + omega + +/-- Full even-parameter layer interface. -/ +theorem dense_layer_interface_even {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {s : ℕ} (hs : 4 ≤ s) + (hclique : G.cliqueNum < s) (hInd : IndependenceBound G (2 * s)) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + 2 * s * I.card + 1 ≤ (closedNeighborhood G I).card) (root : V) : + ∃ i, 1 ≤ i ∧ i ≤ s ∧ ∃ Y : Finset V, + Y ⊆ distanceLayer G root i ∧ Y.Nonempty ∧ + (G.induce (Y : Set V)).Connected ∧ + ¬ (G.induce (Y : Set V)).IsBipartite ∧ 2 * s ≤ Y.card ∧ + (∀ v : Y, s ≤ ((G.induce (Y : Set V)).neighborSet v).ncard) ∧ + (∀ u v : Y, u ≠ v → ¬ G.Adj u.val v.val → + 2 * s ≤ (closedNeighborhood (G.induce (Y : Set V)) {u, v}).card) := by + classical + obtain ⟨i, hi, his, hD, hdense⟩ := exists_dense_distance_layer_even + (by omega) hInd hexpand root + obtain ⟨Y, hYD, hYne, hYdense, hYmin⟩ := exists_minimal_dense_even _ hD hdense + let : Nonempty Y := hYne.to_subtype + let H := G.induce (Y : Set V) + have hcard : Fintype.card Y = Y.card := Fintype.card_coe _ + have hdense' : s * H.indepNum ≤ Fintype.card Y := by simpa [hcard] using hYdense + have hmin : ∀ Z : Finset Y, Z.Nonempty → Z.card < Fintype.card Y → + Z.card < s * (H.induce (Z : Set Y)).indepNum := by + simpa only [hcard] using hYmin + have hconn := minimal_dense_connected_even hdense' hmin + have hnonbip := dense_nonbipartite (by omega) hdense' + have hHclique : H.cliqueNum < s := (G.cliqueNum_induce_le _).trans_lt hclique + have hα := dense_indepNum_two hHclique hdense' + have horder : 2 * s ≤ Fintype.card Y := by nlinarith + have hdegree : ∀ v : Y, s ≤ (H.neighborSet v).ncard := by + apply dense_expansion_degree (by omega) horder + intro v hv + have h := (minimal_dense_expansion_even hdense' hmin {v} (by simp) (by simp)).2 hv + simpa using h + have hpair : ∀ u v : Y, u ≠ v → ¬ G.Adj u.val v.val → + 2 * s ≤ (closedNeighborhood H {u, v}).card := by + intro u v huv hnot + have h := (minimal_dense_expansion_even hdense' hmin {u, v} + (independent_pair_finset hnot) (by simp)).1 + simpa only [Finset.card_pair huv, Nat.mul_comm s 2] using h + refine ⟨i, hi, his, Y, hYD, hYne, hconn, hnonbip, ?_, hdegree, hpair⟩ + simpa only [hcard] using horder + +/-- Full odd-parameter layer interface. -/ +theorem dense_layer_interface_odd {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {s : ℕ} (hs : 4 ≤ s) + (hclique : G.cliqueNum < s) (hInd : IndependenceBound G (2 * s + 1)) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + (2 * s + 1) * I.card + 1 ≤ (closedNeighborhood G I).card) (root : V) : + ∃ i, 1 ≤ i ∧ i ≤ s ∧ ∃ Y : Finset V, + Y ⊆ distanceLayer G root i ∧ Y.Nonempty ∧ + (G.induce (Y : Set V)).Connected ∧ + ¬ (G.induce (Y : Set V)).IsBipartite ∧ 2 * s + 1 ≤ Y.card ∧ + (∀ v : Y, s ≤ ((G.induce (Y : Set V)).neighborSet v).ncard) ∧ + (∀ u v : Y, u ≠ v → ¬ G.Adj u.val v.val → + 2 * s ≤ (closedNeighborhood (G.induce (Y : Set V)) {u, v}).card) := by + classical + obtain ⟨i, hi, his, hD, hdense⟩ := exists_dense_distance_layer_odd + (by omega) hInd hexpand root + obtain ⟨Y, hYD, hYne, hYdense, hYmin⟩ := exists_minimal_dense_odd _ hD hdense + let : Nonempty Y := hYne.to_subtype + let H := G.induce (Y : Set V) + have hcard : Fintype.card Y = Y.card := Fintype.card_coe _ + have hdense' : s * H.indepNum < Fintype.card Y := by simpa [hcard] using hYdense + have hmin : ∀ Z : Finset Y, Z.Nonempty → Z.card < Fintype.card Y → + Z.card ≤ s * (H.induce (Z : Set Y)).indepNum := by + simpa only [hcard] using hYmin + have hconn := minimal_dense_connected_odd hdense' hmin + have hnonbip := dense_nonbipartite (by omega) hdense'.le + have hHclique : H.cliqueNum < s := (G.cliqueNum_induce_le _).trans_lt hclique + have hα := dense_indepNum_two hHclique hdense'.le + have horder : 2 * s + 1 ≤ Fintype.card Y := by nlinarith + have hdegree : ∀ v : Y, s ≤ (H.neighborSet v).ncard := by + apply dense_expansion_degree (by omega) (by omega) + intro v _ + have h := minimal_dense_expansion_odd hdense' hmin {v} (by simp) (by simp) + simpa using h + have hpair : ∀ u v : Y, u ≠ v → ¬ G.Adj u.val v.val → + 2 * s ≤ (closedNeighborhood H {u, v}).card := by + intro u v huv hnot + have h := minimal_dense_expansion_odd hdense' hmin {u, v} + (independent_pair_finset hnot) (by simp) + simp only [Finset.card_pair huv, Nat.mul_comm s 2] at h + omega + refine ⟨i, hi, his, Y, hYD, hYne, hconn, hnonbip, ?_, hdegree, hpair⟩ + simpa only [hcard] using horder + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DistanceLayers.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DistanceLayers.lean new file mode 100644 index 0000000000000000000000000000000000000000..1d8dfd7ccb2be60e8df32a4086f0a6ca32affd84 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DistanceLayers.lean @@ -0,0 +1,125 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LayerSelection +import OAI.Combinatorics.Ramsey.CycleClique.Construction.IndependentPacking +import Mathlib.Combinatorics.SimpleGraph.Metric + +namespace OAI + +/-! +# Distance layers and independent parity unions + +Distance layers are restricted to the root's connected component. +Vertices in different layers of the same parity are anticomplete, so +maximum independent sets chosen there can be combined. +-/ + +namespace CycleClique.Construction +noncomputable def independentOn {V : Type*} [Fintype V] + (G : SimpleGraph V) (D : Finset V) : Finset V := by + classical + exact (Classical.choose (G.induce (D : Set V)).exists_isNIndepSet_indepNum).map + ⟨Subtype.val, Subtype.val_injective⟩ + +theorem independentOn_subset {V : Type*} [Fintype V] + (G : SimpleGraph V) (D : Finset V) : independentOn G D ⊆ D := by + classical + intro x hx + obtain ⟨i, _, rfl⟩ := Finset.mem_map.mp hx + exact i.property + +theorem independentOn_independent {V : Type*} [Fintype V] + (G : SimpleGraph V) (D : Finset V) : G.IsIndepSet (independentOn G D : Set V) := by + classical + intro x hx y hy hxy h + obtain ⟨i, hi, rfl⟩ := Finset.mem_map.mp hx + obtain ⟨j, hj, rfl⟩ := Finset.mem_map.mp hy + exact (Classical.choose_spec (G.induce (D : Set V)).exists_isNIndepSet_indepNum).isIndepSet + hi hj (fun h => hxy (congrArg Subtype.val h)) h + +theorem independentOn_card {V : Type*} [Fintype V] + (G : SimpleGraph V) (D : Finset V) : + (independentOn G D).card = (G.induce (D : Set V)).indepNum := by + classical + rw [independentOn, Finset.card_map] + exact (Classical.choose_spec (G.induce (D : Set V)).exists_isNIndepSet_indepNum).card_eq + +/-- The exact-distance layer within the root component. -/ +noncomputable def distanceLayer {V : Type*} [Fintype V] + (G : SimpleGraph V) (root : V) (j : ℕ) : Finset V := by + classical + exact Finset.univ.filter fun v => G.Reachable root v ∧ G.dist root v = j + +@[simp] theorem mem_distanceLayer {V : Type*} [Fintype V] + {G : SimpleGraph V} {root v : V} {j : ℕ} : + v ∈ distanceLayer G root j ↔ G.Reachable root v ∧ G.dist root v = j := by + classical + simp [distanceLayer] + +theorem distanceLayer_zero {V : Type*} [Fintype V] (G : SimpleGraph V) (root : V) : + distanceLayer G root 0 = {root} := by + classical + ext v + simp only [mem_distanceLayer, Finset.mem_singleton] + constructor + · rintro ⟨hr, hd⟩ + rcases G.dist_eq_zero_iff_eq_or_not_reachable.mp hd with h | h + · exact h.symm + · exact False.elim (h hr) + · rintro rfl + simp + +theorem distanceLayers_disjoint {V : Type*} [Fintype V] + (G : SimpleGraph V) (root : V) {i j : ℕ} (hij : i ≠ j) : + Disjoint (distanceLayer G root i) (distanceLayer G root j) := by + classical + apply Finset.disjoint_left.mpr + intro v hv hi + exact hij ((mem_distanceLayer.mp hv).2.symm.trans (mem_distanceLayer.mp hi).2) + +/-- Distinct layers of one parity have no edges between them. -/ +theorem same_parity_layers_anticomplete {V : Type*} [Fintype V] + {G : SimpleGraph V} {root : V} {i j : ℕ} (hij : i ≠ j) (hparity : i % 2 = j % 2) + {x y : V} (hx : x ∈ distanceLayer G root i) (hy : y ∈ distanceLayer G root j) : + ¬ G.Adj x y := by + intro h + have hdiff := h.diff_dist_adj (u := root) + rw [(mem_distanceLayer.mp hx).2, (mem_distanceLayer.mp hy).2] at hdiff + omega + +/-- Neighbours of a vertex in layer `i` belong to one of the first +`i + 2` layers. -/ +theorem distanceLayer_neighbor_le {V : Type*} [Fintype V] + {G : SimpleGraph V} {root x y : V} {i : ℕ} + (hx : x ∈ distanceLayer G root i) (hxy : G.Adj x y) : + ∃ j ≤ i + 1, y ∈ distanceLayer G root j := by + have hx' := mem_distanceLayer.mp hx + refine ⟨G.dist root y, ?_, mem_distanceLayer.mpr ⟨hx'.1.trans hxy.reachable, rfl⟩⟩ + have hdiff := hxy.diff_dist_adj (u := root) + rw [hx'.2] at hdiff + omega + +/-- Alternating maximum-independent-set sums are at most the ambient +independence bound. -/ +theorem parity_layer_independence_bound {V : Type*} [Fintype V] + {G : SimpleGraph V} {k : ℕ} (hbound : IndependenceBound G k) (root : V) (i : ℕ) : + ∑ j ∈ (Finset.range (i + 1)).filter (fun j => j % 2 = i % 2), + (G.induce (distanceLayer G root j : Set V)).indepNum ≤ k := by + classical + let F := (Finset.range (i + 1)).filter (fun j => j % 2 = i % 2) + let I := fun j => independentOn G (distanceLayer G root j) + have hind : ∀ j ∈ F, G.IsIndepSet (I j : Set V) := fun j _ => independentOn_independent _ _ + have hdis : (F : Set ℕ).PairwiseDisjoint I := by + intro j _ l _ hjl + exact (distanceLayers_disjoint G root hjl).mono + (independentOn_subset _ _) (independentOn_subset _ _) + have hanti : ∀ j ∈ F, ∀ l ∈ F, j ≠ l → ∀ x ∈ I j, ∀ y ∈ I l, ¬ G.Adj x y := by + intro j hj l hl hjl x hx y hy + apply same_parity_layers_anticomplete hjl + (((Finset.mem_filter.mp hj).2).trans (Finset.mem_filter.mp hl).2.symm) + · exact independentOn_subset _ _ hx + · exact independentOn_subset _ _ hy + have h := independent_packing hbound F I hind hdis hanti + simpa only [I, independentOn_card] using h + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointAllowedAttachment.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointAllowedAttachment.lean new file mode 100644 index 0000000000000000000000000000000000000000..61ce2302e1ea832b01e4f7fafb391aefbdde7807 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointAllowedAttachment.lean @@ -0,0 +1,75 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.EndpointFullAttachment + +namespace OAI + +/-! Attachment conclusions restricted to neighbours in the longest path's vertex set. -/ + +namespace CycleClique.Construction +theorem endpoint_attachment_vertex_of_prefix_preserved {V : Type*} [Fintype V] + {H : SimpleGraph V} {x w v : V} {W : Finset V} {r : ℕ} + {f g : Fin (r + 1) → V} (hf : IsSpanningPath H x W f) (t : Fin r) + (hfinal : ∀ i : Fin (r + 1), f i ∈ pathEnds H x W r ↔ t.val < i.val) + (hg : IsSpanningPath H x W g) (hglast : g (Fin.last r) = w) + (hfix : ∀ j : Fin (r + 1), j.val ≤ t.val → g j = f j) + (hvW : v ∈ W) (hwv : H.Adj w v) : + v ∈ pathEnds H x W r ∨ v = f t.castSucc := by + by_cases hv : v ∈ pathEnds H x W r + · exact Or.inl hv + · right + have hvW' : v ∈ (W : Set V) := hvW + rw [← hf.2.2.2] at hvW' + obtain ⟨j, hjv⟩ := hvW' + have hjbefore : j.val ≤ t.val := by + by_contra hn + exact hv (hjv ▸ (hfinal j).mpr (by omega)) + by_cases heq : j.val = t.val + · have hj : j = t.castSucc := Fin.ext heq + exact hjv.symm.trans (congrArg f hj) + · let p : Fin r := ⟨j.val, by have := t.isLt; omega⟩ + have hgp : g p.castSucc = v := (hfix p.castSucc (by dsimp [p]; omega)).trans + ((congrArg f (Fin.ext rfl)).trans hjv) + have hrot := successor_mem_pathEnds hg p (by rw [hglast, hgp]; exact hwv) + rw [hfix p.succ (by dsimp [p]; omega)] at hrot + have hbound := (hfinal p.succ).mp hrot + dsimp [p] at hbound + omega + +theorem partial_endpoint_attachment_in_W {V : Type*} [Fintype V] + {H : SimpleGraph V} {x w v : V} {W : Finset V} {r : ℕ} + {f : Fin (r + 1) → V} (hf : IsSpanningPath H x W f) (t : Fin r) + (hfinal : ∀ i : Fin (r + 1), f i ∈ pathEnds H x W r ↔ t.val < i.val) + (hclique : H.IsClique (pathEnds H x W r : Set V)) + (hw : w ∈ pathEnds H x W r) (hne : w ≠ f t.succ) + (hvW : v ∈ W) (hwv : H.Adj w v) : + v ∈ pathEnds H x W r ∨ v = f t.castSucc := by + have hwW : w ∈ (W : Set V) := pathEnds_subset H x W r hw + rw [← hf.2.2.2] at hwW + obtain ⟨i, hiw⟩ := hwW + have hitail : t.val < i.val := (hfinal i).mp (hiw ▸ hw) + have hi : t.val + 1 < i.val := by + have hneq : i ≠ t.succ := fun h => hne (hiw.symm.trans (congrArg f h)) + have hval : i.val ≠ t.val + 1 := fun h => hneq (Fin.ext h) + omega + obtain ⟨g, hg, hlast, hfix⟩ := spanningPath_swap_tail hf t hfinal hclique i hi + apply endpoint_attachment_vertex_of_prefix_preserved hf t hfinal hg (hlast.trans hiw) + (fun j hj => hfix j (by omega)) hvW hwv + +theorem full_endpoint_attachment_in_W {V : Type*} [Fintype V] + {H : SimpleGraph V} {x w v : V} {W : Finset V} {r : ℕ} + {f : Fin (r + 1) → V} (hf : IsSpanningPath H x W f) (t : Fin r) + (hfinal : ∀ i : Fin (r + 1), f i ∈ pathEnds H x W r ↔ t.val < i.val) + (hclique : H.IsClique (pathEnds H x W r : Set V)) + (hsecond : ∃ w ∈ pathEnds H x W r, + w ≠ f t.succ ∧ H.Adj (f t.castSucc) w) + (hw : w ∈ pathEnds H x W r) (hvW : v ∈ W) (hwv : H.Adj w v) : + v ∈ pathEnds H x W r ∨ v = f t.castSucc := by + by_cases heq : w = f t.succ + · subst w + obtain ⟨w₁, hw₁, hne, hadj⟩ := hsecond + obtain ⟨g, hg, hlast, hfix⟩ := spanningPath_first_tail_last hf t hfinal hclique hw₁ hne hadj + exact endpoint_attachment_vertex_of_prefix_preserved hf t hfinal hg hlast hfix hvW hwv + · exact partial_endpoint_attachment_in_W hf t hfinal hclique hw heq hvW hwv + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointAttachment.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointAttachment.lean new file mode 100644 index 0000000000000000000000000000000000000000..125edcd86903ab97d1c616754936535ef1a8aab0 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointAttachment.lean @@ -0,0 +1,178 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.EndpointTail + +namespace OAI + +/-! The degree calculations forcing a second attachment and a common neighbour. -/ + +namespace CycleClique.Construction +theorem degree_le_of_neighbor_cover {V : Type*} [Fintype V] + {H : SimpleGraph V} {v : V} {S : Finset V} + (hcover : ∀ w, H.Adj v w → w ∈ S) : (H.neighborSet v).ncard ≤ S.card := by + classical + have hsub : H.neighborFinset v ⊆ S := fun w hw => + hcover w ((H.mem_neighborFinset v w).mp hw) + simpa only [SimpleGraph.ncard_neighborSet, + SimpleGraph.card_neighborFinset_eq_degree] using Finset.card_le_card hsub + +theorem degree_cover_forces_neighbor {V : Type*} [Fintype V] + {H : SimpleGraph V} {v w : V} {S : Finset V} + (hcover : ∀ a, H.Adj v a → a ∈ S) + (hdegree : S.card ≤ (H.neighborSet v).ncard) (hw : w ∈ S) : H.Adj v w := by + classical + have hsub : H.neighborFinset v ⊆ S := fun a ha => + hcover a ((H.mem_neighborFinset v a).mp ha) + have hcard : S.card ≤ (H.neighborFinset v).card := by + simpa only [SimpleGraph.ncard_neighborSet, + SimpleGraph.card_neighborFinset_eq_degree] using hdegree + have heq := Finset.eq_of_subset_of_card_le hsub hcard + exact (H.mem_neighborFinset v w).mp (heq.symm ▸ hw) + +theorem clique_extension_size {V : Type*} [Fintype V] [DecidableEq V] + {H : SimpleGraph V} {E : Finset V} {u : V} + (hclique : H.IsClique (E : Set V)) (hu : u ∉ E) + (hadj : ∀ w ∈ E, H.Adj u w) : E.card + 1 ≤ H.cliqueNum := by + have hQ : H.IsClique ((insert u E : Finset V) : Set V) := by + rw [Finset.coe_insert] + exact hclique.insert (fun w hw _ => hadj w hw) + have h := hQ.card_le_cliqueNum + simpa only [Finset.card_insert_of_notMem hu] using h + +private theorem erased_pair_cover_card {V : Type*} [DecidableEq V] + {E : Finset V} {w y z : V} (hw : w ∈ E) : + ((E.erase w) ∪ {y, z}).card ≤ E.card + 1 := by + have h := Finset.card_union_le (E.erase w) {y, z} + have he := Finset.card_erase_add_one hw + have hp : ({y, z} : Finset V).card ≤ 2 := Finset.card_le_two + omega + +/-- The attachment vertex has a second neighbour in the endpoint +clique; this is the two-case degree calculation in the manuscript. -/ +theorem endpoint_second_attachment {V : Type*} [Fintype V] [DecidableEq V] + {H : SimpleGraph V} {E : Finset V} {u w₀ y z : V} {s : ℕ} + (hs : 4 ≤ s) (hsize : s - 2 ≤ E.card ∧ E.card ≤ s - 1) + (hclique : H.IsClique (E : Set V)) (hno : H.cliqueNum < s) + (hy : y ∉ E) (hz : z ∉ E) (hw₀ : w₀ ∈ E) + (hdegree : ∀ w ∈ E, s ≤ (H.neighborSet w).ncard) + (hpartial : ∀ w ∈ E, w ≠ w₀ → ∀ v, H.Adj w v → + v ∈ (E.erase w) ∪ {u, y, z}) + (hzero : ¬ H.Adj w₀ y → ¬ H.Adj w₀ z → (H.neighborSet w₀).ncard ≤ E.card) : + ∃ w ∈ E, w ≠ w₀ ∧ H.Adj u w := by + classical + by_contra hn + have hnotu : ∀ w ∈ E, w ≠ w₀ → ¬ H.Adj w u := by + intro w hw hne hwu + exact hn ⟨w, hw, hne, hwu.symm⟩ + have hcover : ∀ w ∈ E, w ≠ w₀ → ∀ v, H.Adj w v → + v ∈ (E.erase w) ∪ {y, z} := by + intro w hw hne v hwv + rcases Finset.mem_union.mp (hpartial w hw hne v hwv) with hv | hv + · exact Finset.mem_union_left _ hv + · simp only [Finset.mem_insert, Finset.mem_singleton] at hv + rcases hv with rfl | rfl | rfl + · exact False.elim (hnotu w hw hne hwv) + · simp + · simp + by_cases hsmall : E.card = s - 2 + · obtain ⟨w, hw, hne⟩ := Finset.exists_mem_ne (by omega : 1 < E.card) w₀ + have hbound := degree_le_of_neighbor_cover (hcover w hw hne) + have hcard := erased_pair_cover_card (y := y) (z := z) hw + have hlow := hdegree w hw + omega + · have hlarge : E.card = s - 1 := by omega + have hboth : ∀ w ∈ E, w ≠ w₀ → H.Adj w y ∧ H.Adj w z := by + intro w hw hne + have hc := erased_pair_cover_card (y := y) (z := z) hw + have hd := hdegree w hw + have hforce : ∀ a ∈ (E.erase w) ∪ {y, z}, H.Adj w a := fun a ha => + degree_cover_forces_neighbor (hcover w hw hne) + (show ((E.erase w) ∪ {y, z}).card ≤ (H.neighborSet w).ncard by omega) ha + exact ⟨hforce y (by simp), hforce z (by simp)⟩ + have hsome : H.Adj w₀ y ∨ H.Adj w₀ z := by + by_contra hn + have hny : ¬ H.Adj w₀ y := fun h => hn (Or.inl h) + have hnz : ¬ H.Adj w₀ z := fun h => hn (Or.inr h) + have h := hzero hny hnz + have h' := hdegree w₀ hw₀ + omega + rcases hsome with hwy | hwz + · have hadj : ∀ w ∈ E, H.Adj y w := by + intro w hw + by_cases heq : w = w₀ + · subst w; exact hwy.symm + · exact (hboth w hw heq).1.symm + have h := clique_extension_size hclique hy hadj + omega + · have hadj : ∀ w ∈ E, H.Adj z w := by + intro w hw + by_cases heq : w = w₀ + · subst w; exact hwz.symm + · exact (hboth w hw heq).2.symm + have h := clique_extension_size hclique hz hadj + omega + +/-- Once all endpoints attach only through `u`, one endpoint sees both +deleted vertices. -/ +theorem endpoint_common_deleted_neighbor {V : Type*} [Fintype V] [DecidableEq V] + {H : SimpleGraph V} {E : Finset V} {u y z : V} {s : ℕ} + (hs : 4 ≤ s) (hsize : s - 2 ≤ E.card ∧ E.card ≤ s - 1) + (hclique : H.IsClique (E : Set V)) (hno : H.cliqueNum < s) (hu : u ∉ E) + (hdegree : ∀ w ∈ E, s ≤ (H.neighborSet w).ncard) + (hcover : ∀ w ∈ E, ∀ v, H.Adj w v → v ∈ (E.erase w) ∪ {u, y, z}) : + ∃ w ∈ E, H.Adj w y ∧ H.Adj w z := by + classical + by_cases hsmall : E.card = s - 2 + · obtain ⟨w, hw⟩ := Finset.card_pos.mp (by omega : 0 < E.card) + have hc := Finset.card_union_le (E.erase w) {u, y, z} + have he := Finset.card_erase_add_one hw + have ht : ({u, y, z} : Finset V).card ≤ 3 := Finset.card_le_three + have hd := hdegree w hw + have hforce : ∀ a ∈ (E.erase w) ∪ {u, y, z}, H.Adj w a := fun a ha => + degree_cover_forces_neighbor (hcover w hw) + (show ((E.erase w) ∪ {u, y, z}).card ≤ (H.neighborSet w).ncard by omega) ha + exact ⟨w, hw, hforce y (by simp), hforce z (by simp)⟩ + · have hlarge : E.card = s - 1 := by omega + by_contra hn + have hadju : ∀ w ∈ E, H.Adj u w := by + intro w hw + by_contra hnu + have hnotu : ¬ H.Adj w u := fun h => hnu h.symm + have hpair : ¬ H.Adj w y ∨ ¬ H.Adj w z := by + by_cases hwy : H.Adj w y + · exact Or.inr (fun hwz => hn ⟨w, hw, hwy, hwz⟩) + · exact Or.inl hwy + have hbound : (H.neighborSet w).ncard ≤ E.card := by + rcases hpair with hny | hnz + · have hsub : ∀ v, H.Adj w v → v ∈ insert z (E.erase w) := by + intro v hwv + rcases Finset.mem_union.mp (hcover w hw v hwv) with hv | hv + · exact Finset.mem_insert_of_mem hv + · simp only [Finset.mem_insert, Finset.mem_singleton] at hv + rcases hv with rfl | rfl | rfl + · exact False.elim (hnotu hwv) + · exact False.elim (hny hwv) + · simp + have h := degree_le_of_neighbor_cover hsub + have hc := Finset.card_insert_le z (E.erase w) + have he := Finset.card_erase_add_one hw + omega + · have hsub : ∀ v, H.Adj w v → v ∈ insert y (E.erase w) := by + intro v hwv + rcases Finset.mem_union.mp (hcover w hw v hwv) with hv | hv + · exact Finset.mem_insert_of_mem hv + · simp only [Finset.mem_insert, Finset.mem_singleton] at hv + rcases hv with rfl | rfl | rfl + · exact False.elim (hnotu hwv) + · simp + · exact False.elim (hnz hwv) + have h := degree_le_of_neighbor_cover hsub + have hc := Finset.card_insert_le y (E.erase w) + have he := Finset.card_erase_add_one hw + omega + have hlow := hdegree w hw + omega + have h := clique_extension_size hclique hu hadju + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointDegreeCover.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointDegreeCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..20cf90633e680e111e29a03c8b901ea80038a97d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointDegreeCover.lean @@ -0,0 +1,67 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RestrictedLongest + +namespace OAI + +/-! Degree bounds when two deleted vertices are the only neighbours outside the longest path. -/ + +namespace CycleClique.Construction +theorem endpoint_neighbor_card_le {V : Type*} [Fintype V] + {H : SimpleGraph V} {x e : V} {W S : Finset V} {r : ℕ} + (he : e ∈ pathEnds H x W r) + (hS : ∀ v ∈ S, H.Adj e v ∧ v ∈ W) : S.card ≤ (pathEnds H x W r).card := by + classical + obtain ⟨f, hf, hlast⟩ := mem_pathEnds.mp he + have hex : ∀ v : S, ∃ i : Fin r, f i.castSucc = v.val := by + intro v + obtain ⟨hadj, hvW⟩ := hS v.val v.property + have hv : v.val ∈ Set.range f := by rw [hf.2.2.2]; exact hvW + obtain ⟨j, hj⟩ := hv + have hjlt : j.val < r := by + have hneq : j ≠ Fin.last r := by + intro heq + subst j + exact hadj.ne (hlast.symm.trans hj) + have hval : j.val ≠ r := fun h => hneq (Fin.ext h) + omega + exact ⟨⟨j.val, hjlt⟩, by simpa using hj⟩ + let pivot : S → Fin r := fun v => Classical.choose (hex v) + have hpivot : ∀ v : S, f (pivot v).castSucc = v.val := fun v => Classical.choose_spec (hex v) + let suc : S → pathEnds H x W r := fun v => + ⟨f (pivot v).succ, successor_mem_pathEnds hf (pivot v) (by + rw [hlast, hpivot] + exact (hS v.val v.property).1)⟩ + have hinj : Function.Injective suc := by + intro a b hab + have hfin := hf.1 (congrArg Subtype.val hab) + have hp : pivot a = pivot b := Fin.succ_injective r hfin + apply Subtype.ext + rw [← hpivot a, ← hpivot b, hp] + simpa only [Fintype.card_coe] using Fintype.card_le_of_injective suc hinj + +theorem endpoint_degree_le_card_add_two {V : Type*} [Fintype V] + {H : SimpleGraph V} {x e y z : V} {W : Finset V} {r : ℕ} + (he : e ∈ pathEnds H x W r) + (hcover : ∀ v, H.Adj e v → v ∈ W ∨ v = y ∨ v = z) : + (H.neighborSet e).ncard ≤ (pathEnds H x W r).card + 2 := by + classical + let S := (H.neighborFinset e).filter fun v => v ∈ W + have hS : ∀ v ∈ S, H.Adj e v ∧ v ∈ W := by + intro v hv + exact ⟨(H.mem_neighborFinset e v).mp (Finset.mem_filter.mp hv).1, + (Finset.mem_filter.mp hv).2⟩ + have hSbound := endpoint_neighbor_card_le he hS + have hsub : H.neighborFinset e ⊆ S ∪ {y, z} := by + intro v hv + rcases hcover v ((H.mem_neighborFinset e v).mp hv) with hvW | rfl | rfl + · exact Finset.mem_union_left _ (Finset.mem_filter.mpr ⟨hv, hvW⟩) + · simp + · simp + have hcard := (Finset.card_le_card hsub).trans (Finset.card_union_le S {y, z}) + have hp : ({y, z} : Finset V).card ≤ 2 := Finset.card_le_two + have hdegree : (H.neighborFinset e).card ≤ (pathEnds H x W r).card + 2 := by omega + simpa only [SimpleGraph.card_neighborFinset_eq_degree, + SimpleGraph.ncard_neighborSet] using hdegree + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointFullAttachment.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointFullAttachment.lean new file mode 100644 index 0000000000000000000000000000000000000000..44091c97abc7d67afc8c88340a84986270ef1656 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointFullAttachment.lean @@ -0,0 +1,96 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.EndpointAttachment + +namespace OAI + +/-! Rotating from a second attachment extends the prefix exclusion to every endpoint. -/ + +namespace CycleClique.Construction +theorem spanningPath_first_tail_last {V : Type*} [Fintype V] + {G : SimpleGraph V} {x : V} {W : Finset V} {r : ℕ} + {f : Fin (r + 1) → V} (hf : IsSpanningPath G x W f) (t : Fin r) + (hfinal : ∀ i : Fin (r + 1), f i ∈ pathEnds G x W r ↔ t.val < i.val) + (hclique : G.IsClique (pathEnds G x W r : Set V)) + {w : V} (hw : w ∈ pathEnds G x W r) (hne : w ≠ f t.succ) + (hadj : G.Adj (f t.castSucc) w) : + ∃ g : Fin (r + 1) → V, IsSpanningPath G x W g ∧ + g (Fin.last r) = f t.succ ∧ + ∀ j : Fin (r + 1), j.val ≤ t.val → g j = f j := by + have hwW : w ∈ (W : Set V) := pathEnds_subset G x W r hw + rw [← hf.2.2.2] at hwW + obtain ⟨i, hiw⟩ := hwW + have hitail : t.val < i.val := (hfinal i).mp (hiw ▸ hw) + have hi : t.val + 1 < i.val := by + have hneq : i ≠ t.succ := fun h => hne (hiw.symm.trans (congrArg f h)) + have hval : i.val ≠ t.val + 1 := fun h => hneq (Fin.ext h) + omega + obtain ⟨g, hg, hglast, hgfix⟩ := spanningPath_swap_tail hf t hfinal hclique i hi + have hrot := rotate_path g hg.1 hg.2.1 t (by + rw [hglast, hiw, hgfix t.castSucc (by simp)] + exact hadj.symm) + refine ⟨g ∘ rotationIndex t, ⟨hrot.1, hrot.2.1, + hrot.2.2.1.trans hg.2.2.1, hrot.2.2.2.2.trans hg.2.2.2⟩, + hrot.2.2.2.1.trans (hgfix t.succ (by simp)), ?_⟩ + intro j hj + have hidx : rotationIndex t j = j := by + apply Fin.ext + dsimp [rotationIndex] + split_ifs + omega + change g (rotationIndex t j) = f j + rw [hidx] + exact hgfix j (by omega) + +theorem endpoint_attachment_of_prefix_preserved {V : Type*} [Fintype V] + {G : SimpleGraph V} {x w : V} {W : Finset V} {r : ℕ} + {f g : Fin (r + 1) → V} (hf : IsSpanningPath G x W f) (t : Fin r) + (hfinal : ∀ i : Fin (r + 1), f i ∈ pathEnds G x W r ↔ t.val < i.val) + (hg : IsSpanningPath G x W g) (hglast : g (Fin.last r) = w) + (hfix : ∀ j : Fin (r + 1), j.val ≤ t.val → g j = f j) + (hneighbors : ∀ v, G.Adj w v → v ∈ W) : + ∀ v, G.Adj w v → v ∈ pathEnds G x W r ∨ v = f t.castSucc := by + intro v hwv + by_cases hv : v ∈ pathEnds G x W r + · exact Or.inl hv + · right + have hvW : v ∈ (W : Set V) := hneighbors v hwv + rw [← hf.2.2.2] at hvW + obtain ⟨j, hjv⟩ := hvW + have hjbefore : j.val ≤ t.val := by + by_contra hn + exact hv (hjv ▸ (hfinal j).mpr (by omega)) + by_cases heq : j.val = t.val + · have hj : j = t.castSucc := Fin.ext heq + exact hjv.symm.trans (congrArg f hj) + · let p : Fin r := ⟨j.val, by have := t.isLt; omega⟩ + have hgp : g p.castSucc = v := (hfix p.castSucc (by dsimp [p]; omega)).trans + ((congrArg f (Fin.ext rfl)).trans hjv) + have hrot := successor_mem_pathEnds hg p (by rw [hglast, hgp]; exact hwv) + rw [hfix p.succ (by dsimp [p]; omega)] at hrot + have hbound := (hfinal p.succ).mp hrot + dsimp [p] at hbound + omega + +/-- Every endpoint has no neighbour outside the endpoint clique other +than the one attachment vertex. -/ +theorem full_endpoint_attachment {V : Type*} [Fintype V] + {G : SimpleGraph V} {x : V} {W : Finset V} {r : ℕ} + {f : Fin (r + 1) → V} (hf : IsSpanningPath G x W f) (t : Fin r) + (hfinal : ∀ i : Fin (r + 1), f i ∈ pathEnds G x W r ↔ t.val < i.val) + (hclique : G.IsClique (pathEnds G x W r : Set V)) + (hneighbors : ∀ e ∈ pathEnds G x W r, ∀ v, G.Adj e v → v ∈ W) + (hsecond : ∃ w ∈ pathEnds G x W r, + w ≠ f t.succ ∧ G.Adj (f t.castSucc) w) : + ∀ w ∈ pathEnds G x W r, ∀ v, G.Adj w v → + v ∈ pathEnds G x W r ∨ v = f t.castSucc := by + intro w hw + by_cases heq : w = f t.succ + · subst w + obtain ⟨w₁, hw₁, hne, hadj⟩ := hsecond + obtain ⟨g, hg, hlast, hfix⟩ := spanningPath_first_tail_last hf t hfinal hclique hw₁ hne hadj + exact endpoint_attachment_of_prefix_preserved hf t hfinal hg hlast hfix + (hneighbors _ hw) + · exact partial_endpoint_attachment hf t hfinal hclique hneighbors w hw heq + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointStructure.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointStructure.lean new file mode 100644 index 0000000000000000000000000000000000000000..735a717eb75d9318d9616ac6caa4ccb095f89a8d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointStructure.lean @@ -0,0 +1,116 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.EndpointDegreeCover +import OAI.Combinatorics.Ramsey.CycleClique.Construction.EndpointAllowedAttachment + +namespace OAI + +/-! Assembling the endpoint clique and its single attachment. -/ + +namespace CycleClique.Construction +theorem endpoint_structure {V : Type*} [Fintype V] [DecidableEq V] + {H : SimpleGraph V} {U W : Finset V} {x y z : V} {r s : ℕ} + (hs : 4 ≤ s) (hno : H.cliqueNum < s) + (hdegree : ∀ v, s ≤ (H.neighborSet v).ncard) + (hexpand : ∀ a b, a ≠ b → ¬ H.Adj a b → + 2 * s ≤ (closedNeighborhood H {a, b}).card) + (hyU : y ∉ U) (hzU : z ∉ U) (hWU : W ⊆ U) + (hcover : ∀ u ∈ U, ∀ v, H.Adj u v → v ∈ U ∨ v = y ∨ v = z) + {f : Fin (r + 1) → V} (hf : IsSpanningPath H x W f) + (hcard : W.card = r + 1) (hshort : W.card + 2 < 2 * s) + (hmax : ∀ q (g : Fin (q + 1) → V), IsIndexedPath H g → g 0 = x → + (∀ i, g i ∈ U) → q ≤ r) : + let E := pathEnds H x W r + H.IsClique (E : Set V) ∧ s - 2 ≤ E.card ∧ E.card ≤ s - 1 ∧ + ∃ u ∈ U, u ∉ E ∧ + (∃ a ∈ E, ∃ b ∈ E, a ≠ b ∧ H.Adj a u ∧ H.Adj b u) ∧ + (∀ e ∈ E, ∀ v, H.Adj e v → v ∈ E ∨ v = u ∨ v = y ∨ v = z) ∧ + ∃ w ∈ E, H.Adj w y ∧ H.Adj w z := by + classical + let E := pathEnds H x W r + have hEW : E ⊆ W := pathEnds_subset H x W r + have hEU : E ⊆ U := hEW.trans hWU + have hyE : y ∉ E := fun hy => hyU (hEU hy) + have hzE : z ∉ E := fun hz => hzU (hEU hz) + have he : f (Fin.last r) ∈ E := mem_pathEnds.mpr ⟨f, hf, rfl⟩ + have hcoverE : ∀ e ∈ E, ∀ v, H.Adj e v → v ∈ W ∨ v = y ∨ v = z := + restricted_endpoint_neighbor_cover hWU hcover hmax + have hclique : H.IsClique (E : Set V) := by + apply clique_of_endpoint_neighbor_cover (s := s) hEW + (Z := {y, z}) + · intro e he v hev + rcases hcoverE e he v hev with hv | rfl | rfl + · exact Finset.mem_union_left _ hv + · simp + · simp + · have hp : ({y, z} : Finset V).card ≤ 2 := Finset.card_le_two + omega + · exact hexpand + have hupper : E.card ≤ s - 1 := by + have := hclique.card_le_cliqueNum + omega + have hlower : s - 2 ≤ E.card := by + have hbound := endpoint_degree_le_card_add_two he (hcoverE _ he) + change (H.neighborSet (f (Fin.last r))).ncard ≤ E.card + 2 at hbound + have hlow := hdegree (f (Fin.last r)) + omega + have hr : 1 ≤ r := by + have hbound := Finset.card_le_card hEW + omega + obtain ⟨t, hfinal⟩ := pathEnds_final_segment hr hf hclique + let u := f t.castSucc + let w₀ := f t.succ + have huU : u ∈ U := by + apply hWU + change f t.castSucc ∈ (W : Set V) + rw [← hf.2.2.2] + exact ⟨t.castSucc, rfl⟩ + have huE : u ∉ E := by + intro hu + have h := (hfinal t.castSucc).mp hu + simp only [Fin.val_castSucc] at h + omega + have hw₀ : w₀ ∈ E := (hfinal t.succ).mpr (by simp) + have huw₀ : H.Adj u w₀ := hf.2.1 t + have hpartial : ∀ e ∈ E, e ≠ w₀ → ∀ v, H.Adj e v → + v ∈ (E.erase e) ∪ {u, y, z} := by + intro e he hne v hev + rcases hcoverE e he v hev with hvW | rfl | rfl + · rcases partial_endpoint_attachment_in_W hf t hfinal hclique he hne hvW hev with hvE | hveq + · exact Finset.mem_union_left _ (Finset.mem_erase.mpr ⟨hev.ne.symm, hvE⟩) + · subst v + exact Finset.mem_union_right _ (Finset.mem_insert_self _ _) + · simp + · simp + have hzero : ¬ H.Adj w₀ y → ¬ H.Adj w₀ z → (H.neighborSet w₀).ncard ≤ E.card := by + intro hny hnz + apply endpoint_degree_le hw₀ + intro v hwv + rcases hcoverE w₀ hw₀ v hwv with hv | rfl | rfl + · exact hv + · exact False.elim (hny hwv) + · exact False.elim (hnz hwv) + have hsecond := endpoint_second_attachment hs ⟨hlower, hupper⟩ hclique hno + hyE hzE hw₀ (fun e _ => hdegree e) hpartial hzero + have hfull : ∀ e ∈ E, ∀ v, H.Adj e v → v ∈ E ∨ v = u ∨ v = y ∨ v = z := by + intro e he v hev + rcases hcoverE e he v hev with hvW | hvy | hvz + · rcases full_endpoint_attachment_in_W hf t hfinal hclique hsecond he hvW hev with hv | hvu + · exact Or.inl hv + · exact Or.inr (Or.inl hvu) + · exact Or.inr (Or.inr (Or.inl hvy)) + · exact Or.inr (Or.inr (Or.inr hvz)) + have hfull' : ∀ e ∈ E, ∀ v, H.Adj e v → v ∈ (E.erase e) ∪ {u, y, z} := by + intro e he v hev + rcases hfull e he v hev with hv | rfl | rfl | rfl + · exact Finset.mem_union_left _ (Finset.mem_erase.mpr ⟨hev.ne.symm, hv⟩) + · simp + · simp + · simp + have hcommon := endpoint_common_deleted_neighbor hs ⟨hlower, hupper⟩ hclique hno + huE (fun e _ => hdegree e) hfull' + obtain ⟨b, hb, hbne, hub⟩ := hsecond + exact ⟨hclique, hlower, hupper, u, huU, huE, + ⟨w₀, hw₀, b, hb, hbne.symm, huw₀.symm, hub.symm⟩, hfull, hcommon⟩ + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointTail.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointTail.lean new file mode 100644 index 0000000000000000000000000000000000000000..a59d56faaf9b59ba2e7147852d61eed3ed72161d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointTail.lean @@ -0,0 +1,178 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LongestPaths + +namespace OAI + +/-! The endpoint clique is a final segment, and its tail can be reordered. -/ + +namespace CycleClique.Construction +/-- A nonempty successor-closed subset of a finite interval, excluding +zero, starts immediately after a well-defined boundary index. -/ +theorem successor_closed_final_segment {r : ℕ} (P : Fin (r + 1) → Prop) + (hzero : ¬ P 0) (hlast : P (Fin.last r)) + (hnext : ∀ i : Fin r, P i.castSucc → P i.succ) : + ∃ t : Fin r, ∀ i : Fin (r + 1), P i ↔ t.val < i.val := by + classical + let A : Finset (Fin (r + 1)) := Finset.univ.filter P + have hA : A.Nonempty := ⟨Fin.last r, by simpa [A] using hlast⟩ + let a := A.min' hA + have ha : P a := (Finset.mem_filter.mp (A.min'_mem hA)).2 + have hapos : 1 ≤ a.val := by + by_contra hn + have heq : a = 0 := by + apply Fin.ext + simpa only [Fin.val_zero] using (show a.val = 0 by omega) + exact hzero (heq ▸ ha) + have hmin : ∀ i, P i → a.val ≤ i.val := by + intro i hi + exact Finset.min'_le A i (by simpa [A] using hi) + have hup : ∀ j, ∀ hj : j < r + 1, a.val ≤ j → P ⟨j, hj⟩ := by + intro j + induction j with + | zero => intro hj hle; omega + | succ j ih => + intro hj hle + by_cases heq : a.val = j + 1 + · have heq' : a = ⟨j + 1, hj⟩ := Fin.ext heq + exact heq' ▸ ha + · have hjr : j < r := by omega + have hprev := ih (by omega) (by omega) + exact hnext ⟨j, hjr⟩ hprev + refine ⟨⟨a.val - 1, by have := a.isLt; omega⟩, ?_⟩ + intro i + constructor + · intro hi + have := hmin i hi + dsimp + omega + · intro hi + apply hup i.val i.isLt + dsimp at hi + omega + +theorem pathEnds_final_segment {V : Type*} [Fintype V] + {G : SimpleGraph V} {x : V} {W : Finset V} {r : ℕ} + (hr : 1 ≤ r) {f : Fin (r + 1) → V} (hf : IsSpanningPath G x W f) + (hclique : G.IsClique (pathEnds G x W r : Set V)) : + ∃ t : Fin r, ∀ i : Fin (r + 1), f i ∈ pathEnds G x W r ↔ t.val < i.val := by + apply successor_closed_final_segment (fun i => f i ∈ pathEnds G x W r) + · rw [hf.2.2.1] + exact start_not_pathEnds hr + · exact mem_pathEnds.mpr ⟨f, hf, rfl⟩ + · intro i hi + exact pathEnds_successor_closed hf hclique hi + +/-- Permuting the clique tail while fixing its first vertex preserves +the path and all of its prefix. -/ +theorem spanningPath_permute_tail {V : Type*} [Fintype V] + {G : SimpleGraph V} {x : V} {W E : Finset V} {r : ℕ} + {f : Fin (r + 1) → V} (hf : IsSpanningPath G x W f) + (t : Fin r) (hfinal : ∀ i : Fin (r + 1), f i ∈ E ↔ t.val < i.val) + (hclique : G.IsClique (E : Set V)) (σ : Equiv.Perm (Fin (r + 1))) + (hfix : ∀ i : Fin (r + 1), i.val ≤ t.val + 1 → σ i = i) : + IsSpanningPath G x W (f ∘ σ) := by + have htail : ∀ i : Fin (r + 1), t.val < i.val → t.val < (σ i).val := by + intro i hi + by_contra hn + have hs : σ (σ i) = σ i := hfix (σ i) (by omega) + have heq : i = σ i := σ.injective hs.symm + have hv := congrArg Fin.val heq + omega + refine ⟨hf.1.comp σ.injective, ?_, ?_, ?_⟩ + · intro i + change G.Adj (f (σ i.castSucc)) (f (σ i.succ)) + by_cases hbefore : i.val ≤ t.val + · rw [hfix i.castSucc (by change i.val ≤ t.val + 1; omega), + hfix i.succ (by change i.val + 1 ≤ t.val + 1; omega)] + exact hf.2.1 i + · apply hclique ((hfinal _).mpr (htail _ (by simpa using (by omega : t.val < i.val)))) + ((hfinal _).mpr (htail _ (by simp; omega))) + intro heq + have hidx := σ.injective (hf.1 heq) + have hv := congrArg Fin.val hidx + simp only [Fin.val_castSucc, Fin.val_succ] at hv + omega + · change f (σ 0) = x + rw [hfix 0 (by simp)] + exact hf.2.2.1 + · ext v + constructor + · rintro ⟨i, rfl⟩ + rw [← hf.2.2.2] + exact ⟨σ i, rfl⟩ + · intro hv + rw [← hf.2.2.2] at hv + obtain ⟨i, rfl⟩ := hv + exact ⟨σ.symm i, by simp⟩ + +/-- Any tail vertex other than the first can be made last while the +prefix and the first tail vertex stay fixed. -/ +theorem spanningPath_swap_tail {V : Type*} [Fintype V] + {G : SimpleGraph V} {x : V} {W E : Finset V} {r : ℕ} + {f : Fin (r + 1) → V} (hf : IsSpanningPath G x W f) + (t : Fin r) (hfinal : ∀ i : Fin (r + 1), f i ∈ E ↔ t.val < i.val) + (hclique : G.IsClique (E : Set V)) (i : Fin (r + 1)) + (hi : t.val + 1 < i.val) : + ∃ g : Fin (r + 1) → V, IsSpanningPath G x W g ∧ + g (Fin.last r) = f i ∧ + ∀ j : Fin (r + 1), j.val ≤ t.val + 1 → g j = f j := by + classical + let σ := Equiv.swap i (Fin.last r) + have hfix : ∀ j : Fin (r + 1), j.val ≤ t.val + 1 → σ j = j := by + intro j hj + apply Equiv.swap_apply_of_ne_of_ne + · intro h + have := congrArg Fin.val h + omega + · intro h + have := congrArg Fin.val h + simp only [Fin.val_last] at this + have := i.isLt + omega + exact ⟨f ∘ σ, spanningPath_permute_tail hf t hfinal hclique σ hfix, + by simp [σ], fun j hj => congrArg f (hfix j hj)⟩ + +/-- Every endpoint except the first vertex of the fixed clique tail +has no neighbour in the preceding prefix except its attachment vertex. -/ +theorem partial_endpoint_attachment {V : Type*} [Fintype V] + {G : SimpleGraph V} {x : V} {W : Finset V} {r : ℕ} + {f : Fin (r + 1) → V} (hf : IsSpanningPath G x W f) + (t : Fin r) + (hfinal : ∀ i : Fin (r + 1), f i ∈ pathEnds G x W r ↔ t.val < i.val) + (hclique : G.IsClique (pathEnds G x W r : Set V)) + (hneighbors : ∀ e ∈ pathEnds G x W r, ∀ v, G.Adj e v → v ∈ W) : + ∀ w ∈ pathEnds G x W r, w ≠ f t.succ → + ∀ v, G.Adj w v → v ∈ pathEnds G x W r ∨ v = f t.castSucc := by + intro w hw hwfirst v hwv + have hwW : w ∈ (W : Set V) := pathEnds_subset G x W r hw + rw [← hf.2.2.2] at hwW + obtain ⟨i, hiw⟩ := hwW + have hitail : t.val < i.val := (hfinal i).mp (hiw ▸ hw) + have hi : t.val + 1 < i.val := by + have hneq : i ≠ t.succ := fun h => hwfirst (hiw.symm.trans (congrArg f h)) + have hval : i.val ≠ t.val + 1 := fun h => hneq (Fin.ext h) + omega + obtain ⟨g, hg, hglast, hgfix⟩ := spanningPath_swap_tail hf t hfinal hclique i hi + by_cases hv : v ∈ pathEnds G x W r + · exact Or.inl hv + · right + have hvW : v ∈ (W : Set V) := hneighbors w hw v hwv + rw [← hf.2.2.2] at hvW + obtain ⟨j, hjv⟩ := hvW + have hjbefore : j.val ≤ t.val := by + by_contra hn + exact hv (hjv ▸ (hfinal j).mpr (by omega)) + by_cases heq : j.val = t.val + · have hj : j = t.castSucc := Fin.ext heq + exact hjv.symm.trans (congrArg f hj) + · let p : Fin r := ⟨j.val, by have := t.isLt; omega⟩ + have hgp : g p.castSucc = v := (hgfix p.castSucc (by dsimp [p]; omega)).trans + ((congrArg f (Fin.ext rfl)).trans hjv) + have hrot := successor_mem_pathEnds hg p (by rw [hglast, hiw, hgp]; exact hwv) + rw [hgfix p.succ (by dsimp [p]; omega)] at hrot + have hbound := (hfinal p.succ).mp hrot + dsimp [p] at hbound + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ExteriorCounts.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ExteriorCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..02ea30c07d8ec13ad1c164ed80c6eb0459fc0776 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ExteriorCounts.lean @@ -0,0 +1,70 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiveCycleGeometry + +namespace OAI + +/-! Expansion counts after deleting the clique neighbours of an independent set. -/ + +namespace CycleClique.Construction +theorem exterior_closed_expansion_bound {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q A I B : Finset V} {k : ℕ} + (hexpand : k * I.card + 1 ≤ (closedNeighborhood G I).card) + (hIA : I ⊆ A) (hAQ : Disjoint A Q) + (hcover : ∀ i ∈ I, ∀ q ∈ Q, G.Adj i q → q ∈ B) : + k * I.card + 1 ≤ B.card + (exteriorClosedNeighborhood G Q A).card := by + classical + have hsub : closedNeighborhood G I ⊆ B ∪ exteriorClosedNeighborhood G Q A := by + intro v hv + by_cases hvQ : v ∈ Q + · apply Finset.mem_union_left + rcases mem_closedNeighborhood.mp hv with hvI | ⟨i, hi, hiv⟩ + · exact False.elim (Finset.disjoint_left.mp hAQ (hIA hvI) hvQ) + · exact hcover i hi v hvQ hiv + · apply Finset.mem_union_right + apply mem_exteriorClosedNeighborhood.mpr + refine ⟨?_, hvQ⟩ + rcases mem_closedNeighborhood.mp hv with hvI | ⟨i, hi, hiv⟩ + · exact Or.inl (hIA hvI) + · exact Or.inr ⟨i, hIA hi, hiv⟩ + exact hexpand.trans ((Finset.card_le_card hsub).trans (Finset.card_union_le _ _)) + +theorem one_clique_neighbor_expansion {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q A : Finset V} {q : V} {k : ℕ} + (hA : A.Nonempty) (hAQ : Disjoint A Q) + (hcover : ∀ a ∈ A, ∀ x ∈ Q, G.Adj a x → x = q) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) : + k * (G.induce (A : Set V)).indepNum ≤ (exteriorClosedNeighborhood G Q A).card := by + classical + let I := independentOn G A + have hIcard : I.card = (G.induce (A : Set V)).indepNum := independentOn_card G A + have hpos : 0 < (G.induce (A : Set V)).indepNum := by + let : Nonempty A := hA.to_subtype + exact indepNum_pos_of_nonempty _ + have hIne : I.Nonempty := Finset.card_pos.mp (by omega) + have h := exterior_closed_expansion_bound (B := {q}) + (hexpand I (independentOn_independent G A) hIne) (independentOn_subset G A) hAQ + (fun i hi x hx hadj => Finset.mem_singleton.mpr + (hcover i (independentOn_subset G A hi) x hx hadj)) + rw [Finset.card_singleton, hIcard] at h + omega + +theorem exterior_disjoint_sum_bound {V ι : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q : Finset V} (F : Finset ι) (A : ι → Finset V) + (hdis : (F : Set ι).PairwiseDisjoint (fun i => exteriorClosedNeighborhood G Q (A i))) : + Q.card + ∑ i ∈ F, (exteriorClosedNeighborhood G Q (A i)).card ≤ Fintype.card V := by + classical + let C := F.biUnion (fun i => exteriorClosedNeighborhood G Q (A i)) + have hCcard : C.card = ∑ i ∈ F, (exteriorClosedNeighborhood G Q (A i)).card := + Finset.card_biUnion hdis + have hQC : Disjoint Q C := by + apply Finset.disjoint_left.mpr + intro x hx hxC + obtain ⟨i, _, hi⟩ := Finset.mem_biUnion.mp hxC + exact (mem_exteriorClosedNeighborhood.mp hi).2 hx + have hbound : (Q ∪ C).card ≤ Fintype.card V := by + simpa only [Finset.card_univ] using Finset.card_le_card (Finset.subset_univ (Q ∪ C)) + rwa [Finset.card_union_of_disjoint hQC, hCcard] at hbound + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FastCertificateMatrix.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FastCertificateMatrix.lean new file mode 100644 index 0000000000000000000000000000000000000000..853eef7c3851d408eadd58732ce05987c76ff007 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FastCertificateMatrix.lean @@ -0,0 +1,114 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TemplateMatrix +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RequiredCertificates +import Mathlib.Data.Nat.Bitwise + +namespace OAI + +/-! Natural-number masks provide a compact, checked representation of +finite forbidden matrices. The supplied masks are validated separately. -/ + +namespace CycleClique.Construction +/-- Decode the first `w` bits of a natural-number mask. -/ +def decode (w b : ℕ) : Finset ℕ := + (Finset.range w).filter (fun d => Nat.testBit b d) + +@[simp] theorem decode_zero (w : ℕ) : decode w 0 = ∅ := by + simp [decode] + +theorem decode_or (w b c : ℕ) : decode w (b ||| c) = decode w b ∪ decode w c := by + ext d + simp [decode, Nat.testBit_or, and_or_left] + +def templateMaskEntry {n : ℕ} (T : TemplateData (Fin n)) (b : ℕ) : + Fin n → Fin n → ℕ := fun i j => + if (i = T.x ∧ j = T.y) ∨ (i = T.y ∧ j = T.x) then b else 0 + +def templateMaskMatrix {n : ℕ} : + List (TemplateData (Fin n) × ℕ) → Fin n → Fin n → ℕ + | [] => fun _ _ => 0 + | Tb :: E => fun i j => templateMaskEntry Tb.1 Tb.2 i j ||| templateMaskMatrix E i j + +theorem templateMaskMatrix_append {n : ℕ} + (A B : List (TemplateData (Fin n) × ℕ)) : + templateMaskMatrix (A ++ B) = + fun i j => templateMaskMatrix A i j ||| templateMaskMatrix B i j := by + induction A with + | nil => + funext i j + simp only [List.nil_append, templateMaskMatrix, Nat.zero_or] + | cons Tb A ih => + funext i j + simp only [List.cons_append, templateMaskMatrix, ih, Nat.or_assoc] + +theorem decode_templateMaskEntry {n w b : ℕ} {T : TemplateData (Fin n)} + (hdecode : decode w b = Finset.Icc T.lo T.hi) (i j : Fin n) : + decode w (templateMaskEntry T b i j) = templateEntryMatrix T i j := by + unfold templateMaskEntry templateEntryMatrix + split_ifs + · exact hdecode + · exact decode_zero w + +theorem decode_templateMaskMatrix {n : ℕ} (w : ℕ) + (E : List (TemplateData (Fin n) × ℕ)) + (hE : ∀ Tb ∈ E, decode w Tb.2 = Finset.Icc Tb.1.lo Tb.1.hi) : + (fun i j => decode w (templateMaskMatrix E i j)) = templateMatrix (E.map Prod.fst) := by + induction E with + | nil => + funext i j + exact decode_zero w + | cons Tb E ih => + have hT := hE Tb (by simp) + have htail := ih (fun Tc hTc => hE Tc (by simp [hTc])) + funext i j + change decode w (templateMaskEntry Tb.1 Tb.2 i j ||| templateMaskMatrix E i j) = + templateEntryMatrix Tb.1 i j ∪ templateMatrix (E.map Prod.fst) i j + rw [decode_or, decode_templateMaskEntry hT, congrFun (congrFun htail i) j] + +def requiredMaskEntry {n : ℕ} (p : RequiredPathData (Fin n)) (b : ℕ) : + Fin n → Fin n → ℕ := fun i j => + if (i = p.x ∧ j = p.y) ∨ (i = p.y ∧ j = p.x) then b else 0 + +def requiredMaskMatrix {n : ℕ} : + List (RequiredPathData (Fin n) × ℕ) → Fin n → Fin n → ℕ + | [] => fun _ _ => 0 + | pb :: E => fun i j => requiredMaskEntry pb.1 pb.2 i j ||| requiredMaskMatrix E i j + +theorem requiredMaskMatrix_append {n : ℕ} + (A B : List (RequiredPathData (Fin n) × ℕ)) : + requiredMaskMatrix (A ++ B) = + fun i j => requiredMaskMatrix A i j ||| requiredMaskMatrix B i j := by + induction A with + | nil => + funext i j + simp only [List.nil_append, requiredMaskMatrix, Nat.zero_or] + | cons pb A ih => + funext i j + simp only [List.cons_append, requiredMaskMatrix, ih, Nat.or_assoc] + +theorem decode_requiredMaskEntry {n w b : ℕ} (k : ℕ) {p : RequiredPathData (Fin n)} + (hdecode : decode w b = {p.parameter k}) (i j : Fin n) : + decode w (requiredMaskEntry p b i j) = requiredEntryMatrix k p i j := by + unfold requiredMaskEntry requiredEntryMatrix + split_ifs + · exact hdecode + · exact decode_zero w + +theorem decode_requiredMaskMatrix {n : ℕ} (w k : ℕ) + (E : List (RequiredPathData (Fin n) × ℕ)) + (hE : ∀ pb ∈ E, decode w pb.2 = {pb.1.parameter k}) : + (fun i j => decode w (requiredMaskMatrix E i j)) = requiredMatrix k (E.map Prod.fst) := by + induction E with + | nil => + funext i j + exact decode_zero w + | cons pb E ih => + have hp := hE pb (by simp) + have htail := ih (fun pc hpc => hE pc (by simp [hpc])) + funext i j + change decode w (requiredMaskEntry pb.1 pb.2 i j ||| requiredMaskMatrix E i j) = + requiredEntryMatrix k pb.1 i j ∪ requiredMatrix k (E.map Prod.fst) i j + rw [decode_or, decode_requiredMaskEntry k hp, congrFun (congrFun htail i) j] + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FastLayoutGraph.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FastLayoutGraph.lean new file mode 100644 index 0000000000000000000000000000000000000000..73ff0586c678a426fd41cfc12438255f7b029264 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FastLayoutGraph.lean @@ -0,0 +1,35 @@ +import Mathlib.Combinatorics.SimpleGraph.Basic + +namespace OAI + +/-! A checked adjacency table gives a computable graph presentation whose +edge tests require only two array lookups. -/ + +namespace CycleClique.Construction +def adjacencyTableLookup (A : Array (Array Bool)) (i j : ℕ) : Bool := + (A.getD i #[]).getD j false + +/-- Present `H` by a separately checked finite adjacency table. -/ +def adjacencyTableGraph {n : ℕ} (H : SimpleGraph (Fin n)) + (A : Array (Array Bool)) + (hEq : ∀ i j : Fin n, H.Adj i j ↔ adjacencyTableLookup A i.val j.val = true) : + SimpleGraph (Fin n) where + Adj i j := adjacencyTableLookup A i.val j.val = true + symm := ⟨fun i j hij => (hEq j i).mp ((hEq i j).mpr hij).symm⟩ + loopless := ⟨fun i hii => H.irrefl ((hEq i i).mpr hii)⟩ + +instance {n : ℕ} (H : SimpleGraph (Fin n)) (A : Array (Array Bool)) + (hEq : ∀ i j : Fin n, H.Adj i j ↔ adjacencyTableLookup A i.val j.val = true) : + DecidableRel (adjacencyTableGraph H A hEq).Adj := + fun i j => inferInstanceAs (Decidable (adjacencyTableLookup A i.val j.val = true)) + +theorem adjacencyTableGraph_eq {n : ℕ} (H : SimpleGraph (Fin n)) + (A : Array (Array Bool)) + (hEq : ∀ i j : Fin n, H.Adj i j ↔ adjacencyTableLookup A i.val j.val = true) : + adjacencyTableGraph H A hEq = H := by + ext i j + exact (hEq i j).symm + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FastMatrixRows.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FastMatrixRows.lean new file mode 100644 index 0000000000000000000000000000000000000000..3822b37824a1be20d13410f25698eb0793965221 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FastMatrixRows.lean @@ -0,0 +1,52 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FastCertificateMatrix + +namespace OAI + +/-! A matrix row depends only on certificates incident with its index. -/ + +namespace CycleClique.Construction +def templateIncident {n : ℕ} (i : Fin n) (Tb : TemplateData (Fin n) × ℕ) : Bool := + decide (i = Tb.1.x ∨ i = Tb.1.y) + +theorem templateMaskMatrix_filter_row {n : ℕ} + (E : List (TemplateData (Fin n) × ℕ)) (i j : Fin n) : + templateMaskMatrix (E.filter (templateIncident i)) i j = templateMaskMatrix E i j := by + induction E with + | nil => rfl + | cons Tb E ih => + by_cases h : i = Tb.1.x ∨ i = Tb.1.y + · have hh : templateIncident i Tb = true := by simp [templateIncident, h] + simp only [List.filter_cons, hh, ite_true, templateMaskMatrix, ih] + · have hh : templateIncident i Tb = false := by simp [templateIncident, h] + have he : templateMaskEntry Tb.1 Tb.2 i j = 0 := by + simp only [templateMaskEntry] + split_ifs with he + · exact False.elim (h (he.elim (fun hx => Or.inl hx.1) (fun hy => Or.inr hy.1))) + · rfl + simp only [List.filter_cons, hh, Bool.false_eq_true, ite_false, templateMaskMatrix, he, + Nat.zero_or, ih] + +def requiredIncident {n : ℕ} (i : Fin n) (p : RequiredPathData (Fin n)) : Bool := + decide (i = p.x ∨ i = p.y) + +theorem requiredMatrix_filter_row {n : ℕ} (k : ℕ) + (E : List (RequiredPathData (Fin n))) (i j : Fin n) : + requiredMatrix k (E.filter (requiredIncident i)) i j = requiredMatrix k E i j := by + induction E with + | nil => rfl + | cons p E ih => + by_cases h : i = p.x ∨ i = p.y + · have hh : requiredIncident i p = true := by simp [requiredIncident, h] + simp only [List.filter_cons, hh, ite_true, requiredMatrix, ih] + · have hh : requiredIncident i p = false := by simp [requiredIncident, h] + have he : requiredEntryMatrix k p i j = ∅ := by + simp only [requiredEntryMatrix] + split_ifs with he + · exact False.elim (h (he.elim (fun hx => Or.inl hx.1) (fun hy => Or.inr hy.1))) + · rfl + simp only [List.filter_cons, hh, Bool.false_eq_true, ite_false, requiredMatrix, he, + Finset.empty_union, ih] + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteAttachments.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteAttachments.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d273db2cf38e84f551f4bc5e29885074ce498c2 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteAttachments.lean @@ -0,0 +1,111 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiniteBad + +namespace OAI + +/-! Hypothetical outside parameters zero and one become, respectively, a +required edge and a fresh common neighbor in a finite labelled state. -/ + +namespace CycleClique.Construction +variable {n : ℕ} + +def addedEdgeGraph (H : SimpleGraph (Fin n)) (i j : Fin n) : SimpleGraph (Fin n) where + Adj a b := a ≠ b ∧ (H.Adj a b ∨ (a = i ∧ b = j) ∨ (a = j ∧ b = i)) + symm := ⟨by + intro a b h + refine ⟨h.1.symm, ?_⟩ + rcases h.2 with h | h | h + · exact Or.inl h.symm + · exact Or.inr (Or.inr h.symm) + · exact Or.inr (Or.inl h.symm)⟩ + loopless := ⟨fun _ h => h.1 rfl⟩ + +instance (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] (i j : Fin n) : + DecidableRel (addedEdgeGraph H i j).Adj := fun _ _ => inferInstanceAs (Decidable (_ ∧ _)) + +def freshGraph (H : SimpleGraph (Fin n)) (i j : Fin n) : SimpleGraph (Fin (n + 1)) where + Adj := Fin.cases (Fin.cases False (fun b => b = i ∨ b = j)) + (fun a => Fin.cases (a = i ∨ a = j) (fun b => H.Adj a b)) + symm := ⟨by + intro a b + refine Fin.cases ?_ (fun a => ?_) a <;> refine Fin.cases ?_ (fun b => ?_) b + · exact id + · exact id + · exact id + · exact fun h => h.symm⟩ + loopless := ⟨by + intro a + refine Fin.cases ?_ (fun a => ?_) a + · exact id + · exact H.loopless.irrefl a⟩ + +instance (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] (i j : Fin n) : + DecidableRel (freshGraph H i j).Adj := by + intro a b + refine Fin.cases ?_ (fun a => ?_) a <;> refine Fin.cases ?_ (fun b => ?_) b <;> + dsimp only [freshGraph, Fin.cases_zero, Fin.cases_succ] <;> infer_instance + +def freshMatrix (M : ForbiddenMatrix n) : ForbiddenMatrix (n + 1) := + Fin.cases (fun _ => ∅) (fun a => Fin.cases ∅ (fun b => M a b)) + +variable {V : Type*} {G : SimpleGraph V} {H : SimpleGraph (Fin n)} + +def addedEdgeHom (f : H →g G) {i j : Fin n} (hij : G.Adj (f i) (f j)) : + addedEdgeGraph H i j →g G where + toFun := f + map_rel' := by + intro a b h + rcases h.2 with h | ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩ + · exact f.map_adj h + · exact hij + · exact hij.symm + +def freshHom (f : H →g G) {i j : Fin n} (z : V) + (hiz : G.Adj (f i) z) (hjz : G.Adj (f j) z) : freshGraph H i j →g G where + toFun := Fin.cases z f + map_rel' := by + intro a b + refine Fin.cases ?_ (fun a => ?_) a <;> refine Fin.cases ?_ (fun b => ?_) b + · exact False.elim + · intro h; rcases h with rfl | rfl; exact hiz.symm; exact hjz.symm + · intro h; rcases h with rfl | rfl; exact hiz; exact hjz + · exact f.map_adj + +theorem freshHom_injective [DecidableEq V] (f : H →g G) (hf : Function.Injective f) + {X : Finset V} (hfX : ∀ i, f i ∈ X) {i j : Fin n} {z : V} + (hz : z ∉ X) (hiz : G.Adj (f i) z) (hjz : G.Adj (f j) z) : + Function.Injective (freshHom f z hiz hjz) := by + intro a b + refine Fin.cases ?_ (fun a => ?_) a <;> refine Fin.cases ?_ (fun b => ?_) b + · exact fun _ => rfl + · intro h + change z = f b at h + exact False.elim (hz (h.symm ▸ hfX b)) + · intro h + change f a = z at h + exact False.elim (hz (h ▸ hfX a)) + · intro h; exact congrArg Fin.succ (hf h) + +theorem freshHom_mem [DecidableEq V] (f : H →g G) {X : Finset V} + (hfX : ∀ i, f i ∈ X) {i j : Fin n} {z : V} + (hiz : G.Adj (f i) z) (hjz : G.Adj (f j) z) : + ∀ a, freshHom f z hiz hjz a ∈ insert z X := by + intro a + refine Fin.cases ?_ (fun a => ?_) a + · exact Finset.mem_insert_self _ _ + · exact Finset.mem_insert_of_mem (hfX a) + +theorem freshMatrix_sound [DecidableEq V] (f : H →g G) {X : Finset V} + {M : ForbiddenMatrix n} (hM : M.Sound G X f) {i j : Fin n} {z : V} + (hiz : G.Adj (f i) z) (hjz : G.Adj (f j) z) : + (freshMatrix M).Sound G (insert z X) (freshHom f z hiz hjz) := by + have hbig := hM.enlarge_ground (Finset.subset_insert z X) + intro a b + refine Fin.cases ?_ (fun a => ?_) a <;> refine Fin.cases ?_ (fun b => ?_) b + · intro d hd; exact False.elim (Finset.notMem_empty d hd) + · intro d hd; exact False.elim (Finset.notMem_empty d hd) + · intro d hd; exact False.elim (Finset.notMem_empty d hd) + · exact hbig a b + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteBad.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteBad.lean new file mode 100644 index 0000000000000000000000000000000000000000..179b55645cdd85194cdc6936556db24427c8e54c --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteBad.lean @@ -0,0 +1,47 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PackingCertificate +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RequiredCertificates + +namespace OAI + +/-! The terminal certificate for a finite state is either a required edge +whose outside parameter zero is forbidden, or an excessive packing. -/ + +namespace CycleClique.Construction +structure BadData (n : ℕ) where + edge : Option (Fin n × Fin n) + packing : Finset (Fin n × ℕ) + deriving DecidableEq + +def BadData.Check {n : ℕ} (H : SimpleGraph (Fin n)) (M : ForbiddenMatrix n) + (k t : ℕ) (b : BadData n) : Prop := + match b.edge with + | some (i, j) => H.Adj i j ∧ 0 ∈ M i j + | none => PackingCheck M k t b.packing + +instance {n : ℕ} (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] + (M : ForbiddenMatrix n) (k t : ℕ) (b : BadData n) : Decidable (b.Check H M k t) := by + unfold BadData.Check + split <;> infer_instance + +variable {V : Type} [Fintype V] {G : SimpleGraph V} + +theorem BadData.false_of_check (hCE : CEAlphaTwo) {n k t : ℕ} + (hk : 5 ≤ k) (ht : 1 ≤ t) (hcycle : ¬ HasCycle G (k + 1)) + (hclique : G.cliqueNum ≤ t) (hbound : IndependenceBound G k) + {H : SimpleGraph (Fin n)} (f : H →g G) (hf : Function.Injective f) + {X : Finset V} (hfX : ∀ i, f i ∈ X) (hX : X.card = n) + {M : ForbiddenMatrix n} (hM : M.Sound G X f) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (b : BadData n) (hb : b.Check H M k t) : False := by + cases hbe : b.edge with + | none => + exact packingCheck_false hCE hk ht hcycle hclique hbound hf hfX hX hM hexpand + b.packing (by simpa only [Check, hbe] using hb) + | some ij => + have hh : H.Adj ij.1 ij.2 ∧ 0 ∈ M ij.1 ij.2 := by simpa only [Check, hbe] using hb + exact hM.no_required_edge hh.2 (f.map_adj hh.1) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteBallBounds.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteBallBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..c0b7a1586215a557259d005a5cc8d190795dbf0e --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteBallBounds.lean @@ -0,0 +1,115 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.BallRecurrence +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OutsidePathRules + +namespace OAI + +/-! Soundness of the finite checker's numerical ball recurrence on labelled +ground vertices. A matrix entry records a proved forbidden outside parameter. -/ + +namespace CycleClique.Construction +abbrev ForbiddenMatrix (n : ℕ) := Fin n → Fin n → Finset ℕ + +def ForbiddenMatrix.Sound {V : Type*} {n : ℕ} (M : ForbiddenMatrix n) + (G : SimpleGraph V) (X : Finset V) (f : Fin n → V) : Prop := + ∀ i j d, d ∈ M i j → ¬ OutsidePath G (X : Set V) (f i) (f j) d + +def zeroAvoidSet {n : ℕ} (M : ForbiddenMatrix n) (i : Fin n) : Finset (Fin n) := + Finset.univ.filter (fun j => i ≠ j ∧ 0 ∈ M i j) + +def ballAvoidSet {n : ℕ} (M : ForbiddenMatrix n) (i : Fin n) (b : ℕ) : Finset (Fin n) := + Finset.univ.filter (fun j => i ≠ j ∧ Finset.Icc 1 b ⊆ M i j) + +def indexedBallState {n : ℕ} (M : ForbiddenMatrix n) (k t : ℕ) (i : Fin n) : + ℕ → ℕ × ℕ + | 0 => + let b := k + 1 + (zeroAvoidSet M i).card - n + (b, if t ≤ b then 2 else 1) + | r + 1 => + let prev := indexedBallState M k t i r + let T := (ballAvoidSet M i (r + 1)).card + (nextBallSize k n T prev.1 prev.2, nextBallWeight k n t T prev.1 prev.2) + +theorem indexedBallState_positive {n : ℕ} (M : ForbiddenMatrix n) (k t : ℕ) + (i : Fin n) (hbase : 0 < k + 1 + (zeroAvoidSet M i).card - n) (r : ℕ) : + 0 < (indexedBallState M k t i r).1 ∧ 0 < (indexedBallState M k t i r).2 := by + induction r with + | zero => + dsimp only [indexedBallState] + exact ⟨hbase, by split_ifs <;> omega⟩ + | succ r ih => + dsimp only [indexedBallState, nextBallSize, nextBallWeight, ordinaryBallWeight] + constructor + · exact ih.1.trans_le (le_max_left _ _) + · split_ifs <;> omega + +variable {V : Type} [Fintype V] {G : SimpleGraph V} + +theorem indexedBallState_sound (hCE : CEAlphaTwo) {n k t : ℕ} + (hk : 5 ≤ k) (ht : 1 ≤ t) (hcycle : ¬ HasCycle G (k + 1)) + (hclique : G.cliqueNum ≤ t) {X : Finset V} {f : Fin n → V} + (hf : Function.Injective f) (hfX : ∀ i, f i ∈ X) (hX : X.card = n) + {M : ForbiddenMatrix n} (hM : M.Sound G X f) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (i : Fin n) (hbase : 0 < k + 1 + (zeroAvoidSet M i).card - n) (r : ℕ) : + (indexedBallState M k t i r).1 ≤ (outsideBallFinset G X (f i) r).card ∧ + HasIndependent (G.induce (outsideBallFinset G X (f i) r : Set V)) + (indexedBallState M k t i r).2 := by + classical + induction r with + | zero => + let A := (zeroAvoidSet M i).image f + have hAX : A ⊆ X := by + intro v hv + obtain ⟨j, _, rfl⟩ := Finset.mem_image.mp hv + exact hfX j + have hiA : f i ∉ A := by + intro hv + obtain ⟨j, hj, he⟩ := Finset.mem_image.mp hv + have hj' : i ≠ j ∧ 0 ∈ M i j := by + simpa only [zeroAvoidSet, Finset.mem_filter, Finset.mem_univ, true_and] using hj + exact hj'.1 (hf he).symm + have hanti : ∀ v ∈ A, ¬ G.Adj (f i) v := by + intro v hv + obtain ⟨j, hj, rfl⟩ := Finset.mem_image.mp hv + have hj' : i ≠ j ∧ 0 ∈ M i j := by + simpa only [zeroAvoidSet, Finset.mem_filter, Finset.mem_univ, true_and] using hj + exact fun hadj => hM i j 0 hj'.2 + (outsidePath_zero.mpr hadj) + have hAc : A.card = (zeroAvoidSet M i).card := Finset.card_image_of_injective _ hf + have hsingle : k + 1 ≤ (closedNeighborhood G {f i}).card := by + simpa only [Finset.card_singleton, Nat.mul_one] using + hexpand {f i} (by simp) (by simp) + have hb := outsideBall_initial_bounds (hfX i) hAX hiA hanti hclique hsingle + (by rw [hAc, hX]; exact hbase) + simpa only [indexedBallState, hAc, hX] using hb + | succ r ih => + let A := (ballAvoidSet M i (r + 1)).image f + have hAX : A ⊆ X := by + intro v hv + obtain ⟨j, _, rfl⟩ := Finset.mem_image.mp hv + exact hfX j + have hiA : f i ∉ A := by + intro hv + obtain ⟨j, hj, he⟩ := Finset.mem_image.mp hv + have hj' : i ≠ j ∧ Finset.Icc 1 (r + 1) ⊆ M i j := by + simpa only [ballAvoidSet, Finset.mem_filter, Finset.mem_univ, true_and] using hj + exact hj'.1 (hf he).symm + have hforbid : ∀ y ∈ A, ∀ d, 1 ≤ d → d ≤ r + 1 → + ¬ PositiveOutsidePath G (X : Set V) (f i) y d := by + intro y hy d hd hdb hp + obtain ⟨j, hj, rfl⟩ := Finset.mem_image.mp hy + have hj' : i ≠ j ∧ Finset.Icc 1 (r + 1) ⊆ M i j := by + simpa only [ballAvoidSet, Finset.mem_filter, Finset.mem_univ, true_and] using hj + exact hM i j d (hj'.2 (Finset.mem_Icc.mpr ⟨hd, hdb⟩)) + hp.toOutside + have hAc : A.card = (ballAvoidSet M i (r + 1)).card := + Finset.card_image_of_injective _ hf + have hpos := indexedBallState_positive M k t i hbase r + have hb := outsideBall_recursive_bounds hCE hk ht (hfX i) hAX hiA hcycle hclique + hpos.1 ih.1 hpos.2 ih.2 hexpand hforbid + simpa only [indexedBallState, hX, hAc] using hb + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteConstraints.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteConstraints.lean new file mode 100644 index 0000000000000000000000000000000000000000..8244af514abfd098c1330ccf63c8dde1455be91d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteConstraints.lean @@ -0,0 +1,71 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiniteBallBounds + +namespace OAI + +/-! Semantic rules for the finite checker's forbidden-parameter matrices: +inheritance, required-path closure and the two extension parameters. -/ + +namespace CycleClique.Construction +variable {V : Type*} {G : SimpleGraph V} {n : ℕ} + +theorem ForbiddenMatrix.Sound.of_subset {M N : ForbiddenMatrix n} + {X : Finset V} {f : Fin n → V} (hM : M.Sound G X f) + (hNM : ∀ i j, N i j ⊆ M i j) : N.Sound G X f := by + intro i j d hd + exact hM i j d (hNM i j hd) + +theorem ForbiddenMatrix.Sound.enlarge_ground {M : ForbiddenMatrix n} + {X Y : Finset V} {f : Fin n → V} (hM : M.Sound G X f) (hXY : X ⊆ Y) : + M.Sound G Y f := by + intro i j d hd + exact outsidePath_forbidden_enlargement hXY (hM i j d hd) + +theorem ForbiddenMatrix.Sound.union {M N : ForbiddenMatrix n} + {X : Finset V} {f : Fin n → V} (hM : M.Sound G X f) (hN : N.Sound G X f) : + ForbiddenMatrix.Sound (fun i j => M i j ∪ N i j) G X f := by + intro i j d hd + rcases Finset.mem_union.mp hd with hd | hd + · exact hM i j d hd + · exact hN i j d hd + +theorem ForbiddenMatrix.Sound.reverse {M : ForbiddenMatrix n} + {X : Finset V} {f : Fin n → V} (hM : M.Sound G X f) : + ForbiddenMatrix.Sound (fun i j => M j i) G X f := by + intro i j d hd hp + exact hM j i d hd hp.reverse + +theorem ForbiddenMatrix.Sound.no_required_edge {M : ForbiddenMatrix n} + {X : Finset V} {f : Fin n → V} (hM : M.Sound G X f) + {i j : Fin n} (hzero : 0 ∈ M i j) (hij : G.Adj (f i) (f j)) : False := + hM i j 0 hzero (outsidePath_zero.mpr hij) + +theorem required_indexed_path_forbids {H : SimpleGraph (Fin n)} + (f : H →g G) (hf : Function.Injective f) {X : Finset V} + (hfX : ∀ i, f i ∈ X) {i j : Fin n} {k : ℕ} + (hk : 3 ≤ k) (hcycle : ¬ HasCycle G (k + 1)) + (p : H.Walk i j) (hp : p.IsPath) (hpos : 1 ≤ p.length) (hbound : p.length ≤ k) : + ¬ OutsidePath G (X : Set V) (f i) (f j) (k - p.length) := by + have hmapX : ∀ v ∈ (p.map f).support, v ∈ (X : Set V) := by + intro v hv + rw [SimpleGraph.Walk.support_map] at hv + obtain ⟨a, _, rfl⟩ := List.mem_map.mp hv + exact hfX a + have hh := required_path_forbids hk hcycle (p.map f) (hp.map hf) hmapX + (by simpa only [SimpleGraph.Walk.length_map] using hpos) + (by simpa only [SimpleGraph.Walk.length_map] using hbound) + simpa only [SimpleGraph.Walk.length_map] using hh + +theorem outsidePath_one_iff_common_neighbor {X : Set V} {x y : V} (hxy : x ≠ y) : + OutsidePath G X x y 1 ↔ ∃ u, u ∉ X ∧ G.Adj x u ∧ G.Adj u y := by + constructor + · intro hp + obtain ⟨J, _, hlen, hout, hchain⟩ := hp.interior + obtain ⟨u, rfl⟩ := List.length_eq_one_iff.mp hlen + refine ⟨u, hout u (by simp), ?_⟩ + simpa using hchain + · rintro ⟨u, hu, hxu, huy⟩ + exact outsidePath_one_of_common_neighbor hxy hxu huy hu + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteLayout.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteLayout.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef7006499bbcb3625ddf3dfcdd01f6371eb112c8 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteLayout.lean @@ -0,0 +1,104 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ProfileMasks +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawEmbedding +import Mathlib.Data.List.OfFn + +namespace OAI + +/-! A finite layout is verified by its chain lengths, clique-position masks +and exhaustive indexing. Its realization then uses the actual chain vertices. -/ + +namespace CycleClique.Construction +variable {V W : Type*} + +theorem chainCollection_eq_of_flatten_lengths {C D : List (List V)} + (hf : C.flatten = D.flatten) (hl : C.map List.length = D.map List.length) : C = D := by + induction C generalizing D with + | nil => + cases D with + | nil => rfl + | cons d D => simp at hl + | cons c C ih => + cases D with + | nil => simp at hl + | cons d D => + have hlen : c.length = d.length := (List.cons.inj hl).1 + have htail := (List.cons.inj hl).2 + have heq : c ++ C.flatten = d ++ D.flatten := hf + obtain ⟨rfl, hr⟩ := List.append_inj heq hlen + exact congrArg (List.cons c) (ih hr htail) + +def layoutGraph [DecidableEq W] (Q : Finset W) (D : List (List W)) : SimpleGraph W where + Adj i j := i ≠ j ∧ ((i ∈ Q ∧ j ∈ Q) ∨ + ∃ l ∈ D, [i, j] <:+: l ∨ [j, i] <:+: l) + symm := ⟨by + intro i j h + refine ⟨h.1.symm, ?_⟩ + rcases h.2 with hQ | ⟨l, hl, he⟩ + · exact Or.inl hQ.symm + · exact Or.inr ⟨l, hl, he.symm⟩⟩ + loopless := ⟨by intro i h; exact h.1 rfl⟩ + +instance [DecidableEq W] (Q : Finset W) (D : List (List W)) : + DecidableRel (layoutGraph Q D).Adj := fun _ _ => inferInstanceAs (Decidable (_ ∧ _)) + +variable {G : SimpleGraph V} {Q : Finset V} + +theorem RawPathSystem.realize_layout (S : RawPathSystem G Q) {n : ℕ} + {P : List (List ℕ)} (hp : List.Forall₂ (AssignedAmounts Q) S.chains P) + (hne : ∀ l ∈ S.chains, l ≠ []) (hQ : G.IsClique (Q : Set V)) + (D : List (List (Fin n))) (Q₀ : Finset (Fin n)) + (hindex : D.flatten = List.finRange n) + (hlength : D.map List.length = P.map (fun w => w.sum + w.length + 1)) + (hmask : D.map (cliqueMask Q₀) = P.map profileMask) : + ∃ f : Fin n → V, Function.Injective f ∧ + D.map (List.map f) = S.chains ∧ + (∀ i, f i ∈ Q ↔ i ∈ Q₀) ∧ + (∀ {i j}, (layoutGraph Q₀ D).Adj i j → G.Adj (f i) (f j)) := by + classical + have hactual : S.chains.map List.length = P.map (fun w => w.sum + w.length + 1) := profiles_lengths hp hne + have hlengths : D.map List.length = S.chains.map List.length := hlength.trans hactual.symm + have hN : S.chains.flatten.length = n := by + rw [List.length_flatten, ← hlengths, ← List.length_flatten, hindex, List.length_finRange] + subst n + let f : Fin S.chains.flatten.length → V := S.chains.flatten.get + have hf : Function.Injective f := S.flatten_nodup.injective_get + have hmap : D.map (List.map f) = S.chains := by + apply chainCollection_eq_of_flatten_lengths + · rw [← List.map_flatten, hindex] + exact List.map_get_finRange _ + · simpa only [List.map_map, Function.comp_def, List.length_map] using hlengths + have hmasks : S.chains.map (cliqueMask Q) = D.map (cliqueMask Q₀) := + (profiles_masks hp hne).trans hmask.symm + have hmembership : ∀ i, f i ∈ Q ↔ i ∈ Q₀ := by + have hh := (congrArg (fun C : List (List V) => + (C.map (cliqueMask Q)).flatten) hmap).trans (congrArg List.flatten hmasks) + simp only [cliqueMask, List.map_map, Function.comp_def, ← List.map_flatten, hindex] at hh + have hright : (D.map (cliqueMask Q₀)).flatten = + (List.finRange S.chains.flatten.length).map (fun i => decide (i ∈ Q₀)) := by + have hm : D.map (cliqueMask Q₀) = + D.map (fun l => l.map (fun i => decide (i ∈ Q₀))) := by + apply List.map_congr_left + intro l hl + exact cliqueMask_eq_map Q₀ l + rw [hm, ← List.map_flatten, hindex] + have hh' := hh.trans hright + intro i + have he := List.map_inj_left.mp hh' i (List.mem_finRange i) + exact decide_eq_decide.mp he + refine ⟨f, hf, hmap, hmembership, ?_⟩ + intro i j hij + rcases hij.2 with hijQ | ⟨l, hl, hijl⟩ + · exact hQ ((hmembership i).mpr hijQ.1) ((hmembership j).mpr hijQ.2) + (fun he => hij.1 (hf he)) + · have hpath : (l.map f).IsChain G.Adj := (S.paths _ (by + exact Eq.mp (congrArg (fun C : List (List V) => l.map f ∈ C) hmap) + (List.mem_map.mpr ⟨l, hl, rfl⟩))).2 + rcases hijl with hijl | hjil + · have hh := hpath.infix (hijl.map f) + exact (List.isChain_cons_cons.mp hh).1 + · have hh := hpath.infix (hjil.map f) + exact (List.isChain_cons_cons.mp hh).1.symm + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FinitePacking.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FinitePacking.lean new file mode 100644 index 0000000000000000000000000000000000000000..18e44440e424892b17415ef82634b1e6298b789b --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FinitePacking.lean @@ -0,0 +1,80 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiniteBallBounds +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PackingOptions + +namespace OAI + +/-! A finite weighted packing certificate is sound whenever its forbidden +matrix is sound. Its numerical sum is suitable for kernel computation. -/ + +namespace CycleClique.Construction +open scoped BigOperators + +def indexedOptionWeight {n : ℕ} (M : ForbiddenMatrix n) (k t : ℕ) + (p : Fin n × ℕ) : ℕ := + match p.2 with + | 0 => 1 + | r + 1 => (indexedBallState M k t p.1 r).2 + +def indexedOptionsCompatible {n : ℕ} (M : ForbiddenMatrix n) + (p q : Fin n × ℕ) : Prop := + p.1 ≠ q.1 ∧ + if p.2 = 0 ∧ q.2 = 0 then 0 ∈ M p.1 q.1 + else Finset.Icc 1 (p.2 + q.2) ⊆ M p.1 q.1 + +instance {n : ℕ} (M : ForbiddenMatrix n) (p q : Fin n × ℕ) : + Decidable (indexedOptionsCompatible M p q) := by + unfold indexedOptionsCompatible + infer_instance + +variable {V : Type} [Fintype V] {G : SimpleGraph V} + +theorem indexed_packing_bound (hCE : CEAlphaTwo) {n k t : ℕ} + (hk : 5 ≤ k) (ht : 1 ≤ t) (hcycle : ¬ HasCycle G (k + 1)) + (hclique : G.cliqueNum ≤ t) (hbound : IndependenceBound G k) + {X : Finset V} {f : Fin n → V} (hf : Function.Injective f) + (hfX : ∀ i, f i ∈ X) (hX : X.card = n) + {M : ForbiddenMatrix n} (hM : M.Sound G X f) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (I : Finset (Fin n × ℕ)) + (hbase : ∀ p ∈ I, p.2 ≠ 0 → 0 < k + 1 + (zeroAvoidSet M p.1).card - n) + (hcompat : ∀ p ∈ I, ∀ q ∈ I, p ≠ q → indexedOptionsCompatible M p q) : + (∑ p ∈ I, indexedOptionWeight M k t p) ≤ k := by + classical + have hinj : Function.Injective (fun p : I => f p.val.1) := by + intro p q he + by_contra hn + have hne : p.val ≠ q.val := by intro he; exact hn (Subtype.ext he) + exact (hcompat p p.property q q.property hne).1 (hf he) + have hweight : ∀ p : I, HasIndependent + (G.induce (packingRegion G X (f p.val.1) p.val.2 : Set V)) + (indexedOptionWeight M k t p.val) := by + intro p + cases hr : p.val.2 with + | zero => + simp only [indexedOptionWeight, hr, packingRegion] + exact hasIndependent_one_of_nonempty (by simp) + | succ r => + have hb := indexedBallState_sound hCE hk ht hcycle hclique hf hfX hX hM hexpand + p.val.1 (hbase p p.property (by omega)) r + simpa only [indexedOptionWeight, hr, packingRegion] using hb.2 + have hsep : ∀ p q : I, p ≠ q → + PackingCompatible G (X : Set V) (f p.val.1) p.val.2 (f q.val.1) q.val.2 := by + intro p q hpq + have hne : p.val ≠ q.val := by intro he; exact hpq (Subtype.ext he) + have hc := (hcompat p p.property q q.property hne).2 + unfold PackingCompatible + split_ifs with hzero + · simp only [hzero] at hc + exact hM p.val.1 q.val.1 0 hc + · simp only [hzero, ↓reduceIte] at hc + intro d hd hdb + exact hM p.val.1 q.val.1 d (hc (Finset.mem_Icc.mpr ⟨hd, hdb⟩)) + have hp := packing_test hbound X (fun p : I => f p.val.1) + (fun p => p.val.2) (fun p => indexedOptionWeight M k t p.val) + hinj (fun p => hfX p.val.1) hweight hsep + simpa only [Finset.sum_coe_sort] using hp + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteRangeReduction.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteRangeReduction.lean new file mode 100644 index 0000000000000000000000000000000000000000..03fbfdcb12f1c2ea0864a79bf236751d2d8172b6 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteRangeReduction.lean @@ -0,0 +1,33 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FullLargeClique +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalContradiction + +namespace OAI + +/-! After the proved large-clique contradiction, every remaining expanded +counterexample lies in the finite parameter range used by the certificates. -/ + +namespace CycleClique.Construction +open scoped Classical + +theorem finite_range_clique_bounds (hCE : CEAlphaTwo) + {V : Type} [Fintype V] {G : SimpleGraph V} {k a : ℕ} + (hk : 5 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) + (hcard : Fintype.card V = k * a + 1) (hI : IndependenceBound G a) + (hcycle : ¬ HasCycle G (k + 1)) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) : + k ≤ 17 ∧ 3 ≤ G.cliqueNum ∧ G.cliqueNum ≤ min k 8 ∧ k / 2 ≤ G.cliqueNum := by + classical + obtain ⟨hlo, hhi⟩ := large_clique_bounds (by omega) ha hak hcard hI hcycle hexpand + have hsmall : G.cliqueNum ≤ 8 := by + by_contra hn + obtain ⟨Q, hQ⟩ := G.exists_isNClique_cliqueNum + have hQcard := hQ.card_eq + obtain ⟨S, hopt⟩ := ExpandedPathSystem.exists_optimal G Q k + exact hopt.terminal_contradiction hCE (by omega) (by omega) (by omega) + hQ.isClique hcycle (by omega) (fun I hi => (hI I hi).trans hak) hexpand + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteTemplates.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteTemplates.lean new file mode 100644 index 0000000000000000000000000000000000000000..21bff7e908561a2deb3b0abe6ad08ceb863c49b1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteTemplates.lean @@ -0,0 +1,154 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TemplateEmbedding +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiniteConstraints + +namespace OAI + +/-! Computable validation of explicit initial-rule templates. Validation +checks paths and disjointness directly rather than trusting a forest search. -/ + +namespace CycleClique.Construction +variable {W V : Type*} + +theorem chainCliqueCount_filter [DecidableEq W] (Q₀ : Finset W) (l : List W) : + chainCliqueCount Q₀ l = (l.filter (fun v => decide (v ∈ Q₀))).length := by + induction l with + | nil => rfl + | cons x l ih => + rw [chainCliqueCount_cons, ih] + by_cases hx : x ∈ Q₀ <;> simp [hx, Nat.add_comm] + +theorem chainOutsideCount_filter [DecidableEq W] (Q₀ : Finset W) (l : List W) : + chainOutsideCount Q₀ l = (l.filter (fun v => decide (v ∉ Q₀))).length := by + classical + unfold chainOutsideCount + congr 1 + apply List.filter_congr + intro v hv + exact congrArg (fun h => @decide (v ∉ Q₀) h) (Subsingleton.elim _ _) + +def RawChainsValid (H : SimpleGraph W) (Q₀ : Finset W) (C : List (List W)) : Prop := + C.flatten.Nodup ∧ ∀ l ∈ C, + l.IsChain H.Adj ∧ + (∀ v ∈ l.head?, v ∈ Q₀) ∧ (∀ v ∈ l.getLast?, v ∈ Q₀) ∧ + l.IsChain (fun x y => ¬ (x ∈ Q₀ ∧ y ∈ Q₀)) + +instance [DecidableEq W] (H : SimpleGraph W) [DecidableRel H.Adj] + (Q₀ : Finset W) (C : List (List W)) : Decidable (RawChainsValid H Q₀ C) := + inferInstanceAs (Decidable (_ ∧ _)) + +def RawPathSystem.ofValid {H : SimpleGraph W} {Q₀ : Finset W} {C : List (List W)} + (h : RawChainsValid H Q₀ C) : RawPathSystem H Q₀ where + chains := C + paths := fun l hl => ⟨(List.nodup_flatten.mp h.1).1 l hl, (h.2 l hl).1⟩ + disjoint := (List.nodup_flatten.mp h.1).2 + endpoints := fun l hl => ⟨(h.2 l hl).2.1, (h.2 l hl).2.2.1⟩ + no_clique_steps := fun l hl => (h.2 l hl).2.2.2 + +structure TemplateData (W : Type*) where + x : W + y : W + rest : List (List W) + left : List W + right : List W + lo : ℕ + hi : ℕ + deriving DecidableEq, Repr + +namespace TemplateData + +variable [DecidableEq W] + +def oldVertices (T : TemplateData W) : List W := + T.rest.flatten ++ (T.left ++ T.x :: T.y :: T.right) + +def amount (Q₀ : Finset W) (T : TemplateData W) : ℕ := + (T.oldVertices.filter (fun v => decide (v ∉ Q₀))).length + +def assignedCount (Q₀ : Finset W) (T : TemplateData W) : ℕ := + (T.rest.map (fun l => (l.filter (fun v => decide (v ∈ Q₀))).length - 1)).sum + + (((T.left ++ T.x :: T.y :: T.right).filter (fun v => decide (v ∈ Q₀))).length - 1) + +def incidentBound (Q₀ : Finset W) (T : TemplateData W) : ℕ := + (T.oldVertices.filter (fun v => decide (v ∈ Q₀))).length + +def Valid (H : SimpleGraph W) (Q₀ : Finset W) (T : TemplateData W) : Prop := + RawChainsValid H Q₀ T.rest ∧ T.oldVertices.Nodup ∧ + (T.left ++ [T.x]).IsChain H.Adj ∧ (T.y :: T.right).IsChain H.Adj ∧ + (∀ v ∈ (T.left ++ [T.x]).head?, v ∈ Q₀) ∧ + (∀ v ∈ (T.y :: T.right).getLast?, v ∈ Q₀) ∧ + (T.left ++ [T.x]).IsChain (fun a b => ¬ (a ∈ Q₀ ∧ b ∈ Q₀)) ∧ + (T.y :: T.right).IsChain (fun a b => ¬ (a ∈ Q₀ ∧ b ∈ Q₀)) + +instance (H : SimpleGraph W) [DecidableRel H.Adj] (Q₀ : Finset W) (T : TemplateData W) : + Decidable (T.Valid H Q₀) := inferInstanceAs (Decidable (_ ∧ _)) + +def toTemplate {H : SimpleGraph W} {Q₀ : Finset W} (T : TemplateData W) + (h : T.Valid H Q₀) : OutsideTemplate H Q₀ T.x T.y where + rest := RawPathSystem.ofValid h.1 + left := T.left + right := T.right + nodup := h.2.1 + left_path := h.2.2.1 + right_path := h.2.2.2.1 + start := h.2.2.2.2.1 + finish := h.2.2.2.2.2.1 + left_steps := h.2.2.2.2.2.2.1 + right_steps := h.2.2.2.2.2.2.2 + +@[simp] theorem toTemplate_amount {H : SimpleGraph W} {Q₀ : Finset W} + (T : TemplateData W) (h : T.Valid H Q₀) : (T.toTemplate h).amount = T.amount Q₀ := by + exact chainOutsideCount_filter Q₀ T.oldVertices + +@[simp] theorem toTemplate_incidentBound {H : SimpleGraph W} {Q₀ : Finset W} + (T : TemplateData W) (h : T.Valid H Q₀) : + (T.toTemplate h).incidentBound = T.incidentBound Q₀ := by + exact chainCliqueCount_filter Q₀ T.oldVertices + +@[simp] theorem toTemplate_assignedCount {H : SimpleGraph W} {Q₀ : Finset W} + (T : TemplateData W) (h : T.Valid H Q₀) : + (T.toTemplate h).assignedCount = T.assignedCount Q₀ := by + change rawAssignedCount Q₀ T.rest + (chainCliqueCount Q₀ _ - 1) = _ + simp only [rawAssignedCount, chainCliqueCount_filter, assignedCount] + rfl + +def Check (H : SimpleGraph W) (Q₀ : Finset W) (k L e : ℕ) (T : TemplateData W) : Prop := + T.Valid H Q₀ ∧ 1 ≤ T.lo ∧ + L + (if e ≤ T.assignedCount Q₀ then 1 else 0) ≤ T.amount Q₀ + T.lo ∧ + T.amount Q₀ + T.hi + T.incidentBound Q₀ ≤ k + 1 + +instance (H : SimpleGraph W) [DecidableRel H.Adj] (Q₀ : Finset W) + (k L e : ℕ) (T : TemplateData W) : Decidable (T.Check H Q₀ k L e) := + inferInstanceAs (Decidable (_ ∧ _)) + +variable {G : SimpleGraph V} {Q : Finset V} {H : SimpleGraph W} {Q₀ : Finset W} + +theorem forbids {S : ExpandedPathSystem G Q} {k L e d : ℕ} (hopt : S.IsOptimal k) + (hk : 3 ≤ k) (hQk : Q.card ≤ k) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (ha : S.amount = L) (he : S.assignedCount = e) + (f : W → V) (hf : Function.Injective f) (hfQ : ∀ v, f v ∈ Q ↔ v ∈ Q₀) + (hfG : ∀ {i j}, H.Adj i j → G.Adj (f i) (f j)) + (hfX : ∀ i, f i ∈ Q ∨ f i ∈ S.vertices) + (T : TemplateData W) (hc : T.Check H Q₀ k L e) (hd : d ∈ Finset.Icc T.lo T.hi) : + ¬ OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) (f T.x) (f T.y) d := by + have hl := (Finset.mem_Icc.mp hd).1 + have hu := (Finset.mem_Icc.mp hd).2 + let U := (T.toTemplate hc.1).embed f hf hfQ hfG + have hUa : U.amount = T.amount Q₀ := by simp [U] + have hUe : U.assignedCount = T.assignedCount Q₀ := by simp [U] + have hUi : U.incidentBound = T.incidentBound Q₀ := by simp [U] + apply U.forbids hopt hk hQk hQ hcycle + · intro v hv + rw [OutsideTemplate.embed_oldVertices] at hv + obtain ⟨i, _, rfl⟩ := List.mem_map.mp hv + exact hfX i + · exact hc.2.1.trans hl + · rw [ha, he, hUa, hUe] + exact hc.2.2.1.trans (Nat.add_le_add_left hl _) + · rw [hUa, hUi] + have hh := hc.2.2.2 + omega + +end TemplateData +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleDisjointStructure.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleDisjointStructure.lean new file mode 100644 index 0000000000000000000000000000000000000000..f2a26c2e98ed1ea0b6d1f3f27cfb62b05c476e18 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleDisjointStructure.lean @@ -0,0 +1,89 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TriangleLabels + +namespace OAI + +/-! Disjoint triangle exterior classes are necessarily two-vertex cliques. -/ + +namespace CycleClique.Construction +theorem fiveCycle_disjoint_triangle_structure {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q : Finset V} (hQ : G.IsClique (Q : Set V)) (hQcard : Q.card = 3) + (hcycle : ¬ HasCycle G 5) (hω : G.cliqueNum ≤ 3) (horder : Fintype.card V ≤ 17) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + 4 * I.card + 1 ≤ (closedNeighborhood G I).card) + (hdis : ∀ x ∈ Q, ∀ y ∈ Q, x ≠ y → + Disjoint (exteriorNeighbors G Q x) (exteriorNeighbors G Q y)) + (q : Fin 3 → V) (hq : Function.Injective q) (hqQ : ∀ i, q i ∈ Q) : + ∀ i, (exteriorNeighbors G Q (q i)).card = 2 ∧ + G.IsClique (exteriorNeighbors G Q (q i) : Set V) := by + classical + let U := fun i => exteriorNeighbors G Q (q i) + let α := fun i => (G.induce (U i : Set V)).indepNum + let C := fun i => exteriorClosedNeighborhood G Q (U i) + have hlow : ∀ i, 2 ≤ (U i).card := by + intro i + have hs := hexpand {q i} (by simp) (by simp) + simp only [Finset.card_singleton, Nat.mul_one] at hs + have h := exteriorNeighbors_card_lower (hqQ i) hs + rw [hQcard] at h + change 5 ≤ 3 + (U i).card at h + omega + have hU : ∀ i, (U i).Nonempty := fun i => Finset.card_pos.mp (by have := hlow i; omega) + have hpos : ∀ i, 1 ≤ α i := by + intro i + let : Nonempty (U i) := (hU i).to_subtype + exact indepNum_pos_of_nonempty _ + have hcover : ∀ i u, u ∈ U i → ∀ x ∈ Q, G.Adj u x → x = q i := by + intro i u hu x hx hux + exact exterior_unique_clique_neighbor hdis (hqQ i) hu hx hux + have hAQ : ∀ i, Disjoint (U i) Q := by + intro i + apply Finset.disjoint_left.mpr + intro u hu huQ + exact (mem_exteriorNeighbors.mp hu).2 huQ + have hgrow : ∀ i, 4 * α i ≤ (C i).card := fun i => + one_clique_neighbor_expansion (hU i) (hAQ i) (hcover i) hexpand + have hCdis : ∀ i j, i ≠ j → Disjoint (C i) (C j) := by + intro i j hij + exact fiveCycle_exterior_closed_disjoint hQ (by omega) hcycle (hqQ i) (hqQ j) + (fun h => hij (hq h)) (fun _ h => h) (fun _ h => h) + (hdis _ (hqQ i) _ (hqQ j) (fun h => hij (hq h))) + have hsum := exterior_disjoint_sum_bound Finset.univ U (fun i _ j _ hij => hCdis i j hij) + rw [hQcard] at hsum + change 3 + ∑ i : Fin 3, (C i).card ≤ Fintype.card V at hsum + have hsum' : (C 0).card + (C 1).card + (C 2).card ≤ 14 := by + rw [Fin.sum_univ_three] at hsum + omega + have hα0 : α 0 ≤ 1 := by + have := hgrow 0; have := hgrow 1; have := hgrow 2 + have := hpos 1; have := hpos 2 + omega + have hα1 : α 1 ≤ 1 := by + have := hgrow 0; have := hgrow 1; have := hgrow 2 + have := hpos 0; have := hpos 2 + omega + have hα2 : α 2 ≤ 1 := by + have := hgrow 0; have := hgrow 1; have := hgrow 2 + have := hpos 0; have := hpos 1 + omega + have hα : ∀ i, α i ≤ 1 := by + intro i + fin_cases i + · exact hα0 + · exact hα1 + · exact hα2 + intro i + have hcomplete := complete_of_indepNum_le_one (hα i) + have hclique : G.IsClique (U i : Set V) := by + intro u hu v hv huv + have h : (G.induce (U i : Set V)).Adj ⟨u, hu⟩ ⟨v, hv⟩ := by + rw [hcomplete] + exact fun he => huv (congrArg Subtype.val he) + exact h + have hupper := exterior_clique_card_le_two (hqQ i) (fun _ h => h) hclique hω + change (U i).card ≤ 2 at hupper + have hUcard : (U i).card = 2 := by have := hlow i; omega + exact ⟨hUcard, hclique⟩ + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleExteriorSix.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleExteriorSix.lean new file mode 100644 index 0000000000000000000000000000000000000000..5342077d9d073b09677a1cc2f26ec08785f0221c --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleExteriorSix.lean @@ -0,0 +1,78 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiveCycleDisjointStructure + +namespace OAI + +/-! Each two-vertex exterior clique has at least six vertices in its closed exterior neighbourhood. -/ + +namespace CycleClique.Construction +theorem fiveCycle_exterior_closed_six {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q A : Finset V} {q : V} + (hA : A ⊆ exteriorNeighbors G Q q) (hclique : G.IsClique (A : Set V)) (hAcard : A.card = 2) + (hcover : ∀ u ∈ A, ∀ x ∈ Q, G.Adj u x → x = q) + (hexpand : ∀ v, 5 ≤ (closedNeighborhood G {v}).card) + (hdis : ∀ T : Finset V, G.IsClique (T : Set V) → T.card = 3 → + ∀ x ∈ T, ∀ y ∈ T, x ≠ y → Disjoint (exteriorNeighbors G T x) (exteriorNeighbors G T y)) : + 6 ≤ (exteriorClosedNeighborhood G Q A).card := by + classical + obtain ⟨u, hu, v, hv, huv⟩ := Finset.one_lt_card.mp (by omega : 1 < A.card) + have huq := (mem_exteriorNeighbors.mp (hA hu)).1 + have hvq := (mem_exteriorNeighbors.mp (hA hv)).1 + let T : Finset V := {q, u, v} + have hT : G.IsNClique 3 T := SimpleGraph.is3Clique_triple_iff.mpr ⟨huq, hvq, hclique hu hv huv⟩ + have hqT : q ∈ T := by simp [T] + have huT : u ∈ T := by simp [T] + have hvT : v ∈ T := by simp [T] + have hAT : A ⊆ T := by + have hpair : ({u, v} : Finset V) = A := Finset.eq_of_subset_of_card_le + (by simp only [Finset.insert_subset_iff, Finset.singleton_subset_iff]; exact ⟨hu, hv⟩) + (by rw [hAcard, Finset.card_pair huv]) + rw [← hpair] + simp only [Finset.insert_subset_iff, Finset.singleton_subset_iff] + exact ⟨huT, hvT⟩ + let B := exteriorNeighbors G T u + let D := exteriorNeighbors G T v + have hBD : Disjoint B D := hdis T hT.isClique hT.card_eq u huT v hvT huv + have hBcard : 2 ≤ B.card := by + have h := exteriorNeighbors_card_lower huT (hexpand u) + rw [hT.card_eq] at h + change 5 ≤ 3 + B.card at h + omega + have hDcard : 2 ≤ D.card := by + have h := exteriorNeighbors_card_lower hvT (hexpand v) + rw [hT.card_eq] at h + change 5 ≤ 3 + D.card at h + omega + have hAQ : ∀ a ∈ A, a ∉ Q := fun a ha => (mem_exteriorNeighbors.mp (hA ha)).2 + have hBC : B ⊆ exteriorClosedNeighborhood G Q A := by + intro z hz + obtain ⟨huz, hzT⟩ := mem_exteriorNeighbors.mp hz + apply mem_exteriorClosedNeighborhood.mpr + refine ⟨Or.inr ⟨u, hu, huz⟩, ?_⟩ + intro hzQ + exact hzT ((hcover u hu z hzQ huz).symm ▸ hqT) + have hDC : D ⊆ exteriorClosedNeighborhood G Q A := by + intro z hz + obtain ⟨hvz, hzT⟩ := mem_exteriorNeighbors.mp hz + apply mem_exteriorClosedNeighborhood.mpr + refine ⟨Or.inr ⟨v, hv, hvz⟩, ?_⟩ + intro hzQ + exact hzT ((hcover v hv z hzQ hvz).symm ▸ hqT) + have hAC : A ⊆ exteriorClosedNeighborhood G Q A := fun a ha => mem_exteriorClosedNeighborhood.mpr ⟨Or.inl ha, hAQ a ha⟩ + have hAB : Disjoint A B := by + apply Finset.disjoint_left.mpr + intro z hzA hzB + exact (mem_exteriorNeighbors.mp hzB).2 (hAT hzA) + have hAD : Disjoint A D := by + apply Finset.disjoint_left.mpr + intro z hzA hzD + exact (mem_exteriorNeighbors.mp hzD).2 (hAT hzA) + have hsub : A ∪ (B ∪ D) ⊆ exteriorClosedNeighborhood G Q A := + Finset.union_subset hAC (Finset.union_subset hBC hDC) + have hcount := Finset.card_le_card hsub + rw [Finset.card_union_of_disjoint (Finset.disjoint_union_right.mpr ⟨hAB, hAD⟩), + Finset.card_union_of_disjoint hBD, hAcard] at hcount + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleFourClique.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleFourClique.lean new file mode 100644 index 0000000000000000000000000000000000000000..4597cd42b04a428419f67e3f2a0f77e5991fce8b --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleFourClique.lean @@ -0,0 +1,72 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ExteriorCounts + +namespace OAI + +/-! A C5-free graph with singleton expansion cannot contain a four-clique at order at most 17. -/ + +namespace CycleClique.Construction +theorem exterior_unique_clique_neighbor {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Finset V} + (hdis : ∀ x ∈ Q, ∀ y ∈ Q, x ≠ y → + Disjoint (exteriorNeighbors G Q x) (exteriorNeighbors G Q y)) + {q u x : V} (hq : q ∈ Q) (hu : u ∈ exteriorNeighbors G Q q) + (hx : x ∈ Q) (hux : G.Adj u x) : x = q := by + by_contra hn + have hu' : u ∈ exteriorNeighbors G Q x := + mem_exteriorNeighbors.mpr ⟨hux.symm, (mem_exteriorNeighbors.mp hu).2⟩ + exact Finset.disjoint_left.mp (hdis q hq x hx (Ne.symm hn)) hu hu' + +theorem fiveCycle_fourClique_impossible {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} (hcycle : ¬ HasCycle G 5) (horder : Fintype.card V ≤ 17) + (hexpand : ∀ v, 5 ≤ (closedNeighborhood G {v}).card) + {Q : Finset V} (hQ : G.IsClique (Q : Set V)) (hQcard : Q.card = 4) : False := by + classical + let e : Fin 4 ≃ Q := (Finset.equivFinOfCardEq hQcard).symm + let q : Fin 4 → V := fun i => (e i).val + have hq : Function.Injective q := Subtype.val_injective.comp e.injective + have hqQ : ∀ i, q i ∈ Q := fun i => (e i).property + let U := fun i => exteriorNeighbors G Q (q i) + have hdis : ∀ x ∈ Q, ∀ y ∈ Q, x ≠ y → + Disjoint (exteriorNeighbors G Q x) (exteriorNeighbors G Q y) := by + intro x hx y hy hxy + exact fiveCycle_fourClique_exterior_disjoint hQ hQcard hcycle hx hy hxy + have hU : ∀ i, (U i).Nonempty := by + intro i + have h := exteriorNeighbors_card_lower (hqQ i) (hexpand (q i)) + rw [hQcard] at h + have hpos : 0 < (exteriorNeighbors G Q (q i)).card := by omega + exact Finset.card_pos.mp hpos + have hAQ : ∀ i, Disjoint (U i) Q := by + intro i + apply Finset.disjoint_left.mpr + intro u hu huQ + exact (mem_exteriorNeighbors.mp hu).2 huQ + have hCdis : ∀ i j, i ≠ j → Disjoint (exteriorClosedNeighborhood G Q (U i)) + (exteriorClosedNeighborhood G Q (U j)) := by + intro i j hij + exact fiveCycle_exterior_closed_disjoint hQ (by omega) hcycle (hqQ i) (hqQ j) + (fun he => hij (hq he)) (fun _ h => h) (fun _ h => h) + (hdis _ (hqQ i) _ (hqQ j) (fun he => hij (hq he))) + have hlower : ∀ i, 4 ≤ (exteriorClosedNeighborhood G Q (U i)).card := by + intro i + obtain ⟨u, hu⟩ := hU i + have h := exterior_closed_expansion_bound (k := 4) (B := {q i}) (I := {u}) + (by simpa only [Finset.card_singleton] using hexpand u) + (by simpa only [Finset.singleton_subset_iff] using hu) (hAQ i) (by + intro v hv x hx hvx + have heq : v = u := Finset.mem_singleton.mp hv + subst v + exact Finset.mem_singleton.mpr (exterior_unique_clique_neighbor hdis (hqQ i) hu hx hvx)) + simp only [Finset.card_singleton] at h + omega + have hsum := Finset.sum_le_sum (s := (Finset.univ : Finset (Fin 4))) + (f := fun _ => 4) (g := fun i => (exteriorClosedNeighborhood G Q (U i)).card) + (fun i _ => hlower i) + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, smul_eq_mul] at hsum + have hbound := exterior_disjoint_sum_bound Finset.univ U (fun i _ j _ hij => hCdis i j hij) + simp only [hQcard] at hbound + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleGeometry.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..59c106e73646407450ffbe27af2852f16dcb6b66 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleGeometry.lean @@ -0,0 +1,116 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.SmallCycleGeometry + +namespace OAI + +/-! Exterior edges and two-edge paths which close to an exact five-cycle. -/ + +namespace CycleClique.Construction +private theorem clique_third_vertex {V : Type*} [DecidableEq V] {Q : Finset V} + (hQcard : 3 ≤ Q.card) {x y : V} (hxy : x ≠ y) : + ∃ z ∈ Q, z ≠ x ∧ z ≠ y := by + obtain ⟨z, hz, hnot⟩ := Finset.exists_mem_notMem_of_card_lt_card + (show ({x, y} : Finset V).card < Q.card by rw [Finset.card_pair hxy]; omega) + exact ⟨z, hz, by simpa only [Finset.mem_insert, Finset.mem_singleton, not_or] using hnot⟩ + +theorem fiveCycle_triangle_exterior_no_edge {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q : Finset V} (hQ : G.IsClique (Q : Set V)) (hQcard : 3 ≤ Q.card) + (hcycle : ¬ HasCycle G 5) {x y u v : V} (hx : x ∈ Q) (hy : y ∈ Q) (hxy : x ≠ y) + (hu : u ∈ exteriorNeighbors G Q x) (hv : v ∈ exteriorNeighbors G Q y) : ¬ G.Adj u v := by + classical + obtain ⟨z, hzQ, hzx, hzy⟩ := clique_third_vertex hQcard hxy + obtain ⟨hxu, huQ⟩ := mem_exteriorNeighbors.mp hu + obtain ⟨hyv, hvQ⟩ := mem_exteriorNeighbors.mp hv + intro huv + have hnd : ([x, u, v, y, z] : List V).Nodup := by + simp [hxu.ne, ne_of_mem_of_not_mem hx hvQ, hxy, hzx.symm, huv.ne, + ne_of_mem_of_not_mem hy huQ |>.symm, ne_of_mem_of_not_mem hzQ huQ |>.symm, + hyv.ne.symm, ne_of_mem_of_not_mem hzQ hvQ |>.symm, hzy.symm] + exact hcycle (hasCycle_five_of_edges hnd hxu huv hyv.symm (hQ hy hzQ hzy.symm) (hQ hzQ hx hzx)) + +theorem fiveCycle_triangle_exterior_no_common {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q : Finset V} (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G 5) {x y u v z : V} (hx : x ∈ Q) (hy : y ∈ Q) (hxy : x ≠ y) + (hu : u ∈ exteriorNeighbors G Q x) (hv : v ∈ exteriorNeighbors G Q y) + (huv : u ≠ v) (hzQ : z ∉ Q) : ¬ (G.Adj u z ∧ G.Adj v z) := by + classical + obtain ⟨hxu, huQ⟩ := mem_exteriorNeighbors.mp hu + obtain ⟨hyv, hvQ⟩ := mem_exteriorNeighbors.mp hv + rintro ⟨huz, hvz⟩ + have hnd : ([x, u, z, v, y] : List V).Nodup := by + simp [hxu.ne, ne_of_mem_of_not_mem hx hzQ, ne_of_mem_of_not_mem hx hvQ, hxy, + huz.ne, huv, ne_of_mem_of_not_mem hy huQ |>.symm, hvz.ne.symm, + ne_of_mem_of_not_mem hy hzQ |>.symm, hyv.ne.symm] + exact hcycle (hasCycle_five_of_edges hnd hxu huz hvz.symm hyv.symm (hQ hy hx hxy.symm)) + +theorem fiveCycle_fourClique_exterior_disjoint {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q : Finset V} (hQ : G.IsClique (Q : Set V)) (hQcard : Q.card = 4) + (hcycle : ¬ HasCycle G 5) {x y : V} (hx : x ∈ Q) (hy : y ∈ Q) (hxy : x ≠ y) : + Disjoint (exteriorNeighbors G Q x) (exteriorNeighbors G Q y) := by + classical + let R := Q \ {x, y} + have hsub : ({x, y} : Finset V) ⊆ Q := by simp only [Finset.insert_subset_iff, Finset.singleton_subset_iff]; exact ⟨hx, hy⟩ + have hRcard : R.card = 2 := by + have h := Finset.card_sdiff_add_card_eq_card hsub + rw [Finset.card_pair hxy, hQcard] at h + change R.card + 2 = 4 at h + omega + obtain ⟨z, hz, w, hw, hzw⟩ := Finset.one_lt_card.mp (by omega : 1 < R.card) + have hzQ := (Finset.mem_sdiff.mp hz).1 + have hwQ := (Finset.mem_sdiff.mp hw).1 + have hznot : z ≠ x ∧ z ≠ y := by simpa only [Finset.mem_insert, Finset.mem_singleton, not_or] using (Finset.mem_sdiff.mp hz).2 + have hwnot : w ≠ x ∧ w ≠ y := by simpa only [Finset.mem_insert, Finset.mem_singleton, not_or] using (Finset.mem_sdiff.mp hw).2 + apply Finset.disjoint_left.mpr + intro u hu hv + obtain ⟨hxu, huQ⟩ := mem_exteriorNeighbors.mp hu + obtain ⟨hyu, _⟩ := mem_exteriorNeighbors.mp hv + have hnd : ([x, u, y, z, w] : List V).Nodup := by + simp [hxu.ne, hxy, hznot.1.symm, hwnot.1.symm, hyu.ne.symm, + ne_of_mem_of_not_mem hzQ huQ |>.symm, ne_of_mem_of_not_mem hwQ huQ |>.symm, + hznot.2.symm, hwnot.2.symm, hzw] + exact hcycle (hasCycle_five_of_edges hnd hxu hyu.symm (hQ hy hzQ hznot.2.symm) + (hQ hzQ hwQ hzw) (hQ hwQ hx hwnot.1)) + +noncomputable def exteriorClosedNeighborhood {V : Type*} [Fintype V] + (G : SimpleGraph V) (Q A : Finset V) : Finset V := by + classical + exact closedNeighborhood G A \ Q + +@[simp] theorem mem_exteriorClosedNeighborhood {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q A : Finset V} {v : V} : + v ∈ exteriorClosedNeighborhood G Q A ↔ + (v ∈ A ∨ ∃ a ∈ A, G.Adj a v) ∧ v ∉ Q := by + classical + simp only [exteriorClosedNeighborhood, Finset.mem_sdiff, mem_closedNeighborhood] + +theorem exteriorClosedNeighborhood_disjoint {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q A B : Finset V} (hdis : Disjoint A B) + (hanti : ∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b) + (hcommon : ∀ a ∈ A, ∀ b ∈ B, ∀ z, z ∉ Q → ¬ (G.Adj a z ∧ G.Adj b z)) : + Disjoint (exteriorClosedNeighborhood G Q A) (exteriorClosedNeighborhood G Q B) := by + classical + apply Finset.disjoint_left.mpr + intro z hzA hzB + obtain ⟨hza, hzQ⟩ := mem_exteriorClosedNeighborhood.mp hzA + obtain ⟨hzb, _⟩ := mem_exteriorClosedNeighborhood.mp hzB + rcases hza with hza | ⟨a, ha, haz⟩ <;> rcases hzb with hzb | ⟨b, hb, hbz⟩ + · exact Finset.disjoint_left.mp hdis hza hzb + · exact hanti z hza b hb hbz.symm + · exact hanti a ha z hzb haz + · exact hcommon a ha b hb z hzQ ⟨haz, hbz⟩ + +theorem fiveCycle_exterior_closed_disjoint {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q : Finset V} (hQ : G.IsClique (Q : Set V)) (hQcard : 3 ≤ Q.card) + (hcycle : ¬ HasCycle G 5) {x y : V} (hx : x ∈ Q) (hy : y ∈ Q) (hxy : x ≠ y) + {A B : Finset V} (hA : A ⊆ exteriorNeighbors G Q x) (hB : B ⊆ exteriorNeighbors G Q y) + (hdis : Disjoint A B) : + Disjoint (exteriorClosedNeighborhood G Q A) (exteriorClosedNeighborhood G Q B) := by + apply exteriorClosedNeighborhood_disjoint hdis + · intro a ha b hb + exact fiveCycle_triangle_exterior_no_edge hQ hQcard hcycle hx hy hxy (hA ha) (hB hb) + · intro a ha b hb z hzQ + have hab : a ≠ b := fun he => Finset.disjoint_left.mp hdis ha (he ▸ hb) + exact fiveCycle_triangle_exterior_no_common hQ hcycle hx hy hxy (hA ha) (hB hb) hab hzQ + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleNoOverlap.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleNoOverlap.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e1bc667e97874b89ce875b00b773dbce034cc38 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleNoOverlap.lean @@ -0,0 +1,101 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiveCycleOverlapStructure + +namespace OAI + +/-! Reapplying the necessary overlap structure to a neighbouring triangle rules out every overlap. -/ + +namespace CycleClique.Construction +theorem fiveCycle_labelled_triangle_no_overlap {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q : Finset V} (hQ : G.IsClique (Q : Set V)) (hQcard : Q.card = 3) + (hcycle : ¬ HasCycle G 5) (hω : G.cliqueNum ≤ 3) (horder : Fintype.card V ≤ 17) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + 4 * I.card + 1 ≤ (closedNeighborhood G I).card) + (q : Fin 3 → V) (hq : Function.Injective q) (hqQ : ∀ i, q i ∈ Q) + (hqcover : ∀ x ∈ Q, ∃ i, q i = x) : + Disjoint (exteriorNeighbors G Q (q 0)) (exteriorNeighbors G Q (q 1)) := by + classical + by_contra hdis + have hoverlap : (exteriorNeighbors G Q (q 0) ∩ exteriorNeighbors G Q (q 1)).Nonempty := by + obtain ⟨w, hw0, hw1⟩ := Finset.not_disjoint_iff.mp hdis + exact ⟨w, Finset.mem_inter.mpr ⟨hw0, hw1⟩⟩ + obtain ⟨hIcard, hIeq, _, _, _, hIlower⟩ := + fiveCycle_overlap_structure hQ hQcard hcycle hω horder hexpand q hq hqQ hqcover hoverlap + let I := exteriorNeighbors G Q (q 0) + have hIq1 : ∀ w ∈ I, w ∈ exteriorNeighbors G Q (q 1) := by intro w hw; rwa [← hIeq] + have hq01 : q 0 ≠ q 1 := fun h => (by decide : (0 : Fin 3) ≠ 1) (hq h) + have hq02 : q 0 ≠ q 2 := fun h => (by decide : (0 : Fin 3) ≠ 2) (hq h) + have hq12 : q 1 ≠ q 2 := fun h => (by decide : (1 : Fin 3) ≠ 2) (hq h) + have hdegree : ∀ w ∈ I, (exteriorNeighbors G Q w).card = 2 := by + intro w hw + have hw0 := (mem_exteriorNeighbors.mp hw).1 + have hw1 := (mem_exteriorNeighbors.mp (hIq1 w hw)).1 + have hwQ := (mem_exteriorNeighbors.mp hw).2 + have hw2 := fiveCycle_overlap_misses_third hQ hQcard hω q hqcover hw (hIq1 w hw) + let T : Finset V := {q 0, q 1, w} + have hT : G.IsNClique 3 T := SimpleGraph.is3Clique_triple_iff.mpr + ⟨hQ (hqQ 0) (hqQ 1) hq01, hw0, hw1⟩ + let q' : Fin 3 → V := ![q 0, q 1, w] + have h0w := hw0.ne + have h1w := hw1.ne + have hq' : Function.Injective q' := by + intro i j hij + fin_cases i <;> fin_cases j <;> + simp_all [q'] + have hq'T : ∀ i, q' i ∈ T := by intro i; fin_cases i <;> simp [q', T] + have hq'cover : ∀ x ∈ T, ∃ i, q' i = x := by + intro x hx + simp only [T, Finset.mem_insert, Finset.mem_singleton] at hx + rcases hx with rfl | rfl | rfl + · exact ⟨0, rfl⟩ + · exact ⟨1, rfl⟩ + · exact ⟨2, rfl⟩ + have hq2T : q 2 ∉ T := by + simp only [T, Finset.mem_insert, Finset.mem_singleton, not_or] + exact ⟨hq02.symm, hq12.symm, ne_of_mem_of_not_mem (hqQ 2) hwQ⟩ + have hTov : (exteriorNeighbors G T (q' 0) ∩ exteriorNeighbors G T (q' 1)).Nonempty := by + refine ⟨q 2, Finset.mem_inter.mpr ⟨?_, ?_⟩⟩ + · exact mem_exteriorNeighbors.mpr ⟨hQ (hqQ 0) (hqQ 2) hq02, hq2T⟩ + · exact mem_exteriorNeighbors.mpr ⟨hQ (hqQ 1) (hqQ 2) hq12, hq2T⟩ + obtain ⟨_, _, _, hTwocard, _, _⟩ := fiveCycle_overlap_structure hT.isClique hT.card_eq + hcycle hω horder hexpand q' hq' hq'T hq'cover hTov + have hset : exteriorNeighbors G Q w = exteriorNeighbors G T w := by + ext v + rw [mem_exteriorNeighbors, mem_exteriorNeighbors] + constructor + · rintro ⟨hwv, hvQ⟩ + refine ⟨hwv, ?_⟩ + intro hvT + simp only [T, Finset.mem_insert, Finset.mem_singleton] at hvT + rcases hvT with rfl | rfl | rfl + · exact hvQ (hqQ 0) + · exact hvQ (hqQ 1) + · exact G.irrefl hwv + · rintro ⟨hwv, hvT⟩ + refine ⟨hwv, ?_⟩ + intro hvQ + obtain ⟨i, rfl⟩ := hqcover v hvQ + fin_cases i + · exact hvT (by simp [T]) + · exact hvT (by simp [T]) + · exact hw2 hwv + rw [hset] + exact hTwocard + have hsub : exteriorClosedNeighborhood G Q I ⊆ I ∪ I.biUnion (fun w => exteriorNeighbors G Q w) := by + intro v hv + obtain ⟨hvI, hvQ⟩ := mem_exteriorClosedNeighborhood.mp hv + rcases hvI with hvI | ⟨w, hw, hwv⟩ + · exact Finset.mem_union_left _ hvI + · exact Finset.mem_union_right _ (Finset.mem_biUnion.mpr ⟨w, hw, mem_exteriorNeighbors.mpr ⟨hwv, hvQ⟩⟩) + have hupper := (Finset.card_le_card hsub).trans ((Finset.card_union_le _ _).trans + (Nat.add_le_add_left (Finset.card_biUnion_le) I.card)) + change I.card = 2 at hIcard + have hsum : (∑ w ∈ I, (exteriorNeighbors G Q w).card) = 4 := by + rw [Finset.sum_congr rfl (fun w hw => hdegree w hw)] + simp only [Finset.sum_const, hIcard, smul_eq_mul] + change 7 ≤ (exteriorClosedNeighborhood G Q I).card at hIlower + rw [hsum] at hupper + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleOverlapStructure.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleOverlapStructure.lean new file mode 100644 index 0000000000000000000000000000000000000000..a10d81361dfba3a9d711f3c952f33e07efbc8eb1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleOverlapStructure.lean @@ -0,0 +1,177 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiveCycleTriangleCounts + +namespace OAI + +/-! The exact two-vertex overlap forced at every overlapping triangle. -/ + +namespace CycleClique.Construction +theorem fiveCycle_overlap_structure {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q : Finset V} (hQ : G.IsClique (Q : Set V)) (hQcard : Q.card = 3) + (hcycle : ¬ HasCycle G 5) (hω : G.cliqueNum ≤ 3) (horder : Fintype.card V ≤ 17) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + 4 * I.card + 1 ≤ (closedNeighborhood G I).card) + (q : Fin 3 → V) (hq : Function.Injective q) (hqQ : ∀ i, q i ∈ Q) + (hqcover : ∀ x ∈ Q, ∃ i, q i = x) + (hoverlap : (exteriorNeighbors G Q (q 0) ∩ exteriorNeighbors G Q (q 1)).Nonempty) : + (exteriorNeighbors G Q (q 0)).card = 2 ∧ + exteriorNeighbors G Q (q 0) = exteriorNeighbors G Q (q 1) ∧ + G.IsIndepSet (exteriorNeighbors G Q (q 0) : Set V) ∧ + (exteriorNeighbors G Q (q 2)).card = 2 ∧ + G.IsClique (exteriorNeighbors G Q (q 2) : Set V) ∧ + 7 ≤ (exteriorClosedNeighborhood G Q (exteriorNeighbors G Q (q 0))).card := by + classical + let U := fun i => exteriorNeighbors G Q (q i) + let I := U 0 ∩ U 1 + let A := U 0 \ I + let B := U 1 \ I + let D := U 2 + have hI0 : I ⊆ U 0 := Finset.inter_subset_left + have hI1 : I ⊆ U 1 := Finset.inter_subset_right + have hA0 : A ⊆ U 0 := Finset.sdiff_subset + have hB1 : B ⊆ U 1 := Finset.sdiff_subset + have hIne : I.Nonempty := hoverlap + obtain ⟨x, hx⟩ := hoverlap + obtain ⟨hx0, hx1⟩ := Finset.mem_inter.mp hx + have hx2 := fiveCycle_overlap_misses_third hQ hQcard hω q hqcover hx0 hx1 + obtain ⟨h02, h12⟩ := fiveCycle_other_triangle_overlap_absent hQ hcycle q hq hqQ hx0 hx1 hx2 + have hq01 : q 0 ≠ q 1 := fun h => (by decide : (0 : Fin 3) ≠ 1) (hq h) + have hq02 : q 0 ≠ q 2 := fun h => (by decide : (0 : Fin 3) ≠ 2) (hq h) + have hq12 : q 1 ≠ q 2 := fun h => (by decide : (1 : Fin 3) ≠ 2) (hq h) + have hlow : ∀ i, 2 ≤ (U i).card := by + intro i + have hs := hexpand {q i} (by simp) (by simp) + simp only [Finset.card_singleton, Nat.mul_one] at hs + have h := exteriorNeighbors_card_lower (hqQ i) hs + rw [hQcard] at h + change 5 ≤ 3 + (U i).card at h + omega + have houtside : ∀ i, Disjoint (U i) Q := by + intro i + apply Finset.disjoint_left.mpr + intro u hu huQ + exact (mem_exteriorNeighbors.mp hu).2 huQ + have hIQ : Disjoint I Q := (houtside 0).mono_left hI0 + have hAQ : Disjoint A Q := (houtside 0).mono_left hA0 + have hBQ : Disjoint B Q := (houtside 1).mono_left hB1 + have hDQ : Disjoint D Q := houtside 2 + have hIA : Disjoint I A := by + apply Finset.disjoint_left.mpr + intro u hu huA + exact (Finset.mem_sdiff.mp huA).2 hu + have hIB : Disjoint I B := by + apply Finset.disjoint_left.mpr + intro u hu huB + exact (Finset.mem_sdiff.mp huB).2 hu + have hID : Disjoint I D := h02.mono_left hI0 + have hAB : Disjoint A B := by + apply Finset.disjoint_left.mpr + intro u huA huB + exact (Finset.mem_sdiff.mp huA).2 (Finset.mem_inter.mpr ⟨hA0 huA, hB1 huB⟩) + have hAD : Disjoint A D := h02.mono_left hA0 + have hBD : Disjoint B D := h12.mono_left hB1 + have hCsum := four_exterior_sum_bound + (fiveCycle_exterior_closed_disjoint hQ (by omega) hcycle (hqQ 1) (hqQ 0) hq01.symm hI1 hA0 hIA) + (fiveCycle_exterior_closed_disjoint hQ (by omega) hcycle (hqQ 0) (hqQ 1) hq01 hI0 hB1 hIB) + (fiveCycle_exterior_closed_disjoint hQ (by omega) hcycle (hqQ 0) (hqQ 2) hq02 hI0 (fun _ h => h) hID) + (fiveCycle_exterior_closed_disjoint hQ (by omega) hcycle (hqQ 0) (hqQ 1) hq01 hA0 hB1 hAB) + (fiveCycle_exterior_closed_disjoint hQ (by omega) hcycle (hqQ 0) (hqQ 2) hq02 hA0 (fun _ h => h) hAD) + (fiveCycle_exterior_closed_disjoint hQ (by omega) hcycle (hqQ 1) (hqQ 2) hq12 hB1 (fun _ h => h) hBD) + rw [hQcard] at hCsum + change 3 + ((exteriorClosedNeighborhood G Q I).card + (exteriorClosedNeighborhood G Q A).card + + (exteriorClosedNeighborhood G Q B).card + (exteriorClosedNeighborhood G Q D).card) ≤ Fintype.card V at hCsum + have hsum : (exteriorClosedNeighborhood G Q I).card + (exteriorClosedNeighborhood G Q A).card + + (exteriorClosedNeighborhood G Q B).card + (exteriorClosedNeighborhood G Q D).card ≤ 14 := by omega + have hcoverI : ∀ u ∈ I, ∀ z ∈ Q, G.Adj u z → z ∈ ({q 0, q 1} : Finset V) := by + intro u hu z hz huz + obtain ⟨i, rfl⟩ := hqcover z hz + fin_cases i + · simp + · simp + · exact False.elim (fiveCycle_overlap_misses_third hQ hQcard hω q hqcover (hI0 hu) (hI1 hu) huz) + have hcoverA : ∀ u ∈ A, ∀ z ∈ Q, G.Adj u z → z = q 0 := by + intro u hu z hz huz + obtain ⟨i, rfl⟩ := hqcover z hz + fin_cases i + · rfl + · have hu1 : u ∈ U 1 := mem_exteriorNeighbors.mpr ⟨huz.symm, (mem_exteriorNeighbors.mp (hA0 hu)).2⟩ + exact False.elim ((Finset.mem_sdiff.mp hu).2 (Finset.mem_inter.mpr ⟨hA0 hu, hu1⟩)) + · have hu2 : u ∈ U 2 := mem_exteriorNeighbors.mpr ⟨huz.symm, (mem_exteriorNeighbors.mp (hA0 hu)).2⟩ + exact False.elim (Finset.disjoint_left.mp h02 (hA0 hu) hu2) + have hcoverB : ∀ u ∈ B, ∀ z ∈ Q, G.Adj u z → z = q 1 := by + intro u hu z hz huz + obtain ⟨i, rfl⟩ := hqcover z hz + fin_cases i + · have hu0 : u ∈ U 0 := mem_exteriorNeighbors.mpr ⟨huz.symm, (mem_exteriorNeighbors.mp (hB1 hu)).2⟩ + exact False.elim ((Finset.mem_sdiff.mp hu).2 (Finset.mem_inter.mpr ⟨hu0, hB1 hu⟩)) + · rfl + · have hu2 : u ∈ U 2 := mem_exteriorNeighbors.mpr ⟨huz.symm, (mem_exteriorNeighbors.mp (hB1 hu)).2⟩ + exact False.elim (Finset.disjoint_left.mp h12 (hB1 hu) hu2) + have hcoverD : ∀ u ∈ D, ∀ z ∈ Q, G.Adj u z → z = q 2 := by + intro u hu z hz huz + obtain ⟨i, rfl⟩ := hqcover z hz + fin_cases i + · have hu0 : u ∈ U 0 := mem_exteriorNeighbors.mpr ⟨huz.symm, (mem_exteriorNeighbors.mp hu).2⟩ + exact False.elim (Finset.disjoint_left.mp h02 hu0 hu) + · have hu1 : u ∈ U 1 := mem_exteriorNeighbors.mpr ⟨huz.symm, (mem_exteriorNeighbors.mp hu).2⟩ + exact False.elim (Finset.disjoint_left.mp h12 hu1 hu) + · rfl + have hIind : G.IsIndepSet (I : Set V) := fiveCycle_triangle_overlap_independent hQ hcycle q hq hqQ + have hIgrow : 4 * I.card + 1 ≤ 2 + (exteriorClosedNeighborhood G Q I).card := by + have h := exterior_closed_expansion_bound (hexpand I hIind hIne) (Finset.Subset.refl I) hIQ hcoverI + simpa only [Finset.card_pair hq01] using h + have hAgrow : 0 < A.card → 4 ≤ (exteriorClosedNeighborhood G Q A).card := by + intro ha + let : Nonempty A := (Finset.card_pos.mp ha).to_subtype + have hpos := indepNum_pos_of_nonempty (G.induce (A : Set V)) + have hg := one_clique_neighbor_expansion (Finset.card_pos.mp ha) hAQ hcoverA hexpand + omega + have hBgrow : 0 < B.card → 4 ≤ (exteriorClosedNeighborhood G Q B).card := by + intro hb + let : Nonempty B := (Finset.card_pos.mp hb).to_subtype + have hpos := indepNum_pos_of_nonempty (G.induce (B : Set V)) + have hg := one_clique_neighbor_expansion (Finset.card_pos.mp hb) hBQ hcoverB hexpand + omega + have hDne : D.Nonempty := Finset.card_pos.mp (by have := hlow 2; change 2 ≤ D.card at this; omega) + let : Nonempty D := hDne.to_subtype + have hDpos := indepNum_pos_of_nonempty (G.induce (D : Set V)) + have hDgrow := one_clique_neighbor_expansion hDne hDQ hcoverD hexpand + have hDfour : 4 ≤ (exteriorClosedNeighborhood G Q D).card := by omega + have hU0card : I.card + A.card = (U 0).card := by + have h := Finset.card_sdiff_add_card_eq_card hI0 + change A.card + I.card = (U 0).card at h + omega + have hU1card : I.card + B.card = (U 1).card := by + have h := Finset.card_sdiff_add_card_eq_card hI1 + change B.card + I.card = (U 1).card at h + omega + obtain ⟨hIcard, hAcard, hBcard⟩ := overlapping_triangle_card_arithmetic + (show 1 ≤ I.card from Finset.card_pos.mpr hIne) + (by rw [hU0card]; exact hlow 0) (by rw [hU1card]; exact hlow 1) + hIgrow hAgrow hBgrow hDfour hsum + have hU0I : U 0 = I := Finset.Subset.antisymm + (Finset.sdiff_eq_empty_iff_subset.mp (Finset.card_eq_zero.mp hAcard)) hI0 + have hU1I : U 1 = I := Finset.Subset.antisymm + (Finset.sdiff_eq_empty_iff_subset.mp (Finset.card_eq_zero.mp hBcard)) hI1 + have hDα : (G.induce (D : Set V)).indepNum ≤ 1 := by omega + have hDcomplete := complete_of_indepNum_le_one hDα + have hDclique : G.IsClique (D : Set V) := by + intro u hu v hv huv + have h : (G.induce (D : Set V)).Adj ⟨u, hu⟩ ⟨v, hv⟩ := by + rw [hDcomplete] + exact fun he => huv (congrArg Subtype.val he) + exact h + have hDcard : D.card = 2 := by + have hupper := exterior_clique_card_le_two (hqQ 2) (fun _ h => h) hDclique hω + change D.card ≤ 2 at hupper + have hlower := hlow 2 + change 2 ≤ D.card at hlower + omega + have hIlower : 7 ≤ (exteriorClosedNeighborhood G Q I).card := by omega + have hU0card2 : (U 0).card = 2 := by rwa [hU0I] + have hU0ind : G.IsIndepSet (U 0 : Set V) := by rw [hU0I]; exact hIind + have hU0lower : 7 ≤ (exteriorClosedNeighborhood G Q (U 0)).card := by rw [hU0I]; exact hIlower + exact ⟨hU0card2, hU0I.trans hU1I.symm, hU0ind, hDcard, hDclique, hU0lower⟩ + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleTriangleCounts.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleTriangleCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..2fb3e919b4761ad4e09602c10d87fbc379f236e7 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleTriangleCounts.lean @@ -0,0 +1,64 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiveCycleTriangleOverlap + +namespace OAI + +/-! The numerical bounds for the four exterior classes at an overlapping triangle. -/ + +namespace CycleClique.Construction +theorem exterior_clique_card_le_two {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q A : Finset V} {q : V} (hq : q ∈ Q) + (hA : A ⊆ exteriorNeighbors G Q q) (hclique : G.IsClique (A : Set V)) + (hω : G.cliqueNum ≤ 3) : A.card ≤ 2 := by + classical + have hqA : q ∉ A := by intro h; exact (mem_exteriorNeighbors.mp (hA h)).2 hq + have hjoin : G.IsClique ((insert q A : Finset V) : Set V) := by + rw [Finset.coe_insert] + exact hclique.insert (fun a ha _ => (mem_exteriorNeighbors.mp (hA ha)).1) + have h := hjoin.card_le_cliqueNum.trans hω + rw [Finset.card_insert_of_notMem hqA] at h + omega + +theorem four_exterior_sum_bound {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q I A B D : Finset V} + (hIA : Disjoint (exteriorClosedNeighborhood G Q I) (exteriorClosedNeighborhood G Q A)) + (hIB : Disjoint (exteriorClosedNeighborhood G Q I) (exteriorClosedNeighborhood G Q B)) + (hID : Disjoint (exteriorClosedNeighborhood G Q I) (exteriorClosedNeighborhood G Q D)) + (hAB : Disjoint (exteriorClosedNeighborhood G Q A) (exteriorClosedNeighborhood G Q B)) + (hAD : Disjoint (exteriorClosedNeighborhood G Q A) (exteriorClosedNeighborhood G Q D)) + (hBD : Disjoint (exteriorClosedNeighborhood G Q B) (exteriorClosedNeighborhood G Q D)) : + Q.card + ((exteriorClosedNeighborhood G Q I).card + (exteriorClosedNeighborhood G Q A).card + + (exteriorClosedNeighborhood G Q B).card + (exteriorClosedNeighborhood G Q D).card) ≤ Fintype.card V := by + classical + let F : Fin 4 → Finset V := ![I, A, B, D] + have hdis : ∀ i j : Fin 4, i ≠ j → Disjoint (exteriorClosedNeighborhood G Q (F i)) + (exteriorClosedNeighborhood G Q (F j)) := by + intro i j hij + fin_cases i <;> fin_cases j <;> simp_all [F, disjoint_comm] + have h := exterior_disjoint_sum_bound Finset.univ F (fun i _ j _ hij => hdis i j hij) + simpa [F, Fin.sum_univ_succ, Nat.add_assoc] using h + +theorem overlapping_triangle_card_arithmetic {r a b cI cA cB cD : ℕ} + (hr : 1 ≤ r) (hU0 : 2 ≤ r + a) (hU1 : 2 ≤ r + b) + (hI : 4 * r + 1 ≤ 2 + cI) (hA : 0 < a → 4 ≤ cA) + (hB : 0 < b → 4 ≤ cB) (hD : 4 ≤ cD) (hsum : cI + cA + cB + cD ≤ 14) : + r = 2 ∧ a = 0 ∧ b = 0 := by + have hr2 : r ≤ 2 := by omega + have hrnot1 : r ≠ 1 := by + intro heq + have hA' := hA (by omega) + have hB' := hB (by omega) + omega + have hre : r = 2 := by omega + have ha0 : a = 0 := by + by_contra hn + have hA' := hA (by omega) + omega + have hb0 : b = 0 := by + by_contra hn + have hB' := hB (by omega) + omega + exact ⟨hre, ha0, hb0⟩ + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleTriangleOverlap.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleTriangleOverlap.lean new file mode 100644 index 0000000000000000000000000000000000000000..1f60f38e99c6a7df4e066bbfe315f1fa7f5faa3f --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiveCycleTriangleOverlap.lean @@ -0,0 +1,94 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiveCycleFourClique + +namespace OAI + +/-! Only one exterior pair can overlap at a triangle in the five-cycle case. -/ + +namespace CycleClique.Construction +theorem fiveCycle_overlap_misses_third {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q : Finset V} (hQ : G.IsClique (Q : Set V)) (hQcard : Q.card = 3) + (hω : G.cliqueNum ≤ 3) (q : Fin 3 → V) (hqcover : ∀ x ∈ Q, ∃ i, q i = x) + {u : V} (hu : u ∈ exteriorNeighbors G Q (q 0)) (hu' : u ∈ exteriorNeighbors G Q (q 1)) : + ¬ G.Adj u (q 2) := by + classical + intro hu2 + have huQ := (mem_exteriorNeighbors.mp hu).2 + have hjoin : G.IsClique ((insert u Q : Finset V) : Set V) := by + rw [Finset.coe_insert] + apply hQ.insert + intro x hx _ + obtain ⟨i, rfl⟩ := hqcover x hx + fin_cases i + · exact (mem_exteriorNeighbors.mp hu).1.symm + · exact (mem_exteriorNeighbors.mp hu').1.symm + · exact hu2 + have hc := hjoin.card_le_cliqueNum.trans hω + rw [Finset.card_insert_of_notMem huQ, hQcard] at hc + omega + +theorem fiveCycle_other_triangle_overlap_absent {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q : Finset V} (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G 5) (q : Fin 3 → V) (hq : Function.Injective q) + (hqQ : ∀ i, q i ∈ Q) + {x : V} (hx0 : x ∈ exteriorNeighbors G Q (q 0)) (hx1 : x ∈ exteriorNeighbors G Q (q 1)) + (hx2 : ¬ G.Adj x (q 2)) : + Disjoint (exteriorNeighbors G Q (q 0)) (exteriorNeighbors G Q (q 2)) ∧ + Disjoint (exteriorNeighbors G Q (q 1)) (exteriorNeighbors G Q (q 2)) := by + classical + have hq01 : q 0 ≠ q 1 := fun h => (by decide : (0 : Fin 3) ≠ 1) (hq h) + have hq02 : q 0 ≠ q 2 := fun h => (by decide : (0 : Fin 3) ≠ 2) (hq h) + have hq12 : q 1 ≠ q 2 := fun h => (by decide : (1 : Fin 3) ≠ 2) (hq h) + have hxQ := (mem_exteriorNeighbors.mp hx0).2 + constructor + · apply Finset.disjoint_left.mpr + intro y hy0 hy2 + obtain ⟨h0y, hyQ⟩ := mem_exteriorNeighbors.mp hy0 + have h2y := (mem_exteriorNeighbors.mp hy2).1 + have hxy : x ≠ y := fun h => hx2 (by rw [h]; exact h2y.symm) + have hnd : ([q 1, x, q 0, y, q 2] : List V).Nodup := by + simp [ne_of_mem_of_not_mem (hqQ 1) hxQ, hq01.symm, + ne_of_mem_of_not_mem (hqQ 1) hyQ, hq12, + ne_of_mem_of_not_mem (hqQ 0) hxQ |>.symm, hxy, + ne_of_mem_of_not_mem (hqQ 2) hxQ |>.symm, + ne_of_mem_of_not_mem (hqQ 0) hyQ, hq02, h2y.ne.symm] + exact hcycle (hasCycle_five_of_edges hnd (mem_exteriorNeighbors.mp hx1).1 + (mem_exteriorNeighbors.mp hx0).1.symm h0y h2y.symm (hQ (hqQ 2) (hqQ 1) hq12.symm)) + · apply Finset.disjoint_left.mpr + intro y hy1 hy2 + obtain ⟨h1y, hyQ⟩ := mem_exteriorNeighbors.mp hy1 + have h2y := (mem_exteriorNeighbors.mp hy2).1 + have hxy : x ≠ y := fun h => hx2 (by rw [h]; exact h2y.symm) + have hnd : ([q 0, x, q 1, y, q 2] : List V).Nodup := by + simp [ne_of_mem_of_not_mem (hqQ 0) hxQ, hq01, + ne_of_mem_of_not_mem (hqQ 0) hyQ, hq02, + ne_of_mem_of_not_mem (hqQ 1) hxQ |>.symm, hxy, + ne_of_mem_of_not_mem (hqQ 2) hxQ |>.symm, + ne_of_mem_of_not_mem (hqQ 1) hyQ, hq12, h2y.ne.symm] + exact hcycle (hasCycle_five_of_edges hnd (mem_exteriorNeighbors.mp hx0).1 + (mem_exteriorNeighbors.mp hx1).1.symm h1y h2y.symm (hQ (hqQ 2) (hqQ 0) hq02.symm)) + +theorem fiveCycle_triangle_overlap_independent {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q : Finset V} (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G 5) (q : Fin 3 → V) (hq : Function.Injective q) (hqQ : ∀ i, q i ∈ Q) : + G.IsIndepSet ((exteriorNeighbors G Q (q 0) ∩ exteriorNeighbors G Q (q 1) : Finset V) : Set V) := by + intro x hx y hy hxy hadj + obtain ⟨hx0, hx1⟩ := Finset.mem_inter.mp hx + obtain ⟨hy0, hy1⟩ := Finset.mem_inter.mp hy + have hxQ := (mem_exteriorNeighbors.mp hx0).2 + have hyQ := (mem_exteriorNeighbors.mp hy0).2 + have hq01 : q 0 ≠ q 1 := fun h => (by decide : (0 : Fin 3) ≠ 1) (hq h) + have hq02 : q 0 ≠ q 2 := fun h => (by decide : (0 : Fin 3) ≠ 2) (hq h) + have hq12 : q 1 ≠ q 2 := fun h => (by decide : (1 : Fin 3) ≠ 2) (hq h) + have hnd : ([q 2, q 0, x, y, q 1] : List V).Nodup := by + simp [hq02.symm, ne_of_mem_of_not_mem (hqQ 2) hxQ, + ne_of_mem_of_not_mem (hqQ 2) hyQ, hq12.symm, + ne_of_mem_of_not_mem (hqQ 0) hxQ, ne_of_mem_of_not_mem (hqQ 0) hyQ, + hq01, hxy, ne_of_mem_of_not_mem (hqQ 1) hxQ |>.symm, + ne_of_mem_of_not_mem (hqQ 1) hyQ |>.symm] + exact hcycle (hasCycle_five_of_edges hnd (hQ (hqQ 2) (hqQ 0) hq02.symm) + (mem_exteriorNeighbors.mp hx0).1 hadj (mem_exteriorNeighbors.mp hy1).1.symm + (hQ (hqQ 1) (hqQ 2) hq12)) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FourCycleClassCounts.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FourCycleClassCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..e9c0c2e27a64fab2cfa886cc6dc25f3d76d4b619 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FourCycleClassCounts.lean @@ -0,0 +1,99 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FourCycleResidual + +namespace OAI + +/-! The last three-class pigeonhole step in the four-cycle exclusion. -/ + +namespace CycleClique.Construction +private theorem fin_three_two_of_not {P : Fin 3 → Prop} + (hex : ∃ a b, a ≠ b ∧ P a ∧ P b) {i j : Fin 3} (hi : ¬ P i) (hji : j ≠ i) : P j := by + obtain ⟨a, b, hab, ha, hb⟩ := hex + by_contra hj + have hai : a.val ≠ i.val := fun h => hi (Fin.ext h ▸ ha) + have haj : a.val ≠ j.val := fun h => hj (Fin.ext h ▸ ha) + have hbi : b.val ≠ i.val := fun h => hi (Fin.ext h ▸ hb) + have hbj : b.val ≠ j.val := fun h => hj (Fin.ext h ▸ hb) + have hab' : a.val ≠ b.val := fun h => hab (Fin.ext h) + have hij' : j.val ≠ i.val := fun h => hji (Fin.ext h) + have := a.isLt + have := b.isLt + have := i.isLt + have := j.isLt + omega + +private theorem three_sizes_sum_le_four (c : Fin 3 → ℕ) (hmax : ∀ i, c i ≤ 2) + {j h : Fin 3} (hjh : j ≠ h) (hj : c j ≤ 1) (hh : c h ≤ 1) : + ∑ i, c i ≤ 4 := by + classical + have hbonus : (∑ i : Fin 3, if i = j ∨ i = h then 1 else 0) = 2 := by + have hfilter : (Finset.univ : Finset (Fin 3)).filter (fun i => i = j ∨ i = h) = {j, h} := by + ext i + simp + simp only [Finset.sum_boole, hfilter, Finset.card_pair hjh] + norm_num + have hsum := Finset.sum_le_sum (s := (Finset.univ : Finset (Fin 3))) (f := fun i => + c i + if i = j ∨ i = h then 1 else 0) (g := fun _ => 2) (by + intro i _ + by_cases hi : i = j ∨ i = h + · rcases hi with rfl | rfl <;> simp only [true_or, or_true, ite_true] <;> omega + · simpa only [ite_eq_right hi, Nat.add_zero] using hmax i) + rw [Finset.sum_add_distrib, hbonus] at hsum + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, smul_eq_mul] at hsum + omega + +theorem fourCycle_exterior_residual_total {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} (hcycle : ¬ HasCycle G 4) + (q : Fin 3 → V) (U : Fin 3 → Finset V) + (hU : ∀ i, (U i).Nonempty) (hmax : ∀ i, (U i).card ≤ 2) + (hUi : ∀ i u, u ∈ U i → G.Adj (q i) u) + (hdis : ∀ i j, i ≠ j → Disjoint (U i) (U j)) + (W : Finset V) (hW : W.Nonempty) (hwq : ∀ w ∈ W, ∀ i, w ≠ q i) + (hsees : ∀ w ∈ W, ∃ i j : Fin 3, i ≠ j ∧ + (∀ u ∈ U i, G.Adj w u) ∧ (∀ u ∈ U j, G.Adj w u)) : + (∑ i, (U i).card) + W.card ≤ 6 := by + classical + choose f hf using hU + have hfinj : Function.Injective f := by + intro i j hij + by_contra hne + exact Finset.disjoint_left.mp (hdis i j hne) (hf i) (hij ▸ hf j) + have hWthree : W.card ≤ 3 := fourCycle_three_representatives_bound hcycle f hfinj W (by + intro w hw + obtain ⟨i, j, hij, hi, hj⟩ := hsees w hw + exact ⟨i, j, hij, hi _ (hf i), hj _ (hf j)⟩) + have hfullcard : ∀ w ∈ W, ∀ i, (∀ u ∈ U i, G.Adj w u) → (U i).card ≤ 1 := by + intro w hw i hfull + exact fourCycle_common_neighbors_card hcycle (hwq w hw i).symm (U i) + (fun u hu => ⟨hUi i u hu, hfull u hu⟩) + by_cases htwo : ∃ i, 2 ≤ (U i).card + · obtain ⟨i, hi⟩ := htwo + have hnotfull : ∀ w ∈ W, ¬ ∀ u ∈ U i, G.Adj w u := by + intro w hw hfull + have := hfullcard w hw i hfull + omega + have hotherfull : ∀ w ∈ W, ∀ j, j ≠ i → ∀ u ∈ U j, G.Adj w u := by + intro w hw j hji + exact fin_three_two_of_not (hsees w hw) (hnotfull w hw) hji + obtain ⟨j, _, hj⟩ := Finset.exists_mem_notMem_of_card_lt_card + (show ({i} : Finset (Fin 3)).card < (Finset.univ : Finset (Fin 3)).card by simp) + have hji : j ≠ i := by simpa only [Finset.mem_singleton] using hj + obtain ⟨h, hhj, hhi⟩ := exists_third_fin_three hji + have hWone : W.card ≤ 1 := fourCycle_common_neighbors_card hcycle + (fun he => hhj (hfinj he).symm) W (by + intro w hw + exact ⟨(hotherfull w hw j hji _ (hf j)).symm, + (hotherfull w hw h hhi _ (hf h)).symm⟩) + obtain ⟨w, hw⟩ := hW + obtain ⟨j', h', hjh, hjfull, hhfull⟩ := hsees w hw + have hsum := three_sizes_sum_le_four (fun i => (U i).card) hmax hjh + (hfullcard w hw j' hjfull) (hfullcard w hw h' hhfull) + omega + · have hone : ∀ i, (U i).card ≤ 1 := by intro i; by_contra hn; exact htwo ⟨i, by omega⟩ + have hsum := Finset.sum_le_sum (s := (Finset.univ : Finset (Fin 3))) + (f := fun i => (U i).card) (g := fun _ => 1) (fun i _ => hone i) + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, smul_eq_mul] at hsum + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FourCycleCounts.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FourCycleCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..c69b01d3d305b4fb3de284e9837f807b0655dbd0 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FourCycleCounts.lean @@ -0,0 +1,57 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.SmallPacking + +namespace OAI + +/-! The common-neighbour obstruction to a four-cycle gives sharp small pigeonhole bounds. -/ + +namespace CycleClique.Construction +theorem fourCycle_common_neighbors_unique {V : Type*} {G : SimpleGraph V} + (hcycle : ¬ HasCycle G 4) {x y u v : V} (hxy : x ≠ y) + (hxu : G.Adj x u) (hyu : G.Adj y u) (hxv : G.Adj x v) (hyv : G.Adj y v) : u = v := by + by_contra huv + exact hcycle (hasCycle_four_of_edges hxu hyu.symm hyv hxv.symm hxy huv) + +theorem fourCycle_common_neighbors_card {V : Type*} [DecidableEq V] {G : SimpleGraph V} + (hcycle : ¬ HasCycle G 4) {x y : V} (hxy : x ≠ y) (W : Finset V) + (hW : ∀ w ∈ W, G.Adj x w ∧ G.Adj y w) : W.card ≤ 1 := by + apply Finset.card_le_one.mpr + intro u hu v hv + exact fourCycle_common_neighbors_unique hcycle hxy (hW u hu).1 (hW u hu).2 + (hW v hv).1 (hW v hv).2 + +theorem fourCycle_three_representatives_bound {V : Type*} [DecidableEq V] + {G : SimpleGraph V} (hcycle : ¬ HasCycle G 4) (f : Fin 3 → V) + (hf : Function.Injective f) (W : Finset V) + (hW : ∀ w ∈ W, ∃ i j : Fin 3, i ≠ j ∧ G.Adj w (f i) ∧ G.Adj w (f j)) : + W.card ≤ 3 := by + classical + let A := (Finset.univ : Finset (Fin 3)).powersetCard 2 + have hAcard : A.card = 3 := by decide + have hex : ∀ w : W, ∃ P : A, ∀ i ∈ P.val, G.Adj w.val (f i) := by + intro w + obtain ⟨i, j, hij, hwi, hwj⟩ := hW w.val w.property + refine ⟨⟨{i, j}, ?_⟩, ?_⟩ + · simp only [A, Finset.mem_powersetCard, Finset.subset_univ, Finset.card_pair hij, and_self] + · intro a ha + simp only [Finset.mem_insert, Finset.mem_singleton] at ha + rcases ha with rfl | rfl + · exact hwi + · exact hwj + let pair : W → A := fun w => Classical.choose (hex w) + have hpair : ∀ w : W, ∀ i ∈ (pair w).val, G.Adj w.val (f i) := + fun w => Classical.choose_spec (hex w) + have hinj : Function.Injective pair := by + intro u v huv + have hcard := (Finset.mem_powersetCard.mp (pair u).property).2 + obtain ⟨i, hi, j, hj, hij⟩ := Finset.one_lt_card.mp (by omega : 1 < (pair u).val.card) + apply Subtype.ext + exact fourCycle_common_neighbors_unique hcycle (fun h => hij (hf h)) + (hpair u i hi).symm (hpair u j hj).symm + (hpair v i (by simpa only [huv] using hi)).symm + (hpair v j (by simpa only [huv] using hj)).symm + have hc := Fintype.card_le_of_injective pair hinj + simpa only [Fintype.card_coe, hAcard] using hc + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FourCycleResidual.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FourCycleResidual.lean new file mode 100644 index 0000000000000000000000000000000000000000..76e0e0d9303217a61db6731dee6b4a4c0d49606b --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FourCycleResidual.lean @@ -0,0 +1,69 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.SmallIndependent +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FourCycleCounts + +namespace OAI + +/-! A residual vertex sees all of at least two triangle exterior classes. -/ + +namespace CycleClique.Construction +theorem fourCycle_residual_sees_two {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q : Finset V} (hQ : G.IsClique (Q : Set V)) (hQcard : Q.card = 3) + (hcycle : ¬ HasCycle G 4) (hbound : IndependenceBound G 3) + (q : Fin 3 → V) (hq : Function.Injective q) (hqQ : ∀ i, q i ∈ Q) + {w : V} (hwQ : w ∉ Q) (hw : ∀ x ∈ Q, ¬ G.Adj w x) : + ∃ i j : Fin 3, i ≠ j ∧ + (∀ u ∈ exteriorNeighbors G Q (q i), G.Adj w u) ∧ + (∀ v ∈ exteriorNeighbors G Q (q j), G.Adj w v) := by + classical + let Full := fun i : Fin 3 => ∀ u ∈ exteriorNeighbors G Q (q i), G.Adj w u + have hpair : ∀ i j : Fin 3, i ≠ j → Full i ∨ Full j := by + intro i j hij + by_contra hn + simp only [not_or] at hn + obtain ⟨u, hnu⟩ := not_forall.mp hn.1 + obtain ⟨hu, hwu⟩ := not_imp.mp hnu + obtain ⟨v, hnv⟩ := not_forall.mp hn.2 + obtain ⟨hv, hwv⟩ := not_imp.mp hnv + obtain ⟨h, hhi, hhj⟩ := exists_third_fin_three hij + have hdis := fourCycle_triangle_exterior_disjoint hQ hQcard hcycle (hqQ i) (hqQ j) + (fun he => hij (hq he)) + have huv : u ≠ v := fun he => Finset.disjoint_left.mp hdis hu (he ▸ hv) + have huQ := (mem_exteriorNeighbors.mp hu).2 + have hvQ := (mem_exteriorNeighbors.mp hv).2 + have hwu' : w ≠ u := by + intro he + exact hw (q i) (hqQ i) (by rw [he]; exact (mem_exteriorNeighbors.mp hu).1.symm) + have hwv' : w ≠ v := by + intro he + exact hw (q j) (hqQ j) (by rw [he]; exact (mem_exteriorNeighbors.mp hv).1.symm) + have huqh : ¬ G.Adj u (q h) := by + intro hadj + have hother : u ∈ exteriorNeighbors G Q (q h) := mem_exteriorNeighbors.mpr ⟨hadj.symm, huQ⟩ + exact Finset.disjoint_left.mp + (fourCycle_triangle_exterior_disjoint hQ hQcard hcycle (hqQ i) (hqQ h) + (fun he => hhi (hq he).symm)) hu hother + have hvqh : ¬ G.Adj v (q h) := by + intro hadj + have hother : v ∈ exteriorNeighbors G Q (q h) := mem_exteriorNeighbors.mpr ⟨hadj.symm, hvQ⟩ + exact Finset.disjoint_left.mp + (fourCycle_triangle_exterior_disjoint hQ hQcard hcycle (hqQ j) (hqQ h) + (fun he => hhj (hq he).symm)) hv hother + have hnd : ([w, u, v, q h] : List V).Nodup := by + simp [hwu', hwv', ne_of_mem_of_not_mem (hqQ h) hwQ |>.symm, huv, + ne_of_mem_of_not_mem (hqQ h) huQ |>.symm, ne_of_mem_of_not_mem (hqQ h) hvQ |>.symm] + have hfour := independent_four_card_bound hbound hnd hwu hwv (hw _ (hqQ h)) + (fourCycle_triangle_exterior_anticomplete hQ hcycle (hqQ i) (hqQ j) + (fun he => hij (hq he)) hu hv) huqh hvqh + omega + have h01 := hpair 0 1 (by decide) + have h02 := hpair 0 2 (by decide) + have h12 := hpair 1 2 (by decide) + by_cases h0 : Full 0 + · by_cases h1 : Full 1 + · exact ⟨0, 1, by decide, h0, h1⟩ + · exact ⟨0, 2, by decide, h0, h12.resolve_left h1⟩ + · exact ⟨1, 2, by decide, h01.resolve_left h0, h02.resolve_left h0⟩ + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FullLargeClique.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FullLargeClique.lean new file mode 100644 index 0000000000000000000000000000000000000000..19385bcc9b83ef35f23cd7a6a87930736cbc3906 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FullLargeClique.lean @@ -0,0 +1,81 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.BfsColouredCycle +import OAI.Combinatorics.Ramsey.CycleClique.Construction.BfsOneBranch +import OAI.Combinatorics.Ramsey.CycleClique.Construction.DenseSubgraph +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LargeClique + +namespace OAI + +/-! The quantitative clique bound of manuscript Theorem `clq:bound`. -/ + +namespace CycleClique.Construction +private theorem dense_layer_forces_cycle {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {root : V} {Y : Finset V} {d s k : ℕ} + (hs : 4 ≤ s) (hk : 2 * s ≤ k) (hk' : k ≤ 2 * s + 1) + (hd : d ≤ s) (hcard : k ≤ Y.card) + (hlayer : ∀ v ∈ Y, G.Reachable root v ∧ G.dist root v = d) + (hconn : (G.induce (Y : Set V)).Connected) + (hnonbip : ¬ (G.induce (Y : Set V)).IsBipartite) (hno : G.cliqueNum < s) + (hdegree : ∀ v : Y, s ≤ ((G.induce (Y : Set V)).neighborSet v).ncard) + (hpair : ∀ a b : Y, a ≠ b → ¬ G.Adj a.val b.val → + 2 * s ≤ (closedNeighborhood (G.induce (Y : Set V)) {a, b}).card) : + HasCycle G (k + 1) := by + obtain ⟨p, hp, hpd, c, χ, hχ, hcommon, hsplit⟩ := + exists_bfs_branch_partition (by omega) hlayer + by_cases hpone : p = 1 + · subst p + exact layer_cycle_of_one_predecessor (by omega) hk' hcard hpd hlayer hconn hdegree c hcommon + · exact layer_cycle_of_two_branches hs hk hk' (by omega) (hpd.trans hd) hpd + hlayer hconn hnonbip hno hdegree hpair c χ hχ hcommon hsplit + +/-- Manuscript Theorem `clq:bound`, with expansion and exact forbidden cycle as hypotheses. -/ +theorem large_clique_bounds {V : Type*} [Fintype V] [DecidableEq V] {G : SimpleGraph V} + {k a : ℕ} (hk : 3 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) + (hcard : Fintype.card V = k * a + 1) (hI : IndependenceBound G a) + (hcycle : ¬ HasCycle G (k + 1)) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) : + max 3 (k / 2) ≤ G.cliqueNum ∧ G.cliqueNum ≤ k := by + classical + obtain ⟨htriangle, hupper⟩ := triangle_clique_bounds hk ha hak hcard hI hcycle + refine ⟨?_, hupper⟩ + by_cases hk7 : k ≤ 7 + · omega + · have hk8 : 8 ≤ k := by omega + let s := k / 2 + have hs : 4 ≤ s := by dsimp [s]; omega + have hks : 2 * s ≤ k := by dsimp [s]; omega + have hks' : k ≤ 2 * s + 1 := by dsimp [s]; omega + have hhalf : s ≤ G.cliqueNum := by + by_contra hsmall + have hno : G.cliqueNum < s := by omega + have hIk : IndependenceBound G k := fun I hi => (hI I hi).trans hak + let : Nonempty V := Fintype.card_pos_iff.mp (by omega : 0 < Fintype.card V) + let root : V := Classical.choice inferInstance + by_cases heven : k = 2 * s + · have hInd : IndependenceBound G (2 * s) := by simpa only [← heven] using hIk + have hExp : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + 2 * s * I.card + 1 ≤ (closedNeighborhood G I).card := by + simpa only [← heven] using hexpand + obtain ⟨d, _, hds, Y, hYD, _, hconn, hnonbip, hYcard, hdegree, hpair⟩ := + dense_layer_interface_even hs hno hInd hExp root + have hlayer : ∀ v ∈ Y, G.Reachable root v ∧ G.dist root v = d := + fun v hv => mem_distanceLayer.mp (hYD hv) + exact hcycle (dense_layer_forces_cycle hs hks hks' hds (by omega) hlayer + hconn hnonbip hno hdegree hpair) + · have hodd : k = 2 * s + 1 := by omega + have hInd : IndependenceBound G (2 * s + 1) := by simpa only [← hodd] using hIk + have hExp : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + (2 * s + 1) * I.card + 1 ≤ (closedNeighborhood G I).card := by + simpa only [← hodd] using hexpand + obtain ⟨d, _, hds, Y, hYD, _, hconn, hnonbip, hYcard, hdegree, hpair⟩ := + dense_layer_interface_odd hs hno hInd hExp root + have hlayer : ∀ v ∈ Y, G.Reachable root v ∧ G.dist root v = d := + fun v hv => mem_distanceLayer.mp (hYD hv) + exact hcycle (dense_layer_forces_cycle hs hks hks' hds (by omega) hlayer + hconn hnonbip hno hdegree hpair) + dsimp [s] at hhalf + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/GlobalLongest.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/GlobalLongest.lean new file mode 100644 index 0000000000000000000000000000000000000000..b24b699036df981553828bf21843d8b5c6694849 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/GlobalLongest.lean @@ -0,0 +1,75 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ClosedIndexed + +namespace OAI + +/-! Longest paths and the elementary fact that a closed longest path spans a connected graph. -/ + +namespace CycleClique.Construction +theorem exists_longest_path {V : Type*} [Fintype V] [Nonempty V] (G : SimpleGraph V) : + ∃ r, ∃ f : Fin (r + 1) → V, IsIndexedPath G f ∧ + ∀ q (g : Fin (q + 1) → V), IsIndexedPath G g → q ≤ r := by + classical + let x : V := Classical.choice inferInstance + let b := Fintype.card V - 1 + have hex : ∃ d, ∃ r, ∃ f : Fin (r + 1) → V, IsIndexedPath G f ∧ r + d = b := by + refine ⟨b, 0, fun _ => x, ⟨?_, ?_⟩, by omega⟩ + · intro i j _ + apply Fin.ext + have := i.isLt + have := j.isLt + omega + · exact fun i => Fin.elim0 i + obtain ⟨r, f, hf, hd⟩ := Nat.find_spec hex + refine ⟨r, f, hf, ?_⟩ + intro q g hg + have hcard := Fintype.card_le_of_injective g hg.1 + simp only [Fintype.card_fin] at hcard + have hqb : q ≤ b := by dsimp [b]; omega + have hmin := Nat.find_min' hex + (show ∃ r, ∃ f : Fin (r + 1) → V, IsIndexedPath G f ∧ r + (b - q) = b from + ⟨q, g, hg, Nat.add_sub_of_le hqb⟩) + omega + +theorem indexedPath_reverse {V : Type*} {G : SimpleGraph V} {r : ℕ} + {f : Fin (r + 1) → V} (hf : IsIndexedPath G f) : + IsIndexedPath G (f ∘ Fin.rev) := by + refine ⟨hf.1.comp Fin.rev_injective, ?_⟩ + intro i + simpa only [Function.comp_apply, Fin.rev_castSucc, Fin.rev_succ] using (hf.2 i.rev).symm + +theorem connected_edge_leaving {V : Type*} {G : SimpleGraph V} (hconn : G.Connected) + {W : Set V} {u v : V} (hu : u ∈ W) (hv : v ∉ W) : + ∃ a ∈ W, ∃ b ∉ W, G.Adj a b := by + classical + obtain ⟨p⟩ := hconn.preconnected u v + have hcut : ∀ {x y : V}, G.Walk x y → x ∈ W → y ∉ W → + ∃ a ∈ W, ∃ b ∉ W, G.Adj a b := by + intro x y q + induction q with + | nil => intro hx hy; exact False.elim (hy hx) + | @cons x z y hxz q ih => + intro hx hy + by_cases hz : z ∈ W + · exact ih hz hy + · exact ⟨x, hx, z, hz, hxz⟩ + exact hcut p hu hv + +theorem closed_longest_path_surjective {V : Type*} {G : SimpleGraph V} {r : ℕ} + (hconn : G.Connected) {f : Fin (r + 1) → V} (hf : IsIndexedPath G f) + (hmax : ∀ q (g : Fin (q + 1) → V), IsIndexedPath G g → q ≤ r) + (hclose : G.Adj (f (Fin.last r)) (f 0)) : Function.Surjective f := by + intro v + by_contra hv + have hv' : v ∉ Set.range f := hv + obtain ⟨a, ⟨j, rfl⟩, b, hb, hab⟩ := connected_edge_leaving hconn + (show f 0 ∈ Set.range f from ⟨0, rfl⟩) hv' + obtain ⟨g, hg, hlast, hrange⟩ := indexedPath_closed_ending hf hclose j + have hb' : b ∉ Set.range g := by rwa [hrange] + have hadj : G.Adj (g (Fin.last r)) b := by rwa [hlast] + have hp := indexedPath_snoc hg hb' hadj + have h := hmax (r + 1) (Fin.snoc g b) hp + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/GraphCopies.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/GraphCopies.lean new file mode 100644 index 0000000000000000000000000000000000000000..5592661cbf92906c686c4172728e8b498daead37 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/GraphCopies.lean @@ -0,0 +1,62 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Definitions +import OAI.Combinatorics.Ramsey.CycleClique.Basic + +namespace OAI + +/-! Equivalence between labelled cycles and copies of the Mathlib cycle graph. -/ + +namespace CycleClique.Construction + +open scoped SimpleGraph + +theorem hasCycle_iff_copy {V : Type*} {G : SimpleGraph V} {m : ℕ} (hm : 3 ≤ m) : + HasCycle G m ↔ SimpleGraph.cycleGraph m ⊑ G := by + obtain ⟨k, rfl⟩ : ∃ k, m = k + 2 := ⟨m - 2, by omega⟩ + have hnext (i : Fin (k + 2)) : cycleNext i = i + 1 := by + apply Fin.ext + simp [cycleNext, Fin.val_add] + constructor + · rintro ⟨f, hf, he⟩ + refine ⟨⟨⟨f, ?_⟩, hf⟩⟩ + intro i j hij + rcases SimpleGraph.cycleGraph_adj.mp hij with hij | hij + · have h : i = j + 1 := (sub_eq_iff_eq_add').mp hij + rw [h] + exact (hnext j ▸ he j).symm + · have h : j = i + 1 := (sub_eq_iff_eq_add').mp hij + rw [h] + exact hnext i ▸ he i + · rintro ⟨f⟩ + refine ⟨f, f.injective, fun i => f.toHom.map_adj ?_⟩ + rw [hnext] + apply SimpleGraph.cycleGraph_adj.mpr + exact Or.inr (add_sub_cancel_left i 1) + +theorem hasIndependent_iff_copy {V : Type*} {G : SimpleGraph V} {n : ℕ} : + HasIndependent G n ↔ (⊤ : SimpleGraph (Fin n)) ⊑ Gᶜ := by + constructor + · rintro ⟨f, hf, he⟩ + refine ⟨⟨⟨f, ?_⟩, hf⟩⟩ + intro i j hij + exact ⟨fun h => hij (hf h), he i j⟩ + · rintro ⟨f⟩ + refine ⟨f, f.injective, ?_⟩ + intro i j + by_cases hij : i = j + · subst j + exact G.loopless.irrefl _ + · exact (f.toHom.map_adj hij).2 + +theorem ramseyProperty_iff {m n N : ℕ} (hm : 3 ≤ m) : + RamseyProperty m n N ↔ CycleClique.RamseyProperty m n N := by + simp only [RamseyProperty, CycleClique.RamseyProperty, hasCycle_iff_copy hm, + hasIndependent_iff_copy] + +theorem isRamseyNumber_iff {m n N : ℕ} (hm : 3 ≤ m) : + IsRamseyNumber m n N ↔ + CycleClique.RamseyProperty m n N ∧ ∀ M < N, ¬ CycleClique.RamseyProperty m n M := by + simp only [IsRamseyNumber, ramseyProperty_iff hm] + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/IndependentPacking.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/IndependentPacking.lean new file mode 100644 index 0000000000000000000000000000000000000000..4c1f2641db6b0c0c33bc9372e6a4d0ea1ed9a76c --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/IndependentPacking.lean @@ -0,0 +1,98 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Reduction +import Mathlib.Algebra.BigOperators.Group.Finset.Basic + +namespace OAI + +/-! Combining independent sets in disjoint anticomplete regions. -/ + +namespace CycleClique.Construction +variable {V ι : Type*} + +theorem HasIndependent.mono {G : SimpleGraph V} {m n : ℕ} + (h : HasIndependent G m) (hnm : n ≤ m) : HasIndependent G n := by + obtain ⟨f, hf, hadj⟩ := h + exact ⟨f ∘ Fin.castLE hnm, hf.comp (Fin.castLE_injective hnm), + fun i j => hadj (Fin.castLE hnm i) (Fin.castLE hnm j)⟩ + +/-- A labelled independent set in an induced region supplies an actual +ambient finset of exactly the certified weight. -/ +theorem exists_independent_subset {G : SimpleGraph V} {Y : Finset V} {n : ℕ} + (h : HasIndependent (G.induce (Y : Set V)) n) : + ∃ I : Finset V, I ⊆ Y ∧ G.IsIndepSet (I : Set V) ∧ I.card = n := by + classical + obtain ⟨f, hf, hadj⟩ := h + let g : Fin n → V := fun i => (f i).val + have hg : Function.Injective g := Subtype.val_injective.comp hf + refine ⟨Finset.univ.image g, ?_, ?_, ?_⟩ + · intro v hv + obtain ⟨i, _, rfl⟩ := Finset.mem_image.mp hv + exact (f i).property + · intro v hv w hw _ + obtain ⟨i, _, rfl⟩ := Finset.mem_image.mp hv + obtain ⟨j, _, rfl⟩ := Finset.mem_image.mp hw + exact hadj i j + · simp [Finset.card_image_of_injective _ hg] + +theorem HasIndependent.le_indepNum [Fintype V] {G : SimpleGraph V} {n : ℕ} + (h : HasIndependent G n) : n ≤ G.indepNum := by + classical + obtain ⟨f, hf, hadj⟩ := h + let I := Finset.univ.image f + have hI : G.IsIndepSet (I : Set V) := by + intro x hx y hy _ + obtain ⟨i, _, rfl⟩ := Finset.mem_image.mp hx + obtain ⟨j, _, rfl⟩ := Finset.mem_image.mp hy + exact hadj i j + have hc : I.card = n := by simp [I, Finset.card_image_of_injective _ hf] + simpa [hc] using hI.card_le_indepNum + +theorem hasIndependent_iff_le_indepNum [Fintype V] {G : SimpleGraph V} {n : ℕ} : + HasIndependent G n ↔ n ≤ G.indepNum := by + classical + refine ⟨HasIndependent.le_indepNum, fun hn => ?_⟩ + obtain ⟨I, hI⟩ := G.exists_isNIndepSet_indepNum + have hni : n ≤ I.card := by simpa only [hI.card_eq] using hn + obtain ⟨J, hJI, hJ⟩ := Finset.exists_subset_card_eq hni + let e : Fin n ≃ J := (Finset.equivFinOfCardEq hJ).symm + refine ⟨fun i => (e i).val, Subtype.val_injective.comp e.injective, ?_⟩ + intro i j hadj + exact hI.isIndepSet (hJI (e i).property) (hJI (e j).property) + (G.ne_of_adj hadj) hadj + +theorem hasIndependent_induce_mono {G : SimpleGraph V} {Y Z : Finset V} {n : ℕ} + (hYZ : Y ⊆ Z) (h : HasIndependent (G.induce (Y : Set V)) n) : + HasIndependent (G.induce (Z : Set V)) n := by + let f : Y → Z := fun v => ⟨v.val, hYZ v.property⟩ + have hf : Function.Injective f := by + intro a b he + exact Subtype.ext (congrArg (fun z : Z => z.val) he) + exact h.map f hf (fun h => h) + +theorem hasIndependent_one_of_nonempty {G : SimpleGraph V} {Y : Finset V} + (hY : Y.Nonempty) : HasIndependent (G.induce (Y : Set V)) 1 := by + obtain ⟨v, hv⟩ := hY + exact ⟨fun _ => ⟨v, hv⟩, fun _ _ _ => Subsingleton.elim _ _, fun _ _ h => G.irrefl h⟩ + +/-- The exact counting step behind both the terminal and finite packing +tests. The regions may have different certified weights. -/ +theorem independent_packing [DecidableEq V] {G : SimpleGraph V} {k : ℕ} + (hbound : IndependenceBound G k) (F : Finset ι) (I : ι → Finset V) + (hind : ∀ i ∈ F, G.IsIndepSet (I i : Set V)) + (hdis : (F : Set ι).PairwiseDisjoint I) + (hanti : ∀ i ∈ F, ∀ j ∈ F, i ≠ j → ∀ x ∈ I i, ∀ y ∈ I j, ¬ G.Adj x y) : + ∑ i ∈ F, (I i).card ≤ k := by + classical + have hUnion : G.IsIndepSet ((F.biUnion I : Finset V) : Set V) := by + intro x hx y hy hxy + obtain ⟨i, hi, hx⟩ := Finset.mem_biUnion.mp hx + obtain ⟨j, hj, hy⟩ := Finset.mem_biUnion.mp hy + by_cases hij : i = j + · subst j + exact hind i hi hx hy hxy + · exact hanti i hi j hj hij x hx y hy + have hc := hbound (F.biUnion I) hUnion + simpa only [Finset.card_biUnion hdis] using hc + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorChainSelection.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorChainSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..46e8487738c372bb424e613488518fc9cdd8daa4 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorChainSelection.lean @@ -0,0 +1,127 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.AssignedUniqueness +import OAI.Combinatorics.Ramsey.CycleClique.Construction.AssignedProfileOperations + +namespace OAI + +/-! Select both internal vertices of a single amount-two component, and +otherwise all forward internal representatives of that component. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type*} {Q : Finset V} + +namespace AssignedAmounts + +theorem chain_length {l : List V} {w : List ℕ} (h : AssignedAmounts Q l w) (hne : l ≠ []) : + l.length = w.sum + w.length + 1 := by + induction h with + | nil => exact False.elim (hne rfl) + | singleton => simp + | @step x y J B w hx hy hJ hJne ht ih => + have hh := ih (by simp) + simp only [List.length_cons, List.length_append, List.sum_cons] at hh ⊢ + omega + +theorem amount_two_shape {l : List V} {w : List ℕ} (h : AssignedAmounts Q l w) (hw : w = [2]) : + ∃ q u v r, l = [q, u, v, r] ∧ q ∈ Q ∧ r ∈ Q ∧ u ∉ Q ∧ v ∉ Q := by + cases h with + | nil => simp at hw + | singleton => simp at hw + | @step q r J B w hq hr hJ hJne ht => + have hh : J.length = 2 ∧ w = [] := List.cons.inj hw + obtain ⟨hlen, rfl⟩ := hh + cases ht with + | singleton hr => + obtain ⟨u, v, rfl⟩ := List.length_eq_two.mp hlen + exact ⟨q, u, v, r, rfl, hq, hr, hJ u (by simp), hJ v (by simp)⟩ + +end AssignedAmounts + +noncomputable def interiorRepresentatives (Q : Finset V) (l : List V) : List V := + (chainRepresentatives Q l).tail + +noncomputable def selectedChain (Q : Finset V) (l : List V) : List V := + if l.length = 4 then (l.drop 1).take 2 else interiorRepresentatives Q l + +theorem interiorRepresentatives_sublist (l : List V) : + (interiorRepresentatives Q l).Sublist l := + (List.tail_sublist _).trans (chainRepresentatives_sublist l) + +theorem interiorRepresentatives_outside {l : List V} + (hsteps : l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q))) : + ∀ x ∈ interiorRepresentatives Q l, x ∉ Q := by + cases l with + | nil => simp [interiorRepresentatives, chainRepresentatives] + | cons prev xs => exact representativesFrom_outside hsteps + +theorem interiorRepresentatives_length {l : List V} {w : List ℕ} + (h : AssignedAmounts Q l w) (hlast : ∀ v ∈ l.getLast?, v ∈ Q) : + (interiorRepresentatives Q l).length = w.length := by + rw [interiorRepresentatives, List.length_tail, chainRepresentatives_length l hlast, h.length_eq] + +theorem selectedChain_sublist (l : List V) : (selectedChain Q l).Sublist l := by + unfold selectedChain + split_ifs + · exact (List.take_sublist _ _).trans (List.drop_sublist _ _) + · exact interiorRepresentatives_sublist l + +theorem twice_length_le_sum {w : List ℕ} (h : ∀ a ∈ w, 2 ≤ a) : + 2 * w.length ≤ w.sum := by + induction w with + | nil => simp + | cons a w ih => + have ha := h a (by simp) + have ht := ih (fun a ha => h a (by simp [ha])) + simp only [List.length_cons, Nat.mul_succ, List.sum_cons] + omega + +theorem amount_profile_eq_two_of_length_four {l : List V} {w : List ℕ} + (h : AssignedAmounts Q l w) (hl : l.length = 4) (hmin : ∀ a ∈ w, 2 ≤ a) : w = [2] := by + have hne : l ≠ [] := by intro he; simp [he] at hl + have hlen := h.chain_length hne + have hbound := twice_length_le_sum hmin + have hW : w.length = 1 := by + by_cases hw : w = [] + · simp only [hw, List.length_nil, List.sum_nil] at hlen + omega + · have hp := List.length_pos_iff.mpr hw + omega + obtain ⟨a, rfl⟩ := List.length_eq_one_iff.mp hW + simp only [List.sum_cons, List.sum_nil, Nat.add_zero, List.length_cons, List.length_nil] at hlen + have ha : a = 2 := by omega + simp only [ha] + +theorem selectedChain_outside {l : List V} {w : List ℕ} + (h : AssignedAmounts Q l w) (hmin : ∀ a ∈ w, 2 ≤ a) + (hsteps : l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q))) : + ∀ x ∈ selectedChain Q l, x ∉ Q := by + unfold selectedChain + split_ifs with hlen + · obtain ⟨q, u, v, r, rfl, _, _, hu, hv⟩ := + h.amount_two_shape (amount_profile_eq_two_of_length_four h hlen hmin) + simpa using (show ∀ x ∈ [u, v], x ∉ Q by simp [hu, hv]) + · exact interiorRepresentatives_outside hsteps + +theorem selectedChain_length_bounds {l : List V} {w : List ℕ} + (h : AssignedAmounts Q l w) (hw : w ≠ []) (hmin : ∀ a ∈ w, 2 ≤ a) + (hlast : ∀ v ∈ l.getLast?, v ∈ Q) : + (selectedChain Q l).length + (if l.length = 4 then 0 else 1) = w.length + 1 ∧ + w.length + 1 + (if l.length = 4 then 0 else 1) ≤ w.sum := by + have hlnil : l ≠ [] := by intro he; subst l; cases h; simp at hw + have hlen := h.chain_length hlnil + have hbound := twice_length_le_sum hmin + have hpos := List.length_pos_iff.mpr hw + by_cases hl : l.length = 4 + · have hW := amount_profile_eq_two_of_length_four h hl hmin + simp [selectedChain, hl, List.length_take, hW] + · have hsel : (selectedChain Q l).length = w.length := by + simpa only [selectedChain, hl, ↓reduceIte] using interiorRepresentatives_length h hlast + simp only [hl, ↓reduceIte, hsel] + constructor + · trivial + · omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorDetour.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorDetour.lean new file mode 100644 index 0000000000000000000000000000000000000000..16d31514baf0cc8dfe6ad813ef7a4658c283697a --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorDetour.lean @@ -0,0 +1,144 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawRestrict +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OutsideChainTemplate +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalIncrementProfiles + +namespace OAI + +/-! No short outside path can join the two internal vertices of an old +amount-two path: its detour would absorb that old assigned path. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} {S : ExpandedPathSystem G Q} + +theorem IsOptimal.forbidden_amount_two_detour {k d : ℕ} + (hopt : S.IsOptimal k) (ht : 9 ≤ Q.card) (hQk : Q.card ≤ k) + (hkQ : k ≤ 2 * Q.card + 1) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hd : 1 ≤ d) (hd' : d ≤ 6) + {P R : List (List V)} {A B : List V} {q r u v : V} + (hsys : S.chains = P ++ (A ++ q :: u :: v :: r :: B) :: R) + (hq : q ∈ Q) (hr : r ∈ Q) (hu : u ∉ Q) (hv : v ∉ Q) : + ¬ OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) u v d := by + classical + intro houtside + obtain ⟨J, hJ, hJlen, hJout, hpath⟩ := houtside.interior + have hJQ : ∀ z ∈ J, z ∉ Q := fun z hz hzQ => hJout z hz (Or.inl hzQ) + have hJne : J ≠ [] := by intro he; simp only [he, List.length_nil] at hJlen; omega + let old := A ++ q :: u :: v :: r :: B + have holdmem : old ∈ S.chains := by simp [old, hsys] + have hrest : (P ++ R).Sublist S.toRaw.chains := by + change (P ++ R).Sublist S.chains + rw [hsys] + exact (List.Sublist.refl P).append ((List.Sublist.refl R).cons _) + let U := S.toRaw.restrictChains (P ++ R) hrest + have hperm : (U.chains.flatten ++ ((A ++ [q]) ++ u :: v :: r :: B)).Perm S.chains.flatten := by + apply List.perm_iff_count.mpr + intro z + simp only [U, RawPathSystem.restrictChains, hsys, List.flatten_append, List.flatten_cons, + List.count_append, List.count_cons, List.count_nil] + omega + have hflat : (U.chains.flatten ++ ((A ++ [q]) ++ u :: v :: r :: B)).Nodup := + hperm.nodup_iff.mpr S.flatten_nodup + have hdis : J.Disjoint (U.chains.flatten ++ ((A ++ [q]) ++ u :: v :: r :: B)) := by + apply List.disjoint_left.mpr + intro z hz hzold + exact hJout z hz (Or.inr (List.mem_toFinset.mpr (hperm.mem_iff.mp hzold))) + have holdsplit : old = ((A ++ [q]) ++ [u]) ++ (v :: r :: B) := by + simp [old, List.append_assoc] + have hleft : ((A ++ [q]) ++ [u]).IsChain G.Adj := by + exact (List.isChain_append.mp (holdsplit ▸ (S.paths old holdmem).2)).1 + have hright : (v :: r :: B).IsChain G.Adj := by + exact (List.isChain_append.mp (holdsplit ▸ (S.paths old holdmem).2)).2.1 + have hleftSteps : ((A ++ [q]) ++ [u]).IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q)) := by + exact (List.isChain_append.mp (holdsplit ▸ S.no_clique_steps old holdmem)).1 + have hrightSteps : (v :: r :: B).IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q)) := by + exact (List.isChain_append.mp (holdsplit ▸ S.no_clique_steps old holdmem)).2.1 + have hstart : ∀ z ∈ ((A ++ [q]) ++ [u]).head?, z ∈ Q := by + intro z hz + apply (S.endpoints old holdmem).1 z + rw [holdsplit] + exact List.mem_head?_append_of_mem_head? hz + have hfinish : ∀ z ∈ (v :: r :: B).getLast?, z ∈ Q := by + intro z hz + apply (S.endpoints old holdmem).2 z + rw [holdsplit, List.getLast?_append, + List.getLast?_eq_some_getLast (show v :: r :: B ≠ [] by simp)] + simpa only [List.getLast?_eq_some_getLast (show v :: r :: B ≠ [] by simp), Option.or] using hz + obtain ⟨T, hT, hTa, _, _⟩ := U.expand_outside_template hflat hleft hright hstart hfinish + hleftSteps hrightSteps hJ hJne hJQ hdis hpath + have hamount : T.amount = S.amount + d := by + have hs := (hperm.filter (fun z => decide (z ∉ Q))).length_eq + change chainOutsideCount Q (U.chains.flatten ++ ((A ++ [q]) ++ u :: v :: r :: B)) = + chainOutsideCount Q S.chains.flatten at hs + have hSoutside : chainOutsideCount Q S.chains.flatten = S.amount := by + exact S.toRaw.amount_eq_outside_count.symm + rw [hSoutside] at hs + omega + have hpreEnds : (∀ z ∈ (A ++ [q]).head?, z ∈ Q) ∧ + (∀ z ∈ (A ++ [q]).getLast?, z ∈ Q) := by + refine ⟨?_, by simpa using hq⟩ + intro z hz + apply (S.endpoints old holdmem).1 z + simpa [old, List.append_assoc] using List.mem_head?_append_of_mem_head? + (t := u :: v :: r :: B) hz + have hpreSteps : (A ++ [q]).IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q)) := + (List.isChain_append.mp hleftSteps).1 + have hsufEnds : (∀ z ∈ (r :: B).head?, z ∈ Q) ∧ + (∀ z ∈ (r :: B).getLast?, z ∈ Q) := by + refine ⟨by simpa using hr, ?_⟩ + intro z hz + apply hfinish z + cases B with + | nil => simpa using hz + | cons b B => simpa using hz + have hsufSteps : (r :: B).IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q)) := + (List.isChain_cons.mp hrightSteps).2 + obtain ⟨wa, hwa⟩ := exists_assignedAmounts hpreEnds hpreSteps + obtain ⟨wb, hwb⟩ := exists_assignedAmounts hsufEnds hsufSteps + have hOldProfile : AssignedAmounts Q old (wa ++ 2 :: wb) := by + have hh := hwa.append_segment (by simp) (J := [u, v]) (by simp [hu, hv]) (by simp) hwb + simpa [old, List.append_assoc] using hh + have hNewProfile : AssignedAmounts Q ((A ++ [q]) ++ u :: (J ++ v :: r :: B)) + (wa ++ (d + 2) :: wb) := by + have hOutside : ∀ z ∈ u :: (J ++ [v]), z ∉ Q := by + intro z hz + simp only [List.mem_cons, List.mem_append, List.not_mem_nil, or_false] at hz + rcases hz with rfl | hz | rfl + · exact hu + · exact hJQ z hz + · exact hv + have hh := hwa.append_segment (by simp) hOutside (by simp) hwb + simpa [List.append_assoc, hJlen, Nat.add_comm, Nat.add_left_comm, Nat.add_assoc] using hh + obtain ⟨wp, hp⟩ := S.toRaw.exists_subchain_profile P (by intro l hl; change l ∈ S.chains; simp [hsys, hl]) + obtain ⟨wr, hr'⟩ := S.toRaw.exists_subchain_profile R (by intro l hl; change l ∈ S.chains; simp [hsys, hl]) + let original := wp ++ (wa ++ 2 :: wb) ++ wr + let kept := wp ++ wa ++ wb ++ wr + let output := (wp ++ wr) ++ (wa ++ (d + 2) :: wb) + have ho : SystemAssignedAmounts Q S.toRaw.chains original := by + rw [show S.toRaw.chains = P ++ old :: R by + change S.chains = P ++ old :: R + simpa [old] using hsys] + simpa only [original, List.append_assoc] using hp.append (.cons hOldProfile hr') + have ht' : SystemAssignedAmounts Q T.chains output := by + rw [hT] + change SystemAssignedAmounts Q ((P ++ R) ++ [_]) output + simpa [output] using (hp.append hr').append (.cons hNewProfile .nil) + have horig : original.Perm (kept ++ [2]) := by + apply List.perm_iff_count.mpr + intro z + simp only [original, kept, List.count_append, List.count_cons, List.count_nil] + omega + have hout : output.Perm ((d + 2) :: kept) := by + apply List.perm_iff_count.mpr + intro z + simp only [output, kept, List.count_append, List.count_cons] + omega + obtain ⟨_, _, _, ha, _⟩ := hopt.terminal_increment_profiles ht hQk hkQ hQ hcycle hd hd' + S.toRaw T (by simp) (by simp) ho ht' horig hout hamount + omega + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorOrientations.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorOrientations.lean new file mode 100644 index 0000000000000000000000000000000000000000..34ad750ba5091efec7400293004d5898ff9be9e2 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorOrientations.lean @@ -0,0 +1,78 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.InteriorSystemSelection +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawOrientations + +namespace OAI + +/-! Each selected internal vertex is a representative in one orientation; +vertices in different components may be oriented independently. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +namespace SystemAssignedAmounts + +theorem profile_of_mem {C : List (List V)} {w : List ℕ} + (h : SystemAssignedAmounts Q C w) {l : List V} (hl : l ∈ C) : + ∃ a, AssignedAmounts Q l a ∧ ∀ x ∈ a, x ∈ w := by + induction h with + | nil => simp at hl + | @cons l' C a w ha hw ih => + rcases List.mem_cons.mp hl with rfl | hl + · exact ⟨a, ha, fun x hx => List.mem_append_left _ hx⟩ + · obtain ⟨a', ha', hsub⟩ := ih hl + exact ⟨a', ha', fun x hx => List.mem_append_right _ (hsub x hx)⟩ + +end SystemAssignedAmounts + +theorem selectedChain_orientation {l : List V} {w : List ℕ} + (h : AssignedAmounts Q l w) (hmin : ∀ a ∈ w, 2 ≤ a) {x : V} + (hx : x ∈ selectedChain Q l) : + ∃ b : Bool, x ∈ chainRepresentatives Q (RawPathSystem.orientedChain (fun _ => b) l) := by + by_cases hl : l.length = 4 + · obtain ⟨q, u, v, r, rfl, hq, hr, hu, hv⟩ := + h.amount_two_shape (amount_profile_eq_two_of_length_four h hl hmin) + have hx' : x = u ∨ x = v := by simpa [selectedChain] using hx + rcases hx' with rfl | rfl + · exact ⟨false, by simp [RawPathSystem.orientedChain, chainRepresentatives, + representativesFrom, hq, hu, hv]⟩ + · exact ⟨true, by simp [RawPathSystem.orientedChain, chainRepresentatives, + representativesFrom, hr, hu, hv]⟩ + · refine ⟨false, ?_⟩ + have hh : x ∈ interiorRepresentatives Q l := by simpa [selectedChain, hl] using hx + exact List.mem_of_mem_tail hh + +namespace RawPathSystem + +theorem representative_of_oriented_chain (S : RawPathSystem G Q) (p : List V → Bool) + {l : List V} (hl : l ∈ S.chains) {x : V} + (hx : x ∈ chainRepresentatives Q (orientedChain p l)) : + x ∈ (S.orientChains p).representatives := by + apply List.mem_flatten.mpr + refine ⟨chainRepresentatives Q (orientedChain p l), ?_, hx⟩ + apply List.mem_map.mpr + refine ⟨orientedChain p l, ?_, rfl⟩ + exact List.mem_map.mpr ⟨l, hl, rfl⟩ + +theorem joint_orientation (S : RawPathSystem G Q) {l m : List V} + (hl : l ∈ S.chains) (hm : m ∈ S.chains) (hne : l ≠ m) + {x y : V} (bx by_ : Bool) + (hx : x ∈ chainRepresentatives Q (orientedChain (fun _ => bx) l)) + (hy : y ∈ chainRepresentatives Q (orientedChain (fun _ => by_) m)) : + ∃ p : List V → Bool, x ∈ (S.orientChains p).representatives ∧ + y ∈ (S.orientChains p).representatives := by + classical + let p := fun z : List V => if z = l then bx else if z = m then by_ else false + have hpl : p l = bx := by simp [p] + have hpm : p m = by_ := by simp [p, hne.symm] + refine ⟨p, S.representative_of_oriented_chain p hl ?_, + S.representative_of_oriented_chain p hm ?_⟩ + · simpa only [orientedChain, hpl] using hx + · simpa only [orientedChain, hpm] using hy + +end RawPathSystem + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorRepresentativeGrowth.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorRepresentativeGrowth.lean new file mode 100644 index 0000000000000000000000000000000000000000..d052aa56dedfff7d2c973f1b677a2f69c7dd0769 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorRepresentativeGrowth.lean @@ -0,0 +1,75 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OptimalRepresentatives +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RepresentativeSuccessor +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RepresentativeExtraNeighbor +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PathDetour + +namespace OAI + +/-! Consecutive-step exclusions provide an extra missed neighbour for +each interior representative. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type} [Fintype V] {G : SimpleGraph V} {Q : Finset V} {S : ExpandedPathSystem G Q} + +theorem IsOptimal.interior_representative_extra_neighbor {k : ℕ} (hopt : S.IsOptimal k) + (hk : 3 ≤ k) (hQk : Q.card ≤ k) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) {x : V} + (hx : x ∈ S.representativeFinset) (hxQ : x ∉ Q) : + ∃ y ∈ S.ground, y ∉ S.representativeFinset ∧ + ∀ u ∈ outsideBallFinset G S.ground x 0, ¬ G.Adj u y := by + obtain ⟨l, hl, A, y, B, he, hy⟩ := + S.toRaw.completeClique.representative_successor (List.mem_toFinset.mp hx) hxQ + have hlS : l ∈ S.chains := by + change l ∈ S.chains ++ (Q \ S.toRaw.vertices).toList.map (fun v => [v]) at hl + rcases List.mem_append.mp hl with hl | hl + · exact hl + · obtain ⟨v, hv, hlv⟩ := List.mem_map.mp hl + have hxL : x ∈ l := by simp [he] + have hxv : x = v := by simpa [← hlv] using hxL + have hvQ := (Finset.mem_sdiff.mp (Finset.mem_toList.mp hv)).1 + exact False.elim (hxQ (hxv.symm ▸ hvQ)) + have hyL : y ∈ l := by simp [he] + have hyS : y ∈ S.vertices := List.mem_toFinset.mpr (List.mem_flatten.mpr ⟨l, hlS, hyL⟩) + refine ⟨y, Finset.mem_union_right _ hyS, ?_, ?_⟩ + · exact fun h => hy (List.mem_toFinset.mp h) + · obtain ⟨P, R, hchains⟩ := List.append_of_mem hlS + have hforbid := hopt.forbidden_one_vertex_edge_detour hk hQk hQ hcycle + (by simpa [he] using hchains : S.chains = P ++ (A ++ x :: y :: B) :: R) + have hc : (A ++ x :: y :: B).IsChain G.Adj := he ▸ (S.paths l hlS).2 + have hxy : G.Adj x y := (List.isChain_append_cons_cons.mp hc).2.1 + intro u hu huy + have hball := mem_outsideBallFinset.mp hu + have hxu := ((outsideBall_zero (S.representativeFinset_subset_ground hx)).mp hball).1 + apply hforbid + simpa only [ground, Finset.coe_union] using + outsidePath_one_of_common_neighbor hxy.ne hxu huy hball.1 + +theorem IsOptimal.two_interior_nonclique_balls {k : ℕ} (hopt : S.IsOptimal k) + (hk : 3 ≤ k) (hQk : Q.card ≤ k) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hclique : G.cliqueNum ≤ Q.card) + (hexpand : ∀ v, k + 1 ≤ (closedNeighborhood G {v}).card) + (he : 2 ≤ S.assignedCount) : + ∃ a ∈ S.representativeFinset, ∃ b ∈ S.representativeFinset, a ≠ b ∧ + ¬ G.IsClique (outsideBallFinset G S.ground a 1 : Set V) ∧ + ¬ G.IsClique (outsideBallFinset G S.ground b 1 : Set V) := by + obtain ⟨a, ha, b, hb, hab, haQ, hbQ⟩ := + RawPathSystem.exists_two_outside_completed_representatives S he + have haR : a ∈ S.representativeFinset := List.mem_toFinset.mpr ha + have hbR : b ∈ S.representativeFinset := List.mem_toFinset.mpr hb + have hclique' : G.cliqueNum ≤ S.representativeFinset.card := by + simpa only [S.representativeFinset_card] using hclique + have hnonclique : ∀ x ∈ S.representativeFinset, x ∉ Q → + ¬ G.IsClique (outsideBallFinset G S.ground x 1 : Set V) := by + intro x hx hxQ + obtain ⟨y, hyX, hyR, hmiss⟩ := hopt.interior_representative_extra_neighbor hk hQk hQ hcycle hx hxQ + exact representative_ball_one_not_clique hx S.representativeFinset_subset_ground + (hopt.ground_card_le hQk) hyX hyR hclique' hexpand + (fun z hz hne => hopt.representativeFinset_one_exclusion hk hQk hQ hcycle hx hz hne) hmiss + exact ⟨a, haR, b, hbR, hab, hnonclique a haR haQ, hnonclique b hbR hbQ⟩ + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorSelectionPacking.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorSelectionPacking.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8a284af7135f70ba96e5affb478de089af1a7a9 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorSelectionPacking.lean @@ -0,0 +1,138 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.InteriorOrientations +import OAI.Combinatorics.Ramsey.CycleClique.Construction.InteriorDetour +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OrientedTerminalWeights +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalRepresentatives +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalPacking + +namespace OAI + +/-! The selected internal vertices form a separated packing. In a +spanning terminal system they already contradict the independence bound. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type} {G : SimpleGraph V} {Q : Finset V} {S : ExpandedPathSystem G Q} + +private theorem original_chain_in_completion {l : List V} (hl : l ∈ S.chains) : + l ∈ S.toRaw.completeClique.chains := by + exact List.mem_append_left _ hl + +theorem selectedChains_outside {w : List ℕ} (h : SystemAssignedAmounts Q S.chains w) + (hmin : ∀ a ∈ w, 2 ≤ a) : ∀ x ∈ selectedChains Q S.chains, x ∉ Q := by + intro x hx + obtain ⟨a, ha, hx⟩ := List.mem_flatten.mp hx + obtain ⟨l, hl, rfl⟩ := List.mem_map.mp ha + obtain ⟨wl, hwl, hsub⟩ := h.profile_of_mem hl + exact selectedChain_outside hwl (fun a ha => hmin a (hsub a ha)) (S.no_clique_steps l hl) x hx + +theorem selectedChains_orientation {w : List ℕ} (h : SystemAssignedAmounts Q S.chains w) + (hmin : ∀ a ∈ w, 2 ≤ a) {x : V} (hx : x ∈ selectedChains Q S.chains) : + ∃ p : List V → Bool, x ∈ (S.toRaw.completeClique.orientChains p).representatives := by + obtain ⟨a, ha, hx⟩ := List.mem_flatten.mp hx + obtain ⟨l, hl, rfl⟩ := List.mem_map.mp ha + obtain ⟨wl, hwl, hsub⟩ := h.profile_of_mem hl + obtain ⟨b, hb⟩ := selectedChain_orientation hwl (fun a ha => hmin a (hsub a ha)) hx + exact ⟨fun _ => b, S.toRaw.completeClique.representative_of_oriented_chain _ + (original_chain_in_completion hl) hb⟩ + +theorem IsOptimal.selectedChains_forbidden {k : ℕ} + (hopt : S.IsOptimal k) (ht : 9 ≤ Q.card) (hQk : Q.card ≤ k) + (hkQ : k ≤ 2 * Q.card + 1) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) {w : List ℕ} + (h : SystemAssignedAmounts Q S.chains w) (hmin : ∀ a ∈ w, 2 ≤ a) + {x y : V} (hx : x ∈ selectedChains Q S.chains) (hy : y ∈ selectedChains Q S.chains) + (hne : x ≠ y) {d : ℕ} (hd : 1 ≤ d) (hd' : d ≤ 6) : + ¬ OutsidePath G (S.ground : Set V) x y d := by + intro hout + have hout' : OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) x y d := by + simpa only [ground, Finset.coe_union] using hout + obtain ⟨a, ha, hxl⟩ := List.mem_flatten.mp hx + obtain ⟨l, hl, rfl⟩ := List.mem_map.mp ha + obtain ⟨b, hb, hym⟩ := List.mem_flatten.mp hy + obtain ⟨m, hm, rfl⟩ := List.mem_map.mp hb + obtain ⟨wl, hwl, hsubl⟩ := h.profile_of_mem hl + obtain ⟨wm, hwm, hsubm⟩ := h.profile_of_mem hm + have hminl : ∀ a ∈ wl, 2 ≤ a := fun a ha => hmin a (hsubl a ha) + have hminm : ∀ a ∈ wm, 2 ≤ a := fun a ha => hmin a (hsubm a ha) + have hcontra (p : List V → Bool) + (hx' : x ∈ (S.toRaw.completeClique.orientChains p).representatives) + (hy' : y ∈ (S.toRaw.completeClique.orientChains p).representatives) : False := by + have hQx := (hopt.terminal_completed_classification ht hQk hkQ hQ hcycle + hd hd' p hx' hy' hne hout').1 + exact selectedChains_outside h hmin x hx hQx + by_cases hlm : l = m + · subst m + by_cases hlen : l.length = 4 + · obtain ⟨q, u, v, r, rfl, hq, hr, hu, hv⟩ := + hwl.amount_two_shape (amount_profile_eq_two_of_length_four hwl hlen hminl) + have hx' : x = u ∨ x = v := by simpa [selectedChain] using hxl + have hy' : y = u ∨ y = v := by simpa [selectedChain] using hym + obtain ⟨P, R, hsys⟩ := List.append_of_mem hl + have hf := hopt.forbidden_amount_two_detour ht hQk hkQ hQ hcycle hd hd' + (A := []) (B := []) (by simpa using hsys) hq hr hu hv + rcases hx' with rfl | rfl <;> rcases hy' with rfl | rfl + · exact hne rfl + · exact hf hout' + · exact hf hout'.reverse + · exact hne rfl + · have hx' : x ∈ chainRepresentatives Q l := by + apply List.mem_of_mem_tail + simpa [selectedChain, hlen, interiorRepresentatives] using hxl + have hy' : y ∈ chainRepresentatives Q l := by + apply List.mem_of_mem_tail + simpa [selectedChain, hlen, interiorRepresentatives] using hym + apply hcontra (fun _ => false) + · exact S.toRaw.completeClique.representatives_orientChains_unchanged + (original_chain_in_completion hl) rfl hx' + · exact S.toRaw.completeClique.representatives_orientChains_unchanged + (original_chain_in_completion hl) rfl hy' + · obtain ⟨bx, hbx⟩ := selectedChain_orientation hwl hminl hxl + obtain ⟨by_, hby⟩ := selectedChain_orientation hwm hminm hym + obtain ⟨p, hp, hp'⟩ := S.toRaw.completeClique.joint_orientation + (original_chain_in_completion hl) (original_chain_in_completion hm) hlm bx by_ hbx hby + exact hcontra p hp hp' + +variable [Fintype V] + +theorem IsOptimal.terminal_spanning_interior_contradiction (hCE : CEAlphaTwo) {k : ℕ} + (hopt : S.IsOptimal k) (ht : 9 ≤ Q.card) (hQk : Q.card ≤ k) + (hkQ : k ≤ 2 * Q.card + 1) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hclique : G.cliqueNum ≤ Q.card) + (hbound : IndependenceBound G k) (hc : 2 ≤ S.chains.length) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + {w : List ℕ} (h : SystemAssignedAmounts Q S.chains w) (hmin : ∀ a ∈ w, 2 ≤ a) + (hincident : S.incident = Q.card) : False := by + let R := (selectedChains Q S.chains).toFinset + have hlarge : Q.card - 1 ≤ R.card := by + rw [List.toFinset_card_of_nodup S.selectedChains_nodup] + exact S.selectedChains_large h hmin hincident (by have hb := hopt.budget; omega) + have hRX : R ⊆ S.ground := by + intro x hx + exact Finset.mem_union_right _ (S.selectedChains_mem_vertices (List.mem_toFinset.mp hx)) + have hpair : ∀ x ∈ R, + HasIndependent (G.induce (outsideBallFinset G S.ground x 1 : Set V)) 2 := by + intro x hx + obtain ⟨p, hp⟩ := selectedChains_orientation h hmin (List.mem_toFinset.mp hx) + exact (hopt.terminal_oriented_first_ball (by omega) hQk hQ hcycle hclique hc + (fun v => by simpa using hexpand {v} (by simp) (by simp)) p hp).2 + apply terminal_uniform_packing_contradiction hCE ht (by + have hlen := h.length_eq + have hsum := h.sum_eq + have hb := twice_length_le_sum hmin + have hc' := S.incident_le_twice_assignedCount + rw [hincident] at hc' + rw [← S.assignedCount_eq_raw] at hlen + have hsum' : w.sum = S.amount := by exact hsum.trans S.toRaw.amount_eq_outside_count.symm + have hbudget := hopt.budget + omega) hkQ hcycle hclique hbound hRX (hopt.ground_card_le hQk) + (by omega) hexpand hpair + intro x hx y hy hne d hd hd' + exact hopt.selectedChains_forbidden ht hQk hkQ hQ hcycle h hmin + (List.mem_toFinset.mp hx) (List.mem_toFinset.mp hy) hne hd hd' + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorSystemSelection.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorSystemSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..7637c672da423ef35011ab7c91ea74ba034a83d5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/InteriorSystemSelection.lean @@ -0,0 +1,83 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.InteriorChainSelection +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalClassification + +namespace OAI + +/-! Counting the selected internal vertices, with one unit of loss for +components that contain more than a single amount-two path. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +noncomputable def selectedChains (Q : Finset V) (C : List (List V)) : List V := + (C.map (selectedChain Q)).flatten + +noncomputable def selectionLoss (C : List (List V)) : ℕ := + (C.map (fun l => if l.length = 4 then 0 else 1)).sum + +theorem selectedChains_sublist (C : List (List V)) : + (selectedChains Q C).Sublist C.flatten := by + induction C with + | nil => exact .refl _ + | cons l C ih => exact (selectedChain_sublist l).append ih + +namespace SystemAssignedAmounts + +theorem selected_length_bounds {C : List (List V)} {w : List ℕ} + (h : SystemAssignedAmounts Q C w) (hmin : ∀ a ∈ w, 2 ≤ a) + (hlen : ∀ l ∈ C, 3 ≤ l.length) + (hlast : ∀ l ∈ C, ∀ x ∈ l.getLast?, x ∈ Q) : + (selectedChains Q C).length + selectionLoss C = w.length + C.length ∧ + w.length + C.length + selectionLoss C ≤ w.sum := by + induction h with + | nil => simp [selectedChains, selectionLoss] + | @cons l C a w ha hw ih => + have hla := hlen l (by simp) + have hane : a ≠ [] := by + intro he + have hh := ha.chain_length (by intro he'; simp [he'] at hla) + simp only [he, List.sum_nil, List.length_nil, zero_add] at hh + omega + have hb := selectedChain_length_bounds ha hane + (fun a ha => hmin a (List.mem_append_left _ ha)) (hlast l (by simp)) + have hi := ih (fun a ha => hmin a (List.mem_append_right _ ha)) + (fun l hl => hlen l (by simp [hl])) (fun l hl => hlast l (by simp [hl])) + simp only [selectedChains, List.map_cons, List.flatten_cons, List.length_append, + selectionLoss, List.sum_cons, List.length_cons] at hi ⊢ + simp only [List.sum_append] + omega + +end SystemAssignedAmounts + +namespace ExpandedPathSystem + +theorem selectedChains_nodup (S : ExpandedPathSystem G Q) : + (selectedChains Q S.chains).Nodup := + S.flatten_nodup.sublist (selectedChains_sublist S.chains) + +theorem selectedChains_mem_vertices (S : ExpandedPathSystem G Q) {x : V} + (hx : x ∈ selectedChains Q S.chains) : x ∈ S.vertices := + List.mem_toFinset.mpr ((selectedChains_sublist S.chains).subset hx) + +theorem selectedChains_large (S : ExpandedPathSystem G Q) {w : List ℕ} + (h : SystemAssignedAmounts Q S.chains w) (hmin : ∀ a ∈ w, 2 ≤ a) + (hincident : S.incident = Q.card) (hamount : S.amount ≤ Q.card + 1) : + Q.card - 1 ≤ (selectedChains Q S.chains).length := by + have hb := h.selected_length_bounds hmin S.nontrivial (fun l hl => (S.endpoints l hl).2) + have hsum : w.sum = S.amount := by + rw [h.sum_eq] + exact S.toRaw.amount_eq_outside_count.symm + have hwlen : w.length = S.assignedCount := by + rw [h.length_eq, S.assignedCount_eq_raw] + have hc := S.assignedCount_add_chains_length + rw [hwlen, hsum] at hb + rw [hincident] at hc + omega + +end ExpandedPathSystem + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LargeClique.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LargeClique.lean new file mode 100644 index 0000000000000000000000000000000000000000..7b9747cd0958a2484c7a26fe1d24c4e482d02d09 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LargeClique.lean @@ -0,0 +1,130 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Reduction +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Triangle + +namespace OAI + +/-! +# The initial clique bounds + +The triangle bound is manuscript Lemma `clq:triangle`. Its proof below +establishes the elementary triangle Ramsey recurrence directly, without +assuming any cycle–clique Ramsey theorem. +-/ + +namespace CycleClique.Construction +private theorem cycleNext_ne {m : ℕ} (hm : 2 ≤ m) (i : Fin m) : cycleNext i ≠ i := by + intro h + have heq := congrArg Fin.val h + change (i.val + 1) % m = i.val at heq + by_cases hi : i.val + 1 < m + · rw [Nat.mod_eq_of_lt hi] at heq + omega + · have hlast : i.val + 1 = m := by omega + rw [hlast, Nat.mod_self] at heq + omega + +/-- A clique contains a cycle through any specified number of at least +three of its vertices. -/ +theorem clique_contains_cycle {V : Type*} {G : SimpleGraph V} {Q : Finset V} {m : ℕ} + (hm : 3 ≤ m) (hQ : G.IsClique (Q : Set V)) (hcard : m ≤ Q.card) : HasCycle G m := by + classical + obtain ⟨S, hSQ, hS⟩ := Finset.exists_subset_card_eq hcard + let e : Fin m ≃ S := (Finset.equivFinOfCardEq hS).symm + refine ⟨fun i => (e i).val, Subtype.val_injective.comp e.injective, ?_⟩ + intro i + apply hQ (hSQ (e i).property) (hSQ (e (cycleNext i)).property) + intro h + have heq := e.injective (Subtype.ext h) + exact cycleNext_ne (by omega) i heq.symm + +/-- The elementary triangle Ramsey bound, in doubled form to avoid +division: a triangle-free graph of independence number at most `a` +has at most `a * (a + 3) / 2` vertices. -/ +theorem triangle_free_order_bound (a : ℕ) : + ∀ {V : Type*} [Fintype V] {G : SimpleGraph V}, + IndependenceBound G a → ¬ HasCycle G 3 → + 2 * Fintype.card V ≤ a * (a + 3) := by + induction a with + | zero => + intro V _ G hI _ + have hempty : IsEmpty V := ⟨fun v => by + have h := hI {v} (by simp) + simp at h⟩ + simp + | succ a ih => + intro V _ G hI htriangle + classical + by_cases hnonempty : Nonempty V + · obtain ⟨v⟩ := hnonempty + have hN : G.IsIndepSet (G.neighborFinset v : Set V) := by + intro x hx y hy _ hxy + exact htriangle (hasCycle_three_of_edges ((G.mem_neighborFinset v x).mp hx) hxy + ((G.mem_neighborFinset v y).mp hy).symm) + have hdegree := hI (G.neighborFinset v) hN + have hclosed : closedNeighborhood G {v} = insert v (G.neighborFinset v) := by + ext w + simp [mem_closedNeighborhood] + have hv : v ∉ G.neighborFinset v := by simp + have hclosedCard : (closedNeighborhood G {v}).card ≤ a + 2 := by + rw [hclosed, Finset.card_insert_of_notMem hv] + omega + let Y : Finset V := Finset.univ \ closedNeighborhood G {v} + have hY : (Y : Set V) = {w | w ∉ closedNeighborhood G {v}} := by ext w; simp [Y] + have hIY : IndependenceBound (G.induce (Y : Set V)) a := by + rw [hY] + simpa using independent_outside_bound hI (I := {v}) (by simp) + have htriangleY : ¬ HasCycle (G.induce (Y : Set V)) 3 := by + intro h + exact htriangle (h.map Subtype.val Subtype.val_injective (fun h => h)) + have hYbound : 2 * Y.card ≤ a * (a + 3) := by simpa using ih hIY htriangleY + have hsum : Y.card + (closedNeighborhood G {v}).card = Fintype.card V := by + simpa [Y] using Finset.card_sdiff_add_card_eq_card + (Finset.subset_univ (closedNeighborhood G {v})) + nlinarith + · have : IsEmpty V := not_nonempty_iff.mp hnonempty + simp + +/-- A cycle-free graph has no clique larger than the forbidden cycle order. -/ +theorem cliqueNum_le_of_no_cycle {V : Type*} [Fintype V] {G : SimpleGraph V} + {k : ℕ} (hk : 2 ≤ k) (hcycle : ¬ HasCycle G (k + 1)) : G.cliqueNum ≤ k := by + by_contra hn + obtain ⟨Q, hQ⟩ := G.exists_isNClique_cliqueNum + have hsize := hQ.card_eq + apply hcycle + exact clique_contains_cycle (by omega) hQ.isClique (by omega) + +/-- Manuscript Lemma `clq:triangle`, valid before using expansion. -/ +theorem triangle_clique_bounds {V : Type*} [Fintype V] {G : SimpleGraph V} + {k a : ℕ} (hk : 3 ≤ k) (_ha : 2 ≤ a) (hak : a ≤ k) + (hcard : Fintype.card V = k * a + 1) + (hI : IndependenceBound G a) (hcycle : ¬ HasCycle G (k + 1)) : + 3 ≤ G.cliqueNum ∧ G.cliqueNum ≤ k := by + classical + have htriangle : HasCycle G 3 := by + by_contra hn + have hb := triangle_free_order_bound a hI hn + have hparam : a + 3 ≤ 2 * k := by omega + rw [hcard] at hb + nlinarith + obtain ⟨f, _, he⟩ := htriangle + have h01 : G.Adj (f 0) (f 1) := by simpa [cycleNext] using he 0 + have h12 : G.Adj (f 1) (f 2) := by simpa [cycleNext] using he 1 + have h20 : G.Adj (f 2) (f 0) := by simpa [cycleNext] using he 2 + have hQ : G.IsNClique 3 {f 0, f 1, f 2} := + SimpleGraph.is3Clique_triple_iff.mpr ⟨h01, h20.symm, h12⟩ + refine ⟨?_, cliqueNum_le_of_no_cycle (by omega) hcycle⟩ + simpa [hQ.card_eq] using hQ.isClique.card_le_cliqueNum + +/-- For the first five cycle lengths, the triangle already gives the +complete quantitative clique bound of Theorem `clq:bound`. -/ +theorem large_clique_small_k {V : Type*} [Fintype V] {G : SimpleGraph V} + {k a : ℕ} (hk : 3 ≤ k) (hk7 : k ≤ 7) (ha : 2 ≤ a) (hak : a ≤ k) + (hcard : Fintype.card V = k * a + 1) + (hI : IndependenceBound G a) (hcycle : ¬ HasCycle G (k + 1)) : + max 3 (k / 2) ≤ G.cliqueNum ∧ G.cliqueNum ≤ k := by + obtain ⟨hlo, hhi⟩ := triangle_clique_bounds hk ha hak hcard hI hcycle + exact ⟨by omega, hhi⟩ + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LargeCycleRamsey.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LargeCycleRamsey.lean new file mode 100644 index 0000000000000000000000000000000000000000..d30bf8180f431f10eea683a4c370aa1a411c7f01 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LargeCycleRamsey.lean @@ -0,0 +1,53 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalContradiction +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FullLargeClique +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RamseyMainReduction +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LowerBound + +namespace OAI + +/-! The complete main formula for cycle length at least nineteen, conditional +on the precisely stated published Hamiltonicity input. No finite search is +needed in this range. -/ + +namespace CycleClique.Construction +open scoped Classical + +theorem no_expanded_largeCycle_counterexample (hCE : CEAlphaTwo) + {V : Type} [Fintype V] {G : SimpleGraph V} {k a : ℕ} + (hk : 18 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) + (hcard : Fintype.card V = k * a + 1) (hI : IndependenceBound G a) + (hcycle : ¬ HasCycle G (k + 1)) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) : False := by + classical + obtain ⟨hlo, hhi⟩ := large_clique_bounds (by omega) ha hak hcard hI hcycle hexpand + obtain ⟨Q, hQ⟩ := G.exists_isNClique_cliqueNum + have hQcard := hQ.card_eq + have ht : 9 ≤ Q.card := by rw [hQ.card_eq]; omega + have hQk : Q.card ≤ k := by omega + have hkQ : k ≤ 2 * Q.card + 1 := by rw [hQ.card_eq]; omega + obtain ⟨S, hopt⟩ := ExpandedPathSystem.exists_optimal G Q k + exact hopt.terminal_contradiction hCE ht hQk hkQ hQ.isClique hcycle + (by omega) (fun I hI' => (hI I hI').trans hak) hexpand + +theorem cycle_clique_large_upper (hCE : CEAlphaTwo) {k a : ℕ} + (hk : 18 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) : + RamseyProperty (k + 1) (a + 1) (k * a + 1) := by + apply ramseyProperty_of_expanded_exclusion (by omega) ha hak + intro b hb hbk G hcycle hI hexpand + exact no_expanded_largeCycle_counterexample hCE hk hb hbk + (by simp) hI hcycle hexpand + +theorem cycle_clique_ge_nineteen (hCE : CEAlphaTwo) {m n : ℕ} + (hm : 19 ≤ m) (hn : 3 ≤ n) (hnm : n ≤ m) : + IsRamseyNumber m n ((m - 1) * (n - 1) + 1) := by + have hm' : m - 1 + 1 = m := by omega + have hn' : n - 1 + 1 = n := by omega + apply isRamseyNumber_of_upper_lower + · simpa only [hm', hn'] using + cycle_clique_large_upper hCE (k := m - 1) (a := n - 1) (by omega) (by omega) (by omega) + · exact blockGraph_not_ramsey (by omega) (by omega) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayerArithmetic.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayerArithmetic.lean new file mode 100644 index 0000000000000000000000000000000000000000..620551078861a8e05aa7373399baa5c87ba5ceb4 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayerArithmetic.lean @@ -0,0 +1,63 @@ +import Mathlib.Tactic + +namespace OAI + +/-! +# Parity growth in the breadth-first layers + +These are the two numerical contradictions in the proof of manuscript +Proposition `clq:layer-interface`. The function `p` records alternating +layer independence sums, whose growth contradicts their global bound. +-/ + +namespace CycleClique.Construction +/-- The even-parameter layer inequalities force too much parity growth. -/ +theorem even_layer_growth_contradiction {s : ℕ} (_hs : 1 ≤ s) (p : ℕ → ℕ) + (hzero : p 0 = 1) (hbound : p s ≤ 2 * s) + (hstep : ∀ i < s, + 2 * s * p i < s * (p (i + 1) + p i - 1)) : False := by + have hgrowth : ∀ i ≤ s, 1 + 2 * i ≤ p i := by + intro i + induction i with + | zero => intro _; omega + | succ i ih => + intro his + have hprev := ih (by omega) + have hineq := hstep i (by omega) + have hsum : p (i + 1) + p i - 1 + 1 = p (i + 1) + p i := + Nat.sub_add_cancel (by omega) + have hincrement : p i + 2 ≤ p (i + 1) := by nlinarith + omega + have := hgrowth s le_rfl + omega + +/-- In the odd case the final increment is at least three, rather +than the usual two. -/ +theorem odd_layer_growth_contradiction {s : ℕ} (hs : 2 ≤ s) (p : ℕ → ℕ) + (hzero : p 0 = 1) (hbound : p s ≤ 2 * s + 1) + (hstep : ∀ i < s, + (2 * s + 1) * p i ≤ s * (p (i + 1) + p i - 1)) : False := by + have hgrowth : ∀ i ≤ s, 1 + 2 * i ≤ p i := by + intro i + induction i with + | zero => intro _; omega + | succ i ih => + intro his + have hprev := ih (by omega) + have hineq := hstep i (by omega) + have hsum : p (i + 1) + p i - 1 + 1 = p (i + 1) + p i := + Nat.sub_add_cancel (by omega) + have hincrement : p i + 2 ≤ p (i + 1) := by nlinarith + omega + have hprev := hgrowth (s - 1) (by omega) + have hineq := hstep (s - 1) (by omega) + have hindex : s - 1 + 1 = s := by omega + rw [hindex] at hineq + have hsum : p s + p (s - 1) - 1 + 1 = p s + p (s - 1) := + Nat.sub_add_cancel (by omega) + have hincrement : p (s - 1) + 3 ≤ p s := by nlinarith + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayerMinimal.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayerMinimal.lean new file mode 100644 index 0000000000000000000000000000000000000000..b2c0e013c1babc2e5674a2c556de624ff4de2faf --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayerMinimal.lean @@ -0,0 +1,103 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Reduction + +namespace OAI + +/-! +# Expansion inside a minimum-order dense layer subgraph + +These are the independent-set deletion calculations in manuscript +Proposition `clq:layer-interface`. Both parity cases are stated: for an +even parameter the order inequality is weak and minimality is strict; +for an odd parameter the order inequality is strict and minimality weak. +-/ + +namespace CycleClique.Construction +theorem independenceBound_indepNum {V : Type*} [Fintype V] (G : SimpleGraph V) : + IndependenceBound G G.indepNum := fun _ h => h.card_le_indepNum + +theorem indepNum_le_of_independenceBound {V : Type*} [Fintype V] + {G : SimpleGraph V} {a : ℕ} (h : IndependenceBound G a) : G.indepNum ≤ a := by + obtain ⟨I, hI⟩ := G.exists_isNIndepSet_indepNum + have := h I hI.isIndepSet + simpa [hI.card_eq] using this + +private theorem outside_indepNum_bound {V : Type*} [Fintype V] + {G : SimpleGraph V} {I : Finset V} (hI : G.IsIndepSet (I : Set V)) : + (G.induce {v | v ∉ closedNeighborhood G I}).indepNum ≤ G.indepNum - I.card := by + classical + exact indepNum_le_of_independenceBound + (independent_outside_bound (independenceBound_indepNum G) hI) + +/-- Even-parameter local minimality gives strict neighbourhood expansion +unless the neighbourhood is the entire graph. -/ +theorem minimal_dense_expansion_even {V : Type*} [Fintype V] + {G : SimpleGraph V} {s : ℕ} + (hdense : s * G.indepNum ≤ Fintype.card V) + (hminimal : ∀ Y : Finset V, Y.Nonempty → Y.card < Fintype.card V → + Y.card < s * (G.induce (Y : Set V)).indepNum) + (I : Finset V) (hI : G.IsIndepSet (I : Set V)) (hne : I.Nonempty) : + s * I.card ≤ (closedNeighborhood G I).card ∧ + ((closedNeighborhood G I).card < Fintype.card V → + s * I.card < (closedNeighborhood G I).card) := by + classical + let Y : Finset V := Finset.univ \ closedNeighborhood G I + have hY : (Y : Set V) = {v | v ∉ closedNeighborhood G I} := by ext v; simp [Y] + have hsum : Y.card + (closedNeighborhood G I).card = Fintype.card V := by + simpa [Y] using Finset.card_sdiff_add_card_eq_card + (Finset.subset_univ (closedNeighborhood G I)) + have hIcard := hI.card_le_indepNum + have houtside : (G.induce (Y : Set V)).indepNum ≤ G.indepNum - I.card := by + rw [hY] + exact outside_indepNum_bound hI + have hmul : s * G.indepNum = s * (G.indepNum - I.card) + s * I.card := by + rw [← Nat.mul_add, Nat.sub_add_cancel hIcard] + have hclosedPos : 0 < (closedNeighborhood G I).card := by + apply Finset.card_pos.mpr + obtain ⟨v, hv⟩ := hne + exact ⟨v, subset_closedNeighborhood G I hv⟩ + by_cases hYempty : Y = ∅ + · have hYzero : Y.card = 0 := by simp [hYempty] + have hmulI : s * I.card ≤ s * G.indepNum := Nat.mul_le_mul_left _ hIcard + constructor <;> omega + · have hYne := Finset.nonempty_iff_ne_empty.mpr hYempty + have hmin := hminimal Y hYne (by omega) + have hmulR := Nat.mul_le_mul_left s houtside + constructor <;> omega + +/-- Odd-parameter local minimality gives strict neighbourhood expansion +for every nonempty independent set. -/ +theorem minimal_dense_expansion_odd {V : Type*} [Fintype V] + {G : SimpleGraph V} {s : ℕ} + (hdense : s * G.indepNum < Fintype.card V) + (hminimal : ∀ Y : Finset V, Y.Nonempty → Y.card < Fintype.card V → + Y.card ≤ s * (G.induce (Y : Set V)).indepNum) + (I : Finset V) (hI : G.IsIndepSet (I : Set V)) (hne : I.Nonempty) : + s * I.card < (closedNeighborhood G I).card := by + classical + let Y : Finset V := Finset.univ \ closedNeighborhood G I + have hY : (Y : Set V) = {v | v ∉ closedNeighborhood G I} := by ext v; simp [Y] + have hsum : Y.card + (closedNeighborhood G I).card = Fintype.card V := by + simpa [Y] using Finset.card_sdiff_add_card_eq_card + (Finset.subset_univ (closedNeighborhood G I)) + have hIcard := hI.card_le_indepNum + have houtside : (G.induce (Y : Set V)).indepNum ≤ G.indepNum - I.card := by + rw [hY] + exact outside_indepNum_bound hI + have hmul : s * G.indepNum = s * (G.indepNum - I.card) + s * I.card := by + rw [← Nat.mul_add, Nat.sub_add_cancel hIcard] + have hclosedPos : 0 < (closedNeighborhood G I).card := by + apply Finset.card_pos.mpr + obtain ⟨v, hv⟩ := hne + exact ⟨v, subset_closedNeighborhood G I hv⟩ + by_cases hYempty : Y = ∅ + · have hYzero : Y.card = 0 := by simp [hYempty] + have hmulI : s * I.card ≤ s * G.indepNum := Nat.mul_le_mul_left _ hIcard + omega + · have hYne := Finset.nonempty_iff_ne_empty.mpr hYempty + have hmin := hminimal Y hYne (by omega) + have hmulR := Nat.mul_le_mul_left s houtside + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayerSelection.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayerSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..5846cd7d4440c8ab05096703d8a80449588cfc3e --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayerSelection.lean @@ -0,0 +1,126 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LayerStructure + +namespace OAI + +/-! +# Choosing the minimum dense induced subgraph in a layer + +The two selection lemmas make the minimum-order choice in manuscript +Proposition `clq:layer-interface` and supply exactly the local minimality +premises used by the expansion and connectivity arguments. +-/ + +namespace CycleClique.Construction +theorem indepNum_le_of_induced_injection {V W : Type*} [Fintype V] [Fintype W] + {G : SimpleGraph V} {H : SimpleGraph W} (f : V → W) (hf : Function.Injective f) + (hadj : ∀ {x y}, H.Adj (f x) (f y) → G.Adj x y) : G.indepNum ≤ H.indepNum := by + classical + obtain ⟨I, hI⟩ := G.exists_isNIndepSet_indepNum + let J : Finset W := I.map ⟨f, hf⟩ + have hJ : H.IsIndepSet (J : Set W) := by + intro x hx y hy hxy hadjxy + obtain ⟨a, ha, rfl⟩ := Finset.mem_map.mp hx + obtain ⟨b, hb, rfl⟩ := Finset.mem_map.mp hy + exact hI.isIndepSet ha hb (fun h => hxy (congrArg f h)) (hadj hadjxy) + simpa [J, hI.card_eq] using hJ.card_le_indepNum + +theorem indepNum_eq_of_iso {V W : Type*} [Fintype V] [Fintype W] + {G : SimpleGraph V} {H : SimpleGraph W} (e : G ≃g H) : G.indepNum = H.indepNum := by + apply Nat.le_antisymm + · exact indepNum_le_of_induced_injection e e.injective (fun h => e.map_adj_iff.mp h) + · exact indepNum_le_of_induced_injection e.symm e.symm.injective + (fun h => e.symm.map_adj_iff.mp h) + +private noncomputable def nestedInduceIso {V : Type*} (G : SimpleGraph V) (Y : Finset V) + (Z : Finset Y) : + (G.induce (Y : Set V)).induce (Z : Set Y) ≃g + G.induce ((Z.map ⟨Subtype.val, Subtype.val_injective⟩ : Finset V) : Set V) := by + classical + let Z' : Finset V := Z.map ⟨Subtype.val, Subtype.val_injective⟩ + let f : Z → Z' := fun z => ⟨z.val.val, Finset.mem_map.mpr ⟨z.val, z.property, rfl⟩⟩ + have hf : Function.Injective f := by + intro x y h + apply Subtype.ext + apply Subtype.ext + exact congrArg (fun z : Z' => z.val) h + have hs : Function.Surjective f := by + intro z + obtain ⟨a, ha, heq⟩ := Finset.mem_map.mp z.property + refine ⟨⟨a, ha⟩, ?_⟩ + exact Subtype.ext heq + refine { Equiv.ofBijective f ⟨hf, hs⟩ with map_rel_iff' := ?_ } + rfl + +/-- The minimum-order weakly dense subgraph of a layer (even `k`). -/ +theorem exists_minimal_dense_even {V : Type*} [Fintype V] {G : SimpleGraph V} + {s : ℕ} (D : Finset V) (hD : D.Nonempty) + (hdense : s * (G.induce (D : Set V)).indepNum ≤ D.card) : + ∃ Y : Finset V, Y ⊆ D ∧ Y.Nonempty ∧ + s * (G.induce (Y : Set V)).indepNum ≤ Y.card ∧ + ∀ Z : Finset Y, Z.Nonempty → Z.card < Y.card → + Z.card < s * ((G.induce (Y : Set V)).induce (Z : Set Y)).indepNum := by + classical + let P : Finset V → Prop := fun Y => Y ⊆ D ∧ Y.Nonempty ∧ + s * (G.induce (Y : Set V)).indepNum ≤ Y.card + have hex : ∃ n, ∃ Y : Finset V, Y.card = n ∧ P Y := + ⟨D.card, D, rfl, Finset.Subset.refl _, hD, hdense⟩ + obtain ⟨Y, hYcard, hYP⟩ := Nat.find_spec hex + have hmin : ∀ X : Finset V, P X → Y.card ≤ X.card := by + intro X hX + rw [hYcard] + exact Nat.find_min' hex ⟨X, rfl, hX⟩ + refine ⟨Y, hYP.1, hYP.2.1, hYP.2.2, ?_⟩ + intro Z hZ hZcard + by_contra hnot + let Z' : Finset V := Z.map ⟨Subtype.val, Subtype.val_injective⟩ + have hZ'D : Z' ⊆ D := by + intro z hz + obtain ⟨a, _, rfl⟩ := Finset.mem_map.mp hz + exact hYP.1 a.property + have hZ'ne : Z'.Nonempty := by simpa [Z'] using hZ + have hIso := indepNum_eq_of_iso (nestedInduceIso G Y Z) + have hZ'dense : s * (G.induce (Z' : Set V)).indepNum ≤ Z'.card := by + rw [← hIso] + simpa [Z'] using (show s * ((G.induce (Y : Set V)).induce (Z : Set Y)).indepNum ≤ Z.card by omega) + have hm := hmin Z' ⟨hZ'D, hZ'ne, hZ'dense⟩ + have hc : Z'.card = Z.card := Finset.card_map _ + omega + +/-- The minimum-order strictly dense subgraph of a layer (odd `k`). -/ +theorem exists_minimal_dense_odd {V : Type*} [Fintype V] {G : SimpleGraph V} + {s : ℕ} (D : Finset V) (hD : D.Nonempty) + (hdense : s * (G.induce (D : Set V)).indepNum < D.card) : + ∃ Y : Finset V, Y ⊆ D ∧ Y.Nonempty ∧ + s * (G.induce (Y : Set V)).indepNum < Y.card ∧ + ∀ Z : Finset Y, Z.Nonempty → Z.card < Y.card → + Z.card ≤ s * ((G.induce (Y : Set V)).induce (Z : Set Y)).indepNum := by + classical + let P : Finset V → Prop := fun Y => Y ⊆ D ∧ Y.Nonempty ∧ + s * (G.induce (Y : Set V)).indepNum < Y.card + have hex : ∃ n, ∃ Y : Finset V, Y.card = n ∧ P Y := + ⟨D.card, D, rfl, Finset.Subset.refl _, hD, hdense⟩ + obtain ⟨Y, hYcard, hYP⟩ := Nat.find_spec hex + have hmin : ∀ X : Finset V, P X → Y.card ≤ X.card := by + intro X hX + rw [hYcard] + exact Nat.find_min' hex ⟨X, rfl, hX⟩ + refine ⟨Y, hYP.1, hYP.2.1, hYP.2.2, ?_⟩ + intro Z hZ hZcard + by_contra hnot + let Z' : Finset V := Z.map ⟨Subtype.val, Subtype.val_injective⟩ + have hZ'D : Z' ⊆ D := by + intro z hz + obtain ⟨a, _, rfl⟩ := Finset.mem_map.mp hz + exact hYP.1 a.property + have hZ'ne : Z'.Nonempty := by simpa [Z'] using hZ + have hIso := indepNum_eq_of_iso (nestedInduceIso G Y Z) + have hZ'dense : s * (G.induce (Z' : Set V)).indepNum < Z'.card := by + rw [← hIso] + simpa [Z'] using (show s * ((G.induce (Y : Set V)).induce (Z : Set Y)).indepNum < Z.card by omega) + have hm := hmin Z' ⟨hZ'D, hZ'ne, hZ'dense⟩ + have hc : Z'.card = Z.card := Finset.card_map _ + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayerStructure.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayerStructure.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a785d416dbb8d1e3ceac693b2f412b90652915d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayerStructure.lean @@ -0,0 +1,197 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LayerMinimal +import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected +import Mathlib.Combinatorics.SimpleGraph.Bipartite + +namespace OAI + +/-! +# Connectivity and nonbipartiteness of a minimum dense subgraph + +These are the structural consequences of the minimum-order choice in +manuscript Proposition `clq:layer-interface`. +-/ + +namespace CycleClique.Construction +/-- Independence numbers add across disjoint anticomplete vertex sets. -/ +theorem indepNum_induce_add_le {V : Type*} [Fintype V] {G : SimpleGraph V} + (A B : Finset V) (hdis : Disjoint A B) + (hanti : ∀ x ∈ A, ∀ y ∈ B, ¬ G.Adj x y) : + (G.induce (A : Set V)).indepNum + (G.induce (B : Set V)).indepNum ≤ G.indepNum := by + classical + obtain ⟨I, hI⟩ := (G.induce (A : Set V)).exists_isNIndepSet_indepNum + obtain ⟨J, hJ⟩ := (G.induce (B : Set V)).exists_isNIndepSet_indepNum + let I' : Finset V := I.map ⟨Subtype.val, Subtype.val_injective⟩ + let J' : Finset V := J.map ⟨Subtype.val, Subtype.val_injective⟩ + have hIA : I' ⊆ A := by + intro x hx + obtain ⟨i, _, rfl⟩ := Finset.mem_map.mp hx + exact i.property + have hJB : J' ⊆ B := by + intro x hx + obtain ⟨j, _, rfl⟩ := Finset.mem_map.mp hx + exact j.property + have hI' : G.IsIndepSet (I' : Set V) := by + intro x hx y hy hxy h + obtain ⟨i, hi, rfl⟩ := Finset.mem_map.mp hx + obtain ⟨j, hj, rfl⟩ := Finset.mem_map.mp hy + exact hI.isIndepSet hi hj (fun h => hxy (congrArg Subtype.val h)) h + have hJ' : G.IsIndepSet (J' : Set V) := by + intro x hx y hy hxy h + obtain ⟨i, hi, rfl⟩ := Finset.mem_map.mp hx + obtain ⟨j, hj, rfl⟩ := Finset.mem_map.mp hy + exact hJ.isIndepSet hi hj (fun h => hxy (congrArg Subtype.val h)) h + have hIJ : G.IsIndepSet ((I' ∪ J' : Finset V) : Set V) := by + intro x hx y hy hxy + rcases Finset.mem_union.mp hx with hx | hx <;> + rcases Finset.mem_union.mp hy with hy | hy + · exact hI' hx hy hxy + · exact hanti x (hIA hx) y (hJB hy) + · exact fun h => hanti y (hIA hy) x (hJB hx) h.symm + · exact hJ' hx hy hxy + have hdis' : Disjoint I' J' := hdis.mono hIA hJB + have hbound := hIJ.card_le_indepNum + rw [Finset.card_union_of_disjoint hdis'] at hbound + simpa [I', J', hI.card_eq, hJ.card_eq] using hbound + +private structure DisconnectedPartition {V : Type*} [Fintype V] [DecidableEq V] + (G : SimpleGraph V) where + left : Finset V + right : Finset V + left_nonempty : left.Nonempty + right_nonempty : right.Nonempty + cover : left ∪ right = Finset.univ + disjoint : Disjoint left right + anticomplete : ∀ x ∈ left, ∀ y ∈ right, ¬ G.Adj x y + +private theorem disconnected_partition {V : Type*} [Fintype V] [DecidableEq V] + [Nonempty V] {G : SimpleGraph V} (hn : ¬ G.Connected) : + Nonempty (DisconnectedPartition G) := by + classical + have hnp : ¬ G.Preconnected := fun h => hn ⟨h⟩ + change ¬ ∀ u v, G.Reachable u v at hnp + push Not at hnp + obtain ⟨u, v, huv⟩ := hnp + let A : Finset V := Finset.univ.filter (G.Reachable u) + let B : Finset V := Finset.univ.filter (fun x => ¬ G.Reachable u x) + refine ⟨⟨A, B, ⟨u, by simp [A]⟩, ⟨v, by simp [B, huv]⟩, ?_, ?_, ?_⟩⟩ + · ext x + simp [A, B] + exact Classical.em _ + · apply Finset.disjoint_left.mpr + intro x hx hy + exact (Finset.mem_filter.mp hy).2 (Finset.mem_filter.mp hx).2 + · intro x hx y hy hadj + exact (Finset.mem_filter.mp hy).2 (((Finset.mem_filter.mp hx).2).trans hadj.reachable) + +private theorem DisconnectedPartition.card {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} (p : DisconnectedPartition G) : + p.left.card + p.right.card = Fintype.card V := by + classical + rw [← Finset.card_union_of_disjoint p.disjoint, p.cover, Finset.card_univ] + +/-- A minimum-order induced graph satisfying the even-parameter density +inequality is connected. -/ +theorem minimal_dense_connected_even {V : Type*} [Fintype V] [Nonempty V] + {G : SimpleGraph V} {s : ℕ} + (hdense : s * G.indepNum ≤ Fintype.card V) + (hminimal : ∀ Y : Finset V, Y.Nonempty → Y.card < Fintype.card V → + Y.card < s * (G.induce (Y : Set V)).indepNum) : G.Connected := by + classical + by_contra hn + obtain ⟨p⟩ := disconnected_partition hn + have hsum := p.card + have hleftPos := Finset.card_pos.mpr p.left_nonempty + have hrightPos := Finset.card_pos.mpr p.right_nonempty + have hleft := hminimal p.left p.left_nonempty (by omega) + have hright := hminimal p.right p.right_nonempty (by omega) + have hbound := indepNum_induce_add_le p.left p.right p.disjoint p.anticomplete + have hmul := Nat.mul_le_mul_left s hbound + rw [Nat.mul_add] at hmul + omega + +/-- A minimum-order induced graph satisfying the odd-parameter strict +density inequality is connected. -/ +theorem minimal_dense_connected_odd {V : Type*} [Fintype V] [Nonempty V] + {G : SimpleGraph V} {s : ℕ} + (hdense : s * G.indepNum < Fintype.card V) + (hminimal : ∀ Y : Finset V, Y.Nonempty → Y.card < Fintype.card V → + Y.card ≤ s * (G.induce (Y : Set V)).indepNum) : G.Connected := by + classical + by_contra hn + obtain ⟨p⟩ := disconnected_partition hn + have hsum := p.card + have hleftPos := Finset.card_pos.mpr p.left_nonempty + have hrightPos := Finset.card_pos.mpr p.right_nonempty + have hleft := hminimal p.left p.left_nonempty (by omega) + have hright := hminimal p.right p.right_nonempty (by omega) + have hbound := indepNum_induce_add_le p.left p.right p.disjoint p.anticomplete + have hmul := Nat.mul_le_mul_left s hbound + rw [Nat.mul_add] at hmul + omega + +/-- Every bipartite graph has an independent set containing at least +half its vertices. -/ +theorem bipartite_order_bound {V : Type*} [Fintype V] {G : SimpleGraph V} + (hbip : G.IsBipartite) : Fintype.card V ≤ 2 * G.indepNum := by + classical + obtain ⟨c⟩ := hbip + let A : Finset V := Finset.univ.filter (fun v => c v = 0) + let B : Finset V := Finset.univ.filter (fun v => ¬ c v = 0) + have hA : G.IsIndepSet (A : Set V) := by + intro x hx y hy _ hxy + exact c.valid hxy (((Finset.mem_filter.mp hx).2).trans (Finset.mem_filter.mp hy).2.symm) + have hB : G.IsIndepSet (B : Set V) := by + intro x hx y hy _ hxy + have hx1 := Fin.eq_one_of_ne_zero (c x) (Finset.mem_filter.mp hx).2 + have hy1 := Fin.eq_one_of_ne_zero (c y) (Finset.mem_filter.mp hy).2 + exact c.valid hxy (hx1.trans hy1.symm) + have hsum : A.card + B.card = Fintype.card V := by + simpa [A, B] using Finset.card_filter_add_card_filter_not + (s := Finset.univ) (fun v => c v = 0) + have hleft := hA.card_le_indepNum + have hright := hB.card_le_indepNum + omega + +/-- The dense layer subgraph is nonbipartite. -/ +theorem dense_nonbipartite {V : Type*} [Fintype V] [Nonempty V] + {G : SimpleGraph V} {s : ℕ} (hs : 3 ≤ s) + (hdense : s * G.indepNum ≤ Fintype.card V) : ¬ G.IsBipartite := by + classical + obtain ⟨v⟩ := ‹Nonempty V› + have hsingle : G.IsIndepSet (({v} : Finset V) : Set V) := by simp + have hpos : 1 ≤ G.indepNum := by simpa using hsingle.card_le_indepNum + intro hbip + have := bipartite_order_bound hbip + nlinarith + +/-- Closed singleton neighbourhoods have one more vertex than the degree. -/ +theorem closedNeighborhood_singleton_card {V : Type*} [Fintype V] + (G : SimpleGraph V) (v : V) : + (closedNeighborhood G {v}).card = (G.neighborSet v).ncard + 1 := by + classical + have hclosed : closedNeighborhood G {v} = insert v (G.neighborFinset v) := by + ext w + simp [mem_closedNeighborhood] + have hv : v ∉ G.neighborFinset v := by simp + rw [hclosed, Finset.card_insert_of_notMem hv] + simp + +/-- The singleton consequence of the dense-minimal expansion bound +gives the minimum degree needed by the coloured-path argument. -/ +theorem dense_expansion_degree {V : Type*} [Fintype V] {G : SimpleGraph V} + {s : ℕ} (_hs : 1 ≤ s) (horder : 2 * s ≤ Fintype.card V) + (hstrict : ∀ v : V, (closedNeighborhood G {v}).card < Fintype.card V → + s < (closedNeighborhood G {v}).card) : + ∀ v, s ≤ (G.neighborSet v).ncard := by + intro v + have hcard := closedNeighborhood_singleton_card G v + have hle : (closedNeighborhood G {v}).card ≤ Fintype.card V := + Finset.card_le_univ _ + by_cases hfull : (closedNeighborhood G {v}).card = Fintype.card V + · omega + · have := hstrict v (by omega) + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayerSums.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayerSums.lean new file mode 100644 index 0000000000000000000000000000000000000000..c07844f1383e72d58dc214c24dc307a9a35357cf --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayerSums.lean @@ -0,0 +1,175 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.DistanceLayers +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LayerArithmetic + +namespace OAI + +/-! +# Parity sums and expansion in the distance layers + +The two exact summation identities and the closed neighbourhood inequality +form the counting step of manuscript Proposition `clq:layer-interface`. +-/ + +namespace CycleClique.Construction +def parityIndices (i : ℕ) : Finset ℕ := + (Finset.range (i + 1)).filter (fun j => j % 2 = i % 2) + +def alternatingSum (α : ℕ → ℕ) (i : ℕ) : ℕ := ∑ j ∈ parityIndices i, α j + +@[simp] theorem alternatingSum_zero (α : ℕ → ℕ) : alternatingSum α 0 = α 0 := by + simp [alternatingSum, parityIndices, Finset.filter_singleton] + +theorem alternatingSum_partition (α : ℕ → ℕ) {i : ℕ} (hi : 1 ≤ i) : + alternatingSum α i + alternatingSum α (i - 1) = ∑ j ∈ Finset.range (i + 1), α j := by + have heq : ((Finset.range (i + 1)).filter fun j => ¬ j % 2 = i % 2) = + parityIndices (i - 1) := by + ext j + simp only [Finset.mem_filter, Finset.mem_range, parityIndices] + omega + have h := Finset.sum_filter_add_sum_filter_not + (Finset.range (i + 1)) (fun j => j % 2 = i % 2) α + rw [heq] at h + exact h + +theorem alternatingSum_shifted_partition (α : ℕ → ℕ) (hzero : α 0 = 1) + {i : ℕ} (hi : 1 ≤ i) : + ∑ j ∈ Finset.range i, α (j + 1) = alternatingSum α i + alternatingSum α (i - 1) - 1 := by + have h := alternatingSum_partition α hi + rw [Finset.sum_range_succ', hzero] at h + omega + +theorem alternatingSum_positive (α : ℕ → ℕ) (hzero : 1 ≤ α 0) (hone : 1 ≤ α 1) + (i : ℕ) : 1 ≤ alternatingSum α i := by + by_cases heven : i % 2 = 0 + · have hmem : 0 ∈ parityIndices i := by simp [parityIndices, heven] + have h := Finset.single_le_sum (fun j _ => Nat.zero_le (α j)) hmem + exact hzero.trans h + · have hodd : i % 2 = 1 := by omega + have hipos : 1 ≤ i := by omega + have hmem : 1 ∈ parityIndices i := by simp [parityIndices, hodd]; omega + have h := Finset.single_le_sum (fun j _ => Nat.zero_le (α j)) hmem + exact hone.trans h + +theorem indepNum_le_card {V : Type*} [Fintype V] (G : SimpleGraph V) : + G.indepNum ≤ Fintype.card V := by + obtain ⟨I, hI⟩ := G.exists_isNIndepSet_indepNum + have := Finset.card_le_univ I + simpa [hI.card_eq] using this + +theorem indepNum_pos_of_nonempty {V : Type*} [Fintype V] [Nonempty V] + (G : SimpleGraph V) : 1 ≤ G.indepNum := by + classical + obtain ⟨v⟩ := ‹Nonempty V› + have hI : G.IsIndepSet (({v} : Finset V) : Set V) := by simp + simpa using hI.card_le_indepNum + +theorem distanceLayer_zero_indepNum {V : Type*} [Fintype V] + (G : SimpleGraph V) (root : V) : + (G.induce (distanceLayer G root 0 : Set V)).indepNum = 1 := by + classical + rw [distanceLayer_zero] + let : Nonempty ({root} : Finset V) := ⟨⟨root, by simp⟩⟩ + have hle := indepNum_le_card (G.induce (({root} : Finset V) : Set V)) + have hge := indepNum_pos_of_nonempty (G.induce (({root} : Finset V) : Set V)) + apply Nat.le_antisymm + · simpa using hle + · exact hge + +theorem distanceLayer_one_nonempty {V : Type*} [Fintype V] + {G : SimpleGraph V} {k : ℕ} (hk : 1 ≤ k) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) (root : V) : + (distanceLayer G root 1).Nonempty := by + classical + have h := hexpand {root} (by simp) (by simp) + have hc := closedNeighborhood_singleton_card G root + have hdegree : 0 < (G.neighborFinset root).card := by + simp only [Finset.card_singleton, Nat.mul_one, SimpleGraph.ncard_neighborSet, + ← SimpleGraph.card_neighborFinset_eq_degree] at h hc + omega + obtain ⟨v, hv⟩ := Finset.card_pos.mp hdegree + have hadj := (G.mem_neighborFinset root v).mp hv + exact ⟨v, mem_distanceLayer.mpr ⟨hadj.reachable, SimpleGraph.dist_eq_one_iff_adj.mpr hadj⟩⟩ + +noncomputable def parityIndependent {V : Type*} [Fintype V] + (G : SimpleGraph V) (root : V) (i : ℕ) : Finset V := by + classical + exact (parityIndices i).biUnion (fun j => independentOn G (distanceLayer G root j)) + +theorem parityIndependent_independent {V : Type*} [Fintype V] + (G : SimpleGraph V) (root : V) (i : ℕ) : + G.IsIndepSet (parityIndependent G root i : Set V) := by + classical + intro x hx y hy hxy + obtain ⟨j, hj, hx⟩ := Finset.mem_biUnion.mp hx + obtain ⟨l, hl, hy⟩ := Finset.mem_biUnion.mp hy + by_cases hsame : j = l + · subst l + exact independentOn_independent _ _ hx hy hxy + · apply same_parity_layers_anticomplete hsame + (((Finset.mem_filter.mp hj).2).trans (Finset.mem_filter.mp hl).2.symm) + · exact independentOn_subset _ _ hx + · exact independentOn_subset _ _ hy + +theorem parityIndependent_card {V : Type*} [Fintype V] + (G : SimpleGraph V) (root : V) (i : ℕ) : + (parityIndependent G root i).card = + alternatingSum (fun j => (G.induce (distanceLayer G root j : Set V)).indepNum) i := by + classical + have hdis : (parityIndices i : Set ℕ).PairwiseDisjoint + (fun j => independentOn G (distanceLayer G root j)) := by + intro j _ l _ hjl + exact (distanceLayers_disjoint G root hjl).mono + (independentOn_subset _ _) (independentOn_subset _ _) + simp only [parityIndependent, Finset.card_biUnion hdis, alternatingSum, independentOn_card] + +/-- Expansion of the preceding parity union gives the exact first-layer +order inequality used in the density argument. -/ +theorem distanceLayer_order_sum {V : Type*} [Fintype V] + {G : SimpleGraph V} {k : ℕ} (hk : 1 ≤ k) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (root : V) {i : ℕ} (hi : 1 ≤ i) : + k * alternatingSum (fun j => (G.induce (distanceLayer G root j : Set V)).indepNum) (i - 1) ≤ + ∑ j ∈ Finset.range i, (distanceLayer G root (j + 1)).card := by + classical + let α := fun j => (G.induce (distanceLayer G root j : Set V)).indepNum + have hαzero : α 0 = 1 := distanceLayer_zero_indepNum G root + have hαone : 1 ≤ α 1 := by + let : Nonempty (distanceLayer G root 1) := + (distanceLayer_one_nonempty hk hexpand root).to_subtype + exact indepNum_pos_of_nonempty _ + have hpos := alternatingSum_positive α (by omega) hαone (i - 1) + have hIne : (parityIndependent G root (i - 1)).Nonempty := by + apply Finset.card_pos.mp + rw [parityIndependent_card] + exact hpos + have hclosed := hexpand _ (parityIndependent_independent G root (i - 1)) hIne + let U : Finset V := (Finset.range (i + 1)).biUnion (distanceLayer G root) + have hsub : closedNeighborhood G (parityIndependent G root (i - 1)) ⊆ U := by + intro y hy + rcases mem_closedNeighborhood.mp hy with hy | ⟨x, hx, hxy⟩ + · obtain ⟨j, hj, hy⟩ := Finset.mem_biUnion.mp hy + have hjbound : j < i := by + have := Finset.mem_range.mp (Finset.mem_filter.mp hj).1 + omega + exact Finset.mem_biUnion.mpr ⟨j, Finset.mem_range.mpr (by omega), independentOn_subset _ _ hy⟩ + · obtain ⟨j, hj, hx⟩ := Finset.mem_biUnion.mp hx + have hjbound : j < i := by + have := Finset.mem_range.mp (Finset.mem_filter.mp hj).1 + omega + obtain ⟨l, hl, hy⟩ := distanceLayer_neighbor_le (independentOn_subset _ _ hx) hxy + exact Finset.mem_biUnion.mpr ⟨l, Finset.mem_range.mpr (by omega), hy⟩ + have hdis : ((Finset.range (i + 1)) : Set ℕ).PairwiseDisjoint (distanceLayer G root) := by + intro j _ l _ hjl + exact distanceLayers_disjoint G root hjl + have hU : U.card = ∑ j ∈ Finset.range (i + 1), (distanceLayer G root j).card := + Finset.card_biUnion hdis + have hcard := Finset.card_le_card hsub + rw [hU, Finset.sum_range_succ', distanceLayer_zero, Finset.card_singleton] at hcard + rw [parityIndependent_card] at hclosed + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayoutCertificate.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayoutCertificate.lean new file mode 100644 index 0000000000000000000000000000000000000000..d756cb4c27877514115697e302c3e2f4ec52de48 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayoutCertificate.lean @@ -0,0 +1,99 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LayoutRefutation +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ClosureSteps + +namespace OAI + +/-! A complete finite obstruction certificate: verified indexed layout, +initial templates, required paths, closure steps, and final contradiction. -/ + +namespace CycleClique.Construction +structure LayoutCertificate (n : ℕ) where + chains : List (List (Fin n)) + clique : Finset (Fin n) + templates : List (TemplateData (Fin n)) + required : List (RequiredPathData (Fin n)) + closure : List (ClosureStep n) + bad : BadData n + deriving DecidableEq + +namespace LayoutCertificate + +variable {n : ℕ} + +def graph (c : LayoutCertificate n) : SimpleGraph (Fin n) := layoutGraph c.clique c.chains + +instance (c : LayoutCertificate n) : DecidableRel c.graph.Adj := + inferInstanceAs (DecidableRel (layoutGraph c.clique c.chains).Adj) + +def initialMatrix (k : ℕ) (c : LayoutCertificate n) : ForbiddenMatrix n := + fun i j => templateMatrix c.templates i j ∪ requiredMatrix k c.required i j + +def matrix (k : ℕ) (c : LayoutCertificate n) : ForbiddenMatrix n := + closureMatrix (c.initialMatrix k) c.closure + +def Check (k t : ℕ) (P : List (List ℕ)) (c : LayoutCertificate n) : Prop := + c.chains.flatten = List.finRange n ∧ + c.chains.map List.length = P.map (fun w => w.sum + w.length + 1) ∧ + c.chains.map (fun l => l.map (fun i => decide (i ∈ c.clique))) = P.map profileMask ∧ + (∀ T ∈ c.templates, T.Check c.graph c.clique k (patternAmount P) (P.map List.length).sum) ∧ + (∀ p ∈ c.required, p.Check c.graph k) ∧ + ClosureCheck c.graph (c.initialMatrix k) k t c.closure ∧ + c.bad.Check c.graph (c.matrix k) k t + +instance (k t : ℕ) (P : List (List ℕ)) (c : LayoutCertificate n) : + Decidable (c.Check k t P) := inferInstanceAs (Decidable (_ ∧ _)) + +open scoped Classical + +variable {V : Type} [Fintype V] {G : SimpleGraph V} {Q : Finset V} + +theorem false_of_check (hCE : CEAlphaTwo) {k t : ℕ} + (hk : 5 ≤ k) (ht : 1 ≤ t) (hQk : Q.card ≤ k) + (hQ : G.IsClique (Q : Set V)) (hcycle : ¬ HasCycle G (k + 1)) + (hclique : G.cliqueNum ≤ t) (hbound : IndependenceBound G k) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + {S : ExpandedPathSystem G Q} (hopt : S.IsOptimal k) + (U : RawPathSystem G Q) (hUv : U.vertices = Q ∪ S.vertices) + (hUa : U.amount = S.amount) (hUe : U.assignedCount = S.assignedCount) + {P : List (List ℕ)} (hp : List.Forall₂ (AssignedAmounts Q) U.chains P) + (hne : ∀ l ∈ U.chains, l ≠ []) + (c : LayoutCertificate n) (hc : c.Check k t P) : False := by + classical + obtain ⟨hi, hl, hm, hE, hR, hC, hb⟩ := hc + have hmasks : c.chains.map (cliqueMask c.clique) = P.map profileMask := by + calc + _ = c.chains.map (fun l => l.map (fun i => decide (i ∈ c.clique))) := by + apply List.map_congr_left + intro l hl + exact cliqueMask_eq_map c.clique l + _ = _ := hm + obtain ⟨f, hf, hmap, hfQ, hfG⟩ := U.realize_layout hp hne hQ c.chains c.clique hi hl hmasks + let F : c.graph →g G := ⟨f, fun h => hfG h⟩ + have hfX : ∀ i, f i ∈ Q ∪ S.vertices := by + intro i + rw [← hUv] + apply List.mem_toFinset.mpr + rw [← hmap, ← List.map_flatten, hi] + exact List.mem_map.mpr ⟨i, List.mem_finRange i, rfl⟩ + have hX : (Q ∪ S.vertices).card = n := by + rw [← hUv] + change U.chains.flatten.toFinset.card = n + rw [List.toFinset_card_of_nodup U.flatten_nodup, ← hmap, + ← List.map_flatten, List.length_map, hi, List.length_finRange] + have ha : S.amount = patternAmount P := by + rw [← hUa, U.amount_eq_outside_count, ← ChainProfiles.amount hp] + have he : S.assignedCount = (P.map List.length).sum := by + rw [← hUe] + exact (ChainProfiles.assignedCount hp).symm + have hT := templateMatrix_sound hopt (by omega) hQk hQ hcycle ha he f hf hfQ hfG + (fun i => Finset.mem_union.mp (hfX i)) c.templates hE + have hR' := requiredMatrix_sound (by omega) hcycle F hf hfX c.required hR + have hM := closureMatrix_sound hCE hk ht hcycle hclique hbound F hf hfX hX + (hT.union hR') hexpand c.closure hC + exact c.bad.false_of_check hCE hk ht hcycle hclique hbound F hf hfX hX hM hexpand hb + +end LayoutCertificate +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayoutRefutation.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayoutRefutation.lean new file mode 100644 index 0000000000000000000000000000000000000000..4e051d5e15e756e68f003875e9618ee01c7df73d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LayoutRefutation.lean @@ -0,0 +1,63 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiniteLayout +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TemplateMatrix +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiniteBad + +namespace OAI + +/-! Apply a checked finite-layout obstruction to an actual optimal path +system. The numerical profile supplies the amount and assigned-path count. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type} [Fintype V] {G : SimpleGraph V} {Q : Finset V} + +theorem initial_layout_refutation (hCE : CEAlphaTwo) {k t n : ℕ} + (hk : 5 ≤ k) (ht : 1 ≤ t) (hQk : Q.card ≤ k) + (hQ : G.IsClique (Q : Set V)) (hcycle : ¬ HasCycle G (k + 1)) + (hclique : G.cliqueNum ≤ t) (hbound : IndependenceBound G k) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + {S : ExpandedPathSystem G Q} (hopt : S.IsOptimal k) + (U : RawPathSystem G Q) (hUv : U.vertices = Q ∪ S.vertices) + (hUa : U.amount = S.amount) (hUe : U.assignedCount = S.assignedCount) + {P : List (List ℕ)} (hp : List.Forall₂ (AssignedAmounts Q) U.chains P) + (hne : ∀ l ∈ U.chains, l ≠ []) + (D : List (List (Fin n))) (Q₀ : Finset (Fin n)) + (hindex : D.flatten = List.finRange n) + (hlength : D.map List.length = P.map (fun w => w.sum + w.length + 1)) + (hmask : D.map (cliqueMask Q₀) = P.map profileMask) + (E : List (TemplateData (Fin n))) + (hE : ∀ T ∈ E, T.Check (layoutGraph Q₀ D) Q₀ k (patternAmount P) (P.map List.length).sum) + (R : List (RequiredPathData (Fin n))) (hR : ∀ p ∈ R, p.Check (layoutGraph Q₀ D) k) + (b : BadData n) + (hb : b.Check (layoutGraph Q₀ D) + (fun i j => templateMatrix E i j ∪ requiredMatrix k R i j) k t) : False := by + classical + obtain ⟨f, hf, hmap, hfQ, hfG⟩ := U.realize_layout hp hne hQ D Q₀ hindex hlength hmask + let F : layoutGraph Q₀ D →g G := ⟨f, fun h => hfG h⟩ + have hfX : ∀ i, f i ∈ Q ∪ S.vertices := by + intro i + rw [← hUv] + apply List.mem_toFinset.mpr + rw [← hmap, ← List.map_flatten, hindex] + exact List.mem_map.mpr ⟨i, List.mem_finRange i, rfl⟩ + have hX : (Q ∪ S.vertices).card = n := by + rw [← hUv] + change U.chains.flatten.toFinset.card = n + rw [List.toFinset_card_of_nodup U.flatten_nodup, ← hmap, + ← List.map_flatten, List.length_map, hindex, List.length_finRange] + have ha : S.amount = patternAmount P := by + rw [← hUa, U.amount_eq_outside_count, ← ChainProfiles.amount hp] + have he : S.assignedCount = (P.map List.length).sum := by + rw [← hUe] + exact (ChainProfiles.assignedCount hp).symm + have hT := templateMatrix_sound hopt (by omega) hQk hQ hcycle ha he f hf hfQ hfG + (fun i => Finset.mem_union.mp (hfX i)) E hE + have hR' := requiredMatrix_sound (by omega) hcycle F hf hfX R hR + exact b.false_of_check hCE hk ht hcycle hclique hbound F hf hfX hX + (hT.union hR') hexpand hb + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ListSurgery.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ListSurgery.lean new file mode 100644 index 0000000000000000000000000000000000000000..d8f797a6d18b356004f373c156faa5f0c0e6ee6e --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ListSurgery.lean @@ -0,0 +1,75 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PathSystem + +namespace OAI + +/-! Elementary list surgery used to insert an outside detour in a chain. -/ + +namespace CycleClique.Construction +theorem chain_outside_interior {V : Type*} {Q : Finset V} {x y : V} {J : List V} + (hxy : ¬ (x ∈ Q ∧ y ∈ Q)) (hJ : ∀ z ∈ J, z ∉ Q) : + (x :: (J ++ [y])).IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q)) := by + induction J generalizing x with + | nil => simpa using hxy + | cons z J ih => + simp only [List.cons_append, List.isChain_cons_cons] + refine ⟨fun h => hJ z (by simp) h.2, ?_⟩ + exact ih (fun h => hJ z (by simp) h.1) (fun w hw => hJ w (by simp [hw])) + +theorem chain_outside_interior_of_ne_nil {V : Type*} {Q : Finset V} + {x y : V} {J : List V} (hne : J ≠ []) (hJ : ∀ z ∈ J, z ∉ Q) : + (x :: (J ++ [y])).IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q)) := by + cases J with + | nil => exact False.elim (hne rfl) + | cons z J => + simp only [List.cons_append, List.isChain_cons_cons] + refine ⟨fun h => hJ z (by simp) h.2, ?_⟩ + exact chain_outside_interior (fun h => hJ z (by simp) h.1) + (fun w hw => hJ w (by simp [hw])) + +theorem reverse_join_chain {V : Type*} {R : V → V → Prop} + (hsym : ∀ ⦃a b⦄, R a b → R b a) {B D J : List V} {x y : V} + (hleft : (x :: B).IsChain R) (hright : (y :: D).IsChain R) + (hjoin : (x :: (J ++ [y])).IsChain R) : + (B.reverse ++ x :: (J ++ y :: D)).IsChain R := by + apply List.isChain_split.mpr + constructor + · have hr : (x :: B).reverse.IsChain R := List.isChain_reverse.mpr (hleft.imp hsym) + simpa using hr + · exact List.isChain_cons_split.mpr ⟨hjoin, hright⟩ + +theorem nodup_insert_list {V : Type*} {A B J : List V} + (hold : (A ++ B).Nodup) (hJ : J.Nodup) (hdis : J.Disjoint (A ++ B)) : + (A ++ J ++ B).Nodup := by + have h := hold.append hJ hdis.symm + have hp := (show (J ++ B).Perm (B ++ J) from List.perm_append_comm).append_left A + have hn := hp.nodup_iff.mpr (show (A ++ (B ++ J)).Nodup by + simpa only [List.append_assoc] using h) + simpa only [List.append_assoc] using hn + +theorem chain_insert_between {V : Type*} {R : V → V → Prop} {A B J : List V} {x y : V} + (hold : (A ++ x :: y :: B).IsChain R) + (hnew : (x :: (J ++ [y])).IsChain R) : + (A ++ x :: (J ++ y :: B)).IsChain R := by + have ho := List.isChain_append_cons_cons.mp hold + apply List.isChain_split.mpr + refine ⟨ho.1, ?_⟩ + exact List.isChain_cons_split.mpr ⟨hnew, ho.2.2⟩ + +theorem head_insert_between {V : Type*} (A B J : List V) (x y : V) : + (A ++ x :: (J ++ y :: B)).head? = (A ++ x :: y :: B).head? := by + simp + +theorem last_insert_between {V : Type*} (A B J : List V) (x y : V) : + (A ++ x :: (J ++ y :: B)).getLast? = (A ++ x :: y :: B).getLast? := by + have htail : (y :: B).getLast? = some ((y :: B).getLast (by simp)) := + List.getLast?_eq_some_getLast (by simp) + have hold : A ++ x :: y :: B = (A ++ [x]) ++ (y :: B) := by + simp only [List.append_assoc, List.singleton_append] + have hnew : A ++ x :: (J ++ y :: B) = (A ++ [x] ++ J) ++ (y :: B) := by + simp only [List.append_assoc, List.cons_append, List.nil_append] + rw [hold, hnew] + simp only [List.getLast?_append, htail, Option.or] + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LongestPaths.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LongestPaths.lean new file mode 100644 index 0000000000000000000000000000000000000000..677b71431266e85ff653b155a3b6c0833743257f --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LongestPaths.lean @@ -0,0 +1,101 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PathEndpoints +import Mathlib.Data.Fin.Tuple.Basic + +namespace OAI + +/-! Maximum-order paths starting at a prescribed vertex. -/ + +namespace CycleClique.Construction +def IsIndexedPath {V : Type*} (G : SimpleGraph V) {r : ℕ} + (f : Fin (r + 1) → V) : Prop := + Function.Injective f ∧ ∀ i : Fin r, G.Adj (f i.castSucc) (f i.succ) + +theorem indexedPath_snoc {V : Type*} {G : SimpleGraph V} {r : ℕ} + {f : Fin (r + 1) → V} (hf : IsIndexedPath G f) {v : V} + (hv : v ∉ Set.range f) (hadj : G.Adj (f (Fin.last r)) v) : + IsIndexedPath G (Fin.snoc f v) := by + refine ⟨Fin.snoc_injective_iff.mpr ⟨hf.1, hv⟩, ?_⟩ + intro i + refine Fin.lastCases ?_ (fun j => ?_) i + · simpa using hadj + · have heq : j.castSucc.succ = j.succ.castSucc := Fin.ext rfl + rw [heq] + simpa only [Fin.snoc_castSucc] using hf.2 j + +/-- Finite cardinality bounds path order, so maximizing it uses only +well-ordering of natural numbers. -/ +theorem exists_longest_path_from {V : Type*} [Fintype V] + (G : SimpleGraph V) (x : V) : + ∃ r, ∃ f : Fin (r + 1) → V, IsIndexedPath G f ∧ f 0 = x ∧ + ∀ q (g : Fin (q + 1) → V), IsIndexedPath G g → g 0 = x → q ≤ r := by + classical + let b := Fintype.card V - 1 + have hex : ∃ d, ∃ r, ∃ f : Fin (r + 1) → V, + IsIndexedPath G f ∧ f 0 = x ∧ r + d = b := by + refine ⟨b, 0, fun _ => x, ⟨?_, ?_⟩, rfl, by omega⟩ + · intro i j _ + apply Fin.ext + have := i.isLt + have := j.isLt + omega + · exact fun i => Fin.elim0 i + obtain ⟨r, f, hf, hstart, hd⟩ := Nat.find_spec hex + refine ⟨r, f, hf, hstart, ?_⟩ + intro q g hg hgs + have hqcard := Fintype.card_le_of_injective g hg.1 + simp only [Fintype.card_fin] at hqcard + have hqb : q ≤ b := by dsimp [b]; omega + have hmin := Nat.find_min' hex + (show ∃ r, ∃ f : Fin (r + 1) → V, IsIndexedPath G f ∧ f 0 = x ∧ + r + (b - q) = b from ⟨q, g, hg, hgs, Nat.add_sub_of_le hqb⟩) + omega + +/-- Every neighbour of the last vertex of a longest fixed-start path +lies on that path. -/ +theorem longest_path_endpoint_neighbors {V : Type*} {G : SimpleGraph V} + {x : V} {r : ℕ} {f : Fin (r + 1) → V} (hf : IsIndexedPath G f) + (hstart : f 0 = x) + (hmax : ∀ q (g : Fin (q + 1) → V), IsIndexedPath G g → g 0 = x → q ≤ r) : + ∀ v, G.Adj (f (Fin.last r)) v → v ∈ Set.range f := by + intro v hv + by_contra hn + have hp := indexedPath_snoc hf hn hv + have h := hmax (r + 1) (Fin.snoc f v) hp (by simpa using hstart) + omega + +/-- The endpoint neighbourhood alone gives the elementary lower bound +on the order of a longest fixed-start path. -/ +theorem longest_path_degree_bound {V : Type*} [Fintype V] {G : SimpleGraph V} + {x : V} {r : ℕ} {f : Fin (r + 1) → V} (hf : IsIndexedPath G f) + (hstart : f 0 = x) + (hmax : ∀ q (g : Fin (q + 1) → V), IsIndexedPath G g → g 0 = x → q ≤ r) : + (G.neighborSet (f (Fin.last r))).ncard ≤ r := by + classical + let e := f (Fin.last r) + have hneigh := longest_path_endpoint_neighbors hf hstart hmax + have hex : ∀ v : G.neighborFinset e, ∃ i : Fin r, f i.castSucc = v.val := by + intro v + have hadj := (G.mem_neighborFinset e v.val).mp v.property + obtain ⟨j, hj⟩ := hneigh v.val hadj + have hjlt : j.val < r := by + have hneq : j ≠ Fin.last r := by + intro h + subst j + exact hadj.ne hj + have hval : j.val ≠ r := fun h => hneq (Fin.ext h) + omega + exact ⟨⟨j.val, hjlt⟩, by simpa using hj⟩ + let index : G.neighborFinset e → Fin r := fun v => Classical.choose (hex v) + have hindex : ∀ v : G.neighborFinset e, f (index v).castSucc = v.val := + fun v => Classical.choose_spec (hex v) + have hinj : Function.Injective index := by + intro a b hab + apply Subtype.ext + rw [← hindex a, ← hindex b, hab] + have hcard := Fintype.card_le_of_injective index hinj + simpa only [Fintype.card_coe, Fintype.card_fin, + SimpleGraph.card_neighborFinset_eq_degree, SimpleGraph.ncard_neighborSet] using hcard + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LowerBound.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LowerBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..ad4da9e18e924a5c7c5082300133b6dba423c5ee --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/LowerBound.lean @@ -0,0 +1,83 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Definitions +import Mathlib.Logic.Equiv.Fin.Basic + +namespace OAI + +/-! +# The disjoint-clique lower bound + +The red graph consists of `a` disjoint complete graphs of order `k`. +A red cycle stays within one block, while an independent set uses at most +one vertex from each block. This is the lower-bound construction in the +proof of Theorem 1 of *Cycle--clique Ramsey numbers*. +-/ + +namespace CycleClique.Construction +/-- Disjoint red cliques: the first coordinate records the block. -/ +def blockGraph (a k : ℕ) : SimpleGraph (Fin a × Fin k) where + Adj x y := x ≠ y ∧ x.1 = y.1 + symm := ⟨fun _ _ h => ⟨h.1.symm, h.2.symm⟩⟩ + loopless := ⟨fun _ h => h.1 rfl⟩ + +@[simp] theorem blockGraph_adj {a k : ℕ} {x y : Fin a × Fin k} : + (blockGraph a k).Adj x y ↔ x ≠ y ∧ x.1 = y.1 := Iff.rfl + +private theorem cycleNext_castSucc {r : ℕ} (i : Fin r) : + cycleNext i.castSucc = i.succ := by + apply Fin.ext + exact Nat.mod_eq_of_lt (Nat.succ_lt_succ i.isLt) + +/-- Every red cycle in the disjoint-clique construction lies in a single block. -/ +theorem blockGraph_cycle_bound {a k m : ℕ} (hm : 0 < m) + (h : HasCycle (blockGraph a k) m) : m ≤ k := by + obtain ⟨f, hf, he⟩ := h + obtain ⟨r, rfl⟩ := Nat.exists_eq_succ_of_ne_zero (Nat.ne_of_gt hm) + have hfirst : ∀ i : Fin (r + 1), (f i).1 = (f 0).1 := by + intro i + induction i using Fin.induction with + | zero => rfl + | succ i ih => + have hi := (he i.castSucc).2 + rw [cycleNext_castSucc] at hi + exact hi.symm.trans ih + have hinj : Function.Injective (fun i => (f i).2) := by + intro i j hij + apply hf + exact Prod.ext ((hfirst i).trans (hfirst j).symm) hij + simpa using Fintype.card_le_of_injective (fun i => (f i).2) hinj + +/-- An independent set uses at most one vertex in every block. -/ +theorem blockGraph_independent_bound {a k n : ℕ} + (h : HasIndependent (blockGraph a k) n) : n ≤ a := by + obtain ⟨f, hf, he⟩ := h + have hinj : Function.Injective (fun i => (f i).1) := by + intro i j hij + by_contra hne + exact he i j ⟨fun h => hne (hf h), hij⟩ + simpa using Fintype.card_le_of_injective (fun i => (f i).1) hinj + +/-- The lower-bound coloring on a linearly labelled set of `k * a` vertices. -/ +theorem blockGraph_not_ramsey {a k m n : ℕ} (hkm : k < m) (han : a < n) : + ¬ RamseyProperty m n (k * a) := by + let e : Fin (k * a) ≃ Fin a × Fin k := + (finCongr (Nat.mul_comm k a)).trans finProdFinEquiv.symm + let G : SimpleGraph (Fin (k * a)) := (blockGraph a k).comap e + intro h + rcases h G with hc | hi + · have hc' : HasCycle (blockGraph a k) m := + hc.map e e.injective (fun h => h) + have := blockGraph_cycle_bound (by omega) hc' + omega + · have hi' : HasIndependent (blockGraph a k) n := + hi.map e e.injective (fun h => h) + have := blockGraph_independent_bound hi' + omega + +/-- The sharp lower bound in the manuscript's main parameter range. -/ +theorem cycle_clique_lower_bound {m n : ℕ} (hm : 3 ≤ m) (hn : 3 ≤ n) : + ¬ RamseyProperty m n ((m - 1) * (n - 1)) := by + exact blockGraph_not_ramsey (by omega) (by omega) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Main.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..3819623ddf5e061ee68a9bbca4f7c4e68bf6a628 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Main.lean @@ -0,0 +1,21 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ConditionalMain +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CEHamiltonicity + +namespace OAI + +/-! The unconditional exact cycle–clique Ramsey numbers, including R(C₃,K₃)=6. -/ + +namespace CycleClique.Construction +theorem cycle_clique_main_unconditional {m n : ℕ} + (hn : 3 ≤ n) (hnm : n ≤ m) (hexcept : (m, n) ≠ (3, 3)) : + IsRamseyNumber m n ((m - 1) * (n - 1) + 1) := + cycle_clique_main ceAlphaTwo_proved hn hnm hexcept + +theorem cycle_clique_ramsey_unconditional {m n : ℕ} + (hn : 3 ≤ n) (hnm : n ≤ m) : + IsRamseyNumber m n (if m = 3 ∧ n = 3 then 6 else (m - 1) * (n - 1) + 1) := + cycle_clique_ramsey ceAlphaTwo_proved hn hnm + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/MissingCoverage.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/MissingCoverage.lean new file mode 100644 index 0000000000000000000000000000000000000000..e21eb264fba75466df83feb0d1291a912ab9d67b --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/MissingCoverage.lean @@ -0,0 +1,47 @@ +import Mathlib.Data.Finset.Card +import Mathlib.Data.Finset.Lattice.Lemmas +import Mathlib.Tactic + +namespace OAI + +/-! The two targets cover a finite set when its cardinality is at most +the number of those distinct targets that lie in it. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type*} + +theorem subset_pair_of_card_le_indicators (M : Finset V) {x y : V} (hne : x ≠ y) + (hcard : M.card ≤ (if x ∈ M then 1 else 0) + (if y ∈ M then 1 else 0)) : + M ⊆ {x, y} := by + classical + by_cases hx : x ∈ M + · by_cases hy : y ∈ M + · have hsub : ({x, y} : Finset V) ⊆ M := by + intro z hz + rcases Finset.mem_insert.mp hz with rfl | hz + · exact hx + · obtain rfl := Finset.mem_singleton.mp hz + exact hy + have heq : ({x, y} : Finset V) = M := Finset.eq_of_subset_of_card_le hsub (by + have hh : M.card ≤ 2 := by simpa [hx, hy] using hcard + simpa [hne] using hh) + rw [← heq] + · have hsub : ({x} : Finset V) ⊆ M := by simp [hx] + have heq : ({x} : Finset V) = M := Finset.eq_of_subset_of_card_le hsub (by + simpa [hx, hy] using hcard) + rw [← heq] + simp + · by_cases hy : y ∈ M + · have hsub : ({y} : Finset V) ⊆ M := by simp [hy] + have heq : ({y} : Finset V) = M := Finset.eq_of_subset_of_card_le hsub (by + simpa [hx, hy] using hcard) + rw [← heq] + simp + · have he : M = ∅ := Finset.card_eq_zero.mp (by simpa [hx, hy] using hcard) + simp [he] + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Monotonicity.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Monotonicity.lean new file mode 100644 index 0000000000000000000000000000000000000000..e45e3f2c78c130ad57640cddc8a171e2d59bcf51 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Monotonicity.lean @@ -0,0 +1,30 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Definitions + +namespace OAI + +namespace CycleClique.Construction +/-- Enlarging the vertex set preserves the forcing property. -/ +theorem RamseyProperty.mono {m n M N : ℕ} (h : RamseyProperty m n M) (hMN : M ≤ N) : + RamseyProperty m n N := by + intro G + let f : Fin M → Fin N := Fin.castLE hMN + have hf : Function.Injective f := Fin.castLE_injective hMN + rcases h (G.comap f) with hc | hi + · exact Or.inl (hc.map f hf (fun h => h)) + · exact Or.inr (hi.map f hf (fun h => h)) + +/-- A coloring avoiding the two targets restricts to every smaller order. -/ +theorem not_ramseyProperty_mono {m n M N : ℕ} + (h : ¬ RamseyProperty m n N) (hMN : M ≤ N) : ¬ RamseyProperty m n M := + fun hM => h (hM.mono hMN) + +/-- A forcing upper bound and a coloring one vertex below it determine the number. -/ +theorem isRamseyNumber_of_upper_lower {m n N : ℕ} + (hupper : RamseyProperty m n (N + 1)) (hlower : ¬ RamseyProperty m n N) : + IsRamseyNumber m n (N + 1) := by + refine ⟨hupper, fun M hM => not_ramseyProperty_mono hlower ?_⟩ + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/NormalizeChains.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/NormalizeChains.lean new file mode 100644 index 0000000000000000000000000000000000000000..723331b36480988bb8d0da0453200303f77bbb60 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/NormalizeChains.lean @@ -0,0 +1,79 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PathSystem + +namespace OAI + +/-! Remove isolated clique vertices from a list of expanded chains. This +permits path surgery to retain singleton pieces until its final step. -/ + +namespace CycleClique.Construction +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +theorem short_chain_in_clique {l : List V} + (hends : (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q)) + (hsteps : l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q))) + (hlen : l.length < 3) : ∀ v ∈ l, v ∈ Q := by + cases l with + | nil => simp + | cons x l => + cases l with + | nil => simpa using hends.1 + | cons y l => + cases l with + | nil => + have hx : x ∈ Q := hends.1 x (by simp) + have hy : y ∈ Q := hends.2 y (by simp) + have hxy : ¬ (x ∈ Q ∧ y ∈ Q) := by simpa using hsteps + exact False.elim (hxy ⟨hx, hy⟩) + | cons z l => simp only [List.length_cons] at hlen; omega + +noncomputable def normalizeChains (C : List (List V)) + (hpaths : ∀ l ∈ C, l.Nodup ∧ l.IsChain G.Adj) + (hdis : C.Pairwise List.Disjoint) + (hends : ∀ l ∈ C, (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q)) + (hsteps : ∀ l ∈ C, l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q))) : + ExpandedPathSystem G Q where + chains := C.filter (fun l => decide (3 ≤ l.length)) + nontrivial := by + intro l hl + exact of_decide_eq_true (List.mem_filter.mp hl).2 + paths := fun l hl => hpaths l (List.mem_filter.mp hl).1 + disjoint := hdis.filter _ + endpoints := fun l hl => hends l (List.mem_filter.mp hl).1 + no_clique_steps := fun l hl => hsteps l (List.mem_filter.mp hl).1 + +theorem normalizeChains_outside_vertices [DecidableEq V] (C : List (List V)) + (hpaths : ∀ l ∈ C, l.Nodup ∧ l.IsChain G.Adj) + (hdis : C.Pairwise List.Disjoint) + (hends : ∀ l ∈ C, (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q)) + (hsteps : ∀ l ∈ C, l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q))) : + (normalizeChains C hpaths hdis hends hsteps).vertices \ Q = C.flatten.toFinset \ Q := by + ext v + simp only [Finset.mem_sdiff, ExpandedPathSystem.vertices, normalizeChains, + List.mem_toFinset, List.mem_flatten, List.mem_filter, decide_eq_true_eq] + constructor + · rintro ⟨⟨l, ⟨hl, _⟩, hv⟩, hvQ⟩ + exact ⟨⟨l, hl, hv⟩, hvQ⟩ + · rintro ⟨⟨l, hl, hv⟩, hvQ⟩ + have hlen : 3 ≤ l.length := by + by_contra hn + exact hvQ (short_chain_in_clique (hends l hl) (hsteps l hl) (by omega) v hv) + exact ⟨⟨l, ⟨hl, hlen⟩, hv⟩, hvQ⟩ + +theorem normalizeChains_amount [DecidableEq V] (C : List (List V)) + (hpaths : ∀ l ∈ C, l.Nodup ∧ l.IsChain G.Adj) + (hdis : C.Pairwise List.Disjoint) + (hends : ∀ l ∈ C, (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q)) + (hsteps : ∀ l ∈ C, l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q))) : + (normalizeChains C hpaths hdis hends hsteps).amount = (C.flatten.toFinset \ Q).card := by + classical + unfold ExpandedPathSystem.amount + convert congrArg Finset.card + (@normalizeChains_outside_vertices V G Q (Classical.decEq V) C + hpaths hdis hends hsteps) using 1 + congr 1 + ext v + simp + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/NormalizedIncident.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/NormalizedIncident.lean new file mode 100644 index 0000000000000000000000000000000000000000..40853e74ce91655681c50865541c234a01c1254a --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/NormalizedIncident.lean @@ -0,0 +1,103 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawOrientations +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawPermutation +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawCliqueCompletion + +namespace OAI + +/-! Count the incident clique vertices after isolated chain pieces are removed. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +noncomputable def activeCliqueCount (Q : Finset V) (l : List V) : ℕ := + if 3 ≤ l.length then chainCliqueCount Q l else 0 + +@[simp] theorem activeCliqueCount_nil : activeCliqueCount Q ([] : List V) = 0 := by + simp [activeCliqueCount] + +@[simp] theorem activeCliqueCount_singleton (x : V) : activeCliqueCount Q [x] = 0 := by + simp [activeCliqueCount] + +@[simp] theorem activeCliqueCount_reverse (l : List V) : + activeCliqueCount Q l.reverse = activeCliqueCount Q l := by + simp [activeCliqueCount] + +theorem activeCliqueCount_add_singleton {l : List V} (hne : l ≠ []) + (hends : (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q)) + (hsteps : l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q))) : + activeCliqueCount Q l + (if l.length = 1 then 1 else 0) = chainCliqueCount Q l := by + classical + by_cases hlen : 3 ≤ l.length + · have hn : l.length ≠ 1 := by omega + simp [activeCliqueCount, hlen, hn] + · have hc := short_chainCliqueCount hne hends hsteps (by omega) + have hall := short_chain_in_clique hends hsteps (by omega) + have hlength : l.length = 1 := by + cases l with + | nil => exact False.elim (hne rfl) + | cons x xs => + cases xs with + | nil => rfl + | cons y xs => + exact False.elim ((List.isChain_cons_cons.mp hsteps).1 + ⟨hall x (by simp), hall y (by simp)⟩) + simp [activeCliqueCount, hlength, hc] + +namespace RawPathSystem + +theorem normalize_incident (S : RawPathSystem G Q) : + S.normalize.incident = (S.chains.map (activeCliqueCount Q)).sum := by + rw [ExpandedPathSystem.incident_eq_chainCliqueCount, chainCliqueCount_flatten] + change ((S.chains.filter (fun l => decide (3 ≤ l.length))).map (chainCliqueCount Q)).sum = _ + induction S.chains with + | nil => rfl + | cons l C ih => + by_cases hl : 3 ≤ l.length + · simpa [List.filter_cons, hl, activeCliqueCount] using + congrArg (fun n => chainCliqueCount Q l + n) ih + · simpa [List.filter_cons, hl, activeCliqueCount] using ih + +@[simp] theorem orientChains_normalize_incident (S : RawPathSystem G Q) (p : List V → Bool) : + (S.orientChains p).normalize.incident = S.normalize.incident := by + rw [normalize_incident, normalize_incident] + change ((S.chains.map (orientedChain p)).map (activeCliqueCount Q)).sum = _ + rw [List.map_map] + apply congrArg List.sum + apply List.map_congr_left + intro l hl + change activeCliqueCount Q (orientedChain p l) = activeCliqueCount Q l + unfold orientedChain + split_ifs <;> simp only [activeCliqueCount_reverse] + +@[simp] theorem reorder_normalize_incident (S : RawPathSystem G Q) + (K : List (List V)) (hp : K.Perm S.chains) : + (S.reorder K hp).normalize.incident = S.normalize.incident := by + rw [normalize_incident, normalize_incident] + exact (hp.map (activeCliqueCount Q)).sum_eq + +@[simp] theorem completeClique_normalize_incident (S : RawPathSystem G Q) : + S.completeClique.normalize.incident = S.normalize.incident := by + rw [normalize_incident, normalize_incident] + change ((S.chains ++ (Q \ S.vertices).toList.map (fun v => [v])).map (activeCliqueCount Q)).sum = _ + simp [List.map_map, Function.comp_def] + +end RawPathSystem + +namespace ExpandedPathSystem + +@[simp] theorem toRaw_normalize_incident (S : ExpandedPathSystem G Q) : + S.toRaw.normalize.incident = S.incident := by + rw [RawPathSystem.normalize_incident, incident_eq_chainCliqueCount, chainCliqueCount_flatten] + change (S.chains.map (activeCliqueCount Q)).sum = _ + apply congrArg List.sum + apply List.map_congr_left + intro l hl + simp only [activeCliqueCount, S.nontrivial l hl, ↓reduceIte] + +end ExpandedPathSystem + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/NormalizedRepresentatives.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/NormalizedRepresentatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..0581f3e0884e9841b5f7256c4b13a2b4ff663e95 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/NormalizedRepresentatives.lean @@ -0,0 +1,76 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.NormalizedIncident +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OptimalRepresentatives + +namespace OAI + +/-! Normalizing a raw orientation preserves its ground, amount, optimality, +and every representative, including its isolated clique vertices. -/ + +namespace CycleClique.Construction.RawPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +theorem normalize_ground (U : RawPathSystem G Q) : + U.normalize.ground = Q ∪ U.vertices := by + classical + have he := normalizeChains_outside_vertices U.chains U.paths U.disjoint U.endpoints U.no_clique_steps + change U.normalize.vertices \ Q = U.vertices \ Q at he + ext x + by_cases hx : x ∈ Q + · simp [ExpandedPathSystem.ground, hx] + · have hh := Finset.ext_iff.mp he x + simpa [ExpandedPathSystem.ground, hx] using hh + +theorem normalize_representative_mem (U : RawPathSystem G Q) {x : V} + (hx : x ∈ U.representatives) : x ∈ U.normalize.representativeFinset := by + classical + obtain ⟨r, hr, hxr⟩ := List.mem_flatten.mp hx + obtain ⟨l, hl, rfl⟩ := List.mem_map.mp hr + have hxl : x ∈ l := (chainRepresentatives_sublist l).subset hxr + by_cases hlen : 3 ≤ l.length + · have hlE : l ∈ U.normalize.chains := List.mem_filter.mpr ⟨hl, by simpa using hlen⟩ + apply List.mem_toFinset.mpr + apply List.mem_flatten.mpr + refine ⟨chainRepresentatives Q l, ?_, hxr⟩ + apply List.mem_map.mpr + exact ⟨l, List.mem_append_left _ hlE, rfl⟩ + · have hxQ : x ∈ Q := short_chain_in_clique (U.endpoints l hl) + (U.no_clique_steps l hl) (by omega) x hxl + have hxnot : x ∉ U.normalize.vertices := by + intro hxE + obtain ⟨m, hm, hxm⟩ := List.mem_flatten.mp (List.mem_toFinset.mp hxE) + have hmU : m ∈ U.chains := (List.mem_filter.mp hm).1 + have hmLen : 3 ≤ m.length := by simpa using (List.mem_filter.mp hm).2 + have hne : l ≠ m := by intro he; subst m; exact hlen hmLen + exact List.disjoint_left.mp (U.disjoint_of_mem hl hmU hne) hxl hxm + apply List.mem_toFinset.mpr + apply List.mem_flatten.mpr + refine ⟨chainRepresentatives Q [x], ?_, by simp [chainRepresentatives]⟩ + apply List.mem_map.mpr + refine ⟨[x], ?_, rfl⟩ + change [x] ∈ U.normalize.chains ++ (Q \ U.normalize.toRaw.vertices).toList.map (fun v => [v]) + apply List.mem_append_right + apply List.mem_map.mpr + exact ⟨x, Finset.mem_toList.mpr (Finset.mem_sdiff.mpr ⟨hxQ, hxnot⟩), rfl⟩ + +end CycleClique.Construction.RawPathSystem + +namespace CycleClique.Construction.ExpandedPathSystem + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} {S : ExpandedPathSystem G Q} + +theorem IsOptimal.of_amount_count {k : ℕ} (hopt : S.IsOptimal k) + (T : ExpandedPathSystem G Q) (ha : T.amount = S.amount) + (he : T.assignedCount = S.assignedCount) : T.IsOptimal k := by + refine ⟨by simpa only [ha] using hopt.budget, ?_, ?_⟩ + · intro U hU + simpa only [ha] using hopt.maximal U hU + · intro U hU + rw [he] + exact hopt.minimal U (hU.trans ha) + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OptimalPathSystem.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OptimalPathSystem.lean new file mode 100644 index 0000000000000000000000000000000000000000..e9ef0badb7eb59e445131a55c711a358411116c9 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OptimalPathSystem.lean @@ -0,0 +1,82 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PathSystem + +namespace OAI + +/-! Existence and the exact optimality criterion for manuscript Section 6. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +/-- Maximize the total amount below `k+1-|Q|`, then minimize the number of +assigned paths. Both optimization orders are on natural numbers. -/ +structure IsOptimal (S : ExpandedPathSystem G Q) (k : ℕ) : Prop where + budget : S.amount ≤ k - Q.card + maximal : ∀ T : ExpandedPathSystem G Q, T.amount ≤ k - Q.card → T.amount ≤ S.amount + minimal : ∀ T : ExpandedPathSystem G Q, T.amount = S.amount → + S.assignedCount ≤ T.assignedCount + +/-- The empty system ensures existence, even when the amount budget is zero. -/ +theorem exists_optimal (G : SimpleGraph V) (Q : Finset V) (k : ℕ) : + ∃ S : ExpandedPathSystem G Q, S.IsOptimal k := by + classical + let b := k - Q.card + have hex : ∃ d, ∃ T : ExpandedPathSystem G Q, T.amount + d = b := by + exact ⟨b, empty G Q, by simp⟩ + obtain ⟨S₀, hS₀⟩ := Nat.find_spec hex + have hmax : ∀ T : ExpandedPathSystem G Q, T.amount ≤ b → T.amount ≤ S₀.amount := by + intro T hT + have hd := Nat.find_min' hex (show ∃ S : ExpandedPathSystem G Q, + S.amount + (b - T.amount) = b from ⟨T, Nat.add_sub_of_le hT⟩) + omega + have he : ∃ e, ∃ T : ExpandedPathSystem G Q, + T.amount = S₀.amount ∧ T.assignedCount = e := ⟨S₀.assignedCount, S₀, rfl, rfl⟩ + obtain ⟨S, hSamount, hSe⟩ := Nat.find_spec he + refine ⟨S, ⟨?_, ?_, ?_⟩⟩ + · change S.amount ≤ b + omega + · intro T hT + rw [hSamount] + exact hmax T hT + · intro T hT + rw [hSe] + exact Nat.find_min' he ⟨T, hT.trans hSamount, rfl⟩ + +theorem incident_le (S : ExpandedPathSystem G Q) : S.incident ≤ Q.card := by + classical + exact Finset.card_le_card Finset.inter_subset_right + +/-- Manuscript Lemma `path:optimality`, retaining its exact indicator and +the secondary minimization of the number of assigned paths. -/ +theorem IsOptimal.criterion {S : ExpandedPathSystem G Q} {k : ℕ} + (hopt : S.IsOptimal k) (hk : 3 ≤ k) (hQk : Q.card ≤ k) + (hQ : G.IsClique (Q : Set V)) (hcycle : ¬ HasCycle G (k + 1)) + (T : ExpandedPathSystem G Q) + (hlow : S.amount + (if S.assignedCount ≤ T.assignedCount then 1 else 0) ≤ T.amount) + (hhigh : T.amount + T.incident ≤ k + 1) : False := by + by_cases hthreshold : k + 1 - Q.card ≤ T.amount + · exact T.forbidden_interval hk hQ hcycle hthreshold hhigh + have hTbudget : T.amount ≤ k - Q.card := by omega + have hmax := hopt.maximal T hTbudget + by_cases he : S.assignedCount ≤ T.assignedCount + · simp only [he, ↓reduceIte] at hlow + omega + · simp only [he, ↓reduceIte, Nat.add_zero] at hlow + have hamount : T.amount = S.amount := by omega + exact he (hopt.minimal T hamount) + +/-- A valid improvement by one outside vertex is impossible, regardless +of how the number of represented paths changes. -/ +theorem IsOptimal.no_one_vertex_increase {S : ExpandedPathSystem G Q} {k : ℕ} + (hopt : S.IsOptimal k) (hk : 3 ≤ k) (hQk : Q.card ≤ k) + (hQ : G.IsClique (Q : Set V)) (hcycle : ¬ HasCycle G (k + 1)) + (T : ExpandedPathSystem G Q) (hinc : T.amount = S.amount + 1) : False := by + apply hopt.criterion hk hQk hQ hcycle T + · split_ifs <;> omega + · have hb := hopt.budget + have hi := T.incident_le + omega + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OptimalRepresentatives.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OptimalRepresentatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..521633fcabfe1af4323130c9b4cd1dc894e3aafa --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OptimalRepresentatives.lean @@ -0,0 +1,56 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RepresentativeBallGrowth +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OptimalPathSystem + +namespace OAI + +/-! The complete ground set and representative finset of an optimal system. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +noncomputable def ground (S : ExpandedPathSystem G Q) : Finset V := Q ∪ S.vertices + +noncomputable def representativeFinset (S : ExpandedPathSystem G Q) : Finset V := + S.toRaw.completeClique.representatives.toFinset + +theorem ground_card (S : ExpandedPathSystem G Q) : S.ground.card = Q.card + S.amount := by + have hc := Finset.card_union_add_card_inter Q S.vertices + have hpart := Finset.card_sdiff_add_card_inter S.vertices Q + have hi : (Q ∩ S.vertices).card = (S.vertices ∩ Q).card := by rw [Finset.inter_comm] + unfold ground amount + omega + +theorem representativeFinset_card (S : ExpandedPathSystem G Q) : + S.representativeFinset.card = Q.card := by + rw [representativeFinset, List.toFinset_card_of_nodup S.toRaw.completeClique.representatives_nodup, + RawPathSystem.completeClique_representatives_length] + +theorem representativeFinset_subset_ground (S : ExpandedPathSystem G Q) : + S.representativeFinset ⊆ S.ground := by + intro v hv + have hv' := S.toRaw.completeClique.representatives_sublist.subset (List.mem_toFinset.mp hv) + have hvU : v ∈ S.toRaw.completeClique.vertices := List.mem_toFinset.mpr hv' + rw [RawPathSystem.completeClique_vertices] at hvU + exact Finset.mem_union.mpr (Finset.mem_union.mp hvU).symm + +theorem IsOptimal.ground_card_le {S : ExpandedPathSystem G Q} {k : ℕ} + (hopt : S.IsOptimal k) (hQk : Q.card ≤ k) : S.ground.card ≤ k := by + rw [ground_card] + have h := hopt.budget + omega + +theorem IsOptimal.representativeFinset_one_exclusion {S : ExpandedPathSystem G Q} {k : ℕ} + (hopt : S.IsOptimal k) (hk : 3 ≤ k) (hQk : Q.card ≤ k) + (hQ : G.IsClique (Q : Set V)) (hcycle : ¬ HasCycle G (k + 1)) + {x y : V} (hx : x ∈ S.representativeFinset) (hy : y ∈ S.representativeFinset) (hne : x ≠ y) : + ¬ OutsidePath G (S.ground : Set V) x y 1 := by + simpa only [ground, Finset.coe_union] using + hopt.completed_representatives_one_exclusion hk hQk hQ hcycle + (List.mem_toFinset.mp hx) (List.mem_toFinset.mp hy) hne + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OrientedSingleton.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OrientedSingleton.lean new file mode 100644 index 0000000000000000000000000000000000000000..8dcec8c65ef5d196fda4dfacf298ab1bed55d7a0 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OrientedSingleton.lean @@ -0,0 +1,49 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.NormalizedIncident + +namespace OAI + +/-! Singleton components of every orientation are exactly the missing +clique vertices of the original expanded system. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +theorem oriented_complete_singleton_iff (S : ExpandedPathSystem G Q) + (p : List V → Bool) {l : List V} {x : V} + (hl : l ∈ (S.toRaw.completeClique.orientChains p).chains) (hx : x ∈ l) : + l.length = 1 ↔ x ∉ S.vertices := by + classical + change l ∈ S.toRaw.completeClique.chains.map (RawPathSystem.orientedChain p) at hl + obtain ⟨m, hm, rfl⟩ := List.mem_map.mp hl + have hp := RawPathSystem.orientedChain_perm p m + have hmx : x ∈ m := hp.mem_iff.mp hx + change m ∈ S.chains ++ (Q \ S.toRaw.vertices).toList.map (fun v => [v]) at hm + rcases List.mem_append.mp hm with hm | hm + · have hxS : x ∈ S.vertices := + List.mem_toFinset.mpr (List.mem_flatten.mpr ⟨m, hm, hmx⟩) + have hn := S.nontrivial m hm + constructor + · intro hlen + have hh := hp.length_eq + omega + · intro hnot + exact False.elim (hnot hxS) + · obtain ⟨v, hv, rfl⟩ := List.mem_map.mp hm + have hxv : x = v := by simpa using hmx + subst x + have hvnot : v ∉ S.vertices := (Finset.mem_sdiff.mp (Finset.mem_toList.mp hv)).2 + have hlen : (RawPathSystem.orientedChain p [v]).length = 1 := hp.length_eq + exact ⟨fun _ => hvnot, fun _ => hlen⟩ + +theorem oriented_complete_tail_nil_iff (S : ExpandedPathSystem G Q) + (p : List V → Bool) {B : List V} {x : V} + (hl : x :: B ∈ (S.toRaw.completeClique.orientChains p).chains) : + B = [] ↔ x ∉ S.vertices := by + simpa using S.oriented_complete_singleton_iff p hl (by simp) + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OrientedTerminalWeights.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OrientedTerminalWeights.lean new file mode 100644 index 0000000000000000000000000000000000000000..f018b6ae06ae98b5dab68373a607e8d8216bf72a --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OrientedTerminalWeights.lean @@ -0,0 +1,69 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.NormalizedRepresentatives +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalWeights +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalClassification + +namespace OAI + +/-! The terminal first-pair and second-triple bounds hold in every +independent orientation of the original system. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type} [Fintype V] {G : SimpleGraph V} {Q : Finset V} {S : ExpandedPathSystem G Q} + +theorem IsOptimal.terminal_oriented_first_ball {k : ℕ} + (hopt : S.IsOptimal k) (hk : 3 ≤ k) (hQk : Q.card ≤ k) + (hQ : G.IsClique (Q : Set V)) (hcycle : ¬ HasCycle G (k + 1)) + (hclique : G.cliqueNum ≤ Q.card) (hc : 2 ≤ S.chains.length) + (hexpand : ∀ v, k + 1 ≤ (closedNeighborhood G {v}).card) + (p : List V → Bool) {x : V} + (hx : x ∈ (S.toRaw.completeClique.orientChains p).representatives) : + Q.card + 1 ≤ (outsideBallFinset G S.ground x 1).card ∧ + HasIndependent (G.induce (outsideBallFinset G S.ground x 1 : Set V)) 2 := by + let U := S.toRaw.completeClique.orientChains p + let T := U.normalize + have hTa : T.amount = S.amount := by simp [T, U] + have hTe : T.assignedCount = S.assignedCount := by simp [T, U] + have hTi : T.incident = S.incident := by simp [T, U] + have hTground : T.ground = S.ground := by + simp only [T, U, RawPathSystem.normalize_ground, RawPathSystem.orientChains_vertices, + RawPathSystem.completeClique_vertices] + change Q ∪ (S.vertices ∪ Q) = Q ∪ S.vertices + ext v + simp only [Finset.mem_union] + tauto + have hcT : 2 ≤ T.chains.length := by + have hT := T.assignedCount_add_chains_length + have hS := S.assignedCount_add_chains_length + rw [hTe, hTi] at hT + omega + have hoptT := hopt.of_amount_count T hTa hTe + have hxT : x ∈ T.representativeFinset := U.normalize_representative_mem hx + obtain ⟨hcard, hpair⟩ := + hoptT.terminal_first_ball hk hQk hQ hcycle hclique hcT hexpand hxT + refine ⟨by simpa only [hTground] using hcard, ?_⟩ + convert hpair using 1 <;> rw [hTground] + +theorem IsOptimal.terminal_oriented_second_ball (hCE : CEAlphaTwo) {k : ℕ} + (hopt : S.IsOptimal k) (hk : 5 ≤ k) (hQk : Q.card ≤ k) (ht : 1 ≤ Q.card) + (hkt : 2 * Q.card ≤ k) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hclique : G.cliqueNum ≤ Q.card) + (hc : 2 ≤ S.chains.length) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (p : List V → Bool) {x : V} + (hx : x ∈ (S.toRaw.completeClique.orientChains p).representatives) : + HasIndependent (G.induce (outsideBallFinset G S.ground x 2 : Set V)) 3 := by + have hsingle : ∀ v, k + 1 ≤ (closedNeighborhood G {v}).card := by + intro v + simpa using hexpand {v} (by simp) (by simp) + have hp := (hopt.terminal_oriented_first_ball (by omega) hQk hQ hcycle + hclique hc hsingle p hx).2 + exact outsideBall_two_triple_of_first_pair hCE hk ht hkt hcycle hclique + (hopt.ground_card_le hQk) hexpand hp + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OutsideChainTemplate.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OutsideChainTemplate.lean new file mode 100644 index 0000000000000000000000000000000000000000..3013ebfce580582c4d8f1eee4b5ec8ff8b55cd73 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OutsideChainTemplate.lean @@ -0,0 +1,110 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.AssignedDeletion +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OutsidePathRules +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawEmbedding + +namespace OAI + +/-! Expand one certified outside connector inside an explicit chain +template. All old vertices are checked as a finite disjoint path collection. -/ + +namespace CycleClique.Construction.RawPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +theorem expand_outside_template (S : RawPathSystem G Q) {A B J : List V} {x y : V} + (hold : (S.chains.flatten ++ (A ++ x :: y :: B)).Nodup) + (hleft : (A ++ [x]).IsChain G.Adj) (hright : (y :: B).IsChain G.Adj) + (hstart : ∀ v ∈ (A ++ [x]).head?, v ∈ Q) + (hfinish : ∀ v ∈ (y :: B).getLast?, v ∈ Q) + (hleftSteps : (A ++ [x]).IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q))) + (hrightSteps : (y :: B).IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q))) + (hJ : J.Nodup) (hJne : J ≠ []) (hJQ : ∀ v ∈ J, v ∉ Q) + (hdis : J.Disjoint (S.chains.flatten ++ (A ++ x :: y :: B))) + (hpath : (x :: (J ++ [y])).IsChain G.Adj) : + ∃ T : RawPathSystem G Q, + T.chains = S.chains ++ [A ++ x :: (J ++ y :: B)] ∧ + T.amount = chainOutsideCount Q (S.chains.flatten ++ (A ++ x :: y :: B)) + J.length ∧ + T.assignedCount = S.assignedCount + (chainCliqueCount Q (A ++ x :: y :: B) - 1) ∧ + T.normalize.incident ≤ chainCliqueCount Q (S.chains.flatten ++ (A ++ x :: y :: B)) := by + classical + let l := A ++ x :: (J ++ y :: B) + let C := S.chains ++ [l] + have hp : C.flatten.Perm ((S.chains.flatten ++ (A ++ x :: y :: B)) ++ J) := by + apply List.perm_iff_count.mpr + intro v + simp only [C, l, List.flatten_append, List.flatten_cons, List.flatten_nil, + List.append_nil, List.count_append, List.count_cons] + omega + have hflat : C.flatten.Nodup := hp.nodup_iff.mpr (hold.append hJ hdis.symm) + have hleftRev : (x :: A.reverse).IsChain G.Adj := by + simpa using List.isChain_reverse.mpr (hleft.imp (fun _ _ h => h.symm)) + have hleftRevSteps : (x :: A.reverse).IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q)) := by + simpa using List.isChain_reverse.mpr (hleftSteps.imp (fun _ _ h (h' : _ ∧ _) => h h'.symm)) + have hlpath : l.IsChain G.Adj := by + simpa only [l, List.reverse_reverse] using + reverse_join_chain (fun _ _ h => h.symm) hleftRev hright hpath + have hlsteps : l.IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q)) := by + simpa only [l, List.reverse_reverse] using + reverse_join_chain (fun _ _ h (h' : _ ∧ _) => h h'.symm) hleftRevSteps hrightSteps + (chain_outside_interior_of_ne_nil hJne hJQ) + have hlhead : l.head? = (A ++ [x]).head? := by + cases A <;> rfl + have hlrepl : l = (A ++ [x]) ++ J ++ (y :: B) := by simp [l, List.append_assoc] + have hllast : l.getLast? = (y :: B).getLast? := by + rw [hlrepl, List.getLast?_append, + List.getLast?_eq_some_getLast (show y :: B ≠ [] by simp)] + rfl + let T : RawPathSystem G Q := { + chains := C + paths := by + intro r hr + refine ⟨(List.nodup_flatten.mp hflat).1 r hr, ?_⟩ + rcases List.mem_append.mp hr with hr | hr + · exact (S.paths r hr).2 + · have he : r = l := by simpa using hr + exact he.symm ▸ hlpath + disjoint := (List.nodup_flatten.mp hflat).2 + endpoints := by + intro r hr + rcases List.mem_append.mp hr with hr | hr + · exact S.endpoints r hr + · have he : r = l := by simpa using hr + subst r + simpa only [hlhead, hllast] using And.intro hstart hfinish + no_clique_steps := by + intro r hr + rcases List.mem_append.mp hr with hr | hr + · exact S.no_clique_steps r hr + · have he : r = l := by simpa using hr + exact he.symm ▸ hlsteps } + refine ⟨T, rfl, ?_, ?_, ?_⟩ + · rw [T.amount_eq_outside_count] + have hh := (hp.filter (fun v => decide (v ∉ Q))).length_eq + have hfilter : J.filter (fun v => decide (v ∉ Q)) = J := by + apply List.filter_eq_self.mpr + intro v hv + simpa using hJQ v hv + simpa only [chainOutsideCount, List.filter_append, List.length_append, hfilter] using hh + · change rawAssignedCount Q C = S.assignedCount + _ + have hlcount : chainCliqueCount Q l = chainCliqueCount Q (A ++ x :: y :: B) := by + have hz := chainCliqueCount_eq_zero hJQ + rw [hlrepl] + simp only [chainCliqueCount_append, hz, Nat.add_zero] + simp [chainCliqueCount_cons, Nat.add_assoc, show chainCliqueCount Q [] = 0 from rfl] + simp only [C, rawAssignedCount, List.map_append, List.sum_append, List.map_cons, + List.map_nil, List.sum_cons, List.sum_nil, Nat.add_zero, hlcount] + rfl + · apply T.normalize_incident_le.trans + have hh := (hp.filter (fun v => decide (v ∈ Q))).length_eq + have hz := chainCliqueCount_eq_zero hJQ + have he : chainCliqueCount Q T.chains.flatten = + chainCliqueCount Q (S.chains.flatten ++ (A ++ x :: y :: B)) := by + simpa only [chainCliqueCount, List.filter_append, List.length_append, + show (J.filter (fun v => decide (v ∈ Q))).length = 0 from hz, Nat.add_zero] using hh + exact he.le + +end CycleClique.Construction.RawPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OutsidePathRules.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OutsidePathRules.lean new file mode 100644 index 0000000000000000000000000000000000000000..a28fe5c23c9afd29234093fe7caaf4312792ae97 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OutsidePathRules.lean @@ -0,0 +1,157 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.BallSeparation +import OAI.Combinatorics.Ramsey.CycleClique.Construction.WalkCycle + +namespace OAI + +/-! Required-path constraints and inheritance, including the parameter-zero +edge case, from manuscript Lemmas `finite:required-path-rule` and +`finite:inheritance`. -/ + +namespace CycleClique.Construction +variable {V : Type*} {G : SimpleGraph V} + +/-- A simple outside path with `d` internal vertices. Parameter zero is +the joining edge; positive parameters agree with the boundary-graph version. -/ +def OutsidePath (G : SimpleGraph V) (X : Set V) (x y : V) (d : ℕ) : Prop := + ∃ p : G.Walk x y, p.IsPath ∧ p.length = d + 1 ∧ + ∀ v ∈ p.support, v ∈ X → v = x ∨ v = y + +theorem outsidePath_zero {X : Set V} {x y : V} : + OutsidePath G X x y 0 ↔ G.Adj x y := by + constructor + · rintro ⟨p, _, hp, _⟩ + exact p.adj_of_length_eq_one hp + · intro h + refine ⟨h.toWalk, h.isPath_toWalk, rfl, ?_⟩ + intro v hv _ + simpa using hv + +theorem outsidePath_one_of_common_neighbor {X : Set V} {x y u : V} + (hxy : x ≠ y) (hxu : G.Adj x u) (huy : G.Adj u y) (hu : u ∉ X) : + OutsidePath G X x y 1 := by + have hchain : [x, u, y].IsChain G.Adj := by simpa using And.intro hxu huy + let p : G.Walk x y := SimpleGraph.Walk.ofSupport [x, u, y] (by simp) hchain + have hsupp : p.support = [x, u, y] := SimpleGraph.Walk.support_ofSupport (by simp) hchain + have hlen : p.length = 2 := SimpleGraph.Walk.length_ofSupport (by simp) hchain + refine ⟨p, ?_, ?_, ?_⟩ + · apply SimpleGraph.Walk.IsPath.mk' + rw [hsupp] + simp [hxy, hxu.ne, huy.ne] + · exact hlen + · intro v hv hvX + simp only [hsupp, List.mem_cons, List.not_mem_nil, or_false] at hv + rcases hv with rfl | rfl | rfl + · exact Or.inl rfl + · exact False.elim (hu hvX) + · exact Or.inr rfl + +def boundaryHom (G : SimpleGraph V) (X : Set V) : boundaryGraph G X →g G where + toFun := id + map_rel' := fun h => h.1 + +theorem PositiveOutsidePath.toOutside {X : Set V} {x y : V} {d : ℕ} + (h : PositiveOutsidePath G X x y d) : OutsidePath G X x y d := by + obtain ⟨p, hp, hlen, hsupp⟩ := h + let f := boundaryHom G X + refine ⟨p.map f, hp.map Function.injective_id, ?_, ?_⟩ + · exact (SimpleGraph.Walk.length_map f p).trans hlen + · intro v hv hvX + have hv' : v ∈ p.support := by simpa [f, boundaryHom] using hv + exact hsupp v hv' hvX + +theorem OutsidePath.of_enlargement {X X' : Set V} {x y : V} {d : ℕ} + (hXX' : X ⊆ X') (h : OutsidePath G X' x y d) : OutsidePath G X x y d := by + obtain ⟨p, hp, hlen, hsupp⟩ := h + exact ⟨p, hp, hlen, fun v hv hvX => hsupp v hv (hXX' hvX)⟩ + +theorem OutsidePath.reverse {X : Set V} {x y : V} {d : ℕ} + (h : OutsidePath G X x y d) : OutsidePath G X y x d := by + obtain ⟨p, hp, hlen, hsupp⟩ := h + refine ⟨p.reverse, hp.reverse, by simpa using hlen, ?_⟩ + intro v hv hvX + exact (hsupp v (by simpa using hv) hvX).symm + +theorem outsidePath_forbidden_enlargement {X X' : Set V} {x y : V} {d : ℕ} + (hXX' : X ⊆ X') (h : ¬ OutsidePath G X x y d) : ¬ OutsidePath G X' x y d := + fun hp => h (hp.of_enlargement hXX') + +/-- Extract the actual internal vertex list. Its vertices avoid `X`, +and its length is exactly the outside parameter. -/ +theorem OutsidePath.interior {X : Set V} {x y : V} {d : ℕ} + (h : OutsidePath G X x y d) : + ∃ J : List V, J.Nodup ∧ J.length = d ∧ (∀ z ∈ J, z ∉ X) ∧ + (x :: (J ++ [y])).IsChain G.Adj := by + obtain ⟨p, hp, hlen, hsupp⟩ := h + cases p with + | nil => simp at hlen + | cons hxy p => + let J := p.support.dropLast + have hsuffix : J ++ [y] = p.support := by + simpa only [J, p.getLast_support] using + List.dropLast_concat_getLast p.support_ne_nil + have hnd : (x :: (J ++ [y])).Nodup := by + rw [hsuffix] + exact hp.support_nodup + have hJ : J.Nodup := (List.nodup_append'.mp (List.nodup_cons.mp hnd).2).1 + have hJlen : J.length = d := by + simp only [SimpleGraph.Walk.length_cons] at hlen + simp only [J, List.length_dropLast, SimpleGraph.Walk.length_support] + omega + refine ⟨J, hJ, hJlen, ?_, ?_⟩ + · intro z hz hzX + have hzsupport : z ∈ (SimpleGraph.Walk.cons hxy p).support := by + simp only [SimpleGraph.Walk.support_cons, ← hsuffix] + exact List.mem_cons.mpr (Or.inr (List.mem_append_left _ hz)) + rcases hsupp z hzsupport hzX with rfl | rfl + · exact (List.nodup_cons.mp hnd).1 (List.mem_append_left _ hz) + · exact List.disjoint_left.mp + (List.nodup_append'.mp (List.nodup_cons.mp hnd).2).2.2 hz (by simp) + · rw [hsuffix] + exact (SimpleGraph.Walk.cons hxy p).isChain_adj_support + +private theorem start_not_mem_support_tail {x y : V} {p : G.Walk x y} + (hp : p.IsPath) : x ∉ p.support.tail := by + have hnd := hp.support_nodup + rw [← p.cons_tail_support] at hnd + exact (List.nodup_cons.mp hnd).1 + +/-- A required path lies in `X`, while the internal vertices of the +outside path avoid `X`; joining the two gives the exact cycle length. -/ +theorem hasCycle_of_required_outside_path {X : Set V} {x y : V} + (p : G.Walk x y) (hp : p.IsPath) (hpX : ∀ v ∈ p.support, v ∈ X) + {d : ℕ} (houtside : OutsidePath G X x y d) + (hlen : 2 ≤ p.length ∨ 1 ≤ d) : HasCycle G (p.length + (d + 1)) := by + obtain ⟨q, hq, hqlen, hqX⟩ := houtside + have hqr : q.reverse.IsPath := hq.reverse + have hdis : p.support.tail.Disjoint q.reverse.support.tail := by + apply List.disjoint_left.mpr + intro v hvp hvq + have hvp' : v ∈ p.support := List.mem_of_mem_tail hvp + have hvq' : v ∈ q.support := by + simpa using (List.mem_of_mem_tail hvq : v ∈ q.reverse.support) + rcases hqX v hvq' (hpX v hvp') with rfl | rfl + · exact start_not_mem_support_tail hp hvp + · exact start_not_mem_support_tail hqr hvq + have hc := hp.isCycle_append hqr hdis (by + rcases hlen with h | h + · exact Or.inl (by omega) + · exact Or.inr (by simpa [hqlen] using (show 1 < d + 1 by omega))) + have hcycle := hasCycle_of_isCycle hc + simpa [hqlen] using hcycle + +/-- Every simple required path of length `ℓ≤k` excludes exactly the +outside parameter `k-ℓ`. This also covers a required path of length `k` +and a hypothetical joining edge. -/ +theorem required_path_forbids {X : Set V} {x y : V} {k : ℕ} + (hk : 3 ≤ k) (hcycle : ¬ HasCycle G (k + 1)) + (p : G.Walk x y) (hp : p.IsPath) (hpX : ∀ v ∈ p.support, v ∈ X) + (hpos : 1 ≤ p.length) (hbound : p.length ≤ k) : + ¬ OutsidePath G X x y (k - p.length) := by + intro h + have hc := hasCycle_of_required_outside_path p hp hpX h + (show 2 ≤ p.length ∨ 1 ≤ k - p.length by omega) + exact hcycle (by convert hc using 1; omega) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OutsideTemplate.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OutsideTemplate.lean new file mode 100644 index 0000000000000000000000000000000000000000..8958004772fca74ef735f158310eec3811181cfd --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/OutsideTemplate.lean @@ -0,0 +1,71 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OutsideChainTemplate +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OptimalPathSystem + +namespace OAI + +/-! A certificate for one use of the initial extension rule consists of +old disjoint chains and two tails joined by the proposed outside path. -/ + +namespace CycleClique.Construction +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +structure OutsideTemplate (G : SimpleGraph V) (Q : Finset V) (x y : V) where + rest : RawPathSystem G Q + left : List V + right : List V + nodup : (rest.chains.flatten ++ (left ++ x :: y :: right)).Nodup + left_path : (left ++ [x]).IsChain G.Adj + right_path : (y :: right).IsChain G.Adj + start : ∀ v ∈ (left ++ [x]).head?, v ∈ Q + finish : ∀ v ∈ (y :: right).getLast?, v ∈ Q + left_steps : (left ++ [x]).IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q)) + right_steps : (y :: right).IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q)) + +namespace OutsideTemplate + +variable {x y : V} + +def oldVertices (T : OutsideTemplate G Q x y) : List V := + T.rest.chains.flatten ++ (T.left ++ x :: y :: T.right) + +noncomputable def amount (T : OutsideTemplate G Q x y) : ℕ := + chainOutsideCount Q T.oldVertices + +noncomputable def assignedCount (T : OutsideTemplate G Q x y) : ℕ := + T.rest.assignedCount + (chainCliqueCount Q (T.left ++ x :: y :: T.right) - 1) + +noncomputable def incidentBound (T : OutsideTemplate G Q x y) : ℕ := + chainCliqueCount Q T.oldVertices + +theorem forbids {S : ExpandedPathSystem G Q} {k d : ℕ} (hopt : S.IsOptimal k) + (hk : 3 ≤ k) (hQk : Q.card ≤ k) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (T : OutsideTemplate G Q x y) + (hin : ∀ v ∈ T.oldVertices, v ∈ Q ∨ v ∈ S.vertices) (hd : 1 ≤ d) + (hlow : S.amount + (if S.assignedCount ≤ T.assignedCount then 1 else 0) ≤ T.amount + d) + (hhigh : T.amount + d + T.incidentBound ≤ k + 1) : + ¬ OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) x y d := by + intro h + obtain ⟨J, hJ, hlen, hout, hpath⟩ := h.interior + have hJne : J ≠ [] := by intro he; simp only [he, List.length_nil] at hlen; omega + have hdis : J.Disjoint T.oldVertices := by + apply List.disjoint_left.mpr + intro v hv ho + exact hout v hv (hin v ho) + obtain ⟨U, _, hUa, hUe, hUi⟩ := T.rest.expand_outside_template T.nodup + T.left_path T.right_path T.start T.finish T.left_steps T.right_steps hJ hJne + (fun v hv hQv => hout v hv (Or.inl hQv)) hdis hpath + have ha : U.normalize.amount = T.amount + d := by + rw [RawPathSystem.normalize_amount, hUa, hlen] + rfl + have he : U.normalize.assignedCount = T.assignedCount := by + rw [RawPathSystem.normalize_assignedCount, hUe] + rfl + apply hopt.criterion hk hQk hQ hcycle U.normalize + · simpa only [ha, he] using hlow + · change U.normalize.incident ≤ T.incidentBound at hUi + omega + +end OutsideTemplate +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PackingCertificate.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PackingCertificate.lean new file mode 100644 index 0000000000000000000000000000000000000000..dbed677d41a89de45991233e8751e04d86744d97 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PackingCertificate.lean @@ -0,0 +1,37 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FinitePacking + +namespace OAI + +/-! A weighted packing witness is validated by finite arithmetic and +pairwise matrix lookups. Its soundness needs only the established matrix. -/ + +namespace CycleClique.Construction +open scoped BigOperators + +def PackingCheck {n : ℕ} (M : ForbiddenMatrix n) (k t : ℕ) + (I : Finset (Fin n × ℕ)) : Prop := + (∀ p ∈ I, p.2 ≠ 0 → 0 < k + 1 + (zeroAvoidSet M p.1).card - n) ∧ + (∀ p ∈ I, ∀ q ∈ I, p ≠ q → indexedOptionsCompatible M p q) ∧ + k < ∑ p ∈ I, indexedOptionWeight M k t p + +instance {n : ℕ} (M : ForbiddenMatrix n) (k t : ℕ) (I : Finset (Fin n × ℕ)) : + Decidable (PackingCheck M k t I) := inferInstanceAs (Decidable (_ ∧ _)) + +variable {V : Type} [Fintype V] {G : SimpleGraph V} + +theorem packingCheck_false (hCE : CEAlphaTwo) {n k t : ℕ} + (hk : 5 ≤ k) (ht : 1 ≤ t) (hcycle : ¬ HasCycle G (k + 1)) + (hclique : G.cliqueNum ≤ t) (hbound : IndependenceBound G k) + {X : Finset V} {f : Fin n → V} (hf : Function.Injective f) + (hfX : ∀ i, f i ∈ X) (hX : X.card = n) + {M : ForbiddenMatrix n} (hM : M.Sound G X f) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (I : Finset (Fin n × ℕ)) (hc : PackingCheck M k t I) : False := by + have hb := indexed_packing_bound hCE hk ht hcycle hclique hbound hf hfX hX hM + hexpand I hc.1 hc.2.1 + exact Nat.not_lt_of_ge hb hc.2.2 + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PackingOptions.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PackingOptions.lean new file mode 100644 index 0000000000000000000000000000000000000000..10ef50a074439d2015777537116c667051ae3c12 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PackingOptions.lean @@ -0,0 +1,139 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OutsidePathRules +import OAI.Combinatorics.Ramsey.CycleClique.Construction.BallGrowth +import OAI.Combinatorics.Ramsey.CycleClique.Construction.IndependentPacking + +namespace OAI + +/-! Soundness of the manuscript's weighted packing test. Radius index zero +denotes a singleton; index `r+1` denotes its exterior radius-`r` ball. -/ + +namespace CycleClique.Construction +variable {V : Type*} [Fintype V] + +noncomputable def packingRegion (G : SimpleGraph V) (X : Finset V) + (x : V) : ℕ → Finset V + | 0 => {x} + | r + 1 => outsideBallFinset G X x r + +def PackingCompatible (G : SimpleGraph V) (X : Set V) (x : V) (r : ℕ) (y : V) (s : ℕ) : Prop := + if r = 0 ∧ s = 0 then ¬ OutsidePath G X x y 0 + else ∀ d, 1 ≤ d → d ≤ r + s → ¬ OutsidePath G X x y d + +omit [Fintype V] in +theorem PackingCompatible.symm {G : SimpleGraph V} {X : Set V} {x y : V} {r s : ℕ} + (h : PackingCompatible G X x r y s) : PackingCompatible G X y s x r := by + unfold PackingCompatible at * + by_cases hzero : r = 0 ∧ s = 0 + · have hzero' : s = 0 ∧ r = 0 := hzero.symm + simp only [hzero] at h + simp only [hzero'] + exact fun hp => h hp.reverse + · have hzero' : ¬ (s = 0 ∧ r = 0) := fun hs => hzero hs.symm + simp only [hzero, ↓reduceIte] at h + simp only [hzero', ↓reduceIte] + intro d hd hbound hp + exact h d hd (by omega) hp.reverse + +/-- Compatibility gives both vertex disjointness and anticompleteness, +with the singleton case handled separately from positive intervals. -/ +theorem packingRegions_separated {G : SimpleGraph V} {X : Finset V} {x y : V} {r s : ℕ} + (hx : x ∈ X) (hy : y ∈ X) (hxy : x ≠ y) + (hcompat : PackingCompatible G (X : Set V) x r y s) : + Disjoint (packingRegion G X x r) (packingRegion G X y s) ∧ + ∀ u ∈ packingRegion G X x r, ∀ v ∈ packingRegion G X y s, ¬ G.Adj u v := by + classical + cases r with + | zero => + cases s with + | zero => + have hnon : ¬ G.Adj x y := by + have h := hcompat + simp only [PackingCompatible, and_self, ↓reduceIte] at h + exact fun hadj => h (outsidePath_zero.mpr hadj) + constructor + · simpa [packingRegion] using hxy + · simpa [packingRegion] using hnon + | succ s => + have hf : ∀ d, 1 ≤ d → d ≤ s + 1 → + ¬ PositiveOutsidePath G (X : Set V) y x d := by + intro d hd hds hp + have hc := hcompat.symm + simp only [PackingCompatible, Nat.add_one_ne_zero, false_and, ↓reduceIte, + Nat.add_zero] at hc + exact hc d hd hds hp.toOutside + constructor + · apply Finset.disjoint_left.mpr + intro v hv hball + have he : v = x := by simpa [packingRegion] using hv + subst v + exact (mem_outsideBallFinset.mp hball).1 hx + · intro u hu v hv hadj + have he : u = x := by simpa [packingRegion] using hu + subst u + exact singleton_outside_ball_separated hy hx hxy.symm hf v + (mem_outsideBallFinset.mp hv) hadj.symm + | succ r => + cases s with + | zero => + have hf : ∀ d, 1 ≤ d → d ≤ r + 1 → + ¬ PositiveOutsidePath G (X : Set V) x y d := by + intro d hd hds hp + have hc := hcompat + simp only [PackingCompatible, Nat.add_one_ne_zero, false_and, ↓reduceIte, + Nat.add_zero] at hc + exact hc d hd hds hp.toOutside + constructor + · apply Finset.disjoint_left.mpr + intro v hball hv + have he : v = y := by simpa [packingRegion] using hv + subst v + exact (mem_outsideBallFinset.mp hball).1 hy + · intro u hu v hv hadj + have he : v = y := by simpa [packingRegion] using hv + subst v + exact singleton_outside_ball_separated hx hy hxy hf u + (mem_outsideBallFinset.mp hu) hadj + | succ s => + have hf : ∀ d, 1 ≤ d → d ≤ r + s + 2 → + ¬ PositiveOutsidePath G (X : Set V) x y d := by + intro d hd hds hp + have hc := hcompat + simp only [PackingCompatible, Nat.add_one_ne_zero, false_and, ↓reduceIte] at hc + exact hc d hd (by omega) hp.toOutside + obtain ⟨hdis, hanti⟩ := outside_balls_separated hx hy hxy hf + constructor + · apply Finset.disjoint_left.mpr + intro v hv hw + exact Set.disjoint_left.mp hdis (mem_outsideBallFinset.mp hv) + (mem_outsideBallFinset.mp hw) + · intro u hu v hv + exact hanti u (mem_outsideBallFinset.mp hu) v (mem_outsideBallFinset.mp hv) + +/-- The weights of every compatible family with distinct bases sum to +at most the ambient independence bound. -/ +theorem packing_test {ι : Type*} [Fintype ι] {G : SimpleGraph V} {k : ℕ} + (hbound : IndependenceBound G k) (X : Finset V) + (base : ι → V) (radius weight : ι → ℕ) + (hbase : Function.Injective base) (hX : ∀ i, base i ∈ X) + (hweight : ∀ i, HasIndependent (G.induce (packingRegion G X (base i) (radius i) : Set V)) + (weight i)) + (hcompat : ∀ i j, i ≠ j → + PackingCompatible G (X : Set V) (base i) (radius i) (base j) (radius j)) : + ∑ i, weight i ≤ k := by + classical + choose I hIsub hIind hIcard using fun i => exists_independent_subset (hweight i) + have hsep := fun i j hij => packingRegions_separated (hX i) (hX j) + (fun h => hij (hbase h)) (hcompat i j hij) + have hdis : (↑(Finset.univ : Finset ι) : Set ι).PairwiseDisjoint I := by + intro i _ j _ hij + exact (hsep i j hij).1.mono (hIsub i) (hIsub j) + have hanti : ∀ i ∈ (Finset.univ : Finset ι), ∀ j ∈ (Finset.univ : Finset ι), i ≠ j → + ∀ u ∈ I i, ∀ v ∈ I j, ¬ G.Adj u v := by + intro i _ j _ hij u hu v hv + exact (hsep i j hij).2 u (hIsub i hu) v (hIsub j hv) + have h := independent_packing hbound Finset.univ I (fun i _ => hIind i) hdis hanti + simpa only [hIcard] using h + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathDetour.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathDetour.lean new file mode 100644 index 0000000000000000000000000000000000000000..66577badd04c344ea0810918c6dc22539a3af0ec --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathDetour.lean @@ -0,0 +1,174 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ListSurgery +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OptimalPathSystem +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OutsidePathRules + +namespace OAI + +/-! Insert an outside detour into any step of an expanded chain. +All old vertices and assigned-path endpoints are retained. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +theorem exists_edge_detour (S : ExpandedPathSystem G Q) + {P R : List (List V)} {A B J : List V} {x y : V} + (hsys : S.chains = P ++ (A ++ x :: y :: B) :: R) + (hJQ : ∀ z ∈ J, z ∉ Q) + (hJ : J.Nodup) (hdis : J.Disjoint S.chains.flatten) + (hpath : (x :: (J ++ [y])).IsChain G.Adj) : + ∃ T : ExpandedPathSystem G Q, + T.amount = S.amount + J.length ∧ T.incident = S.incident ∧ + T.assignedCount = S.assignedCount := by + classical + let old := A ++ x :: y :: B + let new := A ++ x :: (J ++ y :: B) + let C := P ++ new :: R + have holdmem : old ∈ S.chains := by simp [hsys, old] + have hflatold : S.chains.flatten = + (P.flatten ++ A ++ [x]) ++ ((y :: B) ++ R.flatten) := by + simp [hsys, List.append_assoc] + have hflatnew : C.flatten = + (P.flatten ++ A ++ [x]) ++ J ++ ((y :: B) ++ R.flatten) := by + simp [C, new, List.append_assoc] + have hflat : C.flatten.Nodup := by + rw [hflatnew] + apply nodup_insert_list + · rw [← hflatold] + exact S.flatten_nodup + · exact hJ + · rwa [← hflatold] + have hnewpath : new.IsChain G.Adj := chain_insert_between + (S.paths old holdmem).2 hpath + have hxy : ¬ (x ∈ Q ∧ y ∈ Q) := by + have h := List.isChain_append_cons_cons.mp (S.no_clique_steps old holdmem) + exact h.2.1 + have hmid := chain_outside_interior hxy hJQ + have hnewnoclique : new.IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q)) := + chain_insert_between (S.no_clique_steps old holdmem) hmid + have hmemOld : ∀ l, l ∈ P ∨ l ∈ R → l ∈ S.chains := by + intro l hl + simp only [hsys, List.mem_append, List.mem_cons] + tauto + let T : ExpandedPathSystem G Q := { + chains := C + nontrivial := by + intro l hl + rcases List.mem_append.mp hl with hl | hl + · exact S.nontrivial l (hmemOld l (Or.inl hl)) + · rcases List.mem_cons.mp hl with rfl | hl + · have hlen := S.nontrivial old holdmem + simp only [old, List.length_append, List.length_cons] at hlen + simp only [new, List.length_append, List.length_cons] + omega + · exact S.nontrivial l (hmemOld l (Or.inr hl)) + paths := by + intro l hl + refine ⟨(List.nodup_flatten.mp hflat).1 l hl, ?_⟩ + rcases List.mem_append.mp hl with hl | hl + · exact (S.paths l (hmemOld l (Or.inl hl))).2 + · rcases List.mem_cons.mp hl with rfl | hl + · exact hnewpath + · exact (S.paths l (hmemOld l (Or.inr hl))).2 + disjoint := (List.nodup_flatten.mp hflat).2 + endpoints := by + intro l hl + rcases List.mem_append.mp hl with hl | hl + · exact S.endpoints l (hmemOld l (Or.inl hl)) + · rcases List.mem_cons.mp hl with rfl | hl + · have hh : new.head? = old.head? := head_insert_between A B J x y + have ht : new.getLast? = old.getLast? := last_insert_between A B J x y + rw [hh, ht] + exact S.endpoints old holdmem + · exact S.endpoints l (hmemOld l (Or.inr hl)) + no_clique_steps := by + intro l hl + rcases List.mem_append.mp hl with hl | hl + · exact S.no_clique_steps l (hmemOld l (Or.inl hl)) + · rcases List.mem_cons.mp hl with rfl | hl + · exact hnewnoclique + · exact S.no_clique_steps l (hmemOld l (Or.inr hl)) } + have hverts : T.vertices = S.vertices ∪ J.toFinset := by + ext v + simp only [vertices, T, List.mem_toFinset, Finset.mem_union, hflatold, hflatnew, + List.mem_append, List.mem_cons] + tauto + have hJdiff : J.toFinset \ Q = J.toFinset := by + apply Finset.sdiff_eq_self_iff_disjoint.mpr + apply Finset.disjoint_left.mpr + intro v hv hvQ + exact hJQ v (List.mem_toFinset.mp hv) hvQ + have hJinter : J.toFinset ∩ Q = ∅ := by + apply Finset.disjoint_iff_inter_eq_empty.mp + exact Finset.sdiff_eq_self_iff_disjoint.mp hJdiff + have hdisfin : Disjoint (S.vertices \ Q) J.toFinset := by + apply Finset.disjoint_left.mpr + intro v hv hvJ + exact List.disjoint_left.mp hdis (List.mem_toFinset.mp hvJ) + (List.mem_toFinset.mp (Finset.mem_sdiff.mp hv).1) + have hamount : T.amount = S.amount + J.length := by + change (T.vertices \ Q).card = (S.vertices \ Q).card + J.length + rw [hverts, Finset.union_sdiff_distrib, hJdiff, + Finset.card_union_of_disjoint hdisfin, List.toFinset_card_of_nodup hJ] + have hincident : T.incident = S.incident := by + simp only [incident, hverts, Finset.union_inter_distrib_right, hJinter, Finset.union_empty] + have hcount : T.chains.length = S.chains.length := by + simp [T, C, hsys] + refine ⟨T, hamount, hincident, ?_⟩ + simp only [assignedCount, hincident, hcount] + +/-- An outside detour that stays in the exact closing interval is +excluded by the established optimality criterion. -/ +theorem IsOptimal.no_edge_detour {S : ExpandedPathSystem G Q} {k : ℕ} + (hopt : S.IsOptimal k) (hk : 3 ≤ k) (hQk : Q.card ≤ k) + (hQ : G.IsClique (Q : Set V)) (hcycle : ¬ HasCycle G (k + 1)) + {P R : List (List V)} {A B J : List V} {x y : V} + (hsys : S.chains = P ++ (A ++ x :: y :: B) :: R) + (hJQ : ∀ z ∈ J, z ∉ Q) + (hJ : J.Nodup) (hdis : J.Disjoint S.chains.flatten) + (hpath : (x :: (J ++ [y])).IsChain G.Adj) (hpos : J ≠ []) + (hupper : S.amount + J.length + S.incident ≤ k + 1) : False := by + obtain ⟨T, hamount, hincident, hcount⟩ := + S.exists_edge_detour hsys hJQ hJ hdis hpath + apply hopt.criterion hk hQk hQ hcycle T + · simp only [hcount, le_refl, ↓reduceIte, hamount] + have : 0 < J.length := List.length_pos_iff.mpr hpos + omega + · simpa only [hamount, hincident] using hupper + +theorem IsOptimal.forbidden_edge_detour {S : ExpandedPathSystem G Q} {k d : ℕ} + (hopt : S.IsOptimal k) (hk : 3 ≤ k) (hQk : Q.card ≤ k) + (hQ : G.IsClique (Q : Set V)) (hcycle : ¬ HasCycle G (k + 1)) + {P R : List (List V)} {A B : List V} {x y : V} + (hsys : S.chains = P ++ (A ++ x :: y :: B) :: R) + (hd : 1 ≤ d) + (hupper : S.amount + d + S.incident ≤ k + 1) : + ¬ OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) x y d := by + classical + intro h + obtain ⟨J, hJ, hJlen, hJout, hpath⟩ := h.interior + have hJQ : ∀ z ∈ J, z ∉ Q := fun z hz hzQ => hJout z hz (Or.inl hzQ) + have hdis : J.Disjoint S.chains.flatten := by + apply List.disjoint_left.mpr + intro z hz hzold + exact hJout z hz (Or.inr (List.mem_toFinset.mpr hzold)) + apply hopt.no_edge_detour hk hQk hQ hcycle hsys hJQ hJ hdis hpath + · intro he + simp only [he, List.length_nil] at hJlen + omega + · simpa only [hJlen] using hupper + +theorem IsOptimal.forbidden_one_vertex_edge_detour {S : ExpandedPathSystem G Q} {k : ℕ} + (hopt : S.IsOptimal k) (hk : 3 ≤ k) (hQk : Q.card ≤ k) + (hQ : G.IsClique (Q : Set V)) (hcycle : ¬ HasCycle G (k + 1)) + {P R : List (List V)} {A B : List V} {x y : V} + (hsys : S.chains = P ++ (A ++ x :: y :: B) :: R) : + ¬ OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) x y 1 := by + apply hopt.forbidden_edge_detour hk hQk hQ hcycle hsys (by omega) + have hb := hopt.budget + have hi := S.incident_le + omega + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathEndpoints.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathEndpoints.lean new file mode 100644 index 0000000000000000000000000000000000000000..b62f9635c89348c3571097437a7b5803a0da817d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathEndpoints.lean @@ -0,0 +1,148 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PathRotation +import OAI.Combinatorics.Ramsey.CycleClique.Construction.DenseSubgraph + +namespace OAI + +/-! +# Possible endpoints on a fixed path vertex set + +These are the endpoint-clique and rotation consequences in manuscript +Lemma `clq:coloured-path`. +-/ + +namespace CycleClique.Construction +def IsSpanningPath {V : Type*} (G : SimpleGraph V) (x : V) (W : Finset V) + {r : ℕ} (f : Fin (r + 1) → V) : Prop := + Function.Injective f ∧ + (∀ i : Fin r, G.Adj (f i.castSucc) (f i.succ)) ∧ + f 0 = x ∧ Set.range f = (W : Set V) + +noncomputable def pathEnds {V : Type*} [Fintype V] + (G : SimpleGraph V) (x : V) (W : Finset V) (r : ℕ) : Finset V := by + classical + exact Finset.univ.filter fun e => ∃ f : Fin (r + 1) → V, + IsSpanningPath G x W f ∧ f (Fin.last r) = e + +@[simp] theorem mem_pathEnds {V : Type*} [Fintype V] + {G : SimpleGraph V} {x e : V} {W : Finset V} {r : ℕ} : + e ∈ pathEnds G x W r ↔ ∃ f : Fin (r + 1) → V, + IsSpanningPath G x W f ∧ f (Fin.last r) = e := by + classical + simp [pathEnds] + +theorem pathEnds_subset {V : Type*} [Fintype V] + (G : SimpleGraph V) (x : V) (W : Finset V) (r : ℕ) : pathEnds G x W r ⊆ W := by + intro e he + obtain ⟨f, hf, rfl⟩ := mem_pathEnds.mp he + change f (Fin.last r) ∈ (W : Set V) + rw [← hf.2.2.2] + exact ⟨Fin.last r, rfl⟩ + +theorem start_not_pathEnds {V : Type*} [Fintype V] + {G : SimpleGraph V} {x : V} {W : Finset V} {r : ℕ} (hr : 1 ≤ r) : + x ∉ pathEnds G x W r := by + intro hx + obtain ⟨f, hf, heq⟩ := mem_pathEnds.mp hx + have hi := congrArg Fin.val (hf.1 (hf.2.2.1.trans heq.symm)) + simp only [Fin.val_zero, Fin.val_last] at hi + omega + +/-- The successor of any neighbour of the last vertex becomes an +endpoint by the explicit fixed-end rotation. -/ +theorem successor_mem_pathEnds {V : Type*} [Fintype V] + {G : SimpleGraph V} {x : V} {W : Finset V} {r : ℕ} + {f : Fin (r + 1) → V} (hf : IsSpanningPath G x W f) + (i : Fin r) (hi : G.Adj (f (Fin.last r)) (f i.castSucc)) : + f i.succ ∈ pathEnds G x W r := by + have hrot := rotate_path f hf.1 hf.2.1 i hi + exact mem_pathEnds.mpr ⟨f ∘ rotationIndex i, + ⟨hrot.1, hrot.2.1, hrot.2.2.1.trans hf.2.2.1, + hrot.2.2.2.2.trans hf.2.2.2⟩, hrot.2.2.2.1⟩ + +/-- Independent-pair expansion makes a set of possible endpoints a +clique when their neighbourhoods fit inside too few vertices. -/ +theorem clique_of_endpoint_neighbor_cover {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {E W Z : Finset V} {s : ℕ} + (hEW : E ⊆ W) + (hcover : ∀ e ∈ E, ∀ v, G.Adj e v → v ∈ W ∪ Z) + (hsize : W.card + Z.card < 2 * s) + (hexpand : ∀ a b, a ≠ b → ¬ G.Adj a b → + 2 * s ≤ (closedNeighborhood G {a, b}).card) : G.IsClique (E : Set V) := by + classical + intro a ha b hb hab + by_contra hn + have hsub : closedNeighborhood G {a, b} ⊆ W ∪ Z := by + intro v hv + rcases mem_closedNeighborhood.mp hv with hv | ⟨e, he, hev⟩ + · simp only [Finset.mem_insert, Finset.mem_singleton] at hv + rcases hv with rfl | rfl + · exact Finset.mem_union_left _ (hEW ha) + · exact Finset.mem_union_left _ (hEW hb) + · simp only [Finset.mem_insert, Finset.mem_singleton] at he + rcases he with rfl | rfl + · exact hcover _ ha v hev + · exact hcover _ hb v hev + have hcard := (Finset.card_le_card hsub).trans (Finset.card_union_le W Z) + have hlow := hexpand a b hab hn + omega + +/-- Each neighbour of an endpoint has a different successor endpoint, +so its degree is at most the number of possible endpoints. -/ +theorem endpoint_degree_le {V : Type*} [Fintype V] + {G : SimpleGraph V} {x e : V} {W : Finset V} {r : ℕ} + (he : e ∈ pathEnds G x W r) + (hneighbors : ∀ v, G.Adj e v → v ∈ W) : + (G.neighborSet e).ncard ≤ (pathEnds G x W r).card := by + classical + obtain ⟨f, hf, hlast⟩ := mem_pathEnds.mp he + have hex : ∀ v : G.neighborFinset e, ∃ i : Fin r, f i.castSucc = v.val := by + intro v + have hadj := (G.mem_neighborFinset e v.val).mp v.property + have hv : v.val ∈ Set.range f := by + rw [hf.2.2.2] + exact hneighbors v.val hadj + obtain ⟨j, hj⟩ := hv + have hjlt : j.val < r := by + have hneq : j ≠ Fin.last r := by + intro heq + subst j + have heq' : e = v.val := hlast.symm.trans hj + exact hadj.ne heq' + have hval : j.val ≠ r := fun h => hneq (Fin.ext h) + omega + exact ⟨⟨j.val, hjlt⟩, by simpa using hj⟩ + let pivot : G.neighborFinset e → Fin r := fun v => Classical.choose (hex v) + have hpivot : ∀ v : G.neighborFinset e, f (pivot v).castSucc = v.val := + fun v => Classical.choose_spec (hex v) + let suc : G.neighborFinset e → pathEnds G x W r := fun v => + ⟨f (pivot v).succ, successor_mem_pathEnds hf (pivot v) (by + rw [hlast, hpivot] + exact (G.mem_neighborFinset e v.val).mp v.property)⟩ + have hinj : Function.Injective suc := by + intro a b hab + have hfin := hf.1 (congrArg Subtype.val hab) + have hp : pivot a = pivot b := Fin.succ_injective r hfin + apply Subtype.ext + rw [← hpivot a, ← hpivot b, hp] + have hcard := Fintype.card_le_of_injective suc hinj + simpa only [Fintype.card_coe, SimpleGraph.card_neighborFinset_eq_degree, + SimpleGraph.ncard_neighborSet] using hcard + +/-- On any spanning path the endpoint clique is a final segment. -/ +theorem pathEnds_successor_closed {V : Type*} [Fintype V] + {G : SimpleGraph V} {x : V} {W : Finset V} {r : ℕ} + {f : Fin (r + 1) → V} (hf : IsSpanningPath G x W f) + (hclique : G.IsClique (pathEnds G x W r : Set V)) + {i : Fin r} (hi : f i.castSucc ∈ pathEnds G x W r) : + f i.succ ∈ pathEnds G x W r := by + apply successor_mem_pathEnds hf + have he : f (Fin.last r) ∈ pathEnds G x W r := mem_pathEnds.mpr ⟨f, hf, rfl⟩ + apply hclique he hi + intro heq + have := congrArg Fin.val (hf.1 heq) + simp only [Fin.val_last, Fin.val_castSucc] at this + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathJoining.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathJoining.lean new file mode 100644 index 0000000000000000000000000000000000000000..e2aadb5895629f9b1ef4c78916df4b39e61319cc --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathJoining.lean @@ -0,0 +1,75 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.WalkCycle +import Mathlib.Data.List.Chain +import Mathlib.Data.List.Flatten +import Mathlib.Data.List.Nodup + +namespace OAI + +/-! +# Joining disjoint paths through a clique + +The expansions of the chains of a path system are disjoint simple paths +with endpoints in the clique. Joining these paths, including any selected +singleton clique vertices, gives the exact cycle used in `path:interval`. +-/ + +namespace CycleClique.Construction +private theorem chain_of_pairwise {α : Type*} {R : α → α → Prop} {L : List α} + (h : L.Pairwise R) : L.IsChain R := by + induction h with + | nil => exact .nil + | @cons a l hrel _ ih => + exact ih.cons (fun b hb => hrel b (List.mem_of_mem_head? hb)) + +/-- Disjoint simple paths whose endpoints lie in a common clique can be +closed into a cycle through exactly all their vertices. -/ +theorem hasCycle_of_disjoint_clique_paths {V : Type*} {G : SimpleGraph V} + {Q : Set V} (hQ : G.IsClique Q) (L : List (List V)) + (hnonempty : ∀ l ∈ L, l ≠ []) + (hpaths : ∀ l ∈ L, l.Nodup ∧ l.IsChain G.Adj) + (hdisjoint : L.Pairwise List.Disjoint) + (hendpoints : ∀ l ∈ L, + (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q)) + (hlen : 3 ≤ L.flatten.length) : HasCycle G L.flatten.length := by + have hflatne : L.flatten ≠ [] := by intro h; simp [h] at hlen + have hLne : L ≠ [] := by intro h; simp [h] at hlen + have hnodup : L.flatten.Nodup := List.nodup_flatten.mpr + ⟨fun l hl => (hpaths l hl).1, hdisjoint⟩ + have hconnections : L.IsChain + (fun l₁ l₂ => ∀ x ∈ l₁.getLast?, ∀ y ∈ l₂.head?, G.Adj x y) := by + apply chain_of_pairwise + apply hdisjoint.imp_of_mem + intro l₁ l₂ hl₁ hl₂ hd x hx y hy + apply hQ ((hendpoints l₁ hl₁).2 x hx) ((hendpoints l₂ hl₂).1 y hy) + intro heq + subst y + exact List.disjoint_left.mp hd (List.mem_of_mem_getLast? hx) (List.mem_of_mem_head? hy) + have hchain : L.flatten.IsChain G.Adj := + (List.isChain_flatten (fun hempty => hnonempty [] hempty rfl)).mpr + ⟨fun l hl => (hpaths l hl).2, hconnections⟩ + have hhead : L.flatten.head hflatne ∈ Q := by + rw [List.head_flatten_eq_head_head hflatne (hnonempty _ (List.head_mem hLne))] + apply (hendpoints _ (List.head_mem hLne)).1 + exact List.head?_eq_some_head (hnonempty _ (List.head_mem hLne)) + have hlast : L.flatten.getLast hflatne ∈ Q := by + rw [List.getLast_flatten_eq_getLast_getLast hflatne + (hnonempty _ (List.getLast_mem hLne))] + apply (hendpoints _ (List.getLast_mem hLne)).2 + exact List.getLast?_eq_some_getLast (hnonempty _ (List.getLast_mem hLne)) + have hne : L.flatten.getLast hflatne ≠ L.flatten.head hflatne := by + intro heq + obtain ⟨v, hv⟩ := (hnodup.head_eq_getLast_iff hflatne).mp heq.symm + simp [hv] at hlen + let p := SimpleGraph.Walk.ofSupport L.flatten hflatne hchain + have hp : p.IsPath := by + apply SimpleGraph.Walk.IsPath.mk' + simpa [p, SimpleGraph.Walk.support_ofSupport] using hnodup + have hplength : p.length = L.flatten.length - 1 := + SimpleGraph.Walk.length_ofSupport hflatne hchain + have hc := hasCycle_of_path_close hp (by omega) (hQ hlast hhead hne) + have heq : p.length + 1 = L.flatten.length := by omega + simpa [heq] using hc + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathProfiles.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..25b4c6624323e2251cdf5b51063cfb39e5688953 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathProfiles.lean @@ -0,0 +1,113 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.AssignedAmounts +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Patterns + +namespace OAI + +/-! Amount profiles of actual path systems, including singleton components +for unused clique vertices. No canonical ordering is assumed here. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type*} {Q : Finset V} + +theorem exists_chain_profiles (C : List (List V)) + (hends : ∀ l ∈ C, (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q)) + (hsteps : ∀ l ∈ C, l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q))) : + ∃ P, List.Forall₂ (AssignedAmounts Q) C P := by + induction C with + | nil => exact ⟨[], .nil⟩ + | cons l C ih => + obtain ⟨w, hw⟩ := exists_assignedAmounts (hends l (by simp)) (hsteps l (by simp)) + obtain ⟨P, hP⟩ := ih (fun l hl => hends l (by simp [hl])) + (fun l hl => hsteps l (by simp [hl])) + exact ⟨w :: P, .cons hw hP⟩ + +namespace ChainProfiles + +theorem amount {C : List (List V)} {P : List (List ℕ)} + (hp : List.Forall₂ (AssignedAmounts Q) C P) : + patternAmount P = chainOutsideCount Q C.flatten := by + induction hp with + | nil => rfl + | @cons l w C P h hw ih => + have hs := h.sum_eq + simp only [patternAmount, List.map_cons, List.sum_cons, List.flatten_cons, + chainOutsideCount, List.filter_append, List.length_append] at hs ih ⊢ + omega + +theorem assignedCount {C : List (List V)} {P : List (List ℕ)} + (hp : List.Forall₂ (AssignedAmounts Q) C P) : + (P.map List.length).sum = rawAssignedCount Q C := by + induction hp with + | nil => rfl + | @cons l w C P h hw ih => + simp only [List.map_cons, List.sum_cons, rawAssignedCount] at ih ⊢ + rw [h.length_eq, ih] + +theorem vertices {C : List (List V)} {P : List (List ℕ)} + (hp : List.Forall₂ (AssignedAmounts Q) C P) + (hne : ∀ l ∈ C, l ≠ []) + (hhead : ∀ l ∈ C, ∀ v ∈ l.head?, v ∈ Q) : + patternVertices P = chainCliqueCount Q C.flatten := by + induction hp with + | nil => rfl + | @cons l w C P h hw ih => + have hl := h.length_eq + have hpos := chainCliqueCount_pos (hne l (by simp)) (hhead l (by simp)) + have ht := ih (fun l hl => hne l (by simp [hl])) + (fun l hl => hhead l (by simp [hl])) + simp only [patternVertices, List.map_cons, List.sum_cons, List.flatten_cons, + chainCliqueCount_append] at ht ⊢ + omega + +theorem positive {C : List (List V)} {P : List (List ℕ)} + (hp : List.Forall₂ (AssignedAmounts Q) C P) : + ∀ w ∈ P, ∀ a ∈ w, 0 < a := by + induction hp with + | nil => simp + | @cons l w C P h hw ih => + intro u hu + rcases List.mem_cons.mp hu with rfl | hu + · exact h.positive + · exact ih u hu + +end ChainProfiles + +namespace ExpandedPathSystem + +variable {G : SimpleGraph V} + +theorem exists_complete_profile (S : ExpandedPathSystem G Q) : + ∃ P : List (List ℕ), + List.Forall₂ (AssignedAmounts Q) S.toRaw.completeClique.chains P ∧ + patternVertices P = Q.card ∧ patternAmount P = S.amount ∧ + (P.map List.length).sum = S.assignedCount ∧ + ∀ w ∈ P, ∀ a ∈ w, 0 < a := by + obtain ⟨P, hp⟩ := exists_chain_profiles S.toRaw.completeClique.chains + S.toRaw.completeClique.endpoints S.toRaw.completeClique.no_clique_steps + have hnonempty : ∀ l ∈ S.toRaw.completeClique.chains, l ≠ [] := by + intro l hl + change l ∈ S.chains ++ (Q \ S.toRaw.vertices).toList.map (fun v => [v]) at hl + rcases List.mem_append.mp hl with hl | hl + · have ht := S.nontrivial l hl + intro he + simp only [he, List.length_nil] at ht + omega + · obtain ⟨v, _, rfl⟩ := List.mem_map.mp hl + simp + refine ⟨P, hp, ?_, ?_, ?_, ChainProfiles.positive hp⟩ + · rw [ChainProfiles.vertices hp hnonempty + (fun l hl => (S.toRaw.completeClique.endpoints l hl).1), + ← S.toRaw.completeClique.representatives_length, + S.toRaw.completeClique_representatives_length] + · rw [ChainProfiles.amount hp, ← S.toRaw.completeClique.amount_eq_outside_count, + RawPathSystem.completeClique_amount, toRaw_amount] + · rw [ChainProfiles.assignedCount hp, ← RawPathSystem.assignedCount, + RawPathSystem.completeClique_assignedCount, toRaw_assignedCount] + +end ExpandedPathSystem + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathRotation.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathRotation.lean new file mode 100644 index 0000000000000000000000000000000000000000..b216a7f450b5d2bcd59a3a7815ef3adca7b5c173 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathRotation.lean @@ -0,0 +1,100 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Definitions + +namespace OAI + +/-! +# Fixed-end path rotation + +The explicit tail reversal used in manuscript Lemma `clq:coloured-path` +is proved here. The pivot may be the first vertex, and the last vertex +becomes the successor of the pivot. No path-rotation theorem is assumed. +-/ + +namespace CycleClique.Construction +/-- Reverse precisely the indices strictly after the pivot. -/ +def rotationIndex {r : ℕ} (p : Fin r) (i : Fin (r + 1)) : Fin (r + 1) := + ⟨if i.val ≤ p.val then i.val else r + p.val + 1 - i.val, + by split_ifs <;> omega⟩ + +theorem rotationIndex_involutive {r : ℕ} (p : Fin r) : + Function.Involutive (rotationIndex p) := by + intro i + apply Fin.ext + dsimp [rotationIndex] + split_ifs <;> omega + +theorem rotationIndex_injective {r : ℕ} (p : Fin r) : + Function.Injective (rotationIndex p) := (rotationIndex_involutive p).injective + +@[simp] theorem rotationIndex_zero {r : ℕ} (p : Fin r) : rotationIndex p 0 = 0 := by + apply Fin.ext + simp [rotationIndex] + +@[simp] theorem rotationIndex_last {r : ℕ} (p : Fin r) : + rotationIndex p (Fin.last r) = p.succ := by + apply Fin.ext + dsimp [rotationIndex] + split_ifs <;> omega + +theorem rotationIndex_range {V : Type*} {r : ℕ} (f : Fin (r + 1) → V) (p : Fin r) : + Set.range (f ∘ rotationIndex p) = Set.range f := by + ext v + constructor + · rintro ⟨i, rfl⟩ + exact ⟨rotationIndex p i, rfl⟩ + · rintro ⟨i, rfl⟩ + exact ⟨rotationIndex p i, congrArg f (rotationIndex_involutive p i)⟩ + +/-- Rotating a simple path around a neighbour of its last vertex +preserves every vertex and the first endpoint, and makes the pivot's +successor the new last endpoint. -/ +theorem rotate_path {V : Type*} {G : SimpleGraph V} {r : ℕ} + (f : Fin (r + 1) → V) (hf : Function.Injective f) + (hchain : ∀ i : Fin r, G.Adj (f i.castSucc) (f i.succ)) + (p : Fin r) (hp : G.Adj (f (Fin.last r)) (f p.castSucc)) : + Function.Injective (f ∘ rotationIndex p) ∧ + (∀ i : Fin r, G.Adj ((f ∘ rotationIndex p) i.castSucc) + ((f ∘ rotationIndex p) i.succ)) ∧ + (f ∘ rotationIndex p) 0 = f 0 ∧ + (f ∘ rotationIndex p) (Fin.last r) = f p.succ ∧ + Set.range (f ∘ rotationIndex p) = Set.range f := by + refine ⟨hf.comp (rotationIndex_injective p), ?_, by simp, by simp, rotationIndex_range f p⟩ + intro i + change G.Adj (f (rotationIndex p i.castSucc)) (f (rotationIndex p i.succ)) + by_cases hlt : i.val < p.val + · have hleft : rotationIndex p i.castSucc = i.castSucc := by + apply Fin.ext + simp only [rotationIndex, Fin.val_castSucc] + split_ifs <;> omega + have hright : rotationIndex p i.succ = i.succ := by + apply Fin.ext + simp only [rotationIndex, Fin.val_succ] + split_ifs <;> omega + simpa [hleft, hright] using hchain i + · by_cases heq : i = p + · subst i + have hleft : rotationIndex p p.castSucc = p.castSucc := by + apply Fin.ext + simp [rotationIndex] + have hright : rotationIndex p p.succ = Fin.last r := by + apply Fin.ext + simp only [rotationIndex, Fin.val_succ, Fin.val_last] + split_ifs <;> omega + simpa [hleft, hright] using hp.symm + · have hgt : p.val < i.val := by + have hneq : i.val ≠ p.val := fun h => heq (Fin.ext h) + omega + let j : Fin r := ⟨r + p.val - i.val, by omega⟩ + have hleft : rotationIndex p i.castSucc = j.succ := by + apply Fin.ext + simp only [rotationIndex, Fin.val_castSucc, Fin.val_succ, j] + split_ifs <;> omega + have hright : rotationIndex p i.succ = j.castSucc := by + apply Fin.ext + simp only [rotationIndex, Fin.val_castSucc, Fin.val_succ, j] + split_ifs <;> omega + simpa [hleft, hright] using (hchain j).symm + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathSystem.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathSystem.lean new file mode 100644 index 0000000000000000000000000000000000000000..7f6261dcdb08af25e8ee0bf2442020a02be176e6 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathSystem.lean @@ -0,0 +1,156 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PathJoining + +namespace OAI + +/-! +# Expanded path systems on a clique + +Each nontrivial chain is stored as its actual simple vertex list. Distinct +chains are disjoint, both endpoints belong to the clique, and successive +clique vertices on a chain are separated by nonempty outside interiors. +Thus the assigned paths are recovered by splitting at clique vertices. +-/ + +namespace CycleClique.Construction +variable {V : Type*} + +/-- The nontrivial chains of a path system, after expanding assigned paths. -/ +structure ExpandedPathSystem (G : SimpleGraph V) (Q : Finset V) where + chains : List (List V) + nontrivial : ∀ l ∈ chains, 3 ≤ l.length + paths : ∀ l ∈ chains, l.Nodup ∧ l.IsChain G.Adj + disjoint : chains.Pairwise List.Disjoint + endpoints : ∀ l ∈ chains, + (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q) + no_clique_steps : ∀ l ∈ chains, + l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q)) + +namespace ExpandedPathSystem + +variable {G : SimpleGraph V} {Q : Finset V} + +def empty (G : SimpleGraph V) (Q : Finset V) : ExpandedPathSystem G Q where + chains := [] + nontrivial := by simp + paths := by simp + disjoint := .nil + endpoints := by simp + no_clique_steps := by simp + +noncomputable def vertices (S : ExpandedPathSystem G Q) : Finset V := by + classical + exact S.chains.flatten.toFinset + +/-- Total number of interior vertices outside the clique. -/ +noncomputable def amount (S : ExpandedPathSystem G Q) : ℕ := by + classical + exact (S.vertices \ Q).card + +/-- Clique vertices incident with at least one assigned path. -/ +noncomputable def incident (S : ExpandedPathSystem G Q) : ℕ := by + classical + exact (S.vertices ∩ Q).card + +/-- Each nontrivial chain with `c` clique vertices represents `c-1` paths. -/ +noncomputable def assignedCount (S : ExpandedPathSystem G Q) : ℕ := + S.incident - S.chains.length + +theorem flatten_nodup (S : ExpandedPathSystem G Q) : S.chains.flatten.Nodup := + List.nodup_flatten.mpr ⟨fun l hl => (S.paths l hl).1, S.disjoint⟩ + +theorem vertices_card (S : ExpandedPathSystem G Q) : + S.vertices.card = S.chains.flatten.length := by + classical + exact List.toFinset_card_of_nodup S.flatten_nodup + +theorem length_eq_amount_add_incident (S : ExpandedPathSystem G Q) : + S.chains.flatten.length = S.amount + S.incident := by + classical + rw [← S.vertices_card] + exact (Finset.card_sdiff_add_card_inter S.vertices Q).symm + +@[simp] theorem empty_amount (G : SimpleGraph V) (Q : Finset V) : + (empty G Q).amount = 0 := by + classical + simp [amount, vertices, empty] + +@[simp] theorem empty_assignedCount (G : SimpleGraph V) (Q : Finset V) : + (empty G Q).assignedCount = 0 := by + classical + simp [assignedCount, incident, vertices, empty] + +/-- Closing the system after adjoining exactly the necessary unused +clique vertices: manuscript Lemma `path:interval`. -/ +theorem forbidden_interval {k : ℕ} (hk : 3 ≤ k) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (S : ExpandedPathSystem G Q) + (hlow : k + 1 - Q.card ≤ S.amount) + (hhigh : S.amount + S.incident ≤ k + 1) : False := by + classical + let u := k + 1 - (S.amount + S.incident) + have hu : u ≤ (Q \ S.vertices).card := by + have hcard := Finset.card_sdiff_add_card_inter Q S.vertices + have hinter : (Q ∩ S.vertices).card = S.incident := by + simp [incident, Finset.inter_comm] + rw [hinter] at hcard + omega + obtain ⟨J, hJ, hJcard⟩ := Finset.exists_subset_card_eq hu + let L := S.chains ++ J.toList.map (fun v => [v]) + have hnonempty : ∀ l ∈ L, l ≠ [] := by + intro l hl + rcases List.mem_append.mp hl with hl | hl + · have := S.nontrivial l hl + intro heq + simp [heq] at this + · obtain ⟨v, _, rfl⟩ := List.mem_map.mp hl + simp + have hpaths : ∀ l ∈ L, l.Nodup ∧ l.IsChain G.Adj := by + intro l hl + rcases List.mem_append.mp hl with hl | hl + · exact S.paths l hl + · obtain ⟨v, _, rfl⟩ := List.mem_map.mp hl + exact ⟨by simp, .singleton v⟩ + have hdisjoint : L.Pairwise List.Disjoint := by + apply List.pairwise_append.mpr + refine ⟨S.disjoint, ?_, ?_⟩ + · apply List.pairwise_map.mpr + apply J.nodup_toList.imp + intro v w hvw + simpa using hvw.symm + · intro l hl m hm + obtain ⟨v, hv, rfl⟩ := List.mem_map.mp hm + apply List.disjoint_left.mpr + intro w hw hwv + have heq : w = v := by simpa using hwv + subst w + have hvJ : v ∈ J := by simpa using hv + have hvout := (Finset.mem_sdiff.mp (hJ hvJ)).2 + exact hvout (by + change v ∈ S.chains.flatten.toFinset + exact List.mem_toFinset.mpr (List.mem_flatten.mpr ⟨l, hl, hw⟩)) + have hends : ∀ l ∈ L, + (∀ v ∈ l.head?, v ∈ (Q : Set V)) ∧ (∀ v ∈ l.getLast?, v ∈ (Q : Set V)) := by + intro l hl + rcases List.mem_append.mp hl with hl | hl + · exact S.endpoints l hl + · obtain ⟨v, hv, rfl⟩ := List.mem_map.mp hl + have hvJ : v ∈ J := Finset.mem_toList.mp hv + have hvQ : v ∈ Q := (Finset.mem_sdiff.mp (hJ hvJ)).1 + simpa using And.intro hvQ hvQ + have hlen : L.flatten.length = k + 1 := by + have hsingle : ∀ l : List V, (l.map (fun v => [v])).flatten = l := by + intro l + induction l with + | nil => rfl + | cons v l ih => simpa using congrArg (List.cons v) ih + simp only [L, List.flatten_append, List.length_append, hsingle, Finset.length_toList] + rw [S.length_eq_amount_add_incident, hJcard] + omega + have hc := hasCycle_of_disjoint_clique_paths hQ L hnonempty hpaths hdisjoint hends + (by omega) + exact hcycle (by simpa [hlen] using hc) + +end ExpandedPathSystem + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathSystemCounts.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathSystemCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..86affad885c1b79cb38c1d0cd3dceea50c618393 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PathSystemCounts.lean @@ -0,0 +1,77 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ChainCounts + +namespace OAI + +/-! Elementary counting properties of nontrivial expanded chains. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +theorem chain_clique_count_two (S : ExpandedPathSystem G Q) {l : List V} + (hl : l ∈ S.chains) : 2 ≤ chainCliqueCount Q l := by + have hlen := S.nontrivial l hl + have hne : l ≠ [] := by intro he; simp [he] at hlen + let a := l.head hne + let b := l.getLast hne + have ha : a ∈ Q := (S.endpoints l hl).1 a (List.head?_eq_some_head hne) + have hb : b ∈ Q := (S.endpoints l hl).2 b (List.getLast?_eq_some_getLast hne) + have hab : a ≠ b := by + intro he + obtain ⟨v, hv⟩ := ((S.paths l hl).1.head_eq_getLast_iff hne).mp he + simp [hv] at hlen + let I := (l.filter (fun v => decide (v ∈ Q))).toFinset + have haI : a ∈ I := by simp only [I, List.mem_toFinset, List.mem_filter, decide_eq_true_eq]; exact ⟨List.head_mem hne, ha⟩ + have hbI : b ∈ I := by simp only [I, List.mem_toFinset, List.mem_filter, decide_eq_true_eq]; exact ⟨List.getLast_mem hne, hb⟩ + have hc : 2 ≤ I.card := Finset.one_lt_card.mpr ⟨a, haI, b, hbI, hab⟩ + simpa only [I, List.toFinset_card_of_nodup ((S.paths l hl).1.filter _), chainCliqueCount] + using hc + +theorem chains_length_le_assignedCount (S : ExpandedPathSystem G Q) : + S.chains.length ≤ S.assignedCount := by + rw [S.assignedCount_eq_raw] + have hpos : ∀ l ∈ S.chains, 1 ≤ chainCliqueCount Q l - 1 := by + intro l hl + have h := S.chain_clique_count_two hl + omega + generalize he : S.chains = C at hpos ⊢ + clear he + induction C with + | nil => simp [rawAssignedCount] + | cons l C ih => + have hl := hpos l (by simp) + have hi := ih (fun l hl => hpos l (by simp [hl])) + simp only [List.length_cons, rawAssignedCount, List.map_cons, List.sum_cons] at hi ⊢ + omega + +theorem amount_eq_zero_of_assignedCount_eq_zero (S : ExpandedPathSystem G Q) + (he : S.assignedCount = 0) : S.amount = 0 := by + have hl := S.chains_length_le_assignedCount + have hc : S.chains = [] := List.length_eq_zero_iff.mp (by omega) + simp [amount, vertices, hc] + +theorem assignedCount_pos_of_amount_pos (S : ExpandedPathSystem G Q) + (hL : 0 < S.amount) : 0 < S.assignedCount := by + by_contra hn + have he : S.assignedCount = 0 := by omega + have h := S.amount_eq_zero_of_assignedCount_eq_zero he + omega + +theorem incident_eq_two_of_assignedCount_one (S : ExpandedPathSystem G Q) + (he : S.assignedCount = 1) : S.incident = 2 := by + have hl := S.chains_length_le_assignedCount + have hl' : S.chains.length ≤ 1 := by omega + have hne : S.chains ≠ [] := by + intro hc + have hh := S.assignedCount_eq_raw + simp [hc, rawAssignedCount] at hh + omega + have hcpos : 1 ≤ S.chains.length := List.length_pos_iff.mpr hne + unfold assignedCount at he + omega + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PatternCounts.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PatternCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..d2aaa98ba7c362744e613b16936b170711900481 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PatternCounts.lean @@ -0,0 +1,220 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Patterns + +namespace OAI + +/-! Exact sizes of the canonical pattern domains in Table 1. -/ + +namespace CycleClique.Construction +theorem patternCount_5_3 : patternCount 5 3 = 4 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_5_4 : patternCount 5 4 = 2 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_5_5 : patternCount 5 5 = 1 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_6_3 : patternCount 6 3 = 6 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_6_4 : patternCount 6 4 = 5 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_6_5 : patternCount 6 5 = 2 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_6_6 : patternCount 6 6 = 1 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_7_3 : patternCount 7 3 = 9 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_7_4 : patternCount 7 4 = 9 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_7_5 : patternCount 7 5 = 5 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_7_6 : patternCount 7 6 = 2 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_7_7 : patternCount 7 7 = 1 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_8_4 : patternCount 8 4 = 16 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_8_5 : patternCount 8 5 = 10 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_8_6 : patternCount 8 6 = 5 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_8_7 : patternCount 8 7 = 2 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_8_8 : patternCount 8 8 = 1 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_9_4 : patternCount 9 4 = 25 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_9_5 : patternCount 9 5 = 20 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_9_6 : patternCount 9 6 = 11 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_9_7 : patternCount 9 7 = 5 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_9_8 : patternCount 9 8 = 2 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_10_5 : patternCount 10 5 = 35 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_10_6 : patternCount 10 6 = 24 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_10_7 : patternCount 10 7 = 11 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_10_8 : patternCount 10 8 = 5 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_11_5 : patternCount 11 5 = 60 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_11_6 : patternCount 11 6 = 46 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_11_7 : patternCount 11 7 = 25 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_11_8 : patternCount 11 8 = 11 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_12_6 : patternCount 12 6 = 87 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_12_7 : patternCount 12 7 = 51 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_12_8 : patternCount 12 8 = 26 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_13_6 : patternCount 13 6 = 152 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_13_7 : patternCount 13 7 = 104 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_13_8 : patternCount 13 8 = 55 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_14_7 : patternCount 14 7 = 197 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_14_8 : patternCount 14 8 = 118 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_15_7 : patternCount 15 7 = 364 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_15_8 : patternCount 15 8 = 237 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_16_8 : patternCount 16 8 = 468 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +theorem patternCount_17_8 : patternCount 17 8 = 879 := by + unfold patternCount + rw [pathPatterns_eq_fuel (Nat.le_refl _), pathPatternsFuel_length, patternNumberFuel_eq_shallow] + decide + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Patterns.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Patterns.lean new file mode 100644 index 0000000000000000000000000000000000000000..3968cd3c1401204eb12d1a41cda58993fff92cbe --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Patterns.lean @@ -0,0 +1,244 @@ +import Mathlib.Data.List.Lex +import Mathlib.Tactic + +namespace OAI + +/-! +# The finite path-pattern domain + +A component is the list of its positive assigned-path amounts. An empty +component is an unused clique vertex. Components are ordered and identified +with their reversals, as in manuscript Lemma `finite:coverage`. +-/ + +namespace CycleClique.Construction +/-- Positive amount sequences with at most the indicated number of edges +and total amount at most the budget. -/ +def amountSequences : ℕ → ℕ → List (List ℕ) + | 0, _ => [[]] + | e + 1, b => [] :: (List.range b).flatMap (fun q => + (amountSequences e (b - (q + 1))).map (fun p => (q + 1) :: p)) + +theorem mem_amountSequences {e b : ℕ} {p : List ℕ} : + p ∈ amountSequences e b ↔ p.length ≤ e ∧ p.sum ≤ b ∧ ∀ a ∈ p, 0 < a := by + induction e generalizing b p with + | zero => + simp only [amountSequences, List.mem_singleton, Nat.le_zero] + constructor + · rintro rfl + simp + · rintro ⟨hp, _⟩ + simpa using hp + | succ e ih => + cases p with + | nil => simp [amountSequences] + | cons a p => + constructor + · intro h + have hm : a :: p ∈ (List.range b).flatMap (fun q => + (amountSequences e (b - (q + 1))).map (fun p => (q + 1) :: p)) := by + simpa only [amountSequences, List.mem_cons, List.cons_ne_nil, false_or] using h + obtain ⟨q, hq, hm⟩ := List.mem_flatMap.mp hm + obtain ⟨p', hp', heq⟩ := List.mem_map.mp hm + rcases List.cons.inj heq with ⟨rfl, rfl⟩ + obtain ⟨hlen, hsum, hpos⟩ := ih.mp hp' + have hqb : q < b := List.mem_range.mp hq + refine ⟨by simp only [List.length_cons]; omega, ?_, ?_⟩ + · simp only [List.sum_cons] + omega + · intro a ha + rcases List.mem_cons.mp ha with rfl | ha + · omega + · exact hpos a ha + · rintro ⟨hlen, hsum, hpos⟩ + have ha : 0 < a := hpos a (by simp) + have haeq : a - 1 + 1 = a := by omega + have hsum' : a + p.sum ≤ b := by simpa using hsum + apply List.mem_cons.mpr + right + apply List.mem_flatMap.mpr + refine ⟨a - 1, List.mem_range.mpr (by omega), List.mem_map.mpr ?_⟩ + refine ⟨p, ih.mpr ⟨?_, ?_, ?_⟩, ?_⟩ + · simp only [List.length_cons] at hlen + omega + · omega + · intro c hc + exact hpos c (by simp [hc]) + · simp [haeq] + +def LexLE (a b : List ℕ) : Prop := a = b ∨ List.Lex (· < ·) a b + +instance (a b : List ℕ) : Decidable (LexLE a b) := by + unfold LexLE + infer_instance + +/-- The compact checker's exact pattern recursion, including extensions of +components which do not themselves meet the ordering restriction. -/ +def pathPatterns (t b : ℕ) (first : List ℕ := []) : List (List (List ℕ)) := + match t with + | 0 => [[]] + | t + 1 => + ((amountSequences t b).filter (fun p => decide (LexLE first p ∧ LexLE p p.reverse))).flatMap + (fun p => (pathPatterns (t - p.length) (b - p.sum) p).map (fun P => p :: P)) +termination_by t +decreasing_by omega + +def patternCount (k t : ℕ) : ℕ := (pathPatterns t (k - t)).length + +/-- Structurally recursive evaluator for the same domain. The fuel is +bounded by the number of remaining clique vertices. -/ +def pathPatternsFuel : ℕ → ℕ → ℕ → List ℕ → List (List (List ℕ)) + | _, 0, _, _ => [[]] + | 0, _ + 1, _, _ => [] + | f + 1, t + 1, b, first => + ((amountSequences t b).filter (fun p => decide (LexLE first p ∧ LexLE p p.reverse))).flatMap + (fun p => (pathPatternsFuel f (t - p.length) (b - p.sum) p).map (fun P => p :: P)) + +theorem pathPatterns_eq_fuel {f t b : ℕ} {first : List ℕ} (h : t ≤ f) : + pathPatterns t b first = pathPatternsFuel f t b first := by + induction f generalizing t b first with + | zero => + have : t = 0 := by omega + subst t + rw [pathPatterns, pathPatternsFuel] + | succ f ih => + cases t with + | zero => rw [pathPatterns, pathPatternsFuel] + | succ t => + rw [pathPatterns, pathPatternsFuel] + congr 1 + funext p + rw [ih (show t - p.length ≤ f by omega)] + +/-- Count components recursively without constructing a single long +flattened list. This keeps kernel reductions shallow. -/ +def patternNumberFuel : ℕ → ℕ → ℕ → List ℕ → ℕ + | _, 0, _, _ => 1 + | 0, _ + 1, _, _ => 0 + | f + 1, t + 1, b, first => + (((amountSequences t b).filter (fun p => decide (LexLE first p ∧ LexLE p p.reverse))).map + (fun p => patternNumberFuel f (t - p.length) (b - p.sum) p)).sum + +theorem pathPatternsFuel_length {f t b : ℕ} {first : List ℕ} : + (pathPatternsFuel f t b first).length = patternNumberFuel f t b first := by + induction f generalizing t b first with + | zero => cases t <;> rfl + | succ f ih => + cases t with + | zero => rfl + | succ t => simp only [pathPatternsFuel, patternNumberFuel, List.length_flatMap, + List.length_map, ih] + +/-- Sum over amount sequences by their short branching recursion, rather +than reducing a list whose length can approach the recursion-depth limit. -/ +def amountSequenceSum : ℕ → ℕ → (List ℕ → ℕ) → ℕ + | 0, _, F => F [] + | e + 1, b, F => F [] + ((List.range b).map (fun q => + amountSequenceSum e (b - (q + 1)) (fun p => F ((q + 1) :: p)))).sum + +private theorem sum_flatMap_nat {α : Type*} (L : List α) (F : α → List ℕ) : + (L.flatMap F).sum = (L.map (fun a => (F a).sum)).sum := by + induction L with + | nil => rfl + | cons a L ih => simp [ih] + +theorem amountSequenceSum_eq {e b : ℕ} {F : List ℕ → ℕ} : + amountSequenceSum e b F = ((amountSequences e b).map F).sum := by + induction e generalizing b F with + | zero => simp [amountSequenceSum, amountSequences] + | succ e ih => simp only [amountSequenceSum, amountSequences, List.map_cons, + List.sum_cons, List.map_flatMap, sum_flatMap_nat, List.map_map, ih, Function.comp_def] + +private theorem sum_map_filter {α : Type*} (L : List α) (p : α → Bool) (F : α → ℕ) : + ((L.filter p).map F).sum = (L.map (fun a => if p a then F a else 0)).sum := by + induction L with + | nil => rfl + | cons a L ih => cases h : p a <;> simp [h, ih] + +def patternNumberShallow : ℕ → ℕ → ℕ → List ℕ → ℕ + | _, 0, _, _ => 1 + | 0, _ + 1, _, _ => 0 + | f + 1, t + 1, b, first => amountSequenceSum t b (fun p => + if decide (LexLE first p ∧ LexLE p p.reverse) + then patternNumberShallow f (t - p.length) (b - p.sum) p else 0) + +theorem patternNumberFuel_eq_shallow {f t b : ℕ} {first : List ℕ} : + patternNumberFuel f t b first = patternNumberShallow f t b first := by + induction f generalizing t b first with + | zero => cases t <;> rfl + | succ f ih => + cases t with + | zero => rfl + | succ t => + simp only [patternNumberFuel, patternNumberShallow, amountSequenceSum_eq, + sum_map_filter, ih] + +def patternVertices (P : List (List ℕ)) : ℕ := (P.map (fun p => p.length + 1)).sum + +def patternAmount (P : List (List ℕ)) : ℕ := (P.map List.sum).sum + +def PatternValid : List ℕ → List (List ℕ) → Prop + | _, [] => True + | first, p :: P => + LexLE first p ∧ LexLE p p.reverse ∧ (∀ a ∈ p, 0 < a) ∧ PatternValid p P + +/-- Exact coverage of the canonical domain, independently of the graph +obstruction checker. Each component uses one more clique vertex than edges. -/ +theorem mem_pathPatterns {t b : ℕ} {first : List ℕ} {P : List (List ℕ)} : + P ∈ pathPatterns t b first ↔ + patternVertices P = t ∧ patternAmount P ≤ b ∧ PatternValid first P := by + induction t using Nat.strong_induction_on generalizing b first P with + | h t ih => + cases t with + | zero => + rw [pathPatterns] + simp only [List.mem_singleton] + constructor + · rintro rfl + simp [patternVertices, patternAmount, PatternValid] + · rintro ⟨hv, _, _⟩ + cases P with + | nil => rfl + | cons p P => simp [patternVertices] at hv + | succ t => + rw [pathPatterns] + cases P with + | nil => simp [patternVertices] + | cons p P => + constructor + · intro hm + obtain ⟨p', hp', hm⟩ := List.mem_flatMap.mp hm + obtain ⟨P', hP', heq⟩ := List.mem_map.mp hm + have hp'eq := (List.cons.inj heq).1 + have hP'eq := (List.cons.inj heq).2 + subst p' + subst P' + obtain ⟨hpseq, hporder⟩ := List.mem_filter.mp hp' + obtain ⟨hplen, hpsum, hppos⟩ := mem_amountSequences.mp hpseq + have hrest := (ih (t - p.length) (by omega)).mp hP' + have horder : LexLE first p ∧ LexLE p p.reverse := of_decide_eq_true hporder + refine ⟨?_, ?_, horder.1, horder.2, hppos, hrest.2.2⟩ + · simp only [patternVertices, List.map_cons, List.sum_cons] at * + omega + · simp only [patternAmount, List.map_cons, List.sum_cons] at * + omega + · rintro ⟨hv, hb, hvalid⟩ + have hplen : p.length ≤ t := by + simp only [patternVertices, List.map_cons, List.sum_cons] at hv + omega + have hpsum : p.sum ≤ b := by + simp only [patternAmount, List.map_cons, List.sum_cons] at hb + omega + obtain ⟨horder, hreverse, hpos, htail⟩ := hvalid + apply List.mem_flatMap.mpr + refine ⟨p, List.mem_filter.mpr ⟨mem_amountSequences.mpr ⟨hplen, hpsum, hpos⟩, + by simp [horder, hreverse]⟩, List.mem_map.mpr ?_⟩ + refine ⟨P, (ih (t - p.length) (by omega)).mpr ⟨?_, ?_, htail⟩, rfl⟩ + · simp only [patternVertices, List.map_cons, List.sum_cons] at hv ⊢ + omega + · simp only [patternAmount, List.map_cons, List.sum_cons] at hb ⊢ + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ProfileMasks.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ProfileMasks.lean new file mode 100644 index 0000000000000000000000000000000000000000..a26e6d0e6b82328af136c09382d0a7a187eaf5e1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ProfileMasks.lean @@ -0,0 +1,73 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PathProfiles + +namespace OAI + +/-! A positive amount profile determines exactly which positions in each +chain belong to the clique. This is the interface to finite indexed models. -/ + +namespace CycleClique.Construction +variable {V : Type*} {Q : Finset V} + +def profileMask : List ℕ → List Bool + | [] => [true] + | a :: w => true :: (List.replicate a false ++ profileMask w) + +noncomputable def cliqueMask (Q : Finset V) (l : List V) : List Bool := by + classical + exact l.map (fun v => decide (v ∈ Q)) + +theorem cliqueMask_eq_map [DecidableEq V] (Q : Finset V) (l : List V) : + cliqueMask Q l = l.map (fun v => decide (v ∈ Q)) := by + unfold cliqueMask + congr 1 + funext v + exact congrArg (fun h => @decide (v ∈ Q) h) (Subsingleton.elim _ _) + +theorem AssignedAmounts.mask {l : List V} {w : List ℕ} + (h : AssignedAmounts Q l w) (hne : l ≠ []) : cliqueMask Q l = profileMask w := by + classical + induction h with + | nil => exact False.elim (hne rfl) + | singleton hx => simp [cliqueMask, profileMask, hx] + | @step x y J B w hx hy hJ hJne ht ih => + have hmap : J.map (fun v => decide (v ∈ Q)) = List.replicate J.length false := by + apply List.map_eq_replicate_iff.mpr + intro v hv + simp [hJ v hv] + have htail := ih (by simp) + simpa only [cliqueMask, List.map_cons, List.map_append, hx, decide_true, + hmap, profileMask] using congrArg (fun L => true :: (List.replicate J.length false ++ L)) htail + +theorem profileMask_length (w : List ℕ) : + (profileMask w).length = w.sum + w.length + 1 := by + induction w with + | nil => rfl + | cons a w ih => simp only [profileMask, List.length_cons, List.length_append, + List.length_replicate, List.sum_cons, ih]; omega + +theorem AssignedAmounts.nonempty_length_eq {l : List V} {w : List ℕ} + (h : AssignedAmounts Q l w) (hne : l ≠ []) : l.length = w.sum + w.length + 1 := by + have hh := congrArg List.length (h.mask hne) + simpa only [cliqueMask, List.length_map, profileMask_length] using hh + +theorem profiles_masks {C : List (List V)} {P : List (List ℕ)} + (hp : List.Forall₂ (AssignedAmounts Q) C P) (hne : ∀ l ∈ C, l ≠ []) : + C.map (cliqueMask Q) = P.map profileMask := by + induction hp with + | nil => rfl + | @cons l w C P hw ht ih => + simp only [List.map_cons] + rw [hw.mask (hne l (by simp)), ih (fun l hl => hne l (by simp [hl]))] + +theorem profiles_lengths {C : List (List V)} {P : List (List ℕ)} + (hp : List.Forall₂ (AssignedAmounts Q) C P) (hne : ∀ l ∈ C, l ≠ []) : + C.map List.length = P.map (fun w => w.sum + w.length + 1) := by + induction hp with + | nil => rfl + | @cons l w C P hw ht ih => + simp only [List.map_cons] + rw [hw.nonempty_length_eq (hne l (by simp)), ih (fun l hl => hne l (by simp [hl]))] + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PublishedInputs.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PublishedInputs.lean new file mode 100644 index 0000000000000000000000000000000000000000..41e98f9c72b3e86319ca71f4ffeb30c3f42757b6 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/PublishedInputs.lean @@ -0,0 +1,30 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Definitions +import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected + +namespace OAI + +/-! +# The published Hamiltonicity input + +Chvátal and Erdős, *A note on Hamiltonian circuits*, Discrete Mathematics +2 (1972), 111–113, Theorem 1: +. + +Only its `s = 2` specialization at order at least six is needed here. +The proposition below is an explicit parameter of the conditional +development, not an axiom or an assumed instance. +-/ + +namespace CycleClique.Construction +/-- The precise Chvátal–Erdős specialization used in the size test. +Connectivity after every one-vertex deletion is the required +two-connectivity condition at this order. -/ +def CEAlphaTwo : Prop := + ∀ (V : Type) [Fintype V] (H : SimpleGraph V), + 6 ≤ Fintype.card V → H.Connected → + (∀ v : V, (H.induce {w | w ≠ v}).Connected) → + ¬ HasIndependent H 3 → HasCycle H (Fintype.card V) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RamseyFromFiniteCoverage.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RamseyFromFiniteCoverage.lean new file mode 100644 index 0000000000000000000000000000000000000000..ffdb64f41f0dac7a8b3371bf1c30c0b2311d6756 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RamseyFromFiniteCoverage.lean @@ -0,0 +1,78 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertifiedRamseyReduction +import OAI.Combinatorics.Ramsey.CycleClique.Construction.SmallCycleRamsey +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Triangle + +namespace OAI + +/-! Ramsey assembly separates finite coverage from the arithmetic, +small-cycle clauses, and least-order conclusion. -/ + +namespace CycleClique.Construction +/-- The finite obligation discharged by concrete certificate coverage. -/ +def FiniteCertificateCoverage : Prop := + ∀ k t : ℕ, 5 ≤ k → k ≤ 17 → 3 ≤ t → t ≤ k → t ≤ 8 → k / 2 ≤ t → + ∀ P ∈ pathPatterns t (k - t), HasCheckedCertificate k t P + +theorem no_expanded_counterexample_of_finite_coverage (hCE : CEAlphaTwo) + (hcoverage : FiniteCertificateCoverage) + {V : Type} [Fintype V] {G : SimpleGraph V} {k a : ℕ} + (hk : 5 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) + (hcard : Fintype.card V = k * a + 1) (hI : IndependenceBound G a) + (hcycle : ¬ HasCycle G (k + 1)) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) : False := by + have hcoverageAt : CertificateCoverageAt k := by + intro t ht htk ht8 hhalf + by_cases hk17 : k ≤ 17 + · exact hcoverage k t hk hk17 ht htk ht8 hhalf + · have htk' : k / 2 ≤ 8 := hhalf.trans ht8 + omega + exact no_expanded_counterexample_of_coverage hCE hcoverageAt hk ha hak hcard hI hcycle hexpand + +theorem cycle_clique_upper_of_finite_coverage (hCE : CEAlphaTwo) + (hcoverage : FiniteCertificateCoverage) {k a : ℕ} + (hk : 3 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) : + RamseyProperty (k + 1) (a + 1) (k * a + 1) := by + apply ramseyProperty_of_expanded_exclusion hk ha hak + intro b hb hbk G hcycle hI hexpand + by_cases hk3 : k = 3 + · subst k + exact no_expanded_fourCycle_counterexample hb hbk (by simp) hI hcycle hexpand + by_cases hk4 : k = 4 + · subst k + exact no_expanded_fiveCycle_counterexample hb hbk (by simp) hI hcycle hexpand + exact no_expanded_counterexample_of_finite_coverage hCE hcoverage (by omega) hb hbk (by simp) hI hcycle hexpand + +theorem cycle_clique_main_of_finite_coverage (hCE : CEAlphaTwo) + (hcoverage : FiniteCertificateCoverage) {m n : ℕ} + (hn : 3 ≤ n) (hnm : n ≤ m) (hexcept : (m, n) ≠ (3, 3)) : + IsRamseyNumber m n ((m - 1) * (n - 1) + 1) := by + have hm4 : 4 ≤ m := by + by_contra hm + have hm3 : m = 3 := by omega + have hn3 : n = 3 := by omega + exact hexcept (by simp only [hm3, hn3]) + have hm' : m - 1 + 1 = m := by omega + have hn' : n - 1 + 1 = n := by omega + apply isRamseyNumber_of_upper_lower + · simpa only [hm', hn'] using cycle_clique_upper_of_finite_coverage hCE hcoverage + (k := m - 1) (a := n - 1) (by omega) (by omega) (by omega) + · exact blockGraph_not_ramsey (by omega) (by omega) + +theorem cycle_clique_ramsey_of_finite_coverage (hCE : CEAlphaTwo) + (hcoverage : FiniteCertificateCoverage) {m n : ℕ} + (hn : 3 ≤ n) (hnm : n ≤ m) : + IsRamseyNumber m n (if m = 3 ∧ n = 3 then 6 else (m - 1) * (n - 1) + 1) := by + by_cases hsmall : m = 3 ∧ n = 3 + · obtain ⟨rfl, rfl⟩ := hsmall + simpa using triangle_ramsey + · rw [ite_eq_right hsmall] + apply cycle_clique_main_of_finite_coverage hCE hcoverage hn hnm + intro he + have hm : m = 3 := congrArg Prod.fst he + have hn : n = 3 := congrArg Prod.snd he + exact hsmall ⟨hm, hn⟩ + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RamseyMainReduction.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RamseyMainReduction.lean new file mode 100644 index 0000000000000000000000000000000000000000..bf6d56b6fe1b6d54e75be3a99389d2b948004cc1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RamseyMainReduction.lean @@ -0,0 +1,42 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RamseyReduction +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LowerBound + +namespace OAI + +/-! Assemble a Ramsey upper bound once the expanded counterexamples in +its fixed cycle-length parameter have been excluded. -/ + +namespace CycleClique.Construction +theorem ramseyProperty_of_expanded_exclusion {k a : ℕ} + (hk : 3 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) + (hexclude : ∀ b, 2 ≤ b → b ≤ k → + ∀ G : SimpleGraph (Fin (k * b + 1)), + ¬ HasCycle G (k + 1) → IndependenceBound G b → + (∀ I : Finset (Fin (k * b + 1)), G.IsIndepSet (I : Set _) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) → False) : + RamseyProperty (k + 1) (a + 1) (k * a + 1) := by + classical + by_contra hfail + obtain ⟨b, G, hb, hbk, hcycle, hI, hexpand⟩ := + exists_minimal_counterexample hk ha hak hfail + exact hexclude b hb hbk G hcycle hI hexpand + +theorem isRamseyNumber_of_expanded_exclusion {m n : ℕ} + (hm : 4 ≤ m) (hn : 3 ≤ n) (hnm : n ≤ m) + (hexclude : ∀ b, 2 ≤ b → b ≤ m - 1 → + ∀ G : SimpleGraph (Fin ((m - 1) * b + 1)), + ¬ HasCycle G m → IndependenceBound G b → + (∀ I : Finset (Fin ((m - 1) * b + 1)), G.IsIndepSet (I : Set _) → I.Nonempty → + (m - 1) * I.card + 1 ≤ (closedNeighborhood G I).card) → False) : + IsRamseyNumber m n ((m - 1) * (n - 1) + 1) := by + have hm' : m - 1 + 1 = m := by omega + have hn' : n - 1 + 1 = n := by omega + apply isRamseyNumber_of_upper_lower + · have hupper := ramseyProperty_of_expanded_exclusion (k := m - 1) (a := n - 1) + (by omega) (by omega) (by omega) (by simpa only [hm'] using hexclude) + simpa only [hm', hn'] using hupper + · exact blockGraph_not_ramsey (by omega) (by omega) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RamseyReduction.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RamseyReduction.lean new file mode 100644 index 0000000000000000000000000000000000000000..b3ab0ece55a6c6643cab27099af8eb1f3d4b0e21 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RamseyReduction.lean @@ -0,0 +1,142 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Reduction +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Monotonicity + +namespace OAI + +/-! The precise minimal-parameter reduction in manuscript Section 2. -/ + +namespace CycleClique.Construction +variable {V : Type*} [Fintype V] + +theorem cycleNext_ne_self {m : ℕ} (hm : 2 ≤ m) (i : Fin m) : cycleNext i ≠ i := by + intro h + have hv := congrArg Fin.val h + change (i.val + 1) % m = i.val at hv + by_cases hi : i.val + 1 < m + · rw [Nat.mod_eq_of_lt hi] at hv + omega + · have he : i.val + 1 = m := by omega + rw [he, Nat.mod_self] at hv + omega + +theorem complete_hasCycle {G : SimpleGraph V} {m : ℕ} (hm : 2 ≤ m) + (hcomplete : ∀ x y, x ≠ y → G.Adj x y) (hcard : m ≤ Fintype.card V) : + HasCycle G m := by + classical + obtain ⟨I, _, hI⟩ := Finset.exists_subset_card_eq + (show m ≤ (Finset.univ : Finset V).card by simpa using hcard) + let e : Fin m ≃ I := (Finset.equivFinOfCardEq hI).symm + let f : Fin m → V := fun i => (e i).val + have hf : Function.Injective f := Subtype.val_injective.comp e.injective + refine ⟨f, hf, fun i => hcomplete _ _ ?_⟩ + exact fun h => cycleNext_ne_self hm i (hf h).symm + +omit [Fintype V] in +theorem independent_pair {G : SimpleGraph V} {x y : V} (hne : x ≠ y) + (hadj : ¬ G.Adj x y) : HasIndependent G 2 := by + refine ⟨![x, y], ?_, ?_⟩ + · intro i j hij + fin_cases i <;> fin_cases j <;> simp_all + · intro i j + have hyx : ¬ G.Adj y x := fun h => hadj h.symm + fin_cases i <;> fin_cases j <;> simp_all + +theorem independenceBound_zero {G : SimpleGraph V} (h : IndependenceBound G 0) : + Fintype.card V = 0 := by + classical + have hempty : IsEmpty V := ⟨fun v => by + have hs : G.IsIndepSet (({v} : Finset V) : Set V) := by simp + have := h {v} hs + simp at this⟩ + exact Fintype.card_eq_zero + +theorem independenceBound_one {G : SimpleGraph V} {k : ℕ} (hk : 1 ≤ k) + (hcycle : ¬ HasCycle G (k + 1)) (h : IndependenceBound G 1) : + Fintype.card V ≤ k := by + have hn : ¬ HasIndependent G 2 := independenceBound_iff_not_hasIndependent.mp h + have hcomplete : ∀ x y, x ≠ y → G.Adj x y := by + intro x y hxy + by_contra hnon + exact hn (independent_pair hxy hnon) + by_contra hcard + exact hcycle (complete_hasCycle (by omega) hcomplete (by omega)) + +/-- A Ramsey property bounds every larger cycle-free graph with the given +independence bound, by restricting it to exactly the forcing order. -/ +theorem card_lt_of_ramseyProperty {G : SimpleGraph V} {m n N : ℕ} + (hRamsey : RamseyProperty m (n + 1) N) + (hcycle : ¬ HasCycle G m) (hbound : IndependenceBound G n) : + Fintype.card V < N := by + classical + by_contra hcard + obtain ⟨I, _, hI⟩ := Finset.exists_subset_card_eq + (show N ≤ (Finset.univ : Finset V).card by simpa using (show N ≤ Fintype.card V by omega)) + let e : Fin N ≃ I := (Finset.equivFinOfCardEq hI).symm + let f : Fin N → V := fun i => (e i).val + have hf : Function.Injective f := Subtype.val_injective.comp e.injective + rcases hRamsey (G.comap f) with hc | hi + · exact hcycle (hc.map f hf (fun h => h)) + · exact (independenceBound_iff_not_hasIndependent.mp hbound) + (hi.map f hf (fun h => h)) + +/-- Manuscript Lemma `red:smaller`, including the zero and one cases. -/ +theorem smaller_parameter_bound {k a b : ℕ} (hk : 3 ≤ k) (hb : b < a) + (hprior : ∀ c, 2 ≤ c → c < a → RamseyProperty (k + 1) (c + 1) (k * c + 1)) + (G : SimpleGraph V) (hcycle : ¬ HasCycle G (k + 1)) + (hbound : IndependenceBound G b) : Fintype.card V ≤ k * b := by + by_cases hb0 : b = 0 + · subst b + simp [independenceBound_zero hbound] + by_cases hb1 : b = 1 + · subst b + simpa using independenceBound_one (by omega) hcycle hbound + have hc := card_lt_of_ramseyProperty (hprior b (by omega) hb) hcycle hbound + omega + +/-- The expansion premise is supplied by induction on the independence +parameter, rather than assumed as an additional graph theorem. -/ +theorem expansion_of_smaller_ramsey {k a : ℕ} (hk : 3 ≤ k) + (hprior : ∀ b, 2 ≤ b → b < a → RamseyProperty (k + 1) (b + 1) (k * b + 1)) + (G : SimpleGraph V) (hcard : Fintype.card V = k * a + 1) + (hcycle : ¬ HasCycle G (k + 1)) (hbound : IndependenceBound G a) + (I : Finset V) (hI : G.IsIndepSet (I : Set V)) (hne : I.Nonempty) : + k * I.card + 1 ≤ (closedNeighborhood G I).card := by + classical + apply minimal_counterexample_expansion hcard hcycle hbound + (fun b hb Y hcy hi => ?_) I hI hne + simpa using smaller_parameter_bound hk hb hprior + (G.induce (Y : Set V)) hcy hi + +/-- A failure in the main range supplies precisely the expanded graph +used by the rest of the manuscript, at the least failed parameter. -/ +theorem exists_minimal_counterexample {k a₀ : ℕ} (hk : 3 ≤ k) + (ha₀ : 2 ≤ a₀) (ha₀k : a₀ ≤ k) + (hfail : ¬ RamseyProperty (k + 1) (a₀ + 1) (k * a₀ + 1)) : + ∃ (a : ℕ) (G : SimpleGraph (Fin (k * a + 1))), + 2 ≤ a ∧ a ≤ k ∧ ¬ HasCycle G (k + 1) ∧ IndependenceBound G a ∧ + ∀ I : Finset (Fin (k * a + 1)), + G.IsIndepSet (I : Set _) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card := by + classical + let P : ℕ → Prop := fun a => + 2 ≤ a ∧ a ≤ k ∧ ¬ RamseyProperty (k + 1) (a + 1) (k * a + 1) + have hex : ∃ a, P a := ⟨a₀, ha₀, ha₀k, hfail⟩ + let a := Nat.find hex + obtain ⟨ha, hak, hbad⟩ := Nat.find_spec hex + have hprior : ∀ b, 2 ≤ b → b < a → + RamseyProperty (k + 1) (b + 1) (k * b + 1) := by + intro b hb hba + by_contra h + exact Nat.find_min hex hba ⟨hb, by omega, h⟩ + change ¬ ∀ G : SimpleGraph (Fin (k * a + 1)), + HasCycle G (k + 1) ∨ HasIndependent G (a + 1) at hbad + obtain ⟨G, hG⟩ := not_forall.mp hbad + obtain ⟨hcy, hi⟩ := not_or.mp hG + have hbound : IndependenceBound G a := independenceBound_iff_not_hasIndependent.mpr hi + refine ⟨a, G, ha, hak, hcy, hbound, ?_⟩ + intro I hI hne + exact expansion_of_smaller_ramsey hk hprior G (Fintype.card_fin _) hcy hbound I hI hne + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawCanonical.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawCanonical.lean new file mode 100644 index 0000000000000000000000000000000000000000..8128a988c861ad700a96c0b7e24ee79c73a98af8 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawCanonical.lean @@ -0,0 +1,126 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CanonicalProfiles +import OAI.Combinatorics.Ramsey.CycleClique.Construction.AssignedProfileOperations +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawPermutation +import Mathlib.Data.List.Perm.Basic + +namespace OAI + +/-! Realize numerical canonical profiles by independently orienting and +reordering the actual chains, preserving the full raw vertex set. -/ + +namespace CycleClique.Construction +variable {V : Type*} {Q : Finset V} + +def ChainOrientation (l r : List V) : Prop := r = l ∨ r = l.reverse + +theorem chainOrientations_flatten {C D : List (List V)} + (h : List.Forall₂ ChainOrientation C D) : D.flatten.Perm C.flatten := by + induction h with + | nil => exact .refl _ + | @cons l r C D hr ht ih => + rcases hr with he | he + · subst r; exact (List.Perm.refl l).append ih + · subst r; exact (List.reverse_perm l).append ih + +theorem chainOrientations_source {C D : List (List V)} + (h : List.Forall₂ ChainOrientation C D) : + ∀ r ∈ D, ∃ l ∈ C, ChainOrientation l r := by + induction h with + | nil => simp + | @cons l r C D hr ht ih => + intro s hs + rcases List.mem_cons.mp hs with rfl | hs + · exact ⟨l, by simp, hr⟩ + · obtain ⟨l', hl', hh⟩ := ih s hs + exact ⟨l', by simp [hl'], hh⟩ + +theorem orient_chain_profiles {C : List (List V)} {P : List (List ℕ)} + (hp : List.Forall₂ (AssignedAmounts Q) C P) : + ∃ D, List.Forall₂ ChainOrientation C D ∧ + List.Forall₂ (AssignedAmounts Q) D (P.map orientAmounts) := by + induction hp with + | nil => exact ⟨[], .nil, .nil⟩ + | @cons l w C P hw ht ih => + obtain ⟨D, hD, hprof⟩ := ih + by_cases h : w ≤ w.reverse + · exact ⟨l :: D, .cons (Or.inl rfl) hD, + by simpa only [List.map_cons, orientAmounts, h, ↓reduceIte] using + List.Forall₂.cons hw hprof⟩ + · exact ⟨l.reverse :: D, .cons (Or.inr rfl) hD, + by simpa only [List.map_cons, orientAmounts, h, ↓reduceIte] using + List.Forall₂.cons hw.reverse hprof⟩ + +namespace RawPathSystem + +variable {G : SimpleGraph V} + +def reorient (S : RawPathSystem G Q) (D : List (List V)) + (h : List.Forall₂ ChainOrientation S.chains D) : RawPathSystem G Q where + chains := D + paths := by + intro r hr + obtain ⟨l, hl, he⟩ := chainOrientations_source h r hr + rcases he with he | he + · subst r; exact S.paths l hl + · subst r; exact ⟨List.nodup_reverse.mpr (S.paths l hl).1, + List.isChain_reverse.mpr ((S.paths l hl).2.imp (fun _ _ hh => hh.symm))⟩ + disjoint := (List.nodup_flatten.mp + ((chainOrientations_flatten h).nodup_iff.mpr S.flatten_nodup)).2 + endpoints := by + intro r hr + obtain ⟨l, hl, he⟩ := chainOrientations_source h r hr + rcases he with he | he + · subst r; exact S.endpoints l hl + · subst r; simpa only [List.head?_reverse, List.getLast?_reverse] using + And.intro (S.endpoints l hl).2 (S.endpoints l hl).1 + no_clique_steps := by + intro r hr + obtain ⟨l, hl, he⟩ := chainOrientations_source h r hr + rcases he with he | he + · subst r; exact S.no_clique_steps l hl + · subst r; exact List.isChain_reverse.mpr + ((S.no_clique_steps l hl).imp (fun _ _ hh hh' => hh hh'.symm)) + +@[simp] theorem reorient_vertices (S : RawPathSystem G Q) (D : List (List V)) + (h : List.Forall₂ ChainOrientation S.chains D) : (S.reorient D h).vertices = S.vertices := by + ext v + simp only [vertices, reorient, List.mem_toFinset] + exact (chainOrientations_flatten h).mem_iff + +@[simp] theorem reorient_amount (S : RawPathSystem G Q) (D : List (List V)) + (h : List.Forall₂ ChainOrientation S.chains D) : (S.reorient D h).amount = S.amount := by + unfold amount + rw [reorient_vertices] + +@[simp] theorem reorient_assignedCount (S : RawPathSystem G Q) (D : List (List V)) + (h : List.Forall₂ ChainOrientation S.chains D) : + (S.reorient D h).assignedCount = S.assignedCount := by + change rawAssignedCount Q D = rawAssignedCount Q S.chains + generalize heq : S.chains = C at h ⊢ + clear heq + induction h with + | nil => rfl + | @cons l r C D hr ht ih => + rcases hr with he | he <;> subst r <;> + simp only [rawAssignedCount, List.map_cons, List.sum_cons, + chainCliqueCount_reverse] at ih ⊢ <;> omega + +theorem canonical_profile (S : RawPathSystem G Q) {P : List (List ℕ)} + (hp : List.Forall₂ (AssignedAmounts Q) S.chains P) : + ∃ T : RawPathSystem G Q, + T.vertices = S.vertices ∧ T.amount = S.amount ∧ T.assignedCount = S.assignedCount ∧ + List.Forall₂ (AssignedAmounts Q) T.chains (canonicalAmounts P) := by + obtain ⟨D, hD, hprof⟩ := orient_chain_profiles hp + let U := S.reorient D hD + obtain ⟨C, hC, hperm⟩ := List.perm_comp_forall₂ (canonicalAmounts_perm P) hprof.flip + let T := U.reorder C hperm + refine ⟨T, ?_, ?_, ?_, hC.flip⟩ + · exact (U.reorder_vertices C hperm).trans (S.reorient_vertices D hD) + · exact (U.reorder_amount C hperm).trans (S.reorient_amount D hD) + · exact (U.reorder_assignedCount C hperm).trans (S.reorient_assignedCount D hD) + +end RawPathSystem + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawCliqueCompletion.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawCliqueCompletion.lean new file mode 100644 index 0000000000000000000000000000000000000000..18df2c53156aa28e9498ea887b5ea0c8711bf1f8 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawCliqueCompletion.lean @@ -0,0 +1,87 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawPathSystem + +namespace OAI + +/-! Include every unused clique vertex as a singleton chain. -/ + +namespace CycleClique.Construction.RawPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +noncomputable def completeClique (S : RawPathSystem G Q) : RawPathSystem G Q := by + classical + let U := Q \ S.vertices + refine { + chains := S.chains ++ U.toList.map (fun v => [v]) + paths := ?_ + disjoint := ?_ + endpoints := ?_ + no_clique_steps := ?_ } + · intro l hl + rcases List.mem_append.mp hl with hl | hl + · exact S.paths l hl + · obtain ⟨v, _, rfl⟩ := List.mem_map.mp hl + exact ⟨by simp, .singleton v⟩ + · apply List.pairwise_append.mpr + refine ⟨S.disjoint, ?_, ?_⟩ + · apply List.pairwise_map.mpr + apply U.nodup_toList.imp + intro v w hne + simpa using hne.symm + · intro l hl m hm + obtain ⟨v, hv, rfl⟩ := List.mem_map.mp hm + apply List.disjoint_left.mpr + intro w hw hwv + have heq : w = v := by simpa using hwv + subst w + have hvU : v ∈ U := Finset.mem_toList.mp hv + exact (Finset.mem_sdiff.mp hvU).2 + (List.mem_toFinset.mpr (List.mem_flatten.mpr ⟨l, hl, hw⟩)) + · intro l hl + rcases List.mem_append.mp hl with hl | hl + · exact S.endpoints l hl + · obtain ⟨v, hv, rfl⟩ := List.mem_map.mp hl + have hvQ : v ∈ Q := (Finset.mem_sdiff.mp (Finset.mem_toList.mp hv)).1 + simpa using And.intro hvQ hvQ + · intro l hl + rcases List.mem_append.mp hl with hl | hl + · exact S.no_clique_steps l hl + · obtain ⟨v, _, rfl⟩ := List.mem_map.mp hl + exact .singleton v + +theorem completeClique_vertices (S : RawPathSystem G Q) : + S.completeClique.vertices = S.vertices ∪ Q := by + classical + ext v + simp [vertices, completeClique] + by_cases hv : ∃ l ∈ S.chains, v ∈ l <;> simp_all + +@[simp] theorem completeClique_amount (S : RawPathSystem G Q) : + S.completeClique.amount = S.amount := by + classical + unfold amount + rw [completeClique_vertices, Finset.union_sdiff_distrib] + simp + +@[simp] theorem completeClique_assignedCount (S : RawPathSystem G Q) : + S.completeClique.assignedCount = S.assignedCount := by + classical + unfold assignedCount + change rawAssignedCount Q + (S.chains ++ (Q \ S.vertices).toList.map (fun v => [v])) = _ + rw [rawAssignedCount_append] + suffices h : rawAssignedCount Q ((Q \ S.vertices).toList.map (fun v => [v])) = 0 by + simp [h] + unfold rawAssignedCount + apply List.sum_eq_zero + intro n hn + obtain ⟨l, hl, rfl⟩ := List.mem_map.mp hn + obtain ⟨v, hv, rfl⟩ := List.mem_map.mp hl + have hvQ := (Finset.mem_sdiff.mp (Finset.mem_toList.mp hv)).1 + simp [chainCliqueCount, hvQ] + +end CycleClique.Construction.RawPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawEmbedding.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawEmbedding.lean new file mode 100644 index 0000000000000000000000000000000000000000..85f3a114f8ddd29225db1afd9eeee05923334405 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawEmbedding.lean @@ -0,0 +1,97 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.AssignedDeletion +import OAI.Combinatorics.Ramsey.CycleClique.Construction.NormalizedIncident + +namespace OAI + +/-! Transport a finite chain certificate through an injective graph embedding. -/ + +namespace CycleClique.Construction +variable {W V : Type*} {H : SimpleGraph W} {G : SimpleGraph V} +variable {Q₀ : Finset W} {Q : Finset V} {f : W → V} + +theorem chainCliqueCount_map (hQ : ∀ v, f v ∈ Q ↔ v ∈ Q₀) (l : List W) : + chainCliqueCount Q (l.map f) = chainCliqueCount Q₀ l := by + classical + induction l with + | nil => rfl + | cons x l ih => simp only [List.map_cons, chainCliqueCount_cons, hQ, ih] + +theorem chainOutsideCount_map (hQ : ∀ v, f v ∈ Q ↔ v ∈ Q₀) (l : List W) : + chainOutsideCount Q (l.map f) = chainOutsideCount Q₀ l := by + classical + induction l with + | nil => rfl + | cons x l ih => + simp only [chainOutsideCount, List.map_cons, List.filter_cons] at ih ⊢ + by_cases hx : x ∈ Q₀ <;> simp [hQ, hx] at ih ⊢ <;> omega + +namespace RawPathSystem + +def embed (S : RawPathSystem H Q₀) (f : W → V) (hf : Function.Injective f) + (hQ : ∀ v, f v ∈ Q ↔ v ∈ Q₀) + (hG : ∀ {x y}, H.Adj x y → G.Adj (f x) (f y)) : RawPathSystem G Q where + chains := S.chains.map (List.map f) + paths := by + intro l hl + obtain ⟨r, hr, rfl⟩ := List.mem_map.mp hl + exact ⟨(S.paths r hr).1.map hf, List.isChain_map_of_isChain f (fun _ _ h => hG h) (S.paths r hr).2⟩ + disjoint := by + apply (List.nodup_flatten.mp ?_).2 + simpa only [← List.map_flatten] using S.flatten_nodup.map hf + endpoints := by + intro l hl + obtain ⟨r, hr, rfl⟩ := List.mem_map.mp hl + constructor + · intro v hv + rw [List.head?_map] at hv + obtain ⟨w, hw, rfl⟩ := Option.mem_map.mp hv + exact (hQ w).mpr ((S.endpoints r hr).1 w hw) + · intro v hv + rw [List.getLast?_map] at hv + obtain ⟨w, hw, rfl⟩ := Option.mem_map.mp hv + exact (hQ w).mpr ((S.endpoints r hr).2 w hw) + no_clique_steps := by + intro l hl + obtain ⟨r, hr, rfl⟩ := List.mem_map.mp hl + exact List.isChain_map_of_isChain f (fun _ _ hn hh => + hn ⟨(hQ _).mp hh.1, (hQ _).mp hh.2⟩) (S.no_clique_steps r hr) + +@[simp] theorem embed_amount (S : RawPathSystem H Q₀) (hf : Function.Injective f) + (hQ : ∀ v, f v ∈ Q ↔ v ∈ Q₀) + (hG : ∀ {x y}, H.Adj x y → G.Adj (f x) (f y)) : + (S.embed f hf hQ hG).amount = S.amount := by + rw [amount_eq_outside_count, amount_eq_outside_count] + change chainOutsideCount Q ((S.chains.map (List.map f)).flatten) = _ + rw [← List.map_flatten] + exact chainOutsideCount_map hQ _ + +@[simp] theorem embed_assignedCount (S : RawPathSystem H Q₀) (hf : Function.Injective f) + (hQ : ∀ v, f v ∈ Q ↔ v ∈ Q₀) + (hG : ∀ {x y}, H.Adj x y → G.Adj (f x) (f y)) : + (S.embed f hf hQ hG).assignedCount = S.assignedCount := by + change rawAssignedCount Q (S.chains.map (List.map f)) = rawAssignedCount Q₀ S.chains + simp only [rawAssignedCount, List.map_map, Function.comp_def, chainCliqueCount_map hQ] + +@[simp] theorem embed_normalize_incident (S : RawPathSystem H Q₀) + (hf : Function.Injective f) (hQ : ∀ v, f v ∈ Q ↔ v ∈ Q₀) + (hG : ∀ {x y}, H.Adj x y → G.Adj (f x) (f y)) : + (S.embed f hf hQ hG).normalize.incident = S.normalize.incident := by + rw [normalize_incident, normalize_incident] + change ((S.chains.map (List.map f)).map (activeCliqueCount Q)).sum = _ + simp only [List.map_map, Function.comp_def, activeCliqueCount, List.length_map, + chainCliqueCount_map hQ] + rfl + +theorem normalize_incident_le (S : RawPathSystem G Q) : + S.normalize.incident ≤ chainCliqueCount Q S.chains.flatten := by + rw [normalize_incident, chainCliqueCount_flatten] + induction S.chains with + | nil => simp + | cons l C ih => + simp only [List.map_cons, List.sum_cons] + exact Nat.add_le_add (by unfold activeCliqueCount; split_ifs <;> omega) ih + +end RawPathSystem +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawOrientations.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawOrientations.lean new file mode 100644 index 0000000000000000000000000000000000000000..6edbfac0c8f84e785fd1c0deba996f64c7aa60a9 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawOrientations.lean @@ -0,0 +1,101 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawReverse + +namespace OAI + +/-! Orient chains independently while retaining every vertex, amount and +assigned path. Singleton components may be reversed without effect. -/ + +namespace CycleClique.Construction.RawPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +def orientedChain (p : List V → Bool) (l : List V) : List V := + if p l then l.reverse else l + +theorem orientedChain_perm (p : List V → Bool) (l : List V) : + (orientedChain p l).Perm l := by + unfold orientedChain + split_ifs + · exact List.reverse_perm l + · exact .refl _ + +theorem oriented_flatten_perm (p : List V → Bool) (C : List (List V)) : + (C.map (orientedChain p)).flatten.Perm C.flatten := by + induction C with + | nil => exact .refl _ + | cons l C ih => + exact (orientedChain_perm p l).append ih + +def orientChains (S : RawPathSystem G Q) (p : List V → Bool) : RawPathSystem G Q where + chains := S.chains.map (orientedChain p) + paths := by + intro l hl + obtain ⟨r, hr, rfl⟩ := List.mem_map.mp hl + refine ⟨(orientedChain_perm p r).nodup_iff.mpr (S.paths r hr).1, ?_⟩ + unfold orientedChain + split_ifs + · exact List.isChain_reverse.mpr ((S.paths r hr).2.imp (fun _ _ h => h.symm)) + · exact (S.paths r hr).2 + disjoint := (List.nodup_flatten.mp + ((oriented_flatten_perm p S.chains).nodup_iff.mpr S.flatten_nodup)).2 + endpoints := by + intro l hl + obtain ⟨r, hr, rfl⟩ := List.mem_map.mp hl + unfold orientedChain + split_ifs + · simpa only [List.head?_reverse, List.getLast?_reverse] using + And.intro (S.endpoints r hr).2 (S.endpoints r hr).1 + · exact S.endpoints r hr + no_clique_steps := by + intro l hl + obtain ⟨r, hr, rfl⟩ := List.mem_map.mp hl + unfold orientedChain + split_ifs + · exact List.isChain_reverse.mpr + ((S.no_clique_steps r hr).imp (fun _ _ h h' => h h'.symm)) + · exact S.no_clique_steps r hr + +@[simp] theorem orientChains_vertices (S : RawPathSystem G Q) (p : List V → Bool) : + (S.orientChains p).vertices = S.vertices := by + ext v + simp only [vertices, List.mem_toFinset] + exact (oriented_flatten_perm p S.chains).mem_iff + +@[simp] theorem orientChains_amount (S : RawPathSystem G Q) (p : List V → Bool) : + (S.orientChains p).amount = S.amount := by + unfold amount + rw [orientChains_vertices] + +@[simp] theorem orientChains_assignedCount (S : RawPathSystem G Q) (p : List V → Bool) : + (S.orientChains p).assignedCount = S.assignedCount := by + unfold assignedCount rawAssignedCount + change ((S.chains.map (orientedChain p)).map (fun l => chainCliqueCount Q l - 1)).sum = _ + simp only [List.map_map, Function.comp_def] + apply congrArg List.sum + apply List.map_congr_left + intro l hl + unfold orientedChain + split_ifs <;> simp only [chainCliqueCount_reverse] + +theorem representatives_orientChains_unchanged (S : RawPathSystem G Q) {p : List V → Bool} + {l : List V} (hl : l ∈ S.chains) (hp : p l = false) {x : V} + (hx : x ∈ chainRepresentatives Q l) : x ∈ (S.orientChains p).representatives := by + apply List.mem_flatten.mpr + refine ⟨chainRepresentatives Q l, ?_, hx⟩ + apply List.mem_map.mpr + refine ⟨l, ?_, rfl⟩ + apply List.mem_map.mpr + exact ⟨l, hl, by simp [orientedChain, hp]⟩ + +theorem representatives_orientChains_terminal (S : RawPathSystem G Q) {p : List V → Bool} + {l : List V} (hl : l ∈ S.chains) (hp : p l = true) {x : V} + (hx : x ∈ l.getLast?) : x ∈ (S.orientChains p).representatives := by + apply chain_head_representative (S.orientChains p) (l := l.reverse) + (List.mem_map.mpr ⟨l, hl, by simp [orientedChain, hp]⟩) + simpa only [List.head?_reverse] using hx + +end CycleClique.Construction.RawPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawPathSystem.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawPathSystem.lean new file mode 100644 index 0000000000000000000000000000000000000000..0f8b65975eb9c1af7245c34569b81fc8bc3e497b --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawPathSystem.lean @@ -0,0 +1,69 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ChainCounts +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ListSurgery + +namespace OAI + +/-! Raw chain collections used during representative surgery. Isolated +clique vertices and empty pieces are allowed until normalization. -/ + +namespace CycleClique.Construction +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +structure RawPathSystem (G : SimpleGraph V) (Q : Finset V) where + chains : List (List V) + paths : ∀ l ∈ chains, l.Nodup ∧ l.IsChain G.Adj + disjoint : chains.Pairwise List.Disjoint + endpoints : ∀ l ∈ chains, + (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q) + no_clique_steps : ∀ l ∈ chains, + l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q)) + +namespace RawPathSystem + +noncomputable def normalize (S : RawPathSystem G Q) : ExpandedPathSystem G Q := + normalizeChains S.chains S.paths S.disjoint S.endpoints S.no_clique_steps + +noncomputable def vertices (S : RawPathSystem G Q) : Finset V := by + classical + exact S.chains.flatten.toFinset + +noncomputable def amount (S : RawPathSystem G Q) : ℕ := by + classical + exact (S.vertices \ Q).card + +noncomputable def assignedCount (S : RawPathSystem G Q) : ℕ := + rawAssignedCount Q S.chains + +theorem flatten_nodup (S : RawPathSystem G Q) : S.chains.flatten.Nodup := + List.nodup_flatten.mpr ⟨fun l hl => (S.paths l hl).1, S.disjoint⟩ + +@[simp] theorem normalize_amount (S : RawPathSystem G Q) : + S.normalize.amount = S.amount := by + classical + exact normalizeChains_amount S.chains S.paths S.disjoint S.endpoints S.no_clique_steps + +@[simp] theorem normalize_assignedCount (S : RawPathSystem G Q) : + S.normalize.assignedCount = S.assignedCount := + normalizeChains_assignedCount S.chains S.paths S.disjoint S.endpoints S.no_clique_steps + +end RawPathSystem + +namespace ExpandedPathSystem + +def toRaw (S : ExpandedPathSystem G Q) : RawPathSystem G Q where + chains := S.chains + paths := S.paths + disjoint := S.disjoint + endpoints := S.endpoints + no_clique_steps := S.no_clique_steps + +@[simp] theorem toRaw_amount (S : ExpandedPathSystem G Q) : S.toRaw.amount = S.amount := rfl + +@[simp] theorem toRaw_assignedCount (S : ExpandedPathSystem G Q) : + S.toRaw.assignedCount = S.assignedCount := S.assignedCount_eq_raw.symm + +end ExpandedPathSystem + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawPermutation.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawPermutation.lean new file mode 100644 index 0000000000000000000000000000000000000000..1e4dba1b7854bed841639190e5d11a9f7ba9077e --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawPermutation.lean @@ -0,0 +1,52 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawPathSystem + +namespace OAI + +/-! Reordering raw chains, used to bring two chosen chains to the front. -/ + +namespace CycleClique.Construction.RawPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +def reorder (S : RawPathSystem G Q) (C : List (List V)) (hp : C.Perm S.chains) : + RawPathSystem G Q where + chains := C + paths := fun l hl => S.paths l (hp.mem_iff.mp hl) + disjoint := (List.nodup_flatten.mp (hp.flatten.nodup_iff.mpr S.flatten_nodup)).2 + endpoints := fun l hl => S.endpoints l (hp.mem_iff.mp hl) + no_clique_steps := fun l hl => S.no_clique_steps l (hp.mem_iff.mp hl) + +@[simp] theorem reorder_vertices (S : RawPathSystem G Q) (C : List (List V)) + (hp : C.Perm S.chains) : (S.reorder C hp).vertices = S.vertices := by + ext v + simp only [vertices, reorder, List.mem_toFinset] + exact hp.flatten.mem_iff + +@[simp] theorem reorder_amount (S : RawPathSystem G Q) (C : List (List V)) + (hp : C.Perm S.chains) : (S.reorder C hp).amount = S.amount := by + unfold amount + rw [reorder_vertices] + +@[simp] theorem reorder_assignedCount (S : RawPathSystem G Q) (C : List (List V)) + (hp : C.Perm S.chains) : (S.reorder C hp).assignedCount = S.assignedCount := by + exact (hp.map (fun l => chainCliqueCount Q l - 1)).sum_eq + +theorem bring_two_front (S : RawPathSystem G Q) {l m : List V} + (hl : l ∈ S.chains) (hm : m ∈ S.chains) (hne : l ≠ m) : + ∃ R : List (List V), (l :: m :: R).Perm S.chains := by + have hm' : m ∈ S.chains.erase l := (List.mem_erase_of_ne hne.symm).mpr hm + exact ⟨(S.chains.erase l).erase m, + ((List.perm_cons_erase hm').cons l).symm.trans (List.perm_cons_erase hl).symm⟩ + +theorem disjoint_of_mem (S : RawPathSystem G Q) {l m : List V} + (hl : l ∈ S.chains) (hm : m ∈ S.chains) (hne : l ≠ m) : l.Disjoint m := by + obtain ⟨R, hp⟩ := S.bring_two_front hl hm hne + have hnd := hp.flatten.nodup_iff.mpr S.flatten_nodup + have hd := (List.nodup_flatten.mp hnd).2 + exact (List.pairwise_cons.mp hd).1 m (by simp) + +end CycleClique.Construction.RawPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawReplacement.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawReplacement.lean new file mode 100644 index 0000000000000000000000000000000000000000..15080acedc6b852f93d5a29a0046d73fb1a0861b --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawReplacement.lean @@ -0,0 +1,168 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawPathSystem + +namespace OAI + +/-! Cut two different chains before their representatives and reconnect +through a new outside path, retaining every old vertex. -/ + +namespace CycleClique.Construction.RawPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +theorem amount_union (S T : RawPathSystem G Q) {J : List V} + (hverts : T.vertices = S.vertices ∪ J.toFinset) + (hJ : J.Nodup) (hJQ : ∀ z ∈ J, z ∉ Q) + (hdis : J.Disjoint S.chains.flatten) : + T.amount = S.amount + J.length := by + classical + have hJdiff : J.toFinset \ Q = J.toFinset := by + apply Finset.sdiff_eq_self_iff_disjoint.mpr + apply Finset.disjoint_left.mpr + intro v hv hvQ + exact hJQ v (List.mem_toFinset.mp hv) hvQ + have hdisfin : Disjoint (S.vertices \ Q) J.toFinset := by + apply Finset.disjoint_left.mpr + intro v hv hvJ + exact List.disjoint_left.mp hdis (List.mem_toFinset.mp hvJ) + (List.mem_toFinset.mp (Finset.mem_sdiff.mp hv).1) + unfold amount + rw [hverts, Finset.union_sdiff_distrib, hJdiff, + Finset.card_union_of_disjoint hdisfin, List.toFinset_card_of_nodup hJ] + +theorem replace_different_chains (S : RawPathSystem G Q) + {P M R : List (List V)} {A B C D J : List V} {x y : V} + (hsys : S.chains = P ++ (A ++ x :: B) :: M ++ (C ++ y :: D) :: R) + (hA : ∀ v ∈ A.getLast?, v ∈ Q) (hC : ∀ v ∈ C.getLast?, v ∈ Q) + (hJ : J.Nodup) (hJQ : ∀ z ∈ J, z ∉ Q) (hJpos : J ≠ []) + (hdis : J.Disjoint S.chains.flatten) + (hpath : (x :: (J ++ [y])).IsChain G.Adj) : + ∃ T : RawPathSystem G Q, + T.chains = P ++ A :: M ++ C :: (B.reverse ++ x :: (J ++ y :: D)) :: R ∧ + T.amount = S.amount + J.length := by + classical + let merged := B.reverse ++ x :: (J ++ y :: D) + let K := P ++ A :: M ++ C :: merged :: R + have hold₁ : A ++ x :: B ∈ S.chains := by simp [hsys] + have hold₂ : C ++ y :: D ∈ S.chains := by simp [hsys] + have hremain : ∀ l, l ∈ P ∨ l ∈ M ∨ l ∈ R → l ∈ S.chains := by + intro l hl + simp only [hsys, List.mem_append, List.mem_cons] + tauto + have hp : K.flatten.Perm (S.chains.flatten ++ J) := by + apply List.perm_iff_count.mpr + intro v + simp only [K, merged, hsys, List.flatten_append, List.flatten_cons, + List.count_append, List.count_cons, List.count_reverse] + omega + have hflat : K.flatten.Nodup := hp.nodup_iff.mpr + (S.flatten_nodup.append hJ hdis.symm) + have hpaths₁ := List.isChain_append.mp (S.paths _ hold₁).2 + have hpaths₂ := List.isChain_append.mp (S.paths _ hold₂).2 + have hsteps₁ := List.isChain_append.mp (S.no_clique_steps _ hold₁) + have hsteps₂ := List.isChain_append.mp (S.no_clique_steps _ hold₂) + have hmerged : merged.IsChain G.Adj := + reverse_join_chain (fun _ _ h => h.symm) hpaths₁.2.1 hpaths₂.2.1 hpath + have hmergedSteps : merged.IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q)) := + reverse_join_chain (fun _ _ h h' => h h'.symm) hsteps₁.2.1 hsteps₂.2.1 + (chain_outside_interior_of_ne_nil hJpos hJQ) + have hmergedEq : merged = (x :: B).reverse ++ J ++ (y :: D) := by + simp [merged, List.append_assoc] + have hhead : merged.head? = (x :: B).getLast? := by + rw [hmergedEq, List.append_assoc, + List.head?_append_of_ne_nil _ (by simp), List.head?_reverse] + have hlast : merged.getLast? = (y :: D).getLast? := by + rw [hmergedEq] + have hyD := List.getLast?_eq_some_getLast (show y :: D ≠ [] by simp) + simp only [List.getLast?_append, hyD, Option.or] + let T : RawPathSystem G Q := { + chains := K + paths := by + intro l hl + refine ⟨(List.nodup_flatten.mp hflat).1 l hl, ?_⟩ + simp only [K, List.mem_append, List.mem_cons, or_assoc] at hl + rcases hl with hl | rfl | hl | rfl | rfl | hl + · exact (S.paths l (hremain l (Or.inl hl))).2 + · exact hpaths₁.1 + · exact (S.paths l (hremain l (Or.inr (Or.inl hl)))).2 + · exact hpaths₂.1 + · exact hmerged + · exact (S.paths l (hremain l (Or.inr (Or.inr hl)))).2 + disjoint := (List.nodup_flatten.mp hflat).2 + endpoints := by + intro l hl + simp only [K, List.mem_append, List.mem_cons, or_assoc] at hl + rcases hl with hl | rfl | hl | rfl | rfl | hl + · exact S.endpoints l (hremain l (Or.inl hl)) + · refine ⟨?_, hA⟩ + intro v hv + exact (S.endpoints _ hold₁).1 v (List.mem_head?_append_of_mem_head? hv) + · exact S.endpoints l (hremain l (Or.inr (Or.inl hl))) + · refine ⟨?_, hC⟩ + intro v hv + exact (S.endpoints _ hold₂).1 v (List.mem_head?_append_of_mem_head? hv) + · constructor + · intro v hv + rw [hhead] at hv + apply (S.endpoints _ hold₁).2 v + have hs := List.getLast?_eq_some_getLast (show x :: B ≠ [] by simp) + simpa only [List.getLast?_append, hs, Option.or] using hv + · intro v hv + rw [hlast] at hv + apply (S.endpoints _ hold₂).2 v + have hs := List.getLast?_eq_some_getLast (show y :: D ≠ [] by simp) + simpa only [List.getLast?_append, hs, Option.or] using hv + · exact S.endpoints l (hremain l (Or.inr (Or.inr hl))) + no_clique_steps := by + intro l hl + simp only [K, List.mem_append, List.mem_cons, or_assoc] at hl + rcases hl with hl | rfl | hl | rfl | rfl | hl + · exact S.no_clique_steps l (hremain l (Or.inl hl)) + · exact hsteps₁.1 + · exact S.no_clique_steps l (hremain l (Or.inr (Or.inl hl))) + · exact hsteps₂.1 + · exact hmergedSteps + · exact S.no_clique_steps l (hremain l (Or.inr (Or.inr hl))) } + refine ⟨T, rfl, amount_union S T ?_ hJ hJQ hdis⟩ + ext v + change v ∈ K.flatten.toFinset ↔ v ∈ S.chains.flatten.toFinset ∪ J.toFinset + simp only [List.mem_toFinset, Finset.mem_union, ← List.mem_append] + exact hp.mem_iff + +theorem different_chain_count {P M R : List (List V)} {A B C D J : List V} {x y : V} + (hA : ∀ v ∈ A.getLast?, v ∈ Q) (hC : ∀ v ∈ C.getLast?, v ∈ Q) + (hB : ∀ v ∈ (x :: B).getLast?, v ∈ Q) + (hD : ∀ v ∈ (y :: D).getLast?, v ∈ Q) + (hJQ : ∀ z ∈ J, z ∉ Q) : + rawAssignedCount Q (P ++ A :: M ++ C :: (B.reverse ++ x :: (J ++ y :: D)) :: R) + + (if A = [] then 0 else 1) + (if C = [] then 0 else 1) = + rawAssignedCount Q (P ++ (A ++ x :: B) :: M ++ (C ++ y :: D) :: R) + 1 := by + have hBpos := chainCliqueCount_pos_last (show x :: B ≠ [] by simp) hB + have hDpos := chainCliqueCount_pos_last (show y :: D ≠ [] by simp) hD + have hJzero := chainCliqueCount_eq_zero hJQ + have heq : B.reverse ++ x :: (J ++ y :: D) = + (x :: B).reverse ++ J ++ (y :: D) := by simp [List.append_assoc] + rw [heq] + simp only [rawAssignedCount, List.map_append, List.map_cons, List.sum_append, + List.sum_cons, chainCliqueCount_append, chainCliqueCount_reverse, hJzero, + Nat.add_zero] + have hnil : chainCliqueCount Q ([] : List V) = 0 := rfl + by_cases ha : A = [] + · by_cases hc : C = [] + · simp only [ha, hc, ↓reduceIte, hnil] + omega + · have hCpos := chainCliqueCount_pos_last hc hC + simp only [ha, hc, ↓reduceIte, hnil] + omega + · have hApos := chainCliqueCount_pos_last ha hA + by_cases hc : C = [] + · simp only [ha, hc, ↓reduceIte, hnil] + omega + · have hCpos := chainCliqueCount_pos_last hc hC + simp only [ha, hc, ↓reduceIte] + omega + +end CycleClique.Construction.RawPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawReplacementProfiles.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawReplacementProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..8ee11be121b0c4290d3eafdecf777869836e480b --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawReplacementProfiles.lean @@ -0,0 +1,129 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ReplacementProfiles +import OAI.Combinatorics.Ramsey.CycleClique.Construction.SameChainReplacement + +namespace OAI + +/-! Assigned-amount bookkeeping for the two actual representative surgeries. -/ + +namespace CycleClique.Construction.RawPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +theorem exists_subchain_profile (S : RawPathSystem G Q) (C : List (List V)) + (hC : ∀ l ∈ C, l ∈ S.chains) : + ∃ w, SystemAssignedAmounts Q C w := by + obtain ⟨P, hP⟩ := exists_chain_profiles C + (fun l hl => S.endpoints l (hC l hl)) + (fun l hl => S.no_clique_steps l (hC l hl)) + exact ⟨P.flatten, SystemAssignedAmounts.of_profiles hP⟩ + +theorem replacement_profiles_different (S T : RawPathSystem G Q) + {P M R : List (List V)} {A B C D J : List V} {x y : V} + (hsys : S.chains = P ++ (A ++ x :: B) :: M ++ (C ++ y :: D) :: R) + (htsys : T.chains = P ++ A :: M ++ C :: (B.reverse ++ x :: (J ++ y :: D)) :: R) + (hA : ∀ v ∈ A.getLast?, v ∈ Q) (hC : ∀ v ∈ C.getLast?, v ∈ Q) + (hJ : ∀ z ∈ J, z ∉ Q) (hJne : J ≠ []) : + ∃ original output kept removed : List ℕ, + SystemAssignedAmounts Q S.chains original ∧ + SystemAssignedAmounts Q T.chains output ∧ + original.Perm (kept ++ removed) ∧ + output.Perm ((J.length + removed.sum) :: kept) := by + have hmem₁ : A ++ x :: B ∈ S.chains := by simp [hsys] + have hmem₂ : C ++ y :: D ∈ S.chains := by simp [hsys] + obtain ⟨X⟩ := exists_assigned_cut_profile (S.endpoints _ hmem₁) + (S.no_clique_steps _ hmem₁) hA + obtain ⟨Y⟩ := exists_assigned_cut_profile (S.endpoints _ hmem₂) + (S.no_clique_steps _ hmem₂) hC + have hremain : ∀ l, l ∈ P ∨ l ∈ M ∨ l ∈ R → l ∈ S.chains := by + intro l hl + simp only [hsys, List.mem_append, List.mem_cons] + tauto + obtain ⟨wp, hp⟩ := S.exists_subchain_profile P (fun l hl => hremain l (Or.inl hl)) + obtain ⟨wm, hm⟩ := S.exists_subchain_profile M (fun l hl => hremain l (Or.inr (Or.inl hl))) + obtain ⟨wr, hr⟩ := S.exists_subchain_profile R (fun l hl => hremain l (Or.inr (Or.inr hl))) + obtain ⟨original, output, kept, removed, ho, ht, hop, htp⟩ := + different_chain_profiles X Y hp hm hr hJ hJne + exact ⟨original, output, kept, removed, hsys.symm ▸ ho, htsys.symm ▸ ht, hop, htp⟩ + +theorem replacement_profiles_same (S T : RawPathSystem G Q) + {P R : List (List V)} {A B D J : List V} {x y : V} + (hsys : S.chains = P ++ (A ++ (x :: B) ++ y :: D) :: R) + (htsys : T.chains = P ++ A :: (B.reverse ++ x :: (J ++ y :: D)) :: R) + (hA : ∀ v ∈ A.getLast?, v ∈ Q) (hB : ∀ v ∈ (x :: B).getLast?, v ∈ Q) + (hJ : ∀ z ∈ J, z ∉ Q) (hJne : J ≠ []) : + ∃ original output kept removed : List ℕ, + SystemAssignedAmounts Q S.chains original ∧ + SystemAssignedAmounts Q T.chains output ∧ + original.Perm (kept ++ removed) ∧ + output.Perm ((J.length + removed.sum) :: kept) := by + have hmem : A ++ (x :: B) ++ y :: D ∈ S.chains := by simp [hsys] + have hprefixEnd : ∀ v ∈ (A ++ x :: B).getLast?, v ∈ Q := by + intro v hv + apply hB v + have he := List.getLast?_eq_some_getLast (show x :: B ≠ [] by simp) + simpa only [List.getLast?_append, he, Option.or] using hv + have hprefixEnds : (∀ v ∈ (A ++ x :: B).head?, v ∈ Q) ∧ + (∀ v ∈ (A ++ x :: B).getLast?, v ∈ Q) := by + refine ⟨?_, hprefixEnd⟩ + intro v hv + exact (S.endpoints _ hmem).1 v (List.mem_head?_append_of_mem_head? hv) + have hprefixSteps : (A ++ x :: B).IsChain (fun u v => ¬ (u ∈ Q ∧ v ∈ Q)) := + (List.isChain_append.mp (S.no_clique_steps _ hmem)).1 + obtain ⟨X⟩ := exists_assigned_cut_profile hprefixEnds hprefixSteps hA + obtain ⟨Y⟩ := exists_assigned_cut_profile (S.endpoints _ hmem) + (S.no_clique_steps _ hmem) hprefixEnd + have hremain : ∀ l, l ∈ P ∨ l ∈ R → l ∈ S.chains := by + intro l hl + simp only [hsys, List.mem_append, List.mem_cons] + tauto + obtain ⟨wp, hp⟩ := S.exists_subchain_profile P (fun l hl => hremain l (Or.inl hl)) + obtain ⟨wr, hr⟩ := S.exists_subchain_profile R (fun l hl => hremain l (Or.inr hl)) + obtain ⟨original, output, kept, removed, ho, ht, hop, htp⟩ := + same_chain_profiles X Y hp hr hJ hJne + exact ⟨original, output, kept, removed, hsys.symm ▸ ho, htsys.symm ▸ ht, hop, htp⟩ + + +theorem replace_different_chains_profiled (S : RawPathSystem G Q) + {P M R : List (List V)} {A B C D J : List V} {x y : V} + (hsys : S.chains = P ++ (A ++ x :: B) :: M ++ (C ++ y :: D) :: R) + (hA : ∀ v ∈ A.getLast?, v ∈ Q) (hC : ∀ v ∈ C.getLast?, v ∈ Q) + (hJ : J.Nodup) (hJQ : ∀ z ∈ J, z ∉ Q) (hJpos : J ≠ []) + (hdis : J.Disjoint S.chains.flatten) + (hpath : (x :: (J ++ [y])).IsChain G.Adj) : + ∃ T : RawPathSystem G Q, ∃ original output kept removed : List ℕ, + T.chains = P ++ A :: M ++ C :: (B.reverse ++ x :: (J ++ y :: D)) :: R ∧ + T.amount = S.amount + J.length ∧ + SystemAssignedAmounts Q S.chains original ∧ + SystemAssignedAmounts Q T.chains output ∧ + original.Perm (kept ++ removed) ∧ + output.Perm ((J.length + removed.sum) :: kept) := by + obtain ⟨T, hT, hTa⟩ := S.replace_different_chains hsys hA hC hJ hJQ hJpos hdis hpath + obtain ⟨original, output, kept, removed, ho, ht, hp, hq⟩ := + S.replacement_profiles_different T hsys hT hA hC hJQ hJpos + exact ⟨T, original, output, kept, removed, hT, hTa, ho, ht, hp, hq⟩ + +theorem replace_same_chain_profiled (S : RawPathSystem G Q) + {P R : List (List V)} {A B D J : List V} {x y : V} + (hsys : S.chains = P ++ (A ++ (x :: B) ++ y :: D) :: R) + (hA : ∀ v ∈ A.getLast?, v ∈ Q) + (hB : ∀ v ∈ (x :: B).getLast?, v ∈ Q) + (hJ : J.Nodup) (hJQ : ∀ z ∈ J, z ∉ Q) (hJpos : J ≠ []) + (hdis : J.Disjoint S.chains.flatten) + (hpath : (x :: (J ++ [y])).IsChain G.Adj) : + ∃ T : RawPathSystem G Q, ∃ original output kept removed : List ℕ, + T.chains = P ++ A :: (B.reverse ++ x :: (J ++ y :: D)) :: R ∧ + T.amount = S.amount + J.length ∧ + SystemAssignedAmounts Q S.chains original ∧ + SystemAssignedAmounts Q T.chains output ∧ + original.Perm (kept ++ removed) ∧ + output.Perm ((J.length + removed.sum) :: kept) := by + obtain ⟨T, hT, hTa⟩ := S.replace_same_chain hsys hA hB hJ hJQ hJpos hdis hpath + obtain ⟨original, output, kept, removed, ho, ht, hp, hq⟩ := + S.replacement_profiles_same T hsys hT hA hB hJQ hJpos + exact ⟨T, original, output, kept, removed, hT, hTa, ho, ht, hp, hq⟩ + +end CycleClique.Construction.RawPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawRestrict.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawRestrict.lean new file mode 100644 index 0000000000000000000000000000000000000000..f346d471e690a958f93d138ebcdf2514525d6965 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawRestrict.lean @@ -0,0 +1,21 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawReplacementProfiles + +namespace OAI + +/-! Restrict a raw system to any sublist of its components. -/ + +namespace CycleClique.Construction.RawPathSystem + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +def restrictChains (S : RawPathSystem G Q) (C : List (List V)) (hC : C.Sublist S.chains) : + RawPathSystem G Q where + chains := C + paths := fun l hl => S.paths l (hC.subset hl) + disjoint := S.disjoint.sublist hC + endpoints := fun l hl => S.endpoints l (hC.subset hl) + no_clique_steps := fun l hl => S.no_clique_steps l (hC.subset hl) + +end CycleClique.Construction.RawPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawReverse.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawReverse.lean new file mode 100644 index 0000000000000000000000000000000000000000..17f16749346f452d6ed70e9851cdbf657bfe9dea --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RawReverse.lean @@ -0,0 +1,103 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RepresentativeOutside + +namespace OAI + +/-! Reverse every oriented chain, retaining the same raw system vertices +and amount. Singleton chains are unaffected. -/ + +namespace CycleClique.Construction.RawPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +theorem reverse_flatten_perm (C : List (List V)) : + (C.map List.reverse).flatten.Perm C.flatten := by + induction C with + | nil => exact .refl _ + | cons l C ih => + simpa using (List.reverse_perm l).append ih + +def reverseChains (S : RawPathSystem G Q) : RawPathSystem G Q where + chains := S.chains.map List.reverse + paths := by + intro l hl + obtain ⟨r, hr, rfl⟩ := List.mem_map.mp hl + refine ⟨List.nodup_reverse.mpr (S.paths r hr).1, List.isChain_reverse.mpr ?_⟩ + apply (S.paths r hr).2.imp + intro a b h + exact h.symm + disjoint := (List.nodup_flatten.mp + ((reverse_flatten_perm S.chains).nodup_iff.mpr S.flatten_nodup)).2 + endpoints := by + intro l hl + obtain ⟨r, hr, rfl⟩ := List.mem_map.mp hl + simpa only [List.head?_reverse, List.getLast?_reverse] using (S.endpoints r hr).symm + no_clique_steps := by + intro l hl + obtain ⟨r, hr, rfl⟩ := List.mem_map.mp hl + apply List.isChain_reverse.mpr + apply (S.no_clique_steps r hr).imp + intro a b h hab + exact h hab.symm + +@[simp] theorem reverseChains_vertices (S : RawPathSystem G Q) : + S.reverseChains.vertices = S.vertices := by + ext v + simp only [vertices, reverseChains, List.mem_toFinset] + exact (reverse_flatten_perm S.chains).mem_iff + +@[simp] theorem reverseChains_amount (S : RawPathSystem G Q) : + S.reverseChains.amount = S.amount := by + unfold amount + rw [reverseChains_vertices] + +theorem chain_head_representative (S : RawPathSystem G Q) {l : List V} (hl : l ∈ S.chains) + {x : V} (hx : x ∈ l.head?) : x ∈ S.representatives := by + apply List.mem_flatten.mpr + refine ⟨chainRepresentatives Q l, List.mem_map.mpr ⟨l, hl, rfl⟩, ?_⟩ + cases l with + | nil => simp at hx + | cons a l => + have he : a = x := by simpa using hx + simp [chainRepresentatives, he] + +theorem reversed_terminal_representative (S : RawPathSystem G Q) + {l : List V} (hl : l ∈ S.chains) {x : V} (hx : x ∈ l.getLast?) : + x ∈ S.reverseChains.representatives := by + apply chain_head_representative S.reverseChains + (List.mem_map.mpr ⟨l, hl, rfl⟩ : l.reverse ∈ S.reverseChains.chains) + simpa only [List.head?_reverse] using hx + +theorem completed_unused_representative (S : ExpandedPathSystem G Q) {x : V} + (hxQ : x ∈ Q) (hxS : x ∉ S.vertices) : + x ∈ S.toRaw.completeClique.representatives ∧ + x ∈ S.toRaw.completeClique.reverseChains.representatives := by + have hmem : [x] ∈ S.toRaw.completeClique.chains := by + change [x] ∈ S.chains ++ (Q \ S.toRaw.vertices).toList.map (fun v => [v]) + apply List.mem_append_right + apply List.mem_map.mpr + exact ⟨x, Finset.mem_toList.mpr (Finset.mem_sdiff.mpr ⟨hxQ, hxS⟩), rfl⟩ + exact ⟨chain_head_representative _ hmem (by simp), reversed_terminal_representative _ hmem (by simp)⟩ + +end CycleClique.Construction.RawPathSystem + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type*} {Q : Finset V} + +theorem chainRepresentatives_clique_mem_head {l : List V} {x : V} + (hsteps : l.IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q))) + (hx : x ∈ chainRepresentatives Q l) (hxQ : x ∈ Q) : x ∈ l.head? := by + cases l with + | nil => simp [chainRepresentatives] at hx + | cons a l => + simp only [chainRepresentatives, List.mem_cons] at hx + rcases hx with rfl | hx + · simp + · exact False.elim (representativesFrom_outside hsteps x hx hxQ) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Reduction.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Reduction.lean new file mode 100644 index 0000000000000000000000000000000000000000..051fda1f1bb942f94677372cce6eda60cd24bf62 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Reduction.lean @@ -0,0 +1,140 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Definitions + +namespace OAI + +/-! +# Minimal-counterexample deletion and expansion + +The argument is Section 2 of *Cycle--clique Ramsey numbers*. The hypothesis +on smaller independence parameters is an induction hypothesis, not a new +published input and not a substitute for the upper-bound theorem. +-/ + +namespace CycleClique.Construction +variable {V : Type*} [Fintype V] + +/-- Every independent set has at most `a` vertices. -/ +def IndependenceBound (G : SimpleGraph V) (a : ℕ) : Prop := + ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.card ≤ a + +/-- The union of an independent set and all of its neighbours. -/ +noncomputable def closedNeighborhood (G : SimpleGraph V) (I : Finset V) : Finset V := by + classical + exact Finset.univ.filter fun v => v ∈ I ∨ ∃ i ∈ I, G.Adj i v + +@[simp] theorem mem_closedNeighborhood {G : SimpleGraph V} {I : Finset V} {v : V} : + v ∈ closedNeighborhood G I ↔ v ∈ I ∨ ∃ i ∈ I, G.Adj i v := by + classical + simp [closedNeighborhood] + +theorem subset_closedNeighborhood (G : SimpleGraph V) (I : Finset V) : + I ⊆ closedNeighborhood G I := by + intro v hv + exact mem_closedNeighborhood.mpr (Or.inl hv) + +omit [Fintype V] in +theorem independenceBound_iff_not_hasIndependent {G : SimpleGraph V} {a : ℕ} : + IndependenceBound G a ↔ ¬ HasIndependent G (a + 1) := by + classical + constructor + · intro h ⟨f, hf, he⟩ + let I := Finset.univ.image f + have hI : G.IsIndepSet (I : Set V) := by + intro x hx y hy _ + obtain ⟨i, _, rfl⟩ := Finset.mem_image.mp hx + obtain ⟨j, _, rfl⟩ := Finset.mem_image.mp hy + exact he i j + have hcard : I.card = a + 1 := by + simp [I, Finset.card_image_of_injective _ hf] + have := h I hI + omega + · intro h I hI + by_contra hn + obtain ⟨J, hJI, hJ⟩ := Finset.exists_subset_card_eq (show a + 1 ≤ I.card by omega) + let e : Fin (a + 1) ≃ J := (Finset.equivFinOfCardEq hJ).symm + apply h + refine ⟨fun i => (e i).val, Subtype.val_injective.comp e.injective, ?_⟩ + intro i j hij + have hne : (e i).val ≠ (e j).val := G.ne_of_adj hij + exact hI (hJI (e i).property) (hJI (e j).property) hne hij + +/-- The part of an independent set outside its closed neighbourhood is +anticomplete to it, so independent sets in the remainder can be adjoined. -/ +theorem independent_union_outside [DecidableEq V] {G : SimpleGraph V} {I J : Finset V} + (hI : G.IsIndepSet (I : Set V)) (hJ : G.IsIndepSet (J : Set V)) + (hout : ∀ v ∈ J, v ∉ closedNeighborhood G I) : + G.IsIndepSet ((I ∪ J : Finset V) : Set V) := by + classical + intro x hx y hy hxy + rcases Finset.mem_union.mp hx with hx | hx <;> + rcases Finset.mem_union.mp hy with hy | hy + · exact hI hx hy hxy + · intro hadj + exact hout y hy (mem_closedNeighborhood.mpr (Or.inr ⟨x, hx, hadj⟩)) + · intro hadj + exact hout x hx (mem_closedNeighborhood.mpr (Or.inr ⟨y, hy, hadj.symm⟩)) + · exact hJ hx hy hxy + +theorem independent_outside_bound {G : SimpleGraph V} {a : ℕ} + (hG : IndependenceBound G a) {I : Finset V} + (hI : G.IsIndepSet (I : Set V)) : + IndependenceBound (G.induce {v | v ∉ closedNeighborhood G I}) (a - I.card) := by + classical + intro J hJ + let J' : Finset V := J.map ⟨Subtype.val, Subtype.val_injective⟩ + have hJ' : G.IsIndepSet (J' : Set V) := by + intro x hx y hy hxy + obtain ⟨x', hx', rfl⟩ := Finset.mem_map.mp hx + obtain ⟨y', hy', rfl⟩ := Finset.mem_map.mp hy + exact hJ hx' hy' (fun he => hxy (congrArg Subtype.val he)) + have hout : ∀ v ∈ J', v ∉ closedNeighborhood G I := by + intro v hv + obtain ⟨v', _, rfl⟩ := Finset.mem_map.mp hv + exact v'.property + have hdis : Disjoint I J' := by + apply Finset.disjoint_left.mpr + intro v hvI hvJ + exact hout v hvJ (subset_closedNeighborhood G I hvI) + have hbound := hG (I ∪ J') (independent_union_outside hI hJ' hout) + rw [Finset.card_union_of_disjoint hdis, Finset.card_map] at hbound + omega + +/-- Independent-set expansion from the smaller-parameter extremal bounds. +This is manuscript Lemma `red:expansion`, with its minimality premise explicit. -/ +theorem minimal_counterexample_expansion {G : SimpleGraph V} {k a : ℕ} + (hcard : Fintype.card V = k * a + 1) + (hcycle : ¬ HasCycle G (k + 1)) (hbound : IndependenceBound G a) + (hsmall : ∀ (b : ℕ), b < a → + ∀ (Y : Finset V), + ¬ HasCycle (G.induce (Y : Set V)) (k + 1) → + IndependenceBound (G.induce (Y : Set V)) b → Y.card ≤ k * b) + (I : Finset V) (hI : G.IsIndepSet (I : Set V)) (hne : I.Nonempty) : + k * I.card + 1 ≤ (closedNeighborhood G I).card := by + classical + let Y := Finset.univ \ closedNeighborhood G I + have hY : (Y : Set V) = {v | v ∉ closedNeighborhood G I} := by + ext v + simp [Y] + have hb : a - I.card < a := by + have := hbound I hI + have := Finset.card_pos.mpr hne + omega + have hcyY : ¬ HasCycle (G.induce (Y : Set V)) (k + 1) := by + intro h + exact hcycle (h.map Subtype.val Subtype.val_injective (fun h => h)) + have hindY : IndependenceBound (G.induce (Y : Set V)) (a - I.card) := by + rw [hY] + exact independent_outside_bound hbound hI + have hs := hsmall (a - I.card) hb Y hcyY hindY + have hsum : Y.card + (closedNeighborhood G I).card = k * a + 1 := by + have h := Finset.card_sdiff_add_card_eq_card + (Finset.subset_univ (closedNeighborhood G I)) + simpa [Y, hcard] using h + have hi := hbound I hI + have hmul : k * a = k * (a - I.card) + k * I.card := by + rw [← Nat.mul_add, Nat.sub_add_cancel hi] + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ReplacementOptimality.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ReplacementOptimality.lean new file mode 100644 index 0000000000000000000000000000000000000000..b4d32983e48e064b79d2391487eac977210fc962 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ReplacementOptimality.lean @@ -0,0 +1,65 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.SameChainReplacement +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawCliqueCompletion +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OptimalPathSystem +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OutsidePathRules + +namespace OAI + +/-! One-vertex representative exclusions from the concrete chain surgery. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} {S : ExpandedPathSystem G Q} + +theorem IsOptimal.no_one_vertex_raw {k : ℕ} (hopt : S.IsOptimal k) + (hk : 3 ≤ k) (hQk : Q.card ≤ k) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (T : RawPathSystem G Q) + (hinc : T.amount = S.amount + 1) : False := + hopt.no_one_vertex_increase hk hQk hQ hcycle T.normalize (by simpa using hinc) + +theorem IsOptimal.forbidden_different_chain_one {k : ℕ} (hopt : S.IsOptimal k) + (hk : 3 ≤ k) (hQk : Q.card ≤ k) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (U : RawPathSystem G Q) + (hUamount : U.amount = S.amount) + (hUvertices : ∀ v ∈ U.vertices, v ∈ Q ∨ v ∈ S.vertices) + {P M R : List (List V)} {A B C D : List V} {x y : V} + (hsys : U.chains = P ++ (A ++ x :: B) :: M ++ (C ++ y :: D) :: R) + (hA : ∀ v ∈ A.getLast?, v ∈ Q) (hC : ∀ v ∈ C.getLast?, v ∈ Q) : + ¬ OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) x y 1 := by + intro h + obtain ⟨J, hJ, hJlen, hJout, hpath⟩ := h.interior + have hJQ : ∀ z ∈ J, z ∉ Q := fun z hz hzQ => hJout z hz (Or.inl hzQ) + have hpos : J ≠ [] := by intro he; simp [he] at hJlen + have hdis : J.Disjoint U.chains.flatten := by + apply List.disjoint_left.mpr + intro z hz hzU + exact hJout z hz (hUvertices z (List.mem_toFinset.mpr hzU)) + obtain ⟨T, _, hamount⟩ := U.replace_different_chains hsys hA hC hJ hJQ hpos hdis hpath + exact hopt.no_one_vertex_raw hk hQk hQ hcycle T (by omega) + +theorem IsOptimal.forbidden_same_chain_one {k : ℕ} (hopt : S.IsOptimal k) + (hk : 3 ≤ k) (hQk : Q.card ≤ k) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (U : RawPathSystem G Q) + (hUamount : U.amount = S.amount) + (hUvertices : ∀ v ∈ U.vertices, v ∈ Q ∨ v ∈ S.vertices) + {P R : List (List V)} {A B D : List V} {x y : V} + (hsys : U.chains = P ++ (A ++ (x :: B) ++ y :: D) :: R) + (hA : ∀ v ∈ A.getLast?, v ∈ Q) + (hB : ∀ v ∈ (x :: B).getLast?, v ∈ Q) : + ¬ OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) x y 1 := by + intro h + obtain ⟨J, hJ, hJlen, hJout, hpath⟩ := h.interior + have hJQ : ∀ z ∈ J, z ∉ Q := fun z hz hzQ => hJout z hz (Or.inl hzQ) + have hpos : J ≠ [] := by intro he; simp [he] at hJlen + have hdis : J.Disjoint U.chains.flatten := by + apply List.disjoint_left.mpr + intro z hz hzU + exact hJout z hz (hUvertices z (List.mem_toFinset.mpr hzU)) + obtain ⟨T, _, hamount⟩ := U.replace_same_chain hsys hA hB hJ hJQ hpos hdis hpath + exact hopt.no_one_vertex_raw hk hQk hQ hcycle T (by omega) + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ReplacementProfiles.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ReplacementProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..47665cda12d3ff53d5fa69caab29bb36fde457d0 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ReplacementProfiles.lean @@ -0,0 +1,124 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.AssignedCutProfile + +namespace OAI + +/-! A representative replacement preserves all assigned amounts except +for the paths absorbed into its one new assigned path. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type*} {Q : Finset V} + +namespace AssignedCutProfile + +theorem reassemble {A B : List V} {x : V} (X : AssignedCutProfile Q A x B) + (hA : A ≠ []) {w : List ℕ} (h : AssignedAmounts Q A w) : + AssignedAmounts Q (A ++ x :: B) (w ++ X.removed ++ X.after) := by + rw [X.tail_eq, X.removed_eq] + simpa [hA, List.append_assoc] using + h.append_segment hA X.outside (X.lead_nonempty hA) X.after_profile + +theorem merged {A B C D J : List V} {x y : V} + (X : AssignedCutProfile Q A x B) (Y : AssignedCutProfile Q C y D) + (hJ : ∀ z ∈ J, z ∉ Q) (hJne : J ≠ []) : + AssignedAmounts Q (B.reverse ++ x :: (J ++ y :: D)) + (X.after.reverse ++ (J.length + (X.removed ++ Y.removed).sum) :: Y.after) := by + let K := X.lead.reverse ++ J ++ Y.lead + have hK : ∀ z ∈ K, z ∉ Q := by + intro z hz + simp only [K, List.mem_append, List.mem_reverse] at hz + rcases hz with (hz | hz) | hz + · exact X.outside z hz + · exact hJ z hz + · exact Y.outside z hz + have hKne : K ≠ [] := by + intro he + have hn := congrArg List.length he + simp only [K, List.length_append, List.length_reverse, List.length_nil] at hn + have hpos := List.length_pos_iff.mpr hJne + omega + have hlen : K.length = J.length + (X.removed ++ Y.removed).sum := by + simp only [K, List.length_append, List.length_reverse, List.sum_append, + X.removed_sum, Y.removed_sum] + omega + have hh := X.after_profile.reverse.append_segment + (by simp) hK hKne Y.after_profile + have heq : B.reverse ++ x :: (J ++ y :: D) = + (X.endpoint :: X.rest).reverse ++ K ++ Y.endpoint :: Y.rest := by + have h0 : B.reverse ++ x :: (J ++ y :: D) = (x :: B).reverse ++ J ++ (y :: D) := by + simp [List.append_assoc] + rw [h0, X.tail_eq, Y.tail_eq] + simp [K, List.reverse_append, List.append_assoc] + rw [heq] + simpa only [hlen] using hh + +end AssignedCutProfile + +theorem different_chain_profiles + {P M R : List (List V)} {A B C D J : List V} {x y : V} + (X : AssignedCutProfile Q A x B) (Y : AssignedCutProfile Q C y D) + {wp wm wr : List ℕ} (hP : SystemAssignedAmounts Q P wp) + (hM : SystemAssignedAmounts Q M wm) (hR : SystemAssignedAmounts Q R wr) + (hJ : ∀ z ∈ J, z ∉ Q) (hJne : J ≠ []) : + ∃ original output kept removed : List ℕ, + SystemAssignedAmounts Q (P ++ (A ++ x :: B) :: M ++ (C ++ y :: D) :: R) original ∧ + SystemAssignedAmounts Q (P ++ A :: M ++ C :: (B.reverse ++ x :: (J ++ y :: D)) :: R) output ∧ + original.Perm (kept ++ removed) ∧ + output.Perm ((J.length + removed.sum) :: kept) := by + let kept := wp ++ X.before ++ X.after ++ wm ++ Y.before ++ Y.after ++ wr + let removed := X.removed ++ Y.removed + let original := wp ++ (X.before ++ X.removed ++ X.after) ++ wm ++ + (Y.before ++ Y.removed ++ Y.after) ++ wr + let output := wp ++ X.before ++ wm ++ Y.before ++ X.after.reverse ++ + (J.length + removed.sum) :: (Y.after ++ wr) + refine ⟨original, output, kept, removed, ?_, ?_, ?_, ?_⟩ + · simpa only [original, List.append_assoc] using + hP.append ((SystemAssignedAmounts.cons X.full_profile hM).append + (.cons Y.full_profile hR)) + · simpa only [output, removed, List.append_assoc, List.cons_append] using + hP.append ((SystemAssignedAmounts.cons X.before_profile hM).append + (.cons Y.before_profile (.cons (X.merged Y hJ hJne) hR))) + · apply List.perm_iff_count.mpr + intro a + simp only [original, kept, removed, List.count_append] + omega + · apply List.perm_iff_count.mpr + intro a + simp only [output, kept, List.count_append, List.count_cons, List.count_reverse] + omega + +theorem same_chain_profiles + {P R : List (List V)} {A B D J : List V} {x y : V} + (X : AssignedCutProfile Q A x B) + (Y : AssignedCutProfile Q (A ++ x :: B) y D) + {wp wr : List ℕ} (hP : SystemAssignedAmounts Q P wp) + (hR : SystemAssignedAmounts Q R wr) + (hJ : ∀ z ∈ J, z ∉ Q) (hJne : J ≠ []) : + ∃ original output kept removed : List ℕ, + SystemAssignedAmounts Q (P ++ (A ++ (x :: B) ++ y :: D) :: R) original ∧ + SystemAssignedAmounts Q (P ++ A :: (B.reverse ++ x :: (J ++ y :: D)) :: R) output ∧ + original.Perm (kept ++ removed) ∧ + output.Perm ((J.length + removed.sum) :: kept) := by + let kept := wp ++ X.before ++ X.after ++ Y.after ++ wr + let removed := X.removed ++ Y.removed + let original := wp ++ (X.before ++ X.removed ++ X.after ++ Y.removed ++ Y.after) ++ wr + let output := wp ++ X.before ++ X.after.reverse ++ + (J.length + removed.sum) :: (Y.after ++ wr) + refine ⟨original, output, kept, removed, ?_, ?_, ?_, ?_⟩ + · have hh := Y.reassemble (by simp) X.full_profile + simpa only [original, List.append_assoc] using hP.append (.cons hh hR) + · simpa only [output, removed, List.append_assoc, List.cons_append] using + hP.append (.cons X.before_profile (.cons (X.merged Y hJ hJne) hR)) + · apply List.perm_iff_count.mpr + intro a + simp only [original, kept, removed, List.count_append] + omega + · apply List.perm_iff_count.mpr + intro a + simp only [output, kept, List.count_append, List.count_cons, List.count_reverse] + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeBallGrowth.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeBallGrowth.lean new file mode 100644 index 0000000000000000000000000000000000000000..3578835ef830b340611430530a2cd9dc993439e4 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeBallGrowth.lean @@ -0,0 +1,115 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RepresentativeExclusion +import OAI.Combinatorics.Ramsey.CycleClique.Construction.BallWeights +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PackingOptions + +namespace OAI + +/-! The first and second representative-ball bounds of grow:degree and +grow:weights, with explicit forbidden-path premises. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type} [Fintype V] {G : SimpleGraph V} {X R : Finset V} {x : V} {k : ℕ} + +theorem representative_ball_one (hxR : x ∈ R) (hRX : R ⊆ X) (hXk : X.card ≤ k) + (hexpand : ∀ v, k + 1 ≤ (closedNeighborhood G {v}).card) + (hforbid : ∀ y ∈ R, x ≠ y → ¬ OutsidePath G (X : Set V) x y 1) : + k + R.card ≤ (outsideBallFinset G X x 1).card + X.card := by + have hxX := hRX hxR + have hzero := outsideBall_initial_growth (A := ∅) hxX (by simp) (by simp) + (by simp) (hexpand x) + simp only [Finset.card_empty, Nat.add_zero] at hzero + have hnonempty : (outsideBallFinset G X x 0).Nonempty := by + apply Finset.card_pos.mp + omega + obtain ⟨u, hu⟩ := hnonempty + let A := R.erase x + have hAX : A ⊆ X := fun _ hv => hRX (Finset.mem_of_mem_erase hv) + have hxA : x ∉ A := by simp [A] + have hf : ∀ y ∈ A, ∀ d, 1 ≤ d → d ≤ 0 + 1 → + ¬ PositiveOutsidePath G (X : Set V) x y d := by + intro y hy d hd hdb hp + have he : d = 1 := by omega + subst d + exact hforbid y (Finset.mem_of_mem_erase hy) + (Finset.ne_of_mem_erase hy).symm hp.toOutside + have hI : ({u} : Finset V) ⊆ outsideBallFinset G X x 0 := by simpa using hu + have havoid := closedNeighborhood_avoids_forbidden hxX hAX hxA hI hf + have hg := outsideBall_growth hAX hI havoid (by simpa using hexpand u) + have hc : A.card + 1 = R.card := Finset.card_erase_add_one hxR + simp only [Finset.card_singleton, Nat.mul_one, Nat.reduceAdd] at hg + omega + +theorem representative_ball_two_pair (hxR : x ∈ R) (hRX : R ⊆ X) (hXk : X.card ≤ k) + (hclique : G.cliqueNum ≤ R.card) + (hexpand : ∀ v, k + 1 ≤ (closedNeighborhood G {v}).card) + (hforbid : ∀ y ∈ R, x ≠ y → ∀ d, 1 ≤ d → d ≤ 2 → + ¬ OutsidePath G (X : Set V) x y d) : + HasIndependent (G.induce (outsideBallFinset G X x 2 : Set V)) 2 := by + have hfirst := representative_ball_one hxR hRX hXk hexpand + (fun y hy hne => hforbid y hy hne 1 (by omega) (by omega)) + apply outsideBall_exception_pair (r := 1) (k := k) (t := R.card) + (A := R.erase x) (hRX hxR) (fun _ hy => hRX (Finset.mem_of_mem_erase hy)) + (by simp) hclique (by omega) + · have hc := Finset.card_erase_add_one hxR + omega + · exact hexpand + · intro y hy d hd hdb hp + exact hforbid y (Finset.mem_of_mem_erase hy) (Finset.ne_of_mem_erase hy).symm + d hd hdb hp.toOutside + +theorem representative_ball_two_triple (hCE : CEAlphaTwo) (hk : 5 ≤ k) + (hxR : x ∈ R) (hRX : R ⊆ X) (hXk : X.card ≤ k) (hRk : R.card < k) + (hcycle : ¬ HasCycle G (k + 1)) (hclique : G.cliqueNum ≤ R.card) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (hforbid : ∀ y ∈ R, x ≠ y → ∀ d, 1 ≤ d → d ≤ 2 → + ¬ OutsidePath G (X : Set V) x y d) + (hnotclique : ¬ G.IsClique (outsideBallFinset G X x 1 : Set V)) : + HasIndependent (G.induce (outsideBallFinset G X x 2 : Set V)) 3 := by + obtain ⟨I, hI, hind, hIcard⟩ := exists_independent_subset (independent_pair_of_not_clique hnotclique) + have hAX : R.erase x ⊆ X := fun _ hy => hRX (Finset.mem_of_mem_erase hy) + have hf : ∀ y ∈ R.erase x, ∀ d, 1 ≤ d → d ≤ 1 + 1 → + ¬ PositiveOutsidePath G (X : Set V) x y d := by + intro y hy d hd hdb hp + exact hforbid y (Finset.mem_of_mem_erase hy) (Finset.ne_of_mem_erase hy).symm + d hd hdb hp.toOutside + have havoid := closedNeighborhood_avoids_forbidden (hRX hxR) hAX (by simp) hI hf + have hne : I.Nonempty := Finset.card_pos.mp (by omega) + have hg := outsideBall_growth hAX hI havoid (hexpand I hind hne) + have hc := Finset.card_erase_add_one hxR + have hRpos : 1 ≤ R.card := Finset.card_pos.mpr ⟨x, hxR⟩ + apply size_test hCE hk hRpos hcycle hclique (outsideBallFinset G X x 2) + rw [hIcard] at hg + simp only [Nat.reduceAdd] at hg + exact max_lt_iff.mpr ⟨by omega, by omega⟩ + +theorem exists_short_path_of_twice_card_gt (hbound : IndependenceBound G k) + (hRX : R ⊆ X) (hXk : X.card ≤ k) (hclique : G.cliqueNum ≤ R.card) + (hexpand : ∀ v, k + 1 ≤ (closedNeighborhood G {v}).card) + (hlarge : k < 2 * R.card) : + ∃ x ∈ R, ∃ y ∈ R, x ≠ y ∧ ∃ d, 1 ≤ d ∧ d ≤ 6 ∧ + OutsidePath G (X : Set V) x y d := by + by_contra hn + push Not at hn + have hf : ∀ x ∈ R, ∀ y ∈ R, x ≠ y → ∀ d, 1 ≤ d → d ≤ 6 → + ¬ OutsidePath G (X : Set V) x y d := by + intro x hx y hy hne d hd hdb + exact hn x hx y hy hne d hd hdb + have hpack := packing_test hbound X (fun i : R => i.val) (fun _ => 3) (fun _ => 2) + Subtype.val_injective (fun i => hRX i.property) + (fun i => by + have h := representative_ball_two_pair i.property hRX hXk hclique hexpand + (fun y hy hne d hd hdb => hf i i.property y hy hne d hd (by omega)) + simpa [packingRegion] using h) + (fun i j hij => by + simp only [PackingCompatible, OfNat.ofNat_ne_zero, false_and, ↓reduceIte] + intro d hd hdb + exact hf i i.property j j.property (fun h => hij (Subtype.ext h)) d hd hdb) + have hnum : 2 * R.card ≤ k := by simpa [mul_comm] using hpack + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeCuts.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeCuts.lean new file mode 100644 index 0000000000000000000000000000000000000000..4b1935e7c2530e73ecd18eeea332b5cd973f8263 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeCuts.lean @@ -0,0 +1,104 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Representatives + +namespace OAI + +/-! Every selected representative is the first vertex of a chain, or +immediately follows a clique vertex. Two cuts in one chain can be ordered. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type*} {Q : Finset V} + +def RepCut (Q : Finset V) (l : List V) (x : V) : Prop := + ∃ A B : List V, l = A ++ x :: B ∧ ∀ v ∈ A.getLast?, v ∈ Q + +theorem representativesFrom_mem_cut {prev x : V} {xs : List V} + (hx : x ∈ representativesFrom Q prev xs) : + ∃ A B : List V, prev :: xs = A ++ x :: B ∧ + (∀ v ∈ A.getLast?, v ∈ Q) ∧ A ≠ [] := by + induction xs generalizing prev with + | nil => simp [representativesFrom] at hx + | cons z zs ih => + simp only [representativesFrom, List.mem_append] at hx + by_cases hp : prev ∈ Q + · simp only [hp, ↓reduceIte, List.mem_singleton] at hx + rcases hx with rfl | hx + · exact ⟨[prev], zs, rfl, by simpa using hp, by simp⟩ + · obtain ⟨A, B, hEq, hA, hne⟩ := ih hx + refine ⟨prev :: A, B, by simpa using congrArg (List.cons prev) hEq, ?_, by simp⟩ + cases A with + | nil => exact False.elim (hne rfl) + | cons a A => simpa using hA + · simp only [hp, ↓reduceIte, List.not_mem_nil, false_or] at hx + obtain ⟨A, B, hEq, hA, hne⟩ := ih hx + refine ⟨prev :: A, B, by simpa using congrArg (List.cons prev) hEq, ?_, by simp⟩ + cases A with + | nil => exact False.elim (hne rfl) + | cons a A => simpa using hA + +theorem chainRepresentatives_mem_cut {l : List V} {x : V} + (hx : x ∈ chainRepresentatives Q l) : RepCut Q l x := by + cases l with + | nil => simp [chainRepresentatives] at hx + | cons prev xs => + simp only [chainRepresentatives, List.mem_cons] at hx + rcases hx with rfl | hx + · exact ⟨[], xs, rfl, by simp⟩ + · obtain ⟨A, B, he, hA, _⟩ := representativesFrom_mem_cut hx + exact ⟨A, B, he, hA⟩ + +private theorem cut_ordered_of_later {l A C D : List V} {x y : V} + (hnd : l.Nodup) (hx : l = A ++ x :: C ++ y :: D) + (hy : RepCut Q l y) (hA : ∀ v ∈ A.getLast?, v ∈ Q) : + ∃ A' B' D' : List V, l = A' ++ (x :: B') ++ y :: D' ∧ + (∀ v ∈ A'.getLast?, v ∈ Q) ∧ + (∀ v ∈ (x :: B').getLast?, v ∈ Q) := by + obtain ⟨E, F, he, hE⟩ := hy + have hsplit : l = (A ++ x :: C) ++ y :: D := by simpa [List.append_assoc] using hx + have hn : ((A ++ x :: C) ++ y :: D).Nodup := hsplit ▸ hnd + have hny : y ∉ A ++ x :: C := by + exact fun h => (List.nodup_append'.mp hn).2.2 h (by simp) + have hnyD : y ∉ D := (List.nodup_cons.mp (List.nodup_append'.mp hn).2.1).1 + have heq : (A ++ x :: C) ++ y :: D = E ++ y :: F := hsplit.symm.trans he + have hpref := (List.append_cons_inj_of_notMem hny hnyD).mp heq + have hlast : ∀ v ∈ (x :: C).getLast?, v ∈ Q := by + intro v hv + apply hE v + rw [← hpref.1] + have hs := List.getLast?_eq_some_getLast (show x :: C ≠ [] by simp) + simpa only [List.getLast?_append, hs, Option.or] using hv + exact ⟨A, C, D, by simpa [List.append_assoc] using hx, hA, hlast⟩ + +theorem repCuts_ordered {l : List V} {x y : V} (hnd : l.Nodup) (hne : x ≠ y) + (hx : RepCut Q l x) (hy : RepCut Q l y) : + (∃ A B D : List V, l = A ++ (x :: B) ++ y :: D ∧ + (∀ v ∈ A.getLast?, v ∈ Q) ∧ (∀ v ∈ (x :: B).getLast?, v ∈ Q)) ∨ + (∃ A B D : List V, l = A ++ (y :: B) ++ x :: D ∧ + (∀ v ∈ A.getLast?, v ∈ Q) ∧ (∀ v ∈ (y :: B).getLast?, v ∈ Q)) := by + obtain ⟨A, B, he, hA⟩ := hx + have hym : y ∈ l := by obtain ⟨C, D, h, _⟩ := hy; simp [h] + rw [he] at hym + simp only [List.mem_append, List.mem_cons] at hym + rcases hym with hym | hye | hym + · obtain ⟨C, D, hC⟩ := List.append_of_mem hym + have he' : l = C ++ y :: (D ++ x :: B) := by simp [he, hC, List.append_assoc] + obtain ⟨E, F, hyEq, hE⟩ := hy + have hn : (C ++ y :: (D ++ x :: B)).Nodup := he' ▸ hnd + have hny : y ∉ C := fun h => (List.nodup_append'.mp hn).2.2 h (by simp) + have hnytail : y ∉ D ++ x :: B := (List.nodup_cons.mp (List.nodup_append'.mp hn).2.1).1 + have hpref := (List.append_cons_inj_of_notMem hny hnytail).mp (he'.symm.trans hyEq) + have hCends : ∀ v ∈ C.getLast?, v ∈ Q := by simpa [hpref.1] using hE + apply Or.inr + exact cut_ordered_of_later (A := C) (C := D) (D := B) hnd + (by simp [he, hC, List.append_assoc]) + ⟨A, B, he, hA⟩ hCends + · exact False.elim (hne hye.symm) + · obtain ⟨C, D, hC⟩ := List.append_of_mem hym + apply Or.inl + exact cut_ordered_of_later (A := A) (C := C) (D := D) hnd + (by simp [he, hC, List.append_assoc]) hy hA + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeExclusion.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeExclusion.lean new file mode 100644 index 0000000000000000000000000000000000000000..1913b4eb176d932ce8005f8bd96217dcbde1364a --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeExclusion.lean @@ -0,0 +1,70 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RepresentativeCuts +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawPermutation +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ReplacementOptimality + +namespace OAI + +/-! Manuscript grow:one for every pair of representatives of an oriented +raw system with the optimal amount. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} {S : ExpandedPathSystem G Q} + +theorem IsOptimal.representatives_one_exclusion {k : ℕ} (hopt : S.IsOptimal k) + (hk : 3 ≤ k) (hQk : Q.card ≤ k) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (U : RawPathSystem G Q) + (hUamount : U.amount = S.amount) + (hUvertices : ∀ v ∈ U.vertices, v ∈ Q ∨ v ∈ S.vertices) + {x y : V} (hx : x ∈ U.representatives) (hy : y ∈ U.representatives) (hne : x ≠ y) : + ¬ OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) x y 1 := by + obtain ⟨l, hl, hx⟩ := List.mem_flatten.mp hx + obtain ⟨l', hl', heql⟩ := List.mem_map.mp hl + subst l + obtain ⟨m, hm, hy⟩ := List.mem_flatten.mp hy + obtain ⟨m', hm', heqm⟩ := List.mem_map.mp hm + subst m + have hxc := chainRepresentatives_mem_cut hx + have hyc := chainRepresentatives_mem_cut hy + by_cases hlm : l' = m' + · subst m' + obtain ⟨P, R, hchains⟩ := List.append_of_mem hl' + rcases repCuts_ordered (U.paths l' hl').1 hne hxc hyc with + ⟨A, B, D, he, hA, hB⟩ | ⟨A, B, D, he, hA, hB⟩ + · exact hopt.forbidden_same_chain_one hk hQk hQ hcycle U hUamount hUvertices + (by simpa [he] using hchains) hA hB + · intro hout + exact hopt.forbidden_same_chain_one hk hQk hQ hcycle U hUamount hUvertices + (by simpa [he] using hchains) hA hB hout.reverse + · obtain ⟨R, hp⟩ := U.bring_two_front hl' hm' hlm + let U' := U.reorder (l' :: m' :: R) hp + have hamount : U'.amount = S.amount := by simpa [U'] using hUamount + have hvertices : ∀ v ∈ U'.vertices, v ∈ Q ∨ v ∈ S.vertices := by + intro v hv + apply hUvertices v + simpa [U'] using hv + obtain ⟨A, B, he₁, hA⟩ := hxc + obtain ⟨C, D, he₂, hC⟩ := hyc + apply hopt.forbidden_different_chain_one hk hQk hQ hcycle U' hamount hvertices + (P := []) (M := []) (R := R) (A := A) (B := B) (C := C) (D := D) + · simp [U', RawPathSystem.reorder, he₁, he₂] + · exact hA + · exact hC + +theorem IsOptimal.completed_representatives_one_exclusion {k : ℕ} (hopt : S.IsOptimal k) + (hk : 3 ≤ k) (hQk : Q.card ≤ k) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) {x y : V} + (hx : x ∈ S.toRaw.completeClique.representatives) + (hy : y ∈ S.toRaw.completeClique.representatives) (hne : x ≠ y) : + ¬ OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) x y 1 := by + apply hopt.representatives_one_exclusion hk hQk hQ hcycle S.toRaw.completeClique + (by simp) ?_ hx hy hne + intro v hv + rw [RawPathSystem.completeClique_vertices] at hv + exact (Finset.mem_union.mp hv).symm + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeExtraNeighbor.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeExtraNeighbor.lean new file mode 100644 index 0000000000000000000000000000000000000000..6f8e33365061e99b4cc0aa36f3dc9be2a7a223bc --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeExtraNeighbor.lean @@ -0,0 +1,73 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RepresentativeBallGrowth + +namespace OAI + +/-! An additional excluded vertex outside the representative set forces +the first ball to exceed the maximum clique size. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type} [Fintype V] {G : SimpleGraph V} {X R : Finset V} {x y : V} {k : ℕ} + +theorem representative_ball_one_extra (hxR : x ∈ R) (hRX : R ⊆ X) (hXk : X.card ≤ k) + (hyX : y ∈ X) (hyR : y ∉ R) + (hexpand : ∀ v, k + 1 ≤ (closedNeighborhood G {v}).card) + (hforbid : ∀ z ∈ R, x ≠ z → ¬ OutsidePath G (X : Set V) x z 1) + (hmiss : ∀ u ∈ outsideBallFinset G X x 0, ¬ G.Adj u y) : + R.card < (outsideBallFinset G X x 1).card := by + have hxX := hRX hxR + have hz := outsideBall_initial_growth (A := ∅) hxX (by simp) (by simp) + (by simp) (hexpand x) + simp only [Finset.card_empty, Nat.add_zero] at hz + have hne : (outsideBallFinset G X x 0).Nonempty := by + apply Finset.card_pos.mp + omega + obtain ⟨u, hu⟩ := hne + have hI : ({u} : Finset V) ⊆ outsideBallFinset G X x 0 := by simpa using hu + have hAX : R.erase x ⊆ X := fun _ hv => hRX (Finset.mem_of_mem_erase hv) + have hf : ∀ z ∈ R.erase x, ∀ d, 1 ≤ d → d ≤ 0 + 1 → + ¬ PositiveOutsidePath G (X : Set V) x z d := by + intro z hz d hd hdb hp + have he : d = 1 := by omega + subst d + exact hforbid z (Finset.mem_of_mem_erase hz) (Finset.ne_of_mem_erase hz).symm hp.toOutside + have havoidR := closedNeighborhood_avoids_forbidden hxX hAX (by simp) hI hf + have havoidy : y ∉ closedNeighborhood G {u} := by + intro hc + rcases mem_closedNeighborhood.mp hc with hcu | ⟨v, hv, hvy⟩ + · have he : y = u := Finset.mem_singleton.mp hcu + exact (mem_outsideBallFinset.mp hu).1 (he ▸ hyX) + · have he : v = u := Finset.mem_singleton.mp hv + exact hmiss u hu (he ▸ hvy) + have hAX' : insert y (R.erase x) ⊆ X := by + intro z hz + rcases Finset.mem_insert.mp hz with rfl | hz + · exact hyX + · exact hAX hz + have havoid : ∀ z ∈ insert y (R.erase x), z ∉ closedNeighborhood G {u} := by + intro z hz + rcases Finset.mem_insert.mp hz with rfl | hz + · exact havoidy + · exact havoidR z hz + have hg := outsideBall_growth hAX' hI havoid (by simpa using hexpand u) + have hyErase : y ∉ R.erase x := fun h => hyR (Finset.mem_of_mem_erase h) + rw [Finset.card_insert_of_notMem hyErase] at hg + have hc := Finset.card_erase_add_one hxR + simp only [Finset.card_singleton, Nat.mul_one, Nat.reduceAdd] at hg + omega + +theorem representative_ball_one_not_clique (hxR : x ∈ R) (hRX : R ⊆ X) (hXk : X.card ≤ k) + (hyX : y ∈ X) (hyR : y ∉ R) (hclique : G.cliqueNum ≤ R.card) + (hexpand : ∀ v, k + 1 ≤ (closedNeighborhood G {v}).card) + (hforbid : ∀ z ∈ R, x ≠ z → ¬ OutsidePath G (X : Set V) x z 1) + (hmiss : ∀ u ∈ outsideBallFinset G X x 0, ¬ G.Adj u y) : + ¬ G.IsClique (outsideBallFinset G X x 1 : Set V) := by + intro h + have hcard := h.card_le_cliqueNum.trans hclique + have hbig := representative_ball_one_extra hxR hRX hXk hyX hyR hexpand hforbid hmiss + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeOutside.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeOutside.lean new file mode 100644 index 0000000000000000000000000000000000000000..18052cd9fc68f6880556431975f210f05ad6883c --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeOutside.lean @@ -0,0 +1,74 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RepresentativeCuts + +namespace OAI + +/-! All noninitial representatives lie outside the clique; their number +is exactly the number of assigned paths. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type*} {Q : Finset V} + +theorem representativesFrom_outside {prev : V} {xs : List V} + (hsteps : (prev :: xs).IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q))) : + ∀ x ∈ representativesFrom Q prev xs, x ∉ Q := by + induction xs generalizing prev with + | nil => simp [representativesFrom] + | cons y ys ih => + have hs := List.isChain_cons_cons.mp hsteps + intro x hx + simp only [representativesFrom, List.mem_append] at hx + by_cases hp : prev ∈ Q + · simp only [hp, ↓reduceIte, List.mem_singleton] at hx + rcases hx with rfl | hx + · exact fun hy => hs.1 ⟨hp, hy⟩ + · exact ih hs.2 x hx + · simp only [hp, ↓reduceIte, List.not_mem_nil, false_or] at hx + exact ih hs.2 x hx + +noncomputable def chainOutsideCount (Q : Finset V) (l : List V) : ℕ := + (l.filter (fun v => decide (v ∉ Q))).length + +theorem chainRepresentatives_outside_count {l : List V} + (hends : (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q)) + (hsteps : l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q))) : + chainOutsideCount Q (chainRepresentatives Q l) = chainCliqueCount Q l - 1 := by + cases l with + | nil => rfl + | cons x xs => + have hx : x ∈ Q := hends.1 x (by simp) + have hfilter : (representativesFrom Q x xs).filter (fun v => decide (v ∉ Q)) = + representativesFrom Q x xs := by + apply List.filter_eq_self.mpr + intro v hv + simpa using representativesFrom_outside hsteps v hv + have hlength := representativesFrom_length x xs hends.2 + simp only [chainOutsideCount, chainRepresentatives, List.filter_cons, hx, + not_true_eq_false, decide_false, Bool.false_eq_true, ↓reduceIte, hfilter] + omega + +namespace RawPathSystem + +variable {G : SimpleGraph V} + +theorem representatives_outside_count (S : RawPathSystem G Q) : + chainOutsideCount Q S.representatives = S.assignedCount := by + unfold chainOutsideCount representatives assignedCount rawAssignedCount + rw [List.filter_flatten, List.length_flatten, List.map_map] + simp only [List.map_map, Function.comp_def] + apply congrArg List.sum + apply List.map_congr_left + intro l hl + exact chainRepresentatives_outside_count (S.endpoints l hl) (S.no_clique_steps l hl) + +theorem completed_representatives_outside_count (S : ExpandedPathSystem G Q) : + chainOutsideCount Q S.toRaw.completeClique.representatives = S.assignedCount := by + rw [representatives_outside_count, completeClique_assignedCount, + ExpandedPathSystem.toRaw_assignedCount] + +end RawPathSystem + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativePacking.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativePacking.lean new file mode 100644 index 0000000000000000000000000000000000000000..aae5fc6baba5a3a9a4533f88f9936410cb428b2b --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativePacking.lean @@ -0,0 +1,67 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RepresentativeBallGrowth + +namespace OAI + +/-! Two nonclique first balls improve the separated packing from 2t to +2t+2, finishing the parity boundary once the path-system exclusions apply. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type} [Fintype V] {G : SimpleGraph V} {X R : Finset V} {k : ℕ} + +theorem exists_short_path_of_two_noncliques (hCE : CEAlphaTwo) (hk : 5 ≤ k) + (hbound : IndependenceBound G k) (hRX : R ⊆ X) (hXk : X.card ≤ k) + (hRk : R.card < k) (hkR : k ≤ 2 * R.card + 1) + (hcycle : ¬ HasCycle G (k + 1)) (hclique : G.cliqueNum ≤ R.card) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (hspecial : ∃ a ∈ R, ∃ b ∈ R, a ≠ b ∧ + ¬ G.IsClique (outsideBallFinset G X a 1 : Set V) ∧ + ¬ G.IsClique (outsideBallFinset G X b 1 : Set V)) : + ∃ x ∈ R, ∃ y ∈ R, x ≠ y ∧ ∃ d, 1 ≤ d ∧ d ≤ 6 ∧ + OutsidePath G (X : Set V) x y d := by + obtain ⟨a, ha, b, hb, hab, hna, hnb⟩ := hspecial + by_contra hn + push Not at hn + have hf : ∀ x ∈ R, ∀ y ∈ R, x ≠ y → ∀ d, 1 ≤ d → d ≤ 6 → + ¬ OutsidePath G (X : Set V) x y d := by + intro x hx y hy hne d hd hdb + exact hn x hx y hy hne d hd hdb + have hsingle : ∀ v, k + 1 ≤ (closedNeighborhood G {v}).card := by + intro v + simpa using hexpand {v} (by simp) (by simp) + let α : R := ⟨a, ha⟩ + let β : R := ⟨b, hb⟩ + have hαβ : α ≠ β := fun h => hab (congrArg Subtype.val h) + let weight : R → ℕ := fun i => 2 + (if i = α then 1 else 0) + (if i = β then 1 else 0) + have hweight : ∀ i : R, + HasIndependent (G.induce (packingRegion G X i 3 : Set V)) (weight i) := by + intro i + by_cases hia : i = α + · subst i + have h := representative_ball_two_triple hCE hk ha hRX hXk hRk hcycle hclique hexpand + (fun y hy hne d hd hdb => hf a ha y hy hne d hd (by omega)) hna + simpa [packingRegion, weight, α, hαβ] using h + · by_cases hib : i = β + · subst i + have h := representative_ball_two_triple hCE hk hb hRX hXk hRk hcycle hclique hexpand + (fun y hy hne d hd hdb => hf b hb y hy hne d hd (by omega)) hnb + simpa [packingRegion, weight, β, hαβ.symm] using h + · have h := representative_ball_two_pair i.property hRX hXk hclique hsingle + (fun y hy hne d hd hdb => hf i i.property y hy hne d hd (by omega)) + simpa [packingRegion, weight, hia, hib] using h + have hp := packing_test hbound X (fun i : R => i.val) (fun _ => 3) weight + Subtype.val_injective (fun i => hRX i.property) hweight + (fun i j hij => by + simp only [PackingCompatible, OfNat.ofNat_ne_zero, false_and, ↓reduceIte] + intro d hd hdb + exact hf i i.property j j.property (fun h => hij (Subtype.ext h)) d hd hdb) + have hsum : ∑ i : R, weight i = 2 * R.card + 2 := by + simp [weight, Finset.sum_add_distrib, mul_comm] + rw [hsum] at hp + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeSuccessor.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeSuccessor.lean new file mode 100644 index 0000000000000000000000000000000000000000..777f901b053174a37d7138c06702d7b716cca126 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RepresentativeSuccessor.lean @@ -0,0 +1,69 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RepresentativeOutside +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawPermutation + +namespace OAI + +/-! An interior representative has a successor that is not a representative. -/ + +namespace CycleClique.Construction.RawPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +theorem representative_successor (U : RawPathSystem G Q) {x : V} + (hx : x ∈ U.representatives) (hxQ : x ∉ Q) : + ∃ l ∈ U.chains, ∃ A : List V, ∃ y : V, ∃ B : List V, + l = A ++ x :: y :: B ∧ y ∉ U.representatives := by + obtain ⟨r, hr, hx⟩ := List.mem_flatten.mp hx + obtain ⟨l, hl, heqr⟩ := List.mem_map.mp hr + subst r + obtain ⟨A, B, he, _⟩ := chainRepresentatives_mem_cut hx + have hBne : B ≠ [] := by + intro hB + have hxLast : x ∈ l.getLast? := by simp [he, hB] + exact hxQ ((U.endpoints l hl).2 x hxLast) + cases B with + | nil => exact False.elim (hBne rfl) + | cons y B => + refine ⟨l, hl, A, y, B, he, ?_⟩ + intro hy + obtain ⟨r, hr, hy⟩ := List.mem_flatten.mp hy + obtain ⟨m, hm, heqr⟩ := List.mem_map.mp hr + subst r + have hym : y ∈ m := (chainRepresentatives_sublist m).subset hy + by_cases hlm : l = m + · subst m + obtain ⟨C, D, hc, hC⟩ := chainRepresentatives_mem_cut hy + have he' : l = (A ++ [x]) ++ y :: B := by simpa [List.append_assoc] using he + have hn : ((A ++ [x]) ++ y :: B).Nodup := he' ▸ (U.paths l hl).1 + have hny : y ∉ A ++ [x] := fun h => (List.nodup_append'.mp hn).2.2 h (by simp) + have hnyB : y ∉ B := (List.nodup_cons.mp (List.nodup_append'.mp hn).2.1).1 + have hpref := (List.append_cons_inj_of_notMem hny hnyB).mp (he'.symm.trans hc) + apply hxQ + apply hC x + rw [← hpref.1] + simp + · have hyl : y ∈ l := by simp [he] + exact List.disjoint_left.mp (U.disjoint_of_mem hl hm hlm) hyl hym + +theorem exists_two_outside_completed_representatives (S : ExpandedPathSystem G Q) + (he : 2 ≤ S.assignedCount) : + ∃ x ∈ S.toRaw.completeClique.representatives, + ∃ y ∈ S.toRaw.completeClique.representatives, x ≠ y ∧ x ∉ Q ∧ y ∉ Q := by + let L := S.toRaw.completeClique.representatives + let O := L.filter (fun v => decide (v ∉ Q)) + have hO : O.Nodup := S.toRaw.completeClique.representatives_nodup.filter _ + have hcard : 2 ≤ O.toFinset.card := by + rw [List.toFinset_card_of_nodup hO] + change 2 ≤ chainOutsideCount Q S.toRaw.completeClique.representatives + rw [completed_representatives_outside_count] + exact he + obtain ⟨x, hx, y, hy, hxy⟩ := Finset.one_lt_card.mp hcard + have hx' : x ∈ L ∧ x ∉ Q := by simpa [O] using hx + have hy' : y ∈ L ∧ y ∉ Q := by simpa [O] using hy + exact ⟨x, hx'.1, y, hy'.1, hxy, hx'.2, hy'.2⟩ + +end CycleClique.Construction.RawPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Representatives.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Representatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..ee0ad29f0e83c7f73b6f6a289c181acad9b048d2 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Representatives.lean @@ -0,0 +1,118 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawCliqueCompletion + +namespace OAI + +/-! Representatives: each chain start, and the first vertex following +every nonterminal clique vertex in the oriented expanded chain. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type*} {Q : Finset V} + +noncomputable def representativesFrom (Q : Finset V) (prev : V) : List V → List V + | [] => [] + | x :: xs => (if prev ∈ Q then [x] else []) ++ representativesFrom Q x xs + +noncomputable def chainRepresentatives (Q : Finset V) : List V → List V + | [] => [] + | x :: xs => x :: representativesFrom Q x xs + +theorem representativesFrom_sublist (prev : V) (xs : List V) : + (representativesFrom Q prev xs).Sublist xs := by + induction xs generalizing prev with + | nil => exact .refl _ + | cons x xs ih => + simp only [representativesFrom] + split_ifs + · simpa using (ih x).cons_cons x + · simpa using (ih x).cons x + +theorem chainRepresentatives_sublist (l : List V) : (chainRepresentatives Q l).Sublist l := by + cases l with + | nil => exact .refl _ + | cons x xs => exact (representativesFrom_sublist x xs).cons_cons x + +@[simp] theorem chainCliqueCount_cons (x : V) (xs : List V) : + chainCliqueCount Q (x :: xs) = (if x ∈ Q then 1 else 0) + chainCliqueCount Q xs := by + simp [chainCliqueCount, List.filter_cons] + split_ifs <;> simp [Nat.add_comm] + +theorem representativesFrom_length (prev : V) (xs : List V) + (hlast : ∀ v ∈ (prev :: xs).getLast?, v ∈ Q) : + (representativesFrom Q prev xs).length + 1 = chainCliqueCount Q (prev :: xs) := by + induction xs generalizing prev with + | nil => + have hp : prev ∈ Q := hlast prev (by simp) + simp [representativesFrom, chainCliqueCount, hp] + | cons x xs ih => + have hi := ih x (by simpa using hlast) + rw [representativesFrom, List.length_append, chainCliqueCount_cons] + have hlen : (if prev ∈ Q then [x] else []).length = (if prev ∈ Q then 1 else 0) := by + split_ifs <;> rfl + rw [hlen] + omega + +theorem chainRepresentatives_length (l : List V) + (hlast : ∀ v ∈ l.getLast?, v ∈ Q) : + (chainRepresentatives Q l).length = chainCliqueCount Q l := by + cases l with + | nil => rfl + | cons x xs => + simpa only [chainRepresentatives, List.length_cons] using representativesFrom_length x xs hlast + +namespace RawPathSystem + +variable {G : SimpleGraph V} + +noncomputable def representatives (S : RawPathSystem G Q) : List V := + (S.chains.map (chainRepresentatives Q)).flatten + +theorem representatives_sublist (S : RawPathSystem G Q) : + S.representatives.Sublist S.chains.flatten := by + have h : ∀ C : List (List V), + (C.map (chainRepresentatives Q)).flatten.Sublist C.flatten := by + intro C + induction C with + | nil => exact .refl _ + | cons l C ih => + exact (chainRepresentatives_sublist l).append ih + exact h S.chains + +theorem representatives_nodup (S : RawPathSystem G Q) : S.representatives.Nodup := + S.flatten_nodup.sublist S.representatives_sublist + +theorem representatives_length (S : RawPathSystem G Q) : + S.representatives.length = chainCliqueCount Q S.chains.flatten := by + rw [chainCliqueCount_flatten] + unfold representatives + rw [List.length_flatten, List.map_map] + apply congrArg List.sum + apply List.map_congr_left + intro l hl + exact chainRepresentatives_length l (S.endpoints l hl).2 + +theorem completeClique_representatives_length (S : RawPathSystem G Q) : + S.completeClique.representatives.length = Q.card := by + rw [representatives_length] + have hnd := S.completeClique.flatten_nodup.filter (fun v => decide (v ∈ Q)) + have hset : (S.completeClique.chains.flatten.filter (fun v => decide (v ∈ Q))).toFinset = Q := by + ext v + simp only [List.mem_toFinset, List.mem_filter, decide_eq_true_eq] + constructor + · exact And.right + · intro hv + constructor + · have hm : v ∈ S.completeClique.vertices := by + rw [completeClique_vertices] + exact Finset.mem_union_right _ hv + exact List.mem_toFinset.mp hm + · exact hv + unfold chainCliqueCount + rw [← List.toFinset_card_of_nodup hnd, hset] + +end RawPathSystem + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RequiredCertificates.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RequiredCertificates.lean new file mode 100644 index 0000000000000000000000000000000000000000..5418942fcaf2ac99f431261eec6a149fccfbdd4f --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RequiredCertificates.lean @@ -0,0 +1,85 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiniteConstraints + +namespace OAI + +/-! A required-path certificate is simply a finite simple path. Its +complementary outside parameter is forbidden by the exact cycle length. -/ + +namespace CycleClique.Construction +structure RequiredPathData (W : Type*) where + x : W + y : W + middle : List W + deriving DecidableEq, Repr + +namespace RequiredPathData + +variable {W : Type*} + +def support (p : RequiredPathData W) : List W := p.x :: (p.middle ++ [p.y]) + +def parameter (k : ℕ) (p : RequiredPathData W) : ℕ := k - (p.middle.length + 1) + +def Check (H : SimpleGraph W) (k : ℕ) (p : RequiredPathData W) : Prop := + p.support.Nodup ∧ p.support.IsChain H.Adj ∧ p.middle.length + 1 ≤ k + +instance [DecidableEq W] (H : SimpleGraph W) [DecidableRel H.Adj] + (k : ℕ) (p : RequiredPathData W) : Decidable (p.Check H k) := + inferInstanceAs (Decidable (_ ∧ _)) + +variable {V : Type*} {n : ℕ} {G : SimpleGraph V} {H : SimpleGraph (Fin n)} + +theorem forbids {k : ℕ} (hk : 3 ≤ k) (hcycle : ¬ HasCycle G (k + 1)) + (f : H →g G) (hf : Function.Injective f) {X : Finset V} + (hfX : ∀ i, f i ∈ X) (p : RequiredPathData (Fin n)) (hc : p.Check H k) : + ¬ OutsidePath G (X : Set V) (f p.x) (f p.y) (p.parameter k) := by + have hne : p.support ≠ [] := List.cons_ne_nil _ _ + let w := SimpleGraph.Walk.ofSupport p.support hne hc.2.1 + have hw : w.IsPath := by + rw [SimpleGraph.Walk.isPath_def] + exact (SimpleGraph.Walk.support_ofSupport _ _).symm ▸ hc.1 + have hlen₀ : w.length = p.support.length - 1 := + SimpleGraph.Walk.length_ofSupport hne hc.2.1 + have hlen : w.length = p.middle.length + 1 := by rw [hlen₀]; simp [support] + have hh := required_indexed_path_forbids f hf hfX hk hcycle w hw (by omega) + (by rw [hlen]; exact hc.2.2) + rw [hlen] at hh + simpa [w, support, parameter, List.getLast_cons] using hh + +end RequiredPathData + +variable {n : ℕ} + +def requiredEntryMatrix (k : ℕ) (p : RequiredPathData (Fin n)) : ForbiddenMatrix n := fun i j => + if (i = p.x ∧ j = p.y) ∨ (i = p.y ∧ j = p.x) then {p.parameter k} else ∅ + +def requiredMatrix (k : ℕ) : List (RequiredPathData (Fin n)) → ForbiddenMatrix n + | [] => fun _ _ => ∅ + | p :: E => fun i j => requiredEntryMatrix k p i j ∪ requiredMatrix k E i j + +variable {V : Type*} {G : SimpleGraph V} {H : SimpleGraph (Fin n)} + +theorem requiredMatrix_sound {k : ℕ} (hk : 3 ≤ k) (hcycle : ¬ HasCycle G (k + 1)) + (f : H →g G) (hf : Function.Injective f) {X : Finset V} (hfX : ∀ i, f i ∈ X) + (E : List (RequiredPathData (Fin n))) (hE : ∀ p ∈ E, p.Check H k) : + (requiredMatrix k E).Sound G X f := by + induction E with + | nil => intro i j d hd; simp only [requiredMatrix, Finset.notMem_empty] at hd + | cons p E ih => + apply ForbiddenMatrix.Sound.union + · intro i j d hd + have hpair : (i = p.x ∧ j = p.y) ∨ (i = p.y ∧ j = p.x) := by + by_contra hn + simp only [requiredEntryMatrix, hn, ↓reduceIte, Finset.notMem_empty] at hd + have heq : d = p.parameter k := by + simpa only [requiredEntryMatrix, hpair, ↓reduceIte, Finset.mem_singleton] using hd + subst d + have hb := p.forbids hk hcycle f hf hfX (hE p (by simp)) + rcases hpair with ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩ + · exact hb + · exact fun h => hb h.reverse + · exact ih (fun q hq => hE q (by simp [hq])) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ResidualPaths.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ResidualPaths.lean new file mode 100644 index 0000000000000000000000000000000000000000..69ed11f2fb2cd543b5274b8183d2126ff7a6e5d7 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ResidualPaths.lean @@ -0,0 +1,100 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CliqueTraversal +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ColouredPathStart +import OAI.Combinatorics.Ramsey.CycleClique.Construction.SingleAttachment + +namespace OAI + +/-! Joining the endpoint clique to a path in the remaining component. -/ + +namespace CycleClique.Construction +/-- The pair consisting of the remaining-path endpoint and a vertex +of the endpoint clique directly gives the needed combined order. -/ +theorem endpoint_residual_order {V : Type*} [Fintype V] [DecidableEq V] + {H : SimpleGraph V} {E R : Finset V} {u v w y z : V} {s : ℕ} + (hu : u ∈ R) (hv : v ∈ R) (hw : w ∈ E) + (hcoverv : ∀ a, H.Adj v a → a ∈ R ∨ a = y ∨ a = z) + (hcoverw : ∀ a, H.Adj w a → a ∈ E ∨ a = u ∨ a = y ∨ a = z) + (hexpand : 2 * s ≤ (closedNeighborhood H {v, w}).card) : + 2 * s - 2 ≤ E.card + R.card := by + classical + have hsub : closedNeighborhood H {v, w} ⊆ (R ∪ E) ∪ {y, z} := by + intro a ha + rcases mem_closedNeighborhood.mp ha with ha | ⟨b, hb, hba⟩ + · simp only [Finset.mem_insert, Finset.mem_singleton] at ha + rcases ha with rfl | rfl + · exact Finset.mem_union_left _ (Finset.mem_union_left _ hv) + · exact Finset.mem_union_left _ (Finset.mem_union_right _ hw) + · simp only [Finset.mem_insert, Finset.mem_singleton] at hb + rcases hb with rfl | rfl + · rcases hcoverv a hba with ha | rfl | rfl + · exact Finset.mem_union_left _ (Finset.mem_union_left _ ha) + · simp + · simp + · rcases hcoverw a hba with ha | rfl | rfl | rfl + · exact Finset.mem_union_left _ (Finset.mem_union_right _ ha) + · exact Finset.mem_union_left _ (Finset.mem_union_left _ hu) + · simp + · simp + have hcard := (Finset.card_le_card hsub).trans (Finset.card_union_le (R ∪ E) {y, z}) + have hRE := Finset.card_union_le R E + have hp : ({y, z} : Finset V).card ≤ 2 := Finset.card_le_two + omega + +/-- Traverse the whole endpoint clique first, entering the remaining +path through one of two attachment neighbours. -/ +theorem clique_join_remaining_path {V : Type*} [DecidableEq V] + {H : SimpleGraph V} {E : Finset V} {u w : V} + (hclique : H.IsClique (E : Set V)) (hw : w ∈ E) + (hattach : ∃ a ∈ E, ∃ b ∈ E, a ≠ b ∧ H.Adj a u ∧ H.Adj b u) + (R : List V) (hR : R.Nodup) (hRchain : R.IsChain H.Adj) + (hRhead : R.head? = some u) (hRoutside : ∀ v ∈ R, v ∉ E) : + ∃ L : List V, L.Nodup ∧ L.IsChain H.Adj ∧ L.head? = some w ∧ + L.length = E.card + R.length ∧ ∀ v ∈ L, v ∈ E ∨ v ∈ R := by + obtain ⟨a, ha, b, hb, hab, hau, hbu⟩ := hattach + have hex : ∃ b ∈ E, w ≠ b ∧ H.Adj b u := by + by_cases hwa : w = a + · exact ⟨b, hb, hwa ▸ hab, hbu⟩ + · exact ⟨a, ha, hwa, hau⟩ + obtain ⟨b', hb', hwb', hb'u⟩ := hex + obtain ⟨P, hP, hPchain, hPlen, hPhead, hPlast, hPmem⟩ := + exists_clique_traversal hclique hw hb' hwb' + have hnodup : (P ++ R).Nodup := by + apply List.nodup_append.mpr + refine ⟨hP, hR, ?_⟩ + intro a ha b hb heq + subst b + exact hRoutside a hb (hPmem a ha) + have hchain : (P ++ R).IsChain H.Adj := by + apply List.isChain_append.mpr + refine ⟨hPchain, hRchain, ?_⟩ + intro a ha b hb + have hae : b' = a := by simpa only [hPlast, Option.mem_some_iff] using ha + have hbe : u = b := by simpa only [hRhead, Option.mem_some_iff] using hb + exact hae ▸ hbe ▸ hb'u + refine ⟨P ++ R, hnodup, hchain, ?_, by simp only [List.length_append, hPlen], ?_⟩ + · simp only [List.head?_append, hPhead, Option.some_or] + · intro v hv + rcases List.mem_append.mp hv with hv | hv + · exact Or.inl (hPmem v hv) + · exact Or.inr hv + +theorem no_colored_path_list_bound {V : Type*} {H : SimpleGraph V} + {x y z : V} (hxy : H.Adj x y) (hxz : H.Adj x z) + (χ : V → Fin 2) (hyz : χ y ≠ χ z) {ℓ : ℕ} (hℓ : 1 ≤ ℓ) + (hno : ¬ ∃ g : Fin (ℓ + 1) → V, IsIndexedPath H g ∧ + χ (g 0) ≠ χ (g (Fin.last ℓ))) + {L : List V} (hL : L.Nodup) (hchain : L.IsChain H.Adj) + (hhead : L.head? = some x) (havoid : ∀ v ∈ L, v ≠ y ∧ v ≠ z) : + L.length < ℓ := by + cases L with + | nil => simp only [List.length_nil]; omega + | cons a L => + let f : Fin (L.length + 1) → V := (a :: L).get + have hf : IsIndexedPath H f := indexedPath_of_list (a :: L) hL hchain rfl + have hstart : f 0 = x := by simpa [f] using hhead + have havoid' : ∀ i, f i ≠ y ∧ f i ≠ z := fun i => havoid _ (List.get_mem _ _) + exact no_colored_path_start_bound hxy hxz χ hyz hℓ hno hf hstart havoid' + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RestrictedLongest.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RestrictedLongest.lean new file mode 100644 index 0000000000000000000000000000000000000000..863be473ee3e744d2c81cf8c6a18a9e645d239ff --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/RestrictedLongest.lean @@ -0,0 +1,67 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.LongestPaths + +namespace OAI + +/-! Maximum fixed-start paths restricted to a specified induced vertex set. -/ + +namespace CycleClique.Construction +theorem exists_longest_path_in {V : Type*} [Fintype V] + (H : SimpleGraph V) (U : Finset V) {x : V} (hx : x ∈ U) : + ∃ r, ∃ f : Fin (r + 1) → V, IsIndexedPath H f ∧ f 0 = x ∧ + (∀ i, f i ∈ U) ∧ + ∀ q (g : Fin (q + 1) → V), IsIndexedPath H g → g 0 = x → + (∀ i, g i ∈ U) → q ≤ r := by + classical + let K := H.induce (U : Set V) + let x' : (U : Set V) := ⟨x, hx⟩ + obtain ⟨r, f, hf, hstart, hmax⟩ := exists_longest_path_from K x' + refine ⟨r, fun i => (f i).val, ⟨Subtype.val_injective.comp hf.1, hf.2⟩, + congrArg Subtype.val hstart, fun i => (f i).property, ?_⟩ + intro q g hg hgs hgU + let g' : Fin (q + 1) → (U : Set V) := fun i => ⟨g i, hgU i⟩ + have hg' : IsIndexedPath K g' := + ⟨fun a b h => hg.1 (congrArg Subtype.val h), hg.2⟩ + exact hmax q g' hg' (Subtype.ext hgs) + +theorem restricted_endpoint_neighbors {V : Type*} [Fintype V] + {H : SimpleGraph V} {U W : Finset V} {x e : V} {r : ℕ} + (hWU : W ⊆ U) + (hmax : ∀ q (g : Fin (q + 1) → V), IsIndexedPath H g → g 0 = x → + (∀ i, g i ∈ U) → q ≤ r) + (he : e ∈ pathEnds H x W r) : + ∀ v ∈ U, H.Adj e v → v ∈ W := by + intro v hvU hev + obtain ⟨f, hf, hlast⟩ := mem_pathEnds.mp he + by_contra hvW + have hnotrange : v ∉ Set.range f := by + rw [hf.2.2.2] + exact hvW + have hp := indexedPath_snoc ⟨hf.1, hf.2.1⟩ hnotrange (by simpa [hlast] using hev) + have hU : ∀ i : Fin (r + 1 + 1), (Fin.snoc f v : Fin (r + 1 + 1) → V) i ∈ U := by + intro i + refine Fin.lastCases ?_ (fun j => ?_) i + · simpa using hvU + · rw [Fin.snoc_castSucc] + apply hWU + change f j ∈ (W : Set V) + rw [← hf.2.2.2] + exact ⟨j, rfl⟩ + have h := hmax (r + 1) (Fin.snoc f v) hp (by simpa using hf.2.2.1) hU + omega + +theorem restricted_endpoint_neighbor_cover {V : Type*} [Fintype V] + {H : SimpleGraph V} {U W : Finset V} {x y z : V} {r : ℕ} + (hWU : W ⊆ U) + (hcover : ∀ u ∈ U, ∀ v, H.Adj u v → v ∈ U ∨ v = y ∨ v = z) + (hmax : ∀ q (g : Fin (q + 1) → V), IsIndexedPath H g → g 0 = x → + (∀ i, g i ∈ U) → q ≤ r) : + ∀ e ∈ pathEnds H x W r, ∀ v, H.Adj e v → v ∈ W ∨ v = y ∨ v = z := by + intro e he v hev + rcases hcover e (hWU (pathEnds_subset H x W r he)) v hev with hvU | hvy | hvz + · exact Or.inl (restricted_endpoint_neighbors hWU hmax he v hvU hev) + · exact Or.inr (Or.inl hvy) + · exact Or.inr (Or.inr hvz) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SameChainReplacement.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SameChainReplacement.lean new file mode 100644 index 0000000000000000000000000000000000000000..551c3ddd962a4320dcba716a053ca813596388a7 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SameChainReplacement.lean @@ -0,0 +1,130 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawReplacement + +namespace OAI + +/-! Representative reconnection when the two targets occur in one chain. -/ + +namespace CycleClique.Construction.RawPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +theorem replace_same_chain (S : RawPathSystem G Q) + {P R : List (List V)} {A B D J : List V} {x y : V} + (hsys : S.chains = P ++ (A ++ (x :: B) ++ y :: D) :: R) + (hA : ∀ v ∈ A.getLast?, v ∈ Q) + (hB : ∀ v ∈ (x :: B).getLast?, v ∈ Q) + (hJ : J.Nodup) (hJQ : ∀ z ∈ J, z ∉ Q) (hJpos : J ≠ []) + (hdis : J.Disjoint S.chains.flatten) + (hpath : (x :: (J ++ [y])).IsChain G.Adj) : + ∃ T : RawPathSystem G Q, + T.chains = P ++ A :: (B.reverse ++ x :: (J ++ y :: D)) :: R ∧ + T.amount = S.amount + J.length := by + classical + let merged := B.reverse ++ x :: (J ++ y :: D) + let K := P ++ A :: merged :: R + have hold : A ++ (x :: B) ++ y :: D ∈ S.chains := by simp [hsys] + have hremain : ∀ l, l ∈ P ∨ l ∈ R → l ∈ S.chains := by + intro l hl + simp only [hsys, List.mem_append, List.mem_cons] + tauto + have hp : K.flatten.Perm (S.chains.flatten ++ J) := by + apply List.perm_iff_count.mpr + intro v + simp only [K, merged, hsys, List.flatten_append, List.flatten_cons, + List.count_append, List.count_cons, List.count_reverse] + omega + have hflat : K.flatten.Nodup := hp.nodup_iff.mpr + (S.flatten_nodup.append hJ hdis.symm) + have hp₀ := List.isChain_append.mp (S.paths _ hold).2 + have hp₁ := List.isChain_append.mp hp₀.1 + have hs₀ := List.isChain_append.mp (S.no_clique_steps _ hold) + have hs₁ := List.isChain_append.mp hs₀.1 + have hmerged : merged.IsChain G.Adj := + reverse_join_chain (fun _ _ h => h.symm) hp₁.2.1 hp₀.2.1 hpath + have hmergedSteps : merged.IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q)) := + reverse_join_chain (fun _ _ h h' => h h'.symm) hs₁.2.1 hs₀.2.1 + (chain_outside_interior_of_ne_nil hJpos hJQ) + have hmergedEq : merged = (x :: B).reverse ++ J ++ (y :: D) := by + simp [merged, List.append_assoc] + have hhead : merged.head? = (x :: B).getLast? := by + rw [hmergedEq, List.append_assoc, + List.head?_append_of_ne_nil _ (by simp), List.head?_reverse] + have hlast : merged.getLast? = (y :: D).getLast? := by + rw [hmergedEq] + have hyD := List.getLast?_eq_some_getLast (show y :: D ≠ [] by simp) + simp only [List.getLast?_append, hyD, Option.or] + let T : RawPathSystem G Q := { + chains := K + paths := by + intro l hl + refine ⟨(List.nodup_flatten.mp hflat).1 l hl, ?_⟩ + simp only [K, List.mem_append, List.mem_cons] at hl + rcases hl with hl | rfl | rfl | hl + · exact (S.paths l (hremain l (Or.inl hl))).2 + · exact hp₁.1 + · exact hmerged + · exact (S.paths l (hremain l (Or.inr hl))).2 + disjoint := (List.nodup_flatten.mp hflat).2 + endpoints := by + intro l hl + simp only [K, List.mem_append, List.mem_cons] at hl + rcases hl with hl | rfl | rfl | hl + · exact S.endpoints l (hremain l (Or.inl hl)) + · refine ⟨?_, hA⟩ + intro v hv + exact (S.endpoints _ hold).1 v + (List.mem_head?_append_of_mem_head? (List.mem_head?_append_of_mem_head? hv)) + · constructor + · intro v hv + rw [hhead] at hv + exact hB v hv + · intro v hv + rw [hlast] at hv + apply (S.endpoints _ hold).2 v + have hs := List.getLast?_eq_some_getLast (show y :: D ≠ [] by simp) + simpa only [List.getLast?_append, hs, Option.or] using hv + · exact S.endpoints l (hremain l (Or.inr hl)) + no_clique_steps := by + intro l hl + simp only [K, List.mem_append, List.mem_cons] at hl + rcases hl with hl | rfl | rfl | hl + · exact S.no_clique_steps l (hremain l (Or.inl hl)) + · exact hs₁.1 + · exact hmergedSteps + · exact S.no_clique_steps l (hremain l (Or.inr hl)) } + refine ⟨T, rfl, amount_union S T ?_ hJ hJQ hdis⟩ + ext v + change v ∈ K.flatten.toFinset ↔ v ∈ S.chains.flatten.toFinset ∪ J.toFinset + simp only [List.mem_toFinset, Finset.mem_union, ← List.mem_append] + exact hp.mem_iff + +theorem same_chain_count {P R : List (List V)} {A B D J : List V} {x y : V} + (hA : ∀ v ∈ A.getLast?, v ∈ Q) + (hB : ∀ v ∈ (x :: B).getLast?, v ∈ Q) + (hD : ∀ v ∈ (y :: D).getLast?, v ∈ Q) + (hJQ : ∀ z ∈ J, z ∉ Q) : + rawAssignedCount Q (P ++ A :: (B.reverse ++ x :: (J ++ y :: D)) :: R) + + (if A = [] then 0 else 1) = + rawAssignedCount Q (P ++ (A ++ (x :: B) ++ y :: D) :: R) := by + have hBpos := chainCliqueCount_pos_last (show x :: B ≠ [] by simp) hB + have hDpos := chainCliqueCount_pos_last (show y :: D ≠ [] by simp) hD + have hJzero := chainCliqueCount_eq_zero hJQ + have heq : B.reverse ++ x :: (J ++ y :: D) = + (x :: B).reverse ++ J ++ (y :: D) := by simp [List.append_assoc] + rw [heq] + simp only [rawAssignedCount, List.map_append, List.map_cons, List.sum_append, + List.sum_cons, chainCliqueCount_append, chainCliqueCount_reverse, hJzero, + Nat.add_zero] + have hnil : chainCliqueCount Q ([] : List V) = 0 := rfl + by_cases ha : A = [] + · simp only [ha, ↓reduceIte, hnil] + omega + · have hApos := chainCliqueCount_pos_last ha hA + simp only [ha, ↓reduceIte] + omega + +end CycleClique.Construction.RawPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SevenEightCycleRamsey.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SevenEightCycleRamsey.lean new file mode 100644 index 0000000000000000000000000000000000000000..ffbdaac902c4d500cc8f654943bd131433042113 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SevenEightCycleRamsey.lean @@ -0,0 +1,38 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CoverageK6 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CoverageK7 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertifiedRamseyReduction + +namespace OAI + +/-! The seven- and eight-cycle main clauses, with all finite obstructions +excluded by finite certificates. -/ + +namespace CycleClique.Construction +theorem certificateCoverageAt_six : CertificateCoverageAt 6 := by + intro t ht htk _ _ + interval_cases t using ht, htk + · exact CertifiedCoverage.coverage_k6_t3 + · exact CertifiedCoverage.coverage_k6_t4 + · exact CertifiedCoverage.coverage_k6_t5 + · exact CertifiedCoverage.coverage_k6_t6 + +theorem certificateCoverageAt_seven : CertificateCoverageAt 7 := by + intro t ht htk _ _ + interval_cases t using ht, htk + · exact CertifiedCoverage.coverage_k7_t3 + · exact CertifiedCoverage.coverage_k7_t4 + · exact CertifiedCoverage.coverage_k7_t5 + · exact CertifiedCoverage.coverage_k7_t6 + · exact CertifiedCoverage.coverage_k7_t7 + +theorem cycle_clique_seven (hCE : CEAlphaTwo) {n : ℕ} (hn : 3 ≤ n) (hnm : n ≤ 7) : + IsRamseyNumber 7 n (6 * (n - 1) + 1) := + isRamseyNumber_of_certificate_coverage hCE (by omega) hn hnm certificateCoverageAt_six + +theorem cycle_clique_eight (hCE : CEAlphaTwo) {n : ℕ} (hn : 3 ≤ n) (hnm : n ≤ 8) : + IsRamseyNumber 8 n (7 * (n - 1) + 1) := + isRamseyNumber_of_certificate_coverage hCE (by omega) hn hnm certificateCoverageAt_seven + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ShortRepresentativePath.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ShortRepresentativePath.lean new file mode 100644 index 0000000000000000000000000000000000000000..9314212c7de929cfedbfe62f25721abcf0e17f0c --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ShortRepresentativePath.lean @@ -0,0 +1,67 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalRepresentative +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RepresentativePacking + +namespace OAI + +/-! Manuscript grow:short: at least nine representatives force a short +outside path, for every orientation of an optimal expanded system. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type} [Fintype V] {G : SimpleGraph V} {Q : Finset V} {S : ExpandedPathSystem G Q} + +theorem IsOptimal.short_representative_path (hCE : CEAlphaTwo) {k : ℕ} + (hopt : S.IsOptimal k) (hk : 5 ≤ k) (ht : 9 ≤ Q.card) + (hQk : Q.card ≤ k) (hkQ : k ≤ 2 * Q.card + 1) + (hQ : G.IsClique (Q : Set V)) (hcycle : ¬ HasCycle G (k + 1)) + (hclique : G.cliqueNum ≤ Q.card) (hbound : IndependenceBound G k) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) : + ∃ x ∈ S.representativeFinset, ∃ y ∈ S.representativeFinset, + x ≠ y ∧ ∃ d, 2 ≤ d ∧ d ≤ 6 ∧ OutsidePath G (S.ground : Set V) x y d := by + have hRcard := S.representativeFinset_card + have hRX := S.representativeFinset_subset_ground + have hXk := hopt.ground_card_le hQk + have hclique' : G.cliqueNum ≤ S.representativeFinset.card := by omega + have hsingle : ∀ v, k + 1 ≤ (closedNeighborhood G {v}).card := by + intro v + simpa using hexpand {v} (by simp) (by simp) + have hf : ∀ x ∈ S.representativeFinset, ∀ y ∈ S.representativeFinset, + x ≠ y → ¬ OutsidePath G (S.ground : Set V) x y 1 := by + intro x hx y hy hne + exact hopt.representativeFinset_one_exclusion (by omega) hQk hQ hcycle hx hy hne + have hshort : ∃ x ∈ S.representativeFinset, ∃ y ∈ S.representativeFinset, + x ≠ y ∧ ∃ d, 1 ≤ d ∧ d ≤ 6 ∧ OutsidePath G (S.ground : Set V) x y d := by + by_cases hlarge : k < 2 * S.representativeFinset.card + · exact exists_short_path_of_twice_card_gt hbound hRX hXk hclique' hsingle hlarge + · have hRk : S.representativeFinset.card < k := by omega + have hspecial : ∃ a ∈ S.representativeFinset, ∃ b ∈ S.representativeFinset, + a ≠ b ∧ ¬ G.IsClique (outsideBallFinset G S.ground a 1 : Set V) ∧ + ¬ G.IsClique (outsideBallFinset G S.ground b 1 : Set V) := by + by_cases he : 2 ≤ S.assignedCount + · exact hopt.two_interior_nonclique_balls (by omega) hQk hQ hcycle hclique hsingle he + · by_cases he0 : S.assignedCount = 0 + · have hL := S.amount_eq_zero_of_assignedCount_eq_zero he0 + have hXcard : S.ground.card < k := by rw [ground_card, hL]; omega + have hnonclique : ∀ x ∈ S.representativeFinset, + ¬ G.IsClique (outsideBallFinset G S.ground x 1 : Set V) := by + intro x hx hC + have hd := representative_ball_one hx hRX hXk hsingle (hf x hx) + have hc := hC.card_le_cliqueNum.trans hclique' + omega + have htwo : 1 < S.representativeFinset.card := by omega + obtain ⟨a, ha, b, hb, hab⟩ := Finset.one_lt_card.mp htwo + exact ⟨a, ha, b, hb, hab, hnonclique a ha, hnonclique b hb⟩ + · have he1 : S.assignedCount = 1 := by omega + exact hopt.two_unused_nonclique_balls (by omega) hQk hQ hcycle hclique hsingle he1 (by omega) + exact exists_short_path_of_two_noncliques hCE hk hbound hRX hXk hRk (by omega) + hcycle hclique' hexpand hspecial + obtain ⟨x, hx, y, hy, hxy, d, hd, hdb, hp⟩ := hshort + have hdne : d ≠ 1 := by intro he; subst d; exact hf x hx y hy hxy hp + exact ⟨x, hx, y, hy, hxy, d, by omega, hdb, hp⟩ + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Shortening.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Shortening.lean new file mode 100644 index 0000000000000000000000000000000000000000..e0d66dab44da4d3e80fa62a033a1de7cc4cac114 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Shortening.lean @@ -0,0 +1,226 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Triangle +import Mathlib.Algebra.Group.Fin.Basic + +namespace OAI + +/-! +# Shortening a Hamiltonian cycle when there is no independent triple + +This is Lemma `size:shortening` of the manuscript. A step-two chord +bypasses one vertex. If all such chords are absent, every step-four edge +is forced, and an explicit reordered cycle omits just vertex zero. +-/ + +namespace CycleClique.Construction +private theorem cycleNext_eq_add_one {r : ℕ} [NeZero r] (hr : 1 < r) (i : Fin r) : + cycleNext i = i + 1 := by + apply Fin.ext + change (i.val + 1) % r = (i.val + 1 % r) % r + rw [Nat.mod_eq_of_lt hr] + +private def skipOne {r : ℕ} (hr : 3 ≤ r) (i : Fin (r - 1)) : Fin r := + ⟨if i.val = 0 then 0 else i.val + 1, by split_ifs <;> omega⟩ + +private theorem skipOne_injective {r : ℕ} (hr : 3 ≤ r) : + Function.Injective (skipOne hr) := by + intro i j h + have heq := congrArg Fin.val h + dsimp [skipOne] at heq + apply Fin.ext + split_ifs at heq <;> omega + +private theorem adjacent_of_successive_values {r : ℕ} {G : SimpleGraph (Fin r)} + (hc : ∀ i, G.Adj i (cycleNext i)) {u v : Fin r} (h : u.val + 1 = v.val) : + G.Adj u v := by + have hn : cycleNext u = v := by + apply Fin.ext + change (u.val + 1) % r = v.val + rw [h, Nat.mod_eq_of_lt v.isLt] + simpa [hn] using hc u + +private theorem shorten_at_zero {r : ℕ} [NeZero r] (hr : 3 ≤ r) + {G : SimpleGraph (Fin r)} (hc : ∀ i, G.Adj i (cycleNext i)) + (hchord : G.Adj 0 2) : HasCycle G (r - 1) := by + refine ⟨skipOne hr, skipOne_injective hr, ?_⟩ + intro i + have hi := i.isLt + by_cases hzero : i.val = 0 + · have h0 : skipOne hr i = 0 := by apply Fin.ext; simp [skipOne, hzero] + have h2 : skipOne hr (cycleNext i) = 2 := by + apply Fin.ext + have hmod : (i.val + 1) % (r - 1) = 1 := by rw [hzero]; exact Nat.mod_eq_of_lt (by omega) + simp only [skipOne, cycleNext, hmod] + change (if 1 = 0 then 0 else 1 + 1) = 2 % r + simp [Nat.mod_eq_of_lt (by omega : 2 < r)] + simpa [h0, h2] using hchord + · by_cases hlast : i.val + 1 = r - 1 + · have hnext : (cycleNext i).val = 0 := by simp [cycleNext, hlast] + have hcycle : cycleNext (skipOne hr i) = skipOne hr (cycleNext i) := by + apply Fin.ext + change ((if i.val = 0 then 0 else i.val + 1) + 1) % r = + if (cycleNext i).val = 0 then 0 else (cycleNext i).val + 1 + simp only [hzero, ↓reduceIte, hnext] + have heq : i.val + 1 + 1 = r := by omega + rw [heq, Nat.mod_self] + simpa [hcycle] using hc (skipOne hr i) + · have hnext : (cycleNext i).val = i.val + 1 := + Nat.mod_eq_of_lt (by omega) + apply adjacent_of_successive_values hc + simp only [skipOne, hzero, ↓reduceIte, hnext] + split_ifs <;> omega + +private def stepFourLabel {r : ℕ} (hr : 7 ≤ r) (i : Fin (r - 1)) : Fin r := + ⟨if i.val < r - 6 then i.val + 1 + else if i.val = r - 6 then r - 2 + else if i.val = r - 5 then r - 1 + else i.val - 1, by split_ifs <;> omega⟩ + +private theorem stepFourLabel_injective {r : ℕ} (hr : 7 ≤ r) : + Function.Injective (stepFourLabel hr) := by + intro i j h + have heq := congrArg Fin.val h + dsimp [stepFourLabel] at heq + apply Fin.ext + split_ifs at heq <;> omega + +private theorem adjacent_of_step_four_values {r : ℕ} [NeZero r] (hr : 7 ≤ r) + {G : SimpleGraph (Fin r)} (hfour : ∀ i, G.Adj i (i + 4)) + {u v : Fin r} (h : (u.val + 4) % r = v.val) : G.Adj u v := by + have hfin : u + 4 = v := by + apply Fin.ext + change (u.val + 4 % r) % r = v.val + rw [Nat.mod_eq_of_lt (by omega : 4 < r)] + exact h + simpa [hfin] using hfour u + +private theorem step_four_cycle {r : ℕ} [NeZero r] (hr : 7 ≤ r) + {G : SimpleGraph (Fin r)} (hc : ∀ i, G.Adj i (cycleNext i)) + (hfour : ∀ i, G.Adj i (i + 4)) : HasCycle G (r - 1) := by + refine ⟨stepFourLabel hr, stepFourLabel_injective hr, ?_⟩ + intro i + have hi := i.isLt + by_cases hlast : i.val = r - 2 + · have hnext : (cycleNext i).val = 0 := by + change (i.val + 1) % (r - 1) = 0 + have heq : i.val + 1 = r - 1 := by omega + rw [heq, Nat.mod_self] + have hu : (stepFourLabel hr i).val = r - 3 := by + simp only [stepFourLabel, hlast] + split_ifs <;> omega + have hv : (stepFourLabel hr (cycleNext i)).val = 1 := by + simp only [stepFourLabel, hnext] + split_ifs <;> omega + apply adjacent_of_step_four_values hr hfour + rw [hu, hv] + have heq : r - 3 + 4 = r + 1 := by omega + rw [heq, Nat.add_mod] + simp [Nat.mod_eq_of_lt (by omega : 1 < r)] + · have hnext : (cycleNext i).val = i.val + 1 := + Nat.mod_eq_of_lt (by omega) + by_cases hfirst : i.val < r - 7 + · apply adjacent_of_successive_values hc + simp only [stepFourLabel, hnext] + split_ifs <;> omega + · by_cases hboundary : i.val = r - 7 + · apply adjacent_of_step_four_values hr hfour + have hu : (stepFourLabel hr i).val = r - 6 := by + simp only [stepFourLabel, hboundary]; split_ifs <;> omega + have hv : (stepFourLabel hr (cycleNext i)).val = r - 2 := by + simp only [stepFourLabel, hnext, hboundary]; split_ifs <;> omega + rw [hu, hv] + have heq : r - 6 + 4 = r - 2 := by omega + rw [heq, Nat.mod_eq_of_lt (by omega)] + · by_cases hpenultimate : i.val = r - 5 + · apply SimpleGraph.Adj.symm + apply adjacent_of_step_four_values hr hfour + have hu : (stepFourLabel hr i).val = r - 1 := by + simp only [stepFourLabel, hpenultimate]; split_ifs <;> omega + have hv : (stepFourLabel hr (cycleNext i)).val = r - 5 := by + simp only [stepFourLabel, hnext, hpenultimate]; split_ifs <;> omega + rw [hu, hv] + have heq : r - 5 + 4 = r - 1 := by omega + rw [heq, Nat.mod_eq_of_lt (by omega)] + · apply adjacent_of_successive_values hc + simp only [stepFourLabel, hnext] + split_ifs <;> omega + +/-- Labelled form of the manuscript's cycle-shortening lemma. -/ +theorem labelled_cycle_shortening {r : ℕ} (hr : 7 ≤ r) + {G : SimpleGraph (Fin r)} (hc : ∀ i, G.Adj i (cycleNext i)) + (hi : ¬ HasIndependent G 3) : HasCycle G (r - 1) := by + let : NeZero r := ⟨by omega⟩ + by_cases hchord : ∃ i : Fin r, G.Adj i (i + 2) + · obtain ⟨a, ha⟩ := hchord + let H : SimpleGraph (Fin r) := G.comap (fun i => a + i) + have hH : ∀ i, H.Adj i (cycleNext i) := by + intro i + change G.Adj (a + i) (a + cycleNext i) + rw [cycleNext_eq_add_one (by omega), ← add_assoc, + ← cycleNext_eq_add_one (by omega)] + exact hc (a + i) + have hH02 : H.Adj 0 2 := by change G.Adj (a + 0) (a + 2); simpa using ha + exact (shorten_at_zero (by omega) hH hH02).map (fun i => a + i) + (add_right_injective a) (fun h => h) + · have htwo : ∀ i : Fin r, ¬ G.Adj i (i + 2) := by simpa using hchord + have hconst : (2 : Fin r) + 2 = 4 := by + apply Fin.ext + change (2 % r + 2 % r) % r = 4 % r + rw [Nat.mod_eq_of_lt (by omega : 2 < r), Nat.mod_eq_of_lt (by omega : 4 < r)] + have hval2 : (2 : Fin r).val = 2 := by + change 2 % r = 2 + exact Nat.mod_eq_of_lt (by omega) + have hval4 : (4 : Fin r).val = 4 := by + change 4 % r = 4 + exact Nat.mod_eq_of_lt (by omega) + have h02 : (0 : Fin r) ≠ 2 := by + intro h + have hv := congrArg Fin.val h + rw [Fin.val_zero, hval2] at hv + omega + have h04 : (0 : Fin r) ≠ 4 := by + intro h + have hv := congrArg Fin.val h + rw [Fin.val_zero, hval4] at hv + omega + have h24 : (2 : Fin r) ≠ 4 := by + intro h + have hv := congrArg Fin.val h + rw [hval2, hval4] at hv + omega + have hfour : ∀ i : Fin r, G.Adj i (i + 4) := by + intro i + by_contra hnot + have hi2 : i ≠ i + 2 := by simpa using (add_right_injective i).ne h02 + have hi4 : i ≠ i + 4 := by simpa using (add_right_injective i).ne h04 + have hi24 : i + 2 ≠ i + 4 := (add_right_injective i).ne h24 + have hnot24 : ¬ G.Adj (i + 2) (i + 4) := by + simpa [add_assoc, hconst] using htwo (i + 2) + exact hi (hasIndependent_three_of_distinct_nonadjacent hi2 hi4 hi24 + (htwo i) hnot hnot24) + exact step_four_cycle hr hc hfour + +/-- A Hamiltonian cycle on at least seven vertices can be shortened by one +when the graph has no independent triple (manuscript Lemma `size:shortening`). -/ +theorem cycle_shortening {V : Type*} {r : ℕ} (hr : 7 ≤ r) {G : SimpleGraph V} + (hc : HasCycle G r) (hi : ¬ HasIndependent G 3) : HasCycle G (r - 1) := by + obtain ⟨f, hf, he⟩ := hc + let H : SimpleGraph (Fin r) := G.comap f + have hH : ∀ i, H.Adj i (cycleNext i) := he + have hI : ¬ HasIndependent H 3 := fun h => hi (h.map f hf (fun h => h)) + exact (labelled_cycle_shortening hr hH hI).map f hf (fun h => h) + +/-- Repeated shortening reaches every prescribed order at least six. -/ +theorem cycle_shorten_to {V : Type*} {G : SimpleGraph V} {q r : ℕ} + (hq : 6 ≤ q) (hqr : q ≤ r) (hc : HasCycle G r) + (hi : ¬ HasIndependent G 3) : HasCycle G q := by + obtain ⟨d, rfl⟩ := Nat.exists_eq_add_of_le hqr + induction d with + | zero => simpa using hc + | succ d ih => + apply ih (by omega) + have hshort := cycle_shortening (by omega : 7 ≤ q + (d + 1)) hc hi + simpa using hshort + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SingleAttachment.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SingleAttachment.lean new file mode 100644 index 0000000000000000000000000000000000000000..3688cb6040a13b890b38c81b7490f4c3c2971308 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SingleAttachment.lean @@ -0,0 +1,63 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.EndpointFullAttachment + +namespace OAI + +/-! Deleting a set with one attachment preserves connectivity. -/ + +namespace CycleClique.Construction +theorem connected_outside_single_attachment {V : Type*} {G : SimpleGraph V} + (hconn : G.Connected) {E : Finset V} {u : V} (hu : u ∉ E) + (hattach : ∀ e ∈ E, ∀ v, G.Adj e v → v ∉ E → v = u) : + (G.induce {v | v ∉ E}).Connected := by + classical + let f : V → {v : V | v ∉ E} := fun v => if hv : v ∈ E then ⟨u, hu⟩ else ⟨v, hv⟩ + let : Nonempty {v : V | v ∉ E} := ⟨⟨u, hu⟩⟩ + have hedge : ∀ a b, G.Adj a b → + (G.induce {v | v ∉ E}).Reachable (f a) (f b) := by + intro a b hab + by_cases ha : a ∈ E + · by_cases hb : b ∈ E + · simp only [f, dite_eq_left ha, dite_eq_left hb] + exact SimpleGraph.Reachable.refl _ + · have heq := hattach a ha b hab hb + subst b + simp only [f, dite_eq_left ha, dite_eq_right hu] + exact SimpleGraph.Reachable.refl _ + · by_cases hb : b ∈ E + · have heq := hattach b hb a hab.symm ha + subst a + simp only [f, dite_eq_right hu, dite_eq_left hb] + exact SimpleGraph.Reachable.refl _ + · simp only [f, dite_eq_right ha, dite_eq_right hb] + exact (show (G.induce {v | v ∉ E}).Adj ⟨a, ha⟩ ⟨b, hb⟩ from hab).reachable + have hmap : ∀ a b, G.Reachable a b → + (G.induce {v | v ∉ E}).Reachable (f a) (f b) := by + intro a b hr + obtain ⟨p⟩ := hr + induction p with + | nil => exact SimpleGraph.Reachable.refl _ + | @cons a b c hab p ih => exact (hedge a b hab).trans ih + refine ⟨?_⟩ + intro a b + have h := hmap a.val b.val (hconn a.val b.val) + simpa only [f, dite_eq_right a.property, dite_eq_right b.property] using h + +theorem neighbors_outside_single_attachment {V : Type*} {G : SimpleGraph V} + {E : Finset V} {u v : V} (hv : v ∉ E) (hvu : v ≠ u) + (hattach : ∀ e ∈ E, ∀ w, G.Adj e w → w ∉ E → w = u) : + G.neighborSet v ⊆ {w | w ∉ E} := by + intro w hvw hw + exact hvu (hattach w hw v hvw.symm hv) + +theorem degree_outside_single_attachment {V : Type*} [Fintype V] {G : SimpleGraph V} + {E : Finset V} {u : V} (v : {v : V | v ∉ E}) (hvu : v.val ≠ u) + (hattach : ∀ e ∈ E, ∀ w, G.Adj e w → w ∉ E → w = u) : + ((G.induce {v | v ∉ E}).neighborSet v).ncard = (G.neighborSet v.val).ncard := by + classical + simp only [SimpleGraph.ncard_neighborSet] + exact G.degree_induce_of_neighborSet_subset + (neighbors_outside_single_attachment v.property hvu hattach) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SixCycleRamsey.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SixCycleRamsey.lean new file mode 100644 index 0000000000000000000000000000000000000000..165a7bcb7af9784b061143d8d01ebe4d86f7568d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SixCycleRamsey.lean @@ -0,0 +1,23 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CoverageK5 +import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertifiedRamseyReduction + +namespace OAI + +/-! The full six-cycle main clause, with its seven finite obstructions +excluded by finite certificates. -/ + +namespace CycleClique.Construction +theorem certificateCoverageAt_five : CertificateCoverageAt 5 := by + intro t ht htk _ _ + interval_cases t using ht, htk + · exact CertifiedCoverage.coverage_k5_t3 + · exact CertifiedCoverage.coverage_k5_t4 + · exact CertifiedCoverage.coverage_k5_t5 + +theorem cycle_clique_six (hCE : CEAlphaTwo) {n : ℕ} (hn : 3 ≤ n) (hnm : n ≤ 6) : + IsRamseyNumber 6 n (5 * (n - 1) + 1) := + isRamseyNumber_of_certificate_coverage hCE (by omega) hn hnm certificateCoverageAt_five + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Size.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Size.lean new file mode 100644 index 0000000000000000000000000000000000000000..a5456842b1b063d6e910328dd47ff196bb949692 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Size.lean @@ -0,0 +1,180 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PublishedInputs +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Shortening + +namespace OAI + +/-! +# The manuscript's size test, conditional on Chvátal–Erdős + +An induced vertex set larger than both `k` and twice the clique number +has an independent triple in a graph with no exact `(k + 1)`-cycle. +The only published hypothesis is `CEAlphaTwo`; the disconnected and +cutvertex cases and exact-cycle shortening are proved here. +-/ + +namespace CycleClique.Construction +private structure TwoCliquePartition {V : Type*} [Fintype V] [DecidableEq V] + (G : SimpleGraph V) where + left : Finset V + right : Finset V + cover : left ∪ right = Finset.univ + disjoint : Disjoint left right + left_clique : G.IsClique (left : Set V) + right_clique : G.IsClique (right : Set V) + anticomplete : ∀ x ∈ left, ∀ y ∈ right, ¬ G.Adj x y + +private theorem two_clique_partition {V : Type*} [Fintype V] [DecidableEq V] [Nonempty V] + {G : SimpleGraph V} (hi : ¬ HasIndependent G 3) (hn : ¬ G.Connected) : + Nonempty (TwoCliquePartition G) := by + classical + have hnp : ¬ G.Preconnected := fun h => hn ⟨h⟩ + change ¬ ∀ u v, G.Reachable u v at hnp + push Not at hnp + obtain ⟨u, v, huv⟩ := hnp + let A : Finset V := Finset.univ.filter (G.Reachable u) + let B : Finset V := Finset.univ.filter (fun x => ¬ G.Reachable u x) + have hcross : ∀ x ∈ A, ∀ y ∈ B, ¬ G.Adj x y := by + intro x hx y hy hadj + exact (Finset.mem_filter.mp hy).2 (((Finset.mem_filter.mp hx).2).trans hadj.reachable) + have hA : G.IsClique (A : Set V) := by + intro x hx y hy hxy + by_contra hnxy + have hxv : x ≠ v := by + intro h; subst x; exact huv (Finset.mem_filter.mp hx).2 + have hyv : y ≠ v := by + intro h; subst y; exact huv (Finset.mem_filter.mp hy).2 + have hv : v ∈ B := by simp [B, huv] + exact hi (hasIndependent_three_of_distinct_nonadjacent hxy hxv hyv hnxy + (hcross x hx v hv) (hcross y hy v hv)) + have hB : G.IsClique (B : Set V) := by + intro x hx y hy hxy + by_contra hnxy + have hu : u ∈ A := by simp [A] + have hxu : x ≠ u := by + intro h; subst x; exact (Finset.mem_filter.mp hx).2 .rfl + have hyu : y ≠ u := by + intro h; subst y; exact (Finset.mem_filter.mp hy).2 .rfl + exact hi (hasIndependent_three_of_distinct_nonadjacent hxy hxu hyu hnxy + (fun h => hcross u hu x hx h.symm) (fun h => hcross u hu y hy h.symm)) + refine ⟨⟨A, B, ?_, ?_, hA, hB, hcross⟩⟩ + · ext x + simp [A, B] + exact Classical.em _ + · apply Finset.disjoint_left.mpr + intro x hx hy + exact (Finset.mem_filter.mp hy).2 (Finset.mem_filter.mp hx).2 + +private theorem TwoCliquePartition.card {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} (p : TwoCliquePartition G) : + p.left.card + p.right.card = Fintype.card V := by + classical + rw [← Finset.card_union_of_disjoint p.disjoint, p.cover, Finset.card_univ] + +private theorem connected_of_no_independent_triple {V : Type*} [Fintype V] + {G : SimpleGraph V} {t : ℕ} (hi : ¬ HasIndependent G 3) + (ht : G.cliqueNum ≤ t) (hcard : 2 * t < Fintype.card V) : G.Connected := by + classical + let : Nonempty V := Fintype.card_pos_iff.mp (by omega) + by_contra hn + obtain ⟨p⟩ := two_clique_partition hi hn + have hA := p.left_clique.card_le_cliqueNum.trans ht + have hB := p.right_clique.card_le_cliqueNum.trans ht + have := p.card + omega + +private theorem joined_clique_card {V : Type*} [Fintype V] {G : SimpleGraph V} + (v : V) (A : Finset {w : V | w ≠ v}) + (hA : (G.induce {w | w ≠ v}).IsClique (A : Set {w : V | w ≠ v})) + (hjoin : ∀ a ∈ A, G.Adj v a.val) : A.card + 1 ≤ G.cliqueNum := by + classical + let A' : Finset V := A.map ⟨Subtype.val, Subtype.val_injective⟩ + have hA' : G.IsClique (A' : Set V) := by + intro x hx y hy hxy + obtain ⟨a, ha, rfl⟩ := Finset.mem_map.mp hx + obtain ⟨b, hb, rfl⟩ := Finset.mem_map.mp hy + exact hA ha hb (fun h => hxy (congrArg Subtype.val h)) + have hv : v ∉ A' := by + intro h + obtain ⟨a, _, ha⟩ := Finset.mem_map.mp h + exact a.property ha + have hQ : G.IsClique ((insert v A' : Finset V) : Set V) := by + rw [Finset.coe_insert] + apply hA'.insert + intro x hx _ + obtain ⟨a, ha, rfl⟩ := Finset.mem_map.mp hx + exact hjoin a ha + simpa [Finset.card_insert_of_notMem hv, A'] using hQ.card_le_cliqueNum + +private theorem deletion_connected_of_no_independent_triple {V : Type*} [Fintype V] + {G : SimpleGraph V} {t : ℕ} (hi : ¬ HasIndependent G 3) + (ht : G.cliqueNum ≤ t) (hcard : 2 * t < Fintype.card V) + (htpos : 1 ≤ t) (v : V) : (G.induce {w | w ≠ v}).Connected := by + classical + let W := {w : V | w ≠ v} + let H : SimpleGraph W := G.induce {w | w ≠ v} + have hW : Fintype.card W = Fintype.card V - 1 := by + change Fintype.card {w : V // ¬ w = v} = Fintype.card V - 1 + rw [Fintype.card_subtype_compl] + simp + let : Nonempty W := Fintype.card_pos_iff.mp (by omega) + have hI : ¬ HasIndependent H 3 := fun h => hi (h.map Subtype.val Subtype.val_injective (fun h => h)) + by_contra hn + obtain ⟨p⟩ := two_clique_partition hI hn + have hH : H.cliqueNum ≤ t := (G.cliqueNum_induce_le _).trans ht + have hA := p.left_clique.card_le_cliqueNum.trans hH + have hB := p.right_clique.card_le_cliqueNum.trans hH + have hsum := p.card + have hAeq : p.left.card = t := by omega + have hBeq : p.right.card = t := by omega + have hjoin : (∀ a ∈ p.left, G.Adj v a.val) ∨ (∀ b ∈ p.right, G.Adj v b.val) := by + by_cases hleft : ∀ a ∈ p.left, G.Adj v a.val + · exact Or.inl hleft + · right + push Not at hleft + obtain ⟨a, ha, hna⟩ := hleft + intro b hb + by_contra hnb + have hab : a.val ≠ b.val := by + intro h + have heq : a = b := Subtype.ext h + exact Finset.disjoint_left.mp p.disjoint ha (heq.symm ▸ hb) + exact hi (hasIndependent_three_of_distinct_nonadjacent a.property.symm b.property.symm hab + hna hnb (p.anticomplete a ha b hb)) + rcases hjoin with hjoin | hjoin + · have h := (joined_clique_card v p.left p.left_clique hjoin).trans ht + omega + · have h := (joined_clique_card v p.right p.right_clique hjoin).trans ht + omega + +/-- The size test on the whole finite graph, conditional only on the +published Chvátal–Erdős input. -/ +theorem size_test_graph (hCE : CEAlphaTwo) {V : Type} [Fintype V] + {G : SimpleGraph V} {k t : ℕ} (hk : 5 ≤ k) (ht : 1 ≤ t) + (hcycle : ¬ HasCycle G (k + 1)) (hclique : G.cliqueNum ≤ t) + (hcard : max k (2 * t) < Fintype.card V) : HasIndependent G 3 := by + classical + by_contra hi + have hcardk : k < Fintype.card V := (le_max_left _ _).trans_lt hcard + have hcardt : 2 * t < Fintype.card V := (le_max_right _ _).trans_lt hcard + have hconn := connected_of_no_independent_triple hi hclique hcardt + have hdel := deletion_connected_of_no_independent_triple hi hclique hcardt ht + have hham := hCE V G (by omega) hconn hdel hi + exact hcycle (cycle_shorten_to (by omega) (by omega) hham hi) + +/-- Manuscript Lemma `size:test`: every sufficiently large vertex set +contains three independent vertices. -/ +theorem size_test (hCE : CEAlphaTwo) {V : Type} [Fintype V] + {G : SimpleGraph V} {k t : ℕ} (hk : 5 ≤ k) (ht : 1 ≤ t) + (hcycle : ¬ HasCycle G (k + 1)) (hclique : G.cliqueNum ≤ t) + (Y : Finset V) (hY : max k (2 * t) < Y.card) : + HasIndependent (G.induce (Y : Set V)) 3 := by + classical + apply size_test_graph hCE hk ht + · intro hc + exact hcycle (hc.map Subtype.val Subtype.val_injective (fun h => h)) + · exact (G.cliqueNum_induce_le _).trans hclique + · simpa using hY + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallCycleGeometry.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallCycleGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..60b9739e90a2fcfae179769ffdb89977b9eaabc2 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallCycleGeometry.lean @@ -0,0 +1,106 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FullLargeClique +import OAI.Combinatorics.Ramsey.CycleClique.Construction.WalkCycle + +namespace OAI + +/-! Exact short-cycle constructions and exterior-neighbour counts for Section 4. -/ + +namespace CycleClique.Construction +theorem hasCycle_of_closed_list {V : Type*} {G : SimpleGraph V} (L : List V) + (hnd : L.Nodup) (hchain : L.IsChain G.Adj) (hlen : 3 ≤ L.length) + (hclose : ∀ a ∈ L.head?, ∀ b ∈ L.getLast?, G.Adj b a) : HasCycle G L.length := by + have hne : L ≠ [] := by intro h; simp [h] at hlen + let p := SimpleGraph.Walk.ofSupport L hne hchain + have hp : p.IsPath := by + apply SimpleGraph.Walk.IsPath.mk' + simpa only [p, SimpleGraph.Walk.support_ofSupport] using hnd + have hplength : p.length = L.length - 1 := SimpleGraph.Walk.length_ofSupport hne hchain + have hedge : G.Adj (L.getLast hne) (L.head hne) := + hclose _ (List.head?_eq_some_head hne) _ (List.getLast?_eq_some_getLast hne) + have hcycle := hasCycle_of_path_close hp (by omega) hedge + have hlen' : p.length + 1 = L.length := by omega + simpa only [hlen'] using hcycle + +theorem hasCycle_four_of_edges {V : Type*} {G : SimpleGraph V} {a b c d : V} + (hab : G.Adj a b) (hbc : G.Adj b c) (hcd : G.Adj c d) (hda : G.Adj d a) + (hac : a ≠ c) (hbd : b ≠ d) : HasCycle G 4 := by + have hab' := hab.ne + have hbc' := hbc.ne + have hcd' := hcd.ne + have hda' := hda.ne + have hnd : ([a, b, c, d] : List V).Nodup := by simp [hab', hbc', hcd', hda'.symm, hac, hbd] + have h := hasCycle_of_closed_list (G := G) [a, b, c, d] hnd + (by simp [List.isChain_cons_cons, hab, hbc, hcd]) (by simp) (by simpa using hda) + exact h + +theorem hasCycle_five_of_edges {V : Type*} {G : SimpleGraph V} {a b c d e : V} + (hnd : ([a, b, c, d, e] : List V).Nodup) + (hab : G.Adj a b) (hbc : G.Adj b c) (hcd : G.Adj c d) + (hde : G.Adj d e) (hea : G.Adj e a) : HasCycle G 5 := by + exact hasCycle_of_closed_list [a, b, c, d, e] hnd + (by simp [List.isChain_cons_cons, hab, hbc, hcd, hde]) (by simp) (by simpa using hea) + +noncomputable def exteriorNeighbors {V : Type*} [Fintype V] + (G : SimpleGraph V) (Q : Finset V) (q : V) : Finset V := by + classical + exact G.neighborFinset q \ Q + +@[simp] theorem mem_exteriorNeighbors {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Finset V} {q v : V} : + v ∈ exteriorNeighbors G Q q ↔ G.Adj q v ∧ v ∉ Q := by + classical + simp only [exteriorNeighbors, Finset.mem_sdiff, SimpleGraph.mem_neighborFinset] + +theorem exteriorNeighbors_card_lower {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q : Finset V} {q : V} {k : ℕ} (hq : q ∈ Q) + (hexpand : k + 1 ≤ (closedNeighborhood G {q}).card) : + k + 1 ≤ Q.card + (exteriorNeighbors G Q q).card := by + classical + have hsub : closedNeighborhood G {q} ⊆ Q ∪ exteriorNeighbors G Q q := by + intro v hv + by_cases hvQ : v ∈ Q + · exact Finset.mem_union_left _ hvQ + · apply Finset.mem_union_right + apply mem_exteriorNeighbors.mpr + refine ⟨?_, hvQ⟩ + rcases mem_closedNeighborhood.mp hv with hv | ⟨u, hu, huv⟩ + · have heq : v = q := Finset.mem_singleton.mp hv + exact False.elim (hvQ (heq ▸ hq)) + · have heq : u = q := Finset.mem_singleton.mp hu + simpa only [heq] using huv + exact hexpand.trans ((Finset.card_le_card hsub).trans (Finset.card_union_le _ _)) + +/-- Outside a triangle, a common neighbour of two triangle vertices creates a four-cycle. -/ +theorem fourCycle_triangle_exterior_disjoint {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Finset V} (hQ : G.IsClique (Q : Set V)) (hQcard : Q.card = 3) + (hcycle : ¬ HasCycle G 4) {x y : V} (hx : x ∈ Q) (hy : y ∈ Q) (hxy : x ≠ y) : + Disjoint (exteriorNeighbors G Q x) (exteriorNeighbors G Q y) := by + classical + have hsmall : ({x, y} : Finset V).card < Q.card := by simp only [Finset.card_pair hxy, hQcard]; omega + obtain ⟨z, hzQ, hz⟩ := Finset.exists_mem_notMem_of_card_lt_card hsmall + have hnot : z ≠ x ∧ z ≠ y := by simpa only [Finset.mem_insert, Finset.mem_singleton, not_or] using hz + have hzx : z ≠ x := hnot.1 + have hzy : z ≠ y := hnot.2 + apply Finset.disjoint_left.mpr + intro u hu hv + obtain ⟨hxu, huQ⟩ := mem_exteriorNeighbors.mp hu + obtain ⟨hyu, _⟩ := mem_exteriorNeighbors.mp hv + exact hcycle (hasCycle_four_of_edges hxu hyu.symm (hQ hy hzQ hzy.symm) + (hQ hzQ hx hzx) hxy (ne_of_mem_of_not_mem hzQ huQ).symm) + +/-- Edges between two triangle exterior classes create a four-cycle. -/ +theorem fourCycle_triangle_exterior_anticomplete {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Finset V} (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G 4) {x y u v : V} + (hx : x ∈ Q) (hy : y ∈ Q) (hxy : x ≠ y) + (hu : u ∈ exteriorNeighbors G Q x) (hv : v ∈ exteriorNeighbors G Q y) : + ¬ G.Adj u v := by + obtain ⟨hxu, huQ⟩ := mem_exteriorNeighbors.mp hu + obtain ⟨hyv, hvQ⟩ := mem_exteriorNeighbors.mp hv + intro huv + exact hcycle (hasCycle_four_of_edges hxu huv hyv.symm (hQ hy hx hxy.symm) + (ne_of_mem_of_not_mem hx hvQ) (ne_of_mem_of_not_mem hy huQ).symm) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallCycleRamsey.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallCycleRamsey.lean new file mode 100644 index 0000000000000000000000000000000000000000..a1a4567e95cfdc47366c24ea3d854558c1a538ec --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallCycleRamsey.lean @@ -0,0 +1,38 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RamseyMainReduction +import OAI.Combinatorics.Ramsey.CycleClique.Construction.SmallFourCycle +import OAI.Combinatorics.Ramsey.CycleClique.Construction.SmallFiveCycle + +namespace OAI + +/-! The unconditional main formula for cycle lengths four and five. -/ + +namespace CycleClique.Construction +theorem cycle_clique_four_upper {a : ℕ} (ha : 2 ≤ a) (hak : a ≤ 3) : + RamseyProperty 4 (a + 1) (3 * a + 1) := by + apply ramseyProperty_of_expanded_exclusion (by omega) ha hak + intro b hb hbk G hcycle hI hexpand + exact no_expanded_fourCycle_counterexample hb hbk (by simp) hI hcycle hexpand + +theorem cycle_clique_five_upper {a : ℕ} (ha : 2 ≤ a) (hak : a ≤ 4) : + RamseyProperty 5 (a + 1) (4 * a + 1) := by + apply ramseyProperty_of_expanded_exclusion (by omega) ha hak + intro b hb hbk G hcycle hI hexpand + exact no_expanded_fiveCycle_counterexample hb hbk (by simp) hI hcycle hexpand + +theorem cycle_clique_four {n : ℕ} (hn : 3 ≤ n) (hnm : n ≤ 4) : + IsRamseyNumber 4 n (3 * (n - 1) + 1) := by + apply isRamseyNumber_of_upper_lower + · have hn' : n - 1 + 1 = n := by omega + simpa only [hn'] using cycle_clique_four_upper (a := n - 1) (by omega) (by omega) + · exact blockGraph_not_ramsey (by omega) (by omega) + +theorem cycle_clique_five {n : ℕ} (hn : 3 ≤ n) (hnm : n ≤ 5) : + IsRamseyNumber 5 n (4 * (n - 1) + 1) := by + apply isRamseyNumber_of_upper_lower + · have hn' : n - 1 + 1 = n := by omega + simpa only [hn'] using cycle_clique_five_upper (a := n - 1) (by omega) (by omega) + · exact blockGraph_not_ramsey (by omega) (by omega) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallFiveCycle.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallFiveCycle.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef8dbc05e3914e53feba842dc0acde21fee1bfd2 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallFiveCycle.lean @@ -0,0 +1,60 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiveCycleExteriorSix + +namespace OAI + +/-! Manuscript Proposition `small:cases`, the five-cycle case. -/ + +namespace CycleClique.Construction +theorem no_expanded_fiveCycle_counterexample {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {a : ℕ} (ha : 2 ≤ a) (hak : a ≤ 4) + (hcard : Fintype.card V = 4 * a + 1) (hI : IndependenceBound G a) + (hcycle : ¬ HasCycle G 5) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + 4 * I.card + 1 ≤ (closedNeighborhood G I).card) : False := by + classical + have horder : Fintype.card V ≤ 17 := by omega + have hsingleton : ∀ v, 5 ≤ (closedNeighborhood G {v}).card := by + intro v + simpa only [Finset.card_singleton, Nat.mul_one] using hexpand {v} (by simp) (by simp) + obtain ⟨htriangle, hupper⟩ := triangle_clique_bounds (by omega) ha hak hcard hI hcycle + have hω : G.cliqueNum ≤ 3 := by + by_contra hn + have hω4 : G.cliqueNum = 4 := by omega + obtain ⟨Q, hQ⟩ := G.exists_isNClique_cliqueNum + exact fiveCycle_fourClique_impossible hcycle horder hsingleton hQ.isClique (hQ.card_eq.trans hω4) + have hω3 : G.cliqueNum = 3 := by omega + obtain ⟨Q, hQ⟩ := G.exists_isNClique_cliqueNum + have hQcard : Q.card = 3 := hQ.card_eq.trans hω3 + let e : Fin 3 ≃ Q := (Finset.equivFinOfCardEq hQcard).symm + let q : Fin 3 → V := fun i => (e i).val + have hq : Function.Injective q := Subtype.val_injective.comp e.injective + have hqQ : ∀ i, q i ∈ Q := fun i => (e i).property + have hdis : ∀ T : Finset V, G.IsClique (T : Set V) → T.card = 3 → + ∀ x ∈ T, ∀ y ∈ T, x ≠ y → Disjoint (exteriorNeighbors G T x) (exteriorNeighbors G T y) := by + intro T hT hTcard x hx y hy hxy + exact fiveCycle_triangle_exterior_disjoint hT hTcard hcycle hω horder hexpand hx hy hxy + have hQdis := hdis Q hQ.isClique hQcard + have hstructure := fiveCycle_disjoint_triangle_structure hQ.isClique hQcard hcycle hω horder hexpand hQdis q hq hqQ + let U := fun i => exteriorNeighbors G Q (q i) + let C := fun i => exteriorClosedNeighborhood G Q (U i) + have hCdis : ∀ i j, i ≠ j → Disjoint (C i) (C j) := by + intro i j hij + exact fiveCycle_exterior_closed_disjoint hQ.isClique (by omega) hcycle (hqQ i) (hqQ j) + (fun h => hij (hq h)) (fun _ h => h) (fun _ h => h) + (hQdis _ (hqQ i) _ (hqQ j) (fun h => hij (hq h))) + have hCsix : ∀ i, 6 ≤ (C i).card := by + intro i + obtain ⟨hUcard, hUclique⟩ := hstructure i + exact fiveCycle_exterior_closed_six (fun _ h => h) hUclique hUcard + (fun u hu x hx hux => exterior_unique_clique_neighbor hQdis (hqQ i) hu hx hux) hsingleton hdis + have hsum := Finset.sum_le_sum (s := (Finset.univ : Finset (Fin 3))) + (f := fun _ => 6) (g := fun i => (C i).card) (fun i _ => hCsix i) + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, smul_eq_mul] at hsum + have hbound := exterior_disjoint_sum_bound Finset.univ U (fun i _ j _ hij => hCdis i j hij) + rw [hQcard] at hbound + change 3 + ∑ i : Fin 3, (C i).card ≤ Fintype.card V at hbound + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallFourCycle.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallFourCycle.lean new file mode 100644 index 0000000000000000000000000000000000000000..f60329f26af24e8551511c173da3c5ccf99286ef --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallFourCycle.lean @@ -0,0 +1,94 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FourCycleClassCounts + +namespace OAI + +/-! Manuscript Proposition `small:cases`, the four-cycle case. -/ + +namespace CycleClique.Construction +theorem no_expanded_fourCycle_counterexample {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {a : ℕ} (ha : 2 ≤ a) (hak : a ≤ 3) + (hcard : Fintype.card V = 3 * a + 1) (hI : IndependenceBound G a) + (hcycle : ¬ HasCycle G 4) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + 3 * I.card + 1 ≤ (closedNeighborhood G I).card) : False := by + classical + obtain ⟨hlo, hhi⟩ := triangle_clique_bounds (by omega) ha hak hcard hI hcycle + have hω : G.cliqueNum = 3 := by omega + obtain ⟨Q, hQ⟩ := G.exists_isNClique_cliqueNum + have hQcard : Q.card = 3 := hQ.card_eq.trans hω + let e : Fin 3 ≃ Q := (Finset.equivFinOfCardEq hQcard).symm + let q : Fin 3 → V := fun i => (e i).val + have hq : Function.Injective q := Subtype.val_injective.comp e.injective + have hqQ : ∀ i, q i ∈ Q := fun i => (e i).property + have hqcover : ∀ x ∈ Q, ∃ i, q i = x := by + intro x hx + refine ⟨e.symm ⟨x, hx⟩, ?_⟩ + exact congrArg Subtype.val (e.apply_symm_apply ⟨x, hx⟩) + let U := fun i => exteriorNeighbors G Q (q i) + have hdis : ∀ i j, i ≠ j → Disjoint (U i) (U j) := by + intro i j hij + exact fourCycle_triangle_exterior_disjoint hQ.isClique hQcard hcycle (hqQ i) (hqQ j) + (fun he => hij (hq he)) + have hanti : ∀ i j, i ≠ j → ∀ x ∈ U i, ∀ y ∈ U j, ¬ G.Adj x y := by + intro i j hij x hx y hy + exact fourCycle_triangle_exterior_anticomplete hQ.isClique hcycle (hqQ i) (hqQ j) + (fun he => hij (hq he)) hx hy + have hU : ∀ i, (U i).Nonempty := by + intro i + have hsingleton := hexpand {q i} (by simp) (by simp) + simp only [Finset.card_singleton, Nat.mul_one] at hsingleton + have h := exteriorNeighbors_card_lower (hqQ i) hsingleton + rw [hQcard] at h + have hpos : 0 < (exteriorNeighbors G Q (q i)).card := by omega + exact Finset.card_pos.mp hpos + obtain ⟨ha3, hUclique⟩ := separated_three_cliques hI hak U hU hdis hanti + have hI3 : IndependenceBound G 3 := by simpa only [ha3] using hI + have hmax : ∀ i, (U i).card ≤ 2 := by + intro i + have hqin : q i ∉ U i := by + intro h + exact (mem_exteriorNeighbors.mp h).2 (hqQ i) + have hjoin : G.IsClique ((insert (q i) (U i) : Finset V) : Set V) := by + rw [Finset.coe_insert] + exact (hUclique i).insert (fun u hu _ => (mem_exteriorNeighbors.mp hu).1) + have hbound := hjoin.card_le_cliqueNum + rw [Finset.card_insert_of_notMem hqin, hω] at hbound + omega + let X := Finset.univ.biUnion U + have hXcard : X.card = ∑ i, (U i).card := + Finset.card_biUnion (fun i _ j _ hij => hdis i j hij) + have hQX : Disjoint Q X := by + apply Finset.disjoint_left.mpr + intro x hx hxX + obtain ⟨i, _, hi⟩ := Finset.mem_biUnion.mp hxX + exact (mem_exteriorNeighbors.mp hi).2 hx + let W := (Finset.univ : Finset V) \ (Q ∪ X) + have hcount : W.card + (3 + ∑ i, (U i).card) = 10 := by + have h := Finset.card_sdiff_add_card_eq_card (Finset.subset_univ (Q ∪ X)) + rw [Finset.card_union_of_disjoint hQX, hQcard, hXcard, Finset.card_univ, hcard, ha3] at h + exact h + have hsum : (∑ i, (U i).card) ≤ 6 := by + have h := Finset.sum_le_sum (s := (Finset.univ : Finset (Fin 3))) + (f := fun i => (U i).card) (g := fun _ => 2) (fun i _ => hmax i) + simpa only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, smul_eq_mul] using h + have hW : W.Nonempty := Finset.card_pos.mp (by omega) + have hwQ : ∀ w ∈ W, w ∉ Q := by + intro w hw + exact fun h => (Finset.mem_sdiff.mp hw).2 (Finset.mem_union_left _ h) + have hwmiss : ∀ w ∈ W, ∀ x ∈ Q, ¬ G.Adj w x := by + intro w hw x hx hadj + obtain ⟨i, rfl⟩ := hqcover x hx + have hwU : w ∈ U i := mem_exteriorNeighbors.mpr ⟨hadj.symm, hwQ w hw⟩ + exact (Finset.mem_sdiff.mp hw).2 (Finset.mem_union_right _ + (Finset.mem_biUnion.mpr ⟨i, Finset.mem_univ _, hwU⟩)) + have htotal := fourCycle_exterior_residual_total hcycle q U hU hmax + (fun _ _ hu => (mem_exteriorNeighbors.mp hu).1) hdis W hW + (fun w hw i => ne_of_mem_of_not_mem (hqQ i) (hwQ w hw) |>.symm) (by + intro w hw + exact fourCycle_residual_sees_two hQ.isClique hQcard hcycle hI3 q hq hqQ + (hwQ w hw) (hwmiss w hw)) + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallIndependent.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallIndependent.lean new file mode 100644 index 0000000000000000000000000000000000000000..43c5dee514252edf7f178443c4d110ff87c2407d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallIndependent.lean @@ -0,0 +1,37 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.SmallPacking + +namespace OAI + +/-! Small independent sets used in the four- and five-cycle cases. -/ + +namespace CycleClique.Construction +theorem independent_four_card_bound {V : Type*} [DecidableEq V] {G : SimpleGraph V} + {a : ℕ} (hbound : IndependenceBound G a) {w x y z : V} + (hnd : ([w, x, y, z] : List V).Nodup) + (hwx : ¬ G.Adj w x) (hwy : ¬ G.Adj w y) (hwz : ¬ G.Adj w z) + (hxy : ¬ G.Adj x y) (hxz : ¬ G.Adj x z) (hyz : ¬ G.Adj y z) : 4 ≤ a := by + let I := ([w, x, y, z] : List V).toFinset + have hreverse : ¬ G.Adj x w ∧ ¬ G.Adj y w ∧ ¬ G.Adj z w ∧ + ¬ G.Adj y x ∧ ¬ G.Adj z x ∧ ¬ G.Adj z y := + ⟨fun h => hwx h.symm, fun h => hwy h.symm, fun h => hwz h.symm, + fun h => hxy h.symm, fun h => hxz h.symm, fun h => hyz h.symm⟩ + have hI : G.IsIndepSet (I : Set V) := by + intro u hu v hv _ hadj + simp only [I, Finset.mem_coe, List.mem_toFinset, List.mem_cons, List.not_mem_nil, or_false] at hu hv + rcases hu with rfl | rfl | rfl | rfl <;> + rcases hv with rfl | rfl | rfl | rfl <;> aesop + have hcard : I.card = 4 := by simpa only [I, List.length_cons, List.length_nil] using List.toFinset_card_of_nodup hnd + simpa only [hcard] using hbound I hI + +theorem exists_third_fin_three {i j : Fin 3} (hij : i ≠ j) : + ∃ h : Fin 3, h ≠ i ∧ h ≠ j := by + classical + have hcard : ({i, j} : Finset (Fin 3)).card < (Finset.univ : Finset (Fin 3)).card := by + simp only [Finset.card_pair hij, Finset.card_univ, Fintype.card_fin] + omega + obtain ⟨h, _, hh⟩ := Finset.exists_mem_notMem_of_card_lt_card hcard + exact ⟨h, by simpa only [Finset.mem_insert, Finset.mem_singleton, not_or] using hh⟩ + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallPacking.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallPacking.lean new file mode 100644 index 0000000000000000000000000000000000000000..8ffd68544bdffb48097eeba9970218ca6a164e62 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/SmallPacking.lean @@ -0,0 +1,62 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.SmallCycleGeometry + +namespace OAI + +/-! Maximum independent sets in separated exterior classes can be added. -/ + +namespace CycleClique.Construction +theorem indepNum_packing {V ι : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {a : ℕ} (hbound : IndependenceBound G a) + (F : Finset ι) (U : ι → Finset V) + (hdis : (F : Set ι).PairwiseDisjoint U) + (hanti : ∀ i ∈ F, ∀ j ∈ F, i ≠ j → ∀ x ∈ U i, ∀ y ∈ U j, ¬ G.Adj x y) : + ∑ i ∈ F, (G.induce (U i : Set V)).indepNum ≤ a := by + classical + have h := independent_packing hbound F (fun i => independentOn G (U i)) + (fun i _ => independentOn_independent G (U i)) (by + intro i hi j hj hij + exact (hdis hi hj hij).mono (independentOn_subset G (U i)) (independentOn_subset G (U j))) (by + intro i hi j hj hij x hx y hy + exact hanti i hi j hj hij x (independentOn_subset G (U i) hx) y (independentOn_subset G (U j) hy)) + simpa only [independentOn_card] using h + +theorem separated_three_cliques {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {a : ℕ} (hbound : IndependenceBound G a) (ha : a ≤ 3) + (U : Fin 3 → Finset V) (hne : ∀ i, (U i).Nonempty) + (hdis : ∀ i j, i ≠ j → Disjoint (U i) (U j)) + (hanti : ∀ i j, i ≠ j → ∀ x ∈ U i, ∀ y ∈ U j, ¬ G.Adj x y) : + a = 3 ∧ ∀ i, G.IsClique (U i : Set V) := by + classical + have hpack := indepNum_packing hbound Finset.univ U + (fun i _ j _ hij => hdis i j hij) (fun i _ j _ hij => hanti i j hij) + have hpos : ∀ i, 1 ≤ (G.induce (U i : Set V)).indepNum := by + intro i + let : Nonempty (U i) := (hne i).to_subtype + exact indepNum_pos_of_nonempty _ + have hsum : (G.induce (U 0 : Set V)).indepNum + + (G.induce (U 1 : Set V)).indepNum + (G.induce (U 2 : Set V)).indepNum ≤ a := by + simpa only [Fin.sum_univ_three, Nat.add_assoc] using hpack + have haeq : a = 3 := by have := hpos 0; have := hpos 1; have := hpos 2; omega + refine ⟨haeq, ?_⟩ + intro i + have hi : (G.induce (U i : Set V)).indepNum ≤ 1 := by + have := hpos 0 + have := hpos 1 + have := hpos 2 + have h₀ : (G.induce (U 0 : Set V)).indepNum ≤ 1 := by omega + have h₁ : (G.induce (U 1 : Set V)).indepNum ≤ 1 := by omega + have h₂ : (G.induce (U 2 : Set V)).indepNum ≤ 1 := by omega + fin_cases i + · exact h₀ + · exact h₁ + · exact h₂ + have hcomplete := complete_of_indepNum_le_one hi + intro x hx y hy hxy + have hadj : (G.induce (U i : Set V)).Adj ⟨x, hx⟩ ⟨y, hy⟩ := by + rw [hcomplete] + exact fun h => hxy (congrArg Subtype.val h) + exact hadj + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/StartingIncident.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/StartingIncident.lean new file mode 100644 index 0000000000000000000000000000000000000000..f5619313bf9a141b0c46888ea17a86428cbaddf7 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/StartingIncident.lean @@ -0,0 +1,60 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.NormalizedIncident +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawReplacementProfiles + +namespace OAI + +/-! A replacement between two starting vertices activates exactly the +singleton chains among its targets. -/ + +namespace CycleClique.Construction.RawPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +theorem starting_replacement_incident (U T : RawPathSystem G Q) + {P M R : List (List V)} {B D J : List V} {x y : V} + (hsys : U.chains = P ++ (x :: B) :: M ++ (y :: D) :: R) + (htsys : T.chains = P ++ [] :: M ++ [] :: (B.reverse ++ x :: (J ++ y :: D)) :: R) + (hJQ : ∀ z ∈ J, z ∉ Q) (hJne : J ≠ []) : + T.normalize.incident = U.normalize.incident + + (if B = [] then 1 else 0) + (if D = [] then 1 else 0) := by + have hmemB : x :: B ∈ U.chains := by simp [hsys] + have hmemD : y :: D ∈ U.chains := by simp [hsys] + have hB : activeCliqueCount Q (x :: B) + (if B = [] then 1 else 0) = + chainCliqueCount Q (x :: B) := by + simpa using activeCliqueCount_add_singleton (by simp) + (U.endpoints _ hmemB) (U.no_clique_steps _ hmemB) + have hD : activeCliqueCount Q (y :: D) + (if D = [] then 1 else 0) = + chainCliqueCount Q (y :: D) := by + simpa using activeCliqueCount_add_singleton (by simp) + (U.endpoints _ hmemD) (U.no_clique_steps _ hmemD) + have hmerged : activeCliqueCount Q (B.reverse ++ x :: (J ++ y :: D)) = + chainCliqueCount Q (x :: B) + chainCliqueCount Q (y :: D) := by + have heq : B.reverse ++ x :: (J ++ y :: D) = (x :: B).reverse ++ J ++ (y :: D) := by + simp [List.append_assoc] + have hlen : 3 ≤ (B.reverse ++ x :: (J ++ y :: D)).length := by + have hh := List.length_pos_iff.mpr hJne + simp only [List.length_append, List.length_reverse, List.length_cons] + omega + simp only [activeCliqueCount, hlen, ↓reduceIte] + rw [heq, chainCliqueCount_append, + chainCliqueCount_append, chainCliqueCount_reverse, chainCliqueCount_eq_zero hJQ] + omega + rw [normalize_incident, normalize_incident] + simp only [htsys, hsys, List.map_append, List.map_cons, List.sum_append, + List.sum_cons, activeCliqueCount_nil] + omega + +theorem starting_replacement_incident_le (U T : RawPathSystem G Q) + {P M R : List (List V)} {B D J : List V} {x y : V} + (hsys : U.chains = P ++ (x :: B) :: M ++ (y :: D) :: R) + (htsys : T.chains = P ++ [] :: M ++ [] :: (B.reverse ++ x :: (J ++ y :: D)) :: R) + (hJQ : ∀ z ∈ J, z ∉ Q) (hJne : J ≠ []) : + T.normalize.incident ≤ U.normalize.incident + 2 := by + rw [starting_replacement_incident U T hsys htsys hJQ hJne] + split_ifs <;> omega + +end CycleClique.Construction.RawPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TemplateEmbedding.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TemplateEmbedding.lean new file mode 100644 index 0000000000000000000000000000000000000000..1694d41e885bb90f56bcde778bfb71fc5cab5fa8 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TemplateEmbedding.lean @@ -0,0 +1,79 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OutsideTemplate + +namespace OAI + +/-! Finite extension templates preserve their three numerical parameters +when transported to the counterexample graph. -/ + +namespace CycleClique.Construction.OutsideTemplate + +variable {W V : Type*} {H : SimpleGraph W} {G : SimpleGraph V} +variable {Q₀ : Finset W} {Q : Finset V} {x y : W} {f : W → V} + +def embed (T : OutsideTemplate H Q₀ x y) (f : W → V) (hf : Function.Injective f) + (hQ : ∀ v, f v ∈ Q ↔ v ∈ Q₀) + (hG : ∀ {x y}, H.Adj x y → G.Adj (f x) (f y)) : + OutsideTemplate G Q (f x) (f y) where + rest := T.rest.embed f hf hQ hG + left := T.left.map f + right := T.right.map f + nodup := by + simpa only [RawPathSystem.embed, ← List.map_flatten, List.map_append, + List.map_cons] using T.nodup.map hf + left_path := by + simpa using List.isChain_map_of_isChain f (fun _ _ h => hG h) T.left_path + right_path := List.isChain_map_of_isChain f (fun _ _ h => hG h) T.right_path + start := by + have he : T.left.map f ++ [f x] = (T.left ++ [x]).map f := by simp + rw [he, List.head?_map] + intro v hv + obtain ⟨w, hw, rfl⟩ := Option.mem_map.mp hv + exact (hQ w).mpr (T.start w hw) + finish := by + change ∀ v ∈ ((y :: T.right).map f).getLast?, v ∈ Q + rw [List.getLast?_map] + intro v hv + obtain ⟨w, hw, rfl⟩ := Option.mem_map.mp hv + exact (hQ w).mpr (T.finish w hw) + left_steps := by + simpa only [List.map_append, List.map_cons, List.map_nil] using + List.isChain_map_of_isChain f (fun _ _ hn (hh : _ ∧ _) => + hn ⟨(hQ _).mp hh.1, (hQ _).mp hh.2⟩) T.left_steps + right_steps := List.isChain_map_of_isChain f (fun _ _ hn (hh : _ ∧ _) => + hn ⟨(hQ _).mp hh.1, (hQ _).mp hh.2⟩) T.right_steps + +@[simp] theorem embed_oldVertices (T : OutsideTemplate H Q₀ x y) + (hf : Function.Injective f) (hQ : ∀ v, f v ∈ Q ↔ v ∈ Q₀) + (hG : ∀ {x y}, H.Adj x y → G.Adj (f x) (f y)) : + (T.embed f hf hQ hG).oldVertices = T.oldVertices.map f := by + simp only [oldVertices, embed, RawPathSystem.embed, ← List.map_flatten, + List.map_append, List.map_cons] + +@[simp] theorem embed_amount (T : OutsideTemplate H Q₀ x y) + (hf : Function.Injective f) (hQ : ∀ v, f v ∈ Q ↔ v ∈ Q₀) + (hG : ∀ {x y}, H.Adj x y → G.Adj (f x) (f y)) : + (T.embed f hf hQ hG).amount = T.amount := by + unfold amount + rw [embed_oldVertices, chainOutsideCount_map hQ] + +@[simp] theorem embed_incidentBound (T : OutsideTemplate H Q₀ x y) + (hf : Function.Injective f) (hQ : ∀ v, f v ∈ Q ↔ v ∈ Q₀) + (hG : ∀ {x y}, H.Adj x y → G.Adj (f x) (f y)) : + (T.embed f hf hQ hG).incidentBound = T.incidentBound := by + unfold incidentBound + rw [embed_oldVertices, chainCliqueCount_map hQ] + +@[simp] theorem embed_assignedCount (T : OutsideTemplate H Q₀ x y) + (hf : Function.Injective f) (hQ : ∀ v, f v ∈ Q ↔ v ∈ Q₀) + (hG : ∀ {x y}, H.Adj x y → G.Adj (f x) (f y)) : + (T.embed f hf hQ hG).assignedCount = T.assignedCount := by + unfold assignedCount + rw [show (T.embed f hf hQ hG).rest = T.rest.embed f hf hQ hG from rfl, + RawPathSystem.embed_assignedCount] + have he : (T.embed f hf hQ hG).left ++ f x :: f y :: (T.embed f hf hQ hG).right = + (T.left ++ x :: y :: T.right).map f := by simp [embed] + rw [he, chainCliqueCount_map hQ] + +end CycleClique.Construction.OutsideTemplate + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TemplateMatrix.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TemplateMatrix.lean new file mode 100644 index 0000000000000000000000000000000000000000..c51bb1173555ca869166ec029ab76e4c754589de --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TemplateMatrix.lean @@ -0,0 +1,48 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiniteTemplates + +namespace OAI + +/-! Soundness of a finite list of explicit extension certificates, with +both orientations of every forbidden outside path inserted in the matrix. -/ + +namespace CycleClique.Construction +variable {n : ℕ} + +def templateEntryMatrix (T : TemplateData (Fin n)) : ForbiddenMatrix n := fun i j => + if (i = T.x ∧ j = T.y) ∨ (i = T.y ∧ j = T.x) then Finset.Icc T.lo T.hi else ∅ + +def templateMatrix : List (TemplateData (Fin n)) → ForbiddenMatrix n + | [] => fun _ _ => ∅ + | T :: E => fun i j => templateEntryMatrix T i j ∪ templateMatrix E i j + +variable {V : Type*} [DecidableEq V] {G : SimpleGraph V} {Q : Finset V} {H : SimpleGraph (Fin n)} +variable {Q₀ : Finset (Fin n)} {S : ExpandedPathSystem G Q} + +theorem templateMatrix_sound {k L e : ℕ} (hopt : S.IsOptimal k) + (hk : 3 ≤ k) (hQk : Q.card ≤ k) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (ha : S.amount = L) (he : S.assignedCount = e) + (f : Fin n → V) (hf : Function.Injective f) (hfQ : ∀ v, f v ∈ Q ↔ v ∈ Q₀) + (hfG : ∀ {i j}, H.Adj i j → G.Adj (f i) (f j)) + (hfX : ∀ i, f i ∈ Q ∨ f i ∈ S.vertices) + (E : List (TemplateData (Fin n))) (hE : ∀ T ∈ E, T.Check H Q₀ k L e) : + (templateMatrix E).Sound G (Q ∪ S.vertices) f := by + induction E with + | nil => intro i j d hd; simp only [templateMatrix, Finset.notMem_empty] at hd + | cons T E ih => + apply ForbiddenMatrix.Sound.union + · intro i j d hd + have hpair : (i = T.x ∧ j = T.y) ∨ (i = T.y ∧ j = T.x) := by + by_contra hn + simp only [templateEntryMatrix, hn, ↓reduceIte, Finset.notMem_empty] at hd + have hdist : d ∈ Finset.Icc T.lo T.hi := by simpa only [templateEntryMatrix, hpair, ↓reduceIte] using hd + have hb := T.forbids hopt hk hQk hQ hcycle ha he f hf hfQ hfG hfX + (hE T (by simp)) hdist + rcases hpair with ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩ + · simpa only [Finset.coe_union] using hb + · intro h + exact hb (by simpa only [Finset.coe_union] using h.reverse) + · exact ih (fun U hU => hE U (by simp [hU])) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalArithmetic.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalArithmetic.lean new file mode 100644 index 0000000000000000000000000000000000000000..6df642808d798dbda247147b42cde3aef0b2dafc --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalArithmetic.lean @@ -0,0 +1,34 @@ +import Mathlib.Tactic + +namespace OAI + +/-! +# Arithmetic of the terminal path-system classification + +These are the numerical steps in manuscript Lemmas `terminal:increment` +and `terminal:classification`. They do not assume any graph conclusion. +-/ + +namespace CycleClique.Construction +/-- The concavity calculation in `terminal:increment`, checked in each of +the five possible integral cases of its excess `j`. -/ +theorem terminal_increment_arithmetic {t k r j : ℕ} + (ht : 9 ≤ t) (hk : k ≤ 2 * t + 1) (htk : t ≤ k) + (hj : 1 ≤ j) (hj' : j ≤ 5) (hr : t + 1 ≤ 2 * r + j) : + ¬ ((r - 1) * (j + 2) ≤ k - t) := by + interval_cases j <;> omega + +/-- The three numerical alternatives that survive equation +`terminal:arithmetic`, including all ceiling/parity restrictions. -/ +theorem terminal_classification_arithmetic {k t L e v d : ℕ} + (ht : 9 ≤ t) (htk : t ≤ k) (hk : k ≤ 2 * t + 1) + (hL : L = k - t) (hd : 2 ≤ d) (hd' : d ≤ 6) + (hde : d * e ≤ L) (htv : t ≤ v + d) (hve : v ≤ 2 * e) : + (d = 2 ∧ t ≤ v + 2) ∨ + (d = 3 ∧ (t = 9 ∨ t = 11) ∧ 2 * e = t - 3 ∧ v = t - 3) ∨ + (d = 5 ∧ t = 9 ∧ k = 19 ∧ e = 2 ∧ v = 4) := by + interval_cases d <;> omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalClassification.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalClassification.lean new file mode 100644 index 0000000000000000000000000000000000000000..7d1d5ec8a420e9f6d86ba9674bc0851200af5506 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalClassification.lean @@ -0,0 +1,114 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalIncrement + +namespace OAI + +/-! Numerical classification after a realizable representative replacement. +The graph endpoint restrictions are proved separately from this arithmetic. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped BigOperators Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +theorem IsOptimal.terminal_classification_weights {S : ExpandedPathSystem G Q} {k d : ℕ} + (hopt : S.IsOptimal k) (ht : 9 ≤ Q.card) (hQk : Q.card ≤ k) + (hkQ : k ≤ 2 * Q.card + 1) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hd : 2 ≤ d) (hd' : d ≤ 6) + {ι : Type*} (old : Finset ι) (new : ι) (wt : ι → ℕ) (hnew : new ∉ old) + (holdsum : ∑ i ∈ old, wt i ≤ S.amount) + (holdcard : old.card ≤ S.assignedCount) + (hfull : old.card = S.assignedCount → (∑ i ∈ old, wt i) = S.amount) + (htotal : ∑ i ∈ insert new old, wt i = S.amount + d) + (hrealize : ∀ J ⊆ insert new old, ∃ T : ExpandedPathSystem G Q, + T.amount = ∑ i ∈ J, wt i ∧ T.assignedCount = J.card) + (T : ExpandedPathSystem G Q) (hTa : T.amount = S.amount + d) + (hTi : T.incident ≤ S.incident + 2) : + S.amount = k - Q.card ∧ (∀ i ∈ old, d ≤ wt i) ∧ + ((d = 2 ∧ Q.card ≤ S.incident + 2) ∨ + (d = 3 ∧ (Q.card = 9 ∨ Q.card = 11) ∧ + 2 * S.assignedCount = Q.card - 3 ∧ S.incident = Q.card - 3) ∨ + (d = 5 ∧ Q.card = 9 ∧ k = 19 ∧ S.assignedCount = 2 ∧ S.incident = 4)) := by + obtain ⟨hL, he, hs, _, hw⟩ := hopt.terminal_increment_weights ht hQk hkQ hQ hcycle + (by omega) hd' old new wt hnew holdsum holdcard hfull htotal hrealize + have hde : d * S.assignedCount ≤ S.amount := by + calc + d * S.assignedCount = ∑ _i ∈ old, d := by simp [he, Nat.mul_comm] + _ ≤ ∑ i ∈ old, wt i := + Finset.sum_le_sum (fun i hi => hw i (Finset.mem_insert_of_mem hi)) + _ = S.amount := hs + have hinc : k + 1 < T.amount + T.incident := by + by_contra hn + exact T.forbidden_interval (by omega) hQ hcycle (by omega) (by omega) + have htv : Q.card ≤ S.incident + d := by omega + exact ⟨hL, fun i hi => hw i (Finset.mem_insert_of_mem hi), + terminal_classification_arithmetic ht hQk hkQ hL hd hd' hde htv + S.incident_le_twice_assignedCount⟩ + +theorem assignedCount_add_chains_length (S : ExpandedPathSystem G Q) : + S.assignedCount + S.chains.length = S.incident := by + have hh := rawAssignedCount_add_length (Q := Q) S.chains (by + intro l hl + have hc := S.chain_clique_count_two hl + omega) + rwa [← S.assignedCount_eq_raw, ← S.incident_eq_chainCliqueCount] at hh + +theorem matching_of_incident_eq_twice (S : ExpandedPathSystem G Q) + (hv : S.incident = 2 * S.assignedCount) : + ∀ l ∈ S.chains, chainCliqueCount Q l = 2 := by + have hc := S.assignedCount_add_chains_length + have hclen : S.chains.length = S.assignedCount := by omega + have hraw := S.assignedCount_eq_raw + have hmin : ∀ l ∈ S.chains, 1 ≤ chainCliqueCount Q l - 1 := by + intro l hl + have hh := S.chain_clique_count_two hl + omega + have hh : ∀ C : List (List V), + (∀ l ∈ C, 1 ≤ chainCliqueCount Q l - 1) → + rawAssignedCount Q C = C.length → + ∀ l ∈ C, chainCliqueCount Q l = 2 := by + intro C + induction C with + | nil => simp + | cons a C ih => + intro hpos heq l hl + have ha := hpos a (by simp) + have ht : C.length ≤ rawAssignedCount Q C := by + have hbound : ∀ D : List (List V), + (∀ l ∈ D, 1 ≤ chainCliqueCount Q l - 1) → + D.length ≤ rawAssignedCount Q D := by + intro D + induction D with + | nil => simp [rawAssignedCount] + | cons b D ih => + intro hb + have hbb := hb b (by simp) + have hD := ih (fun l hl => hb l (by simp [hl])) + simp only [List.length_cons, rawAssignedCount, List.map_cons, + List.sum_cons] at hD ⊢ + omega + exact hbound C (fun l hl => hpos l (by simp [hl])) + have heq' : chainCliqueCount Q a - 1 + rawAssignedCount Q C = C.length + 1 := by + simpa only [rawAssignedCount, List.map_cons, List.sum_cons, List.length_cons] using heq + have haeq : chainCliqueCount Q a = 2 := by omega + have htail : rawAssignedCount Q C = C.length := by omega + rcases List.mem_cons.mp hl with rfl | hl + · exact haeq + · exact ih (fun l hl => hpos l (by simp [hl])) htail l hl + exact hh S.chains hmin (by omega) + +theorem two_chains_of_terminal_two (S : ExpandedPathSystem G Q) {k : ℕ} + (ht : 9 ≤ Q.card) (hk : k ≤ 2 * Q.card + 1) + (hL : S.amount = k - Q.card) (hbudget : 2 * S.assignedCount ≤ S.amount) + (hv : Q.card ≤ S.incident + 2) : 2 ≤ S.chains.length := by + have hc := S.assignedCount_add_chains_length + have hzero : S.chains.length ≠ 0 := by + intro he + have hnil := List.length_eq_zero_iff.mp he + have hi : S.incident = 0 := by simp [incident, vertices, hnil] + omega + omega + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalContradiction.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalContradiction.lean new file mode 100644 index 0000000000000000000000000000000000000000..e913ef5740586d6fc0244d466e9070af6332d168 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalContradiction.lean @@ -0,0 +1,59 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.InteriorSelectionPacking +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalProfileMinimum +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalPackingCases +import OAI.Combinatorics.Ramsey.CycleClique.Construction.ShortRepresentativePath + +namespace OAI + +/-! Manuscript Proposition terminal:contradiction, conditional only on the +published Chvátal–Erdős alpha-two Hamiltonicity input. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type} [Fintype V] {G : SimpleGraph V} {Q : Finset V} {S : ExpandedPathSystem G Q} + +theorem IsOptimal.terminal_contradiction (hCE : CEAlphaTwo) {k : ℕ} + (hopt : S.IsOptimal k) (ht : 9 ≤ Q.card) (hQk : Q.card ≤ k) + (hkQ : k ≤ 2 * Q.card + 1) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hclique : G.cliqueNum ≤ Q.card) + (hbound : IndependenceBound G k) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) : False := by + obtain ⟨x, hx, y, hy, hxy, d, hd, hd', hout⟩ := + hopt.short_representative_path hCE (by omega) ht hQk hkQ hQ hcycle hclique hbound hexpand + obtain ⟨hxQ, hyQ, hL, hde, halt⟩ := hopt.terminal_finset_classification + ht hQk hkQ hQ hcycle (by omega) hd' hx hy hxy hout + obtain ⟨w, hw, hwmin⟩ := hopt.terminal_completed_profile_minimum ht hQk hkQ hQ hcycle + (by omega) hd' (List.mem_toFinset.mp hx) (List.mem_toFinset.mp hy) hxQ hyQ hxy + (by simpa only [ground, Finset.coe_union] using hout) + have hmin : ∀ a ∈ w, 2 ≤ a := fun a ha => (by have hh := hwmin a ha; omega) + have hc : 2 ≤ S.chains.length := by + have hcount := S.assignedCount_add_chains_length + rcases halt with ⟨hd2, hv, _⟩ | ⟨hd3, ht', he, hv, _⟩ | + ⟨hd5, ht9, _, he, hv, _⟩ + · subst d + exact S.two_chains_of_terminal_two ht hkQ hL hde hv + · rcases ht' with ht' | ht' <;> omega + · omega + have hfirst : ∀ z ∈ S.representativeFinset, + HasIndependent (G.induce (outsideBallFinset G S.ground z 1 : Set V)) 2 := by + intro z hz + exact (hopt.terminal_first_ball (by omega) hQk hQ hcycle hclique hc + (fun v => by simpa using hexpand {v} (by simp) (by simp)) hz).2 + have hclass : ∀ x ∈ S.representativeFinset, ∀ y ∈ S.representativeFinset, + x ≠ y → ∀ d, 1 ≤ d → d ≤ 6 → OutsidePath G (S.ground : Set V) x y d → + TerminalAlternative S k d x y := by + intro x hx y hy hne d hd hd' hp + exact (hopt.terminal_finset_classification ht hQk hkQ hQ hcycle hd hd' hx hy hne hp).2.2.2.2 + have hfull : S.incident = Q.card → False := by + intro hi + exact hopt.terminal_spanning_interior_contradiction hCE ht hQk hkQ hQ hcycle + hclique hbound hc hexpand hw hmin hi + exact terminal_packing_cases_contradiction hCE ht hQk hkQ hcycle hclique hbound + (hopt.ground_card_le hQk) hexpand hfirst hclass hL hde halt hfull + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalEndpointGeometry.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalEndpointGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..35db8441c95daac83aa8688d7bf38495f45666c8 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalEndpointGeometry.lean @@ -0,0 +1,125 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalIncrementProfiles +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawReplacementProfiles +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OutsidePathRules + +namespace OAI + +/-! A short representative replacement cannot absorb any old assigned path. +Consequently its two targets start two different oriented chains. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} {S : ExpandedPathSystem G Q} + +private theorem mul_length_le_sum {d : ℕ} {w : List ℕ} (h : ∀ b ∈ w, d ≤ b) : + d * w.length ≤ w.sum := by + induction w with + | nil => simp + | cons a w ih => + have ha := h a (by simp) + have ht := ih (fun b hb => h b (by simp [hb])) + simp only [List.length_cons, Nat.mul_succ, List.sum_cons] + omega + +theorem IsOptimal.terminal_different_chain_starts {k d : ℕ} + (hopt : S.IsOptimal k) (ht : 9 ≤ Q.card) (hQk : Q.card ≤ k) + (hkQ : k ≤ 2 * Q.card + 1) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hd : 1 ≤ d) (hd' : d ≤ 6) + (U : RawPathSystem G Q) (hUa : U.amount = S.amount) + (hUe : U.assignedCount = S.assignedCount) + (hUvertices : ∀ v ∈ U.vertices, v ∈ Q ∨ v ∈ S.vertices) + {P M R : List (List V)} {A B C D : List V} {x y : V} + (hsys : U.chains = P ++ (A ++ x :: B) :: M ++ (C ++ y :: D) :: R) + (hA : ∀ v ∈ A.getLast?, v ∈ Q) (hC : ∀ v ∈ C.getLast?, v ∈ Q) + (h : OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) x y d) : + S.amount = k - Q.card ∧ A = [] ∧ C = [] ∧ d * S.assignedCount ≤ S.amount := by + obtain ⟨J, hJ, hJlen, hJout, hpath⟩ := h.interior + have hJQ : ∀ z ∈ J, z ∉ Q := fun z hz hzQ => hJout z hz (Or.inl hzQ) + have hpos : J ≠ [] := by intro he; simp only [he, List.length_nil] at hJlen; omega + have hdis : J.Disjoint U.chains.flatten := by + apply List.disjoint_left.mpr + intro z hz hzU + exact hJout z hz (hUvertices z (List.mem_toFinset.mpr hzU)) + obtain ⟨T, original, output, kept, removed, hT, hTa, ho, hout, hp, hq⟩ := + U.replace_different_chains_profiled hsys hA hC hJ hJQ hpos hdis hpath + obtain ⟨hL, _, hkept, _, hweights⟩ := hopt.terminal_increment_profiles ht hQk hkQ hQ hcycle + hd hd' U T hUa hUe ho hout hp hq (by omega) + have hTcount : T.assignedCount = S.assignedCount + 1 := by + have he := hq.length_eq + rw [hout.length_eq, List.length_cons, hkept] at he + change T.assignedCount = S.assignedCount + 1 at he + exact he + have hB : ∀ v ∈ (x :: B).getLast?, v ∈ Q := by + intro v hv + apply (U.endpoints _ (show A ++ x :: B ∈ U.chains by simp [hsys])).2 v + have he := List.getLast?_eq_some_getLast (show x :: B ≠ [] by simp) + simpa only [List.getLast?_append, he, Option.or] using hv + have hD : ∀ v ∈ (y :: D).getLast?, v ∈ Q := by + intro v hv + apply (U.endpoints _ (show C ++ y :: D ∈ U.chains by simp [hsys])).2 v + have he := List.getLast?_eq_some_getLast (show y :: D ≠ [] by simp) + simpa only [List.getLast?_append, he, Option.or] using hv + have hcount := RawPathSystem.different_chain_count (P := P) (M := M) (R := R) hA hC hB hD hJQ + have hcount' : T.assignedCount + (if A = [] then 0 else 1) + + (if C = [] then 0 else 1) = U.assignedCount + 1 := by + simpa only [RawPathSystem.assignedCount, hT, hsys] using hcount + rw [hTcount, hUe] at hcount' + have hAnil : A = [] := by + by_contra hn + simp only [hn, ↓reduceIte] at hcount' + omega + have hCnil : C = [] := by + by_contra hn + simp only [hn, ↓reduceIte] at hcount' + omega + have hsum : original.sum = S.amount := by + rw [ho.sum_eq, ← U.amount_eq_outside_count, hUa] + have hlen : original.length = S.assignedCount := ho.length_eq.trans hUe + have hbound := mul_length_le_sum hweights + rw [hlen, hsum] at hbound + exact ⟨hL, hAnil, hCnil, hbound⟩ + +theorem IsOptimal.terminal_same_chain_exclusion {k d : ℕ} + (hopt : S.IsOptimal k) (ht : 9 ≤ Q.card) (hQk : Q.card ≤ k) + (hkQ : k ≤ 2 * Q.card + 1) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hd : 1 ≤ d) (hd' : d ≤ 6) + (U : RawPathSystem G Q) (hUa : U.amount = S.amount) + (hUe : U.assignedCount = S.assignedCount) + (hUvertices : ∀ v ∈ U.vertices, v ∈ Q ∨ v ∈ S.vertices) + {P R : List (List V)} {A B D : List V} {x y : V} + (hsys : U.chains = P ++ (A ++ (x :: B) ++ y :: D) :: R) + (hA : ∀ v ∈ A.getLast?, v ∈ Q) (hB : ∀ v ∈ (x :: B).getLast?, v ∈ Q) : + ¬ OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) x y d := by + intro h + obtain ⟨J, hJ, hJlen, hJout, hpath⟩ := h.interior + have hJQ : ∀ z ∈ J, z ∉ Q := fun z hz hzQ => hJout z hz (Or.inl hzQ) + have hpos : J ≠ [] := by intro he; simp only [he, List.length_nil] at hJlen; omega + have hdis : J.Disjoint U.chains.flatten := by + apply List.disjoint_left.mpr + intro z hz hzU + exact hJout z hz (hUvertices z (List.mem_toFinset.mpr hzU)) + obtain ⟨T, original, output, kept, removed, hT, hTa, ho, hout, hp, hq⟩ := + U.replace_same_chain_profiled hsys hA hB hJ hJQ hpos hdis hpath + obtain ⟨_, _, hkept, _, _⟩ := hopt.terminal_increment_profiles ht hQk hkQ hQ hcycle + hd hd' U T hUa hUe ho hout hp hq (by omega) + have hTcount : T.assignedCount = S.assignedCount + 1 := by + have he := hq.length_eq + rw [hout.length_eq, List.length_cons, hkept] at he + change T.assignedCount = S.assignedCount + 1 at he + exact he + have hD : ∀ v ∈ (y :: D).getLast?, v ∈ Q := by + intro v hv + apply (U.endpoints _ (show A ++ (x :: B) ++ y :: D ∈ U.chains by simp [hsys])).2 v + have he := List.getLast?_eq_some_getLast (show y :: D ≠ [] by simp) + simpa only [List.getLast?_append, he, Option.or] using hv + have hcount := RawPathSystem.same_chain_count (P := P) (R := R) hA hB hD hJQ + have hcount' : T.assignedCount + (if A = [] then 0 else 1) = U.assignedCount := by + simpa only [RawPathSystem.assignedCount, hT, hsys] using hcount + rw [hTcount, hUe] at hcount' + omega + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalIncrement.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e498cc916fad5edf663788c1f917657bb1407c1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalIncrement.lean @@ -0,0 +1,161 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalArithmetic +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OptimalPathSystem +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PathSystemCounts + +namespace OAI + +/-! The minimal-subcollection argument of terminal:increment. The graph +realizations are explicit; the only arithmetic restriction is the proved +five-case inequality for the amount excess. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped BigOperators Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +theorem incident_le_twice_assignedCount (S : ExpandedPathSystem G Q) : + S.incident ≤ 2 * S.assignedCount := by + have hh := rawAssignedCount_add_length (Q := Q) S.chains (by + intro l hl + have hc := S.chain_clique_count_two hl + omega) + rw [← S.assignedCount_eq_raw, ← S.incident_eq_chainCliqueCount] at hh + have hc := S.chains_length_le_assignedCount + omega + +theorem IsOptimal.terminal_increment_weights {S : ExpandedPathSystem G Q} {k d : ℕ} + (hopt : S.IsOptimal k) (ht : 9 ≤ Q.card) (hQk : Q.card ≤ k) + (hkQ : k ≤ 2 * Q.card + 1) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hd : 1 ≤ d) (hd' : d ≤ 6) + {ι : Type*} (old : Finset ι) (new : ι) (wt : ι → ℕ) (hnew : new ∉ old) + (holdsum : ∑ i ∈ old, wt i ≤ S.amount) + (holdcard : old.card ≤ S.assignedCount) + (hfull : old.card = S.assignedCount → (∑ i ∈ old, wt i) = S.amount) + (htotal : ∑ i ∈ insert new old, wt i = S.amount + d) + (hrealize : ∀ J ⊆ insert new old, ∃ T : ExpandedPathSystem G Q, + T.amount = ∑ i ∈ J, wt i ∧ T.assignedCount = J.card) : + S.amount = k - Q.card ∧ old.card = S.assignedCount ∧ + (∑ i ∈ old, wt i) = S.amount ∧ wt new = d ∧ + ∀ i ∈ insert new old, d ≤ wt i := by + classical + let R := insert new old + let h := k + 1 - Q.card + have hbudget := hopt.budget + have hLh : S.amount < h := by dsimp [h]; omega + have hRsum : ∑ i ∈ R, wt i = S.amount + d := htotal + have hRlarge : h ≤ ∑ i ∈ R, wt i := by + by_contra hn + obtain ⟨T, hTa, _⟩ := hrealize R (Finset.Subset.refl _) + have hb : T.amount ≤ k - Q.card := by dsimp [h] at hn; omega + have hm := hopt.maximal T hb + omega + have hex : ∃ r, ∃ J : Finset ι, J ⊆ R ∧ h ≤ ∑ i ∈ J, wt i ∧ J.card = r := + ⟨R.card, R, Finset.Subset.refl _, hRlarge, rfl⟩ + obtain ⟨J, hJR, hJh, hJcard⟩ := Nat.find_spec hex + have hminimal : ∀ K ⊆ R, h ≤ ∑ i ∈ K, wt i → J.card ≤ K.card := by + intro K hKR hKh + rw [hJcard] + exact Nat.find_min' hex ⟨K, hKR, hKh, rfl⟩ + have hdelete : ∀ i ∈ J, (∑ a ∈ J.erase i, wt a) < h := by + intro i hi + by_contra hn + have hm := hminimal (J.erase i) (fun a ha => hJR (Finset.mem_of_mem_erase ha)) (by omega) + have hc := Finset.card_erase_of_mem hi + have hp := Finset.card_pos.mpr ⟨i, hi⟩ + omega + have hnewJ : new ∈ J := by + by_contra hn + have hJo : J ⊆ old := by + intro i hi + rcases Finset.mem_insert.mp (hJR hi) with rfl | hiold + · exact False.elim (hn hi) + · exact hiold + have hs : (∑ i ∈ J, wt i) ≤ ∑ i ∈ old, wt i := + Finset.sum_le_sum_of_subset_of_nonneg hJo (by intros; omega) + omega + let j := (∑ i ∈ J, wt i) - h + have hsumJ : ∑ i ∈ J, wt i = h + j := by dsimp [j]; omega + have hjupper : j ≤ 5 := by + have hs : (∑ i ∈ J, wt i) ≤ ∑ i ∈ R, wt i := + Finset.sum_le_sum_of_subset_of_nonneg hJR (by intros; omega) + omega + obtain ⟨T, hTa, hTe⟩ := hrealize J hJR + have hinterval : k + 1 < T.amount + T.incident := by + by_contra hn + exact T.forbidden_interval (by omega) hQ hcycle (by dsimp [h] at hJh; omega) + (by omega) + have hTi := T.incident_le + have hTtwice := T.incident_le_twice_assignedCount + have hjpos : 1 ≤ j := by dsimp [h] at hsumJ; omega + have hr : Q.card + 1 ≤ 2 * J.card + j := by dsimp [h] at hsumJ; omega + have hweights : ∀ i ∈ J, j + 1 ≤ wt i := by + intro i hi + have hdlt := hdelete i hi + have hs := Finset.sum_erase_add J wt hi + omega + have hexact : ∃ i ∈ J, wt i = j + 1 := by + by_contra hn + have hall : ∀ i ∈ J, j + 2 ≤ wt i := by + intro i hi + have hb := hweights i hi + have hne : wt i ≠ j + 1 := by intro he; exact hn ⟨i, hi, he⟩ + omega + have hJo : J.erase new ⊆ old := by + intro i hi + have hne := (Finset.mem_erase.mp hi).1 + rcases Finset.mem_insert.mp (hJR (Finset.mem_of_mem_erase hi)) with he | hiold + · exact False.elim (hne he) + · exact hiold + have hsmall : (J.card - 1) * (j + 2) ≤ k - Q.card := by + calc + (J.card - 1) * (j + 2) = ∑ _i ∈ J.erase new, (j + 2) := by + simp only [Finset.sum_const, smul_eq_mul, Finset.card_erase_of_mem hnewJ] + _ ≤ ∑ i ∈ J.erase new, wt i := + Finset.sum_le_sum (fun i (hi : i ∈ J.erase new) => + hall i (Finset.mem_of_mem_erase hi)) + _ ≤ ∑ i ∈ old, wt i := + Finset.sum_le_sum_of_subset_of_nonneg hJo (by intros; omega) + _ ≤ S.amount := holdsum + _ ≤ k - Q.card := hbudget + exact terminal_increment_arithmetic ht hkQ hQk hjpos hjupper hr hsmall + obtain ⟨i, hi, hwi⟩ := hexact + have hdeleteSum : ∑ a ∈ J.erase i, wt a = h - 1 := by + have hs := Finset.sum_erase_add J wt hi + dsimp [h] at hsumJ ⊢ + omega + obtain ⟨U, hUa, hUe⟩ := hrealize (J.erase i) (fun a ha => hJR (Finset.mem_of_mem_erase ha)) + have hUbudget : U.amount ≤ k - Q.card := by rw [hUa, hdeleteSum]; dsimp [h]; omega + have hUmax := hopt.maximal U hUbudget + have hL : S.amount = k - Q.card := by rw [hUa, hdeleteSum] at hUmax; dsimp [h] at hUmax; omega + have hUeq : U.amount = S.amount := by rw [hUa, hdeleteSum, hL]; dsimp [h]; omega + have hUmin := hopt.minimal U hUeq + have hJpos : 0 < J.card := Finset.card_pos.mpr ⟨i, hi⟩ + have hJsmall : J.card ≤ old.card + 1 := by + have hc := Finset.card_le_card hJR + have hcR : R.card = old.card + 1 := Finset.card_insert_of_notMem hnew + omega + have holdEq : old.card = S.assignedCount := by + rw [hUe, Finset.card_erase_of_mem hi] at hUmin + omega + have hJReq : J = R := by + apply Finset.eq_of_subset_of_card_le hJR + rw [hUe, Finset.card_erase_of_mem hi] at hUmin + have hcR : R.card = old.card + 1 := Finset.card_insert_of_notMem hnew + omega + have holdSumEq := hfull holdEq + have hwnew : wt new = d := by + rw [Finset.sum_insert hnew, holdSumEq] at htotal + omega + have hjd : j + 1 = d := by + rw [hJReq, hRsum] at hsumJ + dsimp [h] at hsumJ + omega + refine ⟨hL, holdEq, holdSumEq, hwnew, ?_⟩ + intro a ha + rw [← hjd] + exact hweights a (by simpa only [hJReq] using ha) + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalIncrementProfiles.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalIncrementProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..f05c6c787ed6507ba32b22d34213b69c1591b737 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalIncrementProfiles.lean @@ -0,0 +1,94 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalIncrement +import OAI.Combinatorics.Ramsey.CycleClique.Construction.AssignedLabels + +namespace OAI + +/-! Apply terminal:increment to actual original and replacement profiles. +The subcollection realization premise is discharged by graph deletion. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped BigOperators Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} {S : ExpandedPathSystem G Q} + +theorem IsOptimal.terminal_increment_profiles {k d a : ℕ} + (hopt : S.IsOptimal k) (ht : 9 ≤ Q.card) (hQk : Q.card ≤ k) + (hkQ : k ≤ 2 * Q.card + 1) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hd : 1 ≤ d) (hd' : d ≤ 6) + (U T : RawPathSystem G Q) (hUamount : U.amount = S.amount) + (hUcount : U.assignedCount = S.assignedCount) + {original output kept removed : List ℕ} + (ho : SystemAssignedAmounts Q U.chains original) + (hout : SystemAssignedAmounts Q T.chains output) + (hp : original.Perm (kept ++ removed)) (hq : output.Perm (a :: kept)) + (hTa : T.amount = S.amount + d) : + S.amount = k - Q.card ∧ removed = [] ∧ kept.length = S.assignedCount ∧ + a = d ∧ ∀ b ∈ original, d ≤ b := by + classical + let : DecidableEq (Fin (kept.length + 1)) := Classical.decEq _ + have hosum : original.sum = S.amount := by + rw [ho.sum_eq, ← U.amount_eq_outside_count, hUamount] + have hocount : original.length = S.assignedCount := ho.length_eq.trans hUcount + have hsum : kept.sum + removed.sum = S.amount := by + rw [← List.sum_append, ← hp.sum_eq, hosum] + have hlen : kept.length + removed.length = S.assignedCount := by + rw [← List.length_append, ← hp.length_eq, hocount] + have houtsum : a + kept.sum = S.amount + d := by + have hs := hq.sum_eq + rw [hout.sum_eq, ← T.amount_eq_outside_count, hTa, List.sum_cons] at hs + omega + let wt : Fin (kept.length + 1) → ℕ := (a :: kept).get + let fresh : Fin (kept.length + 1) := 0 + let old : Finset (Fin (kept.length + 1)) := Finset.univ.erase fresh + have hmap : (List.finRange (kept.length + 1)).map wt = a :: kept := by + rw [← List.ofFn_eq_map] + exact List.ofFn_get _ + have hlabels : (List.finRange (kept.length + 1)).toFinset = Finset.univ := by + ext i + simp + have hwfresh : wt fresh = a := rfl + have hwtotal : (∑ i, wt i) = a + kept.sum := by + have hs := List.sum_toFinset wt (List.nodup_finRange (kept.length + 1)) + rw [hlabels, hmap, List.sum_cons] at hs + exact hs + have hcard : old.card = kept.length := by + simp only [old, Finset.card_erase_of_mem (Finset.mem_univ fresh), + Finset.card_univ, Fintype.card_fin] + omega + have hnew : fresh ∉ old := by simp [old] + have hinsert : insert fresh old = Finset.univ := by simp [old] + have hwold : (∑ i ∈ old, wt i) = kept.sum := by + have hs := Finset.sum_erase_add Finset.univ wt (Finset.mem_univ fresh) + rw [hwfresh, hwtotal] at hs + change (∑ i ∈ old, wt i) + a = a + kept.sum at hs + omega + have hfull : old.card = S.assignedCount → (∑ i ∈ old, wt i) = S.amount := by + intro he + rw [hcard] at he + have hrem : removed = [] := List.length_eq_zero_iff.mp (by omega) + simp only [hrem, List.sum_nil, Nat.add_zero] at hsum + rw [hwold, hsum] + have hrealize : ∀ J ⊆ insert fresh old, ∃ Z : ExpandedPathSystem G Q, + Z.amount = ∑ i ∈ J, wt i ∧ Z.assignedCount = J.card := by + intro J hJ + apply hout.realize_labels_of_perm T (List.finRange (kept.length + 1)) wt + (List.nodup_finRange _) (by rw [hmap]; exact hq) J + rw [hlabels] + exact Finset.subset_univ _ + obtain ⟨hL, he, _, hwa, hall⟩ := hopt.terminal_increment_weights ht hQk hkQ hQ hcycle + hd hd' old fresh wt hnew (by rw [hwold]; omega) (by rw [hcard]; omega) hfull + (by rw [hinsert, hwtotal]; exact houtsum) hrealize + have hkept : kept.length = S.assignedCount := by simpa only [hcard] using he + have hremoved : removed = [] := List.length_eq_zero_iff.mp (by omega) + refine ⟨hL, hremoved, hkept, hwfresh.symm.trans hwa, ?_⟩ + intro b hb + have hbkept : b ∈ kept := by simpa only [hremoved, List.append_nil] using hp.mem_iff.mp hb + obtain ⟨i, hi⟩ := List.mem_iff_get.mp (List.mem_cons_of_mem a hbkept) + have hi' : wt i = b := hi + have hh := hall i (by rw [hinsert]; exact Finset.mem_univ _) + omega + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalPacking.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalPacking.lean new file mode 100644 index 0000000000000000000000000000000000000000..92417c0ce4146787a28ed6740f0c458c479b0259 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalPacking.lean @@ -0,0 +1,125 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalWeights +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PackingOptions + +namespace OAI + +/-! Uniform packings used in the first three terminal cases. Their graph +premises concern actual balls and forbidden outside paths. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type} [Fintype V] {G : SimpleGraph V} + +theorem radius_two_triple_of_separated_first_pair (hCE : CEAlphaTwo) {k t : ℕ} + (hk : 5 ≤ k) (ht : 1 ≤ t) (hcycle : ¬ HasCycle G (k + 1)) + (hclique : G.cliqueNum ≤ t) {X R : Finset V} {x : V} + (hx : x ∈ R) (hRX : R ⊆ X) (hXk : X.card ≤ k) (hsize : 2 * t < k + R.card) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (hforbid : ∀ y ∈ R, x ≠ y → ∀ d, 1 ≤ d → d ≤ 2 → + ¬ OutsidePath G (X : Set V) x y d) + (hpair : HasIndependent (G.induce (outsideBallFinset G X x 1 : Set V)) 2) : + HasIndependent (G.induce (outsideBallFinset G X x 2 : Set V)) 3 := by + obtain ⟨I, hI, hind, hIcard⟩ := exists_independent_subset hpair + have hAX : R.erase x ⊆ X := fun _ hy => hRX (Finset.mem_of_mem_erase hy) + have hf : ∀ y ∈ R.erase x, ∀ d, 1 ≤ d → d ≤ 1 + 1 → + ¬ PositiveOutsidePath G (X : Set V) x y d := by + intro y hy d hd hdb hp + exact hforbid y (Finset.mem_of_mem_erase hy) (Finset.ne_of_mem_erase hy).symm + d hd (by omega) hp.toOutside + have havoid := closedNeighborhood_avoids_forbidden (hRX hx) hAX (by simp) hI hf + have hne : I.Nonempty := Finset.card_pos.mp (by omega) + have hg := outsideBall_growth hAX hI havoid (hexpand I hind hne) + rw [hIcard] at hg + have hc := Finset.card_erase_add_one hx + have hRpos : 1 ≤ R.card := Finset.card_pos.mpr ⟨x, hx⟩ + simp only [Nat.reduceAdd] at hg + apply size_test hCE hk ht hcycle hclique (outsideBallFinset G X x 2) + exact max_lt_iff.mpr ⟨by omega, by omega⟩ + +theorem radius_two_packing_bound {k : ℕ} (hbound : IndependenceBound G k) + {X R : Finset V} (hRX : R ⊆ X) + (hweight : ∀ x ∈ R, + HasIndependent (G.induce (outsideBallFinset G X x 2 : Set V)) 3) + (hforbid : ∀ x ∈ R, ∀ y ∈ R, x ≠ y → ∀ d, 1 ≤ d → d ≤ 6 → + ¬ OutsidePath G (X : Set V) x y d) : 3 * R.card ≤ k := by + have hp := packing_test hbound X (fun i : R => i.val) (fun _ => 3) (fun _ => 3) + Subtype.val_injective (fun i => hRX i.property) + (fun i => by simpa only [packingRegion] using hweight i i.property) + (fun i j hij => by + simp only [PackingCompatible, OfNat.ofNat_ne_zero, false_and, ↓reduceIte] + intro d hd hdb + exact hforbid i i.property j j.property (fun h => hij (Subtype.ext h)) d hd + (by omega)) + simpa [Nat.mul_comm] using hp + +theorem terminal_uniform_packing_contradiction (hCE : CEAlphaTwo) {k t : ℕ} + (ht : 9 ≤ t) (hklo : 2 * t - 2 ≤ k) (hkhi : k ≤ 2 * t + 1) + (hcycle : ¬ HasCycle G (k + 1)) (hclique : G.cliqueNum ≤ t) + (hbound : IndependenceBound G k) {X R : Finset V} + (hRX : R ⊆ X) (hXk : X.card ≤ k) (hRlarge : t - 2 ≤ R.card) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (hpair : ∀ x ∈ R, + HasIndependent (G.induce (outsideBallFinset G X x 1 : Set V)) 2) + (hforbid : ∀ x ∈ R, ∀ y ∈ R, x ≠ y → ∀ d, 1 ≤ d → d ≤ 6 → + ¬ OutsidePath G (X : Set V) x y d) : False := by + have htriple : ∀ x ∈ R, + HasIndependent (G.induce (outsideBallFinset G X x 2 : Set V)) 3 := by + intro x hx + exact radius_two_triple_of_separated_first_pair hCE (by omega) (by omega) hcycle + hclique hx hRX hXk (by omega) hexpand + (fun y hy hne d hd hdb => hforbid x hx y hy hne d hd (by omega)) (hpair x hx) + have hp := radius_two_packing_bound hbound hRX htriple hforbid + omega + +theorem terminal_mixed_packing_contradiction (hbound : IndependenceBound G 19) + {X R A : Finset V} (hRX : R ⊆ X) (hAR : A ⊆ R) + (hR : R.card = 9) (hA : A.card = 4) + (hweight : ∀ x ∈ R, HasIndependent + (G.induce (outsideBallFinset G X x (if x ∈ A then 2 else 1) : Set V)) + (if x ∈ A then 3 else 2)) + (hforbid : ∀ x ∈ R, ∀ y ∈ R, x ≠ y → ∀ d, 1 ≤ d → + d ≤ (if x ∈ A then 3 else 2) + (if y ∈ A then 3 else 2) → + ¬ OutsidePath G (X : Set V) x y d) : False := by + have hp := packing_test hbound X (fun i : R => i.val) + (fun i => if i.val ∈ A then 3 else 2) (fun i => if i.val ∈ A then 3 else 2) + Subtype.val_injective (fun i => hRX i.property) + (fun i => by + have hi := hweight i i.property + have hregion : packingRegion G X (i : V) (if (i : V) ∈ A then 3 else 2) = + outsideBallFinset G X (i : V) (if (i : V) ∈ A then 2 else 1) := by + split_ifs <;> rfl + change HasIndependent + (G.induce (packingRegion G X (i : V) (if (i : V) ∈ A then 3 else 2) : Set V)) + (if (i : V) ∈ A then 3 else 2) + rw [hregion] + exact hi) + (fun i j hij => by + have hf := hforbid i i.property j j.property (fun h => hij (Subtype.ext h)) + by_cases hia : i.val ∈ A <;> by_cases hja : j.val ∈ A <;> + simpa only [hia, hja, ↓reduceIte, PackingCompatible, OfNat.ofNat_ne_zero, + false_and] using hf) + have hcount : (∑ i : R, if i.val ∈ A then 3 else 2) = 22 := by + have hpoint : ∀ i : R, (if i.val ∈ A then 3 else 2) = + 2 + (if i.val ∈ A then 1 else 0) := by intro i; split_ifs <;> rfl + simp_rw [hpoint] + rw [Finset.sum_add_distrib] + have hfilter : (Finset.univ.filter (fun i : R => i.val ∈ A)).card = A.card := by + apply Finset.card_bij (fun i _ => i.val) + · intro i hi + exact (Finset.mem_filter.mp hi).2 + · intro i hi j hj he + exact Subtype.ext he + · intro a ha + exact ⟨⟨a, hAR ha⟩, by simp [ha], rfl⟩ + simp only [Finset.sum_const, smul_eq_mul, Finset.card_univ, Fintype.card_coe, + hR, Finset.sum_boole, hfilter, hA] + decide + rw [hcount] at hp + omega + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalPackingCases.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalPackingCases.lean new file mode 100644 index 0000000000000000000000000000000000000000..e481d823f679cbf22d5553807968e96d2157de6d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalPackingCases.lean @@ -0,0 +1,151 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalRepresentativeSets +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalPacking + +namespace OAI + +/-! The packings for the configurations with missing clique vertices. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type} [Fintype V] {G : SimpleGraph V} {Q : Finset V} {S : ExpandedPathSystem G Q} + +private theorem terminal_five_packing_contradiction (hCE : CEAlphaTwo) + (ht9 : Q.card = 9) (hcycle : ¬ HasCycle G 20) (hclique : G.cliqueNum ≤ Q.card) + (hbound : IndependenceBound G 19) (hXk : S.ground.card ≤ 19) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + 19 * I.card + 1 ≤ (closedNeighborhood G I).card) + (hpair : ∀ x ∈ S.representativeFinset, + HasIndependent (G.induce (outsideBallFinset G S.ground x 1 : Set V)) 2) + (hclass : ∀ x ∈ S.representativeFinset, ∀ y ∈ S.representativeFinset, + x ≠ y → ∀ d, 1 ≤ d → d ≤ 6 → OutsidePath G (S.ground : Set V) x y d → + TerminalAlternative S 19 d x y) + {x₀ y₀ : V} (hfixed : TerminalAlternative S 19 5 x₀ y₀) (hv : S.incident = 4) : False := by + classical + have hinc := S.incidentRepresentatives_subset_representatives + have hincV := S.incidentRepresentatives_subset_vertices + have hcard := S.incidentRepresentatives_card + have hRcard : S.representativeFinset.card = 9 := by + rw [S.representativeFinset_card, ht9] + have hAcard : S.incidentRepresentatives.card = 4 := by omega + have htriple : ∀ x ∈ S.representativeFinset, + HasIndependent (G.induce (outsideBallFinset G S.ground x 2 : Set V)) 3 := by + intro x hx + exact outsideBall_two_triple_of_first_pair (k := 19) (t := Q.card) + (X := S.ground) (x := x) hCE (by omega) (by omega) (by omega) + hcycle hclique hXk hexpand (hpair x hx) + have hweight : ∀ x ∈ S.representativeFinset, HasIndependent + (G.induce (outsideBallFinset G S.ground x + (if x ∈ S.incidentRepresentatives then 2 else 1) : Set V)) + (if x ∈ S.incidentRepresentatives then 3 else 2) := by + intro x hx + by_cases hxa : x ∈ S.incidentRepresentatives + · convert htriple x hx using 1 + · rw [ite_eq_left hxa] + · rw [ite_eq_left hxa] + · exact ite_eq_left hxa + · convert hpair x hx using 1 + · rw [ite_eq_right hxa] + · rw [ite_eq_right hxa] + · exact ite_eq_right hxa + apply terminal_mixed_packing_contradiction hbound S.representativeFinset_subset_ground + hinc hRcard hAcard hweight + intro x hx y hy hxy d hd hd' hout + have hdb : d ≤ 6 := by split_ifs at hd' <;> omega + have hc := hclass x hx y hy hxy d hd hdb hout + have hd5 : d = 5 := (hfixed.parameter_unique (by omega) hc).symm + have hmiss : x ∉ S.vertices ∧ y ∉ S.vertices := by + rcases hc with ⟨hd2, _⟩ | ⟨hd3, _⟩ | ⟨_, _, _, _, _, _, hx', hy'⟩ + · omega + · omega + · exact ⟨hx', hy'⟩ + have hxnot : x ∉ S.incidentRepresentatives := fun hx' => hmiss.1 (hincV hx') + have hynot : y ∉ S.incidentRepresentatives := fun hy' => hmiss.2 (hincV hy') + simp only [hxnot, hynot, ↓reduceIte] at hd' + omega + +theorem terminal_packing_cases_contradiction (hCE : CEAlphaTwo) {k d₀ : ℕ} + (ht : 9 ≤ Q.card) (hQk : Q.card ≤ k) (hkQ : k ≤ 2 * Q.card + 1) + (hcycle : ¬ HasCycle G (k + 1)) (hclique : G.cliqueNum ≤ Q.card) + (hbound : IndependenceBound G k) (hXk : S.ground.card ≤ k) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (hpair : ∀ x ∈ S.representativeFinset, + HasIndependent (G.induce (outsideBallFinset G S.ground x 1 : Set V)) 2) + (hclass : ∀ x ∈ S.representativeFinset, ∀ y ∈ S.representativeFinset, + x ≠ y → ∀ d, 1 ≤ d → d ≤ 6 → OutsidePath G (S.ground : Set V) x y d → + TerminalAlternative S k d x y) + (hL : S.amount = k - Q.card) (hde : d₀ * S.assignedCount ≤ S.amount) + {x₀ y₀ : V} (halt : TerminalAlternative S k d₀ x₀ y₀) + (hfull : S.incident = Q.card → False) : False := by + classical + have hinc := S.incidentRepresentatives_subset_representatives + have hincV := S.incidentRepresentatives_subset_vertices + have hincX : S.incidentRepresentatives ⊆ S.ground := + fun x hx => S.representativeFinset_subset_ground (hinc hx) + have hcard := S.incidentRepresentatives_card + have hmissing := S.missing_card_add_incident + have hve := S.incident_le_twice_assignedCount + have hfixed := halt + rcases halt with ⟨rfl, hv, _⟩ | ⟨rfl, ht', he, hv, _, _, _⟩ | + ⟨rfl, ht9, hk19, he, hv, _, _, _⟩ + · have hne : (Q \ S.vertices).Nonempty := by + apply Finset.card_pos.mp + have hile := S.incident_le + have hn : S.incident ≠ Q.card := hfull + omega + obtain ⟨z, hz⟩ := hne + have hzV := (Finset.mem_sdiff.mp hz).2 + apply terminal_uniform_packing_contradiction (k := k) (t := Q.card) hCE ht (by omega) hkQ hcycle hclique + hbound hincX hXk (by omega) hexpand (fun x hx => hpair x (hinc hx)) + intro x hx y hy hxy d hd hd' hout + have hc := hclass x (hinc hx) y (hinc hy) hxy d hd hd' hout + have hd2 : d = 2 := (hfixed.parameter_unique ht hc).symm + rcases hc with ⟨_, _, hcover⟩ | ⟨hd3, _⟩ | ⟨hd5, _⟩ + · have hzxy := hcover hz + rcases Finset.mem_insert.mp hzxy with rfl | hzxy + · exact hzV (hincV hx) + · have hz_eq_y : z = y := Finset.mem_singleton.mp hzxy + subst z + exact hzV (hincV hy) + · omega + · omega + · have hzexists : (Q \ S.vertices).Nonempty := Finset.card_pos.mp (by omega) + obtain ⟨z, hz⟩ := hzexists + have hzV := (Finset.mem_sdiff.mp hz).2 + have hzR : z ∈ S.representativeFinset := S.missing_subset_representatives hz + have hznot : z ∉ S.incidentRepresentatives := fun hz' => hzV (hincV hz') + let R := insert z S.incidentRepresentatives + have hRrep : R ⊆ S.representativeFinset := by + intro x hx + rcases Finset.mem_insert.mp hx with rfl | hx + · exact hzR + · exact hinc hx + have hRcard : R.card = Q.card - 2 := by + rw [Finset.card_insert_of_notMem hznot, hcard] + omega + apply terminal_uniform_packing_contradiction (k := k) (t := Q.card) hCE ht (by rcases ht' with ht' | ht' <;> omega) + hkQ hcycle hclique hbound + (fun x hx => S.representativeFinset_subset_ground (hRrep hx)) hXk (by omega) + hexpand (fun x hx => hpair x (hRrep hx)) + intro x hx y hy hxy d hd hd' hout + have hc := hclass x (hRrep hx) y (hRrep hy) hxy d hd hd' hout + have hd3 : d = 3 := (hfixed.parameter_unique ht hc).symm + have hmiss : x ∉ S.vertices ∧ y ∉ S.vertices := by + rcases hc with ⟨hd2, _⟩ | ⟨_, _, _, _, _, hx', hy'⟩ | ⟨hd5, _⟩ + · omega + · exact ⟨hx', hy'⟩ + · omega + rcases Finset.mem_insert.mp hx with rfl | hx + · rcases Finset.mem_insert.mp hy with rfl | hy + · exact hxy rfl + · exact hmiss.2 (hincV hy) + · exact hmiss.1 (hincV hx) + · subst k + exact terminal_five_packing_contradiction hCE ht9 hcycle hclique hbound hXk + hexpand hpair hclass hfixed hv + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalPathClassification.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalPathClassification.lean new file mode 100644 index 0000000000000000000000000000000000000000..53350de07b248c728beebd3d53a8d02575f92ea8 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalPathClassification.lean @@ -0,0 +1,102 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalEndpointGeometry +import OAI.Combinatorics.Ramsey.CycleClique.Construction.StartingIncident +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OrientedSingleton +import OAI.Combinatorics.Ramsey.CycleClique.Construction.MissingCoverage +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalClassification + +namespace OAI + +/-! The actual three terminal configurations, including restrictions on +both targets of every short path between starting representatives. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} {S : ExpandedPathSystem G Q} + +theorem IsOptimal.terminal_starting_classification {k d : ℕ} + (hopt : S.IsOptimal k) (ht : 9 ≤ Q.card) (hQk : Q.card ≤ k) + (hkQ : k ≤ 2 * Q.card + 1) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hd : 1 ≤ d) (hd' : d ≤ 6) + (U : RawPathSystem G Q) (hUa : U.amount = S.amount) + (hUe : U.assignedCount = S.assignedCount) (hUi : U.normalize.incident = S.incident) + (hUvertices : ∀ v ∈ U.vertices, v ∈ Q ∨ v ∈ S.vertices) + {P M R : List (List V)} {B D : List V} {x y : V} + (hsys : U.chains = P ++ (x :: B) :: M ++ (y :: D) :: R) + (hBx : B = [] ↔ x ∉ S.vertices) (hDy : D = [] ↔ y ∉ S.vertices) + (hne : x ≠ y) (h : OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) x y d) : + S.amount = k - Q.card ∧ + (∃ original, SystemAssignedAmounts Q U.chains original ∧ ∀ b ∈ original, d ≤ b) ∧ + ((d = 2 ∧ Q.card ≤ S.incident + 2 ∧ Q \ S.vertices ⊆ {x, y}) ∨ + (d = 3 ∧ (Q.card = 9 ∨ Q.card = 11) ∧ + 2 * S.assignedCount = Q.card - 3 ∧ S.incident = Q.card - 3 ∧ + (∀ l ∈ S.chains, chainCliqueCount Q l = 2) ∧ x ∉ S.vertices ∧ y ∉ S.vertices) ∨ + (d = 5 ∧ Q.card = 9 ∧ k = 19 ∧ S.assignedCount = 2 ∧ S.incident = 4 ∧ + (∀ l ∈ S.chains, chainCliqueCount Q l = 2) ∧ x ∉ S.vertices ∧ y ∉ S.vertices)) := by + classical + obtain ⟨hL, _, _, hde⟩ := hopt.terminal_different_chain_starts ht hQk hkQ hQ hcycle hd hd' + U hUa hUe hUvertices (A := []) (C := []) (by simpa using hsys) (by simp) (by simp) h + obtain ⟨J, hJ, hJlen, hJout, hpath⟩ := h.interior + have hJQ : ∀ z ∈ J, z ∉ Q := fun z hz hzQ => hJout z hz (Or.inl hzQ) + have hpos : J ≠ [] := by intro he; simp only [he, List.length_nil] at hJlen; omega + have hdis : J.Disjoint U.chains.flatten := by + apply List.disjoint_left.mpr + intro z hz hzU + exact hJout z hz (hUvertices z (List.mem_toFinset.mpr hzU)) + obtain ⟨T, original, output, kept, removed, hT, hTa, ho, hout, hp, hq⟩ := + U.replace_different_chains_profiled (A := []) (C := []) + (by simpa using hsys) (by simp) (by simp) hJ hJQ hpos hdis hpath + obtain ⟨_, _, _, _, hweights⟩ := hopt.terminal_increment_profiles ht hQk hkQ hQ hcycle + hd hd' U T hUa hUe ho hout hp hq (by omega) + have hTchain : T.chains = P ++ [] :: M ++ [] :: + (B.reverse ++ x :: (J ++ y :: D)) :: R := by simpa using hT + have hTi := U.starting_replacement_incident T hsys hTchain hJQ hpos + rw [hUi] at hTi + have hTna : T.normalize.amount = S.amount + d := by + rw [RawPathSystem.normalize_amount] + omega + have hd2 : 2 ≤ d := by + by_contra hn + have hd1 : d = 1 := by omega + exact hopt.no_one_vertex_increase (by omega) hQk hQ hcycle T.normalize (by omega) + have hinterval : k + 1 < T.normalize.amount + T.normalize.incident := by + by_contra hn + exact T.normalize.forbidden_interval (by omega) hQ hcycle (by omega) (by omega) + have htarget : Q.card + 2 ≤ S.incident + d + + (if B = [] then 1 else 0) + (if D = [] then 1 else 0) := by omega + have htv : Q.card ≤ S.incident + d := by + split_ifs at htarget <;> omega + have hxQ : x ∈ Q := (U.endpoints _ (show x :: B ∈ U.chains by simp [hsys])).1 x (by simp) + have hyQ : y ∈ Q := (U.endpoints _ (show y :: D ∈ U.chains by simp [hsys])).1 y (by simp) + have hmissing : (Q \ S.vertices).card + S.incident = Q.card := by + simpa only [incident, Finset.inter_comm] using Finset.card_sdiff_add_card_inter Q S.vertices + have hBxM : B = [] ↔ x ∈ Q \ S.vertices := by + simpa only [Finset.mem_sdiff, hxQ, true_and] using hBx + have hDyM : D = [] ↔ y ∈ Q \ S.vertices := by + simpa only [Finset.mem_sdiff, hyQ, true_and] using hDy + have hboth (ha : 2 ≤ (if B = [] then 1 else 0) + (if D = [] then 1 else 0)) : + x ∉ S.vertices ∧ y ∉ S.vertices := by + have hBnil : B = [] := by by_contra hn; simp only [hn, ↓reduceIte] at ha; split_ifs at ha <;> omega + have hDnil : D = [] := by by_contra hn; simp only [hn, ↓reduceIte] at ha; (split_ifs at ha; omega) + exact ⟨hBx.mp hBnil, hDy.mp hDnil⟩ + refine ⟨hL, ⟨original, ho, hweights⟩, ?_⟩ + rcases terminal_classification_arithmetic ht hQk hkQ hL hd2 hd' hde htv + S.incident_le_twice_assignedCount with htwo | hthree | hfive + · obtain ⟨hd2, hv⟩ := htwo + refine Or.inl ⟨hd2, hv, ?_⟩ + apply subset_pair_of_card_le_indicators _ hne + simp only [← hBxM, ← hDyM] + omega + · obtain ⟨hd3, ht3, he3, hv3⟩ := hthree + have hmiss := hboth (by omega) + refine Or.inr (Or.inl ⟨hd3, ht3, he3, hv3, ?_, hmiss.1, hmiss.2⟩) + exact S.matching_of_incident_eq_twice (by omega) + · obtain ⟨hd5, ht5, hk5, he5, hv5⟩ := hfive + have hmiss := hboth (by omega) + refine Or.inr (Or.inr ⟨hd5, ht5, hk5, he5, hv5, ?_, hmiss.1, hmiss.2⟩) + exact S.matching_of_incident_eq_twice (by omega) + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalProfileMinimum.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalProfileMinimum.lean new file mode 100644 index 0000000000000000000000000000000000000000..affe77b1ac121850b34da790c08def1c1fe311f2 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalProfileMinimum.lean @@ -0,0 +1,87 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.InteriorOrientations +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalRepresentatives + +namespace OAI + +/-! Recover the lower bound on every original assigned amount from an +actual classified short path between completed representatives. -/ + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +namespace SystemAssignedAmounts + +theorem minimum_of_subset {C D : List (List V)} {W : List ℕ} {d : ℕ} + (h : SystemAssignedAmounts Q D W) (hmin : ∀ a ∈ W, d ≤ a) + (hsub : ∀ l ∈ C, l ∈ D) : + ∃ w, SystemAssignedAmounts Q C w ∧ ∀ a ∈ w, d ≤ a := by + induction C with + | nil => exact ⟨[], .nil, by simp⟩ + | cons l C ih => + obtain ⟨a, ha, hamin⟩ := h.profile_of_mem (hsub l (by simp)) + obtain ⟨w, hw, hwmin⟩ := ih (fun l hl => hsub l (by simp [hl])) + refine ⟨a ++ w, .cons ha hw, ?_⟩ + intro x hx + rcases List.mem_append.mp hx with hx | hx + · exact hmin x (hamin x hx) + · exact hwmin x hx + +end SystemAssignedAmounts + +theorem chainRepresentatives_clique_head {l : List V} {x : V} + (hsteps : l.IsChain (fun a b => ¬ (a ∈ Q ∧ b ∈ Q))) + (hx : x ∈ chainRepresentatives Q l) (hxQ : x ∈ Q) : ∃ B, l = x :: B := by + cases l with + | nil => simp [chainRepresentatives] at hx + | cons a B => + rcases List.mem_cons.mp hx with rfl | hx + · exact ⟨B, rfl⟩ + · exact False.elim (representativesFrom_outside hsteps x hx hxQ) + +namespace ExpandedPathSystem + +variable {S : ExpandedPathSystem G Q} + +theorem complete_tail_nil_iff (S : ExpandedPathSystem G Q) {x : V} {B : List V} + (hl : x :: B ∈ S.toRaw.completeClique.chains) : B = [] ↔ x ∉ S.vertices := by + apply S.oriented_complete_tail_nil_iff (fun _ => false) + simpa [RawPathSystem.orientChains, RawPathSystem.orientedChain] using hl + +theorem IsOptimal.terminal_completed_profile_minimum {k d : ℕ} + (hopt : S.IsOptimal k) (ht : 9 ≤ Q.card) (hQk : Q.card ≤ k) + (hkQ : k ≤ 2 * Q.card + 1) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hd : 1 ≤ d) (hd' : d ≤ 6) + {x y : V} (hx : x ∈ S.toRaw.completeClique.representatives) + (hy : y ∈ S.toRaw.completeClique.representatives) (hxQ : x ∈ Q) (hyQ : y ∈ Q) + (hne : x ≠ y) (hout : OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) x y d) : + ∃ w, SystemAssignedAmounts Q S.chains w ∧ ∀ a ∈ w, d ≤ a := by + let U := S.toRaw.completeClique + obtain ⟨a, ha, hxa⟩ := List.mem_flatten.mp hx + obtain ⟨l, hl, rfl⟩ := List.mem_map.mp ha + obtain ⟨B, rfl⟩ := chainRepresentatives_clique_head (U.no_clique_steps l hl) hxa hxQ + obtain ⟨b, hb, hyb⟩ := List.mem_flatten.mp hy + obtain ⟨m, hm, rfl⟩ := List.mem_map.mp hb + obtain ⟨D, rfl⟩ := chainRepresentatives_clique_head (U.no_clique_steps m hm) hyb hyQ + have hBD : x :: B ≠ y :: D := fun he => hne (List.cons.inj he).1 + obtain ⟨R, hp⟩ := U.bring_two_front hl hm hBD + let U' := U.reorder ((x :: B) :: (y :: D) :: R) hp + have hvertices : ∀ v ∈ U'.vertices, v ∈ Q ∨ v ∈ S.vertices := by + intro v hv + rw [RawPathSystem.reorder_vertices, RawPathSystem.completeClique_vertices] at hv + exact (Finset.mem_union.mp hv).symm + obtain ⟨_, ⟨w, hw, hmin⟩, _⟩ := hopt.terminal_starting_classification ht hQk hkQ hQ hcycle hd hd' + U' (by simp [U', U]) (by simp [U', U]) (by simp [U', U]) hvertices + (P := []) (M := []) (R := R) rfl (S.complete_tail_nil_iff hl) (S.complete_tail_nil_iff hm) hne hout + apply hw.minimum_of_subset hmin + intro l hl + change l ∈ (x :: B) :: (y :: D) :: R + apply hp.mem_iff.mpr + exact List.mem_append_left _ hl + +end ExpandedPathSystem + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalRepresentative.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..a14e54d0cfdc91e660ff68ae7682692535a0519d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalRepresentative.lean @@ -0,0 +1,118 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawReverse +import OAI.Combinatorics.Ramsey.CycleClique.Construction.InteriorRepresentativeGrowth +import OAI.Combinatorics.Ramsey.CycleClique.Construction.PathSystemCounts + +namespace OAI + +/-! Reversing chains supplies an extra excluded clique neighbour at any +unused clique representative. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type} [Fintype V] {G : SimpleGraph V} {Q : Finset V} {S : ExpandedPathSystem G Q} + +omit [Fintype V] in +theorem terminal_not_representative (S : ExpandedPathSystem G Q) {l : List V} + (hl : l ∈ S.chains) {q : V} (hq : q ∈ l.getLast?) : q ∉ S.representativeFinset := by + have hqQ := (S.endpoints l hl).2 q hq + have hql : q ∈ l := List.mem_of_mem_getLast? hq + have hqS : q ∈ S.vertices := List.mem_toFinset.mpr (List.mem_flatten.mpr ⟨l, hl, hql⟩) + intro hrep + obtain ⟨r, hr, hqr⟩ := List.mem_flatten.mp (List.mem_toFinset.mp hrep) + obtain ⟨m, hm, her⟩ := List.mem_map.mp hr + subst r + have hqm : q ∈ m := (chainRepresentatives_sublist m).subset hqr + change m ∈ S.chains ++ (Q \ S.toRaw.vertices).toList.map (fun v => [v]) at hm + rcases List.mem_append.mp hm with hm | hm + · by_cases hlm : l = m + · subst m + have hhead := chainRepresentatives_clique_mem_head (S.no_clique_steps l hl) hqr hqQ + have hlen := S.nontrivial l hl + have hne : l ≠ [] := by intro he; simp [he] at hlen + have hh : l.head hne = q := by + simpa only [List.head?_eq_some_head hne, Option.mem_some_iff] using hhead + have ht : l.getLast hne = q := by + simpa only [List.getLast?_eq_some_getLast hne, Option.mem_some_iff] using hq + obtain ⟨v, hv⟩ := ((S.paths l hl).1.head_eq_getLast_iff hne).mp (hh.trans ht.symm) + simp [hv] at hlen + · exact List.disjoint_left.mp (S.toRaw.disjoint_of_mem hl hm hlm) hql hqm + · obtain ⟨v, hv, hmv⟩ := List.mem_map.mp hm + have heq : q = v := by simpa [← hmv] using hqm + have hvnot := (Finset.mem_sdiff.mp (Finset.mem_toList.mp hv)).2 + exact hvnot (heq ▸ hqS) + +theorem IsOptimal.unused_representative_extra_neighbor {k : ℕ} (hopt : S.IsOptimal k) + (hk : 3 ≤ k) (hQk : Q.card ≤ k) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hchains : S.chains ≠ []) + {x : V} (hxQ : x ∈ Q) (hxS : x ∉ S.vertices) : + ∃ y ∈ S.ground, y ∉ S.representativeFinset ∧ + ∀ u ∈ outsideBallFinset G S.ground x 0, ¬ G.Adj u y := by + let l := S.chains.head hchains + have hl : l ∈ S.chains := List.head_mem hchains + have hlen := S.nontrivial l hl + have hne : l ≠ [] := by intro he; simp [he] at hlen + let q := l.getLast hne + have hq : q ∈ l.getLast? := List.getLast?_eq_some_getLast hne + have hqQ := (S.endpoints l hl).2 q hq + have hqS : q ∈ S.vertices := List.mem_toFinset.mpr + (List.mem_flatten.mpr ⟨l, hl, List.getLast_mem hne⟩) + have hqrep := S.terminal_not_representative hl hq + have hxrep := RawPathSystem.completed_unused_representative S hxQ hxS + have hqreverse : q ∈ S.toRaw.completeClique.reverseChains.representatives := by + apply RawPathSystem.reversed_terminal_representative S.toRaw.completeClique + (List.mem_append_left _ hl : l ∈ S.toRaw.completeClique.chains) hq + have hvertices : ∀ v ∈ S.toRaw.completeClique.reverseChains.vertices, + v ∈ Q ∨ v ∈ S.vertices := by + intro v hv + rw [RawPathSystem.reverseChains_vertices, RawPathSystem.completeClique_vertices] at hv + exact (Finset.mem_union.mp hv).symm + have hxq : x ≠ q := fun h => hxS (h.symm ▸ hqS) + have hf := hopt.representatives_one_exclusion hk hQk hQ hcycle + S.toRaw.completeClique.reverseChains (by simp) hvertices hxrep.2 hqreverse hxq + refine ⟨q, Finset.mem_union_left _ hqQ, hqrep, ?_⟩ + intro u hu huq + have hball := mem_outsideBallFinset.mp hu + have hxX : x ∈ S.ground := Finset.mem_union_left _ hxQ + have hxu := ((outsideBall_zero hxX).mp hball).1 + apply hf + simpa only [ground, Finset.coe_union] using + outsidePath_one_of_common_neighbor hxq hxu huq hball.1 + +theorem IsOptimal.two_unused_nonclique_balls {k : ℕ} (hopt : S.IsOptimal k) + (hk : 3 ≤ k) (hQk : Q.card ≤ k) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hclique : G.cliqueNum ≤ Q.card) + (hexpand : ∀ v, k + 1 ≤ (closedNeighborhood G {v}).card) + (he : S.assignedCount = 1) (ht : 4 ≤ Q.card) : + ∃ a ∈ S.representativeFinset, ∃ b ∈ S.representativeFinset, a ≠ b ∧ + ¬ G.IsClique (outsideBallFinset G S.ground a 1 : Set V) ∧ + ¬ G.IsClique (outsideBallFinset G S.ground b 1 : Set V) := by + have hinc := S.incident_eq_two_of_assignedCount_one he + have hcard := Finset.card_sdiff_add_card_inter Q S.vertices + have hinter : (Q ∩ S.vertices).card = S.incident := by + simp [incident, Finset.inter_comm] + have htwo : 1 < (Q \ S.vertices).card := by omega + obtain ⟨a, ha, b, hb, hab⟩ := Finset.one_lt_card.mp htwo + have hchains : S.chains ≠ [] := by + intro hc + have hraw := S.assignedCount_eq_raw + simp [hc, rawAssignedCount, he] at hraw + have hclique' : G.cliqueNum ≤ S.representativeFinset.card := by + simpa only [S.representativeFinset_card] using hclique + have hnonclique : ∀ x ∈ Q \ S.vertices, + x ∈ S.representativeFinset ∧ ¬ G.IsClique (outsideBallFinset G S.ground x 1 : Set V) := by + intro x hx + obtain ⟨hxQ, hxS⟩ := Finset.mem_sdiff.mp hx + have hxR : x ∈ S.representativeFinset := List.mem_toFinset.mpr + (RawPathSystem.completed_unused_representative S hxQ hxS).1 + obtain ⟨y, hyX, hyR, hmiss⟩ := hopt.unused_representative_extra_neighbor hk hQk hQ hcycle hchains hxQ hxS + refine ⟨hxR, representative_ball_one_not_clique hxR S.representativeFinset_subset_ground + (hopt.ground_card_le hQk) hyX hyR hclique' hexpand ?_ hmiss⟩ + exact fun z hz hne => hopt.representativeFinset_one_exclusion hk hQk hQ hcycle hxR hz hne + exact ⟨a, (hnonclique a ha).1, b, (hnonclique b hb).1, hab, + (hnonclique a ha).2, (hnonclique b hb).2⟩ + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalRepresentativeSets.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalRepresentativeSets.lean new file mode 100644 index 0000000000000000000000000000000000000000..4362999439da2fc52c7f198ab4882a1097a727f4 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalRepresentativeSets.lean @@ -0,0 +1,78 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalRepresentatives +import OAI.Combinatorics.Ramsey.CycleClique.Construction.OptimalRepresentatives + +namespace OAI + +/-! Separate the original representatives from the singleton representatives +of missing clique vertices. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} + +noncomputable def incidentRepresentatives (S : ExpandedPathSystem G Q) : Finset V := + S.toRaw.representatives.toFinset + +theorem incidentRepresentatives_card (S : ExpandedPathSystem G Q) : + S.incidentRepresentatives.card = S.incident := by + rw [incidentRepresentatives, List.toFinset_card_of_nodup S.toRaw.representatives_nodup, + RawPathSystem.representatives_length, S.incident_eq_chainCliqueCount] + rfl + +theorem incidentRepresentatives_subset_vertices (S : ExpandedPathSystem G Q) : + S.incidentRepresentatives ⊆ S.vertices := by + intro x hx + exact List.mem_toFinset.mpr (S.toRaw.representatives_sublist.subset (List.mem_toFinset.mp hx)) + +theorem complete_representatives_eq (S : ExpandedPathSystem G Q) : + S.toRaw.completeClique.representatives = S.toRaw.representatives ++ (Q \ S.vertices).toList := by + simp [RawPathSystem.representatives, RawPathSystem.completeClique, chainRepresentatives, + representativesFrom, List.map_append, List.flatten_append, List.map_map, Function.comp_def] + change ((Q \ S.vertices).toList.map (fun v => [v])).flatten = _ + generalize (Q \ S.vertices).toList = L + induction L with + | nil => rfl + | cons x L ih => simpa using congrArg (List.cons x) ih + +theorem representativeFinset_eq_union (S : ExpandedPathSystem G Q) : + S.representativeFinset = S.incidentRepresentatives ∪ (Q \ S.vertices) := by + rw [representativeFinset, S.complete_representatives_eq, List.toFinset_append] + simp only [Finset.toList_toFinset, incidentRepresentatives] + +theorem incidentRepresentatives_subset_representatives (S : ExpandedPathSystem G Q) : + S.incidentRepresentatives ⊆ S.representativeFinset := by + rw [S.representativeFinset_eq_union] + exact Finset.subset_union_left + +theorem missing_subset_representatives (S : ExpandedPathSystem G Q) : + Q \ S.vertices ⊆ S.representativeFinset := by + rw [S.representativeFinset_eq_union] + exact Finset.subset_union_right + +theorem missing_card_add_incident (S : ExpandedPathSystem G Q) : + (Q \ S.vertices).card + S.incident = Q.card := by + have hh := Finset.card_sdiff_add_card_inter Q S.vertices + simpa only [incident, Finset.inter_comm] using hh + +theorem IsOptimal.terminal_finset_classification {S : ExpandedPathSystem G Q} {k d : ℕ} + (hopt : S.IsOptimal k) (ht : 9 ≤ Q.card) (hQk : Q.card ≤ k) + (hkQ : k ≤ 2 * Q.card + 1) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hd : 1 ≤ d) (hd' : d ≤ 6) + {x y : V} (hx : x ∈ S.representativeFinset) (hy : y ∈ S.representativeFinset) + (hne : x ≠ y) (hout : OutsidePath G (S.ground : Set V) x y d) : + x ∈ Q ∧ y ∈ Q ∧ S.amount = k - Q.card ∧ d * S.assignedCount ≤ S.amount ∧ + TerminalAlternative S k d x y := by + apply hopt.terminal_completed_classification ht hQk hkQ hQ hcycle hd hd' (fun _ => false) + (x := x) (y := y) + · simpa [RawPathSystem.representatives, RawPathSystem.orientChains, + RawPathSystem.orientedChain] using List.mem_toFinset.mp hx + · simpa [RawPathSystem.representatives, RawPathSystem.orientChains, + RawPathSystem.orientedChain] using List.mem_toFinset.mp hy + · exact hne + · simpa only [ground, Finset.coe_union] using hout + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalRepresentatives.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalRepresentatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..f30125345e78a542164e27516face6638c34c50a --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalRepresentatives.lean @@ -0,0 +1,108 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalPathClassification +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RepresentativeExclusion + +namespace OAI + +/-! Terminal classification for every representative pair in every +independent orientation of the completed path system. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type*} {G : SimpleGraph V} {Q : Finset V} {S : ExpandedPathSystem G Q} + +abbrev TerminalAlternative (S : ExpandedPathSystem G Q) (k d : ℕ) (x y : V) : Prop := + (d = 2 ∧ Q.card ≤ S.incident + 2 ∧ Q \ S.vertices ⊆ {x, y}) ∨ + (d = 3 ∧ (Q.card = 9 ∨ Q.card = 11) ∧ + 2 * S.assignedCount = Q.card - 3 ∧ S.incident = Q.card - 3 ∧ + (∀ l ∈ S.chains, chainCliqueCount Q l = 2) ∧ x ∉ S.vertices ∧ y ∉ S.vertices) ∨ + (d = 5 ∧ Q.card = 9 ∧ k = 19 ∧ S.assignedCount = 2 ∧ S.incident = 4 ∧ + (∀ l ∈ S.chains, chainCliqueCount Q l = 2) ∧ x ∉ S.vertices ∧ y ∉ S.vertices) + +theorem IsOptimal.terminal_representative_classification {k d : ℕ} + (hopt : S.IsOptimal k) (ht : 9 ≤ Q.card) (hQk : Q.card ≤ k) + (hkQ : k ≤ 2 * Q.card + 1) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hd : 1 ≤ d) (hd' : d ≤ 6) + (U : RawPathSystem G Q) (hUa : U.amount = S.amount) + (hUe : U.assignedCount = S.assignedCount) (hUi : U.normalize.incident = S.incident) + (hUvertices : ∀ v ∈ U.vertices, v ∈ Q ∨ v ∈ S.vertices) + (hsingleton : ∀ l ∈ U.chains, ∀ x ∈ l, l.length = 1 ↔ x ∉ S.vertices) + {x y : V} (hx : x ∈ U.representatives) (hy : y ∈ U.representatives) (hne : x ≠ y) + (h : OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) x y d) : + x ∈ Q ∧ y ∈ Q ∧ S.amount = k - Q.card ∧ d * S.assignedCount ≤ S.amount ∧ + TerminalAlternative S k d x y := by + obtain ⟨l, hl, hx⟩ := List.mem_flatten.mp hx + obtain ⟨l', hl', heql⟩ := List.mem_map.mp hl + subst l + obtain ⟨m, hm, hy⟩ := List.mem_flatten.mp hy + obtain ⟨m', hm', heqm⟩ := List.mem_map.mp hm + subst m + have hxc := chainRepresentatives_mem_cut hx + have hyc := chainRepresentatives_mem_cut hy + by_cases hlm : l' = m' + · subst m' + obtain ⟨P, R, hchains⟩ := List.append_of_mem hl' + rcases repCuts_ordered (U.paths l' hl').1 hne hxc hyc with + ⟨A, B, D, he, hA, hB⟩ | ⟨A, B, D, he, hA, hB⟩ + · exact False.elim (hopt.terminal_same_chain_exclusion ht hQk hkQ hQ hcycle hd hd' + U hUa hUe hUvertices (by simpa [he] using hchains) hA hB h) + · exact False.elim (hopt.terminal_same_chain_exclusion ht hQk hkQ hQ hcycle hd hd' + U hUa hUe hUvertices (by simpa [he] using hchains) hA hB h.reverse) + · obtain ⟨R, hp⟩ := U.bring_two_front hl' hm' hlm + let U' := U.reorder (l' :: m' :: R) hp + have hUa' : U'.amount = S.amount := by simpa [U'] using hUa + have hUe' : U'.assignedCount = S.assignedCount := by simpa [U'] using hUe + have hUi' : U'.normalize.incident = S.incident := by simpa [U'] using hUi + have hUvertices' : ∀ v ∈ U'.vertices, v ∈ Q ∨ v ∈ S.vertices := by + simpa [U'] using hUvertices + obtain ⟨A, B, he₁, hA⟩ := hxc + obtain ⟨C, D, he₂, hC⟩ := hyc + have hsys : U'.chains = [] ++ (A ++ x :: B) :: [] ++ (C ++ y :: D) :: R := by + simp [U', RawPathSystem.reorder, he₁, he₂] + obtain ⟨hL, hAnil, hCnil, hde⟩ := hopt.terminal_different_chain_starts ht hQk hkQ hQ hcycle + hd hd' U' hUa' hUe' hUvertices' hsys hA hC h + subst A + subst C + have hmemB : x :: B ∈ U.chains := by + have hh := hl' + rw [he₁] at hh + simpa using hh + have hmemD : y :: D ∈ U.chains := by + have hh := hm' + rw [he₂] at hh + simpa using hh + have hBx : B = [] ↔ x ∉ S.vertices := by simpa using hsingleton _ hmemB x (by simp) + have hDy : D = [] ↔ y ∉ S.vertices := by simpa using hsingleton _ hmemD y (by simp) + obtain ⟨_, _, halt⟩ := hopt.terminal_starting_classification ht hQk hkQ hQ hcycle hd hd' + U' hUa' hUe' hUi' hUvertices' (P := []) (M := []) (R := R) (by simpa using hsys) hBx hDy hne h + exact ⟨(U.endpoints _ hmemB).1 x (by simp), + (U.endpoints _ hmemD).1 y (by simp), hL, hde, halt⟩ + +theorem IsOptimal.terminal_completed_classification {k d : ℕ} + (hopt : S.IsOptimal k) (ht : 9 ≤ Q.card) (hQk : Q.card ≤ k) + (hkQ : k ≤ 2 * Q.card + 1) (hQ : G.IsClique (Q : Set V)) + (hcycle : ¬ HasCycle G (k + 1)) (hd : 1 ≤ d) (hd' : d ≤ 6) + (p : List V → Bool) {x y : V} + (hx : x ∈ (S.toRaw.completeClique.orientChains p).representatives) + (hy : y ∈ (S.toRaw.completeClique.orientChains p).representatives) (hne : x ≠ y) + (h : OutsidePath G ((Q : Set V) ∪ (S.vertices : Set V)) x y d) : + x ∈ Q ∧ y ∈ Q ∧ S.amount = k - Q.card ∧ d * S.assignedCount ≤ S.amount ∧ + TerminalAlternative S k d x y := by + apply hopt.terminal_representative_classification ht hQk hkQ hQ hcycle hd hd' + (S.toRaw.completeClique.orientChains p) (by simp) (by simp) (by simp) ?_ + (fun l hl x hx => S.oriented_complete_singleton_iff p hl hx) hx hy hne h + intro v hv + rw [RawPathSystem.orientChains_vertices, RawPathSystem.completeClique_vertices] at hv + exact (Finset.mem_union.mp hv).symm + +theorem TerminalAlternative.parameter_unique {k d d' : ℕ} {x y x' y' : V} + (ht : 9 ≤ Q.card) (h : TerminalAlternative S k d x y) + (h' : TerminalAlternative S k d' x' y') : d = d' := by + rcases h with ⟨hd, hv, _⟩ | ⟨hd, _, _, hv, _, _, _⟩ | ⟨hd, ht9, _, _, hv, _, _, _⟩ <;> + rcases h' with ⟨hd', hv', _⟩ | ⟨hd', _, _, hv', _, _, _⟩ | + ⟨hd', ht9', _, _, hv', _, _, _⟩ <;> omega + +end CycleClique.Construction.ExpandedPathSystem + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalWeights.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalWeights.lean new file mode 100644 index 0000000000000000000000000000000000000000..cf9b98388616556636dd8d3714dc5f6e49562ecc --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TerminalWeights.lean @@ -0,0 +1,118 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RawOrientations +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TerminalRepresentative +import OAI.Combinatorics.Ramsey.CycleClique.Construction.RepresentativeExtraNeighbor + +namespace OAI + +/-! The extra excluded terminal vertex in terminal:weights. Orienting a +different nontrivial chain supplies it for every representative. -/ + +namespace CycleClique.Construction.ExpandedPathSystem + +open scoped Classical + +variable {V : Type} [Fintype V] {G : SimpleGraph V} {Q : Finset V} + +omit [Fintype V] in +theorem exists_chain_avoiding (S : ExpandedPathSystem G Q) + (hc : 2 ≤ S.chains.length) (x : V) : ∃ l ∈ S.chains, x ∉ l := by + cases hcs : S.chains with + | nil => simp only [hcs, List.length_nil] at hc; omega + | cons l C => + cases C with + | nil => simp only [hcs, List.length_cons, List.length_nil] at hc; omega + | cons m C => + have hdis : l.Disjoint m := + (List.pairwise_cons.mp (show (l :: m :: C).Pairwise List.Disjoint by + rw [← hcs]; exact S.disjoint)).1 m (by simp) + by_cases hx : x ∈ l + · exact ⟨m, by simp, fun hxm => List.disjoint_left.mp hdis hx hxm⟩ + · exact ⟨l, by simp, hx⟩ + +theorem IsOptimal.representative_extra_terminal {S : ExpandedPathSystem G Q} {k : ℕ} + (hopt : S.IsOptimal k) (hk : 3 ≤ k) (hQk : Q.card ≤ k) + (hQ : G.IsClique (Q : Set V)) (hcycle : ¬ HasCycle G (k + 1)) + (hc : 2 ≤ S.chains.length) {x : V} (hx : x ∈ S.representativeFinset) : + ∃ q ∈ S.ground, q ∉ S.representativeFinset ∧ + ∀ u ∈ outsideBallFinset G S.ground x 0, ¬ G.Adj u q := by + obtain ⟨l, hl, hxl⟩ := S.exists_chain_avoiding hc x + have hlen := S.nontrivial l hl + have hne : l ≠ [] := by intro he; simp [he] at hlen + let q := l.getLast hne + have hq : q ∈ l.getLast? := List.getLast?_eq_some_getLast hne + have hqQ := (S.endpoints l hl).2 q hq + have hqrep := S.terminal_not_representative hl hq + let U := S.toRaw.completeClique.orientChains (fun r => decide (r = l)) + have hqU : q ∈ U.representatives := by + apply RawPathSystem.representatives_orientChains_terminal S.toRaw.completeClique + (List.mem_append_left _ hl : l ∈ S.toRaw.completeClique.chains) (by simp) hq + have hxU : x ∈ U.representatives := by + obtain ⟨r, hr, hxr⟩ := List.mem_flatten.mp (List.mem_toFinset.mp hx) + obtain ⟨m, hm, he⟩ := List.mem_map.mp hr + subst r + have hxm : x ∈ m := (chainRepresentatives_sublist m).subset hxr + have hml : m ≠ l := by intro he; subst m; exact hxl hxm + exact RawPathSystem.representatives_orientChains_unchanged S.toRaw.completeClique + hm (by simp [hml]) hxr + have hUamount : U.amount = S.amount := by simp [U] + have hUvertices : ∀ v ∈ U.vertices, v ∈ Q ∨ v ∈ S.vertices := by + intro v hv + simp only [U, RawPathSystem.orientChains_vertices, + RawPathSystem.completeClique_vertices] at hv + exact (Finset.mem_union.mp hv).symm + have hxq : x ≠ q := by intro he; exact hqrep (he ▸ hx) + have hf := hopt.representatives_one_exclusion hk hQk hQ hcycle U hUamount hUvertices + hxU hqU hxq + refine ⟨q, Finset.mem_union_left _ hqQ, hqrep, ?_⟩ + intro u hu huq + have hball := mem_outsideBallFinset.mp hu + have hxu := ((outsideBall_zero (S.representativeFinset_subset_ground hx)).mp hball).1 + apply hf + simpa only [ground, Finset.coe_union] using + outsidePath_one_of_common_neighbor hxq hxu huq hball.1 + +theorem IsOptimal.terminal_first_ball {S : ExpandedPathSystem G Q} {k : ℕ} + (hopt : S.IsOptimal k) (hk : 3 ≤ k) (hQk : Q.card ≤ k) + (hQ : G.IsClique (Q : Set V)) (hcycle : ¬ HasCycle G (k + 1)) + (hclique : G.cliqueNum ≤ Q.card) (hc : 2 ≤ S.chains.length) + (hexpand : ∀ v, k + 1 ≤ (closedNeighborhood G {v}).card) + {x : V} (hx : x ∈ S.representativeFinset) : + Q.card + 1 ≤ (outsideBallFinset G S.ground x 1).card ∧ + HasIndependent (G.induce (outsideBallFinset G S.ground x 1 : Set V)) 2 := by + obtain ⟨q, hqX, hqR, hmiss⟩ := hopt.representative_extra_terminal hk hQk hQ hcycle hc hx + have hbig := representative_ball_one_extra hx S.representativeFinset_subset_ground + (hopt.ground_card_le hQk) hqX hqR hexpand + (fun y hy hne => hopt.representativeFinset_one_exclusion hk hQk hQ hcycle hx hy hne) + hmiss + rw [S.representativeFinset_card] at hbig + refine ⟨by omega, independent_pair_of_not_clique ?_⟩ + intro hC + have hh := hC.card_le_cliqueNum.trans hclique + omega + +end CycleClique.Construction.ExpandedPathSystem + +namespace CycleClique.Construction +open scoped Classical + +variable {V : Type} [Fintype V] {G : SimpleGraph V} + +theorem outsideBall_two_triple_of_first_pair (hCE : CEAlphaTwo) {k t : ℕ} + (hk : 5 ≤ k) (ht : 1 ≤ t) (hkt : 2 * t ≤ k) + (hcycle : ¬ HasCycle G (k + 1)) (hclique : G.cliqueNum ≤ t) + {X : Finset V} {x : V} (hXk : X.card ≤ k) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + k * I.card + 1 ≤ (closedNeighborhood G I).card) + (hpair : HasIndependent (G.induce (outsideBallFinset G X x 1 : Set V)) 2) : + HasIndependent (G.induce (outsideBallFinset G X x 2 : Set V)) 3 := by + obtain ⟨I, hI, hind, hIcard⟩ := exists_independent_subset hpair + have hne : I.Nonempty := Finset.card_pos.mp (by omega) + have hg := outsideBall_growth (A := ∅) (by simp) hI (by simp) (hexpand I hind hne) + rw [hIcard] at hg + simp only [Finset.card_empty, Nat.add_zero, Nat.reduceAdd] at hg + apply size_test hCE hk ht hcycle hclique (outsideBallFinset G X x 2) + exact max_lt_iff.mpr ⟨by omega, by omega⟩ + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Triangle.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Triangle.lean new file mode 100644 index 0000000000000000000000000000000000000000..f85c43069a72b14a1819a0365fcc5ef75406c8f1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Triangle.lean @@ -0,0 +1,12 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.TriangleFacts + +namespace OAI + +namespace CycleClique.Construction +/-- The excluded pair in the cycle–clique formula has Ramsey number six. -/ +theorem triangle_ramsey : IsRamseyNumber 3 3 6 := + isRamseyNumber_of_upper_lower triangle_upper triangle_lower + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TriangleFacts.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TriangleFacts.lean new file mode 100644 index 0000000000000000000000000000000000000000..fbfe332f149f1dc7fa9afc549d49ccfdc49b76f5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TriangleFacts.lean @@ -0,0 +1,108 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Monotonicity + +namespace OAI + +/-! +# The exceptional triangle Ramsey number + +The elementary six-vertex argument and the complementary pentagons prove +`R(C₃,K₃) = 6`, the exceptional clause of the manuscript's main theorem. +-/ + +namespace CycleClique.Construction +variable {V : Type*} {G : SimpleGraph V} + +theorem hasCycle_three_of_edges {x y z : V} + (hxy : G.Adj x y) (hyz : G.Adj y z) (hzx : G.Adj z x) : HasCycle G 3 := by + refine ⟨![x, y, z], ?_, ?_⟩ + · intro i j hij + fin_cases i <;> fin_cases j <;> simp_all [hxy.ne, hyz.ne, hzx.ne] + · intro i + fin_cases i + · simpa [cycleNext] using hxy + · simpa [cycleNext] using hyz + · simpa [cycleNext] using hzx + +theorem hasIndependent_three_of_distinct_nonadjacent {x y z : V} + (hxy : x ≠ y) (hxz : x ≠ z) (hyz : y ≠ z) + (hxy' : ¬ G.Adj x y) (hxz' : ¬ G.Adj x z) (hyz' : ¬ G.Adj y z) : + HasIndependent G 3 := by + refine ⟨![x, y, z], ?_, ?_⟩ + · intro i j hij + fin_cases i <;> fin_cases j <;> simp_all + · intro i j + have hyx' : ¬ G.Adj y x := fun h => hxy' h.symm + have hzx' : ¬ G.Adj z x := fun h => hxz' h.symm + have hzy' : ¬ G.Adj z y := fun h => hyz' h.symm + fin_cases i <;> fin_cases j <;> simp_all + +/-- Every graph on six vertices has a triangle or three independent vertices. -/ +theorem triangle_upper : RamseyProperty 3 3 6 := by + intro G + classical + let red : Finset (Fin 5) := Finset.univ.filter (fun i => G.Adj 0 i.succ) + let blue : Finset (Fin 5) := Finset.univ.filter (fun i => ¬ G.Adj 0 i.succ) + have hsum : red.card + blue.card = 5 := by + simpa [red, blue] using + Finset.card_filter_add_card_filter_not (s := Finset.univ) (fun i : Fin 5 => G.Adj 0 i.succ) + have hlarge : 2 < red.card ∨ 2 < blue.card := by omega + rcases hlarge with hr | hb + · obtain ⟨x, y, z, hx, hy, hz, hxy, hxz, hyz⟩ := Finset.two_lt_card_iff.mp hr + have hx' : G.Adj 0 x.succ := (Finset.mem_filter.mp hx).2 + have hy' : G.Adj 0 y.succ := (Finset.mem_filter.mp hy).2 + have hz' : G.Adj 0 z.succ := (Finset.mem_filter.mp hz).2 + by_cases hxy' : G.Adj x.succ y.succ + · exact Or.inl (hasCycle_three_of_edges hx' hxy' hy'.symm) + by_cases hxz' : G.Adj x.succ z.succ + · exact Or.inl (hasCycle_three_of_edges hx' hxz' hz'.symm) + by_cases hyz' : G.Adj y.succ z.succ + · exact Or.inl (hasCycle_three_of_edges hy' hyz' hz'.symm) + exact Or.inr (hasIndependent_three_of_distinct_nonadjacent ((Fin.succ_injective 5).ne hxy) + ((Fin.succ_injective 5).ne hxz) ((Fin.succ_injective 5).ne hyz) hxy' hxz' hyz') + · obtain ⟨x, y, z, hx, hy, hz, hxy, hxz, hyz⟩ := Finset.two_lt_card_iff.mp hb + have hx' : ¬ G.Adj 0 x.succ := (Finset.mem_filter.mp hx).2 + have hy' : ¬ G.Adj 0 y.succ := (Finset.mem_filter.mp hy).2 + have hz' : ¬ G.Adj 0 z.succ := (Finset.mem_filter.mp hz).2 + by_cases hxy' : G.Adj x.succ y.succ + · by_cases hxz' : G.Adj x.succ z.succ + · by_cases hyz' : G.Adj y.succ z.succ + · exact Or.inl (hasCycle_three_of_edges hxy' hyz' hxz'.symm) + · exact Or.inr (hasIndependent_three_of_distinct_nonadjacent (Fin.succ_ne_zero y).symm + (Fin.succ_ne_zero z).symm ((Fin.succ_injective 5).ne hyz) hy' hz' hyz') + · exact Or.inr (hasIndependent_three_of_distinct_nonadjacent (Fin.succ_ne_zero x).symm + (Fin.succ_ne_zero z).symm ((Fin.succ_injective 5).ne hxz) hx' hz' hxz') + · exact Or.inr (hasIndependent_three_of_distinct_nonadjacent (Fin.succ_ne_zero x).symm + (Fin.succ_ne_zero y).symm ((Fin.succ_injective 5).ne hxy) hx' hy' hxy') + +/-- The pentagon coloring: red edges have cyclic difference one. -/ +def pentagon : SimpleGraph (Fin 5) where + Adj x y := (x.val + 1) % 5 = y.val ∨ (y.val + 1) % 5 = x.val + symm := ⟨fun _ _ h => h.symm⟩ + loopless := ⟨by intro x h; rcases h with h | h <;> omega⟩ + +instance : DecidableRel pentagon.Adj := by unfold pentagon; infer_instance + +private theorem pentagon_no_triangle : + ∀ x y z : Fin 5, pentagon.Adj x y → pentagon.Adj y z → ¬ pentagon.Adj z x := by + decide + +private theorem pentagon_no_independent_triple : + ∀ x y z : Fin 5, x ≠ y → x ≠ z → y ≠ z → + ¬ pentagon.Adj x y → ¬ pentagon.Adj x z → pentagon.Adj y z := by + intro x y z + fin_cases x <;> fin_cases y <;> fin_cases z <;> decide + +/-- Five vertices do not force a monochromatic triangle. -/ +theorem triangle_lower : ¬ RamseyProperty 3 3 5 := by + intro h + rcases h pentagon with ⟨f, hf, he⟩ | ⟨f, hf, he⟩ + · have h01 : pentagon.Adj (f 0) (f 1) := by simpa [cycleNext] using he 0 + have h12 : pentagon.Adj (f 1) (f 2) := by simpa [cycleNext] using he 1 + have h20 : pentagon.Adj (f 2) (f 0) := by simpa [cycleNext] using he 2 + exact pentagon_no_triangle _ _ _ h01 h12 h20 + · exact he 1 2 (pentagon_no_independent_triple (f 0) (f 1) (f 2) + (hf.ne (by decide)) (hf.ne (by decide)) (hf.ne (by decide)) (he 0 1) (he 0 2)) + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TriangleLabels.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TriangleLabels.lean new file mode 100644 index 0000000000000000000000000000000000000000..85e44d4ea49f56d4cd62f48b47a1ac20146fc345 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/TriangleLabels.lean @@ -0,0 +1,48 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiveCycleNoOverlap + +namespace OAI + +/-! Labelling a triangle with any prescribed distinct first two vertices. -/ + +namespace CycleClique.Construction +theorem triangle_label_with_pair {V : Type*} [DecidableEq V] {Q : Finset V} + (hQcard : Q.card = 3) {x y : V} (hx : x ∈ Q) (hy : y ∈ Q) (hxy : x ≠ y) : + ∃ q : Fin 3 → V, Function.Injective q ∧ (∀ i, q i ∈ Q) ∧ + (∀ z ∈ Q, ∃ i, q i = z) ∧ q 0 = x ∧ q 1 = y := by + classical + obtain ⟨z, hzQ, hznot⟩ := Finset.exists_mem_notMem_of_card_lt_card + (show ({x, y} : Finset V).card < Q.card by rw [Finset.card_pair hxy, hQcard]; omega) + have hz : z ≠ x ∧ z ≠ y := by simpa only [Finset.mem_insert, Finset.mem_singleton, not_or] using hznot + let T : Finset V := {x, y, z} + have hTQ : T ⊆ Q := by simp only [T, Finset.insert_subset_iff, Finset.singleton_subset_iff]; exact ⟨hx, hy, hzQ⟩ + have hTcard : T.card = 3 := by simp [T, hxy, hz.1.symm, hz.2.symm] + have hT : T = Q := Finset.eq_of_subset_of_card_le hTQ (by omega) + let q : Fin 3 → V := ![x, y, z] + refine ⟨q, ?_, ?_, ?_, rfl, rfl⟩ + · intro i j hij + fin_cases i <;> fin_cases j <;> simp_all [q] + · intro i + rw [← hT] + fin_cases i <;> simp [q, T] + · intro w hw + rw [← hT] at hw + simp only [T, Finset.mem_insert, Finset.mem_singleton] at hw + rcases hw with rfl | rfl | rfl + · exact ⟨0, rfl⟩ + · exact ⟨1, rfl⟩ + · exact ⟨2, rfl⟩ + +theorem fiveCycle_triangle_exterior_disjoint {V : Type*} [Fintype V] [DecidableEq V] + {G : SimpleGraph V} {Q : Finset V} (hQ : G.IsClique (Q : Set V)) (hQcard : Q.card = 3) + (hcycle : ¬ HasCycle G 5) (hω : G.cliqueNum ≤ 3) (horder : Fintype.card V ≤ 17) + (hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty → + 4 * I.card + 1 ≤ (closedNeighborhood G I).card) + {x y : V} (hx : x ∈ Q) (hy : y ∈ Q) (hxy : x ≠ y) : + Disjoint (exteriorNeighbors G Q x) (exteriorNeighbors G Q y) := by + obtain ⟨q, hq, hqQ, hqcover, hq0, hq1⟩ := triangle_label_with_pair hQcard hx hy hxy + have h := fiveCycle_labelled_triangle_no_overlap hQ hQcard hcycle hω horder hexpand q hq hqQ hqcover + simpa only [hq0, hq1] using h + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/WalkCycle.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/WalkCycle.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a9e483327b5ef7fc1f6132c3e127515109d60af --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/WalkCycle.lean @@ -0,0 +1,46 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Construction.Definitions +import Mathlib.Combinatorics.SimpleGraph.Paths + +namespace OAI + +/-! Convert the standard library's cycle walks into exact cycle witnesses. -/ + +namespace CycleClique.Construction +variable {V : Type*} {G : SimpleGraph V} + +theorem hasCycle_of_isCycle {x : V} {p : G.Walk x x} (hp : p.IsCycle) : + HasCycle G p.length := by + refine ⟨fun i => p.getVert i.val, ?_, ?_⟩ + · intro i j hij + apply Fin.ext + exact hp.getVert_injOn' (by change i.val ≤ p.length - 1; omega) + (by change j.val ≤ p.length - 1; omega) hij + · intro i + have hadj := p.adj_getVert_succ i.isLt + by_cases hlast : i.val + 1 = p.length + · have hn : (cycleNext i).val = 0 := by simp [cycleNext, hlast] + simpa [hlast, hn] using hadj + · have hn : (cycleNext i).val = i.val + 1 := Nat.mod_eq_of_lt (by omega) + simpa [hn] using hadj + +/-- A simple path of at least two edges closes to an exact cycle when its +endpoints are adjacent. This is the single-chain case of path closure. -/ +theorem hasCycle_of_path_close {x y : V} {p : G.Walk x y} + (hp : p.IsPath) (hlen : 2 ≤ p.length) (hclose : G.Adj y x) : + HasCycle G (p.length + 1) := by + have hdis : p.support.tail.Disjoint hclose.toWalk.support.tail := by + rw [hclose.support_toWalk] + apply List.disjoint_left.mpr + intro v hv hvx + have hv' : v = x := by simpa using hvx + subst v + have hnd := hp.support_nodup + rw [← p.cons_tail_support] at hnd + exact (List.nodup_cons.mp hnd).1 hv + have hcycle := hp.isCycle_append hclose.isPath_toWalk hdis (Or.inl (by omega)) + have hc := hasCycle_of_isCycle hcycle + simpa using hc + +end CycleClique.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/CycleShortening.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/CycleShortening.lean new file mode 100644 index 0000000000000000000000000000000000000000..80656f0dc052affbdad05afd1affee24c09acfdd --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/CycleShortening.lean @@ -0,0 +1,202 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.DenseCycles +import OAI.Combinatorics.Ramsey.CycleClique.Independence +import OAI.Combinatorics.Ramsey.CycleClique.IndependenceTwo + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +theorem cycleGraph_adj_succ {n : ℕ} [NeZero n] (hn : 2 ≤ n) {a b : Fin n} : + (SimpleGraph.cycleGraph n).Adj a b ↔ a = b + 1 ∨ b = a + 1 := by + obtain ⟨n, rfl⟩ : ∃ m, n = m + 2 := ⟨n - 2, by omega⟩ + rw [SimpleGraph.cycleGraph_adj, sub_eq_iff_eq_add, sub_eq_iff_eq_add] + simp only [add_comm] + +theorem contains_cycle_of_labels {V : Type*} {G : SimpleGraph V} + {n : ℕ} [NeZero n] (hn : 2 ≤ n) (f : Fin n → V) (hf : Function.Injective f) + (hstep : ∀ i, G.Adj (f i) (f (i + 1))) : SimpleGraph.cycleGraph n ⊑ G := by + refine ⟨⟨⟨f, ?_⟩, hf⟩⟩ + intro a b hab + rcases (cycleGraph_adj_succ hn).mp hab with rfl | rfl + · exact (hstep b).symm + · exact hstep a + +theorem fin_add_one_val {n : ℕ} [NeZero n] (hn : 2 ≤ n) (i : Fin n) : + (i + 1).val = if i.val + 1 = n then 0 else i.val + 1 := by + simp only [Fin.val_add, Fin.val_one', Nat.mod_eq_of_lt (by omega : 1 < n)] + split_ifs with h + · simp [h] + · rw [Nat.mod_eq_of_lt (by omega)] + + +def bypassIndex {n : ℕ} (hn : 3 ≤ n) (i : Fin (n - 1)) : Fin n := + ⟨if i.val = 0 then 0 else i.val + 1, by split_ifs <;> omega⟩ + +theorem bypassIndex_injective {n : ℕ} (hn : 3 ≤ n) : + Function.Injective (bypassIndex hn) := by + intro i j hij + have hh := congrArg Fin.val hij + simp only [bypassIndex] at hh + apply Fin.ext + split_ifs at hh <;> omega + +theorem bypassIndex_step {n : ℕ} [NeZero n] [NeZero (n - 1)] (hn : 3 ≤ n) + (i : Fin (n - 1)) : + (bypassIndex hn i = 0 ∧ bypassIndex hn (i + 1) = 2) ∨ + bypassIndex hn (i + 1) = bypassIndex hn i + 1 := by + have hval := fin_add_one_val (by omega : 2 ≤ n - 1) i + by_cases hi : i.val = 0 + · left + constructor <;> apply Fin.ext + · simp [bypassIndex, hi] + · have hi1 : (i + 1).val = 1 := by rw [hval]; split_ifs <;> omega + simp [bypassIndex, hi1, Nat.mod_eq_of_lt (by omega : 2 < n)] + · right + apply Fin.ext + rw [fin_add_one_val (by omega) (bypassIndex hn i)] + simp only [bypassIndex] + rw [hval] + split_ifs <;> omega + + +def fourStepIndex {n : ℕ} (hn : 7 ≤ n) (i : Fin (n - 1)) : Fin n := + ⟨if i.val < n - 6 then i.val + 1 else + if i.val < n - 4 then i.val + 4 else i.val - 1, + by split_ifs <;> omega⟩ + +theorem fourStepIndex_injective {n : ℕ} (hn : 7 ≤ n) : + Function.Injective (fourStepIndex hn) := by + intro i j hij + have hh := congrArg Fin.val hij + simp only [fourStepIndex] at hh + apply Fin.ext + split_ifs at hh <;> omega + +theorem fourStepIndex_step {n : ℕ} [NeZero n] [NeZero (n - 1)] (hn : 7 ≤ n) + (i : Fin (n - 1)) : + fourStepIndex hn (i + 1) = fourStepIndex hn i + 1 ∨ + fourStepIndex hn (i + 1) = fourStepIndex hn i + 4 ∨ + fourStepIndex hn i = fourStepIndex hn (i + 1) + 4 := by + have hval := fin_add_one_val (by omega : 2 ≤ n - 1) i + have h1 : 1 % n = 1 := Nat.mod_eq_of_lt (by omega) + have h4 : 4 % n = 4 := Nat.mod_eq_of_lt (by omega) + have h1' : (1 : Fin n).val = 1 := by rw [Fin.val_one', h1] + have h4' : (4 : Fin n).val = 4 := h4 + simp only [Fin.ext_iff, Fin.val_add, h1', h4', fourStepIndex, hval] + split_ifs <;> simp_all only [ite_false, ite_true] + all_goals first + | (left; rw [Nat.mod_eq_of_lt (by omega)] <;> omega) + | (right; left; rw [Nat.mod_eq_of_lt (by omega)]) + | (right; right; rw [Nat.mod_eq_of_lt (by omega)]; omega) + | (right; left; rw [Nat.mod_eq_sub_mod (by omega), Nat.mod_eq_of_lt (by omega)]; omega) + + +theorem fin_ne_add_step {n : ℕ} [NeZero n] (i : Fin n) (d : ℕ) + (hd : 0 < d) (hdn : d < n) : i ≠ i + Fin.ofNat n d := by + intro he + have hh : (0 : Fin n) = Fin.ofNat n d := add_left_cancel (show i + 0 = i + Fin.ofNat n d by + simpa only [add_zero] using he) + have hv := congrArg Fin.val hh + simp only [Fin.val_zero, Fin.val_ofNat, Nat.mod_eq_of_lt hdn] at hv + omega + + + +theorem shorten_cycle {V : Type*} [Fintype V] {G : SimpleGraph V} + (hα : G.indepNum ≤ 2) {n : ℕ} (hn : 7 ≤ n) + (hc : SimpleGraph.cycleGraph n ⊑ G) : SimpleGraph.cycleGraph (n - 1) ⊑ G := by + classical + let : NeZero n := ⟨by omega⟩ + let : NeZero (n - 1) := ⟨by omega⟩ + obtain ⟨f⟩ := hc + have h22 : (2 : Fin n) + 2 = 4 := by + apply Fin.ext + change (2 % n + 2 % n) % n = 4 % n + simp only [Nat.mod_eq_of_lt (by omega : 2 < n)] + have hstep : ∀ i : Fin n, G.Adj (f i) (f (i + 1)) := by + intro i + exact f.toHom.map_adj ((cycleGraph_adj_succ (by omega)).mpr (Or.inr rfl)) + by_cases hchord : ∃ i : Fin n, G.Adj (f i) (f (i + 2)) + · obtain ⟨i, hi⟩ := hchord + let g : Fin (n - 1) → V := fun j => f (i + bypassIndex (by omega : 3 ≤ n) j) + apply contains_cycle_of_labels (by omega) g + · intro a b hab + exact bypassIndex_injective (by omega) (add_left_cancel (f.injective hab)) + · intro j + rcases bypassIndex_step (by omega : 3 ≤ n) j with ⟨hj, hj'⟩ | hj + · simpa only [g, hj, hj', add_zero] using hi + · simpa only [g, hj, ← add_assoc] using hstep (i + bypassIndex (by omega) j) + · push Not at hchord + have hfour : ∀ i : Fin n, G.Adj (f i) (f (i + 4)) := by + intro i + have h02 : i ≠ i + 2 := fin_ne_add_step i 2 (by omega) (by omega) + have h04 : i ≠ i + 4 := fin_ne_add_step i 4 (by omega) (by omega) + have h24 : i + 2 ≠ i + 4 := by + have hn24 := fin_ne_add_step (i + 2) 2 (by omega) (by omega) + change i + 2 ≠ i + 2 + 2 at hn24 + simpa only [add_assoc, h22] using hn24 + apply alpha_two_adj hα (z := f (i + 2)) + · exact fun hh => h04 (f.injective hh) + · exact fun hh => h02 (f.injective hh) + · exact fun hh => h24 (f.injective hh).symm + · exact hchord i + · intro hh + apply hchord (i + 2) + simpa only [add_assoc, h22] using hh.symm + apply contains_cycle_of_labels (by omega) (fun j => f (fourStepIndex hn j)) + · exact f.injective.comp (fourStepIndex_injective hn) + · intro j + rcases fourStepIndex_step hn j with hj | hj | hj + · rw [hj]; exact hstep _ + · rw [hj]; exact hfour _ + · rw [hj]; exact (hfour _).symm + + +theorem cycle_of_alpha_two_long_cycle {V : Type*} [Fintype V] {G : SimpleGraph V} + (hα : G.indepNum ≤ 2) {k : ℕ} (hk : 6 ≤ k) : + ∀ n, k ≤ n → SimpleGraph.cycleGraph n ⊑ G → SimpleGraph.cycleGraph k ⊑ G := by + intro n + induction n using Nat.strong_induction_on with + | h n ih => + intro hkn hc + by_cases he : k = n + · rw [he]; exact hc + · exact ih (n - 1) (by omega) (by omega) (shorten_cycle hα (by omega) hc) + + +theorem size_test {V : Type*} [Fintype V] {G : SimpleGraph V} + {k t : ℕ} (hk : 5 ≤ k) (_ht : 1 ≤ t) + (hcycle : ¬ SimpleGraph.cycleGraph (k + 1) ⊑ G) (hclique : G.cliqueNum ≤ t) + (Y : Set V) (hY : max k (2 * t) < Y.ncard) : 3 ≤ independence G Y := by + classical + by_contra hn + have hα : (G.induce Y).indepNum ≤ 2 := by change independence G Y ≤ 2; omega + have hcY : (G.induce Y).cliqueNum ≤ t := by + by_contra hh + have hc := (complete_isContained_iff_le_cliqueNum (G.induce Y) (t + 1)).mpr (by omega) + have hc' := (complete_isContained_iff_le_cliqueNum G (t + 1)).mp + (hc.trans (SimpleGraph.Embedding.induce Y).isContained) + omega + have hcard : max k (2 * t) < Fintype.card Y := by + rwa [← Nat.card_eq_fintype_card, Nat.card_coe_set_eq] + have hconn := connected_of_alpha_two_large hα hcY (by omega) + have hdel := deletion_connected_of_alpha_two_large hα hcY (by omega) + obtain ⟨x, c, hc, hlen⟩ := hamiltonian_of_alpha_two hconn (by omega) hα hdel + have hlong : SimpleGraph.cycleGraph (Fintype.card Y) ⊑ G.induce Y := + (SimpleGraph.cycleGraph_isContained_iff (by omega)).mpr ⟨x, c, hc, hlen⟩ + have hshort := cycle_of_alpha_two_long_cycle hα (by omega : 6 ≤ k + 1) + (Fintype.card Y) (by omega) hlong + exact hcycle (hshort.trans (SimpleGraph.Embedding.induce Y).isContained) + + + +abbrev exteriorEdges {V : Type*} (G : SimpleGraph V) (X : Set V) : SimpleGraph V where + Adj u v := G.Adj u v ∧ (u ∉ X ∨ v ∉ X) + symm := ⟨fun _ _ h => ⟨h.1.symm, h.2.symm⟩⟩ + loopless := ⟨fun _ h => h.1.ne rfl⟩ + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/DenseCycles.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/DenseCycles.lean new file mode 100644 index 0000000000000000000000000000000000000000..009d567f88412023b62442dda4ebf95f3ab68eba --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/DenseCycles.lean @@ -0,0 +1,214 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.BreadthFirst +import OAI.Combinatorics.Ramsey.CycleClique.ColouredPaths +import OAI.Combinatorics.Ramsey.CycleClique.Density +import OAI.Combinatorics.Ramsey.CycleClique.DistanceLayers +import OAI.Combinatorics.Ramsey.CycleClique.Exceptional +import OAI.Combinatorics.Ramsey.CycleClique.Independence +import OAI.Combinatorics.Ramsey.CycleClique.InducedGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LongPaths + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +theorem cycle_from_dense_layer {V : Type*} [Fintype V] {G : SimpleGraph V} + {k : ℕ} (hk : 8 ≤ k) {r : V} {i : ℕ} (hi : i ≤ k / 2) + {S : Set V} (hSD : S ⊆ distanceLayer G r i) (hS : S.Nonempty) + (hdense : MinimalDensity (G.induce S) (k / 2) (k % 2)) + (hfree : ¬ (⊤ : SimpleGraph (Fin (k / 2))) ⊑ G) : + SimpleGraph.cycleGraph (k + 1) ⊑ G := by + classical + let : Nonempty S := hS.to_subtype + let H := G.induce S + let f : H ↪g G := SimpleGraph.Embedding.induce S + have hfreeH : ¬ (⊤ : SimpleGraph (Fin (k / 2))) ⊑ H := + fun hh => hfree (hh.trans f.isContained) + obtain ⟨hconn, hnb, horder, hdegree, hexp⟩ := + minimal_density_properties (by omega : 4 ≤ k / 2) (by omega : k % 2 ≤ 1) hdense hfreeH + have horder' : k ≤ Fintype.card S := by omega + obtain ⟨B⟩ := exists_breadthFirstParent G r + have hneS : ∃ x ∈ S, ∃ y ∈ S, x ≠ y := + (Set.one_lt_ncard).mp (by + rw [← Nat.card_coe_set_eq, Nat.card_eq_fintype_card] + omega) + obtain ⟨d, hd, c, hc, x, hx, z, hz, hxz⟩ := exists_layer_split B hSD hneS + let ℓ := k + 1 - 2 * (i - d) + have hℓpos : 1 ≤ ℓ := by dsimp [ℓ]; omega + have hpair : ∀ a b : S, a ≠ b → ¬ H.Adj a b → + 2 * (k / 2) ≤ (closedNeighborhood H {a, b}).ncard := by + intro a b hab hnadj + have hI : H.IsIndepSet {a, b} := by + intro x hx y hy hxy hxyadj + simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hx hy + rcases hx with rfl | rfl <;> rcases hy with rfl | rfl + · exact hxy rfl + · exact hnadj hxyadj + · exact hnadj hxyadj.symm + · exact hxy rfl + have he := (hexp {a, b} hI (Set.insert_nonempty _ _)).1 + simpa only [Set.ncard_pair hab, Nat.mul_comm] using he + have hchoose : ∃ y z : S, layerAncestor B i y.val (d + 1) ≠ + layerAncestor B i z.val (d + 1) ∧ ∃ p : H.Walk y z, p.IsPath ∧ p.length = ℓ := by + by_cases hdepth : i - d = 1 + · obtain ⟨y, z, p, hp, hlong⟩ := long_path_min_degree + (by omega : 2 ≤ k / 2) hconn hdegree + have hlen : ℓ ≤ p.length := by dsimp [ℓ] at *; omega + have htake := hp.take ℓ + have htlen : (p.take ℓ).length = ℓ := by rw [SimpleGraph.Walk.take_length, inf_eq_left.mpr hlen] + refine ⟨y, p.getVert ℓ, ?_, p.take ℓ, htake, htlen⟩ + have he : d + 1 = i := by omega + simp only [he, layerAncestor_self] + intro heq + have hn := (htake.nil_iff_eq).mpr (Subtype.ext heq) + have hh := hn.length_eq_zero + omega + · let χ : S → Fin 2 := fun v => + if layerAncestor B i v.val (d + 1) = layerAncestor B i x (d + 1) then 0 else 1 + have hχ : ∃ y z, χ y ≠ χ z := by + refine ⟨⟨x, hx⟩, ⟨z, hz⟩, ?_⟩ + simp [χ, Ne.symm hxz] + have hℓmax : ℓ ≤ 2 * (k / 2) - 2 := by dsimp [ℓ]; omega + obtain ⟨y, z, hyz, p, hp, hlen⟩ := coloured_path H (k / 2) (by omega) + hconn hnb hfreeH hdegree hpair χ hχ ℓ hℓpos hℓmax + refine ⟨y, z, ?_, p, hp, hlen⟩ + intro heq + apply hyz + simp only [χ, heq] + obtain ⟨y, z, hbranch, p, hp, hlen⟩ := hchoose + have hcommon : layerAncestor B i y.val d = layerAncestor B i z.val d := + (hc y.val y.property).trans (hc z.val z.property).symm + obtain ⟨q, hq, hqlen, hqint⟩ := exists_branch_path B (hSD y.property) (hSD z.property) + hd hcommon hbranch + let inc : H →g G := ⟨Subtype.val, fun ha => ha⟩ + let P : G.Walk y.val z.val := p.map inc + have hP : P.IsPath := hp.map Subtype.val_injective + have hplay : ∀ w ∈ P.support, G.dist r w = i := by + intro w hw + rw [SimpleGraph.Walk.support_map] at hw + obtain ⟨v, _, rfl⟩ := List.mem_map.mp hw + exact (hSD v.property).2 + have hcyc := cycle_of_layer_path P hP hplay q hq (by rw [hqlen]; omega) hqint + apply (SimpleGraph.cycleGraph_isContained_iff (by omega : 2 < k + 1)).mpr + refine ⟨y.val, P.append q.reverse, hcyc, ?_⟩ + dsimp only [P] + rw [SimpleGraph.Walk.length_append, SimpleGraph.Walk.length_reverse, + SimpleGraph.Walk.length_map, hlen, hqlen] + dsimp [ℓ] + omega + + +theorem contains_half_clique {V : Type*} [Fintype V] [Nonempty V] + {G : SimpleGraph V} {k : ℕ} (hk : 8 ≤ k) (hα : G.indepNum ≤ k) + (hexp : ∀ I, G.IsIndepSet I → I.Nonempty → + k * I.ncard + 1 ≤ (closedNeighborhood G I).ncard) + (hcycle : ¬ SimpleGraph.cycleGraph (k + 1) ⊑ G) : + (⊤ : SimpleGraph (Fin (k / 2))) ⊑ G := by + by_contra hfree + obtain ⟨r⟩ := ‹Nonempty V› + obtain ⟨i, _, hi, S, hSD, hS, hdense⟩ := exists_minimal_dense_layer hk hα hexp r + exact hcycle (cycle_from_dense_layer hk hi hSD hS hdense hfree) + + + +theorem triangle_free_card_bound {V : Type*} [Fintype V] (G : SimpleGraph V) + (a : ℕ) (hfree : ¬ (⊤ : SimpleGraph (Fin 3)) ⊑ G) (hα : G.indepNum ≤ a) : + 2 * Fintype.card V ≤ a * (a + 3) := by + classical + induction a generalizing V with + | zero => + have hempty : IsEmpty V := ⟨fun v => by + have hI : G.IsIndepSet {v} := Set.pairwise_singleton _ _ + have hc := (indep_ncard_le hI).trans hα + simp at hc⟩ + let := hempty + simp + | succ a ih => + cases isEmpty_or_nonempty V with + | inl he => let := he; simp + | inr he => + let := he + obtain ⟨v⟩ := he + have hNind : G.IsIndepSet (G.neighborSet v) := + (SimpleGraph.isClique_compl G).mp (neighborhood_compl_clique_of_triangle_free hfree v) + have hNcard := (indep_ncard_le hNind).trans hα + let N := closedNeighborhood G {v} + let R := Nᶜ + have hNc : N.ncard ≤ a + 2 := by + dsimp [N] + rw [closedNeighborhood_singleton_card] + rw [ncard_neighborSet] at hNcard + omega + have hαR : (G.induce R).indepNum ≤ a := by + have hh := independence_outside_closed + (show G.IsIndepSet {v} from Set.pairwise_singleton _ _) (Set.subset_univ {v}) + rw [independence_univ, Set.ncard_singleton, ← Set.compl_eq_univ_sdiff] at hh + change independence G R + 1 ≤ G.indepNum at hh + change independence G R ≤ a + omega + have hfreeR : ¬ (⊤ : SimpleGraph (Fin 3)) ⊑ G.induce R := + fun h => hfree (h.trans (SimpleGraph.Embedding.induce R).isContained) + have hcR := ih (G.induce R) hfreeR hαR + rw [← Nat.card_eq_fintype_card, Nat.card_coe_set_eq] at hcR + have hsum := Set.ncard_add_ncard_compl N + rw [Nat.card_eq_fintype_card] at hsum + change 2 * R.ncard ≤ a * (a + 3) at hcR + nlinarith + + +theorem counterexample_contains_triangle {V : Type*} [Fintype V] {G : SimpleGraph V} + {k a : ℕ} (hk : 3 ≤ k) (_ha : 2 ≤ a) (hak : a ≤ k) + (horder : Fintype.card V = k * a + 1) (hα : G.indepNum ≤ a) : + (⊤ : SimpleGraph (Fin 3)) ⊑ G := by + by_contra hfree + have hh := triangle_free_card_bound G a hfree hα + rw [horder] at hh + have hcomp : a + 3 ≤ 2 * k := by omega + have hm := Nat.mul_le_mul_left a hcomp + nlinarith + + +theorem complete_isContained_iff_le_cliqueNum {V : Type*} [Fintype V] + (G : SimpleGraph V) (t : ℕ) : + (⊤ : SimpleGraph (Fin t)) ⊑ G ↔ t ≤ G.cliqueNum := by + classical + constructor + · intro ht + have hn := ht.not_cliqueFree + simp only [SimpleGraph.CliqueFree, not_forall, not_not] at hn + obtain ⟨Q, hQ⟩ := hn + have hh := hQ.isClique.card_le_cliqueNum + rwa [hQ.card_eq] at hh + · intro ht + by_contra hn + obtain ⟨Q, hQ⟩ := G.exists_isNClique_cliqueNum + have hh := clique_ncard_lt hn hQ.isClique + rw [Set.ncard_coe_finset, hQ.card_eq] at hh + omega + + +theorem counterexample_clique_bound {V : Type*} [Fintype V] {G : SimpleGraph V} + {k a : ℕ} (hk : 3 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) + (horder : Fintype.card V = k * a + 1) (hα : G.indepNum ≤ a) + (hcycle : ¬ SimpleGraph.cycleGraph (k + 1) ⊑ G) + (hexp : ∀ I, G.IsIndepSet I → I.Nonempty → + k * I.ncard + 1 ≤ (closedNeighborhood G I).ncard) : + max 3 (k / 2) ≤ G.cliqueNum ∧ G.cliqueNum ≤ k := by + have hthree := (complete_isContained_iff_le_cliqueNum G 3).mp + (counterexample_contains_triangle hk ha hak horder hα) + refine ⟨max_le hthree ?_, ?_⟩ + · by_cases hlarge : 8 ≤ k + · let : Nonempty V := Fintype.card_pos_iff.mp (by omega) + exact (complete_isContained_iff_le_cliqueNum G _).mp + (contains_half_clique hlarge (hα.trans hak) hexp hcycle) + · omega + · by_contra hn + have htop := (complete_isContained_iff_le_cliqueNum G (k + 1)).mpr (by omega) + exact hcycle ((SimpleGraph.IsContained.of_le (show SimpleGraph.cycleGraph (k + 1) ≤ ⊤ + from le_top)).trans htop) + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Density.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Density.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8d8c6f19305447716384a8cda5f6c886534214c --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Density.lean @@ -0,0 +1,162 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.ColouredPaths +import OAI.Combinatorics.Ramsey.CycleClique.Exceptional +import OAI.Combinatorics.Ramsey.CycleClique.Independence +import OAI.Combinatorics.Ramsey.CycleClique.InducedGraphs + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +def MinimalDensity {V : Type*} (G : SimpleGraph V) (s ε : ℕ) : Prop := + (s * G.indepNum + ε ≤ Nat.card V) ∧ + ∀ T : Set V, T.Nonempty → T.ncard < Nat.card V → + T.ncard < s * independence G T + ε + + +theorem minimal_density_connected {V : Type*} [Fintype V] [Nonempty V] + {G : SimpleGraph V} {s ε : ℕ} (hε : ε ≤ 1) (hdense : MinimalDensity G s ε) : + G.Connected := by + classical + simp only [MinimalDensity, Nat.card_eq_fintype_card] at hdense + obtain ⟨r⟩ := ‹Nonempty V› + rw [SimpleGraph.connected_iff_exists_forall_reachable] + refine ⟨r, fun w => ?_⟩ + by_contra hw + let A : Set V := {v | G.Reachable r v} + have hrA : r ∈ A := SimpleGraph.Reachable.refl r + have hwA : w ∈ Aᶜ := hw + have hsum := Set.ncard_add_ncard_compl A + rw [Nat.card_eq_fintype_card] at hsum + have hApos : 0 < A.ncard := (Set.ncard_pos).mpr ⟨r, hrA⟩ + have hBpos : 0 < Aᶜ.ncard := (Set.ncard_pos).mpr ⟨w, hwA⟩ + have hA := hdense.2 A ⟨r, hrA⟩ (by omega) + have hB := hdense.2 Aᶜ ⟨w, hwA⟩ (by omega) + have hα := independence_add_le (G := G) (Set.subset_univ A) (Set.subset_univ Aᶜ) + disjoint_compl_right (by + intro a ha b hb hab + exact hb (ha.trans hab.reachable)) + rw [independence_univ] at hα + have hmul := Nat.mul_le_mul_left s hα + have hd := hdense.1 + nlinarith + + + +theorem minimal_density_expansion {V : Type*} [Fintype V] {G : SimpleGraph V} + {s ε : ℕ} (hdense : MinimalDensity G s ε) + {I : Set V} (hI : G.IsIndepSet I) (hne : I.Nonempty) : + s * I.ncard ≤ (closedNeighborhood G I).ncard ∧ + ((0 < ε ∨ (closedNeighborhood G I)ᶜ.Nonempty) → + s * I.ncard < (closedNeighborhood G I).ncard) := by + classical + simp only [MinimalDensity, Nat.card_eq_fintype_card] at hdense + let N := closedNeighborhood G I + have hNpos : 0 < N.ncard := (Set.ncard_pos).mpr (hne.mono (fun _ h => Or.inl h)) + have hsum := Set.ncard_add_ncard_compl N + rw [Nat.card_eq_fintype_card] at hsum + have hα := independence_outside_closed hI (Set.subset_univ I) + rw [independence_univ, ← Set.compl_eq_univ_sdiff] at hα + have hm := Nat.mul_le_mul_left s hα + have hd := hdense.1 + by_cases hR : Nᶜ.Nonempty + · have hr := hdense.2 Nᶜ hR (by omega) + have hstrict : s * I.ncard < N.ncard := by nlinarith + exact ⟨hstrict.le, fun _ => hstrict⟩ + · have hRcard : Nᶜ.ncard = 0 := (Set.ncard_eq_zero).mpr (Set.not_nonempty_iff_eq_empty.mp hR) + refine ⟨?_, ?_⟩ + · nlinarith + · rintro (he | hn) + · nlinarith + · exact False.elim (hR hn) + + +theorem exists_minimal_density {V : Type*} [Fintype V] (G : SimpleGraph V) + (s ε : ℕ) {D : Set V} (hne : D.Nonempty) + (hd : s * independence G D + ε ≤ D.ncard) : + ∃ S ⊆ D, S.Nonempty ∧ MinimalDensity (G.induce S) s ε := by + classical + let A : Set ℕ := {n | ∃ S ⊆ D, S.Nonempty ∧ + s * independence G S + ε ≤ S.ncard ∧ S.ncard = n} + have hA : A.Nonempty := ⟨D.ncard, D, Set.Subset.rfl, hne, hd, rfl⟩ + obtain ⟨S, hSD, hS, hdS, hcS⟩ := Nat.sInf_mem hA + refine ⟨S, hSD, hS, ?_, ?_⟩ + · simpa [independence, ← Nat.card_eq_fintype_card, Nat.card_coe_set_eq] using hdS + · intro T hT hlt + by_contra hn + have him : Subtype.val '' T ⊆ D := by + rintro x ⟨y, hy, rfl⟩ + exact hSD y.property + have hcard : (Subtype.val '' T).ncard = T.ncard := + Set.ncard_image_of_injective _ Subtype.val_injective + have hm : (Subtype.val '' T).ncard ∈ A := by + refine ⟨Subtype.val '' T, him, hT.image _, ?_, rfl⟩ + rw [← independence_induce_image, hcard] + omega + have hmin := Nat.sInf_le hm + rw [hcard, ← hcS] at hmin + have hSc : S.ncard = Nat.card S := (Nat.card_coe_set_eq S).symm + omega + + +theorem minimal_density_indep_ge_two {V : Type*} [Fintype V] [Nonempty V] + {G : SimpleGraph V} {s ε : ℕ} (hd : MinimalDensity G s ε) + (hfree : ¬ (⊤ : SimpleGraph (Fin s)) ⊑ G) : 2 ≤ G.indepNum := by + classical + have hpos : 0 < G.indepNum := by + simpa [independence_univ] using + (independence_pos (G := G) (S := Set.univ) Set.univ_nonempty) + by_contra hn + have ha : G.indepNum = 1 := by omega + have hcl : G.IsClique Set.univ := clique_of_independence_le_one (by + rw [independence_univ, ha]) + have hlt := clique_ncard_lt hfree hcl + rw [Set.ncard_univ, Nat.card_eq_fintype_card] at hlt + have hc := hd.1 + rw [ha, Nat.mul_one, Nat.card_eq_fintype_card] at hc + omega + + + +theorem minimal_density_properties {V : Type*} [Fintype V] [Nonempty V] + {G : SimpleGraph V} {s ε : ℕ} [DecidableRel G.Adj] (hs : 4 ≤ s) (hε : ε ≤ 1) + (hd : MinimalDensity G s ε) (hfree : ¬ (⊤ : SimpleGraph (Fin s)) ⊑ G) : + G.Connected ∧ ¬ G.IsBipartite ∧ 2 * s + ε ≤ Fintype.card V ∧ + (∀ v, s ≤ G.degree v) ∧ + (∀ I, G.IsIndepSet I → I.Nonempty → + s * I.ncard ≤ (closedNeighborhood G I).ncard ∧ + ((0 < ε ∨ (closedNeighborhood G I)ᶜ.Nonempty) → + s * I.ncard < (closedNeighborhood G I).ncard)) := by + classical + have hcV : Nat.card V = Fintype.card V := Nat.card_eq_fintype_card + have hα := minimal_density_indep_ge_two hd hfree + have horder : 2 * s + ε ≤ Fintype.card V := by + have := hd.1 + nlinarith + refine ⟨minimal_density_connected hε hd, ?_, horder, ?_, + fun I hI hne => minimal_density_expansion hd hI hne⟩ + · intro hbip + have hupper := bipartite_card_le_twice_indep hbip + have hlower := hd.1 + nlinarith + · intro v + have hexp := minimal_density_expansion hd + (show G.IsIndepSet {v} from Set.pairwise_singleton _ _) (Set.singleton_nonempty v) + simp only [Set.ncard_singleton, Nat.mul_one, closedNeighborhood_singleton_card] at hexp + by_cases hR : (closedNeighborhood G {v})ᶜ.Nonempty + · have := hexp.2 (Or.inr hR) + omega + · have hN : closedNeighborhood G {v} = Set.univ := by + apply Set.eq_univ_of_forall + intro w + by_contra hw + exact hR ⟨w, hw⟩ + have hc := closedNeighborhood_singleton_card G v + rw [hN, Set.ncard_univ, Nat.card_eq_fintype_card] at hc + omega + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/DistanceLayers.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/DistanceLayers.lean new file mode 100644 index 0000000000000000000000000000000000000000..59bececbc1786c534563844777fa0bb818d422f6 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/DistanceLayers.lean @@ -0,0 +1,332 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.ColouredPaths +import OAI.Combinatorics.Ramsey.CycleClique.Density +import OAI.Combinatorics.Ramsey.CycleClique.Independence +import OAI.Combinatorics.Ramsey.CycleClique.InducedGraphs + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +theorem ncard_union_layers {V : Type*} [Fintype V] {ι : Type*} + (D : ι → Set V) (hdis : Pairwise (fun i j => Disjoint (D i) (D j))) + (F : Finset ι) : (⋃ i ∈ F, D i).ncard = ∑ i ∈ F, (D i).ncard := by + classical + induction F using Finset.induction_on with + | empty => simp + | @insert i F hi ih => + have hu : (⋃ j ∈ insert i F, D j) = D i ∪ ⋃ j ∈ F, D j := by + simp only [Finset.mem_insert, Set.iUnion_iUnion_eq_or_left] + rw [hu, Set.ncard_union_eq, Finset.sum_insert hi, ih] + apply Set.disjoint_left.mpr + intro v hvi hvF + obtain ⟨j, hj, hvj⟩ := Set.mem_iUnion₂.mp hvF + exact Set.disjoint_left.mp (hdis (by intro he; subst j; exact hi hj)) hvi hvj + + +theorem sum_independence_layers {V : Type*} [Fintype V] {ι : Type*} + (G : SimpleGraph V) (D : ι → Set V) + (hdis : Pairwise (fun i j => Disjoint (D i) (D j))) + (F : Finset ι) + (hsep : ∀ i ∈ F, ∀ j ∈ F, i ≠ j → + ∀ x ∈ D i, ∀ y ∈ D j, ¬ G.Adj x y) : + ∑ i ∈ F, independence G (D i) ≤ independence G (⋃ i ∈ F, D i) := by + classical + revert hsep + induction F using Finset.induction_on with + | empty => simp + | @insert i F hi ih => + intro hsep + have hu : (⋃ j ∈ insert i F, D j) = D i ∪ ⋃ j ∈ F, D j := by + simp only [Finset.mem_insert, Set.iUnion_iUnion_eq_or_left] + rw [hu, Finset.sum_insert hi] + have hD : Disjoint (D i) (⋃ j ∈ F, D j) := by + apply Set.disjoint_left.mpr + intro v hvi hvF + obtain ⟨j, hj, hvj⟩ := Set.mem_iUnion₂.mp hvF + exact Set.disjoint_left.mp (hdis (by intro he; subst j; exact hi hj)) hvi hvj + calc + _ ≤ independence G (D i) + independence G (⋃ j ∈ F, D j) := by + exact Nat.add_le_add_left (ih (fun j hj l hl hne => + hsep j (Finset.mem_insert_of_mem hj) l (Finset.mem_insert_of_mem hl) hne)) _ + _ ≤ _ := independence_add_le Set.subset_union_left Set.subset_union_right hD (by + intro x hx y hy + obtain ⟨j, hj, hyj⟩ := Set.mem_iUnion₂.mp hy + exact hsep i (Finset.mem_insert_self _ _) j (Finset.mem_insert_of_mem hj) + (by intro he; subst j; exact hi hj) x hx y hyj) + + +def distanceLayer {V : Type*} (G : SimpleGraph V) (r : V) (i : ℕ) : Set V := + {v | G.Reachable r v ∧ G.dist r v = i} + +@[simp] theorem distanceLayer_zero {V : Type*} (G : SimpleGraph V) (r : V) : + distanceLayer G r 0 = {r} := by + ext v + constructor + · rintro ⟨hr, hd⟩ + exact (hr.dist_eq_zero_iff.mp hd).symm + · rintro rfl + exact ⟨.refl _, G.dist_self⟩ + +theorem distanceLayer_disjoint {V : Type*} (G : SimpleGraph V) (r : V) : + Pairwise (fun i j => Disjoint (distanceLayer G r i) (distanceLayer G r j)) := by + intro i j hij + apply Set.disjoint_left.mpr + intro v hv₁ hv₂ + exact hij (hv₁.2.symm.trans hv₂.2) + +theorem distanceLayer_no_edge {V : Type*} {G : SimpleGraph V} {r : V} + {i j : ℕ} (hne : i ≠ j) (hpar : i % 2 = j % 2) + {x y : V} (hx : x ∈ distanceLayer G r i) (hy : y ∈ distanceLayer G r j) : + ¬ G.Adj x y := by + intro hxy + have hd := hxy.diff_dist_adj (u := r) + rw [hx.2, hy.2] at hd + omega + + +def parityIndices (i : ℕ) : Finset ℕ := + (Finset.range (i + 1)).filter (fun j => j % 2 = i % 2) + + +def paritySum (α : ℕ → ℕ) (i : ℕ) : ℕ := ∑ j ∈ parityIndices i, α j + +@[simp] theorem paritySum_zero (α : ℕ → ℕ) : paritySum α 0 = α 0 := by + simp [paritySum, parityIndices, Finset.sum_filter] + +theorem paritySum_add_prev (α : ℕ → ℕ) {i : ℕ} (hi : 1 ≤ i) : + paritySum α i + paritySum α (i - 1) = ∑ j ∈ Finset.range (i + 1), α j := by + unfold paritySum parityIndices + rw [Finset.sum_filter, Finset.sum_filter] + have hip : i - 1 + 1 = i := by omega + rw [hip] + have hpar : i % 2 ≠ (i - 1) % 2 := by omega + have hex : (∑ j ∈ Finset.range i, if j % 2 = (i - 1) % 2 then α j else 0) = + ∑ j ∈ Finset.range (i + 1), if j % 2 = (i - 1) % 2 then α j else 0 := by + rw [Finset.sum_range_succ, ite_eq_right hpar, Nat.add_zero] + rw [hex, ← Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro j hj + by_cases he : j % 2 = i % 2 + · have hne : j % 2 ≠ (i - 1) % 2 := by omega + simp only [ite_eq_left he, ite_eq_right hne, Nat.add_zero] + · have he' : j % 2 = (i - 1) % 2 := by omega + simp only [ite_eq_right he, ite_eq_left he', Nat.zero_add] + + +theorem parity_independence_bound {V : Type*} [Fintype V] (G : SimpleGraph V) + (r : V) (i : ℕ) : + paritySum (fun j => independence G (distanceLayer G r j)) i ≤ G.indepNum := by + apply le_trans (sum_independence_layers G (distanceLayer G r) + (distanceLayer_disjoint G r) (parityIndices i) ?_) + · simpa [independence_univ] using + (independence_mono (G := G) (Set.subset_univ (⋃ j ∈ parityIndices i, distanceLayer G r j))) + · intro j hj l hl hne x hx y hy + simp only [parityIndices, Finset.mem_filter, Finset.mem_range] at hj hl + exact distanceLayer_no_edge hne (hj.2.trans hl.2.symm) hx hy + +@[simp] theorem independence_singleton {V : Type*} [Fintype V] (G : SimpleGraph V) + (v : V) : independence G {v} = 1 := by + have hp := independence_pos (G := G) (Set.singleton_nonempty v) + have hc := independence_le_card G {v} + simp only [Set.ncard_singleton] at hc + omega + + +theorem distanceLayer_one_nonempty {V : Type*} [Fintype V] {G : SimpleGraph V} + {k : ℕ} (hk : 1 ≤ k) + (hexp : ∀ I, G.IsIndepSet I → I.Nonempty → + k * I.ncard + 1 ≤ (closedNeighborhood G I).ncard) (r : V) : + (distanceLayer G r 1).Nonempty := by + classical + have h := hexp {r} (Set.pairwise_singleton _ _) (Set.singleton_nonempty r) + simp only [Set.ncard_singleton, Nat.mul_one, closedNeighborhood_singleton_card] at h + have hpos : 0 < (G.neighborSet r).ncard := by + rw [ncard_neighborSet] + omega + obtain ⟨v, hv⟩ := (Set.ncard_pos).mp hpos + have hr : G.Adj r v := hv + exact ⟨v, hr.reachable, G.dist_eq_one_iff_adj.mpr hr⟩ + + +theorem parity_layer_union_nonempty {V : Type*} {G : SimpleGraph V} {r : V} + (hD : (distanceLayer G r 1).Nonempty) (i : ℕ) : + (⋃ j ∈ parityIndices i, distanceLayer G r j).Nonempty := by + by_cases hi : i % 2 = 0 + · refine ⟨r, Set.mem_iUnion₂.mpr ⟨0, ?_, ?_⟩⟩ + · simp [parityIndices, hi] + · simp + · obtain ⟨v, hv⟩ := hD + refine ⟨v, Set.mem_iUnion₂.mpr ⟨1, ?_, hv⟩⟩ + simp only [parityIndices, Finset.mem_filter, Finset.mem_range] + omega + + +theorem closedNeighborhood_parity_layers {V : Type*} {G : SimpleGraph V} + {r : V} {i : ℕ} {I : Set V} + (hI : I ⊆ ⋃ j ∈ parityIndices i, distanceLayer G r j) : + closedNeighborhood G I ⊆ ⋃ j ∈ Finset.range (i + 2), distanceLayer G r j := by + intro v hv + rcases hv with hv | ⟨w, hw, hwv⟩ + · obtain ⟨j, hj, hvj⟩ := Set.mem_iUnion₂.mp (hI hv) + have hji : j < i + 1 := (Finset.mem_filter.mp hj).1 |> Finset.mem_range.mp + exact Set.mem_iUnion₂.mpr ⟨j, Finset.mem_range.mpr (by omega), hvj⟩ + · obtain ⟨j, hj, hwj⟩ := Set.mem_iUnion₂.mp (hI hw) + have hji : j < i + 1 := (Finset.mem_filter.mp hj).1 |> Finset.mem_range.mp + have hd := hwv.diff_dist_adj (u := r) + rw [hwj.2] at hd + exact Set.mem_iUnion₂.mpr ⟨G.dist r v, Finset.mem_range.mpr (by omega), + hwj.1.trans hwv.reachable, rfl⟩ + + +theorem distance_layer_sum {V : Type*} [Fintype V] {G : SimpleGraph V} + {k : ℕ} (hk : 1 ≤ k) + (hexp : ∀ I, G.IsIndepSet I → I.Nonempty → + k * I.ncard + 1 ≤ (closedNeighborhood G I).ncard) + (r : V) {i : ℕ} (hi : 1 ≤ i) : + k * paritySum (fun j => independence G (distanceLayer G r j)) (i - 1) ≤ + ∑ j ∈ Finset.range i, (distanceLayer G r (j + 1)).ncard := by + classical + let U := ⋃ j ∈ parityIndices (i - 1), distanceLayer G r j + have hUne := parity_layer_union_nonempty (distanceLayer_one_nonempty hk hexp r) (i - 1) + obtain ⟨I, hIU, hI, hcI⟩ := exists_indep_of_independence G U + have hneI : I.Nonempty := (Set.ncard_pos).mp (by + rw [hcI] + exact independence_pos hUne) + have hp : paritySum (fun j => independence G (distanceLayer G r j)) (i - 1) ≤ + independence G U := by + apply sum_independence_layers G (distanceLayer G r) (distanceLayer_disjoint G r) + intro j hj l hl hne x hx y hy + simp only [parityIndices, Finset.mem_filter, Finset.mem_range] at hj hl + exact distanceLayer_no_edge hne (hj.2.trans hl.2.symm) hx hy + have hN := closedNeighborhood_parity_layers hIU + have hcard := Set.ncard_le_ncard hN + rw [ncard_union_layers _ (distanceLayer_disjoint G r)] at hcard + have hii : i - 1 + 2 = i + 1 := by omega + rw [hii, Finset.sum_range_succ', distanceLayer_zero, Set.ncard_singleton] at hcard + have he := hexp I hI hneI + have hm := Nat.mul_le_mul_left k hp + rw [← hcI] at hm + omega + + + +theorem exists_dense_layer_numeric (α n : ℕ → ℕ) {s ε : ℕ} + (hs : 4 ≤ s) (hε : ε ≤ 1) (hα₀ : α 0 = 1) (hn₁ : 0 < n 1) + (hpbound : ∀ i, paritySum α i ≤ 2 * s + ε) + (hlayer : ∀ i, 1 ≤ i → i ≤ s → + (2 * s + ε) * paritySum α (i - 1) ≤ ∑ j ∈ Finset.range i, n (j + 1)) : + ∃ i, 1 ≤ i ∧ i ≤ s ∧ 0 < n i ∧ s * α i + ε ≤ n i := by + classical + by_contra hn + push Not at hn + have hweak : ∀ i, 1 ≤ i → i ≤ s → n i ≤ s * α i := by + intro i hi his + by_cases hni : 0 < n i + · have := hn i hi his hni + omega + · omega + have hsum : ∀ i, 1 ≤ i → i ≤ s → + (∑ j ∈ Finset.range i, n (j + 1)) ≤ s * ∑ j ∈ Finset.range i, α (j + 1) := by + intro i hi his + rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro j hj + have hj' := Finset.mem_range.mp hj + exact hweak (j + 1) (by omega) (by omega) + have hstrict : ε = 0 → ∀ i, 1 ≤ i → i ≤ s → + (∑ j ∈ Finset.range i, n (j + 1)) < s * ∑ j ∈ Finset.range i, α (j + 1) := by + intro he i hi his + rw [Finset.mul_sum] + apply Finset.sum_lt_sum + · intro j hj + have hj' := Finset.mem_range.mp hj + exact hweak (j + 1) (by omega) (by omega) + · refine ⟨0, Finset.mem_range.mpr (by omega), ?_⟩ + have := hn 1 (by omega) (by omega) hn₁ + simpa [he] using this + have hid : ∀ i, 1 ≤ i → + (∑ j ∈ Finset.range i, α (j + 1)) + 1 = paritySum α i + paritySum α (i - 1) := by + intro i hi + have h := paritySum_add_prev α hi + rw [Finset.sum_range_succ', hα₀] at h + exact h.symm + have hstep : ∀ i, 1 ≤ i → i ≤ s → 0 < paritySum α (i - 1) → + paritySum α (i - 1) + 2 ≤ paritySum α i := by + intro i hi his hp + have hl := hlayer i hi his + have hw := hsum i hi his + have heq := hid i hi + by_contra hbad + have hcomp := Nat.mul_le_mul_left s + (show paritySum α i ≤ paritySum α (i - 1) + 1 by omega) + by_cases he : ε = 0 + · have hst := hstrict he i hi his + rw [he, Nat.add_zero] at hl + nlinarith + · have he₁ : ε = 1 := by omega + rw [he₁] at hl + nlinarith + have hgrowth : ∀ i, i ≤ s → 2 * i + 1 ≤ paritySum α i := by + intro i + induction i with + | zero => simp [hα₀] + | succ i ih => + intro his + have hi := ih (by omega) + have hst := hstep (i + 1) (by omega) his (by simpa using (show 0 < paritySum α i by omega)) + simp only [Nat.add_sub_cancel] at hst + omega + have hupper := hpbound s + by_cases he : ε = 0 + · have := hgrowth s (by omega) + omega + · have he₁ : ε = 1 := by omega + have hprev := hgrowth (s - 1) (by omega) + have hppos : s < paritySum α (s - 1) := by omega + have hlast : paritySum α (s - 1) + 3 ≤ paritySum α s := by + have hl := hlayer s (by omega) (by omega) + rw [he₁] at hl + have hw := hsum s (by omega) (by omega) + have heq := hid s (by omega) + by_contra hbad + have hcomp := Nat.mul_le_mul_left s + (show paritySum α s ≤ paritySum α (s - 1) + 2 by omega) + nlinarith + omega + + +theorem exists_dense_distance_layer {V : Type*} [Fintype V] {G : SimpleGraph V} + {k : ℕ} (hk : 8 ≤ k) (hα : G.indepNum ≤ k) + (hexp : ∀ I, G.IsIndepSet I → I.Nonempty → + k * I.ncard + 1 ≤ (closedNeighborhood G I).ncard) (r : V) : + ∃ i, 1 ≤ i ∧ i ≤ k / 2 ∧ (distanceLayer G r i).Nonempty ∧ + (k / 2) * independence G (distanceLayer G r i) + k % 2 ≤ + (distanceLayer G r i).ncard := by + classical + have hmod : 2 * (k / 2) + k % 2 = k := by omega + obtain ⟨i, hi, his, hpos, hd⟩ := exists_dense_layer_numeric + (fun j => independence G (distanceLayer G r j)) + (fun j => (distanceLayer G r j).ncard) + (s := k / 2) (ε := k % 2) (by omega) (by omega) (by simp) + ((Set.ncard_pos).mpr (distanceLayer_one_nonempty (by omega) hexp r)) + (by intro i; rw [hmod]; exact (parity_independence_bound G r i).trans hα) + (by intro i hi his; rw [hmod]; exact distance_layer_sum (by omega) hexp r hi) + exact ⟨i, hi, his, (Set.ncard_pos).mp hpos, hd⟩ + + +theorem exists_minimal_dense_layer {V : Type*} [Fintype V] {G : SimpleGraph V} + {k : ℕ} (hk : 8 ≤ k) (hα : G.indepNum ≤ k) + (hexp : ∀ I, G.IsIndepSet I → I.Nonempty → + k * I.ncard + 1 ≤ (closedNeighborhood G I).ncard) (r : V) : + ∃ i, 1 ≤ i ∧ i ≤ k / 2 ∧ ∃ S ⊆ distanceLayer G r i, + S.Nonempty ∧ MinimalDensity (G.induce S) (k / 2) (k % 2) := by + obtain ⟨i, hi, his, hD, hd⟩ := exists_dense_distance_layer hk hα hexp r + obtain ⟨S, hSD, hS, hmin⟩ := exists_minimal_density G (k / 2) (k % 2) hD hd + exact ⟨i, hi, his, S, hSD, hS, hmin⟩ + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/EdgeBits.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/EdgeBits.lean new file mode 100644 index 0000000000000000000000000000000000000000..83aeb26724a65f199fc7e4b760e5a31ca767c0b4 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/EdgeBits.lean @@ -0,0 +1,45 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +def compactCertificateBool (k t n : ℕ) (q : Finset ℕ) (E : List (ℕ × ℕ)) (L e : ℕ) + (M : ForbiddenMatrix) : FiniteCertificate → Bool + | .system C => compactLabelValidBool n q E C && decide (Improvement k t L e C) + | .cycle C => decide (LabelCycleValid n k E C) + | .packing P => decide (PackingValid k t n M P) + | .edge i j => decide (i < n) && decide (j < n) && + decide (labelAdj E i j) && decide (matrixEntry M i j 0) + | .forbid i j d R N => decide (i < n) && decide (j < n) && + compactCertificateBool k t (n+d) q (augmentedEdges n E i j d) L e M R && + compactCertificateBool k t n q E L e ((i,j,d)::M) N + +theorem compactCertificateBool_spec (k t n : ℕ) (q : Finset ℕ) (E : List (ℕ × ℕ)) + (L e : ℕ) (M : ForbiddenMatrix) (C : FiniteCertificate) : + compactCertificateBool k t n q E L e M C = true ↔ C.Valid k t n q E L e M := by + induction C generalizing n E M with + | system C => simp [compactCertificateBool, FiniteCertificate.Valid, compactLabelValidBool_spec] + | cycle C => simp [compactCertificateBool, FiniteCertificate.Valid] + | packing P => simp [compactCertificateBool, FiniteCertificate.Valid] + | edge i j => simp [compactCertificateBool, FiniteCertificate.Valid, and_assoc] + | forbid i j d R N ihR ihN => + simp [compactCertificateBool, FiniteCertificate.Valid, ihR, ihN, and_assoc] + +instance (priority := high) fullyCompactCertificateValid (k t n : ℕ) (q : Finset ℕ) + (E : List (ℕ × ℕ)) (L e : ℕ) (M : ForbiddenMatrix) (C : FiniteCertificate) : + Decidable (C.Valid k t n q E L e M) := + decidable_of_iff _ (compactCertificateBool_spec k t n q E L e M C) + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/EdgeDecisions.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/EdgeDecisions.lean new file mode 100644 index 0000000000000000000000000000000000000000..138bfd58912db937d66b97d18dc91c98f784cef8 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/EdgeDecisions.lean @@ -0,0 +1,93 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +theorem globalEdgeBits_append (E F : List (ℕ × ℕ)) : + globalEdgeBits (E ++ F) = globalEdgeBits E ||| globalEdgeBits F := by + induction E with + | nil => simp [globalEdgeBits] + | cons ab E ih => + rcases ab with ⟨a,b⟩ + simp only [List.cons_append, globalEdgeBits, ih, Nat.lor_assoc] + +def cachedLabelValidBool (n : ℕ) (q : Finset ℕ) (bits : ℕ) + (C : List (List ℕ)) : Bool := + compactNodupLabels C.flatten && C.flatten.all (fun i => decide (i < n)) && + C.all (fun c => !c.isEmpty && + compactChainLabels (fun a b => bits.testBit (Nat.pair a b) || + bits.testBit (Nat.pair b a)) c && + compactChainLabels (fun a b => decide (a ∉ q) || decide (b ∉ q)) c && + c.head?.all (fun a => decide (a ∈ q)) && + c.getLast?.all (fun a => decide (a ∈ q))) && + decide (∀ i ∈ q, i ∈ C.flatten) + +theorem cachedLabelValidBool_spec (n : ℕ) (q : Finset ℕ) (E : List (ℕ × ℕ)) + (C : List (List ℕ)) : + cachedLabelValidBool n q (globalEdgeBits E) C = true ↔ LabelValid n q E C := + compactLabelValidBool_spec n q E C + +def cachedCycleValidBool (n k bits : ℕ) (C : List ℕ) : Bool := + compactNodupLabels C && decide (C.length = k+1) && + C.all (fun i => decide (i bits.testBit (Nat.pair a b) || + bits.testBit (Nat.pair b a)) C && + C.head?.all (fun a => C.getLast?.all (fun b => + bits.testBit (Nat.pair a b) || bits.testBit (Nat.pair b a))) + +theorem cachedCycleValidBool_spec (n k : ℕ) (E : List (ℕ × ℕ)) (C : List ℕ) : + cachedCycleValidBool n k (globalEdgeBits E) C = true ↔ LabelCycleValid n k E C := by + simp only [cachedCycleValidBool, LabelCycleValid, Bool.and_eq_true, + compactNodupLabels_spec, decide_eq_true_eq, List.all_eq_true, + compactChainLabels_spec, Bool.or_eq_true, globalEdgeBits_spec, + Option.all_eq_true, labelAdj, Option.mem_def, and_assoc] + simp only [or_comm] + rfl + +def cachedCertificateBool (k t n : ℕ) (q : Finset ℕ) (bits : ℕ) (L e : ℕ) + (M : ForbiddenMatrix) : FiniteCertificate → Bool + | .system C => cachedLabelValidBool n q bits C && decide (Improvement k t L e C) + | .cycle C => cachedCycleValidBool n k bits C + | .packing P => decide (PackingValid k t n M P) + | .edge i j => decide (i < n) && decide (j < n) && + (bits.testBit (Nat.pair i j) || bits.testBit (Nat.pair j i)) && + decide (matrixEntry M i j 0) + | .forbid i j d R N => decide (i < n) && decide (j < n) && + cachedCertificateBool k t (n+d) q + (bits ||| globalEdgeBits (pathEdges (pathLabels n i j d))) L e M R && + cachedCertificateBool k t n q bits L e ((i,j,d)::M) N + +theorem cachedCertificateBool_spec (k t n : ℕ) (q : Finset ℕ) (E : List (ℕ × ℕ)) + (L e : ℕ) (M : ForbiddenMatrix) (C : FiniteCertificate) : + cachedCertificateBool k t n q (globalEdgeBits E) L e M C = true ↔ + C.Valid k t n q E L e M := by + induction C generalizing n E M with + | system C => simp [cachedCertificateBool, FiniteCertificate.Valid, cachedLabelValidBool_spec] + | cycle C => exact cachedCycleValidBool_spec n k E C + | packing P => simp [cachedCertificateBool, FiniteCertificate.Valid] + | edge i j => + simp [cachedCertificateBool, FiniteCertificate.Valid, globalEdgeBits_spec, labelAdj, and_assoc] + | forbid i j d R N ihR ihN => + simp only [cachedCertificateBool, Bool.and_eq_true, decide_eq_true_eq] + rw [← globalEdgeBits_append, ← augmentedEdges, ihR, ihN] + simp only [FiniteCertificate.Valid, and_assoc] + +instance (priority := high) cachedCertificateValid (k t n : ℕ) (q : Finset ℕ) + (E : List (ℕ × ℕ)) (L e : ℕ) (M : ForbiddenMatrix) (C : FiniteCertificate) : + Decidable (C.Valid k t n q E L e M) := + decidable_of_iff _ (cachedCertificateBool_spec k t n q E L e M C) + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Exceptional.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Exceptional.lean new file mode 100644 index 0000000000000000000000000000000000000000..6bf37f3faf136bb99ccc716ce4c448d1291a0c8a --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Exceptional.lean @@ -0,0 +1,81 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.ColouredPaths + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +theorem neighborhood_compl_clique_of_triangle_free {V : Type*} {G : SimpleGraph V} + (hfree : ¬ (⊤ : SimpleGraph (Fin 3)) ⊑ G) (v : V) : + Gᶜ.IsClique (G.neighborSet v) := by + classical + intro a ha b hb hab + refine ⟨hab, fun hadj => ?_⟩ + have hc : G.IsNClique 3 {v, a, b} := + SimpleGraph.is3Clique_triple_iff.mpr ⟨ha, hb, hadj⟩ + exact hfree ((SimpleGraph.not_cliqueFree_iff_top_isContained 3).mp hc.not_cliqueFree) + + +theorem ramsey_three_three_upper : RamseyProperty 3 3 6 := by + classical + intro G + rw [SimpleGraph.cycleGraph_three_eq_top] + by_contra hn + obtain ⟨hred, hblue⟩ := not_or.mp hn + have h₁ := clique_ncard_lt hblue (neighborhood_compl_clique_of_triangle_free hred (0 : Fin 6)) + have hred' : ¬ (⊤ : SimpleGraph (Fin 3)) ⊑ Gᶜᶜ := by simpa using hred + have h₂ := clique_ncard_lt hred' (neighborhood_compl_clique_of_triangle_free hblue (0 : Fin 6)) + rw [ncard_neighborSet] at h₁ h₂ + rw [SimpleGraph.degree_compl] at h₂ + simp only [Fintype.card_fin] at h₂ + omega + + +theorem RamseyProperty.mono {m n N M : ℕ} (h : RamseyProperty m n N) (hNM : N ≤ M) : + RamseyProperty m n M := by + intro G + let f : Fin N → Fin M := Fin.castLE hNM + let H := G.comap f + have hc : H ⊑ G := ⟨⟨⟨f, fun {a b} hab => hab⟩, Fin.castLE_injective hNM⟩⟩ + have hcc : Hᶜ ⊑ Gᶜ := by + refine ⟨⟨⟨f, fun {a b} hab => ?_⟩, Fin.castLE_injective hNM⟩⟩ + exact ⟨fun heq => hab.1 (Fin.castLE_injective hNM heq), hab.2⟩ + rcases h H with hcycle | hclique + · exact Or.inl (hcycle.trans hc) + · exact Or.inr (hclique.trans hcc) + + +theorem ramsey_three_three_lower : ¬ RamseyProperty 3 3 5 := by + intro h + have proof5 : ∀ a b c : Fin 5, + ¬ ((SimpleGraph.cycleGraph 5).Adj a b ∧ (SimpleGraph.cycleGraph 5).Adj a c ∧ + (SimpleGraph.cycleGraph 5).Adj b c) ∧ + ¬ ((SimpleGraph.cycleGraph 5)ᶜ.Adj a b ∧ (SimpleGraph.cycleGraph 5)ᶜ.Adj a c ∧ + (SimpleGraph.cycleGraph 5)ᶜ.Adj b c) := by decide + have hr : (SimpleGraph.cycleGraph 5).CliqueFree 3 := by + intro s hs + obtain ⟨a, b, c, hab, hac, hbc, _⟩ := SimpleGraph.is3Clique_iff.mp hs + exact (proof5 a b c).1 ⟨hab, hac, hbc⟩ + have hb : (SimpleGraph.cycleGraph 5)ᶜ.CliqueFree 3 := by + intro s hs + obtain ⟨a, b, c, hab, hac, hbc, _⟩ := SimpleGraph.is3Clique_iff.mp hs + exact (proof5 a b c).2 ⟨hab, hac, hbc⟩ + rcases h (SimpleGraph.cycleGraph 5) with hred | hblue + · rw [SimpleGraph.cycleGraph_three_eq_top] at hred + exact hred.not_cliqueFree hr + · exact hblue.not_cliqueFree hb + + +theorem exceptional : cycleCliqueRamsey 3 3 = 6 := by + apply le_antisymm + · exact Nat.sInf_le ramsey_three_three_upper + · have hmem : RamseyProperty 3 3 (cycleCliqueRamsey 3 3) := + Nat.sInf_mem (s := {N | RamseyProperty 3 3 N}) ⟨6, ramsey_three_three_upper⟩ + by_contra hn + exact ramsey_three_three_lower (hmem.mono (by omega)) + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/ExteriorBalls.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/ExteriorBalls.lean new file mode 100644 index 0000000000000000000000000000000000000000..a68da231fb70fbc898cfac0c2d6bf975f04a8f7b --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/ExteriorBalls.lean @@ -0,0 +1,160 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.CycleShortening +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorPaths +import OAI.Combinatorics.Ramsey.CycleClique.Independence +import OAI.Combinatorics.Ramsey.CycleClique.IndependenceTwo +import OAI.Combinatorics.Ramsey.CycleClique.InducedGraphs + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph +attribute [local instance] Classical.propDecidable + +theorem closedNeighborhood_mono {V : Type*} (G : SimpleGraph V) {A B : Set V} + (h : A ⊆ B) : closedNeighborhood G A ⊆ closedNeighborhood G B := by + rintro v (hv | ⟨u, hu, huv⟩) + · exact Or.inl (h hv) + · exact Or.inr ⟨u, h hu, huv⟩ + +theorem outside_neighborhood_bound {V : Type*} [Fintype V] + {G : SimpleGraph V} {X Z A : Set V} {x : V} {r : ℕ} + (hA : A ⊆ outsideBall G X x r) (hZ : Z ⊆ X) + (hmiss : ∀ u ∈ A, ∀ z ∈ Z, ¬ G.Adj u z) : + (closedNeighborhood G A).ncard + Z.ncard ≤ + X.ncard + (outsideBall G X x (r + 1)).ncard := by + have hdis : Disjoint (closedNeighborhood G A) Z := by + apply Set.disjoint_left.mpr + rintro z (hz | ⟨u, hu, huz⟩) hzZ + · exact outsideBall_subset_compl G X x r (hA hz) (hZ hzZ) + · exact hmiss u hu z hzZ huz + have hs : closedNeighborhood G A ⊆ outsideBall G X x (r + 1) ∪ (X \ Z) := by + intro z hz + rcases closedNeighborhood_ball_subset G X x r (closedNeighborhood_mono G hA hz) with hb | hx + · exact Or.inl hb + · exact Or.inr ⟨hx, fun hzZ => Set.disjoint_left.mp hdis hz hzZ⟩ + have hc := Set.ncard_le_ncard hs + have hu := Set.ncard_union_le (outsideBall G X x (r + 1)) (X \ Z) + have hd := Set.ncard_sdiff_add_ncard_of_subset hZ + omega + +theorem outsideBall_nonempty {V : Type*} [Fintype V] + {G : SimpleGraph V} {X : Set V} {x : V} {k : ℕ} + (hx : x ∈ X) (hX : X.ncard ≤ k) + (hdeg : k + 1 ≤ (closedNeighborhood G {x}).ncard) : + (outsideBall G X x 0).Nonempty := by + by_contra hn + have hs : closedNeighborhood G {x} ⊆ X := by + rintro v (hv | ⟨u, hu, huv⟩) + · simpa using (Set.mem_singleton_iff.mp hv ▸ hx) + · have he : u = x := hu + subst u + by_contra hvX + exact hn ⟨v, huv, hvX⟩ + have hh := Set.ncard_le_ncard hs + omega + +theorem outsideBall_degree_bound {V : Type*} [Fintype V] + {G : SimpleGraph V} {X Z : Set V} {x : V} {k : ℕ} + (hx : x ∈ X) (hX : X.ncard ≤ k) (hZ : Z ⊆ X) + (hdeg : ∀ u, k + 1 ≤ (closedNeighborhood G {u}).ncard) + (hmiss : ∀ u ∈ outsideBall G X x 0, ∀ z ∈ Z, ¬ G.Adj u z) : + k + 1 + Z.ncard ≤ X.ncard + (outsideBall G X x 1).ncard := by + obtain ⟨u, hu⟩ := outsideBall_nonempty hx hX (hdeg x) + have hc := outside_neighborhood_bound (Set.singleton_subset_iff.mpr hu) hZ + (by intro v hv; have he : v = u := hv; subst v; exact hmiss u hu) + have hd := hdeg u + change (closedNeighborhood G {u}).ncard + Z.ncard ≤ X.ncard + (outsideBall G X x 1).ncard at hc + omega + +theorem outsideBall_independent_pair {V : Type*} [Fintype V] + {G : SimpleGraph V} {X R : Set V} {x : V} {k t : ℕ} + (hR : R ⊆ X) (hx : x ∈ R) (hcardR : R.ncard = t) (hX : X.ncard ≤ k) + (hclique : G.cliqueNum ≤ t) + (hdeg : ∀ u, k + 1 ≤ (closedNeighborhood G {u}).ncard) + (hmiss : ∀ u ∈ outsideBall G X x 1, ∀ z ∈ R \ {x}, ¬ G.Adj u z) : + 2 ≤ independence G (outsideBall G X x 2) := by + have ht : 1 ≤ t := by + have hp := (Set.ncard_pos).mpr (show R.Nonempty from ⟨x, hx⟩) + omega + have hZ : R \ {x} ⊆ X := Set.sdiff_subset.trans hR + have hcZ : (R \ {x}).ncard = t - 1 := by + rw [Set.ncard_sdiff_singleton_of_mem hx, hcardR] + have hb := outsideBall_degree_bound (hR hx) hX hZ hdeg + (fun u hu => hmiss u (outsideBall_subset_succ G X x 0 hu)) + rw [hcZ] at hb + by_contra hn + have htwo : G.IsClique (outsideBall G X x 2) := clique_of_independence_le_one (by omega) + have hc2 := (clique_ncard_le_cliqueNum htwo).trans hclique + have hsub := outsideBall_subset_succ G X x 1 + have hc12 : (outsideBall G X x 1).ncard ≤ (outsideBall G X x 2).ncard := Set.ncard_le_ncard hsub + have hc1 : (outsideBall G X x 1).ncard = t := by omega + have hadj : ∀ z ∈ outsideBall G X x 1, G.Adj x z := by + intro z hz + by_contra hneg + have hmissR : ∀ u ∈ ({z} : Set V), ∀ w ∈ R, ¬ G.Adj u w := by + intro u hu w hw huw + have he : u = z := hu + subst u + by_cases hwx : w = x + · subst w + exact hneg huw.symm + · exact hmiss z hz w ⟨hw, hwx⟩ huw + have hh := outside_neighborhood_bound (Set.singleton_subset_iff.mpr hz) hR hmissR + rw [hcardR] at hh + change (closedNeighborhood G {z}).ncard + t ≤ X.ncard + (outsideBall G X x 2).ncard at hh + have hd := hdeg z + omega + have hxB : x ∉ outsideBall G X x 1 := fun hh => + outsideBall_subset_compl G X x 1 hh (hR hx) + have hbig : G.IsClique (insert x (outsideBall G X x 1)) := by + intro u hu v hv huv + rcases hu with rfl | hu <;> rcases hv with rfl | hv + · exact (huv rfl).elim + · exact hadj v hv + · exact (hadj u hu).symm + · exact htwo (hsub hu) (hsub hv) huv + have hc := (clique_ncard_le_cliqueNum hbig).trans hclique + rw [Set.ncard_insert_of_notMem hxB, hc1] at hc + omega + +theorem outsideBall_independent_triple {V : Type*} [Fintype V] + {G : SimpleGraph V} {X R : Set V} {x : V} {k t : ℕ} + (hk : 5 ≤ k) (ht : 1 ≤ t) (htk : t < k) + (hR : R ⊆ X) (hx : x ∈ R) (hcardR : R.ncard = t) (hX : X.ncard ≤ k) + (hclique : G.cliqueNum ≤ t) (hcycle : ¬ SimpleGraph.cycleGraph (k + 1) ⊑ G) + (hexp : ∀ I : Set V, G.IsIndepSet I → I.Nonempty → + k * I.ncard + 1 ≤ (closedNeighborhood G I).ncard) + (hmiss : ∀ u ∈ outsideBall G X x 1, ∀ z ∈ R \ {x}, ¬ G.Adj u z) + (hnclique : ¬ G.IsClique (outsideBall G X x 1)) : + 3 ≤ independence G (outsideBall G X x 2) := by + have ha : 2 ≤ independence G (outsideBall G X x 1) := by + by_contra hn + exact hnclique (clique_of_independence_le_one (by omega)) + obtain ⟨I, hIs, hI, hIc⟩ := exists_indep_of_independence G (outsideBall G X x 1) + have hIn : I.Nonempty := (Set.ncard_pos).mp (by omega) + have he := hexp I hI hIn + have hb := outside_neighborhood_bound hIs (Set.sdiff_subset.trans hR) + (fun u hu => hmiss u (hIs hu)) + have hcZ : (R \ {x}).ncard = t - 1 := by + rw [Set.ncard_sdiff_singleton_of_mem hx, hcardR] + rw [hcZ] at hb + change (closedNeighborhood G I).ncard + (t - 1) ≤ X.ncard + (outsideBall G X x 2).ncard at hb + have hm : 2 * k ≤ k * I.ncard := by + have hh := Nat.mul_le_mul_left k (show 2 ≤ I.ncard by omega) + simpa only [Nat.mul_comm k 2] using hh + apply size_test hk ht hcycle hclique + omega + +theorem outsideBall_misses_representatives {V : Type*} {G : SimpleGraph V} + {X R : Set V} {x : V} {r : ℕ} (hR : R ⊆ X) (hx : x ∈ R) + (hno : ∀ y ∈ R, ∀ d, 1 ≤ d → d ≤ r + 1 → ¬ OutsidePath G X x y d) : + ∀ u ∈ outsideBall G X x r, ∀ z ∈ R \ {x}, ¬ G.Adj u z := by + intro u hu z hz + exact outside_ball_misses (hR hx) (hR hz.1) (Ne.symm hz.2) + (fun d hd hd' => hno z hz.1 d hd hd') u hu + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/ExteriorFrames.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/ExteriorFrames.lean new file mode 100644 index 0000000000000000000000000000000000000000..6dbf07c7ecb15fd51d2f6c5257031bbdd5507ffb --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/ExteriorFrames.lean @@ -0,0 +1,198 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.ChainProfiles +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorPaths +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PathSystems + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +open scoped SimpleGraph + + +theorem outsidePath_clique_forbidden {V : Type*} [Fintype V] {G : SimpleGraph V} + {Q : Set V} (hQ : G.IsClique Q) {k d : ℕ} (hk : 3 ≤ k) + (ht : Q.ncard ≤ k) (hcycle : ¬ SimpleGraph.cycleGraph (k+1) ⊑ G) + {x y : V} (hd : k+1-Q.ncard ≤ d) (hd' : d ≤ k-1) : + ¬ OutsidePath G Q x y d := by + classical + rintro ⟨hx,hy,hxy,p,hp,hlen,hint⟩ + let S := (Q.toFinset.erase x).erase y + have hs : S.card = Q.ncard-2 := by + dsimp [S] + rw [Finset.card_erase_of_mem (by simp [hy,hxy.symm]), + Finset.card_erase_of_mem (by simpa using hx), ← Set.ncard_eq_toFinset_card'] + omega + obtain ⟨T,hTS,hTc⟩ := Finset.exists_subset_card_eq (show k-1-d ≤ S.card by omega) + let C := p.support :: T.toList.map (fun v => [v]) + have hTf : ∀ v ∈ T, v ∈ Q ∧ v ≠ x ∧ v ≠ y := by + intro v hv + have hh := hTS hv + simp only [S,Finset.mem_erase,Set.mem_toFinset] at hh + exact ⟨hh.2.2,hh.2.1,hh.1⟩ + have hf : C.flatten = p.support ++ T.toList := by simp [C,flatten_singletons] + have hnd : C.flatten.Nodup := by + rw [hf,List.nodup_append] + refine ⟨hp.support_nodup,Finset.nodup_toList _,?_⟩ + intro a ha b hb hab + subst b + have hh := hTf a (Finset.mem_toList.mp hb) + exact (hint a ha hh.1).elim hh.2.1 hh.2.2 + have hc := close_clique_chains hQ C (by + intro c hc + simp only [C,List.mem_cons,List.mem_map] at hc + rcases hc with rfl | ⟨v,hv,rfl⟩ + · exact p.support_ne_nil + · simp) hnd (by + intro c hc + simp only [C,List.mem_cons,List.mem_map] at hc + rcases hc with rfl | ⟨v,hv,rfl⟩ + · exact p.isChain_adj_support + · simp) (by + intro c hc + simp only [C,List.mem_cons,List.mem_map] at hc + rcases hc with rfl | ⟨v,hv,rfl⟩ + · constructor + · intro u hu + have : u=x := by simpa [List.head?_eq_some_head p.support_ne_nil] using hu.symm + simpa [this] using hx + · intro u hu + have : u=y := by simpa [List.getLast?_eq_some_getLast p.support_ne_nil] using hu.symm + simpa [this] using hy + · have hvQ := (hTf v (Finset.mem_toList.mp hv)).1 + simpa using And.intro hvQ hvQ) (by + rw [hf,List.length_append,SimpleGraph.Walk.length_support,Finset.length_toList,hTc] + omega) + have hcL : C.flatten.length = k+1 := by + rw [hf,List.length_append,SimpleGraph.Walk.length_support,Finset.length_toList,hTc] + omega + exact hcycle (hcL ▸ hc) + + +theorem outsidePath_of_list {V : Type*} {G : SimpleGraph V} {Q : Set V} + {x y : V} {d : ℕ} (L : List V) (hL : L.Nodup) (hchain : L.IsChain G.Adj) + (hfirst : L.head? = some x) (hlast : L.getLast? = some y) + (hlen : L.length = d+2) (hx : x ∈ Q) (hy : y ∈ Q) + (hint : ∀ v ∈ L, v ∈ Q → v=x ∨ v=y) : OutsidePath G Q x y d := by + have hne : L ≠ [] := by intro he; simp [he] at hfirst + let p := SimpleGraph.Walk.ofSupport L hne hchain + have he₁ : L.head hne=x := by simpa only [List.head?_eq_some_head hne,Option.some.injEq] using hfirst + have he₂ : L.getLast hne=y := by simpa only [List.getLast?_eq_some_getLast hne,Option.some.injEq] using hlast + let p' := p.copy he₁ he₂ + have hs : p'.support=L := by simp [p',p] + have hp : p'.IsPath := p'.isPath_def.mpr (hs ▸ hL) + have hl : p'.length=d+1 := by + have := p'.length_support + rw [hs,hlen] at this + omega + refine ⟨hx,hy,?_,p',hp,hl,?_⟩ + · intro he + have := (hp.nil_iff_eq.mpr he).length_eq_zero + omega + · simpa only [hs] using hint + +def extNeighbors {V : Type*} (G : SimpleGraph V) (Q : Set V) (x : V) : Set V := + {u | G.Adj x u ∧ u ∉ Q} + +def extClosed {V : Type*} (G : SimpleGraph V) (Q S : Set V) : Set V := + closedNeighborhood G S \ Q + + + +theorem extClosed_disjoint {V : Type*} [Fintype V] {G : SimpleGraph V} + {Q A B : Set V} (hQ : G.IsClique Q) (ht : 3 ≤ Q.ncard) (ht' : Q.ncard ≤ 4) + (hcycle : ¬ SimpleGraph.cycleGraph 5 ⊑ G) + (hA : A ⊆ Qᶜ) (hB : B ⊆ Qᶜ) (hAB : Disjoint A B) + (hattach : ∀ u ∈ A, ∀ v ∈ B, ∃ x ∈ Q, ∃ y ∈ Q, x ≠ y ∧ G.Adj x u ∧ G.Adj y v) : + Disjoint (extClosed G Q A) (extClosed G Q B) := by + classical + apply Set.disjoint_left.mpr + intro z hzA hzB + obtain ⟨u,hu,huz⟩ : ∃ u ∈ A, u=z ∨ G.Adj u z := by + rcases hzA.1 with hu | ⟨u,hu,huz⟩ + · exact ⟨z,hu,Or.inl rfl⟩ + · exact ⟨u,hu,Or.inr huz⟩ + obtain ⟨v,hv,hvz⟩ : ∃ v ∈ B, v=z ∨ G.Adj v z := by + rcases hzB.1 with hv | ⟨v,hv,hvz⟩ + · exact ⟨z,hv,Or.inl rfl⟩ + · exact ⟨v,hv,Or.inr hvz⟩ + have huv : u ≠ v := fun he => Set.disjoint_left.mp hAB hu (he ▸ hv) + obtain ⟨x,hx,y,hy,hxy,hxu,hyv⟩ := hattach u hu v hv + have hun := hA hu + have hvn := hB hv + have hz := hzA.2 + have hno2 := outsidePath_clique_forbidden hQ (k:=4) (by omega) ht' hcycle + (x:=x) (y:=y) (d:=2) (by omega) (by omega) + have hno3 := outsidePath_clique_forbidden hQ (k:=4) (by omega) ht' hcycle + (x:=x) (y:=y) (d:=3) (by omega) (by omega) + have hneq : ∀ w, w ∉ Q → w ≠ x ∧ w ≠ y := by + intro w hw + exact ⟨fun he => hw (he ▸ hx),fun he => hw (he ▸ hy)⟩ + have huq := hneq u hun + have hvq := hneq v hvn + have hzq := hneq z hz + have hedge : ¬ G.Adj u v := by + intro huvAdj + apply hno2 + apply outsidePath_of_list [x,u,v,y] + · simp [hxy,huq.2,hvq.2,Ne.symm huq.1,Ne.symm hvq.1,huv] + · simpa using And.intro hxu (And.intro huvAdj hyv.symm) + · rfl + · rfl + · rfl + · exact hx + · exact hy + · intro w hw hwQ + simp only [List.mem_cons,List.not_mem_nil,or_false] at hw + rcases hw with rfl | rfl | rfl | rfl + · exact Or.inl rfl + · exact (hun hwQ).elim + · exact (hvn hwQ).elim + · exact Or.inr rfl + rcases huz with rfl | huz + · rcases hvz with he | hvz + · exact huv he.symm + · exact hedge hvz.symm + rcases hvz with rfl | hvz + · exact hedge huz + apply hno3 + apply outsidePath_of_list [x,u,z,v,y] + · simp [hxy,huq.2,hvq.2,hzq.2,Ne.symm huq.1, + Ne.symm hvq.1,Ne.symm hzq.1,huv,huz.ne,hvz.ne.symm] + · simpa using And.intro hxu (And.intro huz (And.intro hvz.symm hyv.symm)) + · rfl + · rfl + · rfl + · exact hx + · exact hy + · intro w hw hwQ + simp only [List.mem_cons,List.not_mem_nil,or_false] at hw + rcases hw with rfl | rfl | rfl | rfl | rfl + · exact Or.inl rfl + · exact (hun hwQ).elim + · exact (hz hwQ).elim + · exact (hvn hwQ).elim + · exact Or.inr rfl + + +structure Frame {V : Type*} (G : SimpleGraph V) (t : ℕ) where + q : Fin t ↪ V + adj : ∀ i j, i ≠ j → G.Adj (q i) (q j) + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/ExteriorPaths.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/ExteriorPaths.lean new file mode 100644 index 0000000000000000000000000000000000000000..112ba0f7c2d7f06f2fa114d5050818988c6200e5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/ExteriorPaths.lean @@ -0,0 +1,181 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.CycleShortening + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +theorem exteriorEdges_le {V : Type*} (G : SimpleGraph V) (X : Set V) : + exteriorEdges G X ≤ G := fun _ _ h => h.1 + + +def OutsidePath {V : Type*} (G : SimpleGraph V) (X : Set V) (x y : V) (d : ℕ) : Prop := + x ∈ X ∧ y ∈ X ∧ x ≠ y ∧ ∃ p : G.Walk x y, + p.IsPath ∧ p.length = d + 1 ∧ ∀ v ∈ p.support, v ∈ X → v = x ∨ v = y + + + +def outsideBall {V : Type*} (G : SimpleGraph V) (X : Set V) (x : V) : ℕ → Set V + | 0 => G.neighborSet x \ X + | r + 1 => closedNeighborhood G (outsideBall G X x r) \ X + +theorem outsideBall_subset_compl {V : Type*} (G : SimpleGraph V) (X : Set V) + (x : V) (r : ℕ) : outsideBall G X x r ⊆ Xᶜ := by + cases r <;> exact fun _ h => h.2 + +theorem outsideBall_subset_succ {V : Type*} (G : SimpleGraph V) (X : Set V) + (x : V) (r : ℕ) : outsideBall G X x r ⊆ outsideBall G X x (r + 1) := + fun _ h => ⟨Or.inl h, outsideBall_subset_compl G X x r h⟩ + +theorem outsideBall_mono {V : Type*} (G : SimpleGraph V) (X : Set V) + (x : V) : Monotone (outsideBall G X x) := + monotone_nat_of_le_succ (outsideBall_subset_succ G X x) + +theorem closedNeighborhood_ball_subset {V : Type*} (G : SimpleGraph V) (X : Set V) + (x : V) (r : ℕ) : + closedNeighborhood G (outsideBall G X x r) ⊆ outsideBall G X x (r + 1) ∪ X := by + intro v hv + by_cases hx : v ∈ X + · exact Or.inr hx + · exact Or.inl ⟨hv, hx⟩ + + + +theorem outsideBall_walk {V : Type*} {G : SimpleGraph V} {X : Set V} {x z : V} + {r : ℕ} (hz : z ∈ outsideBall G X x r) : + ∃ p : (exteriorEdges G X).Walk x z, p.length ≤ r + 1 ∧ + ∀ v ∈ p.support, v = x ∨ v ∉ X := by + induction r generalizing z with + | zero => + change G.Adj x z ∧ z ∉ X at hz + let p : (exteriorEdges G X).Walk x z := .cons ⟨hz.1, Or.inr hz.2⟩ .nil + refine ⟨p, by change 1 ≤ 1; omega, ?_⟩ + dsimp [p] + intro v hv + simp only [List.mem_cons, List.not_mem_nil, or_false] at hv + rcases hv with rfl | rfl + · exact Or.inl rfl + · exact Or.inr hz.2 + | succ r ih => + change (z ∈ outsideBall G X x r ∨ ∃ u ∈ outsideBall G X x r, G.Adj u z) ∧ z ∉ X at hz + rcases hz.1 with hold | ⟨u, hu, huz⟩ + · obtain ⟨p, hp, hs⟩ := ih hold + exact ⟨p, by omega, hs⟩ + · obtain ⟨p, hp, hs⟩ := ih hu + refine ⟨p.concat ⟨huz, Or.inr hz.2⟩, ?_, ?_⟩ + · rw [SimpleGraph.Walk.length_concat] + omega + · intro v hv + simp only [SimpleGraph.Walk.support_concat, List.mem_append, List.mem_singleton] at hv + rcases hv with hv | rfl + · exact hs v hv + · exact Or.inr hz.2 + + + +theorem outsidePath_of_exterior_walk {V : Type*} {G : SimpleGraph V} {X : Set V} + {x y : V} (hx : x ∈ X) (hy : y ∈ X) (hxy : x ≠ y) + (p : (exteriorEdges G X).Walk x y) + (hs : ∀ v ∈ p.support, v ∈ X → v = x ∨ v = y) : + ∃ d, 1 ≤ d ∧ d + 1 ≤ p.length ∧ OutsidePath G X x y d := by + classical + let q := p.bypass + have hq : q.IsPath := p.bypass_isPath + have hpos : 0 < q.length := SimpleGraph.Walk.not_nil_iff_lt_length.mp + (fun hn => hxy hn.eq) + have htwo : 2 ≤ q.length := by + by_contra hn + have hh := q.adj_of_length_eq_one (by omega) + exact hh.2.elim (fun hn => hn hx) (fun hn => hn hy) + refine ⟨q.length - 1, by omega, ?_, hx, hy, hxy, + q.mapLe (exteriorEdges_le G X), hq.mapLe _, ?_, ?_⟩ + · have hh := p.length_bypass_le_length; dsimp [q] at *; omega + · simp only [SimpleGraph.Walk.length_mapLe]; omega + · intro v hv hvX + have hvq : v ∈ q.support := by simpa only [SimpleGraph.Walk.support_mapLe_eq_support] using hv + exact hs v (p.support_bypass_subset_support hvq) hvX + + +theorem outsidePath_of_balls_meet {V : Type*} {G : SimpleGraph V} {X : Set V} + {x y z : V} {r s : ℕ} (hx : x ∈ X) (hy : y ∈ X) (hxy : x ≠ y) + (hzx : z ∈ outsideBall G X x r) (hzy : z ∈ outsideBall G X y s) : + ∃ d, 1 ≤ d ∧ d ≤ r + s + 1 ∧ OutsidePath G X x y d := by + obtain ⟨p, hp, hps⟩ := outsideBall_walk hzx + obtain ⟨q, hq, hqs⟩ := outsideBall_walk hzy + obtain ⟨d, hd, hlen, hout⟩ := outsidePath_of_exterior_walk hx hy hxy (p.append q.reverse) (by + intro v hv hvX + rcases (SimpleGraph.Walk.mem_support_append_iff _ _).mp hv with hv | hv + · exact Or.inl ((hps v hv).resolve_right (fun hn => hn hvX)) + · exact Or.inr ((hqs v (by simpa using hv)).resolve_right (fun hn => hn hvX))) + refine ⟨d, hd, ?_, hout⟩ + simp only [SimpleGraph.Walk.length_append, SimpleGraph.Walk.length_reverse] at hlen + omega + + +theorem outsidePath_of_balls_adj {V : Type*} {G : SimpleGraph V} {X : Set V} + {x y z w : V} {r s : ℕ} (hx : x ∈ X) (hy : y ∈ X) (hxy : x ≠ y) + (hz : z ∈ outsideBall G X x r) (hw : w ∈ outsideBall G X y s) (hzw : G.Adj z w) : + ∃ d, 1 ≤ d ∧ d ≤ r + s + 2 ∧ OutsidePath G X x y d := by + obtain ⟨p, hp, hps⟩ := outsideBall_walk hz + obtain ⟨q, hq, hqs⟩ := outsideBall_walk hw + let P := (p.concat ⟨hzw, Or.inl (outsideBall_subset_compl G X x r hz)⟩).append q.reverse + obtain ⟨d, hd, hlen, hout⟩ := outsidePath_of_exterior_walk hx hy hxy P (by + intro v hv hvX + rcases (SimpleGraph.Walk.mem_support_append_iff _ _).mp hv with hv | hv + · simp only [SimpleGraph.Walk.support_concat, List.mem_append, List.mem_singleton] at hv + rcases hv with hv | rfl + · exact Or.inl ((hps v hv).resolve_right (fun hn => hn hvX)) + · exact (outsideBall_subset_compl G X y s hw hvX).elim + · exact Or.inr ((hqs v (by simpa using hv)).resolve_right (fun hn => hn hvX))) + refine ⟨d, hd, ?_, hout⟩ + dsimp [P] at hlen + simp only [SimpleGraph.Walk.length_append, SimpleGraph.Walk.length_reverse] at hlen + rw [SimpleGraph.Walk.length_concat] at hlen + omega + +theorem outside_balls_separated {V : Type*} {G : SimpleGraph V} {X : Set V} + {x y : V} {r s : ℕ} (hx : x ∈ X) (hy : y ∈ X) (hxy : x ≠ y) + (hno : ∀ d, 1 ≤ d → d ≤ r + s + 2 → ¬ OutsidePath G X x y d) : + Disjoint (outsideBall G X x r) (outsideBall G X y s) ∧ + ∀ z ∈ outsideBall G X x r, ∀ w ∈ outsideBall G X y s, ¬ G.Adj z w := by + constructor + · apply Set.disjoint_left.mpr + intro z hzx hzy + obtain ⟨d, hd, hd', hp⟩ := outsidePath_of_balls_meet hx hy hxy hzx hzy + exact hno d hd (by omega) hp + · intro z hz w hw hzw + obtain ⟨d, hd, hd', hp⟩ := outsidePath_of_balls_adj hx hy hxy hz hw hzw + exact hno d hd hd' hp + + +theorem outsidePath_of_ball_adj {V : Type*} {G : SimpleGraph V} {X : Set V} + {x y z : V} {r : ℕ} (hx : x ∈ X) (hy : y ∈ X) (hxy : x ≠ y) + (hz : z ∈ outsideBall G X x r) (hzy : G.Adj z y) : + ∃ d, 1 ≤ d ∧ d ≤ r + 1 ∧ OutsidePath G X x y d := by + obtain ⟨p, hp, hps⟩ := outsideBall_walk hz + obtain ⟨d, hd, hlen, hout⟩ := outsidePath_of_exterior_walk hx hy hxy + (p.concat ⟨hzy, Or.inl (outsideBall_subset_compl G X x r hz)⟩) (by + intro v hv hvX + simp only [SimpleGraph.Walk.support_concat, List.mem_append, List.mem_singleton] at hv + rcases hv with hv | rfl + · exact Or.inl ((hps v hv).resolve_right (fun hn => hn hvX)) + · exact Or.inr rfl) + refine ⟨d, hd, ?_, hout⟩ + rw [SimpleGraph.Walk.length_concat] at hlen + omega + +theorem outside_ball_misses {V : Type*} {G : SimpleGraph V} {X : Set V} + {x y : V} {r : ℕ} (hx : x ∈ X) (hy : y ∈ X) (hxy : x ≠ y) + (hno : ∀ d, 1 ≤ d → d ≤ r + 1 → ¬ OutsidePath G X x y d) : + ∀ z ∈ outsideBall G X x r, ¬ G.Adj z y := by + intro z hz hzy + obtain ⟨d, hd, hd', hp⟩ := outsidePath_of_ball_adj hx hy hxy hz hzy + exact hno d hd hd' hp + +attribute [local instance] Classical.propDecidable + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/FiniteGraphs.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/FiniteGraphs.lean new file mode 100644 index 0000000000000000000000000000000000000000..7a0bcbe982fb5ace9789f1dce366bbd457c73778 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/FiniteGraphs.lean @@ -0,0 +1,509 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.ChainProfiles +import OAI.Combinatorics.Ramsey.CycleClique.ChainRearrangement +import OAI.Combinatorics.Ramsey.CycleClique.CycleShortening +import OAI.Combinatorics.Ramsey.CycleClique.Exceptional +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorBalls +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorPaths +import OAI.Combinatorics.Ramsey.CycleClique.Independence +import OAI.Combinatorics.Ramsey.CycleClique.IndependenceTwo +import OAI.Combinatorics.Ramsey.CycleClique.InducedGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LargeSystems +import OAI.Combinatorics.Ramsey.CycleClique.MarkedChains +import OAI.Combinatorics.Ramsey.CycleClique.PathSystems + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph +attribute [local instance] Classical.propDecidable + +noncomputable def chosenChain {V : Type*} (Q : Set V) (c : List V) : List V := + if c.length = 4 then c.tail.dropLast else (markedReps Q true c).filter (fun x => x ∉ Q) + + theorem chosenChain_sublist {V : Type*} (Q : Set V) (c : List V) : + (chosenChain Q c).Sublist c := by + classical + unfold chosenChain + split_ifs + · exact (List.dropLast_sublist _).trans (List.tail_sublist _) + · exact List.filter_sublist.trans (markedReps_sublist Q true c) + + theorem ClosedChain.four {V : Type*} {G : SimpleGraph V} {Q : Set V} {c : List V} + (h : ClosedChain G Q c) (hl : c.length = 4) : + ∃ u a b v, c = [u,a,b,v] ∧ u ∈ Q ∧ v ∈ Q ∧ a ∉ Q ∧ b ∉ Q := by + rcases c with _ | ⟨u,c⟩ <;> try simp at hl + rcases c with _ | ⟨a,c⟩ <;> try simp at hl + rcases c with _ | ⟨b,c⟩ <;> try simp at hl + rcases c with _ | ⟨v,c⟩ <;> try simp at hl + have hc : c = [] := List.length_eq_zero_iff.mp (by simpa using hl) + subst c + have hu : u ∈ Q := h.ends.1 u (by simp) + have hv : v ∈ Q := h.ends.2 v (by simp) + have ha : a ∉ Q := h.positive.rel.resolve_left (not_not.mpr hu) + have hb : b ∉ Q := h.positive.tail.tail.rel.resolve_right (not_not.mpr hv) + exact ⟨u,a,b,v,rfl,hu,hv,ha,hb⟩ + + theorem ClosedChain.chosen_rep {V : Type*} {G : SimpleGraph V} {Q : Set V} {c : List V} + (h : ClosedChain G Q c) {x : V} (hx : x ∈ chosenChain Q c) : + x ∉ Q ∧ ∃ b : Bool, x ∈ markedReps Q true (flipChain b c) := by + classical + by_cases hl : c.length = 4 + · obtain ⟨u,a,b,v,rfl,hu,hv,ha,hb⟩ := h.four hl + have hh : x = a ∨ x = b := by simpa [chosenChain] using hx + rcases hh with rfl | rfl + · exact ⟨ha, false, by simp [flipChain, markedReps, hu]⟩ + · exact ⟨hb, true, by simp [flipChain, markedReps, hv]⟩ + · have hx' := List.mem_filter.mp (show x ∈ (markedReps Q true c).filter (fun x => x ∉ Q) by + simpa only [chosenChain, ite_eq_right hl] using hx) + exact ⟨of_decide_eq_true hx'.2, false, by simpa [flipChain] using hx'.1⟩ + + theorem ClosedChain.interior_count {V : Type*} {G : SimpleGraph V} {Q : Set V} {c : List V} + (h : ClosedChain G Q c) (hn : c.Nodup) {A : List ℕ} (hA : ChainAmounts Q c A) : + ((markedReps Q true c).filter (fun x => x ∉ Q)).length = A.length := by + classical + have hl := markedReps_length Q true c h.nonempty h.ends.2 + have hh := (markedReps Q true c).length_eq_countP_add_countP (fun x => decide (x ∈ Q)) + rw [h.reps_Q_count hn] at hh + simp only [Bool.not_eq_true, decide_eq_false_iff_not, List.countP_eq_length_filter] at hh + have hc := hA.count.1 + simp only [ite_true] at hl + omega + + theorem ClosedChain.chosen_count {V : Type*} {G : SimpleGraph V} {Q : Set V} {c : List V} + (h : ClosedChain G Q c) (hn : c.Nodup) {A : List ℕ} (hA : ChainAmounts Q c A) + (ha : ∀ a ∈ A, 2 ≤ a) (hc1 : c.length ≠ 1) : + 2 * c.countP (fun x => decide (x ∈ Q)) ≤ (chosenChain Q c).length + A.sum := by + classical + obtain ⟨hc, hl, _⟩ := hA.count + have hs := list_sum_lower A 2 ha + have hAp : 1 ≤ A.length := by + by_contra! hh + have he : A = [] := List.length_eq_zero_iff.mp (by omega) + simp only [he, List.length_nil, List.sum_nil] at hl + exact hc1 (by omega) + by_cases h4 : c.length = 4 + · obtain ⟨u,a,b,v,rfl,hu,hv,ha,hb⟩ := h.four h4 + simp only [chosenChain, List.length_cons, List.length_nil, Nat.reduceAdd, ite_true, + List.tail_cons, List.dropLast_cons_cons, List.dropLast_singleton] + simp only [List.length_cons, List.length_nil] at hl + omega + · have hi := h.interior_count hn hA + simp only [chosenChain, ite_eq_right h4, hi] + by_cases hA1 : A.length = 1 + · have hs3 : 3 ≤ A.sum := by omega + omega + · omega + + theorem PathSystem.orient_rep_chain {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) (f : List V → Bool) {c : List V} (hc : c ∈ P.chains) + {x : V} (hx : x ∈ markedReps Q true (flipChain (f c) c)) : x ∈ (P.orient f).reps := by + apply (P.orient f).rep_of_chain (show flipChain (f c) c ∈ (P.orient f).chains from ?_) hx + rw [PathSystem.orient_chains] + exact List.mem_map.mpr ⟨c,hc,rfl⟩ + + theorem PathSystem.chosen_rep {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) {c : List V} (hc : c ∈ P.chains) {x : V} + (hx : x ∈ chosenChain Q c) : x ∉ Q ∧ ∃ f : List V → Bool, x ∈ (P.orient f).reps := by + obtain ⟨hxQ,b,hb⟩ := (P.closed_chain hc).chosen_rep hx + exact ⟨hxQ, fun _ => b, P.orient_rep_chain _ hc hb⟩ + + theorem PathSystem.chosen_pair {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) {c c' : List V} (hc : c ∈ P.chains) (hc' : c' ∈ P.chains) + {x y : V} (hx : x ∈ chosenChain Q c) (hy : y ∈ chosenChain Q c') (hxy : x ≠ y) : + (∃ f : List V → Bool, x ∈ (P.orient f).reps ∧ y ∈ (P.orient f).reps) ∨ + (∃ u v, c = [u,x,y,v]) ∨ (∃ u v, c = [u,y,x,v]) := by + classical + by_cases hcc : c = c' + · subst c' + by_cases h4 : c.length = 4 + · obtain ⟨u,a,b,v,rfl,hu,hv,ha,hb⟩ := (P.closed_chain hc).four h4 + have hx' : x = a ∨ x = b := by simpa [chosenChain] using hx + have hy' : y = a ∨ y = b := by simpa [chosenChain] using hy + rcases hx' with rfl | rfl <;> rcases hy' with rfl | rfl + · exact (hxy rfl).elim + · exact Or.inr (Or.inl ⟨u,v,rfl⟩) + · exact Or.inr (Or.inr ⟨u,v,rfl⟩) + · exact (hxy rfl).elim + · have hx' : x ∈ markedReps Q true c := List.mem_of_mem_filter (by + simpa only [chosenChain, ite_eq_right h4] using hx) + have hy' : y ∈ markedReps Q true c := List.mem_of_mem_filter (by + simpa only [chosenChain, ite_eq_right h4] using hy) + exact Or.inl ⟨fun _ => false, P.orient_rep_chain _ hc (by simpa [flipChain] using hx'), + P.orient_rep_chain _ hc (by simpa [flipChain] using hy')⟩ + · obtain ⟨_,b,hb⟩ := (P.closed_chain hc).chosen_rep hx + obtain ⟨_,b',hb'⟩ := (P.closed_chain hc').chosen_rep hy + let f : List V → Bool := fun d => if d = c then b else b' + exact Or.inl ⟨f, P.orient_rep_chain f hc (by simpa [f] using hb), + P.orient_rep_chain f hc' (by simpa [f, Ne.symm hcc] using hb')⟩ + +noncomputable def PathSystem.chosen {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) : List V := (P.chains.map (chosenChain Q)).flatten + + theorem PathSystem.chosen_sublist {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) : P.chosen.Sublist P.chains.flatten := by + suffices hh : ∀ C : List (List V), (C.map (chosenChain Q)).flatten.Sublist C.flatten from hh P.chains + intro C + induction C with + | nil => simp + | cons c C ih => + simpa only [List.map_cons, List.flatten_cons] using (chosenChain_sublist Q c).append ih + + theorem PathSystem.chosen_count {V : Type*} [Fintype V] {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) (hM : P.missing = ∅) + (hA : ∃ A, AmountProfile P A ∧ ∀ a ∈ A, 2 ≤ a) : + 2 * Q.ncard ≤ P.chosen.length + P.amount := by + classical + obtain ⟨A, ⟨D,hD,hperm⟩, hAs⟩ := hA + have hs : D.flatten.sum = P.amount := by + rw [hperm.sum_eq] + exact (AmountProfile.count ⟨D,hD,hperm⟩).1 + have hC1 : ∀ c ∈ P.chains, c.length ≠ 1 := by + intro c hc he + obtain ⟨x,rfl⟩ := List.length_eq_one_iff.mp he + have hx : x ∈ P.missing := hc + rw [hM] at hx + exact hx + have hh : ∀ (C : List (List V)) (D : List (List ℕ)), List.Forall₂ (ChainAmounts Q) C D → + (∀ c ∈ C, c.length ≠ 1) → (∀ a ∈ D.flatten, 2 ≤ a) → + (∀ c ∈ C, c.Nodup) → (∀ c ∈ C, ClosedChain G Q c) → + 2 * C.flatten.countP (fun x => decide (x ∈ Q)) ≤ + (C.map (chosenChain Q)).flatten.length + D.flatten.sum := by + intro C D hD + induction hD with + | nil => simp + | @cons c a C D hca hD ih => + intro hC1 hdall hnd hc + have hb := (hc c (by simp)).chosen_count (hnd c (by simp)) hca + (fun n hn => hdall n (List.mem_flatten.mpr ⟨a,by simp,hn⟩)) (hC1 c (by simp)) + have hi := ih (fun c hc => hC1 c (by simp [hc])) + (fun n hn => hdall n (List.mem_flatten.mpr (by + obtain ⟨a,ha,hna⟩ := List.mem_flatten.mp hn + exact ⟨a,by simp [ha],hna⟩))) + (fun c hc => hnd c (by simp [hc])) (fun c hc' => hc c (by simp [hc'])) + simp only [List.flatten_cons, List.countP_append, List.map_cons, List.length_append, + List.sum_append] + omega + have hh' := hh P.chains D hD hC1 (fun a ha => hAs a (hperm.mem_iff.mp ha)) + (List.nodup_flatten.mp P.nodup).1 (fun c hc => P.closed_chain hc) + simpa only [P.clique_count, hs, PathSystem.chosen] using hh' + + theorem OutsidePath.symm {V : Type*} {G : SimpleGraph V} {X : Set V} {x y : V} {d : ℕ} + (h : OutsidePath G X x y d) : OutsidePath G X y x d := by + obtain ⟨hx,hy,hxy,p,hp,hl,hs⟩ := h + refine ⟨hy,hx,Ne.symm hxy,p.reverse,hp.reverse,by simpa using hl,?_⟩ + intro v hv hvX + exact (hs v (by simpa using hv) hvX).symm + +namespace LargeSystem +variable {V : Type*} [Fintype V] {G : SimpleGraph V} {Q : Set V} {k : ℕ} + {P : PathSystem G Q} (H : LargeSystem G Q k P) +include H + + theorem exclude_two_full (hL : P.amount + Q.ncard = k) + (hA : ∃ A, AmountProfile P A ∧ ∀ a ∈ A, 2 ≤ a) (hM : P.missing = ∅) : False := by + classical + have hv : P.incident = Q.ncard := by + have hh := P.incident_add_missing + simpa only [hM, Set.ncard_empty, Nat.add_zero] using hh + have hm : 2 * P.edgeCount ≤ P.amount := by + obtain ⟨A,hA,ha⟩ := hA + have hh := list_sum_lower A 2 ha + simpa only [hA.count.1, hA.count.2.1] using hh + have hk2 : 2 * Q.ncard ≤ k := by have := P.incident_le_twice_edgeCount; omega + let F := P.chosen.toFinset + have hmem : ∀ x ∈ F, ∃ c ∈ P.chains, x ∈ chosenChain Q c := by + intro x hx + obtain ⟨l,hl,hx⟩ := List.mem_flatten.mp (List.mem_toFinset.mp hx) + obtain ⟨c,hc,rfl⟩ := List.mem_map.mp hl + exact ⟨c,hc,hx⟩ + have hFX : ∀ x ∈ F, x ∈ P.vertices := by + intro x hx + exact P.chosen_sublist.subset (List.mem_toFinset.mp hx) + have hno : ∀ x ∈ F, ∀ y ∈ F, x ≠ y → ∀ d, 1 ≤ d → d ≤ 6 → + ¬ OutsidePath G P.vertices x y d := by + intro x hx y hy hxy d hd hd6 hp + obtain ⟨c,hc,hxc⟩ := hmem x hx + obtain ⟨c',hc',hyc⟩ := hmem y hy + have hxQ := (P.chosen_rep hc hxc).1 + rcases P.chosen_pair hc hc' hxc hyc hxy with ⟨f,hxr,hyr⟩ | ⟨u,v,he⟩ | ⟨u,v,he⟩ + · exact (H.orient f).no_short_interior hxr hyr hxQ d hd hd6 (by simpa using hp) + · exact H.no_short_step hc [u] [v] (by simpa using he) d hd hd6 hp + · exact H.no_short_step hc [u] [v] (by simpa using he) d hd hd6 hp.symm + have hw : ∀ x ∈ F, 3 ≤ independence G (outsideBall G P.vertices x 2) := by + intro x hx + obtain ⟨c,hc,hxc⟩ := hmem x hx + obtain ⟨_,f,hxr⟩ := P.chosen_rep hc hxc + simpa using (H.orient f).second_triple hk2 hxr + have hpack := packing_balls F (fun _ => 2) (fun _ => 3) hFX + (fun x hx y hy hxy d hd hd6 => hno x hx y hy hxy d hd (by omega)) hw + have hc : F.card = P.chosen.length := List.toFinset_card_of_nodup (P.chosen_sublist.nodup P.nodup) + have hp : 3 * P.chosen.length ≤ k := by + simpa only [Finset.sum_const, smul_eq_mul, hc, Nat.mul_comm] using hpack.trans H.independent + have hn := P.chosen_count hM hA + have ht := H.nine + have hk := H.k_le + omega + + theorem contradiction : False := by + obtain ⟨x,hx,y,hy,d,hd,hd6,hp⟩ := H.short + obtain ⟨hL,hA,hc⟩ := H.parameter hx hy (by omega) hd6 hp + rcases hc with ⟨rfl,hv,_⟩ | ⟨rfl,hv,_⟩ | ⟨rfl,ht,hk,he,hv,_⟩ + · by_cases hM : P.missing.Nonempty + · exact H.exclude_two_missing hL hA hv hM + · exact H.exclude_two_full hL hA (Set.not_nonempty_iff_eq_empty.mp hM) + · exact H.exclude_three hL hA hv + · exact H.exclude_five ht hk hv + +end LargeSystem + +end CycleClique + +namespace CycleClique +open scoped SimpleGraph + + + +structure FiniteHyp {V : Type*} [Fintype V] (G : SimpleGraph V) (k t : ℕ) : Prop where + hk : 5 ≤ k + ht : 3 ≤ t + htk : t ≤ k + hcycle : ¬ SimpleGraph.cycleGraph (k + 1) ⊑ G + hclique : G.cliqueNum ≤ t + hα : G.indepNum ≤ k + hexp : ∀ I : Set V, G.IsIndepSet I → I.Nonempty → + k * I.ncard + 1 ≤ (closedNeighborhood G I).ncard + +namespace FiniteHyp +variable {V : Type*} [Fintype V] {G : SimpleGraph V} {k t : ℕ} (H : FiniteHyp G k t) +include H + +theorem degree (x : V) : k + 1 ≤ (closedNeighborhood G {x}).ncard := by + simpa using H.hexp {x} (by intro a ha b hb hab; simp_all) (Set.singleton_nonempty x) + +theorem ball_zero_size {X Z : Set V} {x : V} (hx : x ∈ X) (hZ : Z ⊆ X) + (hxZ : x ∉ Z) (hmiss : ∀ z ∈ Z, ¬ G.Adj x z) : + k + 1 + Z.ncard ≤ X.ncard + (outsideBall G X x 0).ncard := by + have hs : closedNeighborhood G {x} ⊆ outsideBall G X x 0 ∪ (X \ Z) := by + rintro v (hv | ⟨u, hu, huv⟩) + · have he : v = x := hv + subst v + exact Or.inr ⟨hx, hxZ⟩ + · have he : u = x := hu + subst u + by_cases hvX : v ∈ X + · exact Or.inr ⟨hvX, fun hvZ => hmiss v hvZ huv⟩ + · exact Or.inl ⟨huv, hvX⟩ + have hc := Set.ncard_le_ncard hs + have hu := Set.ncard_union_le (outsideBall G X x 0) (X \ Z) + have hd := Set.ncard_sdiff_add_ncard_of_subset hZ + have hh := H.degree x + omega + +theorem ball_zero_pair {X : Set V} {x : V} (hx : x ∈ X) + (hb : t ≤ (outsideBall G X x 0).ncard) : + 2 ≤ independence G (outsideBall G X x 0) := by + by_contra hn + have hC := clique_of_independence_le_one (G := G) (S := outsideBall G X x 0) (by omega) + have hCx : G.IsClique (insert x (outsideBall G X x 0)) := by + intro u hu v hv huv + rcases hu with rfl | hu <;> rcases hv with rfl | hv + · exact (huv rfl).elim + · exact hv.1 + · exact hu.1.symm + · exact hC hu hv huv + have hc := (clique_ncard_le_cliqueNum hCx).trans H.hclique + rw [Set.ncard_insert_of_notMem (show x ∉ outsideBall G X x 0 from + fun hh => hh.2 hx)] at hc + omega + +theorem ball_step_size {X Z : Set V} {x : V} {r u : ℕ} + (hu : 1 ≤ u) (hweight : u ≤ independence G (outsideBall G X x r)) + (hZ : Z ⊆ X) (hmiss : ∀ v ∈ outsideBall G X x r, ∀ z ∈ Z, ¬ G.Adj v z) : + k * u + 1 + Z.ncard ≤ X.ncard + (outsideBall G X x (r + 1)).ncard := by + obtain ⟨I, hIs, hI, hIc⟩ := exists_indep_of_independence G (outsideBall G X x r) + have hIn : I.Nonempty := (Set.ncard_pos).mp (by omega) + have he := H.hexp I hI hIn + have hb := outside_neighborhood_bound hIs hZ (fun v hv => hmiss v (hIs hv)) + have hm := Nat.mul_le_mul_left k (show u ≤ I.ncard by omega) + omega + +theorem ball_pair {X : Set V} {x : V} {r : ℕ} + (hb : t < (outsideBall G X x r).ncard) : + 2 ≤ independence G (outsideBall G X x r) := by + by_contra hn + have hc := (clique_ncard_le_cliqueNum (clique_of_independence_le_one + (G := G) (S := outsideBall G X x r) (by omega))).trans H.hclique + omega + +theorem ball_triple {X : Set V} {x : V} {r : ℕ} + (hb : max k (2 * t) < (outsideBall G X x r).ncard) : + 3 ≤ independence G (outsideBall G X x r) := + size_test H.hk (by have := H.ht; omega) H.hcycle H.hclique _ hb + + +theorem ball_stagnation {X Z : Set V} {x : V} {r : ℕ} + (hx : x ∈ X) (hZ : Z ⊆ X) (hxZ : x ∉ Z) + (hb : t ≤ (outsideBall G X x r).ncard) + (hnum : X.ncard + t ≤ k + 1 + Z.ncard) + (hmiss : ∀ v ∈ outsideBall G X x r, ∀ z ∈ Z, ¬ G.Adj v z) : + 2 ≤ independence G (outsideBall G X x (r + 1)) := by + by_contra hn + have hC := clique_of_independence_le_one + (G := G) (S := outsideBall G X x (r + 1)) (by omega) + have hc := (clique_ncard_le_cliqueNum hC).trans H.hclique + have hsub := outsideBall_subset_succ G X x r + have hadj : ∀ v ∈ outsideBall G X x r, G.Adj x v := by + intro v hv + by_contra hneg + have hZX : insert x Z ⊆ X := Set.insert_subset hx hZ + have hm : ∀ u ∈ ({v} : Set V), ∀ z ∈ insert x Z, ¬ G.Adj u z := by + intro u hu z hz huz + have he : u = v := hu + subst u + rcases hz with rfl | hz + · exact hneg huz.symm + · exact hmiss v hv z hz huz + have hh := outside_neighborhood_bound (Set.singleton_subset_iff.mpr hv) hZX hm + rw [Set.ncard_insert_of_notMem hxZ] at hh + have hd := H.degree v + change (closedNeighborhood G {v}).ncard + (Z.ncard + 1) ≤ + X.ncard + (outsideBall G X x (r + 1)).ncard at hh + omega + have hbig : G.IsClique (insert x (outsideBall G X x r)) := by + intro u hu v hv huv + rcases hu with rfl | hu <;> rcases hv with rfl | hv + · exact (huv rfl).elim + · exact hadj v hv + · exact (hadj u hu).symm + · exact hC (hsub hu) (hsub hv) huv + have hbigc := (clique_ncard_le_cliqueNum hbig).trans H.hclique + rw [Set.ncard_insert_of_notMem (show x ∉ outsideBall G X x r from + fun hh => outsideBall_subset_compl G X x r hh hx)] at hbigc + omega + +end FiniteHyp + + +def labelAdj (E : List (ℕ × ℕ)) (a b : ℕ) : Prop := (a,b) ∈ E ∨ (b,a) ∈ E +instance (E : List (ℕ × ℕ)) (a b : ℕ) : Decidable (labelAdj E a b) := by + unfold labelAdj + infer_instance + + +def LabelValid (n : ℕ) (q : Finset ℕ) (E : List (ℕ × ℕ)) (C : List (List ℕ)) : Prop := + C.flatten.Nodup ∧ (∀ i ∈ C.flatten, i < n) ∧ + (∀ c ∈ C, c ≠ [] ∧ c.IsChain (labelAdj E) ∧ + c.IsChain (fun a b => a ∉ q ∨ b ∉ q) ∧ + (∀ x ∈ c.head?, x ∈ q) ∧ (∀ x ∈ c.getLast?, x ∈ q)) ∧ + ∀ i ∈ q, i ∈ C.flatten + +instance (n : ℕ) (q : Finset ℕ) (E : List (ℕ × ℕ)) (C : List (List ℕ)) : + Decidable (LabelValid n q E C) := by + unfold LabelValid + infer_instance + +structure LabelState {V : Type*} (G : SimpleGraph V) (Q : Set V) + (n : ℕ) (q : Finset ℕ) (E : List (ℕ × ℕ)) where + f : ℕ → V + inj : Set.InjOn f (Set.Iio n) + qb : ∀ i ∈ q, i < n + qimage : Q = f '' (↑q : Set ℕ) + eb : ∀ a b, (a,b) ∈ E → a < n ∧ b < n + edges : ∀ a b, labelAdj E a b → G.Adj (f a) (f b) + +namespace LabelState +variable {V : Type*} {G : SimpleGraph V} {Q : Set V} + {n : ℕ} {q : Finset ℕ} {E : List (ℕ × ℕ)} (S : LabelState G Q n q E) + +def vertices : Set V := S.f '' Set.Iio n + +theorem mem_vertices {i : ℕ} (hi : i < n) : S.f i ∈ S.vertices := ⟨i, hi, rfl⟩ + +theorem card_vertices : S.vertices.ncard = n := by + rw [vertices, Set.InjOn.ncard_image S.inj, Set.ncard_Iio_nat] + +include S in +theorem card_clique : Q.ncard = q.card := by + rw [S.qimage, Set.InjOn.ncard_image (S.inj.mono S.qb), Set.ncard_coe_finset] + +theorem mem_clique {i : ℕ} (hi : i < n) : S.f i ∈ Q ↔ i ∈ q := by + constructor + · intro hx + have him : S.f i ∈ S.f '' (↑q : Set ℕ) := S.qimage ▸ hx + obtain ⟨j, hj, he⟩ := him + have hji := S.inj (S.qb j hj) hi he + simpa only [hji, Finset.mem_coe] using hj + · intro h + exact Eq.mp (congrArg (fun A : Set V => S.f i ∈ A) S.qimage.symm) + (show S.f i ∈ S.f '' (↑q : Set ℕ) from ⟨i, h, rfl⟩) + +noncomputable def system {C : List (List ℕ)} (h : LabelValid n q E C) : PathSystem G Q := by + classical + refine { + chains := C.map (List.map S.f) + nonempty := ?_ + nodup := ?_ + edges := ?_ + positive := ?_ + ends := ?_ + cover := ?_ } + · intro c hc + obtain ⟨a, ha, rfl⟩ := List.mem_map.mp hc + simpa using (h.2.2.1 a ha).1 + · rw [← List.map_flatten] + exact h.1.map_on (fun a ha b hb he => S.inj (h.2.1 a ha) (h.2.1 b hb) he) + · intro c hc + obtain ⟨a, ha, rfl⟩ := List.mem_map.mp hc + apply (List.isChain_map S.f).mpr + exact (h.2.2.1 a ha).2.1.imp (fun {u v} huv => S.edges u v huv) + · intro c hc + obtain ⟨a, ha, rfl⟩ := List.mem_map.mp hc + apply (List.isChain_map S.f).mpr + apply (h.2.2.1 a ha).2.2.1.imp_of_mem_imp + intro u v hu hv huv + have hub := h.2.1 u (List.mem_flatten.mpr ⟨a, ha, hu⟩) + have hvb := h.2.1 v (List.mem_flatten.mpr ⟨a, ha, hv⟩) + simpa only [S.mem_clique hub, S.mem_clique hvb] using huv + · intro c hc + obtain ⟨a, ha, rfl⟩ := List.mem_map.mp hc + constructor + · intro x hx + simp only [List.head?_map, Option.mem_map] at hx + obtain ⟨i, hi, rfl⟩ := hx + exact (S.mem_clique (S.qb i ((h.2.2.1 a ha).2.2.2.1 i hi))).mpr + ((h.2.2.1 a ha).2.2.2.1 i hi) + · intro x hx + simp only [List.getLast?_map, Option.mem_map] at hx + obtain ⟨i, hi, rfl⟩ := hx + exact (S.mem_clique (S.qb i ((h.2.2.1 a ha).2.2.2.2 i hi))).mpr + ((h.2.2.1 a ha).2.2.2.2 i hi) + · intro x hx + rw [S.qimage] at hx + obtain ⟨i, hi, rfl⟩ := hx + rw [← List.map_flatten] + exact List.mem_map.mpr ⟨i, h.2.2.2 i hi, rfl⟩ + +@[simp] theorem system_chains {C : List (List ℕ)} (h : LabelValid n q E C) : + (S.system h).chains = C.map (List.map S.f) := rfl + +theorem system_amount [Fintype V] {C : List (List ℕ)} (h : LabelValid n q E C) : + (S.system h).amount = C.flatten.length - q.card := by + simp only [PathSystem.amount, S.system_chains, ← List.map_flatten, List.length_map, S.card_clique] + +theorem system_edges [Fintype V] {C : List (List ℕ)} (h : LabelValid n q E C) : + (S.system h).edgeCount = q.card - C.length := by + simp only [PathSystem.edgeCount, S.system_chains, List.length_map, S.card_clique] + +theorem system_incident [Fintype V] {C : List (List ℕ)} (h : LabelValid n q E C) : + (S.system h).incident = q.card - (C.filter (fun c => c.length = 1)).length := by + classical + simp only [PathSystem.incident, PathSystem.singletons, S.system_chains, List.filter_map, + Function.comp_def, List.length_map, S.card_clique] + +end LabelState + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/FiniteRange.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/FiniteRange.lean new file mode 100644 index 0000000000000000000000000000000000000000..01295342c074fb947fe1e4f9da65e4ae9083b8b4 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/FiniteRange.lean @@ -0,0 +1,226 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.DenseCycles +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.FrameProperties +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.LowerBound +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.Minimality +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction +import OAI.Combinatorics.Ramsey.CycleClique.Patterns10x5 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns10x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns10x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns10x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns11x5 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns11x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns11x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns11x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns12x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns12x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns12x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns13x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns13x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns13x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns14x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns14x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns15x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns15x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns16x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns17x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns5x3 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns5x4 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns5x5 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns6x3 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns6x4 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns6x5 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns6x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns7x3 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns7x4 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns7x5 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns7x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns7x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns8x4 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns8x5 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns8x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns8x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns8x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns9x4 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns9x5 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns9x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns9x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns9x8 +import OAI.Combinatorics.Ramsey.CycleClique.StructuralReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +open scoped SimpleGraph + + +theorem finite_range_verified {k t : ℕ} (hk : 5 ≤ k) (ht : 3 ≤ t) + (htk : t ≤ k) (ht8 : t ≤ 8) (hhalf : k/2 ≤ t) : + ∀ D ∈ patternChoices t (k-t) [], PatternVerified k t D := by + have hk17 : k ≤ 17 := by omega + interval_cases k + · have htmin : 3 ≤ t := by omega + have htmax : t ≤ 5 := by omega + interval_cases t + · exact finite_patterns_5_3 + · exact finite_patterns_5_4 + · exact finite_patterns_5_5 + · have htmin : 3 ≤ t := by omega + have htmax : t ≤ 6 := by omega + interval_cases t + · exact finite_patterns_6_3 + · exact finite_patterns_6_4 + · exact finite_patterns_6_5 + · exact finite_patterns_6_6 + · have htmin : 3 ≤ t := by omega + have htmax : t ≤ 7 := by omega + interval_cases t + · exact finite_patterns_7_3 + · exact finite_patterns_7_4 + · exact finite_patterns_7_5 + · exact finite_patterns_7_6 + · exact finite_patterns_7_7 + · have htmin : 4 ≤ t := by omega + have htmax : t ≤ 8 := by omega + interval_cases t + · exact finite_patterns_8_4 + · exact finite_patterns_8_5 + · exact finite_patterns_8_6 + · exact finite_patterns_8_7 + · exact finite_patterns_8_8 + · have htmin : 4 ≤ t := by omega + have htmax : t ≤ 8 := by omega + interval_cases t + · exact finite_patterns_9_4 + · exact finite_patterns_9_5 + · exact finite_patterns_9_6 + · exact finite_patterns_9_7 + · exact finite_patterns_9_8 + · have htmin : 5 ≤ t := by omega + have htmax : t ≤ 8 := by omega + interval_cases t + · exact finite_patterns_10_5 + · exact finite_patterns_10_6 + · exact finite_patterns_10_7 + · exact finite_patterns_10_8 + · have htmin : 5 ≤ t := by omega + have htmax : t ≤ 8 := by omega + interval_cases t + · exact finite_patterns_11_5 + · exact finite_patterns_11_6 + · exact finite_patterns_11_7 + · exact finite_patterns_11_8 + · have htmin : 6 ≤ t := by omega + have htmax : t ≤ 8 := by omega + interval_cases t + · exact finite_patterns_12_6 + · exact finite_patterns_12_7 + · exact finite_patterns_12_8 + · have htmin : 6 ≤ t := by omega + have htmax : t ≤ 8 := by omega + interval_cases t + · exact finite_patterns_13_6 + · exact finite_patterns_13_7 + · exact finite_patterns_13_8 + · have htmin : 7 ≤ t := by omega + have htmax : t ≤ 8 := by omega + interval_cases t + · exact finite_patterns_14_7 + · exact finite_patterns_14_8 + · have htmin : 7 ≤ t := by omega + have htmax : t ≤ 8 := by omega + interval_cases t + · exact finite_patterns_15_7 + · exact finite_patterns_15_8 + · have htmin : 8 ≤ t := by omega + have htmax : t ≤ 8 := by omega + interval_cases t + · exact finite_patterns_16_8 + · have htmin : 8 ≤ t := by omega + have htmax : t ≤ 8 := by omega + interval_cases t + · exact finite_patterns_17_8 + + + +theorem finite_verification {V : Type*} [Fintype V] {G : SimpleGraph V} + {k t : ℕ} (hk : 5 ≤ k) (_ : k ≤ 17) + (hl : max 3 (k/2) ≤ t) (hu : t ≤ min 8 k) + (hcycle : ¬ SimpleGraph.cycleGraph (k+1) ⊑ G) (hclique : G.cliqueNum = t) + (hα : G.indepNum ≤ k) + (hexp : ∀ I, G.IsIndepSet I → I.Nonempty → + k*I.ncard+1 ≤ (closedNeighborhood G I).ncard) : False := by + classical + obtain ⟨Q,hQ⟩ := G.exists_isNClique_cliqueNum + have hc : (Q : Set V).ncard = t := by + rw [Set.ncard_coe_finset,hQ.card_eq,hclique] + have ht : 3 ≤ t := (le_max_left _ _).trans hl + have ht8 : t ≤ 8 := hu.trans (min_le_left _ _) + have htk : t ≤ k := hu.trans (min_le_right _ _) + have hhalf : k/2 ≤ t := (le_max_right _ _).trans hl + have H : FiniteHyp G k t := ⟨hk,ht,htk,hcycle,le_of_eq hclique,hα,hexp⟩ + exact finite_verified_of_patterns H hQ.isClique hc + (finite_range_verified hk ht htk ht8 hhalf) + + + +theorem reduced_counterexample_impossible {V : Type*} [Fintype V] {G : SimpleGraph V} + {k a : ℕ} (hk : 3 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) + (horder : Fintype.card V = k*a+1) (hα : G.indepNum ≤ a) + (hcycle : ¬ SimpleGraph.cycleGraph (k+1) ⊑ G) + (hexp : ∀ I, G.IsIndepSet I → I.Nonempty → + k*I.ncard+1 ≤ (closedNeighborhood G I).ncard) : False := by + classical + by_cases hsmall : k ≤ 4 + · exact reduced_small_impossible hk hsmall ha hak horder hα hcycle hexp + by_cases hnine : 9 ≤ G.cliqueNum + · exact reduced_large_impossible hk ha hak horder hα hcycle hexp hnine + obtain ⟨hl,hu⟩ := counterexample_clique_bound hk ha hak horder hα hcycle hexp + exact finite_verification (by omega) (by omega) hl (by omega) hcycle rfl + (hα.trans hak) hexp + + +theorem ramsey_upper {k a₀ : ℕ} (hk : 3 ≤ k) (ha₀ : 2 ≤ a₀) (ha₀k : a₀ ≤ k) : + RamseyProperty (k+1) (a₀+1) (k*a₀+1) := by + by_contra hfailure + obtain ⟨a,ha,hak,G,hcycle,hα,hexp⟩ := minimal_expanding_counterexample ha₀ ha₀k hfailure + exact reduced_counterexample_impossible hk ha hak (Fintype.card_fin _) hα hcycle hexp + + + +theorem main (m n : ℕ) (hmn : n ≤ m) (hn : 3 ≤ n) + (hne : (m, n) ≠ (3, 3)) : + cycleCliqueRamsey m n = (m - 1) * (n - 1) + 1 := by + have hm : 4 ≤ m := by + by_contra hh + have hm3 : m=3 := by omega + have hn3 : n=3 := by omega + exact hne (by simp [hm3,hn3]) + have hupper : RamseyProperty m n ((m-1)*(n-1)+1) := by + simpa only [Nat.sub_add_cancel (show 1 ≤ m by omega), + Nat.sub_add_cancel (show 1 ≤ n by omega)] using + (ramsey_upper (k:=m-1) (a₀:=n-1) (by omega) (by omega) (by omega)) + apply le_antisymm + · exact Nat.sInf_le hupper + · have hmem : RamseyProperty m n (cycleCliqueRamsey m n) := + Nat.sInf_mem (s:={N | RamseyProperty m n N}) ⟨(m-1)*(n-1)+1,hupper⟩ + exact ramsey_property_lower_bound (by omega) (by omega) hmem + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/FourCycles.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/FourCycles.lean new file mode 100644 index 0000000000000000000000000000000000000000..e35cf4a94e0aaec08362a868b2fa5e1e648ed322 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/FourCycles.lean @@ -0,0 +1,394 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorFrames +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.FrameProperties +import OAI.Combinatorics.Ramsey.CycleClique.Independence +import OAI.Combinatorics.Ramsey.CycleClique.IndependenceTwo +import OAI.Combinatorics.Ramsey.CycleClique.InducedGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +namespace FourHyp +variable {V : Type*} [Fintype V] {G : SimpleGraph V} (H : FourHyp G) +include H + +theorem U_two (T : Frame G 3) (i : Fin 3) : 2 ≤ (T.U i).ncard := by + have := T.U_degree H.expansion i + omega + +theorem U_nonempty (T : Frame G 3) (i : Fin 3) : (T.U i).Nonempty := + (Set.ncard_pos).mp (lt_of_lt_of_le (by omega : 0<2) (H.U_two T i)) + +theorem disjoint_triangle (T : Frame G 3) + (hdis : Pairwise (fun i j => Disjoint (T.U i) (T.U j))) : + ∀ i, (T.U i).ncard=2 ∧ G.IsClique (T.U i) := by + have hc := T.disjoint_U_closed H.cycle hdis + have hb := extClosed_sum_bound T.U hc + rw [T.cardQ,Fin.sum_univ_three] at hb + have he := fun i => T.disjoint_U_expansion H.expansion hdis i (H.U_nonempty T i) + have hi := fun i => independence_pos (G:=G) (H.U_nonempty T i) + have he0 := he 0 + have he1 := he 1 + have he2 := he 2 + have hi0 := hi 0 + have hi1 := hi 1 + have hi2 := hi 2 + have ho := H.order + intro i + have hai : independence G (T.U i) ≤ 1 := by + fin_cases i <;> dsimp at * <;> omega + have hcli := clique_of_independence_le_one hai + have hcu := T.clique_U_bound H.clique i hcli + have hlo := H.U_two T i + exact ⟨by omega,hcli⟩ + + +theorem exists_overlap (T : Frame G 3) : + ∃ S : Frame G 3, ∃ i j : Fin 3, i ≠ j ∧ (S.U i ∩ S.U j).Nonempty := by + classical + by_contra hn + have hall : ∀ S : Frame G 3, Pairwise (fun i j => Disjoint (S.U i) (S.U j)) := by + intro S i j hij + apply Set.disjoint_left.mpr + intro u hui huj + exact hn ⟨S,i,j,hij,u,hui,huj⟩ + have hT := H.disjoint_triangle T (hall T) + have hsix : ∀ i, 6 ≤ (extClosed G T.Q (T.U i)).ncard := by + intro i + obtain ⟨u,v,huv,hUi⟩ := Set.ncard_eq_two.mp (hT i).1 + have hu : u ∈ T.U i := by rw [hUi]; simp + have hv : v ∈ T.U i := by rw [hUi]; simp + let W := Frame.triangle hu.1 ((hT i).2 hu hv huv) hv.1.symm + have hW1 := H.U_two W 1 + have hW2 := H.U_two W 2 + have hdis12 : Disjoint (W.U 1) (W.U 2) := hall W (by decide) + have hdisU : Disjoint (T.U i) (W.U 1 ∪ W.U 2) := by + apply Set.disjoint_left.mpr + intro x hx hxW + have hxQ : x ∈ W.Q := by + rw [Frame.triangle_Q] + rw [hUi] at hx + simp only [Set.mem_insert_iff,Set.mem_singleton_iff] at hx ⊢ + tauto + rcases hxW with hxW | hxW <;> exact hxW.2 hxQ + have hsub : T.U i ∪ (W.U 1 ∪ W.U 2) ⊆ extClosed G T.Q (T.U i) := by + intro x hx + rcases hx with hx | hx + · exact ⟨Or.inl hx,hx.2⟩ + have hw : ∃ y ∈ T.U i, G.Adj y x ∧ x ∉ W.Q := by + rcases hx with hx | hx + · exact ⟨u,hu,hx.1,hx.2⟩ + · exact ⟨v,hv,hx.1,hx.2⟩ + obtain ⟨y,hy,hyx,hnW⟩ := hw + refine ⟨Or.inr ⟨y,hy,hyx⟩,?_⟩ + intro hxQ + have he : x=T.q i := T.boundary_U (hall T) i hy hxQ hyx + subst x + exact hnW (W.memQ 0) + have hb := Set.ncard_le_ncard hsub + rw [Set.ncard_union_eq hdisU,Set.ncard_union_eq hdis12,(hT i).1] at hb + omega + have hb := extClosed_sum_bound T.U (T.disjoint_U_closed H.cycle (hall T)) + rw [T.cardQ,Fin.sum_univ_three] at hb + have h0 := hsix 0 + have h1 := hsix 1 + have h2 := hsix 2 + have ho := H.order + omega + + +theorem closed_disjoint_of_U (T : Frame G 3) {A B : Set V} {i j : Fin 3} + (hij : i ≠ j) (hA : A ⊆ T.U i) (hB : B ⊆ T.U j) (hdis : Disjoint A B) : + Disjoint (extClosed G T.Q A) (extClosed G T.Q B) := by + apply extClosed_disjoint T.clique (by rw [T.cardQ]) (by rw [T.cardQ]; omega) H.cycle + (fun _ hu => (hA hu).2) (fun _ hv => (hB hv).2) hdis + intro u hu v hv + exact ⟨T.q i,T.memQ i,T.q j,T.memQ j, + fun he => hij (T.q.injective he),(hA hu).1,(hB hv).1⟩ + +theorem no_exterior_adj (T : Frame G 3) {u v : V} {i j : Fin 3} + (hij : i ≠ j) (hu : u ∈ T.U i) (hv : v ∈ T.U j) (huv : u ≠ v) : + ¬ G.Adj u v := by + have hd := H.closed_disjoint_of_U T hij (A:={u}) (B:={v}) + (by simpa) (by simpa) (by simp [huv]) + intro he + exact Set.disjoint_left.mp hd (show v ∈ extClosed G T.Q {u} from + ⟨Or.inr ⟨u,rfl,he⟩,hv.2⟩) ⟨Or.inl rfl,hv.2⟩ + +theorem no_triple (T : Frame G 3) {u : V} + (h0 : u ∈ T.U 0) (h1 : u ∈ T.U 1) : u ∉ T.U 2 := by + intro h2 + have hc : G.IsClique (insert u T.Q) := by + have ha : ∀ x ∈ T.Q, G.Adj u x := by + rintro x ⟨i,rfl⟩ + fin_cases i + · exact h0.1.symm + · exact h1.1.symm + · exact h2.1.symm + intro x hx y hy hxy + rcases hx with rfl | hx <;> rcases hy with rfl | hy + · exact (hxy rfl).elim + · exact ha y hy + · exact (ha x hx).symm + · exact T.clique hx hy hxy + have hb := (clique_ncard_le_cliqueNum hc).trans H.clique + rw [Set.ncard_insert_of_notMem h0.2,T.cardQ] at hb + omega + + +theorem overlap_cycle (T : Frame G 3) {i j l : Fin 3} + (hij : i ≠ j) (hil : i ≠ l) (hjl : j ≠ l) {u v : V} + (hu : u ∈ T.U i ∩ T.U j) (hv : v ∈ T.U i ∩ T.U l) (huv : u ≠ v) : False := by + have hnu := T.neQ hu.1.2 + have hnv := T.neQ hv.1.2 + apply H.cycle + apply cycle_of_list [T.q j,u,T.q i,v,T.q l] (by simp) + · simp [T.q.injective.eq_iff,hil,hjl,Ne.symm hij,hnu,hnv, + Ne.symm (hnu j),Ne.symm (hnv j),Ne.symm (hnv i),huv] + · simpa using And.intro hu.2.1 (And.intro hu.1.1.symm + (And.intro hv.1.1 hv.2.1.symm)) + · simpa using T.adj l j hjl.symm + + +theorem overlap_disjoint_third (T : Frame G 3) (hne : (T.U 0 ∩ T.U 1).Nonempty) : + Disjoint (T.U 0) (T.U 2) ∧ Disjoint (T.U 1) (T.U 2) := by + obtain ⟨u,hu0,hu1⟩ := hne + constructor + · apply Set.disjoint_left.mpr + intro v hv0 hv2 + have huv : u ≠ v := fun he => H.no_triple T hu0 hu1 (he ▸ hv2) + exact H.overlap_cycle T (by decide : (0:Fin 3)≠1) (by decide) (by decide) + ⟨hu0,hu1⟩ ⟨hv0,hv2⟩ huv + · apply Set.disjoint_left.mpr + intro v hv1 hv2 + have huv : u ≠ v := fun he => H.no_triple T hu0 hu1 (he ▸ hv2) + exact H.overlap_cycle T (by decide : (1:Fin 3)≠0) (by decide) (by decide) + ⟨hu1,hu0⟩ ⟨hv1,hv2⟩ huv + +theorem overlap_independent (T : Frame G 3) : G.IsIndepSet (T.U 0 ∩ T.U 1) := by + intro u hu v hv huv + exact H.no_exterior_adj T (by decide : (0:Fin 3)≠1) hu.1 hv.2 huv + +def overlapClasses (T : Frame G 3) : Fin 4 → Set V := + ![T.U 0 ∩ T.U 1,T.U 0 \ T.U 1,T.U 1 \ T.U 0,T.U 2] + +theorem overlap_closed_pairwise (T : Frame G 3) (hne : (T.U 0 ∩ T.U 1).Nonempty) : + Pairwise (fun i j => Disjoint (extClosed G T.Q (overlapClasses T i)) + (extClosed G T.Q (overlapClasses T j))) := by + have hd := H.overlap_disjoint_third T hne + have h01 := H.closed_disjoint_of_U T (by decide : (1:Fin 3)≠0) + (A:=T.U 0 ∩ T.U 1) (B:=T.U 0 \ T.U 1) Set.inter_subset_right Set.sdiff_subset + (Set.disjoint_left.mpr (by intro u hu hv; exact hv.2 hu.2)) + have h02 := H.closed_disjoint_of_U T (by decide : (0:Fin 3)≠1) + (A:=T.U 0 ∩ T.U 1) (B:=T.U 1 \ T.U 0) Set.inter_subset_left Set.sdiff_subset + (Set.disjoint_left.mpr (by intro u hu hv; exact hv.2 hu.1)) + have h03 := H.closed_disjoint_of_U T (by decide : (0:Fin 3)≠2) + (A:=T.U 0 ∩ T.U 1) (B:=T.U 2) Set.inter_subset_left (Set.Subset.refl _) + (hd.1.mono_left Set.inter_subset_left) + have h12 := H.closed_disjoint_of_U T (by decide : (0:Fin 3)≠1) + (A:=T.U 0 \ T.U 1) (B:=T.U 1 \ T.U 0) Set.sdiff_subset Set.sdiff_subset + (Set.disjoint_left.mpr (by intro u hu hv; exact hu.2 hv.1)) + have h13 := H.closed_disjoint_of_U T (by decide : (0:Fin 3)≠2) + (A:=T.U 0 \ T.U 1) (B:=T.U 2) Set.sdiff_subset (Set.Subset.refl _) + (hd.1.mono_left Set.sdiff_subset) + have h23 := H.closed_disjoint_of_U T (by decide : (1:Fin 3)≠2) + (A:=T.U 1 \ T.U 0) (B:=T.U 2) Set.sdiff_subset (Set.Subset.refl _) + (hd.2.mono_left Set.sdiff_subset) + intro i j hij + fin_cases i <;> fin_cases j <;> simp only [overlapClasses] <;> + first | exact (hij rfl).elim | assumption | exact h01.symm | exact h02.symm | + exact h03.symm | exact h12.symm | exact h13.symm | exact h23.symm + + +theorem overlap_structure (T : Frame G 3) (hne : (T.U 0 ∩ T.U 1).Nonempty) : + T.U 0 = T.U 1 ∧ (T.U 0).ncard=2 ∧ G.IsIndepSet (T.U 0) ∧ + (T.U 2).ncard=2 ∧ G.IsClique (T.U 2) := by + have hd := H.overlap_disjoint_third T hne + have hI := H.overlap_independent T + have hbI : ∀ u ∈ T.U 0 ∩ T.U 1, ∀ x ∈ T.Q, G.Adj u x → + x ∈ ({T.q 0,T.q 1} : Set V) := by + rintro u hu x ⟨i,rfl⟩ hux + fin_cases i + · simp + · simp + · exact (H.no_triple T hu.1 hu.2 ⟨hux.symm,hu.1.2⟩).elim + have hbA : ∀ u ∈ T.U 0 \ T.U 1, ∀ x ∈ T.Q, G.Adj u x → + x ∈ ({T.q 0} : Set V) := by + rintro u hu x ⟨i,rfl⟩ hux + fin_cases i + · rfl + · exact (hu.2 ⟨hux.symm,hu.1.2⟩).elim + · exact (Set.disjoint_left.mp hd.1 hu.1 ⟨hux.symm,hu.1.2⟩).elim + have hbB : ∀ u ∈ T.U 1 \ T.U 0, ∀ x ∈ T.Q, G.Adj u x → + x ∈ ({T.q 1} : Set V) := by + rintro u hu x ⟨i,rfl⟩ hux + fin_cases i + · exact (hu.2 ⟨hux.symm,hu.1.2⟩).elim + · rfl + · exact (Set.disjoint_left.mp hd.2 hu.1 ⟨hux.symm,hu.1.2⟩).elim + have hbD : ∀ u ∈ T.U 2, ∀ x ∈ T.Q, G.Adj u x → + x ∈ ({T.q 2} : Set V) := by + rintro u hu x ⟨i,rfl⟩ hux + fin_cases i + · exact (Set.disjoint_left.mp hd.1 ⟨hux.symm,hu.2⟩ hu).elim + · exact (Set.disjoint_left.mp hd.2 ⟨hux.symm,hu.2⟩ hu).elim + · rfl + have heI := extClosed_indep_expansion H.expansion hI (fun _ hu => hu.1.2) hne hbI + have hcPair : ({T.q 0,T.q 1} : Set V).ncard=2 := by + simp [T.q.injective.eq_iff] + rw [hcPair] at heI + have heA : (T.U 0 \ T.U 1).Nonempty → + 4 ≤ (extClosed G T.Q (T.U 0 \ T.U 1)).ncard := by + intro hn + have hh := extClosed_expansion H.expansion (fun _ hu => hu.1.2) hn hbA + have hi := independence_pos (G:=G) hn + simp only [Set.ncard_singleton] at hh + omega + have heB : (T.U 1 \ T.U 0).Nonempty → + 4 ≤ (extClosed G T.Q (T.U 1 \ T.U 0)).ncard := by + intro hn + have hh := extClosed_expansion H.expansion (fun _ hu => hu.1.2) hn hbB + have hi := independence_pos (G:=G) hn + simp only [Set.ncard_singleton] at hh + omega + have heD := extClosed_expansion H.expansion (T.exterior 2) (H.U_nonempty T 2) hbD + simp only [Set.ncard_singleton] at heD + have hiD := independence_pos (G:=G) (H.U_nonempty T 2) + have hs := extClosed_sum_bound (overlapClasses T) (H.overlap_closed_pairwise T hne) + rw [T.cardQ,Fin.sum_univ_four] at hs + dsimp [overlapClasses] at hs + have ho := H.order + have hr := (Set.ncard_pos).mpr hne + have hU0 := H.U_two T 0 + have hU1 := H.U_two T 1 + have hr2 : (T.U 0 ∩ T.U 1).ncard=2 := by + have hrne : (T.U 0 ∩ T.U 1).ncard≠1 := by + intro he + have hA : (T.U 0 \ T.U 1).Nonempty := by + by_contra hn + have hsub : T.U 0 ⊆ T.U 0 ∩ T.U 1 := by + intro u hu + refine ⟨hu,?_⟩ + by_contra hh + exact hn ⟨u,hu,hh⟩ + have := Set.ncard_le_ncard hsub + omega + have hB : (T.U 1 \ T.U 0).Nonempty := by + by_contra hn + have hsub : T.U 1 ⊆ T.U 0 ∩ T.U 1 := by + intro u hu + refine ⟨?_,hu⟩ + by_contra hh + exact hn ⟨u,hu,hh⟩ + have := Set.ncard_le_ncard hsub + omega + have := heA hA + have := heB hB + omega + omega + have hA0 : (T.U 0 \ T.U 1)=∅ := by + apply Set.not_nonempty_iff_eq_empty.mp + intro hn + have := heA hn + omega + have hB0 : (T.U 1 \ T.U 0)=∅ := by + apply Set.not_nonempty_iff_eq_empty.mp + intro hn + have := heB hn + omega + have hEq : T.U 0=T.U 1 := Set.Subset.antisymm (Set.sdiff_eq_empty.mp hA0) + (Set.sdiff_eq_empty.mp hB0) + have hIe : T.U 0 ∩ T.U 1=T.U 0 := by rw [← hEq,Set.inter_self] + have hDcl := clique_of_independence_le_one (G:=G) (S:=T.U 2) (by omega) + have hDmax := T.clique_U_bound H.clique 2 hDcl + have hDmin := H.U_two T 2 + exact ⟨hEq,by simpa only [hIe] using hr2,by simpa only [hIe] using hI, + by omega,hDcl⟩ + + + +theorem overlap_vertex_degree (T : Frame G 3) (hne : (T.U 0 ∩ T.U 1).Nonempty) + {w : V} (hw : w ∈ T.U 0) : (extNeighbors G T.Q w).ncard ≤ 2 := by + have hs := H.overlap_structure T hne + have hw1 : w ∈ T.U 1 := hs.1 ▸ hw + let S := Frame.triangle (T.adj 0 1 (by decide)) hw1.1 hw.1.symm + have hq2 : T.q 2 ∉ S.Q := by + rw [Frame.triangle_Q] + simp [T.q.injective.eq_iff,Ne.symm (T.neQ hw.2 2)] + have hov : (S.U 0 ∩ S.U 1).Nonempty := + ⟨T.q 2,⟨T.adj 0 2 (by decide),hq2⟩,⟨T.adj 1 2 (by decide),hq2⟩⟩ + have hSc := (H.overlap_structure S hov).2.2.2.1 + have hsub : extNeighbors G T.Q w ⊆ S.U 2 := by + intro x hx + refine ⟨hx.1,?_⟩ + rw [Frame.triangle_Q] + simp only [Set.mem_insert_iff,Set.mem_singleton_iff] + rintro (rfl | rfl | rfl) + · exact hx.2 (T.memQ 0) + · exact hx.2 (T.memQ 1) + · exact hx.1.ne rfl + exact (Set.ncard_le_ncard hsub).trans_eq hSc + + +theorem overlap_contradiction (T : Frame G 3) (hne : (T.U 0 ∩ T.U 1).Nonempty) : False := by + have hs := H.overlap_structure T hne + obtain ⟨w,z,hwz,hU⟩ := Set.ncard_eq_two.mp hs.2.1 + have hw : w ∈ T.U 0 := by rw [hU]; simp + have hz : z ∈ T.U 0 := by rw [hU]; simp + have hdw := H.overlap_vertex_degree T hne hw + have hdz := H.overlap_vertex_degree T hne hz + have hsub : extClosed G T.Q (T.U 0) ⊆ + T.U 0 ∪ (extNeighbors G T.Q w ∪ extNeighbors G T.Q z) := by + intro x hx + rcases hx.1 with hxI | ⟨u,hu,hux⟩ + · exact Or.inl hxI + · rw [hU] at hu + rcases hu with rfl | rfl + · exact Or.inr (Or.inl ⟨hux,hx.2⟩) + · exact Or.inr (Or.inr ⟨hux,hx.2⟩) + have hb := (Set.ncard_le_ncard hsub).trans (Set.ncard_union_le _ _) + have hb' := Set.ncard_union_le (extNeighbors G T.Q w) (extNeighbors G T.Q z) + have hboundary : ∀ u ∈ T.U 0, ∀ x ∈ T.Q, G.Adj u x → + x ∈ ({T.q 0,T.q 1} : Set V) := by + rintro u hu x ⟨i,rfl⟩ hux + fin_cases i + · simp + · simp + · exact (H.no_triple T hu (hs.1 ▸ hu) ⟨hux.symm,hu.2⟩).elim + have he := extClosed_indep_expansion H.expansion hs.2.2.1 (T.exterior 0) + (H.U_nonempty T 0) hboundary + have hc2 : ({T.q 0,T.q 1} : Set V).ncard=2 := by simp [T.q.injective.eq_iff] + rw [hc2,hs.2.1] at he + rw [hs.2.1] at hb + omega + + +theorem contradiction (T : Frame G 3) : False := by + obtain ⟨S,i,j,hij,hne⟩ := H.exists_overlap T + let e : Fin 3 ≃ Fin 3 := (Equiv.swap 1 ((Equiv.swap 0 i) j)).trans (Equiv.swap 0 i) + have he0 : e 0=i := by + fin_cases i <;> fin_cases j <;> simp_all [e,Equiv.swap_apply_def] + have he1 : e 1=j := by + fin_cases i <;> fin_cases j <;> simp_all [e,Equiv.swap_apply_def] + apply H.overlap_contradiction (S.reindex e) + simpa only [Frame.reindex_U,he0,he1] using hne + +end FourHyp + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/FrameProperties.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/FrameProperties.lean new file mode 100644 index 0000000000000000000000000000000000000000..913a99be68b77d05f841b3170e2cf6360c826a04 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/FrameProperties.lean @@ -0,0 +1,276 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.DenseCycles +import OAI.Combinatorics.Ramsey.CycleClique.DistanceLayers +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorBalls +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorFrames +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorPaths +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.Independence +import OAI.Combinatorics.Ramsey.CycleClique.IndependenceTwo +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +namespace Frame +variable {V : Type*} {G : SimpleGraph V} {t : ℕ} (T : Frame G t) + +def Q : Set V := Set.range T.q + +def U (i : Fin t) : Set V := extNeighbors G T.Q (T.q i) + +theorem memQ (i : Fin t) : T.q i ∈ T.Q := ⟨i,rfl⟩ + +theorem cardQ [Fintype V] : T.Q.ncard=t := by + rw [Q,Set.ncard_range_of_injective T.q.injective] + simp + +theorem clique : G.IsClique T.Q := by + rintro x ⟨i,rfl⟩ y ⟨j,rfl⟩ hxy + exact T.adj i j (fun he => hxy (congrArg T.q he)) + +theorem exterior (i : Fin t) : T.U i ⊆ T.Qᶜ := fun _ hu => hu.2 + +theorem neQ {u : V} (hu : u ∉ T.Q) (i : Fin t) : u ≠ T.q i := + fun he => hu (he ▸ T.memQ i) + +def reindex (e : Fin t ≃ Fin t) : Frame G t where + q := e.toEmbedding.trans T.q + adj i j hij := T.adj (e i) (e j) (fun he => hij (e.injective he)) + +theorem reindex_Q (e : Fin t ≃ Fin t) : (T.reindex e).Q=T.Q := by + ext u + constructor + · rintro ⟨i,rfl⟩ + exact T.memQ _ + · rintro ⟨i,rfl⟩ + exact ⟨e.symm i, by simp [reindex]⟩ + +theorem reindex_U (e : Fin t ≃ Fin t) (i : Fin t) : + (T.reindex e).U i=T.U (e i) := by + simp only [U,reindex_Q] + rfl + + +def triangle {a b c : V} (hab : G.Adj a b) (hbc : G.Adj b c) (hca : G.Adj c a) : Frame G 3 where + q := ⟨![a,b,c], by + intro i j he + fin_cases i <;> fin_cases j <;> aesop⟩ + adj i j hij := by + change G.Adj (![a,b,c] i) (![a,b,c] j) + fin_cases i <;> fin_cases j <;> simp_all [SimpleGraph.adj_comm] + +theorem triangle_Q {a b c : V} (hab : G.Adj a b) (hbc : G.Adj b c) (hca : G.Adj c a) : + (triangle hab hbc hca).Q={a,b,c} := by + ext u + simp only [Q,Set.mem_range,Set.mem_insert_iff,Set.mem_singleton_iff] + constructor + · rintro ⟨i,rfl⟩ + change ![a,b,c] i = a ∨ ![a,b,c] i = b ∨ ![a,b,c] i = c + fin_cases i <;> simp + · rintro (rfl | rfl | rfl) + · exact ⟨0,rfl⟩ + · exact ⟨1,rfl⟩ + · exact ⟨2,rfl⟩ + +end Frame + +theorem exists_frame {V : Type*} [Fintype V] {G : SimpleGraph V} {t : ℕ} + (ht : t ≤ G.cliqueNum) : Nonempty (Frame G t) := by + obtain ⟨f⟩ := (complete_isContained_iff_le_cliqueNum G t).mpr ht + refine ⟨⟨f.toEmbedding,?_⟩⟩ + intro i j hij + exact f.toHom.map_adj (by simpa using hij) + + +theorem extClosed_sum_bound {V ι : Type*} [Fintype V] [Fintype ι] + {G : SimpleGraph V} {Q : Set V} (S : ι → Set V) + (hdis : Pairwise (fun i j => Disjoint (extClosed G Q (S i)) (extClosed G Q (S j)))) : + Q.ncard + ∑ i, (extClosed G Q (S i)).ncard ≤ Fintype.card V := by + classical + have hc := ncard_union_layers (fun i => extClosed G Q (S i)) hdis Finset.univ + have hb := Set.ncard_le_ncard (show (⋃ i ∈ Finset.univ,extClosed G Q (S i)) ⊆ Qᶜ from by + rintro v hv + obtain ⟨i,_,hi⟩ := Set.mem_iUnion₂.mp hv + exact hi.2) + have he := Set.ncard_add_ncard_compl Q + rw [Nat.card_eq_fintype_card] at he + omega + +theorem extClosed_pair_bound {V : Type*} [Fintype V] {G : SimpleGraph V} + {Q A B : Set V} (h : Disjoint (extClosed G Q A) (extClosed G Q B)) : + Q.ncard + (extClosed G Q A).ncard + (extClosed G Q B).ncard ≤ Fintype.card V := by + have hb := Set.ncard_le_ncard (show extClosed G Q A ∪ extClosed G Q B ⊆ Qᶜ from by + rintro x (h | h) <;> exact h.2) + rw [Set.ncard_union_eq h] at hb + have he := Set.ncard_add_ncard_compl Q + rw [Nat.card_eq_fintype_card] at he + omega + + +theorem extClosed_expansion {V : Type*} [Fintype V] {G : SimpleGraph V} + {k : ℕ} (hexp : ∀ I, G.IsIndepSet I → I.Nonempty → + k * I.ncard+1 ≤ (closedNeighborhood G I).ncard) + {Q S R : Set V} (hS : S ⊆ Qᶜ) (hne : S.Nonempty) + (hb : ∀ u ∈ S, ∀ x ∈ Q, G.Adj u x → x ∈ R) : + k * independence G S + 1 ≤ (extClosed G Q S).ncard + R.ncard := by + obtain ⟨I,hIS,hI,hIc⟩ := exists_indep_of_independence G S + have hi := independence_pos (G:=G) hne + have he := hexp I hI ((Set.ncard_pos).mp (by omega)) + have hs : closedNeighborhood G I ⊆ extClosed G Q S ∪ R := by + intro x hx + by_cases hxQ : x ∈ Q + · right + rcases hx with hx | ⟨u,hu,hux⟩ + · exact (hS (hIS hx) hxQ).elim + · exact hb u (hIS hu) x hxQ hux + · left + exact ⟨closedNeighborhood_mono G hIS hx,hxQ⟩ + have hc := (Set.ncard_le_ncard hs).trans (Set.ncard_union_le _ _) + rw [hIc] at he + omega + +theorem extClosed_indep_expansion {V : Type*} [Fintype V] {G : SimpleGraph V} + {k : ℕ} (hexp : ∀ I, G.IsIndepSet I → I.Nonempty → + k * I.ncard+1 ≤ (closedNeighborhood G I).ncard) + {Q I R : Set V} (hI : G.IsIndepSet I) (hS : I ⊆ Qᶜ) (hne : I.Nonempty) + (hb : ∀ u ∈ I, ∀ x ∈ Q, G.Adj u x → x ∈ R) : + k * I.ncard + 1 ≤ (extClosed G Q I).ncard + R.ncard := by + have hi := indep_ncard_le_independence hI (Set.Subset.refl I) + exact (by gcongr : k*I.ncard+1 ≤ k*independence G I+1).trans + (extClosed_expansion hexp hS hne hb) + +theorem Frame.U_degree {V : Type*} [Fintype V] {G : SimpleGraph V} {k t : ℕ} + (T : Frame G t) (hexp : ∀ I, G.IsIndepSet I → I.Nonempty → + k * I.ncard+1 ≤ (closedNeighborhood G I).ncard) (i : Fin t) : + k+1 ≤ t+(T.U i).ncard := by + have he := hexp {T.q i} (Set.pairwise_singleton _ _) (Set.singleton_nonempty _) + have hs : closedNeighborhood G {T.q i} ⊆ T.Q ∪ T.U i := by + rintro x (rfl | ⟨y,hy,hyx⟩) + · exact Or.inl (T.memQ i) + · have he : y=T.q i := hy + subst y + by_cases hx : x ∈ T.Q + · exact Or.inl hx + · exact Or.inr ⟨hyx,hx⟩ + have hc := (Set.ncard_le_ncard hs).trans (Set.ncard_union_le _ _) + rw [T.cardQ] at hc + simp only [Set.ncard_singleton,Nat.mul_one] at he + omega + +theorem Frame.clique_U_bound {V : Type*} [Fintype V] {G : SimpleGraph V} {t u : ℕ} + (T : Frame G t) (hcl : G.cliqueNum ≤ u) (i : Fin t) (hUi : G.IsClique (T.U i)) : + (T.U i).ncard+1 ≤ u := by + have hC : G.IsClique (insert (T.q i) (T.U i)) := by + intro x hx y hy hxy + rcases hx with rfl | hx <;> rcases hy with rfl | hy + · exact (hxy rfl).elim + · exact hy.1 + · exact hx.1.symm + · exact hUi hx hy hxy + have hc := (clique_ncard_le_cliqueNum hC).trans hcl + rwa [Set.ncard_insert_of_notMem (fun hh => hh.2 (T.memQ i))] at hc + +theorem Frame.U_ball {V : Type*} {G : SimpleGraph V} {t : ℕ} + (T : Frame G t) (i : Fin t) : T.U i=outsideBall G T.Q (T.q i) 0 := rfl + +theorem Frame.extClosed_U_ball {V : Type*} {G : SimpleGraph V} {t : ℕ} + (T : Frame G t) (i : Fin t) : extClosed G T.Q (T.U i)=outsideBall G T.Q (T.q i) 1 := by + ext x + simp only [extClosed,closedNeighborhood,Set.mem_sdiff,Set.mem_union,Set.mem_ofPred_eq, + outsideBall,Frame.U,extNeighbors] + tauto + +theorem Frame.boundary_U {V : Type*} {G : SimpleGraph V} {t : ℕ} + (T : Frame G t) (hdis : Pairwise (fun i j => Disjoint (T.U i) (T.U j))) + (i : Fin t) {u x : V} (hu : u ∈ T.U i) (hx : x ∈ T.Q) (hux : G.Adj u x) : + x ∈ ({T.q i} : Set V) := by + obtain ⟨j,rfl⟩ := hx + have hj : j=i := by + by_contra hji + exact Set.disjoint_left.mp (hdis hji) (show u ∈ T.U j from ⟨hux.symm,hu.2⟩) hu + subst j + rfl + +theorem Frame.disjoint_U_expansion {V : Type*} [Fintype V] {G : SimpleGraph V} {k t : ℕ} + (T : Frame G t) (hexp : ∀ I, G.IsIndepSet I → I.Nonempty → + k*I.ncard+1 ≤ (closedNeighborhood G I).ncard) + (hdis : Pairwise (fun i j => Disjoint (T.U i) (T.U j))) + (i : Fin t) (hne : (T.U i).Nonempty) : + k * independence G (T.U i) ≤ (extClosed G T.Q (T.U i)).ncard := by + have hh := extClosed_expansion hexp (T.exterior i) hne (R:={T.q i}) + (fun _ hu _ hx hux => T.boundary_U hdis i hu hx hux) + simp only [Set.ncard_singleton] at hh + omega + +theorem Frame.disjoint_U_closed {V : Type*} [Fintype V] {G : SimpleGraph V} + (T : Frame G 3) (hcycle : ¬ SimpleGraph.cycleGraph 5 ⊑ G) + (hdis : Pairwise (fun i j => Disjoint (T.U i) (T.U j))) : + Pairwise (fun i j => Disjoint (extClosed G T.Q (T.U i)) (extClosed G T.Q (T.U j))) := by + intro i j hij + apply extClosed_disjoint T.clique (by rw [T.cardQ]) (by rw [T.cardQ]; omega) hcycle + (T.exterior i) (T.exterior j) (hdis hij) + intro u hu v hv + exact ⟨T.q i,T.memQ i,T.q j,T.memQ j,fun he => hij (T.q.injective he),hu.1,hv.1⟩ + + + +theorem small_four_clique {V : Type*} [Fintype V] {G : SimpleGraph V} + (horder : Fintype.card V ≤ 17) (hcycle : ¬ SimpleGraph.cycleGraph 5 ⊑ G) + (hexp : ∀ I, G.IsIndepSet I → I.Nonempty → 4*I.ncard+1 ≤ (closedNeighborhood G I).ncard) + (T : Frame G 4) : False := by + have hno : ∀ i j : Fin 4, i ≠ j → ∀ d, 1 ≤ d → d ≤ 3 → + ¬ OutsidePath G T.Q (T.q i) (T.q j) d := by + intro i j hij d hd hd' + exact outsidePath_clique_forbidden T.clique (by omega) (by rw [T.cardQ]) hcycle + (by rw [T.cardQ]; omega) (by omega) + have hdis : Pairwise (fun i j => Disjoint (T.U i) (T.U j)) := by + intro i j hij + rw [T.U_ball,T.U_ball] + exact (outside_balls_separated (T.memQ i) (T.memQ j) + (fun he => hij (T.q.injective he)) (fun d hd hd' => hno i j hij d hd (by omega))).1 + have hclosed : Pairwise (fun i j => Disjoint (extClosed G T.Q (T.U i)) + (extClosed G T.Q (T.U j))) := by + intro i j hij + apply Set.disjoint_left.mpr + intro z hzi hzj + rw [T.extClosed_U_ball] at hzi hzj + obtain ⟨d,hd,hd',hp⟩ := outsidePath_of_balls_meet (T.memQ i) (T.memQ j) + (fun he => hij (T.q.injective he)) hzi hzj + exact hno i j hij d hd hd' hp + have hb : ∀ i : Fin 4, 4 ≤ (extClosed G T.Q (T.U i)).ncard := by + intro i + have hu := T.U_degree hexp i + have hne : (T.U i).Nonempty := (Set.ncard_pos).mp (by omega) + have hi := independence_pos (G:=G) hne + have he := T.disjoint_U_expansion hexp hdis i hne + omega + have hs := extClosed_sum_bound T.U hclosed + rw [T.cardQ] at hs + have hh := Finset.sum_le_sum (s:=Finset.univ) (fun i _ => hb i) + simp only [Finset.sum_const,Finset.card_univ,Fintype.card_fin,smul_eq_mul] at hh + omega + + +structure FourHyp {V : Type*} [Fintype V] (G : SimpleGraph V) : Prop where + order : Fintype.card V ≤ 17 + cycle : ¬ SimpleGraph.cycleGraph 5 ⊑ G + clique : G.cliqueNum ≤ 3 + expansion : ∀ I, G.IsIndepSet I → I.Nonempty → 4*I.ncard+1 ≤ (closedNeighborhood G I).ncard + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Independence.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Independence.lean new file mode 100644 index 0000000000000000000000000000000000000000..da5cf2863a2bae8cc81584f8661960ade59e3eeb --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Independence.lean @@ -0,0 +1,121 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.ColouredPaths + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def independence {V : Type*} (G : SimpleGraph V) (S : Set V) : ℕ := + (G.induce S).indepNum + +theorem indep_ncard_le {V : Type*} [Fintype V] {G : SimpleGraph V} + {I : Set V} (hI : G.IsIndepSet I) : I.ncard ≤ G.indepNum := by + classical + have hc := (show G.IsIndepSet (I.toFinset : Set V) by simpa using hI).card_le_indepNum + rwa [← Set.ncard_eq_toFinset_card'] at hc + +theorem exists_indep_of_independence {V : Type*} [Fintype V] (G : SimpleGraph V) + (S : Set V) : ∃ I ⊆ S, G.IsIndepSet I ∧ I.ncard = independence G S := by + classical + obtain ⟨J, hJ⟩ := (G.induce S).exists_isNIndepSet_indepNum + refine ⟨Subtype.val '' (J : Set S), ?_, ?_, ?_⟩ + · rintro v ⟨w, _, rfl⟩ + exact w.property + · rintro a ⟨x, hx, rfl⟩ b ⟨y, hy, rfl⟩ hxy hab + exact hJ.isIndepSet hx hy (fun heq => hxy (congrArg Subtype.val heq)) hab + · rw [Set.ncard_image_of_injective _ Subtype.val_injective, Set.ncard_coe_finset] + exact hJ.card_eq + +theorem indep_ncard_le_independence {V : Type*} [Fintype V] {G : SimpleGraph V} + {I S : Set V} (hI : G.IsIndepSet I) (hIS : I ⊆ S) : I.ncard ≤ independence G S := by + classical + let J : Set S := Subtype.val ⁻¹' I + have hJ : (G.induce S).IsIndepSet J := by + intro a ha b hb hab hadj + exact hI ha hb (fun h => hab (Subtype.ext h)) hadj + have heq : Subtype.val '' J = I := by + ext v + constructor + · rintro ⟨w, hw, rfl⟩ + exact hw + · intro hv + exact ⟨⟨v, hIS hv⟩, hv, rfl⟩ + have hc := indep_ncard_le hJ + rw [← Set.ncard_image_of_injective J Subtype.val_injective, heq] at hc + exact hc + +theorem independence_mono {V : Type*} [Fintype V] {G : SimpleGraph V} + {S T : Set V} (hST : S ⊆ T) : independence G S ≤ independence G T := by + obtain ⟨I, hIS, hI, hcard⟩ := exists_indep_of_independence G S + rw [← hcard] + exact indep_ncard_le_independence hI (hIS.trans hST) + +theorem independence_le_card {V : Type*} [Fintype V] (G : SimpleGraph V) (S : Set V) : + independence G S ≤ S.ncard := by + obtain ⟨I, hIS, _, hcard⟩ := exists_indep_of_independence G S + rw [← hcard] + exact Set.ncard_le_ncard hIS + +theorem independence_pos {V : Type*} [Fintype V] {G : SimpleGraph V} {S : Set V} + (hS : S.Nonempty) : 0 < independence G S := by + obtain ⟨x, hx⟩ := hS + have hI : G.IsIndepSet {x} := Set.pairwise_singleton _ _ + have hc := indep_ncard_le_independence hI (Set.singleton_subset_iff.mpr hx) + simp only [Set.ncard_singleton] at hc + omega + +theorem independence_univ {V : Type*} [Fintype V] (G : SimpleGraph V) : + independence G Set.univ = G.indepNum := by + classical + apply le_antisymm + · obtain ⟨I, _, hI, hcard⟩ := exists_indep_of_independence G Set.univ + rw [← hcard] + exact indep_ncard_le hI + · obtain ⟨I, hI⟩ := G.exists_isNIndepSet_indepNum + have hc := indep_ncard_le_independence hI.isIndepSet (Set.subset_univ _) + simpa only [Set.ncard_coe_finset, hI.card_eq] using hc + + + +theorem independence_outside_closed {V : Type*} [Fintype V] {G : SimpleGraph V} + {I S : Set V} (hI : G.IsIndepSet I) (hIS : I ⊆ S) : + independence G (S \ closedNeighborhood G I) + I.ncard ≤ independence G S := by + classical + obtain ⟨J, hJsub, hJ, hJcard⟩ := exists_indep_of_independence G + (S \ closedNeighborhood G I) + have hdisj : Disjoint J I := Set.disjoint_left.mpr (by + intro v hv hi + exact (hJsub hv).2 (Or.inl hi)) + have hJI : G.IsIndepSet (J ∪ I) := by + intro a ha b hb hab hadj + rcases ha with ha | ha <;> rcases hb with hb | hb + · exact hJ ha hb hab hadj + · exact (hJsub ha).2 (Or.inr ⟨b, hb, hadj.symm⟩) + · exact (hJsub hb).2 (Or.inr ⟨a, ha, hadj⟩) + · exact hI ha hb hab hadj + have hc := indep_ncard_le_independence hJI (Set.union_subset (fun _ h => (hJsub h).1) hIS) + rwa [Set.ncard_union_eq hdisj, hJcard] at hc + + +theorem no_compl_clique_iff {V : Type*} [Fintype V] (G : SimpleGraph V) (a : ℕ) : + (¬ (⊤ : SimpleGraph (Fin (a + 1))) ⊑ Gᶜ) ↔ G.indepNum ≤ a := by + classical + constructor + · intro h + obtain ⟨I, hI⟩ := G.exists_isNIndepSet_indepNum + have hc := clique_ncard_lt h ((SimpleGraph.isClique_compl G).mpr hI.isIndepSet) + simp only [Set.ncard_coe_finset, hI.card_eq] at hc + omega + · intro h hc + apply hc.not_cliqueFree + intro I hI + have hi := (SimpleGraph.isNClique_compl G).mp hI + have hb := hi.isIndepSet.card_le_indepNum + rw [hi.card_eq] at hb + omega + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/IndependenceTwo.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/IndependenceTwo.lean new file mode 100644 index 0000000000000000000000000000000000000000..be8f87ce60b3742bec5c6e8fdee51da5cd1dedf5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/IndependenceTwo.lean @@ -0,0 +1,279 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.ColouredPaths +import OAI.Combinatorics.Ramsey.CycleClique.Independence +import OAI.Combinatorics.Ramsey.CycleClique.LongPaths + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +theorem alpha_two_adj {V : Type*} [Fintype V] {G : SimpleGraph V} + (hα : G.indepNum ≤ 2) {x y z : V} (hxy : x ≠ y) (hxz : x ≠ z) + (hyz : y ≠ z) (hx : ¬ G.Adj x z) (hy : ¬ G.Adj y z) : G.Adj x y := by + classical + by_contra hxyadj + have hI : G.IsIndepSet {x, y, z} := by + intro a ha b hb hab + simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb + rcases ha with rfl | rfl | rfl <;> rcases hb with rfl | rfl | rfl + · exact (hab rfl).elim + · exact hxyadj + · exact hx + · exact fun h => hxyadj h.symm + · exact (hab rfl).elim + · exact hy + · exact fun h => hx h.symm + · exact fun h => hy h.symm + · exact (hab rfl).elim + have hc := (indep_ncard_le hI).trans hα + simp [Set.ncard_insert_of_notMem, hxy, hxz, hyz] at hc + +theorem clique_ncard_le_cliqueNum {V : Type*} [Fintype V] {G : SimpleGraph V} + {S : Set V} (hS : G.IsClique S) : S.ncard ≤ G.cliqueNum := by + classical + have hh : G.IsClique (S.toFinset : Set V) := by simpa using hS + simpa only [Set.ncard_eq_toFinset_card'] using hh.card_le_cliqueNum + + +theorem clique_of_anticomplete_vertex {V : Type*} [Fintype V] {G : SimpleGraph V} + (hα : G.indepNum ≤ 2) {S : Set V} {z : V} (hz : z ∉ S) + (hanti : ∀ x ∈ S, ¬ G.Adj x z) : G.IsClique S := by + intro x hx y hy hxy + exact alpha_two_adj hα (z := z) hxy (fun he => hz (he ▸ hx)) + (fun he => hz (he ▸ hy)) (hanti x hx) (hanti y hy) + + +theorem connected_of_alpha_two_large {V : Type*} [Fintype V] {G : SimpleGraph V} + {t : ℕ} (hα : G.indepNum ≤ 2) (ht : G.cliqueNum ≤ t) + (hcard : 2 * t < Fintype.card V) : G.Connected := by + classical + have hne : Nonempty V := Fintype.card_pos_iff.mp (by omega) + let := hne + refine ⟨?_⟩ + intro x y + by_contra hxy + let S := {v | G.Reachable x v} + have hx : x ∈ S := SimpleGraph.Reachable.rfl + have hy : y ∉ S := hxy + have hanti : ∀ a ∈ S, ∀ b ∈ Sᶜ, ¬ G.Adj a b := by + intro a ha b hb hab + exact hb (ha.trans hab.reachable) + have hS : G.IsClique S := clique_of_anticomplete_vertex hα hy (fun a ha => hanti a ha y hy) + have hR : G.IsClique Sᶜ := clique_of_anticomplete_vertex hα + (show x ∉ Sᶜ from fun hh => hh hx) (fun b hb hab => hanti x hx b hb hab.symm) + have hcS := (clique_ncard_le_cliqueNum hS).trans ht + have hcR := (clique_ncard_le_cliqueNum hR).trans ht + have hsum := Set.ncard_add_ncard_compl S + rw [Nat.card_eq_fintype_card] at hsum + omega + + + +theorem deletion_connected_of_alpha_two_large {V : Type*} [Fintype V] + {G : SimpleGraph V} {t : ℕ} (hα : G.indepNum ≤ 2) (ht : G.cliqueNum ≤ t) + (hcard : 2 * t < Fintype.card V) (v x y : V) (hxv : x ≠ v) (hyv : y ≠ v) : + (within G {w | w ≠ v}).Reachable x y := by + classical + let D := within G {w | w ≠ v} + by_contra hxy + let A : Set V := {w | D.Reachable x w} + let B : Set V := {w | w ≠ v} \ A + have hxA : x ∈ A := SimpleGraph.Reachable.rfl + have hAv : ∀ a ∈ A, a ≠ v := by + rintro a ⟨p⟩ + exact within_support p hxv a p.end_mem_support + have hyB : y ∈ B := ⟨hyv, hxy⟩ + have hanti : ∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b := by + intro a ha b hb hab + exact hb.2 (ha.trans (show D.Adj a b from ⟨hab, hAv a ha, hb.1⟩).reachable) + have hA : G.IsClique A := clique_of_anticomplete_vertex hα hyB.2 + (fun a ha => hanti a ha y hyB) + have hB : G.IsClique B := clique_of_anticomplete_vertex hα + (show x ∉ B from fun hh => hh.2 hxA) (fun b hb hab => hanti x hxA b hb hab.symm) + have hcA := (clique_ncard_le_cliqueNum hA).trans ht + have hcB := (clique_ncard_le_cliqueNum hB).trans ht + have hvAB : v ∉ A ∪ B := by + rintro (ha | hb) + · exact hAv v ha rfl + · exact hb.1 rfl + have huniv : insert v (A ∪ B) = Set.univ := by + ext w + simp only [Set.mem_insert_iff, Set.mem_union, Set.mem_univ, iff_true] + by_cases hwv : w = v + · exact Or.inl hwv + · by_cases hw : w ∈ A + · exact Or.inr (Or.inl hw) + · exact Or.inr (Or.inr ⟨hwv, hw⟩) + have hdis : Disjoint A B := Set.disjoint_left.mpr (fun a ha hb => hb.2 ha) + have hsum : A.ncard + B.ncard + 1 = Fintype.card V := by + have hh := congrArg Set.ncard huniv + simpa only [Set.ncard_insert_of_notMem hvAB, Set.ncard_union_eq hdis, + Set.ncard_univ, Nat.card_eq_fintype_card] using hh + have hAc : A.ncard = t := by omega + have hBc : B.ncard = t := by omega + have hone : (∀ a ∈ A, G.Adj v a) ∨ (∀ b ∈ B, G.Adj v b) := by + by_cases ha : ∀ a ∈ A, G.Adj v a + · exact Or.inl ha + · push Not at ha + obtain ⟨a, ha, hva⟩ := ha + refine Or.inr (fun b hb => ?_) + exact alpha_two_adj hα (Ne.symm hb.1) (Ne.symm (hAv a ha)) + (fun he => hb.2 (he ▸ ha)) hva (fun h => hanti a ha b hb h.symm) + rcases hone with ha | hb + · have hcl : G.IsClique (insert v A) := hA.insert (fun a ha' _ => ha a ha') + have hc := (clique_ncard_le_cliqueNum hcl).trans ht + rw [Set.ncard_insert_of_notMem (fun hv => hAv v hv rfl), hAc] at hc + omega + · have hcl : G.IsClique (insert v B) := hB.insert (fun b hb' _ => hb b hb') + have hc := (clique_ncard_le_cliqueNum hcl).trans ht + rw [Set.ncard_insert_of_notMem (fun hv => hv.1 rfl), hBc] at hc + omega + + + +theorem degree_two_of_deletion_connected {V : Type*} [Fintype V] + {G : SimpleGraph V} [DecidableRel G.Adj] (hconn : G.Connected) + (hcard : 3 ≤ Fintype.card V) + (hdel : ∀ v x y, x ≠ v → y ≠ v → (within G {w | w ≠ v}).Reachable x y) + (x : V) : 2 ≤ G.degree x := by + classical + obtain ⟨y, _, hyx⟩ := exists_mem_ne_of_ncard (E := Set.univ) (w₀ := x) + (by simpa only [Set.ncard_univ, Nat.card_eq_fintype_card] using (by omega : 2 ≤ Fintype.card V)) + obtain ⟨p⟩ := hconn.preconnected x y + have hplen : 0 < p.length := SimpleGraph.Walk.not_nil_iff_lt_length.mp + (fun hn => hyx hn.eq.symm) + let w := p.getVert 1 + have hxw : G.Adj x w := by + simpa only [SimpleGraph.Walk.getVert_zero, zero_add] + using (p.adj_getVert_succ (i := 0) hplen) + have hex : ∃ z : V, z ≠ x ∧ z ≠ w := by + by_contra hn + push Not at hn + have hsub : (Set.univ : Set V) ⊆ {x, w} := by + intro z _ + by_cases hz : z = x + · exact Or.inl hz + · exact Or.inr (hn z hz) + have hh := Set.ncard_le_ncard hsub + rw [Set.ncard_univ, Nat.card_eq_fintype_card, Set.ncard_pair hxw.ne] at hh + omega + obtain ⟨z, hzx, hzw⟩ := hex + obtain ⟨q⟩ := hdel w x z hxw.ne hzw + have hqlen : 0 < q.length := SimpleGraph.Walk.not_nil_iff_lt_length.mp + (fun hn => hzx hn.eq.symm) + let u := q.getVert 1 + have hxu : (within G {a | a ≠ w}).Adj x u := by + simpa only [SimpleGraph.Walk.getVert_zero, zero_add] + using q.adj_getVert_succ (i := 0) hqlen + have hh : 1 < (G.neighborSet x).ncard := (Set.one_lt_ncard).mpr + ⟨w, hxw, u, hxu.1, Ne.symm hxu.2.2⟩ + rw [ncard_neighborSet] at hh + omega + + + +theorem hamiltonian_of_alpha_two {V : Type*} [Fintype V] {G : SimpleGraph V} + (hconn : G.Connected) (hcard : 3 ≤ Fintype.card V) (hα : G.indepNum ≤ 2) + (hdel : ∀ v x y, x ≠ v → y ≠ v → (within G {w | w ≠ v}).Reachable x y) : + ∃ x, ∃ c : G.Walk x x, c.IsCycle ∧ c.length = Fintype.card V := by + classical + let : Nonempty V := hconn.nonempty + have hdegree := degree_two_of_deletion_connected hconn hcard hdel + obtain ⟨x, y, p, hp, hmax⟩ := SimpleGraph.Walk.exists_isPath_forall_isPath_length_le_length G + obtain ⟨a, b, P, hP, hPlen⟩ := long_path_min_degree (by omega : 2 ≤ 2) hconn hdegree + have hlen : 2 ≤ p.length := by + have hh := hmax a b P hP + omega + have hW : 1 < p.support.length := by rw [SimpleGraph.Walk.length_support]; omega + have hyN : ∀ z, G.Adj y z → z ∈ p.support := + longest_path_endpoint_neighbors p hp (fun z q hq => hmax x z q hq) + have hxN : ∀ z, G.Adj x z → z ∈ p.support := by + intro z hxz + have hh := longest_path_endpoint_neighbors p.reverse hp.reverse + (fun z q hq => by simpa using hmax y z q hq) z hxz + simpa using hh + have hspan : ∀ z, z ∈ p.support := by + intro z + by_contra hz + have hxy : x ≠ y := by + intro hh + have hn := (hp.nil_iff_eq).mpr hh + have hh := hn.length_eq_zero + omega + have hxyadj := alpha_two_adj hα (z := z) hxy + (fun hh => hz (by rw [← hh]; exact p.start_mem_support)) + (fun hh => hz (by rw [← hh]; exact p.end_mem_support)) + (fun hh => hz (hxN z hh)) (fun hh => hz (hyN z hh)) + let c := SimpleGraph.Walk.cons hxyadj.symm p + have hc : c.IsCycle := path_close_cycle p hp hlen hxyadj.symm + have hzc : z ∉ c.support := by + simp only [c, SimpleGraph.Walk.support_cons, List.mem_cons] + exact fun hh => hh.elim (fun hh => hz (by rw [hh]; exact p.end_mem_support)) hz + obtain ⟨u, v, q, hq, hqlen⟩ := extend_nonspanning_cycle hconn c hc ⟨z, hzc⟩ + have hh := hmax u v q hq + simp only [c, SimpleGraph.Walk.length_cons] at hqlen + omega + have hcardp : p.length + 1 = Fintype.card V := by + have hh : p.support.toFinset = Finset.univ := by ext z; simp [hspan] + have hc := congrArg Finset.card hh + simpa only [List.toFinset_card_of_nodup hp.support_nodup, + SimpleGraph.Walk.length_support, Finset.card_univ] using hc + let E := pathEnds G x p.support + have hxE : x ∉ E := pathEnds_no_start hW + have hyE : y ∈ E := ⟨p, hp, .refl _⟩ + have hEc : 2 ≤ E.ncard := + (hdegree y).trans (degree_le_card_pathEnds p hp (.refl _) hyN) + have hclose : ∃ e ∈ E, G.Adj x e := by + by_contra hn + push Not at hn + have hcl : G.IsClique E := clique_of_anticomplete_vertex hα hxE + (fun e he he' => hn e he he'.symm) + obtain ⟨j, hjpos, hjlen, hseg⟩ := pathEnds_final_segment p hp (.refl _) hcl hW + have hjtwo : 2 ≤ j := by + by_contra hh + have hjone : j = 1 := by omega + have hfirst := p.adj_getVert_succ (i := 0) (by omega) + simp only [SimpleGraph.Walk.getVert_zero, zero_add] at hfirst + exact hn (p.getVert 1) ((hseg 1 (by omega)).mpr (by omega)) hfirst + let u := p.getVert (j - 1) + let w₀ := p.getVert j + have huE : u ∉ E := by + exact fun hu => by have hh := (hseg (j - 1) (by omega)).mp hu; omega + have hxw : x ≠ w₀ := by + intro hh + exact hxE (hh ▸ (hseg j hjlen).mpr le_rfl) + have hux : u ≠ x := by + intro hh + have hh' := (hp.getVert_eq_start_iff (show j - 1 ≤ p.length by omega)).mp hh + omega + obtain ⟨w₁, hw₁, hw₁ne⟩ := exists_mem_ne_of_ncard (w₀ := w₀) hEc + obtain ⟨q⟩ := hdel w₀ x w₁ hxw hw₁ne + obtain ⟨d, hd, hdout, hdin⟩ := q.exists_boundary_dart Eᶜ hxE + (show w₁ ∉ Eᶜ from fun hh => hh hw₁) + have hdinE : d.snd ∈ E := not_not.mp hdin + have hdinne : d.snd ≠ w₀ := d.adj.2.2 + have hpartial := pathEnds_partial_attachment p hp (fun v q hq => hmax x v q hq) + hcl hjpos hjlen hseg hdinE hdinne d.fst d.adj.1.symm + have hdu : d.fst = u := hpartial.resolve_left hdout + have hentry : G.Adj u d.snd := hdu ▸ d.adj.1 + have hattach := pathEnds_attachment_of_two_entries p hp (fun v q hq => hmax x v q hq) + hcl hjpos hjlen hseg hdinE hdinne hentry + have hyu : y ≠ u := fun hh => huE (hh ▸ hyE) + obtain ⟨q'⟩ := hdel u x y hux.symm hyu + obtain ⟨d', _, hd'out, hd'in⟩ := q'.exists_boundary_dart Eᶜ hxE + (show y ∉ Eᶜ from fun hh => hh hyE) + have hlast := hattach d'.snd (not_not.mp hd'in) d'.fst d'.adj.1.symm + exact d'.adj.2.1 (hlast.resolve_left hd'out) + obtain ⟨e, he, hxe⟩ := hclose + obtain ⟨q, hq, hperm⟩ := he + have hqlen : q.length = p.length := by + have hh := hperm.length_eq + simp only [SimpleGraph.Walk.length_support] at hh + omega + refine ⟨e, .cons hxe.symm q, path_close_cycle q hq (by omega) hxe.symm, ?_⟩ + simpa only [SimpleGraph.Walk.length_cons, hqlen] using hcardp + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/InducedGraphs.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/InducedGraphs.lean new file mode 100644 index 0000000000000000000000000000000000000000..a9a578ec77d808f87836f1ddcb3bc0d69ebccf68 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/InducedGraphs.lean @@ -0,0 +1,118 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.ColouredPaths +import OAI.Combinatorics.Ramsey.CycleClique.Exceptional +import OAI.Combinatorics.Ramsey.CycleClique.Independence + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +theorem indep_induce_iff_image {V : Type*} {G : SimpleGraph V} {S : Set V} {I : Set S} : + (G.induce S).IsIndepSet I ↔ G.IsIndepSet (Subtype.val '' I) := by + constructor + · intro h a ha b hb hab hadj + obtain ⟨x, hx, rfl⟩ := ha + obtain ⟨y, hy, rfl⟩ := hb + exact h hx hy (fun heq => hab (congrArg Subtype.val heq)) hadj + · intro h a ha b hb hab hadj + exact h ⟨a, ha, rfl⟩ ⟨b, hb, rfl⟩ (fun heq => hab (Subtype.ext heq)) hadj + +theorem independence_induce_image {V : Type*} [Fintype V] (G : SimpleGraph V) + (S : Set V) (T : Set S) : + independence (G.induce S) T = independence G (Subtype.val '' T) := by + classical + apply le_antisymm + · obtain ⟨I, hIT, hI, hc⟩ := exists_indep_of_independence (G.induce S) T + have hb := indep_ncard_le_independence (indep_induce_iff_image.mp hI) (Set.image_mono hIT) + rwa [Set.ncard_image_of_injective _ Subtype.val_injective, hc] at hb + · obtain ⟨I, hIT, hI, hc⟩ := exists_indep_of_independence G (Subtype.val '' T) + let J : Set S := Subtype.val ⁻¹' I + have heq : Subtype.val '' J = I := by + ext v + constructor + · rintro ⟨w, hw, rfl⟩ + exact hw + · intro hv + obtain ⟨w, _, rfl⟩ := hIT hv + exact ⟨w, hv, rfl⟩ + have hJ : (G.induce S).IsIndepSet J := indep_induce_iff_image.mpr (heq ▸ hI) + have hJT : J ⊆ T := by + intro x hx + obtain ⟨y, hy, hxy⟩ := hIT hx + exact Subtype.val_injective hxy ▸ hy + have hb := indep_ncard_le_independence hJ hJT + rw [← Set.ncard_image_of_injective J Subtype.val_injective, heq, hc] at hb + exact hb + + +theorem independence_add_le {V : Type*} [Fintype V] {G : SimpleGraph V} + {A B S : Set V} (hA : A ⊆ S) (hB : B ⊆ S) (hdis : Disjoint A B) + (hcross : ∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b) : + independence G A + independence G B ≤ independence G S := by + classical + obtain ⟨I, hIA, hI, hcI⟩ := exists_indep_of_independence G A + obtain ⟨J, hJB, hJ, hcJ⟩ := exists_indep_of_independence G B + have hdIJ : Disjoint I J := hdis.mono hIA hJB + have hIJ : G.IsIndepSet (I ∪ J) := by + intro a ha b hb hab hadj + rcases ha with ha | ha <;> rcases hb with hb | hb + · exact hI ha hb hab hadj + · exact hcross a (hIA ha) b (hJB hb) hadj + · exact hcross b (hIA hb) a (hJB ha) hadj.symm + · exact hJ ha hb hab hadj + have hc := indep_ncard_le_independence hIJ (Set.union_subset (hIA.trans hA) (hJB.trans hB)) + rwa [Set.ncard_union_eq hdIJ, hcI, hcJ] at hc + + +theorem clique_of_independence_le_one {V : Type*} [Fintype V] {G : SimpleGraph V} + {S : Set V} (hα : independence G S ≤ 1) : G.IsClique S := by + intro a ha b hb hab + by_contra hn + have hI : G.IsIndepSet {a, b} := by + intro x hx y hy hxy hxyadj + simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hx hy + rcases hx with rfl | rfl <;> rcases hy with rfl | rfl + · exact hxy rfl + · exact hn hxyadj + · exact hn hxyadj.symm + · exact hxy rfl + have hc := indep_ncard_le_independence hI (Set.insert_subset ha (Set.singleton_subset_iff.mpr hb)) + rw [Set.ncard_pair hab] at hc + omega + + +theorem bipartite_card_le_twice_indep {V : Type*} [Fintype V] {G : SimpleGraph V} + (hbip : G.IsBipartite) : Fintype.card V ≤ 2 * G.indepNum := by + classical + obtain ⟨χ⟩ := hbip + have hzero := indep_ncard_le (χ.isIndepSet_colorClass (0 : Fin 2)) + have hone := indep_ncard_le (χ.isIndepSet_colorClass (1 : Fin 2)) + have hunion : χ.colorClass 0 ∪ χ.colorClass 1 = Set.univ := by + ext v + simp only [Set.mem_union, SimpleGraph.Coloring.colorClass, Set.mem_ofPred_eq, Set.mem_univ, iff_true] + have := (χ v).isLt + omega + have hdis : Disjoint (χ.colorClass 0) (χ.colorClass 1) := by + apply Set.disjoint_left.mpr + intro v hv₀ hv₁ + have hzero : χ v = 0 := hv₀ + have hone : χ v = 1 := hv₁ + exact (by decide : (0 : Fin 2) ≠ 1) (hzero.symm.trans hone) + have hc := Set.ncard_union_eq hdis + rw [hunion, Set.ncard_univ, Nat.card_eq_fintype_card] at hc + omega + + +theorem closedNeighborhood_singleton_card {V : Type*} [Fintype V] + (G : SimpleGraph V) [DecidableRel G.Adj] (v : V) : + (closedNeighborhood G {v}).ncard = G.degree v + 1 := by + have heq : closedNeighborhood G {v} = insert v (G.neighborSet v) := by + ext w + simp [closedNeighborhood, SimpleGraph.mem_neighborSet] + rw [heq, Set.ncard_insert_of_notMem G.notMem_neighborSet_self, ncard_neighborSet] + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/LabelDecisions.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/LabelDecisions.lean new file mode 100644 index 0000000000000000000000000000000000000000..cea2e0c4915fbe77c6e810dbae4ca3dc6b82f9c2 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/LabelDecisions.lean @@ -0,0 +1,50 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +def globalEdgeBits : List (ℕ × ℕ) → ℕ + | [] => 0 + | (a,b) :: E => 2^(Nat.pair a b) ||| globalEdgeBits E + +theorem globalEdgeBits_spec (E : List (ℕ × ℕ)) (a b : ℕ) : + (globalEdgeBits E).testBit (Nat.pair a b) = true ↔ (a,b) ∈ E := by + induction E with + | nil => simp [globalEdgeBits] + | cons e E ih => + rcases e with ⟨i,j⟩ + simp only [globalEdgeBits, Nat.testBit_lor, Nat.testBit_two_pow, Bool.or_eq_true, + decide_eq_true_eq, Nat.pair_eq_pair, ih, List.mem_cons, Prod.mk.injEq] + tauto + +instance (priority := high) globalLabelAdj (E : List (ℕ × ℕ)) (a b : ℕ) : + Decidable (labelAdj E a b) := + decidable_of_iff ((globalEdgeBits E).testBit (Nat.pair a b) = true ∨ + (globalEdgeBits E).testBit (Nat.pair b a) = true) + (by simp only [globalEdgeBits_spec, labelAdj]) + +instance (priority := high) globalLabelValid (n : ℕ) (q : Finset ℕ) + (E : List (ℕ × ℕ)) (C : List (List ℕ)) : Decidable (LabelValid n q E C) := by + unfold LabelValid + infer_instance + +instance (priority := high) globalCertificateValid (k t n : ℕ) (q : Finset ℕ) + (E : List (ℕ × ℕ)) (L e : ℕ) (M : ForbiddenMatrix) (C : FiniteCertificate) : + Decidable (C.Valid k t n q E L e M) := + match C with + | .system _ | .cycle _ | .packing _ | .edge _ _ => by unfold FiniteCertificate.Valid; infer_instance + | .forbid i j d R N => by + unfold FiniteCertificate.Valid + exact @instDecidableAnd _ _ inferInstance (@instDecidableAnd _ _ inferInstance + (@instDecidableAnd _ _ (globalCertificateValid k t (n+d) q (augmentedEdges n E i j d) L e M R) + (globalCertificateValid k t n q E L e ((i,j,d)::M) N))) + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/LargeSystems.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/LargeSystems.lean new file mode 100644 index 0000000000000000000000000000000000000000..fbad344fa6e8c9729a5b60cebd5765d0d6cf130f --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/LargeSystems.lean @@ -0,0 +1,901 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.ChainProfiles +import OAI.Combinatorics.Ramsey.CycleClique.ChainRearrangement +import OAI.Combinatorics.Ramsey.CycleClique.CycleShortening +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorBalls +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorPaths +import OAI.Combinatorics.Ramsey.CycleClique.Independence +import OAI.Combinatorics.Ramsey.CycleClique.IndependenceTwo +import OAI.Combinatorics.Ramsey.CycleClique.InducedGraphs +import OAI.Combinatorics.Ramsey.CycleClique.MarkedChains +import OAI.Combinatorics.Ramsey.CycleClique.OptimalSystems +import OAI.Combinatorics.Ramsey.CycleClique.PathSystems +import OAI.Combinatorics.Ramsey.CycleClique.SystemInsertion + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph +attribute [local instance] Classical.propDecidable + +theorem PathSystem.chains_nodup {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) : P.chains.Nodup := by + apply (List.nodup_flatten.mp P.nodup).2.imp_of_mem + intro a b ha hb hd heq + subst b + obtain ⟨x, hx⟩ := List.exists_mem_of_ne_nil a (P.nonempty a ha) + exact List.disjoint_left.mp hd hx hx + +theorem PathSystem.incident_eq_edges_add_chains {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : + P.incident = P.edgeCount + P.usedChains.length := by + have hh := P.partition.length_eq + simp only [List.length_append] at hh + have hle := P.chains_length_le + dsimp [PathSystem.incident, PathSystem.edgeCount] + omega + +theorem PathSystem.amount_pos_iff {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : + 0 < P.amount ↔ 0 < P.edgeCount := by + obtain ⟨A, hA⟩ := P.exists_profile + obtain ⟨hs, hl, hp⟩ := hA.count + constructor + · intro ha + by_contra! he + have hn : A = [] := List.length_eq_zero_iff.mp (by omega) + simp [hn] at hs + omega + · intro he + have hh := P.edgeCount_le_amount + omega + +theorem PathSystem.rep_of_chain {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) {c : List V} (hc : c ∈ P.chains) {x : V} + (hx : x ∈ markedReps Q true c) : x ∈ P.reps := by + exact List.mem_flatten.mpr ⟨markedReps Q true c, List.mem_map.mpr ⟨c, hc, rfl⟩, hx⟩ + +theorem PathSystem.rep_iff_in_chain {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) {c : List V} (hc : c ∈ P.chains) {x : V} (hx : x ∈ c) : + x ∈ P.reps ↔ x ∈ markedReps Q true c := by + classical + refine ⟨?_, P.rep_of_chain hc⟩ + intro hxr + have hp := List.perm_cons_erase hc + have hnd : (c ++ (P.chains.erase c).flatten).Nodup := hp.flatten.nodup_iff.mp P.nodup + have hrp := (hp.map (markedReps Q true)).flatten + have hv := hrp.mem_iff.mp hxr + simp only [List.map_cons, List.flatten_cons, List.mem_append] at hv + rcases hv with hv | hv + · exact hv + · exact ((List.nodup_append.mp hnd).2.2 x hx x + ((markedReps_flatten_sublist Q _).subset hv) rfl).elim + +theorem ClosedChain.rep_mem_Q_iff_head {V : Type*} {G : SimpleGraph V} {Q : Set V} + {c : List V} (hc : ClosedChain G Q c) {x : V} (hx : x ∈ Q) : + x ∈ markedReps Q true c ↔ x ∈ c.head? := by + classical + constructor + · intro hrep + obtain ⟨A, B, he, hcut⟩ := (mem_markedReps Q true c x).mp hrep + rcases hcut with ⟨rfl, _⟩ | ⟨hne, hend⟩ + · simp [he] + · have hp := List.isChain_append.mp (he ▸ hc.positive) + have hla : A.getLast hne ∈ A.getLast? := List.getLast?_eq_some_getLast hne + exact ((hp.2.2 _ hla x (by simp)).elim (fun h => h (hend _ hla)) (fun h => h hx)).elim + · intro hh + cases c with + | nil => simp at hh + | cons y B => + have he : y = x := by simpa using hh + subst y + simp [markedReps] + +theorem PathSystem.interior_rep_next {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) {x : V} (hx : x ∈ P.reps) (hxQ : x ∉ Q) : + ∃ c ∈ P.chains, ∃ A B : List V, ∃ y : V, + c = A ++ x :: y :: B ∧ y ∉ P.reps := by + obtain ⟨rc, hrc, hxc⟩ := List.mem_flatten.mp hx + obtain ⟨c, hc, rfl⟩ := List.mem_map.mp hrc + obtain ⟨A, B, he, hcut⟩ := (mem_markedReps Q true c x).mp hxc + have hnB : B ≠ [] := by + intro hb + have hxend : x ∈ c.getLast? := by simp [he, hb] + exact hxQ ((P.ends c hc).2 x hxend) + obtain ⟨y, D, hB⟩ := List.exists_cons_of_ne_nil hnB + subst B + refine ⟨c, hc, A, D, y, he, ?_⟩ + intro hy + have hyc : y ∈ c := by simp [he] + have hyrep := (P.rep_iff_in_chain hc hyc).mp hy + have hnc := (List.nodup_flatten.mp P.nodup).1 c hc + have hcuty := markedCut_of_split hnc hyrep (show c = (A ++ [x]) ++ y :: D by + simpa only [List.append_assoc, List.singleton_append] using he) + rcases hcuty with ⟨hempty, _⟩ | ⟨_, hlast⟩ + · simp at hempty + · exact hxQ (hlast x (by simp)) + +theorem ClosedChain.reps_Q_count {V : Type*} {G : SimpleGraph V} {Q : Set V} + {c : List V} (hc : ClosedChain G Q c) (hn : c.Nodup) : + (markedReps Q true c).countP (fun x => decide (x ∈ Q)) = 1 := by + classical + let x := c.head hc.nonempty + have hxQ : x ∈ Q := hc.ends.1 x (List.head?_eq_some_head _) + have he : ((markedReps Q true c).filter (fun x => decide (x ∈ Q))).toFinset = {x} := by + ext y + simp only [List.mem_toFinset, List.mem_filter, decide_eq_true_eq, Finset.mem_singleton] + constructor + · rintro ⟨hy, hyQ⟩ + have hh := hc.rep_mem_Q_iff_head hyQ |>.mp hy + simpa only [List.head?_eq_some_head hc.nonempty, Option.mem_def, Option.some.injEq] using hh.symm + · rintro rfl + exact ⟨(hc.rep_mem_Q_iff_head hxQ).mpr (List.head?_eq_some_head _), hxQ⟩ + rw [List.countP_eq_length_filter, ← List.toFinset_card_of_nodup + (((markedReps_sublist Q true c).nodup hn).filter _), he] + simp + +theorem PathSystem.reps_Q_count {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) : P.reps.countP (fun x => decide (x ∈ Q)) = P.chains.length := by + classical + simp only [PathSystem.reps, List.countP_flatten, List.map_map] + have hm : P.chains.map (fun c => (markedReps Q true c).countP (fun x => decide (x ∈ Q))) = + P.chains.map (fun _ => 1) := by + apply List.map_congr_left + intro c hc + exact (P.closed_chain hc).reps_Q_count ((List.nodup_flatten.mp P.nodup).1 c hc) + simp only [Function.comp_def] + rw [hm] + simp + +theorem PathSystem.interior_reps_length {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : + (P.reps.filter (fun x => x ∉ Q)).length = P.edgeCount := by + classical + have hh := P.reps.length_eq_countP_add_countP (fun x => decide (x ∈ Q)) + rw [P.reps_Q_count, P.reps_length] at hh + simp only [Bool.not_eq_true, decide_eq_false_iff_not, List.countP_eq_length_filter] at hh + dsimp [PathSystem.edgeCount] + omega + +theorem PathSystem.chains_disjoint {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) {c d : List V} (hc : c ∈ P.chains) (hd : d ∈ P.chains) (hne : c ≠ d) : + c.Disjoint d := by + classical + have hp := List.perm_cons_erase hc + have hnd : (c ++ (P.chains.erase c).flatten).Nodup := hp.flatten.nodup_iff.mp P.nodup + apply List.disjoint_left.mpr + intro x hx hy + exact (List.nodup_append.mp hnd).2.2 x hx x + (List.mem_flatten.mpr ⟨d, (List.mem_erase_of_ne (Ne.symm hne)).mpr hd, hy⟩) rfl + +theorem markedReps_head {V : Type*} (Q : Set V) {c : List V} (hn : c ≠ []) : + c.head hn ∈ markedReps Q true c := by + cases c with + | nil => contradiction + | cons x c => simp [markedReps] + +theorem PathSystem.reverse_other_rep {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) {c : List V} (hc : c ∈ P.chains) (hc1 : c.length ≠ 1) + {x : V} (hx : x ∈ P.reps) (hxc : x ∉ c) : + ∃ f : List V → Bool, ∃ y : V, y ∈ P.chains.flatten ∧ y ∉ P.reps ∧ + x ∈ (P.orient f).reps ∧ y ∈ (P.orient f).reps := by + classical + let f : List V → Bool := fun d => decide (d = c) + let y := c.getLast (P.nonempty c hc) + have hyc : y ∈ c := List.getLast_mem _ + have hyQ : y ∈ Q := (P.ends c hc).2 y (List.getLast?_eq_some_getLast _) + have hyR : y ∉ P.reps := by + intro hy + have hh := (P.closed_chain hc).rep_mem_Q_iff_head hyQ |>.mp ((P.rep_iff_in_chain hc hyc).mp hy) + have hhe : c.head (P.nonempty c hc) = c.getLast (P.nonempty c hc) := by + simpa only [List.head?_eq_some_head (P.nonempty c hc), Option.mem_def, Option.some.injEq] using hh + obtain ⟨z, hz⟩ := (List.Nodup.head_eq_getLast_iff (P.nonempty c hc) + ((List.nodup_flatten.mp P.nodup).1 c hc)).mp hhe + exact hc1 (by simp [hz]) + have hxnew : x ∈ (P.orient f).reps := by + obtain ⟨rc, hrc, hxr⟩ := List.mem_flatten.mp hx + obtain ⟨d, hd, rfl⟩ := List.mem_map.mp hrc + have hdc : d ≠ c := by + intro he + subst d + exact hxc ((markedReps_sublist Q true c).subset hxr) + have hdnew : d ∈ (P.orient f).chains := by + rw [orient_chains] + exact List.mem_map.mpr ⟨d, hd, by simp [f, flipChain, hdc]⟩ + exact (P.orient f).rep_of_chain hdnew hxr + have hcnew : c.reverse ∈ (P.orient f).chains := by + rw [orient_chains] + exact List.mem_map.mpr ⟨c, hc, by simp [f, flipChain]⟩ + have hynew : y ∈ (P.orient f).reps := by + apply (P.orient f).rep_of_chain hcnew + have hh := markedReps_head Q (show c.reverse ≠ [] by simpa using P.nonempty c hc) + simpa using hh + exact ⟨f, y, List.mem_flatten.mpr ⟨c, hc, hyc⟩, hyR, hxnew, hynew⟩ + +theorem list_two_ne {α : Type*} {l : List α} (hn : l.Nodup) (hl : 2 ≤ l.length) (a : α) : + ∃ b ∈ l, b ≠ a := by + cases l with + | nil => simp at hl + | cons b l => + cases l with + | nil => simp at hl + | cons c l => + have hbc : b ≠ c := by + intro he + exact (List.nodup_cons.mp hn).1 (by simp [he]) + by_cases hba : b = a + · exact ⟨c, by simp, by intro he; exact hbc (hba.trans he.symm)⟩ + · exact ⟨b, by simp, hba⟩ + +theorem PathSystem.extra_rep {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) (hu : 2 ≤ P.usedChains.length) {x : V} (hx : x ∈ P.reps) : + ∃ f : List V → Bool, ∃ y : V, y ∈ P.chains.flatten ∧ y ∉ P.reps ∧ + x ∈ (P.orient f).reps ∧ y ∈ (P.orient f).reps := by + classical + obtain ⟨d, hd, hxd⟩ := List.mem_flatten.mp (P.reps_sublist.subset hx) + obtain ⟨c, hc, hcd⟩ := list_two_ne (P.chains_nodup.filter _) hu d + have hc' : c ∈ P.chains ∧ c.length ≠ 1 := by simpa [PathSystem.usedChains] using hc + exact P.reverse_other_rep hc'.1 hc'.2 hx (fun hxc => + List.disjoint_left.mp (P.chains_disjoint hc'.1 hd hcd) hxc hxd) + +theorem terminal_classification_numeric {t k L e v d : ℕ} + (ht : 9 ≤ t) (hkt : k ≤ 2*t+1) (hL : L + t = k) + (hve : v ≤ 2*e) (hdL : d*e ≤ L) (htv : t ≤ v+d) + (hd : 2 ≤ d) (hd6 : d ≤ 6) : + (d = 2 ∧ t ≤ v + 2) ∨ + (d = 3 ∧ ((t = 9 ∧ e = 3 ∧ v = 6) ∨ (t = 11 ∧ e = 4 ∧ v = 8))) ∨ + (d = 5 ∧ t = 9 ∧ k = 19 ∧ e = 2 ∧ v = 4) := by + interval_cases d + · exact Or.inl ⟨rfl, htv⟩ + · have htt : t ≤ 11 := by nlinarith + interval_cases t + · exact Or.inr (Or.inl ⟨rfl, Or.inl ⟨rfl, by omega, by omega⟩⟩) + · omega + · exact Or.inr (Or.inl ⟨rfl, Or.inr ⟨rfl, by omega, by omega⟩⟩) + · have htt : t ≤ 9 := by nlinarith + omega + · have htt : t ≤ 9 := by nlinarith + exact Or.inr (Or.inr ⟨rfl, by omega, by omega, by omega, by omega⟩) + · have htt : t ≤ 9 := by nlinarith + omega + +@[simp] theorem PathSystem.orient_vertices {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) (f : List V → Bool) : (P.orient f).vertices = P.vertices := by + ext x + exact (P.orient_perm f).mem_iff + +theorem PathSystem.representatives_subset {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) : P.representatives ⊆ P.vertices := P.reps_sublist.subset + + + +structure LargeSystem {V : Type*} [Fintype V] (G : SimpleGraph V) (Q : Set V) + (k : ℕ) (P : PathSystem G Q) : Prop where + optimal : P.Optimal k + clique : G.IsClique Q + no_cycle : ¬ SimpleGraph.cycleGraph (k + 1) ⊑ G + nine : 9 ≤ Q.ncard + le_k : Q.ncard ≤ k + k_le : k ≤ 2 * Q.ncard + 1 + maximal : G.cliqueNum ≤ Q.ncard + independent : G.indepNum ≤ k + expansion : ∀ I : Set V, G.IsIndepSet I → I.Nonempty → + k * I.ncard + 1 ≤ (closedNeighborhood G I).ncard + +namespace LargeSystem +variable {V : Type*} [Fintype V] {G : SimpleGraph V} {Q : Set V} {k : ℕ} + {P : PathSystem G Q} (H : LargeSystem G Q k P) +include H + + theorem degree (x : V) : k + 1 ≤ (closedNeighborhood G {x}).ncard := by + simpa using H.expansion {x} (by simp) (Set.singleton_nonempty x) + + theorem vertices_le : P.vertices.ncard ≤ k := by + rw [P.vertices_ncard] + have hh := H.optimal.1 + have hk := H.le_k + omega + + theorem orient (f : List V → Bool) : LargeSystem G Q k (P.orient f) := + ⟨(P.orient_optimal f).mpr H.optimal, H.clique, H.no_cycle, H.nine, H.le_k, + H.k_le, H.maximal, H.independent, H.expansion⟩ + + theorem no_one {x y : V} (hx : x ∈ P.reps) (hy : y ∈ P.reps) : + ¬ OutsidePath G P.vertices x y 1 := + P.no_one_representatives H.optimal (by have := H.nine; have := H.le_k; omega) + H.clique H.no_cycle H.le_k hx hy + + theorem misses_reps {x : V} (hx : x ∈ P.reps) : + ∀ u ∈ outsideBall G P.vertices x 0, ∀ z ∈ P.representatives \ {x}, ¬ G.Adj u z := by + apply outsideBall_misses_representatives P.representatives_subset hx + intro y hy d hd hd' + have he : d = 1 := by omega + subst d + exact H.no_one hx hy + + theorem extra_degree {x y : V} (hx : x ∈ P.reps) (hy : y ∈ P.vertices) + (hyR : y ∉ P.reps) + (hmiss : ∀ u ∈ outsideBall G P.vertices x 0, ¬ G.Adj u y) : + Q.ncard + 1 ≤ (outsideBall G P.vertices x 1).ncard := by + let Z := insert y (P.representatives \ {x}) + have ht : 1 ≤ Q.ncard := by have := H.nine; omega + have hc : Z.ncard = Q.ncard := by + rw [Set.ncard_insert_of_notMem (by exact fun h => hyR h.1), + Set.ncard_sdiff_singleton_of_mem (show x ∈ P.representatives from hx), P.representatives_ncard] + omega + have hZ : Z ⊆ P.vertices := by + intro z hz + rcases hz with rfl | hz + · exact hy + · exact P.representatives_subset hz.1 + have hb := outsideBall_degree_bound (P.representatives_subset hx) H.vertices_le hZ H.degree + (by + intro u hu z hz + rcases hz with rfl | hz + · exact hmiss u hu + · exact H.misses_reps hx u hu z hz) + rw [hc] at hb + have hs := H.vertices_le + omega + + theorem interior_degree {x : V} (hx : x ∈ P.reps) (hxQ : x ∉ Q) : + Q.ncard + 1 ≤ (outsideBall G P.vertices x 1).ncard := by + obtain ⟨c, hc, A, B, y, he, hyR⟩ := P.interior_rep_next hx hxQ + have hy : y ∈ P.vertices := List.mem_flatten.mpr ⟨c, hc, by simp [he]⟩ + apply H.extra_degree hx hy hyR + apply outside_ball_misses (P.representatives_subset hx) hy + (by intro heq; exact hyR (heq ▸ hx)) + intro d hd hd' + have hd1 : d = 1 := by omega + subst d + exact P.no_one_consecutive H.optimal (by have := H.nine; have := H.le_k; omega) + H.clique H.no_cycle H.le_k hc A B he + + theorem reverse_degree {x : V} (hx : x ∈ P.reps) + (he : ∃ f : List V → Bool, ∃ y : V, y ∈ P.chains.flatten ∧ y ∉ P.reps ∧ + x ∈ (P.orient f).reps ∧ y ∈ (P.orient f).reps) : + Q.ncard + 1 ≤ (outsideBall G P.vertices x 1).ncard := by + obtain ⟨f, y, hy, hyR, hx', hy'⟩ := he + apply H.extra_degree hx hy hyR + apply outside_ball_misses (P.representatives_subset hx) hy + (by intro heq; exact hyR (heq ▸ hx)) + intro d hd hd' + have hd1 : d = 1 := by omega + subst d + simpa using (H.orient f).no_one hx' hy' + + theorem two_chains_degree (hu : 2 ≤ P.usedChains.length) {x : V} (hx : x ∈ P.reps) : + Q.ncard + 1 ≤ (outsideBall G P.vertices x 1).ncard := + H.reverse_degree hx (P.extra_rep hu hx) + + theorem first_nonclique {x : V} (hb : Q.ncard + 1 ≤ (outsideBall G P.vertices x 1).ncard) : + ¬ G.IsClique (outsideBall G P.vertices x 1) := by + intro hc + have hh := (clique_ncard_le_cliqueNum hc).trans H.maximal + omega + + theorem first_pair {x : V} (hb : Q.ncard + 1 ≤ (outsideBall G P.vertices x 1).ncard) : + 2 ≤ independence G (outsideBall G P.vertices x 1) := by + by_contra! hn + exact H.first_nonclique hb (clique_of_independence_le_one (by omega)) + +end LargeSystem + + + +theorem sum_independence_local {V : Type*} [Fintype V] {ι : Type*} + (G : SimpleGraph V) (D : ι → Set V) (F : Finset ι) + (hdis : ∀ i ∈ F, ∀ j ∈ F, i ≠ j → Disjoint (D i) (D j)) + (hsep : ∀ i ∈ F, ∀ j ∈ F, i ≠ j → + ∀ x ∈ D i, ∀ y ∈ D j, ¬ G.Adj x y) : + ∑ i ∈ F, independence G (D i) ≤ G.indepNum := by + classical + have hh : ∑ i ∈ F, independence G (D i) ≤ independence G (⋃ i ∈ F, D i) := by + induction F using Finset.induction_on with + | empty => simp + | @insert i F hi ih => + have hu : (⋃ j ∈ insert i F, D j) = D i ∪ ⋃ j ∈ F, D j := by simp + rw [hu, Finset.sum_insert hi] + have hD : Disjoint (D i) (⋃ j ∈ F, D j) := by + apply Set.disjoint_left.mpr + intro v hvi hvF + obtain ⟨j, hj, hvj⟩ := Set.mem_iUnion₂.mp hvF + exact Set.disjoint_left.mp + (hdis i (by simp) j (by simp [hj]) (by intro he; subst j; exact hi hj)) hvi hvj + calc + _ ≤ independence G (D i) + independence G (⋃ j ∈ F, D j) := by + exact Nat.add_le_add_left (ih + (fun j hj l hl hne => hdis j (by simp [hj]) l (by simp [hl]) hne) + (fun j hj l hl hne => hsep j (by simp [hj]) l (by simp [hl]) hne)) _ + _ ≤ _ := independence_add_le Set.subset_union_left Set.subset_union_right hD (by + intro x hx y hy + obtain ⟨j, hj, hyj⟩ := Set.mem_iUnion₂.mp hy + exact hsep i (by simp) j (by simp [hj]) + (by intro he; subst j; exact hi hj) x hx y hyj) + exact hh.trans (by simpa only [independence_univ] using + (independence_mono (G := G) (Set.subset_univ (⋃ i ∈ F, D i)))) + + theorem packing_balls {V : Type*} [Fintype V] {G : SimpleGraph V} {X : Set V} + (F : Finset V) (r w : V → ℕ) (hF : ∀ x ∈ F, x ∈ X) + (hno : ∀ x ∈ F, ∀ y ∈ F, x ≠ y → ∀ d, 1 ≤ d → d ≤ r x + r y + 2 → + ¬ OutsidePath G X x y d) + (hweight : ∀ x ∈ F, w x ≤ independence G (outsideBall G X x (r x))) : + ∑ x ∈ F, w x ≤ G.indepNum := by + have hh := sum_independence_local G (fun x => outsideBall G X x (r x)) F + (fun x hx y hy hxy => (outside_balls_separated (hF x hx) (hF y hy) hxy (hno x hx y hy hxy)).1) + (fun x hx y hy hxy => (outside_balls_separated (hF x hx) (hF y hy) hxy (hno x hx y hy hxy)).2) + exact (Finset.sum_le_sum hweight).trans hh + +abbrev PathSystem.missing {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) : Set V := {x | [x] ∈ P.chains} + + theorem PathSystem.missing_eq_flat {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) : P.missing = {x | x ∈ P.singletons.flatten} := by + classical + ext x + constructor + · intro hx + exact List.mem_flatten.mpr ⟨[x], by simpa [PathSystem.singletons] using hx, by simp⟩ + · intro hx + obtain ⟨c, hc, hxc⟩ := List.mem_flatten.mp hx + have hcf : c ∈ P.chains ∧ c.length = 1 := by simpa [PathSystem.singletons] using hc + obtain ⟨y, rfl⟩ := List.length_eq_one_iff.mp hcf.2 + have he : x = y := by simpa using hxc + simpa [he] using hcf.1 + + theorem PathSystem.missing_subset_reps {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) : P.missing ⊆ P.representatives := by + intro x hx + exact P.rep_of_chain hx (by simp [markedReps]) + + theorem PathSystem.missing_subset_Q {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) : P.missing ⊆ Q := by + intro x hx + exact (P.ends [x] hx).1 x (by simp) + + theorem PathSystem.missing_ncard {V : Type*} [Fintype V] {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) : P.missing.ncard = P.singletons.length := by + classical + have he : P.missing = (↑P.singletons.flatten.toFinset : Set V) := by + rw [P.missing_eq_flat] + ext; simp + rw [he, Set.ncard_coe_finset, List.toFinset_card_of_nodup, P.singleton_flat_length] + exact ((List.filter_sublist).flatten).nodup P.nodup + + theorem PathSystem.incident_add_missing {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : + P.incident + P.missing.ncard = Q.ncard := by + rw [P.missing_ncard] + dsimp [PathSystem.incident] + exact Nat.sub_add_cancel P.singletons_length_le + + theorem PathSystem.amount_pos_used {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) (ha : 0 < P.amount) : + 0 < P.usedChains.length := by + by_contra! hn + have he : P.usedChains = [] := List.length_eq_zero_iff.mp (by omega) + have hh := P.partition.flatten.length_eq + simp only [he, List.nil_append, P.singleton_flat_length] at hh + have hle := P.singletons_length_le + have hf := P.flat_length + omega + + theorem PathSystem.singleton_extra_rep {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) (ha : 0 < P.amount) + {x : V} (hx : x ∈ P.missing) : + ∃ f : List V → Bool, ∃ y : V, y ∈ P.chains.flatten ∧ y ∉ P.reps ∧ + x ∈ (P.orient f).reps ∧ y ∈ (P.orient f).reps := by + classical + obtain ⟨c, hc⟩ := List.exists_mem_of_ne_nil P.usedChains + (List.length_pos_iff.mp (P.amount_pos_used ha)) + have hcf : c ∈ P.chains ∧ c.length ≠ 1 := by simpa [PathSystem.usedChains] using hc + apply P.reverse_other_rep hcf.1 hcf.2 (P.missing_subset_reps hx) + intro hxc + have hn : c ≠ [x] := by intro he; simp [he] at hcf + exact List.disjoint_left.mp (P.chains_disjoint hcf.1 hx hn) hxc (by simp) + + theorem PathSystem.interior_representatives_ncard {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : + (P.representatives \ Q).ncard = P.edgeCount := by + classical + have he : P.representatives \ Q = + (↑(P.reps.filter (fun x => x ∉ Q)).toFinset : Set V) := by ext; simp + rw [he, Set.ncard_coe_finset, List.toFinset_card_of_nodup + ((P.reps_sublist.nodup P.nodup).filter _), P.interior_reps_length] + +namespace LargeSystem +variable {V : Type*} [Fintype V] {G : SimpleGraph V} {Q : Set V} {k : ℕ} + {P : PathSystem G Q} (H : LargeSystem G Q k P) +include H + + theorem two_large_first (h2t : 2 * Q.ncard ≤ k) : + ∃ x ∈ P.reps, ∃ y ∈ P.reps, x ≠ y ∧ + Q.ncard + 1 ≤ (outsideBall G P.vertices x 1).ncard ∧ + Q.ncard + 1 ≤ (outsideBall G P.vertices y 1).ncard := by + have ht := H.nine + by_cases hs : P.vertices.ncard < k + · have ha : ∀ x ∈ P.reps, Q.ncard + 1 ≤ (outsideBall G P.vertices x 1).ncard := by + intro x hx + have hb := outsideBall_degree_bound (P.representatives_subset hx) H.vertices_le + (show P.representatives \ {x} ⊆ P.vertices from Set.sdiff_subset.trans P.representatives_subset) + H.degree (H.misses_reps hx) + rw [Set.ncard_sdiff_singleton_of_mem (show x ∈ P.representatives from hx), + P.representatives_ncard] at hb + omega + obtain ⟨x, hx, y, hy, hxy⟩ := (Set.one_lt_ncard).mp (show 1 < P.representatives.ncard by + rw [P.representatives_ncard]; omega) + exact ⟨x, hx, y, hy, hxy, ha x hx, ha y hy⟩ + · have hs : P.vertices.ncard = k := by have := H.vertices_le; omega + have hL : 0 < P.amount := by rw [P.vertices_ncard] at hs; omega + by_cases he : 2 ≤ P.edgeCount + · obtain ⟨x, hx, y, hy, hxy⟩ := (Set.one_lt_ncard).mp + (show 1 < (P.representatives \ Q).ncard by rw [P.interior_representatives_ncard]; omega) + exact ⟨x, hx.1, y, hy.1, hxy, H.interior_degree hx.1 hx.2, H.interior_degree hy.1 hy.2⟩ + · have hmiss : 2 ≤ P.missing.ncard := by + have hv := P.incident_le_twice_edgeCount + have hc := P.incident_add_missing + omega + obtain ⟨x, hx, y, hy, hxy⟩ := (Set.one_lt_ncard).mp (show 1 < P.missing.ncard by omega) + exact ⟨x, P.missing_subset_reps hx, y, P.missing_subset_reps hy, hxy, + H.reverse_degree (P.missing_subset_reps hx) (P.singleton_extra_rep hL hx), + H.reverse_degree (P.missing_subset_reps hy) (P.singleton_extra_rep hL hy)⟩ + + + theorem short : ∃ x ∈ P.reps, ∃ y ∈ P.reps, ∃ d, 2 ≤ d ∧ d ≤ 6 ∧ + OutsidePath G P.vertices x y d := by + classical + by_contra hn + have hno : ∀ x ∈ P.reps, ∀ y ∈ P.reps, ∀ d, 1 ≤ d → d ≤ 6 → + ¬ OutsidePath G P.vertices x y d := by + intro x hx y hy d hd hd' hp + by_cases hd1 : d = 1 + · subst d; exact H.no_one hx hy hp + · exact hn ⟨x, hx, y, hy, d, by omega, hd', hp⟩ + have hmiss : ∀ x ∈ P.reps, ∀ u ∈ outsideBall G P.vertices x 1, + ∀ z ∈ P.representatives \ {x}, ¬ G.Adj u z := by + intro x hx + apply outsideBall_misses_representatives P.representatives_subset hx + intro y hy d hd hd' + exact hno x hx y hy d hd (by omega) + have hpairs : ∀ x ∈ P.reps, 2 ≤ independence G (outsideBall G P.vertices x 2) := by + intro x hx + exact outsideBall_independent_pair P.representatives_subset hx P.representatives_ncard + H.vertices_le H.maximal H.degree (hmiss x hx) + let F := P.reps.toFinset + have hFc : F.card = Q.ncard := by + rw [List.toFinset_card_of_nodup (P.reps_sublist.nodup P.nodup), P.reps_length] + have hpack := packing_balls F (fun _ => 2) (fun _ => 2) + (fun x hx => P.representatives_subset (List.mem_toFinset.mp hx)) + (fun x hx y hy _ d hd hd' => hno x (List.mem_toFinset.mp hx) y + (List.mem_toFinset.mp hy) d hd (by omega)) + (fun x hx => hpairs x (List.mem_toFinset.mp hx)) + have h2t : 2 * Q.ncard ≤ k := by + have hi := H.independent + simpa only [Finset.sum_const, smul_eq_mul, hFc, Nat.mul_comm] using hpack.trans hi + obtain ⟨a, ha, b, hb, hab, haB, hbB⟩ := H.two_large_first h2t + have htriple : ∀ x ∈ P.reps, (x = a ∨ x = b) → + 3 ≤ independence G (outsideBall G P.vertices x 2) := by + intro x hx he + apply outsideBall_independent_triple (by have := H.nine; omega) (by have := H.nine; omega) + (by have := H.nine; omega) P.representatives_subset hx P.representatives_ncard + H.vertices_le H.maximal H.no_cycle H.expansion (hmiss x hx) + apply H.first_nonclique + rcases he with rfl | rfl + · exact haB + · exact hbB + let W : V → ℕ := fun x => 2 + if x ∈ ({a,b} : Finset V) then 1 else 0 + have hw : ∀ x ∈ F, W x ≤ independence G (outsideBall G P.vertices x 2) := by + intro x hx + have hxR := List.mem_toFinset.mp hx + dsimp [W] + split_ifs with he + · exact htriple x hxR (by simpa using he) + · simpa using hpairs x hxR + have hpack' := packing_balls F (fun _ => 2) W + (fun x hx => P.representatives_subset (List.mem_toFinset.mp hx)) + (fun x hx y hy _ d hd hd' => hno x (List.mem_toFinset.mp hx) y + (List.mem_toFinset.mp hy) d hd (by omega)) hw + have hsub : ({a,b} : Finset V) ⊆ F := by + intro x hx + simp only [Finset.mem_insert, Finset.mem_singleton] at hx + rcases hx with rfl | rfl <;> exact List.mem_toFinset.mpr (by assumption) + have hsum : ∑ x ∈ F, W x = 2 * Q.ncard + 2 := by + simp only [W, Finset.sum_add_distrib, Finset.sum_const, smul_eq_mul, hFc, + ← Finset.sum_filter] + have hfilter : F.filter (fun x => x ∈ ({a,b} : Finset V)) = {a,b} := by + ext x; simp only [Finset.mem_filter]; exact ⟨And.right, fun hx => ⟨hsub hx, hx⟩⟩ + rw [hfilter] + simp [hab, Nat.mul_comm] + rw [hsum] at hpack' + have hi := hpack'.trans H.independent + have hk := H.k_le + omega + +end LargeSystem + +namespace LargeSystem +variable {V : Type*} [Fintype V] {G : SimpleGraph V} {Q : Set V} {k : ℕ} + {P : PathSystem G Q} (H : LargeSystem G Q k P) +include H + + theorem short_information {x y : V} {d : ℕ} (hx : x ∈ P.reps) (hy : y ∈ P.reps) + (hd : 1 ≤ d) (hd6 : d ≤ 6) (hp : OutsidePath G P.vertices x y d) : + ∃ u v : List V, ∃ D : List (List V), ∃ F : List ℕ, + P.chains.Perm ((x :: u) :: (y :: v) :: D) ∧ + P.amount = k - Q.ncard ∧ 2 ≤ d ∧ + (D.filter (fun c => c.length = 1)).length + 2 ≤ d ∧ + AmountProfile P F ∧ ∀ a ∈ F, d ≤ a := by + obtain ⟨I, hIl, hI, hIn, hout⟩ := hp.to_list + have hI0 : I ≠ [] := by intro he; simp [he] at hIl; omega + have ho : ∀ z ∈ I, z ∉ Q := fun z hz hq => hout z hz (P.cover z hq) + simpa only [hIl] using P.short_representatives H.optimal H.clique H.no_cycle H.nine H.le_k H.k_le + hx hy hp.2.2.1 I hI (positive_interior_chain hI0 ho) hIn + (List.disjoint_left.mpr hout) hI0 (by omega) ho + + theorem short_heads {x y : V} {d : ℕ} (hx : x ∈ P.reps) (hy : y ∈ P.reps) + (hd : 1 ≤ d) (hd6 : d ≤ 6) (hp : OutsidePath G P.vertices x y d) : x ∈ Q ∧ y ∈ Q := by + obtain ⟨u, v, D, F, hP, _⟩ := H.short_information hx hy hd hd6 hp + exact ⟨(P.ends (x :: u) (hP.mem_iff.mpr (by simp))).1 x (by simp), + (P.ends (y :: v) (hP.mem_iff.mpr (by simp))).1 y (by simp)⟩ + + theorem no_short_interior {x y : V} (hx : x ∈ P.reps) (hy : y ∈ P.reps) (hxQ : x ∉ Q) + (d : ℕ) (hd : 1 ≤ d) (hd6 : d ≤ 6) : ¬ OutsidePath G P.vertices x y d := + fun hp => hxQ (H.short_heads hx hy hd hd6 hp).1 + + theorem no_short_step {c : List V} (hc : c ∈ P.chains) {x y : V} (A B : List V) + (he : c = A ++ x :: y :: B) (d : ℕ) (hd : 1 ≤ d) (hd6 : d ≤ 6) : + ¬ OutsidePath G P.vertices x y d := by + intro hp + obtain ⟨I, hIl, hI, hIn, hout⟩ := hp.to_list + have hI0 : I ≠ [] := by intro hi; simp [hi] at hIl; omega + have ho : ∀ z ∈ I, z ∉ Q := fun z hz hq => hout z hz (P.cover z hq) + exact P.not_short_consecutive H.optimal H.clique H.no_cycle H.nine H.le_k H.k_le hc A I B he + hI (positive_interior_chain hI0 ho) hIn (List.disjoint_left.mpr hout) hI0 (by omega) ho + + theorem parameter {x y : V} {d : ℕ} (hx : x ∈ P.reps) (hy : y ∈ P.reps) + (hd : 1 ≤ d) (hd6 : d ≤ 6) (hp : OutsidePath G P.vertices x y d) : + P.amount + Q.ncard = k ∧ (∃ A, AmountProfile P A ∧ ∀ a ∈ A, d ≤ a) ∧ + ((d = 2 ∧ Q.ncard ≤ P.incident + 2 ∧ P.missing ⊆ {x,y}) ∨ + (d = 3 ∧ ((Q.ncard = 9 ∧ P.edgeCount = 3 ∧ P.incident = 6) ∨ + (Q.ncard = 11 ∧ P.edgeCount = 4 ∧ P.incident = 8)) ∧ x ∈ P.missing ∧ y ∈ P.missing) ∨ + (d = 5 ∧ Q.ncard = 9 ∧ k = 19 ∧ P.edgeCount = 2 ∧ P.incident = 4 ∧ + x ∈ P.missing ∧ y ∈ P.missing)) := by + classical + obtain ⟨u, v, D, F, hP, hL, hd2, hD, hF, hFd⟩ := H.short_information hx hy hd hd6 hp + have hsk : P.amount + Q.ncard = k := by have := H.le_k; omega + have hcount := (hP.filter (fun c => decide (c.length = 1))).length_eq + change P.singletons.length = _ at hcount + have huc : ((x :: u).length = 1) ↔ u = [] := by simp + have hvc : ((y :: v).length = 1) ↔ v = [] := by simp + simp only [List.filter_cons, huc, hvc] at hcount + have hsingle : P.singletons.length ≤ (D.filter (fun c => c.length = 1)).length + 2 := by + split_ifs at hcount <;> (try simp only [List.length_cons] at hcount) <;> omega + have hvt : Q.ncard ≤ P.incident + d := by + have hh := P.incident_add_missing + rw [P.missing_ncard] at hh + omega + obtain ⟨hsum, hlen, _⟩ := hF.count + have hm : d * P.edgeCount ≤ P.amount := by simpa [hsum, hlen] using list_sum_lower F d hFd + have hc := terminal_classification_numeric H.nine H.k_le hsk P.incident_le_twice_edgeCount hm hvt hd2 hd6 + have hboth : P.singletons.length = d → x ∈ P.missing ∧ y ∈ P.missing := by + intro hs + have huv : u = [] ∧ v = [] := by + split_ifs at hcount with hu hv <;> (try simp only [List.length_cons] at hcount) <;> + first | exact ⟨of_decide_eq_true hu, of_decide_eq_true hv⟩ | omega + obtain ⟨rfl, rfl⟩ := huv + exact ⟨hP.mem_iff.mpr (by simp), hP.mem_iff.mpr (by simp)⟩ + refine ⟨hsk, ⟨F, hF, hFd⟩, ?_⟩ + rcases hc with hc | hc | hc + · refine Or.inl ⟨hc.1, hc.2, ?_⟩ + have hDz : D.filter (fun c => decide (c.length = 1)) = [] := List.length_eq_zero_iff.mp (by omega) + intro z hz + have hz' := hP.mem_iff.mp hz + simp only [List.mem_cons] at hz' + rcases hz' with he | he | hz' + · have hzx : z = x := List.cons.inj he |>.1 + exact Or.inl hzx + · have hzy : z = y := List.cons.inj he |>.1 + exact Or.inr hzy + · have hf : [z] ∈ D.filter (fun c => decide (c.length = 1)) := List.mem_filter.mpr ⟨hz', by simp⟩ + simp [hDz] at hf + · have hs : P.singletons.length = d := by + have hh := P.incident_add_missing + rw [P.missing_ncard] at hh + rcases hc.2 with h9 | h11 <;> omega + exact Or.inr (Or.inl ⟨hc.1, hc.2, hboth hs⟩) + · have hs : P.singletons.length = d := by + have hh := P.incident_add_missing + rw [P.missing_ncard] at hh + omega + exact Or.inr (Or.inr ⟨hc.1, hc.2.1, hc.2.2.1, hc.2.2.2.1, hc.2.2.2.2, hboth hs⟩) + + theorem at_least_two_chains : 2 ≤ P.usedChains.length := by + obtain ⟨x, hx, y, hy, d, hd, hd6, hp⟩ := H.short + obtain ⟨hL, ⟨A, hA, hAd⟩, hh⟩ := H.parameter hx hy (by omega) hd6 hp + obtain ⟨hs, hl, _⟩ := hA.count + have hm := list_sum_lower A d hAd + rw [hs, hl] at hm + have hve := P.incident_eq_edges_add_chains + have ht := H.nine + have hk := H.k_le + rcases hh with ⟨rfl, hv, _⟩ | ⟨rfl, hh, _⟩ | ⟨rfl, ht9, hk19, he, hv, _⟩ + · omega + · rcases hh with hh | hh <;> omega + · omega + + theorem second_triple (hk2 : 2 * Q.ncard ≤ k) {x : V} (hx : x ∈ P.reps) : + 3 ≤ independence G (outsideBall G P.vertices x 2) := by + have hp := H.first_pair (H.two_chains_degree H.at_least_two_chains hx) + obtain ⟨I, hIs, hI, hIc⟩ := exists_indep_of_independence G (outsideBall G P.vertices x 1) + have hIn : I.Nonempty := (Set.ncard_pos).mp (by omega) + have he := H.expansion I hI hIn + have hb := outside_neighborhood_bound hIs (Set.empty_subset P.vertices) (by simp) + simp only [Set.ncard_empty, Nat.add_zero, Nat.reduceAdd] at hb + have hs := H.vertices_le + have hm : 2 * k ≤ k * I.ncard := by nlinarith + apply size_test (by have := H.nine; omega) (by have := H.nine; omega) H.no_cycle H.maximal + omega + +end LargeSystem + + theorem PathSystem.incident_representatives_ncard {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : + (P.representatives \ P.missing).ncard = P.incident := by + have hh := Set.ncard_sdiff_add_ncard_of_subset P.missing_subset_reps + rw [P.representatives_ncard] at hh + have hc := P.incident_add_missing + omega + +namespace LargeSystem +variable {V : Type*} [Fintype V] {G : SimpleGraph V} {Q : Set V} {k : ℕ} + {P : PathSystem G Q} (H : LargeSystem G Q k P) +include H + + theorem exclude_two_missing (hL : P.amount + Q.ncard = k) + (hA : ∃ A, AmountProfile P A ∧ ∀ a ∈ A, 2 ≤ a) + (hv : Q.ncard ≤ P.incident + 2) (hM : P.missing.Nonempty) : False := by + classical + let J := P.representatives \ P.missing + have hJc : J.ncard = P.incident := P.incident_representatives_ncard + have hno : ∀ x ∈ J, ∀ y ∈ J, ∀ d, 1 ≤ d → d ≤ 6 → + ¬ OutsidePath G P.vertices x y d := by + intro x hx y hy d hd hd6 hp + obtain ⟨_, _, hc⟩ := H.parameter hx.1 hy.1 hd hd6 hp + rcases hc with ⟨_, _, hm⟩ | ⟨_, hh, _⟩ | ⟨_, ht9, _, _, hv4, _⟩ + · obtain ⟨z, hz⟩ := hM + rcases hm hz with he | he + · exact hx.2 (he ▸ hz) + · exact hy.2 (he ▸ hz) + · rcases hh with hh | hh <;> omega + · omega + obtain ⟨A, hA, hAs⟩ := hA + obtain ⟨hs, hl, _⟩ := hA.count + have hm := list_sum_lower A 2 hAs + rw [hs, hl] at hm + have hve := P.incident_le_twice_edgeCount + have hk2 : 2 * Q.ncard ≤ k + 2 := by omega + have hweights : ∀ x ∈ J, 3 ≤ independence G (outsideBall G P.vertices x 2) := by + intro x hx + have hpair := H.first_pair (H.two_chains_degree H.at_least_two_chains hx.1) + obtain ⟨I, hIs, hI, hIc⟩ := exists_indep_of_independence G (outsideBall G P.vertices x 1) + have he := H.expansion I hI ((Set.ncard_pos).mp (by omega)) + have hmiss : ∀ u ∈ I, ∀ z ∈ J \ {x}, ¬ G.Adj u z := by + intro u hu z hz + apply outside_ball_misses (P.representatives_subset hx.1) + (P.representatives_subset hz.1.1) (Ne.symm hz.2) _ u (hIs hu) + intro d hd hd' + exact hno x hx z hz.1 d hd (by omega) + have hb := outside_neighborhood_bound hIs + (show J \ {x} ⊆ P.vertices from fun z hz => P.representatives_subset hz.1.1) hmiss + rw [Set.ncard_sdiff_singleton_of_mem hx, hJc] at hb + norm_num only at hb + have hr := H.vertices_le + have he2 : 2 * k ≤ k * I.ncard := by nlinarith + apply size_test (by have := H.nine; have := H.le_k; omega) + (by have := H.nine; omega) H.no_cycle H.maximal + have ht := H.nine + change max k (2 * Q.ncard) < (outsideBall G P.vertices x 2).ncard + omega + have hp := packing_balls J.toFinset (fun _ => 2) (fun _ => 3) + (fun x hx => P.representatives_subset (Set.mem_toFinset.mp hx).1) + (fun x hx y hy _ d hd hd' => hno x (Set.mem_toFinset.mp hx) y + (Set.mem_toFinset.mp hy) d hd (by omega)) + (fun x hx => hweights x (Set.mem_toFinset.mp hx)) + have hh : 3 * P.incident ≤ k := by + have ha := hp.trans H.independent + simpa only [Finset.sum_const, smul_eq_mul, ← Set.ncard_eq_toFinset_card', hJc, Nat.mul_comm] using ha + have ht := H.nine + have hk := H.k_le + omega + + theorem exclude_three (hL : P.amount + Q.ncard = k) + (hA : ∃ A, AmountProfile P A ∧ ∀ a ∈ A, 3 ≤ a) + (hv : (Q.ncard = 9 ∧ P.edgeCount = 3 ∧ P.incident = 6) ∨ + (Q.ncard = 11 ∧ P.edgeCount = 4 ∧ P.incident = 8)) : False := by + classical + obtain ⟨A, hA, hAs⟩ := hA + obtain ⟨hs, hl, _⟩ := hA.count + have hm := list_sum_lower A 3 hAs + rw [hs, hl] at hm + have hk2 : 2 * Q.ncard ≤ k := by rcases hv with hv | hv <;> omega + have hMc : P.missing.ncard = 3 := by have hh := P.incident_add_missing; rcases hv with hv | hv <;> omega + obtain ⟨z, hz⟩ := (Set.ncard_pos).mp (show 0 < P.missing.ncard by omega) + let J := insert z (P.representatives \ P.missing) + have hJc : J.ncard = P.incident + 1 := by + rw [Set.ncard_insert_of_notMem (by exact fun h => h.2 hz), P.incident_representatives_ncard] + have hJR : J ⊆ P.representatives := by + intro x hx + rcases hx with rfl | hx + · exact P.missing_subset_reps hz + · exact hx.1 + have hJM : ∀ x ∈ J, x ∈ P.missing → x = z := by + intro x hx hxM + exact hx.elim id (fun h => (h.2 hxM).elim) + have hno : ∀ x ∈ J, ∀ y ∈ J, x ≠ y → ∀ d, 1 ≤ d → d ≤ 6 → + ¬ OutsidePath G P.vertices x y d := by + intro x hx y hy hxy d hd hd6 hp + obtain ⟨_, _, hc⟩ := H.parameter (hJR hx) (hJR hy) hd hd6 hp + rcases hc with ⟨_, hv', _⟩ | ⟨_, _, hxM, hyM⟩ | ⟨_, ht9, _, _, hv4, _⟩ + · rcases hv with hv | hv <;> omega + · exact hxy ((hJM x hx hxM).trans (hJM y hy hyM).symm) + · rcases hv with hv | hv <;> omega + have hp := packing_balls J.toFinset (fun _ => 2) (fun _ => 3) + (fun x hx => P.representatives_subset (hJR (Set.mem_toFinset.mp hx))) + (fun x hx y hy hxy d hd hd' => hno x (Set.mem_toFinset.mp hx) y + (Set.mem_toFinset.mp hy) hxy d hd (by omega)) + (fun x hx => H.second_triple hk2 (hJR (Set.mem_toFinset.mp hx))) + have hh : 3 * (P.incident + 1) ≤ k := by + simpa only [Finset.sum_const, smul_eq_mul, ← Set.ncard_eq_toFinset_card', hJc, Nat.mul_comm] + using hp.trans H.independent + have hk := H.k_le + rcases hv with hv | hv <;> omega + + theorem exclude_five (ht : Q.ncard = 9) (hk : k = 19) (hv : P.incident = 4) : False := by + classical + let F := P.representatives.toFinset + let r : V → ℕ := fun x => 1 + if x ∈ P.missing then 0 else 1 + let w : V → ℕ := fun x => 2 + if x ∈ P.missing then 0 else 1 + have hF : ∀ x ∈ F, x ∈ P.reps := by + intro x hx + change x ∈ P.representatives + exact Set.mem_toFinset.mp hx + have hno : ∀ x ∈ F, ∀ y ∈ F, x ≠ y → ∀ d, 1 ≤ d → d ≤ r x + r y + 2 → + ¬ OutsidePath G P.vertices x y d := by + intro x hx y hy hxy d hd hd' hp + have hd6 : d ≤ 6 := by dsimp [r] at hd'; split_ifs at hd' <;> omega + obtain ⟨_, _, hc⟩ := H.parameter (hF x hx) (hF y hy) hd hd6 hp + rcases hc with ⟨_, hv', _⟩ | ⟨_, hh, _⟩ | ⟨rfl, _, _, _, _, hxM, hyM⟩ + · omega + · rcases hh with hh | hh <;> omega + · simp only [r, ite_eq_left hxM, ite_eq_left hyM] at hd' + omega + have hw : ∀ x ∈ F, w x ≤ independence G (outsideBall G P.vertices x (r x)) := by + intro x hx + by_cases hxM : x ∈ P.missing + · simpa only [w, r, ite_eq_left hxM, Nat.add_zero] using H.first_pair (H.two_chains_degree H.at_least_two_chains (hF x hx)) + · simpa only [w, r, ite_eq_right hxM, Nat.reduceAdd] using H.second_triple (by omega) (hF x hx) + have hpack := packing_balls F r w (fun x hx => P.representatives_subset (hF x hx)) hno hw + have hfilter : F.filter (fun x => x ∉ P.missing) = (P.representatives \ P.missing).toFinset := by + ext x + simp [F] + have hsum : ∑ x ∈ F, w x = 22 := by + simp only [w, Finset.sum_add_distrib, Finset.sum_const, smul_eq_mul] + have hi : (∑ x ∈ F, if x ∈ P.missing then 0 else 1) = + (F.filter (fun x => x ∉ P.missing)).card := by + rw [Finset.card_filter] + apply Finset.sum_congr rfl + intro x _ + split_ifs <;> simp_all + rw [hi, hfilter] + simp only [F, ← Set.ncard_eq_toFinset_card', P.representatives_ncard, + P.incident_representatives_ncard, ht, hv] + rw [hsum] at hpack + have hi := H.independent + omega + +end LargeSystem + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/LongPaths.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/LongPaths.lean new file mode 100644 index 0000000000000000000000000000000000000000..400b7a7133ea82f62b97a3ddd43a1571e7d14409 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/LongPaths.lean @@ -0,0 +1,129 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.ColouredPaths + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +theorem path_close_cycle {V : Type*} {G : SimpleGraph V} {x y : V} + (p : G.Walk x y) (hp : p.IsPath) (hlen : 2 ≤ p.length) (hyx : G.Adj y x) : + (SimpleGraph.Walk.cons hyx p).IsCycle := by + apply (p.cons_isCycle_iff hyx).mpr + refine ⟨hp, ?_⟩ + intro he + have hn := hp.length_eq_one_of_mem_edges (by simpa only [Sym2.eq_swap] using he) + omega + + + +theorem extend_nonspanning_cycle {V : Type*} {G : SimpleGraph V} + (hconn : G.Connected) {x : V} (c : G.Walk x x) (hc : c.IsCycle) + (hout : ∃ z, z ∉ c.support) : + ∃ u v, ∃ p : G.Walk u v, p.IsPath ∧ p.length = c.length := by + classical + obtain ⟨z, hz⟩ := hout + obtain ⟨w⟩ := hconn.preconnected x z + obtain ⟨d, _, hd, hdz⟩ := w.exists_boundary_dart {v | v ∈ c.support} c.start_mem_support hz + let q := c.rotate d.fst hd + have hq : q.IsCycle := hc.rotate hd + have hlen : q.length = c.length := c.length_rotate _ _ + have hnot : d.snd ∉ q.tail.reverse.support := by + intro hm + have hm₁ : d.snd ∈ q.tail.support := by + simpa only [SimpleGraph.Walk.support_reverse, List.mem_reverse] using hm + have hm₂ : d.snd ∈ q.support := q.isSubwalk_rfl.tail.support_subset hm₁ + exact hdz ((c.mem_support_rotate_iff _ _).mp hm₂) + let p := SimpleGraph.Walk.cons d.adj.symm q.tail.reverse + refine ⟨d.snd, _, p, ?_, ?_⟩ + · exact hq.isPath_tail.reverse.cons hnot + · have hl := hc.three_le_length + simp only [p, SimpleGraph.Walk.length_cons, SimpleGraph.Walk.length_reverse, + SimpleGraph.Walk.length_tail, hlen] + omega + + + +theorem long_path_min_degree {V : Type*} [Fintype V] {G : SimpleGraph V} + [DecidableRel G.Adj] {d : ℕ} (hd : 2 ≤ d) (hconn : G.Connected) + (hdegree : ∀ v, d ≤ G.degree v) : + ∃ x y, ∃ p : G.Walk x y, p.IsPath ∧ min (Fintype.card V) (2 * d + 1) ≤ p.length + 1 := by + classical + let : Nonempty V := hconn.nonempty + obtain ⟨x, y, p, hp, hmax⟩ := SimpleGraph.Walk.exists_isPath_forall_isPath_length_le_length G + refine ⟨x, y, p, hp, ?_⟩ + by_contra hn + have hlen : p.length < 2 * d := by omega + have horder : p.length + 1 < Fintype.card V := by omega + let W : Set V := {v | v ∈ p.support} + have hWcard : W.ncard = p.length + 1 := by + have heq : W = (p.support.toFinset : Set V) := by ext v; simp [W] + rw [heq, Set.ncard_coe_finset, List.toFinset_card_of_nodup hp.support_nodup, + SimpleGraph.Walk.length_support] + have hnb : ∀ v, G.Adj y v → v ∈ p.support := + longest_path_endpoint_neighbors p hp (fun v q hq => hmax x v q hq) + have hxnb : ∀ v, G.Adj x v → v ∈ p.support := by + intro v hv + have := longest_path_endpoint_neighbors p.reverse hp.reverse + (fun v q hq => by simpa using hmax y v q hq) v hv + simpa using this + have hlower : d ≤ p.length := by + have hc := degree_add_one_le_of_neighbors_subset (G := G) (v := y) + (show y ∈ W from p.end_mem_support) (fun v hv => hnb v hv) + rw [hWcard] at hc + have := hdegree y + omega + let E := pathEnds G x p.support + have hE : d ≤ E.ncard := + (hdegree y).trans (degree_le_card_pathEnds p hp (List.Perm.refl _) hnb) + have hxE : x ∉ E := pathEnds_no_start (by rw [SimpleGraph.Walk.length_support]; omega) + have hex : ∃ e, e ∈ E ∧ G.Adj x e := by + by_contra hne + push Not at hne + have hdis : Disjoint E (G.neighborSet x) := by + exact Set.disjoint_left.mpr (fun e he hn => hne e he hn) + have hins : insert x (E ∪ G.neighborSet x) ⊆ W := by + intro v hv + rcases hv with rfl | hv + · exact p.start_mem_support + · rcases hv with hv | hv + · exact mem_pathEnds_support hv + · exact hxnb v hv + have hnot : x ∉ E ∪ G.neighborSet x := by simp [hxE] + have hc := Set.ncard_le_ncard hins + rw [Set.ncard_insert_of_notMem hnot, Set.ncard_union_eq hdis, + ncard_neighborSet, hWcard] at hc + have hxdeg := hdegree x + omega + obtain ⟨e, he, hxe⟩ := hex + obtain ⟨q, hq, hperm⟩ := he + have hqlen : q.length = p.length := by + have := hperm.length_eq + simp only [SimpleGraph.Walk.length_support] at this + omega + let c := SimpleGraph.Walk.cons hxe.symm q + have hc : c.IsCycle := path_close_cycle q hq (by omega) hxe.symm + have hout : ∃ z, z ∉ c.support := by + have hnW : W ≠ Set.univ := by + intro heq + rw [heq, Set.ncard_univ, Nat.card_eq_fintype_card] at hWcard + omega + have houtW : ∃ z, z ∉ W := by + by_contra hh + push Not at hh + exact hnW (Set.eq_univ_of_forall hh) + obtain ⟨z, hz⟩ := houtW + refine ⟨z, ?_⟩ + intro hzc + simp only [c, SimpleGraph.Walk.support_cons, List.mem_cons] at hzc + rcases hzc with rfl | hzq + · exact hz (hperm.mem_iff.mp q.end_mem_support) + · exact hz (hperm.mem_iff.mp hzq) + obtain ⟨u, v, R, hR, hRlen⟩ := extend_nonspanning_cycle hconn c hc hout + have hh := hmax u v R hR + simp only [c, SimpleGraph.Walk.length_cons, hqlen] at hRlen + omega + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/LowerBound.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/LowerBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..86879b13d1b27626fcd9b80e307954d1f8c3a9ce --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/LowerBound.lean @@ -0,0 +1,88 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.Exceptional + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +theorem RamseyProperty.on_fintype {m n N : ℕ} (h : RamseyProperty m n N) + {V : Type*} [Fintype V] (hNV : N ≤ Fintype.card V) (G : SimpleGraph V) : + SimpleGraph.cycleGraph m ⊑ G ∨ (⊤ : SimpleGraph (Fin n)) ⊑ Gᶜ := by + classical + obtain ⟨f⟩ := Function.Embedding.nonempty_of_card_le (show Fintype.card (Fin N) ≤ + Fintype.card V by simpa using hNV) + let H := G.comap f + have hc : H ⊑ G := ⟨⟨⟨f, fun {a b} hab => hab⟩, f.injective⟩⟩ + have hcc : Hᶜ ⊑ Gᶜ := by + refine ⟨⟨⟨f, fun {a b} hab => ?_⟩, f.injective⟩⟩ + exact ⟨fun heq => hab.1 (f.injective heq), hab.2⟩ + rcases h H with hcycle | hclique + · exact Or.inl (hcycle.trans hc) + · exact Or.inr (hclique.trans hcc) + + +def disjointCliques (a k : ℕ) : SimpleGraph (Fin a × Fin k) where + Adj u v := u.1 = v.1 ∧ u.2 ≠ v.2 + symm := ⟨fun _ _ h => ⟨h.1.symm, Ne.symm h.2⟩⟩ + loopless := ⟨fun _ h => h.2 rfl⟩ + + +theorem disjointCliques_walk_fiber {a k : ℕ} {u v : Fin a × Fin k} + (p : (disjointCliques a k).Walk u v) : u.1 = v.1 := by + induction p with + | nil => rfl + | cons h p ih => exact h.1.trans ih + + +theorem disjointCliques_no_cycle {m a k : ℕ} (hm : 0 < m) (hk : k < m) : + ¬ SimpleGraph.cycleGraph m ⊑ disjointCliques a k := by + rintro ⟨f⟩ + let x : Fin m := ⟨0, hm⟩ + have hfiber : ∀ i : Fin m, (f x).1 = (f i).1 := by + intro i + obtain ⟨p⟩ := SimpleGraph.cycleGraph_preconnected x i + exact disjointCliques_walk_fiber (p.map f.toHom) + have hinj : Function.Injective (fun i : Fin m => (f i).2) := by + intro i j hij + apply f.injective + exact Prod.ext ((hfiber i).symm.trans (hfiber j)) hij + have hc := Fintype.card_le_of_injective _ hinj + simp only [Fintype.card_fin] at hc + omega + + +theorem disjointCliques_no_compl_clique {n a k : ℕ} (ha : a < n) : + ¬ (⊤ : SimpleGraph (Fin n)) ⊑ (disjointCliques a k)ᶜ := by + rintro ⟨f⟩ + have hinj : Function.Injective (fun i : Fin n => (f i).1) := by + intro i j hij + by_contra hne + have hadj := f.toHom.map_adj (show (⊤ : SimpleGraph (Fin n)).Adj i j from hne) + apply hadj.2 + exact ⟨hij, fun heq => hne (f.injective (Prod.ext hij heq))⟩ + have hc := Fintype.card_le_of_injective _ hinj + simp only [Fintype.card_fin] at hc + omega + + +theorem ramsey_lower_counterexample {m n : ℕ} (hm : 1 ≤ m) (hn : 1 ≤ n) : + ¬ RamseyProperty m n ((m - 1) * (n - 1)) := by + intro h + have hd := h.on_fintype (G := disjointCliques (n - 1) (m - 1)) (by + simp only [Fintype.card_prod, Fintype.card_fin] + exact le_of_eq (Nat.mul_comm _ _)) + rcases hd with hc | hk + · exact disjointCliques_no_cycle (by omega) (by omega) hc + · exact disjointCliques_no_compl_clique (by omega) hk + + +theorem ramsey_property_lower_bound {m n N : ℕ} (hm : 1 ≤ m) (hn : 1 ≤ n) + (hN : RamseyProperty m n N) : (m - 1) * (n - 1) + 1 ≤ N := by + by_contra hnle + exact ramsey_lower_counterexample hm hn (hN.mono (by omega)) + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Main.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ca7db6cbb7948977107211580c0e1190c9b9048 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Main.lean @@ -0,0 +1,219 @@ +import OAI.Combinatorics.Ramsey.CycleClique.RamseyNumbers +import OAI.Combinatorics.Ramsey.CycleClique.Construction.All +import OAI.Combinatorics.Ramsey.CycleClique.Construction.GraphCopies +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.ColouredPaths +import OAI.Combinatorics.Ramsey.CycleClique.Exceptional +import OAI.Combinatorics.Ramsey.CycleClique.LowerBound +import OAI.Combinatorics.Ramsey.CycleClique.Independence +import OAI.Combinatorics.Ramsey.CycleClique.Minimality +import OAI.Combinatorics.Ramsey.CycleClique.InducedGraphs +import OAI.Combinatorics.Ramsey.CycleClique.Density +import OAI.Combinatorics.Ramsey.CycleClique.DistanceLayers +import OAI.Combinatorics.Ramsey.CycleClique.LongPaths +import OAI.Combinatorics.Ramsey.CycleClique.BreadthFirst +import OAI.Combinatorics.Ramsey.CycleClique.DenseCycles +import OAI.Combinatorics.Ramsey.CycleClique.IndependenceTwo +import OAI.Combinatorics.Ramsey.CycleClique.CycleShortening +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorPaths +import OAI.Combinatorics.Ramsey.CycleClique.PathSystems +import OAI.Combinatorics.Ramsey.CycleClique.OptimalSystems +import OAI.Combinatorics.Ramsey.CycleClique.MarkedChains +import OAI.Combinatorics.Ramsey.CycleClique.SystemInsertion +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorBalls +import OAI.Combinatorics.Ramsey.CycleClique.ChainProfiles +import OAI.Combinatorics.Ramsey.CycleClique.ChainRearrangement +import OAI.Combinatorics.Ramsey.CycleClique.LargeSystems +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.Certificates001 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates002 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates003 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates004 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates005 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates006 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates007 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates008 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates009 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates010 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates011 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates012 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates013 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates014 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates015 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates016 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates017 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates018 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates019 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates020 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates021 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates022 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates023 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates024 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates025 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates026 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates027 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates028 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates029 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates030 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates031 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates032 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates033 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates034 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates035 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates036 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates037 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates038 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates039 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates040 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates041 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates042 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates043 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates044 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates045 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates046 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates047 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates048 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates049 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates050 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates051 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates052 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates053 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates054 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates055 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates056 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates057 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates058 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates059 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates060 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates061 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates062 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates063 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates064 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates065 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates066 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates067 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates068 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates069 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates070 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates071 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates072 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates073 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates074 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates075 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates076 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates077 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates078 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates079 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates080 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates081 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates082 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates083 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates084 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates085 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates086 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates087 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates088 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates089 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates090 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates091 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates092 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates093 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates094 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates095 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates096 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates097 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns5x3 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns5x4 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns5x5 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns6x3 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns6x4 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns6x5 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns6x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns7x3 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns7x4 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns7x5 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns7x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns7x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns8x4 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns8x5 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns8x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns8x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns8x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns9x4 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns9x5 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns9x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns9x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns9x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns10x5 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns10x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns10x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns10x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns11x5 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns11x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns11x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns11x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns12x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns12x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns12x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns13x6 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns13x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns13x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns14x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns14x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns15x7 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns15x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns16x8 +import OAI.Combinatorics.Ramsey.CycleClique.Patterns17x8 +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorFrames +import OAI.Combinatorics.Ramsey.CycleClique.FrameProperties +import OAI.Combinatorics.Ramsey.CycleClique.FourCycles +import OAI.Combinatorics.Ramsey.CycleClique.ThreeCycles +import OAI.Combinatorics.Ramsey.CycleClique.StructuralReduction +import OAI.Combinatorics.Ramsey.CycleClique.FiniteRange +import OAI.Combinatorics.Ramsey.CycleClique.MainTheorem + +namespace OAI + +namespace CycleClique + +/-- The Hamiltonicity specialization for graphs with no independent triple. -/ +abbrev CEAlphaTwo := Construction.CEAlphaTwo + +/-- Chvátal–Erdős Hamiltonicity at order at least six, with independence at most two. -/ +theorem ceAlphaTwo_proved : CEAlphaTwo := Construction.ceAlphaTwo_proved + +/-- Exact cycle–clique Ramsey numbers away from the exceptional triangle pair. -/ +theorem cycle_clique_main_unconditional {m n : ℕ} + (hn : 3 ≤ n) (hnm : n ≤ m) (hexcept : (m, n) ≠ (3, 3)) : + IsRamseyNumber m n ((m - 1) * (n - 1) + 1) := + (Construction.isRamseyNumber_iff (by omega)).mp + (Construction.cycle_clique_main_unconditional hn hnm hexcept) + +/-- The exact least forcing order, including the exceptional value six. -/ +theorem cycle_clique_ramsey_unconditional {m n : ℕ} + (hn : 3 ≤ n) (hnm : n ≤ m) : + IsRamseyNumber m n (if m = 3 ∧ n = 3 then 6 else (m - 1) * (n - 1) + 1) := + (Construction.isRamseyNumber_iff (by omega)).mp + (Construction.cycle_clique_ramsey_unconditional hn hnm) + +/-- The labelled construction computes the same Ramsey number as graph containment. -/ +theorem cycleCliqueRamsey_unconditional {m n : ℕ} (hn : 3 ≤ n) (hnm : n ≤ m) : + cycleCliqueRamsey m n = + if m = 3 ∧ n = 3 then 6 else (m - 1) * (n - 1) + 1 := + cycleCliqueRamsey_eq_of_isRamseyNumber (cycle_clique_ramsey_unconditional hn hnm) + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/MainTheorem.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/MainTheorem.lean new file mode 100644 index 0000000000000000000000000000000000000000..d88afce3904260ef999b3928fbc43fd77286bdb4 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/MainTheorem.lean @@ -0,0 +1,47 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.Exceptional +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.FiniteRange +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +theorem thm_main : + (∀ m n : ℤ, n ≤ m → 3 ≤ n → (m, n) ≠ (3, 3) → + (cycleCliqueRamsey m.toNat n.toNat : ℤ) = (m - 1) * (n - 1) + 1) ∧ + cycleCliqueRamsey 3 3 = 6 := by + constructor + · intro m n hmn hn hne + have hmnN : n.toNat ≤ m.toNat := by omega + have hnN : 3 ≤ n.toNat := by omega + have hneN : (m.toNat, n.toNat) ≠ (3, 3) := by + intro he + have hm3 := congrArg Prod.fst he + have hn3 := congrArg Prod.snd he + have hm3' : m = 3 := by omega + have hn3' : n = 3 := by omega + exact hne (by simp [hm3', hn3']) + have h := main m.toNat n.toNat hmnN hnN hneN + have hmcast : ((m.toNat - 1 : ℕ) : ℤ) = m - 1 := by omega + have hncast : ((n.toNat - 1 : ℕ) : ℤ) = n - 1 := by omega + have hcast := congrArg (fun a : ℕ => (a : ℤ)) h + simpa only [Nat.cast_add, Nat.cast_mul, Nat.cast_one, hmcast, hncast] using hcast + · exact exceptional + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/MarkedChains.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/MarkedChains.lean new file mode 100644 index 0000000000000000000000000000000000000000..abbc8b3c523d41a47b07071b20edf31c251cb7eb --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/MarkedChains.lean @@ -0,0 +1,317 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.OptimalSystems +import OAI.Combinatorics.Ramsey.CycleClique.PathSystems + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph +attribute [local instance] Classical.propDecidable + +noncomputable def markedReps {V : Type*} (Q : Set V) (b : Bool) : List V → List V + | [] => [] + | a :: l => (if b then [a] else []) ++ markedReps Q (decide (a ∈ Q)) l + +theorem markedReps_sublist {V : Type*} (Q : Set V) (b : Bool) (c : List V) : + (markedReps Q b c).Sublist c := by + induction c generalizing b with + | nil => simp [markedReps] + | cons a c ih => + cases b <;> simp only [markedReps, Bool.false_eq_true, ↓reduceIte, + List.nil_append, List.singleton_append] + · exact (ih _).cons _ + · exact (ih _).cons_cons _ + +theorem markedReps_length {V : Type*} (Q : Set V) (b : Bool) (c : List V) + (hne : c ≠ []) (hend : ∀ a ∈ c.getLast?, a ∈ Q) : + (markedReps Q b c).length + 1 = c.countP (· ∈ Q) + (if b then 1 else 0) := by + induction c generalizing b with + | nil => contradiction + | cons a c ih => + cases c with + | nil => + have ha : a ∈ Q := hend a (by simp) + cases b <;> simp [markedReps, ha] + | cons d c => + have he : ∀ v ∈ (d :: c).getLast?, v ∈ Q := by simpa using hend + have hh := ih (decide (a ∈ Q)) (by simp) he + cases b <;> by_cases ha : a ∈ Q <;> + simp [markedReps, ha, List.countP_cons] at hh ⊢ <;> omega + + + +def MarkedCut {V : Type*} (Q : Set V) (b : Bool) (A : List V) : Prop := + (A = [] ∧ b = true) ∨ (A ≠ [] ∧ ∀ a ∈ A.getLast?, a ∈ Q) + +theorem markedCut_cons {V : Type*} {Q : Set V} {b : Bool} {a : V} {A : List V} : + MarkedCut Q (decide (a ∈ Q)) A ↔ MarkedCut Q b (a :: A) := by + cases A with + | nil => simp [MarkedCut] + | cons d A => simp [MarkedCut] + +theorem mem_markedReps {V : Type*} (Q : Set V) (b : Bool) (c : List V) (x : V) : + x ∈ markedReps Q b c ↔ ∃ A B, c = A ++ x :: B ∧ MarkedCut Q b A := by + induction c generalizing b with + | nil => simp [markedReps] + | cons a c ih => + simp only [markedReps, List.mem_append] + constructor + · rintro (h | h) + · have hb : b = true := by cases b <;> simp_all + have hx : x = a := by simpa [hb] using h + subst x + exact ⟨[], c, rfl, Or.inl ⟨rfl, hb⟩⟩ + · obtain ⟨A, B, h, hcut⟩ := (ih _).mp h + exact ⟨a :: A, B, by simp [h], markedCut_cons.mp hcut⟩ + · rintro ⟨A, B, h, hcut⟩ + cases A with + | nil => + have he : a = x ∧ c = B := by simpa using h + have hb : b = true := by simpa [MarkedCut] using hcut + simp [hb, he.1] + | cons d A => + have he : a = d ∧ c = A ++ x :: B := by simpa using h + rcases he with ⟨rfl, he⟩ + right + exact (ih _).mpr ⟨A, B, he, markedCut_cons.mpr hcut⟩ + +noncomputable def PathSystem.reps {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) : List V := (P.chains.map (markedReps Q true)).flatten + +theorem markedReps_flatten_sublist {V : Type*} (Q : Set V) (C : List (List V)) : + (C.map (markedReps Q true)).flatten.Sublist C.flatten := by + induction C with + | nil => simp + | cons c cs ih => + simp only [List.map_cons, List.flatten_cons] + exact (markedReps_sublist Q true c).append ih + +theorem PathSystem.reps_sublist {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) : P.reps.Sublist P.chains.flatten := + markedReps_flatten_sublist Q P.chains + +theorem markedReps_flatten_length {V : Type*} (Q : Set V) (C : List (List V)) + (hc : ∀ c ∈ C, c ≠ [] ∧ ∀ a ∈ c.getLast?, a ∈ Q) : + (C.map (markedReps Q true)).flatten.length = C.flatten.countP (· ∈ Q) := by + induction C with + | nil => simp + | cons c cs ih => + have he := markedReps_length Q true c (hc c (by simp)).1 (hc c (by simp)).2 + have ht := ih (fun l hl => hc l (by simp [hl])) + simp only [List.map_cons, List.flatten_cons, List.length_append, List.countP_append] + simp only [↓reduceIte] at he + omega + +theorem PathSystem.reps_length {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : P.reps.length = Q.ncard := + (markedReps_flatten_length Q P.chains + (fun c hc => ⟨P.nonempty c hc, (P.ends c hc).2⟩)).trans P.clique_count + +theorem markedCut_of_split {V : Type*} {Q : Set V} {b : Bool} {c A B : List V} {x : V} + (hn : c.Nodup) (hx : x ∈ markedReps Q b c) (hc : c = A ++ x :: B) : + MarkedCut Q b A := by + obtain ⟨A', B', hc', hcut⟩ := (mem_markedReps Q b c x).mp hx + have hh := List.nodup_append.mp (hc ▸ hn) + have hnA : x ∉ A := fun h => hh.2.2 x h x (by simp) rfl + have hnB : x ∉ B := (List.nodup_cons.mp hh.2.1).1 + have he := (List.append_cons_inj_of_notMem hnA hnB).mp (hc.symm.trans hc') + simpa only [he.1] using hcut + +theorem two_mem_ordered {V : Type*} {c : List V} {x y : V} + (hx : x ∈ c) (hy : y ∈ c) (hne : x ≠ y) : + (∃ A u v, c = A ++ (x :: u) ++ y :: v) ∨ + (∃ A u v, c = A ++ (y :: u) ++ x :: v) := by + obtain ⟨A, B, rfl⟩ := List.mem_iff_append.mp hx + have hy' : y ∈ A ∨ y ∈ B := by simpa [hne.symm] using hy + rcases hy' with h | h + · obtain ⟨C, D, rfl⟩ := List.mem_iff_append.mp h + exact Or.inr ⟨C, D, B, by simp only [List.append_assoc, List.cons_append]⟩ + · obtain ⟨C, D, rfl⟩ := List.mem_iff_append.mp h + exact Or.inl ⟨A, C, D, by simp only [List.append_assoc, List.cons_append]⟩ + +theorem markedCuts_ordered {V : Type*} {Q : Set V} {b : Bool} {c : List V} + {x y : V} (hn : c.Nodup) (hx : x ∈ markedReps Q b c) + (hy : y ∈ markedReps Q b c) (A u v : List V) + (hc : c = A ++ (x :: u) ++ y :: v) : + MarkedCut Q b A ∧ ∀ a ∈ (x :: u).getLast?, a ∈ Q := by + refine ⟨markedCut_of_split hn hx (by simpa only [List.append_assoc, List.cons_append] using hc), ?_⟩ + have hh := markedCut_of_split hn hy hc + rcases hh with ⟨hh, _⟩ | ⟨_, hh⟩ + · simp at hh + · simpa only [List.getLast?_append_of_ne_nil _ (by simp : x :: u ≠ [])] using hh + +noncomputable def prefixChains {V : Type*} (A : List V) : List (List V) := + if A = [] then [] else [A] + +@[simp] theorem prefixChains_flatten {V : Type*} (A : List V) : + (prefixChains A).flatten = A := by + by_cases h : A = [] <;> simp [prefixChains, h] + +theorem mem_prefixChains {V : Type*} {A c : List V} : + c ∈ prefixChains A ↔ c = A ∧ A ≠ [] := by + by_cases h : A = [] <;> simp [prefixChains, h] + +theorem prefixChains_length_le {V : Type*} (A : List V) : + (prefixChains A).length ≤ 1 := by + by_cases h : A = [] <;> simp [prefixChains, h] + +theorem prefix_ends {V : Type*} {Q : Set V} {b : Bool} {c A B : List V} + (hh : ∀ a ∈ c.head?, a ∈ Q) (hc : c = A ++ B) (hcut : MarkedCut Q b A) + (hA : A ≠ []) : + (∀ a ∈ A.head?, a ∈ Q) ∧ (∀ a ∈ A.getLast?, a ∈ Q) := by + constructor + · simpa only [hc, List.head?_append_of_ne_nil _ hA] using hh + · rcases hcut with ⟨h, _⟩ | ⟨_, h⟩ + · contradiction + · exact h + +structure ClosedChain {V : Type*} (G : SimpleGraph V) (Q : Set V) (c : List V) : Prop where + nonempty : c ≠ [] + edges : c.IsChain G.Adj + positive : c.IsChain (fun a b => a ∉ Q ∨ b ∉ Q) + ends : (∀ a ∈ c.head?, a ∈ Q) ∧ (∀ a ∈ c.getLast?, a ∈ Q) + +structure LooseTail {V : Type*} (G : SimpleGraph V) (Q : Set V) (c : List V) : Prop where + edges : c.IsChain G.Adj + positive : c.IsChain (fun a b => a ∉ Q ∨ b ∉ Q) + end_mem : ∀ a ∈ c.getLast?, a ∈ Q + +theorem PathSystem.closed_chain {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) {c : List V} (hc : c ∈ P.chains) : ClosedChain G Q c := + ⟨P.nonempty c hc, P.edges c hc, P.positive c hc, P.ends c hc⟩ + +theorem ClosedChain.cut {V : Type*} {G : SimpleGraph V} {Q : Set V} + {c A : List V} {x : V} {u : List V} (hc : ClosedChain G Q c) + (he : c = A ++ x :: u) (hcut : MarkedCut Q true A) : + (∀ d ∈ prefixChains A, ClosedChain G Q d) ∧ LooseTail G Q (x :: u) := by + have hed : (A ++ x :: u).IsChain G.Adj := he ▸ hc.edges + have hpo : (A ++ x :: u).IsChain (fun a b => a ∉ Q ∨ b ∉ Q) := he ▸ hc.positive + constructor + · intro d hd + obtain ⟨rfl, hA⟩ := mem_prefixChains.mp hd + exact ⟨hA, hed.left_of_append, hpo.left_of_append, prefix_ends hc.ends.1 he hcut hA⟩ + · refine ⟨hed.right_of_append, hpo.right_of_append, ?_⟩ + simpa only [he, List.getLast?_append_of_ne_nil _ (by simp : x :: u ≠ [])] using hc.ends.2 + +theorem perm_reorder_four {V : Type*} (A U B W D : List V) : + (U ++ W ++ (A ++ B ++ D)).Perm ((A ++ U) ++ (B ++ W) ++ D) := by + apply Multiset.coe_eq_coe.mp + simp only [← Multiset.coe_add] + ac_rfl + +theorem PathSystem.join_distinct_chains {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) + {c d : List V} (D : List (List V)) (hP : P.chains.Perm (c :: d :: D)) + {x y : V} (A u B v I : List V) (hc : c = A ++ x :: u) (hd : d = B ++ y :: v) + (hcutc : MarkedCut Q true A) (hcutd : MarkedCut Q true B) + (hI : (x :: I ++ [y]).IsChain G.Adj) + (hIp : (x :: I ++ [y]).IsChain (fun a b => a ∉ Q ∨ b ∉ Q)) + (hIn : I.Nodup) (hId : I.Disjoint P.chains.flatten) : + ∃ R : PathSystem G Q, R.amount = P.amount + I.length := by + have hcc := P.closed_chain (hP.mem_iff.mpr (by simp : c ∈ c :: d :: D)) + have hdd := P.closed_chain (hP.mem_iff.mpr (by simp : d ∈ c :: d :: D)) + obtain ⟨hA, hu⟩ := hcc.cut hc hcutc + obtain ⟨hB, hv⟩ := hdd.cut hd hcutd + let C := prefixChains A ++ prefixChains B ++ D + have hC : ∀ l ∈ C, ClosedChain G Q l := by + intro l hl + simp only [C, List.mem_append] at hl + rcases hl with (hl | hl) | hl + · exact hA l hl + · exact hB l hl + · exact P.closed_chain (hP.mem_iff.mpr (by simp [hl])) + have hperm : ((x :: u) ++ (y :: v) ++ C.flatten).Perm P.chains.flatten := by + apply List.Perm.trans _ hP.flatten.symm + simp only [C, List.flatten_append, prefixChains_flatten, List.flatten_cons, hc, hd] + simpa only [List.append_assoc] using perm_reorder_four A (x :: u) B (y :: v) D.flatten + obtain ⟨R, hR, _⟩ := P.join_tails C u v I hperm + (fun l hl => (hC l hl).nonempty) (fun l hl => (hC l hl).edges) + (fun l hl => (hC l hl).positive) (fun l hl => (hC l hl).ends) + hu.edges hv.edges hu.positive hv.positive hu.end_mem hv.end_mem hI hIp hIn hId + exact ⟨R, hR⟩ + +theorem PathSystem.join_same_chain {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) + {c : List V} (D : List (List V)) (hP : P.chains.Perm (c :: D)) + {x y : V} (A u v I : List V) (hc : c = A ++ (x :: u) ++ y :: v) + (hcut : MarkedCut Q true A) (hum : ∀ a ∈ (x :: u).getLast?, a ∈ Q) + (hI : (x :: I ++ [y]).IsChain G.Adj) + (hIp : (x :: I ++ [y]).IsChain (fun a b => a ∉ Q ∨ b ∉ Q)) + (hIn : I.Nodup) (hId : I.Disjoint P.chains.flatten) : + ∃ R : PathSystem G Q, R.amount = P.amount + I.length := by + have hcc := P.closed_chain (hP.mem_iff.mpr (by simp : c ∈ c :: D)) + obtain ⟨hA, hu⟩ := hcc.cut (by simpa only [List.append_assoc, List.cons_append] using hc) hcut + have he : ((x :: u) ++ y :: v).IsChain G.Adj := by simpa only [List.cons_append] using hu.edges + have hp : ((x :: u) ++ y :: v).IsChain (fun a b => a ∉ Q ∨ b ∉ Q) := by + simpa only [List.cons_append] using hu.positive + have hve : ∀ a ∈ (y :: v).getLast?, a ∈ Q := by + simpa only [hc, List.getLast?_append_of_ne_nil _ (by simp : y :: v ≠ [])] using hcc.ends.2 + let C := prefixChains A ++ D + have hC : ∀ l ∈ C, ClosedChain G Q l := by + intro l hl + simp only [C, List.mem_append] at hl + rcases hl with hl | hl + · exact hA l hl + · exact P.closed_chain (hP.mem_iff.mpr (by simp [hl])) + have hperm : ((x :: u) ++ (y :: v) ++ C.flatten).Perm P.chains.flatten := by + apply List.Perm.trans _ hP.flatten.symm + simp only [C, List.flatten_append, prefixChains_flatten, List.flatten_cons, hc] + apply Multiset.coe_eq_coe.mp + simp only [← Multiset.coe_add] + ac_rfl + obtain ⟨R, hR, _⟩ := P.join_tails C u v I hperm + (fun l hl => (hC l hl).nonempty) (fun l hl => (hC l hl).edges) + (fun l hl => (hC l hl).positive) (fun l hl => (hC l hl).ends) + he.left_of_append he.right_of_append hp.left_of_append hp.right_of_append + hum hve hI hIp hIn hId + exact ⟨R, hR⟩ + +theorem PathSystem.representative_replacement {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) {x y : V} + (hx : x ∈ P.reps) (hy : y ∈ P.reps) (hxy : x ≠ y) (I : List V) + (hI : (x :: I ++ [y]).IsChain G.Adj) + (hIp : (x :: I ++ [y]).IsChain (fun a b => a ∉ Q ∨ b ∉ Q)) + (hIn : I.Nodup) (hId : I.Disjoint P.chains.flatten) : + ∃ R : PathSystem G Q, R.amount = P.amount + I.length := by + classical + obtain ⟨rc, hrc, hxc⟩ := List.mem_flatten.mp hx + obtain ⟨c, hc, rfl⟩ := List.mem_map.mp hrc + obtain ⟨rd, hrd, hyd⟩ := List.mem_flatten.mp hy + obtain ⟨d, hd, rfl⟩ := List.mem_map.mp hrd + have hnc := (List.nodup_flatten.mp P.nodup).1 c hc + by_cases hcd : c = d + · subst d + have hp := List.perm_cons_erase hc + rcases two_mem_ordered ((markedReps_sublist Q true c).subset hxc) + ((markedReps_sublist Q true c).subset hyd) hxy with hh | hh + · obtain ⟨A, u, v, he⟩ := hh + obtain ⟨hA, hu⟩ := markedCuts_ordered hnc hxc hyd A u v he + exact P.join_same_chain (P.chains.erase c) hp A u v I he hA hu hI hIp hIn hId + · obtain ⟨A, u, v, he⟩ := hh + obtain ⟨hA, hu⟩ := markedCuts_ordered hnc hyd hxc A u v he + have hi : (y :: I.reverse ++ [x]).IsChain G.Adj := by + simpa only [List.reverse_cons, List.reverse_append, List.reverse_singleton, + List.singleton_append, List.append_assoc, List.reverse_nil, List.nil_append, List.cons_append] using + List.isChain_reverse.mpr (hI.imp (fun _ _ h => h.symm)) + have hip : (y :: I.reverse ++ [x]).IsChain (fun a b => a ∉ Q ∨ b ∉ Q) := by + simpa only [List.reverse_cons, List.reverse_append, List.reverse_singleton, + List.singleton_append, List.append_assoc, List.reverse_nil, List.nil_append, List.cons_append] using + List.isChain_reverse.mpr (hIp.imp (fun _ _ h => h.symm)) + obtain ⟨R, hR⟩ := P.join_same_chain (P.chains.erase c) hp A u v I.reverse he hA hu hi hip + (List.nodup_reverse.mpr hIn) (by simpa using hId) + exact ⟨R, by simpa using hR⟩ + · have hp₁ := List.perm_cons_erase hc + have hd' : d ∈ P.chains.erase c := (List.mem_erase_of_ne (Ne.symm hcd)).mpr hd + have hp₂ := List.perm_cons_erase hd' + have hp := hp₁.trans (hp₂.cons c) + obtain ⟨A, u, hec, hcutc⟩ := (mem_markedReps Q true c x).mp hxc + obtain ⟨B, v, hed, hcutd⟩ := (mem_markedReps Q true d y).mp hyd + exact P.join_distinct_chains ((P.chains.erase c).erase d) hp + A u B v I hec hed hcutc hcutd hI hIp hIn hId + +abbrev PathSystem.vertices {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) : Set V := {v | v ∈ P.chains.flatten} + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/MatrixBits.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/MatrixBits.lean new file mode 100644 index 0000000000000000000000000000000000000000..0a084f435d9c8af4b285cdb2255205971d101cae --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/MatrixBits.lean @@ -0,0 +1,74 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +def matrixBits : ForbiddenMatrix → ℕ → ℕ → ℕ + | [], _, _ => 0 + | (a,b,d) :: M, i, j => + if (a = i ∧ b = j) ∨ (a = j ∧ b = i) then 2^d ||| matrixBits M i j + else matrixBits M i j + +theorem matrixBits_spec (M : ForbiddenMatrix) (i j d : ℕ) : + (matrixBits M i j).testBit d = true ↔ matrixEntry M i j d := by + induction M with + | nil => simp [matrixBits, matrixEntry] + | cons c M ih => + rcases c with ⟨a,b,e⟩ + simp only [matrixBits, matrixEntry, List.mem_cons, Prod.mk.injEq] at * + split_ifs with he + · rw [Nat.testBit_lor, Nat.testBit_two_pow] + simp only [Bool.or_eq_true, decide_eq_true_eq, ih] + rcases he with ⟨rfl,rfl⟩ | ⟨rfl,rfl⟩ <;> tauto + · rw [ih] + tauto + +instance (priority := high) fastMatrixEntry (M : ForbiddenMatrix) (i j d : ℕ) : + Decidable (matrixEntry M i j d) := decidable_of_iff _ (matrixBits_spec M i j d) + +instance (priority := high) fastExcluded (n : ℕ) (M : ForbiddenMatrix) + (i lo hi : ℕ) (Z : Finset ℕ) : Decidable (Excluded n M i lo hi Z) := by + unfold Excluded + infer_instance + +instance (priority := high) fastBallValid (k t n : ℕ) (M : ForbiddenMatrix) (i : ℕ) + (B : BallCertificate) : Decidable (B.Valid k t n M i) := + match B with + | .zero Z b u => by unfold BallCertificate.Valid; infer_instance + | .succ p Z b u => by + unfold BallCertificate.Valid + exact @instDecidableAnd _ _ (fastBallValid k t n M i p) inferInstance + +instance (priority := high) fastPackingOptionValid (k t n : ℕ) + (M : ForbiddenMatrix) (o : PackingOption) : Decidable (o.Valid k t n M) := by + cases o <;> unfold PackingOption.Valid <;> infer_instance + +instance (priority := high) fastPackingCompatible (M : ForbiddenMatrix) + (a b : PackingOption) : Decidable (a.Compatible M b) := by + unfold PackingOption.Compatible + infer_instance + +instance (priority := high) fastPackingValid (k t n : ℕ) + (M : ForbiddenMatrix) (P : Finset PackingOption) : Decidable (PackingValid k t n M P) := by + unfold PackingValid + infer_instance + +instance (priority := high) fastCertificateValid (k t n : ℕ) (q : Finset ℕ) + (E : List (ℕ × ℕ)) (L e : ℕ) (M : ForbiddenMatrix) (C : FiniteCertificate) : + Decidable (C.Valid k t n q E L e M) := + match C with + | .system _ | .cycle _ | .packing _ | .edge _ _ => by unfold FiniteCertificate.Valid; infer_instance + | .forbid i j d R N => by + unfold FiniteCertificate.Valid + exact @instDecidableAnd _ _ inferInstance (@instDecidableAnd _ _ inferInstance + (@instDecidableAnd _ _ (fastCertificateValid k t (n+d) q (augmentedEdges n E i j d) L e M R) + (fastCertificateValid k t n q E L e ((i,j,d)::M) N))) + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Minimality.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Minimality.lean new file mode 100644 index 0000000000000000000000000000000000000000..b5212fa47fab8a0c15ee08690aeb02e7ffee3c21 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Minimality.lean @@ -0,0 +1,117 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.Independence +import OAI.Combinatorics.Ramsey.CycleClique.LowerBound + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +theorem ramsey_upper_zero (k : ℕ) : RamseyProperty (k + 1) 1 1 := by + intro G + right + refine ⟨⟨⟨id, ?_⟩, Function.injective_id⟩⟩ + intro a b hab + exact False.elim (hab (Subsingleton.elim a b)) + +theorem ramsey_upper_one (k : ℕ) : RamseyProperty (k + 1) 2 (k + 1) := by + classical + intro G + by_cases hblue : (⊤ : SimpleGraph (Fin 2)) ⊑ Gᶜ + · exact Or.inr hblue + left + have hi := (no_compl_clique_iff G 1).mp hblue + have htop : ∀ a b, a ≠ b → G.Adj a b := by + intro a b hab + by_contra hn + have hI : G.IsIndepSet {a, b} := by + intro x hx y hy hxy hxyadj + simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hx hy + rcases hx with rfl | rfl <;> rcases hy with rfl | rfl + · exact hxy rfl + · exact hn hxyadj + · exact hn hxyadj.symm + · exact hxy rfl + have hc := indep_ncard_le hI + rw [Set.ncard_pair hab] at hc + omega + exact ⟨⟨⟨id, fun {a b} hab => htop a b hab.ne⟩, Function.injective_id⟩⟩ + + + +theorem order_bound_from_ramsey {V : Type*} [Fintype V] {G : SimpleGraph V} + {k b : ℕ} (hR : RamseyProperty (k + 1) (b + 1) (k * b + 1)) + (hcycle : ¬ SimpleGraph.cycleGraph (k + 1) ⊑ G) (hα : G.indepNum ≤ b) : + Fintype.card V ≤ k * b := by + by_contra hn + rcases hR.on_fintype (by omega) G with hc | hb + · exact hcycle hc + · exact (no_compl_clique_iff G b).mpr hα hb + + +theorem expansion_of_minimality {k a : ℕ} (G : SimpleGraph (Fin (k * a + 1))) + (hcycle : ¬ SimpleGraph.cycleGraph (k + 1) ⊑ G) (hα : G.indepNum ≤ a) + (hprevious : ∀ b < a, RamseyProperty (k + 1) (b + 1) (k * b + 1)) + {I : Set (Fin (k * a + 1))} (hI : G.IsIndepSet I) (hne : I.Nonempty) : + k * I.ncard + 1 ≤ (closedNeighborhood G I).ncard := by + classical + have hr : 0 < I.ncard := (Set.ncard_pos).mpr hne + have hrle : I.ncard ≤ a := (indep_ncard_le hI).trans hα + let S := (closedNeighborhood G I)ᶜ + have hprev := hprevious (a - I.ncard) (by omega) + have hbound := independence_outside_closed hI (Set.subset_univ I) + rw [independence_univ] at hbound + have hαS : (G.induce S).indepNum ≤ a - I.ncard := by + have heq : Set.univ \ closedNeighborhood G I = S := (Set.compl_eq_univ_sdiff _).symm + rw [heq] at hbound + change independence G S ≤ a - I.ncard + omega + have hcS : ¬ SimpleGraph.cycleGraph (k + 1) ⊑ G.induce S := by + intro hc + exact hcycle (hc.trans (SimpleGraph.Embedding.induce S).isContained) + have hc := order_bound_from_ramsey hprev hcS hαS + rw [← Nat.card_eq_fintype_card, Nat.card_coe_set_eq] at hc + have hsum := Set.ncard_add_ncard_compl (closedNeighborhood G I) + rw [Nat.card_eq_fintype_card, Fintype.card_fin] at hsum + have hmul : k * (a - I.ncard) + k * I.ncard = k * a := by + rw [← Nat.mul_add, Nat.sub_add_cancel hrle] + change S.ncard ≤ k * (a - I.ncard) at hc + change (closedNeighborhood G I).ncard + S.ncard = k * a + 1 at hsum + omega + + + +theorem minimal_expanding_counterexample {k a₀ : ℕ} (ha₀ : 2 ≤ a₀) (ha₀k : a₀ ≤ k) + (hfailure : ¬ RamseyProperty (k + 1) (a₀ + 1) (k * a₀ + 1)) : + ∃ a, 2 ≤ a ∧ a ≤ k ∧ ∃ G : SimpleGraph (Fin (k * a + 1)), + (¬ SimpleGraph.cycleGraph (k + 1) ⊑ G) ∧ G.indepNum ≤ a ∧ + ∀ I, G.IsIndepSet I → I.Nonempty → k * I.ncard + 1 ≤ (closedNeighborhood G I).ncard := by + classical + let A : Set ℕ := {a | 2 ≤ a ∧ a ≤ k ∧ + ¬ RamseyProperty (k + 1) (a + 1) (k * a + 1)} + have hA : A.Nonempty := ⟨a₀, ha₀, ha₀k, hfailure⟩ + let a := sInf A + have hamin : a ∈ A := Nat.sInf_mem hA + obtain ⟨ha, hak, hfail⟩ := hamin + have hprev : ∀ b < a, RamseyProperty (k + 1) (b + 1) (k * b + 1) := by + intro b hba + rcases b with _ | b + · simpa using ramsey_upper_zero k + rcases b with _ | b + · simpa using ramsey_upper_one k + by_contra hn + have hbA : b + 2 ∈ A := ⟨by omega, by omega, hn⟩ + have := Nat.sInf_le hbA + change a ≤ b + 2 at this + omega + unfold RamseyProperty at hfail + obtain ⟨G, hn⟩ := not_forall.mp hfail + obtain ⟨hcycle, hblue⟩ := not_or.mp hn + have hα := (no_compl_clique_iff G a).mp hblue + exact ⟨a, ha, hak, G, hcycle, hα, + fun I hI hne => expansion_of_minimality G hcycle hα hprev hI hne⟩ + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/OptimalSystems.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/OptimalSystems.lean new file mode 100644 index 0000000000000000000000000000000000000000..fb5bcb0c73fc723e1769534836c7d24a740aff62 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/OptimalSystems.lean @@ -0,0 +1,148 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.PathSystems + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph +attribute [local instance] Classical.propDecidable + +def PathSystem.Optimal {V : Type*} [Fintype V] {G : SimpleGraph V} {Q : Set V} + (k : ℕ) (P : PathSystem G Q) : Prop := + P.amount < k + 1 - Q.ncard ∧ + (∀ R : PathSystem G Q, R.amount < k + 1 - Q.ncard → R.amount ≤ P.amount) ∧ + (∀ R : PathSystem G Q, R.amount = P.amount → P.edgeCount ≤ R.edgeCount) + +theorem PathSystem.exists_optimal {V : Type*} [Fintype V] + (G : SimpleGraph V) (Q : Set V) {k : ℕ} (ht : Q.ncard ≤ k) : + ∃ P : PathSystem G Q, P.Optimal k := by + classical + let T : ℕ → Prop := fun a => ∃ P : PathSystem G Q, P.amount = a + let L := Nat.findGreatest T (k - Q.ncard) + have hT0 : T 0 := ⟨PathSystem.empty G Q, PathSystem.empty_amount G Q⟩ + have hTL : T L := Nat.findGreatest_spec (Nat.zero_le _) hT0 + let E : ℕ → Prop := fun e => ∃ P : PathSystem G Q, P.amount = L ∧ P.edgeCount = e + have hE : ∃ e, E e := by obtain ⟨P, hP⟩ := hTL; exact ⟨P.edgeCount, P, hP, rfl⟩ + obtain ⟨P, hPL, hPe⟩ := Nat.find_spec hE + refine ⟨P, ?_, ?_, ?_⟩ + · have hh := Nat.findGreatest_le (P := T) (k - Q.ncard) + dsimp [L] at hPL + omega + · intro R hR + have hh := Nat.le_findGreatest (P := T) (show R.amount ≤ k - Q.ncard by omega) + ⟨R, rfl⟩ + dsimp [L] at hPL + omega + · intro R hR + have hh := Nat.find_min' hE (show E R.edgeCount from ⟨R, hR.trans hPL, rfl⟩) + omega + + + +theorem PathSystem.optimality {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} {k : ℕ} (P : PathSystem G Q) + (hopt : P.Optimal k) (hk : 3 ≤ k) (hQ : G.IsClique Q) + (hcycle : ¬ SimpleGraph.cycleGraph (k + 1) ⊑ G) (ht : Q.ncard ≤ k) + (R : PathSystem G Q) + (hl : P.amount ≤ R.amount) (htie : P.amount = R.amount → R.edgeCount < P.edgeCount) + (hu : R.amount ≤ k + 1 - R.incident) : False := by + by_cases hh : k + 1 - Q.ncard ≤ R.amount + · exact R.closing_interval hk hQ hcycle ht hh hu + · have hle := hopt.2.1 R (by omega) + have heq : R.amount = P.amount := by omega + have he := hopt.2.2 R heq + have he' := htie heq.symm + omega + + +theorem isChain_bridge {V : Type*} {R : V → V → Prop} + (hR : ∀ ⦃first second⦄, R first second → R second first) + {x y : V} {u v I : List V} (hu : (x :: u).IsChain R) + (hv : (y :: v).IsChain R) (hI : (x :: I ++ [y]).IsChain R) : + ((x :: u).reverse ++ I ++ (y :: v)).IsChain R := by + have hr : (u.reverse ++ [x]).IsChain R := by + simpa using List.isChain_reverse.mpr (hu.imp (fun _ _ h => hR h)) + have h₁ : (u.reverse ++ [x] ++ (I ++ [y])).IsChain R := + hr.append_overlap hI (by simp) + have h₂ : ((u.reverse ++ [x] ++ I) ++ [y] ++ v).IsChain R := by + apply List.IsChain.append_overlap (l₂ := [y]) (by simpa only [List.append_assoc] using h₁) + (by simpa using hv) (by simp) + simpa only [List.reverse_cons, List.append_assoc, List.singleton_append] using h₂ + +theorem nodup_bridge {V : Type*} {A B C I : List V} + (h : (A ++ B ++ C).Nodup) (hi : I.Nodup) (hdis : I.Disjoint (A ++ B ++ C)) : + (A.reverse ++ I ++ B ++ C).Nodup := by + have hsym := hdis.symm + simp only [List.nodup_append, List.nodup_reverse, List.mem_append, List.mem_reverse, + List.disjoint_left] at * + aesop + + + +theorem PathSystem.join_tails {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) + (C : List (List V)) {x y : V} (u v I : List V) + (hperm : ((x :: u) ++ (y :: v) ++ C.flatten).Perm P.chains.flatten) + (hne : ∀ c ∈ C, c ≠ []) (hc : ∀ c ∈ C, c.IsChain G.Adj) + (hcp : ∀ c ∈ C, c.IsChain (fun a b => a ∉ Q ∨ b ∉ Q)) + (hce : ∀ c ∈ C, (∀ a ∈ c.head?, a ∈ Q) ∧ (∀ a ∈ c.getLast?, a ∈ Q)) + (hu : (x :: u).IsChain G.Adj) (hv : (y :: v).IsChain G.Adj) + (hup : (x :: u).IsChain (fun a b => a ∉ Q ∨ b ∉ Q)) + (hvp : (y :: v).IsChain (fun a b => a ∉ Q ∨ b ∉ Q)) + (hue : ∀ a ∈ (x :: u).getLast?, a ∈ Q) + (hve : ∀ a ∈ (y :: v).getLast?, a ∈ Q) + (hI : (x :: I ++ [y]).IsChain G.Adj) + (hIp : (x :: I ++ [y]).IsChain (fun a b => a ∉ Q ∨ b ∉ Q)) + (hIn : I.Nodup) (hId : I.Disjoint P.chains.flatten) : + ∃ R : PathSystem G Q, R.amount = P.amount + I.length ∧ R.chains.length = C.length + 1 := by + classical + let J := (x :: u).reverse ++ I ++ (y :: v) + have hJn : J ≠ [] := by simp [J] + have hnd : (J ++ C.flatten).Nodup := by + apply nodup_bridge (hperm.nodup_iff.mpr P.nodup) hIn + apply List.disjoint_left.mpr + intro a ha hb + exact List.disjoint_left.mp hId ha (hperm.subset hb) + have hJe : (∀ a ∈ J.head?, a ∈ Q) ∧ (∀ a ∈ J.getLast?, a ∈ Q) := by + constructor + · intro a ha + apply hue a + simpa only [J, List.append_assoc, List.head?_append_of_ne_nil _ (by simp : (x :: u).reverse ≠ []), + List.head?_reverse] using ha + · intro a ha + apply hve a + simpa only [J, ← List.append_assoc, + List.getLast?_append_of_ne_nil _ (by simp : y :: v ≠ [])] using ha + let R : PathSystem G Q := + { chains := J :: C + nonempty := by intro c hc; simp only [List.mem_cons] at hc; rcases hc with rfl | hc; exact hJn; exact hne c hc + nodup := hnd + edges := by + intro c hc' + simp only [List.mem_cons] at hc' + rcases hc' with rfl | hc' + · exact isChain_bridge (fun _ _ h => h.symm) hu hv hI + · exact hc c hc' + positive := by + intro c hc' + simp only [List.mem_cons] at hc' + rcases hc' with rfl | hc' + · exact isChain_bridge (fun _ _ h => h.symm) hup hvp hIp + · exact hcp c hc' + ends := by intro c hc'; simp only [List.mem_cons] at hc'; rcases hc' with rfl | hc'; exact hJe; exact hce c hc' + cover := by + intro a ha + have hh := hperm.mem_iff.mpr (P.cover a ha) + simp only [J, List.flatten_cons, List.mem_append, List.mem_reverse] at hh ⊢ + tauto } + refine ⟨R, ?_, rfl⟩ + have hh := hperm.length_eq + rw [P.flat_length] at hh + change ((x :: u).reverse ++ I ++ (y :: v) ++ C.flatten).length - Q.ncard = + P.amount + I.length + simp only [List.length_append, List.length_reverse] at hh ⊢ + omega + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/PathSystems.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/PathSystems.lean new file mode 100644 index 0000000000000000000000000000000000000000..66f20544b52dde421635db3a5ecd6f939a11c3ae --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/PathSystems.lean @@ -0,0 +1,287 @@ +import Mathlib + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph +attribute [local instance] Classical.propDecidable + +structure PathSystem {V : Type*} (G : SimpleGraph V) (Q : Set V) where + chains : List (List V) + nonempty : ∀ c ∈ chains, c ≠ [] + nodup : chains.flatten.Nodup + edges : ∀ c ∈ chains, c.IsChain G.Adj + positive : ∀ c ∈ chains, c.IsChain (fun u v => u ∉ Q ∨ v ∉ Q) + ends : ∀ c ∈ chains, (∀ x ∈ c.head?, x ∈ Q) ∧ (∀ x ∈ c.getLast?, x ∈ Q) + cover : ∀ x ∈ Q, x ∈ chains.flatten + + + +theorem clique_chains_flatten {V : Type*} {G : SimpleGraph V} {Q : Set V} + (hQ : G.IsClique Q) (C : List (List V)) (hne : [] ∉ C) + (hnd : C.flatten.Nodup) (hedges : ∀ c ∈ C, c.IsChain G.Adj) + (hends : ∀ c ∈ C, (∀ x ∈ c.head?, x ∈ Q) ∧ (∀ x ∈ c.getLast?, x ∈ Q)) : + C.flatten.IsChain G.Adj := by + apply (List.isChain_flatten hne).mpr + refine ⟨hedges, ?_⟩ + apply List.Pairwise.isChain + apply (List.nodup_flatten.mp hnd).2.imp_of_mem + intro a b ha hb hab x hx y hy + apply hQ ((hends a ha).2 x hx) ((hends b hb).1 y hy) + intro hxy + exact List.disjoint_left.mp hab (List.mem_of_mem_getLast? hx) + (hxy ▸ List.mem_of_mem_head? hy) + +theorem clique_chains_endpoints {V : Type*} {Q : Set V} (C : List (List V)) + (hne : ∀ c ∈ C, c ≠ []) + (hends : ∀ c ∈ C, (∀ x ∈ c.head?, x ∈ Q) ∧ (∀ x ∈ c.getLast?, x ∈ Q)) + (hf : C.flatten ≠ []) : + C.flatten.head hf ∈ Q ∧ C.flatten.getLast hf ∈ Q := by + have hc : C ≠ [] := by intro h; simp [h] at hf + constructor + · rw [List.head_flatten_eq_head_head hf (hne _ (List.head_mem hc))] + apply (hends _ (List.head_mem hc)).1 + exact List.head?_eq_some_head (hne _ (List.head_mem hc)) + · rw [List.getLast_flatten_eq_getLast_getLast hf (hne _ (List.getLast_mem hc))] + apply (hends _ (List.getLast_mem hc)).2 + exact List.getLast?_eq_some_getLast (hne _ (List.getLast_mem hc)) + + +theorem close_clique_chains {V : Type*} {G : SimpleGraph V} {Q : Set V} + (hQ : G.IsClique Q) (C : List (List V)) + (hne : ∀ c ∈ C, c ≠ []) (hnd : C.flatten.Nodup) + (hedges : ∀ c ∈ C, c.IsChain G.Adj) + (hends : ∀ c ∈ C, (∀ x ∈ c.head?, x ∈ Q) ∧ (∀ x ∈ c.getLast?, x ∈ Q)) + (hlen : 3 ≤ C.flatten.length) : + SimpleGraph.cycleGraph C.flatten.length ⊑ G := by + have hfn : C.flatten ≠ [] := by intro h; simp [h] at hlen + have hpchain := clique_chains_flatten hQ C (fun hh => hne [] hh rfl) hnd hedges hends + let p := SimpleGraph.Walk.ofSupport C.flatten hfn hpchain + have hp : p.IsPath := p.isPath_def.mpr (by simpa [p] using hnd) + have hplen : p.length = C.flatten.length - 1 := SimpleGraph.Walk.length_ofSupport _ _ + obtain ⟨hx, hy⟩ := clique_chains_endpoints C hne hends hfn + have hxy : C.flatten.head hfn ≠ C.flatten.getLast hfn := by + intro heq + obtain ⟨v, hv⟩ := (List.Nodup.head_eq_getLast_iff hfn hnd).mp heq + simp [hv] at hlen + have hadj := hQ hy hx (Ne.symm hxy) + have hc : (SimpleGraph.Walk.cons hadj p).IsCycle := by + apply (p.cons_isCycle_iff hadj).mpr + refine ⟨hp, ?_⟩ + intro he + have hh := hp.length_eq_one_of_mem_edges (by simpa only [Sym2.eq_swap] using he) + omega + apply (SimpleGraph.cycleGraph_isContained_iff (by omega)).mpr + refine ⟨_, SimpleGraph.Walk.cons hadj p, hc, ?_⟩ + rw [SimpleGraph.Walk.length_cons, hplen] + omega + +theorem flatten_singletons {V : Type*} (l : List V) : + (l.map (fun v => [v])).flatten = l := by + induction l with + | nil => rfl + | cons x l ih => simp only [List.map_cons, List.flatten_cons, ih, List.singleton_append] + +noncomputable def PathSystem.empty {V : Type*} [Fintype V] + (G : SimpleGraph V) (Q : Set V) : PathSystem G Q := by + classical + refine ⟨Q.toFinset.toList.map (fun v => [v]), ?_, ?_, ?_, ?_, ?_, ?_⟩ + · intro c hc + obtain ⟨v, hv, rfl⟩ := List.mem_map.mp hc + simp + · rw [flatten_singletons] + exact Q.toFinset.nodup_toList + · intro c hc + obtain ⟨v, hv, rfl⟩ := List.mem_map.mp hc + exact .singleton _ + · intro c hc + obtain ⟨v, hv, rfl⟩ := List.mem_map.mp hc + exact .singleton _ + · intro c hc + obtain ⟨v, hv, rfl⟩ := List.mem_map.mp hc + have hvQ : v ∈ Q := by simpa using hv + simpa using And.intro hvQ hvQ + · intro x hx + simpa using hx + +noncomputable def PathSystem.amount {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : ℕ := + P.chains.flatten.length - Q.ncard + +noncomputable def PathSystem.edgeCount {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : ℕ := + Q.ncard - P.chains.length + +noncomputable def PathSystem.singletons {V : Type*} + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : List (List V) := by + classical + exact P.chains.filter (fun c => c.length = 1) + +noncomputable def PathSystem.usedChains {V : Type*} + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : List (List V) := by + classical + exact P.chains.filter (fun c => c.length ≠ 1) + +noncomputable def PathSystem.incident {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : ℕ := + Q.ncard - P.singletons.length + +theorem PathSystem.flat_length {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : + P.chains.flatten.length = Q.ncard + P.amount := by + classical + have h : Q.ncard ≤ P.chains.flatten.length := by + have hsub : Q ⊆ (P.chains.flatten.toFinset : Set V) := by + intro x hx + exact List.mem_toFinset.mpr (P.cover x hx) + have hh := Set.ncard_le_ncard hsub + simpa only [Set.ncard_coe_finset, List.toFinset_card_of_nodup P.nodup] using hh + dsimp [PathSystem.amount] + omega + +theorem PathSystem.clique_count {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : + P.chains.flatten.countP (fun x => decide (x ∈ Q)) = Q.ncard := by + classical + let l := P.chains.flatten.filter (fun x => decide (x ∈ Q)) + have hnd : l.Nodup := P.nodup.filter _ + have he : (l.toFinset : Set V) = Q := by + ext x + simp only [Finset.mem_coe, List.mem_toFinset, l, List.mem_filter, decide_eq_true_eq] + exact ⟨And.right, fun hx => ⟨P.cover x hx, hx⟩⟩ + have hc := congrArg Set.ncard he + simpa only [Set.ncard_coe_finset, List.toFinset_card_of_nodup hnd, + l, ← List.countP_eq_length_filter] using hc + + +theorem no_consecutive_count {V : Type*} (Q : Set V) (c : List V) + (h : c.IsChain (fun u v => u ∉ Q ∨ v ∉ Q)) : + 2 * c.countP (fun x => decide (x ∈ Q)) ≤ + c.length + if ∃ x ∈ c.head?, x ∈ Q then 1 else 0 := by + classical + induction c with + | nil => simp + | cons x c ih => + have ih := ih h.tail + by_cases hx : x ∈ Q + · cases c with + | nil => simp [hx] + | cons y c => + have hy : y ∉ Q := h.rel.resolve_left (fun hn => hn hx) + simp [hx, hy] at ih ⊢ + omega + · simp [hx] + split_ifs at ih <;> omega + +theorem PathSystem.edgeCount_le_amount {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : + P.edgeCount ≤ P.amount := by + classical + have hb : ∀ c ∈ P.chains, + 2 * c.countP (fun x => decide (x ∈ Q)) ≤ c.length + 1 := by + intro c hc + have hh := no_consecutive_count Q c (P.positive c hc) + split_ifs at hh <;> omega + have hs := List.sum_le_sum hb + have he : (P.chains.map (fun c => 2 * c.countP (fun x => decide (x ∈ Q)))).sum = + 2 * P.chains.flatten.countP (fun x => decide (x ∈ Q)) := by + rw [List.countP_flatten] + simp only [← List.sum_map_mul_left] + have he' : (P.chains.map (fun c => c.length + 1)).sum = + P.chains.flatten.length + P.chains.length := by + simp [List.sum_map_add, List.length_flatten] + rw [he, he', P.clique_count, P.flat_length] at hs + dsimp [PathSystem.edgeCount] + omega + +theorem PathSystem.chains_length_le {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : + P.chains.length ≤ Q.ncard := by + classical + have hb : ∀ c ∈ P.chains, 1 ≤ c.countP (fun x => decide (x ∈ Q)) := by + intro c hc + apply Nat.succ_le_iff.mpr + apply List.countP_pos_iff.mpr + let x := c.head (P.nonempty c hc) + refine ⟨x, List.head_mem _, ?_⟩ + apply decide_eq_true + exact (P.ends c hc).1 x (List.head?_eq_some_head _) + have hh := List.sum_le_sum hb + rw [← List.countP_flatten, P.clique_count] at hh + simpa using hh + +theorem PathSystem.singletons_length_le {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : + P.singletons.length ≤ Q.ncard := + (List.length_filter_le _ _).trans P.chains_length_le + +theorem PathSystem.partition {V : Type*} + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : + (P.usedChains ++ P.singletons).Perm P.chains := by + classical + simpa [PathSystem.usedChains, PathSystem.singletons] using + List.filter_append_perm (fun c : List V => decide (c.length ≠ 1)) P.chains + +theorem singletons_flat_length {V : Type*} (C : List (List V)) + (h : ∀ c ∈ C, c.length = 1) : C.flatten.length = C.length := by + induction C with + | nil => rfl + | cons c C ih => + rw [List.flatten_cons, List.length_append, h c (by simp), + ih (fun c hc => h c (by simp [hc])), List.length_cons] + omega + +theorem PathSystem.singleton_flat_length {V : Type*} + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : + P.singletons.flatten.length = P.singletons.length := by + apply singletons_flat_length + intro c hc + exact (List.mem_filter.mp hc).2 |> of_decide_eq_true + +theorem PathSystem.closing_interval {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) + {k : ℕ} (hk : 3 ≤ k) (hQ : G.IsClique Q) + (hcycle : ¬ SimpleGraph.cycleGraph (k + 1) ⊑ G) + (ht : Q.ncard ≤ k) (hlo : k + 1 - Q.ncard ≤ P.amount) + (hhi : P.amount ≤ k + 1 - P.incident) : False := by + classical + let u := k + 1 - P.amount - P.incident + have hi : P.incident ≤ Q.ncard := Nat.sub_le _ _ + have he : P.incident + P.singletons.length = Q.ncard := by + dsimp [PathSystem.incident] + have := P.singletons_length_le + omega + have hup : u ≤ P.singletons.length := by dsimp [u]; omega + let C := P.usedChains ++ P.singletons.take u + have hsub : C.Sublist (P.usedChains ++ P.singletons) := + List.Sublist.append (.refl _) (List.take_sublist _ _) + have hmem : ∀ c ∈ C, c ∈ P.chains := fun c hc => P.partition.subset (hsub.subset hc) + have hnd : C.flatten.Nodup := hsub.flatten.nodup + (P.partition.flatten.nodup_iff.mpr P.nodup) + have hlen₁ := P.partition.flatten.length_eq + rw [List.flatten_append, List.length_append, P.singleton_flat_length, + P.flat_length] at hlen₁ + have hlen₂ : (P.singletons.take u).flatten.length = u := by + rw [singletons_flat_length _ (by + intro c hc + exact of_decide_eq_true (List.mem_filter.mp (List.mem_of_mem_take hc)).2), + List.length_take, Nat.min_eq_left hup] + have hlen : C.flatten.length = k + 1 := by + dsimp [C] + rw [List.flatten_append, List.length_append, hlen₂] + dsimp [u] at * + omega + apply hcycle + rw [← hlen] + apply close_clique_chains hQ C (fun c hc => P.nonempty c (hmem c hc)) hnd + (fun c hc => P.edges c (hmem c hc)) (fun c hc => P.ends c (hmem c hc)) + omega + +@[simp] theorem PathSystem.empty_amount {V : Type*} [Fintype V] + (G : SimpleGraph V) (Q : Set V) : (PathSystem.empty G Q).amount = 0 := by + classical + simp [PathSystem.amount, PathSystem.empty, flatten_singletons, Set.ncard_eq_toFinset_card'] + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/PatternReduction.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/PatternReduction.lean new file mode 100644 index 0000000000000000000000000000000000000000..b162589ea0cc4046ec8a8bee8e7eade2f39d3f37 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/PatternReduction.lean @@ -0,0 +1,47 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.ChainProfiles +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.OptimalSystems +import OAI.Combinatorics.Ramsey.CycleClique.PathSystems + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +def PatternVerified (k t : ℕ) (D : List (List ℕ)) : Prop := + ∃ C : FiniteCertificate, C.Valid k t (patternOrder D) (patternClique D) + (patternEdges D) (patternAmount D) (patternEdgeCount D) [] + +theorem PatternVerified.impossible {V : Type*} [Fintype V] {G : SimpleGraph V} + {Q : Set V} {k t : ℕ} {D : List (List ℕ)} (hD : PatternVerified k t D) + (H : FiniteHyp G k t) (P : PathSystem G Q) (hP : P.Optimal k) + (hQ : G.IsClique Q) (hc : Q.ncard = t) + (hprofile : List.Forall₂ (ChainAmounts Q) P.chains D) : False := by + obtain ⟨C,hC⟩ := hD + obtain ⟨v,hv⟩ := Set.nonempty_of_ncard_ne_zero (s := Q) (by have := H.ht; omega) + obtain ⟨_,ha,he,_⟩ := P.profile_parameters hprofile + let O : OriginalSystem G Q k t (patternAmount D) (patternEdgeCount D) := + ⟨P,hP,hQ,hc,ha.symm,he.symm⟩ + exact C.sound H O (P.labelState hQ hprofile v) (by constructor <;> simp) hC + +theorem finite_verified_of_patterns {V : Type*} [Fintype V] {G : SimpleGraph V} + {Q : Set V} {k t : ℕ} (H : FiniteHyp G k t) (hQ : G.IsClique Q) + (hc : Q.ncard = t) + (hverified : ∀ D ∈ patternChoices t (k-t) [], PatternVerified k t D) : False := by + obtain ⟨P,hP⟩ := PathSystem.exists_optimal G Q (k := k) (by have := H.htk; omega) + obtain ⟨R,D,hD,hs,hn,ha,he⟩ := P.canonical_realization + have hR := PathSystem.optimal_of_same hP ha he + obtain ⟨ht,hL,he',hpos⟩ := R.profile_parameters hD + have hbudget : patternAmount D ≤ k-t := by + have hp := hR.1 + rw [←hL, hc] at hp + omega + have hm := mem_patternChoices (ht.trans hc) hbudget hpos hs hn (lower := []) (fun A _ => le_of_not_gt (by intro h; cases h)) + exact (hverified D hm).impossible H R hR hQ hc hD + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns10x5.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns10x5.lean new file mode 100644 index 0000000000000000000000000000000000000000..d961f5743e300fe24e6898b983d2e5a94278372f --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns10x5.lean @@ -0,0 +1,65 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates005 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates006 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_10_5_0 : List (List (List ℕ)) := [[[],[],[],[],[]],[[],[],[],[1]],[[],[],[],[2]],[[],[],[],[3]],[[],[],[],[4]],[[],[],[],[5]],[[],[],[1,1]],[[],[],[1,2]],[[],[],[1,3]],[[],[],[1,4]],[[],[],[2,2]],[[],[],[2,3]],[[],[1],[1]],[[],[1],[2]],[[],[1],[3]],[[],[1],[4]]] + +theorem patterns_10_5_0_verified : ∀ D ∈ patterns_10_5_0, PatternVerified 10 5 D := by + + simp only [patterns_10_5_0, List.forall_mem_cons] + + exact ⟨⟨certificate_144, certificate_144_valid⟩, ⟨⟨certificate_145, certificate_145_valid⟩, ⟨⟨certificate_146, certificate_146_valid⟩, ⟨⟨certificate_147, certificate_147_valid⟩, ⟨⟨certificate_148, certificate_148_valid⟩, ⟨⟨certificate_149, certificate_149_valid⟩, ⟨⟨certificate_150, certificate_150_valid⟩, ⟨⟨certificate_151, certificate_151_valid⟩, ⟨⟨certificate_152, certificate_152_valid⟩, ⟨⟨certificate_153, certificate_153_valid⟩, ⟨⟨certificate_154, certificate_154_valid⟩, ⟨⟨certificate_155, certificate_155_valid⟩, ⟨⟨certificate_156, certificate_156_valid⟩, ⟨⟨certificate_157, certificate_157_valid⟩, ⟨⟨certificate_158, certificate_158_valid⟩, ⟨⟨certificate_159, certificate_159_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_10_5_1 : List (List (List ℕ)) := [[[],[1,1,1]],[[],[1,1,2]],[[],[1,1,3]],[[],[1,2,1]],[[],[1,2,2]],[[],[1,3,1]],[[],[2],[2]],[[],[2],[3]],[[],[2,1,2]],[[1],[1,1]],[[1],[1,2]],[[1],[1,3]],[[1],[2,2]],[[1,1],[2]],[[1,1],[3]],[[1,1,1,1]]] + +theorem patterns_10_5_1_verified : ∀ D ∈ patterns_10_5_1, PatternVerified 10 5 D := by + + simp only [patterns_10_5_1, List.forall_mem_cons] + + exact ⟨⟨certificate_160, certificate_160_valid⟩, ⟨⟨certificate_161, certificate_161_valid⟩, ⟨⟨certificate_162, certificate_162_valid⟩, ⟨⟨certificate_163, certificate_163_valid⟩, ⟨⟨certificate_164, certificate_164_valid⟩, ⟨⟨certificate_165, certificate_165_valid⟩, ⟨⟨certificate_166, certificate_166_valid⟩, ⟨⟨certificate_167, certificate_167_valid⟩, ⟨⟨certificate_168, certificate_168_valid⟩, ⟨⟨certificate_169, certificate_169_valid⟩, ⟨⟨certificate_170, certificate_170_valid⟩, ⟨⟨certificate_171, certificate_171_valid⟩, ⟨⟨certificate_172, certificate_172_valid⟩, ⟨⟨certificate_173, certificate_173_valid⟩, ⟨⟨certificate_174, certificate_174_valid⟩, ⟨⟨certificate_175, certificate_175_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_10_5_2 : List (List (List ℕ)) := [[[1,1,1,2]],[[1,1,2,1]],[[1,2],[2]]] + +theorem patterns_10_5_2_verified : ∀ D ∈ patterns_10_5_2, PatternVerified 10 5 D := by + + simp only [patterns_10_5_2, List.forall_mem_cons] + + exact ⟨⟨certificate_176, certificate_176_valid⟩, ⟨⟨certificate_177, certificate_177_valid⟩, ⟨⟨certificate_178, certificate_178_valid⟩, (by simp)⟩⟩⟩ + +noncomputable def patterns_10_5 : List (List (List ℕ)) := patterns_10_5_0 ++ (patterns_10_5_1 ++ (patterns_10_5_2 ++ ([]))) + +theorem patterns_10_5_verified : ∀ D ∈ patterns_10_5, PatternVerified 10 5 D := by + + simp only [patterns_10_5, List.forall_mem_append] + + exact ⟨patterns_10_5_0_verified, ⟨patterns_10_5_1_verified, ⟨patterns_10_5_2_verified, by simp⟩⟩⟩ + +theorem patterns_10_5_coverage : patternChoices 5 5 [] = patterns_10_5 := by decide +kernel + +theorem finite_patterns_10_5 : ∀ D ∈ patternChoices 5 (10-5) [], PatternVerified 10 5 D := by + + rw [patterns_10_5_coverage] + + exact patterns_10_5_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns10x6.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns10x6.lean new file mode 100644 index 0000000000000000000000000000000000000000..5ef5f082722b1b4f503a68a3c8fb66a597dc16d7 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns10x6.lean @@ -0,0 +1,57 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates006 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates007 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_10_6_0 : List (List (List ℕ)) := [[[],[],[],[],[],[]],[[],[],[],[],[1]],[[],[],[],[],[2]],[[],[],[],[],[3]],[[],[],[],[],[4]],[[],[],[],[1,1]],[[],[],[],[1,2]],[[],[],[],[1,3]],[[],[],[],[2,2]],[[],[],[1],[1]],[[],[],[1],[2]],[[],[],[1],[3]],[[],[],[1,1,1]],[[],[],[1,1,2]],[[],[],[1,2,1]],[[],[],[2],[2]]] + +theorem patterns_10_6_0_verified : ∀ D ∈ patterns_10_6_0, PatternVerified 10 6 D := by + + simp only [patterns_10_6_0, List.forall_mem_cons] + + exact ⟨⟨certificate_179, certificate_179_valid⟩, ⟨⟨certificate_180, certificate_180_valid⟩, ⟨⟨certificate_181, certificate_181_valid⟩, ⟨⟨certificate_182, certificate_182_valid⟩, ⟨⟨certificate_183, certificate_183_valid⟩, ⟨⟨certificate_184, certificate_184_valid⟩, ⟨⟨certificate_185, certificate_185_valid⟩, ⟨⟨certificate_186, certificate_186_valid⟩, ⟨⟨certificate_187, certificate_187_valid⟩, ⟨⟨certificate_188, certificate_188_valid⟩, ⟨⟨certificate_189, certificate_189_valid⟩, ⟨⟨certificate_190, certificate_190_valid⟩, ⟨⟨certificate_191, certificate_191_valid⟩, ⟨⟨certificate_192, certificate_192_valid⟩, ⟨⟨certificate_193, certificate_193_valid⟩, ⟨⟨certificate_194, certificate_194_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_10_6_1 : List (List (List ℕ)) := [[[],[1],[1,1]],[[],[1],[1,2]],[[],[1,1],[2]],[[],[1,1,1,1]],[[1],[1],[1]],[[1],[1],[2]],[[1],[1,1,1]],[[1,1],[1,1]]] + +theorem patterns_10_6_1_verified : ∀ D ∈ patterns_10_6_1, PatternVerified 10 6 D := by + + simp only [patterns_10_6_1, List.forall_mem_cons] + + exact ⟨⟨certificate_195, certificate_195_valid⟩, ⟨⟨certificate_196, certificate_196_valid⟩, ⟨⟨certificate_197, certificate_197_valid⟩, ⟨⟨certificate_198, certificate_198_valid⟩, ⟨⟨certificate_199, certificate_199_valid⟩, ⟨⟨certificate_200, certificate_200_valid⟩, ⟨⟨certificate_201, certificate_201_valid⟩, ⟨⟨certificate_202, certificate_202_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_10_6 : List (List (List ℕ)) := patterns_10_6_0 ++ (patterns_10_6_1 ++ ([])) + +theorem patterns_10_6_verified : ∀ D ∈ patterns_10_6, PatternVerified 10 6 D := by + + simp only [patterns_10_6, List.forall_mem_append] + + exact ⟨patterns_10_6_0_verified, ⟨patterns_10_6_1_verified, by simp⟩⟩ + +theorem patterns_10_6_coverage : patternChoices 6 4 [] = patterns_10_6 := by decide +kernel + +theorem finite_patterns_10_6 : ∀ D ∈ patternChoices 6 (10-6) [], PatternVerified 10 6 D := by + + rw [patterns_10_6_coverage] + + exact patterns_10_6_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns10x7.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns10x7.lean new file mode 100644 index 0000000000000000000000000000000000000000..ee5b268451198212013088f17768f59422c3a19c --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns10x7.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates007 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_10_7_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[]],[[],[],[],[],[],[1]],[[],[],[],[],[],[2]],[[],[],[],[],[],[3]],[[],[],[],[],[1,1]],[[],[],[],[],[1,2]],[[],[],[],[1],[1]],[[],[],[],[1],[2]],[[],[],[],[1,1,1]],[[],[],[1],[1,1]],[[],[1],[1],[1]]] + +theorem patterns_10_7_0_verified : ∀ D ∈ patterns_10_7_0, PatternVerified 10 7 D := by + + simp only [patterns_10_7_0, List.forall_mem_cons] + + exact ⟨⟨certificate_203, certificate_203_valid⟩, ⟨⟨certificate_204, certificate_204_valid⟩, ⟨⟨certificate_205, certificate_205_valid⟩, ⟨⟨certificate_206, certificate_206_valid⟩, ⟨⟨certificate_207, certificate_207_valid⟩, ⟨⟨certificate_208, certificate_208_valid⟩, ⟨⟨certificate_209, certificate_209_valid⟩, ⟨⟨certificate_210, certificate_210_valid⟩, ⟨⟨certificate_211, certificate_211_valid⟩, ⟨⟨certificate_212, certificate_212_valid⟩, ⟨⟨certificate_213, certificate_213_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_10_7 : List (List (List ℕ)) := patterns_10_7_0 ++ ([]) + +theorem patterns_10_7_verified : ∀ D ∈ patterns_10_7, PatternVerified 10 7 D := by + + simp only [patterns_10_7, List.forall_mem_append] + + exact ⟨patterns_10_7_0_verified, by simp⟩ + +theorem patterns_10_7_coverage : patternChoices 7 3 [] = patterns_10_7 := by decide +kernel + +theorem finite_patterns_10_7 : ∀ D ∈ patternChoices 7 (10-7) [], PatternVerified 10 7 D := by + + rw [patterns_10_7_coverage] + + exact patterns_10_7_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns10x8.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns10x8.lean new file mode 100644 index 0000000000000000000000000000000000000000..c4d1cb0637e15c82e9134a5861d0e303910fdd40 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns10x8.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates007 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_10_8_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[],[]],[[],[],[],[],[],[],[1]],[[],[],[],[],[],[],[2]],[[],[],[],[],[],[1,1]],[[],[],[],[],[1],[1]]] + +theorem patterns_10_8_0_verified : ∀ D ∈ patterns_10_8_0, PatternVerified 10 8 D := by + + simp only [patterns_10_8_0, List.forall_mem_cons] + + exact ⟨⟨certificate_214, certificate_214_valid⟩, ⟨⟨certificate_215, certificate_215_valid⟩, ⟨⟨certificate_216, certificate_216_valid⟩, ⟨⟨certificate_217, certificate_217_valid⟩, ⟨⟨certificate_218, certificate_218_valid⟩, (by simp)⟩⟩⟩⟩⟩ + +noncomputable def patterns_10_8 : List (List (List ℕ)) := patterns_10_8_0 ++ ([]) + +theorem patterns_10_8_verified : ∀ D ∈ patterns_10_8, PatternVerified 10 8 D := by + + simp only [patterns_10_8, List.forall_mem_append] + + exact ⟨patterns_10_8_0_verified, by simp⟩ + +theorem patterns_10_8_coverage : patternChoices 8 2 [] = patterns_10_8 := by decide +kernel + +theorem finite_patterns_10_8 : ∀ D ∈ patternChoices 8 (10-8) [], PatternVerified 10 8 D := by + + rw [patterns_10_8_coverage] + + exact patterns_10_8_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns11x5.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns11x5.lean new file mode 100644 index 0000000000000000000000000000000000000000..8c2667b7818d1f7586ac7b62cb02d518f9e17371 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns11x5.lean @@ -0,0 +1,74 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates007 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates008 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates009 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_11_5_0 : List (List (List ℕ)) := [[[],[],[],[],[]],[[],[],[],[1]],[[],[],[],[2]],[[],[],[],[3]],[[],[],[],[4]],[[],[],[],[5]],[[],[],[],[6]],[[],[],[1,1]],[[],[],[1,2]],[[],[],[1,3]],[[],[],[1,4]],[[],[],[1,5]],[[],[],[2,2]],[[],[],[2,3]],[[],[],[2,4]],[[],[],[3,3]]] + +theorem patterns_11_5_0_verified : ∀ D ∈ patterns_11_5_0, PatternVerified 11 5 D := by + + simp only [patterns_11_5_0, List.forall_mem_cons] + + exact ⟨⟨certificate_219, certificate_219_valid⟩, ⟨⟨certificate_220, certificate_220_valid⟩, ⟨⟨certificate_221, certificate_221_valid⟩, ⟨⟨certificate_222, certificate_222_valid⟩, ⟨⟨certificate_223, certificate_223_valid⟩, ⟨⟨certificate_224, certificate_224_valid⟩, ⟨⟨certificate_225, certificate_225_valid⟩, ⟨⟨certificate_226, certificate_226_valid⟩, ⟨⟨certificate_227, certificate_227_valid⟩, ⟨⟨certificate_228, certificate_228_valid⟩, ⟨⟨certificate_229, certificate_229_valid⟩, ⟨⟨certificate_230, certificate_230_valid⟩, ⟨⟨certificate_231, certificate_231_valid⟩, ⟨⟨certificate_232, certificate_232_valid⟩, ⟨⟨certificate_233, certificate_233_valid⟩, ⟨⟨certificate_234, certificate_234_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_11_5_1 : List (List (List ℕ)) := [[[],[1],[1]],[[],[1],[2]],[[],[1],[3]],[[],[1],[4]],[[],[1],[5]],[[],[1,1,1]],[[],[1,1,2]],[[],[1,1,3]],[[],[1,1,4]],[[],[1,2,1]],[[],[1,2,2]],[[],[1,2,3]],[[],[1,3,1]],[[],[1,3,2]],[[],[1,4,1]],[[],[2],[2]]] + +theorem patterns_11_5_1_verified : ∀ D ∈ patterns_11_5_1, PatternVerified 11 5 D := by + + simp only [patterns_11_5_1, List.forall_mem_cons] + + exact ⟨⟨certificate_235, certificate_235_valid⟩, ⟨⟨certificate_236, certificate_236_valid⟩, ⟨⟨certificate_237, certificate_237_valid⟩, ⟨⟨certificate_238, certificate_238_valid⟩, ⟨⟨certificate_239, certificate_239_valid⟩, ⟨⟨certificate_240, certificate_240_valid⟩, ⟨⟨certificate_241, certificate_241_valid⟩, ⟨⟨certificate_242, certificate_242_valid⟩, ⟨⟨certificate_243, certificate_243_valid⟩, ⟨⟨certificate_244, certificate_244_valid⟩, ⟨⟨certificate_245, certificate_245_valid⟩, ⟨⟨certificate_246, certificate_246_valid⟩, ⟨⟨certificate_247, certificate_247_valid⟩, ⟨⟨certificate_248, certificate_248_valid⟩, ⟨⟨certificate_249, certificate_249_valid⟩, ⟨⟨certificate_250, certificate_250_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_11_5_2 : List (List (List ℕ)) := [[[],[2],[3]],[[],[2],[4]],[[],[2,1,2]],[[],[2,1,3]],[[],[2,2,2]],[[],[3],[3]],[[1],[1,1]],[[1],[1,2]],[[1],[1,3]],[[1],[1,4]],[[1],[2,2]],[[1],[2,3]],[[1,1],[2]],[[1,1],[3]],[[1,1],[4]],[[1,1,1,1]]] + +theorem patterns_11_5_2_verified : ∀ D ∈ patterns_11_5_2, PatternVerified 11 5 D := by + + simp only [patterns_11_5_2, List.forall_mem_cons] + + exact ⟨⟨certificate_251, certificate_251_valid⟩, ⟨⟨certificate_252, certificate_252_valid⟩, ⟨⟨certificate_253, certificate_253_valid⟩, ⟨⟨certificate_254, certificate_254_valid⟩, ⟨⟨certificate_255, certificate_255_valid⟩, ⟨⟨certificate_256, certificate_256_valid⟩, ⟨⟨certificate_257, certificate_257_valid⟩, ⟨⟨certificate_258, certificate_258_valid⟩, ⟨⟨certificate_259, certificate_259_valid⟩, ⟨⟨certificate_260, certificate_260_valid⟩, ⟨⟨certificate_261, certificate_261_valid⟩, ⟨⟨certificate_262, certificate_262_valid⟩, ⟨⟨certificate_263, certificate_263_valid⟩, ⟨⟨certificate_264, certificate_264_valid⟩, ⟨⟨certificate_265, certificate_265_valid⟩, ⟨⟨certificate_266, certificate_266_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_11_5_3 : List (List (List ℕ)) := [[[1,1,1,2]],[[1,1,1,3]],[[1,1,2,1]],[[1,1,2,2]],[[1,1,3,1]],[[1,2],[2]],[[1,2],[3]],[[1,2,1,2]],[[1,2,2,1]],[[1,3],[2]],[[2],[2,2]],[[2,1,1,2]]] + +theorem patterns_11_5_3_verified : ∀ D ∈ patterns_11_5_3, PatternVerified 11 5 D := by + + simp only [patterns_11_5_3, List.forall_mem_cons] + + exact ⟨⟨certificate_267, certificate_267_valid⟩, ⟨⟨certificate_268, certificate_268_valid⟩, ⟨⟨certificate_269, certificate_269_valid⟩, ⟨⟨certificate_270, certificate_270_valid⟩, ⟨⟨certificate_271, certificate_271_valid⟩, ⟨⟨certificate_272, certificate_272_valid⟩, ⟨⟨certificate_273, certificate_273_valid⟩, ⟨⟨certificate_274, certificate_274_valid⟩, ⟨⟨certificate_275, certificate_275_valid⟩, ⟨⟨certificate_276, certificate_276_valid⟩, ⟨⟨certificate_277, certificate_277_valid⟩, ⟨⟨certificate_278, certificate_278_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_11_5 : List (List (List ℕ)) := patterns_11_5_0 ++ (patterns_11_5_1 ++ (patterns_11_5_2 ++ (patterns_11_5_3 ++ ([])))) + +theorem patterns_11_5_verified : ∀ D ∈ patterns_11_5, PatternVerified 11 5 D := by + + simp only [patterns_11_5, List.forall_mem_append] + + exact ⟨patterns_11_5_0_verified, ⟨patterns_11_5_1_verified, ⟨patterns_11_5_2_verified, ⟨patterns_11_5_3_verified, by simp⟩⟩⟩⟩ + +theorem patterns_11_5_coverage : patternChoices 5 6 [] = patterns_11_5 := by decide +kernel + +theorem finite_patterns_11_5 : ∀ D ∈ patternChoices 5 (11-5) [], PatternVerified 11 5 D := by + + rw [patterns_11_5_coverage] + + exact patterns_11_5_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns11x6.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns11x6.lean new file mode 100644 index 0000000000000000000000000000000000000000..db6a5754fd369cec1daabbf4cb30b46acd6b7138 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns11x6.lean @@ -0,0 +1,66 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates009 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates010 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates011 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_11_6_0 : List (List (List ℕ)) := [[[],[],[],[],[],[]],[[],[],[],[],[1]],[[],[],[],[],[2]],[[],[],[],[],[3]],[[],[],[],[],[4]],[[],[],[],[],[5]],[[],[],[],[1,1]],[[],[],[],[1,2]],[[],[],[],[1,3]],[[],[],[],[1,4]],[[],[],[],[2,2]],[[],[],[],[2,3]],[[],[],[1],[1]],[[],[],[1],[2]],[[],[],[1],[3]],[[],[],[1],[4]]] + +theorem patterns_11_6_0_verified : ∀ D ∈ patterns_11_6_0, PatternVerified 11 6 D := by + + simp only [patterns_11_6_0, List.forall_mem_cons] + + exact ⟨⟨certificate_279, certificate_279_valid⟩, ⟨⟨certificate_280, certificate_280_valid⟩, ⟨⟨certificate_281, certificate_281_valid⟩, ⟨⟨certificate_282, certificate_282_valid⟩, ⟨⟨certificate_283, certificate_283_valid⟩, ⟨⟨certificate_284, certificate_284_valid⟩, ⟨⟨certificate_285, certificate_285_valid⟩, ⟨⟨certificate_286, certificate_286_valid⟩, ⟨⟨certificate_287, certificate_287_valid⟩, ⟨⟨certificate_288, certificate_288_valid⟩, ⟨⟨certificate_289, certificate_289_valid⟩, ⟨⟨certificate_290, certificate_290_valid⟩, ⟨⟨certificate_291, certificate_291_valid⟩, ⟨⟨certificate_292, certificate_292_valid⟩, ⟨⟨certificate_293, certificate_293_valid⟩, ⟨⟨certificate_294, certificate_294_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_11_6_1 : List (List (List ℕ)) := [[[],[],[1,1,1]],[[],[],[1,1,2]],[[],[],[1,1,3]],[[],[],[1,2,1]],[[],[],[1,2,2]],[[],[],[1,3,1]],[[],[],[2],[2]],[[],[],[2],[3]],[[],[],[2,1,2]],[[],[1],[1,1]],[[],[1],[1,2]],[[],[1],[1,3]],[[],[1],[2,2]],[[],[1,1],[2]],[[],[1,1],[3]],[[],[1,1,1,1]]] + +theorem patterns_11_6_1_verified : ∀ D ∈ patterns_11_6_1, PatternVerified 11 6 D := by + + simp only [patterns_11_6_1, List.forall_mem_cons] + + exact ⟨⟨certificate_295, certificate_295_valid⟩, ⟨⟨certificate_296, certificate_296_valid⟩, ⟨⟨certificate_297, certificate_297_valid⟩, ⟨⟨certificate_298, certificate_298_valid⟩, ⟨⟨certificate_299, certificate_299_valid⟩, ⟨⟨certificate_300, certificate_300_valid⟩, ⟨⟨certificate_301, certificate_301_valid⟩, ⟨⟨certificate_302, certificate_302_valid⟩, ⟨⟨certificate_303, certificate_303_valid⟩, ⟨⟨certificate_304, certificate_304_valid⟩, ⟨⟨certificate_305, certificate_305_valid⟩, ⟨⟨certificate_306, certificate_306_valid⟩, ⟨⟨certificate_307, certificate_307_valid⟩, ⟨⟨certificate_308, certificate_308_valid⟩, ⟨⟨certificate_309, certificate_309_valid⟩, ⟨⟨certificate_310, certificate_310_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_11_6_2 : List (List (List ℕ)) := [[[],[1,1,1,2]],[[],[1,1,2,1]],[[],[1,2],[2]],[[1],[1],[1]],[[1],[1],[2]],[[1],[1],[3]],[[1],[1,1,1]],[[1],[1,1,2]],[[1],[1,2,1]],[[1],[2],[2]],[[1,1],[1,1]],[[1,1],[1,2]],[[1,1,1],[2]],[[1,1,1,1,1]]] + +theorem patterns_11_6_2_verified : ∀ D ∈ patterns_11_6_2, PatternVerified 11 6 D := by + + simp only [patterns_11_6_2, List.forall_mem_cons] + + exact ⟨⟨certificate_311, certificate_311_valid⟩, ⟨⟨certificate_312, certificate_312_valid⟩, ⟨⟨certificate_313, certificate_313_valid⟩, ⟨⟨certificate_314, certificate_314_valid⟩, ⟨⟨certificate_315, certificate_315_valid⟩, ⟨⟨certificate_316, certificate_316_valid⟩, ⟨⟨certificate_317, certificate_317_valid⟩, ⟨⟨certificate_318, certificate_318_valid⟩, ⟨⟨certificate_319, certificate_319_valid⟩, ⟨⟨certificate_320, certificate_320_valid⟩, ⟨⟨certificate_321, certificate_321_valid⟩, ⟨⟨certificate_322, certificate_322_valid⟩, ⟨⟨certificate_323, certificate_323_valid⟩, ⟨⟨certificate_324, certificate_324_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_11_6 : List (List (List ℕ)) := patterns_11_6_0 ++ (patterns_11_6_1 ++ (patterns_11_6_2 ++ ([]))) + +theorem patterns_11_6_verified : ∀ D ∈ patterns_11_6, PatternVerified 11 6 D := by + + simp only [patterns_11_6, List.forall_mem_append] + + exact ⟨patterns_11_6_0_verified, ⟨patterns_11_6_1_verified, ⟨patterns_11_6_2_verified, by simp⟩⟩⟩ + +theorem patterns_11_6_coverage : patternChoices 6 5 [] = patterns_11_6 := by decide +kernel + +theorem finite_patterns_11_6 : ∀ D ∈ patternChoices 6 (11-6) [], PatternVerified 11 6 D := by + + rw [patterns_11_6_coverage] + + exact patterns_11_6_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns11x7.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns11x7.lean new file mode 100644 index 0000000000000000000000000000000000000000..5946d25fb22d0ce641e73d3177dd8ccd27cf4c8d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns11x7.lean @@ -0,0 +1,56 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates011 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_11_7_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[]],[[],[],[],[],[],[1]],[[],[],[],[],[],[2]],[[],[],[],[],[],[3]],[[],[],[],[],[],[4]],[[],[],[],[],[1,1]],[[],[],[],[],[1,2]],[[],[],[],[],[1,3]],[[],[],[],[],[2,2]],[[],[],[],[1],[1]],[[],[],[],[1],[2]],[[],[],[],[1],[3]],[[],[],[],[1,1,1]],[[],[],[],[1,1,2]],[[],[],[],[1,2,1]],[[],[],[],[2],[2]]] + +theorem patterns_11_7_0_verified : ∀ D ∈ patterns_11_7_0, PatternVerified 11 7 D := by + + simp only [patterns_11_7_0, List.forall_mem_cons] + + exact ⟨⟨certificate_325, certificate_325_valid⟩, ⟨⟨certificate_326, certificate_326_valid⟩, ⟨⟨certificate_327, certificate_327_valid⟩, ⟨⟨certificate_328, certificate_328_valid⟩, ⟨⟨certificate_329, certificate_329_valid⟩, ⟨⟨certificate_330, certificate_330_valid⟩, ⟨⟨certificate_331, certificate_331_valid⟩, ⟨⟨certificate_332, certificate_332_valid⟩, ⟨⟨certificate_333, certificate_333_valid⟩, ⟨⟨certificate_334, certificate_334_valid⟩, ⟨⟨certificate_335, certificate_335_valid⟩, ⟨⟨certificate_336, certificate_336_valid⟩, ⟨⟨certificate_337, certificate_337_valid⟩, ⟨⟨certificate_338, certificate_338_valid⟩, ⟨⟨certificate_339, certificate_339_valid⟩, ⟨⟨certificate_340, certificate_340_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_11_7_1 : List (List (List ℕ)) := [[[],[],[1],[1,1]],[[],[],[1],[1,2]],[[],[],[1,1],[2]],[[],[],[1,1,1,1]],[[],[1],[1],[1]],[[],[1],[1],[2]],[[],[1],[1,1,1]],[[],[1,1],[1,1]],[[1],[1],[1,1]]] + +theorem patterns_11_7_1_verified : ∀ D ∈ patterns_11_7_1, PatternVerified 11 7 D := by + + simp only [patterns_11_7_1, List.forall_mem_cons] + + exact ⟨⟨certificate_341, certificate_341_valid⟩, ⟨⟨certificate_342, certificate_342_valid⟩, ⟨⟨certificate_343, certificate_343_valid⟩, ⟨⟨certificate_344, certificate_344_valid⟩, ⟨⟨certificate_345, certificate_345_valid⟩, ⟨⟨certificate_346, certificate_346_valid⟩, ⟨⟨certificate_347, certificate_347_valid⟩, ⟨⟨certificate_348, certificate_348_valid⟩, ⟨⟨certificate_349, certificate_349_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_11_7 : List (List (List ℕ)) := patterns_11_7_0 ++ (patterns_11_7_1 ++ ([])) + +theorem patterns_11_7_verified : ∀ D ∈ patterns_11_7, PatternVerified 11 7 D := by + + simp only [patterns_11_7, List.forall_mem_append] + + exact ⟨patterns_11_7_0_verified, ⟨patterns_11_7_1_verified, by simp⟩⟩ + +theorem patterns_11_7_coverage : patternChoices 7 4 [] = patterns_11_7 := by decide +kernel + +theorem finite_patterns_11_7 : ∀ D ∈ patternChoices 7 (11-7) [], PatternVerified 11 7 D := by + + rw [patterns_11_7_coverage] + + exact patterns_11_7_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns11x8.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns11x8.lean new file mode 100644 index 0000000000000000000000000000000000000000..8051cd0f771c3d5fcfbf02a768b357fef8b37178 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns11x8.lean @@ -0,0 +1,49 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates011 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates012 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_11_8_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[],[]],[[],[],[],[],[],[],[1]],[[],[],[],[],[],[],[2]],[[],[],[],[],[],[],[3]],[[],[],[],[],[],[1,1]],[[],[],[],[],[],[1,2]],[[],[],[],[],[1],[1]],[[],[],[],[],[1],[2]],[[],[],[],[],[1,1,1]],[[],[],[],[1],[1,1]],[[],[],[1],[1],[1]]] + +theorem patterns_11_8_0_verified : ∀ D ∈ patterns_11_8_0, PatternVerified 11 8 D := by + + simp only [patterns_11_8_0, List.forall_mem_cons] + + exact ⟨⟨certificate_350, certificate_350_valid⟩, ⟨⟨certificate_351, certificate_351_valid⟩, ⟨⟨certificate_352, certificate_352_valid⟩, ⟨⟨certificate_353, certificate_353_valid⟩, ⟨⟨certificate_354, certificate_354_valid⟩, ⟨⟨certificate_355, certificate_355_valid⟩, ⟨⟨certificate_356, certificate_356_valid⟩, ⟨⟨certificate_357, certificate_357_valid⟩, ⟨⟨certificate_358, certificate_358_valid⟩, ⟨⟨certificate_359, certificate_359_valid⟩, ⟨⟨certificate_360, certificate_360_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_11_8 : List (List (List ℕ)) := patterns_11_8_0 ++ ([]) + +theorem patterns_11_8_verified : ∀ D ∈ patterns_11_8, PatternVerified 11 8 D := by + + simp only [patterns_11_8, List.forall_mem_append] + + exact ⟨patterns_11_8_0_verified, by simp⟩ + +theorem patterns_11_8_coverage : patternChoices 8 3 [] = patterns_11_8 := by decide +kernel + +theorem finite_patterns_11_8 : ∀ D ∈ patternChoices 8 (11-8) [], PatternVerified 11 8 D := by + + rw [patterns_11_8_coverage] + + exact patterns_11_8_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns12x6.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns12x6.lean new file mode 100644 index 0000000000000000000000000000000000000000..12f4312b659e77a1d0f6724897afd178885ebeaf --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns12x6.lean @@ -0,0 +1,90 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates012 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates013 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates014 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_12_6_0 : List (List (List ℕ)) := [[[],[],[],[],[],[]],[[],[],[],[],[1]],[[],[],[],[],[2]],[[],[],[],[],[3]],[[],[],[],[],[4]],[[],[],[],[],[5]],[[],[],[],[],[6]],[[],[],[],[1,1]],[[],[],[],[1,2]],[[],[],[],[1,3]],[[],[],[],[1,4]],[[],[],[],[1,5]],[[],[],[],[2,2]],[[],[],[],[2,3]],[[],[],[],[2,4]],[[],[],[],[3,3]]] + +theorem patterns_12_6_0_verified : ∀ D ∈ patterns_12_6_0, PatternVerified 12 6 D := by + + simp only [patterns_12_6_0, List.forall_mem_cons] + + exact ⟨⟨certificate_361, certificate_361_valid⟩, ⟨⟨certificate_362, certificate_362_valid⟩, ⟨⟨certificate_363, certificate_363_valid⟩, ⟨⟨certificate_364, certificate_364_valid⟩, ⟨⟨certificate_365, certificate_365_valid⟩, ⟨⟨certificate_366, certificate_366_valid⟩, ⟨⟨certificate_367, certificate_367_valid⟩, ⟨⟨certificate_368, certificate_368_valid⟩, ⟨⟨certificate_369, certificate_369_valid⟩, ⟨⟨certificate_370, certificate_370_valid⟩, ⟨⟨certificate_371, certificate_371_valid⟩, ⟨⟨certificate_372, certificate_372_valid⟩, ⟨⟨certificate_373, certificate_373_valid⟩, ⟨⟨certificate_374, certificate_374_valid⟩, ⟨⟨certificate_375, certificate_375_valid⟩, ⟨⟨certificate_376, certificate_376_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_12_6_1 : List (List (List ℕ)) := [[[],[],[1],[1]],[[],[],[1],[2]],[[],[],[1],[3]],[[],[],[1],[4]],[[],[],[1],[5]],[[],[],[1,1,1]],[[],[],[1,1,2]],[[],[],[1,1,3]],[[],[],[1,1,4]],[[],[],[1,2,1]],[[],[],[1,2,2]],[[],[],[1,2,3]],[[],[],[1,3,1]],[[],[],[1,3,2]],[[],[],[1,4,1]],[[],[],[2],[2]]] + +theorem patterns_12_6_1_verified : ∀ D ∈ patterns_12_6_1, PatternVerified 12 6 D := by + + simp only [patterns_12_6_1, List.forall_mem_cons] + + exact ⟨⟨certificate_377, certificate_377_valid⟩, ⟨⟨certificate_378, certificate_378_valid⟩, ⟨⟨certificate_379, certificate_379_valid⟩, ⟨⟨certificate_380, certificate_380_valid⟩, ⟨⟨certificate_381, certificate_381_valid⟩, ⟨⟨certificate_382, certificate_382_valid⟩, ⟨⟨certificate_383, certificate_383_valid⟩, ⟨⟨certificate_384, certificate_384_valid⟩, ⟨⟨certificate_385, certificate_385_valid⟩, ⟨⟨certificate_386, certificate_386_valid⟩, ⟨⟨certificate_387, certificate_387_valid⟩, ⟨⟨certificate_388, certificate_388_valid⟩, ⟨⟨certificate_389, certificate_389_valid⟩, ⟨⟨certificate_390, certificate_390_valid⟩, ⟨⟨certificate_391, certificate_391_valid⟩, ⟨⟨certificate_392, certificate_392_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_12_6_2 : List (List (List ℕ)) := [[[],[],[2],[3]],[[],[],[2],[4]],[[],[],[2,1,2]],[[],[],[2,1,3]],[[],[],[2,2,2]],[[],[],[3],[3]],[[],[1],[1,1]],[[],[1],[1,2]],[[],[1],[1,3]],[[],[1],[1,4]],[[],[1],[2,2]],[[],[1],[2,3]],[[],[1,1],[2]],[[],[1,1],[3]],[[],[1,1],[4]],[[],[1,1,1,1]]] + +theorem patterns_12_6_2_verified : ∀ D ∈ patterns_12_6_2, PatternVerified 12 6 D := by + + simp only [patterns_12_6_2, List.forall_mem_cons] + + exact ⟨⟨certificate_393, certificate_393_valid⟩, ⟨⟨certificate_394, certificate_394_valid⟩, ⟨⟨certificate_395, certificate_395_valid⟩, ⟨⟨certificate_396, certificate_396_valid⟩, ⟨⟨certificate_397, certificate_397_valid⟩, ⟨⟨certificate_398, certificate_398_valid⟩, ⟨⟨certificate_399, certificate_399_valid⟩, ⟨⟨certificate_400, certificate_400_valid⟩, ⟨⟨certificate_401, certificate_401_valid⟩, ⟨⟨certificate_402, certificate_402_valid⟩, ⟨⟨certificate_403, certificate_403_valid⟩, ⟨⟨certificate_404, certificate_404_valid⟩, ⟨⟨certificate_405, certificate_405_valid⟩, ⟨⟨certificate_406, certificate_406_valid⟩, ⟨⟨certificate_407, certificate_407_valid⟩, ⟨⟨certificate_408, certificate_408_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_12_6_3 : List (List (List ℕ)) := [[[],[1,1,1,2]],[[],[1,1,1,3]],[[],[1,1,2,1]],[[],[1,1,2,2]],[[],[1,1,3,1]],[[],[1,2],[2]],[[],[1,2],[3]],[[],[1,2,1,2]],[[],[1,2,2,1]],[[],[1,3],[2]],[[],[2],[2,2]],[[],[2,1,1,2]],[[1],[1],[1]],[[1],[1],[2]],[[1],[1],[3]],[[1],[1],[4]]] + +theorem patterns_12_6_3_verified : ∀ D ∈ patterns_12_6_3, PatternVerified 12 6 D := by + + simp only [patterns_12_6_3, List.forall_mem_cons] + + exact ⟨⟨certificate_409, certificate_409_valid⟩, ⟨⟨certificate_410, certificate_410_valid⟩, ⟨⟨certificate_411, certificate_411_valid⟩, ⟨⟨certificate_412, certificate_412_valid⟩, ⟨⟨certificate_413, certificate_413_valid⟩, ⟨⟨certificate_414, certificate_414_valid⟩, ⟨⟨certificate_415, certificate_415_valid⟩, ⟨⟨certificate_416, certificate_416_valid⟩, ⟨⟨certificate_417, certificate_417_valid⟩, ⟨⟨certificate_418, certificate_418_valid⟩, ⟨⟨certificate_419, certificate_419_valid⟩, ⟨⟨certificate_420, certificate_420_valid⟩, ⟨⟨certificate_421, certificate_421_valid⟩, ⟨⟨certificate_422, certificate_422_valid⟩, ⟨⟨certificate_423, certificate_423_valid⟩, ⟨⟨certificate_424, certificate_424_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_12_6_4 : List (List (List ℕ)) := [[[1],[1,1,1]],[[1],[1,1,2]],[[1],[1,1,3]],[[1],[1,2,1]],[[1],[1,2,2]],[[1],[1,3,1]],[[1],[2],[2]],[[1],[2],[3]],[[1],[2,1,2]],[[1,1],[1,1]],[[1,1],[1,2]],[[1,1],[1,3]],[[1,1],[2,2]],[[1,1,1],[2]],[[1,1,1],[3]],[[1,1,1,1,1]]] + +theorem patterns_12_6_4_verified : ∀ D ∈ patterns_12_6_4, PatternVerified 12 6 D := by + + simp only [patterns_12_6_4, List.forall_mem_cons] + + exact ⟨⟨certificate_425, certificate_425_valid⟩, ⟨⟨certificate_426, certificate_426_valid⟩, ⟨⟨certificate_427, certificate_427_valid⟩, ⟨⟨certificate_428, certificate_428_valid⟩, ⟨⟨certificate_429, certificate_429_valid⟩, ⟨⟨certificate_430, certificate_430_valid⟩, ⟨⟨certificate_431, certificate_431_valid⟩, ⟨⟨certificate_432, certificate_432_valid⟩, ⟨⟨certificate_433, certificate_433_valid⟩, ⟨⟨certificate_434, certificate_434_valid⟩, ⟨⟨certificate_435, certificate_435_valid⟩, ⟨⟨certificate_436, certificate_436_valid⟩, ⟨⟨certificate_437, certificate_437_valid⟩, ⟨⟨certificate_438, certificate_438_valid⟩, ⟨⟨certificate_439, certificate_439_valid⟩, ⟨⟨certificate_440, certificate_440_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_12_6_5 : List (List (List ℕ)) := [[[1,1,1,1,2]],[[1,1,1,2,1]],[[1,1,2],[2]],[[1,1,2,1,1]],[[1,2],[1,2]],[[1,2,1],[2]],[[2],[2],[2]]] + +theorem patterns_12_6_5_verified : ∀ D ∈ patterns_12_6_5, PatternVerified 12 6 D := by + + simp only [patterns_12_6_5, List.forall_mem_cons] + + exact ⟨⟨certificate_441, certificate_441_valid⟩, ⟨⟨certificate_442, certificate_442_valid⟩, ⟨⟨certificate_443, certificate_443_valid⟩, ⟨⟨certificate_444, certificate_444_valid⟩, ⟨⟨certificate_445, certificate_445_valid⟩, ⟨⟨certificate_446, certificate_446_valid⟩, ⟨⟨certificate_447, certificate_447_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_12_6 : List (List (List ℕ)) := patterns_12_6_0 ++ (patterns_12_6_1 ++ (patterns_12_6_2 ++ (patterns_12_6_3 ++ (patterns_12_6_4 ++ (patterns_12_6_5 ++ ([])))))) + +theorem patterns_12_6_verified : ∀ D ∈ patterns_12_6, PatternVerified 12 6 D := by + + simp only [patterns_12_6, List.forall_mem_append] + + exact ⟨patterns_12_6_0_verified, ⟨patterns_12_6_1_verified, ⟨patterns_12_6_2_verified, ⟨patterns_12_6_3_verified, ⟨patterns_12_6_4_verified, ⟨patterns_12_6_5_verified, by simp⟩⟩⟩⟩⟩⟩ + +theorem patterns_12_6_coverage : patternChoices 6 6 [] = patterns_12_6 := by decide +kernel + +theorem finite_patterns_12_6 : ∀ D ∈ patternChoices 6 (12-6) [], PatternVerified 12 6 D := by + + rw [patterns_12_6_coverage] + + exact patterns_12_6_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns12x7.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns12x7.lean new file mode 100644 index 0000000000000000000000000000000000000000..01ba5faa03f47b0e1cd84e99bec89a80175f117d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns12x7.lean @@ -0,0 +1,73 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates015 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates016 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_12_7_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[]],[[],[],[],[],[],[1]],[[],[],[],[],[],[2]],[[],[],[],[],[],[3]],[[],[],[],[],[],[4]],[[],[],[],[],[],[5]],[[],[],[],[],[1,1]],[[],[],[],[],[1,2]],[[],[],[],[],[1,3]],[[],[],[],[],[1,4]],[[],[],[],[],[2,2]],[[],[],[],[],[2,3]],[[],[],[],[1],[1]],[[],[],[],[1],[2]],[[],[],[],[1],[3]],[[],[],[],[1],[4]]] + +theorem patterns_12_7_0_verified : ∀ D ∈ patterns_12_7_0, PatternVerified 12 7 D := by + + simp only [patterns_12_7_0, List.forall_mem_cons] + + exact ⟨⟨certificate_448, certificate_448_valid⟩, ⟨⟨certificate_449, certificate_449_valid⟩, ⟨⟨certificate_450, certificate_450_valid⟩, ⟨⟨certificate_451, certificate_451_valid⟩, ⟨⟨certificate_452, certificate_452_valid⟩, ⟨⟨certificate_453, certificate_453_valid⟩, ⟨⟨certificate_454, certificate_454_valid⟩, ⟨⟨certificate_455, certificate_455_valid⟩, ⟨⟨certificate_456, certificate_456_valid⟩, ⟨⟨certificate_457, certificate_457_valid⟩, ⟨⟨certificate_458, certificate_458_valid⟩, ⟨⟨certificate_459, certificate_459_valid⟩, ⟨⟨certificate_460, certificate_460_valid⟩, ⟨⟨certificate_461, certificate_461_valid⟩, ⟨⟨certificate_462, certificate_462_valid⟩, ⟨⟨certificate_463, certificate_463_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_12_7_1 : List (List (List ℕ)) := [[[],[],[],[1,1,1]],[[],[],[],[1,1,2]],[[],[],[],[1,1,3]],[[],[],[],[1,2,1]],[[],[],[],[1,2,2]],[[],[],[],[1,3,1]],[[],[],[],[2],[2]],[[],[],[],[2],[3]],[[],[],[],[2,1,2]],[[],[],[1],[1,1]],[[],[],[1],[1,2]],[[],[],[1],[1,3]],[[],[],[1],[2,2]],[[],[],[1,1],[2]],[[],[],[1,1],[3]],[[],[],[1,1,1,1]]] + +theorem patterns_12_7_1_verified : ∀ D ∈ patterns_12_7_1, PatternVerified 12 7 D := by + + simp only [patterns_12_7_1, List.forall_mem_cons] + + exact ⟨⟨certificate_464, certificate_464_valid⟩, ⟨⟨certificate_465, certificate_465_valid⟩, ⟨⟨certificate_466, certificate_466_valid⟩, ⟨⟨certificate_467, certificate_467_valid⟩, ⟨⟨certificate_468, certificate_468_valid⟩, ⟨⟨certificate_469, certificate_469_valid⟩, ⟨⟨certificate_470, certificate_470_valid⟩, ⟨⟨certificate_471, certificate_471_valid⟩, ⟨⟨certificate_472, certificate_472_valid⟩, ⟨⟨certificate_473, certificate_473_valid⟩, ⟨⟨certificate_474, certificate_474_valid⟩, ⟨⟨certificate_475, certificate_475_valid⟩, ⟨⟨certificate_476, certificate_476_valid⟩, ⟨⟨certificate_477, certificate_477_valid⟩, ⟨⟨certificate_478, certificate_478_valid⟩, ⟨⟨certificate_479, certificate_479_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_12_7_2 : List (List (List ℕ)) := [[[],[],[1,1,1,2]],[[],[],[1,1,2,1]],[[],[],[1,2],[2]],[[],[1],[1],[1]],[[],[1],[1],[2]],[[],[1],[1],[3]],[[],[1],[1,1,1]],[[],[1],[1,1,2]],[[],[1],[1,2,1]],[[],[1],[2],[2]],[[],[1,1],[1,1]],[[],[1,1],[1,2]],[[],[1,1,1],[2]],[[],[1,1,1,1,1]],[[1],[1],[1,1]],[[1],[1],[1,2]]] + +theorem patterns_12_7_2_verified : ∀ D ∈ patterns_12_7_2, PatternVerified 12 7 D := by + + simp only [patterns_12_7_2, List.forall_mem_cons] + + exact ⟨⟨certificate_480, certificate_480_valid⟩, ⟨⟨certificate_481, certificate_481_valid⟩, ⟨⟨certificate_482, certificate_482_valid⟩, ⟨⟨certificate_483, certificate_483_valid⟩, ⟨⟨certificate_484, certificate_484_valid⟩, ⟨⟨certificate_485, certificate_485_valid⟩, ⟨⟨certificate_486, certificate_486_valid⟩, ⟨⟨certificate_487, certificate_487_valid⟩, ⟨⟨certificate_488, certificate_488_valid⟩, ⟨⟨certificate_489, certificate_489_valid⟩, ⟨⟨certificate_490, certificate_490_valid⟩, ⟨⟨certificate_491, certificate_491_valid⟩, ⟨⟨certificate_492, certificate_492_valid⟩, ⟨⟨certificate_493, certificate_493_valid⟩, ⟨⟨certificate_494, certificate_494_valid⟩, ⟨⟨certificate_495, certificate_495_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_12_7_3 : List (List (List ℕ)) := [[[1],[1,1],[2]],[[1],[1,1,1,1]],[[1,1],[1,1,1]]] + +theorem patterns_12_7_3_verified : ∀ D ∈ patterns_12_7_3, PatternVerified 12 7 D := by + + simp only [patterns_12_7_3, List.forall_mem_cons] + + exact ⟨⟨certificate_496, certificate_496_valid⟩, ⟨⟨certificate_497, certificate_497_valid⟩, ⟨⟨certificate_498, certificate_498_valid⟩, (by simp)⟩⟩⟩ + +noncomputable def patterns_12_7 : List (List (List ℕ)) := patterns_12_7_0 ++ (patterns_12_7_1 ++ (patterns_12_7_2 ++ (patterns_12_7_3 ++ ([])))) + +theorem patterns_12_7_verified : ∀ D ∈ patterns_12_7, PatternVerified 12 7 D := by + + simp only [patterns_12_7, List.forall_mem_append] + + exact ⟨patterns_12_7_0_verified, ⟨patterns_12_7_1_verified, ⟨patterns_12_7_2_verified, ⟨patterns_12_7_3_verified, by simp⟩⟩⟩⟩ + +theorem patterns_12_7_coverage : patternChoices 7 5 [] = patterns_12_7 := by decide +kernel + +theorem finite_patterns_12_7 : ∀ D ∈ patternChoices 7 (12-7) [], PatternVerified 12 7 D := by + + rw [patterns_12_7_coverage] + + exact patterns_12_7_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns12x8.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns12x8.lean new file mode 100644 index 0000000000000000000000000000000000000000..ecb26bf7a0b0ebc62746767dafbc18908bf5875d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns12x8.lean @@ -0,0 +1,57 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates016 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates017 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_12_8_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[],[]],[[],[],[],[],[],[],[1]],[[],[],[],[],[],[],[2]],[[],[],[],[],[],[],[3]],[[],[],[],[],[],[],[4]],[[],[],[],[],[],[1,1]],[[],[],[],[],[],[1,2]],[[],[],[],[],[],[1,3]],[[],[],[],[],[],[2,2]],[[],[],[],[],[1],[1]],[[],[],[],[],[1],[2]],[[],[],[],[],[1],[3]],[[],[],[],[],[1,1,1]],[[],[],[],[],[1,1,2]],[[],[],[],[],[1,2,1]],[[],[],[],[],[2],[2]]] + +theorem patterns_12_8_0_verified : ∀ D ∈ patterns_12_8_0, PatternVerified 12 8 D := by + + simp only [patterns_12_8_0, List.forall_mem_cons] + + exact ⟨⟨certificate_499, certificate_499_valid⟩, ⟨⟨certificate_500, certificate_500_valid⟩, ⟨⟨certificate_501, certificate_501_valid⟩, ⟨⟨certificate_502, certificate_502_valid⟩, ⟨⟨certificate_503, certificate_503_valid⟩, ⟨⟨certificate_504, certificate_504_valid⟩, ⟨⟨certificate_505, certificate_505_valid⟩, ⟨⟨certificate_506, certificate_506_valid⟩, ⟨⟨certificate_507, certificate_507_valid⟩, ⟨⟨certificate_508, certificate_508_valid⟩, ⟨⟨certificate_509, certificate_509_valid⟩, ⟨⟨certificate_510, certificate_510_valid⟩, ⟨⟨certificate_511, certificate_511_valid⟩, ⟨⟨certificate_512, certificate_512_valid⟩, ⟨⟨certificate_513, certificate_513_valid⟩, ⟨⟨certificate_514, certificate_514_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_12_8_1 : List (List (List ℕ)) := [[[],[],[],[1],[1,1]],[[],[],[],[1],[1,2]],[[],[],[],[1,1],[2]],[[],[],[],[1,1,1,1]],[[],[],[1],[1],[1]],[[],[],[1],[1],[2]],[[],[],[1],[1,1,1]],[[],[],[1,1],[1,1]],[[],[1],[1],[1,1]],[[1],[1],[1],[1]]] + +theorem patterns_12_8_1_verified : ∀ D ∈ patterns_12_8_1, PatternVerified 12 8 D := by + + simp only [patterns_12_8_1, List.forall_mem_cons] + + exact ⟨⟨certificate_515, certificate_515_valid⟩, ⟨⟨certificate_516, certificate_516_valid⟩, ⟨⟨certificate_517, certificate_517_valid⟩, ⟨⟨certificate_518, certificate_518_valid⟩, ⟨⟨certificate_519, certificate_519_valid⟩, ⟨⟨certificate_520, certificate_520_valid⟩, ⟨⟨certificate_521, certificate_521_valid⟩, ⟨⟨certificate_522, certificate_522_valid⟩, ⟨⟨certificate_523, certificate_523_valid⟩, ⟨⟨certificate_524, certificate_524_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_12_8 : List (List (List ℕ)) := patterns_12_8_0 ++ (patterns_12_8_1 ++ ([])) + +theorem patterns_12_8_verified : ∀ D ∈ patterns_12_8, PatternVerified 12 8 D := by + + simp only [patterns_12_8, List.forall_mem_append] + + exact ⟨patterns_12_8_0_verified, ⟨patterns_12_8_1_verified, by simp⟩⟩ + +theorem patterns_12_8_coverage : patternChoices 8 4 [] = patterns_12_8 := by decide +kernel + +theorem finite_patterns_12_8 : ∀ D ∈ patternChoices 8 (12-8) [], PatternVerified 12 8 D := by + + rw [patterns_12_8_coverage] + + exact patterns_12_8_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns13x6.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns13x6.lean new file mode 100644 index 0000000000000000000000000000000000000000..d2fac73b2dd0e6311324c4e306fdeec49b428b53 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns13x6.lean @@ -0,0 +1,125 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates017 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates018 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates019 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates020 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates021 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates022 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_13_6_0 : List (List (List ℕ)) := [[[],[],[],[],[],[]],[[],[],[],[],[1]],[[],[],[],[],[2]],[[],[],[],[],[3]],[[],[],[],[],[4]],[[],[],[],[],[5]],[[],[],[],[],[6]],[[],[],[],[],[7]],[[],[],[],[1,1]],[[],[],[],[1,2]],[[],[],[],[1,3]],[[],[],[],[1,4]],[[],[],[],[1,5]],[[],[],[],[1,6]],[[],[],[],[2,2]],[[],[],[],[2,3]]] + +theorem patterns_13_6_0_verified : ∀ D ∈ patterns_13_6_0, PatternVerified 13 6 D := by + + simp only [patterns_13_6_0, List.forall_mem_cons] + + exact ⟨⟨certificate_525, certificate_525_valid⟩, ⟨⟨certificate_526, certificate_526_valid⟩, ⟨⟨certificate_527, certificate_527_valid⟩, ⟨⟨certificate_528, certificate_528_valid⟩, ⟨⟨certificate_529, certificate_529_valid⟩, ⟨⟨certificate_530, certificate_530_valid⟩, ⟨⟨certificate_531, certificate_531_valid⟩, ⟨⟨certificate_532, certificate_532_valid⟩, ⟨⟨certificate_533, certificate_533_valid⟩, ⟨⟨certificate_534, certificate_534_valid⟩, ⟨⟨certificate_535, certificate_535_valid⟩, ⟨⟨certificate_536, certificate_536_valid⟩, ⟨⟨certificate_537, certificate_537_valid⟩, ⟨⟨certificate_538, certificate_538_valid⟩, ⟨⟨certificate_539, certificate_539_valid⟩, ⟨⟨certificate_540, certificate_540_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_6_1 : List (List (List ℕ)) := [[[],[],[],[2,4]],[[],[],[],[2,5]],[[],[],[],[3,3]],[[],[],[],[3,4]],[[],[],[1],[1]],[[],[],[1],[2]],[[],[],[1],[3]],[[],[],[1],[4]],[[],[],[1],[5]],[[],[],[1],[6]],[[],[],[1,1,1]],[[],[],[1,1,2]],[[],[],[1,1,3]],[[],[],[1,1,4]],[[],[],[1,1,5]],[[],[],[1,2,1]]] + +theorem patterns_13_6_1_verified : ∀ D ∈ patterns_13_6_1, PatternVerified 13 6 D := by + + simp only [patterns_13_6_1, List.forall_mem_cons] + + exact ⟨⟨certificate_541, certificate_541_valid⟩, ⟨⟨certificate_542, certificate_542_valid⟩, ⟨⟨certificate_543, certificate_543_valid⟩, ⟨⟨certificate_544, certificate_544_valid⟩, ⟨⟨certificate_545, certificate_545_valid⟩, ⟨⟨certificate_546, certificate_546_valid⟩, ⟨⟨certificate_547, certificate_547_valid⟩, ⟨⟨certificate_548, certificate_548_valid⟩, ⟨⟨certificate_549, certificate_549_valid⟩, ⟨⟨certificate_550, certificate_550_valid⟩, ⟨⟨certificate_551, certificate_551_valid⟩, ⟨⟨certificate_552, certificate_552_valid⟩, ⟨⟨certificate_553, certificate_553_valid⟩, ⟨⟨certificate_554, certificate_554_valid⟩, ⟨⟨certificate_555, certificate_555_valid⟩, ⟨⟨certificate_556, certificate_556_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_6_2 : List (List (List ℕ)) := [[[],[],[1,2,2]],[[],[],[1,2,3]],[[],[],[1,2,4]],[[],[],[1,3,1]],[[],[],[1,3,2]],[[],[],[1,3,3]],[[],[],[1,4,1]],[[],[],[1,4,2]],[[],[],[1,5,1]],[[],[],[2],[2]],[[],[],[2],[3]],[[],[],[2],[4]],[[],[],[2],[5]],[[],[],[2,1,2]],[[],[],[2,1,3]],[[],[],[2,1,4]]] + +theorem patterns_13_6_2_verified : ∀ D ∈ patterns_13_6_2, PatternVerified 13 6 D := by + + simp only [patterns_13_6_2, List.forall_mem_cons] + + exact ⟨⟨certificate_557, certificate_557_valid⟩, ⟨⟨certificate_558, certificate_558_valid⟩, ⟨⟨certificate_559, certificate_559_valid⟩, ⟨⟨certificate_560, certificate_560_valid⟩, ⟨⟨certificate_561, certificate_561_valid⟩, ⟨⟨certificate_562, certificate_562_valid⟩, ⟨⟨certificate_563, certificate_563_valid⟩, ⟨⟨certificate_564, certificate_564_valid⟩, ⟨⟨certificate_565, certificate_565_valid⟩, ⟨⟨certificate_566, certificate_566_valid⟩, ⟨⟨certificate_567, certificate_567_valid⟩, ⟨⟨certificate_568, certificate_568_valid⟩, ⟨⟨certificate_569, certificate_569_valid⟩, ⟨⟨certificate_570, certificate_570_valid⟩, ⟨⟨certificate_571, certificate_571_valid⟩, ⟨⟨certificate_572, certificate_572_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_6_3 : List (List (List ℕ)) := [[[],[],[2,2,2]],[[],[],[2,2,3]],[[],[],[2,3,2]],[[],[],[3],[3]],[[],[],[3],[4]],[[],[],[3,1,3]],[[],[1],[1,1]],[[],[1],[1,2]],[[],[1],[1,3]],[[],[1],[1,4]],[[],[1],[1,5]],[[],[1],[2,2]],[[],[1],[2,3]],[[],[1],[2,4]],[[],[1],[3,3]],[[],[1,1],[2]]] + +theorem patterns_13_6_3_verified : ∀ D ∈ patterns_13_6_3, PatternVerified 13 6 D := by + + simp only [patterns_13_6_3, List.forall_mem_cons] + + exact ⟨⟨certificate_573, certificate_573_valid⟩, ⟨⟨certificate_574, certificate_574_valid⟩, ⟨⟨certificate_575, certificate_575_valid⟩, ⟨⟨certificate_576, certificate_576_valid⟩, ⟨⟨certificate_577, certificate_577_valid⟩, ⟨⟨certificate_578, certificate_578_valid⟩, ⟨⟨certificate_579, certificate_579_valid⟩, ⟨⟨certificate_580, certificate_580_valid⟩, ⟨⟨certificate_581, certificate_581_valid⟩, ⟨⟨certificate_582, certificate_582_valid⟩, ⟨⟨certificate_583, certificate_583_valid⟩, ⟨⟨certificate_584, certificate_584_valid⟩, ⟨⟨certificate_585, certificate_585_valid⟩, ⟨⟨certificate_586, certificate_586_valid⟩, ⟨⟨certificate_587, certificate_587_valid⟩, ⟨⟨certificate_588, certificate_588_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_6_4 : List (List (List ℕ)) := [[[],[1,1],[3]],[[],[1,1],[4]],[[],[1,1],[5]],[[],[1,1,1,1]],[[],[1,1,1,2]],[[],[1,1,1,3]],[[],[1,1,1,4]],[[],[1,1,2,1]],[[],[1,1,2,2]],[[],[1,1,2,3]],[[],[1,1,3,1]],[[],[1,1,3,2]],[[],[1,1,4,1]],[[],[1,2],[2]],[[],[1,2],[3]],[[],[1,2],[4]]] + +theorem patterns_13_6_4_verified : ∀ D ∈ patterns_13_6_4, PatternVerified 13 6 D := by + + simp only [patterns_13_6_4, List.forall_mem_cons] + + exact ⟨⟨certificate_589, certificate_589_valid⟩, ⟨⟨certificate_590, certificate_590_valid⟩, ⟨⟨certificate_591, certificate_591_valid⟩, ⟨⟨certificate_592, certificate_592_valid⟩, ⟨⟨certificate_593, certificate_593_valid⟩, ⟨⟨certificate_594, certificate_594_valid⟩, ⟨⟨certificate_595, certificate_595_valid⟩, ⟨⟨certificate_596, certificate_596_valid⟩, ⟨⟨certificate_597, certificate_597_valid⟩, ⟨⟨certificate_598, certificate_598_valid⟩, ⟨⟨certificate_599, certificate_599_valid⟩, ⟨⟨certificate_600, certificate_600_valid⟩, ⟨⟨certificate_601, certificate_601_valid⟩, ⟨⟨certificate_602, certificate_602_valid⟩, ⟨⟨certificate_603, certificate_603_valid⟩, ⟨⟨certificate_604, certificate_604_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_6_5 : List (List (List ℕ)) := [[[],[1,2,1,2]],[[],[1,2,1,3]],[[],[1,2,2,1]],[[],[1,2,2,2]],[[],[1,2,3,1]],[[],[1,3],[2]],[[],[1,3],[3]],[[],[1,3,1,2]],[[],[1,4],[2]],[[],[2],[2,2]],[[],[2],[2,3]],[[],[2,1,1,2]],[[],[2,1,1,3]],[[],[2,1,2,2]],[[],[2,2],[3]],[[1],[1],[1]]] + +theorem patterns_13_6_5_verified : ∀ D ∈ patterns_13_6_5, PatternVerified 13 6 D := by + + simp only [patterns_13_6_5, List.forall_mem_cons] + + exact ⟨⟨certificate_605, certificate_605_valid⟩, ⟨⟨certificate_606, certificate_606_valid⟩, ⟨⟨certificate_607, certificate_607_valid⟩, ⟨⟨certificate_608, certificate_608_valid⟩, ⟨⟨certificate_609, certificate_609_valid⟩, ⟨⟨certificate_610, certificate_610_valid⟩, ⟨⟨certificate_611, certificate_611_valid⟩, ⟨⟨certificate_612, certificate_612_valid⟩, ⟨⟨certificate_613, certificate_613_valid⟩, ⟨⟨certificate_614, certificate_614_valid⟩, ⟨⟨certificate_615, certificate_615_valid⟩, ⟨⟨certificate_616, certificate_616_valid⟩, ⟨⟨certificate_617, certificate_617_valid⟩, ⟨⟨certificate_618, certificate_618_valid⟩, ⟨⟨certificate_619, certificate_619_valid⟩, ⟨⟨certificate_620, certificate_620_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_6_6 : List (List (List ℕ)) := [[[1],[1],[2]],[[1],[1],[3]],[[1],[1],[4]],[[1],[1],[5]],[[1],[1,1,1]],[[1],[1,1,2]],[[1],[1,1,3]],[[1],[1,1,4]],[[1],[1,2,1]],[[1],[1,2,2]],[[1],[1,2,3]],[[1],[1,3,1]],[[1],[1,3,2]],[[1],[1,4,1]],[[1],[2],[2]],[[1],[2],[3]]] + +theorem patterns_13_6_6_verified : ∀ D ∈ patterns_13_6_6, PatternVerified 13 6 D := by + + simp only [patterns_13_6_6, List.forall_mem_cons] + + exact ⟨⟨certificate_621, certificate_621_valid⟩, ⟨⟨certificate_622, certificate_622_valid⟩, ⟨⟨certificate_623, certificate_623_valid⟩, ⟨⟨certificate_624, certificate_624_valid⟩, ⟨⟨certificate_625, certificate_625_valid⟩, ⟨⟨certificate_626, certificate_626_valid⟩, ⟨⟨certificate_627, certificate_627_valid⟩, ⟨⟨certificate_628, certificate_628_valid⟩, ⟨⟨certificate_629, certificate_629_valid⟩, ⟨⟨certificate_630, certificate_630_valid⟩, ⟨⟨certificate_631, certificate_631_valid⟩, ⟨⟨certificate_632, certificate_632_valid⟩, ⟨⟨certificate_633, certificate_633_valid⟩, ⟨⟨certificate_634, certificate_634_valid⟩, ⟨⟨certificate_635, certificate_635_valid⟩, ⟨⟨certificate_636, certificate_636_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_6_7 : List (List (List ℕ)) := [[[1],[2],[4]],[[1],[2,1,2]],[[1],[2,1,3]],[[1],[2,2,2]],[[1],[3],[3]],[[1,1],[1,1]],[[1,1],[1,2]],[[1,1],[1,3]],[[1,1],[1,4]],[[1,1],[2,2]],[[1,1],[2,3]],[[1,1,1],[2]],[[1,1,1],[3]],[[1,1,1],[4]],[[1,1,1,1,1]],[[1,1,1,1,2]]] + +theorem patterns_13_6_7_verified : ∀ D ∈ patterns_13_6_7, PatternVerified 13 6 D := by + + simp only [patterns_13_6_7, List.forall_mem_cons] + + exact ⟨⟨certificate_637, certificate_637_valid⟩, ⟨⟨certificate_638, certificate_638_valid⟩, ⟨⟨certificate_639, certificate_639_valid⟩, ⟨⟨certificate_640, certificate_640_valid⟩, ⟨⟨certificate_641, certificate_641_valid⟩, ⟨⟨certificate_642, certificate_642_valid⟩, ⟨⟨certificate_643, certificate_643_valid⟩, ⟨⟨certificate_644, certificate_644_valid⟩, ⟨⟨certificate_645, certificate_645_valid⟩, ⟨⟨certificate_646, certificate_646_valid⟩, ⟨⟨certificate_647, certificate_647_valid⟩, ⟨⟨certificate_648, certificate_648_valid⟩, ⟨⟨certificate_649, certificate_649_valid⟩, ⟨⟨certificate_650, certificate_650_valid⟩, ⟨⟨certificate_651, certificate_651_valid⟩, ⟨⟨certificate_652, certificate_652_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_6_8 : List (List (List ℕ)) := [[[1,1,1,1,3]],[[1,1,1,2,1]],[[1,1,1,2,2]],[[1,1,1,3,1]],[[1,1,2],[2]],[[1,1,2],[3]],[[1,1,2,1,1]],[[1,1,2,1,2]],[[1,1,2,2,1]],[[1,1,3],[2]],[[1,1,3,1,1]],[[1,2],[1,2]],[[1,2],[1,3]],[[1,2],[2,2]],[[1,2,1],[2]],[[1,2,1],[3]]] + +theorem patterns_13_6_8_verified : ∀ D ∈ patterns_13_6_8, PatternVerified 13 6 D := by + + simp only [patterns_13_6_8, List.forall_mem_cons] + + exact ⟨⟨certificate_653, certificate_653_valid⟩, ⟨⟨certificate_654, certificate_654_valid⟩, ⟨⟨certificate_655, certificate_655_valid⟩, ⟨⟨certificate_656, certificate_656_valid⟩, ⟨⟨certificate_657, certificate_657_valid⟩, ⟨⟨certificate_658, certificate_658_valid⟩, ⟨⟨certificate_659, certificate_659_valid⟩, ⟨⟨certificate_660, certificate_660_valid⟩, ⟨⟨certificate_661, certificate_661_valid⟩, ⟨⟨certificate_662, certificate_662_valid⟩, ⟨⟨certificate_663, certificate_663_valid⟩, ⟨⟨certificate_664, certificate_664_valid⟩, ⟨⟨certificate_665, certificate_665_valid⟩, ⟨⟨certificate_666, certificate_666_valid⟩, ⟨⟨certificate_667, certificate_667_valid⟩, ⟨⟨certificate_668, certificate_668_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_6_9 : List (List (List ℕ)) := [[[1,2,1,1,2]],[[1,2,1,2,1]],[[1,2,2],[2]],[[1,3,1],[2]],[[2],[2],[2]],[[2],[2],[3]],[[2],[2,1,2]],[[2,1,1,1,2]]] + +theorem patterns_13_6_9_verified : ∀ D ∈ patterns_13_6_9, PatternVerified 13 6 D := by + + simp only [patterns_13_6_9, List.forall_mem_cons] + + exact ⟨⟨certificate_669, certificate_669_valid⟩, ⟨⟨certificate_670, certificate_670_valid⟩, ⟨⟨certificate_671, certificate_671_valid⟩, ⟨⟨certificate_672, certificate_672_valid⟩, ⟨⟨certificate_673, certificate_673_valid⟩, ⟨⟨certificate_674, certificate_674_valid⟩, ⟨⟨certificate_675, certificate_675_valid⟩, ⟨⟨certificate_676, certificate_676_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_6 : List (List (List ℕ)) := patterns_13_6_0 ++ (patterns_13_6_1 ++ (patterns_13_6_2 ++ (patterns_13_6_3 ++ (patterns_13_6_4 ++ (patterns_13_6_5 ++ (patterns_13_6_6 ++ (patterns_13_6_7 ++ (patterns_13_6_8 ++ (patterns_13_6_9 ++ ([])))))))))) + +theorem patterns_13_6_verified : ∀ D ∈ patterns_13_6, PatternVerified 13 6 D := by + + simp only [patterns_13_6, List.forall_mem_append] + + exact ⟨patterns_13_6_0_verified, ⟨patterns_13_6_1_verified, ⟨patterns_13_6_2_verified, ⟨patterns_13_6_3_verified, ⟨patterns_13_6_4_verified, ⟨patterns_13_6_5_verified, ⟨patterns_13_6_6_verified, ⟨patterns_13_6_7_verified, ⟨patterns_13_6_8_verified, ⟨patterns_13_6_9_verified, by simp⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +theorem patterns_13_6_coverage : patternChoices 6 7 [] = patterns_13_6 := by decide +kernel + +theorem finite_patterns_13_6 : ∀ D ∈ patternChoices 6 (13-6) [], PatternVerified 13 6 D := by + + rw [patterns_13_6_coverage] + + exact patterns_13_6_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns13x7.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns13x7.lean new file mode 100644 index 0000000000000000000000000000000000000000..8cd43ffcdaae0926277d8ba609ada00acb210be1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns13x7.lean @@ -0,0 +1,99 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates022 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates023 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates024 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates025 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_13_7_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[]],[[],[],[],[],[],[1]],[[],[],[],[],[],[2]],[[],[],[],[],[],[3]],[[],[],[],[],[],[4]],[[],[],[],[],[],[5]],[[],[],[],[],[],[6]],[[],[],[],[],[1,1]],[[],[],[],[],[1,2]],[[],[],[],[],[1,3]],[[],[],[],[],[1,4]],[[],[],[],[],[1,5]],[[],[],[],[],[2,2]],[[],[],[],[],[2,3]],[[],[],[],[],[2,4]],[[],[],[],[],[3,3]]] + +theorem patterns_13_7_0_verified : ∀ D ∈ patterns_13_7_0, PatternVerified 13 7 D := by + + simp only [patterns_13_7_0, List.forall_mem_cons] + + exact ⟨⟨certificate_677, certificate_677_valid⟩, ⟨⟨certificate_678, certificate_678_valid⟩, ⟨⟨certificate_679, certificate_679_valid⟩, ⟨⟨certificate_680, certificate_680_valid⟩, ⟨⟨certificate_681, certificate_681_valid⟩, ⟨⟨certificate_682, certificate_682_valid⟩, ⟨⟨certificate_683, certificate_683_valid⟩, ⟨⟨certificate_684, certificate_684_valid⟩, ⟨⟨certificate_685, certificate_685_valid⟩, ⟨⟨certificate_686, certificate_686_valid⟩, ⟨⟨certificate_687, certificate_687_valid⟩, ⟨⟨certificate_688, certificate_688_valid⟩, ⟨⟨certificate_689, certificate_689_valid⟩, ⟨⟨certificate_690, certificate_690_valid⟩, ⟨⟨certificate_691, certificate_691_valid⟩, ⟨⟨certificate_692, certificate_692_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_7_1 : List (List (List ℕ)) := [[[],[],[],[1],[1]],[[],[],[],[1],[2]],[[],[],[],[1],[3]],[[],[],[],[1],[4]],[[],[],[],[1],[5]],[[],[],[],[1,1,1]],[[],[],[],[1,1,2]],[[],[],[],[1,1,3]],[[],[],[],[1,1,4]],[[],[],[],[1,2,1]],[[],[],[],[1,2,2]],[[],[],[],[1,2,3]],[[],[],[],[1,3,1]],[[],[],[],[1,3,2]],[[],[],[],[1,4,1]],[[],[],[],[2],[2]]] + +theorem patterns_13_7_1_verified : ∀ D ∈ patterns_13_7_1, PatternVerified 13 7 D := by + + simp only [patterns_13_7_1, List.forall_mem_cons] + + exact ⟨⟨certificate_693, certificate_693_valid⟩, ⟨⟨certificate_694, certificate_694_valid⟩, ⟨⟨certificate_695, certificate_695_valid⟩, ⟨⟨certificate_696, certificate_696_valid⟩, ⟨⟨certificate_697, certificate_697_valid⟩, ⟨⟨certificate_698, certificate_698_valid⟩, ⟨⟨certificate_699, certificate_699_valid⟩, ⟨⟨certificate_700, certificate_700_valid⟩, ⟨⟨certificate_701, certificate_701_valid⟩, ⟨⟨certificate_702, certificate_702_valid⟩, ⟨⟨certificate_703, certificate_703_valid⟩, ⟨⟨certificate_704, certificate_704_valid⟩, ⟨⟨certificate_705, certificate_705_valid⟩, ⟨⟨certificate_706, certificate_706_valid⟩, ⟨⟨certificate_707, certificate_707_valid⟩, ⟨⟨certificate_708, certificate_708_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_7_2 : List (List (List ℕ)) := [[[],[],[],[2],[3]],[[],[],[],[2],[4]],[[],[],[],[2,1,2]],[[],[],[],[2,1,3]],[[],[],[],[2,2,2]],[[],[],[],[3],[3]],[[],[],[1],[1,1]],[[],[],[1],[1,2]],[[],[],[1],[1,3]],[[],[],[1],[1,4]],[[],[],[1],[2,2]],[[],[],[1],[2,3]],[[],[],[1,1],[2]],[[],[],[1,1],[3]],[[],[],[1,1],[4]],[[],[],[1,1,1,1]]] + +theorem patterns_13_7_2_verified : ∀ D ∈ patterns_13_7_2, PatternVerified 13 7 D := by + + simp only [patterns_13_7_2, List.forall_mem_cons] + + exact ⟨⟨certificate_709, certificate_709_valid⟩, ⟨⟨certificate_710, certificate_710_valid⟩, ⟨⟨certificate_711, certificate_711_valid⟩, ⟨⟨certificate_712, certificate_712_valid⟩, ⟨⟨certificate_713, certificate_713_valid⟩, ⟨⟨certificate_714, certificate_714_valid⟩, ⟨⟨certificate_715, certificate_715_valid⟩, ⟨⟨certificate_716, certificate_716_valid⟩, ⟨⟨certificate_717, certificate_717_valid⟩, ⟨⟨certificate_718, certificate_718_valid⟩, ⟨⟨certificate_719, certificate_719_valid⟩, ⟨⟨certificate_720, certificate_720_valid⟩, ⟨⟨certificate_721, certificate_721_valid⟩, ⟨⟨certificate_722, certificate_722_valid⟩, ⟨⟨certificate_723, certificate_723_valid⟩, ⟨⟨certificate_724, certificate_724_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_7_3 : List (List (List ℕ)) := [[[],[],[1,1,1,2]],[[],[],[1,1,1,3]],[[],[],[1,1,2,1]],[[],[],[1,1,2,2]],[[],[],[1,1,3,1]],[[],[],[1,2],[2]],[[],[],[1,2],[3]],[[],[],[1,2,1,2]],[[],[],[1,2,2,1]],[[],[],[1,3],[2]],[[],[],[2],[2,2]],[[],[],[2,1,1,2]],[[],[1],[1],[1]],[[],[1],[1],[2]],[[],[1],[1],[3]],[[],[1],[1],[4]]] + +theorem patterns_13_7_3_verified : ∀ D ∈ patterns_13_7_3, PatternVerified 13 7 D := by + + simp only [patterns_13_7_3, List.forall_mem_cons] + + exact ⟨⟨certificate_725, certificate_725_valid⟩, ⟨⟨certificate_726, certificate_726_valid⟩, ⟨⟨certificate_727, certificate_727_valid⟩, ⟨⟨certificate_728, certificate_728_valid⟩, ⟨⟨certificate_729, certificate_729_valid⟩, ⟨⟨certificate_730, certificate_730_valid⟩, ⟨⟨certificate_731, certificate_731_valid⟩, ⟨⟨certificate_732, certificate_732_valid⟩, ⟨⟨certificate_733, certificate_733_valid⟩, ⟨⟨certificate_734, certificate_734_valid⟩, ⟨⟨certificate_735, certificate_735_valid⟩, ⟨⟨certificate_736, certificate_736_valid⟩, ⟨⟨certificate_737, certificate_737_valid⟩, ⟨⟨certificate_738, certificate_738_valid⟩, ⟨⟨certificate_739, certificate_739_valid⟩, ⟨⟨certificate_740, certificate_740_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_7_4 : List (List (List ℕ)) := [[[],[1],[1,1,1]],[[],[1],[1,1,2]],[[],[1],[1,1,3]],[[],[1],[1,2,1]],[[],[1],[1,2,2]],[[],[1],[1,3,1]],[[],[1],[2],[2]],[[],[1],[2],[3]],[[],[1],[2,1,2]],[[],[1,1],[1,1]],[[],[1,1],[1,2]],[[],[1,1],[1,3]],[[],[1,1],[2,2]],[[],[1,1,1],[2]],[[],[1,1,1],[3]],[[],[1,1,1,1,1]]] + +theorem patterns_13_7_4_verified : ∀ D ∈ patterns_13_7_4, PatternVerified 13 7 D := by + + simp only [patterns_13_7_4, List.forall_mem_cons] + + exact ⟨⟨certificate_741, certificate_741_valid⟩, ⟨⟨certificate_742, certificate_742_valid⟩, ⟨⟨certificate_743, certificate_743_valid⟩, ⟨⟨certificate_744, certificate_744_valid⟩, ⟨⟨certificate_745, certificate_745_valid⟩, ⟨⟨certificate_746, certificate_746_valid⟩, ⟨⟨certificate_747, certificate_747_valid⟩, ⟨⟨certificate_748, certificate_748_valid⟩, ⟨⟨certificate_749, certificate_749_valid⟩, ⟨⟨certificate_750, certificate_750_valid⟩, ⟨⟨certificate_751, certificate_751_valid⟩, ⟨⟨certificate_752, certificate_752_valid⟩, ⟨⟨certificate_753, certificate_753_valid⟩, ⟨⟨certificate_754, certificate_754_valid⟩, ⟨⟨certificate_755, certificate_755_valid⟩, ⟨⟨certificate_756, certificate_756_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_7_5 : List (List (List ℕ)) := [[[],[1,1,1,1,2]],[[],[1,1,1,2,1]],[[],[1,1,2],[2]],[[],[1,1,2,1,1]],[[],[1,2],[1,2]],[[],[1,2,1],[2]],[[],[2],[2],[2]],[[1],[1],[1,1]],[[1],[1],[1,2]],[[1],[1],[1,3]],[[1],[1],[2,2]],[[1],[1,1],[2]],[[1],[1,1],[3]],[[1],[1,1,1,1]],[[1],[1,1,1,2]],[[1],[1,1,2,1]]] + +theorem patterns_13_7_5_verified : ∀ D ∈ patterns_13_7_5, PatternVerified 13 7 D := by + + simp only [patterns_13_7_5, List.forall_mem_cons] + + exact ⟨⟨certificate_757, certificate_757_valid⟩, ⟨⟨certificate_758, certificate_758_valid⟩, ⟨⟨certificate_759, certificate_759_valid⟩, ⟨⟨certificate_760, certificate_760_valid⟩, ⟨⟨certificate_761, certificate_761_valid⟩, ⟨⟨certificate_762, certificate_762_valid⟩, ⟨⟨certificate_763, certificate_763_valid⟩, ⟨⟨certificate_764, certificate_764_valid⟩, ⟨⟨certificate_765, certificate_765_valid⟩, ⟨⟨certificate_766, certificate_766_valid⟩, ⟨⟨certificate_767, certificate_767_valid⟩, ⟨⟨certificate_768, certificate_768_valid⟩, ⟨⟨certificate_769, certificate_769_valid⟩, ⟨⟨certificate_770, certificate_770_valid⟩, ⟨⟨certificate_771, certificate_771_valid⟩, ⟨⟨certificate_772, certificate_772_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_7_6 : List (List (List ℕ)) := [[[1],[1,2],[2]],[[1,1],[1,1,1]],[[1,1],[1,1,2]],[[1,1],[1,2,1]],[[1,1],[2],[2]],[[1,1,1],[1,2]],[[1,1,1,1],[2]],[[1,1,1,1,1,1]]] + +theorem patterns_13_7_6_verified : ∀ D ∈ patterns_13_7_6, PatternVerified 13 7 D := by + + simp only [patterns_13_7_6, List.forall_mem_cons] + + exact ⟨⟨certificate_773, certificate_773_valid⟩, ⟨⟨certificate_774, certificate_774_valid⟩, ⟨⟨certificate_775, certificate_775_valid⟩, ⟨⟨certificate_776, certificate_776_valid⟩, ⟨⟨certificate_777, certificate_777_valid⟩, ⟨⟨certificate_778, certificate_778_valid⟩, ⟨⟨certificate_779, certificate_779_valid⟩, ⟨⟨certificate_780, certificate_780_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_7 : List (List (List ℕ)) := patterns_13_7_0 ++ (patterns_13_7_1 ++ (patterns_13_7_2 ++ (patterns_13_7_3 ++ (patterns_13_7_4 ++ (patterns_13_7_5 ++ (patterns_13_7_6 ++ ([]))))))) + +theorem patterns_13_7_verified : ∀ D ∈ patterns_13_7, PatternVerified 13 7 D := by + + simp only [patterns_13_7, List.forall_mem_append] + + exact ⟨patterns_13_7_0_verified, ⟨patterns_13_7_1_verified, ⟨patterns_13_7_2_verified, ⟨patterns_13_7_3_verified, ⟨patterns_13_7_4_verified, ⟨patterns_13_7_5_verified, ⟨patterns_13_7_6_verified, by simp⟩⟩⟩⟩⟩⟩⟩ + +theorem patterns_13_7_coverage : patternChoices 7 6 [] = patterns_13_7 := by decide +kernel + +theorem finite_patterns_13_7 : ∀ D ∈ patternChoices 7 (13-7) [], PatternVerified 13 7 D := by + + rw [patterns_13_7_coverage] + + exact patterns_13_7_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns13x8.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns13x8.lean new file mode 100644 index 0000000000000000000000000000000000000000..66bc7804203fd23659a165be44ca6a7acc884447 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns13x8.lean @@ -0,0 +1,74 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates025 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates026 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates027 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_13_8_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[],[]],[[],[],[],[],[],[],[1]],[[],[],[],[],[],[],[2]],[[],[],[],[],[],[],[3]],[[],[],[],[],[],[],[4]],[[],[],[],[],[],[],[5]],[[],[],[],[],[],[1,1]],[[],[],[],[],[],[1,2]],[[],[],[],[],[],[1,3]],[[],[],[],[],[],[1,4]],[[],[],[],[],[],[2,2]],[[],[],[],[],[],[2,3]],[[],[],[],[],[1],[1]],[[],[],[],[],[1],[2]],[[],[],[],[],[1],[3]],[[],[],[],[],[1],[4]]] + +theorem patterns_13_8_0_verified : ∀ D ∈ patterns_13_8_0, PatternVerified 13 8 D := by + + simp only [patterns_13_8_0, List.forall_mem_cons] + + exact ⟨⟨certificate_781, certificate_781_valid⟩, ⟨⟨certificate_782, certificate_782_valid⟩, ⟨⟨certificate_783, certificate_783_valid⟩, ⟨⟨certificate_784, certificate_784_valid⟩, ⟨⟨certificate_785, certificate_785_valid⟩, ⟨⟨certificate_786, certificate_786_valid⟩, ⟨⟨certificate_787, certificate_787_valid⟩, ⟨⟨certificate_788, certificate_788_valid⟩, ⟨⟨certificate_789, certificate_789_valid⟩, ⟨⟨certificate_790, certificate_790_valid⟩, ⟨⟨certificate_791, certificate_791_valid⟩, ⟨⟨certificate_792, certificate_792_valid⟩, ⟨⟨certificate_793, certificate_793_valid⟩, ⟨⟨certificate_794, certificate_794_valid⟩, ⟨⟨certificate_795, certificate_795_valid⟩, ⟨⟨certificate_796, certificate_796_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_8_1 : List (List (List ℕ)) := [[[],[],[],[],[1,1,1]],[[],[],[],[],[1,1,2]],[[],[],[],[],[1,1,3]],[[],[],[],[],[1,2,1]],[[],[],[],[],[1,2,2]],[[],[],[],[],[1,3,1]],[[],[],[],[],[2],[2]],[[],[],[],[],[2],[3]],[[],[],[],[],[2,1,2]],[[],[],[],[1],[1,1]],[[],[],[],[1],[1,2]],[[],[],[],[1],[1,3]],[[],[],[],[1],[2,2]],[[],[],[],[1,1],[2]],[[],[],[],[1,1],[3]],[[],[],[],[1,1,1,1]]] + +theorem patterns_13_8_1_verified : ∀ D ∈ patterns_13_8_1, PatternVerified 13 8 D := by + + simp only [patterns_13_8_1, List.forall_mem_cons] + + exact ⟨⟨certificate_797, certificate_797_valid⟩, ⟨⟨certificate_798, certificate_798_valid⟩, ⟨⟨certificate_799, certificate_799_valid⟩, ⟨⟨certificate_800, certificate_800_valid⟩, ⟨⟨certificate_801, certificate_801_valid⟩, ⟨⟨certificate_802, certificate_802_valid⟩, ⟨⟨certificate_803, certificate_803_valid⟩, ⟨⟨certificate_804, certificate_804_valid⟩, ⟨⟨certificate_805, certificate_805_valid⟩, ⟨⟨certificate_806, certificate_806_valid⟩, ⟨⟨certificate_807, certificate_807_valid⟩, ⟨⟨certificate_808, certificate_808_valid⟩, ⟨⟨certificate_809, certificate_809_valid⟩, ⟨⟨certificate_810, certificate_810_valid⟩, ⟨⟨certificate_811, certificate_811_valid⟩, ⟨⟨certificate_812, certificate_812_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_8_2 : List (List (List ℕ)) := [[[],[],[],[1,1,1,2]],[[],[],[],[1,1,2,1]],[[],[],[],[1,2],[2]],[[],[],[1],[1],[1]],[[],[],[1],[1],[2]],[[],[],[1],[1],[3]],[[],[],[1],[1,1,1]],[[],[],[1],[1,1,2]],[[],[],[1],[1,2,1]],[[],[],[1],[2],[2]],[[],[],[1,1],[1,1]],[[],[],[1,1],[1,2]],[[],[],[1,1,1],[2]],[[],[],[1,1,1,1,1]],[[],[1],[1],[1,1]],[[],[1],[1],[1,2]]] + +theorem patterns_13_8_2_verified : ∀ D ∈ patterns_13_8_2, PatternVerified 13 8 D := by + + simp only [patterns_13_8_2, List.forall_mem_cons] + + exact ⟨⟨certificate_813, certificate_813_valid⟩, ⟨⟨certificate_814, certificate_814_valid⟩, ⟨⟨certificate_815, certificate_815_valid⟩, ⟨⟨certificate_816, certificate_816_valid⟩, ⟨⟨certificate_817, certificate_817_valid⟩, ⟨⟨certificate_818, certificate_818_valid⟩, ⟨⟨certificate_819, certificate_819_valid⟩, ⟨⟨certificate_820, certificate_820_valid⟩, ⟨⟨certificate_821, certificate_821_valid⟩, ⟨⟨certificate_822, certificate_822_valid⟩, ⟨⟨certificate_823, certificate_823_valid⟩, ⟨⟨certificate_824, certificate_824_valid⟩, ⟨⟨certificate_825, certificate_825_valid⟩, ⟨⟨certificate_826, certificate_826_valid⟩, ⟨⟨certificate_827, certificate_827_valid⟩, ⟨⟨certificate_828, certificate_828_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_8_3 : List (List (List ℕ)) := [[[],[1],[1,1],[2]],[[],[1],[1,1,1,1]],[[],[1,1],[1,1,1]],[[1],[1],[1],[1]],[[1],[1],[1],[2]],[[1],[1],[1,1,1]],[[1],[1,1],[1,1]]] + +theorem patterns_13_8_3_verified : ∀ D ∈ patterns_13_8_3, PatternVerified 13 8 D := by + + simp only [patterns_13_8_3, List.forall_mem_cons] + + exact ⟨⟨certificate_829, certificate_829_valid⟩, ⟨⟨certificate_830, certificate_830_valid⟩, ⟨⟨certificate_831, certificate_831_valid⟩, ⟨⟨certificate_832, certificate_832_valid⟩, ⟨⟨certificate_833, certificate_833_valid⟩, ⟨⟨certificate_834, certificate_834_valid⟩, ⟨⟨certificate_835, certificate_835_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_13_8 : List (List (List ℕ)) := patterns_13_8_0 ++ (patterns_13_8_1 ++ (patterns_13_8_2 ++ (patterns_13_8_3 ++ ([])))) + +theorem patterns_13_8_verified : ∀ D ∈ patterns_13_8, PatternVerified 13 8 D := by + + simp only [patterns_13_8, List.forall_mem_append] + + exact ⟨patterns_13_8_0_verified, ⟨patterns_13_8_1_verified, ⟨patterns_13_8_2_verified, ⟨patterns_13_8_3_verified, by simp⟩⟩⟩⟩ + +theorem patterns_13_8_coverage : patternChoices 8 5 [] = patterns_13_8 := by decide +kernel + +theorem finite_patterns_13_8 : ∀ D ∈ patternChoices 8 (13-8) [], PatternVerified 13 8 D := by + + rw [patterns_13_8_coverage] + + exact patterns_13_8_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns14x7.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns14x7.lean new file mode 100644 index 0000000000000000000000000000000000000000..1aaf47bf49e08984ffbd5c0cebc4581611ad1826 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns14x7.lean @@ -0,0 +1,150 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates027 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates028 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates029 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates030 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates031 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates032 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates033 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_14_7_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[]],[[],[],[],[],[],[1]],[[],[],[],[],[],[2]],[[],[],[],[],[],[3]],[[],[],[],[],[],[4]],[[],[],[],[],[],[5]],[[],[],[],[],[],[6]],[[],[],[],[],[],[7]],[[],[],[],[],[1,1]],[[],[],[],[],[1,2]],[[],[],[],[],[1,3]],[[],[],[],[],[1,4]],[[],[],[],[],[1,5]],[[],[],[],[],[1,6]],[[],[],[],[],[2,2]],[[],[],[],[],[2,3]]] + +theorem patterns_14_7_0_verified : ∀ D ∈ patterns_14_7_0, PatternVerified 14 7 D := by + + simp only [patterns_14_7_0, List.forall_mem_cons] + + exact ⟨⟨certificate_836, certificate_836_valid⟩, ⟨⟨certificate_837, certificate_837_valid⟩, ⟨⟨certificate_838, certificate_838_valid⟩, ⟨⟨certificate_839, certificate_839_valid⟩, ⟨⟨certificate_840, certificate_840_valid⟩, ⟨⟨certificate_841, certificate_841_valid⟩, ⟨⟨certificate_842, certificate_842_valid⟩, ⟨⟨certificate_843, certificate_843_valid⟩, ⟨⟨certificate_844, certificate_844_valid⟩, ⟨⟨certificate_845, certificate_845_valid⟩, ⟨⟨certificate_846, certificate_846_valid⟩, ⟨⟨certificate_847, certificate_847_valid⟩, ⟨⟨certificate_848, certificate_848_valid⟩, ⟨⟨certificate_849, certificate_849_valid⟩, ⟨⟨certificate_850, certificate_850_valid⟩, ⟨⟨certificate_851, certificate_851_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_7_1 : List (List (List ℕ)) := [[[],[],[],[],[2,4]],[[],[],[],[],[2,5]],[[],[],[],[],[3,3]],[[],[],[],[],[3,4]],[[],[],[],[1],[1]],[[],[],[],[1],[2]],[[],[],[],[1],[3]],[[],[],[],[1],[4]],[[],[],[],[1],[5]],[[],[],[],[1],[6]],[[],[],[],[1,1,1]],[[],[],[],[1,1,2]],[[],[],[],[1,1,3]],[[],[],[],[1,1,4]],[[],[],[],[1,1,5]],[[],[],[],[1,2,1]]] + +theorem patterns_14_7_1_verified : ∀ D ∈ patterns_14_7_1, PatternVerified 14 7 D := by + + simp only [patterns_14_7_1, List.forall_mem_cons] + + exact ⟨⟨certificate_852, certificate_852_valid⟩, ⟨⟨certificate_853, certificate_853_valid⟩, ⟨⟨certificate_854, certificate_854_valid⟩, ⟨⟨certificate_855, certificate_855_valid⟩, ⟨⟨certificate_856, certificate_856_valid⟩, ⟨⟨certificate_857, certificate_857_valid⟩, ⟨⟨certificate_858, certificate_858_valid⟩, ⟨⟨certificate_859, certificate_859_valid⟩, ⟨⟨certificate_860, certificate_860_valid⟩, ⟨⟨certificate_861, certificate_861_valid⟩, ⟨⟨certificate_862, certificate_862_valid⟩, ⟨⟨certificate_863, certificate_863_valid⟩, ⟨⟨certificate_864, certificate_864_valid⟩, ⟨⟨certificate_865, certificate_865_valid⟩, ⟨⟨certificate_866, certificate_866_valid⟩, ⟨⟨certificate_867, certificate_867_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_7_2 : List (List (List ℕ)) := [[[],[],[],[1,2,2]],[[],[],[],[1,2,3]],[[],[],[],[1,2,4]],[[],[],[],[1,3,1]],[[],[],[],[1,3,2]],[[],[],[],[1,3,3]],[[],[],[],[1,4,1]],[[],[],[],[1,4,2]],[[],[],[],[1,5,1]],[[],[],[],[2],[2]],[[],[],[],[2],[3]],[[],[],[],[2],[4]],[[],[],[],[2],[5]],[[],[],[],[2,1,2]],[[],[],[],[2,1,3]],[[],[],[],[2,1,4]]] + +theorem patterns_14_7_2_verified : ∀ D ∈ patterns_14_7_2, PatternVerified 14 7 D := by + + simp only [patterns_14_7_2, List.forall_mem_cons] + + exact ⟨⟨certificate_868, certificate_868_valid⟩, ⟨⟨certificate_869, certificate_869_valid⟩, ⟨⟨certificate_870, certificate_870_valid⟩, ⟨⟨certificate_871, certificate_871_valid⟩, ⟨⟨certificate_872, certificate_872_valid⟩, ⟨⟨certificate_873, certificate_873_valid⟩, ⟨⟨certificate_874, certificate_874_valid⟩, ⟨⟨certificate_875, certificate_875_valid⟩, ⟨⟨certificate_876, certificate_876_valid⟩, ⟨⟨certificate_877, certificate_877_valid⟩, ⟨⟨certificate_878, certificate_878_valid⟩, ⟨⟨certificate_879, certificate_879_valid⟩, ⟨⟨certificate_880, certificate_880_valid⟩, ⟨⟨certificate_881, certificate_881_valid⟩, ⟨⟨certificate_882, certificate_882_valid⟩, ⟨⟨certificate_883, certificate_883_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_7_3 : List (List (List ℕ)) := [[[],[],[],[2,2,2]],[[],[],[],[2,2,3]],[[],[],[],[2,3,2]],[[],[],[],[3],[3]],[[],[],[],[3],[4]],[[],[],[],[3,1,3]],[[],[],[1],[1,1]],[[],[],[1],[1,2]],[[],[],[1],[1,3]],[[],[],[1],[1,4]],[[],[],[1],[1,5]],[[],[],[1],[2,2]],[[],[],[1],[2,3]],[[],[],[1],[2,4]],[[],[],[1],[3,3]],[[],[],[1,1],[2]]] + +theorem patterns_14_7_3_verified : ∀ D ∈ patterns_14_7_3, PatternVerified 14 7 D := by + + simp only [patterns_14_7_3, List.forall_mem_cons] + + exact ⟨⟨certificate_884, certificate_884_valid⟩, ⟨⟨certificate_885, certificate_885_valid⟩, ⟨⟨certificate_886, certificate_886_valid⟩, ⟨⟨certificate_887, certificate_887_valid⟩, ⟨⟨certificate_888, certificate_888_valid⟩, ⟨⟨certificate_889, certificate_889_valid⟩, ⟨⟨certificate_890, certificate_890_valid⟩, ⟨⟨certificate_891, certificate_891_valid⟩, ⟨⟨certificate_892, certificate_892_valid⟩, ⟨⟨certificate_893, certificate_893_valid⟩, ⟨⟨certificate_894, certificate_894_valid⟩, ⟨⟨certificate_895, certificate_895_valid⟩, ⟨⟨certificate_896, certificate_896_valid⟩, ⟨⟨certificate_897, certificate_897_valid⟩, ⟨⟨certificate_898, certificate_898_valid⟩, ⟨⟨certificate_899, certificate_899_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_7_4 : List (List (List ℕ)) := [[[],[],[1,1],[3]],[[],[],[1,1],[4]],[[],[],[1,1],[5]],[[],[],[1,1,1,1]],[[],[],[1,1,1,2]],[[],[],[1,1,1,3]],[[],[],[1,1,1,4]],[[],[],[1,1,2,1]],[[],[],[1,1,2,2]],[[],[],[1,1,2,3]],[[],[],[1,1,3,1]],[[],[],[1,1,3,2]],[[],[],[1,1,4,1]],[[],[],[1,2],[2]],[[],[],[1,2],[3]],[[],[],[1,2],[4]]] + +theorem patterns_14_7_4_verified : ∀ D ∈ patterns_14_7_4, PatternVerified 14 7 D := by + + simp only [patterns_14_7_4, List.forall_mem_cons] + + exact ⟨⟨certificate_900, certificate_900_valid⟩, ⟨⟨certificate_901, certificate_901_valid⟩, ⟨⟨certificate_902, certificate_902_valid⟩, ⟨⟨certificate_903, certificate_903_valid⟩, ⟨⟨certificate_904, certificate_904_valid⟩, ⟨⟨certificate_905, certificate_905_valid⟩, ⟨⟨certificate_906, certificate_906_valid⟩, ⟨⟨certificate_907, certificate_907_valid⟩, ⟨⟨certificate_908, certificate_908_valid⟩, ⟨⟨certificate_909, certificate_909_valid⟩, ⟨⟨certificate_910, certificate_910_valid⟩, ⟨⟨certificate_911, certificate_911_valid⟩, ⟨⟨certificate_912, certificate_912_valid⟩, ⟨⟨certificate_913, certificate_913_valid⟩, ⟨⟨certificate_914, certificate_914_valid⟩, ⟨⟨certificate_915, certificate_915_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_7_5 : List (List (List ℕ)) := [[[],[],[1,2,1,2]],[[],[],[1,2,1,3]],[[],[],[1,2,2,1]],[[],[],[1,2,2,2]],[[],[],[1,2,3,1]],[[],[],[1,3],[2]],[[],[],[1,3],[3]],[[],[],[1,3,1,2]],[[],[],[1,4],[2]],[[],[],[2],[2,2]],[[],[],[2],[2,3]],[[],[],[2,1,1,2]],[[],[],[2,1,1,3]],[[],[],[2,1,2,2]],[[],[],[2,2],[3]],[[],[1],[1],[1]]] + +theorem patterns_14_7_5_verified : ∀ D ∈ patterns_14_7_5, PatternVerified 14 7 D := by + + simp only [patterns_14_7_5, List.forall_mem_cons] + + exact ⟨⟨certificate_916, certificate_916_valid⟩, ⟨⟨certificate_917, certificate_917_valid⟩, ⟨⟨certificate_918, certificate_918_valid⟩, ⟨⟨certificate_919, certificate_919_valid⟩, ⟨⟨certificate_920, certificate_920_valid⟩, ⟨⟨certificate_921, certificate_921_valid⟩, ⟨⟨certificate_922, certificate_922_valid⟩, ⟨⟨certificate_923, certificate_923_valid⟩, ⟨⟨certificate_924, certificate_924_valid⟩, ⟨⟨certificate_925, certificate_925_valid⟩, ⟨⟨certificate_926, certificate_926_valid⟩, ⟨⟨certificate_927, certificate_927_valid⟩, ⟨⟨certificate_928, certificate_928_valid⟩, ⟨⟨certificate_929, certificate_929_valid⟩, ⟨⟨certificate_930, certificate_930_valid⟩, ⟨⟨certificate_931, certificate_931_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_7_6 : List (List (List ℕ)) := [[[],[1],[1],[2]],[[],[1],[1],[3]],[[],[1],[1],[4]],[[],[1],[1],[5]],[[],[1],[1,1,1]],[[],[1],[1,1,2]],[[],[1],[1,1,3]],[[],[1],[1,1,4]],[[],[1],[1,2,1]],[[],[1],[1,2,2]],[[],[1],[1,2,3]],[[],[1],[1,3,1]],[[],[1],[1,3,2]],[[],[1],[1,4,1]],[[],[1],[2],[2]],[[],[1],[2],[3]]] + +theorem patterns_14_7_6_verified : ∀ D ∈ patterns_14_7_6, PatternVerified 14 7 D := by + + simp only [patterns_14_7_6, List.forall_mem_cons] + + exact ⟨⟨certificate_932, certificate_932_valid⟩, ⟨⟨certificate_933, certificate_933_valid⟩, ⟨⟨certificate_934, certificate_934_valid⟩, ⟨⟨certificate_935, certificate_935_valid⟩, ⟨⟨certificate_936, certificate_936_valid⟩, ⟨⟨certificate_937, certificate_937_valid⟩, ⟨⟨certificate_938, certificate_938_valid⟩, ⟨⟨certificate_939, certificate_939_valid⟩, ⟨⟨certificate_940, certificate_940_valid⟩, ⟨⟨certificate_941, certificate_941_valid⟩, ⟨⟨certificate_942, certificate_942_valid⟩, ⟨⟨certificate_943, certificate_943_valid⟩, ⟨⟨certificate_944, certificate_944_valid⟩, ⟨⟨certificate_945, certificate_945_valid⟩, ⟨⟨certificate_946, certificate_946_valid⟩, ⟨⟨certificate_947, certificate_947_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_7_7 : List (List (List ℕ)) := [[[],[1],[2],[4]],[[],[1],[2,1,2]],[[],[1],[2,1,3]],[[],[1],[2,2,2]],[[],[1],[3],[3]],[[],[1,1],[1,1]],[[],[1,1],[1,2]],[[],[1,1],[1,3]],[[],[1,1],[1,4]],[[],[1,1],[2,2]],[[],[1,1],[2,3]],[[],[1,1,1],[2]],[[],[1,1,1],[3]],[[],[1,1,1],[4]],[[],[1,1,1,1,1]],[[],[1,1,1,1,2]]] + +theorem patterns_14_7_7_verified : ∀ D ∈ patterns_14_7_7, PatternVerified 14 7 D := by + + simp only [patterns_14_7_7, List.forall_mem_cons] + + exact ⟨⟨certificate_948, certificate_948_valid⟩, ⟨⟨certificate_949, certificate_949_valid⟩, ⟨⟨certificate_950, certificate_950_valid⟩, ⟨⟨certificate_951, certificate_951_valid⟩, ⟨⟨certificate_952, certificate_952_valid⟩, ⟨⟨certificate_953, certificate_953_valid⟩, ⟨⟨certificate_954, certificate_954_valid⟩, ⟨⟨certificate_955, certificate_955_valid⟩, ⟨⟨certificate_956, certificate_956_valid⟩, ⟨⟨certificate_957, certificate_957_valid⟩, ⟨⟨certificate_958, certificate_958_valid⟩, ⟨⟨certificate_959, certificate_959_valid⟩, ⟨⟨certificate_960, certificate_960_valid⟩, ⟨⟨certificate_961, certificate_961_valid⟩, ⟨⟨certificate_962, certificate_962_valid⟩, ⟨⟨certificate_963, certificate_963_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_7_8 : List (List (List ℕ)) := [[[],[1,1,1,1,3]],[[],[1,1,1,2,1]],[[],[1,1,1,2,2]],[[],[1,1,1,3,1]],[[],[1,1,2],[2]],[[],[1,1,2],[3]],[[],[1,1,2,1,1]],[[],[1,1,2,1,2]],[[],[1,1,2,2,1]],[[],[1,1,3],[2]],[[],[1,1,3,1,1]],[[],[1,2],[1,2]],[[],[1,2],[1,3]],[[],[1,2],[2,2]],[[],[1,2,1],[2]],[[],[1,2,1],[3]]] + +theorem patterns_14_7_8_verified : ∀ D ∈ patterns_14_7_8, PatternVerified 14 7 D := by + + simp only [patterns_14_7_8, List.forall_mem_cons] + + exact ⟨⟨certificate_964, certificate_964_valid⟩, ⟨⟨certificate_965, certificate_965_valid⟩, ⟨⟨certificate_966, certificate_966_valid⟩, ⟨⟨certificate_967, certificate_967_valid⟩, ⟨⟨certificate_968, certificate_968_valid⟩, ⟨⟨certificate_969, certificate_969_valid⟩, ⟨⟨certificate_970, certificate_970_valid⟩, ⟨⟨certificate_971, certificate_971_valid⟩, ⟨⟨certificate_972, certificate_972_valid⟩, ⟨⟨certificate_973, certificate_973_valid⟩, ⟨⟨certificate_974, certificate_974_valid⟩, ⟨⟨certificate_975, certificate_975_valid⟩, ⟨⟨certificate_976, certificate_976_valid⟩, ⟨⟨certificate_977, certificate_977_valid⟩, ⟨⟨certificate_978, certificate_978_valid⟩, ⟨⟨certificate_979, certificate_979_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_7_9 : List (List (List ℕ)) := [[[],[1,2,1,1,2]],[[],[1,2,1,2,1]],[[],[1,2,2],[2]],[[],[1,3,1],[2]],[[],[2],[2],[2]],[[],[2],[2],[3]],[[],[2],[2,1,2]],[[],[2,1,1,1,2]],[[1],[1],[1,1]],[[1],[1],[1,2]],[[1],[1],[1,3]],[[1],[1],[1,4]],[[1],[1],[2,2]],[[1],[1],[2,3]],[[1],[1,1],[2]],[[1],[1,1],[3]]] + +theorem patterns_14_7_9_verified : ∀ D ∈ patterns_14_7_9, PatternVerified 14 7 D := by + + simp only [patterns_14_7_9, List.forall_mem_cons] + + exact ⟨⟨certificate_980, certificate_980_valid⟩, ⟨⟨certificate_981, certificate_981_valid⟩, ⟨⟨certificate_982, certificate_982_valid⟩, ⟨⟨certificate_983, certificate_983_valid⟩, ⟨⟨certificate_984, certificate_984_valid⟩, ⟨⟨certificate_985, certificate_985_valid⟩, ⟨⟨certificate_986, certificate_986_valid⟩, ⟨⟨certificate_987, certificate_987_valid⟩, ⟨⟨certificate_988, certificate_988_valid⟩, ⟨⟨certificate_989, certificate_989_valid⟩, ⟨⟨certificate_990, certificate_990_valid⟩, ⟨⟨certificate_991, certificate_991_valid⟩, ⟨⟨certificate_992, certificate_992_valid⟩, ⟨⟨certificate_993, certificate_993_valid⟩, ⟨⟨certificate_994, certificate_994_valid⟩, ⟨⟨certificate_995, certificate_995_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_7_10 : List (List (List ℕ)) := [[[1],[1,1],[4]],[[1],[1,1,1,1]],[[1],[1,1,1,2]],[[1],[1,1,1,3]],[[1],[1,1,2,1]],[[1],[1,1,2,2]],[[1],[1,1,3,1]],[[1],[1,2],[2]],[[1],[1,2],[3]],[[1],[1,2,1,2]],[[1],[1,2,2,1]],[[1],[1,3],[2]],[[1],[2],[2,2]],[[1],[2,1,1,2]],[[1,1],[1,1,1]],[[1,1],[1,1,2]]] + +theorem patterns_14_7_10_verified : ∀ D ∈ patterns_14_7_10, PatternVerified 14 7 D := by + + simp only [patterns_14_7_10, List.forall_mem_cons] + + exact ⟨⟨certificate_996, certificate_996_valid⟩, ⟨⟨certificate_997, certificate_997_valid⟩, ⟨⟨certificate_998, certificate_998_valid⟩, ⟨⟨certificate_999, certificate_999_valid⟩, ⟨⟨certificate_1000, certificate_1000_valid⟩, ⟨⟨certificate_1001, certificate_1001_valid⟩, ⟨⟨certificate_1002, certificate_1002_valid⟩, ⟨⟨certificate_1003, certificate_1003_valid⟩, ⟨⟨certificate_1004, certificate_1004_valid⟩, ⟨⟨certificate_1005, certificate_1005_valid⟩, ⟨⟨certificate_1006, certificate_1006_valid⟩, ⟨⟨certificate_1007, certificate_1007_valid⟩, ⟨⟨certificate_1008, certificate_1008_valid⟩, ⟨⟨certificate_1009, certificate_1009_valid⟩, ⟨⟨certificate_1010, certificate_1010_valid⟩, ⟨⟨certificate_1011, certificate_1011_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_7_11 : List (List (List ℕ)) := [[[1,1],[1,1,3]],[[1,1],[1,2,1]],[[1,1],[1,2,2]],[[1,1],[1,3,1]],[[1,1],[2],[2]],[[1,1],[2],[3]],[[1,1],[2,1,2]],[[1,1,1],[1,2]],[[1,1,1],[1,3]],[[1,1,1],[2,2]],[[1,1,1,1],[2]],[[1,1,1,1],[3]],[[1,1,1,1,1,1]],[[1,1,1,1,1,2]],[[1,1,1,1,2,1]],[[1,1,1,2],[2]]] + +theorem patterns_14_7_11_verified : ∀ D ∈ patterns_14_7_11, PatternVerified 14 7 D := by + + simp only [patterns_14_7_11, List.forall_mem_cons] + + exact ⟨⟨certificate_1012, certificate_1012_valid⟩, ⟨⟨certificate_1013, certificate_1013_valid⟩, ⟨⟨certificate_1014, certificate_1014_valid⟩, ⟨⟨certificate_1015, certificate_1015_valid⟩, ⟨⟨certificate_1016, certificate_1016_valid⟩, ⟨⟨certificate_1017, certificate_1017_valid⟩, ⟨⟨certificate_1018, certificate_1018_valid⟩, ⟨⟨certificate_1019, certificate_1019_valid⟩, ⟨⟨certificate_1020, certificate_1020_valid⟩, ⟨⟨certificate_1021, certificate_1021_valid⟩, ⟨⟨certificate_1022, certificate_1022_valid⟩, ⟨⟨certificate_1023, certificate_1023_valid⟩, ⟨⟨certificate_1024, certificate_1024_valid⟩, ⟨⟨certificate_1025, certificate_1025_valid⟩, ⟨⟨certificate_1026, certificate_1026_valid⟩, ⟨⟨certificate_1027, certificate_1027_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_7_12 : List (List (List ℕ)) := [[[1,1,1,2,1,1]],[[1,1,2],[1,2]],[[1,1,2,1],[2]],[[1,2],[1,2,1]],[[1,2],[2],[2]]] + +theorem patterns_14_7_12_verified : ∀ D ∈ patterns_14_7_12, PatternVerified 14 7 D := by + + simp only [patterns_14_7_12, List.forall_mem_cons] + + exact ⟨⟨certificate_1028, certificate_1028_valid⟩, ⟨⟨certificate_1029, certificate_1029_valid⟩, ⟨⟨certificate_1030, certificate_1030_valid⟩, ⟨⟨certificate_1031, certificate_1031_valid⟩, ⟨⟨certificate_1032, certificate_1032_valid⟩, (by simp)⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_7 : List (List (List ℕ)) := patterns_14_7_0 ++ (patterns_14_7_1 ++ (patterns_14_7_2 ++ (patterns_14_7_3 ++ (patterns_14_7_4 ++ (patterns_14_7_5 ++ (patterns_14_7_6 ++ (patterns_14_7_7 ++ (patterns_14_7_8 ++ (patterns_14_7_9 ++ (patterns_14_7_10 ++ (patterns_14_7_11 ++ (patterns_14_7_12 ++ ([]))))))))))))) + +theorem patterns_14_7_verified : ∀ D ∈ patterns_14_7, PatternVerified 14 7 D := by + + simp only [patterns_14_7, List.forall_mem_append] + + exact ⟨patterns_14_7_0_verified, ⟨patterns_14_7_1_verified, ⟨patterns_14_7_2_verified, ⟨patterns_14_7_3_verified, ⟨patterns_14_7_4_verified, ⟨patterns_14_7_5_verified, ⟨patterns_14_7_6_verified, ⟨patterns_14_7_7_verified, ⟨patterns_14_7_8_verified, ⟨patterns_14_7_9_verified, ⟨patterns_14_7_10_verified, ⟨patterns_14_7_11_verified, ⟨patterns_14_7_12_verified, by simp⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +theorem patterns_14_7_coverage : patternChoices 7 7 [] = patterns_14_7 := by decide +kernel + +theorem finite_patterns_14_7 : ∀ D ∈ patternChoices 7 (14-7) [], PatternVerified 14 7 D := by + + rw [patterns_14_7_coverage] + + exact patterns_14_7_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns14x8.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns14x8.lean new file mode 100644 index 0000000000000000000000000000000000000000..0cbc503f3dbb69de9cb97978727a4181a480c356 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns14x8.lean @@ -0,0 +1,107 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates033 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates034 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates035 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates036 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_14_8_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[],[]],[[],[],[],[],[],[],[1]],[[],[],[],[],[],[],[2]],[[],[],[],[],[],[],[3]],[[],[],[],[],[],[],[4]],[[],[],[],[],[],[],[5]],[[],[],[],[],[],[],[6]],[[],[],[],[],[],[1,1]],[[],[],[],[],[],[1,2]],[[],[],[],[],[],[1,3]],[[],[],[],[],[],[1,4]],[[],[],[],[],[],[1,5]],[[],[],[],[],[],[2,2]],[[],[],[],[],[],[2,3]],[[],[],[],[],[],[2,4]],[[],[],[],[],[],[3,3]]] + +theorem patterns_14_8_0_verified : ∀ D ∈ patterns_14_8_0, PatternVerified 14 8 D := by + + simp only [patterns_14_8_0, List.forall_mem_cons] + + exact ⟨⟨certificate_1033, certificate_1033_valid⟩, ⟨⟨certificate_1034, certificate_1034_valid⟩, ⟨⟨certificate_1035, certificate_1035_valid⟩, ⟨⟨certificate_1036, certificate_1036_valid⟩, ⟨⟨certificate_1037, certificate_1037_valid⟩, ⟨⟨certificate_1038, certificate_1038_valid⟩, ⟨⟨certificate_1039, certificate_1039_valid⟩, ⟨⟨certificate_1040, certificate_1040_valid⟩, ⟨⟨certificate_1041, certificate_1041_valid⟩, ⟨⟨certificate_1042, certificate_1042_valid⟩, ⟨⟨certificate_1043, certificate_1043_valid⟩, ⟨⟨certificate_1044, certificate_1044_valid⟩, ⟨⟨certificate_1045, certificate_1045_valid⟩, ⟨⟨certificate_1046, certificate_1046_valid⟩, ⟨⟨certificate_1047, certificate_1047_valid⟩, ⟨⟨certificate_1048, certificate_1048_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_8_1 : List (List (List ℕ)) := [[[],[],[],[],[1],[1]],[[],[],[],[],[1],[2]],[[],[],[],[],[1],[3]],[[],[],[],[],[1],[4]],[[],[],[],[],[1],[5]],[[],[],[],[],[1,1,1]],[[],[],[],[],[1,1,2]],[[],[],[],[],[1,1,3]],[[],[],[],[],[1,1,4]],[[],[],[],[],[1,2,1]],[[],[],[],[],[1,2,2]],[[],[],[],[],[1,2,3]],[[],[],[],[],[1,3,1]],[[],[],[],[],[1,3,2]],[[],[],[],[],[1,4,1]],[[],[],[],[],[2],[2]]] + +theorem patterns_14_8_1_verified : ∀ D ∈ patterns_14_8_1, PatternVerified 14 8 D := by + + simp only [patterns_14_8_1, List.forall_mem_cons] + + exact ⟨⟨certificate_1049, certificate_1049_valid⟩, ⟨⟨certificate_1050, certificate_1050_valid⟩, ⟨⟨certificate_1051, certificate_1051_valid⟩, ⟨⟨certificate_1052, certificate_1052_valid⟩, ⟨⟨certificate_1053, certificate_1053_valid⟩, ⟨⟨certificate_1054, certificate_1054_valid⟩, ⟨⟨certificate_1055, certificate_1055_valid⟩, ⟨⟨certificate_1056, certificate_1056_valid⟩, ⟨⟨certificate_1057, certificate_1057_valid⟩, ⟨⟨certificate_1058, certificate_1058_valid⟩, ⟨⟨certificate_1059, certificate_1059_valid⟩, ⟨⟨certificate_1060, certificate_1060_valid⟩, ⟨⟨certificate_1061, certificate_1061_valid⟩, ⟨⟨certificate_1062, certificate_1062_valid⟩, ⟨⟨certificate_1063, certificate_1063_valid⟩, ⟨⟨certificate_1064, certificate_1064_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_8_2 : List (List (List ℕ)) := [[[],[],[],[],[2],[3]],[[],[],[],[],[2],[4]],[[],[],[],[],[2,1,2]],[[],[],[],[],[2,1,3]],[[],[],[],[],[2,2,2]],[[],[],[],[],[3],[3]],[[],[],[],[1],[1,1]],[[],[],[],[1],[1,2]],[[],[],[],[1],[1,3]],[[],[],[],[1],[1,4]],[[],[],[],[1],[2,2]],[[],[],[],[1],[2,3]],[[],[],[],[1,1],[2]],[[],[],[],[1,1],[3]],[[],[],[],[1,1],[4]],[[],[],[],[1,1,1,1]]] + +theorem patterns_14_8_2_verified : ∀ D ∈ patterns_14_8_2, PatternVerified 14 8 D := by + + simp only [patterns_14_8_2, List.forall_mem_cons] + + exact ⟨⟨certificate_1065, certificate_1065_valid⟩, ⟨⟨certificate_1066, certificate_1066_valid⟩, ⟨⟨certificate_1067, certificate_1067_valid⟩, ⟨⟨certificate_1068, certificate_1068_valid⟩, ⟨⟨certificate_1069, certificate_1069_valid⟩, ⟨⟨certificate_1070, certificate_1070_valid⟩, ⟨⟨certificate_1071, certificate_1071_valid⟩, ⟨⟨certificate_1072, certificate_1072_valid⟩, ⟨⟨certificate_1073, certificate_1073_valid⟩, ⟨⟨certificate_1074, certificate_1074_valid⟩, ⟨⟨certificate_1075, certificate_1075_valid⟩, ⟨⟨certificate_1076, certificate_1076_valid⟩, ⟨⟨certificate_1077, certificate_1077_valid⟩, ⟨⟨certificate_1078, certificate_1078_valid⟩, ⟨⟨certificate_1079, certificate_1079_valid⟩, ⟨⟨certificate_1080, certificate_1080_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_8_3 : List (List (List ℕ)) := [[[],[],[],[1,1,1,2]],[[],[],[],[1,1,1,3]],[[],[],[],[1,1,2,1]],[[],[],[],[1,1,2,2]],[[],[],[],[1,1,3,1]],[[],[],[],[1,2],[2]],[[],[],[],[1,2],[3]],[[],[],[],[1,2,1,2]],[[],[],[],[1,2,2,1]],[[],[],[],[1,3],[2]],[[],[],[],[2],[2,2]],[[],[],[],[2,1,1,2]],[[],[],[1],[1],[1]],[[],[],[1],[1],[2]],[[],[],[1],[1],[3]],[[],[],[1],[1],[4]]] + +theorem patterns_14_8_3_verified : ∀ D ∈ patterns_14_8_3, PatternVerified 14 8 D := by + + simp only [patterns_14_8_3, List.forall_mem_cons] + + exact ⟨⟨certificate_1081, certificate_1081_valid⟩, ⟨⟨certificate_1082, certificate_1082_valid⟩, ⟨⟨certificate_1083, certificate_1083_valid⟩, ⟨⟨certificate_1084, certificate_1084_valid⟩, ⟨⟨certificate_1085, certificate_1085_valid⟩, ⟨⟨certificate_1086, certificate_1086_valid⟩, ⟨⟨certificate_1087, certificate_1087_valid⟩, ⟨⟨certificate_1088, certificate_1088_valid⟩, ⟨⟨certificate_1089, certificate_1089_valid⟩, ⟨⟨certificate_1090, certificate_1090_valid⟩, ⟨⟨certificate_1091, certificate_1091_valid⟩, ⟨⟨certificate_1092, certificate_1092_valid⟩, ⟨⟨certificate_1093, certificate_1093_valid⟩, ⟨⟨certificate_1094, certificate_1094_valid⟩, ⟨⟨certificate_1095, certificate_1095_valid⟩, ⟨⟨certificate_1096, certificate_1096_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_8_4 : List (List (List ℕ)) := [[[],[],[1],[1,1,1]],[[],[],[1],[1,1,2]],[[],[],[1],[1,1,3]],[[],[],[1],[1,2,1]],[[],[],[1],[1,2,2]],[[],[],[1],[1,3,1]],[[],[],[1],[2],[2]],[[],[],[1],[2],[3]],[[],[],[1],[2,1,2]],[[],[],[1,1],[1,1]],[[],[],[1,1],[1,2]],[[],[],[1,1],[1,3]],[[],[],[1,1],[2,2]],[[],[],[1,1,1],[2]],[[],[],[1,1,1],[3]],[[],[],[1,1,1,1,1]]] + +theorem patterns_14_8_4_verified : ∀ D ∈ patterns_14_8_4, PatternVerified 14 8 D := by + + simp only [patterns_14_8_4, List.forall_mem_cons] + + exact ⟨⟨certificate_1097, certificate_1097_valid⟩, ⟨⟨certificate_1098, certificate_1098_valid⟩, ⟨⟨certificate_1099, certificate_1099_valid⟩, ⟨⟨certificate_1100, certificate_1100_valid⟩, ⟨⟨certificate_1101, certificate_1101_valid⟩, ⟨⟨certificate_1102, certificate_1102_valid⟩, ⟨⟨certificate_1103, certificate_1103_valid⟩, ⟨⟨certificate_1104, certificate_1104_valid⟩, ⟨⟨certificate_1105, certificate_1105_valid⟩, ⟨⟨certificate_1106, certificate_1106_valid⟩, ⟨⟨certificate_1107, certificate_1107_valid⟩, ⟨⟨certificate_1108, certificate_1108_valid⟩, ⟨⟨certificate_1109, certificate_1109_valid⟩, ⟨⟨certificate_1110, certificate_1110_valid⟩, ⟨⟨certificate_1111, certificate_1111_valid⟩, ⟨⟨certificate_1112, certificate_1112_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_8_5 : List (List (List ℕ)) := [[[],[],[1,1,1,1,2]],[[],[],[1,1,1,2,1]],[[],[],[1,1,2],[2]],[[],[],[1,1,2,1,1]],[[],[],[1,2],[1,2]],[[],[],[1,2,1],[2]],[[],[],[2],[2],[2]],[[],[1],[1],[1,1]],[[],[1],[1],[1,2]],[[],[1],[1],[1,3]],[[],[1],[1],[2,2]],[[],[1],[1,1],[2]],[[],[1],[1,1],[3]],[[],[1],[1,1,1,1]],[[],[1],[1,1,1,2]],[[],[1],[1,1,2,1]]] + +theorem patterns_14_8_5_verified : ∀ D ∈ patterns_14_8_5, PatternVerified 14 8 D := by + + simp only [patterns_14_8_5, List.forall_mem_cons] + + exact ⟨⟨certificate_1113, certificate_1113_valid⟩, ⟨⟨certificate_1114, certificate_1114_valid⟩, ⟨⟨certificate_1115, certificate_1115_valid⟩, ⟨⟨certificate_1116, certificate_1116_valid⟩, ⟨⟨certificate_1117, certificate_1117_valid⟩, ⟨⟨certificate_1118, certificate_1118_valid⟩, ⟨⟨certificate_1119, certificate_1119_valid⟩, ⟨⟨certificate_1120, certificate_1120_valid⟩, ⟨⟨certificate_1121, certificate_1121_valid⟩, ⟨⟨certificate_1122, certificate_1122_valid⟩, ⟨⟨certificate_1123, certificate_1123_valid⟩, ⟨⟨certificate_1124, certificate_1124_valid⟩, ⟨⟨certificate_1125, certificate_1125_valid⟩, ⟨⟨certificate_1126, certificate_1126_valid⟩, ⟨⟨certificate_1127, certificate_1127_valid⟩, ⟨⟨certificate_1128, certificate_1128_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_8_6 : List (List (List ℕ)) := [[[],[1],[1,2],[2]],[[],[1,1],[1,1,1]],[[],[1,1],[1,1,2]],[[],[1,1],[1,2,1]],[[],[1,1],[2],[2]],[[],[1,1,1],[1,2]],[[],[1,1,1,1],[2]],[[],[1,1,1,1,1,1]],[[1],[1],[1],[1]],[[1],[1],[1],[2]],[[1],[1],[1],[3]],[[1],[1],[1,1,1]],[[1],[1],[1,1,2]],[[1],[1],[1,2,1]],[[1],[1],[2],[2]],[[1],[1,1],[1,1]]] + +theorem patterns_14_8_6_verified : ∀ D ∈ patterns_14_8_6, PatternVerified 14 8 D := by + + simp only [patterns_14_8_6, List.forall_mem_cons] + + exact ⟨⟨certificate_1129, certificate_1129_valid⟩, ⟨⟨certificate_1130, certificate_1130_valid⟩, ⟨⟨certificate_1131, certificate_1131_valid⟩, ⟨⟨certificate_1132, certificate_1132_valid⟩, ⟨⟨certificate_1133, certificate_1133_valid⟩, ⟨⟨certificate_1134, certificate_1134_valid⟩, ⟨⟨certificate_1135, certificate_1135_valid⟩, ⟨⟨certificate_1136, certificate_1136_valid⟩, ⟨⟨certificate_1137, certificate_1137_valid⟩, ⟨⟨certificate_1138, certificate_1138_valid⟩, ⟨⟨certificate_1139, certificate_1139_valid⟩, ⟨⟨certificate_1140, certificate_1140_valid⟩, ⟨⟨certificate_1141, certificate_1141_valid⟩, ⟨⟨certificate_1142, certificate_1142_valid⟩, ⟨⟨certificate_1143, certificate_1143_valid⟩, ⟨⟨certificate_1144, certificate_1144_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_8_7 : List (List (List ℕ)) := [[[1],[1,1],[1,2]],[[1],[1,1,1],[2]],[[1],[1,1,1,1,1]],[[1,1],[1,1],[2]],[[1,1],[1,1,1,1]],[[1,1,1],[1,1,1]]] + +theorem patterns_14_8_7_verified : ∀ D ∈ patterns_14_8_7, PatternVerified 14 8 D := by + + simp only [patterns_14_8_7, List.forall_mem_cons] + + exact ⟨⟨certificate_1145, certificate_1145_valid⟩, ⟨⟨certificate_1146, certificate_1146_valid⟩, ⟨⟨certificate_1147, certificate_1147_valid⟩, ⟨⟨certificate_1148, certificate_1148_valid⟩, ⟨⟨certificate_1149, certificate_1149_valid⟩, ⟨⟨certificate_1150, certificate_1150_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_14_8 : List (List (List ℕ)) := patterns_14_8_0 ++ (patterns_14_8_1 ++ (patterns_14_8_2 ++ (patterns_14_8_3 ++ (patterns_14_8_4 ++ (patterns_14_8_5 ++ (patterns_14_8_6 ++ (patterns_14_8_7 ++ ([])))))))) + +theorem patterns_14_8_verified : ∀ D ∈ patterns_14_8, PatternVerified 14 8 D := by + + simp only [patterns_14_8, List.forall_mem_append] + + exact ⟨patterns_14_8_0_verified, ⟨patterns_14_8_1_verified, ⟨patterns_14_8_2_verified, ⟨patterns_14_8_3_verified, ⟨patterns_14_8_4_verified, ⟨patterns_14_8_5_verified, ⟨patterns_14_8_6_verified, ⟨patterns_14_8_7_verified, by simp⟩⟩⟩⟩⟩⟩⟩⟩ + +theorem patterns_14_8_coverage : patternChoices 8 6 [] = patterns_14_8 := by decide +kernel + +theorem finite_patterns_14_8 : ∀ D ∈ patternChoices 8 (14-8) [], PatternVerified 14 8 D := by + + rw [patterns_14_8_coverage] + + exact patterns_14_8_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns15x7.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns15x7.lean new file mode 100644 index 0000000000000000000000000000000000000000..658a4afd9db1478b2ae675b1a9b9289a216e733d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns15x7.lean @@ -0,0 +1,236 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates036 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates037 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates038 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates039 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates040 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates041 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates042 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates043 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates044 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates045 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates046 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates047 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates048 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_15_7_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[]],[[],[],[],[],[],[1]],[[],[],[],[],[],[2]],[[],[],[],[],[],[3]],[[],[],[],[],[],[4]],[[],[],[],[],[],[5]],[[],[],[],[],[],[6]],[[],[],[],[],[],[7]],[[],[],[],[],[],[8]],[[],[],[],[],[1,1]],[[],[],[],[],[1,2]],[[],[],[],[],[1,3]],[[],[],[],[],[1,4]],[[],[],[],[],[1,5]],[[],[],[],[],[1,6]],[[],[],[],[],[1,7]]] + +theorem patterns_15_7_0_verified : ∀ D ∈ patterns_15_7_0, PatternVerified 15 7 D := by + + simp only [patterns_15_7_0, List.forall_mem_cons] + + exact ⟨⟨certificate_1151, certificate_1151_valid⟩, ⟨⟨certificate_1152, certificate_1152_valid⟩, ⟨⟨certificate_1153, certificate_1153_valid⟩, ⟨⟨certificate_1154, certificate_1154_valid⟩, ⟨⟨certificate_1155, certificate_1155_valid⟩, ⟨⟨certificate_1156, certificate_1156_valid⟩, ⟨⟨certificate_1157, certificate_1157_valid⟩, ⟨⟨certificate_1158, certificate_1158_valid⟩, ⟨⟨certificate_1159, certificate_1159_valid⟩, ⟨⟨certificate_1160, certificate_1160_valid⟩, ⟨⟨certificate_1161, certificate_1161_valid⟩, ⟨⟨certificate_1162, certificate_1162_valid⟩, ⟨⟨certificate_1163, certificate_1163_valid⟩, ⟨⟨certificate_1164, certificate_1164_valid⟩, ⟨⟨certificate_1165, certificate_1165_valid⟩, ⟨⟨certificate_1166, certificate_1166_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_1 : List (List (List ℕ)) := [[[],[],[],[],[2,2]],[[],[],[],[],[2,3]],[[],[],[],[],[2,4]],[[],[],[],[],[2,5]],[[],[],[],[],[2,6]],[[],[],[],[],[3,3]],[[],[],[],[],[3,4]],[[],[],[],[],[3,5]],[[],[],[],[],[4,4]],[[],[],[],[1],[1]],[[],[],[],[1],[2]],[[],[],[],[1],[3]],[[],[],[],[1],[4]],[[],[],[],[1],[5]],[[],[],[],[1],[6]],[[],[],[],[1],[7]]] + +theorem patterns_15_7_1_verified : ∀ D ∈ patterns_15_7_1, PatternVerified 15 7 D := by + + simp only [patterns_15_7_1, List.forall_mem_cons] + + exact ⟨⟨certificate_1167, certificate_1167_valid⟩, ⟨⟨certificate_1168, certificate_1168_valid⟩, ⟨⟨certificate_1169, certificate_1169_valid⟩, ⟨⟨certificate_1170, certificate_1170_valid⟩, ⟨⟨certificate_1171, certificate_1171_valid⟩, ⟨⟨certificate_1172, certificate_1172_valid⟩, ⟨⟨certificate_1173, certificate_1173_valid⟩, ⟨⟨certificate_1174, certificate_1174_valid⟩, ⟨⟨certificate_1175, certificate_1175_valid⟩, ⟨⟨certificate_1176, certificate_1176_valid⟩, ⟨⟨certificate_1177, certificate_1177_valid⟩, ⟨⟨certificate_1178, certificate_1178_valid⟩, ⟨⟨certificate_1179, certificate_1179_valid⟩, ⟨⟨certificate_1180, certificate_1180_valid⟩, ⟨⟨certificate_1181, certificate_1181_valid⟩, ⟨⟨certificate_1182, certificate_1182_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_2 : List (List (List ℕ)) := [[[],[],[],[1,1,1]],[[],[],[],[1,1,2]],[[],[],[],[1,1,3]],[[],[],[],[1,1,4]],[[],[],[],[1,1,5]],[[],[],[],[1,1,6]],[[],[],[],[1,2,1]],[[],[],[],[1,2,2]],[[],[],[],[1,2,3]],[[],[],[],[1,2,4]],[[],[],[],[1,2,5]],[[],[],[],[1,3,1]],[[],[],[],[1,3,2]],[[],[],[],[1,3,3]],[[],[],[],[1,3,4]],[[],[],[],[1,4,1]]] + +theorem patterns_15_7_2_verified : ∀ D ∈ patterns_15_7_2, PatternVerified 15 7 D := by + + simp only [patterns_15_7_2, List.forall_mem_cons] + + exact ⟨⟨certificate_1183, certificate_1183_valid⟩, ⟨⟨certificate_1184, certificate_1184_valid⟩, ⟨⟨certificate_1185, certificate_1185_valid⟩, ⟨⟨certificate_1186, certificate_1186_valid⟩, ⟨⟨certificate_1187, certificate_1187_valid⟩, ⟨⟨certificate_1188, certificate_1188_valid⟩, ⟨⟨certificate_1189, certificate_1189_valid⟩, ⟨⟨certificate_1190, certificate_1190_valid⟩, ⟨⟨certificate_1191, certificate_1191_valid⟩, ⟨⟨certificate_1192, certificate_1192_valid⟩, ⟨⟨certificate_1193, certificate_1193_valid⟩, ⟨⟨certificate_1194, certificate_1194_valid⟩, ⟨⟨certificate_1195, certificate_1195_valid⟩, ⟨⟨certificate_1196, certificate_1196_valid⟩, ⟨⟨certificate_1197, certificate_1197_valid⟩, ⟨⟨certificate_1198, certificate_1198_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_3 : List (List (List ℕ)) := [[[],[],[],[1,4,2]],[[],[],[],[1,4,3]],[[],[],[],[1,5,1]],[[],[],[],[1,5,2]],[[],[],[],[1,6,1]],[[],[],[],[2],[2]],[[],[],[],[2],[3]],[[],[],[],[2],[4]],[[],[],[],[2],[5]],[[],[],[],[2],[6]],[[],[],[],[2,1,2]],[[],[],[],[2,1,3]],[[],[],[],[2,1,4]],[[],[],[],[2,1,5]],[[],[],[],[2,2,2]],[[],[],[],[2,2,3]]] + +theorem patterns_15_7_3_verified : ∀ D ∈ patterns_15_7_3, PatternVerified 15 7 D := by + + simp only [patterns_15_7_3, List.forall_mem_cons] + + exact ⟨⟨certificate_1199, certificate_1199_valid⟩, ⟨⟨certificate_1200, certificate_1200_valid⟩, ⟨⟨certificate_1201, certificate_1201_valid⟩, ⟨⟨certificate_1202, certificate_1202_valid⟩, ⟨⟨certificate_1203, certificate_1203_valid⟩, ⟨⟨certificate_1204, certificate_1204_valid⟩, ⟨⟨certificate_1205, certificate_1205_valid⟩, ⟨⟨certificate_1206, certificate_1206_valid⟩, ⟨⟨certificate_1207, certificate_1207_valid⟩, ⟨⟨certificate_1208, certificate_1208_valid⟩, ⟨⟨certificate_1209, certificate_1209_valid⟩, ⟨⟨certificate_1210, certificate_1210_valid⟩, ⟨⟨certificate_1211, certificate_1211_valid⟩, ⟨⟨certificate_1212, certificate_1212_valid⟩, ⟨⟨certificate_1213, certificate_1213_valid⟩, ⟨⟨certificate_1214, certificate_1214_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_4 : List (List (List ℕ)) := [[[],[],[],[2,2,4]],[[],[],[],[2,3,2]],[[],[],[],[2,3,3]],[[],[],[],[2,4,2]],[[],[],[],[3],[3]],[[],[],[],[3],[4]],[[],[],[],[3],[5]],[[],[],[],[3,1,3]],[[],[],[],[3,1,4]],[[],[],[],[3,2,3]],[[],[],[],[4],[4]],[[],[],[1],[1,1]],[[],[],[1],[1,2]],[[],[],[1],[1,3]],[[],[],[1],[1,4]],[[],[],[1],[1,5]]] + +theorem patterns_15_7_4_verified : ∀ D ∈ patterns_15_7_4, PatternVerified 15 7 D := by + + simp only [patterns_15_7_4, List.forall_mem_cons] + + exact ⟨⟨certificate_1215, certificate_1215_valid⟩, ⟨⟨certificate_1216, certificate_1216_valid⟩, ⟨⟨certificate_1217, certificate_1217_valid⟩, ⟨⟨certificate_1218, certificate_1218_valid⟩, ⟨⟨certificate_1219, certificate_1219_valid⟩, ⟨⟨certificate_1220, certificate_1220_valid⟩, ⟨⟨certificate_1221, certificate_1221_valid⟩, ⟨⟨certificate_1222, certificate_1222_valid⟩, ⟨⟨certificate_1223, certificate_1223_valid⟩, ⟨⟨certificate_1224, certificate_1224_valid⟩, ⟨⟨certificate_1225, certificate_1225_valid⟩, ⟨⟨certificate_1226, certificate_1226_valid⟩, ⟨⟨certificate_1227, certificate_1227_valid⟩, ⟨⟨certificate_1228, certificate_1228_valid⟩, ⟨⟨certificate_1229, certificate_1229_valid⟩, ⟨⟨certificate_1230, certificate_1230_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_5 : List (List (List ℕ)) := [[[],[],[1],[1,6]],[[],[],[1],[2,2]],[[],[],[1],[2,3]],[[],[],[1],[2,4]],[[],[],[1],[2,5]],[[],[],[1],[3,3]],[[],[],[1],[3,4]],[[],[],[1,1],[2]],[[],[],[1,1],[3]],[[],[],[1,1],[4]],[[],[],[1,1],[5]],[[],[],[1,1],[6]],[[],[],[1,1,1,1]],[[],[],[1,1,1,2]],[[],[],[1,1,1,3]],[[],[],[1,1,1,4]]] + +theorem patterns_15_7_5_verified : ∀ D ∈ patterns_15_7_5, PatternVerified 15 7 D := by + + simp only [patterns_15_7_5, List.forall_mem_cons] + + exact ⟨⟨certificate_1231, certificate_1231_valid⟩, ⟨⟨certificate_1232, certificate_1232_valid⟩, ⟨⟨certificate_1233, certificate_1233_valid⟩, ⟨⟨certificate_1234, certificate_1234_valid⟩, ⟨⟨certificate_1235, certificate_1235_valid⟩, ⟨⟨certificate_1236, certificate_1236_valid⟩, ⟨⟨certificate_1237, certificate_1237_valid⟩, ⟨⟨certificate_1238, certificate_1238_valid⟩, ⟨⟨certificate_1239, certificate_1239_valid⟩, ⟨⟨certificate_1240, certificate_1240_valid⟩, ⟨⟨certificate_1241, certificate_1241_valid⟩, ⟨⟨certificate_1242, certificate_1242_valid⟩, ⟨⟨certificate_1243, certificate_1243_valid⟩, ⟨⟨certificate_1244, certificate_1244_valid⟩, ⟨⟨certificate_1245, certificate_1245_valid⟩, ⟨⟨certificate_1246, certificate_1246_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_6 : List (List (List ℕ)) := [[[],[],[1,1,1,5]],[[],[],[1,1,2,1]],[[],[],[1,1,2,2]],[[],[],[1,1,2,3]],[[],[],[1,1,2,4]],[[],[],[1,1,3,1]],[[],[],[1,1,3,2]],[[],[],[1,1,3,3]],[[],[],[1,1,4,1]],[[],[],[1,1,4,2]],[[],[],[1,1,5,1]],[[],[],[1,2],[2]],[[],[],[1,2],[3]],[[],[],[1,2],[4]],[[],[],[1,2],[5]],[[],[],[1,2,1,2]]] + +theorem patterns_15_7_6_verified : ∀ D ∈ patterns_15_7_6, PatternVerified 15 7 D := by + + simp only [patterns_15_7_6, List.forall_mem_cons] + + exact ⟨⟨certificate_1247, certificate_1247_valid⟩, ⟨⟨certificate_1248, certificate_1248_valid⟩, ⟨⟨certificate_1249, certificate_1249_valid⟩, ⟨⟨certificate_1250, certificate_1250_valid⟩, ⟨⟨certificate_1251, certificate_1251_valid⟩, ⟨⟨certificate_1252, certificate_1252_valid⟩, ⟨⟨certificate_1253, certificate_1253_valid⟩, ⟨⟨certificate_1254, certificate_1254_valid⟩, ⟨⟨certificate_1255, certificate_1255_valid⟩, ⟨⟨certificate_1256, certificate_1256_valid⟩, ⟨⟨certificate_1257, certificate_1257_valid⟩, ⟨⟨certificate_1258, certificate_1258_valid⟩, ⟨⟨certificate_1259, certificate_1259_valid⟩, ⟨⟨certificate_1260, certificate_1260_valid⟩, ⟨⟨certificate_1261, certificate_1261_valid⟩, ⟨⟨certificate_1262, certificate_1262_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_7 : List (List (List ℕ)) := [[[],[],[1,2,1,3]],[[],[],[1,2,1,4]],[[],[],[1,2,2,1]],[[],[],[1,2,2,2]],[[],[],[1,2,2,3]],[[],[],[1,2,3,1]],[[],[],[1,2,3,2]],[[],[],[1,2,4,1]],[[],[],[1,3],[2]],[[],[],[1,3],[3]],[[],[],[1,3],[4]],[[],[],[1,3,1,2]],[[],[],[1,3,1,3]],[[],[],[1,3,2,2]],[[],[],[1,3,3,1]],[[],[],[1,4],[2]]] + +theorem patterns_15_7_7_verified : ∀ D ∈ patterns_15_7_7, PatternVerified 15 7 D := by + + simp only [patterns_15_7_7, List.forall_mem_cons] + + exact ⟨⟨certificate_1263, certificate_1263_valid⟩, ⟨⟨certificate_1264, certificate_1264_valid⟩, ⟨⟨certificate_1265, certificate_1265_valid⟩, ⟨⟨certificate_1266, certificate_1266_valid⟩, ⟨⟨certificate_1267, certificate_1267_valid⟩, ⟨⟨certificate_1268, certificate_1268_valid⟩, ⟨⟨certificate_1269, certificate_1269_valid⟩, ⟨⟨certificate_1270, certificate_1270_valid⟩, ⟨⟨certificate_1271, certificate_1271_valid⟩, ⟨⟨certificate_1272, certificate_1272_valid⟩, ⟨⟨certificate_1273, certificate_1273_valid⟩, ⟨⟨certificate_1274, certificate_1274_valid⟩, ⟨⟨certificate_1275, certificate_1275_valid⟩, ⟨⟨certificate_1276, certificate_1276_valid⟩, ⟨⟨certificate_1277, certificate_1277_valid⟩, ⟨⟨certificate_1278, certificate_1278_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_8 : List (List (List ℕ)) := [[[],[],[1,4],[3]],[[],[],[1,4,1,2]],[[],[],[1,5],[2]],[[],[],[2],[2,2]],[[],[],[2],[2,3]],[[],[],[2],[2,4]],[[],[],[2],[3,3]],[[],[],[2,1,1,2]],[[],[],[2,1,1,3]],[[],[],[2,1,1,4]],[[],[],[2,1,2,2]],[[],[],[2,1,2,3]],[[],[],[2,1,3,2]],[[],[],[2,2],[3]],[[],[],[2,2],[4]],[[],[],[2,2,1,3]]] + +theorem patterns_15_7_8_verified : ∀ D ∈ patterns_15_7_8, PatternVerified 15 7 D := by + + simp only [patterns_15_7_8, List.forall_mem_cons] + + exact ⟨⟨certificate_1279, certificate_1279_valid⟩, ⟨⟨certificate_1280, certificate_1280_valid⟩, ⟨⟨certificate_1281, certificate_1281_valid⟩, ⟨⟨certificate_1282, certificate_1282_valid⟩, ⟨⟨certificate_1283, certificate_1283_valid⟩, ⟨⟨certificate_1284, certificate_1284_valid⟩, ⟨⟨certificate_1285, certificate_1285_valid⟩, ⟨⟨certificate_1286, certificate_1286_valid⟩, ⟨⟨certificate_1287, certificate_1287_valid⟩, ⟨⟨certificate_1288, certificate_1288_valid⟩, ⟨⟨certificate_1289, certificate_1289_valid⟩, ⟨⟨certificate_1290, certificate_1290_valid⟩, ⟨⟨certificate_1291, certificate_1291_valid⟩, ⟨⟨certificate_1292, certificate_1292_valid⟩, ⟨⟨certificate_1293, certificate_1293_valid⟩, ⟨⟨certificate_1294, certificate_1294_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_9 : List (List (List ℕ)) := [[[],[],[2,2,2,2]],[[],[],[2,3],[3]],[[],[],[3,1,1,3]],[[],[1],[1],[1]],[[],[1],[1],[2]],[[],[1],[1],[3]],[[],[1],[1],[4]],[[],[1],[1],[5]],[[],[1],[1],[6]],[[],[1],[1,1,1]],[[],[1],[1,1,2]],[[],[1],[1,1,3]],[[],[1],[1,1,4]],[[],[1],[1,1,5]],[[],[1],[1,2,1]],[[],[1],[1,2,2]]] + +theorem patterns_15_7_9_verified : ∀ D ∈ patterns_15_7_9, PatternVerified 15 7 D := by + + simp only [patterns_15_7_9, List.forall_mem_cons] + + exact ⟨⟨certificate_1295, certificate_1295_valid⟩, ⟨⟨certificate_1296, certificate_1296_valid⟩, ⟨⟨certificate_1297, certificate_1297_valid⟩, ⟨⟨certificate_1298, certificate_1298_valid⟩, ⟨⟨certificate_1299, certificate_1299_valid⟩, ⟨⟨certificate_1300, certificate_1300_valid⟩, ⟨⟨certificate_1301, certificate_1301_valid⟩, ⟨⟨certificate_1302, certificate_1302_valid⟩, ⟨⟨certificate_1303, certificate_1303_valid⟩, ⟨⟨certificate_1304, certificate_1304_valid⟩, ⟨⟨certificate_1305, certificate_1305_valid⟩, ⟨⟨certificate_1306, certificate_1306_valid⟩, ⟨⟨certificate_1307, certificate_1307_valid⟩, ⟨⟨certificate_1308, certificate_1308_valid⟩, ⟨⟨certificate_1309, certificate_1309_valid⟩, ⟨⟨certificate_1310, certificate_1310_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_10 : List (List (List ℕ)) := [[[],[1],[1,2,3]],[[],[1],[1,2,4]],[[],[1],[1,3,1]],[[],[1],[1,3,2]],[[],[1],[1,3,3]],[[],[1],[1,4,1]],[[],[1],[1,4,2]],[[],[1],[1,5,1]],[[],[1],[2],[2]],[[],[1],[2],[3]],[[],[1],[2],[4]],[[],[1],[2],[5]],[[],[1],[2,1,2]],[[],[1],[2,1,3]],[[],[1],[2,1,4]],[[],[1],[2,2,2]]] + +theorem patterns_15_7_10_verified : ∀ D ∈ patterns_15_7_10, PatternVerified 15 7 D := by + + simp only [patterns_15_7_10, List.forall_mem_cons] + + exact ⟨⟨certificate_1311, certificate_1311_valid⟩, ⟨⟨certificate_1312, certificate_1312_valid⟩, ⟨⟨certificate_1313, certificate_1313_valid⟩, ⟨⟨certificate_1314, certificate_1314_valid⟩, ⟨⟨certificate_1315, certificate_1315_valid⟩, ⟨⟨certificate_1316, certificate_1316_valid⟩, ⟨⟨certificate_1317, certificate_1317_valid⟩, ⟨⟨certificate_1318, certificate_1318_valid⟩, ⟨⟨certificate_1319, certificate_1319_valid⟩, ⟨⟨certificate_1320, certificate_1320_valid⟩, ⟨⟨certificate_1321, certificate_1321_valid⟩, ⟨⟨certificate_1322, certificate_1322_valid⟩, ⟨⟨certificate_1323, certificate_1323_valid⟩, ⟨⟨certificate_1324, certificate_1324_valid⟩, ⟨⟨certificate_1325, certificate_1325_valid⟩, ⟨⟨certificate_1326, certificate_1326_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_11 : List (List (List ℕ)) := [[[],[1],[2,2,3]],[[],[1],[2,3,2]],[[],[1],[3],[3]],[[],[1],[3],[4]],[[],[1],[3,1,3]],[[],[1,1],[1,1]],[[],[1,1],[1,2]],[[],[1,1],[1,3]],[[],[1,1],[1,4]],[[],[1,1],[1,5]],[[],[1,1],[2,2]],[[],[1,1],[2,3]],[[],[1,1],[2,4]],[[],[1,1],[3,3]],[[],[1,1,1],[2]],[[],[1,1,1],[3]]] + +theorem patterns_15_7_11_verified : ∀ D ∈ patterns_15_7_11, PatternVerified 15 7 D := by + + simp only [patterns_15_7_11, List.forall_mem_cons] + + exact ⟨⟨certificate_1327, certificate_1327_valid⟩, ⟨⟨certificate_1328, certificate_1328_valid⟩, ⟨⟨certificate_1329, certificate_1329_valid⟩, ⟨⟨certificate_1330, certificate_1330_valid⟩, ⟨⟨certificate_1331, certificate_1331_valid⟩, ⟨⟨certificate_1332, certificate_1332_valid⟩, ⟨⟨certificate_1333, certificate_1333_valid⟩, ⟨⟨certificate_1334, certificate_1334_valid⟩, ⟨⟨certificate_1335, certificate_1335_valid⟩, ⟨⟨certificate_1336, certificate_1336_valid⟩, ⟨⟨certificate_1337, certificate_1337_valid⟩, ⟨⟨certificate_1338, certificate_1338_valid⟩, ⟨⟨certificate_1339, certificate_1339_valid⟩, ⟨⟨certificate_1340, certificate_1340_valid⟩, ⟨⟨certificate_1341, certificate_1341_valid⟩, ⟨⟨certificate_1342, certificate_1342_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_12 : List (List (List ℕ)) := [[[],[1,1,1],[4]],[[],[1,1,1],[5]],[[],[1,1,1,1,1]],[[],[1,1,1,1,2]],[[],[1,1,1,1,3]],[[],[1,1,1,1,4]],[[],[1,1,1,2,1]],[[],[1,1,1,2,2]],[[],[1,1,1,2,3]],[[],[1,1,1,3,1]],[[],[1,1,1,3,2]],[[],[1,1,1,4,1]],[[],[1,1,2],[2]],[[],[1,1,2],[3]],[[],[1,1,2],[4]],[[],[1,1,2,1,1]]] + +theorem patterns_15_7_12_verified : ∀ D ∈ patterns_15_7_12, PatternVerified 15 7 D := by + + simp only [patterns_15_7_12, List.forall_mem_cons] + + exact ⟨⟨certificate_1343, certificate_1343_valid⟩, ⟨⟨certificate_1344, certificate_1344_valid⟩, ⟨⟨certificate_1345, certificate_1345_valid⟩, ⟨⟨certificate_1346, certificate_1346_valid⟩, ⟨⟨certificate_1347, certificate_1347_valid⟩, ⟨⟨certificate_1348, certificate_1348_valid⟩, ⟨⟨certificate_1349, certificate_1349_valid⟩, ⟨⟨certificate_1350, certificate_1350_valid⟩, ⟨⟨certificate_1351, certificate_1351_valid⟩, ⟨⟨certificate_1352, certificate_1352_valid⟩, ⟨⟨certificate_1353, certificate_1353_valid⟩, ⟨⟨certificate_1354, certificate_1354_valid⟩, ⟨⟨certificate_1355, certificate_1355_valid⟩, ⟨⟨certificate_1356, certificate_1356_valid⟩, ⟨⟨certificate_1357, certificate_1357_valid⟩, ⟨⟨certificate_1358, certificate_1358_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_13 : List (List (List ℕ)) := [[[],[1,1,2,1,2]],[[],[1,1,2,1,3]],[[],[1,1,2,2,1]],[[],[1,1,2,2,2]],[[],[1,1,2,3,1]],[[],[1,1,3],[2]],[[],[1,1,3],[3]],[[],[1,1,3,1,1]],[[],[1,1,3,1,2]],[[],[1,1,3,2,1]],[[],[1,1,4],[2]],[[],[1,1,4,1,1]],[[],[1,2],[1,2]],[[],[1,2],[1,3]],[[],[1,2],[1,4]],[[],[1,2],[2,2]]] + +theorem patterns_15_7_13_verified : ∀ D ∈ patterns_15_7_13, PatternVerified 15 7 D := by + + simp only [patterns_15_7_13, List.forall_mem_cons] + + exact ⟨⟨certificate_1359, certificate_1359_valid⟩, ⟨⟨certificate_1360, certificate_1360_valid⟩, ⟨⟨certificate_1361, certificate_1361_valid⟩, ⟨⟨certificate_1362, certificate_1362_valid⟩, ⟨⟨certificate_1363, certificate_1363_valid⟩, ⟨⟨certificate_1364, certificate_1364_valid⟩, ⟨⟨certificate_1365, certificate_1365_valid⟩, ⟨⟨certificate_1366, certificate_1366_valid⟩, ⟨⟨certificate_1367, certificate_1367_valid⟩, ⟨⟨certificate_1368, certificate_1368_valid⟩, ⟨⟨certificate_1369, certificate_1369_valid⟩, ⟨⟨certificate_1370, certificate_1370_valid⟩, ⟨⟨certificate_1371, certificate_1371_valid⟩, ⟨⟨certificate_1372, certificate_1372_valid⟩, ⟨⟨certificate_1373, certificate_1373_valid⟩, ⟨⟨certificate_1374, certificate_1374_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_14 : List (List (List ℕ)) := [[[],[1,2],[2,3]],[[],[1,2,1],[2]],[[],[1,2,1],[3]],[[],[1,2,1],[4]],[[],[1,2,1,1,2]],[[],[1,2,1,1,3]],[[],[1,2,1,2,1]],[[],[1,2,1,2,2]],[[],[1,2,1,3,1]],[[],[1,2,2],[2]],[[],[1,2,2],[3]],[[],[1,2,2,1,2]],[[],[1,2,2,2,1]],[[],[1,2,3],[2]],[[],[1,3],[1,3]],[[],[1,3],[2,2]]] + +theorem patterns_15_7_14_verified : ∀ D ∈ patterns_15_7_14, PatternVerified 15 7 D := by + + simp only [patterns_15_7_14, List.forall_mem_cons] + + exact ⟨⟨certificate_1375, certificate_1375_valid⟩, ⟨⟨certificate_1376, certificate_1376_valid⟩, ⟨⟨certificate_1377, certificate_1377_valid⟩, ⟨⟨certificate_1378, certificate_1378_valid⟩, ⟨⟨certificate_1379, certificate_1379_valid⟩, ⟨⟨certificate_1380, certificate_1380_valid⟩, ⟨⟨certificate_1381, certificate_1381_valid⟩, ⟨⟨certificate_1382, certificate_1382_valid⟩, ⟨⟨certificate_1383, certificate_1383_valid⟩, ⟨⟨certificate_1384, certificate_1384_valid⟩, ⟨⟨certificate_1385, certificate_1385_valid⟩, ⟨⟨certificate_1386, certificate_1386_valid⟩, ⟨⟨certificate_1387, certificate_1387_valid⟩, ⟨⟨certificate_1388, certificate_1388_valid⟩, ⟨⟨certificate_1389, certificate_1389_valid⟩, ⟨⟨certificate_1390, certificate_1390_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_15 : List (List (List ℕ)) := [[[],[1,3,1],[2]],[[],[1,3,1],[3]],[[],[1,3,1,1,2]],[[],[1,3,2],[2]],[[],[1,4,1],[2]],[[],[2],[2],[2]],[[],[2],[2],[3]],[[],[2],[2],[4]],[[],[2],[2,1,2]],[[],[2],[2,1,3]],[[],[2],[2,2,2]],[[],[2],[3],[3]],[[],[2,1,1,1,2]],[[],[2,1,1,1,3]],[[],[2,1,1,2,2]],[[],[2,1,2],[3]]] + +theorem patterns_15_7_15_verified : ∀ D ∈ patterns_15_7_15, PatternVerified 15 7 D := by + + simp only [patterns_15_7_15, List.forall_mem_cons] + + exact ⟨⟨certificate_1391, certificate_1391_valid⟩, ⟨⟨certificate_1392, certificate_1392_valid⟩, ⟨⟨certificate_1393, certificate_1393_valid⟩, ⟨⟨certificate_1394, certificate_1394_valid⟩, ⟨⟨certificate_1395, certificate_1395_valid⟩, ⟨⟨certificate_1396, certificate_1396_valid⟩, ⟨⟨certificate_1397, certificate_1397_valid⟩, ⟨⟨certificate_1398, certificate_1398_valid⟩, ⟨⟨certificate_1399, certificate_1399_valid⟩, ⟨⟨certificate_1400, certificate_1400_valid⟩, ⟨⟨certificate_1401, certificate_1401_valid⟩, ⟨⟨certificate_1402, certificate_1402_valid⟩, ⟨⟨certificate_1403, certificate_1403_valid⟩, ⟨⟨certificate_1404, certificate_1404_valid⟩, ⟨⟨certificate_1405, certificate_1405_valid⟩, ⟨⟨certificate_1406, certificate_1406_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_16 : List (List (List ℕ)) := [[[],[2,1,2,1,2]],[[],[2,2],[2,2]],[[1],[1],[1,1]],[[1],[1],[1,2]],[[1],[1],[1,3]],[[1],[1],[1,4]],[[1],[1],[1,5]],[[1],[1],[2,2]],[[1],[1],[2,3]],[[1],[1],[2,4]],[[1],[1],[3,3]],[[1],[1,1],[2]],[[1],[1,1],[3]],[[1],[1,1],[4]],[[1],[1,1],[5]],[[1],[1,1,1,1]]] + +theorem patterns_15_7_16_verified : ∀ D ∈ patterns_15_7_16, PatternVerified 15 7 D := by + + simp only [patterns_15_7_16, List.forall_mem_cons] + + exact ⟨⟨certificate_1407, certificate_1407_valid⟩, ⟨⟨certificate_1408, certificate_1408_valid⟩, ⟨⟨certificate_1409, certificate_1409_valid⟩, ⟨⟨certificate_1410, certificate_1410_valid⟩, ⟨⟨certificate_1411, certificate_1411_valid⟩, ⟨⟨certificate_1412, certificate_1412_valid⟩, ⟨⟨certificate_1413, certificate_1413_valid⟩, ⟨⟨certificate_1414, certificate_1414_valid⟩, ⟨⟨certificate_1415, certificate_1415_valid⟩, ⟨⟨certificate_1416, certificate_1416_valid⟩, ⟨⟨certificate_1417, certificate_1417_valid⟩, ⟨⟨certificate_1418, certificate_1418_valid⟩, ⟨⟨certificate_1419, certificate_1419_valid⟩, ⟨⟨certificate_1420, certificate_1420_valid⟩, ⟨⟨certificate_1421, certificate_1421_valid⟩, ⟨⟨certificate_1422, certificate_1422_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_17 : List (List (List ℕ)) := [[[1],[1,1,1,2]],[[1],[1,1,1,3]],[[1],[1,1,1,4]],[[1],[1,1,2,1]],[[1],[1,1,2,2]],[[1],[1,1,2,3]],[[1],[1,1,3,1]],[[1],[1,1,3,2]],[[1],[1,1,4,1]],[[1],[1,2],[2]],[[1],[1,2],[3]],[[1],[1,2],[4]],[[1],[1,2,1,2]],[[1],[1,2,1,3]],[[1],[1,2,2,1]],[[1],[1,2,2,2]]] + +theorem patterns_15_7_17_verified : ∀ D ∈ patterns_15_7_17, PatternVerified 15 7 D := by + + simp only [patterns_15_7_17, List.forall_mem_cons] + + exact ⟨⟨certificate_1423, certificate_1423_valid⟩, ⟨⟨certificate_1424, certificate_1424_valid⟩, ⟨⟨certificate_1425, certificate_1425_valid⟩, ⟨⟨certificate_1426, certificate_1426_valid⟩, ⟨⟨certificate_1427, certificate_1427_valid⟩, ⟨⟨certificate_1428, certificate_1428_valid⟩, ⟨⟨certificate_1429, certificate_1429_valid⟩, ⟨⟨certificate_1430, certificate_1430_valid⟩, ⟨⟨certificate_1431, certificate_1431_valid⟩, ⟨⟨certificate_1432, certificate_1432_valid⟩, ⟨⟨certificate_1433, certificate_1433_valid⟩, ⟨⟨certificate_1434, certificate_1434_valid⟩, ⟨⟨certificate_1435, certificate_1435_valid⟩, ⟨⟨certificate_1436, certificate_1436_valid⟩, ⟨⟨certificate_1437, certificate_1437_valid⟩, ⟨⟨certificate_1438, certificate_1438_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_18 : List (List (List ℕ)) := [[[1],[1,2,3,1]],[[1],[1,3],[2]],[[1],[1,3],[3]],[[1],[1,3,1,2]],[[1],[1,4],[2]],[[1],[2],[2,2]],[[1],[2],[2,3]],[[1],[2,1,1,2]],[[1],[2,1,1,3]],[[1],[2,1,2,2]],[[1],[2,2],[3]],[[1,1],[1,1,1]],[[1,1],[1,1,2]],[[1,1],[1,1,3]],[[1,1],[1,1,4]],[[1,1],[1,2,1]]] + +theorem patterns_15_7_18_verified : ∀ D ∈ patterns_15_7_18, PatternVerified 15 7 D := by + + simp only [patterns_15_7_18, List.forall_mem_cons] + + exact ⟨⟨certificate_1439, certificate_1439_valid⟩, ⟨⟨certificate_1440, certificate_1440_valid⟩, ⟨⟨certificate_1441, certificate_1441_valid⟩, ⟨⟨certificate_1442, certificate_1442_valid⟩, ⟨⟨certificate_1443, certificate_1443_valid⟩, ⟨⟨certificate_1444, certificate_1444_valid⟩, ⟨⟨certificate_1445, certificate_1445_valid⟩, ⟨⟨certificate_1446, certificate_1446_valid⟩, ⟨⟨certificate_1447, certificate_1447_valid⟩, ⟨⟨certificate_1448, certificate_1448_valid⟩, ⟨⟨certificate_1449, certificate_1449_valid⟩, ⟨⟨certificate_1450, certificate_1450_valid⟩, ⟨⟨certificate_1451, certificate_1451_valid⟩, ⟨⟨certificate_1452, certificate_1452_valid⟩, ⟨⟨certificate_1453, certificate_1453_valid⟩, ⟨⟨certificate_1454, certificate_1454_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_19 : List (List (List ℕ)) := [[[1,1],[1,2,2]],[[1,1],[1,2,3]],[[1,1],[1,3,1]],[[1,1],[1,3,2]],[[1,1],[1,4,1]],[[1,1],[2],[2]],[[1,1],[2],[3]],[[1,1],[2],[4]],[[1,1],[2,1,2]],[[1,1],[2,1,3]],[[1,1],[2,2,2]],[[1,1],[3],[3]],[[1,1,1],[1,2]],[[1,1,1],[1,3]],[[1,1,1],[1,4]],[[1,1,1],[2,2]]] + +theorem patterns_15_7_19_verified : ∀ D ∈ patterns_15_7_19, PatternVerified 15 7 D := by + + simp only [patterns_15_7_19, List.forall_mem_cons] + + exact ⟨⟨certificate_1455, certificate_1455_valid⟩, ⟨⟨certificate_1456, certificate_1456_valid⟩, ⟨⟨certificate_1457, certificate_1457_valid⟩, ⟨⟨certificate_1458, certificate_1458_valid⟩, ⟨⟨certificate_1459, certificate_1459_valid⟩, ⟨⟨certificate_1460, certificate_1460_valid⟩, ⟨⟨certificate_1461, certificate_1461_valid⟩, ⟨⟨certificate_1462, certificate_1462_valid⟩, ⟨⟨certificate_1463, certificate_1463_valid⟩, ⟨⟨certificate_1464, certificate_1464_valid⟩, ⟨⟨certificate_1465, certificate_1465_valid⟩, ⟨⟨certificate_1466, certificate_1466_valid⟩, ⟨⟨certificate_1467, certificate_1467_valid⟩, ⟨⟨certificate_1468, certificate_1468_valid⟩, ⟨⟨certificate_1469, certificate_1469_valid⟩, ⟨⟨certificate_1470, certificate_1470_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_20 : List (List (List ℕ)) := [[[1,1,1],[2,3]],[[1,1,1,1],[2]],[[1,1,1,1],[3]],[[1,1,1,1],[4]],[[1,1,1,1,1,1]],[[1,1,1,1,1,2]],[[1,1,1,1,1,3]],[[1,1,1,1,2,1]],[[1,1,1,1,2,2]],[[1,1,1,1,3,1]],[[1,1,1,2],[2]],[[1,1,1,2],[3]],[[1,1,1,2,1,1]],[[1,1,1,2,1,2]],[[1,1,1,2,2,1]],[[1,1,1,3],[2]]] + +theorem patterns_15_7_20_verified : ∀ D ∈ patterns_15_7_20, PatternVerified 15 7 D := by + + simp only [patterns_15_7_20, List.forall_mem_cons] + + exact ⟨⟨certificate_1471, certificate_1471_valid⟩, ⟨⟨certificate_1472, certificate_1472_valid⟩, ⟨⟨certificate_1473, certificate_1473_valid⟩, ⟨⟨certificate_1474, certificate_1474_valid⟩, ⟨⟨certificate_1475, certificate_1475_valid⟩, ⟨⟨certificate_1476, certificate_1476_valid⟩, ⟨⟨certificate_1477, certificate_1477_valid⟩, ⟨⟨certificate_1478, certificate_1478_valid⟩, ⟨⟨certificate_1479, certificate_1479_valid⟩, ⟨⟨certificate_1480, certificate_1480_valid⟩, ⟨⟨certificate_1481, certificate_1481_valid⟩, ⟨⟨certificate_1482, certificate_1482_valid⟩, ⟨⟨certificate_1483, certificate_1483_valid⟩, ⟨⟨certificate_1484, certificate_1484_valid⟩, ⟨⟨certificate_1485, certificate_1485_valid⟩, ⟨⟨certificate_1486, certificate_1486_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_21 : List (List (List ℕ)) := [[[1,1,1,3,1,1]],[[1,1,2],[1,2]],[[1,1,2],[1,3]],[[1,1,2],[2,2]],[[1,1,2,1],[2]],[[1,1,2,1],[3]],[[1,1,2,1,1,2]],[[1,1,2,1,2,1]],[[1,1,2,2],[2]],[[1,1,2,2,1,1]],[[1,1,3],[1,2]],[[1,1,3,1],[2]],[[1,2],[1,2,1]],[[1,2],[1,2,2]],[[1,2],[1,3,1]],[[1,2],[2],[2]]] + +theorem patterns_15_7_21_verified : ∀ D ∈ patterns_15_7_21, PatternVerified 15 7 D := by + + simp only [patterns_15_7_21, List.forall_mem_cons] + + exact ⟨⟨certificate_1487, certificate_1487_valid⟩, ⟨⟨certificate_1488, certificate_1488_valid⟩, ⟨⟨certificate_1489, certificate_1489_valid⟩, ⟨⟨certificate_1490, certificate_1490_valid⟩, ⟨⟨certificate_1491, certificate_1491_valid⟩, ⟨⟨certificate_1492, certificate_1492_valid⟩, ⟨⟨certificate_1493, certificate_1493_valid⟩, ⟨⟨certificate_1494, certificate_1494_valid⟩, ⟨⟨certificate_1495, certificate_1495_valid⟩, ⟨⟨certificate_1496, certificate_1496_valid⟩, ⟨⟨certificate_1497, certificate_1497_valid⟩, ⟨⟨certificate_1498, certificate_1498_valid⟩, ⟨⟨certificate_1499, certificate_1499_valid⟩, ⟨⟨certificate_1500, certificate_1500_valid⟩, ⟨⟨certificate_1501, certificate_1501_valid⟩, ⟨⟨certificate_1502, certificate_1502_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7_22 : List (List (List ℕ)) := [[[1,2],[2],[3]],[[1,2],[2,1,2]],[[1,2,1],[1,3]],[[1,2,1],[2,2]],[[1,2,1,1,1,2]],[[1,2,1,1,2,1]],[[1,2,1,2],[2]],[[1,2,2,1],[2]],[[1,3],[2],[2]],[[2],[2],[2,2]],[[2],[2,1,1,2]],[[2,1,1,1,1,2]]] + +theorem patterns_15_7_22_verified : ∀ D ∈ patterns_15_7_22, PatternVerified 15 7 D := by + + simp only [patterns_15_7_22, List.forall_mem_cons] + + exact ⟨⟨certificate_1503, certificate_1503_valid⟩, ⟨⟨certificate_1504, certificate_1504_valid⟩, ⟨⟨certificate_1505, certificate_1505_valid⟩, ⟨⟨certificate_1506, certificate_1506_valid⟩, ⟨⟨certificate_1507, certificate_1507_valid⟩, ⟨⟨certificate_1508, certificate_1508_valid⟩, ⟨⟨certificate_1509, certificate_1509_valid⟩, ⟨⟨certificate_1510, certificate_1510_valid⟩, ⟨⟨certificate_1511, certificate_1511_valid⟩, ⟨⟨certificate_1512, certificate_1512_valid⟩, ⟨⟨certificate_1513, certificate_1513_valid⟩, ⟨⟨certificate_1514, certificate_1514_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_7 : List (List (List ℕ)) := patterns_15_7_0 ++ (patterns_15_7_1 ++ (patterns_15_7_2 ++ (patterns_15_7_3 ++ (patterns_15_7_4 ++ (patterns_15_7_5 ++ (patterns_15_7_6 ++ (patterns_15_7_7 ++ (patterns_15_7_8 ++ (patterns_15_7_9 ++ (patterns_15_7_10 ++ (patterns_15_7_11 ++ (patterns_15_7_12 ++ (patterns_15_7_13 ++ (patterns_15_7_14 ++ (patterns_15_7_15 ++ (patterns_15_7_16 ++ (patterns_15_7_17 ++ (patterns_15_7_18 ++ (patterns_15_7_19 ++ (patterns_15_7_20 ++ (patterns_15_7_21 ++ (patterns_15_7_22 ++ ([]))))))))))))))))))))))) + +theorem patterns_15_7_verified : ∀ D ∈ patterns_15_7, PatternVerified 15 7 D := by + + simp only [patterns_15_7, List.forall_mem_append] + + exact ⟨patterns_15_7_0_verified, ⟨patterns_15_7_1_verified, ⟨patterns_15_7_2_verified, ⟨patterns_15_7_3_verified, ⟨patterns_15_7_4_verified, ⟨patterns_15_7_5_verified, ⟨patterns_15_7_6_verified, ⟨patterns_15_7_7_verified, ⟨patterns_15_7_8_verified, ⟨patterns_15_7_9_verified, ⟨patterns_15_7_10_verified, ⟨patterns_15_7_11_verified, ⟨patterns_15_7_12_verified, ⟨patterns_15_7_13_verified, ⟨patterns_15_7_14_verified, ⟨patterns_15_7_15_verified, ⟨patterns_15_7_16_verified, ⟨patterns_15_7_17_verified, ⟨patterns_15_7_18_verified, ⟨patterns_15_7_19_verified, ⟨patterns_15_7_20_verified, ⟨patterns_15_7_21_verified, ⟨patterns_15_7_22_verified, by simp⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +theorem patterns_15_7_coverage : patternChoices 7 8 [] = patterns_15_7 := by decide +kernel + +theorem finite_patterns_15_7 : ∀ D ∈ patternChoices 7 (15-7) [], PatternVerified 15 7 D := by + + rw [patterns_15_7_coverage] + + exact patterns_15_7_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns15x8.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns15x8.lean new file mode 100644 index 0000000000000000000000000000000000000000..292355c0c002ac6244e344d9d5d2b2eb7cc4eba2 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns15x8.lean @@ -0,0 +1,167 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates048 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates049 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates050 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates051 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates052 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates053 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates054 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates055 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_15_8_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[],[]],[[],[],[],[],[],[],[1]],[[],[],[],[],[],[],[2]],[[],[],[],[],[],[],[3]],[[],[],[],[],[],[],[4]],[[],[],[],[],[],[],[5]],[[],[],[],[],[],[],[6]],[[],[],[],[],[],[],[7]],[[],[],[],[],[],[1,1]],[[],[],[],[],[],[1,2]],[[],[],[],[],[],[1,3]],[[],[],[],[],[],[1,4]],[[],[],[],[],[],[1,5]],[[],[],[],[],[],[1,6]],[[],[],[],[],[],[2,2]],[[],[],[],[],[],[2,3]]] + +theorem patterns_15_8_0_verified : ∀ D ∈ patterns_15_8_0, PatternVerified 15 8 D := by + + simp only [patterns_15_8_0, List.forall_mem_cons] + + exact ⟨⟨certificate_1515, certificate_1515_valid⟩, ⟨⟨certificate_1516, certificate_1516_valid⟩, ⟨⟨certificate_1517, certificate_1517_valid⟩, ⟨⟨certificate_1518, certificate_1518_valid⟩, ⟨⟨certificate_1519, certificate_1519_valid⟩, ⟨⟨certificate_1520, certificate_1520_valid⟩, ⟨⟨certificate_1521, certificate_1521_valid⟩, ⟨⟨certificate_1522, certificate_1522_valid⟩, ⟨⟨certificate_1523, certificate_1523_valid⟩, ⟨⟨certificate_1524, certificate_1524_valid⟩, ⟨⟨certificate_1525, certificate_1525_valid⟩, ⟨⟨certificate_1526, certificate_1526_valid⟩, ⟨⟨certificate_1527, certificate_1527_valid⟩, ⟨⟨certificate_1528, certificate_1528_valid⟩, ⟨⟨certificate_1529, certificate_1529_valid⟩, ⟨⟨certificate_1530, certificate_1530_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_8_1 : List (List (List ℕ)) := [[[],[],[],[],[],[2,4]],[[],[],[],[],[],[2,5]],[[],[],[],[],[],[3,3]],[[],[],[],[],[],[3,4]],[[],[],[],[],[1],[1]],[[],[],[],[],[1],[2]],[[],[],[],[],[1],[3]],[[],[],[],[],[1],[4]],[[],[],[],[],[1],[5]],[[],[],[],[],[1],[6]],[[],[],[],[],[1,1,1]],[[],[],[],[],[1,1,2]],[[],[],[],[],[1,1,3]],[[],[],[],[],[1,1,4]],[[],[],[],[],[1,1,5]],[[],[],[],[],[1,2,1]]] + +theorem patterns_15_8_1_verified : ∀ D ∈ patterns_15_8_1, PatternVerified 15 8 D := by + + simp only [patterns_15_8_1, List.forall_mem_cons] + + exact ⟨⟨certificate_1531, certificate_1531_valid⟩, ⟨⟨certificate_1532, certificate_1532_valid⟩, ⟨⟨certificate_1533, certificate_1533_valid⟩, ⟨⟨certificate_1534, certificate_1534_valid⟩, ⟨⟨certificate_1535, certificate_1535_valid⟩, ⟨⟨certificate_1536, certificate_1536_valid⟩, ⟨⟨certificate_1537, certificate_1537_valid⟩, ⟨⟨certificate_1538, certificate_1538_valid⟩, ⟨⟨certificate_1539, certificate_1539_valid⟩, ⟨⟨certificate_1540, certificate_1540_valid⟩, ⟨⟨certificate_1541, certificate_1541_valid⟩, ⟨⟨certificate_1542, certificate_1542_valid⟩, ⟨⟨certificate_1543, certificate_1543_valid⟩, ⟨⟨certificate_1544, certificate_1544_valid⟩, ⟨⟨certificate_1545, certificate_1545_valid⟩, ⟨⟨certificate_1546, certificate_1546_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_8_2 : List (List (List ℕ)) := [[[],[],[],[],[1,2,2]],[[],[],[],[],[1,2,3]],[[],[],[],[],[1,2,4]],[[],[],[],[],[1,3,1]],[[],[],[],[],[1,3,2]],[[],[],[],[],[1,3,3]],[[],[],[],[],[1,4,1]],[[],[],[],[],[1,4,2]],[[],[],[],[],[1,5,1]],[[],[],[],[],[2],[2]],[[],[],[],[],[2],[3]],[[],[],[],[],[2],[4]],[[],[],[],[],[2],[5]],[[],[],[],[],[2,1,2]],[[],[],[],[],[2,1,3]],[[],[],[],[],[2,1,4]]] + +theorem patterns_15_8_2_verified : ∀ D ∈ patterns_15_8_2, PatternVerified 15 8 D := by + + simp only [patterns_15_8_2, List.forall_mem_cons] + + exact ⟨⟨certificate_1547, certificate_1547_valid⟩, ⟨⟨certificate_1548, certificate_1548_valid⟩, ⟨⟨certificate_1549, certificate_1549_valid⟩, ⟨⟨certificate_1550, certificate_1550_valid⟩, ⟨⟨certificate_1551, certificate_1551_valid⟩, ⟨⟨certificate_1552, certificate_1552_valid⟩, ⟨⟨certificate_1553, certificate_1553_valid⟩, ⟨⟨certificate_1554, certificate_1554_valid⟩, ⟨⟨certificate_1555, certificate_1555_valid⟩, ⟨⟨certificate_1556, certificate_1556_valid⟩, ⟨⟨certificate_1557, certificate_1557_valid⟩, ⟨⟨certificate_1558, certificate_1558_valid⟩, ⟨⟨certificate_1559, certificate_1559_valid⟩, ⟨⟨certificate_1560, certificate_1560_valid⟩, ⟨⟨certificate_1561, certificate_1561_valid⟩, ⟨⟨certificate_1562, certificate_1562_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_8_3 : List (List (List ℕ)) := [[[],[],[],[],[2,2,2]],[[],[],[],[],[2,2,3]],[[],[],[],[],[2,3,2]],[[],[],[],[],[3],[3]],[[],[],[],[],[3],[4]],[[],[],[],[],[3,1,3]],[[],[],[],[1],[1,1]],[[],[],[],[1],[1,2]],[[],[],[],[1],[1,3]],[[],[],[],[1],[1,4]],[[],[],[],[1],[1,5]],[[],[],[],[1],[2,2]],[[],[],[],[1],[2,3]],[[],[],[],[1],[2,4]],[[],[],[],[1],[3,3]],[[],[],[],[1,1],[2]]] + +theorem patterns_15_8_3_verified : ∀ D ∈ patterns_15_8_3, PatternVerified 15 8 D := by + + simp only [patterns_15_8_3, List.forall_mem_cons] + + exact ⟨⟨certificate_1563, certificate_1563_valid⟩, ⟨⟨certificate_1564, certificate_1564_valid⟩, ⟨⟨certificate_1565, certificate_1565_valid⟩, ⟨⟨certificate_1566, certificate_1566_valid⟩, ⟨⟨certificate_1567, certificate_1567_valid⟩, ⟨⟨certificate_1568, certificate_1568_valid⟩, ⟨⟨certificate_1569, certificate_1569_valid⟩, ⟨⟨certificate_1570, certificate_1570_valid⟩, ⟨⟨certificate_1571, certificate_1571_valid⟩, ⟨⟨certificate_1572, certificate_1572_valid⟩, ⟨⟨certificate_1573, certificate_1573_valid⟩, ⟨⟨certificate_1574, certificate_1574_valid⟩, ⟨⟨certificate_1575, certificate_1575_valid⟩, ⟨⟨certificate_1576, certificate_1576_valid⟩, ⟨⟨certificate_1577, certificate_1577_valid⟩, ⟨⟨certificate_1578, certificate_1578_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_8_4 : List (List (List ℕ)) := [[[],[],[],[1,1],[3]],[[],[],[],[1,1],[4]],[[],[],[],[1,1],[5]],[[],[],[],[1,1,1,1]],[[],[],[],[1,1,1,2]],[[],[],[],[1,1,1,3]],[[],[],[],[1,1,1,4]],[[],[],[],[1,1,2,1]],[[],[],[],[1,1,2,2]],[[],[],[],[1,1,2,3]],[[],[],[],[1,1,3,1]],[[],[],[],[1,1,3,2]],[[],[],[],[1,1,4,1]],[[],[],[],[1,2],[2]],[[],[],[],[1,2],[3]],[[],[],[],[1,2],[4]]] + +theorem patterns_15_8_4_verified : ∀ D ∈ patterns_15_8_4, PatternVerified 15 8 D := by + + simp only [patterns_15_8_4, List.forall_mem_cons] + + exact ⟨⟨certificate_1579, certificate_1579_valid⟩, ⟨⟨certificate_1580, certificate_1580_valid⟩, ⟨⟨certificate_1581, certificate_1581_valid⟩, ⟨⟨certificate_1582, certificate_1582_valid⟩, ⟨⟨certificate_1583, certificate_1583_valid⟩, ⟨⟨certificate_1584, certificate_1584_valid⟩, ⟨⟨certificate_1585, certificate_1585_valid⟩, ⟨⟨certificate_1586, certificate_1586_valid⟩, ⟨⟨certificate_1587, certificate_1587_valid⟩, ⟨⟨certificate_1588, certificate_1588_valid⟩, ⟨⟨certificate_1589, certificate_1589_valid⟩, ⟨⟨certificate_1590, certificate_1590_valid⟩, ⟨⟨certificate_1591, certificate_1591_valid⟩, ⟨⟨certificate_1592, certificate_1592_valid⟩, ⟨⟨certificate_1593, certificate_1593_valid⟩, ⟨⟨certificate_1594, certificate_1594_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_8_5 : List (List (List ℕ)) := [[[],[],[],[1,2,1,2]],[[],[],[],[1,2,1,3]],[[],[],[],[1,2,2,1]],[[],[],[],[1,2,2,2]],[[],[],[],[1,2,3,1]],[[],[],[],[1,3],[2]],[[],[],[],[1,3],[3]],[[],[],[],[1,3,1,2]],[[],[],[],[1,4],[2]],[[],[],[],[2],[2,2]],[[],[],[],[2],[2,3]],[[],[],[],[2,1,1,2]],[[],[],[],[2,1,1,3]],[[],[],[],[2,1,2,2]],[[],[],[],[2,2],[3]],[[],[],[1],[1],[1]]] + +theorem patterns_15_8_5_verified : ∀ D ∈ patterns_15_8_5, PatternVerified 15 8 D := by + + simp only [patterns_15_8_5, List.forall_mem_cons] + + exact ⟨⟨certificate_1595, certificate_1595_valid⟩, ⟨⟨certificate_1596, certificate_1596_valid⟩, ⟨⟨certificate_1597, certificate_1597_valid⟩, ⟨⟨certificate_1598, certificate_1598_valid⟩, ⟨⟨certificate_1599, certificate_1599_valid⟩, ⟨⟨certificate_1600, certificate_1600_valid⟩, ⟨⟨certificate_1601, certificate_1601_valid⟩, ⟨⟨certificate_1602, certificate_1602_valid⟩, ⟨⟨certificate_1603, certificate_1603_valid⟩, ⟨⟨certificate_1604, certificate_1604_valid⟩, ⟨⟨certificate_1605, certificate_1605_valid⟩, ⟨⟨certificate_1606, certificate_1606_valid⟩, ⟨⟨certificate_1607, certificate_1607_valid⟩, ⟨⟨certificate_1608, certificate_1608_valid⟩, ⟨⟨certificate_1609, certificate_1609_valid⟩, ⟨⟨certificate_1610, certificate_1610_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_8_6 : List (List (List ℕ)) := [[[],[],[1],[1],[2]],[[],[],[1],[1],[3]],[[],[],[1],[1],[4]],[[],[],[1],[1],[5]],[[],[],[1],[1,1,1]],[[],[],[1],[1,1,2]],[[],[],[1],[1,1,3]],[[],[],[1],[1,1,4]],[[],[],[1],[1,2,1]],[[],[],[1],[1,2,2]],[[],[],[1],[1,2,3]],[[],[],[1],[1,3,1]],[[],[],[1],[1,3,2]],[[],[],[1],[1,4,1]],[[],[],[1],[2],[2]],[[],[],[1],[2],[3]]] + +theorem patterns_15_8_6_verified : ∀ D ∈ patterns_15_8_6, PatternVerified 15 8 D := by + + simp only [patterns_15_8_6, List.forall_mem_cons] + + exact ⟨⟨certificate_1611, certificate_1611_valid⟩, ⟨⟨certificate_1612, certificate_1612_valid⟩, ⟨⟨certificate_1613, certificate_1613_valid⟩, ⟨⟨certificate_1614, certificate_1614_valid⟩, ⟨⟨certificate_1615, certificate_1615_valid⟩, ⟨⟨certificate_1616, certificate_1616_valid⟩, ⟨⟨certificate_1617, certificate_1617_valid⟩, ⟨⟨certificate_1618, certificate_1618_valid⟩, ⟨⟨certificate_1619, certificate_1619_valid⟩, ⟨⟨certificate_1620, certificate_1620_valid⟩, ⟨⟨certificate_1621, certificate_1621_valid⟩, ⟨⟨certificate_1622, certificate_1622_valid⟩, ⟨⟨certificate_1623, certificate_1623_valid⟩, ⟨⟨certificate_1624, certificate_1624_valid⟩, ⟨⟨certificate_1625, certificate_1625_valid⟩, ⟨⟨certificate_1626, certificate_1626_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_8_7 : List (List (List ℕ)) := [[[],[],[1],[2],[4]],[[],[],[1],[2,1,2]],[[],[],[1],[2,1,3]],[[],[],[1],[2,2,2]],[[],[],[1],[3],[3]],[[],[],[1,1],[1,1]],[[],[],[1,1],[1,2]],[[],[],[1,1],[1,3]],[[],[],[1,1],[1,4]],[[],[],[1,1],[2,2]],[[],[],[1,1],[2,3]],[[],[],[1,1,1],[2]],[[],[],[1,1,1],[3]],[[],[],[1,1,1],[4]],[[],[],[1,1,1,1,1]],[[],[],[1,1,1,1,2]]] + +theorem patterns_15_8_7_verified : ∀ D ∈ patterns_15_8_7, PatternVerified 15 8 D := by + + simp only [patterns_15_8_7, List.forall_mem_cons] + + exact ⟨⟨certificate_1627, certificate_1627_valid⟩, ⟨⟨certificate_1628, certificate_1628_valid⟩, ⟨⟨certificate_1629, certificate_1629_valid⟩, ⟨⟨certificate_1630, certificate_1630_valid⟩, ⟨⟨certificate_1631, certificate_1631_valid⟩, ⟨⟨certificate_1632, certificate_1632_valid⟩, ⟨⟨certificate_1633, certificate_1633_valid⟩, ⟨⟨certificate_1634, certificate_1634_valid⟩, ⟨⟨certificate_1635, certificate_1635_valid⟩, ⟨⟨certificate_1636, certificate_1636_valid⟩, ⟨⟨certificate_1637, certificate_1637_valid⟩, ⟨⟨certificate_1638, certificate_1638_valid⟩, ⟨⟨certificate_1639, certificate_1639_valid⟩, ⟨⟨certificate_1640, certificate_1640_valid⟩, ⟨⟨certificate_1641, certificate_1641_valid⟩, ⟨⟨certificate_1642, certificate_1642_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_8_8 : List (List (List ℕ)) := [[[],[],[1,1,1,1,3]],[[],[],[1,1,1,2,1]],[[],[],[1,1,1,2,2]],[[],[],[1,1,1,3,1]],[[],[],[1,1,2],[2]],[[],[],[1,1,2],[3]],[[],[],[1,1,2,1,1]],[[],[],[1,1,2,1,2]],[[],[],[1,1,2,2,1]],[[],[],[1,1,3],[2]],[[],[],[1,1,3,1,1]],[[],[],[1,2],[1,2]],[[],[],[1,2],[1,3]],[[],[],[1,2],[2,2]],[[],[],[1,2,1],[2]],[[],[],[1,2,1],[3]]] + +theorem patterns_15_8_8_verified : ∀ D ∈ patterns_15_8_8, PatternVerified 15 8 D := by + + simp only [patterns_15_8_8, List.forall_mem_cons] + + exact ⟨⟨certificate_1643, certificate_1643_valid⟩, ⟨⟨certificate_1644, certificate_1644_valid⟩, ⟨⟨certificate_1645, certificate_1645_valid⟩, ⟨⟨certificate_1646, certificate_1646_valid⟩, ⟨⟨certificate_1647, certificate_1647_valid⟩, ⟨⟨certificate_1648, certificate_1648_valid⟩, ⟨⟨certificate_1649, certificate_1649_valid⟩, ⟨⟨certificate_1650, certificate_1650_valid⟩, ⟨⟨certificate_1651, certificate_1651_valid⟩, ⟨⟨certificate_1652, certificate_1652_valid⟩, ⟨⟨certificate_1653, certificate_1653_valid⟩, ⟨⟨certificate_1654, certificate_1654_valid⟩, ⟨⟨certificate_1655, certificate_1655_valid⟩, ⟨⟨certificate_1656, certificate_1656_valid⟩, ⟨⟨certificate_1657, certificate_1657_valid⟩, ⟨⟨certificate_1658, certificate_1658_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_8_9 : List (List (List ℕ)) := [[[],[],[1,2,1,1,2]],[[],[],[1,2,1,2,1]],[[],[],[1,2,2],[2]],[[],[],[1,3,1],[2]],[[],[],[2],[2],[2]],[[],[],[2],[2],[3]],[[],[],[2],[2,1,2]],[[],[],[2,1,1,1,2]],[[],[1],[1],[1,1]],[[],[1],[1],[1,2]],[[],[1],[1],[1,3]],[[],[1],[1],[1,4]],[[],[1],[1],[2,2]],[[],[1],[1],[2,3]],[[],[1],[1,1],[2]],[[],[1],[1,1],[3]]] + +theorem patterns_15_8_9_verified : ∀ D ∈ patterns_15_8_9, PatternVerified 15 8 D := by + + simp only [patterns_15_8_9, List.forall_mem_cons] + + exact ⟨⟨certificate_1659, certificate_1659_valid⟩, ⟨⟨certificate_1660, certificate_1660_valid⟩, ⟨⟨certificate_1661, certificate_1661_valid⟩, ⟨⟨certificate_1662, certificate_1662_valid⟩, ⟨⟨certificate_1663, certificate_1663_valid⟩, ⟨⟨certificate_1664, certificate_1664_valid⟩, ⟨⟨certificate_1665, certificate_1665_valid⟩, ⟨⟨certificate_1666, certificate_1666_valid⟩, ⟨⟨certificate_1667, certificate_1667_valid⟩, ⟨⟨certificate_1668, certificate_1668_valid⟩, ⟨⟨certificate_1669, certificate_1669_valid⟩, ⟨⟨certificate_1670, certificate_1670_valid⟩, ⟨⟨certificate_1671, certificate_1671_valid⟩, ⟨⟨certificate_1672, certificate_1672_valid⟩, ⟨⟨certificate_1673, certificate_1673_valid⟩, ⟨⟨certificate_1674, certificate_1674_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_8_10 : List (List (List ℕ)) := [[[],[1],[1,1],[4]],[[],[1],[1,1,1,1]],[[],[1],[1,1,1,2]],[[],[1],[1,1,1,3]],[[],[1],[1,1,2,1]],[[],[1],[1,1,2,2]],[[],[1],[1,1,3,1]],[[],[1],[1,2],[2]],[[],[1],[1,2],[3]],[[],[1],[1,2,1,2]],[[],[1],[1,2,2,1]],[[],[1],[1,3],[2]],[[],[1],[2],[2,2]],[[],[1],[2,1,1,2]],[[],[1,1],[1,1,1]],[[],[1,1],[1,1,2]]] + +theorem patterns_15_8_10_verified : ∀ D ∈ patterns_15_8_10, PatternVerified 15 8 D := by + + simp only [patterns_15_8_10, List.forall_mem_cons] + + exact ⟨⟨certificate_1675, certificate_1675_valid⟩, ⟨⟨certificate_1676, certificate_1676_valid⟩, ⟨⟨certificate_1677, certificate_1677_valid⟩, ⟨⟨certificate_1678, certificate_1678_valid⟩, ⟨⟨certificate_1679, certificate_1679_valid⟩, ⟨⟨certificate_1680, certificate_1680_valid⟩, ⟨⟨certificate_1681, certificate_1681_valid⟩, ⟨⟨certificate_1682, certificate_1682_valid⟩, ⟨⟨certificate_1683, certificate_1683_valid⟩, ⟨⟨certificate_1684, certificate_1684_valid⟩, ⟨⟨certificate_1685, certificate_1685_valid⟩, ⟨⟨certificate_1686, certificate_1686_valid⟩, ⟨⟨certificate_1687, certificate_1687_valid⟩, ⟨⟨certificate_1688, certificate_1688_valid⟩, ⟨⟨certificate_1689, certificate_1689_valid⟩, ⟨⟨certificate_1690, certificate_1690_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_8_11 : List (List (List ℕ)) := [[[],[1,1],[1,1,3]],[[],[1,1],[1,2,1]],[[],[1,1],[1,2,2]],[[],[1,1],[1,3,1]],[[],[1,1],[2],[2]],[[],[1,1],[2],[3]],[[],[1,1],[2,1,2]],[[],[1,1,1],[1,2]],[[],[1,1,1],[1,3]],[[],[1,1,1],[2,2]],[[],[1,1,1,1],[2]],[[],[1,1,1,1],[3]],[[],[1,1,1,1,1,1]],[[],[1,1,1,1,1,2]],[[],[1,1,1,1,2,1]],[[],[1,1,1,2],[2]]] + +theorem patterns_15_8_11_verified : ∀ D ∈ patterns_15_8_11, PatternVerified 15 8 D := by + + simp only [patterns_15_8_11, List.forall_mem_cons] + + exact ⟨⟨certificate_1691, certificate_1691_valid⟩, ⟨⟨certificate_1692, certificate_1692_valid⟩, ⟨⟨certificate_1693, certificate_1693_valid⟩, ⟨⟨certificate_1694, certificate_1694_valid⟩, ⟨⟨certificate_1695, certificate_1695_valid⟩, ⟨⟨certificate_1696, certificate_1696_valid⟩, ⟨⟨certificate_1697, certificate_1697_valid⟩, ⟨⟨certificate_1698, certificate_1698_valid⟩, ⟨⟨certificate_1699, certificate_1699_valid⟩, ⟨⟨certificate_1700, certificate_1700_valid⟩, ⟨⟨certificate_1701, certificate_1701_valid⟩, ⟨⟨certificate_1702, certificate_1702_valid⟩, ⟨⟨certificate_1703, certificate_1703_valid⟩, ⟨⟨certificate_1704, certificate_1704_valid⟩, ⟨⟨certificate_1705, certificate_1705_valid⟩, ⟨⟨certificate_1706, certificate_1706_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_8_12 : List (List (List ℕ)) := [[[],[1,1,1,2,1,1]],[[],[1,1,2],[1,2]],[[],[1,1,2,1],[2]],[[],[1,2],[1,2,1]],[[],[1,2],[2],[2]],[[1],[1],[1],[1]],[[1],[1],[1],[2]],[[1],[1],[1],[3]],[[1],[1],[1],[4]],[[1],[1],[1,1,1]],[[1],[1],[1,1,2]],[[1],[1],[1,1,3]],[[1],[1],[1,2,1]],[[1],[1],[1,2,2]],[[1],[1],[1,3,1]],[[1],[1],[2],[2]]] + +theorem patterns_15_8_12_verified : ∀ D ∈ patterns_15_8_12, PatternVerified 15 8 D := by + + simp only [patterns_15_8_12, List.forall_mem_cons] + + exact ⟨⟨certificate_1707, certificate_1707_valid⟩, ⟨⟨certificate_1708, certificate_1708_valid⟩, ⟨⟨certificate_1709, certificate_1709_valid⟩, ⟨⟨certificate_1710, certificate_1710_valid⟩, ⟨⟨certificate_1711, certificate_1711_valid⟩, ⟨⟨certificate_1712, certificate_1712_valid⟩, ⟨⟨certificate_1713, certificate_1713_valid⟩, ⟨⟨certificate_1714, certificate_1714_valid⟩, ⟨⟨certificate_1715, certificate_1715_valid⟩, ⟨⟨certificate_1716, certificate_1716_valid⟩, ⟨⟨certificate_1717, certificate_1717_valid⟩, ⟨⟨certificate_1718, certificate_1718_valid⟩, ⟨⟨certificate_1719, certificate_1719_valid⟩, ⟨⟨certificate_1720, certificate_1720_valid⟩, ⟨⟨certificate_1721, certificate_1721_valid⟩, ⟨⟨certificate_1722, certificate_1722_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_8_13 : List (List (List ℕ)) := [[[1],[1],[2],[3]],[[1],[1],[2,1,2]],[[1],[1,1],[1,1]],[[1],[1,1],[1,2]],[[1],[1,1],[1,3]],[[1],[1,1],[2,2]],[[1],[1,1,1],[2]],[[1],[1,1,1],[3]],[[1],[1,1,1,1,1]],[[1],[1,1,1,1,2]],[[1],[1,1,1,2,1]],[[1],[1,1,2],[2]],[[1],[1,1,2,1,1]],[[1],[1,2],[1,2]],[[1],[1,2,1],[2]],[[1],[2],[2],[2]]] + +theorem patterns_15_8_13_verified : ∀ D ∈ patterns_15_8_13, PatternVerified 15 8 D := by + + simp only [patterns_15_8_13, List.forall_mem_cons] + + exact ⟨⟨certificate_1723, certificate_1723_valid⟩, ⟨⟨certificate_1724, certificate_1724_valid⟩, ⟨⟨certificate_1725, certificate_1725_valid⟩, ⟨⟨certificate_1726, certificate_1726_valid⟩, ⟨⟨certificate_1727, certificate_1727_valid⟩, ⟨⟨certificate_1728, certificate_1728_valid⟩, ⟨⟨certificate_1729, certificate_1729_valid⟩, ⟨⟨certificate_1730, certificate_1730_valid⟩, ⟨⟨certificate_1731, certificate_1731_valid⟩, ⟨⟨certificate_1732, certificate_1732_valid⟩, ⟨⟨certificate_1733, certificate_1733_valid⟩, ⟨⟨certificate_1734, certificate_1734_valid⟩, ⟨⟨certificate_1735, certificate_1735_valid⟩, ⟨⟨certificate_1736, certificate_1736_valid⟩, ⟨⟨certificate_1737, certificate_1737_valid⟩, ⟨⟨certificate_1738, certificate_1738_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_8_14 : List (List (List ℕ)) := [[[1,1],[1,1],[2]],[[1,1],[1,1],[3]],[[1,1],[1,1,1,1]],[[1,1],[1,1,1,2]],[[1,1],[1,1,2,1]],[[1,1],[1,2],[2]],[[1,1,1],[1,1,1]],[[1,1,1],[1,1,2]],[[1,1,1],[1,2,1]],[[1,1,1],[2],[2]],[[1,1,1,1],[1,2]],[[1,1,1,1,1],[2]],[[1,1,1,1,1,1,1]]] + +theorem patterns_15_8_14_verified : ∀ D ∈ patterns_15_8_14, PatternVerified 15 8 D := by + + simp only [patterns_15_8_14, List.forall_mem_cons] + + exact ⟨⟨certificate_1739, certificate_1739_valid⟩, ⟨⟨certificate_1740, certificate_1740_valid⟩, ⟨⟨certificate_1741, certificate_1741_valid⟩, ⟨⟨certificate_1742, certificate_1742_valid⟩, ⟨⟨certificate_1743, certificate_1743_valid⟩, ⟨⟨certificate_1744, certificate_1744_valid⟩, ⟨⟨certificate_1745, certificate_1745_valid⟩, ⟨⟨certificate_1746, certificate_1746_valid⟩, ⟨⟨certificate_1747, certificate_1747_valid⟩, ⟨⟨certificate_1748, certificate_1748_valid⟩, ⟨⟨certificate_1749, certificate_1749_valid⟩, ⟨⟨certificate_1750, certificate_1750_valid⟩, ⟨⟨certificate_1751, certificate_1751_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_15_8 : List (List (List ℕ)) := patterns_15_8_0 ++ (patterns_15_8_1 ++ (patterns_15_8_2 ++ (patterns_15_8_3 ++ (patterns_15_8_4 ++ (patterns_15_8_5 ++ (patterns_15_8_6 ++ (patterns_15_8_7 ++ (patterns_15_8_8 ++ (patterns_15_8_9 ++ (patterns_15_8_10 ++ (patterns_15_8_11 ++ (patterns_15_8_12 ++ (patterns_15_8_13 ++ (patterns_15_8_14 ++ ([]))))))))))))))) + +theorem patterns_15_8_verified : ∀ D ∈ patterns_15_8, PatternVerified 15 8 D := by + + simp only [patterns_15_8, List.forall_mem_append] + + exact ⟨patterns_15_8_0_verified, ⟨patterns_15_8_1_verified, ⟨patterns_15_8_2_verified, ⟨patterns_15_8_3_verified, ⟨patterns_15_8_4_verified, ⟨patterns_15_8_5_verified, ⟨patterns_15_8_6_verified, ⟨patterns_15_8_7_verified, ⟨patterns_15_8_8_verified, ⟨patterns_15_8_9_verified, ⟨patterns_15_8_10_verified, ⟨patterns_15_8_11_verified, ⟨patterns_15_8_12_verified, ⟨patterns_15_8_13_verified, ⟨patterns_15_8_14_verified, by simp⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +theorem patterns_15_8_coverage : patternChoices 8 7 [] = patterns_15_8 := by decide +kernel + +theorem finite_patterns_15_8 : ∀ D ∈ patternChoices 8 (15-8) [], PatternVerified 15 8 D := by + + rw [patterns_15_8_coverage] + + exact patterns_15_8_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns16x8.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns16x8.lean new file mode 100644 index 0000000000000000000000000000000000000000..6fa3cadf1de0b8c1136e26901fef69c400683f01 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns16x8.lean @@ -0,0 +1,295 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates055 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates056 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates057 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates058 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates059 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates060 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates061 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates062 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates063 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates064 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates065 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates066 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates067 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates068 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates069 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates070 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_16_8_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[],[]],[[],[],[],[],[],[],[1]],[[],[],[],[],[],[],[2]],[[],[],[],[],[],[],[3]],[[],[],[],[],[],[],[4]],[[],[],[],[],[],[],[5]],[[],[],[],[],[],[],[6]],[[],[],[],[],[],[],[7]],[[],[],[],[],[],[],[8]],[[],[],[],[],[],[1,1]],[[],[],[],[],[],[1,2]],[[],[],[],[],[],[1,3]],[[],[],[],[],[],[1,4]],[[],[],[],[],[],[1,5]],[[],[],[],[],[],[1,6]],[[],[],[],[],[],[1,7]]] + +theorem patterns_16_8_0_verified : ∀ D ∈ patterns_16_8_0, PatternVerified 16 8 D := by + + simp only [patterns_16_8_0, List.forall_mem_cons] + + exact ⟨⟨certificate_1752, certificate_1752_valid⟩, ⟨⟨certificate_1753, certificate_1753_valid⟩, ⟨⟨certificate_1754, certificate_1754_valid⟩, ⟨⟨certificate_1755, certificate_1755_valid⟩, ⟨⟨certificate_1756, certificate_1756_valid⟩, ⟨⟨certificate_1757, certificate_1757_valid⟩, ⟨⟨certificate_1758, certificate_1758_valid⟩, ⟨⟨certificate_1759, certificate_1759_valid⟩, ⟨⟨certificate_1760, certificate_1760_valid⟩, ⟨⟨certificate_1761, certificate_1761_valid⟩, ⟨⟨certificate_1762, certificate_1762_valid⟩, ⟨⟨certificate_1763, certificate_1763_valid⟩, ⟨⟨certificate_1764, certificate_1764_valid⟩, ⟨⟨certificate_1765, certificate_1765_valid⟩, ⟨⟨certificate_1766, certificate_1766_valid⟩, ⟨⟨certificate_1767, certificate_1767_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_1 : List (List (List ℕ)) := [[[],[],[],[],[],[2,2]],[[],[],[],[],[],[2,3]],[[],[],[],[],[],[2,4]],[[],[],[],[],[],[2,5]],[[],[],[],[],[],[2,6]],[[],[],[],[],[],[3,3]],[[],[],[],[],[],[3,4]],[[],[],[],[],[],[3,5]],[[],[],[],[],[],[4,4]],[[],[],[],[],[1],[1]],[[],[],[],[],[1],[2]],[[],[],[],[],[1],[3]],[[],[],[],[],[1],[4]],[[],[],[],[],[1],[5]],[[],[],[],[],[1],[6]],[[],[],[],[],[1],[7]]] + +theorem patterns_16_8_1_verified : ∀ D ∈ patterns_16_8_1, PatternVerified 16 8 D := by + + simp only [patterns_16_8_1, List.forall_mem_cons] + + exact ⟨⟨certificate_1768, certificate_1768_valid⟩, ⟨⟨certificate_1769, certificate_1769_valid⟩, ⟨⟨certificate_1770, certificate_1770_valid⟩, ⟨⟨certificate_1771, certificate_1771_valid⟩, ⟨⟨certificate_1772, certificate_1772_valid⟩, ⟨⟨certificate_1773, certificate_1773_valid⟩, ⟨⟨certificate_1774, certificate_1774_valid⟩, ⟨⟨certificate_1775, certificate_1775_valid⟩, ⟨⟨certificate_1776, certificate_1776_valid⟩, ⟨⟨certificate_1777, certificate_1777_valid⟩, ⟨⟨certificate_1778, certificate_1778_valid⟩, ⟨⟨certificate_1779, certificate_1779_valid⟩, ⟨⟨certificate_1780, certificate_1780_valid⟩, ⟨⟨certificate_1781, certificate_1781_valid⟩, ⟨⟨certificate_1782, certificate_1782_valid⟩, ⟨⟨certificate_1783, certificate_1783_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_2 : List (List (List ℕ)) := [[[],[],[],[],[1,1,1]],[[],[],[],[],[1,1,2]],[[],[],[],[],[1,1,3]],[[],[],[],[],[1,1,4]],[[],[],[],[],[1,1,5]],[[],[],[],[],[1,1,6]],[[],[],[],[],[1,2,1]],[[],[],[],[],[1,2,2]],[[],[],[],[],[1,2,3]],[[],[],[],[],[1,2,4]],[[],[],[],[],[1,2,5]],[[],[],[],[],[1,3,1]],[[],[],[],[],[1,3,2]],[[],[],[],[],[1,3,3]],[[],[],[],[],[1,3,4]],[[],[],[],[],[1,4,1]]] + +theorem patterns_16_8_2_verified : ∀ D ∈ patterns_16_8_2, PatternVerified 16 8 D := by + + simp only [patterns_16_8_2, List.forall_mem_cons] + + exact ⟨⟨certificate_1784, certificate_1784_valid⟩, ⟨⟨certificate_1785, certificate_1785_valid⟩, ⟨⟨certificate_1786, certificate_1786_valid⟩, ⟨⟨certificate_1787, certificate_1787_valid⟩, ⟨⟨certificate_1788, certificate_1788_valid⟩, ⟨⟨certificate_1789, certificate_1789_valid⟩, ⟨⟨certificate_1790, certificate_1790_valid⟩, ⟨⟨certificate_1791, certificate_1791_valid⟩, ⟨⟨certificate_1792, certificate_1792_valid⟩, ⟨⟨certificate_1793, certificate_1793_valid⟩, ⟨⟨certificate_1794, certificate_1794_valid⟩, ⟨⟨certificate_1795, certificate_1795_valid⟩, ⟨⟨certificate_1796, certificate_1796_valid⟩, ⟨⟨certificate_1797, certificate_1797_valid⟩, ⟨⟨certificate_1798, certificate_1798_valid⟩, ⟨⟨certificate_1799, certificate_1799_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_3 : List (List (List ℕ)) := [[[],[],[],[],[1,4,2]],[[],[],[],[],[1,4,3]],[[],[],[],[],[1,5,1]],[[],[],[],[],[1,5,2]],[[],[],[],[],[1,6,1]],[[],[],[],[],[2],[2]],[[],[],[],[],[2],[3]],[[],[],[],[],[2],[4]],[[],[],[],[],[2],[5]],[[],[],[],[],[2],[6]],[[],[],[],[],[2,1,2]],[[],[],[],[],[2,1,3]],[[],[],[],[],[2,1,4]],[[],[],[],[],[2,1,5]],[[],[],[],[],[2,2,2]],[[],[],[],[],[2,2,3]]] + +theorem patterns_16_8_3_verified : ∀ D ∈ patterns_16_8_3, PatternVerified 16 8 D := by + + simp only [patterns_16_8_3, List.forall_mem_cons] + + exact ⟨⟨certificate_1800, certificate_1800_valid⟩, ⟨⟨certificate_1801, certificate_1801_valid⟩, ⟨⟨certificate_1802, certificate_1802_valid⟩, ⟨⟨certificate_1803, certificate_1803_valid⟩, ⟨⟨certificate_1804, certificate_1804_valid⟩, ⟨⟨certificate_1805, certificate_1805_valid⟩, ⟨⟨certificate_1806, certificate_1806_valid⟩, ⟨⟨certificate_1807, certificate_1807_valid⟩, ⟨⟨certificate_1808, certificate_1808_valid⟩, ⟨⟨certificate_1809, certificate_1809_valid⟩, ⟨⟨certificate_1810, certificate_1810_valid⟩, ⟨⟨certificate_1811, certificate_1811_valid⟩, ⟨⟨certificate_1812, certificate_1812_valid⟩, ⟨⟨certificate_1813, certificate_1813_valid⟩, ⟨⟨certificate_1814, certificate_1814_valid⟩, ⟨⟨certificate_1815, certificate_1815_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_4 : List (List (List ℕ)) := [[[],[],[],[],[2,2,4]],[[],[],[],[],[2,3,2]],[[],[],[],[],[2,3,3]],[[],[],[],[],[2,4,2]],[[],[],[],[],[3],[3]],[[],[],[],[],[3],[4]],[[],[],[],[],[3],[5]],[[],[],[],[],[3,1,3]],[[],[],[],[],[3,1,4]],[[],[],[],[],[3,2,3]],[[],[],[],[],[4],[4]],[[],[],[],[1],[1,1]],[[],[],[],[1],[1,2]],[[],[],[],[1],[1,3]],[[],[],[],[1],[1,4]],[[],[],[],[1],[1,5]]] + +theorem patterns_16_8_4_verified : ∀ D ∈ patterns_16_8_4, PatternVerified 16 8 D := by + + simp only [patterns_16_8_4, List.forall_mem_cons] + + exact ⟨⟨certificate_1816, certificate_1816_valid⟩, ⟨⟨certificate_1817, certificate_1817_valid⟩, ⟨⟨certificate_1818, certificate_1818_valid⟩, ⟨⟨certificate_1819, certificate_1819_valid⟩, ⟨⟨certificate_1820, certificate_1820_valid⟩, ⟨⟨certificate_1821, certificate_1821_valid⟩, ⟨⟨certificate_1822, certificate_1822_valid⟩, ⟨⟨certificate_1823, certificate_1823_valid⟩, ⟨⟨certificate_1824, certificate_1824_valid⟩, ⟨⟨certificate_1825, certificate_1825_valid⟩, ⟨⟨certificate_1826, certificate_1826_valid⟩, ⟨⟨certificate_1827, certificate_1827_valid⟩, ⟨⟨certificate_1828, certificate_1828_valid⟩, ⟨⟨certificate_1829, certificate_1829_valid⟩, ⟨⟨certificate_1830, certificate_1830_valid⟩, ⟨⟨certificate_1831, certificate_1831_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_5 : List (List (List ℕ)) := [[[],[],[],[1],[1,6]],[[],[],[],[1],[2,2]],[[],[],[],[1],[2,3]],[[],[],[],[1],[2,4]],[[],[],[],[1],[2,5]],[[],[],[],[1],[3,3]],[[],[],[],[1],[3,4]],[[],[],[],[1,1],[2]],[[],[],[],[1,1],[3]],[[],[],[],[1,1],[4]],[[],[],[],[1,1],[5]],[[],[],[],[1,1],[6]],[[],[],[],[1,1,1,1]],[[],[],[],[1,1,1,2]],[[],[],[],[1,1,1,3]],[[],[],[],[1,1,1,4]]] + +theorem patterns_16_8_5_verified : ∀ D ∈ patterns_16_8_5, PatternVerified 16 8 D := by + + simp only [patterns_16_8_5, List.forall_mem_cons] + + exact ⟨⟨certificate_1832, certificate_1832_valid⟩, ⟨⟨certificate_1833, certificate_1833_valid⟩, ⟨⟨certificate_1834, certificate_1834_valid⟩, ⟨⟨certificate_1835, certificate_1835_valid⟩, ⟨⟨certificate_1836, certificate_1836_valid⟩, ⟨⟨certificate_1837, certificate_1837_valid⟩, ⟨⟨certificate_1838, certificate_1838_valid⟩, ⟨⟨certificate_1839, certificate_1839_valid⟩, ⟨⟨certificate_1840, certificate_1840_valid⟩, ⟨⟨certificate_1841, certificate_1841_valid⟩, ⟨⟨certificate_1842, certificate_1842_valid⟩, ⟨⟨certificate_1843, certificate_1843_valid⟩, ⟨⟨certificate_1844, certificate_1844_valid⟩, ⟨⟨certificate_1845, certificate_1845_valid⟩, ⟨⟨certificate_1846, certificate_1846_valid⟩, ⟨⟨certificate_1847, certificate_1847_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_6 : List (List (List ℕ)) := [[[],[],[],[1,1,1,5]],[[],[],[],[1,1,2,1]],[[],[],[],[1,1,2,2]],[[],[],[],[1,1,2,3]],[[],[],[],[1,1,2,4]],[[],[],[],[1,1,3,1]],[[],[],[],[1,1,3,2]],[[],[],[],[1,1,3,3]],[[],[],[],[1,1,4,1]],[[],[],[],[1,1,4,2]],[[],[],[],[1,1,5,1]],[[],[],[],[1,2],[2]],[[],[],[],[1,2],[3]],[[],[],[],[1,2],[4]],[[],[],[],[1,2],[5]],[[],[],[],[1,2,1,2]]] + +theorem patterns_16_8_6_verified : ∀ D ∈ patterns_16_8_6, PatternVerified 16 8 D := by + + simp only [patterns_16_8_6, List.forall_mem_cons] + + exact ⟨⟨certificate_1848, certificate_1848_valid⟩, ⟨⟨certificate_1849, certificate_1849_valid⟩, ⟨⟨certificate_1850, certificate_1850_valid⟩, ⟨⟨certificate_1851, certificate_1851_valid⟩, ⟨⟨certificate_1852, certificate_1852_valid⟩, ⟨⟨certificate_1853, certificate_1853_valid⟩, ⟨⟨certificate_1854, certificate_1854_valid⟩, ⟨⟨certificate_1855, certificate_1855_valid⟩, ⟨⟨certificate_1856, certificate_1856_valid⟩, ⟨⟨certificate_1857, certificate_1857_valid⟩, ⟨⟨certificate_1858, certificate_1858_valid⟩, ⟨⟨certificate_1859, certificate_1859_valid⟩, ⟨⟨certificate_1860, certificate_1860_valid⟩, ⟨⟨certificate_1861, certificate_1861_valid⟩, ⟨⟨certificate_1862, certificate_1862_valid⟩, ⟨⟨certificate_1863, certificate_1863_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_7 : List (List (List ℕ)) := [[[],[],[],[1,2,1,3]],[[],[],[],[1,2,1,4]],[[],[],[],[1,2,2,1]],[[],[],[],[1,2,2,2]],[[],[],[],[1,2,2,3]],[[],[],[],[1,2,3,1]],[[],[],[],[1,2,3,2]],[[],[],[],[1,2,4,1]],[[],[],[],[1,3],[2]],[[],[],[],[1,3],[3]],[[],[],[],[1,3],[4]],[[],[],[],[1,3,1,2]],[[],[],[],[1,3,1,3]],[[],[],[],[1,3,2,2]],[[],[],[],[1,3,3,1]],[[],[],[],[1,4],[2]]] + +theorem patterns_16_8_7_verified : ∀ D ∈ patterns_16_8_7, PatternVerified 16 8 D := by + + simp only [patterns_16_8_7, List.forall_mem_cons] + + exact ⟨⟨certificate_1864, certificate_1864_valid⟩, ⟨⟨certificate_1865, certificate_1865_valid⟩, ⟨⟨certificate_1866, certificate_1866_valid⟩, ⟨⟨certificate_1867, certificate_1867_valid⟩, ⟨⟨certificate_1868, certificate_1868_valid⟩, ⟨⟨certificate_1869, certificate_1869_valid⟩, ⟨⟨certificate_1870, certificate_1870_valid⟩, ⟨⟨certificate_1871, certificate_1871_valid⟩, ⟨⟨certificate_1872, certificate_1872_valid⟩, ⟨⟨certificate_1873, certificate_1873_valid⟩, ⟨⟨certificate_1874, certificate_1874_valid⟩, ⟨⟨certificate_1875, certificate_1875_valid⟩, ⟨⟨certificate_1876, certificate_1876_valid⟩, ⟨⟨certificate_1877, certificate_1877_valid⟩, ⟨⟨certificate_1878, certificate_1878_valid⟩, ⟨⟨certificate_1879, certificate_1879_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_8 : List (List (List ℕ)) := [[[],[],[],[1,4],[3]],[[],[],[],[1,4,1,2]],[[],[],[],[1,5],[2]],[[],[],[],[2],[2,2]],[[],[],[],[2],[2,3]],[[],[],[],[2],[2,4]],[[],[],[],[2],[3,3]],[[],[],[],[2,1,1,2]],[[],[],[],[2,1,1,3]],[[],[],[],[2,1,1,4]],[[],[],[],[2,1,2,2]],[[],[],[],[2,1,2,3]],[[],[],[],[2,1,3,2]],[[],[],[],[2,2],[3]],[[],[],[],[2,2],[4]],[[],[],[],[2,2,1,3]]] + +theorem patterns_16_8_8_verified : ∀ D ∈ patterns_16_8_8, PatternVerified 16 8 D := by + + simp only [patterns_16_8_8, List.forall_mem_cons] + + exact ⟨⟨certificate_1880, certificate_1880_valid⟩, ⟨⟨certificate_1881, certificate_1881_valid⟩, ⟨⟨certificate_1882, certificate_1882_valid⟩, ⟨⟨certificate_1883, certificate_1883_valid⟩, ⟨⟨certificate_1884, certificate_1884_valid⟩, ⟨⟨certificate_1885, certificate_1885_valid⟩, ⟨⟨certificate_1886, certificate_1886_valid⟩, ⟨⟨certificate_1887, certificate_1887_valid⟩, ⟨⟨certificate_1888, certificate_1888_valid⟩, ⟨⟨certificate_1889, certificate_1889_valid⟩, ⟨⟨certificate_1890, certificate_1890_valid⟩, ⟨⟨certificate_1891, certificate_1891_valid⟩, ⟨⟨certificate_1892, certificate_1892_valid⟩, ⟨⟨certificate_1893, certificate_1893_valid⟩, ⟨⟨certificate_1894, certificate_1894_valid⟩, ⟨⟨certificate_1895, certificate_1895_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_9 : List (List (List ℕ)) := [[[],[],[],[2,2,2,2]],[[],[],[],[2,3],[3]],[[],[],[],[3,1,1,3]],[[],[],[1],[1],[1]],[[],[],[1],[1],[2]],[[],[],[1],[1],[3]],[[],[],[1],[1],[4]],[[],[],[1],[1],[5]],[[],[],[1],[1],[6]],[[],[],[1],[1,1,1]],[[],[],[1],[1,1,2]],[[],[],[1],[1,1,3]],[[],[],[1],[1,1,4]],[[],[],[1],[1,1,5]],[[],[],[1],[1,2,1]],[[],[],[1],[1,2,2]]] + +theorem patterns_16_8_9_verified : ∀ D ∈ patterns_16_8_9, PatternVerified 16 8 D := by + + simp only [patterns_16_8_9, List.forall_mem_cons] + + exact ⟨⟨certificate_1896, certificate_1896_valid⟩, ⟨⟨certificate_1897, certificate_1897_valid⟩, ⟨⟨certificate_1898, certificate_1898_valid⟩, ⟨⟨certificate_1899, certificate_1899_valid⟩, ⟨⟨certificate_1900, certificate_1900_valid⟩, ⟨⟨certificate_1901, certificate_1901_valid⟩, ⟨⟨certificate_1902, certificate_1902_valid⟩, ⟨⟨certificate_1903, certificate_1903_valid⟩, ⟨⟨certificate_1904, certificate_1904_valid⟩, ⟨⟨certificate_1905, certificate_1905_valid⟩, ⟨⟨certificate_1906, certificate_1906_valid⟩, ⟨⟨certificate_1907, certificate_1907_valid⟩, ⟨⟨certificate_1908, certificate_1908_valid⟩, ⟨⟨certificate_1909, certificate_1909_valid⟩, ⟨⟨certificate_1910, certificate_1910_valid⟩, ⟨⟨certificate_1911, certificate_1911_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_10 : List (List (List ℕ)) := [[[],[],[1],[1,2,3]],[[],[],[1],[1,2,4]],[[],[],[1],[1,3,1]],[[],[],[1],[1,3,2]],[[],[],[1],[1,3,3]],[[],[],[1],[1,4,1]],[[],[],[1],[1,4,2]],[[],[],[1],[1,5,1]],[[],[],[1],[2],[2]],[[],[],[1],[2],[3]],[[],[],[1],[2],[4]],[[],[],[1],[2],[5]],[[],[],[1],[2,1,2]],[[],[],[1],[2,1,3]],[[],[],[1],[2,1,4]],[[],[],[1],[2,2,2]]] + +theorem patterns_16_8_10_verified : ∀ D ∈ patterns_16_8_10, PatternVerified 16 8 D := by + + simp only [patterns_16_8_10, List.forall_mem_cons] + + exact ⟨⟨certificate_1912, certificate_1912_valid⟩, ⟨⟨certificate_1913, certificate_1913_valid⟩, ⟨⟨certificate_1914, certificate_1914_valid⟩, ⟨⟨certificate_1915, certificate_1915_valid⟩, ⟨⟨certificate_1916, certificate_1916_valid⟩, ⟨⟨certificate_1917, certificate_1917_valid⟩, ⟨⟨certificate_1918, certificate_1918_valid⟩, ⟨⟨certificate_1919, certificate_1919_valid⟩, ⟨⟨certificate_1920, certificate_1920_valid⟩, ⟨⟨certificate_1921, certificate_1921_valid⟩, ⟨⟨certificate_1922, certificate_1922_valid⟩, ⟨⟨certificate_1923, certificate_1923_valid⟩, ⟨⟨certificate_1924, certificate_1924_valid⟩, ⟨⟨certificate_1925, certificate_1925_valid⟩, ⟨⟨certificate_1926, certificate_1926_valid⟩, ⟨⟨certificate_1927, certificate_1927_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_11 : List (List (List ℕ)) := [[[],[],[1],[2,2,3]],[[],[],[1],[2,3,2]],[[],[],[1],[3],[3]],[[],[],[1],[3],[4]],[[],[],[1],[3,1,3]],[[],[],[1,1],[1,1]],[[],[],[1,1],[1,2]],[[],[],[1,1],[1,3]],[[],[],[1,1],[1,4]],[[],[],[1,1],[1,5]],[[],[],[1,1],[2,2]],[[],[],[1,1],[2,3]],[[],[],[1,1],[2,4]],[[],[],[1,1],[3,3]],[[],[],[1,1,1],[2]],[[],[],[1,1,1],[3]]] + +theorem patterns_16_8_11_verified : ∀ D ∈ patterns_16_8_11, PatternVerified 16 8 D := by + + simp only [patterns_16_8_11, List.forall_mem_cons] + + exact ⟨⟨certificate_1928, certificate_1928_valid⟩, ⟨⟨certificate_1929, certificate_1929_valid⟩, ⟨⟨certificate_1930, certificate_1930_valid⟩, ⟨⟨certificate_1931, certificate_1931_valid⟩, ⟨⟨certificate_1932, certificate_1932_valid⟩, ⟨⟨certificate_1933, certificate_1933_valid⟩, ⟨⟨certificate_1934, certificate_1934_valid⟩, ⟨⟨certificate_1935, certificate_1935_valid⟩, ⟨⟨certificate_1936, certificate_1936_valid⟩, ⟨⟨certificate_1937, certificate_1937_valid⟩, ⟨⟨certificate_1938, certificate_1938_valid⟩, ⟨⟨certificate_1939, certificate_1939_valid⟩, ⟨⟨certificate_1940, certificate_1940_valid⟩, ⟨⟨certificate_1941, certificate_1941_valid⟩, ⟨⟨certificate_1942, certificate_1942_valid⟩, ⟨⟨certificate_1943, certificate_1943_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_12 : List (List (List ℕ)) := [[[],[],[1,1,1],[4]],[[],[],[1,1,1],[5]],[[],[],[1,1,1,1,1]],[[],[],[1,1,1,1,2]],[[],[],[1,1,1,1,3]],[[],[],[1,1,1,1,4]],[[],[],[1,1,1,2,1]],[[],[],[1,1,1,2,2]],[[],[],[1,1,1,2,3]],[[],[],[1,1,1,3,1]],[[],[],[1,1,1,3,2]],[[],[],[1,1,1,4,1]],[[],[],[1,1,2],[2]],[[],[],[1,1,2],[3]],[[],[],[1,1,2],[4]],[[],[],[1,1,2,1,1]]] + +theorem patterns_16_8_12_verified : ∀ D ∈ patterns_16_8_12, PatternVerified 16 8 D := by + + simp only [patterns_16_8_12, List.forall_mem_cons] + + exact ⟨⟨certificate_1944, certificate_1944_valid⟩, ⟨⟨certificate_1945, certificate_1945_valid⟩, ⟨⟨certificate_1946, certificate_1946_valid⟩, ⟨⟨certificate_1947, certificate_1947_valid⟩, ⟨⟨certificate_1948, certificate_1948_valid⟩, ⟨⟨certificate_1949, certificate_1949_valid⟩, ⟨⟨certificate_1950, certificate_1950_valid⟩, ⟨⟨certificate_1951, certificate_1951_valid⟩, ⟨⟨certificate_1952, certificate_1952_valid⟩, ⟨⟨certificate_1953, certificate_1953_valid⟩, ⟨⟨certificate_1954, certificate_1954_valid⟩, ⟨⟨certificate_1955, certificate_1955_valid⟩, ⟨⟨certificate_1956, certificate_1956_valid⟩, ⟨⟨certificate_1957, certificate_1957_valid⟩, ⟨⟨certificate_1958, certificate_1958_valid⟩, ⟨⟨certificate_1959, certificate_1959_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_13 : List (List (List ℕ)) := [[[],[],[1,1,2,1,2]],[[],[],[1,1,2,1,3]],[[],[],[1,1,2,2,1]],[[],[],[1,1,2,2,2]],[[],[],[1,1,2,3,1]],[[],[],[1,1,3],[2]],[[],[],[1,1,3],[3]],[[],[],[1,1,3,1,1]],[[],[],[1,1,3,1,2]],[[],[],[1,1,3,2,1]],[[],[],[1,1,4],[2]],[[],[],[1,1,4,1,1]],[[],[],[1,2],[1,2]],[[],[],[1,2],[1,3]],[[],[],[1,2],[1,4]],[[],[],[1,2],[2,2]]] + +theorem patterns_16_8_13_verified : ∀ D ∈ patterns_16_8_13, PatternVerified 16 8 D := by + + simp only [patterns_16_8_13, List.forall_mem_cons] + + exact ⟨⟨certificate_1960, certificate_1960_valid⟩, ⟨⟨certificate_1961, certificate_1961_valid⟩, ⟨⟨certificate_1962, certificate_1962_valid⟩, ⟨⟨certificate_1963, certificate_1963_valid⟩, ⟨⟨certificate_1964, certificate_1964_valid⟩, ⟨⟨certificate_1965, certificate_1965_valid⟩, ⟨⟨certificate_1966, certificate_1966_valid⟩, ⟨⟨certificate_1967, certificate_1967_valid⟩, ⟨⟨certificate_1968, certificate_1968_valid⟩, ⟨⟨certificate_1969, certificate_1969_valid⟩, ⟨⟨certificate_1970, certificate_1970_valid⟩, ⟨⟨certificate_1971, certificate_1971_valid⟩, ⟨⟨certificate_1972, certificate_1972_valid⟩, ⟨⟨certificate_1973, certificate_1973_valid⟩, ⟨⟨certificate_1974, certificate_1974_valid⟩, ⟨⟨certificate_1975, certificate_1975_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_14 : List (List (List ℕ)) := [[[],[],[1,2],[2,3]],[[],[],[1,2,1],[2]],[[],[],[1,2,1],[3]],[[],[],[1,2,1],[4]],[[],[],[1,2,1,1,2]],[[],[],[1,2,1,1,3]],[[],[],[1,2,1,2,1]],[[],[],[1,2,1,2,2]],[[],[],[1,2,1,3,1]],[[],[],[1,2,2],[2]],[[],[],[1,2,2],[3]],[[],[],[1,2,2,1,2]],[[],[],[1,2,2,2,1]],[[],[],[1,2,3],[2]],[[],[],[1,3],[1,3]],[[],[],[1,3],[2,2]]] + +theorem patterns_16_8_14_verified : ∀ D ∈ patterns_16_8_14, PatternVerified 16 8 D := by + + simp only [patterns_16_8_14, List.forall_mem_cons] + + exact ⟨⟨certificate_1976, certificate_1976_valid⟩, ⟨⟨certificate_1977, certificate_1977_valid⟩, ⟨⟨certificate_1978, certificate_1978_valid⟩, ⟨⟨certificate_1979, certificate_1979_valid⟩, ⟨⟨certificate_1980, certificate_1980_valid⟩, ⟨⟨certificate_1981, certificate_1981_valid⟩, ⟨⟨certificate_1982, certificate_1982_valid⟩, ⟨⟨certificate_1983, certificate_1983_valid⟩, ⟨⟨certificate_1984, certificate_1984_valid⟩, ⟨⟨certificate_1985, certificate_1985_valid⟩, ⟨⟨certificate_1986, certificate_1986_valid⟩, ⟨⟨certificate_1987, certificate_1987_valid⟩, ⟨⟨certificate_1988, certificate_1988_valid⟩, ⟨⟨certificate_1989, certificate_1989_valid⟩, ⟨⟨certificate_1990, certificate_1990_valid⟩, ⟨⟨certificate_1991, certificate_1991_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_15 : List (List (List ℕ)) := [[[],[],[1,3,1],[2]],[[],[],[1,3,1],[3]],[[],[],[1,3,1,1,2]],[[],[],[1,3,2],[2]],[[],[],[1,4,1],[2]],[[],[],[2],[2],[2]],[[],[],[2],[2],[3]],[[],[],[2],[2],[4]],[[],[],[2],[2,1,2]],[[],[],[2],[2,1,3]],[[],[],[2],[2,2,2]],[[],[],[2],[3],[3]],[[],[],[2,1,1,1,2]],[[],[],[2,1,1,1,3]],[[],[],[2,1,1,2,2]],[[],[],[2,1,2],[3]]] + +theorem patterns_16_8_15_verified : ∀ D ∈ patterns_16_8_15, PatternVerified 16 8 D := by + + simp only [patterns_16_8_15, List.forall_mem_cons] + + exact ⟨⟨certificate_1992, certificate_1992_valid⟩, ⟨⟨certificate_1993, certificate_1993_valid⟩, ⟨⟨certificate_1994, certificate_1994_valid⟩, ⟨⟨certificate_1995, certificate_1995_valid⟩, ⟨⟨certificate_1996, certificate_1996_valid⟩, ⟨⟨certificate_1997, certificate_1997_valid⟩, ⟨⟨certificate_1998, certificate_1998_valid⟩, ⟨⟨certificate_1999, certificate_1999_valid⟩, ⟨⟨certificate_2000, certificate_2000_valid⟩, ⟨⟨certificate_2001, certificate_2001_valid⟩, ⟨⟨certificate_2002, certificate_2002_valid⟩, ⟨⟨certificate_2003, certificate_2003_valid⟩, ⟨⟨certificate_2004, certificate_2004_valid⟩, ⟨⟨certificate_2005, certificate_2005_valid⟩, ⟨⟨certificate_2006, certificate_2006_valid⟩, ⟨⟨certificate_2007, certificate_2007_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_16 : List (List (List ℕ)) := [[[],[],[2,1,2,1,2]],[[],[],[2,2],[2,2]],[[],[1],[1],[1,1]],[[],[1],[1],[1,2]],[[],[1],[1],[1,3]],[[],[1],[1],[1,4]],[[],[1],[1],[1,5]],[[],[1],[1],[2,2]],[[],[1],[1],[2,3]],[[],[1],[1],[2,4]],[[],[1],[1],[3,3]],[[],[1],[1,1],[2]],[[],[1],[1,1],[3]],[[],[1],[1,1],[4]],[[],[1],[1,1],[5]],[[],[1],[1,1,1,1]]] + +theorem patterns_16_8_16_verified : ∀ D ∈ patterns_16_8_16, PatternVerified 16 8 D := by + + simp only [patterns_16_8_16, List.forall_mem_cons] + + exact ⟨⟨certificate_2008, certificate_2008_valid⟩, ⟨⟨certificate_2009, certificate_2009_valid⟩, ⟨⟨certificate_2010, certificate_2010_valid⟩, ⟨⟨certificate_2011, certificate_2011_valid⟩, ⟨⟨certificate_2012, certificate_2012_valid⟩, ⟨⟨certificate_2013, certificate_2013_valid⟩, ⟨⟨certificate_2014, certificate_2014_valid⟩, ⟨⟨certificate_2015, certificate_2015_valid⟩, ⟨⟨certificate_2016, certificate_2016_valid⟩, ⟨⟨certificate_2017, certificate_2017_valid⟩, ⟨⟨certificate_2018, certificate_2018_valid⟩, ⟨⟨certificate_2019, certificate_2019_valid⟩, ⟨⟨certificate_2020, certificate_2020_valid⟩, ⟨⟨certificate_2021, certificate_2021_valid⟩, ⟨⟨certificate_2022, certificate_2022_valid⟩, ⟨⟨certificate_2023, certificate_2023_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_17 : List (List (List ℕ)) := [[[],[1],[1,1,1,2]],[[],[1],[1,1,1,3]],[[],[1],[1,1,1,4]],[[],[1],[1,1,2,1]],[[],[1],[1,1,2,2]],[[],[1],[1,1,2,3]],[[],[1],[1,1,3,1]],[[],[1],[1,1,3,2]],[[],[1],[1,1,4,1]],[[],[1],[1,2],[2]],[[],[1],[1,2],[3]],[[],[1],[1,2],[4]],[[],[1],[1,2,1,2]],[[],[1],[1,2,1,3]],[[],[1],[1,2,2,1]],[[],[1],[1,2,2,2]]] + +theorem patterns_16_8_17_verified : ∀ D ∈ patterns_16_8_17, PatternVerified 16 8 D := by + + simp only [patterns_16_8_17, List.forall_mem_cons] + + exact ⟨⟨certificate_2024, certificate_2024_valid⟩, ⟨⟨certificate_2025, certificate_2025_valid⟩, ⟨⟨certificate_2026, certificate_2026_valid⟩, ⟨⟨certificate_2027, certificate_2027_valid⟩, ⟨⟨certificate_2028, certificate_2028_valid⟩, ⟨⟨certificate_2029, certificate_2029_valid⟩, ⟨⟨certificate_2030, certificate_2030_valid⟩, ⟨⟨certificate_2031, certificate_2031_valid⟩, ⟨⟨certificate_2032, certificate_2032_valid⟩, ⟨⟨certificate_2033, certificate_2033_valid⟩, ⟨⟨certificate_2034, certificate_2034_valid⟩, ⟨⟨certificate_2035, certificate_2035_valid⟩, ⟨⟨certificate_2036, certificate_2036_valid⟩, ⟨⟨certificate_2037, certificate_2037_valid⟩, ⟨⟨certificate_2038, certificate_2038_valid⟩, ⟨⟨certificate_2039, certificate_2039_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_18 : List (List (List ℕ)) := [[[],[1],[1,2,3,1]],[[],[1],[1,3],[2]],[[],[1],[1,3],[3]],[[],[1],[1,3,1,2]],[[],[1],[1,4],[2]],[[],[1],[2],[2,2]],[[],[1],[2],[2,3]],[[],[1],[2,1,1,2]],[[],[1],[2,1,1,3]],[[],[1],[2,1,2,2]],[[],[1],[2,2],[3]],[[],[1,1],[1,1,1]],[[],[1,1],[1,1,2]],[[],[1,1],[1,1,3]],[[],[1,1],[1,1,4]],[[],[1,1],[1,2,1]]] + +theorem patterns_16_8_18_verified : ∀ D ∈ patterns_16_8_18, PatternVerified 16 8 D := by + + simp only [patterns_16_8_18, List.forall_mem_cons] + + exact ⟨⟨certificate_2040, certificate_2040_valid⟩, ⟨⟨certificate_2041, certificate_2041_valid⟩, ⟨⟨certificate_2042, certificate_2042_valid⟩, ⟨⟨certificate_2043, certificate_2043_valid⟩, ⟨⟨certificate_2044, certificate_2044_valid⟩, ⟨⟨certificate_2045, certificate_2045_valid⟩, ⟨⟨certificate_2046, certificate_2046_valid⟩, ⟨⟨certificate_2047, certificate_2047_valid⟩, ⟨⟨certificate_2048, certificate_2048_valid⟩, ⟨⟨certificate_2049, certificate_2049_valid⟩, ⟨⟨certificate_2050, certificate_2050_valid⟩, ⟨⟨certificate_2051, certificate_2051_valid⟩, ⟨⟨certificate_2052, certificate_2052_valid⟩, ⟨⟨certificate_2053, certificate_2053_valid⟩, ⟨⟨certificate_2054, certificate_2054_valid⟩, ⟨⟨certificate_2055, certificate_2055_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_19 : List (List (List ℕ)) := [[[],[1,1],[1,2,2]],[[],[1,1],[1,2,3]],[[],[1,1],[1,3,1]],[[],[1,1],[1,3,2]],[[],[1,1],[1,4,1]],[[],[1,1],[2],[2]],[[],[1,1],[2],[3]],[[],[1,1],[2],[4]],[[],[1,1],[2,1,2]],[[],[1,1],[2,1,3]],[[],[1,1],[2,2,2]],[[],[1,1],[3],[3]],[[],[1,1,1],[1,2]],[[],[1,1,1],[1,3]],[[],[1,1,1],[1,4]],[[],[1,1,1],[2,2]]] + +theorem patterns_16_8_19_verified : ∀ D ∈ patterns_16_8_19, PatternVerified 16 8 D := by + + simp only [patterns_16_8_19, List.forall_mem_cons] + + exact ⟨⟨certificate_2056, certificate_2056_valid⟩, ⟨⟨certificate_2057, certificate_2057_valid⟩, ⟨⟨certificate_2058, certificate_2058_valid⟩, ⟨⟨certificate_2059, certificate_2059_valid⟩, ⟨⟨certificate_2060, certificate_2060_valid⟩, ⟨⟨certificate_2061, certificate_2061_valid⟩, ⟨⟨certificate_2062, certificate_2062_valid⟩, ⟨⟨certificate_2063, certificate_2063_valid⟩, ⟨⟨certificate_2064, certificate_2064_valid⟩, ⟨⟨certificate_2065, certificate_2065_valid⟩, ⟨⟨certificate_2066, certificate_2066_valid⟩, ⟨⟨certificate_2067, certificate_2067_valid⟩, ⟨⟨certificate_2068, certificate_2068_valid⟩, ⟨⟨certificate_2069, certificate_2069_valid⟩, ⟨⟨certificate_2070, certificate_2070_valid⟩, ⟨⟨certificate_2071, certificate_2071_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_20 : List (List (List ℕ)) := [[[],[1,1,1],[2,3]],[[],[1,1,1,1],[2]],[[],[1,1,1,1],[3]],[[],[1,1,1,1],[4]],[[],[1,1,1,1,1,1]],[[],[1,1,1,1,1,2]],[[],[1,1,1,1,1,3]],[[],[1,1,1,1,2,1]],[[],[1,1,1,1,2,2]],[[],[1,1,1,1,3,1]],[[],[1,1,1,2],[2]],[[],[1,1,1,2],[3]],[[],[1,1,1,2,1,1]],[[],[1,1,1,2,1,2]],[[],[1,1,1,2,2,1]],[[],[1,1,1,3],[2]]] + +theorem patterns_16_8_20_verified : ∀ D ∈ patterns_16_8_20, PatternVerified 16 8 D := by + + simp only [patterns_16_8_20, List.forall_mem_cons] + + exact ⟨⟨certificate_2072, certificate_2072_valid⟩, ⟨⟨certificate_2073, certificate_2073_valid⟩, ⟨⟨certificate_2074, certificate_2074_valid⟩, ⟨⟨certificate_2075, certificate_2075_valid⟩, ⟨⟨certificate_2076, certificate_2076_valid⟩, ⟨⟨certificate_2077, certificate_2077_valid⟩, ⟨⟨certificate_2078, certificate_2078_valid⟩, ⟨⟨certificate_2079, certificate_2079_valid⟩, ⟨⟨certificate_2080, certificate_2080_valid⟩, ⟨⟨certificate_2081, certificate_2081_valid⟩, ⟨⟨certificate_2082, certificate_2082_valid⟩, ⟨⟨certificate_2083, certificate_2083_valid⟩, ⟨⟨certificate_2084, certificate_2084_valid⟩, ⟨⟨certificate_2085, certificate_2085_valid⟩, ⟨⟨certificate_2086, certificate_2086_valid⟩, ⟨⟨certificate_2087, certificate_2087_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_21 : List (List (List ℕ)) := [[[],[1,1,1,3,1,1]],[[],[1,1,2],[1,2]],[[],[1,1,2],[1,3]],[[],[1,1,2],[2,2]],[[],[1,1,2,1],[2]],[[],[1,1,2,1],[3]],[[],[1,1,2,1,1,2]],[[],[1,1,2,1,2,1]],[[],[1,1,2,2],[2]],[[],[1,1,2,2,1,1]],[[],[1,1,3],[1,2]],[[],[1,1,3,1],[2]],[[],[1,2],[1,2,1]],[[],[1,2],[1,2,2]],[[],[1,2],[1,3,1]],[[],[1,2],[2],[2]]] + +theorem patterns_16_8_21_verified : ∀ D ∈ patterns_16_8_21, PatternVerified 16 8 D := by + + simp only [patterns_16_8_21, List.forall_mem_cons] + + exact ⟨⟨certificate_2088, certificate_2088_valid⟩, ⟨⟨certificate_2089, certificate_2089_valid⟩, ⟨⟨certificate_2090, certificate_2090_valid⟩, ⟨⟨certificate_2091, certificate_2091_valid⟩, ⟨⟨certificate_2092, certificate_2092_valid⟩, ⟨⟨certificate_2093, certificate_2093_valid⟩, ⟨⟨certificate_2094, certificate_2094_valid⟩, ⟨⟨certificate_2095, certificate_2095_valid⟩, ⟨⟨certificate_2096, certificate_2096_valid⟩, ⟨⟨certificate_2097, certificate_2097_valid⟩, ⟨⟨certificate_2098, certificate_2098_valid⟩, ⟨⟨certificate_2099, certificate_2099_valid⟩, ⟨⟨certificate_2100, certificate_2100_valid⟩, ⟨⟨certificate_2101, certificate_2101_valid⟩, ⟨⟨certificate_2102, certificate_2102_valid⟩, ⟨⟨certificate_2103, certificate_2103_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_22 : List (List (List ℕ)) := [[[],[1,2],[2],[3]],[[],[1,2],[2,1,2]],[[],[1,2,1],[1,3]],[[],[1,2,1],[2,2]],[[],[1,2,1,1,1,2]],[[],[1,2,1,1,2,1]],[[],[1,2,1,2],[2]],[[],[1,2,2,1],[2]],[[],[1,3],[2],[2]],[[],[2],[2],[2,2]],[[],[2],[2,1,1,2]],[[],[2,1,1,1,1,2]],[[1],[1],[1],[1]],[[1],[1],[1],[2]],[[1],[1],[1],[3]],[[1],[1],[1],[4]]] + +theorem patterns_16_8_22_verified : ∀ D ∈ patterns_16_8_22, PatternVerified 16 8 D := by + + simp only [patterns_16_8_22, List.forall_mem_cons] + + exact ⟨⟨certificate_2104, certificate_2104_valid⟩, ⟨⟨certificate_2105, certificate_2105_valid⟩, ⟨⟨certificate_2106, certificate_2106_valid⟩, ⟨⟨certificate_2107, certificate_2107_valid⟩, ⟨⟨certificate_2108, certificate_2108_valid⟩, ⟨⟨certificate_2109, certificate_2109_valid⟩, ⟨⟨certificate_2110, certificate_2110_valid⟩, ⟨⟨certificate_2111, certificate_2111_valid⟩, ⟨⟨certificate_2112, certificate_2112_valid⟩, ⟨⟨certificate_2113, certificate_2113_valid⟩, ⟨⟨certificate_2114, certificate_2114_valid⟩, ⟨⟨certificate_2115, certificate_2115_valid⟩, ⟨⟨certificate_2116, certificate_2116_valid⟩, ⟨⟨certificate_2117, certificate_2117_valid⟩, ⟨⟨certificate_2118, certificate_2118_valid⟩, ⟨⟨certificate_2119, certificate_2119_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_23 : List (List (List ℕ)) := [[[1],[1],[1],[5]],[[1],[1],[1,1,1]],[[1],[1],[1,1,2]],[[1],[1],[1,1,3]],[[1],[1],[1,1,4]],[[1],[1],[1,2,1]],[[1],[1],[1,2,2]],[[1],[1],[1,2,3]],[[1],[1],[1,3,1]],[[1],[1],[1,3,2]],[[1],[1],[1,4,1]],[[1],[1],[2],[2]],[[1],[1],[2],[3]],[[1],[1],[2],[4]],[[1],[1],[2,1,2]],[[1],[1],[2,1,3]]] + +theorem patterns_16_8_23_verified : ∀ D ∈ patterns_16_8_23, PatternVerified 16 8 D := by + + simp only [patterns_16_8_23, List.forall_mem_cons] + + exact ⟨⟨certificate_2120, certificate_2120_valid⟩, ⟨⟨certificate_2121, certificate_2121_valid⟩, ⟨⟨certificate_2122, certificate_2122_valid⟩, ⟨⟨certificate_2123, certificate_2123_valid⟩, ⟨⟨certificate_2124, certificate_2124_valid⟩, ⟨⟨certificate_2125, certificate_2125_valid⟩, ⟨⟨certificate_2126, certificate_2126_valid⟩, ⟨⟨certificate_2127, certificate_2127_valid⟩, ⟨⟨certificate_2128, certificate_2128_valid⟩, ⟨⟨certificate_2129, certificate_2129_valid⟩, ⟨⟨certificate_2130, certificate_2130_valid⟩, ⟨⟨certificate_2131, certificate_2131_valid⟩, ⟨⟨certificate_2132, certificate_2132_valid⟩, ⟨⟨certificate_2133, certificate_2133_valid⟩, ⟨⟨certificate_2134, certificate_2134_valid⟩, ⟨⟨certificate_2135, certificate_2135_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_24 : List (List (List ℕ)) := [[[1],[1],[2,2,2]],[[1],[1],[3],[3]],[[1],[1,1],[1,1]],[[1],[1,1],[1,2]],[[1],[1,1],[1,3]],[[1],[1,1],[1,4]],[[1],[1,1],[2,2]],[[1],[1,1],[2,3]],[[1],[1,1,1],[2]],[[1],[1,1,1],[3]],[[1],[1,1,1],[4]],[[1],[1,1,1,1,1]],[[1],[1,1,1,1,2]],[[1],[1,1,1,1,3]],[[1],[1,1,1,2,1]],[[1],[1,1,1,2,2]]] + +theorem patterns_16_8_24_verified : ∀ D ∈ patterns_16_8_24, PatternVerified 16 8 D := by + + simp only [patterns_16_8_24, List.forall_mem_cons] + + exact ⟨⟨certificate_2136, certificate_2136_valid⟩, ⟨⟨certificate_2137, certificate_2137_valid⟩, ⟨⟨certificate_2138, certificate_2138_valid⟩, ⟨⟨certificate_2139, certificate_2139_valid⟩, ⟨⟨certificate_2140, certificate_2140_valid⟩, ⟨⟨certificate_2141, certificate_2141_valid⟩, ⟨⟨certificate_2142, certificate_2142_valid⟩, ⟨⟨certificate_2143, certificate_2143_valid⟩, ⟨⟨certificate_2144, certificate_2144_valid⟩, ⟨⟨certificate_2145, certificate_2145_valid⟩, ⟨⟨certificate_2146, certificate_2146_valid⟩, ⟨⟨certificate_2147, certificate_2147_valid⟩, ⟨⟨certificate_2148, certificate_2148_valid⟩, ⟨⟨certificate_2149, certificate_2149_valid⟩, ⟨⟨certificate_2150, certificate_2150_valid⟩, ⟨⟨certificate_2151, certificate_2151_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_25 : List (List (List ℕ)) := [[[1],[1,1,1,3,1]],[[1],[1,1,2],[2]],[[1],[1,1,2],[3]],[[1],[1,1,2,1,1]],[[1],[1,1,2,1,2]],[[1],[1,1,2,2,1]],[[1],[1,1,3],[2]],[[1],[1,1,3,1,1]],[[1],[1,2],[1,2]],[[1],[1,2],[1,3]],[[1],[1,2],[2,2]],[[1],[1,2,1],[2]],[[1],[1,2,1],[3]],[[1],[1,2,1,1,2]],[[1],[1,2,1,2,1]],[[1],[1,2,2],[2]]] + +theorem patterns_16_8_25_verified : ∀ D ∈ patterns_16_8_25, PatternVerified 16 8 D := by + + simp only [patterns_16_8_25, List.forall_mem_cons] + + exact ⟨⟨certificate_2152, certificate_2152_valid⟩, ⟨⟨certificate_2153, certificate_2153_valid⟩, ⟨⟨certificate_2154, certificate_2154_valid⟩, ⟨⟨certificate_2155, certificate_2155_valid⟩, ⟨⟨certificate_2156, certificate_2156_valid⟩, ⟨⟨certificate_2157, certificate_2157_valid⟩, ⟨⟨certificate_2158, certificate_2158_valid⟩, ⟨⟨certificate_2159, certificate_2159_valid⟩, ⟨⟨certificate_2160, certificate_2160_valid⟩, ⟨⟨certificate_2161, certificate_2161_valid⟩, ⟨⟨certificate_2162, certificate_2162_valid⟩, ⟨⟨certificate_2163, certificate_2163_valid⟩, ⟨⟨certificate_2164, certificate_2164_valid⟩, ⟨⟨certificate_2165, certificate_2165_valid⟩, ⟨⟨certificate_2166, certificate_2166_valid⟩, ⟨⟨certificate_2167, certificate_2167_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_26 : List (List (List ℕ)) := [[[1],[1,3,1],[2]],[[1],[2],[2],[2]],[[1],[2],[2],[3]],[[1],[2],[2,1,2]],[[1],[2,1,1,1,2]],[[1,1],[1,1],[2]],[[1,1],[1,1],[3]],[[1,1],[1,1],[4]],[[1,1],[1,1,1,1]],[[1,1],[1,1,1,2]],[[1,1],[1,1,1,3]],[[1,1],[1,1,2,1]],[[1,1],[1,1,2,2]],[[1,1],[1,1,3,1]],[[1,1],[1,2],[2]],[[1,1],[1,2],[3]]] + +theorem patterns_16_8_26_verified : ∀ D ∈ patterns_16_8_26, PatternVerified 16 8 D := by + + simp only [patterns_16_8_26, List.forall_mem_cons] + + exact ⟨⟨certificate_2168, certificate_2168_valid⟩, ⟨⟨certificate_2169, certificate_2169_valid⟩, ⟨⟨certificate_2170, certificate_2170_valid⟩, ⟨⟨certificate_2171, certificate_2171_valid⟩, ⟨⟨certificate_2172, certificate_2172_valid⟩, ⟨⟨certificate_2173, certificate_2173_valid⟩, ⟨⟨certificate_2174, certificate_2174_valid⟩, ⟨⟨certificate_2175, certificate_2175_valid⟩, ⟨⟨certificate_2176, certificate_2176_valid⟩, ⟨⟨certificate_2177, certificate_2177_valid⟩, ⟨⟨certificate_2178, certificate_2178_valid⟩, ⟨⟨certificate_2179, certificate_2179_valid⟩, ⟨⟨certificate_2180, certificate_2180_valid⟩, ⟨⟨certificate_2181, certificate_2181_valid⟩, ⟨⟨certificate_2182, certificate_2182_valid⟩, ⟨⟨certificate_2183, certificate_2183_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_27 : List (List (List ℕ)) := [[[1,1],[1,2,1,2]],[[1,1],[1,2,2,1]],[[1,1],[1,3],[2]],[[1,1],[2],[2,2]],[[1,1],[2,1,1,2]],[[1,1,1],[1,1,1]],[[1,1,1],[1,1,2]],[[1,1,1],[1,1,3]],[[1,1,1],[1,2,1]],[[1,1,1],[1,2,2]],[[1,1,1],[1,3,1]],[[1,1,1],[2],[2]],[[1,1,1],[2],[3]],[[1,1,1],[2,1,2]],[[1,1,1,1],[1,2]],[[1,1,1,1],[1,3]]] + +theorem patterns_16_8_27_verified : ∀ D ∈ patterns_16_8_27, PatternVerified 16 8 D := by + + simp only [patterns_16_8_27, List.forall_mem_cons] + + exact ⟨⟨certificate_2184, certificate_2184_valid⟩, ⟨⟨certificate_2185, certificate_2185_valid⟩, ⟨⟨certificate_2186, certificate_2186_valid⟩, ⟨⟨certificate_2187, certificate_2187_valid⟩, ⟨⟨certificate_2188, certificate_2188_valid⟩, ⟨⟨certificate_2189, certificate_2189_valid⟩, ⟨⟨certificate_2190, certificate_2190_valid⟩, ⟨⟨certificate_2191, certificate_2191_valid⟩, ⟨⟨certificate_2192, certificate_2192_valid⟩, ⟨⟨certificate_2193, certificate_2193_valid⟩, ⟨⟨certificate_2194, certificate_2194_valid⟩, ⟨⟨certificate_2195, certificate_2195_valid⟩, ⟨⟨certificate_2196, certificate_2196_valid⟩, ⟨⟨certificate_2197, certificate_2197_valid⟩, ⟨⟨certificate_2198, certificate_2198_valid⟩, ⟨⟨certificate_2199, certificate_2199_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_28 : List (List (List ℕ)) := [[[1,1,1,1],[2,2]],[[1,1,1,1,1],[2]],[[1,1,1,1,1],[3]],[[1,1,1,1,1,1,1]],[[1,1,1,1,1,1,2]],[[1,1,1,1,1,2,1]],[[1,1,1,1,2],[2]],[[1,1,1,1,2,1,1]],[[1,1,1,2],[1,2]],[[1,1,1,2,1],[2]],[[1,1,1,2,1,1,1]],[[1,1,2],[1,1,2]],[[1,1,2],[1,2,1]],[[1,1,2],[2],[2]],[[1,1,2,1],[1,2]],[[1,1,2,1,1],[2]]] + +theorem patterns_16_8_28_verified : ∀ D ∈ patterns_16_8_28, PatternVerified 16 8 D := by + + simp only [patterns_16_8_28, List.forall_mem_cons] + + exact ⟨⟨certificate_2200, certificate_2200_valid⟩, ⟨⟨certificate_2201, certificate_2201_valid⟩, ⟨⟨certificate_2202, certificate_2202_valid⟩, ⟨⟨certificate_2203, certificate_2203_valid⟩, ⟨⟨certificate_2204, certificate_2204_valid⟩, ⟨⟨certificate_2205, certificate_2205_valid⟩, ⟨⟨certificate_2206, certificate_2206_valid⟩, ⟨⟨certificate_2207, certificate_2207_valid⟩, ⟨⟨certificate_2208, certificate_2208_valid⟩, ⟨⟨certificate_2209, certificate_2209_valid⟩, ⟨⟨certificate_2210, certificate_2210_valid⟩, ⟨⟨certificate_2211, certificate_2211_valid⟩, ⟨⟨certificate_2212, certificate_2212_valid⟩, ⟨⟨certificate_2213, certificate_2213_valid⟩, ⟨⟨certificate_2214, certificate_2214_valid⟩, ⟨⟨certificate_2215, certificate_2215_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_16_8_29 : List (List (List ℕ)) := [[[1,2],[1,2],[2]],[[1,2,1],[1,2,1]],[[1,2,1],[2],[2]],[[2],[2],[2],[2]]] + +theorem patterns_16_8_29_verified : ∀ D ∈ patterns_16_8_29, PatternVerified 16 8 D := by + + simp only [patterns_16_8_29, List.forall_mem_cons] + + exact ⟨⟨certificate_2216, certificate_2216_valid⟩, ⟨⟨certificate_2217, certificate_2217_valid⟩, ⟨⟨certificate_2218, certificate_2218_valid⟩, ⟨⟨certificate_2219, certificate_2219_valid⟩, (by simp)⟩⟩⟩⟩ + +noncomputable def patterns_16_8 : List (List (List ℕ)) := patterns_16_8_0 ++ (patterns_16_8_1 ++ (patterns_16_8_2 ++ (patterns_16_8_3 ++ (patterns_16_8_4 ++ (patterns_16_8_5 ++ (patterns_16_8_6 ++ (patterns_16_8_7 ++ (patterns_16_8_8 ++ (patterns_16_8_9 ++ (patterns_16_8_10 ++ (patterns_16_8_11 ++ (patterns_16_8_12 ++ (patterns_16_8_13 ++ (patterns_16_8_14 ++ (patterns_16_8_15 ++ (patterns_16_8_16 ++ (patterns_16_8_17 ++ (patterns_16_8_18 ++ (patterns_16_8_19 ++ (patterns_16_8_20 ++ (patterns_16_8_21 ++ (patterns_16_8_22 ++ (patterns_16_8_23 ++ (patterns_16_8_24 ++ (patterns_16_8_25 ++ (patterns_16_8_26 ++ (patterns_16_8_27 ++ (patterns_16_8_28 ++ (patterns_16_8_29 ++ ([])))))))))))))))))))))))))))))) + +theorem patterns_16_8_verified : ∀ D ∈ patterns_16_8, PatternVerified 16 8 D := by + + simp only [patterns_16_8, List.forall_mem_append] + + exact ⟨patterns_16_8_0_verified, ⟨patterns_16_8_1_verified, ⟨patterns_16_8_2_verified, ⟨patterns_16_8_3_verified, ⟨patterns_16_8_4_verified, ⟨patterns_16_8_5_verified, ⟨patterns_16_8_6_verified, ⟨patterns_16_8_7_verified, ⟨patterns_16_8_8_verified, ⟨patterns_16_8_9_verified, ⟨patterns_16_8_10_verified, ⟨patterns_16_8_11_verified, ⟨patterns_16_8_12_verified, ⟨patterns_16_8_13_verified, ⟨patterns_16_8_14_verified, ⟨patterns_16_8_15_verified, ⟨patterns_16_8_16_verified, ⟨patterns_16_8_17_verified, ⟨patterns_16_8_18_verified, ⟨patterns_16_8_19_verified, ⟨patterns_16_8_20_verified, ⟨patterns_16_8_21_verified, ⟨patterns_16_8_22_verified, ⟨patterns_16_8_23_verified, ⟨patterns_16_8_24_verified, ⟨patterns_16_8_25_verified, ⟨patterns_16_8_26_verified, ⟨patterns_16_8_27_verified, ⟨patterns_16_8_28_verified, ⟨patterns_16_8_29_verified, by simp⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +theorem patterns_16_8_coverage : patternChoices 8 8 [] = patterns_16_8 := by decide +kernel + +theorem finite_patterns_16_8 : ∀ D ∈ patternChoices 8 (16-8) [], PatternVerified 16 8 D := by + + rw [patterns_16_8_coverage] + + exact patterns_16_8_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns17x8.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns17x8.lean new file mode 100644 index 0000000000000000000000000000000000000000..48e096652ce5c8a186615d6a08ddafb51073de34 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns17x8.lean @@ -0,0 +1,507 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates070 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates071 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates072 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates073 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates074 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates075 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates076 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates077 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates078 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates079 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates080 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates081 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates082 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates083 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates084 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates085 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates086 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates087 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates088 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates089 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates090 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates091 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates092 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates093 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates094 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates095 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates096 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates097 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_17_8_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[],[]],[[],[],[],[],[],[],[1]],[[],[],[],[],[],[],[2]],[[],[],[],[],[],[],[3]],[[],[],[],[],[],[],[4]],[[],[],[],[],[],[],[5]],[[],[],[],[],[],[],[6]],[[],[],[],[],[],[],[7]],[[],[],[],[],[],[],[8]],[[],[],[],[],[],[],[9]],[[],[],[],[],[],[1,1]],[[],[],[],[],[],[1,2]],[[],[],[],[],[],[1,3]],[[],[],[],[],[],[1,4]],[[],[],[],[],[],[1,5]],[[],[],[],[],[],[1,6]]] + +theorem patterns_17_8_0_verified : ∀ D ∈ patterns_17_8_0, PatternVerified 17 8 D := by + + simp only [patterns_17_8_0, List.forall_mem_cons] + + exact ⟨⟨certificate_2220, certificate_2220_valid⟩, ⟨⟨certificate_2221, certificate_2221_valid⟩, ⟨⟨certificate_2222, certificate_2222_valid⟩, ⟨⟨certificate_2223, certificate_2223_valid⟩, ⟨⟨certificate_2224, certificate_2224_valid⟩, ⟨⟨certificate_2225, certificate_2225_valid⟩, ⟨⟨certificate_2226, certificate_2226_valid⟩, ⟨⟨certificate_2227, certificate_2227_valid⟩, ⟨⟨certificate_2228, certificate_2228_valid⟩, ⟨⟨certificate_2229, certificate_2229_valid⟩, ⟨⟨certificate_2230, certificate_2230_valid⟩, ⟨⟨certificate_2231, certificate_2231_valid⟩, ⟨⟨certificate_2232, certificate_2232_valid⟩, ⟨⟨certificate_2233, certificate_2233_valid⟩, ⟨⟨certificate_2234, certificate_2234_valid⟩, ⟨⟨certificate_2235, certificate_2235_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_1 : List (List (List ℕ)) := [[[],[],[],[],[],[1,7]],[[],[],[],[],[],[1,8]],[[],[],[],[],[],[2,2]],[[],[],[],[],[],[2,3]],[[],[],[],[],[],[2,4]],[[],[],[],[],[],[2,5]],[[],[],[],[],[],[2,6]],[[],[],[],[],[],[2,7]],[[],[],[],[],[],[3,3]],[[],[],[],[],[],[3,4]],[[],[],[],[],[],[3,5]],[[],[],[],[],[],[3,6]],[[],[],[],[],[],[4,4]],[[],[],[],[],[],[4,5]],[[],[],[],[],[1],[1]],[[],[],[],[],[1],[2]]] + +theorem patterns_17_8_1_verified : ∀ D ∈ patterns_17_8_1, PatternVerified 17 8 D := by + + simp only [patterns_17_8_1, List.forall_mem_cons] + + exact ⟨⟨certificate_2236, certificate_2236_valid⟩, ⟨⟨certificate_2237, certificate_2237_valid⟩, ⟨⟨certificate_2238, certificate_2238_valid⟩, ⟨⟨certificate_2239, certificate_2239_valid⟩, ⟨⟨certificate_2240, certificate_2240_valid⟩, ⟨⟨certificate_2241, certificate_2241_valid⟩, ⟨⟨certificate_2242, certificate_2242_valid⟩, ⟨⟨certificate_2243, certificate_2243_valid⟩, ⟨⟨certificate_2244, certificate_2244_valid⟩, ⟨⟨certificate_2245, certificate_2245_valid⟩, ⟨⟨certificate_2246, certificate_2246_valid⟩, ⟨⟨certificate_2247, certificate_2247_valid⟩, ⟨⟨certificate_2248, certificate_2248_valid⟩, ⟨⟨certificate_2249, certificate_2249_valid⟩, ⟨⟨certificate_2250, certificate_2250_valid⟩, ⟨⟨certificate_2251, certificate_2251_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_2 : List (List (List ℕ)) := [[[],[],[],[],[1],[3]],[[],[],[],[],[1],[4]],[[],[],[],[],[1],[5]],[[],[],[],[],[1],[6]],[[],[],[],[],[1],[7]],[[],[],[],[],[1],[8]],[[],[],[],[],[1,1,1]],[[],[],[],[],[1,1,2]],[[],[],[],[],[1,1,3]],[[],[],[],[],[1,1,4]],[[],[],[],[],[1,1,5]],[[],[],[],[],[1,1,6]],[[],[],[],[],[1,1,7]],[[],[],[],[],[1,2,1]],[[],[],[],[],[1,2,2]],[[],[],[],[],[1,2,3]]] + +theorem patterns_17_8_2_verified : ∀ D ∈ patterns_17_8_2, PatternVerified 17 8 D := by + + simp only [patterns_17_8_2, List.forall_mem_cons] + + exact ⟨⟨certificate_2252, certificate_2252_valid⟩, ⟨⟨certificate_2253, certificate_2253_valid⟩, ⟨⟨certificate_2254, certificate_2254_valid⟩, ⟨⟨certificate_2255, certificate_2255_valid⟩, ⟨⟨certificate_2256, certificate_2256_valid⟩, ⟨⟨certificate_2257, certificate_2257_valid⟩, ⟨⟨certificate_2258, certificate_2258_valid⟩, ⟨⟨certificate_2259, certificate_2259_valid⟩, ⟨⟨certificate_2260, certificate_2260_valid⟩, ⟨⟨certificate_2261, certificate_2261_valid⟩, ⟨⟨certificate_2262, certificate_2262_valid⟩, ⟨⟨certificate_2263, certificate_2263_valid⟩, ⟨⟨certificate_2264, certificate_2264_valid⟩, ⟨⟨certificate_2265, certificate_2265_valid⟩, ⟨⟨certificate_2266, certificate_2266_valid⟩, ⟨⟨certificate_2267, certificate_2267_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_3 : List (List (List ℕ)) := [[[],[],[],[],[1,2,4]],[[],[],[],[],[1,2,5]],[[],[],[],[],[1,2,6]],[[],[],[],[],[1,3,1]],[[],[],[],[],[1,3,2]],[[],[],[],[],[1,3,3]],[[],[],[],[],[1,3,4]],[[],[],[],[],[1,3,5]],[[],[],[],[],[1,4,1]],[[],[],[],[],[1,4,2]],[[],[],[],[],[1,4,3]],[[],[],[],[],[1,4,4]],[[],[],[],[],[1,5,1]],[[],[],[],[],[1,5,2]],[[],[],[],[],[1,5,3]],[[],[],[],[],[1,6,1]]] + +theorem patterns_17_8_3_verified : ∀ D ∈ patterns_17_8_3, PatternVerified 17 8 D := by + + simp only [patterns_17_8_3, List.forall_mem_cons] + + exact ⟨⟨certificate_2268, certificate_2268_valid⟩, ⟨⟨certificate_2269, certificate_2269_valid⟩, ⟨⟨certificate_2270, certificate_2270_valid⟩, ⟨⟨certificate_2271, certificate_2271_valid⟩, ⟨⟨certificate_2272, certificate_2272_valid⟩, ⟨⟨certificate_2273, certificate_2273_valid⟩, ⟨⟨certificate_2274, certificate_2274_valid⟩, ⟨⟨certificate_2275, certificate_2275_valid⟩, ⟨⟨certificate_2276, certificate_2276_valid⟩, ⟨⟨certificate_2277, certificate_2277_valid⟩, ⟨⟨certificate_2278, certificate_2278_valid⟩, ⟨⟨certificate_2279, certificate_2279_valid⟩, ⟨⟨certificate_2280, certificate_2280_valid⟩, ⟨⟨certificate_2281, certificate_2281_valid⟩, ⟨⟨certificate_2282, certificate_2282_valid⟩, ⟨⟨certificate_2283, certificate_2283_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_4 : List (List (List ℕ)) := [[[],[],[],[],[1,6,2]],[[],[],[],[],[1,7,1]],[[],[],[],[],[2],[2]],[[],[],[],[],[2],[3]],[[],[],[],[],[2],[4]],[[],[],[],[],[2],[5]],[[],[],[],[],[2],[6]],[[],[],[],[],[2],[7]],[[],[],[],[],[2,1,2]],[[],[],[],[],[2,1,3]],[[],[],[],[],[2,1,4]],[[],[],[],[],[2,1,5]],[[],[],[],[],[2,1,6]],[[],[],[],[],[2,2,2]],[[],[],[],[],[2,2,3]],[[],[],[],[],[2,2,4]]] + +theorem patterns_17_8_4_verified : ∀ D ∈ patterns_17_8_4, PatternVerified 17 8 D := by + + simp only [patterns_17_8_4, List.forall_mem_cons] + + exact ⟨⟨certificate_2284, certificate_2284_valid⟩, ⟨⟨certificate_2285, certificate_2285_valid⟩, ⟨⟨certificate_2286, certificate_2286_valid⟩, ⟨⟨certificate_2287, certificate_2287_valid⟩, ⟨⟨certificate_2288, certificate_2288_valid⟩, ⟨⟨certificate_2289, certificate_2289_valid⟩, ⟨⟨certificate_2290, certificate_2290_valid⟩, ⟨⟨certificate_2291, certificate_2291_valid⟩, ⟨⟨certificate_2292, certificate_2292_valid⟩, ⟨⟨certificate_2293, certificate_2293_valid⟩, ⟨⟨certificate_2294, certificate_2294_valid⟩, ⟨⟨certificate_2295, certificate_2295_valid⟩, ⟨⟨certificate_2296, certificate_2296_valid⟩, ⟨⟨certificate_2297, certificate_2297_valid⟩, ⟨⟨certificate_2298, certificate_2298_valid⟩, ⟨⟨certificate_2299, certificate_2299_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_5 : List (List (List ℕ)) := [[[],[],[],[],[2,2,5]],[[],[],[],[],[2,3,2]],[[],[],[],[],[2,3,3]],[[],[],[],[],[2,3,4]],[[],[],[],[],[2,4,2]],[[],[],[],[],[2,4,3]],[[],[],[],[],[2,5,2]],[[],[],[],[],[3],[3]],[[],[],[],[],[3],[4]],[[],[],[],[],[3],[5]],[[],[],[],[],[3],[6]],[[],[],[],[],[3,1,3]],[[],[],[],[],[3,1,4]],[[],[],[],[],[3,1,5]],[[],[],[],[],[3,2,3]],[[],[],[],[],[3,2,4]]] + +theorem patterns_17_8_5_verified : ∀ D ∈ patterns_17_8_5, PatternVerified 17 8 D := by + + simp only [patterns_17_8_5, List.forall_mem_cons] + + exact ⟨⟨certificate_2300, certificate_2300_valid⟩, ⟨⟨certificate_2301, certificate_2301_valid⟩, ⟨⟨certificate_2302, certificate_2302_valid⟩, ⟨⟨certificate_2303, certificate_2303_valid⟩, ⟨⟨certificate_2304, certificate_2304_valid⟩, ⟨⟨certificate_2305, certificate_2305_valid⟩, ⟨⟨certificate_2306, certificate_2306_valid⟩, ⟨⟨certificate_2307, certificate_2307_valid⟩, ⟨⟨certificate_2308, certificate_2308_valid⟩, ⟨⟨certificate_2309, certificate_2309_valid⟩, ⟨⟨certificate_2310, certificate_2310_valid⟩, ⟨⟨certificate_2311, certificate_2311_valid⟩, ⟨⟨certificate_2312, certificate_2312_valid⟩, ⟨⟨certificate_2313, certificate_2313_valid⟩, ⟨⟨certificate_2314, certificate_2314_valid⟩, ⟨⟨certificate_2315, certificate_2315_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_6 : List (List (List ℕ)) := [[[],[],[],[],[3,3,3]],[[],[],[],[],[4],[4]],[[],[],[],[],[4],[5]],[[],[],[],[],[4,1,4]],[[],[],[],[1],[1,1]],[[],[],[],[1],[1,2]],[[],[],[],[1],[1,3]],[[],[],[],[1],[1,4]],[[],[],[],[1],[1,5]],[[],[],[],[1],[1,6]],[[],[],[],[1],[1,7]],[[],[],[],[1],[2,2]],[[],[],[],[1],[2,3]],[[],[],[],[1],[2,4]],[[],[],[],[1],[2,5]],[[],[],[],[1],[2,6]]] + +theorem patterns_17_8_6_verified : ∀ D ∈ patterns_17_8_6, PatternVerified 17 8 D := by + + simp only [patterns_17_8_6, List.forall_mem_cons] + + exact ⟨⟨certificate_2316, certificate_2316_valid⟩, ⟨⟨certificate_2317, certificate_2317_valid⟩, ⟨⟨certificate_2318, certificate_2318_valid⟩, ⟨⟨certificate_2319, certificate_2319_valid⟩, ⟨⟨certificate_2320, certificate_2320_valid⟩, ⟨⟨certificate_2321, certificate_2321_valid⟩, ⟨⟨certificate_2322, certificate_2322_valid⟩, ⟨⟨certificate_2323, certificate_2323_valid⟩, ⟨⟨certificate_2324, certificate_2324_valid⟩, ⟨⟨certificate_2325, certificate_2325_valid⟩, ⟨⟨certificate_2326, certificate_2326_valid⟩, ⟨⟨certificate_2327, certificate_2327_valid⟩, ⟨⟨certificate_2328, certificate_2328_valid⟩, ⟨⟨certificate_2329, certificate_2329_valid⟩, ⟨⟨certificate_2330, certificate_2330_valid⟩, ⟨⟨certificate_2331, certificate_2331_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_7 : List (List (List ℕ)) := [[[],[],[],[1],[3,3]],[[],[],[],[1],[3,4]],[[],[],[],[1],[3,5]],[[],[],[],[1],[4,4]],[[],[],[],[1,1],[2]],[[],[],[],[1,1],[3]],[[],[],[],[1,1],[4]],[[],[],[],[1,1],[5]],[[],[],[],[1,1],[6]],[[],[],[],[1,1],[7]],[[],[],[],[1,1,1,1]],[[],[],[],[1,1,1,2]],[[],[],[],[1,1,1,3]],[[],[],[],[1,1,1,4]],[[],[],[],[1,1,1,5]],[[],[],[],[1,1,1,6]]] + +theorem patterns_17_8_7_verified : ∀ D ∈ patterns_17_8_7, PatternVerified 17 8 D := by + + simp only [patterns_17_8_7, List.forall_mem_cons] + + exact ⟨⟨certificate_2332, certificate_2332_valid⟩, ⟨⟨certificate_2333, certificate_2333_valid⟩, ⟨⟨certificate_2334, certificate_2334_valid⟩, ⟨⟨certificate_2335, certificate_2335_valid⟩, ⟨⟨certificate_2336, certificate_2336_valid⟩, ⟨⟨certificate_2337, certificate_2337_valid⟩, ⟨⟨certificate_2338, certificate_2338_valid⟩, ⟨⟨certificate_2339, certificate_2339_valid⟩, ⟨⟨certificate_2340, certificate_2340_valid⟩, ⟨⟨certificate_2341, certificate_2341_valid⟩, ⟨⟨certificate_2342, certificate_2342_valid⟩, ⟨⟨certificate_2343, certificate_2343_valid⟩, ⟨⟨certificate_2344, certificate_2344_valid⟩, ⟨⟨certificate_2345, certificate_2345_valid⟩, ⟨⟨certificate_2346, certificate_2346_valid⟩, ⟨⟨certificate_2347, certificate_2347_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_8 : List (List (List ℕ)) := [[[],[],[],[1,1,2,1]],[[],[],[],[1,1,2,2]],[[],[],[],[1,1,2,3]],[[],[],[],[1,1,2,4]],[[],[],[],[1,1,2,5]],[[],[],[],[1,1,3,1]],[[],[],[],[1,1,3,2]],[[],[],[],[1,1,3,3]],[[],[],[],[1,1,3,4]],[[],[],[],[1,1,4,1]],[[],[],[],[1,1,4,2]],[[],[],[],[1,1,4,3]],[[],[],[],[1,1,5,1]],[[],[],[],[1,1,5,2]],[[],[],[],[1,1,6,1]],[[],[],[],[1,2],[2]]] + +theorem patterns_17_8_8_verified : ∀ D ∈ patterns_17_8_8, PatternVerified 17 8 D := by + + simp only [patterns_17_8_8, List.forall_mem_cons] + + exact ⟨⟨certificate_2348, certificate_2348_valid⟩, ⟨⟨certificate_2349, certificate_2349_valid⟩, ⟨⟨certificate_2350, certificate_2350_valid⟩, ⟨⟨certificate_2351, certificate_2351_valid⟩, ⟨⟨certificate_2352, certificate_2352_valid⟩, ⟨⟨certificate_2353, certificate_2353_valid⟩, ⟨⟨certificate_2354, certificate_2354_valid⟩, ⟨⟨certificate_2355, certificate_2355_valid⟩, ⟨⟨certificate_2356, certificate_2356_valid⟩, ⟨⟨certificate_2357, certificate_2357_valid⟩, ⟨⟨certificate_2358, certificate_2358_valid⟩, ⟨⟨certificate_2359, certificate_2359_valid⟩, ⟨⟨certificate_2360, certificate_2360_valid⟩, ⟨⟨certificate_2361, certificate_2361_valid⟩, ⟨⟨certificate_2362, certificate_2362_valid⟩, ⟨⟨certificate_2363, certificate_2363_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_9 : List (List (List ℕ)) := [[[],[],[],[1,2],[3]],[[],[],[],[1,2],[4]],[[],[],[],[1,2],[5]],[[],[],[],[1,2],[6]],[[],[],[],[1,2,1,2]],[[],[],[],[1,2,1,3]],[[],[],[],[1,2,1,4]],[[],[],[],[1,2,1,5]],[[],[],[],[1,2,2,1]],[[],[],[],[1,2,2,2]],[[],[],[],[1,2,2,3]],[[],[],[],[1,2,2,4]],[[],[],[],[1,2,3,1]],[[],[],[],[1,2,3,2]],[[],[],[],[1,2,3,3]],[[],[],[],[1,2,4,1]]] + +theorem patterns_17_8_9_verified : ∀ D ∈ patterns_17_8_9, PatternVerified 17 8 D := by + + simp only [patterns_17_8_9, List.forall_mem_cons] + + exact ⟨⟨certificate_2364, certificate_2364_valid⟩, ⟨⟨certificate_2365, certificate_2365_valid⟩, ⟨⟨certificate_2366, certificate_2366_valid⟩, ⟨⟨certificate_2367, certificate_2367_valid⟩, ⟨⟨certificate_2368, certificate_2368_valid⟩, ⟨⟨certificate_2369, certificate_2369_valid⟩, ⟨⟨certificate_2370, certificate_2370_valid⟩, ⟨⟨certificate_2371, certificate_2371_valid⟩, ⟨⟨certificate_2372, certificate_2372_valid⟩, ⟨⟨certificate_2373, certificate_2373_valid⟩, ⟨⟨certificate_2374, certificate_2374_valid⟩, ⟨⟨certificate_2375, certificate_2375_valid⟩, ⟨⟨certificate_2376, certificate_2376_valid⟩, ⟨⟨certificate_2377, certificate_2377_valid⟩, ⟨⟨certificate_2378, certificate_2378_valid⟩, ⟨⟨certificate_2379, certificate_2379_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_10 : List (List (List ℕ)) := [[[],[],[],[1,2,4,2]],[[],[],[],[1,2,5,1]],[[],[],[],[1,3],[2]],[[],[],[],[1,3],[3]],[[],[],[],[1,3],[4]],[[],[],[],[1,3],[5]],[[],[],[],[1,3,1,2]],[[],[],[],[1,3,1,3]],[[],[],[],[1,3,1,4]],[[],[],[],[1,3,2,2]],[[],[],[],[1,3,2,3]],[[],[],[],[1,3,3,1]],[[],[],[],[1,3,3,2]],[[],[],[],[1,3,4,1]],[[],[],[],[1,4],[2]],[[],[],[],[1,4],[3]]] + +theorem patterns_17_8_10_verified : ∀ D ∈ patterns_17_8_10, PatternVerified 17 8 D := by + + simp only [patterns_17_8_10, List.forall_mem_cons] + + exact ⟨⟨certificate_2380, certificate_2380_valid⟩, ⟨⟨certificate_2381, certificate_2381_valid⟩, ⟨⟨certificate_2382, certificate_2382_valid⟩, ⟨⟨certificate_2383, certificate_2383_valid⟩, ⟨⟨certificate_2384, certificate_2384_valid⟩, ⟨⟨certificate_2385, certificate_2385_valid⟩, ⟨⟨certificate_2386, certificate_2386_valid⟩, ⟨⟨certificate_2387, certificate_2387_valid⟩, ⟨⟨certificate_2388, certificate_2388_valid⟩, ⟨⟨certificate_2389, certificate_2389_valid⟩, ⟨⟨certificate_2390, certificate_2390_valid⟩, ⟨⟨certificate_2391, certificate_2391_valid⟩, ⟨⟨certificate_2392, certificate_2392_valid⟩, ⟨⟨certificate_2393, certificate_2393_valid⟩, ⟨⟨certificate_2394, certificate_2394_valid⟩, ⟨⟨certificate_2395, certificate_2395_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_11 : List (List (List ℕ)) := [[[],[],[],[1,4],[4]],[[],[],[],[1,4,1,2]],[[],[],[],[1,4,1,3]],[[],[],[],[1,4,2,2]],[[],[],[],[1,5],[2]],[[],[],[],[1,5],[3]],[[],[],[],[1,5,1,2]],[[],[],[],[1,6],[2]],[[],[],[],[2],[2,2]],[[],[],[],[2],[2,3]],[[],[],[],[2],[2,4]],[[],[],[],[2],[2,5]],[[],[],[],[2],[3,3]],[[],[],[],[2],[3,4]],[[],[],[],[2,1,1,2]],[[],[],[],[2,1,1,3]]] + +theorem patterns_17_8_11_verified : ∀ D ∈ patterns_17_8_11, PatternVerified 17 8 D := by + + simp only [patterns_17_8_11, List.forall_mem_cons] + + exact ⟨⟨certificate_2396, certificate_2396_valid⟩, ⟨⟨certificate_2397, certificate_2397_valid⟩, ⟨⟨certificate_2398, certificate_2398_valid⟩, ⟨⟨certificate_2399, certificate_2399_valid⟩, ⟨⟨certificate_2400, certificate_2400_valid⟩, ⟨⟨certificate_2401, certificate_2401_valid⟩, ⟨⟨certificate_2402, certificate_2402_valid⟩, ⟨⟨certificate_2403, certificate_2403_valid⟩, ⟨⟨certificate_2404, certificate_2404_valid⟩, ⟨⟨certificate_2405, certificate_2405_valid⟩, ⟨⟨certificate_2406, certificate_2406_valid⟩, ⟨⟨certificate_2407, certificate_2407_valid⟩, ⟨⟨certificate_2408, certificate_2408_valid⟩, ⟨⟨certificate_2409, certificate_2409_valid⟩, ⟨⟨certificate_2410, certificate_2410_valid⟩, ⟨⟨certificate_2411, certificate_2411_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_12 : List (List (List ℕ)) := [[[],[],[],[2,1,1,4]],[[],[],[],[2,1,1,5]],[[],[],[],[2,1,2,2]],[[],[],[],[2,1,2,3]],[[],[],[],[2,1,2,4]],[[],[],[],[2,1,3,2]],[[],[],[],[2,1,3,3]],[[],[],[],[2,1,4,2]],[[],[],[],[2,2],[3]],[[],[],[],[2,2],[4]],[[],[],[],[2,2],[5]],[[],[],[],[2,2,1,3]],[[],[],[],[2,2,1,4]],[[],[],[],[2,2,2,2]],[[],[],[],[2,2,2,3]],[[],[],[],[2,2,3,2]]] + +theorem patterns_17_8_12_verified : ∀ D ∈ patterns_17_8_12, PatternVerified 17 8 D := by + + simp only [patterns_17_8_12, List.forall_mem_cons] + + exact ⟨⟨certificate_2412, certificate_2412_valid⟩, ⟨⟨certificate_2413, certificate_2413_valid⟩, ⟨⟨certificate_2414, certificate_2414_valid⟩, ⟨⟨certificate_2415, certificate_2415_valid⟩, ⟨⟨certificate_2416, certificate_2416_valid⟩, ⟨⟨certificate_2417, certificate_2417_valid⟩, ⟨⟨certificate_2418, certificate_2418_valid⟩, ⟨⟨certificate_2419, certificate_2419_valid⟩, ⟨⟨certificate_2420, certificate_2420_valid⟩, ⟨⟨certificate_2421, certificate_2421_valid⟩, ⟨⟨certificate_2422, certificate_2422_valid⟩, ⟨⟨certificate_2423, certificate_2423_valid⟩, ⟨⟨certificate_2424, certificate_2424_valid⟩, ⟨⟨certificate_2425, certificate_2425_valid⟩, ⟨⟨certificate_2426, certificate_2426_valid⟩, ⟨⟨certificate_2427, certificate_2427_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_13 : List (List (List ℕ)) := [[[],[],[],[2,3],[3]],[[],[],[],[2,3],[4]],[[],[],[],[2,3,1,3]],[[],[],[],[2,4],[3]],[[],[],[],[3],[3,3]],[[],[],[],[3,1,1,3]],[[],[],[],[3,1,1,4]],[[],[],[],[3,1,2,3]],[[],[],[1],[1],[1]],[[],[],[1],[1],[2]],[[],[],[1],[1],[3]],[[],[],[1],[1],[4]],[[],[],[1],[1],[5]],[[],[],[1],[1],[6]],[[],[],[1],[1],[7]],[[],[],[1],[1,1,1]]] + +theorem patterns_17_8_13_verified : ∀ D ∈ patterns_17_8_13, PatternVerified 17 8 D := by + + simp only [patterns_17_8_13, List.forall_mem_cons] + + exact ⟨⟨certificate_2428, certificate_2428_valid⟩, ⟨⟨certificate_2429, certificate_2429_valid⟩, ⟨⟨certificate_2430, certificate_2430_valid⟩, ⟨⟨certificate_2431, certificate_2431_valid⟩, ⟨⟨certificate_2432, certificate_2432_valid⟩, ⟨⟨certificate_2433, certificate_2433_valid⟩, ⟨⟨certificate_2434, certificate_2434_valid⟩, ⟨⟨certificate_2435, certificate_2435_valid⟩, ⟨⟨certificate_2436, certificate_2436_valid⟩, ⟨⟨certificate_2437, certificate_2437_valid⟩, ⟨⟨certificate_2438, certificate_2438_valid⟩, ⟨⟨certificate_2439, certificate_2439_valid⟩, ⟨⟨certificate_2440, certificate_2440_valid⟩, ⟨⟨certificate_2441, certificate_2441_valid⟩, ⟨⟨certificate_2442, certificate_2442_valid⟩, ⟨⟨certificate_2443, certificate_2443_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_14 : List (List (List ℕ)) := [[[],[],[1],[1,1,2]],[[],[],[1],[1,1,3]],[[],[],[1],[1,1,4]],[[],[],[1],[1,1,5]],[[],[],[1],[1,1,6]],[[],[],[1],[1,2,1]],[[],[],[1],[1,2,2]],[[],[],[1],[1,2,3]],[[],[],[1],[1,2,4]],[[],[],[1],[1,2,5]],[[],[],[1],[1,3,1]],[[],[],[1],[1,3,2]],[[],[],[1],[1,3,3]],[[],[],[1],[1,3,4]],[[],[],[1],[1,4,1]],[[],[],[1],[1,4,2]]] + +theorem patterns_17_8_14_verified : ∀ D ∈ patterns_17_8_14, PatternVerified 17 8 D := by + + simp only [patterns_17_8_14, List.forall_mem_cons] + + exact ⟨⟨certificate_2444, certificate_2444_valid⟩, ⟨⟨certificate_2445, certificate_2445_valid⟩, ⟨⟨certificate_2446, certificate_2446_valid⟩, ⟨⟨certificate_2447, certificate_2447_valid⟩, ⟨⟨certificate_2448, certificate_2448_valid⟩, ⟨⟨certificate_2449, certificate_2449_valid⟩, ⟨⟨certificate_2450, certificate_2450_valid⟩, ⟨⟨certificate_2451, certificate_2451_valid⟩, ⟨⟨certificate_2452, certificate_2452_valid⟩, ⟨⟨certificate_2453, certificate_2453_valid⟩, ⟨⟨certificate_2454, certificate_2454_valid⟩, ⟨⟨certificate_2455, certificate_2455_valid⟩, ⟨⟨certificate_2456, certificate_2456_valid⟩, ⟨⟨certificate_2457, certificate_2457_valid⟩, ⟨⟨certificate_2458, certificate_2458_valid⟩, ⟨⟨certificate_2459, certificate_2459_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_15 : List (List (List ℕ)) := [[[],[],[1],[1,4,3]],[[],[],[1],[1,5,1]],[[],[],[1],[1,5,2]],[[],[],[1],[1,6,1]],[[],[],[1],[2],[2]],[[],[],[1],[2],[3]],[[],[],[1],[2],[4]],[[],[],[1],[2],[5]],[[],[],[1],[2],[6]],[[],[],[1],[2,1,2]],[[],[],[1],[2,1,3]],[[],[],[1],[2,1,4]],[[],[],[1],[2,1,5]],[[],[],[1],[2,2,2]],[[],[],[1],[2,2,3]],[[],[],[1],[2,2,4]]] + +theorem patterns_17_8_15_verified : ∀ D ∈ patterns_17_8_15, PatternVerified 17 8 D := by + + simp only [patterns_17_8_15, List.forall_mem_cons] + + exact ⟨⟨certificate_2460, certificate_2460_valid⟩, ⟨⟨certificate_2461, certificate_2461_valid⟩, ⟨⟨certificate_2462, certificate_2462_valid⟩, ⟨⟨certificate_2463, certificate_2463_valid⟩, ⟨⟨certificate_2464, certificate_2464_valid⟩, ⟨⟨certificate_2465, certificate_2465_valid⟩, ⟨⟨certificate_2466, certificate_2466_valid⟩, ⟨⟨certificate_2467, certificate_2467_valid⟩, ⟨⟨certificate_2468, certificate_2468_valid⟩, ⟨⟨certificate_2469, certificate_2469_valid⟩, ⟨⟨certificate_2470, certificate_2470_valid⟩, ⟨⟨certificate_2471, certificate_2471_valid⟩, ⟨⟨certificate_2472, certificate_2472_valid⟩, ⟨⟨certificate_2473, certificate_2473_valid⟩, ⟨⟨certificate_2474, certificate_2474_valid⟩, ⟨⟨certificate_2475, certificate_2475_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_16 : List (List (List ℕ)) := [[[],[],[1],[2,3,2]],[[],[],[1],[2,3,3]],[[],[],[1],[2,4,2]],[[],[],[1],[3],[3]],[[],[],[1],[3],[4]],[[],[],[1],[3],[5]],[[],[],[1],[3,1,3]],[[],[],[1],[3,1,4]],[[],[],[1],[3,2,3]],[[],[],[1],[4],[4]],[[],[],[1,1],[1,1]],[[],[],[1,1],[1,2]],[[],[],[1,1],[1,3]],[[],[],[1,1],[1,4]],[[],[],[1,1],[1,5]],[[],[],[1,1],[1,6]]] + +theorem patterns_17_8_16_verified : ∀ D ∈ patterns_17_8_16, PatternVerified 17 8 D := by + + simp only [patterns_17_8_16, List.forall_mem_cons] + + exact ⟨⟨certificate_2476, certificate_2476_valid⟩, ⟨⟨certificate_2477, certificate_2477_valid⟩, ⟨⟨certificate_2478, certificate_2478_valid⟩, ⟨⟨certificate_2479, certificate_2479_valid⟩, ⟨⟨certificate_2480, certificate_2480_valid⟩, ⟨⟨certificate_2481, certificate_2481_valid⟩, ⟨⟨certificate_2482, certificate_2482_valid⟩, ⟨⟨certificate_2483, certificate_2483_valid⟩, ⟨⟨certificate_2484, certificate_2484_valid⟩, ⟨⟨certificate_2485, certificate_2485_valid⟩, ⟨⟨certificate_2486, certificate_2486_valid⟩, ⟨⟨certificate_2487, certificate_2487_valid⟩, ⟨⟨certificate_2488, certificate_2488_valid⟩, ⟨⟨certificate_2489, certificate_2489_valid⟩, ⟨⟨certificate_2490, certificate_2490_valid⟩, ⟨⟨certificate_2491, certificate_2491_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_17 : List (List (List ℕ)) := [[[],[],[1,1],[2,2]],[[],[],[1,1],[2,3]],[[],[],[1,1],[2,4]],[[],[],[1,1],[2,5]],[[],[],[1,1],[3,3]],[[],[],[1,1],[3,4]],[[],[],[1,1,1],[2]],[[],[],[1,1,1],[3]],[[],[],[1,1,1],[4]],[[],[],[1,1,1],[5]],[[],[],[1,1,1],[6]],[[],[],[1,1,1,1,1]],[[],[],[1,1,1,1,2]],[[],[],[1,1,1,1,3]],[[],[],[1,1,1,1,4]],[[],[],[1,1,1,1,5]]] + +theorem patterns_17_8_17_verified : ∀ D ∈ patterns_17_8_17, PatternVerified 17 8 D := by + + simp only [patterns_17_8_17, List.forall_mem_cons] + + exact ⟨⟨certificate_2492, certificate_2492_valid⟩, ⟨⟨certificate_2493, certificate_2493_valid⟩, ⟨⟨certificate_2494, certificate_2494_valid⟩, ⟨⟨certificate_2495, certificate_2495_valid⟩, ⟨⟨certificate_2496, certificate_2496_valid⟩, ⟨⟨certificate_2497, certificate_2497_valid⟩, ⟨⟨certificate_2498, certificate_2498_valid⟩, ⟨⟨certificate_2499, certificate_2499_valid⟩, ⟨⟨certificate_2500, certificate_2500_valid⟩, ⟨⟨certificate_2501, certificate_2501_valid⟩, ⟨⟨certificate_2502, certificate_2502_valid⟩, ⟨⟨certificate_2503, certificate_2503_valid⟩, ⟨⟨certificate_2504, certificate_2504_valid⟩, ⟨⟨certificate_2505, certificate_2505_valid⟩, ⟨⟨certificate_2506, certificate_2506_valid⟩, ⟨⟨certificate_2507, certificate_2507_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_18 : List (List (List ℕ)) := [[[],[],[1,1,1,2,1]],[[],[],[1,1,1,2,2]],[[],[],[1,1,1,2,3]],[[],[],[1,1,1,2,4]],[[],[],[1,1,1,3,1]],[[],[],[1,1,1,3,2]],[[],[],[1,1,1,3,3]],[[],[],[1,1,1,4,1]],[[],[],[1,1,1,4,2]],[[],[],[1,1,1,5,1]],[[],[],[1,1,2],[2]],[[],[],[1,1,2],[3]],[[],[],[1,1,2],[4]],[[],[],[1,1,2],[5]],[[],[],[1,1,2,1,1]],[[],[],[1,1,2,1,2]]] + +theorem patterns_17_8_18_verified : ∀ D ∈ patterns_17_8_18, PatternVerified 17 8 D := by + + simp only [patterns_17_8_18, List.forall_mem_cons] + + exact ⟨⟨certificate_2508, certificate_2508_valid⟩, ⟨⟨certificate_2509, certificate_2509_valid⟩, ⟨⟨certificate_2510, certificate_2510_valid⟩, ⟨⟨certificate_2511, certificate_2511_valid⟩, ⟨⟨certificate_2512, certificate_2512_valid⟩, ⟨⟨certificate_2513, certificate_2513_valid⟩, ⟨⟨certificate_2514, certificate_2514_valid⟩, ⟨⟨certificate_2515, certificate_2515_valid⟩, ⟨⟨certificate_2516, certificate_2516_valid⟩, ⟨⟨certificate_2517, certificate_2517_valid⟩, ⟨⟨certificate_2518, certificate_2518_valid⟩, ⟨⟨certificate_2519, certificate_2519_valid⟩, ⟨⟨certificate_2520, certificate_2520_valid⟩, ⟨⟨certificate_2521, certificate_2521_valid⟩, ⟨⟨certificate_2522, certificate_2522_valid⟩, ⟨⟨certificate_2523, certificate_2523_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_19 : List (List (List ℕ)) := [[[],[],[1,1,2,1,3]],[[],[],[1,1,2,1,4]],[[],[],[1,1,2,2,1]],[[],[],[1,1,2,2,2]],[[],[],[1,1,2,2,3]],[[],[],[1,1,2,3,1]],[[],[],[1,1,2,3,2]],[[],[],[1,1,2,4,1]],[[],[],[1,1,3],[2]],[[],[],[1,1,3],[3]],[[],[],[1,1,3],[4]],[[],[],[1,1,3,1,1]],[[],[],[1,1,3,1,2]],[[],[],[1,1,3,1,3]],[[],[],[1,1,3,2,1]],[[],[],[1,1,3,2,2]]] + +theorem patterns_17_8_19_verified : ∀ D ∈ patterns_17_8_19, PatternVerified 17 8 D := by + + simp only [patterns_17_8_19, List.forall_mem_cons] + + exact ⟨⟨certificate_2524, certificate_2524_valid⟩, ⟨⟨certificate_2525, certificate_2525_valid⟩, ⟨⟨certificate_2526, certificate_2526_valid⟩, ⟨⟨certificate_2527, certificate_2527_valid⟩, ⟨⟨certificate_2528, certificate_2528_valid⟩, ⟨⟨certificate_2529, certificate_2529_valid⟩, ⟨⟨certificate_2530, certificate_2530_valid⟩, ⟨⟨certificate_2531, certificate_2531_valid⟩, ⟨⟨certificate_2532, certificate_2532_valid⟩, ⟨⟨certificate_2533, certificate_2533_valid⟩, ⟨⟨certificate_2534, certificate_2534_valid⟩, ⟨⟨certificate_2535, certificate_2535_valid⟩, ⟨⟨certificate_2536, certificate_2536_valid⟩, ⟨⟨certificate_2537, certificate_2537_valid⟩, ⟨⟨certificate_2538, certificate_2538_valid⟩, ⟨⟨certificate_2539, certificate_2539_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_20 : List (List (List ℕ)) := [[[],[],[1,1,3,3,1]],[[],[],[1,1,4],[2]],[[],[],[1,1,4],[3]],[[],[],[1,1,4,1,1]],[[],[],[1,1,4,1,2]],[[],[],[1,1,4,2,1]],[[],[],[1,1,5],[2]],[[],[],[1,1,5,1,1]],[[],[],[1,2],[1,2]],[[],[],[1,2],[1,3]],[[],[],[1,2],[1,4]],[[],[],[1,2],[1,5]],[[],[],[1,2],[2,2]],[[],[],[1,2],[2,3]],[[],[],[1,2],[2,4]],[[],[],[1,2],[3,3]]] + +theorem patterns_17_8_20_verified : ∀ D ∈ patterns_17_8_20, PatternVerified 17 8 D := by + + simp only [patterns_17_8_20, List.forall_mem_cons] + + exact ⟨⟨certificate_2540, certificate_2540_valid⟩, ⟨⟨certificate_2541, certificate_2541_valid⟩, ⟨⟨certificate_2542, certificate_2542_valid⟩, ⟨⟨certificate_2543, certificate_2543_valid⟩, ⟨⟨certificate_2544, certificate_2544_valid⟩, ⟨⟨certificate_2545, certificate_2545_valid⟩, ⟨⟨certificate_2546, certificate_2546_valid⟩, ⟨⟨certificate_2547, certificate_2547_valid⟩, ⟨⟨certificate_2548, certificate_2548_valid⟩, ⟨⟨certificate_2549, certificate_2549_valid⟩, ⟨⟨certificate_2550, certificate_2550_valid⟩, ⟨⟨certificate_2551, certificate_2551_valid⟩, ⟨⟨certificate_2552, certificate_2552_valid⟩, ⟨⟨certificate_2553, certificate_2553_valid⟩, ⟨⟨certificate_2554, certificate_2554_valid⟩, ⟨⟨certificate_2555, certificate_2555_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_21 : List (List (List ℕ)) := [[[],[],[1,2,1],[2]],[[],[],[1,2,1],[3]],[[],[],[1,2,1],[4]],[[],[],[1,2,1],[5]],[[],[],[1,2,1,1,2]],[[],[],[1,2,1,1,3]],[[],[],[1,2,1,1,4]],[[],[],[1,2,1,2,1]],[[],[],[1,2,1,2,2]],[[],[],[1,2,1,2,3]],[[],[],[1,2,1,3,1]],[[],[],[1,2,1,3,2]],[[],[],[1,2,1,4,1]],[[],[],[1,2,2],[2]],[[],[],[1,2,2],[3]],[[],[],[1,2,2],[4]]] + +theorem patterns_17_8_21_verified : ∀ D ∈ patterns_17_8_21, PatternVerified 17 8 D := by + + simp only [patterns_17_8_21, List.forall_mem_cons] + + exact ⟨⟨certificate_2556, certificate_2556_valid⟩, ⟨⟨certificate_2557, certificate_2557_valid⟩, ⟨⟨certificate_2558, certificate_2558_valid⟩, ⟨⟨certificate_2559, certificate_2559_valid⟩, ⟨⟨certificate_2560, certificate_2560_valid⟩, ⟨⟨certificate_2561, certificate_2561_valid⟩, ⟨⟨certificate_2562, certificate_2562_valid⟩, ⟨⟨certificate_2563, certificate_2563_valid⟩, ⟨⟨certificate_2564, certificate_2564_valid⟩, ⟨⟨certificate_2565, certificate_2565_valid⟩, ⟨⟨certificate_2566, certificate_2566_valid⟩, ⟨⟨certificate_2567, certificate_2567_valid⟩, ⟨⟨certificate_2568, certificate_2568_valid⟩, ⟨⟨certificate_2569, certificate_2569_valid⟩, ⟨⟨certificate_2570, certificate_2570_valid⟩, ⟨⟨certificate_2571, certificate_2571_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_22 : List (List (List ℕ)) := [[[],[],[1,2,2,1,2]],[[],[],[1,2,2,1,3]],[[],[],[1,2,2,2,1]],[[],[],[1,2,2,2,2]],[[],[],[1,2,2,3,1]],[[],[],[1,2,3],[2]],[[],[],[1,2,3],[3]],[[],[],[1,2,3,1,2]],[[],[],[1,2,3,2,1]],[[],[],[1,2,4],[2]],[[],[],[1,3],[1,3]],[[],[],[1,3],[1,4]],[[],[],[1,3],[2,2]],[[],[],[1,3],[2,3]],[[],[],[1,3,1],[2]],[[],[],[1,3,1],[3]]] + +theorem patterns_17_8_22_verified : ∀ D ∈ patterns_17_8_22, PatternVerified 17 8 D := by + + simp only [patterns_17_8_22, List.forall_mem_cons] + + exact ⟨⟨certificate_2572, certificate_2572_valid⟩, ⟨⟨certificate_2573, certificate_2573_valid⟩, ⟨⟨certificate_2574, certificate_2574_valid⟩, ⟨⟨certificate_2575, certificate_2575_valid⟩, ⟨⟨certificate_2576, certificate_2576_valid⟩, ⟨⟨certificate_2577, certificate_2577_valid⟩, ⟨⟨certificate_2578, certificate_2578_valid⟩, ⟨⟨certificate_2579, certificate_2579_valid⟩, ⟨⟨certificate_2580, certificate_2580_valid⟩, ⟨⟨certificate_2581, certificate_2581_valid⟩, ⟨⟨certificate_2582, certificate_2582_valid⟩, ⟨⟨certificate_2583, certificate_2583_valid⟩, ⟨⟨certificate_2584, certificate_2584_valid⟩, ⟨⟨certificate_2585, certificate_2585_valid⟩, ⟨⟨certificate_2586, certificate_2586_valid⟩, ⟨⟨certificate_2587, certificate_2587_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_23 : List (List (List ℕ)) := [[[],[],[1,3,1],[4]],[[],[],[1,3,1,1,2]],[[],[],[1,3,1,1,3]],[[],[],[1,3,1,2,2]],[[],[],[1,3,1,3,1]],[[],[],[1,3,2],[2]],[[],[],[1,3,2],[3]],[[],[],[1,3,2,1,2]],[[],[],[1,3,3],[2]],[[],[],[1,4],[2,2]],[[],[],[1,4,1],[2]],[[],[],[1,4,1],[3]],[[],[],[1,4,1,1,2]],[[],[],[1,4,2],[2]],[[],[],[1,5,1],[2]],[[],[],[2],[2],[2]]] + +theorem patterns_17_8_23_verified : ∀ D ∈ patterns_17_8_23, PatternVerified 17 8 D := by + + simp only [patterns_17_8_23, List.forall_mem_cons] + + exact ⟨⟨certificate_2588, certificate_2588_valid⟩, ⟨⟨certificate_2589, certificate_2589_valid⟩, ⟨⟨certificate_2590, certificate_2590_valid⟩, ⟨⟨certificate_2591, certificate_2591_valid⟩, ⟨⟨certificate_2592, certificate_2592_valid⟩, ⟨⟨certificate_2593, certificate_2593_valid⟩, ⟨⟨certificate_2594, certificate_2594_valid⟩, ⟨⟨certificate_2595, certificate_2595_valid⟩, ⟨⟨certificate_2596, certificate_2596_valid⟩, ⟨⟨certificate_2597, certificate_2597_valid⟩, ⟨⟨certificate_2598, certificate_2598_valid⟩, ⟨⟨certificate_2599, certificate_2599_valid⟩, ⟨⟨certificate_2600, certificate_2600_valid⟩, ⟨⟨certificate_2601, certificate_2601_valid⟩, ⟨⟨certificate_2602, certificate_2602_valid⟩, ⟨⟨certificate_2603, certificate_2603_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_24 : List (List (List ℕ)) := [[[],[],[2],[2],[3]],[[],[],[2],[2],[4]],[[],[],[2],[2],[5]],[[],[],[2],[2,1,2]],[[],[],[2],[2,1,3]],[[],[],[2],[2,1,4]],[[],[],[2],[2,2,2]],[[],[],[2],[2,2,3]],[[],[],[2],[2,3,2]],[[],[],[2],[3],[3]],[[],[],[2],[3],[4]],[[],[],[2],[3,1,3]],[[],[],[2,1,1,1,2]],[[],[],[2,1,1,1,3]],[[],[],[2,1,1,1,4]],[[],[],[2,1,1,2,2]]] + +theorem patterns_17_8_24_verified : ∀ D ∈ patterns_17_8_24, PatternVerified 17 8 D := by + + simp only [patterns_17_8_24, List.forall_mem_cons] + + exact ⟨⟨certificate_2604, certificate_2604_valid⟩, ⟨⟨certificate_2605, certificate_2605_valid⟩, ⟨⟨certificate_2606, certificate_2606_valid⟩, ⟨⟨certificate_2607, certificate_2607_valid⟩, ⟨⟨certificate_2608, certificate_2608_valid⟩, ⟨⟨certificate_2609, certificate_2609_valid⟩, ⟨⟨certificate_2610, certificate_2610_valid⟩, ⟨⟨certificate_2611, certificate_2611_valid⟩, ⟨⟨certificate_2612, certificate_2612_valid⟩, ⟨⟨certificate_2613, certificate_2613_valid⟩, ⟨⟨certificate_2614, certificate_2614_valid⟩, ⟨⟨certificate_2615, certificate_2615_valid⟩, ⟨⟨certificate_2616, certificate_2616_valid⟩, ⟨⟨certificate_2617, certificate_2617_valid⟩, ⟨⟨certificate_2618, certificate_2618_valid⟩, ⟨⟨certificate_2619, certificate_2619_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_25 : List (List (List ℕ)) := [[[],[],[2,1,1,2,3]],[[],[],[2,1,1,3,2]],[[],[],[2,1,2],[3]],[[],[],[2,1,2],[4]],[[],[],[2,1,2,1,2]],[[],[],[2,1,2,1,3]],[[],[],[2,1,2,2,2]],[[],[],[2,1,3],[3]],[[],[],[2,1,3,1,2]],[[],[],[2,2],[2,2]],[[],[],[2,2],[2,3]],[[],[],[2,2,1,1,3]],[[],[],[2,2,1,2,2]],[[],[],[2,2,2],[3]],[[],[],[3],[3],[3]],[[],[],[3,1,1,1,3]]] + +theorem patterns_17_8_25_verified : ∀ D ∈ patterns_17_8_25, PatternVerified 17 8 D := by + + simp only [patterns_17_8_25, List.forall_mem_cons] + + exact ⟨⟨certificate_2620, certificate_2620_valid⟩, ⟨⟨certificate_2621, certificate_2621_valid⟩, ⟨⟨certificate_2622, certificate_2622_valid⟩, ⟨⟨certificate_2623, certificate_2623_valid⟩, ⟨⟨certificate_2624, certificate_2624_valid⟩, ⟨⟨certificate_2625, certificate_2625_valid⟩, ⟨⟨certificate_2626, certificate_2626_valid⟩, ⟨⟨certificate_2627, certificate_2627_valid⟩, ⟨⟨certificate_2628, certificate_2628_valid⟩, ⟨⟨certificate_2629, certificate_2629_valid⟩, ⟨⟨certificate_2630, certificate_2630_valid⟩, ⟨⟨certificate_2631, certificate_2631_valid⟩, ⟨⟨certificate_2632, certificate_2632_valid⟩, ⟨⟨certificate_2633, certificate_2633_valid⟩, ⟨⟨certificate_2634, certificate_2634_valid⟩, ⟨⟨certificate_2635, certificate_2635_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_26 : List (List (List ℕ)) := [[[],[1],[1],[1,1]],[[],[1],[1],[1,2]],[[],[1],[1],[1,3]],[[],[1],[1],[1,4]],[[],[1],[1],[1,5]],[[],[1],[1],[1,6]],[[],[1],[1],[2,2]],[[],[1],[1],[2,3]],[[],[1],[1],[2,4]],[[],[1],[1],[2,5]],[[],[1],[1],[3,3]],[[],[1],[1],[3,4]],[[],[1],[1,1],[2]],[[],[1],[1,1],[3]],[[],[1],[1,1],[4]],[[],[1],[1,1],[5]]] + +theorem patterns_17_8_26_verified : ∀ D ∈ patterns_17_8_26, PatternVerified 17 8 D := by + + simp only [patterns_17_8_26, List.forall_mem_cons] + + exact ⟨⟨certificate_2636, certificate_2636_valid⟩, ⟨⟨certificate_2637, certificate_2637_valid⟩, ⟨⟨certificate_2638, certificate_2638_valid⟩, ⟨⟨certificate_2639, certificate_2639_valid⟩, ⟨⟨certificate_2640, certificate_2640_valid⟩, ⟨⟨certificate_2641, certificate_2641_valid⟩, ⟨⟨certificate_2642, certificate_2642_valid⟩, ⟨⟨certificate_2643, certificate_2643_valid⟩, ⟨⟨certificate_2644, certificate_2644_valid⟩, ⟨⟨certificate_2645, certificate_2645_valid⟩, ⟨⟨certificate_2646, certificate_2646_valid⟩, ⟨⟨certificate_2647, certificate_2647_valid⟩, ⟨⟨certificate_2648, certificate_2648_valid⟩, ⟨⟨certificate_2649, certificate_2649_valid⟩, ⟨⟨certificate_2650, certificate_2650_valid⟩, ⟨⟨certificate_2651, certificate_2651_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_27 : List (List (List ℕ)) := [[[],[1],[1,1],[6]],[[],[1],[1,1,1,1]],[[],[1],[1,1,1,2]],[[],[1],[1,1,1,3]],[[],[1],[1,1,1,4]],[[],[1],[1,1,1,5]],[[],[1],[1,1,2,1]],[[],[1],[1,1,2,2]],[[],[1],[1,1,2,3]],[[],[1],[1,1,2,4]],[[],[1],[1,1,3,1]],[[],[1],[1,1,3,2]],[[],[1],[1,1,3,3]],[[],[1],[1,1,4,1]],[[],[1],[1,1,4,2]],[[],[1],[1,1,5,1]]] + +theorem patterns_17_8_27_verified : ∀ D ∈ patterns_17_8_27, PatternVerified 17 8 D := by + + simp only [patterns_17_8_27, List.forall_mem_cons] + + exact ⟨⟨certificate_2652, certificate_2652_valid⟩, ⟨⟨certificate_2653, certificate_2653_valid⟩, ⟨⟨certificate_2654, certificate_2654_valid⟩, ⟨⟨certificate_2655, certificate_2655_valid⟩, ⟨⟨certificate_2656, certificate_2656_valid⟩, ⟨⟨certificate_2657, certificate_2657_valid⟩, ⟨⟨certificate_2658, certificate_2658_valid⟩, ⟨⟨certificate_2659, certificate_2659_valid⟩, ⟨⟨certificate_2660, certificate_2660_valid⟩, ⟨⟨certificate_2661, certificate_2661_valid⟩, ⟨⟨certificate_2662, certificate_2662_valid⟩, ⟨⟨certificate_2663, certificate_2663_valid⟩, ⟨⟨certificate_2664, certificate_2664_valid⟩, ⟨⟨certificate_2665, certificate_2665_valid⟩, ⟨⟨certificate_2666, certificate_2666_valid⟩, ⟨⟨certificate_2667, certificate_2667_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_28 : List (List (List ℕ)) := [[[],[1],[1,2],[2]],[[],[1],[1,2],[3]],[[],[1],[1,2],[4]],[[],[1],[1,2],[5]],[[],[1],[1,2,1,2]],[[],[1],[1,2,1,3]],[[],[1],[1,2,1,4]],[[],[1],[1,2,2,1]],[[],[1],[1,2,2,2]],[[],[1],[1,2,2,3]],[[],[1],[1,2,3,1]],[[],[1],[1,2,3,2]],[[],[1],[1,2,4,1]],[[],[1],[1,3],[2]],[[],[1],[1,3],[3]],[[],[1],[1,3],[4]]] + +theorem patterns_17_8_28_verified : ∀ D ∈ patterns_17_8_28, PatternVerified 17 8 D := by + + simp only [patterns_17_8_28, List.forall_mem_cons] + + exact ⟨⟨certificate_2668, certificate_2668_valid⟩, ⟨⟨certificate_2669, certificate_2669_valid⟩, ⟨⟨certificate_2670, certificate_2670_valid⟩, ⟨⟨certificate_2671, certificate_2671_valid⟩, ⟨⟨certificate_2672, certificate_2672_valid⟩, ⟨⟨certificate_2673, certificate_2673_valid⟩, ⟨⟨certificate_2674, certificate_2674_valid⟩, ⟨⟨certificate_2675, certificate_2675_valid⟩, ⟨⟨certificate_2676, certificate_2676_valid⟩, ⟨⟨certificate_2677, certificate_2677_valid⟩, ⟨⟨certificate_2678, certificate_2678_valid⟩, ⟨⟨certificate_2679, certificate_2679_valid⟩, ⟨⟨certificate_2680, certificate_2680_valid⟩, ⟨⟨certificate_2681, certificate_2681_valid⟩, ⟨⟨certificate_2682, certificate_2682_valid⟩, ⟨⟨certificate_2683, certificate_2683_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_29 : List (List (List ℕ)) := [[[],[1],[1,3,1,2]],[[],[1],[1,3,1,3]],[[],[1],[1,3,2,2]],[[],[1],[1,3,3,1]],[[],[1],[1,4],[2]],[[],[1],[1,4],[3]],[[],[1],[1,4,1,2]],[[],[1],[1,5],[2]],[[],[1],[2],[2,2]],[[],[1],[2],[2,3]],[[],[1],[2],[2,4]],[[],[1],[2],[3,3]],[[],[1],[2,1,1,2]],[[],[1],[2,1,1,3]],[[],[1],[2,1,1,4]],[[],[1],[2,1,2,2]]] + +theorem patterns_17_8_29_verified : ∀ D ∈ patterns_17_8_29, PatternVerified 17 8 D := by + + simp only [patterns_17_8_29, List.forall_mem_cons] + + exact ⟨⟨certificate_2684, certificate_2684_valid⟩, ⟨⟨certificate_2685, certificate_2685_valid⟩, ⟨⟨certificate_2686, certificate_2686_valid⟩, ⟨⟨certificate_2687, certificate_2687_valid⟩, ⟨⟨certificate_2688, certificate_2688_valid⟩, ⟨⟨certificate_2689, certificate_2689_valid⟩, ⟨⟨certificate_2690, certificate_2690_valid⟩, ⟨⟨certificate_2691, certificate_2691_valid⟩, ⟨⟨certificate_2692, certificate_2692_valid⟩, ⟨⟨certificate_2693, certificate_2693_valid⟩, ⟨⟨certificate_2694, certificate_2694_valid⟩, ⟨⟨certificate_2695, certificate_2695_valid⟩, ⟨⟨certificate_2696, certificate_2696_valid⟩, ⟨⟨certificate_2697, certificate_2697_valid⟩, ⟨⟨certificate_2698, certificate_2698_valid⟩, ⟨⟨certificate_2699, certificate_2699_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_30 : List (List (List ℕ)) := [[[],[1],[2,1,2,3]],[[],[1],[2,1,3,2]],[[],[1],[2,2],[3]],[[],[1],[2,2],[4]],[[],[1],[2,2,1,3]],[[],[1],[2,2,2,2]],[[],[1],[2,3],[3]],[[],[1],[3,1,1,3]],[[],[1,1],[1,1,1]],[[],[1,1],[1,1,2]],[[],[1,1],[1,1,3]],[[],[1,1],[1,1,4]],[[],[1,1],[1,1,5]],[[],[1,1],[1,2,1]],[[],[1,1],[1,2,2]],[[],[1,1],[1,2,3]]] + +theorem patterns_17_8_30_verified : ∀ D ∈ patterns_17_8_30, PatternVerified 17 8 D := by + + simp only [patterns_17_8_30, List.forall_mem_cons] + + exact ⟨⟨certificate_2700, certificate_2700_valid⟩, ⟨⟨certificate_2701, certificate_2701_valid⟩, ⟨⟨certificate_2702, certificate_2702_valid⟩, ⟨⟨certificate_2703, certificate_2703_valid⟩, ⟨⟨certificate_2704, certificate_2704_valid⟩, ⟨⟨certificate_2705, certificate_2705_valid⟩, ⟨⟨certificate_2706, certificate_2706_valid⟩, ⟨⟨certificate_2707, certificate_2707_valid⟩, ⟨⟨certificate_2708, certificate_2708_valid⟩, ⟨⟨certificate_2709, certificate_2709_valid⟩, ⟨⟨certificate_2710, certificate_2710_valid⟩, ⟨⟨certificate_2711, certificate_2711_valid⟩, ⟨⟨certificate_2712, certificate_2712_valid⟩, ⟨⟨certificate_2713, certificate_2713_valid⟩, ⟨⟨certificate_2714, certificate_2714_valid⟩, ⟨⟨certificate_2715, certificate_2715_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_31 : List (List (List ℕ)) := [[[],[1,1],[1,2,4]],[[],[1,1],[1,3,1]],[[],[1,1],[1,3,2]],[[],[1,1],[1,3,3]],[[],[1,1],[1,4,1]],[[],[1,1],[1,4,2]],[[],[1,1],[1,5,1]],[[],[1,1],[2],[2]],[[],[1,1],[2],[3]],[[],[1,1],[2],[4]],[[],[1,1],[2],[5]],[[],[1,1],[2,1,2]],[[],[1,1],[2,1,3]],[[],[1,1],[2,1,4]],[[],[1,1],[2,2,2]],[[],[1,1],[2,2,3]]] + +theorem patterns_17_8_31_verified : ∀ D ∈ patterns_17_8_31, PatternVerified 17 8 D := by + + simp only [patterns_17_8_31, List.forall_mem_cons] + + exact ⟨⟨certificate_2716, certificate_2716_valid⟩, ⟨⟨certificate_2717, certificate_2717_valid⟩, ⟨⟨certificate_2718, certificate_2718_valid⟩, ⟨⟨certificate_2719, certificate_2719_valid⟩, ⟨⟨certificate_2720, certificate_2720_valid⟩, ⟨⟨certificate_2721, certificate_2721_valid⟩, ⟨⟨certificate_2722, certificate_2722_valid⟩, ⟨⟨certificate_2723, certificate_2723_valid⟩, ⟨⟨certificate_2724, certificate_2724_valid⟩, ⟨⟨certificate_2725, certificate_2725_valid⟩, ⟨⟨certificate_2726, certificate_2726_valid⟩, ⟨⟨certificate_2727, certificate_2727_valid⟩, ⟨⟨certificate_2728, certificate_2728_valid⟩, ⟨⟨certificate_2729, certificate_2729_valid⟩, ⟨⟨certificate_2730, certificate_2730_valid⟩, ⟨⟨certificate_2731, certificate_2731_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_32 : List (List (List ℕ)) := [[[],[1,1],[2,3,2]],[[],[1,1],[3],[3]],[[],[1,1],[3],[4]],[[],[1,1],[3,1,3]],[[],[1,1,1],[1,2]],[[],[1,1,1],[1,3]],[[],[1,1,1],[1,4]],[[],[1,1,1],[1,5]],[[],[1,1,1],[2,2]],[[],[1,1,1],[2,3]],[[],[1,1,1],[2,4]],[[],[1,1,1],[3,3]],[[],[1,1,1,1],[2]],[[],[1,1,1,1],[3]],[[],[1,1,1,1],[4]],[[],[1,1,1,1],[5]]] + +theorem patterns_17_8_32_verified : ∀ D ∈ patterns_17_8_32, PatternVerified 17 8 D := by + + simp only [patterns_17_8_32, List.forall_mem_cons] + + exact ⟨⟨certificate_2732, certificate_2732_valid⟩, ⟨⟨certificate_2733, certificate_2733_valid⟩, ⟨⟨certificate_2734, certificate_2734_valid⟩, ⟨⟨certificate_2735, certificate_2735_valid⟩, ⟨⟨certificate_2736, certificate_2736_valid⟩, ⟨⟨certificate_2737, certificate_2737_valid⟩, ⟨⟨certificate_2738, certificate_2738_valid⟩, ⟨⟨certificate_2739, certificate_2739_valid⟩, ⟨⟨certificate_2740, certificate_2740_valid⟩, ⟨⟨certificate_2741, certificate_2741_valid⟩, ⟨⟨certificate_2742, certificate_2742_valid⟩, ⟨⟨certificate_2743, certificate_2743_valid⟩, ⟨⟨certificate_2744, certificate_2744_valid⟩, ⟨⟨certificate_2745, certificate_2745_valid⟩, ⟨⟨certificate_2746, certificate_2746_valid⟩, ⟨⟨certificate_2747, certificate_2747_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_33 : List (List (List ℕ)) := [[[],[1,1,1,1,1,1]],[[],[1,1,1,1,1,2]],[[],[1,1,1,1,1,3]],[[],[1,1,1,1,1,4]],[[],[1,1,1,1,2,1]],[[],[1,1,1,1,2,2]],[[],[1,1,1,1,2,3]],[[],[1,1,1,1,3,1]],[[],[1,1,1,1,3,2]],[[],[1,1,1,1,4,1]],[[],[1,1,1,2],[2]],[[],[1,1,1,2],[3]],[[],[1,1,1,2],[4]],[[],[1,1,1,2,1,1]],[[],[1,1,1,2,1,2]],[[],[1,1,1,2,1,3]]] + +theorem patterns_17_8_33_verified : ∀ D ∈ patterns_17_8_33, PatternVerified 17 8 D := by + + simp only [patterns_17_8_33, List.forall_mem_cons] + + exact ⟨⟨certificate_2748, certificate_2748_valid⟩, ⟨⟨certificate_2749, certificate_2749_valid⟩, ⟨⟨certificate_2750, certificate_2750_valid⟩, ⟨⟨certificate_2751, certificate_2751_valid⟩, ⟨⟨certificate_2752, certificate_2752_valid⟩, ⟨⟨certificate_2753, certificate_2753_valid⟩, ⟨⟨certificate_2754, certificate_2754_valid⟩, ⟨⟨certificate_2755, certificate_2755_valid⟩, ⟨⟨certificate_2756, certificate_2756_valid⟩, ⟨⟨certificate_2757, certificate_2757_valid⟩, ⟨⟨certificate_2758, certificate_2758_valid⟩, ⟨⟨certificate_2759, certificate_2759_valid⟩, ⟨⟨certificate_2760, certificate_2760_valid⟩, ⟨⟨certificate_2761, certificate_2761_valid⟩, ⟨⟨certificate_2762, certificate_2762_valid⟩, ⟨⟨certificate_2763, certificate_2763_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_34 : List (List (List ℕ)) := [[[],[1,1,1,2,2,1]],[[],[1,1,1,2,2,2]],[[],[1,1,1,2,3,1]],[[],[1,1,1,3],[2]],[[],[1,1,1,3],[3]],[[],[1,1,1,3,1,1]],[[],[1,1,1,3,1,2]],[[],[1,1,1,3,2,1]],[[],[1,1,1,4],[2]],[[],[1,1,1,4,1,1]],[[],[1,1,2],[1,2]],[[],[1,1,2],[1,3]],[[],[1,1,2],[1,4]],[[],[1,1,2],[2,2]],[[],[1,1,2],[2,3]],[[],[1,1,2,1],[2]]] + +theorem patterns_17_8_34_verified : ∀ D ∈ patterns_17_8_34, PatternVerified 17 8 D := by + + simp only [patterns_17_8_34, List.forall_mem_cons] + + exact ⟨⟨certificate_2764, certificate_2764_valid⟩, ⟨⟨certificate_2765, certificate_2765_valid⟩, ⟨⟨certificate_2766, certificate_2766_valid⟩, ⟨⟨certificate_2767, certificate_2767_valid⟩, ⟨⟨certificate_2768, certificate_2768_valid⟩, ⟨⟨certificate_2769, certificate_2769_valid⟩, ⟨⟨certificate_2770, certificate_2770_valid⟩, ⟨⟨certificate_2771, certificate_2771_valid⟩, ⟨⟨certificate_2772, certificate_2772_valid⟩, ⟨⟨certificate_2773, certificate_2773_valid⟩, ⟨⟨certificate_2774, certificate_2774_valid⟩, ⟨⟨certificate_2775, certificate_2775_valid⟩, ⟨⟨certificate_2776, certificate_2776_valid⟩, ⟨⟨certificate_2777, certificate_2777_valid⟩, ⟨⟨certificate_2778, certificate_2778_valid⟩, ⟨⟨certificate_2779, certificate_2779_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_35 : List (List (List ℕ)) := [[[],[1,1,2,1],[3]],[[],[1,1,2,1],[4]],[[],[1,1,2,1,1,2]],[[],[1,1,2,1,1,3]],[[],[1,1,2,1,2,1]],[[],[1,1,2,1,2,2]],[[],[1,1,2,1,3,1]],[[],[1,1,2,2],[2]],[[],[1,1,2,2],[3]],[[],[1,1,2,2,1,1]],[[],[1,1,2,2,1,2]],[[],[1,1,2,2,2,1]],[[],[1,1,2,3],[2]],[[],[1,1,2,3,1,1]],[[],[1,1,3],[1,2]],[[],[1,1,3],[1,3]]] + +theorem patterns_17_8_35_verified : ∀ D ∈ patterns_17_8_35, PatternVerified 17 8 D := by + + simp only [patterns_17_8_35, List.forall_mem_cons] + + exact ⟨⟨certificate_2780, certificate_2780_valid⟩, ⟨⟨certificate_2781, certificate_2781_valid⟩, ⟨⟨certificate_2782, certificate_2782_valid⟩, ⟨⟨certificate_2783, certificate_2783_valid⟩, ⟨⟨certificate_2784, certificate_2784_valid⟩, ⟨⟨certificate_2785, certificate_2785_valid⟩, ⟨⟨certificate_2786, certificate_2786_valid⟩, ⟨⟨certificate_2787, certificate_2787_valid⟩, ⟨⟨certificate_2788, certificate_2788_valid⟩, ⟨⟨certificate_2789, certificate_2789_valid⟩, ⟨⟨certificate_2790, certificate_2790_valid⟩, ⟨⟨certificate_2791, certificate_2791_valid⟩, ⟨⟨certificate_2792, certificate_2792_valid⟩, ⟨⟨certificate_2793, certificate_2793_valid⟩, ⟨⟨certificate_2794, certificate_2794_valid⟩, ⟨⟨certificate_2795, certificate_2795_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_36 : List (List (List ℕ)) := [[[],[1,1,3],[2,2]],[[],[1,1,3,1],[2]],[[],[1,1,3,1],[3]],[[],[1,1,3,1,1,2]],[[],[1,1,3,1,2,1]],[[],[1,1,3,2],[2]],[[],[1,1,4],[1,2]],[[],[1,1,4,1],[2]],[[],[1,2],[1,2,1]],[[],[1,2],[1,2,2]],[[],[1,2],[1,2,3]],[[],[1,2],[1,3,1]],[[],[1,2],[1,3,2]],[[],[1,2],[1,4,1]],[[],[1,2],[2],[2]],[[],[1,2],[2],[3]]] + +theorem patterns_17_8_36_verified : ∀ D ∈ patterns_17_8_36, PatternVerified 17 8 D := by + + simp only [patterns_17_8_36, List.forall_mem_cons] + + exact ⟨⟨certificate_2796, certificate_2796_valid⟩, ⟨⟨certificate_2797, certificate_2797_valid⟩, ⟨⟨certificate_2798, certificate_2798_valid⟩, ⟨⟨certificate_2799, certificate_2799_valid⟩, ⟨⟨certificate_2800, certificate_2800_valid⟩, ⟨⟨certificate_2801, certificate_2801_valid⟩, ⟨⟨certificate_2802, certificate_2802_valid⟩, ⟨⟨certificate_2803, certificate_2803_valid⟩, ⟨⟨certificate_2804, certificate_2804_valid⟩, ⟨⟨certificate_2805, certificate_2805_valid⟩, ⟨⟨certificate_2806, certificate_2806_valid⟩, ⟨⟨certificate_2807, certificate_2807_valid⟩, ⟨⟨certificate_2808, certificate_2808_valid⟩, ⟨⟨certificate_2809, certificate_2809_valid⟩, ⟨⟨certificate_2810, certificate_2810_valid⟩, ⟨⟨certificate_2811, certificate_2811_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_37 : List (List (List ℕ)) := [[[],[1,2],[2],[4]],[[],[1,2],[2,1,2]],[[],[1,2],[2,1,3]],[[],[1,2],[2,2,2]],[[],[1,2],[3],[3]],[[],[1,2,1],[1,3]],[[],[1,2,1],[1,4]],[[],[1,2,1],[2,2]],[[],[1,2,1],[2,3]],[[],[1,2,1,1,1,2]],[[],[1,2,1,1,1,3]],[[],[1,2,1,1,2,1]],[[],[1,2,1,1,2,2]],[[],[1,2,1,1,3,1]],[[],[1,2,1,2],[2]],[[],[1,2,1,2],[3]]] + +theorem patterns_17_8_37_verified : ∀ D ∈ patterns_17_8_37, PatternVerified 17 8 D := by + + simp only [patterns_17_8_37, List.forall_mem_cons] + + exact ⟨⟨certificate_2812, certificate_2812_valid⟩, ⟨⟨certificate_2813, certificate_2813_valid⟩, ⟨⟨certificate_2814, certificate_2814_valid⟩, ⟨⟨certificate_2815, certificate_2815_valid⟩, ⟨⟨certificate_2816, certificate_2816_valid⟩, ⟨⟨certificate_2817, certificate_2817_valid⟩, ⟨⟨certificate_2818, certificate_2818_valid⟩, ⟨⟨certificate_2819, certificate_2819_valid⟩, ⟨⟨certificate_2820, certificate_2820_valid⟩, ⟨⟨certificate_2821, certificate_2821_valid⟩, ⟨⟨certificate_2822, certificate_2822_valid⟩, ⟨⟨certificate_2823, certificate_2823_valid⟩, ⟨⟨certificate_2824, certificate_2824_valid⟩, ⟨⟨certificate_2825, certificate_2825_valid⟩, ⟨⟨certificate_2826, certificate_2826_valid⟩, ⟨⟨certificate_2827, certificate_2827_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_38 : List (List (List ℕ)) := [[[],[1,2,1,2,1,2]],[[],[1,2,1,2,2,1]],[[],[1,2,1,3],[2]],[[],[1,2,2],[1,3]],[[],[1,2,2],[2,2]],[[],[1,2,2,1],[2]],[[],[1,2,2,1],[3]],[[],[1,2,2,1,1,2]],[[],[1,2,2,2],[2]],[[],[1,2,3,1],[2]],[[],[1,3],[1,3,1]],[[],[1,3],[2],[2]],[[],[1,3],[2],[3]],[[],[1,3],[2,1,2]],[[],[1,3,1],[2,2]],[[],[1,3,1,1,1,2]]] + +theorem patterns_17_8_38_verified : ∀ D ∈ patterns_17_8_38, PatternVerified 17 8 D := by + + simp only [patterns_17_8_38, List.forall_mem_cons] + + exact ⟨⟨certificate_2828, certificate_2828_valid⟩, ⟨⟨certificate_2829, certificate_2829_valid⟩, ⟨⟨certificate_2830, certificate_2830_valid⟩, ⟨⟨certificate_2831, certificate_2831_valid⟩, ⟨⟨certificate_2832, certificate_2832_valid⟩, ⟨⟨certificate_2833, certificate_2833_valid⟩, ⟨⟨certificate_2834, certificate_2834_valid⟩, ⟨⟨certificate_2835, certificate_2835_valid⟩, ⟨⟨certificate_2836, certificate_2836_valid⟩, ⟨⟨certificate_2837, certificate_2837_valid⟩, ⟨⟨certificate_2838, certificate_2838_valid⟩, ⟨⟨certificate_2839, certificate_2839_valid⟩, ⟨⟨certificate_2840, certificate_2840_valid⟩, ⟨⟨certificate_2841, certificate_2841_valid⟩, ⟨⟨certificate_2842, certificate_2842_valid⟩, ⟨⟨certificate_2843, certificate_2843_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_39 : List (List (List ℕ)) := [[[],[1,3,1,2],[2]],[[],[1,4],[2],[2]],[[],[2],[2],[2,2]],[[],[2],[2],[2,3]],[[],[2],[2,1,1,2]],[[],[2],[2,1,1,3]],[[],[2],[2,1,2,2]],[[],[2],[2,2],[3]],[[],[2,1,1,1,1,2]],[[],[2,1,1,1,1,3]],[[],[2,1,1,1,2,2]],[[],[2,1,1,2],[3]],[[],[2,1,1,2,1,2]],[[],[2,1,2],[2,2]],[[1],[1],[1],[1]],[[1],[1],[1],[2]]] + +theorem patterns_17_8_39_verified : ∀ D ∈ patterns_17_8_39, PatternVerified 17 8 D := by + + simp only [patterns_17_8_39, List.forall_mem_cons] + + exact ⟨⟨certificate_2844, certificate_2844_valid⟩, ⟨⟨certificate_2845, certificate_2845_valid⟩, ⟨⟨certificate_2846, certificate_2846_valid⟩, ⟨⟨certificate_2847, certificate_2847_valid⟩, ⟨⟨certificate_2848, certificate_2848_valid⟩, ⟨⟨certificate_2849, certificate_2849_valid⟩, ⟨⟨certificate_2850, certificate_2850_valid⟩, ⟨⟨certificate_2851, certificate_2851_valid⟩, ⟨⟨certificate_2852, certificate_2852_valid⟩, ⟨⟨certificate_2853, certificate_2853_valid⟩, ⟨⟨certificate_2854, certificate_2854_valid⟩, ⟨⟨certificate_2855, certificate_2855_valid⟩, ⟨⟨certificate_2856, certificate_2856_valid⟩, ⟨⟨certificate_2857, certificate_2857_valid⟩, ⟨⟨certificate_2858, certificate_2858_valid⟩, ⟨⟨certificate_2859, certificate_2859_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_40 : List (List (List ℕ)) := [[[1],[1],[1],[3]],[[1],[1],[1],[4]],[[1],[1],[1],[5]],[[1],[1],[1],[6]],[[1],[1],[1,1,1]],[[1],[1],[1,1,2]],[[1],[1],[1,1,3]],[[1],[1],[1,1,4]],[[1],[1],[1,1,5]],[[1],[1],[1,2,1]],[[1],[1],[1,2,2]],[[1],[1],[1,2,3]],[[1],[1],[1,2,4]],[[1],[1],[1,3,1]],[[1],[1],[1,3,2]],[[1],[1],[1,3,3]]] + +theorem patterns_17_8_40_verified : ∀ D ∈ patterns_17_8_40, PatternVerified 17 8 D := by + + simp only [patterns_17_8_40, List.forall_mem_cons] + + exact ⟨⟨certificate_2860, certificate_2860_valid⟩, ⟨⟨certificate_2861, certificate_2861_valid⟩, ⟨⟨certificate_2862, certificate_2862_valid⟩, ⟨⟨certificate_2863, certificate_2863_valid⟩, ⟨⟨certificate_2864, certificate_2864_valid⟩, ⟨⟨certificate_2865, certificate_2865_valid⟩, ⟨⟨certificate_2866, certificate_2866_valid⟩, ⟨⟨certificate_2867, certificate_2867_valid⟩, ⟨⟨certificate_2868, certificate_2868_valid⟩, ⟨⟨certificate_2869, certificate_2869_valid⟩, ⟨⟨certificate_2870, certificate_2870_valid⟩, ⟨⟨certificate_2871, certificate_2871_valid⟩, ⟨⟨certificate_2872, certificate_2872_valid⟩, ⟨⟨certificate_2873, certificate_2873_valid⟩, ⟨⟨certificate_2874, certificate_2874_valid⟩, ⟨⟨certificate_2875, certificate_2875_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_41 : List (List (List ℕ)) := [[[1],[1],[1,4,1]],[[1],[1],[1,4,2]],[[1],[1],[1,5,1]],[[1],[1],[2],[2]],[[1],[1],[2],[3]],[[1],[1],[2],[4]],[[1],[1],[2],[5]],[[1],[1],[2,1,2]],[[1],[1],[2,1,3]],[[1],[1],[2,1,4]],[[1],[1],[2,2,2]],[[1],[1],[2,2,3]],[[1],[1],[2,3,2]],[[1],[1],[3],[3]],[[1],[1],[3],[4]],[[1],[1],[3,1,3]]] + +theorem patterns_17_8_41_verified : ∀ D ∈ patterns_17_8_41, PatternVerified 17 8 D := by + + simp only [patterns_17_8_41, List.forall_mem_cons] + + exact ⟨⟨certificate_2876, certificate_2876_valid⟩, ⟨⟨certificate_2877, certificate_2877_valid⟩, ⟨⟨certificate_2878, certificate_2878_valid⟩, ⟨⟨certificate_2879, certificate_2879_valid⟩, ⟨⟨certificate_2880, certificate_2880_valid⟩, ⟨⟨certificate_2881, certificate_2881_valid⟩, ⟨⟨certificate_2882, certificate_2882_valid⟩, ⟨⟨certificate_2883, certificate_2883_valid⟩, ⟨⟨certificate_2884, certificate_2884_valid⟩, ⟨⟨certificate_2885, certificate_2885_valid⟩, ⟨⟨certificate_2886, certificate_2886_valid⟩, ⟨⟨certificate_2887, certificate_2887_valid⟩, ⟨⟨certificate_2888, certificate_2888_valid⟩, ⟨⟨certificate_2889, certificate_2889_valid⟩, ⟨⟨certificate_2890, certificate_2890_valid⟩, ⟨⟨certificate_2891, certificate_2891_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_42 : List (List (List ℕ)) := [[[1],[1,1],[1,1]],[[1],[1,1],[1,2]],[[1],[1,1],[1,3]],[[1],[1,1],[1,4]],[[1],[1,1],[1,5]],[[1],[1,1],[2,2]],[[1],[1,1],[2,3]],[[1],[1,1],[2,4]],[[1],[1,1],[3,3]],[[1],[1,1,1],[2]],[[1],[1,1,1],[3]],[[1],[1,1,1],[4]],[[1],[1,1,1],[5]],[[1],[1,1,1,1,1]],[[1],[1,1,1,1,2]],[[1],[1,1,1,1,3]]] + +theorem patterns_17_8_42_verified : ∀ D ∈ patterns_17_8_42, PatternVerified 17 8 D := by + + simp only [patterns_17_8_42, List.forall_mem_cons] + + exact ⟨⟨certificate_2892, certificate_2892_valid⟩, ⟨⟨certificate_2893, certificate_2893_valid⟩, ⟨⟨certificate_2894, certificate_2894_valid⟩, ⟨⟨certificate_2895, certificate_2895_valid⟩, ⟨⟨certificate_2896, certificate_2896_valid⟩, ⟨⟨certificate_2897, certificate_2897_valid⟩, ⟨⟨certificate_2898, certificate_2898_valid⟩, ⟨⟨certificate_2899, certificate_2899_valid⟩, ⟨⟨certificate_2900, certificate_2900_valid⟩, ⟨⟨certificate_2901, certificate_2901_valid⟩, ⟨⟨certificate_2902, certificate_2902_valid⟩, ⟨⟨certificate_2903, certificate_2903_valid⟩, ⟨⟨certificate_2904, certificate_2904_valid⟩, ⟨⟨certificate_2905, certificate_2905_valid⟩, ⟨⟨certificate_2906, certificate_2906_valid⟩, ⟨⟨certificate_2907, certificate_2907_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_43 : List (List (List ℕ)) := [[[1],[1,1,1,1,4]],[[1],[1,1,1,2,1]],[[1],[1,1,1,2,2]],[[1],[1,1,1,2,3]],[[1],[1,1,1,3,1]],[[1],[1,1,1,3,2]],[[1],[1,1,1,4,1]],[[1],[1,1,2],[2]],[[1],[1,1,2],[3]],[[1],[1,1,2],[4]],[[1],[1,1,2,1,1]],[[1],[1,1,2,1,2]],[[1],[1,1,2,1,3]],[[1],[1,1,2,2,1]],[[1],[1,1,2,2,2]],[[1],[1,1,2,3,1]]] + +theorem patterns_17_8_43_verified : ∀ D ∈ patterns_17_8_43, PatternVerified 17 8 D := by + + simp only [patterns_17_8_43, List.forall_mem_cons] + + exact ⟨⟨certificate_2908, certificate_2908_valid⟩, ⟨⟨certificate_2909, certificate_2909_valid⟩, ⟨⟨certificate_2910, certificate_2910_valid⟩, ⟨⟨certificate_2911, certificate_2911_valid⟩, ⟨⟨certificate_2912, certificate_2912_valid⟩, ⟨⟨certificate_2913, certificate_2913_valid⟩, ⟨⟨certificate_2914, certificate_2914_valid⟩, ⟨⟨certificate_2915, certificate_2915_valid⟩, ⟨⟨certificate_2916, certificate_2916_valid⟩, ⟨⟨certificate_2917, certificate_2917_valid⟩, ⟨⟨certificate_2918, certificate_2918_valid⟩, ⟨⟨certificate_2919, certificate_2919_valid⟩, ⟨⟨certificate_2920, certificate_2920_valid⟩, ⟨⟨certificate_2921, certificate_2921_valid⟩, ⟨⟨certificate_2922, certificate_2922_valid⟩, ⟨⟨certificate_2923, certificate_2923_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_44 : List (List (List ℕ)) := [[[1],[1,1,3],[2]],[[1],[1,1,3],[3]],[[1],[1,1,3,1,1]],[[1],[1,1,3,1,2]],[[1],[1,1,3,2,1]],[[1],[1,1,4],[2]],[[1],[1,1,4,1,1]],[[1],[1,2],[1,2]],[[1],[1,2],[1,3]],[[1],[1,2],[1,4]],[[1],[1,2],[2,2]],[[1],[1,2],[2,3]],[[1],[1,2,1],[2]],[[1],[1,2,1],[3]],[[1],[1,2,1],[4]],[[1],[1,2,1,1,2]]] + +theorem patterns_17_8_44_verified : ∀ D ∈ patterns_17_8_44, PatternVerified 17 8 D := by + + simp only [patterns_17_8_44, List.forall_mem_cons] + + exact ⟨⟨certificate_2924, certificate_2924_valid⟩, ⟨⟨certificate_2925, certificate_2925_valid⟩, ⟨⟨certificate_2926, certificate_2926_valid⟩, ⟨⟨certificate_2927, certificate_2927_valid⟩, ⟨⟨certificate_2928, certificate_2928_valid⟩, ⟨⟨certificate_2929, certificate_2929_valid⟩, ⟨⟨certificate_2930, certificate_2930_valid⟩, ⟨⟨certificate_2931, certificate_2931_valid⟩, ⟨⟨certificate_2932, certificate_2932_valid⟩, ⟨⟨certificate_2933, certificate_2933_valid⟩, ⟨⟨certificate_2934, certificate_2934_valid⟩, ⟨⟨certificate_2935, certificate_2935_valid⟩, ⟨⟨certificate_2936, certificate_2936_valid⟩, ⟨⟨certificate_2937, certificate_2937_valid⟩, ⟨⟨certificate_2938, certificate_2938_valid⟩, ⟨⟨certificate_2939, certificate_2939_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_45 : List (List (List ℕ)) := [[[1],[1,2,1,1,3]],[[1],[1,2,1,2,1]],[[1],[1,2,1,2,2]],[[1],[1,2,1,3,1]],[[1],[1,2,2],[2]],[[1],[1,2,2],[3]],[[1],[1,2,2,1,2]],[[1],[1,2,2,2,1]],[[1],[1,2,3],[2]],[[1],[1,3],[1,3]],[[1],[1,3],[2,2]],[[1],[1,3,1],[2]],[[1],[1,3,1],[3]],[[1],[1,3,1,1,2]],[[1],[1,3,2],[2]],[[1],[1,4,1],[2]]] + +theorem patterns_17_8_45_verified : ∀ D ∈ patterns_17_8_45, PatternVerified 17 8 D := by + + simp only [patterns_17_8_45, List.forall_mem_cons] + + exact ⟨⟨certificate_2940, certificate_2940_valid⟩, ⟨⟨certificate_2941, certificate_2941_valid⟩, ⟨⟨certificate_2942, certificate_2942_valid⟩, ⟨⟨certificate_2943, certificate_2943_valid⟩, ⟨⟨certificate_2944, certificate_2944_valid⟩, ⟨⟨certificate_2945, certificate_2945_valid⟩, ⟨⟨certificate_2946, certificate_2946_valid⟩, ⟨⟨certificate_2947, certificate_2947_valid⟩, ⟨⟨certificate_2948, certificate_2948_valid⟩, ⟨⟨certificate_2949, certificate_2949_valid⟩, ⟨⟨certificate_2950, certificate_2950_valid⟩, ⟨⟨certificate_2951, certificate_2951_valid⟩, ⟨⟨certificate_2952, certificate_2952_valid⟩, ⟨⟨certificate_2953, certificate_2953_valid⟩, ⟨⟨certificate_2954, certificate_2954_valid⟩, ⟨⟨certificate_2955, certificate_2955_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_46 : List (List (List ℕ)) := [[[1],[2],[2],[2]],[[1],[2],[2],[3]],[[1],[2],[2],[4]],[[1],[2],[2,1,2]],[[1],[2],[2,1,3]],[[1],[2],[2,2,2]],[[1],[2],[3],[3]],[[1],[2,1,1,1,2]],[[1],[2,1,1,1,3]],[[1],[2,1,1,2,2]],[[1],[2,1,2],[3]],[[1],[2,1,2,1,2]],[[1],[2,2],[2,2]],[[1,1],[1,1],[2]],[[1,1],[1,1],[3]],[[1,1],[1,1],[4]]] + +theorem patterns_17_8_46_verified : ∀ D ∈ patterns_17_8_46, PatternVerified 17 8 D := by + + simp only [patterns_17_8_46, List.forall_mem_cons] + + exact ⟨⟨certificate_2956, certificate_2956_valid⟩, ⟨⟨certificate_2957, certificate_2957_valid⟩, ⟨⟨certificate_2958, certificate_2958_valid⟩, ⟨⟨certificate_2959, certificate_2959_valid⟩, ⟨⟨certificate_2960, certificate_2960_valid⟩, ⟨⟨certificate_2961, certificate_2961_valid⟩, ⟨⟨certificate_2962, certificate_2962_valid⟩, ⟨⟨certificate_2963, certificate_2963_valid⟩, ⟨⟨certificate_2964, certificate_2964_valid⟩, ⟨⟨certificate_2965, certificate_2965_valid⟩, ⟨⟨certificate_2966, certificate_2966_valid⟩, ⟨⟨certificate_2967, certificate_2967_valid⟩, ⟨⟨certificate_2968, certificate_2968_valid⟩, ⟨⟨certificate_2969, certificate_2969_valid⟩, ⟨⟨certificate_2970, certificate_2970_valid⟩, ⟨⟨certificate_2971, certificate_2971_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_47 : List (List (List ℕ)) := [[[1,1],[1,1],[5]],[[1,1],[1,1,1,1]],[[1,1],[1,1,1,2]],[[1,1],[1,1,1,3]],[[1,1],[1,1,1,4]],[[1,1],[1,1,2,1]],[[1,1],[1,1,2,2]],[[1,1],[1,1,2,3]],[[1,1],[1,1,3,1]],[[1,1],[1,1,3,2]],[[1,1],[1,1,4,1]],[[1,1],[1,2],[2]],[[1,1],[1,2],[3]],[[1,1],[1,2],[4]],[[1,1],[1,2,1,2]],[[1,1],[1,2,1,3]]] + +theorem patterns_17_8_47_verified : ∀ D ∈ patterns_17_8_47, PatternVerified 17 8 D := by + + simp only [patterns_17_8_47, List.forall_mem_cons] + + exact ⟨⟨certificate_2972, certificate_2972_valid⟩, ⟨⟨certificate_2973, certificate_2973_valid⟩, ⟨⟨certificate_2974, certificate_2974_valid⟩, ⟨⟨certificate_2975, certificate_2975_valid⟩, ⟨⟨certificate_2976, certificate_2976_valid⟩, ⟨⟨certificate_2977, certificate_2977_valid⟩, ⟨⟨certificate_2978, certificate_2978_valid⟩, ⟨⟨certificate_2979, certificate_2979_valid⟩, ⟨⟨certificate_2980, certificate_2980_valid⟩, ⟨⟨certificate_2981, certificate_2981_valid⟩, ⟨⟨certificate_2982, certificate_2982_valid⟩, ⟨⟨certificate_2983, certificate_2983_valid⟩, ⟨⟨certificate_2984, certificate_2984_valid⟩, ⟨⟨certificate_2985, certificate_2985_valid⟩, ⟨⟨certificate_2986, certificate_2986_valid⟩, ⟨⟨certificate_2987, certificate_2987_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_48 : List (List (List ℕ)) := [[[1,1],[1,2,2,1]],[[1,1],[1,2,2,2]],[[1,1],[1,2,3,1]],[[1,1],[1,3],[2]],[[1,1],[1,3],[3]],[[1,1],[1,3,1,2]],[[1,1],[1,4],[2]],[[1,1],[2],[2,2]],[[1,1],[2],[2,3]],[[1,1],[2,1,1,2]],[[1,1],[2,1,1,3]],[[1,1],[2,1,2,2]],[[1,1],[2,2],[3]],[[1,1,1],[1,1,1]],[[1,1,1],[1,1,2]],[[1,1,1],[1,1,3]]] + +theorem patterns_17_8_48_verified : ∀ D ∈ patterns_17_8_48, PatternVerified 17 8 D := by + + simp only [patterns_17_8_48, List.forall_mem_cons] + + exact ⟨⟨certificate_2988, certificate_2988_valid⟩, ⟨⟨certificate_2989, certificate_2989_valid⟩, ⟨⟨certificate_2990, certificate_2990_valid⟩, ⟨⟨certificate_2991, certificate_2991_valid⟩, ⟨⟨certificate_2992, certificate_2992_valid⟩, ⟨⟨certificate_2993, certificate_2993_valid⟩, ⟨⟨certificate_2994, certificate_2994_valid⟩, ⟨⟨certificate_2995, certificate_2995_valid⟩, ⟨⟨certificate_2996, certificate_2996_valid⟩, ⟨⟨certificate_2997, certificate_2997_valid⟩, ⟨⟨certificate_2998, certificate_2998_valid⟩, ⟨⟨certificate_2999, certificate_2999_valid⟩, ⟨⟨certificate_3000, certificate_3000_valid⟩, ⟨⟨certificate_3001, certificate_3001_valid⟩, ⟨⟨certificate_3002, certificate_3002_valid⟩, ⟨⟨certificate_3003, certificate_3003_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_49 : List (List (List ℕ)) := [[[1,1,1],[1,1,4]],[[1,1,1],[1,2,1]],[[1,1,1],[1,2,2]],[[1,1,1],[1,2,3]],[[1,1,1],[1,3,1]],[[1,1,1],[1,3,2]],[[1,1,1],[1,4,1]],[[1,1,1],[2],[2]],[[1,1,1],[2],[3]],[[1,1,1],[2],[4]],[[1,1,1],[2,1,2]],[[1,1,1],[2,1,3]],[[1,1,1],[2,2,2]],[[1,1,1],[3],[3]],[[1,1,1,1],[1,2]],[[1,1,1,1],[1,3]]] + +theorem patterns_17_8_49_verified : ∀ D ∈ patterns_17_8_49, PatternVerified 17 8 D := by + + simp only [patterns_17_8_49, List.forall_mem_cons] + + exact ⟨⟨certificate_3004, certificate_3004_valid⟩, ⟨⟨certificate_3005, certificate_3005_valid⟩, ⟨⟨certificate_3006, certificate_3006_valid⟩, ⟨⟨certificate_3007, certificate_3007_valid⟩, ⟨⟨certificate_3008, certificate_3008_valid⟩, ⟨⟨certificate_3009, certificate_3009_valid⟩, ⟨⟨certificate_3010, certificate_3010_valid⟩, ⟨⟨certificate_3011, certificate_3011_valid⟩, ⟨⟨certificate_3012, certificate_3012_valid⟩, ⟨⟨certificate_3013, certificate_3013_valid⟩, ⟨⟨certificate_3014, certificate_3014_valid⟩, ⟨⟨certificate_3015, certificate_3015_valid⟩, ⟨⟨certificate_3016, certificate_3016_valid⟩, ⟨⟨certificate_3017, certificate_3017_valid⟩, ⟨⟨certificate_3018, certificate_3018_valid⟩, ⟨⟨certificate_3019, certificate_3019_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_50 : List (List (List ℕ)) := [[[1,1,1,1],[1,4]],[[1,1,1,1],[2,2]],[[1,1,1,1],[2,3]],[[1,1,1,1,1],[2]],[[1,1,1,1,1],[3]],[[1,1,1,1,1],[4]],[[1,1,1,1,1,1,1]],[[1,1,1,1,1,1,2]],[[1,1,1,1,1,1,3]],[[1,1,1,1,1,2,1]],[[1,1,1,1,1,2,2]],[[1,1,1,1,1,3,1]],[[1,1,1,1,2],[2]],[[1,1,1,1,2],[3]],[[1,1,1,1,2,1,1]],[[1,1,1,1,2,1,2]]] + +theorem patterns_17_8_50_verified : ∀ D ∈ patterns_17_8_50, PatternVerified 17 8 D := by + + simp only [patterns_17_8_50, List.forall_mem_cons] + + exact ⟨⟨certificate_3020, certificate_3020_valid⟩, ⟨⟨certificate_3021, certificate_3021_valid⟩, ⟨⟨certificate_3022, certificate_3022_valid⟩, ⟨⟨certificate_3023, certificate_3023_valid⟩, ⟨⟨certificate_3024, certificate_3024_valid⟩, ⟨⟨certificate_3025, certificate_3025_valid⟩, ⟨⟨certificate_3026, certificate_3026_valid⟩, ⟨⟨certificate_3027, certificate_3027_valid⟩, ⟨⟨certificate_3028, certificate_3028_valid⟩, ⟨⟨certificate_3029, certificate_3029_valid⟩, ⟨⟨certificate_3030, certificate_3030_valid⟩, ⟨⟨certificate_3031, certificate_3031_valid⟩, ⟨⟨certificate_3032, certificate_3032_valid⟩, ⟨⟨certificate_3033, certificate_3033_valid⟩, ⟨⟨certificate_3034, certificate_3034_valid⟩, ⟨⟨certificate_3035, certificate_3035_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_51 : List (List (List ℕ)) := [[[1,1,1,1,2,2,1]],[[1,1,1,1,3],[2]],[[1,1,1,1,3,1,1]],[[1,1,1,2],[1,2]],[[1,1,1,2],[1,3]],[[1,1,1,2],[2,2]],[[1,1,1,2,1],[2]],[[1,1,1,2,1],[3]],[[1,1,1,2,1,1,1]],[[1,1,1,2,1,1,2]],[[1,1,1,2,1,2,1]],[[1,1,1,2,2],[2]],[[1,1,1,2,2,1,1]],[[1,1,1,3],[1,2]],[[1,1,1,3,1],[2]],[[1,1,1,3,1,1,1]]] + +theorem patterns_17_8_51_verified : ∀ D ∈ patterns_17_8_51, PatternVerified 17 8 D := by + + simp only [patterns_17_8_51, List.forall_mem_cons] + + exact ⟨⟨certificate_3036, certificate_3036_valid⟩, ⟨⟨certificate_3037, certificate_3037_valid⟩, ⟨⟨certificate_3038, certificate_3038_valid⟩, ⟨⟨certificate_3039, certificate_3039_valid⟩, ⟨⟨certificate_3040, certificate_3040_valid⟩, ⟨⟨certificate_3041, certificate_3041_valid⟩, ⟨⟨certificate_3042, certificate_3042_valid⟩, ⟨⟨certificate_3043, certificate_3043_valid⟩, ⟨⟨certificate_3044, certificate_3044_valid⟩, ⟨⟨certificate_3045, certificate_3045_valid⟩, ⟨⟨certificate_3046, certificate_3046_valid⟩, ⟨⟨certificate_3047, certificate_3047_valid⟩, ⟨⟨certificate_3048, certificate_3048_valid⟩, ⟨⟨certificate_3049, certificate_3049_valid⟩, ⟨⟨certificate_3050, certificate_3050_valid⟩, ⟨⟨certificate_3051, certificate_3051_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_52 : List (List (List ℕ)) := [[[1,1,2],[1,1,2]],[[1,1,2],[1,1,3]],[[1,1,2],[1,2,1]],[[1,1,2],[1,2,2]],[[1,1,2],[1,3,1]],[[1,1,2],[2],[2]],[[1,1,2],[2],[3]],[[1,1,2],[2,1,2]],[[1,1,2,1],[1,2]],[[1,1,2,1],[1,3]],[[1,1,2,1],[2,2]],[[1,1,2,1,1],[2]],[[1,1,2,1,1],[3]],[[1,1,2,1,1,1,2]],[[1,1,2,1,1,2,1]],[[1,1,2,1,2],[2]]] + +theorem patterns_17_8_52_verified : ∀ D ∈ patterns_17_8_52, PatternVerified 17 8 D := by + + simp only [patterns_17_8_52, List.forall_mem_cons] + + exact ⟨⟨certificate_3052, certificate_3052_valid⟩, ⟨⟨certificate_3053, certificate_3053_valid⟩, ⟨⟨certificate_3054, certificate_3054_valid⟩, ⟨⟨certificate_3055, certificate_3055_valid⟩, ⟨⟨certificate_3056, certificate_3056_valid⟩, ⟨⟨certificate_3057, certificate_3057_valid⟩, ⟨⟨certificate_3058, certificate_3058_valid⟩, ⟨⟨certificate_3059, certificate_3059_valid⟩, ⟨⟨certificate_3060, certificate_3060_valid⟩, ⟨⟨certificate_3061, certificate_3061_valid⟩, ⟨⟨certificate_3062, certificate_3062_valid⟩, ⟨⟨certificate_3063, certificate_3063_valid⟩, ⟨⟨certificate_3064, certificate_3064_valid⟩, ⟨⟨certificate_3065, certificate_3065_valid⟩, ⟨⟨certificate_3066, certificate_3066_valid⟩, ⟨⟨certificate_3067, certificate_3067_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_53 : List (List (List ℕ)) := [[[1,1,2,1,2,1,1]],[[1,1,2,2],[1,2]],[[1,1,2,2,1],[2]],[[1,1,3],[1,2,1]],[[1,1,3],[2],[2]],[[1,1,3,1],[1,2]],[[1,1,3,1,1],[2]],[[1,2],[1,2],[2]],[[1,2],[1,2],[3]],[[1,2],[1,2,1,2]],[[1,2],[1,2,2,1]],[[1,2],[1,3],[2]],[[1,2],[2],[2,2]],[[1,2],[2,1,1,2]],[[1,2,1],[1,2,1]],[[1,2,1],[1,2,2]]] + +theorem patterns_17_8_53_verified : ∀ D ∈ patterns_17_8_53, PatternVerified 17 8 D := by + + simp only [patterns_17_8_53, List.forall_mem_cons] + + exact ⟨⟨certificate_3068, certificate_3068_valid⟩, ⟨⟨certificate_3069, certificate_3069_valid⟩, ⟨⟨certificate_3070, certificate_3070_valid⟩, ⟨⟨certificate_3071, certificate_3071_valid⟩, ⟨⟨certificate_3072, certificate_3072_valid⟩, ⟨⟨certificate_3073, certificate_3073_valid⟩, ⟨⟨certificate_3074, certificate_3074_valid⟩, ⟨⟨certificate_3075, certificate_3075_valid⟩, ⟨⟨certificate_3076, certificate_3076_valid⟩, ⟨⟨certificate_3077, certificate_3077_valid⟩, ⟨⟨certificate_3078, certificate_3078_valid⟩, ⟨⟨certificate_3079, certificate_3079_valid⟩, ⟨⟨certificate_3080, certificate_3080_valid⟩, ⟨⟨certificate_3081, certificate_3081_valid⟩, ⟨⟨certificate_3082, certificate_3082_valid⟩, ⟨⟨certificate_3083, certificate_3083_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8_54 : List (List (List ℕ)) := [[[1,2,1],[1,3,1]],[[1,2,1],[2],[2]],[[1,2,1],[2],[3]],[[1,2,1],[2,1,2]],[[1,2,1,1,1,1,2]],[[1,2,1,1,1,2,1]],[[1,2,1,1,2],[2]],[[1,2,1,2,1],[2]],[[1,2,2],[2],[2]],[[1,3,1],[2],[2]],[[2],[2],[2],[2]],[[2],[2],[2],[3]],[[2],[2],[2,1,2]],[[2],[2,1,1,1,2]],[[2,1,1,1,1,1,2]]] + +theorem patterns_17_8_54_verified : ∀ D ∈ patterns_17_8_54, PatternVerified 17 8 D := by + + simp only [patterns_17_8_54, List.forall_mem_cons] + + exact ⟨⟨certificate_3084, certificate_3084_valid⟩, ⟨⟨certificate_3085, certificate_3085_valid⟩, ⟨⟨certificate_3086, certificate_3086_valid⟩, ⟨⟨certificate_3087, certificate_3087_valid⟩, ⟨⟨certificate_3088, certificate_3088_valid⟩, ⟨⟨certificate_3089, certificate_3089_valid⟩, ⟨⟨certificate_3090, certificate_3090_valid⟩, ⟨⟨certificate_3091, certificate_3091_valid⟩, ⟨⟨certificate_3092, certificate_3092_valid⟩, ⟨⟨certificate_3093, certificate_3093_valid⟩, ⟨⟨certificate_3094, certificate_3094_valid⟩, ⟨⟨certificate_3095, certificate_3095_valid⟩, ⟨⟨certificate_3096, certificate_3096_valid⟩, ⟨⟨certificate_3097, certificate_3097_valid⟩, ⟨⟨certificate_3098, certificate_3098_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_17_8 : List (List (List ℕ)) := patterns_17_8_0 ++ (patterns_17_8_1 ++ (patterns_17_8_2 ++ (patterns_17_8_3 ++ (patterns_17_8_4 ++ (patterns_17_8_5 ++ (patterns_17_8_6 ++ (patterns_17_8_7 ++ (patterns_17_8_8 ++ (patterns_17_8_9 ++ (patterns_17_8_10 ++ (patterns_17_8_11 ++ (patterns_17_8_12 ++ (patterns_17_8_13 ++ (patterns_17_8_14 ++ (patterns_17_8_15 ++ (patterns_17_8_16 ++ (patterns_17_8_17 ++ (patterns_17_8_18 ++ (patterns_17_8_19 ++ (patterns_17_8_20 ++ (patterns_17_8_21 ++ (patterns_17_8_22 ++ (patterns_17_8_23 ++ (patterns_17_8_24 ++ (patterns_17_8_25 ++ (patterns_17_8_26 ++ (patterns_17_8_27 ++ (patterns_17_8_28 ++ (patterns_17_8_29 ++ (patterns_17_8_30 ++ (patterns_17_8_31 ++ (patterns_17_8_32 ++ (patterns_17_8_33 ++ (patterns_17_8_34 ++ (patterns_17_8_35 ++ (patterns_17_8_36 ++ (patterns_17_8_37 ++ (patterns_17_8_38 ++ (patterns_17_8_39 ++ (patterns_17_8_40 ++ (patterns_17_8_41 ++ (patterns_17_8_42 ++ (patterns_17_8_43 ++ (patterns_17_8_44 ++ (patterns_17_8_45 ++ (patterns_17_8_46 ++ (patterns_17_8_47 ++ (patterns_17_8_48 ++ (patterns_17_8_49 ++ (patterns_17_8_50 ++ (patterns_17_8_51 ++ (patterns_17_8_52 ++ (patterns_17_8_53 ++ (patterns_17_8_54 ++ ([]))))))))))))))))))))))))))))))))))))))))))))))))))))))) + +theorem patterns_17_8_verified : ∀ D ∈ patterns_17_8, PatternVerified 17 8 D := by + + simp only [patterns_17_8, List.forall_mem_append] + + exact ⟨patterns_17_8_0_verified, ⟨patterns_17_8_1_verified, ⟨patterns_17_8_2_verified, ⟨patterns_17_8_3_verified, ⟨patterns_17_8_4_verified, ⟨patterns_17_8_5_verified, ⟨patterns_17_8_6_verified, ⟨patterns_17_8_7_verified, ⟨patterns_17_8_8_verified, ⟨patterns_17_8_9_verified, ⟨patterns_17_8_10_verified, ⟨patterns_17_8_11_verified, ⟨patterns_17_8_12_verified, ⟨patterns_17_8_13_verified, ⟨patterns_17_8_14_verified, ⟨patterns_17_8_15_verified, ⟨patterns_17_8_16_verified, ⟨patterns_17_8_17_verified, ⟨patterns_17_8_18_verified, ⟨patterns_17_8_19_verified, ⟨patterns_17_8_20_verified, ⟨patterns_17_8_21_verified, ⟨patterns_17_8_22_verified, ⟨patterns_17_8_23_verified, ⟨patterns_17_8_24_verified, ⟨patterns_17_8_25_verified, ⟨patterns_17_8_26_verified, ⟨patterns_17_8_27_verified, ⟨patterns_17_8_28_verified, ⟨patterns_17_8_29_verified, ⟨patterns_17_8_30_verified, ⟨patterns_17_8_31_verified, ⟨patterns_17_8_32_verified, ⟨patterns_17_8_33_verified, ⟨patterns_17_8_34_verified, ⟨patterns_17_8_35_verified, ⟨patterns_17_8_36_verified, ⟨patterns_17_8_37_verified, ⟨patterns_17_8_38_verified, ⟨patterns_17_8_39_verified, ⟨patterns_17_8_40_verified, ⟨patterns_17_8_41_verified, ⟨patterns_17_8_42_verified, ⟨patterns_17_8_43_verified, ⟨patterns_17_8_44_verified, ⟨patterns_17_8_45_verified, ⟨patterns_17_8_46_verified, ⟨patterns_17_8_47_verified, ⟨patterns_17_8_48_verified, ⟨patterns_17_8_49_verified, ⟨patterns_17_8_50_verified, ⟨patterns_17_8_51_verified, ⟨patterns_17_8_52_verified, ⟨patterns_17_8_53_verified, ⟨patterns_17_8_54_verified, by simp⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +theorem patterns_17_8_coverage : patternChoices 8 9 [] = patterns_17_8 := by decide +kernel + +theorem finite_patterns_17_8 : ∀ D ∈ patternChoices 8 (17-8) [], PatternVerified 17 8 D := by + + rw [patterns_17_8_coverage] + + exact patterns_17_8_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns5x3.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns5x3.lean new file mode 100644 index 0000000000000000000000000000000000000000..f229de61699510effaf310f3fe41200a73313245 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns5x3.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates001 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_5_3_0 : List (List (List ℕ)) := [[[],[],[]],[[],[1]],[[],[2]],[[1,1]]] + +theorem patterns_5_3_0_verified : ∀ D ∈ patterns_5_3_0, PatternVerified 5 3 D := by + + simp only [patterns_5_3_0, List.forall_mem_cons] + + exact ⟨⟨certificate_0, certificate_0_valid⟩, ⟨⟨certificate_1, certificate_1_valid⟩, ⟨⟨certificate_2, certificate_2_valid⟩, ⟨⟨certificate_3, certificate_3_valid⟩, (by simp)⟩⟩⟩⟩ + +noncomputable def patterns_5_3 : List (List (List ℕ)) := patterns_5_3_0 ++ ([]) + +theorem patterns_5_3_verified : ∀ D ∈ patterns_5_3, PatternVerified 5 3 D := by + + simp only [patterns_5_3, List.forall_mem_append] + + exact ⟨patterns_5_3_0_verified, by simp⟩ + +theorem patterns_5_3_coverage : patternChoices 3 2 [] = patterns_5_3 := by decide +kernel + +theorem finite_patterns_5_3 : ∀ D ∈ patternChoices 3 (5-3) [], PatternVerified 5 3 D := by + + rw [patterns_5_3_coverage] + + exact patterns_5_3_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns5x4.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns5x4.lean new file mode 100644 index 0000000000000000000000000000000000000000..6616e25c97bd111f75656d56bd5a86ae4c70a2b5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns5x4.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates001 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_5_4_0 : List (List (List ℕ)) := [[[],[],[],[]],[[],[],[1]]] + +theorem patterns_5_4_0_verified : ∀ D ∈ patterns_5_4_0, PatternVerified 5 4 D := by + + simp only [patterns_5_4_0, List.forall_mem_cons] + + exact ⟨⟨certificate_4, certificate_4_valid⟩, ⟨⟨certificate_5, certificate_5_valid⟩, (by simp)⟩⟩ + +noncomputable def patterns_5_4 : List (List (List ℕ)) := patterns_5_4_0 ++ ([]) + +theorem patterns_5_4_verified : ∀ D ∈ patterns_5_4, PatternVerified 5 4 D := by + + simp only [patterns_5_4, List.forall_mem_append] + + exact ⟨patterns_5_4_0_verified, by simp⟩ + +theorem patterns_5_4_coverage : patternChoices 4 1 [] = patterns_5_4 := by decide +kernel + +theorem finite_patterns_5_4 : ∀ D ∈ patternChoices 4 (5-4) [], PatternVerified 5 4 D := by + + rw [patterns_5_4_coverage] + + exact patterns_5_4_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns5x5.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns5x5.lean new file mode 100644 index 0000000000000000000000000000000000000000..26f5cfbc402a952b0a108379dca060065cfcd80a --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns5x5.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates001 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_5_5_0 : List (List (List ℕ)) := [[[],[],[],[],[]]] + +theorem patterns_5_5_0_verified : ∀ D ∈ patterns_5_5_0, PatternVerified 5 5 D := by + + simp only [patterns_5_5_0, List.forall_mem_cons] + + exact ⟨⟨certificate_6, certificate_6_valid⟩, (by simp)⟩ + +noncomputable def patterns_5_5 : List (List (List ℕ)) := patterns_5_5_0 ++ ([]) + +theorem patterns_5_5_verified : ∀ D ∈ patterns_5_5, PatternVerified 5 5 D := by + + simp only [patterns_5_5, List.forall_mem_append] + + exact ⟨patterns_5_5_0_verified, by simp⟩ + +theorem patterns_5_5_coverage : patternChoices 5 0 [] = patterns_5_5 := by decide +kernel + +theorem finite_patterns_5_5 : ∀ D ∈ patternChoices 5 (5-5) [], PatternVerified 5 5 D := by + + rw [patterns_5_5_coverage] + + exact patterns_5_5_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns6x3.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns6x3.lean new file mode 100644 index 0000000000000000000000000000000000000000..295927abf3038b0d26cfcddd7e0c06419958c579 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns6x3.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates001 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_6_3_0 : List (List (List ℕ)) := [[[],[],[]],[[],[1]],[[],[2]],[[],[3]],[[1,1]],[[1,2]]] + +theorem patterns_6_3_0_verified : ∀ D ∈ patterns_6_3_0, PatternVerified 6 3 D := by + + simp only [patterns_6_3_0, List.forall_mem_cons] + + exact ⟨⟨certificate_7, certificate_7_valid⟩, ⟨⟨certificate_8, certificate_8_valid⟩, ⟨⟨certificate_9, certificate_9_valid⟩, ⟨⟨certificate_10, certificate_10_valid⟩, ⟨⟨certificate_11, certificate_11_valid⟩, ⟨⟨certificate_12, certificate_12_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_6_3 : List (List (List ℕ)) := patterns_6_3_0 ++ ([]) + +theorem patterns_6_3_verified : ∀ D ∈ patterns_6_3, PatternVerified 6 3 D := by + + simp only [patterns_6_3, List.forall_mem_append] + + exact ⟨patterns_6_3_0_verified, by simp⟩ + +theorem patterns_6_3_coverage : patternChoices 3 3 [] = patterns_6_3 := by decide +kernel + +theorem finite_patterns_6_3 : ∀ D ∈ patternChoices 3 (6-3) [], PatternVerified 6 3 D := by + + rw [patterns_6_3_coverage] + + exact patterns_6_3_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns6x4.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns6x4.lean new file mode 100644 index 0000000000000000000000000000000000000000..c3616ad86c8776031f3f61b7aaa69c85411349c2 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns6x4.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates001 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_6_4_0 : List (List (List ℕ)) := [[[],[],[],[]],[[],[],[1]],[[],[],[2]],[[],[1,1]],[[1],[1]]] + +theorem patterns_6_4_0_verified : ∀ D ∈ patterns_6_4_0, PatternVerified 6 4 D := by + + simp only [patterns_6_4_0, List.forall_mem_cons] + + exact ⟨⟨certificate_13, certificate_13_valid⟩, ⟨⟨certificate_14, certificate_14_valid⟩, ⟨⟨certificate_15, certificate_15_valid⟩, ⟨⟨certificate_16, certificate_16_valid⟩, ⟨⟨certificate_17, certificate_17_valid⟩, (by simp)⟩⟩⟩⟩⟩ + +noncomputable def patterns_6_4 : List (List (List ℕ)) := patterns_6_4_0 ++ ([]) + +theorem patterns_6_4_verified : ∀ D ∈ patterns_6_4, PatternVerified 6 4 D := by + + simp only [patterns_6_4, List.forall_mem_append] + + exact ⟨patterns_6_4_0_verified, by simp⟩ + +theorem patterns_6_4_coverage : patternChoices 4 2 [] = patterns_6_4 := by decide +kernel + +theorem finite_patterns_6_4 : ∀ D ∈ patternChoices 4 (6-4) [], PatternVerified 6 4 D := by + + rw [patterns_6_4_coverage] + + exact patterns_6_4_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns6x5.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns6x5.lean new file mode 100644 index 0000000000000000000000000000000000000000..577db2813396d249adbc9329ac778e0bc0e4b005 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns6x5.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates001 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_6_5_0 : List (List (List ℕ)) := [[[],[],[],[],[]],[[],[],[],[1]]] + +theorem patterns_6_5_0_verified : ∀ D ∈ patterns_6_5_0, PatternVerified 6 5 D := by + + simp only [patterns_6_5_0, List.forall_mem_cons] + + exact ⟨⟨certificate_18, certificate_18_valid⟩, ⟨⟨certificate_19, certificate_19_valid⟩, (by simp)⟩⟩ + +noncomputable def patterns_6_5 : List (List (List ℕ)) := patterns_6_5_0 ++ ([]) + +theorem patterns_6_5_verified : ∀ D ∈ patterns_6_5, PatternVerified 6 5 D := by + + simp only [patterns_6_5, List.forall_mem_append] + + exact ⟨patterns_6_5_0_verified, by simp⟩ + +theorem patterns_6_5_coverage : patternChoices 5 1 [] = patterns_6_5 := by decide +kernel + +theorem finite_patterns_6_5 : ∀ D ∈ patternChoices 5 (6-5) [], PatternVerified 6 5 D := by + + rw [patterns_6_5_coverage] + + exact patterns_6_5_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns6x6.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns6x6.lean new file mode 100644 index 0000000000000000000000000000000000000000..76d646e61094996373f20ba75aed2d1e10e740e0 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns6x6.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates001 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_6_6_0 : List (List (List ℕ)) := [[[],[],[],[],[],[]]] + +theorem patterns_6_6_0_verified : ∀ D ∈ patterns_6_6_0, PatternVerified 6 6 D := by + + simp only [patterns_6_6_0, List.forall_mem_cons] + + exact ⟨⟨certificate_20, certificate_20_valid⟩, (by simp)⟩ + +noncomputable def patterns_6_6 : List (List (List ℕ)) := patterns_6_6_0 ++ ([]) + +theorem patterns_6_6_verified : ∀ D ∈ patterns_6_6, PatternVerified 6 6 D := by + + simp only [patterns_6_6, List.forall_mem_append] + + exact ⟨patterns_6_6_0_verified, by simp⟩ + +theorem patterns_6_6_coverage : patternChoices 6 0 [] = patterns_6_6 := by decide +kernel + +theorem finite_patterns_6_6 : ∀ D ∈ patternChoices 6 (6-6) [], PatternVerified 6 6 D := by + + rw [patterns_6_6_coverage] + + exact patterns_6_6_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns7x3.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns7x3.lean new file mode 100644 index 0000000000000000000000000000000000000000..1da66ed98ef1c983ab652c57ed2b15b137c08c6d --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns7x3.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates001 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_7_3_0 : List (List (List ℕ)) := [[[],[],[]],[[],[1]],[[],[2]],[[],[3]],[[],[4]],[[1,1]],[[1,2]],[[1,3]],[[2,2]]] + +theorem patterns_7_3_0_verified : ∀ D ∈ patterns_7_3_0, PatternVerified 7 3 D := by + + simp only [patterns_7_3_0, List.forall_mem_cons] + + exact ⟨⟨certificate_21, certificate_21_valid⟩, ⟨⟨certificate_22, certificate_22_valid⟩, ⟨⟨certificate_23, certificate_23_valid⟩, ⟨⟨certificate_24, certificate_24_valid⟩, ⟨⟨certificate_25, certificate_25_valid⟩, ⟨⟨certificate_26, certificate_26_valid⟩, ⟨⟨certificate_27, certificate_27_valid⟩, ⟨⟨certificate_28, certificate_28_valid⟩, ⟨⟨certificate_29, certificate_29_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_7_3 : List (List (List ℕ)) := patterns_7_3_0 ++ ([]) + +theorem patterns_7_3_verified : ∀ D ∈ patterns_7_3, PatternVerified 7 3 D := by + + simp only [patterns_7_3, List.forall_mem_append] + + exact ⟨patterns_7_3_0_verified, by simp⟩ + +theorem patterns_7_3_coverage : patternChoices 3 4 [] = patterns_7_3 := by decide +kernel + +theorem finite_patterns_7_3 : ∀ D ∈ patternChoices 3 (7-3) [], PatternVerified 7 3 D := by + + rw [patterns_7_3_coverage] + + exact patterns_7_3_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns7x4.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns7x4.lean new file mode 100644 index 0000000000000000000000000000000000000000..5300adbbd168817fd192c8916c663995614c7b28 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns7x4.lean @@ -0,0 +1,49 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates001 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates002 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_7_4_0 : List (List (List ℕ)) := [[[],[],[],[]],[[],[],[1]],[[],[],[2]],[[],[],[3]],[[],[1,1]],[[],[1,2]],[[1],[1]],[[1],[2]],[[1,1,1]]] + +theorem patterns_7_4_0_verified : ∀ D ∈ patterns_7_4_0, PatternVerified 7 4 D := by + + simp only [patterns_7_4_0, List.forall_mem_cons] + + exact ⟨⟨certificate_30, certificate_30_valid⟩, ⟨⟨certificate_31, certificate_31_valid⟩, ⟨⟨certificate_32, certificate_32_valid⟩, ⟨⟨certificate_33, certificate_33_valid⟩, ⟨⟨certificate_34, certificate_34_valid⟩, ⟨⟨certificate_35, certificate_35_valid⟩, ⟨⟨certificate_36, certificate_36_valid⟩, ⟨⟨certificate_37, certificate_37_valid⟩, ⟨⟨certificate_38, certificate_38_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_7_4 : List (List (List ℕ)) := patterns_7_4_0 ++ ([]) + +theorem patterns_7_4_verified : ∀ D ∈ patterns_7_4, PatternVerified 7 4 D := by + + simp only [patterns_7_4, List.forall_mem_append] + + exact ⟨patterns_7_4_0_verified, by simp⟩ + +theorem patterns_7_4_coverage : patternChoices 4 3 [] = patterns_7_4 := by decide +kernel + +theorem finite_patterns_7_4 : ∀ D ∈ patternChoices 4 (7-4) [], PatternVerified 7 4 D := by + + rw [patterns_7_4_coverage] + + exact patterns_7_4_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns7x5.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns7x5.lean new file mode 100644 index 0000000000000000000000000000000000000000..25db53c77c37cacc1ff25aa87b0374d49660d687 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns7x5.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates002 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_7_5_0 : List (List (List ℕ)) := [[[],[],[],[],[]],[[],[],[],[1]],[[],[],[],[2]],[[],[],[1,1]],[[],[1],[1]]] + +theorem patterns_7_5_0_verified : ∀ D ∈ patterns_7_5_0, PatternVerified 7 5 D := by + + simp only [patterns_7_5_0, List.forall_mem_cons] + + exact ⟨⟨certificate_39, certificate_39_valid⟩, ⟨⟨certificate_40, certificate_40_valid⟩, ⟨⟨certificate_41, certificate_41_valid⟩, ⟨⟨certificate_42, certificate_42_valid⟩, ⟨⟨certificate_43, certificate_43_valid⟩, (by simp)⟩⟩⟩⟩⟩ + +noncomputable def patterns_7_5 : List (List (List ℕ)) := patterns_7_5_0 ++ ([]) + +theorem patterns_7_5_verified : ∀ D ∈ patterns_7_5, PatternVerified 7 5 D := by + + simp only [patterns_7_5, List.forall_mem_append] + + exact ⟨patterns_7_5_0_verified, by simp⟩ + +theorem patterns_7_5_coverage : patternChoices 5 2 [] = patterns_7_5 := by decide +kernel + +theorem finite_patterns_7_5 : ∀ D ∈ patternChoices 5 (7-5) [], PatternVerified 7 5 D := by + + rw [patterns_7_5_coverage] + + exact patterns_7_5_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns7x6.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns7x6.lean new file mode 100644 index 0000000000000000000000000000000000000000..2a1996e194d3c292fe35bf61271333207feb5ab2 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns7x6.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates002 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_7_6_0 : List (List (List ℕ)) := [[[],[],[],[],[],[]],[[],[],[],[],[1]]] + +theorem patterns_7_6_0_verified : ∀ D ∈ patterns_7_6_0, PatternVerified 7 6 D := by + + simp only [patterns_7_6_0, List.forall_mem_cons] + + exact ⟨⟨certificate_44, certificate_44_valid⟩, ⟨⟨certificate_45, certificate_45_valid⟩, (by simp)⟩⟩ + +noncomputable def patterns_7_6 : List (List (List ℕ)) := patterns_7_6_0 ++ ([]) + +theorem patterns_7_6_verified : ∀ D ∈ patterns_7_6, PatternVerified 7 6 D := by + + simp only [patterns_7_6, List.forall_mem_append] + + exact ⟨patterns_7_6_0_verified, by simp⟩ + +theorem patterns_7_6_coverage : patternChoices 6 1 [] = patterns_7_6 := by decide +kernel + +theorem finite_patterns_7_6 : ∀ D ∈ patternChoices 6 (7-6) [], PatternVerified 7 6 D := by + + rw [patterns_7_6_coverage] + + exact patterns_7_6_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns7x7.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns7x7.lean new file mode 100644 index 0000000000000000000000000000000000000000..21fb94e50575a2ba6e2413ad1599485ec7627de5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns7x7.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates002 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_7_7_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[]]] + +theorem patterns_7_7_0_verified : ∀ D ∈ patterns_7_7_0, PatternVerified 7 7 D := by + + simp only [patterns_7_7_0, List.forall_mem_cons] + + exact ⟨⟨certificate_46, certificate_46_valid⟩, (by simp)⟩ + +noncomputable def patterns_7_7 : List (List (List ℕ)) := patterns_7_7_0 ++ ([]) + +theorem patterns_7_7_verified : ∀ D ∈ patterns_7_7, PatternVerified 7 7 D := by + + simp only [patterns_7_7, List.forall_mem_append] + + exact ⟨patterns_7_7_0_verified, by simp⟩ + +theorem patterns_7_7_coverage : patternChoices 7 0 [] = patterns_7_7 := by decide +kernel + +theorem finite_patterns_7_7 : ∀ D ∈ patternChoices 7 (7-7) [], PatternVerified 7 7 D := by + + rw [patterns_7_7_coverage] + + exact patterns_7_7_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns8x4.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns8x4.lean new file mode 100644 index 0000000000000000000000000000000000000000..4aca750cde7c5124246001d1f0028dc0d3182840 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns8x4.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates002 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_8_4_0 : List (List (List ℕ)) := [[[],[],[],[]],[[],[],[1]],[[],[],[2]],[[],[],[3]],[[],[],[4]],[[],[1,1]],[[],[1,2]],[[],[1,3]],[[],[2,2]],[[1],[1]],[[1],[2]],[[1],[3]],[[1,1,1]],[[1,1,2]],[[1,2,1]],[[2],[2]]] + +theorem patterns_8_4_0_verified : ∀ D ∈ patterns_8_4_0, PatternVerified 8 4 D := by + + simp only [patterns_8_4_0, List.forall_mem_cons] + + exact ⟨⟨certificate_47, certificate_47_valid⟩, ⟨⟨certificate_48, certificate_48_valid⟩, ⟨⟨certificate_49, certificate_49_valid⟩, ⟨⟨certificate_50, certificate_50_valid⟩, ⟨⟨certificate_51, certificate_51_valid⟩, ⟨⟨certificate_52, certificate_52_valid⟩, ⟨⟨certificate_53, certificate_53_valid⟩, ⟨⟨certificate_54, certificate_54_valid⟩, ⟨⟨certificate_55, certificate_55_valid⟩, ⟨⟨certificate_56, certificate_56_valid⟩, ⟨⟨certificate_57, certificate_57_valid⟩, ⟨⟨certificate_58, certificate_58_valid⟩, ⟨⟨certificate_59, certificate_59_valid⟩, ⟨⟨certificate_60, certificate_60_valid⟩, ⟨⟨certificate_61, certificate_61_valid⟩, ⟨⟨certificate_62, certificate_62_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_8_4 : List (List (List ℕ)) := patterns_8_4_0 ++ ([]) + +theorem patterns_8_4_verified : ∀ D ∈ patterns_8_4, PatternVerified 8 4 D := by + + simp only [patterns_8_4, List.forall_mem_append] + + exact ⟨patterns_8_4_0_verified, by simp⟩ + +theorem patterns_8_4_coverage : patternChoices 4 4 [] = patterns_8_4 := by decide +kernel + +theorem finite_patterns_8_4 : ∀ D ∈ patternChoices 4 (8-4) [], PatternVerified 8 4 D := by + + rw [patterns_8_4_coverage] + + exact patterns_8_4_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns8x5.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns8x5.lean new file mode 100644 index 0000000000000000000000000000000000000000..7603a1ffa3c3517b88126d36e31ebfa3f48202da --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns8x5.lean @@ -0,0 +1,49 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates002 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates003 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_8_5_0 : List (List (List ℕ)) := [[[],[],[],[],[]],[[],[],[],[1]],[[],[],[],[2]],[[],[],[],[3]],[[],[],[1,1]],[[],[],[1,2]],[[],[1],[1]],[[],[1],[2]],[[],[1,1,1]],[[1],[1,1]]] + +theorem patterns_8_5_0_verified : ∀ D ∈ patterns_8_5_0, PatternVerified 8 5 D := by + + simp only [patterns_8_5_0, List.forall_mem_cons] + + exact ⟨⟨certificate_63, certificate_63_valid⟩, ⟨⟨certificate_64, certificate_64_valid⟩, ⟨⟨certificate_65, certificate_65_valid⟩, ⟨⟨certificate_66, certificate_66_valid⟩, ⟨⟨certificate_67, certificate_67_valid⟩, ⟨⟨certificate_68, certificate_68_valid⟩, ⟨⟨certificate_69, certificate_69_valid⟩, ⟨⟨certificate_70, certificate_70_valid⟩, ⟨⟨certificate_71, certificate_71_valid⟩, ⟨⟨certificate_72, certificate_72_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_8_5 : List (List (List ℕ)) := patterns_8_5_0 ++ ([]) + +theorem patterns_8_5_verified : ∀ D ∈ patterns_8_5, PatternVerified 8 5 D := by + + simp only [patterns_8_5, List.forall_mem_append] + + exact ⟨patterns_8_5_0_verified, by simp⟩ + +theorem patterns_8_5_coverage : patternChoices 5 3 [] = patterns_8_5 := by decide +kernel + +theorem finite_patterns_8_5 : ∀ D ∈ patternChoices 5 (8-5) [], PatternVerified 8 5 D := by + + rw [patterns_8_5_coverage] + + exact patterns_8_5_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns8x6.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns8x6.lean new file mode 100644 index 0000000000000000000000000000000000000000..5573c6ea6d97d66f7bd88e297c0e5f81d295c196 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns8x6.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates003 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_8_6_0 : List (List (List ℕ)) := [[[],[],[],[],[],[]],[[],[],[],[],[1]],[[],[],[],[],[2]],[[],[],[],[1,1]],[[],[],[1],[1]]] + +theorem patterns_8_6_0_verified : ∀ D ∈ patterns_8_6_0, PatternVerified 8 6 D := by + + simp only [patterns_8_6_0, List.forall_mem_cons] + + exact ⟨⟨certificate_73, certificate_73_valid⟩, ⟨⟨certificate_74, certificate_74_valid⟩, ⟨⟨certificate_75, certificate_75_valid⟩, ⟨⟨certificate_76, certificate_76_valid⟩, ⟨⟨certificate_77, certificate_77_valid⟩, (by simp)⟩⟩⟩⟩⟩ + +noncomputable def patterns_8_6 : List (List (List ℕ)) := patterns_8_6_0 ++ ([]) + +theorem patterns_8_6_verified : ∀ D ∈ patterns_8_6, PatternVerified 8 6 D := by + + simp only [patterns_8_6, List.forall_mem_append] + + exact ⟨patterns_8_6_0_verified, by simp⟩ + +theorem patterns_8_6_coverage : patternChoices 6 2 [] = patterns_8_6 := by decide +kernel + +theorem finite_patterns_8_6 : ∀ D ∈ patternChoices 6 (8-6) [], PatternVerified 8 6 D := by + + rw [patterns_8_6_coverage] + + exact patterns_8_6_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns8x7.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns8x7.lean new file mode 100644 index 0000000000000000000000000000000000000000..51af51f1fc17f0a127ba5b3b84fa01ca8a5e9261 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns8x7.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates003 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_8_7_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[]],[[],[],[],[],[],[1]]] + +theorem patterns_8_7_0_verified : ∀ D ∈ patterns_8_7_0, PatternVerified 8 7 D := by + + simp only [patterns_8_7_0, List.forall_mem_cons] + + exact ⟨⟨certificate_78, certificate_78_valid⟩, ⟨⟨certificate_79, certificate_79_valid⟩, (by simp)⟩⟩ + +noncomputable def patterns_8_7 : List (List (List ℕ)) := patterns_8_7_0 ++ ([]) + +theorem patterns_8_7_verified : ∀ D ∈ patterns_8_7, PatternVerified 8 7 D := by + + simp only [patterns_8_7, List.forall_mem_append] + + exact ⟨patterns_8_7_0_verified, by simp⟩ + +theorem patterns_8_7_coverage : patternChoices 7 1 [] = patterns_8_7 := by decide +kernel + +theorem finite_patterns_8_7 : ∀ D ∈ patternChoices 7 (8-7) [], PatternVerified 8 7 D := by + + rw [patterns_8_7_coverage] + + exact patterns_8_7_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns8x8.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns8x8.lean new file mode 100644 index 0000000000000000000000000000000000000000..43792061fbf192247bec359eebf5551694275186 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns8x8.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates003 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_8_8_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[],[]]] + +theorem patterns_8_8_0_verified : ∀ D ∈ patterns_8_8_0, PatternVerified 8 8 D := by + + simp only [patterns_8_8_0, List.forall_mem_cons] + + exact ⟨⟨certificate_80, certificate_80_valid⟩, (by simp)⟩ + +noncomputable def patterns_8_8 : List (List (List ℕ)) := patterns_8_8_0 ++ ([]) + +theorem patterns_8_8_verified : ∀ D ∈ patterns_8_8, PatternVerified 8 8 D := by + + simp only [patterns_8_8, List.forall_mem_append] + + exact ⟨patterns_8_8_0_verified, by simp⟩ + +theorem patterns_8_8_coverage : patternChoices 8 0 [] = patterns_8_8 := by decide +kernel + +theorem finite_patterns_8_8 : ∀ D ∈ patternChoices 8 (8-8) [], PatternVerified 8 8 D := by + + rw [patterns_8_8_coverage] + + exact patterns_8_8_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns9x4.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns9x4.lean new file mode 100644 index 0000000000000000000000000000000000000000..377d9b468afc2ff9da4cc402a851dfe0bf198388 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns9x4.lean @@ -0,0 +1,57 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates003 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates004 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_9_4_0 : List (List (List ℕ)) := [[[],[],[],[]],[[],[],[1]],[[],[],[2]],[[],[],[3]],[[],[],[4]],[[],[],[5]],[[],[1,1]],[[],[1,2]],[[],[1,3]],[[],[1,4]],[[],[2,2]],[[],[2,3]],[[1],[1]],[[1],[2]],[[1],[3]],[[1],[4]]] + +theorem patterns_9_4_0_verified : ∀ D ∈ patterns_9_4_0, PatternVerified 9 4 D := by + + simp only [patterns_9_4_0, List.forall_mem_cons] + + exact ⟨⟨certificate_81, certificate_81_valid⟩, ⟨⟨certificate_82, certificate_82_valid⟩, ⟨⟨certificate_83, certificate_83_valid⟩, ⟨⟨certificate_84, certificate_84_valid⟩, ⟨⟨certificate_85, certificate_85_valid⟩, ⟨⟨certificate_86, certificate_86_valid⟩, ⟨⟨certificate_87, certificate_87_valid⟩, ⟨⟨certificate_88, certificate_88_valid⟩, ⟨⟨certificate_89, certificate_89_valid⟩, ⟨⟨certificate_90, certificate_90_valid⟩, ⟨⟨certificate_91, certificate_91_valid⟩, ⟨⟨certificate_92, certificate_92_valid⟩, ⟨⟨certificate_93, certificate_93_valid⟩, ⟨⟨certificate_94, certificate_94_valid⟩, ⟨⟨certificate_95, certificate_95_valid⟩, ⟨⟨certificate_96, certificate_96_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_9_4_1 : List (List (List ℕ)) := [[[1,1,1]],[[1,1,2]],[[1,1,3]],[[1,2,1]],[[1,2,2]],[[1,3,1]],[[2],[2]],[[2],[3]],[[2,1,2]]] + +theorem patterns_9_4_1_verified : ∀ D ∈ patterns_9_4_1, PatternVerified 9 4 D := by + + simp only [patterns_9_4_1, List.forall_mem_cons] + + exact ⟨⟨certificate_97, certificate_97_valid⟩, ⟨⟨certificate_98, certificate_98_valid⟩, ⟨⟨certificate_99, certificate_99_valid⟩, ⟨⟨certificate_100, certificate_100_valid⟩, ⟨⟨certificate_101, certificate_101_valid⟩, ⟨⟨certificate_102, certificate_102_valid⟩, ⟨⟨certificate_103, certificate_103_valid⟩, ⟨⟨certificate_104, certificate_104_valid⟩, ⟨⟨certificate_105, certificate_105_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_9_4 : List (List (List ℕ)) := patterns_9_4_0 ++ (patterns_9_4_1 ++ ([])) + +theorem patterns_9_4_verified : ∀ D ∈ patterns_9_4, PatternVerified 9 4 D := by + + simp only [patterns_9_4, List.forall_mem_append] + + exact ⟨patterns_9_4_0_verified, ⟨patterns_9_4_1_verified, by simp⟩⟩ + +theorem patterns_9_4_coverage : patternChoices 4 5 [] = patterns_9_4 := by decide +kernel + +theorem finite_patterns_9_4 : ∀ D ∈ patternChoices 4 (9-4) [], PatternVerified 9 4 D := by + + rw [patterns_9_4_coverage] + + exact patterns_9_4_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns9x5.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns9x5.lean new file mode 100644 index 0000000000000000000000000000000000000000..86acfaf7e343340ffea4d4e8f2d99eec715edda4 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns9x5.lean @@ -0,0 +1,56 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates004 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_9_5_0 : List (List (List ℕ)) := [[[],[],[],[],[]],[[],[],[],[1]],[[],[],[],[2]],[[],[],[],[3]],[[],[],[],[4]],[[],[],[1,1]],[[],[],[1,2]],[[],[],[1,3]],[[],[],[2,2]],[[],[1],[1]],[[],[1],[2]],[[],[1],[3]],[[],[1,1,1]],[[],[1,1,2]],[[],[1,2,1]],[[],[2],[2]]] + +theorem patterns_9_5_0_verified : ∀ D ∈ patterns_9_5_0, PatternVerified 9 5 D := by + + simp only [patterns_9_5_0, List.forall_mem_cons] + + exact ⟨⟨certificate_106, certificate_106_valid⟩, ⟨⟨certificate_107, certificate_107_valid⟩, ⟨⟨certificate_108, certificate_108_valid⟩, ⟨⟨certificate_109, certificate_109_valid⟩, ⟨⟨certificate_110, certificate_110_valid⟩, ⟨⟨certificate_111, certificate_111_valid⟩, ⟨⟨certificate_112, certificate_112_valid⟩, ⟨⟨certificate_113, certificate_113_valid⟩, ⟨⟨certificate_114, certificate_114_valid⟩, ⟨⟨certificate_115, certificate_115_valid⟩, ⟨⟨certificate_116, certificate_116_valid⟩, ⟨⟨certificate_117, certificate_117_valid⟩, ⟨⟨certificate_118, certificate_118_valid⟩, ⟨⟨certificate_119, certificate_119_valid⟩, ⟨⟨certificate_120, certificate_120_valid⟩, ⟨⟨certificate_121, certificate_121_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_9_5_1 : List (List (List ℕ)) := [[[1],[1,1]],[[1],[1,2]],[[1,1],[2]],[[1,1,1,1]]] + +theorem patterns_9_5_1_verified : ∀ D ∈ patterns_9_5_1, PatternVerified 9 5 D := by + + simp only [patterns_9_5_1, List.forall_mem_cons] + + exact ⟨⟨certificate_122, certificate_122_valid⟩, ⟨⟨certificate_123, certificate_123_valid⟩, ⟨⟨certificate_124, certificate_124_valid⟩, ⟨⟨certificate_125, certificate_125_valid⟩, (by simp)⟩⟩⟩⟩ + +noncomputable def patterns_9_5 : List (List (List ℕ)) := patterns_9_5_0 ++ (patterns_9_5_1 ++ ([])) + +theorem patterns_9_5_verified : ∀ D ∈ patterns_9_5, PatternVerified 9 5 D := by + + simp only [patterns_9_5, List.forall_mem_append] + + exact ⟨patterns_9_5_0_verified, ⟨patterns_9_5_1_verified, by simp⟩⟩ + +theorem patterns_9_5_coverage : patternChoices 5 4 [] = patterns_9_5 := by decide +kernel + +theorem finite_patterns_9_5 : ∀ D ∈ patternChoices 5 (9-5) [], PatternVerified 9 5 D := by + + rw [patterns_9_5_coverage] + + exact patterns_9_5_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns9x6.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns9x6.lean new file mode 100644 index 0000000000000000000000000000000000000000..137c82e6c72924228f0b52829d09fbabac8fe063 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns9x6.lean @@ -0,0 +1,49 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates004 +import OAI.Combinatorics.Ramsey.CycleClique.Certificates005 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_9_6_0 : List (List (List ℕ)) := [[[],[],[],[],[],[]],[[],[],[],[],[1]],[[],[],[],[],[2]],[[],[],[],[],[3]],[[],[],[],[1,1]],[[],[],[],[1,2]],[[],[],[1],[1]],[[],[],[1],[2]],[[],[],[1,1,1]],[[],[1],[1,1]],[[1],[1],[1]]] + +theorem patterns_9_6_0_verified : ∀ D ∈ patterns_9_6_0, PatternVerified 9 6 D := by + + simp only [patterns_9_6_0, List.forall_mem_cons] + + exact ⟨⟨certificate_126, certificate_126_valid⟩, ⟨⟨certificate_127, certificate_127_valid⟩, ⟨⟨certificate_128, certificate_128_valid⟩, ⟨⟨certificate_129, certificate_129_valid⟩, ⟨⟨certificate_130, certificate_130_valid⟩, ⟨⟨certificate_131, certificate_131_valid⟩, ⟨⟨certificate_132, certificate_132_valid⟩, ⟨⟨certificate_133, certificate_133_valid⟩, ⟨⟨certificate_134, certificate_134_valid⟩, ⟨⟨certificate_135, certificate_135_valid⟩, ⟨⟨certificate_136, certificate_136_valid⟩, (by simp)⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩⟩ + +noncomputable def patterns_9_6 : List (List (List ℕ)) := patterns_9_6_0 ++ ([]) + +theorem patterns_9_6_verified : ∀ D ∈ patterns_9_6, PatternVerified 9 6 D := by + + simp only [patterns_9_6, List.forall_mem_append] + + exact ⟨patterns_9_6_0_verified, by simp⟩ + +theorem patterns_9_6_coverage : patternChoices 6 3 [] = patterns_9_6 := by decide +kernel + +theorem finite_patterns_9_6 : ∀ D ∈ patternChoices 6 (9-6) [], PatternVerified 9 6 D := by + + rw [patterns_9_6_coverage] + + exact patterns_9_6_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns9x7.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns9x7.lean new file mode 100644 index 0000000000000000000000000000000000000000..e35ec8840ff680fc0be0fcc2e5e5d5a4b5eaafd2 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns9x7.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates005 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_9_7_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[]],[[],[],[],[],[],[1]],[[],[],[],[],[],[2]],[[],[],[],[],[1,1]],[[],[],[],[1],[1]]] + +theorem patterns_9_7_0_verified : ∀ D ∈ patterns_9_7_0, PatternVerified 9 7 D := by + + simp only [patterns_9_7_0, List.forall_mem_cons] + + exact ⟨⟨certificate_137, certificate_137_valid⟩, ⟨⟨certificate_138, certificate_138_valid⟩, ⟨⟨certificate_139, certificate_139_valid⟩, ⟨⟨certificate_140, certificate_140_valid⟩, ⟨⟨certificate_141, certificate_141_valid⟩, (by simp)⟩⟩⟩⟩⟩ + +noncomputable def patterns_9_7 : List (List (List ℕ)) := patterns_9_7_0 ++ ([]) + +theorem patterns_9_7_verified : ∀ D ∈ patterns_9_7, PatternVerified 9 7 D := by + + simp only [patterns_9_7, List.forall_mem_append] + + exact ⟨patterns_9_7_0_verified, by simp⟩ + +theorem patterns_9_7_coverage : patternChoices 7 2 [] = patterns_9_7 := by decide +kernel + +theorem finite_patterns_9_7 : ∀ D ∈ patternChoices 7 (9-7) [], PatternVerified 9 7 D := by + + rw [patterns_9_7_coverage] + + exact patterns_9_7_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns9x8.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns9x8.lean new file mode 100644 index 0000000000000000000000000000000000000000..c95c5ccfd70e0fec75a34d4c59b2b540d43c1da5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/Patterns9x8.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.Certificates005 +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.PatternReduction + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +noncomputable def patterns_9_8_0 : List (List (List ℕ)) := [[[],[],[],[],[],[],[],[]],[[],[],[],[],[],[],[1]]] + +theorem patterns_9_8_0_verified : ∀ D ∈ patterns_9_8_0, PatternVerified 9 8 D := by + + simp only [patterns_9_8_0, List.forall_mem_cons] + + exact ⟨⟨certificate_142, certificate_142_valid⟩, ⟨⟨certificate_143, certificate_143_valid⟩, (by simp)⟩⟩ + +noncomputable def patterns_9_8 : List (List (List ℕ)) := patterns_9_8_0 ++ ([]) + +theorem patterns_9_8_verified : ∀ D ∈ patterns_9_8, PatternVerified 9 8 D := by + + simp only [patterns_9_8, List.forall_mem_append] + + exact ⟨patterns_9_8_0_verified, by simp⟩ + +theorem patterns_9_8_coverage : patternChoices 8 1 [] = patterns_9_8 := by decide +kernel + +theorem finite_patterns_9_8 : ∀ D ∈ patternChoices 8 (9-8) [], PatternVerified 9 8 D := by + + rw [patterns_9_8_coverage] + + exact patterns_9_8_verified + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/RamseyNumbers.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/RamseyNumbers.lean new file mode 100644 index 0000000000000000000000000000000000000000..d9d08a15f1f819c718312840c02aea79c12b6bfc --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/RamseyNumbers.lean @@ -0,0 +1,24 @@ +import OAI.Combinatorics.Ramsey.CycleClique.Basic + +namespace OAI + +/-! Least forcing orders and the cycle–clique Ramsey number. -/ + +namespace CycleClique + +/-- The exact least order forcing a cycle or a complementary clique. -/ +def IsRamseyNumber (m n N : ℕ) : Prop := + RamseyProperty m n N ∧ ∀ M < N, ¬ RamseyProperty m n M + +theorem cycleCliqueRamsey_eq_of_isRamseyNumber {m n N : ℕ} + (h : IsRamseyNumber m n N) : cycleCliqueRamsey m n = N := by + apply Nat.le_antisymm + · exact Nat.sInf_le h.1 + · have hmem : RamseyProperty m n (cycleCliqueRamsey m n) := + Nat.sInf_mem (s := {M : ℕ | RamseyProperty m n M}) ⟨N, h.1⟩ + by_contra hlt + exact h.2 _ (by omega) hmem + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/StructuralReduction.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/StructuralReduction.lean new file mode 100644 index 0000000000000000000000000000000000000000..89605f0c740430ac6068c00d1078987a2173e779 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/StructuralReduction.lean @@ -0,0 +1,75 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.DenseCycles +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorFrames +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.FrameProperties +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.LargeSystems +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits +import OAI.Combinatorics.Ramsey.CycleClique.OptimalSystems +import OAI.Combinatorics.Ramsey.CycleClique.ThreeCycles + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +open scoped SimpleGraph + + +theorem Frame.exists_of_cliqueNum {V : Type*} [Fintype V] {G : SimpleGraph V} + {t : ℕ} (ht : t ≤ G.cliqueNum) : Nonempty (Frame G t) := by + obtain ⟨f⟩ := (complete_isContained_iff_le_cliqueNum G t).mpr ht + exact ⟨⟨f.toEmbedding, fun i j hij => f.toHom.map_rel' (by simpa using hij)⟩⟩ + + +theorem reduced_small_impossible {V : Type*} [Fintype V] {G : SimpleGraph V} + {k a : ℕ} (hk : 3 ≤ k) (hk' : k ≤ 4) (ha : 2 ≤ a) (hak : a ≤ k) + (horder : Fintype.card V = k*a+1) (hα : G.indepNum ≤ a) + (hcycle : ¬ SimpleGraph.cycleGraph (k+1) ⊑ G) + (hexp : ∀ I, G.IsIndepSet I → I.Nonempty → + k*I.ncard+1 ≤ (closedNeighborhood G I).ncard) : False := by + obtain ⟨hl,hu⟩ := counterexample_clique_bound hk ha hak horder hα hcycle hexp + have hthree : 3 ≤ G.cliqueNum := (le_max_left _ _).trans hl + obtain ⟨T⟩ := Frame.exists_of_cliqueNum hthree + interval_cases k + · exact (show ThreeHyp G a from ⟨horder,hα,hak,hcycle,hu,hexp⟩).contradiction T + · have ho : Fintype.card V ≤ 17 := by omega + by_cases hfour : 4 ≤ G.cliqueNum + · obtain ⟨S⟩ := Frame.exists_of_cliqueNum hfour + exact small_four_clique ho hcycle hexp S + · exact (show FourHyp G from ⟨ho,hcycle,by omega,hexp⟩).contradiction T + + + +theorem reduced_large_impossible {V : Type*} [Fintype V] {G : SimpleGraph V} + {k a : ℕ} (hk : 3 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) + (horder : Fintype.card V = k*a+1) (hα : G.indepNum ≤ a) + (hcycle : ¬ SimpleGraph.cycleGraph (k+1) ⊑ G) + (hexp : ∀ I, G.IsIndepSet I → I.Nonempty → + k*I.ncard+1 ≤ (closedNeighborhood G I).ncard) + (hnine : 9 ≤ G.cliqueNum) : False := by + classical + obtain ⟨hl,hu⟩ := counterexample_clique_bound hk ha hak horder hα hcycle hexp + obtain ⟨Q,hQ⟩ := G.exists_isNClique_cliqueNum + have hc : (Q : Set V).ncard = G.cliqueNum := by + rw [Set.ncard_coe_finset,hQ.card_eq] + obtain ⟨P,hP⟩ := PathSystem.exists_optimal G (Q : Set V) (k:=k) (by omega) + have hhalf : k/2 ≤ G.cliqueNum := (le_max_right _ _).trans hl + have H : LargeSystem G (Q : Set V) k P := + ⟨hP,hQ.isClique,hcycle,by omega,by omega,by omega,by omega,hα.trans hak,hexp⟩ + exact H.contradiction + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/SystemInsertion.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/SystemInsertion.lean new file mode 100644 index 0000000000000000000000000000000000000000..a80e6de55404d6600930b6b11cbef86f91de3579 --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/SystemInsertion.lean @@ -0,0 +1,201 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorPaths +import OAI.Combinatorics.Ramsey.CycleClique.MarkedChains +import OAI.Combinatorics.Ramsey.CycleClique.OptimalSystems +import OAI.Combinatorics.Ramsey.CycleClique.PathSystems + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph +attribute [local instance] Classical.propDecidable + +theorem PathSystem.vertices_ncard {V : Type*} [Fintype V] {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) : P.vertices.ncard = Q.ncard + P.amount := by + classical + have he : P.vertices = (↑P.chains.flatten.toFinset : Set V) := by ext; simp + rw [he, Set.ncard_coe_finset, List.toFinset_card_of_nodup P.nodup, P.flat_length] + +theorem OutsidePath.to_list {V : Type*} {G : SimpleGraph V} {X : Set V} {x y : V} {d : ℕ} + (h : OutsidePath G X x y d) : + ∃ I : List V, I.length = d ∧ (x :: I ++ [y]).IsChain G.Adj ∧ + I.Nodup ∧ ∀ a ∈ I, a ∉ X := by + obtain ⟨hx, hy, hxy, p, hp, hlen, hs⟩ := h + cases p with + | nil => simp at hlen + | cons hadj q => + let I := q.support.dropLast + have he : q.support = I ++ [y] := by + simpa only [I, q.getLast_support] using (List.dropLast_concat_getLast q.support_ne_nil).symm + have hn : (x :: I ++ [y]).Nodup := by + simpa only [SimpleGraph.Walk.support_cons, he, List.cons_append] using hp.support_nodup + have htail := (List.nodup_cons.mp hn).2 + have hi := (List.nodup_append.mp htail).1 + have hxI : x ∉ I := fun hx => (List.nodup_cons.mp hn).1 (by simp [hx]) + have hyI : y ∉ I := fun hy => (List.nodup_append.mp htail).2.2 y hy y (by simp) rfl + refine ⟨I, ?_, ?_, hi, ?_⟩ + · have hl := q.length_support + rw [he, List.length_append, List.length_singleton] at hl + simp only [SimpleGraph.Walk.length_cons] at hlen + omega + · simpa only [SimpleGraph.Walk.support_cons, he, List.cons_append] using + (SimpleGraph.Walk.cons hadj q).isChain_adj_support + · intro a ha haX + rcases hs a (by simp only [SimpleGraph.Walk.support_cons, he, List.mem_cons, + List.mem_append]; exact Or.inr (Or.inl ha)) haX with rfl | rfl + · exact hxI ha + · exact hyI ha + +theorem positive_interior_chain {V : Type*} {Q : Set V} {x y : V} {I : List V} + (hne : I ≠ []) (hout : ∀ a ∈ I, a ∉ Q) : + (x :: I ++ [y]).IsChain (fun a b => a ∉ Q ∨ b ∉ Q) := by + induction I generalizing x with + | nil => contradiction + | cons a I ih => + have ha := hout a (by simp) + apply List.isChain_cons.mpr + constructor + · intro b hb + have he : a = b := by simpa using hb + exact Or.inr (he ▸ ha) + · cases I with + | nil => simpa using (Or.inl ha : a ∉ Q ∨ y ∉ Q) + | cons b I => + exact ih (by simp) (fun c hc => hout c (by simp [hc])) + +theorem PathSystem.no_one_representatives {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} {k : ℕ} (P : PathSystem G Q) + (hopt : P.Optimal k) (hk : 3 ≤ k) (hQ : G.IsClique Q) + (hcycle : ¬ SimpleGraph.cycleGraph (k + 1) ⊑ G) (ht : Q.ncard ≤ k) + {x y : V} (hx : x ∈ P.reps) (hy : y ∈ P.reps) : + ¬ OutsidePath G P.vertices x y 1 := by + intro hp + obtain ⟨I, hIl, hI, hIn, hIo⟩ := hp.to_list + have hip : (x :: I ++ [y]).IsChain (fun a b => a ∉ Q ∨ b ∉ Q) := + positive_interior_chain (by intro h; simp [h] at hIl) + (fun a ha hQ => hIo a ha (P.cover a hQ)) + have hid : I.Disjoint P.chains.flatten := List.disjoint_left.mpr hIo + obtain ⟨R, hR⟩ := P.representative_replacement hx hy hp.2.2.1 I hI hip hIn hid + have hr : R.incident ≤ Q.ncard := Nat.sub_le _ _ + have hh := hopt.1 + apply P.optimality hopt hk hQ hcycle ht R (by omega) (by omega) + omega + +theorem isChain_insert_step {V : Type*} {R : V → V → Prop} {A I B : List V} {x y : V} + (hc : (A ++ x :: y :: B).IsChain R) (hI : (x :: I ++ [y]).IsChain R) : + (A ++ x :: I ++ y :: B).IsChain R := by + have hp : (A ++ [x]).IsChain R := by + apply List.IsChain.left_of_append (l₂ := y :: B) + simpa only [List.append_assoc, List.singleton_append] using hc + have hs : (y :: B).IsChain R := by + apply List.IsChain.right_of_append (l₁ := A ++ [x]) + simpa only [List.append_assoc, List.singleton_append] using hc + have h₁ : (A ++ [x] ++ (I ++ [y])).IsChain R := hp.append_overlap hI (by simp) + have h₂ : (A ++ [x] ++ I ++ [y] ++ B).IsChain R := + (show (A ++ [x] ++ I ++ [y]).IsChain R by simpa only [List.append_assoc] using h₁).append_overlap + hs (by simp) + simpa only [List.append_assoc, List.singleton_append] using h₂ + +theorem PathSystem.insert_step {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) + {c : List V} (hc : c ∈ P.chains) {x y : V} (A I B : List V) + (he : c = A ++ x :: y :: B) + (hI : (x :: I ++ [y]).IsChain G.Adj) + (hIp : (x :: I ++ [y]).IsChain (fun a b => a ∉ Q ∨ b ∉ Q)) + (hIn : I.Nodup) (hId : I.Disjoint P.chains.flatten) : + ∃ R : PathSystem G Q, R.amount = P.amount + I.length ∧ R.edgeCount = P.edgeCount := by + classical + let D := P.chains.erase c + let J := A ++ x :: I ++ y :: B + have hp : P.chains.Perm (c :: D) := List.perm_cons_erase hc + have hj : (J ++ D.flatten).Perm (I ++ P.chains.flatten) := by + apply List.Perm.trans _ (hp.flatten.symm.append_left I) + simp only [List.flatten_cons, he, J] + apply Multiset.coe_eq_coe.mp + simp only [← Multiset.coe_add, ← Multiset.cons_coe, Multiset.cons_add, Multiset.add_cons] + ac_nf + exact Multiset.cons_swap .. + have hnd : (J ++ D.flatten).Nodup := hj.nodup_iff.mpr + (List.nodup_append.mpr ⟨hIn, P.nodup, fun a ha b hb hab => + List.disjoint_left.mp hId ha (hab ▸ hb)⟩) + have hje : (∀ a ∈ J.head?, a ∈ Q) ∧ ∀ a ∈ J.getLast?, a ∈ Q := by + have hh := P.ends c hc + constructor + · simpa only [he, J, List.append_assoc, List.cons_append, List.head?_append, List.head?_cons] using hh.1 + · have hec : c = (A ++ [x]) ++ y :: B := by simp only [he, List.append_assoc, List.singleton_append] + have hej : J = (A ++ [x] ++ I) ++ y :: B := by + simp only [J, List.append_assoc, List.cons_append, List.nil_append] + simpa only [hec, hej, List.getLast?_append_of_ne_nil _ (by simp : y :: B ≠ [])] using hh.2 + let R : PathSystem G Q := + { chains := J :: D + nonempty := by + intro d hd + simp only [List.mem_cons] at hd + rcases hd with rfl | hd + · simp [J] + · exact P.nonempty d (List.mem_of_mem_erase hd) + nodup := hnd + edges := by + intro d hd + simp only [List.mem_cons] at hd + rcases hd with rfl | hd + · exact isChain_insert_step (he ▸ P.edges c hc) hI + · exact P.edges d (List.mem_of_mem_erase hd) + positive := by + intro d hd + simp only [List.mem_cons] at hd + rcases hd with rfl | hd + · exact isChain_insert_step (he ▸ P.positive c hc) hIp + · exact P.positive d (List.mem_of_mem_erase hd) + ends := by + intro d hd + simp only [List.mem_cons] at hd + rcases hd with rfl | hd + · exact hje + · exact P.ends d (List.mem_of_mem_erase hd) + cover := by + intro a ha + exact hj.mem_iff.mpr (List.mem_append_right _ (P.cover a ha)) } + refine ⟨R, ?_, ?_⟩ + · have hh := hj.length_eq + simp only [List.length_append, P.flat_length] at hh + change (J ++ D.flatten).length - Q.ncard = P.amount + I.length + rw [List.length_append] + omega + · have hh := hp.length_eq + change Q.ncard - (J :: D).length = Q.ncard - P.chains.length + simp only [List.length_cons] at hh ⊢ + omega + +theorem PathSystem.no_one_consecutive {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} {k : ℕ} (P : PathSystem G Q) + (hopt : P.Optimal k) (hk : 3 ≤ k) (hQ : G.IsClique Q) + (hcycle : ¬ SimpleGraph.cycleGraph (k + 1) ⊑ G) (ht : Q.ncard ≤ k) + {c : List V} (hc : c ∈ P.chains) {x y : V} (A B : List V) + (he : c = A ++ x :: y :: B) : + ¬ OutsidePath G P.vertices x y 1 := by + intro hp + obtain ⟨I, hIl, hI, hIn, hIo⟩ := hp.to_list + have hip : (x :: I ++ [y]).IsChain (fun a b => a ∉ Q ∨ b ∉ Q) := + positive_interior_chain (by intro h; simp [h] at hIl) + (fun a ha hQ => hIo a ha (P.cover a hQ)) + obtain ⟨R, hR, _⟩ := P.insert_step hc A I B he hI hip hIn (List.disjoint_left.mpr hIo) + have hr : R.incident ≤ Q.ncard := Nat.sub_le _ _ + have hh := hopt.1 + apply P.optimality hopt hk hQ hcycle ht R (by omega) (by omega) + omega + +abbrev PathSystem.representatives {V : Type*} {G : SimpleGraph V} {Q : Set V} + (P : PathSystem G Q) : Set V := {v | v ∈ P.reps} + +theorem PathSystem.representatives_ncard {V : Type*} [Fintype V] + {G : SimpleGraph V} {Q : Set V} (P : PathSystem G Q) : + P.representatives.ncard = Q.ncard := by + classical + have he : P.representatives = (↑P.reps.toFinset : Set V) := by ext; simp + rw [he, Set.ncard_coe_finset, List.toFinset_card_of_nodup (P.nodup.sublist P.reps_sublist), + P.reps_length] + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/CycleClique/ThreeCycles.lean b/lean/OAI/Combinatorics/Ramsey/CycleClique/ThreeCycles.lean new file mode 100644 index 0000000000000000000000000000000000000000..09b440d0feaf44ed048ae864547e609f3c72adcf --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/CycleClique/ThreeCycles.lean @@ -0,0 +1,279 @@ +import Mathlib +import OAI.Combinatorics.Ramsey.CycleClique.BallPacking +import OAI.Combinatorics.Ramsey.CycleClique.Basic +import OAI.Combinatorics.Ramsey.CycleClique.CachedDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CertificateModel +import OAI.Combinatorics.Ramsey.CycleClique.CliqueBits +import OAI.Combinatorics.Ramsey.CycleClique.CompactDecisions +import OAI.Combinatorics.Ramsey.CycleClique.CompactLabels +import OAI.Combinatorics.Ramsey.CycleClique.DistanceLayers +import OAI.Combinatorics.Ramsey.CycleClique.EdgeBits +import OAI.Combinatorics.Ramsey.CycleClique.EdgeDecisions +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorFrames +import OAI.Combinatorics.Ramsey.CycleClique.ExteriorPaths +import OAI.Combinatorics.Ramsey.CycleClique.FiniteGraphs +import OAI.Combinatorics.Ramsey.CycleClique.FourCycles +import OAI.Combinatorics.Ramsey.CycleClique.FrameProperties +import OAI.Combinatorics.Ramsey.CycleClique.Independence +import OAI.Combinatorics.Ramsey.CycleClique.InducedGraphs +import OAI.Combinatorics.Ramsey.CycleClique.LabelDecisions +import OAI.Combinatorics.Ramsey.CycleClique.MatrixBits + +namespace OAI + +namespace CycleClique +open scoped SimpleGraph + +structure ThreeHyp {V : Type*} [Fintype V] (G : SimpleGraph V) (a : ℕ) : Prop where + order : Fintype.card V = 3*a+1 + alpha : G.indepNum ≤ a + a_max : a ≤ 3 + cycle : ¬ SimpleGraph.cycleGraph 4 ⊑ G + clique : G.cliqueNum ≤ 3 + expansion : ∀ I, G.IsIndepSet I → I.Nonempty → 3*I.ncard+1 ≤ (closedNeighborhood G I).ncard + +namespace ThreeHyp +variable {V : Type*} [Fintype V] {G : SimpleGraph V} {a : ℕ} (H : ThreeHyp G a) +include H + +theorem separated (T : Frame G 3) {i j : Fin 3} (hij : i ≠ j) : + Disjoint (T.U i) (T.U j) ∧ ∀ u ∈ T.U i, ∀ v ∈ T.U j, ¬ G.Adj u v := by + rw [T.U_ball,T.U_ball] + apply outside_balls_separated (T.memQ i) (T.memQ j) (fun he => hij (T.q.injective he)) + intro d hd hd' + apply outsidePath_clique_forbidden T.clique (by omega) (by rw [T.cardQ]) H.cycle + · rw [T.cardQ] + omega + · omega + +theorem U_nonempty (T : Frame G 3) (i : Fin 3) : (T.U i).Nonempty := by + have hd := T.U_degree H.expansion i + exact (Set.ncard_pos).mp (by omega) + +theorem alpha_sum (T : Frame G 3) : ∑ i, independence G (T.U i) ≤ a := by + classical + have hh := sum_independence_layers G T.U (fun _ _ hij => (H.separated T hij).1) + Finset.univ (fun _ _ _ _ hij => (H.separated T hij).2) + have hb := independence_mono (G:=G) (Set.subset_univ (⋃ i ∈ Finset.univ,T.U i)) + rw [independence_univ] at hb + exact hh.trans (hb.trans H.alpha) + +theorem a_eq (T : Frame G 3) : a=3 := by + have hs := H.alpha_sum T + rw [Fin.sum_univ_three] at hs + have h0 := independence_pos (G:=G) (H.U_nonempty T 0) + have h1 := independence_pos (G:=G) (H.U_nonempty T 1) + have h2 := independence_pos (G:=G) (H.U_nonempty T 2) + have := H.a_max + omega + +theorem U_clique (T : Frame G 3) (i : Fin 3) : G.IsClique (T.U i) := by + have hs := H.alpha_sum T + rw [Fin.sum_univ_three] at hs + have h0 := independence_pos (G:=G) (H.U_nonempty T 0) + have h1 := independence_pos (G:=G) (H.U_nonempty T 1) + have h2 := independence_pos (G:=G) (H.U_nonempty T 2) + have := H.a_max + apply clique_of_independence_le_one + fin_cases i <;> dsimp at * <;> omega + +theorem U_card (T : Frame G 3) (i : Fin 3) : 1 ≤ (T.U i).ncard ∧ (T.U i).ncard ≤ 2 := by + have hmin := (Set.ncard_pos).mpr (H.U_nonempty T i) + have hmax := T.clique_U_bound H.clique i (H.U_clique T i) + omega + + +def W (T : Frame G 3) : Set V := T.Qᶜ \ ⋃ i,T.U i + +omit H in +theorem W_outside (_H : ThreeHyp G a) (T : Frame G 3) : W T ⊆ T.Qᶜ := Set.sdiff_subset + +omit H in +theorem W_not_U (_H : ThreeHyp G a) (T : Frame G 3) {w : V} + (hw : w ∈ W T) (i : Fin 3) : w ∉ T.U i := + fun hh => hw.2 (Set.mem_iUnion.mpr ⟨i,hh⟩) + +theorem W_nonadj_Q (T : Frame G 3) {w : V} (hw : w ∈ W T) (i : Fin 3) : ¬ G.Adj w (T.q i) := + fun hh => H.W_not_U T hw i ⟨hh.symm,hw.1⟩ + +theorem W_card (T : Frame G 3) : + (W T).ncard + ((T.U 0).ncard + (T.U 1).ncard + (T.U 2).ncard) = 7 := by + classical + have hd : Pairwise (fun i j => Disjoint (T.U i) (T.U j)) := + fun _ _ hij => (H.separated T hij).1 + have hsum := ncard_union_layers T.U hd Finset.univ + simp only [Finset.mem_univ,Set.iUnion_true] at hsum + rw [Fin.sum_univ_three] at hsum + have hsub : (⋃ i,T.U i) ⊆ T.Qᶜ := by + intro u hu + obtain ⟨i,hi⟩ := Set.mem_iUnion.mp hu + exact hi.2 + have he := Set.ncard_sdiff_add_ncard_of_subset hsub + have hq := Set.ncard_add_ncard_compl T.Q + rw [T.cardQ,Nat.card_eq_fintype_card,H.order,H.a_eq T] at hq + change (W T).ncard+(⋃ i,T.U i).ncard = _ at he + omega + +theorem W_nonempty (T : Frame G 3) : (W T).Nonempty := by + have hw := H.W_card T + have h0 := H.U_card T 0 + have h1 := H.U_card T 1 + have h2 := H.U_card T 2 + exact (Set.ncard_pos).mp (by omega) + + +theorem W_at_most_one (T : Frame G 3) {w u v : V} (hw : w ∈ W T) {i : Fin 3} + (hu : u ∈ T.U i) (hv : v ∈ T.U i) (hwu : G.Adj w u) (hwv : G.Adj w v) : u=v := by + by_contra huv + have hnw := T.neQ hw.1 + have hnu := T.neQ hu.2 + have hnv := T.neQ hv.2 + apply H.cycle + apply cycle_of_list [w,u,T.q i,v] (by simp) + · simp [hwu.ne,hwv.ne,hnw,hnu,Ne.symm (hnv i),huv] + · simpa using And.intro hwu (And.intro hu.1.symm hv.1) + · simpa using hwv.symm + + +theorem indep_four_bound {w u v z : V} + (hwu : w ≠ u) (hwv : w ≠ v) (hwz : w ≠ z) + (huv : u ≠ v) (huz : u ≠ z) (hvz : v ≠ z) + (nwu : ¬ G.Adj w u) (nwv : ¬ G.Adj w v) (nwz : ¬ G.Adj w z) + (nuv : ¬ G.Adj u v) (nuz : ¬ G.Adj u z) (nvz : ¬ G.Adj v z) : False := by + have hI : G.IsIndepSet {w,u,v,z} := by + intro x hx y hy hxy hadj + simp only [Set.mem_insert_iff,Set.mem_singleton_iff] at hx hy + rcases hx with rfl | rfl | rfl | rfl <;> rcases hy with rfl | rfl | rfl | rfl <;> + first | exact hxy rfl | exact nwu hadj | exact nwu hadj.symm | + exact nwv hadj | exact nwv hadj.symm | exact nwz hadj | exact nwz hadj.symm | + exact nuv hadj | exact nuv hadj.symm | exact nuz hadj | exact nuz hadj.symm | + exact nvz hadj | exact nvz hadj.symm + have hc : ({w,u,v,z} : Set V).ncard=4 := by + simp [Set.ncard_insert_of_notMem,hwu,hwv,hwz,huv,huz,hvz] + have hb := (indep_ncard_le hI).trans H.alpha + have := H.a_max + omega + + +theorem W_no_two_misses (T : Frame G 3) {w u v : V} (hw : w ∈ W T) + {i j : Fin 3} (hij : i ≠ j) (hu : u ∈ T.U i) (hv : v ∈ T.U j) + (hwu : ¬ G.Adj w u) (hwv : ¬ G.Adj w v) : False := by + obtain ⟨l,hli,hlj⟩ : ∃ l : Fin 3, l ≠ i ∧ l ≠ j := by + fin_cases i <;> fin_cases j <;> decide + have hdis := (H.separated T hij).1 + have hnu := T.neQ hu.2 + have hnv := T.neQ hv.2 + apply H.indep_four_bound (w:=w) (u:=u) (v:=v) (z:=T.q l) (fun he => H.W_not_U T hw i (he ▸ hu)) + (fun he => H.W_not_U T hw j (he ▸ hv)) (T.neQ hw.1 l) + (fun he => Set.disjoint_left.mp hdis hu (he ▸ hv)) (hnu l) (hnv l) + hwu hwv (H.W_nonadj_Q T hw l) ((H.separated T hij).2 u hu v hv) + · intro hh + exact Set.disjoint_left.mp (H.separated T hli).1 ⟨hh.symm,hu.2⟩ hu + · intro hh + exact Set.disjoint_left.mp (H.separated T hlj).1 ⟨hh.symm,hv.2⟩ hv + + +theorem W_two_complete (T : Frame G 3) {w : V} (hw : w ∈ W T) : + ∃ h : Fin 3, ∀ i, i ≠ h → ∀ u ∈ T.U i, G.Adj w u := by + classical + by_cases hbad : ∃ i : Fin 3, ¬ ∀ u ∈ T.U i, G.Adj w u + · obtain ⟨h,hh⟩ := hbad + push Not at hh + obtain ⟨v,hv,hwv⟩ := hh + refine ⟨h,?_⟩ + intro i hih u hu + by_contra hwu + exact H.W_no_two_misses T hw hih hu hv hwu hwv + · push Not at hbad + exact ⟨0,fun i _ => hbad i⟩ + +theorem W_complete_singleton (T : Frame G 3) {w : V} (hw : w ∈ W T) (i : Fin 3) + (hi : ∀ u ∈ T.U i, G.Adj w u) : (T.U i).ncard=1 := by + obtain ⟨u,hu⟩ := H.U_nonempty T i + have he : T.U i={u} := by + apply Set.eq_singleton_iff_unique_mem.mpr + refine ⟨hu,?_⟩ + intro v hv + exact H.W_at_most_one T hw hv hu (hi v hv) (hi u hu) + simp [he] + +theorem W_at_least_three (T : Frame G 3) : 3 ≤ (W T).ncard := by + obtain ⟨w,hw⟩ := H.W_nonempty T + obtain ⟨h,hh⟩ := H.W_two_complete T hw + have hs := H.W_card T + have hmax := (H.U_card T h).2 + have hc : ∀ i, i ≠ h → (T.U i).ncard=1 := by + intro i hi + exact H.W_complete_singleton T hw i (hh i hi) + fin_cases h + · have h1 := hc 1 (by decide) + have h2 := hc 2 (by decide) + dsimp at * + omega + · have h0 := hc 0 (by decide) + have h2 := hc 2 (by decide) + dsimp at * + omega + · have h0 := hc 0 (by decide) + have h1 := hc 1 (by decide) + dsimp at * + omega + + +theorem no_two_common {x y u v : V} (hxy : x ≠ y) (huv : u ≠ v) + (hxu : G.Adj x u) (hxv : G.Adj x v) (hyu : G.Adj y u) (hyv : G.Adj y v) : False := by + apply H.cycle + apply cycle_of_list [x,u,y,v] (by simp) + · simp [hxu.ne,hxv.ne,hyu.ne.symm,hyv.ne,hxy,huv] + · simpa using And.intro hxu (And.intro hyu.symm hyv) + · simpa using hxv.symm + + + +theorem contradiction (T : Frame G 3) : False := by + classical + let f : W T → Fin 3 := fun w => (H.W_two_complete T w.property).choose + have hf : ∀ w : W T, ∀ i, i ≠ f w → ∀ u ∈ T.U i, G.Adj w.val u := + fun w => (H.W_two_complete T w.property).choose_spec + have hinj : Function.Injective f := by + intro w w' he + apply Subtype.ext + by_contra hww + obtain ⟨i,j,hij,hi,hj⟩ : ∃ i j : Fin 3, i ≠ j ∧ i ≠ f w ∧ j ≠ f w := by + generalize f w = l + fin_cases l <;> decide + obtain ⟨u,hu⟩ := H.U_nonempty T i + obtain ⟨v,hv⟩ := H.U_nonempty T j + have huv : u ≠ v := fun he => Set.disjoint_left.mp (H.separated T hij).1 hu (he ▸ hv) + exact H.no_two_common hww huv (hf w i hi u hu) (hf w j hj v hv) + (hf w' i (he ▸ hi) u hu) (hf w' j (he ▸ hj) v hv) + have hcW : Fintype.card (W T)=(W T).ncard := by + rw [← Nat.card_eq_fintype_card,Nat.card_coe_set_eq] + have hupper : (W T).ncard ≤ 3 := by + have hh := Fintype.card_le_of_injective f hinj + simpa only [hcW,Fintype.card_fin] using hh + have hlower := H.W_at_least_three T + have hvar : ∀ i : Fin 3, ∃ w : W T, f w ≠ i := by + intro i + by_contra hh + push Not at hh + have hsub : Subsingleton (W T) := ⟨fun w w' => hinj ((hh w).trans (hh w').symm)⟩ + have hhcard := Fintype.card_le_one_iff_subsingleton.mpr hsub + rw [hcW] at hhcard + omega + have hone : ∀ i, (T.U i).ncard=1 := by + intro i + obtain ⟨w,hw⟩ := hvar i + exact H.W_complete_singleton T w.property i (hf w i hw.symm) + have h0 := hone 0 + have h1 := hone 1 + have h2 := hone 2 + have hc := H.W_card T + omega + +end ThreeHyp + +end CycleClique + +end OAI diff --git a/lean/OAI/Combinatorics/Ramsey/Hypercube.lean b/lean/OAI/Combinatorics/Ramsey/Hypercube.lean new file mode 100644 index 0000000000000000000000000000000000000000..85b63c945564adbfc1cad2343af84ecca5e2891f --- /dev/null +++ b/lean/OAI/Combinatorics/Ramsey/Hypercube.lean @@ -0,0 +1,287 @@ +import Mathlib + +namespace OAI + +/-! Finite Ramsey bounds, cross-edge colorings, and counterexample sequences for a proposed linear hypercube Ramsey bound. -/ + +namespace HypercubeRamsey + +abbrev CubeVertex (n : ℕ) := Fin n → Bool + +def cube (n : ℕ) : SimpleGraph (CubeVertex n) where + Adj x y := hammingDist x y = 1 + symm := ⟨fun x y h => (hammingDist_comm y x).trans h⟩ + loopless := ⟨by intro x; simp⟩ + +def RamseyProperty {V : Type*} (H : SimpleGraph V) (M : ℕ) : Prop := + ∀ G : SimpleGraph (Fin M), Nonempty (H.Copy G) ∨ Nonempty (H.Copy Gᶜ) + +noncomputable def ramseyNumber {V : Type*} [Fintype V] (H : SimpleGraph V) : ℕ := + sInf {M : ℕ | 0 < M ∧ RamseyProperty H M} + +open Finset + +theorem finite_clique_ramsey (m n : ℕ) : + ∀ {V : Type*} (G : SimpleGraph V) (s : Finset V), + 2 ^ (m + n) ≤ s.card → + (∃ t : Finset V, t ⊆ s ∧ t.card = m ∧ G.IsClique (t : Set V)) ∨ + (∃ t : Finset V, t ⊆ s ∧ t.card = n ∧ Gᶜ.IsClique (t : Set V)) := by + classical + induction m generalizing n with + | zero => + intro V G s _ + exact Or.inl ⟨∅, empty_subset _, rfl, by simp⟩ + | succ m ihm => + induction n with + | zero => + intro V G s _ + exact Or.inr ⟨∅, empty_subset _, rfl, by simp⟩ + | succ n ihn => + intro V G s hs + obtain ⟨v, hv⟩ := card_pos.mp (lt_of_lt_of_le (by positivity) hs) + let a := (s.erase v).filter (G.Adj v) + let b := (s.erase v).filter (fun w => ¬ G.Adj v w) + have ha : a ⊆ s := (filter_subset _ _).trans (erase_subset _ _) + have hb : b ⊆ s := (filter_subset _ _).trans (erase_subset _ _) + have hv_a : v ∉ a := by simp [a] + have hv_b : v ∉ b := by simp [b] + have hpart : a.card + b.card = s.card - 1 := by + simpa [a, b, card_erase_of_mem hv] using + (card_filter_add_card_filter_not (s := s.erase v) (G.Adj v)) + have hp : 2 ^ (m + 1 + (n + 1)) = 2 * 2 ^ (m + n + 1) := by + rw [show m + 1 + (n + 1) = (m + n + 1) + 1 by omega, pow_succ] + omega + have hex : 2 ^ (m + n + 1) ≤ a.card ∨ 2 ^ (m + n + 1) ≤ b.card := by + rw [hp] at hs + omega + rcases hex with h | h + · rcases ihm (n + 1) G a (by simpa [Nat.add_assoc] using h) with + ⟨t, ht, hcard, hclique⟩ | ⟨t, ht, hcard, hclique⟩ + · refine Or.inl ⟨insert v t, insert_subset hv (ht.trans ha), ?_, ?_⟩ + · rw [card_insert_of_notMem (fun hvt => hv_a (ht hvt)), hcard] + · rw [coe_insert] + exact hclique.insert fun w hw _ => (mem_filter.mp (ht hw)).2 + · exact Or.inr ⟨t, ht.trans ha, hcard, hclique⟩ + · rcases ihn G b (by simpa [Nat.add_assoc, Nat.add_comm, Nat.add_left_comm] using h) with + ⟨t, ht, hcard, hclique⟩ | ⟨t, ht, hcard, hclique⟩ + · exact Or.inl ⟨t, ht.trans hb, hcard, hclique⟩ + · refine Or.inr ⟨insert v t, insert_subset hv (ht.trans hb), ?_, ?_⟩ + · rw [card_insert_of_notMem (fun hvt => hv_b (ht hvt)), hcard] + · rw [coe_insert] + exact hclique.insert fun w hw hne => ⟨hne, (mem_filter.mp (ht hw)).2⟩ + +theorem copy_of_clique {V W : Type*} [Fintype V] (H : SimpleGraph V) + (G : SimpleGraph W) {s : Finset W} (hcard : s.card = Fintype.card V) + (hc : G.IsClique (s : Set W)) : Nonempty (H.Copy G) := by + classical + let e : V ≃ s := Fintype.equivOfCardEq (by simpa using hcard.symm) + exact ⟨{ + toHom := { + toFun := fun v => (e v).val + map_rel' := fun {v w} hvw => hc (e v).property (e w).property + (fun heq => hvw.ne (e.injective (Subtype.ext heq))) } + injective' := fun _ _ heq => e.injective (Subtype.ext heq) }⟩ + +theorem ramseyProperty_exp_bound {V : Type*} [Fintype V] (H : SimpleGraph V) : + RamseyProperty H (2 ^ (Fintype.card V + Fintype.card V)) := by + intro G + rcases finite_clique_ramsey (Fintype.card V) (Fintype.card V) G univ + (by simp) with ⟨t, _, ht, hc⟩ | ⟨t, _, ht, hc⟩ + · exact Or.inl (copy_of_clique H G ht hc) + · exact Or.inr (copy_of_clique H Gᶜ ht hc) + +theorem ramsey_set_nonempty {V : Type*} [Fintype V] (H : SimpleGraph V) : + {M : ℕ | 0 < M ∧ RamseyProperty H M}.Nonempty := + ⟨2 ^ (Fintype.card V + Fintype.card V), by positivity, ramseyProperty_exp_bound H⟩ + +theorem ramseyNumber_spec {V : Type*} [Fintype V] (H : SimpleGraph V) : + 0 < ramseyNumber H ∧ RamseyProperty H (ramseyNumber H) := + csInf_mem (ramsey_set_nonempty H) + +theorem ramseyNumber_le {V : Type*} [Fintype V] (H : SimpleGraph V) + {M : ℕ} (hM : 0 < M) (h : RamseyProperty H M) : ramseyNumber H ≤ M := + csInf_le' ⟨hM, h⟩ + +theorem ramseyNumber_exp_bound {V : Type*} [Fintype V] (H : SimpleGraph V) : + ramseyNumber H ≤ 2 ^ (Fintype.card V + Fintype.card V) := + ramseyNumber_le H (by positivity) (ramseyProperty_exp_bound H) + +theorem ramseyNumber_mono {V W : Type*} [Fintype V] [Fintype W] + {H : SimpleGraph V} {K : SimpleGraph W} (f : H.Copy K) : + ramseyNumber H ≤ ramseyNumber K := by + apply ramseyNumber_le H (ramseyNumber_spec K).1 + intro G + rcases (ramseyNumber_spec K).2 G with hr | hb + · obtain ⟨g⟩ := hr + exact Or.inl ⟨g.comp f⟩ + · obtain ⟨g⟩ := hb + exact Or.inr ⟨g.comp f⟩ + +theorem card_le_ramseyNumber {V : Type*} [Fintype V] (H : SimpleGraph V) : + Fintype.card V ≤ ramseyNumber H := by + rcases (ramseyNumber_spec H).2 ⊥ with hr | hb + · obtain ⟨f⟩ := hr + simpa using Fintype.card_le_of_injective f f.injective + · obtain ⟨f⟩ := hb + simpa using Fintype.card_le_of_injective f f.injective + +theorem coloring_below_ramsey {V : Type*} [Fintype V] (H : SimpleGraph V) + {M : ℕ} (hpos : 0 < M) (hM : M < ramseyNumber H) : + ∃ G : SimpleGraph (Fin M), ¬ Nonempty (H.Copy G) ∧ ¬ Nonempty (H.Copy Gᶜ) := by + have hnot : ¬ RamseyProperty H M := fun h => + Nat.not_le_of_lt hM (ramseyNumber_le H hpos h) + simpa only [RamseyProperty, not_forall, not_or] using hnot + +@[simp] theorem card_cubeVertex (n : ℕ) : Fintype.card (CubeVertex n) = 2 ^ n := by + simp [CubeVertex] + +theorem elementary_cube_bounds (n : ℕ) : + 2 ^ n ≤ ramseyNumber (cube n) ∧ + ramseyNumber (cube n) ≤ 2 ^ (2 ^ n + 2 ^ n) := by + constructor + · simpa using card_le_ramseyNumber (cube n) + · simpa using ramseyNumber_exp_bound (cube n) + +@[simp] theorem ramseyNumber_cube_zero : ramseyNumber (cube 0) = 1 := by + have hl : 1 ≤ ramseyNumber (cube 0) := (ramseyNumber_spec _).1 + refine le_antisymm (ramseyNumber_le _ (by decide) ?_) hl + intro G + refine Or.inl ⟨{ + toHom := { toFun := fun _ => (0 : Fin 1), map_rel' := ?_ } + injective' := fun _ _ _ => Subsingleton.elim _ _ }⟩ + intro u v huv + exact False.elim (huv.ne (Subsingleton.elim u v)) + +def crossGraph {L R : Type*} (E : L → R → Prop) : SimpleGraph (L ⊕ R) where + Adj u v := match u, v with + | .inl x, .inr y => E x y + | .inr y, .inl x => E x y + | _, _ => False + symm := ⟨by intro u v; cases u <;> cases v <;> exact id⟩ + loopless := ⟨by intro u; cases u <;> exact not_false⟩ + +def redCrossCopy {L R W : Type*} (e : L ⊕ R ↪ W) (G : SimpleGraph W) : + (crossGraph (fun x y => G.Adj (e (.inl x)) (e (.inr y)))).Copy G where + toHom := { + toFun := e + map_rel' := by + intro u v huv + cases u with + | inl x => + cases v with + | inl y => exact False.elim huv + | inr y => exact huv + | inr y => + cases v with + | inl x => exact (show G.Adj (e (.inl x)) (e (.inr y)) from huv).symm + | inr x => exact False.elim huv } + injective' := e.injective + +def blueCrossCopy {L R W : Type*} (e : L ⊕ R ↪ W) (G : SimpleGraph W) : + (crossGraph (fun x y => ¬ G.Adj (e (.inl x)) (e (.inr y)))).Copy Gᶜ where + toHom := { + toFun := e + map_rel' := by + intro u v huv + refine ⟨e.injective.ne huv.ne, ?_⟩ + cases u with + | inl x => + cases v with + | inl y => exact False.elim huv + | inr y => exact huv + | inr y => + cases v with + | inl x => exact fun h => huv h.symm + | inr x => exact False.elim huv } + injective' := e.injective + +def splitEmbedding (N : ℕ) : Fin N ⊕ Fin N ↪ Fin (2 * N) := + finSumFinEquiv.toEmbedding.trans (finCongr (by omega)).toEmbedding + +theorem cross_coloring_below_ramsey {V : Type*} [Fintype V] (H : SimpleGraph V) + {N : ℕ} (hpos : 0 < N) (hN : 2 * N < ramseyNumber H) : + ∃ E : Fin N → Fin N → Prop, + ¬ Nonempty (H.Copy (crossGraph E)) ∧ + ¬ Nonempty (H.Copy (crossGraph (fun x y => ¬ E x y))) := by + obtain ⟨G, hr, hb⟩ := coloring_below_ramsey H (by omega) hN + refine ⟨fun x y => G.Adj (splitEmbedding N (.inl x)) (splitEmbedding N (.inr y)), + ?_, ?_⟩ + · rintro ⟨f⟩ + exact hr ⟨(redCrossCopy (splitEmbedding N) G).comp f⟩ + · rintro ⟨f⟩ + exact hb ⟨(blueCrossCopy (splitEmbedding N) G).comp f⟩ + +theorem large_cube_of_not_linear + (hnot : ¬ ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, + (ramseyNumber (cube n) : ℝ) ≤ C * (2 : ℝ) ^ n) + (b k : ℕ) : + ∃ n : ℕ, k ≤ n ∧ b * 2 ^ n < ramseyNumber (cube n) := by + classical + have hunbounded : ∀ a : ℕ, ∃ n : ℕ, a * 2 ^ n < ramseyNumber (cube n) := by + intro a + by_contra ha + push Not at ha + apply hnot + refine ⟨(a : ℝ) + 1, by positivity, ?_⟩ + intro n + calc + (ramseyNumber (cube n) : ℝ) ≤ (a : ℝ) * (2 : ℝ) ^ n := by + exact_mod_cast ha n + _ ≤ ((a : ℝ) + 1) * (2 : ℝ) ^ n := by + gcongr + linarith + let S := ∑ i ∈ range k, ramseyNumber (cube i) + obtain ⟨n, hn⟩ := hunbounded (b + S + 1) + refine ⟨n, ?_, lt_of_le_of_lt (Nat.mul_le_mul_right (2 ^ n) (by omega)) hn⟩ + by_contra hnk + have hs : ramseyNumber (cube n) ≤ S := + single_le_sum (s := range k) (f := fun i => ramseyNumber (cube i)) (a := n) + (fun _ _ => Nat.zero_le _) (mem_range.mpr (by omega)) + have hm : b + S + 1 ≤ (b + S + 1) * 2 ^ n := + Nat.le_mul_of_pos_right _ (by positivity) + omega + +theorem counterexample_sequence_of_not_linear + (hnot : ¬ ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, + (ramseyNumber (cube n) : ℝ) ≤ C * (2 : ℝ) ^ n) : + ∃ (d N : ℕ → ℕ) (E : ∀ k, Fin (N k) → Fin (N k) → Prop), + Filter.Tendsto d Filter.atTop Filter.atTop ∧ + Filter.Tendsto (fun k => (N k : ℝ) / (2 : ℝ) ^ (d k)) + Filter.atTop Filter.atTop ∧ + (∀ k, 0 < N k) ∧ + (∀ k, N k ≤ d k * 2 ^ (d k)) ∧ + (∀ k, ¬ Nonempty ((cube (d k)).Copy (crossGraph (E k))) ∧ + ¬ Nonempty ((cube (d k)).Copy (crossGraph (fun x y => ¬ E k x y)))) := by + classical + have hex : ∀ k : ℕ, ∃ n : ℕ, k + 1 ≤ n ∧ + 2 * (k + 1) * 2 ^ n < ramseyNumber (cube n) := + fun k => large_cube_of_not_linear hnot (2 * (k + 1)) (k + 1) + choose d hd hbound using hex + let N : ℕ → ℕ := fun k => (k + 1) * 2 ^ (d k) + have hpos : ∀ k, 0 < N k := by + intro k + dsimp [N] + positivity + have hbad : ∀ k, ∃ E : Fin (N k) → Fin (N k) → Prop, + ¬ Nonempty ((cube (d k)).Copy (crossGraph E)) ∧ + ¬ Nonempty ((cube (d k)).Copy (crossGraph (fun x y => ¬ E x y))) := by + intro k + apply cross_coloring_below_ramsey _ (hpos k) + simpa only [N, Nat.mul_assoc] using hbound k + choose E hred hblue using hbad + refine ⟨d, N, E, ?_, ?_, hpos, ?_, fun k => ⟨hred k, hblue k⟩⟩ + · exact Filter.tendsto_atTop_mono + (fun k => (Nat.le_succ k).trans (hd k)) Filter.tendsto_id + · have hratio : ∀ k, (N k : ℝ) / (2 : ℝ) ^ (d k) = (k : ℝ) + 1 := by + intro k + simp [N] + have hlim : Filter.Tendsto (fun k : ℕ => ((k + 1 : ℕ) : ℝ)) + Filter.atTop Filter.atTop := + tendsto_natCast_atTop_atTop.comp (Filter.tendsto_add_atTop_nat 1) + simpa only [hratio, Nat.cast_add, Nat.cast_one] using hlim + · intro k + exact Nat.mul_le_mul_right _ (hd k) + +end HypercubeRamsey + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Bounds/DensityUpper.lean b/lean/OAI/Combinatorics/RamseyFive/Bounds/DensityUpper.lean new file mode 100644 index 0000000000000000000000000000000000000000..ab050a56ad7d23de12f05022b5bc7a1439ea6024 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Bounds/DensityUpper.lean @@ -0,0 +1,73 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.Q + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Module.Dual K V))] + +lemma density_upper {d : ℕ} (hd : 1 ≤ d) : + (Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d ≤ 1/(Nat.card K:ℝ) := by + have hq : (0:ℝ) < Nat.card K := by exact_mod_cast (Finite.one_lt_card (α:=K)).le + have hQ : (0:ℝ) < Q (Nat.card K) d := by exact_mod_cast Q_pos (Nat.card K) d + have hrec : (Q (Nat.card K) d:ℝ)=Nat.card K*Q (Nat.card K) (d-1)+1 := by + exact_mod_cast Q_recurrence (q:=Nat.card K) hd + apply (div_le_div_iff₀ hQ hq).mpr + nlinarith + +theorem incidence_rectangle_sqrt (hdim : finrank K V=5) + (A : Finset (ℙ K V)) (B : Finset (ℙ K (Dual K V))) (C : ℝ) + (hC : 0 ≤ C) (hcap : (A.card:ℝ)*B.card ≤ C^2*(Nat.card K:ℝ)^5) : + (incidences A B:ℝ) ≤ (C+1)*Real.sqrt ((Nat.card K:ℝ)^3*A.card*B.card) := by + let q : ℝ := Nat.card K + let z : ℝ := (A.card:ℝ)*B.card + let s : ℝ := Real.sqrt (q^3*z) + have hq : 0 < q := by + dsimp [q] + exact_mod_cast Nat.zero_lt_of_lt (Finite.one_lt_card (α:=K)) + have hz : 0 ≤ z := by dsimp [z];positivity + have hs : 0 ≤ s := Real.sqrt_nonneg _ + have hsq : s^2=q^3*z := Real.sq_sqrt (by positivity) + have hz2 : z^2 ≤ (C*q*s)^2 := by + calc + _ = z*z := by ring + _ ≤ (C^2*q^5)*z := mul_le_mul_of_nonneg_right hcap hz + _ = _ := by rw [mul_pow,mul_pow,hsq];ring + have hzbound : z/q ≤ C*s := by + apply (div_le_iff₀ hq).mpr + simpa [mul_assoc,mul_left_comm,mul_comm] using (sq_le_sq₀ hz (by positivity)).mp hz2 + have hdens := mul_le_mul_of_nonneg_right (density_upper (K:=K) (d:=4) (by omega)) hz + have hm := (abs_le.mp (incidence_mixing (d:=4) hdim (by omega) A B)).2 + change (incidences A B:ℝ)-(Q (Nat.card K) 3:ℝ)/Q (Nat.card K) 4*A.card*B.card ≤ _ at hm + have he : Real.sqrt ((Nat.card K:ℝ)^(4-1)*A.card*B.card)=s := by simp [s,q,z,mul_assoc] + rw [he] at hm + change (Q (Nat.card K) (4-1):ℝ)/Q (Nat.card K) 4*z ≤ 1/q*z at hdens + have hdens' : (Q (Nat.card K) 3:ℝ)/Q (Nat.card K) 4*A.card*B.card ≤ z/q := by + simpa [z,div_eq_mul_inv,mul_assoc,mul_left_comm,mul_comm] using hdens + have hc : (incidences A B:ℝ) ≤ (C+1)*s := by nlinarith + simpa [s,q,z,mul_assoc] using hc + +theorem incidence_rectangle_log (hdim : finrank K V=5) + (A : Finset (ℙ K V)) (B : Finset (ℙ K (Dual K V))) (C : ℝ) + (hC : 0 ≤ C) (hcap : (A.card:ℝ)*B.card ≤ C^2*(Nat.card K:ℝ)^5) + (hA : 0 < A.card) (hB : 0 < B.card) (hI : 0 < incidences A B) : + Real.log (incidences A B:ℝ) ≤ Real.log (C+1)+(3:ℝ)/2*Real.log (Nat.card K)+ + (Real.log (A.card:ℝ)+Real.log (B.card:ℝ))/2 := by + have hq : (0:ℝ) < Nat.card K := by exact_mod_cast (Finite.one_lt_card (α:=K)).le + have hAr : (0:ℝ) < A.card := by exact_mod_cast hA + have hBr : (0:ℝ) < B.card := by exact_mod_cast hB + have hIr : (0:ℝ) < incidences A B := by exact_mod_cast hI + have hs : (0:ℝ) < (Nat.card K:ℝ)^3*A.card*B.card := by positivity + have hh := Real.log_le_log hIr (incidence_rectangle_sqrt hdim A B C hC hcap) + rw [Real.log_mul (by linarith : C+1≠0) (Real.sqrt_pos.mpr hs).ne',Real.log_sqrt hs.le, + Real.log_mul (mul_pos (pow_pos hq _) hAr).ne' hBr.ne', + Real.log_mul (pow_pos hq _).ne' hAr.ne',Real.log_pow] at hh + nlinarith + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Bounds/PrimeConstruction.lean b/lean/OAI/Combinatorics/RamseyFive/Bounds/PrimeConstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..e03caf8d0fb44425701df0ca9f5da0b805071bdc --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Bounds/PrimeConstruction.lean @@ -0,0 +1,148 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Bounds.SamplingParameter +import OAI.Combinatorics.RamseyFive.Bounds.RamseyPropertyRelated + +namespace OAI + +open scoped BigOperators Classical +open Finset +namespace SharpRamseyFive +open Filter SimpleGraph +open scoped Topology + +def PrimeConstruction (η : ℝ) : Prop := + ∃ q₀ : ℕ, ∀ q : ℕ, q₀ ≤ q → q.Prime → + ∃ G : SimpleGraph (Fin ⌊(q:ℝ)^4*Real.log q⌋₊), + G.CliqueFree 5 ∧ Gᶜ.CliqueFree ⌊(q:ℝ)*(Real.log q)^(1+η)⌋₊ + +lemma graph_lower {N k t : ℕ} (ht : 1 ≤ t) (hkt : k ≤ t) + (G : SimpleGraph (Fin N)) (hG : G.CliqueFree 5) (hI : Gᶜ.CliqueFree k) : + N < ramsey 5 t := by + rw [ramsey_eq_related] + simpa only [Fintype.card_fin] using SharpLogRamsey.Foundation.order_lt_ramsey G + (by decide : 2 ≤ 5) ht hG (CliqueFree.mono hkt hI) + +lemma prime_in_interval {x : ℝ} (hx : 2 ≤ x) : + ∃ q : ℕ, q.Prime ∧ x < q ∧ (q:ℝ) ≤ 3*x := by + have hceil : 0 < ⌈x⌉₊ := by + have he := Nat.le_ceil x + by_contra hn + have : ⌈x⌉₊ = 0 := by omega + rw [this,Nat.cast_zero] at he + linarith + obtain ⟨q,hq,hlo,hhi⟩ := Nat.exists_prime_lt_and_le_two_mul ⌈x⌉₊ (Nat.ne_of_gt hceil) + refine ⟨q,hq,(Nat.le_ceil x).trans_lt (by exact_mod_cast hlo),?_⟩ + have hh : (q:ℝ) ≤ 2*(⌈x⌉₊:ℝ) := by exact_mod_cast hhi + have hh' := Nat.ceil_lt_add_one (show 0 ≤ x by linarith) + linarith + +lemma conversion_scales (η : ℝ) (A : ℝ) : + ∀ᶠ t : ℕ in atTop, + 2 ≤ t ∧ 1 < Real.log t ∧ + A ≤ (t:ℝ)/(4*(Real.log t)^(1+η)) ∧ + 2 ≤ (t:ℝ)/(4*(Real.log t)^(1+η)) ∧ + Real.log (t:ℝ)/2 ≤ Real.log ((t:ℝ)/(4*(Real.log t)^(1+η))) := by + have hlog : Tendsto (fun t : ℕ => Real.log (t:ℝ)) atTop atTop := + Real.tendsto_log_atTop.comp tendsto_natCast_atTop_atTop + have hsmall : Tendsto (fun t : ℕ => + (Real.log 4+(1+η)*Real.log (Real.log t))/Real.log t) atTop (nhds 0) := by + have hh := (Real.isLittleO_log_id_atTop.tendsto_div_nhds_zero).comp hlog + have hh' := (tendsto_const_nhds (x := Real.log 4)).div_atTop hlog + simpa only [Function.comp_apply, id_eq, add_div,mul_div_assoc,mul_zero,add_zero] using + hh'.add (hh.const_mul (1+η)) + have hlogbound : ∀ᶠ t : ℕ in atTop, + Real.log (t:ℝ)/2 ≤ Real.log ((t:ℝ)/(4*(Real.log t)^(1+η))) := by + filter_upwards [eventually_ge_atTop (2:ℕ),hlog.eventually (eventually_gt_atTop (1:ℝ)), + hsmall.eventually_lt_const (by norm_num : (0:ℝ)<1/2)] with t ht hl hs + have htp : 0<(t:ℝ) := by exact_mod_cast (show 0 Real.log ((t:ℝ)/(4*(Real.log t)^(1+η)))) atTop atTop := + tendsto_atTop_mono' _ hlogbound (hlog.atTop_div_const (by norm_num)) + have hxgrowth : Tendsto (fun t : ℕ => (t:ℝ)/(4*(Real.log t)^(1+η))) atTop atTop := by + apply tendsto_atTop_mono' _ ?_ (Real.tendsto_exp_atTop.comp hgrowth) + filter_upwards [hlog.eventually (eventually_gt_atTop (1:ℝ)),eventually_ge_atTop (2:ℕ)] with t hl ht + have htp : 0<(t:ℝ) := by exact_mod_cast (show 0 (Real.log t)^(ε-4*η)) atTop atTop := + (tendsto_rpow_atTop hdiff).comp (Real.tendsto_log_atTop.comp tendsto_natCast_atTop_atTop) + filter_upwards [lower_fixed_eta hη (hconstruction η hη hηhi),eventually_ge_atTop (2:ℕ), + hgrowth.eventually (eventually_ge_atTop (512:ℝ))] with t ht ht2 h512 + have hl : 0 rw [heq,Real.rpow_add hl] + exact mul_le_mul_of_nonneg_right h512 (Real.rpow_nonneg hl.le _) + exact (div_le_div_of_nonneg_left (by positivity) (by positivity) hden).trans ht.le + +end SharpRamseyFive + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Bounds/PrimeStream.lean b/lean/OAI/Combinatorics/RamseyFive/Bounds/PrimeStream.lean new file mode 100644 index 0000000000000000000000000000000000000000..b518fc10522dd25a8d3b0ae13f9ef89efd5d4b91 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Bounds/PrimeStream.lean @@ -0,0 +1,132 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Iteration.InitialPolar +import OAI.Combinatorics.RamseyFive.Iteration.PolarIteration +import OAI.Combinatorics.RamseyFive.Bounds.PrimeConstruction + +namespace OAI + +namespace SharpRamseyFive + +section +open Module Filter FlagConstruction SelectedTuple Marking +open scoped Classical LinearAlgebra.Projectivization Topology +noncomputable section + +theorem primeConstruction {η : ℝ} (hη : 0<η) (hη' : η<1/10) : PrimeConstruction η := by + have hlog : Tendsto (fun q : ℕ=>Real.log (q:ℝ)) atTop atTop := + Real.tendsto_log_atTop.comp tendsto_natCast_atTop_atTop + have hevent := hlog.eventually ((eventually_no_initial_polar hη hη' (1/2) 2 40 + (by norm_num) (by norm_num)).and (initial_floor_scales hη hη')) + obtain ⟨q₀,hq₀⟩:=eventually_atTop.mp hevent + refine ⟨max q₀ 3,?_⟩ + intro q hlarge hprime + let : Fact q.Prime:=⟨hprime⟩ + let K:=ZMod q + let V:=Space K + let : Finite (Dual K V) := Module.finite_of_finite K + let : Finite (Dual K (Dual K V)) := Module.finite_of_finite K + let : Fintype (ℙ K V):=Fintype.ofFinite _ + let : Fintype (ℙ K (Dual K V)):=Fintype.ofFinite _ + let : Fintype (ℙ K (Dual K (Dual K V))):=Fintype.ofFinite _ + let : Finite (Submodule K (Dual K V)):=Finite.of_injective + (fun W : Submodule K (Dual K V)=>(W:Set (Dual K V))) SetLike.coe_injective + let : Fintype (Submodule K (Dual K V)):=Fintype.ofFinite _ + have hd : finrank K V=5 := by simp [V,Space] + let : Nonempty (RectangleGeometry.Flag (K:=K) (V:=V)):= + Fintype.card_pos_iff.mp (RectangleGeometry.flags_nonempty hd) + have hcard : Nat.card K=q := by simp [K,Nat.card_eq_fintype_card] + let σ:=Real.log (q:ℝ) + have hqp : (0:ℝ) (t:ℝ)) atTop atTop := tendsto_natCast_atTop_atTop + have hl := Real.tendsto_log_atTop.comp ht + have hll := Real.tendsto_log_atTop.comp hl + have hlog : ∀ᶠ t : ℕ in atTop, 0 < Real.log t ∧ 0 < Real.log (Real.log t) := by + filter_upwards [hl.eventually (eventually_gt_atTop (1:ℝ))] with t hlt + change 1 < Real.log (t:ℝ) at hlt + exact ⟨by linarith,Real.log_pos hlt⟩ + have hnumeric (t : ℕ) (ε : ℝ) (ht : 2 ≤ t) + (hlog : 0 < Real.log t) (hllog : 0 < Real.log (Real.log t)) + (hlo : (t:ℝ)^4 / Real.rpow (Real.log t) (3+ε) ≤ (ramsey 5 t:ℝ)) + (hhi : (ramsey 5 t:ℝ) ≤ C*(t:ℝ)^4/(Real.log t)^3) : + 3 - Real.log C / Real.log (Real.log t) ≤ + (4*Real.log t-Real.log (ramsey 5 t:ℝ))/Real.log (Real.log t) ∧ + (4*Real.log t-Real.log (ramsey 5 t:ℝ))/Real.log (Real.log t) ≤ 3+ε := by + have htpos : 0 < (t:ℝ) := by exact_mod_cast (show 0 3-Real.log C/Real.log (Real.log t)) atTop (nhds 3) := by + simpa using tendsto_const_nhds.sub ((tendsto_const_nhds (x := Real.log C)).div_atTop hll) + obtain ⟨N,hN⟩ := hb 1 (by norm_num) + filter_upwards [hconv.eventually (lt_mem_nhds ha),hlog,eventually_ge_atTop (max N 2)] + with t hat hlt ht + obtain ⟨hlo,hhi⟩ := hN t ((le_max_left _ _).trans ht) + exact hat.trans_le (hnumeric t 1 ((le_max_right _ _).trans ht) hlt.1 hlt.2 hlo hhi).1 + · intro a ha + let ε := (a-3)/2 + have hε : 0 < ε := by dsimp [ε]; linarith + obtain ⟨N,hN⟩ := hb ε hε + filter_upwards [hlog,eventually_ge_atTop (max N 2)] with t hlt ht + obtain ⟨hlo,hhi⟩ := hN t ((le_max_left _ _).trans ht) + exact ((hnumeric t ε ((le_max_right _ _).trans ht) hlt.1 hlt.2 hlo hhi).2).trans_lt + (by dsimp [ε]; linarith) + +end SharpRamseyFive + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Bounds/RamseyPropertyRelated.lean b/lean/OAI/Combinatorics/RamseyFive/Bounds/RamseyPropertyRelated.lean new file mode 100644 index 0000000000000000000000000000000000000000..56326d8bdb880e21ffd293f0e45e2d48b08056b9 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Bounds/RamseyPropertyRelated.lean @@ -0,0 +1,31 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Bounds.SamplingParameter +import OAI.Combinatorics.RamseyFive.Model + +namespace OAI + +open scoped BigOperators Classical +open Finset + +namespace SharpRamseyFive + +theorem ramseyProperty_eq_related (s t n : ℕ) : + RamseyProperty s t n = SharpLogRamsey.RamseyProperty s t n := by + unfold RamseyProperty SharpLogRamsey.RamseyProperty + congr! 3 + funext B + exact propext (SimpleGraph.isNClique_compl _).symm + +theorem ramsey_eq_related (s t : ℕ) : + ramsey s t = SharpLogRamsey.ramsey s t := by + simp only [ramsey, SharpLogRamsey.ramsey, ramseyProperty_eq_related] + +theorem upper_bound_eventually : + ∃ C : ℝ, 0 < C ∧ ∃ t₀ : ℕ, ∀ t : ℕ, t₀ ≤ t → + (ramsey 5 t : ℝ) ≤ C * (t : ℝ)^4 / (Real.log t)^3 := by + simpa only [ramsey_eq_related, show 5-1 = 4 from rfl, show 5-2 = 3 from rfl] + using SharpLogRamsey.Upper.ramsey_upper (s := 5) (by decide) + +end SharpRamseyFive + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Bounds/UpperSet.lean b/lean/OAI/Combinatorics/RamseyFive/Bounds/UpperSet.lean new file mode 100644 index 0000000000000000000000000000000000000000..d93f3e16073969e196c1f669f24961d146936587 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Bounds/UpperSet.lean @@ -0,0 +1,96 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.SubspacePointsEquiv + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.ProjectiveIncidence +open scoped LinearAlgebra.Projectivization Classical BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Fintype (ℙ K (Dual K V))] + +noncomputable def upperSet (W : ℙ K (Dual K V) → Submodule K (Dual K V)) (l : ℕ) := + Finset.univ.filter fun y => finrank K (W y)≤l + +noncomputable def levelSet (W : ℙ K (Dual K V) → Submodule K (Dual K V)) (l : ℕ) := + Finset.univ.filter fun y => finrank K (W y)=l + +noncomputable def nextState (W : ℙ K (Dual K V) → Submodule K (Dual K V)) + (a : ℙ K V) (b : ℙ K (Dual K V)) (y : ℙ K (Dual K V)) := + if Incident a y then b.submodule ⊔ W y else W y + +omit [FiniteDimensional K V] [Fintype (ℙ K (Dual K V))] in +lemma nextState_mono (W : ℙ K (Dual K V) → Submodule K (Dual K V)) + (a : ℙ K V) (b y : ℙ K (Dual K V)) : W y≤ nextState W a b y := by + unfold nextState + split_ifs + · exact le_sup_right + · exact le_rfl + +lemma nextState_upper_subset (W : ℙ K (Dual K V) → Submodule K (Dual K V)) + (a : ℙ K V) (b : ℙ K (Dual K V)) (l : ℕ) : + upperSet (nextState W a b) l⊆upperSet W l := by + intro y hy + apply Finset.mem_filter.mpr ⟨Finset.mem_univ _,?_⟩ + exact (Submodule.finrank_mono (nextState_mono W a b y)).trans (Finset.mem_filter.mp hy).2 + +lemma leaves_upper (W : ℙ K (Dual K V) → Submodule K (Dual K V)) + (a : ℙ K V) (b y : ℙ K (Dual K V)) (l : ℕ) + (hlevel : y∈levelSet W l) (hhit : Incident a y) (hnew : ¬b.submodule≤W y) : + y∈upperSet W l ∧ y∉upperSet (nextState W a b) l := by + have hl := (Finset.mem_filter.mp hlevel).2 + have hr : l hnew (h ▸ le_sup_left)) + constructor + · exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,hl.le⟩ + · exact fun hy => (not_lt_of_ge (Finset.mem_filter.mp hy).2) hr + +theorem expensive_contraction (W : ℙ K (Dual K V) → Submodule K (Dual K V)) + (a : ℙ K V) (b : ℙ K (Dual K V)) (l : ℕ) (q : ℝ) (hq : 0 Incident a y).card:ℝ)) + (hpop : (((levelSet W l).filter fun y => b.submodule≤W y).card:ℝ)≤ + ((levelSet W l).card:ℝ)/(16*q)) : + ((upperSet (nextState W a b) l).card:ℝ)≤ + (1-1/(80*q))*((upperSet W l).card:ℝ) := by + let U:=upperSet W l + let U':=upperSet (nextState W a b) l + let Z:=levelSet W l + let H:=Z.filter fun y => Incident a y + let B:=Z.filter fun y => b.submodule≤W y + have hsub : H⊆(U\U')∪B := by + intro y hy + by_cases hb : y∈B + · exact Finset.mem_union_right _ hb + · have hyZ := (Finset.mem_filter.mp hy).1 + have hh := (Finset.mem_filter.mp hy).2 + have hn : ¬b.submodule≤W y := fun h => hb (Finset.mem_filter.mpr ⟨hyZ,h⟩) + obtain ⟨hu,hu'⟩:=leaves_upper W a b y l hyZ hh hn + exact Finset.mem_union_left _ (Finset.mem_sdiff.mpr ⟨hu,hu'⟩) + have hc := (Finset.card_le_card hsub).trans (Finset.card_union_le _ _) + have husub : U'⊆U := nextState_upper_subset W a b l + have hdiff : (U\U').card=U.card-U'.card := Finset.card_sdiff_of_subset husub + have hule := Finset.card_le_card husub + have hcount : (H.card:ℝ)≤(U.card:ℝ)-U'.card+B.card := by + have h := hc + rw [hdiff] at h + exact_mod_cast h + have hzU : (U.card:ℝ)≤5*Z.card := by exact_mod_cast hmax + change (Z.card:ℝ)/(8*q)≤(H.card:ℝ) at hpoor + change (B.card:ℝ)≤(Z.card:ℝ)/(16*q) at hpop + change (U'.card:ℝ)≤(1-1/(80*q))*(U.card:ℝ) + have hid : (Z.card:ℝ)/(8*q)=2*((Z.card:ℝ)/(16*q)) := by field_simp; ring + have huZ : (U.card:ℝ)/(80*q)≤(Z.card:ℝ)/(16*q) := by + apply (div_le_div_iff₀ (by positivity) (by positivity)).mpr + nlinarith + rw [hid] at hpoor + have heq : (1-1/(80*q))*(U.card:ℝ)=U.card-(U.card:ℝ)/(80*q) := by ring + rw [heq] + linarith + +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/Best.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/Best.lean new file mode 100644 index 0000000000000000000000000000000000000000..2a36507b6d831f7371e45b1206b83d4306ec6cda --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/Best.lean @@ -0,0 +1,289 @@ +import Mathlib + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.GreedyTraining +open scoped BigOperators Classical +variable {V I : Type*} [DecidableEq V] [LinearOrder I] + +omit [LinearOrder I] in +lemma maximizers_nonempty (F : Finset I) (hF : F.Nonempty) (shape : I → Finset V) + (X : Finset V) : + (F.filter fun a => ∀ b ∈ F, (X ∩ shape b).card ≤ (X ∩ shape a).card).Nonempty := by + obtain ⟨a,ha,hm⟩ := Finset.exists_max_image F (fun a => (X ∩ shape a).card) hF + exact ⟨a,Finset.mem_filter.mpr ⟨ha,hm⟩⟩ + +noncomputable def best (F : Finset I) (hF : F.Nonempty) (shape : I → Finset V) + (X : Finset V) : I := + (F.filter fun a => ∀ b ∈ F, (X ∩ shape b).card ≤ (X ∩ shape a).card).min' + (maximizers_nonempty F hF shape X) + +lemma best_spec (F : Finset I) (hF : F.Nonempty) (shape : I → Finset V) (X : Finset V) : + best F hF shape X ∈ F ∧ + ∀ b ∈ F, (X ∩ shape b).card ≤ (X ∩ shape (best F hF shape X)).card := + Finset.mem_filter.mp (Finset.min'_mem _ _) + +noncomputable def remaining (F : Finset I) (hF : F.Nonempty) (shape : I → Finset V) + (X : Finset V) : ℕ → Finset V + | 0 => X + | k+1 => remaining F hF shape X k \ shape (best F hF shape (remaining F hF shape X k)) + +noncomputable def chosen (F : Finset I) (hF : F.Nonempty) (shape : I → Finset V) + (X : Finset V) (k : ℕ) : I := best F hF shape (remaining F hF shape X k) + +noncomputable def cell (F : Finset I) (hF : F.Nonempty) (shape : I → Finset V) + (X : Finset V) (k : ℕ) : Finset V := + remaining F hF shape X k ∩ shape (chosen F hF shape X k) + +variable (F : Finset I) (hF : F.Nonempty) (shape : I → Finset V) (X : Finset V) + +lemma chosen_mem (k : ℕ) : chosen F hF shape X k ∈ F := + (best_spec F hF shape _).1 + +lemma maximal_cell (k : ℕ) (a : I) (ha : a ∈ F) : + (remaining F hF shape X k ∩ shape a).card ≤ (cell F hF shape X k).card := + (best_spec F hF shape _).2 a ha + +lemma remaining_succ_subset (k : ℕ) : + remaining F hF shape X (k+1) ⊆ remaining F hF shape X k := Finset.sdiff_subset + +lemma remaining_antitone : Antitone (remaining F hF shape X) := + antitone_nat_of_succ_le (remaining_succ_subset F hF shape X) + +lemma remaining_subset (k : ℕ) : remaining F hF shape X k ⊆ X := + remaining_antitone F hF shape X (Nat.zero_le k) + +lemma cell_subset (k : ℕ) : cell F hF shape X k ⊆ remaining F hF shape X k := + Finset.inter_subset_left + +lemma cell_card_antitone : Antitone (fun k => (cell F hF shape X k).card) := by + apply antitone_nat_of_succ_le + intro k + have hle : remaining F hF shape X (k+1) ∩ shape (chosen F hF shape X (k+1)) ⊆ + remaining F hF shape X k ∩ shape (chosen F hF shape X (k+1)) := + Finset.inter_subset_inter_right (remaining_succ_subset F hF shape X k) + exact (Finset.card_le_card hle).trans (maximal_cell F hF shape X k _ (chosen_mem F hF shape X _)) + +lemma cell_card_add_remaining (k : ℕ) : + (cell F hF shape X k).card + (remaining F hF shape X (k+1)).card = + (remaining F hF shape X k).card := by + exact Finset.card_inter_add_card_sdiff _ _ + +lemma sum_card_add_remaining (k : ℕ) : + (∑ j ∈ Finset.range k, (cell F hF shape X j).card) + (remaining F hF shape X k).card = X.card := by + induction k with + | zero => simp [remaining] + | succ k ih => + rw [Finset.sum_range_succ] + have hh := cell_card_add_remaining F hF shape X k + omega + +lemma cell_disjoint_of_lt {i j : ℕ} (hij : i < j) : + Disjoint (cell F hF shape X i) (cell F hF shape X j) := by + apply Finset.disjoint_left.mpr + intro x hxi hxj + have hx : x ∈ remaining F hF shape X (i+1) := + remaining_antitone F hF shape X hij (cell_subset F hF shape X j hxj) + have hxnot := (Finset.mem_sdiff.mp hx).2 + exact hxnot (Finset.mem_inter.mp hxi).2 + +def Stop (threshold k : ℕ) : Prop := + X.card ≤ 2*(X.card-(remaining F hF shape X k).card) ∨ + (cell F hF shape X k).card < threshold + +lemma exists_stop (threshold : ℕ) (hthreshold : 0 < threshold) : + ∃ k ≤ X.card, Stop F hF shape X threshold k := by + by_contra hn + push Not at hn + have hpos (j : ℕ) (hj : j ∈ Finset.range X.card) : 1 ≤ (cell F hF shape X j).card := by + have hns := hn j (Nat.le_of_lt (Finset.mem_range.mp hj)) + simp only [Stop,not_or,not_lt] at hns + omega + have hs := Finset.sum_le_sum hpos + simp only [Finset.sum_const, Finset.card_range, smul_eq_mul, mul_one] at hs + have hc := sum_card_add_remaining F hF shape X X.card + have hnlast := hn X.card le_rfl + apply hnlast + left + omega + +noncomputable def stopIndex (threshold : ℕ) (hthreshold : 0 < threshold) : ℕ := + Nat.find (Exists.imp (fun _ hk => hk.2) (exists_stop F hF shape X threshold hthreshold)) + +lemma stopIndex_stops (threshold : ℕ) (hthreshold : 0 < threshold) : + Stop F hF shape X threshold (stopIndex F hF shape X threshold hthreshold) := Nat.find_spec _ + +lemma before_stop (threshold : ℕ) (hthreshold : 0 < threshold) {j : ℕ} + (hj : j < stopIndex F hF shape X threshold hthreshold) : + (cell F hF shape X j).card ≥ threshold ∧ + 2*(X.card-(remaining F hF shape X j).card) < X.card := by + have h := Nat.find_min (Exists.imp (fun _ hk => hk.2) + (exists_stop F hF shape X threshold hthreshold)) hj + simpa only [Stop, not_or, not_le, not_lt, and_comm] using h + +lemma stopIndex_le_card (threshold : ℕ) (hthreshold : 0 < threshold) : + stopIndex F hF shape X threshold hthreshold ≤ X.card := by + obtain ⟨k,hk,hs⟩ := exists_stop F hF shape X threshold hthreshold + exact (Nat.find_min' _ hs).trans hk + +lemma list_length_bound (threshold : ℕ) (hthreshold : 0 < threshold) : + stopIndex F hF shape X threshold hthreshold * threshold ≤ X.card := by + let J := stopIndex F hF shape X threshold hthreshold + change J*threshold ≤ X.card + have hs := Finset.sum_le_sum (s := Finset.range J) (fun j hj => + (before_stop F hF shape X threshold hthreshold (Finset.mem_range.mp hj)).1) + simp only [Finset.sum_const, Finset.card_range, smul_eq_mul] at hs + have hc := sum_card_add_remaining F hF shape X J + omega + +noncomputable def retained (threshold : ℕ) (hthreshold : 0 < threshold) : Finset V := + if X.card ≤ 2*(X.card-(remaining F hF shape X (stopIndex F hF shape X threshold hthreshold)).card) + then X \ remaining F hF shape X (stopIndex F hF shape X threshold hthreshold) + else remaining F hF shape X (stopIndex F hF shape X threshold hthreshold) + +lemma retained_subset (threshold : ℕ) (hthreshold : 0 < threshold) : + retained F hF shape X threshold hthreshold ⊆ X := by + unfold retained + split + · exact Finset.sdiff_subset + · exact remaining_subset F hF shape X _ + +lemma retained_half (threshold : ℕ) (hthreshold : 0 < threshold) : + X.card ≤ 2*(retained F hF shape X threshold hthreshold).card := by + have hsub := Finset.card_le_card (remaining_subset F hF shape X + (stopIndex F hF shape X threshold hthreshold)) + unfold retained + split + · rename_i h + rw [Finset.card_sdiff_of_subset (remaining_subset F hF shape X _)] + exact h + · rename_i h + omega + +lemma residual_cap (threshold : ℕ) (hthreshold : 0 < threshold) + (hn : ¬X.card ≤ 2*(X.card-(remaining F hF shape X (stopIndex F hF shape X threshold hthreshold)).card)) + (a : I) (ha : a ∈ F) : + (retained F hF shape X threshold hthreshold ∩ shape a).card < threshold := by + rw [retained,ite_eq_right hn] + have hc := (stopIndex_stops F hF shape X threshold hthreshold).resolve_left hn + exact (maximal_cell F hF shape X _ a ha).trans_lt hc + +lemma remaining_eq_sdiff_union (k : ℕ) : + remaining F hF shape X k = X \ (Finset.range k).biUnion (fun j => shape (chosen F hF shape X j)) := by + induction k with + | zero => simp [remaining] + | succ k ih => + change remaining F hF shape X k \ shape (chosen F hF shape X k) = _ + rw [ih] + ext x + simp only [Finset.mem_sdiff, Finset.mem_biUnion, Finset.mem_range] + change (x ∈ X ∧ ¬∃ j < k, x ∈ shape (chosen F hF shape X j)) ∧ + x ∉ shape (chosen F hF shape X k) ↔ + x ∈ X ∧ ¬∃ j < k+1, x ∈ shape (chosen F hF shape X j) + constructor + · rintro ⟨⟨hx,hn⟩,hk⟩ + refine ⟨hx,?_⟩ + rintro ⟨j,hj,hxj⟩ + rcases (Nat.lt_succ_iff_lt_or_eq.mp hj) with hj | rfl + · exact hn ⟨j,hj,hxj⟩ + · exact hk hxj + · rintro ⟨hx,hn⟩ + refine ⟨⟨hx,?_⟩,?_⟩ + · rintro ⟨j,hj,hxj⟩ + exact hn ⟨j,Nat.lt_succ_of_lt hj,hxj⟩ + · intro hxk + exact hn ⟨k,Nat.lt_succ_self k,hxk⟩ + +lemma prefix_length_bound (k threshold : ℕ) + (hlarge : ∀ j < k, threshold ≤ (cell F hF shape X j).card) : + k*threshold ≤ X.card := by + have hs := Finset.sum_le_sum (s := Finset.range k) (fun j hj => hlarge j (Finset.mem_range.mp hj)) + simp only [Finset.sum_const, Finset.card_range, smul_eq_mul] at hs + have hh := sum_card_add_remaining F hF shape X k + omega + +lemma tail_cap (k cap : ℕ) (hcap : (cell F hF shape X k).card ≤ cap) + (Y : Finset V) (hY : Y ⊆ remaining F hF shape X k) (a : I) (ha : a ∈ F) : + (Y ∩ shape a).card ≤ cap := by + exact (Finset.card_le_card (Finset.inter_subset_inter_right hY)).trans + ((maximal_cell F hF shape X k a ha).trans hcap) + +noncomputable def headIndex (J cap : ℕ) : ℕ := + Nat.find (show ∃ k, J ≤ k ∨ (cell F hF shape X k).card ≤ cap from ⟨J,Or.inl le_rfl⟩) + +lemma headIndex_le (J cap : ℕ) : headIndex F hF shape X J cap ≤ J := + Nat.find_min' _ (Or.inl le_rfl) + +lemma before_head (J cap : ℕ) {j : ℕ} (hj : j < headIndex F hF shape X J cap) : + cap < (cell F hF shape X j).card := by + have hn := Nat.find_min (show ∃ k, J ≤ k ∨ (cell F hF shape X k).card ≤ cap from ⟨J,Or.inl le_rfl⟩) hj + exact lt_of_not_ge (fun hh => hn (Or.inr hh)) + +lemma head_length_bound (J cap : ℕ) : headIndex F hF shape X J cap * cap ≤ X.card := + prefix_length_bound F hF shape X _ _ (fun _ hj => (before_head F hF shape X J cap hj).le) + +lemma head_tail_cap (J cap : ℕ) (a : I) (ha : a ∈ F) : + ((remaining F hF shape X (headIndex F hF shape X J cap) \ remaining F hF shape X J) ∩ shape a).card ≤ cap := by + have hs := Nat.find_spec (show ∃ k, J ≤ k ∨ (cell F hF shape X k).card ≤ cap from ⟨J,Or.inl le_rfl⟩) + rcases hs with h | h + · have he : headIndex F hF shape X J cap = J := le_antisymm (headIndex_le F hF shape X J cap) h + simp [he] + · exact tail_cap F hF shape X _ cap h _ Finset.sdiff_subset a ha + +lemma captured_eq_biUnion_cells (J : ℕ) : + X \ remaining F hF shape X J = (Finset.range J).biUnion (cell F hF shape X) := by + induction J with + | zero => simp [remaining] + | succ J ih => + rw [Finset.range_add_one, Finset.biUnion_insert, ← ih] + change X \ (remaining F hF shape X J \ shape (chosen F hF shape X J)) = + (remaining F hF shape X J ∩ shape (chosen F hF shape X J)) ∪ (X \ remaining F hF shape X J) + ext x + have hx := @remaining_subset V I _ _ F hF shape X J x + simp only [Finset.mem_sdiff, Finset.mem_inter, Finset.mem_union] + tauto + +lemma cell_earliest (j : ℕ) (x : V) : + x ∈ cell F hF shape X j ↔ + x ∈ X ∧ x ∈ shape (chosen F hF shape X j) ∧ ∀ i < j, x ∉ shape (chosen F hF shape X i) := by + unfold cell + rw [Finset.mem_inter, remaining_eq_sdiff_union] + simp only [Finset.mem_sdiff, Finset.mem_biUnion, Finset.mem_range, not_exists, not_and] + tauto + +noncomputable def firstAt (J : ℕ) (x : V) : ℕ := + Nat.find (show ∃ j, J ≤ j ∨ x ∈ shape (chosen F hF shape X j) from ⟨J,Or.inl le_rfl⟩) + +lemma firstAt_le (J : ℕ) (x : V) : firstAt F hF shape X J x ≤ J := + Nat.find_min' _ (Or.inl le_rfl) + +lemma firstAt_mem (J : ℕ) (x : V) (h : firstAt F hF shape X J x < J) : + x ∈ shape (chosen F hF shape X (firstAt F hF shape X J x)) := by + have hs := Nat.find_spec (show ∃ j, J ≤ j ∨ x ∈ shape (chosen F hF shape X j) from ⟨J,Or.inl le_rfl⟩) + change J ≤ firstAt F hF shape X J x ∨ x ∈ shape (chosen F hF shape X (firstAt F hF shape X J x)) at hs + exact hs.resolve_left (not_le_of_gt h) + +lemma firstAt_eq (J j : ℕ) (x : V) (hj : j < J) + (hxj : x ∈ shape (chosen F hF shape X j)) + (hearlier : ∀ i < j, x ∉ shape (chosen F hF shape X i)) : + firstAt F hF shape X J x = j := by + apply le_antisymm + · exact Nat.find_min' _ (Or.inr hxj) + · by_contra hn + have hlt : firstAt F hF shape X J x < j := by omega + exact hearlier _ hlt (firstAt_mem F hF shape X J x (hlt.trans hj)) + +noncomputable def ownCell (J : ℕ) (x : V) : Finset V := + if firstAt F hF shape X J x < J then cell F hF shape X (firstAt F hF shape X J x) else ∅ + +lemma ownCell_eq (J j : ℕ) (x : V) (hj : j < J) + (hxj : x ∈ shape (chosen F hF shape X j)) + (hearlier : ∀ i < j, x ∉ shape (chosen F hF shape X i)) : + ownCell F hF shape X J x = cell F hF shape X j := by + rw [ownCell, firstAt_eq F hF shape X J j x hj hxj hearlier, ite_eq_left hj] + +end SharpRamseyFive.GreedyTraining + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/Beta.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/Beta.lean new file mode 100644 index 0000000000000000000000000000000000000000..7be7f92f8cd6f37bfd886eddbaaa810aaf78472c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/Beta.lean @@ -0,0 +1,174 @@ +import Mathlib + +namespace OAI + +noncomputable section +namespace SharpRamseyFive.ParameterHierarchy +open Filter Asymptotics +open scoped Topology + +def beta (η : ℝ) : ℝ := η / 10000000 + +def L (η σ D : ℝ) : ℝ := D * σ ^ (8 * beta η) +def P (η σ D R : ℝ) : ℝ := L η σ D * R + +structure Range (η σ D R : ℝ) : Prop where + dlo : σ ^ beta η ≤ D + dhi : D ≤ σ ^ (1 - η/2) + rlo : σ ^ beta η ≤ R + rhi : R ≤ 2 * σ ^ beta η + 2 + +lemma beta_pos {η : ℝ} (h : 0 < η) : 0 < beta η := by unfold beta; positivity + +lemma finite_bounds {η σ D R : ℝ} (hη : 0 < η) (_hη' : η < 1/10) + (hσ : 1 ≤ σ) (h : Range η σ D R) : + 0 < D ∧ 0 < R ∧ 1 ≤ σ ^ beta η ∧ + σ ^ (9 * beta η) ≤ L η σ D ∧ L η σ D ≤ σ ∧ + σ ^ (10 * beta η) ≤ P η σ D R ∧ + P η σ D R ≤ 4 * σ ^ (1 - η/2 + 9 * beta η) := by + have hs : 0 < σ := zero_lt_one.trans_le hσ + have hb : 0 < beta η := beta_pos hη + have hx : 1 ≤ σ ^ beta η := Real.one_le_rpow hσ hb.le + have hd : 0 < D := (Real.rpow_pos_of_pos hs _).trans_le h.dlo + have hr : 0 < R := (Real.rpow_pos_of_pos hs _).trans_le h.rlo + have hlo : σ ^ (9 * beta η) ≤ L η σ D := by + dsimp [L] + calc + _ = σ ^ beta η * σ ^ (8 * beta η) := by rw [← Real.rpow_add hs]; congr 1; ring + _ ≤ _ := mul_le_mul_of_nonneg_right h.dlo (Real.rpow_nonneg hs.le _) + have hhi : L η σ D ≤ σ := by + dsimp [L] + calc + _ ≤ σ ^ (1-η/2) * σ ^ (8*beta η) := mul_le_mul_of_nonneg_right h.dhi (Real.rpow_nonneg hs.le _) + _ = σ ^ (1-η/2+8*beta η) := (Real.rpow_add hs _ _).symm + _ ≤ σ ^ (1:ℝ) := Real.rpow_le_rpow_of_exponent_le hσ (by dsimp [beta]; linarith) + _ = σ := Real.rpow_one _ + refine ⟨hd,hr,hx,hlo,hhi,?_,?_⟩ + · calc + _ = σ ^ (9*beta η) * σ ^ beta η := by rw [← Real.rpow_add hs]; congr 1; ring + _ ≤ L η σ D * R := mul_le_mul hlo h.rlo (Real.rpow_nonneg hs.le _) (by dsimp [L]; positivity) + · have hR : R ≤ 4 * σ ^ beta η := h.rhi.trans (by linarith) + calc + _ ≤ (σ ^ (1-η/2) * σ ^ (8*beta η)) * (4*σ ^ beta η) := by + dsimp [P,L] + exact mul_le_mul (mul_le_mul_of_nonneg_right h.dhi (Real.rpow_nonneg hs.le _)) hR hr.le (by positivity) + _ = 4 * σ ^ (1-η/2+9*beta η) := by + rw [show σ ^ (1-η/2) * σ ^ (8*beta η) * (4*σ ^ beta η) = + 4 * ((σ ^ (1-η/2) * σ ^ (8*beta η)) * σ ^ beta η) by ring, + ← Real.rpow_add hs, ← Real.rpow_add hs] + congr 2 + ring + +lemma ratio_bounds {η σ D R b τ : ℝ} (hη : 0 < η) (hη' : η < 1/10) + (hσ : 1 ≤ σ) (h : Range η σ D R) (Cb : ℝ) (_hCb : 0 ≤ Cb) + (hb : b ≤ Cb * D * σ ^ (6*beta η)) (hτ : τ ≤ σ ^ (-200*beta η)) : + P η σ D R / σ ≤ 4*σ ^ (-(η/2-9*beta η)) ∧ + Real.log σ / P η σ D R ≤ Real.log σ / σ ^ (10*beta η) ∧ + R * Real.log (L η σ D) / P η σ D R ≤ Real.log σ / σ ^ (9*beta η) ∧ + (b + P η σ D R * τ) / L η σ D ≤ Cb*σ ^ (-2*beta η) + 4*σ ^ (-199*beta η) ∧ + L η σ D / P η σ D R ≤ σ ^ (-beta η) := by + obtain ⟨hD,hR,hx,hL,hLhi,hP,hPhi⟩ := finite_bounds hη hη' hσ h + have hs : 0 < σ := zero_lt_one.trans_le hσ + have hLp : 0 < L η σ D := (Real.rpow_pos_of_pos hs _).trans_le hL + have hPp : 0 < P η σ D R := (Real.rpow_pos_of_pos hs _).trans_le hP + refine ⟨?_,?_,?_,?_,?_⟩ + · calc + _ ≤ (4*σ ^ (1-η/2+9*beta η))/σ := div_le_div_of_nonneg_right hPhi hs.le + _ = _ := by + rw [mul_div_assoc] + have he : σ ^ (1-η/2+9*beta η) / σ = σ ^ (1-η/2+9*beta η-1) := by + simpa only [Real.rpow_one] using (Real.rpow_sub hs (1-η/2+9*beta η) 1).symm + rw [he] + congr 2 + ring + · exact div_le_div_of_nonneg_left (Real.log_nonneg hσ) (Real.rpow_pos_of_pos hs _) hP + · have he : R * Real.log (L η σ D) / P η σ D R = Real.log (L η σ D) / L η σ D := by + dsimp [P]; field_simp + rw [he] + exact (div_le_div_of_nonneg_right (Real.log_le_log hLp hLhi) hLp.le).trans + (div_le_div_of_nonneg_left (Real.log_nonneg hσ) (Real.rpow_pos_of_pos hs _) hL) + · have hRhi : R ≤ 4*σ ^ beta η := h.rhi.trans (by linarith) + have hf : (b + P η σ D R*τ)/L η σ D = b/L η σ D + R*τ := by + dsimp [P]; field_simp + rw [hf] + have hb' : b/L η σ D ≤ Cb*σ ^ (-2*beta η) := by + apply (div_le_iff₀ hLp).mpr + calc + b ≤ Cb*D*σ ^ (6*beta η) := hb + _ = _ := by + dsimp [L] + rw [show Cb*σ ^ (-2*beta η)*(D*σ ^ (8*beta η)) = + Cb*D*(σ ^ (-2*beta η)*σ ^ (8*beta η)) by ring, ← Real.rpow_add hs] + congr 2 + ring + have ht' : R*τ ≤ 4*σ ^ (-199*beta η) := by + calc + _ ≤ R*σ ^ (-200*beta η) := mul_le_mul_of_nonneg_left hτ hR.le + _ ≤ (4*σ ^ beta η)*σ ^ (-200*beta η) := + mul_le_mul_of_nonneg_right hRhi (Real.rpow_nonneg hs.le _) + _ = _ := by rw [mul_assoc, ← Real.rpow_add hs]; congr 2; ring + exact add_le_add hb' ht' + · apply (div_le_iff₀ hPp).mpr + change L η σ D ≤ σ ^ (-beta η) * (L η σ D * R) + have he : σ ^ (-beta η)*σ ^ beta η = 1 := by rw [← Real.rpow_add hs]; simp + have hh := mul_le_mul_of_nonneg_left h.rlo (Real.rpow_nonneg hs.le (-beta η)) + rw [he] at hh + nlinarith + +theorem eventually_hierarchy {η : ℝ} (hη : 0 < η) (hη' : η < 1/10) + (Cb c A : ℝ) (hCb : 0 ≤ Cb) (hc : 0 < c) : + ∀ᶠ σ : ℝ in atTop, ∀ D R b τ : ℝ, Range η σ D R → + b ≤ Cb*D*σ ^ (6*beta η) → τ ≤ σ ^ (-200*beta η) → + A ≤ L η σ D ∧ P η σ D R ≤ c*σ ∧ + Real.log σ ≤ c*P η σ D R ∧ + R*Real.log (L η σ D) ≤ c*P η σ D R ∧ + b+P η σ D R*τ ≤ c*L η σ D ∧ L η σ D ≤ c*P η σ D R := by + have hb : 0 < beta η := beta_pos hη + have he : 0 < η/2-9*beta η := by dsimp [beta]; linarith + have h1 : Tendsto (fun σ : ℝ => 4*σ ^ (-(η/2-9*beta η))) atTop (𝓝 0) := by + simpa using (tendsto_rpow_neg_atTop he).const_mul 4 + have h2 := (isLittleO_log_rpow_atTop (mul_pos (by norm_num : (0:ℝ)<10) hb)).tendsto_div_nhds_zero + have h3 := (isLittleO_log_rpow_atTop (mul_pos (by norm_num : (0:ℝ)<9) hb)).tendsto_div_nhds_zero + have h4 : Tendsto (fun σ : ℝ => Cb*σ ^ (-2*beta η)+4*σ ^ (-199*beta η)) atTop (𝓝 0) := by + simpa only [neg_mul, mul_zero, zero_add] using + ((tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<2) hb)).const_mul Cb).add + ((tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<199) hb)).const_mul 4) + have h5 := tendsto_rpow_neg_atTop hb + have h6 := (tendsto_rpow_atTop (mul_pos (by norm_num : (0:ℝ)<9) hb)).eventually (eventually_ge_atTop A) + filter_upwards [eventually_ge_atTop (1:ℝ), h1.eventually_lt_const hc, + h2.eventually_lt_const hc, h3.eventually_lt_const hc, h4.eventually_lt_const hc, + h5.eventually_lt_const hc, h6] with σ hσ h1' h2' h3' h4' h5' h6' + intro D R b τ h hb' hτ + obtain ⟨hD,hR,_,hL,_,hP,_⟩ := finite_bounds hη hη' hσ h + obtain ⟨hr1,hr2,hr3,hr4,hr5⟩ := ratio_bounds hη hη' hσ h Cb hCb hb' hτ + have hLp : 0 < L η σ D := by dsimp [L]; positivity + have hPp : 0 < P η σ D R := mul_pos hLp hR + exact ⟨h6'.trans hL, (div_le_iff₀ (zero_lt_one.trans_le hσ)).mp (hr1.trans h1'.le), + (div_le_iff₀ hPp).mp (hr2.trans h2'.le), (div_le_iff₀ hPp).mp (hr3.trans h3'.le), + (div_le_iff₀ hLp).mp (hr4.trans h4'.le), (div_le_iff₀ hPp).mp (hr5.trans h5'.le)⟩ + +theorem eventually_power_absorption {η : ℝ} (hη : 0 < η) (hη' : η < 1/10) + (C k c : ℝ) (hC : 0 < C) (_hk : 0 ≤ k) (hc : 0 < c) : + ∀ᶠ σ : ℝ in atTop, ∀ D R : ℝ, Range η σ D R → + C*σ ^ k ≤ Real.exp (c*P η σ D R) := by + have hb : 0 < 10*beta η := mul_pos (by norm_num) (beta_pos hη) + have hlog : Tendsto (fun σ : ℝ => (Real.log C+k*Real.log σ)/σ ^ (10*beta η)) atTop (𝓝 0) := by + have hconst : Tendsto (fun σ : ℝ => Real.log C/σ ^ (10*beta η)) atTop (𝓝 0) := + tendsto_const_nhds.div_atTop (tendsto_rpow_atTop hb) + have hvar := ((isLittleO_log_rpow_atTop hb).tendsto_div_nhds_zero).const_mul k + simpa only [add_div, mul_div_assoc, mul_zero, add_zero] using hconst.add hvar + filter_upwards [eventually_ge_atTop (1:ℝ), hlog.eventually_lt_const hc] with σ hσ hh + intro D R h + have hs : 0 < σ := zero_lt_one.trans_le hσ + have hPs := (finite_bounds hη hη' hσ h).2.2.2.2.2.1 + have hcost : Real.log C+k*Real.log σ ≤ c*P η σ D R := + ((div_le_iff₀ (Real.rpow_pos_of_pos hs _)).mp hh.le).trans + (mul_le_mul_of_nonneg_left hPs hc.le) + apply (Real.log_le_iff_le_exp (mul_pos hC (Real.rpow_pos_of_pos hs _))).mp + rwa [Real.log_mul hC.ne' (Real.rpow_pos_of_pos hs k).ne', Real.log_rpow hs] + +end SharpRamseyFive.ParameterHierarchy + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/CoordinateMap.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/CoordinateMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..344b54478d6a5ecbe5cc5bab1f74531160be1704 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/CoordinateMap.lean @@ -0,0 +1,62 @@ +import Mathlib + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open scoped BigOperators +open MeasureTheory ProbabilityTheory +open scoped BigOperators ENNReal NNReal +namespace SharpRamseyFive.ScalarExtension +open scoped LinearAlgebra.Projectivization +variable {K L I : Type*} [Field K] [Field L] [Algebra K L] + +def coordinateMap : (I → K) →ₛₗ[algebraMap K L] (I → L) where + toFun v := algebraMap K L ∘ v + map_add' u v := by ext i; simp + map_smul' a v := by ext i; simp + +lemma coordinateMap_injective : Function.Injective (coordinateMap (K := K) (L := L) (I := I)) := by + intro u v h + ext i + exact (algebraMap K L).injective (congrFun h i) + +lemma coordinateMap_ne_zero (v : I → K) (hv : v ≠ 0) : + coordinateMap (L := L) v ≠ 0 := by + intro h + apply hv + apply coordinateMap_injective (L := L) + simpa using h + +noncomputable def pointMap : ℙ K (I → K) → ℙ L (I → L) := + Projectivization.map coordinateMap coordinateMap_injective + +lemma pointMap_mk (v : I → K) (hv : v ≠ 0) : + pointMap (L := L) (Projectivization.mk K v hv) = Projectivization.mk L + (coordinateMap v) (coordinateMap_ne_zero v hv) := rfl + +theorem independent_pointMap [Finite I] {J : Type*} {p : J → ℙ K (I → K)} + (hp : Projectivization.Independent p) : + Projectivization.Independent (pointMap (L := L) ∘ p) := by + obtain ⟨v, hv, hi⟩ := hp + change Projectivization.Independent (fun j => Projectivization.mk L + (coordinateMap (v j)) (coordinateMap_ne_zero (v j) (hv j))) + apply Projectivization.Independent.mk + exact linearIndependent_algebraMap_comp_iff.mpr hi + +theorem pointMap_injective [Finite I] : + Function.Injective (pointMap (K := K) (L := L) (I := I)) := by + intro p r h + by_contra hn + have hi := independent_pointMap (L := L) ((Projectivization.independent_pair_iff_ne p r).mpr hn) + have he : pointMap (L := L) ∘ ![p, r] = ![pointMap p, pointMap r] := by + ext i + fin_cases i <;> rfl + rw [he, Projectivization.independent_pair_iff_ne] at hi + exact hi h + +end SharpRamseyFive.ScalarExtension + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/DimensionTwoProcedure.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/DimensionTwoProcedure.lean new file mode 100644 index 0000000000000000000000000000000000000000..732d130a9de389847ae96e1250fd77d23542ddb6 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/DimensionTwoProcedure.lean @@ -0,0 +1,111 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Probability.DimensionTwoIntegrals + +namespace OAI + +namespace SharpRamseyFive.ParameterHierarchy +open Filter +open scoped Topology + +theorem eventually_procedure_margins {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ),Range η σ D R → 0≤b → + b≤Cb*D*σ^(6*beta η) → τ≤σ^(-200*beta η) → + let Q := P η σ D R + let κ := b+8*Q*τ+Real.log 16 + 104≤Q ∧ κ+8*Q*τ+Real.log 3200000000≤Q/2000 ∧ + 8*Q*τ+Real.log 1600≤L η σ D/1000 ∧ + 8*Q*τ+Real.log 16≤Q ∧ κ≤Q := by + have he := eventually_score_slack hη hη' Cb (Real.log 16+Real.log 3200000000) + 16 (1/2000) hCb (by norm_num) (by norm_num) + have hs := eventually_score_slack hη hη' Cb (Real.log 1600) + 8 (1/1000) hCb (by norm_num) (by norm_num) + have hu := eventually_score_slack hη hη' Cb (Real.log 16) + 8 1 hCb (by norm_num) (by norm_num) + have hm := eventually_score_margins hη hη' Cb hCb + filter_upwards [he,hs,hu,hm] with σ he hs hu hm + intro D b τ R hr hb hbhi hτ + have he := he D R b τ hr hb hbhi hτ + have hs := hs D R b τ hr hb hbhi hτ + have hu := hu D R b τ hr hb hbhi hτ + have hm := hm D b τ R hr hb hbhi hτ + have hL : 0≤L η σ D := by linarith only [hm.1] + have hLP : L η σ D≤P η σ D R := by linarith only [hm.2.2.2.1,hL] + dsimp only + refine ⟨by linarith only [hm.2.1],?_,?_,?_,?_⟩ + all_goals linarith only [he,hs,hu,hLP,hb] + +end SharpRamseyFive.ParameterHierarchy +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory PoissonScore ParameterHierarchy Filter +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_two_score_procedure {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [∀x : ℙ K V,Fintype (RadialLine x)], + ∀ {J : Type} [Fintype J] (X U S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) + (ia ib ic : ℙ K V→J) (T : Finset (ℙ K (Dual K V))), + finrank K V=3 → (Nat.card K:ℝ)=Real.exp σ → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → S.Nonempty → S⊆X → S⊆U → X.card≤4*S.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^3*Real.exp (-b)≤(X.card:ℝ)*T.card → + (∑j,(C j).card)≤3*S.card → (∀j,C j⊆S) → + (∀x,C (ic x)=C (ia x)∩C (ib x)) → + (S.card:ℝ)≤10*Real.exp (3*σ/2) → + (Nat.card K:ℝ)/S.card≤1/100 → (Nat.card K:ℝ)*P η σ D R≤S.card → + (∀x,ownFraction S (C (ia x)) (C (ib x))≤2/25) → + Real.exp (-8*P η σ D R*τ)/4≤ + (scheduleMeasure (fun _ : S => L₀*pointStrength S) R).real + {ω | let W := decoded U S (fun x => C (ia x)∪C (ib x)) (fun x => Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x))))) (emptyTests (exceptional S C) (hyperplaneSupport S) ω).card ω + (sampleCount ω:ℝ)≤2*((Nat.card K:ℝ)*P η σ D R) ∧ + (W.card:ℝ)≤(S.card:ℝ)*Real.exp (2*P η σ D R) ∧ + (9/10:ℝ)*S.card≤((W∩S).card:ℝ)} := by + have hi := eventually_two_score_integrals hη hη' Cb hCb + have hp := eventually_procedure_margins hη hη' Cb hCb + have hm := eventually_score_margins hη hη' Cb hCb + have ht := (tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<200) (beta_pos hη))).eventually (eventually_lt_nhds (by norm_num : (0:ℝ)<1/10)) + have hl := eventually_hierarchy hη hη' Cb 1 10000000000 hCb (by norm_num) + filter_upwards [eventually_ge_atTop (10:ℝ),hi,hp,hm,ht,hl] with σ hσ hi hp hm ht hl + rw [←neg_mul] at ht + intro D b τ R L₀ K V _ _ _ _ _ _ _ _ J _ X U S C ia ib ic T hdim hq hr hL hb hbhi hτ hτhi + hS hSX hSU hret hdens hprod hC hCS hCc hn hdiv hnP hf + have hP : (L₀:ℝ)*R=P η σ D R := by rw [hL];rfl + have hi := hi D b τ R L₀ K V U S C ia ib ic hdim hq hr hL hb hbhi hτhi + hS hC hCS hCc hn hdiv hf + have hp := hp D b τ R hr hb hbhi hτhi + have hm := hm D b τ R hr hb hbhi hτhi + have hlarge : 10000000000≤(L₀:ℝ) := by rw [hL];exact (hl D R b τ hr hbhi hτhi).1 + have hq10 : (10:ℝ)≤Nat.card K := by rw [hq];linarith only [Real.add_one_le_exp σ,hσ] + have hτ8 : 8*τ≤4/5 := by linarith only [hτhi,ht] + have hbcount := irregular_card_bound (d:=2) hdim (by norm_num) S C hS hC + (ξ:=(L₀:ℝ)/100) (by linarith only [Real.add_one_le_exp ((L₀:ℝ)/100),hlarge]) + have hpay := ScoreScalars.exp_sub_le_scaled (a:=0) (b:=2*((L₀:ℝ)/100)) + (C:=20000000) (by norm_num) (by + linarith only [Real.log_le_self (by norm_num : (0:ℝ)≤20000000),hlarge]) + simp only [neg_zero,Real.exp_zero] at hpay + rw [show -(2*((L₀:ℝ)/100))=(-2)*((L₀:ℝ)/100) by ring] at hpay + have hbad : ((irregular (d:=2) S C ((L₀:ℝ)/100)).card:ℝ)≤(S.card:ℝ)/100 := by + apply hbcount.trans + nlinarith only [mul_le_mul_of_nonneg_right hpay (Nat.cast_nonneg S.card : (0:ℝ)≤S.card)] + have hh := cell_score_from_integrals (d:=2) hdim (by norm_num) hq10 X U S hSX hSU hS hret C hC ia ib hf T L₀ R b τ 0 + hτ hτ8 hdens hprod (by rw [hP];exact hp.1) le_rfl (by rwa [hP]) hbad + (by rw [hP];dsimp only at hp;linarith only [hp.2.1]) + (by rw [hP,hL];exact hp.2.2.1) + (by rw [hP];exact hp.2.2.2.1) + (by rw [hP];exact hp.2.2.2.2) + (by rw [hP,hL];exact hm.2.2.2.2.2.2.1) + (by rw [hL];exact hm.2.2.2.2.2.2.2) + (by simpa only [hP] using hi.1) + (by simpa only [hP,zero_mul,Real.exp_zero,mul_one] using hi.2) + simpa only [hP,zero_add] using hh + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/FinsetEquivPositions.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/FinsetEquivPositions.lean new file mode 100644 index 0000000000000000000000000000000000000000..f0cb000e16ee841941087012243c6b3d760bdc16 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/FinsetEquivPositions.lean @@ -0,0 +1,21 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive +open scoped Classical +noncomputable section +variable {A B : Type*} [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B] +def equivPositions (e : A≃B) (S : Finset A) : Finset B := S.map e.toEmbedding +omit [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B] in +lemma mem_equivPositions (e : A≃B) (S : Finset A) (i : B) : + i∈equivPositions e S ↔ e.symm i∈S := by + simp [equivPositions] +lemma equivPositions_compl_card (e : A≃B) (S : Finset A) : + (equivPositions e S)ᶜ.card=Sᶜ.card := by + rw [Finset.card_compl,Finset.card_compl] + simp only [equivPositions,Finset.card_map,Fintype.card_congr e] +end +end SharpRamseyFive + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/FreshPublicValidation.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/FreshPublicValidation.lean new file mode 100644 index 0000000000000000000000000000000000000000..b50d48ff5ce9e3d8bc8d728b61acd9097afaff8b --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/FreshPublicValidation.lean @@ -0,0 +1,124 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.PredictorReverseCap +import OAI.Combinatorics.RamseyFive.Entropy.OptionComposition +import OAI.Combinatorics.RamseyFive.Entropy.TwoCapCost +import OAI.Combinatorics.RamseyFive.Entropy.FreshPublicFamily + +namespace OAI + +namespace SharpRamseyFive.ReverseCap + +section +open FiniteEntropy +open scoped Classical BigOperators +variable {A B : Type*} [Fintype A] [Fintype B] + +theorem fresh_public_validation (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hC : C.Nonempty) (hW : W.Nonempty) (hCW : C⊆W) + (n : ℕ) (q M : ℝ) (_hq : 0Option.map (freshDecoded R W n q t) (freshEncoded R S U C W hCW n q M t)) + p none≤Real.exp (-q) ∧ ∀Y,0

ambientCapLaw_positive R S U C W hW n q M Y hY⟩ + rw [ambientCapLaw_none] + exact publicCapLaw_failure R S U C W hC hW hCW n q M hE + +theorem fresh_public_domination (R : A→B→Prop) (S U : Finset A) + (C X W : Finset B) (hC : C.Nonempty) (hW : W.Nonempty) + (hCW : C⊆W) (hCX : C⊆X) (n : ℕ) (hn : 0Option.map (freshDecoded R W n q t) (freshEncoded R S U C W hCW n q M t))) + (Finset.univ.filter (Excludes a))≤(50*q/(9*c))*(((X.filter (R a)).card:ℝ)/X.card) := by + rw [fresh_public_law] + exact ambientCapLaw_domination R S U C X W hC hW hCW hCX n hn q c M hq hc hsize hE a +end + +open FiniteEntropy +open scoped Classical +variable {A : Type*} [Fintype A] + +def CaptureBound (T U : Finset A) (c M : ℝ) (W : Finset A) : Prop := + W⊆U ∧ (W.card:ℝ)≤M ∧ c*T.card≤(T∩W).card + +omit [Fintype A] in +lemma CaptureBound.nonempty {T U W : Finset A} {c M : ℝ} + (h : CaptureBound T U c M W) (hT : T.Nonempty) (hc : 0 pureLaw none + | some W => if hW : CaptureBound T UT c MT W then + publicCapLaw Incident S U (T∩W) W + ((hW.nonempty hT hc).mono Finset.inter_subset_right) n q M + else pureLaw none + +theorem reverse_after_general_capture {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (hq : 3≤Nat.card K) (S U : Finset (ℙ K V)) (hS : S.Nonempty) (hSU : S⊆U) + (T UT : Finset (ℙ K (Dual K V))) (hT : T.Nonempty) (c : ℝ) (hc : 0p.nonneg a) + +lemma eventMass_filter_union (p : Law A) (P Q : A→Prop) : + eventMass p (Finset.univ.filter fun a=>P a∨Q a) ≤ + eventMass p (Finset.univ.filter P)+eventMass p (Finset.univ.filter Q) := by + simp only [eventMass,Finset.sum_filter,←Finset.sum_add_distrib] + apply Finset.sum_le_sum + intro a _ + by_cases hp : P a <;> by_cases hq : Q a <;> simp [hp,hq,p.nonneg a] + +lemma pair_success_mass (p : Law A) (P Q : A→Prop) + (hP : eventMass p (Finset.univ.filter fun a=>¬P a) ≤ 1/20) + (hQ : eventMass p (Finset.univ.filter fun a=>¬Q a) ≤ 1/20) : + (9:ℝ)/10 ≤ eventMass p (Finset.univ.filter fun a=>P a∧Q a) := by + have hb : (1:ℝ) ≤ eventMass p (Finset.univ.filter fun a=>P a∧Q a)+ + eventMass p (Finset.univ.filter fun a=>¬P a)+ + eventMass p (Finset.univ.filter fun a=>¬Q a) := by + calc + 1 = ∑a,p a := p.sum_one.symm + _ ≤ ∑a,((if P a∧Q a then p a else 0)+(if ¬P a then p a else 0)+ + (if ¬Q a then p a else 0)) := by + apply Finset.sum_le_sum + intro a _ + by_cases hp : P a <;> by_cases hq : Q a <;> simp [hp,hq,p.nonneg a] + _ = _ := by simp only [Finset.sum_add_distrib,eventMass,Finset.sum_filter] + linarith + +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical BigOperators +variable {A B : Type*} [Fintype A] [Fintype B] + +noncomputable def rejected (R : A→B→Prop) (S : Finset A) {n : ℕ} + (q : ℝ) (row : Fin n→B) : Finset A := + S.filter fun a=>(n:ℝ)/(5*q) ≤ hits (neighbors R a) row + +omit [Fintype A] in +lemma expected_rejected_card (R : A→B→Prop) (S : Finset A) (C : Finset B) + (hC : C.Nonempty) (n : ℕ) (hn : 0 < n) (q : ℝ) (hq : 0 < q) : + (∑row,iid (uniformOn C hC) (Fin n) row*((rejected R S q row).card:ℝ)) ≤ + (5*q/C.card)*(∑a∈S,((C.filter (R a)).card:ℝ)) := by + simp only [rejected] + rw [expected_filter_card,Finset.mul_sum] + apply Finset.sum_le_sum + intro a ha + have he : (1/(5*q))*(n:ℝ)=(n:ℝ)/(5*q) := by ring + have hh := iid_test_rejection (uniformOn C hC) (neighbors R a) n hn (1/(5*q)) (by positivity) + rw [he,uniform_neighbor_mass] at hh + convert hh using 1; first | rfl | (simp only [div_eq_mul_inv,one_mul,inv_inv]; ring) + +omit [Fintype A] in +lemma capture_partition (R : A→B→Prop) (S U : Finset A) (hSU : S⊆U) + {n : ℕ} (q : ℝ) (row : Fin n→B) : + (S∩cap R U q row).card+(rejected R S q row).card=S.card := by + have he : S∩cap R U q row=S.filter fun a=>hits (neighbors R a) row < (n:ℝ)/(5*q) := by + ext a + simp only [Finset.mem_inter,cap,Finset.mem_filter] + constructor + · rintro ⟨ha,_,hw⟩;exact ⟨ha,hw⟩ + · rintro ⟨ha,hw⟩;exact ⟨ha,hSU ha,hw⟩ + rw [he,rejected] + simpa only [not_lt] using (Finset.card_filter_add_card_filter_not (s := S) (fun a=>hits (neighbors R a) row < (n:ℝ)/(5*q))) + +noncomputable def validationRows (R : A→B→Prop) (S U : Finset A) (C : Finset B) + (n : ℕ) (q M : ℝ) : Finset (Fin n→B) := + Finset.univ.filter fun row=>(∀i,row i∈C) ∧ ((cap R U q row).card:ℝ) ≤ M ∧ + (9:ℝ)/10*S.card ≤ (S∩cap R U q row).card + +omit [Fintype A] in +theorem validationRows_mass (R : A→B→Prop) (S U : Finset A) (hS : S.Nonempty) (hSU : S⊆U) + (C : Finset B) (hC : C.Nonempty) (n : ℕ) (hn : 0 < n) (q M : ℝ) (hq : 0 < q) (hM : 0 < M) + (hmean : ∑row,iid (uniformOn C hC) (Fin n) row*((cap R U q row).card:ℝ) ≤ M/20) + (hsparse : (5*q/C.card)*(∑a∈S,((C.filter (R a)).card:ℝ)) ≤ (S.card:ℝ)/200) : + (9:ℝ)/10 ≤ eventMass (iid (uniformOn C hC) (Fin n)) (validationRows R S U C n q M) := by + have he := uniform_row_source C hC (fun row : Fin n→B=> + ((cap R U q row).card:ℝ) ≤ M ∧ (9:ℝ)/10*S.card ≤ (S∩cap R U q row).card) + have he' : eventMass (iid (uniformOn C hC) (Fin n)) (validationRows R S U C n q M)= + eventMass (iid (uniformOn C hC) (Fin n)) (Finset.univ.filter fun row=> + ((cap R U q row).card:ℝ) ≤ M ∧ (9:ℝ)/10*S.card ≤ (S∩cap R U q row).card) := by + convert he using 1 <;> congr 1 <;> ext row <;> simp only [validationRows,Finset.mem_filter] + rw [he'] + apply pair_success_mass + · have hh := event_markov (iid (uniformOn C hC) (Fin n)) + (fun row=>((cap R U q row).card:ℝ)) (fun _=>Nat.cast_nonneg _) M + (Finset.univ.filter fun row=>¬((cap R U q row).card:ℝ) ≤ M) + (fun row hr=>(lt_of_not_ge (Finset.mem_filter.mp hr).2).le) + apply (mul_le_mul_iff_of_pos_left hM).mp + exact hh.trans (by simpa [div_eq_mul_inv] using hmean) + · have hs : (0:ℝ) < S.card := by exact_mod_cast Finset.card_pos.mpr hS + have hh := event_markov (iid (uniformOn C hC) (Fin n)) + (fun row=>((rejected R S q row).card:ℝ)) (fun _=>Nat.cast_nonneg _) (S.card/10) + (Finset.univ.filter fun row=>¬(9:ℝ)/10*S.card ≤ (S∩cap R U q row).card) + (by + intro row hr + have hg := (Finset.mem_filter.mp hr).2 + have hp : ((S∩cap R U q row).card:ℝ)+(rejected R S q row).card=S.card := by + exact_mod_cast capture_partition R S U hSU q row + linarith) + have hb := hh.trans ((expected_rejected_card R S C hC n hn q hq).trans hsparse) + apply (mul_le_mul_iff_of_pos_left (by positivity : (0:ℝ)4≤finrank K (sampleSpan x z.2) ∧ + z.1.submodule≤(sampleSpan x z.2).dualCoannihilator + +omit [Finite K] in +theorem highDomain_card (hdim : finrank K V=5) {n t : ℕ} + (x : Fin t→Fin n→SampleFlag (K:=K) (V:=V)) : + (highDomain x).card≤Fintype.card (ℙ K (Dual K V)) := by + apply Finset.card_le_card_of_injOn Prod.snd (t:=Finset.univ) + (fun _ _=>Finset.mem_univ _) ?_ + intro z hz w hw he + have hz':=(Finset.mem_filter.mp hz).2 + have hw':=(Finset.mem_filter.mp hw).2 + have hd := Subspace.finrank_add_finrank_dualCoannihilator_eq (sampleSpan x z.2) + rw [hdim] at hd + have hl : finrank K (sampleSpan x z.2).dualCoannihilator≤1 := by omega + have hzl : z.1.submodule=(sampleSpan x z.2).dualCoannihilator := + Submodule.eq_of_le_of_finrank_eq hz'.2 (by + have hh:=Submodule.finrank_mono hz'.2 + rw [z.1.finrank_submodule] at hh ⊢ + omega) + have hwl : w.1.submodule=(sampleSpan x z.2).dualCoannihilator := by + have hwc : w.1.submodule≤(sampleSpan x z.2).dualCoannihilator := he ▸ hw'.2 + apply Submodule.eq_of_le_of_finrank_eq hwc + have hh:=Submodule.finrank_mono hwc + rw [w.1.finrank_submodule] at hh ⊢ + omega + exact Prod.ext (Projectivization.submodule_injective (hzl.trans hwl.symm)) he + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma growSpan_le {n : ℕ} (y : ℙ K (Dual K V)) + (W U : Submodule K (Dual K V)) (x : Fin n→SampleFlag (K:=K) (V:=V)) + (hW : W≤U) (hx : ∀ i,Incident (x i).1 y → (x i).2.submodule≤U) : + growSpan y W x≤U := by + apply sup_le hW + unfold Marking.state + apply iSup₂_le + intro i _ + split_ifs with hi + · exact hx i hi + · exact bot_le + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma runSpan_le {n t : ℕ} (y : ℙ K (Dual K V)) + (W U : Submodule K (Dual K V)) (x : Fin t→Fin n→SampleFlag (K:=K) (V:=V)) + (hW : W≤U) (hx : ∀ j i,Incident (x j i).1 y → (x j i).2.submodule≤U) : + runSamples (growSpan y) W x≤U := by + induction t generalizing W with + | zero=>exact hW + | succ t ih=> + exact ih (growSpan y W (x 0)) (fun j=>x j.succ) + (growSpan_le y W U (x 0) hW (hx 0)) (fun j=>hx j.succ) + +omit [Finite K] [FiniteDimensional K V] in +theorem mem_highDomain {n t : ℕ} (x : Fin t→Fin n→SampleFlag (K:=K) (V:=V)) + (z : SampleFlag (K:=K) (V:=V)) (hz : Incident z.1 z.2) + (hr : 4≤finrank K (sampleSpan x z.2)) + (hc : ∀ j i,Incident (x j i).1 z.2 → Incident z.1 (x j i).2) : + z∈highDomain x := by + refine Finset.mem_filter.mpr ⟨Finset.mem_univ _,hr,?_⟩ + rw [←Submodule.le_dualAnnihilator_iff_le_dualCoannihilator] + apply runSpan_le z.2 z.2.submodule z.1.submodule.dualAnnihilator x + ((incident_iff_dualAnnihilator _ _).mp hz) + intro j i hi + exact (incident_iff_dualAnnihilator _ _).mp (hc j i hi) +end +end SharpRamseyFive.HighSamples + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/LargeTrainingCell.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/LargeTrainingCell.lean new file mode 100644 index 0000000000000000000000000000000000000000..86a7f70fb8052724601bccd5fa2722dd582b5a9e --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/LargeTrainingCell.lean @@ -0,0 +1,35 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.Training + +namespace OAI + +namespace SharpRamseyFive.GreedyTraining +open scoped Classical +variable {A I : Type*} [DecidableEq A] [LinearOrder I] + +theorem large_clipped_part (X S Y : Finset A) (hSX : S⊆X) + (hret : X.card≤4*S.card) (F : Finset I) (hF : F.Nonempty) + (shape : I→Finset A) (J : ℕ) + (h : ¬∀i,(clippedPart S F hF shape Y J i).card≤(S.card:ℝ)/25) : + ∃a∈F,(X.card:ℝ)≤100*(X∩shape a).card := by + obtain ⟨i,hi⟩ := not_forall.mp h + have hlarge := lt_of_not_ge hi + cases i with + | none => + simp only [clippedPart,Finset.card_empty,Nat.cast_zero] at hlarge + have hn : (0:ℝ)≤(S.card:ℝ)/25 := by positivity + exact False.elim (not_lt_of_ge hn hlarge) + | some i => + refine ⟨chosen F hF shape Y i,chosen_mem F hF shape Y i,?_⟩ + have hsub : clippedPart S F hF shape Y J (some i)⊆X∩shape (chosen F hF shape Y i) := by + intro a ha + have hm := Finset.mem_inter.mp ha + exact Finset.mem_inter.mpr ⟨hSX hm.1,(Finset.mem_inter.mp hm.2).2⟩ + have hc : ((clippedPart S F hF shape Y J (some i)).card:ℝ)≤(X∩shape (chosen F hF shape Y i)).card := by + exact_mod_cast Finset.card_le_card hsub + have hr : (X.card:ℝ)≤4*S.card := by exact_mod_cast hret + nlinarith only [hc,hr,hlarge] + +end SharpRamseyFive.GreedyTraining + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/LargeValueCount.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/LargeValueCount.lean new file mode 100644 index 0000000000000000000000000000000000000000..ee8da70783f88e0012604ae048902b37291e2aa5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/LargeValueCount.lean @@ -0,0 +1,71 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.ProjectiveEquiv + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.PencilRegularity +open Module SharpRamseyFive.ProjectiveIncidence +open scoped BigOperators LinearAlgebra.Projectivization Classical + +lemma large_value_count {I : Type*} [Fintype I] (f : I → ℝ) (μ h : ℝ) + (hh : 0 ≤ h) (hμ : μ ≤ h/2) : + ((Finset.univ.filter fun i => h ≤ f i).card:ℝ) * h^2 ≤ + 4*∑ i,(f i-μ)^2 := by + let E := Finset.univ.filter fun i => h ≤ f i + have hb (i : I) (hi : i ∈ E) : h^2 ≤ 4*(f i-μ)^2 := by + have hf := (Finset.mem_filter.mp hi).2 + have hs : h/2 ≤ f i-μ := by linarith + nlinarith [sq_nonneg (f i-μ-h/2)] + have hs := Finset.sum_le_sum (s:=E) hb + simp only [Finset.sum_const,nsmul_eq_mul,← Finset.mul_sum] at hs + apply hs.trans + apply mul_le_mul_of_nonneg_left _ (by norm_num) + exact Finset.sum_le_sum_of_subset_of_nonneg (Finset.subset_univ E) + (fun i _ _ => sq_nonneg _) + +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Module.Dual K V))] + +theorem clipped_pencil_count {d : ℕ} (hdim : finrank K V = d+1) (hd : 1 ≤ d) + (w : ℙ K (Module.Dual K V) → ℝ) (hw0 : ∀ b,0 ≤ w b) (hw1 : ∀ b,w b ≤ 1) + (h : ℝ) (hh : 0 ≤ h) + (hmean : ((Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d)*(∑ b,w b) ≤ h/2) : + ((Finset.univ.filter fun a => h ≤ weightOnPencil w a).card:ℝ)*h^2 ≤ + 4*(Nat.card K:ℝ)^(d-1)*(∑ b,w b) := by + have hc := large_value_count (weightOnPencil w) _ h hh hmean + have hv := pencil_variance hdim hd w + have hn : (∑ b,w b^2) ≤ ∑ b,w b := Finset.sum_le_sum fun b _ => by + nlinarith [mul_nonneg (hw0 b) (sub_nonneg.mpr (hw1 b))] + calc + _ ≤ 4*∑ a,(weightOnPencil w a - + ((Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d)*(∑ b,w b))^2 := hc + _ ≤ 4*((Nat.card K:ℝ)^(d-1)*∑ b,w b^2) := mul_le_mul_of_nonneg_left hv (by norm_num) + _ ≤ 4*((Nat.card K:ℝ)^(d-1)*∑ b,w b) := + mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left hn (by positivity)) (by norm_num) + _ = _ := by ring + +theorem family_irregular_count {d : ℕ} (hdim : finrank K V = d+1) (hd : 1 ≤ d) + {J : Type*} [Fintype J] (w : J → ℙ K (Module.Dual K V) → ℝ) + (hw0 : ∀ j b,0 ≤ w j b) (hw1 : ∀ j b,w j b ≤ 1) (h : ℝ) (hh : 0 ≤ h) + (hmean : ∀ j, ((Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d)*(∑ b,w j b) ≤ h/2) : + ((Finset.univ.filter fun a => ∃ j,h ≤ weightOnPencil (w j) a).card:ℝ)*h^2 ≤ + 4*(Nat.card K:ℝ)^(d-1)*(∑ j,∑ b,w j b) := by + let E : J → Finset (ℙ K V) := fun j => Finset.univ.filter fun a => h ≤ weightOnPencil (w j) a + have heq : (Finset.univ.filter fun a => ∃ j,h ≤ weightOnPencil (w j) a) = + Finset.univ.biUnion E := by ext a; simp [E] + rw [heq] + have hc : ((Finset.univ.biUnion E).card:ℝ) ≤ ∑ j,((E j).card:ℝ) := by + exact_mod_cast Finset.card_biUnion_le (s:=Finset.univ) (t:=E) + calc + _ ≤ (∑ j,((E j).card:ℝ))*h^2 := mul_le_mul_of_nonneg_right hc (sq_nonneg h) + _ = ∑ j,((E j).card:ℝ)*h^2 := Finset.sum_mul .. + _ ≤ ∑ j,4*(Nat.card K:ℝ)^(d-1)*(∑ b,w j b) := Finset.sum_le_sum fun j _ => + clipped_pencil_count hdim hd (w j) (hw0 j) (hw1 j) h hh (hmean j) + _ = _ := (Finset.mul_sum ..).symm + +end SharpRamseyFive.PencilRegularity + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/MetadataCodec.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/MetadataCodec.lean new file mode 100644 index 0000000000000000000000000000000000000000..a5151408b27214b2c964afa5df38232d9cf922bf --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/MetadataCodec.lean @@ -0,0 +1,151 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.FlatAtlas +import OAI.Combinatorics.RamseyFive.Entropy.MetadataBudget +import OAI.Combinatorics.RamseyFive.Geometry.FlatPoints +import OAI.Combinatorics.RamseyFive.Decoding.PublicTraining + +namespace OAI + +namespace SharpRamseyFive.Metadata + +section +open Module GreedyTraining MeasurePublicTable ProjectiveTraining +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] [Fintype (ℙ K V)] + +omit [FiniteDimensional K V] [Finite K] in +lemma projective_card_le_vectors [Finite V] (S : Finset (ℙ K V)) : S.card≤Nat.card V := by + have hi : Function.Injective (fun x : ℙ K V=>x.rep) := by + intro x y h + rw [←x.mk_rep,←y.mk_rep] + congr 1 + have hS : S.card≤Nat.card (ℙ K V) := by + simpa only [Nat.card_eq_fintype_card] using Finset.card_le_univ S + exact hS.trans (Nat.card_le_card_of_injective _ hi) + +noncomputable def encodeLists {h p B : ℕ} (hd : finrank K V≤5) + (H : Fin h→Submodule K V) (P : Fin p→Submodule K V) + (S : Finset (ℙ K V)) (hB : S.card≤B) : TwoListCode V h p B := + (fun i=>FlatAtlas.flatCode 5 hd (H i), fun i=>FlatAtlas.flatCode 5 hd (P i), + ⟨S.card,Nat.lt_succ_of_le hB⟩, + fun i=>⟨(S∩publicRegion (fun j=>flatPoints (H j)) i).card, + Nat.lt_succ_of_le ((Finset.card_le_card Finset.inter_subset_left).trans hB)⟩, + fun i=>⟨(S∩publicRegion (fun j=>flatPoints (P j)) i).card, + Nat.lt_succ_of_le ((Finset.card_le_card Finset.inter_subset_left).trans hB)⟩, + fun i=>⟨((S∩publicRegion (fun j=>flatPoints (H j)) i.1)∩ + (S∩publicRegion (fun j=>flatPoints (P j)) i.2)).card, + Nat.lt_succ_of_le ((Finset.card_le_card (Finset.inter_subset_left.trans Finset.inter_subset_left)).trans hB)⟩) + +noncomputable def decodeH {h p B : ℕ} (c : TwoListCode V h p B) : Fin h→Finset (ℙ K V) := + fun i=>flatPoints (Submodule.span K (Set.range (c.1 i))) +noncomputable def decodeP {h p B : ℕ} (c : TwoListCode V h p B) : Fin p→Finset (ℙ K V) := + fun i=>flatPoints (Submodule.span K (Set.range (c.2.1 i))) +noncomputable def decodeOwn {h p B : ℕ} (c : TwoListCode V h p B) (x : ℙ K V) : Finset (ℙ K V) := + twoPublicOwn (decodeH c) (decodeP c) x + +noncomputable def decodeOwnCount {h p B : ℕ} (c : TwoListCode V h p B) (x : ℙ K V) : ℕ := + let ih := firstIndex {F | x∈F} (decodeH c) + let ip := firstIndex {F | x∈F} (decodeP c) + (ih.elim 0 (fun i=>(c.2.2.2.1 i).val))+ + (ip.elim 0 (fun i=>(c.2.2.2.2.1 i).val))- + (ih.elim 0 (fun i=>ip.elim 0 (fun j=>(c.2.2.2.2.2 (i,j)).val))) + +omit [Fintype (ℙ K V)] + +lemma decodeH_encode {h p B : ℕ} (hd : finrank K V≤5) + (H : Fin h→Submodule K V) (P : Fin p→Submodule K V) + (S : Finset (ℙ K V)) (hB : S.card≤B) : + decodeH (encodeLists hd H P S hB)=fun i=>flatPoints (H i) := by + funext i + exact congrArg flatPoints (FlatAtlas.decode_flatCode 5 hd (H i)) +lemma decodeP_encode {h p B : ℕ} (hd : finrank K V≤5) + (H : Fin h→Submodule K V) (P : Fin p→Submodule K V) + (S : Finset (ℙ K V)) (hB : S.card≤B) : + decodeP (encodeLists hd H P S hB)=fun i=>flatPoints (P i) := by + funext i + exact congrArg flatPoints (FlatAtlas.decode_flatCode 5 hd (P i)) + +lemma decodeOwn_encode {h p B : ℕ} (hd : finrank K V≤5) + (H : Fin h→Submodule K V) (P : Fin p→Submodule K V) + (S : Finset (ℙ K V)) (hB : S.card≤B) (x : ℙ K V) : + decodeOwn (encodeLists hd H P S hB) x= + twoPublicOwn (fun i=>flatPoints (H i)) (fun i=>flatPoints (P i)) x := by + simp only [decodeOwn,decodeH_encode,decodeP_encode] + +theorem decodeOwnCount_encode {h p B : ℕ} (hd : finrank K V≤5) + (H : Fin h→Submodule K V) (P : Fin p→Submodule K V) + (S : Finset (ℙ K V)) (hB : S.card≤B) (x : ℙ K V) : + decodeOwnCount (encodeLists hd H P S hB) x= + (S∩twoPublicOwn (fun i=>flatPoints (H i)) (fun i=>flatPoints (P i)) x).card := by + simp only [decodeOwnCount,decodeH_encode,decodeP_encode,twoPublicOwn,publicOwn, + Finset.inter_union_distrib_left] + cases hh : firstIndex {F | x∈F} (fun i=>flatPoints (H i)) <;> + cases hp : firstIndex {F | x∈F} (fun i=>flatPoints (P i)) <;> + simp [encodeLists,Finset.card_union] + +noncomputable def decodeBaseScore {h p B : ℕ} (c : TwoListCode V h p B) (L : ℝ) (x : ℙ K V) : ℝ := + Real.exp (-L*(1-(decodeOwnCount c x:ℝ)/c.2.2.1.val)) + +lemma decodeBaseScore_encode {h p B : ℕ} (hd : finrank K V≤5) + (H : Fin h→Submodule K V) (P : Fin p→Submodule K V) + (S : Finset (ℙ K V)) (hB : S.card≤B) (L : ℝ) (x : ℙ K V) : + decodeBaseScore (encodeLists hd H P S hB) L x= + Real.exp (-L*(1-((S∩twoPublicOwn (fun i=>flatPoints (H i)) + (fun i=>flatPoints (P i)) x).card:ℝ)/S.card)) := by + simp only [decodeBaseScore,decodeOwnCount_encode] + rfl + +end + +open Module GreedyTraining ProjectiveTraining +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] [Fintype V] [Fintype (ℙ K V)] + +omit [Fintype V] [Fintype (ℙ K V)] in +lemma vector_card_le_exp (σ : ℝ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) : + (Nat.card V:ℝ)≤Real.exp (5*σ) := by + have hq1 : 1≤Nat.card K := Nat.card_pos + have hh : Nat.card V≤Nat.card K^5 := by + rw [Module.natCard_eq_pow_finrank (K:=K)] + exact Nat.pow_le_pow_right hq1 hd + have he : (Nat.card K:ℝ)^5=Real.exp (5*σ) := by + rw [←hq,←Real.exp_nat_mul];norm_num + exact (by exact_mod_cast hh : (Nat.card V:ℝ)≤(Nat.card K:ℝ)^5).trans_eq he + +noncomputable def encodeTraining {h p : ℕ} (σ : ℝ) (hd : finrank K V≤5) + (hh : h≤listCap σ) (hp : p≤listCap σ) (hj : h*p≤productCap σ) + (H : Fin h→Submodule K V) (P : Fin p→Submodule K V) (S : Finset (ℙ K V)) : + TrainingCode V (listCap σ) (productCap σ) (Nat.card V) := + ⟨⟨(⟨h,Nat.lt_succ_of_le hh⟩,⟨p,Nat.lt_succ_of_le hp⟩),hj⟩, + encodeLists hd H P S (projective_card_le_vectors S)⟩ + +noncomputable def messageOwn {H J B : ℕ} (c : TrainingCode V H J B) (x : ℙ K V) : Finset (ℙ K V) := + decodeOwn c.2 x +noncomputable def messageBase {H J B : ℕ} (c : TrainingCode V H J B) (L : ℝ) (x : ℙ K V) : ℝ := + decodeBaseScore c.2 L x + +theorem training_message {h p : ℕ} (σ g : ℝ) (hd : finrank K V≤5) + (hσ : 100000≤σ) (hq : Real.exp σ=Nat.card K) + (hg : 0≤g) (hghi : g≤σ+Real.log 4) + (hlen : (h:ℝ)*Real.exp (2*σ)≤Real.exp (3*σ/2+g)) + (plen : (p:ℝ)*Real.exp (σ+17*g/15)≤Real.exp (3*σ/2+g)) + (H : Fin h→Submodule K V) (P : Fin p→Submodule K V) (S : Finset (ℙ K V)) : + Real.log (Nat.card (TrainingCode V (listCap σ) (productCap σ) (Nat.card V)))≤Nat.card K ∧ + ∃c : TrainingCode V (listCap σ) (productCap σ) (Nat.card V), + (∀x,messageOwn c x=twoPublicOwn (fun i=>flatPoints (H i)) (fun i=>flatPoints (P i)) x) ∧ + (∀L x,messageBase c L x=Real.exp (-L*(1-((S∩twoPublicOwn (fun i=>flatPoints (H i)) + (fun i=>flatPoints (P i)) x).card:ℝ)/S.card))) := by + obtain ⟨hh,hp,hj⟩ := profile_of_lengths σ g h p hg hghi hlen plen + refine ⟨?_,encodeTraining σ hd hh hp hj H P S,?_,?_⟩ + · rw [←hq] + exact log_card_training_le σ hσ (vector_card_le_exp σ hq hd) + · intro x + exact decodeOwn_encode hd H P S (projective_card_le_vectors S) x + · intro L x + exact decodeBaseScore_encode hd H P S (projective_card_le_vectors S) L x + +end SharpRamseyFive.Metadata + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/MetadataScalars.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/MetadataScalars.lean new file mode 100644 index 0000000000000000000000000000000000000000..135b83f5ec1a9438d621af8fb4aebb6a47ef7a6d --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/MetadataScalars.lean @@ -0,0 +1,60 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.Metadata +open Filter +open scoped Topology + +lemma list_length_bounds (σ g h p : ℝ) (_hh : 0≤h) (hp : 0≤p) + (hg : 0≤g) (hghi : g≤σ+Real.log 4) + (hlen : h*Real.exp (2*σ)≤Real.exp (3*σ/2+g)) + (plen : p*Real.exp (σ+17*g/15)≤Real.exp (3*σ/2+g)) : + h≤4*Real.exp (σ/2) ∧ p≤Real.exp (σ/2) ∧ h*p≤4*Real.exp (13*σ/15) := by + have hb : h≤Real.exp (g-σ/2) := by + have hb := (le_div_iff₀ (Real.exp_pos (2*σ))).mpr hlen + rw [←Real.exp_sub] at hb + convert hb using 1; congr 1; ring + have pb : p≤Real.exp (σ/2-2*g/15) := by + have pb := (le_div_iff₀ (Real.exp_pos (σ+17*g/15))).mpr plen + rw [←Real.exp_sub] at pb + convert pb using 1; congr 1; ring + refine ⟨?_,pb.trans (Real.exp_le_exp.mpr (by linarith)),?_⟩ + · calc + h≤Real.exp (σ/2+Real.log 4) := hb.trans (Real.exp_le_exp.mpr (by linarith)) + _=4*Real.exp (σ/2) := by rw [Real.exp_add,Real.exp_log (by norm_num : (0:ℝ)<4)];ring + · calc + _≤Real.exp (g-σ/2)*Real.exp (σ/2-2*g/15) := mul_le_mul hb pb hp (Real.exp_nonneg _) + _=Real.exp (13*g/15) := by rw [←Real.exp_add];congr 1;ring + _≤Real.exp (13*σ/15+Real.log 4) := Real.exp_le_exp.mpr (by have := Real.log_nonneg (by norm_num : (1:ℝ)≤4);linarith) + _=4*Real.exp (13*σ/15) := by rw [Real.exp_add,Real.exp_log (by norm_num : (0:ℝ)<4)];ring + +lemma sigma_exp_absorb (C σ : ℝ) (hC : 0≤C) (hσ : 225*C≤σ) (hσ0 : 0≤σ) : + C*σ*Real.exp (13*σ/15)≤Real.exp σ := by + have hp := Real.pow_div_factorial_le_exp (2*σ/15) (by positivity : (0:ℝ)≤2*σ/15) 2 + norm_num only [Nat.factorial,Finset.prod_range_succ,Nat.cast_ofNat] at hp + have hc : C*σ≤Real.exp (2*σ/15) := by nlinarith + calc + _≤Real.exp (2*σ/15)*Real.exp (13*σ/15) := mul_le_mul_of_nonneg_right hc (Real.exp_nonneg _) + _=Real.exp σ := by rw [←Real.exp_add];congr 1;ring + +lemma metadata_budget (σ H J B V : ℝ) (hσ : 100000≤σ) + (hH : 0≤H) (hJ : 0≤J) (_hB : 0 p.1 ≠ p.2 ∧ ¬R p.1 p.2 + +lemma card_nonpairs (R : I → I → Prop) [DecidableRel R] (S : Finset I) : + (nonpairs R S).card = ∑ x ∈ S, (S.filter fun y => x ≠ y ∧ ¬R x y).card := by + simp only [nonpairs, Finset.card_filter, Finset.sum_product] + +lemma nonpairs_mono (R : I → I → Prop) [DecidableRel R] {S T : Finset I} + (h : S ⊆ T) : nonpairs R S ⊆ nonpairs R T := + Finset.filter_subset_filter _ (Finset.product_subset_product h h) + +lemma row_partition (R : I → I → Prop) [DecidableRel R] (hR : ∀ x, ¬R x x) + (S : Finset I) {x : I} (hx : x ∈ S) : + (S.filter fun y => x ≠ y ∧ ¬R x y).card + (S.filter (R x)).card + 1 = S.card := by + have he : (S.filter fun y => ¬R x y).erase x = S.filter fun y => x ≠ y ∧ ¬R x y := by + ext y + simp only [Finset.mem_erase, Finset.mem_filter] + tauto + have hm : x ∈ S.filter fun y => ¬R x y := by simp [hx, hR x] + have hc := Finset.card_erase_add_one hm + rw [he] at hc + have hp := Finset.card_filter_add_card_filter_not (s := S) (R x) + omega + +lemma sq_card_bound (R : I → I → Prop) [DecidableRel R] (hR : ∀ x, ¬R x x) + (S : Finset I) (D : ℝ) + (hD : ∀ x ∈ S, ((S.filter (R x)).card : ℝ) ≤ D) : + (S.card : ℝ)^2 ≤ (nonpairs R S).card + S.card * (D+1) := by + have hrow (x : I) (hx : x ∈ S) : + (S.card : ℝ) ≤ (S.filter fun y => x ≠ y ∧ ¬R x y).card + (D+1) := by + have hp : ((S.filter fun y => x ≠ y ∧ ¬R x y).card : ℝ) + + (S.filter (R x)).card + 1 = S.card := by exact_mod_cast row_partition R hR S hx + linarith [hD x hx] + have hsum := Finset.sum_le_sum hrow + simp only [Finset.sum_const, nsmul_eq_mul, Finset.sum_add_distrib, + ← Nat.cast_sum, ← card_nonpairs] at hsum + nlinarith + +theorem many_nonpairs (R : I → I → Prop) [DecidableRel R] + (hR : ∀ x, ¬R x x) (S : Finset I) (c : ℕ) + (hc : ∀ x ∈ S, ∀ y ∈ S, R x y → + (S.filter fun z => R x z ∧ R y z).card ≤ c) + (hsize : 8*(c+1) ≤ S.card) : + (S.card : ℝ)^2 ≤ 16*(nonpairs R S).card := by + have hsz : 8*((c:ℝ)+1) ≤ S.card := by exact_mod_cast hsize + by_cases hhigh : ∃ x ∈ S, (S.card:ℝ)/2 ≤ (S.filter (R x)).card + · obtain ⟨x, hx, hd⟩ := hhigh + let T := S.filter (R x) + have hT : T ⊆ S := Finset.filter_subset _ _ + have hdeg (y : I) (hy : y ∈ T) : ((T.filter (R y)).card:ℝ) ≤ c := by + have hy' := Finset.mem_filter.mp hy + have he : T.filter (R y) = S.filter fun z => R x z ∧ R y z := by + simp only [T, Finset.filter_filter] + rw [he] + exact_mod_cast hc x hx y hy'.1 hy'.2 + have hloc := sq_card_bound R hR T c hdeg + have hm : ((nonpairs R T).card:ℝ) ≤ (nonpairs R S).card := by + exact_mod_cast Finset.card_le_card (nonpairs_mono R hT) + have hc0 : (0:ℝ) ≤ c := Nat.cast_nonneg _ + have ht0 : (0:ℝ) ≤ T.card := Nat.cast_nonneg _ + have hd' : (S.card:ℝ)/2 ≤ T.card := hd + nlinarith [sq_nonneg ((T.card:ℝ)-(S.card:ℝ)/2), + mul_nonneg (show 0 ≤ (T.card:ℝ)-2*((c:ℝ)+1) by linarith) ht0] + · have hd (x : I) (hx : x ∈ S) : ((S.filter (R x)).card:ℝ) ≤ (S.card:ℝ)/2 := by + have : ¬ (S.card:ℝ)/2 ≤ (S.filter (R x)).card := fun h => hhigh ⟨x,hx,h⟩ + exact (lt_of_not_ge this).le + have hg := sq_card_bound R hR S ((S.card:ℝ)/2) hd + have hn0 : (0:ℝ) ≤ (nonpairs R S).card := Nat.cast_nonneg _ + nlinarith [show (0:ℝ) ≤ c from Nat.cast_nonneg c, sq_nonneg ((S.card:ℝ)-4)] + +end SharpRamseyFive.SkewPairCounting + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/OffFiberPairs.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/OffFiberPairs.lean new file mode 100644 index 0000000000000000000000000000000000000000..3f7da47e0460b52c2f8297bce55e8d2d5e35e49f --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/OffFiberPairs.lean @@ -0,0 +1,97 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.SubspacePointsEquiv + +namespace OAI + +namespace SharpRamseyFive.NondominantOverlap +open Module ProjectiveIncidence +open scoped BigOperators LinearAlgebra.Projectivization Classical + +section Finite +variable {I D : Type*} [DecidableEq I] [DecidableEq D] +noncomputable def offFiberPairs (f : I → D) (X : Finset I) : Finset (I × I) := + (X ×ˢ X).filter fun p => f p.1 ≠ f p.2 + +omit [DecidableEq I] in +lemma card_offFiberPairs (f : I → D) (X : Finset I) : + (offFiberPairs f X).card = ∑ y ∈ X, (X.filter fun z => f y ≠ f z).card := by + simp only [offFiberPairs,Finset.card_filter,Finset.sum_product] + +omit [DecidableEq I] in +lemma offFiberPairs_many (f : I → D) (X : Finset I) + (h : ∀ y ∈ X, 2*(X.filter fun z => f y = f z).card ≤ X.card) : + X.card^2 ≤ 2*(offFiberPairs f X).card := by + have hrow (y : I) (hy : y ∈ X) : X.card ≤ 2*(X.filter fun z => f y ≠ f z).card := by + have hp := Finset.card_filter_add_card_filter_not (s := X) (fun z => f y = f z) + change (X.filter fun z => f y = f z).card + (X.filter fun z => f y ≠ f z).card = X.card at hp + have hh := h y hy + omega + have hs := Finset.sum_le_sum hrow + simpa only [Finset.sum_const_nat,← Finset.mul_sum,← card_offFiberPairs,pow_two] using hs +end Finite + +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] [FiniteDimensional K V] + (x : ℙ K V) + +noncomputable def onPlane (X : Finset {y : ℙ K V // x ≠ y}) (A : Submodule K V) := + X.filter fun y => y.val.submodule ≤ A + +noncomputable def planePairs (X : Finset {y : ℙ K V // x ≠ y}) (A : Submodule K V) := + offFiberPairs (fun y : {y : ℙ K V // x ≠ y} => RadialLine.through x y.val y.property) (onPlane x X A) + +lemma planePairs_disjoint (X : Finset {y : ℙ K V // x ≠ y}) + (A B : Submodule K V) (hA : finrank K A = 3) (hB : finrank K B = 3) + (hxA : x.submodule ≤ A) (hxB : x.submodule ≤ B) (hne : A ≠ B) : + Disjoint (planePairs x X A) (planePairs x X B) := by + apply Finset.disjoint_left.mpr + rintro ⟨y,z⟩ hpa hpb + obtain ⟨hya,hza⟩ := Finset.mem_product.mp (Finset.mem_filter.mp hpa).1 + obtain ⟨hyb,hzb⟩ := Finset.mem_product.mp (Finset.mem_filter.mp hpb).1 + have hrad := (Finset.mem_filter.mp hpa).2 + let l := RadialLine.through x y.val y.property + let m := RadialLine.through x z.val z.property + have hr : finrank K (l.val ⊔ m.val : Submodule K V) = 3 := RadialLine.finrank_sup hrad + have hlA : l.val ≤ A := (RadialLine.through_le_iff _ _).mpr ⟨hxA,(Finset.mem_filter.mp hya).2⟩ + have hmA : m.val ≤ A := (RadialLine.through_le_iff _ _).mpr ⟨hxA,(Finset.mem_filter.mp hza).2⟩ + have hlB : l.val ≤ B := (RadialLine.through_le_iff _ _).mpr ⟨hxB,(Finset.mem_filter.mp hyb).2⟩ + have hmB : m.val ≤ B := (RadialLine.through_le_iff _ _).mpr ⟨hxB,(Finset.mem_filter.mp hzb).2⟩ + have hEA := Submodule.eq_of_le_of_finrank_eq (sup_le hlA hmA) (hr.trans hA.symm) + have hEB := Submodule.eq_of_le_of_finrank_eq (sup_le hlB hmB) (hr.trans hB.symm) + exact hne (hEA.symm.trans hEB) + +theorem rich_nondominant_plane_count (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 3) + (hxF : ∀ A ∈ F, x.submodule ≤ A) (M : ℕ) + (hM : ∀ A ∈ F, M ≤ (onPlane x X A).card) + (hnd : ∀ A ∈ F, ∀ l : RadialLine x, + 2*((onPlane x X A).filter fun y => y.val.submodule ≤ l.val).card ≤ (onPlane x X A).card) : + F.card*M^2 ≤ 2*X.card^2 := by + have hm (A : Submodule K V) (hA : A ∈ F) : M^2 ≤ 2*(planePairs x X A).card := by + have hh := offFiberPairs_many (fun y : {y : ℙ K V // x ≠ y} => RadialLine.through x y.val y.property) + (onPlane x X A) (by + intro y _ + have hr := hnd A hA (RadialLine.through x y.val y.property) + have he : ((onPlane x X A).filter fun z => + RadialLine.through x y.val y.property = RadialLine.through x z.val z.property) = + ((onPlane x X A).filter fun z => z.val.submodule ≤ (RadialLine.through x y.val y.property).val) := by + ext z + simp only [Finset.mem_filter,eq_comm (a := RadialLine.through x y.val y.property),RadialLine.through_eq_iff] + rwa [he]) + exact (Nat.pow_le_pow_left (hM A hA) 2).trans hh + have hdisj : (F : Set (Submodule K V)).PairwiseDisjoint (planePairs x X) := by + intro A hA B hB hne + exact planePairs_disjoint x X A B (hF A hA) (hF B hB) (hxF A hA) (hxF B hB) hne + have hsub : F.biUnion (planePairs x X) ⊆ X ×ˢ X := by + intro p hp + obtain ⟨A,_,hpA⟩ := Finset.mem_biUnion.mp hp + obtain ⟨hy,hz⟩ := Finset.mem_product.mp (Finset.mem_filter.mp hpA).1 + exact Finset.mem_product.mpr ⟨(Finset.mem_filter.mp hy).1,(Finset.mem_filter.mp hz).1⟩ + have hc := Finset.card_le_card hsub + rw [Finset.card_biUnion hdisj,Finset.card_product] at hc + have hs := Finset.sum_le_sum hm + simp only [Finset.sum_const_nat,← Finset.mul_sum] at hs + exact hs.trans (by nlinarith) + +end SharpRamseyFive.NondominantOverlap + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/PairExpBound.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/PairExpBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..203395f11157df56c62b48ec46614bc6dadac644 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/PairExpBound.lean @@ -0,0 +1,61 @@ +import Mathlib + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open scoped BigOperators +open MeasureTheory ProbabilityTheory +open scoped BigOperators ENNReal NNReal +namespace SharpRamseyFive.RichParameters + +lemma pair_exp_bound {N M J : ℕ} (hM : 2 ≤ M) (hMN : M ≤ N) + (hpack : J * (M*(M-1)) ≤ N^2) : + (J:ℝ)*Real.exp (-(256/3:ℝ)*Real.sqrt ((N:ℝ)/M)) < 1/2 := by + have hMp : (0:ℝ) < M := by exact_mod_cast lt_of_lt_of_le (by decide : 0<2) hM + have hM2 : (2:ℝ) ≤ M := by exact_mod_cast hM + have hN : (M:ℝ) ≤ N := by exact_mod_cast hMN + have hpack' : (J:ℝ)*((M:ℝ)*(M-1)) ≤ (N:ℝ)^2 := by + have H := (Nat.cast_le (α := ℝ)).mpr hpack + push_cast [Nat.cast_sub (show 1 ≤ M by omega)] at H + exact H + let r := Real.sqrt ((N:ℝ)/M) + have hr : 1 ≤ r := by + apply (Real.le_sqrt (by norm_num) (by positivity)).mpr + simpa using (le_div_iff₀ hMp).mpr (by simpa using hN) + have hrsq : r^2 = (N:ℝ)/M := Real.sq_sqrt (by positivity) + have hrN : r^2*M = N := by rw [hrsq, div_mul_cancel₀ _ (ne_of_gt hMp)] + have hJM : (J:ℝ)*(M:ℝ)^2 ≤ 2*(N:ℝ)^2 := by + nlinarith [mul_nonneg (show (0:ℝ) ≤ J by positivity) (show (0:ℝ) ≤ M*(M-2) by positivity)] + have hJ : (J:ℝ) ≤ 2*r^4 := by + apply (mul_le_mul_iff_right₀ (sq_pos_of_pos hMp)).mp + nlinarith [sq_nonneg (r^2*M-(N:ℝ)), sq_nonneg (r^2*M+(N:ℝ))] + have hre : r ≤ Real.exp r := by linarith [Real.add_one_le_exp r] + have hre4 : r^4 ≤ Real.exp (4*r) := by + rw [show (4:ℝ)*r = (4:ℕ)*r by norm_num, Real.exp_nat_mul] + exact pow_le_pow_left₀ (by positivity) hre 4 + have hsmall : Real.exp (-2) < (1/4:ℝ) := by + have he : (2:ℝ) < Real.exp 1 := by simpa only [one_add_one_eq_two] using Real.add_one_lt_exp (by norm_num : (1:ℝ) ≠ 0) + have he2 : (4:ℝ) < Real.exp 2 := by + calc + (4:ℝ) < (Real.exp 1)^2 := by nlinarith [Real.exp_pos (1:ℝ)] + _ = Real.exp 2 := by rw [← Real.exp_nat_mul]; norm_num + rw [Real.exp_neg] + rw [← one_div] + exact (div_lt_div_iff_of_pos_left (by norm_num) (Real.exp_pos _) (by norm_num)).mpr he2 + calc + (J:ℝ)*Real.exp (-(256/3:ℝ)*r) ≤ 2*r^4*Real.exp (-(256/3:ℝ)*r) := + mul_le_mul_of_nonneg_right hJ (Real.exp_pos _).le + _ ≤ 2*Real.exp (4*r)*Real.exp (-(256/3:ℝ)*r) := + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hre4 (by norm_num)) (Real.exp_pos _).le + _ = 2*Real.exp (4*r-(256/3:ℝ)*r) := by rw [mul_assoc, ← Real.exp_add]; congr 2; ring + _ ≤ 2*Real.exp (-2) := by + apply mul_le_mul_of_nonneg_left _ (by norm_num) + apply Real.exp_le_exp.mpr + linarith + _ < 1/2 := by linarith +end SharpRamseyFive.RichParameters + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/PairPoints.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/PairPoints.lean new file mode 100644 index 0000000000000000000000000000000000000000..9cb635b61dab3eccdee7917f41d7486f9cefe28e --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/PairPoints.lean @@ -0,0 +1,318 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.CardFilterContainment +import OAI.Combinatorics.RamseyFive.Decoding.OffFiberPairs + +namespace OAI + +namespace SharpRamseyFive.ActualOverlap +open Module ProjectiveIncidence RichPlaneGeometry HyperplaneOverlap NondominantOverlap +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] [FiniteDimensional K V] [Finite K] + (x : ℙ K V) + +noncomputable def pairPoints (X : Finset {y : ℙ K V // x ≠ y}) + (A B : Submodule K V) := onPlane x X (A ⊓ B) + +theorem nondominant_pair_count (hdim : finrank K V = 5) + (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 4) + (hxF : ∀ A ∈ F, x.submodule ≤ A) + (E : Finset (Submodule K V × Submodule K V)) (hE : E ⊆ F ×ˢ F) + (hne : ∀ p ∈ E, p.1 ≠ p.2) (M : ℕ) + (hM : ∀ p ∈ E, M ≤ (pairPoints x X p.1 p.2).card) + (hnd : ∀ p ∈ E, ∀ l : RadialLine x, + 2*((pairPoints x X p.1 p.2).filter fun y => y.val.submodule ≤ l.val).card ≤ + (pairPoints x X p.1 p.2).card) : + E.card*M^2 ≤ 2*X.card^2*(Nat.card K+1)^2 := by + let L := E.image fun p => p.1 ⊓ p.2 + have hL (W : Submodule K V) (hW : W ∈ L) : finrank K W = 3 := by + obtain ⟨⟨A,B⟩,hAB,rfl⟩ := Finset.mem_image.mp hW + obtain ⟨hA,hB⟩ := Finset.mem_product.mp (hE hAB) + exact hyperplane_intersection_rank (d := 4) hdim A B (hF A hA) (hF B hB) (hne _ hAB) + have hxL (W : Submodule K V) (hW : W ∈ L) : x.submodule ≤ W := by + obtain ⟨⟨A,B⟩,hAB,rfl⟩ := Finset.mem_image.mp hW + obtain ⟨hA,hB⟩ := Finset.mem_product.mp (hE hAB) + exact le_inf (hxF A hA) (hxF B hB) + have hplanes := rich_nondominant_plane_count x X L hL hxL M (by + intro W hW + obtain ⟨p,hp,rfl⟩ := Finset.mem_image.mp hW + exact hM p hp) (by + intro W hW l + obtain ⟨p,hp,rfl⟩ := Finset.mem_image.mp hW + exact hnd p hp l) + have hpairs := pair_count_by_intersection (d := 4) hdim F hF L 3 hL E hE (by + intro p hp + exact Finset.mem_image.mpr ⟨p,hp,rfl⟩) + have hQ : (∑ i ∈ Finset.range (4+1-3), Nat.card K^i) = Nat.card K+1 := by + norm_num [Finset.sum_range_succ, Nat.add_comm] + rw [hQ] at hpairs + calc + E.card*M^2 ≤ (L.card*(Nat.card K+1)^2)*M^2 := Nat.mul_le_mul_right _ hpairs + _ = (L.card*M^2)*(Nat.card K+1)^2 := by ring + _ ≤ (2*X.card^2)*(Nat.card K+1)^2 := Nat.mul_le_mul_right _ hplanes + +theorem nondominant_degree_count (hdim : finrank K V = 5) + (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 4) + (hxF : ∀ A ∈ F, x.submodule ≤ A) + (H : Submodule K V) (hH : finrank K H = 4) (hxH : x.submodule ≤ H) + (E : Finset (Submodule K V)) (hE : E ⊆ F) + (hne : ∀ A ∈ E, H ≠ A) (M : ℕ) + (hM : ∀ A ∈ E, M ≤ (pairPoints x X H A).card) + (hnd : ∀ A ∈ E, ∀ l : RadialLine x, + 2*((pairPoints x X H A).filter fun y => y.val.submodule ≤ l.val).card ≤ + (pairPoints x X H A).card) : + E.card*M^2 ≤ 2*(onPlane x X H).card^2*(Nat.card K+1) := by + let L := E.image fun A => H ⊓ A + have hL (W : Submodule K V) (hW : W ∈ L) : finrank K W = 3 := by + obtain ⟨A,hA,rfl⟩ := Finset.mem_image.mp hW + exact hyperplane_intersection_rank (d := 4) hdim H A hH (hF A (hE hA)) (hne A hA) + have hxL (W : Submodule K V) (hW : W ∈ L) : x.submodule ≤ W := by + obtain ⟨A,hA,rfl⟩ := Finset.mem_image.mp hW + exact le_inf hxH (hxF A (hE hA)) + have hpoints (A : Submodule K V) : + onPlane x (onPlane x X H) (H ⊓ A) = pairPoints x X H A := by + ext y + simp only [onPlane,pairPoints,Finset.mem_filter,le_inf_iff] + tauto + have hplanes := rich_nondominant_plane_count x (onPlane x X H) L hL hxL M (by + intro W hW + obtain ⟨A,hA,rfl⟩ := Finset.mem_image.mp hW + rw [hpoints] + exact hM A hA) (by + intro W hW l + obtain ⟨A,hA,rfl⟩ := Finset.mem_image.mp hW + rw [hpoints] + exact hnd A hA l) + have hpairs := neighbor_count_by_intersection (d := 4) hdim F hF L 3 hL H E hE (by + intro A hA + exact Finset.mem_image.mpr ⟨A,hA,rfl⟩) + have hQ : (∑ i ∈ Finset.range (4+1-3), Nat.card K^i) = Nat.card K+1 := by + norm_num [Finset.sum_range_succ, Nat.add_comm] + rw [hQ] at hpairs + calc + E.card*M^2 ≤ (L.card*(Nat.card K+1))*M^2 := Nat.mul_le_mul_right _ hpairs + _ = (L.card*M^2)*(Nat.card K+1) := by ring + _ ≤ (2*(onPlane x X H).card^2)*(Nat.card K+1) := Nat.mul_le_mul_right _ hplanes + +noncomputable def richRadials [Fintype (RadialLine x)] + (X : Finset {y : ℙ K V // x ≠ y}) (W : Submodule K V) (M : ℕ) := + (RadialLine.inFlat W).filter fun l => M ≤ (RadialLine.trainingOnLine X l).card + +theorem dominant_degree_count [Fintype (RadialLine x)] {d : ℕ} + (hdim : finrank K V = d+1) (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = d) + (H : Submodule K V) (hxH : x.submodule ≤ H) + (E : Finset (Submodule K V)) (hE : E ⊆ F) (M : ℕ) + (hdom : ∀ A ∈ E, ∃ l : RadialLine x, l.val ≤ H ⊓ A ∧ + M ≤ (RadialLine.trainingOnLine X l).card) : + E.card*M ≤ (onPlane x X H).card * (∑ i ∈ Finset.range (d-1), Nat.card K^i) := by + let R := richRadials x X H M + let L := R.image Subtype.val + have hcR : R.card*M ≤ (onPlane x X H).card := + rich_radial_count X H hxH R (Finset.filter_subset _ _) M (by + intro l hl + exact (Finset.mem_filter.mp hl).2) + have hcL : L.card = R.card := Finset.card_image_of_injective _ Subtype.val_injective + have hL (W : Submodule K V) (hW : W ∈ L) : finrank K W = 2 := by + obtain ⟨l,_,rfl⟩ := Finset.mem_image.mp hW + exact l.property.1 + have hN := neighbor_count_by_contained_witness hdim F hF L 2 hL E hE (by + intro A hA + obtain ⟨l,hl,hM⟩ := hdom A hA + refine ⟨l.val,Finset.mem_image.mpr ⟨l,?_,rfl⟩,hl.trans inf_le_right⟩ + refine Finset.mem_filter.mpr ⟨?_,hM⟩ + exact Finset.mem_filter.mpr ⟨Finset.mem_univ (α := RadialLine x) l, hl.trans inf_le_left⟩) + rw [hcL] at hN + have he : d+1-2 = d-1 := by omega + rw [he] at hN + calc + E.card*M ≤ (R.card*(∑ i ∈ Finset.range (d-1), Nat.card K^i))*M := Nat.mul_le_mul_right _ hN + _ = (R.card*M)*(∑ i ∈ Finset.range (d-1), Nat.card K^i) := by ring + _ ≤ _ := Nat.mul_le_mul_right _ hcR + +theorem dominant_pair_count [Fintype (RadialLine x)] {d : ℕ} + (hdim : finrank K V = d+1) (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = d) + (E : Finset (Submodule K V × Submodule K V)) (hE : E ⊆ F ×ˢ F) (M : ℕ) + (hdom : ∀ p ∈ E, ∃ l : RadialLine x, l.val ≤ p.1 ⊓ p.2 ∧ + M ≤ (RadialLine.trainingOnLine X l).card) : + E.card ≤ (richRadials x X ⊤ M).card * (∑ i ∈ Finset.range (d-1), Nat.card K^i)^2 := by + let R := richRadials x X ⊤ M + let L := R.image Subtype.val + have hcL : L.card = R.card := Finset.card_image_of_injective _ Subtype.val_injective + have hL (W : Submodule K V) (hW : W ∈ L) : finrank K W = 2 := by + obtain ⟨l,_,rfl⟩ := Finset.mem_image.mp hW + exact l.property.1 + have hN := pair_count_by_contained_witness hdim F hF L 2 hL E hE (by + intro p hp + obtain ⟨l,hl,hM⟩ := hdom p hp + refine ⟨l.val,Finset.mem_image.mpr ⟨l,?_,rfl⟩,hl⟩ + refine Finset.mem_filter.mpr ⟨?_,hM⟩ + exact Finset.mem_filter.mpr ⟨Finset.mem_univ (α := RadialLine x) l, le_top⟩) + rw [hcL] at hN + have he : d+1-2 = d-1 := by omega + simpa only [he] using hN + +omit [Finite K] in + +theorem intersection_radial_three (hdim : finrank K V = 4) + (A B : Submodule K V) (hA : finrank K A = 3) (hB : finrank K B = 3) + (hxA : x.submodule ≤ A) (hxB : x.submodule ≤ B) (hne : A ≠ B) + (X : Finset {y : ℙ K V // x ≠ y}) : + ∃ l : RadialLine x, l.val = A ⊓ B ∧ + RadialLine.trainingOnLine X l = pairPoints x X A B := by + let l : RadialLine x := ⟨A ⊓ B, + hyperplane_intersection_rank (d := 3) hdim A B hA hB hne, le_inf hxA hxB⟩ + exact ⟨l,rfl,rfl⟩ + +omit [Finite K] in + +theorem overlap_dichotomy (X : Finset {y : ℙ K V // x ≠ y}) + (A B : Submodule K V) (hxA : x.submodule ≤ A) (hxB : x.submodule ≤ B) + (M : ℕ) (hM : 2*M ≤ (pairPoints x X A B).card) : + (∀ l : RadialLine x, + 2*((pairPoints x X A B).filter fun y => y.val.submodule ≤ l.val).card ≤ + (pairPoints x X A B).card) ∨ + (∃ l : RadialLine x, l.val ≤ A ⊓ B ∧ + M ≤ (RadialLine.trainingOnLine X l).card) := by + classical + by_cases h : ∀ l : RadialLine x, + 2*((pairPoints x X A B).filter fun y => y.val.submodule ≤ l.val).card ≤ + (pairPoints x X A B).card + · exact Or.inl h + · right + push Not at h + obtain ⟨l,hl⟩ := h + have hp : 0 < ((pairPoints x X A B).filter fun y => y.val.submodule ≤ l.val).card := by omega + obtain ⟨y,hy⟩ := Finset.card_pos.mp hp + obtain ⟨hyP,hyl⟩ := Finset.mem_filter.mp hy + have hyAB : y.val.submodule ≤ A ⊓ B := (Finset.mem_filter.mp hyP).2 + have he : RadialLine.through x y.val y.property = l := + (RadialLine.through_eq_iff y.property l).mpr hyl + refine ⟨l,?_,?_⟩ + · rw [← he] + exact (RadialLine.through_le_iff _ _).mpr ⟨le_inf hxA hxB,hyAB⟩ + · have hs : ((pairPoints x X A B).filter fun y => y.val.submodule ≤ l.val) ⊆ + RadialLine.trainingOnLine X l := by + intro z hz + obtain ⟨hzP,hzl⟩ := Finset.mem_filter.mp hz + exact Finset.mem_filter.mpr ⟨(Finset.mem_filter.mp hzP).1,hzl⟩ + have hc := Finset.card_le_card hs + omega + +theorem pair_count_three [Fintype (RadialLine x)] (hdim : finrank K V = 4) + (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 3) + (hxF : ∀ A ∈ F, x.submodule ≤ A) + (E : Finset (Submodule K V × Submodule K V)) (hE : E ⊆ F ×ˢ F) + (hne : ∀ p ∈ E, p.1 ≠ p.2) (M : ℕ) + (hM : ∀ p ∈ E, M ≤ (pairPoints x X p.1 p.2).card) : + E.card ≤ (richRadials x X ⊤ M).card * (Nat.card K+1)^2 := by + have h := dominant_pair_count x (d := 3) hdim X F hF E hE M (by + intro p hp + obtain ⟨hA,hB⟩ := Finset.mem_product.mp (hE hp) + obtain ⟨l,hl,he⟩ := intersection_radial_three x hdim p.1 p.2 + (hF _ hA) (hF _ hB) (hxF _ hA) (hxF _ hB) (hne p hp) X + exact ⟨l,hl.le,he ▸ hM p hp⟩) + simpa [Finset.sum_range_succ, Nat.add_comm] using h + +theorem degree_count_three [Fintype (RadialLine x)] (hdim : finrank K V = 4) + (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 3) + (hxF : ∀ A ∈ F, x.submodule ≤ A) + (H : Submodule K V) (hH : finrank K H = 3) (hxH : x.submodule ≤ H) + (E : Finset (Submodule K V)) (hE : E ⊆ F) + (hne : ∀ A ∈ E, H ≠ A) (M : ℕ) + (hM : ∀ A ∈ E, M ≤ (pairPoints x X H A).card) : + E.card*M ≤ (onPlane x X H).card * (Nat.card K+1) := by + have h := dominant_degree_count x (d := 3) hdim X F hF H hxH E hE M (by + intro A hA + obtain ⟨l,hl,he⟩ := intersection_radial_three x hdim H A hH (hF _ (hE hA)) + hxH (hxF _ (hE hA)) (hne A hA) X + exact ⟨l,hl.le,he ▸ hM A hA⟩) + simpa [Finset.sum_range_succ, Nat.add_comm] using h + +noncomputable def overlapPairs (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (M : ℕ) := + (F ×ˢ F).filter fun p => p.1 ≠ p.2 ∧ M ≤ (pairPoints x X p.1 p.2).card + +noncomputable def overlapNeighbors (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (H : Submodule K V) (M : ℕ) := + F.filter fun A => H ≠ A ∧ M ≤ (pairPoints x X H A).card + +theorem actual_pair_count_four [Fintype (RadialLine x)] (hdim : finrank K V = 5) + (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 4) + (hxF : ∀ A ∈ F, x.submodule ≤ A) (M : ℕ) : + (overlapPairs x X F (2*M)).card * M^2 ≤ + (richRadials x X ⊤ M).card * (Nat.card K^2+Nat.card K+1)^2 * M^2 + + 2*X.card^2*(Nat.card K+1)^2 := by + classical + let E := overlapPairs x X F (2*M) + let nd (p : Submodule K V × Submodule K V) := ∀ l : RadialLine x, + 2*((pairPoints x X p.1 p.2).filter fun y => y.val.submodule ≤ l.val).card ≤ + (pairPoints x X p.1 p.2).card + let N := E.filter nd + let D := E.filter (fun p => ¬nd p) + have hE : E ⊆ F ×ˢ F := Finset.filter_subset _ _ + have hne (p) (hp : p ∈ E) : p.1 ≠ p.2 := (Finset.mem_filter.mp hp).2.1 + have hM (p) (hp : p ∈ E) : 2*M ≤ (pairPoints x X p.1 p.2).card := + (Finset.mem_filter.mp hp).2.2 + have hN := nondominant_pair_count x hdim X F hF hxF N + ((Finset.filter_subset _ _).trans hE) (fun p hp => hne p (Finset.mem_filter.mp hp).1) + M (fun p hp => (by omega : M ≤ 2*M).trans (hM p (Finset.mem_filter.mp hp).1)) + (fun p hp => (Finset.mem_filter.mp hp).2) + have hD := dominant_pair_count x (d := 4) hdim X F hF D + ((Finset.filter_subset _ _).trans hE) M (by + intro p hp + obtain ⟨hp,hn⟩ := Finset.mem_filter.mp hp + obtain ⟨ha,hb⟩ := Finset.mem_product.mp (hE hp) + exact (overlap_dichotomy x X p.1 p.2 (hxF _ ha) (hxF _ hb) M (hM p hp)).resolve_left hn) + have hQ : (∑ i ∈ Finset.range (4-1), Nat.card K^i) = Nat.card K^2+Nat.card K+1 := by + norm_num [Finset.sum_range_succ]; ring + rw [hQ] at hD + have he : N.card + D.card = E.card := Finset.card_filter_add_card_filter_not nd + calc + E.card*M^2 = D.card*M^2+N.card*M^2 := by rw [← he]; ring + _ ≤ _ := Nat.add_le_add (Nat.mul_le_mul_right _ hD) hN + +theorem actual_degree_count_four [Fintype (RadialLine x)] (hdim : finrank K V = 5) + (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 4) + (hxF : ∀ A ∈ F, x.submodule ≤ A) + (H : Submodule K V) (hH : finrank K H = 4) (hxH : x.submodule ≤ H) (M : ℕ) : + (overlapNeighbors x X F H (2*M)).card * M^2 ≤ + (onPlane x X H).card * (Nat.card K^2+Nat.card K+1) * M + + 2*(onPlane x X H).card^2*(Nat.card K+1) := by + classical + let E := overlapNeighbors x X F H (2*M) + let nd (A : Submodule K V) := ∀ l : RadialLine x, + 2*((pairPoints x X H A).filter fun y => y.val.submodule ≤ l.val).card ≤ + (pairPoints x X H A).card + let N := E.filter nd + let D := E.filter (fun A => ¬nd A) + have hE : E ⊆ F := Finset.filter_subset _ _ + have hne (A) (hA : A ∈ E) : H ≠ A := (Finset.mem_filter.mp hA).2.1 + have hM (A) (hA : A ∈ E) : 2*M ≤ (pairPoints x X H A).card := + (Finset.mem_filter.mp hA).2.2 + have hN := nondominant_degree_count x hdim X F hF hxF H hH hxH N + ((Finset.filter_subset _ _).trans hE) (fun A hA => hne A (Finset.mem_filter.mp hA).1) + M (fun A hA => (by omega : M ≤ 2*M).trans (hM A (Finset.mem_filter.mp hA).1)) + (fun A hA => (Finset.mem_filter.mp hA).2) + have hD := dominant_degree_count x (d := 4) hdim X F hF H hxH D + ((Finset.filter_subset _ _).trans hE) M (by + intro A hA + obtain ⟨hA,hn⟩ := Finset.mem_filter.mp hA + exact (overlap_dichotomy x X H A hxH (hxF _ (hE hA)) M (hM A hA)).resolve_left hn) + have hQ : (∑ i ∈ Finset.range (4-1), Nat.card K^i) = Nat.card K^2+Nat.card K+1 := by + norm_num [Finset.sum_range_succ]; ring + rw [hQ] at hD + have he : N.card + D.card = E.card := Finset.card_filter_add_card_filter_not nd + calc + E.card*M^2 = (D.card*M)*M+N.card*M^2 := by rw [← he]; ring + _ ≤ _ := Nat.add_le_add (Nat.mul_le_mul_right _ hD) hN + +end SharpRamseyFive.ActualOverlap + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/PeelMessage.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/PeelMessage.lean new file mode 100644 index 0000000000000000000000000000000000000000..d844b648c02e044751debbba868542024fc25a78 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/PeelMessage.lean @@ -0,0 +1,75 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Probability.MeasurePreservingSplitSchedule +import OAI.Combinatorics.RamseyFive.Decoding.MetadataCodec +import OAI.Combinatorics.RamseyFive.Geometry.PeelingGeometry + +namespace OAI + +namespace SharpRamseyFive.Metadata +open Module GreedyTraining ProjectiveTraining MeasurePublicTable +open scoped Classical LinearAlgebra.Projectivization +variable {K V J : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] [Fintype V] [Fintype (ℙ K V)] [LinearOrder J] + +theorem one_peel_message (σ g P : ℝ) (hP : 0 ≤ P) (hd : finrank K V ≤ 5) + (hσ : 100000 ≤ σ) (hq : Real.exp σ=Nat.card K) + (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K V) + (X : Finset (ℙ K V)) (hX : (X.card:ℝ)=Real.exp (3*σ/2+g)) : + let t := (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5) + let ht : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let p := peelLength (P/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let raw := publicOwn (greedyList F hF (fun j=>flatPoints (Flat j)) X p) + Real.log (Nat.card (TrainingCode V (listCap σ) (productCap σ) (Nat.card V))) ≤ Nat.card K ∧ + ∃c : TrainingCode V (listCap σ) (productCap σ) (Nat.card V), + (∀x,messageOwn c x=raw x) ∧ + (∀L x,messageBase c L x=Real.exp (-L*(1-((S∩raw x).card:ℝ)/S.card))) := by + dsimp only + let t := (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5) + have ht : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let p := peelLength (P/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + have hpc : p ≤ listCap σ := by + by_cases hg : 0 ≤ g + · have hlen : (p:ℝ)*Real.exp (σ+17*g/15) ≤ Real.exp (3*σ/2+g) := by + rw [←hX,←ScoreScalars.plane_threshold_exp (σ:=σ) (g:=g) rfl rfl] + exact peel_length_real _ F hF _ X t ht + have he : (p:ℝ) ≤ Real.exp (σ/2-2*g/15) := by + have hh := (le_div_iff₀ (Real.exp_pos (σ+17*g/15))).mpr hlen + rw [←Real.exp_sub] at hh + convert hh using 1 + congr 1 + ring + have hp : (p:ℝ) ≤ 4*Real.exp (σ/2) := by + have hh := he.trans (Real.exp_le_exp.mpr (by linarith : σ/2-2*g/15 ≤ σ/2)) + linarith only [hh,Real.exp_pos (σ/2)] + exact_mod_cast hp.trans (Nat.le_ceil (4*Real.exp (σ/2))) + · have he : ¬P/10000Fin.elim0 i + let Ps : Fin p→Submodule K V := fun i=>Flat (chosen F hF (fun j=>flatPoints (Flat j)) X i) + have hPs : (fun i=>flatPoints (Ps i))=greedyList F hF (fun j=>flatPoints (Flat j)) X p := by rfl + have hH : ∀x,publicOwn (fun i=>flatPoints (H i)) x=∅ := by + intro x + simp only [publicOwn,firstIndex,Finset.univ_eq_empty,Finset.filter_empty, + Finset.not_nonempty_empty,↓reduceDIte] + let c := encodeTraining σ hd (Nat.zero_le _) hpc (by simp) H Ps S + refine ⟨?_,c,?_,?_⟩ + · rw [←hq];exact log_card_training_le σ hσ (vector_card_le_exp σ hq hd) + · intro x + have hc := decodeOwn_encode hd H Ps S (projective_card_le_vectors S) x + change decodeOwn (encodeLists hd H Ps S (projective_card_le_vectors S)) x=_ + rw [hc] + simp only [twoPublicOwn,hH,Finset.empty_union,hPs] + rfl + · intro L x + have hc := decodeBaseScore_encode hd H Ps S (projective_card_le_vectors S) L x + change decodeBaseScore (encodeLists hd H Ps S (projective_card_le_vectors S)) L x=_ + rw [hc] + simp only [twoPublicOwn,hH,Finset.empty_union,hPs] + rfl + +end SharpRamseyFive.Metadata + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/ProducedCapExclusion.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/ProducedCapExclusion.lean new file mode 100644 index 0000000000000000000000000000000000000000..042aae7c9aadd67ce243a61ac29b13a43bd81f59 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/ProducedCapExclusion.lean @@ -0,0 +1,63 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Probability.PublicCapLaw +import OAI.Combinatorics.RamseyFive.Entropy.FreshProcess + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {α β : Type*} [Fintype α] [Fintype β] +lemma eventMass_map_filter (p : Law α) (f : α→β) (P : β→Prop) : + eventMass (map p f) (Finset.univ.filter P)= + eventMass p (Finset.univ.filter fun a=>P (f a)) := by + simpa only [eventMass,Finset.sum_filter,mul_ite,mul_one,mul_zero] using + sum_map p f (fun b=>if P b then (1:ℝ) else 0) +end SharpRamseyFive.FiniteEntropy +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical BigOperators +variable {A B : Type*} [Fintype A] [Fintype B] + +def Excludes (a : A) : Option (Finset A)→Prop + | none => False + | some Y => a∉Y + +lemma publicCapLaw_exclusion (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hW : W.Nonempty) (n : ℕ) (q M : ℝ) (a : A) (ha : a∈U) : + eventMass (publicCapLaw R S U C W hW n q M) (Finset.univ.filter (Excludes a))= + freshRejection (fun b a=>R a b) q W hW n (uniformCutoff q C W n) + (validationRows R S U C n q M) a := by + unfold publicCapLaw freshRejection + rw [eventMass_map_filter] + apply congrArg (eventMass _) + apply Finset.ext + intro row + rw [Finset.mem_filter] + simp only [Finset.mem_univ,true_and,Finset.mem_image] + cases row with + | none => simp only [Option.map_none,Excludes,Option.some_ne_none,and_false,exists_false] + | some row => + simp only [Option.map_some,Excludes,Finset.mem_filter,cap,ha,true_and,not_lt, + Option.some.injEq,exists_eq_right,Finset.mem_univ,true_and] + change hits (neighbors R a) row ≥ (n:ℝ)/(5*q) ↔ _ + rw [show (n:ℝ)/(5*q)=(1/(5*q))*n by ring] + rfl + +theorem publicCapLaw_domination (R : A→B→Prop) (S U : Finset A) + (C X W : Finset B) (hC : C.Nonempty) (hW : W.Nonempty) + (hCW : C⊆W) (hCX : C⊆X) (n : ℕ) (hn : 0(Finset.mem_filter.mp hr).2.1) hE + have he : (Finset.univ.filter (R a))∩X=X.filter (R a) := by ext b;simp [and_comm] + simpa only [freshRejection,he] using h + +end SharpRamseyFive.ReverseCap + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/PublicTraining.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/PublicTraining.lean new file mode 100644 index 0000000000000000000000000000000000000000..e1033fee12e7e6c47b0cc974046055288ba58fc6 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/PublicTraining.lean @@ -0,0 +1,152 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.Training +import OAI.Combinatorics.RamseyFive.Probability.MeasurePublicTable + +namespace OAI + +namespace SharpRamseyFive.GreedyTraining + +section +open MeasurePublicTable +open scoped BigOperators Classical +variable {A I : Type*} [DecidableEq A] [LinearOrder I] + +noncomputable def publicRegion {J : ℕ} (L : Fin J→Finset A) (i : Fin J) : Finset A := + (L i).filter fun x=>∀ j : Fin J, j < i → x ∉ L j + +noncomputable def publicOwn {J : ℕ} (L : Fin J→Finset A) (x : A) : Finset A := + match firstIndex {B | x∈B} L with + | none => ∅ + | some i => publicRegion L i + +noncomputable def greedyList (F : Finset I) (hF : F.Nonempty) (shape : I→Finset A) + (X : Finset A) (J : ℕ) : Fin J→Finset A := fun i=>shape (chosen F hF shape X i) + +lemma firstIndex_greedyList (F : Finset I) (hF : F.Nonempty) (shape : I→Finset A) + (X : Finset A) (J : ℕ) (x : A) : + firstIndex {B | x∈B} (greedyList F hF shape X J)=queryPart F hF shape X J x := by + cases he : firstIndex {B | x∈B} (greedyList F hF shape X J) with + | none => + have hh := (firstIndex_none_iff _ _).mp he + unfold queryPart + have hn : ¬firstAt F hF shape X J x + have hm := firstIndex_some_mem _ _ he + have hmin := firstIndex_minimal _ _ he + have hf : firstAt F hF shape X J x=i.val := by + apply firstAt_eq F hF shape X J i.val x i.prop hm + intro j hj + exact hmin ⟨j,hj.trans i.prop⟩ hj + unfold queryPart + simp only [hf,dite_eq_left i.prop] + +lemma region_cell (F : Finset I) (hF : F.Nonempty) (shape : I→Finset A) + (X : Finset A) (J : ℕ) (i : Fin J) : + X∩publicRegion (greedyList F hF shape X J) i=cell F hF shape X i := by + ext x + rw [cell_earliest] + rw [Finset.mem_inter] + change (x∈X ∧ x∈(shape (chosen F hF shape X i)).filter (fun x => ∀ j : Fin J, j < i → x∉shape (chosen F hF shape X j))) ↔ _ + rw [Finset.mem_filter] + constructor + · rintro ⟨hx,hm,he⟩ + refine ⟨hx,hm,fun j hj=>he ⟨j,hj.trans i.prop⟩ hj⟩ + · rintro ⟨hx,hm,he⟩ + exact ⟨hx,hm,fun j hj=>he j.val hj⟩ + +lemma clipped_publicOwn (S : Finset A) (F : Finset I) (hF : F.Nonempty) + (shape : I→Finset A) (X : Finset A) (hSX : S⊆X) (J : ℕ) (x : A) : + S∩publicOwn (greedyList F hF shape X J) x= + clippedPart S F hF shape X J (queryPart F hF shape X J x) := by + unfold publicOwn + rw [firstIndex_greedyList] + cases he : queryPart F hF shape X J x with + | none => simp [clippedPart] + | some i => + change S∩publicRegion (greedyList F hF shape X J) i=S∩cell F hF shape X i + rw [←region_cell F hF shape X J i,←Finset.inter_assoc,Finset.inter_eq_left.mpr hSX] + +lemma ownCell_subset_publicOwn (F : Finset I) (hF : F.Nonempty) + (shape : I→Finset A) (X : Finset A) (J : ℕ) (x : A) : + ownCell F hF shape X J x⊆publicOwn (greedyList F hF shape X J) x := by + have hh := clipped_publicOwn X F hF shape X (Finset.Subset.refl _) J x + rw [clippedPart_query] at hh + have hc : ownCell F hF shape X J x⊆X := by + unfold ownCell + split_ifs + · exact (cell_subset F hF shape X _).trans (remaining_subset F hF shape X _) + · exact Finset.empty_subset _ + rw [Finset.inter_eq_right.mpr hc] at hh + exact hh▸Finset.inter_subset_right + +end + +open TrainingCells +open scoped Classical BigOperators +variable {A I J : Type*} [DecidableEq A] [LinearOrder I] [LinearOrder J] + +noncomputable def twoPublicOwn {h p : ℕ} (LH : Fin h→Finset A) (LP : Fin p→Finset A) + (x : A) : Finset A := publicOwn LH x∪publicOwn LP x + +theorem literal_cell_data (S X Y : Finset A) (hSX : S⊆X) (hSY : S⊆Y) + (H : Finset I) (hH : H.Nonempty) (hyper : I→Finset A) (h : ℕ) + (P : Finset J) (hP : P.Nonempty) (plane : J→Finset A) (p : ℕ) : + let CH := clippedPart S H hH hyper X h + let CP := clippedPart S P hP plane Y p + let C := family CH CP + let ih := fun x => queryPart H hH hyper X h x + let ip := fun x => queryPart P hP plane Y p x + let raw := twoPublicOwn (greedyList H hH hyper X h) (greedyList P hP plane Y p) + (∀i,C i⊆S) ∧ (∑i,(C i).card)≤3*S.card ∧ + (∀x,S∩raw x=C (.inl (ih x))∪C (.inr (.inl (ip x)))) ∧ + (∀x,C (.inr (.inr (ih x,ip x)))=C (.inl (ih x))∩C (.inr (.inl (ip x)))) ∧ + (∀x,ownCell H hH hyper X h x⊆raw x) ∧ + (∀x,ownCell P hP plane Y p x⊆raw x) := by + dsimp only + refine ⟨family_subsets S _ _ (clippedPart_subset S H hH hyper X h) + (clippedPart_subset S P hP plane Y p), + family_mass S _ _ (clippedPart_subset S H hH hyper X h) + (clippedPart_subset S P hP plane Y p) (clippedPart_disjoint S H hH hyper X h) + (clippedPart_disjoint S P hP plane Y p),?_,?_,?_,?_⟩ + · intro x + change S∩(publicOwn (greedyList H hH hyper X h) x∪publicOwn (greedyList P hP plane Y p) x)=_ + rw [Finset.inter_union_distrib_left,clipped_publicOwn S H hH hyper X hSX, + clipped_publicOwn S P hP plane Y hSY] + rfl + · intro x; rfl + · intro x + exact (ownCell_subset_publicOwn H hH hyper X h x).trans Finset.subset_union_left + · intro x + exact (ownCell_subset_publicOwn P hP plane Y p x).trans Finset.subset_union_right + +lemma public_own_count (S X Y : Finset A) (hSX : S⊆X) (hSY : S⊆Y) + (H : Finset I) (hH : H.Nonempty) (hyper : I→Finset A) (h : ℕ) + (P : Finset J) (hP : P.Nonempty) (plane : J→Finset A) (p : ℕ) (x : A) : + let CH := clippedPart S H hH hyper X h + let CP := clippedPart S P hP plane Y p + let ih := queryPart H hH hyper X h x + let ip := queryPart P hP plane Y p x + (S∩twoPublicOwn (greedyList H hH hyper X h) (greedyList P hP plane Y p) x).card= + (CH ih).card+(CP ip).card-(CH ih∩CP ip).card := by + dsimp only + have he := (literal_cell_data S X Y hSX hSY H hH hyper h P hP plane p).2.2.1 x + rw [he,Finset.card_union] + rfl + +lemma literal_small_own (S X Y : Finset A) (hS : S.Nonempty) + (hSX : S⊆X) (hSY : S⊆Y) + (H : Finset I) (hH : H.Nonempty) (hyper : I→Finset A) (h : ℕ) + (P : Finset J) (hP : P.Nonempty) (plane : J→Finset A) (p : ℕ) + (hsH : ∀i,((clippedPart S H hH hyper X h i).card:ℝ)≤(S.card:ℝ)/25) + (hsP : ∀i,((clippedPart S P hP plane Y p i).card:ℝ)≤(S.card:ℝ)/25) (x : A) : + ((S∩twoPublicOwn (greedyList H hH hyper X h) (greedyList P hP plane Y p) x).card:ℝ)/S.card≤2/25 := by + have he := (literal_cell_data S X Y hSX hSY H hH hyper h P hP plane p).2.2.1 x + rw [he] + exact small_union S _ _ hS (hsH _) (hsP _) + +end SharpRamseyFive.GreedyTraining + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/ReverseCap.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/ReverseCap.lean new file mode 100644 index 0000000000000000000000000000000000000000..ca1018d1e708f1958f6a2855fecf421715dc0935 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/ReverseCap.lean @@ -0,0 +1,217 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.IIDLowerTail + +namespace OAI + +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical BigOperators +variable {A B : Type*} [Fintype B] + +noncomputable def neighbors (R : A→B→Prop) (a : A) : Finset B := + Finset.univ.filter (R a) + +noncomputable def cap (R : A→B→Prop) (U : Finset A) {n : ℕ} (q : ℝ) (row : Fin n→B) : Finset A := + U.filter fun a=>hits (neighbors R a) row < (n:ℝ)/(5*q) + +lemma expected_filter_card {X : Type*} [Fintype X] (p : Law X) + (U : Finset A) (F : A→X→Prop) : + (∑x,p x*((U.filter fun a=>F a x).card:ℝ))= + ∑a∈U,eventMass p (Finset.univ.filter (F a)) := by + simp only [←Finset.sum_boole,Finset.mul_sum,eventMass,Finset.sum_filter] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro a ha + apply Finset.sum_congr rfl + intro x hx + split_ifs <;> simp + +lemma uniform_neighbor_mass (R : A→B→Prop) (C : Finset B) (hC : C.Nonempty) (a : A) : + eventMass (uniformOn C hC) (neighbors R a)=((C.filter (R a)).card:ℝ)/C.card := by + rw [uniformOn_mass] + have he : neighbors R a∩C=C.filter (R a) := by + ext b + simp [neighbors,and_comm] + rw [he] + +theorem expected_cap_card (R : A→B→Prop) (U Bad : Finset A) + (C : Finset B) (hC : C.Nonempty) (n : ℕ) (q : ℝ) (hq : 0 < q) + (hgood : ∀a∈U,a∉Bad → 1/(2*q) ≤ ((C.filter (R a)).card:ℝ)/C.card) : + (∑row,iid (uniformOn C hC) (Fin n) row*((cap R U q row).card:ℝ)) ≤ + (Bad.card:ℝ)+(U.card:ℝ)*Real.exp (-(n:ℝ)/(20*q)) := by + simp only [cap] + rw [expected_filter_card] + let z := Real.exp (-(n:ℝ)/(20*q)) + have hz : 0 ≤ z := (Real.exp_pos _).le + calc + _ ≤ ∑a∈U,((if a∈Bad then (1:ℝ) else 0)+z) := by + apply Finset.sum_le_sum + intro a ha + by_cases hb : a∈Bad + · simp only [hb,ite_true] + exact (eventMass_le_one _ _).trans (by linarith) + · simp only [hb,ite_false,zero_add] + apply iid_cap_tail _ _ n q hq + rw [uniform_neighbor_mass] + exact hgood a ha hb + _ = ((U.filter fun a=>a∈Bad).card:ℝ)+U.card*z := by + rw [Finset.sum_add_distrib,Finset.sum_boole] + simp + _ ≤ _ := by + have hh : (U.filter fun a=>a∈Bad).card ≤ Bad.card := + Finset.card_le_card (by intro a ha;exact (Finset.mem_filter.mp ha).2) + have hh' : ((U.filter fun a=>a∈Bad).card:ℝ) ≤ Bad.card := by exact_mod_cast hh + exact add_le_add hh' le_rfl + +lemma sum_hits (R : A→B→Prop) (S : Finset A) {n : ℕ} (row : Fin n→B) : + (∑a∈S,hits (neighbors R a) row)=∑i,((S.filter fun a=>R a (row i)).card:ℝ) := by + simp only [hits,neighbors,Finset.mem_filter,Finset.mem_univ,true_and] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro i hi + exact Finset.sum_boole _ _ + +theorem deterministic_capture (R : A→B→Prop) (S U : Finset A) (hSU : S⊆U) + (C : Finset B) {n : ℕ} (hn : 0 < n) (q κ : ℝ) (hq : 0 < q) + (hC : ∀b∈C,((S.filter fun a=>R a b).card:ℝ) ≤ κ*S.card) + (row : Fin n→B) (hrow : ∀i,row i∈C) : + (1-5*q*κ)*(S.card:ℝ) ≤ (S∩cap R U q row).card := by + let t := (n:ℝ)/(5*q) + let W := S.filter fun a=>hits (neighbors R a) row < t + let D := S.filter fun a=>¬hits (neighbors R a) row < t + have ht : 0 < t := by dsimp [t];positivity + have hpartition : W.card+D.card=S.card := Finset.card_filter_add_card_filter_not _ + have hsum : (∑a∈S,hits (neighbors R a) row) ≤ (n:ℝ)*κ*S.card := by + rw [sum_hits] + calc + _ ≤ ∑i:Fin n,κ*S.card := Finset.sum_le_sum fun i _=>hC _ (hrow i) + _ = _ := by simp; ring + have hD : t*(D.card:ℝ) ≤ (n:ℝ)*κ*S.card := by + calc + _ = ∑a∈D,t := by simp [mul_comm] + _ ≤ ∑a∈D,hits (neighbors R a) row := + Finset.sum_le_sum fun a ha=>le_of_not_gt (Finset.mem_filter.mp ha).2 + _ ≤ ∑a∈S,hits (neighbors R a) row := + Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) + (fun a _ _=>Finset.sum_nonneg fun i _=>by split_ifs <;> norm_num) + _ ≤ _ := hsum + have hn' : (0:ℝ) < n := by exact_mod_cast hn + have hd : (D.card:ℝ) ≤ 5*q*κ*S.card := by + apply (mul_le_mul_iff_of_pos_left ht).mp + calc + _ ≤ (n:ℝ)*κ*S.card := hD + _ = t*(5*q*κ*S.card) := by dsimp [t];field_simp + have hpart : (W.card:ℝ)+(D.card:ℝ)=S.card := by exact_mod_cast hpartition + have he : S∩cap R U q row=W := by + ext a + simp only [Finset.mem_inter,cap,Finset.mem_filter,W] + constructor + · rintro ⟨ha,_,hw⟩;exact ⟨ha,hw⟩ + · rintro ⟨ha,hw⟩;exact ⟨ha,hSU ha,hw⟩ + rw [he] + nlinarith + +end SharpRamseyFive.ReverseCap + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {A : Type*} [Fintype A] + +lemma eventMass_filter_partition (p : Law A) (P : A→Prop) : + eventMass p (Finset.univ.filter P)+ + eventMass p (Finset.univ.filter fun a=>¬P a)=1 := by + simp only [eventMass,Finset.sum_filter,←Finset.sum_add_distrib] + convert p.sum_one using 1 + apply Finset.sum_congr rfl + intro a _ + split_ifs <;> simp + +lemma uniform_row_source (C : Finset A) (hC : C.Nonempty) {n : ℕ} + (P : (Fin n→A)→Prop) : + eventMass (iid (uniformOn C hC) (Fin n)) + (Finset.univ.filter fun row=>(∀i,row i∈C)∧P row)= + eventMass (iid (uniformOn C hC) (Fin n)) (Finset.univ.filter P) := by + simp only [eventMass,Finset.sum_filter] + apply Finset.sum_congr rfl + intro row _ + by_cases hs : ∀i,row i∈C + · simp [hs] + · rw [iid_uniformOn] + simp [hs] + +lemma markov_success (p : Law A) (w : A→ℝ) (hw : ∀a,0 ≤ w a) + (M : ℝ) (hM : 0 < M) (hmean : ∑a,p a*w a ≤ M/10) : + (9:ℝ)/10 ≤ eventMass p (Finset.univ.filter fun a=>w a ≤ M) := by + have hbad := event_markov p w hw M (Finset.univ.filter fun a=>¬w a ≤ M) + (fun a ha=>(lt_of_not_ge (Finset.mem_filter.mp ha).2).le) + have hp := eventMass_filter_partition p (fun a=>w a ≤ M) + have hh : eventMass p (Finset.univ.filter fun a=>¬w a ≤ M) ≤ 1/10 := by + apply (mul_le_mul_iff_of_pos_left hM).mp + exact hbad.trans (by simpa [div_eq_mul_inv] using hmean) + linarith + +omit [Fintype A] in +lemma firstAccepted_mem {n : ℕ} (E : Finset A) (t : Fin n→A) {a : A} + (ha : firstAccepted E t=some a) : a∈E := by + induction n with + | zero => simp [firstAccepted] at ha + | succ n ih => + rw [firstAccepted] at ha + split_ifs at ha with h + · cases Option.some.inj ha + exact h + · exact ih _ ha + +lemma finite_table_failure (p : Law A) (E : Finset A) (N : ℕ) : + map (iid p (Fin N)) (firstAccepted E (n := N)) none ≤ + Real.exp (-eventMass p E*N) := by + rw [first_law_none] + have hh : 1-eventMass p E ≤ Real.exp (-eventMass p E) := by + linarith [Real.add_one_le_exp (-eventMass p E)] + calc + _ ≤ (Real.exp (-eventMass p E))^N := + pow_le_pow_left₀ (sub_nonneg.mpr (eventMass_le_one p E)) hh N + _ = _ := by rw [←Real.exp_nat_mul]; congr 1;ring + +theorem uniform_table_failure (C W : Finset A) (hC : C.Nonempty) (hW : W.Nonempty) + (hCW : C⊆W) (n N : ℕ) (E : Finset (Fin n→A)) + (hsource : ∀row∈E,∀i,row i∈C) + (hE : (9:ℝ)/10 ≤ eventMass (iid (uniformOn C hC) (Fin n)) E) + (q : ℝ) (hN : q ≤ (9:ℝ)/10*((C.card:ℝ)/W.card)^n*N) : + map (iid (iid (uniformOn W hW) (Fin n)) (Fin N)) + (firstAccepted E (n := N)) none ≤ Real.exp (-q) := by + have he := eventMass_scaling (iid (uniformOn W hW) (Fin n)) + (iid (uniformOn C hC) (Fin n)) E (((C.card:ℝ)/W.card)^n) + (fun row hr=>uniformOn_row_scaling C W hC hW hCW row (hsource row hr)) + have hm : (9:ℝ)/10*((C.card:ℝ)/W.card)^n ≤ + eventMass (iid (uniformOn W hW) (Fin n)) E := by + rw [he] + have hh := mul_le_mul_of_nonneg_left hE + (by positivity : (0:ℝ) ≤ ((C.card:ℝ)/W.card)^n) + simpa [mul_comm] using hh + apply (finite_table_failure _ E N).trans + apply Real.exp_le_exp.mpr + have hh := mul_le_mul_of_nonneg_right hm (Nat.cast_nonneg N) + linarith + +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical BigOperators +variable {A B : Type*} [Fintype B] + +noncomputable def successfulRows (R : A→B→Prop) (U : Finset A) + (C : Finset B) (n : ℕ) (q M : ℝ) : Finset (Fin n→B) := + Finset.univ.filter fun row=>(∀i,row i∈C) ∧ ((cap R U q row).card:ℝ) ≤ M + +lemma successfulRows_mass (R : A→B→Prop) (U : Finset A) (C : Finset B) + (hC : C.Nonempty) (n : ℕ) (q M : ℝ) (hM : 0 < M) + (hmean : ∑row,iid (uniformOn C hC) (Fin n) row*((cap R U q row).card:ℝ) ≤ M/10) : + (9:ℝ)/10 ≤ eventMass (iid (uniformOn C hC) (Fin n)) (successfulRows R U C n q M) := by + rw [successfulRows,uniform_row_source] + exact markov_success _ _ (fun _=>Nat.cast_nonneg _) M hM hmean + +end SharpRamseyFive.ReverseCap + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/ReverseParameters.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/ReverseParameters.lean new file mode 100644 index 0000000000000000000000000000000000000000..35b7b9fa845c700295135e70592b62f48106bad9 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/ReverseParameters.lean @@ -0,0 +1,72 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.Beta + +namespace OAI + +namespace SharpRamseyFive.ParameterHierarchy +open Filter Asymptotics +open scoped Topology + +theorem eventually_reverse_parameters {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D R b τ : ℝ), Range η σ D R → + b≤Cb*D*σ^(6*beta η) → 0≤τ → τ≤σ^(-200*beta η) → + 1≤P η σ D R ∧ b≤P η σ D R ∧ 1000≤Real.exp (P η σ D R) ∧ + 1000*τ≤(9:ℝ)/10 ∧ 3≤Real.exp σ := by + have hh := eventually_hierarchy hη hη' Cb 1 1 hCb (by norm_num) + have hc := eventually_power_absorption hη hη' 1000 0 1 (by norm_num) (by norm_num) (by norm_num) + have ht : ∀ᶠ σ : ℝ in atTop,σ^(-200*beta η)<(9:ℝ)/10000 := by + have hp : 0<200*beta η := mul_pos (by norm_num) (beta_pos hη) + simpa only [neg_mul] using (tendsto_rpow_neg_atTop hp).eventually_lt_const (by norm_num : (0:ℝ)<9/10000) + filter_upwards [hh,hc,ht,eventually_ge_atTop (10:ℝ)] with σ hh hc ht hσ + intro D R b τ hr hb hτ hτhi + have hv := hh D R b τ hr hb hτhi + have hP : 1≤P η σ D R := by linarith only [hv.1,hv.2.2.2.2.2] + have hbP : b≤P η σ D R := by + have hn : 0≤P η σ D R*τ := mul_nonneg (le_trans (by norm_num) hP) hτ + linarith only [hv.2.2.2.2.1,hv.2.2.2.2.2,hn] + refine ⟨hP,hbP,?_,?_,?_⟩ + · simpa only [Real.rpow_zero,mul_one,one_mul] using hc D R hr + · linarith only [hτhi,ht] + · linarith only [Real.add_one_le_exp σ,hσ] + +end SharpRamseyFive.ParameterHierarchy + +namespace SharpRamseyFive.ReverseCap +open scoped Classical + +noncomputable def reverseLength (q gap : ℝ) : ℕ := ⌈20*q*(gap+1)⌉₊ + +lemma reverseLength_spec (q gap : ℝ) (hq : 1≤q) (hg : 0≤gap) : + 0 a ≤ δ*((S \ (O x ∪ {x})).filter + fun y => y.submodule ≤ A).card + +lemma richCenters_mono (S T : Finset (ℙ K V)) + (O U : ℙ K V → Finset (ℙ K V)) (δ a : ℝ) (hδ : 0 ≤ δ) + (hS : S ⊆ T) (hO : ∀ x, U x ⊆ O x) (A : Submodule K V) : + richCenters S O δ a A ⊆ richCenters T U δ a A := by + intro x hx + obtain ⟨hxA,hx⟩ := Finset.mem_filter.mp hx + refine Finset.mem_filter.mpr ⟨hxA,hx.trans ?_⟩ + apply mul_le_mul_of_nonneg_left _ hδ + exact_mod_cast Finset.card_le_card (Finset.filter_subset_filter _ + (Finset.sdiff_subset_sdiff hS (Finset.union_subset_union_left (hO x)))) + +lemma exists_scale {δ a : ℝ} (hδ : 0 < δ) (ha : 4*δ ≤ a) : + ∃ M : ℕ, 0 < M ∧ 2*δ*M ≤ a ∧ a ≤ 4*δ*M := by + have hx : 2 ≤ a/(2*δ) := (le_div_iff₀ (by positivity)).mpr (by linarith) + have hp : 1 ≤ ⌊a/(2*δ)⌋₊ := Nat.le_floor (by linarith) + refine ⟨⌊a/(2*δ)⌋₊,by omega,?_,?_⟩ + · have hf := Nat.floor_le (by linarith : 0 ≤ a/(2*δ)) + have hh := (le_div_iff₀ (by positivity)).mp hf + nlinarith + · have hf := Nat.lt_floor_add_one (a/(2*δ)) + have hn : (1:ℝ) ≤ ⌊a/(2*δ)⌋₊ := by exact_mod_cast hp + have hh : a/(2*δ) ≤ 2*⌊a/(2*δ)⌋₊ := by linarith + have := (div_le_iff₀ (by positivity)).mp hh + nlinarith + +variable {I : Type*} [LinearOrder I] + +theorem captured_rich_centers (F : Finset I) (hF : F.Nonempty) + (P : I → Submodule K V) (X : Finset (ℙ K V)) + (hP : ∀ i ∈ F, finrank K (P i) = 3) + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 2) + (J M : ℕ) (hM : 0 < M) (hJM : J ≤ M) + (hJq : (J:ℝ)*(Nat.card K:ℝ) ≤ X.card) + (O : ℙ K V → Finset (ℙ K V)) + (hO : ∀ x, ownCell F hF (fun i => flatPoints (P i)) X J x ⊆ O x) + (δ a : ℝ) (hδ : 0 < δ) (ha : 2*δ*M ≤ a) (ha' : a ≤ 4*δ*M) : + (∑ A ∈ L, ((richCenters + (X \ remaining F hF (fun i => flatPoints (P i)) X J) O δ a A).card:ℝ))*a^2 ≤ + 192*δ^2*(X.card:ℝ)^2 := by + have ha0 : 0 ≤ a := (by positivity : 0 ≤ 2*δ*M).trans ha + have hsub (A : Submodule K V) : richCenters + (X \ remaining F hF (fun i => flatPoints (P i)) X J) O δ a A ⊆ + capturedLineCenters F hF P X J (2*M) A := by + intro x hx + obtain ⟨hxA,hx⟩ := Finset.mem_filter.mp hx + refine Finset.mem_filter.mpr ⟨hxA,?_⟩ + have hs : (X \ remaining F hF (fun i => flatPoints (P i)) X J) \ (O x ∪ {x}) ⊆ + (X \ remaining F hF (fun i => flatPoints (P i)) X J) \ + ownCell F hF (fun i => flatPoints (P i)) X J x := + Finset.sdiff_subset_sdiff_right _ ((hO x).trans Finset.subset_union_left) + have hc : ((((X \ remaining F hF (fun i => flatPoints (P i)) X J) \ + (O x ∪ {x})).filter fun y => y.submodule ≤ A).card:ℝ) ≤ + (((X \ remaining F hF (fun i => flatPoints (P i)) X J) \ + ownCell F hF (fun i => flatPoints (P i)) X J x).filter + fun y => y.submodule ≤ A).card := by + exact_mod_cast Finset.card_le_card (Finset.filter_subset_filter _ hs) + have hh := ha.trans (hx.trans (mul_le_mul_of_nonneg_left hc hδ.le)) + have hm : ((2*M:ℕ):ℝ) ≤ (((X \ remaining F hF (fun i => flatPoints (P i)) X J) \ + ownCell F hF (fun i => flatPoints (P i)) X J x).filter + fun y => y.submodule ≤ A).card := by + push_cast + nlinarith + exact_mod_cast hm + have hsum : (∑ A ∈ L, ((richCenters + (X \ remaining F hF (fun i => flatPoints (P i)) X J) O δ a A).card:ℝ)) ≤ + ∑ A ∈ L, ((capturedLineCenters F hF P X J (2*M) A).card:ℝ) := by + apply Finset.sum_le_sum + intro A _ + exact_mod_cast Finset.card_le_card (hsub A) + have hc := captured_center_line_count F hF P X hP L hL J M hM hJM hJq + have ha2 := pow_le_pow_left₀ ha0 ha' 2 + calc + _ ≤ (∑ A ∈ L, ((capturedLineCenters F hF P X J (2*M) A).card:ℝ))*a^2 := + mul_le_mul_of_nonneg_right hsum (sq_nonneg _) + _ ≤ (∑ A ∈ L, ((capturedLineCenters F hF P X J (2*M) A).card:ℝ))*(4*δ*M)^2 := + mul_le_mul_of_nonneg_left ha2 (Finset.sum_nonneg fun _ _ => by positivity) + _ = 16*δ^2*((∑ A ∈ L, ((capturedLineCenters F hF P X J (2*M) A).card:ℝ))*(M:ℝ)^2) := by ring + _ ≤ 16*δ^2*(12*(X.card:ℝ)^2) := mul_le_mul_of_nonneg_left hc (by positivity) + _ = _ := by ring + +end SharpRamseyFive.GlobalRadial + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/RichCentersCard.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/RichCentersCard.lean new file mode 100644 index 0000000000000000000000000000000000000000..4f85f092e31cf083a09976bfdfeac35d8434d43a --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/RichCentersCard.lean @@ -0,0 +1,112 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.RichCenters +import OAI.Combinatorics.RamseyFive.Geometry.CardIndexed + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open scoped BigOperators +open MeasureTheory ProbabilityTheory +open scoped BigOperators ENNReal NNReal +noncomputable section +namespace SharpRamseyFive.GlobalRadial +open Module ProjectiveTraining GreedyTraining ProjectiveIncidence +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + +lemma richCenters_card_le (X : Finset (ℙ K V)) (O : ℙ K V → Finset (ℙ K V)) + (δ a : ℝ) (A : Submodule K V) (hA : finrank K A = 2) : + (richCenters X O δ a A).card ≤ Nat.card K+1 := by + let : Finite V := Module.finite_of_finite K + let C := richCenters X O δ a A + let f (x : C) : {y : ℙ K V // y.submodule ≤ A} := + ⟨x.val,(mem_flatPoints A x.val).mp (Finset.mem_filter.mp x.property).1⟩ + have hi : Function.Injective f := fun _ _ he => Subtype.ext (show _ = _ from congrArg (fun z : {y : ℙ K V // y.submodule ≤ A} => z.val) he) + have hc := Nat.card_le_card_of_injective f hi + rw [Nat.card_eq_fintype_card,Fintype.card_coe,card_subspacePoints,hA] at hc + simpa only [Finset.sum_range_succ,Finset.range_zero,Finset.sum_empty,pow_zero,pow_one, + zero_add,add_comm] using hc + +lemma centers_empty_of_not_rich (X : Finset (ℙ K V)) + (O : ℙ K V → Finset (ℙ K V)) {δ a : ℝ} (hδ : 0 ≤ δ) + (A : Submodule K V) (ha : ¬a ≤ δ*(X.filter fun y => y.submodule ≤ A).card) : + richCenters X O δ a A = ∅ := by + apply Finset.eq_empty_of_forall_notMem + intro x hx + apply ha + apply (Finset.mem_filter.mp hx).2.trans + apply mul_le_mul_of_nonneg_left _ hδ + exact_mod_cast Finset.card_le_card (Finset.filter_subset_filter _ Finset.sdiff_subset) + +theorem residual_rich_centers {I : Type*} [Fintype I] {q : ℕ} [CharP K q] + (hq : 2 < q) (hcard : Nat.card K = q) + (hI : Fintype.card I = 4 ∨ Fintype.card I = 5) + (σ g n' a : ℝ) (hσq : Real.exp σ = q) + (hσ : 1000 ≤ σ) (hg : 100000000 ≤ g) (hghi : g ≤ 2*σ) + (hn' : Real.exp (3*σ/2+g)/4 ≤ n') (ha : Real.exp (-g/20) ≤ a) (ha2 : a ≤ 2) + (X : Finset (ℙ K (I → K))) (hX : (X.card:ℝ) ≤ Real.exp (3*σ/2+g)) + (L : Finset (Submodule K (I → K))) (hL : ∀ A ∈ L, finrank K A = 2) + (O : ℙ K (I → K) → Finset (ℙ K (I → K))) + (hcap : ∀ U : Submodule K (I → K), finrank K U = 3 → + ((X.filter fun y => y.submodule ≤ U).card:ℝ) ≤ + (Real.exp (3*σ/2+g)) ^ (4/3:ℝ) / Real.exp σ * Real.exp (-g/5)) : + (∑ A ∈ L, ((richCenters X O ((q:ℝ)/n') a A).card:ℝ))*a^2 ≤ 333024*(q:ℝ)^2 := by + have hq0 : (0:ℝ) n'*a/(q:ℝ) ≤ (X.filter fun y => y.submodule ≤ A).card + have hr := ProjectiveRichLines.source_rich_lines hq hI σ g n' a hσq hσ hg hghi + hn' ha X hX F (fun A hA => hL A (Finset.mem_filter.mp hA).1) + (fun A hA => by simpa only [hσq] using (Finset.mem_filter.mp hA).2) hcap + rw [hσq] at hr + have hsum : (∑ A ∈ L, ((richCenters X O ((q:ℝ)/n') a A).card:ℝ)) ≤ + (F.card:ℝ)*((q:ℝ)+1) := by + have he : (∑ A ∈ L, ((richCenters X O ((q:ℝ)/n') a A).card:ℝ)) = + ∑ A ∈ F, ((richCenters X O ((q:ℝ)/n') a A).card:ℝ) := by + symm + apply Finset.sum_subset (Finset.filter_subset _ _) + intro A hA hn + have hnrich : ¬n'*a/(q:ℝ) ≤ (X.filter fun y => y.submodule ≤ A).card := by + intro hh + exact hn (Finset.mem_filter.mpr ⟨hA,hh⟩) + rw [centers_empty_of_not_rich X O (by positivity) A ?_,Finset.card_empty,Nat.cast_zero] + intro hh + apply hnrich + apply (div_le_iff₀ hq0).mpr + have hh' := (le_div_iff₀ hn0).mp (show a ≤ + (q:ℝ)*(X.filter fun y => y.submodule ≤ A).card/n' by simpa only [div_mul_eq_mul_div] using hh) + nlinarith + rw [he] + calc + _ ≤ ∑ _A ∈ F, ((q:ℝ)+1) := by + apply Finset.sum_le_sum + intro A hA + have hh := richCenters_card_le X O ((q:ℝ)/n') a A (hL A (Finset.mem_filter.mp hA).1) + rw [hcard] at hh + exact_mod_cast hh + _ = _ := by simp only [Finset.sum_const, nsmul_eq_mul] + have hr' : (F.card:ℝ)*n'*a ≤ 20814*Real.exp (3*σ/2+g)*(q:ℝ) := by + have hh := (div_le_iff₀ hq0).mp (show (F.card:ℝ)*n'*a/(q:ℝ) ≤ _ by + simpa only [mul_div_assoc,mul_assoc] using hr) + simpa only [mul_div_assoc] using hh + have hn : Real.exp (3*σ/2+g) ≤ 4*n' := by linarith + have hr'' : (F.card:ℝ)*a ≤ 83256*(q:ℝ) := by + have hh := hr'.trans (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hn (by norm_num)) hq0.le) + nlinarith + have hq1 : (q:ℝ)+1 ≤ 2*(q:ℝ) := by exact_mod_cast (by omega : q+1≤2*q) + calc + _ ≤ ((F.card:ℝ)*((q:ℝ)+1))*a^2 := mul_le_mul_of_nonneg_right hsum (sq_nonneg _) + _ = ((F.card:ℝ)*a)*(((q:ℝ)+1)*a) := by ring + _ ≤ (83256*(q:ℝ))*((2*(q:ℝ))*2) := mul_le_mul hr'' + (mul_le_mul hq1 ha2 ha0.le (by positivity)) (by positivity) (by positivity) + _ = _ := by ring + +end SharpRamseyFive.GlobalRadial + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/ScalarConditions.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/ScalarConditions.lean new file mode 100644 index 0000000000000000000000000000000000000000..14455b1c1b3ccf42743c02b60b4456125cffee8c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/ScalarConditions.lean @@ -0,0 +1,105 @@ +import Mathlib + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open scoped BigOperators +open MeasureTheory ProbabilityTheory +open scoped BigOperators ENNReal NNReal +namespace SharpRamseyFive.RichRegime +open scoped Real + +theorem scalar_conditions (σ g N M K : ℝ) + (hNhi : N ≤ Real.exp (3*σ/2+g)) + (hMlo : Real.exp (σ/2+19*g/20)/4 ≤ M) + (hKhi : K ≤ 2*Real.exp (σ+17*g/15)) + (hg : g ≤ 2*σ) + (hlarge : 64*1024^2 ≤ Real.exp (37*g/20)) + (hcap : 256 ≤ Real.exp (23*g/30)) + (hchar : 102 < Real.exp (9*σ/20)) : + 1024^2*N ≤ M^3 ∧ 8*K ≤ M^2 ∧ + 51*Real.sqrt (N/M) < Real.exp σ := by + have hM : 0 < M := lt_of_lt_of_le (by positivity) hMlo + have hcube : (Real.exp (σ/2+19*g/20)/4)^3 ≤ M^3 := + pow_le_pow_left₀ (by positivity) hMlo 3 + have hsq : (Real.exp (σ/2+19*g/20)/4)^2 ≤ M^2 := + pow_le_pow_left₀ (by positivity) hMlo 2 + have he3 : Real.exp (3*σ/2+g)*Real.exp (37*g/20) = (Real.exp (σ/2+19*g/20))^3 := by + rw [← Real.exp_add,← Real.exp_nat_mul] + congr 1 + ring + have he2 : Real.exp (σ+17*g/15)*Real.exp (23*g/30) = (Real.exp (σ/2+19*g/20))^2 := by + rw [← Real.exp_add,← Real.exp_nat_mul] + congr 1 + ring + have hn3 := mul_le_mul_of_nonneg_left hlarge (Real.exp_pos (3*σ/2+g)).le + have hk2 := mul_le_mul_of_nonneg_left hcap (Real.exp_pos (σ+17*g/15)).le + rw [he3] at hn3 + rw [he2] at hk2 + refine ⟨?_,?_,?_⟩ + · nlinarith + · nlinarith + · have hratio : N/M ≤ 4*Real.exp (11*σ/10) := by + apply (div_le_iff₀ hM).mpr + have hs : Real.exp (3*σ/2+g) ≤ + Real.exp (11*σ/10)*Real.exp (σ/2+19*g/20) := by + rw [← Real.exp_add, Real.exp_le_exp] + linarith + have ht := mul_le_mul_of_nonneg_left hMlo (show 0 ≤ 4*Real.exp (11*σ/10) by positivity) + nlinarith + have hsqrt : Real.sqrt (N/M) ≤ 2*Real.exp (11*σ/20) := by + apply (Real.sqrt_le_iff).mpr + refine ⟨by positivity,hratio.trans_eq ?_⟩ + rw [mul_pow,← Real.exp_nat_mul] + norm_num + ring + have he : Real.exp (11*σ/20)*Real.exp (9*σ/20) = Real.exp σ := by + rw [← Real.exp_add] + congr 1 + ring + have ht := mul_lt_mul_of_pos_left hchar (Real.exp_pos (11*σ/20)) + rw [he] at ht + linarith + +theorem source_substitution (σ g n' a : ℝ) + (hn' : Real.exp (3*σ/2+g)/4 ≤ n') + (ha : Real.exp (-g/20) ≤ a) : + Real.exp (σ/2+19*g/20)/4 ≤ n'*a/Real.exp σ ∧ + (Real.exp (3*σ/2+g)) ^ (4/3:ℝ) / Real.exp σ * Real.exp (-g/5) = + Real.exp (σ+17*g/15) := by + have hn0 : 0 ≤ n' := le_trans (by positivity) hn' + constructor + · apply (le_div_iff₀ (Real.exp_pos σ)).mpr + have hh := mul_le_mul hn' ha (by positivity) hn0 + apply le_trans _ hh + have he : Real.exp (σ/2+19*g/20)*Real.exp σ = + Real.exp (3*σ/2+g)*Real.exp (-g/20) := by + rw [← Real.exp_add,← Real.exp_add] + congr 1 + ring + have he' : Real.exp (σ/2+19*g/20)/4*Real.exp σ = + Real.exp (3*σ/2+g)/4*Real.exp (-g/20) := by nlinarith [he] + exact he'.le + · rw [← Real.exp_mul,← Real.exp_sub,← Real.exp_add] + congr 1 + ring + +theorem sufficiently_large_conditions (σ g N M K : ℝ) + (hσ : 1000 ≤ σ) (hglo : 100000000 ≤ g) (hghi : g ≤ 2*σ) + (hNhi : N ≤ Real.exp (3*σ/2+g)) + (hMlo : Real.exp (σ/2+19*g/20)/4 ≤ M) + (hKhi : K ≤ 2*Real.exp (σ+17*g/15)) : + 2 ≤ M ∧ 1024^2*N ≤ M^3 ∧ 8*K ≤ M^2 ∧ + 51*Real.sqrt (N/M) < Real.exp σ := by + have hm := Real.add_one_le_exp (σ/2+19*g/20) + refine ⟨by linarith,scalar_conditions σ g N M K hNhi hMlo hKhi hghi ?_ ?_ ?_⟩ + · linarith [Real.add_one_le_exp (37*g/20)] + · linarith [Real.add_one_le_exp (23*g/30)] + · linarith only [hσ, Real.add_one_le_exp (9*σ/20)] + +end SharpRamseyFive.RichRegime + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/SumDiagonal.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/SumDiagonal.lean new file mode 100644 index 0000000000000000000000000000000000000000..999164bfc7af6b24dc563d53a3b9a43905a9ebea --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/SumDiagonal.lean @@ -0,0 +1,96 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Probability.PositiveTailMoment + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ValidationBounds +open scoped BigOperators Classical + +lemma sum_diagonal {H : Type*} [Fintype H] (f : H → H → ℝ) : + (∑ h,∑ k,f h k) = (∑ h,f h h) + + ∑ z : {z : H × H // z.1 ≠ z.2},f z.val.1 z.val.2 := by + classical + rw [← Fintype.sum_prod_type'] + have he : (∑ z : H × H,f z.1 z.2) = + (∑ z : H × H with z.1 = z.2,f z.1 z.2) + + ∑ z : H × H with z.1 ≠ z.2,f z.1 z.2 := by + exact (Finset.sum_filter_add_sum_filter_not Finset.univ (fun z : H × H => z.1=z.2) _).symm + rw [he] + congr 1 + · rw [Finset.sum_filter] + rw [Fintype.sum_prod_type] + simp + · rw [Finset.sum_subtype (Finset.univ.filter fun z : H × H => z.1 ≠ z.2) + (p := fun z => z.1 ≠ z.2) (by intro z; simp)] + +theorem overlap_power_sum {H : Type*} [Fintype H] (θ : H → H → ℝ) + (hθ0 : ∀ h k,0 ≤ θ h k) (hθ2 : ∀ h k,θ h k ≤ 2) + (A C : ℝ) (hA : 0 ≤ A) (hcard : (Fintype.card H:ℝ) ≤ C) + (K R : ℕ) (hR : K+1 ≤ R) + (htail : ∀ a : ℝ,0 < a → a ≤ 2 → + ((Finset.univ.filter fun z : {z : H × H // z.1 ≠ z.2} => a ≤ θ z.val.1 z.val.2).card:ℝ)*a^K ≤ A) : + (∑ h,∑ k,θ h k^R) ≤ (C+2*A)*2^R := by + rw [sum_diagonal] + have hd : (∑ h,θ h h^R) ≤ C*2^R := by + calc + _ ≤ ∑ _h : H,(2:ℝ)^R := Finset.sum_le_sum fun h _ => + pow_le_pow_left₀ (hθ0 h h) (hθ2 h h) R + _ = Fintype.card H*2^R := by simp + _ ≤ _ := mul_le_mul_of_nonneg_right hcard (by positivity) + have ho := TailMoment.tail_moment (fun z : {z : H × H // z.1 ≠ z.2} => θ z.val.1 z.val.2) + (fun z => hθ0 _ _) (fun z => hθ2 _ _) A hA K R hR htail + exact (add_le_add hd ho).trans_eq (by ring) + +lemma validation_budget {B P L : ℝ} {R : ℕ} + (hP : 100000 ≤ P) (hR : (R:ℝ) ≤ P/100000) + (hLR : 100*L ≤ P) + (D S : ℝ) (hD0 : 0 ≤ D) (hD : D ≤ 100*B*Real.exp (L/100)) + (hS : S ≤ (100*B^2+2*(B^2*Real.exp (P/50)))*2^R) : + D^2+S ≤ B^2*Real.exp (3*P/100) := by + have hlog : Real.log 2 ≤ 1 := (Real.log_le_sub_one_of_pos (by norm_num)).trans (by norm_num) + have hpow : (2:ℝ)^R ≤ Real.exp (P/100000) := by + rw [show (2:ℝ)^R = Real.exp ((R:ℝ)*Real.log 2) by + rw [Real.exp_nat_mul,Real.exp_log (by norm_num : (0:ℝ)<2)]] + apply Real.exp_le_exp.mpr + calc + (R:ℝ)*Real.log 2 ≤ (R:ℝ)*1 := mul_le_mul_of_nonneg_left hlog (by positivity) + _ ≤ P/100000 := by simpa using hR + have hE : 1 ≤ Real.exp (P/50) := Real.one_le_exp (by linarith) + have hS' : S ≤ 102*B^2*Real.exp (P/50+P/100000) := by + calc + S ≤ (100*B^2+2*(B^2*Real.exp (P/50)))*2^R := hS + _ ≤ (102*B^2*Real.exp (P/50))*Real.exp (P/100000) := by + apply mul_le_mul _ hpow (by positivity) (by positivity) + nlinarith [sq_nonneg B,mul_le_mul_of_nonneg_left hE (sq_nonneg B)] + _ = _ := by rw [Real.exp_add]; ring + have hD' : D^2 ≤ 10000*B^2*Real.exp (P/5000) := by + calc + _ ≤ (100*B*Real.exp (L/100))^2 := pow_le_pow_left₀ hD0 hD 2 + _ = 10000*B^2*Real.exp (2*(L/100)) := by + rw [show Real.exp (2*(L/100)) = Real.exp (L/100)^2 by + simpa using Real.exp_nat_mul (L/100) 2] + ring + _ ≤ _ := mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by linarith)) (by positivity) + have hD'' : D^2 ≤ 10000*B^2*Real.exp (P/50+P/100000) := hD'.trans + (mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by linarith)) (by positivity)) + have hcoef : (10102:ℝ) ≤ Real.exp (3*P/100-(P/50+P/100000)) := by + have ht : (100:ℝ) ≤ 3*P/100-(P/50+P/100000) := by linarith + have he' : (10102:ℝ) ≤ Real.exp (100:ℝ) := by + have he2 := Real.add_one_le_exp (25:ℝ) + have he26 : (26:ℝ) ≤ Real.exp 25 := by linarith + have hp := pow_le_pow_left₀ (by norm_num : (0:ℝ)≤26) he26 4 + rw [← Real.exp_nat_mul] at hp + norm_num at hp + exact (by norm_num : (10102:ℝ)≤456976).trans hp + exact he'.trans (Real.exp_le_exp.mpr ht) + calc + D^2+S ≤ 10102*B^2*Real.exp (P/50+P/100000) := by linarith [hD'',hS'] + _ ≤ Real.exp (3*P/100-(P/50+P/100000))*B^2*Real.exp (P/50+P/100000) := by + gcongr + _ = _ := by rw [mul_assoc,mul_left_comm,← Real.exp_add]; congr 2; ring + +end SharpRamseyFive.ValidationBounds + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/Swap.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/Swap.lean new file mode 100644 index 0000000000000000000000000000000000000000..5e208617edf78f91eb6e9fc3e4025d95e5860c68 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/Swap.lean @@ -0,0 +1,61 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.RepresentativeAverage +open scoped BigOperators Classical +variable {B A : Type*} [Fintype B] [Fintype A] + +noncomputable def swapAt (b : B) : ((B → A) × A) ≃ ((B → A) × A) := + Function.Involutive.toPerm (fun z => (Function.update z.1 b z.2,z.1 b)) (by + intro z + apply Prod.ext + · funext c + by_cases h : c=b + · subst c + simp + · simp [Function.update_of_ne h] + · simp) + +theorem selected_sum (f : (B → A) → B → A → ℝ) + (hown : ∀ s b a i,f (Function.update s b a) b i=f s b i) : + (Fintype.card A:ℝ)*(∑s,∑b,f s b (s b))=∑s,∑b,∑a,f s b a := by + have hb (b : B) : (∑s : B → A,∑_a : A,f s b (s b))=∑s : B → A,∑a : A,f s b a := by + have hh := Fintype.sum_equiv (swapAt (A := A) b) + (fun z => f z.1 b (z.1 b)) (fun z => f z.1 b z.2) (by + intro z + simp only [swapAt,Function.Involutive.toPerm,Equiv.coe_fn_mk] + exact (hown z.1 b z.2 (z.1 b)).symm) + simpa only [Fintype.sum_prod_type] using hh + rw [Finset.mul_sum] + simp_rw [Finset.mul_sum] + calc + _ = ∑b,∑s : B → A,∑_a : A,f s b (s b) := by + simp only [Finset.sum_const,Finset.card_univ,nsmul_eq_mul] + rw [Finset.sum_comm] + _ = ∑b,∑s : B → A,∑a : A,f s b a := Finset.sum_congr rfl fun b _ => hb b + _ = _ := Finset.sum_comm + +theorem all_sum_le_twice_unselected (f : (B → A) → B → A → ℝ) + (hf : ∀ s b a,0≤f s b a) + (hown : ∀ s b a i,f (Function.update s b a) b i=f s b i) + (hsize : 2≤Fintype.card A) : + (∑s,∑b,∑a,f s b a) ≤ 2*(∑s,∑b,∑a∈Finset.univ.erase (s b),f s b a) := by + have hs := selected_sum f hown + have hsplit : (∑s,∑b,∑a,f s b a)= + (∑s,∑b,f s b (s b))+(∑s,∑b,∑a∈Finset.univ.erase (s b),f s b a) := by + rw [←Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro s _ + rw [←Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro b _ + exact (Finset.add_sum_erase Finset.univ (f s b) (Finset.mem_univ (s b))).symm + have hsel : 0≤∑s,∑b,f s b (s b) := by + exact Finset.sum_nonneg fun s _ => Finset.sum_nonneg fun b _ => hf s b (s b) + have hsizeR : (2:ℝ)≤Fintype.card A := by exact_mod_cast hsize + nlinarith [mul_le_mul_of_nonneg_right hsizeR hsel] + +end SharpRamseyFive.RepresentativeAverage + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/Threshold.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/Threshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..e3a3af4f56bd11ee6b0af165284362c74058ef2b --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/Threshold.lean @@ -0,0 +1,303 @@ +import Mathlib + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.HighParameters +open scoped BigOperators + +noncomputable def threshold (q n a : ℝ) : ℕ := ⌊n*a/(64*q)⌋₊ +noncomputable def cap (q a : ℝ) : ℕ := ⌈1024*q^2/a⌉₊ +noncomputable def multiplicity (q n a : ℝ) : ℕ := ⌈134217728*q^6/(n^2*a^3)⌉₊ +noncomputable def degree (q n a χ : ℝ) : ℕ := ⌈34359738368*q^6/(n^2*a^4)*Real.exp χ⌉₊ + +lemma threshold_bounds {q n a : ℝ} (hq : 1≤q) (hn : 0 Nat.lt_ceil.mp (hh i hi)⟩ + +noncomputable def clippedPart (S : Finset A) (F : Finset I) (hF : F.Nonempty) + (shape : I→Finset A) (X : Finset A) (J : ℕ) : Option (Fin J)→Finset A + | none => ∅ + | some i => S∩cell F hF shape X i + +noncomputable def queryPart (F : Finset I) (hF : F.Nonempty) + (shape : I→Finset A) (X : Finset A) (J : ℕ) (x : A) : Option (Fin J) := + if h : firstAt F hF shape X J x Disjoint (clippedPart S F hF shape X J i) (clippedPart S F hF shape X J j)) := by + intro i j hij + cases i with + | none => simp [clippedPart] + | some i => + cases j with + | none => simp [clippedPart] + | some j => + have hneq : i≠j := by simpa only [ne_eq,Option.some.injEq] using hij + have hv : i.val≠j.val := fun hh => hneq (Fin.ext hh) + rcases lt_or_gt_of_ne hv with h|h + · exact (cell_disjoint_of_lt F hF shape X h).mono Finset.inter_subset_right Finset.inter_subset_right + · exact (cell_disjoint_of_lt F hF shape X h).symm.mono Finset.inter_subset_right Finset.inter_subset_right + +lemma clippedPart_query (S : Finset A) (F : Finset I) (hF : F.Nonempty) + (shape : I→Finset A) (X : Finset A) (J : ℕ) (x : A) : + clippedPart S F hF shape X J (queryPart F hF shape X J x)=S∩ownCell F hF shape X J x := by + unfold queryPart ownCell + split_ifs with h + · rfl + · simp [clippedPart] + +end SharpRamseyFive.GreedyTraining + +namespace SharpRamseyFive.TrainingCells +open scoped BigOperators Classical +variable {A H P : Type*} [DecidableEq A] [Fintype H] [Fintype P] + +noncomputable def family (C : H→Finset A) (D : P→Finset A) : H⊕P⊕(H×P)→Finset A + | Sum.inl i => C i + | Sum.inr (Sum.inl j) => D j + | Sum.inr (Sum.inr ij) => C ij.1∩D ij.2 + +lemma sum_card_le (S : Finset A) {J : Type*} [Fintype J] (C : J→Finset A) + (hsub : ∀j,C j⊆S) (hdis : Pairwise (fun i j => Disjoint (C i) (C j))) : + (∑j,(C j).card)≤S.card := by + have hpair : (↑(Finset.univ : Finset J) : Set J).PairwiseDisjoint C := + fun i _ j _ hij => hdis hij + rw [←Finset.card_biUnion hpair] + exact Finset.card_le_card (Finset.biUnion_subset.mpr fun j _ => hsub j) + +omit [Fintype H] [Fintype P] in +lemma inter_disjoint (C : H→Finset A) (D : P→Finset A) + (hC : Pairwise (fun i j => Disjoint (C i) (C j))) (hD : Pairwise (fun i j => Disjoint (D i) (D j))) : + Pairwise (fun ij kl : H×P => Disjoint (C ij.1∩D ij.2) (C kl.1∩D kl.2)) := by + intro ij kl hne + by_cases hi : ij.1=kl.1 + · have hj : ij.2≠kl.2 := fun hh => hne (Prod.ext hi hh) + exact (hD hj).mono Finset.inter_subset_right Finset.inter_subset_right + · exact (hC hi).mono Finset.inter_subset_left Finset.inter_subset_left + +lemma family_mass (S : Finset A) (C : H→Finset A) (D : P→Finset A) + (hC : ∀i,C i⊆S) (hD : ∀j,D j⊆S) + (hdC : Pairwise (fun i j => Disjoint (C i) (C j))) (hdD : Pairwise (fun i j => Disjoint (D i) (D j))) : + (∑i,(family C D i).card)≤3*S.card := by + have h₁ := sum_card_le S C hC hdC + have h₂ := sum_card_le S D hD hdD + have h₃ := sum_card_le S (fun ij : H×P => C ij.1∩D ij.2) + (fun ij => Finset.inter_subset_left.trans (hC ij.1)) (inter_disjoint C D hdC hdD) + simp only [Fintype.sum_sum_type,family] + omega + +omit [Fintype H] [Fintype P] in +lemma family_subsets (S : Finset A) (C : H→Finset A) (D : P→Finset A) + (hC : ∀i,C i⊆S) (hD : ∀j,D j⊆S) (i : H⊕P⊕(H×P)) : family C D i⊆S := by + rcases i with i | j | ij + · exact hC i + · exact hD j + · exact Finset.inter_subset_left.trans (hC ij.1) + +lemma small_union (S : Finset A) (C D : Finset A) (hS : S.Nonempty) + (hC : (C.card:ℝ)≤(S.card:ℝ)/25) (hD : (D.card:ℝ)≤(S.card:ℝ)/25) : + ((C∪D).card:ℝ)/(S.card:ℝ)≤2/25 := by + apply (div_le_iff₀ (Nat.cast_pos.mpr hS.card_pos)).mpr + have hc : ((C∪D).card:ℝ)≤(C.card:ℝ)+D.card := by exact_mod_cast Finset.card_union_le C D + linarith only [hc,hC,hD] + +end SharpRamseyFive.TrainingCells + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/TwoPeelMessage.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/TwoPeelMessage.lean new file mode 100644 index 0000000000000000000000000000000000000000..5c825722201dfb01d4c2fb76fca82ea630dada13 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/TwoPeelMessage.lean @@ -0,0 +1,69 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.MetadataCodec +import OAI.Combinatorics.RamseyFive.Geometry.PeelingGeometry + +namespace OAI + + +namespace SharpRamseyFive.Metadata +open Module GreedyTraining ProjectiveTraining MeasurePublicTable +open scoped Classical LinearAlgebra.Projectivization +variable {K V J : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] [Fintype V] [Fintype (ℙ K V)] [LinearOrder J] + +theorem two_peel_message (σ g P : ℝ) (hd : finrank K V≤5) + (hσ : 100000≤σ) (hq : Real.exp σ=Nat.card K) (hg : 0≤g) (hghi : g≤σ/2+Real.log 4) + (H : Finset J) (hH : H.Nonempty) (Hyper : J→Submodule K V) + (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K V) + (X : Finset (ℙ K V)) (hX : (X.card:ℝ)=Real.exp (2*σ+g)) : + let XH := peelSet (P/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let h := peelLength (P/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let t := (Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5) + let ht : 0flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let p := peelLength (P/10000flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let raw := twoPublicOwn (greedyList H hH (fun j=>flatPoints (Hyper j)) X h) + (greedyList F hF (fun j=>flatPoints (Flat j)) XH p) + Real.log (Nat.card (TrainingCode V (listCap σ) (productCap σ) (Nat.card V)))≤Nat.card K ∧ + ∃c : TrainingCode V (listCap σ) (productCap σ) (Nat.card V), + (∀x,messageOwn c x=raw x) ∧ + (∀L x,messageBase c L x=Real.exp (-L*(1-((S∩raw x).card:ℝ)/S.card))) := by + dsimp only + let XH := peelSet (P/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let h := peelLength (P/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let t := (Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5) + have ht : 0flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let p := peelLength (P/10000flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + have hc : 3*σ/2+(g+σ/2)=2*σ+g := by ring + have hlen : (h:ℝ)*Real.exp (2*σ)≤Real.exp (3*σ/2+(g+σ/2)) := by + have hh := peel_length_bound (P/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + have he : (Nat.card K:ℝ)^2=Real.exp (2*σ) := by rw [←hq,←Real.exp_nat_mul];norm_num + rw [hc,←hX,←he] + exact_mod_cast hh + have plen : (p:ℝ)*Real.exp (σ+17*(g+σ/2)/15)≤Real.exp (3*σ/2+(g+σ/2)) := by + have he : t=Real.exp (σ+17*(g+σ/2)/15) := by + dsimp only [t] + rw [←hc] + exact ScoreScalars.plane_threshold_exp rfl rfl + have hl := peel_length_real (P/10000flatPoints (Flat j)) XH t ht + have hphase : (p:ℝ)*Real.exp (σ+17*(g+σ/2)/15)≤XH.card := by + calc + _ = (p:ℝ)*t := congrArg (fun z=>(p:ℝ)*z) he.symm + _ ≤ _ := hl + rw [hc,←hX] + exact hphase.trans (by exact_mod_cast Finset.card_le_card (peel_subset _ _ _ _ _ _ _)) + let Hs : Fin h→Submodule K V := fun i=>Hyper (chosen H hH (fun j=>flatPoints (Hyper j)) X i) + let Ps : Fin p→Submodule K V := fun i=>Flat (chosen F hF (fun j=>flatPoints (Flat j)) XH i) + obtain ⟨hcost,c,hOwn,hBase⟩ := training_message σ (g+σ/2) hd hσ hq + (by linarith) (by linarith) hlen plen Hs Ps S + exact ⟨hcost,c,hOwn,hBase⟩ + +end SharpRamseyFive.Metadata + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/UniversalFresh.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/UniversalFresh.lean new file mode 100644 index 0000000000000000000000000000000000000000..9d92af05b8583fb9d988e7fae5150125cf9fe642 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/UniversalFresh.lean @@ -0,0 +1,65 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.FreshPublicFamily + +namespace OAI + + +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical BigOperators +variable {A B : Type*} [Fintype A] [Fintype B] + +abbrev FreshIndex (B : Type*) [Fintype B] (H : ℕ) := + {W : Finset B // W.Nonempty} × Fin (H+1) +abbrev UniversalFresh (B : Type*) [Fintype B] (H : ℕ) (q : ℝ) := + (i : FreshIndex B H)→FreshTape i.1.1 i.2 q +noncomputable def universalFreshLaw (B : Type*) [Fintype B] (H : ℕ) (q : ℝ) : + Law (UniversalFresh B H q) := + piLaw fun i : FreshIndex B H=>freshTapeLaw i.1.1 i.1.2 i.2 q + +lemma universalFresh_marginal (H : ℕ) (q : ℝ) (i : FreshIndex B H) : + map (universalFreshLaw B H q) (fun t=>t i)=freshTapeLaw i.1.1 i.1.2 i.2 q := + piLaw_eval _ i + +lemma universalFresh_output (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hW : W.Nonempty) (hCW : C⊆W) (H n : ℕ) (hn : n≤H) + (q M : ℝ) : + let i : FreshIndex B H := (⟨W,hW⟩,⟨n,Nat.lt_succ_of_le hn⟩) + map (universalFreshLaw B H q) + (fun t=>Option.map (freshDecoded R W n q (t i)) (freshEncoded R S U C W hCW n q M (t i)))= + ambientCapLaw R S U C W hW n q M := by + dsimp only + rw [←fresh_public_law R S U C W hCW hW n q M] + have hm := universalFresh_marginal (B:=B) H q + ((⟨W,hW⟩,⟨n,Nat.lt_succ_of_le hn⟩) : FreshIndex B H) + rw [←hm,map_comp] + rfl + +theorem universalFresh_adaptive {Θ : Type*} [Fintype Θ] + (prior : Law Θ) (H : ℕ) (q : ℝ) (i : Θ→FreshIndex B H) + (decode : ∀θ,FreshTape (i θ).1.1 (i θ).2 q→Option (Finset A)) : + map (adaptiveLaw prior (fun _=>universalFreshLaw B H q)) (fun z=>decode z.1 (z.2 (i z.1)))= + map (adaptiveLaw prior (fun θ=>map (freshTapeLaw (i θ).1.1 (i θ).1.2 (i θ).2 q) (decode θ))) Prod.snd := by + apply Law.ext + funext Y + simp only [map,adaptiveLaw,Fintype.sum_prod_type] + apply Finset.sum_congr rfl + intro θ _ + have hm := universalFresh_marginal H q (i θ) + have hh := congrArg (fun p=>map p (decode θ) Y) hm + have hh' : map (universalFreshLaw B H q) (fun t=>decode θ (t (i θ))) Y= + map (freshTapeLaw (i θ).1.1 (i θ).1.2 (i θ).2 q) (decode θ) Y := by + convert hh using 1; simp only [map_comp,Function.comp_def] + calc + _ = prior θ * map (universalFreshLaw B H q) (fun t=>decode θ (t (i θ))) Y := by + simp only [map,Finset.mul_sum,mul_ite,mul_zero] + _ = prior θ * map (freshTapeLaw (i θ).1.1 (i θ).1.2 (i θ).2 q) (decode θ) Y := by rw [hh'] + _ = _ := by + simp only [Finset.sum_ite_eq',Finset.mem_univ,ite_true,map] + congr 1 + apply Finset.sum_congr + · ext x; simp + · intro x _; congr 1 +end SharpRamseyFive.ReverseCap + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Decoding/UniversalReverse.lean b/lean/OAI/Combinatorics/RamseyFive/Decoding/UniversalReverse.lean new file mode 100644 index 0000000000000000000000000000000000000000..27759665d9aa5156c3c6f2e5bedabfc243ee6f6b --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Decoding/UniversalReverse.lean @@ -0,0 +1,93 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.TwoPublicCaps +import OAI.Combinatorics.RamseyFive.Decoding.UniversalFresh +import OAI.Combinatorics.RamseyFive.Entropy.PublicComposition + +namespace OAI + + +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical BigOperators +variable {A B : Type*} [Fintype A] [Fintype B] + +abbrev UniversalFreshMessage (W : Finset B) (H : ℕ) (q : ℝ) := + (n : Fin (H+1)) × FreshMessage W n q + +noncomputable def universalFreshDecoded (R : A→B→Prop) (W : Finset B) + (H : ℕ) (q : ℝ) (t : UniversalFresh B H q) (m : UniversalFreshMessage W H q) : Finset A := + if hW : W.Nonempty then + freshDecoded R W m.1 q (t (⟨W,hW⟩,m.1)) m.2 + else ∅ + +noncomputable def universalFreshEncoded (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hCW : C⊆W) (H : ℕ) (n : Fin (H+1)) (q M : ℝ) + (t : UniversalFresh B H q) : Option (UniversalFreshMessage W H q) := + if hW : W.Nonempty then + (freshEncoded R S U C W hCW n q M (t (⟨W,hW⟩,n))).map (fun m=>⟨n,m⟩) + else none + +lemma universalFreshEncoded_exact (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hCW : C⊆W) (hW : W.Nonempty) (H : ℕ) (n : Fin (H+1)) (q M : ℝ) + (t : UniversalFresh B H q) : + (universalFreshEncoded R S U C W hCW H n q M t).map (universalFreshDecoded R W H q t)= + (freshEncoded R S U C W hCW n q M (t (⟨W,hW⟩,n))).map + (freshDecoded R W n q (t (⟨W,hW⟩,n))) := by + simp only [universalFreshEncoded,dite_eq_left hW,Option.map_map] + congr 1 + funext m + exact dite_eq_left hW + +lemma universalFreshEncoded_law (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hCW : C⊆W) (hW : W.Nonempty) (H : ℕ) (n : Fin (H+1)) (q M : ℝ) : + map (universalFreshLaw B H q) (fun t=> + (universalFreshEncoded R S U C W hCW H n q M t).map (universalFreshDecoded R W H q t))= + ambientCapLaw R S U C W hW n q M := by + simp only [universalFreshEncoded_exact R S U C W hCW hW] + exact universalFresh_output R S U C W hW hCW H n (Nat.le_of_lt_succ n.isLt) q M +end SharpRamseyFive.ReverseCap + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def publicReverseResult (A UA : Finset (ℙ K V)) + (B UB : Finset (ℙ K (Dual K V))) (_ : B.Nonempty) + (H : ℕ) (n : Fin (H+1)) (q MA MB : ℝ) + (Y : Option (Finset (ℙ K (Dual K V)))) (t : UniversalFresh (ℙ K (Dual K V)) H q) : + Option (Finset (ℙ K V)) := + match Y with + | none => none + | some W => if _hW : ValidCap B UB MB W then + (universalFreshEncoded Incident A UA (B∩W) W Finset.inter_subset_right H n q MA t).map + (fun m=>UA∩universalFreshDecoded Incident W H q t m) + else none + +omit [Finite K] [FiniteDimensional K V] in +theorem publicReverseResult_law (A UA : Finset (ℙ K V)) + (B UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) + (H : ℕ) (n : Fin (H+1)) (q MA MB : ℝ) + (Y : Option (Finset (ℙ K (Dual K V)))) : + map (universalFreshLaw (ℙ K (Dual K V)) H q) (publicReverseResult A UA B UB hB H n q MA MB Y)= + nextCapLaw A UA B UB hB n q MA MB Y := by + cases Y with + | none => exact map_const _ none + | some W => + change map (universalFreshLaw (ℙ K (Dual K V)) H q) + (fun t=>if _hW : ValidCap B UB MB W then + (universalFreshEncoded Incident A UA (B∩W) W Finset.inter_subset_right H n q MA t).map + (fun m=>UA∩universalFreshDecoded Incident W H q t m) else none) = _ + dsimp only [nextCapLaw] + split_ifs with hv + · have hW := (hv.source_nonempty hB).mono Finset.inter_subset_right + have hh := congrArg (fun p=>map p (Option.map fun Z=>UA∩Z)) + (universalFreshEncoded_law Incident A UA (B∩W) W Finset.inter_subset_right hW H n q MA) + rw [ambientCapLaw_restrict,map_comp] at hh + simpa only [Function.comp_def,Option.map_map] using hh + · exact map_const _ none +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/AllWindowCost.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/AllWindowCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..e9ba19c892ee544f1bbeaeb59ad74d2097fa0271 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/AllWindowCost.lean @@ -0,0 +1,112 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.AmbientPivotPotential +import OAI.Combinatorics.RamseyFive.Entropy.VariableTreeCost +import OAI.Combinatorics.RamseyFive.Marking.WindowDeletionCount + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec PivotTree Marking Windows +open ParameterHierarchy Filter +open scoped Classical BigOperators LinearAlgebra.Projectivization Topology NNReal +noncomputable section +local instance costBDE (w : ℕ) : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance costIDE (w n : ℕ) : DecidableEq (Slots w n) := Classical.decEq _ + +def windowCodeBudget (σ q P b : ℝ) (w H : ℕ) : ℝ := + let X:=nodeChargeConstant*q*P + Real.log (w+1)+ + (X*H*(3*σ+Real.log 4+(b+1+2*Real.log (320/((9:ℝ)/100000)+320))*w)+ + (Real.log 2+X*(b+1+P))*w)+(2*(w:ℝ)+1)*Real.log 2 + +lemma windowCodeBudget_ge_header {σ q P b : ℝ} (w H : ℕ) + (hσ : 0≤σ) (hq : 0≤q) (hP : 0≤P) (hb : 0≤b) : + Real.log (w+1)≤windowCodeBudget σ q P b w H := by + have hc : 0≤nodeChargeConstant := nodeChargeConstant_nonneg + have hl : 0≤Real.log (320/((9:ℝ)/100000)+320) := Real.log_nonneg (by norm_num) + unfold windowCodeBudget + have hl2 : 0≤Real.log 2 := Real.log_nonneg (by norm_num) + have hl4 : 0≤Real.log 4 := Real.log_nonneg (by norm_num) + have hh : 0≤(nodeChargeConstant*q*P*H*(3*σ+Real.log 4+(b+1+2*Real.log (320/((9:ℝ)/100000)+320))*w)+ + (Real.log 2+nodeChargeConstant*q*P*(b+1+P))*w)+(2*(w:ℝ)+1)*Real.log 2 := by positivity + linarith + +lemma windowCodeBudget_mono {σ q P b G : ℝ} {m w h H : ℕ} + (_hσ : 0≤σ) (hq : 0≤q) (hP : 0≤P) (hb : 0≤b) (hG : 0≤G) + (hG' : G≤3*σ+Real.log 4) (hm : m≤w) (hh : h≤H) : + Real.log (w+1)+ + (nodeChargeConstant*q*P*h*(G+(b+1+2*Real.log (320/((9:ℝ)/100000)+320))*m)+ + (Real.log 2+nodeChargeConstant*q*P*(b+1+P))*m)+(2*(m:ℝ)+1)*Real.log 2≤ + windowCodeBudget σ q P b w H := by + have hc : 0≤nodeChargeConstant := nodeChargeConstant_nonneg + have hl : 0≤Real.log (320/((9:ℝ)/100000)+320) := Real.log_nonneg (by norm_num) + have hl2 : 0≤Real.log 2 := Real.log_nonneg (by norm_num) + have hm' : (m:ℝ)≤w := by exact_mod_cast hm + have hh' : (h:ℝ)≤H := by exact_mod_cast hh + apply add_le_add + · apply add_le_add le_rfl + apply add_le_add + · exact mul_le_mul (mul_le_mul_of_nonneg_left hh' (by positivity)) + (add_le_add hG' (mul_le_mul_of_nonneg_left hm' (by positivity))) + (by positivity) (by positivity) + · exact mul_le_mul_of_nonneg_left hm' (by positivity) + · exact mul_le_mul_of_nonneg_right (by linarith) hl2 + +theorem eventually_allWindow_cost {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D k s : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))], + ∀ (hd : finrank K V=5) (w n H : ℕ) [Nonempty (Fin n)] + (p : Law (Slots w n→FlagPair K V)) (u : Slots w n→ℝ) (sel : Fin w×Bool→Fin n) + (E : Finset (Fin w)) + (W : ∀hE : E.Nonempty,ReciprocalWindows p u sel (survivingOriginal E hE) s) + (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K), + Nat.card K=q → Range η σ D R → (L₀:ℝ)=L η σ D → + 0≤k+2*s+Real.log 4 → k+2*s+Real.log 4≤Cb*D*σ^(6*beta η) → + (∀v∈E,u (earlySlot sel v)-u (lateSlot sel v)≤k) → w<2^H → + let f := fun C : PivotContext K V => + fourFinitePredictor hd σ C.1 C.2 (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun C : PivotContext K V => + fourFinitePredictor (K:=K) (V:=Dual K V) (by simpa using hd) σ C.2 + (C.1.map bidualPoint.toEmbedding) (P η σ D R) (σ^(-800*beta η)) R L₀ + ∀ (t : VariableTreeTape f r w) (z : WindowLevelsData (K:=K) (V:=V) E.card), + variableTreeCost f r t (Finset.univ,Finset.univ) + (allWindowEncoded f r p u sel E W σ hσ hq hd.le (9/100000) (9/10) + (σ^(-1000*beta η)) (P η σ D R) (by norm_num) t z)≤ + windowCodeBudget σ (Nat.card K) (P η σ D R) (k+2*s+Real.log 4) w H := by + filter_upwards [eventually_variable_tree_cost hη hη' Cb hCb] with σ hh + intro D k s R L₀ q K V _ _ _ _ _ _ _ _ _ hd w n H _ p u sel E W hσ hq + hcard hr hL hb hbhi hdrop hH + dsimp only + let f := fun C : PivotContext K V => + fourFinitePredictor hd σ C.1 C.2 (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun C : PivotContext K V => + fourFinitePredictor (K:=K) (V:=Dual K V) (by simpa using hd) σ C.2 + (C.1.map bidualPoint.toEmbedding) (P η σ D R) (σ^(-800*beta η)) R L₀ + intro t z + have hP : 0≤P η σ D R := le_of_lt (lt_of_lt_of_le (by positivity) + (finite_bounds hη hη' hσ hr).2.2.2.2.2.1) + change variableTreeCost f r t _ (allWindowEncoded f r p u sel E W _ _ _ _ _ _ _ _ _ t z)≤_ + unfold allWindowEncoded + split_ifs with hE + · have hs := hh D (k+2*s+Real.log 4) R L₀ q K V hd w + ⟨E.card,Nat.lt_succ_of_le (by simpa using Finset.card_le_univ E)⟩ + (fun i=>(W hE).firstSupport i (z.1 i)) (fun i=>(W hE).secondSupport i (z.2 i)) + (fun i=>(W hE).first_nonempty i _) (fun i=>(W hE).second_nonempty i _) hσ hq + hcard hr hL hb hbhi + (fun i=>(W hE).support_product k (fun v=>hdrop _ (survivingOriginal_mem E hE v)) i (z.1 i) (z.2 i)) + t (Finset.univ,Finset.univ) + apply hs.trans + exact windowCodeBudget_mono (zero_le_one.trans hσ) (by positivity) hP hb + (by exact le_max_left _ _) (ambient_pivotPotential hd σ hq) + (by simpa using Finset.card_le_univ E) + (finiteBalanced_height H E.card ((lt_of_le_of_lt (by simpa using Finset.card_le_univ E) hH))) + · rw [variableTreeEmpty_cost] + exact windowCodeBudget_ge_header w H (zero_le_one.trans hσ) (by positivity) hP hb +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/BandCoreRanks.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/BandCoreRanks.lean new file mode 100644 index 0000000000000000000000000000000000000000..e36e10e568b5782e52aff32edd760014d23e6929 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/BandCoreRanks.lean @@ -0,0 +1,49 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.GoodCoreRanks + +namespace OAI + +namespace SharpRamseyFive.CoreGeometry +open Module SharpRamseyFive.FiniteEntropy +open scoped LinearAlgebra.Projectivization BigOperators Classical +noncomputable section + +lemma rank_of_logarithmic_slack {q A s : ℝ} {r n : ℕ} + (hq : 1 simp [hb] at hm + | some b => + rw [hb] at hm + change (if _hv : ValidCap T UT MB (t.1 b) then _ else none)=some m at hm + split_ifs at hm with hv + obtain ⟨f,hf,he⟩ := Option.map_eq_some_iff.mp hm + subst m + exact ⟨rfl,hf⟩ + +theorem reversedBase_cost (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) + (hdim : finrank K V=3) + (S U : Finset (ℙ K V)) (hS : S.Nonempty) (hSU : S⊆U) + (T UT : Finset (ℙ K (Dual K V))) (hT : T.Nonempty) (hTU : T⊆UT) + (P τ : ℝ) (hP : 1≤P) (hτ : 0≤τ) (hτ1 : τ≤1) (MA : ℝ) + (hn : reverseLength (Nat.card K) (Real.log ((U.card:ℝ)/S.card))≤1000*(Nat.card K)^2) + (t : ReversedBaseTape UT P τ (1000*(Nat.card K)^2) (Nat.card K)) + (m : ReversedBaseMessage UT P τ (1000*(Nat.card K)^2) (Nat.card K) t) + (hm : reversedBaseEncoded S U T UT P τ (1000*(Nat.card K)^2) ⟨_,Nat.lt_succ_of_le hn⟩ + (Nat.card K) MA ((T.card:ℝ)*Real.exp (2*P)) t=some m) : + reversedBaseCost UT P τ (1000*(Nat.card K)^2) (Nat.card K) t m≤ + 1200*(Nat.card K:ℝ)*P*(Real.log ((U.card:ℝ)/S.card)+Real.log ((UT.card:ℝ)/T.card)+P) := by + let : Finite V := Module.finite_of_finite K + let : Fintype V := Fintype.ofFinite _ + let : Finite (Dual K V) := Module.finite_of_finite K + let : Fintype (Dual K V) := Fintype.ofFinite _ + obtain ⟨hb,hf⟩ := reversedBase_prefixes S U T UT P τ _ _ _ _ _ t m hm + have hbase := baseFinite_cost (K:=K) (V:=Dual K V) (by simpa using hdim) + T UT hT hTU P τ hP hτ hτ1 t.1 m.1 hb + have hvalid := baseFinite_sound T UT P τ t.1 m.1 hb + have hc : CaptureBound T UT (9/10) ((T.card:ℝ)*Real.exp (2*P)) (t.1 m.1) := hvalid + have hcost := general_reverse_message_cost σ hσ hq (by omega : finrank K V≤5) + S U hS hSU T UT (t.1 m.1) hT (9/10) 2 P (by norm_num) (by norm_num) (by norm_num) hP hc + have hh := universalFresh_cost_exact Incident S U (T∩t.1 m.1) (t.1 m.1) + Finset.inter_subset_right _ _ _ MA t.2 m.2 hf + simp only [Nat.cast_mul,Nat.cast_pow,Nat.cast_ofNat] at hh + have hlog := Real.one_sub_inv_le_log_of_pos (by norm_num : (0:ℝ)<9/10) + norm_num at hlog + have hcst : 1010+21*((2:ℝ)-Real.log (9/10))≤1080 := by linarith + have hgs := (projective_enclosure_gap σ hq (by omega : finrank K V≤5) S U hS hSU).1 + have hgt := (projective_enclosure_gap σ hq (by simpa using (show finrank K V≤5 by omega)) T UT hT hTU).1 + have hpq : 0≤(Nat.card K:ℝ)*P := mul_nonneg (Nat.cast_nonneg _) (by linarith) + have hmul := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right hcst hpq) (show 0≤Real.log ((U.card:ℝ)/S.card)+P by linarith) + unfold reversedBaseCost + rw [hh] + dsimp only at hcost + nlinarith [mul_nonneg hpq hgs,mul_nonneg hpq hgt,mul_nonneg hpq (show 0≤P by linarith)] +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence FiniteEntropy ReverseCap Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + +noncomputable def twoPublicCost (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (H : ℕ) (q : ℝ) (t : TwoPublicTape U UT P τ H q) : + TwoPublicMessage U UT P τ H q t→ℝ + | Sum.inl m => Real.log 2+baseFiniteCost U P τ m + | Sum.inr m => Real.log 2+reversedBaseCost UT P τ H q t.2 m + +theorem twoPublic_cost (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) + (hdim : finrank K V=3) + (S U : Finset (ℙ K V)) (hS : S.Nonempty) (hSU : S⊆U) + (T UT : Finset (ℙ K (Dual K V))) (hT : T.Nonempty) (hTU : T⊆UT) + (P τ : ℝ) (hP : 1≤P) (hτ : 0≤τ) (hτ1 : τ≤1) (MA : ℝ) + (hn : reverseLength (Nat.card K) (Real.log ((U.card:ℝ)/S.card))≤1000*(Nat.card K)^2) + (t : TwoPublicTape U UT P τ (1000*(Nat.card K)^2) (Nat.card K)) + (m : TwoPublicMessage U UT P τ (1000*(Nat.card K)^2) (Nat.card K) t) + (hm : twoPublicEncoded S U T UT P τ (1000*(Nat.card K)^2) ⟨_,Nat.lt_succ_of_le hn⟩ + (Nat.card K) MA ((T.card:ℝ)*Real.exp (2*P)) t=some m) : + twoPublicCost U UT P τ (1000*(Nat.card K)^2) (Nat.card K) t m≤ + 1300*(Nat.card K:ℝ)*P*(Real.log ((U.card:ℝ)/S.card)+Real.log ((UT.card:ℝ)/T.card)+P) := by + let gS := Real.log ((U.card:ℝ)/S.card) + let gT := Real.log ((UT.card:ℝ)/T.card) + have hgs : 0≤gS := Real.log_nonneg ((le_div_iff₀ (by exact_mod_cast hS.card_pos)).mpr + (by simpa using (show (S.card:ℝ)≤U.card by exact_mod_cast Finset.card_le_card hSU))) + have hgt : 0≤gT := Real.log_nonneg ((le_div_iff₀ (by exact_mod_cast hT.card_pos)).mpr + (by simpa using (show (T.card:ℝ)≤UT.card by exact_mod_cast Finset.card_le_card hTU))) + have hq1 : (1:ℝ)≤Nat.card K := by exact_mod_cast (Nat.card_pos (α:=K)) + have hqp : 1≤(Nat.card K:ℝ)*P := one_le_mul_of_one_le_of_one_le hq1 hP + have hall : 1≤(Nat.card K:ℝ)*P*(gS+gT+P) := one_le_mul_of_one_le_of_one_le hqp (by linarith) + have ht := mul_nonneg (show 0≤(Nat.card K:ℝ)*P by linarith) hgt + have hl : Real.log 2≤1 := by have := Real.log_le_sub_one_of_pos (by norm_num : (0:ℝ)<2);norm_num at this;exact this + unfold twoPublicEncoded at hm + split_ifs at hm with hST + · obtain ⟨b,hb,he⟩ := Option.map_eq_some_iff.mp hm + subst m + have hc := baseFinite_cost hdim S U hS hSU P τ hP hτ hτ1 t.1 b hb + change Real.log 2+baseFiniteCost U P τ b≤1300*(Nat.card K:ℝ)*P*(gS+gT+P) + change _≤110*(Nat.card K:ℝ)*P*(gS+P) at hc + nlinarith + · obtain ⟨b,hb,he⟩ := Option.map_eq_some_iff.mp hm + subst m + have hc := reversedBase_cost σ hσ hq hdim S U hS hSU T UT hT hTU P τ hP hτ hτ1 MA hn t.2 b hb + change Real.log 2+reversedBaseCost UT P τ _ _ t.2 b≤1300*(Nat.card K:ℝ)*P*(gS+gT+P) + change _≤1200*(Nat.card K:ℝ)*P*(gS+gT+P) at hc + nlinarith +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/BaseMessageCost.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/BaseMessageCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..1fd86df8c93e72a2c41ffec02d4cdbb7266d69e9 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/BaseMessageCost.lean @@ -0,0 +1,46 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.BaseAlphabetCost + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence SubsetEncoding CellVariance ScoreRegularity +open scoped Classical LinearAlgebra.Projectivization BigOperators NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +omit [FiniteDimensional K V] in +theorem baseMessage_cost (hdim : finrank K V=3) + (S U : Finset (ℙ K V)) (hS : S.Nonempty) (hSU : S⊆U) + (P τ : ℝ) (hP : 1≤P) (hτ : 0≤τ) (hτ1 : τ≤1) : + Real.log (Fintype.card (ℙ K V)+1:ℝ)+ + Real.log (Fintype.card (baseAlphabet U S.card P τ):ℝ)≤ + 110*(Nat.card K:ℝ)*P*(Real.log ((U.card:ℝ)/S.card)+P) := by + have hqN : 2≤Nat.card K := Finite.one_lt_card (α:=K) + have hq : (2:ℝ)≤Nat.card K := by exact_mod_cast hqN + have hqp : (0:ℝ) if h : (S b).Nonempty then uniformOn (S b) h else uniformType A +lemma freshBlockLaw_eq (S : B → Finset A) (hS : ∀ b, (S b).Nonempty) : + freshBlockLaw S = piLaw (fun b => uniformOn (S b) (hS b)) := by + simp only [freshBlockLaw, dite_eq_left (hS _)] + +def eraseBlock (S : B → Finset A) (s : B → A) : B → Finset A := fun b => (S b).erase (s b) + +omit [Fintype B] [Fintype A] [Nonempty A] in +lemma eraseBlock_card (S : B → Finset A) (s : B → A) (n : ℕ) + (hS : ∀ b, n+1 ≤ (S b).card) : ∀ b, n ≤ (eraseBlock S s b).card := by + intro b + have := hS b + simp only [eraseBlock, Finset.card_erase_eq_ite] + split_ifs <;> omega + +def blockAllInformation (p : Law (((B × A) ⊕ T) → β)) (S : B → Finset A) + (s : B → A) : ℝ := + (∑ b, ∑ a ∈ S b, (blockInformation p s b a : ℝ)) + + ∑ t, (middleInformation p s t : ℝ) + +omit [Nonempty A] in +lemma blockAllInformation_nonneg (p : Law (((B × A) ⊕ T) → β)) + (S : B → Finset A) (s : B → A) : 0 ≤ blockAllInformation p S s := by + exact add_nonneg (Finset.sum_nonneg fun _ _ => Finset.sum_nonneg fun _ _ => NNReal.coe_nonneg _) + (Finset.sum_nonneg fun _ _ => NNReal.coe_nonneg _) + +lemma blockAllInformation_mean_le (p : Law (((B × A) ⊕ T) → β)) + (S : B → Finset A) (hS : ∀ b, 2 ≤ (S b).card) : + mean (freshBlockLaw S) (blockAllInformation p S) ≤ + 2 * mean (freshBlockLaw S) (fun s => revealCost p (representativeSet s)) := by + have hn : ∀ b, (S b).Nonempty := fun b => Finset.card_pos.mp (by have := hS b; omega) + rw [freshBlockLaw_eq S hn] + exact unused_information_le_twice_cost p S hn hS + +def blockRoundMean + (J : Law (((B × A) ⊕ T) → β) → (B → Finset A) → (B → A) → ℝ) + (p : Law (((B × A) ⊕ T) → β)) (S : B → Finset A) : (n : ℕ) → Fin n → ℝ + | 0 => Fin.elim0 + | n+1 => Fin.cases (mean (freshBlockLaw S) (J p S)) (fun i => + mean (freshBlockLaw S) (fun s => mean (first (reveal p (representativeSet s))) + (fun a => blockRoundMean J (fiber (reveal p (representativeSet s)) a) + (eraseBlock S s) n i))) + +lemma blockRoundMean_nonneg + (J : Law (((B × A) ⊕ T) → β) → (B → Finset A) → (B → A) → ℝ) + (hJ : ∀ p S s, 0 ≤ J p S s) (p : Law (((B × A) ⊕ T) → β)) + (S : B → Finset A) (n : ℕ) (i : Fin n) : 0 ≤ blockRoundMean J p S n i := by + induction n generalizing p S with + | zero => exact Fin.elim0 i + | succ n ih => + cases i using Fin.cases with + | zero => exact mean_nonneg _ _ (hJ p S) + | succ i => + exact mean_nonneg _ _ fun s => mean_nonneg _ _ fun a => ih _ _ i + +omit [Nonempty A] in +lemma mean_reveal_budget (p : Law (((B × A) ⊕ T) → β)) (μ : Law (B → A)) : + mean μ (fun s => revealCost p (representativeSet s)) + + mean μ (fun s => mean (first (reveal p (representativeSet s))) + (fun a => totalCorrelation (fiber (reveal p (representativeSet s)) a))) ≤ + totalCorrelation p := by + rw [←mean_add] + apply le_trans (mean_mono μ (fun s => reveal_information_budget p (representativeSet s))) + exact (mean_const μ (totalCorrelation p)).le + +theorem block_information_telescope + (p : Law (((B × A) ⊕ T) → β)) (S : B → Finset A) + (n : ℕ) (hS : ∀ b, n+1 ≤ (S b).card) : + (∑ i : Fin n, blockRoundMean blockAllInformation p S n i) ≤ 2 * totalCorrelation p := by + induction n generalizing p S with + | zero => simpa using mul_nonneg (by norm_num : (0:ℝ) ≤ 2) (totalCorrelation_nonneg p) + | succ n ih => + have hsize : ∀ b, 2 ≤ (S b).card := fun b => by have := hS b; omega + have hn (s : B → A) : ∀ b, n+1 ≤ (eraseBlock S s b).card := + eraseBlock_card S s (n+1) hS + have hcost := blockAllInformation_mean_le p S hsize + have hbudget := mean_reveal_budget p (freshBlockLaw S) + simp only [blockRoundMean, Fin.sum_univ_succ, Fin.cases_zero, Fin.cases_succ] + have htail : + (∑ i : Fin n, mean (freshBlockLaw S) (fun s => mean (first (reveal p (representativeSet s))) + (fun a => blockRoundMean blockAllInformation (fiber (reveal p (representativeSet s)) a) + (eraseBlock S s) n i))) ≤ + 2 * mean (freshBlockLaw S) (fun s => mean (first (reveal p (representativeSet s))) + (fun a => totalCorrelation (fiber (reveal p (representativeSet s)) a))) := by + rw [←mean_sum] + simp_rw [←mean_sum] + calc + _ ≤ mean (freshBlockLaw S) (fun s => mean (first (reveal p (representativeSet s))) + (fun a => 2 * totalCorrelation (fiber (reveal p (representativeSet s)) a))) := by + apply mean_mono + intro s + apply mean_mono + intro a + exact ih _ _ (hn s) + _ = _ := by simp_rw [mean_smul] + linarith only [htail,hcost,hbudget] + +theorem exists_actual_pre_round (p : Law (((B × A) ⊕ T) → β)) + (S : B → Finset A) (n : ℕ) (hn : 0 0 < p a + +lemma mem_support (p : Law α) (a : α) : a ∈ support p ↔ 0 < p a := by simp [support] + +lemma outside_support (p : Law α) {a : α} (ha : a ∉ support p) : p a=0 := by + exact le_antisymm (le_of_not_gt (fun h => ha ((mem_support p a).mpr h))) (p.nonneg a) + +noncomputable def supportLaw (p : Law α) : Law (support p) where + mass a := p a.val + nonneg a := p.nonneg _ + sum_one := by + rw [Finset.sum_coe_sort (support p)] + calc + _ = ∑ a,p a := Finset.sum_subset (Finset.subset_univ _) (fun a _ ha => outside_support p ha) + _ = 1 := p.sum_one + +lemma map_supportLaw (p : Law α) : map (supportLaw p) Subtype.val = p := by + apply Law.ext + funext a + change (∑ b : support p,if b.val=a then p b.val else 0)=p a + rw [Finset.sum_coe_sort (support p) (fun b : α => if b=a then p b else 0)] + by_cases h : a ∈ support p + · simp [h] + · have hz := outside_support p h + simp [h,hz] + +theorem entropy_le_log_support (p : Law α) : entropy p ≤ Real.log (support p).card := by + have hh := entropy_le_log_card (supportLaw p) + have he := entropy_map_injective (supportLaw p) Subtype.val Subtype.val_injective + rw [map_supportLaw] at he + rw [←he] at hh + simpa only [Fintype.card_coe] using hh + +lemma entropy_support_cap (p : Law α) (N : ℝ) (hN : (support p).card ≤ N) : + entropy p ≤ Real.log N := by + have hc : (0:ℝ) < (support p).card := by + have he : Nonempty (support p) := by + by_contra h + have : IsEmpty (support p) := not_nonempty_iff.mp h + simpa using (supportLaw p).sum_one + have hh : 0<(support p).card := by simpa only [Fintype.card_coe] using Fintype.card_pos_iff.mpr he + exact_mod_cast hh + exact (entropy_le_log_support p).trans (Real.log_le_log hc hN) + +theorem entropy_first_lower_of_partners (p : Law (α × β)) (N : ℝ) + (hcap : ∀ a,0 < first p a → ((support (fiber p a)).card:ℝ) ≤ N) : + entropy p-Real.log N ≤ entropy (first p) := by + have hc : (∑ a,first p a*entropy (fiber p a)) ≤ Real.log N := by + calc + _ ≤ ∑ a,first p a*Real.log N := Finset.sum_le_sum fun a _ => by + by_cases h : first p a=0 + · simp only [h,zero_mul,le_refl] + · exact mul_le_mul_of_nonneg_left (entropy_support_cap (fiber p a) N + (hcap a (lt_of_le_of_ne ((first p).nonneg _) (Ne.symm h)))) ((first p).nonneg _) + _ = _ := by rw [←Finset.sum_mul,(first p).sum_one,one_mul] + rw [entropy_chain] + linarith + +noncomputable def eventProbability (p : Law α) (S : Finset α) : ℝ := ∑ a ∈ S,p a + +theorem heavy_atom_mass (p : Law α) (N K : ℝ) (hN : 0 < N) (hK : 0 < K) + (hcap : ((support p).card:ℝ) ≤ N) : + eventProbability p (Finset.univ.filter fun a => N*p a > Real.exp K) ≤ + (Real.log N-entropy p+1)/K := by + let E := Finset.univ.filter fun a => N*p a > Real.exp K + have hpoint (a : α) : + (if a ∈ E then K*p a else 0)-(if a ∈ support p then 1/N else 0) ≤ + p a*Real.log (N*p a) := by + by_cases hp : p a=0 + · have hE : a ∉ E := by simp only [E,Finset.mem_filter,Finset.mem_univ,true_and,hp,mul_zero]; exact (Real.exp_pos K).not_gt + have hs : a ∉ support p := by simp [mem_support,hp] + simp only [hp,hE,hs,ite_false,sub_zero,zero_mul,le_refl] + · have hp' := lt_of_le_of_ne (p.nonneg a) (Ne.symm hp) + have hs := (mem_support p a).mpr hp' + by_cases he : a ∈ E + · have hh : Real.exp K < N*p a := (Finset.mem_filter.mp he).2 + have hl : K ≤ Real.log (N*p a) := (Real.le_log_iff_exp_le (by positivity)).mpr hh.le + simp only [he,hs,ite_true] + nlinarith [mul_le_mul_of_nonneg_right hl (p.nonneg a),div_pos zero_lt_one hN] + · have hh := point_log_ratio (p a) (1/N) (p.nonneg a) (by positivity) (fun _ => by positivity) + have heq : p a/(1/N)=N*p a := by field_simp + rw [heq] at hh + simp only [he,hs,ite_false,ite_true,zero_sub] + nlinarith [p.nonneg a] + have h := Finset.sum_le_sum (s := Finset.univ) (fun a _ => hpoint a) + have hlog : (∑ a,p a*Real.log (N*p a))=Real.log N-entropy p := by + calc + _ = ∑ a,(p a*Real.log N+p a*Real.log (p a)) := by + apply Finset.sum_congr rfl + intro a _ + by_cases hp : p a=0 + · simp [hp] + · rw [Real.log_mul (ne_of_gt hN) hp] + ring + _ = _ := by rw [Finset.sum_add_distrib,←Finset.sum_mul,p.sum_one,one_mul]; simp only [entropy,sub_neg_eq_add] + rw [Finset.sum_sub_distrib,hlog] at h + have he : (∑ a,if a ∈ E then K*p a else 0)=K*eventProbability p E := by + rw [Finset.sum_ite_mem,Finset.univ_inter] + simp only [eventProbability,Finset.mul_sum] + have hs : (∑ a,if a ∈ support p then 1/N else 0)=((support p).card:ℝ)/N := by + rw [Finset.sum_ite_mem] + simp [div_eq_mul_inv] + rw [he,hs] at h + have hfrac : ((support p).card:ℝ)/N ≤ 1 := (div_le_one hN).mpr hcap + apply (le_div_iff₀ hK).mpr + dsimp [E] at h + nlinarith + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/BlockSelected.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/BlockSelected.lean new file mode 100644 index 0000000000000000000000000000000000000000..32438004f14c06c9563e7dd5c091532d9ba7f0a9 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/BlockSelected.lean @@ -0,0 +1,221 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.RevealDomains + +namespace OAI + +noncomputable section + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped Classical BigOperators +variable {B A T β : Type} [Fintype B] [Fintype A] [Fintype T] [Fintype β] [Nonempty A] +local instance : DecidableEq ((B × A) ⊕ T) := Classical.decEq _ +local instance (E : Finset ((B × A) ⊕ T)) : DecidableEq E := Classical.decEq _ + +theorem fresh_selected_fraction (S : B → Finset A) (r : ℕ) (hr : 0 ∑ b, f s b (s b)) ≤ + mean (freshBlockLaw S) (fun s => ∑ b, ∑ a ∈ S b, f s b a) := by + have hn : ∀ b, (S b).Nonempty := fun b => Finset.card_pos.mp (hr.trans_le (hS b)) + rw [freshBlockLaw_eq S hn] + simp only [mean_sum, Finset.mul_sum] + apply Finset.sum_le_sum + intro b _ + have hc : (r : ℝ) ≤ (S b).card := by exact_mod_cast hS b + have hnp : 0 ≤ mean (piLaw (fun b => uniformOn (S b) (hn b))) (fun s => f s b (s b)) := + mean_nonneg _ _ fun s => hf s b (s b) + exact (mul_le_mul_of_nonneg_right hc hnp).trans_eq (unused_selected_identity S hn f hown b) + +lemma blockRoundMean_smul + (J : Law (((B × A) ⊕ T) → β) → (B → Finset A) → (B → A) → ℝ) + (c : ℝ) (p : Law (((B × A) ⊕ T) → β)) (S : B → Finset A) (n : ℕ) (i : Fin n) : + blockRoundMean (fun p S s => c * J p S s) p S n i = c * blockRoundMean J p S n i := by + induction n generalizing p S with + | zero => exact Fin.elim0 i + | succ n ih => + cases i using Fin.cases with + | zero => exact mean_smul _ _ _ + | succ i => + simp only [blockRoundMean, Fin.cases_succ, ih, mean_smul] + +lemma blockRoundMean_compare + (J₁ J₂ : Law (((B × A) ⊕ T) → β) → (B → Finset A) → (B → A) → ℝ) + (P : Law (((B × A) ⊕ T) → β) → Prop) + (hP : ∀ p, P p → ∀ E a, P (fiber (reveal p E) a)) + (r : ℕ) + (hJ : ∀ p, P p → ∀ S, (∀ b, r ≤ (S b).card) → + mean (freshBlockLaw S) (J₁ p S) ≤ mean (freshBlockLaw S) (J₂ p S)) + (p : Law (((B × A) ⊕ T) → β)) (hp : P p) (S : B → Finset A) + (n : ℕ) (hS : ∀ b, r+n ≤ (S b).card) (i : Fin n) : + blockRoundMean J₁ p S n i ≤ blockRoundMean J₂ p S n i := by + induction n generalizing p S with + | zero => exact Fin.elim0 i + | succ n ih => + cases i using Fin.cases with + | zero => exact hJ p hp S (fun b => by have := hS b; omega) + | succ i => + apply mean_mono + intro s + apply mean_mono + intro a + apply ih _ (hP p hp _ a) _ + exact eraseBlock_card S s (r+n) (fun b => by have := hS b; omega) + +def blockSelectedInformation (p : Law (((B × A) ⊕ T) → β)) (_S : B → Finset A) + (s : B → A) : ℝ := ∑ b, (blockInformation p s b (s b) : ℝ) + +def blockSelectedDeficit (J : ℝ) (p : Law (((B × A) ⊕ T) → β)) (_S : B → Finset A) + (s : B → A) : ℝ := ∑ b, (J - entropy (map p (fun x => x (Sum.inl (b,s b))))) + +lemma blockSelectedInformation_mean (p : Law (((B × A) ⊕ T) → β)) + (S : B → Finset A) (r : ℕ) (hr : 0 (blockInformation p s b a : ℝ)) (fun _ _ _ => NNReal.coe_nonneg _) + (fun s b a i => congrArg NNReal.toReal (blockInformation_own_independent p s b a i))).trans + apply mean_mono + intro s + exact le_add_of_nonneg_right (Finset.sum_nonneg fun _ _ => NNReal.coe_nonneg _) + +omit [Nonempty A] in +lemma blockAllDeficit_eq (J : ℝ) (p : Law (((B × A) ⊕ T) → β)) (S : B → Finset A) + (s : B → A) : blockAllDeficit J p S s = + (∑ b, ∑ a ∈ S b, (J - entropy (map p (fun x => x (Sum.inl (b,a)))))) + + ∑ t, (J - entropy (map p (fun x => x (Sum.inr t)))) := by + unfold blockAllDeficit marginalDeficit + have he : (∑ i, if i ∈ blockActive S then + (J - entropy (map p (fun x => x i))) else 0) = + (∑ b, ∑ a ∈ S b, (J - entropy (map p (fun x => x (Sum.inl (b,a)))))) + + ∑ t, (J - entropy (map p (fun x => x (Sum.inr t)))) := by + rw [Fintype.sum_sum_type,Fintype.sum_prod_type] + apply congrArg₂ (·+·) + · apply Finset.sum_congr rfl + intro b _ + simp only [mem_blockActive_left,Finset.sum_ite_mem,Finset.univ_inter] + · apply Finset.sum_congr rfl + intro t _ + rw [ite_eq_left (mem_blockActive_right S t)] + simpa only [Finset.sum_ite_mem,Finset.univ_inter] using he + +lemma blockSelectedDeficit_mean (J : ℝ) (D : ((B × A) ⊕ T) → Finset β) + (hJ : ∀ i, Real.log (D i).card ≤ J) + (p : Law (((B × A) ⊕ T) → β)) (hp : InDomains p D) + (S : B → Finset A) (r : ℕ) (hr : 0 J - entropy (map p (fun x => x (Sum.inl (b,a))))) + (fun _ b a => sub_nonneg.mpr (hp.entropy_cap J hJ _)) (fun _ _ _ _ => rfl)).trans + apply mean_mono + intro s + rw [blockAllDeficit_eq] + exact le_add_of_nonneg_right (Finset.sum_nonneg fun t _ => sub_nonneg.mpr (hp.entropy_cap J hJ _)) + +theorem block_round_selected_information (p : Law (((B × A) ⊕ T) → β)) + (S : B → Finset A) (r n : ℕ) (hr : 0 True) (fun _ _ _ _ => trivial) r _ p trivial S n hS i + intro p _ S hS + rw [mean_smul] + exact blockSelectedInformation_mean p S r hr hS + +theorem block_round_selected_deficit (J : ℝ) (D : ((B × A) ⊕ T) → Finset β) + (hJ : ∀ i, Real.log (D i).card ≤ J) (p : Law (((B × A) ⊕ T) → β)) + (hp : InDomains p D) (S : B → Finset A) (r n : ℕ) (hr : 0 InDomains p D) (fun _ hp E a => hp.fiber E a) + r _ p hp S n hS i + intro p hp S hS + rw [mean_smul] + exact blockSelectedDeficit_mean J D hJ p hp S r hr hS +end + +open scoped Classical BigOperators +variable {α β γ : Type*} [Fintype α] [Fintype β] [Fintype γ] + +lemma conditionOn_le (p : Law α) (E : Finset α) (hE : 0hE.not_gt hn.2) |>.1⟩ + · exact (lt_irrefl 0 ha).elim + +lemma map_conditionOn_le (p : Law α) (E : Finset α) (hE : 0le_antisymm (hn a) (p.nonneg a) + simp [hz] at this + obtain ⟨a,ha⟩:=hex + have hh : mean p f< mean p (fun _=>mean p f) := by + apply Finset.sum_lt_sum + · intro b _ + by_cases hb : 0

eventMass p (E t))) : + ∃ t,0eventMass p (E t)) + exact ⟨t,ht,havg.trans he⟩ +end SharpRamseyFive.FiniteEntropy + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/CapDecoder.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/CapDecoder.lean new file mode 100644 index 0000000000000000000000000000000000000000..68990578379107d5f6eef2381b8792e503447fd3 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/CapDecoder.lean @@ -0,0 +1,137 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.FreshValidation + +namespace OAI + +section +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical +variable {A : Type*} + +lemma firstAccepted_index {n : ℕ} (E : Finset A) (t : Fin n→A) {a : A} + (ha : firstAccepted E t=some a) : ∃i,t i=a ∧ a∈E := by + induction n with + | zero => simp [firstAccepted] at ha + | succ n ih => + rw [firstAccepted] at ha + split_ifs at ha with h + · have he := Option.some.inj ha + exact ⟨0,he,he ▸ h⟩ + · obtain ⟨i,hi,hm⟩ := ih _ ha + exact ⟨i.succ,hi,hm⟩ + +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical BigOperators +variable {A B : Type*} [Fintype B] + +lemma cap_subset (R : A→B→Prop) (U : Finset A) {n : ℕ} (q : ℝ) (row : Fin n→B) : + cap R U q row⊆U := Finset.filter_subset _ _ + +theorem validation_decode (R : A→B→Prop) (S U : Finset A) (C : Finset B) + (n N : ℕ) (q M : ℝ) (t : Fin N→Fin n→B) (row : Fin n→B) + (hrow : firstAccepted (validationRows R S U C n q M) t=some row) : + ∃i : Fin N, cap R U q (t i)⊆U ∧ + ((cap R U q (t i)).card:ℝ) ≤ M ∧ + (9:ℝ)/10*S.card ≤ (S∩cap R U q (t i)).card := by + obtain ⟨i,hi,hm⟩ := firstAccepted_index _ _ hrow + refine ⟨i,cap_subset _ _ _ _,?_⟩ + rw [hi] + exact (Finset.mem_filter.mp hm).2.2 + +theorem reverse_decode (R : A→B→Prop) (S U : Finset A) (hSU : S⊆U) + (C : Finset B) (n N : ℕ) (hn : 0 < n) (q κ M : ℝ) (hq : 0 < q) + (hC : ∀b∈C,((S.filter fun a=>R a b).card:ℝ) ≤ κ*S.card) + (t : Fin N→Fin n→B) (row : Fin n→B) + (hrow : firstAccepted (successfulRows R U C n q M) t=some row) : + ∃i : Fin N, cap R U q (t i)⊆U ∧ + ((cap R U q (t i)).card:ℝ) ≤ M ∧ + (1-5*q*κ)*S.card ≤ (S∩cap R U q (t i)).card := by + obtain ⟨i,hi,hm⟩ := firstAccepted_index _ _ hrow + refine ⟨i,cap_subset _ _ _ _,?_⟩ + rw [hi] + have hh := (Finset.mem_filter.mp hm).2 + exact ⟨hh.2,deterministic_capture R S U hSU C hn q κ hq hC row hh.1⟩ + +end SharpRamseyFive.ReverseCap + +end + +namespace SharpRamseyFive.FiniteEntropy +open scoped BigOperators Classical +variable {α : Type*} [Fintype α] + +lemma uniform_source_fraction (A X H : Finset α) (hA : A.Nonempty) (hAX : A⊆X) + (c : ℝ) (hc : 0 (1/(5*q))*h≤hits H x).image some) ≤ + (50*q/(9*c))*(((H∩X).card:ℝ)/X.card) := by + let b : ℝ := 1/(5*q) + have hb : 0 b*h≤hits H x) hsource hepos + have hi := iid_test_rejection (uniformOn A hA) H h hh b hb + have hs := uniform_source_fraction A X H hA hAX c hc hsize + have hnum : eventMass (iid (uniformOn A hA) (Fin h)) + (Finset.univ.filter fun x => b*h≤hits H x) ≤ + (((H∩X).card:ℝ)/(c*X.card))/b := + hi.trans (div_le_div_of_nonneg_right hs hb.le) + have hd := div_le_div₀ (by positivity) hnum (by norm_num : (0:ℝ)<9/10) hE + have hnX : (0:ℝ) (1/(5*q))*h≤hits H x).image some) else 0)) ≤ + (50*q/(9*c))*(∑ θ,p θ*(((H∩X θ).card:ℝ)/(X θ).card)) := by + rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro θ _ + have hf := fresh_test_domination (A θ) (X θ) (W θ) H (hA θ) (hW θ) + (hAW θ) (hAX θ) q c hq hc (hsize θ) h N hh hN (E θ) (hsource θ) (hE θ) + by_cases hr : ready θ + · rw [ite_eq_left hr] + calc + _ ≤ p θ*((50*q/(9*c))*(((H∩X θ).card:ℝ)/(X θ).card)) := + mul_le_mul_of_nonneg_left hf (p.nonneg θ) + _ = _ := by ring + · rw [ite_eq_right hr,mul_zero] + exact mul_nonneg (by positivity) (mul_nonneg (p.nonneg θ) (by positivity)) + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/ChronologicalCapDomination.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/ChronologicalCapDomination.lean new file mode 100644 index 0000000000000000000000000000000000000000..4b7897d59a552699ae20e831a66305c057d09c0d --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/ChronologicalCapDomination.lean @@ -0,0 +1,99 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.TwoPublicCaps +import OAI.Combinatorics.RamseyFive.Decoding.ProducedCapExclusion + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {α β : Type*} [Fintype α] [Fintype β] +lemma adaptive_event_first (p : Law α) (next : α→Law β) (P : α→Prop) : + eventMass (adaptiveLaw p next) (Finset.univ.filter fun ab=>P ab.1)= + eventMass p (Finset.univ.filter P) := by + simp only [eventMass,Finset.sum_filter,Fintype.sum_prod_type,adaptiveLaw] + apply Finset.sum_congr rfl + intro a _ + by_cases h : P a + · simp only [h,ite_true,←Finset.mul_sum,(next a).sum_one,mul_one] + · simp [h] + +lemma adaptive_event_second (p : Law α) (next : α→Law β) (P : β→Prop) : + eventMass (adaptiveLaw p next) (Finset.univ.filter fun ab=>P ab.2)= + ∑a,p a*eventMass (next a) (Finset.univ.filter P) := by + simp only [eventMass,Finset.sum_filter,Fintype.sum_prod_type,adaptiveLaw, + Finset.mul_sum,mul_ite,mul_zero] + +lemma adaptive_event_second_le (p : Law α) (next : α→Law β) (P : β→Prop) + (B : ℝ) (h : ∀a,eventMass (next a) (Finset.univ.filter P)≤B) : + eventMass (adaptiveLaw p next) (Finset.univ.filter fun ab=>P ab.2)≤B := by + rw [adaptive_event_second] + calc + _ ≤ ∑a,p a*B := Finset.sum_le_sum fun a _=>mul_le_mul_of_nonneg_left (h a) (p.nonneg a) + _ = B := by rw [←Finset.sum_mul,p.sum_one,one_mul] +end SharpRamseyFive.FiniteEntropy +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical +lemma excludes_pure_none {A : Type*} [Fintype A] (a : A) : + eventMass (pureLaw (none : Option (Finset A))) (Finset.univ.filter (Excludes a))=0 := by + unfold eventMass + apply Finset.sum_eq_zero + intro Y hY + have h := (Finset.mem_filter.mp hY).2 + cases Y <;> simp_all [Excludes,pureLaw] +end SharpRamseyFive.ReverseCap +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem nextCapLaw_domination {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (hq : 3≤Nat.card K) (A UA : Finset (ℙ K V)) (hA : A.Nonempty) (hAU : A⊆UA) + (B UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) + (hsparse : 1000*(Nat.card K:ℝ)*incidences A B≤(9:ℝ)/10*A.card*B.card) + (n : ℕ) (hn : 0 + change eventMass (pureLaw (none : Option (Finset (ℙ K V)))) + (Finset.univ.filter (Excludes a))≤_ + rw [excludes_pure_none] + positivity + | some Y => + dsimp only [nextCapLaw] + split_ifs with hY + · have hC := hY.source_nonempty hB + exact publicCapLaw_domination Incident A UA (B∩Y) B Y hC + (hC.mono Finset.inter_subset_right) Finset.inter_subset_right Finset.inter_subset_left + n hn (Nat.card K) (9/10) _ hq0 (by norm_num) hY.2.2 + (geometric_validation_mass hdim hd hq A UA hA hAU B (B∩Y) hC + Finset.inter_subset_left (9/10) (by norm_num) (by norm_num) hY.2.2 hsparse n hn hlen) a ha + · rw [excludes_pure_none] + positivity + +theorem second_cap_unconditioned {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (hq : 3≤Nat.card K) (A UA : Finset (ℙ K V)) (hA : A.Nonempty) (hAU : A⊆UA) + (B UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) + (hsparse : 1000*(Nat.card K:ℝ)*incidences A B≤(9:ℝ)/10*A.card*B.card) + (n : ℕ) (hn : 0Excludes a caps.2))≤ + (50*(Nat.card K:ℝ)/(9*((9:ℝ)/10)))*(((B.filter (Incident a)).card:ℝ)/B.card) := by + apply adaptive_event_second_le + intro Y + exact nextCapLaw_domination hdim hd hq A UA hA hAU B UB hB hsparse n hn hlen MB Y a ha + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/ClassExtraction.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/ClassExtraction.lean new file mode 100644 index 0000000000000000000000000000000000000000..ebd5d795ffbeca46c3c46a04313d95d79b0102ea --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/ClassExtraction.lean @@ -0,0 +1,92 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.OrderedExtraction +import OAI.Combinatorics.RamseyFive.Entropy.ClassSelection + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {κ α β : Type*} [Fintype κ] [Fintype α] [Fintype β] +local instance classExtractκDE : DecidableEq κ := Classical.decEq _ +local instance classExtractαDE : DecidableEq α := Classical.decEq _ +local instance classExtractβDE : DecidableEq β := Classical.decEq _ +local instance classExtractFinDE (n : ℕ) : DecidableEq (Fin n) := Classical.decEq _ + +lemma conditionOn_mean_le_pos (p : Law α) (E : Finset α) (hE : 0 < eventMass p E) + (f : α→ℝ) (hf : ∀ a,0 < p a → 0 ≤ f a) : + mean (conditionOn p E hE) f ≤ mean p f/eventMass p E := by + simp only [mean,Finset.sum_div] + apply Finset.sum_le_sum + intro a _ + by_cases hp : 0 < p a + · simpa only [div_mul_eq_mul_div] using + mul_le_mul_of_nonneg_right (conditionOn_le p E hE a) (hf a hp) + · have hz : p a=0 := le_antisymm (le_of_not_gt hp) (p.nonneg a) + have hz' : conditionOn p E hE a=0 := by simp [conditionOn_apply,hz] + simp only [hz,hz',zero_mul,zero_div,le_refl] + +lemma conditionContext_first (p : Law (κ×α)) (E : Finset κ) + (hE : 0 < eventMass (first p) E) : + first (conditionContext p E hE)=conditionOn (first p) E hE := by + apply Law.ext + funext c + simp only [conditionContext,first,adaptiveLaw,←Finset.mul_sum,(fiber p c).sum_one,mul_one] + +def selectedClassIndices {n l : ℕ} (hl : l ≤ n) (U : κ→Finset (Fin n)) + (code : κ→Fin n→α) (a : α) (c : κ) : Fin l ↪o Fin n := + retainedIndices hl (classPositions (U c) (code c) a) + +def selectedClassEvent {n : ℕ} (l : ℕ) (U : κ→Finset (Fin n)) + (code : κ→Fin n→α) (a : α) : Finset κ := + Finset.univ.filter fun c=>l ≤ (classPositions (U c) (code c) a).card + +omit [Fintype α] in +lemma selectedClassIndices_properties {n l : ℕ} (hl : l ≤ n) (U : κ→Finset (Fin n)) + (code : κ→Fin n→α) (a : α) (c : κ) (hc : c∈selectedClassEvent l U code a) + (i : Fin l) : selectedClassIndices hl U code a c i∈U c ∧ + code c (selectedClassIndices hl U code a c i)=a := by + have hi:=retainedIndices_mem hl (classPositions (U c) (code c) a) + (Finset.mem_filter.mp hc).2 i + exact Finset.mem_filter.mp hi + +omit [Fintype α] in +theorem selectedClass_deficit {n l : ℕ} (hl : l ≤ n) (p : Law (κ×(Fin n→β))) + (U : κ→Finset (Fin n)) (code : κ→Fin n→α) (a : α) + (hE : 0 < eventMass (first p) (selectedClassEvent l U code a)) (J : ℝ) + (hnonneg : ∀ c,0 < first p c → 0 ≤ activeDeficit (fiber p c) (U c) J) + (hfix : ∀ c,0 < first p c → FixedOutside (fiber p c) (U c)) + (hcap : ∀ c,0 < first p c → ∀ i∈U c,entropy (map (fiber p c) (fun x=>x i)) ≤ J) : + let q:=conditionContext p (selectedClassEvent l U code a) hE + let f:=fun c=>(selectedClassIndices hl U code a c).toEmbedding + mean (first (selectByContext q (fun c=>(f c : Fin l→Fin n)))) + (fun c=>(l:ℝ)*J-entropy (fiber (selectByContext q (fun c=>(f c : Fin l→Fin n))) c)) ≤ + mean (first p) (fun c=>activeDeficit (fiber p c) (U c) J)/ + eventMass (first p) (selectedClassEvent l U code a) := by + dsimp only + let E:=selectedClassEvent l U code a + let q:=conditionContext p E hE + have hpos (c : κ) (hc : 0 < first q c) : c∈E ∧ 0 < first p c := by + rw [conditionContext_first] at hc + exact conditionOn_positive (first p) E hE c hc + have hfib (c : κ) (hc : 0 < first q c) : fiber q c=fiber p c := by + apply conditionContext_fiber + rwa [←conditionContext_first] + have hh:=selectByContext_deficit q U + (fun c=>(selectedClassIndices hl U code a c).toEmbedding) J + (fun c hc i=>(selectedClassIndices_properties hl U code a c (hpos c hc).1 i).1) + (fun c hc=>by rw [hfib c hc];exact hfix c (hpos c hc).2) + (fun c hc i hi=>by rw [hfib c hc];exact hcap c (hpos c hc).2 i hi) + simp only [Fintype.card_fin] at hh + apply hh.trans + calc + _ = mean (conditionOn (first p) E hE) (fun c=>activeDeficit (fiber p c) (U c) J) := by + rw [←conditionContext_first] + apply le_antisymm <;> apply mean_mono_pos + · intro c hc; rw [hfib c hc] + · intro c hc; rw [hfib c hc] + _ ≤ _ := conditionOn_mean_le_pos (first p) E hE _ hnonneg +end +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/ClassSelection.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/ClassSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..dc4808df5156ca1699b161da2dac8aff44f98248 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/ClassSelection.lean @@ -0,0 +1,190 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.FiniteKernels +import OAI.Combinatorics.RamseyFive.Entropy.SubsetDeficit + +namespace OAI + +noncomputable section + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped Classical BigOperators +variable {Ω ι κ : Type*} [Fintype Ω] [Fintype κ] [Nonempty κ] + +def classPositions (S : Finset ι) (c : ι → κ) (a : κ) : Finset ι := S.filter (fun i=>c i=a) + +lemma exists_large_class (S : Finset ι) (c : ι → κ) (r : ℕ) + (h : Fintype.card κ*r ≤ S.card) : ∃ a,r ≤ (classPositions S c a).card := by + obtain ⟨a,_,ha⟩:=Finset.exists_le_card_fiber_of_mul_le_card_of_maps_to + (s:=S) (t:=Finset.univ) (f:=c) (fun _ _=>Finset.mem_univ _) Finset.univ_nonempty + (by simpa using h) + exact ⟨a,ha⟩ + +theorem fixed_large_class (p : Law Ω) (S : Ω → Finset ι) (c : Ω → ι → κ) (r : ℕ) + (h : ∀ ω,0 < p ω → Fintype.card κ*r ≤ (S ω).card) : + ∃ a,(1:ℝ)/Fintype.card κ ≤ + eventMass p (Finset.univ.filter fun ω=>r ≤ (classPositions (S ω) (c ω) a).card) := by + let choose : Ω → κ := fun ω=>if hp : 0 < p ω then + (exists_large_class (S ω) (c ω) r (h ω hp)).choose else Classical.choice inferInstance + have hchoose : ∀ ω,0 < p ω → r ≤ (classPositions (S ω) (c ω) (choose ω)).card := by + intro ω hp + simp only [choose,dite_eq_left hp] + exact (exists_large_class (S ω) (c ω) r (h ω hp)).choose_spec + have hex : ∃ a,(1:ℝ)/Fintype.card κ ≤ map p choose a := by + have hcard : (0:ℝ) < Fintype.card κ := by exact_mod_cast Fintype.card_pos + by_contra! hh + have hs : (∑ a,map p choose a) < ∑ _a:κ,(1:ℝ)/Fintype.card κ := + Finset.sum_lt_sum_of_nonempty Finset.univ_nonempty (fun a _=>hh a) + rw [(map p choose).sum_one] at hs + have he : (∑ _a:κ,(1:ℝ)/Fintype.card κ)=1 := by simp [hcard.ne'] + rw [he] at hs + exact lt_irrefl _ hs + obtain ⟨a,ha⟩:=hex + refine ⟨a,ha.trans ?_⟩ + simp only [eventMass, Finset.sum_filter] + change (∑ ω,if choose ω=a then p ω else 0) ≤ + ∑ ω,if r ≤ (classPositions (S ω) (c ω) a).card then p ω else 0 + apply Finset.sum_le_sum + intro ω _ + by_cases hp : 0 < p ω + · by_cases he : choose ω=a + · have hω : ω∈Finset.univ.filter (fun ω=>r ≤ (classPositions (S ω) (c ω) a).card) := by + apply Finset.mem_filter.mpr + exact ⟨Finset.mem_univ _,he ▸ hchoose ω hp⟩ + rw [ite_eq_left he,ite_eq_left ((Finset.mem_filter.mp hω).2)] + · rw [ite_eq_right he] + split_ifs <;> first | exact p.nonneg ω | exact le_rfl + · have hz : p ω=0 := le_antisymm (le_of_not_gt hp) (p.nonneg ω) + simp only [hz,ite_self,le_refl] + +variable {α β : Type*} [Fintype α] [Fintype β] + +def conditionContext (p : Law (α×β)) (E : Finset α) (hE : 0 < eventMass (first p) E) : + Law (α×β) := adaptiveLaw (conditionOn (first p) E hE) (fiber p) + +lemma conditionContext_fiber (p : Law (α×β)) (E : Finset α) + (hE : 0 < eventMass (first p) E) (a : α) (ha : 0 < conditionOn (first p) E hE a) : + fiber (conditionContext p E hE) a=fiber p a := fiber_adaptive _ _ _ ha + +lemma conditionContext_mass (p : Law (α×β)) (E : Finset α) + (hE : 0 < eventMass (first p) E) (a : α) (b : β) : + conditionContext p E hE (a,b)=if a∈E then p (a,b)/eventMass (first p) E else 0 := by + change conditionOn (first p) E hE a*fiber p a b=_ + rw [conditionOn_apply] + split_ifs + · rw [div_mul_eq_mul_div,←mass_eq_first_mul_fiber] + · exact zero_mul _ + +lemma conditionContext_pointwise (p : Law (α×β)) (E : Finset α) + (hE : 0 < eventMass (first p) E) (z : α×β) : + conditionContext p E hE z ≤ p z/eventMass (first p) E := by + rw [conditionContext_mass] + split_ifs + · rfl + · exact div_nonneg (p.nonneg _) hE.le + +lemma conditionContext_positive (p : Law (α×β)) (E : Finset α) + (hE : 0 < eventMass (first p) E) (z : α×β) (hz : 0 < conditionContext p E hE z) : + z.1∈E ∧ 0 < p z := by + rw [conditionContext_mass] at hz + split_ifs at hz with he + · exact ⟨he,(div_pos_iff.mp hz).resolve_right (fun h=>hE.not_gt h.2) |>.1⟩ + · exact (lt_irrefl _ hz).elim + +end + +open scoped Classical BigOperators +variable {I J β κ : Type*} [Fintype I] [Fintype J] [Fintype β] [Fintype κ] +local instance contextRestrictIDecEq : DecidableEq I := Classical.decEq _ +local instance contextRestrictJDecEq : DecidableEq J := Classical.decEq _ +local instance contextRestrictSubtypeDecEq (S : Finset I) : DecidableEq S := Classical.decEq _ + +def embeddingRange (f : J↪I) : Finset I := Finset.univ.image f + +def embeddingRangeEquiv (f : J↪I) : J≃embeddingRange f := + Equiv.ofBijective (fun j=>⟨f j,Finset.mem_image.mpr ⟨j,Finset.mem_univ _,rfl⟩⟩) + ⟨fun a b h=>f.injective (congrArg Subtype.val h),by + intro z + obtain ⟨j,_,hj⟩:=Finset.mem_image.mp z.property + exact ⟨j,Subtype.ext hj⟩⟩ + +omit [Fintype I] in +lemma embeddingRange_card (f : J↪I) : (embeddingRange f).card=Fintype.card J := by + unfold embeddingRange + rw [Finset.card_image_of_injective _ f.injective,Finset.card_univ] + +lemma entropy_reindex_range (p : Law (I→β)) (f : J↪I) : + entropy (map p (fun x=>x ∘ f))= + entropy (map p (fun x=>fun i : embeddingRange f=>x i.val)) := by + let e:=embeddingRangeEquiv f + have hinj : Function.Injective (fun x : embeddingRange f→β=>x ∘ e) := by + intro x y h + funext i + obtain ⟨j,rfl⟩:=e.surjective i + exact congrFun h j + have hh:=entropy_map_injective (map p (fun x=>fun i : embeddingRange f=>x i.val)) + (fun x=>x ∘ e) hinj + rw [map_comp] at hh + exact hh + +theorem reindexed_deficit_le (p : Law (I→β)) (U : Finset I) (f : J↪I) + (hf : ∀ j,f j∈U) (hfix : FixedOutside p U) (cap : ℝ) + (hc : ∀ i∈U,entropy (map p (fun x=>x i))≤cap) : + Fintype.card J*cap-entropy (map p (fun x=>x ∘ f))≤activeDeficit p U cap := by + rw [entropy_reindex_range,←embeddingRange_card f] + apply subset_deficit_le_active p U _ _ hfix cap hc + intro i hi + obtain ⟨j,_,rfl⟩:=Finset.mem_image.mp hi + exact hf j + +def selectByContext (p : Law (κ×(I→β))) (f : κ→J→I) : Law (κ×(J→β)) := + map p (fun z=>(z.1,z.2 ∘ f z.1)) + +lemma selectByContext_adaptive (p : Law (κ×(I→β))) (f : κ→J→I) : + selectByContext p f=adaptiveLaw (first p) (fun c=>map (fiber p c) (fun x=>x ∘ f c)) := by + apply Law.ext_mean + intro g + rw [selectByContext,mean_map,mean_adaptive] + simp_rw [mean_map] + have he:=congrArg (fun q=>mean q (fun z=>g (z.1,z.2 ∘ f z.1))) (adaptive_reconstruct p) + rw [mean_adaptive] at he + exact he.symm + +lemma selectByContext_first (p : Law (κ×(I→β))) (f : κ→J→I) : + first (selectByContext p f)=first p := by + rw [selectByContext_adaptive] + apply Law.ext + funext c + simp only [first,adaptiveLaw,←Finset.mul_sum,(map (fiber p c) _).sum_one,mul_one] + +lemma selectByContext_fiber (p : Law (κ×(I→β))) (f : κ→J→I) + (c : κ) (hc : 0x ∘ f c) := by + rw [selectByContext_adaptive] + exact fiber_adaptive _ _ _ hc + +lemma reindexed_domains (p : Law (I→β)) (D : I→Finset β) (hp : InDomains p D) (f : J→I) : + InDomains (map p (fun x=>x ∘ f)) (fun j=>D (f j)) := by + intro y hy j + obtain ⟨x,hx,rfl⟩:=map_positive _ _ y hy + exact hp x hx (f j) + +theorem selectByContext_deficit (p : Law (κ×(I→β))) (U : κ→Finset I) + (f : κ→J↪I) (cap : ℝ) (hsel : ∀ c,0x i))≤cap) : + mean (first (selectByContext p (fun c=>(f c : J→I)))) + (fun c=>Fintype.card J*cap-entropy (fiber (selectByContext p (fun c=>(f c : J→I))) c))≤ + mean (first p) (fun c=>activeDeficit (fiber p c) (U c) cap) := by + rw [selectByContext_first] + apply mean_mono_pos + intro c hp + rw [selectByContext_fiber _ _ _ hp] + exact reindexed_deficit_le _ _ _ (hsel c hp) (hfix c hp) cap (hc c hp) + +end SharpRamseyFive.FiniteEntropy + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/ClippedWeight.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/ClippedWeight.lean new file mode 100644 index 0000000000000000000000000000000000000000..71fc8e71009fb287242adb392a34c1d9b2d7f0be --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/ClippedWeight.lean @@ -0,0 +1,121 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.LargeValueCount +import OAI.Combinatorics.RamseyFive.Iteration.Scale + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreRegularity +open Module ProjectiveIncidence CellVariance PencilRegularity +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def clippedWeight {J : Type*} [Fintype J] (S : Finset (ℙ K V)) + (C : J→Finset (ℙ K V)) : Option (Option J)→ℙ K (Dual K V)→ℝ + | none,H => if H∈exceptional S C then 1 else 0 + | some j,H => min 1 ((deviation S C j H)^2) + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] in +lemma clippedWeight_bounds {J : Type*} [Fintype J] (S : Finset (ℙ K V)) + (C : J→Finset (ℙ K V)) (j : Option (Option J)) (H : ℙ K (Dual K V)) : + 0≤clippedWeight S C j H ∧ clippedWeight S C j H≤1 := by + cases j with + | none => simp only [clippedWeight]; split <;> norm_num + | some j => exact ⟨le_min (by norm_num) (sq_nonneg _),min_le_left _ _⟩ + +lemma clippedWeight_sum_bound {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + {J : Type*} [Fintype J] (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) + (hS : S.Nonempty) (hC : (∑ j,(C j).card)≤3*S.card) : + (∑ j : Option (Option J),∑ H,clippedWeight S C j H)≤ + 50000*(Nat.card K:ℝ)*scale (K:=K) d S.card := by + rw [Fintype.sum_option] + have hi : (∑ H,clippedWeight S C none H)=((exceptional S C).card:ℝ) := by + simp [clippedWeight] + rw [hi] + have hc : (∑ j : Option J,∑ H,clippedWeight S C (some j) H)≤ + ∑ j : Option J,∑ H,(deviation S C j H)^2 := + Finset.sum_le_sum fun j _ => Finset.sum_le_sum fun H _ => min_le_right _ _ + have he := exceptional_card_bound hdim hd S C hS hC + have hv := total_deviation_bound hdim hd S C hS hC + have hB := scale_nonneg (K:=K) d (S.card:ℝ) (Nat.cast_nonneg _) + nlinarith [mul_nonneg (Nat.cast_nonneg (Nat.card K) : (0:ℝ)≤Nat.card K) hB] + +lemma mean_ratio_le {d : ℕ} (hd : 1≤d) : + ((Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d)≤1/(Nat.card K:ℝ) := by + have hq : (0:ℝ) ∃ j : Option (Option J), + scale (K:=K) d S.card*Real.exp ξ < weightOnPencil (clippedWeight S C j) x + +theorem irregular_card_bound {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + {J : Type*} [Fintype J] (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) + (hS : S.Nonempty) (hC : (∑ j,(C j).card)≤3*S.card) + {ξ : ℝ} (hξ : 100000≤Real.exp ξ) : + ((irregular (d:=d) S C ξ).card:ℝ)≤200000*(S.card:ℝ)*Real.exp (-2*ξ) := by + let B : ℝ := scale (K:=K) d S.card + let w := clippedWeight S C + have hn : (0:ℝ) (clippedWeight_bounds S C j H).1 + have htotal := clippedWeight_sum_bound hdim hd S C hS hC + have hmean (j : Option (Option J)) : + ((Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d)*(∑ H,w j H) ≤ B*Real.exp ξ/2 := by + have hs : (∑ H,w j H)≤∑ i : Option (Option J),∑ H,w i H := + Finset.single_le_sum (fun i _ => Finset.sum_nonneg fun H _ => hw i H) (Finset.mem_univ j) + have hc : ((Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d)≥0 := by positivity + calc + _ ≤ (1/(Nat.card K:ℝ))*(∑ H,w j H) := + mul_le_mul_of_nonneg_right (mean_ratio_le (K:=K) hd) (Finset.sum_nonneg fun H _ => hw j H) + _ ≤ (1/(Nat.card K:ℝ))*(50000*(Nat.card K:ℝ)*B) := + mul_le_mul_of_nonneg_left (hs.trans htotal) (by positivity) + _ = 50000*B := by field_simp + _ ≤ _ := by nlinarith + have hr := family_irregular_count hdim hd w hw + (fun j H => (clippedWeight_bounds S C j H).2) (B*Real.exp ξ) (by positivity) hmean + have hcard : ((irregular (d:=d) S C ξ).card:ℝ)≤ + ((Finset.univ.filter fun x : ℙ K V => ∃ j : Option (Option J), + B*Real.exp ξ≤weightOnPencil (w j) x).card:ℝ) := by + apply Nat.cast_le.mpr + apply Finset.card_le_card + intro x hx + obtain ⟨j,hj⟩ := (Finset.mem_filter.mp hx).2 + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,j,hj.le⟩ + have hp : (Nat.card K:ℝ)^(d-1)*(Nat.card K:ℝ)=(Nat.card K:ℝ)^d := by + rw [←pow_succ]; congr 1; omega + have he : (Nat.card K:ℝ)^d=B*S.card := by dsimp [B,scale]; field_simp + have hb : ((irregular (d:=d) S C ξ).card:ℝ)*(B*Real.exp ξ)^2≤ + 200000*(S.card:ℝ)*B^2 := by + calc + _ ≤ 4*(Nat.card K:ℝ)^(d-1)*(∑ j,∑ H,w j H) := + (mul_le_mul_of_nonneg_right hcard (sq_nonneg _)).trans hr + _ ≤ 4*(Nat.card K:ℝ)^(d-1)*(50000*(Nat.card K:ℝ)*B) := + mul_le_mul_of_nonneg_left htotal (by positivity) + _ = _ := by rw [show 4*(Nat.card K:ℝ)^(d-1)*(50000*(Nat.card K:ℝ)*B)= + 200000*((Nat.card K:ℝ)^(d-1)*(Nat.card K:ℝ))*B by ring,hp,he]; ring + have hb' : ((irregular (d:=d) S C ξ).card:ℝ)*(Real.exp ξ)^2≤200000*(S.card:ℝ) := by + rw [mul_pow] at hb + apply (mul_le_mul_iff_right₀ (sq_pos_of_pos hB)).mp + nlinarith only [hb] + have hb'' := (le_div_iff₀ (sq_pos_of_pos (Real.exp_pos ξ))).mpr hb' + have heq : 200000*(S.card:ℝ)*Real.exp (-2*ξ)= + 200000*(S.card:ℝ)/(Real.exp ξ)^2 := by + rw [←Real.exp_nat_mul,show -2*ξ=-(2*ξ) by ring,Real.exp_neg] + norm_num + ring + rw [heq] + exact hb'' + +end SharpRamseyFive.ScoreRegularity + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/CollisionSampling.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/CollisionSampling.lean new file mode 100644 index 0000000000000000000000000000000000000000..574d68f823f8ffc249f5ed9d59d69c232099c36d --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/CollisionSampling.lean @@ -0,0 +1,262 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.BlockSelected + +namespace OAI + +noncomputable section + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped Classical BigOperators +variable {B A T : Type} [Fintype B] [Fintype A] [Fintype T] [Nonempty A] +local instance collisionSamplingDecEq : DecidableEq ((B × A) ⊕ T) := Classical.decEq _ + +def otherCollision (c : ((B × A) ⊕ T) → ((B × A) ⊕ T) → ℝ) + (s : B → A) (b : B) (a : A) : ℝ := + ∑ d ∈ Finset.univ.erase b,c (Sum.inl (b,a)) (Sum.inl (d,s d)) + +def middleCollision (c : ((B × A) ⊕ T) → ((B × A) ⊕ T) → ℝ) + (s : B → A) (t : T) : ℝ := ∑ d,c (Sum.inr t) (Sum.inl (d,s d)) + +def allCollision (c : ((B × A) ⊕ T) → ((B × A) ⊕ T) → ℝ) + (S : B → Finset A) (s : B → A) : ℝ := + (∑ b,∑ a∈S b,otherCollision c s b a)+∑ t,middleCollision c s t + +omit [Fintype A] [Fintype T] [Nonempty A] in +lemma otherCollision_own (c : ((B × A) ⊕ T) → ((B × A) ⊕ T) → ℝ) + (s : B → A) (b : B) (a i : A) : + otherCollision c (Function.update s b a) b i=otherCollision c s b i := by + apply Finset.sum_congr rfl + intro d hd + rw [Function.update_of_ne (Finset.mem_erase.mp hd).1] + +lemma fresh_row_collision (c : ((B × A) ⊕ T) → ((B × A) ⊕ T) → ℝ) + (hc : ∀ i j,0≤c i j) (S : B → Finset A) (r : ℕ) (hr : 0 ∑ b,c i (Sum.inl (b,s b))) ≤ + ∑ j∈blockActive S,c i j := by + have hn : ∀ b,(S b).Nonempty := fun b => Finset.card_pos.mp (hr.trans_le (hS b)) + rw [freshBlockLaw_eq S hn,mean_sum,Finset.mul_sum] + have hb (b : B) : (r:ℝ)*mean (piLaw fun d => uniformOn (S d) (hn d)) + (fun s => c i (Sum.inl (b,s b))) ≤ ∑ a∈S b,c i (Sum.inl (b,a)) := by + have he : mean (piLaw fun d => uniformOn (S d) (hn d)) + (fun s => c i (Sum.inl (b,s b))) = + ((S b).card:ℝ)⁻¹ * ∑ a∈S b,c i (Sum.inl (b,a)) := by + change (∑ s,piLaw (fun d => uniformOn (S d) (hn d)) s * + (fun a => c i (Sum.inl (b,a))) (s b)) = _ + rw [piLaw_eval_expectation (fun d => uniformOn (S d) (hn d)) b + (fun a => c i (Sum.inl (b,a))),uniformOn_expectation] + have hnn := mean_nonneg (piLaw fun d=>uniformOn (S d) (hn d)) + (fun s=>c i (Sum.inl (b,s b))) (fun s=>hc _ _) + have hcp : ((S b).card:ℝ)≠0 := Nat.cast_ne_zero.mpr (Finset.card_ne_zero.mpr (hn b)) + calc + _ ≤ (S b).card*mean (piLaw fun d=>uniformOn (S d) (hn d)) + (fun s=>c i (Sum.inl (b,s b))) := + mul_le_mul_of_nonneg_right (by exact_mod_cast hS b) hnn + _ = _ := by rw [he]; field_simp + apply (Finset.sum_le_sum fun b _=>hb b).trans + have he : (∑ j∈blockActive S,c i j)= + (∑ b,∑ a∈S b,c i (Sum.inl (b,a)))+∑ t,c i (Sum.inr t) := by + calc + _ = ∑ j,if j∈blockActive S then c i j else 0 := by + rw [Finset.sum_ite_mem,Finset.univ_inter] + _ = _ := by + rw [Fintype.sum_sum_type,Fintype.sum_prod_type] + simp only [mem_blockActive_left,mem_blockActive_right,ite_true, + Finset.sum_ite_mem,Finset.univ_inter] + rw [he] + exact le_add_of_nonneg_right (Finset.sum_nonneg fun t _=>hc _ _) + +theorem fresh_all_collision_bound (c : ((B × A) ⊕ T) → ((B × A) ⊕ T) → ℝ) + (hc : ∀ i j,0≤c i j) (S : B → Finset A) (r : ℕ) (hr : 0hc _ _) + calc + _ ≤ r * mean (freshBlockLaw S) + (fun s=>∑ i∈blockActive S,∑ b,c i (Sum.inl (b,s b))) := + mul_le_mul_of_nonneg_left (mean_mono _ hpoint) (Nat.cast_nonneg _) + _ = ∑ i∈blockActive S,r * mean (freshBlockLaw S) + (fun s=>∑ b,c i (Sum.inl (b,s b))) := by rw [mean_finset_sum,Finset.mul_sum] + _ ≤ _ := Finset.sum_le_sum fun i _ => fresh_row_collision c hc S r hr hS i + +theorem fresh_selected_collision (c : ((B × A) ⊕ T) → ((B × A) ⊕ T) → ℝ) + (hc : ∀ i j,0≤c i j) (S : B → Finset A) (r : ℕ) (hr : 0∑ b,otherCollision c s b (s b)) ≤ + mean (freshBlockLaw S) (allCollision c S) := by + apply (fresh_selected_fraction S r hr hS (otherCollision c) + (fun s b a=>Finset.sum_nonneg fun d _=>hc _ _) (otherCollision_own c)).trans + apply mean_mono + intro s + exact le_add_of_nonneg_right (Finset.sum_nonneg fun t _=> + Finset.sum_nonneg fun d _=>hc _ _) +end + +open scoped Classical BigOperators + +def badIndexIndicator (δ g d e : ℝ) : ℝ := if d<δ ∨ e norm_num + +lemma badIndexIndicator_le {δ g d e : ℝ} (hδ : 0≤δ) (hg : 0≤g) + (hd : 0d<δ i ∨ ed<δ i ∨ ebadIndexIndicator_le (hδ i hi) (hg i hi) hd he + _ = _ := by rw [Finset.sum_add_distrib,Finset.sum_div,Finset.sum_div] + +variable {B A T β : Type} [Fintype B] [Fintype A] [Fintype T] [Fintype β] [Nonempty A] +local instance goodDeleteIndexDecEq : DecidableEq ((B×A)⊕T) := Classical.decEq _ + +def indexInformation (p : Law (((B×A)⊕T)→β)) (s : B→A) : ((B×A)⊕T)→ℝ := + Sum.elim (fun z=>(blockInformation p s z.1 z.2 : ℝ)) (fun t=>(middleInformation p s t : ℝ)) + +def indexCollision (c : ((B×A)⊕T)→((B×A)⊕T)→ℝ) (s : B→A) : ((B×A)⊕T)→ℝ := + Sum.elim (fun z=>otherCollision c s z.1 z.2) (middleCollision c s) + +def indexBad (J d e : ℝ) (p : Law (((B×A)⊕T)→β)) + (c : ((B×A)⊕T)→((B×A)⊕T)→ℝ) (s : B→A) (i : ((B×A)⊕T)) : ℝ := + badIndexIndicator (J-entropy (map p (fun x=>x i))) + (indexInformation p s i+indexCollision c s i) d e + +omit [Nonempty A] in +lemma indexBad_own (J d e : ℝ) (p : Law (((B×A)⊕T)→β)) + (c : ((B×A)⊕T)→((B×A)⊕T)→ℝ) (s : B→A) (b : B) (a i : A) : + indexBad J d e p c (Function.update s b a) (Sum.inl (b,i))= + indexBad J d e p c s (Sum.inl (b,i)) := by + simp only [indexBad,indexInformation,indexCollision,Sum.elim_inl, + blockInformation_own_independent,otherCollision_own] + +omit [Nonempty A] in +lemma blockActive_sum (S : B→Finset A) (f : ((B×A)⊕T)→ℝ) : + (∑ i∈blockActive S,f i)=(∑ b,∑ a∈S b,f (Sum.inl (b,a)))+∑ t,f (Sum.inr t) := by + calc + _ = ∑ i,if i∈blockActive S then f i else 0 := by + simp only [Finset.sum_ite_mem,Finset.univ_inter] + _ = _ := by + rw [Fintype.sum_sum_type,Fintype.sum_prod_type] + simp only [mem_blockActive_left,mem_blockActive_right,ite_true, + Finset.sum_ite_mem,Finset.univ_inter] + +lemma mean_div {X : Type*} [Fintype X] (p : Law X) (f : X→ℝ) (d : ℝ) : + mean p (fun x=>f x/d)=mean p f/d := by + simp only [mean,mul_div_assoc,Finset.sum_div] + +omit [Nonempty A] in +lemma indexInformation_sum (p : Law (((B×A)⊕T)→β)) (S : B→Finset A) (s : B→A) : + (∑ i∈blockActive S,indexInformation p s i)=blockAllInformation p S s := by + rw [blockActive_sum] + rfl + +omit [Nonempty A] in +lemma indexCollision_sum (c : ((B×A)⊕T)→((B×A)⊕T)→ℝ) (S : B→Finset A) (s : B→A) : + (∑ i∈blockActive S,indexCollision c s i)=allCollision c S s := by + rw [blockActive_sum] + rfl + +omit [Nonempty A] in +lemma indexBad_sum (J d e : ℝ) (hd : 0x i))≤J) + (c : ((B×A)⊕T)→((B×A)⊕T)→ℝ) (hc : ∀ i j,0≤c i j) + (S : B→Finset A) (s : B→A) : + (∑ i∈blockActive S,indexBad J d e p c s i)≤ + blockAllDeficit J p S s/d+(blockAllInformation p S s+allCollision c S s)/e := by + have hscore (i : ((B×A)⊕T)) : 0 ≤ indexInformation p s i+indexCollision c s i := by + cases i with + | inl z => exact add_nonneg (NNReal.coe_nonneg _) (Finset.sum_nonneg fun _ _=>hc _ _) + | inr t => exact add_nonneg (NNReal.coe_nonneg _) (Finset.sum_nonneg fun _ _=>hc _ _) + calc + _ ≤ ∑ i∈blockActive S,((J-entropy (map p (fun x=>x i)))/d+ + (indexInformation p s i+indexCollision c s i)/e) := + Finset.sum_le_sum fun i _=>badIndexIndicator_le (sub_nonneg.mpr (hJ i)) (hscore i) hd he + _ = _ := by + rw [Finset.sum_add_distrib,←Finset.sum_div,←Finset.sum_div,Finset.sum_add_distrib, + indexInformation_sum,indexCollision_sum] + rfl + +theorem selected_bad_fraction (J d e : ℝ) + (p : Law (((B×A)⊕T)→β)) (c : ((B×A)⊕T)→((B×A)⊕T)→ℝ) + (S : B→Finset A) (r : ℕ) (hr : 0∑ b,indexBad J d e p c s (Sum.inl (b,s b)))≤ + mean (freshBlockLaw S) (fun s=>∑ i∈blockActive S,indexBad J d e p c s i) := by + have hh:=fresh_selected_fraction S r hr hS + (fun s b a=>indexBad J d e p c s (Sum.inl (b,a))) + (fun _ _ _=>badIndexIndicator_nonneg _ _ _ _) (indexBad_own J d e p c) + apply hh.trans + apply mean_mono + intro s + rw [blockActive_sum] + exact le_add_of_nonneg_right (Finset.sum_nonneg fun _ _=>badIndexIndicator_nonneg _ _ _ _) + +theorem fresh_bad_bound (J d e : ℝ) (hd : 0x i))≤J) + (c : ((B×A)⊕T)→((B×A)⊕T)→ℝ) (hc : ∀ i j,0≤c i j) + (S : B→Finset A) (r : ℕ) (hr : 0∑ i∈blockActive S,indexBad J d e p c s i)≤ + mean (freshBlockLaw S) (blockAllDeficit J p S)/d+ + (mean (freshBlockLaw S) (blockAllInformation p S)+ + (∑ i∈blockActive S,∑ j∈blockActive S,c i j)/r)/e := by + have hb:=mean_mono (freshBlockLaw S) (indexBad_sum J d e hd he p hJ c hc S) + simp_rw [mean_add,mean_div] at hb + apply hb.trans + rw [mean_add] + gcongr + have hr' : (0:ℝ)f a∈E + +omit [Fintype β] in +lemma mem_eventPreimage (f : α→β) (E : Finset β) (a : α) : + a∈eventPreimage f E ↔ f a∈E := by + simp only [eventPreimage,Finset.mem_filter,Finset.mem_univ,true_and] + +lemma eventMass_map_preimage (p : Law α) (f : α→β) (E : Finset β) : + eventMass (map p f) E=eventMass p (eventPreimage f E) := by + have hm:=mean_map p f (fun b=>if b∈E then 1 else 0) + simpa only [mean,mul_ite,mul_one,mul_zero,eventMass,eventPreimage,Finset.sum_filter, + Finset.sum_ite_mem,Finset.univ_inter] using hm + +lemma conditionOn_mean_exact (p : Law α) (E : Finset α) (h : 0if a∈E then f a else 0)/eventMass p E := by + simp only [mean,Finset.sum_div,conditionOn_apply] + apply Finset.sum_congr rfl + intro a _ + by_cases ha : a∈E <;> simp only [ha,ite_true,ite_false,mul_zero,zero_mul,zero_div, + div_mul_eq_mul_div] + +lemma map_condition_pullback (p : Law α) (f : α→β) (E : Finset β) + (h : 0(c a,M (x a))) x := by + rw [withMessage,pair,map_comp] + rfl +end + +open scoped Classical BigOperators +variable {α β κ : Type*} [Fintype α] [Fintype β] [Fintype κ] + +lemma conditionContext_pair (p : Law α) (c : α→κ) (x : α→β) (E : Finset κ) + (h : 0(c a,x a)) (eventPreimage Prod.fst E)=eventPreimage c E := by + ext a + simp only [eventPreimage,Finset.mem_filter,Finset.mem_univ,true_and] + have hh:=map_condition_pullback p (fun a=>(c a,x a)) (eventPreimage Prod.fst E) + (by change 0x a ∘ f (c a)) := by + rw [selectByContext,pair,map_comp] + rfl +end SharpRamseyFive.FiniteEntropy + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/ConditionalSampling.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/ConditionalSampling.lean new file mode 100644 index 0000000000000000000000000000000000000000..8951009ac3fb167457b1976d5dbe806f396b0d01 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/ConditionalSampling.lean @@ -0,0 +1,157 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.OrderedExtraction +import OAI.Combinatorics.RamseyFive.Entropy.WindowReadiness +import OAI.Combinatorics.RamseyFive.Entropy.IndependentSampling + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped Classical BigOperators +noncomputable section +variable {α β κ τ : Type*} [Fintype α] [Fintype β] [Fintype κ] [Fintype τ] + +lemma mean_by_fibers (p : Law (α×β)) (f : α×β→ℝ) : + mean p f=mean (first p) (fun a=>mean (fiber p a) (fun b=>f (a,b))) := by + simp only [mean,Fintype.sum_prod_type,Finset.mul_sum] + apply Finset.sum_congr rfl + intro a _ + apply Finset.sum_congr rfl + intro b _ + rw [mass_eq_first_mul_fiber] + ring + +lemma mean_comm (p : Law α) (q : Law β) (f : α→β→ℝ) : + mean p (fun a=>mean q (f a))=mean q (fun b=>mean p (fun a=>f a b)) := by + simp only [mean,Finset.mul_sum] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro b _ + apply Finset.sum_congr rfl + intro a _ + ring + +def coveredPositions {n : ℕ} (x : Fin n→β) (D : Finset β) : Finset (Fin n) := + Finset.univ.filter fun i=>x i∈D + +omit [Fintype β] in +lemma mem_coveredPositions {n : ℕ} (x : Fin n→β) (D : Finset β) (i : Fin n) : + i∈coveredPositions x D ↔ x i∈D := by + simp only [coveredPositions,Finset.mem_filter,Finset.mem_univ,true_and] + +omit [Fintype β] in +lemma omitted_card_eq {n : ℕ} (x : Fin n→β) (D : Finset β) : + ((coveredPositions x D)ᶜ.card:ℝ)=∑ i:Fin n,if x i∉D then 1 else 0 := by + have he : (coveredPositions x D)ᶜ=Finset.univ.filter fun i=>x i∉D := by + ext i + simp [coveredPositions] + rw [he] + simp only [←Finset.sum_boole] + +theorem conditional_omissions {n : ℕ} (p : Law α) (ctx : α→κ) (x : α→Fin n→β) + (sampler : κ→Law τ) (D : τ→Finset β) : + mean (adaptiveLaw p (fun a=>sampler (ctx a))) + (fun z=>((coveredPositions (x z.1) (D z.2))ᶜ.card:ℝ)) = + mean (first (pair p ctx x)) (fun c=>∑ i:Fin n, + mean (map (fiber (pair p ctx x) c) (fun y=>y i)) + (fun b=>eventWeight (sampler c) (fun t=>b∉D t))) := by + rw [mean_adaptive] + have hpoint (a : α) : mean (sampler (ctx a)) + (fun t=>((coveredPositions (x a) (D t))ᶜ.card:ℝ))= + ∑ i:Fin n,eventWeight (sampler (ctx a)) (fun t=>x a i∉D t) := by + simp_rw [omitted_card_eq] + rw [mean_sum] + apply Finset.sum_congr rfl + intro i _ + rw [eventWeight_mean] + apply mean_congr + intro t + by_cases hh : x a i∉D t <;> simp only [hh] + simp_rw [hpoint] + have he : mean p (fun a=>∑ i:Fin n,eventWeight (sampler (ctx a)) (fun t=>x a i∉D t))= + mean (pair p ctx x) (fun z=>∑ i:Fin n,eventWeight (sampler z.1) (fun t=>z.2 i∉D t)) := by + exact (mean_map p (fun a=>(ctx a,x a)) + (fun z=>∑ i:Fin n,eventWeight (sampler z.1) (fun t=>z.2 i∉D t))).symm + rw [he,mean_by_fibers] + apply mean_congr + intro c + rw [mean_sum] + apply Finset.sum_congr rfl + intro i _ + exact (mean_map (fiber (pair p ctx x) c) (fun y=>y i) + (fun b=>eventWeight (sampler c) (fun t=>b∉D t))).symm + +theorem conditional_extraction {n l : ℕ} (hl : l∑ i:Fin n, + mean (map (fiber (pair p ctx x) c) (fun y=>y i)) + (fun b=>eventWeight (sampler c) (fun t=>b∉D t)))≤((n:ℝ)-l)/10) : + (9:ℝ)/10≤eventMass (adaptiveLaw p (fun a=>sampler (ctx a))) + (Finset.univ.filter fun z=>l≤(coveredPositions (x z.1) (D z.2)).card) := by + apply extraction_probability _ _ hl + rwa [conditional_omissions] +end +end + +open SharpRamseyFive.Windows +open scoped Classical BigOperators +noncomputable section +variable {κ β τ : Type} [Fintype κ] [Fintype β] [Fintype τ] {r n rem : ℕ} [Nonempty (Fin r)] +local instance readyExtractBlockDE : DecidableEq (Fin 1×Bool) := Classical.decEq _ +local instance readyExtractIndexDE : DecidableEq (Slots 1 r) := Classical.decEq _ + +theorem preRound_ready_omissions (μ : Law κ) (p : κ→Law (Slots 1 r→β)) + (S : κ→(Fin 1×Bool)→Finset (Fin r)) (hrem : 0x (Sum.inr (0,t)))) + (fun b=>eventWeight (sampler z) (fun s=>b∉D s))≤L) : + mean (adaptiveLaw (preRoundTupleLaw μ p S n) (fun z=>sampler z.1)) + (fun z=>((coveredPositions (fun t=>z.1.2 (Sum.inr (0,t))) (D z.2))ᶜ.card:ℝ))≤ + 5*mean (preRoundLaw μ p S n) (fun z=> + ∑ i∈blockActive (historyUnused (S z.1.1) z.1.2),preRoundBad μ p S n J d e c z i)+(2*r:ℝ)*L := by + have hpoint : ∀ z,0x (Sum.inr (0,t)))) + (fun b=>eventWeight (sampler z) (fun s=>b∉D s))≤ + (if windowReady (preRoundBad μ p S n J d e c z) z.2 0 t then (0:ℝ) else 1)+L := by + intro z hz t + by_cases hh : windowReady (preRoundBad μ p S n J d e c z) z.2 0 t + · simpa only [ite_eq_left hh,zero_add] using hb z hz t hh + · rw [ite_eq_right hh] + exact (mean_mono _ (fun b=>eventWeight_le_one _ _)).trans (by rw [mean_const]; linarith) + have he : mean (adaptiveLaw (preRoundTupleLaw μ p S n) (fun z=>sampler z.1)) + (fun z=>((coveredPositions (fun t=>z.1.2 (Sum.inr (0,t))) (D z.2))ᶜ.card:ℝ))= + mean (preRoundLaw μ p S n) (fun z=>∑ t, + mean (map (historyPosterior (p z.1.1) z.1.2) (fun x=>x (Sum.inr (0,t)))) + (fun b=>eventWeight (sampler z) (fun s=>b∉D s))) := by + simp only [mean_adaptive,preRoundTupleLaw] + apply mean_congr + intro z + simp_rw [omitted_card_eq,mean_sum] + apply Finset.sum_congr rfl + intro t _ + rw [mean_map] + apply mean_congr + intro x + rw [eventWeight_mean] + apply mean_congr + intro zt + by_cases hh : x (Sum.inr (0,t))∉D zt <;> simp only [hh] + rw [he] + have hh:=mean_mono_pos (preRoundLaw μ p S n) (fun z hz=> + Finset.sum_le_sum (s:=(Finset.univ:Finset (Fin (2*r)))) (fun t _=>hpoint z hz t)) + simp only [Finset.sum_add_distrib,Finset.sum_const,Finset.card_univ,Fintype.card_fin, + nsmul_eq_mul,mean_add,mean_const,Nat.cast_mul,Nat.cast_ofNat] at hh + have hrdy:=preRound_ready_loss μ p S hrem hr hS J d e c + simp only [Fin.sum_univ_one] at hrdy + exact hh.trans (add_le_add hrdy le_rfl) +end + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/ContextDescription.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/ContextDescription.lean new file mode 100644 index 0000000000000000000000000000000000000000..7a8b9a6a2da1f86352592201e86e3e1fb5142e8c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/ContextDescription.lean @@ -0,0 +1,156 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.CountedExtraction + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +open SelectedTuple MessageWeights +noncomputable section +local instance descriptionFinDecEq (n : ℕ) : DecidableEq (Fin n) := Classical.decEq _ +variable {Ω β κ Θ α : Type*} [Fintype Ω] [Fintype β] [Fintype κ] [Fintype Θ] [Fintype α] + +structure ContextDescription {n : ℕ} (p : Law Ω) (x : Ω→Fin n→β) (L J : ℝ) where + context : Ω→κ + domain : κ→Fin n→Finset β + entropy_bound : entropy (map p context)≤L + contains : ∀ a,0

(C.context a,x a)) z hz + exact C.contains a ha i) (by + intro c hc i + rw [first_pair] at hc + obtain ⟨a,ha,rfl⟩:=map_positive p C.context c hc + exact C.cap a ha i) + simpa only [second_pair,Fintype.card_fin] using hh + +def augment (C : ContextDescription (κ:=κ) p x L J) (q : Ω→Law Θ) : + ContextDescription (κ:=κ) (adaptiveLaw p q) (fun z=>x z.1) L J where + context z:=C.context z.1 + domain:=C.domain + entropy_bound:=by rw [adaptive_stream];exact C.entropy_bound + contains:=by + intro z hz i + have hp : 0

(p.nonneg _).not_gt h.1) |>.1 + exact C.contains _ hp i + cap:=by + intro z hz i + have hp : 0

(p.nonneg _).not_gt h.1) |>.1 + exact C.cap _ hp i +end ContextDescription + +def countedDescription {n l w : ℕ} (hl : l≤n) (p : Law Ω) + (x : Ω→Fin n→β) (S : Ω→Finset (Fin n)) (ctx : Ω→κ) (D : κ→Fin w→Finset β) + (slot : Ω→Fin n→Fin w) (hslot : ∀ a,Monotone (slot a)) + (hdom : ∀ a,0

l≤(S a).card)) + (L M : ℝ) (hctx : entropy (map (conditionOn p _ hE) ctx)≤L) + (hc : ∀ a,0

retainedTuple hl (x a) (S a)) (L+w*Real.log (l+1)) M where + context a:=(ctx a,retainedAssignment hl (S a) (slot a) (hslot a)) + domain c i:=D c.1 (c.2.val i) + entropy_bound:=by + have hh:=entropy_subadditive (pair (conditionOn p _ hE) ctx + (fun a=>retainedAssignment hl (S a) (slot a) (hslot a))) + simp only [first_pair,second_pair] at hh + exact hh.trans (add_le_add hctx (runAssignment_entropy _)) + contains:=by + intro a ha i + obtain ⟨he,hp⟩:=conditionOn_positive p _ hE a ha + exact hdom a hp _ (retainedIndices_mem hl _ (Finset.mem_filter.mp he).2 i) + cap:=by + intro a ha i + exact hc a (conditionOn_positive p _ hE a ha).2 _ + +theorem fixed_table_stage {N n l w : ℕ} {admissible : (Fin N→α)→Prop} + (hl : ltables)) + (fun z=>((positions z.2 z.1)ᶜ.card:ℝ))≤((n:ℝ)-l)/10) : + ∃ (t : Θ) (hE : 0l≤(positions t a).card)), + (9:ℝ)/10≤eventMass S.law (Finset.univ.filter fun a=>l≤(positions t a).card) ∧ + let S':=(S.restrict _ hE).extract hl.le (positions t) + S'.density≤(10/9)*S.density ∧ + Nonempty (ContextDescription (κ:=κ×RunAssignment l w) S'.law S'.tuple + (L+w*Real.log (l+1)) M) := by + obtain ⟨t,hE,ht,hden,_⟩:=fixed_table_extraction hl S tables positions ctx D slot hslot + cost L M hweight hcost hcap hdom hloss + refine ⟨t,hE,ht,hden,⟨?_⟩⟩ + apply countedDescription hl.le S.law S.tuple (positions t) (ctx t) (D t) slot hslot + (hdom t) hE L M _ (hcap t) + apply entropy_le_bound _ (cost t) (hweight t) + intro m hm + obtain ⟨a,ha,rfl⟩:=map_positive (conditionOn S.law _ hE) (ctx t) m hm + exact hcost t a (conditionOn_positive S.law _ hE a ha).2 +end + +noncomputable section +local instance dependentTableFinDecEq (n : ℕ) : DecidableEq (Fin n) := Classical.decEq _ +variable {Ω β Θ α : Type*} [Fintype Ω] [Fintype β] [Fintype Θ] [Fintype α] + +theorem fixed_table_stage_dependent {N n l w : ℕ} {admissible : (Fin N→α)→Prop} + (hl : ltables)) + (fun z=>((positions z.2 z.1)ᶜ.card:ℝ))≤((n:ℝ)-l)/10) : + ∃ (t : Θ) (hE : 0l≤(positions t a).card)), + (9:ℝ)/10≤eventMass S.law (Finset.univ.filter fun a=>l≤(positions t a).card) ∧ + let S':=(S.restrict _ hE).extract hl.le (positions t) + S'.density≤(10/9)*S.density ∧ + Nonempty (ContextDescription (κ:=κ t×RunAssignment l w) S'.law S'.tuple + (L+w*Real.log (l+1)) M) := by + let E:=fun t=>Finset.univ.filter (fun a=>l≤(positions t a).card) + have he:=extraction_probability (adaptiveLaw S.law (fun _=>tables)) + (fun z=>positions z.2 z.1) hl (by simpa only [Finset.card_compl] using hloss) + have heq : (Finset.univ.filter fun z : Ω×Θ=>l≤(positions z.2 z.1).card)= + (Finset.univ.filter fun z : Ω×Θ=>z.1∈E z.2) := by + ext z + simp only [E,Finset.mem_filter,Finset.mem_univ,true_and] + rw [heq,independent_event_average] at he + obtain ⟨t,_,ht⟩:=fix_independent_table S.law tables E (9/10) he + have hE : 0a.val i≤j).card,by + have h:=Finset.card_le_univ (Finset.univ.filter fun i=>a.val i≤j) + simp only [Fintype.card_fin] at h + omega⟩ + +lemma le_iff_lt_runCutoff {l w : ℕ} (a : RunAssignment l w) (i : Fin l) (j : Fin w) : + a.val i≤j ↔ i.val<(runCutoff a j).val := by + constructor + · intro ha + have hsub : Finset.Iic i⊆Finset.univ.filter (fun k=>a.val k≤j) := by + intro k hk + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,(a.property (Finset.mem_Iic.mp hk)).trans ha⟩ + have h:=Finset.card_le_card hsub + simp only [Fin.card_Iic] at h + exact Nat.lt_of_succ_le h + · intro hi + by_contra! ha + have hsub : Finset.univ.filter (fun k=>a.val k≤j)⊆Finset.Iio i := by + intro k hk + apply Finset.mem_Iio.mpr + by_contra! hik + exact (not_le_of_gt ha) ((a.property hik).trans (Finset.mem_filter.mp hk).2) + have h:=Finset.card_le_card hsub + simp only [Fin.card_Iio] at h + exact (not_lt_of_ge h) hi + +lemma runCutoff_injective {l w : ℕ} : Function.Injective (@runCutoff l w) := by + intro a b h + apply Subtype.ext + funext i + apply le_antisymm + · apply (le_iff_lt_runCutoff a i (b.val i)).mpr + rw [h] + exact (le_iff_lt_runCutoff b i (b.val i)).mp le_rfl + · apply (le_iff_lt_runCutoff b i (a.val i)).mpr + rw [←h] + exact (le_iff_lt_runCutoff a i (a.val i)).mp le_rfl + +lemma runAssignment_card (l w : ℕ) : Fintype.card (RunAssignment l w)≤(l+1)^w := by + simpa only [Fintype.card_fun,Fintype.card_fin] using + Fintype.card_le_of_injective (@runCutoff l w) runCutoff_injective + +variable {α β κ : Type*} [Fintype α] [Fintype β] [Fintype κ] + +lemma runAssignment_entropy {l w : ℕ} (p : Law (RunAssignment l w)) : + entropy p≤w*Real.log (l+1) := by + have hc:=entropy_le_log_card p + have hpos : 0(0:ℝ)) + exact Fintype.card_pos_iff.mpr ⟨a⟩ + have hlog:=Real.log_le_log (by exact_mod_cast hpos : (0:ℝ)x i)))≤Fintype.card ι*M := by + calc + _ ≤ ∑ i:ι,M := Finset.sum_le_sum fun i _=>hd.entropy_cap M (hc c hz) i + _ = _ := by simp + dsimp only [totalCorrelation] at ht + linarith + · have hzero : first p c=0 := le_antisymm (le_of_not_gt hz) ((first p).nonneg c) + simp [hzero] + _ = _ := by rw [←Finset.sum_mul,(first p).sum_one,one_mul] + have hh:=entropy_map_le p Prod.snd + rw [map_second] at hh + exact hh.trans he + +def retainedAssignment {n l w : ℕ} (hl : l≤n) (S : Finset (Fin n)) + (slot : Fin n→Fin w) (hslot : Monotone slot) : RunAssignment l w := + ⟨slot ∘ retainedIndices hl S,hslot.comp (retainedIndices hl S).monotone⟩ + +theorem counted_extracted_entropy {n l w : ℕ} (hl : l≤n) (p : Law α) + (x : α→Fin n→β) (S : α→Finset (Fin n)) (ctx : α→κ) (D : κ→Fin w→Finset β) + (slot : α→Fin n→Fin w) (hslot : ∀ a,Monotone (slot a)) + (hdom : ∀ a,0

l≤(S a).card)) + (L M : ℝ) (hctx : entropy (map (conditionOn p _ hE) ctx)≤L) + (hc : ∀ c j,Real.log (D c j).card≤M) : + entropy (map (conditionOn p _ hE) (fun a=>retainedTuple hl (x a) (S a)))≤ + L+w*Real.log (l+1)+l*M := by + let q:=conditionOn p _ hE + let runs:=fun a=>retainedAssignment hl (S a) (slot a) (hslot a) + let outctx:=fun a=>(ctx a,runs a) + have hout : entropy (map q outctx)≤L+w*Real.log (l+1) := by + have hh:=entropy_subadditive (pair q ctx runs) + simp only [first_pair,second_pair] at hh + exact hh.trans (add_le_add hctx (runAssignment_entropy (map q runs))) + have hh:=slot_context_entropy (pair q outctx (fun a=>retainedTuple hl (x a) (S a))) + (fun c i=>D c.1 (c.2.val i)) (L+w*Real.log (l+1)) M + (by simpa only [first_pair] using hout) (by + intro z hz i + obtain ⟨a,ha,rfl⟩:=map_positive q (fun a=>(outctx a,retainedTuple hl (x a) (S a))) z hz + obtain ⟨he,hp⟩:=conditionOn_positive p _ hE a ha + exact hdom a hp _ (retainedIndices_mem hl _ (Finset.mem_filter.mp he).2 i)) + (fun c _ i=>hc c.1 (c.2.val i)) + simpa only [second_pair,Fintype.card_fin] using hh +end +end + +open scoped Classical BigOperators +open MessageWeights SelectedTuple +noncomputable section +local instance fixedFinDecEq (n : ℕ) : DecidableEq (Fin n) := Classical.decEq _ +variable {α β κ Ω Θ : Type*} [Fintype α] [Fintype β] [Fintype κ] [Fintype Ω] [Fintype Θ] + +theorem counted_extracted_entropy_on_support {n l w : ℕ} (hl : l≤n) (p : Law Ω) + (x : Ω→Fin n→β) (S : Ω→Finset (Fin n)) (ctx : Ω→κ) (D : κ→Fin w→Finset β) + (slot : Ω→Fin n→Fin w) (hslot : ∀ a,Monotone (slot a)) + (hdom : ∀ a,0

l≤(S a).card)) + (L M : ℝ) (hctx : entropy (map (conditionOn p _ hE) ctx)≤L) + (hc : ∀ a,0

retainedTuple hl (x a) (S a)))≤ + L+w*Real.log (l+1)+l*M := by + let q:=conditionOn p _ hE + let runs:=fun a=>retainedAssignment hl (S a) (slot a) (hslot a) + let outctx:=fun a=>(ctx a,runs a) + have hout : entropy (map q outctx)≤L+w*Real.log (l+1) := by + have hh:=entropy_subadditive (pair q ctx runs) + simp only [first_pair,second_pair] at hh + exact hh.trans (add_le_add hctx (runAssignment_entropy (map q runs))) + have hh:=slot_context_entropy (pair q outctx (fun a=>retainedTuple hl (x a) (S a))) + (fun c i=>D c.1 (c.2.val i)) (L+w*Real.log (l+1)) M + (by simpa only [first_pair] using hout) (by + intro z hz i + obtain ⟨a,ha,rfl⟩:=map_positive q (fun a=>(outctx a,retainedTuple hl (x a) (S a))) z hz + obtain ⟨he,hp⟩:=conditionOn_positive p _ hE a ha + exact hdom a hp _ (retainedIndices_mem hl _ (Finset.mem_filter.mp he).2 i)) (by + intro c hc' i + rw [first_pair] at hc' + obtain ⟨a,ha,rfl⟩:=map_positive q outctx c hc' + exact hc a (conditionOn_positive p _ hE a ha).2 _) + simpa only [second_pair,Fintype.card_fin] using hh + +lemma independent_event_average (p : Law Ω) (tables : Law Θ) (E : Θ→Finset Ω) : + eventMass (adaptiveLaw p (fun _=>tables)) + (Finset.univ.filter fun z=>z.1∈E z.2)=mean tables (fun t=>eventMass p (E t)) := by + simp only [eventMass,Finset.sum_filter,adaptiveLaw,Fintype.sum_prod_type,mean] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro t _ + rw [←Finset.sum_filter,Finset.mul_sum] + simp only [Finset.filter_univ_mem] + apply Finset.sum_congr rfl + intro a _ + ring + +theorem fixed_table_extraction {N n l w : ℕ} {admissible : (Fin N→α)→Prop} + (hl : ltables)) + (fun z=>((positions z.2 z.1)ᶜ.card:ℝ))≤((n:ℝ)-l)/10) : + ∃ (t : Θ) (hE : 0l≤(positions t a).card)), + (9:ℝ)/10≤eventMass S.law (Finset.univ.filter fun a=>l≤(positions t a).card) ∧ + let S':=(S.restrict _ hE).extract hl.le (positions t) + S'.density≤(10/9)*S.density ∧ + entropy (map S'.law S'.tuple)≤L+w*Real.log (l+1)+l*M := by + let E:=fun t=>Finset.univ.filter (fun a=>l≤(positions t a).card) + have he:=extraction_probability (adaptiveLaw S.law (fun _=>tables)) + (fun z=>positions z.2 z.1) hl (by simpa only [Finset.card_compl] using hloss) + have heq : (Finset.univ.filter fun z : Ω×Θ=>l≤(positions z.2 z.1).card)= + (Finset.univ.filter fun z : Ω×Θ=>z.1∈E z.2) := by + ext z + simp only [E,Finset.mem_filter,Finset.mem_univ,true_and] + rw [heq,independent_event_average] at he + obtain ⟨t,_,ht⟩:=fix_independent_table S.law tables E (9/10) he + have hE : 0 y.val.submodule ≤ l.val).card ≤ + (pairPoints x X H A).card + let N := E.filter nd + let D := E.filter (fun A => ¬nd A) + have hE : E ⊆ F := Finset.filter_subset _ _ + have hne (A) (hA : A ∈ E) : H ≠ A := (Finset.mem_filter.mp hA).2.1 + have hM (A) (hA : A ∈ E) : ⌈a/δ⌉₊ ≤ (pairPoints x X H A).card := + Nat.ceil_le.mpr ((div_le_iff₀ hδ).mpr (by + simpa only [mul_comm] using (Finset.mem_filter.mp hA).2.2)) + have hN := nondominant_degree_count x hdim X F hF hxF H hH hxH N + ((Finset.filter_subset _ _).trans hE) (fun A hA => hne A (Finset.mem_filter.mp hA).1) + ⌈a/δ⌉₊ (fun A hA => hM A (Finset.mem_filter.mp hA).1) + (fun A hA => (Finset.mem_filter.mp hA).2) + have hD := dominant_degree_count x (d := 4) hdim X F hF H hxH D + ((Finset.filter_subset _ _).trans hE) ⌈a/(2*δ)⌉₊ (by + intro A hA + obtain ⟨hA,hn⟩ := Finset.mem_filter.mp hA + exact dominant_witness x X H A hxH (hxF A (hE hA)) hδ + (Finset.mem_filter.mp hA).2.2 hn) + have hQ : (∑ i ∈ Finset.range (4-1), Nat.card K^i) = Nat.card K^2+Nat.card K+1 := by + norm_num [Finset.sum_range_succ]; ring + rw [hQ] at hD + have hcD : (D.card:ℝ)*⌈a/(2*δ)⌉₊ ≤ (onPlane x X H).card * + ((Nat.card K:ℝ)^2+Nat.card K+1) := by exact_mod_cast hD + have hcN : (N.card:ℝ)*(⌈a/δ⌉₊:ℝ)^2 ≤ + 2*((onPlane x X H).card:ℝ)^2*((Nat.card K:ℝ)+1) := by exact_mod_cast hN + have hceil : a ≤ δ*(⌈a/δ⌉₊:ℝ) := + ((div_le_iff₀ hδ).mp (Nat.le_ceil (a/δ))).trans_eq (mul_comm _ _) + have hceil₂ : a ≤ 2*δ*(⌈a/(2*δ)⌉₊:ℝ) := + ((div_le_iff₀ (mul_pos (by norm_num) hδ)).mp (Nat.le_ceil (a/(2*δ)))).trans_eq (mul_comm _ _) + have hD' : (D.card:ℝ)*a ≤ + 2*δ*(onPlane x X H).card*((Nat.card K:ℝ)^2+Nat.card K+1) := by + calc + _ ≤ (D.card:ℝ)*(2*δ*⌈a/(2*δ)⌉₊) := mul_le_mul_of_nonneg_left hceil₂ (by positivity) + _ = 2*δ*((D.card:ℝ)*⌈a/(2*δ)⌉₊) := by ring + _ ≤ 2*δ*((onPlane x X H).card*((Nat.card K:ℝ)^2+Nat.card K+1)) := + mul_le_mul_of_nonneg_left hcD (by positivity) + _ = _ := by ring + have hN' : (N.card:ℝ)*a^2 ≤ 2*δ^2*(onPlane x X H).card^2*((Nat.card K:ℝ)+1) := by + calc + _ ≤ (N.card:ℝ)*(δ*⌈a/δ⌉₊)^2 := + mul_le_mul_of_nonneg_left (pow_le_pow_left₀ ha hceil 2) (by positivity) + _ = δ^2*((N.card:ℝ)*(⌈a/δ⌉₊:ℝ)^2) := by ring + _ ≤ δ^2*(2*((onPlane x X H).card:ℝ)^2*((Nat.card K:ℝ)+1)) := + mul_le_mul_of_nonneg_left hcN (sq_nonneg _) + _ = _ := by ring + have he : N.card+D.card=E.card := Finset.card_filter_add_card_filter_not nd + have her : (N.card:ℝ)+(D.card:ℝ)=E.card := by exact_mod_cast he + change (E.card:ℝ)*a^2 ≤ _ + rw [←her,add_mul] + have hDa := mul_le_mul_of_nonneg_right hD' ha + nlinarith + +theorem nondominant_weighted_degree (hdim : finrank K V = 5) + (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 4) + (hxF : ∀ A ∈ F, x.submodule ≤ A) + (H : Submodule K V) (hH : finrank K H = 4) (hxH : x.submodule ≤ H) + {δ a : ℝ} (hδ : 0 < δ) (ha : 0 ≤ a) + (hline : ∀ l : RadialLine x, δ*(RadialLine.trainingOnLine X l).card < a/2) : + ((neighbors x X F H δ a).card:ℝ)*a^2 ≤ + 2*δ^2*(onPlane x X H).card^2*((Nat.card K:ℝ)+1) := by + classical + let E := neighbors x X F H δ a + have hE : E ⊆ F := Finset.filter_subset _ _ + have hM (A) (hA : A ∈ E) : ⌈a/δ⌉₊ ≤ (pairPoints x X H A).card := + Nat.ceil_le.mpr ((div_le_iff₀ hδ).mpr (by + simpa only [mul_comm] using (Finset.mem_filter.mp hA).2.2)) + have hN := nondominant_degree_count x hdim X F hF hxF H hH hxH E hE + (fun A hA => (Finset.mem_filter.mp hA).2.1) ⌈a/δ⌉₊ hM (by + intro A hA + by_contra hn + obtain ⟨l,_,hl⟩ := dominant_witness x X H A hxH (hxF A (hE hA)) hδ + (Finset.mem_filter.mp hA).2.2 hn + have hlg : a/(2*δ) ≤ ((RadialLine.trainingOnLine X l).card:ℝ) := + (Nat.le_ceil _).trans (by exact_mod_cast hl) + have hh := (div_le_iff₀ (mul_pos (by norm_num) hδ)).mp hlg + have hh' := hline l + nlinarith) + have hcN : (E.card:ℝ)*(⌈a/δ⌉₊:ℝ)^2 ≤ + 2*((onPlane x X H).card:ℝ)^2*((Nat.card K:ℝ)+1) := by exact_mod_cast hN + have hceil : a ≤ δ*(⌈a/δ⌉₊:ℝ) := + ((div_le_iff₀ hδ).mp (Nat.le_ceil (a/δ))).trans_eq (mul_comm _ _) + calc + _ ≤ (E.card:ℝ)*(δ*⌈a/δ⌉₊)^2 := + mul_le_mul_of_nonneg_left (pow_le_pow_left₀ ha hceil 2) (by positivity) + _ = δ^2*((E.card:ℝ)*(⌈a/δ⌉₊:ℝ)^2) := by ring + _ ≤ δ^2*(2*((onPlane x X H).card:ℝ)^2*((Nat.card K:ℝ)+1)) := + mul_le_mul_of_nonneg_left hcN (sq_nonneg _) + _ = _ := by ring + +end SharpRamseyFive.WeightedOverlap + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/DeletionNumerics.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/DeletionNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..58dc6ac5d6d4f9cb72503c481622e46d42b9769a --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/DeletionNumerics.lean @@ -0,0 +1,80 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.Beta + +namespace OAI + +namespace SharpRamseyFive.ParameterHierarchy +open Filter Real +open scoped Topology +noncomputable section + +lemma deletion_budget_monomial {σ q D k budget rounds rem C Cb Cc Cn b η : ℝ} + (hσ : 1≤σ) (hq : 0Cb*σ^(-2*beta η)+4*Cb*σ^(-1001*beta η)+ + Cc*Cn*σ^(2000*beta η-η/2)) atTop (𝓝 0) := by + convert ((tendsto_rpow_neg_atTop h1).const_mul Cb).add + ((tendsto_rpow_neg_atTop h2).const_mul (4*Cb)) |>.add + ((tendsto_rpow_neg_atTop h3).const_mul (Cc*Cn)) using 1 <;> ring_nf + filter_upwards [eventually_ge_atTop (1:ℝ),ht.eventually_lt_const hε] with σ hσ hsmall + intro q D k budget rounds rem C hq hD hk hb hr hn hC + exact (deletion_budget_monomial hσ hq hD hk hCb hCc hCn hb hr hn hC).trans + (by simpa [mul_comm] using mul_le_mul_of_nonneg_left hsmall.le hk) +end +end SharpRamseyFive.ParameterHierarchy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/DescriptionClean.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/DescriptionClean.lean new file mode 100644 index 0000000000000000000000000000000000000000..0579c61c0ff302d68a885804bc455d9255ca9043 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/DescriptionClean.lean @@ -0,0 +1,58 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.ReciprocalLossBudget + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {Ω β κ : Type} [Fintype Ω] [Fintype κ] + {n : ℕ} {p : Law Ω} {x : Ω→Fin n→β} {L J : ℝ} +def ContextDescription.cleanDomain (C : ContextDescription (κ:=κ) p x L J) (c : κ) (i : Fin n) := + if 0 < map p C.context c then C.domain c i else ∅ +lemma ContextDescription.clean_contains (C : ContextDescription (κ:=κ) p x L J) : + ∀z,0

if C.context a=C.context z then p a else 0) + (fun a _=>by split_ifs; exact p.nonneg a; exact le_rfl) (Finset.mem_univ z) + simp only at hh + exact hz.trans_le hh + simpa only [cleanDomain,ite_eq_left hp] using C.contains z hz i +lemma ContextDescription.clean_cap (C : ContextDescription (κ:=κ) p x L J) : + ∀c i,((C.cleanDomain c i).card:ℝ)≤Real.exp J := by + intro c i + by_cases hp : 0 < map p C.context c + · obtain ⟨z,hz,rfl⟩:=map_positive p C.context c hp + have hh:=C.cap z hz i + rw [cleanDomain,ite_eq_left hp] + apply card_le_of_log_le (by positivity) (Real.exp_pos _) + simpa only [Real.log_exp] using hh + · simp only [cleanDomain,ite_eq_right hp,Finset.card_empty,Nat.cast_zero] + exact (Real.exp_pos _).le +end +end SharpRamseyFive.FiniteEntropy +namespace SharpRamseyFive.SelectedTuple +open Module ProjectiveIncidence FiniteEntropy Windows Marking +open scoped Classical LinearAlgebra.Projectivization +noncomputable section +variable {K V Ω κ α : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] [Fintype Ω] [Fintype κ] [Fintype α] + {N n : ℕ} {admissible : (Fin N→α)→Prop} +def Prepared.mono {S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N n admissible} + {ctx : Ω→κ} {J B B' M : ℝ} (P : Prepared S ctx J B M) (hB : B≤B') : + Prepared S ctx J B' M where + domain:=P.domain + contains:=P.contains + cap:=P.cap + deficit:=P.deficit.trans hB + incident:=P.incident + consistent:=P.consistent + occupancy:=P.occupancy +end +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/DimensionThreePairs.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/DimensionThreePairs.lean new file mode 100644 index 0000000000000000000000000000000000000000..ffcd070d6f05ef126a69e45d1c63ea739f0cf44f --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/DimensionThreePairs.lean @@ -0,0 +1,221 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.DegreeStrengthCount +import OAI.Combinatorics.RamseyFive.Geometry.LocalLines + +namespace OAI + +namespace SharpRamseyFive.WeightedOverlap +open Module ProjectiveIncidence RichPlaneGeometry HyperplaneOverlap NondominantOverlap ActualOverlap +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] [FiniteDimensional K V] [Finite K] + (x : ℙ K V) [Fintype (RadialLine x)] + +theorem pair_count_three (hdim : finrank K V = 4) + (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 3) + (hxF : ∀ A ∈ F, x.submodule ≤ A) {δ a : ℝ} (hδ : 0<δ) : + (pairs x X F δ a).card ≤ + (richRadials x X ⊤ ⌈a/δ⌉₊).card*(Nat.card K+1)^2 := by + have hh := dominant_pair_count x (d := 3) hdim X F hF + (pairs x X F δ a) (Finset.filter_subset _ _) ⌈a/δ⌉₊ (by + intro p hp + obtain ⟨hp,hne,hs⟩ := Finset.mem_filter.mp hp + obtain ⟨hA,hB⟩ := Finset.mem_product.mp hp + obtain ⟨l,hl,hX⟩ := intersection_radial_three x hdim p.1 p.2 (hF _ hA) (hF _ hB) + (hxF _ hA) (hxF _ hB) hne X + refine ⟨l,hl.le,?_⟩ + rw [hX] + apply Nat.ceil_le.mpr + apply (div_le_iff₀ hδ).mpr + simpa only [mul_comm] using hs) + simpa only [Finset.sum_range_succ,Finset.sum_range_zero,pow_zero,pow_one,zero_add,add_comm] using hh + +theorem degree_count_three (hdim : finrank K V = 4) + (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 3) + (hxF : ∀ A ∈ F, x.submodule ≤ A) + (H : Submodule K V) (hH : finrank K H=3) (hxH : x.submodule≤H) + {δ a : ℝ} (hδ : 0<δ) : + ((neighbors x X F H δ a).card:ℝ)*a ≤ + δ*(onPlane x X H).card*(Nat.card K+1) := by + have hh := dominant_degree_count x (d := 3) hdim X F hF H hxH + (neighbors x X F H δ a) (Finset.filter_subset _ _) ⌈a/δ⌉₊ (by + intro A hA + obtain ⟨hA,hne,hs⟩ := Finset.mem_filter.mp hA + obtain ⟨l,hl,hX⟩ := intersection_radial_three x hdim H A hH (hF _ hA) + hxH (hxF _ hA) hne X + refine ⟨l,hl.le,?_⟩ + rw [hX] + apply Nat.ceil_le.mpr + apply (div_le_iff₀ hδ).mpr + simpa only [mul_comm] using hs) + have hc : ((neighbors x X F H δ a).card:ℝ)*⌈a/δ⌉₊ ≤ + (onPlane x X H).card*((Nat.card K:ℝ)+1) := by + have he : (∑i∈Finset.range (3-1),Nat.card K^i)=Nat.card K+1 := by + norm_num [Finset.sum_range_succ,Nat.add_comm] + rw [he] at hh + exact_mod_cast hh + have hceil : a≤δ*(⌈a/δ⌉₊:ℝ) := + ((div_le_iff₀ hδ).mp (Nat.le_ceil (a/δ))).trans_eq (mul_comm _ _) + calc + _ ≤ (neighbors x X F H δ a).card*(δ*(⌈a/δ⌉₊:ℝ)) := mul_le_mul_of_nonneg_left hceil (by positivity) + _ = δ*((neighbors x X F H δ a).card*(⌈a/δ⌉₊:ℝ)) := by ring + _ ≤ _ := by simpa only [mul_assoc] using mul_le_mul_of_nonneg_left hc hδ.le + +omit [Finite K] [Fintype (RadialLine x)] in + +theorem no_neighbors_three (hdim : finrank K V = 4) + (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 3) + (hxF : ∀ A ∈ F, x.submodule ≤ A) + (H : Submodule K V) (hH : finrank K H=3) (hxH : x.submodule≤H) + (δ a : ℝ) (hline : ∀ l : RadialLine x, δ*(RadialLine.trainingOnLine X l).card + a≤WeightedPrograms.strength (pencilLines x F) (radialWeight x X δ) p)).card ≤ + (ActualOverlap.richRadials x X ⊤ ⌈a/(δ:ℝ)⌉₊).card*(Nat.card K+1)^2 := by + let G := F.image fun b => LinearMap.ker b.rep + have hdimG (A : Submodule K V) (hA : A∈G) : finrank K A=3 := by + obtain ⟨b,_,rfl⟩ := Finset.mem_image.mp hA + have hh := Module.Dual.finrank_ker_add_one_of_ne_zero b.rep_nonzero + omega + have hxG (A : Submodule K V) (hA : A∈G) : x.submodule≤A := by + obtain ⟨b,hb,rfl⟩ := Finset.mem_image.mp hA + exact hF b hb + exact (pair_strength_count_le x X δ F hF a).trans + (WeightedOverlap.pair_count_three x hdim X G hdimG hxG (by exact_mod_cast hδ)) + +theorem score_degree_three (hdim : finrank K V=4) + (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Module.Dual K V))) (hF : ∀ H∈F,Incident x H) + (H : F) (a : ℝ) (ha : 0≤a) : + ((Finset.univ.filter (fun H' : F => H≠H' ∧ a≤ + PoissonScore.mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H'))).card:ℝ)*a ≤ + PoissonScore.mass (radialWeight x X δ) (pencilLines x F H)*(Nat.card K+1) := by + let G := F.image fun b => LinearMap.ker b.rep + have hdG (A) (hA : A∈G) : finrank K A=3 := by + obtain ⟨b,_,rfl⟩ := Finset.mem_image.mp hA + have := Module.Dual.finrank_ker_add_one_of_ne_zero b.rep_nonzero + omega + have hxG (A) (hA : A∈G) : x.submodule≤A := by + obtain ⟨b,hb,rfl⟩ := Finset.mem_image.mp hA + exact hF b hb + have hdH : finrank K (LinearMap.ker H.val.rep)=3 := by + have := Module.Dual.finrank_ker_add_one_of_ne_zero H.val.rep_nonzero + omega + have hc : ((Finset.univ.filter (fun H' : F => H≠H' ∧ a≤ + PoissonScore.mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H'))).card:ℝ) ≤ + (WeightedOverlap.neighbors x X G (LinearMap.ker H.val.rep) δ a).card := by + exact_mod_cast degree_strength_count_le x X δ F hF H a + have hh := (mul_le_mul_of_nonneg_right hc ha).trans + (WeightedOverlap.degree_count_three x hdim X G hdG hxG _ hdH + (hF H.val H.property) (by exact_mod_cast hδ)) + have hm : PoissonScore.mass (radialWeight x X δ) (pencilLines x F H)= + (δ:ℝ)*(NondominantOverlap.onPlane x X (LinearMap.ker H.val.rep)).card := by + rw [mass_pencil x X δ F hF] + rfl + rwa [hm] + +omit [Finite K] in + +theorem score_no_neighbors_three (hdim : finrank K V=4) + (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Module.Dual K V))) (hF : ∀ H∈F,Incident x H) + (H : F) (a : ℝ) (hline : ∀ l : RadialLine x,(radialWeight x X δ l:ℝ) H≠H' ∧ a≤ + PoissonScore.mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H')))=∅ := by + let G := F.image fun b => LinearMap.ker b.rep + have hdG (A) (hA : A∈G) : finrank K A=3 := by + obtain ⟨b,_,rfl⟩ := Finset.mem_image.mp hA + have := Module.Dual.finrank_ker_add_one_of_ne_zero b.rep_nonzero + omega + have hxG (A) (hA : A∈G) : x.submodule≤A := by + obtain ⟨b,hb,rfl⟩ := Finset.mem_image.mp hA + exact hF b hb + have hdH : finrank K (LinearMap.ker H.val.rep)=3 := by + have := Module.Dual.finrank_ker_add_one_of_ne_zero H.val.rep_nonzero + omega + have he := WeightedOverlap.no_neighbors_three x hdim X G hdG hxG (LinearMap.ker H.val.rep) + hdH (hF H.val H.property) δ a (by + intro l + simpa only [radialWeight,NNReal.coe_mul,NNReal.coe_natCast] using hline l) + apply Finset.card_eq_zero.mp + have hc := degree_strength_count_le x X δ F hF H a + rw [he,Finset.card_empty] at hc + omega + +end +open Module ProjectiveIncidence ProjectiveTraining GlobalRadial PoissonScore WeightedPrograms +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +theorem score_pairs_three_off_radial (hdim : finrank K V = 4) + (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) (δ : ℝ≥0) (hδ : 0 < δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀H∈F,Incident x H) + (a D : ℝ) (Lines : Finset (Submodule K V)) (hLines : ∀l : RadialLine x,l.val∈Lines) + (Q : Finset (ℙ K V)) (hx : x∈Q) + (hgood : x∉badCenters S O δ a Lines Q D) : + ((Finset.univ.filter (fun p : DistinctPairs F => a ≤ + strength (pencilLines x F) (radialWeight x (outsideAt x S (O x)) δ) p)).card:ℝ) ≤ + D*((Nat.card K:ℝ)+1)^2 := by + have hlocal : ((localLines S O δ a Lines x).card:ℝ) < D := by + by_contra hn + exact hgood (Finset.mem_filter.mpr ⟨hx,le_of_not_gt hn⟩) + have hh := score_pair_count_three x hdim (outsideAt x S (O x)) δ hδ F hF a + have hr := richRadials_le_localLines x S O δ a (by exact_mod_cast hδ) Lines hLines + have hc : ((Finset.univ.filter (fun p : DistinctPairs F => a ≤ + strength (pencilLines x F) (radialWeight x (outsideAt x S (O x)) δ) p)).card:ℝ) ≤ + (localLines S O δ a Lines x).card*((Nat.card K:ℝ)+1)^2 := by + exact_mod_cast hh.trans (Nat.mul_le_mul_right _ hr) + exact hc.trans (mul_le_mul_of_nonneg_right hlocal.le (sq_nonneg _)) + +theorem score_pair_three_normalized (hdim : finrank K V = 4) + (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) (δ : ℝ≥0) (hδ : 0 < δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀H∈F,Incident x H) + (n a χ : ℝ) (hn : 0 < n) (ha : 0 < a) (ha2 : a ≤ 2) + (hχ : (4*2^100:ℝ) ≤ Real.exp χ) + (Lines : Finset (Submodule K V)) (hLines : ∀l : RadialLine x,l.val∈Lines) + (Q : Finset (ℙ K V)) (hx : x∈Q) + (hgood : x∉badCenters S O δ a Lines Q ((Nat.card K:ℝ)^4/n^2*Real.exp χ/a^100)) : + ((Finset.univ.filter (fun p : DistinctPairs F => a ≤ + strength (pencilLines x F) (radialWeight x (outsideAt x S (O x)) δ) p)).card:ℝ)*a^200 ≤ + ((Nat.card K:ℝ)^3/n)^2*Real.exp (2*χ) := by + have hq : (1:ℝ) ≤ Nat.card K := by exact_mod_cast (Nat.card_pos (α:=K)) + have hq2 : ((Nat.card K:ℝ)+1)^2 ≤ 4*(Nat.card K:ℝ)^2 := by nlinarith + have hh := score_pairs_three_off_radial x hdim S O δ hδ F hF a _ Lines hLines Q hx hgood + have hp : a^100 ≤ (2:ℝ)^100 := pow_le_pow_left₀ ha.le ha2 _ + calc + _ ≤ ((Nat.card K:ℝ)^4/n^2*Real.exp χ/a^100)*((Nat.card K:ℝ)+1)^2*a^200 := + mul_le_mul_of_nonneg_right hh (by positivity) + _ ≤ ((Nat.card K:ℝ)^4/n^2*Real.exp χ/a^100)*(4*(Nat.card K:ℝ)^2)*a^200 := by gcongr + _ = ((Nat.card K:ℝ)^3/n)^2*Real.exp χ*(4*a^100) := by field_simp + _ ≤ ((Nat.card K:ℝ)^3/n)^2*Real.exp χ*(4*2^100) := by gcongr + _ ≤ ((Nat.card K:ℝ)^3/n)^2*Real.exp χ*Real.exp χ := by gcongr + _ = _ := by rw [mul_assoc,←Real.exp_add];congr 2;ring + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/EmptyWeight.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/EmptyWeight.lean new file mode 100644 index 0000000000000000000000000000000000000000..9c5d808587d90de6af6ec65b984be5e21332b48b --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/EmptyWeight.lean @@ -0,0 +1,108 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Probability.AllEmptyIndicator + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.PoissonScore +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal Classical +variable {ι H : Type*} [Fintype ι] + +noncomputable def emptyWeight {R : ℕ} (E : Finset H) (lines : H→Finset ι) + (w : H→ℝ) (ω : Fin R→ι→ℕ) : ℝ := + ∑h∈E,w h*allEmptyIndicator (lines h) ω + +omit [Fintype ι] in +lemma emptyWeight_eq_sum {R : ℕ} (E : Finset H) (lines : H→Finset ι) + (w : H→ℝ) (ω : Fin R→ι→ℕ) : + emptyWeight E lines w ω=∑h∈emptyTests E lines ω,w h := by + simp only [emptyWeight,allEmptyIndicator_eq_if,emptyTests,Finset.sum_filter] + apply Finset.sum_congr rfl + intro h hh + split_ifs <;> simp + +omit [Fintype ι] in +lemma emptyWeight_nonneg {R : ℕ} (E : Finset H) (lines : H→Finset ι) + (w : H→ℝ) (hw : ∀h∈E,0≤w h) (ω : Fin R→ι→ℕ) : + 0≤emptyWeight E lines w ω := + Finset.sum_nonneg fun h hh => mul_nonneg (hw h hh) (allEmptyIndicator_bounds _ _).1 + +lemma integrable_emptyWeight (rate : ι→ℝ≥0) {R : ℕ} + (E : Finset H) (lines : H→Finset ι) (w : H→ℝ) : + Integrable (emptyWeight (R:=R) E lines w) (scheduleMeasure rate R) := + integrable_finsetSum E fun h _ => (integrable_allEmptyIndicator rate (lines h)).const_mul (w h) + +lemma integral_emptyWeight (rate : ι→ℝ≥0) {R : ℕ} + (E : Finset H) (lines : H→Finset ι) (w : H→ℝ) : + (∫ ω,emptyWeight E lines w ω ∂scheduleMeasure rate R)= + ∑h∈E,w h*Real.exp (-(R:ℝ)*mass rate (lines h)) := by + unfold emptyWeight + rw [integral_finsetSum E (fun h _ => (integrable_allEmptyIndicator rate (lines h)).const_mul (w h))] + simp only [integral_const_mul,integral_allEmptyIndicator] + +omit [Fintype ι] in +lemma emptyWeight_light_heavy {R : ℕ} (E : Finset H) (lines : H→Finset ι) + (w : H→ℝ) {a : ℝ} (ha : 0≤a) (ω : Fin R→ι→ℕ) : + emptyWeight E lines w ω ≤ a*((emptyTests E lines ω).card:ℝ)+ + emptyWeight (E.filter fun h => a a < mass weight (lines h)) lines + (fun h => mass weight (lines h)) ω ∂scheduleMeasure (fun i => L*weight i) R) ≤ + M*Real.exp (-((R:ℝ)*(L:ℝ))*a) := by + rw [integral_emptyWeight] + have hmass : ∀h,0≤ mass weight (lines h) := fun h => + Finset.sum_nonneg fun i _ => (weight i).coe_nonneg + calc + _ ≤ ∑h∈E.filter (fun h => a < mass weight (lines h)), + mass weight (lines h)*Real.exp (-((R:ℝ)*(L:ℝ))*a) := by + apply Finset.sum_le_sum + intro h hh + apply mul_le_mul_of_nonneg_left _ (hmass h) + apply Real.exp_le_exp.mpr + have hscaled : mass (fun i => L*weight i) (lines h)=(L:ℝ)*mass weight (lines h) := by + simp only [mass,NNReal.coe_mul,Finset.mul_sum] + rw [hscaled] + have hm := mul_le_mul_of_nonpos_left (Finset.mem_filter.mp hh).2.le + (neg_nonpos.mpr (mul_nonneg (Nat.cast_nonneg R) L.coe_nonneg)) + nlinarith only [hm] + _ = (∑h∈E.filter (fun h => a < mass weight (lines h)),mass weight (lines h))* + Real.exp (-((R:ℝ)*(L:ℝ))*a) := by rw [Finset.sum_mul] + _ ≤ M*Real.exp (-((R:ℝ)*(L:ℝ))*a) := by + apply mul_le_mul_of_nonneg_right _ (Real.exp_pos _).le + apply le_trans _ hM + exact Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) + (fun h _ _ => hmass h) + +theorem heavy_empty_probability (L : ℝ≥0) (weight : ι→ℝ≥0) {R : ℕ} + (E : Finset H) (lines : H→Finset ι) {a M ε : ℝ} (hε : 0<ε) + (hM : ∑h∈E,mass weight (lines h)≤M) : + (scheduleMeasure (fun i => L*weight i) R).real + {ω | ε≤emptyWeight (E.filter fun h => a < mass weight (lines h)) lines + (fun h => mass weight (lines h)) ω} ≤ M*Real.exp (-((R:ℝ)*(L:ℝ))*a)/ε := by + apply (le_div_iff₀ hε).mpr + rw [mul_comm] + apply (mul_meas_ge_le_integral_of_nonneg _ + (integrable_emptyWeight (fun i => L*weight i) _ _ _) ε).trans + (heavy_empty_mean L weight E lines hM) + exact Filter.Eventually.of_forall fun ω => emptyWeight_nonneg _ _ _ + (fun h _ => Finset.sum_nonneg fun i _ => (weight i).coe_nonneg) ω + +end SharpRamseyFive.PoissonScore + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/EntropyCrossEntropy.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/EntropyCrossEntropy.lean new file mode 100644 index 0000000000000000000000000000000000000000..c766931a39395597eb9d8666f457ca007c318fac --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/EntropyCrossEntropy.lean @@ -0,0 +1,163 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.LogSum + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped BigOperators Classical +variable {α β : Type*} [Fintype α] [Fintype β] + +theorem entropy_le_cross_entropy (p : Law α) (q : α → ℝ) + (hq : ∀ a,0≤q a) (hs : ∑ a,q a≤1) (hac : ∀ a,0

+ point_log_ratio (p a) (q a) (p.nonneg a) (hq a) (hac a)) + rw [Finset.sum_sub_distrib,p.sum_one] at hh + have he (a : α) : p a*Real.log (p a/q a)=p a*Real.log (p a)-p a*Real.log (q a) := by + by_cases hz : p a=0 + · simp [hz] + · rw [Real.log_div hz (ne_of_gt (hac a (lt_of_le_of_ne (p.nonneg a) (Ne.symm hz)))),mul_sub] + simp only [he,Finset.sum_sub_distrib] at hh + unfold entropy + linarith + +theorem option_entropy_bound (p : Law (Option β)) (S : Finset β) (N : ℝ) + (hN : 1≤N) (hS : (S.card:ℝ)≤N) + (hsupp : ∀ b,0

match o with + | none => 1/2 + | some b => if b∈S then 1/(2*N) else 0 + have hqsum : (∑ o,q o)=1/2+(S.card:ℝ)/(2*N) := by + simp only [Fintype.sum_option,q] + simp [div_eq_mul_inv] + have hqnon (o : Option β) : 0≤q o := by + cases o with + | none => norm_num [q] + | some b => simp only [q]; split_ifs <;> positivity + have hqsumle : ∑ o,q o≤1 := by + rw [hqsum] + have hh : (S.card:ℝ)/(2*N)≤1/2 := by + apply (div_le_iff₀ (by positivity)).mpr + nlinarith + linarith + have hac (o : Option β) (ho : 0

norm_num [q] + | some b => simp only [q,ite_eq_left (hsupp b ho)]; positivity + have hb:=entropy_le_cross_entropy p q hqnon hqsumle hac + have hlog : Real.log (1/(2*N))= -Real.log 2-Real.log N := by + rw [Real.log_div (by norm_num) (by positivity),Real.log_one, + Real.log_mul (by norm_num) (ne_of_gt hN0)] + ring + have hsome (b : β) : p (some b)*Real.log (q (some b))= + p (some b)*(-Real.log 2-Real.log N) := by + by_cases hz : p (some b)=0 + · simp only [hz,zero_mul] + · rw [show q (some b)=1/(2*N) by + exact ite_eq_left (hsupp b (lt_of_le_of_ne (p.nonneg _) (Ne.symm hz))),hlog] + have hnone : Real.log (q none)= -Real.log 2 := by + change Real.log (1/2)=_ + rw [Real.log_div (by norm_num) (by norm_num),Real.log_one,zero_sub] + simp only [Fintype.sum_option,hsome,hnone,←Finset.sum_mul] at hb + have hsum : p none+∑ b,p (some b)=1 := by simpa only [Fintype.sum_option] using p.sum_one + have hsumlog := congrArg (fun x : ℝ => x*Real.log 2) hsum + nlinarith + +end + +section +open scoped BigOperators Classical +variable {α β ι μ : Type*} [Fintype α] [Fintype β] [Fintype ι] [Fintype μ] + +noncomputable def present (o : Option β) : ℝ := match o with + | none => 0 | some _ => 1 + +lemma present_sum (p : Law α) (f : α → Option β) : + (∑ b,map p f (some b))=∑ a,p a*present (f a) := by + rw [←sum_map p f present] + simp only [Fintype.sum_option,present,mul_zero,mul_one,zero_add] + +theorem marked_entropy (p : Law α) (f : α → ι → Option β) + (S : ι → Finset β) (N : ℝ) (hN : 1≤N) (hS : ∀ i,(S i).card≤N) + (hsupp : ∀ a,0

f a i))≤Real.log 2+ + (∑ a,p a*present (f a i))*Real.log N := by + rw [←present_sum p (fun a => f a i)] + apply option_entropy_bound _ (S i) N hN (hS i) + intro b hb + by_contra hnot + have hz : map p (fun a => f a i) (some b)=0 := by + apply Finset.sum_eq_zero + intro a _ + split_ifs with he + · exact le_antisymm (le_of_not_gt (fun hpos => hnot (hsupp a hpos i b he))) (p.nonneg a) + · rfl + linarith + have hc:=totalCorrelation_nonneg (map p f) + simp only [totalCorrelation,map_comp,Function.comp_def] at hc + have hh:=Finset.sum_le_sum (fun i (_ : i∈Finset.univ) => hi i) + simp only [Finset.sum_add_distrib,Finset.sum_const,Finset.card_univ,nsmul_eq_mul, + ←Finset.sum_mul] at hh + rw [Finset.sum_comm (f := fun i a => p a*present (f a i))] at hh + simp only [←Finset.mul_sum] at hh + linarith + +theorem marked_mask_entropy (p : Law α) (mask : α → μ) (f : α → ι → Option β) + (S : ι → Finset β) (N : ℝ) (hN : 1≤N) (hS : ∀ i,(S i).card≤N) + (hsupp : ∀ a,0

hh c)).trans_eq + simp only [mul_add,Finset.sum_add_distrib,←Finset.sum_mul] + rw [(first p).sum_one,one_mul,one_mul] + simp only [←mul_assoc] + rw [←Finset.sum_mul,sum_fiber] + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/EventMass.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/EventMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..41b77057ffdae416cc9d463faecc061d0f3fc570 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/EventMass.lean @@ -0,0 +1,164 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.Map + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped BigOperators Classical +variable {α : Type*} [Fintype α] + +noncomputable def eventMass (p : Law α) (E : Finset α) : ℝ := ∑ a ∈ E,p a + +lemma eventMass_nonneg (p : Law α) (E : Finset α) : 0≤eventMass p E := + Finset.sum_nonneg fun a _ => p.nonneg a + +lemma eventMass_le_one (p : Law α) (E : Finset α) : eventMass p E≤1 := by + rw [←p.sum_one] + exact Finset.sum_le_sum_of_subset_of_nonneg (Finset.subset_univ _) (fun a _ _ => p.nonneg a) + +lemma rejection_mass (p : Law α) (E : Finset α) : + (∑ a,if a∈E then 0 else p a)=1-eventMass p E := by + have h : (∑ a,if a∈E then p a else 0)+(∑ a,if a∈E then 0 else p a)=1 := by + rw [←Finset.sum_add_distrib] + convert p.sum_one using 1 + apply Finset.sum_congr rfl + intro a _ + split_ifs <;> simp + have he : (∑ a,if a∈E then p a else 0)=eventMass p E := by + classical + simp [eventMass] + linarith + +noncomputable def iid (p : Law α) (ι : Type*) [Fintype ι] [DecidableEq ι] : Law (ι → α) where + mass x := ∏ i,p (x i) + nonneg x := Finset.prod_nonneg fun i _ => p.nonneg (x i) + sum_one := by + classical + rw [←Fintype.prod_sum] + simp only [p.sum_one,Finset.prod_const_one] + +lemma iid_cons (p : Law α) {n : ℕ} (a : α) (x : Fin n → α) : + iid p (Fin (n+1)) (Fin.cons a x)=p a*iid p (Fin n) x := by + simp [iid,Fin.prod_univ_succ] + +noncomputable def firstAccepted (E : Finset α) : {n : ℕ} → (Fin n → α) → Option α + | 0,_ => none + | _+1,x => if x 0∈E then some (x 0) else firstAccepted E (fun i => x i.succ) + +omit [Fintype α] in +lemma firstAccepted_cons (E : Finset α) {n : ℕ} (a : α) (x : Fin n → α) : + firstAccepted E (Fin.cons a x)=if a∈E then some a else firstAccepted E x := by + simp only [firstAccepted,Fin.cons_zero,Fin.cons_succ] + +lemma sum_iid_succ (p : Law α) (n : ℕ) (f : (Fin (n+1) → α) → ℝ) : + (∑ x,iid p (Fin (n+1)) x*f x)= + ∑ a,∑ x,p a*iid p (Fin n) x*f (Fin.cons a x) := by + have h := Fintype.sum_equiv (Fin.consEquiv (fun _ : Fin (n+1) => α)) + (fun z => p z.1*iid p (Fin n) z.2*f (Fin.cons z.1 z.2)) + (fun x => iid p (Fin (n+1)) x*f x) (by + intro z + change _ = iid p (Fin (n+1)) (Fin.cons z.1 z.2)*f (Fin.cons z.1 z.2) + rw [iid_cons]) + simpa only [Fintype.sum_prod_type] using h.symm + +lemma first_integrand (p : Law α) (E : Finset α) (n : ℕ) (y : Option α) + (a : α) (x : Fin n → α) : + p a*iid p (Fin n) x*(if firstAccepted E (Fin.cons a x)=y then 1 else 0) = + (if a∈E ∧ some a=y then p a else 0)*iid p (Fin n) x+ + (if a∈E then 0 else p a)* + (if firstAccepted E x=y then iid p (Fin n) x else 0) := by + rw [firstAccepted_cons] + by_cases ha : a∈E + · by_cases hy : some a=y <;> simp [ha,hy] + · by_cases hy : firstAccepted E x=y <;> simp [ha,hy] + +lemma first_law_succ (p : Law α) (E : Finset α) (n : ℕ) (y : Option α) : + map (iid p (Fin (n+1))) (firstAccepted E (n := n+1)) y = + (∑ a,if a∈E ∧ some a=y then p a else 0)+ + (1-eventMass p E)*map (iid p (Fin n)) (firstAccepted E (n := n)) y := by + have h := sum_iid_succ p n (fun x => if firstAccepted E x=y then 1 else 0) + calc + _ = ∑ x,iid p (Fin (n+1)) x*(if firstAccepted E x=y then 1 else 0) := by + simp only [map,mul_ite,mul_one,mul_zero] + congr 2 + funext x + congr 1 + _ = ∑ a,∑ x,p a*iid p (Fin n) x* + (if firstAccepted E (Fin.cons a x)=y then 1 else 0) := h + _ = _ := by + simp only [first_integrand,Finset.sum_add_distrib,←Finset.mul_sum,(iid p (Fin n)).sum_one, + mul_one,←Finset.sum_mul,rejection_mass,map] + congr 3 + funext x + congr 1 + +lemma first_law_zero_none (p : Law α) (E : Finset α) : + map (iid p (Fin 0)) (firstAccepted E (n := 0)) none=1 := by + simp [map,firstAccepted,iid] + +lemma first_law_zero_some (p : Law α) (E : Finset α) (a : α) : + map (iid p (Fin 0)) (firstAccepted E (n := 0)) (some a)=0 := by + simp [map,firstAccepted] + +lemma first_law_none (p : Law α) (E : Finset α) (n : ℕ) : + map (iid p (Fin n)) (firstAccepted E (n := n)) none=(1-eventMass p E)^n := by + induction n with + | zero => simpa using first_law_zero_none p E + | succ n hn => + rw [first_law_succ,hn,pow_succ] + simp only [Option.some_ne_none,and_false,ite_false,Finset.sum_const_zero,zero_add] + ring + +lemma first_law_some (p : Law α) (E : Finset α) (n : ℕ) (a : α) : + map (iid p (Fin n)) (firstAccepted E (n := n)) (some a)= + (if a∈E then p a else 0)*(∑ i∈Finset.range n,(1-eventMass p E)^i) := by + induction n with + | zero => simpa using first_law_zero_some p E a + | succ n hn => + rw [first_law_succ,hn] + have he : (∑ b,if b∈E ∧ some b=some a then p b else 0)=if a∈E then p a else 0 := by + classical + simp only [Option.some.injEq] + simp only [and_comm,ite_and] + simp + rw [he,Finset.sum_range_succ'] + simp only [pow_succ',←Finset.mul_sum,pow_zero] + ring + +lemma acceptance_geom_sum (p : Law α) (E : Finset α) (n : ℕ) : + eventMass p E*(∑ i∈Finset.range n,(1-eventMass p E)^i)=1-(1-eventMass p E)^n := by + induction n with + | zero => simp + | succ n hn => + rw [Finset.sum_range_succ,mul_add,hn,pow_succ] + ring + +theorem first_success_law (p : Law α) (E : Finset α) (n : ℕ) (hn : 0 p a*z) hg] + · simp [ha] + +theorem first_success_density (p : Law α) (E : Finset α) (n : ℕ) (hn : 0 E z.1.1 z.1.2 z.2.1 z.2.2)= + ∑ a,∑ y,(first p a*second q y)* + (∑ b,∑ c,if E a b c y then fiber p a b*fiber (swap q) y c else 0) := by + have h := product_crossed_expectation p q (fun a b c y => if E a b c y then 1 else 0) + simpa only [mul_ite,mul_one,mul_zero,eventWeight] using h + +lemma crossed_endpoint (p : Law (α × β)) (q : Law (γ × δ)) (good : α → δ → Prop) : + eventWeight (product p q) (fun z => good z.1.1 z.2.2)= + ∑ a,∑ y,(first p a*second q y)*(if good a y then 1 else 0) := by + rw [crossed_eventWeight p q (fun a _ _ y => good a y)] + apply Finset.sum_congr rfl + intro a _ + apply Finset.sum_congr rfl + intro y _ + by_cases h : good a y + · simp only [h,ite_true,←Finset.mul_sum,(fiber (swap q) y).sum_one,mul_one, + (fiber p a).sum_one] + · simp only [h,ite_false,Finset.sum_const_zero,mul_zero] + +lemma crossed_conflict (p : Law (α × β)) (q : Law (γ × δ)) + (v : β → Module.Dual K V) (w : γ → V) (good : α → δ → Prop) : + eventWeight (product p q) (fun z => good z.1.1 z.2.2 ∧ v z.1.2 (w z.2.1)≠0)= + ∑ a,∑ y,(first p a*second q y)* + (if good a y then reverseMiss (fiber p a) (fiber (swap q) y) v w else 0) := by + rw [crossed_eventWeight p q (fun a b c y => good a y ∧ v b (w c)≠0)] + apply Finset.sum_congr rfl + intro a _ + apply Finset.sum_congr rfl + intro y _ + by_cases h : good a y + · simp only [h,true_and,ite_true,reverseMiss] + · simp only [h,false_and,ite_false,Finset.sum_const_zero] + +theorem integrated_charge [FiniteDimensional K V] (hdim : finrank K V=5) + (p : Law (α × β)) (q : Law (γ × δ)) + (v : β → Module.Dual K V) (w : γ → V) (good : α → δ → Prop) : + (19/20:ℝ)*eventWeight (product p q) (fun z => good z.1.1 z.2.2)≤ + 38000*eventWeight (product p q) (fun z => good z.1.1 z.2.2 ∧ v z.1.2 (w z.2.1)≠0)+ + eventWeight (product p q) (fun z => capturedEvent p q v w good z.1.1 z.1.2 z.2.1 z.2.2) := by + rw [crossed_endpoint,crossed_conflict,crossed_eventWeight] + rw [Finset.mul_sum,Finset.mul_sum,←Finset.sum_add_distrib] + apply Finset.sum_le_sum + intro a _ + rw [Finset.mul_sum,Finset.mul_sum,←Finset.sum_add_distrib] + apply Finset.sum_le_sum + intro y _ + have h := mul_le_mul_of_nonneg_left (conditional_charge hdim p q v w good a y) + (mul_nonneg ((first p).nonneg a) ((second q).nonneg y)) + nlinarith + +theorem low_conflict_bound [FiniteDimensional K V] (hdim : finrank K V=5) + (p : Law ((α × β) × (γ × δ))) + (v : β → Module.Dual K V) (w : γ → V) (good : α → δ → Prop) + (hconsistent : ∀ z,0

good z.1.1 z.2.2)≤ + 80004*(entropy (first p)+entropy (second p)-entropy p+ + eventWeight p (fun z => capturedEvent (first p) (second p) v w good + z.1.1 z.1.2 z.2.1 z.2.2)) := by + have hz : eventWeight p (fun z => good z.1.1 z.2.2 ∧ v z.1.2 (w z.2.1)≠0)=0 := by + apply eventWeight_zero + intro z hz + apply le_antisymm _ (p.nonneg z) + by_contra h + exact hz.2 (hconsistent z (lt_of_not_ge h) hz.1) + have hc := eventWeight_comparison p (product (first p) (second p)) (ac_product p) + (fun z => good z.1.1 z.2.2 ∧ v z.1.2 (w z.2.1)≠0) + rw [hz,add_zero,mutual_information] at hc + have he := eventWeight_comparison p (product (first p) (second p)) (ac_product p) + (fun z => capturedEvent (first p) (second p) v w good z.1.1 z.1.2 z.2.1 z.2.2) + rw [mutual_information] at he + have hi := entropy_subadditive p + have hcap := eventWeight_nonneg p + (fun z => capturedEvent (first p) (second p) v w good z.1.1 z.1.2 z.2.1 z.2.2) + have h := integrated_charge hdim (first p) (second p) v w good + linarith +end SharpRamseyFive.LowConflict + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {α β : Type*} [Fintype α] [Fintype β] + +lemma good_mixture_zero (μ : Law (Finset α)) (G : Finset α) + (hG : ∀A,0<μ A→A⊆G) {a : α} (ha : a∉G) : + (∑A,μ A*uniformWeight A a)=0 := by + apply Finset.sum_eq_zero + intro A _ + by_cases hm : μ A=0 + · simp [hm] + have hp : 0<μ A := lt_of_le_of_ne (μ.nonneg A) (Ne.symm hm) + have ht : a∉A := fun hh=>ha (hG A hp hh) + simp [uniformWeight,ht] + +theorem independent_good_subset_domination (R : α→β→Prop) + (p : Law α) (r : Law β) (GA : Finset α) (GB : Finset β) + (μ : Law (Finset α)) (ν : Law (Finset β)) (L : ℝ) (hL : 0≤L) + (hGA : ∀A,0<μ A→A⊆GA) (hGB : ∀B,0<ν B→B⊆GB) + (hμ : ∀a,(∑A,μ A*uniformWeight A a)≤L*p a) + (hν : ∀b,(∑B,ν B*uniformWeight B b)≤L*r b) : + (∑A,∑B,μ A*ν B*relationMass R (uniformWeight A) (uniformWeight B))≤ + L^2*relationMass (fun a b=>a∈GA ∧ b∈GB ∧ R a b) p r := by + rw [independent_subset_relation] + unfold relationMass + simp only [Finset.sum_filter] + conv_rhs => rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro z _ + by_cases ha : z.1∈GA + · by_cases hb : z.2∈GB + · by_cases hR : R z.1 z.2 + · simp only [ha,hb,hR,and_self,↓reduceIte] + have hn : 0≤∑B,ν B*uniformWeight B z.2 := Finset.sum_nonneg + (fun B _=>mul_nonneg (ν.nonneg B) (uniformWeight_nonneg B z.2)) + have hh := mul_le_mul (hμ z.1) (hν z.2) hn (mul_nonneg hL (p.nonneg z.1)) + nlinarith only [hh] + · simp [hR] + · rw [good_mixture_zero ν GB hGB hb] + simp [hb] + · rw [good_mixture_zero μ GA hGA ha] + simp [ha] + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/EventuallyHighPolyCost.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/EventuallyHighPolyCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..3a2d9de75cfc09015e32c5f52de5113031c48691 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/EventuallyHighPolyCost.lean @@ -0,0 +1,98 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.HighPolyConstant + +namespace OAI + +noncomputable section +namespace SharpRamseyFive.ScoreGeometry +open Filter ParameterHierarchy +open scoped Topology + +theorem eventually_high_poly_cost {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (k c : ℝ) (hk : 0≤k) (hc : 0≤c) : + ∀ᶠ σ : ℝ in atTop,∀ D R p a : ℝ,Range η σ D R → + 0≤p → p≤k*σ → 0≤a → a≤c*σ*Real.exp (P η σ D R/50) → + Real.exp (P η σ D R/50)+2*(p+1)*highBudgetPoly a p (P η σ D R)≤ + Real.exp (P η σ D R/5) := by + let C := highPolyConstant k c + have hC : 0 U ∩ V)).elim 0 (evictionFraction X)) ≤ + evictionFraction X U + ρ := by + calc + _ ≤ ∑ ω, p ω * (evictionFraction X U + evictionFraction X (ReverseCap.ambientTest (out ω))) := by + apply Finset.sum_le_sum + intro ω hω + apply mul_le_mul_of_nonneg_left _ (p.nonneg ω) + cases ho : out ω with + | none => simpa [ReverseCap.ambientTest, evictionFraction_univ] using evictionFraction_nonneg X U + | some V => simpa [ReverseCap.ambientTest] using evictionFraction_inter X U V + _ = evictionFraction X U + (∑ ω, p ω * evictionFraction X (ReverseCap.ambientTest (out ω))) := by + simp only [mul_add, Finset.sum_add_distrib, ← Finset.sum_mul, p.sum_one, one_mul] + _ ≤ _ := add_le_add_right h _ + +lemma optional_constant_drift {M : Ω → Type*} (p : Law Ω) (enc : ∀ ω, Option (M ω)) + (c : ℝ) (hc : 0 ≤ c) : + (∑ ω, p ω * (enc ω).elim 0 (fun _ => c)) ≤ c := by + calc + _ ≤ ∑ ω, p ω * c := by + apply Finset.sum_le_sum + intro ω hω + apply mul_le_mul_of_nonneg_left _ (p.nonneg ω) + cases enc ω <;> simp [hc] + _ = _ := by rw [← Finset.sum_mul, p.sum_one, one_mul] + +omit [Fintype A] in +theorem reached_trim_mass {C : Type*} [Fintype C] + (p : Law Ω) (ctx : Ω → Option C) (domain : C → Finset A) (X : Finset A) + (ρ : ℝ) (h : (∑ ω, p ω * (ctx ω).elim 0 (fun c => evictionFraction X (domain c))) ≤ ρ) : + eventMass p (Finset.univ.filter (fun ω => ∃ c, ctx ω = some c ∧ + ((X ∩ domain c).card : ℝ) < (9/10:ℝ)*X.card)) ≤ 10*ρ := by + let E := Finset.univ.filter (fun ω => ∃ c, ctx ω = some c ∧ + ((X ∩ domain c).card : ℝ) < (9/10:ℝ)*X.card) + have hm := event_markov p (fun ω => (ctx ω).elim 0 (fun c => evictionFraction X (domain c))) + (by intro ω; cases ctx ω with + | none => exact le_rfl + | some c => exact evictionFraction_nonneg _ _) + (1/10) E (by + intro ω hω + obtain ⟨c, he, ht⟩ := (Finset.mem_filter.mp hω).2 + simpa [he] using trim_failure_inter X (domain c) ht) + change eventMass p E ≤ _ + linarith only [hm, h] + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/FinalMarking.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/FinalMarking.lean new file mode 100644 index 0000000000000000000000000000000000000000..eaab63f85dd5afcd6379a79c86e384171cdf4a78 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/FinalMarking.lean @@ -0,0 +1,140 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Streams.SelectedLength +import OAI.Combinatorics.RamseyFive.Entropy.DescriptionClean + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +local instance finalMarkingDecEq (N : ℕ) : DecidableEq (Fin N) := Classical.decEq _ +variable {K V κ : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] [Fintype κ] {N : ℕ} + +theorem final_marking_entropy (hdim : finrank K V=5) + (p : Law (κ×(Fin N→FlagPair K V))) + (hf : ∀ c x,0

activeDeficit (fiber (withMessage p markingMessage) z) (unspecified z.2) J) := by + have hh:=mean_mono_pos (first (withMessage p markingMessage)) (f:=fun _=>0) + (g:=fun z=>activeDeficit (fiber (withMessage p markingMessage) z) (unspecified z.2) J) + (fun z hz=>marking_deficit_nonneg hdim p hf hc z.1 z.2 hz) + simpa only [mean_const] using hh + dsimp [J] at hd hn + linarith + +theorem final_marking_entropy_on_support (hdim : finrank K V=5) + (p : Law (κ×(Fin N→FlagPair K V))) + (hf : ∀ c x,0

if 0p.nonneg (c,y)) (Finset.mem_univ x))) + simpa only [D,ite_eq_left hp] using hsupp c x hx i + · exact hΔ + · exact hctx +end +end SharpRamseyFive.Marking + +namespace SharpRamseyFive.SelectedTuple +open Module ProjectiveIncidence FiniteEntropy Windows Marking +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +local instance cfmFinDE (n : ℕ) : DecidableEq (Fin n) := Classical.decEq _ +variable {K V α : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] [Nonempty (ℙ K (Dual K (Dual K V)))] + [Fintype α] {N n : ℕ} {adm : (Fin N→α)→Prop} {d Λ Δ M : ℝ} +lemma CodedStream.final_entropy_bound (hd : finrank K V=5) (hΔ : 0≤Δ) + (S : CodedStream (K:=K) (V:=V) N n adm d Λ (Real.log (153*(Nat.card K:ℝ)^4)+Δ) M) : + entropy (map S.stream.law S.stream.tuple)≤n*Real.log (153*(Nat.card K:ℝ)^4)+Λ+ + n*Real.log 800+expensiveBound K V*Δ := by + have hcheap : 0≤Real.log (153*(Nat.card K:ℝ)^4) := by + apply Real.log_nonneg + have hq : (1:ℝ)≤Nat.card K := by exact_mod_cast (Finite.one_lt_card (α:=K)).le + have hh:=one_le_pow₀ (n:=4) hq + linarith + let p:=pair S.stream.law S.description.context S.stream.tuple + have hp : ∀c x,0

(S.description.context z,S.stream.tuple z)) (c,x) hx + have h:=final_marking_entropy hd p + (fun c x hx=>by obtain ⟨z,hz,he⟩:=hp c x hx;cases he;exact S.geometric.incident z hz) + (fun c x hx=>by obtain ⟨z,hz,he⟩:=hp c x hx;cases he;exact S.geometric.consistent z hz) + S.description.cleanDomain (Real.exp (Real.log (153*(Nat.card K:ℝ)^4)+Δ)) Λ + (Real.one_le_exp_iff.mpr (add_nonneg hcheap hΔ)) S.description.clean_cap + (fun c x hx=>by obtain ⟨z,hz,he⟩:=hp c x hx;cases he;exact S.description.clean_contains z hz) + (by rw [Real.log_exp];linarith) + (by simpa only [p,first_pair] using S.description.entropy_bound) + simpa only [p,second_pair,Real.log_exp,add_sub_cancel_left,expensiveBound] using h +end +end SharpRamseyFive.SelectedTuple + +namespace SharpRamseyFive.SelectedTuple +open FiniteEntropy Filter +open scoped Classical +noncomputable section + +theorem eventually_stream_entropy_gain {η : ℝ} (hη : 0<η) (c C A : ℝ) (hc : 0η*Real.log σ) atTop atTop := + Real.tendsto_log_atTop.const_mul_atTop hη + have he : Tendsto (fun σ : ℝ=>c*Real.exp σ) atTop atTop := + Real.tendsto_exp_atTop.const_mul_atTop hc + filter_upwards [ht.eventually_ge_atTop (Real.log 153+A+2-Real.log c), + he.eventually_ge_atTop (Real.log (2*C))] with σ ht he + intro Ω α β _ _ _ _ N n adm S hσ hα hN hlen hC + have hs : 0<σ := zero_lt_one.trans_le hσ + have hn : 0s + | s,_+1,x=>runSamples step (step s (x 0)) (fun i=>x i.succ) + +def failedGrowth (step : S→A→S) (rank : S→ℕ) (d : ℕ) (s : S) (a : A) : Prop := + rank s0 + | s,_+1,x=>(if failedGrowth step rank d s (x 0) then 1 else 0)+ + growthFailures step rank d (step s (x 0)) (fun i=>x i.succ) + +lemma runSamples_cons (step : S→A→S) (s : S) {n : ℕ} (a : A) (x : Fin n→A) : + runSamples step s (Fin.cons a x)=runSamples step (step s a) x := by + simp only [runSamples,Fin.cons_zero,Fin.cons_succ] + +lemma growthFailures_cons (step : S→A→S) (rank : S→ℕ) (d : ℕ) (s : S) + {n : ℕ} (a : A) (x : Fin n→A) : + growthFailures step rank d s (Fin.cons a x)= + (if failedGrowth step rank d s a then 1 else 0)+growthFailures step rank d (step s a) x := by + simp only [growthFailures,Fin.cons_zero,Fin.cons_succ] + +lemma runSamples_rank_mono (step : S→A→S) (rank : S→ℕ) + (hmono : ∀ s a,rank s≤rank (step s a)) (s : S) {n : ℕ} (x : Fin n→A) : + rank s≤rank (runSamples step s x) := by + induction n generalizing s with + | zero=>exact le_rfl + | succ n ih=>exact (hmono _ _).trans (ih _ _) + +lemma zero_growthFailures (step : S→A→S) (rank : S→ℕ) (d : ℕ) + (hmono : ∀ s a,rank s≤rank (step s a)) (s : S) {n : ℕ} (x : Fin n→A) + (h : growthFailures step rank d s x=0) : + min d (rank s+n)≤rank (runSamples step s x) := by + induction n generalizing s with + | zero=>simpa only [Nat.add_zero,runSamples] using Nat.min_le_right d (rank s) + | succ n ih=> + have hn : ¬failedGrowth step rank d s (x 0) := by + intro hn + simp only [growthFailures,hn,ite_true] at h + omega + have ht : growthFailures step rank d (step s (x 0)) (fun i=>x i.succ)=0 := by + simpa only [growthFailures,hn,ite_false,Nat.zero_add] using h + have hh:=ih (step s (x 0)) (fun i=>x i.succ) ht + have hm:=hmono s (x 0) + have hm':=runSamples_rank_mono step rank hmono (step s (x 0)) (fun i=>x i.succ) + change min d (rank s+(n+1))≤rank (runSamples step (step s (x 0)) (fun i=>x i.succ)) + unfold failedGrowth at hn + omega + +variable [Fintype A] + +theorem growthFailures_mean (p : Law A) (step : S→A→S) (rank : S→ℕ) (d : ℕ) + (e : ℝ) (hstep : ∀ s,eventWeight p (failedGrowth step rank d s)≤e) + (s : S) (n : ℕ) : + (∑ x,iid p (Fin n) x*(growthFailures step rank d s x:ℝ))≤n*e := by + induction n generalizing s with + | zero=>simp [growthFailures] + | succ n ih=> + rw [sum_iid_succ] + have he : (∑ a,∑ x,p a*iid p (Fin n) x* + (growthFailures step rank d s (Fin.cons a x):ℝ))= + eventWeight p (failedGrowth step rank d s)+ + ∑ a,p a*(∑ x,iid p (Fin n) x*(growthFailures step rank d (step s a) x:ℝ)) := by + simp only [growthFailures_cons,Nat.cast_add,Nat.cast_ite,Nat.cast_one,Nat.cast_zero, + mul_add,Finset.sum_add_distrib,eventWeight] + congr 1 + · apply Finset.sum_congr rfl + intro a _ + rw [←Finset.sum_mul,←Finset.mul_sum,(iid p (Fin n)).sum_one,mul_one] + simp only [mul_ite,mul_one,mul_zero] + · apply Finset.sum_congr rfl + intro a _ + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro x _ + ring + rw [he] + calc + _ ≤ e+∑ a,p a*(n*e) := add_le_add (hstep s) + (Finset.sum_le_sum fun a _=>mul_le_mul_of_nonneg_left (ih _) (p.nonneg a)) + _ = _ := by rw [←Finset.sum_mul,p.sum_one]; push_cast; ring + +theorem iid_growth_failure (p : Law A) (step : S→A→S) (rank : S→ℕ) (d : ℕ) + (hmono : ∀ s a,rank s≤rank (step s a)) (e : ℝ) + (hstep : ∀ s,eventWeight p (failedGrowth step rank d s)≤e) + (s : S) (n : ℕ) (hstart : d≤rank s+n) : + eventWeight (iid p (Fin n)) (fun x=>rank (runSamples step s x)simp [firstAccepted] + | succ n ih=> + rw [firstAccepted] + split_ifs with h + · simp only [false_iff,not_forall] + exact ⟨0,by simpa using h⟩ + · rw [ih] + constructor + · intro hh i + refine Fin.cases ?_ (fun j=>hh j) i + exact h + · intro hh i + exact hh i.succ + +variable [Fintype A] + +lemma iid_avoidance (p : Law A) (E : Finset A) (n : ℕ) : + eventWeight (iid p (Fin n)) (fun x=>∀ i,x i∉E)=(1-eventMass p E)^n := by + rw [←first_law_none p E n] + unfold eventWeight map + apply Finset.sum_congr rfl + intro x _ + rw [firstAccepted_none_iff] + +lemma eventWeight_mono (p : Law A) (P Q : A→Prop) (h : ∀ a,P a→Q a) : + eventWeight p P≤eventWeight p Q := by + apply Finset.sum_le_sum + intro a _ + by_cases hp : P a + · simp only [hp,h a hp,ite_true,le_refl] + · simp only [hp,ite_false] + split_ifs <;> first | exact p.nonneg a | exact le_rfl + +lemma eventWeight_union (p : Law A) (P Q : A→Prop) : + eventWeight p (fun a=>P a ∨ Q a)≤eventWeight p P+eventWeight p Q := by + unfold eventWeight + rw [←Finset.sum_add_distrib] + apply Finset.sum_le_sum + intro a _ + by_cases hp : P a <;> by_cases hq : Q a <;> + simp only [hp,hq,true_or,false_or,or_false,ite_true,ite_false,zero_add,add_zero,le_refl] + exact le_add_of_nonneg_right (p.nonneg a) +end +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/FiniteKernels.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/FiniteKernels.lean new file mode 100644 index 0000000000000000000000000000000000000000..a0b1415681ccee92df0cf446d665d617821dccf3 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/FiniteKernels.lean @@ -0,0 +1,228 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.BlockReveal + +namespace OAI + +noncomputable section + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped Classical BigOperators +variable {α β γ : Type*} [Fintype α] [Fintype β] [Fintype γ] + +def sigmaLaw {A : Type*} [Fintype A] {B : A→Type*} [∀ a,Fintype (B a)] + (p : Law A) (q : ∀ a,Law (B a)) : Law (Sigma B) where + mass z := p z.1*q z.1 z.2 + nonneg z := mul_nonneg (p.nonneg _) ((q z.1).nonneg _) + sum_one := by rw [Fintype.sum_sigma]; simp only [←Finset.mul_sum,(q _).sum_one,mul_one,p.sum_one] + +lemma mean_sigma {A : Type*} [Fintype A] {B : A→Type*} [∀ a,Fintype (B a)] + (p : Law A) (q : ∀ a,Law (B a)) (f : Sigma B→ℝ) : + mean (sigmaLaw p q) f=mean p (fun a=>mean (q a) (fun b=>f ⟨a,b⟩)) := by + simp only [mean,sigmaLaw,Fintype.sum_sigma,Finset.mul_sum,mul_assoc] + +lemma map_adaptive_first (p : Law α) (q : α→Law β) : + map (adaptiveLaw p q) Prod.fst=p := by + apply Law.ext + funext a + simp only [map,adaptiveLaw,Fintype.sum_prod_type] + simp only [Finset.sum_ite_irrel,←Finset.mul_sum,(q _).sum_one,mul_one] + simp + +lemma second_adaptive (p : Law α) (q : α→Law β) (b : β) : + second (adaptiveLaw p q) b=∑ a,p a*q a b := rfl + +lemma fiber_adaptive (p : Law α) (q : α→Law β) (a : α) (ha : 0

s z.1)=map p s := by + change map (adaptiveLaw p q) (s ∘ Prod.fst)=map p s + rw [←map_comp,map_adaptive_first] + +lemma Law.ext_mean (p q : Law α) (h : ∀ f,mean p f=mean q f) : p=q := by + apply Law.ext + funext a + have hh:=h (fun b=>if b=a then 1 else 0) + simpa only [mean,mul_ite,mul_one,mul_zero,Finset.sum_ite_eq',Finset.mem_univ,ite_true] using hh + +lemma adaptive_reconstruct (q : Law (α×β)) : + adaptiveLaw (first q) (fiber q)=q := by + apply Law.ext + funext z + exact (mass_eq_first_mul_fiber q z.1 z.2).symm + +lemma map_adaptive_source (p : Law α) (x : α→β) (q : β→Law γ) : + map (adaptiveLaw p (fun a=>q (x a))) (fun z=>(x z.1,z.2))= + adaptiveLaw (map p x) q := by + apply Law.ext_mean + intro f + rw [mean_map,mean_adaptive,mean_adaptive,mean_map] + +def liftObserved (p : Law α) (x : α→β) (q : Law (β×γ)) : Law (α×γ) := + adaptiveLaw p (fun a=>fiber q (x a)) + +lemma liftObserved_original (p : Law α) (x : α→β) (q : Law (β×γ)) : + map (liftObserved p x q) Prod.fst=p := map_adaptive_first _ _ + +lemma liftObserved_joint (p : Law α) (x : α→β) (q : Law (β×γ)) + (hq : first q=map p x) : + map (liftObserved p x q) (fun z=>(x z.1,z.2))=q := by + rw [liftObserved,map_adaptive_source,←hq,adaptive_reconstruct] + +lemma liftObserved_stream (p : Law α) (x : α→β) (q : Law (β×γ)) + {υ : Type*} [Fintype υ] (s : α→υ) : + map (liftObserved p x q) (fun z=>s z.1)=map p s := adaptive_stream _ _ _ + +end + +open scoped Classical BigOperators +variable {B A T β : Type} [Fintype B] [Fintype A] [Fintype T] [Fintype β] [Nonempty A] +local instance blockHistIndexDecEq : DecidableEq ((B × A) ⊕ T) := Classical.decEq _ +local instance blockHistSubtypeDecEq (E : Finset ((B × A) ⊕ T)) : DecidableEq E := Classical.decEq _ + +def BlockHistory (B A T β : Type) [Fintype B] [Fintype A] [Fintype T] : ℕ→Type + | 0 => Unit + | n+1 => Σ s : B→A, (representativeSet (T:=T) s→β)×BlockHistory B A T β n + +instance blockHistoryFintype : (n : ℕ)→Fintype (BlockHistory B A T β n) + | 0 => inferInstanceAs (Fintype Unit) + | n+1 => by + letI := blockHistoryFintype n + exact inferInstanceAs (Fintype (Σ s : B→A, + (representativeSet (T:=T) s→β)×BlockHistory B A T β n)) + +def historyPosterior (p : Law (((B×A)⊕T)→β)) : + {n : ℕ}→BlockHistory B A T β n→Law (((B×A)⊕T)→β) + | 0,_ => p + | _n+1,h => historyPosterior (fiber (reveal p (representativeSet h.1)) h.2.1) h.2.2 + +def historyUnused (S : B→Finset A) : {n : ℕ}→BlockHistory B A T β n→B→Finset A + | 0,_ => S + | _n+1,h => historyUnused (eraseBlock S h.1) h.2.2 + +def historyLaw (p : Law (((B×A)⊕T)→β)) (S : B→Finset A) : + (n : ℕ)→Law (BlockHistory B A T β n) + | 0 => uniformType Unit + | n+1 => sigmaLaw (freshBlockLaw S) fun s=> + adaptiveLaw (first (reveal p (representativeSet s))) fun a=> + historyLaw (fiber (reveal p (representativeSet s)) a) (eraseBlock S s) n + +theorem history_posterior_mean (p : Law (((B×A)⊕T)→β)) (S : B→Finset A) + (n : ℕ) (x : ((B×A)⊕T)→β) : + mean (historyLaw p S n) (fun h=>historyPosterior p h x)=p x := by + induction n generalizing p S with + | zero => + change mean (uniformType Unit) (fun _ => p x) = p x + exact mean_const _ _ + | succ n ih => + change mean (sigmaLaw (freshBlockLaw S) fun s=> + adaptiveLaw (first (reveal p (representativeSet s))) fun a=> + historyLaw (fiber (reveal p (representativeSet s)) a) (eraseBlock S s) n) + (fun h=>historyPosterior (fiber (reveal p (representativeSet h.1)) h.2.1) h.2.2 x)=p x + rw [mean_sigma] + have hpoint (s : B→A) : mean (adaptiveLaw (first (reveal p (representativeSet s))) fun a=> + historyLaw (fiber (reveal p (representativeSet s)) a) (eraseBlock S s) n) + (fun z=>historyPosterior (fiber (reveal p (representativeSet s)) z.1) z.2 x)=p x := by + rw [mean_adaptive] + simp_rw [ih] + change (∑ a,first (reveal p (representativeSet s)) a* + fiber (reveal p (representativeSet s)) a x)=p x + simp_rw [←mass_eq_first_mul_fiber] + exact congrArg (fun r : Law (((B×A)⊕T)→β)=>r x) (second_reveal p _) + simp_rw [hpoint] + exact mean_const _ _ + +def historyTupleLaw (p : Law (((B×A)⊕T)→β)) (S : B→Finset A) (n : ℕ) : + Law (BlockHistory B A T β n×(((B×A)⊕T)→β)) := + adaptiveLaw (historyLaw p S n) (historyPosterior p) + +lemma historyTuple_second (p : Law (((B×A)⊕T)→β)) (S : B→Finset A) (n : ℕ) : + second (historyTupleLaw p S n)=p := by + apply Law.ext + funext x + exact history_posterior_mean p S n x + +lemma historyTuple_fiber (p : Law (((B×A)⊕T)→β)) (S : B→Finset A) + (n : ℕ) (h : BlockHistory B A T β n) (hh : 0mean (freshBlockLaw (historyUnused S h)) + (J (historyPosterior p h) (historyUnused S h))) := by + induction n generalizing p S with + | zero => + change mean (freshBlockLaw S) (J p S)=mean (uniformType Unit) (fun _=>mean (freshBlockLaw S) (J p S)) + exact (mean_const _ _).symm + | succ n ih => + change mean (freshBlockLaw S) (fun s=>mean (first (reveal p (representativeSet s))) + (fun a=>blockRoundMean J (fiber (reveal p (representativeSet s)) a) + (eraseBlock S s) (n+1) (Fin.last n)))=_ + simp_rw [ih] + change _=mean (sigmaLaw (freshBlockLaw S) fun s=> + adaptiveLaw (first (reveal p (representativeSet s))) fun a=> + historyLaw (fiber (reveal p (representativeSet s)) a) (eraseBlock S s) n) + (fun h => mean (freshBlockLaw (historyUnused (eraseBlock S h.1) h.2.2)) + (J (historyPosterior (fiber (reveal p (representativeSet h.1)) h.2.1) h.2.2) + (historyUnused (eraseBlock S h.1) h.2.2))) + rw [mean_sigma] + apply mean_congr + intro s + rw [mean_adaptive] + +lemma blockRoundMean_total_irrel + (J : Law (((B×A)⊕T)→β)→(B→Finset A)→(B→A)→ℝ) + (p : Law (((B×A)⊕T)→β)) (S : B→Finset A) (n m : ℕ) + (i : Fin n) (j : Fin m) (hij : i.val=j.val) : + blockRoundMean J p S n i=blockRoundMean J p S m j := by + induction n generalizing p S m with + | zero => exact Fin.elim0 i + | succ n ih => + cases m with + | zero => exact Fin.elim0 j + | succ m => + cases i using Fin.cases with + | zero => + have hj : j=0 := Fin.ext (by simpa using hij.symm) + subst j + rfl + | succ i => + have hj : j≠0 := by intro hz;subst j;simp at hij + obtain ⟨j,rfl⟩:=Fin.exists_succ_eq.mpr hj + simp only [blockRoundMean,Fin.cases_succ] + apply mean_congr + intro s + apply mean_congr + intro a + apply ih _ _ _ i j + simpa using hij + +theorem history_pre_round + (J : Law (((B×A)⊕T)→β)→(B→Finset A)→(B→A)→ℝ) + (p : Law (((B×A)⊕T)→β)) (S : B→Finset A) (n : ℕ) (i : Fin n) : + blockRoundMean J p S n i= + mean (historyLaw p S i.val) (fun h=>mean (freshBlockLaw (historyUnused S h)) + (J (historyPosterior p h) (historyUnused S h))) := by + rw [blockRoundMean_total_irrel J p S n (i.val+1) i (Fin.last i.val) rfl] + exact history_round_mean J p S i.val + +end SharpRamseyFive.FiniteEntropy + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/FiniteNodeCost.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/FiniteNodeCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c281264a8c91df668377543bdacc75a85e9c0e2 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/FiniteNodeCost.lean @@ -0,0 +1,57 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.FourFinitePredictor + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry +open scoped Classical LinearAlgebra.Projectivization NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +omit [Finite K] [FiniteDimensional K V] in +lemma finiteNodeNextLaw_produced (A UA : Finset (ℙ K V)) (B UB : Finset (ℙ K (Dual K V))) + (hA : A.Nonempty) (hB : B.Nonempty) (c M : ℝ) (hc : 0gateOutputLaw (active i j θ) + (guardedNodeLaw (pred i j θ) σ hσ hq hd.le (X i) (UA i j θ) (B₀ i j θ) (UB i j θ) + (hXnon i) (hBnon i j θ) c δ τ (M i j θ) hδ)) + (fun out=>out.map Prod.fst) (50*(Nat.card K:ℝ)/(9*(c*δ))) L + (by positivity) hL hX hY ?_ + intro i j θ b + have h := (guardedNode_original (pred i j θ) σ hσ hq hd hq3 (X i) (UA i j θ) + (B₀ i j θ) (UB i j θ) (hXnon i) (hBnon i j θ) c δ τ (M i j θ) hc hc9 hδ hτ).1 b + have hh := gateOutput_event_le (active i j θ) _ (fun out=>Excludes b (out.map Prod.fst)) + (by simp [Excludes]) _ (by positivity) h + have he : (Finset.univ.filter (fun a=>Incident a b))∩X i=(X i).filter (fun a=>Incident a b) := by + ext a;simp [and_comm] + simpa only [he] using hh + +theorem finiteNode_second_process {ι κ Θ : Type*} [Fintype ι] [Fintype κ] [Fintype Θ] + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (p : Law (ℙ K (Dual K V))) (r : Law (ℙ K V)) (μ : Law ι) (ν : Law κ) + (X : ι→Finset (ℙ K (Dual K V))) (Y : κ→Finset (ℙ K V)) (hXnon : ∀i,(X i).Nonempty) + (prior : ι→κ→Law Θ) (active : ι→κ→Θ→Prop) + (A₀ UA : ι→κ→Θ→Finset (ℙ K V)) (UB : ι→κ→Θ→Finset (ℙ K (Dual K V))) + (hAnon : ∀i j θ,(A₀ i j θ).Nonempty) + (pred : ι→κ→Θ→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (c δ τ L : ℝ) (M : ι→κ→Θ→ℝ) (hc : 0Incident a b) p r := by + refine adaptive_ambient_eviction (fun b a=>Incident a b) p r μ ν X Y prior + (fun i j θ=>gateOutputLaw (active i j θ) + (guardedNodeLaw (pred i j θ) σ hσ hq hd.le (A₀ i j θ) (UA i j θ) (X i) (UB i j θ) + (hAnon i j θ) (hXnon i) c δ τ (M i j θ) hδ)) + (fun out=>out.map Prod.snd) (50*(Nat.card K:ℝ)/(9*((9:ℝ)/10*δ))) L + (by positivity) hL hX hY ?_ + intro i j θ a + have h := (guardedNode_original (pred i j θ) σ hσ hq hd hq3 (A₀ i j θ) (UA i j θ) + (X i) (UB i j θ) (hAnon i j θ) (hXnon i) c δ τ (M i j θ) hc hc9 hδ hτ).2 a + have hh := gateOutput_event_le (active i j θ) _ (fun out=>Excludes a (out.map Prod.snd)) + (by simp [Excludes]) _ (by positivity) h + have he : (Finset.univ.filter (Incident a))∩X i=(X i).filter (Incident a) := by + ext b;simp [and_comm] + simpa only [he] using hh +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/FinitePiLaw.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/FinitePiLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..55e18972faca912c537b97cee3438624b637822b --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/FinitePiLaw.lean @@ -0,0 +1,247 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.EventMass + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped Classical BigOperators +variable {ι : Type*} [Fintype ι] [DecidableEq ι] {β : ι→Type*} [∀i,Fintype (β i)] + +noncomputable def piLaw (p : ∀i,Law (β i)) : Law (∀i,β i) where + mass x := ∏i,p i (x i) + nonneg x := Finset.prod_nonneg fun i _=>(p i).nonneg _ + sum_one := by rw [←Fintype.prod_sum];simp only [(p _).sum_one,Finset.prod_const_one] + +lemma piLaw_prod (p : ∀i,Law (β i)) (f : ∀i,β i→ℝ) : + (∑x,piLaw p x*(∏i,f i (x i)))=∏i,∑a,p i a*f i a := by + simp only [piLaw,←Finset.prod_mul_distrib] + exact (Fintype.prod_sum (fun i a=>p i a*f i a)).symm + +lemma piLaw_eval_expectation (p : ∀i,Law (β i)) (i : ι) (f : β i→ℝ) : + (∑x,piLaw p x*f (x i))=∑a,p i a*f a := by + let g : ∀j,β j→ℝ := fun j a=>if h : j=i then f (h ▸ a) else 1 + have hx (x : ∀j,β j) : (∏j,g j (x j))=f (x i) := by + have he : (fun j=>g j (x j))=Function.update (fun _=>1) i (f (x i)) := by + funext j + by_cases hj : j=i + · subst j;simp [g] + · simp [g,hj] + rw [he,Finset.prod_update_of_mem (Finset.mem_univ i)] + simp + have hs : (fun j=>∑a,p j a*g j a)=Function.update (fun _=>1) i (∑a,p i a*f a) := by + funext j + by_cases hj : j=i + · subst j;simp [g] + · simp [g,hj,(p j).sum_one] + have hh := piLaw_prod p g + simp_rw [hx] at hh + rw [hs,Finset.prod_update_of_mem (Finset.mem_univ i)] at hh + simpa using hh + +lemma piLaw_eval (p : ∀i,Law (β i)) (i : ι) : map (piLaw p) (fun x=>x i)=p i := by + apply Law.ext + funext a + have hm := piLaw_eval_expectation p i (fun b=>if b=a then 1 else 0) + simpa only [map,mul_ite,mul_one,mul_zero,Finset.sum_ite_eq',Finset.mem_univ,ite_true] using hm +end + +open scoped BigOperators Classical +variable {α : Type*} [Fintype α] + +lemma entropy_le_cross_subprob (p : Law α) (r : α→ℝ) + (hr : ∀a,0 + point_log_ratio (p a) (r a) (p.nonneg _) (hr _).le (fun _=>hr _)) + have he : (∑a,p a*Real.log (p a/r a))= + (∑a,p a*Real.log (p a))-(∑a,p a*Real.log (r a)) := by + rw [←Finset.sum_sub_distrib] + apply Finset.sum_congr rfl + intro a _ + by_cases hz : p a=0 + · simp [hz] + · rw [Real.log_div hz (hr _).ne'];ring + rw [Finset.sum_sub_distrib,p.sum_one,he] at hh + dsimp only [entropy] + linarith + +lemma finite_geometric_mass (z : α→ℕ) (hz : Function.Injective z) + (r : ℝ) (hr : 0≤r) (hr1 : r≤1) : + (∑a,(1-r)*r^(z a))≤1 := by + let S := Finset.univ.image z + let N := S.sup id+1 + have hsub : S⊆Finset.range N := by + intro n hn + apply Finset.mem_range.mpr + have := Finset.le_sup (f:=id) hn + dsimp only [id] at this + dsimp only [N] + omega + have he (m : ℕ) : (∑n∈Finset.range m,(1-r)*r^n)=1-r^m := by + induction m with + | zero => simp + | succ m ih => rw [Finset.sum_range_succ,ih,pow_succ];ring + have hi : (∑a,(1-r)*r^(z a))=∑n∈S,(1-r)*r^n := by + dsimp only [S] + rw [Finset.sum_image] + exact fun a _ b _ h=>hz h + rw [hi] + calc + _ ≤ ∑n∈Finset.range N,(1-r)*r^n := Finset.sum_le_sum_of_subset_of_nonneg hsub + (fun _ _ _=>mul_nonneg (sub_nonneg.mpr hr1) (pow_nonneg hr _)) + _ = 1-r^N := he N + _ ≤ 1 := by linarith [pow_nonneg hr N] + +theorem integer_entropy (p : Law α) (z : α→ℕ) (hz : Function.Injective z) + (M : ℝ) (hM : 0(1-r)*r^(z a)) + (fun a=>mul_pos (sub_pos.mpr hr1) (pow_pos hr _)) hs + have he : (∑a,p a*Real.log ((1-r)*r^(z a)))= + Real.log (1-r)+(∑a,p a*(z a:ℝ))*Real.log r := by + simp only [Real.log_mul (sub_pos.mpr hr1).ne' (pow_ne_zero _ hr.ne'),Real.log_pow] + simp only [mul_add,Finset.sum_add_distrib,←mul_assoc,←Finset.sum_mul,p.sum_one,one_mul] + rw [he] at hh + have hlogr : Real.log r≤0 := Real.log_nonpos hr.le hr1.le + have hm' := mul_le_mul_of_nonpos_right hm hlogr + have h1 : 1-r=1/(M+1) := by dsimp only [r];field_simp;ring + have hl1 : Real.log (1-r)= -Real.log (M+1) := by + rw [h1,Real.log_div one_ne_zero hMp.ne',Real.log_one,zero_sub] + have hlog := Real.log_le_sub_one_of_pos (div_pos hMp hM) + have hlr : Real.log ((M+1)/M)= -Real.log r := by + rw [Real.log_div hMp.ne' hM.ne'] + dsimp only [r] + rw [Real.log_div hM.ne' hMp.ne'] + ring + rw [hlr] at hlog + have hmul := mul_le_mul_of_nonneg_left hlog hM.le + have heq : M*((M+1)/M-1)=1 := by field_simp;ring + rw [heq] at hmul + rw [hl1] at hh + nlinarith + +noncomputable def atomLevel (p : Law α) (a : α) : ℕ := ⌊-Real.log (p a)⌋₊ +noncomputable def levelRange (p : Law α) : Finset ℕ := Finset.univ.image (atomLevel p) +abbrev Level (p : Law α) := ↥(levelRange p) +noncomputable def levelIndex (p : Law α) (a : α) : Level p := + ⟨atomLevel p a,Finset.mem_image.mpr ⟨a,Finset.mem_univ _,rfl⟩⟩ +noncomputable def levelLaw (p : Law α) : Law (Level p) := map p (levelIndex p) +noncomputable def levelCell (p : Law α) (n : Level p) : Finset α := + Finset.univ.filter (fun a=>0

+ mul_le_mul_of_nonneg_left (atomLevel_le p a) (p.nonneg _) + _ = entropy p := by simp [entropy,mul_neg] + +theorem endpoint_level_entropy (p : Law α) (M : ℝ) (hM : 0 simp [he,h] + +lemma same_level_ratio (p : Law α) (n : Level p) {a b : α} + (ha : a∈levelCell p n) (hb : b∈levelCell p n) : + p b≤Real.exp 1*p a := by + obtain ⟨ha0,hae⟩ := (mem_levelCell p n a).mp ha + obtain ⟨hb0,hbe⟩ := (mem_levelCell p n b).mp hb + have h₁ := atomLevel_le p b + have h₂ := atomLevel_lt p a + rw [hae] at h₂ + rw [hbe] at h₁ + have hl : Real.log (p b)≤1+Real.log (p a) := by linarith + have he := Real.exp_le_exp.mpr hl + simpa only [Real.exp_add,Real.exp_log ha0,Real.exp_log hb0] using he + +lemma level_mass_bound (p : Law α) (n : Level p) {a : α} + (ha : a∈levelCell p n) : + levelLaw p n≤(levelCell p n).card*Real.exp 1*p a := by + rw [level_mass] + calc + _ ≤ ∑b∈levelCell p n,Real.exp 1*p a := + Finset.sum_le_sum (fun b hb=>same_level_ratio p n ha hb) + _ = _ := by simp [mul_assoc] + +noncomputable def conditionOn (p : Law α) (E : Finset α) (hE : 0 positivity + · rw [ite_eq_right hn,zero_mul] + split <;> positivity + _ = _ := by simp + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/FlagAlphabetLogs.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/FlagAlphabetLogs.lean new file mode 100644 index 0000000000000000000000000000000000000000..178fc68afceb2a54bdb0dbbca915cd51da299c0b --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/FlagAlphabetLogs.lean @@ -0,0 +1,153 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Iteration.StageState +import OAI.Combinatorics.RamseyFive.Marking.AllWindowBounds +import OAI.Combinatorics.RamseyFive.Entropy.Rectangle + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module ProjectiveIncidence FiniteEntropy +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +omit [FiniteDimensional K V] [Fintype (ℙ K (Dual K V))] in +lemma point_card_le_two (hd : finrank K V=5) : + (Fintype.card (ℙ K V):ℝ)≤2*(Nat.card K:ℝ)^4 := by + have he : (Fintype.card (ℙ K V):ℝ)=∑i∈Finset.range 5,(Nat.card K:ℝ)^i := by + rw [←Nat.card_eq_fintype_card,Projectivization.card_of_finrank K V hd] + push_cast + rfl + rw [he] + have hq : (2:ℝ)≤Nat.card K := by exact_mod_cast Finite.one_lt_card (α:=K) + have ht:=q_mul_geometric_bound (Nat.card K:ℝ) hq 5 + have hq0 : (0:ℝ)(map S.law S.stream).nonneg s) |>.mp hx + have hp:=lt_of_lt_of_le hs (S.density_bound s) + exact (div_pos_iff.mp hp).resolve_right + (fun h=>(pow_nonneg (Nat.cast_nonneg _) _).not_gt h.2) |>.1 + +theorem SelectedStream.entropy_lower_explicit (S : SelectedStream (Ω:=Ω) (β:=β) N n admissible) + (hn : 0 ring + +theorem SelectedStream.flag_entropy_lower (S : SelectedStream (Ω:=Ω) (β:=β) N n admissible) + (σ : ℝ) (hσ : 0<σ) (hn : 0(1/(5*q))*h ≤ hits (Finset.univ.filter (fun a=>R a b)) x)).image some) + +theorem finite_fresh_process {ι κ Θ : Type*} [Fintype ι] [Fintype κ] [Fintype Θ] + (R : α→β→Prop) (p : Law α) (r : Law β) (μ : Law ι) (ν : Law κ) + (X : ι→Finset α) (Y : κ→Finset β) (prior : ι→κ→Law Θ) + (A W : ι→κ→Θ→Finset α) + (hA : ∀i j θ,(A i j θ).Nonempty) (hW : ∀i j θ,(W i j θ).Nonempty) + (hAW : ∀i j θ,A i j θ⊆W i j θ) (hAX : ∀i j θ,A i j θ⊆X i) + (q c L : ℝ) (hq : 0 < q) (hc : 0 < c) (hL : 0 ≤ L) + (hsize : ∀i j θ,c*(X i).card ≤ (A i j θ).card) + (h N : ι→κ→Θ→ℕ) (hh : ∀i j θ,0 < h i j θ) (hN : ∀i j θ,0 < N i j θ) + (E : ∀i j θ,Finset (Fin (h i j θ)→α)) + (hsource : ∀i j θ x,x∈E i j θ→∀k,x k∈A i j θ) + (hE : ∀i j θ,(9:ℝ)/10 ≤ eventMass (iid (uniformOn (A i j θ) (hA i j θ)) + (Fin (h i j θ))) (E i j θ)) + (ready : ι→κ→Θ→Prop) + (hX : ∀a,(∑i,μ i*uniformWeight (X i) a) ≤ L*p a) + (hY : ∀b,(∑j,ν j*uniformWeight (Y j) b) ≤ L*r b) : + (∑i,∑j,μ i*ν j*(∑θ,prior i j θ*(∑b,uniformWeight (Y j) b* + (if ready i j θ then freshRejection R q (W i j θ) (hW i j θ) + (h i j θ) (N i j θ) (E i j θ) b else 0)))) ≤ + (50*q/(9*c))*L^2*relationMass R p r := by + apply adaptive_rejection_average R p r μ ν X Y prior + (fun i j θ b=>if ready i j θ then freshRejection R q (W i j θ) (hW i j θ) + (h i j θ) (N i j θ) (E i j θ) b else 0) _ L (by positivity) hL hX hY + intro i j θ b + by_cases hr : ready i j θ + · rw [ite_eq_left hr] + exact fresh_test_domination (A i j θ) (X i) (W i j θ) + (Finset.univ.filter (fun a=>R a b)) (hA i j θ) (hW i j θ) + (hAW i j θ) (hAX i j θ) q c hq hc (hsize i j θ) + (h i j θ) (N i j θ) (hh i j θ) (hN i j θ) (E i j θ) + (hsource i j θ) (hE i j θ) + · rw [ite_eq_right hr] + positivity + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/FreshPublicFamily.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/FreshPublicFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..c4054ed4b923d35bc5805dd3d7f8b51e2c72f95c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/FreshPublicFamily.lean @@ -0,0 +1,95 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.FinitePiLaw +import OAI.Combinatorics.RamseyFive.Probability.AmbientPublicTest + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical +variable {A : Type*} +lemma exists_accepted_index {n : ℕ} (E : Finset A) (t : Fin n→A) : + ∃i : Option (Fin n),Option.map t i=firstAccepted E t := by + cases he : firstAccepted E t with + | none => exact ⟨none,rfl⟩ + | some a => + obtain ⟨i,hi,_⟩ := firstAccepted_index E t he + exact ⟨some i,by simpa only [Option.map_some] using congrArg some hi⟩ + +noncomputable def acceptedIndex {n : ℕ} (E : Finset A) (t : Fin n→A) : Option (Fin n) := + Classical.choose (exists_accepted_index E t) +lemma acceptedIndex_decode {n : ℕ} (E : Finset A) (t : Fin n→A) : + Option.map t (acceptedIndex E t)=firstAccepted E t := + Classical.choose_spec (exists_accepted_index E t) +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical BigOperators +variable {A B : Type*} [Fintype A] [Fintype B] + +noncomputable def cardCutoff (q : ℝ) (m w n : ℕ) : ℕ := + ⌈q/((9:ℝ)/10*((m:ℝ)/w)^n)⌉₊ + +abbrev FreshTape (W : Finset B) (n : ℕ) (q : ℝ) := + (m : Fin (W.card+1))→Fin (cardCutoff q m W.card n)→Fin n→B + +noncomputable def freshTapeLaw (W : Finset B) (hW : W.Nonempty) (n : ℕ) (q : ℝ) : + Law (FreshTape W n q) := + piLaw fun m : Fin (W.card+1)=>iid (iid (uniformOn W hW) (Fin n)) (Fin (cardCutoff q m W.card n)) + +abbrev FreshMessage (W : Finset B) (n : ℕ) (q : ℝ) := + (m : Fin (W.card+1))×Fin (cardCutoff q m W.card n) + +noncomputable def freshDecoded (R : A→B→Prop) (W : Finset B) (n : ℕ) (q : ℝ) + (t : FreshTape W n q) (m : FreshMessage W n q) : Finset A := + cap R Finset.univ q (t m.1 m.2) + +noncomputable def freshEncoded (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hCW : C⊆W) (n : ℕ) (q M : ℝ) (t : FreshTape W n q) : + Option (FreshMessage W n q) := + let m : Fin (W.card+1) := ⟨C.card,Nat.lt_succ_of_le (Finset.card_le_card hCW)⟩ + Option.map (fun i=>⟨m,i⟩) (acceptedIndex (validationRows R S U C n q M) (t m)) + +lemma freshEncoded_decoded (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hCW : C⊆W) (n : ℕ) (q M : ℝ) (t : FreshTape W n q) : + Option.map (freshDecoded R W n q t) (freshEncoded R S U C W hCW n q M t)= + Option.map (cap R Finset.univ q) + (firstAccepted (validationRows R S U C n q M) + (t ⟨C.card,Nat.lt_succ_of_le (Finset.card_le_card hCW)⟩)) := by + unfold freshEncoded freshDecoded + rw [←acceptedIndex_decode] + simp only [Option.map_map] + rfl + +theorem fresh_public_law (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hCW : C⊆W) (hW : W.Nonempty) (n : ℕ) (q M : ℝ) : + map (freshTapeLaw W hW n q) + (fun t=>Option.map (freshDecoded R W n q t) (freshEncoded R S U C W hCW n q M t))= + ambientCapLaw R S U C W hW n q M := by + let m : Fin (W.card+1) := ⟨C.card,Nat.lt_succ_of_le (Finset.card_le_card hCW)⟩ + have hm := piLaw_eval (fun m : Fin (W.card+1)=> + iid (iid (uniformOn W hW) (Fin n)) (Fin (cardCutoff q m W.card n))) m + have ht := congrArg (fun p=>map (map p (firstAccepted (validationRows R S U C n q M))) + (Option.map (cap R Finset.univ q))) hm + simp only [map_comp] at ht + unfold ambientCapLaw + rw [map_comp] + calc + _ = map (freshTapeLaw W hW n q) (fun t=>Option.map (cap R Finset.univ q) + (firstAccepted (validationRows R S U C n q M) (t m))) := by + congr 1 + funext t + exact freshEncoded_decoded R S U C W hCW n q M t + _ = _ := ht + +omit [Fintype B] in +theorem fresh_payload_cost (q : ℝ) (hq : 1≤q) (C W : Finset B) + (hC : C.Nonempty) (hW : W.Nonempty) (hCW : C⊆W) (n : ℕ) : + Real.log (Fintype.card (Fin (cardCutoff q C.card W.card n)):ℝ)≤ + Real.log (2*q)-Real.log ((9:ℝ)/10)+n*Real.log ((W.card:ℝ)/C.card) := by + rw [Fintype.card_fin] + simpa only [cardCutoff,uniformCutoff] using + uniformCutoff_log q hq C W hC hW hCW n +end SharpRamseyFive.ReverseCap + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/GenericFreshCost.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/GenericFreshCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..954d8f8340de70876acdc44103fc6d711973ca54 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/GenericFreshCost.lean @@ -0,0 +1,166 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.ReverseMessageCost +import OAI.Combinatorics.RamseyFive.Geometry.AmbientPairPublic + +namespace OAI + + +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical +variable {A B : Type*} [Fintype A] [Fintype B] + +omit [Fintype A] in +theorem universalFresh_cost_bound (R : A→B→Prop) (S U : Finset A) + (X UX W : Finset B) (hX : X.Nonempty) (q : ℕ) (hq : 1≤q) + (P gap c B₀ : ℝ) (hP : 1≤P) (hg : 0≤gap) (hc : 0Incident a b) W (1000*(Nat.card K)^2) (Nat.card K) t.1 m.1 + have hWhd : Real.log (W.card+1:ℝ)≤6*(Nat.card K:ℝ) := + (Real.log_le_log (by positivity) (by exact_mod_cast Nat.add_le_add_right (Finset.card_le_univ W) 1)).trans + (projective_header_le (K:=K) (V:=V) σ hσ hq hd) + have hfirstCost := universalFresh_cost_bound (fun b a=>Incident a b) B UB A UA W hA (Nat.card K) hqnat + P (Real.log ((UB.card:ℝ)/B.card)) c 10 hP hgb.1 hc hc1 (by norm_num) hcap hWhd + ⟨_,Nat.lt_succ_of_le hnB⟩ hnBl _ t.1 m.1 hfirst + have hYhd : Real.log ((UB∩Y).card+1:ℝ)≤6*(Nat.card K:ℝ) := + (Real.log_le_log (by positivity) (by exact_mod_cast Nat.add_le_add_right (Finset.card_le_univ (UB∩Y)) 1)).trans + (projective_header_le (K:=K) (V:=Dual K V) σ hσ hq (by simpa using hd)) + have hcapB : (320/c+320)*(Nat.card K:ℝ)^5/A.card≤(B.card:ℝ)*Real.exp (2*P) := by + have hp : (Nat.card K:ℝ)^5*Real.exp (-b)≤(B.card:ℝ)*A.card := by simpa only [mul_comm] using hprod + have ho := source_product_to_cap ((Nat.card K:ℝ)^5) B.card A.card b (320/c+320) + (Nat.cast_nonneg _) (by exact_mod_cast hA.card_pos) (by positivity) hp + have he : (320/c+320)*Real.exp b≤Real.exp (2*P) := by + calc + _≤Real.exp P*Real.exp P := mul_le_mul hcoef (Real.exp_le_exp.mpr hb) (Real.exp_pos _).le (Real.exp_pos _).le + _=Real.exp (2*P) := by rw [←Real.exp_add];congr 1;ring + exact ho.trans (mul_le_mul_of_nonneg_left he (Nat.cast_nonneg _)) + have hvcap : CaptureBound B UB ((9:ℝ)/10) ((B.card:ℝ)*Real.exp (2*P)) (UB∩Y) := + ⟨hvalid.1,hvalid.2.1.trans hcapB,hvalid.2.2⟩ + have hsecondCost := universalFresh_cost_bound Incident A UA B UB (UB∩Y) hB (Nat.card K) hqnat + P (Real.log ((UA.card:ℝ)/A.card)) ((9:ℝ)/10) 2 hP hga.1 (by norm_num) (by norm_num) (by norm_num) hvcap hYhd + ⟨_,Nat.lt_succ_of_le hnA⟩ hnAl _ t.2 m.2 hsecond + have hlc : Real.log c≤0 := Real.log_nonpos hc.le hc1 + have hl9 : Real.log ((9:ℝ)/10)≤0 := Real.log_nonpos (by norm_num) (by norm_num) + have hP0 : 0≤P := le_trans (by norm_num) hP + have hcA : 0≤1010+21*(2-Real.log ((9:ℝ)/10)) := by linarith only [hl9] + have hcB : 0≤1010+21*(10-Real.log c) := by linarith only [hlc] + have hCa : 0≤(1010+21*(2-Real.log ((9:ℝ)/10)))*(Nat.card K:ℝ)*P := by positivity + have hCb : 0≤(1010+21*(10-Real.log c))*(Nat.card K:ℝ)*P := by positivity + have h₁ := mul_le_mul_of_nonneg_left (show Real.log ((UB.card:ℝ)/B.card)+P≤ + Real.log ((UA.card:ℝ)/A.card)+Real.log ((UB.card:ℝ)/B.card)+P by linarith only [hga.1]) hCb + have h₂ := mul_le_mul_of_nonneg_left (show Real.log ((UA.card:ℝ)/A.card)+P≤ + Real.log ((UA.card:ℝ)/A.card)+Real.log ((UB.card:ℝ)/B.card)+P by linarith only [hgb.1]) hCa + unfold ambientPairCost + dsimp only [Y] at hfirstCost hsecondCost + nlinarith only [hfirstCost,hsecondCost,h₁,h₂] +end SharpRamseyFive.ProjectiveIncidence + +namespace SharpRamseyFive.FiniteEntropy +open MeasureTheory +open scoped Classical BigOperators +variable {Ω α β : Type*} [MeasurableSpace Ω] [Countable Ω] [MeasurableSingletonClass Ω] + [Fintype α] [DecidableEq α] [Fintype β] + +omit [DecidableEq α] in +lemma finiteImageLaw_map (μ : Measure Ω) [IsProbabilityMeasure μ] (f : Ω→α) (g : α→β) : + map (finiteImageLaw μ f) g=finiteImageLaw μ (g∘f) := by + apply Law.ext + funext b + have hh := finiteImageLaw_event μ f (Finset.univ.filter fun a=>g a=b) + change (∑ a, if g a=b then finiteImageLaw μ f a else 0)=μ.real {ω | g (f ω)=b} + simpa only [eventMass,Finset.sum_filter,Finset.mem_filter,Finset.mem_univ,true_and, + Set.mem_ofPred_eq,Function.comp_apply] using hh + +noncomputable def publicTableLaw (μ : Measure Ω) [IsProbabilityMeasure μ] + (decode : Ω→α→β) : Law (α→β) := finiteImageLaw μ decode + +noncomputable def tableEncoded (accept : β→Prop) (t : α→β) : Option α := + chooseMessage (fun u m=>accept (u m)) t + +omit [MeasurableSpace Ω] [Countable Ω] [MeasurableSingletonClass Ω] [DecidableEq α] [Fintype β] in +lemma tableEncoded_exact (decode : Ω→α→β) (accept : β→Prop) (ω : Ω) : + tableEncoded accept (decode ω)=chooseMessage (fun u m=>accept (decode u m)) ω := by + rfl + +lemma publicTable_output (μ : Measure Ω) [IsProbabilityMeasure μ] + (decode : Ω→α→β) (accept : β→Prop) : + map (publicTableLaw μ decode) (fun t=>Option.map t (tableEncoded accept t))= + finiteImageLaw μ (fun ω=>Option.map (decode ω) + (chooseMessage (fun u m=>accept (decode u m)) ω)) := by + rw [publicTableLaw,finiteImageLaw_map] + rfl + +lemma publicTable_restricted (μ : Measure Ω) [IsProbabilityMeasure μ] + {γ : Type*} [Fintype γ] (decode : Ω→α→β) (embed : γ→α) (accept : β→Prop) : + map (publicTableLaw μ decode) + (fun t=>Option.map (fun m=>t (embed m)) + (chooseMessage (fun (u : α→β) m=>accept (u (embed m))) t))= + finiteImageLaw μ (fun ω=>Option.map (fun m=>decode ω (embed m)) + (chooseMessage (fun u m=>accept (decode u (embed m))) ω)) := by + rw [publicTableLaw,finiteImageLaw_map] + rfl +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/GoodEndpoints.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/GoodEndpoints.lean new file mode 100644 index 0000000000000000000000000000000000000000..918162190286e282d4243e3e929644a82092c49c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/GoodEndpoints.lean @@ -0,0 +1,171 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.BlockReveal + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {α β : Type*} [Fintype α] [Fintype β] + +theorem scaled_heavy_atom_mass (p : Law α) (N M K : ℝ) (hN : 0 < N) (hK : 0 < K) + (hcap : ((support p).card:ℝ) ≤ M) : + eventProbability p (Finset.univ.filter fun a => N*p a > Real.exp K) ≤ + (Real.log N-entropy p+M/N)/K := by + let E := Finset.univ.filter fun a => N*p a > Real.exp K + have hpoint (a : α) : + (if a ∈ E then K*p a else 0)-(if a ∈ support p then 1/N else 0) ≤ + p a*Real.log (N*p a) := by + by_cases hp : p a=0 + · have hE : a ∉ E := by simp only [E,Finset.mem_filter,Finset.mem_univ,true_and,hp,mul_zero]; exact (Real.exp_pos K).not_gt + have hs : a ∉ support p := by simp [mem_support,hp] + simp only [hp,hE,hs,ite_false,sub_zero,zero_mul,le_refl] + · have hp' := lt_of_le_of_ne (p.nonneg a) (Ne.symm hp) + have hs := (mem_support p a).mpr hp' + by_cases he : a ∈ E + · have hh : Real.exp K < N*p a := (Finset.mem_filter.mp he).2 + have hl : K ≤ Real.log (N*p a) := (Real.le_log_iff_exp_le (by positivity)).mpr hh.le + simp only [he,hs,ite_true] + nlinarith [mul_le_mul_of_nonneg_right hl (p.nonneg a),div_pos zero_lt_one hN] + · have hh := point_log_ratio (p a) (1/N) (p.nonneg a) (by positivity) (fun _ => by positivity) + have heq : p a/(1/N)=N*p a := by field_simp + rw [heq] at hh + simp only [he,hs,ite_false,ite_true,zero_sub] + nlinarith [p.nonneg a] + have h := Finset.sum_le_sum (s := Finset.univ) (fun a _ => hpoint a) + have hlog : (∑ a,p a*Real.log (N*p a))=Real.log N-entropy p := by + calc + _ = ∑ a,(p a*Real.log N+p a*Real.log (p a)) := by + apply Finset.sum_congr rfl + intro a _ + by_cases hp : p a=0 + · simp [hp] + · rw [Real.log_mul (ne_of_gt hN) hp] + ring + _ = _ := by rw [Finset.sum_add_distrib,←Finset.sum_mul,p.sum_one,one_mul]; simp only [entropy,sub_neg_eq_add] + rw [Finset.sum_sub_distrib,hlog] at h + have he : (∑ a,if a ∈ E then K*p a else 0)=K*eventProbability p E := by + rw [Finset.sum_ite_mem,Finset.univ_inter] + simp only [eventProbability,Finset.mul_sum] + have hs : (∑ a,if a ∈ support p then 1/N else 0)=((support p).card:ℝ)/N := by + rw [Finset.sum_ite_mem] + simp [div_eq_mul_inv] + rw [he,hs] at h + have hfrac : ((support p).card:ℝ)/N ≤ M/N := div_le_div_of_nonneg_right hcap hN.le + apply (le_div_iff₀ hK).mpr + dsimp [E] at h + nlinarith + +lemma small_atom_mass (p : Law α) (N K : ℝ) (hN : 0 p a < Real.exp (-K)/N) ≤ Real.exp (-K) := by + let E := Finset.univ.filter fun a => p a < Real.exp (-K)/N + have hp (a : α) : (if a ∈ E then p a else 0) ≤ + if a ∈ support p then Real.exp (-K)/N else 0 := by + by_cases hs : a ∈ support p + · simp only [hs,ite_true] + split_ifs with he + · exact (Finset.mem_filter.mp he).2.le + · positivity + · have hz := outside_support p hs + simp [hs,hz] + have hh := Finset.sum_le_sum fun a (_ : a∈Finset.univ) => hp a + calc + _ = ∑ a, if a∈E then p a else 0 := by simp [eventMass, E, Finset.sum_filter] + _ ≤ ∑ a, if a ∈ support p then Real.exp (-K)/N else 0 := hh + _ = (support p).card * (Real.exp (-K)/N) := by simp [Finset.sum_ite_mem] + _ ≤ N * (Real.exp (-K)/N) := mul_le_mul_of_nonneg_right hcap (by positivity) + _ = Real.exp (-K) := by field_simp + +def heavyRow (p : Law (α × β)) (N K : ℝ) (a : α) : Finset β := + Finset.univ.filter fun b => Real.exp K < N*p (a,b) + +def goodFirstEndpoints (p : Law (α × β)) (NA N K : ℝ) : Finset α := + Finset.univ.filter fun a => Real.exp (-K)/NA ≤ first p a ∧ + eventMass (fiber p a) (heavyRow p N K a) ≤ (1:ℝ)/50 + +lemma weighted_heavy_rows (p : Law (α × β)) (N K : ℝ) : + (∑ a,first p a * eventMass (fiber p a) (heavyRow p N K a)) = + eventProbability p (Finset.univ.filter fun z => Real.exp K < N*p z) := by + simp only [eventMass,heavyRow,eventProbability,Finset.sum_filter,Finset.mul_sum,Fintype.sum_prod_type] + apply Finset.sum_congr rfl + intro a _ + apply Finset.sum_congr rfl + intro b _ + split_ifs <;> simp only [mul_zero, mass_eq_first_mul_fiber] + +lemma bad_conditional_row_mass (p : Law (α × β)) (N K : ℝ) : + eventMass (first p) (Finset.univ.filter fun a => + (1:ℝ)/50 < eventMass (fiber p a) (heavyRow p N K a)) ≤ + 50 * eventProbability p (Finset.univ.filter fun z => Real.exp K < N*p z) := by + rw [←weighted_heavy_rows, Finset.mul_sum] + unfold eventMass + rw [Finset.sum_filter] + apply Finset.sum_le_sum + intro a _ + split_ifs with ha + · have hn := (first p).nonneg a + nlinarith + · exact mul_nonneg (by norm_num) (mul_nonneg ((first p).nonneg a) + (Finset.sum_nonneg fun b _ => (fiber p a).nonneg b)) + +theorem bad_first_endpoint_mass (p : Law (α × β)) (NA N M K : ℝ) + (hNA : 0 first p a < Real.exp (-K)/NA + let B := Finset.univ.filter fun a => (1:ℝ)/50 < eventMass (fiber p a) (heavyRow p N K a) + have hsub : (goodFirstEndpoints p NA N K)ᶜ ⊆ A ∪ B := by + intro a ha + simp only [goodFirstEndpoints,Finset.mem_compl,Finset.mem_filter,Finset.mem_univ,true_and] at ha + simp only [A,B,Finset.mem_union,Finset.mem_filter,Finset.mem_univ,true_and] + by_cases h : first p a < Real.exp (-K)/NA + · exact Or.inl h + · exact Or.inr (lt_of_not_ge (fun hb => ha ⟨le_of_not_gt h,hb⟩)) + have hmass : eventMass (first p) (goodFirstEndpoints p NA N K)ᶜ ≤ + eventMass (first p) A + eventMass (first p) B := by + apply le_trans (Finset.sum_le_sum_of_subset_of_nonneg hsub (fun a _ _ => (first p).nonneg a)) + have hle (a : α) : (if a ∈ A ∪ B then first p a else 0) ≤ + (if a ∈ A then first p a else 0)+(if a ∈ B then first p a else 0) := by + by_cases ha : a ∈ A <;> by_cases hb : a ∈ B <;> + simp [ha,hb,(first p).nonneg a] + have hh := Finset.sum_le_sum (s := Finset.univ) (fun a _ => hle a) + simpa only [eventMass,Finset.sum_add_distrib, Finset.sum_ite_mem,Finset.univ_inter] using hh + have ha := small_atom_mass (first p) NA K hNA hA + have hb := bad_conditional_row_mass p N K + have hc := scaled_heavy_atom_mass p N M K hN hK hflag + dsimp only [A,B] at hmass + have hh := add_le_add ha (hb.trans (mul_le_mul_of_nonneg_left hc (by norm_num : (0:ℝ)≤50))) + apply hmass.trans + convert hh using 1; ring + +lemma goodFirst_positive (p : Law (α × β)) (NA N K : ℝ) (hNA : 0lt_of_lt_of_le h hδ) id)) + · norm_num + · exact le_rfl + +variable {B A T β : Type} [Fintype B] [Fintype A] [Fintype T] + [Fintype β] +local instance goodThresholdDE : DecidableEq ((B×A)⊕T) := Classical.decEq _ + +lemma indexBad_cap_mono {J J' d e : ℝ} (hJ : J≤J') + (p : Law (((B×A)⊕T)→β)) (c : ((B×A)⊕T)→((B×A)⊕T)→ℝ) + (s : B→A) (i : ((B×A)⊕T)) : + indexBad J d e p c s i ≤ indexBad J' d e p c s i := + badIndexIndicator_mono (sub_le_sub_right hJ _) + +lemma indexBad_of_larger_cap {J J' d e : ℝ} (hJ : J≤J') + (p : Law (((B×A)⊕T)→β)) (c : ((B×A)⊕T)→((B×A)⊕T)→ℝ) + (s : B→A) (i : ((B×A)⊕T)) (hi : indexBad J' d e p c s i=0) : + indexBad J d e p c s i=0 := by + apply le_antisymm + · exact (indexBad_cap_mono hJ p c s i).trans hi.le + · exact badIndexIndicator_nonneg _ _ _ _ +end +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/GoodPairScores.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/GoodPairScores.lean new file mode 100644 index 0000000000000000000000000000000000000000..20ac8cdbc0e9ed555dd7fd460fb0d44643d0ed04 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/GoodPairScores.lean @@ -0,0 +1,92 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.CollisionSampling + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {X Y Z : Type*} [Fintype X] [Fintype Y] [Fintype Z] +lemma pair_entropy_swap (p : Law X) (f : X→Y) (g : X→Z) : + entropy (pair p f g)=entropy (pair p g f) := by + have h:=entropy_map_injective (pair p f g) Prod.swap (by + intro x y he + exact Prod.swap_injective he) + simp only [pair,map_comp,Function.comp_def,Prod.swap_prod_mk] at h + exact h.symm + +variable {B A T β : Type} [Fintype B] [Fintype A] [Fintype T] [Fintype β] [Nonempty A] + +local instance goodPairIndexDecEq : DecidableEq ((B×A)⊕T) := Classical.decEq _ + +attribute [local irreducible] indexInformation indexCollision indexBad coordinateInformation + +def OtherBlock : ((B×A)⊕T)→B→Prop := + Sum.elim (fun z b=>b≠z.1) (fun _ _=>True) + +omit [Nonempty A] in +lemma index_information_pair (p : Law (((B×A)⊕T)→β)) (s : B→A) + (i : ((B×A)⊕T)) (b : B) (hi : OtherBlock i b) : + entropy (map p (fun x=>x i))+entropy (map p (fun x=>x (Sum.inl (b,s b))))- + entropy (pair p (fun x=>x i) (fun x=>x (Sum.inl (b,s b))))≤ indexInformation p s i := by + have he : (coordinateInformation p i (Sum.inl (b,s b)):ℝ)= + entropy (map p (fun x=>x i))+entropy (map p (fun x=>x (Sum.inl (b,s b))))- + entropy (pair p (fun x=>x i) (fun x=>x (Sum.inl (b,s b)))) := by + unfold coordinateInformation + change information (pair p (fun x=>x (Sum.inl (b,s b))) (fun x=>x i))=_ + simp only [information,first_pair,second_pair] + rw [pair_entropy_swap p (fun x=>x (Sum.inl (b,s b))) (fun x=>x i),add_comm] + rw [←he] + cases i with + | inl z => + unfold indexInformation + change (coordinateInformation p (Sum.inl z) (Sum.inl (b,s b)):ℝ)≤(blockInformation p s z.1 z.2:ℝ) + apply NNReal.coe_le_coe.mpr + exact Finset.le_sup (f:=fun c=>coordinateInformation p (Sum.inl z) (Sum.inl (c,s c))) + (Finset.mem_erase.mpr ⟨hi,Finset.mem_univ _⟩) + | inr t => + unfold indexInformation + change (coordinateInformation p (Sum.inr t) (Sum.inl (b,s b)):ℝ)≤(middleInformation p s t:ℝ) + apply NNReal.coe_le_coe.mpr + exact Finset.le_sup (f:=fun c=>coordinateInformation p (Sum.inr t) (Sum.inl (c,s c))) + (Finset.mem_univ b) + +omit [Fintype A] [Fintype T] [Nonempty A] in +lemma index_collision_pair (c : ((B×A)⊕T)→((B×A)⊕T)→ℝ) + (hc : ∀ i j,0≤c i j) (s : B→A) (i : ((B×A)⊕T)) (b : B) (hi : OtherBlock i b) : + c i (Sum.inl (b,s b))≤ indexCollision c s i := by + cases i with + | inl z => + unfold indexCollision otherCollision + exact Finset.single_le_sum (f:=fun j=>c (Sum.inl z) (Sum.inl (j,s j))) (fun j _=>hc _ _) (Finset.mem_erase.mpr ⟨hi,Finset.mem_univ _⟩) + | inr t => + unfold indexCollision middleCollision + exact Finset.single_le_sum (f:=fun j=>c (Sum.inr t) (Sum.inl (j,s j))) (fun j _=>hc _ _) (Finset.mem_univ b) + +omit [Nonempty A] in +theorem good_index_scores (J d e : ℝ) (p : Law (((B×A)⊕T)→β)) + (c : ((B×A)⊕T)→((B×A)⊕T)→ℝ) (hc : ∀ i j,0≤c i j) + (s : B→A) (i : ((B×A)⊕T)) (hg : indexBad J d e p c s i=0) : + J-entropy (map p (fun x=>x i))≤d ∧ ∀ b,OtherBlock i b→ + entropy (map p (fun x=>x i))+entropy (map p (fun x=>x (Sum.inl (b,s b))))- + entropy (pair p (fun x=>x i) (fun x=>x (Sum.inl (b,s b))))+c i (Sum.inl (b,s b))≤e := by + unfold indexBad at hg + obtain ⟨hd,he⟩:=badIndexIndicator_eq_zero hg + refine ⟨hd,fun b hi=>?_⟩ + exact (add_le_add (index_information_pair p s i b hi) (index_collision_pair c hc s i b hi)).trans he + +omit [Nonempty A] in +lemma good_index_scores_reverse (J d e : ℝ) (p : Law (((B×A)⊕T)→β)) + (c : ((B×A)⊕T)→((B×A)⊕T)→ℝ) (hc : ∀ i j,0≤c i j) (hcs : ∀ i j,c i j=c j i) + (s : B→A) (i : ((B×A)⊕T)) (hg : indexBad J d e p c s i=0) + (b : B) (hi : OtherBlock i b) : + entropy (map p (fun x=>x (Sum.inl (b,s b))))+entropy (map p (fun x=>x i))- + entropy (pair p (fun x=>x (Sum.inl (b,s b))) (fun x=>x i))+c (Sum.inl (b,s b)) i≤e := by + rw [pair_entropy_swap p (fun x=>x (Sum.inl (b,s b))) (fun x=>x i),hcs (Sum.inl (b,s b)) i,add_comm + (entropy (map p (fun x=>x (Sum.inl (b,s b)))))] + exact (good_index_scores J d e p c hc s i hg).2 b hi + +end +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/GoodRepresentative.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/GoodRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..f155b289f1d17ac35beade34fa1978f50dbc28f0 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/GoodRepresentative.lean @@ -0,0 +1,189 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.BlockSelected +import OAI.Combinatorics.RamseyFive.Entropy.OriginalLevelLaw +import OAI.Combinatorics.RamseyFive.Geometry.ProjectiveExpectedLevelLoss +import OAI.Combinatorics.RamseyFive.Entropy.EventWeight + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {α β γ : Type*} [Fintype α] [Fintype β] [Fintype γ] + +lemma good_pair_mass (p : Law (α×β)) (A : Finset α) (B : Finset β) : + 1-eventMass (first p) Aᶜ-eventMass (second p) Bᶜ≤eventMass p (A×ˢB) := by + have hs (z : α×β) : p z≤(if z∈A×ˢB then p z else 0)+ + (if z.1∈Aᶜ then p z else 0)+(if z.2∈Bᶜ then p z else 0) := by + by_cases ha : z.1∈A <;> by_cases hb : z.2∈B <;> + simp [ha,hb,Finset.mem_compl,Finset.mem_product] + linarith [p.nonneg z] + have hh:=Finset.sum_le_sum (s:=Finset.univ) (fun z _=>hs z) + have hA : (∑ z:α×β,if z.1∈Aᶜ then p z else 0)=eventMass (first p) Aᶜ := by + simp only [Fintype.sum_prod_type,eventMass,first] + calc + _ = ∑ a,if a∈Aᶜ then ∑ b,p (a,b) else 0 := by + apply Finset.sum_congr rfl + intro a _ + split_ifs <;> simp only [Finset.sum_const_zero] + _ = _ := by rw [Finset.sum_ite_mem,Finset.univ_inter] + have hB : (∑ z:α×β,if z.2∈Bᶜ then p z else 0)=eventMass (second p) Bᶜ := by + rw [Fintype.sum_prod_type,Finset.sum_comm] + simp only [eventMass,second] + calc + _ = ∑ b,if b∈Bᶜ then ∑ a,p (a,b) else 0 := by + apply Finset.sum_congr rfl + intro b _ + split_ifs <;> simp only [Finset.sum_const_zero] + _ = _ := by rw [Finset.sum_ite_mem,Finset.univ_inter] + simp only [Finset.sum_add_distrib,p.sum_one,hA,hB,Finset.sum_ite_mem,Finset.univ_inter] at hh + change 1≤eventMass p (A×ˢB)+eventMass (first p) Aᶜ+eventMass (second p) Bᶜ at hh + linarith only [hh] + +def goodRepresentative (p : Law (α×β)) (A : Finset α) (B : Finset β) + (h : 0conditionOn_le p _ h (a,b) + · have hz : first (goodRepresentative p A B h) a=0 := by + simp only [first,goodRepresentative,conditionOn_apply,Finset.mem_product,ha,false_and, + ite_false,Finset.sum_const_zero] + rw [hz] + exact div_nonneg hM h.le + +lemma goodRepresentative_second_cap (p : Law (α×β)) (A : Finset α) (B : Finset β) + (h : 0conditionOn_le p _ h (a,b) + · have hz : second (goodRepresentative p A B h) b=0 := by + simp only [second,goodRepresentative,conditionOn_apply,Finset.mem_product,hb,and_false, + ite_false,Finset.sum_const_zero] + rw [hz] + exact div_nonneg hM h.le + +lemma relationMass_conditionOn_left (R : α→β→Prop) (p : Law α) (q : Law β) + (E : Finset α) (h : 0R z.1 z.2)=0 := by + apply eventWeight_zero + intro z hz + exact le_antisymm (le_of_not_gt (fun hp=>h z hp hz)) (p.nonneg z) + have hh:=eventWeight_comparison p (product (first p) (second p)) (ac_product p) (fun z=>R z.1 z.2) + rw [hz,add_zero,mutual_information] at hh + simpa only [relationMass,Finset.sum_filter,eventWeight,product] using hh +end + +noncomputable section +variable {α β : Type*} [Fintype α] [Fintype β] + +lemma conditionOn_ge_on (p : Law α) (E : Finset α) (hE : 0uniformWeight A a)] + by_cases ha : a∈E + · exact (hdom a).trans (mul_le_mul_of_nonneg_left (conditionOn_ge_on p E hE a ha) hC) + · have hz : (∑ A,μ A*uniformWeight A a)=0 := by + apply Finset.sum_eq_zero + intro A _ + by_cases hm : 0<μ A + · rw [uniformWeight_eq_zero_of_not_mem A a (fun hx=>ha (hsub A hm hx)),mul_zero] + · rw [le_antisymm (le_of_not_gt hm) (μ.nonneg A),zero_mul] + rw [hz] + exact mul_nonneg hC ((conditionOn p E hE).nonneg a) + +lemma relationMass_conditioned_good (R : α→β→Prop) (p : Law α) (q : Law β) + (A : Finset α) (B : Finset β) (hA : 0a∈A ∧ b∈B ∧ R a b) p q/(eventMass p A*eventMass q B) := by + simp only [relationMass,Finset.sum_filter,conditionOn_apply] + rw [Finset.sum_div] + apply Finset.sum_congr rfl + intro z _ + by_cases ha : z.1∈A <;> by_cases hb : z.2∈B <;> by_cases hr : R z.1 z.2 <;> + simp only [ha,hb,hr,ite_true,ite_false,true_and,false_and,and_false, + zero_mul,mul_zero,zero_div,div_mul_div_comm] +end +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem good_endpoint_supports (hdim : finrank K V=5) + (p : Law ((ℙ K V)×(ℙ K (Dual K V)))) + (hp : ∀z,0

(hμ A hA).1) hdomμ + · exact supported_levels_conditioned_domination ν (second p) GB hGBpos (4*Real.exp 1) + (by positivity) (fun B hB=>(hν B hB).1) hdomν +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/GuardedNodeCost.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/GuardedNodeCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..6aaa1752877968dd4dea535efd4215f734f4b6cb --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/GuardedNodeCost.lean @@ -0,0 +1,139 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.ReadyRefinement +import OAI.Combinatorics.RamseyFive.Trees.PivotPotential + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence + +section +open Module FiniteEntropy ReverseCap ScoreGeometry Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology + +theorem eventually_guarded_node_cost {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))], + ∀ (hd : finrank K V=5) (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) + (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K), + Nat.card K=q → Range η σ D R → (L₀:ℝ)=L η σ D → + 0≤b → b≤Cb*D*σ^(6*beta η) → + OriginalNodeReady A₀ UA B₀ UB (9/10) (σ^(-1000*beta η)) → + (A₀∩UA).card≤(B₀∩UB).card → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(A₀.card:ℝ)*B₀.card → + let f := fourFinitePredictor hd σ UA UB (P η σ D R) (σ^(-800*beta η)) R L₀ + ∀ t m,guardedNodeEncoded f σ hσ hq hd.le A₀ UA B₀ UB hA₀ hB₀ (9/100000) (9/10) + (σ^(-1000*beta η)) (((A₀∩UA).card:ℝ)*Real.exp (10*P η σ D R)) (by norm_num) t=some m → + finiteNodeCost f UB (1000*(Nat.card K)^2) (Nat.card K) t m≤ + (32120+21*(12-Real.log ((9:ℝ)/100000)-Real.log ((9:ℝ)/10)))*(Nat.card K:ℝ)*(P η σ D R)* + (Real.log ((UA.card:ℝ)/(A₀∩UA).card)+Real.log ((UB.card:ℝ)/(B₀∩UB).card)+(P η σ D R)) := by + have ht : ∀ᶠ σ : ℝ in atTop,σ^(-200*beta η)≤(9/10:ℝ)^2 := by + have hp : 0<200*beta η := mul_pos (by norm_num) (beta_pos hη) + exact ((tendsto_rpow_neg_atTop hp).eventually_lt_const + (by norm_num : (0:ℝ)<(9/10:ℝ)^2)).mono (fun σ h=>by simpa only [neg_mul] using h.le) + filter_upwards [eventually_finite_node hη hη' (Cb+1) (by linarith),ht] with σ hn ht + intro D b R L₀ q K V _ _ _ _ _ _ _ _ hd A₀ UA B₀ UB hA₀ hB₀ hσ hq hcard hr hL hb hbhi hready hAB hprod + have hs : 0<σ := zero_lt_one.trans_le hσ + have hD : 1≤D := (Real.one_le_rpow hσ (beta_pos hη).le).trans hr.dlo + have hF : 1≤σ^(6*beta η) := Real.one_le_rpow hσ (by positivity [beta_pos hη]) + have hb' : b+1≤(Cb+1)*D*σ^(6*beta η) := by + have hx := mul_le_mul hD hF (by norm_num : (0:ℝ)≤1) (by linarith : 0≤D) + nlinarith only [hbhi,hx] + have hτ : σ^(-1000*beta η)≤σ^(-800*beta η)*(9/10:ℝ)^2 := by + have hm := mul_le_mul_of_nonneg_left ht (Real.rpow_nonneg hs.le (-800*beta η)) + rw [←Real.rpow_add hs] at hm + simpa only [show -800*beta η+(-200*beta η)=-1000*beta η by ring] using hm + have hdens := ready_trimmed_density A₀ UA B₀ UB _ _ (Real.rpow_nonneg hs.le _) hτ hready + have hp := ready_trimmed_product A₀ UA B₀ UB _ b hready hprod + obtain ⟨hnA,hnB,_,_,hcost⟩ := hn D (b+1) (σ^(-800*beta η)) R L₀ q K V hd (A₀∩UA) UA (B₀∩UB) UB + hcard (hq.trans (by exact_mod_cast hcard)) hr hL (by linarith) hb' + (Real.rpow_pos_of_pos hs _) le_rfl Finset.inter_subset_right Finset.inter_subset_right hAB hdens hp + simpa only [guardedNodeEncoded,dite_eq_left hready] using hcost + +theorem eventually_oriented_guarded_node_cost {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))], + ∀ (hd : finrank K V=5) (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) + (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K), + Nat.card K=q → Range η σ D R → (L₀:ℝ)=L η σ D → + 0≤b → b≤Cb*D*σ^(6*beta η) → + OriginalNodeReady A₀ UA B₀ UB (9/10) (σ^(-1000*beta η)) → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(A₀.card:ℝ)*B₀.card → + let f := fourFinitePredictor hd σ UA UB (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fourFinitePredictor (K:=K) (V:=Dual K V) (by simpa using hd) σ UB + (UA.map bidualPoint.toEmbedding) (P η σ D R) (σ^(-800*beta η)) R L₀ + ∀ t m,orientedGuardedNodeEncoded f r σ hσ hq hd.le A₀ UA B₀ UB hA₀ hB₀ (9/100000) + (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) t=some m → + orientedNodeCost f r UA UB (1000*(Nat.card K)^2) (Nat.card K) t m≤ + Real.log 2+ + (32120+21*(12-Real.log ((9:ℝ)/100000)-Real.log ((9:ℝ)/10)))*(Nat.card K:ℝ)*(P η σ D R)* + (Real.log ((UA.card:ℝ)/(A₀∩UA).card)+Real.log ((UB.card:ℝ)/(B₀∩UB).card)+(P η σ D R)) := by + filter_upwards [eventually_guarded_node_cost hη hη' Cb hCb] with σ hn + intro D b R L₀ q K V _ _ _ _ _ _ _ _ _ hd A₀ UA B₀ UB hA₀ hB₀ hσ hq hcard hr hL hb hbhi hready hprod + dsimp only + intro t m hm + unfold orientedGuardedNodeEncoded at hm + split_ifs at hm with hAB + · obtain ⟨m',hm',rfl⟩ := Option.map_eq_some_iff.mp hm + have hc := hn D b R L₀ q K V hd A₀ UA B₀ UB hA₀ hB₀ hσ hq hcard hr hL hb hbhi hready hAB hprod + t.1 m' hm' + change Real.log 2+_≤Real.log 2+_ + linarith only [hc] + · obtain ⟨m',hm',rfl⟩ := Option.map_eq_some_iff.mp hm + have hc := hn D b R L₀ q K (Dual K V) (by simpa using hd) B₀ UB + (A₀.map bidualPoint.toEmbedding) (UA.map bidualPoint.toEmbedding) hB₀ hA₀.map + hσ hq hcard hr hL hb hbhi ((ready_bidual A₀ UA B₀ UB _ _).mpr hready) + (by simpa only [←Finset.map_inter,Finset.card_map] using (le_of_not_ge hAB)) + (by simpa only [Finset.card_map,mul_comm (B₀.card:ℝ) (A₀.card:ℝ)] using hprod) + t.2 m' hm' + simp only [←Finset.map_inter,Finset.card_map] at hc + change Real.log 2+_≤Real.log 2+_ + linarith only [hc] +end + +open Module FiniteEntropy ReverseCap ScoreGeometry PivotTree +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +omit [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma ready_log_deficits (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) (τ b : ℝ) + (hr : OriginalNodeReady A₀ UA B₀ UB (9/10) τ) + (hp : (Nat.card K:ℝ)^5*Real.exp (-b)≤(A₀.card:ℝ)*B₀.card) : + Real.log ((UA.card:ℝ)/(A₀∩UA).card)+Real.log ((UB.card:ℝ)/(B₀∩UB).card)≤ + potential UA.card UB.card ((Nat.card K:ℝ)^5)+(b+1) := by + have hnA := nonempty_of_positive_trim _ _ hA₀ (9/10) (by norm_num) hr.1 + have hnB := nonempty_of_positive_trim _ _ hB₀ (9/10) (by norm_num) hr.2.1 + have hnA' : (0:ℝ)<(A₀∩UA).card := by exact_mod_cast hnA.card_pos + have hnB' : (0:ℝ)<(B₀∩UB).card := by exact_mod_cast hnB.card_pos + have hQ : (0:ℝ)<(Nat.card K:ℝ)^5 := by + have hh : (0:ℝ)h (he ▸ hp) + simp [pureLaw,hne] +end SharpRamseyFive.FiniteEntropy +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem guardedNode_original (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) (c δ τ M : ℝ) + (hc : 0Excludes b (out.map Prod.fst))≤ + (50*(Nat.card K:ℝ)/(9*(c*δ)))*(((A₀.filter fun a=>Incident a b).card:ℝ)/A₀.card)) ∧ + (∀a,eventMass (guardedNodeLaw pred σ hσ hq hd.le A₀ UA B₀ UB hA₀ hB₀ c δ τ M hδ) + (Finset.univ.filter fun out=>Excludes a (out.map Prod.snd))≤ + (50*(Nat.card K:ℝ)/(9*((9:ℝ)/10*δ)))*(((B₀.filter (Incident a)).card:ℝ)/B₀.card)) := by + unfold guardedNodeLaw + split_ifs with hr + · have hA := nonempty_of_positive_trim (A₀∩UA) A₀ hA₀ δ hδ hr.1 + have hB := nonempty_of_positive_trim (B₀∩UB) B₀ hB₀ δ hδ hr.2.1 + exact finiteNode_original pred hd hq3 (A₀∩UA) A₀ UA hA Finset.inter_subset_left Finset.inter_subset_right + (B₀∩UB) B₀ UB hB Finset.inter_subset_left Finset.inter_subset_right c δ M hc hc9 hδ hr.1 hr.2.1 + (original_ready_sparse A₀ UA B₀ UB c δ τ hc.le hδ.le hτ hr) _ _ _ + · constructor <;> intro z <;> + rw [eventMass_pure_filter_of_not _ _ (by simp [Excludes])] <;> positivity +end SharpRamseyFive.ProjectiveIncidence +end + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem nextAmbientCapLaw_original {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (hq : 3≤Nat.card K) (A UA : Finset (ℙ K V)) (hA : A.Nonempty) (hAU : A⊆UA) + (B B₀ UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) (hBB₀ : B⊆B₀) + (γ : ℝ) (hγ : 0<γ) (htrim : γ*B₀.card≤B.card) + (hsparse : 1000*(Nat.card K:ℝ)*incidences A B≤(9:ℝ)/10*A.card*B.card) + (n : ℕ) (hn : 0 + change eventMass (pureLaw (none : Option (Finset (ℙ K V)))) + (Finset.univ.filter (Excludes a))≤_ + rw [excludes_pure_none] + positivity + | some Y => + dsimp only [nextAmbientCapLaw] + split_ifs with hY + · have hC := hY.source_nonempty hB + exact geometric_ambient_original hdim hd hq A UA hA hAU B B₀ (B∩(UB∩Y)) (UB∩Y) + hC (hC.mono Finset.inter_subset_right) Finset.inter_subset_left + Finset.inter_subset_right hBB₀ (9/10) γ (by norm_num) (by norm_num) hγ + hY.2.2 htrim hsparse n hn hlen a + · rw [excludes_pure_none] + positivity + +theorem second_ambient_unconditioned {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (hq : 3≤Nat.card K) (A UA : Finset (ℙ K V)) (hA : A.Nonempty) (hAU : A⊆UA) + (B B₀ UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) (hBB₀ : B⊆B₀) + (γ : ℝ) (hγ : 0<γ) (htrim : γ*B₀.card≤B.card) + (hsparse : 1000*(Nat.card K:ℝ)*incidences A B≤(9:ℝ)/10*A.card*B.card) + (n : ℕ) (hn : 0Excludes a pair.2)≤ + (50*(Nat.card K:ℝ)/(9*(((9:ℝ)/10)*γ)))*(((B₀.filter (Incident a)).card:ℝ)/B₀.card) := by + apply adaptive_event_second_le + intro Y + exact nextAmbientCapLaw_original hdim hd hq A UA hA hAU B B₀ UB hB hBB₀ γ hγ htrim + hsparse n hn hlen MB Y a + +theorem first_ambient_chronology {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (hq : 3≤Nat.card K) (S U : Finset (ℙ K (Dual K V))) (hS : S.Nonempty) (hSU : S⊆U) + (X X₀ C W : Finset (ℙ K V)) (hC : C.Nonempty) (hW : W.Nonempty) + (hCX : C⊆X) (hCW : C⊆W) (hXX₀ : X⊆X₀) + (c γ : ℝ) (hc : 0Incident b a) S U C W hW n (Nat.card K) + ((320/c+320)*(Nat.card K:ℝ)^(d+1)/X.card)) next) + (Finset.univ.filter fun pair=>Excludes a pair.1)≤ + (50*(Nat.card K:ℝ)/(9*(c*γ)))*(((X₀.filter (fun b=>Incident b a)).card:ℝ)/X₀.card) := by + rw [adaptive_event_first] + exact geometric_dual_ambient_original hdim hd hq S U hS hSU X X₀ C W hC hW hCX hCW + hXX₀ c γ hc hc1 hγ hcapture htrim hsparse n hn hlen a +end SharpRamseyFive.ProjectiveIncidence + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {α Ω J : Type*} [Fintype Ω] [Fintype J] + +noncomputable def inheritedSupport (X : Finset α) (C : J→Finset α) : Finset α := + X.filter (fun x=>∀j,x∈C j) + +noncomputable def evictionFraction (X C : Finset α) : ℝ := (X\C).card/(X.card:ℝ) + +lemma evictionFraction_nonneg (X C : Finset α) : 0≤evictionFraction X C := by + unfold evictionFraction;positivity + +lemma inherited_eviction (X : Finset α) (C : J→Finset α) : + evictionFraction X (inheritedSupport X C)≤∑j,evictionFraction X (C j) := by + have he : X\inheritedSupport X C=Finset.univ.biUnion (fun j=>X\C j) := by + ext x + simp only [Finset.mem_sdiff,inheritedSupport,Finset.mem_filter,not_and, + not_forall,Finset.mem_biUnion,Finset.mem_univ,true_and] + aesop + unfold evictionFraction + rw [he,←Finset.sum_div] + apply div_le_div_of_nonneg_right _ (Nat.cast_nonneg _) + exact_mod_cast Finset.card_biUnion_le + +lemma trim_failure_eviction (X : Finset α) (C : J→Finset α) + (h : ((inheritedSupport X C).card:ℝ)<(9/10:ℝ)*X.card) : + (1:ℝ)/10≤evictionFraction X (inheritedSupport X C) := by + have hX : (0:ℝ)ready ω ∧ + ((inheritedSupport (X ω) (C ω)).card:ℝ)<(9/10:ℝ)*(X ω).card))≤10*∑j,ρ j := by + let E := Finset.univ.filter (fun ω=>ready ω ∧ + ((inheritedSupport (X ω) (C ω)).card:ℝ)<(9/10:ℝ)*(X ω).card) + have hm := event_markov p (fun ω=>evictionFraction (X ω) (inheritedSupport (X ω) (C ω))) + (fun ω=>evictionFraction_nonneg _ _) (1/10) E (by + intro ω hω + exact trim_failure_eviction _ _ (Finset.mem_filter.mp hω).2.2) + have hs : (∑ω,p ω*evictionFraction (X ω) (inheritedSupport (X ω) (C ω)))≤∑j,ρ j := by + calc + _ ≤ ∑ω,p ω*(∑j,evictionFraction (X ω) (C ω j)) := + Finset.sum_le_sum (fun ω _=>mul_le_mul_of_nonneg_left (inherited_eviction _ _) (p.nonneg ω)) + _ = ∑j,∑ω,p ω*evictionFraction (X ω) (C ω j) := by + simp_rw [Finset.mul_sum];exact Finset.sum_comm + _ ≤ _ := Finset.sum_le_sum (fun j _=>hρ j) + change eventMass p E≤_ + linarith + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/High.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/High.lean new file mode 100644 index 0000000000000000000000000000000000000000..8669d992611cf7c3897cc49a75e92a3b8923f48e --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/High.lean @@ -0,0 +1,351 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.ProjectiveHighCapturedMoment +import OAI.Combinatorics.RamseyFive.Geometry.PencilLineSum +import OAI.Combinatorics.RamseyFive.Geometry.PointStrength +import OAI.Combinatorics.RamseyFive.Entropy.EventuallyHighPolyCost +import OAI.Combinatorics.RamseyFive.Geometry.MomentOrder +import OAI.Combinatorics.RamseyFive.Geometry.GeometryScaleOrientedLower + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry + +section +open scoped BigOperators + +lemma pencil_high_budget_ratios {q : ℕ} {σ n : ℝ} (hσ : 10≤σ) + (hq : (q:ℝ)=Real.exp σ) (hn : 0 C a∪C b) (pointStrength S) + ((((pointStrength S:ℝ)*2^i)/2)) Lines Q + ((Nat.card K:ℝ)^4/S.card^2*Real.exp χ/(((pointStrength S:ℝ)*2^i)/2)^100)) : + (∑H:F,SingletonEnumeration.independentWeight + (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (fun e => L*radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S) e) + (pencilLines x F) R 5000 (1-ownFraction S (C a) (C b)) H)≤ + 40*scale (K:=K) 4 S.card*Real.exp ((L:ℝ)/100)+ + (pencilAlphabet (Nat.card K) 3:ℝ)*((R:ℝ)*(L:ℝ))^5000* + (((pointStrength S:ℝ)*((Nat.card K:ℝ)+1))^4900* + (2^200*((Nat.clog 2 (outsideAt x S (C a∪C b)).card:ℝ)+1)* + ((Nat.card K:ℝ)^4/S.card^2*Real.exp χ))) := by + have hm := actual_radial_mass_bounds x S C hS a b c ha hb hc F hF hf hn + have hv := actual_radial_variance x hdim (by norm_num) S C hS a b c ha hb hc F hF + (by positivity : 0≤(L:ℝ)/100) hx (hn.trans (by norm_num)) + have hδ : 0 C a∪C b) (pointStrength S) hδ S.card χ + (Nat.cast_pos.mpr hS.card_pos) hmax Lines hLines Q hxQ hgood 5000 (by norm_num) + exact independent_sum_le x hdim _ _ L F _ _ _ R 5000 hR + (fun H => (hm H).2.1.trans (by norm_num)) (by simpa only [sq_abs] using hv) + hpow ((Finset.sum_nonneg fun _ _ => pow_nonneg (NNReal.coe_nonneg _) _).trans hpow) + +theorem actual_high_radial_moment {J : Type} [Fintype J] + (hdim : finrank K V=5) (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) + (hS : S.Nonempty) (a b c : J) (ha : C a⊆S) (hb : C b⊆S) (hc : C c=C a∩C b) + (F : Finset (ℙ K (Dual K V))) + (hF : ∀H∈F,Incident x H ∧ H∉exceptional S C) + (hf : ownFraction S (C a) (C b)≤2/25) + (hn : (Nat.card K:ℝ)/S.card≤1/100) + (L : ℝ≥0) (hL : 10000≤(L:ℝ)) (R p h : ℕ) (hp : 0 C a∪C b) (pointStrength S) + (((pointStrength S:ℝ)*2^i)/2) Lines Q + ((Nat.card K:ℝ)^4/S.card^2*Real.exp (((L:ℝ)*R)/100)/ + (((pointStrength S:ℝ)*2^i)/2)^100)) + (hPow : (∑z : DistinctPairs F,strength (pencilLines x F) + (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) z^200)≤ + dyadFactor (outsideAt x S (C a∪C b)).card (((L:ℝ)*R)/100)* + (geometryScale (Nat.card K) S.card)^2) + (hlocal : (pencilAlphabet (Nat.card K) 3:ℝ)*((R:ℝ)*(L:ℝ))^5000* + (((pointStrength S:ℝ)*((Nat.card K:ℝ)+1))^4900* + (2^200*((Nat.clog 2 (outsideAt x S (C a∪C b)).card:ℝ)+1)* + ((Nat.card K:ℝ)^4/S.card^2*Real.exp (((L:ℝ)*R)/100))))≤ + geometryScale (Nat.card K) S.card) + (hcost : (40*geometryScale (Nat.card K) S.card*Real.exp ((L:ℝ)/100)+ + geometryScale (Nat.card K) S.card)+2*((p+1:ℝ)* + pencilHighBudget (Nat.card K) (outsideAt x S (C a∪C b)).card S.card + (((L:ℝ)*R)/100) cut L p R)≤ + geometryScale (Nat.card K) S.card*Real.exp (((L:ℝ)*R)/5)) + (hp2 : (p:ℝ)^2≤Real.exp (((L:ℝ)*R)/10)) + (hA : 2≤geometryScale (Nat.card K) S.card*Real.exp (-((L:ℝ)*R))) + (hscale : 16*((Nat.card K:ℝ)+1)≤ + (geometryScale (Nat.card K) S.card*Real.exp (-((L:ℝ)*R)))*(1/(100*(p:ℝ)))^2) + (hstrong : x∉badCenters S (fun _ => C a∪C b) (pointStrength S) + ((1/(100*(p:ℝ)))/2) Lines Q 1) + (hpairScalar : (pencilAlphabet (Nat.card K) 4:ℝ)+ + (dyadFactor (outsideAt x S (C a∪C b)).card (((L:ℝ)*R)/100)* + (geometryScale (Nat.card K) S.card)^2)/(1/(100*(p:ℝ)))^200≤ + (geometryScale (Nat.card K) S.card)^2*Real.exp (((L:ℝ)*R)/10)) + (own : F→Fin R→Bool) : + (∫ω,HighMoment.allTrunc R 5000 ω*(∑H:F,scoreTerm (pencilLines x F H) + (Real.exp (-(L:ℝ)*(1-ownFraction S (C a) (C b)))) (own H) + (fun r e => ω (r,e)))^p + ∂batchMeasure (fun i : Fin R×RadialLine x => L* + radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S) i.2))≤ + (geometryScale (Nat.card K) S.card)^p*Real.exp (-(1/10:ℝ)*(p*((L:ℝ)*R))) := by + have hδ : 0 L*radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S) e) + (pencilLines x F) R 5000 (1-ownFraction S (C a) (C b)) H)≤ + 40*geometryScale (Nat.card K) S.card*Real.exp ((L:ℝ)/100)+ + geometryScale (Nat.card K) S.card := by + exact hD.trans (add_le_add (by simp [scale,geometryScale]) hlocal) + apply projective_high_moment_from_pairs x hdim S (fun _ => C a∪C b) + (pointStrength S) L hδ F (fun H hH => (hF H hH).1) S.card (((L:ℝ)*R)/100) + cut (1-ownFraction S (C a) (C b)) _ (Nat.cast_pos.mpr hS.card_pos) hcut + (by unfold geometryScale;positivity) hL (by linarith only [hf]) hcap ?_ hchi + (fun H => (hm H).2.2.trans (by norm_num)) (fun H => (hm H).1) + (fun H => (hm H).2.1) Lines hLines Q hxQ hPow hp R h hKR hh hsize herr + own hD' hcost hp2 hA hscale hstrong hpairScalar + rw [coe_pointStrength,mul_div_cancel₀ _ (Nat.cast_ne_zero.mpr (ne_of_gt hS.card_pos))] + nlinarith only [Nat.cast_nonneg (α:=ℝ) (Nat.card K)] + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/HighBudgetPoly.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/HighBudgetPoly.lean new file mode 100644 index 0000000000000000000000000000000000000000..34854574f4d24b8597de816cbe5fd609b084bcc6 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/HighBudgetPoly.lean @@ -0,0 +1,45 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.HighMomentBudget + +namespace OAI + +noncomputable section +namespace SharpRamseyFive.ScoreGeometry +open scoped BigOperators + +noncomputable def highBudgetPoly (a p P : ℝ) : ℝ := + 3+40*p^2+20*p^4*(200*p+2*P)^2+ + p^4*(P^200*a+400*(2*P)^200)+2*p^200*a+400 + +lemma highMomentBudget_normalized (Q a B b L : ℝ) (p R N₂ : ℕ) + (hB : 0z.1=a).card:ℝ)≤M) : + entropy p ≤ entropy (first p)+Real.log M := by + have hh := entropy_partition_bound p Prod.fst (fun _=>Real.log M) (by + intro a ha + rw [map_fst] at ha + have hc:=hpartner a ha + have hp : 0<(((support p).filter fun z=>z.1=a).card:ℝ) := by + obtain ⟨z,hz,hf⟩ := map_positive p Prod.fst a (by simpa [map_fst] using ha) + exact_mod_cast Finset.card_pos.mpr ⟨z,Finset.mem_filter.mpr ⟨(mem_support p z).mpr hz,hf⟩⟩ + exact Real.log_le_log hp hc) + simpa only [map_fst,←Finset.sum_mul,(first p).sum_one,one_mul] using hh + +theorem high_first_upper_tail (p : Law (α×β)) (N S M K : ℝ) + (hN : 0z.1=a).card:ℝ)≤M) : + eventMass (first p) (Finset.univ.filter fun a=>N*first p a>Real.exp K) ≤ + (Real.log N+Real.log M-entropy p+S/N)/K := by + have hh := first_entropy_of_partner_cap p M hM hpartner + have ht := scaled_heavy_atom_mass (first p) N S K hN hK hcap + change eventMass (first p) _ ≤ _ at ht + apply ht.trans + apply div_le_div_of_nonneg_right _ hK.le + linarith + +def highGoodFirst (p : Law (α×β)) (NA N U K : ℝ) : Finset α := + (goodFirstEndpoints p NA N K).filter fun a=>U*first p a≤Real.exp K + +theorem high_bad_first_mass (p : Law (α×β)) (NA N U S M T K : ℝ) + (hNA : 0z.1=a).card:ℝ)≤M) : + eventMass (first p) (highGoodFirst p NA N U K)ᶜ ≤ + Real.exp (-K)+50*(Real.log N-entropy p+T/N)/K+ + (Real.log U+Real.log M-entropy p+S/U)/K := by + let E := Finset.univ.filter fun a=>U*first p a>Real.exp K + have hsub : (highGoodFirst p NA N U K)ᶜ ⊆ (goodFirstEndpoints p NA N K)ᶜ ∪ E := by + intro a ha + simp only [Finset.mem_compl,highGoodFirst,Finset.mem_filter] at ha + by_cases hg : a∈goodFirstEndpoints p NA N K + · exact Finset.mem_union_right _ (Finset.mem_filter.mpr ⟨Finset.mem_univ _,lt_of_not_ge (fun hu=>ha ⟨hg,hu⟩)⟩) + · exact Finset.mem_union_left _ (Finset.mem_compl.mpr hg) + have hs : eventMass (first p) (highGoodFirst p NA N U K)ᶜ ≤ + eventMass (first p) (goodFirstEndpoints p NA N K)ᶜ+eventMass (first p) E := by + apply (Finset.sum_le_sum_of_subset_of_nonneg hsub (fun a _ _=>(first p).nonneg a)).trans + have hh := Finset.sum_union_inter (s₁:=(goodFirstEndpoints p NA N K)ᶜ) (s₂:=E) (f:=fun a=>first p a) + have hn : 0≤∑ a∈(goodFirstEndpoints p NA N K)ᶜ∩E,first p a := + Finset.sum_nonneg fun a _=>(first p).nonneg a + change ∑ a∈(goodFirstEndpoints p NA N K)ᶜ∪E,first p a ≤ + (∑ a∈(goodFirstEndpoints p NA N K)ᶜ,first p a)+∑ a∈E,first p a + linarith + exact hs.trans (add_le_add (bad_first_endpoint_mass p NA N T K hNA hN hK hA hflag) + (high_first_upper_tail p U S M K hU hM hK hS hpartner)) + +lemma support_first_subset_image (p : Law (α×β)) (D : Finset (α×β)) + (hD : support p⊆D) : support (first p)⊆D.image Prod.fst := by + intro a ha + obtain ⟨z,hz,hf⟩:=map_positive p Prod.fst a (by simpa only [map_fst] using (mem_support _ _).mp ha) + exact Finset.mem_image.mpr ⟨z,hD ((mem_support _ _).mpr hz),hf⟩ + +lemma support_fiber_card (p : Law (α×β)) (D : Finset (α×β)) + (hD : support p⊆D) (a : α) : + ((support p).filter fun z=>z.1=a).card≤(Finset.univ.filter fun b=>(a,b)∈D).card := by + apply Finset.card_le_card_of_injOn Prod.snd + · intro z hz + obtain ⟨hz,he⟩:=Finset.mem_filter.mp hz + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,by simpa only [←he,Prod.mk.eta] using hD hz⟩ + · intro z hz y hy he + exact Prod.ext ((Finset.mem_filter.mp hz).2.trans (Finset.mem_filter.mp hy).2.symm) he + +def highBadMass (s d C0 : ℝ) : ℝ := + Real.exp (-s)+50*(d+C0)/s+(d+Real.log 2+32)/s + +theorem high_endpoint_bad (p : Law (α×β)) (q s d C0 : ℝ) (r : ℕ) + (hq : 0z.1=a).card:ℝ)≤2*q^(4-r)) + (hent : 4*Real.log q-entropy p≤d) : + eventMass (first p) (highGoodFirst p (32*q^r) (q^4) (q^r) s)ᶜ≤highBadMass s d C0 := by + have hq0 : q≠0:=ne_of_gt hq + have hpow : (r:ℝ)+(4-r:ℕ)=4 := by exact_mod_cast Nat.add_sub_of_le hr + have hl : Real.log (q^r)+Real.log (2*q^(4-r))=4*Real.log q+Real.log 2 := by + rw [Real.log_mul (by norm_num) (pow_ne_zero _ hq0),Real.log_pow,Real.log_pow] + calc + _ = ((r:ℝ)+(4-r:ℕ))*Real.log q+Real.log 2 := by ring + _ = _ := by rw [hpow] + have h:=high_bad_first_mass p (32*q^r) (q^4) (q^r) (32*q^r) (2*q^(4-r)) (C0*q^4) s + (by positivity) (by positivity) (by positivity) (by positivity) hs hcap hcap hflag hpartner + rw [Real.log_pow,hl,mul_div_cancel_right₀ _ (pow_ne_zero 4 hq0), + mul_div_cancel_right₀ _ (pow_ne_zero r hq0)] at h + apply h.trans + unfold highBadMass + exact add_le_add (add_le_add le_rfl (div_le_div_of_nonneg_right + (mul_le_mul_of_nonneg_left (add_le_add hent (le_refl C0)) (by norm_num)) hs.le)) + (div_le_div_of_nonneg_right (by linarith) hs.le) + +theorem high_endpoint_bad_of_domain (p : Law (α×β)) (D : Finset (α×β)) + (hD : support p⊆D) (q s d C0 : ℝ) (r : ℕ) + (hq : 0(a,b)∈D).card:ℝ)≤2*q^(4-r)) + (hent : 4*Real.log q-entropy p≤d) : + eventMass (first p) (highGoodFirst p (32*q^r) (q^4) (q^r) s)ᶜ≤highBadMass s d C0 := by + apply high_endpoint_bad p q s d C0 r hq hs hr + · exact (Nat.cast_le.mpr (Finset.card_le_card (support_first_subset_image p D hD))).trans hcap + · exact (Nat.cast_le.mpr (Finset.card_le_card hD)).trans hflag + · intro a _ + exact (Nat.cast_le.mpr (support_fiber_card p D hD a)).trans (hpartner a) + · exact hent + +lemma support_swap_first_fiber (p : Law (α×β)) (b : β) : + ((support (swap p)).filter fun z=>z.1=b).card= + ((support p).filter fun z=>z.2=b).card := by + apply Finset.card_bij (fun z _=>z.swap) + · intro z hz + obtain ⟨hp,he⟩:=Finset.mem_filter.mp hz + apply Finset.mem_filter.mpr + refine ⟨(mem_support p _).mpr ?_,he⟩ + exact (mem_support (swap p) z).mp hp + · intro z hz y hy he + exact Prod.swap_injective he + · intro z hz + obtain ⟨hp,he⟩:=Finset.mem_filter.mp hz + refine ⟨z.swap,Finset.mem_filter.mpr ⟨?_,he⟩,Prod.swap_swap _⟩ + apply (mem_support (swap p) _).mpr + exact (mem_support p z).mp hp + +theorem high_endpoint_bad_second (p : Law (α×β)) (q s d C0 : ℝ) (r : ℕ) + (hq : 0z.2=b).card:ℝ)≤2*q^(4-r)) + (hent : 4*Real.log q-entropy p≤d) : + eventMass (second p) (highGoodFirst (swap p) (32*q^r) (q^4) (q^r) s)ᶜ≤highBadMass s d C0 := by + have h:=high_endpoint_bad (swap p) q s d C0 r hq hs hr + (by simpa only [first_swap] using hcap) + (by simpa only [support_swap_card] using hflag) + (by intro b hb; rw [support_swap_first_fiber]; exact hpartner b (by simpa only [first_swap] using hb)) + (by simpa only [entropy_swap] using hent) + simpa only [first_swap] using h + +lemma support_second_subset_image (p : Law (α×β)) (D : Finset (α×β)) + (hD : support p⊆D) : support (second p)⊆D.image Prod.snd := by + intro b hb + obtain ⟨z,hz,hf⟩:=map_positive p Prod.snd b (by simpa only [map_snd] using (mem_support _ _).mp hb) + exact Finset.mem_image.mpr ⟨z,hD ((mem_support _ _).mpr hz),hf⟩ + +lemma support_second_fiber_card (p : Law (α×β)) (D : Finset (α×β)) + (hD : support p⊆D) (b : β) : + ((support p).filter fun z=>z.2=b).card≤(Finset.univ.filter fun a=>(a,b)∈D).card := by + apply Finset.card_le_card_of_injOn Prod.fst + · intro z hz + obtain ⟨hz,he⟩:=Finset.mem_filter.mp hz + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,by simpa only [←he,Prod.mk.eta] using hD hz⟩ + · intro z hz y hy he + exact Prod.ext he ((Finset.mem_filter.mp hz).2.trans (Finset.mem_filter.mp hy).2.symm) + +theorem high_endpoint_bad_second_of_domain (p : Law (α×β)) (D : Finset (α×β)) + (hD : support p⊆D) (q s d C0 : ℝ) (r : ℕ) + (hq : 0(a,b)∈D).card:ℝ)≤2*q^(4-r)) + (hent : 4*Real.log q-entropy p≤d) : + eventMass (second p) (highGoodFirst (swap p) (32*q^r) (q^4) (q^r) s)ᶜ≤highBadMass s d C0 := by + apply high_endpoint_bad_second p q s d C0 r hq hs hr + · exact (Nat.cast_le.mpr (Finset.card_le_card (support_second_subset_image p D hD))).trans hcap + · exact (Nat.cast_le.mpr (Finset.card_le_card hD)).trans hflag + · intro b _ + exact (Nat.cast_le.mpr (support_second_fiber_card p D hD b)).trans (hpartner b) + · exact hent + +lemma high_endpoint_atom (p : Law (α×β)) (q s : ℝ) (r : ℕ) (hq : 06*(8+Real.log 4)*σ^(-(η-beta η))) atTop (𝓝 0) := by + simpa using (tendsto_rpow_neg_atTop hb).const_mul (6*(8+Real.log 4)) + have hexp : Tendsto (fun σ : ℝ=>c*Real.exp σ) atTop atTop := + Real.tendsto_exp_atTop.const_mul_atTop hc + have hlog : Tendsto (fun σ : ℝ=>η*Real.log σ) atTop atTop := + Real.tendsto_log_atTop.const_mul_atTop hη + filter_upwards [eventually_ge_atTop (1:ℝ),ht.eventually_lt_const hc, + hexp.eventually_ge_atTop (Real.log (2*C)), + hlog.eventually_gt_atTop (Real.log 2+3-Real.log c)] with σ hσ ht he hg + intro q n h E hq hn hh0 hh hlo hhi + have hs : 0<σ := zero_lt_one.trans_le hσ + have hq0 : 0 flatPoints (P i)) X J C) (n*a/1024) ∪ + (Y.filter fun x => D ≤ (headAt F hF P X L J C M (n*a/1024) x).card) ∪ + (Y.filter fun x => D ≤ ((tailPlanes F hF P X L J C M).filter fun A => x.submodule ≤ A).card) + +theorem high_exceptions_card (hP : ∀ i ∈ F, finrank K (P i) = 4) + (hcover : ∀ A : Submodule K V, finrank K A = 4 → ∃ i ∈ F, P i = A) + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 3) + (J : ℕ) (a χ : ℝ) (Y : Finset (ℙ K V)) + (hn : 0 flatPoints (P i)) X J C + let E₀ := largeCellIntersections F hF P X H (n*a/1024) + let E₁ := Y.filter fun x => D ≤ (headAt F hF P X L J C M (n*a/1024) x).card + let E₂ := Y.filter fun x => D ≤ ((tailPlanes F hF P X L J C M).filter fun A => x.submodule ≤ A).card + have hq : 1≤q := by dsimp [q]; exact_mod_cast (Finite.one_lt_card (α := K)).le + have hn' : 0 flatPoints (P i)) X J C + have hHM : H*(Nat.card K+1)≤M := by + have hh := head_length_condition hq hn' ha ha2 hhigh (Nat.cast_nonneg H) hHC + dsimp [q,n] at hh + exact_mod_cast hh + have hdens := plane_density_le (K := K) + have hheadMean := head_mean_condition hq hn' ha ha2 hhigh hdens + have htailMean := tail_mean_condition hq hn' ha ha2 hnq hhigh hdens + have hD := degree_multiplicity_condition hq hn' ha ha2 hnq hχ + have hE₀ : (E₀.card:ℝ)≤3145728*q^2/a^2 := by + apply large_exception_bound hq hn' ha + have hh := largeCellIntersections_budget F hF P X hP H (n*a/1024) (by positivity) + have he : (ProjectiveIncidence.Q (Nat.card K) 2:ℝ)=q^2+q+1 := by + simp [ProjectiveIncidence.Q,Finset.sum_range_succ,q] + ring + simpa only [he] using hh + have hE₁ : (E₁.card:ℝ)≤(n^2*a^3/q^3)*Real.exp (-χ) := by + apply head_exception_bound hq hn' ha ha2 hhigh (Nat.cast_nonneg E₁.card) (Nat.cast_nonneg H) hHC + exact head_exceptions F hF P X hP L hL J C M hM hHM (n*a/1024) hheadMean D Y + have hE₂ : (E₂.card:ℝ)≤36864*q^2*Real.exp (-2*χ) := by + rw [neg_mul] + apply tail_exception_bound (χ := χ) hq hn' ha ha2 hnq hhigh (Nat.cast_nonneg E₂.card) + apply tail_exceptions F hF P X hcover L hL J C M u D hM + · dsimp [q,n] at hline + exact_mod_cast hline + · dsimp [q,n] at hlineNum + exact_mod_cast hlineNum + · exact htailMean + · exact hhyperNum + · dsimp [q,n] at hlarge + exact_mod_cast hlarge + · exact hD + have hun : (E₀ ∪ E₁ ∪ E₂).card ≤ E₀.card+E₁.card+E₂.card := + (Finset.card_union_le _ _).trans (Nat.add_le_add_right (Finset.card_union_le _ _) _) + have hun' : ((E₀ ∪ E₁ ∪ E₂).card:ℝ) ≤ (E₀.card:ℝ)+E₁.card+E₂.card := by exact_mod_cast hun + exact hun'.trans (by dsimp [q,n] at *; linarith) + +theorem high_pairs (hdim : finrank K V = 5) + (G : Finset (Submodule K V)) (hG : ∀ A ∈ G, finrank K A = 4) + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 3) + (hcomplete : ∀ A : Submodule K V, finrank K A = 3 → A ∈ L) + (J : ℕ) (a χ : ℝ) (Y : Finset (ℙ K V)) (x : ℙ K V) (hxY : x ∈ Y) + (hxG : ∀ A ∈ G,x.submodule ≤ A) + (hn : 0 flatPoints (P i)) X J (HighParameters.cap (Nat.card K) a)):ℝ)* + HighParameters.cap (Nat.card K) a ≤ X.card := by + exact_mod_cast head_length_bound F hF (fun i => flatPoints (P i)) X J (HighParameters.cap (Nat.card K) a) + have hHM := head_length_condition hq hn' ha ha2 hhigh + (Nat.cast_nonneg (headIndex F hF (fun i => flatPoints (P i)) X J (HighParameters.cap (Nat.card K) a))) hHC + have hHM' : headIndex F hF (fun i => flatPoints (P i)) X J (HighParameters.cap (Nat.card K) a)* + (Nat.card K+1) ≤ threshold (Nat.card K) X.card a := by exact_mod_cast hHM + simp only [highExceptions,Finset.mem_union,not_or] at hx + have hh := captured_pairs_outside_exceptions F hF P X hdim G hG L hL hcomplete J + (HighParameters.cap (Nat.card K) a) (threshold (Nat.card K) X.card a) hHM' + (X.card*a/1024) (degree (Nat.card K) X.card a χ) (degree (Nat.card K) X.card a χ) + Y x hxY hxG hx.1.1 hx.1.2 hx.2 + simpa only [two_mul] using hh + +end + +open Module RichPlaneGeometry HighParameters HyperplaneOverlap +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + +noncomputable def residualPlanes (L : Finset (Submodule K V)) + (X : Finset (ℙ K V)) (M : ℕ) := + L.filter fun A => M ≤ (X.filter fun x => x.submodule ≤ A).card + +lemma capped_plane_exceptions (L : Finset (Submodule K V)) + (hL : ∀ A ∈ L, finrank K A = 3) (X : Finset (ℙ K V)) + (M C u D : ℕ) (hMpos : 0 x.submodule ≤ H).card ≤ C) + (hline : 2*(Nat.card K+1)≤M) (hnum : 2*X.card≤u*M) + (hmean : 2*((ProjectiveIncidence.Q (Nat.card K) 2:ℝ)/ + ProjectiveIncidence.Q (Nat.card K) 3)*C≤M) + (hhnum : 4*(Nat.card K:ℝ)^2*C≤(u:ℝ)*M^2) + (hlarge : 64*X.card≤M^2) (hD : 8*(2*u+1)≤D) (Y : Finset (ℙ K V)) : + ((Y.filter fun x => D≤((residualPlanes L X M).filter fun A => + x.submodule≤A).card).card:ℝ)*D^2*M^2≤4096*(X.card:ℝ)^2*(2*(u:ℝ)+1)^2 := by + let R := residualPlanes L X M + have hrank : ∀ A∈R, finrank K A=3 := fun A hA => hL A (Finset.mem_filter.mp hA).1 + have hrich : ∀ A∈R, M≤(X.filter fun x => x.submodule≤A).card := + fun _ hA => (Finset.mem_filter.mp hA).2 + obtain ⟨hl,hh⟩ := multiplicity_budgets R hrank X M C u hMpos hrich hcap + hline hnum hmean hhnum + have hr := capped_rich_plane_count R hrank X M C u hMpos hrich hcap + hline hnum hmean hhnum hlarge + have he := RichPlaneOverlap.exceptional_centers R hrank u hl hh Y D hD + have hs := pow_le_pow_left₀ (by positivity : (0:ℝ)≤(R.card:ℝ)*M) hr 2 + calc + _ ≤ (16*(R.card:ℝ)^2)*(M:ℝ)^2 := mul_le_mul_of_nonneg_right he (sq_nonneg _) + _ = 16*((R.card:ℝ)*M)^2 := by ring + _ ≤ 16*(16*X.card*(2*(u:ℝ)+1))^2 := mul_le_mul_of_nonneg_left hs (by norm_num) + _ = _ := by ring + +noncomputable def residualExceptions (L : Finset (Submodule K V)) + (X Y : Finset (ℙ K V)) (a χ : ℝ) := + Y.filter fun x => degree (Nat.card K) X.card a χ ≤ + ((residualPlanes L X (threshold (Nat.card K) X.card a)).filter fun A => x.submodule≤A).card + +theorem residual_exceptions_card (L : Finset (Submodule K V)) + (hL : ∀ A∈L,finrank K A=3) (X Y : Finset (ℙ K V)) (a χ : ℝ) + (hn : 0 x.submodule≤H).card≤HighParameters.cap (Nat.card K) a) : + ((residualExceptions L X Y a χ).card:ℝ)≤36864*(Nat.card K:ℝ)^2*Real.exp (-2*χ) := by + let q : ℝ := Nat.card K + let n : ℝ := X.card + have hq : 1≤q := by dsimp [q]; exact_mod_cast (Finite.one_lt_card (α := K)).le + have hn' : 0 p.1 ≠ p.2 ∧ M≤(X.filter fun y => y.submodule≤p.1⊓p.2).card + +theorem residual_pairs (hdim : finrank K V=5) + (G : Finset (Submodule K V)) (hG : ∀ A∈G,finrank K A=4) + (L : Finset (Submodule K V)) (hL : ∀ A∈L,finrank K A=3) + (hcomplete : ∀ A : Submodule K V,finrank K A=3 → A∈L) + (X Y : Finset (ℙ K V)) (a χ : ℝ) (x : ℙ K V) (hxY : x∈Y) + (hxG : ∀ A∈G,x.submodule≤A) (hx : x∉residualExceptions L X Y a χ) : + (residualPairs G X (threshold (Nat.card K) X.card a)).card≤ + degree (Nat.card K) X.card a χ*(Nat.card K+1)^2 := by + let M := threshold (Nat.card K) X.card a + let R := (residualPlanes L X M).filter fun A => x.submodule≤A + have hh := pair_count_by_intersection (d := 4) hdim G hG R 3 + (fun A hA => hL A (Finset.mem_filter.mp (Finset.mem_filter.mp hA).1).1) + (residualPairs G X M) (Finset.filter_subset _ _) (by + intro p hp + obtain ⟨hp,hne,hpc⟩ := Finset.mem_filter.mp hp + obtain ⟨h1,h2⟩ := Finset.mem_product.mp hp + apply Finset.mem_filter.mpr + refine ⟨Finset.mem_filter.mpr ⟨hcomplete _ (hyperplane_intersection_rank (d := 4) hdim + p.1 p.2 (hG _ h1) (hG _ h2) hne),hpc⟩,le_inf (hxG _ h1) (hxG _ h2)⟩) + have hc : R.card < degree (Nat.card K) X.card a χ := by + apply Nat.lt_of_not_ge + intro he + exact hx (Finset.mem_filter.mpr ⟨hxY,he⟩) + have he : (∑ i∈Finset.range (4+1-3),Nat.card K^i)=Nat.card K+1 := by + norm_num [Finset.sum_range_succ,Nat.add_comm] + rw [he] at hh + exact hh.trans (Nat.mul_le_mul_right _ hc.le) +end SharpRamseyFive.HighPlaneBudget + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/HighMomentBudget.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/HighMomentBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..8020d1af7c0f195aabaaffc03af77f97fb033413 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/HighMomentBudget.lean @@ -0,0 +1,143 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.RadialOffException +import OAI.Combinatorics.RamseyFive.Geometry.TrainingLineCard + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence PoissonScore WeightedPrograms +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal + +noncomputable def highMomentBudget (Q M A B b L : ℝ) (p R N₂ : ℕ) : ℝ := + highCertificateMajorant Q M B b L p R 200 N₂ + + (1+(p:ℝ)^200*A)+B+(Q/B+(p:ℝ)^200*(M/B)) + +lemma highMomentBudget_bounds (Q M A B b L : ℝ) (p R N₂ : ℕ) + (hQ : 0 ≤ Q) (hM : 0 ≤ M) (hA : 0 ≤ A) (hB : 0 < B) + (hb : 0 ≤ b) (hL : 0 ≤ L) : + 0 ≤ highMomentBudget Q M A B b L p R N₂ ∧ + highCertificateMajorant Q M B b L p R 200 N₂ ≤ highMomentBudget Q M A B b L p R N₂ ∧ + 1+(p:ℝ)^200*A ≤ highMomentBudget Q M A B b L p R N₂ ∧ + Q+(p:ℝ)^200*M ≤ (highMomentBudget Q M A B b L p R N₂)^2 := by + have hc := highCertificateMajorant_nonneg Q M B b L p R 200 N₂ hQ hM hB.le hb hL + have hrow : 0 ≤ 1+(p:ℝ)^200*A := by positivity + have hx : 0 ≤ Q/B+(p:ℝ)^200*(M/B) := by positivity + have hCB : B ≤ highMomentBudget Q M A B b L p R N₂ := by + unfold highMomentBudget; linarith + have hCx : Q/B+(p:ℝ)^200*(M/B) ≤ highMomentBudget Q M A B b L p R N₂ := by + unfold highMomentBudget; linarith + have hC := hB.le.trans hCB + refine ⟨hC,?_,?_,?_⟩ + · unfold highMomentBudget; linarith + · unfold highMomentBudget; linarith + · calc + _ = B*(Q/B+(p:ℝ)^200*(M/B)) := by field_simp + _ ≤ highMomentBudget Q M A B b L p R N₂ * + highMomentBudget Q M A B b L p R N₂ := mul_le_mul hCB hCx hx hC + _ = _ := (sq _).symm + +end + +open Module ProjectiveIncidence ProjectiveTraining GlobalRadial PoissonScore WeightedPrograms +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal + +noncomputable def pencilHighBudget (q m : ℕ) (n χ b L : ℝ) (p R : ℕ) : ℝ := + highMomentBudget (pencilAlphabet q 4) (dyadFactor m χ*(geometryScale q n)^2) + (dyadFactor m χ*geometryScale q n) (geometryScale q n) b L p R + (pencilAlphabet q 2) + +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +theorem projective_high_moment_from_pairs (hdim : finrank K V=5) + (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) (δ L : ℝ≥0) (hδ : 0 < δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) + (n χ b base D₀ : ℝ) (hn : 0 < n) (hb : 1 ≤ b) (hD : 0 ≤ D₀) + (hL : 10000 ≤ (L:ℝ)) (hbase : (23/25:ℝ) ≤ base) + (hcap : n ≤ (Nat.card K:ℝ)^3) + (hscaleDensity : n*(δ:ℝ) ≤ 4*Nat.card K) + (hchi : (208*2^198:ℝ) ≤ Real.exp (2*χ)) + (hm : ∀ H : F,mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H) ≤ 2) + (hlower : ∀ H : F,(3/4:ℝ) ≤ mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H)) + (hdelta : ∀ H : F,|mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H)-base| ≤ 17/100) + (Lines : Finset (Submodule K V)) (hLines : ∀ l : RadialLine x,l.val∈Lines) + (Q : Finset (ℙ K V)) (hx : x∈Q) + (hPow : (∑ z : DistinctPairs F,strength (pencilLines x F) + (radialWeight x (outsideAt x S (O x)) δ) z^200) ≤ + dyadFactor (outsideAt x S (O x)).card χ*(geometryScale (Nat.card K) n)^2) + {p : ℕ} (hp : 0 < p) (R h : ℕ) (hKR : 200 ≤ R/2) (hh : 0 < h) + (hsize : h ≤ (R/2-5000)/(2*200)) (herr : (p:ℝ)*h*(19/20:ℝ)^(h-1) < 1/2) + (own : F→Fin R→Bool) + (hDsum : (∑ H : F,SingletonEnumeration.independentWeight + (radialWeight x (outsideAt x S (O x)) δ) (fun d => L*radialWeight x (outsideAt x S (O x)) δ d) + (pencilLines x F) R 5000 base H) ≤ D₀) + (hcost : D₀+2*((p+1:ℝ)*pencilHighBudget (Nat.card K) (outsideAt x S (O x)).card n χ b L p R) ≤ + geometryScale (Nat.card K) n*Real.exp (((L:ℝ)*R)/5)) + (hp2 : (p:ℝ)^2 ≤ Real.exp (((L:ℝ)*R)/10)) + (hA : 2 ≤ geometryScale (Nat.card K) n*Real.exp (-((L:ℝ)*R))) + (hscale : 16*((Nat.card K:ℝ)+1) ≤ + (geometryScale (Nat.card K) n*Real.exp (-((L:ℝ)*R)))*(1/(100*(p:ℝ)))^2) + (hstrong : x∉badCenters S O δ ((1/(100*(p:ℝ)))/2) Lines Q 1) + (hpairScalar : (pencilAlphabet (Nat.card K) 4:ℝ)+ + (dyadFactor (outsideAt x S (O x)).card χ*(geometryScale (Nat.card K) n)^2)/(1/(100*(p:ℝ)))^200 ≤ + (geometryScale (Nat.card K) n)^2*Real.exp (((L:ℝ)*R)/10)) : + (∫ ω, HighMoment.allTrunc R 5000 ω*(∑ H : F,scoreTerm (pencilLines x F H) (Real.exp (-(L:ℝ)*base)) (own H) + (fun r d => ω (r,d)))^p + ∂batchMeasure (fun i : Fin R×RadialLine x => L*radialWeight x (outsideAt x S (O x)) δ i.2)) ≤ + (geometryScale (Nat.card K) n)^p*Real.exp (-(1/10:ℝ)*(p*((L:ℝ)*R))) := by + let X := outsideAt x S (O x) + let q := Nat.card K + let B := geometryScale q n + let M := dyadFactor X.card χ*B^2 + let A := dyadFactor X.card χ*B + let C := pencilHighBudget q X.card n χ b L p R + have hq : 0 < q := Nat.card_pos + have hB : 0 < B := by dsimp [B,geometryScale]; positivity + have hM : 0 ≤ M := by dsimp [M,dyadFactor]; positivity + have hRow : 0 ≤ A := by dsimp [A,dyadFactor]; positivity + have hQ : 0 ≤ (pencilAlphabet q 4:ℝ) := Nat.cast_nonneg _ + have hC := highMomentBudget_bounds (pencilAlphabet q 4) M A B b L p R + (pencilAlphabet q 2) hQ hM hRow hB (zero_le_one.trans hb) L.coe_nonneg + have hrows (H : F) : (∑ H',offRow x X δ F H H'^200) ≤ A := by + simpa only [A,B,dyadFactor,geometryScale,mul_assoc,mul_left_comm,mul_comm] using + score_row_uniform_moment x hdim X δ hδ F hF H n χ hn hm hcap hscaleDensity hchi + have hQsize : (F.card:ℝ) ≤ (pencilAlphabet q 4:ℝ) := by + exact_mod_cast (by simpa only [hdim,Nat.reduceSub,pencilAlphabet] using pencil_size x F hF) + have hN₁ (d : RadialLine x) : (Finset.univ.filter fun H : F => d∈pencilLines x F H).card ≤ pencilAlphabet q 3 := by + simpa only [hdim,Nat.reduceSub,pencilAlphabet] using one_anchor_count x F d + have hN₂ (d e : RadialLine x) (hde : d≠e) : + (Finset.univ.filter fun H : F => d∈pencilLines x F H ∧ e∈pencilLines x F H).card ≤ pencilAlphabet q 2 := by + simpa only [hdim,Nat.reduceSub,pencilAlphabet] using two_anchor_count x F d e hde + have hmassL (H : F) : (∑ d∈pencilLines x F H,((L*radialWeight x X δ d:ℝ≥0):ℝ)) ≤ 2*(L:ℝ) := by + simpa only [mass,NNReal.coe_mul,Finset.mul_sum,mul_comm (L:ℝ) 2] using + mul_le_mul_of_nonneg_left (hm H) L.coe_nonneg + have ht : 0 < 1/(100*(p:ℝ)) := by positivity + let Δ := ⌊B*Real.exp (-((L:ℝ)*R))⌋₊ + have hΔ (H : F) : Fintype.card {H' : F // AmbientEnumeration.overlapRelation + (radialWeight x X δ) (pencilLines x F) (1/(100*(p:ℝ))) H H'} ≤ Δ := by + apply (Nat.le_floor_iff (by positivity)).mpr + exact ambient_degree_off_exception x hdim S O δ hδ F hF hm _ _ ht hA hscale Lines hLines Q hx hstrong H + have hdeg : (Δ:ℝ) ≤ B*Real.exp (-((L:ℝ)*R)) := Nat.floor_le (by positivity) + have hRelPairs : (Fintype.card (ComponentEnumeration.RelatedPair (AmbientEnumeration.overlapRelation + (radialWeight x X δ) (pencilLines x F) (1/(100*(p:ℝ))))):ℝ) ≤ B^2*Real.exp (((L:ℝ)*R)/10) := by + apply (strong_pairs_le x X δ F _).trans + apply le_trans (add_le_add hQsize (power_tail_card _ (fun z => by unfold strength; positivity) 200 _ M ht hPow)) + exact hpairScalar + apply AmbientEnumeration.ambient_refined_truncated_moment (radialWeight x X δ) (pencilLines x F) + hp R own L B b (2*(L:ℝ)) C D₀ base B hL hbase hlower hdelta hB hb (by positivity) + hC.1 hD hB.le hmassL 200 5000 h (pencilAlphabet q 3) (pencilAlphabet q 2) (by norm_num) + hKR hh false hsize herr hN₁ hN₂ ?_ ?_ ?_ hDsum hcost hp2 Δ hΔ hdeg hRelPairs + · exact (score_high_certificate_majorant x X δ L F p R 200 _ _ M B b hB (zero_le_one.trans hb) hQsize hM hm hPow).trans hC.2.1 + · intro H + exact (shift_row_from_power x X δ F H p 200 (by norm_num) A (hrows H)).trans hC.2.2.1 + · exact (shift_pair_from_power x X δ F p 200 M hPow).trans + ((add_le_add hQsize (le_refl _)).trans hC.2.2.2) + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/History.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/History.lean new file mode 100644 index 0000000000000000000000000000000000000000..51528dcd05a1e6e025b2f32bb8087584cb512abe --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/History.lean @@ -0,0 +1,41 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.UniformHistory + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {B A T β κ : Type} [Fintype B] [Fintype A] [Fintype T] [Fintype β] + [Fintype κ] [Nonempty A] +local instance historySupportIndexDecEq : DecidableEq ((B×A)⊕T) := Classical.decEq _ +omit [Nonempty A] in +lemma history_support (p : Law (((B×A)⊕T)→β)) (n : ℕ) + (h : BlockHistory B A T β n) (x : ((B×A)⊕T)→β) + (hx : 0 exact hx + | succ n ih => + exact fiber_reveal_support p (representativeSet h.1) h.2.1 x + (ih _ h.2.2 hx) +lemma preRound_positive (μ : Law κ) (p : κ→Law (((B×A)⊕T)→β)) + (S : κ→B→Finset A) (n : ℕ) (z : (κ×BlockHistory B A T β n)×(B→A)) + (hz : 0 + ((freshBlockLaw (historyUnused (S z.1.1) z.1.2)).nonneg z.2).not_gt h.2) + have h2:=(mul_pos_iff.mp h1.1).resolve_right (fun h=>(μ.nonneg _).not_gt h.1) + exact ⟨h2.1,h2.2,h1.2⟩ +lemma marginal_support_subset {I γ : Type*} [Fintype I] [Fintype γ] + (p : Law (I→γ)) (D : I→Finset γ) (hp : InDomains p D) (i : I) : + support (map p (fun x=>x i))⊆D i := by + intro b hb + obtain ⟨x,hx,rfl⟩:=map_positive p (fun x=>x i) b ((mem_support _ _).mp hb) + exact hp x hx i +end +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/HistoryCylinder.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/HistoryCylinder.lean new file mode 100644 index 0000000000000000000000000000000000000000..6f37684c1fdfd0934f90e4d7f1ef0a7e2908dc74 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/HistoryCylinder.lean @@ -0,0 +1,258 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.Hits +import OAI.Combinatorics.RamseyFive.Entropy.SequentialLaw +import OAI.Combinatorics.RamseyFive.Entropy.FinitePiLaw +import OAI.Combinatorics.RamseyFive.Streams.PermutationCylinder + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped Classical BigOperators +variable {Ω Τ I H A B : Type*} [Fintype Ω] [Fintype Τ] + [Fintype I] [Fintype H] [Fintype A] [Fintype B] + +lemma eventMass_independent_product (p : Law Ω) (q : Law Τ) + (E : Finset Ω) (F : Finset Τ) : + eventMass (adaptiveLaw p (fun _ => q)) (E ×ˢ F) = + eventMass p E * eventMass q F := by + change (∑ z ∈ E ×ˢ F, p z.1 * q z.2) = (∑ x ∈ E, p x) * ∑ y ∈ F, q y + rw [Finset.sum_product, Finset.sum_mul] + apply Finset.sum_congr rfl + intro x hx + rw [Finset.mul_sum] + +lemma conditionOn_independent_product (p : Law Ω) (q : Law Τ) + (E : Finset Ω) (F : Finset Τ) (hE : 0 < eventMass p E) + (hF : 0 < eventMass q F) : + conditionOn (adaptiveLaw p (fun _ => q)) (E ×ˢ F) + (by rw [eventMass_independent_product]; exact mul_pos hE hF) = + adaptiveLaw (conditionOn p E hE) (fun _ => conditionOn q F hF) := by + classical + apply Law.ext + funext z + rw [conditionOn_apply, eventMass_independent_product] + simp only [adaptiveLaw, conditionOn] + by_cases he : z.1 ∈ E <;> by_cases hf : z.2 ∈ F <;> + simp [he, hf, div_mul_div_comm] + +def indexValueHistory (indices : Τ → I) (expose : I → Ω → H) (z : Ω × Τ) : I × H := + (indices z.2, expose (indices z.2) z.1) + +omit [Fintype I] [Fintype H] in +lemma history_rectangle (indices : Τ → I) (expose : I → Ω → H) (i : I) (h : H) : + Finset.univ.filter (fun z => indexValueHistory indices expose z = (i,h)) = + (Finset.univ.filter (fun x => expose i x = h)) ×ˢ + (Finset.univ.filter (fun r => indices r = i)) := by + ext z + simp only [Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_product, + indexValueHistory, Prod.mk.injEq] + constructor + · rintro ⟨hi, hh⟩ + exact ⟨hi ▸ hh, hi⟩ + · rintro ⟨hh, hi⟩ + exact ⟨hi, hi.symm ▸ hh⟩ + +omit [Fintype I] [Fintype H] in +theorem history_factorization (p : Law Ω) (q : Law Τ) + (indices : Τ → I) (expose : I → Ω → H) (i : I) (h : H) + (hi : 0 < eventMass q (Finset.univ.filter (fun r => indices r = i))) + (hh : 0 < eventMass p (Finset.univ.filter (fun x => expose i x = h))) : + conditionOn (adaptiveLaw p (fun _ => q)) + (Finset.univ.filter (fun z => indexValueHistory indices expose z = (i,h))) + (by rw [history_rectangle, eventMass_independent_product]; exact mul_pos hh hi) = + adaptiveLaw + (conditionOn p (Finset.univ.filter (fun x => expose i x = h)) hh) + (fun _ => conditionOn q (Finset.univ.filter (fun r => indices r = i)) hi) := by + simpa only [history_rectangle] using conditionOn_independent_product p q + (Finset.univ.filter (fun x => expose i x = h)) + (Finset.univ.filter (fun r => indices r = i)) hh hi + +lemma map_independent_pair (p : Law Ω) (q : Law Τ) (f : Ω → A) (g : Τ → B) : + map (adaptiveLaw p (fun _ => q)) (fun z => (f z.1, g z.2)) = + adaptiveLaw (map p f) (fun _ => map q g) := by + classical + apply Law.ext + funext z + simp only [map, adaptiveLaw] + rw [Fintype.sum_prod_type, Finset.sum_mul] + apply Finset.sum_congr rfl + intro x hx + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro y hy + have hz : (f x, g y) = z ↔ f x = z.1 ∧ g y = z.2 := Prod.ext_iff + simp only [hz] + by_cases hf : f x = z.1 <;> by_cases hg : g y = z.2 <;> simp [hf, hg] + +end + +open scoped Classical BigOperators +variable {α β : Type*} [Fintype α] [Fintype β] + +noncomputable def uniformType (α : Type*) [Fintype α] [Nonempty α] : Law α := + uniformOn Finset.univ Finset.univ_nonempty + +lemma uniformType_mass [Nonempty α] (E : Finset α) : + eventMass (uniformType α) E = (E.card : ℝ) / Fintype.card α := by + simp only [uniformType, uniformOn_mass, Finset.inter_univ, Finset.card_univ] + +lemma uniformType_event_pos [Nonempty α] (E : Finset α) (hE : E.Nonempty) : + 0 < eventMass (uniformType α) E := by + rw [uniformType_mass] + exact div_pos (by exact_mod_cast Finset.card_pos.mpr hE) + (by exact_mod_cast Fintype.card_pos) + +lemma conditionOn_uniformType [Nonempty α] (E : Finset α) (hE : E.Nonempty) : + conditionOn (uniformType α) E (uniformType_event_pos E hE) = uniformOn E hE := by + apply Law.ext + funext a + rw [conditionOn_apply, uniformType_mass] + simp only [uniformType, uniformOn, Finset.mem_univ, ite_true, Finset.card_univ] + by_cases ha : a ∈ E + · simp only [ha, ite_true] + have hc : (Fintype.card α : ℝ) ≠ 0 := by exact_mod_cast Fintype.card_ne_zero + field_simp + · simp [ha] + +lemma map_uniformType [Nonempty α] (f : α → β) (b : β) : + map (uniformType α) f b = + (Fintype.card {a : α // f a = b} : ℝ) / Fintype.card α := by + classical + simp only [map, uniformType, uniformOn, Finset.mem_univ, ite_true, Finset.card_univ] + rw [←Finset.sum_filter, Finset.sum_const, nsmul_eq_mul, Fintype.card_subtype] + rfl + +lemma map_uniformType_subtype (E : Finset α) (hE : E.Nonempty) : + letI : Nonempty E := hE.to_subtype + map (uniformType E) Subtype.val = uniformOn E hE := by + classical + let : Nonempty E := hE.to_subtype + apply Law.ext + funext a + rw [map_uniformType] + simp only [Fintype.card_coe, uniformOn] + by_cases ha : a ∈ E + · simp only [ha, ite_true] + have he : Fintype.card {x : E // (x : α) = a} = 1 := by + let : Unique {x : E // (x : α) = a} := + { default := ⟨⟨a, ha⟩, rfl⟩ + uniq x := by apply Subtype.ext; exact Subtype.ext x.property } + exact Fintype.card_unique + rw [he] + simp + · simp only [ha, ite_false] + have he : IsEmpty {x : E // (x : α) = a} := + ⟨fun x => ha (x.property ▸ x.val.property)⟩ + let := he + simp +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.PermutationCylinder +open FiniteEntropy +open scoped Classical BigOperators +variable {α : Type*} [Fintype α] + +noncomputable instance cylinderNonempty (S : Finset α) (e : Equiv.Perm α) : + Nonempty (Cylinder S e) := ⟨⟨e, by intro x hx; rfl⟩⟩ + +noncomputable def drawLaw (S : Finset α) (e : Equiv.Perm α) (x : α) : Law α := + map (uniformType (Cylinder S e)) (fun p => p.val x) + +lemma drawLaw_available (S : Finset α) (e : Equiv.Perm α) {x y : α} + (hx : x ∉ S) (hy : y ∉ S.map e.toEmbedding) : + drawLaw S e x y = 1 / (Fintype.card α - S.card : ℕ) := by + rw [drawLaw, map_uniformType] + exact next_probability S e hx hy + +lemma drawLaw_exposed (S : Finset α) (e : Equiv.Perm α) {x y : α} + (hx : x ∉ S) (hy : y ∈ S.map e.toEmbedding) : drawLaw S e x y = 0 := by + rw [drawLaw, map_uniformType] + have he : IsEmpty {p : Cylinder S e // p.val x = y} := by + constructor + intro p + obtain ⟨z, hz, hzy⟩ := Finset.mem_map.mp hy + change e z = y at hzy + have hzx : p.val.val z = p.val.val x := (p.val.property z hz).trans (hzy.trans p.property.symm) + exact hx (p.val.val.injective hzx ▸ hz) + let := he + simp + +theorem drawLaw_exact (S : Finset α) (e : Equiv.Perm α) {x : α} (hx : x ∉ S) (y : α) : + drawLaw S e x y = if y ∈ S.map e.toEmbedding then (0 : ℝ) + else (1 : ℝ) / (Fintype.card α - S.card : ℕ) := by + by_cases hy : y ∈ S.map e.toEmbedding + · rw [ite_eq_left hy]; exact drawLaw_exposed S e hx hy + · rw [ite_eq_right hy]; exact drawLaw_available S e hx hy + +end SharpRamseyFive.PermutationCylinder + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {α β : Type*} [Fintype α] [Fintype β] + +lemma map_uniformOn (E : Finset α) (hE : E.Nonempty) (f : α → β) (b : β) : + map (uniformOn E hE) f b = + ((E.filter (fun a => f a = b)).card : ℝ)/E.card := by + simp only [map, uniformOn] + rw [←Finset.sum_filter] + simp only [←Finset.sum_filter, Finset.filter_filter] + have he : Finset.univ.filter (fun a => f a = b ∧ a ∈ E) = E.filter (fun a => f a = b) := by + ext a; simp [and_comm] + rw [he, Finset.sum_const, nsmul_eq_mul] + rfl +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.PermutationCylinder +open FiniteEntropy +open scoped Classical BigOperators +variable {α : Type*} [Fintype α] + +def rankPrefix (S : Finset α) (p : Equiv.Perm α) : S → α := fun x => p x + +noncomputable def cylinderSet (S : Finset α) (e : Equiv.Perm α) : Finset (Equiv.Perm α) := + Finset.univ.filter (fun p => rankPrefix S p = rankPrefix S e) + +lemma mem_cylinderSet (S : Finset α) (e p : Equiv.Perm α) : + p ∈ cylinderSet S e ↔ ∀ x ∈ S, p x = e x := by + simp only [cylinderSet, Finset.mem_filter, Finset.mem_univ, true_and, + funext_iff, rankPrefix, Subtype.forall] + +lemma cylinderSet_nonempty (S : Finset α) (e : Equiv.Perm α) : + (cylinderSet S e).Nonempty := + ⟨e, (mem_cylinderSet S e e).mpr (fun _ _ => rfl)⟩ + +noncomputable def cylinderSetEquiv (S : Finset α) (e : Equiv.Perm α) : + cylinderSet S e ≃ Cylinder S e := + Equiv.subtypeEquivRight (mem_cylinderSet S e) + +lemma card_cylinderSet (S : Finset α) (e : Equiv.Perm α) : + (cylinderSet S e).card = Fintype.card (Cylinder S e) := by + rw [←Fintype.card_coe] + exact Fintype.card_congr (cylinderSetEquiv S e) + +noncomputable def filterNextEquiv (S : Finset α) (e : Equiv.Perm α) (x y : α) : + ↥((cylinderSet S e).filter (fun p => p x = y)) ≃ + {p : Cylinder S e // p.val x = y} where + toFun p := ⟨⟨p.val, (mem_cylinderSet S e p.val).mp + (Finset.mem_filter.mp p.property).1⟩, (Finset.mem_filter.mp p.property).2⟩ + invFun p := ⟨p.val.val, Finset.mem_filter.mpr + ⟨(mem_cylinderSet S e p.val.val).mpr p.val.property, p.property⟩⟩ + left_inv _ := rfl + right_inv _ := rfl + +theorem posterior_draw (S : Finset α) (e : Equiv.Perm α) {x y : α} + (hx : x ∉ S) (hy : y ∉ S.map e.toEmbedding) : + map (conditionOn (uniformType (Equiv.Perm α)) (cylinderSet S e) + (uniformType_event_pos _ (cylinderSet_nonempty S e))) (fun p => p x) y = + 1 / (Fintype.card α - S.card : ℕ) := by + rw [conditionOn_uniformType _ (cylinderSet_nonempty S e), map_uniformOn, card_cylinderSet] + have hn := Fintype.card_congr (filterNextEquiv S e x y) + rw [Fintype.card_coe] at hn + rw [hn] + exact next_probability S e hx hy + +end SharpRamseyFive.PermutationCylinder + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/Hits.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/Hits.lean new file mode 100644 index 0000000000000000000000000000000000000000..7c36ae00f88bc23cb95a62763b4c18b42d7c4caf --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/Hits.lean @@ -0,0 +1,177 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.EventMass + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped BigOperators Classical +variable {α : Type*} [Fintype α] + +noncomputable def hits {n : ℕ} (H : Finset α) (x : Fin n → α) : ℝ := + ∑ i,if x i∈H then 1 else 0 + +omit [Fintype α] in +lemma hits_cons (H : Finset α) {n : ℕ} (a : α) (x : Fin n → α) : + hits H (Fin.cons a x)=(if a∈H then 1 else 0)+hits H x := by + simp only [hits,Fin.sum_univ_succ,Fin.cons_zero,Fin.cons_succ] + +lemma expected_hits (p : Law α) (H : Finset α) (n : ℕ) : + (∑ x,iid p (Fin n) x*hits H x)=(n:ℝ)*eventMass p H := by + induction n with + | zero => simp [hits] + | succ n hn => + rw [sum_iid_succ] + simp only [hits_cons,mul_add,Finset.sum_add_distrib] + have h1 : (∑ a,∑ x,p a*iid p (Fin n) x*(if a∈H then 1 else 0))=eventMass p H := by + calc + _ = ∑ a,p a*(if a∈H then 1 else 0) := by + apply Finset.sum_congr rfl + intro a _ + rw [←Finset.sum_mul,←Finset.mul_sum,(iid p (Fin n)).sum_one,mul_one] + _ = _ := by simp [mul_ite,eventMass] + have h2 : (∑ a,∑ x,p a*iid p (Fin n) x*hits H x)=(n:ℝ)*eventMass p H := by + simp only [mul_assoc,←Finset.mul_sum,hn,←Finset.sum_mul,p.sum_one,one_mul] + rw [h1,h2,Nat.cast_add,Nat.cast_one] + ring + +lemma event_markov (p : Law α) (w : α → ℝ) (hw : ∀ a,0≤w a) (t : ℝ) + (E : Finset α) (hE : ∀ a∈E,t≤w a) : + t*eventMass p E≤∑ a,p a*w a := by + rw [eventMass,Finset.mul_sum] + calc + _ ≤ ∑ a∈E,p a*w a := Finset.sum_le_sum fun a ha => by + simpa only [mul_comm t] using mul_le_mul_of_nonneg_left (hE a ha) (p.nonneg a) + _ ≤ _ := Finset.sum_le_sum_of_subset_of_nonneg (Finset.subset_univ _) (fun a _ _ => + mul_nonneg (p.nonneg a) (hw a)) + +theorem iid_test_rejection (p : Law α) (H : Finset α) (n : ℕ) (hn : 0 c*n≤hits H x)≤eventMass p H/c := by + have hn' : (0:ℝ) by split_ifs <;> norm_num) + (c*n) (Finset.univ.filter fun x => c*n≤hits H x) (by + intro x hx + exact (Finset.mem_filter.mp hx).2) + rw [expected_hits] at hh + apply (le_div_iff₀ hc).mpr + nlinarith + +lemma first_success_atom_le (p : Law α) (E : Finset α) (n : ℕ) (hn : 0 + first_success_atom_le p E n hn hE a + _ = _ := by rw [←Finset.sum_div]; rfl + +end +open scoped BigOperators Classical +variable {α : Type*} [Fintype α] + +noncomputable def uniformOn (A : Finset α) (hA : A.Nonempty) : Law α where + mass a := if a∈A then (A.card:ℝ)⁻¹ else 0 + nonneg a := by split_ifs <;> positivity + sum_one := by + have hc : (A.card:ℝ)≠0 := by exact_mod_cast Nat.ne_of_gt (Finset.card_pos.mpr hA) + rw [←Finset.sum_filter,Finset.filter_univ_mem,Finset.sum_const,nsmul_eq_mul,mul_inv_cancel₀ hc] + +lemma uniformOn_mass (A : Finset α) (hA : A.Nonempty) (H : Finset α) : + eventMass (uniformOn A hA) H = ((H∩A).card:ℝ)/A.card := by + simp only [eventMass,uniformOn,←Finset.sum_filter,Finset.filter_mem_eq_inter, + Finset.sum_const,nsmul_eq_mul,div_eq_mul_inv] + +lemma iid_uniformOn {n : ℕ} (A : Finset α) (hA : A.Nonempty) (x : Fin n → α) : + iid (uniformOn A hA) (Fin n) x = + if (∀ i,x i∈A) then ((A.card:ℝ)⁻¹)^n else 0 := by + by_cases h : ∀ i,x i∈A + · simp [iid,uniformOn,h] + · obtain ⟨i,hi⟩ := not_forall.mp h + simp only [iid] + rw [Finset.prod_eq_zero (Finset.mem_univ i) (by simp [uniformOn,hi])] + simp only [h,ite_false] + +lemma uniformOn_row_scaling {n : ℕ} (A W : Finset α) (hA : A.Nonempty) + (hW : W.Nonempty) (hAW : A⊆W) (x : Fin n → α) (hx : ∀ i,x i∈A) : + iid (uniformOn W hW) (Fin n) x = ((A.card:ℝ)/W.card)^n* + iid (uniformOn A hA) (Fin n) x := by + rw [iid_uniformOn,iid_uniformOn,ite_eq_left hx,ite_eq_left (fun i => hAW (hx i))] + have hc : (A.card:ℝ)≠0 := by exact_mod_cast Nat.ne_of_gt (Finset.card_pos.mpr hA) + rw [←mul_pow] + congr 1 + field_simp + +lemma eventMass_scaling (p r : Law α) (E : Finset α) (s : ℝ) + (h : ∀ a∈E,p a=s*r a) : eventMass p E=s*eventMass r E := by + simp only [eventMass,Finset.mul_sum] + exact Finset.sum_congr rfl h + +theorem first_success_scaled (p r : Law α) (E : Finset α) (s : ℝ) (hs : 0 + first_success_scaled p r E s hs hscale N hN hE a + _ = _ := by rw [←Finset.sum_div]; rfl + +theorem uniform_proposal_bad (A W : Finset α) (hA : A.Nonempty) (hW : W.Nonempty) + (hAW : A⊆W) (h N : ℕ) (hN : 0 uniformOn_row_scaling A W hA hW hAW x (hsource x hx)) N hN hE + convert hh using 1 + congr 1 + ext x + simp only [Finset.mem_image] + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/IIDLowerTail.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/IIDLowerTail.lean new file mode 100644 index 0000000000000000000000000000000000000000..90150720d8a8c9e464cc0e32021a4549717bc415 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/IIDLowerTail.lean @@ -0,0 +1,81 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.Hits + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {A : Type*} [Fintype A] + +lemma exp_neg_one_le_half : Real.exp (-1) ≤ (1/2:ℝ) := by + have h := Real.add_one_le_exp (1:ℝ) + rw [Real.exp_neg] + rw [←one_div] + exact (div_le_iff₀ (Real.exp_pos 1)).mpr (by linarith) + +lemma expected_exp_neg_hit (p : Law A) (H : Finset A) : + (∑a,p a*Real.exp (-(if a∈H then (1:ℝ) else 0)))= + 1-(1-Real.exp (-1))*eventMass p H := by + have hh (a : A) : p a*Real.exp (-(if a∈H then (1:ℝ) else 0))= + p a-(1-Real.exp (-1))*(if a∈H then p a else 0) := by + split_ifs + · ring + · norm_num + simp_rw [hh] + rw [Finset.sum_sub_distrib,p.sum_one,←Finset.mul_sum] + simp only [eventMass,←Finset.sum_filter,Finset.filter_univ_mem] + +lemma expected_exp_neg_hits (p : Law A) (H : Finset A) (n : ℕ) : + (∑x,iid p (Fin n) x*Real.exp (-hits H x))= + (1-(1-Real.exp (-1))*eventMass p H)^n := by + have hh (x : Fin n→A) : Real.exp (-hits H x)= + ∏i,Real.exp (-(if x i∈H then (1:ℝ) else 0)) := by + rw [hits,←Finset.sum_neg_distrib,Real.exp_sum] + change (∑x,(∏i,p (x i))*Real.exp (-hits H x))=_ + simp_rw [hh,←Finset.prod_mul_distrib] + rw [←Fintype.sum_pow (fun a=>p a*Real.exp (-(if a∈H then (1:ℝ) else 0))) n, + expected_exp_neg_hit] + +lemma expected_exp_neg_hits_le (p : Law A) (H : Finset A) (n : ℕ) : + (∑x,iid p (Fin n) x*Real.exp (-hits H x)) ≤ + Real.exp (-eventMass p H*n/2) := by + have hbase : 0 ≤ 1-(1-Real.exp (-1))*eventMass p H := by + rw [←expected_exp_neg_hit] + exact Finset.sum_nonneg fun a _=>mul_nonneg (p.nonneg a) (Real.exp_pos _).le + have hp := eventMass_nonneg p H + have hsmall : 1-(1-Real.exp (-1))*eventMass p H ≤ Real.exp (-eventMass p H/2) := by + have he := Real.add_one_le_exp (-eventMass p H/2) + have hh := mul_le_mul_of_nonneg_right exp_neg_one_le_half hp + nlinarith + rw [expected_exp_neg_hits] + calc + _ ≤ (Real.exp (-eventMass p H/2))^n := pow_le_pow_left₀ hbase hsmall n + _ = _ := by rw [←Real.exp_nat_mul];congr 1;ring + +theorem iid_low_hit_event (p : Law A) (H : Finset A) (n : ℕ) (t : ℝ) + (E : Finset (Fin n→A)) (hE : ∀x∈E,hits H x ≤ t) : + eventMass (iid p (Fin n)) E ≤ Real.exp (t-eventMass p H*n/2) := by + have hx := event_markov (iid p (Fin n)) (fun x=>Real.exp (-hits H x)) + (fun x=>(Real.exp_pos _).le) (Real.exp (-t)) E (fun x hx=> + Real.exp_le_exp.mpr (neg_le_neg (hE x hx))) + have hh := hx.trans (expected_exp_neg_hits_le p H n) + calc + _ ≤ Real.exp (-eventMass p H*n/2)/Real.exp (-t) := + (le_div_iff₀ (Real.exp_pos _)).mpr (by simpa [mul_comm] using hh) + _ = _ := by rw [←Real.exp_sub];congr 1;ring + +theorem iid_cap_tail (p : Law A) (H : Finset A) (n : ℕ) (q : ℝ) (hq : 0 < q) + (hH : 1/(2*q) ≤ eventMass p H) : + eventMass (iid p (Fin n)) (Finset.univ.filter fun x=>hits H x < (n:ℝ)/(5*q)) ≤ + Real.exp (-(n:ℝ)/(20*q)) := by + have hh := iid_low_hit_event p H n ((n:ℝ)/(5*q)) + (Finset.univ.filter fun x=>hits H x < (n:ℝ)/(5*q)) (fun x hx=>(Finset.mem_filter.mp hx).2.le) + refine hh.trans (Real.exp_le_exp.mpr ?_) + have hn : (0:ℝ) ≤ n := Nat.cast_nonneg _ + have hm := mul_le_mul_of_nonneg_right hH hn + have he : (n:ℝ)/(5*q)-(1/(2*q))*n/2= -(n:ℝ)/(20*q) := by field_simp;ring + linarith + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/IndependentLaw.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/IndependentLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..40ee9d28856dae951ada745017711101448cf14f --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/IndependentLaw.lean @@ -0,0 +1,32 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.SequentialLaw + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {α β γ : Type*} [Fintype α] [Fintype β] [Fintype γ] +lemma independent_second (p : Law α) (q : Law β) : + map (adaptiveLaw p (fun _=>q)) Prod.snd=q := by + apply Law.ext + funext b + change (∑z : α×β,if z.2=b then p z.1*q z.2 else 0)=q b + rw [Fintype.sum_prod_type] + simp only [Finset.sum_ite_eq',Finset.mem_univ,ite_true] + rw [←Finset.sum_mul,p.sum_one,one_mul] +lemma independent_first (p : Law α) (q : Law β) : + map (adaptiveLaw p (fun _=>q)) Prod.fst=p := by + apply Law.ext + funext a + simp [map,adaptiveLaw,Fintype.sum_prod_type,←Finset.mul_sum,q.sum_one] +lemma map_independent_left (p : Law α) (q : Law β) (f : α→γ) : + map (adaptiveLaw p (fun _=>q)) (fun z=>f z.1)=map p f := by + have h := congrArg (fun r=>map r f) (independent_first p q) + simpa only [map_comp,Function.comp_def] using h +lemma map_independent_right (p : Law α) (q : Law β) (f : β→γ) : + map (adaptiveLaw p (fun _=>q)) (fun z=>f z.2)=map q f := by + have h := congrArg (fun r=>map r f) (independent_second p q) + simpa only [map_comp,Function.comp_def] using h +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/IndependentSampling.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/IndependentSampling.lean new file mode 100644 index 0000000000000000000000000000000000000000..79dad37f7e3a76a13b8f04b70dd7ba0533de8f49 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/IndependentSampling.lean @@ -0,0 +1,141 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.RevealDomains +import OAI.Combinatorics.RamseyFive.Entropy.EventWeight +import OAI.Combinatorics.RamseyFive.Geometry.OrientedTreeDomains +import OAI.Combinatorics.RamseyFive.Geometry.OrderedTargetRetention + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {A I J : Type*} [Fintype A] [Fintype I] [Fintype J] + +lemma eventWeight_mean (p : Law A) (P : A→Prop) : + eventWeight p P=mean p (fun a=>if P a then 1 else 0) := by + simp only [eventWeight,mean,mul_ite,mul_one,mul_zero] + +lemma eventWeight_le_one (p : Law A) (P : A→Prop) : eventWeight p P≤1 := by + rw [eventWeight_mean] + calc + _ ≤ mean p (fun _=>1) := mean_mono _ (fun a=>by split_ifs <;> norm_num) + _ = 1 := mean_const p 1 + +lemma eventWeight_exists_le (p : Law A) (P : I→A→Prop) : + eventWeight p (fun a=>∃ i,P i a)≤∑ i,eventWeight p (P i) := by + simp_rw [eventWeight_mean] + rw [←mean_sum] + apply mean_mono + intro a + by_cases h : ∃ i,P i a + · obtain ⟨i,hi⟩:=h + rw [ite_eq_left ⟨i,hi⟩] + calc + (1:ℝ) = (if P i a then 1 else 0) := by rw [ite_eq_left hi] + _ ≤ ∑ j,if P j a then 1 else 0 := Finset.single_le_sum (f:=fun j=>if P j a then (1:ℝ) else 0) + (fun j _=>by split_ifs <;> norm_num) (Finset.mem_univ i) + · rw [ite_eq_right h] + exact Finset.sum_nonneg fun j _=>by split_ifs <;> norm_num + +lemma iid_eval_mean [DecidableEq I] (p : Law A) (i : I) (f : A→ℝ) : + mean (iid p I) (fun x=>f (x i))=mean p f := by + exact piLaw_eval_expectation (fun _ : I=>p) i f + +lemma iid_eval_event [DecidableEq I] (p : Law A) (i : I) (P : A→Prop) : + eventWeight (iid p I) (fun x=>P (x i))=eventWeight p P := by + simp_rw [eventWeight_mean] + exact iid_eval_mean p i (fun a=>if P a then (1:ℝ) else 0) + +lemma iid_exists_event [DecidableEq I] (p : Law A) (P : A→Prop) : + eventWeight (iid p I) (fun x=>∃ i,P (x i))≤Fintype.card I*eventWeight p P := by + apply (eventWeight_exists_le (iid p I) (fun (i:I) (x:I→A)=>P (x i))).trans + simp only [iid_eval_event,Finset.sum_const,Finset.card_univ,nsmul_eq_mul,le_refl] + +lemma iid_nested_exists_event [DecidableEq I] [DecidableEq J] + (p : Law A) (P : A→Prop) : + eventWeight (iid (iid p I) J) (fun x=>∃ j i,P (x j i))≤ + Fintype.card J*(Fintype.card I*eventWeight p P) := by + exact (iid_exists_event (iid p I) (fun x=>∃ i,P (x i))).trans + (mul_le_mul_of_nonneg_left (iid_exists_event p P) (Nat.cast_nonneg _)) +end + +noncomputable section +variable {α : Type*} [Fintype α] +lemma eventMass_filter_mean (p : Law α) (P : α→Prop) : + eventMass p (Finset.univ.filter P)=mean p (fun a=>if P a then 1 else 0) := by + simp only [eventMass,Finset.sum_filter,mean,mul_ite,mul_one,mul_zero] +lemma mean_congr_pos (p : Law α) {f g : α→ℝ} (h : ∀a,0

(h a ha).le)) + (mean_mono_pos p (fun a ha=>(h a ha).ge)) +end +end SharpRamseyFive.FiniteEntropy +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec PivotTree +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V Ω : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] [Fintype Ω] +variable (f : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V→FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + +omit [Finite K] [FiniteDimensional K V] in +lemma variableTreeLaw_mean (w : ℕ) (m : Fin (w+1)) + (g : OrientedPivotTreeTape f r (finiteBalanced m.val)→ℝ) : + mean (variableTreeLaw f r w) (fun t=>g (t m))= + mean (orientedPivotTreeLaw f r (finiteBalanced m.val)) g := by + rw [←mean_map,variableTreeLaw_eval] + +theorem variable_table_target_failure (w : ℕ) (m : Fin (w+1)) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (μ : Fin (m.val+1)→Law (Finset (ℙ K V))) + (ν : Fin (m.val+1)→Law (Finset (ℙ K (Dual K V)))) + (X : Fin (m.val+1)→Finset (ℙ K V)→Finset (ℙ K V)) + (Y : Fin (m.val+1)→Finset (ℙ K (Dual K V))→Finset (ℙ K (Dual K V))) + (hX : ∀i a,(X i a).Nonempty) (hY : ∀i b,(Y i b).Nonempty) + (γ : Law Ω) (a : Ω→ℙ K V) (b : Ω→ℙ K (Dual K V)) + (hinc : ∀z,0<γ z→Incident (a z) (b z)) + (c δ τ P : ℝ) (hδ : 0<δ) (j : Fin m.val) : + mean (adaptiveLaw γ (fun _=>adaptiveLaw (originalLevelLaw μ ν) + (fun _=>variableTreeLaw f r w))) (fun z=> + if (a z.1,b z.1)∉variableTreeDomain f r z.2.2 (Finset.univ,Finset.univ) + (variableTreeEncoded f r z.2.2 (Finset.univ,Finset.univ) m σ hσ hq hd + (fun i=>X i (z.2.1.1 i)) (fun i=>Y i (z.2.1.2 i)) + (fun i=>hX i _) (fun i=>hY i _) c δ τ P hδ) + ⟨j.val,lt_trans j.isLt m.isLt⟩ then 1 else 0)= + orientedTargetFailure f r σ hσ hq hd μ ν X Y hX hY γ a b + c δ τ P hδ (finiteBalanced m.val) ((finiteRankEquiv m.val).symm j) := by + rw [orientedTargetFailure,eventMass_filter_mean,mean_adaptive,mean_adaptive] + apply mean_congr_pos + intro z hz + rw [mean_adaptive,mean_adaptive] + apply mean_congr + intro lev + have he : ∀t : VariableTreeTape f r w, + ((a z,b z)∉variableTreeDomain f r t (Finset.univ,Finset.univ) + (variableTreeEncoded f r t (Finset.univ,Finset.univ) m σ hσ hq hd + (fun i=>X i (lev.1 i)) (fun i=>Y i (lev.2 i)) + (fun i=>hX i _) (fun i=>hY i _) c δ τ P hδ) + ⟨j.val,lt_trans j.isLt m.isLt⟩) ↔ + ¬TargetCovered + (orientedPivotContextAt f r σ hσ hq hd (fun i=>X i (lev.1 i)) + (fun i=>Y i (lev.2 i)) (fun i=>hX i _) (fun i=>hY i _) + c δ τ P hδ (finiteBalanced m.val) (t m) (Finset.univ,Finset.univ) + ((finiteRankEquiv m.val).symm j)) + (orientedPivotCapsAt f r σ hσ hq hd (fun i=>X i (lev.1 i)) + (fun i=>Y i (lev.2 i)) (fun i=>hX i _) (fun i=>hY i _) + c δ τ P hδ (finiteBalanced m.val) (t m) (Finset.univ,Finset.univ) + ((finiteRankEquiv m.val).symm j)) (a z) (b z) := by + intro t + rw [variableTreeDomain_coverage] + simp only [hinc z hz,true_and] + simp_rw [he] + rw [←variableTreeLaw_eval f r w m,mean_map] + congr 1 + funext t + congr 1 +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/IndependentTargetLoss.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/IndependentTargetLoss.lean new file mode 100644 index 0000000000000000000000000000000000000000..c2dcdb4b8afec23311ed3e9c56f0f173ae013137 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/IndependentTargetLoss.lean @@ -0,0 +1,121 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.ChronologicalCapDomination +import OAI.Combinatorics.RamseyFive.Entropy.TargetLoss + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy + +section +open ReverseCap +open scoped Classical BigOperators +noncomputable section +local instance (priority := high) independentTargetPropDecidable (P : Prop) : Decidable P := Classical.propDecidable P +variable {Ω Θ Z T A B : Type*} [Fintype Ω] [Fintype Θ] [Fintype Z] [Fintype T] + [Fintype A] [Fintype B] + +lemma independent_target_event (p : Law Ω) (q : Law Θ) (P : Ω → Θ → Prop) : + eventMass (adaptiveLaw p (fun _ => q)) + (Finset.univ.filter (fun z => P z.1 z.2)) = + ∑ x, p x * eventMass q (Finset.univ.filter (P x)) := by + simp only [eventMass, Finset.sum_filter, Fintype.sum_prod_type, adaptiveLaw, + Finset.mul_sum, mul_ite, mul_zero] + +lemma independent_target_endpoint_event (p : Law Ω) (q : Law Θ) (endpoint : Ω → B) + (good : B → Prop) (P : B → Θ → Prop) : + eventMass (adaptiveLaw p (fun _ => q)) + (Finset.univ.filter (fun z => good (endpoint z.1) ∧ P (endpoint z.1) z.2)) = + ∑ b, (if good b then map p endpoint b else 0) * + eventMass q (Finset.univ.filter (P b)) := by + calc + _ = ∑ x, p x * eventMass q (Finset.univ.filter + (fun ξ => good (endpoint x) ∧ P (endpoint x) ξ)) := by + simp only [eventMass, Finset.sum_filter, Fintype.sum_prod_type, adaptiveLaw, + Finset.mul_sum, mul_ite, mul_zero] + _ = ∑ x, p x * (if good (endpoint x) then + eventMass q (Finset.univ.filter (P (endpoint x))) else 0) := by + apply Finset.sum_congr rfl + intro x hx + by_cases hg : good (endpoint x) <;> simp [hg, eventMass] + _ = ∑ b, map p endpoint b * (if good b then + eventMass q (Finset.univ.filter (P b)) else 0) := (sum_map p endpoint (fun b => if good b then eventMass q (Finset.univ.filter (P b)) else 0)).symm + _ = _ := by + apply Finset.sum_congr rfl + intro b hb + split_ifs <;> simp + +lemma independent_level_endpoint_event (p : Law Ω) (μ : Law Z) (q : Law T) + (endpoint : Ω → A) (good : A → Prop) (P : A → Z → T → Prop) : + eventMass (adaptiveLaw p (fun _ => adaptiveLaw μ (fun _ => q))) + (Finset.univ.filter (fun z => good (endpoint z.1) ∧ P (endpoint z.1) z.2.1 z.2.2)) = + ∑ z, μ z*(∑ a, (if good a then map p endpoint a else 0)* + eventMass q (Finset.univ.filter (P a z))) := by + rw [independent_target_endpoint_event p (adaptiveLaw μ (fun _ => q)) endpoint good + (fun a z => P a z.1 z.2)] + simp_rw [independent_target_event μ q] + simp only [Finset.mul_sum] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro z _ + apply Finset.sum_congr rfl + intro a _ + ring + +theorem independent_target_loss (p : Law Ω) (q : Law Θ) (a : Ω → A) (b : Ω → B) + (goodA : A → Prop) (goodB : B → Prop) + (ctx : Θ → Option (Finset A × Finset B)) (caps : Θ → Option (Finset B × Finset A)) + (hcoh : ∀ t, caps t≠none → ctx t≠none) : + eventMass (adaptiveLaw p (fun _ => q)) (Finset.univ.filter + (fun z => ¬TargetCovered (ctx z.2) (caps z.2) (a z.1) (b z.1))) ≤ + eventMass p (Finset.univ.filter (fun x => ¬goodA (a x))) + + eventMass p (Finset.univ.filter (fun x => ¬goodB (b x))) + + eventMass q (Finset.univ.filter (fun t => caps t=none)) + + (∑ x, (if goodA x then map p a x else 0)*eventMass q + (Finset.univ.filter (fun t => ∃ C, ctx t=some C ∧ x∉C.1))) + + (∑ y, (if goodB y then map p b y else 0)*eventMass q + (Finset.univ.filter (fun t => ∃ C, ctx t=some C ∧ y∉C.2))) + + (∑ x, (if goodA x then map p a x else 0)*eventMass q + (Finset.univ.filter (fun t => Excludes x ((caps t).map Prod.snd)))) + + (∑ y, (if goodB y then map p b y else 0)*eventMass q + (Finset.univ.filter (fun t => Excludes y ((caps t).map Prod.fst)))) := by + have h := target_loss_split (adaptiveLaw p (fun _ => q)) (fun z => a z.1) (fun z => b z.1) + goodA goodB (fun z => ctx z.2) (fun z => caps z.2) (fun z => hcoh z.2) + rw [adaptive_event_first p (fun _ => q) (fun x => ¬goodA (a x)), + adaptive_event_first p (fun _ => q) (fun x => ¬goodB (b x)), + adaptive_event_second p (fun _ => q) (fun t => caps t=none), + ← Finset.sum_mul, p.sum_one, one_mul] at h + rw [independent_target_endpoint_event p q a goodA (fun x t => ∃ C, ctx t=some C ∧ x∉C.1), + independent_target_endpoint_event p q b goodB (fun y t => ∃ C, ctx t=some C ∧ y∉C.2), + independent_target_endpoint_event p q a goodA (fun x t => Excludes x ((caps t).map Prod.snd)), + independent_target_endpoint_event p q b goodB (fun y t => Excludes y ((caps t).map Prod.fst))] at h + exact h +end +end + +open scoped Classical BigOperators +noncomputable section +local instance (priority := high) targetProductPropDecidable (P : Prop) : Decidable P := Classical.propDecidable P +variable {Z T A : Type*} [Fintype Z] [Fintype T] [Fintype A] +lemma independent_target_event_general (μ : Law Z) (q : Law T) (P : Z × T → Prop) : + eventMass (adaptiveLaw μ (fun _ => q)) (Finset.univ.filter P) = + ∑ z, μ z*eventMass q (Finset.univ.filter (fun t => P (z,t))) := by + exact independent_target_event μ q (fun z t => P (z,t)) + +lemma independent_weighted_event (μ : Law Z) (q : Law T) (g : A → ℝ) + (P : A → Z × T → Prop) : + (∑ a, g a*eventMass (adaptiveLaw μ (fun _ => q)) + (Finset.univ.filter (P a))) = + ∑ z, μ z*(∑ a, g a*eventMass q (Finset.univ.filter (fun t => P a (z,t)))) := by + simp_rw [independent_target_event_general μ q] + simp only [Finset.mul_sum] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro z _ + apply Finset.sum_congr rfl + intro a _ + ring +end + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/IndexMul.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/IndexMul.lean new file mode 100644 index 0000000000000000000000000000000000000000..a115b15bf7ea6b1a6314b905a3b65bfec8b638cc --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/IndexMul.lean @@ -0,0 +1,65 @@ +import Mathlib + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.GreedyWeightedCount +open scoped BigOperators + +lemma index_mul_le {J j : ℕ} (s : ℕ → ℝ) (hs : ∀ i, 0 ≤ s i) + (hmono : Antitone s) (hj : j < J) : + (j:ℝ)*s j ≤ ∑ i ∈ Finset.range J, s i := by + have hsum : ∑ i ∈ Finset.range j, s j ≤ ∑ i ∈ Finset.range j, s i := + Finset.sum_le_sum (fun i hi => hmono (Finset.mem_range.mp hi).le) + simp only [Finset.sum_const, Finset.card_range, nsmul_eq_mul] at hsum + exact hsum.trans (Finset.sum_le_sum_of_subset_of_nonneg (Finset.range_mono hj.le) + (fun i _ _ => hs i)) + +theorem weighted_rich_count (J : ℕ) (s m : ℕ → ℝ) (q M n p N : ℝ) + (hs : ∀ i, 0 ≤ s i) (hmono : Antitone s) + (hm : ∀ i < J, 0 ≤ m i ∧ m i ≤ N) + (hq : 0 ≤ q) (hM : 0 < M) (hp : 0 ≤ p) (hN : 0 ≤ N) + (hpn : p*q ≤ 1) (hNq : N ≤ 3*q^2) + (hbudget : ∑ i ∈ Finset.range J, s i ≤ n) (hJq : (J:ℝ)*q ≤ n) + (hvariance : ∀ i < J, 2*p*s i ≤ M → m i*M^2 ≤ 4*q*s i) : + (∑ i ∈ Finset.range J, (i:ℝ)*m i)*M^2 ≤ 12*n^2 := by + have hn : 0 ≤ n := (mul_nonneg (Nat.cast_nonneg _) hq).trans hJq + have hNp : N*p^2 ≤ 3 := by + have hpq : (p*q)^2 ≤ 1 := by nlinarith [mul_nonneg hp hq] + have hh := mul_le_mul_of_nonneg_right hNq (sq_nonneg p) + nlinarith + have hrow (i : ℕ) (hi : i ∈ Finset.range J) : (i:ℝ)*m i*M^2 ≤ 12*n*s i := by + have hiJ := Finset.mem_range.mp hi + have hiq : (i:ℝ)*q ≤ n := + (mul_le_mul_of_nonneg_right (by exact_mod_cast hiJ.le) hq).trans hJq + have his : (i:ℝ)*s i ≤ n := (index_mul_le s hs hmono hiJ).trans hbudget + have hi0 : (0:ℝ) ≤ i := Nat.cast_nonneg _ + have hsi := hs i + rcases hm i hiJ with ⟨hm0,hmN⟩ + by_cases hsmall : 2*p*s i ≤ M + · have hh := mul_le_mul_of_nonneg_left (hvariance i hiJ hsmall) hi0 + have hq' := mul_le_mul_of_nonneg_right hiq (hs i) + have hn' := mul_nonneg hn (hs i) + nlinarith + · have hsquare : M^2 ≤ 4*p^2*(s i)^2 := by + have hh : M ≤ 2*p*s i := (lt_of_not_ge hsmall).le + have hsq := pow_le_pow_left₀ hM.le hh 2 + nlinarith + calc + (i:ℝ)*m i*M^2 ≤ (i:ℝ)*N*(4*p^2*(s i)^2) := by + exact mul_le_mul (mul_le_mul_of_nonneg_left hmN hi0) hsquare + (sq_nonneg M) (mul_nonneg hi0 hN) + _ = 4*(N*p^2)*((i:ℝ)*s i)*s i := by ring + _ ≤ 4*3*n*s i := by gcongr + _ = 12*n*s i := by ring + rw [Finset.sum_mul] + calc + ∑ i ∈ Finset.range J, (i:ℝ)*m i*M^2 ≤ ∑ i ∈ Finset.range J, 12*n*s i := + Finset.sum_le_sum hrow + _ = 12*n*(∑ i ∈ Finset.range J, s i) := by rw [Finset.mul_sum] + _ ≤ 12*n*n := mul_le_mul_of_nonneg_left hbudget (by positivity) + _ = 12*n^2 := by ring +end SharpRamseyFive.GreedyWeightedCount + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/IteratedBudgets.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/IteratedBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..23b86e633842815e1f005b35989df331b5fad31d --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/IteratedBudgets.lean @@ -0,0 +1,132 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.StageNumerics +import OAI.Combinatorics.RamseyFive.Marking.ReciprocalStageArithmetic +import OAI.Combinatorics.RamseyFive.Geometry.CompressionRecurrence + +namespace OAI + +namespace SharpRamseyFive.ParameterHierarchy +open Filter Real +open scoped Topology +noncomputable section + +def iterD (σ η : ℝ) : ℕ→ℝ + | 0 => σ^beta η*(1+10*σ*σ^(-η)) + | n+1 => σ^beta η*(1+iterD σ η n*σ^(-η/3)+ + domainSlackConstant*iterD σ η n*σ^(6*beta η)*σ^(-η)) +def iterA (σ η : ℝ) : ℕ→ℝ + | 0 => 0 + | n+1 => iterD σ η n*σ^(-η/3) +def iterDelta (σ η : ℝ) : ℕ→ℝ + | 0 => 10*σ + | n+1 => domainSlackConstant*iterD σ η n*σ^(6*beta η) +lemma iterD_eq (σ η : ℝ) (n : ℕ) : + iterD σ η n=σ^beta η*(1+iterA σ η n+iterDelta σ η n*σ^(-η)) := by + cases n <;> simp [iterD,iterA,iterDelta] +lemma iter_budgets_nonneg {σ η : ℝ} (hσ : 0 ≤ σ) (n : ℕ) : + σ^beta η ≤ iterD σ η n ∧ 0 ≤ iterA σ η n ∧ 0 ≤ iterDelta σ η n := by + have hC:=domainSlackConstant_pos.le + have hb:=Real.rpow_nonneg hσ (beta η) + induction n with + | zero => dsimp [iterD,iterA,iterDelta];constructor + · have hh : 0 ≤ 10*σ*σ^(-η) := by positivity + nlinarith + · constructor <;> positivity + | succ n ih => + have hd : 0 ≤ iterD σ η n := hb.trans ih.1 + have hA : 0 ≤ iterD σ η n*σ^(-η/3) := by positivity + have hΔ : 0 ≤ domainSlackConstant*iterD σ η n*σ^(6*beta η) := by positivity + dsimp only [iterD,iterA,iterDelta] + refine ⟨?_,hA,hΔ⟩ + have hh : 0 ≤ domainSlackConstant*iterD σ η n*σ^(6*beta η)*σ^(-η) := by positivity + nlinarith + +theorem eventually_iterD_range {η : ℝ} (hη : 0 < η) (hη' : η < 1/10) : + ∀ᶠ σ : ℝ in atTop,∀n,iterD σ η n ≤ σ^(1-η/2) := by + have he0 : 0 < η/2-beta η := by unfold beta;linarith + have he1 : 0 < 1-η/2-2*beta η := by unfold beta;linarith + have ht0 : Tendsto (fun σ : ℝ=>11*σ^(-(η/2-beta η))) atTop (𝓝 0) := + by simpa using (tendsto_rpow_neg_atTop he0).const_mul 11 + filter_upwards [eventually_ge_atTop (1:ℝ), + ht0.eventually_lt_const (by norm_num : (0:ℝ) < 1), + (tendsto_rpow_neg_atTop he1).eventually_lt_const (by norm_num : (0:ℝ) < 1/2), + (tendsto_rpow_neg_atTop (by linarith : 0 < η/4)).eventually_lt_const (by norm_num : (0:ℝ) < 1/2), + eventually_stage_recurrence hη domainSlackConstant domainSlackConstant_pos.le] + with σ hσ h0 h1 hratio hrec + have hs : 0 < σ := zero_lt_one.trans_le hσ + have hbase : σ^(2*beta η) ≤ (1/2)*σ^(1-η/2) := by + have hh:=mul_le_mul_of_nonneg_right h1.le (Real.rpow_nonneg hs.le (1-η/2)) + have hid : σ^(-(1-η/2-2*beta η))*σ^(1-η/2)=σ^(2*beta η) := by + rw [←Real.rpow_add hs];congr 1;ring + rwa [hid] at hh + have hr : σ^(-η/4) ≤ (1:ℝ)/2 := by simpa only [neg_div] using hratio.le + intro n + induction n with + | zero => + have hpow : 1 ≤ σ^(1-η) := Real.one_le_rpow hσ (by linarith) + have hid : 10*σ*σ^(-η)=10*σ^(1-η) := by rw [Real.rpow_sub hs,Real.rpow_one,Real.rpow_neg hs.le];ring + have hinit : iterD σ η 0 ≤ 11*σ^(1-η+beta η) := by + dsimp [iterD] + rw [hid] + calc + _ ≤ σ^beta η*(11*σ^(1-η)) := by gcongr;nlinarith + _ = _ := by rw [mul_left_comm,←Real.rpow_add hs];congr 2;ring + apply hinit.trans + have hh:=mul_le_mul_of_nonneg_right h0.le (Real.rpow_nonneg hs.le (1-η/2)) + have hid' : (11*σ^(-(η/2-beta η)))*σ^(1-η/2)=11*σ^(1-η+beta η) := by + rw [mul_assoc,←Real.rpow_add hs];congr 2;ring + simpa only [hid',one_mul] using hh + | succ n ih => + have hd:=(iter_budgets_nonneg (η:=η) hs.le n).1 + have h:=hrec (iterD σ η n) (iterA σ η (n+1)) (iterDelta σ η (n+1)) + ((Real.rpow_nonneg hs.le _).trans hd) le_rfl le_rfl + rw [←iterD_eq] at h + calc + _ ≤ σ^(2*beta η)+iterD σ η n*σ^(-η/4) := h + _ ≤ (1/2)*σ^(1-η/2)+σ^(1-η/2)*(1/2) := by gcongr + _ = _ := by ring + +theorem eventually_iter_terminal {η : ℝ} (hη : 0 < η) (hη' : η < 1/10) + (m : ℕ) (hm : 1 ≤ η*(m:ℝ)/4) (c : ℝ) (hc : 0 < c) : + ∀ᶠ σ : ℝ in atTop,iterA σ η (m+1) ≤ 1 ∧ iterDelta σ η (m+1) ≤ c/9600*σ^η := by + have ha : 0 < η/3-2*beta η := by unfold beta;linarith + have hb : 0 < η-8*beta η := by unfold beta;linarith + have htA : Tendsto (fun σ : ℝ=>2*σ^(-(η/3-2*beta η))) atTop (𝓝 0) := + by simpa using (tendsto_rpow_neg_atTop ha).const_mul 2 + have htB : Tendsto (fun σ : ℝ=>2*domainSlackConstant*σ^(-(η-8*beta η))) atTop (𝓝 0) := + by simpa using (tendsto_rpow_neg_atTop hb).const_mul (2*domainSlackConstant) + filter_upwards [eventually_ge_atTop (1:ℝ),eventually_iterD_range hη hη', + (tendsto_rpow_atTop (mul_pos (by norm_num : (0:ℝ)<2) (beta_pos hη))).eventually_ge_atTop 2, + (tendsto_rpow_neg_atTop (by linarith : 0 < η/4)).eventually_lt_const (by norm_num : (0:ℝ) < 1/3), + eventually_stage_recurrence hη domainSlackConstant domainSlackConstant_pos.le, + htA.eventually_lt_const (by norm_num : (0:ℝ) < 1), + htB.eventually_lt_const (by positivity : (0:ℝ) < c/9600)] + with σ hσ hrange hpow hratio hrec hA hB + have hs : 0 < σ := zero_lt_one.trans_le hσ + have hinit : iterD σ η 0 ≤ σ := (hrange 0).trans (by + conv_rhs => rw [←Real.rpow_one σ] + exact Real.rpow_le_rpow_of_exponent_le hσ (by linarith)) + have hh:=compression_recurrence_terminal σ η (beta η) m (iterD σ η) hσ hη (beta_pos hη).le + hpow (by simpa only [neg_div] using hratio.le) hm hinit (fun n=>by + rw [iterD_eq σ η (n+1)] + exact hrec _ _ _ ((Real.rpow_nonneg hs.le _).trans (iter_budgets_nonneg (η:=η) hs.le n).1) le_rfl le_rfl) + constructor + · calc + iterA σ η (m+1) ≤ (2*σ^(2*beta η))*σ^(-η/3) := by dsimp [iterA];gcongr + _ = 2*σ^(-(η/3-2*beta η)) := by rw [mul_assoc,←Real.rpow_add hs];congr 2;ring + _ ≤ 1 := hA.le + · calc + iterDelta σ η (m+1) ≤ domainSlackConstant*(2*σ^(2*beta η))*σ^(6*beta η) := by + dsimp [iterDelta];gcongr;exact domainSlackConstant_pos.le + _ = (2*domainSlackConstant*σ^(-(η-8*beta η)))*σ^η := by + rw [show domainSlackConstant*(2*σ^(2*beta η))*σ^(6*beta η)= + 2*domainSlackConstant*(σ^(2*beta η)*σ^(6*beta η)) by ring, + ←Real.rpow_add hs] + rw [show (2*domainSlackConstant*σ^(-(η-8*beta η)))*σ^η= + 2*domainSlackConstant*(σ^(-(η-8*beta η))*σ^η) by ring,←Real.rpow_add hs] + congr 2;ring + _ ≤ c/9600*σ^η := by gcongr +end +end SharpRamseyFive.ParameterHierarchy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/Law.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/Law.lean new file mode 100644 index 0000000000000000000000000000000000000000..7ef3f55b6e97a070210238c368cfa73819a48ec8 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/Law.lean @@ -0,0 +1,196 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped BigOperators Classical + +structure Law (α : Type*) [Fintype α] where + mass : α → ℝ + nonneg : ∀ a,0 ≤ mass a + sum_one : ∑ a,mass a = 1 + +instance {α : Type*} [Fintype α] : CoeFun (Law α) (fun _ => α → ℝ) := ⟨Law.mass⟩ + +variable {α β : Type*} [Fintype α] [Fintype β] + +noncomputable def entropy (p : α → ℝ) : ℝ := -∑ a,p a*Real.log (p a) +noncomputable def divergence (p q : α → ℝ) : ℝ := ∑ a,p a*Real.log (p a/q a) + +lemma mass_le_one (p : Law α) (a : α) : p a ≤ 1 := by + rw [←p.sum_one] + exact Finset.single_le_sum (fun b _ => p.nonneg b) (Finset.mem_univ a) + +lemma entropy_nonneg (p : Law α) : 0 ≤ entropy p := by + unfold entropy + apply neg_nonneg.mpr + apply Finset.sum_nonpos + intro a _ + by_cases h : p a=0 + · simp [h] + · exact mul_nonpos_of_nonneg_of_nonpos (p.nonneg a) + (Real.log_nonpos ((lt_of_le_of_ne (p.nonneg a) (Ne.symm h)).le) (mass_le_one p a)) + +lemma atom_bound_entropy (p : Law α) (A : ℝ) + (hpa : ∀ a,p a ≤ A) : -Real.log A ≤ entropy p := by + have hsum : (∑ a,p a*Real.log (p a)) ≤ Real.log A := by + calc + _ ≤ ∑ a,p a*Real.log A := Finset.sum_le_sum fun a _ => by + by_cases h : p a=0 + · simp [h] + · exact mul_le_mul_of_nonneg_left + (Real.log_le_log (lt_of_le_of_ne (p.nonneg a) (Ne.symm h)) (hpa a)) (p.nonneg a) + _ = Real.log A := by rw [←Finset.sum_mul,p.sum_one,one_mul] + exact neg_le_neg hsum + +lemma point_log_ratio (p q : ℝ) (hp : 0 ≤ p) (hq : 0 ≤ q) + (hpq : 0 < p → 0 < q) : p-q ≤ p*Real.log (p/q) := by + by_cases h : p=0 + · simp [h,hq] + · have hp' : 0 < p := lt_of_le_of_ne hp (Ne.symm h) + have hq' := hpq hp' + have hl := Real.log_le_sub_one_of_pos (div_pos hq' hp') + have hm := mul_le_mul_of_nonneg_left hl hp + rw [Real.log_div (ne_of_gt hq') (ne_of_gt hp')] at hm + rw [Real.log_div h (ne_of_gt hq')] + have he : p*(q/p-1)=q-p := by field_simp + rw [he] at hm + nlinarith + +theorem divergence_nonneg (p q : Law α) (hpq : ∀ a,0 < p a → 0 < q a) : + 0 ≤ divergence p q := by + have h := Finset.sum_le_sum (fun a (_ : a ∈ Finset.univ) => + point_log_ratio (p a) (q a) (p.nonneg a) (q.nonneg a) (hpq a)) + simpa only [Finset.sum_sub_distrib,p.sum_one,q.sum_one,sub_self,divergence] using h + +theorem entropy_le_log_card (p : Law α) : entropy p ≤ Real.log (Fintype.card α) := by + have hne : Nonempty α := by + by_contra h + have : IsEmpty α := not_nonempty_iff.mp h + simpa using p.sum_one + let := hne + have hc : 0 < (Fintype.card α:ℝ) := by exact_mod_cast Fintype.card_pos + let u : Law α := ⟨fun _ => 1/Fintype.card α,fun _ => by positivity,by simp [ne_of_gt hc]⟩ + have hd := divergence_nonneg p u (fun _ _ => by dsimp [u]; positivity) + have he : divergence p u = -entropy p+Real.log (Fintype.card α) := by + unfold divergence entropy + calc + _ = ∑ a,(p a*Real.log (p a)+p a*Real.log (Fintype.card α)) := by + apply Finset.sum_congr rfl + intro a _ + by_cases h : p a=0 + · simp [h] + · dsimp [u] + rw [div_div_eq_mul_div,div_one,Real.log_mul h (ne_of_gt hc)] + ring + _ = _ := by rw [Finset.sum_add_distrib,←Finset.sum_mul,p.sum_one]; ring + linarith + +theorem divergence_test (p q : Law α) (hpq : ∀ a,0 < p a → 0 < q a) + (f : α → ℝ) : + (∑ a,p a*f a)+1-(∑ a,q a*Real.exp (f a)) ≤ divergence p q := by + have hpw (a : α) : p a*f a+p a-q a*Real.exp (f a) ≤ + p a*Real.log (p a/q a) := by + have h := point_log_ratio (p a) (q a*Real.exp (f a)) (p.nonneg a) + (mul_nonneg (q.nonneg a) (Real.exp_pos _).le) + (fun hp => mul_pos (hpq a hp) (Real.exp_pos _)) + by_cases hz : p a=0 + · simp only [hz,zero_mul,zero_add] at h ⊢ + exact h + · have hq : q a ≠ 0 := ne_of_gt (hpq a (lt_of_le_of_ne (p.nonneg a) (Ne.symm hz))) + rw [Real.log_div hz (mul_ne_zero hq (Real.exp_ne_zero _)), + Real.log_mul hq (Real.exp_ne_zero _),Real.log_exp] at h + rw [Real.log_div hz hq] + nlinarith + have hs := Finset.sum_le_sum (fun a (_ : a∈Finset.univ) => hpw a) + simpa only [Finset.sum_sub_distrib,Finset.sum_add_distrib,p.sum_one,divergence] using hs + +theorem event_comparison (p q : Law α) (hpq : ∀ a,0 < p a → 0 < q a) + (E : Finset α) : (∑ a∈E,q a) ≤ 2*(divergence p q+∑ a∈E,p a) := by + classical + have ht := divergence_test p q hpq (fun a => if a∈E then -1 else 0) + have he1 : (∑ a,p a*(if a∈E then -1 else 0)) = -(∑ a∈E,p a) := by + simp only [mul_ite,mul_neg_one,mul_zero,←Finset.sum_filter,Finset.filter_univ_mem,Finset.sum_neg_distrib] + have he2 : (∑ a,q a*Real.exp (if a∈E then -1 else 0)) = + 1-(1-Real.exp (-1))*(∑ a∈E,q a) := by + have he (a : α) : q a*Real.exp (if a∈E then -1 else 0) = + q a-(1-Real.exp (-1))*(if a∈E then q a else 0) := by + split_ifs + · ring + · simp + simp only [he,Finset.sum_sub_distrib,←Finset.mul_sum,q.sum_one,←Finset.sum_filter, + Finset.filter_univ_mem] + rw [he1,he2] at ht + have hhalf : Real.exp (-1) ≤ (1/2:ℝ) := by + rw [Real.exp_neg] + have he : (2:ℝ) ≤ Real.exp 1 := by linarith [Real.add_one_le_exp (1:ℝ)] + simpa only [one_div] using one_div_le_one_div_of_le (by norm_num : (0:ℝ)<2) he + have hqE : 0 ≤ ∑ a∈E,q a := Finset.sum_nonneg fun a _ => q.nonneg a + nlinarith + +noncomputable def first (p : Law (α × β)) : Law α where + mass a := ∑ b,p (a,b) + nonneg a := Finset.sum_nonneg fun b _ => p.nonneg (a,b) + sum_one := by rw [←Fintype.sum_prod_type]; exact p.sum_one + +noncomputable def second (p : Law (α × β)) : Law β where + mass b := ∑ a,p (a,b) + nonneg b := Finset.sum_nonneg fun a _ => p.nonneg (a,b) + sum_one := by rw [Finset.sum_comm,←Fintype.sum_prod_type]; exact p.sum_one + +noncomputable def product (p : Law α) (q : Law β) : Law (α × β) where + mass z := p z.1*q z.2 + nonneg z := mul_nonneg (p.nonneg _) (q.nonneg _) + sum_one := by rw [Fintype.sum_prod_type]; simp only [←Finset.mul_sum,q.sum_one,mul_one,p.sum_one] + +lemma le_first (p : Law (α × β)) (a : α) (b : β) : p (a,b) ≤ first p a := + Finset.single_le_sum (fun c _ => p.nonneg (a,c)) (Finset.mem_univ b) +lemma le_second (p : Law (α × β)) (a : α) (b : β) : p (a,b) ≤ second p b := + Finset.single_le_sum (fun c _ => p.nonneg (c,b)) (Finset.mem_univ a) + +lemma ac_product (p : Law (α × β)) (z : α × β) (hz : 0 < p z) : + 0 < product (first p) (second p) z := + mul_pos (hz.trans_le (le_first p _ _)) (hz.trans_le (le_second p _ _)) + +theorem mutual_information (p : Law (α × β)) : + divergence p (product (first p) (second p)) = + entropy (first p)+entropy (second p)-entropy p := by + have hterm (z : α × β) : p z*Real.log (p z/product (first p) (second p) z) = + p z*Real.log (p z)-p z*Real.log (first p z.1)-p z*Real.log (second p z.2) := by + by_cases hz : p z=0 + · simp [hz] + · have hp : 0 < p z := lt_of_le_of_ne (p.nonneg z) (Ne.symm hz) + have h1 : first p z.1 ≠ 0 := ne_of_gt (hp.trans_le (le_first p _ _)) + have h2 : second p z.2 ≠ 0 := ne_of_gt (hp.trans_le (le_second p _ _)) + change _ = _ + dsimp [product] + rw [Real.log_div hz (mul_ne_zero h1 h2),Real.log_mul h1 h2] + ring + have hs1 : (∑ z : α × β,p z*Real.log (first p z.1)) = + ∑ a,first p a*Real.log (first p a) := by + rw [Fintype.sum_prod_type] + apply Finset.sum_congr rfl + intro a _ + dsimp only + rw [←Finset.sum_mul] + rfl + have hs2 : (∑ z : α × β,p z*Real.log (second p z.2)) = + ∑ b,second p b*Real.log (second p b) := by + rw [Fintype.sum_prod_type,Finset.sum_comm] + apply Finset.sum_congr rfl + intro b _ + dsimp only + rw [←Finset.sum_mul] + rfl + simp only [divergence,hterm,Finset.sum_sub_distrib,hs1,hs2,entropy] + ring + +lemma entropy_subadditive (p : Law (α × β)) : + entropy p ≤ entropy (first p)+entropy (second p) := by + have := divergence_nonneg p (product (first p) (second p)) (ac_product p) + rw [mutual_information] at this + linarith + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/LevelCellSubset.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/LevelCellSubset.lean new file mode 100644 index 0000000000000000000000000000000000000000..5e5470c9ab9c531ca8ab03aa57ef2b6e0c5a60c1 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/LevelCellSubset.lean @@ -0,0 +1,18 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.BlockReveal + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped BigOperators Classical +variable {α : Type*} [Fintype α] +lemma levelCell_subset_support (p : Law α) (n : Level p) : levelCell p n⊆support p := by + intro a ha + exact (mem_support p a).mpr ((mem_levelCell p n a).mp ha).1 +lemma levelCell_cap (p : Law α) (N : ℝ) (hN : ((support p).card:ℝ) ≤ N) (n : Level p) : + ((levelCell p n).card:ℝ) ≤ N := + (show ((levelCell p n).card:ℝ) ≤ (support p).card by + exact_mod_cast Finset.card_le_card (levelCell_subset_support p n)).trans hN +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/LevelDensity.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/LevelDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..2b018f5ff9f498737165a1c17c6a76304f51b7a2 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/LevelDensity.lean @@ -0,0 +1,53 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.OriginalLevelLaw + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {α β : Type*} [Fintype α] [Fintype β] +lemma scaled_uniform_density_iff (R : α → β → Prop) (X : Finset α) (Y : Finset β) + (hX : X.Nonempty) (hY : Y.Nonempty) (Q τ : ℝ) : + Q * (((X×ˢY).filter (fun z => R z.1 z.2)).card : ℝ) ≤ τ * X.card * Y.card ↔ + Q * relationMass R (uniformWeight X) (uniformWeight Y) ≤ τ := by + have hx : (0:ℝ) < X.card := by exact_mod_cast hX.card_pos + have hy : (0:ℝ) < Y.card := by exact_mod_cast hY.card_pos + rw [relationMass_uniform, ← mul_div_assoc, div_le_iff₀ (mul_pos hx hy)] + rw [mul_assoc] + +variable {I J : Type*} [Fintype I] [Fintype J] [DecidableEq I] [DecidableEq J] + {A : I → Type*} {B : J → Type*} [∀ i, Fintype (A i)] [∀ j, Fintype (B j)] + +theorem original_level_density_rejection + (μ : ∀ i, Law (A i)) (ν : ∀ j, Law (B j)) (i : I) (j : J) + (R : α → β → Prop) (X : A i → Finset α) (Y : B j → Finset β) + (p : Law α) (q : Law β) (L : ℝ) (hL : 0≤L) + (hs : ∀ x, (∑ a, μ i a * uniformWeight (X a) x) ≤ L*p x) + (ht : ∀ y, (∑ b, ν j b * uniformWeight (Y b) y) ≤ L*q y) + (Q τ : ℝ) (hQ : 0≤Q) (hτ : 0<τ) : + eventMass (originalLevelLaw μ ν) (Finset.univ.filter (fun z => + τ < Q*relationMass R (uniformWeight (X (z.1 i))) (uniformWeight (Y (z.2 j))))) ≤ + (Q/τ)*L^2*relationMass R p q := by + have hm := event_markov (originalLevelLaw μ ν) + (fun z => Q*relationMass R (uniformWeight (X (z.1 i))) (uniformWeight (Y (z.2 j)))) + (fun z => mul_nonneg hQ (relationMass_nonneg R _ _ (uniformWeight_nonneg _) (uniformWeight_nonneg _))) + τ (Finset.univ.filter (fun z => + τ < Q*relationMass R (uniformWeight (X (z.1 i))) (uniformWeight (Y (z.2 j))))) + (fun z hz => (Finset.mem_filter.mp hz).2.le) + have he : (∑ z, originalLevelLaw μ ν z * + (Q*relationMass R (uniformWeight (X (z.1 i))) (uniformWeight (Y (z.2 j))))) = + Q*(∑ z, originalLevelLaw μ ν z * + relationMass R (uniformWeight (X (z.1 i))) (uniformWeight (Y (z.2 j)))) := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro z _ + ring + rw [he] at hm + have hd := originalLevelLaw_cross_domination μ ν i j R X Y p q L hL hs ht + have hh := hm.trans (mul_le_mul_of_nonneg_left hd hQ) + calc + _ ≤ (Q*(L^2*relationMass R p q))/τ := (le_div_iff₀ hτ).mpr (by simpa only [mul_comm τ] using hh) + _ = _ := by ring +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/LevelTreeTrims.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/LevelTreeTrims.lean new file mode 100644 index 0000000000000000000000000000000000000000..aa3e572f2fdf6b48479be5510db6605e5e5f160c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/LevelTreeTrims.lean @@ -0,0 +1,228 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.OriginalLevelLaw +import OAI.Combinatorics.RamseyFive.Geometry.TreeTrims + +namespace OAI + +section +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {α β : Type*} [Fintype α] [Fintype β] +lemma relationMass_swap (R : α → β → Prop) (f : α → ℝ) (g : β → ℝ) : + relationMass (fun b a => R a b) g f = relationMass R f g := by + simp only [relationMass, Finset.sum_filter, Fintype.sum_prod_type] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro a _ + apply Finset.sum_congr rfl + intro b _ + split_ifs <;> ring +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] +variable (f : PivotContext K V → FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V → FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) +variable {I : Type} [Fintype I] [DecidableEq I] + {A B : I → Type} [∀ i, Fintype (A i)] [∀ i, Fintype (B i)] + +theorem oriented_level_point_trim + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (μ : ∀ i, Law (A i)) (ν : ∀ i, Law (B i)) + (X : ∀ i, A i → Finset (ℙ K V)) (Y : ∀ i, B i → Finset (ℙ K (Dual K V))) + (hX : ∀ i a, (X i a).Nonempty) (hY : ∀ i b, (Y i b).Nonempty) + (p : I → Law (ℙ K V)) (q : I → Law (ℙ K (Dual K V))) + (L : ℝ) (hL : 0≤L) + (hμ : ∀ i a, (∑ s, μ i s * uniformWeight (X i s) a) ≤ L*p i a) + (hν : ∀ i b, (∑ t, ν i t * uniformWeight (Y i t) b) ≤ L*q i b) + (c δ τ P : ℝ) (hc : 0 ∃ C, + orientedPivotContextAt f r σ hσ hq hd.le (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) + (fun i => hX i _) (fun i => hY i _) c δ τ P hδ tree ω (Finset.univ,Finset.univ) j = some C ∧ + ((X (label tree j) (z.1 (label tree j)) ∩ C.1).card : ℝ) < + (9/10:ℝ)*(X (label tree j) (z.1 (label tree j))).card))) ≤ + 10 * pathBudget (fun i => (50*(Nat.card K:ℝ)/(9*(c*δ))) * L^2 * + relationMass Incident (p (label tree j)) (q i)) (fun _ => 0) tree j := by + let C₀ : ℝ := 50*(Nat.card K:ℝ)/(9*(c*δ)) + have hC₀ : 0≤C₀ := by dsimp [C₀]; positivity + let ρ := fun (z : (∀ i, A i) × (∀ i, B i)) i => C₀ * relationMass Incident + (uniformWeight (X (label tree j) (z.1 (label tree j)))) (uniformWeight (Y i (z.2 i))) + have hpoint (z : (∀ i, A i) × (∀ i, B i)) := oriented_original_point_trim f r σ hσ hq hd hq3 + (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) (fun i => hX i _) (fun i => hY i _) + c δ τ P hc hc9 hδ hτ (X (label tree j) (z.1 (label tree j))) tree j + simp_rw [relationMass_swap] at hpoint + calc + _ ≤ ∑ z, originalLevelLaw μ ν z * (10*pathBudget (ρ z) (fun _ => 0) tree j) := + Finset.sum_le_sum fun z _ => mul_le_mul_of_nonneg_left (hpoint z) ((originalLevelLaw μ ν).nonneg z) + _ = 10 * pathBudget (fun i => ∑ z, originalLevelLaw μ ν z * ρ z i) (fun _ => 0) tree j := by + have he := mean_pathBudget (originalLevelLaw μ ν) ρ (fun _ _ => 0) tree j + simp only [mul_zero, Finset.sum_const_zero] at he + rw [← he, Finset.mul_sum] + apply Finset.sum_congr rfl + intro z _ + ring + _ ≤ _ := by + apply mul_le_mul_of_nonneg_left _ (by norm_num) + apply pathBudget_mono + · intro i + have hs := originalLevelLaw_cross_domination μ ν (label tree j) i Incident + (X (label tree j)) (Y i) (p (label tree j)) (q i) L hL (hμ _) (hν _) + calc + _ = C₀*(∑ z, originalLevelLaw μ ν z * relationMass Incident + (uniformWeight (X (label tree j) (z.1 (label tree j)))) (uniformWeight (Y i (z.2 i)))) := by + simp only [ρ, Finset.mul_sum]; apply Finset.sum_congr rfl; intro z _; ring + _ ≤ C₀*(L^2*relationMass Incident (p (label tree j)) (q i)) := mul_le_mul_of_nonneg_left hs hC₀ + _ = _ := by dsimp only [C₀]; ring + · intro i; rfl + +theorem oriented_level_dual_trim + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (μ : ∀ i, Law (A i)) (ν : ∀ i, Law (B i)) + (X : ∀ i, A i → Finset (ℙ K V)) (Y : ∀ i, B i → Finset (ℙ K (Dual K V))) + (hX : ∀ i a, (X i a).Nonempty) (hY : ∀ i b, (Y i b).Nonempty) + (p : I → Law (ℙ K V)) (q : I → Law (ℙ K (Dual K V))) + (L : ℝ) (hL : 0≤L) + (hμ : ∀ i a, (∑ s, μ i s * uniformWeight (X i s) a) ≤ L*p i a) + (hν : ∀ i b, (∑ t, ν i t * uniformWeight (Y i t) b) ≤ L*q i b) + (c δ τ P : ℝ) (hc : 0 ∃ C, + orientedPivotContextAt f r σ hσ hq hd.le (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) + (fun i => hX i _) (fun i => hY i _) c δ τ P hδ tree ω (Finset.univ,Finset.univ) j = some C ∧ + ((Y (label tree j) (z.2 (label tree j)) ∩ C.2).card : ℝ) < + (9/10:ℝ)*(Y (label tree j) (z.2 (label tree j))).card))) ≤ + 10 * pathBudget (fun _ => 0) (fun i => (50*(Nat.card K:ℝ)/(9*(c*δ))) * L^2 * + relationMass Incident (p i) (q (label tree j))) tree j := by + let C₀ : ℝ := 50*(Nat.card K:ℝ)/(9*(c*δ)) + have hC₀ : 0≤C₀ := by dsimp [C₀]; positivity + let ρ := fun (z : (∀ i, A i) × (∀ i, B i)) i => C₀ * relationMass Incident + (uniformWeight (X i (z.1 i))) (uniformWeight (Y (label tree j) (z.2 (label tree j)))) + have hpoint (z : (∀ i, A i) × (∀ i, B i)) := oriented_original_dual_trim f r σ hσ hq hd hq3 + (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) (fun i => hX i _) (fun i => hY i _) + c δ τ P hc hc9 hδ hτ (Y (label tree j) (z.2 (label tree j))) tree j + calc + _ ≤ ∑ z, originalLevelLaw μ ν z * (10*pathBudget (fun _ => 0) (ρ z) tree j) := + Finset.sum_le_sum fun z _ => mul_le_mul_of_nonneg_left (hpoint z) ((originalLevelLaw μ ν).nonneg z) + _ = 10 * pathBudget (fun _ => 0) (fun i => ∑ z, originalLevelLaw μ ν z * ρ z i) tree j := by + have he := mean_pathBudget (originalLevelLaw μ ν) (fun _ _ => 0) ρ tree j + simp only [mul_zero, Finset.sum_const_zero] at he + rw [← he, Finset.mul_sum] + apply Finset.sum_congr rfl + intro z _ + ring + _ ≤ _ := by + apply mul_le_mul_of_nonneg_left _ (by norm_num) + apply pathBudget_mono + · intro i; rfl + · intro i + have hs := originalLevelLaw_cross_domination μ ν i (label tree j) Incident + (X i) (Y (label tree j)) (p i) (q (label tree j)) L hL (hμ _) (hν _) + calc + _ = C₀*(∑ z, originalLevelLaw μ ν z * relationMass Incident + (uniformWeight (X i (z.1 i))) (uniformWeight (Y (label tree j) (z.2 (label tree j))))) := by + simp only [ρ, Finset.mul_sum]; apply Finset.sum_congr rfl; intro z _; ring + _ ≤ C₀*(L^2*relationMass Incident (p i) (q (label tree j))) := mul_le_mul_of_nonneg_left hs hC₀ + _ = _ := by dsimp only [C₀]; ring +end SharpRamseyFive.ProjectiveIncidence + +end + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {A B Ω Ξ ι Θ : Type*} [Fintype A] [Fintype B] [Fintype Ω] + [Fintype Ξ] [Fintype ι] [Fintype Θ] + +lemma independent_event (p : Law Ω) (q : Law Ξ) (P : Ω → Ξ → Prop) : + eventMass (adaptiveLaw p (fun _ => q)) + (Finset.univ.filter (fun z => P z.1 z.2)) = + ∑ x, p x * eventMass q (Finset.univ.filter (P x)) := by + simp only [eventMass, Finset.sum_filter, Fintype.sum_prod_type, adaptiveLaw, + Finset.mul_sum, mul_ite, mul_zero] + +lemma independent_endpoint_event (p : Law Ω) (q : Law Ξ) (endpoint : Ω → B) + (good : B → Prop) (P : B → Ξ → Prop) : + eventMass (adaptiveLaw p (fun _ => q)) + (Finset.univ.filter (fun z => good (endpoint z.1) ∧ P (endpoint z.1) z.2)) = + ∑ b, (if good b then map p endpoint b else 0) * + eventMass q (Finset.univ.filter (P b)) := by + calc + _ = ∑ x, p x * eventMass q (Finset.univ.filter + (fun ξ => good (endpoint x) ∧ P (endpoint x) ξ)) := by + simp only [eventMass, Finset.sum_filter, Fintype.sum_prod_type, adaptiveLaw, + Finset.mul_sum, mul_ite, mul_zero] + _ = ∑ x, p x * (if good (endpoint x) then + eventMass q (Finset.univ.filter (P (endpoint x))) else 0) := by + apply Finset.sum_congr rfl + intro x hx + by_cases hg : good (endpoint x) <;> simp [hg, eventMass] + _ = ∑ b, map p endpoint b * (if good b then + eventMass q (Finset.univ.filter (P b)) else 0) := (sum_map p endpoint (fun b => if good b then eventMass q (Finset.univ.filter (P b)) else 0)).symm + _ = _ := by + apply Finset.sum_congr rfl + intro b hb + split_ifs <;> simp + +lemma relationMass_mixture_left (R : A → B → Prop) (μ : Law ι) + (f : ι → A → ℝ) (g : B → ℝ) : + (∑ i, μ i * relationMass R (f i) g) = + relationMass R (fun a => ∑ i, μ i * f i a) g := by + simp only [relationMass, Finset.mul_sum] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro z hz + rw [Finset.sum_mul] + apply Finset.sum_congr rfl + intro i hi + ring + +theorem actual_target_average (R : A → B → Prop) (p : Law A) + (g : B → ℝ) (hg : ∀ b, 0 ≤ g b) (μ : Law ι) (X : ι → Finset A) + (prior : ι → Law Θ) (reject : ι → Θ → B → ℝ) (C L : ℝ) + (hC : 0 ≤ C) (_hL : 0 ≤ L) + (hX : ∀ a, (∑ i, μ i * uniformWeight (X i) a) ≤ L * p a) + (hlocal : ∀ i θ b, reject i θ b ≤ + C * ((((Finset.univ.filter (fun a => R a b)) ∩ X i).card : ℝ) / (X i).card)) : + (∑ i, μ i * (∑ θ, prior i θ * (∑ b, g b * reject i θ b))) ≤ + C * L * relationMass R p g := by + have hpoint (i : ι) (θ : Θ) : + (∑ b, g b * reject i θ b) ≤ C * relationMass R (uniformWeight (X i)) g := by + rw [relationMass_by_target, Finset.mul_sum] + apply Finset.sum_le_sum + intro b hb + rw [sum_uniformWeight] + have h := mul_le_mul_of_nonneg_left (hlocal i θ b) (hg b) + nlinarith only [h] + calc + _ ≤ ∑ i, μ i * (C * relationMass R (uniformWeight (X i)) g) := by + apply Finset.sum_le_sum + intro i hi + apply mul_le_mul_of_nonneg_left _ (μ.nonneg i) + calc + _ ≤ ∑ θ, prior i θ * (C * relationMass R (uniformWeight (X i)) g) := + Finset.sum_le_sum fun θ _ => mul_le_mul_of_nonneg_left (hpoint i θ) ((prior i).nonneg θ) + _ = _ := by rw [← Finset.sum_mul, (prior i).sum_one, one_mul] + _ = C * relationMass R (fun a => ∑ i, μ i * uniformWeight (X i) a) g := by + rw [← relationMass_mixture_left, Finset.mul_sum] + apply Finset.sum_congr rfl + intro i hi + ring + _ ≤ C * (L * relationMass R p g) := by + apply mul_le_mul_of_nonneg_left _ hC + simp only [relationMass, Finset.mul_sum] + apply Finset.sum_le_sum + intro z hz + have h := mul_le_mul_of_nonneg_right (hX z.1) (hg z.2) + nlinarith only [h] + _ = _ := by ring + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/LocalNodeLaw.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/LocalNodeLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..9dfe0ecf59877c8a4aac39b46ce742bb0739ca9a --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/LocalNodeLaw.lean @@ -0,0 +1,137 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.FourSelected +import OAI.Combinatorics.RamseyFive.Geometry.TwoAmbientCaps + +namespace OAI + + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {α β : Type*} [Fintype α] [Fintype β] + +def pairOptions (p : Option α×Option β) : Option (α×β) := + p.1.bind fun a=>p.2.map fun b=>(a,b) + +lemma pairOptions_none (p : Law (Option α×Option β)) : + map p pairOptions none=eventMass p (Finset.univ.filter fun z=>z.1=none ∨ z.2=none) := by + simp only [map,eventMass,Finset.sum_filter] + apply Finset.sum_congr rfl + rintro ⟨a,b⟩ _ + cases a <;> cases b <;> simp [pairOptions] + +lemma pairOptions_positive (p : Law (Option α×Option β)) (a : α) (b : β) + (h : 0 < map p pairOptions (some (a,b))) : 0

cases b' <;> simp [pairOptions] at he + obtain ⟨rfl,rfl⟩ := he + exact hh +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def producedPairLaw (A UA : Finset (ℙ K V)) + (B UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) (c : ℝ) + (out : Option (Finset (ℙ K V))) : + Law (Option (Finset (ℙ K (Dual K V))×Finset (ℙ K V))) := + match out with + | none => pureLaw none + | some W => if hW : W.Nonempty then + let nA := reverseLength (Nat.card K) (Real.log ((UA.card:ℝ)/A.card)) + let nB := reverseLength (Nat.card K) (Real.log ((UB.card:ℝ)/B.card)) + let MA := (320/((9:ℝ)/10)+320)*(Nat.card K:ℝ)^5/B.card + let MB := (320/c+320)*(Nat.card K:ℝ)^5/A.card + let firstCap := ambientCapLaw (fun b a=>Incident a b) B UB (A∩W) W hW nB (Nat.card K) MB + map (adaptiveLaw firstCap (nextAmbientCapLaw A UA B UB hB nA (Nat.card K) MA MB)) pairOptions + else pureLaw none + +noncomputable def localNodeLaw (hd : finrank K V=5) (σ : ℝ) + (A UA : Finset (ℙ K V)) (B UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + Law (Option (Finset (ℙ K (Dual K V))×Finset (ℙ K V))) := + optionCompose (fourFreeLaw hd σ A UA B UB P τ R L₀) + (producedPairLaw A UA B UB hB (9/100000)) + +lemma producedPairLaw_spec (hd : finrank K V=5) (hq : 3≤Nat.card K) + (A UA : Finset (ℙ K V)) (B UB : Finset (ℙ K (Dual K V))) + (hA : A.Nonempty) (hB : B.Nonempty) (hAU : A⊆UA) (hBU : B⊆UB) + (c M : ℝ) (hc : 0hh.2.2.2 Y Z (pairOptions_positive _ Y Z hp)⟩ + +theorem eventually_local_node {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))], + ∀ (hd : finrank K V=5) (A UA : Finset (ℙ K V)) (B UB : Finset (ℙ K (Dual K V))) + (hB : B.Nonempty), + Nat.card K=q → Real.exp σ=q → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-800*beta η) → A⊆UA → B⊆UB → A.card≤B.card → + (Nat.card K:ℝ)*(incidences A B:ℝ)≤τ*A.card*B.card → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(A.card:ℝ)*B.card → + let p := localNodeLaw hd σ A UA B UB hB (P η σ D R) τ R L₀ + p none≤5*Real.exp (-(Nat.card K:ℝ)) ∧ + ∀Y Z,0

(hs W hW).1) + simpa only [localNodeLaw,show (3:ℝ)*Real.exp (-(Nat.card K:ℝ))+2*Real.exp (-(Nat.card K:ℝ))=5*Real.exp (-(Nat.card K:ℝ)) by ring] using hh + · intro Y Z hYZ + obtain ⟨W,hW,hout⟩ := optionCompose_positive _ _ (Y,Z) hYZ + obtain ⟨hy,hz⟩ := (hs W hW).2 Y Z hout + exact ⟨hy,hz,validated_caps_flags hd A UA (UA∩Z) B UB (UB∩Y) hA hB (9/100000) b (by norm_num) hb hprod hz hy⟩ +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/LogContractionDrop.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/LogContractionDrop.lean new file mode 100644 index 0000000000000000000000000000000000000000..e86c366aedf754d3035bbd5cd9f55d421e4d05d5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/LogContractionDrop.lean @@ -0,0 +1,77 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.Marking +open scoped BigOperators Classical + +lemma log_contraction_drop (x y δ : ℝ) (hx : 1≤x) (hy : 0≤y) (hδ : 0≤δ) + (hc : y≤(1-δ)*x) : Real.log (1+y)≤Real.log (1+x)-δ/2 := by + have hx0 : 0<1+x := by linarith + have hy0 : 0<1+y := by linarith + have hh := Real.log_le_sub_one_of_pos (div_pos hy0 hx0) + rw [Real.log_div hy0.ne' hx0.ne'] at hh + have hd : (1+y)/(1+x)-1≤ -δ/2 := by + have hrat : (1+y)/(1+x)≤1-δ/2 := by + apply (div_le_iff₀ hx0).mpr + nlinarith [mul_nonneg hδ (show 0≤x-1 by linarith)] + linarith + linarith + +lemma telescoping_drop (f : ℕ → ℝ) (e : ℕ → ℝ) (N : ℕ) + (hstep : ∀ i simp + | succ N ih => + have hi := ih (fun i hi => hstep i (Nat.lt_succ_of_lt hi)) + have hh := hstep N (Nat.lt_succ_self N) + rw [Finset.sum_range_succ] + linarith + +theorem finite_scan_bound {Y : Type*} [DecidableEq Y] + (S : ℕ → Fin 5 → Finset Y) (chosen : ℕ → Option (Fin 5)) + (N : ℕ) (δ : ℝ) (hδ : 0<δ) + (hmono : ∀ i (chosen i).isSome).card:ℝ)*(δ/2)≤ + ∑ j:Fin 5,Real.log (1+(S 0 j).card) := by + let Φ : ℕ → ℝ:=fun i => ∑ j:Fin 5,Real.log (1+(S i j).card) + let e : ℕ → ℝ:=fun i => if (chosen i).isSome then δ/2 else 0 + have hd : ∀ i + simp only [e,hc,Option.isSome_none,Bool.false_eq_true,ite_false,sub_zero] + exact Finset.sum_le_sum fun j _ => hj j + | some j => + have hcol:=hchosen i hi j hc + have hx : (1:ℝ)≤(S i j).card := by exact_mod_cast Finset.card_pos.mpr hcol.1 + have hdrop:=log_contraction_drop (S i j).card (S (i+1) j).card δ hx (by positivity) hδ.le hcol.2 + have hs : (∑ k:Fin 5,Real.log (1+(S (i+1) k).card))≤ + ∑ k:Fin 5,(Real.log (1+(S i k).card)-(if k=j then δ/2 else 0)) := by + apply Finset.sum_le_sum + intro k _ + by_cases hk : k=j + · subst k; simpa using hdrop + · simpa only [ite_eq_right hk,sub_zero] using hj k + simpa [Φ,e,hc,Finset.sum_sub_distrib] using hs + have hf:=telescoping_drop Φ e N hd + have hnonneg : 0≤Φ N := Finset.sum_nonneg fun j _ => Real.log_nonneg (by + have h : (0:ℝ)≤(S N j).card := by positivity + linarith) + have he : (∑ i∈Finset.range N,e i)= + (((Finset.range N).filter fun i => (chosen i).isSome).card:ℝ)*(δ/2) := by + simp only [e,←Finset.sum_filter,Finset.sum_const,nsmul_eq_mul] + rw [he] at hf + change _≤Φ 0 + linarith + +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/LogSum.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/LogSum.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc4c552fa29236538bf5abf8b83b3b85e3631558 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/LogSum.lean @@ -0,0 +1,258 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.Map + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped BigOperators Classical +variable {α β : Type*} [Fintype α] [Fintype β] + +theorem log_sum (f g : α → ℝ) (hf : ∀ a,0≤f a) (hg : ∀ a,0≤g a) + (hac : ∀ a,0 hf a + by_cases hFz : F=0 + · have hzero (a : α) : f a=0 := by + have hle : f a≤F := Finset.single_le_sum (fun b _ => hf b) (Finset.mem_univ a) + exact le_antisymm (hle.trans_eq hFz) (hf a) + simp only [hzero,Finset.sum_const_zero,zero_mul] + exact le_rfl + have hF : 0 hn a + exact (not_le_of_gt hF) hnon + obtain ⟨a,ha⟩ := hex + exact (hac a ha).trans_le (Finset.single_le_sum (fun b _ => hg b) (Finset.mem_univ a)) + let p : Law α := + { mass := fun a => f a/F + nonneg := fun a => div_nonneg (hf a) hF.le + sum_one := by rw [←Finset.sum_div]; exact div_self hFz } + let q : Law α := + { mass := fun a => g a/G + nonneg := fun a => div_nonneg (hg a) hG.le + sum_one := by rw [←Finset.sum_div]; exact div_self (ne_of_gt hG) } + have hD : 0≤divergence p q := by + apply divergence_nonneg p q + intro a ha + exact div_pos (hac a ((div_pos_iff_of_pos_right hF).mp ha)) hG + have he (a : α) : f a*Real.log (f a/g a) = + f a*Real.log (F/G)+F*(p a*Real.log (p a/q a)) := by + by_cases hz : f a=0 + · simp [p,hz] + · have hfp : 0 if f a=b then p a else 0) + (fun a => if f a=b then q a else 0) + (fun a => by split_ifs; exact p.nonneg a; exact le_rfl) + (fun a => by split_ifs; exact q.nonneg a; exact le_rfl) + (fun a ha => by + split_ifs at ha ⊢ with h + · exact hac a ha + · exact (lt_irrefl _ ha).elim) + have hs := Finset.sum_le_sum (fun b (_ : b∈Finset.univ) => hpoint b) + change divergence (map p f) (map q f) ≤ _ at hs + apply hs.trans_eq + rw [Finset.sum_comm] + unfold divergence + apply Finset.sum_congr rfl + intro a _ + have hterm (b : β) : (if f a=b then p a else 0)*Real.log + ((if f a=b then p a else 0)/(if f a=b then q a else 0)) = + if f a=b then p a*Real.log (p a/q a) else 0 := by + split_ifs <;> simp + simp only [hterm] + classical + simp + +lemma map_product {γ δ : Type*} [Fintype γ] [Fintype δ] + (p : Law α) (q : Law β) (f : α → γ) (g : β → δ) : + map (product p q) (fun z => (f z.1,g z.2)) = product (map p f) (map q g) := by + apply Law.ext + funext z + simp only [map,product,Fintype.sum_prod_type] + have he (a : α) (b : β) : + (if (f a,g b)=z then p a*q b else 0) = + (if f a=z.1 then p a else 0)*(if g b=z.2 then q b else 0) := by + rcases z with ⟨c,d⟩ + simp only [Prod.mk.injEq] + split_ifs <;> simp_all + simp only [he,←Finset.mul_sum,←Finset.sum_mul] + +lemma map_first (p : Law (α × β)) : map p Prod.fst=first p := by + apply Law.ext + funext a + simp only [map,first,Fintype.sum_prod_type] + classical + rw [Finset.sum_comm] + simp + +lemma map_second (p : Law (α × β)) : map p Prod.snd=second p := by + apply Law.ext + funext b + simp only [map,second,Fintype.sum_prod_type] + classical + simp + +theorem mutual_information_map_le {γ δ : Type*} [Fintype γ] [Fintype δ] + (p : Law (α × β)) (f : α → γ) (g : β → δ) : + entropy (map (first p) f)+entropy (map (second p) g)- + entropy (map p (fun z => (f z.1,g z.2))) ≤ + entropy (first p)+entropy (second p)-entropy p := by + have h := divergence_map_le p (product (first p) (second p)) (ac_product p) + (fun z => (f z.1,g z.2)) + rw [map_product] at h + have h1 : first (map p (fun z => (f z.1,g z.2)))=map (first p) f := by + change first (pair p (f ∘ Prod.fst) (g ∘ Prod.snd))=_ + rw [first_pair,←map_comp,map_first] + have h2 : second (map p (fun z => (f z.1,g z.2)))=map (second p) g := by + change second (pair p (f ∘ Prod.fst) (g ∘ Prod.snd))=_ + rw [second_pair,←map_comp,map_second] + rw [←h1,←h2,mutual_information,mutual_information] at h + rw [h1,h2] at h + exact h + +end + +open scoped BigOperators Classical +variable {α β γ ι : Type*} [Fintype α] [Fintype β] [Fintype γ] [Fintype ι] + +noncomputable def mapSnd (p : Law (α × β)) (f : β → γ) : Law (α × γ) := + map p (fun z => (z.1,f z.2)) + +lemma mapSnd_mass (p : Law (α × β)) (f : β → γ) (a : α) (c : γ) : + mapSnd p f (a,c) = ∑ b,if f b=c then p (a,b) else 0 := by + simp only [mapSnd,map,Fintype.sum_prod_type,Prod.mk.injEq] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro b _ + by_cases h : f b=c <;> simp [h] + +lemma first_mapSnd (p : Law (α × β)) (f : β → γ) : first (mapSnd p f)=first p := by + change first (pair p Prod.fst (f ∘ Prod.snd))=_ + rw [first_pair,map_first] + +lemma second_mapSnd (p : Law (α × β)) (f : β → γ) : second (mapSnd p f)=map (second p) f := by + change second (pair p Prod.fst (f ∘ Prod.snd))=_ + rw [second_pair,←map_comp,map_second] + +lemma fiber_mapSnd (p : Law (α × β)) (f : β → γ) (a : α) : + fiber (mapSnd p f) a = map (fiber p a) f := by + by_cases h : 0 < first p a + · apply Law.ext + funext c + simp only [fiber,first_mapSnd,dite_eq_left h] + change mapSnd p f (a,c)/first p a=∑ b,if f b=c then p (a,b)/first p a else 0 + rw [mapSnd_mass,Finset.sum_div] + apply Finset.sum_congr rfl + intro b _ + split_ifs <;> simp + · simp only [fiber,first_mapSnd,dite_eq_right h,second_mapSnd] + +noncomputable def totalCorrelation (p : Law (ι → β)) : ℝ := + (∑ i,entropy (map p (fun x => x i)))-entropy p + +noncomputable def information (p : Law (α × β)) : ℝ := + entropy (first p)+entropy (second p)-entropy p + +lemma information_nonneg (p : Law (α × β)) : 0 ≤ information p := by + dsimp [information] + linarith [entropy_subadditive p] + +lemma information_conditional (p : Law (α × β)) : + information p = entropy (second p)-∑ a,first p a*entropy (fiber p a) := by + dsimp [information] + rw [entropy_chain] + ring + +theorem total_correlation_drop (p : Law (α × (ι → β))) : + (entropy (first p)+(∑ i,entropy (map (second p) (fun x => x i)))-entropy p)- + (∑ a,first p a*totalCorrelation (fiber p a)) = + ∑ i,information (mapSnd p (fun x => x i)) := by + have hI (i : ι) : information (mapSnd p (fun x => x i)) = + entropy (map (second p) (fun x => x i))- + ∑ a,first p a*entropy (map (fiber p a) (fun x => x i)) := by + rw [information_conditional,second_mapSnd,first_mapSnd] + simp only [fiber_mapSnd] + simp only [hI,totalCorrelation,mul_sub,Finset.sum_sub_distrib,Finset.mul_sum] + rw [Finset.sum_comm (f := fun a i => first p a*entropy (map (fiber p a) (fun x => x i)))] + rw [entropy_chain] + ring + +lemma information_observation_le (p : Law (α × β)) (f : α → γ) : + information (map p (fun z => (f z.1,z.2))) ≤ information p := by + have hh := mutual_information_map_le p f id + have h1 : first (map p (fun z => (f z.1,z.2)))=map (first p) f := by + change first (pair p (f ∘ Prod.fst) (id ∘ Prod.snd))=_ + rw [first_pair] + rw [←map_comp,map_first] + have h2 : second (map p (fun z => (f z.1,z.2)))=second p := by + change second (pair p (f ∘ Prod.fst) Prod.snd)=_ + rw [second_pair,map_second] + simpa only [information,h1,h2,map_id,id_eq] using hh + +noncomputable def independent (p : ι → Law β) : Law (ι → β) where + mass x := ∏ i,p i (x i) + nonneg x := Finset.prod_nonneg fun i _ => (p i).nonneg _ + sum_one := by + rw [←Fintype.prod_sum] + simp only [Law.sum_one,Finset.prod_const_one] + +lemma map_eval_mass_pos (p : Law (ι → β)) (x : ι → β) (hx : 0

z i) (x i) := by + apply hx.trans_le + change p x≤∑ z,if z i=x i then p z else 0 + have hh := Finset.single_le_sum (s := Finset.univ) (a := x) + (f := fun z => if z i=x i then p z else 0) (fun z _ => by split_ifs; exact p.nonneg _; rfl) + (Finset.mem_univ x) + simpa using hh + +theorem totalCorrelation_nonneg (p : Law (ι → β)) : 0≤totalCorrelation p := by + let q : Law (ι → β) := independent (fun i => map p (fun z => z i)) + have hac (x : ι → β) (hx : 0

map_eval_mass_pos p x hx i) + have hd := divergence_nonneg p q hac + have hpq (x : ι → β) : p x*Real.log (p x/q x) = + p x*Real.log (p x)-∑ i,p x*Real.log (map p (fun z => z i) (x i)) := by + by_cases h : p x=0 + · simp only [h,zero_mul,Finset.sum_const_zero,sub_zero] + · have hx : 0

z i) (x i)) := by + apply Real.log_prod + intro i _ + exact ne_of_gt (map_eval_mass_pos p x hx i) + rw [he,mul_sub,Finset.mul_sum] + have he : divergence p q=totalCorrelation p := by + simp only [divergence,hpq,Finset.sum_sub_distrib] + rw [Finset.sum_comm] + have hm (i : ι) : (∑ x,p x*Real.log (map p (fun z => z i) (x i))) = + -entropy (map p (fun z => z i)) := by + rw [←sum_map p (fun z => z i) (fun b => Real.log (map p (fun z => z i) b))] + simp only [entropy,neg_neg] + simp only [hm,Finset.sum_neg_distrib,totalCorrelation,entropy] + ring + rwa [he] at hd + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/LowBudgetPoly.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/LowBudgetPoly.lean new file mode 100644 index 0000000000000000000000000000000000000000..00d4496bd8f7d7ce171cb1e5b734d7c4d81231a2 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/LowBudgetPoly.lean @@ -0,0 +1,108 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.HighPolyConstant + +namespace OAI + +noncomputable section +namespace SharpRamseyFive.ScoreGeometry +open scoped BigOperators + +noncomputable def lowBudgetPoly (a s p P : ℝ) : ℝ := + highBudgetPoly a p P+s*p^3*(200*p+2*P) + +lemma lowMomentBudget_eq_high (Q M A B b L : ℝ) (p R N₁ N₂ : ℕ) + (hB : B≠0) (hb : b≠0) : lowMomentBudget Q M A B b L p R N₁ N₂= + highMomentBudget Q M A B b L p R N₂+ + B*((N₁:ℝ)/B)*(p:ℝ)^3*(200*p+2*((R:ℝ)*L)) := by + unfold lowMomentBudget highMomentBudget certificateMajorant highCertificateMajorant + push_cast + field_simp [hB, hb] + ring + +lemma lowMomentBudget_le_poly (Q a s B b L : ℝ) (p R N₁ N₂ : ℕ) + (hB : 1≤B) (hb : 0 rw [mul_add] + apply add_le_add (highMomentBudget_le_poly Q a B b L p R N₂ hB hb ha hL hroot hanchor hpair) + have hn := mul_le_mul_of_nonneg_left hone hB0.le + have hp : 0≤(p:ℝ)^3*(200*p+2*((R:ℝ)*L)) := by positivity + convert mul_le_mul_of_nonneg_right hn hp using 1 <;> ring + +open Filter Asymptotics ParameterHierarchy +open scoped Topology + +lemma lowBudgetPoly_bound {σ P p a s k c : ℝ} (hσ : 1≤σ) + (hP : 0≤P) (hPhi : P≤σ) (hp : 0≤p) (hphi : p≤k*σ) + (ha : 0≤a) (hahi : a≤c*σ*Real.exp (P/50)) + (hs : s≤4*Real.exp (P/10000)) (hk : 0≤k) (hc : 0≤c) : + lowBudgetPoly a s p P≤(highPolyConstant k c+4*k^3*(200*k+2))*σ^205*Real.exp (P/50) := by + have hσ0 : 0≤σ := by linarith + have hhigh := highBudgetPoly_bound hσ (Real.one_le_exp_iff.mpr (by positivity : 0≤P/50)) + hp hphi hP hPhi ha hahi hk hc + have hpow : σ^(4:ℕ)≤σ^(205:ℕ) := pow_le_pow_right₀ hσ (by norm_num) + have hE : Real.exp (P/10000)≤Real.exp (P/50) := Real.exp_le_exp.mpr (by linarith) + have hterm : s*p^3*(200*p+2*P)≤(4*k^3*(200*k+2))*σ^205*Real.exp (P/50) := by + calc + _ ≤ (4*Real.exp (P/10000))*(k*σ)^3*((200*k+2)*σ) := by + apply mul_le_mul (mul_le_mul hs (pow_le_pow_left₀ hp hphi 3) (by positivity) (by positivity)) + (by nlinarith only [hphi,hPhi]) (by positivity) (by positivity) + _ = (4*k^3*(200*k+2))*σ^4*Real.exp (P/10000) := by ring + _ ≤ _ := mul_le_mul (mul_le_mul_of_nonneg_left hpow (by positivity)) hE + (Real.exp_nonneg _) (by positivity) + unfold lowBudgetPoly + calc + _ ≤ highPolyConstant k c*σ^205*Real.exp (P/50)+ + (4*k^3*(200*k+2))*σ^205*Real.exp (P/50) := add_le_add hhigh hterm + _ = _ := by ring + +theorem eventually_low_poly_cost {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (k c : ℝ) (hk : 0≤k) (hc : 0≤c) : + ∀ᶠ σ : ℝ in atTop,∀ D R p a s : ℝ,Range η σ D R → + 0≤p → p≤k*σ → 0≤a → a≤c*σ*Real.exp (P η σ D R/50) → + s≤4*Real.exp (P η σ D R/10000) → + Real.exp (P η σ D R/50)+2*(p+1)*lowBudgetPoly a s p (P η σ D R)≤ + Real.exp (P η σ D R/5) := by + let C := highPolyConstant k c+4*k^3*(200*k+2) + have hC : 0 t ≤ f z).card:ℝ) ≤ M/t^k := by + apply (le_div_iff₀ (pow_pos ht k)).mpr + calc + _ = ∑ z∈Finset.univ.filter (fun z => t ≤ f z),t^k := by simp + _ ≤ ∑ z∈Finset.univ.filter (fun z => t ≤ f z),f z^k := by + apply Finset.sum_le_sum + intro z hz + exact pow_le_pow_left₀ ht.le (Finset.mem_filter.mp hz).2 k + _ ≤ ∑ z,f z^k := Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) + (by intro z _ _; exact pow_nonneg (hf z) k) + _ ≤ M := hM + +noncomputable def lowMomentBudget (Q M A B b L : ℝ) (p R N₁ N₂ : ℕ) : ℝ := + certificateMajorant Q M B b L p R 200 N₁ N₂ + + (1+(p:ℝ)^200*A)+B+(Q/B+(p:ℝ)^200*(M/B)) + +lemma lowMomentBudget_bounds (Q M A B b L : ℝ) (p R N₁ N₂ : ℕ) + (hQ : 0 ≤ Q) (hM : 0 ≤ M) (hA : 0 ≤ A) (hB : 0 < B) + (hb : 0 ≤ b) (hL : 0 ≤ L) : + 0 ≤ lowMomentBudget Q M A B b L p R N₁ N₂ ∧ + certificateMajorant Q M B b L p R 200 N₁ N₂ ≤ lowMomentBudget Q M A B b L p R N₁ N₂ ∧ + 1+(p:ℝ)^200*A ≤ lowMomentBudget Q M A B b L p R N₁ N₂ ∧ + Q+(p:ℝ)^200*M ≤ (lowMomentBudget Q M A B b L p R N₁ N₂)^2 := by + have hc := certificateMajorant_nonneg Q M B b L p R 200 N₁ N₂ hQ hM hB.le hb hL + have hrow : 0 ≤ 1+(p:ℝ)^200*A := by positivity + have hx : 0 ≤ Q/B+(p:ℝ)^200*(M/B) := by positivity + have hCB : B ≤ lowMomentBudget Q M A B b L p R N₁ N₂ := by + unfold lowMomentBudget; linarith + have hCx : Q/B+(p:ℝ)^200*(M/B) ≤ lowMomentBudget Q M A B b L p R N₁ N₂ := by + unfold lowMomentBudget; linarith + have hC := hB.le.trans hCB + refine ⟨hC,?_,?_,?_⟩ + · unfold lowMomentBudget; linarith + · unfold lowMomentBudget; linarith + · calc + _ = B*(Q/B+(p:ℝ)^200*(M/B)) := by field_simp + _ ≤ lowMomentBudget Q M A B b L p R N₁ N₂ * + lowMomentBudget Q M A B b L p R N₁ N₂ := mul_le_mul hCB hCx hx hC + _ = _ := (sq _).symm + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/Map.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/Map.lean new file mode 100644 index 0000000000000000000000000000000000000000..509803898df6d237376964615867f81b8b7e29ad --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/Map.lean @@ -0,0 +1,165 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.Law + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped BigOperators Classical +variable {α β γ : Type*} [Fintype α] [Fintype β] [Fintype γ] + +@[ext] lemma Law.ext {p q : Law α} (h : p.mass=q.mass) : p=q := by + cases p + cases q + cases h + rfl + +noncomputable def map (p : Law α) (f : α → β) : Law β where + mass b := ∑ a, if f a=b then p a else 0 + nonneg b := Finset.sum_nonneg fun a _ => by + split_ifs + · exact p.nonneg a + · exact le_rfl + sum_one := by + rw [Finset.sum_comm] + classical + simpa using p.sum_one + +lemma sum_map (p : Law α) (f : α → β) (w : β → ℝ) : + (∑ b,map p f b*w b) = ∑ a,p a*w (f a) := by + change (∑ b,(∑ a,if f a=b then p a else 0)*w b)=_ + simp only [Finset.sum_mul] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro a _ + classical + simp [ite_mul] + +lemma map_id (p : Law α) : map p id = p := by + apply Law.ext + funext a + classical + simp [map] + +lemma map_comp (p : Law α) (f : α → β) (g : β → γ) : + map (map p f) g = map p (g ∘ f) := by + apply Law.ext + funext c + change (∑ b,if g b=c then map p f b else 0)=_ + have h := sum_map p f (fun b => if g b=c then 1 else 0) + simpa only [mul_ite,mul_one,mul_zero,map,Function.comp_apply] using h + +lemma map_mass_image (p : Law α) (f : α → β) (hf : Function.Injective f) (a : α) : + map p f (f a)=p a := by + change (∑ b,if f b=f a then p b else 0)=_ + classical + simp [hf.eq_iff] + +lemma entropy_map_injective (p : Law α) (f : α → β) (hf : Function.Injective f) : + entropy (map p f)=entropy p := by + unfold entropy + rw [sum_map] + simp only [map_mass_image p f hf] + +noncomputable def pair (p : Law α) (f : α → β) (g : α → γ) : Law (β × γ) := + map p (fun a => (f a,g a)) + +lemma first_pair (p : Law α) (f : α → β) (g : α → γ) : first (pair p f g)=map p f := by + apply Law.ext + funext b + simp only [first,pair,map] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro a _ + by_cases h : f a=b + · simp [h,Prod.mk.injEq] + · simp [h,Prod.mk.injEq] + +lemma second_pair (p : Law α) (f : α → β) (g : α → γ) : second (pair p f g)=map p g := by + apply Law.ext + funext c + simp only [second,pair,map] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro a _ + by_cases h : g a=c + · simp [h,Prod.mk.injEq] + · simp [h,Prod.mk.injEq] + +noncomputable def fiber (p : Law (α × β)) (a : α) : Law β := + if h : 0 < first p a then + { mass := fun b => p (a,b)/first p a + nonneg := fun b => div_nonneg (p.nonneg _) h.le + sum_one := by rw [←Finset.sum_div]; exact div_self (ne_of_gt h) } + else second p + +lemma mass_eq_first_mul_fiber (p : Law (α × β)) (a : α) (b : β) : + p (a,b)=first p a*fiber p a b := by + by_cases h : 0 < first p a + · simp only [fiber,dite_eq_left h] + field_simp + · have hz : first p a=0 := le_antisymm (le_of_not_gt h) ((first p).nonneg a) + have hpz : p (a,b)=0 := le_antisymm ((le_first p a b).trans_eq hz) (p.nonneg _) + simp only [hpz,hz,zero_mul] + +lemma log_mass_split (p : Law (α × β)) (a : α) (b : β) : + p (a,b)*Real.log (p (a,b)) = + p (a,b)*Real.log (first p a)+ + first p a*(fiber p a b*Real.log (fiber p a b)) := by + by_cases h : p (a,b)=0 + · rw [h,zero_mul,zero_mul,zero_add] + have hprod := mass_eq_first_mul_fiber p a b + rw [h] at hprod + rw [←mul_assoc,←hprod,zero_mul] + · have hp : 0 < p (a,b) := lt_of_le_of_ne (p.nonneg _) (Ne.symm h) + have h1 : first p a ≠ 0 := ne_of_gt (hp.trans_le (le_first p a b)) + have h2 : fiber p a b ≠ 0 := by + intro hz + rw [mass_eq_first_mul_fiber p a b,hz,mul_zero] at h + exact h rfl + conv_lhs => rw [mass_eq_first_mul_fiber p a b,Real.log_mul h1 h2] + rw [mass_eq_first_mul_fiber p a b] + ring + +theorem entropy_chain (p : Law (α × β)) : + entropy p = entropy (first p)+∑ a,first p a*entropy (fiber p a) := by + have hlog : (∑ a,∑ b,p (a,b)*Real.log (first p a)) = + ∑ a,first p a*Real.log (first p a) := by + apply Finset.sum_congr rfl + intro a _ + rw [←Finset.sum_mul] + rfl + simp only [entropy,Fintype.sum_prod_type,log_mass_split,Finset.sum_add_distrib, + hlog,←Finset.mul_sum,mul_neg,Finset.sum_neg_distrib] + ring + +lemma entropy_first_le (p : Law (α × β)) : entropy (first p) ≤ entropy p := by + rw [entropy_chain] + exact le_add_of_nonneg_right (Finset.sum_nonneg fun a _ => + mul_nonneg ((first p).nonneg _) (entropy_nonneg _)) + +lemma conditional_entropy_le (p : Law (α × β)) : + (∑ a,first p a*entropy (fiber p a)) ≤ entropy (second p) := by + have := entropy_subadditive p + rw [entropy_chain] at this + linarith + +lemma entropy_map_le (p : Law α) (f : α → β) : entropy (map p f) ≤ entropy p := by + have h := entropy_first_le (pair p f id) + rw [first_pair] at h + rw [pair,entropy_map_injective p (fun a => (f a,id a)) (by + intro a b hab + exact congrArg Prod.snd hab)] at h + exact h + +theorem conditional_deficit_le (p : Law (α × β)) (capA capB : ℝ) + (hcap : entropy (first p) ≤ capA) : + (∑ a,first p a*(capB-entropy (fiber p a))) ≤ capA+capB-entropy p := by + have he : (∑ a,first p a*(capB-entropy (fiber p a))) = + capB-∑ a,first p a*entropy (fiber p a) := by + simp only [mul_sub,Finset.sum_sub_distrib,←Finset.sum_mul,(first p).sum_one,one_mul] + rw [he,entropy_chain] + linarith + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/MapFst.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/MapFst.lean new file mode 100644 index 0000000000000000000000000000000000000000..c1eb43a4fafd34f948079bed0ad8cf4f0327f4be --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/MapFst.lean @@ -0,0 +1,173 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.PermissibleLevels +import OAI.Combinatorics.RamseyFive.Entropy.BlockReveal + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped BigOperators Classical +variable {α β γ : Type*} [Fintype α] [Fintype β] [Fintype γ] + +lemma map_fst (p : Law (α×β)) : map p Prod.fst=first p := by + apply Law.ext + funext a + simp [map,first,Fintype.sum_prod_type,Finset.sum_comm] + +lemma map_snd (p : Law (α×β)) : map p Prod.snd=second p := by + apply Law.ext + funext b + simp [map,second,Fintype.sum_prod_type] + +lemma pair_self_apply (p : Law α) (f : α→β) (b : β) (a : α) : + pair p f id (b,a)=if f a=b then p a else 0 := by + simp only [pair,map] + rw [Finset.sum_eq_single a] + · simp [Prod.mk.injEq] + · intro c hc hca + have hne : (f c,id c)≠(b,a) := fun h=>hca (congrArg Prod.snd h) + simp [hca] + · simp + +lemma partition_first (p : Law α) (f : α→β) : first (pair p f id)=map p f := + first_pair p f id + +lemma partition_entropy (p : Law α) (f : α→β) : + entropy p=entropy (map p f)+∑b,map p f b*entropy (fiber (pair p f id) b) := by + have he : entropy (pair p f id)=entropy p := + entropy_map_injective p _ (fun _ _ h=>congrArg Prod.snd h) + rw [←he,entropy_chain,partition_first] + +lemma partition_support_subset (p : Law α) (f : α→β) (b : β) + (hb : 0 < map p f b) : + support (fiber (pair p f id) b)⊆(support p).filter (fun a=>f a=b) := by + intro a ha + have hfa := (mem_support _ _).mp ha + have hfst : 0 < first (pair p f id) b := by simpa only [partition_first] using hb + have hp : 0 < pair p f id (b,a) := by + rw [mass_eq_first_mul_fiber] + exact mul_pos hfst hfa + rw [pair_self_apply] at hp + split_ifs at hp with hh + · exact Finset.mem_filter.mpr ⟨(mem_support _ _).mpr hp,hh⟩ + · exact (lt_irrefl 0 hp).elim + +theorem entropy_partition_bound (p : Law α) (f : α→β) (C : β→ℝ) + (hC : ∀b,0 < map p f b → + Real.log (((support p).filter (fun a=>f a=b)).card:ℝ)≤C b) : + entropy p≤entropy (map p f)+∑b,map p f b*C b := by + rw [partition_entropy p f] + apply add_le_add le_rfl + apply Finset.sum_le_sum + intro b _ + by_cases hz : map p f b=0 + · simp [hz] + · have hp : 0 < map p f b := lt_of_le_of_ne ((map p f).nonneg _) (Ne.symm hz) + apply mul_le_mul_of_nonneg_left _ hp.le + have hh : ((support (fiber (pair p f id) b)).card:ℝ)≤ + ((support p).filter (fun a=>f a=b)).card := by + exact_mod_cast Finset.card_le_card (partition_support_subset p f b hp) + exact (entropy_support_cap _ _ hh).trans (hC b hp) + +end + +open scoped BigOperators Classical +variable {α β : Type*} [Fintype α] [Fintype β] + +noncomputable def endpointLevels (p : Law (α×β)) (z : α×β) : + Level (first p)×Level (second p) := (levelIndex (first p) z.1,levelIndex (second p) z.2) +noncomputable def levelPairLaw (p : Law (α×β)) := map p (endpointLevels p) + +lemma first_levelPairLaw (p : Law (α×β)) : first (levelPairLaw p)=levelLaw (first p) := by + calc + _ = map (levelPairLaw p) Prod.fst := (map_fst _).symm + _ = map p (fun z=>levelIndex (first p) z.1) := map_comp p _ _ + _ = map (map p Prod.fst) (levelIndex (first p)) := (map_comp p Prod.fst (levelIndex (first p))).symm + _ = _ := congrArg (fun μ : Law α=>map μ (levelIndex (first p))) (map_fst p) + +lemma second_levelPairLaw (p : Law (α×β)) : second (levelPairLaw p)=levelLaw (second p) := by + calc + _ = map (levelPairLaw p) Prod.snd := (map_snd _).symm + _ = map p (fun z=>levelIndex (second p) z.2) := map_comp p _ _ + _ = map (map p Prod.snd) (levelIndex (second p)) := (map_comp p Prod.snd (levelIndex (second p))).symm + _ = _ := congrArg (fun μ : Law β=>map μ (levelIndex (second p))) (map_snd p) + +lemma sum_levelPair_fst (p : Law (α×β)) (w : Level (first p)→ℝ) : + (∑n,levelPairLaw p n*w n.1)=∑n,levelLaw (first p) n*w n := by + simpa only [map_fst,first_levelPairLaw] using (sum_map (levelPairLaw p) Prod.fst w).symm + +lemma sum_levelPair_snd (p : Law (α×β)) (w : Level (second p)→ℝ) : + (∑n,levelPairLaw p n*w n.2)=∑n,levelLaw (second p) n*w n := by + simpa only [map_snd,second_levelPairLaw] using (sum_map (levelPairLaw p) Prod.snd w).symm + +lemma levelPair_entropy (p : Law (α×β)) : + entropy (levelPairLaw p) ≤ entropy (levelLaw (first p))+entropy (levelLaw (second p)) := by + simpa only [first_levelPairLaw,second_levelPairLaw] using entropy_subadditive (levelPairLaw p) + +lemma positive_marginals (p : Law (α×β)) {z : α×β} (hz : 0 < p z) : + 0 < first p z.1 ∧ 0 < second p z.2 := by + constructor + · exact lt_of_lt_of_le hz (Finset.single_le_sum (fun b _=>p.nonneg (z.1,b)) (Finset.mem_univ z.2)) + · exact lt_of_lt_of_le hz (Finset.single_le_sum (fun a _=>p.nonneg (a,z.2)) (Finset.mem_univ z.1)) + +lemma level_pair_support_subset (p : Law (α×β)) (R : α→β→Prop) + (hR : ∀z,0 < p z→R z.1 z.2) (n : Level (first p)×Level (second p)) : + (support p).filter (fun z=>endpointLevels p z=n) ⊆ + ((levelCell (first p) n.1)×ˢ(levelCell (second p) n.2)).filter (fun z=>R z.1 z.2) := by + intro z hz + obtain ⟨hs,he⟩ := Finset.mem_filter.mp hz + have hp := (mem_support p z).mp hs + have hm := positive_marginals p hp + have h₁ : atomLevel (first p) z.1=n.1.val := congrArg (fun x=>x.1.val) he + have h₂ : atomLevel (second p) z.2=n.2.val := congrArg (fun x=>x.2.val) he + exact Finset.mem_filter.mpr ⟨Finset.mem_product.mpr + ⟨(mem_levelCell _ _ _).mpr ⟨hm.1,h₁⟩,(mem_levelCell _ _ _).mpr ⟨hm.2,h₂⟩⟩,hR z hp⟩ + +lemma positive_level_pair_support (p : Law (α×β)) (n : Level (first p)×Level (second p)) + (hn : 0 < levelPairLaw p n) : + ((support p).filter (fun z=>endpointLevels p z=n)).Nonempty := by + by_contra he + have hz : levelPairLaw p n=0 := by + unfold levelPairLaw map + apply Finset.sum_eq_zero + intro z _ + by_cases hh : endpointLevels p z=n + · rw [ite_eq_left hh] + have hnot : z∉support p := by + intro hm + exact he ⟨z,Finset.mem_filter.mpr ⟨hm,hh⟩⟩ + exact outside_support p hnot + · simp [hh] + linarith + +theorem expected_total_level_loss (p : Law (α×β)) (NA NB D : ℝ) + (hrect : ∀n : Level (first p)×Level (second p),0 < levelPairLaw p n→ + Real.log (((support p).filter (fun z=>endpointLevels p z=n)).card:ℝ) ≤ + D-(levelLoss (first p) NA n.1+levelLoss (second p) NB n.2)/2) : + (∑n,levelLaw (first p) n*levelLoss (first p) NA n)+ + (∑n,levelLaw (second p) n*levelLoss (second p) NB n) ≤ + 2*(D-entropy p+entropy (levelLaw (first p))+entropy (levelLaw (second p))) := by + have he := entropy_partition_bound p (endpointLevels p) + (fun n=>D-(levelLoss (first p) NA n.1+levelLoss (second p) NB n.2)/2) (by + intro n hn + convert hrect n hn using 1 + congr 3 + ext point + simp) + change entropy p ≤ entropy (levelPairLaw p)+ + ∑n,levelPairLaw p n*(D-(levelLoss (first p) NA n.1+levelLoss (second p) NB n.2)/2) at he + have hs : (∑n,levelPairLaw p n*(D-(levelLoss (first p) NA n.1+ + levelLoss (second p) NB n.2)/2)) = D- + ((∑n,levelLaw (first p) n*levelLoss (first p) NA n)+ + (∑n,levelLaw (second p) n*levelLoss (second p) NB n))/2 := by + simp only [mul_sub,←mul_div_assoc,mul_add,Finset.sum_sub_distrib,←Finset.sum_div, + Finset.sum_add_distrib,←Finset.sum_mul,(levelPairLaw p).sum_one,one_mul, + sum_levelPair_fst,sum_levelPair_snd] + rw [hs] at he + have hh := levelPair_entropy p + linarith + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/MarkedActualBudget.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/MarkedActualBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..08adaabe18871c0bec1ffffadedfe7ac2cd5ef81 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/MarkedActualBudget.lean @@ -0,0 +1,166 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.ContextDescription +import OAI.Combinatorics.RamseyFive.Marking.MarkedStreamExtraction + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module ProjectiveIncidence FiniteEntropy SelectedTuple +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V Ω κ α : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] [Fintype Ω] [Fintype κ] [Fintype α] + {N n l : ℕ} {admissible : (Fin N→α)→Prop} +local instance mabFinDE (n : ℕ) : DecidableEq (Fin n) := Classical.decEq _ +local instance mabPDE : DecidableEq (ℙ K V) := Classical.decEq _ +local instance mabDDE : DecidableEq (ℙ K (Dual K V)) := Classical.decEq _ + +theorem actual_marked_deficit (hd : finrank K V=5) (width : ℝ) (hw : 0≤width) + (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N n admissible) + (ctx : Ω→κ) (hl : l≤n) (a : SlotClass) + (hE : 0(l:ℝ)*Real.log (153*(Nat.card K:ℝ)^4)-entropy (fiber p c))≤ + 39*(B+L+(n:ℝ)*Real.log 800+ + expensiveBound K V*(Real.log cap-Real.log (153*(Nat.card K:ℝ)^4))) := by + let p:=pair S.law ctx S.tuple + have hpi : ∀c x,0

(ctx z,S.tuple z)) (c,x) hx + cases he + exact hinc z hz + have hpc : ∀c x,0

(ctx z,S.tuple z)) (c,x) hx + cases he + exact hcons z hz + have hps : ∀c x,0

(ctx z,S.tuple z)) (c,x) hx + cases he + exact hsupp z hz + have hb:=marking_expected_deficit hd p hpc D cap (Real.log (153*(Nat.card K:ℝ)^4)) + B L hcap hD hps hΔ (by simpa only [p,second_pair] using hent) + (by simpa only [p,first_pair] using hctx) + have hnon : 0 ≤ mean (first (withMessage p markingMessage)) (fun c=> + activeDeficit (fiber (withMessage p markingMessage) c) (unspecified c.2) + (Real.log (153*(Nat.card K:ℝ)^4))) := by + rw [mean] + apply Finset.sum_nonneg + intro c hc + by_cases hp : 0unspecified c.2) (markedCode hd width hw) a) := by + simpa only [p,markedContext_law,eventMass_map_preimage,markedEvent] using hm + apply (div_le_div_of_nonneg_right hb hE'.le).trans + rw [div_le_iff₀ hE'] + have hn := hnon.trans hb + have ht:=mul_le_mul_of_nonneg_left hm' hn + dsimp only [expensiveBound] + nlinarith +end +end SharpRamseyFive.Marking + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {Ω κ α β I : Type} [Fintype Ω] [Fintype κ] [Fintype α] [Fintype β] [Fintype I] + +lemma fiber_pair_source (p : Law Ω) (ctx : Ω→κ) (x : Ω→α) (c : κ) (y : α) + (hc : 0(ctx z,x z)) (c,y) hp + exact ⟨z,hz,congrArg Prod.fst he,congrArg Prod.snd he⟩ + +lemma pair_fiber_domains (p : Law Ω) (ctx : Ω→κ) (x : Ω→I→β) + (D : κ→I→Finset β) (hD : ∀z,0

f (x z))=map (pair p ctx x) (fun z=>(z.1,f z.2)) := by + rw [pair,pair,map_comp] + rfl + +lemma fiber_pair_map (p : Law Ω) (ctx : Ω→κ) (x : Ω→α) (f : α→β) + (c : κ) (hc : 0 < map p ctx c) : + fiber (pair p ctx (fun z=>f (x z))) c=map (fiber (pair p ctx x) c) f := by + have he : pair p ctx (fun z=>f (x z))= + adaptiveLaw (map p ctx) (fun c=>map (fiber (pair p ctx x) c) f) := by + rw [pair_map_tuple,←first_pair p ctx x] + apply Law.ext_mean + intro g + rw [mean_map,mean_adaptive] + simp_rw [mean_map] + have hh:=congrArg (fun p=>mean p (fun z=>g (z.1,f z.2))) (adaptive_reconstruct (pair p ctx x)) + rw [mean_adaptive] at hh + exact hh.symm + rw [he] + exact fiber_adaptive _ _ _ hc + +namespace ContextDescription +variable {n : ℕ} {p : Law Ω} {x : Ω→Fin n→β} {L J : ℝ} +def boundedDomain (C : ContextDescription (κ:=κ) p x L J) (c : κ) (i : Fin n) := + if 0 < map p C.context c then C.domain c i else ∅ +omit [Fintype β] in +lemma boundedDomain_cap (C : ContextDescription (κ:=κ) p x L J) (c : κ) (i : Fin n) : + ((C.boundedDomain c i).card:ℝ)≤Real.exp J := by + by_cases hc : 0 < map p C.context c + · obtain ⟨z,hz,rfl⟩:=map_positive p C.context c hc + simp only [boundedDomain,ite_eq_left hc] + exact Real.le_exp_of_log_le (C.cap z hz i) + · simp only [boundedDomain,ite_eq_right hc,Finset.card_empty,Nat.cast_zero] + exact (Real.exp_pos _).le +omit [Fintype β] in +lemma boundedDomain_contains (C : ContextDescription (κ:=κ) p x L J) : + ∀z,0

by split_ifs; exact p.nonneg a; exact le_rfl) + (Finset.mem_univ z)) + simp + simp only [boundedDomain,ite_eq_left hc] + exact C.contains z hz i +end ContextDescription +end +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/MarkingBudget.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/MarkingBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..c97a9cd30b64c99dd872680c4413b9bbc5925501 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/MarkingBudget.lean @@ -0,0 +1,51 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.Beta + +namespace OAI + +namespace SharpRamseyFive.ParameterHierarchy +open Filter Real +open scoped Topology +noncomputable section + +lemma marking_budget_bound {σ q η k n A Δ E D : ℝ} + (hσ : 1≤σ) (_hq : 0η*Real.log σ) atTop atTop := + Real.tendsto_log_atTop.const_mul_atTop hη + have he : Tendsto (fun σ : ℝ=>c*Real.exp σ) atTop atTop := + Real.tendsto_exp_atTop.const_mul_atTop hc + filter_upwards [ht.eventually_ge_atTop (Real.log 153+2-Real.log c), + he.eventually_ge_atTop (Real.log (2*C))] with σ ht he + intro Ω α β _ _ _ _ N n admissible S hσ hα hN hlen hC + have hs : 0<σ := zero_lt_one.trans_le hσ + have hn : 0 enc z i c t = none)) ≤ ε i) + (b : BinaryTree I) (c : C) (j : Address b) : + (∑ z, μ z * eventMass (tapeLaw Ω p b) (Finset.univ.filter (fun ω => + abortAt Ω M left right (enc z) b ω c j = some true))) ≤ + (∑ z, μ z * eventMass (tapeLaw Ω p b) (Finset.univ.filter (fun ω => ∃ c', + contextAt Ω M left right (enc z) b ω c j = some c' ∧ ¬ready z (label b j) c'))) + ε (label b j) := by + have h := Finset.sum_le_sum (fun z (_ : z∈(Finset.univ : Finset Z)) => + mul_le_mul_of_nonneg_left (reached_abort_bound Ω M left right (enc z) p (ready z) ε hε (hlocal z) b c j) (μ.nonneg z)) + simpa only [mul_add, Finset.sum_add_distrib, ← Finset.sum_mul, μ.sum_one, one_mul] using h + +lemma mean_missing_mass (b : BinaryTree I) (p : Law (Tape Ω b)) (c : C) (j : Address b) : + (∑ z, μ z * eventMass p (Finset.univ.filter (fun ω => + successAt Ω M left right (enc z) b ω c j = none))) = + pathSum b (fun k => ∑ z, μ z * eventMass p (Finset.univ.filter (fun ω => + abortAt Ω M left right (enc z) b ω c k = some true))) j := by + have h (z : Z) := missing_mass_path Ω M left right (enc z) b p c j + have hh := mean_pathSum μ b (fun z k => eventMass p (Finset.univ.filter (fun ω => + abortAt Ω M left right (enc z) b ω c k = some true))) j + calc + _ = ∑ z, μ z * pathSum b (fun k => eventMass p (Finset.univ.filter (fun ω => + abortAt Ω M left right (enc z) b ω c k = some true))) j := by + apply Finset.sum_congr rfl + intro z _ + convert congrArg (fun a : ℝ => μ z*a) (h z) using 1 <;> congr + funext k + congr 1 + ext ω + simp only [Finset.mem_filter] + _ = _ := hh + +lemma mean_missing_mass_le (b : BinaryTree I) (p : Law (Tape Ω b)) (c : C) + (B : Address b → ℝ) + (h : ∀ k, (∑ z, μ z*eventMass p (Finset.univ.filter (fun ω => + abortAt Ω M left right (enc z) b ω c k = some true))) ≤ B k) + (j : Address b) : + (∑ z, μ z*eventMass p (Finset.univ.filter (fun ω => + successAt Ω M left right (enc z) b ω c j = none))) ≤ pathSum b B j := by + rw [mean_missing_mass] + exact pathSum_mono b _ _ h j +end +end SharpRamseyFive.TreeCodec + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/MessageCounting.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/MessageCounting.lean new file mode 100644 index 0000000000000000000000000000000000000000..139402285340a7e6237305c27c5ee541c4a2ffaf --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/MessageCounting.lean @@ -0,0 +1,65 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.TreeWeights + +namespace OAI + +namespace SharpRamseyFive.MessageWeights +open FiniteEntropy +open scoped Classical BigOperators +universe u +variable {A : Type u} [Fintype A] +lemma card_le_exp (c : A→ℝ) (hc : (∑a,Real.exp (-c a))≤1) + (S : Finset A) (B : ℝ) (hS : ∀a∈S,c a≤B) : (S.card:ℝ)≤Real.exp B := by + have hs : (S.card:ℝ)*Real.exp (-B)≤1 := calc + _ = ∑a∈S,Real.exp (-B) := by simp + _ ≤ ∑a∈S,Real.exp (-c a) := Finset.sum_le_sum (fun a ha=>Real.exp_le_exp.mpr (neg_le_neg (hS a ha))) + _ ≤ ∑a,Real.exp (-c a) := Finset.sum_le_sum_of_subset_of_nonneg (Finset.subset_univ _) + (fun a _ _=>(Real.exp_pos _).le) + _ ≤ 1 := hc + have h := mul_le_mul_of_nonneg_right hs (Real.exp_pos B).le + simpa only [mul_assoc,←Real.exp_add,neg_add_cancel,Real.exp_zero,mul_one,one_mul] using h + +lemma entropy_le_cost (p : Law A) (c : A→ℝ) (hc : (∑a,Real.exp (-c a))≤1) : + entropy p≤∑a,p a*c a := by + have hh := entropy_le_cross_subprob p (fun a=>Real.exp (-c a)) + (fun _=>Real.exp_pos _) hc + simpa only [Real.log_exp,mul_neg,Finset.sum_neg_distrib,neg_neg] using hh +lemma entropy_le_bound (p : Law A) (c : A→ℝ) (hc : (∑a,Real.exp (-c a))≤1) + (B : ℝ) (hB : ∀a,0

by + by_cases hp : p a=0 + · simp [hp] + · exact mul_le_mul_of_nonneg_left (hB a (lt_of_le_of_ne (p.nonneg _) (Ne.symm hp))) (p.nonneg a)) + _ = B := by rw [←Finset.sum_mul,p.sum_one,one_mul] +lemma entropy_map_le_bound {J : Type*} [Fintype J] (p : Law J) (e : J→A) + (c : A→ℝ) (hc : (∑a,Real.exp (-c a))≤1) (B : ℝ) + (hb : ∀j,c (e j)≤B) : entropy (map p e)≤B := by + apply (entropy_le_cost (map p e) c hc).trans + rw [sum_map] + calc + _ ≤ ∑j,p j*B := Finset.sum_le_sum (fun j _=>mul_le_mul_of_nonneg_left (hb j) (p.nonneg j)) + _ = B := by rw [←Finset.sum_mul,p.sum_one,one_mul] +end SharpRamseyFive.MessageWeights +namespace SharpRamseyFive.TreeCodec +open BinaryTree MessageWeights +open scoped Classical BigOperators +universe u v w z +variable {A : Type u} {C : Type v} [Fintype C] + (Ω : A→C→Type w) (M : ∀a c,Ω a c→Type z) + (left right : ∀a c t,M a c t→C) +omit [Fintype C] in +lemma slotCost_le_original (lc : ∀a c t,M a c t→ℝ) + (b : BinaryTree A) (ω : Tape Ω b) (c : C) (m : Message Ω M left right b ω c) : + slotCost Ω M left right lc b ω c m≤cost Ω M left right lc b ω c m+ + (2*(b.numNodes:ℝ)+1)*Real.log 2 := by + have hn : ((retained Ω M left right b ω c m).numNodes:ℝ)≤b.numNodes := by + exact_mod_cast retained_nodes_le Ω M left right b ω c m + have hh := mul_le_mul_of_nonneg_right (show 2*((retained Ω M left right b ω c m).numNodes:ℝ)+1≤2*(b.numNodes:ℝ)+1 by linarith) + (Real.log_nonneg (by norm_num : (1:ℝ)≤2)) + have hl := slotCost_le Ω M left right lc b ω c m + linarith only [hl,hh] +end SharpRamseyFive.TreeCodec + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/MessageWeights.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/MessageWeights.lean new file mode 100644 index 0000000000000000000000000000000000000000..71bbfc90c699e93705ddf33003e642896c7cd64d --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/MessageWeights.lean @@ -0,0 +1,46 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.MessageWeights +open scoped BigOperators +universe u v + +lemma log_card_weight (A : Type u) [Fintype A] : + (∑_a : A,Real.exp (-Real.log (Fintype.card A:ℝ)))≤1 := by + simp only [Finset.sum_const,Finset.card_univ,nsmul_eq_mul] + by_cases h : Fintype.card A=0 + · simp [h] + · have hp : (0:ℝ)Classical.choice inferInstance + · exact fun _ _=>Classical.choice inferInstance + · exact ⟨0,by omega⟩ + · exact fun _=>⟨0,by omega⟩ + · exact fun _=>⟨0,by omega⟩ + · exact fun _=>⟨0,by omega⟩ + +lemma card_profile (H J : ℕ) : Nat.card (ListProfile H J)≤(H+1)^2 := by + have h := Nat.card_le_card_of_injective (fun z : ListProfile H J=>z.val) Subtype.val_injective + simpa only [ListProfile,Nat.card_prod,Nat.card_fin,pow_two] using h + +theorem card_TrainingCode {V : Type*} [Fintype V] [Nonempty V] (H J B : ℕ) : + Nat.card (TrainingCode V H J B)≤ + (H+1)^2*Nat.card V^(10*H)*(B+1)^(1+2*H+J) := by + change Nat.card ((r : ListProfile H J) × TwoListCode V r.val.1.val r.val.2.val B)≤_ + rw [Nat.card_sigma] + have hV : 1≤Nat.card V := Nat.card_pos + calc + _ ≤ ∑ _r : ListProfile H J,Nat.card V^(10*H)*(B+1)^(1+2*H+J) := by + apply Finset.sum_le_sum + intro r _ + rw [card_TwoListCode] + have hh : r.val.1.val≤H := Nat.le_of_lt_succ r.val.1.isLt + have hp : r.val.2.val≤H := Nat.le_of_lt_succ r.val.2.isLt + exact Nat.mul_le_mul (Nat.pow_le_pow_right hV (by omega)) + (Nat.pow_le_pow_right (by omega : 1≤B+1) (by have := r.prop;omega)) + _ = Nat.card (ListProfile H J)*(Nat.card V^(10*H)*(B+1)^(1+2*H+J)) := by simp [Nat.card_eq_fintype_card] + _ ≤ _ := by + rw [mul_assoc] + exact Nat.mul_le_mul_right _ (card_profile H J) + +theorem log_card_TrainingCode {V : Type*} [Fintype V] [Nonempty V] (H J B : ℕ) : + Real.log (Nat.card (TrainingCode V H J B))≤ + 2*Real.log (H+1)+(10*(H:ℝ))*Real.log (Nat.card V)+ + (1+2*(H:ℝ)+J)*Real.log (B+1) := by + have hV : (0:ℝ) a i≤x v).card:ℝ)*a i^K := by + have hp (v : α) : x v^K≤∑ i∈T,if a i≤x v then (2*a i)^K else 0 := by + by_cases hv : 0 if a j≤x v then (2*a j)^K else 0) + (fun j hj => by split_ifs <;> positivity [ha j hj]) hi + simpa only [ite_eq_left hix] using hs + · have hz : x v=0 := le_antisymm (le_of_not_gt hv) (hx v) + rw [hz,zero_pow hK] + apply Finset.sum_nonneg + intro i hi + split_ifs <;> positivity [ha i hi] + apply (Finset.sum_le_sum (fun v (_ : v∈Finset.univ) => hp v)).trans_eq + rw [Finset.sum_comm,Finset.mul_sum] + apply Finset.sum_congr rfl + intro i hi + have he : (∑ v,if a i≤x v then (2*a i)^K else 0)= + ((Finset.univ.filter fun v => a i≤x v).card:ℝ)*(2*a i)^K := by + rw [←Finset.sum_filter] + simp only [Finset.sum_const,nsmul_eq_mul] + rw [he,mul_pow] + ring + +theorem moment_quadratic_tail (x : α → ℝ) (a C : ι → ℝ) (T : Finset ι) + (K : ℕ) (hK : 2≤K) (hx : ∀ v,0≤x v) (ha : ∀ i∈T,0≤a i) + (hcover : ∀ v,0 a i≤x v).card:ℝ)*a i^2≤C i) : + (∑ v,x v^K)≤2^K*∑ i∈T,C i*a i^(K-2) := by + apply (moment_weighted_cover x a T K (by omega) hx ha hcover).trans + apply mul_le_mul_of_nonneg_left _ (by positivity) + apply Finset.sum_le_sum + intro i hi + have he : K=2+(K-2) := by omega + calc + _ = (((Finset.univ.filter fun v => a i≤x v).card:ℝ)*a i^2)*a i^(K-2) := by + have hp : a i^K=a i^2*a i^(K-2) := by rw [←pow_add,←he] + rw [hp] + ring + _ ≤ C i*a i^(K-2) := mul_le_mul_of_nonneg_right (hcount i hi) (pow_nonneg (ha i hi) _) + +end SharpRamseyFive.DyadicMoments + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/MultiplicityBudgets.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/MultiplicityBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..d02a3872e5f7ef9ac290331dfd06742ed299ad51 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/MultiplicityBudgets.lean @@ -0,0 +1,58 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.RichHyperplaneVariance + +namespace OAI + +namespace SharpRamseyFive.RichPlaneGeometry +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.RichPlaneOverlap +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + +theorem multiplicity_budgets + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 3) + (X : Finset (ℙ K V)) (M Kp u : ℕ) (hMpos : 0 < M) + (hM : ∀ A ∈ F, M ≤ (X.filter fun x => x.submodule ≤ A).card) + (hpointcap : ∀ H : Submodule K V, finrank K H = 4 → + (X.filter fun x => x.submodule ≤ H).card ≤ Kp) + (hlineLarge : 2*(Nat.card K+1) ≤ M) + (hlineNum : 2*X.card ≤ u*M) + (hmean : 2*((Q (Nat.card K) 2:ℝ)/Q (Nat.card K) 3)*Kp ≤ M) + (hhyperNum : 4*(Nat.card K:ℝ)^2*Kp ≤ (u:ℝ)*M^2) : + (∀ L : Submodule K V, finrank K L = 2 → (F.filter fun A => L ≤ A).card ≤ u) ∧ + (∀ H : Submodule K V, finrank K H = 4 → (F.filter fun A => A ≤ H).card ≤ u) := by + constructor + · intro L hL + have hh := (rich_planes_through_line_twice F hF X M hM hlineLarge L hL).trans hlineNum + exact Nat.le_of_mul_le_mul_right hh hMpos + · intro H hH + have hcap : ((X.filter fun x => x.submodule ≤ H).card:ℝ) ≤ Kp := by exact_mod_cast hpointcap H hH + have hμ : 2*((Q (Nat.card K) 2:ℝ)/Q (Nat.card K) 3)* + (X.filter fun x => x.submodule ≤ H).card ≤ M := + (mul_le_mul_of_nonneg_left hcap (by positivity)).trans hmean + have hv := rich_planes_inside_hyperplane H hH F hF X M hM hμ + have hnum := mul_le_mul_of_nonneg_left hcap (by positivity : 0 ≤ 4*(Nat.card K:ℝ)^2) + have hc : ((F.filter fun A => A ≤ H).card:ℝ)*M^2 ≤ (u:ℝ)*M^2 := + hv.trans (hnum.trans hhyperNum) + have hpos : (0:ℝ) < (M:ℝ)^2 := by positivity + exact_mod_cast (mul_le_mul_iff_left₀ hpos).mp hc + +theorem capped_rich_plane_count + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 3) + (X : Finset (ℙ K V)) (M Kp u : ℕ) (hMpos : 0 < M) + (hM : ∀ A ∈ F, M ≤ (X.filter fun x => x.submodule ≤ A).card) + (hpointcap : ∀ H : Submodule K V, finrank K H = 4 → + (X.filter fun x => x.submodule ≤ H).card ≤ Kp) + (hlineLarge : 2*(Nat.card K+1) ≤ M) + (hlineNum : 2*X.card ≤ u*M) + (hmean : 2*((Q (Nat.card K) 2:ℝ)/Q (Nat.card K) 3)*Kp ≤ M) + (hhyperNum : 4*(Nat.card K:ℝ)^2*Kp ≤ (u:ℝ)*M^2) + (hlarge : 64*X.card ≤ M^2) : + (F.card:ℝ)*M ≤ 16*X.card*(2*(u:ℝ)+1) := by + obtain ⟨hl,hh⟩ := multiplicity_budgets F hF X M Kp u hMpos hM hpointcap + hlineLarge hlineNum hmean hhyperNum + exact rich_plane_count F hF u hl hh X M hM hlarge + +end SharpRamseyFive.RichPlaneGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/OptionComposition.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/OptionComposition.lean new file mode 100644 index 0000000000000000000000000000000000000000..7e0e7d4fd67c3a774c4edbfdc923d27fc791b286 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/OptionComposition.lean @@ -0,0 +1,45 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.SequentialLaw + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {α β : Type*} [Fintype α] [Fintype β] + +noncomputable def optionCompose (p : Law (Option α)) (next : Option α→Law (Option β)) : + Law (Option β) := + map (adaptiveLaw p next) (fun ab=>ab.1.bind (fun _=>ab.2)) + +lemma optionCompose_failure (p : Law (Option α)) (next : Option α→Law (Option β)) + (ε₁ ε₂ : ℝ) (hε₂ : 0≤ε₂) (hp : p none≤ε₁) + (hn : ∀a,0

ab.1=none ∨ ab.2=none) := by + unfold optionCompose map eventMass + rw [Finset.sum_filter] + apply Finset.sum_congr rfl + intro ab _ + rcases ab with ⟨a,b⟩ + cases a <;> cases b <;> simp + rw [he] + exact adaptive_option_failure p next ε₁ ε₂ hε₂ hp hn + +lemma optionCompose_positive (p : Law (Option α)) (next : Option α→Law (Option β)) + (b : β) (hb : 0 simp at he + | some a => + have he' : b'=some b := by simpa using he + subst b' + change 0

P (z.map Prod.fst))≤ + eventMass p (Finset.univ.filter fun z=>P z.1) := by + rw [eventMass_map_filter] + apply eventMass_filter_mono + rintro ⟨a,b⟩ hp + cases a <;> cases b <;> simp_all [pairOptions] + +lemma pairOptions_event_right (p : Law (Option α×Option β)) (P : Option β→Prop) (hn : ¬P none) : + eventMass (map p pairOptions) (Finset.univ.filter fun z=>P (z.map Prod.snd))≤ + eventMass p (Finset.univ.filter fun z=>P z.2) := by + rw [eventMass_map_filter] + apply eventMass_filter_mono + rintro ⟨a,b⟩ hp + cases a <;> cases b <;> simp_all [pairOptions] + +lemma optionCompose_event_le (p : Law (Option α)) (next : Option α→Law (Option β)) + (P : Option β→Prop) (hn : ¬P none) (B : ℝ) (hB : 0≤B) + (h : ∀a,0

P (a.bind fun _=>b)) := by + rw [optionCompose,eventMass_map_filter] + simp only [eventMass,Finset.sum_filter,Fintype.sum_prod_type,adaptiveLaw, + Finset.mul_sum,mul_ite,mul_zero] + rw [he] + calc + _≤∑a,p a*B := by + apply Finset.sum_le_sum + intro a _ + by_cases hz : p a=0 + · simp only [hz,zero_mul,le_refl] + apply mul_le_mul_of_nonneg_left _ (p.nonneg a) + cases a with + | none => simpa [eventMass,hn] using hB + | some a => exact h a (lt_of_le_of_ne (p.nonneg _) (Ne.symm hz)) + _=B := by rw [←Finset.sum_mul,p.sum_one,one_mul] +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/OrderedExtraction.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/OrderedExtraction.lean new file mode 100644 index 0000000000000000000000000000000000000000..f31a92e8a33ca948e0e63ca0a5221523e9823474 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/OrderedExtraction.lean @@ -0,0 +1,142 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.ReverseCap +import OAI.Combinatorics.RamseyFive.Entropy.BlockSelected +import OAI.Combinatorics.RamseyFive.Streams.SelectedTuple + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {α β κ : Type*} [Fintype α] [Fintype β] [Fintype κ] + +def retainedIndices {n l : ℕ} (hl : l≤n) (S : Finset (Fin n)) : Fin l ↪o Fin n := + if h : l≤S.card then (Fin.castLEOrderEmb h).trans (S.orderEmbOfFin rfl) + else Fin.castLEOrderEmb hl + +lemma retainedIndices_mem {n l : ℕ} (hl : l≤n) (S : Finset (Fin n)) + (hs : l≤S.card) (i : Fin l) : retainedIndices hl S i∈S := by + simp only [retainedIndices,dite_eq_left hs,RelEmbedding.coe_trans,Function.comp_apply] + exact S.orderEmbOfFin_mem rfl _ + +def retainedTuple {n l : ℕ} (hl : l≤n) (x : Fin n→β) (S : Finset (Fin n)) : Fin l→β := + x ∘ retainedIndices hl S + +lemma retainedTuple_occurs {n l : ℕ} (hl : l≤n) (x : Fin n→β) (S : Finset (Fin n)) : + x∈SelectedTuple.occurrences (retainedTuple hl x S) := by + let e := retainedIndices hl S + let I : Finset (Fin n) := Finset.univ.map e.toEmbedding + have hI : I.card=l := by simp [I] + have he : I.orderEmbOfFin hI=e := by + symm + apply Finset.orderEmbOfFin_unique' hI + intro j + simp [I] + apply Finset.mem_biUnion.mpr + refine ⟨⟨I,hI⟩,Finset.mem_univ _,?_⟩ + apply Finset.mem_filter.mpr + exact ⟨Finset.mem_univ _,fun j=>by rw [he];rfl⟩ + +theorem extraction_probability {n l : ℕ} (p : Law α) (S : α→Finset (Fin n)) + (hl : l((S a)ᶜ.card:ℝ))≤((n:ℝ)-l)/10) : + (9:ℝ)/10≤eventMass p (Finset.univ.filter fun a=>l≤(S a).card) := by + have hz : 0<(n:ℝ)-l := sub_pos.mpr (by exact_mod_cast hl) + have h := markov_success p (fun a=>((S a)ᶜ.card:ℝ)) + (fun _=>Nat.cast_nonneg _) ((n:ℝ)-l) hz hm + have he : (Finset.univ.filter fun a=>((S a)ᶜ.card:ℝ)≤(n:ℝ)-l)= + (Finset.univ.filter fun a=>l≤(S a).card) := by + ext a + simp only [Finset.mem_filter,Finset.mem_univ,true_and,Finset.card_compl,Fintype.card_fin] + have hs : (S a).card≤n := by simpa using Finset.card_le_univ (S a) + rw [Nat.cast_sub hs] + constructor + · intro hh + have hh' : (l:ℝ)≤(S a).card := by linarith + exact_mod_cast hh' + · intro hh + have hh' : (l:ℝ)≤(S a).card := by exact_mod_cast hh + linarith + rwa [he] at h + +theorem extracted_domains {n l : ℕ} (hl : l≤n) (p : Law α) + (x : α→Fin n→β) (S : α→Finset (Fin n)) (ctx : α→κ) (D : κ→Finset β) + (hdom : ∀ a,0

l≤(S a).card)) : + ∀ z,0< map (conditionOn p _ hE) (fun a=>(ctx a,retainedTuple hl (x a) (S a))) z → + ∀ i,z.2 i∈D z.1 := by + intro z hz i + obtain ⟨a,ha,rfl⟩:=map_positive _ _ z hz + obtain ⟨he,hp⟩:=conditionOn_positive p _ hE a ha + exact hdom a hp _ (retainedIndices_mem hl _ (Finset.mem_filter.mp he).2 i) + +theorem context_tuple_entropy {ι : Type*} [Fintype ι] (p : Law (κ×(ι→β))) (D : κ→Finset β) + (L M : ℝ) (hctx : entropy (first p)≤L) + (hs : ∀ z,0

D c) := by + intro x hx i + exact hs (c,x) (by rw [mass_eq_first_mul_fiber];exact mul_pos hz hx) i + have ht:=totalCorrelation_nonneg (fiber p c) + have hm : (∑ i:ι,entropy (map (fiber p c) (fun x=>x i)))≤Fintype.card ι*M := by + calc + _ ≤ ∑ i:ι,M := Finset.sum_le_sum fun i _=>hd.entropy_cap M (fun _=>hc c hz) i + _ = _ := by simp + dsimp only [totalCorrelation] at ht + linarith + · have hzero : first p c=0 := le_antisymm (le_of_not_gt hz) ((first p).nonneg c) + simp [hzero] + _ = _ := by rw [←Finset.sum_mul,(first p).sum_one,one_mul] + have hh := entropy_map_le p Prod.snd + have hmap : map p Prod.snd=second p := by + ext b + simp only [map,second,Fintype.sum_prod_type] + apply Finset.sum_congr rfl + intro c _ + rw [Finset.sum_eq_single b] + · rw [ite_eq_left rfl] + · intro a _ ha + rw [ite_eq_right ha] + · intro hb + exact (hb (Finset.mem_univ b)).elim + rw [hmap] at hh + exact hh.trans he + +local instance extractedFinDecEq (n : ℕ) : DecidableEq (Fin n) := Classical.decEq _ + +theorem extracted_entropy {n l : ℕ} (hl : l≤n) (p : Law α) + (x : α→Fin n→β) (S : α→Finset (Fin n)) (ctx : α→κ) (D : κ→Finset β) + (hdom : ∀ a,0

l≤(S a).card)) + (L M : ℝ) + (hctx : entropy (map (conditionOn p _ hE) ctx)≤L) + (hc : ∀ c,Real.log (D c).card≤M) : + entropy (map (conditionOn p _ hE) (fun a=>retainedTuple hl (x a) (S a)))≤L+l*M := by + have hh := context_tuple_entropy (pair (conditionOn p _ hE) ctx + (fun a=>retainedTuple hl (x a) (S a))) D L M + (by simpa only [first_pair] using hctx) + (extracted_domains hl p x S ctx D hdom hE) (fun c _=>hc c) + simpa only [second_pair,Fintype.card_fin] using hh + +omit [Fintype β] in +lemma log_card_le {N : ℕ} (hN : 1≤N) (S : Finset β) (hS : S.card≤N) : + Real.log S.card≤Real.log N := by + by_cases hz : S.card=0 + · rw [hz,Nat.cast_zero,Real.log_zero] + exact Real.log_nonneg (by exact_mod_cast hN) + · exact Real.log_le_log (by exact_mod_cast Nat.pos_of_ne_zero hz) (by exact_mod_cast hS) + +end +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/OrderedReciprocalLaw.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/OrderedReciprocalLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..2fbe994243496c725ca4a02e6f4e3cfc3d6d4266 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/OrderedReciprocalLaw.lean @@ -0,0 +1,152 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Trees.Windows +import OAI.Combinatorics.RamseyFive.Marking.ReciprocalLowConflict + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {I β : Type} [Fintype I] [Fintype β] {n : ℕ} + +def orderedLaw (p : Law (I→β)) (e : I≃Fin n) : Law (Fin n→β) := + map p (fun x i=>x (e.symm i)) +lemma orderedLaw_marginal (p : Law (I→β)) (e : I≃Fin n) (i : I) : + map (orderedLaw p e) (fun x=>x (e i))=map p (fun x=>x i) := by + rw [orderedLaw,map_comp] + simp only [Function.comp_def,Equiv.symm_apply_apply] +lemma orderedLaw_pair (p : Law (I→β)) (e : I≃Fin n) (i j : I) : + pair (orderedLaw p e) (fun x=>x (e i)) (fun x=>x (e j))= + pair p (fun x=>x i) (fun x=>x j) := by + rw [pair,orderedLaw,map_comp] + simp only [Function.comp_def,Equiv.symm_apply_apply,pair] +lemma orderedLaw_positive (p : Law (I→β)) (e : I≃Fin n) + (x : Fin n→β) (hx : 0x (e.symm i)) x hx + exact ⟨y,hy,fun i=>by simp only [Equiv.symm_apply_apply]⟩ +end +end SharpRamseyFive.FiniteEntropy +namespace SharpRamseyFive.Windows +noncomputable def slotEquiv (w r : ℕ) : Slots w r≃Fin (w*(4*r)) := + Equiv.ofBijective slotEmbedding (slotEmbedding_bijective w r) +lemma slotEquiv_apply {w r : ℕ} (i : Slots w r) : slotEquiv w r i=slotEmbedding i := rfl +end SharpRamseyFive.Windows +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open SharpRamseyFive.CoreGeometry SharpRamseyFive.LowConflict +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V I : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype I] {n : ℕ} + +def orderedCollision (p : Law (I→FlagPair K V)) (e : I≃Fin n) (u : I→ℝ) (s : ℝ) + (i j : I) : ℝ := + let q:=orderedLaw p e + let good:=reciprocalGood q (u∘e.symm) s + tupleCollision q Projectivization.rep Projectivization.rep good (e i) (e j)+ + tupleCollision q Projectivization.rep Projectivization.rep good (e j) (e i) +omit [Finite K] [FiniteDimensional K V] in +lemma orderedCollision_nonneg (p : Law (I→FlagPair K V)) (e : I≃Fin n) + (u : I→ℝ) (s : ℝ) (i j : I) : 0≤orderedCollision p e u s i j := + add_nonneg (tupleCollision_nonneg ..) (tupleCollision_nonneg ..) +omit [Finite K] [FiniteDimensional K V] in +lemma orderedCollision_symm (p : Law (I→FlagPair K V)) (e : I≃Fin n) + (u : I→ℝ) (s : ℝ) (i j : I) : orderedCollision p e u s i j=orderedCollision p e u s j i := + add_comm _ _ +omit [Finite K] [FiniteDimensional K V] in +lemma orderedCollision_sum (p : Law (I→FlagPair K V)) (e : I≃Fin n) + (u : I→ℝ) (s : ℝ) : + (∑ i,∑ j,orderedCollision p e u s i j)= + 2*∑ i,∑ j,tupleCollision (orderedLaw p e) Projectivization.rep Projectivization.rep + (reciprocalGood (orderedLaw p e) (u∘e.symm) s) i j := by + let c:=tupleCollision (orderedLaw p e) Projectivization.rep Projectivization.rep + (reciprocalGood (orderedLaw p e) (u∘e.symm) s) + change (∑ i,∑ j,(c (e i) (e j)+c (e j) (e i)))=2*∑ i,∑ j,c i j + have h1 : (∑ i,∑ j,c (e i) (e j))=∑ i,∑ j,c i j := by + calc + _ = ∑ i,∑ j,c (e i) j := Finset.sum_congr rfl (fun i _=>e.sum_comp (c (e i))) + _ = _ := e.sum_comp (fun i=>∑ j,c i j) + have h2 : (∑ i,∑ j,c (e j) (e i))=∑ i,∑ j,c i j := by + rw [Finset.sum_comm] + exact h1 + simp only [Finset.sum_add_distrib,h1,h2] + ring + +omit [Finite K] in +lemma ordered_reciprocal_low_conflict (hdim : finrank K V=5) + (p : Law (I→FlagPair K V)) (e : I≃Fin n) (u : I→ℝ) (s : ℝ) + (hcons : ∀ x,0

a∈goodFirstEndpoints (map p (fun x=>x i)) + (32*Real.exp (5*Real.log (Nat.card K)-u i)) ((Nat.card K:ℝ)^4) s ∧ + b∈goodFirstEndpoints (swap (map p (fun x=>x j))) (32*Real.exp (u j)) ((Nat.card K:ℝ)^4) s ∧ Incident a b) + (first (map p (fun x=>x i))) (second (map p (fun x=>x j)))≤ + 80004*(entropy (map p (fun x=>x i))+entropy (map p (fun x=>x j))- + entropy (pair p (fun x=>x i) (fun x=>x j))+orderedCollision p e u s i j) := by + have hc : ∀ x,0if InRectangle S (x i).1.rep (x i).2.rep then (1:ℝ) else 0) + rw [←heq] + exact hocc y hy S + have h:=reciprocal_closed_collisions hdim (orderedLaw p e) (u∘e.symm) s width M b + hs (fun i=>hband (e.symm i)) heven hsmall hi ho + rw [orderedCollision_sum] + linarith + +lemma ordered_open_collision_zero (hdim : finrank K V=5) + (p : Law (I→FlagPair K V)) (e : I≃Fin n) (u : I→ℝ) (s width : ℝ) (b : Fin 7) + (hs : 2 ≤ s) (hband : ∀ i,BandCondition (Real.log (Nat.card K)) width (u i) b) + (hodd : b.val%2≠0) (hwide : Real.log 32+3*shband (e.symm i)) hodd hwide + dsimp only [orderedCollision] + rw [h,h,add_zero] + +omit [Finite K] [FiniteDimensional K V] in +lemma ordered_collision_subset (p : Law (I→FlagPair K V)) (e : I≃Fin n) + (u : I→ℝ) (s : ℝ) (S : Finset I) : + (∑ i∈S,∑ j∈S,orderedCollision p e u s i j)≤∑ i,∑ j,orderedCollision p e u s i j := by + apply (Finset.sum_le_sum (fun i hi=>Finset.sum_le_univ_sum_of_nonneg + (fun j=>orderedCollision_nonneg p e u s i j))).trans + exact Finset.sum_le_univ_sum_of_nonneg + (fun i=>Finset.sum_nonneg fun j _=>orderedCollision_nonneg p e u s i j) + +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/OrderedRetention.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/OrderedRetention.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7d4d4ef370b1ef44dacabf1c25b2c4f99d1dec6 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/OrderedRetention.lean @@ -0,0 +1,104 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Trees.TreeOrder +import OAI.Combinatorics.RamseyFive.Geometry.FiniteTreeFailure + +namespace OAI + +namespace SharpRamseyFive.TreeCodec +open BinaryTree FiniteEntropy +open scoped Classical BigOperators +variable {I : Type*} [Preorder I] + +lemma directed_failure_budget (tree : BinaryTree I) (hord : Ordered tree) + (ρ : I → I → ℝ) (ε C Q E : ℝ) (hε : 0 ≤ ε) (hC : 0 ≤ C) (hQ : 0 ≤ Q) (hE : 0 ≤ E) + (hρ : ∀ i j,i ≤ j → ρ i j ≤ ε) (j : Address tree) : + pathSum tree (fun k=>10*pathBudget (fun i=>C*ρ (label tree k) i) (fun _=>0) tree k+ + 10*pathBudget (fun _=>0) (fun i=>C*ρ i (label tree k)) tree k+ + Q*ρ (label tree k) (label tree k)+E) j ≤ + tree.height*(20*tree.height*C*ε+Q*ε+E) := by + have hcap : ∀ k : Address tree, + 10*pathBudget (fun i=>C*ρ (label tree k) i) (fun _=>0) tree k+ + 10*pathBudget (fun _=>0) (fun i=>C*ρ i (label tree k)) tree k+ + Q*ρ (label tree k) (label tree k)+E ≤ 20*tree.height*C*ε+Q*ε+E := by + intro k + have hh:=mul_nonneg hC hε + have h1:=ordered_pathBudget_bound tree hord k (fun i=>C*ρ (label tree k) i) + (fun _=>0) (C*ε) hh + (fun i hi=>mul_le_mul_of_nonneg_left (hρ _ _ hi) hC) (fun _ _=>hh) + have h2:=ordered_pathBudget_bound tree hord k (fun _=>0) + (fun i=>C*ρ i (label tree k)) (C*ε) hh + (fun _ _=>hh) (fun i hi=>mul_le_mul_of_nonneg_left (hρ _ _ hi) hC) + have h3:=mul_le_mul_of_nonneg_left (hρ (label tree k) (label tree k) le_rfl) hQ + linarith + exact (pathSum_mono tree _ _ hcap j).trans (pathSum_const_le_height tree j _ (by positivity)) + +lemma directed_target_budget (tree : BinaryTree I) (hord : Ordered tree) + (gA gB : I → ℝ) (ε C : ℝ) (hε : 0 ≤ ε) (hC : 0 ≤ C) (j : Address tree) + (hA : ∀ i,label tree j ≤ i → gA i ≤ ε) (hB : ∀ i,i ≤ label tree j → gB i ≤ ε) : + 10*pathBudget (fun i=>C*gA i) (fun _=>0) tree j+ + 10*pathBudget (fun _=>0) (fun i=>C*gB i) tree j+ + C*gA (label tree j)+C*gB (label tree j) ≤ (20*tree.height+2)*C*ε := by + have hh:=mul_nonneg hC hε + have h1:=ordered_pathBudget_bound tree hord j (fun i=>C*gA i) (fun _=>0) (C*ε) hh + (fun i hi=>mul_le_mul_of_nonneg_left (hA i hi) hC) (fun _ _=>hh) + have h2:=ordered_pathBudget_bound tree hord j (fun _=>0) (fun i=>C*gB i) (C*ε) hh + (fun _ _=>hh) (fun i hi=>mul_le_mul_of_nonneg_left (hB i hi) hC) + have h3:=mul_le_mul_of_nonneg_left (hA _ le_rfl) hC + have h4:=mul_le_mul_of_nonneg_left (hB _ le_rfl) hC + linarith +end SharpRamseyFive.TreeCodec + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization BigOperators NNReal Topology +noncomputable section +local instance (priority := high) orderedRetentionPropDecidable (P : Prop) : Decidable P := Classical.propDecidable P + +theorem eventually_ordered_tree_missing {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0 ≤ Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q₀ : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q₀] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))], + ∀ (hd : finrank K V=5) (hq3 : 3 ≤ Nat.card K) (I : Type) [Fintype I] [DecidableEq I] [Preorder I] + (A B : I → Type) [∀ i, Fintype (A i)] [∀ i, Fintype (B i)] + (μ : ∀ i, Law (A i)) (ν : ∀ i, Law (B i)) + (X : ∀ i, A i → Finset (ℙ K V)) (Y : ∀ i, B i → Finset (ℙ K (Dual K V))) + (hX : ∀ i a, (X i a).Nonempty) (hY : ∀ i b, (Y i b).Nonempty) + (p : I → Law (ℙ K V)) (q : I → Law (ℙ K (Dual K V))) + (F ε : ℝ) (hF : 0 ≤ F) (hε : 0 ≤ ε) + (hμ : ∀ i a, (∑ s, μ i s * uniformWeight (X i s) a) ≤ F*p i a) + (hν : ∀ i b, (∑ t, ν i t * uniformWeight (Y i t) b) ≤ F*q i b) + (hsparse : ∀ i j,i ≤ j → relationMass Incident (p i) (q j) ≤ ε) + (hσ : 1 ≤ σ) (hq : Real.exp σ=Nat.card K), + Nat.card K=q₀ → Range η σ D R → (L₀:ℝ)=L η σ D → + 0 ≤ b → b ≤ Cb*D*σ^(6*beta η) → + (∀ i a d, (Nat.card K:ℝ)^5*Real.exp (-b) ≤ ((X i a).card:ℝ)*(Y i d).card) → + let f := fun C : PivotContext K V => + fourFinitePredictor hd σ C.1 C.2 (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun C : PivotContext K V => + fourFinitePredictor (K:=K) (V:=Dual K V) (by simpa using hd) σ C.2 + (C.1.map bidualPoint.toEmbedding) (P η σ D R) (σ^(-800*beta η)) R L₀ + ∀ (tree : BinaryTree I),Ordered tree → ∀ (j : Address tree), + (∑ z, originalLevelLaw μ ν z * eventMass (orientedPivotTreeLaw f r tree) + (Finset.univ.filter (fun ω => + orientedPivotSuccessAt f r σ hσ hq hd.le (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) + (fun i => hX i _) (fun i => hY i _) (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) tree ω (Finset.univ,Finset.univ) j = none))) ≤ + tree.height*(20*tree.height*(50*(Nat.card K:ℝ)/(9*((9/100000)*(9/10))))*F^2*ε+ + ((Nat.card K:ℝ)/(σ^(-1000*beta η)))*F^2*ε+5*Real.exp (-(Nat.card K:ℝ))) := by + filter_upwards [eventually_actual_tree_missing hη hη' Cb hCb] with σ hh + intro D b R L₀ q₀ K V _ _ _ _ _ _ _ _ _ hd hq3 I _ _ _ A B _ _ μ ν X Y hX hY p q F ε hF hε hμ hν hsparse hσ hq hcard hr hL hb hbhi hprod + dsimp only + intro tree hord j + have h:=hh D b R L₀ q₀ K V hd hq3 I A B μ ν X Y hX hY p q F hF hμ hν hσ hq hcard hr hL hb hbhi hprod tree j + apply h.trans + have hn:=directed_failure_budget tree hord (fun i j=>relationMass Incident (p i) (q j)) ε + ((50*(Nat.card K:ℝ)/(9*((9/100000)*(9/10))))*F^2) + (((Nat.card K:ℝ)/(σ^(-1000*beta η)))*F^2) + (5*Real.exp (-(Nat.card K:ℝ))) hε (by positivity) (by positivity) (by positivity) hsparse j + simpa only [mul_assoc] using hn +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/OrderedWindowVariation.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/OrderedWindowVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..9593de0a565a72e47c32b481fbd9e7eef870cc24 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/OrderedWindowVariation.lean @@ -0,0 +1,67 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section + +theorem ordered_window_drop_sum {n : ℕ} (e l : Fin n→ℝ) (lo hi c : ℝ) + (hc : 0≤c) (hlohi : lo≤hi) (he : ∀i,e i≤hi) (hl : ∀i,lo≤l i) + (hw : ∀i,l i≤e i+c) (ho : ∀i j,i simpa using sub_nonneg.mpr hlohi + | succ n ih => + have hh:=ih (fun i=>e i.succ) (fun i=>l i.succ) lo (l 0+c) + (by linarith [hl 0]) + (fun i=>ho 0 i.succ (by simp)) (fun i=>hl i.succ) + (fun i=>hw i.succ) (fun i j hij=>ho i.succ j.succ (by simpa using hij)) + have hhead : max 0 (e 0-l 0)≤hi-l 0+c := + max_le (by linarith [hw 0,he 0]) (by linarith [he 0]) + rw [Fin.sum_univ_succ] + norm_num only [Nat.cast_add,Nat.cast_one] + linarith + +theorem good_large_window_count {w : ℕ} (G : Finset (Fin w)) + (e l : Fin w→ℝ) (lo hi c k : ℝ) + (hc : 0≤c) (hk : 0ke (a i)) (fun i=>l (a i)) lo hi c hc hlohi + (fun i=>he _ (Finset.orderEmbOfFin_mem ..)) (fun i=>hl _ (Finset.orderEmbOfFin_mem ..)) + (fun i=>hw _ (Finset.orderEmbOfFin_mem ..)) (fun i j hij=>ho _ + (Finset.orderEmbOfFin_mem ..) _ (Finset.orderEmbOfFin_mem ..) (a.strictMono hij)) + have hcard : (G.filter fun i=>kka i) + · intro i hi + exact Finset.mem_filter.mpr ⟨Finset.orderEmbOfFin_mem ..,(Finset.mem_filter.mp hi).2⟩ + · intro i _ j _ hij + exact a.injective hij + · intro v hv + have hvG := (Finset.mem_filter.mp hv).1 + let i := (G.orderIsoOfFin rfl).symm ⟨v,hvG⟩ + have hi : a i=v := congrArg Subtype.val ((G.orderIsoOfFin rfl).apply_symm_apply ⟨v,hvG⟩) + refine ⟨i,?_,hi⟩ + simp only [Finset.mem_filter,Finset.mem_univ,true_and,hi] + exact (Finset.mem_filter.mp hv).2 + rw [hcard] + apply (le_div_iff₀ hk).mpr + calc + _ = ∑i∈Finset.univ.filter (fun i : Fin G.card=>kk + fourFinitePredictor hd σ C.1 C.2 (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun C : PivotContext K V => + fourFinitePredictor (K:=K) (V:=Dual K V) (by simpa using hd) σ C.2 + (C.1.map bidualPoint.toEmbedding) (P η σ D R) (σ^(-800*beta η)) R L₀ + let X := nodeChargeConstant*(Nat.card K:ℝ)*(P η σ D R) + ∀ (tree : BinaryTree ι) (ω : OrientedPivotTreeTape f r tree) (C : PivotContext K V), + TreeCodec.cost (fun _ : ι=>OrientedPivotTape f r) (fun _ : ι=>OrientedPivotMessage f r) + (fun _ : ι=>orientedPivotLeft f r) (fun _ : ι=>orientedPivotRight f r) + (fun _ C t m=>orientedNodeCost (f C) (r C) C.1 C.2 (1000*(Nat.card K)^2) (Nat.card K) t m) + tree ω C + (orientedPivotTreeEncoded f r σ hσ hq hd.le A₀ B₀ hA₀ hB₀ (9/100000) (9/10) + (σ^(-1000*beta η)) (P η σ D R) (by norm_num) tree ω C)≤ + X*tree.height*(pivotPotential C+(b+1+2*Real.log (320/((9:ℝ)/100000)+320))*tree.numNodes)+ + (Real.log 2+X*(b+1+P η σ D R))*tree.numNodes := by + filter_upwards [eventually_oriented_guarded_node_cost hη hη' Cb hCb] with σ hn + intro D b R L₀ q K V _ _ _ _ _ _ _ _ _ hd ι A₀ B₀ hA₀ hB₀ hσ hq hcard hr hL hb hbhi hp + dsimp only + intro tree ω C + have hP : 0≤P η σ D R := by + obtain ⟨_,_,_,_,_,hP,_⟩ := finite_bounds hη hη' hσ hr + exact (Real.rpow_nonneg (by linarith : 0≤σ) _).trans hP + have hX : 0≤nodeChargeConstant*(Nat.card K:ℝ)*(P η σ D R) := by + exact mul_nonneg (mul_nonneg nodeChargeConstant_nonneg (Nat.cast_nonneg _)) hP + apply TreeCodec.encoded_cost_le + (φ:=pivotPotential) (B:=b+1+2*Real.log (320/((9:ℝ)/100000)+320)) + · intro C + exact le_max_left _ _ + · have hl := Real.log_nonneg (show 1≤320/((9:ℝ)/100000)+320 by norm_num) + linarith only [hb,hl] + · exact hX + · exact add_nonneg (Real.log_nonneg (by norm_num)) + (mul_nonneg hX (by linarith only [hb,hP])) + · intro i U t m hm + simpa only [pivotPotential,orientedPivotLeft,orientedPivotRight,add_assoc] using + orientedGuardedNode_split_potential _ _ σ hσ hq hd.le (A₀ i) U.1 (B₀ i) U.2 + (hA₀ i) (hB₀ i) (9/100000) (σ^(-1000*beta η)) (P η σ D R) b + (by norm_num) (by norm_num) (hp i) t m hm + · intro i U t m hm + have hready := (orientedGuardedNode_original_capture _ _ σ hσ hq hd.le (A₀ i) U.1 (B₀ i) U.2 + (hA₀ i) (hB₀ i) (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) + (by norm_num) t m hm).1 + have hc := hn D b R L₀ q K V hd (A₀ i) U.1 (B₀ i) U.2 (hA₀ i) (hB₀ i) + hσ hq hcard hr hL hb hbhi hready (hp i) t m hm + have hg := ready_log_deficits (A₀ i) U.1 (B₀ i) U.2 (hA₀ i) (hB₀ i) _ b hready (hp i) + have hm' := mul_le_mul_of_nonneg_left (add_le_add_right hg (P η σ D R)) hX + change _≤_ * pivotPotential U+_ + dsimp only [pivotPotential,nodeChargeConstant] at hc hm' ⊢ + nlinarith only [hc,hm'] +end + +open Module FiniteEntropy ReverseCap ScoreGeometry PivotTree BinaryTree Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology BigOperators + +theorem eventually_actual_context_entropy {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))], + ∀ (hd : finrank K V=5) (ι J : Type) [Fintype J] (p : Law J) + (A₀ : J→ι→Finset (ℙ K V)) (B₀ : J→ι→Finset (ℙ K (Dual K V))) + (hA₀ : ∀j i,(A₀ j i).Nonempty) (hB₀ : ∀j i,(B₀ j i).Nonempty) + (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K), + Nat.card K=q → Range η σ D R → (L₀:ℝ)=L η σ D → + 0≤b → b≤Cb*D*σ^(6*beta η) → + (∀j i,(Nat.card K:ℝ)^5*Real.exp (-b)≤((A₀ j i).card:ℝ)*(B₀ j i).card) → + let f := fun C : PivotContext K V => + fourFinitePredictor hd σ C.1 C.2 (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun C : PivotContext K V => + fourFinitePredictor (K:=K) (V:=Dual K V) (by simpa using hd) σ C.2 + (C.1.map bidualPoint.toEmbedding) (P η σ D R) (σ^(-800*beta η)) R L₀ + let X := nodeChargeConstant*(Nat.card K:ℝ)*(P η σ D R) + ∀ (tree : BinaryTree ι) (ω : OrientedPivotTreeTape f r tree) (C : PivotContext K V), + entropy (map p (fun j=>orientedPivotTreeEncoded f r σ hσ hq hd.le + (A₀ j) (B₀ j) (hA₀ j) (hB₀ j) (9/100000) (9/10) + (σ^(-1000*beta η)) (P η σ D R) (by norm_num) tree ω C))≤ + X*tree.height*(pivotPotential C+(b+1+2*Real.log (320/((9:ℝ)/100000)+320))*tree.numNodes)+ + (Real.log 2+X*(b+1+P η σ D R))*tree.numNodes+ + (2*(tree.numNodes:ℝ)+1)*Real.log 2 := by + filter_upwards [eventually_oriented_tree_cost hη hη' Cb hCb] with σ hn + intro D b R L₀ q K V _ _ _ _ _ _ _ _ _ hd ι J _ p A₀ B₀ hA₀ hB₀ hσ hq hcard hr hL hb hbhi hp + dsimp only + intro tree ω C + let f := fun U : PivotContext K V=>fourFinitePredictor hd σ U.1 U.2 + (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun U : PivotContext K V=>fourFinitePredictor (K:=K) (V:=Dual K V) + (by simpa using hd) σ U.2 (U.1.map bidualPoint.toEmbedding) + (P η σ D R) (σ^(-800*beta η)) R L₀ + have hw := fourPivotTree_weight (ι:=ι) hd σ (P η σ D R) (σ^(-800*beta η)) R L₀ tree ω C + apply MessageWeights.entropy_map_le_bound p _ (orientedPivotSlotCost f r tree ω C) hw + intro j + have hc := hn D b R L₀ q K V hd ι (A₀ j) (B₀ j) (hA₀ j) (hB₀ j) + hσ hq hcard hr hL hb hbhi (hp j) tree ω C + have hs := TreeCodec.slotCost_le_original + (fun _ : ι=>OrientedPivotTape f r) (fun _ : ι=>OrientedPivotMessage f r) + (fun _ : ι=>orientedPivotLeft f r) (fun _ : ι=>orientedPivotRight f r) + (fun _ U t m=>orientedNodeCost (f U) (r U) U.1 U.2 (1000*(Nat.card K)^2) (Nat.card K) t m) + tree ω C (orientedPivotTreeEncoded f r σ hσ hq hd.le (A₀ j) (B₀ j) (hA₀ j) (hB₀ j) + (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) tree ω C) + exact hs.trans (add_le_add hc le_rfl) + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/OriginalHistoryPrivate.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/OriginalHistoryPrivate.lean new file mode 100644 index 0000000000000000000000000000000000000000..498675efdff04b6ad33d4bda0a55e840a54326d0 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/OriginalHistoryPrivate.lean @@ -0,0 +1,43 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.UniformHistory + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {B A T β κ Ω Θ : Type} [Fintype B] [Fintype A] [Fintype T] [Fintype β] + [Fintype κ] [Fintype Ω] [Fintype Θ] [Nonempty A] +local instance historyPrivateIDE : DecidableEq ((B×A)⊕T) := Classical.decEq _ + +lemma originalHistory_mean (P : Law Ω) (context : Ω→κ) (tuple : Ω→((B×A)⊕T)→β) + (S : κ→B→Finset A) (n : ℕ) + (F : ((κ×BlockHistory B A T β n)×(B→A))→(((B×A)⊕T)→β)→ℝ) : + mean (originalHistoryLaw P context tuple S n) + (fun z=>F (((context z.1,z.2.1),z.2.2)) (tuple z.1))= + mean (preRoundLaw (first (pair P context tuple)) (fiber (pair P context tuple)) S n) + (fun z=>mean (historyPosterior (fiber (pair P context tuple) z.1.1) z.1.2) (F z)) := by + have h:=congrArg (fun p=>mean p (fun z=>F z.1 z.2)) + (originalHistory_joint P context tuple S n) + simpa only [mean_map,preRoundTupleLaw,mean_adaptive] using h + +lemma originalHistory_private_mean (P : Law Ω) (context : Ω→κ) (tuple : Ω→((B×A)⊕T)→β) + (S : κ→B→Finset A) (n : ℕ) + (Γ : ((κ×BlockHistory B A T β n)×(B→A))→Type) [∀h,Fintype (Γ h)] + (privateLaw : ∀h,Law (Γ h)) (tables : Law Θ) + (F : (h : (κ×BlockHistory B A T β n)×(B→A))→(((B×A)⊕T)→β)→Γ h→Θ→ℝ) : + let H := fun z : Ω×(BlockHistory B A T β n×(B→A))=>((context z.1,z.2.1),z.2.2) + mean (adaptiveLaw (sigmaLaw (originalHistoryLaw P context tuple S n) + (fun z=>privateLaw (H z))) (fun _=>tables)) + (fun z=>F (H z.1.1) (tuple z.1.1.1) z.1.2 z.2)= + mean (preRoundLaw (first (pair P context tuple)) (fiber (pair P context tuple)) S n) + (fun h=>mean (historyPosterior (fiber (pair P context tuple) h.1.1) h.1.2) + (fun x=>mean (privateLaw h) (fun v=>mean tables (F h x v)))) := by + dsimp only + rw [mean_adaptive,mean_sigma] + convert originalHistory_mean P context tuple S n + (fun h x=>mean (privateLaw h) (fun v=>mean tables (F h x v))) using 1 +end +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/OriginalLevelLaw.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/OriginalLevelLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..bccf8eace24680e5a63c41685abfb93228a5a1c4 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/OriginalLevelLaw.lean @@ -0,0 +1,106 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Trees.TreeOriginalTrims + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {α : Type*} [Fintype α] + +noncomputable def positiveLaw (p : Law α) : Law {a // 0 < p a} where + mass a := p a + nonneg a := p.nonneg a + sum_one := by + rw [← Finset.sum_subtype (Finset.univ.filter (fun a => 0 < p a)) (by simp), Finset.sum_filter] + calc + _ = ∑ a, p a := by + apply Finset.sum_congr rfl + intro a _ + by_cases h : 0 < p a + · simp [h] + · have hz : p a = 0 := le_antisymm (le_of_not_gt h) (p.nonneg a) + simp [hz] + _ = 1 := p.sum_one + +lemma positiveLaw_mean (p : Law α) (f : α → ℝ) : + (∑ a, positiveLaw p a * f a) = ∑ a, p a * f a := by + change (∑ a : {a // 0 < p a}, p a * f a) = _ + rw [← Finset.sum_subtype (Finset.univ.filter (fun a => 0 < p a)) (by simp) (fun a => p a * f a), Finset.sum_filter] + apply Finset.sum_congr rfl + intro a _ + by_cases h : 0 < p a + · simp [h] + · have hz : p a = 0 := le_antisymm (le_of_not_gt h) (p.nonneg a) + simp [hz] + +variable {I J : Type*} [Fintype I] [Fintype J] [DecidableEq I] [DecidableEq J] + {A : I → Type*} {B : J → Type*} [∀ i, Fintype (A i)] [∀ j, Fintype (B j)] + +noncomputable def originalLevelLaw (μ : ∀ i, Law (A i)) (ν : ∀ j, Law (B j)) : + Law ((∀ i, A i) × (∀ j, B j)) := + adaptiveLaw (piLaw μ) (fun _ => piLaw ν) + +lemma originalLevelLaw_cross_mean (μ : ∀ i, Law (A i)) (ν : ∀ j, Law (B j)) + (i : I) (j : J) (f : A i → B j → ℝ) : + (∑ z, originalLevelLaw μ ν z * f (z.1 i) (z.2 j)) = + ∑ a, ∑ b, μ i a * ν j b * f a b := by + rw [originalLevelLaw, sum_adaptive] + simp_rw [piLaw_eval_expectation ν j] + rw [piLaw_eval_expectation μ i (fun a => ∑ b, ν j b * f a b)] + simp only [Finset.mul_sum, mul_assoc] + +lemma originalLevelLaw_cross_domination {X Y : Type*} [Fintype X] [Fintype Y] + (μ : ∀ i, Law (A i)) (ν : ∀ j, Law (B j)) + (i : I) (j : J) (R : X → Y → Prop) (s : A i → Finset X) (t : B j → Finset Y) + (p : Law X) (q : Law Y) (L : ℝ) (hL : 0 ≤ L) + (hs : ∀ x, (∑ a, μ i a * uniformWeight (s a) x) ≤ L * p x) + (ht : ∀ y, (∑ b, ν j b * uniformWeight (t b) y) ≤ L * q y) : + (∑ z, originalLevelLaw μ ν z * + relationMass R (uniformWeight (s (z.1 i))) (uniformWeight (t (z.2 j)))) ≤ + L^2 * relationMass R p q := by + rw [originalLevelLaw_cross_mean μ ν i j (fun a b => relationMass R (uniformWeight (s a)) (uniformWeight (t b)))] + exact independent_support_domination R p q (μ i) (ν j) s t L hL hs ht + +end SharpRamseyFive.FiniteEntropy +namespace SharpRamseyFive.TreeCodec +open FiniteEntropy BinaryTree +open scoped Classical BigOperators +variable {I W : Type*} [Fintype W] +lemma mean_pathBudget (p : W → ℝ) (ρL ρR : W → I → ℝ) + (b : BinaryTree I) (j : Address b) : + (∑ ω, p ω * pathBudget (ρL ω) (ρR ω) b j) = + pathBudget (fun i => ∑ ω, p ω * ρL ω i) (fun i => ∑ ω, p ω * ρR ω i) b j := by + induction b with + | nil => exact nomatch j + | node i l r ihl ihr => + rcases j with j | (j | j) + · simp only [pathBudget, mul_zero, Finset.sum_const_zero] + · simp only [pathBudget, mul_add, Finset.sum_add_distrib, ihl] + · simp only [pathBudget, mul_add, Finset.sum_add_distrib, ihr] + +lemma pathBudget_mono (ρL ρR τL τR : I → ℝ) + (hL : ∀ i, ρL i ≤ τL i) (hR : ∀ i, ρR i ≤ τR i) + (b : BinaryTree I) (j : Address b) : + pathBudget ρL ρR b j ≤ pathBudget τL τR b j := by + induction b with + | nil => exact nomatch j + | node i l r ihl ihr => + rcases j with j | (j | j) + · rfl + · exact add_le_add (hL i) (ihl j) + · exact add_le_add (hR i) (ihr j) + +lemma pathBudget_const_le_height (a : ℝ) (ha : 0 ≤ a) (b : BinaryTree I) (j : Address b) : + pathBudget (fun _ => a) (fun _ => a) b j ≤ b.height * a := by + have h : pathBudget (fun _ => a) (fun _ => a) b j ≤ pathSum b (fun _ => a) j := by + induction b with + | nil => exact nomatch j + | node i l r ihl ihr => + rcases j with j | (j | j) + · exact ha + · exact add_le_add le_rfl (ihl j) + · exact add_le_add le_rfl (ihr j) + exact h.trans (pathSum_const_le_height b j a ha) +end SharpRamseyFive.TreeCodec + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/OriginalMarginalLaw.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/OriginalMarginalLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..ba228b975756f4b8a846dcc663d9dcf30a921ebb --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/OriginalMarginalLaw.lean @@ -0,0 +1,68 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.LevelTreeTrims + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {I J : Type*} [Fintype I] [Fintype J] [DecidableEq I] [DecidableEq J] + {A : I → Type*} {B : J → Type*} [∀ i, Fintype (A i)] [∀ j, Fintype (B j)] +lemma originalLevelLaw_first_mean (μ : ∀ i, Law (A i)) (ν : ∀ j, Law (B j)) + (i : I) (f : A i → ℝ) : + (∑ z, originalLevelLaw μ ν z*f (z.1 i)) = ∑ a, μ i a*f a := by + rw [originalLevelLaw, sum_adaptive] + simp only [← Finset.sum_mul, (piLaw ν).sum_one, one_mul] + exact piLaw_eval_expectation μ i f + +lemma originalLevelLaw_second_mean (μ : ∀ i, Law (A i)) (ν : ∀ j, Law (B j)) + (j : J) (f : B j → ℝ) : + (∑ z, originalLevelLaw μ ν z*f (z.2 j)) = ∑ b, ν j b*f b := by + rw [originalLevelLaw, sum_adaptive] + simp only [piLaw_eval_expectation ν j, ← Finset.sum_mul, (piLaw μ).sum_one, one_mul] + +variable {X Y : Type*} [Fintype X] [Fintype Y] +lemma relationMass_singleton_right (R : X → Y → Prop) (f : X → ℝ) (b : Y) : + relationMass R f (uniformWeight {b}) = ∑ a∈Finset.univ.filter (fun a => R a b), f a := by + rw [relationMass_by_target] + simp [uniformWeight] + +lemma relationMass_weighted_singleton (R : X → Y → Prop) (f : X → ℝ) (g : Y → ℝ) : + (∑ b, g b*relationMass R f (uniformWeight {b})) = relationMass R f g := by + simp_rw [relationMass_singleton_right R f] + rw [relationMass_by_target R f g] + +lemma relationMass_mixture_right {ι : Type*} [Fintype ι] (R : X → Y → Prop) (μ : Law ι) + (f : X → ℝ) (g : ι → Y → ℝ) : + (∑ i, μ i * relationMass R f (g i)) = relationMass R f (fun b => ∑ i, μ i*g i b) := by + simp_rw [← relationMass_swap R f] + exact relationMass_mixture_left (fun y x => R x y) μ g f + +lemma originalLevelLaw_right_domination (μ : ∀ i, Law (A i)) (ν : ∀ j, Law (B j)) + (j : J) (R : X → Y → Prop) (S : B j → Finset Y) (g : X → ℝ) (q : Y → ℝ) + (L : ℝ) (hg : ∀ a, 0≤g a) + (hν : ∀ b, (∑ t, ν j t*uniformWeight (S t) b) ≤ L*q b) : + (∑ z, originalLevelLaw μ ν z*relationMass R g (uniformWeight (S (z.2 j)))) ≤ + L*relationMass R g q := by + rw [originalLevelLaw_second_mean μ ν j (fun t => relationMass R g (uniformWeight (S t))), relationMass_mixture_right] + simp only [relationMass, Finset.mul_sum] + apply Finset.sum_le_sum + intro z _ + have h := mul_le_mul_of_nonneg_left (hν z.2) (hg z.1) + rw [← Finset.mul_sum] + nlinarith only [h] + +lemma originalLevelLaw_left_domination (μ : ∀ i, Law (A i)) (ν : ∀ j, Law (B j)) + (i : I) (R : X → Y → Prop) (S : A i → Finset X) (p : X → ℝ) (g : Y → ℝ) + (L : ℝ) (hg : ∀ b, 0≤g b) + (hμ : ∀ a, (∑ t, μ i t*uniformWeight (S t) a) ≤ L*p a) : + (∑ z, originalLevelLaw μ ν z*relationMass R (uniformWeight (S (z.1 i))) g) ≤ + L*relationMass R p g := by + rw [originalLevelLaw_first_mean μ ν i (fun t => relationMass R (uniformWeight (S t)) g), relationMass_mixture_left] + simp only [relationMass, Finset.mul_sum] + apply Finset.sum_le_sum + intro z _ + have h := mul_le_mul_of_nonneg_right (hμ z.1) (hg z.2) + nlinarith only [h] +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/OriginalUniformWeightedScoreMoment.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/OriginalUniformWeightedScoreMoment.lean new file mode 100644 index 0000000000000000000000000000000000000000..32b664919c58c9a0ac5ff40f9a08298e2502aa6b --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/OriginalUniformWeightedScoreMoment.lean @@ -0,0 +1,56 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Probability.TypicalScoreAggregate +import OAI.Combinatorics.RamseyFive.Probability.AbsScoreTerm + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.PoissonScore +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal Classical +variable {ι D H : Type*} [Fintype ι] [DecidableEq ι] + [Fintype D] [DecidableEq D] [Fintype H] + +omit [DecidableEq ι] [DecidableEq D] [Fintype H] in +theorem original_uniform_weighted_score_moment (p : ι→Prop) [DecidablePred p] + (e : {i // ¬p i}≃D) (rate : ℝ≥0) {R : ℕ} + (F : Finset H) (lines : H→Finset D) {b : ℝ} (hb : b∈Set.Icc 0 1) + (own : (Fin R→{i // p i}→ℕ)→H→Fin R→Bool) + (g : (Fin R→D→ℕ)→ℝ) (hg : ∀v,|g v|≤1) (k : ℕ) (B : ℝ) + (hB : ∀u,(∫ v,g v*(typicalScore F lines b (own u) v)^k + ∂scheduleMeasure (fun _ : D => rate) R)≤B) : + (∫ ω,g (fun r d => ω r (e.symm d).val)* + (typicalScore F lines b (own (fun r i => ω r i)) + (fun r d => ω r (e.symm d).val))^k ∂scheduleMeasure (fun _ : ι => rate) R)≤B := by + apply integral_split_schedule_le (fun _ : ι => rate) p + (fun u v => g (fun r d => v r (e.symm d))* + (typicalScore F lines b (own u) (fun r d => v r (e.symm d)))^k) + ((F.card:ℝ)^k) B + · intro u v + rw [abs_mul,abs_pow] + exact (mul_le_mul (hg _) (pow_le_pow_left₀ (abs_nonneg _) + (abs_typicalScore_le_card F lines hb (own u) _) k) (pow_nonneg (abs_nonneg _) _) + (by norm_num)).trans_eq (one_mul _) + · intro u + rw [integral_schedule_reindex e (fun _ : D => rate) + (fun v => g v*(typicalScore F lines b (own u) v)^k)] + exact hB u + +omit [Fintype H] in +lemma integral_original_weighted_score_pow (label : ι→D) (rate : ι→ℝ≥0) + {R : ℕ} (s : Finset H) (lines : H→Finset D) (b : ℝ) + (own : H→Fin R→Bool) (p : ℕ) (g : (Fin R→D→ℕ)→ℝ) : + (∫ ω,g (fun r => aggregate label (ω r))* + (typicalScore s (fun h => Finset.univ.filter fun i => label i∈lines h) b own ω)^p + ∂scheduleMeasure rate R) = + ∫ ω,g ω*(typicalScore s lines b own ω)^p ∂scheduleMeasure (aggregateRate label rate) R := by + simp_rw [←typicalScore_aggregate label s lines b own] + exact (measurePreserving_schedule_aggregate label rate R).hasLaw.integral_comp + (measurable_of_countable (fun ω : Fin R→D→ℕ => + g ω*(typicalScore s lines b own ω)^p)).aestronglyMeasurable + +end SharpRamseyFive.PoissonScore + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/Pairs.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/Pairs.lean new file mode 100644 index 0000000000000000000000000000000000000000..04924a648b08c5d8a6d0c27ae87341a51a8c9f7f --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/Pairs.lean @@ -0,0 +1,107 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.PairPoints + +namespace OAI + +namespace SharpRamseyFive.WeightedOverlap +open Module ProjectiveIncidence RichPlaneGeometry HyperplaneOverlap NondominantOverlap ActualOverlap +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] [FiniteDimensional K V] [Finite K] + (x : ℙ K V) + +noncomputable def pairs (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (δ a : ℝ) := + (F ×ˢ F).filter fun p => p.1 ≠ p.2 ∧ a ≤ δ*(pairPoints x X p.1 p.2).card + +noncomputable def neighbors (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (H : Submodule K V) (δ a : ℝ) := + F.filter fun A => H ≠ A ∧ a ≤ δ*(pairPoints x X H A).card + +omit [Finite K] in +lemma dominant_witness (X : Finset {y : ℙ K V // x ≠ y}) + (A B : Submodule K V) (hxA : x.submodule ≤ A) (hxB : x.submodule ≤ B) + {δ a : ℝ} (hδ : 0 < δ) (ha : a ≤ δ*(pairPoints x X A B).card) + (hnd : ¬∀ l : RadialLine x, + 2*((pairPoints x X A B).filter fun y => y.val.submodule ≤ l.val).card ≤ + (pairPoints x X A B).card) : + ∃ l : RadialLine x, l.val ≤ A ⊓ B ∧ + ⌈a/(2*δ)⌉₊ ≤ (RadialLine.trainingOnLine X l).card := by + classical + push Not at hnd + obtain ⟨l,hl⟩ := hnd + have hp : 0 < ((pairPoints x X A B).filter fun y => y.val.submodule ≤ l.val).card := by omega + obtain ⟨y,hy⟩ := Finset.card_pos.mp hp + obtain ⟨hyP,hyl⟩ := Finset.mem_filter.mp hy + have hyAB : y.val.submodule ≤ A ⊓ B := (Finset.mem_filter.mp hyP).2 + have he : RadialLine.through x y.val y.property = l := + (RadialLine.through_eq_iff y.property l).mpr hyl + refine ⟨l,?_,?_⟩ + · rw [←he] + exact (RadialLine.through_le_iff _ _).mpr ⟨le_inf hxA hxB,hyAB⟩ + · have hs : ((pairPoints x X A B).filter fun y => y.val.submodule ≤ l.val) ⊆ + RadialLine.trainingOnLine X l := by + intro z hz + obtain ⟨hzP,hzl⟩ := Finset.mem_filter.mp hz + exact Finset.mem_filter.mpr ⟨(Finset.mem_filter.mp hzP).1,hzl⟩ + have hc := Finset.card_le_card hs + have hcr : (pairPoints x X A B).card < 2*((RadialLine.trainingOnLine X l).card:ℝ) := by + exact_mod_cast (by omega : (pairPoints x X A B).card < 2*(RadialLine.trainingOnLine X l).card) + apply Nat.ceil_le.mpr + apply (div_le_iff₀ (mul_pos (by norm_num) hδ)).mpr + nlinarith + +theorem pair_count_four [Fintype (RadialLine x)] (hdim : finrank K V = 5) + (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 4) + (hxF : ∀ A ∈ F, x.submodule ≤ A) {δ a : ℝ} (hδ : 0 < δ) (ha : 0 ≤ a) : + ((pairs x X F δ a).card:ℝ)*a^2 ≤ + (richRadials x X ⊤ ⌈a/(2*δ)⌉₊).card * ((Nat.card K:ℝ)^2+Nat.card K+1)^2*a^2 + + 2*δ^2*X.card^2*((Nat.card K:ℝ)+1)^2 := by + classical + let E := pairs x X F δ a + let nd (p : Submodule K V × Submodule K V) := ∀ l : RadialLine x, + 2*((pairPoints x X p.1 p.2).filter fun y => y.val.submodule ≤ l.val).card ≤ + (pairPoints x X p.1 p.2).card + let N := E.filter nd + let D := E.filter (fun p => ¬nd p) + have hE : E ⊆ F ×ˢ F := Finset.filter_subset _ _ + have hne (p) (hp : p ∈ E) : p.1 ≠ p.2 := (Finset.mem_filter.mp hp).2.1 + have hM (p) (hp : p ∈ E) : ⌈a/δ⌉₊ ≤ (pairPoints x X p.1 p.2).card := + Nat.ceil_le.mpr ((div_le_iff₀ hδ).mpr (by + simpa only [mul_comm] using (Finset.mem_filter.mp hp).2.2)) + have hN := nondominant_pair_count x hdim X F hF hxF N + ((Finset.filter_subset _ _).trans hE) (fun p hp => hne p (Finset.mem_filter.mp hp).1) + ⌈a/δ⌉₊ (fun p hp => hM p (Finset.mem_filter.mp hp).1) + (fun p hp => (Finset.mem_filter.mp hp).2) + have hD := dominant_pair_count x (d := 4) hdim X F hF D + ((Finset.filter_subset _ _).trans hE) ⌈a/(2*δ)⌉₊ (by + intro p hp + obtain ⟨hp,hn⟩ := Finset.mem_filter.mp hp + obtain ⟨h1,h2⟩ := Finset.mem_product.mp (hE hp) + exact dominant_witness x X p.1 p.2 (hxF _ h1) (hxF _ h2) hδ + (Finset.mem_filter.mp hp).2.2 hn) + have hQ : (∑ i ∈ Finset.range (4-1), Nat.card K^i) = Nat.card K^2+Nat.card K+1 := by + norm_num [Finset.sum_range_succ]; ring + rw [hQ] at hD + have hcD : (D.card:ℝ) ≤ (richRadials x X ⊤ ⌈a/(2*δ)⌉₊).card * + ((Nat.card K:ℝ)^2+Nat.card K+1)^2 := by exact_mod_cast hD + have hcN : (N.card:ℝ)*(⌈a/δ⌉₊:ℝ)^2 ≤ 2*(X.card:ℝ)^2*((Nat.card K:ℝ)+1)^2 := by + exact_mod_cast hN + have hceil : a ≤ δ*(⌈a/δ⌉₊:ℝ) := (div_le_iff₀ hδ).mp (Nat.le_ceil (a/δ)) |>.trans_eq (mul_comm _ _) + have ha2 := pow_le_pow_left₀ ha hceil 2 + have hN' : (N.card:ℝ)*a^2 ≤ 2*δ^2*X.card^2*((Nat.card K:ℝ)+1)^2 := by + calc + _ ≤ (N.card:ℝ)*(δ*⌈a/δ⌉₊)^2 := mul_le_mul_of_nonneg_left ha2 (by positivity) + _ = δ^2*((N.card:ℝ)*(⌈a/δ⌉₊:ℝ)^2) := by ring + _ ≤ δ^2*(2*(X.card:ℝ)^2*((Nat.card K:ℝ)+1)^2) := + mul_le_mul_of_nonneg_left hcN (sq_nonneg _) + _ = _ := by ring + have he : N.card+D.card=E.card := Finset.card_filter_add_card_filter_not nd + have her : (N.card:ℝ)+(D.card:ℝ)=E.card := by exact_mod_cast he + change (E.card:ℝ)*a^2 ≤ _ + rw [←her,add_mul] + exact (add_le_add hN' (mul_le_mul_of_nonneg_right hcD (sq_nonneg a))).trans_eq (by ring) + +end SharpRamseyFive.WeightedOverlap + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/PermissibleLevels.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/PermissibleLevels.lean new file mode 100644 index 0000000000000000000000000000000000000000..bb04f3d6dc9035a2e9dad69387019be74d6a2b00 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/PermissibleLevels.lean @@ -0,0 +1,187 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.FinitePiLaw + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped BigOperators Classical +variable {α : Type*} [Fintype α] + +noncomputable def levelLoss (p : Law α) (N : ℝ) (n : Level p) : ℝ := + Real.log (N/(levelCell p n).card) +noncomputable def levelBadMass (p : Law α) (Good : Finset α) (n : Level p) : ℝ := + ∑a∈levelCell p n\Good,p a +noncomputable def permissibleLevels (p : Law α) (Good : Finset α) (N K : ℝ) : Finset (Level p) := + Finset.univ.filter (fun n=>0<(levelCell p n).card ∧ levelLoss p N n≤K ∧ + (levelCell p n).card≤2*(levelCell p n∩Good).card) + +lemma levelBadMass_nonneg (p : Law α) (Good : Finset α) (n : Level p) : + 0≤levelBadMass p Good n := Finset.sum_nonneg (fun a _=>p.nonneg a) + +lemma sum_levelBadMass (p : Law α) (Good : Finset α) : + (∑n : Level p,levelBadMass p Good n)=eventMass p Goodᶜ := by + have hs (n : Level p) : levelCell p n\Good= + Finset.univ.filter (fun a=>0

a∉Good) by ext a;simp, + Finset.sum_filter] + apply Finset.sum_congr rfl + intro a _ + by_cases hp : p a=0 + · simp [hp] + · have hp0 : 0

simp [hp0,he,ha] + +lemma levelLoss_nonneg (p : Law α) (N : ℝ) (hN : 0 + level_mass_bound p n (Finset.mem_sdiff.mp ha).1) + have he : (∑a∈levelCell p n\Good,(levelCell p n).card*Real.exp 1*p a)= + (levelCell p n).card*Real.exp 1*levelBadMass p Good n := by rw [levelBadMass,Finset.mul_sum] + rw [he] at hs + simp only [Finset.sum_const,Finset.card_sdiff, nsmul_eq_mul] at hs + have hu := mul_le_mul_of_nonneg_right hc + (mul_nonneg (Real.exp_pos 1).le (levelBadMass_nonneg p Good n)) + have hs' : ((levelCell p n\Good).card:ℝ)*levelLaw p n≤ + (levelCell p n).card*Real.exp 1*levelBadMass p Good n := by simpa [Finset.card_sdiff] using hs + apply (mul_le_mul_iff_right₀ hbn).mp + nlinarith + +theorem permissible_mass (p : Law α) (Good : Finset α) (N K : ℝ) + (hN : 0hpoint n) + rw [(levelLaw p).sum_one,Finset.sum_add_distrib,Finset.sum_add_distrib, + Finset.sum_ite_mem,Finset.univ_inter,←Finset.sum_div,←Finset.mul_sum, + sum_levelBadMass] at hh + change 1≤eventMass (levelLaw p) (permissibleLevels p Good N K)+_+_ at hh + linarith + +end + +open scoped BigOperators Classical +variable {α β : Type*} [Fintype α] [Fintype β] + +lemma positive_map_exists (p : Law α) (f : α→β) {b : β} (hb : 0 < map p f b) : + ∃a,0 < p a ∧ f a=b := by + have hnon : ∀a∈Finset.univ,(0:ℝ) ≤ if f a=b then p a else 0 := by + intro a _;split + · exact p.nonneg a + · exact le_rfl + obtain ⟨a,_,ha⟩ := (Finset.sum_pos_iff_of_nonneg hnon).mp hb + split_ifs at ha with he + · exact ⟨a,ha,he⟩ + · linarith + +lemma permissible_support_size (p : Law α) (Good : Finset α) (N K : ℝ) + (hN : 0 < N) (hcap : ∀n : Level p,((levelCell p n).card:ℝ) ≤ N) + {n : Level p} (hn : n∈permissibleLevels p Good N K) : + N*Real.exp (-K)/2 ≤ ((levelCell p n∩Good).card:ℝ) ∧ + ((levelCell p n∩Good).card:ℝ) ≤ N := by + obtain ⟨hn0,hl,hh⟩ := (Finset.mem_filter.mp hn).2 + have hc : (0:ℝ) < (levelCell p n).card := by exact_mod_cast hn0 + have he := Real.exp_le_exp.mpr hl + rw [levelLoss,Real.exp_log (div_pos hN hc)] at he + have hc₁ : N*Real.exp (-K) ≤ ((levelCell p n).card:ℝ) := by + rw [Real.exp_neg,←div_eq_mul_inv] + apply (div_le_iff₀ (Real.exp_pos K)).mpr + have := (div_le_iff₀ hc).mp he + nlinarith + have hc₂ : ((levelCell p n).card:ℝ) ≤ 2*(levelCell p n∩Good).card := by exact_mod_cast hh + constructor + · linarith + · exact (by exact_mod_cast Finset.card_le_card (Finset.inter_subset_left) : + ((levelCell p n∩Good).card:ℝ) ≤ (levelCell p n).card).trans (hcap n) + +noncomputable def goodSupportLaw (p : Law α) (Good : Finset α) (N K : ℝ) + (hE : (1:ℝ)/2 ≤ eventMass (levelLaw p) (permissibleLevels p Good N K)) : Law (Finset α) := + map (conditionOn (levelLaw p) (permissibleLevels p Good N K) (by linarith)) + (fun n=>levelCell p n∩Good) + +theorem goodSupportLaw_bounds (p : Law α) (Good : Finset α) (N K : ℝ) + (hN : 0 < N) (hcap : ∀n : Level p,((levelCell p n).card:ℝ) ≤ N) + (hE : (1:ℝ)/2 ≤ eventMass (levelLaw p) (permissibleLevels p Good N K)) + (S : Finset α) (hS : 0 < goodSupportLaw p Good N K hE S) : + S⊆Good ∧ N*Real.exp (-K)/2 ≤ (S.card:ℝ) ∧ (S.card:ℝ) ≤ N := by + obtain ⟨n,hn,he⟩ := positive_map_exists _ _ hS + have hm : n∈permissibleLevels p Good N K := by + by_contra hh + rw [conditionOn_apply,ite_eq_right hh] at hn + exact lt_irrefl 0 hn + subst S + exact ⟨Finset.inter_subset_right,permissible_support_size p Good N K hN hcap hm⟩ + +theorem goodSupportLaw_domination (p : Law α) (Good : Finset α) (N K : ℝ) + (hE : (1:ℝ)/2 ≤ eventMass (levelLaw p) (permissibleLevels p Good N K)) (a : α) : + (∑S,goodSupportLaw p Good N K hE S*(if a∈S then 1/(S.card:ℝ) else 0)) ≤ + 4*Real.exp 1*p a := by + unfold goodSupportLaw + rw [sum_map] + exact good_level_domination p Good _ hE + (fun n hn=>(Finset.mem_filter.mp hn).2.2.2) a + +lemma permissible_half_mass (p : Law α) (Good : Finset α) (N K : ℝ) + (hN : 0 < N) (hK : 0 < K) (hcap : ∀n : Level p,((levelCell p n).card:ℝ) ≤ N) + (hsmall : (∑n : Level p,levelLaw p n*levelLoss p N n)/K+ + 2*Real.exp 1*eventMass p Goodᶜ ≤ (1:ℝ)/2) : + (1:ℝ)/2 ≤ eventMass (levelLaw p) (permissibleLevels p Good N K) := by + have := permissible_mass p Good N K hN hK hcap + linarith + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/PreRoundDeletion.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/PreRoundDeletion.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8fbad9e9046bb1df2bd6cb663c8da9d1cc730c3 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/PreRoundDeletion.lean @@ -0,0 +1,174 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.UniformHistory +import OAI.Combinatorics.RamseyFive.Trees.Windows +import OAI.Combinatorics.RamseyFive.Entropy.CollisionSampling + +namespace OAI + +noncomputable section + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped Classical BigOperators +variable {B A T β κ : Type} [Fintype B] [Fintype A] [Fintype T] [Fintype β] + [Fintype κ] [Nonempty A] +local instance preRoundDeletionIndexDecEq : DecidableEq ((B×A)⊕T) := Classical.decEq _ + +def preRoundBad (_μ : Law κ) (p : κ→Law (((B×A)⊕T)→β)) + (_S : κ→B→Finset A) (n : ℕ) (J d e : ℝ) + (c : κ→BlockHistory B A T β n→((B×A)⊕T)→((B×A)⊕T)→ℝ) + (z : (κ×BlockHistory B A T β n)×(B→A)) (i : ((B×A)⊕T)) : ℝ := + indexBad J d e (historyPosterior (p z.1.1) z.1.2) (c z.1.1 z.1.2) z.2 i + +theorem preRound_bad_budget (μ : Law κ) (p : κ→Law (((B×A)⊕T)→β)) + (S : κ→B→Finset A) (n r : ℕ) (hr : 0∑ i∈blockActive (historyUnused (S z.1.1) z.1.2), + preRoundBad μ p S n J d e c z i)≤ + mean μ (fun a=>activeDeficit (p a) (blockActive (S a)) J)/d+ + (mean (preRoundLaw μ p S n) (fun z=>blockAllInformation + (historyPosterior (p z.1.1) z.1.2) (historyUnused (S z.1.1) z.1.2) z.2)+C/r)/e := by + have hlocal (a : κ) (ha : 0<μ a) (h : BlockHistory B A T β n) + (hh : 0∑ i∈blockActive (historyUnused (S a) h), + indexBad J d e (historyPosterior (p a) h) (c a h) s i)≤ + mean (freshBlockLaw (historyUnused (S a) h)) + (blockAllDeficit J (historyPosterior (p a) h) (historyUnused (S a) h))/d+ + (mean (freshBlockLaw (historyUnused (S a) h)) + (blockAllInformation (historyPosterior (p a) h) (historyUnused (S a) h))+C/r)/e := by + apply (fresh_bad_bound J d e hd he _ ((history_in_domains (p a) (D a) (hp a ha) n h).entropy_cap J (hJ a)) + _ (hc a h) _ r hr (history_unused_card (S a) r n (hS a ha) h)).trans + gcongr + exact hC a ha h hh + have hb := mean_mono_pos μ (fun a ha=>mean_mono_pos (historyLaw (p a) (S a) n) + (hlocal a ha)) + simp_rw [mean_add,mean_div,mean_add,mean_const] at hb + have hdef := preRoundLaw_deficit μ p S J D hJ hp hfix n + (fun a ha b=>by have := hS a ha b; omega) + unfold preRoundLaw at hdef ⊢ + simp only [mean_adaptive,preRoundBad] at hdef ⊢ + exact hb.trans (by gcongr) + +theorem preRound_selected_bad (μ : Law κ) (p : κ→Law (((B×A)⊕T)→β)) + (S : κ→B→Finset A) (n r : ℕ) (hr : 0∑ b,preRoundBad μ p S n J d e c z + (Sum.inl (b,z.2 b)))≤ + mean (preRoundLaw μ p S n) (fun z=>∑ i∈blockActive (historyUnused (S z.1.1) z.1.2), + preRoundBad μ p S n J d e c z i) := by + simp only [preRoundLaw,mean_adaptive,preRoundBad] + rw [←mean_smul] + apply mean_mono_pos + intro a ha + rw [←mean_smul] + exact mean_mono (historyLaw (p a) (S a) n) fun h=> + selected_bad_fraction J d e _ _ _ r hr (history_unused_card (S a) r n (hS a ha) h) + +end + +open scoped Classical BigOperators +variable {Ω W T : Type*} [Fintype Ω] [Fintype W] [Fintype T] + +lemma badIndexIndicator_zero_or_one (δ g d e : ℝ) : + badIndexIndicator δ g d e=0 ∨ badIndexIndicator δ g d e=1 := by + unfold badIndexIndicator + split_ifs <;> simp + +theorem exists_good_window_pair (p : Law Ω) (a : Ω→W→T→ℝ) (b : Ω→W→ℝ) + (ha : ∀ z v t,a z v t=0 ∨ a z v t=1) + (hb : ∀ z v,b z v=0 ∨ b z v=1) + (hsmall : mean p (fun z=>∑ v,∑ t,a z v t)+Fintype.card T* + mean p (fun z=>∑ v,b z v)<(Fintype.card W:ℝ)*Fintype.card T) : + ∃ z,0< p z ∧ ∃ v t,a z v t=0 ∧ b z v=0 := by + by_contra hn + push Not at hn + have hp (z : Ω) (hz : 0< p z) : + (Fintype.card W:ℝ)*Fintype.card T ≤ + (∑ v,∑ t,a z v t)+(Fintype.card T:ℝ)*∑ v,b z v := by + have hpoint (v : W) (t : T) : 1≤ a z v t+b z v := by + rcases ha z v t with h|h <;> rcases hb z v with h'|h' + · exact False.elim (hn z hz v t h h') + all_goals rw [h,h']; norm_num + have H := Finset.sum_le_sum (s:=(Finset.univ:Finset W)) + (fun v _=> Finset.sum_le_sum (s:=(Finset.univ:Finset T)) (fun t _=> hpoint v t)) + simpa only [Finset.sum_add_distrib,Finset.sum_const,Finset.card_univ, + nsmul_eq_mul,mul_one,←Finset.mul_sum] using H + have H:= mean_mono_pos p hp + rw [mean_const,mean_add,mean_smul] at H + linarith + +variable {κ β : Type} [Fintype κ] [Fintype β] {w r n rem : ℕ} + [Nonempty (Fin r)] +local instance goodWindowBlockDecEq : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance goodWindowIndexDecEq : DecidableEq (SharpRamseyFive.Windows.Slots w r) := Classical.decEq _ + +theorem preRound_good_early_middle (μ : Law κ) + (p : κ→Law (SharpRamseyFive.Windows.Slots w r→β)) + (S : κ→(Fin w×Bool)→Finset (Fin r)) (hrem : 0< rem) (hr : r≤2*rem) + (hS : ∀ a,0<μ a→∀ b,rem+n≤(S a b).card) + (J d e : ℝ) + (c : κ→BlockHistory (Fin w×Bool) (Fin r) (Fin w×Fin (2*r)) β n→ + SharpRamseyFive.Windows.Slots w r→SharpRamseyFive.Windows.Slots w r→ℝ) + (hsmall : 5*mean (preRoundLaw μ p S n) (fun z=> + ∑ i∈blockActive (historyUnused (S z.1.1) z.1.2),preRoundBad μ p S n J d e c z i)<2*r*w) : + ∃ z,0< preRoundLaw μ p S n z ∧ ∃ v t, + preRoundBad μ p S n J d e c z (Sum.inr (v,t))=0 ∧ + preRoundBad μ p S n J d e c z (Sum.inl ((v,false),z.2 (v,false)))=0 := by + let ν:= preRoundLaw μ p S n + let bad:= preRoundBad μ p S n J d e c + let all:= fun z=>∑ i∈blockActive (historyUnused (S z.1.1) z.1.2),bad z i + let selected:= fun z=>∑ b,bad z (Sum.inl (b,z.2 b)) + have hnon (z : (κ×BlockHistory (Fin w×Bool) (Fin r) (Fin w×Fin (2*r)) β n)× + ((Fin w×Bool)→Fin r)) (i : SharpRamseyFive.Windows.Slots w r) : 0≤ bad z i := + badIndexIndicator_nonneg .. + have hmid : mean ν (fun z=>∑ v,∑ t,bad z (Sum.inr (v,t)))≤ mean ν all := by + apply mean_mono + intro z + dsimp only [all] + rw [blockActive_sum] + conv_rhs => arg 2; rw [Fintype.sum_prod_type] + exact le_add_of_nonneg_left (Finset.sum_nonneg fun b _=> Finset.sum_nonneg fun a _=> hnon z _) + have hearly : mean ν (fun z=>∑ v,bad z (Sum.inl ((v,false),z.2 (v,false))))≤ mean ν selected := by + apply mean_mono + intro z + dsimp only [selected] + rw [Fintype.sum_prod_type] + apply Finset.sum_le_sum + intro v _ + exact Finset.single_le_sum (f:=fun b=>bad z (Sum.inl ((v,b),z.2 (v,b)))) (fun b _=>hnon z _) (Finset.mem_univ false) + have hsel : (rem:ℝ)*mean ν selected≤ mean ν all := preRound_selected_bad μ p S n rem hrem hS J d e c + have hsel0 : 0≤ mean ν selected := mean_nonneg _ _ (fun z=> Finset.sum_nonneg fun b _=> hnon z _) + have hr' : (2*r:ℕ)≤4*rem := by omega + have hx : (2*r:ℝ)*mean ν (fun z=>∑ v,bad z (Sum.inl ((v,false),z.2 (v,false))))≤4*mean ν all := by + have h:= mul_le_mul_of_nonneg_left hearly (show (0:ℝ)≤2*r by positivity) + have hr'' : (2*r:ℝ)≤4*rem := by exact_mod_cast hr' + nlinarith [mul_le_mul_of_nonneg_right hr'' hsel0] + apply exists_good_window_pair ν (fun z v t=> bad z (Sum.inr (v,t))) + (fun z v=> bad z (Sum.inl ((v,false),z.2 (v,false)))) + · intro z v t + exact badIndexIndicator_zero_or_one .. + · intro z v + exact badIndexIndicator_zero_or_one .. + · simpa only [Fintype.card_fin,Nat.cast_mul,Nat.cast_ofNat] using + (show mean ν (fun z=>∑ v,∑ t,bad z (Sum.inr (v,t)))+(2*r:ℝ)* + mean ν (fun z=>∑ v,bad z (Sum.inl ((v,false),z.2 (v,false))))<(w:ℝ)*(2*r) by + dsimp only [ν,all,bad] at hmid hx ⊢ + nlinarith) +end SharpRamseyFive.FiniteEntropy + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/PreparedWindows.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/PreparedWindows.lean new file mode 100644 index 0000000000000000000000000000000000000000..adf94eccb13f261d1d3cb5b311760aa2ada2f4a4 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/PreparedWindows.lean @@ -0,0 +1,175 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Streams.PreparedStream +import OAI.Combinatorics.RamseyFive.Marking.ReciprocalDomainCaps + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple +open Module ProjectiveIncidence FiniteEntropy Windows Marking +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V Ω κ α : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype Ω] [Fintype κ] [Fintype α] + {N w n : ℕ} [Nonempty (Fin n)] {admissible : (Fin N→α)→Prop} +local instance pwBDE : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance pwTDE : DecidableEq (Fin w×Fin (2*n)) := Classical.decEq _ +local instance pwIDE : DecidableEq (Slots w n) := Classical.decEq _ +omit [Finite K] [FiniteDimensional K V] [Nonempty (Fin n)] in +lemma Prepared.window_deficit + (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (w*(4*n)) admissible) + (ctx : Ω→κ) (J B M : ℝ) (P : Prepared S ctx J B M) : + mean (first (pair S.law ctx (windowTuple S))) (fun c=>activeDeficit + (fiber (pair S.law ctx (windowTuple S)) c) (blockActive (fun _=>Finset.univ)) J)≤B := by + rw [window_posterior_deficit] + have h:=P.deficit + simp only [Nat.cast_mul,Nat.cast_ofNat] at h + have he : psFinDE (w*(4*n)) = (inferInstance : DecidableEq (Fin (w*(4*n)))) := Subsingleton.elim _ _ + rw [he] at h + exact h +end +end SharpRamseyFive.SelectedTuple + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {κ B A T β : Type} [Fintype κ] [Fintype B] [Fintype A] [Fintype T] + [Fintype β] [Nonempty A] +local instance chosenRoundDE : DecidableEq ((B×A)⊕T) := Classical.decEq _ + +lemma FixedOutside.totalCorrelation_le_active {ι : Type} [Fintype ι] + (p : Law (ι→β)) (U : Finset ι) (J : ℝ) (hfix : FixedOutside p U) + (hc : ∀i∈U,entropy (map p (fun x=>x i))≤J) : + totalCorrelation p≤activeDeficit p U J := by + unfold totalCorrelation activeDeficit + apply sub_le_sub_right + calc + _ = ∑i∈U,entropy (map p (fun x=>x i)) := by + symm + exact Finset.sum_subset (Finset.subset_univ _) (fun i _ hi=>hfix.entropy_zero i hi) + _ ≤ ∑_i∈U,J := Finset.sum_le_sum hc + _ = _ := by simp + +theorem exists_small_deletion_round (μ : Law κ) (p : κ→Law (((B×A)⊕T)→β)) + (S : κ→B→Finset A) (rounds rem : ℕ) (hrounds : 0activeDeficit (p a) (blockActive (S a)) J)≤budget) + (c : (i : Fin rounds)→κ→BlockHistory B A T β i.val→((B×A)⊕T)→((B×A)⊕T)→ℝ) + (hc : ∀i a h x y,0≤c i a h x y) + (hC : ∀i a,0<μ a→∀h,0 + ∑j∈blockActive (historyUnused (S z.1.1) z.1.2),preRoundBad μ p S i.val J d ε (c i) z j)≤ + budget/d+(2*budget/rounds+C/rem)/ε := by + obtain ⟨i,hi⟩:=exists_preRoundLaw_information μ p S rounds hrounds + (fun a ha b=>by have := hS a ha b;omega) + refine ⟨i,?_⟩ + have htc : mean μ (fun a=>totalCorrelation (p a))≤budget := by + apply (mean_mono_pos μ (fun a ha=>FixedOutside.totalCorrelation_le_active (p a) _ J + (hfix a ha) (fun j _=>(hp a ha).entropy_cap J (hJ a) j))).trans hbudget + have hi' : mean (preRoundLaw μ p S i.val) (fun z=>blockAllInformation + (historyPosterior (p z.1.1) z.1.2) (historyUnused (S z.1.1) z.1.2) z.2)≤2*budget/rounds := + hi.trans (div_le_div_of_nonneg_right (mul_le_mul_of_nonneg_left htc (by norm_num)) (by positivity)) + have h:=preRound_bad_budget μ p S i.val rem hrem + (fun a ha b=>by have := hS a ha b;have:=i.isLt;omega) J d ε hd hε D hJ hp hfix + (c i) (hc i) C (hC i) + exact h.trans (add_le_add (div_le_div_of_nonneg_right hbudget hd.le) + (div_le_div_of_nonneg_right (add_le_add hi' le_rfl) hε.le)) +end +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.Marking +open Module ProjectiveIncidence FiniteEntropy Windows LowConflict CoreGeometry +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V κ : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype κ] {w n : ℕ} [Nonempty (Fin n)] +local instance rcrBDE : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance rcrTDE : DecidableEq (Fin w×Fin (2*n)) := Classical.decEq _ +local instance rcrIDE : DecidableEq (Slots w n) := Classical.decEq _ + +omit [Nonempty (Fin n)] in +lemma historyCollision_closed_budget (hd : finrank K V=5) + (p : Law (Slots w n→FlagPair K V)) (u : Slots w n→ℝ) (s width M : ℝ) (b : Fin 7) + (hs : 2 ≤ s) (hband : ∀i,BandCondition (Real.log (Nat.card K)) width (u i) b) + (heven : b.val%2=0) (hsmall : Real.log 32+width+3*sactiveDeficit (p a) (blockActive (elig a)) J)≤budget) + (u : κ→Slots w n→ℝ) (b : Fin 7) (hs : 2 ≤ s) + (hband : ∀a,0<μ a→∀i,BandCondition (Real.log (Nat.card K)) width (u a i) b) + (heven : b.val%2=0) (hsmall : Real.log 32+width+3*s + ∑j∈blockActive (historyUnused (elig z.1.1) z.1.2), + preRoundBad μ p elig i.val J d ε (historyCollision p u s) z j)≤ + budget/d+(2*budget/rounds+(4*(w*(4*n):ℝ)*M)/rem)/ε := by + apply exists_small_deletion_round μ p elig rounds rem hrounds hrem hS J d ε budget + (4*(w*(4*n):ℝ)*M) hdpos hε D hJ hp hfix hbudget + (fun i=>historyCollision p u s (steps:=i.val)) + · intro i a h x y + exact orderedCollision_nonneg _ _ _ _ _ _ + · intro i a ha h hh + exact historyCollision_closed_budget hd (p a) (u a) s width M b hs (hband a ha) + heven hsmall (hinc a ha) (hocc a ha) i.val h _ + +theorem exists_open_reciprocal_round (hd : finrank K V=5) + (μ : Law κ) (p : κ→Law (Slots w n→FlagPair K V)) + (elig : κ→(Fin w×Bool)→Finset (Fin n)) (rounds rem : ℕ) + (hrounds : 0activeDeficit (p a) (blockActive (elig a)) J)≤budget) + (u : κ→Slots w n→ℝ) (b : Fin 7) (hs : 2 ≤ s) + (hband : ∀a,0<μ a→∀i,BandCondition (Real.log (Nat.card K)) width (u a i) b) + (hodd : b.val%2≠0) (hwide : Real.log 32+3*s + ∑j∈blockActive (historyUnused (elig z.1.1) z.1.2), + preRoundBad μ p elig i.val J d ε (historyCollision p u s) z j)≤ + budget/d+(2*budget/rounds)/ε := by + have hh:=exists_small_deletion_round μ p elig rounds rem hrounds hrem hS J d ε budget + 0 hdpos hε D hJ hp hfix hbudget (fun i=>historyCollision p u s (steps:=i.val)) + (fun i a h x y=>orderedCollision_nonneg _ _ _ _ _ _) (by + intro i a ha h hh + have hz : ∀x y,historyCollision p u s a h x y=0 := by + intro x y + exact ordered_open_collision_zero hd _ _ (u a) s width b hs (hband a ha) hodd hwide x y + simp only [hz,Finset.sum_const_zero,le_refl]) + simpa only [zero_div,add_zero] using hh +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/PrimitiveMessageWeights.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/PrimitiveMessageWeights.lean new file mode 100644 index 0000000000000000000000000000000000000000..b5f7b07b8e68e1e2da12a9d92c1a4ef5411adcef --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/PrimitiveMessageWeights.lean @@ -0,0 +1,247 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.MessageWeights +import OAI.Combinatorics.RamseyFive.Geometry.FourFinitePredictor + +namespace OAI + +section +namespace SharpRamseyFive.ReverseCap +open MessageWeights +open scoped Classical BigOperators +variable {B : Type} [Fintype B] +omit [Fintype B] in +lemma universalFresh_weight (W : Finset B) (H : ℕ) (q : ℝ) : + (∑m : UniversalFreshMessage W H q,Real.exp (-universalFreshCost W H q m))≤1 := by + have hh := sigma_header_weight (Fin (H+1)) (fun n : Fin (H+1)=>FreshMessage W n q) + (fun n m=>Real.log (W.card+1:ℝ)+Real.log (Fintype.card (Fin (cardCutoff q m.1 W.card n)):ℝ)) + (fun n=>by + simpa only [Fintype.card_fin,Nat.cast_add,Nat.cast_one] using + sigma_header_weight (Fin (W.card+1)) (fun k : Fin (W.card+1)=>Fin (cardCutoff q k W.card n)) + (fun k _=>Real.log (Fintype.card (Fin (cardCutoff q k W.card n)):ℝ)) + (fun k=>log_card_weight _)) + simpa only [universalFreshCost,Fintype.card_fin,Nat.cast_add,Nat.cast_one,add_assoc] using hh +end SharpRamseyFive.ReverseCap +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence MessageWeights +open scoped Classical BigOperators LinearAlgebra.Projectivization +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] +omit [Finite K] [FiniteDimensional K V] in +lemma baseFinite_weight (U : Finset (ℙ K V)) (P τ : ℝ) : + (∑m : BaseMessage U P τ,Real.exp (-baseFiniteCost U P τ m))≤1 := by + simpa only [baseFiniteCost,Fintype.card_fin,Nat.cast_add,Nat.cast_one] using + sigma_header_weight (Fin (Fintype.card (ℙ K V)+1)) (fun n : Fin (Fintype.card (ℙ K V)+1)=>baseAlphabet U n P τ) + (fun n _=>Real.log (Fintype.card (baseAlphabet U n P τ):ℝ)) (fun n=>log_card_weight _) +omit [Finite K] [FiniteDimensional K V] in +lemma scoreFinite_weight [Fintype V] (U : Finset (ℙ K V)) (σ P τ : ℝ) : + (∑m : ScoredMessage U σ P τ,Real.exp (-scoreFiniteCost U σ P τ m))≤1 := by + simpa only [scoreFiniteCost,Fintype.card_fin,Nat.cast_add,Nat.cast_one] using + sigma_header_weight (Fin (Fintype.card (ℙ K V)+1)) (fun n : Fin (Fintype.card (ℙ K V)+1)=>ScoredPayload U n σ P τ) + (fun n _=>Real.log (Fintype.card (ScoredPayload U n σ P τ):ℝ)) (fun n=>log_card_weight _) +end SharpRamseyFive.ScoreGeometry +namespace SharpRamseyFive.ProjectiveIncidence +open Module MessageWeights ReverseCap ScoreGeometry +open scoped Classical BigOperators LinearAlgebra.Projectivization +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] +omit [Finite K] [FiniteDimensional K V] in +lemma ambientPair_weight (UB : Finset (ℙ K (Dual K V))) (W : Finset (ℙ K V)) (H : ℕ) (q : ℝ) + (t : AmbientPairTape K V H q) : + (∑m : AmbientPairMessage UB W H q t,Real.exp (-ambientPairCost UB W H q t m))≤1 := by + exact sigma_weight_le _ _ _ _ (universalFresh_weight W H q) (fun _=>universalFresh_weight _ H q) +end SharpRamseyFive.ProjectiveIncidence + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveRestriction MessageWeights ReverseCap +open scoped Classical BigOperators LinearAlgebra.Projectivization NNReal + +def FinitePredictor.Normalized {A B : Type} [Fintype A] [Fintype B] + (p : FinitePredictor A B) : Prop := + ∀t,(∑m : p.Message t,Real.exp (-p.cost t m))≤1 + +lemma FinitePredictor.normalized_transform {A B C D : Type} + [Fintype A] [Fintype B] [Fintype C] [Fintype D] + (p : FinitePredictor A B) (e : A↪C) (h : Finset C→Finset D→Finset A×Finset B) + (hp : p.Normalized) : (p.transform e h).Normalized := hp + +lemma FinitePredictor.normalized_family {A B I : Type} + [Fintype A] [Fintype B] [Fintype I] (p : I→FinitePredictor A B) + (s : Finset A→Finset B→I) (hp : ∀i,(p i).Normalized) : + (FinitePredictor.family p s).Normalized := by + intro t + let (i : I) : Fintype ((p i).Message (t i)) := (p i).messageFintype (t i) + exact sigma_header_weight I (fun i=>(p i).Message (t i)) + (fun i m=>(p i).cost (t i) m) (fun i=>hp i (t i)) + +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] in +lemma reversedBase_weight (UT : Finset (ℙ K (Dual K V))) (P τ : ℝ) (H : ℕ) (q : ℝ) + (t : ReversedBaseTape UT P τ H q) : + (∑m : ReversedBaseMessage UT P τ H q t,Real.exp (-reversedBaseCost UT P τ H q t m))≤1 := by + exact sigma_weight_le _ _ _ _ (baseFinite_weight UT P τ) (fun _=>universalFresh_weight _ H q) +omit [Finite K] [FiniteDimensional K V] in +lemma twoPublic_weight (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (H : ℕ) (q : ℝ) (t : TwoPublicTape U UT P τ H q) : + (∑m : TwoPublicMessage U UT P τ H q t,Real.exp (-twoPublicCost U UT P τ H q t m))≤1 := by + convert sum_bit_weight _ _ _ _ (baseFinite_weight U P τ) (reversedBase_weight UT P τ H q t.2) using 1 + congr 1 + funext m + cases m <;> rfl +omit [Finite K] in +lemma orientedFinite_weight + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) + (d H : ℕ) (q P c B : ℝ) (hf : f.Normalized) (hr : r.Normalized) : + (orientedFinitePredictor f r U UT d H q P c B).Normalized := by + intro t + have hs := sigma_weight_le (r.Message t.2.1) + (fun m=>UniversalFreshMessage (r.decoded t.2.1 m) H q) + (r.cost t.2.1) (fun m u=>universalFreshCost (r.decoded t.2.1 m) H q u) + (hr t.2.1) (fun _=>universalFresh_weight _ H q) + convert sum_bit_weight _ _ _ _ (hf t.1) hs using 1 + congr 1 + funext m + cases m <;> rfl +end SharpRamseyFive.ScoreGeometry +namespace SharpRamseyFive.ProjectiveRestriction +open Module ProjectiveIncidence ScoreGeometry +open scoped Classical BigOperators LinearAlgebra.Projectivization +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] in +lemma planePublic_weight (A : Submodule K V) [Fintype (ℙ K A)] + [Fintype (ℙ K (Dual K A))] [Fintype (ℙ K (Dual K (Dual K A)))] + (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) (P τ : ℝ) (k : ℕ) + (t : PlanePublicTape A U UT P τ k) : + (∑m : PlanePublicMessage A U UT P τ k t,Real.exp (-planePublicCost A U UT P τ k t m))≤1 := + twoPublic_weight _ _ _ _ _ _ t +end SharpRamseyFive.ProjectiveRestriction +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveRestriction MessageWeights +open scoped Classical BigOperators LinearAlgebra.Projectivization NNReal +variable {K : Type} [Field K] [Finite K] [Fintype K] + [Fintype (ℙ K (Fin 4→K))] [Fintype (ℙ K (Dual K (Fin 4→K)))] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K A)] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K (Dual K A))] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K (Dual K (Dual K A)))] +lemma threeLocal_weight (U : Finset (ℙ K (Fin 4→K))) + (UT : Finset (ℙ K (Dual K (Fin 4→K)))) (σ P τ : ℝ) (br : ThreePublicIndex K σ) + (t : ThreeLocalTape U UT σ P τ br) : + (∑m : ThreeLocalMessage U UT σ P τ br t,Real.exp (-threeLocalCost U UT σ P τ br t m))≤1 := by + rcases br with b|b + · exact baseFinite_weight U P τ + · rcases b with b|b + · exact scoreFinite_weight U σ P τ + · exact planePublic_weight _ U UT P τ _ t +lemma threePublic_weight (U : Finset (ℙ K (Fin 4→K))) + (UT : Finset (ℙ K (Dual K (Fin 4→K)))) (σ P τ : ℝ) + (t : ThreePublicTape U UT σ P τ) : + (∑m : ThreePublicMessage U UT σ P τ t,Real.exp (-threePublicCost U UT σ P τ t m))≤1 := + sigma_header_weight _ _ _ (fun br=>threeLocal_weight U UT σ P τ br (t br)) +end SharpRamseyFive.ScoreGeometry +end + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveRestriction MessageWeights +open scoped Classical BigOperators LinearAlgebra.Projectivization NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] +lemma threeFinite_weight (hd : finrank K V=4) (σ : ℝ) + (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + (threeFinitePredictor hd σ U UT P τ R L₀).Normalized := by + let : Fintype K := Fintype.ofFinite _ + let : Finite (Dual K (Fin 4→K)) := Module.finite_of_finite K + let : Fintype (ℙ K (Fin 4→K)) := Fintype.ofFinite _ + let : Fintype (ℙ K (Dual K (Fin 4→K))) := Fintype.ofFinite _ + let (A : Submodule K (Fin 4→K)) : Finite (Dual K A) := Module.finite_of_finite K + let (A : Submodule K (Fin 4→K)) : Finite (Dual K (Dual K A)) := Module.finite_of_finite K + let (A : Submodule K (Fin 4→K)) : Fintype (ℙ K A) := Fintype.ofFinite _ + let (A : Submodule K (Fin 4→K)) : Fintype (ℙ K (Dual K A)) := Fintype.ofFinite _ + let (A : Submodule K (Fin 4→K)) : Fintype (ℙ K (Dual K (Dual K A))) := Fintype.ofFinite _ + unfold threeFinitePredictor + try dsimp only + intro t + exact threePublic_weight _ _ σ P τ t +lemma threeOrientedFinite_weight [Fintype (ℙ K (Dual K (Dual K V)))] + (hd : finrank K V=4) (σ : ℝ) + (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + (threeOrientedFinitePredictor hd σ U UT P τ R L₀).Normalized := by + exact orientedFinite_weight _ _ _ _ _ _ _ _ _ _ + (threeFinite_weight _ _ _ _ _ _ _ _) (threeFinite_weight _ _ _ _ _ _ _ _) +end SharpRamseyFive.ScoreGeometry +namespace SharpRamseyFive.ProjectiveRestriction +open Module ProjectiveIncidence ScoreGeometry +open scoped Classical BigOperators LinearAlgebra.Projectivization NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] +lemma threeFlatFinite_weight (A : Submodule K V) (hA : finrank K A=4) (σ : ℝ) + (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) + (τ P : ℝ) (R : ℕ) (L₀ : ℝ≥0) (k : ℕ) : + (threeFlatFinitePredictor A hA σ U UT τ P R L₀ k).Normalized := by + let : Finite A := Module.finite_of_finite K + let : Finite (Dual K A) := Module.finite_of_finite K + let : Finite (Dual K (Dual K A)) := Module.finite_of_finite K + let : Fintype (ℙ K A) := Fintype.ofFinite _ + let : Fintype (ℙ K (Dual K A)) := Fintype.ofFinite _ + let : Fintype (ℙ K (Dual K (Dual K A))) := Fintype.ofFinite _ + unfold threeFlatFinitePredictor + try dsimp only + apply FinitePredictor.normalized_transform + exact threeOrientedFinite_weight _ _ _ _ _ _ _ _ +end SharpRamseyFive.ProjectiveRestriction +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveRestriction MessageWeights +open scoped Classical BigOperators LinearAlgebra.Projectivization NNReal +variable {K : Type} [Field K] [Finite K] [Fintype K] + [Fintype (ℙ K (Fin 5→K))] [Fintype (ℙ K (Dual K (Fin 5→K)))] + [∀ A : Submodule K (Fin 5→K),Fintype (ℙ K A)] + [∀ A : Submodule K (Fin 5→K),Fintype (ℙ K (Dual K A))] + [∀ A : Submodule K (Fin 5→K),Fintype (ℙ K (Dual K (Dual K A)))] +lemma fourLocal_weight (U : Finset (ℙ K (Fin 5→K))) + (UT : Finset (ℙ K (Dual K (Fin 5→K)))) (σ P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (br : FourPublicIndex K σ) : (fourLocalPredictor U UT σ P τ R L₀ br).Normalized := by + rcases br with b|b + · intro t;exact baseFinite_weight U P τ + · rcases b with b|b + · intro t;exact scoreFinite_weight U σ P τ + · rcases b with b|b + · intro t;exact planePublic_weight _ U UT P τ _ t + · exact threeFlatFinite_weight _ _ σ U UT τ P R L₀ _ +lemma fourCertified_weight (U : Finset (ℙ K (Fin 5→K))) + (UT : Finset (ℙ K (Dual K (Fin 5→K)))) (σ P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + (fourCertifiedPredictor U UT σ P τ R L₀).Normalized := + FinitePredictor.normalized_family _ _ (fourLocal_weight U UT σ P τ R L₀) +end SharpRamseyFive.ScoreGeometry +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveRestriction MessageWeights +open scoped Classical BigOperators LinearAlgebra.Projectivization NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] +lemma fourFinite_weight (hd : finrank K V=5) (σ : ℝ) + (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + (fourFinitePredictor hd σ U UT P τ R L₀).Normalized := by + let : Fintype K := Fintype.ofFinite _ + let : Finite (Dual K (Fin 5→K)) := Module.finite_of_finite K + let : Fintype (ℙ K (Fin 5→K)) := Fintype.ofFinite _ + let : Fintype (ℙ K (Dual K (Fin 5→K))) := Fintype.ofFinite _ + let (A : Submodule K (Fin 5→K)) : Finite (Dual K A) := Module.finite_of_finite K + let (A : Submodule K (Fin 5→K)) : Finite (Dual K (Dual K A)) := Module.finite_of_finite K + let (A : Submodule K (Fin 5→K)) : Fintype (ℙ K A) := Fintype.ofFinite _ + let (A : Submodule K (Fin 5→K)) : Fintype (ℙ K (Dual K A)) := Fintype.ofFinite _ + let (A : Submodule K (Fin 5→K)) : Fintype (ℙ K (Dual K (Dual K A))) := Fintype.ofFinite _ + unfold fourFinitePredictor + try dsimp only + apply FinitePredictor.normalized_transform + exact fourCertified_weight _ _ σ P τ R L₀ +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/ProductHistory.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/ProductHistory.lean new file mode 100644 index 0000000000000000000000000000000000000000..e69be2aa4b64f274d34561f48d70c8c430368880 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/ProductHistory.lean @@ -0,0 +1,149 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.Swap +import OAI.Combinatorics.RamseyFive.Entropy.HistoryCylinder + +namespace OAI + +section +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + {α β : ι → Type*} [∀ i, Fintype (α i)] [∀ i, Fintype (β i)] + +noncomputable def piRectangle (E : ∀ i, Finset (α i)) : Finset (∀ i, α i) := + Finset.univ.filter (fun x => ∀ i, x i ∈ E i) + +lemma eventMass_piRectangle (p : ∀ i, Law (α i)) (E : ∀ i, Finset (α i)) : + eventMass (piLaw p) (piRectangle E) = ∏ i, eventMass (p i) (E i) := by + simp only [eventMass, piRectangle, Finset.sum_filter, piLaw] + calc + _ = ∑ x : ∀ i, α i, ∏ i, if x i ∈ E i then p i (x i) else 0 := by + apply Finset.sum_congr rfl + intro x hx + rw [Fintype.prod_ite_zero] + _ = _ := by + rw [← Fintype.prod_sum (fun i a => if a ∈ E i then p i a else 0)] + apply Finset.prod_congr rfl + intro i hi + rw [←Finset.sum_filter, Finset.filter_univ_mem] + +lemma conditionOn_piRectangle (p : ∀ i, Law (α i)) (E : ∀ i, Finset (α i)) + (hE : ∀ i, 0 < eventMass (p i) (E i)) : + conditionOn (piLaw p) (piRectangle E) + (by rw [eventMass_piRectangle]; exact Finset.prod_pos (fun i _ => hE i)) = + piLaw (fun i => conditionOn (p i) (E i) (hE i)) := by + apply Law.ext + funext x + rw [conditionOn_apply, eventMass_piRectangle] + simp only [piRectangle, Finset.mem_filter, Finset.mem_univ, true_and, + piLaw, conditionOn] + rw [Fintype.prod_ite_zero, Finset.prod_div_distrib] + +lemma map_piLaw (p : ∀ i, Law (α i)) (f : ∀ i, α i → β i) : + map (piLaw p) (fun x i => f i (x i)) = piLaw (fun i => map (p i) (f i)) := by + apply Law.ext + funext y + simp only [map, piLaw] + calc + _ = ∑ x : ∀ i, α i, ∏ i, if f i (x i) = y i then p i (x i) else 0 := by + apply Finset.sum_congr rfl + intro x hx + rw [Fintype.prod_ite_zero] + simp only [funext_iff] + _ = _ := (Fintype.prod_sum (fun i a => if f i a = y i then p i a else 0)).symm + +lemma uniformType_pi [∀ i, Nonempty (α i)] : + uniformType (∀ i, α i) = piLaw (fun i => uniformType (α i)) := by + apply Law.ext + funext x + simp only [uniformType, uniformOn, Finset.mem_univ, ite_true, Finset.card_univ, + piLaw, Fintype.card_pi, Nat.cast_prod, Finset.prod_inv_distrib] + +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.PermutationCylinder +open FiniteEntropy +open scoped Classical BigOperators +variable {ι α Ω H : Type*} [Fintype ι] [DecidableEq ι] [Fintype α] + [Fintype Ω] [Fintype H] + +theorem blocks_posterior (S : ι → Finset α) (e : ι → Equiv.Perm α) : + conditionOn (piLaw (fun _ : ι => uniformType (Equiv.Perm α))) + (piRectangle (fun i => cylinderSet (S i) (e i))) + (by + rw [eventMass_piRectangle] + exact Finset.prod_pos + (fun i _ => uniformType_event_pos _ (cylinderSet_nonempty (S i) (e i)))) = + piLaw (fun i => uniformOn (cylinderSet (S i) (e i)) (cylinderSet_nonempty (S i) (e i))) := by + rw [conditionOn_piRectangle _ _ + (fun i => uniformType_event_pos _ (cylinderSet_nonempty (S i) (e i)))] + congr 1 + funext i + exact conditionOn_uniformType _ (cylinderSet_nonempty (S i) (e i)) + +theorem blocks_fresh_law (S : ι → Finset α) (e : ι → Equiv.Perm α) + (x y : ι → α) (hx : ∀ i, x i ∉ S i) (hy : ∀ i, y i ∉ (S i).map (e i).toEmbedding) : + map (piLaw (fun i => conditionOn (uniformType (Equiv.Perm α)) + (cylinderSet (S i) (e i)) (uniformType_event_pos _ (cylinderSet_nonempty (S i) (e i))))) + (fun r i => r i (x i)) y = + ∏ i, (1 : ℝ) / (Fintype.card α - (S i).card : ℕ) := by + rw [map_piLaw (fun i => conditionOn (uniformType (Equiv.Perm α)) + (cylinderSet (S i) (e i)) (uniformType_event_pos _ (cylinderSet_nonempty (S i) (e i)))) + (fun i (r : Equiv.Perm α) => r (x i))] + change (∏ i, map (conditionOn (uniformType (Equiv.Perm α)) _ _) (fun p => p (x i)) (y i)) = _ + apply Finset.prod_congr rfl + intro i hi + exact posterior_draw (S i) (e i) (hx i) (hy i) + +end SharpRamseyFive.PermutationCylinder + +end + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {B A : Type} [Fintype B] [Fintype A] + +lemma piLaw_update_balance (μ : B → Law A) (s : B → A) (b : B) (a : A) : + piLaw μ s * μ b a = piLaw μ (Function.update s b a) * μ b (s b) := by + classical + have h₁ := Finset.mul_prod_erase Finset.univ (fun c => μ c (s c)) (Finset.mem_univ b) + have h₂ := Finset.mul_prod_erase Finset.univ + (fun c => μ c (Function.update s b a c)) (Finset.mem_univ b) + have hprod : (∏ c ∈ Finset.univ.erase b, μ c (Function.update s b a c)) = + ∏ c ∈ Finset.univ.erase b, μ c (s c) := by + apply Finset.prod_congr rfl + intro c hc + rw [Function.update_of_ne (Finset.mem_erase.mp hc).1] + simp only [Function.update_self, hprod] at h₂ + change (∏ c, μ c (s c)) * μ b a = (∏ c, μ c (Function.update s b a c)) * μ b (s b) + rw [←h₁, ←h₂] + ring + +theorem independent_selected_identity (μ : B → Law A) + (f : (B → A) → B → A → ℝ) + (hown : ∀ s b a i, f (Function.update s b a) b i = f s b i) (b : B) : + (∑ s, piLaw μ s * f s b (s b)) = + ∑ s, piLaw μ s * (∑ a, μ b a * f s b a) := by + classical + have hh := Fintype.sum_equiv (RepresentativeAverage.swapAt (A := A) b) + (fun z => piLaw μ z.1 * μ b z.2 * f z.1 b (z.1 b)) + (fun z => piLaw μ z.1 * μ b z.2 * f z.1 b z.2) (by + intro z + simp only [RepresentativeAverage.swapAt, Function.Involutive.toPerm, Equiv.coe_fn_mk] + rw [hown] + rw [←piLaw_update_balance] + ) + simp only [Fintype.sum_prod_type] at hh + calc + _ = ∑ s, ∑ a, piLaw μ s * μ b a * f s b (s b) := by + apply Finset.sum_congr rfl + intro s _ + rw [←Finset.sum_mul, ←Finset.mul_sum, (μ b).sum_one, mul_one] + _ = ∑ s, ∑ a, piLaw μ s * μ b a * f s b a := hh + _ = _ := by simp only [Finset.mul_sum, mul_assoc] + +end +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/PublicComposition.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/PublicComposition.lean new file mode 100644 index 0000000000000000000000000000000000000000..41dcb32171ea121be97ab3a03a0b75ddfe219558 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/PublicComposition.lean @@ -0,0 +1,56 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.OptionComposition + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {α β γ δ : Type*} [Fintype α] [Fintype β] [Fintype γ] [Fintype δ] +lemma map_const (p : Law α) (b : β) : map p (fun _=>b)=pureLaw b := by + apply Law.ext + funext x + by_cases hx : b=x + · subst x + simp [map,pureLaw,p.sum_one] + · simp [map,pureLaw,hx,Ne.symm hx] + +lemma adaptive_output_mass (p : Law α) (next : α→Law β) (out : α→β→γ) (c : γ) : + map (adaptiveLaw p next) (fun z=>out z.1 z.2) c= + ∑a,p a*map (next a) (out a) c := by + simp only [map,adaptiveLaw,Fintype.sum_prod_type,Finset.mul_sum,mul_ite,mul_zero] + +lemma public_composition (p : Law α) (tape : Law β) (firstOut : α→γ) + (out : γ→β→δ) (next : γ→Law δ) + (hm : ∀c,map tape (out c)=next c) : + map (adaptiveLaw p (fun _=>tape)) (fun z=>out (firstOut z.1) z.2)= + map (adaptiveLaw (map p firstOut) next) Prod.snd := by + apply Law.ext + funext d + rw [adaptive_output_mass (out:=fun a b=>out (firstOut a) b)] + have hr := adaptive_output_mass (map p firstOut) next (fun _ x=>x) d + change map (adaptiveLaw (map p firstOut) next) Prod.snd d = ∑ a, map p firstOut a * map (next a) id d at hr + simp only [map_id] at hr + rw [hr,sum_map] + apply Finset.sum_congr rfl + intro a _ + rw [hm] + +lemma optionCompose_eq_second (p : Law (Option α)) + (next : Option α→Law (Option β)) (hn : next none=pureLaw none) : + optionCompose p next=map (adaptiveLaw p next) Prod.snd := by + apply Law.ext + funext b + have h₁ := adaptive_output_mass p next (fun a b=>a.bind fun _=>b) b + have h₂ := adaptive_output_mass p next (fun _ b=>b) b + rw [optionCompose,h₁,h₂] + apply Finset.sum_congr rfl + intro a _ + congr 1 + cases a with + | none => + change map (next none) (fun _ : Option β => (none : Option β)) b = map (next none) id b + rw [map_const,map_id,hn] + | some a => rfl +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/ReadyFailure.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/ReadyFailure.lean new file mode 100644 index 0000000000000000000000000000000000000000..68a2ee50b8716cbc78407f8402995ba37d4b2709 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/ReadyFailure.lean @@ -0,0 +1,54 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.GuardedNode + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {Ω α : Type*} [Fintype Ω] [Fintype α] +lemma map_decoded_none_event {M : Ω → Type*} (p : Law Ω) + (enc : ∀ t, Option (M t)) (dec : ∀ t, M t → α) : + map p (fun t => (enc t).map (dec t)) none = + eventMass p (Finset.univ.filter (fun t => enc t = none)) := by + simp only [map, eventMass, Finset.sum_filter, Option.map_eq_none_iff] +end SharpRamseyFive.FiniteEntropy +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology +noncomputable section +local instance (priority := high) actualReadyFailurePropDecidable (P : Prop) : Decidable P := Classical.propDecidable P + +theorem eventually_oriented_ready_encoded_failure {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))], + ∀ (hd : finrank K V=5) (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) + (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K), + Nat.card K=q → Range η σ D R → (L₀:ℝ)=L η σ D → + 0≤b → b≤Cb*D*σ^(6*beta η) → + OriginalNodeReady A₀ UA B₀ UB (9/10) (σ^(-1000*beta η)) → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(A₀.card:ℝ)*B₀.card → + let f := fourFinitePredictor hd σ UA UB (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fourFinitePredictor (K:=K) (V:=Dual K V) (by simpa using hd) σ UB + (UA.map bidualPoint.toEmbedding) (P η σ D R) (σ^(-800*beta η)) R L₀ + eventMass (orientedNodeTapeLaw f r (1000*(Nat.card K)^2) (Nat.card K)) + (Finset.univ.filter (fun t => orientedGuardedNodeEncoded f r σ hσ hq hd.le A₀ UA B₀ UB hA₀ hB₀ + (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) t = none)) ≤ + 5*Real.exp (-(Nat.card K:ℝ)) := by + filter_upwards [eventually_oriented_guarded_node_failure hη hη' Cb hCb] with σ hn + intro D b R L₀ q K V _ _ _ _ _ _ _ _ _ hd A₀ UA B₀ UB hA₀ hB₀ hσ hq hcard hr hL hb hbhi hready hprod + have hh := hn D b R L₀ q K V hd A₀ UA B₀ UB hA₀ hB₀ hσ hq hcard hr hL hb hbhi hready hprod + dsimp only at hh ⊢ + rw [map_decoded_none_event] at hh + convert hh using 1 + congr 1 + ext t + simp only [Finset.mem_filter] +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/ReciprocalCodeNumerics.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/ReciprocalCodeNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..b41199440f3062dbb218e86a067d17dd8deb6074 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/ReciprocalCodeNumerics.lean @@ -0,0 +1,106 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.StageNumerics +import OAI.Combinatorics.RamseyFive.Entropy.WindowBudgetNumerics + +namespace OAI + +namespace SharpRamseyFive.ParameterHierarchy +open Filter Real Marking ProjectiveIncidence +open scoped Topology +noncomputable section +lemma log_length_three {σ q η : ℝ} (hη : 0<η) (hη' : η<1/10) + (hσ : 6≤σ) (hq : Real.exp σ=q) (l : ℕ) (hl : (l:ℝ)≤q*σ^(1+η)) : + Real.log (l+1)≤3*σ := by + have hp : 0<σ := by linarith + have hσ1 : 1≤σ := by linarith + have hpow : σ^(1+η)≤σ^2 := by + rw [←Real.rpow_two] + exact Real.rpow_le_rpow_of_exponent_le hσ1 (by linarith) + have hexp : σ^2≤Real.exp σ := by + have hh:=Real.pow_div_factorial_le_exp σ hp.le 3 + norm_num only [Nat.factorial] at hh + have hs3 : σ^2≤σ^3/6 := by nlinarith [mul_nonneg (sq_nonneg σ) (show 0≤σ-6 by linarith)] + exact hs3.trans hh + have hlen : (l:ℝ)≤q*q := hl.trans (mul_le_mul_of_nonneg_left (hpow.trans (hexp.trans_eq hq)) (by rw [←hq];positivity)) + have hq1 : 1≤q := by rw [←hq];exact Real.one_le_exp hp.le + have hsum : (l:ℝ)+1≤2*(q*q) := by nlinarith + have hh:=Real.log_le_log (by positivity : (0:ℝ)<(l:ℝ)+1) hsum + have hqp : 0.trans_eq (by ring) +end +end SharpRamseyFive.ParameterHierarchy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/ReciprocalLossBudget.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/ReciprocalLossBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..58747b19bf47d5203c94336e28bd32c1eaee9728 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/ReciprocalLossBudget.lean @@ -0,0 +1,108 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.StreamGeometry +import OAI.Combinatorics.RamseyFive.Marking.ReciprocalDropNumerics +import OAI.Combinatorics.RamseyFive.Marking.ReciprocalRoundNumerics + +namespace OAI + +namespace SharpRamseyFive.ParameterHierarchy +open Filter Real Marking +open scoped Topology +noncomputable section + +lemma reciprocal_total_fraction {w n l bad drop : ℝ} + (hw : 0≤w) (hn : 0≤n) (hl : l≤w*n) + (hbad : bad≤w*n/10000) (hdrop : drop≤w/10000) : + 5*bad+(2*n)*drop+(w*(2*n))*(1/10000)≤(w*(2*n)-l)/10 := by + have := mul_le_mul_of_nonneg_left hdrop (show 0≤2*n by positivity) + nlinarith [mul_nonneg hw hn] + +theorem eventually_reciprocal_loss_budget {η : ℝ} (hη : 0<η) + (c C Cm : ℝ) (hc : 0 + calc + G≤2*D*σ^(3*beta η) := hGc rfl + _ ≤2*w*D*σ^(3*beta η) := by gcongr;linarith + _ ≤_ := by + have hh : (2:ℝ)≤2+24/c := le_add_of_nonneg_right (by positivity) + exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right hh hw0) hDp.le) (by positivity) + | false => + calc + G≤3*σ := hGo rfl + _ ≤(3/(c/8))*w*D*σ^(3*beta η) := + open_gap_scale hη hσ (by positivity) hw0 hDp.le (hopen rfl) + _ = (24/c)*w*D*σ^(3*beta η) := by ring + _ ≤_ := by gcongr; linarith + have hh:=hround q D w n B T rem M hq hD hw0 hn hB hB' hT hr hM hMhi closed hclosed + have hh':=hdrop D w G hD hw0 hG + apply reciprocal_total_fraction hw0 hn.le hl + · simpa only [mul_one_div] using hh + · simpa only [mul_one_div] using hh' +end +end SharpRamseyFive.ParameterHierarchy + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical +noncomputable section +variable {Ω β κ : Type} [Fintype Ω] [Fintype β] [Fintype κ] + {n : ℕ} {p : Law Ω} {x : Ω→Fin n→β} {Λ J Λ' J' : ℝ} +def ContextDescription.mono (C : ContextDescription (κ:=κ) p x Λ J) + (hΛ : Λ≤Λ') (hJ : J≤J') : ContextDescription (κ:=κ) p x Λ' J' where + context:=C.context + domain:=C.domain + entropy_bound:=C.entropy_bound.trans hΛ + contains:=C.contains + cap z hz i:=(C.cap z hz i).trans hJ +lemma card_le_of_log_le {a b : ℝ} (ha : 0≤a) (hb : 0 -f a) + refine ⟨a,ha,?_⟩ + have he : mean p (fun a=> -f a)= -mean p f := by + simp only [mean,mul_neg,Finset.sum_neg_distrib] + rw [he] at hh + linarith +end +end SharpRamseyFive.FiniteEntropy +namespace SharpRamseyFive.ProjectiveIncidence +open Module SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem reciprocal_support_product (hdim : finrank K V=5) + (μ : Law (Finset (ℙ K V))) (ν : Law (Finset (ℙ K (Dual K V)))) + (a b : ℝ) (ha : 0ν) + let f:=fun z:Finset (ℙ K V)×Finset (ℙ K (Dual K V))=> + relationMass Incident (uniformWeight z.1) (uniformWeight z.2) + obtain ⟨⟨A,B⟩,hp,hh⟩:=mean_exists_le p f + have hμ : 0<μ A := by + change 0<μ A*ν B at hp + exact (mul_pos_iff.mp hp).resolve_right (fun h=>(μ.nonneg A).not_gt h.1) |>.1 + have hν : 0<ν B := by + change 0<μ A*ν B at hp + exact (mul_pos_iff.mp hp).resolve_right (fun h=>(μ.nonneg A).not_gt h.1) |>.2 + have hm : mean p f≤1/(4*(Nat.card K:ℝ)) := by + dsimp only [p] + rw [mean_adaptive] + simpa only [mean,Finset.mul_sum,mul_assoc,f] using hs + have hAc : 0<(A.card:ℝ):=ha.trans_le (hA A hμ) + have hBc : 0<(B.card:ℝ):=hb.trans_le (hB B hν) + have hsparse : (incidences A B:ℝ)≤(A.card:ℝ)*B.card/(4*(Nat.card K:ℝ)) := by + have ht:=hh.trans hm + dsimp only [f] at ht + rw [relationMass_uniform,div_le_iff₀ (mul_pos hAc hBc)] at ht + simpa only [incidences,div_mul_eq_mul_div,one_mul] using ht + exact (mul_le_mul (hA A hμ) (hB B hν) hb.le hAc.le).trans + (sparse_rectangle_size (d:=4) hdim (by decide) A B hsparse) + +theorem reciprocal_u_monotone (hdim : finrank K V=5) + (μ : Law (Finset (ℙ K V))) (ν : Law (Finset (ℙ K (Dual K V)))) + (u v k : ℝ) + (hA : ∀ A,0<μ A→Real.exp (5*Real.log (Nat.card K)-u-k)/2≤(A.card:ℝ)) + (hB : ∀ B,0<ν B→Real.exp (v-k)/2≤(B.card:ℝ)) + (hs : (∑ A,∑ B,μ A*ν B*relationMass Incident (uniformWeight A) (uniformWeight B))≤ + 1/(4*(Nat.card K:ℝ))) : v≤u+2*k+Real.log 64 := by + have hq : 0<(Nat.card K:ℝ) := by exact_mod_cast Nat.zero_lt_of_lt (Finite.one_lt_card (α:=K)) + have hh:=reciprocal_support_product hdim μ ν _ _ (by positivity) (by positivity) hA hB hs + have he : Real.exp (5*Real.log (Nat.card K)-u-k)/2*(Real.exp (v-k)/2)= + (Nat.card K:ℝ)^5*Real.exp (v-u-2*k)/4 := by + rw [div_mul_div_comm,←Real.exp_add] + have heck : (5*Real.log (Nat.card K)-u-k)+(v-k)=5*Real.log (Nat.card K)+(v-u-2*k) := by ring + have hfive : Real.exp (5*Real.log (Nat.card K))=Real.exp (Real.log (Nat.card K))^5 := by + simpa using Real.exp_nat_mul (Real.log (Nat.card K)) 5 + rw [heck,Real.exp_add,hfive,Real.exp_log hq] + norm_num + rw [he] at hh + have hexp : Real.exp (v-u-2*k)≤64 := by nlinarith [pow_pos hq 5] + have hhlog := (Real.log_le_log (Real.exp_pos _) hexp) + rw [Real.log_exp] at hhlog + linarith +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/Rectangle.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/Rectangle.lean new file mode 100644 index 0000000000000000000000000000000000000000..94a84fc4d5efc1bcf35dbc65477c7e99a1095e38 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/Rectangle.lean @@ -0,0 +1,337 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.Hits +import OAI.Combinatorics.RamseyFive.Geometry.CoreGeometry + +namespace OAI + +namespace SharpRamseyFive.CoreGeometry +open Module +open scoped LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + +theorem count_subspaces : Nat.card (Submodule K V)≤ + (finrank K V+1)*Nat.card V^(finrank K V) := by + classical + let : Finite V := Module.finite_of_finite K + let f : (Σ r : Fin (finrank K V+1),Fin r.val → V) → Submodule K V := + fun v => Submodule.span K (Set.range v.2) + have hf : Function.Surjective f := by + intro U + let r : Fin (finrank K V+1) := ⟨finrank K U,Nat.lt_succ_of_le (Submodule.finrank_le U)⟩ + use ⟨r,fun i => (Module.finBasis K U i).val⟩ + change Submodule.span K (Set.range (U.subtype ∘ Module.finBasis K U))=U + rw [Set.range_comp,←Submodule.map_span,(Module.finBasis K U).span_eq, + Submodule.map_subtype_top] + have hc := Nat.card_le_card_of_surjective f hf + rw [Nat.card_sigma] at hc + calc + _ ≤ ∑ r : Fin (finrank K V+1),Nat.card (Fin r.val → V) := hc + _ ≤ ∑ _r : Fin (finrank K V+1),Nat.card V^finrank K V := by + apply Finset.sum_le_sum + intro r _ + rw [Nat.card_fun,Nat.card_fin] + exact Nat.pow_le_pow_right (Nat.card_pos (α := V)) (Nat.le_of_lt_succ r.isLt) + _ = _ := by simp + +omit [FiniteDimensional K V] in + +theorem card_rectangle (U : Submodule K (Module.Dual K V)) : + Nat.card {ab : ℙ K V × ℙ K (Module.Dual K V) // + ab.1.submodule≤U.dualCoannihilator ∧ ab.2.submodule≤U} = + (∑ i∈Finset.range (finrank K U.dualCoannihilator),Nat.card K^i)* + (∑ i∈Finset.range (finrank K U),Nat.card K^i) := by + let e : {ab : ℙ K V × ℙ K (Module.Dual K V) // + ab.1.submodule≤U.dualCoannihilator ∧ ab.2.submodule≤U} ≃ + {a : ℙ K V // a.submodule≤U.dualCoannihilator} × + {b : ℙ K (Module.Dual K V) // b.submodule≤U} := + { toFun := fun ab => (⟨ab.val.1,ab.property.1⟩,⟨ab.val.2,ab.property.2⟩) + invFun := fun ab => ⟨(ab.1.val,ab.2.val),⟨ab.1.property,ab.2.property⟩⟩ + left_inv := fun _ => rfl + right_inv := fun _ => rfl } + rw [Nat.card_congr e,Nat.card_prod, + SharpRamseyFive.ProjectiveIncidence.card_subspacePoints, + SharpRamseyFive.ProjectiveIncidence.card_subspacePoints] + +theorem card_rectangle_le (hdim : finrank K V=5) + (U : Submodule K (Module.Dual K V)) : + (Nat.card {ab : ℙ K V × ℙ K (Module.Dual K V) // + ab.1.submodule≤U.dualCoannihilator ∧ ab.2.submodule≤U}:ℝ)≤4*(Nat.card K:ℝ)^3 := by + rw [card_rectangle] + push_cast + have hq : (2:ℝ)≤Nat.card K := by exact_mod_cast (Finite.one_lt_card (α := K)) + have hd := Subspace.finrank_add_finrank_dualCoannihilator_eq U + rw [hdim] at hd + by_cases hU : finrank K U=0 + · simp only [hU,Finset.range_zero,Finset.sum_empty,mul_zero] + positivity + by_cases hD : finrank K U.dualCoannihilator=0 + · simp only [hD,Finset.range_zero,Finset.sum_empty,zero_mul] + positivity + have hpow : (finrank K U.dualCoannihilator-1)+(finrank K U-1)=3 := by omega + calc + _ ≤ (2*(Nat.card K:ℝ)^(finrank K U.dualCoannihilator-1))* + (2*(Nat.card K:ℝ)^(finrank K U-1)) := + mul_le_mul (geometric_card_bound _ hq _) (geometric_card_bound _ hq _) + (Finset.sum_nonneg fun _ _ => by positivity) (by positivity) + _ = 4*(Nat.card K:ℝ)^((finrank K U.dualCoannihilator-1)+(finrank K U-1)) := by + rw [pow_add]; ring + _ = _ := by rw [hpow] +end SharpRamseyFive.CoreGeometry + +namespace SharpRamseyFive.FiniteEntropy +open scoped BigOperators Classical +variable {α : Type*} [Fintype α] + +lemma exp_single_hit (p : Law α) (H : Finset α) : + (∑ a,p a*Real.exp (if a∈H then 1 else 0))= + 1+(Real.exp 1-1)*eventMass p H := by + have ht (a : α) : p a*Real.exp (if a∈H then 1 else 0)= + p a+(Real.exp 1-1)*(if a∈H then p a else 0) := by + split_ifs + · ring + · simp + simp only [ht,Finset.sum_add_distrib,←Finset.mul_sum,p.sum_one] + rw [←Finset.sum_filter,Finset.filter_univ_mem] + rfl + +theorem exp_hits (p : Law α) (H : Finset α) (n : ℕ) : + (∑ x,iid p (Fin n) x*Real.exp (hits H x))= + (1+(Real.exp 1-1)*eventMass p H)^n := by + induction n with + | zero => simp [iid,hits] + | succ n hn => + rw [sum_iid_succ] + have ht (a : α) (x : Fin n → α) : + p a*iid p (Fin n) x*Real.exp (hits H (Fin.cons a x))= + (p a*Real.exp (if a∈H then 1 else 0))*(iid p (Fin n) x*Real.exp (hits H x)) := by + rw [hits_cons,Real.exp_add] + ring + simp_rw [ht,←Finset.mul_sum,hn,←Finset.sum_mul,exp_single_hit] + rw [pow_succ] + ring + +theorem exp_hits_le (p : Law α) (H : Finset α) (n : ℕ) : + (∑ x,iid p (Fin n) x*Real.exp (hits H x))≤ + Real.exp (2*n*eventMass p H) := by + rw [exp_hits] + have hm := eventMass_nonneg p H + have hone : 1≤Real.exp 1 := Real.one_le_exp (by norm_num) + have htwo : Real.exp 1-1≤2 := by linarith [Real.exp_one_lt_d9] + calc + _ ≤ (Real.exp (2*eventMass p H))^n := by + apply pow_le_pow_left₀ (by positivity) + have h := Real.add_one_le_exp (2*eventMass p H) + nlinarith + _ = _ := by rw [←Real.exp_nat_mul]; congr 1; ring + +theorem iid_occupancy_tail (p : Law α) (H : Finset α) (n : ℕ) (M : ℝ) : + eventMass (iid p (Fin n)) (Finset.univ.filter fun x => M≤hits H x)≤ + Real.exp (2*n*eventMass p H-M) := by + have hh := event_markov (iid p (Fin n)) (fun x => Real.exp (hits H x)) + (fun x => (Real.exp_pos _).le) (Real.exp M) + (Finset.univ.filter fun x => M≤hits H x) (by + intro x hx + exact Real.exp_le_exp.mpr (Finset.mem_filter.mp hx).2) + have hl := hh.trans (exp_hits_le p H n) + apply (mul_le_mul_iff_right₀ (Real.exp_pos M)).mp + calc + _ ≤ Real.exp (2*n*eventMass p H) := hl + _ = Real.exp M*Real.exp (2*n*eventMass p H-M) := by + rw [←Real.exp_add]; congr 1; ring + +lemma event_biUnion_le {ι : Type*} [Fintype ι] (p : Law α) (E : ι → Finset α) : + eventMass p (Finset.univ.biUnion E)≤∑ i,eventMass p (E i) := by + have ht (a : α) : (if a∈Finset.univ.biUnion E then p a else 0)≤ + ∑ i,if a∈E i then p a else 0 := by + by_cases ha : a∈Finset.univ.biUnion E + · obtain ⟨i,_,hi⟩ := Finset.mem_biUnion.mp ha + simp only [ha,ite_true] + have h := Finset.single_le_sum (s := Finset.univ) (f := fun i => if a∈E i then p a else 0) + (fun i _ => by split_ifs; exact p.nonneg a; exact le_rfl) (Finset.mem_univ i) + simpa only [hi,ite_true] using h + · simp only [ha,ite_false] + exact Finset.sum_nonneg fun i _ => by split_ifs; exact p.nonneg a; exact le_rfl + have h := Finset.sum_le_sum (s := Finset.univ) (fun a _ => ht a) + rw [Finset.sum_comm] at h + simpa only [←Finset.sum_filter,Finset.filter_univ_mem,eventMass] using h + +theorem all_occupancy_tail {ι : Type*} [Fintype ι] (p : Law α) + (H : ι → Finset α) (n : ℕ) (μ M : ℝ) + (hμ : ∀ i,(n:ℝ)*eventMass p (H i)≤μ) : + eventMass (iid p (Fin n)) (Finset.univ.biUnion fun i => + Finset.univ.filter fun x => M≤hits (H i) x)≤ + (Fintype.card ι:ℝ)*Real.exp (2*μ-M) := by + calc + _ ≤ ∑ i,eventMass (iid p (Fin n)) (Finset.univ.filter fun x => M≤hits (H i) x) := + by + convert event_biUnion_le (iid p (Fin n)) (fun i => + Finset.univ.filter fun x => M≤hits (H i) x) using 1 + congr 1 + ext x + simp + _ ≤ ∑ _i : ι,Real.exp (2*μ-M) := Finset.sum_le_sum fun i _ => + (iid_occupancy_tail p (H i) n M).trans (Real.exp_le_exp.mpr (by linarith [hμ i])) + _ = _ := by simp +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.FiniteEntropy +open scoped BigOperators +variable {α : Type*} [Fintype α] + +noncomputable def uniform (h : 0 ⟨ab.val.1,⟨ab.val.2,ab.property⟩⟩ + invFun := fun ab => ⟨(ab.1,ab.2.val),ab.2.property⟩ + left_inv := fun _ => rfl + right_inv := fun _ => rfl } + rw [Nat.card_congr e,Nat.card_sigma] + simp only [card_hyperplanes_through_point,Finset.sum_const,Finset.card_univ,nsmul_eq_mul] + rw [←Nat.card_eq_fintype_card,Projectivization.card_of_finrank K V rfl] + simp + +theorem card_flags_lower (hdim : finrank K V=5) : + Nat.card K^7≤Nat.card (Flag (K := K) (V := V)) := by + rw [card_flags,hdim] + have h1 : Nat.card K^4≤∑ i∈Finset.range 5,Nat.card K^i := + Finset.single_le_sum (fun _ _ => Nat.zero_le _) (by simp) + have h2 : Nat.card K^3≤∑ i∈Finset.range (5-1),Nat.card K^i := + Finset.single_le_sum (fun _ _ => Nat.zero_le _) (by simp) + have h := Nat.mul_le_mul h1 h2 + rwa [←pow_add] at h + +lemma flags_nonempty (hdim : finrank K V=5) : 0 ab.val.1.submodule≤U.dualCoannihilator ∧ ab.val.2.submodule≤U + +omit [FiniteDimensional K V] [Finite K] in +lemma card_rectangle_flags (U : Submodule K (Module.Dual K V)) : + (rectangle U).card=Nat.card {ab : ℙ K V × ℙ K (Module.Dual K V) // + ab.1.submodule≤U.dualCoannihilator ∧ ab.2.submodule≤U} := by + let e : {ab : Flag (K := K) (V := V) // + ab.val.1.submodule≤U.dualCoannihilator ∧ ab.val.2.submodule≤U} ≃ + {ab : ℙ K V × ℙ K (Module.Dual K V) // + ab.1.submodule≤U.dualCoannihilator ∧ ab.2.submodule≤U} := + { toFun := fun ab => ⟨ab.val.val,ab.property⟩ + invFun := fun ab => ⟨⟨ab.val,by + apply (incident_iff ab.val.1 ab.val.2).mpr + have ha := (rep_mem_iff ab.val.1 U.dualCoannihilator).mpr ab.property.1 + have hb := (rep_mem_iff ab.val.2 U).mpr ab.property.2 + exact (Submodule.mem_dualCoannihilator ab.val.1.rep).mp ha ab.val.2.rep hb⟩,ab.property⟩ + left_inv := fun _ => rfl + right_inv := fun _ => rfl } + rw [rectangle,←Fintype.card_subtype,←Nat.card_eq_fintype_card,Nat.card_congr e] + +theorem rectangle_mass (hdim : finrank K V=5) (U : Submodule K (Module.Dual K V)) : + eventMass (uniform (flags_nonempty hdim)) (rectangle U)≤4/(Nat.card K:ℝ)^4 := by + rw [uniform_event,card_rectangle_flags] + have hn : (Nat.card K:ℝ)^7≤Fintype.card (Flag (K := K) (V := V)) := by + rw [←Nat.card_eq_fintype_card] + exact_mod_cast (card_flags_lower hdim) + have hq : (0:ℝ) + Finset.univ.filter fun x => 40*Real.log (Nat.card K)≤hits (rectangle U) x) + ≤6/(Nat.card K:ℝ)^7 := by + have hq : (0:ℝ)Z.map (flatEmbedding A)) + p none≤2*Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

Z.map (flatEmbedding A)) none≤_ ∧ _ + refine ⟨by rw [map_option_none];exact hfail,?_⟩ + intro W hW + obtain ⟨Z,hZ,he⟩ := map_positive pp (Option.map fun Z=>Z.map (flatEmbedding A)) (some W) hW + cases Z with + | none => simp at he + | some Z => + have he' : Z.map (flatEmbedding A)=W := Option.some.inj he + subst W + have hz := hgood Z hZ + obtain ⟨hu,hcard,hcap⟩ := section_decoder A X UX Z hz.1 + refine ⟨hu,?_,?_⟩ + · rw [hcard] + exact hz.2.1.trans (mul_le_mul_of_nonneg_right (by exact_mod_cast hsX) (Real.exp_pos _).le) + · rw [hcap,Finset.inter_comm] + have hc := hz.2.2 + nlinarith only [hc,hxs] + +end SharpRamseyFive.ProjectiveRestriction + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/RelationMassCrossed.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/RelationMassCrossed.lean new file mode 100644 index 0000000000000000000000000000000000000000..603f2e03c54bf7d4e3fa03cfc414046ee37b595b --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/RelationMassCrossed.lean @@ -0,0 +1,24 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.EventWeight + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {α β γ δ : Type*} [Fintype α] [Fintype β] [Fintype γ] [Fintype δ] + +lemma relationMass_crossed (p : Law (α×β)) (q : Law (γ×δ)) (R : α→δ→Prop) : + relationMass R (first p) (second q)= + eventWeight (product p q) (fun z=>R z.1.1 z.2.2) := by + rw [SharpRamseyFive.LowConflict.crossed_endpoint] + unfold relationMass + rw [Finset.sum_filter,Fintype.sum_prod_type] + apply Finset.sum_congr rfl + intro a _ + apply Finset.sum_congr rfl + intro y _ + split_ifs <;> simp + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/Repair.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/Repair.lean new file mode 100644 index 0000000000000000000000000000000000000000..a6361d168bd612f18cdad097deebe3cbb1c91571 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/Repair.lean @@ -0,0 +1,51 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.GoodRepresentative + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {α β : Type*} [Fintype α] [Fintype β] + +lemma Law.exists_positive (p : Law α) : ∃ a,0

le_antisymm (h a) (p.nonneg a)) + rw [p.sum_one] at hz + norm_num at hz + +def Law.repair (p : Law α) (a : α) : α := + if 0

uniformWeight A a)] + have h:=supported_levels_conditioned_domination μ p E hE C hC hsub hdom a + rw [positiveLaw_mean μ (fun A=>uniformWeight A a)] at h + exact h +end +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/RepresentativeSet.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/RepresentativeSet.lean new file mode 100644 index 0000000000000000000000000000000000000000..cf9fcc62a2bf2c953af4ca5e7cc97c51def103ff --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/RepresentativeSet.lean @@ -0,0 +1,123 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.SplitLaw +import OAI.Combinatorics.RamseyFive.Decoding.Swap + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped BigOperators Classical NNReal +variable {B A T β : Type} [Fintype B] [Fintype A] [Fintype T] [Fintype β] + +noncomputable local instance : DecidableEq ((B × A) ⊕ T) := Classical.decEq _ +noncomputable local instance (E : Finset ((B × A) ⊕ T)) : DecidableEq E := Classical.decEq _ + +noncomputable def representativeSet (s : B → A) : Finset ((B × A) ⊕ T) := + Finset.univ.image fun b => Sum.inl (b,s b) + +omit [Fintype A] [Fintype T] in +lemma mem_representativeSet_left (s : B → A) (b : B) (a : A) : + Sum.inl (b,a) ∈ representativeSet (T := T) s ↔ a=s b := by + simp [representativeSet,eq_comm] + +omit [Fintype A] [Fintype T] in +lemma not_mem_representativeSet_right (s : B → A) (t : T) : + Sum.inr t ∉ representativeSet s := by simp [representativeSet] + +noncomputable def coordinateInformation (p : Law (((B × A) ⊕ T) → β)) + (i j : (B × A) ⊕ T) : ℝ≥0 := + ⟨information (pair p (fun x => x j) (fun x => x i)),information_nonneg _⟩ + +noncomputable def blockInformation (p : Law (((B × A) ⊕ T) → β)) + (s : B → A) (b : B) (a : A) : ℝ≥0 := + (Finset.univ.erase b).sup fun c => coordinateInformation p (Sum.inl (b,a)) (Sum.inl (c,s c)) + +noncomputable def middleInformation (p : Law (((B × A) ⊕ T) → β)) + (s : B → A) (t : T) : ℝ≥0 := + Finset.univ.sup fun c => coordinateInformation p (Sum.inr t) (Sum.inl (c,s c)) + +lemma blockInformation_own_independent (p : Law (((B × A) ⊕ T) → β)) + (s : B → A) (b : B) (a i : A) : + blockInformation p (Function.update s b a) b i=blockInformation p s b i := by + apply Finset.sup_congr rfl + intro c hc + rw [Function.update_of_ne (Finset.mem_erase.mp hc).1] + +lemma blockInformation_le_reveal (p : Law (((B × A) ⊕ T) → β)) + (s : B → A) (b : B) (a : A) : + (blockInformation p s b a:ℝ) ≤ information + (mapSnd (reveal p (representativeSet s)) (fun x => x (Sum.inl (b,a)))) := by + let z : ℝ≥0 := ⟨information (mapSnd (reveal p (representativeSet s)) (fun x => x (Sum.inl (b,a)))),information_nonneg _⟩ + change (blockInformation p s b a:ℝ) ≤ (z:ℝ) + rw [NNReal.coe_le_coe] + apply Finset.sup_le + intro c _ + exact reveal_coordinate_information_le p (representativeSet s) + ⟨Sum.inl (c,s c),(mem_representativeSet_left s c (s c)).mpr rfl⟩ (Sum.inl (b,a)) + +lemma middleInformation_le_reveal (p : Law (((B × A) ⊕ T) → β)) + (s : B → A) (t : T) : + (middleInformation p s t:ℝ) ≤ information + (mapSnd (reveal p (representativeSet s)) (fun x => x (Sum.inr t))) := by + let z : ℝ≥0 := ⟨information (mapSnd (reveal p (representativeSet s)) (fun x => x (Sum.inr t))),information_nonneg _⟩ + change (middleInformation p s t:ℝ) ≤ (z:ℝ) + rw [NNReal.coe_le_coe] + apply Finset.sup_le + intro c _ + exact reveal_coordinate_information_le p (representativeSet s) + ⟨Sum.inl (c,s c),(mem_representativeSet_left s c (s c)).mpr rfl⟩ (Sum.inr t) + +theorem representative_unselected_le_cost (p : Law (((B × A) ⊕ T) → β)) (s : B → A) : + (∑ b,∑ a∈Finset.univ.erase (s b),(blockInformation p s b a:ℝ))+ + (∑ t,(middleInformation p s t:ℝ)) ≤ revealCost p (representativeSet s) := by + classical + let f : ((B × A) ⊕ T) → ℝ := fun i => + information (mapSnd (reveal p (representativeSet s)) (fun x => x i)) + have he : revealCost p (representativeSet s)= + (∑ b,∑ a∈Finset.univ.erase (s b),f (Sum.inl (b,a)))+∑ t,f (Sum.inr t) := by + unfold revealCost + change (∑ i∈(representativeSet s)ᶜ,f i)=_ + have hfilt : (representativeSet (T := T) s)ᶜ=Finset.univ.filter (fun i => i∉representativeSet s) := by ext i; simp + rw [hfilt,Finset.sum_filter,Fintype.sum_sum_type] + simp only [mem_representativeSet_left,not_mem_representativeSet_right, + not_false_eq_true,ite_true,Fintype.sum_prod_type] + congr 1 + apply Finset.sum_congr rfl + intro b _ + rw [←Finset.sum_filter] + rw [Finset.filter_ne'] + rw [he] + apply add_le_add + · apply Finset.sum_le_sum + intro b _ + apply Finset.sum_le_sum + intro a _ + exact blockInformation_le_reveal p s b a + · exact Finset.sum_le_sum fun t _ => middleInformation_le_reveal p s t + +theorem representative_selected_identity (p : Law (((B × A) ⊕ T) → β)) : + (Fintype.card A:ℝ)*(∑ s : B → A,∑ b,(blockInformation p s b (s b):ℝ))= + ∑ s : B → A,∑ b,∑ a,(blockInformation p s b a:ℝ) := by + apply RepresentativeAverage.selected_sum (fun s b a => (blockInformation p s b a:ℝ)) + intro s b a i + exact congrArg NNReal.toReal (blockInformation_own_independent p s b a i) + +theorem representative_all_le_twice_cost (p : Law (((B × A) ⊕ T) → β)) + (hsize : 2≤Fintype.card A) : + (∑ s : B → A,((∑ b,∑ a,(blockInformation p s b a:ℝ))+ + ∑ t,(middleInformation p s t:ℝ))) ≤ + 2*(∑ s : B → A,revealCost p (representativeSet s)) := by + have hb := RepresentativeAverage.all_sum_le_twice_unselected + (fun s b a => (blockInformation p s b a:ℝ)) + (fun _ _ _ => NNReal.coe_nonneg _) (by + intro s b a i + exact congrArg NNReal.toReal (blockInformation_own_independent p s b a i)) hsize + have hm : 0≤∑ s : B → A,∑ t,(middleInformation p s t:ℝ) := by + exact Finset.sum_nonneg fun s _ => Finset.sum_nonneg fun t _ => NNReal.coe_nonneg _ + have hc := Finset.sum_le_sum (fun s (_ : s∈(Finset.univ : Finset (B → A))) => + representative_unselected_le_cost p s) + simp only [Finset.sum_add_distrib] at hc ⊢ + linarith + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/RetainedCounters.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/RetainedCounters.lean new file mode 100644 index 0000000000000000000000000000000000000000..7016a89c43fd037d1e4118883d00c9e9ea03c441 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/RetainedCounters.lean @@ -0,0 +1,100 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.OrientedTreeCost + +namespace OAI + +namespace SharpRamseyFive.MessageWeights +open FiniteEntropy +open scoped Classical BigOperators +universe u v +variable {A : Type u} [Fintype A] + +def CountedMessage (n : A→ℕ) (T : ℕ) := (a : A) × (Fin (n a)→Fin (T+1)) +noncomputable instance (n : A→ℕ) (T : ℕ) : Fintype (CountedMessage n T) := + inferInstanceAs (Fintype ((a : A) × (Fin (n a)→Fin (T+1)))) +noncomputable def countedCost (c : A→ℝ) (n : A→ℕ) (T : ℕ) + (m : CountedMessage n T) : ℝ := c m.1+(n m.1:ℝ)*Real.log (T+1) +lemma count_slots_weight (n T : ℕ) : + (∑_x : Fin n→Fin (T+1),Real.exp (-((n:ℝ)*Real.log (T+1))))≤1 := by + have h := log_card_weight (Fin n→Fin (T+1)) + simpa only [Fintype.card_fun,Fintype.card_fin,Nat.cast_pow,Nat.cast_add, + Nat.cast_one,Real.log_pow] using h +lemma counted_weight (c : A→ℝ) (hc : (∑a,Real.exp (-c a))≤1) + (n : A→ℕ) (T : ℕ) : + (∑m : CountedMessage n T,Real.exp (-countedCost c n T m))≤1 := by + exact sigma_weight_le A (fun a=>Fin (n a)→Fin (T+1)) c + (fun a _=>(n a:ℝ)*Real.log (T+1)) hc (fun a=>count_slots_weight (n a) T) + +lemma counted_entropy_bound {J : Type v} [Fintype J] (p : Law J) + (c : A→ℝ) (hc : (∑a,Real.exp (-c a))≤1) (n : A→ℕ) (T N : ℕ) + (e : J → CountedMessage n T) (B : ℝ) + (hb : ∀j,c (e j).1≤B) (hn : ∀j,n (e j).1≤N) : + entropy (map p e)≤B+(N:ℝ)*Real.log (T+1) := by + apply entropy_map_le_bound p e (countedCost c n T) (counted_weight c hc n T) + intro j + apply add_le_add (hb j) + exact mul_le_mul_of_nonneg_right (by exact_mod_cast hn j) + (Real.log_nonneg (by have h := Nat.cast_nonneg (α:=ℝ) T; linarith)) +end SharpRamseyFive.MessageWeights + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry PivotTree BinaryTree Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology BigOperators + +theorem eventually_actual_counted_context_entropy {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))], + ∀ (hd : finrank K V=5) (ι J : Type) [Fintype J] (p : Law J) + (A₀ : J→ι→Finset (ℙ K V)) (B₀ : J→ι→Finset (ℙ K (Dual K V))) + (hA₀ : ∀j i,(A₀ j i).Nonempty) (hB₀ : ∀j i,(B₀ j i).Nonempty) + (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K), + Nat.card K=q → Range η σ D R → (L₀:ℝ)=L η σ D → + 0≤b → b≤Cb*D*σ^(6*beta η) → + (∀j i,(Nat.card K:ℝ)^5*Real.exp (-b)≤((A₀ j i).card:ℝ)*(B₀ j i).card) → + let f := fun C : PivotContext K V => + fourFinitePredictor hd σ C.1 C.2 (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun C : PivotContext K V => + fourFinitePredictor (K:=K) (V:=Dual K V) (by simpa using hd) σ C.2 + (C.1.map bidualPoint.toEmbedding) (P η σ D R) (σ^(-800*beta η)) R L₀ + let X := nodeChargeConstant*(Nat.card K:ℝ)*(P η σ D R) + ∀ (tree : BinaryTree ι) (ω : OrientedPivotTreeTape f r tree) (C : PivotContext K V), + let e := fun j=>orientedPivotTreeEncoded f r σ hσ hq hd.le + (A₀ j) (B₀ j) (hA₀ j) (hB₀ j) (9/100000) (9/10) + (σ^(-1000*beta η)) (P η σ D R) (by norm_num) tree ω C + ∀ (T : ℕ) (counts : ∀j,Fin ((orientedPivotTreeRetained f r tree ω C (e j)).numNodes) → Fin (T+1)), + entropy (map p (fun j=>(⟨e j,counts j⟩ : + MessageWeights.CountedMessage (fun m=>(orientedPivotTreeRetained f r tree ω C m).numNodes) T)))≤ + X*tree.height*(pivotPotential C+(b+1+2*Real.log (320/((9:ℝ)/100000)+320))*tree.numNodes)+ + (Real.log 2+X*(b+1+P η σ D R))*tree.numNodes+ + (2*(tree.numNodes:ℝ)+1)*Real.log 2+(tree.numNodes:ℝ)*Real.log (T+1) := by + filter_upwards [eventually_oriented_tree_cost hη hη' Cb hCb] with σ hn + intro D b R L₀ q K V _ _ _ _ _ _ _ _ _ hd ι J _ p A₀ B₀ hA₀ hB₀ hσ hq hcard hr hL hb hbhi hp + dsimp only + intro tree ω C T counts + let f := fun U : PivotContext K V=>fourFinitePredictor hd σ U.1 U.2 + (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun U : PivotContext K V=>fourFinitePredictor (K:=K) (V:=Dual K V) + (by simpa using hd) σ U.2 (U.1.map bidualPoint.toEmbedding) + (P η σ D R) (σ^(-800*beta η)) R L₀ + have hw := fourPivotTree_weight (ι:=ι) hd σ (P η σ D R) (σ^(-800*beta η)) R L₀ tree ω C + apply MessageWeights.counted_entropy_bound p (orientedPivotSlotCost f r tree ω C) hw + (fun m=>(orientedPivotTreeRetained f r tree ω C m).numNodes) T tree.numNodes + · intro j + have hc := hn D b R L₀ q K V hd ι (A₀ j) (B₀ j) (hA₀ j) (hB₀ j) + hσ hq hcard hr hL hb hbhi (hp j) tree ω C + have hs := TreeCodec.slotCost_le_original + (fun _ : ι=>OrientedPivotTape f r) (fun _ : ι=>OrientedPivotMessage f r) + (fun _ : ι=>orientedPivotLeft f r) (fun _ : ι=>orientedPivotRight f r) + (fun _ U t m=>orientedNodeCost (f U) (r U) U.1 U.2 (1000*(Nat.card K)^2) (Nat.card K) t m) + tree ω C (orientedPivotTreeEncoded f r σ hσ hq hd.le (A₀ j) (B₀ j) (hA₀ j) (hB₀ j) + (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) tree ω C) + exact hs.trans (add_le_add hc le_rfl) + · intro j + exact orientedPivotTree_retained_nodes f r tree ω C _ +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/RevealDomains.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/RevealDomains.lean new file mode 100644 index 0000000000000000000000000000000000000000..efa30a381926acbd03c8f385583680ea7eb1f2b6 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/RevealDomains.lean @@ -0,0 +1,228 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.BlockReveal + +namespace OAI + +noncomputable section + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped Classical BigOperators +variable {ι β : Type*} [Fintype ι] [Fintype β] +local instance : DecidableEq ι := Classical.decEq _ +local instance (E : Finset ι) : DecidableEq E := Classical.decEq _ + +lemma mean_mono_pos {α : Type*} [Fintype α] (p : Law α) {f g : α → ℝ} + (h : ∀ a, 0 < p a → f a ≤ g a) : mean p f ≤ mean p g := by + apply Finset.sum_le_sum + intro a _ + by_cases hz : p a = 0 + · simp [hz] + · exact mul_le_mul_of_nonneg_left (h a (lt_of_le_of_ne (p.nonneg a) (Ne.symm hz))) (p.nonneg a) + +lemma reveal_positive (p : Law (ι → β)) (E : Finset ι) (a : E → β) (x : ι → β) + (h : 0 < reveal p E (a,x)) : 0 < p x ∧ (fun i : E => x i.val) = a := by + obtain ⟨y,hy,he⟩ := map_positive p (fun y => ((fun i : E => y i.val),y)) (a,x) h + have hxy : y = x := congrArg Prod.snd he + subst y + exact ⟨hy,congrArg Prod.fst he⟩ + +lemma fiber_reveal_support (p : Law (ι → β)) (E : Finset ι) (a : E → β) + (x : ι → β) (hx : 0 < fiber (reveal p E) a x) : 0 < p x := by + by_cases ha : 0 < first (reveal p E) a + · apply (reveal_positive p E a x _).1 + rw [mass_eq_first_mul_fiber] + exact mul_pos ha hx + · simpa only [fiber, dite_eq_right ha, second_reveal] using hx + +lemma fiber_reveal_agrees (p : Law (ι → β)) (E : Finset ι) (a : E → β) + (ha : 0 < first (reveal p E) a) (x : ι → β) + (hx : 0 < fiber (reveal p E) a x) : (fun i : E => x i.val) = a := by + apply (reveal_positive p E a x _).2 + rw [mass_eq_first_mul_fiber] + exact mul_pos ha hx + +def InDomains (p : Law (ι → β)) (D : ι → Finset β) : Prop := + ∀ x, 0 < p x → ∀ i, x i ∈ D i + +lemma InDomains.fiber {p : Law (ι → β)} {D : ι → Finset β} (h : InDomains p D) + (E : Finset ι) (a : E → β) : InDomains (fiber (reveal p E) a) D := by + intro x hx i + exact h x (fiber_reveal_support p E a x hx) i + +lemma InDomains.entropy_cap {p : Law (ι → β)} {D : ι → Finset β} + (h : InDomains p D) (J : ℝ) (hJ : ∀ i, Real.log (D i).card ≤ J) (i : ι) : + entropy (map p (fun x => x i)) ≤ J := by + apply le_trans (entropy_support_cap _ (D i).card _) (hJ i) + exact_mod_cast Finset.card_le_card (show support (map p (fun x => x i)) ⊆ D i from by + intro b hb + obtain ⟨x,hx,rfl⟩ := map_positive p (fun x => x i) b ((mem_support _ _).mp hb) + exact h x hx i) + +def FixedOutside (p : Law (ι → β)) (U : Finset ι) : Prop := + ∀ i, i ∉ U → ∃ b, ∀ x, 0 < p x → x i = b + +lemma constant_coordinate_entropy (p : Law (ι → β)) (i : ι) (b : β) + (h : ∀ x, 0 < p x → x i = b) : entropy (map p (fun x => x i)) = 0 := by + apply le_antisymm _ (entropy_nonneg _) + calc + _ ≤ Real.log (1 : ℝ) := entropy_support_cap _ 1 (by + have hs : support (map p (fun x => x i)) ⊆ {b} := by + intro c hc + obtain ⟨x,hx,rfl⟩ := map_positive p (fun x => x i) c ((mem_support _ _).mp hc) + simp only [Finset.mem_singleton] + exact h x hx + have := Finset.card_le_card hs + simpa using (Nat.cast_le (α := ℝ)).mpr this) + _ = 0 := Real.log_one + +lemma FixedOutside.entropy_zero {p : Law (ι → β)} {U : Finset ι} + (h : FixedOutside p U) (i : ι) (hi : i ∉ U) : entropy (map p (fun x => x i)) = 0 := by + obtain ⟨b,hb⟩ := h i hi + exact constant_coordinate_entropy p i b hb + +lemma FixedOutside.fiber {p : Law (ι → β)} {U : Finset ι} (h : FixedOutside p U) + (E : Finset ι) (a : E → β) (ha : 0 < first (reveal p E) a) : + FixedOutside (fiber (reveal p E) a) (U \ E) := by + intro i hi + by_cases he : i ∈ E + · refine ⟨a ⟨i,he⟩,fun x hx => ?_⟩ + exact congrFun (fiber_reveal_agrees p E a ha x hx) ⟨i,he⟩ + · have hu : i ∉ U := fun hu => hi (Finset.mem_sdiff.mpr ⟨hu,he⟩) + obtain ⟨b,hb⟩ := h i hu + exact ⟨b,fun x hx => hb x (fiber_reveal_support p E a x hx)⟩ + +lemma FixedOutside.entropy_le_sum {p : Law (ι → β)} {U : Finset ι} + (h : FixedOutside p U) : entropy p ≤ ∑ i ∈ U, entropy (map p (fun x => x i)) := by + have ht := totalCorrelation_nonneg p + have he : (∑ i, entropy (map p (fun x => x i))) = + ∑ i ∈ U, entropy (map p (fun x => x i)) := by + exact (Finset.sum_subset (Finset.subset_univ _) (fun i _ hi => h.entropy_zero i hi)).symm + change 0 ≤ (∑ i, entropy (map p (fun x => x i))) - entropy p at ht + rw [he] at ht + exact sub_nonneg.mp ht + +def activeDeficit (p : Law (ι → β)) (U : Finset ι) (J : ℝ) : ℝ := + U.card * J - entropy p + +def marginalDeficit (p : Law (ι → β)) (U : Finset ι) (J : ℝ) : ℝ := + ∑ i ∈ U, (J - entropy (map p (fun x => x i))) + +lemma marginalDeficit_le_active {p : Law (ι → β)} {U : Finset ι} + (h : FixedOutside p U) (J : ℝ) : marginalDeficit p U J ≤ activeDeficit p U J := by + have hh := h.entropy_le_sum + simp only [marginalDeficit, activeDeficit, Finset.sum_sub_distrib, Finset.sum_const, nsmul_eq_mul] + linarith + +lemma activeDeficit_reveal (p : Law (ι → β)) (U E : Finset ι) (hEU : E ⊆ U) + (J : ℝ) (hc : ∀ i ∈ E, entropy (map p (fun x => x i)) ≤ J) : + mean (first (reveal p E)) (fun a => activeDeficit (fiber (reveal p E) a) (U \ E) J) ≤ + activeDeficit p U J := by + have hcap : entropy (first (reveal p E)) ≤ (E.card : ℝ) * J := by + apply (entropy_reveal_le_coordinate_sum p E).trans + calc + _ ≤ ∑ _i ∈ E,J := Finset.sum_le_sum hc + _ = _ := by simp + have hh := conditional_deficit_le (reveal p E) ((E.card : ℝ)*J) (((U \ E).card : ℝ)*J) hcap + rw [entropy_reveal] at hh + have hcard : ((E.card : ℝ) + (U \ E).card) = U.card := by + simpa only [add_comm] using (show ((U \ E).card : ℝ) + E.card = U.card by + exact_mod_cast Finset.card_sdiff_add_card_eq_card hEU) + simpa only [activeDeficit, mean, ←add_mul, hcard] using hh +end + +open scoped Classical BigOperators +variable {B A T β : Type} [Fintype B] [Fintype A] [Fintype T] [Fintype β] [Nonempty A] +local instance : DecidableEq ((B × A) ⊕ T) := Classical.decEq _ +local instance (E : Finset ((B × A) ⊕ T)) : DecidableEq E := Classical.decEq _ + +def blockActive (S : B → Finset A) : Finset ((B × A) ⊕ T) := + Finset.univ.filter fun i => Sum.elim (fun z : B × A => z.2 ∈ S z.1) (fun _ => True) i + +omit [Nonempty A] in +lemma mem_blockActive_left (S : B → Finset A) (b : B) (a : A) : + Sum.inl (b,a) ∈ blockActive (T := T) S ↔ a ∈ S b := by simp [blockActive] +omit [Nonempty A] in +lemma mem_blockActive_right (S : B → Finset A) (t : T) : + Sum.inr t ∈ blockActive S := by simp [blockActive] + +lemma freshBlockLaw_supported (S : B → Finset A) (hS : ∀ b, (S b).Nonempty) + (s : B → A) (hs : 0 < freshBlockLaw S s) : ∀ b, s b ∈ S b := by + intro b + by_contra h + rw [freshBlockLaw_eq S hS,piLaw_uniformOn_zero S hS s h] at hs + exact lt_irrefl _ hs + +omit [Nonempty A] in +lemma representativeSet_subset_active (S : B → Finset A) (s : B → A) + (hs : ∀ b, s b ∈ S b) : representativeSet (T := T) s ⊆ blockActive S := by + intro i hi + simp only [representativeSet, Finset.mem_image, Finset.mem_univ, true_and] at hi + obtain ⟨b,rfl⟩ := hi + exact (mem_blockActive_left S b (s b)).mpr (hs b) + +omit [Nonempty A] in +lemma blockActive_erase (S : B → Finset A) (s : B → A) : + blockActive (T := T) (eraseBlock S s) = blockActive S \ representativeSet s := by + ext i + cases i with + | inl x => rcases x with ⟨b,a⟩; simp [blockActive,eraseBlock,representativeSet, and_comm, eq_comm] + | inr t => simp [blockActive,representativeSet] + +def blockAllDeficit (J : ℝ) (p : Law (((B × A) ⊕ T) → β)) (S : B → Finset A) + (_s : B → A) : ℝ := marginalDeficit p (blockActive S) J + +theorem block_round_deficit (J : ℝ) (D : ((B × A) ⊕ T) → Finset β) + (hJ : ∀ i, Real.log (D i).card ≤ J) + (p : Law (((B × A) ⊕ T) → β)) (S : B → Finset A) + (hp : InDomains p D) (hfix : FixedOutside p (blockActive S)) + (n : ℕ) (hS : ∀ b, n ≤ (S b).card) (i : Fin n) : + blockRoundMean (blockAllDeficit J) p S n i ≤ activeDeficit p (blockActive S) J := by + induction n generalizing p S with + | zero => exact Fin.elim0 i + | succ n ih => + have hn : ∀ b, (S b).Nonempty := fun b => Finset.card_pos.mp (by have := hS b; omega) + cases i using Fin.cases with + | zero => + change mean (freshBlockLaw S) (fun _ => marginalDeficit p (blockActive S) J) ≤ _ + rw [mean_const] + exact marginalDeficit_le_active hfix J + | succ i => + change mean (freshBlockLaw S) (fun s => mean (first (reveal p (representativeSet s))) + (fun a => blockRoundMean (blockAllDeficit J) (fiber (reveal p (representativeSet s)) a) + (eraseBlock S s) n i)) ≤ _ + apply le_trans (mean_mono_pos (freshBlockLaw S) (fun s hs => ?_)) + (mean_const (freshBlockLaw S) (activeDeficit p (blockActive S) J)).le + have he : representativeSet (T := T) s ⊆ blockActive S := + representativeSet_subset_active S s (freshBlockLaw_supported S hn s hs) + calc + _ ≤ mean (first (reveal p (representativeSet s))) + (fun a => activeDeficit (fiber (reveal p (representativeSet s)) a) + (blockActive (eraseBlock S s)) J) := by + apply mean_mono_pos + intro a ha + apply ih _ _ (hp.fiber _ _) + · rw [blockActive_erase] + exact hfix.fiber _ _ ha + · exact eraseBlock_card S s n hS + _ ≤ activeDeficit p (blockActive S) J := by + rw [blockActive_erase] + exact activeDeficit_reveal p (blockActive S) (representativeSet s) he J + (fun j _ => hp.entropy_cap J hJ j) + +theorem exists_actual_pre_round_with_deficit (J : ℝ) (D : ((B × A) ⊕ T) → Finset β) + (hJ : ∀ i, Real.log (D i).card ≤ J) + (p : Law (((B × A) ⊕ T) → β)) (S : B → Finset A) + (hp : InDomains p D) (hfix : FixedOutside p (blockActive S)) + (n : ℕ) (hn : 0 by have := hS b; omega) i⟩ +end SharpRamseyFive.FiniteEntropy + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/RevealMarginalDeficit.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/RevealMarginalDeficit.lean new file mode 100644 index 0000000000000000000000000000000000000000..9f7453209dcbce9a5ff139ecf8f430e05755c14d --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/RevealMarginalDeficit.lean @@ -0,0 +1,72 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.SplitLaw + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped BigOperators Classical +variable {ι β : Type*} [Fintype ι] [Fintype β] +noncomputable local instance revealMarginalDeficitDecidableEq (E : Finset ι) : + DecidableEq E := Classical.decEq _ + +theorem reveal_marginal_deficit (p : Law (ι → β)) (E : Finset ι) (J : ℝ) + (hcap : ∀ i∈E,entropy (map p (fun x => x i)) ≤ J) : + (∑ a,first (reveal p E) a*(∑ i∈Eᶜ, + (J-entropy (map (fiber (reveal p E) a) (fun x => x i))))) ≤ + Fintype.card ι*J-entropy p := by + have hb := reveal_information_budget p E + have htc : 0 ≤ ∑ a,first (reveal p E) a*totalCorrelation (fiber (reveal p E) a) := by + exact Finset.sum_nonneg fun a _ => mul_nonneg ((first (reveal p E)).nonneg a) + (totalCorrelation_nonneg _) + have hI (i : ι) : information (mapSnd (reveal p E) (fun x => x i)) = + entropy (map p (fun x => x i))- + ∑ a,first (reveal p E) a*entropy (map (fiber (reveal p E) a) (fun x => x i)) := by + rw [information_conditional,second_mapSnd,second_reveal,first_mapSnd] + simp only [fiber_mapSnd] + have he : (∑ a,first (reveal p E) a*(∑ i∈Eᶜ, + (J-entropy (map (fiber (reveal p E) a) (fun x => x i))))) = + (Eᶜ.card:ℝ)*J-(∑ i∈Eᶜ,entropy (map p (fun x => x i)))+ + ∑ i∈Eᶜ,information (mapSnd (reveal p E) (fun x => x i)) := by + have hswap : (∑ a,first (reveal p E) a*(∑ i∈Eᶜ, + (J-entropy (map (fiber (reveal p E) a) (fun x => x i))))) = + ∑ i∈Eᶜ,∑ a,first (reveal p E) a* + (J-entropy (map (fiber (reveal p E) a) (fun x => x i))) := by + simp only [Finset.mul_sum] + rw [Finset.sum_comm] + rw [hswap] + calc + _ = ∑ i∈Eᶜ,(J-entropy (map p (fun x => x i))+ + information (mapSnd (reveal p E) (fun x => x i))) := by + apply Finset.sum_congr rfl + intro i _ + rw [hI] + simp only [mul_sub,Finset.sum_sub_distrib,←Finset.sum_mul, + (first (reveal p E)).sum_one,one_mul] + ring + _ = _ := by simp only [Finset.sum_add_distrib,Finset.sum_sub_distrib, + Finset.sum_const,nsmul_eq_mul] + have hs : (∑ i∈E,entropy (map p (fun x => x i))) ≤ (E.card:ℝ)*J := by + calc + _ ≤ ∑ _i∈E,J := Finset.sum_le_sum hcap + _ = _ := by simp + have hu := Finset.sum_add_sum_compl E (fun i => entropy (map p (fun x => x i))) + have hc : (E.card:ℝ)+(Eᶜ.card:ℝ) = Fintype.card ι := by + exact_mod_cast Finset.card_add_card_compl E + have hcm : (E.card:ℝ)*J+(Eᶜ.card:ℝ)*J = Fintype.card ι*J := by rw [←add_mul,hc] + rw [he] + change (∑ i∈Eᶜ,information (mapSnd (reveal p E) (fun x => x i)))+ + (∑ a,first (reveal p E) a*totalCorrelation (fiber (reveal p E) a)) ≤ + (∑ i,entropy (map p (fun x => x i)))-entropy p at hb + linarith + +theorem totalCorrelation_le_joint_deficit (p : Law (ι → β)) (J : ℝ) + (hcap : ∀ i,entropy (map p (fun x => x i)) ≤ J) : + totalCorrelation p ≤ Fintype.card ι*J-entropy p := by + apply sub_le_sub_right + calc + _ ≤ ∑ _i : ι,J := Finset.sum_le_sum fun i _ => hcap i + _ = _ := by simp + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/ReverseMessageCost.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/ReverseMessageCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..b341e3c7938db33a504abd18a66329d6ccf3c95a --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/ReverseMessageCost.lean @@ -0,0 +1,103 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.ReverseParameters +import OAI.Combinatorics.RamseyFive.Decoding.FreshPublicValidation +import OAI.Combinatorics.RamseyFive.Geometry.ScoredMessage + +namespace OAI + +namespace SharpRamseyFive.ReverseCap +open Module ScoreGeometry Metadata ProjectiveIncidence +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +omit [Fintype (ℙ K (Dual K V))] in +lemma projective_enclosure_gap (σ : ℝ) (hq : Real.exp σ=Nat.card K) + (hd : finrank K V≤5) (S U : Finset (ℙ K V)) (hS : S.Nonempty) (hSU : S⊆U) : + 0≤Real.log ((U.card:ℝ)/S.card) ∧ Real.log ((U.card:ℝ)/S.card)≤5*σ := by + have hs : (0:ℝ)y.1) hz.symm + +omit [Finite K] [FiniteDimensional K V] [Fintype V] in +lemma scoreFinite_sound (X U : Finset (ℙ K V)) + (n : Fin (Fintype.card (ℙ K V)+1)) (σ P τ c a : ℝ) + (code : TrainingCode V (listCap σ) (productCap σ) (Nat.card V)) + (t : ScoreTable U σ P τ) (m : ScoredMessage U σ P τ) + (hm : scoreFiniteEncoded X U n σ P τ c a code t=some m) : + t m⊆U ∧ ((t m).card:ℝ)≤(X.card:ℝ)*Real.exp (a*P) ∧ c*X.card≤((t m∩X).card:ℝ) := by + obtain ⟨z,hz,he⟩ := Option.map_eq_some_iff.mp hm + have hs := chooseMessage_sound _ t z hz + simpa only [he] using hs + +omit [Finite K] [FiniteDimensional K V] in +lemma scoreFinite_cost_of_header (X U : Finset (ℙ K V)) + (n : Fin (Fintype.card (ℙ K V)+1)) (σ P τ c a B : ℝ) + (code : TrainingCode V (listCap σ) (productCap σ) (Nat.card V)) + (hcost : Real.log (Fintype.card (ℙ K V)+1:ℝ)+ + Real.log (Fintype.card (ScoredPayload U n σ P τ):ℝ)≤B) + (t : ScoreTable U σ P τ) (m : ScoredMessage U σ P τ) + (hm : scoreFiniteEncoded X U n σ P τ c a code t=some m) : scoreFiniteCost U σ P τ m≤B := by + unfold scoreFiniteCost + rw [scoreFinite_header X U n σ P τ c a code t m hm] + exact hcost + +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical +variable {ι α : Type*} [Fintype ι] [DecidableEq ι] [Fintype α] + {Ω : ι→Type*} [∀i,Fintype (Ω i)] {M : ∀i,Ω i→Type*} + +abbrev BranchMessage (t : ∀i,Ω i) := (i : ι)×M i (t i) +noncomputable def branchDecoded (decode : ∀i t,M i t→α) (t : ∀i,Ω i) + (m : BranchMessage (M:=M) t) : α := decode m.1 (t m.1) m.2 +noncomputable def branchEncoded (i : ι) (encode : ∀t : Ω i,Option (M i t)) + (t : ∀i,Ω i) : Option (BranchMessage (M:=M) t) := + (encode (t i)).map (Sigma.mk i) + +theorem branch_output_law (p : ∀i,Law (Ω i)) (i : ι) + (encode : ∀t : Ω i,Option (M i t)) (decode : ∀i t,M i t→α) : + map (piLaw p) (fun t=>(branchEncoded i encode t).map (branchDecoded decode t))= + map (p i) (fun t=>(encode t).map (decode i t)) := by + have hh := congrArg (fun q=>map q (fun t=>(encode t).map (decode i t))) (piLaw_eval p i) + rw [map_comp] at hh + simpa only [branchEncoded,branchDecoded,Option.map_map,Function.comp_def] using hh + +omit [Fintype ι] [DecidableEq ι] [∀index,Fintype (Ω index)] in +lemma branch_header (i : ι) (encode : ∀t : Ω i,Option (M i t)) + (t : ∀i,Ω i) (m : BranchMessage (M:=M) t) + (hm : branchEncoded i encode t=some m) : m.1=i := by + obtain ⟨z,_,hz⟩ := Option.map_eq_some_iff.mp hm + exact congrArg Sigma.fst hz.symm + +omit [Fintype ι] [DecidableEq ι] [∀index,Fintype (Ω index)] in +lemma branch_sent (i : ι) (encode : ∀t : Ω i,Option (M i t)) + (t : ∀i,Ω i) (m : BranchMessage (M:=M) t) + (hm : branchEncoded i encode t=some m) : + ∃z,encode (t i)=some z ∧ Sigma.mk i z=m := Option.map_eq_some_iff.mp hm +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/SelectedRestriction.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/SelectedRestriction.lean new file mode 100644 index 0000000000000000000000000000000000000000..79b84dfd8f09855292bd485fdd5e91a891db7571 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/SelectedRestriction.lean @@ -0,0 +1,53 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.WindowPosterior + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple +open Module ProjectiveIncidence FiniteEntropy Windows Marking +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {Ω κ α β : Type} [Fintype Ω] [Fintype κ] [Fintype α] [Fintype β] + {N n l : ℕ} {admissible : (Fin N→α)→Prop} +local instance srFinDE (n : ℕ) : DecidableEq (Fin n) := Classical.decEq _ +namespace SelectedStream +lemma reindex_deficit (S : SelectedStream (Ω:=Ω) (β:=β) N n admissible) + (ctx : Ω→κ) (e : Fin l↪o Fin n) (D : κ→Fin n→Finset β) (J : ℝ) + (hD : ∀z,0(l:ℝ)*J-entropy (fiber (pair (S.reindex e).law ctx (S.reindex e).tuple) c))≤ + mean (first (pair S.law ctx S.tuple)) + (fun c=>(n:ℝ)*J-entropy (fiber (pair S.law ctx S.tuple) c)) := by + have H:=selectByContext_deficit (pair S.law ctx S.tuple) (fun _=>Finset.univ) + (fun _=>e.toEmbedding) J (fun _ _ _=>Finset.mem_univ _) + (fun _ _=>fixedOutside_univ _) (by + intro c hc i hi + exact (pair_fiber_domains S.law ctx S.tuple D hD c hc).entropy_cap J + (hcap c (by simpa only [first_pair] using hc)) i) + rw [selected_pair] at H + dsimp only [reindex] at * + simp only [Fintype.card_fin,activeDeficit,Finset.card_univ,Function.comp_def] at H + convert H using 1 + +end SelectedStream +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] +omit [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] [Fintype (ℙ K (Dual K (Dual K V)))] in +lemma reverseTuple_injective : Function.Injective (reverseTuple (K:=K) (V:=V) (N:=n)) := by + intro x y h + funext i + have H:=congrFun h i.rev + simp only [reverseTuple,Fin.rev_rev] at H + exact swapFlag.injective H +lemma changeOrientation_deficit (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N n admissible) + (ctx : Ω→κ) (J : ℝ) : + let T:=S.changeOrientation swapFlag swapFlag.symm swapFlag.symm_apply_apply + mean (first (pair T.law ctx T.tuple)) (fun c=>(n:ℝ)*J-entropy (fiber (pair T.law ctx T.tuple) c))= + mean (first (pair S.law ctx S.tuple)) (fun c=>(n:ℝ)*J-entropy (fiber (pair S.law ctx S.tuple) c)) := by + exact mean_fiber_entropy_injective S.law ctx S.tuple reverseTuple reverseTuple_injective _ +end +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/SequentialLaw.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/SequentialLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..3e5bb319f33e27e939f8dbe1c9a18e034bdfed90 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/SequentialLaw.lean @@ -0,0 +1,142 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.EventMass + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped Classical BigOperators +variable {α β γ : Type*} [Fintype α] [Fintype β] [Fintype γ] + +noncomputable def adaptiveLaw (p : Law α) (next : α→Law β) : Law (α×β) where + mass ab := p ab.1*next ab.1 ab.2 + nonneg ab := mul_nonneg (p.nonneg _) ((next _).nonneg _) + sum_one := by + simp only [Fintype.sum_prod_type,←Finset.mul_sum,(next _).sum_one,mul_one] + exact p.sum_one + +lemma adaptiveLaw_first (p : Law α) (next : α→Law β) : + first (adaptiveLaw p next)=p := by + apply Law.ext + funext a + change (∑b,p a*next a b)=p a + rw [←Finset.mul_sum,(next a).sum_one,mul_one] + +lemma map_positive (p : Law α) (f : α→β) (b : β) (hb : 0 < map p f b) : + ∃a,0

norm_num + sum_one := by simp + +theorem adaptive_option_failure (p : Law (Option α)) + (next : Option α→Law (Option β)) (ε₁ ε₂ : ℝ) (hε₂ : 0≤ε₂) + (hfirst : p none≤ε₁) (hnext : ∀a,0 < p (some a) → next (some a) none≤ε₂) : + eventMass (adaptiveLaw p next) + (Finset.univ.filter fun ab=>ab.1=none ∨ ab.2=none) ≤ ε₁+ε₂ := by + have hinner (a : Option α) (ha : 0 < p a) : + (∑b : Option β,if a=none ∨ b=none then next a b else 0) ≤ + (if a=none then 1 else 0)+ε₂ := by + cases a with + | none => simpa only [true_or,ite_true] using + (show (∑b,next none b)≤1+ε₂ by rw [(next none).sum_one];linarith) + | some a => simpa using hnext a ha + have hsum := Finset.sum_le_sum (s := Finset.univ) (fun a (_ : a∈Finset.univ)=> + show p a*(∑b : Option β,if a=none ∨ b=none then next a b else 0) ≤ + p a*((if a=none then 1 else 0)+ε₂) from by + by_cases hz : p a=0 + · simp [hz] + · exact mul_le_mul_of_nonneg_left (hinner a (lt_of_le_of_ne (p.nonneg a) (Ne.symm hz))) (p.nonneg a)) + have hl : eventMass (adaptiveLaw p next) + (Finset.univ.filter fun ab=>ab.1=none ∨ ab.2=none)= + ∑a : Option α,p a*(∑b : Option β,if a=none ∨ b=none then next a b else 0) := by + simp only [eventMass,Finset.sum_filter,Fintype.sum_prod_type,adaptiveLaw, + Finset.mul_sum,mul_ite,mul_zero] + rw [hl] + calc + _ ≤ ∑a : Option α,p a*((if a=none then 1 else 0)+ε₂) := hsum + _ = p none+ε₂ := by + simp only [mul_add,Finset.sum_add_distrib,mul_ite,mul_one,mul_zero] + rw [←Finset.sum_mul,p.sum_one,one_mul] + simp + _ ≤ ε₁+ε₂ := by linarith + +end + +open MeasureTheory +open scoped Classical BigOperators +variable {Ω α : Type*} [MeasurableSpace Ω] [Countable Ω] [MeasurableSingletonClass Ω] + [Fintype α] + +noncomputable def finiteImageLaw (μ : Measure Ω) [IsProbabilityMeasure μ] (f : Ω→α) : Law α where + mass a := μ.real {ω | f ω=a} + nonneg a := measureReal_nonneg + sum_one := by + have hd : Pairwise (fun a b : α=>Disjoint {ω | f ω=a} {ω | f ω=b}) := by + intro a b hab + apply Set.disjoint_left.mpr + intro ω ha hb + exact hab (ha.symm.trans hb) + have he : (⋃a : α,{ω | f ω=a})=Set.univ := by ext ω;simp + have hh := measureReal_iUnion_fintype (μ:=μ) hd + (fun a=>Set.Countable.measurableSet (Set.to_countable _)) + rw [he,probReal_univ] at hh + exact hh.symm + +lemma finiteImageLaw_positive (μ : Measure Ω) [IsProbabilityMeasure μ] (f : Ω→α) + (a : α) (ha : 0{ω | f ω=a}) := by + intro a _ b _ hab + apply Set.disjoint_left.mpr + intro ω ha hb + exact hab (ha.symm.trans hb) + have he : (⋃a∈E,{ω | f ω=a})={ω | f ω∈E} := by ext ω;simp + have hh := measureReal_biUnion_finset (μ:=μ) hd + (fun _ _=>Set.Countable.measurableSet (Set.to_countable _)) + rw [he] at hh + exact hh.symm + +noncomputable def chooseMessage (P : Ω→α→Prop) (ω : Ω) : Option α := + if h : ∃a,P ω a then some h.choose else none + +omit [MeasurableSpace Ω] [Countable Ω] [MeasurableSingletonClass Ω] in +lemma chooseMessage_none (P : Ω→α→Prop) (ω : Ω) : + chooseMessage P ω=none ↔ ¬∃a,P ω a := by + unfold chooseMessage + split <;> simp_all + +omit [MeasurableSpace Ω] [Countable Ω] [MeasurableSingletonClass Ω] in +lemma chooseMessage_sound (P : Ω→α→Prop) (ω : Ω) (a : α) + (h : chooseMessage P ω=some a) : P ω a := by + unfold chooseMessage at h + split at h + next hh => exact (Option.some.inj h) ▸ hh.choose_spec + next hh => contradiction + +theorem selectedMessage_failure (μ : Measure Ω) [IsProbabilityMeasure μ] + (P : Ω→α→Prop) (E : Set Ω) (ε : ℝ) + (hE : μ.real Eᶜ≤ε) (hs : ∀ω∈E,∃a,P ω a) : + finiteImageLaw μ (chooseMessage P) none≤ε := by + apply (measureReal_mono (μ:=μ) (show {ω | chooseMessage P ω=none}⊆Eᶜ from ?_)).trans hE + intro ω hω he + exact (chooseMessage_none P ω).mp hω (hs ω he) + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/SmallFiniteCost.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/SmallFiniteCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..c0c81b34a29d69824627d28d5f0ab70f78d11e81 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/SmallFiniteCost.lean @@ -0,0 +1,36 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.BaseFiniteCost + +namespace OAI + + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence SubsetEncoding FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem smallFinite_cost (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) + (hd : finrank K V≤5) (S U : Finset (ℙ K V)) (hS : S.Nonempty) (hSU : S⊆U) + (P τ : ℝ) (hP : 1≤P) (hn : (S.card:ℝ)≤100*(Nat.card K:ℝ)*P) + (t : BaseTable U P τ) (m : BaseMessage U P τ) + (hm : baseFiniteEncoded S U P τ t=some m) : + baseFiniteCost U P τ m≤110*(Nat.card K:ℝ)*P*(Real.log ((U.card:ℝ)/S.card)+P) := by + unfold baseFiniteCost + rw [baseFinite_header S U P τ t m hm,baseAlphabet_small_card U S.card P τ hn] + have hcost := (small_set_description S U hSU (Nat.card K:ℝ) P hn).2 + have hh := projective_header_le σ hσ hq hd + have hgap : 0≤Real.log ((U.card:ℝ)/S.card) := Real.log_nonneg + ((le_div_iff₀ (by exact_mod_cast hS.card_pos)).mpr (by + simpa using (show (S.card:ℝ)≤U.card by exact_mod_cast Finset.card_le_card hSU))) + have htotal : (Nat.card K:ℝ)≤(Nat.card K:ℝ)*P*(Real.log ((U.card:ℝ)/S.card)+P) := by + apply (le_mul_of_one_le_right (by positivity) hP).trans + exact le_mul_of_one_le_right (by positivity) (by linarith) + have hcost' : 100*(Nat.card K:ℝ)*P*(Real.log ((U.card:ℝ)/S.card)+1)≤ + 100*(Nat.card K:ℝ)*P*(Real.log ((U.card:ℝ)/S.card)+P) := + mul_le_mul_of_nonneg_left (by linarith) (by positivity) + nlinarith only [hcost,hh,htotal,hcost'] +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/SplitLaw.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/SplitLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8e1f6d96b166548816b85969b65f9a702ee4876 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/SplitLaw.lean @@ -0,0 +1,216 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.LogSum + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped BigOperators Classical +variable {ι κ β : Type*} [Fintype ι] [Fintype κ] [Fintype β] + +noncomputable local instance : DecidableEq (ι ⊕ κ) := Classical.decEq _ + +noncomputable def splitLaw (p : Law ((ι ⊕ κ) → β)) : Law ((ι → β) × (κ → β)) := + pair p (fun x i => x (Sum.inl i)) (fun x j => x (Sum.inr j)) + +lemma entropy_splitLaw (p : Law ((ι ⊕ κ) → β)) : entropy (splitLaw p)=entropy p := by + apply entropy_map_injective + intro x y he + funext i + cases i with + | inl i => exact congrFun (congrArg Prod.fst he) i + | inr j => exact congrFun (congrArg Prod.snd he) j + +lemma first_splitLaw_eval (p : Law ((ι ⊕ κ) → β)) (i : ι) : + map (first (splitLaw p)) (fun x => x i)=map p (fun x => x (Sum.inl i)) := by + rw [splitLaw,first_pair,map_comp] + rfl + +lemma second_splitLaw_eval (p : Law ((ι ⊕ κ) → β)) (j : κ) : + map (second (splitLaw p)) (fun x => x j)=map p (fun x => x (Sum.inr j)) := by + rw [splitLaw,second_pair,map_comp] + rfl + +theorem total_correlation_split_drop (p : Law ((ι ⊕ κ) → β)) : + totalCorrelation (ι := ι ⊕ κ) (β := β) p - + (∑ a,first (splitLaw p) a*totalCorrelation (ι := κ) (β := β) (fiber (splitLaw p) a)) = + totalCorrelation (ι := ι) (β := β) (first (splitLaw p))+ + ∑ j,information (mapSnd (splitLaw p) (fun x => x j)) := by + have hh:=total_correlation_drop (α := ι → β) (ι := κ) (β := β) (splitLaw p) + simp only [totalCorrelation,Fintype.sum_sum_type,first_splitLaw_eval, + second_splitLaw_eval,entropy_splitLaw] at hh ⊢ + linarith + +theorem information_split_budget (p : Law ((ι ⊕ κ) → β)) : + (∑ j,information (mapSnd (splitLaw p) (fun x => x j))) + + (∑ a,first (splitLaw p) a*totalCorrelation (ι := κ) (β := β) (fiber (splitLaw p) a)) ≤ + totalCorrelation (ι := ι ⊕ κ) (β := β) p := by + have hh:=total_correlation_split_drop p + have hn:=totalCorrelation_nonneg (first (splitLaw p)) + linarith + +end + +section +open scoped BigOperators Classical +variable {ι β : Type*} [Fintype ι] [Fintype β] + +noncomputable local instance (E : Finset ι) : DecidableEq E := Classical.decEq _ + +noncomputable def reveal (p : Law (ι → β)) (E : Finset ι) : Law ((E → β) × (ι → β)) := + pair p (fun x i => x i.val) id + +lemma first_reveal (p : Law (ι → β)) (E : Finset ι) : + first (reveal p E) = map p (fun x (i : E) => x i.val) := first_pair _ _ _ + +lemma second_reveal (p : Law (ι → β)) (E : Finset ι) : + second (reveal p E) = p := by rw [reveal,second_pair,map_id] + +lemma entropy_reveal (p : Law (ι → β)) (E : Finset ι) : + entropy (reveal p E) = entropy p := by + apply entropy_map_injective + intro x y he + exact congrArg Prod.snd he + +lemma information_reveal_selected (p : Law (ι → β)) (E : Finset ι) (i : ι) (hi : i∈E) : + information (mapSnd (reveal p E) (fun x => x i)) = entropy (map p (fun x => x i)) := by + let e : E := ⟨i,hi⟩ + have he : mapSnd (reveal p E) (fun x => x i)= + map (first (reveal p E)) (fun y => (y,y e)) := by + rw [first_reveal] + simp only [reveal,mapSnd,pair,map_comp,Function.comp_def,id_eq] + rfl + have hH : entropy (mapSnd (reveal p E) (fun x => x i))= + entropy (first (reveal p E)) := by + rw [he] + apply entropy_map_injective + intro x y h + exact congrArg Prod.fst h + simp only [information,first_mapSnd,second_mapSnd,second_reveal,hH] + ring + +lemma entropy_reveal_le_coordinate_sum (p : Law (ι → β)) (E : Finset ι) : + entropy (first (reveal p E)) ≤ ∑ i∈E,entropy (map p (fun x => x i)) := by + have hh := totalCorrelation_nonneg (first (reveal p E)) + simp only [totalCorrelation,first_reveal,map_comp,Function.comp_def] at hh + rw [Finset.sum_coe_sort E (fun i : ι => entropy (map p (fun x => x i)))] at hh + simpa only [first_reveal] using (sub_nonneg.mp hh) + +theorem reveal_information_budget (p : Law (ι → β)) (E : Finset ι) : + (∑ i∈Eᶜ,information (mapSnd (reveal p E) (fun x => x i)))+ + (∑ a,first (reveal p E) a*totalCorrelation (fiber (reveal p E) a)) ≤ + totalCorrelation p := by + have hh := total_correlation_drop (reveal p E) + simp only [second_reveal,entropy_reveal] at hh + have hb := entropy_reveal_le_coordinate_sum p E + have hs := Finset.sum_add_sum_compl E + (fun i => information (mapSnd (reveal p E) (fun x => x i))) + have hsel : (∑ i∈E,information (mapSnd (reveal p E) (fun x => x i)))= + ∑ i∈E,entropy (map p (fun x => x i)) := by + apply Finset.sum_congr rfl + intro i hi + exact information_reveal_selected p E i hi + rw [hsel] at hs + change (∑ i∈Eᶜ,information (mapSnd (reveal p E) (fun x => x i)))+ + (∑ a,first (reveal p E) a*totalCorrelation (fiber (reveal p E) a)) ≤ + (∑ i,entropy (map p (fun x => x i)))-entropy p + linarith + +theorem reveal_coordinate_information_le (p : Law (ι → β)) (E : Finset ι) + (j : E) (i : ι) : + information (pair p (fun x => x j.val) (fun x => x i)) ≤ + information (mapSnd (reveal p E) (fun x => x i)) := by + have hh := information_observation_le (mapSnd (reveal p E) (fun x => x i)) + (fun y => y j) + simpa only [reveal,mapSnd,pair,map_comp,Function.comp_def,id_eq] using hh + +end + +open scoped BigOperators Classical +variable {ι β : Type} [Fintype ι] [Fintype β] + +noncomputable local instance (E : Finset ι) : DecidableEq E := Classical.decEq _ + +inductive RevealPlan (ι β : Type) [Fintype ι] [Fintype β] : ℕ → Type + | stop : RevealPlan ι β 0 + | step {n : ℕ} (choice : Law (Finset ι)) + (next : (E : Finset ι) → (E → β) → RevealPlan ι β n) : RevealPlan ι β (n+1) + +noncomputable def revealCost (p : Law (ι → β)) (E : Finset ι) : ℝ := + ∑ i∈Eᶜ,information (mapSnd (reveal p E) (fun x => x i)) + +noncomputable def revealRoundCost (p : Law (ι → β)) {n : ℕ} (t : RevealPlan ι β n) : Fin n → ℝ := + match t with + | .stop => Fin.elim0 + | .step q next => Fin.cases (∑ E,q E*revealCost p E) + (fun i => ∑ E,q E*(∑ a,first (reveal p E) a* + revealRoundCost (fiber (reveal p E) a) (next E a) i)) + +lemma revealCost_nonneg (p : Law (ι → β)) (E : Finset ι) : 0 ≤ revealCost p E := by + exact Finset.sum_nonneg fun i _ => information_nonneg _ + +lemma revealRoundCost_nonneg (p : Law (ι → β)) {n : ℕ} (t : RevealPlan ι β n) + (i : Fin n) : 0 ≤ revealRoundCost p t i := by + induction t generalizing p with + | stop => exact Fin.elim0 i + | @step n q next ih => + cases i using Fin.cases with + | zero => + exact Finset.sum_nonneg fun E _ => mul_nonneg (q.nonneg E) (revealCost_nonneg p E) + | succ i => + exact Finset.sum_nonneg fun E _ => mul_nonneg (q.nonneg E) + (Finset.sum_nonneg fun a _ => mul_nonneg ((first (reveal p E)).nonneg a) + (ih E a (fiber (reveal p E) a) i)) + +theorem adaptive_reveal_information (p : Law (ι → β)) {n : ℕ} (t : RevealPlan ι β n) : + (∑ i,revealRoundCost p t i) ≤ totalCorrelation p := by + induction t generalizing p with + | stop => simpa using totalCorrelation_nonneg p + | @step n q next ih => + have htail : (∑ i : Fin n,∑ E,q E*(∑ a,first (reveal p E) a* + revealRoundCost (fiber (reveal p E) a) (next E a) i)) = + ∑ E,q E*(∑ a,first (reveal p E) a* + (∑ i,revealRoundCost (fiber (reveal p E) a) (next E a) i)) := by + simp only [Finset.mul_sum] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro E _ + rw [Finset.sum_comm] + simp only [revealRoundCost,Fin.sum_univ_succ,Fin.cases_zero,Fin.cases_succ,htail] + rw [←Finset.sum_add_distrib] + calc + _ ≤ ∑ E,q E*(revealCost p E+ + (∑ a,first (reveal p E) a*totalCorrelation (fiber (reveal p E) a))) := by + apply Finset.sum_le_sum + intro E _ + rw [mul_add] + apply add_le_add_right + apply mul_le_mul_of_nonneg_left _ (q.nonneg E) + apply Finset.sum_le_sum + intro a _ + exact mul_le_mul_of_nonneg_left (ih E a (fiber (reveal p E) a)) + ((first (reveal p E)).nonneg a) + _ ≤ ∑ E,q E*totalCorrelation p := by + apply Finset.sum_le_sum + intro E _ + exact mul_le_mul_of_nonneg_left (reveal_information_budget p E) (q.nonneg E) + _ = totalCorrelation p := by rw [←Finset.sum_mul,q.sum_one,one_mul] + +theorem exists_low_information_round (p : Law (ι → β)) {n : ℕ} (hn : 02*C*(4+16*Cw)*σ^(-(η/6-19*beta η))) atTop (𝓝 0) := by + simpa using (tendsto_rpow_neg_atTop he).const_mul (2*C*(4+16*Cw)) + filter_upwards [eventually_ge_atTop (1:ℝ), + ht.eventually_lt_const (by norm_num : (0:ℝ)<1)] with σ hσ hsmall + intro q D P H w k Λ hq hD hP hH hw hP' hH' hw' hk hΛ + have hs : 0<σ := zero_lt_one.trans_le hσ + have hkp : 0CΔ*σ^(-(3*η/4-7*beta η))) atTop (𝓝 0) := by + simpa using (tendsto_rpow_neg_atTop h2).const_mul CΔ + filter_upwards [eventually_ge_atTop (1:ℝ), + ht1.eventually_lt_const (by norm_num : (0:ℝ)<1/2), + ht2.eventually_lt_const (by norm_num : (0:ℝ)<1/2)] with σ hσ hs1 hs2 + intro D A Δ hD hA hΔ + have hs : 0<σ := zero_lt_one.trans_le hσ + have hbase : σ^beta η≤σ^(2*beta η) := Real.rpow_le_rpow_of_exponent_le hσ (by have := beta_pos hη;linarith) + have hp1 : σ^beta η*(D*σ^(-η/3))=D*σ^(-η/4)*σ^(-(η/12-beta η)) := by + calc + _ =D*(σ^beta η*σ^(-η/3)) := by ring + _ =_ := by rw [←Real.rpow_add hs,mul_assoc,←Real.rpow_add hs];congr 2;ring + have hp2 : σ^beta η*(CΔ*D*σ^(6*beta η)*σ^(-η))= + D*σ^(-η/4)*(CΔ*σ^(-(3*η/4-7*beta η))) := by + calc + _ =CΔ*D*(σ^beta η*σ^(6*beta η)*σ^(-η)) := by ring + _ =_ := by rw [←Real.rpow_add hs,←Real.rpow_add hs]; + rw [show D*σ^(-η/4)*(CΔ*σ^(-(3*η/4-7*beta η)))= + CΔ*D*(σ^(-η/4)*σ^(-(3*η/4-7*beta η))) by ring, + ←Real.rpow_add hs];congr 2;ring + calc + _ ≤ σ^beta η*(1+D*σ^(-η/3)+(CΔ*D*σ^(6*beta η))*σ^(-η)) := by gcongr + _ = σ^beta η+D*σ^(-η/4)*σ^(-(η/12-beta η))+ + D*σ^(-η/4)*(CΔ*σ^(-(3*η/4-7*beta η))) := by + rw [mul_add,mul_add,mul_one,hp1,hp2] + _ ≤ σ^(2*beta η)+D*σ^(-η/4)*(1/2)+D*σ^(-η/4)*(1/2) := by gcongr + _ = _ := by ring +end +end SharpRamseyFive.ParameterHierarchy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/SubsetDeficit.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/SubsetDeficit.lean new file mode 100644 index 0000000000000000000000000000000000000000..45adc38ab9cb1e082521eff4aa5260c7b0cc5cb5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/SubsetDeficit.lean @@ -0,0 +1,136 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.UnionMarking + +namespace OAI + +noncomputable section + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped Classical BigOperators +variable {ι β : Type*} [Fintype ι] [Fintype β] +local instance subsetDeficitDecEq : DecidableEq ι := Classical.decEq _ +local instance subsetDeficitSubDecEq (S : Finset ι) : DecidableEq S := Classical.decEq _ + +lemma entropy_subset_split (p : Law (ι → β)) (S : Finset ι) : + entropy p ≤ entropy (map p (fun x => fun i : S => x i.val)) + + ∑ i∈Sᶜ,entropy (map p (fun x => x i)) := by + let f := fun x : ι → β => fun i : S => x i.val + let g := fun x : ι → β => fun i : (Sᶜ : Finset ι) => x i.val + have hinj : Function.Injective (fun x => (f x,g x)) := by + intro x y h + funext i + by_cases hi : i∈S + · exact congrFun (congrArg Prod.fst h) ⟨i,hi⟩ + · exact congrFun (congrArg Prod.snd h) ⟨i,Finset.mem_compl.mpr hi⟩ + have hh := entropy_subadditive (pair p f g) + rw [show entropy (pair p f g)=entropy p from entropy_map_injective p _ hinj, + first_pair,second_pair] at hh + have ht := totalCorrelation_nonneg (map p g) + simp only [totalCorrelation,map_comp,Function.comp_def] at ht + have he : (∑ i : (Sᶜ : Finset ι),entropy (map p (fun x => g x i))) = + ∑ i∈Sᶜ,entropy (map p (fun x => x i)) := by + exact Finset.sum_coe_sort Sᶜ (fun i => entropy (map p (fun x => x i))) + rw [he] at ht + linarith + +theorem subset_deficit_le_active (p : Law (ι → β)) (U S : Finset ι) + (hSU : S⊆U) (hf : FixedOutside p U) (J : ℝ) + (hc : ∀ i∈U,entropy (map p (fun x => x i))≤J) : + (S.card:ℝ)*J-entropy (map p (fun x => fun i : S => x i.val)) ≤ + activeDeficit p U J := by + have hh := entropy_subset_split p S + have he : (∑ i∈Sᶜ,entropy (map p (fun x => x i))) = + ∑ i∈U\S,entropy (map p (fun x => x i)) := by + symm + apply Finset.sum_subset + · intro i hi + exact Finset.mem_compl.mpr (Finset.mem_sdiff.mp hi).2 + · intro i hi hnot + apply hf.entropy_zero + intro hU + exact hnot (Finset.mem_sdiff.mpr ⟨hU,Finset.mem_compl.mp hi⟩) + rw [he] at hh + have hb : (∑ i∈U\S,entropy (map p (fun x => x i))) ≤ ((U\S).card:ℝ)*J := by + calc + _ ≤ ∑ i∈U\S,J := Finset.sum_le_sum fun i hi => hc i (Finset.mem_sdiff.mp hi).1 + _ = _ := by simp + have hn : ((U\S).card:ℝ)+(S.card:ℝ)=U.card := by + exact_mod_cast Finset.card_sdiff_add_card_eq_card hSU + calc + _ ≤ (S.card:ℝ)*J + ((U\S).card:ℝ)*J - entropy p := by linarith + _ = activeDeficit p U J := by + dsimp [activeDeficit] + rw [←add_mul,add_comm (S.card:ℝ),hn] +end + +open scoped Classical BigOperators +variable {ι β κ : Type*} [Fintype ι] [Fintype β] [Fintype κ] +local instance unionPosteriorDecEq : DecidableEq ι := Classical.decEq _ + +abbrev UnionTranscript (ι β : Type*) := + (ι → RankTypes × Bool × Bool) × (ι → Option β) + +def unionMessage (r : (ι → β) → ι → RankTypes) + (E₁ E₂ : (ι → β) → Finset ι) (x : ι → β) : UnionTranscript ι β := + (unionMask r E₁ E₂ x,unionRecord id E₁ E₂ x) + +def unspecified (m : UnionTranscript ι β) : Finset ι := + Finset.univ.filter fun i=>m.2 i=none + +omit [Fintype β] in +lemma unspecified_unionMessage (r : (ι → β) → ι → RankTypes) + (E₁ E₂ : (ι → β) → Finset ι) (x : ι → β) : + unspecified (unionMessage r E₁ E₂ x)=(E₁ x ∪ E₂ x)ᶜ := by + ext i + simp only [unspecified,Finset.mem_filter,Finset.mem_univ,true_and,unionMessage, + unionRecord,Finset.mem_compl, id_eq] + split_ifs <;> simp_all + +omit [Fintype β] in +lemma unspecified_card (r : (ι → β) → ι → RankTypes) + (E₁ E₂ : (ι → β) → Finset ι) (x : ι → β) : + ((unspecified (unionMessage r E₁ E₂ x)).card:ℝ)+((E₁ x ∪ E₂ x).card:ℝ)= + Fintype.card ι := by + rw [unspecified_unionMessage] + exact_mod_cast Finset.card_compl_add_card (E₁ x ∪ E₂ x) + +lemma unionMessage_fixedOutside (p : Law (κ × (ι → β))) + (r : (ι → β) → ι → RankTypes) (E₁ E₂ : (ι → β) → Finset ι) + (c : κ) (m : UnionTranscript ι β) + (hm : 0hi (Finset.mem_filter.mpr ⟨Finset.mem_univ _,h⟩) + obtain ⟨b,hb⟩ := Option.ne_none_iff_exists'.mp hn + refine ⟨b,?_⟩ + intro x hx + have hmx := (fiber_withMessage_support p (unionMessage r E₁ E₂) c m hm x hx).2 + have hrec : unionRecord id E₁ E₂ x i=some b := by + rw [←hb] + exact congrFun (congrArg Prod.snd hmx) i + dsimp [unionRecord] at hrec + split_ifs at hrec + exact Option.some.inj hrec + +theorem union_deficit_bound (p : Law (κ × (ι → β))) + (r : (ι → β) → ι → RankTypes) (E₁ E₂ : (ι → β) → Finset ι) + (S : κ → ι → Finset β) (cap J : ℝ) (hcap : 1≤cap) + (hS : ∀ c i,((S c i).card:ℝ)≤cap) + (hsupp : ∀ c x,0

activeDeficit (fiber (withMessage p (unionMessage r E₁ E₂)) z) + (unspecified z.2) J) ≤ + (Fintype.card ι:ℝ)*J-entropy (second p)+entropy (first p)+ + (Fintype.card ι:ℝ)*Real.log 800+ + mean (second p) (fun x=>((E₁ x ∪ E₂ x).card:ℝ))*(Real.log cap-J) := by + apply message_deficit_bound p (unionMessage r E₁ E₂) unspecified + (fun x=>((E₁ x ∪ E₂ x).card:ℝ)) J (Real.log cap) + ((Fintype.card ι:ℝ)*Real.log 800) (unspecified_card r E₁ E₂) + exact union_marking_entropy p r id E₁ E₂ S cap hcap hS hsupp +end SharpRamseyFive.FiniteEntropy + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/SubsetEncoding.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/SubsetEncoding.lean new file mode 100644 index 0000000000000000000000000000000000000000..4846a8cc355f460f26c92d69ce7c9f8960273a33 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/SubsetEncoding.lean @@ -0,0 +1,145 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.PublicDecoder + +namespace OAI + +namespace SharpRamseyFive.SubsetEncoding +open scoped Classical BigOperators + +lemma log_factorial_lower (n : ℕ) : + (n:ℝ)*Real.log n-n≤Real.log (n.factorial:ℝ) := by + by_cases hn : n=0 + · subst n;norm_num + have hn1 : (1:ℝ)≤n := by exact_mod_cast Nat.one_le_iff_ne_zero.mpr hn + have h := Stirling.le_log_factorial_stirling hn + have hp : (1:ℝ)≤2*Real.pi := by linarith [Real.pi_gt_three] + have hl := Real.log_nonneg hp + have hl' := Real.log_nonneg hn1 + linarith + +lemma log_choose_le (m n : ℕ) (hnm : n ≤ m) : + Real.log (m.choose n:ℝ)≤(n:ℝ)*(Real.log ((m:ℝ)/n)+1) := by + by_cases hn : n=0 + · subst n;simp + have hnpos : (0:ℝ)A⊆U ∧ A.card=n)=U.powersetCard n := by + ext A;simp + rw [he,Finset.card_powersetCard] + +noncomputable def encode (S U : Finset α) (hSU : S⊆U) : Fin (Fintype.card (Alphabet U S.card)) := + Fintype.equivFin (Alphabet U S.card) ⟨S,hSU,rfl⟩ + +noncomputable def decode (U : Finset α) (n : ℕ) (i : Fin (Fintype.card (Alphabet U n))) : Finset α := + ((Fintype.equivFin (Alphabet U n)).symm i).1 + +lemma decode_encode (S U : Finset α) (hSU : S⊆U) : decode U S.card (encode S U hSU)=S := by + exact congrArg Subtype.val ((Fintype.equivFin (Alphabet U S.card)).symm_apply_apply ⟨S,hSU,rfl⟩) + +theorem small_set_description (S U : Finset α) (hSU : S⊆U) + (q P : ℝ) (hn : (S.card:ℝ)≤100*q*P) : + decode U S.card (encode S U hSU)=S ∧ + Real.log (Fintype.card (Alphabet U S.card):ℝ)≤ + 100*q*P*(Real.log ((U.card:ℝ)/S.card)+1) := by + refine ⟨decode_encode S U hSU,?_⟩ + rw [alphabet_card] + have h := log_choose_le U.card S.card (Finset.card_le_card hSU) + apply h.trans + apply mul_le_mul_of_nonneg_right hn + by_cases hs : S.card=0 + · simp [hs] + · have hp : (0:ℝ) infer_instance + +noncomputable def baseDecoded (U : Finset (ℙ K V)) (n : ℕ) (P τ : ℝ) (L₀ : ℝ≥0) + {R : ℕ} (t : Fin (sizeScoreCutoff U n P τ) → Fin R → ℙ K V → ℕ) + (m : baseAlphabet U n P τ) : Finset (ℙ K V) := by + classical + exact if h : (n:ℝ)≤100*(Nat.card K:ℝ)*P then + decode U n (cast (by simp only [baseAlphabet,h,ite_true]) m) + else + let m' : Fin (sizeScoreCutoff U n P τ) × Fin (Fintype.card (ℙ K (Dual K V))+1) := + cast (by simp only [baseAlphabet,h,ite_false]) m + publicDecoded U (fun _=>∅) (fun _=>Real.exp (-(L₀:ℝ))) m'.2 (t m'.1) + +omit [Finite K] [FiniteDimensional K V] in +lemma baseDecoded_small (U : Finset (ℙ K V)) (n : ℕ) (P τ : ℝ) (L₀ : ℝ≥0) + {R : ℕ} (t : Fin (sizeScoreCutoff U n P τ) → Fin R → ℙ K V → ℕ) + (hn : (n:ℝ)≤100*(Nat.card K:ℝ)*P) (m : Fin (Fintype.card (Alphabet U n))) : + baseDecoded U n P τ L₀ t (by simpa only [baseAlphabet,hn,ite_true] using m)=decode U n m := by + simp [baseDecoded,hn] + +omit [Finite K] [FiniteDimensional K V] in +lemma baseDecoded_large (U : Finset (ℙ K V)) (n : ℕ) (P τ : ℝ) (L₀ : ℝ≥0) + {R : ℕ} (t : Fin (sizeScoreCutoff U n P τ) → Fin R → ℙ K V → ℕ) + (hn : ¬(n:ℝ)≤100*(Nat.card K:ℝ)*P) + (m : Fin (sizeScoreCutoff U n P τ) × Fin (Fintype.card (ℙ K (Dual K V))+1)) : + baseDecoded U n P τ L₀ t (by simpa only [baseAlphabet,hn,ite_false] using m)= + publicDecoded U (fun _=>∅) (fun _=>Real.exp (-(L₀:ℝ))) m.2 (t m.1) := by + simp [baseDecoded,hn] + +lemma base_cost_scalar (q P gap τ : ℝ) (hq : 2≤q) (hP : 1≤P) + (hgap : 0≤gap) (_hτ : 0≤τ) (hτ1 : τ≤1) : + Real.log (2*q) + gap*(2*q*P)+(8*P*τ+Real.log 4)+Real.log (2*q^2) ≤ + 20*q*P*(gap+P) := by + have hp : 0

R z.1 z.2),f z.1*g z.2 + +omit [Fintype α] in +lemma uniformWeight_nonneg (S : Finset α) (a : α) : 0 ≤ uniformWeight S a := by + unfold uniformWeight;split_ifs <;> positivity +lemma relationMass_nonneg (R : α→β→Prop) (f : α→ℝ) (g : β→ℝ) + (hf : ∀a,0 ≤ f a) (hg : ∀b,0 ≤ g b) : 0 ≤ relationMass R f g := + Finset.sum_nonneg (fun entry _=>mul_nonneg (hf entry.1) (hg entry.2)) + +lemma relationMass_uniform (R : α→β→Prop) (S : Finset α) (T : Finset β) : + relationMass R (uniformWeight S) (uniformWeight T)= + (((S×ˢT).filter (fun z=>R z.1 z.2)).card:ℝ)/((S.card:ℝ)*T.card) := by + have he : (S×ˢT).filter (fun z=>R z.1 z.2)= + (Finset.univ.filter (fun z : α×β=>R z.1 z.2)).filter (fun z=>z.1∈S ∧ z.2∈T) := by + ext z;simp [and_comm] + rw [he] + unfold relationMass + have hterm (z : α×β) : + uniformWeight S z.1*uniformWeight T z.2= + if z.1∈S ∧ z.2∈T then 1/((S.card:ℝ)*T.card) else 0 := by + by_cases hS : z.1∈S <;> by_cases hT : z.2∈T <;> simp [uniformWeight,hS,hT,mul_comm] + simp_rw [hterm] + rw [←Finset.sum_filter,Finset.sum_const,nsmul_eq_mul] + ring + +lemma independent_subset_relation (R : α→β→Prop) (μ : Law (Finset α)) (ν : Law (Finset β)) : + (∑S,∑T,μ S*ν T*relationMass R (uniformWeight S) (uniformWeight T))= + relationMass R (fun a=>∑S,μ S*uniformWeight S a) + (fun b=>∑T,ν T*uniformWeight T b) := by + let E := Finset.univ.filter (fun z : α×β=>R z.1 z.2) + change (∑S,∑T,μ S*ν T*(∑z∈E,uniformWeight S z.1*uniformWeight T z.2))= + ∑z∈E,(∑S,μ S*uniformWeight S z.1)*(∑T,ν T*uniformWeight T z.2) + simp_rw [Finset.mul_sum] + calc + _ = ∑S,∑z∈E,∑T,μ S*ν T*(uniformWeight S z.1*uniformWeight T z.2) := by + apply Finset.sum_congr rfl + intro S _ + exact Finset.sum_comm + _ = ∑z∈E,∑S,∑T,μ S*ν T*(uniformWeight S z.1*uniformWeight T z.2) := Finset.sum_comm + _ = _ := by + apply Finset.sum_congr rfl + intro z _ + simp only [Finset.sum_mul] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro T _ + apply Finset.sum_congr rfl + intro S _ + ring + +theorem independent_subset_domination (R : α→β→Prop) + (p : Law α) (q : Law β) (μ : Law (Finset α)) (ν : Law (Finset β)) (L : ℝ) + (hL : 0 ≤ L) + (hA : ∀a,(∑S,μ S*uniformWeight S a) ≤ L*p a) + (hB : ∀b,(∑T,ν T*uniformWeight T b) ≤ L*q b) : + (∑S,∑T,μ S*ν T*relationMass R (uniformWeight S) (uniformWeight T)) ≤ + L^2*relationMass R p q := by + rw [independent_subset_relation] + unfold relationMass + rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro z _ + have hn : 0 ≤ ∑T,ν T*uniformWeight T z.2 := Finset.sum_nonneg + (fun T _=>mul_nonneg (ν.nonneg T) (uniformWeight_nonneg T z.2)) + have hh := mul_le_mul (hA z.1) (hB z.2) hn (mul_nonneg hL (p.nonneg z.1)) + nlinarith only [hh] + +lemma independent_law_lower (μ : Law α) (ν : Law β) (f : α→β→ℝ) (c : ℝ) + (h : ∀a b,0 < μ a→0 < ν b→c ≤ f a b) : + c ≤ ∑a,∑b,μ a*ν b*f a b := by + have hp (a : α) (b : β) : μ a*ν b*c ≤ μ a*ν b*f a b := by + by_cases ha : μ a=0 + · simp [ha] + by_cases hb : ν b=0 + · simp [hb] + exact mul_le_mul_of_nonneg_left (h a b (lt_of_le_of_ne (μ.nonneg a) (Ne.symm ha)) + (lt_of_le_of_ne (ν.nonneg b) (Ne.symm hb))) (mul_nonneg (μ.nonneg a) (ν.nonneg b)) + have hs := Finset.sum_le_sum (s:=Finset.univ) (fun a _=> + Finset.sum_le_sum (s:=Finset.univ) (fun b _=>hp a b)) + simpa only [←Finset.sum_mul,←Finset.mul_sum,ν.sum_one,μ.sum_one,mul_one,one_mul] using hs + +end + +open scoped BigOperators Classical +variable {α β ι κ : Type*} [Fintype α] [Fintype β] [Fintype ι] [Fintype κ] + +lemma relationMass_by_target (R : α→β→Prop) (f : α→ℝ) (g : β→ℝ) : + relationMass R f g=∑b,g b*(∑a∈Finset.univ.filter (fun a=>R a b),f a) := by + unfold relationMass + rw [Finset.sum_filter,Fintype.sum_prod_type,Finset.sum_comm] + apply Finset.sum_congr rfl + intro b _ + rw [Finset.sum_filter,Finset.mul_sum] + apply Finset.sum_congr rfl + intro a _ + split_ifs <;> ring + +omit [Fintype α] in +lemma sum_uniformWeight (X H : Finset α) : + (∑a∈H,uniformWeight X a)=((H∩X).card:ℝ)/X.card := by + unfold uniformWeight + rw [←Finset.sum_filter,Finset.sum_const,nsmul_eq_mul] + have he : H.filter (fun a=>a∈X)=H∩X := by ext a;simp + rw [he] + ring + +lemma relationMass_neighbors (R : α→β→Prop) (X : Finset α) (Y : Finset β) : + relationMass R (uniformWeight X) (uniformWeight Y)= + ∑b,uniformWeight Y b*((((Finset.univ.filter (fun a=>R a b))∩X).card:ℝ)/X.card) := by + rw [relationMass_by_target] + simp_rw [sum_uniformWeight] + +lemma independent_support_relation (R : α→β→Prop) (μ : Law ι) (ν : Law κ) + (X : ι→Finset α) (Y : κ→Finset β) : + (∑i,∑j,μ i*ν j*relationMass R (uniformWeight (X i)) (uniformWeight (Y j)))= + relationMass R (fun a=>∑i,μ i*uniformWeight (X i) a) + (fun b=>∑j,ν j*uniformWeight (Y j) b) := by + let E := Finset.univ.filter (fun z : α×β=>R z.1 z.2) + change (∑i,∑j,μ i*ν j*(∑z∈E,uniformWeight (X i) z.1*uniformWeight (Y j) z.2))= + ∑z∈E,(∑i,μ i*uniformWeight (X i) z.1)*(∑j,ν j*uniformWeight (Y j) z.2) + simp_rw [Finset.mul_sum] + calc + _ = ∑i,∑z∈E,∑j,μ i*ν j*(uniformWeight (X i) z.1*uniformWeight (Y j) z.2) := by + apply Finset.sum_congr rfl + intro i _ + exact Finset.sum_comm + _ = ∑z∈E,∑i,∑j,μ i*ν j*(uniformWeight (X i) z.1*uniformWeight (Y j) z.2) := Finset.sum_comm + _ = _ := by + apply Finset.sum_congr rfl + intro z _ + simp only [Finset.sum_mul] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro j _ + apply Finset.sum_congr rfl + intro i _ + ring + +lemma independent_support_domination (R : α→β→Prop) (p : Law α) (r : Law β) + (μ : Law ι) (ν : Law κ) (X : ι→Finset α) (Y : κ→Finset β) (L : ℝ) + (hL : 0 ≤ L) (hX : ∀a,(∑i,μ i*uniformWeight (X i) a) ≤ L*p a) + (hY : ∀b,(∑j,ν j*uniformWeight (Y j) b) ≤ L*r b) : + (∑i,∑j,μ i*ν j*relationMass R (uniformWeight (X i)) (uniformWeight (Y j))) ≤ + L^2*relationMass R p r := by + rw [independent_support_relation] + unfold relationMass + rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro z _ + have hn : 0 ≤ ∑j,ν j*uniformWeight (Y j) z.2 := Finset.sum_nonneg + (fun j _=>mul_nonneg (ν.nonneg j) (uniformWeight_nonneg _ _)) + have hh := mul_le_mul (hX z.1) (hY z.2) hn (mul_nonneg hL (p.nonneg z.1)) + nlinarith only [hh] + +theorem adaptive_rejection_average {Θ : Type*} [Fintype Θ] + (R : α→β→Prop) (p : Law α) (r : Law β) + (μ : Law ι) (ν : Law κ) (X : ι→Finset α) (Y : κ→Finset β) + (prior : ι→κ→Law Θ) (reject : ι→κ→Θ→β→ℝ) (B L : ℝ) + (hB : 0 ≤ B) (hL : 0 ≤ L) + (hX : ∀a,(∑i,μ i*uniformWeight (X i) a) ≤ L*p a) + (hY : ∀b,(∑j,ν j*uniformWeight (Y j) b) ≤ L*r b) + (hlocal : ∀i j θ b,reject i j θ b ≤ + B*((((Finset.univ.filter (fun a=>R a b))∩X i).card:ℝ)/(X i).card)) : + (∑i,∑j,μ i*ν j*(∑θ,prior i j θ*(∑b,uniformWeight (Y j) b*reject i j θ b))) ≤ + B*L^2*relationMass R p r := by + have hpoint (i : ι) (j : κ) : + (∑θ,prior i j θ*(∑b,uniformWeight (Y j) b*reject i j θ b)) ≤ + B*relationMass R (uniformWeight (X i)) (uniformWeight (Y j)) := by + have ht (θ : Θ) : (∑b,uniformWeight (Y j) b*reject i j θ b) ≤ + B*relationMass R (uniformWeight (X i)) (uniformWeight (Y j)) := by + rw [relationMass_neighbors,Finset.mul_sum] + apply Finset.sum_le_sum + intro b _ + have hh := mul_le_mul_of_nonneg_left (hlocal i j θ b) (uniformWeight_nonneg (Y j) b) + nlinarith only [hh] + have hs := Finset.sum_le_sum (s:=Finset.univ) (fun θ _=> + mul_le_mul_of_nonneg_left (ht θ) ((prior i j).nonneg θ)) + simpa only [←Finset.sum_mul,(prior i j).sum_one,one_mul] using hs + calc + _ ≤ ∑i,∑j,μ i*ν j*(B*relationMass R (uniformWeight (X i)) (uniformWeight (Y j))) := + Finset.sum_le_sum (fun i _=>Finset.sum_le_sum (fun j _=> + mul_le_mul_of_nonneg_left (hpoint i j) (mul_nonneg (μ.nonneg i) (ν.nonneg j)))) + _ = B*(∑i,∑j,μ i*ν j*relationMass R (uniformWeight (X i)) (uniformWeight (Y j))) := by + simp_rw [Finset.mul_sum];apply Finset.sum_congr rfl;intro i _ + apply Finset.sum_congr rfl;intro j _;ring + _ ≤ B*(L^2*relationMass R p r) := mul_le_mul_of_nonneg_left + (independent_support_domination R p r μ ν X Y L hL hX hY) hB + _ = _ := by ring + +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/Swap.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/Swap.lean new file mode 100644 index 0000000000000000000000000000000000000000..7f0978fcf260ddb0819b0ab18214a317963cd5ea --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/Swap.lean @@ -0,0 +1,54 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.Map + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped BigOperators Classical +variable {α β γ δ : Type*} [Fintype α] [Fintype β] [Fintype γ] [Fintype δ] + +noncomputable def swap (p : Law (α × β)) : Law (β × α) where + mass z := p (z.2,z.1) + nonneg z := p.nonneg _ + sum_one := by rw [Fintype.sum_prod_type,Finset.sum_comm,←Fintype.sum_prod_type]; exact p.sum_one + +@[simp] lemma swap_mass (p : Law (α × β)) (b : β) (a : α) : swap p (b,a)=p (a,b) := rfl +@[simp] lemma first_swap (p : Law (α × β)) : first (swap p)=second p := by + apply Law.ext + rfl + +lemma mass_eq_second_mul_fiber (p : Law (α × β)) (a : α) (b : β) : + p (a,b)=second p b*fiber (swap p) b a := by + simpa only [first_swap,swap_mass] using mass_eq_first_mul_fiber (swap p) b a + +theorem product_crossed_expectation (p : Law (α × β)) (q : Law (γ × δ)) + (F : α → β → γ → δ → ℝ) : + (∑ z : (α × β) × (γ × δ),product p q z*F z.1.1 z.1.2 z.2.1 z.2.2)= + ∑ a,∑ y,(first p a*second q y)* + (∑ b,∑ c,(fiber p a b*fiber (swap q) y c)*F a b c y) := by + simp only [Fintype.sum_prod_type] + change (∑ a,∑ b,∑ c,∑ y,p (a,b)*q (c,y)*F a b c y)=_ + apply Finset.sum_congr rfl + intro a _ + conv_lhs => arg 2; ext b; rw [Finset.sum_comm] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro y _ + simp only [Finset.mul_sum] + apply Finset.sum_congr rfl + intro b _ + apply Finset.sum_congr rfl + intro c _ + rw [mass_eq_first_mul_fiber p a b,mass_eq_second_mul_fiber q c y] + ring + +theorem zero_joint_event_product (p : Law (α × β)) (E : Finset (α × β)) + (hzero : ∑ z∈E,p z=0) : + (∑ z∈E,product (first p) (second p) z)≤ + 2*(entropy (first p)+entropy (second p)-entropy p) := by + have h := event_comparison p (product (first p) (second p)) (ac_product p) E + rw [hzero,add_zero,mutual_information] at h + exact h +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/Tail.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/Tail.lean new file mode 100644 index 0000000000000000000000000000000000000000..9f5abc2f0785a3884a3a1fee417de4b360d7a45c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/Tail.lean @@ -0,0 +1,204 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.LargeCells + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.HighPlaneBudget + +section +open Module GreedyTraining ProjectiveTraining RichPlaneGeometry +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + {I : Type*} [LinearOrder I] + (F : Finset I) (hF : F.Nonempty) (P : I → Submodule K V) (X : Finset (ℙ K V)) + +noncomputable def tail (J cap : ℕ) : Finset (ℙ K V) := + remaining F hF (fun i => flatPoints (P i)) X (headIndex F hF (fun i => flatPoints (P i)) X J cap) \ + remaining F hF (fun i => flatPoints (P i)) X J + +noncomputable def tailPlanes (L : Finset (Submodule K V)) (J cap M : ℕ) := + L.filter fun A => M ≤ ((tail F hF P X J cap).filter fun x => x.submodule ≤ A).card + +noncomputable def headAt (L : Finset (Submodule K V)) (J cap M : ℕ) (c : ℝ) (x : ℙ K V) := + L.filter fun A => x ∈ headPlaneCenters F hF P X J + (headIndex F hF (fun i => flatPoints (P i)) X J cap) M c A + +noncomputable def richAt (L : Finset (Submodule K V)) (J M : ℕ) (x : ℙ K V) := + L.filter fun A => x.submodule ≤ A ∧ 2*M ≤ + (((X \ remaining F hF (fun i => flatPoints (P i)) X J) \ + ownCell F hF (fun i => flatPoints (P i)) X J x).filter fun y => y.submodule ≤ A).card + +lemma rich_planes_split (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 3) + (J cap M : ℕ) (hHM : headIndex F hF (fun i => flatPoints (P i)) X J cap*(Nat.card K+1) ≤ M) + (c : ℝ) (x : ℙ K V) + (hx : x ∉ largeCellIntersections F hF P X + (headIndex F hF (fun i => flatPoints (P i)) X J cap) c) : + richAt F hF P X L J M x ⊆ headAt F hF P X L J cap M c x ∪ + (tailPlanes F hF P X L J cap M).filter (fun A => x.submodule ≤ A) := by + intro A hA + obtain ⟨hAL,hxA,hAr⟩ := Finset.mem_filter.mp hA + by_cases hc : ∃ j < headIndex F hF (fun i => flatPoints (P i)) X J cap, + A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j) + · apply Finset.mem_union_left + apply Finset.mem_filter.mpr + refine ⟨hAL,Finset.mem_filter.mpr ⟨(mem_flatPoints A x).mpr hxA,hc,?_,hx⟩⟩ + apply hAr.trans + apply Finset.card_le_card + apply Finset.filter_subset_filter + intro y hy + obtain ⟨hy,hyn⟩ := Finset.mem_sdiff.mp hy + exact Finset.mem_sdiff.mpr ⟨(Finset.mem_sdiff.mp hy).1,hyn⟩ + · have hhead := head_plane_points F hF P X J cap A (hL A hAL) (by + intro j hj hAj + exact hc ⟨j,hj,hAj⟩) + have hsub : (((X \ remaining F hF (fun i => flatPoints (P i)) X J) \ + ownCell F hF (fun i => flatPoints (P i)) X J x).filter fun y => y.submodule ≤ A) ⊆ + ((X \ remaining F hF (fun i => flatPoints (P i)) X + (headIndex F hF (fun i => flatPoints (P i)) X J cap)).filter fun y => y.submodule ≤ A) ∪ + ((tail F hF P X J cap).filter fun y => y.submodule ≤ A) := by + intro y hy + simp only [Finset.mem_filter,Finset.mem_sdiff,Finset.mem_union,tail] at * + tauto + have hcard := (Finset.card_le_card hsub).trans (Finset.card_union_le _ _) + apply Finset.mem_union_right + exact Finset.mem_filter.mpr ⟨Finset.mem_filter.mpr ⟨hAL,by omega⟩,hxA⟩ + +lemma head_degree_sum (L : Finset (Submodule K V)) (J cap M : ℕ) (c : ℝ) + (Y : Finset (ℙ K V)) : + ∑ x ∈ Y, (headAt F hF P X L J cap M c x).card ≤ + ∑ A ∈ L, (headPlaneCenters F hF P X J + (headIndex F hF (fun i => flatPoints (P i)) X J cap) M c A).card := by + simp only [headAt,Finset.card_filter] + rw [Finset.sum_comm] + apply Finset.sum_le_sum + intro A _ + have hs : Y.filter (fun x => x ∈ headPlaneCenters F hF P X J + (headIndex F hF (fun i => flatPoints (P i)) X J cap) M c A) ⊆ + headPlaneCenters F hF P X J + (headIndex F hF (fun i => flatPoints (P i)) X J cap) M c A := by + intro x hx + exact (Finset.mem_filter.mp hx).2 + simpa only [Finset.card_filter] using Finset.card_le_card hs + +theorem head_exceptions (hP : ∀ i ∈ F, finrank K (P i) = 4) + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 3) + (J cap M : ℕ) (hM : 0 < M) + (hHM : headIndex F hF (fun i => flatPoints (P i)) X J cap*(Nat.card K+1) ≤ M) + (c : ℝ) (hmean : 2*((ProjectiveIncidence.Q (Nat.card K) 2:ℝ)/ + ProjectiveIncidence.Q (Nat.card K) 3)*c ≤ M) (D : ℕ) (Y : Finset (ℙ K V)) : + ((Y.filter fun x => D ≤ (headAt F hF P X L J cap M c x).card).card:ℝ)*D*M^2 ≤ + 4*(Nat.card K:ℝ)^2*(Nat.card K+1)* + headIndex F hF (fun i => flatPoints (P i)) X J cap*X.card := by + let E := Y.filter fun x => D ≤ (headAt F hF P X L J cap M c x).card + have hs : E.card*D ≤ ∑ x ∈ E,(headAt F hF P X L J cap M c x).card := by + calc + _ = ∑ _x ∈ E,D := by simp + _ ≤ _ := Finset.sum_le_sum fun x hx => (Finset.mem_filter.mp hx).2 + have hs' : (E.card:ℝ)*D ≤ ∑ A ∈ L, + ((headPlaneCenters F hF P X J + (headIndex F hF (fun i => flatPoints (P i)) X J cap) M c A).card:ℝ) := by + exact_mod_cast hs.trans (head_degree_sum F hF P X L J cap M c E) + exact (mul_le_mul_of_nonneg_right hs' (sq_nonneg _)).trans + (head_center_plane_count F hF P X hP L hL J + (headIndex F hF (fun i => flatPoints (P i)) X J cap) M + (headIndex_le F hF _ X J cap) hM hHM c hmean) + +theorem rich_count_outside_exceptions + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 3) + (J cap M : ℕ) (hHM : headIndex F hF (fun i => flatPoints (P i)) X J cap*(Nat.card K+1) ≤ M) + (c : ℝ) (D₁ D₂ : ℕ) (Y : Finset (ℙ K V)) (x : ℙ K V) (hxY : x ∈ Y) + (hxL : x ∉ largeCellIntersections F hF P X + (headIndex F hF (fun i => flatPoints (P i)) X J cap) c) + (hxH : x ∉ Y.filter fun x => D₁ ≤ (headAt F hF P X L J cap M c x).card) + (hxT : x ∉ Y.filter fun x => D₂ ≤ + ((tailPlanes F hF P X L J cap M).filter fun A => x.submodule ≤ A).card) : + (richAt F hF P X L J M x).card < D₁+D₂ := by + have hcard := (Finset.card_le_card (rich_planes_split F hF P X L hL J cap M hHM c x hxL)).trans + (Finset.card_union_le _ _) + have hh : (headAt F hF P X L J cap M c x).card < D₁ := by + by_contra hn + exact hxH (Finset.mem_filter.mpr ⟨hxY,by omega⟩) + have ht : ((tailPlanes F hF P X L J cap M).filter fun A => x.submodule ≤ A).card < D₂ := by + by_contra hn + exact hxT (Finset.mem_filter.mpr ⟨hxY,by omega⟩) + omega + +end + +open Module GreedyTraining ProjectiveTraining RichPlaneGeometry HyperplaneOverlap +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + {I : Type*} [LinearOrder I] + (F : Finset I) (hF : F.Nonempty) (P : I → Submodule K V) (X : Finset (ℙ K V)) + +theorem tail_exceptions + (hcover : ∀ A : Submodule K V, finrank K A = 4 → ∃ i ∈ F, P i = A) + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 3) + (J cap M u D : ℕ) (hMpos : 0 < M) + (hlineLarge : 2*(Nat.card K+1) ≤ M) (hlineNum : 2*X.card ≤ u*M) + (hmean : 2*((ProjectiveIncidence.Q (Nat.card K) 2:ℝ)/ProjectiveIncidence.Q (Nat.card K) 3)*cap ≤ M) + (hhyperNum : 4*(Nat.card K:ℝ)^2*cap ≤ (u:ℝ)*M^2) + (hlarge : 64*X.card ≤ M^2) (hD : 8*(2*u+1) ≤ D) (Y : Finset (ℙ K V)) : + ((Y.filter fun x => D ≤ + ((tailPlanes F hF P X L J cap M).filter fun A => x.submodule ≤ A).card).card:ℝ)*D^2*M^2 ≤ + 4096*(X.card:ℝ)^2*(2*(u:ℝ)+1)^2 := by + apply actual_tail_rich_plane_exceptions F hF P X hcover J cap M u D hMpos + (tailPlanes F hF P X L J cap M) (fun A hA => hL A (Finset.mem_filter.mp hA).1) + · intro A hA + exact (Finset.mem_filter.mp hA).2 + · exact hlineLarge + · exact hlineNum + · exact hmean + · exact hhyperNum + · exact hlarge + · exact hD + +noncomputable def capturedPairs (G : Finset (Submodule K V)) (J M : ℕ) (x : ℙ K V) := + (G ×ˢ G).filter fun p => p.1 ≠ p.2 ∧ 2*M ≤ + (((X \ remaining F hF (fun i => flatPoints (P i)) X J) \ + ownCell F hF (fun i => flatPoints (P i)) X J x).filter fun y => y.submodule ≤ p.1 ⊓ p.2).card + +theorem captured_pair_count (hdim : finrank K V = 5) + (G : Finset (Submodule K V)) (hG : ∀ A ∈ G, finrank K A = 4) + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 3) + (hcomplete : ∀ A : Submodule K V, finrank K A = 3 → A ∈ L) + (J M : ℕ) (x : ℙ K V) (hxG : ∀ A ∈ G,x.submodule ≤ A) : + (capturedPairs F hF P X G J M x).card ≤ + (richAt F hF P X L J M x).card*(Nat.card K+1)^2 := by + have hh := pair_count_by_intersection (d := 4) hdim G hG + (richAt F hF P X L J M x) 3 (fun A hA => hL A (Finset.mem_filter.mp hA).1) + (capturedPairs F hF P X G J M x) (Finset.filter_subset _ _) (by + intro p hp + obtain ⟨hp,hne,hpc⟩ := Finset.mem_filter.mp hp + obtain ⟨h1,h2⟩ := Finset.mem_product.mp hp + apply Finset.mem_filter.mpr + refine ⟨hcomplete _ (hyperplane_intersection_rank (d := 4) hdim p.1 p.2 + (hG _ h1) (hG _ h2) hne),le_inf (hxG _ h1) (hxG _ h2),hpc⟩) + have he : (∑ i ∈ Finset.range (4+1-3), Nat.card K^i) = Nat.card K+1 := by + norm_num [Finset.sum_range_succ,Nat.add_comm] + simpa only [he] using hh + +theorem captured_pairs_outside_exceptions (hdim : finrank K V = 5) + (G : Finset (Submodule K V)) (hG : ∀ A ∈ G, finrank K A = 4) + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 3) + (hcomplete : ∀ A : Submodule K V, finrank K A = 3 → A ∈ L) + (J cap M : ℕ) (hHM : headIndex F hF (fun i => flatPoints (P i)) X J cap*(Nat.card K+1) ≤ M) + (c : ℝ) (D₁ D₂ : ℕ) (Y : Finset (ℙ K V)) (x : ℙ K V) (hxY : x ∈ Y) + (hxG : ∀ A ∈ G,x.submodule ≤ A) + (hxL : x ∉ largeCellIntersections F hF P X + (headIndex F hF (fun i => flatPoints (P i)) X J cap) c) + (hxH : x ∉ Y.filter fun x => D₁ ≤ (headAt F hF P X L J cap M c x).card) + (hxT : x ∉ Y.filter fun x => D₂ ≤ + ((tailPlanes F hF P X L J cap M).filter fun A => x.submodule ≤ A).card) : + (capturedPairs F hF P X G J M x).card ≤ (D₁+D₂)*(Nat.card K+1)^2 := by + exact (captured_pair_count F hF P X hdim G hG L hL hcomplete J M x hxG).trans + (Nat.mul_le_mul_right _ (rich_count_outside_exceptions F hF P X L hL J cap M hHM c D₁ D₂ + Y x hxY hxL hxH hxT).le) + +end SharpRamseyFive.HighPlaneBudget + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/TargetAverage.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/TargetAverage.lean new file mode 100644 index 0000000000000000000000000000000000000000..e36b5e6ba5dde95174cebce0d15f2d5505e4422f --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/TargetAverage.lean @@ -0,0 +1,92 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.OriginalMarginalLaw + +namespace OAI + +section +namespace SharpRamseyFive.TreeCodec +open FiniteEntropy BinaryTree +open scoped Classical BigOperators +variable {I Z X : Type*} [Fintype Z] [Fintype X] +lemma mean_pathBudget_twice (μ : Z → ℝ) (g : X → ℝ) + (ρL ρR : Z → X → I → ℝ) (tree : BinaryTree I) (j : Address tree) : + (∑ z, μ z * (∑ a, g a * pathBudget (ρL z a) (ρR z a) tree j)) = + pathBudget (fun i => ∑ z, μ z * (∑ a, g a * ρL z a i)) + (fun i => ∑ z, μ z * (∑ a, g a * ρR z a i)) tree j := by + simp_rw [mean_pathBudget g] + exact mean_pathBudget μ _ _ tree j +end SharpRamseyFive.TreeCodec +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {I J : Type*} [Fintype I] [Fintype J] [DecidableEq I] [DecidableEq J] + {A : I → Type*} {B : J → Type*} [∀ i, Fintype (A i)] [∀ j, Fintype (B j)] + {X Y : Type*} [Fintype X] [Fintype Y] + +lemma original_target_mean_point (μ : ∀ i, Law (A i)) (ν : ∀ j, Law (B j)) + (j : J) (R : X → Y → Prop) (S : B j → Finset Y) (g : X → ℝ) (q : Y → ℝ) + (C L : ℝ) (hC : 0≤C) (hg : ∀ a, 0≤g a) + (hν : ∀ b, (∑ t, ν j t*uniformWeight (S t) b) ≤ L*q b) : + (∑ z, originalLevelLaw μ ν z * (∑ a, g a*(C * + relationMass (fun b a => R a b) (uniformWeight (S (z.2 j))) (uniformWeight {a})))) ≤ + C*L*relationMass R g q := by + have he (z : (∀ i, A i) × (∀ j, B j)) : + (∑ a, g a*(C*relationMass (fun b a => R a b) (uniformWeight (S (z.2 j))) (uniformWeight {a}))) = + C*relationMass R g (uniformWeight (S (z.2 j))) := by + rw [← relationMass_swap R g, ← relationMass_weighted_singleton] + simp only [Finset.mul_sum] + apply Finset.sum_congr rfl + intro a _ + ring + simp_rw [he] + calc + _ = C*(∑ z, originalLevelLaw μ ν z*relationMass R g (uniformWeight (S (z.2 j)))) := by + simp only [Finset.mul_sum]; apply Finset.sum_congr rfl; intro z _; ring + _ ≤ C*(L*relationMass R g q) := + mul_le_mul_of_nonneg_left (originalLevelLaw_right_domination μ ν j R S g q L hg hν) hC + _ = _ := by ring + +lemma original_target_mean_dual (μ : ∀ i, Law (A i)) (ν : ∀ j, Law (B j)) + (i : I) (R : X → Y → Prop) (S : A i → Finset X) (p : X → ℝ) (g : Y → ℝ) + (C L : ℝ) (hC : 0≤C) (hg : ∀ b, 0≤g b) + (hμ : ∀ a, (∑ t, μ i t*uniformWeight (S t) a) ≤ L*p a) : + (∑ z, originalLevelLaw μ ν z * (∑ b, g b*(C * + relationMass R (uniformWeight (S (z.1 i))) (uniformWeight {b})))) ≤ + C*L*relationMass R p g := by + have he (z : (∀ i, A i) × (∀ j, B j)) : + (∑ b, g b*(C*relationMass R (uniformWeight (S (z.1 i))) (uniformWeight {b}))) = + C*relationMass R (uniformWeight (S (z.1 i))) g := by + rw [← relationMass_weighted_singleton R _ g] + simp only [Finset.mul_sum] + apply Finset.sum_congr rfl + intro a _ + ring + simp_rw [he] + calc + _ = C*(∑ z, originalLevelLaw μ ν z*relationMass R (uniformWeight (S (z.1 i))) g) := by + simp only [Finset.mul_sum]; apply Finset.sum_congr rfl; intro z _; ring + _ ≤ C*(L*relationMass R p g) := + mul_le_mul_of_nonneg_left (originalLevelLaw_left_domination μ ν i R S p g L hg hμ) hC + _ = _ := by ring +end SharpRamseyFive.FiniteEntropy + +end + +namespace SharpRamseyFive.TreeCodec +open FiniteEntropy BinaryTree +open scoped Classical BigOperators +variable {I Z A : Type*} [Fintype Z] [Fintype A] +lemma mean_two_pathBudget_scaled (μ : Z → ℝ) (g : A → ℝ) + (ρL ρR : Z → A → I → ℝ) (c : ℝ) (tree : BinaryTree I) (j : Address tree) : + (∑ z, μ z*(∑ a, g a*(c*pathBudget (ρL z a) (ρR z a) tree j))) = + c*pathBudget (fun i => ∑ z, μ z*(∑ a, g a*ρL z a i)) + (fun i => ∑ z, μ z*(∑ a, g a*ρR z a i)) tree j := by + rw [← mean_pathBudget_twice] + simp only [Finset.mul_sum] + apply Finset.sum_congr rfl + intro z _ + apply Finset.sum_congr rfl + intro a _ + ring +end SharpRamseyFive.TreeCodec + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/TargetLoss.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/TargetLoss.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd942d74dc34091c984eef3760868a69159c7c4c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/TargetLoss.lean @@ -0,0 +1,82 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.ProducedCapExclusion + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open ReverseCap +open scoped Classical BigOperators +noncomputable section +local instance (priority := high) targetLossPropDecidable (P : Prop) : Decidable P := Classical.propDecidable P +variable {Ω A B : Type*} [Fintype Ω] + +lemma target_mass_or (p : Law Ω) (P Q : Ω → Prop) : + eventMass p (Finset.univ.filter (fun ω => P ω ∨ Q ω)) ≤ + eventMass p (Finset.univ.filter P) + eventMass p (Finset.univ.filter Q) := by + simp only [eventMass, Finset.sum_filter, ← Finset.sum_add_distrib] + apply Finset.sum_le_sum + intro ω _ + by_cases hp : P ω <;> by_cases hq : Q ω <;> simp [hp,hq]; linarith [p.nonneg ω] + +lemma eventMass_filter_or7 (p : Law Ω) (P Q R S T U V : Ω → Prop) : + eventMass p (Finset.univ.filter (fun ω => (((((P ω ∨ Q ω) ∨ R ω) ∨ S ω) ∨ T ω) ∨ U ω) ∨ V ω)) ≤ + eventMass p (Finset.univ.filter P) + eventMass p (Finset.univ.filter Q) + + eventMass p (Finset.univ.filter R) + eventMass p (Finset.univ.filter S) + + eventMass p (Finset.univ.filter T) + eventMass p (Finset.univ.filter U) + + eventMass p (Finset.univ.filter V) := by + have h2 := target_mass_or p P Q + have h3 := target_mass_or p (fun ω => P ω ∨ Q ω) R + have h4 := target_mass_or p (fun ω => (P ω ∨ Q ω) ∨ R ω) S + have h5 := target_mass_or p (fun ω => ((P ω ∨ Q ω) ∨ R ω) ∨ S ω) T + have h6 := target_mass_or p (fun ω => (((P ω ∨ Q ω) ∨ R ω) ∨ S ω) ∨ T ω) U + have h7 := target_mass_or p (fun ω => ((((P ω ∨ Q ω) ∨ R ω) ∨ S ω) ∨ T ω) ∨ U ω) V + linarith only [h2,h3,h4,h5,h6,h7] + +def TargetCovered (ctx : Option (Finset A × Finset B)) + (caps : Option (Finset B × Finset A)) (a : A) (b : B) : Prop := + ∃ C D, ctx=some C ∧ caps=some D ∧ a∈C.1 ∧ b∈C.2 ∧ a∈D.2 ∧ b∈D.1 + +theorem target_loss_split (p : Law Ω) (a : Ω → A) (b : Ω → B) + (goodA : A → Prop) (goodB : B → Prop) + (ctx : Ω → Option (Finset A × Finset B)) (caps : Ω → Option (Finset B × Finset A)) + (hcoh : ∀ ω, caps ω≠none → ctx ω≠none) : + eventMass p (Finset.univ.filter (fun ω => ¬TargetCovered (ctx ω) (caps ω) (a ω) (b ω))) ≤ + eventMass p (Finset.univ.filter (fun ω => ¬goodA (a ω))) + + eventMass p (Finset.univ.filter (fun ω => ¬goodB (b ω))) + + eventMass p (Finset.univ.filter (fun ω => caps ω=none)) + + eventMass p (Finset.univ.filter (fun ω => goodA (a ω) ∧ ∃ C, ctx ω=some C ∧ a ω∉C.1)) + + eventMass p (Finset.univ.filter (fun ω => goodB (b ω) ∧ ∃ C, ctx ω=some C ∧ b ω∉C.2)) + + eventMass p (Finset.univ.filter (fun ω => goodA (a ω) ∧ Excludes (a ω) ((caps ω).map Prod.snd))) + + eventMass p (Finset.univ.filter (fun ω => goodB (b ω) ∧ Excludes (b ω) ((caps ω).map Prod.fst))) := by + let P := fun ω => ¬goodA (a ω) + let Q := fun ω => ¬goodB (b ω) + let R := fun ω => caps ω=none + let S := fun ω => goodA (a ω) ∧ ∃ C, ctx ω=some C ∧ a ω∉C.1 + let T := fun ω => goodB (b ω) ∧ ∃ C, ctx ω=some C ∧ b ω∉C.2 + let U := fun ω => goodA (a ω) ∧ Excludes (a ω) ((caps ω).map Prod.snd) + let V := fun ω => goodB (b ω) ∧ Excludes (b ω) ((caps ω).map Prod.fst) + have hs : ∀ ω, ¬TargetCovered (ctx ω) (caps ω) (a ω) (b ω) → + (((((P ω ∨ Q ω) ∨ R ω) ∨ S ω) ∨ T ω) ∨ U ω) ∨ V ω := by + intro ω hn + by_cases hga : goodA (a ω) + · by_cases hgb : goodB (b ω) + · cases hd : caps ω with + | none => exact Or.inl (Or.inl (Or.inl (Or.inl (Or.inr hd)))) + | some D => + obtain ⟨C,hc⟩ := Option.ne_none_iff_exists'.mp (hcoh ω (by simp [hd])) + by_cases ha : a ω∈C.1 + · by_cases hb : b ω∈C.2 + · by_cases ha' : a ω∈D.2 + · by_cases hb' : b ω∈D.1 + · exact (hn ⟨C,D,hc,hd,ha,hb,ha',hb'⟩).elim + · exact Or.inr ⟨hgb, by simp [Excludes, hd, hb']⟩ + · exact Or.inl (Or.inr ⟨hga, by simp [Excludes, hd, ha']⟩) + · exact Or.inl (Or.inl (Or.inr ⟨hgb,C,hc,hb⟩)) + · exact Or.inl (Or.inl (Or.inl (Or.inr ⟨hga,C,hc,ha⟩))) + · exact Or.inl (Or.inl (Or.inl (Or.inl (Or.inl (Or.inr hgb))))) + · exact Or.inl (Or.inl (Or.inl (Or.inl (Or.inl (Or.inl hga))))) + exact (eventMass_filter_mono p _ _ hs).trans (eventMass_filter_or7 p P Q R S T U V) +end +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/ThreeHeader.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/ThreeHeader.lean new file mode 100644 index 0000000000000000000000000000000000000000..6adae28cc63b5924995188d79db582db16a55397 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/ThreeHeader.lean @@ -0,0 +1,82 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.ThreePublicDefs + +namespace OAI + + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining Metadata FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization + +private lemma log_three_sum {x y z : ℝ} (hx : 1≤x) (hy : 1≤y) (hz : 0≤z) (hzy : z≤y) : + Real.log (1+(x+z))≤Real.log 3+Real.log x+Real.log y := by + have hxy : x≤x*y := le_mul_of_one_le_right (by linarith) hy + have hyx : y≤x*y := le_mul_of_one_le_left (by linarith) hx + have h1 : 1≤x*y := hx.trans hxy + have hh := Real.log_le_log (by positivity : 0<1+(x+z)) + (show 1+(x+z)≤3*x*y by linarith) + rw [Real.log_mul (by positivity) (by linarith),Real.log_mul (by norm_num) (by linarith)] at hh + exact hh + +theorem threePublic_header {K : Type} [Field K] [Finite K] [Fintype K] + [Fintype (ℙ K (Fin 4→K))] (σ : ℝ) (hσ : 100000≤σ) + (hq : Real.exp σ=Nat.card K) : + Real.log (Fintype.card (ThreePublicIndex K σ):ℝ)≤35*(Nat.card K:ℝ) := by + have hd : finrank K (Fin 4→K)≤5 := by simp + have hq1 : (1:ℝ)≤Nat.card K := by exact_mod_cast Nat.card_pos (α:=K) + have hσq : σ≤Nat.card K := by rw [←hq];linarith only [Real.add_one_le_exp σ] + have hh := projective_header_le (K:=K) (V:=Fin 4→K) σ (by linarith) hq hd + have ht := log_card_training_le (V:=Fin 4→K) σ hσ (vector_card_le_exp σ hq hd) + rw [hq,Nat.card_eq_fintype_card] at ht + let a : ℕ := (Fintype.card (ℙ K (Fin 4→K))+1)* + Fintype.card (TrainingCode (Fin 4→K) (listCap σ) (productCap σ) (Nat.card (Fin 4→K))) + let c : ℕ := Fintype.card (Submodule K (Fin 4→K)) + let l : ℕ := Nat.log 2 (Nat.card K)+1 + have ha1 : (1:ℝ)≤a := by + have h : 0 0 + | .node a l r => e a*(BinaryTree.node a l r).numNodes+ + omissionBudget e l+omissionBudget e r + +lemma omissionBudget_nonneg (e : A→ℝ) (he : ∀a,0≤e a) (b : BinaryTree A) : + 0≤omissionBudget e b := by + induction b with + | nil => simp [omissionBudget] + | node a l r hl hr => exact add_nonneg (add_nonneg (mul_nonneg (he a) (by positivity)) hl) hr + +lemma expectedOmission_le (e : A→ℝ) (he : ∀a,0≤e a) + (hfail : ∀a c, (∑t,p a c t*(if enc a c t=none then (1:ℝ) else 0))≤e a) + (b : BinaryTree A) (c : C) : + expectedOmission Ω M left right enc p b c≤omissionBudget e b := by + induction b generalizing c with + | nil => simp [expectedOmission,retained,BinaryTree.numNodes,omissionBudget] + | node a l r hl hr => + rw [expectedOmission_node] + have hsum : (∑t,p a c t*((enc a c t).elim ((BinaryTree.node a l r).numNodes:ℝ) + (fun m=>expectedOmission Ω M left right enc p l (left a c t m)+ + expectedOmission Ω M left right enc p r (right a c t m)))) ≤ + ∑t,p a c t*((if enc a c t=none then (1:ℝ) else 0)*(BinaryTree.node a l r).numNodes+ + omissionBudget e l+omissionBudget e r) := by + apply Finset.sum_le_sum + intro t _ + apply mul_le_mul_of_nonneg_left _ ((p a c).nonneg t) + cases hh : enc a c t with + | none => + simp only [Option.elim_none,ite_true,one_mul] + have h1 := omissionBudget_nonneg e he l + have h2 := omissionBudget_nonneg e he r + linarith + | some m => + simp only [Option.elim_some,Option.some_ne_none,ite_false,zero_mul,zero_add] + exact add_le_add (hl _) (hr _) + calc + _ ≤ _ := hsum + _ = (∑t,p a c t*(if enc a c t=none then (1:ℝ) else 0))*(BinaryTree.node a l r).numNodes+ + omissionBudget e l+omissionBudget e r := by + simp only [mul_add,Finset.sum_add_distrib,←mul_assoc,←Finset.sum_mul,(p a c).sum_one,one_mul] + _ ≤ omissionBudget e (.node a l r) := by + have hh := mul_le_mul_of_nonneg_right (hfail a c) (Nat.cast_nonneg (α:=ℝ) ((BinaryTree.node a l r).numNodes)) + change _ ≤ e a*((BinaryTree.node a l r).numNodes:ℝ)+omissionBudget e l+omissionBudget e r + linarith +end SharpRamseyFive.TreeCodec + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/TreeWeights.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/TreeWeights.lean new file mode 100644 index 0000000000000000000000000000000000000000..51400c120ca0b5efd598e2548f5e5cf569d72a28 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/TreeWeights.lean @@ -0,0 +1,150 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.PrimitiveMessageWeights +import OAI.Combinatorics.RamseyFive.Geometry.OrientedPivotTree + +namespace OAI + +section +namespace SharpRamseyFive.MessageWeights +open scoped BigOperators +universe u v +lemma prod_weight_le (A : Type u) (B : Type v) [Fintype A] [Fintype B] + (c : A→ℝ) (d : B→ℝ) + (hc : (∑a,Real.exp (-c a))≤1) (hd : (∑b,Real.exp (-d b))≤1) : + (∑m : A×B,Real.exp (-(c m.1+d m.2)))≤1 := by + rw [Fintype.sum_prod_type] + apply le_trans _ hc + apply Finset.sum_le_sum + intro a _ + simp only [neg_add,Real.exp_add,←Finset.mul_sum] + simpa only [mul_one] using mul_le_mul_of_nonneg_left hd (Real.exp_pos (-c a)).le +lemma option_bit_weight (A : Type u) [Fintype A] (c : A→ℝ) + (hc : (∑a,Real.exp (-c a))≤1) : + (∑m : Option A,Real.exp (-(Real.log 2+m.elim 0 c)))≤1 := by + rw [Fintype.sum_option] + simp only [Option.elim_none,Option.elim_some,add_zero,neg_add,Real.exp_add, + ←Finset.mul_sum,Real.exp_neg,Real.exp_log (by norm_num : (0:ℝ)<2)] + simp only [Real.exp_neg] at hc + norm_num only [invOf_eq_inv, inv_mul_eq_div] at * + linarith only [hc] +end SharpRamseyFive.MessageWeights +namespace SharpRamseyFive.TreeCodec +open BinaryTree MessageWeights +open scoped Classical BigOperators +universe u v w z +variable {A : Type u} {C : Type v} [Fintype C] + (Ω : A→C→Type w) (M : ∀a c,Ω a c→Type z) + (left right : ∀a c t,M a c t→C) + +noncomputable def slotCost (localCost : ∀a c t,M a c t→ℝ) : + (b : BinaryTree A)→(ω : Tape Ω b)→(c : C)→Message Ω M left right b ω c→ℝ + | .nil,_,_,_ => 0 + | .node _ _ _,_,_,none => Real.log 2 + | .node a l r,ω,c,some ⟨m,ml,mr⟩ => Real.log 2+localCost a c (ω.1 c) m+ + slotCost localCost l ω.2.1 (left a c (ω.1 c) m) ml+ + slotCost localCost r ω.2.2 (right a c (ω.1 c) m) mr + +omit [Fintype C] in +lemma slotCost_weight [∀a c t,Fintype (M a c t)] + (lc : ∀a c t,M a c t→ℝ) + (hw : ∀a c t,(∑m : M a c t,Real.exp (-lc a c t m))≤1) + (b : BinaryTree A) (ω : Tape Ω b) (c : C) : + (∑m : Message Ω M left right b ω c,Real.exp (-slotCost Ω M left right lc b ω c m))≤1 := by + induction b generalizing c with + | nil => + change (∑_m : PUnit, Real.exp (-(0:ℝ)))≤1 + simp + | node a l r hl hr => + change (∑m : Option ((m : M a c (ω.1 c)) × + Message Ω M left right l ω.2.1 (left a c (ω.1 c) m) × + Message Ω M left right r ω.2.2 (right a c (ω.1 c) m)), + Real.exp (-slotCost Ω M left right lc (.node a l r) ω c m))≤1 + have hh := sigma_weight_le (M a c (ω.1 c)) + (fun m=>Message Ω M left right l ω.2.1 (left a c (ω.1 c) m) × + Message Ω M left right r ω.2.2 (right a c (ω.1 c) m)) + (lc a c (ω.1 c)) + (fun m x=>slotCost Ω M left right lc l ω.2.1 (left a c (ω.1 c) m) x.1+ + slotCost Ω M left right lc r ω.2.2 (right a c (ω.1 c) m) x.2) + (hw a c (ω.1 c)) (fun m=>prod_weight_le _ _ _ _ (hl ω.2.1 _) (hr ω.2.2 _)) + have hh' := option_bit_weight _ _ hh + convert hh' using 1 + congr 1 + funext m + cases m with + | none => simp [slotCost] + | some m => simp [slotCost,add_assoc] + +omit [Fintype C] in +lemma slotCost_le (lc : ∀a c t,M a c t→ℝ) + (b : BinaryTree A) (ω : Tape Ω b) (c : C) (m : Message Ω M left right b ω c) : + slotCost Ω M left right lc b ω c m≤cost Ω M left right lc b ω c m+ + (2*((retained Ω M left right b ω c m).numNodes:ℝ)+1)*Real.log 2 := by + have hlog : 0≤Real.log 2 := Real.log_nonneg (by norm_num) + induction b generalizing c with + | nil => simp [slotCost,cost,retained,BinaryTree.numNodes,hlog] + | node a l r hl hr => + cases m with + | none => simp [slotCost,cost,retained,BinaryTree.numNodes] + | some m => + have h1 := hl ω.2.1 _ m.2.1 + have h2 := hr ω.2.2 _ m.2.2 + simp only [slotCost,cost,retained,BinaryTree.numNodes,Nat.cast_add,Nat.cast_one] + linarith only [h1,h2] +end SharpRamseyFive.TreeCodec +end + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry MessageWeights BinaryTree +open scoped Classical BigOperators LinearAlgebra.Projectivization NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] +omit [Finite K] [FiniteDimensional K V] in +lemma finiteNode_weight (p : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (UB : Finset (ℙ K (Dual K V))) (H : ℕ) (q : ℝ) (hp : p.Normalized) + (t : FiniteNodeTape p H q) : + (∑m : FiniteNodeMessage p UB H q t,Real.exp (-finiteNodeCost p UB H q t m))≤1 := by + exact sigma_weight_le _ _ _ _ (hp t.1) (fun m=>ambientPair_weight UB (p.decoded t.1 m) H q t.2) +variable [Fintype (ℙ K (Dual K (Dual K V)))] +omit [Finite K] in +lemma orientedNode_weight + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (UA : Finset (ℙ K V)) (UB : Finset (ℙ K (Dual K V))) (H : ℕ) (q : ℝ) + (hf : f.Normalized) (hr : r.Normalized) (t : OrientedNodeTape f r H q) : + (∑m : OrientedNodeMessage f r UA UB H q t,Real.exp (-orientedNodeCost f r UA UB H q t m))≤1 := by + convert sum_bit_weight _ _ _ _ (finiteNode_weight f UB H q hf t.1) + (finiteNode_weight r (UA.map bidualPoint.toEmbedding) H q hr t.2) using 1 + congr 1 + funext m + cases m <;> rfl +variable {ι : Type} +variable (f : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V→FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) +noncomputable def orientedPivotSlotCost (b : BinaryTree ι) (ω : OrientedPivotTreeTape f r b) + (C : PivotContext K V) (m : OrientedPivotTreeMessage f r b ω C) : ℝ := + TreeCodec.slotCost (fun _ : ι=>OrientedPivotTape f r) (fun _ : ι=>OrientedPivotMessage f r) + (fun _ : ι=>orientedPivotLeft f r) (fun _ : ι=>orientedPivotRight f r) + (fun _ C t m=>orientedNodeCost (f C) (r C) C.1 C.2 (1000*(Nat.card K)^2) (Nat.card K) t m) + b ω C m +omit [Finite K] in +lemma orientedPivotTree_weight (hf : ∀C,(f C).Normalized) (hr : ∀C,(r C).Normalized) + (b : BinaryTree ι) (ω : OrientedPivotTreeTape f r b) (C : PivotContext K V) : + (∑m : OrientedPivotTreeMessage f r b ω C,Real.exp (-orientedPivotSlotCost f r b ω C m))≤1 := by + let : ∀(_ : ι) C t,Fintype (OrientedPivotMessage f r C t) := fun _ _ _=>inferInstance + exact TreeCodec.slotCost_weight _ _ _ _ _ + (fun _ C t=>orientedNode_weight (f C) (r C) C.1 C.2 _ _ (hf C) (hr C) t) b ω C + +lemma fourPivotTree_weight (hd : finrank K V=5) (σ P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + let f := fun C : PivotContext K V=>fourFinitePredictor hd σ C.1 C.2 P τ R L₀ + let r := fun C : PivotContext K V=>fourFinitePredictor (K:=K) (V:=Dual K V) + (by simpa using hd) σ C.2 (C.1.map bidualPoint.toEmbedding) P τ R L₀ + ∀(b : BinaryTree ι) (ω : OrientedPivotTreeTape f r b) (C : PivotContext K V), + (∑m : OrientedPivotTreeMessage f r b ω C,Real.exp (-orientedPivotSlotCost f r b ω C m))≤1 := by + dsimp only + intro b ω C + exact orientedPivotTree_weight _ _ (fun _=>fourFinite_weight _ _ _ _ _ _ _ _) + (fun _=>fourFinite_weight _ _ _ _ _ _ _ _) b ω C +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/TwoCapCost.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/TwoCapCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c109870e0d491971adc4f8333245f4c6d86daf3 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/TwoCapCost.lean @@ -0,0 +1,68 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Probability.PublicCapLaw + +namespace OAI + +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical + +lemma capture_log_ratio (a c w z T : ℝ) (ha : 0L₀*pointStrength S) R).real + (trueScoreSuccess U S O b E R (2*(Nat.card K:ℝ)*P) M ((9/10:ℝ)*S.card))) : + let N := scoreCutoff S U P τ + let Good := ambientSuccess S (trueScoreSuccess U S O b E R (2*(Nat.card K:ℝ)*P) M ((9/10:ℝ)*S.card)) + Real.log N≤Real.log (2*(Nat.card K:ℝ))+scoreSearchCost S U P τ ∧ + (Measure.pi (fun _ : Fin N=>scheduleMeasure + (fun i=>if i∈U then (L₀*(Nat.card K:ℝ≥0))/(U.card:ℝ≥0) else 0) R)).real + {t | firstIndex Good t=none}≤Real.exp (-(Nat.card K:ℝ)) ∧ + ∀(t : Fin N→Fin R→ℙ K V→ℕ) (i : Fin N),firstIndex Good t=some i → + ∃z≤E.card, (sampleCount (t i):ℝ)≤2*(Nat.card K:ℝ)*P ∧ + ((publicDecoded U rawO b z (t i)).card:ℝ)≤M ∧ + (9/10:ℝ)*S.card≤(((publicDecoded U rawO b z (t i))∩S).card:ℝ) := by + dsimp only + have hq : (1:ℝ)≤Nat.card K := by exact_mod_cast (Finite.one_lt_card (α:=K)).le + have hA := scoreSearchCost_nonneg S U hS hSU P τ hP hτ + have hexp : Real.exp (-(8*P*τ+Real.log 4))=Real.exp (-8*P*τ)/4 := by + rw [neg_add,Real.exp_add,Real.exp_neg (Real.log 4),Real.exp_log (by norm_num : (0:ℝ)<4)] + congr 1; ring_nf + have hmean : (fun _ : S=>(L₀*(Nat.card K:ℝ≥0))/(S.card:ℝ≥0))= + (fun _ : S=>L₀*pointStrength S) := by + funext x + simp only [pointStrength,mul_div_assoc] + have hh := enclosure_search_failure S U hS hSU (L₀*(Nat.card K:ℝ≥0)) R + (2*(Nat.card K:ℝ)*P) (8*P*τ+Real.log 4) (Nat.card K:ℝ) (by positivity) + (trueScoreSuccess U S O b E R (2*(Nat.card K:ℝ)*P) M ((9/10:ℝ)*S.card)) + (by intro ω hω;exact hω.1) (by rw [hmean,hexp];exact hprob) + have hcost : Real.log ((U.card:ℝ)/S.card)*(2*(Nat.card K:ℝ)*P)+(8*P*τ+Real.log 4)=scoreSearchCost S U P τ := by + unfold scoreSearchCost;ring + refine ⟨?_,hh,?_⟩ + · have hl := FiniteEntropy.ceil_ratio_log (Nat.card K:ℝ) (Real.exp (-scoreSearchCost S U P τ)) hq + (Real.exp_pos _) (Real.exp_le_one_iff.mpr (neg_nonpos.mpr hA)) + rw [Real.log_exp,sub_neg_eq_add] at hl + simpa only [scoreCutoff,Real.exp_neg,div_inv_eq_mul] using hl + · intro t i hi + exact public_table_decodes U S hSU O rawO hO b E R _ M _ t hi + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/UniformHistory.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/UniformHistory.lean new file mode 100644 index 0000000000000000000000000000000000000000..4692b6da42b42fbe0a66b0e31767abad3693603a --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/UniformHistory.lean @@ -0,0 +1,236 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.RevealDomains +import OAI.Combinatorics.RamseyFive.Entropy.FiniteKernels + +namespace OAI + +noncomputable section + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped Classical BigOperators +variable {B A T β κ : Type} [Fintype B] [Fintype A] [Fintype T] [Fintype β] + [Fintype κ] [Nonempty A] +local instance uniformHistoryIndexDecEq : DecidableEq ((B × A) ⊕ T) := Classical.decEq _ +local instance uniformHistorySubtypeDecEq (E : Finset ((B × A) ⊕ T)) : DecidableEq E := Classical.decEq _ + +theorem exists_uniform_pre_round (μ : Law κ) + (p : κ→Law (((B×A)⊕T)→β)) (S : κ→B→Finset A) + (n : ℕ) (hn : 0blockRoundMean blockAllInformation (p c) (S c) n i)≤ + 2*mean μ (fun c=>totalCorrelation (p c))/n := by + have hb : (∑ i : Fin n,mean μ (fun c=>blockRoundMean blockAllInformation (p c) (S c) n i))≤ + 2*mean μ (fun c=>totalCorrelation (p c)) := by + rw [←mean_sum,←mean_smul] + exact mean_mono_pos μ (fun c hc=>block_information_telescope (p c) (S c) n (hS c hc)) + by_contra! hh + have hs := Finset.sum_lt_sum_of_nonempty (s:=Finset.univ) + (Finset.univ_nonempty_iff.mpr ⟨⟨0,hn⟩⟩) (fun i _=>hh i) + have he : (∑ _i : Fin n,2*mean μ (fun c=>totalCorrelation (p c))/n)= + 2*mean μ (fun c=>totalCorrelation (p c)) := by + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] + have hn0 : (n:ℝ)≠0 := Nat.cast_ne_zero.mpr hn.ne' + field_simp + rw [he] at hs + exact (not_lt_of_ge hb) hs + +def preRoundLaw (μ : Law κ) (p : κ→Law (((B×A)⊕T)→β)) + (S : κ→B→Finset A) (n : ℕ) : Law ((κ×BlockHistory B A T β n)×(B→A)) := + adaptiveLaw (adaptiveLaw μ (fun c=>historyLaw (p c) (S c) n)) + (fun z=>freshBlockLaw (historyUnused (S z.1) z.2)) + +lemma preRound_mean (μ : Law κ) (p : κ→Law (((B×A)⊕T)→β)) + (S : κ→B→Finset A) (n : ℕ) + (J : Law (((B×A)⊕T)→β)→(B→Finset A)→(B→A)→ℝ) : + mean (preRoundLaw μ p S n) (fun z=>J (historyPosterior (p z.1.1) z.1.2) + (historyUnused (S z.1.1) z.1.2) z.2)= + mean μ (fun c=>blockRoundMean J (p c) (S c) (n+1) (Fin.last n)) := by + rw [preRoundLaw,mean_adaptive,mean_adaptive] + apply mean_congr + intro c + exact (history_round_mean J (p c) (S c) n).symm + +theorem exists_preRoundLaw_information (μ : Law κ) + (p : κ→Law (((B×A)⊕T)→β)) (S : κ→B→Finset A) + (n : ℕ) (hn : 0blockAllInformation (historyPosterior (p z.1.1) z.1.2) + (historyUnused (S z.1.1) z.1.2) z.2)≤ + 2*mean μ (fun c=>totalCorrelation (p c))/n := by + obtain ⟨i,hi⟩:=exists_uniform_pre_round μ p S n hn hS + refine ⟨i,?_⟩ + rw [preRound_mean] + have he (c : κ) := blockRoundMean_total_irrel blockAllInformation (p c) (S c) + (i.val+1) n (Fin.last i.val) i rfl + simp_rw [he] + exact hi + +lemma preRoundLaw_deficit (μ : Law κ) (p : κ→Law (((B×A)⊕T)→β)) + (S : κ→B→Finset A) (J : ℝ) (D : κ→((B×A)⊕T)→Finset β) + (hJ : ∀ c x,Real.log (D c x).card≤J) (hp : ∀ c,0<μ c→InDomains (p c) (D c)) + (hfix : ∀ c,0<μ c→FixedOutside (p c) (blockActive (S c))) + (n : ℕ) (hS : ∀ c,0<μ c→∀ b,n+1≤(S c b).card) : + mean (preRoundLaw μ p S n) (fun z=>blockAllDeficit J + (historyPosterior (p z.1.1) z.1.2) (historyUnused (S z.1.1) z.1.2) z.2)≤ + mean μ (fun c=>activeDeficit (p c) (blockActive (S c)) J) := by + rw [preRound_mean] + exact mean_mono_pos μ (fun c hc=>block_round_deficit J (D c) (hJ c) + (p c) (S c) (hp c hc) (hfix c hc) (n+1) (hS c hc) (Fin.last n)) + +omit [Fintype A] [Fintype T] [Nonempty A] in +lemma representativeSet_card (s : B→A) : (representativeSet (T:=T) s).card=Fintype.card B := by + unfold representativeSet + rw [Finset.card_image_of_injective] + · exact Finset.card_univ + · intro b c he + exact congrArg Prod.fst (Sum.inl.inj he) + +omit [Nonempty A] in +lemma blockHistory_card (n : ℕ) : + Fintype.card (BlockHistory B A T β n)= + (Fintype.card A^Fintype.card B * Fintype.card β^Fintype.card B)^n := by + induction n with + | zero => change Fintype.card Unit=_;simp + | succ n ih => + change Fintype.card (Σ s : B→A,(representativeSet (T:=T) s→β)×BlockHistory B A T β n)=_ + simp only [Fintype.card_sigma,Fintype.card_prod,Fintype.card_fun,Fintype.card_coe, + representativeSet_card,ih,Finset.sum_const,Finset.card_univ,nsmul_eq_mul] + rw [pow_succ] + simp only [Nat.cast_id] + ring + +end + +open scoped Classical BigOperators +variable {B A T β κ : Type} [Fintype B] [Fintype A] [Fintype T] [Fintype β] + [Fintype κ] [Nonempty A] +local instance historyProducerIndexDecEq : DecidableEq ((B × A) ⊕ T) := Classical.decEq _ +local instance historyProducerSubtypeDecEq (E : Finset ((B × A) ⊕ T)) : DecidableEq E := Classical.decEq _ + +omit [Fintype β] [Nonempty A] in +lemma history_unused_card (S : B→Finset A) (r n : ℕ) + (hS : ∀ b,r+n≤(S b).card) (h : BlockHistory B A T β n) : + ∀ b,r≤(historyUnused S h b).card := by + induction n generalizing S with + | zero => simpa only [historyUnused,Nat.add_zero] using hS + | succ n ih => + apply ih (eraseBlock S h.1) _ h.2.2 + apply eraseBlock_card S h.1 (r+n) + intro b + have := hS b + omega + +omit [Nonempty A] in +lemma history_in_domains (p : Law (((B×A)⊕T)→β)) (D : ((B×A)⊕T)→Finset β) + (hp : InDomains p D) (n : ℕ) (h : BlockHistory B A T β n) : + InDomains (historyPosterior p h) D := by + induction n generalizing p with + | zero => exact hp + | succ n ih => exact ih _ (hp.fiber _ _) h.2.2 + +lemma history_fixedOutside (p : Law (((B×A)⊕T)→β)) (S : B→Finset A) + (hp : FixedOutside p (blockActive S)) (n : ℕ) + (h : BlockHistory B A T β n) (hh : 0 exact hp + | succ n ih => + have hpair : 0historyLaw (fiber (reveal p (representativeSet h.1)) a) + (eraseBlock S h.1) n) h.2 := by + change 0(freshBlockLaw S).nonneg h.1 |>.not_gt hn.1) |>.2 + have hc : 0(first (reveal p (representativeSet h.1))).nonneg h.2.1 |>.not_gt hn.1) + apply ih _ _ _ h.2.2 hc.2 + rw [blockActive_erase] + exact hp.fiber _ _ hc.1 + +lemma mean_historyPosterior (p : Law (((B×A)⊕T)→β)) (S : B→Finset A) + (n : ℕ) (f : (((B×A)⊕T)→β)→ℝ) : + mean (historyLaw p S n) (fun h=>mean (historyPosterior p h) f)=mean p f := by + change mean (historyLaw p S n) (fun h=>∑ x,historyPosterior p h x*f x)=_ + rw [mean_sum] + unfold mean at ⊢ + apply Finset.sum_congr rfl + intro x _ + have he := mean_smul (historyLaw p S n) (f x) (fun h=>historyPosterior p h x) + rw [history_posterior_mean] at he + simpa only [mean,mul_comm] using he + +def preRoundTupleLaw (μ : Law κ) (p : κ→Law (((B×A)⊕T)→β)) + (S : κ→B→Finset A) (n : ℕ) : + Law (((κ×BlockHistory B A T β n)×(B→A))×(((B×A)⊕T)→β)) := + adaptiveLaw (preRoundLaw μ p S n) (fun z=>historyPosterior (p z.1.1) z.1.2) + +lemma preRoundTuple_context_tuple (μ : Law κ) (p : κ→Law (((B×A)⊕T)→β)) + (S : κ→B→Finset A) (n : ℕ) : + map (preRoundTupleLaw μ p S n) (fun z=>(z.1.1.1,z.2))=adaptiveLaw μ p := by + apply Law.ext_mean + intro f + rw [mean_map] + simp only [preRoundTupleLaw,preRoundLaw,mean_adaptive] + simp_rw [mean_const,mean_historyPosterior] + +lemma preRoundTuple_fiber (μ : Law κ) (p : κ→Law (((B×A)⊕T)→β)) + (S : κ→B→Finset A) (n : ℕ) (z : (κ×BlockHistory B A T β n)×(B→A)) + (hz : 0((z.1.1.1,z.2),(z.1.1.2,z.1.2))) + +lemma historyObservation_first (μ : Law κ) (p : κ→Law (((B×A)⊕T)→β)) + (S : κ→B→Finset A) (n : ℕ) : + first (historyObservationLaw μ p S n)=adaptiveLaw μ p := by + have hf {X Y : Type} [Fintype X] [Fintype Y] (r : Law (X×Y)) : + first r=map r Prod.fst := by + apply Law.ext + funext x + simp only [first,map,Fintype.sum_prod_type] + rw [Finset.sum_comm] + simp + rw [hf,historyObservationLaw, map_comp] + exact preRoundTuple_context_tuple μ p S n + +def originalHistoryLaw (P : Law Ω) (context : Ω→κ) (tuple : Ω→((B×A)⊕T)→β) + (S : κ→B→Finset A) (n : ℕ) : Law (Ω×(BlockHistory B A T β n×(B→A))) := + liftObserved P (fun ω=>(context ω,tuple ω)) + (historyObservationLaw (first (pair P context tuple)) (fiber (pair P context tuple)) S n) + +lemma originalHistory_unchanged (P : Law Ω) (context : Ω→κ) (tuple : Ω→((B×A)⊕T)→β) + (S : κ→B→Finset A) (n : ℕ) : + map (originalHistoryLaw P context tuple S n) Prod.fst=P := liftObserved_original _ _ _ + +lemma originalHistory_joint (P : Law Ω) (context : Ω→κ) (tuple : Ω→((B×A)⊕T)→β) + (S : κ→B→Finset A) (n : ℕ) : + map (originalHistoryLaw P context tuple S n) + (fun z=>(((context z.1,z.2.1),z.2.2),tuple z.1))= + preRoundTupleLaw (first (pair P context tuple)) (fiber (pair P context tuple)) S n := by + let q:=historyObservationLaw (first (pair P context tuple)) (fiber (pair P context tuple)) S n + have hq : first q=map P (fun ω=>(context ω,tuple ω)) := by + dsimp [q] + rw [historyObservation_first,adaptive_reconstruct] + rfl + have he:=liftObserved_joint P (fun ω=>(context ω,tuple ω)) q hq + have hm:=congrArg (fun r=>map r (fun z=>(((z.1.1,z.2.1),z.2.2),z.1.2))) he + dsimp [q] at hm + rw [map_comp,historyObservationLaw,map_comp] at hm + change map (originalHistoryLaw P context tuple S n) + (fun z=>(((context z.1,z.2.1),z.2.2),tuple z.1))= + map (preRoundTupleLaw (first (pair P context tuple)) (fiber (pair P context tuple)) S n) id at hm + rwa [map_id] at hm + +end SharpRamseyFive.FiniteEntropy + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/UnionMarking.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/UnionMarking.lean new file mode 100644 index 0000000000000000000000000000000000000000..1f95fa26a1872e1549b15fd6b0bce58cdc766eae --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/UnionMarking.lean @@ -0,0 +1,167 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.RevealDomains +import OAI.Combinatorics.RamseyFive.Entropy.EntropyCrossEntropy + +namespace OAI + +noncomputable section + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped Classical BigOperators +variable {α β ι κ : Type*} [Fintype α] [Fintype β] [Fintype ι] [Fintype κ] +local instance unionMarkingDecEq : DecidableEq ι := Classical.decEq _ + +def unionRecord (f : α → ι → β) (E₁ E₂ : α → Finset ι) (x : α) (i : ι) : Option β := + if i ∈ E₁ x ∪ E₂ x then some (f x i) else none + +abbrev RankTypes := (Fin 5 × Fin 5) × Bool × Bool + +def unionMask (r : α → ι → RankTypes) (E₁ E₂ : α → Finset ι) + (x : α) (i : ι) : RankTypes × Bool × Bool := + (r x i,decide (i∈E₁ x),decide (i∈E₂ x)) + +omit [Fintype α] [Fintype β] in +lemma unionRecord_present (f : α → ι → β) (E₁ E₂ : α → Finset ι) (x : α) : + (∑ i,present (unionRecord f E₁ E₂ x i)) = ((E₁ x ∪ E₂ x).card:ℝ) := by + have he (i : ι) : present (unionRecord f E₁ E₂ x i) = + if i∈E₁ x ∪ E₂ x then (1:ℝ) else 0 := by + simp only [unionRecord] + split_ifs <;> rfl + simp_rw [he] + rw [Finset.sum_ite_mem,Finset.univ_inter] + simp + +theorem union_marking_entropy (p : Law (κ × α)) + (r : α → ι → RankTypes) (f : α → ι → β) (E₁ E₂ : α → Finset ι) + (S : κ → ι → Finset β) (cap : ℝ) (hcap : 1≤cap) + (hS : ∀ c i,((S c i).card:ℝ)≤cap) + (hsupp : ∀ c x,0

simp [h,unionRecord] + +omit [Fintype α] [Fintype β] [Fintype ι] in +lemma unionRecord_decode_right (f : α → ι → β) (E₁ E₂ : α → Finset ι) (x : α) (i : ι) : + (if i∈E₂ x then unionRecord f E₁ E₂ x i else none) = + if i∈E₂ x then some (f x i) else none := by + by_cases h : i∈E₂ x <;> simp [h,unionRecord] + +end + +open scoped Classical BigOperators +variable {α κ μ : Type*} [Fintype α] [Fintype κ] [Fintype μ] + +def withMessage (p : Law (κ × α)) (M : α → μ) : Law ((κ × μ) × α) := + map p (fun z => ((z.1,M z.2),z.2)) + +lemma first_withMessage (p : Law (κ × α)) (M : α → μ) : + first (withMessage p M)=mapSnd p M := by + rw [←map_first,withMessage,map_comp] + rfl + +lemma second_withMessage (p : Law (κ × α)) (M : α → μ) : + second (withMessage p M)=second p := by + rw [←map_second,withMessage,map_comp] + exact map_second p + +lemma entropy_withMessage (p : Law (κ × α)) (M : α → μ) : + entropy (withMessage p M)=entropy p := by + apply entropy_map_injective + intro z w h + have h1 : z.1=w.1 := congrArg (fun u : (κ×μ)×α => u.1.1) h + have h2 : z.2=w.2 := congrArg (fun u : (κ×μ)×α => u.2) h + exact Prod.ext h1 h2 + +lemma mean_withMessage_label (p : Law (κ × α)) (M : α → μ) (g : μ → ℝ) : + mean (first (withMessage p M)) (fun z => g z.2)= + mean (second p) (fun x => g (M x)) := by + rw [first_withMessage,←map_second p,mapSnd,mean_map,mean_map] + +lemma withMessage_support (p : Law (κ × α)) (M : α → μ) + (c : κ) (m : μ) (x : α) (hx : 0 ((z.1,M z.2),z.2)) ((c,m),x) hx + have hz1 : z.1=c := congrArg (fun u => u.1.1) he + have hz2 : z.2=x := congrArg Prod.snd he + have hzm : M z.2=m := congrArg (fun u => u.1.2) he + have hz' : z=(c,x) := Prod.ext hz1 hz2 + subst z + exact ⟨hz,hzm⟩ + +lemma fiber_withMessage_support (p : Law (κ × α)) (M : α → μ) + (c : κ) (m : μ) (hm : 0entropy (map (fiber p c) M)) ≤ + C+mean (second p) h*L) : + mean (first (withMessage p M)) + (fun z=>activeDeficit (fiber (withMessage p M) z) (U z.2) J) ≤ + (Fintype.card ι:ℝ)*J-entropy (second p)+entropy (first p)+C+ + mean (second p) h*(L-J) := by + have hi : entropy (first (withMessage p M)) ≤ + entropy (first p)+C+mean (second p) h*L := by + rw [first_withMessage,entropy_chain,first_mapSnd] + simp only [fiber_mapSnd] + change entropy (first p)+mean (first p) (fun c=>entropy (map (fiber p c) M)) ≤ _ + linarith + have hh := entropy_chain (withMessage p M) + rw [entropy_withMessage] at hh + have hsecond := entropy_map_le p Prod.snd + rw [map_second] at hsecond + have hc : mean (first (withMessage p M)) (fun z=>((U z.2).card:ℝ)) = + (Fintype.card ι:ℝ)-mean (second p) h := by + rw [mean_withMessage_label p M (fun m=>((U m).card:ℝ))] + calc + _ = mean (second p) (fun x=>(Fintype.card ι:ℝ)-h x) := + mean_congr _ (fun x=>by linarith [hcard x]) + _ = _ := by rw [mean_sub,mean_const] + have he : mean (first (withMessage p M)) + (fun z=>activeDeficit (fiber (withMessage p M) z) (U z.2) J) = + ((Fintype.card ι:ℝ)-mean (second p) h)*J- + mean (first (withMessage p M)) (fun z=>entropy (fiber (withMessage p M) z)) := by + simp only [activeDeficit,mean,mul_sub,Finset.sum_sub_distrib,←mul_assoc, + ←Finset.sum_mul] + exact congrArg (fun u=>u*J-∑ z,first (withMessage p M) z * + entropy (fiber (withMessage p M) z)) hc + rw [he] + change entropy p = entropy (first (withMessage p M))+ + mean (first (withMessage p M)) (fun z=>entropy (fiber (withMessage p M) z)) at hh + nlinarith +end SharpRamseyFive.FiniteEntropy + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/UniversalFreshCost.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/UniversalFreshCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8b4ab58b2c63e2c0aec9f0e5ae133c00407f8a0 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/UniversalFreshCost.lean @@ -0,0 +1,42 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.UniversalReverse + +namespace OAI + + +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical BigOperators +variable {A B : Type*} [Fintype B] + +noncomputable def universalFreshCost (W : Finset B) (H : ℕ) (q : ℝ) + (m : UniversalFreshMessage W H q) : ℝ := + Real.log (H+1:ℝ)+Real.log (W.card+1:ℝ)+ + Real.log (Fintype.card (Fin (cardCutoff q m.2.1 W.card m.1)):ℝ) + +lemma universalFresh_headers (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hCW : C⊆W) (H : ℕ) (n : Fin (H+1)) (q M : ℝ) + (t : UniversalFresh B H q) (m : UniversalFreshMessage W H q) + (hm : universalFreshEncoded R S U C W hCW H n q M t=some m) : + m.1=n ∧ m.2.1.val=C.card := by + unfold universalFreshEncoded at hm + split_ifs at hm with hW + · obtain ⟨f,hf,he⟩ := Option.map_eq_some_iff.mp hm + subst m + refine ⟨rfl,?_⟩ + unfold freshEncoded at hf + obtain ⟨i,hi,he⟩ := Option.map_eq_some_iff.mp hf + exact congrArg (fun z : FreshMessage W n q=>z.1.val) he.symm + +lemma universalFresh_cost_exact (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hCW : C⊆W) (H : ℕ) (n : Fin (H+1)) (q M : ℝ) + (t : UniversalFresh B H q) (m : UniversalFreshMessage W H q) + (hm : universalFreshEncoded R S U C W hCW H n q M t=some m) : + universalFreshCost W H q m=Real.log (H+1:ℝ)+Real.log (W.card+1:ℝ)+ + Real.log (Fintype.card (Fin (cardCutoff q C.card W.card n)):ℝ) := by + have hh := universalFresh_headers R S U C W hCW H n q M t m hm + unfold universalFreshCost + rw [hh.2,hh.1] +end SharpRamseyFive.ReverseCap + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/UnusedRepresentative.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/UnusedRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..a11a7961ad55fbb948221327232b875bd85ed2d6 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/UnusedRepresentative.lean @@ -0,0 +1,165 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.RepresentativeSet +import OAI.Combinatorics.RamseyFive.Entropy.ProductHistory + +namespace OAI + +noncomputable section + +namespace SharpRamseyFive.FiniteEntropy + +section +open scoped Classical BigOperators +variable {B A T β : Type} [Fintype B] [Fintype A] [Fintype T] [Fintype β] +local instance : DecidableEq ((B × A) ⊕ T) := Classical.decEq _ +local instance (E : Finset ((B × A) ⊕ T)) : DecidableEq E := Classical.decEq _ + +lemma uniformOn_expectation (S : Finset A) (hS : S.Nonempty) (f : A → ℝ) : + (∑ a, uniformOn S hS a * f a) = (S.card : ℝ)⁻¹ * ∑ a ∈ S, f a := by + simp only [uniformOn] + calc + _ = ∑ a, if a ∈ S then (S.card : ℝ)⁻¹ * f a else 0 := by + apply Finset.sum_congr rfl + intro a _ + split_ifs <;> simp + _ = _ := by rw [←Finset.sum_filter, Finset.filter_univ_mem, Finset.mul_sum] + +lemma piLaw_uniformOn_zero (S : B → Finset A) (hS : ∀ b, (S b).Nonempty) + (s : B → A) {b : B} (h : s b ∉ S b) : + piLaw (fun b => uniformOn (S b) (hS b)) s = 0 := by + classical + change (∏ b, uniformOn (S b) (hS b) (s b)) = 0 + exact Finset.prod_eq_zero (Finset.mem_univ b) (by simp [uniformOn,h]) + +theorem unused_selected_identity (S : B → Finset A) (hS : ∀ b, (S b).Nonempty) + (f : (B → A) → B → A → ℝ) + (hown : ∀ s b a i, f (Function.update s b a) b i = f s b i) (b : B) : + (S b).card * (∑ s, piLaw (fun b => uniformOn (S b) (hS b)) s * f s b (s b)) = + ∑ s, piLaw (fun b => uniformOn (S b) (hS b)) s * (∑ a ∈ S b, f s b a) := by + classical + rw [independent_selected_identity _ f hown] + simp_rw [uniformOn_expectation] + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro s _ + have hc : ((S b).card : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr (Finset.card_ne_zero.mpr (hS b)) + field_simp + +theorem unused_all_le_twice_unselected (S : B → Finset A) + (hS : ∀ b, (S b).Nonempty) (hsize : ∀ b, 2 ≤ (S b).card) + (f : (B → A) → B → A → ℝ) (hf : ∀ s b a, 0 ≤ f s b a) + (hown : ∀ s b a i, f (Function.update s b a) b i = f s b i) (b : B) : + (∑ s, piLaw (fun b => uniformOn (S b) (hS b)) s * (∑ a ∈ S b, f s b a)) ≤ + 2*(∑ s, piLaw (fun b => uniformOn (S b) (hS b)) s * + (∑ a ∈ (S b).erase (s b), f s b a)) := by + classical + let w := piLaw (fun b => uniformOn (S b) (hS b)) + have hi := unused_selected_identity S hS f hown b + have hs : (∑ s, w s * (∑ a ∈ S b, f s b a)) = + (∑ s, w s * f s b (s b)) + + (∑ s, w s * (∑ a ∈ (S b).erase (s b), f s b a)) := by + rw [←Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro s _ + by_cases h : s b ∈ S b + · rw [←mul_add, Finset.add_sum_erase _ _ h] + · have hz : w s = 0 := piLaw_uniformOn_zero S hS s h + simp [hz] + have hn : 0 ≤ ∑ s, w s * f s b (s b) := + Finset.sum_nonneg fun s _ => mul_nonneg (w.nonneg s) (hf s b (s b)) + have hc : (2 : ℝ) ≤ (S b).card := by exact_mod_cast hsize b + change (S b).card * (∑ s, w s * f s b (s b)) = _ at hi + change (∑ s, w s * (∑ a ∈ S b, f s b a)) ≤ _ + nlinarith [mul_le_mul_of_nonneg_right hc hn] + +theorem unused_information_le_twice_cost + (p : Law (((B × A) ⊕ T) → β)) (S : B → Finset A) + (hS : ∀ b, (S b).Nonempty) (hsize : ∀ b, 2 ≤ (S b).card) : + (∑ s : B → A, piLaw (fun b => uniformOn (S b) (hS b)) s * + ((∑ b : B, ∑ a ∈ S b, (blockInformation p s b a : ℝ)) + + ∑ t : T, (middleInformation p s t : ℝ))) ≤ + 2 * (∑ s : B → A, piLaw (fun b => uniformOn (S b) (hS b)) s * + revealCost p (representativeSet s)) := by + classical + let w := piLaw (fun b => uniformOn (S b) (hS b)) + have hb := Finset.sum_le_sum (fun b (_ : b ∈ (Finset.univ : Finset B)) => + unused_all_le_twice_unselected S hS hsize + (fun s b a => (blockInformation p s b a : ℝ)) + (fun _ _ _ => NNReal.coe_nonneg _) (fun s b a i => + congrArg NNReal.toReal (blockInformation_own_independent p s b a i)) b) + have hc (s : B → A) : + (∑ b : B, ∑ a ∈ (S b).erase (s b), (blockInformation p s b a : ℝ)) + + (∑ t : T, (middleInformation p s t : ℝ)) ≤ revealCost p (representativeSet s) := by + apply le_trans _ (representative_unselected_le_cost p s) + apply add_le_add _ le_rfl + apply Finset.sum_le_sum + intro b _ + apply Finset.sum_le_sum_of_subset_of_nonneg + · exact Finset.erase_subset_erase (s b) (Finset.subset_univ _) + · intro a _ _ + exact NNReal.coe_nonneg _ + have hh := Finset.sum_le_sum (fun s (_ : s ∈ (Finset.univ : Finset (B → A))) => + mul_le_mul_of_nonneg_left (hc s) (w.nonneg s)) + have hm : 0 ≤ ∑ s : B → A, w s * ∑ t : T, (middleInformation p s t : ℝ) := by + exact Finset.sum_nonneg fun s _ => mul_nonneg (w.nonneg s) + (Finset.sum_nonneg fun _ _ => NNReal.coe_nonneg _) + have hb' : + (∑ s : B → A, w s * (∑ b : B, ∑ a ∈ S b, (blockInformation p s b a : ℝ))) ≤ + 2 * (∑ s : B → A, w s * (∑ b : B, ∑ a ∈ (S b).erase (s b), + (blockInformation p s b a : ℝ))) := by + calc + _ = ∑ b : B, ∑ s : B → A, w s * (∑ a ∈ S b, (blockInformation p s b a : ℝ)) := by + simp only [Finset.mul_sum] + rw [Finset.sum_comm] + _ ≤ ∑ b : B, 2 * (∑ s : B → A, w s * (∑ a ∈ (S b).erase (s b), + (blockInformation p s b a : ℝ))) := hb + _ = _ := by + rw [←Finset.mul_sum] + congr 1 + simp only [Finset.mul_sum] + rw [Finset.sum_comm] + change (∑ s : B → A, w s * _) ≤ 2 * (∑ s : B → A, w s * _) + simp only [mul_add, Finset.sum_add_distrib] at hh ⊢ + linarith only [hb',hh,hm] + +end + +open scoped Classical BigOperators +variable {α β : Type*} [Fintype α] [Fintype β] + +def mean (p : Law α) (f : α → ℝ) : ℝ := ∑ a, p a * f a +lemma mean_nonneg (p : Law α) (f : α → ℝ) (hf : ∀ a, 0 ≤ f a) : 0 ≤ mean p f := + Finset.sum_nonneg fun a _ => mul_nonneg (p.nonneg a) (hf a) +lemma mean_mono (p : Law α) {f g : α → ℝ} (h : ∀ a, f a ≤ g a) : mean p f ≤ mean p g := + Finset.sum_le_sum fun a _ => mul_le_mul_of_nonneg_left (h a) (p.nonneg a) +lemma mean_const (p : Law α) (c : ℝ) : mean p (fun _ => c) = c := by + rw [mean, ←Finset.sum_mul, p.sum_one, one_mul] +lemma mean_add (p : Law α) (f g : α → ℝ) : mean p (fun a => f a + g a) = mean p f + mean p g := by + simp only [mean, mul_add, Finset.sum_add_distrib] +lemma mean_sub (p : Law α) (f g : α → ℝ) : mean p (fun a => f a - g a) = mean p f - mean p g := by + simp only [mean, mul_sub, Finset.sum_sub_distrib] +lemma mean_smul (p : Law α) (c : ℝ) (f : α → ℝ) : mean p (fun a => c * f a) = c * mean p f := by + simp only [mean, Finset.mul_sum, mul_left_comm] +lemma mean_congr (p : Law α) {f g : α → ℝ} (h : ∀ a, f a = g a) : mean p f = mean p g := by + exact Finset.sum_congr rfl fun a _ => congrArg (fun x => p a*x) (h a) +lemma mean_finset_sum {ι : Type*} (p : Law α) (s : Finset ι) (f : ι → α → ℝ) : + mean p (fun a => ∑ i ∈ s, f i a) = ∑ i ∈ s, mean p (f i) := by + simp only [mean, Finset.mul_sum] + exact Finset.sum_comm +lemma mean_sum {ι : Type*} [Fintype ι] (p : Law α) (f : ι → α → ℝ) : + mean p (fun a => ∑ i, f i a) = ∑ i, mean p (f i) := mean_finset_sum p Finset.univ f +lemma mean_map (p : Law α) (g : α → β) (f : β → ℝ) : mean (map p g) f = mean p (fun a => f (g a)) := by + simp only [mean, map, Finset.sum_mul] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro a _ + simp only [ite_mul, zero_mul] + simp +lemma mean_adaptive (p : Law α) (q : α → Law β) (f : α × β → ℝ) : + mean (adaptiveLaw p q) f = mean p (fun a => mean (q a) (fun b => f (a,b))) := by + simp only [mean, adaptiveLaw, Fintype.sum_prod_type, Finset.mul_sum, mul_assoc] +end SharpRamseyFive.FiniteEntropy + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/ValidationBudgetWide.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/ValidationBudgetWide.lean new file mode 100644 index 0000000000000000000000000000000000000000..4380d64994c27d37b01b15bc0c2786e0d0fc05ec --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/ValidationBudgetWide.lean @@ -0,0 +1,119 @@ +import Mathlib + +namespace OAI + +noncomputable section +namespace SharpRamseyFive.ValidationBounds +open scoped BigOperators Classical +lemma validation_budget_wide {B P L : ℝ} {R : ℕ} + (hP : 100000 ≤ P) (hR : (R:ℝ) ≤ P/100000) + (hLR : 100*L ≤ P) + (D S : ℝ) (hD0 : 0 ≤ D) (hD : D ≤ 100*B*Real.exp (L/100)) + (hS : S ≤ (400*B^2+2*(B^2*Real.exp (P/50)))*2^R) : + D^2+S ≤ B^2*Real.exp (3*P/100) := by + have hlog : Real.log 2 ≤ 1 := (Real.log_le_sub_one_of_pos (by norm_num)).trans (by norm_num) + have hpow : (2:ℝ)^R ≤ Real.exp (P/100000) := by + rw [show (2:ℝ)^R = Real.exp ((R:ℝ)*Real.log 2) by + rw [Real.exp_nat_mul,Real.exp_log (by norm_num : (0:ℝ)<2)]] + apply Real.exp_le_exp.mpr + calc + (R:ℝ)*Real.log 2 ≤ (R:ℝ)*1 := mul_le_mul_of_nonneg_left hlog (by positivity) + _ ≤ P/100000 := by simpa using hR + have hE : 1 ≤ Real.exp (P/50) := Real.one_le_exp (by linarith) + have hS' : S ≤ 402*B^2*Real.exp (P/50+P/100000) := by + calc + S ≤ (400*B^2+2*(B^2*Real.exp (P/50)))*2^R := hS + _ ≤ (402*B^2*Real.exp (P/50))*Real.exp (P/100000) := by + apply mul_le_mul _ hpow (by positivity) (by positivity) + nlinarith [sq_nonneg B,mul_le_mul_of_nonneg_left hE (sq_nonneg B)] + _ = _ := by rw [Real.exp_add]; ring + have hD' : D^2 ≤ 10000*B^2*Real.exp (P/5000) := by + calc + _ ≤ (100*B*Real.exp (L/100))^2 := pow_le_pow_left₀ hD0 hD 2 + _ = 10000*B^2*Real.exp (2*(L/100)) := by + rw [show Real.exp (2*(L/100)) = Real.exp (L/100)^2 by + simpa using Real.exp_nat_mul (L/100) 2] + ring + _ ≤ _ := mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by linarith)) (by positivity) + have hD'' : D^2 ≤ 10000*B^2*Real.exp (P/50+P/100000) := hD'.trans + (mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by linarith)) (by positivity)) + have hcoef : (10402:ℝ) ≤ Real.exp (3*P/100-(P/50+P/100000)) := by + have ht : (100:ℝ) ≤ 3*P/100-(P/50+P/100000) := by linarith + have he' : (10402:ℝ) ≤ Real.exp (100:ℝ) := by + have he2 := Real.add_one_le_exp (25:ℝ) + have he26 : (26:ℝ) ≤ Real.exp 25 := by linarith + have hp := pow_le_pow_left₀ (by norm_num : (0:ℝ)≤26) he26 4 + rw [← Real.exp_nat_mul] at hp + norm_num at hp + exact (by norm_num : (10402:ℝ)≤456976).trans hp + exact he'.trans (Real.exp_le_exp.mpr ht) + calc + D^2+S ≤ 10402*B^2*Real.exp (P/50+P/100000) := by linarith [hD'',hS'] + _ ≤ Real.exp (3*P/100-(P/50+P/100000))*B^2*Real.exp (P/50+P/100000) := by + gcongr + _ = _ := by rw [mul_assoc,mul_left_comm,← Real.exp_add]; congr 2; ring + +lemma final_validation_budget_wide {B P L N D S : ℝ} {R : ℕ} + (hP : 100000≤P) (hL : 1≤L) (hPR : P=L*(R:ℝ)) + (hR : (R:ℝ)≤P/100000) (hlog : (R:ℝ)*Real.log L≤P/100) + (hN : N≤400*B^2) (hN0 : 0≤N) (hDS : D^2+S≤B^2*Real.exp (3*P/100)) : + N*(2*Real.exp (-L*(3/4)))^R+ + (2*L^2*Real.exp (-L*(3/4)))^R*(D^2+S) ≤ B^2*Real.exp (-3*P/5) := by + have hL0 : 0 + fourFinitePredictor hd σ C.1 C.2 (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun C : PivotContext K V => + fourFinitePredictor (K:=K) (V:=Dual K V) (by simpa using hd) σ C.2 + (C.1.map bidualPoint.toEmbedding) (P η σ D R) (σ^(-800*beta η)) R L₀ + let X := nodeChargeConstant*(Nat.card K:ℝ)*(P η σ D R) + ∀ (t : VariableTreeTape f r w) (C : PivotContext K V), + variableTreeCost f r t C + (variableTreeEncoded f r t C m σ hσ hq hd.le A₀ B₀ hA₀ hB₀ + (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num))≤ + Real.log (w+1)+ + (X*(finiteBalanced m.val).height* + (pivotPotential C+(b+1+2*Real.log (320/((9:ℝ)/100000)+320))*m.val)+ + (Real.log 2+X*(b+1+P η σ D R))*m.val)+ + (2*(m.val:ℝ)+1)*Real.log 2 := by + filter_upwards [eventually_oriented_tree_cost hη hη' Cb hCb] with σ hh + intro D b R L₀ q K V _ _ _ _ _ _ _ _ _ hd w m A₀ B₀ hA₀ hB₀ hσ hq hcard hr hL hb hbhi hp + dsimp only + intro t C + have h:=hh D b R L₀ q K V hd (Fin (m.val+1)) A₀ B₀ hA₀ hB₀ hσ hq hcard hr hL + hb hbhi hp (finiteBalanced m.val) (t m) C + let f := fun U : PivotContext K V=>fourFinitePredictor hd σ U.1 U.2 + (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun U : PivotContext K V=>fourFinitePredictor (K:=K) (V:=Dual K V) + (by simpa using hd) σ U.2 (U.1.map bidualPoint.toEmbedding) + (P η σ D R) (σ^(-800*beta η)) R L₀ + have hs := TreeCodec.slotCost_le_original + (fun _ : Fin (m.val+1)=>OrientedPivotTape f r) + (fun _ : Fin (m.val+1)=>OrientedPivotMessage f r) + (fun _ : Fin (m.val+1)=>orientedPivotLeft f r) + (fun _ : Fin (m.val+1)=>orientedPivotRight f r) + (fun _ U t m=>orientedNodeCost (f U) (r U) U.1 U.2 + (1000*(Nat.card K)^2) (Nat.card K) t m) + (finiteBalanced m.val) (t m) C + (orientedPivotTreeEncoded f r σ hσ hq hd.le A₀ B₀ hA₀ hB₀ + (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) + (finiteBalanced m.val) (t m) C) + have hh' := hs.trans (add_le_add h le_rfl) + simp only [finiteBalanced_nodes] at hh' + unfold variableTreeCost variableTreeEncoded + dsimp only + simpa only [orientedPivotSlotCost, f, r, add_assoc] using add_le_add_right hh' (Real.log (w+1)) +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/WeightedLowHits.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/WeightedLowHits.lean new file mode 100644 index 0000000000000000000000000000000000000000..9dc000f141b026453755360ab8c716f9cb6388ae --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/WeightedLowHits.lean @@ -0,0 +1,79 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.Q +import OAI.Combinatorics.RamseyFive.Entropy.EventMass + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +def lowHits (w : ℙ K V → ℝ) : Finset (ℙ K (Dual K V)) := + Finset.univ.filter fun y=>weightOnHyperplane w y < 1/(4*(Nat.card K:ℝ)) + +theorem lowHits_card (hdim : finrank K V=5) (w : ℙ K V → ℝ) (A : ℝ) + (hA : 0≤A) (hw : ∀ x,0≤w x ∧ w x≤A) + (hm₀ : (3:ℝ)/4≤∑ x,w x) (hm₁ : ∑ x,w x≤1) : + ((lowHits w).card:ℝ)≤64*(Nat.card K:ℝ)^5*A := by + let q : ℝ:=Nat.card K + let μ : ℝ:=((Q (Nat.card K) 3:ℝ)/Q (Nat.card K) 4)*(∑ x,w x) + have hq : 0(hw x).1) + have hh := mul_le_mul_of_nonneg_left hm₀ (show 0≤1/(2*q) by positivity) + change (1/(2*q))*(∑ x,w x)≤μ at hd + have he : (1/(2*q))*(3/4)=3/(8*q) := by ring + rw [he] at hh + exact hh.trans hd + have hv := incidence_variance (d:=4) hdim (by decide) w + have hs : ∑ x,w x^2≤A := by + calc + _ ≤ ∑ x,A*w x := Finset.sum_le_sum fun x _=>by nlinarith [(hw x).1,(hw x).2] + _ = A*(∑ x,w x) := (Finset.mul_sum _ _ _).symm + _ ≤ A := by nlinarith + have hv' : (∑ y,(weightOnHyperplane w y-μ)^2)≤q^3*A := by + exact hv.trans (mul_le_mul_of_nonneg_left hs (by positivity)) + have hb : ((lowHits w).card:ℝ)*(1/(8*q))^2≤q^3*A := by + calc + _ = ∑ _y∈lowHits w,(1/(8*q))^2 := by simp + _ ≤ ∑ y∈lowHits w,(weightOnHyperplane w y-μ)^2 := by + apply Finset.sum_le_sum + intro y hy + have hh : weightOnHyperplane w y<1/(4*q) := (Finset.mem_filter.mp hy).2 + have he : 3/(8*q)-1/(4*q)=1/(8*q) := by ring + have hh' : 1/(8*q)≤μ-weightOnHyperplane w y := by linarith + nlinarith [show 0<1/(8*q) by positivity] + _ ≤ ∑ y,(weightOnHyperplane w y-μ)^2 := + Finset.sum_le_univ_sum_of_nonneg fun _=>sq_nonneg _ + _ ≤ _ := hv' + calc + _ ≤ (q^3*A)/(1/(8*q))^2 := (le_div_iff₀ (by positivity)).mpr hb + _ = 64*q^5*A := by field_simp; ring + +theorem lowHits_mass (hdim : finrank K V=5) (w : ℙ K V → ℝ) + (p : Law (ℙ K (Dual K V))) (G : Finset (ℙ K (Dual K V))) (A B : ℝ) + (hA : 0≤A) (hB : 0≤B) (hw : ∀ x,0≤w x ∧ w x≤A) + (hm₀ : (3:ℝ)/4≤∑ x,w x) (hm₁ : ∑ x,w x≤1) + (hp : ∀ y∈G,p y≤B) : + eventMass p (G∩lowHits w)≤64*(Nat.card K:ℝ)^5*A*B := by + calc + _ ≤ ((G∩lowHits w).card:ℝ)*B := by + unfold eventMass + calc + _ ≤ ∑ _y∈G∩lowHits w,B := Finset.sum_le_sum fun y hy=>hp y (Finset.mem_inter.mp hy).1 + _ = _ := by simp + _ ≤ ((lowHits w).card:ℝ)*B := by + apply mul_le_mul_of_nonneg_right _ hB + exact_mod_cast Finset.card_le_card Finset.inter_subset_right + _ ≤ _ := mul_le_mul_of_nonneg_right (lowHits_card hdim w A hA hw hm₀ hm₁) hB + +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowBudgetNumerics.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowBudgetNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..b67f44a5d138e42d9d07d650fe22fbde0bdd9c33 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowBudgetNumerics.lean @@ -0,0 +1,79 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.AllWindowCost + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Real +noncomputable section + +lemma windowCodeBudget_coarse {σ q P b Cℓ : ℝ} {w H l : ℕ} + (hσ : 1≤σ) (hq : σ≤q) (hP : 1≤P) (hH : 1≤H) + (hb : b≤P) (hmeta : 2*Real.log (320/((9:ℝ)/100000)+320)≤P) + (hlog4 : Real.log 4≤σ) (hC : 0≤Cℓ) (hl : Real.log (l+1)≤Cℓ*σ) : + windowCodeBudget σ q P b w H+(w+1)*Real.log (l+1)≤ + (5+7*nodeChargeConstant+Cℓ)*q*(P*H*(σ+w*P)) := by + have hs : 0≤σ := by linarith + have hp : 0≤P := by linarith + have hq0 : 0≤q := by linarith + have hh : (1:ℝ)≤H := by exact_mod_cast hH + have hh0 : (0:ℝ)≤H := by positivity + have hn := nodeChargeConstant_nonneg + have hl2 : Real.log 2≤1 := by convert Real.log_le_sub_one_of_pos (by norm_num : (0:ℝ)<2) using 1; norm_num + have hx : (w:ℝ)+1≤σ+w*P := by nlinarith [mul_le_mul_of_nonneg_left hP (show (0:ℝ)≤w by positivity)] + have hmul : 1≤q*P*H := by + have hq1 : 1≤q := hσ.trans hq + calc + 1 = (1:ℝ)*1*1 := by norm_num + _ ≤ q*P*H := by gcongr + have hmulσ : σ≤q*P*H := by + calc + σ≤q := hq + _ =q*1*1 := by ring + _ ≤q*P*H := by gcongr + let A:=q*P*H*(σ+w*P) + have ha0 : 0≤A := by dsimp [A];positivity + have ha : σ+w*P≤A := by + dsimp [A] + exact le_mul_of_one_le_left (by positivity) hmul + have hwA : (w:ℝ)≤A := by linarith + have hhA : Real.log (w+1)≤A := by + have hh' := Real.log_le_sub_one_of_pos (by positivity : (0:ℝ)<(w:ℝ)+1) + exact (show Real.log (w+1)≤(w:ℝ) by linarith).trans hwA + have hfirst : nodeChargeConstant*q*P*H* + (3*σ+Real.log 4+(b+1+2*Real.log (320/((9:ℝ)/100000)+320))*w)≤4*nodeChargeConstant*A := by + calc + _ ≤ nodeChargeConstant*q*P*H*(4*σ+3*P*w) := by gcongr <;> nlinarith + _ ≤ nodeChargeConstant*q*P*H*(4*(σ+w*P)) := by gcongr; nlinarith + _ = _ := by dsimp [A];ring + have hsecond : (Real.log 2+nodeChargeConstant*q*P*(b+1+P))*w≤ + (1+3*nodeChargeConstant)*A := by + have hw : nodeChargeConstant*q*P*(3*P)*w≤3*nodeChargeConstant*A := by + calc + _ =3*nodeChargeConstant*(q*P*(w*P)) := by ring + _ =3*nodeChargeConstant*(q*P*(1:ℝ)*(w*P)) := by ring + _ ≤3*nodeChargeConstant*(q*P*H*(σ+w*P)) := by + apply mul_le_mul_of_nonneg_left _ (by positivity) + exact mul_le_mul (mul_le_mul_of_nonneg_left hh (by positivity)) + (by linarith) (by positivity) (by positivity) + calc + _ ≤ (1+nodeChargeConstant*q*P*(3*P))*w := by gcongr; linarith + _ = w+nodeChargeConstant*q*P*(3*P)*w := by ring + _ ≤ A+3*nodeChargeConstant*A := add_le_add hwA hw + _ = _ := by ring + have hstatus : (2*(w:ℝ)+1)*Real.log 2≤3*A := by + calc + _ ≤2*(w:ℝ)+1 := mul_le_of_le_one_right (by positivity) hl2 + _ ≤3*((w:ℝ)+1) := by linarith + _ ≤3*A := by linarith + have hassign : ((w:ℝ)+1)*Real.log (l+1)≤Cℓ*A := by + calc + _ ≤((w:ℝ)+1)*(Cℓ*σ) := mul_le_mul_of_nonneg_left hl (by positivity) + _ =Cℓ*(σ*((w:ℝ)+1)) := by ring + _ ≤Cℓ*(q*P*H*(σ+w*P)) := by gcongr + have ht:=add_le_add (add_le_add (add_le_add hhA (add_le_add hfirst hsecond)) hstatus) hassign + exact ht.trans_eq (by dsimp [A];ring) +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowLossAggregation.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowLossAggregation.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d9b6d01ac4cf9ef144a1880d914c3dfb9b5fc14 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowLossAggregation.lean @@ -0,0 +1,89 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.SurvivorRank +import OAI.Combinatorics.RamseyFive.Marking.WindowReciprocalScores +import OAI.Combinatorics.RamseyFive.Entropy.IndependentSampling + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {Ω I : Type*} [Fintype Ω] [Fintype I] + +theorem retained_filter_loss (p : Law Ω) (eligible : I→Prop) + (kept : Ω→I→Prop) (B : ℝ) (hB : 0≤B) + (hkeep : ∀i,eligible i→mean p (fun z=>if kept z i then 0 else 1)≤B) : + mean p (fun z=>(((Finset.univ.filter fun i=>eligible i ∧ kept z i)ᶜ).card:ℝ))≤ + ((Finset.univ.filter fun i=>¬eligible i).card:ℝ)+(Fintype.card I:ℝ)*B := by + have hcard (z : Ω) : + (((Finset.univ.filter fun i=>eligible i ∧ kept z i)ᶜ).card:ℝ)= + ∑i,if eligible i ∧ kept z i then (0:ℝ) else 1 := by + have heq : (Finset.univ.filter fun i=>eligible i ∧ kept z i)ᶜ = + Finset.univ.filter (fun i=>¬(eligible i ∧ kept z i)) := by ext i; simp + rw [heq,←Finset.sum_boole] + apply Finset.sum_congr rfl + intro i _ + split_ifs <;> simp_all + simp_rw [hcard] + rw [mean_sum] + calc + _ ≤ ∑i,((if eligible i then 0 else 1)+B) := by + apply Finset.sum_le_sum + intro i _ + by_cases hi : eligible i + · simpa only [hi,true_and,ite_true,zero_add] using hkeep i hi + · simpa only [hi,false_and,ite_false,mean_const] using le_add_of_nonneg_right hB + _ = _ := by + rw [Finset.sum_add_distrib] + simp only [Finset.sum_const,Finset.card_univ,nsmul_eq_mul] + congr 1 + simp only [←Finset.sum_boole] + apply Finset.sum_congr rfl + intro i _ + split_ifs <;> simp_all +end +end SharpRamseyFive.FiniteEntropy +namespace SharpRamseyFive.ProjectiveIncidence +noncomputable local instance origWindowIDE (w n : ℕ) : DecidableEq (Windows.Slots w n) := Classical.decEq _ +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec PivotTree Windows Marking +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] +variable (f : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V→FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + +theorem original_window_target_failure {w n : ℕ} (E : Finset (Fin w)) (_hE : E.Nonempty) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (μ : Fin (E.card+1)→Law (Finset (ℙ K V))) + (ν : Fin (E.card+1)→Law (Finset (ℙ K (Dual K V)))) + (X : Fin (E.card+1)→Finset (ℙ K V)→Finset (ℙ K V)) + (Y : Fin (E.card+1)→Finset (ℙ K (Dual K V))→Finset (ℙ K (Dual K V))) + (hX : ∀i a,(X i a).Nonempty) (hY : ∀i b,(Y i b).Nonempty) + (p : Law (Slots w n→FlagPair K V)) + (hinc : ∀x,0

adaptiveLaw (originalLevelLaw μ ν) + (fun _=>variableTreeLaw f r w))) (fun z=> + if z.1 (middleSlot v j)∉variableTreeDomain f r z.2.2 (Finset.univ,Finset.univ) + (variableTreeEncoded f r z.2.2 (Finset.univ,Finset.univ) + ⟨E.card,Nat.lt_succ_of_le (by simpa using Finset.card_le_univ E)⟩ σ hσ hq hd + (fun i=>X i (z.2.1.1 i)) (fun i=>Y i (z.2.1.2 i)) + (fun i=>hX i _) (fun i=>hY i _) c δ τ P hδ) + (survivorRank E v) then 1 else 0)= + orientedTargetFailure f r σ hσ hq hd μ ν X Y hX hY p + (fun x=>(x (middleSlot v j)).1) (fun x=>(x (middleSlot v j)).2) + c δ τ P hδ (finiteBalanced E.card) + ((finiteRankEquiv E.card).symm ⟨(survivorRank E v).val,survivorRank_mem_lt E v hv⟩) := by + have hh:=variable_table_target_failure f r w + ⟨E.card,Nat.lt_succ_of_le (by simpa using Finset.card_le_univ E)⟩ σ hσ hq hd μ ν X Y hX hY p + (fun x=>(x (middleSlot v j)).1) (fun x=>(x (middleSlot v j)).2) + (fun x hx=>hinc x hx _) c δ τ P hδ + ⟨(survivorRank E v).val,survivorRank_mem_lt E v hv⟩ + exact hh +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowPosterior.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowPosterior.lean new file mode 100644 index 0000000000000000000000000000000000000000..a7c884f670f3d830cde8883c50a1d2f2f1762642 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowPosterior.lean @@ -0,0 +1,96 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Trees.HistoryPrivateStream +import OAI.Combinatorics.RamseyFive.Entropy.MarkedActualBudget +import OAI.Combinatorics.RamseyFive.Geometry.RectangleTransport + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {Ω κ α β I B A T : Type} [Fintype Ω] [Fintype κ] [Fintype α] [Fintype β] + [Fintype I] [Fintype B] [Fintype A] [Fintype T] [Nonempty A] +local instance wpIDE : DecidableEq ((B×A)⊕T) := Classical.decEq _ +omit [Nonempty A] in +@[simp] lemma blockActive_univ : blockActive (T:=T) (fun _ : B=>(Finset.univ : Finset A))=Finset.univ := by + ext i + cases i <;> simp [blockActive] +lemma fixedOutside_univ (p : Law (I→β)) : FixedOutside p Finset.univ := by + intro i hi + exact False.elim (hi (Finset.mem_univ i)) +lemma mean_fiber_entropy_injective (p : Law Ω) (ctx : Ω→κ) (x : Ω→α) (f : α→β) + (hf : Function.Injective f) (F : ℝ→ℝ) : + mean (first (pair p ctx (fun z=>f (x z)))) (fun c=>F (entropy (fiber (pair p ctx (fun z=>f (x z))) c)))= + mean (first (pair p ctx x)) (fun c=>F (entropy (fiber (pair p ctx x) c))) := by + simp only [first_pair] + apply mean_congr_pos + intro c hc + rw [fiber_pair_map p ctx x f c hc,entropy_map_injective _ _ hf] +end +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.SelectedTuple +open Module ProjectiveIncidence FiniteEntropy Windows Marking CoreGeometry +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V Ω κ α : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype Ω] [Fintype κ] [Fintype α] {N w n : ℕ} [Nonempty (Fin n)] + {admissible : (Fin N→α)→Prop} +local instance wpBDE : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance wpTDE : DecidableEq (Fin w×Fin (2*n)) := Classical.decEq _ +local instance wpSDE : DecidableEq (Slots w n) := Classical.decEq _ +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Nonempty (Fin n)] in +lemma windowTuple_injective : Function.Injective (fun x : Fin (w*(4*n))→FlagPair K V=>fun i : Slots w n=>x (slotEmbedding i)) := by + intro x y h + funext i + obtain ⟨j,rfl⟩:=(slotEquiv w n).surjective i + exact congrFun h j + +omit [Finite K] [FiniteDimensional K V] [Nonempty (Fin n)] in +lemma window_posterior_domains (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (w*(4*n)) admissible) + (ctx : Ω→κ) (D : κ→Fin (w*(4*n))→Finset (FlagPair K V)) + (hD : ∀z,0D c (slotEmbedding i)) := by + exact pair_fiber_domains S.law ctx (windowTuple S) _ (fun z hz i=>hD z hz (slotEmbedding i)) + +omit [Finite K] [FiniteDimensional K V] [Nonempty (Fin n)] in +lemma window_posterior_consistent (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (w*(4*n)) admissible) + (ctx : Ω→κ) (hcons : ∀z,0activeDeficit + (fiber (pair S.law ctx (windowTuple S)) c) (blockActive (fun _=>Finset.univ)) J)= + mean (first (pair S.law ctx S.tuple)) (fun c=>(w*(4*n):ℝ)*J-entropy (fiber (pair S.law ctx S.tuple) c)) := by + simp only [blockActive_univ,activeDeficit,Finset.card_univ,card_slots,Nat.cast_mul,Nat.cast_ofNat] + exact mean_fiber_entropy_injective S.law ctx S.tuple _ windowTuple_injective _ +end +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowReadiness.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowReadiness.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e082c3544d93f8bf4ff7a978535d8671e7fdd6c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowReadiness.lean @@ -0,0 +1,67 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.PreRoundDeletion + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open SharpRamseyFive.Windows +open scoped Classical BigOperators +noncomputable section +variable {κ β : Type} [Fintype κ] [Fintype β] {w r n rem : ℕ} [Nonempty (Fin r)] +local instance readinessBlockDE : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance readinessIndexDE : DecidableEq (Slots w r) := Classical.decEq _ + +def windowReady (bad : Slots w r→ℝ) (sel : (Fin w×Bool)→Fin r) (v : Fin w) (t : Fin (2*r)) : Prop := + bad (Sum.inr (v,t))=0 ∧ ∀ b : Bool,bad (Sum.inl ((v,b),sel (v,b)))=0 + +omit [Nonempty (Fin r)] in +lemma window_not_ready_le (bad : Slots w r→ℝ) (sel : (Fin w×Bool)→Fin r) + (hb : ∀ i,bad i=0 ∨ bad i=1) (v : Fin w) (t : Fin (2*r)) : + (if windowReady bad sel v t then (0:ℝ) else 1)≤ + bad (Sum.inr (v,t))+∑ b : Bool,bad (Sum.inl ((v,b),sel (v,b))) := by + simp only [Fintype.sum_bool] + rcases hb (Sum.inr (v,t)) with h|h <;> + rcases hb (Sum.inl ((v,true),sel (v,true))) with he|he <;> + rcases hb (Sum.inl ((v,false),sel (v,false))) with hl|hl + all_goals (simp only [windowReady,Bool.forall_bool,h,he,hl]; norm_num) + +theorem preRound_ready_loss (μ : Law κ) (p : κ→Law (Slots w r→β)) + (S : κ→(Fin w×Bool)→Finset (Fin r)) (hrem : 0∑ v,∑ t, + if windowReady (preRoundBad μ p S n J d e c z) z.2 v t then (0:ℝ) else 1)≤ + 5*mean (preRoundLaw μ p S n) (fun z=> + ∑ i∈blockActive (historyUnused (S z.1.1) z.1.2),preRoundBad μ p S n J d e c z i) := by + let ν:=preRoundLaw μ p S n + let bad:=preRoundBad μ p S n J d e c + let all:=fun z=>∑ i∈blockActive (historyUnused (S z.1.1) z.1.2),bad z i + let selected:=fun z=>∑ b,bad z (Sum.inl (b,z.2 b)) + have hnon (z : (κ×BlockHistory (Fin w×Bool) (Fin r) (Fin w×Fin (2*r)) β n)× + ((Fin w×Bool)→Fin r)) (i : Slots w r) : 0≤bad z i := badIndexIndicator_nonneg .. + have hmid : mean ν (fun z=>∑ v,∑ t,bad z (Sum.inr (v,t)))≤ mean ν all := by + apply mean_mono + intro z + dsimp only [all] + rw [blockActive_sum] + conv_rhs => arg 2; rw [Fintype.sum_prod_type] + exact le_add_of_nonneg_left (Finset.sum_nonneg fun b _=>Finset.sum_nonneg fun a _=>hnon z _) + have hsel : (rem:ℝ)*mean ν selected≤ mean ν all := preRound_selected_bad μ p S n rem hrem hS J d e c + have hsel0 : 0≤ mean ν selected := mean_nonneg _ _ (fun z=>Finset.sum_nonneg fun b _=>hnon z _) + have hr' : (2*r:ℝ)≤4*rem := by exact_mod_cast (show 2*r≤4*rem by omega) + have hweight := mul_le_mul_of_nonneg_right hr' hsel0 + have hpoint : mean ν (fun z=>∑ v,∑ t, + if windowReady (bad z) z.2 v t then (0:ℝ) else 1)≤ + mean ν (fun z=>∑ v,∑ t,bad z (Sum.inr (v,t)))+(2*r:ℝ)*mean ν selected := by + have hh:=mean_mono ν (fun z=>Finset.sum_le_sum (s:=(Finset.univ:Finset (Fin w))) + (fun v _=>Finset.sum_le_sum (s:=(Finset.univ:Finset (Fin (2*r)))) + (fun t _=>window_not_ready_le (bad z) z.2 (fun i=>badIndexIndicator_zero_or_one ..) v t))) + simp only [Finset.sum_add_distrib,Finset.sum_const,Finset.card_univ,Fintype.card_fin, + nsmul_eq_mul,Nat.cast_mul,Nat.cast_ofNat,←Finset.mul_sum,mean_add,mean_smul] at hh + simpa only [selected,Fintype.sum_prod_type] using hh + change mean ν (fun z=>∑ v,∑ t,if windowReady (bad z) z.2 v t then (0:ℝ) else 1)≤5*mean ν all + linarith +end +end SharpRamseyFive.FiniteEntropy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowTargetInputs.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowTargetInputs.lean new file mode 100644 index 0000000000000000000000000000000000000000..f18336c16038fb247f29fe010812734cf555c89c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowTargetInputs.lean @@ -0,0 +1,61 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.WindowReciprocalScores +import OAI.Combinatorics.RamseyFive.Entropy.ConditionPullback + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {α β Ω : Type*} [Fintype α] [Fintype β] [Fintype Ω] +lemma map_first_value (p : Law Ω) (z : Ω→α×β) : + map p (fun x=>(z x).1)=first (map p z) := by + rw [←map_first, map_comp]; rfl +lemma map_second_value (p : Law Ω) (z : Ω→α×β) : + map p (fun x=>(z x).2)=second (map p z) := by + rw [←map_second, map_comp]; rfl +lemma eventMass_bad_map (p : Law Ω) (f : Ω→α) (G : Finset α) : + eventMass p (Finset.univ.filter fun x=>f x∉G)=eventMass (map p f) Gᶜ := by + rw [eventMass_map_preimage] + congr 1 + ext x + simp only [eventPreimage,Finset.mem_filter,Finset.mem_univ,true_and,Finset.mem_compl] +end +end SharpRamseyFive.FiniteEntropy +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.FiniteEntropy SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.Windows +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V I : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + {w r : ℕ} [Nonempty (Fin r)] +local instance inputWinBDE : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance inputWinIDE : DecidableEq (Slots w r) := Classical.decEq _ + +omit [FiniteDimensional K V] [Nonempty (Fin r)] in +theorem window_bad_target (p : Law (Slots w r→FlagPair K V)) (u : Slots w r→ℝ) + (sel : (Fin w×Bool)→Fin r) (v : Fin w) (t : Fin (2*r)) (s d ε C₀ : ℝ) + (hs : 0x (middleSlot v t))))).card:ℝ) ≤ + 32*Real.exp (5*Real.log (Nat.card K)-u (middleSlot v t))) + (hB : ((support (second (map p (fun x=>x (middleSlot v t))))).card:ℝ) ≤ + 32*Real.exp (u (middleSlot v t))) + (hflag : ((support (map p (fun x=>x (middleSlot v t)))).card:ℝ) ≤ C₀*(Nat.card K:ℝ)^4) + (hgood : indexBad (4*Real.log (Nat.card K)) d ε p + (orderedCollision p (slotEquiv w r) u s) sel (middleSlot v t)=0) : + eventMass p (Finset.univ.filter fun x=>(x (middleSlot v t)).1∉ + reciprocalGoodA (map p (fun y=>y (middleSlot v t))) (u (middleSlot v t)) s) ≤ + reciprocalBadMass s d C₀ ∧ + eventMass p (Finset.univ.filter fun x=>(x (middleSlot v t)).2∉ + reciprocalGoodB (map p (fun y=>y (middleSlot v t))) (u (middleSlot v t)) s) ≤ + reciprocalBadMass s d C₀ := by + have hent:=(good_index_scores (4*Real.log (Nat.card K)) d ε p _ + (fun i j=>orderedCollision_nonneg p (slotEquiv w r) u s i j) sel _ hgood).1 + have hh:=reciprocal_bad_endpoints (map p (fun x=>x (middleSlot v t))) _ s d C₀ + hs hA hB hflag hent + rw [eventMass_bad_map,eventMass_bad_map,map_first_value,map_second_value] + exact hh +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowVariation.lean b/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..6850641075ba13f4f8b24225e220ca68519452c5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Entropy/WindowVariation.lean @@ -0,0 +1,82 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section + +lemma window_diff_sum (e l : ℕ→ℝ) (w : ℕ) (c hi : ℝ) + (he : e 0≤hi) (hn : ∀ j< w,e (j+1)≤l j+c) : + (∑ j∈Finset.range (w+1),(e j-l j))≤hi-l w+(w:ℝ)*c := by + induction w with + | zero => simp only [Nat.zero_add,Finset.sum_range_one,Nat.cast_zero,zero_mul,add_zero]; linarith + | succ w ih => + have hh:=ih (fun j hj=>hn j (by omega)) + have ha:=hn w (by omega) + rw [Finset.sum_range_succ,Nat.cast_add,Nat.cast_one] + linarith + +theorem window_drop_sum (e l : ℕ→ℝ) (w : ℕ) (lo hi c : ℝ) + (hc : 0≤c) (hlo : lo≤hi) (he : e 0≤hi) + (hl : ∀ j simpa using sub_nonneg.mpr hlo + | succ v => + have hd:=window_diff_sum e l v c hi he (fun j hj=>hn j (by omega)) + have hh : (∑ j∈Finset.range (v+1),max 0 (e j-l j))≤ + (∑ j∈Finset.range (v+1),(e j-l j))+(v+1:ℕ)*c := by + calc + _ ≤ ∑ j∈Finset.range (v+1),((e j-l j)+c) := by + apply Finset.sum_le_sum + intro j hj + have h:=hw j (Finset.mem_range.mp hj) + exact max_le (by linarith) (by linarith) + _ = _ := by simp [Finset.sum_add_distrib] + have hb:=hl v (by omega) + norm_num only [Nat.cast_add,Nat.cast_one] at * + have hv : 0≤(v:ℝ)*c := mul_nonneg (Nat.cast_nonneg _) hc + linarith + +theorem large_window_count (e l : ℕ→ℝ) (w : ℕ) (lo hi c k : ℝ) + (hc : 0≤c) (hk : 0kkk ω r i)) + (fun r d => ω r ((outsideEquiv x S O).symm d).val) + +omit [Finite K] [FiniteDimensional K V] [Fintype (RadialLine x)] in +theorem unsampled_moment_tail (S O : Finset (ℙ K V)) (rate : S→ℝ≥0) + (F : Finset (ℙ K (Dual K V))) {R : ℕ} {b t B : ℝ} + (hb : b∈Set.Icc 0 1) {p : ℕ} (hp : Even p) (ht : 0 (1:ℝ)) (abs_modifiedPointScore x S O F hb) + (fun _ => ⟨by norm_num,le_refl _⟩) hp ht (by simpa only [one_mul] using hB) + apply (measureReal_mono (μ:=scheduleMeasure rate R) ?_ (measure_ne_top _ _)).trans h + intro ω hω + refine ⟨rfl,?_⟩ + rw [modifiedPointScore_eq x S O F b ω hω.1] + exact hω.2 + +omit [Finite K] in +theorem unsampled_score_tail (S O : Finset (ℙ K V)) (L δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (hF : ∀H∈F,Incident x H) {R : ℕ} + {b t B : ℝ} (hb : b∈Set.Icc 0 1) {p J : ℕ} (hp : Even p) (ht : 0 ω (r,d)))^p + ∂batchMeasure (fun i : Fin R×RadialLine x => L*radialWeight x (outsideAt x S O) δ i.2))≤B) : + (scheduleMeasure (fun _ : S => L*δ) R).real + {ω | Unsampled x S ω ∧ t < |pointScore S O F b ω|} ≤ B/t^p+ + ∫ω,1-HighMoment.allTrunc R J ω + ∂batchMeasure (fun i : Fin R×RadialLine x => L*radialWeight x (outsideAt x S O) δ i.2) := by + have hbound := original_truncated_moment x S O L δ F hF hb p J B hB + have hg : ∀ω : Fin R→S→ℕ, + HighMoment.allTrunc R J (Function.uncurry (modifiedRadialSchedule x S O ω))=0 ∨ + HighMoment.allTrunc R J (Function.uncurry (modifiedRadialSchedule x S O ω))=1 := by + intro ω + have hi := HighMoment.allTrunc_indicator R J (modifiedRadialSchedule x S O ω) + by_cases he : modifiedRadialSchedule x S O ω∈overloaded Finset.univ J + · rw [Set.indicator_of_mem he] at hi + exact Or.inl (by linarith only [hi]) + · rw [Set.indicator_of_notMem he] at hi + exact Or.inr (by linarith only [hi]) + have h := truncated_moment_tail (scheduleMeasure (fun _ : S => L*δ) R) + (modifiedPointScore x S O F b) + (fun ω => HighMoment.allTrunc R J (Function.uncurry (modifiedRadialSchedule x S O ω))) + (abs_modifiedPointScore x S O F hb) hg hp ht hbound + rw [original_truncation_failure] at h + apply (measureReal_mono (μ:=scheduleMeasure (fun _ : S => L*δ) R) ?_ (measure_ne_top _ _)).trans h + intro ω hω + change t < |modifiedPointScore x S O F b ω| + rw [modifiedPointScore_eq x S O F b ω hω.1] + exact hω.2 + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/AmbientOriginalDomination.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/AmbientOriginalDomination.lean new file mode 100644 index 0000000000000000000000000000000000000000..e9a2574a4874956dd876bddc48fe6a80bb628643 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/AmbientOriginalDomination.lean @@ -0,0 +1,74 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.TwoAmbientCaps +import OAI.Combinatorics.RamseyFive.Entropy.ChronologicalCapDomination + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem firstAmbient_original {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (hq : 3≤Nat.card K) + (A A₀ : Finset (ℙ K V)) (hA : A.Nonempty) (hAA₀ : A⊆A₀) + (B UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) (hBU : B⊆UB) + (W : Finset (ℙ K V)) (hW : W.Nonempty) + (c δ : ℝ) (hc : 0Incident a b) B UB (A∩W) W hW n (Nat.card K) + ((320/c+320)*(Nat.card K:ℝ)^(d+1)/A.card)) (Finset.univ.filter (Excludes b))≤ + (50*(Nat.card K:ℝ)/(9*(c*δ)))*(((A₀.filter fun a=>Incident a b).card:ℝ)/A₀.card) := by + have hC : (A∩W).Nonempty := by + apply Finset.card_pos.mp + have ha : (0:ℝ)Incident a b) B UB (A∩W) A₀ W hC hW + Finset.inter_subset_right (Finset.inter_subset_left.trans hAA₀) n hn (Nat.card K) (c*δ) _ hq0 (mul_pos hc hδ) hs + exact geometric_dual_validation_mass hdim hd hq B UB hB hBU A (A∩W) hC + Finset.inter_subset_left c hc hc1 hcapture + (by simpa only [mul_comm,mul_left_comm,mul_assoc] using hsparse) n hn hlen + +theorem secondAmbient_original {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (hq : 3≤Nat.card K) (A UA : Finset (ℙ K V)) (hA : A.Nonempty) (hAU : A⊆UA) + (B B₀ UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) (hBB₀ : B⊆B₀) + (δ : ℝ) (hδ : 0<δ) (htrim : δ*B₀.card≤B.card) + (hsparse : 1000*(Nat.card K:ℝ)*incidences A B≤(9:ℝ)/10*A.card*B.card) + (n : ℕ) (hn : 0 + change eventMass (pureLaw (none : Option (Finset (ℙ K V)))) (Finset.univ.filter (Excludes a))≤_ + rw [excludes_pure_none] + positivity + | some Y => + dsimp only [nextAmbientCapLaw] + split_ifs with hY + · have hC := hY.source_nonempty hB + have hs : ((9:ℝ)/10*δ)*B₀.card≤(B∩(UB∩Y)).card := by + have hh := mul_le_mul_of_nonneg_left htrim (by norm_num : (0:ℝ)≤9/10) + nlinarith only [hh,hY.2.2] + apply ambientCapLaw_domination Incident A UA (B∩(UB∩Y)) B₀ (UB∩Y) hC + (hC.mono Finset.inter_subset_right) Finset.inter_subset_right (Finset.inter_subset_left.trans hBB₀) + n hn (Nat.card K) ((9:ℝ)/10*δ) _ hq0 (by positivity) hs + exact geometric_validation_mass hdim hd hq A UA hA hAU B (B∩(UB∩Y)) hC + Finset.inter_subset_left (9/10) (by norm_num) (by norm_num) hY.2.2 hsparse n hn hlen + · rw [excludes_pure_none] + positivity +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/AmbientPairPublic.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/AmbientPairPublic.lean new file mode 100644 index 0000000000000000000000000000000000000000..0ab4c852bec75bcd5c9f9cc3040a8c2b44957680 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/AmbientPairPublic.lean @@ -0,0 +1,155 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.LocalNodeLaw +import OAI.Combinatorics.RamseyFive.Entropy.UniversalFreshCost + +namespace OAI + + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {α β γ δ : Type*} [Fintype α] [Fintype β] [Fintype γ] [Fintype δ] +lemma public_joint_composition (p : Law α) (tape : Law β) (firstOut : α→γ) + (out : γ→β→δ) (next : γ→Law δ) + (hm : ∀c,map tape (out c)=next c) : + map (adaptiveLaw p (fun _=>tape)) (fun z=>(firstOut z.1,out (firstOut z.1) z.2))= + adaptiveLaw (map p firstOut) next := by + apply Law.ext + funext cd + rcases cd with ⟨c,d⟩ + rw [adaptive_output_mass (out:=fun a b=>(firstOut a,out (firstOut a) b))] + change _=(∑a,if firstOut a=c then p a else 0)*next c d + rw [Finset.sum_mul] + apply Finset.sum_congr rfl + intro a _ + by_cases hc : firstOut a=c + · simp only [hc,ite_true] + have hs : map tape (fun b=>(c,out c b)) (c,d)=map tape (out c) d := by + simp only [map,Prod.mk.injEq,true_and] + rw [hs,hm] + · simp only [map,Prod.mk.injEq,hc,false_and,ite_false,Finset.sum_const_zero,mul_zero,zero_mul] +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry +open scoped Classical LinearAlgebra.Projectivization NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def publicAmbientSecond (A UA : Finset (ℙ K V)) + (B UB : Finset (ℙ K (Dual K V))) + (H : ℕ) (n : Fin (H+1)) (q MA MB : ℝ) + (Y : Option (Finset (ℙ K (Dual K V)))) (t : UniversalFresh (ℙ K (Dual K V)) H q) : + Option (Finset (ℙ K V)) := + match Y with + | none => none + | some W => if _hW : ValidCap B UB MB (UB∩W) then + (universalFreshEncoded Incident A UA (B∩(UB∩W)) (UB∩W) Finset.inter_subset_right H n q MA t).map + (universalFreshDecoded Incident (UB∩W) H q t) + else none +omit [Finite K] [FiniteDimensional K V] in +lemma publicAmbientSecond_law (A UA : Finset (ℙ K V)) + (B UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) + (H : ℕ) (n : Fin (H+1)) (q MA MB : ℝ) + (Y : Option (Finset (ℙ K (Dual K V)))) : + map (universalFreshLaw (ℙ K (Dual K V)) H q) (publicAmbientSecond A UA B UB H n q MA MB Y)= + nextAmbientCapLaw A UA B UB hB n q MA MB Y := by + cases Y with + | none => exact map_const _ none + | some W => + change map (universalFreshLaw (ℙ K (Dual K V)) H q) + (fun t=>if _hW : ValidCap B UB MB (UB∩W) then + (universalFreshEncoded Incident A UA (B∩(UB∩W)) (UB∩W) Finset.inter_subset_right H n q MA t).map + (universalFreshDecoded Incident (UB∩W) H q t) else none)=_ + dsimp only [nextAmbientCapLaw] + split_ifs with hv + · exact universalFreshEncoded_law Incident A UA (B∩(UB∩W)) (UB∩W) Finset.inter_subset_right + ((hv.source_nonempty hB).mono Finset.inter_subset_right) H n q MA + · exact map_const _ none + +abbrev AmbientPairTape (K V : Type*) [Field K] [AddCommGroup V] [Module K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] (H : ℕ) (q : ℝ) := + UniversalFresh (ℙ K V) H q × UniversalFresh (ℙ K (Dual K V)) H q +noncomputable def ambientPairTapeLaw (H : ℕ) (q : ℝ) : Law (AmbientPairTape K V H q) := + adaptiveLaw (universalFreshLaw (ℙ K V) H q) (fun _=>universalFreshLaw (ℙ K (Dual K V)) H q) +abbrev AmbientPairMessage (UB : Finset (ℙ K (Dual K V))) (W : Finset (ℙ K V)) + (H : ℕ) (q : ℝ) (t : AmbientPairTape K V H q) := + (m : UniversalFreshMessage W H q) × UniversalFreshMessage + (UB∩universalFreshDecoded (fun b a=>Incident a b) W H q t.1 m) H q +noncomputable def ambientPairDecoded (UB : Finset (ℙ K (Dual K V))) (W : Finset (ℙ K V)) + (H : ℕ) (q : ℝ) (t : AmbientPairTape K V H q) (m : AmbientPairMessage UB W H q t) : + Finset (ℙ K (Dual K V)) × Finset (ℙ K V) := + let Y := universalFreshDecoded (fun b a=>Incident a b) W H q t.1 m.1 + (Y,universalFreshDecoded Incident (UB∩Y) H q t.2 m.2) +noncomputable def ambientPairEncoded (A UA : Finset (ℙ K V)) + (B UB : Finset (ℙ K (Dual K V))) (W : Finset (ℙ K V)) + (H : ℕ) (nA nB : Fin (H+1)) (q MA MB : ℝ) (t : AmbientPairTape K V H q) : + Option (AmbientPairMessage UB W H q t) := + (universalFreshEncoded (fun b a=>Incident a b) B UB (A∩W) W Finset.inter_subset_right H nB q MB t.1).bind + fun f=>let Y := universalFreshDecoded (fun b a=>Incident a b) W H q t.1 f + if _hv : ValidCap B UB MB (UB∩Y) then + (universalFreshEncoded Incident A UA (B∩(UB∩Y)) (UB∩Y) Finset.inter_subset_right H nA q MA t.2).map + (fun g=>⟨f,g⟩) + else none +noncomputable def ambientPairCost (UB : Finset (ℙ K (Dual K V))) (W : Finset (ℙ K V)) + (H : ℕ) (q : ℝ) (t : AmbientPairTape K V H q) (m : AmbientPairMessage UB W H q t) : ℝ := + universalFreshCost W H q m.1+ + universalFreshCost (UB∩universalFreshDecoded (fun b a=>Incident a b) W H q t.1 m.1) H q m.2 + +omit [Finite K] [FiniteDimensional K V] in +lemma ambientPair_exact (A UA : Finset (ℙ K V)) + (B UB : Finset (ℙ K (Dual K V))) (W : Finset (ℙ K V)) + (H : ℕ) (nA nB : Fin (H+1)) (q MA MB : ℝ) (t : AmbientPairTape K V H q) : + (ambientPairEncoded A UA B UB W H nA nB q MA MB t).map (ambientPairDecoded UB W H q t)= + let Y := (universalFreshEncoded (fun b a=>Incident a b) B UB (A∩W) W Finset.inter_subset_right H nB q MB t.1).map + (universalFreshDecoded (fun b a=>Incident a b) W H q t.1) + pairOptions (Y,publicAmbientSecond A UA B UB H nA q MA MB Y t.2) := by + cases hf : universalFreshEncoded (fun b a=>Incident a b) B UB (A∩W) W Finset.inter_subset_right H nB q MB t.1 with + | none => simp [ambientPairEncoded,hf,pairOptions] + | some f => + simp only [ambientPairEncoded,hf,Option.bind_some,Option.map_some,publicAmbientSecond,pairOptions] + split_ifs <;> simp only [Option.map_none,Option.map_map,ambientPairDecoded,Function.comp_def] + +omit [Finite K] [FiniteDimensional K V] in +theorem ambientPair_law (A UA : Finset (ℙ K V)) + (B UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) (W : Finset (ℙ K V)) (hW : W.Nonempty) + (H : ℕ) (nA nB : Fin (H+1)) (q MA MB : ℝ) : + map (ambientPairTapeLaw (K:=K) (V:=V) H q) + (fun t=>(ambientPairEncoded A UA B UB W H nA nB q MA MB t).map (ambientPairDecoded UB W H q t))= + map (adaptiveLaw (ambientCapLaw (fun b a=>Incident a b) B UB (A∩W) W hW nB q MB) + (nextAmbientCapLaw A UA B UB hB nA q MA MB)) pairOptions := by + simp only [ambientPair_exact] + have hh := public_joint_composition (universalFreshLaw (ℙ K V) H q) + (universalFreshLaw (ℙ K (Dual K V)) H q) + (fun t=>(universalFreshEncoded (fun b a=>Incident a b) B UB (A∩W) W Finset.inter_subset_right H nB q MB t).map + (universalFreshDecoded (fun b a=>Incident a b) W H q t)) + (publicAmbientSecond A UA B UB H nA q MA MB) + (nextAmbientCapLaw A UA B UB hB nA q MA MB) + (publicAmbientSecond_law A UA B UB hB H nA q MA MB) + rw [universalFreshEncoded_law _ _ _ _ _ _ hW] at hh + have hm := congrArg (fun p=>map p pairOptions) hh + simpa only [map_comp,Function.comp_def,ambientPairTapeLaw] using hm + +omit [Finite K] [FiniteDimensional K V] in +lemma ambientPair_prefixes (A UA : Finset (ℙ K V)) + (B UB : Finset (ℙ K (Dual K V))) (W : Finset (ℙ K V)) + (H : ℕ) (nA nB : Fin (H+1)) (q MA MB : ℝ) (t : AmbientPairTape K V H q) + (m : AmbientPairMessage UB W H q t) + (hm : ambientPairEncoded A UA B UB W H nA nB q MA MB t=some m) : + universalFreshEncoded (fun b a=>Incident a b) B UB (A∩W) W Finset.inter_subset_right H nB q MB t.1=some m.1 ∧ + let Y := universalFreshDecoded (fun b a=>Incident a b) W H q t.1 m.1 + ValidCap B UB MB (UB∩Y) ∧ + universalFreshEncoded Incident A UA (B∩(UB∩Y)) (UB∩Y) Finset.inter_subset_right H nA q MA t.2=some m.2 := by + unfold ambientPairEncoded at hm + cases hf : universalFreshEncoded (fun b a=>Incident a b) B UB (A∩W) W Finset.inter_subset_right H nB q MB t.1 with + | none => simp [hf] at hm + | some f => + rw [hf] at hm + change (if _hv : ValidCap B UB MB _ then _ else none)=some m at hm + split_ifs at hm with hv + obtain ⟨g,hg,he⟩ := Option.map_eq_some_iff.mp hm + subst m + exact ⟨rfl,hv,hg⟩ +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/AmbientPivotPotential.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/AmbientPivotPotential.lean new file mode 100644 index 0000000000000000000000000000000000000000..e561ccc1cf88c6c5993ed208ee9d3d44e40e7541 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/AmbientPivotPotential.lean @@ -0,0 +1,36 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.OrientedTreePotential + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module PivotTree +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +omit [FiniteDimensional K V] [Fintype (ℙ K (Dual K V))] in +lemma projective_card_pos_of_five (hd : finrank K V=5) : + 0baseMessageDecoded U P τ R L₀ t ⟨n,m⟩ + (chooseMessage (fun (u : BaseTape U P τ R) (m : baseAlphabet U S.card P τ) => + let W := baseMessageDecoded U P τ R L₀ u ⟨n,m⟩ + W⊆U ∧ (W.card:ℝ)≤(S.card:ℝ)*Real.exp (2*P) ∧ (9/10:ℝ)*S.card≤((W∩S).card:ℝ)) t).map dec + +noncomputable def baseCaptureLaw (S U : Finset (ℙ K V)) (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + Law (Option (Finset (ℙ K V))) := + finiteImageLaw (baseTapeMeasure U P τ R L₀) (baseOutcome S U P τ R L₀) + +omit [Finite K] [FiniteDimensional K V] in +lemma baseOutcome_none (S U : Finset (ℙ K V)) (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (t : BaseTape U P τ R) : + baseOutcome S U P τ R L₀ t=none ↔ + ¬∃m : baseAlphabet U S.card P τ, + let n : Fin (Fintype.card (ℙ K V)+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + let W := baseMessageDecoded U P τ R L₀ t ⟨n,m⟩ + W⊆U ∧ (W.card:ℝ)≤(S.card:ℝ)*Real.exp (2*P) ∧ (9/10:ℝ)*S.card≤((W∩S).card:ℝ) := by + simp only [baseOutcome,Option.map_eq_none_iff,chooseMessage_none] + +omit [Finite K] [FiniteDimensional K V] in +lemma baseCaptureLaw_positive (S U : Finset (ℙ K V)) (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (W : Finset (ℙ K V)) (hW : 0 + publicDecoded U Own Base m.2 (t n m.1) + (chooseMessage (fun (u : BaseTape U P τ R) + (m : Fin (sizeScoreCutoff U n P τ) × Fin (Fintype.card (ℙ K (Dual K V))+1)) => + let W := publicDecoded U Own Base m.2 (u n m.1) + W⊆U ∧ (W.card:ℝ)≤(X.card:ℝ)*Real.exp (a*P) ∧ c*X.card≤((W∩X).card:ℝ)) t).map dec + +noncomputable def scoredCaptureLaw (X U : Finset (ℙ K V)) + (n : Fin (Fintype.card (ℙ K V)+1)) (Own : ℙ K V→Finset (ℙ K V)) + (Base : ℙ K V→ℝ) (P τ c a : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + Law (Option (Finset (ℙ K V))) := + finiteImageLaw (baseTapeMeasure U P τ R L₀) (scoredOutcome X U n Own Base P τ c a R) + +omit [Finite K] [FiniteDimensional K V] in +lemma scoredCaptureLaw_positive (X U : Finset (ℙ K V)) + (n : Fin (Fintype.card (ℙ K V)+1)) (Own : ℙ K V→Finset (ℙ K V)) + (Base : ℙ K V→ℝ) (P τ c a : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (W : Finset (ℙ K V)) (hW : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + (∀i,(C i).card≤(S.card:ℝ)/25) → + let N := scoreCutoff S U (P η σ D R) τ + Real.log (Nat.card (TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K))))≤q ∧ + Real.log N≤Real.log (2*(Nat.card K:ℝ))+scoreSearchCost S U (P η σ D R) τ ∧ + ∃c : TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K)), + let n : Fin (Fintype.card (ℙ K (I→K))+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + let p := scoredCaptureLaw X U n (messageOwn c) (messageBase c L₀) + (P η σ D R) τ (9/20) 10 R L₀ + p none≤Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + change (∀i,(C i).card≤(S.card:ℝ)/25) → _ + intro hsmall + obtain ⟨hcost,hN,c,E,hE,hd⟩ := hh D b τ g R L₀ q K I J F hF Flat X U T + hcard hσq hI hr hL hb hbhi hτ hτhi hXU hXT hdens hprod hX hn hFlat hcover hsmall + let n : Fin (Fintype.card (ℙ K (I→K))+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + have hf := scoredCaptureLaw_failure X U n (messageOwn c) (messageBase c L₀) + (P η σ D R) τ (9/20) 10 R L₀ E (Real.exp (-(Nat.card K:ℝ))) hE hd + have hg := scoredCaptureLaw_positive X U n (messageOwn c) (messageBase c L₀) + (P η σ D R) τ (9/20) 10 R L₀ + exact ⟨hcost,hN,c,hf,hg⟩ + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/BaseFinitePublic.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/BaseFinitePublic.lean new file mode 100644 index 0000000000000000000000000000000000000000..72baea1636bd3df976f2eb83d333ee3bc38e9cf8 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/BaseFinitePublic.lean @@ -0,0 +1,151 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.GenericFreshCost + +namespace OAI + + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +abbrev BaseMessage (U : Finset (ℙ K V)) (P τ : ℝ) := + (n : Fin (Fintype.card (ℙ K V)+1)) × baseAlphabet U n P τ +abbrev BaseTable (U : Finset (ℙ K V)) (P τ : ℝ) := BaseMessage U P τ→Finset (ℙ K V) + +noncomputable def baseTableLaw (U : Finset (ℙ K V)) (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + Law (BaseTable U P τ) := + publicTableLaw (α:=BaseMessage U P τ) (β:=Finset (ℙ K V)) + (Ω:=BaseTape U P τ R) (baseTapeMeasure U P τ R L₀) (baseMessageDecoded U P τ R L₀) + +noncomputable def baseTableEncoded (S U : Finset (ℙ K V)) (P τ : ℝ) + (t : BaseTable U P τ) : Option (baseAlphabet U S.card P τ) := + let n : Fin (Fintype.card (ℙ K V)+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + chooseMessage (fun (u : BaseTable U P τ) m=> + let W := u ⟨n,m⟩ + W⊆U ∧ (W.card:ℝ)≤(S.card:ℝ)*Real.exp (2*P) ∧ (9/10:ℝ)*S.card≤((W∩S).card:ℝ)) t + +noncomputable def baseFiniteEncoded (S U : Finset (ℙ K V)) (P τ : ℝ) + (t : BaseTable U P τ) : Option (BaseMessage U P τ) := + let n : Fin (Fintype.card (ℙ K V)+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + (baseTableEncoded S U P τ t).map (fun m=>⟨n,m⟩) + +omit [Finite K] [FiniteDimensional K V] in +lemma baseFinite_exact (S U : Finset (ℙ K V)) (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (t : BaseTape U P τ R) : + (baseFiniteEncoded S U P τ (baseMessageDecoded U P τ R L₀ t)).map + (baseMessageDecoded U P τ R L₀ t)=baseOutcome S U P τ R L₀ t := by + simp only [baseFiniteEncoded,baseTableEncoded,baseOutcome,Option.map_map] + rfl + +omit [Finite K] [FiniteDimensional K V] in +theorem baseFinite_law (S U : Finset (ℙ K V)) (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + map (baseTableLaw U P τ R L₀) (fun t=>(baseFiniteEncoded S U P τ t).map t)= + baseCaptureLaw S U P τ R L₀ := by + rw [baseTableLaw,publicTableLaw,finiteImageLaw_map] + unfold baseCaptureLaw + congr 1 + funext t + exact baseFinite_exact S U P τ R L₀ t + +omit [Finite K] [FiniteDimensional K V] in +lemma baseFinite_header (S U : Finset (ℙ K V)) (P τ : ℝ) + (t : BaseTable U P τ) (m : BaseMessage U P τ) + (hm : baseFiniteEncoded S U P τ t=some m) : m.1.val=S.card := by + obtain ⟨x,hx,he⟩ := Option.map_eq_some_iff.mp hm + exact congrArg (fun z : BaseMessage U P τ=>z.1.val) he.symm +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence Metadata FiniteEntropy MeasureTheory +open scoped Classical LinearAlgebra.Projectivization NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def scoredEncoded (X U : Finset (ℙ K V)) + (n : Fin (Fintype.card (ℙ K V)+1)) (σ P τ c a : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (code : TrainingCode V (listCap σ) (productCap σ) (Nat.card V)) + (t : BaseTape U P τ R) : Option (ScoredMessage U σ P τ) := + (chooseMessage (fun (u : BaseTape U P τ R) + (m : Fin (sizeScoreCutoff U n P τ) × Fin (Fintype.card (ℙ K (Dual K V))+1)) => + let W := publicDecoded U (messageOwn code) (messageBase code L₀) m.2 (u n m.1) + W⊆U ∧ (W.card:ℝ)≤(X.card:ℝ)*Real.exp (a*P) ∧ c*X.card≤((W∩X).card:ℝ)) t).map + (fun m=>⟨n,code,m⟩) + +omit [Fintype V] in +lemma scoredEncoded_exact (X U : Finset (ℙ K V)) + (n : Fin (Fintype.card (ℙ K V)+1)) (σ P τ c a : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (code : TrainingCode V (listCap σ) (productCap σ) (Nat.card V)) + (t : BaseTape U P τ R) : + (scoredEncoded X U n σ P τ c a R L₀ code t).map (scoredMessageDecoded U σ P τ R L₀ t)= + scoredOutcome X U n (messageOwn code) (messageBase code L₀) P τ c a R t := by + simp only [scoredEncoded,scoredOutcome,Option.map_map] + rfl + +lemma scoredEncoded_law (X U : Finset (ℙ K V)) + (n : Fin (Fintype.card (ℙ K V)+1)) (σ P τ c a : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (code : TrainingCode V (listCap σ) (productCap σ) (Nat.card V)) : + finiteImageLaw (baseTapeMeasure U P τ R L₀) + (fun t=>(scoredEncoded X U n σ P τ c a R L₀ code t).map (scoredMessageDecoded U σ P τ R L₀ t))= + scoredCaptureLaw X U n (messageOwn code) (messageBase code L₀) P τ c a R L₀ := by + simp only [scoredEncoded_exact,scoredCaptureLaw] + +omit [Fintype V] in +lemma scoredEncoded_header (X U : Finset (ℙ K V)) + (n : Fin (Fintype.card (ℙ K V)+1)) (σ P τ c a : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (code : TrainingCode V (listCap σ) (productCap σ) (Nat.card V)) + (t : BaseTape U P τ R) (m : ScoredMessage U σ P τ) + (hm : scoredEncoded X U n σ P τ c a R L₀ code t=some m) : + m.1=n := by + obtain ⟨z,_,hz⟩ := Option.map_eq_some_iff.mp hm + exact congrArg (fun y : ScoredMessage U σ P τ=>y.1) hz.symm + +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence FiniteEntropy Metadata +open scoped Classical LinearAlgebra.Projectivization NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +abbrev ScoreTable (U : Finset (ℙ K V)) (σ P τ : ℝ) := + ScoredMessage U σ P τ→Finset (ℙ K V) +noncomputable def scoreTableLaw (U : Finset (ℙ K V)) (σ P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + Law (ScoreTable U σ P τ) := + publicTableLaw (Ω:=BaseTape U P τ R) (α:=ScoredMessage U σ P τ) (β:=Finset (ℙ K V)) + (baseTapeMeasure U P τ R L₀) (scoredMessageDecoded U σ P τ R L₀) + +noncomputable def scoreFiniteEncoded (X U : Finset (ℙ K V)) + (n : Fin (Fintype.card (ℙ K V)+1)) (σ P τ c a : ℝ) + (code : TrainingCode V (listCap σ) (productCap σ) (Nat.card V)) + (t : ScoreTable U σ P τ) : Option (ScoredMessage U σ P τ) := + (chooseMessage (fun (u : ScoreTable U σ P τ) + (m : Fin (sizeScoreCutoff U n P τ) × Fin (Fintype.card (ℙ K (Dual K V))+1)) => + let W := u ⟨n,code,m⟩ + W⊆U ∧ (W.card:ℝ)≤(X.card:ℝ)*Real.exp (a*P) ∧ c*X.card≤((W∩X).card:ℝ)) t).map + (fun m=>⟨n,code,m⟩) + +omit [Fintype V] in +lemma scoreFinite_exact (X U : Finset (ℙ K V)) + (n : Fin (Fintype.card (ℙ K V)+1)) (σ P τ c a : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (code : TrainingCode V (listCap σ) (productCap σ) (Nat.card V)) + (t : BaseTape U P τ R) : + scoreFiniteEncoded X U n σ P τ c a code (scoredMessageDecoded U σ P τ R L₀ t)= + scoredEncoded X U n σ P τ c a R L₀ code t := by + rfl + +theorem scoreFinite_law (X U : Finset (ℙ K V)) + (n : Fin (Fintype.card (ℙ K V)+1)) (σ P τ c a : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (code : TrainingCode V (listCap σ) (productCap σ) (Nat.card V)) : + map (scoreTableLaw U σ P τ R L₀) + (fun t=>(scoreFiniteEncoded X U n σ P τ c a code t).map t)= + scoredCaptureLaw X U n (messageOwn code) (messageBase code L₀) P τ c a R L₀ := by + rw [scoreTableLaw,publicTableLaw,finiteImageLaw_map] + exact scoredEncoded_law X U n σ P τ c a R L₀ code +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/BasePublicFamily.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/BasePublicFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..50580a24a1fbfcf3ae19cc6235120f8e33c581a7 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/BasePublicFamily.lean @@ -0,0 +1,54 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Entropy.SubsetEncoding + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence SubsetEncoding +open MeasureTheory ProbabilityTheory PoissonScore +open scoped Classical LinearAlgebra.Projectivization NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +abbrev BaseTape (U : Finset (ℙ K V)) (P τ : ℝ) (R : ℕ) := + (n : Fin (Fintype.card (ℙ K V)+1)) → Fin (sizeScoreCutoff U n P τ) → Fin R → ℙ K V → ℕ + +noncomputable def baseRowMeasure (U : Finset (ℙ K V)) (n : ℕ) (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) := + Measure.pi (fun _ : Fin (sizeScoreCutoff U n P τ) => scheduleMeasure + (fun x=>if x∈U then (L₀*(Nat.card K:ℝ≥0))/(U.card:ℝ≥0) else 0) R) + +noncomputable def baseTapeMeasure (U : Finset (ℙ K V)) (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + Measure (BaseTape U P τ R) := + Measure.pi (fun n : Fin (Fintype.card (ℙ K V)+1) => baseRowMeasure U n P τ R L₀) + +instance (U : Finset (ℙ K V)) (n : ℕ) (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + IsProbabilityMeasure (baseRowMeasure U n P τ R L₀) := by + unfold baseRowMeasure + infer_instance + +instance (U : Finset (ℙ K V)) (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + IsProbabilityMeasure (baseTapeMeasure U P τ R L₀) := by + unfold baseTapeMeasure + infer_instance + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K (Dual K V))] in +lemma baseTape_marginal (U : Finset (ℙ K V)) (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (n : Fin (Fintype.card (ℙ K V)+1)) + (E : Set (Fin (sizeScoreCutoff U n P τ) → Fin R → ℙ K V → ℕ)) : + (baseTapeMeasure U P τ R L₀).real {t | t n∈E}= + (baseRowMeasure U n P τ R L₀).real E := by + have hE : MeasurableSet E := Set.Countable.measurableSet (Set.to_countable E) + have hh := (measurePreserving_eval + (fun n : Fin (Fintype.card (ℙ K V)+1)=>baseRowMeasure U n P τ R L₀) n).measure_preimage hE.nullMeasurableSet + exact congrArg ENNReal.toReal hh + +noncomputable def baseMessageDecoded (U : Finset (ℙ K V)) (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (t : BaseTape U P τ R) + (m : (n : Fin (Fintype.card (ℙ K V)+1)) × baseAlphabet U n P τ) : Finset (ℙ K V) := + baseDecoded U m.1 P τ L₀ (t m.1) m.2 + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/BaseSmallLaw.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/BaseSmallLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3dc5dbcb7a45b814441ba2c55bd8239aa0ba519 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/BaseSmallLaw.lean @@ -0,0 +1,149 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.DimensionTwo +import OAI.Combinatorics.RamseyFive.Geometry.BaseCapturedLaw + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence FiniteEntropy SubsetEncoding MeasureTheory +open scoped Classical LinearAlgebra.Projectivization NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +omit [Finite K] [FiniteDimensional K V] in +theorem baseSmallLaw (S U : Finset (ℙ K V)) (hSU : S⊆U) (P τ : ℝ) + (hP : 1≤P) (hn : (S.card:ℝ)≤100*(Nat.card K:ℝ)*P) (R : ℕ) (L₀ : ℝ≥0) : + baseCaptureLaw S U P τ R L₀ none≤0 ∧ + Real.log (Fintype.card (baseAlphabet U S.card P τ):ℝ)≤ + 100*(Nat.card K:ℝ)*P*(Real.log ((U.card:ℝ)/S.card)+P) := by + refine ⟨?_,?_⟩ + · apply baseCaptureLaw_failure S U P τ R L₀ Set.univ 0 (by simp) + intro t _ + let n : Fin (Fintype.card (ℙ K V)+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + let m : baseAlphabet U S.card P τ := by + simpa only [baseAlphabet,hn,ite_true] using encode S U hSU + refine ⟨m,?_⟩ + have hd := baseDecoded_small U S.card P τ L₀ (t n) hn (encode S U hSU) + change (baseDecoded U S.card P τ L₀ (t n) m)⊆U ∧ + ((baseDecoded U S.card P τ L₀ (t n) m).card:ℝ)≤(S.card:ℝ)*Real.exp (2*P) ∧ + (9/10:ℝ)*S.card≤((baseDecoded U S.card P τ L₀ (t n) m∩S).card:ℝ) + rw [hd,decode_encode S U hSU,Finset.inter_self] + refine ⟨hSU,?_,?_⟩ + · exact le_mul_of_one_le_right (by positivity) (Real.one_le_exp_iff.mpr (by linarith)) + · nlinarith only [show (0:ℝ)≤S.card by positivity] + · rw [baseAlphabet_small_card U S.card P τ hn] + have hc := (small_set_description S U hSU (Nat.card K) P hn).2 + exact hc.trans (mul_le_mul_of_nonneg_left (by linarith) (by positivity)) +end + +open Module ProjectiveIncidence FiniteEntropy Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology + +theorem eventually_two_law {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [∀x : ℙ K V,Fintype (RadialLine x)], + ∀ (S U : Finset (ℙ K V)) (T : Finset (ℙ K (Dual K V))), + finrank K V=3 → (Nat.card K:ℝ)=Real.exp σ → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → S.Nonempty → S⊆U → S.card≤T.card → + (Nat.card K:ℝ)*(incidences S T:ℝ)≤τ*S.card*T.card → + (Nat.card K:ℝ)^3*Real.exp (-b)≤(S.card:ℝ)*T.card → + baseCaptureLaw S U (P η σ D R) τ R L₀ none≤Real.exp (-(Nat.card K:ℝ)) := by + filter_upwards [eventually_two_complete_predictor hη hη' Cb hCb] with σ hh + intro D b τ R L₀ K V _ _ _ _ _ _ _ _ S U T hdim hq hr hL hb hbhi hτ hτhi hS hSU hST hdens hprod + obtain ⟨_,E,hE,hs⟩ := hh D b τ R L₀ K V S U T hdim hq hr hL hb hbhi hτ hτhi hS hSU hST hdens hprod + exact baseCaptureLaw_failure S U _ τ R L₀ E _ hE hs + +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.ProjectiveIncidence + +section +open Module +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V W : Type*} [Field K] [AddCommGroup V] [Module K V] + [AddCommGroup W] [Module K W] + +lemma incident_mk_pair (v : V) (hv : v≠0) (a : Dual K V) (ha : a≠0) : + Incident (Projectivization.mk K v hv) (Projectivization.mk K a ha) ↔ a v=0 := by + rw [incident_mk_right] + obtain ⟨c,hc⟩ := Projectivization.exists_smul_eq_mk_rep K v hv + rw [←hc] + simp only [LinearMap.map_smul_of_tower,Units.smul_def,smul_eq_mul,mul_eq_zero,Units.ne_zero,false_or] + +lemma incident_coordinates (e : V≃ₗ[K]W) (x : ℙ K V) (f : ℙ K (Dual K V)) : + Incident (projectiveEquiv e x) (projectiveEquiv e.symm.dualMap f) ↔ Incident x f := by + induction x using Projectivization.ind with | h v hv => + induction f using Projectivization.ind with | h a ha => + change Incident (Projectivization.map e.toLinearMap e.injective (Projectivization.mk K v hv)) + (Projectivization.map e.symm.dualMap.toLinearMap e.symm.dualMap.injective (Projectivization.mk K a ha)) ↔ _ + rw [Projectivization.map_mk,Projectivization.map_mk,incident_mk_pair,incident_mk_pair] + simp only [LinearEquiv.coe_coe,LinearEquiv.dualMap_apply,LinearEquiv.symm_apply_apply] + +lemma incidences_coordinates (e : V≃ₗ[K]W) (S : Finset (ℙ K V)) (T : Finset (ℙ K (Dual K V))) : + incidences (S.map (projectiveEquiv e).toEmbedding) + (T.map (projectiveEquiv e.symm.dualMap).toEmbedding)=incidences S T := by + have hh : (incidences (S.map (projectiveEquiv e).toEmbedding) + (T.map (projectiveEquiv e.symm.dualMap).toEmbedding):ℝ)=(incidences S T:ℝ) := by + rw [incidences_eq_sum,incidences_eq_sum] + simp only [Finset.sum_map,Equiv.toEmbedding_apply,incidenceEntry,incident_coordinates] + exact_mod_cast hh + +lemma decoded_coordinates (e : V≃ₗ[K]W) (U S : Finset (ℙ K V)) (Z : Finset (ℙ K W)) + (hZU : Z⊆U.map (projectiveEquiv e).toEmbedding) : + let W₀ := Z.map (projectiveEquiv e).symm.toEmbedding + W₀⊆U ∧ W₀.card=Z.card ∧ (W₀∩S).card=(Z∩S.map (projectiveEquiv e).toEmbedding).card := by + dsimp only + refine ⟨?_,Finset.card_map _,?_⟩ + · intro x hx + obtain ⟨z,hz,rfl⟩ := Finset.mem_map.mp hx + obtain ⟨y,hy,he⟩ := Finset.mem_map.mp (hZU hz) + simpa only [←he,Equiv.toEmbedding_apply,Equiv.symm_apply_apply] using hy + · have he : S=(S.map (projectiveEquiv e).toEmbedding).map (projectiveEquiv e).symm.toEmbedding := by + ext x + simp only [Finset.mem_map,Equiv.toEmbedding_apply] + constructor + · intro hx + exact ⟨projectiveEquiv e x,⟨x,hx,rfl⟩,(projectiveEquiv e).symm_apply_apply x⟩ + · rintro ⟨_,⟨y,hy,rfl⟩,rfl⟩ + simpa only [Equiv.symm_apply_apply] using hy + conv_lhs => rw [he] + rw [←Finset.map_inter,Finset.card_map] + +end + +open Module +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] + +noncomputable def bidualPoint : (ℙ K V) ≃ (ℙ K (Dual K (Dual K V))) := + projectiveEquiv (Module.evalEquiv K V) + +lemma incident_bidual (x : ℙ K V) (f : ℙ K (Dual K V)) : + Incident f (bidualPoint x) ↔ Incident x f := by + induction x using Projectivization.ind with | h v hv => + induction f using Projectivization.ind with | h a ha => + change Incident (Projectivization.mk K a ha) + (Projectivization.map (Module.evalEquiv K V).toLinearMap (Module.evalEquiv K V).injective + (Projectivization.mk K v hv)) ↔ _ + rw [Projectivization.map_mk,incident_mk_pair,incident_mk_pair] + rfl + +lemma incidences_bidual (S : Finset (ℙ K V)) (T : Finset (ℙ K (Dual K V))) : + incidences T (S.map bidualPoint.toEmbedding)=incidences S T := by + have hh : (incidences T (S.map bidualPoint.toEmbedding):ℝ)=(incidences S T:ℝ) := by + rw [incidences_eq_sum,incidences_eq_sum,Finset.sum_comm] + simp only [Finset.sum_map,Equiv.toEmbedding_apply,incidenceEntry,incident_bidual] + exact_mod_cast hh + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/CapturedGlobalRadialMoment.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/CapturedGlobalRadialMoment.lean new file mode 100644 index 0000000000000000000000000000000000000000..5dfa1a05766db4369f3b48816b62e2bd00b8f0ab --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/CapturedGlobalRadialMoment.lean @@ -0,0 +1,118 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Probability.IntegralForcedHits +import OAI.Combinatorics.RamseyFive.Decoding.RichCentersCard +import OAI.Combinatorics.RamseyFive.Geometry.MomentCutoffPolynomialTail + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open scoped BigOperators +open MeasureTheory ProbabilityTheory +open scoped BigOperators ENNReal NNReal +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] [∀ x : ℙ K V,Fintype (RadialLine x)] + +theorem captured_global_radial_moment {I : Type} [LinearOrder I] + (F : Finset I) (hF : F.Nonempty) (P : I→Submodule K V) (X S : Finset (ℙ K V)) + (hP : ∀ i∈F,finrank K (P i)=3) (j : ℕ) + (hS : S⊆X\remaining F hF (fun i => flatPoints (P i)) X j) + (hj : (j:ℝ)*(Nat.card K:ℝ)≤X.card) + (O : ℙ K V→Finset (ℙ K V)) + (hO : ∀ x,ownCell F hF (fun i => flatPoints (P i)) X j x⊆O x) + (δ : ℝ≥0) (hδ : 0<δ) (θ : ℝ) (hθ : 8*(δ:ℝ)*(j+1)≤θ) + (Lines : Finset (Submodule K V)) (hrank : ∀ l∈Lines,finrank K l=2) + (Q : Finset (ℙ K V)) (hLines : ∀ x∈Q,∀ l : RadialLine x,l.val∈Lines) + (J : ℕ) (hJ : 2≤J) : + (∑ x : Q,∑ l : RadialLine x.val,(radialWeight x.val (outsideAt x.val S (O x.val)) δ l:ℝ)^J) ≤ + (∑ x : Q,(Fintype.card (RadialLine x.val):ℝ))*θ^J+ + ((δ:ℝ)*((Nat.card K:ℝ)+1))^(J-2)* + (4*(Nat.clog 2 S.card+1)*(192*(δ:ℝ)^2*(X.card:ℝ)^2)) := by + have hδ' : 0<(δ:ℝ) := hδ + have hθ0 : 0≤θ := (by positivity : 0≤8*(δ:ℝ)*(j+1)).trans hθ + apply global_radial_moment S O δ hδ θ _ hθ0 (by positivity) Lines Q hLines _ J hJ + intro i hi hcut _hmax + let a : ℝ := (δ:ℝ)*2^i + have hscale : 4*(δ:ℝ)≤a := by + have hj0 : (0:ℝ)≤j := Nat.cast_nonneg j + change θ≤2*a at hcut + nlinarith + obtain ⟨M,hM,hlo,hhi⟩ := exists_scale hδ' hscale + have hjM : j≤M := by + have hjM' : (j:ℝ)≤M := by + change θ≤2*a at hcut + nlinarith + exact_mod_cast hjM' + have hm := captured_rich_centers F hF P X hP Lines hrank j M hM hjM hj O hO + δ a hδ' hlo hhi + have hs : (∑ l∈Lines,((richCenters S O δ a l).card:ℝ)) ≤ + ∑ l∈Lines,((richCenters (X\remaining F hF (fun i => flatPoints (P i)) X j) O δ a l).card:ℝ) := by + apply Finset.sum_le_sum + intro l hl + exact Nat.cast_le.mpr (Finset.card_le_card (richCenters_mono S _ O O δ a δ.coe_nonneg hS + (fun _ => Finset.Subset.refl _) l)) + exact (mul_le_mul_of_nonneg_right hs (sq_nonneg a)).trans hm + +open MeasureTheory + +omit [FiniteDimensional K V] [Finite K] in +theorem global_trunc_failure (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ L : ℝ≥0) (Q : Finset (ℙ K V)) (R J : ℕ) : + (∑ x : Q,∫ ω,1-HighMoment.allTrunc R J ω + ∂batchMeasure (fun p : Fin R×RadialLine x.val => + L*radialWeight x.val (outsideAt x.val S (O x.val)) δ p.2)) ≤ + ((R:ℝ)*(L:ℝ))^J* + (∑ x : Q,∑ l : RadialLine x.val,(radialWeight x.val (outsideAt x.val S (O x.val)) δ l:ℝ)^J) := by + calc + _ ≤ ∑ x : Q,∑ l : RadialLine x.val,((R:ℝ)* + ((L*radialWeight x.val (outsideAt x.val S (O x.val)) δ l:ℝ≥0):ℝ))^J := + Finset.sum_le_sum fun x _ => HighMoment.allTrunc_failure + (fun l => L*radialWeight x.val (outsideAt x.val S (O x.val)) δ l) R J + _ = _ := by + simp only [NNReal.coe_mul,←mul_assoc,mul_pow,Finset.mul_sum] + +end + +open Module ProjectiveIncidence ProjectiveTraining GlobalRadial PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K I : Type} [Field K] [Finite K] [Fintype I] + [∀ x : ℙ K (I→K),Fintype (RadialLine x)] + +theorem residual_global_radial_moment {q : ℕ} [CharP K q] + (hq : 2 y.submodule≤U).card:ℝ)≤ + (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5)) + (J : ℕ) (hJ : 2≤J) : + (∑ x : Q,∑ l : RadialLine x.val,(radialWeight x.val (outsideAt x.val X (O x.val)) δ l:ℝ)^J) ≤ + (∑ x : Q,(Fintype.card (RadialLine x.val):ℝ))*θ^J+ + ((δ:ℝ)*((Nat.card K:ℝ)+1))^(J-2)* + (4*(Nat.clog 2 X.card+1)*(333024*(q:ℝ)^2)) := by + have hθ0 : 0≤θ := (by positivity : 0≤2*Real.exp (-g/20)).trans hθ + apply global_radial_moment X O δ hδ θ _ hθ0 (by positivity) Lines Q hLines _ J hJ + intro i hi hcut hamax + have ha : Real.exp (-g/20)≤(δ:ℝ)*2^i := by linarith + have ha2 : (δ:ℝ)*2^i≤2 := hamax.trans (by simpa only [hcard] using hmax) + have ht := residual_rich_centers hq hcard hI σ g n' ((δ:ℝ)*2^i) hσq hσ hg hghi hn' + ha ha2 X hX Lines hrank O hcap + simpa only [←hδeq] using ht + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/CardFilterContainment.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/CardFilterContainment.lean new file mode 100644 index 0000000000000000000000000000000000000000..d97b58fb54af40a6808bc5bebb5b65cf0c53b8b6 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/CardFilterContainment.lean @@ -0,0 +1,240 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.RichHyperplaneVariance + +namespace OAI + +namespace SharpRamseyFive.RichPlaneGeometry +open Module SharpRamseyFive.ProjectiveIncidence +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + +lemma card_filter_containment_le (X : Finset (ℙ K V)) (A : Submodule K V) : + (X.filter fun x => x.submodule ≤ A).card ≤ ∑ i ∈ Finset.range (finrank K A), Nat.card K^i := by + let : Finite V := Module.finite_of_finite K + let Y := X.filter fun x => x.submodule ≤ A + have hi : Function.Injective (fun x : Y => (⟨x.val,(Finset.mem_filter.mp x.property).2⟩ : + {p : ℙ K V // p.submodule ≤ A})) := by + intro x y he + exact Subtype.ext (congrArg (fun z : {p : ℙ K V // p.submodule ≤ A} => z.val) he) + have hc := Nat.card_le_card_of_injective _ hi + rw [Nat.card_eq_fintype_card, Fintype.card_coe, card_subspacePoints] at hc + exact hc + +lemma card_filter_finrank_le_two (X : Finset (ℙ K V)) (A : Submodule K V) + (hA : finrank K A ≤ 2) : + (X.filter fun x => x.submodule ≤ A).card ≤ Nat.card K+1 := by + have hle := Finset.sum_le_sum_of_subset_of_nonneg (Finset.range_mono hA) + (f := fun i => Nat.card K^i) (by intros; exact Nat.zero_le _) + have hc := (card_filter_containment_le X A).trans hle + simpa [Finset.sum_range_succ,add_comm] using hc + +lemma card_filter_finrank_le_one (X : Finset (ℙ K V)) (A : Submodule K V) + (hA : finrank K A ≤ 1) : + (X.filter fun x => x.submodule ≤ A).card ≤ 1 := by + have hle := Finset.sum_le_sum_of_subset_of_nonneg (Finset.range_mono hA) + (f := fun i => Nat.card K^i) (by intros; exact Nat.zero_le _) + have hc := (card_filter_containment_le X A).trans hle + simpa using hc + +omit [Finite K] in +lemma finrank_inf_lt_of_not_le (A H : Submodule K V) (hn : ¬A ≤ H) : + finrank K (A ⊓ H : Submodule K V) < finrank K A := by + apply Submodule.finrank_lt_finrank_of_lt + apply lt_of_le_of_ne inf_le_left + intro he + exact hn (he ▸ inf_le_right) + +lemma plane_noncontaining_flat_cap (X : Finset (ℙ K V)) (A H : Submodule K V) + (hA : finrank K A = 3) (hn : ¬A ≤ H) : + (X.filter fun x => x.submodule ≤ A ∧ x.submodule ≤ H).card ≤ Nat.card K+1 := by + have hh := finrank_inf_lt_of_not_le A H hn + rw [hA] at hh + simpa only [le_inf_iff] using card_filter_finrank_le_two X (A ⊓ H) (by omega) + +lemma line_noncontaining_flat_cap (X : Finset (ℙ K V)) (A H : Submodule K V) + (hA : finrank K A = 2) (hn : ¬A ≤ H) : + (X.filter fun x => x.submodule ≤ A ∧ x.submodule ≤ H).card ≤ 1 := by + have hh := finrank_inf_lt_of_not_le A H hn + rw [hA] at hh + simpa only [le_inf_iff] using card_filter_finrank_le_one X (A ⊓ H) (by omega) + +lemma card_hyperplane_family {d : ℕ} (hdim : finrank K V = d+1) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = d) : + F.card ≤ Q (Nat.card K) d := by + let : Finite (Module.Dual K V) := Module.finite_of_finite K + let : Fintype (ℙ K (Module.Dual K V)) := Fintype.ofFinite _ + let f (A : F) := dualOfHyperplane hdim A.val (hF A.val A.property) + have hf : Function.Injective f := by + intro A B he + apply Subtype.ext + have hk := congrArg (fun b : ℙ K (Module.Dual K V) => LinearMap.ker b.rep) he + simpa only [f,ker_dualOfHyperplane] using hk + have hc := Fintype.card_le_of_injective f hf + simpa only [Fintype.card_coe, card_hyperplanes hdim] using hc + +lemma card_hyperplanes_inside {d : ℕ} (H : Submodule K V) (hH : finrank K H = d+1) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = d) : + (F.filter fun A => A ≤ H).card ≤ Q (Nat.card K) d := by + let G := F.filter fun A => A ≤ H + let FH := G.image (fun A => A.comap H.subtype) + have hc : FH.card = G.card := Finset.card_image_iff.mpr (by + intro A hA B hB he + exact comap_subtype_injOn H (Finset.mem_filter.mp hA).2 (Finset.mem_filter.mp hB).2 he) + have hdimF (A : Submodule K H) (hA : A ∈ FH) : finrank K A = d := by + obtain ⟨B,hB,rfl⟩ := Finset.mem_image.mp hA + rw [comap_subtype_finrank H B (Finset.mem_filter.mp hB).2] + exact hF B (Finset.mem_filter.mp hB).1 + have hh := card_hyperplane_family hH FH hdimF + rwa [hc] at hh + +end SharpRamseyFive.RichPlaneGeometry + +namespace SharpRamseyFive.HyperplaneOverlap +open Module ProjectiveIncidence RichPlaneGeometry +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] [FiniteDimensional K V] + +lemma hyperplane_intersection_rank {d : ℕ} (hdim : finrank K V = d+1) + (A B : Submodule K V) (hA : finrank K A = d) (hB : finrank K B = d) (hne : A ≠ B) : + finrank K (A ⊓ B : Submodule K V) = d-1 := by + have hn : ¬A ≤ B := fun h => hne (Submodule.eq_of_le_of_finrank_eq h (hA.trans hB.symm)) + have hlt := finrank_inf_lt_of_not_le A B hn + have hs := Submodule.finrank_sup_add_finrank_inf_eq A B + have hle := Submodule.finrank_le (A ⊔ B : Submodule K V) + rw [hA] at hlt + rw [hA,hB] at hs + rw [hdim] at hle + omega + +lemma card_hyperplanes_containing [Finite K] {d : ℕ} (hdim : finrank K V = d+1) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = d) (W : Submodule K V) : + (F.filter fun A => W ≤ A).card ≤ + ∑ i ∈ Finset.range (d+1-finrank K W), Nat.card K^i := by + let : Finite (Module.Dual K V) := Module.finite_of_finite K + let : Fintype (ℙ K (Module.Dual K V)) := Fintype.ofFinite _ + let G := F.filter fun A => W ≤ A + let f (A : G) : {b : ℙ K (Module.Dual K V) // b.submodule ≤ W.dualAnnihilator} := + ⟨dualOfHyperplane hdim A.val (hF _ (Finset.mem_filter.mp A.property).1), by + rw [Projectivization.submodule_eq,Submodule.span_singleton_le_iff_mem,Submodule.mem_dualAnnihilator] + intro w hw + have hk := (Finset.mem_filter.mp A.property).2 hw + rw [← ker_dualOfHyperplane hdim A.val (hF _ (Finset.mem_filter.mp A.property).1)] at hk + exact hk⟩ + have hf : Function.Injective f := by + intro A B he + apply Subtype.ext + have hv := congrArg (fun b : {b : ℙ K (Module.Dual K V) // b.submodule ≤ W.dualAnnihilator} => + LinearMap.ker b.val.rep) he + simpa only [f,ker_dualOfHyperplane] using hv + have hc := Fintype.card_le_of_injective f hf + have he := Subspace.finrank_add_finrank_dualAnnihilator_eq W + have hr : finrank K W.dualAnnihilator = d+1-finrank K W := by omega + rw [Fintype.card_coe,← Nat.card_eq_fintype_card,card_subspacePoints,hr] at hc + exact hc + +lemma pair_count_by_intersection {d : ℕ} [Finite K] (hdim : finrank K V = d+1) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = d) + (L : Finset (Submodule K V)) (r : ℕ) (hL : ∀ W ∈ L, finrank K W = r) + (E : Finset (Submodule K V × Submodule K V)) + (hE : E ⊆ F ×ˢ F) (hEL : ∀ p ∈ E, p.1 ⊓ p.2 ∈ L) : + E.card ≤ L.card*(∑ i ∈ Finset.range (d+1-r), Nat.card K^i)^2 := by + let C (W : Submodule K V) := F.filter fun H => W ≤ H + have hsub : E ⊆ L.biUnion (fun W => C W ×ˢ C W) := by + intro p hp + obtain ⟨ha,hb⟩ := Finset.mem_product.mp (hE hp) + exact Finset.mem_biUnion.mpr ⟨p.1 ⊓ p.2,hEL p hp,Finset.mem_product.mpr + ⟨Finset.mem_filter.mpr ⟨ha,inf_le_left⟩,Finset.mem_filter.mpr ⟨hb,inf_le_right⟩⟩⟩ + have hrow (W : Submodule K V) (hW : W ∈ L) : + (C W ×ˢ C W).card ≤ (∑ i ∈ Finset.range (d+1-r), Nat.card K^i)^2 := by + have hc := card_hyperplanes_containing hdim F hF W + rw [hL W hW] at hc + simpa only [Finset.card_product,pow_two] using Nat.pow_le_pow_left hc 2 + exact (Finset.card_le_card hsub).trans (Finset.card_biUnion_le.trans (by + have hh := Finset.sum_le_sum hrow + simpa only [Finset.sum_const_nat] using hh)) + +lemma neighbor_count_by_intersection {d : ℕ} [Finite K] (hdim : finrank K V = d+1) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = d) + (L : Finset (Submodule K V)) (r : ℕ) (hL : ∀ W ∈ L, finrank K W = r) + (H : Submodule K V) (E : Finset (Submodule K V)) + (hE : E ⊆ F) (hEL : ∀ A ∈ E, H ⊓ A ∈ L) : + E.card ≤ L.card*(∑ i ∈ Finset.range (d+1-r), Nat.card K^i) := by + have hsub : E ⊆ L.biUnion (fun W => F.filter fun A => W ≤ A) := by + intro A hA + exact Finset.mem_biUnion.mpr ⟨H ⊓ A,hEL A hA,Finset.mem_filter.mpr ⟨hE hA,inf_le_right⟩⟩ + have hrow (W : Submodule K V) (hW : W ∈ L) : + (F.filter fun A => W ≤ A).card ≤ (∑ i ∈ Finset.range (d+1-r), Nat.card K^i) := by + simpa only [hL W hW] using card_hyperplanes_containing hdim F hF W + exact (Finset.card_le_card hsub).trans (Finset.card_biUnion_le.trans (by + have hh := Finset.sum_le_sum hrow + simpa only [Finset.sum_const_nat] using hh)) + +lemma pair_count_by_contained_witness {d : ℕ} [Finite K] (hdim : finrank K V = d+1) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = d) + (L : Finset (Submodule K V)) (r : ℕ) (hL : ∀ W ∈ L, finrank K W = r) + (E : Finset (Submodule K V × Submodule K V)) + (hE : E ⊆ F ×ˢ F) (hEL : ∀ p ∈ E, ∃ W ∈ L, W ≤ p.1 ⊓ p.2) : + E.card ≤ L.card*(∑ i ∈ Finset.range (d+1-r), Nat.card K^i)^2 := by + let C (W : Submodule K V) := F.filter fun H => W ≤ H + have hsub : E ⊆ L.biUnion (fun W => C W ×ˢ C W) := by + intro p hp + obtain ⟨ha,hb⟩ := Finset.mem_product.mp (hE hp) + obtain ⟨W,hW,hWp⟩ := hEL p hp + exact Finset.mem_biUnion.mpr ⟨W,hW,Finset.mem_product.mpr + ⟨Finset.mem_filter.mpr ⟨ha,hWp.trans inf_le_left⟩, + Finset.mem_filter.mpr ⟨hb,hWp.trans inf_le_right⟩⟩⟩ + have hrow (W : Submodule K V) (hW : W ∈ L) : + (C W ×ˢ C W).card ≤ (∑ i ∈ Finset.range (d+1-r), Nat.card K^i)^2 := by + have hc := card_hyperplanes_containing hdim F hF W + rw [hL W hW] at hc + simpa only [Finset.card_product,pow_two] using Nat.pow_le_pow_left hc 2 + exact (Finset.card_le_card hsub).trans (Finset.card_biUnion_le.trans (by + have hh := Finset.sum_le_sum hrow + simpa only [Finset.sum_const_nat] using hh)) + +lemma neighbor_count_by_contained_witness {d : ℕ} [Finite K] (hdim : finrank K V = d+1) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = d) + (L : Finset (Submodule K V)) (r : ℕ) (hL : ∀ W ∈ L, finrank K W = r) + (E : Finset (Submodule K V)) + (hE : E ⊆ F) (hEL : ∀ A ∈ E, ∃ W ∈ L, W ≤ A) : + E.card ≤ L.card*(∑ i ∈ Finset.range (d+1-r), Nat.card K^i) := by + have hsub : E ⊆ L.biUnion (fun W => F.filter fun A => W ≤ A) := by + intro A hA + obtain ⟨W,hW,hWA⟩ := hEL A hA + exact Finset.mem_biUnion.mpr ⟨W,hW,Finset.mem_filter.mpr ⟨hE hA,hWA⟩⟩ + have hrow (W : Submodule K V) (hW : W ∈ L) : + (F.filter fun A => W ≤ A).card ≤ (∑ i ∈ Finset.range (d+1-r), Nat.card K^i) := by + simpa only [hL W hW] using card_hyperplanes_containing hdim F hF W + exact (Finset.card_le_card hsub).trans (Finset.card_biUnion_le.trans (by + have hh := Finset.sum_le_sum hrow + simpa only [Finset.sum_const_nat] using hh)) + +lemma rich_radial_count {x : ℙ K V} [Fintype (RadialLine x)] + (X : Finset {y : ℙ K V // x ≠ y}) (W : Submodule K V) (hx : x.submodule ≤ W) + (L : Finset (RadialLine x)) (hL : L ⊆ RadialLine.inFlat W) (M : ℕ) + (hM : ∀ l ∈ L, M ≤ (RadialLine.trainingOnLine X l).card) : + L.card*M ≤ (X.filter fun y => y.val.submodule ≤ W).card := by + have h := Finset.sum_le_sum hM + simp only [Finset.sum_const_nat] at h + apply h.trans + rw [← RadialLine.sum_trainingOnLine X W hx] + exact Finset.sum_le_sum_of_subset hL + +lemma rich_radial_strength_count {x : ℙ K V} [Fintype (RadialLine x)] + (X : Finset {y : ℙ K V // x ≠ y}) (q n : ℝ) (hq : 0 ≤ q) (hn : 0 ≤ n) + (W : Submodule K V) (hx : x.submodule ≤ W) + (L : Finset (RadialLine x)) (hL : L ⊆ RadialLine.inFlat W) (a : ℝ) + (ha : ∀ l ∈ L, a ≤ RadialLine.strength X q n l) : + L.card*a ≤ q/n*(X.filter fun y => y.val.submodule ≤ W).card := by + have h := Finset.sum_le_sum ha + simp only [Finset.sum_const, nsmul_eq_mul] at h + apply h.trans + rw [← RadialLine.sum_strength X q n W hx] + exact Finset.sum_le_sum_of_subset_of_nonneg hL (fun l _ _ => by + dsimp [RadialLine.strength] + positivity) + +end SharpRamseyFive.HyperplaneOverlap + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/CardIndexed.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/CardIndexed.lean new file mode 100644 index 0000000000000000000000000000000000000000..e1e913344ab3bff55e997604808deed314ee36a7 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/CardIndexed.lean @@ -0,0 +1,97 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.CardMul +import OAI.Combinatorics.RamseyFive.Decoding.ScalarConditions + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open scoped BigOperators +open MeasureTheory ProbabilityTheory +open scoped BigOperators ENNReal NNReal +noncomputable section +namespace SharpRamseyFive.ProjectiveRichLines +open Module +open scoped LinearAlgebra.Projectivization Classical +variable {K I : Type*} [Field K] [Fintype I] + +omit [Fintype I] in +lemma card_indexed (X : Finset (ℙ K (I → K))) (U : Submodule K (I → K)) : + (Finset.univ.filter (fun y : X => y.val.rep ∈ U)).card = + (X.filter (fun y => y.submodule ≤ U)).card := by + apply Finset.card_bij (fun y _ => y.val) + · intro y hy + refine Finset.mem_filter.mpr ⟨y.property,?_⟩ + rw [Projectivization.submodule_eq, Submodule.span_singleton_le_iff_mem] + exact (Finset.mem_filter.mp hy).2 + · intro y _ z _ h + exact Subtype.ext h + · intro y hy + obtain ⟨hy,hU⟩ := Finset.mem_filter.mp hy + refine ⟨⟨y,hy⟩,Finset.mem_filter.mpr ⟨Finset.mem_univ _,?_⟩,rfl⟩ + rwa [Projectivization.submodule_eq, Submodule.span_singleton_le_iff_mem] at hU + +theorem source_rich_lines {q : ℕ} [CharP K q] (hq : 2 < q) + (hI : Fintype.card I = 4 ∨ Fintype.card I = 5) + (σ g n' a : ℝ) (hσq : Real.exp σ = q) + (hσ : 1000 ≤ σ) (hg : 100000000 ≤ g) (hghi : g ≤ 2*σ) + (hn' : Real.exp (3*σ/2+g)/4 ≤ n') (ha : Real.exp (-g/20) ≤ a) + (X : Finset (ℙ K (I → K))) (hX : (X.card:ℝ) ≤ Real.exp (3*σ/2+g)) + (F : Finset (Submodule K (I → K))) (hF : ∀ U ∈ F, finrank K U = 2) + (hrich : ∀ U ∈ F, n'*a/Real.exp σ ≤ (X.filter fun y => y.submodule ≤ U).card) + (hcap : ∀ U : Submodule K (I → K), finrank K U = 3 → + ((X.filter fun y => y.submodule ≤ U).card:ℝ) ≤ + (Real.exp (3*σ/2+g)) ^ (4/3:ℝ) / Real.exp σ * Real.exp (-g/5)) : + (F.card:ℝ)*(n'*a/Real.exp σ) ≤ 20814*Real.exp (3*σ/2+g) := by + classical + obtain ⟨hMlo,hCeq⟩ := RichRegime.source_substitution σ g n' a hn' ha + let M : ℕ := ⌈n'*a/Real.exp σ⌉₊ + let C : ℕ := ⌊Real.exp (σ+17*g/15)⌋₊ + have hMM : n'*a/Real.exp σ ≤ (M:ℝ) := Nat.le_ceil _ + have hC : (C:ℝ) ≤ Real.exp (σ+17*g/15) := Nat.floor_le (by positivity) + obtain ⟨hM2,hlarge,hCM,hchar⟩ := RichRegime.sufficiently_large_conditions σ g + (X.card:ℝ) M C hσ hg hghi hX (hMlo.trans hMM) (hC.trans (by nlinarith [Real.exp_pos (σ+17*g/15)])) + by_cases hFn : F.Nonempty + · obtain ⟨U,hU⟩ := hFn + have hMU : M ≤ (X.filter fun y => y.submodule ≤ U).card := Nat.ceil_le.mpr (hrich U hU) + have hMN : M ≤ X.card := hMU.trans (Finset.card_filter_le _ _) + have hXp : (0:ℝ) < X.card := lt_of_lt_of_le (by linarith : (0:ℝ) y.val) Subtype.val_injective (fun U : F => U.val) + (fun U => hF U.val U.property) Subtype.val_injective M C + (by exact_mod_cast hM2) (by simpa only [Fintype.card_coe] using hMN) + (by + intro U + rw [card_indexed] + exact Nat.ceil_le.mpr (hrich U.val U.property)) + (by + intro U hU + rw [card_indexed] + apply Nat.le_floor + rw [← hCeq] + exact hcap U hU) + (by simpa only [Fintype.card_coe] using hlarge) + (by simpa only [Fintype.card_coe,hσq] using hchar) + (by exact_mod_cast hCM) + have hh' : (F.card:ℝ)*(M:ℝ) ≤ 20814*(X.card:ℝ) := by + exact_mod_cast (by simpa only [Fintype.card_coe] using hh : F.card * M ≤ 20814 * X.card) + exact (mul_le_mul_of_nonneg_left hMM (by positivity)).trans + (hh'.trans (mul_le_mul_of_nonneg_left hX (by norm_num))) + · have hF0 : F = ∅ := Finset.not_nonempty_iff_eq_empty.mp hFn + rw [hF0,Finset.card_empty,Nat.cast_zero,zero_mul] + positivity + +end SharpRamseyFive.ProjectiveRichLines + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/CardMul.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/CardMul.lean new file mode 100644 index 0000000000000000000000000000000000000000..8b871ce1d8fe46d3452836568d02817b839fbdb3 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/CardMul.lean @@ -0,0 +1,88 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Geometry.Weight +import OAI.Combinatorics.RamseyFive.Geometry.ProjectiveLinePairPacking +import OAI.Combinatorics.RamseyFive.Probability.SamplingDegree +import OAI.Combinatorics.RamseyFive.Decoding.PairExpBound + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open scoped BigOperators +open MeasureTheory ProbabilityTheory +open scoped BigOperators ENNReal NNReal +namespace SharpRamseyFive.ProjectiveRichLines +open Module +open scoped LinearAlgebra.Projectivization Classical +open AffineRealization +variable {K L I ι J : Type*} [Field K] [Field L] [Algebra K L] + [IsAlgClosed L] [Fintype I] [Fintype ι] [Nonempty ι] [Fintype J] + +theorem card_mul_le {q : ℕ} [CharP L q] (h2 : (2:L) ≠ 0) + (hI : Fintype.card I = 4 ∨ Fintype.card I = 5) + (p : ι → ℙ K (I → K)) (hp : Function.Injective p) + (W : J → Submodule K (I → K)) (hW : ∀ l, finrank K (W l) = 2) + (hWinj : Function.Injective W) + (M Kp h C : ℕ) (f : ℝ) (hf : 0 < f) (hf1 : f ≤ 1) (hM2 : 2 ≤ M) + (hM : ∀ l, M ≤ (Finset.univ.filter (fun i => (p i).rep ∈ W l)).card) + (hcap : ∀ U : Submodule K (I → K), finrank K U = 3 → + (Finset.univ.filter (fun i => (p i).rep ∈ U)).card ≤ Kp) + (hprob : (Fintype.card J:ℝ)*Real.exp (-f*M/12) < 1/2) + (hsize : 2*f*Fintype.card ι < ((h+1)^3:ℕ)) (hdeg : (3*h:ℕ) ≤ f*M/2) + (hchar : 3*h < q) (hMD : 18*h < M) (hKM : 8*Kp ≤ M^2) + (hD : h^2*M ≤ C*Fintype.card ι) : + Fintype.card J*M ≤ (6+72*C)*Fintype.card ι := by + classical + obtain ⟨a, ha, hr⟩ := exists_projective_realization (L := L) hI p hp + obtain ⟨i, j, hij, hi, hj⟩ := exists_line_indices p W (fun l => hM2.trans (hM l)) + let S : Finset (Fin 3 → L) := Finset.univ.image a + have hSc : S.card = Fintype.card ι := by + rw [Finset.card_image_of_injective _ ha, Finset.card_univ] + have hSn : S.Nonempty := by + exact Finset.image_nonempty.mpr Finset.univ_nonempty + have hv : ∀ l, a (j l)-a (i l) ≠ 0 := by + intro l he + exact hij l (ha (sub_eq_zero.mp he).symm) + have hlines : ∀ l, M ≤ (SharpLogRamsey.AffineIncidence.onLine + (fun l => a (i l)) (fun l => a (j l)-a (i l)) S l).card := by + intro l + have hc := line_count_of_ranks p hp a ha hr (W l) (hW l) (hij l) (hi l) (hj l) + exact (hM l).trans_eq hc + have hcap' (P : MvPolynomial (Fin 3) L) (hP : P.totalDegree = 1) : + (S.filter (fun y => MvPolynomial.eval y P = 0)).card ≤ Kp := by + exact plane_cap_of_ranks (by omega) p a ha hr Kp hcap P hP + have hd := distinct_lines_of_ranks p hp a hr W hW hWinj i j hij hi hj + have H := SharpLogRamsey.RichAffineLines.card_mul_le h2 S hSn + (fun l => a (i l)) (fun l => a (j l)-a (i l)) hv hd + M Kp h C f hf hf1 hlines hcap' hprob (by rwa [hSc]) hdeg + hchar hMD hKM (by rwa [hSc]) + rwa [hSc] at H + +theorem quantitative_card_mul_le {q : ℕ} [CharP L q] (h2 : (2:L) ≠ 0) + (hI : Fintype.card I = 4 ∨ Fintype.card I = 5) + (p : ι → ℙ K (I → K)) (hp : Function.Injective p) + (W : J → Submodule K (I → K)) (hW : ∀ l, finrank K (W l) = 2) + (hWinj : Function.Injective W) + (M Kp : ℕ) (hM2 : 2 ≤ M) (hMN : M ≤ Fintype.card ι) + (hM : ∀ l, M ≤ (Finset.univ.filter (fun i => (p i).rep ∈ W l)).card) + (hcap : ∀ U : Submodule K (I → K), finrank K U = 3 → + (Finset.univ.filter (fun i => (p i).rep ∈ U)).card ≤ Kp) + (hlarge : (1024:ℝ)^2*Fintype.card ι ≤ (M:ℝ)^3) + (hchar : 51*Real.sqrt ((Fintype.card ι:ℝ)/M) < q) + (hKM : 8*Kp ≤ M^2) : + Fintype.card J*M ≤ 20814*Fintype.card ι := by + obtain ⟨f,h,hf,hf1,hsize,hdeg,hcq,hMD,hD,hfe⟩ := + RichParameters.exists_sampling_degree (Fintype.card ι) M q (by omega) hMN hlarge hchar + apply card_mul_le (L := L) h2 hI p hp W hW hWinj M Kp h 289 f hf hf1 hM2 hM hcap + _ hsize hdeg hcq hMD hKM hD + have hc := projective_line_pair_packing p hp W hW hWinj M hM + have hu := RichParameters.pair_exp_bound hM2 hMN hc + convert hu using 1 + congr 2 + rw [neg_mul, hfe] + ring +end SharpRamseyFive.ProjectiveRichLines + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/Center.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/Center.lean new file mode 100644 index 0000000000000000000000000000000000000000..674a1c579eb69790af2c69dc3ed5a952f7018d05 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/Center.lean @@ -0,0 +1,104 @@ +import Mathlib + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal + +open scoped BigOperators + +open MeasureTheory ProbabilityTheory +open scoped BigOperators ENNReal NNReal + +namespace SharpRamseyFive.ProjectiveReduction +open Module Submodule +open scoped BigOperators + +variable {K V : Type*} [Field K] [Infinite K] [AddCommGroup V] [Module K V] + +theorem exists_center {ι : Type*} [Finite ι] (W : ι → Submodule K V) + (hW : ∀ i, W i ≠ ⊤) : ∃ v : V, ∀ i, v ∉ W i := + Submodule.exists_forall_notMem_of_forall_ne_top W hW + +omit [Infinite K] in + +theorem quotient_injOn {W : Submodule K V} {v : V} (hv : v ∉ W) : + Set.InjOn (Submodule.mkQ (K ∙ v)) W := by + intro x hx y hy hxy + have hmem : x - y ∈ K ∙ v := by + exact (Submodule.Quotient.eq (K ∙ v)).mp hxy + obtain ⟨a, ha⟩ := Submodule.mem_span_singleton.mp hmem + have haw : a • v ∈ W := ha ▸ W.sub_mem hx hy + have ha0 : a = 0 := by + by_contra ha0 + exact hv ((W.smul_mem_iff ha0).mp haw) + simpa [ha0, eq_comm, sub_eq_zero] using ha + +theorem exists_projection [FiniteDimensional K V] {ι : Type*} [Finite ι] + [Nonempty ι] (n : ℕ) (hdim : finrank K V = n + 1) + (W : ι → Submodule K V) (hW : ∀ i, W i ≠ ⊤) : + ∃ f : V →ₗ[K] (Fin n → K), Function.Surjective f ∧ + ∀ i, Set.InjOn f (W i) := by + classical + obtain ⟨v, hv⟩ := exists_center W hW + have hv0 : v ≠ 0 := by + intro he + exact hv (Classical.arbitrary ι) (he ▸ (W _).zero_mem) + have hr : finrank K (V ⧸ (K ∙ v)) = n := by + have he := Submodule.finrank_quotient_add_finrank (K ∙ v) + rw [finrank_span_singleton hv0, hdim] at he + omega + let e : (V ⧸ (K ∙ v)) ≃ₗ[K] (Fin n → K) := + LinearEquiv.ofFinrankEq _ _ (by simpa using hr) + refine ⟨e.toLinearMap.comp (Submodule.mkQ (K ∙ v)), ?_, ?_⟩ + · exact e.surjective.comp (Submodule.mkQ_surjective _) + · intro i x hx y hy hxy + exact quotient_injOn (hv i) hx hy (e.injective hxy) + +theorem exists_projection_preserving_spans [FiniteDimensional K V] + (n : ℕ) (hdim : finrank K V = n + 1) (X : Finset V) : + ∃ f : V →ₗ[K] (Fin n → K), Function.Surjective f ∧ + ∀ Y : Finset V, Y ⊆ X → Submodule.span K (Y : Set V) ≠ ⊤ → + Set.InjOn f (Submodule.span K (Y : Set V)) := by + classical + let I := {Y : Finset V // Y ∈ X.powerset} + let : Nonempty I := ⟨⟨∅, by simp⟩⟩ + have hb : (⊥ : Submodule K V) ≠ ⊤ := by + intro he + have hr := congrArg (fun W : Submodule K V => finrank K W) he + simp [hdim] at hr + let W : I → Submodule K V := fun Y => + if Submodule.span K (Y.val : Set V) = ⊤ then ⊥ else + Submodule.span K (Y.val : Set V) + have hW : ∀ i, W i ≠ ⊤ := by + intro i + dsimp [W] + split_ifs with hi + · exact hb + · exact hi + obtain ⟨f, hf, hfi⟩ := exists_projection n hdim W hW + refine ⟨f, hf, ?_⟩ + intro Y hY hY' + have H := hfi ⟨Y, Finset.mem_powerset.mpr hY⟩ + simpa [W, hY'] using H + +omit [Infinite K] in + +theorem finrank_map_of_injOn {U : Type*} [AddCommGroup U] [Module K U] + (f : V →ₗ[K] U) (W : Submodule K V) (hf : Set.InjOn f W) : + finrank K (W.map f) = finrank K W := by + have hi : Function.Injective (f.comp W.subtype) := by + intro x y hxy + exact Subtype.ext (hf x.property y.property hxy) + have hr := LinearMap.finrank_range_of_inj hi + have he : (f.comp W.subtype).range = W.map f := by + ext y + simp [LinearMap.mem_range, Submodule.mem_map] + rwa [he] at hr + +end SharpRamseyFive.ProjectiveReduction + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/CommonNeighborDichotomy.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/CommonNeighborDichotomy.lean new file mode 100644 index 0000000000000000000000000000000000000000..725f37def6886c9d9ec9621e8671f41e6bb8e40f --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/CommonNeighborDichotomy.lean @@ -0,0 +1,49 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.RichPlaneOverlap +open Module +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] + +theorem common_neighbor_dichotomy (A B C : Submodule K V) + (hC : finrank K C = 3) (hAB : finrank K (A ⊓ B : Submodule K V) = 2) + (hCA : finrank K (C ⊓ A : Submodule K V) = 2) + (hCB : finrank K (C ⊓ B : Submodule K V) = 2) : + A ⊓ B ≤ C ∨ C ≤ A ⊔ B := by + by_cases h : A ⊓ B ≤ C + · exact Or.inl h + right + have hi : C ⊓ (A ⊓ B) < A ⊓ B := lt_of_le_of_ne inf_le_right (by + intro he + apply h + rw [← he] + exact inf_le_left) + have hlt := Submodule.finrank_lt_finrank_of_lt hi + rw [hAB] at hlt + have he := Submodule.finrank_sup_add_finrank_inf_eq (C ⊓ A) (C ⊓ B) + have hinf : (C ⊓ A) ⊓ (C ⊓ B) = C ⊓ (A ⊓ B) := by + ext + simp only [Submodule.mem_inf] + tauto + rw [hCA, hCB, hinf] at he + have hle : (C ⊓ A) ⊔ (C ⊓ B) ≤ C := sup_le inf_le_left inf_le_left + have hdim := Submodule.finrank_mono hle + rw [hC] at hdim + have heq : (C ⊓ A) ⊔ (C ⊓ B) = C := + Submodule.eq_of_le_of_finrank_eq hle (by omega) + rw [← heq] + exact sup_le (inf_le_right.trans le_sup_left) (inf_le_right.trans le_sup_right) + +theorem finrank_sup_of_plane_intersection (A B : Submodule K V) + (hA : finrank K A = 3) (hB : finrank K B = 3) + (hAB : finrank K (A ⊓ B : Submodule K V) = 2) : + finrank K (A ⊔ B : Submodule K V) = 4 := by + have h := Submodule.finrank_sup_add_finrank_inf_eq A B + rw [hA, hB, hAB] at h + omega + +end SharpRamseyFive.RichPlaneOverlap + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/CompressionRecurrence.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/CompressionRecurrence.lean new file mode 100644 index 0000000000000000000000000000000000000000..95b8786b5f5199ca49c590929ed3aa96bdcee468 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/CompressionRecurrence.lean @@ -0,0 +1,57 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.ParameterHierarchy +open Filter +open scoped Topology +noncomputable section + +theorem finite_affine_recurrence (a b d : ℝ) (D : ℕ→ℝ) + (hb : 0≤b) (hb' : b<1) (hD : D 0≤d) + (hstep : ∀n,D (n+1)≤a+b*D n) : + ∀n,D n≤a/(1-b)*(1-b^n)+b^n*d := by + intro n + induction n with + | zero => simpa using hD + | succ n ih => + apply (hstep n).trans + have hineq:=mul_le_mul_of_nonneg_left ih hb + have hnz : 1-b≠0 := ne_of_gt (sub_pos.mpr hb') + calc + a+b*D n≤a+b*(a/(1-b)*(1-b^n)+b^n*d) := add_le_add le_rfl hineq + _ = a/(1-b)*(1-b^(n+1))+b^(n+1)*d := by rw [pow_succ]; field_simp; ring + +theorem compression_recurrence_terminal (σ η β : ℝ) (m : ℕ) (D : ℕ→ℝ) + (hσ : 1≤σ) (_hη : 0<η) (_hβ : 0≤β) + (ha : 2≤σ^(2*β)) (hr : σ^(-η/4)≤(1:ℝ)/3) + (hm : 1≤η*(m:ℝ)/4) (hD : D 0≤σ) + (hstep : ∀n,D (n+1)≤σ^(2*β)+D n*σ^(-η/4)) : + D m≤2*σ^(2*β) := by + have hs : 0<σ := lt_of_lt_of_le zero_lt_one hσ + have hp : 0≤σ^(-η/4) := Real.rpow_nonneg hs.le _ + have hb : σ^(-η/4)<1 := lt_of_le_of_lt hr (by norm_num) + have hh:=finite_affine_recurrence (σ^(2*β)) (σ^(-η/4)) σ D hp hb hD + (fun n=>by simpa only [mul_comm] using hstep n) m + have hnon : 0≤σ^(2*β) := Real.rpow_nonneg hs.le _ + have hden : (2:ℝ)/3≤1-σ^(-η/4) := by linarith + have hfac : σ^(2*β)/(1-σ^(-η/4))≤(3/2)*σ^(2*β) := by + have h:=div_le_div_of_nonneg_left hnon (by norm_num : (0:ℝ)<2/3) hden + calc + _ ≤ σ^(2*β)/(2/3) := h + _ = _ := by ring + have htail : (σ^(-η/4))^m*σ≤1 := by + calc + _ = σ^((-η/4)*(m:ℝ)+1) := by + rw [Real.rpow_add hs,Real.rpow_one,Real.rpow_mul hs.le,Real.rpow_natCast] + _ ≤ 1 := Real.rpow_le_one_of_one_le_of_nonpos hσ (by nlinarith) + have hpow0 : 0≤(σ^(-η/4))^m := pow_nonneg hp _ + have hquot0 : 0≤σ^(2*β)/(1-σ^(-η/4)) := div_nonneg hnon (sub_nonneg.mpr hb.le) + have hprod : σ^(2*β)/(1-σ^(-η/4))*(1-(σ^(-η/4))^m)≤(3/2)*σ^(2*β) := by + apply le_trans _ hfac + nlinarith + linarith +end +end SharpRamseyFive.ParameterHierarchy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ConcretePivot.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ConcretePivot.lean new file mode 100644 index 0000000000000000000000000000000000000000..673f573ecdee0583c2b088a6e09906d5d27529f3 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ConcretePivot.lean @@ -0,0 +1,89 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.GuardedNodeEncoder +import OAI.Combinatorics.RamseyFive.Trees.PivotTree + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +abbrev PivotContext (K V : Type) [Field K] [AddCommGroup V] [Module K V] := + Finset (ℙ K V)×Finset (ℙ K (Dual K V)) + +abbrev PivotTape (pred : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (C : PivotContext K V) := FiniteNodeTape (pred C) (1000*(Nat.card K)^2) (Nat.card K) +abbrev PivotMessage (pred : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (C : PivotContext K V) (ω : PivotTape pred C) := + FiniteNodeMessage (pred C) C.2 (1000*(Nat.card K)^2) (Nat.card K) ω +noncomputable def pivotLeft (pred : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (C : PivotContext K V) (ω : PivotTape pred C) (m : PivotMessage pred C ω) : PivotContext K V := + (C.1∩(finiteNodeDecoded (pred C) C.2 (1000*(Nat.card K)^2) (Nat.card K) ω m).2,C.2) +noncomputable def pivotRight (pred : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (C : PivotContext K V) (ω : PivotTape pred C) (m : PivotMessage pred C ω) : PivotContext K V := + (C.1,C.2∩(finiteNodeDecoded (pred C) C.2 (1000*(Nat.card K)^2) (Nat.card K) ω m).1) + +omit [Finite K] [FiniteDimensional K V] in +lemma pivot_inheritance (pred : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (C : PivotContext K V) (ω : PivotTape pred C) (m : PivotMessage pred C ω) : + (pivotLeft pred C ω m).1⊆C.1 ∧ (pivotLeft pred C ω m).2=C.2 ∧ + (pivotRight pred C ω m).1=C.1 ∧ (pivotRight pred C ω m).2⊆C.2 := + ⟨Finset.inter_subset_left,rfl,rfl,Finset.inter_subset_left⟩ + +variable {ι : Type} + +abbrev PivotTreeTape (pred : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (b : BinaryTree ι) := TreeCodec.Tape (fun _ : ι=>PivotTape pred) b +abbrev PivotTreeMessage (pred : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (b : BinaryTree ι) (ω : PivotTreeTape pred b) (C : PivotContext K V) := + TreeCodec.Message (fun _ : ι=>PivotTape pred) (fun _ : ι=>PivotMessage pred) + (fun _ : ι=>pivotLeft pred) (fun _ : ι=>pivotRight pred) b ω C +noncomputable instance pivotTreeTapeFintype + (pred : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (b : BinaryTree ι) : Fintype (PivotTreeTape pred b) := by + letI : ∀(_ : ι) C,Fintype (PivotTape pred C) := fun _ _=>inferInstance + exact @TreeCodec.tapeFintype ι (PivotContext K V) inferInstance (fun _ : ι=>PivotTape pred) (fun _ _=>inferInstance) b +noncomputable instance pivotTreeMessageFintype + (pred : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (b : BinaryTree ι) (ω : PivotTreeTape pred b) (C : PivotContext K V) : + Fintype (PivotTreeMessage pred b ω C) := by + letI : ∀(_ : ι) C ω,Fintype (PivotMessage pred C ω) := fun _ _ _=>inferInstance + exact TreeCodec.messageFintype (fun _ : ι=>PivotTape pred) (fun _ : ι=>PivotMessage pred) + (fun _ : ι=>pivotLeft pred) (fun _ : ι=>pivotRight pred) b ω C +noncomputable def pivotTreeLaw (pred : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (b : BinaryTree ι) : Law (PivotTreeTape pred b) := by + letI : ∀(_ : ι) C,Fintype (PivotTape pred C) := fun _ _=>inferInstance + exact @TreeCodec.tapeLaw ι (PivotContext K V) inferInstance + (fun _ : ι=>PivotTape pred) (fun _ _=>inferInstance) + (fun _ C=>finiteNodeTapeLaw (pred C) (1000*(Nat.card K)^2) (Nat.card K)) b + +noncomputable def pivotTreeEncoded + (pred : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ : ι→Finset (ℙ K V)) (B₀ : ι→Finset (ℙ K (Dual K V))) + (hA₀ : ∀i,(A₀ i).Nonempty) (hB₀ : ∀i,(B₀ i).Nonempty) + (c δ τ P : ℝ) (hδ : 0<δ) (b : BinaryTree ι) (ω : PivotTreeTape pred b) + (C : PivotContext K V) : PivotTreeMessage pred b ω C := + TreeCodec.encoded (fun _ : ι=>PivotTape pred) (fun _ : ι=>PivotMessage pred) + (fun _ : ι=>pivotLeft pred) (fun _ : ι=>pivotRight pred) + (fun i C ω=>guardedNodeEncoded (pred C) σ hσ hq hd (A₀ i) C.1 (B₀ i) C.2 + (hA₀ i) (hB₀ i) c δ τ (((A₀ i∩C.1).card:ℝ)*Real.exp (10*P)) hδ ω) b ω C +noncomputable def pivotTreeRetained + (pred : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (b : BinaryTree ι) (ω : PivotTreeTape pred b) (C : PivotContext K V) + (m : PivotTreeMessage pred b ω C) : BinaryTree ι := + TreeCodec.retained (fun _ : ι=>PivotTape pred) (fun _ : ι=>PivotMessage pred) + (fun _ : ι=>pivotLeft pred) (fun _ : ι=>pivotRight pred) b ω C m + +omit [Finite K] [FiniteDimensional K V] in +lemma pivotTree_retained_nodes + (pred : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (b : BinaryTree ι) (ω : PivotTreeTape pred b) (C : PivotContext K V) + (m : PivotTreeMessage pred b ω C) : (pivotTreeRetained pred b ω C m).numNodes≤b.numNodes := + TreeCodec.retained_nodes_le _ _ _ _ b ω C m +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/CoreGeometry.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/CoreGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..c77ffb1c91761a40c3479d0a8db6ff5512191eef --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/CoreGeometry.lean @@ -0,0 +1,277 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.SubspacePointsEquiv +import OAI.Combinatorics.RamseyFive.Geometry.Failure + +namespace OAI + +namespace SharpRamseyFive.CoreGeometry + +section +open Module SharpRamseyFive.FiniteEntropy +open scoped LinearAlgebra.Projectivization BigOperators Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + +lemma rep_mem_iff (a : ℙ K V) (W : Submodule K V) : + a.rep∈W ↔ a.submodule≤W := by + rw [Projectivization.submodule_eq,Submodule.span_singleton_le_iff_mem] + +theorem subspace_mass_cap [Finite K] [Fintype (ℙ K V)] + (p : Law (ℙ K V)) (W : Submodule K V) (B : Finset (ℙ K V)) + (c δ ε : ℝ) (hc : 0≤c) + (hlight : ∀ a,a∉B → p a≤c) + (hbad : (∑ a∈B,p a)≤δ) + (hout : (∑ a,if a.rep∉W then p a else 0)≤ε) : + 1-ε-δ≤c*(∑ i∈Finset.range (finrank K W),(Nat.card K:ℝ)^i) := by + have hp (a : ℙ K V) : p a≤(if a.rep∈W then c else 0)+ + (if a.rep∉W then p a else 0)+(if a∈B then p a else 0) := by + by_cases hW : a.rep∈W <;> by_cases hB : a∈B <;> simp only [hW,hB, + not_true_eq_false,not_false_eq_true,ite_true,ite_false] + · linarith [p.nonneg a] + · simpa using hlight a hB + · linarith [p.nonneg a] + · simp + have hs := Finset.sum_le_sum (fun a (_ha : a∈(Finset.univ : Finset (ℙ K V))) => hp a) + rw [p.sum_one,Finset.sum_add_distrib,Finset.sum_add_distrib] at hs + have hb : (∑ a,if a∈B then p a else 0)=∑ a∈B,p a := by + rw [←Finset.sum_filter]; simp only [Finset.filter_univ_mem] + have hw : (∑ a : ℙ K V,if a.rep∈W then c else 0)= + c*(∑ i∈Finset.range (finrank K W),(Nat.card K:ℝ)^i) := by + have hn : (Finset.univ.filter fun a : ℙ K V => a.rep∈W).card= + ∑ i∈Finset.range (finrank K W),Nat.card K^i := by + rw [←Fintype.card_subtype,←Nat.card_eq_fintype_card] + rw [Nat.card_congr (Equiv.subtypeEquivRight fun a => rep_mem_iff a W)] + exact SharpRamseyFive.ProjectiveIncidence.card_subspacePoints W + rw [←Finset.sum_filter,Finset.sum_const, nsmul_eq_mul,hn,mul_comm] + norm_cast + rw [hb,hw] at hs + linarith + +lemma geometric_card_bound (q : ℝ) (hq : 2≤q) (r : ℕ) : + (∑ i∈Finset.range r,q^i)≤2*q^(r-1) := by + cases r with + | zero => simp + | succ r => + simp only [Nat.add_sub_cancel] + have h := geom_sum_mul q (r+1) + rw [pow_succ] at h + have hp : 0≤q^r := pow_nonneg (by linarith) _ + have hh : q*q^r≤2*q^r*(q-1) := by nlinarith + have hq' : 0 norm_num + · simp only [h.1,ite_true]; split_ifs <;> norm_num + · simp only [h,ite_false]; split_ifs <;> norm_num + calc + _ ≤ ∑ i,∑ j,((if InRectangle (U i) (x j).1 (x j).2 then (1:ℝ) else 0)+ + (if InRectangle (W j) (x i).1 (x i).2 then 1 else 0)) := + Finset.sum_le_sum fun i _ => Finset.sum_le_sum fun j _ => ht i j + _ = (∑ i,∑ j,if InRectangle (U i) (x j).1 (x j).2 then (1:ℝ) else 0)+ + ∑ j,∑ i,if InRectangle (W j) (x i).1 (x i).2 then 1 else 0 := by + simp only [Finset.sum_add_distrib] + congr 1 + exact Finset.sum_comm + _ ≤ (∑ _i : Fin n,M)+(∑ _j : Fin n,M) := add_le_add + (Finset.sum_le_sum fun i _ => hocc (U i)) (Finset.sum_le_sum fun j _ => hocc (W j)) + _ = _ := by simp; ring + +theorem expected_rectangle_charge {Ω : Type*} [Fintype Ω] (p : Law Ω) + (U W : Ω → Fin n → Submodule K (Module.Dual K V)) + (x : Ω → Fin n → V × Module.Dual K V) (M : ℝ) + (hocc : ∀ ω,0

ht ω + _ = _ := by rw [←Finset.sum_mul,p.sum_one,one_mul] +end SharpRamseyFive.CoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/Cores.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/Cores.lean new file mode 100644 index 0000000000000000000000000000000000000000..ee2be53e60416a23d8fbc936a73388697aef616e --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/Cores.lean @@ -0,0 +1,109 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.ReverseMiss +import OAI.Combinatorics.RamseyFive.Geometry.CoreGeometry + +namespace OAI + +namespace SharpRamseyFive.CoreGeometry +open Module SharpRamseyFive.FiniteEntropy SharpRamseyFive.LowConflict +open scoped BigOperators Classical +noncomputable section +variable {K V α β : Type*} [Field K] [AddCommGroup V] [Module K V] + [Fintype α] [Fintype β] + +def firstCore (p : Law (α × β)) (w : β → Module.Dual K V) (a : α) : + Submodule K (Module.Dual K V) := core (fiber p a) w (1/200) + +def secondCore (p : Law (α × β)) (v : α → V) (b : β) : Submodule K V := + core (fiber (swap p) b) v (1/200) + +lemma conditional_flag_annihilation (p : Law (α × β)) (v : α → V) + (w : β → Module.Dual K V) (hflag : ∀ a b, 0

H ≠ H' ∧ a ≤ + PoissonScore.mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H'))).card ≤ + (WeightedOverlap.neighbors x X (F.image fun b => LinearMap.ker b.rep) + (LinearMap.ker H.val.rep) δ a).card := by + let E := Finset.univ.filter (fun H' : F => H ≠ H' ∧ a ≤ + PoissonScore.mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H')) + let G := WeightedOverlap.neighbors x X (F.image fun b => LinearMap.ker b.rep) + (LinearMap.ker H.val.rep) δ a + let f (p : E) : G := ⟨LinearMap.ker p.val.val.rep,by + refine Finset.mem_filter.mpr ⟨Finset.mem_image.mpr ⟨_,p.val.property,rfl⟩,?_,?_⟩ + · intro h + exact (Finset.mem_filter.mp p.property).2.1 (Subtype.ext (kernel_injective h)) + · have hp := (Finset.mem_filter.mp p.property).2.2 + rwa [mass_pairPoints x X δ F hF] at hp⟩ + have hi : Function.Injective f := by + intro p q he + apply Subtype.ext + apply Subtype.ext + exact kernel_injective (congrArg (fun z : G => z.val) he) + simpa only [Fintype.card_coe] using Fintype.card_le_of_injective f hi + +variable [Finite K] + +theorem score_degree_four (hdim : finrank K V = 5) + (X : Finset {y : ℙ K V // x ≠ y}) (δ : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Module.Dual K V))) (hF : ∀ H ∈ F, Incident x H) + (H : F) (a : ℝ) (ha : 0≤a) : + ((Finset.univ.filter (fun H' : F => H ≠ H' ∧ a ≤ + PoissonScore.mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H'))).card:ℝ)*a^2 ≤ + 2*PoissonScore.mass (radialWeight x X δ) (pencilLines x F H)* + ((Nat.card K:ℝ)^2+Nat.card K+1)*a + + 2*(PoissonScore.mass (radialWeight x X δ) (pencilLines x F H))^2*((Nat.card K:ℝ)+1) := by + let G := F.image fun b => LinearMap.ker b.rep + have hdG (A) (hA : A ∈ G) : finrank K A = 4 := by + obtain ⟨b,_,rfl⟩ := Finset.mem_image.mp hA + have := Module.Dual.finrank_ker_add_one_of_ne_zero b.rep_nonzero + omega + have hxG (A) (hA : A ∈ G) : x.submodule ≤ A := by + obtain ⟨b,hb,rfl⟩ := Finset.mem_image.mp hA + exact hF b hb + have hdH : finrank K (LinearMap.ker H.val.rep) = 4 := by + have := Module.Dual.finrank_ker_add_one_of_ne_zero H.val.rep_nonzero + omega + have hc : ((Finset.univ.filter (fun H' : F => H ≠ H' ∧ a ≤ + PoissonScore.mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H'))).card:ℝ) ≤ + (WeightedOverlap.neighbors x X G (LinearMap.ker H.val.rep) δ a).card := by + exact_mod_cast degree_strength_count_le x X δ F hF H a + have hh := (mul_le_mul_of_nonneg_right hc (sq_nonneg a)).trans + (WeightedOverlap.degree_count_four x hdim X G hdG hxG _ hdH + (hF H.val H.property) (by exact_mod_cast hδ) ha) + have hm : PoissonScore.mass (radialWeight x X δ) (pencilLines x F H) = + (δ:ℝ)*(NondominantOverlap.onPlane x X (LinearMap.ker H.val.rep)).card := by + rw [mass_pencil x X δ F hF] + rfl + rw [hm] + nlinarith [hh] + +theorem score_degree_truncated (hdim : finrank K V = 5) + (X : Finset {y : ℙ K V // x ≠ y}) (δ : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Module.Dual K V))) (hF : ∀ H ∈ F, Incident x H) + (H : F) (a : ℝ) (ha : 0≤a) + (hline : ∀ l : RadialLine x, (radialWeight x X δ l:ℝ) < a/2) : + ((Finset.univ.filter (fun H' : F => H ≠ H' ∧ a ≤ + PoissonScore.mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H'))).card:ℝ)*a^2 ≤ + 2*(PoissonScore.mass (radialWeight x X δ) (pencilLines x F H))^2*((Nat.card K:ℝ)+1) := by + let G := F.image fun b => LinearMap.ker b.rep + have hdG (A) (hA : A ∈ G) : finrank K A = 4 := by + obtain ⟨b,_,rfl⟩ := Finset.mem_image.mp hA + have := Module.Dual.finrank_ker_add_one_of_ne_zero b.rep_nonzero + omega + have hxG (A) (hA : A ∈ G) : x.submodule ≤ A := by + obtain ⟨b,hb,rfl⟩ := Finset.mem_image.mp hA + exact hF b hb + have hdH : finrank K (LinearMap.ker H.val.rep) = 4 := by + have := Module.Dual.finrank_ker_add_one_of_ne_zero H.val.rep_nonzero + omega + have hc : ((Finset.univ.filter (fun H' : F => H ≠ H' ∧ a ≤ + PoissonScore.mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H'))).card:ℝ) ≤ + (WeightedOverlap.neighbors x X G (LinearMap.ker H.val.rep) δ a).card := by + exact_mod_cast degree_strength_count_le x X δ F hF H a + have hh := (mul_le_mul_of_nonneg_right hc (sq_nonneg a)).trans + (WeightedOverlap.nondominant_weighted_degree x hdim X G hdG hxG _ hdH + (hF H.val H.property) (by exact_mod_cast hδ) ha (by + intro l + simpa only [radialWeight,NNReal.coe_mul,NNReal.coe_natCast] using hline l)) + have hm : PoissonScore.mass (radialWeight x X δ) (pencilLines x F H) = + (δ:ℝ)*(NondominantOverlap.onPlane x X (LinearMap.ker H.val.rep)).card := by + rw [mass_pencil x X δ F hF] + rfl + rw [hm] + nlinarith [hh] + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourHighIntegrals.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourHighIntegrals.lean new file mode 100644 index 0000000000000000000000000000000000000000..91890020b9c835654131370c094c0c0a3186cc7d --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourHighIntegrals.lean @@ -0,0 +1,293 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Probability.DimensionFourLowIntegrals +import OAI.Combinatorics.RamseyFive.Geometry.HighPeelExceptions +import OAI.Combinatorics.RamseyFive.Geometry.UniformHighTail + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_four_high_score_integrals {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b₀ τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ {A : Type} [Fintype A] (g : ℝ) (F : Finset J) (hF : F.Nonempty) + (Flat : J→Submodule K (I→K)) (H : Finset J) (hH : H.Nonempty) + (Hyper : J→Submodule K (I→K)) (X XH U S : Finset (ℙ K (I→K))) + (t₀ : ℝ) (ht₀ : 0flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) → + t₀=(Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5) → + S=peelSet (P η σ D R/10000flatPoints (Flat j)) XH ⌈t₀⌉₊ (Nat.ceil_pos.mpr ht₀) → + Real.exp (2*σ+g)/4≤S.card → + (∀x,ownCell F hF (fun j=>flatPoints (Flat j)) XH + (peelLength (P η σ D R/10000flatPoints (Flat j)) XH ⌈t₀⌉₊ (Nat.ceil_pos.mpr ht₀)) x⊆rawOwn x) → + (∀x,ownCell H hH (fun j=>flatPoints (Hyper j)) X + (peelLength (P η σ D R/10000flatPoints (Hyper j)) X ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _)) x⊆rawOwn x) → + (∀x,S∩rawOwn x=C (ia x)∪C (ib x)) → + (∑j,(C j).card)≤3*S.card → (∀j,C j⊆S) → + (∀x,C (ic x)=C (ia x)∩C (ib x)) → + (Nat.card K:ℝ)/S.card≤1/100 → (∀x,ownFraction S (C (ia x)) (C (ib x))≤2/25) → + let μ := scheduleMeasure (fun _ : S => L₀*pointStrength S) R + let O := fun x => C (ia x)∪C (ib x) + let ctr := fun x => Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x)))) + let t := scale (K:=K) 4 S.card*Real.exp (-(b₀+8*P η σ D R*τ+Real.log 16))/10 + (∫ω,((typicalFailures S S O (exceptional S C) ctr t ω).card:ℝ) ∂μ)≤ + (S.card:ℝ)*Real.exp (-(L₀:ℝ)/1000) ∧ + (∫ω,((typicalFailures U S O (exceptional S C) ctr t ω).card:ℝ) ∂μ)≤ + (S.card:ℝ)*Real.exp (8*P η σ D R) := by + have ht := eventually_validation_original_tail hη hη' Cb hCb + have hu := eventually_high_original_tail_retained hη hη' Cb hCb + have he := eventually_high_peel_exceptions hη hη' + have heS := eventually_literal_plane_half_exceptions hη hη' + have htr := eventually_literal_plane_global_trunc hη hη' + have hm := eventually_score_margins hη hη' Cb hCb + have hl := eventually_hierarchy hη hη' Cb 1 10000000000 hCb (by norm_num) + have hc := eventually_power_absorption hη hη' (34359738369*2^200) 0 (1/200) (by positivity) (by norm_num) (by norm_num) + have hc' := eventually_power_absorption hη hη' 33554432 0 (1/10000) (by norm_num) (by norm_num) (by norm_num) + have hd := eventually_dyad_power_payment hη hη' + filter_upwards [eventually_ge_atTop (1000:ℝ),ht,hu,he,heS,htr,hm,hl,hc,hc',hd] with σ hσ ht hu he heS htr hm hl hc hc' hd + intro D b₀ τ R L₀ q K I J _ _ _ _ _ _ _ _ A _ g F hF Flat H hH Hyper X XH U S t₀ ht₀ rawOwn C ia ib ic + hq hcard hσq hI hr hL hb₀ hbhi hτ hg hg' hFlat hcover hHyper hHcover hnX hori hXH htc hpeel hquarter hraw hrawH hOwn hC hCS hCc hdiv hf + dsimp only + let μ := scheduleMeasure (fun _ : S => L₀*pointStrength S) R + let O := fun x => C (ia x)∪C (ib x) + let O' := fun x => S∩rawOwn x + let ctr := fun x => Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x)))) + let t := scale (K:=K) 4 S.card*Real.exp (-(b₀+8*P η σ D R*τ+Real.log 16))/10 + let Lines := radialInventory (K:=K) (V:=I→K) + let Planes := F.image Flat + let reg := irregular (d:=4) S C ((L₀:ℝ)/100) + let rad := radialExceptions S O' (pointStrength S) Lines Finset.univ q X.card (P η σ D R/200) + let pair := hyperplanePeelExceptions H hH Hyper X XH S Planes + (peelLength (P η σ D R/10000flatPoints (Hyper j)) X ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _)) + (pointStrength S) (P η σ D R/200) Finset.univ + let strong := ambientHalfStrongExceptions σ (P η σ D R) S O' Lines Finset.univ + let bad := reg∪(rad∪pair) + let E : ℙ K (I→K)→Set (Fin R→S→ℕ) := fun x => + {ω | Unsampled x S ω ∧ t < |pointScore S (O x) (pencil x\exceptional S C) (ctr x) ω|} + let loss (x : ℙ K (I→K)) : ℝ := ∫ω,1-HighMoment.allTrunc R 5000 ω + ∂batchMeasure (fun p : Fin R×RadialLine x => L₀*radialWeight x (outsideAt x S (O x)) (pointStrength S) p.2) + have hSn0 : (0:ℝ)flatPoints (Hyper j)) X _ _ + have hSH : S⊆XH := hpeel▸peel_subset _ F hF (fun j=>flatPoints (Flat j)) XH _ _ + have hSX : (S.card:ℝ)≤X.card := Nat.cast_le.mpr (Finset.card_le_card (hSH.trans hHX)) + have hXHn : (XH.card:ℝ)≤Real.exp (2*σ+g) := by rw [←hnX];exact Nat.cast_le.mpr (Finset.card_le_card hHX) + have hn : (S.card:ℝ)≤10*Real.exp (5*σ/2) := hSX.trans hori + have hcap : (X.card:ℝ)≤(Nat.card K:ℝ)^3 := by + have hx : (10:ℝ)≤Real.exp (σ/2) := by linarith only [Real.add_one_le_exp (σ/2),hσ] + calc + _≤10*Real.exp (5*σ/2) := hori + _≤Real.exp (σ/2)*Real.exp (5*σ/2) := mul_le_mul_of_nonneg_right hx (Real.exp_nonneg _) + _=_ := by rw [hqσ,←Real.exp_nat_mul,←Real.exp_add];congr 1;norm_num;ring + have hSn : (S.card:ℝ)≤Real.exp (3*σ) := by + have hh := hSX.trans hcap + simpa only [hqσ,←Real.exp_nat_mul,Nat.cast_ofNat] using hh + have hP0 : 0≤P η σ D R := by unfold P;rw [←hL];positivity + have heq : 3*σ/2+(g+σ/2)=2*σ+g := by ring + have hPlanes : ∀V∈Planes,finrank K V=3 := by + intro V hV;obtain ⟨j,hj,rfl⟩:=Finset.mem_image.mp hV;exact hFlat j hj + have hPlanesAll : ∀V : Submodule K (I→K),finrank K V=3 → V∈Planes := by + intro V hV;obtain ⟨j,hj,rfl⟩:=hcover V hV;exact Finset.mem_image.mpr ⟨j,hj,rfl⟩ + have he := he D R hr q K I J g F hF Flat H hH Hyper X XH S t₀ ht₀ rawOwn Lines Planes Finset.univ + hq hcard hσq hI hg hg' hFlat hcover hHyper hHcover hPlanes hnX hori hXH htc hpeel hquarter + hraw radialInventory_rank + have hradpair : ((rad∪pair).card:ℝ)≤(S.card:ℝ)*Real.exp (-(L₀:ℝ)/1000)/2 := by simpa only [hL] using he + have heS := heS D R hr q K I J (g+σ/2) F hF Flat XH S t₀ ht₀ rawOwn Lines Finset.univ + hq hcard hσq (Or.inr hI) (by linarith only [hg',hσ]) hFlat hcover (by rwa [heq]) (by rwa [heq]) hpeel (by rwa [heq]) hSn hraw radialInventory_rank + have hstrong : (strong.card:ℝ)≤(S.card:ℝ)*Real.exp (7*P η σ D R) := heS.2 + have hhigh' : 8388608*(Nat.card K:ℝ)^2≤S.card := by + have hc : (33554432:ℝ)≤Real.exp (P η σ D R/10000) := by + simpa only [Real.rpow_zero,mul_one,one_div,one_mul,mul_comm (10000⁻¹:ℝ),div_eq_mul_inv] using hc' D R hr + have hc := hc.trans (Real.exp_le_exp.mpr hg.le) + have hne : Real.exp (2*σ+g)=(Nat.card K:ℝ)^2*Real.exp g := by + rw [hqσ,←Real.exp_nat_mul,←Real.exp_add];norm_num + have hquarter' := hquarter + rw [hne] at hquarter' + nlinarith only [mul_le_mul_of_nonneg_right hc (sq_nonneg (Nat.card K:ℝ)),hquarter'] + have hq2S : (q:ℝ)^2≤S.card := by + rw [←hcard] + exact (by nlinarith only [sq_nonneg (Nat.card K:ℝ)] : (Nat.card K:ℝ)^2≤8388608*(Nat.card K:ℝ)^2).trans hhigh' + have htr := htr D R L₀ hr hL q K I J g F hF Flat XH S t₀ ht₀ rawOwn Lines U + hq hcard hσq hI hg.le hg' hFlat hcover hXHn htc hpeel hquarter hq2S hraw radialInventory_rank (fun x _=>mem_radialInventory x) + have hloss : (∑x∈U,loss x)≤Real.exp (2*σ) := by + rw [←Finset.sum_coe_sort U] + simpa only [loss,O,hOwn] using htr + have hloss0 (x : ℙ K (I→K)) : 0≤loss x := by + apply integral_nonneg + intro ω + exact sub_nonneg.mpr ((HighMoment.allTrunc_range R 5000 ω).2) + have hlarge : 10000000000≤(L₀:ℝ) := by rw [hL];exact (hl D R b₀ τ hr hbhi hτ).1 + have hLP : 100*(L₀:ℝ)≤P η σ D R := by rw [hL];exact (hm D b₀ τ R hr hb₀ hbhi hτ).2.2.2.1 + have hRetained : (Nat.card K:ℝ)^2*Real.exp (P η σ D R/20000)≤S.card := by + have hc : (4:ℝ)≤Real.exp (P η σ D R/20000) := by + linarith only [Real.add_one_le_exp (P η σ D R/20000),hLP,hlarge] + have he : Real.exp (P η σ D R/20000)*4≤Real.exp g := by + calc + _≤Real.exp (P η σ D R/20000)*Real.exp (P η σ D R/20000) := mul_le_mul_of_nonneg_left hc (Real.exp_nonneg _) + _=Real.exp (P η σ D R/10000) := by rw [←Real.exp_add];congr 1;ring + _≤Real.exp g := Real.exp_le_exp.mpr hg.le + have hne : Real.exp (2*σ+g)=(Nat.card K:ℝ)^2*Real.exp g := by + rw [hqσ,←Real.exp_nat_mul,←Real.exp_add];norm_num + have hr := hquarter + rw [hne] at hr + nlinarith only [mul_le_mul_of_nonneg_left he (sq_nonneg (Nat.card K:ℝ)),hr] + have hreg := irregular_card_bound (d:=4) hdim (by norm_num) S C hS hC + (ξ:=(L₀:ℝ)/100) (by linarith only [Real.add_one_le_exp ((L₀:ℝ)/100),hlarge]) + have hbad : (bad.card:ℝ)≤200000*(S.card:ℝ)*Real.exp (-2*((L₀:ℝ)/100))+ + (S.card:ℝ)*Real.exp (-(L₀:ℝ)/1000)/2 := by + exact (Nat.cast_le.mpr (Finset.card_union_le reg (rad∪pair)) |>.trans (by norm_cast)).trans (add_le_add hreg hradpair) + have hpay : (bad.card:ℝ)+S.card*Real.exp (-P η σ D R/2)≤(S.card:ℝ)*Real.exp (-(L₀:ℝ)/1000) := by + have hh := mul_le_mul_of_nonneg_left (ScoreScalars.regular_training_payment_half hlarge hLP) hSn0.le + nlinarith only [hh,hbad] + have hbelow (x : ℙ K (I→K)) (H : ℙ K (Dual K (I→K))) (hH : H∈pencil x\exceptional S C) : + Incident x H ∧ H∉exceptional S C := by + have hh := Finset.mem_sdiff.mp hH + exact ⟨(Finset.mem_filter.mp hh.1).2,hh.2⟩ + have hgood (x : ℙ K (I→K)) (hx : x∉bad) : x∉reg ∧ x∉rad ∧ x∉pair := by + simp only [bad,Finset.mem_union,not_or] at hx + exact hx + have hout (x : ℙ K (I→K)) : outsideAt x S (rawOwn x)=outsideAt x S (O x) := by + rw [←outsideAt_clip,hOwn x] + have hscale : (X.card:ℝ)*(pointStrength (K:=K) S:ℝ)≤4*Nat.card K := by + rw [coe_pointStrength,←mul_div_assoc] + apply (div_le_iff₀ hSn0).mpr + rw [hnX] + nlinarith only [mul_le_mul_of_nonneg_right hquarter (Nat.cast_nonneg (Nat.card K) : (0:ℝ)≤Nat.card K)] + have hχ : (34359738369*2^200:ℝ)≤Real.exp (P η σ D R/200) := by + simpa only [Real.rpow_zero,mul_one,one_div,one_mul,mul_comm (200⁻¹:ℝ),div_eq_mul_inv] using hc D R hr + have hmoment (x : ℙ K (I→K)) (hx : x∉bad) : + (∑z : DistinctPairs ↥(pencil x\exceptional S C),strength (pencilLines x (pencil x\exceptional S C)) + (radialWeight x (outsideAt x S (O x)) (pointStrength S)) z^200)≤ + dyadFactor (outsideAt x S (O x)).card (P η σ D R/200)*(geometryScale (Nat.card K) S.card)^2 := by + have hmarg (V : ↥(pencil x\exceptional S C)) : + mass (radialWeight x (outsideAt x S (rawOwn x)) (pointStrength S)) + (pencilLines x (pencil x\exceptional S C) V)≤2 := by + rw [hout x] + exact (actual_radial_mass_bounds x S C hS (ia x) (ib x) (ic x) (hCS _) (hCS _) (hCc x) + (pencil x\exceptional S C) (hbelow x) (hf x) hdiv V).2.2.trans (by norm_num) + have hgoodrad : x∉radialExceptions S rawOwn (pointStrength S) Lines Finset.univ (Nat.card K) X.card (P η σ D R/200) := by + simpa only [rad,hcard,radialExceptions_clip,O'] using (hgood x hx).2.1 + have hh := literal_hyperplane_pair_moment hdim H hH Hyper X XH S rawOwn Planes hPlanes hPlanesAll + (P η σ D R/10000(hbelow x V hV).1) (P η σ D R/200) hχ hcap hscale hhigh' Lines (mem_radialInventory x) + Finset.univ (Finset.mem_univ _) hmarg hgoodrad (hgood x hx).2.2 + simpa only [hout x] using hh + have htraining (x : ℙ K (I→K)) (hx : x∉bad) : μ.real (E x)≤Real.exp (-P η σ D R/2) := by + have hpx := hmoment x hx + have hcard : ((outsideAt x S (O x)).card:ℝ)≤Real.exp (3*σ) := + (Nat.cast_le.mpr (outsideAt_card_le x S (O x))).trans hSn + have hpay := hd D R (P η σ D R/200) (outsideAt x S (O x)).card hr (le_refl _) hcard + have hpx' : (∑z : DistinctPairs ↥(pencil x\exceptional S C),strength (pencilLines x (pencil x\exceptional S C)) + (radialWeight x (outsideAt x S (O x)) (pointStrength S)) z^200)≤ + (scale (K:=K) 4 S.card)^2*Real.exp (P η σ D R/50) := by + apply hpx.trans + simpa only [dyadFactor,geometryScale,scale,mul_comm] using + mul_le_mul_of_nonneg_right hpay (sq_nonneg ((Nat.card K:ℝ)^4/S.card)) + have hpairs (u : ℝ) (hu : 0hx (Finset.mem_union_left _ h),fun h=>hx (Finset.mem_union_right _ h)⟩ + have hrad : x∉radialExceptions S O' (pointStrength S) Lines Finset.univ (Nat.card K) S.card (P η σ D R/100) := by + intro hx + apply (hgood x hh.1).2.1 + have hx := radialExceptions_chi_mono S O' (pointStrength S) Lines Finset.univ (Nat.card K) S.card + (P η σ D R/200) (P η σ D R/100) (by linarith only [hP0]) hx + have hx := radialExceptions_normalization S O' (pointStrength S) Lines Finset.univ (Nat.card K) + (P η σ D R/200) S.card X.card hSn0 hSX hx + simpa only [hcard] using hx + apply hu D b₀ τ R L₀ K (I→K) x S C (ia x) (ib x) (ic x) (pencil x\exceptional S C) t + hdim hqσ hr hL hb₀ hbhi hτ hS (hCS _) (hCS _) (hCc x) hn hRetained hdiv (hf x) (hbelow x) + (hgood x hh.1).1 Lines Finset.univ (mem_radialInventory x) (Finset.mem_univ _) _ _ _ (le_refl _) + · intro i hi hxi + have hnot := off_radialExceptions S O' (pointStrength S) Lines Finset.univ (Nat.card K) S.card (P η σ D R/100) x hrad i + (by simpa only [O',hOwn x] using hi) + exact hnot ((mem_badCenters_own_congr S O' (fun _=>C (ia x)∪C (ib x)) _ _ Lines Finset.univ _ x (hOwn x)).mpr hxi) + · apply (hmoment x hh.1).trans + apply mul_le_mul_of_nonneg_right _ (sq_nonneg _) + unfold dyadFactor + apply mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by linarith only [hP0])) (by positivity) + · have hs := off_ambientHalfStrongExceptions σ (P η σ D R) S O' Lines Finset.univ x hh.2 + have hnot := hs.resolve_right (by + intro hs + have hq0 : (0:ℝ)C (ia x)∪C (ib x)) _ _ Lines Finset.univ _ x (hOwn x)).mpr hx) + constructor + · have hh := integral_filter_card_le μ S bad E (Real.exp_nonneg _) (fun x hx => htraining x (Finset.mem_sdiff.mp hx).2) + change (∫ω,((S.filter fun x=>ω∈E x).card:ℝ) ∂μ)≤_ + refine le_trans ?_ hpay + convert hh using 1; try rfl + apply integral_congr_ae + filter_upwards with ω + congr 2 + ext x + simp only [Finset.mem_filter] + · have hh := expected_failureCount_le μ U (bad∪strong) (fun x ω=>ω∈E x) loss (Real.rpow_nonneg (Nat.cast_nonneg _) _) + (fun x _=>hloss0 x) (fun x hx=>by simpa only [Set.ofPred_mem_eq] using hambient x (Finset.mem_sdiff.mp hx).2) + change (∫ω,((U.filter fun x=>ω∈E x).card:ℝ) ∂μ)≤_ + refine le_trans (b:=((bad∪strong).card:ℝ)+U.card*(Nat.card K:ℝ)^(-(50:ℝ))+∑x∈U,loss x) ?_ ?_ + · convert hh using 1; try rfl + apply integral_congr_ae + filter_upwards with ω + unfold failureCount + congr 2 + ext x + simp only [Finset.mem_filter] + have hU : (U.card:ℝ)≤2*Real.exp (4*σ) := by + have hh := (Finset.card_le_univ U).trans (projective_card_le_two_pow hdim (by rw [hcard];omega)) + have hh : (U.card:ℝ)≤2*(Nat.card K:ℝ)^4 := by exact_mod_cast hh + simpa only [hqσ,←Real.exp_nat_mul,Nat.cast_ofNat] using hh + have hu : (U.card:ℝ)*(Nat.card K:ℝ)^(-(50:ℝ))≤1/2 := by + rw [hqσ] + exact (mul_le_mul_of_nonneg_right hU (by positivity)).trans (ScoreScalars.ambient_four_payment (by linarith only [hσ])) + have hbadn : (bad.card:ℝ)≤S.card := by + have hexp : Real.exp (-(L₀:ℝ)/1000)≤1 := Real.exp_le_one_iff.mpr (div_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr L₀.coe_nonneg) (by norm_num)) + have htpos : 0≤(S.card:ℝ)*Real.exp (-P η σ D R/2) := mul_nonneg (Nat.cast_nonneg _) (Real.exp_nonneg _) + have hb : (bad.card:ℝ)≤(S.card:ℝ)*Real.exp (-(L₀:ℝ)/1000) := by linarith only [hpay,htpos] + exact hb.trans (mul_le_of_le_one_right hSn0.le hexp) + have hPexp : (4:ℝ)≤Real.exp (P η σ D R) := by linarith only [Real.add_one_le_exp (P η σ D R),hLP,hlarge] + have hexp7 : (1:ℝ)≤Real.exp (7*P η σ D R) := Real.one_le_exp (mul_nonneg (by norm_num) hP0) + have hbadall : ((bad∪strong).card:ℝ)≤(S.card:ℝ)+(S.card:ℝ)*Real.exp (7*P η σ D R) := by + have hc : ((bad∪strong).card:ℝ)≤(bad.card:ℝ)+strong.card := by exact_mod_cast Finset.card_union_le bad strong + exact hc.trans (add_le_add hbadn hstrong) + have hlossn : (∑x∈U,loss x)≤S.card := by + apply hloss.trans + rw [←show (q:ℝ)^2=Real.exp (2*σ) by rw [←hσq,←Real.exp_nat_mul];norm_num] + exact hq2S + calc + _≤(S.card:ℝ)+(S.card:ℝ)*Real.exp (7*P η σ D R)+1/2+(S.card:ℝ) := add_le_add (add_le_add hbadall hu) hlossn + _≤4*(S.card:ℝ)*Real.exp (7*P η σ D R) := by + nlinarith only [mul_le_mul_of_nonneg_left hexp7 hSn0.le,hn1] + _≤Real.exp (P η σ D R)*(S.card:ℝ)*Real.exp (7*P η σ D R) := + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hPexp (Nat.cast_nonneg _)) (Real.exp_nonneg _) + _=_ := by rw [mul_assoc,mul_left_comm (Real.exp _),←Real.exp_add];congr 2;ring +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourHighLaw.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourHighLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..81185c27f74c7523138759c1e6fb42e291ca29fa --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourHighLaw.lean @@ -0,0 +1,246 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.ThreeOriented +import OAI.Combinatorics.RamseyFive.Geometry.DimensionFourHighPublic + +namespace OAI + + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy TrainingCells MeasurePublicTable Metadata +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_four_high_public_law {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ g : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (I→K)] [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K (I→K)) + (H : Finset J) (hH : H.Nonempty) (Hyper : J→Submodule K (I→K)) + (X U : Finset (ℙ K (I→K))) (T : Finset (ℙ K (Dual K (I→K)))), + Nat.card K=q → Real.exp σ=q → Fintype.card I=5 → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → X⊆U → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(X.card:ℝ)*T.card → + (X.card:ℝ)=Real.exp (2*σ+g) → + 100*(Nat.card K:ℝ)*P η σ D R<(X.card:ℝ) → P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let h := peelLength (P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let t := (Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5) + let ht : 0flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let p := peelLength (P η σ D R/10000flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let CH := clippedPart S H hH (fun j=>flatPoints (Hyper j)) X h + let CP := clippedPart S F hF (fun j=>flatPoints (Flat j)) XH p + (∀i,(CH i).card≤(S.card:ℝ)/25) → (∀j,(CP j).card≤(S.card:ℝ)/25) → + let N := scoreCutoff S U (P η σ D R) τ + Real.log (Nat.card (TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K))))≤q ∧ + Real.log N≤Real.log (2*(Nat.card K:ℝ))+scoreSearchCost S U (P η σ D R) τ ∧ + ∃c : TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K)), + let n : Fin (Fintype.card (ℙ K (I→K))+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + let p₀ := scoredCaptureLaw X U n (messageOwn c) (messageBase c L₀) + (P η σ D R) τ (9/40) 10 R L₀ + p₀ none≤Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let h := peelLength (P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let t := (Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5) + have ht : 0flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let p := peelLength (P η σ D R/10000flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let CH := clippedPart S H hH (fun j=>flatPoints (Hyper j)) X h + let CP := clippedPart S F hF (fun j=>flatPoints (Flat j)) XH p + change (∀i,(CH i).card≤(S.card:ℝ)/25) → (∀j,(CP j).card≤(S.card:ℝ)/25) → _ + intro hsmallH hsmallP + obtain ⟨hcost,hN,c,E,hE,hd⟩ := hh D b τ g R L₀ q K I J F hF Flat H hH Hyper X U T hcard hσq hI hr hL hb hbhi hτ hτhi hXU hXT hdens hprod hX hn hg hFlat hcover hHyper hHcover hsmallH hsmallP + let n : Fin (Fintype.card (ℙ K (I→K))+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + have hf := scoredCaptureLaw_failure X U n (messageOwn c) (messageBase c L₀) + (P η σ D R) τ (9/40) 10 R L₀ E (Real.exp (-(Nat.card K:ℝ))) hE hd + have hg := scoredCaptureLaw_positive X U n (messageOwn c) (messageBase c L₀) + (P η σ D R) τ (9/40) 10 R L₀ + exact ⟨hcost,hN,c,hf,hg⟩ + +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy MeasurePublicTable Metadata FiniteEntropy ProjectiveRestriction +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology +variable {K I J : Type*} [Field K] [Finite K] [Fintype I] [LinearOrder J] + [Fintype (I→K)] [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + +abbrev FourBranch (σ : ℝ) (F H : Finset J) := + Unit ⊕ ((Bool × Fin (Fintype.card (ℙ K (I→K))+1) × + TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K))) ⊕ + (({a : J // a∈F} × Fin (Nat.log 2 ((Nat.card K)^2)+1)) ⊕ + ({a : J // a∈H} × Fin (Nat.log 2 (Nat.card K)+1)))) + +noncomputable def fourBranchLaw (σ : ℝ) (F H : Finset J) + (Flat Hyper : J→Submodule K (I→K)) + (X U : Finset (ℙ K (I→K))) (T UT : Finset (ℙ K (Dual K (I→K)))) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) (br : FourBranch (K:=K) (I:=I) σ F H) : + Law (Option (Finset (ℙ K (I→K)))) := + match br with + | .inl _ => baseCaptureLaw X U P τ R L₀ + | .inr (.inl c) => scoredCaptureLaw X U c.2.1 (messageOwn c.2.2) (messageBase c.2.2 L₀) + P τ (if c.1 then 9/20 else 9/40) 10 R L₀ + | .inr (.inr (.inl a)) => planeAutoLaw (Flat a.1.1) X U T UT τ P R L₀ a.2 + | .inr (.inr (.inr a)) => if hA : finrank K (Hyper a.1.1)=4 then + threeFlatBranchLaw (Hyper a.1.1) hA σ X U T UT τ P R L₀ a.2 else pureLaw none + +theorem eventually_four_branch {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (I→K)] [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (F : Finset J) (_ : F.Nonempty) (Flat : J→Submodule K (I→K)) + (H : Finset J) (_ : H.Nonempty) (Hyper : J→Submodule K (I→K)) + (X U : Finset (ℙ K (I→K))) (T UT : Finset (ℙ K (Dual K (I→K)))), + Nat.card K=q → Real.exp σ=q → Fintype.card I=5 → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-800*beta η) → X⊆U → T⊆UT → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(X.card:ℝ)*T.card → + (∀j∈F,finrank K (Flat j)=3) → + (∀V : Submodule K (I→K),finrank K V=3 → ∃j∈F,Flat j=V) → + (∀j∈H,finrank K (Hyper j)=4) → + (∀V : Submodule K (I→K),finrank K V=4 → ∃j∈H,Hyper j=V) → + ∃br : FourBranch (K:=K) (I:=I) σ F H, + let p := fourBranchLaw σ F H Flat Hyper X U T UT (P η σ D R) τ R L₀ br + p none≤3*Real.exp (-(Nat.card K:ℝ)) ∧ + ∀W,0

flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + by_cases hsmall : ∀i,(C i).card≤(S.card:ℝ)/25 + · obtain ⟨_,_,c,hf,hg⟩ := hlow D b τ g R L₀ q K I J F hF Flat X U T + hcard hσq hI hr hL hb hbhi hτ hτ200 hXU hXT hdens hprod hXexp (lt_of_not_ge hn) hLow hFlat hcover hsmall + let n : Fin (Fintype.card (ℙ K (I→K))+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + refine ⟨.inr (.inl (true,n,c)),?_,?_⟩ + · exact hf.trans (by nlinarith only [Real.exp_pos (-(Nat.card K:ℝ))]) + · intro W hW + obtain ⟨hWU,hsize,hcap⟩ := hg W hW + exact ⟨hWU,hsize,(mul_le_mul_of_nonneg_right (by norm_num : (9/100000:ℝ)≤9/20) (Nat.cast_nonneg _)).trans hcap⟩ + · have hSX : S⊆X := peel_subset _ F hF _ X _ _ + have hret' : X.card≤2*S.card := peel_half _ F hF _ X _ _ + have hret : X.card≤4*S.card := by omega + obtain ⟨a,ha,hlarge⟩ := large_clipped_part X S X hSX hret F hF (fun j=>flatPoints (Flat j)) m hsmall + exact plane_branch a ha hlarge + · let g := Real.log (X.card:ℝ)-2*σ + have hXexp : (X.card:ℝ)=Real.exp (2*σ+g) := by + dsimp only [g] + rw [show 2*σ+(Real.log (X.card:ℝ)-2*σ)=Real.log (X.card:ℝ) by ring,Real.exp_log (by exact_mod_cast hX.card_pos)] + have hg : P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let h := peelLength (P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let t := (Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5) + have ht : 0flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let p := peelLength (P η σ D R/10000flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let CH := clippedPart S H hH (fun j=>flatPoints (Hyper j)) X h + let CP := clippedPart S F hF (fun j=>flatPoints (Flat j)) XH p + have hSXH : S⊆XH := peel_subset _ F hF _ XH _ _ + have hXHX : XH⊆X := peel_subset _ H hH _ X _ _ + have hSX : S⊆X := hSXH.trans hXHX + have hret : X.card≤4*S.card := by + have h1 : X.card≤2*XH.card := peel_half _ H hH _ X _ _ + have h2 : XH.card≤2*S.card := peel_half _ F hF _ XH _ _ + omega + by_cases hsmallH : ∀i,(CH i).card≤(S.card:ℝ)/25 + · by_cases hsmallP : ∀i,(CP i).card≤(S.card:ℝ)/25 + · obtain ⟨_,_,c,hf,hgood⟩ := hhigh D b τ g R L₀ q K I J F hF Flat H hH Hyper X U T + hcard hσq hI hr hL hb hbhi hτ hτ200 hXU hXT hdens hprod hXexp (lt_of_not_ge hn) hg hFlat hcover hHyper hHcover hsmallH hsmallP + let n : Fin (Fintype.card (ℙ K (I→K))+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + refine ⟨.inr (.inl (false,n,c)),?_,?_⟩ + · exact hf.trans (by nlinarith only [Real.exp_pos (-(Nat.card K:ℝ))]) + · intro W hW + obtain ⟨hWU,hsize,hcap⟩ := hgood W hW + exact ⟨hWU,hsize,(mul_le_mul_of_nonneg_right (by norm_num : (9/100000:ℝ)≤9/40) (Nat.cast_nonneg _)).trans hcap⟩ + · obtain ⟨a,ha,hlarge⟩ := large_clipped_part X S XH hSX hret F hF (fun j=>flatPoints (Flat j)) p hsmallP + exact plane_branch a ha hlarge + · obtain ⟨a,ha,hlarge⟩ := large_clipped_part X S X hSX hret H hH (fun j=>flatPoints (Hyper j)) h hsmallH + obtain ⟨k,hk,hf,hgood⟩ := hthree D b τ R L₀ q K (I→K) (Hyper a) (hHyper a ha) X U T UT + (by omega) hcard hσq hr hL hb hbhi hτ hτhi hX hT hXU hTU hdens (by simpa only [hd] using hprod) hlarge + have hk' : k≤Nat.log 2 (Nat.card K) := by simpa only [hd,hHyper a ha,Nat.reduceSub,pow_one] using hk + refine ⟨.inr (.inr (.inr (⟨a,ha⟩,⟨k,Nat.lt_succ_of_le hk'⟩))),?_⟩ + dsimp only [fourBranchLaw] + rw [dite_eq_left (hHyper a ha)] + exact ⟨hf,hgood⟩ +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourHighProtocol.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourHighProtocol.lean new file mode 100644 index 0000000000000000000000000000000000000000..04b06429050cf9eeeddb1d6950f562c2591cfe27 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourHighProtocol.lean @@ -0,0 +1,311 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.FiniteFamily + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy TrainingCells MeasurePublicTable Metadata FiniteEntropy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_four_high_protocol {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ g : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (I→K)] [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K (I→K)) + (H : Finset J) (hH : H.Nonempty) (Hyper : J→Submodule K (I→K)) + (X U : Finset (ℙ K (I→K))) (T : Finset (ℙ K (Dual K (I→K)))), + Nat.card K=q → Real.exp σ=q → Fintype.card I=5 → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → X⊆U → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(X.card:ℝ)*T.card → + (X.card:ℝ)=Real.exp (2*σ+g) → + 100*(Nat.card K:ℝ)*P η σ D R<(X.card:ℝ) → P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let h := peelLength (P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let t := (Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5) + let ht : 0flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let p := peelLength (P η σ D R/10000flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let CH := clippedPart S H hH (fun j=>flatPoints (Hyper j)) X h + let CP := clippedPart S F hF (fun j=>flatPoints (Flat j)) XH p + let _hyperQueries := queryPart H hH (fun j=>flatPoints (Hyper j)) X h + let _flatQueries := queryPart F hF (fun j=>flatPoints (Flat j)) XH p + (∀i,(CH i).card≤(S.card:ℝ)/25) → (∀j,(CP j).card≤(S.card:ℝ)/25) → + let N := scoreCutoff S U (P η σ D R) τ + Real.log (Nat.card (TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K))))≤q ∧ + Real.log N≤Real.log (2*(Nat.card K:ℝ))+scoreSearchCost S U (P η σ D R) τ ∧ + Real.log (Fintype.card (ℙ K (I→K))+1:ℝ)+ + Real.log (Fintype.card (ScoredPayload U S.card σ (P η σ D R) τ):ℝ)≤ + 100*(Nat.card K:ℝ)*P η σ D R*(Real.log ((U.card:ℝ)/X.card)+P η σ D R) ∧ + ∃c : TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K)), + let n : Fin (Fintype.card (ℙ K (I→K))+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + let p₀ := finiteImageLaw (baseTapeMeasure U (P η σ D R) τ R L₀) + (fun t=>(scoredEncoded X U n σ (P η σ D R) τ (9/40) 10 R L₀ c t).map + (scoredMessageDecoded U σ (P η σ D R) τ R L₀ t)) + p₀ none≤Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let h := peelLength (P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let t := (Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5) + have ht : 0flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let p := peelLength (P η σ D R/10000flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let CH := clippedPart S H hH (fun j=>flatPoints (Hyper j)) X h + let CP := clippedPart S F hF (fun j=>flatPoints (Flat j)) XH p + change (∀i,(CH i).card≤(S.card:ℝ)/25) → (∀j,(CP j).card≤(S.card:ℝ)/25) → _ + intro hsmallH hsmallP + obtain ⟨hcost,hN,code,hfail,hgood⟩ := hh D b τ g R L₀ q K I J F hF Flat H hH Hyper X U T hcard hσq hI hr hL hb hbhi hτ hτhi hXU hXT hdens hprod hX hn hg hFlat hcover hHyper hHcover hsmallH hsmallP + have hXHX : XH⊆X := peel_subset _ _ _ _ _ _ _ + have hSXH : S⊆XH := peel_subset _ _ _ _ _ _ _ + have hSX : S⊆X := hSXH.trans hXHX + have hretH : X.card≤2*XH.card := peel_half _ _ _ _ _ _ _ + have hretP : XH.card≤2*S.card := peel_half _ _ _ _ _ _ _ + have hret : X.card≤4*S.card := by omega + have hSn : (0:ℝ)Fintype.ofFinite _ + let : ∀ x : ℙ K (Dual K (Flat a)),Fintype (RadialLine x) := fun _=>Fintype.ofFinite _ + obtain ⟨k,hk,hf,hg,hc⟩ := hplane D b τ R L₀ K (Fin 5→K) (Flat a) X U T UT + (hFlat a ha) (by omega) hq hr hL hb hbhi hτ hτ400 hX hT hXU hTU hdens (by simpa only [hd] using hprod) hlarge + have hk' : k≤Nat.log 2 ((Nat.card K)^2) := by simpa only [hd,hFlat a ha,Nat.reduceSub] using hk + refine ⟨.inr (.inr (.inl (⟨a,ha⟩,⟨k,Nat.lt_succ_of_le hk'⟩))),?_,?_,?_⟩ + · exact hf.trans (by nlinarith only [Real.exp_pos (-(Nat.card K:ℝ))]) + · intro W hW + obtain ⟨hWU,hsize,hcap⟩ := hg W hW + refine ⟨hWU,hsize.trans ?_,?_⟩ + · exact mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by linarith)) (Nat.cast_nonneg _) + · exact (mul_le_mul_of_nonneg_right (by norm_num : (9/100000:ℝ)≤9/1000) (Nat.cast_nonneg _)).trans hcap + · intro t m hm + have hh := hc t m hm + have hx : 0≤(Nat.card K:ℝ)*P η σ D R*(Real.log ((U.card:ℝ)/X.card)+Real.log ((UT.card:ℝ)/T.card)+P η σ D R) := by positivity + change planePublicCost (Flat a) U UT (P η σ D R) τ k t m≤_ + nlinarith only [hh,hx] + by_cases hn : (X.card:ℝ)≤100*(Nat.card K:ℝ)*P η σ D R + · refine ⟨.inl (),?_,?_,?_⟩ + · change (map (baseTableLaw U (P η σ D R) τ R L₀) (fun t=>(baseFiniteEncoded X U (P η σ D R) τ t).map t)) none ≤ _ + rw [baseFinite_law] + exact (baseSmallLaw X U hXU (P η σ D R) τ hP hn R L₀).1.trans (by positivity) + · change ∀W,0 < (map (baseTableLaw U (P η σ D R) τ R L₀) (fun t=>(baseFiniteEncoded X U (P η σ D R) τ t).map t)) (some W) → _ + rw [baseFinite_law] + intro W hW + have hw := baseCaptureLaw_positive X U (P η σ D R) τ R L₀ W hW + refine ⟨hw.1,hw.2.1.trans ?_,?_⟩ + · exact mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by linarith)) (Nat.cast_nonneg _) + · exact (mul_le_mul_of_nonneg_right (by norm_num : (9/100000:ℝ)≤9/10) (Nat.cast_nonneg _)).trans hw.2.2 + · intro t m hm + exact (smallFinite_cost σ hσ1 hq.symm (by omega) X U hX hXU _ τ hP hn t m hm).trans (hcost_le 110 (by norm_num) (by norm_num)) + by_cases hLow : (X.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp (P η σ D R/10000) + · let g := Real.log (X.card:ℝ)-3*σ/2 + have hXexp : (X.card:ℝ)=Real.exp (3*σ/2+g) := by + dsimp only [g] + rw [show 3*σ/2+(Real.log (X.card:ℝ)-3*σ/2)=Real.log (X.card:ℝ) by ring,Real.exp_log (by exact_mod_cast hX.card_pos)] + let t := (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5) + have ht : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + by_cases hsmall : ∀i,(C i).card≤(S.card:ℝ)/25 + · obtain ⟨_,_,hc,c,hf,hg⟩ := hlow D b τ g R L₀ q K (Fin 5) _ F hF Flat X U T + hcard hσq (by simp) hr hL hb hbhi hτ hτ200 hXU hXT hdens hprod hXexp (lt_of_not_ge hn) hLow hFlat hcover hsmall + let n : Fin (Fintype.card (ℙ K (Fin 5→K))+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + have he : map (scoreTableLaw U σ (P η σ D R) τ R L₀) + (fun t => (scoreFiniteEncoded X U n σ (P η σ D R) τ (9/20) 10 c t).map t)= + finiteImageLaw (baseTapeMeasure U (P η σ D R) τ R L₀) + (fun t=>(scoredEncoded X U n σ (P η σ D R) τ (9/20) 10 R L₀ c t).map + (scoredMessageDecoded U σ (P η σ D R) τ R L₀ t)) := by + rw [scoreFinite_law,scoredEncoded_law] + refine ⟨.inr (.inl (true,n,c)),?_,?_,?_⟩ + · change (map (scoreTableLaw U σ (P η σ D R) τ R L₀) (fun t=>(scoreFiniteEncoded X U n σ (P η σ D R) τ (9/20) 10 c t).map t)) none ≤ _ + rw [he] + exact hf.trans (by nlinarith only [Real.exp_pos (-(Nat.card K:ℝ))]) + · change ∀W,0 < (map (scoreTableLaw U σ (P η σ D R) τ R L₀) (fun t=>(scoreFiniteEncoded X U n σ (P η σ D R) τ (9/20) 10 c t).map t)) (some W) → _ + rw [he] + intro W hW + obtain ⟨hWU,hsize,hcap⟩ := hg W hW + exact ⟨hWU,hsize,(mul_le_mul_of_nonneg_right (by norm_num : (9/100000:ℝ)≤9/20) (Nat.cast_nonneg _)).trans hcap⟩ + · intro t z hz + exact (scoreFinite_cost_of_header X U n σ (P η σ D R) τ (9/20) 10 _ c hc t z hz).trans (hcost_le 100 (by norm_num) (by norm_num)) + · have hSX : S⊆X := peel_subset _ F hF _ X _ _ + have hret' : X.card≤2*S.card := peel_half _ F hF _ X _ _ + have hret : X.card≤4*S.card := by omega + obtain ⟨a,ha,hlarge⟩ := large_clipped_part X S X hSX hret F hF (fun j=>flatPoints (Flat j)) m hsmall + exact plane_branch a ha hlarge + · let g := Real.log (X.card:ℝ)-2*σ + have hXexp : (X.card:ℝ)=Real.exp (2*σ+g) := by + dsimp only [g] + rw [show 2*σ+(Real.log (X.card:ℝ)-2*σ)=Real.log (X.card:ℝ) by ring,Real.exp_log (by exact_mod_cast hX.card_pos)] + have hg : P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let h := peelLength (P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let t := (Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5) + have ht : 0flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let p := peelLength (P η σ D R/10000flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let CH := clippedPart S H hH (fun j=>flatPoints (Hyper j)) X h + let CP := clippedPart S F hF (fun j=>flatPoints (Flat j)) XH p + have hSXH : S⊆XH := peel_subset _ F hF _ XH _ _ + have hXHX : XH⊆X := peel_subset _ H hH _ X _ _ + have hSX : S⊆X := hSXH.trans hXHX + have hret : X.card≤4*S.card := by + have h1 : X.card≤2*XH.card := peel_half _ H hH _ X _ _ + have h2 : XH.card≤2*S.card := peel_half _ F hF _ XH _ _ + omega + by_cases hsmallH : ∀i,(CH i).card≤(S.card:ℝ)/25 + · by_cases hsmallP : ∀i,(CP i).card≤(S.card:ℝ)/25 + · obtain ⟨_,_,hc,c,hf,hgood⟩ := hhigh D b τ g R L₀ q K (Fin 5) _ F hF Flat H hH Hyper X U T + hcard hσq (by simp) hr hL hb hbhi hτ hτ200 hXU hXT hdens hprod hXexp (lt_of_not_ge hn) hg hFlat hcover hHyper hHcover hsmallH hsmallP + let n : Fin (Fintype.card (ℙ K (Fin 5→K))+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + have he : map (scoreTableLaw U σ (P η σ D R) τ R L₀) + (fun t => (scoreFiniteEncoded X U n σ (P η σ D R) τ (9/40) 10 c t).map t)= + finiteImageLaw (baseTapeMeasure U (P η σ D R) τ R L₀) + (fun t=>(scoredEncoded X U n σ (P η σ D R) τ (9/40) 10 R L₀ c t).map + (scoredMessageDecoded U σ (P η σ D R) τ R L₀ t)) := by + rw [scoreFinite_law,scoredEncoded_law] + refine ⟨.inr (.inl (false,n,c)),?_,?_,?_⟩ + · change (map (scoreTableLaw U σ (P η σ D R) τ R L₀) (fun t=>(scoreFiniteEncoded X U n σ (P η σ D R) τ (9/40) 10 c t).map t)) none ≤ _ + rw [he] + exact hf.trans (by nlinarith only [Real.exp_pos (-(Nat.card K:ℝ))]) + · change ∀W,0 < (map (scoreTableLaw U σ (P η σ D R) τ R L₀) (fun t=>(scoreFiniteEncoded X U n σ (P η σ D R) τ (9/40) 10 c t).map t)) (some W) → _ + rw [he] + intro W hW + obtain ⟨hWU,hsize,hcap⟩ := hgood W hW + exact ⟨hWU,hsize,(mul_le_mul_of_nonneg_right (by norm_num : (9/100000:ℝ)≤9/40) (Nat.cast_nonneg _)).trans hcap⟩ + · intro t z hz + exact (scoreFinite_cost_of_header X U n σ (P η σ D R) τ (9/40) 10 _ c hc t z hz).trans (hcost_le 100 (by norm_num) (by norm_num)) + · obtain ⟨a,ha,hlarge⟩ := large_clipped_part X S XH hSX hret F hF (fun j=>flatPoints (Flat j)) p hsmallP + exact plane_branch a ha hlarge + · obtain ⟨a,ha,hlarge⟩ := large_clipped_part X S X hSX hret H hH (fun j=>flatPoints (Hyper j)) h hsmallH + obtain ⟨k,hk,hf,hgood,hc⟩ := hthree D b τ R L₀ q K (Fin 5→K) (Hyper a) (hHyper a ha) X U T UT + (by omega) hcard hσq hr hL hb hbhi hτ hτhi hX hT hXU hTU hdens (by simpa only [hd] using hprod) hlarge + have hk' : k≤Nat.log 2 (Nat.card K) := by simpa only [hd,hHyper a ha,Nat.reduceSub,pow_one] using hk + refine ⟨.inr (.inr (.inr (⟨a,ha⟩,⟨k,Nat.lt_succ_of_le hk'⟩))),?_⟩ + exact ⟨hf,hgood,hc⟩ + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourHighPublic.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourHighPublic.lean new file mode 100644 index 0000000000000000000000000000000000000000..54a8e72b8218cf3b34814b0819a4c81793758cec --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourHighPublic.lean @@ -0,0 +1,154 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.DimensionFourLowLaw +import OAI.Combinatorics.RamseyFive.Decoding.TwoPeelMessage + +namespace OAI + + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy TrainingCells MeasurePublicTable Metadata +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_four_high_public_predictor {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ g : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (I→K)] [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K (I→K)) + (H : Finset J) (hH : H.Nonempty) (Hyper : J→Submodule K (I→K)) + (X U : Finset (ℙ K (I→K))) (T : Finset (ℙ K (Dual K (I→K)))), + Nat.card K=q → Real.exp σ=q → Fintype.card I=5 → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → X⊆U → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(X.card:ℝ)*T.card → + (X.card:ℝ)=Real.exp (2*σ+g) → + 100*(Nat.card K:ℝ)*P η σ D R<(X.card:ℝ) → P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let h := peelLength (P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let t := (Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5) + let ht : 0flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let p := peelLength (P η σ D R/10000flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let CH := clippedPart S H hH (fun j=>flatPoints (Hyper j)) X h + let CP := clippedPart S F hF (fun j=>flatPoints (Flat j)) XH p + let _a := queryPart H hH (fun j=>flatPoints (Hyper j)) X h + let _e := queryPart F hF (fun j=>flatPoints (Flat j)) XH p + (∀i,(CH i).card≤(S.card:ℝ)/25) → (∀j,(CP j).card≤(S.card:ℝ)/25) → + let N := scoreCutoff S U (P η σ D R) τ + Real.log (Nat.card (TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K))))≤q ∧ + Real.log N≤Real.log (2*(Nat.card K:ℝ))+scoreSearchCost S U (P η σ D R) τ ∧ + ∃c : TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K)), + ∃ Good : Set (Fin N→Fin R→ℙ K (I→K)→ℕ), + (Measure.pi (fun _ : Fin N=>scheduleMeasure + (fun x=>if x∈U then (L₀*(Nat.card K:ℝ≥0))/(U.card:ℝ≥0) else 0) R)).real + Goodᶜ ≤ Real.exp (-(Nat.card K:ℝ)) ∧ + ∀u∈Good,∃ i : Fin N,∃z : Fin (Fintype.card (ℙ K (Dual K (I→K)))+1), + let W := publicDecoded U (messageOwn c) (messageBase c L₀) z (u i) + W⊆U ∧ (W.card:ℝ)≤(X.card:ℝ)*Real.exp (10*P η σ D R) ∧ + (9/40:ℝ)*X.card≤((W∩X).card:ℝ) := by + have hh := eventually_four_high_training_score hη hη' Cb hCb + have htau := (tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<200) (beta_pos hη))).eventually + (eventually_lt_nhds (by norm_num : (0:ℝ)<1/2)) + have hp := (tendsto_rpow_atTop (mul_pos (by norm_num : (0:ℝ)<10) (beta_pos hη))).eventually + (eventually_ge_atTop (4:ℝ)) + filter_upwards [hh,htau,hp,eventually_ge_atTop (100000:ℝ)] with σ hh htau hp hσ + rw [←neg_mul] at htau + intro D b τ g R L₀ q K I J _ _ _ _ _ _ _ _ _ F hF Flat H hH Hyper X U T hcard hσq hI hr hL hb hbhi hτ hτhi hXU hXT hdens hprod hX hn hg hFlat hcover hHyper hHcover + dsimp only + let XH := peelSet (P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let h := peelLength (P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let t := (Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5) + have ht : 0flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let p := peelLength (P η σ D R/10000flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let CH := clippedPart S H hH (fun j=>flatPoints (Hyper j)) X h + let CP := clippedPart S F hF (fun j=>flatPoints (Flat j)) XH p + let a := queryPart H hH (fun j=>flatPoints (Hyper j)) X h + let e := queryPart F hF (fun j=>flatPoints (Flat j)) XH p + let raw := twoPublicOwn (greedyList H hH (fun j=>flatPoints (Hyper j)) X h) + (greedyList F hF (fun j=>flatPoints (Flat j)) XH p) + change (∀i,(CH i).card≤(S.card:ℝ)/25) → (∀j,(CP j).card≤(S.card:ℝ)/25) → _ + intro hsmallH hsmallP + have hp := hh D b τ g R L₀ q K I J F hF Flat H hH Hyper X U T + hcard hσq hI hr hL hb hbhi hτ hτhi hXU hXT hdens hprod hX hn hg hFlat hcover hHyper hHcover hsmallH hsmallP + change S⊆X ∧ X.card≤4*S.card ∧ _ at hp + obtain ⟨hSX,hret,hprob⟩ := hp + have hHX : XH⊆X := peel_subset _ _ _ _ _ _ _ + have hSH : S⊆XH := peel_subset _ _ _ _ _ _ _ + have hret' : (X.card:ℝ)≤4*S.card := by exact_mod_cast hret + have hSn : 0<(S.card:ℝ) := by nlinarith only [hret',hX,Real.exp_pos (2*σ+g)] + have hS : S.Nonempty := Finset.card_pos.mp (Nat.cast_pos.mp hSn) + have hP : 4≤P η σ D R := hp.trans (finite_bounds hη hη' (by linarith) hr).2.2.2.2.2.1 + have hq : 2flatPoints (Hyper j)) h F hF (fun j=>flatPoints (Flat j)) p + change (∀i,family CH CP i⊆S) ∧ (∑i,(family CH CP i).card)≤3*S.card ∧ + (∀x,S∩raw x=CH (a x)∪CP (e x)) ∧ _ at hd + have hO : ∀x,S∩messageOwn c x=CH (a x)∪CP (e x) := by + intro x + rw [hOwn] + exact hd.2.2.1 x + have hb' : (fun x=>Real.exp (-(L₀:ℝ)*(1-ownFraction S (CH (a x)) (CP (e x)))))=messageBase c L₀ := by + funext x + rw [hBase,hd.2.2.1 x] + rfl + rw [hb'] at hprob + have hx := score_public_implementation U S hS (hSX.trans hXU) (fun x=>CH (a x)∪CP (e x)) + (messageOwn c) hO (messageBase c L₀) (exceptional S (family CH CP)) R L₀ + (P η σ D R) τ ((S.card:ℝ)*Real.exp (10*P η σ D R)) (by linarith only [hP]) hτ.le hprob + dsimp only at hx + let Good := ambientSuccess S (trueScoreSuccess U S (fun x=>CH (a x)∪CP (e x)) (messageBase c L₀) + (exceptional S (family CH CP)) R (2*(Nat.card K:ℝ)*P η σ D R) ((S.card:ℝ)*Real.exp (10*P η σ D R)) ((9/10:ℝ)*S.card)) + refine ⟨?_,hx.1,c,{u | firstIndex Good u≠none},?_,?_⟩ + · simpa only [hcard] using hcost + · simpa only [Set.compl_ofPred,not_not] using hx.2.1 + · intro u hu + obtain ⟨i,hi⟩ := Option.ne_none_iff_exists'.mp hu + obtain ⟨z,hz,_,hsize,hcapture⟩ := hx.2.2 u i hi + have hz' : z L₀*pointStrength S) R).real + {ω | Unsampled x S ω ∧ t < |pointScore S (C a∪C b) F + (Real.exp (-(L₀:ℝ)*(1-ownFraction S (C a) (C b)))) ω|} ≤ + (Nat.card K:ℝ)^(-(50:ℝ)) := by + have ht := eventually_low_original_tail hη hη' Cb hCb + have hd := eventually_dyad_power_payment hη hη' + have hc := eventually_power_absorption hη hη' (11*2^200) 0 (1/200) + (by positivity) (by norm_num) (by norm_num) + have hs := eventually_four_ambient_degree hη hη' + filter_upwards [eventually_ge_atTop (100:ℝ),ht,hd,hc,hs] with σ hσ ht hd hc hs + intro D b₀ τ R L₀ K V _ _ _ _ _ _ _ x _ J _ S C a b c O F Lines Q t + hdim hq hr hL hb₀ hbhi hτ hS ha hb hC hO hSn hLow hn hf hF hx hLines hxQ hgood hstrong ht₀ + have hS0 : (0:ℝ) < S.card := Nat.cast_pos.mpr hS.card_pos + have hδ : 0 < pointStrength (K:=K) S := by + rw [←NNReal.coe_pos,coe_pointStrength] + exact div_pos (by exact_mod_cast Nat.card_pos (α:=K)) hS0 + have hlarge : (11*2^200:ℝ) ≤ Real.exp (P η σ D R/200) := by + simpa only [Real.rpow_zero,mul_one,one_div,div_eq_mul_inv,one_mul,mul_comm (200⁻¹:ℝ)] using hc D R hr + have hcard : ((outsideAt x S (O x)).card:ℝ) ≤ Real.exp (3*σ) := by + have he : (10:ℝ) ≤ Real.exp (σ/2) := by linarith only [Real.add_one_le_exp (σ/2),hσ] + calc + _ ≤ (S.card:ℝ) := Nat.cast_le.mpr (outsideAt_card_le x S (O x)) + _ ≤ 10*Real.exp (5*σ/2) := hSn + _ ≤ Real.exp (σ/2)*Real.exp (5*σ/2) := mul_le_mul_of_nonneg_right he (Real.exp_nonneg _) + _ = _ := by rw [←Real.exp_add];congr 1;ring + have hm (H:F) : mass (radialWeight x (outsideAt x S (O x)) (pointStrength S)) (pencilLines x F H) ≤ 2 := by + rw [hO] + exact (actual_radial_mass_bounds x S C hS a b c ha hb hC F hF hf hn H).2.2.trans (by norm_num) + have hP0 : 0≤P η σ D R := by unfold P;rw [←hL];positivity + have hmass : (pointStrength (K:=K) S:ℝ)*S.card≤Nat.card K := by + rw [coe_pointStrength,div_mul_cancel₀ _ hS0.ne'] + have hlow : (S.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp ((P η σ D R/200)/2) := + hLow.trans (mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by linarith only [hP0])) (sq_nonneg _)) + have hh := score_pair_low_moment x hdim S O (pointStrength S) hδ F + (fun H hH => (hF H hH).1) S.card (P η σ D R/200) hS0 hmass hlow hlarge Lines hLines Q hxQ hm + (off_radialExceptions S O (pointStrength S) Lines Q (Nat.card K) S.card (P η σ D R/200) x hgood) 200 (le_refl _) + have hpay := hd D R (P η σ D R/200) (outsideAt x S (O x)).card hr (le_refl _) hcard + have hmoment : (∑z : DistinctPairs F,strength (pencilLines x F) + (radialWeight x (outsideAt x S (O x)) (pointStrength S)) z^200) ≤ + (scale (K:=K) 4 S.card)^2*Real.exp (P η σ D R/50) := by + apply hh.trans + change 2^200*((Nat.clog 2 (outsideAt x S (O x)).card:ℝ)+1)* + (((Nat.card K:ℝ)^4/S.card)^2*Real.exp (2*(P η σ D R/200))) ≤ _ + calc + _ = ((Nat.card K:ℝ)^4/S.card)^2*(2^200*((Nat.clog 2 (outsideAt x S (O x)).card:ℝ)+1)* + Real.exp (2*(P η σ D R/200))) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left hpay (sq_nonneg _) + have hcap : (S.card:ℝ)≤(Nat.card K:ℝ)^3 := by + have he : (10:ℝ)≤Real.exp (σ/2) := by linarith only [Real.add_one_le_exp (σ/2), hσ] + calc + _≤10*Real.exp (5*σ/2) := hSn + _≤Real.exp (σ/2)*Real.exp (5*σ/2) := mul_le_mul_of_nonneg_right he (Real.exp_nonneg _) + _=_ := by rw [←Real.exp_add,hq,←Real.exp_nat_mul];congr 1;norm_num;ring + have hchi : (10*2^200:ℝ)≤Real.exp (P η σ D R/100) := by + have hh : Real.exp (P η σ D R/200)≤Real.exp (P η σ D R/100) := Real.exp_le_exp.mpr (by linarith only [hP0]) + linarith only [hlarge,hh] + have hlow' : (S.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp (P η σ D R/100) := + hLow.trans (mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by linarith only [hP0])) (sq_nonneg _)) + apply ht 4 D b₀ τ R L₀ K V x S C a b c F t hdim (by norm_num) (by norm_num) hq hr hL hb₀ hbhi hτ hS + ha hb hC (by convert hSn using 1; norm_num) hLow hn hf hF hx _ _ _ ht₀ + · intro u hu hu2 + have hh := power_tail_mul (fun z : DistinctPairs F => strength (pencilLines x F) + (radialWeight x (outsideAt x S (O x)) (pointStrength S)) z) (strength_nonneg _ _) 200 u _ hu hmoment + simp only [hO,strength] at hh + convert hh using 1 + congr 2 + · intro H u hu hu2 + have hh := score_degree_low_normalized x hdim (outsideAt x S (O x)) (pointStrength S) hδ F + (fun H hH => (hF H hH).1) H S.card u (P η σ D R/100) hS0 hu.le hu2 (hm H) hcap hlow' hchi + simpa only [hO,show 2*(P η σ D R/100)=P η σ D R/50 by ring,scale] using hh + · intro H + have hh := hs D R K V x S O (pointStrength S) F Lines Q hdim hq hr hS hSn hδ + (fun H hH => (hF H hH).1) hm hLines hxQ hstrong H + simpa only [hO,scale] using hh + +end + +section +open Filter ParameterHierarchy +open scoped Topology + +theorem eventually_plane_half_ambient_margins {η : ℝ} (hη : 0<η) (hη' : η<1/10) : + ∀ᶠ σ : ℝ in atTop,∀ (D : ℝ) (R : ℕ),Range η σ D R → + let Q := P η σ D R + let a := (1/(100*(momentOrder σ Q:ℝ)))/2 + 100000000≤Q/10000 ∧ Q/10000<σ/2-4*Q ∧ + 20*Q≤σ/2-4*Q ∧ Real.exp (-Q)≤a ∧ a≤2 ∧ (1332096:ℝ)≤Real.exp Q := by + have hh := eventually_hierarchy hη hη' 0 (1/100) 1000000000000 (by norm_num) (by norm_num) + have ha := eventually_power_absorption hη hη' 2000400 1 1 (by norm_num) (by norm_num) (by norm_num) + have hc := eventually_power_absorption hη hη' 1332096 0 1 (by norm_num) (by norm_num) (by norm_num) + filter_upwards [eventually_ge_atTop (1:ℝ),hh,ha,hc] with σ hσ hh ha hc + intro D R hr + have hh := hh D R 0 0 hr (by simp) (by positivity) + have ha := ha D R hr + have hc := hc D R hr + dsimp only + have hL : 0≤L η σ D := by linarith only [hh.1] + have hLP : L η σ D≤P η σ D R := by linarith only [hh.2.2.2.2.2,hL] + have hP : 1≤P η σ D R := by linarith only [hh.1,hLP] + have hp := momentOrder_bounds hσ hP + have hp0 : (0:ℝ)< momentOrder σ (P η σ D R) := Nat.cast_pos.mpr hp.2.1 + have hp1 : (1:ℝ)≤ momentOrder σ (P η σ D R) := by exact_mod_cast hp.2.1 + refine ⟨by linarith only [hh.1,hLP],by linarith only [hh.2.1,hP],by linarith only [hh.2.1,hP],?_,?_,?_⟩ + · rw [Real.exp_neg, ← one_div,div_div] + apply one_div_le_one_div_of_le (by positivity : (0:ℝ)<100*(momentOrder σ (P η σ D R):ℝ)*2) + calc + _≤100*(10002*σ)*2 := by gcongr;exact hp.2.2.2.2 + _=2000400*σ := by ring + _≤_ := by simpa only [Real.rpow_one,one_mul] using ha + · apply (div_le_iff₀ (by norm_num : (0:ℝ)<2)).mpr + apply (div_le_iff₀ (by positivity : (0:ℝ)<100*(momentOrder σ (P η σ D R):ℝ))).mpr + linarith only [hp1] + · simpa only [Real.rpow_zero,mul_one,one_mul] using hc +end + +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open ParameterHierarchy Filter +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +noncomputable def ambientHalfStrongExceptions {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + (σ P : ℝ) (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (Lines : Finset (Submodule K V)) (Q : Finset (ℙ K V)) : Finset (ℙ K V) := + if (S.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp (-4*P) then ∅ + else badCenters S O (pointStrength S) ((1/(100*(momentOrder σ P:ℝ)))/2) Lines Q 1 + +lemma off_ambientHalfStrongExceptions {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + (σ P : ℝ) (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (Lines : Finset (Submodule K V)) (Q : Finset (ℙ K V)) (x : ℙ K V) + (hx : x∉ambientHalfStrongExceptions σ P S O Lines Q) : + x∉badCenters S O (pointStrength S) ((1/(100*(momentOrder σ P:ℝ)))/2) Lines Q 1 ∨ + (S.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp (-4*P) := by + by_cases h : (S.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp (-4*P) + · exact Or.inr h + · exact Or.inl (by simpa only [ambientHalfStrongExceptions,ite_eq_right h] using hx) + +theorem eventually_literal_plane_half_exceptions {η : ℝ} (hη : 0<η) (hη' : η<1/10) : + ∀ᶠ σ : ℝ in atTop,∀ (D : ℝ) (R : ℕ),Range η σ D R → + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (g : ℝ) (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K (I→K)) + (X S : Finset (ℙ K (I→K))) (t : ℝ) (ht0 : 0 flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0) → + Real.exp (3*σ/2+g)/4≤S.card → (S.card:ℝ)≤Real.exp (3*σ) → + (∀x,ownCell F hF (fun j => flatPoints (Flat j)) X + (peelLength (P η σ D R/10000 flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0)) x⊆O x) → + (∀l∈Lines,finrank K l=2) → + let O' := fun x => S∩O x + ((radialExceptions S O' (pointStrength S) Lines Q q S.card (P η σ D R/200)).card:ℝ)≤ + (S.card:ℝ)*Real.exp (-L η σ D/1000)/2 ∧ + ((ambientHalfStrongExceptions σ (P η σ D R) S O' Lines Q).card:ℝ)≤ + (S.card:ℝ)*Real.exp (7*P η σ D R) := by + have he := eventually_exception_payment_wide hη hη' 0 2664192 8 (by norm_num) (by norm_num) (by norm_num) + have ha := eventually_plane_half_ambient_margins hη hη' + filter_upwards [eventually_ge_atTop (1000:ℝ),he,ha] with σ hσ he ha + intro D R hr q K I J _ _ _ _ _ _ g F hF Flat X S t ht0 O Lines Q hq hcard hσq hI + hghi hFlat hcover hX ht hS hquarter hcardS hO hLines + dsimp only + let P := ParameterHierarchy.P η σ D R + have ha := ha D R hr + have hP : 0

flatPoints (Flat j)) X _ _))).trans hX + have hδ : (pointStrength (K:=K) S:ℝ)=(q:ℝ)/S.card := by simp only [pointStrength,NNReal.coe_div,NNReal.coe_natCast,hcard] + constructor + · have hcount := literal_plane_radial_exceptions hq hcard hI σ g (P/10000) (P/200) hσq hσ + ha.1 (by linarith only [hP]) hghi F hF Flat hFlat hcover X hX t ht ht0 S hS hquarter O hO + (pointStrength S) hδ Lines hLines Q + have hsub := radialExceptions_normalization S (fun x => S∩O x) (pointStrength S) + Lines Q q (P/200) S.card (Real.exp (3*σ/2+g)) hn0 hSn + have hpay := he D R (P/10000) (P/200) S.card hr (le_refl _) (le_refl _) hcardS + simp only [zero_mul,zero_add] at hpay + have hcount' := (Nat.cast_le.mpr (Finset.card_le_card hsub)).trans hcount + calc + _≤Real.exp (3*σ/2+g)*(2664192*((Nat.clog 2 S.card:ℝ)+1)*Real.exp (-P/200)) := by + simpa only [neg_div] using hcount' + _=Real.exp (3*σ/2+g)*(((Nat.clog 2 S.card:ℝ)+1)*(2664192*Real.exp (-P/200))) := by ring + _≤Real.exp (3*σ/2+g)*(Real.exp (-L η σ D/1000)/8) := by + apply mul_le_mul_of_nonneg_left _ (Real.exp_nonneg _) + simpa only [neg_div] using hpay + _≤_ := by nlinarith only [mul_le_mul_of_nonneg_right hquarter (Real.exp_nonneg (-L η σ D/1000))] + · by_cases hsmall : (S.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp (-4*P) + · dsimp only [ambientHalfStrongExceptions] + rw [ite_eq_left hsmall,Finset.card_empty,Nat.cast_zero] + positivity + · rw [ambientHalfStrongExceptions,ite_eq_right hsmall] + let a : ℝ := (1/(100*(momentOrder σ P:ℝ)))/2 + have hlow : (q:ℝ)^2*Real.exp (-4*P)≤S.card := by rw [←hcard];exact (le_of_not_ge hsmall) + have hglo : σ/2-4*P≤g := by + have hh := hlow.trans hSn + rw [←hσq,←Real.exp_nat_mul,←Real.exp_add] at hh + have hh := Real.exp_le_exp.mp hh + norm_num at hh + linarith only [hh] + have hen : P/10000 S∩O x) (pointStrength S) a Lines Q hc + have hnq : (q:ℝ)^2≤4*(S.card:ℝ)*Real.exp (4*P) := by + have hh := mul_le_mul_of_nonneg_right hlow (Real.exp_nonneg (4*P)) + have hcan : ((q:ℝ)^2*Real.exp (-4*P))*Real.exp (4*P)=(q:ℝ)^2 := by + rw [mul_assoc,←Real.exp_add];simp + rw [hcan] at hh + nlinarith only [hh,mul_nonneg hn0.le (Real.exp_nonneg (4*P))] + exact ScoreScalars.strong_exception_payment (Nat.cast_nonneg q) hn0 (Nat.cast_nonneg _) + ha.2.2.2.1 hnq hc ha.2.2.2.2.2 +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourLowLaw.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourLowLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..d072363b467064c12a4101b042ba66f9785cb871 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourLowLaw.lean @@ -0,0 +1,187 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.BaseCapturedLaw +import OAI.Combinatorics.RamseyFive.Geometry.DimensionFourLowTraining + +namespace OAI + + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy MeasurePublicTable Metadata +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_four_low_public_law {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ g : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (I→K)] [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K (I→K)) + (X U : Finset (ℙ K (I→K))) (T : Finset (ℙ K (Dual K (I→K)))), + Nat.card K=q → Real.exp σ=q → Fintype.card I=5 → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → X⊆U → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(X.card:ℝ)*T.card → + (X.card:ℝ)=Real.exp (3*σ/2+g) → + 100*(Nat.card K:ℝ)*P η σ D R<(X.card:ℝ) → + (X.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp (P η σ D R/10000) → + (∀j∈F,finrank K (Flat j)=3) → + (∀V : Submodule K (I→K),finrank K V=3 → ∃j∈F,Flat j=V) → + let t := (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5) + let ht : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + (∀i,(C i).card≤(S.card:ℝ)/25) → + let N := scoreCutoff S U (P η σ D R) τ + Real.log (Nat.card (TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K))))≤q ∧ + Real.log N≤Real.log (2*(Nat.card K:ℝ))+scoreSearchCost S U (P η σ D R) τ ∧ + ∃c : TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K)), + let n : Fin (Fintype.card (ℙ K (I→K))+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + let p₀ := scoredCaptureLaw X U n (messageOwn c) (messageBase c L₀) + (P η σ D R) τ (9/20) 10 R L₀ + p₀ none≤Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + change (∀i,(C i).card≤(S.card:ℝ)/25) → _ + intro hsmall + obtain ⟨hcost,hN,c,E,hE,hd⟩ := hh D b τ g R L₀ q K I J F hF Flat X U T hcard hσq hI hr hL hb hbhi hτ hτhi hXU hXT hdens hprod hX hn hLow hFlat hcover hsmall + let n : Fin (Fintype.card (ℙ K (I→K))+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + have hf := scoredCaptureLaw_failure X U n (messageOwn c) (messageBase c L₀) + (P η σ D R) τ (9/20) 10 R L₀ E (Real.exp (-(Nat.card K:ℝ))) hE hd + have hg := scoredCaptureLaw_positive X U n (messageOwn c) (messageBase c L₀) + (P η σ D R) τ (9/20) 10 R L₀ + exact ⟨hcost,hN,c,hf,hg⟩ + +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy TrainingCells +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_four_high_training_score {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ g : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K (I→K)) + (H : Finset J) (hH : H.Nonempty) (Hyper : J→Submodule K (I→K)) + (X U : Finset (ℙ K (I→K))) (T : Finset (ℙ K (Dual K (I→K)))), + Nat.card K=q → Real.exp σ=q → Fintype.card I=5 → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → X⊆U → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(X.card:ℝ)*T.card → + (X.card:ℝ)=Real.exp (2*σ+g) → + 100*(Nat.card K:ℝ)*P η σ D R<(X.card:ℝ) → P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let h := peelLength (P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let t := (Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5) + let ht : 0flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let p := peelLength (P η σ D R/10000flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let CH := clippedPart S H hH (fun j=>flatPoints (Hyper j)) X h + let CP := clippedPart S F hF (fun j=>flatPoints (Flat j)) XH p + let a := queryPart H hH (fun j=>flatPoints (Hyper j)) X h + let e := queryPart F hF (fun j=>flatPoints (Flat j)) XH p + (∀i,(CH i).card≤(S.card:ℝ)/25) → (∀j,(CP j).card≤(S.card:ℝ)/25) → + S⊆X ∧ X.card≤4*S.card ∧ + Real.exp (-8*P η σ D R*τ)/4≤ + (scheduleMeasure (fun _ : S=>L₀*pointStrength S) R).real + (trueScoreSuccess U S (fun x=>CH (a x)∪CP (e x)) + (fun x=>Real.exp (-(L₀:ℝ)*(1-ownFraction S (CH (a x)) (CP (e x))))) + (exceptional S (family CH CP)) R (2*(Nat.card K:ℝ)*P η σ D R) + ((S.card:ℝ)*Real.exp (10*P η σ D R)) ((9/10:ℝ)*S.card)) := by + have hh := eventually_four_high_score_procedure hη hη' Cb hCb + have htau := (tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<200) (beta_pos hη))).eventually + (eventually_lt_nhds (by norm_num : (0:ℝ)<1/2)) + have hp := (tendsto_rpow_atTop (mul_pos (by norm_num : (0:ℝ)<10) (beta_pos hη))).eventually + (eventually_ge_atTop (4:ℝ)) + filter_upwards [hh,htau,hp,eventually_ge_atTop (100:ℝ)] with σ hh htau hp hσ + rw [←neg_mul] at htau + intro D b τ g R L₀ q K I J _ _ _ _ _ _ _ _ F hF Flat H hH Hyper X U T hcard hσq hI hr hL hb hbhi hτ hτhi hXU hXT hdens hprod hX hn hg hFlat hcover hHyper hHcover + dsimp only + let XH := peelSet (P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let h := peelLength (P η σ D R/10000flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) + let t := (Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5) + have ht : 0flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let p := peelLength (P η σ D R/10000flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let CH := clippedPart S H hH (fun j=>flatPoints (Hyper j)) X h + let CP := clippedPart S F hF (fun j=>flatPoints (Flat j)) XH p + let a := queryPart H hH (fun j=>flatPoints (Hyper j)) X h + let e := queryPart F hF (fun j=>flatPoints (Flat j)) XH p + let raw := twoPublicOwn (greedyList H hH (fun j=>flatPoints (Hyper j)) X h) + (greedyList F hF (fun j=>flatPoints (Flat j)) XH p) + change (∀i,(CH i).card≤(S.card:ℝ)/25) → (∀j,(CP j).card≤(S.card:ℝ)/25) → _ + intro hsmallH hsmallP + have hHX : XH⊆X := peel_subset _ _ _ _ _ _ _ + have hSH : S⊆XH := peel_subset _ _ _ _ _ _ _ + have hSX : S⊆X := hSH.trans hHX + have hret : X.card≤4*S.card := two_peels_quarter _ _ _ _ _ _ _ _ _ _ _ _ _ + have hret' : (X.card:ℝ)≤4*S.card := by exact_mod_cast hret + have hSn : 0<(S.card:ℝ) := by nlinarith only [hret',hX,Real.exp_pos (2*σ+g)] + have hS : S.Nonempty := Finset.card_pos.mp (Nat.cast_pos.mp hSn) + have hP : 4≤P η σ D R := hp.trans (finite_bounds hη hη' (by linarith) hr).2.2.2.2.2.1 + have hq : 2flatPoints (Hyper j)) h F hF (fun j=>flatPoints (Flat j)) p + change (∀i,family CH CP i⊆S) ∧ (∑i,(family CH CP i).card)≤3*S.card ∧ + (∀x,S∩raw x=CH (a x)∪CP (e x)) ∧ _ at hd + have hqP : (Nat.card K:ℝ)*P η σ D R≤S.card := by nlinarith only [hn,hret',hqp,hP] + have hdiv : (Nat.card K:ℝ)/S.card≤1/100 := by + apply (div_le_iff₀ hSn).mpr + nlinarith only [hn,hret',mul_le_mul_of_nonneg_left hP hqp.le] + have hc := hh D b τ R L₀ q K I J g F hF Flat H hH Hyper X XH U S t ht raw + (family CH CP) (fun x=>.inl (a x)) (fun x=>.inr (.inl (e x))) + (fun x=>.inr (.inr (a x,e x))) T hq hcard hσq hI hr hL hb hbhi hτ hτhi + (hSX.trans hXU) hdens hprod hg hghi hFlat hcover hHyper hHcover hX hnhi rfl rfl rfl + (by nlinarith only [hret',hX]) hd.2.2.2.2.2 hd.2.2.2.2.1 hd.2.2.1 hd.2.1 hd.1 hd.2.2.2.1 hqP hdiv + (fun x=>TrainingCells.small_union S (CH (a x)) (CP (e x)) hS (hsmallH _) (hsmallP _)) + refine ⟨hSX,hret,?_⟩ + simpa only [trueScoreSuccess,family,mul_assoc] using hc + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourLowProcedure.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourLowProcedure.lean new file mode 100644 index 0000000000000000000000000000000000000000..a921906da8857139007e5f27fbbbc2e9ac48e630 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourLowProcedure.lean @@ -0,0 +1,183 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Decoding.DimensionTwoProcedure +import OAI.Combinatorics.RamseyFive.Geometry.DimensionFourHighIntegrals + +namespace OAI + + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_four_low_score_procedure {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b₀ τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ {A : Type} [Fintype A] (g : ℝ) (F : Finset J) (hF : F.Nonempty) + (Flat : J→Submodule K (I→K)) (X U S : Finset (ℙ K (I→K))) + (t₀ : ℝ) (ht₀ : 0 flatPoints (Flat j)) X ⌈t₀⌉₊ (Nat.ceil_pos.mpr ht₀) → + Real.exp (3*σ/2+g)/4≤S.card → (S.card:ℝ)≤10*Real.exp (5*σ/2) → + (S.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp (P η σ D R/10000) → + (∀x,ownCell F hF (fun j => flatPoints (Flat j)) X + (peelLength (P η σ D R/10000 flatPoints (Flat j)) X ⌈t₀⌉₊ (Nat.ceil_pos.mpr ht₀)) x⊆rawOwn x) → + (∀x,S∩rawOwn x=C (ia x)∪C (ib x)) → + (∑j,(C j).card)≤3*S.card → (∀j,C j⊆S) → + (∀x,C (ic x)=C (ia x)∩C (ib x)) → + (Nat.card K:ℝ)*P η σ D R≤S.card → + (Nat.card K:ℝ)/S.card≤1/100 → (∀x,ownFraction S (C (ia x)) (C (ib x))≤2/25) → + Real.exp (-8*P η σ D R*τ)/4≤ + (scheduleMeasure (fun _ : S => L₀*pointStrength S) R).real + {ω | let W := decoded U S (fun x => C (ia x)∪C (ib x)) (fun x => Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x))))) (emptyTests (exceptional S C) (hyperplaneSupport S) ω).card ω + (sampleCount ω:ℝ)≤2*((Nat.card K:ℝ)*P η σ D R) ∧ + (W.card:ℝ)≤(S.card:ℝ)*Real.exp (10*P η σ D R) ∧ + (9/10:ℝ)*S.card≤((W∩S).card:ℝ)} := by + have hi := eventually_four_low_score_integrals hη hη' Cb hCb + have hp := eventually_procedure_margins hη hη' Cb hCb + have hm := eventually_score_margins hη hη' Cb hCb + have ht := (tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<200) (beta_pos hη))).eventually (eventually_lt_nhds (by norm_num : (0:ℝ)<1/10)) + have hl := eventually_hierarchy hη hη' Cb 1 10000000000 hCb (by norm_num) + filter_upwards [eventually_ge_atTop (10:ℝ),hi,hp,hm,ht,hl] with σ hσ hi hp hm ht hl + rw [←neg_mul] at ht + intro D b₀ τ R L₀ q K I J _ _ _ _ _ _ _ _ A _ g F hF Flat X U S t₀ ht₀ rawOwn C ia ib ic T + hq hcard hσq hI hr hL hb₀ hbhi hτ hτhi hg hSX hSU hdens hprod hFlat hcover hX htc hpeel hquarter hn hLow hraw hOwn hC hCS hCc hnP hdiv hf + have hdim : finrank K (I→K)=4+1 := by rw [Module.finrank_pi, hI] + have hS : S.Nonempty := Finset.card_pos.mp (Nat.cast_pos.mp (lt_of_lt_of_le (div_pos (Real.exp_pos _) (by norm_num)) hquarter)) + have hret : X.card≤4*S.card := by exact_mod_cast (show (X.card:ℝ)≤4*S.card by linarith only [hX,hquarter]) + have hP : (L₀:ℝ)*R=P η σ D R := by rw [hL];rfl + have hi := hi D b₀ τ R L₀ q K I J g F hF Flat X U S t₀ ht₀ rawOwn C ia ib ic + hq hcard hσq hI hr hL hb₀ hbhi hτhi hg hFlat hcover hX htc hpeel hquarter hn hLow hraw hOwn hC hCS hCc hdiv hf + have hp := hp D b₀ τ R hr hb₀ hbhi hτhi + have hm := hm D b₀ τ R hr hb₀ hbhi hτhi + have hlarge : 10000000000≤(L₀:ℝ) := by rw [hL];exact (hl D R b₀ τ hr hbhi hτhi).1 + have hq10 : (10:ℝ)≤Nat.card K := by rw [hcard,←hσq];linarith only [Real.add_one_le_exp σ,hσ] + have hτ8 : 8*τ≤4/5 := by linarith only [hτhi,ht] + have hbcount := irregular_card_bound (d:=4) hdim (by norm_num) S C hS hC + (ξ:=(L₀:ℝ)/100) (by linarith only [Real.add_one_le_exp ((L₀:ℝ)/100),hlarge]) + have hpay := ScoreScalars.exp_sub_le_scaled (a:=0) (b:=2*((L₀:ℝ)/100)) + (C:=20000000) (by norm_num) (by + linarith only [Real.log_le_self (by norm_num : (0:ℝ)≤20000000),hlarge]) + simp only [neg_zero,Real.exp_zero] at hpay + rw [show -(2*((L₀:ℝ)/100))=(-2)*((L₀:ℝ)/100) by ring] at hpay + have hbad : ((irregular (d:=4) S C ((L₀:ℝ)/100)).card:ℝ)≤(S.card:ℝ)/100 := by + apply hbcount.trans + nlinarith only [mul_le_mul_of_nonneg_right hpay (Nat.cast_nonneg S.card : (0:ℝ)≤S.card)] + have hh := cell_score_from_integrals (d:=4) hdim (by norm_num) hq10 X U S hSX hSU hS hret C hC ia ib hf T L₀ R b₀ τ 8 + hτ hτ8 hdens hprod (by rw [hP];exact hp.1) (by norm_num) (by rwa [hP]) hbad + (by rw [hP];dsimp only at hp;linarith only [hp.2.1]) + (by rw [hP,hL];exact hp.2.2.1) + (by rw [hP];exact hp.2.2.2.1) + (by rw [hP];exact hp.2.2.2.2) + (by rw [hP,hL];exact hm.2.2.2.2.2.2.1) + (by rw [hL];exact hm.2.2.2.2.2.2.2) + (by simpa only [hP] using hi.1) + (by simpa only [hP] using hi.2) + simpa only [hP,show (8:ℝ)+2=10 by norm_num] using hh + + + + +theorem eventually_four_high_score_procedure {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b₀ τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ {A : Type} [Fintype A] (g : ℝ) (F : Finset J) (hF : F.Nonempty) + (Flat : J→Submodule K (I→K)) (H : Finset J) (hH : H.Nonempty) + (Hyper : J→Submodule K (I→K)) (X XH U S : Finset (ℙ K (I→K))) + (t₀ : ℝ) (ht₀ : 0flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) → + t₀=(Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5) → + S=peelSet (P η σ D R/10000flatPoints (Flat j)) XH ⌈t₀⌉₊ (Nat.ceil_pos.mpr ht₀) → + Real.exp (2*σ+g)/4≤S.card → + (∀x,ownCell F hF (fun j=>flatPoints (Flat j)) XH + (peelLength (P η σ D R/10000flatPoints (Flat j)) XH ⌈t₀⌉₊ (Nat.ceil_pos.mpr ht₀)) x⊆rawOwn x) → + (∀x,ownCell H hH (fun j=>flatPoints (Hyper j)) X + (peelLength (P η σ D R/10000flatPoints (Hyper j)) X ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _)) x⊆rawOwn x) → + (∀x,S∩rawOwn x=C (ia x)∪C (ib x)) → + (∑j,(C j).card)≤3*S.card → (∀j,C j⊆S) → + (∀x,C (ic x)=C (ia x)∩C (ib x)) → + (Nat.card K:ℝ)*P η σ D R≤S.card → + (Nat.card K:ℝ)/S.card≤1/100 → (∀x,ownFraction S (C (ia x)) (C (ib x))≤2/25) → + Real.exp (-8*P η σ D R*τ)/4≤ + (scheduleMeasure (fun _ : S => L₀*pointStrength S) R).real + {ω | let W := decoded U S (fun x => C (ia x)∪C (ib x)) (fun x => Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x))))) (emptyTests (exceptional S C) (hyperplaneSupport S) ω).card ω + (sampleCount ω:ℝ)≤2*((Nat.card K:ℝ)*P η σ D R) ∧ + (W.card:ℝ)≤(S.card:ℝ)*Real.exp (10*P η σ D R) ∧ + (9/10:ℝ)*S.card≤((W∩S).card:ℝ)} := by + have hi := eventually_four_high_score_integrals hη hη' Cb hCb + have hp := eventually_procedure_margins hη hη' Cb hCb + have hm := eventually_score_margins hη hη' Cb hCb + have ht := (tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<200) (beta_pos hη))).eventually (eventually_lt_nhds (by norm_num : (0:ℝ)<1/10)) + have hl := eventually_hierarchy hη hη' Cb 1 10000000000 hCb (by norm_num) + filter_upwards [eventually_ge_atTop (10:ℝ),hi,hp,hm,ht,hl] with σ hσ hi hp hm ht hl + rw [←neg_mul] at ht + intro D b₀ τ R L₀ q K I J _ _ _ _ _ _ _ _ A _ g F hF Flat H hH Hyper X XH U S t₀ ht₀ rawOwn C ia ib ic T + hq hcard hσq hI hr hL hb₀ hbhi hτ hτhi hSU hdens hprod hg hg' hFlat hcover hHyper hHcover hnX hori hXH htc hpeel hquarter hraw hrawH hOwn hC hCS hCc hnP hdiv hf + have hdim : finrank K (I→K)=4+1 := by rw [Module.finrank_pi, hI] + have hS : S.Nonempty := Finset.card_pos.mp (Nat.cast_pos.mp (lt_of_lt_of_le (div_pos (Real.exp_pos _) (by norm_num)) hquarter)) + have hret : X.card≤4*S.card := by exact_mod_cast (show (X.card:ℝ)≤4*S.card by rw [hnX];linarith only [hquarter]) + have hHX : XH⊆X := hXH▸peel_subset _ H hH (fun j=>flatPoints (Hyper j)) X _ _ + have hSH : S⊆XH := hpeel▸peel_subset _ F hF (fun j=>flatPoints (Flat j)) XH _ _ + have hSX : S⊆X := hSH.trans hHX + have hP : (L₀:ℝ)*R=P η σ D R := by rw [hL];rfl + have hi := hi D b₀ τ R L₀ q K I J g F hF Flat H hH Hyper X XH U S t₀ ht₀ rawOwn C ia ib ic + hq hcard hσq hI hr hL hb₀ hbhi hτhi hg hg' hFlat hcover hHyper hHcover hnX hori hXH htc hpeel hquarter hraw hrawH hOwn hC hCS hCc hdiv hf + have hp := hp D b₀ τ R hr hb₀ hbhi hτhi + have hm := hm D b₀ τ R hr hb₀ hbhi hτhi + have hlarge : 10000000000≤(L₀:ℝ) := by rw [hL];exact (hl D R b₀ τ hr hbhi hτhi).1 + have hq10 : (10:ℝ)≤Nat.card K := by rw [hcard,←hσq];linarith only [Real.add_one_le_exp σ,hσ] + have hτ8 : 8*τ≤4/5 := by linarith only [hτhi,ht] + have hbcount := irregular_card_bound (d:=4) hdim (by norm_num) S C hS hC + (ξ:=(L₀:ℝ)/100) (by linarith only [Real.add_one_le_exp ((L₀:ℝ)/100),hlarge]) + have hpay := ScoreScalars.exp_sub_le_scaled (a:=0) (b:=2*((L₀:ℝ)/100)) + (C:=20000000) (by norm_num) (by + linarith only [Real.log_le_self (by norm_num : (0:ℝ)≤20000000),hlarge]) + simp only [neg_zero,Real.exp_zero] at hpay + rw [show -(2*((L₀:ℝ)/100))=(-2)*((L₀:ℝ)/100) by ring] at hpay + have hbad : ((irregular (d:=4) S C ((L₀:ℝ)/100)).card:ℝ)≤(S.card:ℝ)/100 := by + apply hbcount.trans + nlinarith only [mul_le_mul_of_nonneg_right hpay (Nat.cast_nonneg S.card : (0:ℝ)≤S.card)] + have hh := cell_score_from_integrals (d:=4) hdim (by norm_num) hq10 X U S hSX hSU hS hret C hC ia ib hf T L₀ R b₀ τ 8 + hτ hτ8 hdens hprod (by rw [hP];exact hp.1) (by norm_num) (by rwa [hP]) hbad + (by rw [hP];dsimp only at hp;linarith only [hp.2.1]) + (by rw [hP,hL];exact hp.2.2.1) + (by rw [hP];exact hp.2.2.2.1) + (by rw [hP];exact hp.2.2.2.2) + (by rw [hP,hL];exact hm.2.2.2.2.2.2.1) + (by rw [hL];exact hm.2.2.2.2.2.2.2) + (by simpa only [hP] using hi.1) + (by simpa only [hP] using hi.2) + simpa only [hP,show (8:ℝ)+2=10 by norm_num] using hh + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourLowTraining.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourLowTraining.lean new file mode 100644 index 0000000000000000000000000000000000000000..6cc106ae78b152a41dac074333ec3aa928257492 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionFourLowTraining.lean @@ -0,0 +1,219 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.DimensionFourLowProcedure +import OAI.Combinatorics.RamseyFive.Entropy.UniformCutoff +import OAI.Combinatorics.RamseyFive.Geometry.DimensionTwoPublic +import OAI.Combinatorics.RamseyFive.Decoding.PeelMessage + +namespace OAI + + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_four_low_training_score {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ g : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K (I→K)) + (X U : Finset (ℙ K (I→K))) (T : Finset (ℙ K (Dual K (I→K)))), + Nat.card K=q → Real.exp σ=q → Fintype.card I=5 → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → X⊆U → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(X.card:ℝ)*T.card → + (X.card:ℝ)=Real.exp (3*σ/2+g) → + 100*(Nat.card K:ℝ)*P η σ D R<(X.card:ℝ) → + (X.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp (P η σ D R/10000) → + (∀j∈F,finrank K (Flat j)=3) → + (∀V : Submodule K (I→K),finrank K V=3 → ∃j∈F,Flat j=V) → + let t := (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5) + let ht : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + let a := queryPart F hF (fun j=>flatPoints (Flat j)) X m + (∀i,(C i).card≤(S.card:ℝ)/25) → + S⊆X ∧ X.card≤2*S.card ∧ + Real.exp (-8*P η σ D R*τ)/4≤ + (scheduleMeasure (fun _ : S=>L₀*pointStrength S) R).real + (trueScoreSuccess U S (fun x=>C (a x)) + (fun x=>Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (a x)) ∅))) + (exceptional S C) R (2*(Nat.card K:ℝ)*P η σ D R) + ((S.card:ℝ)*Real.exp (10*P η σ D R)) ((9/10:ℝ)*S.card)) := by + have hh := eventually_four_low_score_procedure hη hη' Cb hCb + have htau := (tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<200) (beta_pos hη))).eventually + (eventually_lt_nhds (by norm_num : (0:ℝ)<1/2)) + have hp := (tendsto_rpow_atTop (mul_pos (by norm_num : (0:ℝ)<10) (beta_pos hη))).eventually + (eventually_ge_atTop (4:ℝ)) + filter_upwards [hh,htau,hp,eventually_ge_atTop (10:ℝ)] with σ hh htau hp hσ + rw [←neg_mul] at htau + intro D b τ g R L₀ q K I J _ _ _ _ _ _ _ _ F hF Flat X U T hcard hσq hI hr hL hb hbhi hτ hτhi hXU hXT hdens hprod hX hn hLow hFlat hcover + dsimp only + let t := (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5) + have ht : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + let a := queryPart F hF (fun j=>flatPoints (Flat j)) X m + change (∀i,(C i).card≤(S.card:ℝ)/25) → _ + intro hsmall + have hSX : S⊆X := peel_subset _ _ _ _ _ _ _ + have hret : X.card≤2*S.card := peel_half _ _ _ _ _ _ _ + have hret' : (X.card:ℝ)≤2*S.card := by exact_mod_cast hret + have hSn : 0<(S.card:ℝ) := by nlinarith only [hret',hX,Real.exp_pos (3*σ/2+g)] + have hS : S.Nonempty := Finset.card_pos.mp (Nat.cast_pos.mp hSn) + have hP : 4≤P η σ D R := hp.trans (finite_bounds hη hη' (by linarith) hr).2.2.2.2.2.1 + have hq : 2flatPoints (Flat j)) X m) + (clippedPart_disjoint S F hF (fun j=>flatPoints (Flat j)) X m) + have hqP : (Nat.card K:ℝ)*P η σ D R≤S.card := by nlinarith only [hn,hret',hqp,hP] + have hdiv : (Nat.card K:ℝ)/S.card≤1/100 := by + apply (div_le_iff₀ hSn).mpr + nlinarith only [hn,hret',mul_le_mul_of_nonneg_left hP hqp.le] + have hc := hh D b τ R L₀ q K I J g F hF Flat X U S t ht + (publicOwn (greedyList F hF (fun j=>flatPoints (Flat j)) X m)) C a (fun _=>none) (fun _=>none) T + hq hcard hσq hI hr hL hb hbhi hτ hτhi hg hSX (hSX.trans hXU) hdens hprod + hFlat hcover hX.le rfl rfl (by nlinarith only [hret',hX]) + ((show (S.card:ℝ)≤X.card by exact_mod_cast Finset.card_le_card hSX).trans hnhi) + ((show (S.card:ℝ)≤X.card by exact_mod_cast Finset.card_le_card hSX).trans hLow) + (ownCell_subset_publicOwn F hF (fun j=>flatPoints (Flat j)) X m) + (by intro x;simpa only [C,clippedPart,Finset.union_empty] using clipped_publicOwn S F hF (fun j=>flatPoints (Flat j)) X hSX m x) + (by omega) (clippedPart_subset S F hF (fun j=>flatPoints (Flat j)) X m) + (by intro x;simp [C,clippedPart]) hqP hdiv + (by intro x;exact TrainingCells.small_union S (C (a x)) (C none) hS (hsmall _) (hsmall _)) + refine ⟨hSX,hret,?_⟩ + simpa only [trueScoreSuccess,C,clippedPart,Finset.union_empty,mul_assoc] using hc + +end SharpRamseyFive.ScoreGeometry + + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy MeasurePublicTable Metadata +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_four_low_public_predictor {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ g : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (I→K)] [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K (I→K)) + (X U : Finset (ℙ K (I→K))) (T : Finset (ℙ K (Dual K (I→K)))), + Nat.card K=q → Real.exp σ=q → Fintype.card I=5 → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → X⊆U → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(X.card:ℝ)*T.card → + (X.card:ℝ)=Real.exp (3*σ/2+g) → + 100*(Nat.card K:ℝ)*P η σ D R<(X.card:ℝ) → + (X.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp (P η σ D R/10000) → + (∀j∈F,finrank K (Flat j)=3) → + (∀V : Submodule K (I→K),finrank K V=3 → ∃j∈F,Flat j=V) → + let t := (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5) + let ht : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + (∀i,(C i).card≤(S.card:ℝ)/25) → + let N := scoreCutoff S U (P η σ D R) τ + Real.log (Nat.card (TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K))))≤q ∧ + Real.log N≤Real.log (2*(Nat.card K:ℝ))+scoreSearchCost S U (P η σ D R) τ ∧ + ∃c : TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K)), + ∃ Good : Set (Fin N→Fin R→ℙ K (I→K)→ℕ), + (Measure.pi (fun _ : Fin N=>scheduleMeasure + (fun x=>if x∈U then (L₀*(Nat.card K:ℝ≥0))/(U.card:ℝ≥0) else 0) R)).real + Goodᶜ ≤ Real.exp (-(Nat.card K:ℝ)) ∧ + ∀u∈Good,∃ i : Fin N,∃z : Fin (Fintype.card (ℙ K (Dual K (I→K)))+1), + let W := publicDecoded U (messageOwn c) (messageBase c L₀) z (u i) + W⊆U ∧ (W.card:ℝ)≤(X.card:ℝ)*Real.exp (10*P η σ D R) ∧ + (9/20:ℝ)*X.card≤((W∩X).card:ℝ) := by + have hh := eventually_four_low_training_score hη hη' Cb hCb + filter_upwards [hh,eventually_ge_atTop (100000:ℝ)] with σ hh hσ + intro D b τ g R L₀ q K I J _ _ _ _ _ _ _ _ _ F hF Flat X U T hcard hσq hI hr hL hb hbhi hτ hτhi hXU hXT hdens hprod hX hn hLow hFlat hcover + dsimp only + let t := (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5) + have ht : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + let a := queryPart F hF (fun j=>flatPoints (Flat j)) X m + change (∀i,(C i).card≤(S.card:ℝ)/25) → _ + intro hsmall + have hP : 0≤P η σ D R := le_trans (by norm_num : (0:ℝ)≤1) + ((Real.one_le_rpow (by linarith : (1:ℝ)≤σ) (mul_nonneg (by norm_num) (beta_pos hη).le)).trans + (finite_bounds hη hη' (by linarith) hr).2.2.2.2.2.1) + have hp := hh D b τ g R L₀ q K I J F hF Flat X U T hcard hσq hI hr hL hb hbhi hτ hτhi hXU hXT hdens hprod hX hn hLow hFlat hcover hsmall + change S⊆X ∧ X.card≤2*S.card ∧ _ at hp + obtain ⟨hSX,hret,hprob⟩ := hp + have hret' : (X.card:ℝ)≤2*S.card := by exact_mod_cast hret + have hSn : 0<(S.card:ℝ) := by nlinarith only [hret',hX,Real.exp_pos (3*σ/2+g)] + have hS : S.Nonempty := Finset.card_pos.mp (Nat.cast_pos.mp hSn) + obtain ⟨hcost,c,hOwn,hBase⟩ := one_peel_message σ g (P η σ D R) hP + (by simpa only [Module.finrank_pi,hI] using (le_refl 5)) hσ (hσq.trans (by rw [hcard])) F hF Flat X hX + have hO : ∀x,S∩messageOwn c x=C (a x) := by + intro x + rw [hOwn] + exact clipped_publicOwn S F hF (fun j=>flatPoints (Flat j)) X hSX m x + have hb' : (fun x=>Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (a x)) ∅)))=messageBase c L₀ := by + funext x + rw [hBase] + have hc := clipped_publicOwn S F hF (fun j=>flatPoints (Flat j)) X hSX m x + change S∩publicOwn (greedyList F hF (fun j=>flatPoints (Flat j)) X m) x=C (a x) at hc + rw [hc] + simp only [ownFraction,Finset.union_empty] + rfl + rw [hb'] at hprob + have hx := score_public_implementation U S hS (hSX.trans hXU) (fun x=>C (a x)) + (messageOwn c) hO (messageBase c L₀) (exceptional S C) R L₀ + (P η σ D R) τ ((S.card:ℝ)*Real.exp (10*P η σ D R)) hP hτ.le hprob + dsimp only at hx + let Good := ambientSuccess S (trueScoreSuccess U S (fun x=>C (a x)) (messageBase c L₀) + (exceptional S C) R (2*(Nat.card K:ℝ)*P η σ D R) ((S.card:ℝ)*Real.exp (10*P η σ D R)) ((9/10:ℝ)*S.card)) + refine ⟨?_,hx.1,c,{u | firstIndex Good u≠none},?_,?_⟩ + · simpa only [hcard] using hcost + · simpa only [Set.compl_ofPred,not_not] using hx.2.1 + · intro u hu + obtain ⟨i,hi⟩ := Option.ne_none_iff_exists'.mp hu + obtain ⟨z,hz,_,hsize,hcapture⟩ := hx.2.2 u i hi + have hz' : z L₀*pointStrength S) R).real + {ω | Unsampled x S ω ∧ t < |pointScore S (C a∪C b) F + (Real.exp (-(L₀:ℝ)*(1-ownFraction S (C a) (C b)))) ω|} ≤ + Real.exp (-P η σ D R/2) := by + have ht := eventually_validation_original_tail hη hη' Cb hCb + have hd := eventually_dyad_power_payment hη hη' + have hc := eventually_power_absorption hη hη' (11*2^200) 0 (1/200) + (by positivity) (by norm_num) (by norm_num) + filter_upwards [eventually_ge_atTop (100:ℝ),ht,hd,hc] with σ hσ ht hd hc + intro D b₀ τ R L₀ K V _ _ _ _ _ _ _ x _ J _ S C a b c O F Lines Q t + hdim hq hr hL hb₀ hbhi hτ hS ha hb hC hO hSn hLow hn hf hF hx hLines hxQ hgood ht₀ + have hS0 : (0:ℝ) < S.card := Nat.cast_pos.mpr hS.card_pos + have hδ : 0 < pointStrength (K:=K) S := by + rw [←NNReal.coe_pos,coe_pointStrength] + exact div_pos (by exact_mod_cast Nat.card_pos (α:=K)) hS0 + have hlarge : (11*2^200:ℝ) ≤ Real.exp (P η σ D R/200) := by + simpa only [Real.rpow_zero,mul_one,one_div,div_eq_mul_inv,one_mul,mul_comm (200⁻¹:ℝ)] using hc D R hr + have hcard : ((outsideAt x S (O x)).card:ℝ) ≤ Real.exp (3*σ) := by + have he : (10:ℝ) ≤ Real.exp (σ/2) := by linarith only [Real.add_one_le_exp (σ/2),hσ] + calc + _ ≤ (S.card:ℝ) := Nat.cast_le.mpr (outsideAt_card_le x S (O x)) + _ ≤ 10*Real.exp (5*σ/2) := hSn + _ ≤ Real.exp (σ/2)*Real.exp (5*σ/2) := mul_le_mul_of_nonneg_right he (Real.exp_nonneg _) + _ = _ := by rw [←Real.exp_add];congr 1;ring + have hm (H:F) : mass (radialWeight x (outsideAt x S (O x)) (pointStrength S)) (pencilLines x F H) ≤ 2 := by + rw [hO] + exact (actual_radial_mass_bounds x S C hS a b c ha hb hC F hF hf hn H).2.2.trans (by norm_num) + have hP0 : 0≤P η σ D R := by unfold P;rw [←hL];positivity + have hmass : (pointStrength (K:=K) S:ℝ)*S.card≤Nat.card K := by + rw [coe_pointStrength,div_mul_cancel₀ _ hS0.ne'] + have hlow : (S.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp ((P η σ D R/200)/2) := + hLow.trans (mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by linarith only [hP0])) (sq_nonneg _)) + have hh := score_pair_low_moment x hdim S O (pointStrength S) hδ F + (fun H hH => (hF H hH).1) S.card (P η σ D R/200) hS0 hmass hlow hlarge Lines hLines Q hxQ hm + (off_radialExceptions S O (pointStrength S) Lines Q (Nat.card K) S.card (P η σ D R/200) x hgood) 200 (le_refl _) + have hpay := hd D R (P η σ D R/200) (outsideAt x S (O x)).card hr (le_refl _) hcard + have hmoment : (∑z : DistinctPairs F,strength (pencilLines x F) + (radialWeight x (outsideAt x S (O x)) (pointStrength S)) z^200) ≤ + (scale (K:=K) 4 S.card)^2*Real.exp (P η σ D R/50) := by + apply hh.trans + change 2^200*((Nat.clog 2 (outsideAt x S (O x)).card:ℝ)+1)* + (((Nat.card K:ℝ)^4/S.card)^2*Real.exp (2*(P η σ D R/200))) ≤ _ + calc + _ = ((Nat.card K:ℝ)^4/S.card)^2*(2^200*((Nat.clog 2 (outsideAt x S (O x)).card:ℝ)+1)* + Real.exp (2*(P η σ D R/200))) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left hpay (sq_nonneg _) + have hpairs (u : ℝ) (hu : 0 < u) (_hu2 : u ≤ 2) := + validation_pairs_from_power x (outsideAt x S (O x)) (pointStrength S) F 200 _ hmoment u hu + simp only [hO] at hpairs + exact ht 4 D b₀ τ R L₀ K V x S C a b c F t hdim (by norm_num) (by norm_num) hq hr hL hb₀ hbhi hτ hS + ha hb hC (by convert hSn using 1; norm_num) hn hf hF hx hpairs ht₀ + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionThreeProcedure.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionThreeProcedure.lean new file mode 100644 index 0000000000000000000000000000000000000000..a96f0984cee58e258642768acee1ab3fec2dfbf5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionThreeProcedure.lean @@ -0,0 +1,92 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.PlaneExceptions +import OAI.Combinatorics.RamseyFive.Decoding.DimensionTwoProcedure + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_three_score_procedure {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b₀ τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ {A : Type} [Fintype A] (g : ℝ) (F : Finset J) (hF : F.Nonempty) + (Flat : J→Submodule K (I→K)) (X U S : Finset (ℙ K (I→K))) + (t₀ : ℝ) (ht₀ : 0 flatPoints (Flat j)) X ⌈t₀⌉₊ (Nat.ceil_pos.mpr ht₀) → + Real.exp (3*σ/2+g)/4≤S.card → (S.card:ℝ)≤10*Real.exp (2*σ) → + (∀x,ownCell F hF (fun j => flatPoints (Flat j)) X + (peelLength (P η σ D R/10000 flatPoints (Flat j)) X ⌈t₀⌉₊ (Nat.ceil_pos.mpr ht₀)) x⊆rawOwn x) → + (∀x,S∩rawOwn x=C (ia x)∪C (ib x)) → + (∑j,(C j).card)≤3*S.card → (∀j,C j⊆S) → + (∀x,C (ic x)=C (ia x)∩C (ib x)) → + (Nat.card K:ℝ)*P η σ D R≤S.card → + (Nat.card K:ℝ)/S.card≤1/100 → (∀x,ownFraction S (C (ia x)) (C (ib x))≤2/25) → + Real.exp (-8*P η σ D R*τ)/4≤ + (scheduleMeasure (fun _ : S => L₀*pointStrength S) R).real + {ω | let W := decoded U S (fun x => C (ia x)∪C (ib x)) (fun x => Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x))))) (emptyTests (exceptional S C) (hyperplaneSupport S) ω).card ω + (sampleCount ω:ℝ)≤2*((Nat.card K:ℝ)*P η σ D R) ∧ + (W.card:ℝ)≤(S.card:ℝ)*Real.exp (10*P η σ D R) ∧ + (9/10:ℝ)*S.card≤((W∩S).card:ℝ)} := by + have hi := eventually_three_score_integrals hη hη' Cb hCb + have hp := eventually_procedure_margins hη hη' Cb hCb + have hm := eventually_score_margins hη hη' Cb hCb + have ht := (tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<200) (beta_pos hη))).eventually (eventually_lt_nhds (by norm_num : (0:ℝ)<1/10)) + have hl := eventually_hierarchy hη hη' Cb 1 10000000000 hCb (by norm_num) + filter_upwards [eventually_ge_atTop (10:ℝ),hi,hp,hm,ht,hl] with σ hσ hi hp hm ht hl + rw [←neg_mul] at ht + intro D b₀ τ R L₀ q K I J _ _ _ _ _ _ _ _ A _ g F hF Flat X U S t₀ ht₀ rawOwn C ia ib ic T + hq hcard hσq hI hr hL hb₀ hbhi hτ hτhi hg hSX hSU hdens hprod hFlat hcover hX htc hpeel hquarter hn hraw hOwn hC hCS hCc hnP hdiv hf + have hdim : finrank K (I→K)=3+1 := by rw [Module.finrank_pi, hI] + have hS : S.Nonempty := Finset.card_pos.mp (Nat.cast_pos.mp (lt_of_lt_of_le (div_pos (Real.exp_pos _) (by norm_num)) hquarter)) + have hret : X.card≤4*S.card := by exact_mod_cast (show (X.card:ℝ)≤4*S.card by linarith only [hX,hquarter]) + have hP : (L₀:ℝ)*R=P η σ D R := by rw [hL];rfl + have hi := hi D b₀ τ R L₀ q K I J g F hF Flat X U S t₀ ht₀ rawOwn C ia ib ic + hq hcard hσq hI hr hL hb₀ hbhi hτhi hg hFlat hcover hX htc hpeel hquarter hn hraw hOwn hC hCS hCc hdiv hf + have hp := hp D b₀ τ R hr hb₀ hbhi hτhi + have hm := hm D b₀ τ R hr hb₀ hbhi hτhi + have hlarge : 10000000000≤(L₀:ℝ) := by rw [hL];exact (hl D R b₀ τ hr hbhi hτhi).1 + have hq10 : (10:ℝ)≤Nat.card K := by rw [hcard,←hσq];linarith only [Real.add_one_le_exp σ,hσ] + have hτ8 : 8*τ≤4/5 := by linarith only [hτhi,ht] + have hbcount := irregular_card_bound (d:=3) hdim (by norm_num) S C hS hC + (ξ:=(L₀:ℝ)/100) (by linarith only [Real.add_one_le_exp ((L₀:ℝ)/100),hlarge]) + have hpay := ScoreScalars.exp_sub_le_scaled (a:=0) (b:=2*((L₀:ℝ)/100)) + (C:=20000000) (by norm_num) (by + linarith only [Real.log_le_self (by norm_num : (0:ℝ)≤20000000),hlarge]) + simp only [neg_zero,Real.exp_zero] at hpay + rw [show -(2*((L₀:ℝ)/100))=(-2)*((L₀:ℝ)/100) by ring] at hpay + have hbad : ((irregular (d:=3) S C ((L₀:ℝ)/100)).card:ℝ)≤(S.card:ℝ)/100 := by + apply hbcount.trans + nlinarith only [mul_le_mul_of_nonneg_right hpay (Nat.cast_nonneg S.card : (0:ℝ)≤S.card)] + have hh := cell_score_from_integrals (d:=3) hdim (by norm_num) hq10 X U S hSX hSU hS hret C hC ia ib hf T L₀ R b₀ τ 8 + hτ hτ8 hdens hprod (by rw [hP];exact hp.1) (by norm_num) (by rwa [hP]) hbad + (by rw [hP];dsimp only at hp;linarith only [hp.2.1]) + (by rw [hP,hL];exact hp.2.2.1) + (by rw [hP];exact hp.2.2.2.1) + (by rw [hP];exact hp.2.2.2.2) + (by rw [hP,hL];exact hm.2.2.2.2.2.2.1) + (by rw [hL];exact hm.2.2.2.2.2.2.2) + (by simpa only [hP] using hi.1) + (by simpa only [hP] using hi.2) + simpa only [hP,show (8:ℝ)+2=10 by norm_num] using hh + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionThreePublic.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionThreePublic.lean new file mode 100644 index 0000000000000000000000000000000000000000..45e693d9e03db411826e94ea2804dff5128732b0 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionThreePublic.lean @@ -0,0 +1,168 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Entropy.UniformCutoff +import OAI.Combinatorics.RamseyFive.Geometry.DimensionTwoPublic +import OAI.Combinatorics.RamseyFive.Decoding.PeelMessage + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy MeasurePublicTable Metadata +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_three_public_predictor {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ g : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (I→K)] [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K (I→K)) + (X U : Finset (ℙ K (I→K))) (T : Finset (ℙ K (Dual K (I→K)))), + Nat.card K=q → Real.exp σ=q → Fintype.card I=4 → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → X⊆U → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^4*Real.exp (-b)≤(X.card:ℝ)*T.card → + (X.card:ℝ)=Real.exp (3*σ/2+g) → + 100*(Nat.card K:ℝ)*P η σ D R<(X.card:ℝ) → + (∀j∈F,finrank K (Flat j)=3) → + (∀V : Submodule K (I→K),finrank K V=3 → ∃j∈F,Flat j=V) → + let t := (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5) + let ht : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + (∀i,(C i).card≤(S.card:ℝ)/25) → + let N := scoreCutoff S U (P η σ D R) τ + Real.log (Nat.card (TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K))))≤q ∧ + Real.log N≤Real.log (2*(Nat.card K:ℝ))+scoreSearchCost S U (P η σ D R) τ ∧ + ∃c : TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K)), + ∃ Good : Set (Fin N→Fin R→ℙ K (I→K)→ℕ), + (Measure.pi (fun _ : Fin N=>scheduleMeasure + (fun x=>if x∈U then (L₀*(Nat.card K:ℝ≥0))/(U.card:ℝ≥0) else 0) R)).real + Goodᶜ ≤ Real.exp (-(Nat.card K:ℝ)) ∧ + ∀u∈Good,∃ i : Fin N,∃z : Fin (Fintype.card (ℙ K (Dual K (I→K)))+1), + let W := publicDecoded U (messageOwn c) (messageBase c L₀) z (u i) + W⊆U ∧ (W.card:ℝ)≤(X.card:ℝ)*Real.exp (10*P η σ D R) ∧ + (9/20:ℝ)*X.card≤((W∩X).card:ℝ) := by + have hh := eventually_three_training_score hη hη' Cb hCb + filter_upwards [hh,eventually_ge_atTop (100000:ℝ)] with σ hh hσ + intro D b τ g R L₀ q K I J _ _ _ _ _ _ _ _ _ F hF Flat X U T hcard hσq hI hr hL hb hbhi hτ hτhi hXU hXT hdens hprod hX hn hFlat hcover + dsimp only + let t := (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5) + have ht : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + let a := queryPart F hF (fun j=>flatPoints (Flat j)) X m + change (∀i,(C i).card≤(S.card:ℝ)/25) → _ + intro hsmall + have hP : 0≤P η σ D R := le_trans (by norm_num : (0:ℝ)≤1) + ((Real.one_le_rpow (by linarith : (1:ℝ)≤σ) (mul_nonneg (by norm_num) (beta_pos hη).le)).trans + (finite_bounds hη hη' (by linarith) hr).2.2.2.2.2.1) + have hp := hh D b τ g R L₀ q K I J F hF Flat X U T hcard hσq hI hr hL hb hbhi hτ hτhi hXU hXT hdens hprod hX hn hFlat hcover hsmall + change S⊆X ∧ X.card≤2*S.card ∧ _ at hp + obtain ⟨hSX,hret,hprob⟩ := hp + have hret' : (X.card:ℝ)≤2*S.card := by exact_mod_cast hret + have hSn : 0<(S.card:ℝ) := by nlinarith only [hret',hX,Real.exp_pos (3*σ/2+g)] + have hS : S.Nonempty := Finset.card_pos.mp (Nat.cast_pos.mp hSn) + obtain ⟨hcost,c,hOwn,hBase⟩ := one_peel_message σ g (P η σ D R) hP + (by rw [Module.finrank_pi,hI];norm_num) hσ (hσq.trans (by rw [hcard])) F hF Flat X hX + have hO : ∀x,S∩messageOwn c x=C (a x) := by + intro x + rw [hOwn] + exact clipped_publicOwn S F hF (fun j=>flatPoints (Flat j)) X hSX m x + have hb' : (fun x=>Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (a x)) ∅)))=messageBase c L₀ := by + funext x + rw [hBase] + have hc := clipped_publicOwn S F hF (fun j=>flatPoints (Flat j)) X hSX m x + change S∩publicOwn (greedyList F hF (fun j=>flatPoints (Flat j)) X m) x=C (a x) at hc + rw [hc] + simp only [ownFraction,Finset.union_empty] + rfl + rw [hb'] at hprob + have hx := score_public_implementation U S hS (hSX.trans hXU) (fun x=>C (a x)) + (messageOwn c) hO (messageBase c L₀) (exceptional S C) R L₀ + (P η σ D R) τ ((S.card:ℝ)*Real.exp (10*P η σ D R)) hP hτ.le hprob + dsimp only at hx + let Good := ambientSuccess S (trueScoreSuccess U S (fun x=>C (a x)) (messageBase c L₀) + (exceptional S C) R (2*(Nat.card K:ℝ)*P η σ D R) ((S.card:ℝ)*Real.exp (10*P η σ D R)) ((9/10:ℝ)*S.card)) + refine ⟨?_,hx.1,c,{u | firstIndex Good u≠none},?_,?_⟩ + · simpa only [hcard] using hcost + · simpa only [Set.compl_ofPred,not_not] using hx.2.1 + · intro u hu + obtain ⟨i,hi⟩ := Option.ne_none_iff_exists'.mp hu + obtain ⟨z,hz,_,hsize,hcapture⟩ := hx.2.2 u i hi + have hz' : zscheduleMeasure + (fun x=>if x∈U then (L₀*(Nat.card K:ℝ≥0))/(U.card:ℝ≥0) else 0) R)).real + Goodᶜ ≤ Real.exp (-(Nat.card K:ℝ)) ∧ + ∀t∈Good,∃ i : Fin N,∃z : Fin (Fintype.card (ℙ K (Dual K V))+1), + let W := publicDecoded U (fun _=>∅) (fun _=>Real.exp (-(L₀:ℝ))) z (t i) + W⊆U ∧ (W.card:ℝ)≤(S.card:ℝ)*Real.exp (2*P η σ D R) ∧ + (9/10:ℝ)*S.card≤((W∩S).card:ℝ) := by + have hh := eventually_two_empty_procedure hη hη' Cb hCb + filter_upwards [hh,eventually_ge_atTop (10:ℝ)] with σ hh hσ + intro D b τ R L₀ K V _ _ _ _ _ _ _ _ S U T hdim hq hr hL hb hbhi hτ hτhi hSU hST hdens hprod hn + dsimp only + have hP : 0≤P η σ D R := le_trans (by norm_num : (0:ℝ)≤1) + ((Real.one_le_rpow (by linarith : (1:ℝ)≤σ) (mul_nonneg (by norm_num) (beta_pos hη).le)).trans + (finite_bounds hη hη' (by linarith) hr).2.2.2.2.2.1) + have hS : S.Nonempty := Finset.card_pos.mp (Nat.cast_pos.mp + (lt_of_le_of_lt (mul_nonneg (by positivity : (0:ℝ)≤100*(Nat.card K:ℝ)) hP) hn)) + have hp := hh D b τ R L₀ K V S U T hdim hq hr hL hb hbhi hτ hτhi hSU hST hdens hprod hn + have hx := score_public_implementation U S hS hSU (fun _=>∅) (fun _=>∅) (by simp) + (fun _=>Real.exp (-(L₀:ℝ))) (exceptional S (fun _ : Unit=>∅)) R L₀ + (P η σ D R) τ ((S.card:ℝ)*Real.exp (2*P η σ D R)) hP hτ.le hp + dsimp only at hx + let E := exceptional S (fun _ : Unit=>∅) + let Accept := ambientSuccess S (trueScoreSuccess U S (fun _=>∅) (fun _=>Real.exp (-(L₀:ℝ))) + E R (2*(Nat.card K:ℝ)*P η σ D R) ((S.card:ℝ)*Real.exp (2*P η σ D R)) ((9/10:ℝ)*S.card)) + refine ⟨hx.1,{t | firstIndex Accept t≠none},?_,?_⟩ + · simpa only [Set.compl_ofPred,not_not] using hx.2.1 + · intro t ht + obtain ⟨i,hi⟩ := Option.ne_none_iff_exists'.mp ht + obtain ⟨z,hz,_,hsize,hcapture⟩ := hx.2.2 t i hi + have hz' : z < Fintype.card (ℙ K (Dual K V))+1 := + Nat.lt_succ_of_le (hz.trans (Finset.card_le_univ _)) + refine ⟨i,⟨z,hz'⟩,?_,hsize,hcapture⟩ + exact Finset.filter_subset _ _ + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionThreeTails.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionThreeTails.lean new file mode 100644 index 0000000000000000000000000000000000000000..8def289534eab065895ccea8e128342ad273cc3c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionThreeTails.lean @@ -0,0 +1,225 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.PowerValidation +import OAI.Combinatorics.RamseyFive.Probability.UniformTails + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence CellVariance ScoreRegularity GlobalRadial PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem eventually_three_validation_tail {η : ℝ} (hη : 0 < η) (hη' : η < 1/10) + (Cb : ℝ) (hCb : 0 ≤ Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b₀ τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))], + ∀ (x : ℙ K V) [Fintype (RadialLine x)], + ∀ {J : Type} [Fintype J] (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) (a b c : J) + (O : ℙ K V→Finset (ℙ K V)) (F : Finset (ℙ K (Dual K V))) + (Lines : Finset (Submodule K V)) (Q : Finset (ℙ K V)) (t : ℝ), + finrank K V=4 → (Nat.card K:ℝ)=Real.exp σ → + Range η σ D R → (L₀:ℝ)=L η σ D → 0 ≤ b₀ → b₀ ≤ Cb*D*σ^(6*beta η) → + τ ≤ σ^(-200*beta η) → S.Nonempty → C a⊆S → C b⊆S → C c=C a∩C b → + O x=C a∪C b → (S.card:ℝ) ≤ 10*Real.exp (2*σ) → + (Nat.card K:ℝ)/S.card ≤ 1/100 → ownFraction S (C a) (C b) ≤ 2/25 → + (∀H∈F,Incident x H ∧ H∉exceptional S C) → + x∉irregular (d:=3) S C ((L₀:ℝ)/100) → + (∀l : RadialLine x,l.val∈Lines) → x∈Q → + x∉radialExceptions S O (pointStrength S) Lines Q (Nat.card K) S.card (P η σ D R/200) → + scale (K:=K) 3 S.card*Real.exp (-(b₀+8*P η σ D R*τ+Real.log 16))/10 ≤ t → + (scheduleMeasure (fun _ : S => L₀*pointStrength S) R).real + {ω | Unsampled x S ω ∧ t < |pointScore S (C a∪C b) F + (Real.exp (-(L₀:ℝ)*(1-ownFraction S (C a) (C b)))) ω|} ≤ + Real.exp (-P η σ D R/2) := by + have ht := eventually_validation_original_tail hη hη' Cb hCb + have hd := eventually_dyad_power_payment hη hη' + have hc := eventually_power_absorption hη hη' (4*2^200) 0 (1/200) + (by positivity) (by norm_num) (by norm_num) + filter_upwards [eventually_ge_atTop (100:ℝ),ht,hd,hc] with σ hσ ht hd hc + intro D b₀ τ R L₀ K V _ _ _ _ _ _ _ x _ J _ S C a b c O F Lines Q t + hdim hq hr hL hb₀ hbhi hτ hS ha hb hC hO hSn hn hf hF hx hLines hxQ hgood ht₀ + have hS0 : (0:ℝ) < S.card := Nat.cast_pos.mpr hS.card_pos + have hδ : 0 < pointStrength (K:=K) S := by + rw [←NNReal.coe_pos,coe_pointStrength] + exact div_pos (by exact_mod_cast Nat.card_pos (α:=K)) hS0 + have hlarge : (4*2^200:ℝ) ≤ Real.exp (P η σ D R/200) := by + simpa only [Real.rpow_zero,mul_one,one_div,div_eq_mul_inv,one_mul,mul_comm (200⁻¹:ℝ)] using hc D R hr + have hcard : ((outsideAt x S (O x)).card:ℝ) ≤ Real.exp (3*σ) := by + have he : (10:ℝ) ≤ Real.exp σ := by linarith [Real.add_one_le_exp σ] + calc + _ ≤ (S.card:ℝ) := Nat.cast_le.mpr (outsideAt_card_le x S (O x)) + _ ≤ 10*Real.exp (2*σ) := hSn + _ ≤ Real.exp σ*Real.exp (2*σ) := mul_le_mul_of_nonneg_right he (Real.exp_nonneg _) + _ = _ := by rw [←Real.exp_add];congr 1;ring + have hm (H:F) : mass (radialWeight x (outsideAt x S (O x)) (pointStrength S)) (pencilLines x F H) ≤ 2 := by + rw [hO] + exact (actual_radial_mass_bounds x S C hS a b c ha hb hC F hF hf hn H).2.2.trans (by norm_num) + have hh := score_pair_three_moment x hdim S O (pointStrength S) hδ F + (fun H hH => (hF H hH).1) S.card (P η σ D R/200) hS0 hlarge Lines hLines Q hxQ hm hgood 200 (le_refl _) + have hpay := hd D R (P η σ D R/200) (outsideAt x S (O x)).card hr (le_refl _) hcard + have hmoment : (∑z : DistinctPairs F,strength (pencilLines x F) + (radialWeight x (outsideAt x S (O x)) (pointStrength S)) z^200) ≤ + (scale (K:=K) 3 S.card)^2*Real.exp (P η σ D R/50) := by + apply hh.trans + change 2^200*((Nat.clog 2 (outsideAt x S (O x)).card:ℝ)+1)* + (((Nat.card K:ℝ)^3/S.card)^2*Real.exp (2*(P η σ D R/200))) ≤ _ + calc + _ = ((Nat.card K:ℝ)^3/S.card)^2*(2^200*((Nat.clog 2 (outsideAt x S (O x)).card:ℝ)+1)* + Real.exp (2*(P η σ D R/200))) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left hpay (sq_nonneg _) + have hpairs (u : ℝ) (hu : 0 < u) (_hu2 : u ≤ 2) := + validation_pairs_from_power x (outsideAt x S (O x)) (pointStrength S) F 200 _ hmoment u hu + simp only [hO] at hpairs + exact ht 3 D b₀ τ R L₀ K V x S C a b c F t hdim (by norm_num) (by norm_num) hq hr hL hb₀ hbhi hτ hS + ha hb hC (by convert hSn using 1; norm_num; ring) hn hf hF hx hpairs ht₀ + +end + +section +open Module ProjectiveIncidence CellVariance ScoreRegularity GlobalRadial PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] (x : ℙ K V) [Fintype (RadialLine x)] + +lemma score_degree_three_off_strong_zero (hdim : finrank K V=4) + (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) (δ : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀H∈F,Incident x H) + (a : ℝ) (Lines : Finset (Submodule K V)) (hLines : ∀l : RadialLine x,l.val∈Lines) + (Q : Finset (ℙ K V)) (hxQ : x∈Q) + (hgood : x∉badCenters S O δ a Lines Q 1) (H : F) : + (Finset.univ.filter fun H':F => H≠H' ∧ a ≤ mass + (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H∩pencilLines x F H')).card=0 := by + have hlocal : (localLines S O δ a Lines x).card=0 := by + by_contra hn + have hc : (1:ℝ) ≤ (localLines S O δ a Lines x).card := by exact_mod_cast (Nat.one_le_iff_ne_zero.mpr hn) + exact hgood (Finset.mem_filter.mpr ⟨hxQ,hc⟩) + have hh := score_pair_count_three x hdim (outsideAt x S (O x)) δ hδ F hF a + have hr := richRadials_le_localLines x S O δ a (by exact_mod_cast hδ) Lines hLines + rw [hlocal] at hr + have hpc : (Finset.univ.filter fun z : DistinctPairs F => a ≤ strength (pencilLines x F) + (radialWeight x (outsideAt x S (O x)) δ) z).card=0 := by + simpa only [Nat.le_zero.mp hr,zero_mul,Nat.le_zero] using hh + rw [Finset.card_eq_zero] at hpc ⊢ + apply Finset.eq_empty_iff_forall_notMem.mpr + intro H' hH' + obtain ⟨hne,hm⟩ := (Finset.mem_filter.mp hH').2 + have hm' : (⟨H,⟨H',hne.symm⟩⟩:DistinctPairs F)∈Finset.univ.filter + (fun z : DistinctPairs F => a ≤ strength (pencilLines x F) (radialWeight x (outsideAt x S (O x)) δ) z) := + Finset.mem_filter.mpr ⟨Finset.mem_univ _,hm⟩ + rw [hpc] at hm' + exact Finset.notMem_empty _ hm' + +end + +open Module ProjectiveIncidence CellVariance ScoreRegularity GlobalRadial PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_three_ambient_tail {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0 ≤ Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b₀ τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))], + ∀ (x : ℙ K V) [Fintype (RadialLine x)], + ∀ {J : Type} [Fintype J] (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) (a b c : J) + (O : ℙ K V→Finset (ℙ K V)) (F : Finset (ℙ K (Dual K V))) + (Lines : Finset (Submodule K V)) (Q : Finset (ℙ K V)) (t : ℝ), + finrank K V=4 → (Nat.card K:ℝ)=Real.exp σ → + Range η σ D R → (L₀:ℝ)=L η σ D → 0 ≤ b₀ → b₀ ≤ Cb*D*σ^(6*beta η) → + τ ≤ σ^(-200*beta η) → S.Nonempty → C a⊆S → C b⊆S → C c=C a∩C b → + O x=C a∪C b → (S.card:ℝ) ≤ 10*Real.exp (2*σ) → + (Nat.card K:ℝ)/S.card ≤ 1/100 → ownFraction S (C a) (C b) ≤ 2/25 → + (∀H∈F,Incident x H ∧ H∉exceptional S C) → + x∉irregular (d:=3) S C ((L₀:ℝ)/100) → + (∀l : RadialLine x,l.val∈Lines) → x∈Q → + x∉radialExceptions S O (pointStrength S) Lines Q (Nat.card K) S.card (P η σ D R/200) → + x∉badCenters S O (pointStrength S) (1/(100*(momentOrder σ (P η σ D R):ℝ))) Lines Q 1 → + scale (K:=K) 3 S.card*Real.exp (-(b₀+8*P η σ D R*τ+Real.log 16))/10 ≤ t → + (scheduleMeasure (fun _ : S => L₀*pointStrength S) R).real + {ω | Unsampled x S ω ∧ t < |pointScore S (C a∪C b) F + (Real.exp (-(L₀:ℝ)*(1-ownFraction S (C a) (C b)))) ω|} ≤ (Nat.card K:ℝ)^(-(50:ℝ)) := by + have ht := eventually_low_original_tail hη hη' Cb hCb + have hd := eventually_dyad_power_payment hη hη' + have hc := eventually_power_absorption hη hη' (40*2^200) 0 (1/200) + (by positivity) (by norm_num) (by norm_num) + have h₁₀ := eventually_power_absorption hη hη' 10 0 (1/10000) + (by norm_num) (by norm_num) (by norm_num) + filter_upwards [eventually_ge_atTop (100:ℝ),ht,hd,hc,h₁₀] with σ hσ ht hd hc h₁₀ + intro D b₀ τ R L₀ K V _ _ _ _ _ _ _ x _ J _ S C a b c O F Lines Q t + hdim hq hr hL hb₀ hbhi hτ hS ha hb hC hO hSn hn hf hF hx hLines hxQ hgood hstrong ht₀ + have hS0 : (0:ℝ) (hF H hH).1) S.card (P η σ D R/200) hS0 hl₁ Lines hLines Q hxQ hm hgood 200 (le_refl _) + have hpay := hd D R (P η σ D R/200) (outsideAt x S (O x)).card hr (le_refl _) hcard + have hmoment : (∑z : DistinctPairs F,strength (pencilLines x F) + (radialWeight x (outsideAt x S (O x)) (pointStrength S)) z^200) ≤ + (scale (K:=K) 3 S.card)^2*Real.exp (P η σ D R/50) := by + apply hpair.trans + change 2^200*((Nat.clog 2 (outsideAt x S (O x)).card:ℝ)+1)* + (((Nat.card K:ℝ)^3/S.card)^2*Real.exp (2*(P η σ D R/200))) ≤ _ + calc + _ = ((Nat.card K:ℝ)^3/S.card)^2*(2^200*((Nat.clog 2 (outsideAt x S (O x)).card:ℝ)+1)* + Real.exp (2*(P η σ D R/200))) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left hpay (sq_nonneg _) + apply ht 3 D b₀ τ R L₀ K V x S C a b c F t hdim (by norm_num) (by norm_num) hq hr hL hb₀ hbhi hτ hS + ha hb hC (by convert hSn using 1; norm_num; ring) hSlow hn hf hF hx _ _ _ ht₀ + · intro u hu hu2 + have hh := power_tail_mul (fun z : DistinctPairs F => strength (pencilLines x F) + (radialWeight x (outsideAt x S (O x)) (pointStrength S)) z) (strength_nonneg _ _) 200 u _ hu hmoment + simp only [hO,strength] at hh + convert hh using 1 + congr 2 + · intro H u hu hu2 + have hh := score_degree_three_normalized x hdim (outsideAt x S (O x)) (pointStrength S) hδ F + (fun H hH => (hF H hH).1) H S.card u (P η σ D R/100) hS0 hu hu2 (hm H) hnq hl₂ + simpa only [hO,show 2*(P η σ D R/100)=P η σ D R/50 by ring,scale] using hh + · intro H + have hh := score_degree_three_off_strong_zero x hdim S O (pointStrength S) hδ F + (fun H hH => (hF H hH).1) _ Lines hLines Q hxQ hstrong H + rw [hO] at hh + rw [hh,Nat.cast_zero] + unfold scale;positivity + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionTwo.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionTwo.lean new file mode 100644 index 0000000000000000000000000000000000000000..1568a278845f088f3aae68bfed3a6296835ddcd1 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionTwo.lean @@ -0,0 +1,88 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.DimensionThreePublic +import OAI.Combinatorics.RamseyFive.Geometry.BasePublicFamily +import OAI.Combinatorics.RamseyFive.Entropy.BaseAlphabetCost + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence CellVariance ScoreRegularity SubsetEncoding +open MeasureTheory PoissonScore ScoreAcceptance MeasurePublicTable ParameterHierarchy Filter +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_two_complete_predictor {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [∀x : ℙ K V,Fintype (RadialLine x)], + ∀ (S U : Finset (ℙ K V)) (T : Finset (ℙ K (Dual K V))), + finrank K V=3 → (Nat.card K:ℝ)=Real.exp σ → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → S.Nonempty → S⊆U → S.card≤T.card → + (Nat.card K:ℝ)*(incidences S T:ℝ)≤τ*S.card*T.card → + (Nat.card K:ℝ)^3*Real.exp (-b)≤(S.card:ℝ)*T.card → + let n : Fin (Fintype.card (ℙ K V)+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + Real.log (Fintype.card (baseAlphabet U S.card (P η σ D R) τ):ℝ)≤ + 100*(Nat.card K:ℝ)*P η σ D R*(Real.log ((U.card:ℝ)/S.card)+P η σ D R) ∧ + ∃ Good : Set (BaseTape U (P η σ D R) τ R), + (baseTapeMeasure U (P η σ D R) τ R L₀).real Goodᶜ≤Real.exp (-(Nat.card K:ℝ)) ∧ + ∀t∈Good,∃ m : baseAlphabet U S.card (P η σ D R) τ, + let W := baseMessageDecoded U (P η σ D R) τ R L₀ t ⟨n,m⟩ + W⊆U ∧ (W.card:ℝ)≤(S.card:ℝ)*Real.exp (2*P η σ D R) ∧ + (9/10:ℝ)*S.card≤((W∩S).card:ℝ) := by + have hh := eventually_two_public_predictor hη hη' Cb hCb + filter_upwards [hh,eventually_ge_atTop (10:ℝ)] with σ hh hσ + intro D b τ R L₀ K V _ _ _ _ _ _ _ _ S U T hdim hq hr hL hb hbhi hτ hτhi hS hSU hST hdens hprod + dsimp only + let P₀ := P η σ D R + have hP1 : 1≤P₀ := + (Real.one_le_rpow (by linarith : (1:ℝ)≤σ) (mul_nonneg (by norm_num) (beta_pos hη).le)).trans + (finite_bounds hη hη' (by linarith) hr).2.2.2.2.2.1 + have ht1 : τ≤1 := hτhi.trans (Real.rpow_le_one_of_one_le_of_nonpos + (by linarith : (1:ℝ)≤σ) (by have := beta_pos hη;linarith)) + refine ⟨baseAlphabet_cost hdim S U hS hSU _ τ hP1 hτ.le ht1,?_⟩ + let n : Fin (Fintype.card (ℙ K V)+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + change ∃Good : Set (BaseTape U P₀ τ R), _ + by_cases hn : (S.card:ℝ)≤100*(Nat.card K:ℝ)*P₀ + · refine ⟨Set.univ,?_,?_⟩ + · simp only [Set.compl_univ,measureReal_empty] + exact (Real.exp_pos _).le + · intro t ht + let m : baseAlphabet U S.card P₀ τ := by + simpa only [baseAlphabet,hn,ite_true] using encode S U hSU + refine ⟨m,?_⟩ + have hd := baseDecoded_small U S.card P₀ τ L₀ (t n) hn (encode S U hSU) + change (baseDecoded U S.card P₀ τ L₀ (t n) m)⊆U ∧ + ((baseDecoded U S.card P₀ τ L₀ (t n) m).card:ℝ)≤(S.card:ℝ)*Real.exp (2*P₀) ∧ + (9/10:ℝ)*S.card≤((baseDecoded U S.card P₀ τ L₀ (t n) m∩S).card:ℝ) + rw [hd,decode_encode S U hSU,Finset.inter_self] + refine ⟨hSU,?_,?_⟩ + · exact le_mul_of_one_le_right (by positivity) (Real.one_le_exp_iff.mpr (by linarith)) + · nlinarith only [show (0:ℝ)≤S.card by positivity] + · have hl := hh D b τ R L₀ K V S U T hdim hq hr hL hb hbhi hτ hτhi hSU hST hdens hprod (lt_of_not_ge hn) + dsimp only at hl + obtain ⟨hcost,E,hE,hdecode⟩ := hl + change Set (Fin (sizeScoreCutoff U S.card P₀ τ)→Fin R→ℙ K V→ℕ) at E + refine ⟨{t | t n∈E},?_,?_⟩ + · have hm := baseTape_marginal U P₀ τ R L₀ n Eᶜ + have he : {t : BaseTape U P₀ τ R | t n∈E}ᶜ={t | t n∈Eᶜ} := by ext t;rfl + rw [he,hm] + exact hE + · intro t ht + obtain ⟨i,z,hw⟩ := hdecode (t n) ht + let m : baseAlphabet U S.card P₀ τ := by + simpa only [baseAlphabet,hn,ite_false] using + (show Fin (sizeScoreCutoff U S.card P₀ τ) × Fin (Fintype.card (ℙ K (Dual K V))+1) from (i,z)) + refine ⟨m,?_⟩ + have hd := baseDecoded_large U S.card P₀ τ L₀ (t n) hn (i,z) + change (baseDecoded U S.card P₀ τ L₀ (t n) m)⊆U ∧ + ((baseDecoded U S.card P₀ τ L₀ (t n) m).card:ℝ)≤(S.card:ℝ)*Real.exp (2*P₀) ∧ + (9/10:ℝ)*S.card≤((baseDecoded U S.card P₀ τ L₀ (t n) m∩S).card:ℝ) + rw [hd] + exact hw + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionTwoOriented.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionTwoOriented.lean new file mode 100644 index 0000000000000000000000000000000000000000..51289e10d134502987fa3e0acaa47a91769b2559 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionTwoOriented.lean @@ -0,0 +1,106 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.BaseSmallLaw +import OAI.Combinatorics.RamseyFive.Geometry.ReverseAfterCapture +import OAI.Combinatorics.RamseyFive.Decoding.ReverseParameters + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence FiniteEntropy ReverseCap Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + +noncomputable def twoOrientedLaw (S U : Finset (ℙ K V)) + (T UT : Finset (ℙ K (Dual K V))) (hT : T.Nonempty) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : Law (Option (Finset (ℙ K V))) := + if S.card≤T.card then baseCaptureLaw S U P τ R L₀ else + optionCompose (baseCaptureLaw T UT P τ R L₀) + (nextCapLaw S U T UT hT (reverseLength (Nat.card K) (Real.log ((U.card:ℝ)/S.card))) + (Nat.card K) ((320/((9:ℝ)/10)+320)*(Nat.card K:ℝ)^3/T.card) + ((T.card:ℝ)*Real.exp (2*P))) + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K (Dual K (Dual K V)))] in +lemma baseCaptureLaw_valid (S U : Finset (ℙ K V)) (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (W : Finset (ℙ K V)) (hW : 0baseCaptureLaw_valid S U _ τ R L₀ W hW⟩ + have hh := hbase D b τ R L₀ K V S U T hdim hq hr hL hb hbhi hτ hτhi hS hSU hST hdens hprod + linarith only [hh,Real.exp_pos (-(Nat.card K:ℝ))] + · have hddual : finrank K (Dual K V)=3 := Subspace.dual_finrank_eq.trans hdim + have hTS : T.card≤(S.map bidualPoint.toEmbedding).card := by rw [Finset.card_map];omega + have hdens' : (Nat.card K:ℝ)*(incidences T (S.map bidualPoint.toEmbedding):ℝ)≤ + τ*T.card*(S.map bidualPoint.toEmbedding).card := by + rw [incidences_bidual,Finset.card_map] + nlinarith only [hdens] + have hprod' : (Nat.card K:ℝ)^3*Real.exp (-b)≤(T.card:ℝ)*(S.map bidualPoint.toEmbedding).card := by + rw [Finset.card_map];nlinarith only [hprod] + have hp := hbase D b τ R L₀ K (Dual K V) T UT (S.map bidualPoint.toEmbedding) + hddual hq hr hL hb hbhi hτ hτhi hT hTU hTS hdens' hprod' + have hsparse : 1000*(Nat.card K:ℝ)*incidences S T≤(9:ℝ)/10*S.card*T.card := by + have hh := mul_le_mul_of_nonneg_left hdens (by norm_num : (0:ℝ)≤1000) + have hh' := mul_le_mul_of_nonneg_right hτsmall (show (0:ℝ)≤(S.card:ℝ)*T.card by positivity) + nlinarith only [hh,hh'] + have hl := reverseLength_spec (Nat.card K) (Real.log ((U.card:ℝ)/S.card)) hq1 (enclosure_gap_nonneg S U hS hSU) + obtain ⟨hf,hg⟩ := reverse_after_capture (d:=2) hdim (by norm_num) hqnat S U hS hSU T UT hT + ((T.card:ℝ)*Real.exp (2*P η σ D R)) (Real.exp (-(Nat.card K:ℝ))) + (baseCaptureLaw T UT (P η σ D R) τ R L₀) hp + (fun W hW=>baseCaptureLaw_valid T UT _ τ R L₀ W hW) hsparse + (reverseLength (Nat.card K) (Real.log ((U.card:ℝ)/S.card))) hl.1 hl.2.1 + refine ⟨by simpa only [two_mul] using hf,?_⟩ + intro W hW + have hw := hg W hW + exact ⟨hw.1,hw.2.1.trans (cap_size_absorb _ _ _ _ _ (by positivity) + (by exact_mod_cast hT.card_pos) hprod hbP heP),hw.2.2⟩ + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionTwoPublic.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionTwoPublic.lean new file mode 100644 index 0000000000000000000000000000000000000000..c6d5e5778b71c58f9f661e87425667e49b41c094 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionTwoPublic.lean @@ -0,0 +1,247 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Decoding.PublicTraining +import OAI.Combinatorics.RamseyFive.Geometry.DimensionThreeProcedure +import OAI.Combinatorics.RamseyFive.Geometry.PublicDecoder + +namespace OAI + +section +namespace SharpRamseyFive.ProjectiveIncidence +open Module +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +omit [Field K] [Finite K] in +lemma density_three_quarters {d : ℕ} (hd : 1 ≤ d) (hq : 3 ≤ Nat.card K) : + 3 / (4 * (Nat.card K : ℝ)) ≤ + (Q (Nat.card K) (d-1) : ℝ) / Q (Nat.card K) d := by + have hm : 0 < Q (Nat.card K) (d-1) := Q_pos _ _ + have hn : 0 < Q (Nat.card K) d := Q_pos _ _ + apply (div_le_div_iff₀ (by positivity) (by positivity)).mpr + rw [Q_recurrence hd] + push_cast + have hq' : (3 : ℝ) ≤ Nat.card K := by exact_mod_cast hq + have hm' : (1 : ℝ) ≤ Q (Nat.card K) (d-1) := by exact_mod_cast hm + have hmul := mul_le_mul_of_nonneg_left hm' (by positivity : (0:ℝ) ≤ Nat.card K) + nlinarith + +theorem sparse_half_rectangle_size {d : ℕ} (hdim : finrank K V = d + 1) (hd : 1 ≤ d) (hq3 : 3 ≤ Nat.card K) + (A : Finset (ℙ K V)) (B : Finset (ℙ K (Module.Dual K V))) + (hsparse : (incidences A B : ℝ) ≤ (A.card : ℝ) * B.card / (2 * Nat.card K)) : + (A.card : ℝ) * B.card ≤ 16 * (Nat.card K : ℝ) ^ (d+1) := by + classical + let q : ℝ := Nat.card K + let v : ℝ := (A.card : ℝ) * B.card + let p : ℝ := (Q (Nat.card K) (d-1) : ℝ) / Q (Nat.card K) d + have hq : 0 < q := by + dsimp [q] + exact_mod_cast (Finite.one_lt_card (α := K)).le + have hv : 0 ≤ v := by dsimp [v]; positivity + have hp : 3 / (4*q) ≤ p := density_three_quarters hd hq3 + have hpv := mul_le_mul_of_nonneg_right hp hv + have hlow : v / (4*q) ≤ p*v - incidences A B := by + change (incidences A B : ℝ) ≤ v / (2*q) at hsparse + have he : (3 / (4*q)) * v = 3 * (v / (4*q)) := by field_simp + have he2 : v / (2*q) = 2 * (v / (4*q)) := by field_simp; ring + rw [he] at hpv + rw [he2] at hsparse + linarith + have hm : |(incidences A B : ℝ) - p*v| ≤ Real.sqrt (q^(d-1)*v) := by + simpa only [p, q, v, mul_assoc] using incidence_mixing hdim hd A B + have habs : |(incidences A B : ℝ) - p*v| = p*v - incidences A B := by + rw [abs_of_nonpos (show (incidences A B : ℝ) - p*v ≤ 0 by + have hnonneg : 0 ≤ v / (4*q) := by positivity + linarith)] + ring + rw [habs] at hm + have hs : v / (4*q) ≤ Real.sqrt (q^(d-1)*v) := hlow.trans hm + have hs2 := (Real.le_sqrt (by positivity) (by positivity)).mp hs + have he : (v / (4*q))^2 * (16*q^2) = v^2 := by field_simp; ring + have hm2 := mul_le_mul_of_nonneg_right hs2 (show 0 ≤ 16*q^2 by positivity) + rw [he] at hm2 + have hexp : q^(d-1)*v*(16*q^2) = (16*q^(d+1))*v := by + have hd' : d-1 + 2 = d+1 := by omega + rw [← hd', pow_add] + ring + rw [hexp, pow_two] at hm2 + by_cases hv0 : v = 0 + · change v ≤ _ + rw [hv0] + positivity + · exact (mul_le_mul_iff_left₀ (lt_of_le_of_ne hv (Ne.symm hv0))).mp hm2 + +end SharpRamseyFive.ProjectiveIncidence +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory PoissonScore ScoreAcceptance MeasurePublicTable ParameterHierarchy Filter +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_two_empty_procedure {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [∀x : ℙ K V,Fintype (RadialLine x)], + ∀ (S U : Finset (ℙ K V)) (T : Finset (ℙ K (Dual K V))), + finrank K V=3 → (Nat.card K:ℝ)=Real.exp σ → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → S⊆U → S.card≤T.card → + (Nat.card K:ℝ)*(incidences S T:ℝ)≤τ*S.card*T.card → + (Nat.card K:ℝ)^3*Real.exp (-b)≤(S.card:ℝ)*T.card → + 100*(Nat.card K:ℝ)*P η σ D R<(S.card:ℝ) → + Real.exp (-8*P η σ D R*τ)/4≤ + (scheduleMeasure (fun _ : S=>L₀*pointStrength S) R).real + (trueScoreSuccess U S (fun _=>∅) (fun _=>Real.exp (-(L₀:ℝ))) + (exceptional S (fun _ : Unit=>∅)) R + (2*(Nat.card K:ℝ)*P η σ D R) ((S.card:ℝ)*Real.exp (2*P η σ D R)) ((9/10:ℝ)*S.card)) := by + have hh := eventually_two_score_procedure hη hη' Cb hCb + have ht := (tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<200) (beta_pos hη))).eventually + (eventually_lt_nhds (by norm_num : (0:ℝ)<1/2)) + filter_upwards [hh,ht,eventually_ge_atTop (10:ℝ)] with σ hh ht hσ + rw [←neg_mul] at ht + intro D b τ R L₀ K V _ _ _ _ _ _ _ _ S U T hdim hq hr hL hb hbhi hτ hτhi hSU hST hdens hprod hn + have hP1 : 1≤P η σ D R := + (Real.one_le_rpow (by linarith : (1:ℝ)≤σ) (mul_nonneg (by norm_num) (beta_pos hη).le)).trans + (finite_bounds hη hη' (by linarith) hr).2.2.2.2.2.1 + have hqp : (0:ℝ)∅) (fun _=>()) (fun _=>()) (fun _=>()) T + hdim hq hr hL hb hbhi hτ hτhi hS (by rfl) hSU (by omega) hdens hprod + (by simp) (by simp) (by simp) hnhi hdiv hqP (by norm_num [ownFraction]) + simpa only [trueScoreSuccess,ownFraction,Finset.empty_union,Finset.card_empty,Nat.cast_zero, + zero_div,sub_zero,mul_one,mul_assoc] using hc + +end SharpRamseyFive.ScoreGeometry + +end + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_three_training_score {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ g : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K (I→K)) + (X U : Finset (ℙ K (I→K))) (T : Finset (ℙ K (Dual K (I→K)))), + Nat.card K=q → Real.exp σ=q → Fintype.card I=4 → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → X⊆U → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^4*Real.exp (-b)≤(X.card:ℝ)*T.card → + (X.card:ℝ)=Real.exp (3*σ/2+g) → + 100*(Nat.card K:ℝ)*P η σ D R<(X.card:ℝ) → + (∀j∈F,finrank K (Flat j)=3) → + (∀V : Submodule K (I→K),finrank K V=3 → ∃j∈F,Flat j=V) → + let t := (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5) + let ht : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + let a := queryPart F hF (fun j=>flatPoints (Flat j)) X m + (∀i,(C i).card≤(S.card:ℝ)/25) → + S⊆X ∧ X.card≤2*S.card ∧ + Real.exp (-8*P η σ D R*τ)/4≤ + (scheduleMeasure (fun _ : S=>L₀*pointStrength S) R).real + (trueScoreSuccess U S (fun x=>C (a x)) + (fun x=>Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (a x)) ∅))) + (exceptional S C) R (2*(Nat.card K:ℝ)*P η σ D R) + ((S.card:ℝ)*Real.exp (10*P η σ D R)) ((9/10:ℝ)*S.card)) := by + have hh := eventually_three_score_procedure hη hη' Cb hCb + have htau := (tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<200) (beta_pos hη))).eventually + (eventually_lt_nhds (by norm_num : (0:ℝ)<1/2)) + have hp := (tendsto_rpow_atTop (mul_pos (by norm_num : (0:ℝ)<10) (beta_pos hη))).eventually + (eventually_ge_atTop (4:ℝ)) + filter_upwards [hh,htau,hp,eventually_ge_atTop (10:ℝ)] with σ hh htau hp hσ + rw [←neg_mul] at htau + intro D b τ g R L₀ q K I J _ _ _ _ _ _ _ _ F hF Flat X U T hcard hσq hI hr hL hb hbhi hτ hτhi hXU hXT hdens hprod hX hn hFlat hcover + dsimp only + let t := (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5) + have ht : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + let a := queryPart F hF (fun j=>flatPoints (Flat j)) X m + change (∀i,(C i).card≤(S.card:ℝ)/25) → _ + intro hsmall + have hSX : S⊆X := peel_subset _ _ _ _ _ _ _ + have hret : X.card≤2*S.card := peel_half _ _ _ _ _ _ _ + have hret' : (X.card:ℝ)≤2*S.card := by exact_mod_cast hret + have hSn : 0<(S.card:ℝ) := by nlinarith only [hret',hX,Real.exp_pos (3*σ/2+g)] + have hS : S.Nonempty := Finset.card_pos.mp (Nat.cast_pos.mp hSn) + have hP : 4≤P η σ D R := hp.trans (finite_bounds hη hη' (by linarith) hr).2.2.2.2.2.1 + have hq : 2flatPoints (Flat j)) X m) + (clippedPart_disjoint S F hF (fun j=>flatPoints (Flat j)) X m) + have hqP : (Nat.card K:ℝ)*P η σ D R≤S.card := by nlinarith only [hn,hret',hqp,hP] + have hdiv : (Nat.card K:ℝ)/S.card≤1/100 := by + apply (div_le_iff₀ hSn).mpr + nlinarith only [hn,hret',mul_le_mul_of_nonneg_left hP hqp.le] + have hc := hh D b τ R L₀ q K I J g F hF Flat X U S t ht + (publicOwn (greedyList F hF (fun j=>flatPoints (Flat j)) X m)) C a (fun _=>none) (fun _=>none) T + hq hcard hσq hI hr hL hb hbhi hτ hτhi hg hSX (hSX.trans hXU) hdens hprod + hFlat hcover hX.le rfl rfl (by nlinarith only [hret',hX]) + ((show (S.card:ℝ)≤X.card by exact_mod_cast Finset.card_le_card hSX).trans hnhi) + (ownCell_subset_publicOwn F hF (fun j=>flatPoints (Flat j)) X m) + (by intro x;simpa only [C,clippedPart,Finset.union_empty] using clipped_publicOwn S F hF (fun j=>flatPoints (Flat j)) X hSX m x) + (by omega) (clippedPart_subset S F hF (fun j=>flatPoints (Flat j)) X m) + (by intro x;simp [C,clippedPart]) hqP hdiv + (by intro x;exact TrainingCells.small_union S (C (a x)) (C none) hS (hsmall _) (hsmall _)) + refine ⟨hSX,hret,?_⟩ + simpa only [trueScoreSuccess,C,clippedPart,Finset.union_empty,mul_assoc] using hc + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionalScale.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionalScale.lean new file mode 100644 index 0000000000000000000000000000000000000000..9bbdbcd6db91044da79832ff2306da05b2aac5f5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/DimensionalScale.lean @@ -0,0 +1,247 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.EventuallyHighPolyCost +import OAI.Combinatorics.RamseyFive.Geometry.MomentOrder +import OAI.Combinatorics.RamseyFive.Entropy.LowBudgetPoly + +namespace OAI + +noncomputable section +namespace SharpRamseyFive.ScoreGeometry + +section +open scoped BigOperators + +noncomputable def dimensionalScale (q d : ℕ) (n : ℝ) : ℝ := (q:ℝ)^d/n + +lemma pencil_alphabet_exp {q k : ℕ} {σ : ℝ} (hk : 1≤k) (hσ : 0≤σ) + (hq : (q:ℝ)=Real.exp σ) : (pencilAlphabet q k:ℝ)≤(k:ℝ)*Real.exp (((k:ℝ)-1)*σ) := by + have hq1 : 1≤q := by exact_mod_cast (hq▸Real.one_le_exp_iff.mpr hσ) + have hh := pencilAlphabet_le (k:=k) hq1 + rw [hq,←Real.exp_nat_mul,Nat.cast_sub hk,Nat.cast_one] at hh + exact hh + +lemma dimensional_budget_ratios {q d : ℕ} {σ n : ℝ} (hd : 2≤d) (hdhi : d≤4) + (hσ : 20≤σ) (hq : (q:ℝ)=Real.exp σ) (hn : 0 L ≤ C).card ≤ u) + (hhyper : ∀ H : Submodule K V, finrank K H = 4 → (F.filter fun C => C ≤ H).card ≤ u) + (X : Finset (ℙ K V)) (D : ℕ) (hD : 8*(2*u+1) ≤ D) : + ((X.filter fun x => D ≤ (F.filter fun A => x.submodule ≤ A).card).card:ℝ)*D^2 ≤ + 16*(F.card:ℝ)^2 := by + let Y := X.filter fun x => D ≤ (F.filter fun A => x.submodule ≤ A).card + have hsub : Y ⊆ X.filter fun x => 8*(2*u+1) ≤ (F.filter fun A => x.submodule ≤ A).card := by + intro x hx + obtain ⟨hxX,hxD⟩ := Finset.mem_filter.mp hx + exact Finset.mem_filter.mpr ⟨hxX,hD.trans hxD⟩ + have h1 : (Y.card:ℝ)*D^2 ≤ ∑ x ∈ Y, ((F.filter fun A => x.submodule ≤ A).card:ℝ)^2 := by + have h := Finset.sum_le_sum (s := Y) (f := fun _ => (D:ℝ)^2) + (g := fun x => ((F.filter fun A => x.submodule ≤ A).card:ℝ)^2) (by + intro x hx + apply pow_le_pow_left₀ (by positivity) + exact_mod_cast (Finset.mem_filter.mp hx).2) + simpa using h + have h2 := Finset.sum_le_sum_of_subset_of_nonneg hsub (fun x _ _ => + sq_nonneg ((F.filter fun A => x.submodule ≤ A).card:ℝ)) + exact (h1.trans h2).trans (high_degree_second_moment F hF u hline hhyper X) + +end SharpRamseyFive.RichPlaneOverlap + +namespace SharpRamseyFive.RichPlaneGeometry +open Module SharpRamseyFive.ProjectiveIncidence +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] + +lemma inf_eq_shared_line {A B L : Submodule K V} + (hA : finrank K A = 3) (hB : finrank K B = 3) (hL : finrank K L = 2) + (hAB : A ≠ B) (hLA : L ≤ A) (hLB : L ≤ B) : A ⊓ B = L := by + have hle : L ≤ A ⊓ B := le_inf hLA hLB + have he : A ⊓ B < A := lt_of_le_of_ne inf_le_left (by + intro he + have hab : A ≤ B := he ▸ inf_le_right + exact hAB (Submodule.eq_of_le_of_finrank_eq hab (hA.trans hB.symm))) + have hge := Submodule.finrank_mono hle + have hlt := Submodule.finrank_lt_finrank_of_lt he + rw [hA] at hlt + rw [hL] at hge + exact (Submodule.eq_of_le_of_finrank_eq hle (by omega)).symm + +theorem rich_planes_through_line [Finite K] + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 3) + (X : Finset (ℙ K V)) (M : ℕ) + (hM : ∀ A ∈ F, M ≤ (X.filter fun x => x.submodule ≤ A).card) + (L : Submodule K V) (hL : finrank K L = 2) : + (F.filter fun A => L ≤ A).card*M ≤ + X.card + (F.filter fun A => L ≤ A).card*(Nat.card K+1) := by + let : Finite V := Module.finite_of_finite K + let G := F.filter fun A => L ≤ A + let Y := X.filter fun x => x.submodule ≤ L + let T (A : Submodule K V) := X.filter fun x => x.submodule ≤ A ∧ ¬x.submodule ≤ L + have hY : Y.card ≤ Nat.card K+1 := by + have hi : Function.Injective (fun x : Y => (⟨x.val,(Finset.mem_filter.mp x.property).2⟩ : + {p : ℙ K V // p.submodule ≤ L})) := by + intro x y he + exact Subtype.ext (congrArg (fun z : {p : ℙ K V // p.submodule ≤ L} => z.val) he) + have hc := Nat.card_le_card_of_injective _ hi + rw [Nat.card_eq_fintype_card, Fintype.card_coe, card_subspacePoints, hL] at hc + simpa [Finset.sum_range_succ, add_comm] using hc + have hdis : (G : Set (Submodule K V)).PairwiseDisjoint T := by + intro A hA B hB hAB + obtain ⟨hAF,hLA⟩ := Finset.mem_filter.mp hA + obtain ⟨hBF,hLB⟩ := Finset.mem_filter.mp hB + have he := inf_eq_shared_line (hF A hAF) (hF B hBF) hL hAB hLA hLB + apply Finset.disjoint_left.mpr + intro x hxA hxB + obtain ⟨_,hxAA,hxL⟩ := Finset.mem_filter.mp hxA + have hxBB := (Finset.mem_filter.mp hxB).2.1 + exact hxL (he ▸ le_inf hxAA hxBB) + have hunion : G.biUnion T ⊆ X := by + intro x hx + obtain ⟨A,_,hxA⟩ := Finset.mem_biUnion.mp hx + exact (Finset.mem_filter.mp hxA).1 + have hsum : ∑ A ∈ G, (T A).card ≤ X.card := by + rw [← Finset.card_biUnion hdis] + exact Finset.card_le_card hunion + have hrow (A : Submodule K V) (hA : A ∈ G) : M ≤ (T A).card + Y.card := by + have hpart := Finset.card_filter_add_card_filter_not + (s := X.filter fun x => x.submodule ≤ A) (fun x => x.submodule ≤ L) + have hsmall : ((X.filter fun x => x.submodule ≤ A).filter fun x => x.submodule ≤ L).card ≤ Y.card := by + apply Finset.card_le_card + intro x hx + obtain ⟨hxA,hxL⟩ := Finset.mem_filter.mp hx + exact Finset.mem_filter.mpr ⟨(Finset.mem_filter.mp hxA).1,hxL⟩ + have hn : (X.filter fun x => x.submodule ≤ A).filter (fun x => ¬x.submodule ≤ L) = T A := by + simp only [T, Finset.filter_filter] + rw [hn] at hpart + have hm := hM A (Finset.mem_filter.mp hA).1 + omega + have hs := Finset.sum_le_sum hrow + simp only [Finset.sum_add_distrib, Finset.sum_const, smul_eq_mul] at hs + have hm := Nat.mul_le_mul_left G.card hY + dsimp [G] at hm hs hsum + omega + +theorem rich_planes_through_line_twice [Finite K] + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 3) + (X : Finset (ℙ K V)) (M : ℕ) + (hM : ∀ A ∈ F, M ≤ (X.filter fun x => x.submodule ≤ A).card) + (hlarge : 2*(Nat.card K+1) ≤ M) + (L : Submodule K V) (hL : finrank K L = 2) : + (F.filter fun A => L ≤ A).card*M ≤ 2*X.card := by + have h := rich_planes_through_line F hF X M hM L hL + have hm := Nat.mul_le_mul_left (F.filter fun A => L ≤ A).card hlarge + nlinarith + +noncomputable def dualOfHyperplane {d : ℕ} (hdim : finrank K V = d+1) + (A : Submodule K V) (hA : finrank K A = d) : ℙ K (Module.Dual K V) := + Projectivization.mk'' A.dualAnnihilator (by + have hh := Subspace.finrank_add_finrank_dualAnnihilator_eq A + rw [hA,hdim] at hh + omega) + +lemma ker_dualOfHyperplane {d : ℕ} (hdim : finrank K V = d+1) + (A : Submodule K V) (hA : finrank K A = d) : + LinearMap.ker (dualOfHyperplane hdim A hA).rep = A := by + let b := dualOfHyperplane hdim A hA + have he : b.submodule = A.dualAnnihilator := Projectivization.submodule_mk'' _ _ + have hmem : b.rep ∈ A.dualAnnihilator := by + rw [← he, b.submodule_eq] + exact Submodule.mem_span_singleton_self _ + have hle : A ≤ LinearMap.ker b.rep := by + intro a ha + exact ((Submodule.mem_dualAnnihilator b.rep).mp hmem) a ha + have hd := Module.Dual.finrank_ker_add_one_of_ne_zero b.rep_nonzero + exact (Submodule.eq_of_le_of_finrank_eq hle (by rw [hA]; omega)).symm + +lemma dualOfHyperplane_injective {d : ℕ} (hdim : finrank K V = d+1) : + Function.Injective (fun A : {A : Submodule K V // finrank K A = d} => + dualOfHyperplane hdim A.val A.property) := by + intro A B hAB + apply Subtype.ext + have h := congrArg (fun b : ℙ K (Module.Dual K V) => LinearMap.ker b.rep) hAB + simpa only [ker_dualOfHyperplane] using h + +end SharpRamseyFive.RichPlaneGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/Failure.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/Failure.lean new file mode 100644 index 0000000000000000000000000000000000000000..57b2ab6ddee48c38bd6de7d295aae30702cfd8ff --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/Failure.lean @@ -0,0 +1,175 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.Law + +namespace OAI + +namespace SharpRamseyFive.CoreGeometry +open Module SharpRamseyFive.FiniteEntropy +open scoped BigOperators Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + {α β : Type*} [Fintype α] [Fintype β] + +noncomputable def failure (p : Law α) (v : α → V) (f : Module.Dual K V) : ℝ := + ∑ a,if f (v a)≠0 then p a else 0 + +lemma failure_nonneg (p : Law α) (v : α → V) (f : Module.Dual K V) : 0≤failure p v f := by + apply Finset.sum_nonneg + intro a _ + split_ifs + · exact p.nonneg a + · exact le_rfl + +noncomputable def core (p : Law α) (v : α → V) (ρ : ℝ) : Submodule K V := + ⨅ f : {f : Module.Dual K V // failure p v f≤ρ},LinearMap.ker f.val + +lemma mem_core (p : Law α) (v : α → V) (ρ : ℝ) (x : V) : + x∈core (K := K) p v ρ ↔ ∀ f : Module.Dual K V,failure p v f≤ρ → f x=0 := by + simp only [core,Submodule.mem_iInf,LinearMap.mem_ker] + exact ⟨fun h f hf => h ⟨f,hf⟩,fun h f => h f.val f.property⟩ + +lemma core_test (p : Law α) (v : α → V) (ρ : ℝ) (f : Module.Dual K V) + (hf : failure p v f≤ρ) : core (K := K) p v ρ≤LinearMap.ker f := by + intro x hx + exact (mem_core (K := K) p v ρ x).mp hx f hf + +theorem core_failure [FiniteDimensional K V] (p : Law α) (v : α → V) (ρ : ℝ) (hρ : 0≤ρ) : + (∑ a,if v a∉core (K := K) p v ρ then p a else 0)≤finrank K V*ρ := by + let S : Set (Module.Dual K V) := {f | failure p v f≤ρ} + obtain ⟨T,hTS,hcard,hspan,_⟩ := Submodule.exists_finset_span_eq_linearIndepOn K S + have hT : T.card≤finrank K V := by + rw [hcard] + exact (Submodule.finrank_le (Submodule.span K S)).trans_eq Subspace.dual_finrank_eq + have hex (x : V) (hx : x∉core (K := K) p v ρ) : ∃ f∈T,f x≠0 := by + by_contra hn + have hz : ∀ f∈T,f x=0 := by simpa only [not_exists,not_and,not_not] using hn + have hle : Submodule.span K (T:Set (Module.Dual K V))≤LinearMap.ker (Module.Dual.eval K V x) := by + apply Submodule.span_le.mpr + intro f hf + exact hz f hf + rw [hspan] at hle + apply hx + apply (mem_core (K := K) p v ρ x).mpr + intro f hf + exact hle (Submodule.subset_span (show f∈S from hf)) + have hpoint (a : α) : + (if v a∉core (K := K) p v ρ then p a else 0)≤∑ f∈T,if f (v a)≠0 then p a else 0 := by + by_cases h : v a∈core (K := K) p v ρ + · simp only [h,not_true_eq_false,ite_false] + exact Finset.sum_nonneg fun _ _ => by split_ifs; exact p.nonneg a; exact le_rfl + · obtain ⟨f,hf,hfa⟩ := hex (v a) h + simp only [h,not_false_eq_true,ite_true] + have hh := Finset.single_le_sum (s := T) (f := fun f => if f (v a)≠0 then p a else 0) + (fun _ _ => by split_ifs; exact p.nonneg a; exact le_rfl) hf + simpa only [ite_eq_left hfa] using hh + calc + _ ≤ ∑ a,∑ f∈T,if f (v a)≠0 then p a else 0 := Finset.sum_le_sum fun a _ => hpoint a + _ = ∑ f∈T,failure p v f := by rw [Finset.sum_comm]; rfl + _ ≤ ∑ _f∈T,ρ := Finset.sum_le_sum fun f hf => hTS hf + _ = (T.card:ℝ)*ρ := by simp + _ ≤ _ := mul_le_mul_of_nonneg_right (by exact_mod_cast hT) hρ + +theorem core_orthogonal (p : Law α) (v : α → Module.Dual K V) + (q : Law β) (w : β → V) (ρ : ℝ) (hρ : 0<ρ) + (hmiss : (∑ b,q b*failure p v (Module.Dual.eval K V (w b)))≤ρ^2) + (x : Module.Dual K V) (hx : x∈core (K := K) p v ρ) + (y : V) (hy : y∈core (K := K) q w ρ) : x y=0 := by + let B := Finset.univ.filter fun b => ρ mul_nonneg (q.nonneg b) (failure_nonneg p v _)) + _ ≤ _ := hmiss + have hB : (∑ b∈B,q b)≤ρ := by nlinarith + have hf : failure q w x≤ρ := by + apply le_trans _ hB + rw [failure] + have hh : (∑ b∈B,q b)=(∑ b,if b∈B then q b else 0) := by + rw [←Finset.sum_filter] + simp only [Finset.filter_univ_mem] + rw [hh] + apply Finset.sum_le_sum + intro b _ + by_cases h : x (w b)=0 + · simp only [h,ne_eq,not_true_eq_false,ite_false] + split_ifs; exact q.nonneg b; exact le_rfl + · have hb : b∈B := by + apply Finset.mem_filter.mpr + refine ⟨Finset.mem_univ _,?_⟩ + by_contra hn + have he := (mem_core (K := K) p v ρ x).mp hx (Module.Dual.eval K V (w b)) (le_of_not_gt hn) + exact h he + simp only [h,ne_eq,not_false_eq_true,ite_true,hb,le_refl] + exact (mem_core (K := K) q w ρ y).mp hy x hf + +noncomputable def capture (p : Law α) (v : α → V) (ρ : ℝ) : ℝ := + ∑ a,if v a∈core (K := K) p v ρ then p a else 0 + +lemma capture_zero_one (p : Law α) (v : α → V) (ρ : ℝ) : + 0≤capture (K := K) p v ρ ∧ capture (K := K) p v ρ≤1 := by + constructor + · apply Finset.sum_nonneg + intro a _ + split_ifs + · exact p.nonneg a + · exact le_rfl + · calc + _ ≤ ∑ a,p a := Finset.sum_le_sum fun a _ => by + split_ifs + · exact le_rfl + · exact p.nonneg a + _ = 1 := p.sum_one + +lemma capture_failure (p : Law α) (v : α → V) (ρ : ℝ) : + capture (K := K) p v ρ+(∑ a,if v a∉core (K := K) p v ρ then p a else 0)=1 := by + rw [capture,←Finset.sum_add_distrib] + convert p.sum_one using 1 + apply Finset.sum_congr rfl + intro a _ + split_ifs <;> simp_all + + theorem capture_lower [FiniteDimensional K V] (p : Law α) (v : α → V) (ρ : ℝ) (hρ : 0≤ρ) : + 1-(finrank K V:ℝ)*ρ≤capture (K := K) p v ρ := by + linarith [capture_failure (K := K) p v ρ,core_failure (K := K) p v ρ hρ] + +theorem product_core_capture [FiniteDimensional K V] + (p : Law α) (q : Law β) (v : α → Module.Dual K V) (w : β → V) + (ρ : ℝ) (hρ : 0≤ρ) : + 1-2*(finrank K V:ℝ)*ρ≤ + ∑ a,∑ b,if v a∈core (K := K) p v ρ ∧ w b∈core (K := K) q w ρ + then p a*q b else 0 := by + have he : (∑ a,∑ b,if v a∈core (K := K) p v ρ ∧ w b∈core (K := K) q w ρ + then p a*q b else 0)=capture (K := K) p v ρ*capture (K := K) q w ρ := by + rw [capture,capture,Finset.sum_mul] + apply Finset.sum_congr rfl + intro a _ + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro b _ + split_ifs <;> simp_all + rw [he] + have hp := capture_lower (K := K) p v ρ hρ + have hq := capture_lower (K := K) q w ρ hρ + rw [Subspace.dual_finrank_eq] at hp + have hp1 := (capture_zero_one (K := K) p v ρ).2 + have hq1 := (capture_zero_one (K := K) q w ρ).2 + have hprod := mul_nonneg (sub_nonneg.mpr hp1) (sub_nonneg.mpr hq1) + nlinarith + +lemma source_core_capture [FiniteDimensional K V] (hdim : finrank K V=5) + (p : Law α) (q : Law β) (v : α → Module.Dual K V) (w : β → V) : + (19/20:ℝ)≤∑ a,∑ b, + if v a∈core (K := K) p v (1/200) ∧ w b∈core (K := K) q w (1/200) + then p a*q b else 0 := by + have h := product_core_capture p q v w (1/200) (by norm_num) + norm_num [hdim] at h + exact h +end SharpRamseyFive.CoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/FiniteFamily.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/FiniteFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..0cfe9a6a1e4d127cec2230f205fa05efc0fcd2fc --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/FiniteFamily.lean @@ -0,0 +1,196 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.ThreeFiniteOriented + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry + +section +open FiniteEntropy +open scoped Classical +variable {A B I : Type} [Fintype A] [Fintype B] [Fintype I] +noncomputable def FinitePredictor.family (p : I→FinitePredictor A B) + (choose : Finset A→Finset B→I) : FinitePredictor A B where + Tape := ∀i,(p i).Tape + tapeFintype := inferInstance + Message := fun t=>(i : I)×(p i).Message (t i) + messageFintype := fun _=>inferInstance + tapeLaw := piLaw (fun i=>(p i).tapeLaw) + decoded := branchDecoded (fun i=>(p i).decoded) + encoded := fun S T=>branchEncoded (choose S T) ((p (choose S T)).encoded S T) + cost := fun t m=>Real.log (Fintype.card I:ℝ)+(p m.1).cost (t m.1) m.2 +lemma FinitePredictor.family_output (p : I→FinitePredictor A B) + (choose : Finset A→Finset B→I) (S : Finset A) (T : Finset B) : + (FinitePredictor.family p choose).output S T=(p (choose S T)).output S T := by + unfold FinitePredictor.output FinitePredictor.family + exact branch_output_law (fun i=>(p i).tapeLaw) (choose S T) ((p (choose S T)).encoded S T) (fun i=>(p i).decoded) +lemma FinitePredictor.family_cost (p : I→FinitePredictor A B) + (choose : Finset A→Finset B→I) (S : Finset A) (T : Finset B) (C : ℝ) + (hc : ∀t m,(p (choose S T)).encoded S T t=some m→(p (choose S T)).cost t m≤C) + (t) (m) (hm : (FinitePredictor.family p choose).encoded S T t=some m) : + (FinitePredictor.family p choose).cost t m≤Real.log (Fintype.card I:ℝ)+C := by + obtain ⟨z,hz,rfl⟩ := branch_sent _ _ t m hm + change Real.log (Fintype.card I:ℝ)+(p (choose S T)).cost (t (choose S T)) z≤_ + exact add_le_add (le_refl _) (hc _ _ hz) +end + +section +open Module ProjectiveIncidence ProjectiveTraining ProjectiveRestriction +open Metadata FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization NNReal +variable {K : Type} [Field K] [Finite K] [Fintype K] + [Fintype (ℙ K (Fin 5→K))] [Fintype (ℙ K (Dual K (Fin 5→K)))] + [∀ A : Submodule K (Fin 5→K),Fintype (ℙ K A)] + [∀ A : Submodule K (Fin 5→K),Fintype (ℙ K (Dual K A))] + [∀ A : Submodule K (Fin 5→K),Fintype (ℙ K (Dual K (Dual K A)))] +abbrev FourPublicIndex (K : Type) [Field K] [Finite K] [Fintype K] + [Fintype (ℙ K (Fin 5→K))] (σ : ℝ) := + FourBranch (K:=K) (I:=Fin 5) σ (flatIndices (K:=K) (V:=Fin 5→K) 3) + (flatIndices (K:=K) (V:=Fin 5→K) 4) + +noncomputable def fourLocalPredictor (U : Finset (ℙ K (Fin 5→K))) + (UT : Finset (ℙ K (Dual K (Fin 5→K)))) (σ P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + FourPublicIndex K σ→FinitePredictor (ℙ K (Fin 5→K)) (ℙ K (Dual K (Fin 5→K))) + | .inl _ => { + Tape := BaseTable U P τ + tapeFintype := inferInstance + Message := fun _=>BaseMessage U P τ + messageFintype := fun _=>inferInstance + tapeLaw := baseTableLaw U P τ R L₀ + decoded := fun t=>t + encoded := fun X _=>baseFiniteEncoded X U P τ + cost := fun _=>baseFiniteCost U P τ } + | .inr (.inl c) => { + Tape := ScoreTable U σ P τ + tapeFintype := inferInstance + Message := fun _=>ScoredMessage U σ P τ + messageFintype := fun _=>inferInstance + tapeLaw := scoreTableLaw U σ P τ R L₀ + decoded := fun t=>t + encoded := fun X _=>scoreFiniteEncoded X U c.2.1 σ P τ (if c.1 then 9/20 else 9/40) 10 c.2.2 + cost := fun _=>scoreFiniteCost U σ P τ } + | .inr (.inr (.inl a)) => { + Tape := PlanePublicTape (flatEnumeration a.1.1) U UT P τ a.2 + tapeFintype := inferInstance + Message := PlanePublicMessage (flatEnumeration a.1.1) U UT P τ a.2 + messageFintype := fun _=>inferInstance + tapeLaw := planePublicLaw (flatEnumeration a.1.1) U UT P τ R L₀ a.2 + decoded := planePublicDecoded (flatEnumeration a.1.1) U UT P τ a.2 + encoded := fun X T=>planePublicEncoded (flatEnumeration a.1.1) X U T UT P τ a.2 + cost := planePublicCost (flatEnumeration a.1.1) U UT P τ a.2 } + | .inr (.inr (.inr a)) => threeFlatFinitePredictor (flatEnumeration a.1.1) + (flatIndices_rank 4 a.1.1 a.1.2) σ U UT τ P R L₀ a.2 +end + +section +open Module ProjectiveIncidence ProjectiveTraining Metadata FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization NNReal +variable {K : Type} [Field K] [Finite K] [Fintype K] + [Fintype (ℙ K (Fin 5→K))] [Fintype (ℙ K (Dual K (Fin 5→K)))] + [∀ A : Submodule K (Fin 5→K),Fintype (ℙ K A)] + [∀ A : Submodule K (Fin 5→K),Fintype (ℙ K (Dual K A))] + [∀ A : Submodule K (Fin 5→K),Fintype (ℙ K (Dual K (Dual K A)))] + +def FourCertified (X U : Finset (ℙ K (Fin 5→K))) + (T UT : Finset (ℙ K (Dual K (Fin 5→K)))) (σ P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (br : FourPublicIndex K σ) : Prop := + let pred := fourLocalPredictor U UT σ P τ R L₀ br + let p := pred.output X T + p none≤3*Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

fourCertifiedBranch X U T UT σ P τ R L₀) +end + +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy MeasurePublicTable Metadata FiniteEntropy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_four_low_protocol {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ g : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (I→K)] [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K (I→K)) + (X U : Finset (ℙ K (I→K))) (T : Finset (ℙ K (Dual K (I→K)))), + Nat.card K=q → Real.exp σ=q → Fintype.card I=5 → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → X⊆U → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(X.card:ℝ)*T.card → + (X.card:ℝ)=Real.exp (3*σ/2+g) → + 100*(Nat.card K:ℝ)*P η σ D R<(X.card:ℝ) → + (X.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp (P η σ D R/10000) → + (∀j∈F,finrank K (Flat j)=3) → + (∀V : Submodule K (I→K),finrank K V=3 → ∃j∈F,Flat j=V) → + let t := (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5) + let ht : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + (∀i,(C i).card≤(S.card:ℝ)/25) → + let N := scoreCutoff S U (P η σ D R) τ + Real.log (Nat.card (TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K))))≤q ∧ + Real.log N≤Real.log (2*(Nat.card K:ℝ))+scoreSearchCost S U (P η σ D R) τ ∧ + Real.log (Fintype.card (ℙ K (I→K))+1:ℝ)+ + Real.log (Fintype.card (ScoredPayload U S.card σ (P η σ D R) τ):ℝ)≤ + 100*(Nat.card K:ℝ)*P η σ D R*(Real.log ((U.card:ℝ)/X.card)+P η σ D R) ∧ + ∃c : TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K)), + let n : Fin (Fintype.card (ℙ K (I→K))+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + let p₀ := finiteImageLaw (baseTapeMeasure U (P η σ D R) τ R L₀) + (fun t=>(scoredEncoded X U n σ (P η σ D R) τ (9/20) 10 R L₀ c t).map + (scoredMessageDecoded U σ (P η σ D R) τ R L₀ t)) + p₀ none≤Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + change (∀i,(C i).card≤(S.card:ℝ)/25) → _ + intro hsmall + obtain ⟨hcost,hN,code,hfail,hgood⟩ := hh D b τ g R L₀ q K I J F hF Flat X U T + hcard hσq hI hr hL hb hbhi hτ hτhi hXU hXT hdens hprod hX hn hLow hFlat hcover hsmall + have hSX : S⊆X := peel_subset _ _ _ _ _ _ _ + have hret : X.card≤2*S.card := peel_half _ _ _ _ _ _ _ + have hSn : (0:ℝ) + fourFinitePredictor hd σ C.1 C.2 (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun C : PivotContext K V => + fourFinitePredictor (K:=K) (V:=Dual K V) (by simpa using hd) σ C.2 + (C.1.map bidualPoint.toEmbedding) (P η σ D R) (σ^(-800*beta η)) R L₀ + ∀ (tree : BinaryTree I) (j : Address tree), + (∑ z, originalLevelLaw μ ν z * eventMass (orientedPivotTreeLaw f r tree) + (Finset.univ.filter (fun ω => + orientedPivotSuccessAt f r σ hσ hq hd.le (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) + (fun i => hX i _) (fun i => hY i _) (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) tree ω (Finset.univ,Finset.univ) j = none))) ≤ + pathSum tree (fun k => + 10 * pathBudget (fun i => (50*(Nat.card K:ℝ)/(9*((9/100000)*(9/10)))) * F^2 * + relationMass Incident (p (label tree k)) (q i)) (fun _ => 0) tree k + + 10 * pathBudget (fun _ => 0) (fun i => (50*(Nat.card K:ℝ)/(9*((9/100000)*(9/10)))) * F^2 * + relationMass Incident (p i) (q (label tree k))) tree k + + ((Nat.card K:ℝ)/(σ^(-1000*beta η)))*F^2*relationMass Incident (p (label tree k)) (q (label tree k)) + 5*Real.exp (-(Nat.card K:ℝ))) j := by + have ht : ∀ᶠ σ : ℝ in atTop, σ^(-1000*beta η) ≤ ((9/100000:ℝ)*(9/10)^2)/1000 := by + have hp : 0<1000*beta η := mul_pos (by norm_num) (beta_pos hη) + exact ((tendsto_rpow_neg_atTop hp).eventually_lt_const + (by norm_num : (0:ℝ)<((9/100000:ℝ)*(9/10)^2)/1000)).mono (fun σ h=>by simpa only [neg_mul] using h.le) + filter_upwards [eventually_oriented_ready_encoded_failure hη hη' Cb hCb,ht] with σ hn ht + intro D b R L₀ q₀ K V _ _ _ _ _ _ _ _ _ hd hq3 I _ _ A B _ _ μ ν X Y hX hY p q F hF hμ hν hσ hq hcard hr hL hb hbhi hprod + dsimp only + intro tree j + let f := fun C : PivotContext K V => + fourFinitePredictor hd σ C.1 C.2 (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun C : PivotContext K V => + fourFinitePredictor (K:=K) (V:=Dual K V) (by simpa using hd) σ C.2 + (C.1.map bidualPoint.toEmbedding) (P η σ D R) (σ^(-800*beta η)) R L₀ + refine oriented_original_tree_missing f r σ hσ hq hd hq3 μ ν X Y hX hY p q F hF hμ hν + (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) (by norm_num) (by norm_num) + ?_ ?_ (fun _ => 5*Real.exp (-(Nat.card K:ℝ))) (fun _ => by positivity) ?_ tree j + · nlinarith only [ht] + · exact Real.rpow_pos_of_pos (zero_lt_one.trans_le hσ) _ + · intro i a d C hready + exact hn D b R L₀ q₀ K V hd (X i a) C.1 (Y i d) C.2 (hX i a) (hY i d) + hσ hq hcard hr hL hb hbhi hready (hprod i a d) +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/FinrankSpanImage.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/FinrankSpanImage.lean new file mode 100644 index 0000000000000000000000000000000000000000..cfec0798093df98cb90fe49973871ef3cb6f1189 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/FinrankSpanImage.lean @@ -0,0 +1,178 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.SplitEquiv + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open scoped BigOperators +open MeasureTheory ProbabilityTheory +open scoped BigOperators ENNReal NNReal +namespace SharpRamseyFive.ScalarExtension +open Module +variable {K L I : Type*} [Field K] [Field L] [Algebra K L] + +theorem finrank_span_image [Finite I] (s : Set (I → K)) : + finrank L (Submodule.span L (coordinateMap (L := L) '' s)) = + finrank K (Submodule.span K s) := by + have h := finrank_span_range (L := L) (fun v : s => v.val) + rw [Set.range_comp, Subtype.range_val] at h + exact h +end SharpRamseyFive.ScalarExtension + +namespace SharpRamseyFive.AffineChart +open Module +variable {K U V : Type*} [Field K] [AddCommGroup U] [Module K U] + [AddCommGroup V] [Module K V] + +lemma span_lift_normalize {ι : Type*} (v : ι → K × U) (hv : ∀ i, (v i).1 ≠ 0) : + Submodule.span K (Set.range (fun i => ((1 : K), normalize (v i)))) = + Submodule.span K (Set.range v) := by + apply le_antisymm <;> apply Submodule.span_le.mpr + · rintro _ ⟨i, rfl⟩ + change ((1 : K), normalize (v i)) ∈ _ + rw [lift_normalize _ (hv i)] + exact Submodule.smul_mem _ _ (Submodule.subset_span ⟨i, rfl⟩) + · rintro _ ⟨i, rfl⟩ + rw [← reconstruct _ (hv i)] + exact Submodule.smul_mem _ _ (Submodule.subset_span ⟨i, rfl⟩) + +lemma finrank_lift_normalize {ι : Type*} (e : V ≃ₗ[K] K × U) + (v : ι → V) (hv : ∀ i, (e (v i)).1 ≠ 0) : + finrank K (Submodule.span K (Set.range (fun i => ((1 : K), normalize (e (v i)))))) = + finrank K (Submodule.span K (Set.range v)) := by + rw [span_lift_normalize _ hv] + change finrank K (Submodule.span K (Set.range (e.toLinearMap ∘ v))) = _ + rw [Set.range_comp, Submodule.span_image, LinearEquiv.finrank_map_eq] + +lemma lift_mem_span_pair (x y z : U) : + ((1 : K), z) ∈ Submodule.span K {((1 : K), x), ((1 : K), y)} ↔ + ∃ a : K, x + a • (y - x) = z := by + rw [Submodule.mem_span_pair] + constructor + · rintro ⟨a, b, h⟩ + have h1 : a + b = 1 := by simpa using congrArg Prod.fst h + have h2 : a • x + b • y = z := congrArg Prod.snd h + refine ⟨b, ?_⟩ + rw [← h2, smul_sub, show a = 1-b by linear_combination h1] + simp only [sub_smul, one_smul] + abel + · rintro ⟨a, rfl⟩ + refine ⟨1-a, a, ?_⟩ + ext + · simp + · change (1-a) • x + a • y = x + a • (y-x) + simp only [sub_smul, one_smul, smul_sub] + abel +end SharpRamseyFive.AffineChart + +namespace SharpRamseyFive.ProjectiveReduction +open Module Submodule +variable {K V : Type*} [Field K] [Infinite K] [AddCommGroup V] [Module K V] + +theorem exists_to_four [FiniteDimensional K V] + (hdim : finrank K V = 4 ∨ finrank K V = 5) (X : Finset V) : + ∃ f : V →ₗ[K] (Fin 4 → K), Function.Surjective f ∧ + ∀ Y : Finset V, Y ⊆ X → + finrank K (Submodule.span K (f '' (Y : Set V))) = + min (finrank K (Submodule.span K (Y : Set V))) 4 := by + rcases hdim with hd | hd + · let e : V ≃ₗ[K] (Fin 4 → K) := LinearEquiv.ofFinrankEq _ _ (by simpa using hd) + refine ⟨e.toLinearMap, e.surjective, ?_⟩ + intro Y _ + rw [Submodule.span_image, LinearEquiv.finrank_map_eq] + exact (min_eq_left (by simpa [hd] using (Submodule.span K (Y : Set V)).finrank_le)).symm + · exact exists_projection_preserving_ranks 4 hd X + +omit [Infinite K] in +lemma nonzero_of_rank_preserved {U : Type*} [AddCommGroup U] [Module K U] + (f : V →ₗ[K] U) (X : Finset V) (hf : ∀ Y : Finset V, Y ⊆ X → + finrank K (Submodule.span K (f '' (Y : Set V))) = + min (finrank K (Submodule.span K (Y : Set V))) 4) + {v : V} (hv : v ∈ X) (hv0 : v ≠ 0) : f v ≠ 0 := by + classical + have h := hf {v} (by simpa) + rw [Finset.coe_singleton, Set.image_singleton] at h + rw [finrank_span_singleton hv0] at h + intro h0 + rw [Submodule.span_singleton_eq_bot.mpr h0] at h + simp at h +end SharpRamseyFive.ProjectiveReduction + +namespace SharpRamseyFive.AffineRealization +open Module +open AffineChart ScalarExtension ProjectiveReduction +variable {K L I ι : Type*} [Field K] [Field L] [Algebra K L] [Infinite L] + [Fintype I] [Fintype ι] [Nonempty ι] + +theorem exists_realization (hI : Fintype.card I = 4 ∨ Fintype.card I = 5) + (v : ι → I → K) (hv : ∀ i, v i ≠ 0) : + ∃ a : ι → Fin 3 → L, ∀ Y : Finset ι, + finrank L (Submodule.span L ((fun i => ((1 : L), a i)) '' (Y : Set ι))) = + min (finrank K (Submodule.span K (v '' (Y : Set ι)))) 4 := by + classical + let w : ι → I → L := coordinateMap ∘ v + let X : Finset (I → L) := Finset.univ.image w + obtain ⟨f, _, hr⟩ := exists_to_four (K := L) + (V := I → L) (by simpa using hI) X + have hw (i : ι) : f (w i) ≠ 0 := + nonzero_of_rank_preserved f X hr (Finset.mem_image.mpr ⟨i, Finset.mem_univ _, rfl⟩) + (coordinateMap_ne_zero _ (hv i)) + obtain ⟨e, he⟩ := exists_coordinates_of_vectors (K := L) 3 (by simp) + (fun i => f (w i)) hw + refine ⟨fun i => normalize (e (f (w i))), ?_⟩ + intro Y + have hnorm := finrank_lift_normalize e (fun i : Y => f (w i.val)) (fun i => he i.val) + have hrY := hr (Y.image w) (Finset.image_subset_image (Finset.subset_univ Y)) + have hscalar := finrank_span_image (L := L) (v '' (Y : Set ι)) + have hn : Set.range (fun i : Y => f (w i.val)) = f '' (w '' (Y : Set ι)) := by + ext z + simp + have hn' : Set.range (fun i : Y => ((1 : L), normalize (e (f (w i.val))))) = + (fun i => ((1 : L), normalize (e (f (w i))))) '' (Y : Set ι) := by + ext z + simp + rw [hn, hn'] at hnorm + rw [Finset.coe_image] at hrY + rw [hnorm, hrY] + congr 1 + rw [Set.image_image] at hscalar + exact hscalar +end SharpRamseyFive.AffineRealization + +namespace SharpRamseyFive.SubspaceExtension +open Module +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] + +theorem exists_add_rank (W : Submodule K V) (k : ℕ) + (hk : finrank K W + k ≤ finrank K V) : + ∃ U : Submodule K V, W ≤ U ∧ finrank K U = finrank K W + k := by + induction k with + | zero => exact ⟨W, le_rfl, by simp⟩ + | succ k ih => + obtain ⟨U, hWU, hU⟩ := ih (by omega) + have hUt : U ≠ ⊤ := by + intro he + rw [he, finrank_top] at hU + omega + have hx : ∃ x : V, x ∉ U := by + by_contra! h + apply hUt + ext x + simp [h] + obtain ⟨x, hx⟩ := hx + refine ⟨U ⊔ K ∙ x, hWU.trans le_sup_left, ?_⟩ + rw [Submodule.finrank_sup_span_singleton hx, hU] + omega + +theorem exists_rank (W : Submodule K V) (n : ℕ) + (hW : finrank K W ≤ n) (hn : n ≤ finrank K V) : + ∃ U : Submodule K V, W ≤ U ∧ finrank K U = n := by + obtain ⟨U, hU, hr⟩ := exists_add_rank W (n - finrank K W) (by omega) + exact ⟨U, hU, by omega⟩ +end SharpRamseyFive.SubspaceExtension + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/FlagGraph.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/FlagGraph.lean new file mode 100644 index 0000000000000000000000000000000000000000..91edebdffec3be961d9bf42eab0ffb8bf48cf31a --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/FlagGraph.lean @@ -0,0 +1,172 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Iteration.TerminalStream + +namespace OAI + +namespace SharpRamseyFive.FlagConstruction + +open scoped LinearAlgebra.Projectivization +open Module + +variable {K : Type*} [Field K] +abbrev Space (K : Type*) := Fin 5 → K +abbrev Point (K : Type*) [Field K] := ℙ K (Space K) +abbrev DualPoint (K : Type*) [Field K] := ℙ K (Module.Dual K (Space K)) + +def Incident (a : Point K) (b : DualPoint K) : Prop := + a.submodule ≤ LinearMap.ker b.rep + +lemma incident_iff (a : Point K) (b : DualPoint K) : + Incident a b ↔ b.rep a.rep = 0 := by + rw [Incident, Projectivization.submodule_eq, Submodule.span_singleton_le_iff_mem, + LinearMap.mem_ker] + +abbrev Flag (K : Type*) [Field K] := + {ab : Point K × DualPoint K // Incident ab.1 ab.2} + +def graph {N : ℕ} (X : Fin N → Flag K) : SimpleGraph (Fin N) where + Adj i j := (i < j ∧ Incident (X i).1.1 (X j).1.2 ∧ + ¬ Incident (X j).1.1 (X i).1.2) ∨ + (j < i ∧ Incident (X j).1.1 (X i).1.2 ∧ + ¬ Incident (X i).1.1 (X j).1.2) + symm := ⟨fun _ _ h => h.symm⟩ + loopless := ⟨by intro i; simp⟩ + +lemma adj_iff_of_lt {N : ℕ} (X : Fin N → Flag K) {i j : Fin N} (h : i < j) : + (graph X).Adj i j ↔ Incident (X i).1.1 (X j).1.2 ∧ + ¬ Incident (X j).1.1 (X i).1.2 := by + simp only [graph, h, true_and, not_lt_of_ge h.le, false_and, or_false] + +private lemma five_independent {v : Fin 5 → Space K} + {b : Fin 5 → Module.Dual K (Space K)} (hv : v 0 ≠ 0) + (hz : ∀ i j, i ≤ j → b j (v i) = 0) + (hn : ∀ i j, i < j → b i (v j) ≠ 0) : LinearIndependent K v := by + rw [Fintype.linearIndependent_iff] + intro c hc + have hsum : c 0 • v 0 + c 1 • v 1 + c 2 • v 2 + c 3 • v 3 + c 4 • v 4 = 0 := by + simpa [Fin.sum_univ_succ, add_assoc] using hc + have h4 : c 4 = 0 := by + have h := congrArg (b 3) hsum + simp only [map_add, map_smul, map_zero] at h + simp only [hz 0 3 (by decide), hz 1 3 (by decide), hz 2 3 (by decide), + hz 3 3 le_rfl, smul_zero, zero_add] at h + exact (mul_eq_zero.mp h).resolve_right (hn 3 4 (by decide)) + have h3 : c 3 = 0 := by + have h := congrArg (b 2) hsum + simp only [map_add, map_smul, map_zero, h4, zero_smul, add_zero] at h + simp only [hz 0 2 (by decide), hz 1 2 (by decide), hz 2 2 le_rfl, + smul_zero, zero_add] at h + exact (mul_eq_zero.mp h).resolve_right (hn 2 3 (by decide)) + have h2 : c 2 = 0 := by + have h := congrArg (b 1) hsum + simp only [map_add, map_smul, map_zero, h4, h3, zero_smul, add_zero] at h + simp only [hz 0 1 (by decide), hz 1 1 le_rfl, smul_zero, zero_add] at h + exact (mul_eq_zero.mp h).resolve_right (hn 1 2 (by decide)) + have h1 : c 1 = 0 := by + have h := congrArg (b 0) hsum + simp only [map_add, map_smul, map_zero, h4, h3, h2, zero_smul, add_zero] at h + simp only [hz 0 0 le_rfl, smul_zero, zero_add] at h + exact (mul_eq_zero.mp h).resolve_right (hn 0 1 (by decide)) + have h0 : c 0 = 0 := by + simp only [h4, h3, h2, h1, zero_smul, add_zero] at hsum + exact (smul_eq_zero.mp hsum).resolve_right hv + intro i + fin_cases i <;> assumption + +theorem cliqueFree_five {N : ℕ} (X : Fin N → Flag K) : (graph X).CliqueFree 5 := by + intro s hs + let e : Fin 5 ↪o Fin N := s.orderEmbOfFin hs.card_eq + have he (i : Fin 5) : e i ∈ s := s.orderEmbOfFin_mem hs.card_eq i + have hadj (i j : Fin 5) (hij : i < j) : + Incident (X (e i)).1.1 (X (e j)).1.2 ∧ + ¬ Incident (X (e j)).1.1 (X (e i)).1.2 := by + apply (adj_iff_of_lt X (e.strictMono hij)).mp + exact hs.isClique (he i) (he j) (ne_of_lt (e.strictMono hij)) + let v : Fin 5 → Space K := fun i => (X (e i)).1.1.rep + let b : Fin 5 → Module.Dual K (Space K) := fun i => (X (e i)).1.2.rep + have hz (i j : Fin 5) (hij : i ≤ j) : b j (v i) = 0 := by + apply (incident_iff _ _).mp + rcases lt_or_eq_of_le hij with h | rfl + · exact (hadj i j h).1 + · exact (X (e i)).2 + have hn (i j : Fin 5) (hij : i < j) : b i (v j) ≠ 0 := by + exact fun h => (hadj i j hij).2 ((incident_iff _ _).mpr h) + have hli : LinearIndependent K v := five_independent (Projectivization.rep_nonzero _) hz hn + have hspan : Submodule.span K (Set.range v) = ⊤ := + hli.span_eq_top_of_card_eq_finrank (by simp [Space]) + have hker : Submodule.span K (Set.range v) ≤ LinearMap.ker (b 4) := by + apply Submodule.span_le.mpr + rintro _ ⟨i, rfl⟩ + exact hz i 4 (by omega) + rw [hspan, top_le_iff, LinearMap.ker_eq_top] at hker + exact (X (e 4)).1.2.rep_nonzero hker + +end SharpRamseyFive.FlagConstruction + +namespace SharpRamseyFive.FlagConstruction +open Module SharpRamseyFive.Marking SharpRamseyFive.FiniteEntropy SharpRamseyFive.SelectedTuple +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K : Type*} [Field K] {N n : ℕ} + +lemma independent_selector_of_not_cliqueFree (X : Fin N → Flag K) + (h : ¬(graph X)ᶜ.CliqueFree n) : + ∃ e : Fin n ↪o Fin N, TupleIncident (fun i=>(X (e i)).val) ∧ + TupleConsistent (fun i=>(X (e i)).val) := by + rw [SimpleGraph.CliqueFree] at h + push Not at h + obtain ⟨s,hs⟩:=h + let e : Fin n ↪o Fin N:=s.orderEmbOfFin hs.card_eq + have he : ∀ i,e i∈s := fun i=>s.orderEmbOfFin_mem hs.card_eq i + refine ⟨e,fun i=>(X (e i)).property,?_⟩ + intro i j hij hab + by_contra hba + have hadj:=hs.isClique (he i) (he j) (ne_of_lt (e.strictMono hij)) + have hg : (graph X).Adj (e i) (e j) := + (adj_iff_of_lt X (e.strictMono hij)).mpr ⟨hab,hba⟩ + exact hadj.2 hg + +variable [Nonempty (Flag K)] +def encodeRaw (z : FlagPair K (Space K)) : Flag K := + if h : Incident z.1 z.2 then ⟨z,h⟩ else Classical.choice inferInstance + +lemma encodeRaw_leftInverse : Function.LeftInverse (encodeRaw (K:=K)) Subtype.val := by + intro x + apply Subtype.ext + simp only [encodeRaw,dite_eq_left x.property] + +variable [Fintype (Point K)] [Fintype (DualPoint K)] + +theorem initial_consistent_stream (hn : n≤N) (admissible : (Fin N → Flag K) → Prop) + (E : Finset (Fin N → Flag K)) + (hE : 0TupleIncident x ∧ TupleConsistent x) + E hE hgood Subtype.val encodeRaw encodeRaw_leftInverse + (fun s _=>independent_selector_of_not_cliqueFree s (hno s)) +end +end SharpRamseyFive.FlagConstruction + +namespace SharpRamseyFive.Marking +open Module SelectedTuple FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] +variable {n l : ℕ} +lemma tupleIncident_comp (x : Fin n → FlagPair K V) (h : TupleIncident x) + (e : Fin l → Fin n) : TupleIncident (x ∘ e) := fun i=>h (e i) +lemma tupleConsistent_comp (x : Fin n → FlagPair K V) (h : TupleConsistent x) + (e : Fin l ↪o Fin n) : TupleConsistent (x ∘ e) := + fun i j hij=>h (e i) (e j) (e.strictMono hij) +lemma retained_incident (hl : l≤n) (x : Fin n → FlagPair K V) (h : TupleIncident x) + (S : Finset (Fin n)) : TupleIncident (retainedTuple hl x S) := by + apply tupleIncident_comp x h +lemma retained_consistent (hl : l≤n) (x : Fin n → FlagPair K V) (h : TupleConsistent x) + (S : Finset (Fin n)) : TupleConsistent (retainedTuple hl x S) := by + apply tupleConsistent_comp x h +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/FlatAtlas.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/FlatAtlas.lean new file mode 100644 index 0000000000000000000000000000000000000000..3609d69d1a1bc19dd29232e88e25c13f11f08be1 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/FlatAtlas.lean @@ -0,0 +1,81 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.FlatAtlas + +section +open Module +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + +omit [FiniteDimensional K V] [Finite K] in +lemma exists_rank_submodule (r : ℕ) (hr : r ≤ finrank K V) : + ∃ A : Submodule K V, finrank K A = r := by + obtain ⟨s, hcard, hs⟩ := exists_finset_linearIndependent_of_le_finrank (R := K) (M := V) hr + refine ⟨Submodule.span K (s : Set V), ?_⟩ + rw [finrank_span_finset_eq_card (show LinearIndepOn K id (s : Set V) from hs)] + exact hcard + +lemma exists_atlas (r : ℕ) (hr : r ≤ finrank K V) : + ∃ (m : ℕ) (_ : 0 < m) (P : Fin m → Submodule K V), + (∀ i, finrank K (P i) = r) ∧ + ∀ A : Submodule K V, finrank K A = r → ∃ i, P i = A := by + classical + let : Finite V := Module.finite_of_finite K + let T := {A : Submodule K V // finrank K A = r} + let : Fintype T := Fintype.ofFinite T + obtain ⟨A,hA⟩ := exists_rank_submodule (K := K) (V := V) r hr + let : Nonempty T := ⟨⟨A,hA⟩⟩ + let e := (Fintype.equivFin T).symm + refine ⟨Fintype.card T, Fintype.card_pos, fun i => (e i).val, ?_, ?_⟩ + · intro i + exact (e i).property + · intro B hB + refine ⟨e.symm ⟨B,hB⟩, ?_⟩ + simp +end + +open Module +open scoped Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] + +lemma exists_spanning_code (A : Submodule K V) (n : ℕ) (hn : finrank K V≤n) : + ∃f : Fin n→V,Submodule.span K (Set.range f)=A := by + obtain ⟨f,hf,hs,-⟩ := Submodule.exists_fun_fin_finrank_span_eq K (A : Set V) + have hs' : Submodule.span K (Set.range f)=A := hs.trans (Submodule.span_eq _) + have hr : finrank K (Submodule.span K (A : Set V))≤n := (Submodule.finrank_le _).trans hn + let g : Fin n→V := fun i=>if hi : i.val x.submodule ≤ A + +lemma mem_flatPoints (A : Submodule K V) (x : ℙ K V) : + x ∈ flatPoints A ↔ x.submodule ≤ A := by + simp [flatPoints] + +lemma inter_flatPoints (X : Finset (ℙ K V)) (A : Submodule K V) : + X ∩ flatPoints A = X.filter fun x => x.submodule ≤ A := by + ext x + simp only [Finset.mem_inter,mem_flatPoints,Finset.mem_filter] + +lemma line_covered_cap {I : Type*} [DecidableEq I] (T : Finset I) + (P : I → Submodule K V) (X : Finset (ℙ K V)) (A : Submodule K V) + (hA : finrank K A = 2) (hn : ∀ i ∈ T, ¬A ≤ P i) + (hcover : ∀ x ∈ X, x.submodule ≤ A → ∃ i ∈ T, x.submodule ≤ P i) : + (X.filter fun x => x.submodule ≤ A).card ≤ T.card := by + let Y (i : I) := X.filter fun x => x.submodule ≤ A ∧ x.submodule ≤ P i + have hsub : X.filter (fun x => x.submodule ≤ A) ⊆ T.biUnion Y := by + intro x hx + obtain ⟨hxX,hxA⟩ := Finset.mem_filter.mp hx + obtain ⟨i,hi,hxi⟩ := hcover x hxX hxA + exact Finset.mem_biUnion.mpr ⟨i,hi,Finset.mem_filter.mpr ⟨hxX,hxA,hxi⟩⟩ + have hsum : ∑ i ∈ T, (Y i).card ≤ ∑ _i ∈ T, (1:ℕ) := + Finset.sum_le_sum (fun i hi => line_noncontaining_flat_cap X A (P i) hA (hn i hi)) + exact (Finset.card_le_card hsub).trans ((Finset.card_biUnion_le).trans (by simpa using hsum)) + +lemma plane_covered_cap {I : Type*} [DecidableEq I] (T : Finset I) + (P : I → Submodule K V) (X : Finset (ℙ K V)) (A : Submodule K V) + (hA : finrank K A = 3) (hn : ∀ i ∈ T, ¬A ≤ P i) + (hcover : ∀ x ∈ X, x.submodule ≤ A → ∃ i ∈ T, x.submodule ≤ P i) : + (X.filter fun x => x.submodule ≤ A).card ≤ T.card*(Nat.card K+1) := by + let Y (i : I) := X.filter fun x => x.submodule ≤ A ∧ x.submodule ≤ P i + have hsub : X.filter (fun x => x.submodule ≤ A) ⊆ T.biUnion Y := by + intro x hx + obtain ⟨hxX,hxA⟩ := Finset.mem_filter.mp hx + obtain ⟨i,hi,hxi⟩ := hcover x hxX hxA + exact Finset.mem_biUnion.mpr ⟨i,hi,Finset.mem_filter.mpr ⟨hxX,hxA,hxi⟩⟩ + have hsum : ∑ i ∈ T, (Y i).card ≤ ∑ _i ∈ T, (Nat.card K+1) := + Finset.sum_le_sum (fun i hi => plane_noncontaining_flat_cap X A (P i) hA (hn i hi)) + exact (Finset.card_le_card hsub).trans ((Finset.card_biUnion_le).trans (by simpa using hsum)) + +variable {I : Type*} [LinearOrder I] + (F : Finset I) (hF : F.Nonempty) (P : I → Submodule K V) (X : Finset (ℙ K V)) + +lemma captured_cover (J : ℕ) (x : ℙ K V) + (hx : x ∈ X \ remaining F hF (fun i => flatPoints (P i)) X J) : + ∃ j ∈ Finset.range J, x.submodule ≤ P (chosen F hF (fun i => flatPoints (P i)) X j) := by + rw [remaining_eq_sdiff_union] at hx + have hxnot := (Finset.mem_sdiff.mp hx).2 + have hxX := (Finset.mem_sdiff.mp hx).1 + have hm : x ∈ (Finset.range J).biUnion (fun j => flatPoints (P (chosen F hF (fun i => flatPoints (P i)) X j))) := by + by_contra hn + exact hxnot (Finset.mem_sdiff.mpr ⟨hxX,hn⟩) + obtain ⟨j,hj,hxj⟩ := Finset.mem_biUnion.mp hm + exact ⟨j,hj,(mem_flatPoints _ _).mp hxj⟩ + +lemma rich_line_has_containing_flat (J M : ℕ) (hJM : J < M) + (A : Submodule K V) (hA : finrank K A = 2) + (hM : M ≤ ((X \ remaining F hF (fun i => flatPoints (P i)) X J).filter + fun x => x.submodule ≤ A).card) : + ∃ j < J, A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j) := by + by_contra hn + push Not at hn + have hc := line_covered_cap (Finset.range J) + (fun j => P (chosen F hF (fun i => flatPoints (P i)) X j)) + (X \ remaining F hF (fun i => flatPoints (P i)) X J) A hA + (fun j hj => hn j (Finset.mem_range.mp hj)) + (fun x hx _ => captured_cover F hF P X J x hx) + rw [Finset.card_range] at hc + omega + +lemma head_plane_points (J cap : ℕ) (A : Submodule K V) (hA : finrank K A = 3) + (hn : ∀ j < headIndex F hF (fun i => flatPoints (P i)) X J cap, + ¬A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) : + ((X \ remaining F hF (fun i => flatPoints (P i)) X + (headIndex F hF (fun i => flatPoints (P i)) X J cap)).filter + fun x => x.submodule ≤ A).card ≤ + headIndex F hF (fun i => flatPoints (P i)) X J cap*(Nat.card K+1) := by + have hh := plane_covered_cap (Finset.range (headIndex F hF (fun i => flatPoints (P i)) X J cap)) + (fun j => P (chosen F hF (fun i => flatPoints (P i)) X j)) + (X \ remaining F hF (fun i => flatPoints (P i)) X (headIndex F hF (fun i => flatPoints (P i)) X J cap)) A hA + (fun j hj => hn j (Finset.mem_range.mp hj)) + (fun x hx _ => captured_cover F hF P X _ x hx) + simpa only [Finset.card_range] using hh + +lemma atlas_head_tail_cap (J cap : ℕ) (a : I) (ha : a ∈ F) : + ((remaining F hF (fun i => flatPoints (P i)) X (headIndex F hF (fun i => flatPoints (P i)) X J cap) \ + remaining F hF (fun i => flatPoints (P i)) X J).filter + fun x => x.submodule ≤ P a).card ≤ cap := by + have hh := head_tail_cap F hF (fun i => flatPoints (P i)) X J cap a ha + simpa only [inter_flatPoints] using hh + +lemma outside_cell_earlier (j : ℕ) (A : Submodule K V) + (hAj : A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) + (y : ℙ K V) (hyX : y ∈ X) (hyA : y.submodule ≤ A) + (hycell : y ∉ cell F hF (fun i => flatPoints (P i)) X j) : + y ∈ X \ remaining F hF (fun i => flatPoints (P i)) X j := by + refine Finset.mem_sdiff.mpr ⟨hyX, ?_⟩ + intro hyr + exact hycell (Finset.mem_inter.mpr ⟨hyr, (mem_flatPoints _ _).mpr (hyA.trans hAj)⟩) + +lemma earliest_line_outside_cell_cap (j : ℕ) (A : Submodule K V) + (hA : finrank K A = 2) + (hAj : A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) + (hearlier : ∀ i < j, ¬A ≤ P (chosen F hF (fun i => flatPoints (P i)) X i)) : + ((X \ cell F hF (fun i => flatPoints (P i)) X j).filter + fun y => y.submodule ≤ A).card ≤ j := by + have hs : (X \ cell F hF (fun i => flatPoints (P i)) X j).filter + (fun y => y.submodule ≤ A) ⊆ + (X \ remaining F hF (fun i => flatPoints (P i)) X j).filter + (fun y => y.submodule ≤ A) := by + intro y hy + obtain ⟨hy,hya⟩ := Finset.mem_filter.mp hy + obtain ⟨hyX,hyc⟩ := Finset.mem_sdiff.mp hy + exact Finset.mem_filter.mpr ⟨outside_cell_earlier F hF P X j A hAj y hyX hya hyc,hya⟩ + have hc := line_covered_cap (Finset.range j) + (fun i => P (chosen F hF (fun i => flatPoints (P i)) X i)) + (X \ remaining F hF (fun i => flatPoints (P i)) X j) A hA + (fun i hi => hearlier i (Finset.mem_range.mp hi)) + (fun y hy _ => captured_cover F hF P X j y hy) + exact (Finset.card_le_card hs).trans (by simpa only [Finset.card_range] using hc) + +lemma earliest_plane_outside_cell_cap (j : ℕ) (A : Submodule K V) + (hA : finrank K A = 3) + (hAj : A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) + (hearlier : ∀ i < j, ¬A ≤ P (chosen F hF (fun i => flatPoints (P i)) X i)) : + ((X \ cell F hF (fun i => flatPoints (P i)) X j).filter + fun y => y.submodule ≤ A).card ≤ j*(Nat.card K+1) := by + have hs : (X \ cell F hF (fun i => flatPoints (P i)) X j).filter + (fun y => y.submodule ≤ A) ⊆ + (X \ remaining F hF (fun i => flatPoints (P i)) X j).filter + (fun y => y.submodule ≤ A) := by + intro y hy + obtain ⟨hy,hya⟩ := Finset.mem_filter.mp hy + obtain ⟨hyX,hyc⟩ := Finset.mem_sdiff.mp hy + exact Finset.mem_filter.mpr ⟨outside_cell_earlier F hF P X j A hAj y hyX hya hyc,hya⟩ + have hc := plane_covered_cap (Finset.range j) + (fun i => P (chosen F hF (fun i => flatPoints (P i)) X i)) + (X \ remaining F hF (fun i => flatPoints (P i)) X j) A hA + (fun i hi => hearlier i (Finset.mem_range.mp hi)) + (fun y hy _ => captured_cover F hF P X j y hy) + exact (Finset.card_le_card hs).trans (by simpa only [Finset.card_range] using hc) + +lemma surviving_line_center_earlier (J j : ℕ) (hj : j < J) + (A : Submodule K V) (hA : finrank K A = 2) + (hAj : A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) + (hearlier : ∀ i < j, ¬A ≤ P (chosen F hF (fun i => flatPoints (P i)) X i)) + (x : ℙ K V) (hxA : x.submodule ≤ A) + (hrich : j < ((X \ ownCell F hF (fun i => flatPoints (P i)) X J x).filter + fun y => y.submodule ≤ A).card) : + ∃ i < j, x.submodule ≤ P (chosen F hF (fun i => flatPoints (P i)) X i) := by + by_contra hn + push Not at hn + have heq := ownCell_eq F hF (fun i => flatPoints (P i)) X J j x hj + ((mem_flatPoints _ _).mpr (hxA.trans hAj)) + (fun i hi hmem => hn i hi ((mem_flatPoints _ _).mp hmem)) + rw [heq] at hrich + exact (not_lt_of_ge (earliest_line_outside_cell_cap F hF P X j A hA hAj hearlier)) hrich + +lemma surviving_plane_center_earlier (J j : ℕ) (hj : j < J) + (A : Submodule K V) (hA : finrank K A = 3) + (hAj : A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) + (hearlier : ∀ i < j, ¬A ≤ P (chosen F hF (fun i => flatPoints (P i)) X i)) + (x : ℙ K V) (hxA : x.submodule ≤ A) + (hrich : j*(Nat.card K+1) < + ((X \ ownCell F hF (fun i => flatPoints (P i)) X J x).filter + fun y => y.submodule ≤ A).card) : + ∃ i < j, x.submodule ≤ P (chosen F hF (fun i => flatPoints (P i)) X i) := by + by_contra hn + push Not at hn + have heq := ownCell_eq F hF (fun i => flatPoints (P i)) X J j x hj + ((mem_flatPoints _ _).mpr (hxA.trans hAj)) + (fun i hi hmem => hn i hi ((mem_flatPoints _ _).mp hmem)) + rw [heq] at hrich + exact (not_lt_of_ge (earliest_plane_outside_cell_cap F hF P X j A hA hAj hearlier)) hrich + +lemma surviving_line_centers_cap (J j : ℕ) (hj : j < J) + (A : Submodule K V) (hA : finrank K A = 2) + (hAj : A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) + (hearlier : ∀ i < j, ¬A ≤ P (chosen F hF (fun i => flatPoints (P i)) X i)) : + ((flatPoints A).filter fun x => j < + ((X \ ownCell F hF (fun i => flatPoints (P i)) X J x).filter + fun y => y.submodule ≤ A).card).card ≤ j := by + let C := (flatPoints A).filter fun x => j < + ((X \ ownCell F hF (fun i => flatPoints (P i)) X J x).filter + fun y => y.submodule ≤ A).card + have hall (x : ℙ K V) (hx : x ∈ C) : x.submodule ≤ A := + (mem_flatPoints _ _).mp (Finset.mem_filter.mp hx).1 + have hc := line_covered_cap (Finset.range j) + (fun i => P (chosen F hF (fun i => flatPoints (P i)) X i)) C A hA + (fun i hi => hearlier i (Finset.mem_range.mp hi)) (by + intro x hx hxa + obtain ⟨i,hi,hxi⟩ := surviving_line_center_earlier F hF P X J j hj A hA hAj hearlier + x hxa (Finset.mem_filter.mp hx).2 + exact ⟨i,Finset.mem_range.mpr hi,hxi⟩) + rw [Finset.filter_eq_self.mpr hall,Finset.card_range] at hc + exact hc + +lemma surviving_plane_centers_cap (J j : ℕ) (hj : j < J) + (A : Submodule K V) (hA : finrank K A = 3) + (hAj : A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) + (hearlier : ∀ i < j, ¬A ≤ P (chosen F hF (fun i => flatPoints (P i)) X i)) : + ((flatPoints A).filter fun x => j*(Nat.card K+1) < + ((X \ ownCell F hF (fun i => flatPoints (P i)) X J x).filter + fun y => y.submodule ≤ A).card).card ≤ j*(Nat.card K+1) := by + let C := (flatPoints A).filter fun x => j*(Nat.card K+1) < + ((X \ ownCell F hF (fun i => flatPoints (P i)) X J x).filter + fun y => y.submodule ≤ A).card + have hall (x : ℙ K V) (hx : x ∈ C) : x.submodule ≤ A := + (mem_flatPoints _ _).mp (Finset.mem_filter.mp hx).1 + have hc := plane_covered_cap (Finset.range j) + (fun i => P (chosen F hF (fun i => flatPoints (P i)) X i)) C A hA + (fun i hi => hearlier i (Finset.mem_range.mp hi)) (by + intro x hx hxa + obtain ⟨i,hi,hxi⟩ := surviving_plane_center_earlier F hF P X J j hj A hA hAj hearlier + x hxa (Finset.mem_filter.mp hx).2 + exact ⟨i,Finset.mem_range.mpr hi,hxi⟩) + rw [Finset.filter_eq_self.mpr hall,Finset.card_range] at hc + exact hc + +noncomputable def cellRichLines (L : Finset (Submodule K V)) (j M : ℕ) : + Finset (Submodule K V) := + L.filter fun A => A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j) ∧ + M ≤ ((cell F hF (fun i => flatPoints (P i)) X j).filter fun y => y.submodule ≤ A).card + +lemma cell_filter_own_flat (j : ℕ) : + ((cell F hF (fun i => flatPoints (P i)) X j).filter fun y => + y.submodule ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) = + cell F hF (fun i => flatPoints (P i)) X j := by + apply Finset.filter_eq_self.mpr + intro y hy + exact (mem_flatPoints _ _).mp (Finset.mem_inter.mp hy).2 + +lemma card_cellRichLines_le (hP : ∀ i ∈ F, finrank K (P i) = 3) + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 2) (j M : ℕ) : + (cellRichLines F hF P X L j M).card ≤ ProjectiveIncidence.Q (Nat.card K) 2 := by + apply (Finset.card_le_card (show cellRichLines F hF P X L j M ⊆ + L.filter (fun A => A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) from + fun A hA => Finset.mem_filter.mpr ⟨(Finset.mem_filter.mp hA).1,(Finset.mem_filter.mp hA).2.1⟩)).trans + exact card_hyperplanes_inside _ (hP _ (chosen_mem F hF _ X j)) L hL + +lemma cellRichLines_variance (hP : ∀ i ∈ F, finrank K (P i) = 3) + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 2) (j M : ℕ) + (hmean : 2*((ProjectiveIncidence.Q (Nat.card K) 1:ℝ)/ProjectiveIncidence.Q (Nat.card K) 2)* + (cell F hF (fun i => flatPoints (P i)) X j).card ≤ M) : + ((cellRichLines F hF P X L j M).card:ℝ)*M^2 ≤ + 4*(Nat.card K:ℝ)*(cell F hF (fun i => flatPoints (P i)) X j).card := by + let C := cell F hF (fun i => flatPoints (P i)) X j + let G := L.filter fun A => M ≤ (C.filter fun y => y.submodule ≤ A).card + have hG (A : Submodule K V) (hA : A ∈ G) : finrank K A = 2 := + hL A (Finset.mem_filter.mp hA).1 + have hm (A : Submodule K V) (hA : A ∈ G) : M ≤ (C.filter fun y => y.submodule ≤ A).card := + (Finset.mem_filter.mp hA).2 + have hμ : 2*((ProjectiveIncidence.Q (Nat.card K) (2-1):ℝ)/ProjectiveIncidence.Q (Nat.card K) 2)* + (C.filter fun y => y.submodule ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)).card ≤ M := by + simpa only [C,cell_filter_own_flat] using hmean + have hh := rich_hyperplanes_inside_subspace (by omega : 1 ≤ (2:ℕ)) + (P (chosen F hF (fun i => flatPoints (P i)) X j)) (hP _ (chosen_mem F hF _ X j)) + G hG C M hm hμ + have he : G.filter (fun A => A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) = + cellRichLines F hF P X L j M := by + ext A + simp only [G,cellRichLines,Finset.mem_filter,C] + tauto + simpa only [he,C,cell_filter_own_flat,show (2:ℕ)-1=1 from rfl,pow_one] using hh + +theorem weighted_cell_rich_lines (hP : ∀ i ∈ F, finrank K (P i) = 3) + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 2) (J M : ℕ) + (hM : 0 < M) (hJ : (J:ℝ)*(Nat.card K:ℝ) ≤ X.card) : + (∑ j ∈ Finset.range J, (j:ℝ)*(cellRichLines F hF P X L j M).card)*(M:ℝ)^2 ≤ + 12*(X.card:ℝ)^2 := by + let q : ℝ := Nat.card K + let N : ℝ := ProjectiveIncidence.Q (Nat.card K) 2 + let p : ℝ := (ProjectiveIncidence.Q (Nat.card K) 1:ℝ)/N + let s (j : ℕ) : ℝ := (cell F hF (fun i => flatPoints (P i)) X j).card + let m (j : ℕ) : ℝ := (cellRichLines F hF P X L j M).card + have hq : 1 ≤ q := by + dsimp [q] + exact_mod_cast (show 1 ≤ Nat.card K from (Finite.one_lt_card (α := K)).le) + have hN : 0 < N := by dsimp [N]; exact_mod_cast ProjectiveIncidence.Q_pos (Nat.card K) 2 + have hpq : p*q ≤ 1 := by + dsimp [p,q,N] + rw [div_mul_eq_mul_div] + apply (div_le_one (by exact_mod_cast ProjectiveIncidence.Q_pos (Nat.card K) 2)).mpr + have he := ProjectiveIncidence.Q_recurrence (q := Nat.card K) (d := 2) (by omega) + push_cast [he] + nlinarith + have hNq : N ≤ 3*q^2 := by + have he : N = 1+q+q^2 := by + simp [N,q,ProjectiveIncidence.Q,Finset.sum_range_succ] + rw [he] + nlinarith + have hbudget : ∑ j ∈ Finset.range J, s j ≤ X.card := by + have hh := sum_card_add_remaining F hF (fun i => flatPoints (P i)) X J + have hn : ∑ j ∈ Finset.range J, (cell F hF (fun i => flatPoints (P i)) X j).card ≤ X.card := by omega + dsimp [s] + exact_mod_cast hn + apply GreedyWeightedCount.weighted_rich_count J s m q M X.card p N + · intro j; exact Nat.cast_nonneg _ + · intro i j hij + dsimp [s] + exact_mod_cast cell_card_antitone F hF (fun i => flatPoints (P i)) X hij + · intro j _ + exact ⟨Nat.cast_nonneg _, by dsimp [m,N]; exact_mod_cast card_cellRichLines_le F hF P X hP L hL j M⟩ + · exact hq.trans' zero_le_one + · exact_mod_cast hM + · dsimp [p]; positivity + · exact hN.le + · exact hpq + · exact hNq + · exact hbudget + · exact hJ + · intro j _ hj + exact cellRichLines_variance F hF P X hP L hL j M hj + +noncomputable def capturedLineCenters (J M : ℕ) (A : Submodule K V) : + Finset (ℙ K V) := + (flatPoints A).filter fun x => M ≤ + (((X \ remaining F hF (fun i => flatPoints (P i)) X J) \ + ownCell F hF (fun i => flatPoints (P i)) X J x).filter fun y => y.submodule ≤ A).card + +lemma earliest_line_cell_rich (j M : ℕ) (hj : j ≤ M) + (A : Submodule K V) (hA : finrank K A = 2) + (hAj : A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) + (hearlier : ∀ i < j, ¬A ≤ P (chosen F hF (fun i => flatPoints (P i)) X i)) + (hrich : 2*M ≤ (X.filter fun y => y.submodule ≤ A).card) : + M ≤ ((cell F hF (fun i => flatPoints (P i)) X j).filter fun y => y.submodule ≤ A).card := by + have hcap := earliest_line_outside_cell_cap F hF P X j A hA hAj hearlier + have hsub : X.filter (fun y => y.submodule ≤ A) ⊆ + ((X \ cell F hF (fun i => flatPoints (P i)) X j).filter fun y => y.submodule ≤ A) ∪ + ((cell F hF (fun i => flatPoints (P i)) X j).filter fun y => y.submodule ≤ A) := by + intro y hy + simp only [Finset.mem_filter,Finset.mem_union,Finset.mem_sdiff] at * + tauto + have hc := (Finset.card_le_card hsub).trans (Finset.card_union_le _ _) + omega + +theorem captured_center_line_count (hP : ∀ i ∈ F, finrank K (P i) = 3) + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 2) (J M : ℕ) + (hM : 0 < M) (hJM : J ≤ M) (hJq : (J:ℝ)*(Nat.card K:ℝ) ≤ X.card) : + (∑ A ∈ L, ((capturedLineCenters F hF P X J (2*M) A).card:ℝ))*(M:ℝ)^2 ≤ + 12*(X.card:ℝ)^2 := by + have hrow (A : Submodule K V) (hA : A ∈ L) : + ((capturedLineCenters F hF P X J (2*M) A).card:ℝ) ≤ + ∑ j ∈ Finset.range J, if A ∈ cellRichLines F hF P X L j M then (j:ℝ) else 0 := by + by_cases he : (capturedLineCenters F hF P X J (2*M) A).Nonempty + · obtain ⟨x,hx⟩ := he + have hxc := (Finset.mem_filter.mp hx).2 + have hcaprich : 2*M ≤ ((X \ remaining F hF (fun i => flatPoints (P i)) X J).filter + fun y => y.submodule ≤ A).card := + hxc.trans (Finset.card_le_card (Finset.filter_subset_filter _ Finset.sdiff_subset)) + have hfullrich : 2*M ≤ (X.filter fun y => y.submodule ≤ A).card := + hcaprich.trans (Finset.card_le_card (Finset.filter_subset_filter _ Finset.sdiff_subset)) + have hcont := rich_line_has_containing_flat F hF P X J (2*M) (by omega) A (hL A hA) hcaprich + let j := Nat.find hcont + have hj : j < J := (Nat.find_spec hcont).1 + have hAj : A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j) := (Nat.find_spec hcont).2 + have hearlier (i : ℕ) (hi : i < j) : ¬A ≤ P (chosen F hF (fun i => flatPoints (P i)) X i) := by + intro hiA + exact Nat.find_min hcont hi ⟨hi.trans hj,hiA⟩ + have hmem : A ∈ cellRichLines F hF P X L j M := + Finset.mem_filter.mpr ⟨hA,hAj,earliest_line_cell_rich F hF P X j M + (hj.le.trans hJM) A (hL A hA) hAj hearlier hfullrich⟩ + have hsub : capturedLineCenters F hF P X J (2*M) A ⊆ + (flatPoints A).filter (fun z => j < + ((X \ ownCell F hF (fun i => flatPoints (P i)) X J z).filter fun y => y.submodule ≤ A).card) := by + intro z hz + obtain ⟨hzA,hzr⟩ := Finset.mem_filter.mp hz + refine Finset.mem_filter.mpr ⟨hzA, ?_⟩ + have hc := hzr.trans (Finset.card_le_card (Finset.filter_subset_filter _ + (Finset.sdiff_subset_sdiff_left _ Finset.sdiff_subset))) + omega + have hc := (Finset.card_le_card hsub).trans + (surviving_line_centers_cap F hF P X J j hj A (hL A hA) hAj hearlier) + have hsingle : (j:ℝ) ≤ ∑ k ∈ Finset.range J, + if A ∈ cellRichLines F hF P X L k M then (k:ℝ) else 0 := by + have hh := Finset.single_le_sum (s := Finset.range J) + (f := fun k => if A ∈ cellRichLines F hF P X L k M then (k:ℝ) else 0) + (fun k _ => by positivity) (Finset.mem_range.mpr hj) + simpa only [ite_eq_left hmem] using hh + exact (by exact_mod_cast hc : ((capturedLineCenters F hF P X J (2*M) A).card:ℝ) ≤ (j:ℝ)).trans hsingle + · rw [Finset.not_nonempty_iff_eq_empty.mp he,Finset.card_empty,Nat.cast_zero] + exact Finset.sum_nonneg (fun j _ => by positivity) + have hsum := Finset.sum_le_sum hrow + have hcount (j : ℕ) : + (∑ A ∈ L, if A ∈ cellRichLines F hF P X L j M then (j:ℝ) else 0) = + (j:ℝ)*(cellRichLines F hF P X L j M).card := by + have hsub : cellRichLines F hF P X L j M ⊆ L := Finset.filter_subset _ _ + have hh := Finset.sum_subset hsub (f := fun A => if A ∈ cellRichLines F hF P X L j M then (j:ℝ) else 0) + (fun _ _ hn => ite_eq_right hn) + rw [← hh] + simp [mul_comm] + rw [Finset.sum_comm] at hsum + simp_rw [hcount] at hsum + exact (mul_le_mul_of_nonneg_right hsum (sq_nonneg _)).trans + (weighted_cell_rich_lines F hF P X hP L hL J M hM hJq) + +end SharpRamseyFive.ProjectiveTraining + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/FlatSection.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/FlatSection.lean new file mode 100644 index 0000000000000000000000000000000000000000..337cc410f3c382183cc8624619eb58d57f443542 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/FlatSection.lean @@ -0,0 +1,154 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.FlatPoints +import OAI.Combinatorics.RamseyFive.Entropy.Map +import OAI.Combinatorics.RamseyFive.Geometry.GeometricRestriction + +namespace OAI + +namespace SharpRamseyFive.ProjectiveRestriction + +section +open Module ProjectiveIncidence ProjectiveTraining +open scoped LinearAlgebra.Projectivization Classical BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + +noncomputable def flatEmbedding (A : Submodule K V) : ℙ K A ↪ ℙ K V := + ⟨Projectivization.map A.subtype A.injective_subtype, + Projectivization.map_injective A.subtype A.injective_subtype⟩ + +noncomputable def flatSection (A : Submodule K V) (X : Finset (ℙ K V)) : Finset (ℙ K A) := + X.preimage (flatEmbedding A) (flatEmbedding A).injective.injOn + +lemma section_mono (A : Submodule K V) {X Y : Finset (ℙ K V)} (hXY : X⊆Y) : + flatSection A X⊆flatSection A Y := by + intro x hx + simpa only [flatSection,Finset.mem_preimage] using hXY (Finset.mem_preimage.mp hx) + +lemma range_flatEmbedding (A : Submodule K V) (p : ℙ K V) : + p∈Set.range (flatEmbedding A) ↔ p.submodule≤A := by + constructor + · rintro ⟨x,rfl⟩ + induction x using Projectivization.ind with | h v hv => + change (Projectivization.map A.subtype A.injective_subtype (Projectivization.mk K v hv)).submodule≤A + rw [Projectivization.map_mk,Projectivization.submodule_mk,Submodule.span_singleton_le_iff_mem] + exact v.property + · intro hp + have hm : p.rep∈A := hp (by rw [p.submodule_eq]; exact Submodule.mem_span_singleton_self p.rep) + have hn : (⟨p.rep,hm⟩:A)≠0 := fun hz=>p.rep_nonzero (congrArg Subtype.val hz) + refine ⟨Projectivization.mk K (⟨p.rep,hm⟩:A) hn,?_⟩ + change Projectivization.map A.subtype A.injective_subtype (Projectivization.mk K (⟨p.rep,hm⟩:A) hn)=p + rw [Projectivization.map_mk] + exact p.mk_rep + +variable [Finite K] [FiniteDimensional K V] + +lemma section_map (A : Submodule K V) (X : Finset (ℙ K V)) : + (flatSection A X).map (flatEmbedding A)=X∩flatPoints A := by + ext x + simp only [Finset.mem_map,flatSection,Finset.mem_preimage,Finset.mem_inter,mem_flatPoints] + constructor + · rintro ⟨a,ha,rfl⟩ + exact ⟨ha,(range_flatEmbedding A _).mp ⟨a,rfl⟩⟩ + · rintro ⟨hx,hflat⟩ + obtain ⟨a,rfl⟩ := (range_flatEmbedding A x).mpr hflat + exact ⟨a,hx,rfl⟩ + +lemma section_card (A : Submodule K V) (X : Finset (ℙ K V)) : + (flatSection A X).card=(X∩flatPoints A).card := by + rw [←section_map,Finset.card_map] + +lemma section_degree_sum (A : Submodule K V) (X : Finset (ℙ K V)) + (T : Finset (ℙ K (Dual K V))) : + ∑p∈T,(flatDegree A (flatSection A X) p:ℝ)=incidences (X∩flatPoints A) T := by + rw [←section_map,incidences_eq_sum] + apply Finset.sum_congr rfl + intro p hp + rw [Finset.sum_map] + simp only [flatDegree, incidenceEntry, Finset.sum_boole] + rfl + +omit [Finite K] [FiniteDimensional K V] in +lemma incidences_mono_left {X Y : Finset (ℙ K V)} (T : Finset (ℙ K (Dual K V))) (hXY : X⊆Y) : + incidences X T ≤ incidences Y T := by + apply Finset.card_le_card + apply Finset.filter_subset_filter + exact Finset.product_subset_product hXY (Finset.Subset.refl _) + +lemma section_density (A : Submodule K V) (X : Finset (ℙ K V)) + (T : Finset (ℙ K (Dual K V))) (τ : ℝ) + (h : (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card) : + ∑p∈T,(flatDegree A (flatSection A X) p:ℝ)≤τ*X.card*T.card/(Nat.card K) := by + rw [section_degree_sum] + have hq : (0:ℝ)Incident x p).card:ℝ)≤(Real.sqrt τ/(Nat.card K))*S.card) ∧ + (Nat.card K:ℝ)*(incidences S T₀:ℝ)≤Real.sqrt τ*S.card*T₀.card ∧ + Real.log ((UT₀.card:ℝ)/T₀.card)≤Real.log ((UT.card:ℝ)/T.card)+Real.log (4*L) ∧ + Real.log ((US.card:ℝ)/S.card)≤Real.log ((UX.card:ℝ)/X.card)+Real.log 100 := by + dsimp only + have hx : (0:ℝ)(X.map (projectiveEquiv e).toEmbedding,T.map (projectiveEquiv e.symm.dualMap).toEmbedding)) + +theorem eventually_four_finite_predictor {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))], + ∀ (hd : finrank K V=5) (X U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))), + Nat.card K=q → Real.exp σ=q → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-800*beta η) → X⊆U → T⊆UT → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(X.card:ℝ)*T.card → + let pred := fourFinitePredictor hd σ U UT (P η σ D R) τ R L₀ + let p := pred.output X T + p none≤3*Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

(X.map (projectiveEquiv e).toEmbedding,T.map (projectiveEquiv e.symm.dualMap).toEmbedding))).output X T (some W) at hW + rw [FinitePredictor.transform_output] at hW + obtain ⟨Z,hZ,he⟩ := map_positive (pp.output X' T') + (Option.map fun Z=>Z.map (projectiveEquiv e).symm.toEmbedding) (some W) hW + cases Z with + | none => simp at he + | some Z => + have he' : Z.map (projectiveEquiv e).symm.toEmbedding=W := Option.some.inj he + subst W + have hz := hg Z hZ + obtain ⟨hU,hcard',hcap⟩ := decoded_coordinates e U X Z hz.1 + refine ⟨hU,?_,?_⟩ + · simpa only [hcard',X',Finset.card_map] using hz.2.1 + · rw [Finset.inter_comm X _,hcap] + simpa only [X',Finset.card_map] using hz.2.2 + · intro t m hm + change pp.cost t m≤_ + have hh := hc t m hm + simpa only [U',X',T',UT',Finset.card_map] using hh +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry +open scoped Classical LinearAlgebra.Projectivization NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +abbrev FiniteNodeTape (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) (H : ℕ) (q : ℝ) := + pred.Tape × AmbientPairTape K V H q +noncomputable def finiteNodeTapeLaw (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) (H : ℕ) (q : ℝ) : + Law (FiniteNodeTape pred H q) := + adaptiveLaw pred.tapeLaw (fun _=>ambientPairTapeLaw H q) +abbrev FiniteNodeMessage (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (UB : Finset (ℙ K (Dual K V))) (H : ℕ) (q : ℝ) (t : FiniteNodeTape pred H q) := + (m : pred.Message t.1) × AmbientPairMessage UB (pred.decoded t.1 m) H q t.2 +noncomputable def finiteNodeDecoded (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (UB : Finset (ℙ K (Dual K V))) (H : ℕ) (q : ℝ) (t : FiniteNodeTape pred H q) + (m : FiniteNodeMessage pred UB H q t) : Finset (ℙ K (Dual K V)) × Finset (ℙ K V) := + ambientPairDecoded UB (pred.decoded t.1 m.1) H q t.2 m.2 +noncomputable def finiteNodeEncoded (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (A UA : Finset (ℙ K V)) (B UB : Finset (ℙ K (Dual K V))) + (H : ℕ) (nA nB : Fin (H+1)) (q MA MB c M : ℝ) (t : FiniteNodeTape pred H q) : + Option (FiniteNodeMessage pred UB H q t) := + (pred.encoded A B t.1).bind fun m=> + if _hc : CaptureBound A UA c M (pred.decoded t.1 m) then + (ambientPairEncoded A UA B UB (pred.decoded t.1 m) H nA nB q MA MB t.2).map (fun f=>⟨m,f⟩) + else none +noncomputable def finiteNodeCost (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (UB : Finset (ℙ K (Dual K V))) (H : ℕ) (q : ℝ) (t : FiniteNodeTape pred H q) + (m : FiniteNodeMessage pred UB H q t) : ℝ := + pred.cost t.1 m.1+ambientPairCost UB (pred.decoded t.1 m.1) H q t.2 m.2 +noncomputable def finiteNodeNextOut (A UA : Finset (ℙ K V)) (B UB : Finset (ℙ K (Dual K V))) + (H : ℕ) (nA nB : Fin (H+1)) (q MA MB c M : ℝ) + (W : Option (Finset (ℙ K V))) (t : AmbientPairTape K V H q) : + Option (Finset (ℙ K (Dual K V))×Finset (ℙ K V)) := + W.bind fun W=>if _hc : CaptureBound A UA c M W then + (ambientPairEncoded A UA B UB W H nA nB q MA MB t).map (ambientPairDecoded UB W H q t) + else none +noncomputable def finiteNodeNextLaw (A UA : Finset (ℙ K V)) (B UB : Finset (ℙ K (Dual K V))) + (H : ℕ) (nA nB : Fin (H+1)) (q MA MB c M : ℝ) + (W : Option (Finset (ℙ K V))) : Law (Option (Finset (ℙ K (Dual K V))×Finset (ℙ K V))) := + map (ambientPairTapeLaw H q) (finiteNodeNextOut A UA B UB H nA nB q MA MB c M W) +noncomputable def finiteNodeOutput (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (A UA : Finset (ℙ K V)) (B UB : Finset (ℙ K (Dual K V))) + (H : ℕ) (nA nB : Fin (H+1)) (q MA MB c M : ℝ) : + Law (Option (Finset (ℙ K (Dual K V))×Finset (ℙ K V))) := + map (finiteNodeTapeLaw pred H q) (fun t=> + (finiteNodeEncoded pred A UA B UB H nA nB q MA MB c M t).map (finiteNodeDecoded pred UB H q t)) + +omit [Finite K] [FiniteDimensional K V] in +lemma finiteNode_exact (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (A UA : Finset (ℙ K V)) (B UB : Finset (ℙ K (Dual K V))) + (H : ℕ) (nA nB : Fin (H+1)) (q MA MB c M : ℝ) (t : FiniteNodeTape pred H q) : + (finiteNodeEncoded pred A UA B UB H nA nB q MA MB c M t).map (finiteNodeDecoded pred UB H q t)= + finiteNodeNextOut A UA B UB H nA nB q MA MB c M ((pred.encoded A B t.1).map (pred.decoded t.1)) t.2 := by + cases hm : pred.encoded A B t.1 with + | none => simp [finiteNodeEncoded,hm,finiteNodeNextOut] + | some m => + simp only [finiteNodeEncoded,hm,Option.bind_some,Option.map_some,finiteNodeNextOut] + split_ifs <;> simp only [Option.map_none,Option.map_map,Function.comp_def,finiteNodeDecoded] + +omit [Finite K] [FiniteDimensional K V] in +lemma finiteNode_law (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (A UA : Finset (ℙ K V)) (B UB : Finset (ℙ K (Dual K V))) + (H : ℕ) (nA nB : Fin (H+1)) (q MA MB c M : ℝ) : + finiteNodeOutput pred A UA B UB H nA nB q MA MB c M= + optionCompose (pred.output A B) (finiteNodeNextLaw A UA B UB H nA nB q MA MB c M) := by + rw [optionCompose_eq_second _ _ (by exact map_const _ none)] + unfold finiteNodeOutput + simp only [finiteNode_exact] + exact public_composition pred.tapeLaw (ambientPairTapeLaw H q) + (fun t=>(pred.encoded A B t).map (pred.decoded t)) + (finiteNodeNextOut A UA B UB H nA nB q MA MB c M) + (finiteNodeNextLaw A UA B UB H nA nB q MA MB c M) (fun _=>rfl) + +omit [Finite K] [FiniteDimensional K V] in +lemma finiteNode_prefixes (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (A UA : Finset (ℙ K V)) (B UB : Finset (ℙ K (Dual K V))) + (H : ℕ) (nA nB : Fin (H+1)) (q MA MB c M : ℝ) (t : FiniteNodeTape pred H q) + (m : FiniteNodeMessage pred UB H q t) + (hm : finiteNodeEncoded pred A UA B UB H nA nB q MA MB c M t=some m) : + pred.encoded A B t.1=some m.1 ∧ CaptureBound A UA c M (pred.decoded t.1 m.1) ∧ + ambientPairEncoded A UA B UB (pred.decoded t.1 m.1) H nA nB q MA MB t.2=some m.2 := by + unfold finiteNodeEncoded at hm + cases hf : pred.encoded A B t.1 with + | none => simp [hf] at hm + | some f => + rw [hf] at hm + change (if _hc : CaptureBound A UA c M _ then _ else none)=some m at hm + split_ifs at hm with hc + obtain ⟨g,hg,he⟩ := Option.map_eq_some_iff.mp hm + subst m + exact ⟨rfl,hc,hg⟩ +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/FourHeader.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/FourHeader.lean new file mode 100644 index 0000000000000000000000000000000000000000..a9dee84c3321758a3491d1214283acd8eabd70cc --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/FourHeader.lean @@ -0,0 +1,166 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.DimensionFourHighProtocol + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence ProjectiveTraining Metadata FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization + +theorem fourPublic_header {K : Type} [Field K] [Finite K] [Fintype K] + [Fintype (ℙ K (Fin 5→K))] (σ : ℝ) (hσ : 100000≤σ) + (hq : Real.exp σ=Nat.card K) : + Real.log (Fintype.card (FourPublicIndex K σ):ℝ)≤40*(Nat.card K:ℝ) := by + have hd : finrank K (Fin 5→K)≤5 := by simp + have hq1 : (1:ℝ)≤Nat.card K := by exact_mod_cast Nat.card_pos (α:=K) + have hσq : σ≤Nat.card K := by rw [←hq];linarith only [Real.add_one_le_exp σ] + have hh := projective_header_le (K:=K) (V:=Fin 5→K) σ (by linarith) hq hd + have ht := log_card_training_le (V:=Fin 5→K) σ hσ (vector_card_le_exp σ hq hd) + rw [hq,Nat.card_eq_fintype_card] at ht + let a : ℕ := 2*((Fintype.card (ℙ K (Fin 5→K))+1)* + Fintype.card (TrainingCode (Fin 5→K) (listCap σ) (productCap σ) (Nat.card (Fin 5→K)))) + let c : ℕ := Fintype.card (Submodule K (Fin 5→K)) + let l : ℕ := (Nat.card K+1)^2 + have ha1 : (1:ℝ)≤a := by + have h : 0fourCertifiedBranch X U T UT σ (P η σ D R) τ R L₀) X T _ hc t m hm + have hP : 1≤P η σ D R := + (Real.one_le_rpow (by linarith : (1:ℝ)≤σ) (mul_nonneg (by norm_num) (beta_pos hη).le)).trans + (finite_bounds hη hη' (by linarith) hr).2.2.2.2.2.1 + have hq : (Nat.card K:ℝ)=Real.exp σ := by rw [hcard,hσq] + have hqpos : (0:ℝ)p br none≤3*Real.exp (-(Nat.card K:ℝ)) ∧ + ∀W,0

Z.map (projectiveEquiv e).symm.toEmbedding) + +theorem eventually_four_coordinates {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [Fintype K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Fin 5→K))] [Fintype (ℙ K (Dual K (Fin 5→K)))], + ∀ (e : V≃ₗ[K](Fin 5→K)) + (X U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))), + Nat.card K=q → Real.exp σ=q → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-800*beta η) → X⊆U → T⊆UT → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(X.card:ℝ)*T.card → + let p := fourCoordinateLaw e σ X U T UT (P η σ D R) τ R L₀ + p none≤3*Real.exp (-(Nat.card K:ℝ)) ∧ + ∀W,0

Z.map (projectiveEquiv e).symm.toEmbedding) (some W) hW + cases Z with + | none => simp at he + | some Z => + have he' : Z.map (projectiveEquiv e).symm.toEmbedding=W := Option.some.inj he + subst W + have hz := hg Z hZ + obtain ⟨hU,hcard',hcap⟩ := decoded_coordinates e U X Z hz.1 + refine ⟨hU,?_,?_⟩ + · simpa only [hcard',X',Finset.card_map] using hz.2.1 + · rw [Finset.inter_comm,hcap,Finset.inter_comm] + simpa only [X',Finset.card_map] using hz.2.2 +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining Metadata Filter ParameterHierarchy FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization NNReal Topology +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def fourFreeLaw (hd : finrank K V=5) (σ : ℝ) + (X U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : Law (Option (Finset (ℙ K V))) := by + letI : Fintype K := Fintype.ofFinite _ + letI : Finite (Dual K (Fin 5→K)) := Module.finite_of_finite K + letI : Fintype (ℙ K (Fin 5→K)) := Fintype.ofFinite _ + letI : Fintype (ℙ K (Dual K (Fin 5→K))) := Fintype.ofFinite _ + let e := LinearEquiv.ofFinrankEq V (Fin 5→K) (by rw [Module.finrank_pi,Fintype.card_fin,hd]) + exact fourCoordinateLaw e σ X U T UT P τ R L₀ + +theorem eventually_four_free {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))], + ∀ (hd : finrank K V=5) (X U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))), + Nat.card K=q → Real.exp σ=q → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-800*beta η) → X⊆U → T⊆UT → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(X.card:ℝ)*T.card → + let p := fourFreeLaw hd σ X U T UT (P η σ D R) τ R L₀ + p none≤3*Real.exp (-(Nat.card K:ℝ)) ∧ + ∀W,0

if _hv : CaptureBound T UT c MB (dec t.1 m) then + (universalFreshEncoded Incident S U (T∩dec t.1 m) (dec t.1 m) Finset.inter_subset_right H n q MA t.2).map + (fun f=>⟨m,f⟩) else none +noncomputable def generalReversedCost (M : Ω→Type*) (dec : ∀t,M t→Finset (ℙ K (Dual K V))) + (cost : ∀t,M t→ℝ) (H : ℕ) (q : ℝ) (t : GeneralReversedTape Ω K V H q) + (m : GeneralReversedMessage M dec H q t) : ℝ := + cost t.1 m.1+universalFreshCost (dec t.1 m.1) H q m.2 + +omit [Finite K] [FiniteDimensional K V] [Fintype Ω] in +lemma generalReversed_exact (M : Ω→Type*) (dec : ∀t,M t→Finset (ℙ K (Dual K V))) + (enc : ∀t,Option (M t)) (S U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))) + (hT : T.Nonempty) (H : ℕ) (n : Fin (H+1)) (q MA MB c : ℝ) (hc : 0 simp [generalReversedEncoded,h,publicGeneralReverseResult] + | some m => + simp only [generalReversedEncoded,h,Option.bind_some,Option.map_some,publicGeneralReverseResult] + split_ifs with hv + · simp only [Option.map_map,generalReversedDecoded,Function.comp_def] + · rfl + +omit [Finite K] [FiniteDimensional K V] in +theorem generalReversed_law (M : Ω→Type*) (dec : ∀t,M t→Finset (ℙ K (Dual K V))) + (enc : ∀t,Option (M t)) (p : Law Ω) (S U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))) + (hT : T.Nonempty) (H : ℕ) (n : Fin (H+1)) (q MA MB c : ℝ) (hc : 0universalFreshLaw (ℙ K (Dual K V)) H q)) + (fun t=>(generalReversedEncoded M dec enc S U T UT H n q MA MB c t).map + (generalReversedDecoded M dec U H q t))= + optionCompose (map p (fun t=>(enc t).map (dec t))) + (generalNextCapLaw S U T UT hT c hc n q MA MB) := by + simp only [generalReversed_exact M dec enc S U T UT hT H n q MA MB c hc] + rw [optionCompose_eq_second _ (generalNextCapLaw S U T UT hT c hc n q MA MB) (by rfl)] + exact public_composition p (universalFreshLaw (ℙ K (Dual K V)) H q) + (fun t=>(enc t).map (dec t)) + (publicGeneralReverseResult S U T UT hT H n q MA MB c hc) + (generalNextCapLaw S U T UT hT c hc n q MA MB) + (fun Y=>publicGeneralReverseResult_law S U T UT hT H n q MA MB c hc Y) + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype Ω] in +lemma generalReversed_prefixes (M : Ω→Type*) (dec : ∀t,M t→Finset (ℙ K (Dual K V))) + (enc : ∀t,Option (M t)) (S U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))) + (H : ℕ) (n : Fin (H+1)) (q MA MB c : ℝ) (t : GeneralReversedTape Ω K V H q) + (m : GeneralReversedMessage M dec H q t) + (hm : generalReversedEncoded M dec enc S U T UT H n q MA MB c t=some m) : + enc t.1=some m.1 ∧ CaptureBound T UT c MB (dec t.1 m.1) ∧ + universalFreshEncoded Incident S U (T∩dec t.1 m.1) (dec t.1 m.1) Finset.inter_subset_right + H n q MA t.2=some m.2 := by + unfold generalReversedEncoded at hm + cases hb : enc t.1 with + | none => simp [hb] at hm + | some b => + rw [hb] at hm + change (if _hv : CaptureBound T UT c MB (dec t.1 b) then _ else none)=some m at hm + split_ifs at hm with hv + obtain ⟨f,hf,he⟩ := Option.map_eq_some_iff.mp hm + subst m + exact ⟨rfl,hv,hf⟩ + +omit [Fintype Ω] in +theorem generalReversed_cost (M : Ω→Type*) (dec : ∀t,M t→Finset (ℙ K (Dual K V))) + (enc : ∀t,Option (M t)) (cost : ∀t,M t→ℝ) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hdim : finrank K V≤5) + (S U : Finset (ℙ K V)) (hS : S.Nonempty) (hSU : S⊆U) + (T UT : Finset (ℙ K (Dual K V))) (hT : T.Nonempty) + (P c B MA : ℝ) (hP : 1≤P) (hc : 0(p.encoded S T t).map (p.decoded t)) + +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable instance {K : Type} [Field K] [Finite K] [Fintype K] + [Fintype (ℙ K (Fin 4→K))] [Fintype (ℙ K (Dual K (Fin 4→K)))] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K A)] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K (Dual K A))] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K (Dual K (Dual K A)))] + (U : Finset (ℙ K (Fin 4→K))) (UT : Finset (ℙ K (Dual K (Fin 4→K)))) + (σ P τ : ℝ) (br : ThreePublicIndex K σ) (t : ThreeLocalTape U UT σ P τ br) : + Fintype (ThreeLocalMessage U UT σ P τ br t) := by + rcases br with b|b + · dsimp only [ThreeLocalMessage];infer_instance + · rcases b with b|b <;> dsimp only [ThreeLocalMessage] <;> infer_instance + +noncomputable def threeFinitePredictor (hd : finrank K V=4) (σ : ℝ) + (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : FinitePredictor (ℙ K V) (ℙ K (Dual K V)) := by + letI : Fintype K := Fintype.ofFinite _ + letI : Finite (Dual K (Fin 4→K)) := Module.finite_of_finite K + letI : Fintype (ℙ K (Fin 4→K)) := Fintype.ofFinite _ + letI : Fintype (ℙ K (Dual K (Fin 4→K))) := Fintype.ofFinite _ + letI (A : Submodule K (Fin 4→K)) : Finite (Dual K A) := Module.finite_of_finite K + letI (A : Submodule K (Fin 4→K)) : Finite (Dual K (Dual K A)) := Module.finite_of_finite K + letI (A : Submodule K (Fin 4→K)) : Fintype (ℙ K A) := Fintype.ofFinite _ + letI (A : Submodule K (Fin 4→K)) : Fintype (ℙ K (Dual K A)) := Fintype.ofFinite _ + letI (A : Submodule K (Fin 4→K)) : Fintype (ℙ K (Dual K (Dual K A))) := Fintype.ofFinite _ + let e := LinearEquiv.ofFinrankEq V (Fin 4→K) (by rw [Module.finrank_pi,Fintype.card_fin,hd]) + exact { + Tape := ThreeCoordinateTape e U UT σ P τ + tapeFintype := inferInstance + Message := ThreeCoordinateMessage e U UT σ P τ + messageFintype := fun _=>inferInstance + tapeLaw := threeCoordinatePublicLaw e U UT σ P τ R L₀ + decoded := threeCoordinateDecoded e U UT σ P τ + encoded := fun S T=>threeCoordinateEncoded e S U T UT σ P τ R L₀ + cost := threeCoordinateCost e U UT σ P τ } +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/GeometricRestriction.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/GeometricRestriction.lean new file mode 100644 index 0000000000000000000000000000000000000000..ecb53c02e6701f970555ed982dbc55ab28bfe951 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/GeometricRestriction.lean @@ -0,0 +1,591 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.Q + +namespace OAI + +namespace SharpRamseyFive.ProjectiveRestriction + +section +open Module +open scoped LinearAlgebra.Projectivization Classical +variable {K V W : Type*} [Field K] [AddCommGroup V] [Module K V] + [AddCommGroup W] [Module K W] + +def Domain (f : V→ₗ[K]W) := {p : ℙ K V // f p.rep≠0} + +noncomputable def image (f : V→ₗ[K]W) (p : Domain f) : ℙ K W := + Projectivization.mk K (f p.val.rep) p.property + +lemma image_eq_iff (f : V→ₗ[K]W) (p : Domain f) (b : ℙ K W) : + image f p=b ↔ ∃ a : Kˣ,a • f p.val.rep=b.rep := by + change Projectivization.mk K (f p.val.rep) p.property=b ↔ _ + conv_lhs => rw [←b.mk_rep,eq_comm,Projectivization.mk_eq_mk_iff] + +noncomputable def normalized (f : V→ₗ[K]W) (b : ℙ K W) + (p : {p : Domain f // image f p=b}) : {v : V // f v=b.rep} := + ⟨(image_eq_iff f p.val b |>.mp p.property).choose • p.val.val.rep,by + rw [LinearMap.map_smul_of_tower] + exact (image_eq_iff f p.val b |>.mp p.property).choose_spec⟩ + +lemma normalized_nonzero (f : V→ₗ[K]W) (b : ℙ K W) + (p : {p : Domain f // image f p=b}) : (normalized f b p).val≠0 := by + intro h + have hh := (normalized f b p).property + rw [h,map_zero] at hh + exact b.rep_nonzero hh.symm + +lemma mk_normalized (f : V→ₗ[K]W) (b : ℙ K W) + (p : {p : Domain f // image f p=b}) : + Projectivization.mk K (normalized f b p).val (normalized_nonzero f b p)=p.val.val := by + rw [←p.val.val.mk_rep,Projectivization.mk_eq_mk_iff] + exact ⟨_,rfl⟩ + +lemma normalized_injective (f : V→ₗ[K]W) (b : ℙ K W) : + Function.Injective (normalized f b) := by + intro p q hpq + apply Subtype.ext + apply Subtype.ext + rw [←mk_normalized f b p,←mk_normalized f b q] + have hh := congrArg Subtype.val hpq + congr 1 + +lemma affine_fiber_card_le [Finite K] [FiniteDimensional K V] + (f : V→ₗ[K]W) (w : W) : Nat.card {v : V // f v=w}≤Nat.card f.ker := by + classical + let : Finite V := Module.finite_of_finite K + by_cases h : ∃v,f v=w + · obtain ⟨v₀,hv₀⟩:=h + let g : {v : V // f v=w}→f.ker := fun v=>⟨v.val-v₀,by + rw [LinearMap.mem_ker,map_sub,v.property,hv₀,sub_self]⟩ + apply Nat.card_le_card_of_injective g + intro a b hab + apply Subtype.ext + have hh := congrArg Subtype.val hab + change a.val-v₀=b.val-v₀ at hh + have hhh := congrArg (fun x : V=>x+v₀) hh + simpa only [sub_add_cancel] using hhh + · have hi : IsEmpty {v : V // f v=w} := ⟨fun v=>h ⟨v.val,v.property⟩⟩ + let := hi + simp + +theorem fiber_card_le [Finite K] [FiniteDimensional K V] + (f : V→ₗ[K]W) (b : ℙ K W) : + Nat.card {p : Domain f // image f p=b}≤(Nat.card K)^(finrank K f.ker) := by + let : Finite V := Module.finite_of_finite K + have hh := (Nat.card_le_card_of_injective (normalized f b) (normalized_injective f b)).trans + (affine_fiber_card_le f b.rep) + have hn : Nat.card f.ker=(Nat.card K)^(finrank K f.ker) := + Module.natCard_eq_pow_finrank (K:=K) + exact hh.trans_eq hn + +theorem dual_restriction_fiber_card_le [Finite K] [FiniteDimensional K V] + (U : Submodule K V) (b : ℙ K (Dual K U)) : + Nat.card {p : Domain U.dualRestrict // image U.dualRestrict p=b}≤ + (Nat.card K)^(finrank K V-finrank K U) := by + have hh := fiber_card_le U.dualRestrict b + have hr := Subspace.finrank_add_finrank_dualAnnihilator_eq U + have hk : finrank K U.dualRestrict.ker=finrank K V-finrank K U := by + change finrank K U.dualAnnihilator=_ + omega + rwa [hk] at hh + +end + +open Module ProjectiveIncidence +open scoped LinearAlgebra.Projectivization Classical BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + +lemma incident_restriction (U : Submodule K V) (x : ℙ K U) + (p : Domain U.dualRestrict) : + Incident (Projectivization.map U.subtype U.injective_subtype x) p.val ↔ + Incident x (image U.dualRestrict p) := by + induction x using Projectivization.ind with | h v hv => + rw [Projectivization.map_mk] + unfold Incident image + rw [Projectivization.submodule_mk,Submodule.span_singleton_le_iff_mem, + LinearMap.mem_ker,Projectivization.submodule_mk, + Submodule.span_singleton_le_iff_mem,LinearMap.mem_ker] + obtain ⟨a,ha⟩ := Projectivization.exists_smul_eq_mk_rep K + (U.dualRestrict p.val.rep) p.property + rw [←ha] + simp only [Units.smul_def,LinearMap.smul_apply,Submodule.dualRestrict_apply, + smul_eq_mul,mul_eq_zero,Units.ne_zero,false_or,Submodule.subtype_apply] + +lemma incident_of_zero_restriction (U : Submodule K V) (x : ℙ K U) + (p : ℙ K (Dual K V)) (hp : U.dualRestrict p.rep=0) : + Incident (Projectivization.map U.subtype U.injective_subtype x) p := by + induction x using Projectivization.ind with | h v hv => + rw [Projectivization.map_mk] + unfold Incident + rw [Projectivization.submodule_mk,Submodule.span_singleton_le_iff_mem,LinearMap.mem_ker] + exact congrArg (fun f : Dual K U=>f v) hp + +lemma restriction_nonzero_of_degree_lt + (U : Submodule K V) (S : Finset (ℙ K U)) (p : ℙ K (Dual K V)) + (h : (S.filter fun x=>Incident (Projectivization.map U.subtype U.injective_subtype x) p).cardIncident (Projectivization.map U.subtype U.injective_subtype x) p)=S := by + apply Finset.filter_eq_self.mpr + intro x _ + exact incident_of_zero_restriction U x p hp + rw [he] at h + exact lt_irrefl _ h + +end SharpRamseyFive.ProjectiveRestriction + +namespace SharpRamseyFive.DyadicLifts +open scoped Classical BigOperators +variable {A B : Type*} + +noncomputable def multiplicity (f : A→B) (T : Finset A) (b : B) : ℕ := + (T.filter fun a=> f a=b).card + +noncomputable def bin (f : A→B) (T : Finset A) (k : ℕ) : Finset A := + T.filter fun a=> Nat.log 2 (multiplicity f T (f a))=k + +noncomputable def restrictions (f : A→B) (T : Finset A) (k : ℕ) : Finset B := + (bin f T k).image f + +noncomputable def enclosure (f : A→B) (U : Finset A) (l : ℕ) : Finset B := + (U.image f).filter fun b=> l ≤ multiplicity f U b + +lemma multiplicity_pos (f : A→B) (T : Finset A) {a : A} (ha : a∈T) : + 0 < multiplicity f T (f a) := + Finset.card_pos.mpr ⟨a,Finset.mem_filter.mpr ⟨ha,rfl⟩⟩ + +lemma multiplicity_mono (f : A→B) {T U : Finset A} (hTU : T⊆U) (b : B) : + multiplicity f T b ≤ multiplicity f U b := + Finset.card_le_card (Finset.filter_subset_filter _ hTU) + +lemma bin_fiber (f : A→B) (T : Finset A) (k : ℕ) {b : B} + (hb : b∈restrictions f T k) : + multiplicity f (bin f T k) b=multiplicity f T b := by + obtain ⟨a,ha,rfl⟩ := Finset.mem_image.mp hb + have hak := (Finset.mem_filter.mp ha).2 + unfold multiplicity + congr 1 + ext x + simp only [bin,Finset.mem_filter] + constructor + · rintro ⟨⟨hx,_⟩,he⟩;exact ⟨hx,he⟩ + · rintro ⟨hx,he⟩;exact ⟨⟨hx,by rw [he];exact hak⟩,he⟩ + +lemma bin_multiplicity_bounds (f : A→B) (T : Finset A) (k : ℕ) {b : B} + (hb : b∈restrictions f T k) : + 2^k ≤ multiplicity f T b ∧ multiplicity f T b < 2*(2^k) := by + obtain ⟨a,ha,rfl⟩ := Finset.mem_image.mp hb + obtain ⟨ha,hk⟩ := Finset.mem_filter.mp ha + have hp := multiplicity_pos f T ha + constructor + · rw [←hk];exact Nat.pow_log_le_self 2 (ne_of_gt hp) + · have hh := Nat.lt_pow_succ_log_self (by decide : 1 < 2) (multiplicity f T (f a)) + rw [hk,pow_succ,mul_comm] at hh + exact hh + +lemma bin_mass_bounds (f : A→B) (T : Finset A) (k : ℕ) : + 2^k*(restrictions f T k).card ≤ (bin f T k).card ∧ + (bin f T k).card ≤ 2*(2^k)*(restrictions f T k).card := by + have he : (bin f T k).card=∑b∈restrictions f T k,multiplicity f T b := by + rw [Finset.card_eq_sum_card_fiberwise (f:=f) (t:=restrictions f T k) + (fun a ha=> Finset.mem_image.mpr ⟨a,ha,rfl⟩)] + apply Finset.sum_congr rfl + intro b hb + exact bin_fiber f T k hb + rw [he] + constructor + · calc + _ = ∑b∈restrictions f T k,2^k := by simp [mul_comm] + _ ≤ _ := Finset.sum_le_sum fun b hb=> (bin_multiplicity_bounds f T k hb).1 + · calc + _ ≤ ∑b∈restrictions f T k,2*(2^k) := + Finset.sum_le_sum fun b hb=> (bin_multiplicity_bounds f T k hb).2.le + _ = _ := by simp [mul_comm] + +lemma restrictions_subset_enclosure (f : A→B) {T U : Finset A} (hTU : T⊆U) (k : ℕ) : + restrictions f T k⊆enclosure f U (2^k) := by + intro b hb + obtain ⟨a,ha,rfl⟩ := Finset.mem_image.mp hb + apply Finset.mem_filter.mpr + exact ⟨Finset.mem_image.mpr ⟨a,hTU (Finset.mem_filter.mp ha).1,rfl⟩, + (bin_multiplicity_bounds f T k hb).1.trans (multiplicity_mono f hTU _)⟩ + +lemma enclosure_mass (f : A→B) (U : Finset A) (l : ℕ) : + l*(enclosure f U l).card ≤ U.card := by + have hs : enclosure f U l⊆U.image f := Finset.filter_subset _ _ + calc + _ = ∑b∈enclosure f U l,l := by simp [mul_comm] + _ ≤ ∑b∈enclosure f U l,multiplicity f U b := + Finset.sum_le_sum fun b hb=> (Finset.mem_filter.mp hb).2 + _ ≤ ∑b∈U.image f,multiplicity f U b := + Finset.sum_le_sum_of_subset hs + _ = U.card := (Finset.card_eq_sum_card_fiberwise (fun a ha=> Finset.mem_image.mpr ⟨a,ha,rfl⟩)).symm + +theorem exists_massive_bin (f : A→B) (T : Finset A) (M : ℕ) + (hM : ∀a∈T,multiplicity f T (f a) ≤ M) : + ∃ k ≤ Nat.log 2 M, T.card ≤ (Nat.log 2 M+1)*(bin f T k).card := by + let keys := Finset.range (Nat.log 2 M+1) + have maps : ∀a∈T,Nat.log 2 (multiplicity f T (f a))∈keys := by + intro a ha + exact Finset.mem_range.mpr (Nat.lt_succ_of_le (Nat.log_mono_right (hM a ha))) + have hn : keys.Nonempty := ⟨0,Finset.mem_range.mpr (Nat.zero_lt_succ _)⟩ + have hp : (0:ℝ) < keys.card := by exact_mod_cast Finset.card_pos.mpr hn + obtain ⟨k,hk,hc⟩ := Finset.exists_le_card_fiber_of_nsmul_le_card_of_maps_to + (s:=T) (t:=keys) (f:=fun a=> Nat.log 2 (multiplicity f T (f a))) + (b:=(T.card:ℝ)/keys.card) maps hn (by + rw [nsmul_eq_mul,mul_div_cancel₀ _ (ne_of_gt hp)]) + refine ⟨k,Nat.le_of_lt_succ (Finset.mem_range.mp hk),?_⟩ + have hh : (T.card:ℝ) ≤ (keys.card:ℝ)*(bin f T k).card := by + have := (div_le_iff₀ hp).mp hc + simpa only [bin,mul_comm] using this + have hkeys : keys.card=Nat.log 2 M+1 := Finset.card_range _ + rw [hkeys] at hh + exact_mod_cast hh + +end SharpRamseyFive.DyadicLifts + +namespace SharpRamseyFive.ProjectiveRestriction +open Module DyadicLifts +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + +lemma finite_lift_bound (U : Submodule K V) (T : Finset (Domain U.dualRestrict)) + (b : ℙ K (Dual K U)) : + multiplicity (image U.dualRestrict) T b ≤ (Nat.card K)^(finrank K V-finrank K U) := by + let : Finite (Dual K V) := Module.finite_of_finite K + let : Finite (Domain U.dualRestrict) := by unfold Domain; infer_instance + let f := image U.dualRestrict + let A := T.filter fun p=>f p=b + let g : A→{p : Domain U.dualRestrict // f p=b} := fun p=>⟨p.val,(Finset.mem_filter.mp p.prop).2⟩ + have hi : Function.Injective g := by + intro a c hac + have hh := congrArg (fun x : {p : Domain U.dualRestrict // f p=b}=>x.val) hac + exact Subtype.ext hh + have hn := Nat.card_le_card_of_injective g hi + have he : Nat.card A=A.card := by + rw [Nat.card_eq_fintype_card,Fintype.card_coe] + rw [he] at hn + exact hn.trans (dual_restriction_fiber_card_le U b) + +theorem exists_restriction_dyad (U : Submodule K V) + (T UT : Finset (Domain U.dualRestrict)) (hTU : T⊆UT) (hT : T.Nonempty) : + ∃ k ≤ Nat.log 2 ((Nat.card K)^(finrank K V-finrank K U)), + 2^k ≤ (Nat.card K)^(finrank K V-finrank K U) ∧ + T.card ≤ 2*(Nat.log 2 ((Nat.card K)^(finrank K V-finrank K U))+1)*(2^k)* + (restrictions (image U.dualRestrict) T k).card ∧ + restrictions (image U.dualRestrict) T k ⊆ enclosure (image U.dualRestrict) UT (2^k) ∧ + (2^k)*(enclosure (image U.dualRestrict) UT (2^k)).card ≤ UT.card ∧ + ∀b∈restrictions (image U.dualRestrict) T k, + 2^k ≤ multiplicity (image U.dualRestrict) T b ∧ + multiplicity (image U.dualRestrict) T b < 2*(2^k) := by + let M := (Nat.card K)^(finrank K V-finrank K U) + let f := image U.dualRestrict + have hl : ∀a∈T,multiplicity f T (f a) ≤ M := fun a _=>finite_lift_bound U T (f a) + obtain ⟨k,hk,hc⟩ := exists_massive_bin f T M hl + have hM : M≠0 := by + obtain ⟨a,ha⟩ := hT + exact ne_of_gt ((multiplicity_pos f T ha).trans_le (hl a ha)) + refine ⟨k,hk,Nat.pow_le_of_le_log hM hk,?_, + restrictions_subset_enclosure f hTU k,enclosure_mass f UT (2^k), + fun b hb=>bin_multiplicity_bounds f T k hb⟩ + have hm := (bin_mass_bounds f T k).2 + have hh := hc.trans (Nat.mul_le_mul_left (Nat.log 2 M+1) hm) + simpa only [M,f,mul_assoc,mul_left_comm,mul_comm] using hh + +end SharpRamseyFive.ProjectiveRestriction + +namespace SharpRamseyFive.FiniteRemoval +open scoped Classical BigOperators +variable {A : Type*} + +theorem retain_card (T : Finset A) (d : A→ℝ) (c δ : ℝ) (hc : 0 < c) + (hd : ∀a∈T,0 ≤ d a) (hsum : ∑a∈T,d a ≤ δ*c*T.card) : + (1-δ)*(T.card:ℝ) ≤ (T.filter fun a=>d a ≤ c).card := by + let G := T.filter fun a=>d a ≤ c + let B := T.filter fun a=>c < d a + have hpartition : G.card+B.card=T.card := by + have he : B=T.filter (fun a=>¬d a ≤ c) := by simp only [B,not_le] + rw [he] + exact Finset.card_filter_add_card_filter_not _ + have hB : c*(B.card:ℝ) ≤ ∑a∈B,d a := by + calc + _ = ∑a∈B,c := by simp [mul_comm] + _ ≤ _ := Finset.sum_le_sum fun a ha=>(Finset.mem_filter.mp ha).2.le + have hBT : ∑a∈B,d a ≤ ∑a∈T,d a := + Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) (fun a ha _=>hd a ha) + have hcard : (G.card:ℝ)+(B.card:ℝ)=T.card := by exact_mod_cast hpartition + have hbad : (B.card:ℝ) ≤ δ*T.card := by + have hh := hB.trans (hBT.trans hsum) + nlinarith + change (1-δ)*(T.card:ℝ) ≤ (G.card:ℝ) + nlinarith + +theorem large_cell_retains_half (T : Finset A) (d : A→ℝ) + (n s q τ : ℝ) (hq : 0 < q) (hs : 0 < s) (hτ : 0 < τ) + (hsmall : Real.sqrt τ ≤ 1/200) (hsize : n ≤ 100*s) + (hd : ∀a∈T,0 ≤ d a) (hsum : ∑a∈T,d a ≤ τ*n*T.card/q) : + (T.card:ℝ)/2 ≤ (T.filter fun a=>d a ≤ Real.sqrt τ*s/q).card := by + have hr : 0 < Real.sqrt τ := Real.sqrt_pos.mpr hτ + have hr2 := Real.sq_sqrt hτ.le + have hc : 0 < Real.sqrt τ*s/q := div_pos (mul_pos hr hs) hq + have hcs : τ*n/q ≤ (1/2:ℝ)*(Real.sqrt τ*s/q) := by + rw [←mul_div_assoc] + apply (div_le_div_iff_of_pos_right hq).mpr + have hτn : τ*n ≤ τ*(100*s) := mul_le_mul_of_nonneg_left hsize hτ.le + have hsτ : τ*(100*s) ≤ (1/2:ℝ)*(Real.sqrt τ*s) := by + have hτr : τ ≤ Real.sqrt τ/200 := by nlinarith + have hmul := mul_le_mul_of_nonneg_right hτr hs.le + nlinarith + nlinarith + have hh : ∑a∈T,d a ≤ (1/2:ℝ)*(Real.sqrt τ*s/q)*T.card := by + calc + _ ≤ τ*n*T.card/q := hsum + _ = (τ*n/q)*T.card := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right hcs (Nat.cast_nonneg _) + have hz := retain_card T d (Real.sqrt τ*s/q) (1/2) hc hd hh + linarith + +end SharpRamseyFive.FiniteRemoval + +namespace SharpRamseyFive.ProjectiveRestriction + +section +open Module ProjectiveIncidence DyadicLifts FiniteRemoval +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + +noncomputable def flatDegree (U : Submodule K V) (S : Finset (ℙ K U)) + (p : ℙ K (Dual K V)) : ℕ := + (S.filter fun x=>Incident (Projectivization.map U.subtype U.injective_subtype x) p).card + +noncomputable def goodLifts (U : Submodule K V) (S : Finset (ℙ K U)) + (T : Finset (ℙ K (Dual K V))) (κ : ℝ) : Finset (ℙ K (Dual K V)) := + T.filter fun p=>(flatDegree U S p:ℝ) ≤ κ*S.card + +noncomputable def nonzeroLifts (U : Submodule K V) (T : Finset (ℙ K (Dual K V))) : + Finset (Domain U.dualRestrict) := T.subtype fun p : ℙ K (Dual K V)=>U.dualRestrict p.rep≠0 + +lemma goodLifts_nonzero (U : Submodule K V) (S : Finset (ℙ K U)) + (T : Finset (ℙ K (Dual K V))) (κ : ℝ) (hκ : κ < 1) (hS : S.Nonempty) + {p : ℙ K (Dual K V)} (hp : p∈goodLifts U S T κ) : U.dualRestrict p.rep≠0 := by + have hcard : (0:ℝ) < S.card := by exact_mod_cast Finset.card_pos.mpr hS + have hcut := (Finset.mem_filter.mp hp).2 + have hdeg : (flatDegree U S p:ℝ) < S.card := by nlinarith + apply restriction_nonzero_of_degree_lt U S p + exact_mod_cast hdeg + +lemma card_nonzeroLifts (U : Submodule K V) (T : Finset (ℙ K (Dual K V))) + (hT : ∀p∈T,U.dualRestrict p.rep≠0) : (nonzeroLifts U T).card=T.card := by + change (T.subtype (fun p : ℙ K (Dual K V)=>U.dualRestrict p.rep≠0)).card=T.card + rw [Finset.card_subtype,Finset.filter_eq_self.mpr hT] + +lemma nonzeroLifts_mono (U : Submodule K V) {T UT : Finset (ℙ K (Dual K V))} + (hTU : T⊆UT) : nonzeroLifts U T⊆nonzeroLifts U UT := Finset.subtype_mono hTU + +lemma card_nonzeroLifts_le (U : Submodule K V) (T : Finset (ℙ K (Dual K V))) : + (nonzeroLifts U T).card ≤ T.card := by + change (T.subtype (fun p : ℙ K (Dual K V)=>U.dualRestrict p.rep≠0)).card ≤ T.card + rw [Finset.card_subtype] + exact Finset.card_filter_le _ _ + +lemma restricted_flatDegree (U : Submodule K V) (S : Finset (ℙ K U)) + (p : Domain U.dualRestrict) : + (S.filter fun x=>Incident x (image U.dualRestrict p)).card=flatDegree U S p.val := by + unfold flatDegree + congr 1 + ext x + simp only [Finset.mem_filter,incident_restriction] + +lemma restricted_degree_bound (U : Submodule K V) (S : Finset (ℙ K U)) + (T : Finset (ℙ K (Dual K V))) (κ : ℝ) (k : ℕ) + {b : ℙ K (Dual K U)} + (hb : b∈restrictions (image U.dualRestrict) (nonzeroLifts U (goodLifts U S T κ)) k) : + ((S.filter fun x=>Incident x b).card:ℝ) ≤ κ*S.card := by + obtain ⟨p,hp,rfl⟩ := Finset.mem_image.mp hb + have hpT : p∈nonzeroLifts U (goodLifts U S T κ) := (Finset.mem_filter.mp hp).1 + have hg : p.val∈goodLifts U S T κ := Finset.mem_subtype.mp hpT + rw [restricted_flatDegree] + exact (Finset.mem_filter.mp hg).2 + +lemma reduced_incidence_bound (U : Submodule K V) (S : Finset (ℙ K U)) + (T : Finset (ℙ K (Dual K V))) (κ : ℝ) (k : ℕ) : + (incidences S (restrictions (image U.dualRestrict) + (nonzeroLifts U (goodLifts U S T κ)) k):ℝ) ≤ + κ*S.card*(restrictions (image U.dualRestrict) + (nonzeroLifts U (goodLifts U S T κ)) k).card := by + rw [incidences_eq_sum] + calc + _ ≤ ∑b∈restrictions (image U.dualRestrict) (nonzeroLifts U (goodLifts U S T κ)) k, + κ*S.card := by + apply Finset.sum_le_sum + intro b hb + have hh := restricted_degree_bound U S T κ k hb + simpa only [Finset.sum_boole,incidenceEntry] using hh + _ = _ := by simp [mul_comm] + +end + +section +open Module ProjectiveIncidence DyadicLifts FiniteRemoval +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + +theorem large_cell_restriction (U : Submodule K V) (S : Finset (ℙ K U)) + (T UT : Finset (ℙ K (Dual K V))) (hS : S.Nonempty) (hT : T.Nonempty) + (hTU : T⊆UT) (n τ : ℝ) (hτ : 0 < τ) (hsmall : Real.sqrt τ ≤ 1/200) + (hsize : n ≤ 100*S.card) + (hsum : ∑p∈T,(flatDegree U S p:ℝ) ≤ τ*n*T.card/(Nat.card K)) : + let M := (Nat.card K)^(finrank K V-finrank K U) + let L := Nat.log 2 M+1 + let G := nonzeroLifts U (goodLifts U S T (Real.sqrt τ/Nat.card K)) + ∃ k ≤ Nat.log 2 M, + 2^k ≤ M ∧ + (T.card:ℝ) ≤ 4*L*(2^k)*(restrictions (image U.dualRestrict) G k).card ∧ + (restrictions (image U.dualRestrict) G k).Nonempty ∧ + restrictions (image U.dualRestrict) G k ⊆ + enclosure (image U.dualRestrict) (nonzeroLifts U UT) (2^k) ∧ + ((enclosure (image U.dualRestrict) (nonzeroLifts U UT) (2^k)).card:ℝ)*T.card ≤ + 4*L*UT.card*(restrictions (image U.dualRestrict) G k).card ∧ + n*T.card ≤ 400*L*M*S.card*(restrictions (image U.dualRestrict) G k).card := by + dsimp only + let M := (Nat.card K)^(finrank K V-finrank K U) + let L := Nat.log 2 M+1 + let G := nonzeroLifts U (goodLifts U S T (Real.sqrt τ/Nat.card K)) + have hq : (1:ℝ) ≤ Nat.card K := by exact_mod_cast (Finite.one_lt_card (α := K)).le + have hqpos : (0:ℝ) < Nat.card K := by linarith + have hscard : (0:ℝ) < S.card := by exact_mod_cast Finset.card_pos.mpr hS + have htcard : (0:ℝ) < T.card := by exact_mod_cast Finset.card_pos.mpr hT + have hκ : Real.sqrt τ/(Nat.card K) < 1 := by + apply (div_lt_one hqpos).mpr + linarith + have hGcard : G.card=(goodLifts U S T (Real.sqrt τ/Nat.card K)).card := + card_nonzeroLifts U _ (fun p hp=>goodLifts_nonzero U S T _ hκ hS hp) + have hhalf : (T.card:ℝ)/2 ≤ G.card := by + rw [hGcard] + have hh := large_cell_retains_half T (fun p=>(flatDegree U S p:ℝ)) + n S.card (Nat.card K) τ hqpos hscard hτ hsmall hsize + (fun _ _=>Nat.cast_nonneg _) hsum + simpa only [goodLifts,div_mul_eq_mul_div] using hh + have hG : G.Nonempty := by + apply Finset.card_pos.mp + exact_mod_cast (lt_of_lt_of_le (by positivity : (0:ℝ)<(T.card:ℝ)/2) hhalf) + have hGUT : G⊆nonzeroLifts U UT := + nonzeroLifts_mono U ((Finset.filter_subset _ _).trans hTU) + obtain ⟨k,hk,hkm,hm,hsub,hencl,hdyad⟩ := exists_restriction_dyad U G (nonzeroLifts U UT) hGUT hG + have hm' : (G.card:ℝ) ≤ 2*L*(2^k)*(restrictions (image U.dualRestrict) G k).card := by + exact_mod_cast hm + have hmass : (T.card:ℝ) ≤ 4*L*(2^k)*(restrictions (image U.dualRestrict) G k).card := by + linarith + have h0 : (restrictions (image U.dualRestrict) G k).Nonempty := by + apply Finset.card_pos.mp + by_contra hz + have he : (restrictions (image U.dualRestrict) G k).card=0 := by omega + rw [he,Nat.cast_zero,mul_zero] at hmass + linarith + refine ⟨k,hk,hkm,hmass,h0,hsub,?_,?_⟩ + · have he : (2:ℝ)^k*(enclosure (image U.dualRestrict) (nonzeroLifts U UT) (2^k)).card ≤ UT.card := by + have hh := hencl.trans (card_nonzeroLifts_le U UT) + exact_mod_cast hh + have h1 := mul_le_mul_of_nonneg_left hmass + (Nat.cast_nonneg (enclosure (image U.dualRestrict) (nonzeroLifts U UT) (2^k)).card) + have h2 := mul_le_mul_of_nonneg_left he + (by positivity : (0:ℝ) ≤ 4*L*(restrictions (image U.dualRestrict) G k).card) + nlinarith + · have hkm' : (2:ℝ)^k ≤ M := by exact_mod_cast hkm + have h1 := mul_le_mul_of_nonneg_right hsize (Nat.cast_nonneg T.card) + have h2 := mul_le_mul_of_nonneg_left hmass + (by positivity : (0:ℝ) ≤ 100*S.card) + have h3 := mul_le_mul_of_nonneg_left hkm' + (by positivity : (0:ℝ) ≤ 400*L*S.card*(restrictions (image U.dualRestrict) G k).card) + nlinarith + +end + +open Module ProjectiveIncidence DyadicLifts FiniteRemoval +open scoped Classical LinearAlgebra.Projectivization BigOperators + +lemma logarithmic_gap_of_cross {a b c d C : ℝ} + (ha : 0 < a) (hb : 0 < b) (hc : 0 < c) (hd : 0 < d) (hC : 0 < C) + (hcross : a*d ≤ C*c*b) : + Real.log (a/b) ≤ Real.log (c/d)+Real.log C := by + have hh : a/b ≤ C*(c/d) := by + apply (div_le_iff₀ hb).mpr + calc + a ≤ (C*c*b)/d := (le_div_iff₀ hd).mpr hcross + _ = C*(c/d)*b := by ring + have hl := Real.log_le_log (div_pos ha hb) hh + rw [Real.log_mul (ne_of_gt hC) (ne_of_gt (div_pos hc hd))] at hl + linarith only [hl] + +lemma restriction_product_loss (q n t s t₀ b L : ℝ) (D j : ℕ) + (hq : 0 < q) (hL : 0 < L) (hjd : j ≤ D) + (horig : q^D*Real.exp (-b) ≤ n*t) + (hred : n*t ≤ 400*L*q^(D-j)*s*t₀) : + q^j*Real.exp (-(b+Real.log (400*L))) ≤ s*t₀ := by + have hpow : 0 < q^(D-j) := pow_pos hq _ + have hmul : q^(D-j)*(q^j*Real.exp (-b)) ≤ q^(D-j)*(400*L*s*t₀) := by + have he : q^D=q^(D-j)*q^j := by rw [←pow_add,Nat.sub_add_cancel hjd] + rw [he] at horig + nlinarith only [horig,hred] + have hc : q^j*Real.exp (-b) ≤ 400*L*s*t₀ := (mul_le_mul_iff_of_pos_left hpow).mp hmul + rw [neg_add,Real.exp_add,Real.exp_neg (Real.log (400*L)),Real.exp_log (by positivity)] + rw [←mul_assoc,mul_inv_le_iff₀ (by positivity : (0:ℝ)<400*L)] + nlinarith only [hc] + +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + +theorem large_cell_pair_with_losses (U : Submodule K V) (S : Finset (ℙ K U)) + (T UT : Finset (ℙ K (Dual K V))) (hS : S.Nonempty) (hT : T.Nonempty) + (hTU : T⊆UT) (n τ b : ℝ) (hn : 0 < n) (hτ : 0 < τ) (hsmall : Real.sqrt τ ≤ 1/200) + (hsize : n ≤ 100*S.card) + (horig : (Nat.card K:ℝ)^(finrank K V)*Real.exp (-b) ≤ n*T.card) + (hsum : ∑p∈T,(flatDegree U S p:ℝ) ≤ τ*n*T.card/(Nat.card K)) : + let M := (Nat.card K)^(finrank K V-finrank K U) + let L := Nat.log 2 M+1 + let G := nonzeroLifts U (goodLifts U S T (Real.sqrt τ/Nat.card K)) + ∃ k ≤ Nat.log 2 M, + let T₀ := restrictions (image U.dualRestrict) G k + let UT₀ := enclosure (image U.dualRestrict) (nonzeroLifts U UT) (2^k) + T₀.Nonempty ∧ T₀⊆UT₀ ∧ + (Nat.card K:ℝ)^(finrank K U)*Real.exp (-(b+Real.log (400*L))) ≤ (S.card:ℝ)*T₀.card ∧ + (∀p∈T₀,((S.filter fun x=>Incident x p).card:ℝ) ≤ (Real.sqrt τ/(Nat.card K))*S.card) ∧ + (Nat.card K:ℝ)*(incidences S T₀:ℝ) ≤ Real.sqrt τ*S.card*T₀.card ∧ + Real.log ((UT₀.card:ℝ)/T₀.card) ≤ Real.log ((UT.card:ℝ)/T.card)+Real.log (4*L) ∧ + ∀u v : ℝ,0 < u → u ≤ v → + Real.log (u/S.card) ≤ Real.log (v/n)+Real.log 100 := by + dsimp only + let M := (Nat.card K)^(finrank K V-finrank K U) + let L := Nat.log 2 M+1 + let G := nonzeroLifts U (goodLifts U S T (Real.sqrt τ/Nat.card K)) + obtain ⟨k,hk,_,hm,hT₀,hsub,hgap,hprod⟩ := + large_cell_restriction U S T UT hS hT hTU n τ hτ hsmall hsize hsum + let T₀ := restrictions (image U.dualRestrict) G k + let UT₀ := enclosure (image U.dualRestrict) (nonzeroLifts U UT) (2^k) + have hq : (0:ℝ)restricted_degree_bound U S T _ k hp,?_,?_,?_⟩ + · have hh := mul_le_mul_of_nonneg_left (reduced_incidence_bound U S T (Real.sqrt τ/Nat.card K) k) hq.le + calc + _ ≤ (Nat.card K:ℝ)*(Real.sqrt τ/Nat.card K*S.card*T₀.card) := hh + _ = _ := by field_simp;ring + · exact logarithmic_gap_of_cross hut₀ ht₀ hut htc (by positivity : (0:ℝ)<4*L) hgap + · intro u v hu huv + apply logarithmic_gap_of_cross hu hs (hu.trans_le huv) hn (by norm_num : (0:ℝ)<100) + have hh := mul_le_mul_of_nonneg_left hsize hu.le + have hh' := mul_le_mul_of_nonneg_right huv (by positivity : (0:ℝ) ≤ 100*S.card) + nlinarith only [hh,hh'] + +end SharpRamseyFive.ProjectiveRestriction + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/GeometryScaleOrientedLower.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/GeometryScaleOrientedLower.lean new file mode 100644 index 0000000000000000000000000000000000000000..44c0218f6da53e99330b3fd43b32408b249e3674 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/GeometryScaleOrientedLower.lean @@ -0,0 +1,130 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.RadialOffException +import OAI.Combinatorics.RamseyFive.Geometry.DyadCount + +namespace OAI + +noncomputable section +namespace SharpRamseyFive.ScoreGeometry + +lemma geometryScale_oriented_lower {q : ℕ} {σ n : ℝ} + (hq : (q:ℝ)=Real.exp σ) (hn : 0by simpa only [neg_mul] using h.le) + filter_upwards [eventually_finite_node hη hη' (Cb+1) (by linarith),ht] with σ hn ht + intro D b R L₀ q K V _ _ _ _ _ _ _ _ hd A₀ UA B₀ UB hA₀ hB₀ hσ hq hcard hr hL hb hbhi hready hAB hprod + have hs : 0<σ := zero_lt_one.trans_le hσ + have hD : 1≤D := (Real.one_le_rpow hσ (beta_pos hη).le).trans hr.dlo + have hF : 1≤σ^(6*beta η) := Real.one_le_rpow hσ (by positivity [beta_pos hη]) + have hb' : b+1≤(Cb+1)*D*σ^(6*beta η) := by + have hx := mul_le_mul hD hF (by norm_num : (0:ℝ)≤1) (by linarith : 0≤D) + nlinarith only [hbhi,hx] + have hτ : σ^(-1000*beta η)≤σ^(-800*beta η)*(9/10:ℝ)^2 := by + have hm := mul_le_mul_of_nonneg_left ht (Real.rpow_nonneg hs.le (-800*beta η)) + rw [←Real.rpow_add hs] at hm + simpa only [show -800*beta η+(-200*beta η)=-1000*beta η by ring] using hm + have hdens := ready_trimmed_density A₀ UA B₀ UB _ _ (Real.rpow_nonneg hs.le _) hτ hready + have hp := ready_trimmed_product A₀ UA B₀ UB _ b hready hprod + obtain ⟨hnA,hnB,hf,_,_⟩ := hn D (b+1) (σ^(-800*beta η)) R L₀ q K V hd (A₀∩UA) UA (B₀∩UB) UB + hcard (hq.trans (by exact_mod_cast hcard)) hr hL (by linarith) hb' + (Real.rpow_pos_of_pos hs _) le_rfl Finset.inter_subset_right Finset.inter_subset_right hAB hdens hp + simpa only [guardedNodeLaw,dite_eq_left hready] using hf + +theorem eventually_oriented_guarded_node_failure {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))], + ∀ (hd : finrank K V=5) (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) + (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K), + Nat.card K=q → Range η σ D R → (L₀:ℝ)=L η σ D → + 0≤b → b≤Cb*D*σ^(6*beta η) → + OriginalNodeReady A₀ UA B₀ UB (9/10) (σ^(-1000*beta η)) → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(A₀.card:ℝ)*B₀.card → + let f := fourFinitePredictor hd σ UA UB (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fourFinitePredictor (K:=K) (V:=Dual K V) (by simpa using hd) σ UB + (UA.map bidualPoint.toEmbedding) (P η σ D R) (σ^(-800*beta η)) R L₀ + map (orientedNodeTapeLaw f r (1000*(Nat.card K)^2) (Nat.card K)) (fun t=> + (orientedGuardedNodeEncoded f r σ hσ hq hd.le A₀ UA B₀ UB hA₀ hB₀ (9/100000) + (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) t).map + (orientedNodeDecoded f r UA UB (1000*(Nat.card K)^2) (Nat.card K) t)) none≤ + 5*Real.exp (-(Nat.card K:ℝ)) := by + filter_upwards [eventually_guarded_node_failure hη hη' Cb hCb] with σ hn + intro D b R L₀ q K V _ _ _ _ _ _ _ _ _ hd A₀ UA B₀ UB hA₀ hB₀ hσ hq hcard hr hL hb hbhi hready hprod + dsimp only + rw [orientedGuardedNode_law] + split_ifs with hAB + · exact hn D b R L₀ q K V hd A₀ UA B₀ UB hA₀ hB₀ hσ hq hcard hr hL hb hbhi hready hAB hprod + · rw [map_option_none] + apply hn D b R L₀ q K (Dual K V) (by simpa using hd) B₀ UB + (A₀.map bidualPoint.toEmbedding) (UA.map bidualPoint.toEmbedding) hB₀ hA₀.map + hσ hq hcard hr hL hb hbhi + · exact (ready_bidual A₀ UA B₀ UB _ _).mpr hready + · simpa only [←Finset.map_inter,Finset.card_map] using (le_of_not_ge hAB) + · simpa only [Finset.card_map,mul_comm (B₀.card:ℝ) (A₀.card:ℝ)] using hprod +end + +open Module FiniteEntropy ReverseCap ScoreGeometry +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + +omit [Finite K] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] in +lemma reverseNodePair_excludes_first + (out : Option (Finset (ℙ K (Dual K (Dual K V)))×Finset (ℙ K (Dual K V)))) + (b : ℙ K (Dual K V)) : + Excludes b ((out.map reverseNodePair).map Prod.fst) ↔ Excludes b (out.map Prod.snd) := by + cases out <;> simp [reverseNodePair,Excludes] +omit [Finite K] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] in +lemma reverseNodePair_excludes_second + (out : Option (Finset (ℙ K (Dual K (Dual K V)))×Finset (ℙ K (Dual K V)))) + (a : ℙ K V) : + Excludes a ((out.map reverseNodePair).map Prod.snd) ↔ + Excludes (bidualPoint a) (out.map Prod.fst) := by + cases out <;> simp [reverseNodePair,Excludes] + +theorem orientedGuardedNode_original + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) (c δ τ P : ℝ) + (hc : 0 + (orientedGuardedNodeEncoded f r σ hσ hq hd.le A₀ UA B₀ UB hA₀ hB₀ c δ τ P hδ t).map + (orientedNodeDecoded f r UA UB (1000*(Nat.card K)^2) (Nat.card K) t)) + (∀b,eventMass p (Finset.univ.filter fun out=>Excludes b (out.map Prod.fst))≤ + (50*(Nat.card K:ℝ)/(9*(c*δ)))*(((A₀.filter fun a=>Incident a b).card:ℝ)/A₀.card)) ∧ + (∀a,eventMass p (Finset.univ.filter fun out=>Excludes a (out.map Prod.snd))≤ + (50*(Nat.card K:ℝ)/(9*(c*δ)))*(((B₀.filter (Incident a)).card:ℝ)/B₀.card)) := by + have hconst : 50*(Nat.card K:ℝ)/(9*((9:ℝ)/10*δ))≤50*(Nat.card K:ℝ)/(9*(c*δ)) := by + apply div_le_div_of_nonneg_left (by positivity) (by positivity) + nlinarith only [mul_le_mul_of_nonneg_right hc9 hδ.le] + dsimp only + rw [orientedGuardedNode_law] + split_ifs with hAB + · obtain ⟨h1,h2⟩ := guardedNode_original f σ hσ hq hd hq3 A₀ UA B₀ UB + hA₀ hB₀ c δ τ (((A₀∩UA).card:ℝ)*Real.exp (10*P)) hc hc9 hδ hτ + refine ⟨h1,fun a=>(h2 a).trans ?_⟩ + exact mul_le_mul_of_nonneg_right hconst (by positivity) + · obtain ⟨h1,h2⟩ := guardedNode_original r σ hσ hq (by simpa using hd) hq3 B₀ UB + (A₀.map bidualPoint.toEmbedding) (UA.map bidualPoint.toEmbedding) hB₀ hA₀.map + c δ τ (((B₀∩UB).card:ℝ)*Real.exp (10*P)) hc hc9 hδ hτ + constructor + · intro b + rw [eventMass_map_filter] + simp only [reverseNodePair_excludes_first] + have hh := h2 b + simp only [Finset.filter_map,Finset.card_map,Function.comp_def,Equiv.toEmbedding_apply, + incident_bidual] at hh + exact hh.trans (mul_le_mul_of_nonneg_right hconst (by positivity)) + · intro a + rw [eventMass_map_filter] + simp only [reverseNodePair_excludes_second] + simpa only [incident_bidual] using h1 (bidualPoint a) + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/GuardedNodeEncoder.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/GuardedNodeEncoder.lean new file mode 100644 index 0000000000000000000000000000000000000000..6faa423a4ad96e45571fdd4a730c030ba80bb6ca --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/GuardedNodeEncoder.lean @@ -0,0 +1,61 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.FiniteNode + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def guardedNodeEncoded (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) (c δ τ M : ℝ) (hδ : 0<δ) + (t : FiniteNodeTape pred (1000*(Nat.card K)^2) (Nat.card K)) : + Option (FiniteNodeMessage pred UB (1000*(Nat.card K)^2) (Nat.card K) t) := by + letI : Finite V := Module.finite_of_finite K + letI : Fintype V := Fintype.ofFinite _ + letI : Finite (Dual K V) := Module.finite_of_finite K + letI : Fintype (Dual K V) := Fintype.ofFinite _ + letI : Finite (Dual K (Dual K V)) := Module.finite_of_finite K + letI : Fintype (ℙ K (Dual K (Dual K V))) := Fintype.ofFinite _ + exact if hr : OriginalNodeReady A₀ UA B₀ UB δ τ then + let hA := nonempty_of_positive_trim (A₀∩UA) A₀ hA₀ δ hδ hr.1 + let hB := nonempty_of_positive_trim (B₀∩UB) B₀ hB₀ δ hδ hr.2.1 + let hnA := reverseLength_universal_bound σ hσ hq hd (A₀∩UA) UA hA Finset.inter_subset_right + let hnB := reverseLength_universal_bound σ hσ hq (show finrank K (Dual K V)≤5 by simpa using hd) + (B₀∩UB) UB hB Finset.inter_subset_right + finiteNodeEncoded pred (A₀∩UA) UA (B₀∩UB) UB (1000*(Nat.card K)^2) + ⟨_,Nat.lt_succ_of_le hnA⟩ ⟨_,Nat.lt_succ_of_le hnB⟩ (Nat.card K) + ((320/((9:ℝ)/10)+320)*(Nat.card K:ℝ)^5/(B₀∩UB).card) + ((320/c+320)*(Nat.card K:ℝ)^5/(A₀∩UA).card) c M t + else none + +lemma guardedNode_encoder_law (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) (c δ τ M : ℝ) (hδ : 0<δ) : + map (finiteNodeTapeLaw pred (1000*(Nat.card K)^2) (Nat.card K)) (fun t=> + (guardedNodeEncoded pred σ hσ hq hd A₀ UA B₀ UB hA₀ hB₀ c δ τ M hδ t).map + (finiteNodeDecoded pred UB (1000*(Nat.card K)^2) (Nat.card K) t))= + guardedNodeLaw pred σ hσ hq hd A₀ UA B₀ UB hA₀ hB₀ c δ τ M hδ := by + unfold guardedNodeEncoded guardedNodeLaw + split_ifs + · rfl + · simp only [Option.map_none] + exact map_const _ none + +lemma guardedNode_encode_none (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) (c δ τ M : ℝ) (hδ : 0<δ) + (hr : ¬OriginalNodeReady A₀ UA B₀ UB δ τ) + (t : FiniteNodeTape pred (1000*(Nat.card K)^2) (Nat.card K)) : + guardedNodeEncoded pred σ hσ hq hd A₀ UA B₀ UB hA₀ hB₀ c δ τ M hδ t=none := by + simp only [guardedNodeEncoded,hr,↓reduceDIte] +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/GuardedNodeSent.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/GuardedNodeSent.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3618fb0ea8b3d0fa6fcc043afe46a5dbe4a41ae --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/GuardedNodeSent.lean @@ -0,0 +1,151 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.GuardedNodeEncoder +import OAI.Combinatorics.RamseyFive.Trees.FiniteNodeSent + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence + +section +open Module FiniteEntropy ReverseCap ScoreGeometry +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +lemma guardedNode_sent_valid (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) (c δ τ M : ℝ) (hδ : 0<δ) + (t : FiniteNodeTape pred (1000*(Nat.card K)^2) (Nat.card K)) + (m : FiniteNodeMessage pred UB (1000*(Nat.card K)^2) (Nat.card K) t) + (hm : guardedNodeEncoded pred σ hσ hq hd A₀ UA B₀ UB hA₀ hB₀ c δ τ M hδ t=some m) : + OriginalNodeReady A₀ UA B₀ UB δ τ ∧ + ValidCap (B₀∩UB) UB ((320/c+320)*(Nat.card K:ℝ)^5/(A₀∩UA).card) + (UB∩(finiteNodeDecoded pred UB (1000*(Nat.card K)^2) (Nat.card K) t m).1) ∧ + ValidCap (A₀∩UA) UA ((320/((9:ℝ)/10)+320)*(Nat.card K:ℝ)^5/(B₀∩UB).card) + (UA∩(finiteNodeDecoded pred UB (1000*(Nat.card K)^2) (Nat.card K) t m).2) := by + unfold guardedNodeEncoded at hm + split_ifs at hm with hr + exact ⟨hr,finiteNode_sent_valid _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hm⟩ + +lemma guardedNode_original_capture (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) (c δ τ M : ℝ) (hδ : 0<δ) + (t : FiniteNodeTape pred (1000*(Nat.card K)^2) (Nat.card K)) + (m : FiniteNodeMessage pred UB (1000*(Nat.card K)^2) (Nat.card K) t) + (hm : guardedNodeEncoded pred σ hσ hq hd A₀ UA B₀ UB hA₀ hB₀ c δ τ M hδ t=some m) : + (9/10:ℝ)*δ*A₀.card≤(A₀∩(UA∩(finiteNodeDecoded pred UB (1000*(Nat.card K)^2) (Nat.card K) t m).2)).card ∧ + (9/10:ℝ)*δ*B₀.card≤(B₀∩(UB∩(finiteNodeDecoded pred UB (1000*(Nat.card K)^2) (Nat.card K) t m).1)).card := by + obtain ⟨hr,hB,hA⟩ := guardedNode_sent_valid pred σ hσ hq hd A₀ UA B₀ UB hA₀ hB₀ c δ τ M hδ t m hm + have ha := hA.2.2 + have hb := hB.2.2 + simp only [Finset.inter_assoc,Finset.inter_left_idem] at ha hb + constructor + · nlinarith [hr.1] + · nlinarith [hr.2.1] +end + +open Module FiniteEntropy ReverseCap ScoreGeometry +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + +abbrev OrientedNodeTape + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) (H : ℕ) (q : ℝ) := + FiniteNodeTape f H q × FiniteNodeTape r H q +noncomputable instance orientedNodeTapeFintype + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) (H : ℕ) (q : ℝ) : + Fintype (OrientedNodeTape f r H q) := by + exact @instFintypeProd (FiniteNodeTape f H q) (FiniteNodeTape r H q) inferInstance inferInstance +abbrev OrientedNodeMessage + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (UA : Finset (ℙ K V)) (UB : Finset (ℙ K (Dual K V))) (H : ℕ) (q : ℝ) + (t : OrientedNodeTape f r H q) := + FiniteNodeMessage f UB H q t.1 ⊕ FiniteNodeMessage r (UA.map bidualPoint.toEmbedding) H q t.2 +noncomputable def orientedNodeTapeLaw + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) (H : ℕ) (q : ℝ) : + Law (OrientedNodeTape f r H q) := + adaptiveLaw (finiteNodeTapeLaw f H q) (fun _=>finiteNodeTapeLaw r H q) +noncomputable def reverseNodePair + (out : Finset (ℙ K (Dual K (Dual K V)))×Finset (ℙ K (Dual K V))) : + Finset (ℙ K (Dual K V))×Finset (ℙ K V) := + (out.2,out.1.map bidualPoint.symm.toEmbedding) +noncomputable def orientedNodeDecoded + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (UA : Finset (ℙ K V)) (UB : Finset (ℙ K (Dual K V))) (H : ℕ) (q : ℝ) + (t : OrientedNodeTape f r H q) (m : OrientedNodeMessage f r UA UB H q t) : + Finset (ℙ K (Dual K V))×Finset (ℙ K V) := match m with + | .inl m=>finiteNodeDecoded f UB H q t.1 m + | .inr m=>reverseNodePair (finiteNodeDecoded r (UA.map bidualPoint.toEmbedding) H q t.2 m) +noncomputable def orientedNodeCost + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (UA : Finset (ℙ K V)) (UB : Finset (ℙ K (Dual K V))) (H : ℕ) (q : ℝ) + (t : OrientedNodeTape f r H q) (m : OrientedNodeMessage f r UA UB H q t) : ℝ := + Real.log 2 + match m with + | .inl m=>finiteNodeCost f UB H q t.1 m + | .inr m=>finiteNodeCost r (UA.map bidualPoint.toEmbedding) H q t.2 m + +noncomputable def orientedGuardedNodeEncoded + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) (c δ τ P : ℝ) (hδ : 0<δ) + (t : OrientedNodeTape f r (1000*(Nat.card K)^2) (Nat.card K)) : + Option (OrientedNodeMessage f r UA UB (1000*(Nat.card K)^2) (Nat.card K) t) := + if (A₀∩UA).card≤(B₀∩UB).card then + (guardedNodeEncoded f σ hσ hq hd A₀ UA B₀ UB hA₀ hB₀ c δ τ + (((A₀∩UA).card:ℝ)*Real.exp (10*P)) hδ t.1).map Sum.inl + else + (guardedNodeEncoded r σ hσ hq (by simpa using hd) B₀ UB + (A₀.map bidualPoint.toEmbedding) (UA.map bidualPoint.toEmbedding) hB₀ + hA₀.map c δ τ (((B₀∩UB).card:ℝ)*Real.exp (10*P)) hδ t.2).map Sum.inr + +lemma orientedGuardedNode_law + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) (c δ τ P : ℝ) (hδ : 0<δ) : + map (orientedNodeTapeLaw f r (1000*(Nat.card K)^2) (Nat.card K)) (fun t=> + (orientedGuardedNodeEncoded f r σ hσ hq hd A₀ UA B₀ UB hA₀ hB₀ c δ τ P hδ t).map + (orientedNodeDecoded f r UA UB (1000*(Nat.card K)^2) (Nat.card K) t))= + if (A₀∩UA).card≤(B₀∩UB).card then + guardedNodeLaw f σ hσ hq hd A₀ UA B₀ UB hA₀ hB₀ c δ τ (((A₀∩UA).card:ℝ)*Real.exp (10*P)) hδ + else map + (guardedNodeLaw r σ hσ hq (by simpa using hd) B₀ UB + (A₀.map bidualPoint.toEmbedding) (UA.map bidualPoint.toEmbedding) hB₀ + hA₀.map c δ τ (((B₀∩UB).card:ℝ)*Real.exp (10*P)) hδ) + (Option.map reverseNodePair) := by + unfold orientedGuardedNodeEncoded + split_ifs with h + · simp only [Option.map_map,Function.comp_def,orientedNodeDecoded] + exact (map_independent_left + (finiteNodeTapeLaw f (1000*(Nat.card K)^2) (Nat.card K)) + (finiteNodeTapeLaw r (1000*(Nat.card K)^2) (Nat.card K)) _).trans + (guardedNode_encoder_law f σ hσ hq hd A₀ UA B₀ UB hA₀ hB₀ c δ τ + (((A₀∩UA).card:ℝ)*Real.exp (10*P)) hδ) + · simp only [Option.map_map,Function.comp_def,orientedNodeDecoded] + have hh := congrArg (fun p=>map p (Option.map reverseNodePair)) + (guardedNode_encoder_law r σ hσ hq (by simpa using hd) B₀ UB + (A₀.map bidualPoint.toEmbedding) (UA.map bidualPoint.toEmbedding) hB₀ + hA₀.map c δ τ (((B₀∩UB).card:ℝ)*Real.exp (10*P)) hδ) + rw [map_comp] at hh + simp only [Option.map_map,Function.comp_def] at hh + exact (map_independent_right + (finiteNodeTapeLaw f (1000*(Nat.card K)^2) (Nat.card K)) + (finiteNodeTapeLaw r (1000*(Nat.card K)^2) (Nat.card K)) _).trans hh + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/HighGeometryClosure.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/HighGeometryClosure.lean new file mode 100644 index 0000000000000000000000000000000000000000..0efae573d445f33942d926e9ce306366dc9ec062 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/HighGeometryClosure.lean @@ -0,0 +1,342 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.GeometryScaleOrientedLower +import OAI.Combinatorics.RamseyFive.Geometry.CapturedGlobalRadialMoment + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + +omit [FiniteDimensional K V] [Finite K] in +lemma RadialLine.exists_other (x : ℙ K V) (l : RadialLine x) : + ∃ y : ℙ K V,x≠y ∧ y.submodule≤l.val := by + have hn : ¬l.val≤x.submodule := by + intro h + have hh := Submodule.finrank_mono h + rw [l.property.1,x.finrank_submodule] at hh + omega + obtain ⟨v,hv,hvx⟩ := SetLike.not_le_iff_exists.mp hn + have hv0 : v≠0 := by intro he; exact hvx (he▸x.submodule.zero_mem) + refine ⟨Projectivization.mk K v hv0,?_,?_⟩ + · intro he + apply hvx + rw [he,Projectivization.submodule_mk] + exact Submodule.mem_span_singleton_self v + · rw [Projectivization.submodule_mk,Submodule.span_singleton_le_iff_mem] + exact hv + +omit [Finite K] in +lemma radial_card_le_points (x : ℙ K V) [Fintype (ℙ K V)] [Fintype (RadialLine x)] : + Fintype.card (RadialLine x)≤Fintype.card (ℙ K V) := by + let y : RadialLine x→ℙ K V := fun l => (l.exists_other x).choose + have hy (l : RadialLine x) : x≠y l ∧ (y l).submodule≤l.val := + (l.exists_other x).choose_spec + apply Fintype.card_le_of_injective y + intro l m he + have hl : RadialLine.through x (y l) (hy l).1=l := + (RadialLine.through_eq_iff (hy l).1 l).mpr (hy l).2 + have hm : RadialLine.through x (y l) (hy l).1=m := + (RadialLine.through_eq_iff (hy l).1 m).mpr (he▸(hy m).2) + exact hl.symm.trans hm + +lemma geometric_card_le (q d : ℕ) (hq : 2≤q) : + (∑ i∈Finset.range (d+1),q^i) ≤ 2*q^d := by + induction d with + | zero => simp + | succ d ih => + rw [Finset.sum_range_succ] + have hq' : 2*q^d≤q^(d+1) := by + rw [pow_succ] + simpa only [mul_comm] using Nat.mul_le_mul_left (q^d) hq + omega + +omit [FiniteDimensional K V] in +lemma projective_card_le_two_pow [Fintype (ℙ K V)] {d : ℕ} + (hdim : finrank K V=d+1) (hq : 2≤Nat.card K) : + Fintype.card (ℙ K V)≤2*Nat.card K^d := by + rw [←Nat.card_eq_fintype_card,Projectivization.card_of_finrank K V hdim] + exact geometric_card_le _ _ hq + +lemma center_radial_count_le [Fintype (ℙ K V)] [∀ x : ℙ K V,Fintype (RadialLine x)] + {d : ℕ} (hdim : finrank K V=d+1) (hq : 2≤Nat.card K) + (Q : Finset (ℙ K V)) : + (∑ x : Q,(Fintype.card (RadialLine x.val):ℝ))≤4*(Nat.card K:ℝ)^(2*d) := by + have hcard := projective_card_le_two_pow hdim hq + have hQ : Q.card≤2*Nat.card K^d := (Finset.card_le_univ Q).trans hcard + calc + _ ≤ ∑ _x : Q,(2*(Nat.card K:ℝ)^d) := Finset.sum_le_sum fun x _ => by + exact_mod_cast (radial_card_le_points x.val).trans hcard + _ = (Q.card:ℝ)*(2*(Nat.card K:ℝ)^d) := by simp + _ ≤ (2*(Nat.card K:ℝ)^d)*(2*(Nat.card K:ℝ)^d) := + mul_le_mul_of_nonneg_right (by exact_mod_cast hQ) (by positivity) + _ = _ := by rw [mul_comm 2 d,pow_mul]; ring + +end SharpRamseyFive.ProjectiveIncidence + +namespace SharpRamseyFive.ScoreGeometry + +section +open Filter ParameterHierarchy +open scoped Topology + +lemma high_density_bounds {σ g q n δ X : ℝ} (hσ : 0≤σ) (hδ : 0≤δ) + (hq : q=Real.exp σ) (hn : n=Real.exp (2*σ+g)) + (hX0 : 0≤X) (hX : X≤n) (hscale : n*δ≤4*q) : + δ*(q+1)≤8*Real.exp (-g) ∧ 192*δ^2*X^2≤333024*Real.exp (2*σ) := by + have hq1 : 1≤q := hq▸Real.one_le_exp_iff.mpr hσ + have hn0 : 0 flatPoints (P i)) X J) + (hO : ownCell F hF (fun i => flatPoints (P i)) X J x ⊆ O x) + (δ : ℝ≥0) (hδ : 0 < δ) (G : Finset (ℙ K (Dual K V))) (hG : ∀ H∈G,Incident x H) + (Planes : Finset (Submodule K V)) (hPlanes : ∀ A∈Planes,finrank K A=3) + (hcomplete : ∀ A : Submodule K V,finrank K A=3 → A∈Planes) + (χ : ℝ) (Q : Finset (ℙ K V)) (hx : x∈Q) + (hn : 0 < X.card) (hcap : (X.card:ℝ) ≤ (Nat.card K:ℝ)^3) + (hscale : (X.card:ℝ)*(δ:ℝ) ≤ 4*Nat.card K) + (hhigh : 8388608*(Nat.card K:ℝ)^2 ≤ X.card) + (hchi : (34359738369*2^200:ℝ) ≤ Real.exp χ) + (hmass : (δ:ℝ)*S.card ≤ Nat.card K) + (Lines : Finset (Submodule K V)) (hLines : ∀ l : RadialLine x,l.val∈Lines) + (hm : ∀ H : G,mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x G H) ≤ 2) + (hgood : ∀ i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + x∉badCenters S O δ (((δ:ℝ)*2^i)/2) Lines Q + ((Nat.card K:ℝ)^4/X.card^2*Real.exp χ/(((δ:ℝ)*2^i)/2)^100)) + (hcaptured : ∀ i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + (Nat.card K:ℝ)^2 < (X.card:ℝ)*((δ:ℝ)*2^i)^99 → + x∉highExceptions F hF P X Planes J ((δ:ℝ)*2^i) χ Q) + (R : ℕ) (hR : 200 ≤ R) : + (∑ z : DistinctPairs G,strength (pencilLines x G) (radialWeight x (outsideAt x S (O x)) δ) z^R) ≤ + 2^R*(Nat.clog 2 (outsideAt x S (O x)).card+1)*(((Nat.card K:ℝ)^4/X.card)^2*Real.exp (2*χ)) := by + have hn' : (0:ℝ) < X.card := by exact_mod_cast hn + apply score_higher_power x _ δ hδ G hG _ (by positivity) 200 R (by norm_num) hR hm + intro i hi + have ha : 0 < (δ:ℝ)*2^i := by positivity + have ha2 := (Finset.mem_filter.mp hi).2 + by_cases hsmall : (X.card:ℝ)*((δ:ℝ)*2^i)^99≤(Nat.card K:ℝ)^2 + · exact score_pair_small_normalized x hdim S O δ hδ G hG X.card _ χ hn' ha ha2 hmass hsmall + (le_trans (by norm_num) hchi) Lines hLines Q hx (hgood i hi) + · have hlarge := (ScoreScalars.high_or_small (q := (Nat.card K:ℝ)) (n := X.card) + (by positivity) hn' ha.le hhigh).resolve_right hsmall + exact score_pair_captured_normalized x hdim F hF P X S (O x) J hS hO δ hδ G hG + Planes hPlanes hcomplete _ χ Q hx hn ha ha2 hcap hscale hlarge hchi + (hcaptured i hi (lt_of_not_ge hsmall)) + +theorem score_pair_residual_moment_sharp (hdim : finrank K V=5) + (X S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) (hS : S ⊆ X) + (δ : ℝ≥0) (hδ : 0 < δ) (G : Finset (ℙ K (Dual K V))) (hG : ∀ H∈G,Incident x H) + (Planes : Finset (Submodule K V)) (hPlanes : ∀ A∈Planes,finrank K A=3) + (hcomplete : ∀ A : Submodule K V,finrank K A=3 → A∈Planes) + (χ : ℝ) (Q : Finset (ℙ K V)) (hx : x∈Q) + (hn : 0 < X.card) (hcap : (X.card:ℝ) ≤ (Nat.card K:ℝ)^3) + (hscale : (X.card:ℝ)*(δ:ℝ) ≤ 4*Nat.card K) + (hhigh : 8388608*(Nat.card K:ℝ)^2 ≤ X.card) + (hchi : (34359738369*2^200:ℝ) ≤ Real.exp χ) + (hmass : (δ:ℝ)*S.card ≤ Nat.card K) + (Lines : Finset (Submodule K V)) (hLines : ∀ l : RadialLine x,l.val∈Lines) + (hm : ∀ H : G,mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x G H) ≤ 2) + (hgood : ∀ i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + x∉badCenters S O δ (((δ:ℝ)*2^i)/2) Lines Q + ((Nat.card K:ℝ)^4/X.card^2*Real.exp χ/(((δ:ℝ)*2^i)/2)^100)) + (hresidual : ∀ i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + (Nat.card K:ℝ)^2 < (X.card:ℝ)*((δ:ℝ)*2^i)^99 → + x∉residualExceptions Planes X Q ((δ:ℝ)*2^i) χ) + (R : ℕ) (hR : 200 ≤ R) : + (∑ z : DistinctPairs G,strength (pencilLines x G) (radialWeight x (outsideAt x S (O x)) δ) z^R) ≤ + 2^R*(Nat.clog 2 (outsideAt x S (O x)).card+1)*(((Nat.card K:ℝ)^4/X.card)^2*Real.exp (2*χ)) := by + have hqpos : (0:ℝ) < Nat.card K := Nat.cast_pos.mpr Nat.card_pos + have hn' : (0:ℝ) < X.card := + (mul_pos (by norm_num : (0:ℝ) < 8388608) (sq_pos_of_pos hqpos)).trans_le hhigh + apply score_higher_power x _ δ hδ G hG _ (by positivity) 200 R (by norm_num) hR hm + intro i hi + have ha : 0 < (δ:ℝ)*2^i := by positivity + have ha2 := (Finset.mem_filter.mp hi).2 + by_cases hsmall : (X.card:ℝ)*((δ:ℝ)*2^i)^99≤(Nat.card K:ℝ)^2 + · exact score_pair_small_normalized x hdim S O δ hδ G hG X.card _ χ hn' ha ha2 hmass hsmall + (le_trans (by norm_num) hchi) Lines hLines Q hx (hgood i hi) + · exact score_pair_residual_normalized x hdim X S (O x) hS δ hδ G hG + Planes hPlanes hcomplete _ χ Q hx hn ha ha2 hcap hscale hchi (hresidual i hi (lt_of_not_ge hsmall)) + +end + +section +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] [Fintype (ℙ K V)] + [∀ x : ℙ K V,Fintype (RadialLine x)] + +theorem captured_global_trunc_exp_bound (hdim : finrank K V=5) + {I : Type} [LinearOrder I] (F : Finset I) (hF : F.Nonempty) + (Flat : I→Submodule K V) (X S : Finset (ℙ K V)) + (hFlat : ∀ i∈F,finrank K (Flat i)=3) (j : ℕ) + (hS : S⊆X\remaining F hF (fun i => flatPoints (Flat i)) X j) + (hj : (j:ℝ)*(Nat.card K:ℝ)≤X.card) + (O : ℙ K V→Finset (ℙ K V)) + (hO : ∀ x,ownCell F hF (fun i => flatPoints (Flat i)) X j x⊆O x) + (δ L : ℝ≥0) (hδ : 0<δ) (σ g n : ℝ) (hσ : 1≤σ) + (hq : (Nat.card K:ℝ)=Real.exp σ) (hn : n=Real.exp (2*σ+g)) + (hg : g≤σ) (hX : (X.card:ℝ)≤n) (hscale : n*(δ:ℝ)≤4*Nat.card K) + (hcut : 8*(δ:ℝ)*(j+1)≤2*Real.exp (-(g+σ/2)/20)) + (Lines : Finset (Submodule K V)) (hrank : ∀ l∈Lines,finrank K l=2) + (Q : Finset (ℙ K V)) (hLines : ∀ x∈Q,∀ l : RadialLine x,l.val∈Lines) + (R : ℕ) : + (∑ x : Q,∫ ω,1-HighMoment.allTrunc R 5000 ω + ∂batchMeasure (fun p : Fin R×RadialLine x.val => + L*radialWeight x.val (outsideAt x.val S (O x.val)) δ p.2)) ≤ + globalTruncConstant*((R:ℝ)*(L:ℝ))^5000*Real.exp (8*σ-250*(g+σ/2))+ + globalTruncConstant*((R:ℝ)*(L:ℝ))^5000*σ*Real.exp (2*σ-4998*g) := by + have hqNat : 2≤Nat.card K := Finite.one_lt_card + have hN := center_radial_count_le (d:=4) hdim hqNat Q + have heq : (Nat.card K:ℝ)^8=Real.exp (8*σ) := by + rw [hq,←Real.exp_nat_mul]; norm_num + norm_num only [show 2*4=8 from rfl] at hN + rw [heq] at hN + have hdens := high_density_bounds (by linarith : 0≤σ) δ.coe_nonneg hq hn + (Nat.cast_nonneg X.card) hX hscale + have hm : (S.card:ℝ)≤Real.exp (3*σ) := by + calc + _ ≤ (X.card:ℝ) := Nat.cast_le.mpr (Finset.card_le_card (hS.trans Finset.sdiff_subset)) + _ ≤ n := hX + _ ≤ _ := hn▸Real.exp_le_exp.mpr (by linarith) + have hrad := captured_global_radial_moment F hF Flat X S hFlat j hS hj O hO δ hδ + (2*Real.exp (-(g+σ/2)/20)) hcut Lines hrank Q hLines 5000 (by norm_num) + simp only [Nat.reduceSub] at hrad + have hnum := global_radial_numeric hσ (by positivity) + (mul_nonneg δ.coe_nonneg (by positivity)) (by positivity) (by positivity) + hN hdens.1 hdens.2 (le_refl _) hm + have hh := (global_trunc_failure S O δ L Q R 5000).trans + (mul_le_mul_of_nonneg_left (hrad.trans hnum) (by positivity)) + apply hh.trans_eq + rw [mul_add] + ac_rfl + +end + +open Module ProjectiveIncidence ProjectiveTraining GlobalRadial PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K I : Type} [Fintype I] [Field K] [Finite K] + [∀ x : ℙ K (I→K),Fintype (RadialLine x)] + +theorem residual_global_trunc_exp_bound_dim {q : ℕ} [CharP K q] + (hq : 2 y.submodule≤U).card:ℝ)≤ + (Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5)) + (R : ℕ) : + (∑ x : Q,∫ ω,1-HighMoment.allTrunc R 5000 ω + ∂batchMeasure (fun p : Fin R×RadialLine x.val => + L*radialWeight x.val (outsideAt x.val X (O x.val)) δ p.2)) ≤ + globalTruncConstant*((R:ℝ)*(L:ℝ))^5000*Real.exp (8*σ-250*(g+σ/2))+ + globalTruncConstant*((R:ℝ)*(L:ℝ))^5000*σ*Real.exp (2*σ-4998*g) := by + let : Fintype (ℙ K (I→K)) := Fintype.ofFinite _ + have he : 3*σ/2+(g+σ/2)=2*σ+g := by ring + have hN := center_radial_count_le (K:=K) (V:=I→K) (d:=4) + (show finrank K (I→K)=5 by rw [Module.finrank_pi,hI]) (show 2≤Nat.card K by omega) Q + norm_num only [show 2*4=8 from rfl] at hN + have heq : (Nat.card K:ℝ)^8=Real.exp (8*σ) := by + rw [hcard,hqexp,←Real.exp_nat_mul]; norm_num + rw [heq] at hN + have hnpos : 0a∈G ∧ b∈H ∧ Incident a b) p r = + ∑ b∈H,r b*weightOnHyperplane (fun a=>if a∈G then p a else 0) b := by + rw [relationMass_by_target] + have he : (∑ b∈H,r b*weightOnHyperplane (fun a=>if a∈G then p a else 0) b)= + ∑ b,if b∈H then r b*weightOnHyperplane (fun a=>if a∈G then p a else 0) b else 0 := by + simp only [Finset.sum_ite_mem,Finset.univ_inter] + rw [he] + apply Finset.sum_congr rfl + intro b _ + rw [Finset.sum_filter] + by_cases hb : b∈H + · simp only [hb,true_and,ite_true,weightOnHyperplane,Finset.mul_sum] + apply Finset.sum_congr rfl + intro a _ + by_cases ha : a∈G <;> by_cases hi : Incident a b <;> + simp only [ha,hi,incidenceEntry,ite_true,ite_false,and_true,and_false, + one_mul,zero_mul,mul_zero] + · simp only [hb,and_false,false_and,ite_false,Finset.sum_const_zero,mul_zero] + +theorem high_pair_incident_lower (hdim : finrank K V=5) + (p : Law (ℙ K V)) (r : Law (ℙ K (Dual K V))) + (G : Finset (ℙ K V)) (H : Finset (ℙ K (Dual K V))) (A B : ℝ) + (hA : 0≤A) (hB : 0≤B) (hp : ∀ a∈G,p a≤A) (hr : ∀ b∈H,r b≤B) + (hG : (3:ℝ)/4≤eventMass p G) (hH : (3:ℝ)/4≤eventMass r H) + (hsmall : 64*(Nat.card K:ℝ)^5*A*B≤(1:ℝ)/4) : + 1/(8*(Nat.card K:ℝ))≤relationMass (fun a b=>a∈G ∧ b∈H ∧ Incident a b) p r := by + let w : ℙ K V→ℝ:=fun a=>if a∈G then p a else 0 + have hw : ∀ a,0≤w a ∧ w a≤A := by + intro a + dsimp [w] + split_ifs with ha + · exact ⟨p.nonneg a,hp a ha⟩ + · exact ⟨le_rfl,hA⟩ + have hm : (∑ a,w a)=eventMass p G := by simp [w,eventMass,Finset.sum_ite_mem] + have hlow := lowHits_mass hdim w r H A B hA hB hw (hm ▸ hG) + (hm ▸ eventMass_le_one p G) hr + have hpart : eventMass r (H\lowHits w)+eventMass r (H∩lowHits w)=eventMass r H := by + unfold eventMass + exact by + rw [←Finset.sum_union (Finset.disjoint_sdiff_inter H (lowHits w)), + Finset.sdiff_union_inter] + have hmass : (1:ℝ)/2≤eventMass r (H\lowHits w) := by linarith + have hq : 0<(Nat.card K:ℝ) := by exact_mod_cast Nat.zero_lt_of_lt (Finite.one_lt_card (α:=K)) + have hn : ∀ b,0≤weightOnHyperplane w b := by + intro b + apply Finset.sum_nonneg + intro a _ + exact mul_nonneg (by unfold incidenceEntry;split_ifs <;> norm_num) (hw a).1 + rw [relationMass_good_incident] + calc + _ = ((1:ℝ)/2)*(1/(4*(Nat.card K:ℝ))) := by ring + _ ≤ eventMass r (H\lowHits w)*(1/(4*(Nat.card K:ℝ))) := + mul_le_mul_of_nonneg_right hmass (by positivity) + _ = ∑ b∈H\lowHits w,r b*(1/(4*(Nat.card K:ℝ))) := by unfold eventMass; rw [Finset.sum_mul] + _ ≤ ∑ b∈H\lowHits w,r b*weightOnHyperplane w b := by + apply Finset.sum_le_sum + intro b hb + apply mul_le_mul_of_nonneg_left _ (r.nonneg b) + have hh := (Finset.mem_sdiff.mp hb).2 + have he : ¬weightOnHyperplane w b<1/(4*(Nat.card K:ℝ)) := by + intro he + exact hh (Finset.mem_filter.mpr ⟨Finset.mem_univ _,he⟩) + exact le_of_not_gt he + _ ≤ ∑ b∈H,r b*weightOnHyperplane w b := + Finset.sum_le_sum_of_subset_of_nonneg Finset.sdiff_subset + (fun b _ _=>mul_nonneg (r.nonneg b) (hn b)) +end +end SharpRamseyFive.ProjectiveIncidence + +namespace SharpRamseyFive.HighSamples +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +abbrev SampleFlag := ℙ K V × ℙ K (Dual K V) + +def growSpan {n : ℕ} (y : ℙ K (Dual K V)) (W : Submodule K (Dual K V)) + (x : Fin n→SampleFlag (K:=K) (V:=V)) : Submodule K (Dual K V) := + W ⊔ Marking.state (fun i=>(x i).1) (fun i=>(x i).2) Finset.univ y + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma le_growSpan {n : ℕ} (y : ℙ K (Dual K V)) (W : Submodule K (Dual K V)) + (x : Fin n→SampleFlag (K:=K) (V:=V)) : W≤growSpan y W x := le_sup_left + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma hit_le_growSpan {n : ℕ} (y : ℙ K (Dual K V)) (W : Submodule K (Dual K V)) + (x : Fin n→SampleFlag (K:=K) (V:=V)) (i : Fin n) (hi : Incident (x i).1 y) : + (x i).2.submodule≤growSpan y W x := by + apply le_trans _ le_sup_right + unfold Marking.state + exact le_iSup_of_le i (le_iSup_of_le (Finset.mem_univ i) (by rw [ite_eq_left hi])) + +omit [Finite K] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma rank_growSpan_mono {n : ℕ} (y : ℙ K (Dual K V)) (W : Submodule K (Dual K V)) + (x : Fin n→SampleFlag (K:=K) (V:=V)) : finrank K W≤finrank K (growSpan y W x) := + Submodule.finrank_mono (le_growSpan y W x) + +omit [Finite K] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma growSpan_eq_of_rank_le {n : ℕ} (y : ℙ K (Dual K V)) (W : Submodule K (Dual K V)) + (x : Fin n→SampleFlag (K:=K) (V:=V)) (hr : finrank K (growSpan y W x)≤finrank K W) : + growSpan y W x=W := by + exact (Submodule.eq_of_le_of_finrank_eq (le_growSpan y W x) + (Nat.le_antisymm (rank_growSpan_mono y W x) hr)).symm + +omit [FiniteDimensional K V] [Fintype (ℙ K V)] in +lemma small_subspace_card (W : Submodule K (Dual K V)) (hr : finrank K W<4) : + ((Finset.univ.filter fun b : ℙ K (Dual K V)=>b.submodule≤W).card:ℝ)≤ + 2*(Nat.card K:ℝ)^2 := by + rw [Marking.subspace_finset_card,Nat.cast_sum] + simp only [Nat.cast_pow] + have hle : (∑ i∈Finset.range (finrank K W),(Nat.card K:ℝ)^i)≤ + ∑ i∈Finset.range 3,(Nat.card K:ℝ)^i := by + apply Finset.sum_le_sum_of_subset_of_nonneg (Finset.range_mono (by omega)) + intro i _ _ + positivity + apply hle.trans + have hq : 2≤(Nat.card K:ℝ) := by exact_mod_cast Finite.one_lt_card (α:=K) + simp only [Finset.sum_range_succ,Finset.sum_range_zero,pow_zero,pow_one,zero_add] + nlinarith + +def newHits (y : ℙ K (Dual K V)) (W : Submodule K (Dual K V)) : + Finset (SampleFlag (K:=K) (V:=V)) := + Finset.univ.filter fun z=>Incident z.1 y ∧ ¬z.2.submodule≤W + +omit [Finite K] [FiniteDimensional K V] in +lemma first_incident_mass (p : Law (SampleFlag (K:=K) (V:=V))) (y : ℙ K (Dual K V)) : + eventMass p (Finset.univ.filter fun z=>Incident z.1 y)=weightOnHyperplane (first p) y := by + simp only [eventMass,Finset.sum_filter,Fintype.sum_prod_type, + weightOnHyperplane,incidenceEntry,first] + apply Finset.sum_congr rfl + intro a _ + split_ifs + · simp only [one_mul] + · simp only [Finset.sum_const_zero,zero_mul] + +omit [FiniteDimensional K V] in +lemma second_subspace_mass (p : Law (SampleFlag (K:=K) (V:=V))) + (W : Submodule K (Dual K V)) (B : ℝ) (hr : finrank K W<4) (hB : 0≤B) + (hp : ∀ b,second p b≤B) : + eventMass p (Finset.univ.filter fun z=>z.2.submodule≤W)≤2*(Nat.card K:ℝ)^2*B := by + have he : eventMass p (Finset.univ.filter fun z=>z.2.submodule≤W)= + ∑ b∈Finset.univ.filter (fun b=>b.submodule≤W),second p b := by + simp only [eventMass,Finset.sum_filter,Fintype.sum_prod_type,second] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro b _ + split_ifs <;> simp only [Finset.sum_const_zero] + rw [he] + calc + _ ≤ ∑ _b∈Finset.univ.filter (fun b : ℙ K (Dual K V)=>b.submodule≤W),B := + Finset.sum_le_sum fun b _=>hp b + _ = ((Finset.univ.filter fun b : ℙ K (Dual K V)=>b.submodule≤W).card:ℝ)*B := by simp + _ ≤ _ := mul_le_mul_of_nonneg_right (small_subspace_card W hr) hB + +omit [FiniteDimensional K V] in +theorem newHits_mass (p : Law (SampleFlag (K:=K) (V:=V))) + (y : ℙ K (Dual K V)) (W : Submodule K (Dual K V)) (B : ℝ) + (hr : finrank K W<4) (hB : 0≤B) (hp : ∀ b,second p b≤B) + (hy : y∉lowHits (first p)) (hsmall : 2*(Nat.card K:ℝ)^2*B≤1/(20*(Nat.card K:ℝ))) : + 1/(5*(Nat.card K:ℝ))≤eventMass p (newHits y W) := by + have hhit : 1/(4*(Nat.card K:ℝ))≤weightOnHyperplane (first p) y := by + exact le_of_not_gt fun h=>hy (Finset.mem_filter.mpr ⟨Finset.mem_univ _,h⟩) + have hsub := second_subspace_mass p W B hr hB hp + have hpart : eventMass p (Finset.univ.filter fun z=>Incident z.1 y)≤ + eventMass p (newHits y W)+eventMass p (Finset.univ.filter fun z=>z.2.submodule≤W) := by + simp only [eventMass,newHits,Finset.sum_filter,←Finset.sum_add_distrib] + apply Finset.sum_le_sum + intro z _ + by_cases hh : Incident z.1 y <;> by_cases hw : z.2.submodule≤W <;> + simp only [hh,hw,not_true_eq_false,not_false_eq_true,and_self,and_false, + and_true,ite_true,ite_false,zero_add,add_zero,le_refl] + exact p.nonneg z + rw [first_incident_mass] at hpart + have he : 1/(4*(Nat.card K:ℝ))-1/(20*(Nat.card K:ℝ))=1/(5*(Nat.card K:ℝ)) := by ring + linarith +end +end SharpRamseyFive.HighSamples + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/HighPeelExceptions.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/HighPeelExceptions.lean new file mode 100644 index 0000000000000000000000000000000000000000..a365e39da62dc53000fd0b48ba1afd6e33c2cc47 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/HighPeelExceptions.lean @@ -0,0 +1,149 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.HyperplaneHigh + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open Filter ParameterHierarchy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_high_peel_exceptions {η : ℝ} (hη : 0<η) (hη' : η<1/10) : + ∀ᶠ σ : ℝ in atTop,∀ (D : ℝ) (R : ℕ),Range η σ D R → + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (g : ℝ) (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K (I→K)) + (H : Finset J) (hH : H.Nonempty) (Hyper : J→Submodule K (I→K)) + (X XH S : Finset (ℙ K (I→K))) (t : ℝ) (ht0 : 0flatPoints (Hyper j)) X + ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _) → + t=(Real.exp (2*σ+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-(g+σ/2)/5) → + S=peelSet (P η σ D R/10000flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht0) → + Real.exp (2*σ+g)/4≤S.card → + (∀x,ownCell F hF (fun j=>flatPoints (Flat j)) XH + (peelLength (P η σ D R/10000flatPoints (Flat j)) XH ⌈t⌉₊ (Nat.ceil_pos.mpr ht0)) x⊆O x) → + (∀l∈Lines,finrank K l=2) → + let O' := fun x=>S∩O x + let rad := radialExceptions S O' (pointStrength S) Lines Q q X.card (P η σ D R/200) + let pair := hyperplanePeelExceptions H hH Hyper X XH S Planes + (peelLength (P η σ D R/10000flatPoints (Hyper j)) X ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _)) + (pointStrength S) (P η σ D R/200) Q + ((rad∪pair).card:ℝ)≤(S.card:ℝ)*Real.exp (-L η σ D/1000)/2 := by + have heR := eventually_exception_payment_wide hη hη' 0 2664192 16 (by norm_num) (by norm_num) (by norm_num) + have heH := eventually_exception_payment_wide hη hη' 3145728 36872 16 (by norm_num) (by norm_num) (by norm_num) + have ha := eventually_plane_ambient_margins hη hη' + have hc := eventually_power_absorption hη hη' 33554432 0 (1/10000) (by norm_num) (by norm_num) (by norm_num) + filter_upwards [eventually_ge_atTop (1000:ℝ),heR,heH,ha,hc] with σ hσ heR heH ha hc + intro D R hr q K I J _ _ _ _ _ _ g F hF Flat H hH Hyper X XH S t ht0 O Lines Planes Q + hq hcard hσq hI hg hg' hFlat hcover hHyper hHcover hPlanes hnX hori hXH ht hS hquarter hO hLines + dsimp only + have ha := ha D R hr + let P := ParameterHierarchy.P η σ D R + have hP : 0

flatPoints (Hyper j)) X _ _ + have hSH : S⊆XH := hS▸peel_subset (P/10000flatPoints (Flat j)) XH _ _ + have hSX : (S.card:ℝ)≤X.card := Nat.cast_le.mpr (Finset.card_le_card (hSH.trans hHX)) + have hX : (XH.card:ℝ)≤Real.exp (2*σ+g) := by rw [←hnX];exact Nat.cast_le.mpr (Finset.card_le_card hHX) + have hcap : (X.card:ℝ)≤(Nat.card K:ℝ)^3 := by + have he : (10:ℝ)≤Real.exp (σ/2) := by linarith only [Real.add_one_le_exp (σ/2),hσ] + calc + _≤10*Real.exp (5*σ/2) := hori + _≤Real.exp (σ/2)*Real.exp (5*σ/2) := mul_le_mul_of_nonneg_right he (Real.exp_nonneg _) + _=_ := by rw [hcard,←hσq,←Real.exp_nat_mul,←Real.exp_add];congr 1;norm_num;ring + have hcardS : (S.card:ℝ)≤Real.exp (3*σ) := by + apply hSX.trans + rw [←show (Nat.card K:ℝ)^3=Real.exp (3*σ) by rw [hcard,←hσq,←Real.exp_nat_mul];norm_num] + exact hcap + have hδ : (pointStrength (K:=K) S:ℝ)=(q:ℝ)/S.card := by simp only [pointStrength,NNReal.coe_div,NNReal.coe_natCast,hcard] + have hδ0 : 0S∩O x) (pointStrength S) Lines Q q X.card (P/200)).card:ℝ)≤ + (S.card:ℝ)*Real.exp (-L η σ D/1000)/4 := by + calc + _≤(X.card:ℝ)*(2664192*((Nat.clog 2 S.card:ℝ)+1)*Real.exp (-P/200)) := by simpa only [neg_div] using hrad + _=(X.card:ℝ)*(((Nat.clog 2 S.card:ℝ)+1)*(2664192*Real.exp (-P/200))) := by ring + _≤(X.card:ℝ)*(Real.exp (-L η σ D/1000)/16) := mul_le_mul_of_nonneg_left (by simpa only [neg_div] using hpayR) (Nat.cast_nonneg _) + _≤_ := by rw [hnX];nlinarith only [mul_le_mul_of_nonneg_right hquarter (Real.exp_nonneg (-L η σ D/1000))] + have hhigh' : 8388608*(Nat.card K:ℝ)^2≤S.card := by + have hc : (33554432:ℝ)≤Real.exp (P/10000) := by + simpa only [P,Real.rpow_zero,mul_one,one_div,one_mul,mul_comm (10000⁻¹:ℝ),div_eq_mul_inv] using hc D R hr + have hc := hc.trans (Real.exp_le_exp.mpr hg.le) + have hnq : Real.exp (2*σ+g)=(Nat.card K:ℝ)^2*Real.exp g := by + rw [hcard,←hσq,←Real.exp_nat_mul,←Real.exp_add];norm_num + rw [hnq] at hquarter + nlinarith only [mul_le_mul_of_nonneg_right hc (sq_nonneg (Nat.card K:ℝ)),hquarter] + have hori' : (X.card:ℝ)^2≤100*(Nat.card K:ℝ)^5 := by + have hh := pow_le_pow_left₀ (Nat.cast_nonneg _) hori 2 + apply hh.trans_eq + rw [mul_pow,←Real.exp_nat_mul,hcard,←hσq,←Real.exp_nat_mul] + congr 1 + norm_num + ring_nf + have hnq : (X.card:ℝ)=(Nat.card K:ℝ)^2*Real.exp g := by + rw [hnX,hcard,←hσq,←Real.exp_nat_mul,←Real.exp_add];norm_num + have hpair := hyperplanePeelExceptions_card H hH Hyper X XH S Planes hHyper hHcover hPlanes + (P/10000flatPoints (Hyper j)) X ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _)) + (pointStrength S) (P/200) Q).card:ℝ)≤(S.card:ℝ)*Real.exp (-L η σ D/1000)/4 := by + calc + _≤(X.card:ℝ)*(((Nat.clog 2 S.card:ℝ)+1)*(3145728*Real.exp (-(4/5:ℝ)*g)+36872*Real.exp (-(P/200)))) := by simpa only [mul_assoc] using hpair + _≤(X.card:ℝ)*(Real.exp (-L η σ D/1000)/16) := mul_le_mul_of_nonneg_left hpayH (Nat.cast_nonneg _) + _≤_ := by rw [hnX];nlinarith only [mul_le_mul_of_nonneg_right hquarter (Real.exp_nonneg (-L η σ D/1000))] + have hh := Nat.cast_le (α:=ℝ).mpr (Finset.card_union_le + (radialExceptions S (fun x=>S∩O x) (pointStrength S) Lines Q q X.card (P/200)) + (hyperplanePeelExceptions H hH Hyper X XH S Planes + (peelLength (P/10000flatPoints (Hyper j)) X ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _)) + (pointStrength S) (P/200) Q)) + push_cast at hh + linarith only [hh,hrad',hpair'] +end + +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + +lemma radialExceptions_chi_mono (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ : ℝ≥0) (Lines : Finset (Submodule K V)) (Q : Finset (ℙ K V)) + (q n χ ψ : ℝ) (h : χ≤ψ) : + radialExceptions S O δ Lines Q q n ψ⊆radialExceptions S O δ Lines Q q n χ := by + intro x hx + obtain ⟨i,hi,hx⟩ := Finset.mem_biUnion.mp hx + apply Finset.mem_biUnion.mpr + refine ⟨i,hi,badCenters_threshold_mono S O δ _ Lines Q ?_ hx⟩ + apply div_le_div_of_nonneg_right _ (by positivity) + exact mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr h) (by positivity) + +lemma mem_badCenters_own_congr (S : Finset (ℙ K V)) (O O' : ℙ K V→Finset (ℙ K V)) + (δ a : ℝ) (Lines : Finset (Submodule K V)) (Q : Finset (ℙ K V)) (B : ℝ) + (x : ℙ K V) (h : O x=O' x) : + x∈badCenters S O δ a Lines Q B ↔ x∈badCenters S O' δ a Lines Q B := by + simp only [badCenters,Finset.mem_filter,localLines,richCenters] + rw [h] +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/HighPolyConstant.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/HighPolyConstant.lean new file mode 100644 index 0000000000000000000000000000000000000000..55dce90b7c7953d82fbb26e01d5592dbe6ef4931 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/HighPolyConstant.lean @@ -0,0 +1,97 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.DyadCount +import OAI.Combinatorics.RamseyFive.Entropy.HighBudgetPoly + +namespace OAI + +noncomputable section +namespace SharpRamseyFive.ScoreGeometry +open Filter ParameterHierarchy +open scoped Topology + +noncomputable def highPolyConstant (k c : ℝ) : ℝ := + 403+40*k^2+20*k^4*(200*k+2)^2+k^4*(c+400*2^(200:ℕ))+2*k^200*c + +lemma highPolyConstant_pos {k c : ℝ} (hk : 0≤k) (hc : 0≤c) : 0finrank K W) 4 W)≤ + (1-1/(5*(Nat.card K:ℝ)))^n := by + have hq : 2≤(Nat.card K:ℝ) := by exact_mod_cast Finite.one_lt_card (α:=K) + have hc : 0≤1-1/(5*(Nat.card K:ℝ)) := by + have hh : 1/(5*(Nat.card K:ℝ))≤1 := (div_le_one (by positivity)).mpr (by linarith) + linarith + by_cases hr : finrank K W<4 + · calc + _ ≤ eventWeight (iid p (Fin n)) (fun x=>∀ i,x i∉newHits y W) := + eventWeight_mono _ _ _ (fun x hx=>nongrowth_avoids y W x hx.2) + _ = (1-eventMass p (newHits y W))^n := iid_avoidance p _ n + _ ≤ _ := pow_le_pow_left₀ (sub_nonneg.mpr (eventMass_le_one p _)) + (by linarith [newHits_mass p y W B hr hB hp hy hsmall]) n + · have he : eventWeight (iid p (Fin n)) + (failedGrowth (growSpan (n:=n) y) (fun W : Submodule K (Dual K V)=>finrank K W) 4 W)=0 := by + simp only [eventWeight,failedGrowth,hr,false_and,ite_false,Finset.sum_const_zero] + rw [he] + exact pow_nonneg hc _ + +def sampleSpan {n t : ℕ} (x : Fin t→Fin n→SampleFlag (K:=K) (V:=V)) + (y : ℙ K (Dual K V)) : Submodule K (Dual K V) := + runSamples (growSpan y) y.submodule x + +theorem sampled_span_rank_failure (p : Law (SampleFlag (K:=K) (V:=V))) + (y : ℙ K (Dual K V)) (B : ℝ) (hB : 0≤B) (hp : ∀ b,second p b≤B) + (hy : y∉lowHits (first p)) (hsmall : 2*(Nat.card K:ℝ)^2*B≤1/(20*(Nat.card K:ℝ))) + (n : ℕ) : + eventWeight (iid (iid p (Fin n)) (Fin 3)) + (fun x=>finrank K (sampleSpan x y)<4)≤3*(1-1/(5*(Nat.card K:ℝ)))^n := by + exact iid_growth_failure (iid p (Fin n)) (growSpan y) (fun W : Submodule K (Dual K V)=>finrank K W) 4 + (fun W x=>rank_growSpan_mono y W x) _ + (fun W=>block_growth_failure p y B hB hp hy hsmall n W) y.submodule 3 + (by rw [y.finrank_submodule]) +end +end SharpRamseyFive.HighSamples + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/HyperplaneHigh.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/HyperplaneHigh.lean new file mode 100644 index 0000000000000000000000000000000000000000..8b596d8b261fa37a0e1830e5d69422b0d4593e57 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/HyperplaneHigh.lean @@ -0,0 +1,226 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.Peeling +import OAI.Combinatorics.RamseyFive.Geometry.PlaneExceptionScalars +import OAI.Combinatorics.RamseyFive.Geometry.HighGeometryClosure + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining HighPlaneBudget GlobalRadial PoissonScore WeightedPrograms +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V J : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] [LinearOrder J] + +noncomputable def hyperplanePeelExceptions (F : Finset J) (hF : F.Nonempty) + (Flat : J→Submodule K V) (X XH S : Finset (ℙ K V)) + (Planes : Finset (Submodule K V)) (j : ℕ) (δ : ℝ≥0) (χ : ℝ) (Q : Finset (ℙ K V)) : Finset (ℙ K V) := + if XH=X\remaining F hF (fun i=>flatPoints (Flat i)) X j + then highPlaneExceptions F hF Flat X S Planes j δ χ Q + else residualPlaneExceptions Planes XH S Q δ χ + +theorem hyperplanePeelExceptions_card (F : Finset J) (hF : F.Nonempty) + (Flat : J→Submodule K V) (X XH S : Finset (ℙ K V)) + (Planes : Finset (Submodule K V)) + (hFlat : ∀i∈F,finrank K (Flat i)=4) + (hcover : ∀H : Submodule K V,finrank K H=4 → ∃i∈F,Flat i=H) + (hPlanes : ∀A∈Planes,finrank K A=3) + (e : Prop) (he : e) + (hXH : XH=peelSet e F hF (fun i=>flatPoints (Flat i)) X ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _)) + (hS : S⊆XH) (δ : ℝ≥0) (hδ : 0<δ) (χ g : ℝ) (hg : 0≤g) (hχ : 0≤χ) + (hn : (X.card:ℝ)=(Nat.card K:ℝ)^2*Real.exp g) + (hcap : (X.card:ℝ)≤(Nat.card K:ℝ)^3) + (hori : (X.card:ℝ)^2≤100*(Nat.card K:ℝ)^5) + (hhigh : 8388608*(Nat.card K:ℝ)^2≤S.card) (Q : Finset (ℙ K V)) : + ((hyperplanePeelExceptions F hF Flat X XH S Planes + (peelLength e F hF (fun i=>flatPoints (Flat i)) X ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _)) δ χ Q).card:ℝ)≤ + X.card*((Nat.clog 2 S.card:ℝ)+1)*(3145728*Real.exp (-(4/5:ℝ)*g)+36872*Real.exp (-χ)) := by + have hHX : XH⊆X := hXH▸peel_subset e F hF (fun i=>flatPoints (Flat i)) X _ _ + have hSH : (S.card:ℝ)≤XH.card := Nat.cast_le.mpr (Finset.card_le_card hS) + have hHXn : (XH.card:ℝ)≤X.card := Nat.cast_le.mpr (Finset.card_le_card hHX) + unfold hyperplanePeelExceptions + split_ifs with hc + · exact highPlaneExceptions_card F hF Flat X S hFlat hcover Planes hPlanes _ δ hδ χ g hg hχ hn hcap hori + (hhigh.trans (hSH.trans hHXn)) Q + · have hres := (peel_alternative e he F hF (fun i=>flatPoints (Flat i)) X ((Nat.card K)^2) + (pow_pos (Nat.card_pos (α:=K)) _)).resolve_left (by simpa only [←hXH] using hc) + have hcapH : ∀H : Submodule K V,finrank K H=4 → (XH.filter fun x=>x.submodule≤H).card≤(Nat.card K)^2 := by + intro H hH + obtain ⟨i,hi,hiH⟩ := hcover H hH + have hh := hres.2 i hi + rw [←hXH] at hh + have heq : (XH.filter fun x=>x.submodule≤H)=XH∩flatPoints (Flat i) := by + ext x;simp only [Finset.mem_filter,Finset.mem_inter,mem_flatPoints,hiH] + rw [heq] + exact hh.le + have hh := residualPlaneExceptions_card Planes hPlanes XH S Q δ hδ χ hχ + ((pow_le_pow_left₀ (Nat.cast_nonneg _) hHXn 2).trans hori) (hhigh.trans hSH) hcapH + apply hh.trans + apply mul_le_mul (mul_le_mul_of_nonneg_right hHXn (by positivity)) _ (by positivity) (by positivity) + have hge : 0≤3145728*Real.exp (-(4/5:ℝ)*g) := by positivity + nlinarith only [hge,Real.exp_nonneg (-χ)] + +theorem literal_hyperplane_pair_moment [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] (hdim : finrank K V=5) + (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K V) + (X XH S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (Planes : Finset (Submodule K V)) (hPlanes : ∀A∈Planes,finrank K A=3) + (hcomplete : ∀A : Submodule K V,finrank K A=3 → A∈Planes) + (e : Prop) (_he : e) + (hXH : XH=peelSet e F hF (fun i=>flatPoints (Flat i)) X ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _)) + (hS : S⊆XH) (x : ℙ K V) [Fintype (RadialLine x)] + (hO : ownCell F hF (fun i=>flatPoints (Flat i)) X + (peelLength e F hF (fun i=>flatPoints (Flat i)) X ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _)) x⊆O x) + (G : Finset (ℙ K (Dual K V))) (hG : ∀H∈G,Incident x H) + (χ : ℝ) (hχ : (34359738369*2^200:ℝ)≤Real.exp χ) + (hcap : (X.card:ℝ)≤(Nat.card K:ℝ)^3) + (hscale : (X.card:ℝ)*(pointStrength (K:=K) S:ℝ)≤4*Nat.card K) + (hhigh : 8388608*(Nat.card K:ℝ)^2≤S.card) + (Lines : Finset (Submodule K V)) (hLines : ∀l : RadialLine x,l.val∈Lines) + (Q : Finset (ℙ K V)) (hxQ : x∈Q) + (hm : ∀H : G,mass (radialWeight x (outsideAt x S (O x)) (pointStrength S)) (pencilLines x G H)≤2) + (hgood : x∉radialExceptions S O (pointStrength S) Lines Q (Nat.card K) X.card χ) + (hpair : x∉hyperplanePeelExceptions F hF Flat X XH S Planes + (peelLength e F hF (fun i=>flatPoints (Flat i)) X ((Nat.card K)^2) (pow_pos (Nat.card_pos (α:=K)) _)) (pointStrength S) χ Q) : + (∑z : DistinctPairs G,strength (pencilLines x G) + (radialWeight x (outsideAt x S (O x)) (pointStrength S)) z^200)≤ + dyadFactor (outsideAt x S (O x)).card χ*(geometryScale (Nat.card K) S.card)^2 := by + have hHX : XH⊆X := hXH▸peel_subset e F hF (fun i=>flatPoints (Flat i)) X _ _ + have hSH : (S.card:ℝ)≤XH.card := Nat.cast_le.mpr (Finset.card_le_card hS) + have hHXn : (XH.card:ℝ)≤X.card := Nat.cast_le.mpr (Finset.card_le_card hHX) + have hq0 : (0:ℝ)hgood (radialExceptions_normalization S O (pointStrength S) Lines Q (Nat.card K) χ XH.card X.card hH0 hHXn hx) + have hfin (N : ℕ) (hSN : S.card≤N) (hh : + (∑z : DistinctPairs G,strength (pencilLines x G) (radialWeight x (outsideAt x S (O x)) (pointStrength S)) z^200)≤ + 2^200*(Nat.clog 2 (outsideAt x S (O x)).card+1)*(((Nat.card K:ℝ)^4/N)^2*Real.exp (2*χ))) : + (∑z : DistinctPairs G,strength (pencilLines x G) (radialWeight x (outsideAt x S (O x)) (pointStrength S)) z^200)≤ + dyadFactor (outsideAt x S (O x)).card χ*(geometryScale (Nat.card K) S.card)^2 := by + apply hh.trans + unfold dyadFactor geometryScale + rw [show 2^200*((Nat.clog 2 (outsideAt x S (O x)).card:ℝ)+1)*(((Nat.card K:ℝ)^4/N)^2*Real.exp (2*χ))= + (2^200*((Nat.clog 2 (outsideAt x S (O x)).card:ℝ)+1)*Real.exp (2*χ))*((Nat.card K:ℝ)^4/N)^2 by ring] + apply mul_le_mul_of_nonneg_left _ (by positivity) + gcongr + unfold hyperplanePeelExceptions at hpair + split_ifs at hpair with hc + · apply hfin X.card (Finset.card_le_card (hS.trans hHX)) + apply score_pair_captured_moment_sharp x hdim F hF Flat X S O _ (hc▸hS) hO (pointStrength S) hδ G hG + Planes hPlanes hcomplete χ Q hxQ (by exact_mod_cast hX0) hcap hscale (hhigh.trans (hSH.trans hHXn)) hχ hmass + Lines hLines hm + (off_radialExceptions S O (pointStrength S) Lines Q (Nat.card K) X.card χ x hgood) + (off_highPlaneExceptions F hF Flat X S O Planes _ (pointStrength S) χ Q x hpair) 200 (le_refl _) + · apply hfin XH.card (Finset.card_le_card hS) + apply score_pair_residual_moment_sharp x hdim XH S O hS (pointStrength S) hδ G hG Planes hPlanes hcomplete + χ Q hxQ (by exact_mod_cast hH0) (hHXn.trans hcap) + ((mul_le_mul_of_nonneg_right hHXn (pointStrength (K:=K) S).coe_nonneg).trans hscale) + (hhigh.trans hSH) hχ hmass Lines hLines hm + (off_radialExceptions S O (pointStrength S) Lines Q (Nat.card K) XH.card χ x hgoodH) + (off_residualPlaneExceptions Planes XH S Q O (pointStrength S) χ x hpair) 200 (le_refl _) + +end + +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial PoissonScore +open Filter ParameterHierarchy MeasureTheory +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_literal_plane_global_trunc {η : ℝ} (hη : 0<η) (hη' : η<1/10) : + ∀ᶠ σ : ℝ in atTop,∀ (D : ℝ) (R : ℕ) (L₀ : ℝ≥0),Range η σ D R → (L₀:ℝ)=L η σ D → + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (ℙ K (I→K))] [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (g : ℝ) (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K (I→K)) + (X S : Finset (ℙ K (I→K))) (t : ℝ) (ht0 : 0 flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0) → + Real.exp (2*σ+g)/4≤S.card → (q:ℝ)^2≤S.card → + (∀x,ownCell F hF (fun j => flatPoints (Flat j)) X + (peelLength (P η σ D R/10000 flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0)) x⊆O x) → + (∀l∈Lines,finrank K l=2) → (∀x∈Q,∀l : RadialLine x,l.val∈Lines) → + (∑x : Q,∫ω,1-HighMoment.allTrunc R 5000 ω + ∂batchMeasure (fun p : Fin R×RadialLine x.val => + L₀*radialWeight x.val (outsideAt x.val S (S∩O x.val)) (pointStrength S) p.2))≤Real.exp (2*σ) := by + have hs := eventually_global_trunc_scalar hη hη' globalTruncConstant globalTruncConstant_pos + have hm := eventually_plane_ambient_margins hη hη' + filter_upwards [eventually_ge_atTop (1000:ℝ),hs,hm] with σ hσ hs hm + intro D R L₀ hr hL q K I J _ _ _ _ _ _ _ g F hF Flat X S t ht0 O Lines Q + hq hcard hσq hI hg hg' hFlat hcover hX ht hS hquarter hS2 hO hLines hQ + have hdim : finrank K (I→K)=5 := by rw [Module.finrank_pi,hI] + let P := ParameterHierarchy.P η σ D R + have hm := hm D R hr + have hlow : 100000000≤P/10000 := hm.1 + have hg0 : 0≤g := by dsimp [P] at hlow;linarith only [hg,hlow] + have hgp : 100000000≤g+σ/2 := by dsimp [P] at hlow;linarith only [hg,hlow,hσ] + have he : 3*σ/2+(g+σ/2)=2*σ+g := by ring + have hen : P/10000flatPoints (Flat j)) X _ _ + have hSn : (S.card:ℝ)≤Real.exp (2*σ+g) := (Nat.cast_le.mpr (Finset.card_le_card hsub)).trans hX + have htE : t=Real.exp (σ+17*(g+σ/2)/15) := by + rw [←he] at ht + exact ht.trans (ScoreScalars.plane_threshold_exp rfl rfl) + have htq : (q:ℝ)≤t := by rw [htE,←hσq];exact Real.exp_le_exp.mpr (by linarith only [hgp]) + have hmax : (pointStrength (K:=K) S:ℝ)*((q:ℝ)+1)≤2 := by + rw [hδ,div_mul_eq_mul_div] + apply (div_le_iff₀ hn0).mpr + have hq1 : (1:ℝ)≤q := by exact_mod_cast (by omega : 1≤q) + nlinarith only [hS2,hq1] + have hbound : (∑x : Q,∫ω,1-HighMoment.allTrunc R 5000 ω + ∂batchMeasure (fun p : Fin R×RadialLine x.val => + L₀*radialWeight x.val (outsideAt x.val S (O x.val)) (pointStrength S) p.2))≤ + globalTruncConstant*((R:ℝ)*(L₀:ℝ))^5000*Real.exp (8*σ-250*(g+σ/2))+ + globalTruncConstant*((R:ℝ)*(L₀:ℝ))^5000*σ*Real.exp (2*σ-4998*g) := by + rcases peel_residual_real (P/10000flatPoints (Flat j)) X t ht0 with hcap|⟨hJ,hres⟩ + · have hc : S⊆X\remaining F hF (fun j=>flatPoints (Flat j)) X + (peelLength (P/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0)) := by rw [hS,hcap] + have hjt := peel_length_real (P/10000flatPoints (Flat j)) X t ht0 + have hjq : (peelLength (P/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0):ℝ)*(Nat.card K:ℝ)≤X.card := by + rw [hcard] + exact (mul_le_mul_of_nonneg_left htq (Nat.cast_nonneg _)).trans hjt + have hcut := ScoreScalars.plane_list_cutoff (n:=Real.exp (2*σ+g)) (q:=(q:ℝ)) + (by rw [he]) hσq.symm htE (by linarith only [hgp]) (by linarith only [hg',hσ]) + (pointStrength (K:=K) S).coe_nonneg (Nat.cast_nonneg _) (hjt.trans hX) hscale + apply captured_global_trunc_exp_bound hdim F hF Flat X S hFlat _ hc hjq O hO + (pointStrength S) L₀ hδ0 σ g (Real.exp (2*σ+g)) (by linarith) (by rw [hcard];exact hσq.symm) + rfl hg' hX (by rwa [hcard]) _ Lines hLines Q hQ R + exact hcut.trans (by have hh:=Real.exp_nonneg (-(g+σ/2)/20);linarith only [hh]) + · apply residual_global_trunc_exp_bound_dim hq hcard hI σ g S.card hσq.symm hσ hgp hg' + hquarter S hSn O (pointStrength S) L₀ hδ0 hδ hmax Lines hLines Q hQ _ R + intro U hU + obtain ⟨j,hj,hjU⟩ := hcover U hU + have hh := hres j hj + rw [←hS,ht] at hh + have heq : (S.filter fun y=>y.submodule≤U)=S∩flatPoints (Flat j) := by + ext y;simp only [Finset.mem_filter,Finset.mem_inter,mem_flatPoints,hjU] + rw [heq] + exact hh.le + simp only [outsideAt_clip] at ⊢ + apply hbound.trans + have hP : (R:ℝ)*(L₀:ℝ)=P := by rw [mul_comm,hL];rfl + rw [hP] + exact hs D R g hr hg + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/IncidencesDegrees.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/IncidencesDegrees.lean new file mode 100644 index 0000000000000000000000000000000000000000..3772b360ad91930960f1fd6a16152fbb21c9fd64 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/IncidencesDegrees.lean @@ -0,0 +1,70 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Bounds.DensityUpper + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.ProjectiveIncidence +open scoped LinearAlgebra.Projectivization Classical BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma incidences_eq_degrees (A : Finset (ℙ K V)) (Z : Finset (ℙ K (Dual K V))) : + (incidences A Z:ℝ) = ∑ a∈A,((Z.filter fun y => Incident a y).card:ℝ) := by + rw [incidences_eq_sum,Finset.sum_comm] + apply Finset.sum_congr rfl + intro a _ + simp only [incidenceEntry,Finset.sum_boole] + +lemma density_upper {d : ℕ} (hd : 1≤d) : + (Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d ≤ 1/(Nat.card K:ℝ) := by + have hq : (0:ℝ) Incident a y).card:ℝ)≤(Z.card:ℝ)/(8*Nat.card K)) + (hB : B.card≤5*Z.card) : + (incidences A B:ℝ)≤89*(Nat.card K:ℝ)^4 := by + let q : ℝ:=Nat.card K + have hq : 0 hpoor a ha + _ = (A.card:ℝ)*Z.card/(8*q) := by simp; ring + _ ≤ _ := div_le_div_of_nonneg_left (by positivity) (by positivity) (by linarith) + have hp := sparse_rectangle_size (d := 4) hdim (by decide) A Z hs + have hB' : (B.card:ℝ)≤5*Z.card := by exact_mod_cast hB + have hprod : (A.card:ℝ)*B.card≤80*q^5 := by + have hh := mul_le_mul_of_nonneg_left hB' (show (0:ℝ)≤A.card by positivity) + change (A.card:ℝ)*Z.card≤16*q^5 at hp + nlinarith + have hmix := incidence_mixing (d := 4) hdim (by decide) A B + have hd := density_upper (K := K) (d := 4) (by decide) + have hmain : ((Q (Nat.card K) 3:ℝ)/Q (Nat.card K) 4)*A.card*B.card≤80*q^4 := by + calc + _ ≤ (1/q)*((A.card:ℝ)*B.card) := by + simpa only [mul_assoc] using mul_le_mul_of_nonneg_right hd (show (0:ℝ)≤(A.card:ℝ)*B.card by positivity) + _ ≤ (1/q)*(80*q^5) := mul_le_mul_of_nonneg_left hprod (by positivity) + _ = _ := by field_simp + have hsqrt : Real.sqrt (q^3*A.card*B.card)≤9*q^4 := by + apply (Real.sqrt_le_left (by positivity)).mpr + have hp' := mul_le_mul_of_nonneg_left hprod (show 0≤q^3 by positivity) + nlinarith [sq_nonneg (q^4)] + have hupper := (abs_le.mp hmix).2 + change (incidences A B:ℝ)≤89*q^4 + change (incidences A B:ℝ)-((Q (Nat.card K) 3:ℝ)/Q (Nat.card K) 4)*A.card*B.card≤ + Real.sqrt (q^3*A.card*B.card) at hupper + linarith + +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/LargeCells.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/LargeCells.lean new file mode 100644 index 0000000000000000000000000000000000000000..d5270c0c8449011d56cae021d8bbcfe02e7592a5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/LargeCells.lean @@ -0,0 +1,338 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.MultiplicityBudgets +import OAI.Combinatorics.RamseyFive.Geometry.FlatPoints + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ProjectiveTraining +open Module RichPlaneGeometry GreedyTraining +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] +variable {I : Type*} [LinearOrder I] + (F : Finset I) (hF : F.Nonempty) (P : I → Submodule K V) (X : Finset (ℙ K V)) + +lemma chosen_shape_ne_of_positive_cell {i j : ℕ} (hij : i < j) + (hpos : 0 < (cell F hF (fun i => flatPoints (P i)) X j).card) : + P (chosen F hF (fun i => flatPoints (P i)) X i) ≠ + P (chosen F hF (fun i => flatPoints (P i)) X j) := by + intro he + obtain ⟨y,hy⟩ := Finset.card_pos.mp hpos + have hyr : y ∈ remaining F hF (fun i => flatPoints (P i)) X (i+1) := + remaining_antitone F hF _ X hij (cell_subset F hF _ X j hy) + have hn := (Finset.mem_sdiff.mp hyr).2 + apply hn + change y ∈ flatPoints (P (chosen F hF (fun i => flatPoints (P i)) X i)) + rw [he] + exact (Finset.mem_inter.mp hy).2 + +noncomputable def largeCells (J : ℕ) (c : ℝ) : Finset ℕ := + (Finset.range J).filter fun j => c ≤ (cell F hF (fun i => flatPoints (P i)) X j).card + +lemma largeCells_card_budget (J : ℕ) (c : ℝ) : + ((largeCells F hF P X J c).card:ℝ)*c ≤ X.card := by + have hs := Finset.sum_le_sum (s := largeCells F hF P X J c) + (fun j hj => (Finset.mem_filter.mp hj).2) + rw [Finset.sum_const,nsmul_eq_mul] at hs + have hle := Finset.sum_le_sum_of_subset_of_nonneg + (show largeCells F hF P X J c ⊆ Finset.range J from Finset.filter_subset _ _) + (f := fun j => ((cell F hF (fun i => flatPoints (P i)) X j).card:ℝ)) + (fun _ _ _ => Nat.cast_nonneg _) + have hh := sum_card_add_remaining F hF (fun i => flatPoints (P i)) X J + have hn : ∑ j ∈ Finset.range J, (cell F hF (fun i => flatPoints (P i)) X j).card ≤ X.card := by omega + exact (hs.trans hle).trans (by exact_mod_cast hn) + +lemma earlier_mem_largeCells (J : ℕ) (c : ℝ) {i j : ℕ} + (hj : j ∈ largeCells F hF P X J c) (hij : i ≤ j) : + i ∈ largeCells F hF P X J c := by + obtain ⟨hjJ,hjc⟩ := Finset.mem_filter.mp hj + exact Finset.mem_filter.mpr ⟨Finset.mem_range.mpr (hij.trans_lt (Finset.mem_range.mp hjJ)), + hjc.trans (by exact_mod_cast cell_card_antitone F hF (fun i => flatPoints (P i)) X hij)⟩ + +noncomputable def largeCellIntersections (J : ℕ) (c : ℝ) : Finset (ℙ K V) := + ((largeCells F hF P X J c) ×ˢ (largeCells F hF P X J c)).biUnion fun ij => + if ij.1 = ij.2 then ∅ else + flatPoints (P (chosen F hF (fun i => flatPoints (P i)) X ij.1)) ∩ + flatPoints (P (chosen F hF (fun i => flatPoints (P i)) X ij.2)) + +lemma hyperplane_intersection_cap (A H : Submodule K V) + (hA : finrank K A = 4) (hH : finrank K H = 4) (hne : A ≠ H) : + (flatPoints A ∩ flatPoints H).card ≤ ProjectiveIncidence.Q (Nat.card K) 2 := by + have hnot : ¬A ≤ H := fun hh => hne (Submodule.eq_of_le_of_finrank_eq hh (hA.trans hH.symm)) + have hd := finrank_inf_lt_of_not_le A H hnot + have hd' : finrank K (A ⊓ H : Submodule K V) ≤ 3 := by omega + have he : flatPoints A ∩ flatPoints H = + (flatPoints A ∩ flatPoints H).filter fun x => x.submodule ≤ A ⊓ H := by + symm + refine Finset.filter_eq_self.mpr ?_ + intro x hx + exact le_inf ((mem_flatPoints _ _).mp (Finset.mem_inter.mp hx).1) + ((mem_flatPoints _ _).mp (Finset.mem_inter.mp hx).2) + have hsum := Finset.sum_le_sum_of_subset_of_nonneg (Finset.range_mono hd') + (f := fun i => Nat.card K^i) (fun _ _ _ => Nat.zero_le _) + have hc := (card_filter_containment_le (flatPoints A ∩ flatPoints H) (A ⊓ H)).trans hsum + rw [← he] at hc + exact hc + +lemma largeCellIntersections_card (hP : ∀ i ∈ F, finrank K (P i) = 4) + (J : ℕ) (c : ℝ) (hc : 0 < c) : + (largeCellIntersections F hF P X J c).card ≤ + (largeCells F hF P X J c).card^2*ProjectiveIncidence.Q (Nat.card K) 2 := by + let B := largeCells F hF P X J c + have hrow (ij : ℕ × ℕ) (hij : ij ∈ B ×ˢ B) : + (if ij.1 = ij.2 then (∅:Finset (ℙ K V)) else + flatPoints (P (chosen F hF (fun i => flatPoints (P i)) X ij.1)) ∩ + flatPoints (P (chosen F hF (fun i => flatPoints (P i)) X ij.2))).card ≤ + ProjectiveIncidence.Q (Nat.card K) 2 := by + by_cases he : ij.1 = ij.2 + · simp [he] + rw [ite_eq_right he] + apply hyperplane_intersection_cap _ _ (hP _ (chosen_mem F hF _ X _)) (hP _ (chosen_mem F hF _ X _)) + have hp (j : ℕ) (hj : j ∈ B) : 0 < (cell F hF (fun i => flatPoints (P i)) X j).card := by + have hh := hc.trans_le (Finset.mem_filter.mp hj).2 + exact_mod_cast hh + rcases lt_or_gt_of_ne he with hij' | hji' + · exact chosen_shape_ne_of_positive_cell F hF P X hij' (hp _ (Finset.mem_product.mp hij).2) + · exact (chosen_shape_ne_of_positive_cell F hF P X hji' (hp _ (Finset.mem_product.mp hij).1)).symm + have hh := Finset.sum_le_sum hrow + simp only [Finset.sum_const,Finset.card_product,smul_eq_mul] at hh + exact Finset.card_biUnion_le.trans (by simpa only [sq] using hh) + +theorem largeCellIntersections_budget (hP : ∀ i ∈ F, finrank K (P i) = 4) + (J : ℕ) (c : ℝ) (hc : 0 < c) : + ((largeCellIntersections F hF P X J c).card:ℝ)*c^2 ≤ + (ProjectiveIncidence.Q (Nat.card K) 2:ℝ)*(X.card:ℝ)^2 := by + have hcard : ((largeCellIntersections F hF P X J c).card:ℝ) ≤ + ((largeCells F hF P X J c).card:ℝ)^2*(ProjectiveIncidence.Q (Nat.card K) 2:ℝ) := by + exact_mod_cast largeCellIntersections_card F hF P X hP J c hc + have hbudget := largeCells_card_budget F hF P X J c + have hsquare := pow_le_pow_left₀ (mul_nonneg (Nat.cast_nonneg _) hc.le) hbudget 2 + calc + ((largeCellIntersections F hF P X J c).card:ℝ)*c^2 ≤ + ((largeCells F hF P X J c).card:ℝ)^2*(ProjectiveIncidence.Q (Nat.card K) 2:ℝ)*c^2 := + mul_le_mul_of_nonneg_right hcard (sq_nonneg _) + _ = (ProjectiveIncidence.Q (Nat.card K) 2:ℝ)* + (((largeCells F hF P X J c).card:ℝ)*c)^2 := by ring + _ ≤ (ProjectiveIncidence.Q (Nat.card K) 2:ℝ)*(X.card:ℝ)^2 := + mul_le_mul_of_nonneg_left hsquare (Nat.cast_nonneg _) + +lemma surviving_large_plane_center_mem (J j : ℕ) (hj : j < J) (c : ℝ) + (hlarge : j ∈ largeCells F hF P X J c) + (A : Submodule K V) (hA : finrank K A = 3) + (hAj : A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) + (hearlier : ∀ i < j, ¬A ≤ P (chosen F hF (fun i => flatPoints (P i)) X i)) + (x : ℙ K V) (hxA : x.submodule ≤ A) + (hrich : j*(Nat.card K+1) < + ((X \ ownCell F hF (fun i => flatPoints (P i)) X J x).filter fun y => y.submodule ≤ A).card) : + x ∈ largeCellIntersections F hF P X J c := by + obtain ⟨i,hi,hxi⟩ := surviving_plane_center_earlier F hF P X J j hj A hA hAj hearlier x hxA hrich + have hiB := earlier_mem_largeCells F hF P X J c hlarge hi.le + refine Finset.mem_biUnion.mpr ⟨(i,j),Finset.mem_product.mpr ⟨hiB,hlarge⟩,?_⟩ + simp only [ite_eq_right (ne_of_lt hi)] + exact Finset.mem_inter.mpr ⟨(mem_flatPoints _ _).mpr hxi,(mem_flatPoints _ _).mpr (hxA.trans hAj)⟩ + +lemma cellRichPlanes_variance (hP : ∀ i ∈ F, finrank K (P i) = 4) + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 3) (j M : ℕ) + (hmean : 2*((ProjectiveIncidence.Q (Nat.card K) 2:ℝ)/ProjectiveIncidence.Q (Nat.card K) 3)* + (cell F hF (fun i => flatPoints (P i)) X j).card ≤ M) : + ((cellRichLines F hF P X L j M).card:ℝ)*M^2 ≤ + 4*(Nat.card K:ℝ)^2*(cell F hF (fun i => flatPoints (P i)) X j).card := by + let C := cell F hF (fun i => flatPoints (P i)) X j + let G := L.filter fun A => M ≤ (C.filter fun y => y.submodule ≤ A).card + have hG (A : Submodule K V) (hA : A ∈ G) : finrank K A = 3 := + hL A (Finset.mem_filter.mp hA).1 + have hm (A : Submodule K V) (hA : A ∈ G) : M ≤ (C.filter fun y => y.submodule ≤ A).card := + (Finset.mem_filter.mp hA).2 + have hμ : 2*((ProjectiveIncidence.Q (Nat.card K) 2:ℝ)/ProjectiveIncidence.Q (Nat.card K) 3)* + (C.filter fun y => y.submodule ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)).card ≤ M := by + simpa only [C,cell_filter_own_flat] using hmean + have hh := rich_planes_inside_hyperplane + (P (chosen F hF (fun i => flatPoints (P i)) X j)) (hP _ (chosen_mem F hF _ X j)) + G hG C M hm hμ + have he : G.filter (fun A => A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) = + cellRichLines F hF P X L j M := by + ext A + simp only [G,cellRichLines,Finset.mem_filter,C] + tauto + simpa only [he,C,cell_filter_own_flat] using hh + +theorem weighted_small_cell_rich_planes (hP : ∀ i ∈ F, finrank K (P i) = 4) + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 3) (J M : ℕ) + (c : ℝ) (hmean : 2*((ProjectiveIncidence.Q (Nat.card K) 2:ℝ)/ + ProjectiveIncidence.Q (Nat.card K) 3)*c ≤ M) : + (∑ j ∈ (Finset.range J).filter (fun j => ((cell F hF (fun i => flatPoints (P i)) X j).card:ℝ) < c), + (j:ℝ)*(Nat.card K+1)*(cellRichLines F hF P X L j M).card)*(M:ℝ)^2 ≤ + 4*(Nat.card K:ℝ)^2*(Nat.card K+1)*J*X.card := by + let S := (Finset.range J).filter (fun j => ((cell F hF (fun i => flatPoints (P i)) X j).card:ℝ) < c) + have hr (j : ℕ) (hj : j ∈ S) : + (j:ℝ)*(Nat.card K+1)*(cellRichLines F hF P X L j M).card*M^2 ≤ + 4*(Nat.card K:ℝ)^2*(Nat.card K+1)*J*(cell F hF (fun i => flatPoints (P i)) X j).card := by + have hμ : 2*((ProjectiveIncidence.Q (Nat.card K) 2:ℝ)/ProjectiveIncidence.Q (Nat.card K) 3)* + (cell F hF (fun i => flatPoints (P i)) X j).card ≤ M := + (mul_le_mul_of_nonneg_left (Finset.mem_filter.mp hj).2.le (by positivity)).trans hmean + have hv := cellRichPlanes_variance F hF P X hP L hL j M hμ + have hjJ : (j:ℝ) ≤ J := by exact_mod_cast (Finset.mem_range.mp (Finset.mem_filter.mp hj).1).le + calc + _ = (j:ℝ)*(Nat.card K+1)*((cellRichLines F hF P X L j M).card*M^2) := by ring + _ ≤ (j:ℝ)*(Nat.card K+1)*(4*(Nat.card K:ℝ)^2*(cell F hF (fun i => flatPoints (P i)) X j).card) := + mul_le_mul_of_nonneg_left hv (by positivity) + _ ≤ (J:ℝ)*(Nat.card K+1)*(4*(Nat.card K:ℝ)^2*(cell F hF (fun i => flatPoints (P i)) X j).card) := by gcongr + _ = _ := by ring + have hs : (∑ j ∈ S, ((cell F hF (fun i => flatPoints (P i)) X j).card:ℝ)) ≤ X.card := by + have hsub := Finset.sum_le_sum_of_subset_of_nonneg (show S ⊆ Finset.range J from Finset.filter_subset _ _) + (f := fun j => ((cell F hF (fun i => flatPoints (P i)) X j).card:ℝ)) (fun _ _ _ => Nat.cast_nonneg _) + have hn := sum_card_add_remaining F hF (fun i => flatPoints (P i)) X J + have hh : ∑ j ∈ Finset.range J, (cell F hF (fun i => flatPoints (P i)) X j).card ≤ X.card := by omega + exact hsub.trans (by exact_mod_cast hh) + calc + _ = ∑ j ∈ S, (j:ℝ)*(Nat.card K+1)*(cellRichLines F hF P X L j M).card*M^2 := by rw [Finset.sum_mul] + _ ≤ ∑ j ∈ S, 4*(Nat.card K:ℝ)^2*(Nat.card K+1)*J*(cell F hF (fun i => flatPoints (P i)) X j).card := Finset.sum_le_sum hr + _ = 4*(Nat.card K:ℝ)^2*(Nat.card K+1)*J*(∑ j ∈ S, ((cell F hF (fun i => flatPoints (P i)) X j).card:ℝ)) := by rw [Finset.mul_sum] + _ ≤ _ := mul_le_mul_of_nonneg_left hs (by positivity) + +lemma earliest_plane_cell_rich (j M : ℕ) (hj : j*(Nat.card K+1) ≤ M) + (A : Submodule K V) (hA : finrank K A = 3) + (hAj : A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) + (hearlier : ∀ i < j, ¬A ≤ P (chosen F hF (fun i => flatPoints (P i)) X i)) + (hrich : 2*M ≤ (X.filter fun y => y.submodule ≤ A).card) : + M ≤ ((cell F hF (fun i => flatPoints (P i)) X j).filter fun y => y.submodule ≤ A).card := by + have hcap := earliest_plane_outside_cell_cap F hF P X j A hA hAj hearlier + have hsub : X.filter (fun y => y.submodule ≤ A) ⊆ + ((X \ cell F hF (fun i => flatPoints (P i)) X j).filter fun y => y.submodule ≤ A) ∪ + ((cell F hF (fun i => flatPoints (P i)) X j).filter fun y => y.submodule ≤ A) := by + intro y hy + simp only [Finset.mem_filter,Finset.mem_union,Finset.mem_sdiff] at * + tauto + have hc := (Finset.card_le_card hsub).trans (Finset.card_union_le _ _) + omega + +noncomputable def headPlaneCenters (J H M : ℕ) (c : ℝ) (A : Submodule K V) : Finset (ℙ K V) := + (flatPoints A).filter fun x => + (∃ j < H, A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j)) ∧ + 2*M ≤ ((X \ ownCell F hF (fun i => flatPoints (P i)) X J x).filter fun y => y.submodule ≤ A).card ∧ + x ∉ largeCellIntersections F hF P X H c + +theorem head_center_plane_count (hP : ∀ i ∈ F, finrank K (P i) = 4) + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 3) (J H M : ℕ) + (hHJ : H ≤ J) (hM : 0 < M) (hHM : H*(Nat.card K+1) ≤ M) + (c : ℝ) (hmean : 2*((ProjectiveIncidence.Q (Nat.card K) 2:ℝ)/ + ProjectiveIncidence.Q (Nat.card K) 3)*c ≤ M) : + (∑ A ∈ L, ((headPlaneCenters F hF P X J H M c A).card:ℝ))*(M:ℝ)^2 ≤ + 4*(Nat.card K:ℝ)^2*(Nat.card K+1)*H*X.card := by + let S := (Finset.range H).filter (fun j => ((cell F hF (fun i => flatPoints (P i)) X j).card:ℝ) < c) + have hrow (A : Submodule K V) (hA : A ∈ L) : + ((headPlaneCenters F hF P X J H M c A).card:ℝ) ≤ + ∑ j ∈ S, if A ∈ cellRichLines F hF P X L j M then (j:ℝ)*(Nat.card K+1) else 0 := by + by_cases he : (headPlaneCenters F hF P X J H M c A).Nonempty + · obtain ⟨x,hx⟩ := he + obtain ⟨hxA,hcont,hxr,hxn⟩ := Finset.mem_filter.mp hx + let j := Nat.find hcont + have hjH : j < H := (Nat.find_spec hcont).1 + have hjJ := hjH.trans_le hHJ + have hAj : A ≤ P (chosen F hF (fun i => flatPoints (P i)) X j) := (Nat.find_spec hcont).2 + have hearlier (i : ℕ) (hi : i < j) : ¬A ≤ P (chosen F hF (fun i => flatPoints (P i)) X i) := by + intro hiA + exact Nat.find_min hcont hi ⟨hi.trans hjH,hiA⟩ + have hjM : j*(Nat.card K+1) ≤ M := + (Nat.mul_le_mul_right _ hjH.le).trans hHM + have hjr : j*(Nat.card K+1) < + ((X \ ownCell F hF (fun i => flatPoints (P i)) X J x).filter fun y => y.submodule ≤ A).card := by omega + have hjSmall : ((cell F hF (fun i => flatPoints (P i)) X j).card:ℝ) < c := by + by_contra hn + have hjlarge : j ∈ largeCells F hF P X H c := + Finset.mem_filter.mpr ⟨Finset.mem_range.mpr hjH,le_of_not_gt hn⟩ + obtain ⟨i,hi,hxi⟩ := surviving_plane_center_earlier F hF P X J j hjJ A (hL A hA) hAj hearlier x + ((mem_flatPoints _ _).mp hxA) hjr + apply hxn + have hiB := earlier_mem_largeCells F hF P X H c hjlarge hi.le + refine Finset.mem_biUnion.mpr ⟨(i,j),Finset.mem_product.mpr ⟨hiB,hjlarge⟩,?_⟩ + simp only [ite_eq_right (ne_of_lt hi)] + exact Finset.mem_inter.mpr ⟨(mem_flatPoints _ _).mpr hxi, + (mem_flatPoints _ _).mpr (((mem_flatPoints _ _).mp hxA).trans hAj)⟩ + have hjS : j ∈ S := Finset.mem_filter.mpr ⟨Finset.mem_range.mpr hjH,hjSmall⟩ + have hfullrich : 2*M ≤ (X.filter fun y => y.submodule ≤ A).card := + hxr.trans (Finset.card_le_card (Finset.filter_subset_filter _ Finset.sdiff_subset)) + have hmem : A ∈ cellRichLines F hF P X L j M := + Finset.mem_filter.mpr ⟨hA,hAj,earliest_plane_cell_rich F hF P X j M hjM A (hL A hA) + hAj hearlier hfullrich⟩ + have hsub : headPlaneCenters F hF P X J H M c A ⊆ + (flatPoints A).filter (fun z => j*(Nat.card K+1) < + ((X \ ownCell F hF (fun i => flatPoints (P i)) X J z).filter fun y => y.submodule ≤ A).card) := by + intro z hz + obtain ⟨hzA,_,hzr,_⟩ := Finset.mem_filter.mp hz + exact Finset.mem_filter.mpr ⟨hzA,by omega⟩ + have hc := (Finset.card_le_card hsub).trans + (surviving_plane_centers_cap F hF P X J j hjJ A (hL A hA) hAj hearlier) + have hsingle : (j:ℝ)*(Nat.card K+1) ≤ ∑ k ∈ S, + if A ∈ cellRichLines F hF P X L k M then (k:ℝ)*(Nat.card K+1) else 0 := by + have hh := Finset.single_le_sum (s := S) + (f := fun k => if A ∈ cellRichLines F hF P X L k M then (k:ℝ)*(Nat.card K+1) else 0) + (fun k _ => by positivity) hjS + simpa only [ite_eq_left hmem] using hh + exact (by exact_mod_cast hc : ((headPlaneCenters F hF P X J H M c A).card:ℝ) ≤ + (j:ℝ)*(Nat.card K+1)).trans hsingle + · rw [Finset.not_nonempty_iff_eq_empty.mp he,Finset.card_empty,Nat.cast_zero] + exact Finset.sum_nonneg (fun j _ => by positivity) + have hsum := Finset.sum_le_sum hrow + have hcount (j : ℕ) : + (∑ A ∈ L, if A ∈ cellRichLines F hF P X L j M then (j:ℝ)*(Nat.card K+1) else 0) = + (j:ℝ)*(Nat.card K+1)*(cellRichLines F hF P X L j M).card := by + have hsub : cellRichLines F hF P X L j M ⊆ L := Finset.filter_subset _ _ + have hh := Finset.sum_subset hsub + (f := fun A => if A ∈ cellRichLines F hF P X L j M then (j:ℝ)*(Nat.card K+1) else 0) + (fun _ _ hn => ite_eq_right hn) + rw [← hh] + simp [mul_comm] + rw [Finset.sum_comm] at hsum + simp_rw [hcount] at hsum + exact (mul_le_mul_of_nonneg_right hsum (sq_nonneg _)).trans + (weighted_small_cell_rich_planes F hF P X hP L hL H M c hmean) + +lemma actual_tail_hyperplane_cap + (hcover : ∀ A : Submodule K V, finrank K A = 4 → ∃ i ∈ F, P i = A) + (J cap : ℕ) (A : Submodule K V) (hA : finrank K A = 4) : + ((remaining F hF (fun i => flatPoints (P i)) X (headIndex F hF (fun i => flatPoints (P i)) X J cap) \ + remaining F hF (fun i => flatPoints (P i)) X J).filter fun x => x.submodule ≤ A).card ≤ cap := by + obtain ⟨i,hi,rfl⟩ := hcover A hA + exact atlas_head_tail_cap F hF P X J cap i hi + +theorem actual_tail_rich_plane_exceptions + (hcover : ∀ A : Submodule K V, finrank K A = 4 → ∃ i ∈ F, P i = A) + (J cap M u D : ℕ) (hMpos : 0 < M) + (L : Finset (Submodule K V)) (hL : ∀ A ∈ L, finrank K A = 3) + (hM : ∀ A ∈ L, M ≤ + ((remaining F hF (fun i => flatPoints (P i)) X (headIndex F hF (fun i => flatPoints (P i)) X J cap) \ + remaining F hF (fun i => flatPoints (P i)) X J).filter fun x => x.submodule ≤ A).card) + (hlineLarge : 2*(Nat.card K+1) ≤ M) (hlineNum : 2*X.card ≤ u*M) + (hmean : 2*((ProjectiveIncidence.Q (Nat.card K) 2:ℝ)/ProjectiveIncidence.Q (Nat.card K) 3)*cap ≤ M) + (hhyperNum : 4*(Nat.card K:ℝ)^2*cap ≤ (u:ℝ)*M^2) + (hlarge : 64*X.card ≤ M^2) (hD : 8*(2*u+1) ≤ D) + (Y : Finset (ℙ K V)) : + ((Y.filter fun x => D ≤ (L.filter fun A => x.submodule ≤ A).card).card:ℝ)*D^2*M^2 ≤ + 4096*(X.card:ℝ)^2*(2*(u:ℝ)+1)^2 := by + let T := remaining F hF (fun i => flatPoints (P i)) X (headIndex F hF (fun i => flatPoints (P i)) X J cap) \ + remaining F hF (fun i => flatPoints (P i)) X J + have hTX : T ⊆ X := fun _ hx => remaining_subset F hF _ X _ (Finset.mem_sdiff.mp hx).1 + have hc : T.card ≤ X.card := Finset.card_le_card hTX + have hcap : ∀ A : Submodule K V, finrank K A = 4 → (T.filter fun x => x.submodule ≤ A).card ≤ cap := + actual_tail_hyperplane_cap F hF P X hcover J cap + have hnum : 2*T.card ≤ u*M := (Nat.mul_le_mul_left _ hc).trans hlineNum + have hlg : 64*T.card ≤ M^2 := (Nat.mul_le_mul_left _ hc).trans hlarge + obtain ⟨hl,hh⟩ := multiplicity_budgets L hL T M cap u hMpos hM hcap hlineLarge hnum hmean hhyperNum + have hr := capped_rich_plane_count L hL T M cap u hMpos hM hcap hlineLarge hnum hmean hhyperNum hlg + have hex := RichPlaneOverlap.exceptional_centers L hL u hl hh Y D hD + have hcr : (T.card:ℝ) ≤ X.card := by exact_mod_cast hc + have hrX : (L.card:ℝ)*M ≤ 16*X.card*(2*(u:ℝ)+1) := + hr.trans (by gcongr) + have hs := pow_le_pow_left₀ (by positivity : (0:ℝ) ≤ (L.card:ℝ)*M) hrX 2 + calc + _ ≤ (16*(L.card:ℝ)^2)*(M:ℝ)^2 := mul_le_mul_of_nonneg_right hex (sq_nonneg _) + _ = 16*((L.card:ℝ)*M)^2 := by ring + _ ≤ 16*(16*X.card*(2*(u:ℝ)+1))^2 := mul_le_mul_of_nonneg_left hs (by norm_num) + _ = _ := by ring + +end SharpRamseyFive.ProjectiveTraining + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/LevelTargetBounds.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/LevelTargetBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..80fdf0faaa5f1c44414ea444e082239dff31f122 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/LevelTargetBounds.lean @@ -0,0 +1,158 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.TargetCaps +import OAI.Combinatorics.RamseyFive.Trees.TargetTrims +import OAI.Combinatorics.RamseyFive.Entropy.TargetAverage + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +local instance (priority := high) levelTargetBoundsPropDecidable (P : Prop) : Decidable P := Classical.propDecidable P +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] +variable (f : PivotContext K V → FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V → FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) +variable {I : Type} [Fintype I] [DecidableEq I] + {A B : I → Type} [∀ i, Fintype (A i)] [∀ i, Fintype (B i)] + +theorem oriented_level_point_target_trim + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (μ : ∀ i, Law (A i)) (ν : ∀ i, Law (B i)) + (X : ∀ i, A i → Finset (ℙ K V)) (Y : ∀ i, B i → Finset (ℙ K (Dual K V))) + (hX : ∀ i a, (X i a).Nonempty) (hY : ∀ i b, (Y i b).Nonempty) + (p : I → Law (ℙ K (Dual K V))) (g : ℙ K V → ℝ) (hg : ∀ a, 0≤g a) + (L : ℝ) (hflat : ∀ i a, (∑ s, ν i s*uniformWeight (Y i s) a) ≤ L*p i a) + (c δ τ P : ℝ) (hc : 0 ∃ C, + orientedPivotContextAt f r σ hσ hq hd.le (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) + (fun i => hX i _) (fun i => hY i _) c δ τ P hδ tree ω (Finset.univ,Finset.univ) j = some C ∧ a∉C.1)))) ≤ + 10*pathBudget (fun i => (50*(Nat.card K:ℝ)/(9*(c*δ)))*L*relationMass Incident (g) (p i)) (fun _ => 0) tree j := by + let C₀ : ℝ := 50*(Nat.card K:ℝ)/(9*(c*δ)) + have hC₀ : 0≤C₀ := by dsimp [C₀]; positivity + let ρ := fun (z : (∀ i, A i) × (∀ i, B i)) a i => C₀ * relationMass + (fun b a => Incident a b) (uniformWeight (Y i (z.2 i))) (uniformWeight {a}) + have hpoint (z : (∀ i, A i) × (∀ i, B i)) (a : ℙ K V) := + oriented_original_point_target f r σ hσ hq hd hq3 + (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) (fun i => hX i _) (fun i => hY i _) + c δ τ P hc hc9 hδ hτ a tree j + have hm (i : I) : (∑ z, originalLevelLaw μ ν z*(∑ a, g a*ρ z a i)) ≤ + C₀*L*relationMass Incident g (p i) := + original_target_mean_point μ ν i Incident (Y i) g (p i) C₀ L hC₀ hg (hflat i) + calc + _ ≤ ∑ z, originalLevelLaw μ ν z*(∑ a, g a*(10*pathBudget (ρ z a) (fun _ => 0) tree j)) := + Finset.sum_le_sum fun z _ => mul_le_mul_of_nonneg_left + (Finset.sum_le_sum fun a _ => mul_le_mul_of_nonneg_left (hpoint z a) (hg a)) + ((originalLevelLaw μ ν).nonneg z) + _ = 10*pathBudget (fun i => ∑ z, originalLevelLaw μ ν z*(∑ a, g a*ρ z a i)) (fun _ => 0) tree j := by + simpa only [mul_zero, Finset.sum_const_zero] using + mean_two_pathBudget_scaled (originalLevelLaw μ ν) g ρ (fun _ _ _ => 0) 10 tree j + _ ≤ _ := mul_le_mul_of_nonneg_left (pathBudget_mono _ _ _ _ + hm (fun _ => le_refl 0) tree j) (by norm_num) + +theorem oriented_level_point_target_cap + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (μ : ∀ i, Law (A i)) (ν : ∀ i, Law (B i)) + (X : ∀ i, A i → Finset (ℙ K V)) (Y : ∀ i, B i → Finset (ℙ K (Dual K V))) + (hX : ∀ i a, (X i a).Nonempty) (hY : ∀ i b, (Y i b).Nonempty) + (p : I → Law (ℙ K (Dual K V))) (g : ℙ K V → ℝ) (hg : ∀ a, 0≤g a) + (L : ℝ) (hflat : ∀ i a, (∑ s, ν i s*uniformWeight (Y i s) a) ≤ L*p i a) + (c δ τ P : ℝ) (hc : 0 Excludes a ((orientedPivotCapsAt f r σ hσ hq hd.le (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) + (fun i => hX i _) (fun i => hY i _) c δ τ P hδ tree ω (Finset.univ,Finset.univ) j).map Prod.snd))))) ≤ + (fun i => (50*(Nat.card K:ℝ)/(9*(c*δ)))*L*relationMass Incident (g) (p i)) (label tree j) := by + let C₀ : ℝ := 50*(Nat.card K:ℝ)/(9*(c*δ)) + have hC₀ : 0≤C₀ := by dsimp [C₀]; positivity + let ρ := fun (z : (∀ i, A i) × (∀ i, B i)) a i => C₀ * relationMass + (fun b a => Incident a b) (uniformWeight (Y i (z.2 i))) (uniformWeight {a}) + have hpoint (z : (∀ i, A i) × (∀ i, B i)) (a : ℙ K V) := + oriented_original_point_cap f r σ hσ hq hd hq3 + (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) (fun i => hX i _) (fun i => hY i _) + c δ τ P hc hc9 hδ hτ a tree j + have hm (i : I) : (∑ z, originalLevelLaw μ ν z*(∑ a, g a*ρ z a i)) ≤ + C₀*L*relationMass Incident g (p i) := + original_target_mean_point μ ν i Incident (Y i) g (p i) C₀ L hC₀ hg (hflat i) + calc + _ ≤ ∑ z, originalLevelLaw μ ν z*(∑ a, g a*ρ z a (label tree j)) := + Finset.sum_le_sum fun z _ => mul_le_mul_of_nonneg_left + (Finset.sum_le_sum fun a _ => mul_le_mul_of_nonneg_left (hpoint z a) (hg a)) + ((originalLevelLaw μ ν).nonneg z) + _ ≤ _ := hm (label tree j) + +theorem oriented_level_dual_target_trim + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (μ : ∀ i, Law (A i)) (ν : ∀ i, Law (B i)) + (X : ∀ i, A i → Finset (ℙ K V)) (Y : ∀ i, B i → Finset (ℙ K (Dual K V))) + (hX : ∀ i a, (X i a).Nonempty) (hY : ∀ i b, (Y i b).Nonempty) + (p : I → Law (ℙ K V)) (g : ℙ K (Dual K V) → ℝ) (hg : ∀ a, 0≤g a) + (L : ℝ) (hflat : ∀ i a, (∑ s, μ i s*uniformWeight (X i s) a) ≤ L*p i a) + (c δ τ P : ℝ) (hc : 0 ∃ C, + orientedPivotContextAt f r σ hσ hq hd.le (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) + (fun i => hX i _) (fun i => hY i _) c δ τ P hδ tree ω (Finset.univ,Finset.univ) j = some C ∧ a∉C.2)))) ≤ + 10*pathBudget (fun _ => 0) (fun i => (50*(Nat.card K:ℝ)/(9*(c*δ)))*L*relationMass Incident (p i) (g)) tree j := by + let C₀ : ℝ := 50*(Nat.card K:ℝ)/(9*(c*δ)) + have hC₀ : 0≤C₀ := by dsimp [C₀]; positivity + let ρ := fun (z : (∀ i, A i) × (∀ i, B i)) a i => C₀ * relationMass + Incident (uniformWeight (X i (z.1 i))) (uniformWeight {a}) + have hpoint (z : (∀ i, A i) × (∀ i, B i)) (a : ℙ K (Dual K V)) := + oriented_original_dual_target f r σ hσ hq hd hq3 + (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) (fun i => hX i _) (fun i => hY i _) + c δ τ P hc hc9 hδ hτ a tree j + have hm (i : I) : (∑ z, originalLevelLaw μ ν z*(∑ a, g a*ρ z a i)) ≤ + C₀*L*relationMass Incident (p i) g := + original_target_mean_dual μ ν i Incident (X i) (p i) g C₀ L hC₀ hg (hflat i) + calc + _ ≤ ∑ z, originalLevelLaw μ ν z*(∑ a, g a*(10*pathBudget (fun _ => 0) (ρ z a) tree j)) := + Finset.sum_le_sum fun z _ => mul_le_mul_of_nonneg_left + (Finset.sum_le_sum fun a _ => mul_le_mul_of_nonneg_left (hpoint z a) (hg a)) + ((originalLevelLaw μ ν).nonneg z) + _ = 10*pathBudget (fun _ => 0) (fun i => ∑ z, originalLevelLaw μ ν z*(∑ a, g a*ρ z a i)) tree j := by + simpa only [mul_zero, Finset.sum_const_zero] using + mean_two_pathBudget_scaled (originalLevelLaw μ ν) g (fun _ _ _ => 0) ρ 10 tree j + _ ≤ _ := mul_le_mul_of_nonneg_left (pathBudget_mono _ _ _ _ + (fun _ => le_refl 0) hm tree j) (by norm_num) + +theorem oriented_level_dual_target_cap + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (μ : ∀ i, Law (A i)) (ν : ∀ i, Law (B i)) + (X : ∀ i, A i → Finset (ℙ K V)) (Y : ∀ i, B i → Finset (ℙ K (Dual K V))) + (hX : ∀ i a, (X i a).Nonempty) (hY : ∀ i b, (Y i b).Nonempty) + (p : I → Law (ℙ K V)) (g : ℙ K (Dual K V) → ℝ) (hg : ∀ a, 0≤g a) + (L : ℝ) (hflat : ∀ i a, (∑ s, μ i s*uniformWeight (X i s) a) ≤ L*p i a) + (c δ τ P : ℝ) (hc : 0 Excludes a ((orientedPivotCapsAt f r σ hσ hq hd.le (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) + (fun i => hX i _) (fun i => hY i _) c δ τ P hδ tree ω (Finset.univ,Finset.univ) j).map Prod.fst))))) ≤ + (fun i => (50*(Nat.card K:ℝ)/(9*(c*δ)))*L*relationMass Incident (p i) (g)) (label tree j) := by + let C₀ : ℝ := 50*(Nat.card K:ℝ)/(9*(c*δ)) + have hC₀ : 0≤C₀ := by dsimp [C₀]; positivity + let ρ := fun (z : (∀ i, A i) × (∀ i, B i)) a i => C₀ * relationMass + Incident (uniformWeight (X i (z.1 i))) (uniformWeight {a}) + have hpoint (z : (∀ i, A i) × (∀ i, B i)) (a : ℙ K (Dual K V)) := + oriented_original_dual_cap f r σ hσ hq hd hq3 + (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) (fun i => hX i _) (fun i => hY i _) + c δ τ P hc hc9 hδ hτ a tree j + have hm (i : I) : (∑ z, originalLevelLaw μ ν z*(∑ a, g a*ρ z a i)) ≤ + C₀*L*relationMass Incident (p i) g := + original_target_mean_dual μ ν i Incident (X i) (p i) g C₀ L hC₀ hg (hflat i) + calc + _ ≤ ∑ z, originalLevelLaw μ ν z*(∑ a, g a*ρ z a (label tree j)) := + Finset.sum_le_sum fun z _ => mul_le_mul_of_nonneg_left + (Finset.sum_le_sum fun a _ => mul_le_mul_of_nonneg_left (hpoint z a) (hg a)) + ((originalLevelLaw μ ν).nonneg z) + _ ≤ _ := hm (label tree j) +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/LinearForm.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/LinearForm.lean new file mode 100644 index 0000000000000000000000000000000000000000..b2120287ddc78bf2480028f3999a005931afbfa1 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/LinearForm.lean @@ -0,0 +1,163 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.FinrankSpanImage + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open scoped BigOperators +open MeasureTheory ProbabilityTheory +open scoped BigOperators ENNReal NNReal +namespace SharpRamseyFive.LinearPolynomial +open scoped BigOperators +open MvPolynomial Module +variable {K I : Type*} [Field K] + +theorem exists_linear_form (P : MvPolynomial I K) (hP : P.totalDegree ≤ 1) : + ∃ φ : (K × (I → K)) →ₗ[K] K, ∀ x, φ (1, x) = eval x P := by + classical + have hterm (d : P.support) : + ∃ φ : (K × (I → K)) →ₗ[K] K, + ∀ x, φ (1, x) = eval x (monomial d.val (P.coeff d.val)) := by + have hd : d.val.degree ≤ 1 := (le_totalDegree d.property).trans hP + rcases Nat.le_one_iff_eq_zero_or_eq_one.mp hd with hd | hd + · have he := (Finsupp.degree_eq_zero_iff _).mp hd + refine ⟨P.coeff d.val • LinearMap.fst K K (I → K), ?_⟩ + intro x + simp [he] + · obtain ⟨i, hi⟩ := (Finsupp.sum_eq_one_iff d.val).mp hd + refine ⟨P.coeff d.val • ((LinearMap.proj i).comp (LinearMap.snd K K (I → K))), ?_⟩ + intro x + simp [hi, eval_monomial] + choose φ hφ using hterm + refine ⟨∑ d : P.support, φ d, ?_⟩ + intro x + simp only [LinearMap.sum_apply] + simp_rw [hφ] + rw [← map_sum, Finset.sum_coe_sort P.support (fun d => monomial d (P.coeff d)), ← P.as_sum] + +theorem exists_hyperplane [Infinite K] [Fintype I] + (P : MvPolynomial I K) (hP : P.totalDegree = 1) : + ∃ W : Submodule K (K × (I → K)), finrank K W = Fintype.card I ∧ + ∀ x, eval x P = 0 → ((1 : K), x) ∈ W := by + obtain ⟨φ, hφ⟩ := exists_linear_form P hP.le + have hφ0 : φ ≠ 0 := by + intro he + have hP0 : P = 0 := MvPolynomial.funext (fun x => by simpa [he] using (hφ x).symm) + subst P + simp at hP + refine ⟨LinearMap.ker φ, ?_, ?_⟩ + · have h := Module.Dual.finrank_ker_add_one_of_ne_zero hφ0 + simp only [Module.finrank_prod, Module.finrank_self, Module.finrank_pi] at h + omega + · intro x hx + rw [LinearMap.mem_ker, hφ, hx] +end SharpRamseyFive.LinearPolynomial + +namespace SharpRamseyFive.AffineRealization + +section +open Module +open scoped LinearAlgebra.Projectivization +variable {K L I ι : Type*} [Field K] [Field L] [Algebra K L] + +lemma projective_pair_rank {V : Type*} [AddCommGroup V] [Module K V] + {p r : ℙ K V} (hpr : p ≠ r) : + finrank K (Submodule.span K {p.rep, r.rep}) = 2 := by + have hi := Projectivization.independent_iff.mp + ((Projectivization.independent_pair_iff_ne p r).mpr hpr) + have hr : Set.range (Projectivization.rep ∘ ![p, r]) = {p.rep, r.rep} := by + ext v + simp only [Set.mem_range, Function.comp_apply, Set.mem_insert_iff, Set.mem_singleton_iff] + constructor + · rintro ⟨i, rfl⟩ + fin_cases i <;> simp + · rintro (rfl | rfl) + · exact ⟨0, rfl⟩ + · exact ⟨1, rfl⟩ + have h := finrank_span_eq_card hi + rw [hr] at h + simpa using h + +omit [Algebra K L] in + +lemma injective_of_ranks [Fintype I] [DecidableEq ι] + (p : ι → ℙ K (I → K)) (hp : Function.Injective p) + (a : ι → Fin 3 → L) + (hr : ∀ Y : Finset ι, + finrank L (Submodule.span L ((fun i => ((1 : L), a i)) '' (Y : Set ι))) = + min (finrank K (Submodule.span K ((fun i => (p i).rep) '' (Y : Set ι)))) 4) : + Function.Injective a := by + intro i j hij + by_contra hn + have h := hr {i,j} + rw [Finset.coe_insert, Finset.coe_singleton, Set.image_pair, Set.image_pair, hij, + Set.insert_eq_of_mem (Set.mem_singleton _), projective_pair_rank (by exact fun he => hn (hp he))] at h + have hv : ((1 : L), a j) ≠ 0 := by + intro he + have he1 := congrArg Prod.fst he + exact one_ne_zero he1 + rw [finrank_span_singleton hv] at h + norm_num at h + +theorem exists_projective_realization [Infinite L] [Fintype I] [Fintype ι] [Nonempty ι] + (hI : Fintype.card I = 4 ∨ Fintype.card I = 5) + (p : ι → ℙ K (I → K)) (hp : Function.Injective p) : + ∃ a : ι → Fin 3 → L, Function.Injective a ∧ ∀ Y : Finset ι, + finrank L (Submodule.span L ((fun i => ((1 : L), a i)) '' (Y : Set ι))) = + min (finrank K (Submodule.span K ((fun i => (p i).rep) '' (Y : Set ι)))) 4 := by + classical + obtain ⟨a, ha⟩ := exists_realization (L := L) hI (fun i => (p i).rep) + (fun i => (p i).rep_nonzero) + exact ⟨a, injective_of_ranks p hp a ha, ha⟩ +end + +open Module MvPolynomial +open scoped LinearAlgebra.Projectivization Classical +variable {K L I ι : Type*} [Field K] [Field L] [Fintype I] [Fintype ι] + +theorem plane_cap_of_ranks [Infinite L] + (hI : 3 ≤ Fintype.card I) (p : ι → ℙ K (I → K)) + (a : ι → Fin 3 → L) (ha : Function.Injective a) + (hr : ∀ Y : Finset ι, + finrank L (Submodule.span L ((fun i => ((1 : L), a i)) '' (Y : Set ι))) = + min (finrank K (Submodule.span K ((fun i => (p i).rep) '' (Y : Set ι)))) 4) + (Kp : ℕ) + (hcap : ∀ W : Submodule K (I → K), finrank K W = 3 → + (Finset.univ.filter (fun i => (p i).rep ∈ W)).card ≤ Kp) + (P : MvPolynomial (Fin 3) L) (hP : P.totalDegree = 1) : + ((Finset.univ.image a).filter (fun y => eval y P = 0)).card ≤ Kp := by + classical + let Y : Finset ι := Finset.univ.filter (fun i => eval (a i) P = 0) + obtain ⟨W, hW, hWmem⟩ := LinearPolynomial.exists_hyperplane P hP + have hYW : Submodule.span L ((fun i => ((1 : L), a i)) '' (Y : Set ι)) ≤ W := by + apply Submodule.span_le.mpr + rintro z ⟨i, hi, rfl⟩ + exact hWmem _ (Finset.mem_filter.mp hi).2 + have hry : finrank K (Submodule.span K ((fun i => (p i).rep) '' (Y : Set ι))) ≤ 3 := by + have hy := Submodule.finrank_mono hYW + rw [hr Y, hW] at hy + simp only [Fintype.card_fin] at hy + omega + obtain ⟨U, hU, hUrank⟩ := SubspaceExtension.exists_rank + (Submodule.span K ((fun i => (p i).rep) '' (Y : Set ι))) 3 hry (by simpa using hI) + have hYu : Y ⊆ Finset.univ.filter (fun i => (p i).rep ∈ U) := by + intro i hi + apply Finset.mem_filter.mpr + refine ⟨Finset.mem_univ _, hU ?_⟩ + exact Submodule.subset_span ⟨i, hi, rfl⟩ + have he : (Finset.univ.image a).filter (fun y => eval y P = 0) = Y.image a := by + ext y + simp only [Finset.mem_filter, Finset.mem_image, Finset.mem_univ, true_and, Y] + constructor + · rintro ⟨⟨i, rfl⟩, hi⟩ + exact ⟨i, hi, rfl⟩ + · rintro ⟨i, hi, rfl⟩ + exact ⟨⟨i, rfl⟩, hi⟩ + rw [he, Finset.card_image_of_injective _ ha] + exact (Finset.card_le_card hYu).trans (hcap U hUrank) +end SharpRamseyFive.AffineRealization + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/LocalLines.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/LocalLines.lean new file mode 100644 index 0000000000000000000000000000000000000000..e595290d19faeca6f5dc8d878c747893269f2b38 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/LocalLines.lean @@ -0,0 +1,181 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.Outside +import OAI.Combinatorics.RamseyFive.Decoding.RichCenters + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.GlobalRadial +open Module ProjectiveTraining GreedyTraining +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + +noncomputable def localLines (S : Finset (ℙ K V)) (O : ℙ K V → Finset (ℙ K V)) + (δ a : ℝ) (L : Finset (Submodule K V)) (x : ℙ K V) := + L.filter fun A => x ∈ richCenters S O δ a A + +noncomputable def badCenters (S : Finset (ℙ K V)) (O : ℙ K V → Finset (ℙ K V)) + (δ a : ℝ) (L : Finset (Submodule K V)) (Q : Finset (ℙ K V)) (D : ℝ) := + Q.filter fun x => D ≤ ((localLines S O δ a L x).card:ℝ) + +lemma sum_localLines_le (S : Finset (ℙ K V)) (O : ℙ K V → Finset (ℙ K V)) + (δ a : ℝ) (L : Finset (Submodule K V)) (Q : Finset (ℙ K V)) : + ∑ x ∈ Q, (localLines S O δ a L x).card ≤ + ∑ A ∈ L, (richCenters S O δ a A).card := by + simp_rw [localLines,Finset.card_filter] + rw [Finset.sum_comm] + apply Finset.sum_le_sum + intro A _ + rw [←Finset.card_filter] + have hs : Q.filter (fun x => x ∈ richCenters S O δ a A) ⊆ richCenters S O δ a A := by + intro x hx + exact (Finset.mem_filter.mp hx).2 + exact Finset.card_le_card hs + +lemma badCenters_mass_le (S : Finset (ℙ K V)) (O : ℙ K V → Finset (ℙ K V)) + (δ a : ℝ) (L : Finset (Submodule K V)) (Q : Finset (ℙ K V)) (D : ℝ) : + ((badCenters S O δ a L Q D).card:ℝ)*D ≤ + ∑ A ∈ L, ((richCenters S O δ a A).card:ℝ) := by + let E := badCenters S O δ a L Q D + calc + _ = ∑ _x ∈ E, D := by simp only [Finset.sum_const,nsmul_eq_mul]; rfl + _ ≤ ∑ x ∈ E, ((localLines S O δ a L x).card:ℝ) := + Finset.sum_le_sum fun _ hx => (Finset.mem_filter.mp hx).2 + _ ≤ ∑ x ∈ Q, ((localLines S O δ a L x).card:ℝ) := + Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) (fun _ _ _ => by positivity) + _ ≤ _ := by exact_mod_cast sum_localLines_le S O δ a L Q + +lemma exception_fraction (S : Finset (ℙ K V)) (O : ℙ K V → Finset (ℙ K V)) + (δ a : ℝ) (L : Finset (Submodule K V)) (Q : Finset (ℙ K V)) + (q n χ C : ℝ) (hq : 0 flatPoints (P i)) X J x ⊆ O x) + (Q : Finset (ℙ K V)) (q n n' a χ : ℝ) (hq : 0 flatPoints (P i)) X J) O (q/n') a L Q + (q^4/n^2*Real.exp χ/a^100)).card:ℝ) ≤ + n*(3072*(n/q^2)*Real.exp (-χ)*a^98) := by + have hd : 0 y.val.submodule ≤ A).card = + ((S \ (O ∪ {x})).filter fun y => y.submodule ≤ A).card := by + apply Finset.card_bij (fun y _ => y.val) + · intro y hy + obtain ⟨hy,hyA⟩ := Finset.mem_filter.mp hy + have hm : y.val ∈ S \ O := Finset.mem_subtype.mp hy + simp only [Finset.mem_filter,Finset.mem_sdiff,Finset.mem_union,Finset.mem_singleton] + exact ⟨⟨(Finset.mem_sdiff.mp hm).1,not_or.mpr + ⟨(Finset.mem_sdiff.mp hm).2,Ne.symm y.property⟩⟩,hyA⟩ + · intro y _ z _ he + exact Subtype.ext he + · intro y hy + obtain ⟨hy,hyA⟩ := Finset.mem_filter.mp hy + obtain ⟨hyS,hyO⟩ := Finset.mem_sdiff.mp hy + have hn : x ≠ y := by + intro he + exact hyO (Finset.mem_union_right _ (Finset.mem_singleton.mpr he.symm)) + refine ⟨⟨y,hn⟩,Finset.mem_filter.mpr ⟨?_,hyA⟩,rfl⟩ + exact Finset.mem_subtype.mpr (Finset.mem_sdiff.mpr + ⟨hyS,fun h => hyO (Finset.mem_union_left _ h)⟩) + +lemma richRadials_le_localLines (S : Finset (ℙ K V)) (O : ℙ K V → Finset (ℙ K V)) + (δ a : ℝ) (hδ : 0<δ) (L : Finset (Submodule K V)) + (hL : ∀ l : RadialLine x,l.val∈L) : + (ActualOverlap.richRadials x (outsideAt x S (O x)) ⊤ ⌈a/δ⌉₊).card ≤ + (localLines S O δ a L x).card := by + let E := ActualOverlap.richRadials x (outsideAt x S (O x)) ⊤ ⌈a/δ⌉₊ + let G := localLines S O δ a L x + let f (l : E) : G := ⟨l.val.val,by + refine Finset.mem_filter.mpr ⟨hL l.val,Finset.mem_filter.mpr ⟨?_,?_⟩⟩ + · exact (mem_flatPoints _ _).mpr l.val.property.2 + · have hr := (Finset.mem_filter.mp l.property).2 + have hr' : a/δ ≤ ((RadialLine.trainingOnLine (outsideAt x S (O x)) l.val).card:ℝ) := + Nat.ceil_le.mp hr + have hh := (div_le_iff₀ hδ).mp hr' + rw [mul_comm] at hh + change a ≤ δ*((((outsideAt x S (O x)).filter + fun y => y.val.submodule ≤ l.val.val)).card:ℝ) at hh + rwa [outsideAt_filter_card] at hh⟩ + have hi : Function.Injective f := by + intro l m he + exact Subtype.ext (Subtype.ext (congrArg (fun z : G => z.val) he)) + simpa only [Fintype.card_coe] using Fintype.card_le_of_injective f hi + +theorem score_pairs_off_radial_exception (hdim : finrank K V=5) + (S : Finset (ℙ K V)) (O : ℙ K V → Finset (ℙ K V)) (δ : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Module.Dual K V))) (hF : ∀ H∈F,Incident x H) + (a D : ℝ) (ha : 0≤a) (L : Finset (Submodule K V)) + (hL : ∀ l : RadialLine x,l.val∈L) (Q : Finset (ℙ K V)) (hx : x∈Q) + (hgood : x∉badCenters S O δ (a/2) L Q D) : + ((Finset.univ.filter (fun p : WeightedPrograms.DistinctPairs F => a≤ + WeightedPrograms.strength (pencilLines x F) (radialWeight x (outsideAt x S (O x)) δ) p)).card:ℝ)*a^2 ≤ + D*((Nat.card K:ℝ)^2+Nat.card K+1)^2*a^2+ + 2*(δ:ℝ)^2*((outsideAt x S (O x)).card:ℝ)^2*((Nat.card K:ℝ)+1)^2 := by + have hlocal : ((localLines S O δ (a/2) L x).card:ℝ)a∈GA ∧ b∈GB ∧ Incident a b + (∑A,∑B,μ A*ν B*relationMass Incident (uniformWeight A) (uniformWeight B))≤ + L^2*80004*(entropy (first p)+entropy (second p)-entropy p+ + eventWeight p (fun z=>capturedEvent (first p) (second p) + (fun b : ℙ K (Dual K V)=>b.rep) (fun c : ℙ K V=>c.rep) good + z.1.1 z.1.2 z.2.1 z.2.2)) := by + dsimp only + have hc := low_conflict_bound hdim p + (fun b : ℙ K (Dual K V)=>b.rep) (fun c : ℙ K V=>c.rep) + (fun a b=>a∈GA ∧ b∈GB ∧ Incident a b) (by + intro z hz hg + exact (incident_iff _ _).mp (hconsistent z hz hg.2.2)) + have hs := independent_good_subset_domination Incident (first (first p)) (second (second p)) + GA GB μ ν L hL hGA hGB hμ hν + rw [relationMass_crossed] at hs + have hh := mul_le_mul_of_nonneg_left hc (sq_nonneg L) + exact hs.trans (by simpa only [mul_assoc] using hh) + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/MassHyperplane.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/MassHyperplane.lean new file mode 100644 index 0000000000000000000000000000000000000000..5782e92521a217da362485e427fc4f5cd2c2e117 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/MassHyperplane.lean @@ -0,0 +1,97 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.PencilCount + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory ProbabilityTheory PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma mass_hyperplaneSupport (S : Finset (ℙ K V)) (δ : ℝ≥0) (H : ℙ K (Dual K V)) : + mass (fun _ : S => δ) (hyperplaneSupport S H)=cellMass S δ H := by + unfold mass cellMass hyperplaneSupport + rw [Finset.sum_const,nsmul_eq_mul,mul_comm] + congr 1 + congr 1 + exact Finset.card_bij (fun y _ => y.val) (fun y hy => + Finset.mem_filter.mpr ⟨y.property,(Finset.mem_filter.mp hy).2⟩) + (fun _ _ _ _ h => Subtype.ext h) + (fun y hy => ⟨⟨y,(Finset.mem_filter.mp hy).1⟩, + Finset.mem_filter.mpr ⟨Finset.mem_univ _,(Finset.mem_filter.mp hy).2⟩,rfl⟩) + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma sum_cellMass (S : Finset (ℙ K V)) (T : Finset (ℙ K (Dual K V))) (δ : ℝ) : + (∑H∈T,cellMass S δ H)=δ*(incidences S T:ℝ) := by + rw [incidences_eq_sum,Finset.mul_sum] + apply Finset.sum_congr rfl + intro H _ + simp only [cellMass,incidenceEntry,Finset.sum_boole] + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma cellMass_training_mono (S X : Finset (ℙ K V)) (hS : S⊆X) + {δ : ℝ} (hδ : 0≤δ) (H : ℙ K (Dual K V)) : cellMass S δ H≤cellMass X δ H := by + apply mul_le_mul_of_nonneg_left _ hδ + exact Nat.cast_le.mpr (Finset.card_le_card (Finset.filter_subset_filter _ hS)) + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +theorem thin_hyperplanes (X S : Finset (ℙ K V)) (hS : S⊆X) (hS0 : S.Nonempty) + (hret : X.card≤4*S.card) (T : Finset (ℙ K (Dual K V))) + {τ : ℝ} (hτ : 0<τ) + (hdensity : (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card) : + let T₀ := T.filter fun H => cellMass S ((Nat.card K:ℝ)/S.card) H≤8*τ + (T.card:ℝ)/2≤T₀.card := by + dsimp only + let δ : ℝ := (Nat.card K:ℝ)/S.card + let T₀ := T.filter fun H => cellMass S δ H≤8*τ + let T₁ := T.filter fun H => ¬cellMass S δ H≤8*τ + have hn : (0:ℝ) cellMass_training_mono S X hS hδ H + _ = ((Nat.card K:ℝ)*(incidences X T:ℝ))/S.card := by rw [sum_cellMass];dsimp [δ];ring + _ ≤ (τ*X.card*T.card)/S.card := div_le_div_of_nonneg_right hdensity hn.le + _ ≤ 4*τ*T.card := by + apply (div_le_iff₀ hn).mpr + have hr : (X.card:ℝ)≤4*(S.card:ℝ) := by exact_mod_cast hret + have h := mul_le_mul_of_nonneg_left hr (mul_nonneg hτ.le (Nat.cast_nonneg T.card)) + nlinarith only [h] + have ht : (8*τ)*(T₁.card:ℝ)≤∑H∈T,cellMass S δ H := by + calc + _ = ∑_H∈T₁,8*τ := by simp;ring + _ ≤ ∑H∈T₁,cellMass S δ H := Finset.sum_le_sum fun H hH => + (lt_of_not_ge (Finset.mem_filter.mp hH).2).le + _ ≤ _ := Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) + (fun H _ _ => mul_nonneg hδ (Nat.cast_nonneg _)) + have he : (T₀.card:ℝ)+T₁.card=T.card := by + exact_mod_cast Finset.card_filter_add_card_filter_not (s:=T) + (fun H => cellMass S δ H≤8*τ) + change (T.card:ℝ)/2≤T₀.card + nlinarith only [ht,hsum,he,hτ] + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] in +lemma thin_subset_exceptional {J : Type*} [Fintype J] + (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) (hS : S.Nonempty) + (T : Finset (ℙ K (Dual K V))) {τ : ℝ} (hτ : 8*τ≤4/5) : + (T.filter fun H => cellMass S ((Nat.card K:ℝ)/S.card) H≤8*τ)⊆exceptional S C := by + intro H hH + apply Finset.mem_filter.mpr + refine ⟨Finset.mem_univ _,none,?_⟩ + have hn : (S.card:ℝ)≠0 := (Nat.cast_pos.mpr hS.card_pos).ne' + simp only [threshold,deviation,familyCell,div_self hn] + have hh := (Finset.mem_filter.mp hH).2.trans hτ + have hn0 : cellMass S ((Nat.card K:ℝ)/S.card) H-1≤0 := by linarith only [hh] + rw [abs_of_nonpos hn0] + linarith only [hh] + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/MemPairRank.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/MemPairRank.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3f8778d9dfa2e61a2d0e26938d0732c815ef4f5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/MemPairRank.lean @@ -0,0 +1,172 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.LinearForm + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open scoped BigOperators +open MeasureTheory ProbabilityTheory +open scoped BigOperators ENNReal NNReal +namespace SharpRamseyFive.SpanRank +open Module +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + +lemma mem_pair_iff_rank [FiniteDimensional K V] (x y z : V) + (hxy : finrank K (Submodule.span K {x,y}) = 2) : + z ∈ Submodule.span K {x,y} ↔ finrank K (Submodule.span K {x,y,z}) ≤ 2 := by + have hle : Submodule.span K {x,y} ≤ Submodule.span K {x,y,z} := by + apply Submodule.span_mono + intro w hw + simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hw ⊢ + tauto + constructor + · intro hz + have he : Submodule.span K {x,y,z} ≤ Submodule.span K {x,y} := by + apply Submodule.span_le.mpr + intro w hw + simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hw + rcases hw with rfl | rfl | rfl + · exact Submodule.subset_span (by simp) + · exact Submodule.subset_span (by simp) + · exact hz + simpa only [hxy] using Submodule.finrank_mono he + · intro hr + have he := Submodule.eq_of_le_of_finrank_le hle (by simpa only [hxy] using hr) + rw [he] + exact Submodule.subset_span (by simp) +end SharpRamseyFive.SpanRank + +namespace SharpRamseyFive.AffineRealization + +section +open Module +open scoped LinearAlgebra.Projectivization Classical +variable {K L I ι : Type*} [Field K] [Field L] [Fintype I] [DecidableEq ι] + +omit [DecidableEq ι] in +lemma span_pair_eq_line (p : ι → ℙ K (I → K)) (hp : Function.Injective p) + (W : Submodule K (I → K)) (hW : finrank K W = 2) + {i j : ι} (hij : i ≠ j) (hi : (p i).rep ∈ W) (hj : (p j).rep ∈ W) : + Submodule.span K {(p i).rep, (p j).rep} = W := by + apply Submodule.eq_of_le_of_finrank_eq + · apply Submodule.span_le.mpr + intro v hv + rcases hv with rfl | hv + · exact hi + · exact (Set.mem_singleton_iff.mp hv) ▸ hj + · rw [projective_pair_rank (fun he => hij (hp he)), hW] + +theorem line_incidence_of_ranks + (p : ι → ℙ K (I → K)) (hp : Function.Injective p) + (a : ι → Fin 3 → L) + (hr : ∀ Y : Finset ι, + finrank L (Submodule.span L ((fun i => ((1 : L), a i)) '' (Y : Set ι))) = + min (finrank K (Submodule.span K ((fun i => (p i).rep) '' (Y : Set ι)))) 4) + (W : Submodule K (I → K)) (hW : finrank K W = 2) + {i j : ι} (hij : i ≠ j) (hi : (p i).rep ∈ W) (hj : (p j).rep ∈ W) (k : ι) : + (p k).rep ∈ W ↔ a k ∈ Set.range (fun t : L => a i + t • (a j-a i)) := by + classical + have hpij : p i ≠ p j := fun he => hij (hp he) + have hpair : finrank L (Submodule.span L {((1 : L), a i), ((1 : L), a j)}) = 2 := by + have h := hr {i,j} + rw [Finset.coe_insert, Finset.coe_singleton, Set.image_pair, Set.image_pair, + projective_pair_rank hpij] at h + exact h + have htriple := hr {i,j,k} + rw [Finset.coe_insert, Finset.coe_insert, Finset.coe_singleton, + Set.image_insert_eq, Set.image_pair, Set.image_insert_eq, Set.image_pair] at htriple + rw [← span_pair_eq_line p hp W hW hij hi hj, SpanRank.mem_pair_iff_rank _ _ _ (projective_pair_rank hpij)] + rw [Set.mem_range, ← AffineChart.lift_mem_span_pair, SpanRank.mem_pair_iff_rank _ _ _ hpair, htriple] + omega + +theorem distinct_lines_of_ranks {J : Type*} + (p : ι → ℙ K (I → K)) (hp : Function.Injective p) + (a : ι → Fin 3 → L) + (hr : ∀ Y : Finset ι, + finrank L (Submodule.span L ((fun i => ((1 : L), a i)) '' (Y : Set ι))) = + min (finrank K (Submodule.span K ((fun i => (p i).rep) '' (Y : Set ι)))) 4) + (W : J → Submodule K (I → K)) (hW : ∀ l, finrank K (W l) = 2) + (hWinj : Function.Injective W) (i j : J → ι) (hij : ∀ l, i l ≠ j l) + (hi : ∀ l, (p (i l)).rep ∈ W l) (hj : ∀ l, (p (j l)).rep ∈ W l) : + Function.Injective (fun l => Set.range (fun t : L => a (i l)+t • (a (j l)-a (i l)))) := by + intro l m hlm + dsimp only at hlm + apply hWinj + apply Submodule.eq_of_le_of_finrank_eq + · rw [← span_pair_eq_line p hp (W l) (hW l) (hij l) (hi l) (hj l)] + apply Submodule.span_le.mpr + intro z hz + rcases hz with rfl | hz + · apply (line_incidence_of_ranks p hp a hr (W m) (hW m) (hij m) (hi m) (hj m) _).mpr + rw [← hlm] + exact ⟨0, by simp⟩ + · rw [Set.mem_singleton_iff] at hz + subst z + apply (line_incidence_of_ranks p hp a hr (W m) (hW m) (hij m) (hi m) (hj m) _).mpr + rw [← hlm] + exact ⟨1, by simp⟩ + · rw [hW, hW] +end + +open Module +open scoped LinearAlgebra.Projectivization Classical +variable {K L I ι : Type*} [Field K] [Field L] [Fintype I] [Fintype ι] + +theorem line_count_of_ranks + (p : ι → ℙ K (I → K)) (hp : Function.Injective p) + (a : ι → Fin 3 → L) (ha : Function.Injective a) + (hr : ∀ Y : Finset ι, + finrank L (Submodule.span L ((fun i => ((1 : L), a i)) '' (Y : Set ι))) = + min (finrank K (Submodule.span K ((fun i => (p i).rep) '' (Y : Set ι)))) 4) + (W : Submodule K (I → K)) (hW : finrank K W = 2) + {i j : ι} (hij : i ≠ j) (hi : (p i).rep ∈ W) (hj : (p j).rep ∈ W) : + (Finset.univ.filter (fun k => (p k).rep ∈ W)).card = + ((Finset.univ.image a).filter (fun y => + y ∈ Set.range (fun t : L => a i+t • (a j-a i)))).card := by + classical + apply Finset.card_bij (fun k _ => a k) + · intro k hk + refine Finset.mem_filter.mpr ⟨Finset.mem_image.mpr ⟨k, Finset.mem_univ _, rfl⟩, ?_⟩ + exact (line_incidence_of_ranks p hp a hr W hW hij hi hj k).mp (Finset.mem_filter.mp hk).2 + · intro k hk l hl hkl + exact ha hkl + · intro y hy + obtain ⟨k, _, rfl⟩ := Finset.mem_image.mp (Finset.mem_filter.mp hy).1 + refine ⟨k, Finset.mem_filter.mpr ⟨Finset.mem_univ _, ?_⟩, rfl⟩ + exact (line_incidence_of_ranks p hp a hr W hW hij hi hj k).mpr (Finset.mem_filter.mp hy).2 + +omit [Fintype I] in + +theorem exists_line_indices {J : Type*} + (p : ι → ℙ K (I → K)) (W : J → Submodule K (I → K)) + (hM : ∀ l, 2 ≤ (Finset.univ.filter (fun k => (p k).rep ∈ W l)).card) : + ∃ i j : J → ι, (∀ l, i l ≠ j l) ∧ + (∀ l, (p (i l)).rep ∈ W l) ∧ (∀ l, (p (j l)).rep ∈ W l) := by + classical + have H (l : J) := Finset.one_lt_card.mp (lt_of_lt_of_le (by decide : 1 < 2) (hM l)) + choose i hi j hj hij using H + exact ⟨i, j, hij, fun l => (Finset.mem_filter.mp (hi l)).2, + fun l => (Finset.mem_filter.mp (hj l)).2⟩ + +theorem projective_line_card_le_sq {J : Type*} [Fintype J] + (p : ι → ℙ K (I → K)) (hp : Function.Injective p) + (W : J → Submodule K (I → K)) (hW : ∀ l, finrank K (W l) = 2) + (hWinj : Function.Injective W) + (hM : ∀ l, 2 ≤ (Finset.univ.filter (fun k => (p k).rep ∈ W l)).card) : + Fintype.card J ≤ (Fintype.card ι)^2 := by + classical + obtain ⟨i, j, hij, hi, hj⟩ := exists_line_indices p W hM + have hf : Function.Injective (fun l => (i l,j l)) := by + intro l m hlm + have hi' : i l = i m := congrArg Prod.fst hlm + have hj' : j l = j m := congrArg Prod.snd hlm + apply hWinj + rw [← span_pair_eq_line p hp _ (hW l) (hij l) (hi l) (hj l), + ← span_pair_eq_line p hp _ (hW m) (hij m) (hi m) (hj m), hi', hj'] + simpa [Fintype.card_prod, pow_two] using Fintype.card_le_of_injective _ hf +end SharpRamseyFive.AffineRealization + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ModifiedRadialSchedule.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ModifiedRadialSchedule.lean new file mode 100644 index 0000000000000000000000000000000000000000..e0999f4e306a27f525a7721d1403746d27b99966 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ModifiedRadialSchedule.lean @@ -0,0 +1,115 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.OwnQuery +import OAI.Combinatorics.RamseyFive.Entropy.OriginalUniformWeightedScoreMoment + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory ProbabilityTheory PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] (x : ℙ K V) [Fintype (RadialLine x)] + +noncomputable def modifiedRadialSchedule (S O : Finset (ℙ K V)) {R : ℕ} + (ω : Fin R→S→ℕ) : Fin R→RadialLine x→ℕ := + fun r => aggregate (radialLabel x (outsideAt x S O)) + (fun d => ω r ((outsideEquiv x S O).symm d).val) + +omit [Finite K] in +lemma original_weighted_radial_moment (X : Finset {y : ℙ K V // x ≠ y}) (L δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (hF : ∀H∈F,Incident x H) {R : ℕ} + (b : ℝ) (own : F→Fin R→Bool) (p : ℕ) (g : (Fin R→RadialLine x→ℕ)→ℝ) : + (∫ ω,g (fun r => aggregate (radialLabel x X) (ω r))* + (typicalScore Finset.univ + (fun H : F => Finset.univ.filter fun y : X => Incident y.val.val H.val) b own ω)^p + ∂scheduleMeasure (fun _ : X => L*δ) R) = + ∫ ω,g ω*(typicalScore Finset.univ (pencilLines x F) b own ω)^p + ∂scheduleMeasure (fun l => L*radialWeight x X δ l) R := by + have h := integral_original_weighted_score_pow (radialLabel x X) (fun _ => L*δ) + Finset.univ (pencilLines x F) b own p g + simp_rw [radialLabel_in_pencil x X F hF,aggregateRate_radialLabel] at h + exact h + +omit [Finite K] in +theorem actual_original_weighted (S O : Finset (ℙ K V)) (L δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (hF : ∀H∈F,Incident x H) {R : ℕ} + {b : ℝ} (hb : b∈Set.Icc 0 1) (p : ℕ) (g : (Fin R→RadialLine x→ℕ)→ℝ) + (hg : ∀ω,|g ω|≤1) (B : ℝ) + (hB : ∀own : F→Fin R→Bool, + (∫ ω,g ω*(typicalScore Finset.univ (pencilLines x F) b own ω)^p + ∂scheduleMeasure (fun l => L*radialWeight x (outsideAt x S O) δ l) R)≤B) : + (∫ ω,g (modifiedRadialSchedule x S O ω)*(modifiedPointScore x S O F b ω)^p + ∂scheduleMeasure (fun _ : S => L*δ) R)≤B := by + apply original_uniform_weighted_score_moment (ownQuery x S O) (outsideEquiv x S O) + (L*δ) Finset.univ _ hb (ownBitsMinus x S O F) + (fun v => g (fun r => aggregate (radialLabel x (outsideAt x S O)) (v r))) + (fun v => hg _) p B + intro u + rw [original_weighted_radial_moment x (outsideAt x S O) L δ F hF] + exact hB _ + +end + +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory ProbabilityTheory PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] (x : ℙ K V) [Fintype (RadialLine x)] + +omit [Finite K] in +theorem measurePreserving_modifiedRadial (S O : Finset (ℙ K V)) (L δ : ℝ≥0) (R : ℕ) : + MeasurePreserving (modifiedRadialSchedule x S O (R:=R)) + (scheduleMeasure (fun _ : S => L*δ) R) + (scheduleMeasure (fun l => L*radialWeight x (outsideAt x S O) δ l) R) := by + have hsplit := measurePreserving_split_schedule (fun _ : S => L*δ) (ownQuery x S O) R + have hproj := (measurePreserving_snd (μ:=scheduleMeasure + (fun _ : {y : S // ownQuery x S O y} => L*δ) R) + (ν:=scheduleMeasure (fun _ : {y : S // ¬ownQuery x S O y} => L*δ) R)).comp hsplit + have hr := (measurePreserving_schedule_reindex (outsideEquiv x S O) + (fun _ : outsideAt x S O => L*δ) R).comp hproj + have ha := (measurePreserving_schedule_aggregate (radialLabel x (outsideAt x S O)) + (fun _ : outsideAt x S O => L*δ) R).comp hr + rw [aggregateRate_radialLabel] at ha + exact ha + +omit [Finite K] in +theorem original_truncation_failure (S O : Finset (ℙ K V)) (L δ : ℝ≥0) (R J : ℕ) : + (∫ω,1-HighMoment.allTrunc R J (Function.uncurry (modifiedRadialSchedule x S O ω)) + ∂scheduleMeasure (fun _ : S => L*δ) R) = + ∫ω,1-HighMoment.allTrunc R J ω + ∂batchMeasure (fun p : Fin R×RadialLine x => L*radialWeight x (outsideAt x S O) δ p.2) := by + exact ((measurePreserving_uncurry_schedule + (fun l => L*radialWeight x (outsideAt x S O) δ l) R).comp + (measurePreserving_modifiedRadial x S O L δ R)).hasLaw.integral_comp + (measurable_of_countable (fun ω => 1-HighMoment.allTrunc R J ω)).aestronglyMeasurable + +omit [Finite K] in +theorem original_truncated_moment (S O : Finset (ℙ K V)) (L δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (hF : ∀H∈F,Incident x H) {R : ℕ} + {b : ℝ} (hb : b∈Set.Icc 0 1) (p J : ℕ) (B : ℝ) + (hB : ∀own : F→Fin R→Bool, + (∫ω,HighMoment.allTrunc R J ω* + (∑H:F,scoreTerm (pencilLines x F H) b (own H) (fun r d => ω (r,d)))^p + ∂batchMeasure (fun i : Fin R×RadialLine x => L*radialWeight x (outsideAt x S O) δ i.2))≤B) : + (∫ω,HighMoment.allTrunc R J (Function.uncurry (modifiedRadialSchedule x S O ω))* + (modifiedPointScore x S O F b ω)^p ∂scheduleMeasure (fun _ : S => L*δ) R)≤B := by + apply actual_original_weighted x S O L δ F hF hb p + (fun ω => HighMoment.allTrunc R J (Function.uncurry ω)) + (fun ω => by rw [abs_of_nonneg (HighMoment.allTrunc_range R J _).1] + exact (HighMoment.allTrunc_range R J _).2) B + intro own + have he := (measurePreserving_uncurry_schedule + (fun l => L*radialWeight x (outsideAt x S O) δ l) R).hasLaw.integral_comp + (measurable_of_countable (fun ω : Fin R×RadialLine x→ℕ => HighMoment.allTrunc R J ω* + (∑H:F,scoreTerm (pencilLines x F H) b (own H) (fun r d => ω (r,d)))^p)).aestronglyMeasurable + exact he.trans_le (hB own) + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/MomentCutoffPolynomialTail.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/MomentCutoffPolynomialTail.lean new file mode 100644 index 0000000000000000000000000000000000000000..5059a14dd826d9f738465d4e058559bd26585c27 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/MomentCutoffPolynomialTail.lean @@ -0,0 +1,163 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.ProjectiveHighCapturedMoment + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open scoped BigOperators +open MeasureTheory ProbabilityTheory +open scoped BigOperators ENNReal NNReal +namespace SharpRamseyFive.DyadicMoments +open scoped BigOperators Classical +variable {α ι : Type*} [Fintype α] + +theorem moment_cutoff_polynomial_tail (x : α → ℝ) (a : ι → ℝ) (T : Finset ι) + (θ M A : ℝ) (K R : ℕ) (hK : K≠0) (hKR : K≤R) + (hθ : 0≤θ) (hM : 0≤M) (hA : 0≤A) + (hx : ∀ v,0≤x v) (hmax : ∀ v,x v≤M) (ha : ∀ i∈T,0 a i≤x v).card:ℝ)*a i^K≤A) : + (∑ v,x v^R) ≤ (Fintype.card α:ℝ)*θ^R + M^(R-K)*(2^K*T.card*A) := by + let y (v : α) : ℝ := if θ≤x v then x v else 0 + let U := T.filter fun i => θ≤2*a i + have hy (v : α) : 0≤y v := by dsimp [y]; split_ifs; exact hx v; rfl + have hym (v : α) : y v≤M := by dsimp [y]; split_ifs; exact hmax v; exact hM + have hbase : (∑ v,y v^K) ≤ 2^K*U.card*A := by + apply moment_polynomial_tail y a U K hK A hy + (fun i hi => (ha i (Finset.mem_filter.mp hi).1).le) + · intro v hv + have hv' : θ≤x v := by by_contra hn; simp [y,hn] at hv + have hpos : 0 a i≤y v).card ≤ + (Finset.univ.filter fun v => a i≤x v).card := by + apply Finset.card_le_card + intro v hv + have hv' := (Finset.mem_filter.mp hv).2 + have hyx : y v≤x v := by dsimp [y]; split_ifs; rfl; exact hx v + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,hv'.trans hyx⟩ + exact (mul_le_mul_of_nonneg_right (Nat.cast_le.mpr hc) + (pow_nonneg (ha i hiT).le K)).trans (htail i hiT (Finset.mem_filter.mp hi).2) + have hbase' : (∑ v,y v^K) ≤ 2^K*T.card*A := by + apply hbase.trans + exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left + (Nat.cast_le.mpr (Finset.card_filter_le T _)) (by positivity)) hA + have hhi := pow_sum_from_lower y M _ K R hM hKR hy hym hbase' + have hpoint (v : α) : x v^R ≤ θ^R+y v^R := by + by_cases hv : θ≤x v + · simpa [y,hv] using (le_add_of_nonneg_left (a := x v^R) (pow_nonneg hθ R)) + · have hp := pow_le_pow_left₀ (hx v) (le_of_not_ge hv) R + exact hp.trans (le_add_of_nonneg_right (pow_nonneg (hy v) R)) + calc + _ ≤ ∑ v,(θ^R+y v^R) := Finset.sum_le_sum (fun v _ => hpoint v) + _ = (Fintype.card α:ℝ)*θ^R+∑ v,y v^R := by simp [Finset.sum_add_distrib] + _ ≤ _ := add_le_add_right hhi _ + +end SharpRamseyFive.DyadicMoments + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GlobalRadial PoissonScore DyadicMoments +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + +lemma radial_tail_le_localLines (x : ℙ K V) [Fintype (RadialLine x)] + (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ : ℝ≥0) (a : ℝ) (Lines : Finset (Submodule K V)) + (hLines : ∀ l : RadialLine x,l.val∈Lines) : + (Finset.univ.filter fun l : RadialLine x => + a ≤ (radialWeight x (outsideAt x S (O x)) δ l:ℝ)).card ≤ + (localLines S O δ a Lines x).card := by + let A := Finset.univ.filter fun l : RadialLine x => + a ≤ (radialWeight x (outsideAt x S (O x)) δ l:ℝ) + let E := localLines S O δ a Lines x + let f (l : A) : E := ⟨l.val.val,by + refine Finset.mem_filter.mpr ⟨hLines l.val,Finset.mem_filter.mpr ⟨?_,?_⟩⟩ + · exact (mem_flatPoints _ _).mpr l.val.property.2 + · have hr := (Finset.mem_filter.mp l.property).2 + change a ≤ (δ:ℝ)*(((outsideAt x S (O x)).filter fun y => y.val.submodule ≤ l.val.val).card:ℝ) at hr + rwa [outsideAt_filter_card] at hr⟩ + have hi : Function.Injective f := by + intro l m he + exact Subtype.ext (Subtype.ext (congrArg (fun z : E => z.val) he)) + simpa only [Fintype.card_coe] using Fintype.card_le_of_injective f hi + +variable [∀ x : ℙ K V,Fintype (RadialLine x)] + +lemma global_radial_tail (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ : ℝ≥0) (a : ℝ) (Lines : Finset (Submodule K V)) + (Q : Finset (ℙ K V)) (hLines : ∀ x∈Q,∀ l : RadialLine x,l.val∈Lines) : + (Finset.univ.filter fun z : Σ x : Q,RadialLine x.val => + a ≤ (radialWeight z.1.val (outsideAt z.1.val S (O z.1.val)) δ z.2:ℝ)).card ≤ + ∑ A∈Lines,(richCenters S O δ a A).card := by + have he : (Finset.univ.filter fun z : Σ x : Q,RadialLine x.val => + a ≤ (radialWeight z.1.val (outsideAt z.1.val S (O z.1.val)) δ z.2:ℝ)).card = + ∑ x : Q,(Finset.univ.filter fun l : RadialLine x.val => + a ≤ (radialWeight x.val (outsideAt x.val S (O x.val)) δ l:ℝ)).card := by + simp only [Finset.card_filter,Fintype.sum_sigma] + rw [he] + calc + _ ≤ ∑ x : Q,(localLines S O δ a Lines x.val).card := + Finset.sum_le_sum fun x _ => radial_tail_le_localLines x.val S O δ a Lines (hLines x.val x.property) + _ = ∑ x∈Q,(localLines S O δ a Lines x).card := Finset.sum_coe_sort Q (fun x => (localLines S O δ a Lines x).card) + _ ≤ _ := sum_localLines_le S O δ a Lines Q + +theorem global_radial_moment (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ : ℝ≥0) (hδ : 0<δ) (θ A : ℝ) (hθ : 0≤θ) (hA : 0≤A) + (Lines : Finset (Submodule K V)) (Q : Finset (ℙ K V)) + (hLines : ∀ x∈Q,∀ l : RadialLine x,l.val∈Lines) + (htail : ∀ i∈Finset.range (Nat.clog 2 S.card+1),θ≤2*((δ:ℝ)*2^i) → + (δ:ℝ)*2^i≤(δ:ℝ)*((Nat.card K:ℝ)+1) → + (∑ l∈Lines,((richCenters S O δ ((δ:ℝ)*2^i) l).card:ℝ))*((δ:ℝ)*2^i)^2≤A) + (J : ℕ) (hJ : 2≤J) : + (∑ x : Q,∑ l : RadialLine x.val,(radialWeight x.val (outsideAt x.val S (O x.val)) δ l:ℝ)^J) ≤ + (∑ x : Q,(Fintype.card (RadialLine x.val):ℝ))*θ^J+ + ((δ:ℝ)*((Nat.card K:ℝ)+1))^(J-2)*(4*(Nat.clog 2 S.card+1)*A) := by + let w (z : Σ x : Q,RadialLine x.val) : ℝ := + radialWeight z.1.val (outsideAt z.1.val S (O z.1.val)) δ z.2 + have hw (z : Σ x : Q,RadialLine x.val) : 0≤w z := NNReal.coe_nonneg _ + have hmax (z : Σ x : Q,RadialLine x.val) : w z≤(δ:ℝ)*((Nat.card K:ℝ)+1) := by + have hc := training_line_card z.1.val (outsideAt z.1.val S (O z.1.val)) z.2 + change (δ:ℝ)*((RadialLine.trainingOnLine _ _).card:ℝ) ≤ _ + exact mul_le_mul_of_nonneg_left (by exact_mod_cast hc) δ.coe_nonneg + have hcS (x : ℙ K V) : (outsideAt x S (O x)).card≤S.card := outsideAt_card_le x S (O x) + have hcover (z : Σ x : Q,RadialLine x.val) (hp : 0 hmax ⟨z.1,l⟩) z.2 hp + refine ⟨i,?_,hlo,hhi⟩ + have hir := (Finset.mem_filter.mp hi).1 + apply Finset.mem_range.mpr + have := Finset.mem_range.mp hir + exact lt_of_lt_of_le this (Nat.add_le_add_right (Nat.clog_mono_right 2 (hcS z.1.val)) 1) + have hh := moment_cutoff_polynomial_tail w (fun i : ℕ => (δ:ℝ)*2^i) + (Finset.range (Nat.clog 2 S.card+1)) θ ((δ:ℝ)*((Nat.card K:ℝ)+1)) A 2 J + (by norm_num) hJ hθ (by positivity) hA hw hmax + (by intro i _; positivity) hcover (by + intro i hi hcut + by_cases hcap : (δ:ℝ)*2^i≤(δ:ℝ)*((Nat.card K:ℝ)+1) + · have ht := global_radial_tail S O δ ((δ:ℝ)*2^i) Lines Q hLines + have htr : ((Finset.univ.filter fun z : Σ x : Q,RadialLine x.val => + (δ:ℝ)*2^i≤w z).card:ℝ) ≤ + ∑ l∈Lines,((richCenters S O δ ((δ:ℝ)*2^i) l).card:ℝ) := by + exact_mod_cast ht + exact (mul_le_mul_of_nonneg_right htr (sq_nonneg _)).trans (htail i hi hcut hcap) + · have he : (Finset.univ.filter fun z : Σ x : Q,RadialLine x.val => (δ:ℝ)*2^i≤w z)=∅ := by + apply Finset.eq_empty_of_forall_notMem + intro z hz + exact hcap ((Finset.mem_filter.mp hz).2.trans (hmax z)) + simpa only [he,Finset.card_empty,Nat.cast_zero,zero_mul] using hA) + simpa only [Fintype.sum_sigma,Finset.card_range,Nat.cast_add,Nat.cast_one, + Fintype.card_sigma,Nat.cast_sum,show (2:ℝ)^2=4 by norm_num] using hh + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/MomentOrder.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/MomentOrder.lean new file mode 100644 index 0000000000000000000000000000000000000000..cdce542a226f2a4799aaba370c3d0eeb3cbc6506 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/MomentOrder.lean @@ -0,0 +1,212 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.RadialOffException +import OAI.Combinatorics.RamseyFive.Geometry.DyadCount + +namespace OAI + +noncomputable section +namespace SharpRamseyFive.ScoreGeometry + +section +open Filter Asymptotics ParameterHierarchy +open scoped Topology + +noncomputable def momentOrder (σ P : ℝ) : ℕ := 2*⌈5000*σ/P⌉₊ +noncomputable def residualOrder (σ : ℝ) : ℕ := ⌈1000*Real.log σ⌉₊+1 + +lemma momentOrder_bounds {σ P : ℝ} (hσ : 1≤σ) (hP : 1≤P) : + Even (momentOrder σ P) ∧ 0 < momentOrder σ P ∧ + 10000*σ/P≤(momentOrder σ P:ℝ) ∧ (momentOrder σ P:ℝ)≤10000*σ/P+2 ∧ + (momentOrder σ P:ℝ)≤10002*σ := by + have hσ0 : 0<σ := by linarith + have hP0 : 0

linarith + +lemma residualOrder_bound {σ : ℝ} (hσ : 1≤σ) : + 0 (1000000*Real.log σ+2000)/σ^(ParameterHierarchy.beta η)) atTop (𝓝 0) := by + simpa only [add_div,mul_div_assoc,mul_zero,zero_add] using + (hlog.const_mul 1000000).add ((tendsto_const_nhds (x:=(2000:ℝ))).div_atTop (tendsto_rpow_atTop hb)) + have hp : Tendsto (fun σ : ℝ => (10002*1002:ℝ)*σ^(-48:ℝ)) atTop (𝓝 0) := by + simpa using (tendsto_rpow_neg_atTop (by norm_num : (0:ℝ)<48)).const_mul (10002*1002) + filter_upwards [eventually_ge_atTop (1:ℝ),ht.eventually_lt_const (by norm_num : (0:ℝ)<1), + hp.eventually_lt_const (by norm_num : (0:ℝ)<1/2), + (tendsto_rpow_atTop hb).eventually (eventually_ge_atTop (50000:ℝ))] + with σ hσ ht hp hRlo + intro D R hr + have hσ0 : 0<σ := by linarith + have hP : 1≤P η σ D R := + (Real.one_le_rpow hσ (by linarith : 0≤10*ParameterHierarchy.beta η)).trans + (finite_bounds hη hη' hσ hr).2.2.2.2.2.1 + obtain ⟨heven,hpos,hplo,hphi,hps⟩ := momentOrder_bounds hσ hP + obtain ⟨hhpos,hhlog,hhs,hpow⟩ := residualOrder_bound hσ + have hsize : 1000*(residualOrder σ:ℝ)≤(R:ℝ) := by + have hlog' := (div_le_iff₀ (Real.rpow_pos_of_pos hσ0 _)).mp ht.le + nlinarith [hr.rlo] + have hR : 50000≤R := by exact_mod_cast hRlo.trans hr.rlo + have hsN : 1000*residualOrder σ≤R := by exact_mod_cast hsize + have hsizeN : residualOrder σ≤(R/2-5000)/(2*200) := by omega + refine ⟨heven,hpos,hplo,hphi,hps,by omega,hhpos,hsizeN,?_⟩ + apply lt_of_le_of_lt _ hp + calc + _ ≤ (10002*σ)*(1002*σ)*σ^(-50:ℝ) := + mul_le_mul (mul_le_mul hps hhs (Nat.cast_nonneg _) (by positivity)) hpow + (pow_nonneg (by norm_num) _) (by positivity) + _ = (10002*1002:ℝ)*σ^(-48:ℝ) := by + rw [show (10002*σ)*(1002*σ)=(10002*1002:ℝ)*σ^(2:ℝ) by rw [Real.rpow_two]; ring, + mul_assoc,←Real.rpow_add hσ0] + norm_num + +end + +open Filter ParameterHierarchy +open scoped Topology + +lemma pencilAlphabet_le {q k : ℕ} (hq : 1≤q) : + (pencilAlphabet q k:ℝ)≤(k:ℝ)*(q:ℝ)^(k-1) := by + unfold pencilAlphabet + simp only [Nat.cast_sum,Nat.cast_pow] + calc + _ ≤ ∑ i∈Finset.range k,(q:ℝ)^(k-1) := by + apply Finset.sum_le_sum + intro i hi + apply pow_le_pow_right₀ (by exact_mod_cast hq) + have := Finset.mem_range.mp hi + omega + _ = _ := by simp + +lemma exp_geometryScale {q : ℕ} {σ g n : ℝ} + (hq : (q:ℝ)=Real.exp σ) (hn : n=Real.exp (2*σ+g)) : + geometryScale q n=Real.exp (2*σ-g) := by + rw [geometryScale,hq,hn,←Real.exp_nat_mul,←Real.exp_sub] + congr 1 + norm_num + ring + +lemma exp_radialScale {q : ℕ} {σ g n : ℝ} + (hq : (q:ℝ)=Real.exp σ) (hn : n=Real.exp (2*σ+g)) : + (q:ℝ)^4/n^2=Real.exp (-2*g) := by + rw [hq,hn,←Real.exp_nat_mul,←Real.exp_nat_mul,←Real.exp_sub] + congr 1 + norm_num + ring + +noncomputable def localTruncConstant : ℝ := 24*2^(200:ℕ)*8^(4900:ℕ) +lemma localTruncConstant_pos : 0 a i ≤ x v).card:ℝ)*a i^K ≤ A) : + (∑ v,x v^K) ≤ 2^K*T.card*A := by + apply (moment_weighted_cover x a T K hK hx ha hcover).trans + have hh := Finset.sum_le_sum (fun i hi => hcount i hi) + simp only [Finset.sum_const,nsmul_eq_mul] at hh + exact (mul_le_mul_of_nonneg_left hh (by positivity)).trans_eq (by ring) + +theorem pow_sum_from_lower (x : α → ℝ) (m A : ℝ) (K R : ℕ) (hm0 : 0 ≤ m) (hKR : K ≤ R) + (hx : ∀ v,0 ≤ x v) (hm : ∀ v,x v ≤ m) (hA : (∑ v,x v^K) ≤ A) : + (∑ v,x v^R) ≤ m^(R-K)*A := by + have hpow (v : α) : x v^R ≤ m^(R-K)*x v^K := by + have he : R=(R-K)+K := by omega + calc + _ = x v^(R-K)*x v^K := by rw [←pow_add,←he] + _ ≤ _ := mul_le_mul_of_nonneg_right (pow_le_pow_left₀ (hx v) (hm v) _) (pow_nonneg (hx v) _) + apply (Finset.sum_le_sum (fun v (_ : v∈Finset.univ) => hpow v)).trans + rw [←Finset.mul_sum] + exact mul_le_mul_of_nonneg_left hA (pow_nonneg hm0 _) + +end SharpRamseyFive.DyadicMoments +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence PoissonScore WeightedPrograms DyadicMoments +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +noncomputable def boundedOverlapDyads (X : Finset {y : ℙ K V // x≠y}) + (δ : ℝ≥0) (m : ℝ) : Finset ℕ := + (overlapDyads x X).filter fun i => (δ:ℝ)*2^i ≤ m + +omit [FiniteDimensional K V] [Finite K] [Fintype (RadialLine x)] in +lemma boundedOverlapDyads_card (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) (m : ℝ) : + (boundedOverlapDyads x X δ m).card ≤ Nat.clog 2 X.card+1 := by + exact (Finset.card_filter_le _ _).trans_eq (Finset.card_range _) + +omit [FiniteDimensional K V] [Finite K] in +lemma strength_le_typical_cap (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (m : ℝ) + (hm : ∀ H : F,mass (radialWeight x X δ) (pencilLines x F H) ≤ m) + (p : DistinctPairs F) : strength (pencilLines x F) (radialWeight x X δ) p ≤ m := by + apply le_trans _ (hm p.1) + change mass _ (_ ∩ _) ≤ mass _ _ + apply Finset.sum_le_sum_of_subset_of_nonneg (Finset.inter_subset_left) + intro d _ _ + exact NNReal.coe_nonneg _ + +omit [Finite K] in +lemma bounded_overlap_cover (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) (m : ℝ) + (hm : ∀ H : F,mass (radialWeight x X δ) (pencilLines x F H) ≤ m) + (p : DistinctPairs F) (hp : 0 (δ:ℝ)*2^i ≤ + strength (pencilLines x F) (radialWeight x X δ) p).card:ℝ)*((δ:ℝ)*2^i)^k ≤ A) : + (∑ p : DistinctPairs F,strength (pencilLines x F) (radialWeight x X δ) p^k) ≤ + 2^k*(Nat.clog 2 X.card+1)*A := by + apply (moment_polynomial_tail _ _ (boundedOverlapDyads x X δ m) k hk A + (strength_nonneg _ _) (by intro i _; positivity) + (bounded_overlap_cover x X δ hδ F hF m hm) hcount).trans + exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left + (by exact_mod_cast boundedOverlapDyads_card x X δ m) (by positivity)) hA + +omit [Finite K] in + +theorem score_higher_power (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) + (A : ℝ) (hA : 0 ≤ A) (k R : ℕ) (hk : k≠0) (hkR : k ≤ R) + (hm : ∀ H : F,mass (radialWeight x X δ) (pencilLines x F H) ≤ 2) + (hcount : ∀ i∈boundedOverlapDyads x X δ 2, + ((Finset.univ.filter fun p : DistinctPairs F => (δ:ℝ)*2^i ≤ + strength (pencilLines x F) (radialWeight x X δ) p).card:ℝ)*((δ:ℝ)*2^i)^k ≤ A) : + (∑ p : DistinctPairs F,strength (pencilLines x F) (radialWeight x X δ) p^R) ≤ + 2^R*(Nat.clog 2 X.card+1)*A := by + have hh := pow_sum_from_lower _ 2 _ k R (by norm_num) hkR + (strength_nonneg (pencilLines x F) (radialWeight x X δ)) + (strength_le_typical_cap x X δ F 2 hm) + (score_polynomial_power x X δ hδ F hF 2 A hA k hk hm hcount) + apply hh.trans_eq + rw [←mul_assoc,←mul_assoc,←pow_add,Nat.sub_add_cancel hkR] + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/OrderedTargetRetention.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/OrderedTargetRetention.lean new file mode 100644 index 0000000000000000000000000000000000000000..16ba0c74e0cbeafd78a23749c5db55ac39312ae5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/OrderedTargetRetention.lean @@ -0,0 +1,113 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.TargetRetention +import OAI.Combinatorics.RamseyFive.Entropy.OrderedRetention + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization BigOperators NNReal Topology +noncomputable section +local instance (priority := high) orderedTargetPropDecidable (P : Prop) : Decidable P := Classical.propDecidable P + +variable {K V I Ω : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Fintype I] [DecidableEq I] [Fintype Ω] + {A B : I → Type} [∀ i,Fintype (A i)] [∀ i,Fintype (B i)] + +def orientedTargetFailure + (f : PivotContext K V → FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V → FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (σ : ℝ) (hσ : 1 ≤ σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V ≤ 5) + (μ : ∀ i,Law (A i)) (ν : ∀ i,Law (B i)) + (X : ∀ i,A i → Finset (ℙ K V)) (Y : ∀ i,B i → Finset (ℙ K (Dual K V))) + (hX : ∀ i a,(X i a).Nonempty) (hY : ∀ i b,(Y i b).Nonempty) + (γ : Law Ω) (a : Ω → ℙ K V) (b : Ω → ℙ K (Dual K V)) + (c δ τ P : ℝ) (hδ : 0<δ) (tree : BinaryTree I) (j : Address tree) : ℝ := + eventMass (adaptiveLaw γ (fun _=>adaptiveLaw (originalLevelLaw μ ν) + (fun _=>orientedPivotTreeLaw f r tree))) (Finset.univ.filter fun z=> + ¬TargetCovered + (orientedPivotContextAt f r σ hσ hq hd (fun i=>X i (z.2.1.1 i)) + (fun i=>Y i (z.2.1.2 i)) (fun i=>hX i _) (fun i=>hY i _) + c δ τ P hδ tree z.2.2 (Finset.univ,Finset.univ) j) + (orientedPivotCapsAt f r σ hσ hq hd (fun i=>X i (z.2.1.1 i)) + (fun i=>Y i (z.2.1.2 i)) (fun i=>hX i _) (fun i=>hY i _) + c δ τ P hδ tree z.2.2 (Finset.univ,Finset.univ) j) + (a z.1) (b z.1)) + +theorem eventually_ordered_target_retention {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0 ≤ Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q₀ : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q₀] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))], + ∀ (hd : finrank K V=5) (hq3 : 3 ≤ Nat.card K) (I : Type) [Fintype I] [DecidableEq I] [Preorder I] + (A B : I → Type) [∀ i,Fintype (A i)] [∀ i,Fintype (B i)] + (μ : ∀ i,Law (A i)) (ν : ∀ i,Law (B i)) + (X : ∀ i,A i → Finset (ℙ K V)) (Y : ∀ i,B i → Finset (ℙ K (Dual K V))) + (hX : ∀ i a,(X i a).Nonempty) (hY : ∀ i b,(Y i b).Nonempty) + (p : I → Law (ℙ K V)) (q : I → Law (ℙ K (Dual K V))) + (F ε : ℝ) (hF : 0 ≤ F) (hε : 0 ≤ ε) + (hμ : ∀ i a,(∑ s,μ i s*uniformWeight (X i s) a) ≤ F*p i a) + (hν : ∀ i b,(∑ t,ν i t*uniformWeight (Y i t) b) ≤ F*q i b) + (hsparse : ∀ i j,i ≤ j → relationMass Incident (p i) (q j) ≤ ε) + (hσ : 1 ≤ σ) (hq : Real.exp σ=Nat.card K), + Nat.card K=q₀ → Range η σ D R → (L₀:ℝ)=L η σ D → + 0 ≤ b → b ≤ Cb*D*σ^(6*beta η) → + (∀ i a d,(Nat.card K:ℝ)^5*Real.exp (-b) ≤ ((X i a).card:ℝ)*(Y i d).card) → + let f := fun C : PivotContext K V=>fourFinitePredictor hd σ C.1 C.2 + (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun C : PivotContext K V=>fourFinitePredictor (K:=K) (V:=Dual K V) + (by simpa using hd) σ C.2 (C.1.map bidualPoint.toEmbedding) + (P η σ D R) (σ^(-800*beta η)) R L₀ + ∀ (tree : BinaryTree I),Ordered tree → ∀ (j : Address tree), + ∀ (Ω : Type) [Fintype Ω] (γ : Law Ω) (a : Ω → ℙ K V) (b₀ : Ω → ℙ K (Dual K V)) + (goodA : ℙ K V → Prop) (goodB : ℙ K (Dual K V) → Prop) (ε₀ : ℝ),0 ≤ ε₀ → + (∀ i,label tree j ≤ i → relationMass Incident (fun x=>if goodA x then map γ a x else 0) (q i) ≤ ε₀) → + (∀ i,i ≤ label tree j → relationMass Incident (p i) (fun y=>if goodB y then map γ b₀ y else 0) ≤ ε₀) → + orientedTargetFailure f r σ hσ hq hd.le μ ν X Y hX hY γ a b₀ + (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) tree j ≤ + eventMass γ (Finset.univ.filter fun x=>¬goodA (a x))+ + eventMass γ (Finset.univ.filter fun x=>¬goodB (b₀ x))+ + tree.height*(20*tree.height*(50*(Nat.card K:ℝ)/(9*((9/100000)*(9/10))))*F^2*ε+ + ((Nat.card K:ℝ)/(σ^(-1000*beta η)))*F^2*ε+5*Real.exp (-(Nat.card K:ℝ)))+ + (20*tree.height+2)*(50*(Nat.card K:ℝ)/(9*((9/100000)*(9/10))))*F*ε₀ := by + have ht : ∀ᶠ σ : ℝ in atTop,σ^(-1000*beta η) ≤ ((9/100000:ℝ)*(9/10)^2)/1000 := by + have hp : 0<1000*beta η := mul_pos (by norm_num) (beta_pos hη) + exact ((tendsto_rpow_neg_atTop hp).eventually_lt_const + (by norm_num : (0:ℝ)<((9/100000:ℝ)*(9/10)^2)/1000)).mono + (fun σ h=>by simpa only [neg_mul] using h.le) + filter_upwards [eventually_ordered_tree_missing hη hη' Cb hCb,ht] with σ hh ht + intro D b R L₀ q₀ K V _ _ _ _ _ _ _ _ _ hd hq3 I _ _ _ A B _ _ μ ν X Y hX hY p q F ε hF hε hμ hν hsparse hσ hq hcard hr hL hb hbhi hprod + dsimp only + intro tree hord j Ω _ γ a b₀ goodA goodB ε₀ hε₀ hA hB + let f:=fun C : PivotContext K V=>fourFinitePredictor hd σ C.1 C.2 + (P η σ D R) (σ^(-800*beta η)) R L₀ + let r:=fun C : PivotContext K V=>fourFinitePredictor (K:=K) (V:=Dual K V) + (by simpa using hd) σ C.2 (C.1.map bidualPoint.toEmbedding) + (P η σ D R) (σ^(-800*beta η)) R L₀ + have hn:=hh D b R L₀ q₀ K V hd hq3 I A B μ ν X Y hX hY p q F ε hF hε hμ hν hsparse + hσ hq hcard hr hL hb hbhi hprod tree hord j + have hτ : 1000*σ^(-1000*beta η) ≤ (9/100000:ℝ)*(9/10)^2 := by linarith only [ht] + have htarg:=oriented_actual_target_loss f r σ hσ hq hd hq3 μ ν X Y hX hY p q F hμ hν + γ a b₀ goodA goodB (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) + (by norm_num) (by norm_num) (by norm_num) hτ tree j + have hbudget:=directed_target_budget tree hord + (fun i=>relationMass Incident (fun x=>if goodA x then map γ a x else 0) (q i)) + (fun i=>relationMass Incident (p i) (fun y=>if goodB y then map γ b₀ y else 0)) + ε₀ ((50*(Nat.card K:ℝ)/(9*((9/100000)*(9/10))))*F) hε₀ (by positivity) j hA hB + dsimp only at htarg + change orientedTargetFailure f r σ hσ hq hd.le μ ν X Y hX hY γ a b₀ _ _ _ _ _ tree j ≤ _ at htarg + change orientedTargetFailure f r σ hσ hq hd.le μ ν X Y hX hY γ a b₀ _ _ _ _ _ tree j ≤ _ + calc + _ ≤ _ := htarg + _ ≤ _ := by + dsimp only [f,r] at * + nlinarith only [hn,hbudget] +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/OrientedNodeCaps.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/OrientedNodeCaps.lean new file mode 100644 index 0000000000000000000000000000000000000000..54d69e7e2c99727023eecc8e57245e92873f79e4 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/OrientedNodeCaps.lean @@ -0,0 +1,102 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.ReadyRefinement +import OAI.Combinatorics.RamseyFive.Trees.PivotPotential + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry PivotTree +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + +omit [Finite K] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] in +lemma bidual_cap_card (UA : Finset (ℙ K V)) (Y : Finset (ℙ K (Dual K (Dual K V)))) : + (UA.map bidualPoint.toEmbedding∩Y).card=(UA∩Y.map bidualPoint.symm.toEmbedding).card := by + simpa only [Finset.inter_assoc,Finset.inter_left_idem] using bidual_inter_card UA UA Y + +theorem orientedGuardedNode_caps + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) (c δ τ P : ℝ) (hc : 0 + (orientedGuardedNodeEncoded f r σ hσ hq hd A₀ UA B₀ UB hA₀ hB₀ c δ τ P hδ t).map + (orientedNodeDecoded f r UA UB (1000*(Nat.card K)^2) (Nat.card K) t)) + +theorem orientedNode_first_process {ι κ Θ : Type*} [Fintype ι] [Fintype κ] [Fintype Θ] + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (p : Law (ℙ K V)) (r : Law (ℙ K (Dual K V))) (μ : Law ι) (ν : Law κ) + (X : ι→Finset (ℙ K V)) (Y : κ→Finset (ℙ K (Dual K V))) (hXnon : ∀i,(X i).Nonempty) + (prior : ι→κ→Law Θ) (active : ι→κ→Θ→Prop) + (B₀ UB : ι→κ→Θ→Finset (ℙ K (Dual K V))) (UA : ι→κ→Θ→Finset (ℙ K V)) + (hBnon : ∀i j θ,(B₀ i j θ).Nonempty) + (pred : ι→κ→Θ→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (rev : ι→κ→Θ→FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (c δ τ L : ℝ) (M : ι→κ→Θ→ℝ) (hc : 0gateOutputLaw (active i j θ) + (orientedGuardedNodeLaw (pred i j θ) (rev i j θ) σ hσ hq hd.le (X i) (UA i j θ) (B₀ i j θ) (UB i j θ) + (hXnon i) (hBnon i j θ) c δ τ (M i j θ) hδ)) + (fun out=>out.map Prod.fst) (50*(Nat.card K:ℝ)/(9*(c*δ))) L + (by positivity) hL hX hY ?_ + intro i j θ b + have h := (orientedGuardedNode_original (pred i j θ) (rev i j θ) σ hσ hq hd hq3 (X i) (UA i j θ) + (B₀ i j θ) (UB i j θ) (hXnon i) (hBnon i j θ) c δ τ (M i j θ) hc hc9 hδ hτ).1 b + have hh := gateOutput_event_le (active i j θ) _ (fun out=>Excludes b (out.map Prod.fst)) + (by simp [Excludes]) _ (by positivity) h + have he : (Finset.univ.filter (fun a=>Incident a b))∩X i=(X i).filter (fun a=>Incident a b) := by + ext a;simp [and_comm] + simpa only [he,orientedGuardedNodeLaw] using hh + +theorem orientedNode_second_process {ι κ Θ : Type*} [Fintype ι] [Fintype κ] [Fintype Θ] + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (p : Law (ℙ K (Dual K V))) (r : Law (ℙ K V)) (μ : Law ι) (ν : Law κ) + (X : ι→Finset (ℙ K (Dual K V))) (Y : κ→Finset (ℙ K V)) (hXnon : ∀i,(X i).Nonempty) + (prior : ι→κ→Law Θ) (active : ι→κ→Θ→Prop) + (A₀ UA : ι→κ→Θ→Finset (ℙ K V)) (UB : ι→κ→Θ→Finset (ℙ K (Dual K V))) + (hAnon : ∀i j θ,(A₀ i j θ).Nonempty) + (pred : ι→κ→Θ→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (rev : ι→κ→Θ→FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (c δ τ L : ℝ) (M : ι→κ→Θ→ℝ) (hc : 0Incident a b) p r := by + refine adaptive_ambient_eviction (fun b a=>Incident a b) p r μ ν X Y prior + (fun i j θ=>gateOutputLaw (active i j θ) + (orientedGuardedNodeLaw (pred i j θ) (rev i j θ) σ hσ hq hd.le (A₀ i j θ) (UA i j θ) (X i) (UB i j θ) + (hAnon i j θ) (hXnon i) c δ τ (M i j θ) hδ)) + (fun out=>out.map Prod.snd) (50*(Nat.card K:ℝ)/(9*(c*δ))) L + (by positivity) hL hX hY ?_ + intro i j θ a + have h := (orientedGuardedNode_original (pred i j θ) (rev i j θ) σ hσ hq hd hq3 (A₀ i j θ) (UA i j θ) + (X i) (UB i j θ) (hAnon i j θ) (hXnon i) c δ τ (M i j θ) hc hc9 hδ hτ).2 a + have hh := gateOutput_event_le (active i j θ) _ (fun out=>Excludes a (out.map Prod.snd)) + (by simp [Excludes]) _ (by positivity) h + have he : (Finset.univ.filter (Incident a))∩X i=(X i).filter (Incident a) := by + ext b;simp [and_comm] + simpa only [he,orientedGuardedNodeLaw] using hh +end + +open Module FiniteEntropy ReverseCap ScoreGeometry +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + +theorem orientedGuardedNode_flags + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) + (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) (c τ P b : ℝ) + (hc : 0OrientedPivotTape f r) b +abbrev OrientedPivotTreeMessage (b : BinaryTree ι) (ω : OrientedPivotTreeTape f r b) + (C : PivotContext K V) := + TreeCodec.Message (fun _ : ι=>OrientedPivotTape f r) (fun _ : ι=>OrientedPivotMessage f r) + (fun _ : ι=>orientedPivotLeft f r) (fun _ : ι=>orientedPivotRight f r) b ω C +noncomputable instance orientedPivotTreeTapeFintype (b : BinaryTree ι) : + Fintype (OrientedPivotTreeTape f r b) := by + exact @TreeCodec.tapeFintype ι (PivotContext K V) inferInstance + (fun _ : ι=>OrientedPivotTape f r) (fun _ _=>orientedNodeTapeFintype _ _ _ _) b +noncomputable instance orientedPivotTreeMessageFintype (b : BinaryTree ι) + (ω : OrientedPivotTreeTape f r b) (C : PivotContext K V) : + Fintype (OrientedPivotTreeMessage f r b ω C) := by + letI : ∀(_ : ι) C ω,Fintype (OrientedPivotMessage f r C ω) := fun _ _ _=>inferInstance + exact TreeCodec.messageFintype (fun _ : ι=>OrientedPivotTape f r) (fun _ : ι=>OrientedPivotMessage f r) + (fun _ : ι=>orientedPivotLeft f r) (fun _ : ι=>orientedPivotRight f r) b ω C +noncomputable def orientedPivotTreeLaw (b : BinaryTree ι) : Law (OrientedPivotTreeTape f r b) := by + exact @TreeCodec.tapeLaw ι (PivotContext K V) inferInstance + (fun _ : ι=>OrientedPivotTape f r) (fun _ _=>orientedNodeTapeFintype _ _ _ _) + (fun _ C=>orientedNodeTapeLaw (f C) (r C) (1000*(Nat.card K)^2) (Nat.card K)) b + +noncomputable def orientedPivotTreeEncoded + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ : ι→Finset (ℙ K V)) (B₀ : ι→Finset (ℙ K (Dual K V))) + (hA₀ : ∀i,(A₀ i).Nonempty) (hB₀ : ∀i,(B₀ i).Nonempty) + (c δ τ P : ℝ) (hδ : 0<δ) (b : BinaryTree ι) (ω : OrientedPivotTreeTape f r b) + (C : PivotContext K V) : OrientedPivotTreeMessage f r b ω C := + TreeCodec.encoded (fun _ : ι=>OrientedPivotTape f r) (fun _ : ι=>OrientedPivotMessage f r) + (fun _ : ι=>orientedPivotLeft f r) (fun _ : ι=>orientedPivotRight f r) + (fun i C ω=>orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd (A₀ i) C.1 (B₀ i) C.2 + (hA₀ i) (hB₀ i) c δ τ P hδ ω) b ω C +noncomputable def orientedPivotTreeRetained (b : BinaryTree ι) + (ω : OrientedPivotTreeTape f r b) (C : PivotContext K V) + (m : OrientedPivotTreeMessage f r b ω C) : BinaryTree ι := + TreeCodec.retained (fun _ : ι=>OrientedPivotTape f r) (fun _ : ι=>OrientedPivotMessage f r) + (fun _ : ι=>orientedPivotLeft f r) (fun _ : ι=>orientedPivotRight f r) b ω C m +omit [Finite K] in +lemma orientedPivotTree_retained_nodes (b : BinaryTree ι) + (ω : OrientedPivotTreeTape f r b) (C : PivotContext K V) + (m : OrientedPivotTreeMessage f r b ω C) : + (orientedPivotTreeRetained f r b ω C m).numNodes≤b.numNodes := + TreeCodec.retained_nodes_le _ _ _ _ b ω C m +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/OrientedTreeDomains.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/OrientedTreeDomains.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a9e657e0446d36d5be972cfc728a13b0139db19 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/OrientedTreeDomains.lean @@ -0,0 +1,238 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.TreeWeights +import OAI.Combinatorics.RamseyFive.Geometry.OrientedNodeProcess +import OAI.Combinatorics.RamseyFive.Geometry.TreeShape +import OAI.Combinatorics.RamseyFive.Geometry.TargetCaps +import OAI.Combinatorics.RamseyFive.Entropy.TargetLoss + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence + +section +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec +open scoped Classical LinearAlgebra.Projectivization +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] +variable (f : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V→FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) +variable {I : Type} + +def flagRectangle (A : Finset (ℙ K V)) (B : Finset (ℙ K (Dual K V))) : + Finset ((ℙ K V)×(ℙ K (Dual K V))) := (A×ˢB).filter fun z=>Incident z.1 z.2 + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] + [Fintype (ℙ K (Dual K V))] [Fintype (ℙ K (Dual K (Dual K V)))] in +lemma mem_flagRectangle (A : Finset (ℙ K V)) (B : Finset (ℙ K (Dual K V))) + (z : (ℙ K V)×(ℙ K (Dual K V))) : + z∈flagRectangle A B ↔ z.1∈A ∧ z.2∈B ∧ Incident z.1 z.2 := by + simp only [flagRectangle,Finset.mem_filter,Finset.mem_product,and_assoc] + +def orientedNodeDomain (C : PivotContext K V) (t : OrientedPivotTape f r C) + (m : OrientedPivotMessage f r C t) := + let d:=orientedNodeDecoded (f C) (r C) C.1 C.2 (1000*(Nat.card K)^2) (Nat.card K) t m + flagRectangle (C.1∩d.2) (C.2∩d.1) + +def orientedPublicDomain (tree : BinaryTree I) (ω : OrientedPivotTreeTape f r tree) + (C : PivotContext K V) (m : OrientedPivotTreeMessage f r tree ω C) (j : Address tree) := + (decodedAt (fun _ : I=>OrientedPivotTape f r) (fun _ : I=>OrientedPivotMessage f r) + (fun _=>orientedPivotLeft f r) (fun _=>orientedPivotRight f r) + (fun _=>orientedNodeDomain f r) tree ω C m j).getD ∅ + +theorem orientedPublicDomain_card + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) + (A₀ : I→Finset (ℙ K V)) (B₀ : I→Finset (ℙ K (Dual K V))) + (hA₀ : ∀ i,(A₀ i).Nonempty) (hB₀ : ∀ i,(B₀ i).Nonempty) + (c τ P b : ℝ) (hc : 0orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd.le + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c (9/10) τ P (by norm_num) t + let obs:=observe (fun _ : I=>OrientedPivotTape f r) (fun _ : I=>OrientedPivotMessage f r) + (fun _=>orientedPivotLeft f r) (fun _=>orientedPivotRight f r) enc + (fun _=>orientedNodeDomain f r) tree ω C j + have he : orientedPublicDomain f r tree ω C + (orientedPivotTreeEncoded f r σ hσ hq hd.le A₀ B₀ hA₀ hB₀ c (9/10) τ P + (by norm_num) tree ω C) j=obs.getD ∅ := by + exact congrArg (fun d=>d.getD ∅) (decodedAt_encoded _ _ _ _ enc + (fun _=>orientedNodeDomain f r) tree ω C j) + rw [he] + cases ho:obs with + | none => simp only [Option.getD_none,Finset.card_empty,Nat.cast_zero]; positivity + | some d => + simp only [Option.getD_some] + exact observe_invariant _ _ _ _ enc (fun _=>orientedNodeDomain f r) + (fun _=>True) (fun _ d=>(d.card:ℝ)≤2*((320/c+320)^2)*(Nat.card K:ℝ)^4*Real.exp (b+1)) + (fun _ _ _ _ _ _=>True.intro) (fun _ _ _ _ _ _=>True.intro) + (fun i C t m _ hm=>orientedGuardedNode_flags (f C) (r C) σ hσ hq hd + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c τ P b hc hc9 hb (hp i) t m hm) + tree ω C True.intro j d ho + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] + [Fintype (ℙ K (Dual K V))] [Fintype (ℙ K (Dual K (Dual K V)))] in +lemma targetCovered_some (C : PivotContext K V) + (D : Finset (ℙ K (Dual K V))×Finset (ℙ K V)) (a : ℙ K V) (b : ℙ K (Dual K V)) : + TargetCovered (some C) (some D) a b ↔ a∈C.1 ∧ b∈C.2 ∧ a∈D.2 ∧ b∈D.1 := by + constructor + · rintro ⟨C',D',hC,hD,h⟩ + cases Option.some.inj hC + cases Option.some.inj hD + exact h + · intro h + exact ⟨C,D,rfl,rfl,h⟩ + +theorem orientedPublicDomain_coverage + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ : I→Finset (ℙ K V)) (B₀ : I→Finset (ℙ K (Dual K V))) + (hA₀ : ∀ i,(A₀ i).Nonempty) (hB₀ : ∀ i,(B₀ i).Nonempty) + (c δ τ P : ℝ) (hδ : 0<δ) + (tree : BinaryTree I) (ω : OrientedPivotTreeTape f r tree) (C : PivotContext K V) + (j : Address tree) (z : (ℙ K V)×(ℙ K (Dual K V))) : + z∈orientedPublicDomain f r tree ω C + (orientedPivotTreeEncoded f r σ hσ hq hd A₀ B₀ hA₀ hB₀ c δ τ P hδ tree ω C) j ↔ + TargetCovered (orientedPivotContextAt f r σ hσ hq hd A₀ B₀ hA₀ hB₀ c δ τ P hδ tree ω C j) + (orientedPivotCapsAt f r σ hσ hq hd A₀ B₀ hA₀ hB₀ c δ τ P hδ tree ω C j) z.1 z.2 ∧ + Incident z.1 z.2 := by + induction tree generalizing C with + | nil => exact nomatch j + | node i lt rt ihl ihr => + rcases j with j | (j | j) + · cases he:orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c δ τ P hδ (ω.1 C) <;> + simp [orientedPublicDomain,orientedPivotTreeEncoded,encoded,decodedAt, + orientedPivotContextAt,contextAt,orientedPivotCapsAt,observe,probe,he, + targetCovered_some,orientedNodeDomain,mem_flagRectangle,Finset.mem_inter,and_left_comm,and_assoc] + ; simp [TargetCovered] + · cases he:orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c δ τ P hδ (ω.1 C) with + | none => simp [orientedPublicDomain,orientedPivotTreeEncoded,encoded,decodedAt, + orientedPivotContextAt,contextAt,orientedPivotCapsAt,observe,probe,he,TargetCovered] + | some m => + simpa only [orientedPublicDomain,orientedPivotTreeEncoded,encoded,decodedAt, + orientedPivotContextAt,contextAt,orientedPivotCapsAt,observe,probe,he, + Option.map_some,Option.elim_some] + using ihl ω.2.1 (orientedPivotLeft f r C (ω.1 C) m) j + · cases he:orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c δ τ P hδ (ω.1 C) with + | none => simp [orientedPublicDomain,orientedPivotTreeEncoded,encoded,decodedAt, + orientedPivotContextAt,contextAt,orientedPivotCapsAt,observe,probe,he,TargetCovered] + | some m => + simpa only [orientedPublicDomain,orientedPivotTreeEncoded,encoded,decodedAt, + orientedPivotContextAt,contextAt,orientedPivotCapsAt,observe,probe,he, + Option.map_some,Option.elim_some] + using ihr ω.2.2 (orientedPivotRight f r C (ω.1 C) m) j + +end +end + +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec PivotTree MessageWeights +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] +variable (f : PivotContext K V → FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V → FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + +abbrev VariableTreeTape (w : ℕ) := ∀ m : Fin (w+1),OrientedPivotTreeTape f r (finiteBalanced m.val) + +def variableTreeLaw (w : ℕ) : Law (VariableTreeTape f r w) := + piLaw (fun m : Fin (w+1)=>orientedPivotTreeLaw f r (finiteBalanced m.val)) + +omit [Finite K] [FiniteDimensional K V] in +lemma variableTreeLaw_eval (w : ℕ) (m : Fin (w+1)) : + map (variableTreeLaw f r w) (fun t=>t m)=orientedPivotTreeLaw f r (finiteBalanced m.val) := + piLaw_eval _ _ + +abbrev VariableTreeMessage {w : ℕ} (t : VariableTreeTape f r w) (C : PivotContext K V) := + (m : Fin (w+1)) × OrientedPivotTreeMessage f r (finiteBalanced m.val) (t m) C + +def variableTreeCost {w : ℕ} (t : VariableTreeTape f r w) (C : PivotContext K V) + (a : VariableTreeMessage f r t C) : ℝ := + Real.log (w+1)+orientedPivotSlotCost f r (finiteBalanced a.1.val) (t a.1) C a.2 + +omit [Finite K] in +lemma variableTree_weight {w : ℕ} (t : VariableTreeTape f r w) (C : PivotContext K V) + (hf : ∀ C,(f C).Normalized) (hr : ∀ C,(r C).Normalized) : + (∑ a : VariableTreeMessage f r t C,Real.exp (-variableTreeCost f r t C a)) ≤ 1 := by + simpa only [variableTreeCost,Fintype.card_fin,Nat.cast_add,Nat.cast_one] using + sigma_header_weight (Fin (w+1)) + (fun m=>OrientedPivotTreeMessage f r (finiteBalanced m.val) (t m) C) + (fun m=>orientedPivotSlotCost f r (finiteBalanced m.val) (t m) C) + (fun _=>orientedPivotTree_weight f r hf hr _ _ _) + +def variableTreeDomain {w : ℕ} (t : VariableTreeTape f r w) (C : PivotContext K V) + (a : VariableTreeMessage f r t C) (j : Fin (w+1)) : Finset ((ℙ K V)×(ℙ K (Dual K V))) := + if h : j.valOrientedPivotTape f r) (fun _ : ι=>OrientedPivotMessage f r) + (fun _ : ι=>orientedPivotLeft f r) (fun _ : ι=>orientedPivotRight f r) + (fun _ C _ _=>pivotPotential C) tree ω C + (orientedPivotTreeEncoded f r σ hσ hq hd A₀ B₀ hA₀ hB₀ c (9/10) τ P (by norm_num) tree ω C)≤ + tree.height*(pivotPotential C+(b+1+2*Real.log (320/c+320))*tree.numNodes) := by + have hC1 : 1≤320/c+320 := by + have hh : (0:ℝ)≤320/c := by positivity + linarith only [hh] + apply TreeCodec.encoded_potential_le + · intro C + exact le_max_left _ _ + · have hh := Real.log_nonneg hC1 + linarith only [hb,hh] + · intro i C t m hm + simpa only [pivotPotential,orientedPivotLeft,orientedPivotRight,add_assoc] using + orientedGuardedNode_split_potential (f C) (r C) σ hσ hq hd (A₀ i) C.1 (B₀ i) C.2 + (hA₀ i) (hB₀ i) c τ P b hc hc9 (hp i) t m hm +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/OriginalAmbientDomination.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/OriginalAmbientDomination.lean new file mode 100644 index 0000000000000000000000000000000000000000..eae2449cba63c101daa6060d8ede92ec5a1b7a32 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/OriginalAmbientDomination.lean @@ -0,0 +1,60 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.PredictorReverseCap +import OAI.Combinatorics.RamseyFive.Probability.AmbientPublicTest + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem geometric_ambient_original {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (hq : 3≤Nat.card K) (S U : Finset (ℙ K V)) (hS : S.Nonempty) (hSU : S⊆U) + (X X₀ C W : Finset (ℙ K (Dual K V))) (hC : C.Nonempty) (hW : W.Nonempty) + (hCX : C⊆X) (hCW : C⊆W) (hXX₀ : X⊆X₀) + (c γ : ℝ) (hc : 0Incident b a) S U C W hW n (Nat.card K) + ((320/c+320)*(Nat.card K:ℝ)^(d+1)/X.card)) (Finset.univ.filter (Excludes a))≤ + (50*(Nat.card K:ℝ)/(9*(c*γ)))*(((X₀.filter (fun b=>Incident b a)).card:ℝ)/X₀.card) := by + have hq0 : (0:ℝ)Incident b a) S U C X₀ W hC hW hCW (hCX.trans hXX₀) + n hn (Nat.card K) (c*γ) _ hq0 (mul_pos hc hγ) hsize + (geometric_dual_validation_mass hdim hd hq S U hS hSU X C hC hCX c hc hc1 hcapture hsparse n hn hlen) a + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/OriginalReadiness.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/OriginalReadiness.lean new file mode 100644 index 0000000000000000000000000000000000000000..4a8c8e493f623d0476378b7317827eb9f167abbd --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/OriginalReadiness.lean @@ -0,0 +1,134 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.LevelTreeTrims +import OAI.Combinatorics.RamseyFive.Entropy.LevelDensity + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence + +section +open Module FiniteEntropy ReverseCap ScoreGeometry +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +local instance (priority := high) allPropDecidable (P : Prop) : Decidable P := Classical.propDecidable P +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +lemma not_original_ready_iff (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA : A₀.Nonempty) (hB : B₀.Nonempty) (δ τ : ℝ) : + ¬OriginalNodeReady A₀ UA B₀ UB δ τ ↔ + ((A₀∩UA).card:ℝ) < δ*A₀.card ∨ ((B₀∩UB).card:ℝ) < δ*B₀.card ∨ + τ < (Nat.card K:ℝ)*relationMass Incident (uniformWeight A₀) (uniformWeight B₀) := by + rw [OriginalNodeReady, incidences, scaled_uniform_density_iff Incident A₀ B₀ hA hB] + simp only [not_and_or, not_le] + +theorem original_not_ready_mass {W : Type*} [Fintype W] (p : Law W) + (A₀ : Finset (ℙ K V)) (B₀ : Finset (ℙ K (Dual K V))) + (hA : A₀.Nonempty) (hB : B₀.Nonempty) (δ τ : ℝ) + (ctx : W → Option (PivotContext K V)) : + eventMass p (Finset.univ.filter (fun ω => ∃ C, + ctx ω = some C ∧ ¬OriginalNodeReady A₀ C.1 B₀ C.2 δ τ)) ≤ + eventMass p (Finset.univ.filter (fun ω => ∃ C, + ctx ω = some C ∧ ((A₀∩C.1).card:ℝ) < δ*A₀.card)) + + eventMass p (Finset.univ.filter (fun ω => ∃ C, + ctx ω = some C ∧ ((B₀∩C.2).card:ℝ) < δ*B₀.card)) + + if τ < (Nat.card K:ℝ)*relationMass Incident (uniformWeight A₀) (uniformWeight B₀) then 1 else 0 := by + let P := fun ω => ∃ C, ctx ω = some C ∧ ((A₀∩C.1).card:ℝ) < δ*A₀.card + let Q := fun ω => ∃ C, ctx ω = some C ∧ ((B₀∩C.2).card:ℝ) < δ*B₀.card + let E := τ < (Nat.card K:ℝ)*relationMass Incident (uniformWeight A₀) (uniformWeight B₀) + have hd : eventMass p (Finset.univ.filter (fun _ : W => E)) = if E then 1 else 0 := by + by_cases h : E <;> simp [h, eventMass, p.sum_one] + have hs : ∀ ω, (∃ C, ctx ω = some C ∧ ¬OriginalNodeReady A₀ C.1 B₀ C.2 δ τ) → (P ω ∨ Q ω) ∨ E := by + rintro ω ⟨C,hC,hr⟩ + rcases (not_original_ready_iff A₀ C.1 B₀ C.2 hA hB δ τ).mp hr with ha | hb | he + · exact Or.inl (Or.inl ⟨C,hC,ha⟩) + · exact Or.inl (Or.inr ⟨C,hC,hb⟩) + · exact Or.inr he + calc + _ ≤ eventMass p (Finset.univ.filter (fun ω => (P ω ∨ Q ω) ∨ E)) := eventMass_filter_mono _ _ _ hs + _ ≤ eventMass p (Finset.univ.filter (fun ω => P ω ∨ Q ω)) + eventMass p (Finset.univ.filter (fun _ : W => E)) := by + convert eventMass_filter_union p (fun ω => P ω ∨ Q ω) (fun _ : W => E) using 1; congr + _ ≤ _ := by rw [hd]; convert add_le_add (eventMass_filter_union p P Q) (le_refl (if E then (1:ℝ) else 0)) using 1; congr +end +end + +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +local instance (priority := high) levelReadinessPropDecidable (P : Prop) : Decidable P := Classical.propDecidable P +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] +variable (f : PivotContext K V → FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V → FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) +variable {I : Type} [Fintype I] [DecidableEq I] + {A B : I → Type} [∀ i, Fintype (A i)] [∀ i, Fintype (B i)] + +theorem oriented_level_not_ready + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (μ : ∀ i, Law (A i)) (ν : ∀ i, Law (B i)) + (X : ∀ i, A i → Finset (ℙ K V)) (Y : ∀ i, B i → Finset (ℙ K (Dual K V))) + (hX : ∀ i a, (X i a).Nonempty) (hY : ∀ i b, (Y i b).Nonempty) + (p : I → Law (ℙ K V)) (q : I → Law (ℙ K (Dual K V))) + (L : ℝ) (hL : 0≤L) + (hμ : ∀ i a, (∑ s, μ i s * uniformWeight (X i s) a) ≤ L*p i a) + (hν : ∀ i b, (∑ t, ν i t * uniformWeight (Y i t) b) ≤ L*q i b) + (c δ τ P : ℝ) (hc : 0 ∃ C, + orientedPivotContextAt f r σ hσ hq hd.le (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) + (fun i => hX i _) (fun i => hY i _) c δ τ P hδ tree ω (Finset.univ,Finset.univ) j = some C ∧ + ¬OriginalNodeReady (X (label tree j) (z.1 (label tree j))) C.1 + (Y (label tree j) (z.2 (label tree j))) C.2 (9/10) τ))) ≤ + 10 * pathBudget (fun i => (50*(Nat.card K:ℝ)/(9*(c*δ))) * L^2 * + relationMass Incident (p (label tree j)) (q i)) (fun _ => 0) tree j + + 10 * pathBudget (fun _ => 0) (fun i => (50*(Nat.card K:ℝ)/(9*(c*δ))) * L^2 * + relationMass Incident (p i) (q (label tree j))) tree j + + ((Nat.card K:ℝ)/τ)*L^2*relationMass Incident (p (label tree j)) (q (label tree j)) := by + let i := label tree j + let ctx := fun (z : (∀ i, A i) × (∀ i, B i)) (ω : OrientedPivotTreeTape f r tree) => + orientedPivotContextAt f r σ hσ hq hd.le (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) + (fun i => hX i _) (fun i => hY i _) c δ τ P hδ tree ω (Finset.univ,Finset.univ) j + let EA := fun (z : (∀ i, A i) × (∀ i, B i)) => eventMass (orientedPivotTreeLaw f r tree) + (Finset.univ.filter (fun ω => ∃ C, ctx z ω = some C ∧ ((X i (z.1 i)∩C.1).card:ℝ) < (9/10:ℝ)*(X i (z.1 i)).card)) + let EB := fun (z : (∀ i, A i) × (∀ i, B i)) => eventMass (orientedPivotTreeLaw f r tree) + (Finset.univ.filter (fun ω => ∃ C, ctx z ω = some C ∧ ((Y i (z.2 i)∩C.2).card:ℝ) < (9/10:ℝ)*(Y i (z.2 i)).card)) + let ED := fun (z : (∀ i, A i) × (∀ i, B i)) => + τ < (Nat.card K:ℝ)*relationMass Incident (uniformWeight (X i (z.1 i))) (uniformWeight (Y i (z.2 i))) + have ha := oriented_level_point_trim f r σ hσ hq hd hq3 μ ν X Y hX hY p q L hL hμ hν c δ τ P hc hc9 hδ hτ tree j + have hb := oriented_level_dual_trim f r σ hσ hq hd hq3 μ ν X Y hX hY p q L hL hμ hν c δ τ P hc hc9 hδ hτ tree j + have hdens := original_level_density_rejection μ ν i i Incident (X i) (Y i) (p i) (q i) L hL (hμ i) (hν i) + (Nat.card K) τ (Nat.cast_nonneg _) hτpos + have he : (∑ z, originalLevelLaw μ ν z * (if ED z then 1 else 0)) = eventMass (originalLevelLaw μ ν) (Finset.univ.filter ED) := by + simp only [eventMass, Finset.sum_filter, mul_ite, mul_one, mul_zero] + calc + _ ≤ ∑ z, originalLevelLaw μ ν z * (EA z + EB z + if ED z then 1 else 0) := by + apply Finset.sum_le_sum + intro z _ + exact mul_le_mul_of_nonneg_left (original_not_ready_mass (orientedPivotTreeLaw f r tree) + (X i (z.1 i)) (Y i (z.2 i)) (hX i _) (hY i _) (9/10) τ (ctx z)) ((originalLevelLaw μ ν).nonneg z) + _ = (∑ z, originalLevelLaw μ ν z * EA z) + (∑ z, originalLevelLaw μ ν z * EB z) + + eventMass (originalLevelLaw μ ν) (Finset.univ.filter ED) := by simp_rw [mul_add, Finset.sum_add_distrib]; rw [he] + _ ≤ _ := by + apply add_le_add + · apply add_le_add + · convert ha using 1; congr + funext z + dsimp only [EA,ctx,i] + congr 2 + ext ω + simp only [Finset.mem_filter] + · convert hb using 1; congr + funext z + dsimp only [EB,ctx,i] + congr 2 + ext ω + simp only [Finset.mem_filter] + · convert hdens using 1 +end + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/Outside.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/Outside.lean new file mode 100644 index 0000000000000000000000000000000000000000..1db68d550a1471aea2be95f3b8b68026bcde5c3c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/Outside.lean @@ -0,0 +1,220 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Entropy.Pairs + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] +variable (x : ℙ K V) [Fintype (RadialLine x)] + +noncomputable def outsideAt (S O : Finset (ℙ K V)) : + Finset {y : ℙ K V // x ≠ y} := (S \ O).subtype (fun y => x ≠ y) + +noncomputable def radialWeight (X : Finset {y : ℙ K V // x ≠ y}) + (δ : ℝ≥0) (l : RadialLine x) : ℝ≥0 := + δ * (RadialLine.trainingOnLine X l).card + +noncomputable def pencilLines (F : Finset (ℙ K (Module.Dual K V))) + (H : F) : Finset (RadialLine x) := RadialLine.inFlat (LinearMap.ker H.val.rep) + +lemma mass_inFlat (X : Finset {y : ℙ K V // x ≠ y}) (δ : ℝ≥0) + (W : Submodule K V) (hx : x.submodule ≤ W) : + PoissonScore.mass (radialWeight x X δ) (RadialLine.inFlat W) = + (δ:ℝ) * (X.filter fun y => y.val.submodule ≤ W).card := by + unfold PoissonScore.mass radialWeight + simp only [NNReal.coe_mul, NNReal.coe_natCast, ← Finset.mul_sum, ← Nat.cast_sum] + rw [RadialLine.sum_trainingOnLine X W hx] + +lemma mass_pencil (X : Finset {y : ℙ K V // x ≠ y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Module.Dual K V))) (hF : ∀ H ∈ F, Incident x H) (H : F) : + PoissonScore.mass (radialWeight x X δ) (pencilLines x F H) = + (δ:ℝ) * (X.filter fun y => Incident y.val H.val).card := + mass_inFlat x X δ _ (hF H.val H.property) + +lemma mass_overlap (X : Finset {y : ℙ K V // x ≠ y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Module.Dual K V))) (hF : ∀ H ∈ F, Incident x H) (H H' : F) : + PoissonScore.mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H') = + (δ:ℝ) * (X.filter fun y => Incident y.val H.val ∧ Incident y.val H'.val).card := by + unfold pencilLines + rw [RadialLine.inFlat_inf, mass_inFlat x X δ _ (le_inf (hF H.val H.property) + (hF H'.val H'.property))] + simp only [Incident, le_inf_iff] + rfl + +omit [FiniteDimensional K V] [Fintype (RadialLine x)] in +lemma weight_pos_lower (X : Finset {y : ℙ K V // x ≠ y}) (δ : ℝ≥0) + (l : RadialLine x) (h : 0 < radialWeight x X δ l) : + δ ≤ radialWeight x X δ l := by + have hc : 0 < (RadialLine.trainingOnLine X l).card := by + by_contra hn + have := Nat.eq_zero_of_not_pos hn + simp [radialWeight,this] at h + have hcast : (1:ℝ≥0) ≤ (RadialLine.trainingOnLine X l).card := by exact_mod_cast hc + exact (mul_one δ).symm.trans_le (mul_le_mul_of_nonneg_left hcast (zero_le)) + +lemma overlap_pos_lower (X : Finset {y : ℙ K V // x ≠ y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Module.Dual K V))) (hF : ∀ H ∈ F, Incident x H) (H H' : F) + (h : 0 < PoissonScore.mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H')) : + (δ:ℝ) ≤ PoissonScore.mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H') := by + rw [mass_overlap x X δ F hF] at h ⊢ + have hc : 0 < (X.filter fun y => Incident y.val H.val ∧ Incident y.val H'.val).card := by + by_contra hn + have := Nat.eq_zero_of_not_pos hn + simp [this] at h + have hcast : (1:ℝ) ≤ (X.filter fun y => Incident y.val H.val ∧ Incident y.val H'.val).card := by + exact_mod_cast hc + exact (mul_one (δ:ℝ)).symm.trans_le (mul_le_mul_of_nonneg_left hcast δ.coe_nonneg) + +variable [Finite K] + +lemma one_anchor_count (F : Finset (ℙ K (Module.Dual K V))) (l : RadialLine x) : + (Finset.univ.filter (fun H : F => l ∈ pencilLines x F H)).card ≤ + ∑ i ∈ Finset.range (finrank K V-2), Nat.card K^i := by + let : Finite (Module.Dual K V) := Module.finite_of_finite K + let f : {H : F // l ∈ pencilLines x F H} → + {b : ℙ K (Module.Dual K V) // l.val ≤ LinearMap.ker b.rep} := fun H => + ⟨H.val.val, (Finset.mem_filter.mp H.property).2⟩ + have hf : Function.Injective f := by + intro H H' he + apply Subtype.ext + apply Subtype.ext + exact congrArg (fun b : {b : ℙ K (Module.Dual K V) // l.val ≤ LinearMap.ker b.rep} => b.val) he + have hc := Nat.card_le_card_of_injective f hf + rw [RadialLine.card_hyperplanes l, Nat.card_eq_fintype_card] at hc + simpa only [Fintype.card_subtype] using hc + +lemma two_anchor_count (F : Finset (ℙ K (Module.Dual K V))) + (l m : RadialLine x) (hlm : l ≠ m) : + (Finset.univ.filter (fun H : F => l ∈ pencilLines x F H ∧ m ∈ pencilLines x F H)).card ≤ + ∑ i ∈ Finset.range (finrank K V-3), Nat.card K^i := by + let : Finite (Module.Dual K V) := Module.finite_of_finite K + let f : {H : F // l ∈ pencilLines x F H ∧ m ∈ pencilLines x F H} → + {b : ℙ K (Module.Dual K V) // l.val ≤ LinearMap.ker b.rep ∧ m.val ≤ LinearMap.ker b.rep} := + fun H => ⟨H.val.val, (Finset.mem_filter.mp H.property.1).2, + (Finset.mem_filter.mp H.property.2).2⟩ + have hf : Function.Injective f := by + intro H H' he + exact Subtype.ext (Subtype.ext (congrArg (fun b : {b : ℙ K (Module.Dual K V) // l.val ≤ LinearMap.ker b.rep ∧ m.val ≤ LinearMap.ker b.rep} => b.val) he)) + have hc := Nat.card_le_card_of_injective f hf + rw [RadialLine.card_hyperplanes_pair hlm, Nat.card_eq_fintype_card] at hc + simpa only [Fintype.card_subtype] using hc + +omit [Fintype (RadialLine x)] in +lemma pencil_size (F : Finset (ℙ K (Module.Dual K V))) (hF : ∀ H ∈ F, Incident x H) : + F.card ≤ ∑ i ∈ Finset.range (finrank K V-1), Nat.card K^i := by + let : Finite (Module.Dual K V) := Module.finite_of_finite K + let f : F → {b : ℙ K (Module.Dual K V) // Incident x b} := fun H => ⟨H.val,hF H.val H.property⟩ + have hf : Function.Injective f := by + intro H H' he + exact Subtype.ext (congrArg (fun b : {b : ℙ K (Module.Dual K V) // Incident x b} => b.val) he) + have hc := Nat.card_le_card_of_injective f hf + simpa only [card_hyperplanes_through_point, Nat.card_eq_fintype_card, Fintype.card_coe] using hc + +end +open Module ProjectiveIncidence +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] [FiniteDimensional K V] + +lemma submodule_eq_ker_annihilator (b : ℙ K (Module.Dual K V)) : + b.submodule = (LinearMap.ker b.rep).dualAnnihilator := by + have hle : b.submodule ≤ (LinearMap.ker b.rep).dualAnnihilator := by + rw [Projectivization.submodule_eq,Submodule.span_singleton_le_iff_mem,Submodule.mem_dualAnnihilator] + intro v hv + exact hv + apply Submodule.eq_of_le_of_finrank_eq hle + have hd := Subspace.finrank_add_finrank_dualAnnihilator_eq (LinearMap.ker b.rep) + have hk := Module.Dual.finrank_ker_add_one_of_ne_zero b.rep_nonzero + rw [Projectivization.finrank_submodule] + omega + +lemma kernel_injective : Function.Injective (fun b : ℙ K (Module.Dual K V) => LinearMap.ker b.rep) := by + intro b c h + apply Projectivization.submodule_injective + simp only [submodule_eq_ker_annihilator,h] + +variable (x : ℙ K V) [Fintype (RadialLine x)] + +lemma mass_pairPoints (X : Finset {y : ℙ K V // x ≠ y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Module.Dual K V))) (hF : ∀ H ∈ F, Incident x H) (H H' : F) : + PoissonScore.mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H') = + (δ:ℝ)*(ActualOverlap.pairPoints x X (LinearMap.ker H.val.rep) + (LinearMap.ker H'.val.rep)).card := by + rw [mass_overlap x X δ F hF] + simp only [ActualOverlap.pairPoints, NondominantOverlap.onPlane, Incident, le_inf_iff] + rfl + +lemma distinctPairs_ext {H : Type*} {p q : WeightedPrograms.DistinctPairs H} + (h₁ : p.1=q.1) (h₂ : p.2.val=q.2.val) : p=q := by + rcases p with ⟨p,p',hp⟩ + rcases q with ⟨q,q',hq⟩ + cases h₁ + cases h₂ + rfl + +lemma pair_strength_count_le (X : Finset {y : ℙ K V // x ≠ y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Module.Dual K V))) (hF : ∀ H ∈ F, Incident x H) (a : ℝ) : + (Finset.univ.filter (fun p : WeightedPrograms.DistinctPairs F => + a ≤ WeightedPrograms.strength (pencilLines x F) (radialWeight x X δ) p)).card ≤ + (WeightedOverlap.pairs x X (F.image fun b => LinearMap.ker b.rep) δ a).card := by + let E := Finset.univ.filter (fun p : WeightedPrograms.DistinctPairs F => + a ≤ WeightedPrograms.strength (pencilLines x F) (radialWeight x X δ) p) + let G := WeightedOverlap.pairs x X (F.image fun b => LinearMap.ker b.rep) δ a + let f (p : E) : G := ⟨(LinearMap.ker p.val.1.val.rep,LinearMap.ker p.val.2.val.val.rep),by + apply Finset.mem_filter.mpr + refine ⟨Finset.mem_product.mpr ⟨Finset.mem_image.mpr ⟨_,p.val.1.property,rfl⟩, + Finset.mem_image.mpr ⟨_,p.val.2.val.property,rfl⟩⟩,?_,?_⟩ + · intro h + exact p.val.2.property (Subtype.ext (kernel_injective h).symm) + · have hp := (Finset.mem_filter.mp p.property).2 + change a ≤ PoissonScore.mass (radialWeight x X δ) + (pencilLines x F p.val.1 ∩ pencilLines x F p.val.2.val) at hp + rwa [mass_pairPoints x X δ F hF] at hp⟩ + have hi : Function.Injective f := by + intro p q he + apply Subtype.ext + apply distinctPairs_ext + · apply Subtype.ext + apply kernel_injective + exact congrArg (fun z : G => z.val.1) he + · apply Subtype.ext + apply kernel_injective + exact congrArg (fun z : G => z.val.2) he + simpa only [Fintype.card_coe] using Fintype.card_le_of_injective f hi + +variable [Finite K] + +theorem score_pair_count_four (hdim : finrank K V = 5) + (X : Finset {y : ℙ K V // x ≠ y}) (δ : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Module.Dual K V))) (hF : ∀ H ∈ F, Incident x H) + (a : ℝ) (ha : 0≤a) : + ((Finset.univ.filter (fun p : WeightedPrograms.DistinctPairs F => + a ≤ WeightedPrograms.strength (pencilLines x F) (radialWeight x X δ) p)).card:ℝ)*a^2 ≤ + (ActualOverlap.richRadials x X ⊤ ⌈a/(2*(δ:ℝ))⌉₊).card * + ((Nat.card K:ℝ)^2+Nat.card K+1)^2*a^2 + + 2*(δ:ℝ)^2*X.card^2*((Nat.card K:ℝ)+1)^2 := by + let G := F.image fun b => LinearMap.ker b.rep + have hdimG (A : Submodule K V) (hA : A ∈ G) : finrank K A = 4 := by + obtain ⟨b,_,rfl⟩ := Finset.mem_image.mp hA + have hh := Module.Dual.finrank_ker_add_one_of_ne_zero b.rep_nonzero + omega + have hxG (A : Submodule K V) (hA : A ∈ G) : x.submodule ≤ A := by + obtain ⟨b,hb,rfl⟩ := Finset.mem_image.mp hA + exact hF b hb + have hc : ((Finset.univ.filter (fun p : WeightedPrograms.DistinctPairs F => + a ≤ WeightedPrograms.strength (pencilLines x F) (radialWeight x X δ) p)).card:ℝ) ≤ + (WeightedOverlap.pairs x X G δ a).card := by + exact_mod_cast pair_strength_count_le x X δ F hF a + exact (mul_le_mul_of_nonneg_right hc (sq_nonneg a)).trans + (WeightedOverlap.pair_count_four x hdim X G hdimG hxG (by exact_mod_cast hδ) ha) + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/OutsideCard.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/OutsideCard.lean new file mode 100644 index 0000000000000000000000000000000000000000..7c5cf67c5860901ce7483adbaee043b71f8842d6 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/OutsideCard.lean @@ -0,0 +1,89 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.LocalLines +import OAI.Combinatorics.RamseyFive.Geometry.MomentPolynomialTail +import OAI.Combinatorics.RamseyFive.Probability.PencilFactor +import OAI.Combinatorics.RamseyFive.Iteration.ScaleAgainstB + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GlobalRadial PoissonScore WeightedPrograms +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] [FiniteDimensional K V] + [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +omit [FiniteDimensional K V] [Finite K] [Fintype (RadialLine x)] in +lemma outsideAt_card_le (S O : Finset (ℙ K V)) : (outsideAt x S O).card ≤ S.card := by + unfold outsideAt + rw [Finset.card_subtype] + exact (Finset.card_filter_le _ _).trans (Finset.card_le_card Finset.sdiff_subset) + +theorem score_pair_low_normalized (hdim : finrank K V=5) + (S : Finset (ℙ K V)) (O : ℙ K V → Finset (ℙ K V)) (δ : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) + (n a χ : ℝ) (hn : 0 a ≤ + strength (pencilLines x F) (radialWeight x (outsideAt x S (O x)) δ) p).card:ℝ)*a^200 ≤ + ((Nat.card K:ℝ)^4/n)^2*Real.exp (2*χ) := by + have hq : (1:ℝ) ≤ Nat.card K := by + exact_mod_cast Nat.succ_le_iff.mpr (Nat.card_pos : 0 a ≤ + strength (pencilLines x F) (radialWeight x (outsideAt x S (O x)) δ) p).card:ℝ)*a^200 ≤ + ((Nat.card K:ℝ)^4/n)^2*Real.exp (2*χ) := by + have hq : (1:ℝ) ≤ Nat.card K := by + exact_mod_cast Nat.succ_le_iff.mpr (Nat.card_pos : 0 y.submodule ≤ A ⊓ B).card := by + change (((outsideAt x S O).filter fun y => y.val.submodule ≤ A ⊓ B)).card ≤ _ + rw [outsideAt_filter_card] + apply Finset.card_le_card + intro y hy + obtain ⟨hy,hAB⟩ := Finset.mem_filter.mp hy + obtain ⟨hyS,hyO⟩ := Finset.mem_sdiff.mp hy + exact Finset.mem_filter.mpr ⟨Finset.mem_sdiff.mpr + ⟨hST hyS,fun ho => hyO (Finset.mem_union_left _ ho)⟩,hAB⟩ + +lemma score_pairs_le_captured {I : Type*} [LinearOrder I] + (F : Finset I) (hF : F.Nonempty) (P : I → Submodule K V) (X S : Finset (ℙ K V)) + (J M : ℕ) (hS : S ⊆ X \ remaining F hF (fun i => flatPoints (P i)) X J) + (δ : ℝ≥0) (hδ : 0<δ) (G : Finset (ℙ K (Dual K V))) (hG : ∀ H∈G,Incident x H) + (a : ℝ) (hscale : (δ:ℝ)*(2*M) ≤ a) : + (Finset.univ.filter (fun p : WeightedPrograms.DistinctPairs G => a ≤ + WeightedPrograms.strength (pencilLines x G) + (radialWeight x (outsideAt x S + (ownCell F hF (fun i => flatPoints (P i)) X J x)) δ) p)).card ≤ + (capturedPairs F hF P X (G.image fun b => LinearMap.ker b.rep) J M x).card := by + apply (pair_strength_count_le x _ δ G hG a).trans + apply Finset.card_le_card + intro p hp + obtain ⟨hp,hne,hmass⟩ := Finset.mem_filter.mp hp + apply Finset.mem_filter.mpr + refine ⟨hp,hne,?_⟩ + have hcard := outside_pair_card_le x S + (X \ remaining F hF (fun i => flatPoints (P i)) X J) + (ownCell F hF (fun i => flatPoints (P i)) X J x) hS p.1 p.2 + have hδ' : (0:ℝ)<δ := by exact_mod_cast hδ + have hM : (2*(M:ℝ)) ≤ + (ActualOverlap.pairPoints x (outsideAt x S + (ownCell F hF (fun i => flatPoints (P i)) X J x)) p.1 p.2).card := by + apply (mul_le_mul_iff_right₀ hδ').mp + exact hscale.trans hmass + exact (by exact_mod_cast hM : 2*M ≤ _).trans hcard + +theorem score_high_captured_pairs (hdim : finrank K V=5) + {I : Type*} [LinearOrder I] (F : Finset I) (hF : F.Nonempty) + (P : I → Submodule K V) (X S : Finset (ℙ K V)) + (J : ℕ) (hS : S ⊆ X \ remaining F hF (fun i => flatPoints (P i)) X J) + (δ : ℝ≥0) (hδ : 0<δ) (G : Finset (ℙ K (Dual K V))) (hG : ∀ H∈G,Incident x H) + (L : Finset (Submodule K V)) (hL : ∀ A∈L,finrank K A=3) + (hcomplete : ∀ A : Submodule K V,finrank K A=3 → A∈L) + (a b χ : ℝ) (Y : Finset (ℙ K V)) (hxY : x∈Y) + (hn : 0 a ≤ + WeightedPrograms.strength (pencilLines x G) + (radialWeight x (outsideAt x S + (ownCell F hF (fun i => flatPoints (P i)) X J x)) δ) p)).card ≤ + 2*HighParameters.degree (Nat.card K) X.card b χ*(Nat.card K+1)^2 := by + apply (score_pairs_le_captured x F hF P X S J _ hS δ hδ G hG a hscale).trans + apply high_pairs F hF P X hdim _ _ L hL hcomplete J b χ Y x hxY _ hn hb hb2 hhigh hx + · intro A hA + obtain ⟨H,_,rfl⟩ := Finset.mem_image.mp hA + have hk := Module.Dual.finrank_ker_add_one_of_ne_zero H.rep_nonzero + omega + · intro A hA + obtain ⟨H,hH,rfl⟩ := Finset.mem_image.mp hA + exact hG H hH + +omit [Finite K] in + +lemma score_pairs_le_residual (X S O : Finset (ℙ K V)) (hS : S ⊆ X) + (M : ℕ) (δ : ℝ≥0) (hδ : 0<δ) (G : Finset (ℙ K (Dual K V))) + (hG : ∀ H∈G,Incident x H) (a : ℝ) (hscale : (δ:ℝ)*M ≤ a) : + (Finset.univ.filter (fun p : WeightedPrograms.DistinctPairs G => a ≤ + WeightedPrograms.strength (pencilLines x G) + (radialWeight x (outsideAt x S O) δ) p)).card ≤ + (residualPairs (G.image fun b => LinearMap.ker b.rep) X M).card := by + apply (pair_strength_count_le x _ δ G hG a).trans + apply Finset.card_le_card + intro p hp + obtain ⟨hp,hne,hmass⟩ := Finset.mem_filter.mp hp + apply Finset.mem_filter.mpr + refine ⟨hp,hne,?_⟩ + have hc := (outside_pair_card_le x S X O hS p.1 p.2).trans + (Finset.card_le_card (Finset.filter_subset_filter _ (Finset.sdiff_subset))) + have hδ' : (0:ℝ)<δ := by exact_mod_cast hδ + have hM : (M:ℝ) ≤ (ActualOverlap.pairPoints x (outsideAt x S O) p.1 p.2).card := by + apply (mul_le_mul_iff_right₀ hδ').mp + exact hscale.trans hmass + exact (by exact_mod_cast hM : M ≤ _).trans hc + +end + +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining HighPlaneBudget PoissonScore WeightedPrograms +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] [FiniteDimensional K V] + [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +omit [Finite K] in +lemma pair_tail_training_mono (S T : Finset {y : ℙ K V // x≠y}) (hST : S ⊆ T) + (δ : ℝ≥0) (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) (a : ℝ) : + (Finset.univ.filter fun p : DistinctPairs F => a ≤ strength (pencilLines x F) (radialWeight x S δ) p).card ≤ + (Finset.univ.filter fun p : DistinctPairs F => a ≤ strength (pencilLines x F) (radialWeight x T δ) p).card := by + apply Finset.card_le_card + intro p hp + refine Finset.mem_filter.mpr ⟨Finset.mem_univ _,(Finset.mem_filter.mp hp).2.trans ?_⟩ + change mass (radialWeight x S δ) (pencilLines x F p.1 ∩ pencilLines x F p.2.val) ≤ + mass (radialWeight x T δ) (pencilLines x F p.1 ∩ pencilLines x F p.2.val) + rw [mass_overlap x S δ F hF,mass_overlap x T δ F hF] + apply mul_le_mul_of_nonneg_left _ δ.coe_nonneg + exact_mod_cast Finset.card_le_card (Finset.filter_subset_filter _ hST) + +omit [FiniteDimensional K V] [Finite K] [Fintype (RadialLine x)] in +lemma outsideAt_antitone (S O T : Finset (ℙ K V)) (hOT : O ⊆ T) : + outsideAt x S T ⊆ outsideAt x S O := by + intro y hy + simp only [outsideAt,Finset.mem_subtype,Finset.mem_sdiff] at hy ⊢ + exact ⟨hy.1,fun h => hy.2 (hOT h)⟩ + +theorem score_high_captured_pairs_of_le (hdim : finrank K V=5) + {I : Type} [LinearOrder I] (F : Finset I) (hF : F.Nonempty) + (P : I → Submodule K V) (X S O : Finset (ℙ K V)) + (J : ℕ) (hS : S ⊆ X \ remaining F hF (fun i => flatPoints (P i)) X J) + (hO : ownCell F hF (fun i => flatPoints (P i)) X J x ⊆ O) + (δ : ℝ≥0) (hδ : 0 < δ) (G : Finset (ℙ K (Dual K V))) (hG : ∀ H∈G,Incident x H) + (L : Finset (Submodule K V)) (hL : ∀ A∈L,finrank K A=3) + (hcomplete : ∀ A : Submodule K V,finrank K A=3 → A∈L) + (a b χ : ℝ) (Y : Finset (ℙ K V)) (hxY : x∈Y) + (hn : 0 < X.card) (hb : 0 < b) (hb2 : b ≤ 2) + (hhigh : 2097152*(Nat.card K:ℝ)^2 ≤ X.card*b^2) + (hscale : (δ:ℝ)*(2*HighParameters.threshold (Nat.card K) X.card b) ≤ a) + (hx : x∉highExceptions F hF P X L J b χ Y) : + (Finset.univ.filter (fun p : DistinctPairs G => a ≤ strength (pencilLines x G) + (radialWeight x (outsideAt x S O) δ) p)).card ≤ + 2*HighParameters.degree (Nat.card K) X.card b χ*(Nat.card K+1)^2 := + (pair_tail_training_mono x _ _ (outsideAt_antitone x S _ O hO) δ G hG a).trans + (score_high_captured_pairs x hdim F hF P X S J hS δ hδ G hG L hL hcomplete + a b χ Y hxY hn hb hb2 hhigh hscale hx) + +theorem score_high_residual_pairs (hdim : finrank K V=5) + (X S O : Finset (ℙ K V)) (hS : S ⊆ X) + (δ : ℝ≥0) (hδ : 0 < δ) (G : Finset (ℙ K (Dual K V))) (hG : ∀ H∈G,Incident x H) + (L : Finset (Submodule K V)) (hL : ∀ A∈L,finrank K A=3) + (hcomplete : ∀ A : Submodule K V,finrank K A=3 → A∈L) + (a b χ : ℝ) (Y : Finset (ℙ K V)) (hxY : x∈Y) + (hscale : (δ:ℝ)*HighParameters.threshold (Nat.card K) X.card b ≤ a) + (hx : x∉residualExceptions L X Y b χ) : + (Finset.univ.filter (fun p : DistinctPairs G => a ≤ strength (pencilLines x G) + (radialWeight x (outsideAt x S O) δ) p)).card ≤ + HighParameters.degree (Nat.card K) X.card b χ*(Nat.card K+1)^2 := by + apply (score_pairs_le_residual x X S O hS _ δ hδ G hG a hscale).trans + apply residual_pairs hdim _ _ L hL hcomplete X Y b χ x hxY _ hx + · intro A hA + obtain ⟨H,_,rfl⟩ := Finset.mem_image.mp hA + have hk := Module.Dual.finrank_ker_add_one_of_ne_zero H.rep_nonzero + omega + · intro A hA + obtain ⟨H,hH,rfl⟩ := Finset.mem_image.mp hA + exact hG H hH + +lemma high_threshold_scale (δ : ℝ≥0) (n a : ℝ) (hn : 0 < n) (ha : 0 ≤ a) + (hscale : n*(δ:ℝ) ≤ 4*Nat.card K) : + (δ:ℝ)*(2*HighParameters.threshold (Nat.card K) n a) ≤ a := by + have hq : (0:ℝ) < Nat.card K := by exact_mod_cast (Nat.card_pos : 0 < Nat.card K) + have ht := Nat.floor_le (show 0 ≤ n*a/(64*Nat.card K) by positivity) + change (HighParameters.threshold (Nat.card K) n a:ℝ) ≤ _ at ht + calc + _ ≤ (δ:ℝ)*(2*(n*a/(64*Nat.card K))) := mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_left ht (by norm_num)) δ.coe_nonneg + _ = (n*(δ:ℝ))*a/(32*Nat.card K) := by ring + _ ≤ (4*Nat.card K)*a/(32*Nat.card K) := div_le_div_of_nonneg_right + (mul_le_mul_of_nonneg_right hscale ha) (by positivity) + _ = a/8 := by field_simp; ring + _ ≤ a := by linarith + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/OverlapDyads.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/OverlapDyads.lean new file mode 100644 index 0000000000000000000000000000000000000000..a9127fbdc7a2bf27f03fe1986cf6dbb3c20bf370 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/OverlapDyads.lean @@ -0,0 +1,205 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.DegreeStrengthCount +import OAI.Combinatorics.RamseyFive.Entropy.MomentWeightedCover + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence PoissonScore WeightedPrograms DyadicMoments +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +noncomputable def overlapDyads (X : Finset {y : ℙ K V // x≠y}) : Finset ℕ := + Finset.range (Nat.clog 2 X.card+1) + +omit [Finite K] in + +lemma score_dyadic_cover (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) (hδ : 0 < δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) + (p : DistinctPairs F) (hp : 0 < strength (pencilLines x F) (radialWeight x X δ) p) : + ∃ i∈overlapDyads x X,(δ:ℝ)*2^i ≤ strength (pencilLines x F) (radialWeight x X δ) p ∧ + strength (pencilLines x F) (radialWeight x X δ) p ≤ 2*((δ:ℝ)*2^i) := by + change ∃ i∈overlapDyads x X,(δ:ℝ)*2^i ≤ mass (radialWeight x X δ) + (pencilLines x F p.1 ∩ pencilLines x F p.2.val) ∧ + mass (radialWeight x X δ) (pencilLines x F p.1 ∩ pencilLines x F p.2.val) ≤ 2*((δ:ℝ)*2^i) + rw [mass_overlap x X δ F hF] + unfold overlapDyads + apply dyadic_cover δ _ (by positivity) + · have hl:=overlap_pos_lower x X δ F hF p.1 p.2.val hp + rwa [mass_overlap x X δ F hF] at hl + · have hc : ((X.filter fun y => Incident y.val p.1.val ∧ Incident y.val p.2.val.val).card:ℝ) ≤ + (2:ℝ)^Nat.clog 2 X.card := by + exact_mod_cast (Finset.card_le_card (Finset.filter_subset _ _)).trans + (Nat.le_pow_clog (by omega : 1<2) X.card) + exact mul_le_mul_of_nonneg_left hc (by positivity) + +noncomputable def geometricPairBudget (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) (a : ℝ) : ℝ := + (ActualOverlap.richRadials x X ⊤ ⌈a/(2*(δ:ℝ))⌉₊).card * + ((Nat.card K:ℝ)^2+Nat.card K+1)^2*a^2+ + 2*(δ:ℝ)^2*X.card^2*((Nat.card K:ℝ)+1)^2 + +noncomputable def pairPowerBudget (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) (k : ℕ) : ℝ := + ∑ i∈overlapDyads x X,geometricPairBudget x X δ ((δ:ℝ)*2^i)*((δ:ℝ)*2^i)^(k-2) + +omit [FiniteDimensional K V] [Finite K] in +lemma pairPowerBudget_nonneg (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) (k : ℕ) : + 0 ≤ pairPowerBudget x X δ k := by + unfold pairPowerBudget geometricPairBudget + apply Finset.sum_nonneg + intro i _ + positivity + +theorem score_overlap_power (hdim : finrank K V=5) + (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) (hδ : 0 < δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) + (k : ℕ) (hk : 2 ≤ k) : + (∑ p : DistinctPairs F,strength (pencilLines x F) (radialWeight x X δ) p^k) ≤ + 2^k*pairPowerBudget x X δ k := by + apply moment_quadratic_tail _ (fun i : ℕ => (δ:ℝ)*2^i) + (fun i => geometricPairBudget x X δ ((δ:ℝ)*2^i)) (overlapDyads x X) k hk + (strength_nonneg _ _) (by intro i _; positivity) + (score_dyadic_cover x X δ hδ F hF) + intro i _ + exact score_pair_count_four x hdim X δ hδ F hF _ (by positivity) + +theorem score_shift_pair_budget (hdim : finrank K V=5) + (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) (hδ : 0 < δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) + (p k : ℕ) (hk : 2 ≤ k) : + (∑ A : F,∑ B : F,SingletonEnumeration.shiftKernel (radialWeight x X δ) + (pencilLines x F) p k A B) ≤ F.card+(2*(p:ℝ))^k*pairPowerBudget x X δ k := by + rw [SingletonEnumeration.sum_pairs_split_diagonal] + apply add_le_add + · have hh:=Finset.sum_le_sum (fun A (_ : A∈(Finset.univ : Finset F)) => + (SingletonEnumeration.shiftKernel_range (radialWeight x X δ) (pencilLines x F) p k A A).2) + simpa only [Finset.sum_const,Finset.card_univ,nsmul_eq_mul,mul_one,Fintype.card_coe] using hh + · calc + _ ≤ ∑ z : DistinctPairs F,((p:ℝ)*strength (pencilLines x F) (radialWeight x X δ) z)^k := + Finset.sum_le_sum (fun z _ => min_le_right _ _) + _ = (p:ℝ)^k*∑ z : DistinctPairs F,strength (pencilLines x F) (radialWeight x X δ) z^k := by + simp only [mul_pow,Finset.mul_sum] + _ ≤ (p:ℝ)^k*(2^k*pairPowerBudget x X δ k) := + mul_le_mul_of_nonneg_left (score_overlap_power x hdim X δ hδ F hF k hk) (by positivity) + _ = _ := by rw [mul_pow]; ring + +theorem score_certificate_pair_budget (hdim : finrank K V=5) + (X : Finset {y : ℙ K V // x≠y}) (δ L : ℝ≥0) (hδ : 0 < δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) + (R k : ℕ) (hk : 2 ≤ k) : + WeightedPrograms.pairMoment (B := Fin R) (pencilLines x F) + (fun l => L*radialWeight x X δ l) k ≤ + (2*(R:ℝ)*(L:ℝ))^k*pairPowerBudget x X δ k := by + have he : WeightedPrograms.pairMoment (B := Fin R) (pencilLines x F) + (fun l => L*radialWeight x X δ l) k= + ((R:ℝ)*(L:ℝ))^k*∑ z : DistinctPairs F,strength (pencilLines x F) (radialWeight x X δ) z^k := by + unfold WeightedPrograms.pairMoment + change _ = _ * ∑ z : (Σ h : F, {h' : F // h' ≠ h}), _ + rw [Fintype.sum_sigma,Finset.mul_sum] + apply Finset.sum_congr rfl + intro H _ + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro H' _ + simp only [Fintype.card_fin,NNReal.coe_mul,←Finset.mul_sum,WeightedPrograms.strength] + rw [←mul_assoc,mul_pow] + rw [he] + apply (mul_le_mul_of_nonneg_left (score_overlap_power x hdim X δ hδ F hF k hk) (by positivity)).trans_eq + rw [mul_pow,mul_pow,mul_pow] + ring + +end + +open Module ProjectiveIncidence PoissonScore WeightedPrograms DyadicMoments +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +noncomputable def offRow (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (H H' : F) : ℝ := + if H=H' then 0 else mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H') + +omit [FiniteDimensional K V] [Finite K] in +lemma offRow_nonneg (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (H H' : F) : 0 ≤ offRow x X δ F H H' := by + unfold offRow + split_ifs + · rfl + · exact mass_nonneg _ _ + +noncomputable def geometricRowBudget (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (H : F) (a : ℝ) : ℝ := + 2*mass (radialWeight x X δ) (pencilLines x F H)*((Nat.card K:ℝ)^2+Nat.card K+1)*a+ + 2*(mass (radialWeight x X δ) (pencilLines x F H))^2*((Nat.card K:ℝ)+1) + +noncomputable def rowPowerBudget (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (H : F) (k : ℕ) : ℝ := + ∑ i∈overlapDyads x X,geometricRowBudget x X δ F H ((δ:ℝ)*2^i)*((δ:ℝ)*2^i)^(k-2) + +omit [Finite K] in +lemma offRow_cover (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) (H H' : F) + (hp : 0 (δ:ℝ)*2^i) + (fun i => geometricRowBudget x X δ F H ((δ:ℝ)*2^i)) (overlapDyads x X) k hk + (offRow_nonneg x X δ F H) (by intro i _; positivity) (offRow_cover x X δ hδ F hF H) + intro i _ + have ha : 0<(δ:ℝ)*2^i := by positivity + have he : (Finset.univ.filter (fun H' : F => (δ:ℝ)*2^i ≤ offRow x X δ F H H'))= + Finset.univ.filter (fun H' : F => H≠H' ∧ (δ:ℝ)*2^i ≤ + mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H')) := by + apply Finset.filter_congr + intro H' _ + by_cases h : H=H' + · simp [offRow,h,not_le.mpr ha] + · simp [offRow,h] + rw [he] + exact score_degree_four x hdim X δ hδ F hF H _ ha.le + +theorem score_shift_row_budget (hdim : finrank K V=5) + (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) + (H : F) (p k : ℕ) (hk : 2 ≤ k) : + (∑ H',SingletonEnumeration.shiftKernel (radialWeight x X δ) (pencilLines x F) p k H' H) ≤ + 1+(2*(p:ℝ))^k*rowPowerBudget x X δ F H k := by + have hs : (∑ H' : F,if H=H' then (1:ℝ) else 0)=1 := by simp + calc + _ ≤ ∑ H' : F,((if H=H' then (1:ℝ) else 0)+((p:ℝ)*offRow x X δ F H H')^k) := by + apply Finset.sum_le_sum + intro H' _ + by_cases he : H=H' + · simp only [ite_eq_left he,offRow,mul_zero,zero_pow (by omega : k≠0),add_zero] + exact (SingletonEnumeration.shiftKernel_range _ _ p k H' H).2 + · simp only [ite_eq_right he,offRow,zero_add] + unfold SingletonEnumeration.shiftKernel + rw [Finset.inter_comm] + exact min_le_right _ _ + _ = 1+(p:ℝ)^k*(∑ H',offRow x X δ F H H'^k) := by + rw [Finset.sum_add_distrib,hs] + simp only [mul_pow,Finset.mul_sum] + _ ≤ 1+(p:ℝ)^k*(2^k*rowPowerBudget x X δ F H k) := by + exact add_le_add_right (mul_le_mul_of_nonneg_left + (score_row_power x hdim X δ hδ F hF H k hk) (pow_nonneg (Nat.cast_nonneg p) k)) 1 + _ = _ := by rw [mul_pow]; ring + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/OwnQuery.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/OwnQuery.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ab5ccae4b2d2a32279559f78da542453b20325c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/OwnQuery.lean @@ -0,0 +1,133 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.PointStrength +import OAI.Combinatorics.RamseyFive.Probability.AbsScoreTerm + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory ProbabilityTheory PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + +def ownQuery (x : ℙ K V) (S O : Finset (ℙ K V)) (y : S) : Prop := + y.val∈O ∨ x=y.val + +noncomputable def outsideEquiv (x : ℙ K V) (S O : Finset (ℙ K V)) : + {y : S // ¬ownQuery x S O y} ≃ outsideAt x S O where + toFun y := ⟨⟨y.val.val,(not_or.mp y.property).2⟩, + Finset.mem_subtype.mpr (Finset.mem_sdiff.mpr ⟨y.val.property,(not_or.mp y.property).1⟩)⟩ + invFun y := ⟨⟨y.val.val,(Finset.mem_sdiff.mp (Finset.mem_subtype.mp y.property)).1⟩, + not_or.mpr ⟨(Finset.mem_sdiff.mp (Finset.mem_subtype.mp y.property)).2,y.val.property⟩⟩ + left_inv _ := rfl + right_inv _ := rfl + +noncomputable def ownBitsMinus (x : ℙ K V) (S O : Finset (ℙ K V)) + (F : Finset (ℙ K (Dual K V))) {R : ℕ} + (u : Fin R→{y : S // ownQuery x S O y}→ℕ) (H : F) (r : Fin R) : Bool := + decide (∀ (y : S) (hy : y.val∈O),x≠y.val → Incident y.val H.val → u r ⟨y,Or.inl hy⟩=0) + +noncomputable def modifiedPointScore (x : ℙ K V) (S O : Finset (ℙ K V)) + (F : Finset (ℙ K (Dual K V))) {R : ℕ} (b : ℝ) (ω : Fin R→S→ℕ) : ℝ := + typicalScore Finset.univ + (fun H : F => Finset.univ.filter fun y : outsideAt x S O => Incident y.val.val H.val) + b (ownBitsMinus x S O F (fun r i => ω r i)) + (fun r d => ω r ((outsideEquiv x S O).symm d).val) + +variable [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + (x : ℙ K V) [Fintype (RadialLine x)] + +theorem actual_original_validation {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + {J : Type*} [Fintype J] (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) + (hS : S.Nonempty) (a b c : J) (ha : C a⊆S) (hb : C b⊆S) (hc : C c=C a∩C b) + (F : Finset (ℙ K (Dual K V))) + (hF : ∀ H∈F,Incident x H ∧ H∉exceptional S C) + (hf : ownFraction S (C a) (C b)≤2/25) + (hn : (Nat.card K:ℝ)/S.card ≤1/100) + {ξ : ℝ} (hξ : 0≤ξ) (hx : x∉irregular (d:=d) S C ξ) + (L : ℝ≥0) (hL : 1≤(L:ℝ)) (R : ℕ) (hR : 2≤R) : + (∫ ω,(modifiedPointScore x S (C a∪C b) F + (Real.exp (-(L:ℝ)*(1-ownFraction S (C a) (C b)))) ω)^2 + ∂scheduleMeasure (fun _ : S => L*pointStrength S) R) ≤ + (F.card:ℝ)*(2*Real.exp (-(L:ℝ)*(3/4)))^R+ + (2*(L:ℝ)^2*Real.exp (-(L:ℝ)*(3/4)))^R* + ((40*scale (K:=K) d S.card*Real.exp ξ)^2+ + ∑ H : F,∑ H'∈Finset.univ.erase H, + (mass (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (pencilLines x F H∩pencilLines x F H'))^R) := by + have hbase : Real.exp (-(L:ℝ)*(1-ownFraction S (C a) (C b)))∈Set.Icc 0 1 := by + refine ⟨(Real.exp_pos _).le,Real.exp_le_one_iff.mpr ?_⟩ + have hb0 : 0≤1-ownFraction S (C a) (C b) := by linarith + exact mul_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr L.coe_nonneg) hb0 + apply original_uniform_score_moment (ownQuery x S (C a∪C b)) + (outsideEquiv x S (C a∪C b)) (L*pointStrength S) Finset.univ _ hbase + (ownBitsMinus x S (C a∪C b) F) 2 + intro u + exact actual_validation_second x hdim hd S C hS a b c ha hb hc F hF hf hn hξ hx L hL R hR _ + +end + +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory ProbabilityTheory PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + +noncomputable def pointScore (S O : Finset (ℙ K V)) + (F : Finset (ℙ K (Dual K V))) {R : ℕ} (b : ℝ) (ω : Fin R→S→ℕ) : ℝ := + ∑ H : F, ∏ r, (if (∀ y : S,y.val∈O → Incident y.val H.val → ω r y=0) then 1 else 0)* + ((if (∀ y : S,y.val∉O → Incident y.val H.val → ω r y=0) then 1 else 0)-b) + +def Unsampled (x : ℙ K V) (S : Finset (ℙ K V)) {R : ℕ} (ω : Fin R→S→ℕ) : Prop := + ∀r y,x=y.val → ω r y=0 + +omit [Finite K] [FiniteDimensional K V] in +theorem modifiedPointScore_eq (x : ℙ K V) (S O : Finset (ℙ K V)) + (F : Finset (ℙ K (Dual K V))) {R : ℕ} (b : ℝ) (ω : Fin R→S→ℕ) + (hω : Unsampled x S ω) : modifiedPointScore x S O F b ω=pointScore S O F b ω := by + unfold modifiedPointScore typicalScore pointScore + apply Finset.sum_congr rfl + intro H hH + unfold scoreTerm + apply Finset.prod_congr rfl + intro r hr + have ho : (∀ (y : S) (hy : y.val∈O),x≠y.val → Incident y.val H.val → ω r y=0) ↔ + (∀ y : S,y.val∈O → Incident y.val H.val → ω r y=0) := by + constructor + · intro h y hy hI + by_cases hx : x=y.val + · exact hω r y hx + · exact h y hy hx hI + · intro h y hy _ hI + exact h y hy hI + have he : (fun d : outsideAt x S O => ω r ((outsideEquiv x S O).symm d).val) ∈ + emptyEvent (Finset.univ.filter fun y : outsideAt x S O => Incident y.val.val H.val) ↔ + (∀ y : S,y.val∉O → Incident y.val H.val → ω r y=0) := by + constructor + · intro h y hy hI + by_cases hx : x=y.val + · exact hω r y hx + · let z : {y : S // ¬ownQuery x S O y} := ⟨y,not_or.mpr ⟨hy,hx⟩⟩ + have hz : (outsideEquiv x S O z)∈Finset.univ.filter + (fun y : outsideAt x S O => Incident y.val.val H.val) := by + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,hI⟩ + have hh := h (outsideEquiv x S O z) hz + simpa only [Equiv.symm_apply_apply,Set.mem_singleton_iff] using hh + · intro h y hy + apply h ((outsideEquiv x S O).symm y).val + · exact (not_or.mp ((outsideEquiv x S O).symm y).property).1 + · exact (Finset.mem_filter.mp hy).2 + change (if decide (∀ (y : S) (hy : y.val∈O),x≠y.val → Incident y.val H.val → ω r y=0) + then _ else 0)=_ + simp only [ho,decide_eq_true_eq,centeredFactor,emptyIndicator,Set.indicator_apply,he] + split_ifs <;> ring + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/Peeling.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/Peeling.lean new file mode 100644 index 0000000000000000000000000000000000000000..edc2978c3113323f5201bfb31b5b8b32fd7c82fb --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/Peeling.lean @@ -0,0 +1,189 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.Training +import OAI.Combinatorics.RamseyFive.Geometry.PeelingGeometry + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] [∀x : ℙ K V,Fintype (RadialLine x)] + +lemma radialExceptions_low_density (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ : ℝ≥0) (hδ : 0<δ) (Lines : Finset (Submodule K V)) + (hLines : ∀l∈Lines,finrank K l=2) (Q : Finset (ℙ K V)) + (q n g χ : ℝ) (hq : 0 flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0)) + (hquarter : Real.exp (3*σ/2+g)/4≤S.card) + (O : ℙ K (I→K)→Finset (ℙ K (I→K))) + (hO : ∀x,ownCell F hF (fun j => flatPoints (Flat j)) X + (peelLength (b flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0)) x⊆O x) + (δ : ℝ≥0) (hδ : (δ:ℝ)=(q:ℝ)/S.card) + (Lines : Finset (Submodule K (I→K))) (hLines : ∀l∈Lines,finrank K l=2) + (Q : Finset (ℙ K (I→K))) : + ((radialExceptions S (fun x => S∩O x) δ Lines Q q (Real.exp (3*σ/2+g)) χ).card:ℝ)≤ + Real.exp (3*σ/2+g)*(2664192*((Nat.clog 2 S.card:ℝ)+1)*Real.exp (-χ)) := by + rw [radialExceptions_clip] + have hq0 : (0:ℝ) flatPoints (Flat j)) X _ _ + have hSn : (S.card:ℝ)≤Real.exp (3*σ/2+g) := (Nat.cast_le.mpr (Finset.card_le_card hsub)).trans hX + have hmass : (δ:ℝ)*S.card=(q:ℝ) := by rw [hδ];exact div_mul_cancel₀ _ (ne_of_gt hn0) + have hscale : Real.exp (3*σ/2+g)*(δ:ℝ)≤4*q := by + rw [hδ,←mul_div_assoc] + apply (div_le_iff₀ hn0).mpr + nlinarith only [hquarter,hq0] + have hsq : (Real.exp (3*σ/2+g))^2=(q:ℝ)^3*Real.exp (2*g) := by + rw [←hσq,←Real.exp_nat_mul,←Real.exp_nat_mul,←Real.exp_add] + congr 1;norm_num;ring + by_cases hen : b flatPoints (Flat j)) X t ht0 with hcap|⟨hJ,hres⟩ + · have hc : S⊆X\remaining F hF (fun j => flatPoints (Flat j)) X + (peelLength (b flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0)) := by + rw [hS,hcap] + have hjt := peel_length_real (b flatPoints (Flat j)) X t ht0 + have hjq : (peelLength (b flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0):ℝ)*(Nat.card K:ℝ)≤X.card := by + rw [hcard] + exact (mul_le_mul_of_nonneg_left htq (Nat.cast_nonneg _)).trans hjt + have hcut := ScoreScalars.plane_list_cutoff (n:=Real.exp (3*σ/2+g)) (q:=(q:ℝ)) + rfl hσq.symm htE (by linarith only [hg]) hghi δ.coe_nonneg (Nat.cast_nonneg _) + (hjt.trans hX) hscale + have hbound := captured_radial_exception_bound F hF Flat X S hFlat _ hc hjq O hO δ hδ0 + (Real.exp (3*σ/2+g)) g χ (Real.exp_pos _) hX (by simpa only [hcard] using hsq) + (by linarith only [hg]) (by linarith only [hχb,hb]) (by simpa only [hcard] using hmass.le) + (by simpa only [hcard] using hscale) hcut Lines hLines Q + rw [hcard] at hbound + apply hbound.trans + gcongr + norm_num + · apply residual_radial_exception_bound hq hcard hI σ g S.card χ hσq hσ hg hghi hquarter S S + (Finset.Subset.refl _) (le_refl _) hSn O δ hδ (by linarith only [hχb,hb]) _ Lines hLines Q + intro U hU + obtain ⟨j,hj,hjU⟩ := hcover U hU + have hh := hres j hj + rw [←hS,ht] at hh + have he : (S.filter fun y => y.submodule≤U)=S∩flatPoints (Flat j) := by + ext y + simp only [Finset.mem_filter,Finset.mem_inter,mem_flatPoints,hjU] + rw [he] + exact hh.le + · rw [radialExceptions_low_density S O δ hδ0 Lines hLines Q q (Real.exp (3*σ/2+g)) g χ + hq0 (Real.exp_pos _) hsq (by linarith only [hχb,le_of_not_gt hen]) hmass.le] + simp only [Finset.card_empty,Nat.cast_zero] + positivity + +end +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining HighPlaneBudget +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + +noncomputable def residualPlaneExceptions (Planes : Finset (Submodule K V)) + (X S Q : Finset (ℙ K V)) (δ : ℝ≥0) (χ : ℝ) : Finset (ℙ K V) := + (strengthDyads S.card δ).biUnion fun i => + if (Nat.card K:ℝ)^2<(X.card:ℝ)*((δ:ℝ)*2^i)^99 + then residualExceptions Planes X Q ((δ:ℝ)*2^i) χ else ∅ + +omit [FiniteDimensional K V] [Finite K] in +lemma off_residualPlaneExceptions (Planes : Finset (Submodule K V)) + (X S Q : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) (δ : ℝ≥0) (χ : ℝ) + (x : ℙ K V) [Fintype (RadialLine x)] + (hx : x∉residualPlaneExceptions Planes X S Q δ χ) : + ∀i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + (Nat.card K:ℝ)^2<(X.card:ℝ)*((δ:ℝ)*2^i)^99 → + x∉residualExceptions Planes X Q ((δ:ℝ)*2^i) χ := by + intro i hi hlarge hh + apply hx + exact Finset.mem_biUnion.mpr ⟨i,boundedOverlapDyads_subset x S (O x) δ hi,by simpa only [ite_eq_left hlarge] using hh⟩ + +theorem residualPlaneExceptions_card (Planes : Finset (Submodule K V)) + (hPlanes : ∀A∈Planes,finrank K A=3) (X S Q : Finset (ℙ K V)) + (δ : ℝ≥0) (hδ : 0<δ) (χ : ℝ) (hχ : 0≤χ) + (hori : (X.card:ℝ)^2≤100*(Nat.card K:ℝ)^5) + (hhigh : 8388608*(Nat.card K:ℝ)^2≤X.card) + (hcap : ∀H : Submodule K V,finrank K H=4 → + (X.filter fun x => x.submodule≤H).card≤(Nat.card K)^2) : + ((residualPlaneExceptions Planes X S Q δ χ).card:ℝ)≤ + X.card*((Nat.clog 2 S.card:ℝ)+1)*(36864*Real.exp (-χ)) := by + have hq0 : (0:ℝ) if (Nat.card K:ℝ)^2<(X.card:ℝ)*((δ:ℝ)*2^i)^99 + then residualExceptions Planes X Q ((δ:ℝ)*2^i) χ else ∅) + (e:=X.card*(36864*Real.exp (-χ))) (by + intro i hi + split_ifs with hlarge + · have ha : 0<(δ:ℝ)*2^i := by positivity + have ha2 := (Finset.mem_filter.mp hi).2 + have hbudget := (ScoreScalars.high_or_small hq0.le hn ha.le hhigh).resolve_right (not_le_of_gt hlarge) + have hcap' : ∀H : Submodule K V,finrank K H=4 → + (X.filter fun x => x.submodule≤H).card≤HighParameters.cap (Nat.card K) ((δ:ℝ)*2^i) := by + intro H hH + apply (hcap H hH).trans + apply Nat.cast_le.mp (le_trans (b:=1024*(Nat.card K:ℝ)^2/((δ:ℝ)*2^i)) ?_ (Nat.le_ceil _)) + push_cast + apply (le_div_iff₀ ha).mpr + have hh := mul_le_mul_of_nonneg_left ha2 (sq_nonneg (Nat.card K:ℝ)) + nlinarith only [hh,sq_nonneg (Nat.card K:ℝ)] + have hc := residual_exceptions_card Planes hPlanes X Q ((δ:ℝ)*2^i) χ + (by exact_mod_cast hn) ha ha2 hori hbudget hχ hcap' + apply hc.trans + calc + _ ≤ 36864*(X.card:ℝ)*Real.exp (-χ) := mul_le_mul + (mul_le_mul_of_nonneg_left hq2 (by norm_num)) + (Real.exp_le_exp.mpr (by linarith only [hχ])) (Real.exp_nonneg _) (by positivity) + _ = _ := by ring + · simp only [Finset.card_empty,Nat.cast_zero] + positivity) + apply hh.trans + have hc : ((strengthDyads S.card δ).card:ℝ)≤(Nat.clog 2 S.card:ℝ)+1 := by + exact_mod_cast strengthDyads_card S.card δ + calc + _ ≤ ((Nat.clog 2 S.card:ℝ)+1)*(X.card*(36864*Real.exp (-χ))) := + mul_le_mul_of_nonneg_right hc (by positivity) + _ = _ := by ring + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/PeelingGeometry.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/PeelingGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..afae59fb3986ef873ed793cb3536273cfe17576b --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/PeelingGeometry.lean @@ -0,0 +1,245 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.HighExceptions +import OAI.Combinatorics.RamseyFive.Probability.HighOrSmall +import OAI.Combinatorics.RamseyFive.Geometry.RadialAlternatives + +namespace OAI + +namespace SharpRamseyFive.ScoreScalars + +lemma plane_threshold_exp {σ g n q : ℝ} (hn : n=Real.exp (3*σ/2+g)) + (hq : q=Real.exp σ) : + n^(4/3:ℝ)/q*Real.exp (-g/5)=Real.exp (σ+17*g/15) := by + rw [hn,hq,←Real.exp_mul,←Real.exp_sub,←Real.exp_add] + congr 1 + ring + +lemma plane_list_cutoff {σ g n q δ k j : ℝ} + (hn : n=Real.exp (3*σ/2+g)) (hq : q=Real.exp σ) + (hk : k=Real.exp (σ+17*g/15)) (hg : 100≤g) (hghi : g≤2*σ) + (hδ : 0≤δ) (_hj : 0≤j) (hlen : j*k≤n) (hscale : n*δ≤4*q) : + 8*δ*(j+1)≤Real.exp (-g/20) := by + have hn0 : 0 S∩O x) δ a A=richCenters S O δ a A := by + simp only [richCenters,sdiff_union_clip] + +lemma localLines_clip (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ a : ℝ) (Lines : Finset (Submodule K V)) (x : ℙ K V) : + localLines S (fun x => S∩O x) δ a Lines x=localLines S O δ a Lines x := by + simp only [localLines,richCenters_clip] + +lemma badCenters_clip (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ a : ℝ) (Lines : Finset (Submodule K V)) (Q : Finset (ℙ K V)) (D : ℝ) : + badCenters S (fun x => S∩O x) δ a Lines Q D=badCenters S O δ a Lines Q D := by + simp only [badCenters,localLines_clip] + +lemma radialExceptions_clip (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ : ℝ≥0) (Lines : Finset (Submodule K V)) (Q : Finset (ℙ K V)) (q n χ : ℝ) : + radialExceptions S (fun x => S∩O x) δ Lines Q q n χ=radialExceptions S O δ Lines Q q n χ := by + simp only [radialExceptions,badCenters_clip] + +lemma badCenters_threshold_mono (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ a : ℝ) (Lines : Finset (Submodule K V)) (Q : Finset (ℙ K V)) {D E : ℝ} (hDE : D≤E) : + badCenters S O δ a Lines Q E⊆badCenters S O δ a Lines Q D := by + intro x hx + obtain ⟨hx,he⟩ := Finset.mem_filter.mp hx + exact Finset.mem_filter.mpr ⟨hx,hDE.trans he⟩ + +lemma radialExceptions_normalization (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ : ℝ≥0) (Lines : Finset (Submodule K V)) (Q : Finset (ℙ K V)) + (q χ m n : ℝ) (hm : 0 < m) (hmn : m ≤ n) : + radialExceptions S O δ Lines Q q m χ⊆radialExceptions S O δ Lines Q q n χ := by + intro x hx + obtain ⟨i,hi,hx⟩ := Finset.mem_biUnion.mp hx + apply Finset.mem_biUnion.mpr + refine ⟨i,hi,badCenters_threshold_mono S O δ _ Lines Q ?_ hx⟩ + apply div_le_div_of_nonneg_right _ (by positivity) + apply mul_le_mul_of_nonneg_right _ (Real.exp_nonneg _) + exact div_le_div_of_nonneg_left (by positivity) (sq_pos_of_pos hm) ((sq_le_sq₀ hm.le (hm.le.trans hmn)).mpr hmn) + +end SharpRamseyFive.ScoreGeometry +namespace SharpRamseyFive.ScoreScalars +open scoped Topology +open Filter + +lemma nonsmall_strength {q n a g : ℝ} (hq : 0 first | rfl | ring + +end SharpRamseyFive.ScoreScalars +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining HighPlaneBudget +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + {I : Type} [LinearOrder I] + +noncomputable def highPlaneExceptions (F : Finset I) (hF : F.Nonempty) + (Flat : I→Submodule K V) (X S : Finset (ℙ K V)) (Planes : Finset (Submodule K V)) + (j : ℕ) (δ : ℝ≥0) (χ : ℝ) (Q : Finset (ℙ K V)) : Finset (ℙ K V) := + (strengthDyads S.card δ).biUnion fun i => + if (Nat.card K:ℝ)^2<(X.card:ℝ)*((δ:ℝ)*2^i)^99 + then highExceptions F hF Flat X Planes j ((δ:ℝ)*2^i) χ Q else ∅ + +lemma off_highPlaneExceptions (F : Finset I) (hF : F.Nonempty) + (Flat : I→Submodule K V) (X S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (Planes : Finset (Submodule K V)) (j : ℕ) (δ : ℝ≥0) (χ : ℝ) (Q : Finset (ℙ K V)) + (x : ℙ K V) (hx : x∉highPlaneExceptions F hF Flat X S Planes j δ χ Q) : + ∀i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + (Nat.card K:ℝ)^2<(X.card:ℝ)*((δ:ℝ)*2^i)^99 → + x∉highExceptions F hF Flat X Planes j ((δ:ℝ)*2^i) χ Q := by + intro i hi hlarge hh + apply hx + exact Finset.mem_biUnion.mpr ⟨i,boundedOverlapDyads_subset x S (O x) δ hi,by simpa only [ite_eq_left hlarge] using hh⟩ + +theorem highPlaneExceptions_card (F : Finset I) (hF : F.Nonempty) + (Flat : I→Submodule K V) (X S : Finset (ℙ K V)) + (hFlat : ∀i∈F,finrank K (Flat i)=4) + (hcover : ∀A : Submodule K V,finrank K A=4 → ∃i∈F,Flat i=A) + (Planes : Finset (Submodule K V)) (hPlanes : ∀A∈Planes,finrank K A=3) + (j : ℕ) (δ : ℝ≥0) (hδ : 0<δ) (χ g : ℝ) (hg : 0≤g) (hχ : 0≤χ) + (hn : (X.card:ℝ)=(Nat.card K:ℝ)^2*Real.exp g) + (hcap : (X.card:ℝ)≤(Nat.card K:ℝ)^3) + (hori : (X.card:ℝ)^2≤100*(Nat.card K:ℝ)^5) + (hhigh : 8388608*(Nat.card K:ℝ)^2≤X.card) (Q : Finset (ℙ K V)) : + ((highPlaneExceptions F hF Flat X S Planes j δ χ Q).card:ℝ)≤ + X.card*((Nat.clog 2 S.card:ℝ)+1)* + (3145728*Real.exp (-(4/5:ℝ)*g)+36872*Real.exp (-χ)) := by + have hq : (0:ℝ) if (Nat.card K:ℝ)^2<(X.card:ℝ)*((δ:ℝ)*2^i)^99 + then highExceptions F hF Flat X Planes j ((δ:ℝ)*2^i) χ Q else ∅) + (e:=X.card*e) (by + intro i hi + split_ifs with hlarge + · have ha : 0<(δ:ℝ)*2^i := by positivity + have ha2 := (Finset.mem_filter.mp hi).2 + have hbudget := (ScoreScalars.high_or_small hq.le hn0 ha.le hhigh).resolve_right (not_le_of_gt hlarge) + have hcount := high_exceptions_card F hF Flat X hFlat hcover Planes hPlanes j + ((δ:ℝ)*2^i) χ Q (by exact_mod_cast hn0) ha ha2 hori hbudget hχ + have hax := ScoreScalars.nonsmall_strength hq hn hg ha.le hlarge + exact hcount.trans (ScoreScalars.high_exception_scalar hq hn hg hχ ha ha2 hax.le hcap) + · simp only [Finset.card_empty,Nat.cast_zero] + positivity) + apply hh.trans + have hc : ((strengthDyads S.card δ).card:ℝ)≤(Nat.clog 2 S.card:ℝ)+1 := by + exact_mod_cast strengthDyads_card S.card δ + calc + _ ≤ ((Nat.clog 2 S.card:ℝ)+1)*(X.card*e) := mul_le_mul_of_nonneg_right hc (by positivity) + _ = _ := by dsimp [e];ring + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/PencilCount.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/PencilCount.lean new file mode 100644 index 0000000000000000000000000000000000000000..17d80e2b54172645ccfd36c1de44812223d8a4d8 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/PencilCount.lean @@ -0,0 +1,190 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.OwnQuery +import OAI.Combinatorics.RamseyFive.Probability.EmptyTestsManySmall + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence CellVariance ScoreRegularity +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def pencilCount (Z : Finset (ℙ K (Dual K V))) (x : ℙ K V) : ℝ := + (Z.filter fun H => Incident x H).card + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma pencilCount_nonneg (Z : Finset (ℙ K (Dual K V))) (x : ℙ K V) : + 0≤pencilCount Z x := Nat.cast_nonneg _ + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] in +lemma pencilCount_weight (Z : Finset (ℙ K (Dual K V))) (x : ℙ K V) : + weightOnPencil (fun H => if H∈Z then (1:ℝ) else 0) x=pencilCount Z x := by + simp [weightOnPencil,incidenceEntry,pencilCount,mul_ite,Finset.sum_ite_mem] + +omit [Field K] [Finite K] in +lemma mean_ratio_lower {d : ℕ} (hd : 1≤d) (hq : (10:ℝ)≤Nat.card K) : + 9/(10*(Nat.card K:ℝ))≤(Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d := by + have hp : (1:ℝ)≤Q (Nat.card K) (d-1) := by exact_mod_cast Q_pos (Nat.card K) (d-1) + have hQ : (0:ℝ) pencilCount Z x<(4/5:ℝ)*Z.card/(Nat.card K:ℝ)).card:ℝ)≤ + 100*(Nat.card K:ℝ)^(d+1)/Z.card := by + let z : ℝ := Z.card + let q : ℝ := Nat.card K + let μ : ℝ := ((Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d)*z + let E := Finset.univ.filter fun x => pencilCount Z x<(4/5:ℝ)*z/q + have hz : 0 if H∈Z then (1:ℝ) else 0) + have hsum : (∑ H : ℙ K (Dual K V),(if H∈Z then (1:ℝ) else 0)^2)=z := by + simp [z,ite_pow] + simp only [pencilCount_weight,Finset.sum_boole,Finset.filter_mem_eq_inter,Finset.univ_inter] at hv + rw [hsum] at hv + have hvar : ∑x,(pencilCount Z x-μ)^2≤q^(d-1)*z := hv + have hs : (E.card:ℝ)*(z/(10*q))^2≤∑x,(pencilCount Z x-μ)^2 := by + calc + _ = ∑_x∈E,(z/(10*q))^2 := by simp + _ ≤ ∑x∈E,(pencilCount Z x-μ)^2 := Finset.sum_le_sum fun x hx => by + have he := (Finset.mem_filter.mp hx).2 + have hh : z/(10*q)≤μ-pencilCount Z x := by + have hid : 9*z/(10*q)-(4/5:ℝ)*z/q=z/(10*q) := by ring + linarith only [he,hμ,hid] + nlinarith [sq_nonneg (μ-pencilCount Z x-z/(10*q)),div_nonneg hz.le (by positivity : 0≤10*q)] + _ ≤ _ := Finset.sum_le_sum_of_subset_of_nonneg (Finset.subset_univ E) (fun _ _ _ => sq_nonneg _) + change (E.card:ℝ)≤100*q^(d+1)/z + calc + _ ≤ (q^(d-1)*z)/(z/(10*q))^2 := (le_div_iff₀ (sq_pos_of_pos (by positivity))).mpr (hs.trans hvar) + _ = _ := by + have he : q^(d+1)=q^(d-1)*q^2 := by rw [←pow_add];congr 1;omega + rw [he] + field_simp + ring + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma pencilCount_training_sum (S : Finset (ℙ K V)) (Z : Finset (ℙ K (Dual K V))) : + (∑x∈S,pencilCount Z x)=∑H∈Z,((S.filter fun x => Incident x H).card:ℝ) := by + simp only [pencilCount,←Finset.sum_boole] + rw [Finset.sum_comm] + +omit [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma empty_training_mass (S : Finset (ℙ K V)) (hS : S.Nonempty) + (Z : Finset (ℙ K (Dual K V))) : + (∑x∈S,pencilCount Z x)=((S.card:ℝ)/(Nat.card K:ℝ))* + ∑H∈Z,cellMass S ((Nat.card K:ℝ)/S.card) H := by + rw [pencilCount_training_sum,Finset.mul_sum] + apply Finset.sum_congr rfl + intro H _ + unfold cellMass + have hn : (S.card:ℝ)≠0 := (Nat.cast_pos.mpr hS.card_pos).ne' + have hq : (Nat.card K:ℝ)≠0 := (Nat.cast_pos.mpr (Nat.card_pos (α:=K))).ne' + field_simp + +omit [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +theorem empty_training_card (S : Finset (ℙ K V)) (hS : S.Nonempty) + (Z : Finset (ℙ K (Dual K V))) (hZ : Z.Nonempty) + (hm : ∑H∈Z,cellMass S ((Nat.card K:ℝ)/S.card) H≤(Z.card:ℝ)/1000) : + ((S.filter fun x => (Z.card:ℝ)/(10*(Nat.card K:ℝ)) (Z.card:ℝ)/(10*(Nat.card K:ℝ)) (Finset.mem_filter.mp hx).2.le + _ ≤ ∑x∈S,pencilCount Z x := Finset.sum_le_sum_of_subset_of_nonneg + (Finset.filter_subset ..) (fun x _ _ => pencilCount_nonneg Z x) + _ = _ := empty_training_mass S hS Z + _ ≤ _ := mul_le_mul_of_nonneg_left hm (by positivity) + apply (mul_le_mul_iff_left₀ (by positivity : 0<(Z.card:ℝ)/(10*(Nat.card K:ℝ)))).mp + convert! hs using 1; ring + +end + +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory ProbabilityTheory PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + +noncomputable def hyperplaneSupport (S : Finset (ℙ K V)) (H : ℙ K (Dual K V)) : Finset S := + Finset.univ.filter fun y => Incident y.val H + +noncomputable def ownSupport (S O : Finset (ℙ K V)) : Finset S := + Finset.univ.filter fun y => y.val∈O + +omit [Finite K] [FiniteDimensional K V] in +lemma pointScore_eq_sum (S O : Finset (ℙ K V)) (F : Finset (ℙ K (Dual K V))) + {R : ℕ} (b : ℝ) (ω : Fin R→S→ℕ) : + pointScore S O F b ω=∑ H∈F,ownScore (hyperplaneSupport S H) (ownSupport S O) b ω := by + unfold pointScore + rw [←Finset.sum_coe_sort F] + apply Finset.sum_congr rfl + intro H _ + unfold ownScore + apply Finset.prod_congr rfl + intro r _ + have ho : ω r∈emptyEvent (hyperplaneSupport S H.val∩ownSupport S O) ↔ + ∀y:S,y.val∈O → Incident y.val H.val → ω r y=0 := by + simp only [emptyEvent,Set.mem_pi,Finset.mem_coe,Set.mem_singleton_iff, + Finset.mem_inter,hyperplaneSupport,ownSupport,Finset.mem_filter,Finset.mem_univ,true_and] + exact ⟨fun h y hy hI => h y ⟨hI,hy⟩,fun h y hy => h y hy.2 hy.1⟩ + have he : ω r∈emptyEvent (hyperplaneSupport S H.val\ownSupport S O) ↔ + ∀y:S,y.val∉O → Incident y.val H.val → ω r y=0 := by + simp only [emptyEvent,Set.mem_pi,Finset.mem_coe,Set.mem_singleton_iff, + Finset.mem_sdiff,hyperplaneSupport,ownSupport,Finset.mem_filter,Finset.mem_univ,true_and] + exact ⟨fun h y hy hI => h y ⟨hI,hy⟩,fun h y hy => h y hy.2 hy.1⟩ + simp only [emptyIndicator,Set.indicator_apply,ho,he] + +omit [Finite K] [FiniteDimensional K V] in +lemma pointScore_split (S O : Finset (ℙ K V)) (F E : Finset (ℙ K (Dual K V))) + {R : ℕ} (b : ℝ) (ω : Fin R→S→ℕ) : + pointScore S O F b ω=pointScore S O (F∩E) b ω+pointScore S O (F\E) b ω := by + simp only [pointScore_eq_sum] + exact (Finset.sum_inter_add_sum_sdiff F E _).symm + +variable [Fintype (ℙ K (Dual K V))] +noncomputable def pencil (x : ℙ K V) : Finset (ℙ K (Dual K V)) := + Finset.univ.filter fun H => Incident x H + +omit [Finite K] [FiniteDimensional K V] in +lemma emptyTests_pencil (S : Finset (ℙ K V)) (E : Finset (ℙ K (Dual K V))) + (x : ℙ K V) {R : ℕ} (ω : Fin R→S→ℕ) : + emptyTests (pencil x∩E) (hyperplaneSupport S) ω= + (emptyTests E (hyperplaneSupport S) ω).filter fun H => Incident x H := by + ext H + simp only [emptyTests,Finset.mem_filter,Finset.mem_inter,pencil,Finset.mem_univ,true_and] + tauto + +omit [Finite K] [FiniteDimensional K V] in +theorem pointScore_exceptional (S O : Finset (ℙ K V)) (E : Finset (ℙ K (Dual K V))) + (x : ℙ K V) {R : ℕ} {b : ℝ} (hb : b∈Set.Icc 0 1) (ω : Fin R→S→ℕ) : + |pointScore S O (pencil x) b ω- + ((1-b)^R*pencilCount (emptyTests E (hyperplaneSupport S) ω) x+ + pointScore S O (pencil x\E) b ω)|≤b*(pencil x∩E).card := by + rw [pointScore_split S O (pencil x) E] + have hh := exceptionalScore_error (pencil x∩E) (hyperplaneSupport S) (ownSupport S O) hb ω + rw [←pointScore_eq_sum,emptyTests_pencil] at hh + simpa only [pencilCount,add_sub_add_right_eq_sub] using hh + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/PencilLineSum.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/PencilLineSum.lean new file mode 100644 index 0000000000000000000000000000000000000000..3b54a0a4c96c7a6aa50e9b35b062ed1dc3a9c41d --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/PencilLineSum.lean @@ -0,0 +1,75 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.RadialOffException + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GlobalRadial PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +lemma pencil_line_sum_le (hdim : finrank K V=5) + (F : Finset (ℙ K (Dual K V))) (f : RadialLine x→ℝ) (hf : ∀ d,0 ≤ f d) : + (∑ H : F,∑ d∈pencilLines x F H,f d) ≤ + (pencilAlphabet (Nat.card K) 3:ℝ)*∑ d,f d := by + have he : (∑ H : F,∑ d∈pencilLines x F H,f d) = + ∑ d : RadialLine x,((Finset.univ.filter fun H : F => d∈pencilLines x F H).card:ℝ)*f d := by + calc + _ = ∑ H : F,∑ d : RadialLine x,if d∈pencilLines x F H then f d else 0 := by + apply Finset.sum_congr rfl + intro H _ + simp only [←Finset.sum_filter] + congr 1 + ext d + simp + _ = ∑ d : RadialLine x,∑ H : F,if d∈pencilLines x F H then f d else 0 := Finset.sum_comm + _ = _ := by + apply Finset.sum_congr rfl + intro d _ + rw [←Finset.sum_filter,Finset.sum_const,nsmul_eq_mul] + rw [he,Finset.mul_sum] + apply Finset.sum_le_sum + intro d _ + apply mul_le_mul_of_nonneg_right _ (hf d) + exact Nat.cast_le.mpr (by simpa only [hdim,Nat.reduceSub,pencilAlphabet] using one_anchor_count x F d) + +lemma independent_sum_le (hdim : finrank K V=5) + (X : Finset {y : ℙ K V // x≠y}) (δ L : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (base D A : ℝ) (R J : ℕ) (hR : 2 ≤ R/2) + (hdev : ∀ H : F,|mass (radialWeight x X δ) (pencilLines x F H)-base| ≤ 1) + (hvar : (∑ H : F,(mass (radialWeight x X δ) (pencilLines x F H)-base)^2) ≤ D) + (hpow : (∑ d : RadialLine x,(radialWeight x X δ d:ℝ)^J) ≤ A) + (hA : 0 ≤ A) : + (∑ H : F,SingletonEnumeration.independentWeight (radialWeight x X δ) + (fun d => L*radialWeight x X δ d) (pencilLines x F) R J base H) ≤ + D+(pencilAlphabet (Nat.card K) 3:ℝ)*((R:ℝ)*(L:ℝ))^J*A := by + have hv : (∑ H : F,|mass (radialWeight x X δ) (pencilLines x F H)-base|^(R/2)) ≤ D := by + apply le_trans (Finset.sum_le_sum fun H _ => ?_) hvar + simpa only [sq_abs] using pow_le_pow_of_le_one (abs_nonneg _) (hdev H) hR + simp only [SingletonEnumeration.independentWeight,Finset.sum_add_distrib] + apply add_le_add hv + by_cases hRJ : R < J + · simp only [ite_eq_left hRJ,Finset.sum_const_zero] + exact mul_nonneg (mul_nonneg (Nat.cast_nonneg _) (pow_nonneg (mul_nonneg (Nat.cast_nonneg _) L.coe_nonneg) _)) hA + · simp only [ite_eq_right hRJ] + have he (d : RadialLine x) : ((R:ℝ)*((L*radialWeight x X δ d:ℝ≥0):ℝ))^J = + ((R:ℝ)*(L:ℝ))^J*(radialWeight x X δ d:ℝ)^J := by + simp only [NNReal.coe_mul,←mul_assoc,mul_pow] + simp_rw [he] + calc + _ ≤ (pencilAlphabet (Nat.card K) 3:ℝ)* + ∑ d : RadialLine x,((R:ℝ)*(L:ℝ))^J*(radialWeight x X δ d:ℝ)^J := + pencil_line_sum_le x hdim F _ (fun d => mul_nonneg + (pow_nonneg (mul_nonneg (Nat.cast_nonneg _) L.coe_nonneg) _) (pow_nonneg (NNReal.coe_nonneg _) _)) + _ = (pencilAlphabet (Nat.card K) 3:ℝ)*((R:ℝ)*(L:ℝ))^J* + ∑ d : RadialLine x,(radialWeight x X δ d:ℝ)^J := by rw [←Finset.mul_sum,mul_assoc] + _ ≤ _ := mul_le_mul_of_nonneg_left hpow (mul_nonneg (Nat.cast_nonneg _) + (pow_nonneg (mul_nonneg (Nat.cast_nonneg _) L.coe_nonneg) _)) + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/PlaneAnchor.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/PlaneAnchor.lean new file mode 100644 index 0000000000000000000000000000000000000000..79c468a9550779e19ac696f2527cecc75c201992 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/PlaneAnchor.lean @@ -0,0 +1,170 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.RadialOffException +import OAI.Combinatorics.RamseyFive.Geometry.AbsModifiedPointScore + +namespace OAI + +noncomputable section +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence PoissonScore WeightedPrograms MeasureTheory +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + (x : ℙ K V) [Fintype (RadialLine x)] + +lemma plane_one_anchor (hdim : finrank K V=3) + (F : Finset (ℙ K (Dual K V))) (l : RadialLine x) : + (Finset.univ.filter fun H:F => l∈pencilLines x F H).card≤1 := by + simpa only [hdim,Nat.reduceSub,Finset.sum_range_succ,Finset.sum_range_zero,pow_zero,zero_add] + using one_anchor_count x F l + +lemma plane_two_anchor (hdim : finrank K V=3) + (F : Finset (ℙ K (Dual K V))) (l m : RadialLine x) (hlm : l≠m) : + (Finset.univ.filter fun H:F => l∈pencilLines x F H ∧ m∈pencilLines x F H).card≤0 := by + simpa only [hdim,Nat.sub_self,Finset.range_zero,Finset.sum_empty] + using two_anchor_count x F l m hlm + +lemma plane_pencil_disjoint (hdim : finrank K V=3) + (F : Finset (ℙ K (Dual K V))) {H H' : F} (hne : H≠H') : + Disjoint (pencilLines x F H) (pencilLines x F H') := by + apply Finset.disjoint_left.mpr + intro l hl hl' + have he := Finset.card_le_one.mp (plane_one_anchor x hdim F l) H + (Finset.mem_filter.mpr ⟨Finset.mem_univ _,hl⟩) H' + (Finset.mem_filter.mpr ⟨Finset.mem_univ _,hl'⟩) + exact hne he + +lemma plane_overlap_zero (hdim : finrank K V=3) + (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) {H H' : F} (hne : H≠H') : + mass (radialWeight x X δ) (pencilLines x F H∩pencilLines x F H')=0 := by + rw [Finset.disjoint_iff_inter_eq_empty.mp (plane_pencil_disjoint x hdim F hne)] + exact Finset.sum_empty + +lemma plane_relation_sub_eq (hdim : finrank K V=3) + (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) {t : ℝ} (ht : 0 ω (r,d)))^p + ∂batchMeasure (fun i : Fin R×RadialLine x => L*radialWeight x X δ i.2))≤ + B^p*Real.exp (-(1/10:ℝ)*(p*((L:ℝ)*R))) := by + let Q : ℝ := (Nat.card K:ℝ)+1 + let C : ℝ := lowMomentBudget Q 0 0 B b L p R 1 0 + have hQ : 0≤Q := by dsimp [Q];positivity + have hC := lowMomentBudget_bounds Q 0 0 B b L p R 1 0 hQ (le_refl _) (le_refl _) + hB (zero_le_one.trans hb) L.coe_nonneg + have hQsize : (F.card:ℝ)≤Q := by + have hh := pencil_size x F hF + simp only [hdim,Nat.reduceSub,Finset.sum_range_succ,Finset.sum_range_zero,pow_zero,pow_one,zero_add] at hh + dsimp [Q] + exact_mod_cast (hh.trans_eq (Nat.add_comm 1 _)) + have hPow : (∑z:DistinctPairs F,strength (pencilLines x F) (radialWeight x X δ) z^200)≤0 := by + apply le_of_eq + apply Finset.sum_eq_zero + intro z _ + have hz := plane_overlap_zero x hdim X δ F z.2.property.symm + change (mass _ _)^200=0 + rw [hz] + norm_num + have hrows (H:F) : (∑H':F,offRow x X δ F H H'^200)≤0 := by + apply le_of_eq + apply Finset.sum_eq_zero + intro H' _ + unfold offRow + by_cases he : H=H' + · simp [he] + · simp only [he,ite_false] + rw [plane_overlap_zero x hdim X δ F he] + norm_num + have hmassL (H:F) : (∑d∈pencilLines x F H,((L*radialWeight x X δ d:ℝ≥0):ℝ))≤2*(L:ℝ) := by + simpa only [mass,NNReal.coe_mul,Finset.mul_sum,mul_comm (L:ℝ) 2] using + mul_le_mul_of_nonneg_left (hm H) L.coe_nonneg + have ht : 0<1/(100*(p:ℝ)) := by positivity + have hΔ (H:F) : Fintype.card {H':F // AmbientEnumeration.overlapRelation + (radialWeight x X δ) (pencilLines x F) (1/(100*(p:ℝ))) H H'}≤1 := by + apply Fintype.card_le_one_iff.mpr + intro u v + apply Subtype.ext + exact (plane_relation_sub_eq x hdim X δ F ht u.property).symm.trans + (plane_relation_sub_eq x hdim X δ F ht v.property) + have hRelPairs : (Fintype.card (ComponentEnumeration.RelatedPair (AmbientEnumeration.overlapRelation + (radialWeight x X δ) (pencilLines x F) (1/(100*(p:ℝ))))):ℝ)≤B^2*Real.exp (((L:ℝ)*R)/10) := by + apply (strong_pairs_le x X δ F _).trans + have he : (Finset.univ.filter fun z:DistinctPairs F => + 1/(100*(p:ℝ))≤ strength (pencilLines x F) (radialWeight x X δ) z).card=0 := by + apply Finset.card_eq_zero.mpr + apply Finset.filter_eq_empty_iff.mpr + intro z _ + change ¬1/(100*(p:ℝ)) ≤ mass _ _ + rw [plane_overlap_zero x hdim X δ F z.2.property.symm] + exact not_le.mpr ht + rw [he,Nat.cast_zero,add_zero] + exact hQsize.trans hpair + apply AmbientEnumeration.ambient_untruncated_moment (radialWeight x X δ) (pencilLines x F) + hp R own L B b (2*(L:ℝ)) C D₀ base B hL hbase hlower hdelta hB hb (by positivity) + hC.1 hD hB.le hmassL 200 h 1 0 (by norm_num) hKR hh hsize herr + (plane_one_anchor x hdim F) (plane_two_anchor x hdim F) ?_ ?_ ?_ hDsum hcost hp2 1 hΔ + (by simpa using hA) hRelPairs + · exact (score_certificate_majorant x X δ L F p R 200 1 0 Q 0 B b hB (zero_le_one.trans hb) + hQsize (le_refl _) hm hPow).trans hC.2.1 + · intro H + exact (shift_row_from_power x X δ F H p 200 (by norm_num) 0 (hrows H)).trans hC.2.2.1 + · exact (shift_pair_from_power x X δ F p 200 0 hPow).trans + ((add_le_add hQsize (le_refl _)).trans hC.2.2.2) + +end + +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory ProbabilityTheory PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] (x : ℙ K V) [Fintype (RadialLine x)] + +omit [Finite K] in +theorem unsampled_untruncated_tail (S O : Finset (ℙ K V)) (L δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (hF : ∀H∈F,Incident x H) {R : ℕ} + {b t B : ℝ} (hb : b∈Set.Icc 0 1) {p : ℕ} (hp : Even p) (ht : 0 ω (r,d)))^p + ∂batchMeasure (fun i : Fin R×RadialLine x => L*radialWeight x (outsideAt x S O) δ i.2))≤B) : + (scheduleMeasure (fun _ : S => L*δ) R).real + {ω | Unsampled x S ω ∧ t < |pointScore S O F b ω|} ≤ B/t^p := by + have hn (ω : Fin R×RadialLine x→ℕ) : HighMoment.allTrunc R (R+1) ω=1 := + AmbientEnumeration.allTrunc_eq_one (Nat.lt_succ_self R) ω + have h := unsampled_score_tail x S O L δ F hF hb (R:=R) (p:=p) (J:=R+1) (B:=B) hp ht (by + intro own + simpa only [hn,one_mul] using hB own) + simpa only [hn,sub_self,integral_zero,add_zero] using h + +end SharpRamseyFive.ScoreGeometry + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/PlaneBranch.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/PlaneBranch.lean new file mode 100644 index 0000000000000000000000000000000000000000..76fa7c73db80d0c986ea49fa10805676504c672c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/PlaneBranch.lean @@ -0,0 +1,100 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.RecursivePlane + +namespace OAI + +namespace SharpRamseyFive.ProjectiveRestriction +open Module ProjectiveIncidence ProjectiveTraining ScoreGeometry FiniteEntropy +open DyadicLifts ReverseCap Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] + +noncomputable def planeBranchLaw (A : Submodule K V) + [Fintype (ℙ K A)] [Fintype (ℙ K (Dual K A))] + [Fintype (ℙ K (Dual K (Dual K A)))] + (X UX : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))) + (τ P : ℝ) (R : ℕ) (L₀ : ℝ≥0) (k : ℕ) : Law (Option (Finset (ℙ K V))) := + let S := flatSection A X + let US := flatSection A UX + let G := nonzeroLifts A (goodLifts A S T (Real.sqrt τ/Nat.card K)) + let T₀ := restrictions (image A.dualRestrict) G k + let UT₀ := enclosure (image A.dualRestrict) (nonzeroLifts A UT) (2^k) + if h : T₀.Nonempty then + map (twoOrientedLaw S US T₀ UT₀ h P (Real.sqrt τ) R L₀) + (Option.map fun Z=>Z.map (flatEmbedding A)) + else pureLaw none + +theorem eventually_plane_branch {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)], + ∀ (A : Submodule K V) + [Fintype (ℙ K A)] [Fintype (ℙ K (Dual K A))] + [Fintype (ℙ K (Dual K (Dual K A)))] + [∀x : ℙ K A,Fintype (RadialLine x)] + [∀x : ℙ K (Dual K A),Fintype (RadialLine x)], + ∀ (X UX : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))), + finrank K A=3 → finrank K V≤5 → (Nat.card K:ℝ)=Real.exp σ → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-400*beta η) → X.Nonempty → T.Nonempty → X⊆UX → T⊆UT → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^(finrank K V)*Real.exp (-b)≤(X.card:ℝ)*T.card → + (X.card:ℝ)≤100*(X∩flatPoints A).card → + ∃k≤Nat.log 2 ((Nat.card K)^(finrank K V-finrank K A)), + let p := planeBranchLaw A X UX T UT τ (P η σ D R) R L₀ k + p none≤2*Real.exp (-(Nat.card K:ℝ)) ∧ + ∀W,0

L ≤ C).card ≤ u) + (hhyper : ∀ H : Submodule K V, finrank K H = 4 → (F.filter fun C => C ≤ H).card ≤ u) + (A B : Submodule K V) (hA : A ∈ F) (hB : B ∈ F) + (hAB : finrank K (A ⊓ B : Submodule K V) = 2) : + (F.filter fun C => finrank K (A ⊓ C : Submodule K V) = 2 ∧ + finrank K (B ⊓ C : Submodule K V) = 2).card ≤ 2*u := by + classical + have hsub : (F.filter fun C => finrank K (A ⊓ C : Submodule K V) = 2 ∧ + finrank K (B ⊓ C : Submodule K V) = 2) ⊆ + (F.filter fun C => A ⊓ B ≤ C) ∪ (F.filter fun C => C ≤ A ⊔ B) := by + intro C hC + obtain ⟨hCF, hCA, hCB⟩ := Finset.mem_filter.mp hC + have hd := common_neighbor_dichotomy A B C (hF C hCF) hAB + (by rw [inf_comm]; exact hCA) (by rw [inf_comm]; exact hCB) + simpa only [Finset.mem_union, Finset.mem_filter, hCF, true_and] using hd + have hc := (Finset.card_le_card hsub).trans (Finset.card_union_le _ _) + have h1 := hline (A ⊓ B) hAB + have h2 := hhyper (A ⊔ B) (finrank_sup_of_plane_intersection A B (hF A hA) (hF B hB) hAB) + omega + +theorem inf_eq_point_of_not_line (x : ℙ K V) (A B : Submodule K V) + (hA : finrank K A = 3) (hB : finrank K B = 3) (hAB : A ≠ B) + (hxA : x.submodule ≤ A) (hxB : x.submodule ≤ B) + (hnot : finrank K (A ⊓ B : Submodule K V) ≠ 2) : A ⊓ B = x.submodule := by + have hle : x.submodule ≤ A ⊓ B := le_inf hxA hxB + have hge := Submodule.finrank_mono hle + rw [x.finrank_submodule] at hge + have hlt : A ⊓ B < A := lt_of_le_of_ne inf_le_left (by + intro he + have hab : A ≤ B := he ▸ inf_le_right + exact hAB (Submodule.eq_of_le_of_finrank_eq hab (hA.trans hB.symm))) + have hd := Submodule.finrank_lt_finrank_of_lt hlt + rw [hA] at hd + exact (Submodule.eq_of_le_of_finrank_eq hle (by rw [x.finrank_submodule]; omega)).symm + +theorem local_skew_pairs (F : Finset (Submodule K V)) + (hF : ∀ A ∈ F, finrank K A = 3) (u : ℕ) + (hline : ∀ L : Submodule K V, finrank K L = 2 → (F.filter fun C => L ≤ C).card ≤ u) + (hhyper : ∀ H : Submodule K V, finrank K H = 4 → (F.filter fun C => C ≤ H).card ≤ u) + (x : ℙ K V) + (hsize : 8*(2*u+1) ≤ (F.filter fun A => x.submodule ≤ A).card) : + ((F.filter fun A => x.submodule ≤ A).card : ℝ)^2 ≤ + 16 * ((F ×ˢ F).filter fun p => p.1 ≠ p.2 ∧ p.1 ⊓ p.2 = x.submodule).card := by + classical + let S := F.filter fun A => x.submodule ≤ A + let R (A B : Submodule K V) := A ≠ B ∧ finrank K (A ⊓ B : Submodule K V) = 2 + have hc (A : Submodule K V) (hA : A ∈ S) (B : Submodule K V) (hB : B ∈ S) + (hAB : R A B) : (S.filter fun C => R A C ∧ R B C).card ≤ 2*u := by + apply (Finset.card_le_card ?_).trans + (plane_common_neighbors F hF u hline hhyper A B + (Finset.mem_filter.mp hA).1 (Finset.mem_filter.mp hB).1 hAB.2) + intro C hC + obtain ⟨hCS, hAC, hBC⟩ := Finset.mem_filter.mp hC + exact Finset.mem_filter.mpr ⟨(Finset.mem_filter.mp hCS).1,hAC.2,hBC.2⟩ + have hm := many_nonpairs R (fun A h => h.1 rfl) S (2*u) hc hsize + have hsub : nonpairs R S ⊆ + (F ×ˢ F).filter fun p => p.1 ≠ p.2 ∧ p.1 ⊓ p.2 = x.submodule := by + rintro ⟨A,B⟩ hp + obtain ⟨hmem, hne,hnot⟩ := Finset.mem_filter.mp hp + obtain ⟨hAS,hBS⟩ := Finset.mem_product.mp hmem + obtain ⟨hAF, hxA⟩ := Finset.mem_filter.mp hAS + obtain ⟨hBF, hxB⟩ := Finset.mem_filter.mp hBS + refine Finset.mem_filter.mpr ⟨Finset.mem_product.mpr ⟨hAF,hBF⟩,hne,?_⟩ + exact inf_eq_point_of_not_line x A B (hF A hAF) (hF B hBF) hne hxA hxB + (fun h => hnot ⟨hne,h⟩) + have hmc : ((nonpairs R S).card:ℝ) ≤ + ((F ×ˢ F).filter fun p => p.1 ≠ p.2 ∧ p.1 ⊓ p.2 = x.submodule).card := by + exact_mod_cast Finset.card_le_card hsub + exact hm.trans (mul_le_mul_of_nonneg_left hmc (by norm_num)) + +end + +open Module +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] + +omit [FiniteDimensional K V] in + +theorem sum_point_pairs_le (F : Finset (Submodule K V)) (X : Finset (ℙ K V)) : + ∑ x ∈ X, ((F ×ˢ F).filter fun p => p.1 ≠ p.2 ∧ p.1 ⊓ p.2 = x.submodule).card + ≤ F.card^2 := by + let P (x : ℙ K V) := (F ×ˢ F).filter fun p => p.1 ≠ p.2 ∧ p.1 ⊓ p.2 = x.submodule + have hd : (X : Set (ℙ K V)).PairwiseDisjoint P := by + intro x hx y hy hxy + apply Finset.disjoint_left.mpr + intro p hpx hpy + have h1 := (Finset.mem_filter.mp hpx).2.2 + have h2 := (Finset.mem_filter.mp hpy).2.2 + exact hxy (Projectivization.submodule_injective (h1.symm.trans h2)) + have hsub : X.biUnion P ⊆ F ×ˢ F := by + intro p hp + obtain ⟨x,_,hpx⟩ := Finset.mem_biUnion.mp hp + exact (Finset.mem_filter.mp hpx).1 + have hc := Finset.card_le_card hsub + rw [Finset.card_biUnion hd, Finset.card_product] at hc + simpa only [P, pow_two] using hc + +theorem high_degree_second_moment (F : Finset (Submodule K V)) + (hF : ∀ A ∈ F, finrank K A = 3) (u : ℕ) + (hline : ∀ L : Submodule K V, finrank K L = 2 → (F.filter fun C => L ≤ C).card ≤ u) + (hhyper : ∀ H : Submodule K V, finrank K H = 4 → (F.filter fun C => C ≤ H).card ≤ u) + (X : Finset (ℙ K V)) : + ∑ x ∈ X.filter (fun x => 8*(2*u+1) ≤ (F.filter fun A => x.submodule ≤ A).card), + ((F.filter fun A => x.submodule ≤ A).card:ℝ)^2 ≤ 16*(F.card:ℝ)^2 := by + let Y := X.filter fun x => 8*(2*u+1) ≤ (F.filter fun A => x.submodule ≤ A).card + have hs := Finset.sum_le_sum (s := Y) (fun x hx => + local_skew_pairs F hF u hline hhyper x (Finset.mem_filter.mp hx).2) + have hp : (∑ x ∈ Y, + (((F ×ˢ F).filter fun p => p.1 ≠ p.2 ∧ p.1 ⊓ p.2 = x.submodule).card:ℝ)) ≤ (F.card:ℝ)^2 := by + exact_mod_cast sum_point_pairs_le F Y + exact hs.trans (by rw [← Finset.mul_sum]; exact mul_le_mul_of_nonneg_left hp (by norm_num)) + +omit [FiniteDimensional K V] in + +theorem plane_point_double_count (F : Finset (Submodule K V)) (X : Finset (ℙ K V)) : + ∑ x ∈ X, (F.filter fun A => x.submodule ≤ A).card = + ∑ A ∈ F, (X.filter fun x => x.submodule ≤ A).card := by + simp only [Finset.card_filter] + exact Finset.sum_comm + +theorem rich_plane_count (F : Finset (Submodule K V)) + (hF : ∀ A ∈ F, finrank K A = 3) (u : ℕ) + (hline : ∀ L : Submodule K V, finrank K L = 2 → (F.filter fun C => L ≤ C).card ≤ u) + (hhyper : ∀ H : Submodule K V, finrank K H = 4 → (F.filter fun C => C ≤ H).card ≤ u) + (X : Finset (ℙ K V)) (M : ℕ) + (hM : ∀ A ∈ F, M ≤ (X.filter fun x => x.submodule ≤ A).card) + (hlarge : 64*X.card ≤ M^2) : + (F.card:ℝ)*M ≤ 16*X.card*(2*(u:ℝ)+1) := by + let d (x : ℙ K V) : ℝ := (F.filter fun A => x.submodule ≤ A).card + let Y := X.filter fun x => 8*(2*u+1) ≤ (F.filter fun A => x.submodule ≤ A).card + let Z := X.filter fun x => ¬8*(2*u+1) ≤ (F.filter fun A => x.submodule ≤ A).card + have hsum : (∑ x ∈ Y, d x) + ∑ x ∈ Z, d x = ∑ x ∈ X, d x := + Finset.sum_filter_add_sum_filter_not X _ _ + have hlow : (∑ x ∈ Z, d x) ≤ (X.card:ℝ)*(8*(2*(u:ℝ)+1)) := by + have hl (x : ℙ K V) (hx : x ∈ Z) : d x ≤ 8*(2*(u:ℝ)+1) := by + have hh := (Finset.mem_filter.mp hx).2 + have hnat : (F.filter fun A => x.submodule ≤ A).card ≤ 8*(2*u+1) := (lt_of_not_ge hh).le + dsimp [d] + exact_mod_cast hnat + have hle := Finset.sum_le_sum hl + have hsub : Z.card ≤ X.card := Finset.card_le_card (Finset.filter_subset _ _) + calc + _ ≤ (Z.card:ℝ)*(8*(2*(u:ℝ)+1)) := by simpa using hle + _ ≤ _ := mul_le_mul_of_nonneg_right (by exact_mod_cast hsub) (by positivity) + have htotal : (F.card:ℝ)*M ≤ ∑ x ∈ X, d x := by + have hs := Finset.sum_le_sum hM + simp only [Finset.sum_const_nat, ← plane_point_double_count] at hs + dsimp [d] + exact_mod_cast hs + have hcs := Finset.sum_mul_sq_le_sq_mul_sq Y (fun _ => (1:ℝ)) d + simp only [one_mul, one_pow, Finset.sum_const, nsmul_eq_mul, mul_one] at hcs + have hsecond := high_degree_second_moment F hF u hline hhyper X + have hY : (Y.card:ℝ) ≤ X.card := by exact_mod_cast Finset.card_le_card (Finset.filter_subset _ _) + have hsq : (∑ x ∈ Y, d x)^2 ≤ 16*(X.card:ℝ)*(F.card:ℝ)^2 := by + calc + _ ≤ (Y.card:ℝ)*∑ x ∈ Y, d x^2 := hcs + _ ≤ (Y.card:ℝ)*(16*(F.card:ℝ)^2) := + mul_le_mul_of_nonneg_left hsecond (by positivity) + _ ≤ _ := by nlinarith [mul_le_mul_of_nonneg_right hY (sq_nonneg (F.card:ℝ))] + have hr : (0:ℝ) ≤ (F.card:ℝ)*M := by positivity + have hs0 : 0 ≤ ∑ x ∈ Y, d x := Finset.sum_nonneg (fun x _ => Nat.cast_nonneg _) + have hlg : 64*(X.card:ℝ) ≤ (M:ℝ)^2 := by exact_mod_cast hlarge + have hprod := mul_le_mul_of_nonneg_right hlg (sq_nonneg (F.card:ℝ)) + have hhigh : 2*(∑ x ∈ Y, d x) ≤ (F.card:ℝ)*M := by + nlinarith [sq_nonneg ((F.card:ℝ)*M+2*(∑ x ∈ Y, d x))] + linarith + +end SharpRamseyFive.RichPlaneOverlap + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/PlaneExceptionScalars.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/PlaneExceptionScalars.lean new file mode 100644 index 0000000000000000000000000000000000000000..2f7038a76efd95ccb6a7778b5d70a9bdf432bc1a --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/PlaneExceptionScalars.lean @@ -0,0 +1,169 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.MomentOrder +import OAI.Combinatorics.RamseyFive.Iteration.CellScoreProcedure + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry +open Filter Asymptotics ParameterHierarchy +open scoped Topology + +lemma eventually_exception_decay {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (C : ℝ) (hC : 0 flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0) → + Real.exp (3*σ/2+g)/4≤S.card → (S.card:ℝ)≤Real.exp (3*σ) → + (∀x,ownCell F hF (fun j => flatPoints (Flat j)) X + (peelLength (P η σ D R/10000 flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0)) x⊆O x) → + (∀l∈Lines,finrank K l=2) → + let O' := fun x => S∩O x + ((radialExceptions S O' (pointStrength S) Lines Q q S.card (P η σ D R/200)).card:ℝ)≤ + (S.card:ℝ)*Real.exp (-L η σ D/1000)/2 ∧ + ((ambientStrongExceptions σ (P η σ D R) S O' Lines Q).card:ℝ)≤ + (S.card:ℝ)*Real.exp (7*P η σ D R) := by + have he := eventually_exception_payment_wide hη hη' 0 2664192 8 (by norm_num) (by norm_num) (by norm_num) + have ha := eventually_plane_ambient_margins hη hη' + filter_upwards [eventually_ge_atTop (1000:ℝ),he,ha] with σ hσ he ha + intro D R hr q K I J _ _ _ _ _ _ g F hF Flat X S t ht0 O Lines Q hq hcard hσq hI + hghi hFlat hcover hX ht hS hquarter hcardS hO hLines + dsimp only + let P := ParameterHierarchy.P η σ D R + have ha := ha D R hr + have hP : 0

flatPoints (Flat j)) X _ _))).trans hX + have hδ : (pointStrength (K:=K) S:ℝ)=(q:ℝ)/S.card := by simp only [pointStrength,NNReal.coe_div,NNReal.coe_natCast,hcard] + constructor + · have hcount := literal_plane_radial_exceptions hq hcard hI σ g (P/10000) (P/200) hσq hσ + ha.1 (by linarith only [hP]) hghi F hF Flat hFlat hcover X hX t ht ht0 S hS hquarter O hO + (pointStrength S) hδ Lines hLines Q + have hsub := radialExceptions_normalization S (fun x => S∩O x) (pointStrength S) + Lines Q q (P/200) S.card (Real.exp (3*σ/2+g)) hn0 hSn + have hpay := he D R (P/10000) (P/200) S.card hr (le_refl _) (le_refl _) hcardS + simp only [zero_mul,zero_add] at hpay + have hcount' := (Nat.cast_le.mpr (Finset.card_le_card hsub)).trans hcount + calc + _≤Real.exp (3*σ/2+g)*(2664192*((Nat.clog 2 S.card:ℝ)+1)*Real.exp (-P/200)) := by + simpa only [neg_div] using hcount' + _=Real.exp (3*σ/2+g)*(((Nat.clog 2 S.card:ℝ)+1)*(2664192*Real.exp (-P/200))) := by ring + _≤Real.exp (3*σ/2+g)*(Real.exp (-L η σ D/1000)/8) := by + apply mul_le_mul_of_nonneg_left _ (Real.exp_nonneg _) + simpa only [neg_div] using hpay + _≤_ := by nlinarith only [mul_le_mul_of_nonneg_right hquarter (Real.exp_nonneg (-L η σ D/1000))] + · by_cases hsmall : (S.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp (-4*P) + · dsimp only [ambientStrongExceptions] + rw [ite_eq_left hsmall,Finset.card_empty,Nat.cast_zero] + positivity + · rw [ambientStrongExceptions,ite_eq_right hsmall] + let a : ℝ := 1/(100*(momentOrder σ P:ℝ)) + have hlow : (q:ℝ)^2*Real.exp (-4*P)≤S.card := by rw [←hcard];exact (le_of_not_ge hsmall) + have hglo : σ/2-4*P≤g := by + have hh := hlow.trans hSn + rw [←hσq,←Real.exp_nat_mul,←Real.exp_add] at hh + have hh := Real.exp_le_exp.mp hh + norm_num at hh + linarith only [hh] + have hen : P/10000 S∩O x) (pointStrength S) a Lines Q hc + have hnq : (q:ℝ)^2≤4*(S.card:ℝ)*Real.exp (4*P) := by + have hh := mul_le_mul_of_nonneg_right hlow (Real.exp_nonneg (4*P)) + have hcan : ((q:ℝ)^2*Real.exp (-4*P))*Real.exp (4*P)=(q:ℝ)^2 := by + rw [mul_assoc,←Real.exp_add];simp + rw [hcan] at hh + nlinarith only [hh,mul_nonneg hn0.le (Real.exp_nonneg (4*P))] + exact ScoreScalars.strong_exception_payment (Nat.cast_nonneg q) hn0 (Nat.cast_nonneg _) + ha.2.2.2.1 hnq hc ha.2.2.2.2.2 +end + +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +noncomputable def radialInventory {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Fintype (ℙ K V)] [∀x : ℙ K V,Fintype (RadialLine x)] : + Finset (Submodule K V) := Finset.univ.biUnion fun x : ℙ K V => + Finset.univ.image fun l : RadialLine x => l.val + +lemma mem_radialInventory {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Fintype (ℙ K V)] [∀x : ℙ K V,Fintype (RadialLine x)] + (x : ℙ K V) (l : RadialLine x) : l.val∈radialInventory (K:=K) (V:=V) := by + exact Finset.mem_biUnion.mpr ⟨x,Finset.mem_univ _,Finset.mem_image.mpr ⟨l,Finset.mem_univ _,rfl⟩⟩ + +lemma radialInventory_rank {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Fintype (ℙ K V)] [∀x : ℙ K V,Fintype (RadialLine x)] + (l : Submodule K V) (hl : l∈radialInventory (K:=K) (V:=V)) : finrank K l=2 := by + obtain ⟨x,_,hl⟩ := Finset.mem_biUnion.mp hl + obtain ⟨r,_,rfl⟩ := Finset.mem_image.mp hl + exact r.property.1 + +theorem eventually_three_score_integrals {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b₀ τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ {A : Type} [Fintype A] (g : ℝ) (F : Finset J) (hF : F.Nonempty) + (Flat : J→Submodule K (I→K)) (X U S : Finset (ℙ K (I→K))) + (t₀ : ℝ) (ht₀ : 0 flatPoints (Flat j)) X ⌈t₀⌉₊ (Nat.ceil_pos.mpr ht₀) → + Real.exp (3*σ/2+g)/4≤S.card → (S.card:ℝ)≤10*Real.exp (2*σ) → + (∀x,ownCell F hF (fun j => flatPoints (Flat j)) X + (peelLength (P η σ D R/10000 flatPoints (Flat j)) X ⌈t₀⌉₊ (Nat.ceil_pos.mpr ht₀)) x⊆rawOwn x) → + (∀x,S∩rawOwn x=C (ia x)∪C (ib x)) → + (∑j,(C j).card)≤3*S.card → (∀j,C j⊆S) → + (∀x,C (ic x)=C (ia x)∩C (ib x)) → + (Nat.card K:ℝ)/S.card≤1/100 → (∀x,ownFraction S (C (ia x)) (C (ib x))≤2/25) → + let μ := scheduleMeasure (fun _ : S => L₀*pointStrength S) R + let O := fun x => C (ia x)∪C (ib x) + let ctr := fun x => Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x)))) + let t := scale (K:=K) 3 S.card*Real.exp (-(b₀+8*P η σ D R*τ+Real.log 16))/10 + (∫ω,((typicalFailures S S O (exceptional S C) ctr t ω).card:ℝ) ∂μ)≤ + (S.card:ℝ)*Real.exp (-(L₀:ℝ)/1000) ∧ + (∫ω,((typicalFailures U S O (exceptional S C) ctr t ω).card:ℝ) ∂μ)≤ + (S.card:ℝ)*Real.exp (8*P η σ D R) := by + have ht := eventually_three_validation_tail hη hη' Cb hCb + have hu := eventually_three_ambient_tail_cases hη hη' Cb hCb + have he := eventually_literal_plane_exceptions hη hη' + have hm := eventually_score_margins hη hη' Cb hCb + have hl := eventually_hierarchy hη hη' Cb 1 10000000000 hCb (by norm_num) + filter_upwards [eventually_ge_atTop (100:ℝ),ht,hu,he,hm,hl] with σ hσ ht hu he hm hl + intro D b₀ τ R L₀ q K I J _ _ _ _ _ _ _ _ A _ g F hF Flat X U S t₀ ht₀ rawOwn C ia ib ic + hq hcard hσq hI hr hL hb₀ hbhi hτ hg hFlat hcover hX htc hpeel hquarter hn hraw hOwn hC hCS hCc hdiv hf + dsimp only + let μ := scheduleMeasure (fun _ : S => L₀*pointStrength S) R + let O := fun x => C (ia x)∪C (ib x) + let O' := fun x => S∩rawOwn x + let ctr := fun x => Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x)))) + let t := scale (K:=K) 3 S.card*Real.exp (-(b₀+8*P η σ D R*τ+Real.log 16))/10 + let Lines := radialInventory (K:=K) (V:=I→K) + let reg := irregular (d:=3) S C ((L₀:ℝ)/100) + let rad := radialExceptions S O' (pointStrength S) Lines Finset.univ q S.card (P η σ D R/200) + let strong := ambientStrongExceptions σ (P η σ D R) S O' Lines Finset.univ + let bad := reg∪rad + let E : ℙ K (I→K)→Set (Fin R→S→ℕ) := fun x => + {ω | Unsampled x S ω ∧ t < |pointScore S (O x) (pencil x\exceptional S C) (ctr x) ω|} + have hSn0 : (0:ℝ).trans (by norm_cast)).trans (add_le_add hreg hrad) + have hpay : (bad.card:ℝ)+S.card*Real.exp (-P η σ D R/2)≤(S.card:ℝ)*Real.exp (-(L₀:ℝ)/1000) := by + have hh := mul_le_mul_of_nonneg_left (ScoreScalars.regular_training_payment_half hlarge hLP) hSn0.le + nlinarith only [hh,hbad] + have hbelow (x : ℙ K (I→K)) (H : ℙ K (Dual K (I→K))) (hH : H∈pencil x\exceptional S C) : + Incident x H ∧ H∉exceptional S C := by + have hh := Finset.mem_sdiff.mp hH + exact ⟨(Finset.mem_filter.mp hh.1).2,hh.2⟩ + have htraining (x : ℙ K (I→K)) (hx : x∉bad) : μ.real (E x)≤Real.exp (-P η σ D R/2) := by + have hx' : x∉reg ∧ x∉rad := ⟨fun h => hx (Finset.mem_union_left _ h),fun h => hx (Finset.mem_union_right _ h)⟩ + apply ht D b₀ τ R L₀ K (I→K) x S C (ia x) (ib x) (ic x) O' (pencil x\exceptional S C) + Lines Finset.univ t hdim hqσ hr hL hb₀ hbhi hτ hS (hCS _) (hCS _) (hCc x) (hOwn x) hn hdiv (hf x) + (hbelow x) hx'.1 (mem_radialInventory x) (Finset.mem_univ _) _ (le_refl _) + simpa only [hcard] using hx'.2 + have hambient (x : ℙ K (I→K)) (hx : x∉bad∪strong) : μ.real (E x)≤(Nat.card K:ℝ)^(-(50:ℝ)) := by + have hh : x∉bad ∧ x∉strong := ⟨fun h => hx (Finset.mem_union_left _ h),fun h => hx (Finset.mem_union_right _ h)⟩ + have hx' : x∉reg ∧ x∉rad := ⟨fun h => hh.1 (Finset.mem_union_left _ h),fun h => hh.1 (Finset.mem_union_right _ h)⟩ + apply hu D b₀ τ R L₀ K (I→K) x S C (ia x) (ib x) (ic x) O' (pencil x\exceptional S C) + Lines Finset.univ t hdim hqσ hr hL hb₀ hbhi hτ hS (hCS _) (hCS _) (hCc x) (hOwn x) hn hdiv (hf x) + (hbelow x) hx'.1 (mem_radialInventory x) (Finset.mem_univ _) _ + (off_ambientStrongExceptions σ (P η σ D R) S O' Lines Finset.univ x hh.2) (le_refl _) + simpa only [hcard] using hx'.2 + constructor + · have hh := integral_filter_card_le μ S bad E (Real.exp_nonneg _) (fun x hx => htraining x (Finset.mem_sdiff.mp hx).2) + change (∫ω,((S.filter fun x => ω∈E x).card:ℝ) ∂μ)≤_ + refine le_trans ?_ hpay + convert hh using 1; try rfl + apply integral_congr_ae + filter_upwards with ω + congr 2 + ext x + simp only [Finset.mem_filter] + · have hh := integral_filter_card_le μ U (bad∪strong) E (Real.rpow_nonneg (Nat.cast_nonneg _) _) + (fun x hx => hambient x (Finset.mem_sdiff.mp hx).2) + change (∫ω,((U.filter fun x => ω∈E x).card:ℝ) ∂μ)≤_ + refine le_trans (b:=((bad∪strong).card:ℝ)+U.card*(Nat.card K:ℝ)^(-(50:ℝ))) ?_ ?_ + · convert hh using 1; try rfl + apply integral_congr_ae + filter_upwards with ω + congr 2 + ext x + simp only [Finset.mem_filter] + have hq2 : (2:ℝ)≤Nat.card K := by rw [hqσ];linarith only [Real.add_one_le_exp σ,hσ] + have hU : (U.card:ℝ)≤2*Real.exp (3*σ) := by + have hp := Finset.card_le_univ U + rw [←Nat.card_eq_fintype_card,Projectivization.card_of_finrank K (I→K) hdim] at hp + norm_num [Finset.sum_range_succ] at hp + have hh : (U.card:ℝ)≤1+Nat.card K+(Nat.card K:ℝ)^2+(Nat.card K:ℝ)^3 := by exact_mod_cast hp + have hqpow : (Nat.card K:ℝ)^3=Real.exp (3*σ) := by rw [hqσ,←Real.exp_nat_mul];norm_num + rw [←hqpow] + have hqq : (Nat.card K:ℝ)^2≥2*Nat.card K := by nlinarith only [hq2] + nlinarith only [hh,hq2,hqq,mul_le_mul_of_nonneg_right hqq (by linarith only [hq2] : (0:ℝ)≤Nat.card K)] + have hu : (U.card:ℝ)*(Nat.card K:ℝ)^(-(50:ℝ))≤1/2 := by + rw [hqσ] + exact (mul_le_mul_of_nonneg_right hU (by positivity)).trans (ScoreScalars.ambient_three_payment hσ) + have hbadn : (bad.card:ℝ)≤S.card := by + have hexp : Real.exp (-(L₀:ℝ)/1000)≤1 := Real.exp_le_one_iff.mpr (div_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr L₀.coe_nonneg) (by norm_num)) + have htpos : 0≤(S.card:ℝ)*Real.exp (-P η σ D R/2) := mul_nonneg (Nat.cast_nonneg _) (Real.exp_nonneg _) + have hb : (bad.card:ℝ)≤(S.card:ℝ)*Real.exp (-(L₀:ℝ)/1000) := by linarith only [hpay,htpos] + exact hb.trans (mul_le_of_le_one_right hSn0.le hexp) + have hP0 : 0≤P η σ D R := by linarith only [hLP,hlarge] + have hPexp : (3:ℝ)≤Real.exp (P η σ D R) := by linarith only [Real.add_one_le_exp (P η σ D R),hLP,hlarge] + have hexp7 : (1:ℝ)≤Real.exp (7*P η σ D R) := Real.one_le_exp (mul_nonneg (by norm_num) hP0) + have hbadall : ((bad∪strong).card:ℝ)≤(S.card:ℝ)+(S.card:ℝ)*Real.exp (7*P η σ D R) := by + have hc : ((bad∪strong).card:ℝ)≤(bad.card:ℝ)+strong.card := by exact_mod_cast Finset.card_union_le bad strong + exact hc.trans (add_le_add hbadn hstrong) + calc + _≤(S.card:ℝ)+(S.card:ℝ)*Real.exp (7*P η σ D R)+1/2 := add_le_add hbadall hu + _≤3*(S.card:ℝ)*Real.exp (7*P η σ D R) := by + nlinarith only [mul_le_mul_of_nonneg_left hexp7 hSn0.le,hn1] + _≤Real.exp (P η σ D R)*(S.card:ℝ)*Real.exp (7*P η σ D R) := + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hPexp (Nat.cast_nonneg _)) (Real.exp_nonneg _) + _=_ := by rw [mul_assoc,mul_left_comm (Real.exp _),←Real.exp_add];congr 2;ring + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/PlanePublicDefs.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/PlanePublicDefs.lean new file mode 100644 index 0000000000000000000000000000000000000000..0c9b854db581336bd3666e881c6188ec0f5b99b5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/PlanePublicDefs.lean @@ -0,0 +1,103 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.TwoPublic + +namespace OAI + + +namespace SharpRamseyFive.ProjectiveRestriction +open Module ProjectiveIncidence ProjectiveTraining ScoreGeometry FiniteEntropy +open DyadicLifts ReverseCap Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] +variable (A : Submodule K V) [Fintype (ℙ K A)] [Fintype (ℙ K (Dual K A))] + [Fintype (ℙ K (Dual K (Dual K A)))] +noncomputable def planeHidden (X : Finset (ℙ K V)) (T : Finset (ℙ K (Dual K V))) (τ : ℝ) (k : ℕ) := + restrictions (image A.dualRestrict) + (nonzeroLifts A (goodLifts A (flatSection A X) T (Real.sqrt τ/Nat.card K))) k +noncomputable def planeEnclosure (UT : Finset (ℙ K (Dual K V))) (k : ℕ) := + enclosure (image A.dualRestrict) (nonzeroLifts A UT) (2^k) +abbrev PlanePublicTape (UX : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) (P τ : ℝ) (k : ℕ) := + TwoPublicTape (flatSection A UX) (planeEnclosure A UT k) P (Real.sqrt τ) (1000*(Nat.card K)^2) (Nat.card K) +abbrev PlanePublicMessage (UX : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) (P τ : ℝ) (k : ℕ) + (t : PlanePublicTape A UX UT P τ k) := + TwoPublicMessage (flatSection A UX) (planeEnclosure A UT k) P (Real.sqrt τ) (1000*(Nat.card K)^2) (Nat.card K) t +noncomputable def planePublicLaw (UX : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) (k : ℕ) : Law (PlanePublicTape A UX UT P τ k) := + twoPublicLaw (flatSection A UX) (planeEnclosure A UT k) P (Real.sqrt τ) R L₀ (1000*(Nat.card K)^2) (Nat.card K) +noncomputable def planePublicDecoded (UX : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (k : ℕ) (t : PlanePublicTape A UX UT P τ k) (m : PlanePublicMessage A UX UT P τ k t) : Finset (ℙ K V) := + (twoPublicDecoded (flatSection A UX) (planeEnclosure A UT k) P (Real.sqrt τ) (1000*(Nat.card K)^2) (Nat.card K) t m).map (flatEmbedding A) +noncomputable def planePublicEncoded (X UX : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (k : ℕ) (t : PlanePublicTape A UX UT P τ k) : Option (PlanePublicMessage A UX UT P τ k t) := + let n := reverseLength (Nat.card K) (Real.log (((flatSection A UX).card:ℝ)/(flatSection A X).card)) + if hn : n≤1000*(Nat.card K)^2 then + twoPublicEncoded (flatSection A X) (flatSection A UX) (planeHidden A X T τ k) (planeEnclosure A UT k) + P (Real.sqrt τ) (1000*(Nat.card K)^2) ⟨n,Nat.lt_succ_of_le hn⟩ (Nat.card K) + ((320/((9:ℝ)/10)+320)*(Nat.card K:ℝ)^3/(planeHidden A X T τ k).card) + (((planeHidden A X T τ k).card:ℝ)*Real.exp (2*P)) t + else none +noncomputable def planePublicCost (UX : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (k : ℕ) (t : PlanePublicTape A UX UT P τ k) (m : PlanePublicMessage A UX UT P τ k t) : ℝ := + twoPublicCost (flatSection A UX) (planeEnclosure A UT k) P (Real.sqrt τ) (1000*(Nat.card K)^2) (Nat.card K) t m + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] in +lemma planePublic_encoded_eq (X UX : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (k : ℕ) (n : Fin (1000*(Nat.card K)^2+1)) + (hn : n.val=reverseLength (Nat.card K) (Real.log (((flatSection A UX).card:ℝ)/(flatSection A X).card))) : + planePublicEncoded A X UX T UT P τ k= + twoPublicEncoded (flatSection A X) (flatSection A UX) (planeHidden A X T τ k) (planeEnclosure A UT k) + P (Real.sqrt τ) (1000*(Nat.card K)^2) n (Nat.card K) + ((320/((9:ℝ)/10)+320)*(Nat.card K:ℝ)^3/(planeHidden A X T τ k).card) + (((planeHidden A X T τ k).card:ℝ)*Real.exp (2*P)) := by + funext t + unfold planePublicEncoded + have hb : reverseLength (Nat.card K) (Real.log (((flatSection A UX).card:ℝ)/(flatSection A X).card))≤1000*(Nat.card K)^2 := by + rw [←hn]; exact Nat.le_of_lt_succ n.prop + rw [dite_eq_left hb] + congr 1 + exact Fin.ext hn.symm +end SharpRamseyFive.ProjectiveRestriction + +namespace SharpRamseyFive.ProjectiveRestriction +open Module ProjectiveIncidence ProjectiveTraining ScoreGeometry FiniteEntropy +open DyadicLifts ReverseCap Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology + +theorem eventually_plane_public {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)], + ∀ (A : Submodule K V) + [Fintype (ℙ K A)] [Fintype (ℙ K (Dual K A))] + [Fintype (ℙ K (Dual K (Dual K A)))] + [∀x : ℙ K A,Fintype (RadialLine x)] + [∀x : ℙ K (Dual K A),Fintype (RadialLine x)], + ∀ (X UX : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))), + finrank K A=3 → finrank K V≤5 → (Nat.card K:ℝ)=Real.exp σ → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-400*beta η) → X.Nonempty → T.Nonempty → X⊆UX → T⊆UT → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^(finrank K V)*Real.exp (-b)≤(X.card:ℝ)*T.card → + (X.card:ℝ)≤100*(X∩flatPoints A).card → + ∃k≤Nat.log 2 ((Nat.card K)^(finrank K V-finrank K A)), + let P₀ := P η σ D R + let p := map (planePublicLaw A UX UT P₀ τ R L₀ k) + (fun t=>(planePublicEncoded A X UX T UT P₀ τ k t).map (planePublicDecoded A UX UT P₀ τ k t)) + p none≤2*Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

flatPoints (Flat i)) X j) + (hj : (j:ℝ)*(Nat.card K:ℝ) ≤ X.card) + (O : ℙ K V→Finset (ℙ K V)) + (hO : ∀x,ownCell F hF (fun i => flatPoints (Flat i)) X j x⊆O x) + (δ : ℝ≥0) (hδ : 0<δ) (a : ℝ) (hacut : 8*(δ:ℝ)*(j+1) ≤ a) + (hmass : (δ:ℝ)*X.card ≤ 4*Nat.card K) + (Lines : Finset (Submodule K V)) (hLines : ∀l∈Lines,finrank K l=2) : + (∑l∈Lines,((richCenters S O δ a l).card:ℝ))*a^2 ≤ 3072*(Nat.card K:ℝ)^2 := by + have hδ' : 0<(δ:ℝ) := hδ + have ha4 : 4*(δ:ℝ) ≤ a := by nlinarith only [hacut,hδ',(Nat.cast_nonneg j : (0:ℝ) ≤ j)] + obtain ⟨M,hM,hlo,hhi⟩ := exists_scale hδ' ha4 + have hjM : j ≤ M := by + have hh : (j:ℝ) ≤ M := by nlinarith only [hacut,hhi,hδ'] + exact_mod_cast hh + have hm := captured_rich_centers F hF Flat X hFlat Lines hLines j M hM hjM hj O hO δ a hδ' hlo hhi + have hs : (∑l∈Lines,((richCenters S O δ a l).card:ℝ)) ≤ + ∑l∈Lines,((richCenters (X\remaining F hF (fun i => flatPoints (Flat i)) X j) O δ a l).card:ℝ) := by + apply Finset.sum_le_sum + intro l hl + exact Nat.cast_le.mpr (Finset.card_le_card (richCenters_mono S _ O O δ a δ.coe_nonneg hS + (fun _ => Finset.Subset.refl _) l)) + apply ((mul_le_mul_of_nonneg_right hs (sq_nonneg a)).trans hm).trans + nlinarith only [pow_le_pow_left₀ (by positivity : (0:ℝ) ≤ (δ:ℝ)*X.card) hmass 2] + +end + +section + +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K I J : Type} [Field K] [Finite K] [Fintype I] [LinearOrder J] + [∀x : ℙ K (I→K),Fintype (RadialLine x)] + +omit [∀x : ℙ K (I→K),Fintype (RadialLine x)] in +theorem literal_plane_global_rich {q : ℕ} [CharP K q] + (hq : 2 flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0)) + (hquarter : Real.exp (3*σ/2+g)/4 ≤ S.card) + (O : ℙ K (I→K)→Finset (ℙ K (I→K))) + (hO : ∀x,ownCell F hF (fun j => flatPoints (Flat j)) X + (peelLength (b flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0)) x⊆O x) + (δ : ℝ≥0) (hδ : (δ:ℝ)=(q:ℝ)/S.card) + (Lines : Finset (Submodule K (I→K))) (hLines : ∀l∈Lines,finrank K l=2) : + (∑l∈Lines,((richCenters S (fun x => S∩O x) δ a l).card:ℝ))*a^2 ≤ 333024*(q:ℝ)^2 := by + simp only [richCenters_clip] + have hq0 : (0:ℝ) flatPoints (Flat j)) X _ _ + have hSn : (S.card:ℝ) ≤ Real.exp (3*σ/2+g) := (Nat.cast_le.mpr (Finset.card_le_card hsub)).trans hX + have hscale : Real.exp (3*σ/2+g)*(δ:ℝ) ≤ 4*q := by + rw [hδ,←mul_div_assoc] + apply (div_le_iff₀ hn0).mpr + nlinarith only [hquarter,hq0] + have hg : 100000000 ≤ g := hb.trans hen.le + have htE : t=Real.exp (σ+17*g/15) := ht.trans (ScoreScalars.plane_threshold_exp rfl rfl) + have htq : (q:ℝ) ≤ t := by rw [htE,←hσq];apply Real.exp_le_exp.mpr;linarith only [hg] + rcases peel_residual_real (b flatPoints (Flat j)) X t ht0 with hcap|⟨hJ,hres⟩ + · have hc : S⊆X\remaining F hF (fun j => flatPoints (Flat j)) X + (peelLength (b flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0)) := by + rw [hS,hcap] + have hjt := peel_length_real (b flatPoints (Flat j)) X t ht0 + have hjq : (peelLength (b flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht0):ℝ)*(Nat.card K:ℝ) ≤ X.card := by + rw [hcard];exact (mul_le_mul_of_nonneg_left htq (Nat.cast_nonneg _)).trans hjt + have hcut := ScoreScalars.plane_list_cutoff (n:=Real.exp (3*σ/2+g)) (q:=(q:ℝ)) + rfl hσq.symm htE (by linarith only [hg]) hghi δ.coe_nonneg (Nat.cast_nonneg _) + (hjt.trans hX) hscale + have hmass : (δ:ℝ)*X.card ≤ 4*Nat.card K := by + rw [hcard];exact (mul_le_mul_of_nonneg_left hX δ.coe_nonneg).trans (by simpa only [mul_comm] using hscale) + have hh := captured_global_rich F hF Flat X S hFlat _ hc hjq O hO δ hδ0 a (hcut.trans ha) hmass Lines hLines + rw [hcard] at hh + nlinarith only [hh,sq_nonneg (q:ℝ)] + · rw [hδ] + apply residual_rich_centers hq hcard hI σ g S.card a hσq hσ hg hghi hquarter ha ha2 S hSn Lines hLines O + intro U hU + obtain ⟨j,hj,hjU⟩ := hcover U hU + have hh := hres j hj + rw [←hS,ht] at hh + have he : (S.filter fun y => y.submodule ≤ U)=S∩flatPoints (Flat j) := by + ext y + simp only [Finset.mem_filter,Finset.mem_inter,mem_flatPoints,hjU] + rw [he] + exact hh.le + +omit [∀x : ℙ K (I→K),Fintype (RadialLine x)] in +lemma strong_exceptions_of_global (S : Finset (ℙ K (I→K))) + (O : ℙ K (I→K)→Finset (ℙ K (I→K))) (δ a : ℝ) + (Lines : Finset (Submodule K (I→K))) (Q : Finset (ℙ K (I→K))) {C : ℝ} + (hglobal : (∑l∈Lines,((richCenters S O δ a l).card:ℝ))*a^2 ≤ C) : + ((badCenters S O δ a Lines Q 1).card:ℝ)*a^2 ≤ C := by + have hh := badCenters_mass_le S O δ a Lines Q 1 + rw [mul_one] at hh + exact (mul_le_mul_of_nonneg_right hh (sq_nonneg a)).trans hglobal + +end + +section +open Module ProjectiveIncidence CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + (x : ℙ K V) [Fintype (RadialLine x)] + +lemma plane_pair_card_zero (hdim : finrank K V=3) + (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) {t : ℝ} (ht : 0 < t) : + (Finset.univ.filter fun z : DistinctPairs F => t ≤ + strength (pencilLines x F) (radialWeight x X δ) z).card=0 := by + rw [Finset.card_eq_zero] + apply Finset.eq_empty_iff_forall_notMem.mpr + intro z hz + have he := plane_overlap_zero x hdim X δ F z.2.property.symm + exact (not_le.mpr ht) (he▸(Finset.mem_filter.mp hz).2) + +lemma plane_degree_card_zero (hdim : finrank K V=3) + (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (H : F) {t : ℝ} (ht : 0 < t) : + (Finset.univ.filter fun H':F => H≠H' ∧ t ≤ + mass (radialWeight x X δ) (pencilLines x F H∩pencilLines x F H')).card=0 := by + rw [Finset.card_eq_zero] + apply Finset.eq_empty_iff_forall_notMem.mpr + intro H' hH' + obtain ⟨hne,hm⟩ := (Finset.mem_filter.mp hH').2 + rw [plane_overlap_zero x hdim X δ F hne] at hm + exact (not_le.mpr ht) hm + +lemma plane_validation_card_zero (hdim : finrank K V=3) + (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) {t : ℝ} (ht : 0 < t) : + (Finset.univ.filter fun z : {z : F×F // z.1≠z.2} => t ≤ + mass (radialWeight x X δ) (pencilLines x F z.val.1∩pencilLines x F z.val.2)).card=0 := by + rw [Finset.card_eq_zero] + apply Finset.eq_empty_iff_forall_notMem.mpr + intro z hz + have hm := (Finset.mem_filter.mp hz).2 + rw [plane_overlap_zero x hdim X δ F z.property] at hm + exact (not_le.mpr ht) hm + +end + +open Module ProjectiveIncidence CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_two_score_tails {η : ℝ} (hη : 0 < η) (hη' : η < 1/10) + (Cb : ℝ) (hCb : 0 ≤ Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b₀ τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))], + ∀ (x : ℙ K V) [Fintype (RadialLine x)], + ∀ {J : Type} [Fintype J] (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) (a b c : J) + (F : Finset (ℙ K (Dual K V))) (t : ℝ), + finrank K V=3 → (Nat.card K:ℝ)=Real.exp σ → + Range η σ D R → (L₀:ℝ)=L η σ D → 0 ≤ b₀ → b₀ ≤ Cb*D*σ^(6*beta η) → + τ ≤ σ^(-200*beta η) → S.Nonempty → C a⊆S → C b⊆S → C c=C a∩C b → + (S.card:ℝ) ≤ 10*Real.exp (3*σ/2) → + (Nat.card K:ℝ)/S.card ≤ 1/100 → ownFraction S (C a) (C b) ≤ 2/25 → + (∀H∈F,Incident x H ∧ H∉exceptional S C) → + x∉irregular (d:=2) S C ((L₀:ℝ)/100) → + scale (K:=K) 2 S.card*Real.exp (-(b₀+8*P η σ D R*τ+Real.log 16))/10 ≤ t → + let μ := scheduleMeasure (fun _ : S => L₀*pointStrength S) R + let E := {ω | Unsampled x S ω ∧ t < |pointScore S (C a∪C b) F + (Real.exp (-(L₀:ℝ)*(1-ownFraction S (C a) (C b)))) ω|} + μ.real E ≤ Real.exp (-P η σ D R/2) ∧ μ.real E ≤ (Nat.card K:ℝ)^(-(50:ℝ)) := by + have ht := eventually_validation_original_tail hη hη' Cb hCb + have ha := eventually_low_original_tail hη hη' Cb hCb + have ho := eventually_moment_orders hη hη' + filter_upwards [eventually_ge_atTop (100:ℝ),ht,ha,ho] with σ hσ ht ha ho + intro D b₀ τ R L₀ K V _ _ _ _ _ _ _ x _ J _ S C a b c F t + hdim hq hr hL hb₀ hbhi hτ hS hCa hCb hCc hSn hn hf hF hx ht₀ + dsimp only + have hNor : (S.card:ℝ) ≤ 10*Real.exp (((2:ℝ)+1)*σ/2) := by norm_num;exact hSn + have hP0 : 0 ≤ P η σ D R := by unfold P; rw [←hL];exact mul_nonneg L₀.coe_nonneg (Nat.cast_nonneg R) + have hSlow : (S.card:ℝ) ≤ (Nat.card K:ℝ)^2*Real.exp (P η σ D R/10000) := by + have he : (10:ℝ) ≤ Real.exp (σ/2) := by linarith [Real.add_one_le_exp (σ/2)] + calc + _ ≤ 10*Real.exp (3*σ/2) := hSn + _ ≤ Real.exp (σ/2)*Real.exp (3*σ/2) := mul_le_mul_of_nonneg_right he (Real.exp_nonneg _) + _ = (Nat.card K:ℝ)^2 := by rw [hq,←Real.exp_add,←Real.exp_nat_mul];norm_num;ring + _ ≤ _ := le_mul_of_one_le_right (sq_nonneg _) (Real.one_le_exp_iff.mpr (by positivity)) + constructor + · apply ht 2 D b₀ τ R L₀ K V x S C a b c F t hdim (by norm_num) (by norm_num) hq hr hL hb₀ hbhi hτ hS + hCa hCb hCc hNor hn hf hF hx _ ht₀ + intro u hu hu2 + rw [plane_validation_card_zero x hdim _ _ F hu,Nat.cast_zero,zero_mul] + positivity + · apply ha 2 D b₀ τ R L₀ K V x S C a b c F t hdim (by norm_num) (by norm_num) hq hr hL hb₀ hbhi hτ hS + hCa hCb hCc hNor hSlow hn hf hF hx _ _ _ ht₀ + · intro u hu hu2 + change ((Finset.univ.filter fun z : DistinctPairs F => u ≤ strength (pencilLines x F) + (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) z).card:ℝ)*u^200 ≤ _ + rw [plane_pair_card_zero x hdim _ _ F hu,Nat.cast_zero,zero_mul] + positivity + · intro H u hu hu2 + rw [plane_degree_card_zero x hdim _ _ F H hu,Nat.cast_zero,zero_mul] + unfold scale;positivity + · intro H + have hp : 0 < (momentOrder σ (P η σ D R):ℝ) := Nat.cast_pos.mpr (ho D R hr).2.1 + rw [plane_degree_card_zero x hdim _ _ F H (by positivity),Nat.cast_zero] + unfold scale;positivity + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/PointStrength.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/PointStrength.lean new file mode 100644 index 0000000000000000000000000000000000000000..98b19593c07fa3257003c58b129f15efa4cb6d98 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/PointStrength.lean @@ -0,0 +1,102 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.LocalLines +import OAI.Combinatorics.RamseyFive.Probability.OwnFraction +import OAI.Combinatorics.RamseyFive.Geometry.RadialLabel + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory ProbabilityTheory PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + (x : ℙ K V) [Fintype (RadialLine x)] + +noncomputable def pointStrength (S : Finset (ℙ K V)) : ℝ≥0 := + (Nat.card K:ℝ≥0)/S.card + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma coe_pointStrength (S : Finset (ℙ K V)) : + (pointStrength (K:=K) S:ℝ)=(Nat.card K:ℝ)/S.card := by + simp only [pointStrength,NNReal.coe_div,NNReal.coe_natCast] + +omit [Finite K] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma mass_outside_pencil (S O : Finset (ℙ K V)) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) (H : F) : + mass (radialWeight x (outsideAt x S O) (pointStrength S)) (pencilLines x F H) = + outsideMass S O x H.val := by + rw [mass_pencil x (outsideAt x S O) (pointStrength S) F hF H] + change _*(((outsideAt x S O).filter fun y => y.val.submodule≤LinearMap.ker H.val.rep).card:ℝ)=_ + rw [outsideAt_filter_card,coe_pointStrength] + rfl + +omit [Finite K] [Fintype (ℙ K V)] in +theorem actual_radial_mass_bounds {J : Type*} [Fintype J] + (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) (hS : S.Nonempty) + (a b c : J) (ha : C a⊆S) (hb : C b⊆S) (hc : C c=C a∩C b) + (F : Finset (ℙ K (Dual K V))) + (hF : ∀ H∈F,Incident x H ∧ H∉exceptional S C) + (hf : ownFraction S (C a) (C b)≤2/25) + (hn : (Nat.card K:ℝ)/S.card ≤1/100) (H : F) : + 3/4 ≤ mass (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) (pencilLines x F H) ∧ + |mass (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) (pencilLines x F H)- + (1-ownFraction S (C a) (C b))|≤17/100 ∧ + mass (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) (pencilLines x F H)≤11/10 := by + rw [mass_outside_pencil x S (C a∪C b) F (fun H hH => (hF H hH).1)] + exact typical_mass_bounds S C hS a b c ha hb hc x (hF H.val H.property).2 hf hn + +theorem actual_radial_variance {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + {J : Type*} [Fintype J] (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) + (hS : S.Nonempty) (a b c : J) (ha : C a⊆S) (hb : C b⊆S) (hc : C c=C a∩C b) + (F : Finset (ℙ K (Dual K V))) + (hF : ∀ H∈F,Incident x H ∧ H∉exceptional S C) + {ξ : ℝ} (hξ : 0≤ξ) (hx : x∉irregular (d:=d) S C ξ) + (hn : (Nat.card K:ℝ)/S.card ≤1) : + (∑ H : F,|mass (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (pencilLines x F H)-(1-ownFraction S (C a) (C b))|^2)≤ + 40*scale (K:=K) d S.card*Real.exp ξ := by + simp_rw [mass_outside_pencil x S (C a∪C b) F (fun H hH => (hF H hH).1),sq_abs] + exact typical_mass_variance hdim hd S C hS a b c ha hb hc x F hF hξ hx hn + +theorem actual_validation_second {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + {J : Type*} [Fintype J] (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) + (hS : S.Nonempty) (a b c : J) (ha : C a⊆S) (hb : C b⊆S) (hc : C c=C a∩C b) + (F : Finset (ℙ K (Dual K V))) + (hF : ∀ H∈F,Incident x H ∧ H∉exceptional S C) + (hf : ownFraction S (C a) (C b)≤2/25) + (hn : (Nat.card K:ℝ)/S.card ≤1/100) + {ξ : ℝ} (hξ : 0≤ξ) (hx : x∉irregular (d:=d) S C ξ) + (L : ℝ≥0) (hL : 1≤(L:ℝ)) (R : ℕ) (hR : 2≤R) (own : F→Fin R→Bool) : + (∫ ω,(typicalScore Finset.univ + (fun H : F => Finset.univ.filter fun y : outsideAt x S (C a∪C b) => Incident y.val.val H.val) + (Real.exp (-(L:ℝ)*(1-ownFraction S (C a) (C b)))) own ω)^2 + ∂scheduleMeasure (fun _ : outsideAt x S (C a∪C b) => L*pointStrength S) R) ≤ + (F.card:ℝ)*(2*Real.exp (-(L:ℝ)*(3/4)))^R+ + (2*(L:ℝ)^2*Real.exp (-(L:ℝ)*(3/4)))^R* + ((40*scale (K:=K) d S.card*Real.exp ξ)^2+ + ∑ H : F,∑ H'∈Finset.univ.erase H, + (mass (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (pencilLines x F H∩pencilLines x F H'))^R) := by + rw [original_radial_moment x _ L (pointStrength S) F (fun H hH => (hF H hH).1)] + have hm := actual_radial_mass_bounds x S C hS a b c ha hb hc F hF hf hn + have hv := actual_radial_variance x hdim hd S C hS a b c ha hb hc F hF hξ hx + (hn.trans (by norm_num)) + have h := ValidationMoment.poisson_validation_second + (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) (pencilLines x F) + L hL (1-ownFraction S (C a) (C b)) (3/4) (by norm_num) (by linarith) + (fun H => (hm H).1) (fun H => (hm H).2.1.trans (by norm_num)) R hR own + apply h.trans + simp only [Fintype.card_coe] + apply add_le_add (le_refl _) + apply mul_le_mul_of_nonneg_left _ (by positivity) + apply add_le_add _ (le_refl _) + exact pow_le_pow_left₀ (Finset.sum_nonneg fun _ _ => sq_nonneg _) hv 2 + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/PowerValidation.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/PowerValidation.lean new file mode 100644 index 0000000000000000000000000000000000000000..b26c8c7ebb0e94aa8eb306ddfc9b2e2e3b0a0f0c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/PowerValidation.lean @@ -0,0 +1,161 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Entropy.LowMomentBudget +import OAI.Combinatorics.RamseyFive.Geometry.DyadCount +import OAI.Combinatorics.RamseyFive.Geometry.RadialAlternatives +import OAI.Combinatorics.RamseyFive.Entropy.DimensionThreePairs + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence PoissonScore WeightedPrograms +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal + +lemma power_tail_mul {T : Type*} [Fintype T] (f : T→ℝ) (hf : ∀z,0 ≤ f z) + (k : ℕ) (t M : ℝ) (ht : 0 < t) (hM : (∑z,f z^k) ≤ M) : + ((Finset.univ.filter fun z => t ≤ f z).card:ℝ)*t^k ≤ M := by + exact (le_div_iff₀ (pow_pos ht k)).mp (power_tail_card f hf k t M ht hM) + +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +omit [FiniteDimensional K V] [Finite K] in +lemma validation_pairs_from_power (X : Finset {y : ℙ K V // x ≠ y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (k : ℕ) (M : ℝ) + (hM : (∑z : DistinctPairs F,strength (pencilLines x F) (radialWeight x X δ) z^k) ≤ M) + (t : ℝ) (ht : 0 < t) : + ((Finset.univ.filter fun z : {z : F×F // z.1 ≠ z.2} => t ≤ + mass (radialWeight x X δ) (pencilLines x F z.val.1∩pencilLines x F z.val.2)).card:ℝ)*t^k ≤ M := by + let f : {z : F×F // z.1 ≠ z.2}→DistinctPairs F := fun z => ⟨z.val.1,⟨z.val.2,z.property.symm⟩⟩ + have hf : Function.Injective f := by + intro z w he + apply Subtype.ext + exact congrArg (fun z : DistinctPairs F => (z.1,z.2.val)) he + have hc : (Finset.univ.filter fun z : {z : F×F // z.1 ≠ z.2} => t ≤ + mass (radialWeight x X δ) (pencilLines x F z.val.1∩pencilLines x F z.val.2)).card ≤ + (Finset.univ.filter fun z : DistinctPairs F => t ≤ + strength (pencilLines x F) (radialWeight x X δ) z).card := by + apply Finset.card_le_card_of_injOn f + · intro z hz + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,(Finset.mem_filter.mp hz).2⟩ + · exact hf.injOn + exact (mul_le_mul_of_nonneg_right (Nat.cast_le.mpr hc) (pow_nonneg ht.le _)).trans + (power_tail_mul _ (strength_nonneg _ _) k t M ht hM) + +end + +section + +open Filter ParameterHierarchy +open scoped Topology + +theorem eventually_dyad_power_payment {η : ℝ} (hη : 0 < η) (hη' : η < 1/10) : + ∀ᶠ σ : ℝ in atTop,∀ (D R χ : ℝ) (m : ℕ),Range η σ D R → + χ ≤ P η σ D R/200 → (m:ℝ) ≤ Real.exp (3*σ) → + 2^200*((Nat.clog 2 m:ℝ)+1)*Real.exp (2*χ) ≤ Real.exp (P η σ D R/50) := by + have he := eventually_power_absorption hη hη' (8*2^200) 1 (1/100) + (by positivity) (by norm_num) (by norm_num) + filter_upwards [eventually_ge_atTop (1:ℝ),he] with σ hσ he + intro D R χ m hr hχ hm + have hh : (8*2^200:ℝ)*σ ≤ Real.exp (P η σ D R/100) := by + simpa only [Real.rpow_one,one_mul,one_div,div_eq_mul_inv,mul_comm (100⁻¹:ℝ)] using he D R hr + calc + _ ≤ ((8*2^200:ℝ)*σ)*Real.exp (2*χ) := by + apply mul_le_mul_of_nonneg_right _ (Real.exp_nonneg _) + nlinarith only [dyad_count_le hσ hm] + _ ≤ Real.exp (P η σ D R/100)*Real.exp (P η σ D R/100) := + mul_le_mul hh (Real.exp_le_exp.mpr (by linarith only [hχ])) (Real.exp_nonneg _) (Real.exp_nonneg _) + _ = _ := by rw [←Real.exp_add];congr 1;ring + +end + +open Module ProjectiveIncidence ProjectiveTraining GlobalRadial PoissonScore WeightedPrograms +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +theorem score_pair_three_half_normalized (hdim : finrank K V = 4) + (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) (δ : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀H∈F,Incident x H) + (n a χ : ℝ) (hn : 0 a ≤ + strength (pencilLines x F) (radialWeight x (outsideAt x S (O x)) δ) p)).card:ℝ)*a^200 ≤ + ((Nat.card K:ℝ)^3/n)^2*Real.exp (2*χ) := by + have hq : (1:ℝ) ≤ Nat.card K := by exact_mod_cast Nat.card_pos (α:=K) + have hq2 : ((Nat.card K:ℝ)+1)^2 ≤ 4*(Nat.card K:ℝ)^2 := by nlinarith + have hc : ((Finset.univ.filter (fun p : DistinctPairs F => a ≤ + strength (pencilLines x F) (radialWeight x (outsideAt x S (O x)) δ) p)).card:ℝ) ≤ + ((Finset.univ.filter (fun p : DistinctPairs F => a/2 ≤ + strength (pencilLines x F) (radialWeight x (outsideAt x S (O x)) δ) p)).card:ℝ) := by + apply Nat.cast_le.mpr + apply Finset.card_le_card + intro p hp + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,by linarith only [ha,(Finset.mem_filter.mp hp).2]⟩ + have hh := hc.trans (score_pairs_three_off_radial x hdim S O δ hδ F hF (a/2) _ Lines hLines Q hx hgood) + have hp : a^100 ≤ (2:ℝ)^100 := pow_le_pow_left₀ ha.le ha2 _ + calc + _ ≤ ((Nat.card K:ℝ)^4/n^2*Real.exp χ/(a/2)^100)*((Nat.card K:ℝ)+1)^2*a^200 := + mul_le_mul_of_nonneg_right hh (by positivity) + _ ≤ ((Nat.card K:ℝ)^4/n^2*Real.exp χ/(a/2)^100)*(4*(Nat.card K:ℝ)^2)*a^200 := by gcongr + _ = ((Nat.card K:ℝ)^3/n)^2*Real.exp χ*(4*2^100*a^100) := by field_simp + _ ≤ ((Nat.card K:ℝ)^3/n)^2*Real.exp χ*(4*2^100*2^100) := by gcongr + _ = ((Nat.card K:ℝ)^3/n)^2*Real.exp χ*(4*2^200) := by ring + _ ≤ ((Nat.card K:ℝ)^3/n)^2*Real.exp χ*Real.exp χ := by gcongr + _ = _ := by rw [mul_assoc,←Real.exp_add];congr 2;ring + +theorem score_pair_three_moment (hdim : finrank K V=4) + (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) (δ : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀H∈F,Incident x H) + (n χ : ℝ) (hn : 0 H≠H' ∧ a ≤ mass + (radialWeight x X δ) (pencilLines x F H∩pencilLines x F H')).card:ℝ)*a^200 ≤ + ((Nat.card K:ℝ)^3/n)*Real.exp (2*χ) := by + have hq : (1:ℝ) ≤ Nat.card K := by exact_mod_cast Nat.card_pos (α:=K) + have hq0 : (0:ℝ) H≠H' ∧ a ≤ mass + (radialWeight x X δ) (pencilLines x F H∩pencilLines x F H')).card:ℝ)*a)*a^199 := by ring + _ ≤ (mass (radialWeight x X δ) (pencilLines x F H)*((Nat.card K:ℝ)+1))*a^199 := + mul_le_mul_of_nonneg_right (by exact_mod_cast hh) (by positivity) + _ ≤ (2*(2*(Nat.card K:ℝ)))*2^199 := by gcongr; linarith only [hq] + _ ≤ (4*(10*((Nat.card K:ℝ)^3/n)))*2^199 := by + calc + (2*(2*(Nat.card K:ℝ)))*2^199 = (4*(Nat.card K:ℝ))*2^199 := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hnq (by norm_num)) (by positivity) + _ = ((Nat.card K:ℝ)^3/n)*(40*2^199) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left hχ (by positivity) + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/PredictorReverseCap.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/PredictorReverseCap.lean new file mode 100644 index 0000000000000000000000000000000000000000..d4a3ee73b55ac470ec4b0fdec3626c944f20b8b7 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/PredictorReverseCap.lean @@ -0,0 +1,271 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.UniformCutoff +import OAI.Combinatorics.RamseyFive.Geometry.DimensionTwoPublic +import OAI.Combinatorics.RamseyFive.Probability.CapNumerics +import OAI.Combinatorics.RamseyFive.Entropy.CapDecoder + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence + +section +open Module FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def lowIncidence (C : Finset (ℙ K (Dual K V))) : Finset (ℙ K V) := + Finset.univ.filter fun x=>((C.filter (Incident x)).card:ℝ) ≤ (C.card:ℝ)/(2*Nat.card K) + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma incidences_eq_sum_card (S : Finset (ℙ K V)) (C : Finset (ℙ K (Dual K V))) : + (incidences S C:ℝ)=∑x∈S,((C.filter (Incident x)).card:ℝ) := by + rw [incidences_eq_sum,Finset.sum_comm] + apply Finset.sum_congr rfl + intro x hx + simp only [incidenceEntry,Finset.sum_boole] + +theorem lowIncidence_mass {d : ℕ} (hdim : finrank K V=d+1) (hd : 1 ≤ d) + (hq : 3 ≤ Nat.card K) (C : Finset (ℙ K (Dual K V))) : + ((lowIncidence C).card:ℝ)*C.card ≤ 16*(Nat.card K:ℝ)^(d+1) := by + apply sparse_half_rectangle_size hdim hd hq + rw [incidences_eq_sum_card] + calc + _ ≤ ∑x∈lowIncidence C,(C.card:ℝ)/(2*Nat.card K) := + Finset.sum_le_sum fun x hx=>(Finset.mem_filter.mp hx).2 + _ = _ := by simp;ring + +theorem expected_projective_cap {d : ℕ} (hdim : finrank K V=d+1) (hd : 1 ≤ d) + (hq : 3 ≤ Nat.card K) (C : Finset (ℙ K (Dual K V))) (hC : C.Nonempty) + (U : Finset (ℙ K V)) (n : ℕ) : + (∑row,iid (uniformOn C hC) (Fin n) row* + ((cap Incident U (Nat.card K) row).card:ℝ)) ≤ + 16*(Nat.card K:ℝ)^(d+1)/C.card + + U.card*Real.exp (-(n:ℝ)/(20*Nat.card K)) := by + have hqpos : (0:ℝ) < Nat.card K := by exact_mod_cast (Finite.one_lt_card (α := K)).le + have hc : (0:ℝ) < C.card := by exact_mod_cast Finset.card_pos.mpr hC + have hh := expected_cap_card Incident U (lowIncidence C) C hC n (Nat.card K) hqpos + (by + intro x hx hlow + have hdg : (C.card:ℝ)/(2*Nat.card K) < (C.filter (Incident x)).card := by + simpa only [lowIncidence,Finset.mem_filter,Finset.mem_univ,true_and,not_le] using hlow + apply (le_div_iff₀ hc).mpr + calc + _ = (C.card:ℝ)/(2*Nat.card K) := by ring + _ ≤ _ := hdg.le) + have hb := (le_div_iff₀ hc).mpr (lowIncidence_mass hdim hd hq C) + linarith + +noncomputable def lowPencil (C : Finset (ℙ K V)) : Finset (ℙ K (Dual K V)) := + Finset.univ.filter fun y=>((C.filter fun x=>Incident x y).card:ℝ) ≤ (C.card:ℝ)/(2*Nat.card K) + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma incidences_eq_sum_card_right (C : Finset (ℙ K V)) (T : Finset (ℙ K (Dual K V))) : + (incidences C T:ℝ)=∑y∈T,((C.filter fun x=>Incident x y).card:ℝ) := by + rw [incidences_eq_sum] + apply Finset.sum_congr rfl + intro y hy + simp only [incidenceEntry,Finset.sum_boole] + +theorem lowPencil_mass {d : ℕ} (hdim : finrank K V=d+1) (hd : 1 ≤ d) + (hq : 3 ≤ Nat.card K) (C : Finset (ℙ K V)) : + ((lowPencil C).card:ℝ)*C.card ≤ 16*(Nat.card K:ℝ)^(d+1) := by + have hh : (C.card:ℝ)*(lowPencil C).card ≤ 16*(Nat.card K:ℝ)^(d+1) := by + apply sparse_half_rectangle_size hdim hd hq + rw [incidences_eq_sum_card_right] + calc + _ ≤ ∑y∈lowPencil C,(C.card:ℝ)/(2*Nat.card K) := + Finset.sum_le_sum fun y hy=>(Finset.mem_filter.mp hy).2 + _ = _ := by simp; ring + simpa only [mul_comm] using hh + +theorem expected_dual_cap {d : ℕ} (hdim : finrank K V=d+1) (hd : 1 ≤ d) + (hq : 3 ≤ Nat.card K) (C : Finset (ℙ K V)) (hC : C.Nonempty) + (U : Finset (ℙ K (Dual K V))) (n : ℕ) : + (∑row,iid (uniformOn C hC) (Fin n) row* + ((cap (fun y x=>Incident x y) U (Nat.card K) row).card:ℝ)) ≤ + 16*(Nat.card K:ℝ)^(d+1)/C.card + + U.card*Real.exp (-(n:ℝ)/(20*Nat.card K)) := by + have hqpos : (0:ℝ) < Nat.card K := by exact_mod_cast (Finite.one_lt_card (α := K)).le + have hc : (0:ℝ) < C.card := by exact_mod_cast Finset.card_pos.mpr hC + have hh := expected_cap_card (fun y x=>Incident x y) U (lowPencil C) C hC n (Nat.card K) hqpos + (by + intro y hy hlow + have hdeg : (C.card:ℝ)/(2*Nat.card K) < (C.filter fun x=>Incident x y).card := by + simpa only [lowPencil,Finset.mem_filter,Finset.mem_univ,true_and,not_le] using hlow + apply (le_div_iff₀ hc).mpr + calc + _ = (C.card:ℝ)/(2*Nat.card K) := by ring + _ ≤ _ := hdeg.le) + have hb := (le_div_iff₀ hc).mpr (lowPencil_mass hdim hd hq C) + linarith + +end +open Module FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem geometric_validation_mass {d : ℕ} (hdim : finrank K V=d+1) (hd : 1 ≤ d) + (hq : 3 ≤ Nat.card K) (S U : Finset (ℙ K V)) (hS : S.Nonempty) (hSU : S⊆U) + (X C : Finset (ℙ K (Dual K V))) (hC : C.Nonempty) (hCX : C⊆X) + (c : ℝ) (hc : 0 < c) (hc1 : c ≤ 1) (hcapture : c*X.card ≤ C.card) + (hsparse : 1000*(Nat.card K:ℝ)*incidences S X ≤ c*S.card*X.card) + (n : ℕ) (hn : 0 < n) + (hlen : 20*(Nat.card K:ℝ)*Real.log ((U.card:ℝ)/S.card) ≤ n) : + (9:ℝ)/10 ≤ eventMass (iid (uniformOn C hC) (Fin n)) + (validationRows Incident S U C n (Nat.card K) + ((320/c+320)*(Nat.card K:ℝ)^(d+1)/X.card)) := by + have hqpos : (0:ℝ) < Nat.card K := by exact_mod_cast (Finite.one_lt_card (α := K)).le + have hCpos : (0:ℝ) < C.card := by exact_mod_cast Finset.card_pos.mpr hC + have hXpos : (0:ℝ) < X.card := by exact_mod_cast Finset.card_pos.mpr (hC.mono hCX) + have hSpos : (0:ℝ) < S.card := by exact_mod_cast Finset.card_pos.mpr hS + have hUpos : (0:ℝ) < U.card := by exact_mod_cast Finset.card_pos.mpr (hS.mono hSU) + have hprod := sparse_half_rectangle_size hdim hd hq S X + (density_half (incidences S X) S.card X.card c (Nat.card K) + (Nat.cast_nonneg _) (Nat.cast_nonneg _) (Nat.cast_nonneg _) hqpos hc1 hsparse) + have hm := (expected_projective_cap hdim hd hq C hC U n).trans + (captured_cap_budget ((Nat.card K:ℝ)^(d+1)) X.card c C.card S.card U.card (Nat.card K) n + (by positivity) hXpos hc hCpos hSpos hUpos hqpos hcapture hprod hlen) + apply validationRows_mass Incident S U hS hSU C hC n hn (Nat.card K) _ hqpos (by positivity) hm + have hsum : (∑a∈S,((C.filter (Incident a)).card:ℝ)) ≤ (incidences S X:ℝ) := by + rw [incidences_eq_sum_card] + apply Finset.sum_le_sum + intro a ha + exact_mod_cast Finset.card_le_card (Finset.filter_subset_filter _ hCX) + apply rejection_from_capture _ _ c _ _ _ hCpos (Nat.cast_nonneg _) hcapture + exact (mul_le_mul_of_nonneg_left hsum (by positivity)).trans hsparse + +theorem geometric_dual_validation_mass {d : ℕ} (hdim : finrank K V=d+1) (hd : 1 ≤ d) + (hq : 3 ≤ Nat.card K) (S U : Finset (ℙ K (Dual K V))) (hS : S.Nonempty) (hSU : S⊆U) + (X C : Finset (ℙ K V)) (hC : C.Nonempty) (hCX : C⊆X) + (c : ℝ) (hc : 0 < c) (hc1 : c ≤ 1) (hcapture : c*X.card ≤ C.card) + (hsparse : 1000*(Nat.card K:ℝ)*incidences X S ≤ c*S.card*X.card) + (n : ℕ) (hn : 0 < n) + (hlen : 20*(Nat.card K:ℝ)*Real.log ((U.card:ℝ)/S.card) ≤ n) : + (9:ℝ)/10 ≤ eventMass (iid (uniformOn C hC) (Fin n)) + (validationRows (fun y x=>Incident x y) S U C n (Nat.card K) + ((320/c+320)*(Nat.card K:ℝ)^(d+1)/X.card)) := by + have hqpos : (0:ℝ) < Nat.card K := by exact_mod_cast (Finite.one_lt_card (α := K)).le + have hCpos : (0:ℝ) < C.card := by exact_mod_cast Finset.card_pos.mpr hC + have hXpos : (0:ℝ) < X.card := by exact_mod_cast Finset.card_pos.mpr (hC.mono hCX) + have hSpos : (0:ℝ) < S.card := by exact_mod_cast Finset.card_pos.mpr hS + have hUpos : (0:ℝ) < U.card := by exact_mod_cast Finset.card_pos.mpr (hS.mono hSU) + have hdensity : (incidences X S:ℝ) ≤ X.card*S.card/(2*(Nat.card K)) := by + have hh := density_half (incidences X S) S.card X.card c (Nat.card K) + (Nat.cast_nonneg _) (Nat.cast_nonneg _) (Nat.cast_nonneg _) hqpos hc1 hsparse + simpa only [mul_comm] using hh + have hprod : (S.card:ℝ)*X.card ≤ 16*(Nat.card K:ℝ)^(d+1) := by + simpa only [mul_comm] using sparse_half_rectangle_size hdim hd hq X S hdensity + have hm := (expected_dual_cap hdim hd hq C hC U n).trans + (captured_cap_budget ((Nat.card K:ℝ)^(d+1)) X.card c C.card S.card U.card (Nat.card K) n + (by positivity) hXpos hc hCpos hSpos hUpos hqpos hcapture hprod hlen) + apply validationRows_mass (fun y x=>Incident x y) S U hS hSU C hC n hn (Nat.card K) _ hqpos (by positivity) hm + have hsum : (∑y∈S,((C.filter fun x=>Incident x y).card:ℝ)) ≤ (incidences X S:ℝ) := by + rw [incidences_eq_sum_card_right] + apply Finset.sum_le_sum + intro y hy + exact_mod_cast Finset.card_le_card (Finset.filter_subset_filter _ hCX) + apply rejection_from_capture _ _ c _ _ _ hCpos (Nat.cast_nonneg _) hcapture + exact (mul_le_mul_of_nonneg_left hsum (by positivity)).trans hsparse + +end SharpRamseyFive.ProjectiveIncidence +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical BigOperators +variable {A B : Type*} [Fintype A] [Fintype B] + +omit [Fintype A] in +theorem validated_public_test (R : A→B→Prop) (S U : Finset A) + (C X W : Finset B) (hC : C.Nonempty) (hW : W.Nonempty) (hCW : C⊆W) + (hCX : C⊆X) (q c M : ℝ) (hq : 1 ≤ q) (hc : 0 < c) + (hsize : c*X.card ≤ C.card) (n : ℕ) (hn : 0 < n) + (hE : (9:ℝ)/10 ≤ eventMass (iid (uniformOn C hC) (Fin n)) + (validationRows R S U C n q M)) : + let N := uniformCutoff q C W n + let E := validationRows R S U C n q M + let p := map (iid (iid (uniformOn W hW) (Fin n)) (Fin N)) (firstAccepted E (n := N)) + p none ≤ Real.exp (-q) ∧ + Real.log N ≤ Real.log (2*q)-Real.log ((9:ℝ)/10)+(n:ℝ)*Real.log ((W.card:ℝ)/C.card) ∧ + (∀t : Fin N→Fin n→B,∀row, firstAccepted E t=some row → + ∃i : Fin N,cap R U q (t i)⊆U ∧ ((cap R U q (t i)).card:ℝ)≤M ∧ + (9:ℝ)/10*S.card ≤ (S∩cap R U q (t i)).card) ∧ + (∀H : Finset B,eventMass p + ((Finset.univ.filter fun row => (1/(5*q))*n≤hits H row).image some) ≤ + (50*q/(9*c))*(((H∩X).card:ℝ)/X.card)) := by + have hqpos : 0 < q := lt_of_lt_of_le (by norm_num) hq + have hsource : ∀row∈validationRows R S U C n q M,∀i,row i∈C := by + intro row hr + exact (Finset.mem_filter.mp hr).2.1 + refine ⟨uniform_cutoff_failure q C W hC hW hCW n _ hsource hE, + uniformCutoff_log q hq C W hC hW hCW n,?_,?_⟩ + · intro t row hr + exact validation_decode R S U C n _ q M t row hr + · intro H + exact fresh_test_domination C X W H hC hW hCW hCX q c hqpos hc hsize n _ hn + (uniformCutoff_pos q hqpos C W hC hW n) _ hsource hE + +end SharpRamseyFive.ReverseCap + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem geometric_public_fresh_test {d : ℕ} (hdim : finrank K V=d+1) (hd : 1 ≤ d) + (hq : 3 ≤ Nat.card K) (S U : Finset (ℙ K V)) (hS : S.Nonempty) (hSU : S⊆U) + (X C W : Finset (ℙ K (Dual K V))) (hC : C.Nonempty) (hW : W.Nonempty) + (hCX : C⊆X) (hCW : C⊆W) (c : ℝ) (hc : 0 < c) (hc1 : c ≤ 1) + (hcapture : c*X.card ≤ C.card) + (hsparse : 1000*(Nat.card K:ℝ)*incidences S X ≤ c*S.card*X.card) + (n : ℕ) (hn : 0 < n) + (hlen : 20*(Nat.card K:ℝ)*Real.log ((U.card:ℝ)/S.card) ≤ n) : + let q : ℝ := Nat.card K + let M := (320/c+320)*q^(d+1)/X.card + let N := uniformCutoff q C W n + let E := validationRows Incident S U C n q M + let p := map (iid (iid (uniformOn W hW) (Fin n)) (Fin N)) (firstAccepted E (n := N)) + p none ≤ Real.exp (-q) ∧ + Real.log N ≤ Real.log (2*q)-Real.log ((9:ℝ)/10)+(n:ℝ)*Real.log ((W.card:ℝ)/C.card) ∧ + (∀t : Fin N→Fin n→ℙ K (Dual K V),∀row, firstAccepted E t=some row → + ∃i : Fin N,cap Incident U q (t i)⊆U ∧ ((cap Incident U q (t i)).card:ℝ)≤M ∧ + (9:ℝ)/10*S.card ≤ (S∩cap Incident U q (t i)).card) ∧ + (∀H : Finset (ℙ K (Dual K V)),eventMass p + ((Finset.univ.filter fun row => (1/(5*q))*n≤hits H row).image some) ≤ + (50*q/(9*c))*(((H∩X).card:ℝ)/X.card)) := by + exact validated_public_test Incident S U C X W hC hW hCW hCX (Nat.card K) c _ + (by exact_mod_cast hq.trans' (by omega : 1 ≤ 3)) hc hcapture n hn + (geometric_validation_mass hdim hd hq S U hS hSU X C hC hCX c hc hc1 hcapture hsparse n hn hlen) + +theorem geometric_public_dual_fresh_test {d : ℕ} (hdim : finrank K V=d+1) (hd : 1 ≤ d) + (hq : 3 ≤ Nat.card K) (S U : Finset (ℙ K (Dual K V))) (hS : S.Nonempty) (hSU : S⊆U) + (X C W : Finset (ℙ K V)) (hC : C.Nonempty) (hW : W.Nonempty) + (hCX : C⊆X) (hCW : C⊆W) (c : ℝ) (hc : 0 < c) (hc1 : c ≤ 1) + (hcapture : c*X.card ≤ C.card) + (hsparse : 1000*(Nat.card K:ℝ)*incidences X S ≤ c*S.card*X.card) + (n : ℕ) (hn : 0 < n) + (hlen : 20*(Nat.card K:ℝ)*Real.log ((U.card:ℝ)/S.card) ≤ n) : + let q : ℝ := Nat.card K + let M := (320/c+320)*q^(d+1)/X.card + let N := uniformCutoff q C W n + let E := validationRows (fun y x=>Incident x y) S U C n q M + let p := map (iid (iid (uniformOn W hW) (Fin n)) (Fin N)) (firstAccepted E (n := N)) + p none ≤ Real.exp (-q) ∧ + Real.log N ≤ Real.log (2*q)-Real.log ((9:ℝ)/10)+(n:ℝ)*Real.log ((W.card:ℝ)/C.card) ∧ + (∀t : Fin N→Fin n→ℙ K V,∀row, firstAccepted E t=some row → + ∃i : Fin N,cap (fun y x=>Incident x y) U q (t i)⊆U ∧ ((cap (fun y x=>Incident x y) U q (t i)).card:ℝ)≤M ∧ + (9:ℝ)/10*S.card ≤ (S∩cap (fun y x=>Incident x y) U q (t i)).card) ∧ + (∀H : Finset (ℙ K V),eventMass p + ((Finset.univ.filter fun row => (1/(5*q))*n≤hits H row).image some) ≤ + (50*q/(9*c))*(((H∩X).card:ℝ)/X.card)) := by + exact validated_public_test (fun y x=>Incident x y) S U C X W hC hW hCW hCX (Nat.card K) c _ + (by exact_mod_cast hq.trans' (by omega : 1 ≤ 3)) hc hcapture n hn + (geometric_dual_validation_mass hdim hd hq S U hS hSU X C hC hCX c hc hc1 hcapture hsparse n hn hlen) + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ProducedPairOriginal.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ProducedPairOriginal.lean new file mode 100644 index 0000000000000000000000000000000000000000..ab8fe547e15a67de8a7eb54a88fc607309a1ad07 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ProducedPairOriginal.lean @@ -0,0 +1,140 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.FiniteNodeCost +import OAI.Combinatorics.RamseyFive.Geometry.AmbientOriginalDomination +import OAI.Combinatorics.RamseyFive.Entropy.OptionEventBounds + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence + +section +open Module FiniteEntropy ReverseCap ScoreGeometry +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem producedPair_original (hd : finrank K V=5) (hq : 3≤Nat.card K) + (A A₀ UA : Finset (ℙ K V)) (hA : A.Nonempty) (hAA₀ : A⊆A₀) (hAU : A⊆UA) + (B B₀ UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) (hBB₀ : B⊆B₀) (hBU : B⊆UB) + (c δ M : ℝ) (hc : 0Excludes b (out.map Prod.fst))≤ + (50*(Nat.card K:ℝ)/(9*(c*δ)))*(((A₀.filter fun a=>Incident a b).card:ℝ)/A₀.card)) ∧ + (∀a,eventMass (producedPairLaw A UA B UB hB c (some W)) + (Finset.univ.filter fun out=>Excludes a (out.map Prod.snd))≤ + (50*(Nat.card K:ℝ)/(9*((9:ℝ)/10*δ)))*(((B₀.filter (Incident a)).card:ℝ)/B₀.card)) := by + have hW : W.Nonempty := (hcap.nonempty hA hc).mono Finset.inter_subset_right + have hq1 : (1:ℝ)≤Nat.card K := by exact_mod_cast (by omega : 1≤Nat.card K) + have hlenA := reverseLength_spec (Nat.card K) (Real.log ((UA.card:ℝ)/A.card)) hq1 + (Real.log_nonneg ((le_div_iff₀ (by exact_mod_cast hA.card_pos)).mpr + (by simpa only [one_mul] using (show (A.card:ℝ)≤UA.card from by exact_mod_cast Finset.card_le_card hAU)))) + have hlenB := reverseLength_spec (Nat.card K) (Real.log ((UB.card:ℝ)/B.card)) hq1 + (Real.log_nonneg ((le_div_iff₀ (by exact_mod_cast hB.card_pos)).mpr + (by simpa only [one_mul] using (show (B.card:ℝ)≤UB.card from by exact_mod_cast Finset.card_le_card hBU)))) + have hsparse' : 1000*(Nat.card K:ℝ)*incidences A B≤(9:ℝ)/10*A.card*B.card := by + have hh := mul_le_mul_of_nonneg_right hc9 (mul_nonneg (Nat.cast_nonneg A.card) (Nat.cast_nonneg B.card)) + nlinarith only [hh,hsparse] + let nA := reverseLength (Nat.card K) (Real.log ((UA.card:ℝ)/A.card)) + let nB := reverseLength (Nat.card K) (Real.log ((UB.card:ℝ)/B.card)) + let MA := (320/((9:ℝ)/10)+320)*(Nat.card K:ℝ)^5/B.card + let MB := (320/c+320)*(Nat.card K:ℝ)^5/A.card + let firstCap := ambientCapLaw (fun b a=>Incident a b) B UB (A∩W) W hW nB (Nat.card K) MB + let next := nextAmbientCapLaw A UA B UB hB nA (Nat.card K) MA MB + have he : producedPairLaw A UA B UB hB c (some W)=map (adaptiveLaw firstCap next) pairOptions := by + simp only [producedPairLaw,dite_eq_left hW] + rfl + rw [he] + constructor + · intro b + have hm := pairOptions_event_left (adaptiveLaw firstCap next) (Excludes b) (by simp [Excludes]) + rw [adaptive_event_first] at hm + exact hm.trans (firstAmbient_original hd (by norm_num) hq A A₀ hA hAA₀ B UB hB hBU W hW + c δ hc (by linarith only [hc9]) hδ htrimA hcap.2.2 hsparse nB hlenB.1 hlenB.2.1 b) + · intro a + have hm := pairOptions_event_right (adaptiveLaw firstCap next) (Excludes a) (by simp [Excludes]) + apply hm.trans + apply adaptive_event_second_le + intro Y + exact secondAmbient_original hd (by norm_num) hq A UA hA hAU B B₀ UB hB hBB₀ δ hδ htrimB hsparse' + nA hlenA.1 hlenA.2.1 MB Y a +end + +open Module FiniteEntropy ReverseCap ScoreGeometry +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem finiteNode_original (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (hd : finrank K V=5) (hq : 3≤Nat.card K) + (A A₀ UA : Finset (ℙ K V)) (hA : A.Nonempty) (hAA₀ : A⊆A₀) (hAU : A⊆UA) + (B B₀ UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) (hBB₀ : B⊆B₀) (hBU : B⊆UB) + (c δ M : ℝ) (hc : 0Excludes b (out.map Prod.fst))≤ + (50*(Nat.card K:ℝ)/(9*(c*δ)))*(((A₀.filter fun a=>Incident a b).card:ℝ)/A₀.card)) ∧ + (∀a,eventMass (finiteNodeOutput pred A UA B UB H ⟨_,hnA⟩ ⟨_,hnB⟩ (Nat.card K) + ((320/((9:ℝ)/10)+320)*(Nat.card K:ℝ)^5/B.card) + ((320/c+320)*(Nat.card K:ℝ)^5/A.card) c M) + (Finset.univ.filter fun out=>Excludes a (out.map Prod.snd))≤ + (50*(Nat.card K:ℝ)/(9*((9:ℝ)/10*δ)))*(((B₀.filter (Incident a)).card:ℝ)/B₀.card)) := by + rw [finiteNode_law] + have hn (W : Finset (ℙ K V)) (hW : ¬CaptureBound A UA c M W) : + finiteNodeNextLaw A UA B UB H ⟨_,hnA⟩ ⟨_,hnB⟩ (Nat.card K) + ((320/((9:ℝ)/10)+320)*(Nat.card K:ℝ)^5/B.card) + ((320/c+320)*(Nat.card K:ℝ)^5/A.card) c M (some W)=pureLaw none := by + unfold finiteNodeNextLaw finiteNodeNextOut + simp only [Option.bind_some,dite_eq_right hW] + exact map_const _ none + constructor + · intro b + have hnon : 0≤(50*(Nat.card K:ℝ)/(9*(c*δ)))*(((A₀.filter fun a=>Incident a b).card:ℝ)/A₀.card) := by positivity + apply optionCompose_event_le _ _ _ (by simp [Excludes]) _ hnon + intro W _ + by_cases hW : CaptureBound A UA c M W + · rw [finiteNodeNextLaw_produced A UA B UB hA hB c M hc W hW H hnA hnB] + exact (producedPair_original hd hq A A₀ UA hA hAA₀ hAU B B₀ UB hB hBB₀ hBU + c δ M hc hc9 hδ htrimA htrimB W hW hsparse).1 b + · rw [hn W hW] + have he : eventMass (pureLaw (none : Option (Finset (ℙ K (Dual K V))×Finset (ℙ K V)))) + (Finset.univ.filter fun out=>Excludes b (out.map Prod.fst))=0 := by + unfold eventMass + apply Finset.sum_eq_zero + intro out hout + have hp := (Finset.mem_filter.mp hout).2 + cases out <;> simp_all [pureLaw,Excludes] + rw [he] + exact hnon + · intro a + have hnon : 0≤(50*(Nat.card K:ℝ)/(9*((9:ℝ)/10*δ)))*(((B₀.filter (Incident a)).card:ℝ)/B₀.card) := by positivity + apply optionCompose_event_le _ _ _ (by simp [Excludes]) _ hnon + intro W _ + by_cases hW : CaptureBound A UA c M W + · rw [finiteNodeNextLaw_produced A UA B UB hA hB c M hc W hW H hnA hnB] + exact (producedPair_original hd hq A A₀ UA hA hAA₀ hAU B B₀ UB hB hBB₀ hBU + c δ M hc hc9 hδ htrimA htrimB W hW hsparse).2 a + · rw [hn W hW] + have he : eventMass (pureLaw (none : Option (Finset (ℙ K (Dual K V))×Finset (ℙ K V)))) + (Finset.univ.filter fun out=>Excludes a (out.map Prod.snd))=0 := by + unfold eventMass + apply Finset.sum_eq_zero + intro out hout + have hp := (Finset.mem_filter.mp hout).2 + cases out <;> simp_all [pureLaw,Excludes] + rw [he] + exact hnon + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ProjectiveEquiv.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ProjectiveEquiv.lean new file mode 100644 index 0000000000000000000000000000000000000000..6efb56c7d7afe6a9a1f446278c4c148321adbddc --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ProjectiveEquiv.lean @@ -0,0 +1,67 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.Q + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ProjectiveIncidence +open Module +open scoped LinearAlgebra.Projectivization Classical +variable {K V W : Type*} [Field K] [AddCommGroup V] [Module K V] + [AddCommGroup W] [Module K W] + +noncomputable def projectiveEquiv (e : V ≃ₗ[K] W) : ℙ K V ≃ ℙ K W := + Equiv.ofBijective (Projectivization.map e.toLinearMap e.injective) ⟨ + Projectivization.map_injective e.toLinearMap e.injective, by + intro p + refine ⟨Projectivization.mk K (e.symm p.rep) (fun h => p.rep_nonzero ?_), ?_⟩ + · have he := congrArg e h + simpa only [e.apply_symm_apply,map_zero] using he + · rw [Projectivization.map_mk] + simp only [LinearEquiv.coe_coe,e.apply_symm_apply,Projectivization.mk_rep]⟩ + +lemma incident_mk_right (a : ℙ K V) (f : Module.Dual K V) (hf : f ≠ 0) : + Incident a (Projectivization.mk K f hf) ↔ f a.rep = 0 := by + obtain ⟨c,hc⟩ := Projectivization.exists_smul_eq_mk_rep K f hf + rw [incident_iff,←hc] + simp only [LinearMap.smul_apply,Units.smul_def,smul_eq_mul,mul_eq_zero, + Units.ne_zero,false_or] + +variable [FiniteDimensional K V] + +lemma incident_eval (a : ℙ K V) (b : ℙ K (Module.Dual K V)) : + Incident b (projectiveEquiv (Module.evalEquiv K V) a) ↔ Incident a b := by + change Incident b (Projectivization.map (Module.evalEquiv K V).toLinearMap (Module.evalEquiv K V).injective a) ↔ _ + conv_lhs => rw [←a.mk_rep,Projectivization.map_mk,incident_mk_right] + rw [incident_iff] + rfl + +variable [Finite K] [Fintype (ℙ K V)] [Fintype (ℙ K (Module.Dual K V))] + +noncomputable def weightOnPencil (w : ℙ K (Module.Dual K V) → ℝ) (a : ℙ K V) : ℝ := + ∑ b, incidenceEntry a b * w b + +omit [Finite K] [Fintype (ℙ K V)] in +lemma weightOnPencil_eq (w : ℙ K (Module.Dual K V) → ℝ) (a : ℙ K V) : + weightOnPencil w a = weightOnHyperplane w (projectiveEquiv (Module.evalEquiv K V) a) := by + unfold weightOnPencil weightOnHyperplane + apply Finset.sum_congr rfl + intro b _ + simp only [incidenceEntry,incident_eval] + +theorem pencil_variance {d : ℕ} (hdim : finrank K V = d+1) (hd : 1 ≤ d) + (w : ℙ K (Module.Dual K V) → ℝ) : + ∑ a, (weightOnPencil w a - + ((Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d)*(∑ b,w b))^2 ≤ + (Nat.card K:ℝ)^(d-1)*∑ b,w b^2 := by + let : Finite (Module.Dual K (Module.Dual K V)) := Module.finite_of_finite K + let := Fintype.ofFinite (ℙ K (Module.Dual K (Module.Dual K V))) + have hd' : finrank K (Module.Dual K V) = d+1 := by simpa only [Subspace.dual_finrank_eq] using hdim + have h := incidence_variance hd' hd w + rw [←(projectiveEquiv (Module.evalEquiv K V)).sum_comp] at h + simpa only [←weightOnPencil_eq] using h + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ProjectiveExpectedLevelLoss.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ProjectiveExpectedLevelLoss.lean new file mode 100644 index 0000000000000000000000000000000000000000..8da057fcea8a9699b088d65215b49dda0cd6436d --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ProjectiveExpectedLevelLoss.lean @@ -0,0 +1,155 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Bounds.DensityUpper +import OAI.Combinatorics.RamseyFive.Entropy.MapFst +import OAI.Combinatorics.RamseyFive.Entropy.LevelCellSubset + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Module.Dual K V))] + +theorem projective_expected_level_loss (hdim : finrank K V=5) + (p : Law ((ℙ K V)×(ℙ K (Dual K V)))) + (hp : ∀z,0 < p z→Incident z.1 z.2) (NA NB C : ℝ) + (hNA : 0 < NA) (hNB : 0 < NB) (hC : 0 < C) + (hA : ((support (first p)).card:ℝ) ≤ NA) (hB : ((support (second p)).card:ℝ) ≤ NB) + (hprod : NA*NB ≤ C^2*(Nat.card K:ℝ)^5) : + (∑n,levelLaw (first p) n*levelLoss (first p) NA n)+ + (∑n,levelLaw (second p) n*levelLoss (second p) NB n) ≤ + 2*(4*Real.log (Nat.card K)+Real.log C+Real.log (C+1)-entropy p+ + entropy (levelLaw (first p))+entropy (levelLaw (second p))) := by + let D : ℝ := Real.log (C+1)+(3:ℝ)/2*Real.log (Nat.card K)+(Real.log NA+Real.log NB)/2 + have hq : (0:ℝ) < Nat.card K := by exact_mod_cast Nat.zero_lt_of_lt (Finite.one_lt_card (α:=K)) + have he := expected_total_level_loss p NA NB D (by + intro n hn + let F := (support p).filter (fun z=>endpointLevels p z=n) + let A := levelCell (first p) n.1 + let B := levelCell (second p) n.2 + have hF : F.Nonempty := positive_level_pair_support p n hn + have hsub : F⊆(A×ˢB).filter (fun z=>Incident z.1 z.2) := level_pair_support_subset p Incident hp n + have hI : 0 < incidences A B := Finset.card_pos.mpr (hF.mono hsub) + have hAc : 0 < A.card := by + obtain ⟨z,hz⟩ := hF + exact Finset.card_pos.mpr ⟨z.1,(Finset.mem_product.mp (Finset.mem_filter.mp (hsub hz)).1).1⟩ + have hBc : 0 < B.card := by + obtain ⟨z,hz⟩ := hF + exact Finset.card_pos.mpr ⟨z.2,(Finset.mem_product.mp (Finset.mem_filter.mp (hsub hz)).1).2⟩ + have hAcR : (0:ℝ) < A.card := by exact_mod_cast hAc + have hBcR : (0:ℝ) < B.card := by exact_mod_cast hBc + have hAB : (A.card:ℝ)*B.card ≤ C^2*(Nat.card K:ℝ)^5 := + (mul_le_mul (levelCell_cap _ NA hA _) (levelCell_cap _ NB hB _) (Nat.cast_nonneg _) hNA.le).trans hprod + have hl := incidence_rectangle_log hdim A B C hC.le hAB hAc hBc hI + have hFc : (0:ℝ) < F.card := by exact_mod_cast Finset.card_pos.mpr hF + have hc : (F.card:ℝ) ≤ (incidences A B:ℝ) := by exact_mod_cast Finset.card_le_card hsub + have hf := (Real.log_le_log hFc hc).trans hl + change Real.log (F.card:ℝ) ≤ D-(Real.log (NA/(A.card:ℝ))+Real.log (NB/(B.card:ℝ)))/2 + rw [Real.log_div hNA.ne' hAcR.ne',Real.log_div hNB.ne' hBcR.ne'] + dsimp [D] + linarith) + have hlog := Real.log_le_log (mul_pos hNA hNB) hprod + rw [Real.log_mul hNA.ne' hNB.ne',Real.log_mul (pow_pos hC _).ne' (pow_pos hq _).ne', + Real.log_pow,Real.log_pow] at hlog + change (∑n,levelLaw (first p) n*levelLoss (first p) NA n)+ + (∑n,levelLaw (second p) n*levelLoss (second p) NB n) ≤ + 2*(D-entropy p+entropy (levelLaw (first p))+entropy (levelLaw (second p))) at he + dsimp only [D] at he + apply he.trans + norm_num only [Nat.cast_ofNat] at hlog + linarith only [hlog] + +lemma Q_le_power {q d : ℕ} (hq : 2 ≤ q) : (Q q d:ℝ) ≤ (q:ℝ)^(d+1) := by + have hg : (Q q d:ℝ)*((q:ℝ)-1)=(q:ℝ)^(d+1)-1 := by + simpa only [Q,Nat.cast_sum,Nat.cast_pow] using geom_sum_mul (q:ℝ) (d+1) + have hqR : (2:ℝ) ≤ q := by exact_mod_cast hq + have hn : (0:ℝ) ≤ Q q d := Nat.cast_nonneg _ + nlinarith [mul_nonneg hn (sub_nonneg.mpr hqR)] + +omit [FiniteDimensional K V] [Fintype (ℙ K (Dual K V))] in +lemma point_entropy_cap (hdim : finrank K V=5) (p : Law (ℙ K V)) : + entropy p ≤ 5*Real.log (Nat.card K) := by + have h := entropy_le_log_card p + rw [card_points (d:=4) hdim] at h + have hQ : (0:ℝ) < Q (Nat.card K) 4 := by exact_mod_cast Q_pos (Nat.card K) 4 + have hl := Real.log_le_log hQ (Q_le_power (d:=4) (by have:=Finite.one_lt_card (α:=K);omega)) + rw [Real.log_pow] at hl + norm_num at hl + exact h.trans hl + +omit [FiniteDimensional K V] [Fintype (ℙ K V)] in +lemma dual_entropy_cap (hdim : finrank K V=5) (p : Law (ℙ K (Dual K V))) : + entropy p ≤ 5*Real.log (Nat.card K) := by + have h := entropy_le_log_card p + rw [card_hyperplanes (d:=4) hdim] at h + have hQ : (0:ℝ) < Q (Nat.card K) 4 := by exact_mod_cast Q_pos (Nat.card K) 4 + have hl := Real.log_le_log hQ (Q_le_power (d:=4) (by have:=Finite.one_lt_card (α:=K);omega)) + rw [Real.log_pow] at hl + norm_num at hl + exact h.trans hl + +omit [FiniteDimensional K V] in +theorem projective_level_entropy (hdim : finrank K V=5) + (p : Law ((ℙ K V)×(ℙ K (Dual K V)))) : + entropy (levelLaw (first p))+entropy (levelLaw (second p)) ≤ + 2*(Real.log (5*Real.log (Nat.card K)+1)+1) := by + have hq : (1:ℝ) < Nat.card K := by exact_mod_cast Finite.one_lt_card (α:=K) + have hM : 0 < 5*Real.log (Nat.card K) := mul_pos (by norm_num) (Real.log_pos hq) + have h₁ := endpoint_level_entropy (first p) _ hM (point_entropy_cap hdim _) + have h₂ := endpoint_level_entropy (second p) _ hM (dual_entropy_cap hdim _) + linarith + +theorem endpoint_supports (hdim : finrank K V=5) + (p : Law ((ℙ K V)×(ℙ K (Dual K V)))) + (hp : ∀z,0 < p z→Incident z.1 z.2) (NA NB C k δ b : ℝ) + (hNA : 0 < NA) (hNB : 0 < NB) (hC : 0 < C) (hk : 0 < k) + (hA : ((support (first p)).card:ℝ) ≤ NA) + (hB : ((support (second p)).card:ℝ) ≤ NB) + (hprod : NA*NB ≤ C^2*(Nat.card K:ℝ)^5) + (hent : 4*Real.log (Nat.card K)-entropy p ≤ δ) + (GA : Finset (ℙ K V)) (GB : Finset (ℙ K (Dual K V))) + (hGA : eventMass (first p) GAᶜ ≤ b) (hGB : eventMass (second p) GBᶜ ≤ b) + (hsmall : 2*(δ+Real.log C+Real.log (C+1)+ + 2*(Real.log (5*Real.log (Nat.card K)+1)+1))/k+2*Real.exp 1*b ≤ (1:ℝ)/2) : + ∃μ : Law (Finset (ℙ K V)), ∃ν : Law (Finset (ℙ K (Dual K V))), + (∀A,0 < μ A→A⊆GA ∧ NA*Real.exp (-k)/2 ≤ (A.card:ℝ) ∧ (A.card:ℝ) ≤ NA) ∧ + (∀B,0 < ν B→B⊆GB ∧ NB*Real.exp (-k)/2 ≤ (B.card:ℝ) ∧ (B.card:ℝ) ≤ NB) ∧ + (∀a,(∑A,μ A*(if a∈A then 1/(A.card:ℝ) else 0)) ≤ 4*Real.exp 1*first p a) ∧ + (∀a,(∑B,ν B*(if a∈B then 1/(B.card:ℝ) else 0)) ≤ 4*Real.exp 1*second p a) := by + let T := 2*(δ+Real.log C+Real.log (C+1)+2*(Real.log (5*Real.log (Nat.card K)+1)+1)) + have hbound := projective_expected_level_loss hdim p hp NA NB C hNA hNB hC hA hB hprod + have hlevels := projective_level_entropy hdim p + have htotal : (∑n,levelLaw (first p) n*levelLoss (first p) NA n)+ + (∑n,levelLaw (second p) n*levelLoss (second p) NB n) ≤ T := by + dsimp only [T] + apply hbound.trans + linarith only [hent,hlevels] + have hnA : 0 ≤ ∑n,levelLaw (first p) n*levelLoss (first p) NA n := + Finset.sum_nonneg (fun n _=>mul_nonneg ((levelLaw _).nonneg n) + (levelLoss_nonneg _ NA hNA (levelCell_cap _ NA hA) n)) + have hnB : 0 ≤ ∑n,levelLaw (second p) n*levelLoss (second p) NB n := + Finset.sum_nonneg (fun n _=>mul_nonneg ((levelLaw _).nonneg n) + (levelLoss_nonneg _ NB hNB (levelCell_cap _ NB hB) n)) + have hsA : (∑n,levelLaw (first p) n*levelLoss (first p) NA n)/k+ + 2*Real.exp 1*eventMass (first p) GAᶜ ≤ (1:ℝ)/2 := by + apply le_trans (add_le_add (div_le_div_of_nonneg_right (by linarith : + (∑n,levelLaw (first p) n*levelLoss (first p) NA n) ≤ T) hk.le) + (mul_le_mul_of_nonneg_left hGA (by positivity))) hsmall + have hsB : (∑n,levelLaw (second p) n*levelLoss (second p) NB n)/k+ + 2*Real.exp 1*eventMass (second p) GBᶜ ≤ (1:ℝ)/2 := by + apply le_trans (add_le_add (div_le_div_of_nonneg_right (by linarith : + (∑n,levelLaw (second p) n*levelLoss (second p) NB n) ≤ T) hk.le) + (mul_le_mul_of_nonneg_left hGB (by positivity))) hsmall + have heA := permissible_half_mass (first p) GA NA k hNA hk (levelCell_cap _ NA hA) hsA + have heB := permissible_half_mass (second p) GB NB k hNB hk (levelCell_cap _ NB hB) hsB + refine ⟨goodSupportLaw (first p) GA NA k heA,goodSupportLaw (second p) GB NB k heB,?_,?_,?_,?_⟩ + · exact goodSupportLaw_bounds _ _ NA k hNA (levelCell_cap _ NA hA) heA + · exact goodSupportLaw_bounds _ _ NB k hNB (levelCell_cap _ NB hB) heB + · exact goodSupportLaw_domination _ _ NA k heA + · exact goodSupportLaw_domination _ _ NB k heB + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ProjectiveHighCapturedMoment.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ProjectiveHighCapturedMoment.lean new file mode 100644 index 0000000000000000000000000000000000000000..ea14e396aa2bc38c421db4e0b3a2cf66eb081d7c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ProjectiveHighCapturedMoment.lean @@ -0,0 +1,240 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.ScorePairCapturedNormalized +import OAI.Combinatorics.RamseyFive.Entropy.HighMomentBudget + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining HighPlaneBudget +open GlobalRadial PoissonScore WeightedPrograms +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +theorem projective_high_captured_moment (hdim : finrank K V=5) + {I : Type} [LinearOrder I] (T : Finset I) (hT : T.Nonempty) + (P : I → Submodule K V) (J₀ : ℕ) + (X₀ : Finset (ℙ K V)) + (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) (δ L : ℝ≥0) (hδ : 0 < δ) + (hS : S ⊆ X₀ \ remaining T hT (fun i => flatPoints (P i)) X₀ J₀) + (hO : ownCell T hT (fun i => flatPoints (P i)) X₀ J₀ x ⊆ O x) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) + (χ b base D₀ : ℝ) (hn : 0 < (X₀.card:ℝ)) (hb : 1 ≤ b) (hD : 0 ≤ D₀) + (hL : 10000 ≤ (L:ℝ)) (hbase : (23/25:ℝ) ≤ base) + (hcap : (X₀.card:ℝ) ≤ (Nat.card K:ℝ)^3) + (hscaleDensity : (X₀.card:ℝ)*(δ:ℝ) ≤ 4*Nat.card K) + (hhigh : 8388608*(Nat.card K:ℝ)^2 ≤ X₀.card) + (hchi : (34359738369*2^200:ℝ) ≤ Real.exp χ) + (hmass : (δ:ℝ)*S.card ≤ Nat.card K) + (hm : ∀ H : F,mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H) ≤ 2) + (hlower : ∀ H : F,(3/4:ℝ) ≤ mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H)) + (hdelta : ∀ H : F,|mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H)-base| ≤ 17/100) + (Lines : Finset (Submodule K V)) (hLines : ∀ l : RadialLine x,l.val∈Lines) + (Q : Finset (ℙ K V)) (hx : x∈Q) + (Planes : Finset (Submodule K V)) (hPlanes : ∀ A∈Planes,finrank K A=3) + (hcomplete : ∀ A : Submodule K V,finrank K A=3 → A∈Planes) + (hgood : ∀ i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + x∉badCenters S O δ (((δ:ℝ)*2^i)/2) Lines Q + ((Nat.card K:ℝ)^4/X₀.card^2*Real.exp χ/(((δ:ℝ)*2^i)/2)^100)) + (hcaptured : ∀ i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + 2097152*(Nat.card K:ℝ)^2 ≤ X₀.card*((δ:ℝ)*2^i)^2 → + x∉highExceptions T hT P X₀ Planes J₀ ((δ:ℝ)*2^i) χ Q) + {p : ℕ} (hp : 0 < p) (R h : ℕ) (hKR : 200 ≤ R/2) (hh : 0 < h) + (hsize : h ≤ (R/2-5000)/(2*200)) (herr : (p:ℝ)*h*(19/20:ℝ)^(h-1) < 1/2) + (own : F→Fin R→Bool) + (hDsum : (∑ H : F,SingletonEnumeration.independentWeight + (radialWeight x (outsideAt x S (O x)) δ) (fun d => L*radialWeight x (outsideAt x S (O x)) δ d) + (pencilLines x F) R 5000 base H) ≤ D₀) + (hcost : D₀+2*((p+1:ℝ)*pencilHighBudget (Nat.card K) (outsideAt x S (O x)).card (X₀.card:ℝ) χ b L p R) ≤ + geometryScale (Nat.card K) (X₀.card:ℝ)*Real.exp (((L:ℝ)*R)/5)) + (hp2 : (p:ℝ)^2 ≤ Real.exp (((L:ℝ)*R)/10)) + (hA : 2 ≤ geometryScale (Nat.card K) (X₀.card:ℝ)*Real.exp (-((L:ℝ)*R))) + (hscale : 16*((Nat.card K:ℝ)+1) ≤ + (geometryScale (Nat.card K) (X₀.card:ℝ)*Real.exp (-((L:ℝ)*R)))*(1/(100*(p:ℝ)))^2) + (hstrong : x∉badCenters S O δ ((1/(100*(p:ℝ)))/2) Lines Q 1) + (hpairScalar : (pencilAlphabet (Nat.card K) 4:ℝ)+ + (dyadFactor (outsideAt x S (O x)).card χ*(geometryScale (Nat.card K) (X₀.card:ℝ))^2)/(1/(100*(p:ℝ)))^200 ≤ + (geometryScale (Nat.card K) (X₀.card:ℝ))^2*Real.exp (((L:ℝ)*R)/10)) : + (∫ ω, HighMoment.allTrunc R 5000 ω*(∑ H : F,scoreTerm (pencilLines x F H) (Real.exp (-(L:ℝ)*base)) (own H) + (fun r d => ω (r,d)))^p + ∂batchMeasure (fun i : Fin R×RadialLine x => L*radialWeight x (outsideAt x S (O x)) δ i.2)) ≤ + (geometryScale (Nat.card K) (X₀.card:ℝ))^p*Real.exp (-(1/10:ℝ)*(p*((L:ℝ)*R))) := by + have hn' : 0 < X₀.card := by exact_mod_cast hn + have hχ : 0 ≤ χ := Real.one_le_exp_iff.mp (le_trans (by norm_num) hchi) + have hrowchi : (208*2^198:ℝ) ≤ Real.exp (2*χ) := + le_trans (le_trans (by norm_num) hchi) (Real.exp_le_exp.mpr (by linarith)) + apply projective_high_moment_from_pairs x hdim S O δ L hδ F hF X₀.card χ b base D₀ + hn hb hD hL hbase hcap hscaleDensity hrowchi hm hlower hdelta Lines hLines Q hx + ?_ hp R h hKR hh hsize herr own hDsum hcost hp2 hA hscale hstrong hpairScalar + simpa only [dyadFactor,geometryScale,mul_assoc,mul_left_comm,mul_comm] using + score_pair_captured_moment x hdim T hT P X₀ S O J₀ hS hO δ hδ F hF + Planes hPlanes hcomplete χ Q hx hn' hcap hscaleDensity hhigh hchi hmass + Lines hLines hm hgood hcaptured 200 le_rfl + +theorem projective_high_residual_moment (hdim : finrank K V=5) + (X₀ : Finset (ℙ K V)) + (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) (δ L : ℝ≥0) (hδ : 0 < δ) + (hS : S ⊆ X₀) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) + (χ b base D₀ : ℝ) (hn : 0 < (X₀.card:ℝ)) (hb : 1 ≤ b) (hD : 0 ≤ D₀) + (hL : 10000 ≤ (L:ℝ)) (hbase : (23/25:ℝ) ≤ base) + (hcap : (X₀.card:ℝ) ≤ (Nat.card K:ℝ)^3) + (hscaleDensity : (X₀.card:ℝ)*(δ:ℝ) ≤ 4*Nat.card K) + (hhigh : 8388608*(Nat.card K:ℝ)^2 ≤ X₀.card) + (hchi : (34359738369*2^200:ℝ) ≤ Real.exp χ) + (hmass : (δ:ℝ)*S.card ≤ Nat.card K) + (hm : ∀ H : F,mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H) ≤ 2) + (hlower : ∀ H : F,(3/4:ℝ) ≤ mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H)) + (hdelta : ∀ H : F,|mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H)-base| ≤ 17/100) + (Lines : Finset (Submodule K V)) (hLines : ∀ l : RadialLine x,l.val∈Lines) + (Q : Finset (ℙ K V)) (hx : x∈Q) + (Planes : Finset (Submodule K V)) (hPlanes : ∀ A∈Planes,finrank K A=3) + (hcomplete : ∀ A : Submodule K V,finrank K A=3 → A∈Planes) + (hgood : ∀ i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + x∉badCenters S O δ (((δ:ℝ)*2^i)/2) Lines Q + ((Nat.card K:ℝ)^4/X₀.card^2*Real.exp χ/(((δ:ℝ)*2^i)/2)^100)) + (hresidual : ∀ i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + 2097152*(Nat.card K:ℝ)^2 ≤ X₀.card*((δ:ℝ)*2^i)^2 → + x∉residualExceptions Planes X₀ Q ((δ:ℝ)*2^i) χ) + {p : ℕ} (hp : 0 < p) (R h : ℕ) (hKR : 200 ≤ R/2) (hh : 0 < h) + (hsize : h ≤ (R/2-5000)/(2*200)) (herr : (p:ℝ)*h*(19/20:ℝ)^(h-1) < 1/2) + (own : F→Fin R→Bool) + (hDsum : (∑ H : F,SingletonEnumeration.independentWeight + (radialWeight x (outsideAt x S (O x)) δ) (fun d => L*radialWeight x (outsideAt x S (O x)) δ d) + (pencilLines x F) R 5000 base H) ≤ D₀) + (hcost : D₀+2*((p+1:ℝ)*pencilHighBudget (Nat.card K) (outsideAt x S (O x)).card (X₀.card:ℝ) χ b L p R) ≤ + geometryScale (Nat.card K) (X₀.card:ℝ)*Real.exp (((L:ℝ)*R)/5)) + (hp2 : (p:ℝ)^2 ≤ Real.exp (((L:ℝ)*R)/10)) + (hA : 2 ≤ geometryScale (Nat.card K) (X₀.card:ℝ)*Real.exp (-((L:ℝ)*R))) + (hscale : 16*((Nat.card K:ℝ)+1) ≤ + (geometryScale (Nat.card K) (X₀.card:ℝ)*Real.exp (-((L:ℝ)*R)))*(1/(100*(p:ℝ)))^2) + (hstrong : x∉badCenters S O δ ((1/(100*(p:ℝ)))/2) Lines Q 1) + (hpairScalar : (pencilAlphabet (Nat.card K) 4:ℝ)+ + (dyadFactor (outsideAt x S (O x)).card χ*(geometryScale (Nat.card K) (X₀.card:ℝ))^2)/(1/(100*(p:ℝ)))^200 ≤ + (geometryScale (Nat.card K) (X₀.card:ℝ))^2*Real.exp (((L:ℝ)*R)/10)) : + (∫ ω, HighMoment.allTrunc R 5000 ω*(∑ H : F,scoreTerm (pencilLines x F H) (Real.exp (-(L:ℝ)*base)) (own H) + (fun r d => ω (r,d)))^p + ∂batchMeasure (fun i : Fin R×RadialLine x => L*radialWeight x (outsideAt x S (O x)) δ i.2)) ≤ + (geometryScale (Nat.card K) (X₀.card:ℝ))^p*Real.exp (-(1/10:ℝ)*(p*((L:ℝ)*R))) := by + have hn' : 0 < X₀.card := by exact_mod_cast hn + have hχ : 0 ≤ χ := Real.one_le_exp_iff.mp (le_trans (by norm_num) hchi) + have hrowchi : (208*2^198:ℝ) ≤ Real.exp (2*χ) := + le_trans (le_trans (by norm_num) hchi) (Real.exp_le_exp.mpr (by linarith)) + apply projective_high_moment_from_pairs x hdim S O δ L hδ F hF X₀.card χ b base D₀ + hn hb hD hL hbase hcap hscaleDensity hrowchi hm hlower hdelta Lines hLines Q hx + ?_ hp R h hKR hh hsize herr own hDsum hcost hp2 hA hscale hstrong hpairScalar + simpa only [dyadFactor,geometryScale,mul_assoc,mul_left_comm,mul_comm] using + score_pair_residual_moment x hdim X₀ S O hS δ hδ F hF + Planes hPlanes hcomplete χ Q hx hn' hcap hscaleDensity hhigh hchi hmass + Lines hLines hm hgood hresidual 200 le_rfl + +end + +open Module ProjectiveIncidence ProjectiveTraining GlobalRadial PoissonScore DyadicMoments +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +lemma radial_tail_off_exception (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ : ℝ≥0) (a D : ℝ) (Lines : Finset (Submodule K V)) + (hLines : ∀ l : RadialLine x,l.val∈Lines) (Q : Finset (ℙ K V)) (hx : x∈Q) + (hgood : x∉badCenters S O δ a Lines Q D) : + ((Finset.univ.filter fun l : RadialLine x => + a ≤ (radialWeight x (outsideAt x S (O x)) δ l:ℝ)).card:ℝ) < D := by + let A := Finset.univ.filter fun l : RadialLine x => + a ≤ (radialWeight x (outsideAt x S (O x)) δ l:ℝ) + let E := localLines S O δ a Lines x + let f (l : A) : E := ⟨l.val.val,by + refine Finset.mem_filter.mpr ⟨hLines l.val,Finset.mem_filter.mpr ⟨?_,?_⟩⟩ + · exact (mem_flatPoints _ _).mpr l.val.property.2 + · have hr := (Finset.mem_filter.mp l.property).2 + change a ≤ (δ:ℝ)*(((outsideAt x S (O x)).filter fun y => y.val.submodule ≤ l.val.val).card:ℝ) at hr + rwa [outsideAt_filter_card] at hr⟩ + have hi : Function.Injective f := by + intro l m he + exact Subtype.ext (Subtype.ext (congrArg (fun z : E => z.val) he)) + have hc : A.card ≤ E.card := by + simpa only [Fintype.card_coe] using Fintype.card_le_of_injective f hi + have he : (E.card:ℝ) < D := by + by_contra hn + exact hgood (Finset.mem_filter.mpr ⟨hx,le_of_not_gt hn⟩) + exact lt_of_le_of_lt (by exact_mod_cast hc) he + +omit [FiniteDimensional K V] [Finite K] [Fintype (RadialLine x)] in +lemma radial_bounded_cover (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (M : ℝ) (hmax : ∀ l : RadialLine x,(radialWeight x X δ l:ℝ) ≤ M) + (l : RadialLine x) (hp : 0 < (radialWeight x X δ l:ℝ)) : + ∃ i∈boundedOverlapDyads x X δ M, + (δ:ℝ)*2^i ≤ (radialWeight x X δ l:ℝ) ∧ + (radialWeight x X δ l:ℝ) ≤ 2*((δ:ℝ)*2^i) := by + have hc : 0 < (RadialLine.trainingOnLine X l).card := by + by_contra hn + have hz : (RadialLine.trainingOnLine X l).card=0 := by omega + simp [radialWeight,hz] at hp + have hfloor : (δ:ℝ) ≤ (radialWeight x X δ l:ℝ) := by + have hh : (1:ℝ) ≤ (RadialLine.trainingOnLine X l).card := by exact_mod_cast hc + simpa only [radialWeight,NNReal.coe_mul,NNReal.coe_natCast,mul_one] using + mul_le_mul_of_nonneg_left hh δ.coe_nonneg + have hbound : (radialWeight x X δ l:ℝ) ≤ (δ:ℝ)*2^Nat.clog 2 X.card := by + have hh : (RadialLine.trainingOnLine X l).card ≤ 2^Nat.clog 2 X.card := + (Finset.card_filter_le _ _).trans (Nat.le_pow_clog (by norm_num) X.card) + change (δ:ℝ)*((RadialLine.trainingOnLine X l).card:ℝ) ≤ (δ:ℝ)*(2:ℝ)^Nat.clog 2 X.card + exact mul_le_mul_of_nonneg_left (by exact_mod_cast hh) δ.coe_nonneg + obtain ⟨i,hi,hlo,hhi⟩ := dyadic_cover δ _ δ.coe_nonneg hfloor _ hbound + exact ⟨i,Finset.mem_filter.mpr ⟨hi,hlo.trans (hmax l)⟩,hlo,hhi⟩ + +theorem radial_high_moment (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ : ℝ≥0) (hδ : 0 < δ) (n χ : ℝ) (hn : 0 < n) + (hmax : (δ:ℝ)*((Nat.card K:ℝ)+1) ≤ 2) + (Lines : Finset (Submodule K V)) (hLines : ∀ l : RadialLine x,l.val∈Lines) + (Q : Finset (ℙ K V)) (hx : x∈Q) + (hgood : ∀ i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + x∉badCenters S O δ (((δ:ℝ)*2^i)/2) Lines Q + ((Nat.card K:ℝ)^4/n^2*Real.exp χ/(((δ:ℝ)*2^i)/2)^100)) + (J : ℕ) (hJ : 100 ≤ J) : + (∑ l : RadialLine x,(radialWeight x (outsideAt x S (O x)) δ l:ℝ)^J) ≤ + ((δ:ℝ)*((Nat.card K:ℝ)+1))^(J-100)* + (2^200*(Nat.clog 2 (outsideAt x S (O x)).card+1)*((Nat.card K:ℝ)^4/n^2*Real.exp χ)) := by + let X := outsideAt x S (O x) + let A := (Nat.card K:ℝ)^4/n^2*Real.exp χ + have hm (l : RadialLine x) : (radialWeight x X δ l:ℝ) ≤ (δ:ℝ)*((Nat.card K:ℝ)+1) := by + have hh : ((RadialLine.trainingOnLine X l).card:ℝ) ≤ (Nat.card K:ℝ)+1 := by + exact_mod_cast training_line_card x X l + exact mul_le_mul_of_nonneg_left hh δ.coe_nonneg + have hpoly : (∑ l : RadialLine x,(radialWeight x X δ l:ℝ)^100) ≤ + 2^200*(Nat.clog 2 X.card+1)*A := by + have hh := moment_polynomial_tail (fun l : RadialLine x => (radialWeight x X δ l:ℝ)) + (fun i : ℕ => (δ:ℝ)*2^i) (boundedOverlapDyads x X δ 2) 100 (by norm_num) (2^100*A) + (fun l => NNReal.coe_nonneg _) (by intro i _; positivity) + (radial_bounded_cover x X δ 2 (fun l => (hm l).trans hmax)) ?_ + · apply hh.trans + have hc : ((boundedOverlapDyads x X δ 2).card:ℝ) ≤ Nat.clog 2 X.card+1 := by + exact_mod_cast boundedOverlapDyads_card x X δ 2 + have hA : 0 ≤ A := by dsimp [A]; positivity + calc + _ ≤ (2:ℝ)^100*(Nat.clog 2 X.card+1)*(2^100*A) := + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hc (pow_nonneg (by norm_num) 100)) (mul_nonneg (pow_nonneg (by norm_num) 100) hA) + _ = _ := by ring + · intro i hi + let a : ℝ := (δ:ℝ)*2^i + have ha : 0 < a := by dsimp [a]; positivity + have ht := radial_tail_off_exception x S O δ (a/2) (A/(a/2)^100) Lines hLines Q hx (hgood i hi) + have hcard : ((Finset.univ.filter fun l : RadialLine x => a ≤ (radialWeight x X δ l:ℝ)).card:ℝ) ≤ + ((Finset.univ.filter fun l : RadialLine x => a/2 ≤ (radialWeight x X δ l:ℝ)).card:ℝ) := by + apply Nat.cast_le.mpr + apply Finset.card_le_card + intro l hl + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,(by linarith : a/2 ≤ a).trans (Finset.mem_filter.mp hl).2⟩ + calc + _ ≤ (A/(a/2)^100)*a^100 := mul_le_mul_of_nonneg_right (hcard.trans ht.le) (pow_nonneg ha.le _) + _ = 2^100*A := by field_simp + exact pow_sum_from_lower _ _ _ 100 J (by positivity) hJ (fun l => NNReal.coe_nonneg _) hm hpoly + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ProjectiveLinePairPacking.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ProjectiveLinePairPacking.lean new file mode 100644 index 0000000000000000000000000000000000000000..49a2a5e91c77b16c6f67ca98db48fbe05aa8cbbf --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ProjectiveLinePairPacking.lean @@ -0,0 +1,52 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.MemPairRank + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open scoped BigOperators +open MeasureTheory ProbabilityTheory +open scoped BigOperators ENNReal NNReal +namespace SharpRamseyFive.AffineRealization +open Module +open scoped LinearAlgebra.Projectivization Classical +variable {K I ι J : Type*} [Field K] [Fintype I] [Fintype ι] [Fintype J] + +theorem projective_line_pair_packing + (p : ι → ℙ K (I → K)) (hp : Function.Injective p) + (W : J → Submodule K (I → K)) (hW : ∀ l, finrank K (W l) = 2) + (hWinj : Function.Injective W) (M : ℕ) + (hM : ∀ l, M ≤ (Finset.univ.filter (fun k => (p k).rep ∈ W l)).card) : + Fintype.card J * (M * (M-1)) ≤ (Fintype.card ι)^2 := by + classical + let A (l : J) : Finset ι := Finset.univ.filter (fun k => (p k).rep ∈ W l) + have hd : (↑(Finset.univ : Finset J) : Set J).PairwiseDisjoint (fun l => (A l).offDiag) := by + intro l hl m hm hlm + apply Finset.disjoint_left.mpr + intro z hz hz' + obtain ⟨hi, hj, hij⟩ := Finset.mem_offDiag.mp hz + obtain ⟨hi', hj', _⟩ := Finset.mem_offDiag.mp hz' + apply hlm + apply hWinj + rw [← span_pair_eq_line p hp _ (hW l) hij (Finset.mem_filter.mp hi).2 + (Finset.mem_filter.mp hj).2, + ← span_pair_eq_line p hp _ (hW m) hij (Finset.mem_filter.mp hi').2 + (Finset.mem_filter.mp hj').2] + calc + Fintype.card J * (M * (M-1)) = ∑ _l : J, M * (M-1) := by simp + _ ≤ ∑ l : J, (A l).offDiag.card := by + apply Finset.sum_le_sum + intro l hl + rw [Finset.offDiag_card] + have he (n : ℕ) : n*n-n = n*(n-1) := by rw [Nat.mul_sub_left_distrib, mul_one] + rw [he] + exact Nat.mul_le_mul (hM l) (Nat.sub_le_sub_right (hM l) 1) + _ = (Finset.univ.biUnion (fun l => (A l).offDiag)).card := (Finset.card_biUnion hd).symm + _ ≤ Fintype.card (ι × ι) := Finset.card_le_univ _ + _ = (Fintype.card ι)^2 := by simp [pow_two] +end SharpRamseyFive.AffineRealization + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/PublicDecoder.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/PublicDecoder.lean new file mode 100644 index 0000000000000000000000000000000000000000..e48cdd4b08e92aab647d447fd84fb8ff1bddc724 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/PublicDecoder.lean @@ -0,0 +1,171 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.SampledPoints +import OAI.Combinatorics.RamseyFive.Probability.MeasurePublicTable +import OAI.Combinatorics.RamseyFive.Probability.PoissonProposal + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory ProbabilityTheory PoissonScore ScoreAcceptance +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def publicScore (O : Finset (ℙ K V)) (F : Finset (ℙ K (Dual K V))) + {R : ℕ} (b : ℝ) (ω : Fin R→ℙ K V→ℕ) : ℝ := + ∑ H : F, ∏ r, (if (∀ y,y∈O → Incident y H.val → ω r y=0) then 1 else 0)* + ((if (∀ y,y∉O → Incident y H.val → ω r y=0) then 1 else 0)-b) + +noncomputable def publicSamples (U : Finset (ℙ K V)) {R : ℕ} + (ω : Fin R→ℙ K V→ℕ) : Finset (ℙ K V) := + U.filter fun x=>∃r,ω r x≠0 + +noncomputable def publicDecoded (U : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (b : ℙ K V→ℝ) (z : ℕ) {R : ℕ} (ω : Fin R→ℙ K V→ℕ) : Finset (ℙ K V) := + accepted U (publicSamples U ω) (fun x=>publicScore (O x) (pencil x) (b x) ω) + ((z:ℝ)/(2*(Nat.card K:ℝ))) + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma support_forall_restrict (S : Finset (ℙ K V)) {R : ℕ} + (ω : Fin R→ℙ K V→ℕ) (hω : ∀r y,y∉S → ω r y=0) + (r : Fin R) (P : ℙ K V→Prop) : + (∀y,P y→ω r y=0) ↔ ∀y:S,P y.val→ω r y=0 := by + constructor + · intro h y;exact h y + · intro h y hy + by_cases hs : y∈S + · exact h ⟨y,hs⟩ hy + · exact hω r y hs + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K (Dual K V))] in +lemma publicScore_restrict (S O rawO : Finset (ℙ K V)) + (hO : S∩rawO=O) (F : Finset (ℙ K (Dual K V))) {R : ℕ} + (b : ℝ) (ω : Fin R→ℙ K V→ℕ) (hω : ∀r y,y∉S → ω r y=0) : + publicScore rawO F b ω=pointScore S O F b (fun r y=>ω r y) := by + unfold publicScore pointScore + apply Finset.sum_congr rfl + intro H _ + apply Finset.prod_congr rfl + intro r _ + have ho (y : S) : y.val∈rawO ↔ y.val∈O := by + rw [←hO,Finset.mem_inter] + exact ⟨fun h=>⟨y.prop,h⟩,And.right⟩ + have ha : (∀y,y∈rawO → Incident y H.val → ω r y=0) ↔ + (∀y:S,y.val∈O → Incident y.val H.val → ω r y=0) := by + constructor + · intro h y hy hI;exact h y ((ho y).mpr hy) hI + · intro h y hy hI + by_cases hs : y∈S + · exact h ⟨y,hs⟩ ((ho ⟨y,hs⟩).mp hy) hI + · exact hω r y hs + have hb : (∀y,y∉rawO → Incident y H.val → ω r y=0) ↔ + (∀y:S,y.val∉O → Incident y.val H.val → ω r y=0) := by + constructor + · intro h y hy hI;exact h y (fun hh=>hy ((ho y).mp hh)) hI + · intro h y hy hI + by_cases hs : y∈S + · exact h ⟨y,hs⟩ (fun hh=>hy ((ho ⟨y,hs⟩).mpr hh)) hI + · exact hω r y hs + simp only [ha,hb] + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma publicSamples_restrict (U S : Finset (ℙ K V)) (hSU : S⊆U) {R : ℕ} + (ω : Fin R→ℙ K V→ℕ) (hω : ∀r y,y∉S → ω r y=0) : + publicSamples U ω=sampledPoints S (fun r y=>ω r y) := by + ext x + rw [←not_iff_not] + rw [not_mem_sampledPoints] + simp only [publicSamples,Finset.mem_filter,not_and,not_exists,not_not] + constructor + · intro h r y hxy + subst x + exact h (hSU y.prop) r + · intro h hx r + by_cases hs : x∈S + · exact h r ⟨x,hs⟩ rfl + · exact hω r x hs + +omit [Finite K] [FiniteDimensional K V] in +lemma publicDecoded_restrict (U S : Finset (ℙ K V)) (hSU : S⊆U) + (O rawO : ℙ K V→Finset (ℙ K V)) (hO : ∀x,S∩rawO x=O x) + (b : ℙ K V→ℝ) (z : ℕ) {R : ℕ} + (ω : Fin R→ℙ K V→ℕ) (hω : ∀r y,y∉S → ω r y=0) : + publicDecoded U rawO b z ω=decoded U S O b z (fun r y=>ω r y) := by + unfold publicDecoded decoded + rw [publicSamples_restrict U S hSU ω hω] + congr 1 + funext x + exact publicScore_restrict S (O x) (rawO x) (hO x) (pencil x) (b x) ω hω + +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.PoissonScore +open MeasureTheory ProbabilityTheory MeasurePublicTable +open scoped BigOperators NNReal Classical +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +lemma enclosure_success_mass (S U : Finset ι) (hS : S.Nonempty) (hSU : S⊆U) + (rho : ℝ≥0) (R : ℕ) (K A : ℝ) (E : Set (Fin R→S→ℕ)) + (hsize : ∀ω∈E,(sampleCount ω:ℝ)≤K) + (hprob : Real.exp (-A)≤(scheduleMeasure (fun _ : S=>rho/(S.card:ℝ≥0)) R).real E) : + Real.exp (-(Real.log ((U.card:ℝ)/S.card)*K+A))≤ + (scheduleMeasure (fun i=>if i∈U then rho/(U.card:ℝ≥0) else 0) R).real (ambientSuccess S E) := by + have hh := enclosure_hidden_event_likelihood S U hS hSU rho R K E hsize + calc + _ = Real.exp (-Real.log ((U.card:ℝ)/S.card)*K)*Real.exp (-A) := by rw [←Real.exp_add];congr 1;ring + _ ≤ _ := (mul_le_mul_of_nonneg_left hprob (Real.exp_nonneg _)).trans hh + +theorem enclosure_search_failure (S U : Finset ι) (hS : S.Nonempty) (hSU : S⊆U) + (rho : ℝ≥0) (R : ℕ) (K A q : ℝ) (hq : 0≤q) (E : Set (Fin R→S→ℕ)) + (hsize : ∀ω∈E,(sampleCount ω:ℝ)≤K) + (hprob : Real.exp (-A)≤(scheduleMeasure (fun _ : S=>rho/(S.card:ℝ≥0)) R).real E) : + let N := ⌈q*Real.exp (Real.log ((U.card:ℝ)/S.card)*K+A)⌉₊ + (Measure.pi (fun _ : Fin N=>scheduleMeasure (fun i=>if i∈U then rho/(U.card:ℝ≥0) else 0) R)).real + {t | firstIndex (ambientSuccess S E) t=none}≤Real.exp (-q) := by + dsimp only + exact finite_cutoff_failure _ _ (Set.to_countable _ |>.measurableSet) hq _ + (enclosure_success_mass S U hS hSU rho R K A E hsize hprob) (Nat.le_ceil _) + +end SharpRamseyFive.PoissonScore + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory ProbabilityTheory PoissonScore ScoreAcceptance MeasurePublicTable +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def trueScoreSuccess (U S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (b : ℙ K V→ℝ) (E : Finset (ℙ K (Dual K V))) (R : ℕ) (s M c : ℝ) : Set (Fin R→S→ℕ) := + {ω | let W := decoded U S O b (emptyTests E (hyperplaneSupport S) ω).card ω + (sampleCount ω:ℝ)≤ s ∧ (W.card:ℝ)≤ M ∧ c≤((W∩S).card:ℝ)} + +omit [Finite K] [FiniteDimensional K V] in +theorem public_table_decodes (U S : Finset (ℙ K V)) (hSU : S⊆U) + (O rawO : ℙ K V→Finset (ℙ K V)) (hO : ∀x,S∩rawO x=O x) + (b : ℙ K V→ℝ) (E : Finset (ℙ K (Dual K V))) (R : ℕ) (s M c : ℝ) + {N : ℕ} (t : Fin N→Fin R→ℙ K V→ℕ) {i : Fin N} + (hi : firstIndex (ambientSuccess S (trueScoreSuccess U S O b E R s M c)) t=some i) : + ∃ z ≤ E.card, (sampleCount (t i):ℝ)≤ s ∧ + ((publicDecoded U rawO b z (t i)).card:ℝ)≤ M ∧ + c≤(((publicDecoded U rawO b z (t i))∩S).card:ℝ) := by + have hh := firstIndex_some_mem _ t hi + change (∀r y,y∉S → t i r y=0) ∧ + (fun r (y : S)=>t i r y)∈trueScoreSuccess U S O b E R s M c at hh + let ω : Fin R→S→ℕ := fun r y=>t i r y + let z := (emptyTests E (hyperplaneSupport S) ω).card + refine ⟨z,Finset.card_le_card (Finset.filter_subset _ _),?_,?_,?_⟩ + · rw [sampleCount_restrict S (t i) hh.1] + exact hh.2.1 + · rw [publicDecoded_restrict U S hSU O rawO hO b z (t i) hh.1] + exact hh.2.2.1 + · rw [publicDecoded_restrict U S hSU O rawO hO b z (t i) hh.1] + exact hh.2.2.2 + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/Q.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/Q.lean new file mode 100644 index 0000000000000000000000000000000000000000..ff1e1f7f62fd610079b7938038ad37429cd080eb --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/Q.lean @@ -0,0 +1,270 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.SubspacePointsEquiv + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open scoped LinearAlgebra.Projectivization +open Module +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] +open scoped Classical +variable [Finite K] [FiniteDimensional K V] +variable [Fintype (ℙ K V)] [Fintype (ℙ K (Module.Dual K V))] + +theorem sum_weightOnHyperplane_sq (w : ℙ K V → ℝ) : + ∑ b, weightOnHyperplane w b ^ 2 = + (((∑ i ∈ Finset.range (finrank K V - 1), Nat.card K ^ i : ℕ) : ℝ) - + ((∑ i ∈ Finset.range (finrank K V - 2), Nat.card K ^ i : ℕ) : ℝ)) * + (∑ a, w a ^ 2) + + ((∑ i ∈ Finset.range (finrank K V - 2), Nat.card K ^ i : ℕ) : ℝ) * (∑ a, w a) ^ 2 := by + classical + let m : ℝ := (∑ i ∈ Finset.range (finrank K V - 1), Nat.card K ^ i : ℕ) + let l : ℝ := (∑ i ∈ Finset.range (finrank K V - 2), Nat.card K ^ i : ℕ) + have hentry (a a' : ℙ K V) : ∑ b, incidenceEntry a b * incidenceEntry a' b = + (if a = a' then m - l else 0) + l := by + rw [sum_entry_mul_entry] + split_ifs <;> dsimp [m, l] <;> ring + calc + ∑ b, weightOnHyperplane w b ^ 2 = + ∑ b, ∑ a, ∑ a', (incidenceEntry a b * incidenceEntry a' b) * (w a * w a') := by + apply Finset.sum_congr rfl + intro b _ + rw [weightOnHyperplane, pow_two, Finset.sum_mul_sum] + apply Finset.sum_congr rfl + intro a _ + apply Finset.sum_congr rfl + intro a' _ + ring + _ = ∑ a, ∑ a', ((if a = a' then m - l else 0) + l) * (w a * w a') := by + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro a _ + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro a' _ + rw [← Finset.sum_mul, hentry] + _ = (m - l) * (∑ a, w a ^ 2) + l * (∑ a, w a) ^ 2 := by + simp_rw [add_mul, Finset.sum_add_distrib] + congr 1 + · simp_rw [ite_mul, zero_mul, Finset.sum_ite_eq, Finset.mem_univ, ite_true, + ← pow_two, ← Finset.mul_sum] + · rw [pow_two, Finset.sum_mul_sum, Finset.mul_sum] + apply Finset.sum_congr rfl + intro a _ + rw [Finset.mul_sum] + +omit [Fintype (ℙ K (Dual K V))] in +lemma sum_entry_column (b : ℙ K (Module.Dual K V)) : + ∑ a, incidenceEntry a b = + ((∑ i ∈ Finset.range (finrank K V - 1), Nat.card K ^ i : ℕ) : ℝ) := by + classical + unfold incidenceEntry + rw [Finset.sum_boole, ← Fintype.card_subtype, Fintype.card_eq_nat_card, + card_points_on_hyperplane] + +def Q (q d : ℕ) : ℕ := ∑ i ∈ Finset.range (d + 1), q ^ i + +lemma Q_pos (q d : ℕ) : 0 < Q q d := by + apply Finset.sum_pos' + · intros; exact Nat.zero_le _ + · exact ⟨0, Finset.mem_range.mpr (by omega), by simp⟩ + +omit [FiniteDimensional K V] [Fintype (ℙ K (Dual K V))] in +lemma card_points {d : ℕ} (hdim : finrank K V = d + 1) : + Fintype.card (ℙ K V) = Q (Nat.card K) d := by + rw [Fintype.card_eq_nat_card] + exact Projectivization.card_of_finrank K V hdim + +omit [FiniteDimensional K V] [Fintype (ℙ K V)] in +lemma card_hyperplanes {d : ℕ} (hdim : finrank K V = d + 1) : + Fintype.card (ℙ K (Module.Dual K V)) = Q (Nat.card K) d := by + rw [Fintype.card_eq_nat_card] + exact Projectivization.card_of_finrank K (Module.Dual K V) + (Subspace.dual_finrank_eq.trans hdim) + +theorem incidence_mean {d : ℕ} (hdim : finrank K V = d + 1) (hd : 1 ≤ d) + (w : ℙ K V → ℝ) : + (∑ b, weightOnHyperplane w b) / Q (Nat.card K) d = + ((Q (Nat.card K) (d - 1) : ℝ) / Q (Nat.card K) d) * ∑ a, w a := by + rw [sum_weightOnHyperplane, hdim] + have : d - 1 + 1 = d := by omega + simp only [Nat.add_sub_cancel, Q, this] + ring + +theorem incidence_variance_eq {d : ℕ} (hdim : finrank K V = d + 1) (hd : 1 ≤ d) + (w : ℙ K V → ℝ) : + ∑ b, (weightOnHyperplane w b - + ((Q (Nat.card K) (d - 1) : ℝ) / Q (Nat.card K) d) * (∑ a, w a)) ^ 2 = + (Nat.card K : ℝ) ^ (d - 1) * + ((∑ a, w a ^ 2) - (∑ a, w a) ^ 2 / Q (Nat.card K) d) := by + classical + let n : ℝ := Q (Nat.card K) d + let m : ℝ := Q (Nat.card K) (d-1) + let s : ℝ := ∑ a, w a + let u : ℙ K V → ℝ := fun a => w a - s / n + have hn : n ≠ 0 := by dsimp [n]; exact_mod_cast (Q_pos (Nat.card K) d).ne' + have hc : (Fintype.card (ℙ K V) : ℝ) = n := by rw [card_points hdim] + have hs : ∑ a, u a = 0 := by + simp only [u, Finset.sum_sub_distrib, Finset.sum_const, Finset.card_univ, nsmul_eq_mul, hc] + change s - n * (s / n) = 0 + field_simp + ring + have hd' : d - 1 + 1 = d := by omega + have hd'' : d + 1 - 2 = d - 1 := by omega + have hm : ((∑ i ∈ Finset.range (finrank K V - 1), Nat.card K ^ i : ℕ) : ℝ) = m := by + simp only [hdim, Nat.add_sub_cancel, m, Q, hd'] + have hwu (b : ℙ K (Module.Dual K V)) : + weightOnHyperplane u b = weightOnHyperplane w b - m / n * s := by + simp only [weightOnHyperplane, u, mul_sub, Finset.sum_sub_distrib, + ← Finset.sum_mul, sum_entry_column, hm] + ring + have hnorm : ∑ a, u a ^ 2 = (∑ a, w a ^ 2) - s ^ 2 / n := by + calc + ∑ a, u a ^ 2 = ∑ a, (w a ^ 2 - 2 * (s/n) * w a + (s/n)^2) := by + apply Finset.sum_congr rfl + intro a _ + dsimp [u] + ring + _ = (∑ a, w a ^ 2) - 2 * (s/n) * s + n * (s/n)^2 := by + simp only [Finset.sum_add_distrib, Finset.sum_sub_distrib, ← Finset.mul_sum, + Finset.sum_const, Finset.card_univ, nsmul_eq_mul, hc, s] + _ = (∑ a, w a ^ 2) - s ^ 2 / n := by field_simp; ring + have hdiff : + ((∑ i ∈ Finset.range (finrank K V - 1), Nat.card K ^ i : ℕ) : ℝ) - + ((∑ i ∈ Finset.range (finrank K V - 2), Nat.card K ^ i : ℕ) : ℝ) = + (Nat.card K : ℝ) ^ (d - 1) := by + rw [hdim, Nat.add_sub_cancel, hd'', ← hd', Finset.sum_range_succ] + push_cast + ring + change ∑ b, (weightOnHyperplane w b - m / n * s) ^ 2 = _ + simp_rw [← hwu] + rw [sum_weightOnHyperplane_sq, hs, zero_pow (by decide : 2 ≠ 0), mul_zero, add_zero, + hdiff, hnorm] + +theorem incidence_variance {d : ℕ} (hdim : finrank K V = d + 1) (hd : 1 ≤ d) + (w : ℙ K V → ℝ) : + ∑ b, (weightOnHyperplane w b - + ((Q (Nat.card K) (d - 1) : ℝ) / Q (Nat.card K) d) * (∑ a, w a)) ^ 2 ≤ + (Nat.card K : ℝ) ^ (d - 1) * ∑ a, w a ^ 2 := by + rw [incidence_variance_eq hdim hd] + apply mul_le_mul_of_nonneg_left _ (by positivity) + exact sub_le_self _ (by positivity) + +theorem incidence_weighted_mixing_sq {d : ℕ} (hdim : finrank K V = d + 1) (hd : 1 ≤ d) + (w : ℙ K V → ℝ) (B : Finset (ℙ K (Module.Dual K V))) : + ((∑ b ∈ B, weightOnHyperplane w b) - + ((Q (Nat.card K) (d-1) : ℝ) / Q (Nat.card K) d) * B.card * (∑ a, w a)) ^ 2 ≤ + (Nat.card K : ℝ) ^ (d-1) * (∑ a, w a ^ 2) * B.card := by + classical + let f (b : ℙ K (Module.Dual K V)) := weightOnHyperplane w b - + ((Q (Nat.card K) (d-1) : ℝ) / Q (Nat.card K) d) * (∑ a, w a) + have hsum : (∑ b ∈ B, f b) = (∑ b ∈ B, weightOnHyperplane w b) - + ((Q (Nat.card K) (d-1) : ℝ) / Q (Nat.card K) d) * B.card * (∑ a, w a) := by + simp only [f, Finset.sum_sub_distrib, Finset.sum_const, nsmul_eq_mul] + ring + have hcs := Finset.sum_mul_sq_le_sq_mul_sq B (fun _ => (1 : ℝ)) f + simp only [one_mul, one_pow, Finset.sum_const, nsmul_eq_mul, mul_one] at hcs + rw [← hsum] + calc + (∑ b ∈ B, f b) ^ 2 ≤ (B.card : ℝ) * ∑ b ∈ B, f b ^ 2 := hcs + _ ≤ (B.card : ℝ) * ∑ b, f b ^ 2 := + mul_le_mul_of_nonneg_left (Finset.sum_le_univ_sum_of_nonneg (fun b => sq_nonneg (f b))) + (by positivity) + _ ≤ (B.card : ℝ) * ((Nat.card K : ℝ) ^ (d-1) * ∑ a, w a ^ 2) := + mul_le_mul_of_nonneg_left (incidence_variance hdim hd w) (by positivity) + _ = _ := by ring + +noncomputable def incidences (A : Finset (ℙ K V)) (B : Finset (ℙ K (Module.Dual K V))) : ℕ := + ((A ×ˢ B).filter fun ab => Incident ab.1 ab.2).card + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma incidences_eq_sum (A : Finset (ℙ K V)) (B : Finset (ℙ K (Module.Dual K V))) : + (incidences A B : ℝ) = ∑ b ∈ B, ∑ a ∈ A, incidenceEntry a b := by + rw [incidences, ← Finset.sum_boole, Finset.sum_product, Finset.sum_comm] + rfl + +theorem incidence_mixing {d : ℕ} (hdim : finrank K V = d + 1) (hd : 1 ≤ d) + (A : Finset (ℙ K V)) (B : Finset (ℙ K (Module.Dual K V))) : + |(incidences A B : ℝ) - + ((Q (Nat.card K) (d-1) : ℝ) / Q (Nat.card K) d) * A.card * B.card| ≤ + Real.sqrt ((Nat.card K : ℝ) ^ (d-1) * A.card * B.card) := by + classical + let w : ℙ K V → ℝ := fun a => if a ∈ A then 1 else 0 + have hw (b : ℙ K (Module.Dual K V)) : + weightOnHyperplane w b = ∑ a ∈ A, incidenceEntry a b := by + simp only [weightOnHyperplane, w, mul_ite, mul_one, mul_zero, + Finset.sum_ite_mem, Finset.univ_inter] + have hsum : ∑ a, w a = (A.card : ℝ) := by + simp [w, Finset.sum_ite_mem] + have hsq : ∑ a, w a ^ 2 = (A.card : ℝ) := by + simp [w, Finset.sum_ite_mem] + have h := incidence_weighted_mixing_sq hdim hd w B + rw [hsum, hsq] at h + simp_rw [hw] at h + rw [← incidences_eq_sum] at h + simpa [mul_assoc, mul_left_comm, mul_comm] using Real.abs_le_sqrt h + +lemma Q_recurrence {q d : ℕ} (hd : 1 ≤ d) : Q q d = q * Q q (d-1) + 1 := by + have he : d - 1 + 1 = d := by omega + simp only [Q, he] + exact geom_sum_succ + +lemma density_lower {d : ℕ} (hd : 1 ≤ d) : + 1 / (2 * (Nat.card K : ℝ)) ≤ + (Q (Nat.card K) (d-1) : ℝ) / Q (Nat.card K) d := by + have hq : 1 < Nat.card K := Finite.one_lt_card + have hm : 0 < Q (Nat.card K) (d-1) := Q_pos _ _ + have hn : 0 < Q (Nat.card K) d := Q_pos _ _ + apply (div_le_div_iff₀ (by positivity) (by positivity)).mpr + rw [one_mul, Q_recurrence hd] + push_cast + have hq' : (2 : ℝ) ≤ Nat.card K := by exact_mod_cast hq + have hm' : (1 : ℝ) ≤ Q (Nat.card K) (d-1) := by exact_mod_cast hm + nlinarith + +theorem sparse_rectangle_size {d : ℕ} (hdim : finrank K V = d + 1) (hd : 1 ≤ d) + (A : Finset (ℙ K V)) (B : Finset (ℙ K (Module.Dual K V))) + (hsparse : (incidences A B : ℝ) ≤ (A.card : ℝ) * B.card / (4 * Nat.card K)) : + (A.card : ℝ) * B.card ≤ 16 * (Nat.card K : ℝ) ^ (d+1) := by + classical + let q : ℝ := Nat.card K + let v : ℝ := (A.card : ℝ) * B.card + let p : ℝ := (Q (Nat.card K) (d-1) : ℝ) / Q (Nat.card K) d + have hq : 0 < q := by + dsimp [q] + exact_mod_cast (Finite.one_lt_card (α := K)).le + have hv : 0 ≤ v := by dsimp [v]; positivity + have hp : 1 / (2*q) ≤ p := density_lower hd + have hpv := mul_le_mul_of_nonneg_right hp hv + have hlow : v / (4*q) ≤ p*v - incidences A B := by + change (incidences A B : ℝ) ≤ v / (4*q) at hsparse + have he : (1 / (2*q)) * v = 2 * (v / (4*q)) := by field_simp; ring + rw [he] at hpv + linarith + have hm : |(incidences A B : ℝ) - p*v| ≤ Real.sqrt (q^(d-1)*v) := by + simpa only [p, q, v, mul_assoc] using incidence_mixing hdim hd A B + have habs : |(incidences A B : ℝ) - p*v| = p*v - incidences A B := by + rw [abs_of_nonpos (show (incidences A B : ℝ) - p*v ≤ 0 by + have hnonneg : 0 ≤ v / (4*q) := by positivity + linarith)] + ring + rw [habs] at hm + have hs : v / (4*q) ≤ Real.sqrt (q^(d-1)*v) := hlow.trans hm + have hs2 := (Real.le_sqrt (by positivity) (by positivity)).mp hs + have he : (v / (4*q))^2 * (16*q^2) = v^2 := by field_simp; ring + have hm2 := mul_le_mul_of_nonneg_right hs2 (show 0 ≤ 16*q^2 by positivity) + rw [he] at hm2 + have hexp : q^(d-1)*v*(16*q^2) = (16*q^(d+1))*v := by + have hd' : d-1 + 2 = d+1 := by omega + rw [← hd', pow_add] + ring + rw [hexp, pow_two] at hm2 + by_cases hv0 : v = 0 + · change v ≤ _ + rw [hv0] + positivity + · exact (mul_le_mul_iff_left₀ (lt_of_le_of_ne hv (Ne.symm hv0))).mp hm2 + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/RadialAlternatives.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/RadialAlternatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..a8e0e3a9755ac7c39d60767f8e2f272b6882367f --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/RadialAlternatives.lean @@ -0,0 +1,351 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.OutsideCard +import OAI.Combinatorics.RamseyFive.Decoding.RichCentersCard + +namespace OAI + +namespace SharpRamseyFive.GlobalRadial +open Module ProjectiveIncidence ProjectiveTraining ScoreGeometry +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + +lemma localLines_mass (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ : ℝ≥0) (a : ℝ) (Lines : Finset (Submodule K V)) + (hLines : ∀l∈Lines,finrank K l=2) (x : ℙ K V) [Fintype (RadialLine x)] : + ((localLines S O δ a Lines x).card:ℝ)*a≤(δ:ℝ)*S.card := by + let E := localLines S O δ a Lines x + let X := outsideAt x S (O x) + let f (l : E) : RadialLine x := ⟨l.val,hLines _ (Finset.mem_filter.mp l.property).1, + (mem_flatPoints _ _).mp (Finset.mem_filter.mp (Finset.mem_filter.mp l.property).2).1⟩ + have hi : Function.Injective f := fun _ _ h => Subtype.ext (congrArg (fun r : RadialLine x => r.val) h) + have ha (l : E) : a≤(radialWeight x X δ (f l):ℝ) := by + have hh := (Finset.mem_filter.mp (Finset.mem_filter.mp l.property).2).2 + change a≤(δ:ℝ)*(((outsideAt x S (O x)).filter fun y => y.val.submodule≤l.val).card:ℝ) + rwa [outsideAt_filter_card] + have hsum : (∑l : RadialLine x,(radialWeight x X δ l:ℝ))=(δ:ℝ)*X.card := by + have hh := mass_inFlat x X δ ⊤ le_top + simpa [PoissonScore.mass,RadialLine.inFlat] using hh + calc + _ = ∑_l : E,a := by simp [E] + _ ≤ ∑l : E,(radialWeight x X δ (f l):ℝ) := Finset.sum_le_sum fun l _ => ha l + _ = ∑l ∈ Finset.univ.image f,(radialWeight x X δ l:ℝ) := by + rw [Finset.sum_image] + exact fun _ _ _ _ h => hi h + _ ≤ ∑l : RadialLine x,(radialWeight x X δ l:ℝ) := + Finset.sum_le_univ_sum_of_nonneg (fun _ => NNReal.coe_nonneg _) + _ = (δ:ℝ)*X.card := hsum + _ ≤ _ := mul_le_mul_of_nonneg_left (by exact_mod_cast outsideAt_card_le x S (O x)) δ.coe_nonneg + +lemma no_radial_exception_of_mass (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ : ℝ≥0) {a D : ℝ} (ha : 0 y.submodule≤l).card≤Nat.card K+1 := by + exact RichPlaneGeometry.card_filter_finrank_le_two _ _ (le_of_eq (hLines l hll)) + exact ha.trans (mul_le_mul_of_nonneg_left (by exact_mod_cast hc) δ.coe_nonneg) + +lemma radial_exception_uniform (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ : ℝ≥0) {a q n χ C : ℝ} (hq : 0 (δ:ℝ)*2^i≤2 + +lemma strengthDyads_card (m : ℕ) (δ : ℝ≥0) : + (strengthDyads m δ).card≤Nat.clog 2 m+1 := by + exact (Finset.card_filter_le _ _).trans_eq (Finset.card_range _) + +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + +omit [FiniteDimensional K V] [Finite K] in +lemma boundedOverlapDyads_subset (x : ℙ K V) (S O : Finset (ℙ K V)) (δ : ℝ≥0) : + boundedOverlapDyads x (outsideAt x S O) δ 2⊆strengthDyads S.card δ := by + intro i hi + obtain ⟨hi,hcap⟩ := Finset.mem_filter.mp hi + refine Finset.mem_filter.mpr ⟨?_,hcap⟩ + apply Finset.mem_range.mpr + exact (Finset.mem_range.mp hi).trans_le + (Nat.add_le_add_right (Nat.clog_mono_right 2 (outsideAt_card_le x S O)) 1) + +noncomputable def radialExceptions (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ : ℝ≥0) (Lines : Finset (Submodule K V)) (Q : Finset (ℙ K V)) (q n χ : ℝ) := + (strengthDyads S.card δ).biUnion fun i => + badCenters S O δ (((δ:ℝ)*2^i)/2) Lines Q (q^4/n^2*Real.exp χ/(((δ:ℝ)*2^i)/2)^100) + +lemma off_radialExceptions (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ : ℝ≥0) (Lines : Finset (Submodule K V)) (Q : Finset (ℙ K V)) (q n χ : ℝ) + (x : ℙ K V) (hx : x∉radialExceptions S O δ Lines Q q n χ) : + ∀i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + x∉badCenters S O δ (((δ:ℝ)*2^i)/2) Lines Q + (q^4/n^2*Real.exp χ/(((δ:ℝ)*2^i)/2)^100) := by + intro i hi hh + exact hx (Finset.mem_biUnion.mpr ⟨i,boundedOverlapDyads_subset x S (O x) δ hi,hh⟩) + +theorem radialExceptions_card [∀x : ℙ K V,Fintype (RadialLine x)] + (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) (δ : ℝ≥0) (hδ : 0<δ) + (Lines : Finset (Submodule K V)) (hLines : ∀l∈Lines,finrank K l=2) + (Q : Finset (ℙ K V)) (q n χ C : ℝ) (hq : 0 badCenters S O δ (((δ:ℝ)*2^i)/2) Lines Q + (q^4/n^2*Real.exp χ/(((δ:ℝ)*2^i)/2)^100)) (e:=n*(8*C*Real.exp (-χ))) (by + intro i hi + have ha : 0<((δ:ℝ)*2^i)/2 := by positivity + have ha1 : ((δ:ℝ)*2^i)/2≤1 := by linarith only [(Finset.mem_filter.mp hi).2] + rcases hcount i hi with hmass|hglobal + · rw [no_radial_exception_of_mass S O δ ha Lines hLines Q hmass] + simpa only [Finset.card_empty,Nat.cast_zero] using he + · exact radial_exception_uniform S O δ hq hn ha ha1 Lines hLines Q hC hscale hglobal) + apply hh.trans + have hc : ((strengthDyads S.card δ).card:ℝ)≤(Nat.clog 2 S.card:ℝ)+1 := by + exact_mod_cast strengthDyads_card S.card δ + calc + _ ≤ ((Nat.clog 2 S.card:ℝ)+1)*(n*(8*C*Real.exp (-χ))) := + mul_le_mul_of_nonneg_right hc he + _ = _ := by ring + +end SharpRamseyFive.ScoreGeometry +namespace SharpRamseyFive.ScoreScalars +open scoped Topology +open Filter + +lemma radial_mass_of_scalar {q n a χ mass : ℝ} (hq : 0 flatPoints (Flat i)) X j) + (hj : (j:ℝ)*(Nat.card K:ℝ)≤X.card) + (O : ℙ K V→Finset (ℙ K V)) + (hO : ∀x,ownCell F hF (fun i => flatPoints (Flat i)) X j x⊆O x) + (δ : ℝ≥0) (hδ : 0<δ) (n g χ : ℝ) (hn : 0 flatPoints (Flat i)) X j) O δ a l).card:ℝ) := by + apply Finset.sum_le_sum + intro l hl + exact Nat.cast_le.mpr (Finset.card_le_card (richCenters_mono S _ O O δ a δ.coe_nonneg hS + (fun _ => Finset.Subset.refl _) l)) + apply ((mul_le_mul_of_nonneg_right hs (sq_nonneg a)).trans hm).trans + have hscaleX : (δ:ℝ)*X.card≤4*Nat.card K := + (mul_le_mul_of_nonneg_left hX δ.coe_nonneg).trans (by simpa only [mul_comm n] using hscale) + have hsq' := pow_le_pow_left₀ (by positivity : (0:ℝ)≤(δ:ℝ)*X.card) hscaleX 2 + nlinarith only [hsq'] + +end +open Module ProjectiveIncidence ProjectiveTraining GlobalRadial +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K I : Type} [Field K] [Finite K] [Fintype I] + [∀x : ℙ K (I→K),Fintype (RadialLine x)] + +theorem residual_radial_exception_bound {q : ℕ} [CharP K q] + (hq : 2 y.submodule≤U).card:ℝ)≤ + (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5)) + (Lines : Finset (Submodule K (I→K))) (hLines : ∀l∈Lines,finrank K l=2) + (Q : Finset (ℙ K (I→K))) : + ((radialExceptions S O δ Lines Q q (Real.exp (3*σ/2+g)) χ).card:ℝ)≤ + Real.exp (3*σ/2+g)*(2664192*((Nat.clog 2 S.card:ℝ)+1)*Real.exp (-χ)) := by + have hq0 : (0:ℝ) Finset.Subset.refl _) l)) + exact (mul_le_mul_of_nonneg_right hs (sq_nonneg a)).trans hm + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/RadialLabel.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/RadialLabel.lean new file mode 100644 index 0000000000000000000000000000000000000000..5fac34d93c7719fe4e4a8edbb4490c5dd3b0e625 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/RadialLabel.lean @@ -0,0 +1,67 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.Outside +import OAI.Combinatorics.RamseyFive.Probability.TypicalScoreAggregate + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence PoissonScore +open MeasureTheory ProbabilityTheory +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] (x : ℙ K V) [Fintype (RadialLine x)] + +noncomputable def radialLabel (X : Finset {y : ℙ K V // x ≠ y}) (y : X) : RadialLine x := + RadialLine.through x y.val.val y.val.property + +omit [Fintype (RadialLine x)] in +lemma radialLabel_fiber_card (X : Finset {y : ℙ K V // x ≠ y}) (l : RadialLine x) : + Fintype.card {y : X // radialLabel x X y=l}=(RadialLine.trainingOnLine X l).card := by + rw [RadialLine.trainingOnLine_eq_fiber] + change (Finset.univ : Finset {y : X // radialLabel x X y=l}).card=_ + apply Finset.card_bij (fun y _ => y.val.val) + · intro y _ + exact Finset.mem_filter.mpr ⟨y.val.property,y.property⟩ + · intro y _ z _ he + exact Subtype.ext (Subtype.ext he) + · intro y hy + obtain ⟨hyX,hyl⟩ := Finset.mem_filter.mp hy + exact ⟨⟨⟨y,hyX⟩,hyl⟩,Finset.mem_univ _,rfl⟩ + +omit [Fintype (RadialLine x)] in +lemma aggregateRate_radialLabel (X : Finset {y : ℙ K V // x ≠ y}) (L δ : ℝ≥0) : + aggregateRate (radialLabel x X) (fun _ => L*δ) = + fun l => L*radialWeight x X δ l := by + funext l + simp only [aggregateRate,Finset.sum_const,Finset.card_univ,nsmul_eq_mul, + radialLabel_fiber_card,radialWeight] + ring + +omit [FiniteDimensional K V] in +lemma radialLabel_in_pencil (X : Finset {y : ℙ K V // x ≠ y}) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) (H : F) (y : X) : + radialLabel x X y ∈ pencilLines x F H ↔ Incident y.val.val H.val := by + simp only [radialLabel,pencilLines,RadialLine.inFlat,Finset.mem_filter,Finset.mem_univ, + true_and,RadialLine.through_le_iff] + change Incident x H.val ∧ Incident y.val.val H.val ↔ _ + simp only [hF H.val H.property,true_and] + +theorem original_radial_moment (X : Finset {y : ℙ K V // x ≠ y}) (L δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) {R : ℕ} + (b : ℝ) (own : F→Fin R→Bool) (p : ℕ) : + (∫ ω,(typicalScore Finset.univ + (fun H : F => Finset.univ.filter fun y : X => Incident y.val.val H.val) b own ω)^p + ∂scheduleMeasure (fun _ : X => L*δ) R) = + ∫ ω,(typicalScore Finset.univ (pencilLines x F) b own ω)^p + ∂scheduleMeasure (fun l => L*radialWeight x X δ l) R := by + have h := integral_original_score_pow (radialLabel x X) (fun _ => L*δ) + Finset.univ (pencilLines x F) b own p + simp_rw [radialLabel_in_pencil x X F hF,aggregateRate_radialLabel] at h + exact h + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/RadialOffException.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/RadialOffException.lean new file mode 100644 index 0000000000000000000000000000000000000000..91c43c84499ecebce1fe41a34078804f8b55f8d9 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/RadialOffException.lean @@ -0,0 +1,230 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.OutsideCard +import OAI.Combinatorics.RamseyFive.Entropy.LowMomentBudget + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence ProjectiveTraining GlobalRadial PoissonScore WeightedPrograms +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +omit [Fintype (RadialLine x)] in + +lemma radial_lt_off_exception (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (δ : ℝ≥0) (a : ℝ) (L : Finset (Submodule K V)) + (hL : ∀ l : RadialLine x,l.val∈L) (Q : Finset (ℙ K V)) (hx : x∈Q) + (hgood : x∉badCenters S O δ a L Q 1) (l : RadialLine x) : + (radialWeight x (outsideAt x S (O x)) δ l:ℝ)< a := by + by_contra hn + have hw : a≤(δ:ℝ)*((RadialLine.trainingOnLine (outsideAt x S (O x)) l).card:ℝ) := by + simpa only [radialWeight,NNReal.coe_mul,NNReal.coe_natCast] using le_of_not_gt hn + have hl : l.val∈localLines S O δ a L x := by + refine Finset.mem_filter.mpr ⟨hL l,Finset.mem_filter.mpr ⟨?_,?_⟩⟩ + · exact (mem_flatPoints _ _).mpr l.property.2 + · change a≤(δ:ℝ)*(((outsideAt x S (O x)).filter fun y => y.val.submodule≤ l.val).card:ℝ) at hw + rwa [outsideAt_filter_card] at hw + have hc : (1:ℝ)≤(localLines S O δ a L x).card := by + exact_mod_cast Finset.card_pos.mpr ⟨l.val,hl⟩ + exact hgood (Finset.mem_filter.mpr ⟨hx,hc⟩) + +omit [FiniteDimensional K V] [Finite K] in + +lemma strong_degree_le (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (H : F) (t : ℝ) : + Fintype.card {H' : F // AmbientEnumeration.overlapRelation (radialWeight x X δ) + (pencilLines x F) t H H'} ≤ + 1+(Finset.univ.filter fun H' : F => H≠H' ∧ t≤ + mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H')).card := by + rw [Fintype.card_subtype] + apply le_trans (Finset.card_le_card (t := insert H (Finset.univ.filter fun H' : F => H≠H' ∧ t≤ + mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H'))) ?_) ?_ + · intro H' hH' + by_cases he : H=H' + · simpa only [he] using Finset.mem_insert_self H' _ + · exact Finset.mem_insert_of_mem (Finset.mem_filter.mpr + ⟨Finset.mem_univ _,he,(Finset.mem_filter.mp hH').2.le⟩) + · simpa only [add_comm] using Finset.card_insert_le H _ + +omit [FiniteDimensional K V] [Finite K] in + +lemma strong_pairs_le (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (t : ℝ) : + (Fintype.card (ComponentEnumeration.RelatedPair + (AmbientEnumeration.overlapRelation (radialWeight x X δ) (pencilLines x F) t)):ℝ)≤ + F.card+(Finset.univ.filter fun p : DistinctPairs F => + t≤ strength (pencilLines x F) (radialWeight x X δ) p).card := by + have he : (Fintype.card (ComponentEnumeration.RelatedPair + (AmbientEnumeration.overlapRelation (radialWeight x X δ) (pencilLines x F) t)):ℝ)= + ∑ H : F,∑ H' : F,if t< mass (radialWeight x X δ) + (pencilLines x F H ∩ pencilLines x F H') then (1:ℝ) else 0 := by + have hsigma {T : Type} [Fintype T] (R : T→T→Prop) : + (Fintype.card ((h : T) × {h' : T // R h h'}) : ℝ)= + ∑ h,∑ h',if R h h' then (1:ℝ) else 0 := by + simp [Fintype.card_sigma,Fintype.card_subtype] + exact hsigma (T := ↥F) (fun H H' => t < mass (radialWeight x X δ) + (pencilLines x F H ∩ pencilLines x F H')) + rw [he,SingletonEnumeration.sum_pairs_split_diagonal] + apply add_le_add + · apply (Finset.sum_le_sum (fun H (_ : H∈(Finset.univ : Finset F)) => + show (if t< mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H) + then (1:ℝ) else 0)≤1 by split_ifs <;> norm_num)).trans_eq + simp + · calc + _ ≤ ∑ p : DistinctPairs F,if t≤ strength (pencilLines x F) (radialWeight x X δ) p + then (1:ℝ) else 0 := by + apply Finset.sum_le_sum + intro p _ + change (if t< strength (pencilLines x F) (radialWeight x X δ) p then (1:ℝ) else 0)≤_ + by_cases hp : t< strength (pencilLines x F) (radialWeight x X δ) p + · simp [hp,hp.le] + · simp only [hp,ite_false]; split_ifs <;> norm_num + _ = _ := by simp + +theorem ambient_degree_off_exception (hdim : finrank K V=5) + (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) (δ : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) + (hm : ∀ H : F,mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H)≤2) + (t A : ℝ) (ht : 0< t) (hA : 2≤ A) + (hscale : 16*((Nat.card K:ℝ)+1)≤ A*t^2) + (L : Finset (Submodule K V)) (hL : ∀ l : RadialLine x,l.val∈L) + (Q : Finset (ℙ K V)) (hx : x∈Q) + (hgood : x∉badCenters S O δ (t/2) L Q 1) (H : F) : + (Fintype.card {H' : F // AmbientEnumeration.overlapRelation + (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F) t H H'}:ℝ)≤ A := by + let D : ℝ := (Finset.univ.filter fun H' : F => H≠H' ∧ t≤ + mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H ∩ pencilLines x F H')).card + have hd := score_degree_truncated x hdim (outsideAt x S (O x)) δ hδ F hF H t ht.le + (radial_lt_off_exception x S O δ (t/2) L hL Q hx hgood) + have hsq : (mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H))^2≤4 := by + calc + _ ≤ (2:ℝ)^2 := pow_le_pow_left₀ (mass_nonneg _ _) (hm H) 2 + _ = 4 := by norm_num + have hraw : D*t^2≤8*((Nat.card K:ℝ)+1) := hd.trans (by + exact mul_le_mul_of_nonneg_right (by linarith) (by positivity)) + have hD : D≤ A/2 := (mul_le_mul_iff_left₀ (sq_pos_of_pos ht)).mp (by nlinarith [hscale]) + have hcard : (Fintype.card {H' : F // AmbientEnumeration.overlapRelation + (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F) t H H'}:ℝ)≤1+D := by + dsimp only [D] + exact_mod_cast strong_degree_le x (outsideAt x S (O x)) δ F H t + linarith + +end + +open Module ProjectiveIncidence ProjectiveTraining GlobalRadial PoissonScore WeightedPrograms +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal + +noncomputable def geometryScale (q : ℕ) (n : ℝ) : ℝ := (q:ℝ)^4/n +noncomputable def dyadFactor (m : ℕ) (χ : ℝ) : ℝ := 2^200*(Nat.clog 2 m+1)*Real.exp (2*χ) +def pencilAlphabet (q k : ℕ) : ℕ := ∑ i∈Finset.range k,q^i +noncomputable def pencilLowBudget (q m : ℕ) (n χ b L : ℝ) (p R : ℕ) : ℝ := + lowMomentBudget (pencilAlphabet q 4) (dyadFactor m χ*(geometryScale q n)^2) + (dyadFactor m χ*geometryScale q n) (geometryScale q n) b L p R + (pencilAlphabet q 3) (pencilAlphabet q 2) + +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +theorem projective_low_moment (hdim : finrank K V=5) + (S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) (δ L : ℝ≥0) (hδ : 0 < δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) + (n χ b base D₀ : ℝ) (hn : 0 < n) (hb : 1 ≤ b) (hD : 0 ≤ D₀) + (hL : 10000 ≤ (L:ℝ)) (hbase : (23/25:ℝ) ≤ base) + (hmass : (δ:ℝ)*S.card ≤ Nat.card K) + (hcap : n ≤ (Nat.card K:ℝ)^3) + (hlow : n ≤ (Nat.card K:ℝ)^2*Real.exp (χ/2)) + (hchi : (11*2^200:ℝ) ≤ Real.exp χ) + (hm : ∀ H : F,mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H) ≤ 2) + (hlower : ∀ H : F,(3/4:ℝ) ≤ mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H)) + (hdelta : ∀ H : F,|mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H)-base| ≤ 17/100) + (Lines : Finset (Submodule K V)) (hLines : ∀ l : RadialLine x,l.val∈Lines) + (Q : Finset (ℙ K V)) (hx : x∈Q) + (hgood : ∀ i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + x∉badCenters S O δ (((δ:ℝ)*2^i)/2) Lines Q + ((Nat.card K:ℝ)^4/n^2*Real.exp χ/(((δ:ℝ)*2^i)/2)^100)) + {p : ℕ} (hp : 0 < p) (R h : ℕ) (hKR : 200 ≤ R/2) (hh : 0 < h) + (hsize : h ≤ (R/2)/(2*200)) (herr : (p:ℝ)*h*(19/20:ℝ)^(h-1) < 1/2) + (own : F→Fin R→Bool) + (hDsum : (∑ H : F,|mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H)-base|^(R/2)) ≤ D₀) + (hcost : D₀+2*((p+1:ℝ)*pencilLowBudget (Nat.card K) (outsideAt x S (O x)).card n χ b L p R) ≤ + geometryScale (Nat.card K) n*Real.exp (((L:ℝ)*R)/5)) + (hp2 : (p:ℝ)^2 ≤ Real.exp (((L:ℝ)*R)/10)) + (hA : 2 ≤ geometryScale (Nat.card K) n*Real.exp (-((L:ℝ)*R))) + (hscale : 16*((Nat.card K:ℝ)+1) ≤ + (geometryScale (Nat.card K) n*Real.exp (-((L:ℝ)*R)))*(1/(100*(p:ℝ)))^2) + (hstrong : x∉badCenters S O δ ((1/(100*(p:ℝ)))/2) Lines Q 1) + (hpairScalar : (pencilAlphabet (Nat.card K) 4:ℝ)+ + (dyadFactor (outsideAt x S (O x)).card χ*(geometryScale (Nat.card K) n)^2)/(1/(100*(p:ℝ)))^200 ≤ + (geometryScale (Nat.card K) n)^2*Real.exp (((L:ℝ)*R)/10)) : + (∫ ω, (∑ H : F,scoreTerm (pencilLines x F H) (Real.exp (-(L:ℝ)*base)) (own H) + (fun r d => ω (r,d)))^p + ∂batchMeasure (fun i : Fin R×RadialLine x => L*radialWeight x (outsideAt x S (O x)) δ i.2)) ≤ + (geometryScale (Nat.card K) n)^p*Real.exp (-(1/10:ℝ)*(p*((L:ℝ)*R))) := by + let X := outsideAt x S (O x) + let q := Nat.card K + let B := geometryScale q n + let M := dyadFactor X.card χ*B^2 + let A := dyadFactor X.card χ*B + let C := pencilLowBudget q X.card n χ b L p R + have hq : 0 < q := Nat.card_pos + have hB : 0 < B := by dsimp [B,geometryScale]; positivity + have hM : 0 ≤ M := by dsimp [M,dyadFactor]; positivity + have hRow : 0 ≤ A := by dsimp [A,dyadFactor]; positivity + have hQ : 0 ≤ (pencilAlphabet q 4:ℝ) := Nat.cast_nonneg _ + have hC := lowMomentBudget_bounds (pencilAlphabet q 4) M A B b L p R + (pencilAlphabet q 3) (pencilAlphabet q 2) hQ hM hRow hB (zero_le_one.trans hb) L.coe_nonneg + have hχ : 0 ≤ χ := by + by_contra hn + have he := Real.exp_lt_one_iff.mpr (lt_of_not_ge hn) + have hnum : (1:ℝ) < 11*2^200 := by norm_num + linarith + have hrowlow : n ≤ (q:ℝ)^2*Real.exp χ := hlow.trans + (mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by linarith)) (sq_nonneg _)) + have hrowchi : (10*2^200:ℝ) ≤ Real.exp χ := le_trans (by norm_num) hchi + have hPow : (∑ z : DistinctPairs F,strength (pencilLines x F) (radialWeight x X δ) z^200) ≤ M := by + simpa only [M,B,dyadFactor,geometryScale,mul_assoc,mul_left_comm,mul_comm] using + score_pair_low_moment x hdim S O δ hδ F hF n χ hn hmass hlow hchi Lines hLines Q hx hm hgood 200 le_rfl + have hrows (H : F) : (∑ H',offRow x X δ F H H'^200) ≤ A := by + simpa only [A,B,dyadFactor,geometryScale,mul_assoc,mul_left_comm,mul_comm] using + score_row_low_moment x hdim X δ hδ F hF H n χ hn hm hcap hrowlow hrowchi + have hQsize : (F.card:ℝ) ≤ (pencilAlphabet q 4:ℝ) := by + exact_mod_cast (by simpa only [hdim,Nat.reduceSub,pencilAlphabet] using pencil_size x F hF) + have hN₁ (d : RadialLine x) : (Finset.univ.filter fun H : F => d∈pencilLines x F H).card ≤ pencilAlphabet q 3 := by + simpa only [hdim,Nat.reduceSub,pencilAlphabet] using one_anchor_count x F d + have hN₂ (d e : RadialLine x) (hde : d≠e) : + (Finset.univ.filter fun H : F => d∈pencilLines x F H ∧ e∈pencilLines x F H).card ≤ pencilAlphabet q 2 := by + simpa only [hdim,Nat.reduceSub,pencilAlphabet] using two_anchor_count x F d e hde + have hmassL (H : F) : (∑ d∈pencilLines x F H,((L*radialWeight x X δ d:ℝ≥0):ℝ)) ≤ 2*(L:ℝ) := by + simpa only [mass,NNReal.coe_mul,Finset.mul_sum,mul_comm (L:ℝ) 2] using + mul_le_mul_of_nonneg_left (hm H) L.coe_nonneg + have ht : 0 < 1/(100*(p:ℝ)) := by positivity + let Δ := ⌊B*Real.exp (-((L:ℝ)*R))⌋₊ + have hΔ (H : F) : Fintype.card {H' : F // AmbientEnumeration.overlapRelation + (radialWeight x X δ) (pencilLines x F) (1/(100*(p:ℝ))) H H'} ≤ Δ := by + apply (Nat.le_floor_iff (by positivity)).mpr + exact ambient_degree_off_exception x hdim S O δ hδ F hF hm _ _ ht hA hscale Lines hLines Q hx hstrong H + have hdeg : (Δ:ℝ) ≤ B*Real.exp (-((L:ℝ)*R)) := Nat.floor_le (by positivity) + have hRelPairs : (Fintype.card (ComponentEnumeration.RelatedPair (AmbientEnumeration.overlapRelation + (radialWeight x X δ) (pencilLines x F) (1/(100*(p:ℝ))))):ℝ) ≤ B^2*Real.exp (((L:ℝ)*R)/10) := by + apply (strong_pairs_le x X δ F _).trans + apply le_trans (add_le_add hQsize (power_tail_card _ (fun z => by unfold strength; positivity) 200 _ M ht hPow)) + exact hpairScalar + apply AmbientEnumeration.ambient_untruncated_moment (radialWeight x X δ) (pencilLines x F) + hp R own L B b (2*(L:ℝ)) C D₀ base B hL hbase hlower hdelta hB hb (by positivity) + hC.1 hD hB.le hmassL 200 h (pencilAlphabet q 3) (pencilAlphabet q 2) (by norm_num) + hKR hh hsize herr hN₁ hN₂ ?_ ?_ ?_ hDsum hcost hp2 Δ hΔ hdeg hRelPairs + · exact (score_certificate_majorant x X δ L F p R 200 _ _ _ M B b hB (zero_le_one.trans hb) hQsize hM hm hPow).trans hC.2.1 + · intro H + exact (shift_row_from_power x X δ F H p 200 (by norm_num) A (hrows H)).trans hC.2.2.1 + · exact (shift_pair_from_power x X δ F p 200 M hPow).trans + ((add_le_add hQsize (le_refl _)).trans hC.2.2.2) + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ReadyRefinement.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ReadyRefinement.lean new file mode 100644 index 0000000000000000000000000000000000000000..65a48abecc6772b1821aca583a999a504c051cf8 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ReadyRefinement.lean @@ -0,0 +1,129 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.GuardedNodeSent + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence + +section +open Module FiniteEntropy ReverseCap ScoreGeometry Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization Topology +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma ready_trimmed_product (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (τ b : ℝ) (hr : OriginalNodeReady A₀ UA B₀ UB (9/10) τ) + (hp : (Nat.card K:ℝ)^5*Real.exp (-b)≤(A₀.card:ℝ)*B₀.card) : + (Nat.card K:ℝ)^5*Real.exp (-(b+1))≤((A₀∩UA).card:ℝ)*(B₀∩UB).card := by + have hmul := mul_le_mul hr.1 hr.2.1 + (show (0:ℝ)≤(9/10:ℝ)*B₀.card by positivity) (Nat.cast_nonneg (A₀∩UA).card) + have he : Real.exp (-1)≤(81:ℝ)/100 := by + rw [Real.exp_neg] + rw [←one_div] + apply (div_le_iff₀ (Real.exp_pos _)).mpr + have h := Real.add_one_le_exp (1:ℝ) + nlinarith + have h1 := mul_le_mul_of_nonneg_left he + (show (0:ℝ)≤(Nat.card K:ℝ)^5*Real.exp (-b) by positivity) + have h2 := mul_le_mul_of_nonneg_left hp (by norm_num : (0:ℝ)≤81/100) + rw [neg_add,Real.exp_add] + nlinarith only [hmul,h1,h2] + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma ready_trimmed_density (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (τ ε : ℝ) (hε : 0≤ε) (hτε : τ≤ε*(9/10:ℝ)^2) + (hr : OriginalNodeReady A₀ UA B₀ UB (9/10) τ) : + (Nat.card K:ℝ)*incidences (A₀∩UA) (B₀∩UB)≤ε*(A₀∩UA).card*(B₀∩UB).card := by + have hh := original_ready_sparse A₀ UA B₀ UB (1000*ε) (9/10) τ + (by positivity) (by norm_num) (by nlinarith only [hτε]) hr + nlinarith only [hh] + +omit [Finite K] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma ready_bidual (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) (δ τ : ℝ) : + OriginalNodeReady B₀ UB (A₀.map bidualPoint.toEmbedding) (UA.map bidualPoint.toEmbedding) δ τ ↔ + OriginalNodeReady A₀ UA B₀ UB δ τ := by + simp only [OriginalNodeReady,←Finset.map_inter,Finset.card_map,incidences_bidual] + constructor <;> rintro ⟨h1,h2,h3⟩ <;> refine ⟨h2,h1,?_⟩ <;> nlinarith only [h3] + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +theorem eventually_ready_refinement {η : ℝ} (hη : 0<η) (Cb : ℝ) : + ∀ᶠ σ : ℝ in atTop,∀ (D b R : ℝ), Range η σ D R → + 0≤b → b≤Cb*D*σ^(6*beta η) → + ∀ (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))), + OriginalNodeReady A₀ UA B₀ UB (9/10) (σ^(-1000*beta η)) → + (Nat.card K:ℝ)^5*Real.exp (-b)≤(A₀.card:ℝ)*B₀.card → + 0≤b+1 ∧ b+1≤(Cb+1)*D*σ^(6*beta η) ∧ + (Nat.card K:ℝ)*incidences (A₀∩UA) (B₀∩UB)≤σ^(-800*beta η)*(A₀∩UA).card*(B₀∩UB).card ∧ + (Nat.card K:ℝ)^5*Real.exp (-(b+1))≤((A₀∩UA).card:ℝ)*(B₀∩UB).card := by + have ht : ∀ᶠ σ : ℝ in atTop,σ^(-200*beta η)≤(9/10:ℝ)^2 := by + have hp : 0<200*beta η := mul_pos (by norm_num) (beta_pos hη) + exact ((tendsto_rpow_neg_atTop hp).eventually_lt_const + (by norm_num : (0:ℝ)<(9/10:ℝ)^2)).mono (fun σ h=>by simpa only [neg_mul] using h.le) + filter_upwards [ht,eventually_ge_atTop (1:ℝ)] with σ ht hσ + intro D b R hR hb hbhi A₀ UA B₀ UB hr hp + have hs : 0<σ := zero_lt_one.trans_le hσ + have hD : 1≤D := (Real.one_le_rpow hσ (beta_pos hη).le).trans hR.dlo + have hF : 1≤σ^(6*beta η) := Real.one_le_rpow hσ (by positivity [beta_pos hη]) + refine ⟨by linarith,?_,?_,ready_trimmed_product A₀ UA B₀ UB _ b hr hp⟩ + · have hx := mul_le_mul hD hF (by norm_num : (0:ℝ)≤1) (by linarith : 0≤D) + nlinarith only [hbhi,hx] + · apply ready_trimmed_density A₀ UA B₀ UB _ _ (Real.rpow_nonneg hs.le _) _ hr + have hm := mul_le_mul_of_nonneg_left ht (Real.rpow_nonneg hs.le (-800*beta η)) + rw [←Real.rpow_add hs] at hm + simpa only [show -800*beta η+(-200*beta η)=-1000*beta η by ring] using hm +end + +open Module FiniteEntropy ReverseCap ScoreGeometry +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + +omit [Finite K] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] in +lemma bidual_inter_card (A UA : Finset (ℙ K V)) (Y : Finset (ℙ K (Dual K (Dual K V)))) : + (A.map bidualPoint.toEmbedding∩(UA.map bidualPoint.toEmbedding∩Y)).card= + (A∩(UA∩Y.map bidualPoint.symm.toEmbedding)).card := by + have he : A.map bidualPoint.toEmbedding∩(UA.map bidualPoint.toEmbedding∩Y)= + (A∩(UA∩Y.map bidualPoint.symm.toEmbedding)).map bidualPoint.toEmbedding := by + ext x + simp + rw [he,Finset.card_map] + +theorem orientedGuardedNode_original_capture + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) (c δ τ P : ℝ) (hδ : 0<δ) + (t : OrientedNodeTape f r (1000*(Nat.card K)^2) (Nat.card K)) + (m : OrientedNodeMessage f r UA UB (1000*(Nat.card K)^2) (Nat.card K) t) + (hm : orientedGuardedNodeEncoded f r σ hσ hq hd A₀ UA B₀ UB hA₀ hB₀ c δ τ P hδ t=some m) : + OriginalNodeReady A₀ UA B₀ UB δ τ ∧ + (9/10:ℝ)*δ*A₀.card≤ + (A₀∩(UA∩(orientedNodeDecoded f r UA UB (1000*(Nat.card K)^2) (Nat.card K) t m).2)).card ∧ + (9/10:ℝ)*δ*B₀.card≤ + (B₀∩(UB∩(orientedNodeDecoded f r UA UB (1000*(Nat.card K)^2) (Nat.card K) t m).1)).card := by + unfold orientedGuardedNodeEncoded at hm + split_ifs at hm with hAB + · obtain ⟨m',hm',rfl⟩ := Option.map_eq_some_iff.mp hm + have hv := (guardedNode_sent_valid f σ hσ hq hd A₀ UA B₀ UB hA₀ hB₀ c δ τ + (((A₀∩UA).card:ℝ)*Real.exp (10*P)) hδ t.1 m' hm').1 + exact ⟨hv,guardedNode_original_capture f σ hσ hq hd A₀ UA B₀ UB hA₀ hB₀ c δ τ + (((A₀∩UA).card:ℝ)*Real.exp (10*P)) hδ t.1 m' hm'⟩ + · obtain ⟨m',hm',rfl⟩ := Option.map_eq_some_iff.mp hm + have hv := (guardedNode_sent_valid r σ hσ hq (by simpa using hd) B₀ UB + (A₀.map bidualPoint.toEmbedding) (UA.map bidualPoint.toEmbedding) hB₀ hA₀.map c δ τ + (((B₀∩UB).card:ℝ)*Real.exp (10*P)) hδ t.2 m' hm').1 + have hh := guardedNode_original_capture r σ hσ hq (by simpa using hd) B₀ UB + (A₀.map bidualPoint.toEmbedding) (UA.map bidualPoint.toEmbedding) hB₀ hA₀.map c δ τ + (((B₀∩UB).card:ℝ)*Real.exp (10*P)) hδ t.2 m' hm' + refine ⟨(ready_bidual A₀ UA B₀ UB δ τ).mp hv,?_,hh.1⟩ + simpa only [Finset.card_map,bidual_inter_card,orientedNodeDecoded,reverseNodePair] using hh.2 + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/RectangleTransport.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/RectangleTransport.lean new file mode 100644 index 0000000000000000000000000000000000000000..5009af7c0cc7866dfb6a9536e300f92d2d7c1414 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/RectangleTransport.lean @@ -0,0 +1,63 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.CoreGeometry +import OAI.Combinatorics.RamseyFive.Marking.TwoScan + +namespace OAI + +namespace SharpRamseyFive.CoreGeometry +open Module ProjectiveIncidence Marking +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] + +lemma bidual_rep_mem (x : ℙ K V) (W : Submodule K (Dual K (Dual K V))) : + (bidualPoint x).rep∈W ↔ (Dual.eval K V x.rep)∈W := by + change (bidualPoint x).rep∈W ↔ x.rep∈W.comap (Dual.eval K V) + rw [rep_mem_iff,rep_mem_iff] + induction x using Projectivization.ind with | h v hv => + change (Projectivization.map (Module.evalEquiv K V).toLinearMap + (Module.evalEquiv K V).injective (Projectivization.mk K v hv)).submodule≤W ↔ _ + rw [Projectivization.map_mk,Projectivization.submodule_mk, + Projectivization.submodule_mk,Submodule.span_singleton_le_iff_mem, + Submodule.span_singleton_le_iff_mem] + rfl + +lemma inRectangle_swap (W : Submodule K (Dual K (Dual K V))) (f : FlagPair K V) : + InRectangle W (swapFlag f).1.rep (swapFlag f).2.rep ↔ + InRectangle W.dualCoannihilator f.1.rep f.2.rep := by + simp only [InRectangle,swapFlag_apply] + rw [bidual_rep_mem] + have he : (Dual.eval K V f.1.rep)∈W ↔ f.1.rep∈W.dualCoannihilator.dualCoannihilator := by + conv_lhs => rw [←Subspace.dualCoannihilator_dualAnnihilator_eq (W:=W)] + rfl + rw [he,and_comm] + +omit [FiniteDimensional K V] in +lemma occupancy_reindex {I J : Type} [Fintype I] [Fintype J] + (x : I→FlagPair K V) (e : J→I) (he : Function.Injective e) (M : ℝ) + (h : ∀W : Submodule K (Dual K V), + (∑i,if InRectangle W (x i).1.rep (x i).2.rep then (1:ℝ) else 0)≤M) : + ∀W : Submodule K (Dual K V), + (∑j,if InRectangle W (x (e j)).1.rep (x (e j)).2.rep then (1:ℝ) else 0)≤M := by + intro W + apply le_trans _ (h W) + calc + _ = ∑i∈Finset.univ.image e,if InRectangle W (x i).1.rep (x i).2.rep then (1:ℝ) else 0 := by + rw [Finset.sum_image (by intro a ha b hb hab;exact he hab)] + _ ≤ _ := Finset.sum_le_sum_of_subset_of_nonneg (Finset.subset_univ _) (by + intro i hi hni + split <;> norm_num) + +lemma occupancy_reverse {n : ℕ} (x : Fin n→FlagPair K V) (M : ℝ) + (h : ∀W : Submodule K (Dual K V), + (∑i,if InRectangle W (x i).1.rep (x i).2.rep then (1:ℝ) else 0)≤M) : + ∀W : Submodule K (Dual K (Dual K V)), + (∑i,if InRectangle W (reverseTuple x i).1.rep (reverseTuple x i).2.rep then (1:ℝ) else 0)≤M := by + intro W + simp only [reverseTuple,inRectangle_swap] + exact occupancy_reindex x Fin.rev Fin.rev_injective M h W.dualCoannihilator +end +end SharpRamseyFive.CoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ReverseAfterCapture.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ReverseAfterCapture.lean new file mode 100644 index 0000000000000000000000000000000000000000..64fb28dfc63f538690dc2ffca3ecb8b55f4eb494 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ReverseAfterCapture.lean @@ -0,0 +1,72 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.OptionComposition +import OAI.Combinatorics.RamseyFive.Geometry.TwoPublicCaps +import OAI.Combinatorics.RamseyFive.Entropy.TwoCapCost + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem reverse_after_capture {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (hq : 3≤Nat.card K) (S U : Finset (ℙ K V)) (hS : S.Nonempty) (hSU : S⊆U) + (T UT : Finset (ℙ K (Dual K V))) (hT : T.Nonempty) + (M ε : ℝ) (p : Law (Option (Finset (ℙ K (Dual K V))))) + (hp : p none≤ε) (hgood : ∀W,0

+ if _hv : ValidCap T UT MB (t.1 m) then + (universalFreshEncoded Incident S U (T∩t.1 m) (t.1 m) Finset.inter_subset_right H n q MA t.2).map + (fun f=>⟨m,f⟩) + else none + +omit [Finite K] [FiniteDimensional K V] in +lemma reversedBase_exact (S U : Finset (ℙ K V)) + (T UT : Finset (ℙ K (Dual K V))) (hT : T.Nonempty) + (P τ : ℝ) (H : ℕ) (n : Fin (H+1)) (q MA MB : ℝ) + (t : ReversedBaseTape UT P τ H q) : + (reversedBaseEncoded S U T UT P τ H n q MA MB t).map (reversedBaseDecoded U UT P τ H q t)= + publicReverseResult S U T UT hT H n q MA MB ((baseFiniteEncoded T UT P τ t.1).map t.1) t.2 := by + cases h : baseFiniteEncoded T UT P τ t.1 with + | none => simp [reversedBaseEncoded,h,publicReverseResult] + | some m => + simp only [reversedBaseEncoded,h,Option.bind_some,Option.map_some,publicReverseResult] + split_ifs with hv + · simp only [Option.map_map,reversedBaseDecoded,Function.comp_def] + · rfl + +omit [Finite K] [FiniteDimensional K V] in +theorem reversedBase_law (S U : Finset (ℙ K V)) + (T UT : Finset (ℙ K (Dual K V))) (hT : T.Nonempty) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) (H : ℕ) (n : Fin (H+1)) (q MA MB : ℝ) : + map (adaptiveLaw (baseTableLaw UT P τ R L₀) (fun _=>universalFreshLaw (ℙ K (Dual K V)) H q)) + (fun t=>(reversedBaseEncoded S U T UT P τ H n q MA MB t).map (reversedBaseDecoded U UT P τ H q t))= + optionCompose (baseCaptureLaw T UT P τ R L₀) (nextCapLaw S U T UT hT n q MA MB) := by + simp only [reversedBase_exact S U T UT hT] + rw [optionCompose_eq_second (baseCaptureLaw T UT P τ R L₀) + (nextCapLaw S U T UT hT n q MA MB) (by rfl),←baseFinite_law T UT P τ R L₀] + exact public_composition (baseTableLaw UT P τ R L₀) (universalFreshLaw (ℙ K (Dual K V)) H q) + (fun t=>(baseFiniteEncoded T UT P τ t).map t) + (publicReverseResult S U T UT hT H n q MA MB) (nextCapLaw S U T UT hT n q MA MB) + (fun Y=>publicReverseResult_law S U T UT hT H n q MA MB Y) +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/RichHyperplaneVariance.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/RichHyperplaneVariance.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a39ef99970142fc5b2f0e2053fc6664569b84cd --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/RichHyperplaneVariance.lean @@ -0,0 +1,173 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.Q +import OAI.Combinatorics.RamseyFive.Geometry.ExceptionalCenters + +namespace OAI + +namespace SharpRamseyFive.RichPlaneGeometry + +section +open Module SharpRamseyFive.ProjectiveIncidence +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] + +theorem rich_hyperplane_variance {d : ℕ} (hdim : finrank K V = d+1) (hd : 1 ≤ d) + (X : Finset (ℙ K V)) (B : Finset (ℙ K (Module.Dual K V))) (M : ℕ) + (hM : ∀ b ∈ B, M ≤ (X.filter fun x => Incident x b).card) + (hmean : 2*((Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d)*X.card ≤ M) : + (B.card:ℝ)*M^2 ≤ 4*(Nat.card K:ℝ)^(d-1)*X.card := by + let : Finite V := Module.finite_of_finite K + let : Finite (Module.Dual K V) := Module.finite_of_finite K + let : Fintype (ℙ K V) := Fintype.ofFinite _ + let : Fintype (ℙ K (Module.Dual K V)) := Fintype.ofFinite _ + let w (x : ℙ K V) : ℝ := if x ∈ X then 1 else 0 + have hw : ∑ x, w x = (X.card:ℝ) := by simp [w] + have hw2 : ∑ x, w x^2 = (X.card:ℝ) := by simp [w] + have hweight (b : ℙ K (Module.Dual K V)) : + weightOnHyperplane w b = ((X.filter fun x => Incident x b).card:ℝ) := by + simp [weightOnHyperplane, incidenceEntry, w, mul_ite] + let μ : ℝ := ((Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d)*X.card + have hvariance := incidence_variance hdim hd w + rw [hw,hw2] at hvariance + have hrow (b : ℙ K (Module.Dual K V)) (hb : b ∈ B) : + (M:ℝ)^2 ≤ 4*(weightOnHyperplane w b-μ)^2 := by + have hm : (M:ℝ) ≤ weightOnHyperplane w b := by rw [hweight]; exact_mod_cast hM b hb + have hmean' : 2*μ ≤ M := by dsimp [μ]; nlinarith [hmean] + have hm0 : (0:ℝ) ≤ M := Nat.cast_nonneg _ + have hle : 0 ≤ 2*(weightOnHyperplane w b-μ)-(M:ℝ) := by linarith + have hge : 0 ≤ 2*(weightOnHyperplane w b-μ)+(M:ℝ) := by linarith + nlinarith [mul_nonneg hle hge] + have hs := Finset.sum_le_sum hrow + simp only [Finset.sum_const, nsmul_eq_mul, ← Finset.mul_sum] at hs + have hsub := Finset.sum_le_univ_sum_of_nonneg (s := B) + (fun b => sq_nonneg (weightOnHyperplane w b-μ)) + have hvar : ∑ b, (weightOnHyperplane w b-μ)^2 ≤ (Nat.card K:ℝ)^(d-1)*X.card := hvariance + linarith + +theorem rich_subspaces_variance {d : ℕ} (hdim : finrank K V = d+1) (hd : 1 ≤ d) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = d) + (X : Finset (ℙ K V)) (M : ℕ) + (hM : ∀ A ∈ F, M ≤ (X.filter fun x => x.submodule ≤ A).card) + (hmean : 2*((Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d)*X.card ≤ M) : + (F.card:ℝ)*M^2 ≤ 4*(Nat.card K:ℝ)^(d-1)*X.card := by + let b (A : F) : ℙ K (Module.Dual K V) := dualOfHyperplane hdim A.val (hF A.val A.property) + let B := F.attach.image b + have hi : Function.Injective b := by + intro A B hAB + apply Subtype.ext + have h := congrArg (fun c : ℙ K (Module.Dual K V) => LinearMap.ker c.rep) hAB + simpa only [b,ker_dualOfHyperplane] using h + have hBc : B.card = F.card := by simp [B,Finset.card_image_of_injective _ hi] + have hrich (c : ℙ K (Module.Dual K V)) (hc : c ∈ B) : + M ≤ (X.filter fun x => Incident x c).card := by + obtain ⟨A,_,rfl⟩ := Finset.mem_image.mp hc + simpa only [Incident,b,ker_dualOfHyperplane] using hM A.val A.property + have h := rich_hyperplane_variance hdim hd X B M hrich hmean + simpa only [hBc] using h + +end + +open Module SharpRamseyFive.ProjectiveIncidence +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + +noncomputable def pointsInSubspace (H : Submodule K V) (X : Finset (ℙ K V)) : + Finset (ℙ K H) := + (X.subtype (fun p => p.submodule ≤ H)).map (subspacePointsEquiv H).symm.toEmbedding + +lemma card_pointsInSubspace (H : Submodule K V) (X : Finset (ℙ K V)) : + (pointsInSubspace H X).card = (X.filter fun p => p.submodule ≤ H).card := by + simp [pointsInSubspace] + +lemma mem_pointsInSubspace (H : Submodule K V) (X : Finset (ℙ K V)) (p : ℙ K H) : + p ∈ pointsInSubspace H X ↔ ((subspacePointsEquiv H) p).val ∈ X := by + simp [pointsInSubspace] + +lemma subspacePointsEquiv_submodule (H A : Submodule K V) (p : ℙ K H) : + p.submodule ≤ A.comap H.subtype ↔ ((subspacePointsEquiv H) p).val.submodule ≤ A := by + induction p using Projectivization.ind with | h v hv => + change (Projectivization.mk K v hv).submodule ≤ A.comap H.subtype ↔ + (Projectivization.map H.subtype H.injective_subtype (Projectivization.mk K v hv)).submodule ≤ A + rw [Projectivization.map_mk, Projectivization.submodule_mk, + Projectivization.submodule_mk, Submodule.span_singleton_le_iff_mem, + Submodule.span_singleton_le_iff_mem] + rfl + +lemma card_pointsInSubspace_filter (H A : Submodule K V) (hAH : A ≤ H) + (X : Finset (ℙ K V)) : + ((pointsInSubspace H X).filter fun p => p.submodule ≤ A.comap H.subtype).card = + (X.filter fun p => p.submodule ≤ A).card := by + apply Finset.card_bij (fun p _ => ((subspacePointsEquiv H) p).val) + · intro p hp + obtain ⟨hpX,hpA⟩ := Finset.mem_filter.mp hp + exact Finset.mem_filter.mpr ⟨(mem_pointsInSubspace H X p).mp hpX, + (subspacePointsEquiv_submodule H A p).mp hpA⟩ + · intro p hp q hq hpq + exact (subspacePointsEquiv H).injective (Subtype.ext hpq) + · intro p hp + obtain ⟨hpX,hpA⟩ := Finset.mem_filter.mp hp + let z : {p : ℙ K V // p.submodule ≤ H} := ⟨p,hpA.trans hAH⟩ + refine ⟨(subspacePointsEquiv H).symm z, ?_, ?_⟩ + · apply Finset.mem_filter.mpr + constructor + · rw [mem_pointsInSubspace, Equiv.apply_symm_apply] + exact hpX + · rw [subspacePointsEquiv_submodule, Equiv.apply_symm_apply] + exact hpA + · simp [z] + +lemma comap_subtype_finrank [FiniteDimensional K V] (H A : Submodule K V) (hAH : A ≤ H) : + finrank K (A.comap H.subtype) = finrank K A := by + rw [← Submodule.finrank_map_subtype_eq H, Submodule.map_comap_subtype, inf_eq_right.mpr hAH] + +lemma comap_subtype_injOn (H : Submodule K V) : + Set.InjOn (fun A : Submodule K V => A.comap H.subtype) {A | A ≤ H} := by + intro A hA B hB hAB + change A ≤ H at hA + change B ≤ H at hB + have he := congrArg (fun W : Submodule K H => W.map H.subtype) hAB + simpa only [Submodule.map_comap_subtype, inf_eq_right.mpr hA, inf_eq_right.mpr hB] using he + +theorem rich_hyperplanes_inside_subspace [FiniteDimensional K V] [Finite K] + {d : ℕ} (hd : 1 ≤ d) (H : Submodule K V) (hH : finrank K H = d+1) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = d) + (X : Finset (ℙ K V)) (M : ℕ) + (hM : ∀ A ∈ F, M ≤ (X.filter fun x => x.submodule ≤ A).card) + (hmean : 2*((Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d)* + (X.filter fun p => p.submodule ≤ H).card ≤ M) : + ((F.filter fun A => A ≤ H).card:ℝ)*M^2 ≤ + 4*(Nat.card K:ℝ)^(d-1)*(X.filter fun p => p.submodule ≤ H).card := by + let G := F.filter fun A => A ≤ H + let FH := G.image (fun A => A.comap H.subtype) + have hc : FH.card = G.card := Finset.card_image_iff.mpr (by + intro A hA B hB he + exact comap_subtype_injOn H (Finset.mem_filter.mp hA).2 (Finset.mem_filter.mp hB).2 he) + have hdimF (A : Submodule K H) (hA : A ∈ FH) : finrank K A = d := by + obtain ⟨B,hB,rfl⟩ := Finset.mem_image.mp hA + rw [comap_subtype_finrank H B (Finset.mem_filter.mp hB).2] + exact hF B (Finset.mem_filter.mp hB).1 + have hm (A : Submodule K H) (hA : A ∈ FH) : + M ≤ ((pointsInSubspace H X).filter fun p => p.submodule ≤ A).card := by + obtain ⟨B,hB,rfl⟩ := Finset.mem_image.mp hA + rw [card_pointsInSubspace_filter H B (Finset.mem_filter.mp hB).2] + exact hM B (Finset.mem_filter.mp hB).1 + have hμ : 2*((Q (Nat.card K) (d-1):ℝ)/Q (Nat.card K) d)*(pointsInSubspace H X).card ≤ M := by + simpa only [card_pointsInSubspace] using hmean + have hh := rich_subspaces_variance hH hd FH hdimF (pointsInSubspace H X) M hm hμ + simpa only [hc, card_pointsInSubspace] using hh + +theorem rich_planes_inside_hyperplane [FiniteDimensional K V] [Finite K] + (H : Submodule K V) (hH : finrank K H = 4) + (F : Finset (Submodule K V)) (hF : ∀ A ∈ F, finrank K A = 3) + (X : Finset (ℙ K V)) (M : ℕ) + (hM : ∀ A ∈ F, M ≤ (X.filter fun x => x.submodule ≤ A).card) + (hmean : 2*((Q (Nat.card K) 2:ℝ)/Q (Nat.card K) 3)* + (X.filter fun p => p.submodule ≤ H).card ≤ M) : + ((F.filter fun A => A ≤ H).card:ℝ)*M^2 ≤ + 4*(Nat.card K:ℝ)^2*(X.filter fun p => p.submodule ≤ H).card := by + exact rich_hyperplanes_inside_subspace (by omega : 1 ≤ (3:ℕ)) H hH F hF X M hM hmean + +end SharpRamseyFive.RichPlaneGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/RowPowerTail.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/RowPowerTail.lean new file mode 100644 index 0000000000000000000000000000000000000000..dbd9df3949e26891824d9eed50f46a9ae396daf5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/RowPowerTail.lean @@ -0,0 +1,240 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.RadialOffException +import OAI.Combinatorics.RamseyFive.Geometry.PointStrength + +namespace OAI + +noncomputable section +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence PoissonScore WeightedPrograms DyadicMoments MeasureTheory +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] (x : ℙ K V) [Fintype (RadialLine x)] + +omit [Finite K] in +theorem row_power_of_tail (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀H∈F,Incident x H) (H : F) + (B χ : ℝ) (hB : 0≤B) + (hm : ∀H:F,mass (radialWeight x X δ) (pencilLines x F H)≤2) + (htail : ∀a:ℝ,0 H≠H' ∧ a≤ mass (radialWeight x X δ) + (pencilLines x F H∩pencilLines x F H')).card:ℝ)*a^200≤B*Real.exp (2*χ)) : + (∑H':F,offRow x X δ F H H'^200)≤dyadFactor X.card χ*B := by + have hh := moment_polynomial_tail (offRow x X δ F H) (fun i:ℕ => (δ:ℝ)*2^i) + (boundedOverlapDyads x X δ 2) 200 (by norm_num) (B*Real.exp (2*χ)) + (offRow_nonneg x X δ F H) (by intro i _;positivity) + (offRow_bounded_cover x X δ hδ F hF 2 hm H) (by + intro i hi + have ha : 0<(δ:ℝ)*2^i := by positivity + have he : (Finset.univ.filter fun H':F => (δ:ℝ)*2^i≤offRow x X δ F H H')= + Finset.univ.filter fun H':F => H≠H' ∧ (δ:ℝ)*2^i≤ mass (radialWeight x X δ) + (pencilLines x F H∩pencilLines x F H') := by + apply Finset.filter_congr + intro H' _ + by_cases h : H=H' + · simp [offRow,h,not_le.mpr ha] + · simp [offRow,h] + rw [he] + exact htail _ ha (Finset.mem_filter.mp hi).2) + apply hh.trans + have hc : ((boundedOverlapDyads x X δ 2).card:ℝ)≤(Nat.clog 2 X.card:ℝ)+1 := by + exact_mod_cast boundedOverlapDyads_card x X δ 2 + unfold dyadFactor + calc + _ ≤ 2^(200:ℕ)*((Nat.clog 2 X.card:ℝ)+1)*(B*Real.exp (2*χ)) := by gcongr + _ = _ := by ring + +theorem low_moment_geometric {d:ℕ} (hdim : finrank K V=d+1) (hd : 2≤d) + (X : Finset {y : ℙ K V // x≠y}) (δ L : ℝ≥0) (hδ : 0<δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀H∈F,Incident x H) + (B χ b base D₀ : ℝ) (hB : 0 + a≤ strength (pencilLines x F) (radialWeight x X δ) z).card:ℝ)*a^200≤B^2*Real.exp (2*χ)) + (hrows : ∀H:F,∀a:ℝ,0 H≠H' ∧ a≤ mass (radialWeight x X δ) + (pencilLines x F H∩pencilLines x F H')).card:ℝ)*a^200≤B*Real.exp (2*χ)) + {p : ℕ} (hp : 0 H≠H' ∧ 1/(100*(p:ℝ))≤ mass (radialWeight x X δ) + (pencilLines x F H∩pencilLines x F H')).card:ℝ)≤B*Real.exp (-3*((L:ℝ)*R))) + (hdegreeScalar : 2+B*Real.exp (-3*((L:ℝ)*R))≤B*Real.exp (-((L:ℝ)*R))) + (own : F→Fin R→Bool) + (hDsum : (∑H:F,|mass (radialWeight x X δ) (pencilLines x F H)-base|^(R/2))≤D₀) + (hcost : D₀+2*((p+1:ℝ)*lowMomentBudget (pencilAlphabet (Nat.card K) d) + (dyadFactor X.card χ*B^2) (dyadFactor X.card χ*B) B b L p R + (pencilAlphabet (Nat.card K) (d-1)) (pencilAlphabet (Nat.card K) (d-2)))≤ + B*Real.exp (((L:ℝ)*R)/5)) + (hp2 : (p:ℝ)^2≤Real.exp (((L:ℝ)*R)/10)) + (hpairScalar : (pencilAlphabet (Nat.card K) d:ℝ)+ + (dyadFactor X.card χ*B^2)/(1/(100*(p:ℝ)))^200≤B^2*Real.exp (((L:ℝ)*R)/10)) : + (∫ω,(∑H:F,scoreTerm (pencilLines x F H) (Real.exp (-(L:ℝ)*base)) (own H) + (fun r e => ω (r,e)))^p + ∂batchMeasure (fun i : Fin R×RadialLine x => L*radialWeight x X δ i.2))≤ + B^p*Real.exp (-(1/10:ℝ)*(p*((L:ℝ)*R))) := by + let Q : ℝ := pencilAlphabet (Nat.card K) d + let M : ℝ := dyadFactor X.card χ*B^2 + let A : ℝ := dyadFactor X.card χ*B + let C : ℝ := lowMomentBudget Q M A B b L p R + (pencilAlphabet (Nat.card K) (d-1)) (pencilAlphabet (Nat.card K) (d-2)) + have hM : 0≤M := by dsimp [M,dyadFactor];positivity + have hA : 0≤A := by dsimp [A,dyadFactor];positivity + have hQ : 0≤Q := Nat.cast_nonneg _ + have hC := lowMomentBudget_bounds Q M A B b L p R + (pencilAlphabet (Nat.card K) (d-1)) (pencilAlphabet (Nat.card K) (d-2)) + hQ hM hA hB (zero_le_one.trans hb) L.coe_nonneg + have hQsize : (F.card:ℝ)≤Q := by + have hh := pencil_size x F hF + rw [hdim,show d+1-1=d by omega] at hh + change (F.card:ℝ)≤(pencilAlphabet (Nat.card K) d:ℝ) + exact_mod_cast hh + have hPow : (∑z:DistinctPairs F,strength (pencilLines x F) (radialWeight x X δ) z^200)≤M := by + have hh := score_polynomial_power x X δ hδ F hF 2 (B^2*Real.exp (2*χ)) (by positivity) + 200 (by norm_num) hm (by + intro i hi + exact hpairs _ (by positivity) (Finset.mem_filter.mp hi).2) + simpa only [M,dyadFactor,mul_assoc,mul_left_comm,mul_comm] using hh + have hRow (H:F) : (∑H':F,offRow x X δ F H H'^200)≤A := + row_power_of_tail x X δ hδ F hF H B χ hB.le hm (hrows H) + have hmassL (H:F) : (∑e∈pencilLines x F H,((L*radialWeight x X δ e:ℝ≥0):ℝ))≤2*(L:ℝ) := by + simpa only [mass,NNReal.coe_mul,Finset.mul_sum,mul_comm (L:ℝ) 2] using + mul_le_mul_of_nonneg_left (hm H) L.coe_nonneg + have hN1 (e : RadialLine x) : (Finset.univ.filter fun H:F => e∈pencilLines x F H).card≤ + pencilAlphabet (Nat.card K) (d-1) := by + have hh := one_anchor_count x F e + simpa only [hdim,show d+1-2=d-1 by omega,pencilAlphabet] using hh + have hN2 (e f : RadialLine x) (hef : e≠f) : (Finset.univ.filter fun H:F => + e∈pencilLines x F H ∧ f∈pencilLines x F H).card≤pencilAlphabet (Nat.card K) (d-2) := by + have hh := two_anchor_count x F e f hef + simpa only [hdim,show d+1-3=d-2 by omega,pencilAlphabet] using hh + let Δ := ⌈1+B*Real.exp (-3*((L:ℝ)*R))⌉₊ + have hΔ (H:F) : Fintype.card {H':F // AmbientEnumeration.overlapRelation + (radialWeight x X δ) (pencilLines x F) (1/(100*(p:ℝ))) H H'}≤Δ := by + have hc := strong_degree_le x X δ F H (1/(100*(p:ℝ))) + have hcR : (Fintype.card {H':F // AmbientEnumeration.overlapRelation + (radialWeight x X δ) (pencilLines x F) (1/(100*(p:ℝ))) H H'}:ℝ)≤ + 1+((Finset.univ.filter fun H':F => H≠H' ∧ 1/(100*(p:ℝ))≤ mass (radialWeight x X δ) + (pencilLines x F H∩pencilLines x F H')).card:ℝ) := by exact_mod_cast hc + exact Nat.cast_le.mp ((hcR.trans (add_le_add (le_refl 1) (hdegree H))).trans + (show 1+B*Real.exp (-3*((L:ℝ)*R))≤(Δ:ℝ) from Nat.le_ceil _)) + have hΔscale : (Δ:ℝ)≤B*Real.exp (-((L:ℝ)*R)) := by + have hn := Nat.ceil_lt_add_one (show 0≤1+B*Real.exp (-3*((L:ℝ)*R)) by positivity) + apply hn.le.trans + linarith only [hdegreeScalar] + have hpairs'' : (Fintype.card (ComponentEnumeration.RelatedPair (AmbientEnumeration.overlapRelation + (radialWeight x X δ) (pencilLines x F) (1/(100*(p:ℝ))))):ℝ)≤B^2*Real.exp (((L:ℝ)*R)/10) := by + apply (strong_pairs_le x X δ F _).trans + apply le_trans (add_le_add hQsize (power_tail_card _ (fun z => by unfold strength; positivity) + 200 _ M (by positivity) hPow)) + exact hpairScalar + apply AmbientEnumeration.ambient_untruncated_moment (radialWeight x X δ) (pencilLines x F) + hp R own L B b (2*(L:ℝ)) C D₀ base B hL hbase hlower hdelta hB hb (by positivity) + hC.1 hD hB.le hmassL 200 h _ _ (by norm_num) hKR hh hsize herr hN1 hN2 ?_ ?_ ?_ + hDsum hcost hp2 Δ hΔ hΔscale hpairs'' + · exact (score_certificate_majorant x X δ L F p R 200 _ _ Q M B b hB (zero_le_one.trans hb) + hQsize hM hm hPow).trans hC.2.1 + · intro H + exact (shift_row_from_power x X δ F H p 200 (by norm_num) A (hRow H)).trans hC.2.2.1 + · exact (shift_pair_from_power x X δ F p 200 M hPow).trans + ((add_le_add hQsize (le_refl _)).trans hC.2.2.2) + +end + +open Module ProjectiveIncidence CellVariance ScoreRegularity PoissonScore MeasureTheory +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + (x : ℙ K V) [Fintype (RadialLine x)] + +theorem actual_low_radial_moment {d : ℕ} (hdim : finrank K V=d+1) (hd : 2≤d) + {J : Type} [Fintype J] (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) + (hS : S.Nonempty) (a b c : J) (ha : C a⊆S) (hb : C b⊆S) (hc : C c=C a∩C b) + (F : Finset (ℙ K (Dual K V))) + (hF : ∀H∈F,Incident x H ∧ H∉exceptional S C) + (hf : ownFraction S (C a) (C b)≤2/25) + (hn : (Nat.card K:ℝ)/S.card≤1/100) + (L : ℝ≥0) (hL : 10000≤(L:ℝ)) (R p h : ℕ) (hp : 0 + u ≤ mass (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (pencilLines x F z.1∩pencilLines x F z.2.val)).card:ℝ)*u^200≤ + (scale (K:=K) d S.card)^2*Real.exp (((L:ℝ)*R)/50)) + (hrows : ∀H:F,∀u:ℝ,0 H≠H' ∧ u ≤ mass + (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (pencilLines x F H∩pencilLines x F H')).card:ℝ)*u^200≤ + scale (K:=K) d S.card*Real.exp (((L:ℝ)*R)/50)) + (hdegree : ∀H:F, + ((Finset.univ.filter fun H':F => H≠H' ∧ 1/(100*(p:ℝ)) ≤ mass + (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (pencilLines x F H∩pencilLines x F H')).card:ℝ)≤ + scale (K:=K) d S.card*Real.exp (-3*((L:ℝ)*R))) + (hdegreeScalar : 2+scale (K:=K) d S.card*Real.exp (-3*((L:ℝ)*R))≤ + scale (K:=K) d S.card*Real.exp (-((L:ℝ)*R))) + (hp2 : (p:ℝ)^2≤Real.exp (((L:ℝ)*R)/10)) + (hpairScalar : (pencilAlphabet (Nat.card K) d:ℝ)+ + (dyadFactor (outsideAt x S (C a∪C b)).card (((L:ℝ)*R)/100)* + (scale (K:=K) d S.card)^2)/(1/(100*(p:ℝ)))^200≤ + (scale (K:=K) d S.card)^2*Real.exp (((L:ℝ)*R)/10)) + (hcost : 40*scale (K:=K) d S.card*Real.exp ((L:ℝ)/100)+ + 2*((p+1:ℝ)*lowMomentBudget (pencilAlphabet (Nat.card K) d) + (dyadFactor (outsideAt x S (C a∪C b)).card (((L:ℝ)*R)/100)*(scale (K:=K) d S.card)^2) + (dyadFactor (outsideAt x S (C a∪C b)).card (((L:ℝ)*R)/100)*scale (K:=K) d S.card) + (scale (K:=K) d S.card) cut L p R + (pencilAlphabet (Nat.card K) (d-1)) (pencilAlphabet (Nat.card K) (d-2)))≤ + scale (K:=K) d S.card*Real.exp (((L:ℝ)*R)/5)) (own : F→Fin R→Bool) : + (∫ω,(∑H:F,scoreTerm (pencilLines x F H) + (Real.exp (-(L:ℝ)*(1-ownFraction S (C a) (C b)))) (own H) + (fun r e => ω (r,e)))^p + ∂batchMeasure (fun i : Fin R×RadialLine x => L* + radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S) i.2))≤ + (scale (K:=K) d S.card)^p*Real.exp (-(1/10:ℝ)*(p*((L:ℝ)*R))) := by + have hB : 0 (hF H hH).1) + (scale (K:=K) d S.card) (((L:ℝ)*R)/100) cut (1-ownFraction S (C a) (C b)) + (40*scale (K:=K) d S.card*Real.exp ((L:ℝ)/100)) hB hcut (by positivity) hL + (by linarith only [hf]) (fun H => (hm H).2.2.trans (by norm_num)) + (fun H => (hm H).1) (fun H => (hm H).2.1) ?_ ?_ hp R h hKR hh hsize herr + hdegree hdegreeScalar own hDsum hcost hp2 hpairScalar + · intro u hu hu2 + simp only [show 2*(((L:ℝ)*R)/100)=((L:ℝ)*R)/50 by ring] + convert! hpairs u hu hu2 using 1 + · intro H u hu hu2 + simpa only [show 2*(((L:ℝ)*R)/100)=((L:ℝ)*R)/50 by ring] using hrows H u hu hu2 + +end SharpRamseyFive.ScoreGeometry + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/SampledPoints.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/SampledPoints.lean new file mode 100644 index 0000000000000000000000000000000000000000..41de1a565c4bcabd0b9a477ae6c52f310c8848f6 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/SampledPoints.lean @@ -0,0 +1,192 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Probability.SumPoissonPow +import OAI.Combinatorics.RamseyFive.Geometry.PencilCount + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory ProbabilityTheory PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + +noncomputable def sampledPoints (S : Finset (ℙ K V)) {R : ℕ} (ω : Fin R→S→ℕ) : Finset (ℙ K V) := + S.filter fun x => ¬Unsampled x S ω + +lemma not_mem_sampledPoints (S : Finset (ℙ K V)) {R : ℕ} (ω : Fin R→S→ℕ) (x : ℙ K V) : + x∉sampledPoints S ω ↔ Unsampled x S ω := by + simp only [sampledPoints,Finset.mem_filter,not_and,not_not] + refine ⟨fun h r y hy => ?_,fun h _ => h⟩ + apply h (hy ▸ y.property) r y hy + +lemma sampledPoints_card {R : ℕ} (S : Finset (ℙ K V)) (ω : Fin R→S→ℕ) : + (sampledPoints S ω).card≤ sampleCount ω := by + let F : Finset S := Finset.univ.filter fun y => ¬Unsampled y.val S ω + have he : F.map (Function.Embedding.subtype _) = sampledPoints S ω := by + ext x + simp only [Finset.mem_map,Function.Embedding.subtype_apply,F,Finset.mem_filter, + Finset.mem_univ,true_and,sampledPoints,Subtype.exists] + constructor + · rintro ⟨y,hy,hu,rfl⟩ + exact ⟨hy,hu⟩ + · rintro ⟨hx,hu⟩ + exact ⟨x,hx,hu,rfl⟩ + rw [←he,Finset.card_map] + calc + F.card = ∑_y∈F,1 := by simp + _ ≤ ∑y∈F,∑r,ω r y := Finset.sum_le_sum fun y hy => by + have hn := (Finset.mem_filter.mp hy).2 + have hp : ∃r,ω r y≠0 := by + by_contra h + push Not at h + apply hn + intro r z hz + have he : z=y := Subtype.val_injective hz.symm + subst z + exact h r + obtain ⟨r,hr⟩ := hp + exact (Nat.one_le_iff_ne_zero.mpr hr).trans (Finset.single_le_sum (f:=fun r => ω r y) (fun _ _ => Nat.zero_le _) (Finset.mem_univ r)) + _ ≤ ∑y:S,∑r,ω r y := Finset.sum_le_sum_of_subset_of_nonneg (Finset.subset_univ _) (fun _ _ _ => Nat.zero_le _) + _ = sampleCount ω := Finset.sum_comm + +end + +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory ProbabilityTheory PoissonScore ScoreAcceptance +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def decoded (U S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (b : ℙ K V→ℝ) (z : ℕ) {R : ℕ} (ω : Fin R→S→ℕ) : Finset (ℙ K V) := + accepted U (sampledPoints S ω) (fun x => pointScore S (O x) (pencil x) (b x) ω) + ((z:ℝ)/(2*(Nat.card K:ℝ))) + +noncomputable def typicalFailures (U S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (E : Finset (ℙ K (Dual K V))) (b : ℙ K V→ℝ) (t : ℝ) {R : ℕ} + (ω : Fin R→S→ℕ) : Finset (ℙ K V) := + U.filter fun x => Unsampled x S ω ∧ t < |pointScore S (O x) (pencil x\E) (b x) ω| + +theorem decoded_bounds {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (hq : (10:ℝ)≤Nat.card K) (U S : Finset (ℙ K V)) (hSU : S⊆U) (hS : S.Nonempty) + (O : ℙ K V→Finset (ℙ K V)) (E : Finset (ℙ K (Dual K V))) + (b : ℙ K V→ℝ) {R : ℕ} (ω : Fin R→S→ℕ) (bad : Finset (ℙ K V)) + (hZ : (emptyTests E (hyperplaneSupport S) ω).Nonempty) + (hm : ∑ H∈emptyTests E (hyperplaneSupport S) ω, + cellMass S ((Nat.card K:ℝ)/S.card) H≤ ((emptyTests E (hyperplaneSupport S) ω).card:ℝ)/1000) + (hb : ∀x∈U\bad,b x∈Set.Icc 0 1) + (hc : ∀x∈U\bad,(9/10:ℝ)≤(1-b x)^R) + (herr : ∀x∈U\bad,b x*(pencil x∩E).card≤ + ((emptyTests E (hyperplaneSupport S) ω).card:ℝ)/(100*(Nat.card K:ℝ))) : + let Z := emptyTests E (hyperplaneSupport S) ω + let W := decoded U S O b Z.card ω + let t := (Z.card:ℝ)/(10*(Nat.card K:ℝ)) + (99/100:ℝ)*S.card-bad.card-(typicalFailures S S O E b t ω).card≤((W∩S).card:ℝ) ∧ + (W.card:ℝ)≤ sampleCount ω+bad.card+(typicalFailures U S O E b t ω).card+ + 100*(Nat.card K:ℝ)^(d+1)/Z.card := by + dsimp only + let Z := emptyTests E (hyperplaneSupport S) ω + let z : ℝ := Z.card + let q : ℝ := Nat.card K + let t : ℝ := z/(10*q) + let W := decoded U S O b Z.card ω + let TS := typicalFailures S S O E b t ω + let TU := typicalFailures U S O E b t ω + let BS := S.filter fun x => t < pencilCount Z x + let BU := Finset.univ.filter fun x => pencilCount Z x<(4/5:ℝ)*z/q + have hz : 0 hbad (Finset.mem_union_left _ (Finset.mem_union_left _ h)) + have hTS : x∉TS := fun h => hbad (Finset.mem_union_left _ (Finset.mem_union_right _ h)) + have hBS0 : x∉BS := fun h => hbad (Finset.mem_union_right _ h) + have hxU : x∈U\bad := Finset.mem_sdiff.mpr ⟨hSU hx,hb0⟩ + refine Finset.mem_inter.mpr ⟨?_,hx⟩ + apply Finset.mem_filter.mpr + refine ⟨hSU hx,?_⟩ + by_cases hsamp : x∈sampledPoints S ω + · exact Or.inl hsamp + apply Or.inr + have hu := (not_mem_sampledPoints S ω x).mp hsamp + have htyp : |pointScore S (O x) (pencil x\E) (b x) ω|≤z/q/10 := by + have hn : ¬t < |pointScore S (O x) (pencil x\E) (b x) ω| := + fun h => hTS (Finset.mem_filter.mpr ⟨hx,hu,h⟩) + convert! le_of_not_gt hn using 1; dsimp [t]; ring + have hzx : pencilCount Z x≤z/q/10 := by + have hn : ¬t < pencilCount Z x := fun h => hBS0 (Finset.mem_filter.mpr ⟨hx,h⟩) + convert! le_of_not_gt hn using 1; dsimp [t]; ring + have hcoef : 0≤(1-b x)^R ∧ (1-b x)^R≤1 := by + exact ⟨pow_nonneg (sub_nonneg.mpr (hb x hxU).2) _, + pow_le_one₀ (sub_nonneg.mpr (hb x hxU).2) (by linarith [(hb x hxU).1])⟩ + have hh := training_separation (z/q) ((1-b x)^R) (pencilCount Z x) + (pointScore S (O x) (pencil x) (b x) ω- + ((1-b x)^R*pencilCount Z x+pointScore S (O x) (pencil x\E) (b x) ω)) + (pointScore S (O x) (pencil x\E) (b x) ω) hzq hcoef + ⟨pencilCount_nonneg Z x,hzx⟩ (ht x hxU) htyp + change pointScore S (O x) (pencil x) (b x) ω hn (Finset.mem_union_left _ h) + have hbad : x∉bad∪TU∪BU := fun h => hn (Finset.mem_union_right _ h) + have hb0 : x∉bad := fun h => hbad (Finset.mem_union_left _ (Finset.mem_union_left _ h)) + have hTU : x∉TU := fun h => hbad (Finset.mem_union_left _ (Finset.mem_union_right _ h)) + have hBU0 : x∉BU := fun h => hbad (Finset.mem_union_right _ h) + have hxU : x∈U\bad := Finset.mem_sdiff.mpr ⟨hx,hb0⟩ + have hu := (not_mem_sampledPoints S ω x).mp hsamp + have htyp : |pointScore S (O x) (pencil x\E) (b x) ω|≤z/q/10 := by + have hn : ¬t < |pointScore S (O x) (pencil x\E) (b x) ω| := + fun h => hTU (Finset.mem_filter.mpr ⟨hx,hu,h⟩) + convert! le_of_not_gt hn using 1; dsimp [t]; ring + have hzx : (4/5:ℝ)*(z/q)≤pencilCount Z x := by + have hn : ¬pencilCount Z x<(4/5:ℝ)*z/q := + fun h => hBU0 (Finset.mem_filter.mpr ⟨Finset.mem_univ x,h⟩) + convert! le_of_not_gt hn using 1; ring + have hh := ambient_separation (z/q) ((1-b x)^R) (pencilCount Z x) + (pointScore S (O x) (pencil x) (b x) ω- + ((1-b x)^R*pencilCount Z x+pointScore S (O x) (pencil x\E) (b x) ω)) + (pointScore S (O x) (pencil x\E) (b x) ω) hzq (hc x hxU) hzx (ht x hxU) htyp + change pointScore S (O x) (pencil x) (b x) ω H≠H' ∧ a≤ + mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H')).card:ℝ)*a^200 ≤ + ((Nat.card K:ℝ)^4/n)*Real.exp (2*χ) := by + have hq : (1:ℝ)≤Nat.card K := by + exact_mod_cast Nat.succ_le_iff.mpr (Nat.card_pos : 0 (δ:ℝ)*2^i) + (boundedOverlapDyads x X δ 2) 200 (by norm_num) + (((Nat.card K:ℝ)^4/n)*Real.exp (2*χ)) (offRow_nonneg x X δ F H) + (by intro i _; positivity) (offRow_bounded_cover x X δ hδ F hF 2 hm H) ?_).trans + · exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left + (by exact_mod_cast boundedOverlapDyads_card x X δ 2) (by positivity)) (by positivity) + intro i hi + have ha : 0<(δ:ℝ)*2^i := by positivity + have he : (Finset.univ.filter (fun H' : F => (δ:ℝ)*2^i ≤ offRow x X δ F H H'))= + Finset.univ.filter (fun H' : F => H≠H' ∧ (δ:ℝ)*2^i ≤ + mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H')) := by + apply Finset.filter_congr + intro H' _ + by_cases h : H=H' + · simp [offRow,h,not_le.mpr ha] + · simp [offRow,h] + rw [he] + exact score_degree_low_normalized x hdim X δ hδ F hF H n _ χ hn ha.le + (Finset.mem_filter.mp hi).2 (hm H) hcap hlow hchi + +omit [FiniteDimensional K V] [Finite K] in + +theorem shift_row_from_power (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (H : F) (p k : ℕ) (hk : k≠0) + (A : ℝ) (hA : (∑ H',offRow x X δ F H H'^k)≤A) : + (∑ H',SingletonEnumeration.shiftKernel (radialWeight x X δ) (pencilLines x F) p k H' H)≤ + 1+(p:ℝ)^k*A := by + have hs : (∑ H' : F,if H=H' then (1:ℝ) else 0)=1 := by simp + calc + _ ≤ ∑ H' : F,((if H=H' then (1:ℝ) else 0)+((p:ℝ)*offRow x X δ F H H')^k) := by + apply Finset.sum_le_sum + intro H' _ + by_cases he : H=H' + · simp only [ite_eq_left he,offRow,mul_zero,zero_pow hk,add_zero] + exact (SingletonEnumeration.shiftKernel_range _ _ p k H' H).2 + · simp only [ite_eq_right he,offRow,zero_add] + unfold SingletonEnumeration.shiftKernel + rw [Finset.inter_comm] + exact min_le_right _ _ + _ = 1+(p:ℝ)^k*(∑ H',offRow x X δ F H H'^k) := by + rw [Finset.sum_add_distrib,hs] + simp only [mul_pow,Finset.mul_sum] + _ ≤ 1+(p:ℝ)^k*A := add_le_add_right + (mul_le_mul_of_nonneg_left hA (pow_nonneg (Nat.cast_nonneg p) k)) 1 + +omit [FiniteDimensional K V] [Finite K] in + +theorem shift_pair_from_power (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (p k : ℕ) (A : ℝ) + (hA : (∑ z : DistinctPairs F,strength (pencilLines x F) (radialWeight x X δ) z^k)≤A) : + (∑ H : F,∑ H' : F,SingletonEnumeration.shiftKernel (radialWeight x X δ) + (pencilLines x F) p k H H') ≤ F.card+(p:ℝ)^k*A := by + rw [SingletonEnumeration.sum_pairs_split_diagonal] + apply add_le_add + · have hh:=Finset.sum_le_sum (fun H (_ : H∈(Finset.univ : Finset F)) => + (SingletonEnumeration.shiftKernel_range (radialWeight x X δ) (pencilLines x F) p k H H).2) + simpa only [Finset.sum_const,Finset.card_univ,nsmul_eq_mul,mul_one,Fintype.card_coe] using hh + · calc + _ ≤ ∑ z : DistinctPairs F,((p:ℝ)*strength (pencilLines x F) (radialWeight x X δ) z)^k := + Finset.sum_le_sum (fun z _ => min_le_right _ _) + _ = (p:ℝ)^k*∑ z : DistinctPairs F,strength (pencilLines x F) (radialWeight x X δ) z^k := by + simp only [mul_pow,Finset.mul_sum] + _ ≤ _ := mul_le_mul_of_nonneg_left hA (by positivity) + +omit [FiniteDimensional K V] [Finite K] in + +theorem certificate_pair_eq_power (X : Finset {y : ℙ K V // x≠y}) (δ L : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (R k : ℕ) : + WeightedPrograms.pairMoment (B := Fin R) (pencilLines x F) + (fun l => L*radialWeight x X δ l) k= + ((R:ℝ)*(L:ℝ))^k*∑ z : DistinctPairs F,strength (pencilLines x F) (radialWeight x X δ) z^k := by + unfold WeightedPrograms.pairMoment + change _ = _ * ∑ z : (Σ h : F, {h' : F // h' ≠ h}), _ + rw [Fintype.sum_sigma,Finset.mul_sum] + apply Finset.sum_congr rfl + intro H _ + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro H' _ + simp only [Fintype.card_fin,NNReal.coe_mul,←Finset.mul_sum,WeightedPrograms.strength] + rw [←mul_assoc,mul_pow] + +end + +open Module ProjectiveIncidence PoissonScore WeightedPrograms +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal + +noncomputable def certificateMajorant (Q M B b L : ℝ) (p R k N₁ N₂ : ℕ) : ℝ := + B*(1+(((p:ℝ)*(Q*p)/B)/b^8+ + (p:ℝ)^2*(N₁*p)*((k:ℝ)*p+R*(2*L))/B+ + ((p:ℝ)^3*(N₂*p)*((k:ℝ)*p+R*(2*L))^2/B)*b+ + (p:ℝ)^2*((p:ℝ)^2*((R*L)^k*M+Q*(R*(2*L))^k))/B^2)) + +lemma certificateMajorant_nonneg (Q M B b L : ℝ) (p R k N₁ N₂ : ℕ) + (hQ : 0 ≤ Q) (hM : 0 ≤ M) (hB : 0 ≤ B) (hb : 0 ≤ b) (hL : 0 ≤ L) : + 0 ≤ certificateMajorant Q M B b L p R k N₁ N₂ := by + unfold certificateMajorant + positivity + +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +omit [FiniteDimensional K V] [Finite K] in + +theorem score_certificate_majorant (X : Finset {y : ℙ K V // x≠y}) (δ L : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (p R k N₁ N₂ : ℕ) (Q M B b : ℝ) + (hB : 0 < B) (_hb : 0 ≤ b) (hQ : (F.card:ℝ) ≤ Q) (_hM : 0 ≤ M) + (hm : ∀ H : F,mass (radialWeight x X δ) (pencilLines x F H) ≤ 2) + (hPow : (∑ z : DistinctPairs F,strength (pencilLines x F) (radialWeight x X δ) z^k) ≤ M) : + B*(1+branchingBound (V := Fin p) (B := Fin R) + (fun z : F × Fin p => pencilLines x F z.1) (fun l => L*radialWeight x X δ l) + B b (2*(L:ℝ)) k (N₁*p) (N₂*p) true) ≤ + certificateMajorant Q M B b L p R k N₁ N₂ := by + have hmass (H : F) : (∑ l∈pencilLines x F H,((L*radialWeight x X δ l:ℝ≥0):ℝ)) ≤ 2*(L:ℝ) := by + have hh := mul_le_mul_of_nonneg_left (hm H) L.coe_nonneg + simpa only [mass,NNReal.coe_mul,Finset.mul_sum,mul_comm (L:ℝ) 2] using hh + have hQ0 : 0 ≤ Q := (Nat.cast_nonneg F.card).trans hQ + have hpair := SingletonEnumeration.pairMoment_labelled_le (V := Fin p) (B := Fin R) + (pencilLines x F) (fun l => L*radialWeight x X δ l) k (2*(L:ℝ)) (by positivity) hmass + simp only [Fintype.card_fin,Fintype.card_coe] at hpair + rw [certificate_pair_eq_power] at hpair + have hpair' : pairMoment (B := Fin R) (fun z : F × Fin p => pencilLines x F z.1) + (fun l => L*radialWeight x X δ l) k ≤ + (p:ℝ)^2*(((R:ℝ)*(L:ℝ))^k*M+Q*((R:ℝ)*(2*(L:ℝ)))^k) := by + apply hpair.trans + gcongr + unfold certificateMajorant + apply mul_le_mul_of_nonneg_left _ hB.le + apply add_le_add_right + unfold branchingBound uniformAnchorBudget + simp only [reduceIte,Fintype.card_fin,Fintype.card_prod,Fintype.card_coe, + Nat.cast_mul] + gcongr + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ScorePairCapturedNormalized.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ScorePairCapturedNormalized.lean new file mode 100644 index 0000000000000000000000000000000000000000..0f5b2cb75d1ed0d435fedf357cf77d864afbac0d --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ScorePairCapturedNormalized.lean @@ -0,0 +1,154 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.OutsideCard +import OAI.Combinatorics.RamseyFive.Geometry.OutsidePairCard +import OAI.Combinatorics.RamseyFive.Probability.NormalizedPairHigh +import OAI.Combinatorics.RamseyFive.Probability.HighOrSmall + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining HighPlaneBudget +open GlobalRadial PoissonScore WeightedPrograms +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +theorem score_pair_captured_normalized (hdim : finrank K V=5) + {I : Type} [LinearOrder I] (F : Finset I) (hF : F.Nonempty) + (P : I → Submodule K V) (X S O : Finset (ℙ K V)) + (J : ℕ) (hS : S ⊆ X \ remaining F hF (fun i => flatPoints (P i)) X J) + (hO : ownCell F hF (fun i => flatPoints (P i)) X J x ⊆ O) + (δ : ℝ≥0) (hδ : 0 < δ) (G : Finset (ℙ K (Dual K V))) + (hG : ∀ H∈G,Incident x H) + (Planes : Finset (Submodule K V)) (hPlanes : ∀ A∈Planes,finrank K A=3) + (hcomplete : ∀ A : Submodule K V,finrank K A=3 → A∈Planes) + (a χ : ℝ) (Y : Finset (ℙ K V)) (hxY : x∈Y) + (hn : 0 < X.card) (ha : 0 < a) (ha2 : a ≤ 2) + (hcap : (X.card:ℝ) ≤ (Nat.card K:ℝ)^3) + (hscale : (X.card:ℝ)*(δ:ℝ) ≤ 4*Nat.card K) + (hhigh : 2097152*(Nat.card K:ℝ)^2 ≤ X.card*a^2) + (hchi : (34359738369*2^200:ℝ) ≤ Real.exp χ) + (hx : x∉highExceptions F hF P X Planes J a χ Y) : + ((Finset.univ.filter fun z : DistinctPairs G => a ≤ strength (pencilLines x G) + (radialWeight x (outsideAt x S O) δ) z).card:ℝ)*a^200 ≤ + ((Nat.card K:ℝ)^4/X.card)^2*Real.exp (2*χ) := by + have hn' : (0:ℝ) < X.card := by exact_mod_cast hn + have hq : (1:ℝ) ≤ Nat.card K := by exact_mod_cast (Nat.succ_le_iff.mpr (Nat.card_pos : 0 < Nat.card K)) + apply ScoreScalars.normalized_pair_high hq hn' ha ha2 hcap hchi + have hh := score_high_captured_pairs_of_le x hdim F hF P X S O J hS hO δ hδ G hG + Planes hPlanes hcomplete a a χ Y hxY hn ha ha2 hhigh + (high_threshold_scale (K := K) δ X.card a hn' ha.le hscale) hx + have hh' : ((Finset.univ.filter fun z : DistinctPairs G => a ≤ strength (pencilLines x G) + (radialWeight x (outsideAt x S O) δ) z).card:ℝ) ≤ + (2*HighParameters.degree (Nat.card K) X.card a χ*(Nat.card K+1)^2:ℕ) := Nat.cast_le.mpr hh + simpa only [Nat.cast_mul,Nat.cast_ofNat,Nat.cast_pow,Nat.cast_add,Nat.cast_one] using hh' + +theorem score_pair_residual_normalized (hdim : finrank K V=5) + (X S O : Finset (ℙ K V)) (hS : S ⊆ X) + (δ : ℝ≥0) (hδ : 0 < δ) (G : Finset (ℙ K (Dual K V))) + (hG : ∀ H∈G,Incident x H) + (Planes : Finset (Submodule K V)) (hPlanes : ∀ A∈Planes,finrank K A=3) + (hcomplete : ∀ A : Submodule K V,finrank K A=3 → A∈Planes) + (a χ : ℝ) (Y : Finset (ℙ K V)) (hxY : x∈Y) + (hn : 0 < X.card) (ha : 0 < a) (ha2 : a ≤ 2) + (hcap : (X.card:ℝ) ≤ (Nat.card K:ℝ)^3) + (hscale : (X.card:ℝ)*(δ:ℝ) ≤ 4*Nat.card K) + (hchi : (34359738369*2^200:ℝ) ≤ Real.exp χ) + (hx : x∉residualExceptions Planes X Y a χ) : + ((Finset.univ.filter fun z : DistinctPairs G => a ≤ strength (pencilLines x G) + (radialWeight x (outsideAt x S O) δ) z).card:ℝ)*a^200 ≤ + ((Nat.card K:ℝ)^4/X.card)^2*Real.exp (2*χ) := by + have hn' : (0:ℝ) < X.card := by exact_mod_cast hn + have hq : (1:ℝ) ≤ Nat.card K := by exact_mod_cast (Nat.succ_le_iff.mpr (Nat.card_pos : 0 < Nat.card K)) + apply ScoreScalars.normalized_pair_high hq hn' ha ha2 hcap hchi + have ht := high_threshold_scale (K := K) δ X.card a hn' ha.le hscale + have ht' : (δ:ℝ)*HighParameters.threshold (Nat.card K) X.card a ≤ a := by + have h0 : 0 ≤ (δ:ℝ)*(HighParameters.threshold (Nat.card K) X.card a:ℝ) := by positivity + linarith + have hh := score_high_residual_pairs x hdim X S O hS δ hδ G hG Planes hPlanes hcomplete + a a χ Y hxY ht' hx + have hh' : ((Finset.univ.filter fun z : DistinctPairs G => a ≤ strength (pencilLines x G) + (radialWeight x (outsideAt x S O) δ) z).card:ℝ) ≤ + (HighParameters.degree (Nat.card K) X.card a χ*(Nat.card K+1)^2:ℕ) := Nat.cast_le.mpr hh + simp only [Nat.cast_mul,Nat.cast_pow,Nat.cast_add,Nat.cast_one] at hh' + apply hh'.trans + have h0 : 0 ≤ (HighParameters.degree (Nat.card K) X.card a χ:ℝ)*(Nat.card K+1)^2 := by positivity + nlinarith + +theorem score_pair_captured_moment (hdim : finrank K V=5) + {I : Type} [LinearOrder I] (F : Finset I) (hF : F.Nonempty) + (P : I → Submodule K V) (X S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (J : ℕ) (hS : S ⊆ X \ remaining F hF (fun i => flatPoints (P i)) X J) + (hO : ownCell F hF (fun i => flatPoints (P i)) X J x ⊆ O x) + (δ : ℝ≥0) (hδ : 0 < δ) (G : Finset (ℙ K (Dual K V))) (hG : ∀ H∈G,Incident x H) + (Planes : Finset (Submodule K V)) (hPlanes : ∀ A∈Planes,finrank K A=3) + (hcomplete : ∀ A : Submodule K V,finrank K A=3 → A∈Planes) + (χ : ℝ) (Q : Finset (ℙ K V)) (hx : x∈Q) + (hn : 0 < X.card) (hcap : (X.card:ℝ) ≤ (Nat.card K:ℝ)^3) + (hscale : (X.card:ℝ)*(δ:ℝ) ≤ 4*Nat.card K) + (hhigh : 8388608*(Nat.card K:ℝ)^2 ≤ X.card) + (hchi : (34359738369*2^200:ℝ) ≤ Real.exp χ) + (hmass : (δ:ℝ)*S.card ≤ Nat.card K) + (Lines : Finset (Submodule K V)) (hLines : ∀ l : RadialLine x,l.val∈Lines) + (hm : ∀ H : G,mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x G H) ≤ 2) + (hgood : ∀ i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + x∉badCenters S O δ (((δ:ℝ)*2^i)/2) Lines Q + ((Nat.card K:ℝ)^4/X.card^2*Real.exp χ/(((δ:ℝ)*2^i)/2)^100)) + (hcaptured : ∀ i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + 2097152*(Nat.card K:ℝ)^2 ≤ X.card*((δ:ℝ)*2^i)^2 → + x∉highExceptions F hF P X Planes J ((δ:ℝ)*2^i) χ Q) + (R : ℕ) (hR : 200 ≤ R) : + (∑ z : DistinctPairs G,strength (pencilLines x G) (radialWeight x (outsideAt x S (O x)) δ) z^R) ≤ + 2^R*(Nat.clog 2 (outsideAt x S (O x)).card+1)*(((Nat.card K:ℝ)^4/X.card)^2*Real.exp (2*χ)) := by + have hn' : (0:ℝ) < X.card := by exact_mod_cast hn + apply score_higher_power x _ δ hδ G hG _ (by positivity) 200 R (by norm_num) hR hm + intro i hi + have ha : 0 < (δ:ℝ)*2^i := by positivity + have ha2 := (Finset.mem_filter.mp hi).2 + rcases ScoreScalars.high_or_small (q := (Nat.card K:ℝ)) (n := X.card) + (by positivity) hn' ha.le hhigh with hlarge|hsmall + · exact score_pair_captured_normalized x hdim F hF P X S (O x) J hS hO δ hδ G hG + Planes hPlanes hcomplete _ χ Q hx hn ha ha2 hcap hscale hlarge hchi (hcaptured i hi hlarge) + · exact score_pair_small_normalized x hdim S O δ hδ G hG X.card _ χ hn' ha ha2 hmass hsmall + (le_trans (by norm_num) hchi) Lines hLines Q hx (hgood i hi) + +theorem score_pair_residual_moment (hdim : finrank K V=5) + (X S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) (hS : S ⊆ X) + (δ : ℝ≥0) (hδ : 0 < δ) (G : Finset (ℙ K (Dual K V))) (hG : ∀ H∈G,Incident x H) + (Planes : Finset (Submodule K V)) (hPlanes : ∀ A∈Planes,finrank K A=3) + (hcomplete : ∀ A : Submodule K V,finrank K A=3 → A∈Planes) + (χ : ℝ) (Q : Finset (ℙ K V)) (hx : x∈Q) + (hn : 0 < X.card) (hcap : (X.card:ℝ) ≤ (Nat.card K:ℝ)^3) + (hscale : (X.card:ℝ)*(δ:ℝ) ≤ 4*Nat.card K) + (hhigh : 8388608*(Nat.card K:ℝ)^2 ≤ X.card) + (hchi : (34359738369*2^200:ℝ) ≤ Real.exp χ) + (hmass : (δ:ℝ)*S.card ≤ Nat.card K) + (Lines : Finset (Submodule K V)) (hLines : ∀ l : RadialLine x,l.val∈Lines) + (hm : ∀ H : G,mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x G H) ≤ 2) + (hgood : ∀ i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + x∉badCenters S O δ (((δ:ℝ)*2^i)/2) Lines Q + ((Nat.card K:ℝ)^4/X.card^2*Real.exp χ/(((δ:ℝ)*2^i)/2)^100)) + (hresidual : ∀ i∈boundedOverlapDyads x (outsideAt x S (O x)) δ 2, + 2097152*(Nat.card K:ℝ)^2 ≤ X.card*((δ:ℝ)*2^i)^2 → + x∉residualExceptions Planes X Q ((δ:ℝ)*2^i) χ) + (R : ℕ) (hR : 200 ≤ R) : + (∑ z : DistinctPairs G,strength (pencilLines x G) (radialWeight x (outsideAt x S (O x)) δ) z^R) ≤ + 2^R*(Nat.clog 2 (outsideAt x S (O x)).card+1)*(((Nat.card K:ℝ)^4/X.card)^2*Real.exp (2*χ)) := by + have hn' : (0:ℝ) < X.card := by exact_mod_cast hn + apply score_higher_power x _ δ hδ G hG _ (by positivity) 200 R (by norm_num) hR hm + intro i hi + have ha : 0 < (δ:ℝ)*2^i := by positivity + have ha2 := (Finset.mem_filter.mp hi).2 + rcases ScoreScalars.high_or_small (q := (Nat.card K:ℝ)) (n := X.card) + (by positivity) hn' ha.le hhigh with hlarge|hsmall + · exact score_pair_residual_normalized x hdim X S (O x) hS δ hδ G hG + Planes hPlanes hcomplete _ χ Q hx hn ha ha2 hcap hscale hchi (hresidual i hi hlarge) + · exact score_pair_small_normalized x hdim S O δ hδ G hG X.card _ χ hn' ha ha2 hmass hsmall + (le_trans (by norm_num) hchi) Lines hLines Q hx (hgood i hi) + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ScoredMessage.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ScoredMessage.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a2554529c412fa2cab712e7f311ab68afc6efa5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ScoredMessage.lean @@ -0,0 +1,129 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.MetadataCodec +import OAI.Combinatorics.RamseyFive.Entropy.UniformCutoff +import OAI.Combinatorics.RamseyFive.Geometry.BasePublicFamily + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence Metadata FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization NNReal BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +abbrev ScoredPayload (U : Finset (ℙ K V)) (n : ℕ) (σ P τ : ℝ) := + TrainingCode V (listCap σ) (productCap σ) (Nat.card V) × + (Fin (sizeScoreCutoff U n P τ) × Fin (Fintype.card (ℙ K (Dual K V))+1)) +abbrev ScoredMessage (U : Finset (ℙ K V)) (σ P τ : ℝ) := + (n : Fin (Fintype.card (ℙ K V)+1)) × ScoredPayload U n σ P τ + +noncomputable def scoredMessageDecoded (U : Finset (ℙ K V)) (σ P τ : ℝ) + (R : ℕ) (L₀ : ℝ≥0) (t : BaseTape U P τ R) (m : ScoredMessage U σ P τ) : + Finset (ℙ K V) := + publicDecoded U (messageOwn m.2.1) (messageBase m.2.1 L₀) m.2.2.2 (t m.1 m.2.2.1) + +omit [Fintype V] in +lemma scoredMessageDecoded_inputs (U : Finset (ℙ K V)) (σ P τ : ℝ) + (R : ℕ) (L₀ : ℝ≥0) (t : BaseTape U P τ R) + (n : Fin (Fintype.card (ℙ K V)+1)) + (c : TrainingCode V (listCap σ) (productCap σ) (Nat.card V)) + (i : Fin (sizeScoreCutoff U n P τ)) (z : Fin (Fintype.card (ℙ K (Dual K V))+1)) : + scoredMessageDecoded U σ P τ R L₀ t ⟨n,c,i,z⟩= + publicDecoded U (messageOwn c) (messageBase c L₀) z (t n i) := rfl + +omit [Finite K] [FiniteDimensional K V] [Fintype V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma score_training_gap (X S U : Finset (ℙ K V)) (hS : S.Nonempty) + (hSX : S⊆X) (hXU : X⊆U) (hret : X.card≤4*S.card) : + Real.log ((U.card:ℝ)/S.card)≤Real.log ((U.card:ℝ)/X.card)+Real.log 4 := by + have hs : (0:ℝ) (p i).rep) + (fun i => (p i).rep_nonzero) + +variable {U : Type*} [AddCommGroup U] [Module K U] + +def normalize (v : K × U) : U := v.1⁻¹ • v.2 + +lemma lift_normalize (v : K × U) (hv : v.1 ≠ 0) : + (1, normalize v) = v.1⁻¹ • v := by + ext <;> simp [normalize, hv] + +lemma reconstruct (v : K × U) (hv : v.1 ≠ 0) : + v.1 • (1, normalize v) = v := by + rw [lift_normalize v hv, smul_smul, mul_inv_cancel₀ hv, one_smul] + +lemma normalize_eq_iff (v w : K × U) (hv : v.1 ≠ 0) (hw : w.1 ≠ 0) : + normalize v = normalize w ↔ ∃ a : K, a ≠ 0 ∧ a • w = v := by + constructor + · intro h + refine ⟨v.1 * w.1⁻¹, mul_ne_zero hv (inv_ne_zero hw), ?_⟩ + rw [← smul_smul, ← lift_normalize w hw, ← h, reconstruct v hv] + · rintro ⟨a, ha, rfl⟩ + simp [normalize, smul_smul, ha] + +noncomputable def point (e : V ≃ₗ[K] K × U) (p : ℙ K V) : U := + normalize (e p.rep) + +lemma point_injective_on (e : V ≃ₗ[K] K × U) : + Set.InjOn (point e) {p : ℙ K V | (e p.rep).1 ≠ 0} := by + intro p hp r hr h + obtain ⟨a, _, ha⟩ := (normalize_eq_iff _ _ hp hr).mp h + have he : a • r.rep = p.rep := e.injective (by simpa using ha) + rw [← Projectivization.mk_rep p, ← Projectivization.mk_rep r] + exact (Projectivization.mk_eq_mk_iff' K _ _ _ _).mpr ⟨a, he⟩ + +end SharpRamseyFive.AffineChart + +namespace SharpRamseyFive.ProjectiveReduction +open Module Submodule +variable {K V : Type*} [Field K] [Infinite K] [AddCommGroup V] [Module K V] + +theorem exists_projection_preserving_ranks [FiniteDimensional K V] + (n : ℕ) (hdim : finrank K V = n + 1) (X : Finset V) : + ∃ f : V →ₗ[K] (Fin n → K), Function.Surjective f ∧ + ∀ Y : Finset V, Y ⊆ X → + finrank K (Submodule.span K (f '' (Y : Set V))) = + min (finrank K (Submodule.span K (Y : Set V))) n := by + obtain ⟨f, hf, hfi⟩ := exists_projection_preserving_spans n hdim X + refine ⟨f, hf, ?_⟩ + intro Y hY + rw [Submodule.span_image] + by_cases he : Submodule.span K (Y : Set V) = ⊤ + · rw [he, Submodule.map_top, LinearMap.range_eq_top.mpr hf] + simp [hdim] + · rw [finrank_map_of_injOn f _ (hfi Y hY he)] + have hr := Submodule.finrank_lt he + rw [hdim] at hr + exact (min_eq_left (by omega)).symm +end SharpRamseyFive.ProjectiveReduction + +namespace SharpRamseyFive.ScalarExtension +open Module +variable {K L I : Type*} [Field K] [Field L] [Algebra K L] + +lemma coordinateMap_mem_span {s : Set (I → K)} {v : I → K} + (hv : v ∈ Submodule.span K s) : + coordinateMap (L := L) v ∈ Submodule.span L (coordinateMap '' s) := by + induction hv using Submodule.span_induction with + | mem x hx => exact Submodule.subset_span ⟨x, hx, rfl⟩ + | zero => simp + | add x y hx hy ihx ihy => simpa using Submodule.add_mem _ ihx ihy + | smul a x hx ih => + simpa using Submodule.smul_mem + (Submodule.span L (coordinateMap '' s)) (algebraMap K L a) ih + +theorem finrank_span_range [Finite I] {J : Type*} (v : J → I → K) : + finrank L (Submodule.span L (Set.range (coordinateMap (L := L) ∘ v))) = + finrank K (Submodule.span K (Set.range v)) := by + classical + obtain ⟨B, a, _, hspan, hi⟩ := exists_linearIndependent' K v + let := hi.finite + let : Fintype B := Fintype.ofFinite B + have hiL : LinearIndependent L (coordinateMap (L := L) ∘ (v ∘ a)) := + linearIndependent_algebraMap_comp_iff.mpr hi + have he : Submodule.span L (Set.range (coordinateMap (L := L) ∘ (v ∘ a))) = + Submodule.span L (Set.range (coordinateMap (L := L) ∘ v)) := by + apply le_antisymm + · apply Submodule.span_mono + rintro _ ⟨b, rfl⟩ + exact ⟨a b, rfl⟩ + · apply Submodule.span_le.mpr + rintro _ ⟨i, rfl⟩ + have hm : v i ∈ Submodule.span K (Set.range (v ∘ a)) := by + rw [hspan] + exact Submodule.subset_span ⟨i, rfl⟩ + have H := coordinateMap_mem_span (L := L) hm + simpa [← Set.range_comp, Function.comp_assoc] using H + rw [← he, finrank_span_eq_card hiL, ← hspan, finrank_span_eq_card hi] +end SharpRamseyFive.ScalarExtension + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/StreamGeometry.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/StreamGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..69acdaa3b1a465c1e55d21e285f07377557f6c4a --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/StreamGeometry.lean @@ -0,0 +1,94 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Streams.DependentPrivateStream +import OAI.Combinatorics.RamseyFive.Streams.PreparedStream + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple +open Module ProjectiveIncidence FiniteEntropy Windows Marking CoreGeometry +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V Ω κ α : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype Ω] [Fintype κ] [Fintype α] + {N n l : ℕ} {admissible : (Fin N→α)→Prop} +structure Geometric (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N n admissible) (M : ℝ) : Prop where + incident : ∀z,0(conditionOn_positive S.law E hE z hz).2 + exact ⟨fun z hz=>P.incident z (hp z hz),fun z hz=>P.consistent z (hp z hz), + fun z hz=>P.occupancy z (hp z hz)⟩ +omit [FiniteDimensional K V] in +lemma reindex (P : Geometric S M) (e : Fin l↪o Fin n) : Geometric (S.reindex e) M := + ⟨fun z hz i=>P.incident z hz (e i), + fun z hz i j hij=>P.consistent z hz (e i) (e j) (e.strictMono hij), + fun z hz=>occupancy_reindex _ e e.injective M (P.occupancy z hz)⟩ +omit [FiniteDimensional K V] in +lemma extract (P : Geometric S M) (hl : l≤n) (pos : Ω→Finset (Fin n)) : + Geometric (S.extract hl pos) M := by + have hsub (z : Ω) : ∃e : Fin l↪o Fin n,∀i,S.tuple z (e i)=(S.extract hl pos).tuple z i := + (mem_occurrences_iff _ _).mp (retainedTuple_occurs hl (S.tuple z) (pos z)) + constructor + · intro z hz + obtain ⟨e,he⟩:=hsub z + intro i + rw [←he i] + exact P.incident z hz (e i) + · intro z hz + obtain ⟨e,he⟩:=hsub z + intro i j hij + rw [←he i,←he j] + exact P.consistent z hz (e i) (e j) (e.strictMono hij) + · intro z hz + obtain ⟨e,he⟩:=hsub z + have hh:=occupancy_reindex (S.tuple z) e e.injective M (P.occupancy z hz) + simpa only [he] using hh +omit [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma augment (P : Geometric S M) (q : Ω→Law κ) : Geometric (S.augment q) M := by + have hp : ∀z,0<(S.augment q).law z→0(S.law.nonneg _).not_gt h.1)).1 + exact ⟨fun z hz=>P.incident z.1 (hp z hz),fun z hz=>P.consistent z.1 (hp z hz), + fun z hz=>P.occupancy z.1 (hp z hz)⟩ +omit [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma augmentSigma {Γ : Ω→Type} [∀z,Fintype (Γ z)] (P : Geometric S M) (q : ∀z,Law (Γ z)) : + Geometric (S.augmentSigma q) M := by + have hp : ∀z,0<(S.augmentSigma q).law z→0(sigmaLaw_positive S.law q z hz).1 + exact ⟨fun z hz=>P.incident z.1 (hp z hz),fun z hz=>P.consistent z.1 (hp z hz), + fun z hz=>P.occupancy z.1 (hp z hz)⟩ +omit [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma swap (P : Geometric S M) : + Geometric (S.changeOrientation swapFlag swapFlag.symm swapFlag.symm_apply_apply) M := + ⟨fun z hz=>reverseTuple_incident (P.incident z hz), + fun z hz=>reverseTuple_consistent (P.consistent z hz), + fun z hz=>occupancy_reverse _ M (P.occupancy z hz)⟩ +end Geometric + +structure CodedStream (N n : ℕ) (admissible : (Fin N→α)→Prop) (density Λ J M : ℝ) where + sample : Type + [finiteSample : Fintype sample] + stream : SelectedStream (Ω:=sample) (β:=FlagPair K V) N n admissible + code : Type + [finiteCode : Fintype code] + description : ContextDescription (κ:=code) stream.law stream.tuple Λ J + density_bound : stream.density≤density + geometric : Geometric stream M +attribute [instance] CodedStream.finiteSample CodedStream.finiteCode +end +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/SubspacePointsEquiv.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/SubspacePointsEquiv.lean new file mode 100644 index 0000000000000000000000000000000000000000..10203f465c8744d81e1ffd00cc2c241ad593b51e --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/SubspacePointsEquiv.lean @@ -0,0 +1,387 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence + +open scoped LinearAlgebra.Projectivization +open Module + +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + +noncomputable def subspacePointsEquiv (W : Submodule K V) : + ℙ K W ≃ {p : ℙ K V // p.submodule ≤ W} := by + let f : ℙ K W → {p : ℙ K V // p.submodule ≤ W} := fun p => + ⟨Projectivization.map W.subtype W.injective_subtype p, by + induction p using Projectivization.ind with | h v hv => + rw [Projectivization.map_mk, Projectivization.submodule_mk, + Submodule.span_singleton_le_iff_mem] + exact v.property⟩ + apply Equiv.ofBijective f + constructor + · intro p q hpq + exact Projectivization.map_injective W.subtype W.injective_subtype + (congrArg Subtype.val hpq) + · intro p + have hp : p.val.rep ∈ W := by + apply p.property + rw [Projectivization.submodule_eq] + exact Submodule.mem_span_singleton_self _ + let v : W := ⟨p.val.rep, hp⟩ + have hv : v ≠ 0 := fun h => p.val.rep_nonzero (congrArg Subtype.val h) + refine ⟨Projectivization.mk K v hv, ?_⟩ + apply Subtype.ext + exact p.val.mk_rep + +theorem card_subspacePoints [Finite K] (W : Submodule K V) : + Nat.card {p : ℙ K V // p.submodule ≤ W} = + ∑ i ∈ Finset.range (finrank K W), Nat.card K ^ i := by + rw [← Nat.card_congr (subspacePointsEquiv W)] + exact Projectivization.card_of_finrank K W rfl + +def Incident (a : ℙ K V) (b : ℙ K (Module.Dual K V)) : Prop := + a.submodule ≤ LinearMap.ker b.rep + +lemma incident_iff (a : ℙ K V) (b : ℙ K (Module.Dual K V)) : + Incident a b ↔ b.rep a.rep = 0 := by + rw [Incident, Projectivization.submodule_eq, Submodule.span_singleton_le_iff_mem, + LinearMap.mem_ker] + +lemma incident_iff_dualAnnihilator (a : ℙ K V) (b : ℙ K (Module.Dual K V)) : + Incident a b ↔ b.submodule ≤ a.submodule.dualAnnihilator := by + rw [Projectivization.submodule_eq b, Submodule.span_singleton_le_iff_mem, + Submodule.mem_dualAnnihilator] + rfl + +theorem card_points_on_hyperplane [Finite K] [FiniteDimensional K V] + (b : ℙ K (Module.Dual K V)) : + Nat.card {a : ℙ K V // Incident a b} = + ∑ i ∈ Finset.range (finrank K V - 1), Nat.card K ^ i := by + have h := Module.Dual.finrank_ker_add_one_of_ne_zero b.rep_nonzero + have hk : finrank K (LinearMap.ker b.rep) = finrank K V - 1 := by omega + change Nat.card {a : ℙ K V // a.submodule ≤ LinearMap.ker b.rep} = _ + rw [card_subspacePoints, hk] + +theorem card_hyperplanes_through_point [Finite K] [FiniteDimensional K V] + (a : ℙ K V) : + Nat.card {b : ℙ K (Module.Dual K V) // Incident a b} = + ∑ i ∈ Finset.range (finrank K V - 1), Nat.card K ^ i := by + rw [Nat.card_congr (Equiv.subtypeEquivRight (incident_iff_dualAnnihilator a)), + card_subspacePoints] + have h := Subspace.finrank_add_finrank_dualAnnihilator_eq a.submodule + rw [a.finrank_submodule] at h + congr 2 + omega + +lemma finrank_sup_points {a a' : ℙ K V} (haa : a ≠ a') : + finrank K (a.submodule ⊔ a'.submodule : Submodule K V) = 2 := by + have hli := Projectivization.independent_iff.mp + ((Projectivization.independent_pair_iff_ne a a').mpr haa) + have hr : Set.range (Projectivization.rep ∘ ![a, a']) = {a.rep, a'.rep} := by + ext x + simp only [Set.mem_range, Function.comp_apply, Set.mem_insert_iff, Set.mem_singleton_iff] + constructor + · rintro ⟨i, rfl⟩ + fin_cases i <;> simp + · rintro (rfl | rfl) + · exact ⟨0, rfl⟩ + · exact ⟨1, rfl⟩ + have h := finrank_span_eq_card hli + rw [hr, show ({a.rep, a'.rep} : Set V) = {a.rep} ∪ {a'.rep} by ext; simp [or_comm], + Submodule.span_union, ← a.submodule_eq, ← a'.submodule_eq] at h + simpa using h + +theorem card_hyperplanes_through_pair [Finite K] [FiniteDimensional K V] + {a a' : ℙ K V} (haa : a ≠ a') : + Nat.card {b : ℙ K (Module.Dual K V) // Incident a b ∧ Incident a' b} = + ∑ i ∈ Finset.range (finrank K V - 2), Nat.card K ^ i := by + have he (b : ℙ K (Module.Dual K V)) : + Incident a b ∧ Incident a' b ↔ + b.submodule ≤ (a.submodule ⊔ a'.submodule).dualAnnihilator := by + rw [incident_iff_dualAnnihilator, incident_iff_dualAnnihilator, + Submodule.dualAnnihilator_sup_eq, le_inf_iff] + rw [Nat.card_congr (Equiv.subtypeEquivRight he), card_subspacePoints] + have h := Subspace.finrank_add_finrank_dualAnnihilator_eq (a.submodule ⊔ a'.submodule) + rw [finrank_sup_points haa] at h + congr 2 + omega + +def RadialLine (x : ℙ K V) := + {W : Submodule K V // finrank K W = 2 ∧ x.submodule ≤ W} + +namespace RadialLine + +instance (x : ℙ K V) [Finite V] : Finite (RadialLine x) := by + unfold RadialLine + infer_instance + +lemma finrank_sup [FiniteDimensional K V] {x : ℙ K V} + {l m : RadialLine x} (hlm : l ≠ m) : + finrank K (l.val ⊔ m.val : Submodule K V) = 3 := by + have hn : ¬l.val ≤ m.val := by + intro h + apply hlm + exact Subtype.ext (Submodule.eq_of_le_of_finrank_eq h + (l.property.1.trans m.property.1.symm)) + have hi : l.val ⊓ m.val < l.val := lt_of_le_of_ne inf_le_left (by + intro h + apply hn + rw [← h] + exact inf_le_right) + have hlt := Submodule.finrank_lt_finrank_of_lt hi + have hge := Submodule.finrank_mono (le_inf l.property.2 m.property.2) + have he := Submodule.finrank_sup_add_finrank_inf_eq l.val m.val + rw [x.finrank_submodule] at hge + rw [l.property.1] at hlt + rw [l.property.1, m.property.1] at he + omega + +theorem card_hyperplanes [Finite K] [FiniteDimensional K V] + {x : ℙ K V} (l : RadialLine x) : + Nat.card {b : ℙ K (Module.Dual K V) // l.val ≤ LinearMap.ker b.rep} = + ∑ i ∈ Finset.range (finrank K V - 2), Nat.card K ^ i := by + have he (b : ℙ K (Module.Dual K V)) : + l.val ≤ LinearMap.ker b.rep ↔ b.submodule ≤ l.val.dualAnnihilator := by + rw [Projectivization.submodule_eq b, Submodule.span_singleton_le_iff_mem, + Submodule.mem_dualAnnihilator] + rfl + rw [Nat.card_congr (Equiv.subtypeEquivRight he), card_subspacePoints] + have h := Subspace.finrank_add_finrank_dualAnnihilator_eq l.val + rw [l.property.1] at h + congr 2 + omega + +theorem card_hyperplanes_pair [Finite K] [FiniteDimensional K V] + {x : ℙ K V} {l m : RadialLine x} (hlm : l ≠ m) : + Nat.card {b : ℙ K (Module.Dual K V) // + l.val ≤ LinearMap.ker b.rep ∧ m.val ≤ LinearMap.ker b.rep} = + ∑ i ∈ Finset.range (finrank K V - 3), Nat.card K ^ i := by + have he (b : ℙ K (Module.Dual K V)) : + l.val ≤ LinearMap.ker b.rep ∧ m.val ≤ LinearMap.ker b.rep ↔ + b.submodule ≤ (l.val ⊔ m.val).dualAnnihilator := by + rw [← sup_le_iff, Projectivization.submodule_eq b, + Submodule.span_singleton_le_iff_mem, Submodule.mem_dualAnnihilator] + rfl + rw [Nat.card_congr (Equiv.subtypeEquivRight he), card_subspacePoints] + have h := Subspace.finrank_add_finrank_dualAnnihilator_eq (l.val ⊔ m.val) + rw [finrank_sup hlm] at h + congr 2 + omega + +noncomputable def through (x y : ℙ K V) (hxy : x ≠ y) : RadialLine x := + ⟨x.submodule ⊔ y.submodule, finrank_sup_points hxy, le_sup_left⟩ + +lemma through_eq_iff [FiniteDimensional K V] {x y : ℙ K V} (hxy : x ≠ y) + (l : RadialLine x) : through x y hxy = l ↔ y.submodule ≤ l.val := by + constructor + · intro h + rw [← h] + exact le_sup_right + · intro h + apply Subtype.ext + exact Submodule.eq_of_le_of_finrank_eq (sup_le l.property.2 h) + ((finrank_sup_points hxy).trans l.property.1.symm) + +lemma through_le_iff {x y : ℙ K V} (hxy : x ≠ y) (W : Submodule K V) : + (through x y hxy).val ≤ W ↔ x.submodule ≤ W ∧ y.submodule ≤ W := + sup_le_iff + +section RadialMass + +open scoped Classical + +variable [FiniteDimensional K V] {x : ℙ K V} [Fintype (RadialLine x)] + +noncomputable def inFlat (W : Submodule K V) : Finset (RadialLine x) := by + classical + exact Finset.univ.filter (fun l => l.val ≤ W) + +noncomputable def trainingOnLine (X : Finset {y : ℙ K V // x ≠ y}) + (l : RadialLine x) : Finset {y : ℙ K V // x ≠ y} := by + classical + exact X.filter (fun y => y.val.submodule ≤ l.val) + +omit [Fintype (RadialLine x)] in +lemma trainingOnLine_eq_fiber (X : Finset {y : ℙ K V // x ≠ y}) + (l : RadialLine x) : + trainingOnLine X l = X.filter (fun y => through x y.val y.property = l) := by + classical + ext y + simp only [trainingOnLine, Finset.mem_filter, through_eq_iff] + +lemma sum_trainingOnLine (X : Finset {y : ℙ K V // x ≠ y}) + (W : Submodule K V) (hx : x.submodule ≤ W) : + ∑ l ∈ inFlat W, (trainingOnLine X l).card = + (X.filter (fun y => y.val.submodule ≤ W)).card := by + classical + simp_rw [trainingOnLine_eq_fiber] + rw [Finset.sum_card_fiberwise_eq_card_filter X (inFlat W) + (fun y => through x y.val y.property)] + congr 1 + ext y + simp [inFlat, through_le_iff, hx] + +noncomputable def strength (X : Finset {y : ℙ K V // x ≠ y}) + (q n : ℝ) (l : RadialLine x) : ℝ := q / n * (trainingOnLine X l).card + +lemma sum_strength (X : Finset {y : ℙ K V // x ≠ y}) + (q n : ℝ) (W : Submodule K V) (hx : x.submodule ≤ W) : + ∑ l ∈ inFlat W, strength X q n l = + q / n * (X.filter (fun y => y.val.submodule ≤ W)).card := by + classical + simp only [strength, ← Finset.mul_sum, ← Nat.cast_sum] + rw [sum_trainingOnLine X W hx] + +omit [FiniteDimensional K V] in +lemma inFlat_inf (W U : Submodule K V) : + (inFlat (x := x) W) ∩ inFlat U = inFlat (W ⊓ U) := by + classical + ext l + simp [inFlat] + +lemma overlap_strength (X : Finset {y : ℙ K V // x ≠ y}) (q n : ℝ) + (b c : ℙ K (Module.Dual K V)) (hb : Incident x b) (hc : Incident x c) : + ∑ l ∈ inFlat (LinearMap.ker b.rep) ∩ inFlat (LinearMap.ker c.rep), + strength X q n l = + q / n * (X.filter (fun y => Incident y.val b ∧ Incident y.val c)).card := by + rw [inFlat_inf, sum_strength X q n _ (le_inf hb hc)] + simp only [Incident, le_inf_iff] + rfl + +end RadialMass + +open scoped BigOperators Classical + +variable [Finite K] [FiniteDimensional K V] {x : ℙ K V} + [Fintype (ℙ K (Module.Dual K V))] [Fintype (RadialLine x)] + +noncomputable def hyperplanesOn (l : RadialLine x) : Finset (ℙ K (Module.Dual K V)) := + Finset.univ.filter (fun b => l.val ≤ LinearMap.ker b.rep) + +noncomputable def hyperplanesOnPair (l m : RadialLine x) : + Finset (ℙ K (Module.Dual K V)) := hyperplanesOn l ∩ hyperplanesOn m + +omit [Fintype (RadialLine x)] in +lemma card_hyperplanesOn (l : RadialLine x) : + (hyperplanesOn l).card = ∑ i ∈ Finset.range (finrank K V - 2), Nat.card K ^ i := by + rw [hyperplanesOn, ← Fintype.card_subtype, ← Nat.card_eq_fintype_card] + exact card_hyperplanes l + +omit [Fintype (RadialLine x)] in +lemma card_hyperplanesOnPair {l m : RadialLine x} (hlm : l ≠ m) : + (hyperplanesOnPair l m).card = + ∑ i ∈ Finset.range (finrank K V - 3), Nat.card K ^ i := by + have he : hyperplanesOnPair l m = Finset.univ.filter + (fun b => l.val ≤ LinearMap.ker b.rep ∧ m.val ≤ LinearMap.ker b.rep) := by + ext b + simp [hyperplanesOnPair, hyperplanesOn] + rw [he, ← Fintype.card_subtype, ← Nat.card_eq_fintype_card] + exact card_hyperplanes_pair hlm + +omit [Fintype (RadialLine x)] in + +theorem weighted_one_anchor (T : Finset (RadialLine x)) (w : RadialLine x → ℝ) : + (∑ l ∈ T, ∑ _b ∈ hyperplanesOn l, w l) = + (∑ i ∈ Finset.range (finrank K V - 2), (Nat.card K : ℝ) ^ i) * ∑ l ∈ T, w l := by + simp only [Finset.sum_const, nsmul_eq_mul, card_hyperplanesOn, + Nat.cast_sum, Nat.cast_pow] + rw [Finset.mul_sum] + +omit [Fintype (RadialLine x)] in + +theorem weighted_two_anchors (T U : Finset (RadialLine x)) + (w z : RadialLine x → ℝ) (hw : ∀ l ∈ T, 0 ≤ w l) (hz : ∀ m ∈ U, 0 ≤ z m) : + (∑ l ∈ T, ∑ m ∈ U.filter (fun m => l ≠ m), + ∑ _b ∈ hyperplanesOnPair l m, w l * z m) ≤ + (∑ i ∈ Finset.range (finrank K V - 3), (Nat.card K : ℝ) ^ i) * + (∑ l ∈ T, w l) * ∑ m ∈ U, z m := by + let Q : ℝ := ∑ i ∈ Finset.range (finrank K V - 3), (Nat.card K : ℝ) ^ i + have hQ : 0 ≤ Q := Finset.sum_nonneg (fun _ _ => pow_nonneg (Nat.cast_nonneg _) _) + calc + _ = ∑ l ∈ T, ∑ m ∈ U.filter (fun m => l ≠ m), Q * (w l * z m) := by + apply Finset.sum_congr rfl + intro l hl + apply Finset.sum_congr rfl + intro m hm + simp only [Finset.sum_const, nsmul_eq_mul, + card_hyperplanesOnPair (Finset.mem_filter.mp hm).2, Nat.cast_sum, Nat.cast_pow, Q] + _ ≤ ∑ l ∈ T, ∑ m ∈ U, Q * (w l * z m) := by + apply Finset.sum_le_sum + intro l hl + exact Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) + (by intro m hm _; exact mul_nonneg hQ (mul_nonneg (hw l hl) (hz m hm))) + _ = _ := by + simp only [← Finset.mul_sum, ← Finset.sum_mul] + ring + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K (Dual K V))] [Fintype (RadialLine x)] in + +theorem fresh_anchor_weight {Batch : Type*} [Fintype Batch] + (T : Finset (RadialLine x)) (L : ℝ) (a : RadialLine x → ℝ) : + (∑ _r : Batch, ∑ l ∈ T, L * a l) = + Fintype.card Batch * L * ∑ l ∈ T, a l := by + simp only [← Finset.mul_sum, Finset.sum_const, Finset.card_univ, nsmul_eq_mul] + ring + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K (Dual K V))] [Fintype (RadialLine x)] in + +theorem old_anchor_weight (T D : Finset (RadialLine x)) : + (∑ _l ∈ T ∩ D, (1 : ℝ)) ≤ D.card := by + simp only [Finset.sum_const, nsmul_eq_mul, mul_one] + exact_mod_cast Finset.card_le_card (Finset.inter_subset_right (s₁ := T) (s₂ := D)) + +end RadialLine + +open scoped Classical + +variable [Finite K] [FiniteDimensional K V] +variable [Fintype (ℙ K V)] [Fintype (ℙ K (Module.Dual K V))] + +noncomputable def incidenceEntry (a : ℙ K V) (b : ℙ K (Module.Dual K V)) : ℝ := + if Incident a b then 1 else 0 + +noncomputable def weightOnHyperplane (w : ℙ K V → ℝ) (b : ℙ K (Module.Dual K V)) : ℝ := + ∑ a, incidenceEntry a b * w a + +omit [Fintype (ℙ K V)] in +lemma sum_entry (a : ℙ K V) : + ∑ b, incidenceEntry a b = + ((∑ i ∈ Finset.range (finrank K V - 1), Nat.card K ^ i : ℕ) : ℝ) := by + classical + unfold incidenceEntry + rw [Finset.sum_boole, ← Fintype.card_subtype, Fintype.card_eq_nat_card, + card_hyperplanes_through_point] + +omit [Fintype (ℙ K V)] in +lemma sum_entry_mul_entry (a a' : ℙ K V) : + ∑ b, incidenceEntry a b * incidenceEntry a' b = + if a = a' then ((∑ i ∈ Finset.range (finrank K V - 1), Nat.card K ^ i : ℕ) : ℝ) + else ((∑ i ∈ Finset.range (finrank K V - 2), Nat.card K ^ i : ℕ) : ℝ) := by + classical + by_cases haa : a = a' + · subst a' + simp only [ite_true] + convert sum_entry a using 1 + apply Finset.sum_congr rfl + intro b _ + simp [incidenceEntry] + · rw [ite_eq_right haa] + trans ∑ b : ℙ K (Module.Dual K V), if Incident a b ∧ Incident a' b then (1 : ℝ) else 0 + · apply Finset.sum_congr rfl + intro b _ + simp only [incidenceEntry] + split_ifs <;> simp_all + · rw [Finset.sum_boole, ← Fintype.card_subtype, Fintype.card_eq_nat_card, + card_hyperplanes_through_pair haa] + +theorem sum_weightOnHyperplane (w : ℙ K V → ℝ) : + ∑ b, weightOnHyperplane w b = + ((∑ i ∈ Finset.range (finrank K V - 1), Nat.card K ^ i : ℕ) : ℝ) * ∑ a, w a := by + classical + unfold weightOnHyperplane + rw [Finset.sum_comm] + simp_rw [← Finset.sum_mul, sum_entry, ← Finset.mul_sum] + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/SurvivorRank.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/SurvivorRank.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8f7878d06cca6cf7121099818332aa1ca9e8f79 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/SurvivorRank.lean @@ -0,0 +1,96 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.PivotTree +open scoped Classical +noncomputable section +variable {w : ℕ} + +def survivorRank (E : Finset (Fin w)) (v : Fin w) : Fin (w+1) := + ⟨(E.filter fun u=>uuu(finProdFinEquiv.symm i : Fin w×Fin (2*n)).1) := by + intro i j hij + let a := (finProdFinEquiv.symm i : Fin w×Fin (2*n)) + let b := (finProdFinEquiv.symm j : Fin w×Fin (2*n)) + have hi : i.val=a.1.val*(2*n)+a.2.val := by + calc + _ = (finProdFinEquiv a).val := congrArg Fin.val (finProdFinEquiv.apply_symm_apply i).symm + _ = _ := by change a.2.val+(2*n)*a.1.val=_;ring + have hj : j.val=b.1.val*(2*n)+b.2.val := by + calc + _ = (finProdFinEquiv b).val := congrArg Fin.val (finProdFinEquiv.apply_symm_apply j).symm + _ = _ := by change b.2.val+(2*n)*b.1.val=_;ring + have h : a.1.val≤b.1.val := by + by_contra hn + have hg : (b.1.val+1)*(2*n)≤a.1.val*(2*n) := Nat.mul_le_mul_right (2*n) (by omega) + have hb:=b.2.isLt + have hij' : a.1.val*(2*n)+a.2.val≤b.1.val*(2*n)+b.2.val := by + simpa only [Fin.le_def,hi,hj] using hij + nlinarith + exact h + +lemma middleRank_monotone {w n : ℕ} (E : Finset (Fin w)) : + Monotone (fun i : Fin (w*(2*n))=>survivorRank E + (finProdFinEquiv.symm i : Fin w×Fin (2*n)).1) := + (survivorRank_monotone E).comp (middleFirst_monotone w n) +end +end SharpRamseyFive.Windows + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/TargetCaps.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/TargetCaps.lean new file mode 100644 index 0000000000000000000000000000000000000000..f85f939ed76d923c25d9ade9768647b93c9a3d72 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/TargetCaps.lean @@ -0,0 +1,108 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.OriginalMarginalLaw + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] +variable (f : PivotContext K V → FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V → FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) +noncomputable section +local instance (priority := high) actualTargetCapsPropDecidable (P : Prop) : Decidable P := Classical.propDecidable P +variable {I : Type} + +noncomputable def orientedPivotCapsAt + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ : I → Finset (ℙ K V)) (B₀ : I → Finset (ℙ K (Dual K V))) + (hA₀ : ∀ i, (A₀ i).Nonempty) (hB₀ : ∀ i, (B₀ i).Nonempty) + (c δ τ P : ℝ) (hδ : 0<δ) (b : BinaryTree I) (ω : OrientedPivotTreeTape f r b) + (C : PivotContext K V) (j : Address b) : Option (Finset (ℙ K (Dual K V)) × Finset (ℙ K V)) := + observe (fun _ : I => OrientedPivotTape f r) (fun _ : I => OrientedPivotMessage f r) + (fun _ : I => orientedPivotLeft f r) (fun _ : I => orientedPivotRight f r) + (fun i C t => orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c δ τ P hδ t) + (fun _ C t => orientedNodeDecoded (f C) (r C) C.1 C.2 (1000*(Nat.card K)^2) (Nat.card K) t) b ω C j + +theorem oriented_original_point_cap + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (A₀ : I → Finset (ℙ K V)) (B₀ : I → Finset (ℙ K (Dual K V))) + (hA₀ : ∀ i, (A₀ i).Nonempty) (hB₀ : ∀ i, (B₀ i).Nonempty) + (c δ τ P : ℝ) (hc : 0 + Excludes x ((orientedPivotCapsAt f r σ hσ hq hd.le A₀ B₀ hA₀ hB₀ c δ τ P hδ tree ω + (Finset.univ,Finset.univ) j).map Prod.snd))) ≤ + (50*(Nat.card K:ℝ)/(9*(c*δ))) * + relationMass (fun b a => Incident a b) (uniformWeight (B₀ (label tree j))) (uniformWeight {x}) := by + let Ω := fun _ : I => OrientedPivotTape f r + let M := fun _ : I => OrientedPivotMessage f r + let p := fun (_ : I) C => orientedNodeTapeLaw (f C) (r C) (1000*(Nat.card K)^2) (Nat.card K) + let enc : ∀ i C t, Option (M i C t) := fun i C t => + orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd.le + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c δ τ P hδ t + let out : ∀ i C t, M i C t → _ := fun _ C t => + orientedNodeDecoded (f C) (r C) C.1 C.2 (1000*(Nat.card K)^2) (Nat.card K) t + let rate := fun i => (50*(Nat.card K:ℝ)/(9*(c*δ))) * + relationMass (fun b a => Incident a b) (uniformWeight (B₀ i)) (uniformWeight {x}) + have hn : ∀ i, 0≤rate i := fun i => mul_nonneg (by positivity) + (relationMass_nonneg _ _ _ (uniformWeight_nonneg _) (uniformWeight_nonneg _)) + have hh := observe_event_bound Ω M (fun _ => orientedPivotLeft f r) (fun _ => orientedPivotRight f r) + p enc out (fun o => Excludes x (o.map Prod.snd)) (by simp [Excludes]) rate hn + (fun i C => by + have h := (orientedGuardedNode_original (f C) (r C) σ hσ hq hd hq3 (A₀ i) C.1 (B₀ i) C.2 + (hA₀ i) (hB₀ i) c δ τ P hc hc9 hδ hτ).2 x + dsimp only [rate] + rw [relationMass_singleton_right, sum_uniformWeight] + have he : (Finset.univ.filter (fun y => Incident x y)) ∩ B₀ i = + (B₀ i).filter (fun y => Incident x y) := by ext y; simp [and_comm] + rw [he] + exact h) tree (Finset.univ,Finset.univ) j + rw [eventMass_map_filter] at hh + exact hh + +theorem oriented_original_dual_cap + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (A₀ : I → Finset (ℙ K V)) (B₀ : I → Finset (ℙ K (Dual K V))) + (hA₀ : ∀ i, (A₀ i).Nonempty) (hB₀ : ∀ i, (B₀ i).Nonempty) + (c δ τ P : ℝ) (hc : 0 + Excludes x ((orientedPivotCapsAt f r σ hσ hq hd.le A₀ B₀ hA₀ hB₀ c δ τ P hδ tree ω + (Finset.univ,Finset.univ) j).map Prod.fst))) ≤ + (50*(Nat.card K:ℝ)/(9*(c*δ))) * + relationMass Incident (uniformWeight (A₀ (label tree j))) (uniformWeight {x}) := by + let Ω := fun _ : I => OrientedPivotTape f r + let M := fun _ : I => OrientedPivotMessage f r + let p := fun (_ : I) C => orientedNodeTapeLaw (f C) (r C) (1000*(Nat.card K)^2) (Nat.card K) + let enc : ∀ i C t, Option (M i C t) := fun i C t => + orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd.le + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c δ τ P hδ t + let out : ∀ i C t, M i C t → _ := fun _ C t => + orientedNodeDecoded (f C) (r C) C.1 C.2 (1000*(Nat.card K)^2) (Nat.card K) t + let rate := fun i => (50*(Nat.card K:ℝ)/(9*(c*δ))) * + relationMass Incident (uniformWeight (A₀ i)) (uniformWeight {x}) + have hn : ∀ i, 0≤rate i := fun i => mul_nonneg (by positivity) + (relationMass_nonneg _ _ _ (uniformWeight_nonneg _) (uniformWeight_nonneg _)) + have hh := observe_event_bound Ω M (fun _ => orientedPivotLeft f r) (fun _ => orientedPivotRight f r) + p enc out (fun o => Excludes x (o.map Prod.fst)) (by simp [Excludes]) rate hn + (fun i C => by + have h := (orientedGuardedNode_original (f C) (r C) σ hσ hq hd hq3 (A₀ i) C.1 (B₀ i) C.2 + (hA₀ i) (hB₀ i) c δ τ P hc hc9 hδ hτ).1 x + dsimp only [rate] + rw [relationMass_singleton_right, sum_uniformWeight] + have he : (Finset.univ.filter (fun y => Incident y x)) ∩ A₀ i = + (A₀ i).filter (fun y => Incident y x) := by ext y; simp [and_comm] + rw [he] + exact h) tree (Finset.univ,Finset.univ) j + rw [eventMass_map_filter] at hh + exact hh + +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/TargetCoherence.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/TargetCoherence.lean new file mode 100644 index 0000000000000000000000000000000000000000..c1856f95e5c7b8ab98340741fa1a2e7479909f34 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/TargetCoherence.lean @@ -0,0 +1,52 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.TargetCaps +import OAI.Combinatorics.RamseyFive.Geometry.TreeFailure +import OAI.Combinatorics.RamseyFive.Trees.TreeObservationRelations + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] +variable (f : PivotContext K V → FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V → FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) +variable {I : Type} [Fintype I] [DecidableEq I] + +omit [Fintype I] [DecidableEq I] in +lemma oriented_caps_none_iff + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ : I → Finset (ℙ K V)) (B₀ : I → Finset (ℙ K (Dual K V))) + (hA₀ : ∀ i, (A₀ i).Nonempty) (hB₀ : ∀ i, (B₀ i).Nonempty) + (c δ τ P : ℝ) (hδ : 0<δ) (tree : BinaryTree I) (ω : OrientedPivotTreeTape f r tree) + (C : PivotContext K V) (j : Address tree) : + orientedPivotCapsAt f r σ hσ hq hd A₀ B₀ hA₀ hB₀ c δ τ P hδ tree ω C j = none ↔ + orientedPivotSuccessAt f r σ hσ hq hd A₀ B₀ hA₀ hB₀ c δ τ P hδ tree ω C j = none := + observe_none_iff_success (fun _ : I => OrientedPivotTape f r) (fun _ : I => OrientedPivotMessage f r) + (fun _ : I => orientedPivotLeft f r) (fun _ : I => orientedPivotRight f r) + (fun i C t => orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c δ τ P hδ t) + (fun _ C t => orientedNodeDecoded (f C) (r C) C.1 C.2 (1000*(Nat.card K)^2) (Nat.card K) t) + tree ω C j + +omit [Fintype I] [DecidableEq I] in +lemma oriented_caps_context_coherent + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ : I → Finset (ℙ K V)) (B₀ : I → Finset (ℙ K (Dual K V))) + (hA₀ : ∀ i, (A₀ i).Nonempty) (hB₀ : ∀ i, (B₀ i).Nonempty) + (c δ τ P : ℝ) (hδ : 0<δ) (tree : BinaryTree I) (ω : OrientedPivotTreeTape f r tree) + (C : PivotContext K V) (j : Address tree) : + orientedPivotCapsAt f r σ hσ hq hd A₀ B₀ hA₀ hB₀ c δ τ P hδ tree ω C j ≠ none → + orientedPivotContextAt f r σ hσ hq hd A₀ B₀ hA₀ hB₀ c δ τ P hδ tree ω C j ≠ none := + observe_context_coherent (fun _ : I => OrientedPivotTape f r) (fun _ : I => OrientedPivotMessage f r) + (fun _ : I => orientedPivotLeft f r) (fun _ : I => orientedPivotRight f r) + (fun i C t => orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c δ τ P hδ t) + (fun _ C t => orientedNodeDecoded (f C) (r C) C.1 C.2 (1000*(Nat.card K)^2) (Nat.card K) t) + tree ω C j +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/TargetRetention.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/TargetRetention.lean new file mode 100644 index 0000000000000000000000000000000000000000..b1d7dedfebde79265518485efcc27b3fa625f909 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/TargetRetention.lean @@ -0,0 +1,99 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.TargetCoherence +import OAI.Combinatorics.RamseyFive.Entropy.IndependentTargetLoss +import OAI.Combinatorics.RamseyFive.Geometry.LevelTargetBounds + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +local instance (priority := high) actualTargetRetentionPropDecidable (P : Prop) : Decidable P := Classical.propDecidable P +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] +variable (f : PivotContext K V → FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V → FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) +variable {I Ω : Type} [Fintype I] [DecidableEq I] [Fintype Ω] + {A B : I → Type} [∀ i, Fintype (A i)] [∀ i, Fintype (B i)] + +theorem oriented_actual_target_loss + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (μ : ∀ i, Law (A i)) (ν : ∀ i, Law (B i)) + (X : ∀ i, A i → Finset (ℙ K V)) (Y : ∀ i, B i → Finset (ℙ K (Dual K V))) + (hX : ∀ i a, (X i a).Nonempty) (hY : ∀ i b, (Y i b).Nonempty) + (p : I → Law (ℙ K V)) (q : I → Law (ℙ K (Dual K V))) + (L : ℝ) + (hflatA : ∀ i a, (∑ s, μ i s*uniformWeight (X i s) a) ≤ L*p i a) + (hflatB : ∀ i b, (∑ s, ν i s*uniformWeight (Y i s) b) ≤ L*q i b) + (γ : Law Ω) (a : Ω → ℙ K V) (b : Ω → ℙ K (Dual K V)) + (goodA : ℙ K V → Prop) (goodB : ℙ K (Dual K V) → Prop) + (c δ τ P : ℝ) (hc : 0 + orientedPivotContextAt f r σ hσ hq hd.le (fun i => X i (z.1.1 i)) (fun i => Y i (z.1.2 i)) + (fun i => hX i _) (fun i => hY i _) c δ τ P hδ tree z.2 (Finset.univ,Finset.univ) j + let caps := fun z : ((∀ i, A i) × (∀ i, B i)) × OrientedPivotTreeTape f r tree => + orientedPivotCapsAt f r σ hσ hq hd.le (fun i => X i (z.1.1 i)) (fun i => Y i (z.1.2 i)) + (fun i => hX i _) (fun i => hY i _) c δ τ P hδ tree z.2 (Finset.univ,Finset.univ) j + let gA := fun x => if goodA x then map γ a x else 0 + let gB := fun y => if goodB y then map γ b y else 0 + let C₀ := 50*(Nat.card K:ℝ)/(9*(c*δ)) + eventMass (adaptiveLaw γ (fun _ => adaptiveLaw (originalLevelLaw μ ν) + (fun _ => orientedPivotTreeLaw f r tree))) (Finset.univ.filter + (fun z => ¬TargetCovered (ctx z.2) (caps z.2) (a z.1) (b z.1))) ≤ + eventMass γ (Finset.univ.filter (fun x => ¬goodA (a x))) + + eventMass γ (Finset.univ.filter (fun x => ¬goodB (b x))) + + (∑ z, originalLevelLaw μ ν z*eventMass (orientedPivotTreeLaw f r tree) + (Finset.univ.filter (fun ω => orientedPivotSuccessAt f r σ hσ hq hd.le + (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) (fun i => hX i _) (fun i => hY i _) + c δ τ P hδ tree ω (Finset.univ,Finset.univ) j=none))) + + 10*pathBudget (fun i => C₀*L*relationMass Incident gA (q i)) (fun _ => 0) tree j + + 10*pathBudget (fun _ => 0) (fun i => C₀*L*relationMass Incident (p i) gB) tree j + + C₀*L*relationMass Incident gA (q (label tree j)) + + C₀*L*relationMass Incident (p (label tree j)) gB := by + dsimp only + let ctx := fun z : ((∀ i, A i) × (∀ i, B i)) × OrientedPivotTreeTape f r tree => + orientedPivotContextAt f r σ hσ hq hd.le (fun i => X i (z.1.1 i)) (fun i => Y i (z.1.2 i)) + (fun i => hX i _) (fun i => hY i _) c δ τ P hδ tree z.2 (Finset.univ,Finset.univ) j + let caps := fun z : ((∀ i, A i) × (∀ i, B i)) × OrientedPivotTreeTape f r tree => + orientedPivotCapsAt f r σ hσ hq hd.le (fun i => X i (z.1.1 i)) (fun i => Y i (z.1.2 i)) + (fun i => hX i _) (fun i => hY i _) c δ τ P hδ tree z.2 (Finset.univ,Finset.univ) j + let gA := fun x => if goodA x then map γ a x else 0 + let gB := fun y => if goodB y then map γ b y else 0 + have hgA : ∀ x, 0≤gA x := by intro x; dsimp [gA]; split_ifs; exact (map γ a).nonneg x; rfl + have hgB : ∀ y, 0≤gB y := by intro y; dsimp [gB]; split_ifs; exact (map γ b).nonneg y; rfl + have hcoh : ∀ z, caps z≠none → ctx z≠none := by + intro z + exact oriented_caps_context_coherent f r σ hσ hq hd.le _ _ _ _ c δ τ P hδ tree z.2 _ j + have h := independent_target_loss γ + (adaptiveLaw (originalLevelLaw μ ν) (fun _ => orientedPivotTreeLaw f r tree)) + a b goodA goodB ctx caps hcoh + have hn : eventMass (adaptiveLaw (originalLevelLaw μ ν) (fun _ => orientedPivotTreeLaw f r tree)) + (Finset.univ.filter (fun z => caps z=none)) = + ∑ z, originalLevelLaw μ ν z*eventMass (orientedPivotTreeLaw f r tree) + (Finset.univ.filter (fun ω => orientedPivotSuccessAt f r σ hσ hq hd.le + (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) (fun i => hX i _) (fun i => hY i _) + c δ τ P hδ tree ω (Finset.univ,Finset.univ) j=none)) := by + rw [independent_target_event_general] + apply Finset.sum_congr rfl + intro z _ + congr 2 + ext ω + simp only [Finset.mem_filter, Finset.mem_univ, true_and] + exact oriented_caps_none_iff f r σ hσ hq hd.le _ _ _ _ c δ τ P hδ tree ω _ j + rw [hn] at h + dsimp only [ctx,caps] at h + rw [independent_weighted_event, independent_weighted_event, + independent_weighted_event, independent_weighted_event] at h + have h1 := oriented_level_point_target_trim f r σ hσ hq hd hq3 μ ν X Y hX hY q gA hgA L hflatB c δ τ P hc hc9 hδ hτ tree j + have h2 := oriented_level_dual_target_trim f r σ hσ hq hd hq3 μ ν X Y hX hY p gB hgB L hflatA c δ τ P hc hc9 hδ hτ tree j + have h3 := oriented_level_point_target_cap f r σ hσ hq hd hq3 μ ν X Y hX hY q gA hgA L hflatB c δ τ P hc hc9 hδ hτ tree j + have h4 := oriented_level_dual_target_cap f r σ hσ hq hd hq3 μ ν X Y hX hY p gB hgB L hflatA c δ τ P hc hc9 hδ hτ tree j + exact h.trans (add_le_add (add_le_add (add_le_add (add_le_add_right h1 _) h2) h3) h4) +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeBranch.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeBranch.lean new file mode 100644 index 0000000000000000000000000000000000000000..539212b398a2dc221591fcfd27318a5efcbf30a0 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeBranch.lean @@ -0,0 +1,143 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.PlaneBranch +import OAI.Combinatorics.RamseyFive.Decoding.LargeTrainingCell + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy MeasurePublicTable Metadata FiniteEntropy ProjectiveRestriction +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology +variable {K I J : Type*} [Field K] [Finite K] [Fintype I] [LinearOrder J] + [Fintype (I→K)] [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + +abbrev ThreeBranch (σ : ℝ) (F : Finset J) := + Unit ⊕ ((Fin (Fintype.card (ℙ K (I→K))+1) × + TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K))) ⊕ + ({a : J // a∈F} × Fin (Nat.log 2 (Nat.card K)+1))) + +noncomputable def threeBranchLaw (σ : ℝ) (F : Finset J) + (Flat : J→Submodule K (I→K)) + (X U : Finset (ℙ K (I→K))) (T UT : Finset (ℙ K (Dual K (I→K)))) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) (br : ThreeBranch (K:=K) (I:=I) σ F) : + Law (Option (Finset (ℙ K (I→K)))) := + match br with + | .inl _ => baseCaptureLaw X U P τ R L₀ + | .inr (.inl c) => scoredCaptureLaw X U c.1 (messageOwn c.2) (messageBase c.2 L₀) + P τ (9/20) 10 R L₀ + | .inr (.inr a) => planeAutoLaw (Flat a.1.1) X U T UT τ P R L₀ a.2 + +theorem eventually_three_branch {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (I→K)] [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (F : Finset J) (_ : F.Nonempty) (Flat : J→Submodule K (I→K)) + (X U : Finset (ℙ K (I→K))) (T UT : Finset (ℙ K (Dual K (I→K)))), + Nat.card K=q → Real.exp σ=q → Fintype.card I=4 → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-400*beta η) → X⊆U → T⊆UT → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^4*Real.exp (-b)≤(X.card:ℝ)*T.card → + (∀j∈F,finrank K (Flat j)=3) → + (∀V : Submodule K (I→K),finrank K V=3 → ∃j∈F,Flat j=V) → + ∃br : ThreeBranch (K:=K) (I:=I) σ F, + let p := threeBranchLaw σ F Flat X U T UT (P η σ D R) τ R L₀ br + p none≤2*Real.exp (-(Nat.card K:ℝ)) ∧ + ∀W,0

flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + by_cases hsmall : ∀i,(C i).card≤(S.card:ℝ)/25 + · have hτhi' := hτhi.trans (Real.rpow_le_rpow_of_exponent_le hσ1 + (by have := beta_pos hη;linarith : -400*beta η≤-200*beta η)) + obtain ⟨_,_,c,hf,hg⟩ := hscore D b τ g R L₀ q K I J F hF Flat X U T + hcard hσq hI hr hL hb hbhi hτ hτhi' hXU hXT hdens hprod hXexp (lt_of_not_ge hn) hFlat hcover hsmall + let n : Fin (Fintype.card (ℙ K (I→K))+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + refine ⟨.inr (.inl (n,c)),?_,?_⟩ + · exact hf.trans (by nlinarith only [Real.exp_pos (-(Nat.card K:ℝ))]) + · intro W hW + obtain ⟨hWU,hsize,hcap⟩ := hg W hW + exact ⟨hWU,hsize,(mul_le_mul_of_nonneg_right (by norm_num : (9/1000:ℝ)≤9/20) (Nat.cast_nonneg _)).trans hcap⟩ + · have hSX : S⊆X := peel_subset _ F hF _ X _ _ + have hret' : X.card≤2*S.card := peel_half _ F hF _ X _ _ + have hret : X.card≤4*S.card := by omega + obtain ⟨a,ha,hlarge⟩ := large_clipped_part X S X hSX hret F hF (fun j=>flatPoints (Flat j)) m hsmall + obtain ⟨k,hk,hf,hg⟩ := hplane D b τ R L₀ K (I→K) (Flat a) X U T UT + (hFlat a ha) (by omega) hq hr hL hb hbhi hτ hτhi hX hT hXU hTU hdens (by simpa only [hd] using hprod) hlarge + have hk' : k≤Nat.log 2 (Nat.card K) := by simpa only [hd,hFlat a ha,Nat.reduceSub,pow_one] using hk + refine ⟨.inr (.inr (⟨a,ha⟩,⟨k,Nat.lt_succ_of_le hk'⟩)),hf,?_⟩ + intro W hW + obtain ⟨hWU,hsize,hcap⟩ := hg W hW + refine ⟨hWU,hsize.trans ?_,hcap⟩ + exact mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by linarith)) (Nat.cast_nonneg _) +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.ProjectiveTraining +open Module +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype V] + +omit [Finite K] [FiniteDimensional K V] [Fintype V] in +lemma exists_flat_finrank (d : ℕ) (hd : d≤finrank K V) : + ∃A : Submodule K V,finrank K A=d := by + obtain ⟨s,hn,hs⟩ := exists_finset_linearIndependent_of_le_finrank (R:=K) (M:=V) hd + refine ⟨Submodule.span K (s:Set V),?_⟩ + have hspan : Set.range (fun x : s => (x:V))=(s:Set V) := by ext x;simp + rw [←hspan,finrank_span_eq_card hs,Fintype.card_coe,hn] + +noncomputable def flatEnumeration : Fin (Fintype.card (Submodule K V))→Submodule K V := + (Fintype.equivFin (Submodule K V)).symm +noncomputable def flatIndices (d : ℕ) : Finset (Fin (Fintype.card (Submodule K V))) := + Finset.univ.filter fun i=>finrank K (flatEnumeration (K:=K) (V:=V) i)=d +omit [Finite K] [FiniteDimensional K V] in +lemma flatIndices_cover (d : ℕ) (A : Submodule K V) (hA : finrank K A=d) : + ∃i∈flatIndices (K:=K) (V:=V) d,flatEnumeration i=A := by + let i := Fintype.equivFin (Submodule K V) A + have he : flatEnumeration i=A := (Fintype.equivFin _).symm_apply_apply A + exact ⟨i,Finset.mem_filter.mpr ⟨Finset.mem_univ _,by rw [he,hA]⟩,he⟩ +omit [Finite K] [FiniteDimensional K V] in +lemma flatIndices_nonempty (d : ℕ) (hd : d≤finrank K V) : + (flatIndices (K:=K) (V:=V) d).Nonempty := by + obtain ⟨A,hA⟩ := exists_flat_finrank d hd + obtain ⟨i,hi,_⟩ := flatIndices_cover d A hA + exact ⟨i,hi⟩ +omit [Finite K] [FiniteDimensional K V] in +lemma flatIndices_rank (d : ℕ) (i) (hi : i∈flatIndices (K:=K) (V:=V) d) : + finrank K (flatEnumeration i)=d := (Finset.mem_filter.mp hi).2 +end SharpRamseyFive.ProjectiveTraining + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeCoordinateCertified.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeCoordinateCertified.lean new file mode 100644 index 0000000000000000000000000000000000000000..e1508130aa367564f0e9ad3a5674acbd316f175b --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeCoordinateCertified.lean @@ -0,0 +1,173 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.ThreePublic + +namespace OAI + + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining Metadata Filter ParameterHierarchy FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization NNReal Topology +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [Fintype K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Fin 4→K))] [Fintype (ℙ K (Dual K (Fin 4→K)))] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K A)] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K (Dual K A))] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K (Dual K (Dual K A)))] + +abbrev ThreeCoordinateTape (e : V≃ₗ[K](Fin 4→K)) + (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) (σ P τ : ℝ) := + ThreePublicTape (U.map (projectiveEquiv e).toEmbedding) + (UT.map (projectiveEquiv e.symm.dualMap).toEmbedding) σ P τ +abbrev ThreeCoordinateMessage (e : V≃ₗ[K](Fin 4→K)) + (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) (σ P τ : ℝ) + (t : ThreeCoordinateTape e U UT σ P τ) := + ThreePublicMessage (U.map (projectiveEquiv e).toEmbedding) + (UT.map (projectiveEquiv e.symm.dualMap).toEmbedding) σ P τ t +noncomputable def threeCoordinatePublicLaw (e : V≃ₗ[K](Fin 4→K)) + (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) (σ P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + Law (ThreeCoordinateTape e U UT σ P τ) := + threePublicLaw (U.map (projectiveEquiv e).toEmbedding) + (UT.map (projectiveEquiv e.symm.dualMap).toEmbedding) σ P τ R L₀ +noncomputable def threeCoordinateEncoded (e : V≃ₗ[K](Fin 4→K)) + (X U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))) (σ P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) + (t : ThreeCoordinateTape e U UT σ P τ) : Option (ThreeCoordinateMessage e U UT σ P τ t) := + threeCertifiedEncoded (X.map (projectiveEquiv e).toEmbedding) (U.map (projectiveEquiv e).toEmbedding) + (T.map (projectiveEquiv e.symm.dualMap).toEmbedding) (UT.map (projectiveEquiv e.symm.dualMap).toEmbedding) + σ P τ R L₀ t +noncomputable def threeCoordinateDecoded (e : V≃ₗ[K](Fin 4→K)) + (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) (σ P τ : ℝ) + (t : ThreeCoordinateTape e U UT σ P τ) (m : ThreeCoordinateMessage e U UT σ P τ t) : Finset (ℙ K V) := + (threePublicDecoded (U.map (projectiveEquiv e).toEmbedding) + (UT.map (projectiveEquiv e.symm.dualMap).toEmbedding) σ P τ t m).map (projectiveEquiv e).symm.toEmbedding +noncomputable def threeCoordinateCost (e : V≃ₗ[K](Fin 4→K)) + (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) (σ P τ : ℝ) + (t : ThreeCoordinateTape e U UT σ P τ) (m : ThreeCoordinateMessage e U UT σ P τ t) : ℝ := + threePublicCost (U.map (projectiveEquiv e).toEmbedding) + (UT.map (projectiveEquiv e.symm.dualMap).toEmbedding) σ P τ t m +noncomputable def threeCoordinateCertifiedLaw (e : V≃ₗ[K](Fin 4→K)) (σ : ℝ) + (X U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : Law (Option (Finset (ℙ K V))) := + map (threeCoordinatePublicLaw e U UT σ P τ R L₀) + (fun t=>(threeCoordinateEncoded e X U T UT σ P τ R L₀ t).map (threeCoordinateDecoded e U UT σ P τ t)) +omit [FiniteDimensional K V] [Fintype (ℙ K (Dual K V))] in +lemma threeCoordinateCertified_exact (e : V≃ₗ[K](Fin 4→K)) (σ : ℝ) + (X U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + threeCoordinateCertifiedLaw e σ X U T UT P τ R L₀= + map (threeCertifiedLaw (X.map (projectiveEquiv e).toEmbedding) + (U.map (projectiveEquiv e).toEmbedding) + (T.map (projectiveEquiv e.symm.dualMap).toEmbedding) + (UT.map (projectiveEquiv e.symm.dualMap).toEmbedding) σ P τ R L₀) + (Option.map fun Z=>Z.map (projectiveEquiv e).symm.toEmbedding) := by + simp only [threeCoordinateCertifiedLaw,threeCoordinatePublicLaw,threeCoordinateEncoded, + threeCertifiedLaw,map_comp,Option.map_map,Function.comp_def] + rfl + +theorem eventually_three_coordinates_certified {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [Fintype K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Fin 4→K))] [Fintype (ℙ K (Dual K (Fin 4→K)))] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K A)] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K (Dual K A))] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K (Dual K (Dual K A)))], + ∀ (e : V≃ₗ[K](Fin 4→K)) + (X U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))), + Nat.card K=q → Real.exp σ=q → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-400*beta η) → X⊆U → T⊆UT → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^4*Real.exp (-b)≤(X.card:ℝ)*T.card → + let p := threeCoordinateCertifiedLaw e σ X U T UT (P η σ D R) τ R L₀ + p none≤2*Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

Z.map (projectiveEquiv e).symm.toEmbedding) (some W) hW + cases Z with + | none => simp at he + | some Z => + have he' : Z.map (projectiveEquiv e).symm.toEmbedding=W := Option.some.inj he + subst W + have hz := hg Z hZ + obtain ⟨hU,hcard',hcap⟩ := decoded_coordinates e U X Z hz.1 + refine ⟨hU,?_,?_⟩ + · simpa only [hcard',X',Finset.card_map] using hz.2.1 + · rw [Finset.inter_comm,hcap,Finset.inter_comm] + simpa only [X',Finset.card_map,Finset.inter_comm] using hz.2.2 + · intro t m hm + have hh := hc t m hm + simpa only [threeCoordinateCost,U',X',T',UT',Finset.card_map] using hh +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def publicGeneralReverseResult (A UA : Finset (ℙ K V)) + (B UB : Finset (ℙ K (Dual K V))) (_hB : B.Nonempty) + (H : ℕ) (n : Fin (H+1)) (q MA MB c : ℝ) (_hc : 0 none + | some W => if _hW : CaptureBound B UB c MB W then + (universalFreshEncoded Incident A UA (B∩W) W Finset.inter_subset_right H n q MA t).map + (fun m=>UA∩universalFreshDecoded Incident W H q t m) + else none + +omit [Finite K] [FiniteDimensional K V] in +theorem publicGeneralReverseResult_law (A UA : Finset (ℙ K V)) + (B UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) + (H : ℕ) (n : Fin (H+1)) (q MA MB c : ℝ) (hc : 0 exact map_const _ none + | some W => + change map (universalFreshLaw (ℙ K (Dual K V)) H q) + (fun t=>if _hW : CaptureBound B UB c MB W then + (universalFreshEncoded Incident A UA (B∩W) W Finset.inter_subset_right H n q MA t).map + (fun m=>UA∩universalFreshDecoded Incident W H q t m) else none) = _ + dsimp only [generalNextCapLaw] + split_ifs with hv + · have hW := (hv.nonempty hB hc).mono Finset.inter_subset_right + have hh := congrArg (fun p=>map p (Option.map fun Z=>UA∩Z)) + (universalFreshEncoded_law Incident A UA (B∩W) W Finset.inter_subset_right hW H n q MA) + rw [ambientCapLaw_restrict,map_comp] at hh + simpa only [Function.comp_def,Option.map_map] using hh + · exact map_const _ none +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeFiniteOriented.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeFiniteOriented.lean new file mode 100644 index 0000000000000000000000000000000000000000..a9e746a98a34a8f62196d16bee096f5c39811778 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeFiniteOriented.lean @@ -0,0 +1,273 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.OrientedFiniteCost + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence FiniteEntropy ReverseCap Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + +noncomputable def threeOrientedFinitePredictor (hd : finrank K V=4) (σ : ℝ) + (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : FinitePredictor (ℙ K V) (ℙ K (Dual K V)) := + orientedFinitePredictor (threeFinitePredictor hd σ U UT P τ R L₀) + (threeFinitePredictor (Subspace.dual_finrank_eq.trans hd) σ UT + (U.map bidualPoint.toEmbedding) P τ R L₀) + U UT 4 (1000*(Nat.card K)^2) (Nat.card K) P (9/1000) 10 + +theorem eventually_three_finite_oriented {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))], + ∀ (hd : finrank K V=4) (S U : Finset (ℙ K V)) + (T UT : Finset (ℙ K (Dual K V))) (_hT : T.Nonempty), + Nat.card K=q → Real.exp σ=q → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-400*beta η) → S.Nonempty → S⊆U → T⊆UT → + (Nat.card K:ℝ)*(incidences S T:ℝ)≤τ*S.card*T.card → + (Nat.card K:ℝ)^4*Real.exp (-b)≤(S.card:ℝ)*T.card → + let pred := threeOrientedFinitePredictor hd σ U UT (P η σ D R) τ R L₀ + let p := pred.output S T + p none≤3*Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

by simpa only [neg_mul] using h.le + filter_upwards [eventually_three_finite_predictor hη hη' Cb hCb, + eventually_reverse_parameters hη hη' Cb hCb,hsparse,eventually_ge_atTop (1:ℝ)] with σ hbase hrev hsparse hσ + intro D b τ R L₀ q K V _ _ _ _ _ _ _ _ _ hd S U T UT hT hcard hσq hr hL hb hbhi hτ hτhi hS hSU hTU hdens hprod + have hq : (Nat.card K:ℝ)=Real.exp σ := by rw [hcard,hσq] + have hτ200 := hτhi.trans (Real.rpow_le_rpow_of_exponent_le hσ + (by have := beta_pos hη;linarith : -400*beta η≤-200*beta η)) + obtain ⟨hP,hbP,heP,_,hq3⟩ := hrev D R b τ hr hbhi hτ.le hτ200 + have hqnat : 3≤Nat.card K := by exact_mod_cast (hq ▸ hq3 : (3:ℝ)≤Nat.card K) + have hq1 : (1:ℝ)≤Nat.card K := by exact_mod_cast (by omega : 1≤Nat.card K) + let : Finite V := Module.finite_of_finite K + let : Fintype V := Fintype.ofFinite _ + have hn := reverseLength_universal_bound σ hσ hq.symm (by omega : finrank K V≤5) S U hS hSU + have hgeom : + let p := (threeOrientedFinitePredictor hd σ U UT (P η σ D R) τ R L₀).output S T + p none≤3*Real.exp (-(Nat.card K:ℝ)) ∧ + ∀W,0

(p.decoded t m).map e + encoded := fun S T=>p.encoded (inputs S T).1 (inputs S T).2 + cost := p.cost +lemma FinitePredictor.transform_output (p : FinitePredictor A B) (e : A↪C) + (inputs : Finset C→Finset D→Finset A×Finset B) (S : Finset C) (T : Finset D) : + (p.transform e inputs).output S T= + map (p.output (inputs S T).1 (inputs S T).2) (Option.map fun W=>W.map e) := by + simp only [FinitePredictor.output,FinitePredictor.transform,map_comp,Option.map_map,Function.comp_def] + rfl +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.ProjectiveRestriction +open Module ProjectiveIncidence ProjectiveTraining ScoreGeometry FiniteEntropy +open DyadicLifts ReverseCap Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def threeFlatFinitePredictor (A : Submodule K V) (hA : finrank K A=4) (σ : ℝ) + (UX : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) + (τ P : ℝ) (R : ℕ) (L₀ : ℝ≥0) (k : ℕ) : FinitePredictor (ℙ K V) (ℙ K (Dual K V)) := by + letI : Finite A := Module.finite_of_finite K + letI : Finite (Dual K A) := Module.finite_of_finite K + letI : Finite (Dual K (Dual K A)) := Module.finite_of_finite K + letI : Fintype (ℙ K A) := Fintype.ofFinite _ + letI : Fintype (ℙ K (Dual K A)) := Fintype.ofFinite _ + letI : Fintype (ℙ K (Dual K (Dual K A))) := Fintype.ofFinite _ + exact (threeOrientedFinitePredictor hA σ (flatSection A UX) (planeEnclosure A UT k) + P (Real.sqrt τ) R L₀).transform (flatEmbedding A) + (fun X T=>(flatSection A X,planeHidden A X T τ k)) + +theorem eventually_three_flat_finite_predictor {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))], + ∀ (A : Submodule K V) (hA : finrank K A=4) + (X UX : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))), + finrank K V≤5 → Nat.card K=q → Real.exp σ=q → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-800*beta η) → X.Nonempty → T.Nonempty → X⊆UX → T⊆UT → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^(finrank K V)*Real.exp (-b)≤(X.card:ℝ)*T.card → + (X.card:ℝ)≤100*(X∩flatPoints A).card → + ∃k≤Nat.log 2 ((Nat.card K)^(finrank K V-finrank K A)), + let pred := threeFlatFinitePredictor A hA σ UX UT τ (P η σ D R) R L₀ k + let p := pred.output X T + p none≤3*Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

Z.map (flatEmbedding A)) (some W) hW + cases Z with + | none => simp at he + | some Z => + have he' : Z.map (flatEmbedding A)=W := Option.some.inj he + subst W + have hz := hgood Z hZ + obtain ⟨hu,hcard',hcap⟩ := section_decoder A X UX Z hz.1 + refine ⟨hu,?_,?_⟩ + · rw [hcard'] + exact hz.2.1.trans (mul_le_mul_of_nonneg_right (by exact_mod_cast hsX) (Real.exp_pos _).le) + · rw [hcap,Finset.inter_comm] + have hc := hz.2.2 + nlinarith only [hc,hxs] + · intro t m hm + have hc := hcost t m hm + have hov := hover D R b Cb (Nat.card K) (finrank K V-finrank K A) hr hq (by omega) hbhi + have hP : 1≤P η σ D R := + (Real.one_le_rpow hσ (mul_nonneg (by norm_num) (beta_pos hη).le)).trans + (finite_bounds hη hη' hσ hr).2.2.2.2.2.1 + have hlog : Real.log (400*(Nat.log 2 M+1:ℝ))≤P η σ D R := hov.2.1 + have h100 : Real.log (100:ℝ)≤P η σ D R := (Real.log_le_log (by norm_num) (by + have hn : (0:ℝ)≤Nat.log 2 M := by positivity + linarith : (100:ℝ)≤400*(Nat.log 2 M+1:ℝ))).trans hlog + have h4 : Real.log (4*(Nat.log 2 M+1:ℝ))≤P η σ D R := + (Real.log_le_log (by positivity) (by + have hn : (0:ℝ)≤Nat.log 2 M := by positivity + linarith : (4:ℝ)*(Nat.log 2 M+1)≤400*(Nat.log 2 M+1:ℝ))).trans hlog + have hgX : 0≤Real.log ((UX.card:ℝ)/X.card) := Real.log_nonneg + ((le_div_iff₀ (by exact_mod_cast hX.card_pos)).mpr (by + simpa using (show (X.card:ℝ)≤UX.card by exact_mod_cast Finset.card_le_card hXU))) + have hgT : 0≤Real.log ((UT.card:ℝ)/T.card) := Real.log_nonneg + ((le_div_iff₀ (by exact_mod_cast hT.card_pos)).mpr (by + simpa using (show (T.card:ℝ)≤UT.card by exact_mod_cast Finset.card_le_card hTU))) + have hsum : Real.log ((US.card:ℝ)/S.card)+Real.log ((UT₀.card:ℝ)/T₀.card)+P η σ D R≤ + 3*(Real.log ((UX.card:ℝ)/X.card)+Real.log ((UT.card:ℝ)/T.card)+P η σ D R) := by + simp only [Nat.cast_add,Nat.cast_one] at hgap + change _≤Real.log ((UT.card:ℝ)/T.card)+Real.log (4*(Nat.log 2 M+1:ℝ)) at hgap + change _≤Real.log ((UX.card:ℝ)/X.card)+Real.log (100:ℝ) at hsgap + linarith + have hm' := mul_le_mul_of_nonneg_left hsum + (by positivity : (0:ℝ)≤9000*(Nat.card K:ℝ)*P η σ D R) + have hpos : 0≤(Nat.card K:ℝ)*P η σ D R* + (Real.log ((UX.card:ℝ)/X.card)+Real.log ((UT.card:ℝ)/T.card)+P η σ D R) := by positivity + change (threeOrientedFinitePredictor hA σ US UT₀ (P η σ D R) (Real.sqrt τ) R L₀).cost t m≤_ + nlinarith only [hc,hm',hpos] +end SharpRamseyFive.ProjectiveRestriction + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeFinitePredictor.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeFinitePredictor.lean new file mode 100644 index 0000000000000000000000000000000000000000..ffa5dc5cc0be6ff613b2270864dd31960b9e5f4b --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeFinitePredictor.lean @@ -0,0 +1,104 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.GeneralReversedCode + +namespace OAI + + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining Metadata Filter ParameterHierarchy FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization NNReal Topology +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem eventually_three_finite_predictor {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))], + ∀ (hd : finrank K V=4) (X U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))), + Nat.card K=q → Real.exp σ=q → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-400*beta η) → X⊆U → T⊆UT → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^4*Real.exp (-b)≤(X.card:ℝ)*T.card → + let pred := threeFinitePredictor hd σ U UT (P η σ D R) τ R L₀ + let p := pred.output X T + p none≤2*Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

f.Message t.1 ⊕ GeneralReversedMessage r.Message r.decoded H q t.2 + messageFintype := fun _=>inferInstance + tapeLaw := adaptiveLaw f.tapeLaw (fun _=>adaptiveLaw r.tapeLaw (fun _=>universalFreshLaw (ℙ K (Dual K V)) H q)) + decoded := fun t m=>match m with + | .inl m=>f.decoded t.1 m + | .inr m=>generalReversedDecoded r.Message r.decoded U H q t.2 m + encoded := fun S T t=>if S.card≤T.card then (f.encoded S T t.1).map Sum.inl else + if hn : reverseLength q (Real.log ((U.card:ℝ)/S.card))≤H then + (generalReversedEncoded r.Message r.decoded (r.encoded T (S.map bidualPoint.toEmbedding)) S U T UT H + ⟨_,Nat.lt_succ_of_le hn⟩ q ((320/c+320)*q^d/T.card) ((T.card:ℝ)*Real.exp (B*P)) c t.2).map Sum.inr + else none + cost := fun t m=>Real.log 2 + match m with + | .inl m=>f.cost t.1 m + | .inr m=>generalReversedCost r.Message r.decoded r.cost H q t.2 m + +omit [Finite K] in +lemma orientedFinite_output + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (S U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))) (hT : T.Nonempty) + (d H : ℕ) (q P c B : ℝ) (hc : 0(f.encoded S T t).map (f.decoded t)) + · simp only [FinitePredictor.output,orientedFinitePredictor,ite_eq_right h,dite_eq_left hn,Option.map_map,Function.comp_def] + exact (map_independent_right _ _ (fun t=> + (generalReversedEncoded r.Message r.decoded (r.encoded T (S.map bidualPoint.toEmbedding)) S U T UT H + ⟨_,Nat.lt_succ_of_le hn⟩ q ((320/c+320)*q^d/T.card) ((T.card:ℝ)*Real.exp (B*P)) c t).map + (generalReversedDecoded r.Message r.decoded U H q t))).trans + (generalReversed_law r.Message r.decoded (r.encoded T (S.map bidualPoint.toEmbedding)) r.tapeLaw + S U T UT hT H ⟨_,Nat.lt_succ_of_le hn⟩ q ((320/c+320)*q^d/T.card) + ((T.card:ℝ)*Real.exp (B*P)) c hc) +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeLocal.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeLocal.lean new file mode 100644 index 0000000000000000000000000000000000000000..30457cc6caea24ab452f6d0aa1abceb44825beb4 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeLocal.lean @@ -0,0 +1,134 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.SmallFiniteCost +import OAI.Combinatorics.RamseyFive.Geometry.ThreePublicDefs + +namespace OAI + + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy MeasurePublicTable Metadata FiniteEntropy ProjectiveRestriction +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_three_local_complete {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K : Type) [Field K] [Finite K] [Fintype K] [CharP K q] + [Fintype (ℙ K (Fin 4→K))] [Fintype (ℙ K (Dual K (Fin 4→K)))] + [∀x : ℙ K (Fin 4→K),Fintype (RadialLine x)] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K A)] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K (Dual K A))] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K (Dual K (Dual K A)))], + ∀ (X U : Finset (ℙ K (Fin 4→K))) (T UT : Finset (ℙ K (Dual K (Fin 4→K)))), + Nat.card K=q → Real.exp σ=q → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-400*beta η) → X⊆U → T⊆UT → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^4*Real.exp (-b)≤(X.card:ℝ)*T.card → + ∃br : ThreePublicIndex K σ, + let P₀ := P η σ D R + let p := map (threeLocalLaw U UT σ P₀ τ R L₀ br) + (fun t=>(threeLocalEncoded X U T UT σ P₀ τ br t).map (threeLocalDecoded U UT σ P₀ τ br t)) + p none≤2*Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

(baseFiniteEncoded X U (P η σ D R) τ t).map t)) none ≤ _ + rw [baseFinite_law] + exact (baseSmallLaw X U hXU (P η σ D R) τ hP hn R L₀).1.trans (by positivity) + · change ∀W,0 < (map (baseTableLaw U (P η σ D R) τ R L₀) (fun t=>(baseFiniteEncoded X U (P η σ D R) τ t).map t)) (some W) → _ + rw [baseFinite_law] + intro W hW + have hw := baseCaptureLaw_positive X U (P η σ D R) τ R L₀ W hW + refine ⟨hw.1,hw.2.1.trans ?_,?_⟩ + · exact mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by linarith)) (Nat.cast_nonneg _) + · exact (mul_le_mul_of_nonneg_right (by norm_num : (9/1000:ℝ)≤9/10) (Nat.cast_nonneg _)).trans hw.2.2 + · intro t m hm + exact (smallFinite_cost σ hσ1 hq.symm (by omega) X U hX hXU _ τ hP hn t m hm).trans (hcost_le 110 (by norm_num) (by norm_num)) + · let F := flatIndices (K:=K) (V:=Fin 4→K) 3 + have hF : F.Nonempty := flatIndices_nonempty 3 (by omega) + let Flat := flatEnumeration (K:=K) (V:=Fin 4→K) + have hFlat : ∀j∈F,finrank K (Flat j)=3 := flatIndices_rank 3 + have hcover : ∀A : Submodule K (Fin 4→K),finrank K A=3 → ∃j∈F,Flat j=A := flatIndices_cover 3 + let g := Real.log (X.card:ℝ)-3*σ/2 + have hXexp : (X.card:ℝ)=Real.exp (3*σ/2+g) := by + dsimp only [g] + rw [show 3*σ/2+(Real.log (X.card:ℝ)-3*σ/2)=Real.log (X.card:ℝ) by ring,Real.exp_log (by exact_mod_cast hX.card_pos)] + let t := (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5) + have ht : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + by_cases hsmall : ∀i,(C i).card≤(S.card:ℝ)/25 + · have hτhi' := hτhi.trans (Real.rpow_le_rpow_of_exponent_le hσ1 + (by have := beta_pos hη;linarith : -400*beta η≤-200*beta η)) + obtain ⟨_,_,hc,c,hf,hg⟩ := hscore D b τ g R L₀ q K (Fin 4) _ F hF Flat X U T + hcard hσq (by simp) hr hL hb hbhi hτ hτhi' hXU hXT hdens hprod hXexp (lt_of_not_ge hn) hFlat hcover hsmall + let n : Fin (Fintype.card (ℙ K (Fin 4→K))+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + have he : map (scoreTableLaw U σ (P η σ D R) τ R L₀) + (fun t => (scoreFiniteEncoded X U n σ (P η σ D R) τ (9/20) 10 c t).map t)= + finiteImageLaw (baseTapeMeasure U (P η σ D R) τ R L₀) + (fun t=>(scoredEncoded X U n σ (P η σ D R) τ (9/20) 10 R L₀ c t).map + (scoredMessageDecoded U σ (P η σ D R) τ R L₀ t)) := by + rw [scoreFinite_law,scoredEncoded_law] + refine ⟨.inr (.inl (n,c)),?_,?_,?_⟩ + · change (map (scoreTableLaw U σ (P η σ D R) τ R L₀) (fun t=>(scoreFiniteEncoded X U n σ (P η σ D R) τ (9/20) 10 c t).map t)) none ≤ _ + rw [he] + exact hf.trans (by nlinarith only [Real.exp_pos (-(Nat.card K:ℝ))]) + · change ∀W,0 < (map (scoreTableLaw U σ (P η σ D R) τ R L₀) (fun t=>(scoreFiniteEncoded X U n σ (P η σ D R) τ (9/20) 10 c t).map t)) (some W) → _ + rw [he] + intro W hW + obtain ⟨hWU,hsize,hcap⟩ := hg W hW + exact ⟨hWU,hsize,(mul_le_mul_of_nonneg_right (by norm_num : (9/1000:ℝ)≤9/20) (Nat.cast_nonneg _)).trans hcap⟩ + · intro t z hz + exact (scoreFinite_cost_of_header X U n σ (P η σ D R) τ (9/20) 10 _ c hc t z hz).trans (hcost_le 100 (by norm_num) (by norm_num)) + · have hSX : S⊆X := peel_subset _ F hF _ X _ _ + have hret' : X.card≤2*S.card := peel_half _ F hF _ X _ _ + have hret : X.card≤4*S.card := by omega + obtain ⟨a,ha,hlarge⟩ := large_clipped_part X S X hSX hret F hF (fun j=>flatPoints (Flat j)) m hsmall + let : Finite (Dual K (Flat a)) := Module.finite_of_finite K + let : ∀ x : ℙ K (Flat a),Fintype (RadialLine x) := fun _=>Fintype.ofFinite _ + let : ∀ x : ℙ K (Dual K (Flat a)),Fintype (RadialLine x) := fun _=>Fintype.ofFinite _ + obtain ⟨k,hk,hf,hg,hc⟩ := hplane D b τ R L₀ K (Fin 4→K) (Flat a) X U T UT + (hFlat a ha) (by omega) hq hr hL hb hbhi hτ hτhi hX hT hXU hTU hdens (by simpa only [hd] using hprod) hlarge + have hk' : k≤Nat.log 2 (Nat.card K) := by simpa only [hd,hFlat a ha,Nat.reduceSub,pow_one] using hk + refine ⟨.inr (.inr (⟨a,ha⟩,⟨k,Nat.lt_succ_of_le hk'⟩)),hf,?_,hc⟩ + intro W hW + obtain ⟨hWU,hsize,hcap⟩ := hg W hW + refine ⟨hWU,hsize.trans ?_,hcap⟩ + exact mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by linarith)) (Nat.cast_nonneg _) +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeOriented.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeOriented.lean new file mode 100644 index 0000000000000000000000000000000000000000..dd5998b09fafbbfffe04ead74b05a582aa70ce65 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreeOriented.lean @@ -0,0 +1,212 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.ThreeSelected + +namespace OAI + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence FiniteEntropy ReverseCap Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + +noncomputable def threeOrientedLaw (hd : finrank K V=4) (σ : ℝ) + (S U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))) (hT : T.Nonempty) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : Law (Option (Finset (ℙ K V))) := + if S.card≤T.card then threeFreeLaw hd σ S U T UT P τ R L₀ else + optionCompose (threeFreeLaw (Subspace.dual_finrank_eq.trans hd) σ T UT + (S.map bidualPoint.toEmbedding) (U.map bidualPoint.toEmbedding) P τ R L₀) + (generalNextCapLaw S U T UT hT (9/1000) (by norm_num) + (reverseLength (Nat.card K) (Real.log ((U.card:ℝ)/S.card))) + (Nat.card K) ((320/((9:ℝ)/1000)+320)*(Nat.card K:ℝ)^4/T.card) + ((T.card:ℝ)*Real.exp (10*P))) + +lemma three_cap_size_absorb (Q s t b P : ℝ) (hs : 0≤ s) (ht : 0by simpa only [neg_mul] using h.le + filter_upwards [eventually_three_free hη hη' Cb hCb, + eventually_reverse_parameters hη hη' Cb hCb,hsparse,eventually_ge_atTop (1:ℝ)] with σ hbase hrev hsparse hσ + intro D b τ R L₀ q K V _ _ _ _ _ _ _ _ _ hd S U T UT hT hcard hσq hr hL hb hbhi hτ hτhi hS hSU hTU hdens hprod + have hq : (Nat.card K:ℝ)=Real.exp σ := by rw [hcard,hσq] + have hτ200 := hτhi.trans (Real.rpow_le_rpow_of_exponent_le hσ + (by have := beta_pos hη;linarith : -400*beta η≤-200*beta η)) + obtain ⟨hP,hbP,heP,_,hq3⟩ := hrev D R b τ hr hbhi hτ.le hτ200 + have hqnat : 3≤Nat.card K := by exact_mod_cast (hq ▸ hq3 : (3:ℝ)≤Nat.card K) + have hq1 : (1:ℝ)≤Nat.card K := by exact_mod_cast (by omega : 1≤Nat.card K) + dsimp only [threeOrientedLaw] + split_ifs with hST + · obtain ⟨hf,hg⟩ := hbase D b τ R L₀ q K V hd S U T UT hcard hσq hr hL hb hbhi hτ hτhi hSU hTU hST hdens hprod + exact ⟨hf.trans (by nlinarith only [Real.exp_pos (-(Nat.card K:ℝ))]),hg⟩ + · have hddual : finrank K (Dual K V)=4 := Subspace.dual_finrank_eq.trans hd + have hTS : T.card≤(S.map bidualPoint.toEmbedding).card := by rw [Finset.card_map];omega + have hSU' : S.map bidualPoint.toEmbedding⊆U.map bidualPoint.toEmbedding := Finset.map_subset_map.mpr hSU + have hdens' : (Nat.card K:ℝ)*(incidences T (S.map bidualPoint.toEmbedding):ℝ)≤ + τ*T.card*(S.map bidualPoint.toEmbedding).card := by + rw [incidences_bidual,Finset.card_map] + nlinarith only [hdens] + have hprod' : (Nat.card K:ℝ)^4*Real.exp (-b)≤(T.card:ℝ)*(S.map bidualPoint.toEmbedding).card := by + rw [Finset.card_map];nlinarith only [hprod] + obtain ⟨hf,hg⟩ := hbase D b τ R L₀ q K (Dual K V) hddual T UT + (S.map bidualPoint.toEmbedding) (U.map bidualPoint.toEmbedding) + hcard hσq hr hL hb hbhi hτ hτhi hTU hSU' hTS hdens' hprod' + have hsparse' : 1000*(Nat.card K:ℝ)*incidences S T≤(9:ℝ)/1000*S.card*T.card := by + have htau := hτhi.trans hsparse + have hh := mul_le_mul_of_nonneg_left hdens (by norm_num : (0:ℝ)≤1000) + have hh' := mul_le_mul_of_nonneg_right htau (show (0:ℝ)≤(S.card:ℝ)*T.card from mul_nonneg (Nat.cast_nonneg _) (Nat.cast_nonneg _)) + nlinarith only [hh,hh'] + have hl := reverseLength_spec (Nat.card K) (Real.log ((U.card:ℝ)/S.card)) hq1 (enclosure_gap_nonneg S U hS hSU) + obtain ⟨hf',hg'⟩ := reverse_after_general_capture (d:=3) hd (by norm_num) hqnat S U hS hSU T UT hT + (9/1000) (by norm_num) (by norm_num) + ((T.card:ℝ)*Real.exp (10*P η σ D R)) (2*Real.exp (-(Nat.card K:ℝ))) + (threeFreeLaw hddual σ T UT (S.map bidualPoint.toEmbedding) (U.map bidualPoint.toEmbedding) (P η σ D R) τ R L₀) + hf hg hsparse' (reverseLength (Nat.card K) (Real.log ((U.card:ℝ)/S.card))) hl.1 hl.2.1 + refine ⟨by convert hf' using 1; ring,?_⟩ + intro W hW + have hw := hg' W hW + refine ⟨hw.1,hw.2.1.trans ?_,?_⟩ + · exact three_cap_size_absorb _ _ _ _ _ (Nat.cast_nonneg _) (by exact_mod_cast hT.card_pos) hprod (by linarith) hbP heP + · exact (mul_le_mul_of_nonneg_right (by norm_num : (9/1000:ℝ)≤9/10) (Nat.cast_nonneg _)).trans hw.2.2 +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.ProjectiveRestriction +open Module ProjectiveIncidence ProjectiveTraining ScoreGeometry FiniteEntropy +open DyadicLifts ReverseCap Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] + +noncomputable def threeFlatBranchLaw (A : Submodule K V) (hA : finrank K A=4) (σ : ℝ) + (X UX : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))) + (τ P : ℝ) (R : ℕ) (L₀ : ℝ≥0) (k : ℕ) : Law (Option (Finset (ℙ K V))) := by + letI : Finite A := Module.finite_of_finite K + letI : Finite (Dual K A) := Module.finite_of_finite K + letI : Finite (Dual K (Dual K A)) := Module.finite_of_finite K + letI : Fintype (ℙ K A) := Fintype.ofFinite _ + letI : Fintype (ℙ K (Dual K A)) := Fintype.ofFinite _ + letI : Fintype (ℙ K (Dual K (Dual K A))) := Fintype.ofFinite _ + let S := flatSection A X + let US := flatSection A UX + let G := nonzeroLifts A (goodLifts A S T (Real.sqrt τ/Nat.card K)) + let T₀ := restrictions (image A.dualRestrict) G k + let UT₀ := enclosure (image A.dualRestrict) (nonzeroLifts A UT) (2^k) + exact if h : T₀.Nonempty then + map (threeOrientedLaw hA σ S US T₀ UT₀ h P (Real.sqrt τ) R L₀) + (Option.map fun Z=>Z.map (flatEmbedding A)) + else pureLaw none + +theorem eventually_three_flat_branch {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q] [FiniteDimensional K V] [Fintype (ℙ K V)], + ∀ (A : Submodule K V) (hA : finrank K A=4) + (X UX : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))), + finrank K V≤5 → Nat.card K=q → Real.exp σ=q → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-800*beta η) → X.Nonempty → T.Nonempty → X⊆UX → T⊆UT → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^(finrank K V)*Real.exp (-b)≤(X.card:ℝ)*T.card → + (X.card:ℝ)≤100*(X∩flatPoints A).card → + ∃k≤Nat.log 2 ((Nat.card K)^(finrank K V-finrank K A)), + let p := threeFlatBranchLaw A hA σ X UX T UT τ (P η σ D R) R L₀ k + p none≤3*Real.exp (-(Nat.card K:ℝ)) ∧ + ∀W,0

Z.map (flatEmbedding A)) none≤_ ∧ _ + refine ⟨by rw [map_option_none];exact hfail,?_⟩ + intro W hW + obtain ⟨Z,hZ,he⟩ := map_positive pp (Option.map fun Z=>Z.map (flatEmbedding A)) (some W) hW + cases Z with + | none => simp at he + | some Z => + have he' : Z.map (flatEmbedding A)=W := Option.some.inj he + subst W + have hz := hgood Z hZ + obtain ⟨hu,hcard',hcap⟩ := section_decoder A X UX Z hz.1 + refine ⟨hu,?_,?_⟩ + · rw [hcard'] + exact hz.2.1.trans (mul_le_mul_of_nonneg_right (by exact_mod_cast hsX) (Real.exp_pos _).le) + · rw [hcap,Finset.inter_comm] + have hc := hz.2.2 + nlinarith only [hc,hxs] +end SharpRamseyFive.ProjectiveRestriction + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreePublic.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreePublic.lean new file mode 100644 index 0000000000000000000000000000000000000000..484a9cf2db233d9e3caae651a64ef49bcccec004 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ThreePublic.lean @@ -0,0 +1,154 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.ThreeLocal +import OAI.Combinatorics.RamseyFive.Entropy.ThreeHeader + +namespace OAI + + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining Metadata FiniteEntropy +open Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology + +theorem eventually_three_public_complete {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K : Type) [Field K] [Finite K] [Fintype K] [CharP K q] + [Fintype (ℙ K (Fin 4→K))] [Fintype (ℙ K (Dual K (Fin 4→K)))] + [∀x : ℙ K (Fin 4→K),Fintype (RadialLine x)] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K A)] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K (Dual K A))] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K (Dual K (Dual K A)))], + ∀ (X U : Finset (ℙ K (Fin 4→K))) (T UT : Finset (ℙ K (Dual K (Fin 4→K)))), + Nat.card K=q → Real.exp σ=q → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-400*beta η) → X⊆U → T⊆UT → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^4*Real.exp (-b)≤(X.card:ℝ)*T.card → + ∃br : ThreePublicIndex K σ, + let P₀ := P η σ D R + let p := map (threePublicLaw U UT σ P₀ τ R L₀) + (fun t=>(threePublicEncoded X U T UT σ P₀ τ br t).map (threePublicDecoded U UT σ P₀ τ t)) + p none≤2*Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

(threePublicEncoded X U T UT σ P τ br t).map (threePublicDecoded U UT σ P τ t)) + p none≤2*Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

(threeCertifiedEncoded X U T UT σ P τ R L₀ t).map (threePublicDecoded U UT σ P τ t)) +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining Metadata FiniteEntropy +open Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology + +theorem eventually_three_certified {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K : Type) [Field K] [Finite K] [Fintype K] [CharP K q] + [Fintype (ℙ K (Fin 4→K))] [Fintype (ℙ K (Dual K (Fin 4→K)))] + [∀x : ℙ K (Fin 4→K),Fintype (RadialLine x)] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K A)] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K (Dual K A))] + [∀ A : Submodule K (Fin 4→K),Fintype (ℙ K (Dual K (Dual K A)))], + ∀ (X U : Finset (ℙ K (Fin 4→K))) (T UT : Finset (ℙ K (Dual K (Fin 4→K)))), + Nat.card K=q → Real.exp σ=q → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-400*beta η) → X⊆U → T⊆UT → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^4*Real.exp (-b)≤(X.card:ℝ)*T.card → + let P₀ := P η σ D R + let p := threeCertifiedLaw X U T UT σ P₀ τ R L₀ + p none≤2*Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

BaseTable U P τ + | .inr (.inl _) => ScoreTable U σ P τ + | .inr (.inr a) => PlanePublicTape (flatEnumeration a.1.1) U UT P τ a.2 +noncomputable instance (U : Finset (ℙ K (Fin 4→K))) + (UT : Finset (ℙ K (Dual K (Fin 4→K)))) (σ P τ : ℝ) (br : ThreePublicIndex K σ) : + Fintype (ThreeLocalTape U UT σ P τ br) := by + rcases br with b|b + · dsimp only [ThreeLocalTape];infer_instance + · rcases b with b|b <;> dsimp only [ThreeLocalTape] <;> infer_instance + +noncomputable def ThreeLocalMessage (U : Finset (ℙ K (Fin 4→K))) + (UT : Finset (ℙ K (Dual K (Fin 4→K)))) (σ P τ : ℝ) : + (br : ThreePublicIndex K σ)→ThreeLocalTape U UT σ P τ br→Type _ + | .inl _,_ => BaseMessage U P τ + | .inr (.inl _),_ => ScoredMessage U σ P τ + | .inr (.inr a),t => PlanePublicMessage (flatEnumeration a.1.1) U UT P τ a.2 t + +noncomputable def threeLocalLaw (U : Finset (ℙ K (Fin 4→K))) + (UT : Finset (ℙ K (Dual K (Fin 4→K)))) (σ P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + (br : ThreePublicIndex K σ)→Law (ThreeLocalTape U UT σ P τ br) + | .inl _ => baseTableLaw U P τ R L₀ + | .inr (.inl _) => scoreTableLaw U σ P τ R L₀ + | .inr (.inr a) => planePublicLaw (flatEnumeration a.1.1) U UT P τ R L₀ a.2 + +noncomputable def threeLocalDecoded (U : Finset (ℙ K (Fin 4→K))) + (UT : Finset (ℙ K (Dual K (Fin 4→K)))) (σ P τ : ℝ) : + (br : ThreePublicIndex K σ)→(t : ThreeLocalTape U UT σ P τ br)→ + ThreeLocalMessage U UT σ P τ br t→Finset (ℙ K (Fin 4→K)) + | .inl _,t,m => t m + | .inr (.inl _),t,m => t m + | .inr (.inr a),t,m => planePublicDecoded (flatEnumeration a.1.1) U UT P τ a.2 t m + +noncomputable def threeLocalEncoded (X U : Finset (ℙ K (Fin 4→K))) + (T UT : Finset (ℙ K (Dual K (Fin 4→K)))) (σ P τ : ℝ) : + (br : ThreePublicIndex K σ)→(t : ThreeLocalTape U UT σ P τ br)→ + Option (ThreeLocalMessage U UT σ P τ br t) + | .inl _,t => baseFiniteEncoded X U P τ t + | .inr (.inl c),t => scoreFiniteEncoded X U c.1 σ P τ (9/20) 10 c.2 t + | .inr (.inr a),t => planePublicEncoded (flatEnumeration a.1.1) X U T UT P τ a.2 t + +noncomputable def threeLocalCost (U : Finset (ℙ K (Fin 4→K))) + (UT : Finset (ℙ K (Dual K (Fin 4→K)))) (σ P τ : ℝ) : + (br : ThreePublicIndex K σ)→(t : ThreeLocalTape U UT σ P τ br)→ + ThreeLocalMessage U UT σ P τ br t→ℝ + | .inl _,_,m => baseFiniteCost U P τ m + | .inr (.inl _),_,m => scoreFiniteCost U σ P τ m + | .inr (.inr a),t,m => planePublicCost (flatEnumeration a.1.1) U UT P τ a.2 t m + +abbrev ThreePublicTape (U : Finset (ℙ K (Fin 4→K))) + (UT : Finset (ℙ K (Dual K (Fin 4→K)))) (σ P τ : ℝ) := + (br : ThreePublicIndex K σ)→ThreeLocalTape U UT σ P τ br +noncomputable def threePublicLaw (U : Finset (ℙ K (Fin 4→K))) + (UT : Finset (ℙ K (Dual K (Fin 4→K)))) (σ P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : + Law (ThreePublicTape U UT σ P τ) := piLaw (threeLocalLaw U UT σ P τ R L₀) +abbrev ThreePublicMessage (U : Finset (ℙ K (Fin 4→K))) + (UT : Finset (ℙ K (Dual K (Fin 4→K)))) (σ P τ : ℝ) (t : ThreePublicTape U UT σ P τ) := + (br : ThreePublicIndex K σ)×ThreeLocalMessage U UT σ P τ br (t br) +noncomputable def threePublicEncoded (X U : Finset (ℙ K (Fin 4→K))) + (T UT : Finset (ℙ K (Dual K (Fin 4→K)))) (σ P τ : ℝ) (br : ThreePublicIndex K σ) + (t : ThreePublicTape U UT σ P τ) : Option (ThreePublicMessage U UT σ P τ t) := + branchEncoded br (threeLocalEncoded X U T UT σ P τ br) t +noncomputable def threePublicDecoded (U : Finset (ℙ K (Fin 4→K))) + (UT : Finset (ℙ K (Dual K (Fin 4→K)))) (σ P τ : ℝ) + (t : ThreePublicTape U UT σ P τ) (m : ThreePublicMessage U UT σ P τ t) : Finset (ℙ K (Fin 4→K)) := + branchDecoded (threeLocalDecoded U UT σ P τ) t m +noncomputable def threePublicCost (U : Finset (ℙ K (Fin 4→K))) + (UT : Finset (ℙ K (Dual K (Fin 4→K)))) (σ P τ : ℝ) + (t : ThreePublicTape U UT σ P τ) (m : ThreePublicMessage U UT σ P τ t) : ℝ := + Real.log (Fintype.card (ThreePublicIndex K σ):ℝ)+threeLocalCost U UT σ P τ m.1 (t m.1) m.2 + +lemma threePublic_law (X U : Finset (ℙ K (Fin 4→K))) + (T UT : Finset (ℙ K (Dual K (Fin 4→K)))) (σ P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) (br : ThreePublicIndex K σ) : + map (threePublicLaw U UT σ P τ R L₀) + (fun t=>(threePublicEncoded X U T UT σ P τ br t).map (threePublicDecoded U UT σ P τ t))= + map (threeLocalLaw U UT σ P τ R L₀ br) + (fun t=>(threeLocalEncoded X U T UT σ P τ br t).map (threeLocalDecoded U UT σ P τ br t)) := + branch_output_law _ br _ _ +end SharpRamseyFive.ScoreGeometry + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy MeasurePublicTable Metadata FiniteEntropy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_three_small_protocol {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ g : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (I→K)] [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ (F : Finset J) (hF : F.Nonempty) (Flat : J→Submodule K (I→K)) + (X U : Finset (ℙ K (I→K))) (T : Finset (ℙ K (Dual K (I→K)))), + Nat.card K=q → Real.exp σ=q → Fintype.card I=4 → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → X⊆U → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^4*Real.exp (-b)≤(X.card:ℝ)*T.card → + (X.card:ℝ)=Real.exp (3*σ/2+g) → + 100*(Nat.card K:ℝ)*P η σ D R<(X.card:ℝ) → + (∀j∈F,finrank K (Flat j)=3) → + (∀V : Submodule K (I→K),finrank K V=3 → ∃j∈F,Flat j=V) → + let t := (Real.exp (3*σ/2+g))^(4/3:ℝ)/Real.exp σ*Real.exp (-g/5) + let ht : 0flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + (∀i,(C i).card≤(S.card:ℝ)/25) → + let N := scoreCutoff S U (P η σ D R) τ + Real.log (Nat.card (TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K))))≤q ∧ + Real.log N≤Real.log (2*(Nat.card K:ℝ))+scoreSearchCost S U (P η σ D R) τ ∧ + Real.log (Fintype.card (ℙ K (I→K))+1:ℝ)+ + Real.log (Fintype.card (ScoredPayload U S.card σ (P η σ D R) τ):ℝ)≤ + 100*(Nat.card K:ℝ)*P η σ D R*(Real.log ((U.card:ℝ)/X.card)+P η σ D R) ∧ + ∃c : TrainingCode (I→K) (listCap σ) (productCap σ) (Nat.card (I→K)), + let n : Fin (Fintype.card (ℙ K (I→K))+1) := ⟨S.card,Nat.lt_succ_of_le (Finset.card_le_univ S)⟩ + let p := finiteImageLaw (baseTapeMeasure U (P η σ D R) τ R L₀) + (fun t=>(scoredEncoded X U n σ (P η σ D R) τ (9/20) 10 R L₀ c t).map + (scoredMessageDecoded U σ (P η σ D R) τ R L₀ t)) + p none≤Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let m := peelLength (P η σ D R/10000flatPoints (Flat j)) X ⌈t⌉₊ (Nat.ceil_pos.mpr ht) + let C := clippedPart S F hF (fun j=>flatPoints (Flat j)) X m + change (∀i,(C i).card≤(S.card:ℝ)/25) → _ + intro hsmall + obtain ⟨hcost,hN,code,hfail,hgood⟩ := hh D b τ g R L₀ q K I J F hF Flat X U T + hcard hσq hI hr hL hb hbhi hτ hτhi hXU hXT hdens hprod hX hn hFlat hcover hsmall + have hSX : S⊆X := peel_subset _ _ _ _ _ _ _ + have hret : X.card≤2*S.card := peel_half _ _ _ _ _ _ _ + have hSn : (0:ℝ)p br none≤2*Real.exp (-(Nat.card K:ℝ)) ∧ + ∀W,0

Z.map (projectiveEquiv e).symm.toEmbedding) + +theorem eventually_three_coordinates {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [Fintype K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Fin 4→K))] [Fintype (ℙ K (Dual K (Fin 4→K)))], + ∀ (e : V≃ₗ[K](Fin 4→K)) + (X U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))), + Nat.card K=q → Real.exp σ=q → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-400*beta η) → X⊆U → T⊆UT → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^4*Real.exp (-b)≤(X.card:ℝ)*T.card → + let p := threeCoordinateLaw e σ X U T UT (P η σ D R) τ R L₀ + p none≤2*Real.exp (-(Nat.card K:ℝ)) ∧ + ∀W,0

Z.map (projectiveEquiv e).symm.toEmbedding) (some W) hW + cases Z with + | none => simp at he + | some Z => + have he' : Z.map (projectiveEquiv e).symm.toEmbedding=W := Option.some.inj he + subst W + have hz := hg Z hZ + obtain ⟨hU,hcard',hcap⟩ := decoded_coordinates e U X Z hz.1 + refine ⟨hU,?_,?_⟩ + · simpa only [hcard',X',Finset.card_map] using hz.2.1 + · rw [Finset.inter_comm,hcap,Finset.inter_comm] + simpa only [X',Finset.card_map] using hz.2.2 +end + +open Module ProjectiveIncidence ProjectiveTraining Metadata Filter ParameterHierarchy FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization NNReal Topology +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def threeFreeLaw (hd : finrank K V=4) (σ : ℝ) + (X U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) : Law (Option (Finset (ℙ K V))) := by + letI : Fintype K := Fintype.ofFinite _ + letI : Finite (Dual K (Fin 4→K)) := Module.finite_of_finite K + letI : Fintype (ℙ K (Fin 4→K)) := Fintype.ofFinite _ + letI : Fintype (ℙ K (Dual K (Fin 4→K))) := Fintype.ofFinite _ + let e := LinearEquiv.ofFinrankEq V (Fin 4→K) (by rw [Module.finrank_pi,Fintype.card_fin,hd]) + exact threeCoordinateLaw e σ X U T UT P τ R L₀ + +theorem eventually_three_free {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))], + ∀ (hd : finrank K V=4) (X U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))), + Nat.card K=q → Real.exp σ=q → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-400*beta η) → X⊆U → T⊆UT → X.card≤T.card → + (Nat.card K:ℝ)*(incidences X T:ℝ)≤τ*X.card*T.card → + (Nat.card K:ℝ)^4*Real.exp (-b)≤(X.card:ℝ)*T.card → + let p := threeFreeLaw hd σ X U T UT (P η σ D R) τ R L₀ + p none≤2*Real.exp (-(Nat.card K:ℝ)) ∧ + ∀W,0

u.val) he + have hc := Nat.card_le_card_of_injective f hf + rw [card_subspacePoints,l.property.1,Nat.card_eq_fintype_card,Fintype.card_coe] at hc + simpa [Finset.sum_range_succ,Nat.add_comm] using hc + +theorem score_degree_uniform_normalized (hdim : finrank K V=5) + (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) (hδ : 0 < δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) (H : F) + (n a χ : ℝ) (hn : 0 < n) (ha : 0 ≤ a) (ha2 : a ≤ 2) + (hm : mass (radialWeight x X δ) (pencilLines x F H) ≤ 2) + (hcap : n ≤ (Nat.card K:ℝ)^3) (hscale : n*(δ:ℝ) ≤ 4*Nat.card K) + (hchi : (208*2^198:ℝ) ≤ Real.exp (2*χ)) : + ((Finset.univ.filter fun H' : F => H≠H' ∧ a ≤ + mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H')).card:ℝ)*a^200 ≤ + ((Nat.card K:ℝ)^4/n)*Real.exp (2*χ) := by + have hq : (1:ℝ) ≤ Nat.card K := by + exact_mod_cast Nat.succ_le_iff.mpr (Nat.card_pos : 0 < Nat.card K) + by_cases hsmall : a ≤ 2*(δ:ℝ)*((Nat.card K:ℝ)+1) + · apply ScoreScalars.normalized_degree_small (C := 16) (zero_lt_one.trans_le hq) hn ha ha2 hcap ?_ (by convert hchi using 1; norm_num) + (ScoreScalars.degree_power_two_hundred hq (mass_nonneg _ _) hm ha + (score_degree_four x hdim X δ hδ F hF H a ha)) + · calc + n*a ≤ n*(2*(δ:ℝ)*((Nat.card K:ℝ)+1)) := mul_le_mul_of_nonneg_left hsmall hn.le + _ = 2*(n*(δ:ℝ))*((Nat.card K:ℝ)+1) := by ring + _ ≤ 2*(4*Nat.card K)*(2*Nat.card K) := mul_le_mul + (mul_le_mul_of_nonneg_left hscale (by norm_num)) (by linarith) (by positivity) (by positivity) + _ = 16*(Nat.card K:ℝ)^2 := by ring + · apply ScoreScalars.normalized_degree_truncated hq hn ha ha2 hcap + (le_trans (by norm_num) hchi) + have hline (l : RadialLine x) : (radialWeight x X δ l:ℝ) < a/2 := by + have hc := mul_le_mul_of_nonneg_left (show ((RadialLine.trainingOnLine X l).card:ℝ) ≤ + (Nat.card K:ℝ)+1 by exact_mod_cast training_line_card x X l) δ.coe_nonneg + have hh : (radialWeight x X δ l:ℝ) ≤ (δ:ℝ)*((Nat.card K:ℝ)+1) := by + simpa only [radialWeight,NNReal.coe_mul,NNReal.coe_natCast] using hc + linarith + have hd := score_degree_truncated x hdim X δ hδ F hF H a ha hline + have hs : (mass (radialWeight x X δ) (pencilLines x F H))^2 ≤ 4 := by + have h0 := mass_nonneg (radialWeight x X δ) (pencilLines x F H) + nlinarith + apply hd.trans + exact mul_le_mul_of_nonneg_right (by linarith) (by positivity) + +theorem score_row_uniform_moment (hdim : finrank K V=5) + (X : Finset {y : ℙ K V // x≠y}) (δ : ℝ≥0) (hδ : 0 < δ) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) (H : F) + (n χ : ℝ) (hn : 0 < n) + (hm : ∀ H : F,mass (radialWeight x X δ) (pencilLines x F H) ≤ 2) + (hcap : n ≤ (Nat.card K:ℝ)^3) (hscale : n*(δ:ℝ) ≤ 4*Nat.card K) + (hchi : (208*2^198:ℝ) ≤ Real.exp (2*χ)) : + (∑ H',offRow x X δ F H H'^200) ≤ + 2^200*(Nat.clog 2 X.card+1)*(((Nat.card K:ℝ)^4/n)*Real.exp (2*χ)) := by + apply (moment_polynomial_tail _ (fun i : ℕ => (δ:ℝ)*2^i) + (boundedOverlapDyads x X δ 2) 200 (by norm_num) + (((Nat.card K:ℝ)^4/n)*Real.exp (2*χ)) (offRow_nonneg x X δ F H) + (by intro i _; positivity) (offRow_bounded_cover x X δ hδ F hF 2 hm H) ?_).trans + · exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left + (by exact_mod_cast boundedOverlapDyads_card x X δ 2) (by positivity)) (by positivity) + intro i hi + have ha : 0 < (δ:ℝ)*2^i := by positivity + have he : (Finset.univ.filter (fun H' : F => (δ:ℝ)*2^i ≤ offRow x X δ F H H'))= + Finset.univ.filter (fun H' : F => H≠H' ∧ (δ:ℝ)*2^i ≤ + mass (radialWeight x X δ) (pencilLines x F H ∩ pencilLines x F H')) := by + apply Finset.filter_congr + intro H' _ + by_cases h : H=H' + · simp [offRow,h,not_le.mpr ha] + · simp [offRow,h] + rw [he] + exact score_degree_uniform_normalized x hdim X δ hδ F hF H n _ χ hn ha.le + (Finset.mem_filter.mp hi).2 (hm H) hcap hscale hchi + +end + +open Module ProjectiveIncidence PoissonScore WeightedPrograms +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal + +noncomputable def highCertificateMajorant (Q M B b L : ℝ) (p R k N₂ : ℕ) : ℝ := + B*(1+(((p:ℝ)*(Q*p)/B)/b^8+ + ((p:ℝ)^3*(N₂*p)*((k:ℝ)*p+R*(2*L))^2/B)*b+ + (p:ℝ)^2*((p:ℝ)^2*((R*L)^k*M+Q*(R*(2*L))^k))/B^2)) + +lemma highCertificateMajorant_nonneg (Q M B b L : ℝ) (p R k N₂ : ℕ) + (hQ : 0 ≤ Q) (hM : 0 ≤ M) (hB : 0 ≤ B) (hb : 0 ≤ b) (hL : 0 ≤ L) : + 0 ≤ highCertificateMajorant Q M B b L p R k N₂ := by + unfold highCertificateMajorant + positivity + +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Finite K] (x : ℙ K V) [Fintype (RadialLine x)] + +omit [FiniteDimensional K V] [Finite K] in + +theorem score_high_certificate_majorant (X : Finset {y : ℙ K V // x≠y}) (δ L : ℝ≥0) + (F : Finset (ℙ K (Dual K V))) (p R k N₂ : ℕ) (Q M B b : ℝ) + (hB : 0 < B) (_hb : 0 ≤ b) (hQ : (F.card:ℝ) ≤ Q) (_hM : 0 ≤ M) + (hm : ∀ H : F,mass (radialWeight x X δ) (pencilLines x F H) ≤ 2) + (hPow : (∑ z : DistinctPairs F,strength (pencilLines x F) (radialWeight x X δ) z^k) ≤ M) : + B*(1+branchingBound (V := Fin p) (B := Fin R) + (fun z : F × Fin p => pencilLines x F z.1) (fun l => L*radialWeight x X δ l) + B b (2*(L:ℝ)) k 0 (N₂*p) false) ≤ + highCertificateMajorant Q M B b L p R k N₂ := by + have hmass (H : F) : (∑ l∈pencilLines x F H,((L*radialWeight x X δ l:ℝ≥0):ℝ)) ≤ 2*(L:ℝ) := by + have hh := mul_le_mul_of_nonneg_left (hm H) L.coe_nonneg + simpa only [mass,NNReal.coe_mul,Finset.mul_sum,mul_comm (L:ℝ) 2] using hh + have hQ0 : 0 ≤ Q := (Nat.cast_nonneg F.card).trans hQ + have hpair := SingletonEnumeration.pairMoment_labelled_le (V := Fin p) (B := Fin R) + (pencilLines x F) (fun l => L*radialWeight x X δ l) k (2*(L:ℝ)) (by positivity) hmass + simp only [Fintype.card_fin,Fintype.card_coe] at hpair + rw [certificate_pair_eq_power] at hpair + have hpair' : pairMoment (B := Fin R) (fun z : F × Fin p => pencilLines x F z.1) + (fun l => L*radialWeight x X δ l) k ≤ + (p:ℝ)^2*(((R:ℝ)*(L:ℝ))^k*M+Q*((R:ℝ)*(2*(L:ℝ)))^k) := by + apply hpair.trans + gcongr + unfold highCertificateMajorant + apply mul_le_mul_of_nonneg_left _ hB.le + apply add_le_add_right + unfold branchingBound uniformAnchorBudget + simp only [Bool.false_eq_true,ite_false,add_zero,Fintype.card_fin,Fintype.card_prod,Fintype.card_coe, + Nat.cast_mul] + gcongr + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/TreeFailure.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/TreeFailure.lean new file mode 100644 index 0000000000000000000000000000000000000000..9b9ecf9718c9c4d8cd9db519d4e183eacaf1b932 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/TreeFailure.lean @@ -0,0 +1,78 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.OriginalReadiness +import OAI.Combinatorics.RamseyFive.Entropy.MeanTreeFailure + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +local instance (priority := high) actualTreeFailurePropDecidable (P : Prop) : Decidable P := Classical.propDecidable P +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] +variable (f : PivotContext K V → FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V → FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) +variable {I : Type} [Fintype I] [DecidableEq I] + {A B : I → Type} [∀ i, Fintype (A i)] [∀ i, Fintype (B i)] + +noncomputable def orientedPivotSuccessAt + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ : I → Finset (ℙ K V)) (B₀ : I → Finset (ℙ K (Dual K V))) + (hA₀ : ∀ i, (A₀ i).Nonempty) (hB₀ : ∀ i, (B₀ i).Nonempty) + (c δ τ P : ℝ) (hδ : 0<δ) (b : BinaryTree I) (ω : OrientedPivotTreeTape f r b) + (C : PivotContext K V) (j : Address b) : Option Unit := + successAt (fun _ : I => OrientedPivotTape f r) (fun _ : I => OrientedPivotMessage f r) + (fun _ : I => orientedPivotLeft f r) (fun _ : I => orientedPivotRight f r) + (fun i C t => orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c δ τ P hδ t) b ω C j + +theorem oriented_original_tree_missing + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (μ : ∀ i, Law (A i)) (ν : ∀ i, Law (B i)) + (X : ∀ i, A i → Finset (ℙ K V)) (Y : ∀ i, B i → Finset (ℙ K (Dual K V))) + (hX : ∀ i a, (X i a).Nonempty) (hY : ∀ i b, (Y i b).Nonempty) + (p : I → Law (ℙ K V)) (q : I → Law (ℙ K (Dual K V))) + (L : ℝ) (hL : 0≤L) + (hμ : ∀ i a, (∑ s, μ i s * uniformWeight (X i s) a) ≤ L*p i a) + (hν : ∀ i b, (∑ t, ν i t * uniformWeight (Y i t) b) ≤ L*q i b) + (c δ τ P : ℝ) (hc : 0 orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd.le + (X i a) C.1 (Y i b) C.2 (hX i a) (hY i b) c δ τ P hδ t = none)) ≤ ε i) + (tree : BinaryTree I) (j : Address tree) : + (∑ z, originalLevelLaw μ ν z * eventMass (orientedPivotTreeLaw f r tree) + (Finset.univ.filter (fun ω => + orientedPivotSuccessAt f r σ hσ hq hd.le (fun i => X i (z.1 i)) (fun i => Y i (z.2 i)) + (fun i => hX i _) (fun i => hY i _) c δ τ P hδ tree ω (Finset.univ,Finset.univ) j = none))) ≤ + pathSum tree (fun k => + 10 * pathBudget (fun i => (50*(Nat.card K:ℝ)/(9*(c*δ))) * L^2 * + relationMass Incident (p (label tree k)) (q i)) (fun _ => 0) tree k + + 10 * pathBudget (fun _ => 0) (fun i => (50*(Nat.card K:ℝ)/(9*(c*δ))) * L^2 * + relationMass Incident (p i) (q (label tree k))) tree k + + ((Nat.card K:ℝ)/τ)*L^2*relationMass Incident (p (label tree k)) (q (label tree k)) + ε (label tree k)) j := by + let Ω := fun _ : I => OrientedPivotTape f r + let M := fun _ : I => OrientedPivotMessage f r + let l := fun _ : I => orientedPivotLeft f r + let rt := fun _ : I => orientedPivotRight f r + let tape := fun (_ : I) C => orientedNodeTapeLaw (f C) (r C) (1000*(Nat.card K)^2) (Nat.card K) + let enc := fun (z : (∀ i, A i) × (∀ i, B i)) i C t => + orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd.le + (X i (z.1 i)) C.1 (Y i (z.2 i)) C.2 (hX i _) (hY i _) c δ τ P hδ t + let ready := fun (z : (∀ i, A i) × (∀ i, B i)) i (C : PivotContext K V) => + OriginalNodeReady (X i (z.1 i)) C.1 (Y i (z.2 i)) C.2 (9/10) τ + apply mean_missing_mass_le Ω M l rt (originalLevelLaw μ ν) enc tree + intro k + have hh := mean_reached_abort Ω M l rt (originalLevelLaw μ ν) enc tape ready ε hε + (fun z i C h => hlocal i (z.1 i) (z.2 i) C h) tree (Finset.univ,Finset.univ) k + have hr := oriented_level_not_ready f r σ hσ hq hd hq3 μ ν X Y hX hY p q L hL hμ hν + c δ τ P hc hc9 hδ hτ hτpos tree k + exact hh.trans (add_le_add_left hr _) +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/TreeShape.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/TreeShape.lean new file mode 100644 index 0000000000000000000000000000000000000000..55b67c8b6ece41e5cfbc66bdd2348eecf12703c3 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/TreeShape.lean @@ -0,0 +1,64 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Trees.TreeOrder + +namespace OAI + +namespace SharpRamseyFive.TreeCodec +open BinaryTree +open scoped Classical +variable {I J : Type*} +lemma inorder_map (g : I→J) (b : BinaryTree I) : + PivotTree.inorder (b.map g)=(PivotTree.inorder b).map g := by + induction b with + | nil=>rfl + | node a l r ihl ihr=>simp only [BinaryTree.map,PivotTree.inorder,List.map_append, + List.map_cons,ihl,ihr] + +lemma address_card (b : BinaryTree I) : Fintype.card (Address b)=b.numNodes := by + induction b with + | nil=>rfl + | node a l r ihl ihr=> + have he : Fintype.card (Address (.node a l r)) = Fintype.card (Unit ⊕ (Address l ⊕ Address r)) := + Fintype.card_congr (Equiv.refl _) + rw [he,Fintype.card_sum,Fintype.card_sum,Fintype.card_unit,ihl,ihr] + simp only [BinaryTree.numNodes] + omega +end SharpRamseyFive.TreeCodec +namespace SharpRamseyFive.PivotTree +open TreeCodec +open scoped Classical +noncomputable section + +def finiteRank (n : ℕ) (j : Address (finiteBalanced n)) : Fin n := + ⟨(label (finiteBalanced n) j).val,finiteBalanced_label_lt n j⟩ + +lemma finiteRank_surjective (n : ℕ) : Function.Surjective (finiteRank n) := by + intro i + let a : Fin (n+1):=⟨i.val,Nat.lt_succ_of_lt i.isLt⟩ + have ha : a∈inorder (finiteBalanced n) := by + rw [finiteBalanced,inorder_map,balanced_inorder] + apply List.mem_map.mpr + refine ⟨i.val,?_,?_⟩ + · rw [List.mem_range'] + exact ⟨i.val,i.isLt,by simp⟩ + · apply Fin.ext + exact min_eq_left i.isLt.le + obtain ⟨j,hj⟩:=exists_address_of_mem (finiteBalanced n) a ha + refine ⟨j,?_⟩ + apply Fin.ext + exact congrArg (fun a : Fin (n+1)=>a.val) hj + +def finiteRankEquiv (n : ℕ) : Address (finiteBalanced n) ≃ Fin n := + Equiv.ofBijective (finiteRank n) ((Fintype.bijective_iff_surjective_and_card (finiteRank n)).mpr + ⟨finiteRank_surjective n,by rw [address_card,finiteBalanced_nodes,Fintype.card_fin]⟩) + +@[simp] lemma finiteRankEquiv_apply (n : ℕ) (j : Address (finiteBalanced n)) : + finiteRankEquiv n j=finiteRank n j := rfl + +lemma finiteRankEquiv_label (n : ℕ) (j : Fin n) : + (label (finiteBalanced n) ((finiteRankEquiv n).symm j)).val=j.val := by + exact congrArg Fin.val ((finiteRankEquiv n).apply_symm_apply j) +end +end SharpRamseyFive.PivotTree + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/TreeTrims.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/TreeTrims.lean new file mode 100644 index 0000000000000000000000000000000000000000..e648c7390a918a648e29ad03bf5806bd8be5e6d5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/TreeTrims.lean @@ -0,0 +1,91 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.OrientedPivotTree +import OAI.Combinatorics.RamseyFive.Trees.TreeOriginalTrims +import OAI.Combinatorics.RamseyFive.Entropy.Swap +import OAI.Combinatorics.RamseyFive.Trees.TreeDecoder + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] +variable (f : PivotContext K V → FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V → FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) +variable {I : Type} + +noncomputable def orientedPivotContextAt + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (A₀ : I → Finset (ℙ K V)) (B₀ : I → Finset (ℙ K (Dual K V))) + (hA₀ : ∀ i, (A₀ i).Nonempty) (hB₀ : ∀ i, (B₀ i).Nonempty) + (c δ τ P : ℝ) (hδ : 0<δ) (b : BinaryTree I) (ω : OrientedPivotTreeTape f r b) + (C : PivotContext K V) (j : Address b) : Option (PivotContext K V) := + contextAt (fun _ : I => OrientedPivotTape f r) (fun _ : I => OrientedPivotMessage f r) + (fun _ : I => orientedPivotLeft f r) (fun _ : I => orientedPivotRight f r) + (fun i C t => orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c δ τ P hδ t) b ω C j + +theorem oriented_original_point_trim + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (A₀ : I → Finset (ℙ K V)) (B₀ : I → Finset (ℙ K (Dual K V))) + (hA₀ : ∀ i, (A₀ i).Nonempty) (hB₀ : ∀ i, (B₀ i).Nonempty) + (c δ τ P : ℝ) (hc : 0 ∃ C, + orientedPivotContextAt f r σ hσ hq hd.le A₀ B₀ hA₀ hB₀ c δ τ P hδ b ω + (Finset.univ,Finset.univ) j = some C ∧ + ((X ∩ C.1).card : ℝ) < (9/10:ℝ)*X.card)) ≤ + 10 * pathBudget (fun i => (50*(Nat.card K:ℝ)/(9*(c*δ))) * + relationMass (fun b a => Incident a b) (uniformWeight (B₀ i)) (uniformWeight X)) + (fun _ => 0) b j := by + let Ω := fun _ : I => OrientedPivotTape f r + let M := fun _ : I => OrientedPivotMessage f r + let p := fun (_ : I) C => orientedNodeTapeLaw (f C) (r C) (1000*(Nat.card K)^2) (Nat.card K) + let out : ∀ i C t, M i C t → Finset (ℙ K V) × Finset (ℙ K (Dual K V)) := + fun _ C t m => (orientedNodeDecoded (f C) (r C) C.1 C.2 (1000*(Nat.card K)^2) (Nat.card K) t m).swap + let enc : ∀ i C t, Option (M i C t) := fun i C t => + orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd.le + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c δ τ P hδ t + apply first_original_trim Ω p M out enc X + · intro i + apply mul_nonneg (by positivity) + exact relationMass_nonneg _ _ _ (uniformWeight_nonneg _) (uniformWeight_nonneg _) + · intro i C + exact oriented_point_cap_eviction (f C) (r C) σ hσ hq hd hq3 + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c δ τ P hc hc9 hδ hτ X + +theorem oriented_original_dual_trim + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (A₀ : I → Finset (ℙ K V)) (B₀ : I → Finset (ℙ K (Dual K V))) + (hA₀ : ∀ i, (A₀ i).Nonempty) (hB₀ : ∀ i, (B₀ i).Nonempty) + (c δ τ P : ℝ) (hc : 0 ∃ C, + orientedPivotContextAt f r σ hσ hq hd.le A₀ B₀ hA₀ hB₀ c δ τ P hδ b ω + (Finset.univ,Finset.univ) j = some C ∧ + ((X ∩ C.2).card : ℝ) < (9/10:ℝ)*X.card)) ≤ + 10 * pathBudget (fun _ => 0) + (fun i => (50*(Nat.card K:ℝ)/(9*(c*δ))) * + relationMass Incident (uniformWeight (A₀ i)) (uniformWeight X)) b j := by + let Ω := fun _ : I => OrientedPivotTape f r + let M := fun _ : I => OrientedPivotMessage f r + let p := fun (_ : I) C => orientedNodeTapeLaw (f C) (r C) (1000*(Nat.card K)^2) (Nat.card K) + let out : ∀ i C t, M i C t → Finset (ℙ K V) × Finset (ℙ K (Dual K V)) := + fun _ C t m => (orientedNodeDecoded (f C) (r C) C.1 C.2 (1000*(Nat.card K)^2) (Nat.card K) t m).swap + let enc : ∀ i C t, Option (M i C t) := fun i C t => + orientedGuardedNodeEncoded (f C) (r C) σ hσ hq hd.le + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c δ τ P hδ t + apply second_original_trim Ω p M out enc X + · intro i + apply mul_nonneg (by positivity) + exact relationMass_nonneg _ _ _ (uniformWeight_nonneg _) (uniformWeight_nonneg _) + · intro i C + exact oriented_dual_cap_eviction (f C) (r C) σ hσ hq hd hq3 + (A₀ i) C.1 (B₀ i) C.2 (hA₀ i) (hB₀ i) c δ τ P hc hc9 hδ hτ X + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/TwoAmbientCaps.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/TwoAmbientCaps.lean new file mode 100644 index 0000000000000000000000000000000000000000..2e6bf5e896be6fb106825137cbfd4a4d1bc791be --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/TwoAmbientCaps.lean @@ -0,0 +1,184 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.PredictorReverseCap +import OAI.Combinatorics.RamseyFive.Probability.AmbientPublicTest + +namespace OAI + + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def nextAmbientCapLaw (A UA : Finset (ℙ K V)) + (B UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) + (nA : ℕ) (q MA MB : ℝ) (Y : Option (Finset (ℙ K (Dual K V)))) : + Law (Option (Finset (ℙ K V))) := + match Y with + | none => pureLaw none + | some Y => if hY : ValidCap B UB MB (UB∩Y) then + ambientCapLaw Incident A UA (B∩(UB∩Y)) (UB∩Y) + ((hY.source_nonempty hB).mono Finset.inter_subset_right) nA q MA + else pureLaw none + +theorem geometric_two_ambient_caps {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (hq : 3≤Nat.card K) (A UA : Finset (ℙ K V)) (hA : A.Nonempty) (hAU : A⊆UA) + (B UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) (hBU : B⊆UB) + (W : Finset (ℙ K V)) (hW : W.Nonempty) (c : ℝ) (hc : 0Incident a b) B UB (A∩W) W hW nB q MB + let p := adaptiveLaw firstCap (nextAmbientCapLaw A UA B UB hB nA q MA MB) + eventMass p (Finset.univ.filter fun caps=>caps.1=none ∨ caps.2=none)≤2*Real.exp (-q) ∧ + first p=firstCap ∧ + (∀Y,0 < firstCap (some Y) → ValidCap B UB MB (UB∩Y)) ∧ + (∀Y Z,0 < p (some Y,some Z) → ValidCap B UB MB (UB∩Y) ∧ ValidCap A UA MA (UA∩Z)) := by + dsimp only + let q : ℝ := Nat.card K + let MA := (320/((9:ℝ)/10)+320)*q^(d+1)/B.card + let MB := (320/c+320)*q^(d+1)/A.card + let firstCap := ambientCapLaw (fun b a=>Incident a b) B UB (A∩W) W hW nB q MB + let next := nextAmbientCapLaw A UA B UB hB nA q MA MB + have hC : (A∩W).Nonempty := by + apply Finset.card_pos.mp + have ha : (0:ℝ) + adaptiveLaw (baseTableLaw UT P τ R L₀) (fun _=>universalFreshLaw (ℙ K (Dual K V)) H q)) +noncomputable def twoPublicDecoded (U : Finset (ℙ K V)) (UT : Finset (ℙ K (Dual K V))) + (P τ : ℝ) (H : ℕ) (q : ℝ) (t : TwoPublicTape U UT P τ H q) : + TwoPublicMessage U UT P τ H q t→Finset (ℙ K V) + | Sum.inl m => t.1 m + | Sum.inr m => reversedBaseDecoded U UT P τ H q t.2 m +noncomputable def twoPublicEncoded (S U : Finset (ℙ K V)) + (T UT : Finset (ℙ K (Dual K V))) (P τ : ℝ) (H : ℕ) (n : Fin (H+1)) (q MA MB : ℝ) + (t : TwoPublicTape U UT P τ H q) : Option (TwoPublicMessage U UT P τ H q t) := + if S.card≤T.card then (baseFiniteEncoded S U P τ t.1).map Sum.inl else + (reversedBaseEncoded S U T UT P τ H n q MA MB t.2).map Sum.inr + +omit [Finite K] [FiniteDimensional K V] in +theorem twoPublic_output_law (S U : Finset (ℙ K V)) + (T UT : Finset (ℙ K (Dual K V))) (hT : T.Nonempty) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) (H : ℕ) (n : Fin (H+1)) (q MA MB : ℝ) : + map (twoPublicLaw U UT P τ R L₀ H q) + (fun t=>(twoPublicEncoded S U T UT P τ H n q MA MB t).map (twoPublicDecoded U UT P τ H q t))= + if S.card≤T.card then baseCaptureLaw S U P τ R L₀ else + optionCompose (baseCaptureLaw T UT P τ R L₀) (nextCapLaw S U T UT hT n q MA MB) := by + by_cases h : S.card≤T.card + · simp only [twoPublicEncoded,ite_eq_left h,Option.map_map,twoPublicDecoded,Function.comp_def] + rw [twoPublicLaw] + exact (map_independent_left _ _ (fun t : BaseTable U P τ=>(baseFiniteEncoded S U P τ t).map t)).trans + (baseFinite_law S U P τ R L₀) + · simp only [twoPublicEncoded,ite_eq_right h,Option.map_map,twoPublicDecoded,Function.comp_def] + rw [twoPublicLaw] + exact (map_independent_right _ _ (fun t : ReversedBaseTape UT P τ H q=> + (reversedBaseEncoded S U T UT P τ H n q MA MB t).map (reversedBaseDecoded U UT P τ H q t))).trans + (reversedBase_law S U T UT hT P τ R L₀ H n q MA MB) + +omit [Finite K] [FiniteDimensional K V] in +theorem twoPublic_oriented (S U : Finset (ℙ K V)) + (T UT : Finset (ℙ K (Dual K V))) (hT : T.Nonempty) + (P τ : ℝ) (R : ℕ) (L₀ : ℝ≥0) (H : ℕ) + (hn : reverseLength (Nat.card K) (Real.log ((U.card:ℝ)/S.card))≤H) : + map (twoPublicLaw U UT P τ R L₀ H (Nat.card K)) + (fun t=>(twoPublicEncoded S U T UT P τ H ⟨_,Nat.lt_succ_of_le hn⟩ (Nat.card K) + ((320/((9:ℝ)/10)+320)*(Nat.card K:ℝ)^3/T.card) ((T.card:ℝ)*Real.exp (2*P)) t).map + (twoPublicDecoded U UT P τ H (Nat.card K) t))=twoOrientedLaw S U T UT hT P τ R L₀ := by + rw [twoPublic_output_law S U T UT hT] + rfl +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/TwoPublic.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/TwoPublic.lean new file mode 100644 index 0000000000000000000000000000000000000000..17a6e916b1c1039873789917febfbd7f36063ad6 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/TwoPublic.lean @@ -0,0 +1,199 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.BaseFiniteCost + +namespace OAI + + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence FiniteEntropy ReverseCap Filter ParameterHierarchy +open scoped Classical LinearAlgebra.Projectivization NNReal Topology + +theorem eventually_two_public_complete {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [∀x : ℙ K V,Fintype (RadialLine x)] + [∀x : ℙ K (Dual K V),Fintype (RadialLine x)], + ∀ (S U : Finset (ℙ K V)) (T UT : Finset (ℙ K (Dual K V))) (_hT : T.Nonempty), + finrank K V=3 → (Nat.card K:ℝ)=Real.exp σ → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b → b≤Cb*D*σ^(6*beta η) → + 0<τ → τ≤σ^(-200*beta η) → S.Nonempty → S⊆U → T⊆UT → + (Nat.card K:ℝ)*(incidences S T:ℝ)≤τ*S.card*T.card → + (Nat.card K:ℝ)^3*Real.exp (-b)≤(S.card:ℝ)*T.card → + ∃ n : Fin (1000*(Nat.card K)^2+1), + n.val=reverseLength (Nat.card K) (Real.log ((U.card:ℝ)/S.card)) ∧ + let P₀ := P η σ D R + let H := 1000*(Nat.card K)^2 + let encode := twoPublicEncoded S U T UT P₀ τ H n (Nat.card K) + ((320/((9:ℝ)/10)+320)*(Nat.card K:ℝ)^3/T.card) ((T.card:ℝ)*Real.exp (2*P₀)) + let decode := twoPublicDecoded U UT P₀ τ H (Nat.card K) + let p := map (twoPublicLaw U UT P₀ τ R L₀ H (Nat.card K)) + (fun t=>(encode t).map (decode t)) + p none≤2*Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

(twoPublicDecoded US UT₀ P₀ (Real.sqrt τ) H (Nat.card K) t m).map (flatEmbedding A) + let p := map (twoPublicLaw US UT₀ P₀ (Real.sqrt τ) R L₀ H (Nat.card K)) + (fun t=>(encode t).map (decode t)) + p none≤2*Real.exp (-(Nat.card K:ℝ)) ∧ + (∀W,0

(twoPublicEncoded S US T₀ UT₀ (P η σ D R) (Real.sqrt τ) (1000*(Nat.card K)^2) n (Nat.card K) + ((320/((9:ℝ)/10)+320)*(Nat.card K:ℝ)^3/T₀.card) ((T₀.card:ℝ)*Real.exp (2*P η σ D R)) t).map + (twoPublicDecoded US UT₀ (P η σ D R) (Real.sqrt τ) (1000*(Nat.card K)^2) (Nat.card K) t))) + (fun Z=>Z.map (flatEmbedding A)) + rw [FiniteEntropy.map_comp] at hm + simpa only [Function.comp_def,Option.map_map] using hm.le.trans hfail + · intro W hW + let tape := twoPublicLaw US UT₀ (P η σ D R) (Real.sqrt τ) R L₀ (1000*(Nat.card K)^2) (Nat.card K) + let encode := twoPublicEncoded S US T₀ UT₀ (P η σ D R) (Real.sqrt τ) (1000*(Nat.card K)^2) n (Nat.card K) + ((320/((9:ℝ)/10)+320)*(Nat.card K:ℝ)^3/T₀.card) ((T₀.card:ℝ)*Real.exp (2*P η σ D R)) + let decode := twoPublicDecoded US UT₀ (P η σ D R) (Real.sqrt τ) (1000*(Nat.card K)^2) (Nat.card K) + let pp := map tape (fun t=>(encode t).map (decode t)) + have hw' : 0 < map pp (Option.map fun Z=>Z.map (flatEmbedding A)) (some W) := by + dsimp only [pp] + rw [FiniteEntropy.map_comp] + simpa only [Function.comp_def,Option.map_map] using hW + obtain ⟨Z,hZ,he⟩ := map_positive pp (Option.map fun Z=>Z.map (flatEmbedding A)) (some W) hw' + cases Z with + | none => simp at he + | some Z => + have he' : Z.map (flatEmbedding A)=W := Option.some.inj he + subst W + have hz := hgood Z hZ + obtain ⟨hu,hcard,hcap⟩ := section_decoder A X UX Z hz.1 + refine ⟨hu,?_,?_⟩ + · rw [hcard] + exact hz.2.1.trans (mul_le_mul_of_nonneg_right (by exact_mod_cast hsX) (Real.exp_pos _).le) + · rw [hcap,Finset.inter_comm] + have hc := hz.2.2 + nlinarith only [hc,hxs] + · intro t m hm + have hc := hcost t m hm + have hP : 1≤P η σ D R := + (Real.one_le_rpow hσ (mul_nonneg (by norm_num) (beta_pos hη).le)).trans + (finite_bounds hη hη' hσ hr).2.2.2.2.2.1 + have hlog : Real.log (400*(Nat.log 2 M+1:ℝ))≤P η σ D R := hov.2.1 + have h100 : Real.log (100:ℝ)≤P η σ D R := (Real.log_le_log (by norm_num) (by + have hn : (0:ℝ)≤Nat.log 2 M := by positivity + linarith : (100:ℝ)≤400*(Nat.log 2 M+1:ℝ))).trans hlog + have h4 : Real.log (4*(Nat.log 2 M+1:ℝ))≤P η σ D R := + (Real.log_le_log (by positivity) (by + have hn : (0:ℝ)≤Nat.log 2 M := by positivity + linarith : (4:ℝ)*(Nat.log 2 M+1)≤400*(Nat.log 2 M+1:ℝ))).trans hlog + have hgX : 0≤Real.log ((UX.card:ℝ)/X.card) := Real.log_nonneg + ((le_div_iff₀ (by exact_mod_cast hX.card_pos)).mpr (by + simpa using (show (X.card:ℝ)≤UX.card by exact_mod_cast Finset.card_le_card hXU))) + have hgT : 0≤Real.log ((UT.card:ℝ)/T.card) := Real.log_nonneg + ((le_div_iff₀ (by exact_mod_cast hT.card_pos)).mpr (by + simpa using (show (T.card:ℝ)≤UT.card by exact_mod_cast Finset.card_le_card hTU))) + have hsum : Real.log ((US.card:ℝ)/S.card)+Real.log ((UT₀.card:ℝ)/T₀.card)+P η σ D R≤ + 3*(Real.log ((UX.card:ℝ)/X.card)+Real.log ((UT.card:ℝ)/T.card)+P η σ D R) := by + simp only [Nat.cast_add,Nat.cast_one] at hgap + change _≤Real.log ((UT.card:ℝ)/T.card)+Real.log (4*(Nat.log 2 M+1:ℝ)) at hgap + change _≤Real.log ((UX.card:ℝ)/X.card)+Real.log (100:ℝ) at hsgap + linarith + have hm' := mul_le_mul_of_nonneg_left hsum + (by positivity : (0:ℝ)≤1300*(Nat.card K:ℝ)*P η σ D R) + have hpos : 0≤(Nat.card K:ℝ)*P η σ D R* + (Real.log ((UX.card:ℝ)/X.card)+Real.log ((UT.card:ℝ)/T.card)+P η σ D R) := by positivity + nlinarith only [hc,hm',hpos] +end SharpRamseyFive.ProjectiveRestriction + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/TwoPublicCaps.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/TwoPublicCaps.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc562ad0c4ecb6ec7467802effcfb7eff4328a03 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/TwoPublicCaps.lean @@ -0,0 +1,99 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.PredictorReverseCap +import OAI.Combinatorics.RamseyFive.Probability.PublicCapLaw + +namespace OAI + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def nextCapLaw (A UA : Finset (ℙ K V)) + (B UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) + (nA : ℕ) (q MA MB : ℝ) (Y : Option (Finset (ℙ K (Dual K V)))) : + Law (Option (Finset (ℙ K V))) := + match Y with + | none => pureLaw none + | some Y => if hY : ValidCap B UB MB Y then + publicCapLaw Incident A UA (B∩Y) Y + ((hY.source_nonempty hB).mono Finset.inter_subset_right) nA q MA + else pureLaw none + +theorem geometric_two_public_caps {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (hq : 3≤Nat.card K) (A UA : Finset (ℙ K V)) (hA : A.Nonempty) (hAU : A⊆UA) + (B UB : Finset (ℙ K (Dual K V))) (hB : B.Nonempty) (hBU : B⊆UB) + (W : Finset (ℙ K V)) (hW : W.Nonempty) (c : ℝ) (hc : 0Incident a b) B UB (A∩W) W hW nB q MB + let p := adaptiveLaw firstCap (nextCapLaw A UA B UB hB nA q MA MB) + eventMass p (Finset.univ.filter fun caps=>caps.1=none ∨ caps.2=none)≤2*Real.exp (-q) ∧ + first p=firstCap ∧ + (∀Y,0 < firstCap (some Y) → ValidCap B UB MB Y) ∧ + (∀Y Z,0 < p (some Y,some Z) → ValidCap B UB MB Y ∧ ValidCap A UA MA Z) := by + dsimp only + let q : ℝ := Nat.card K + let MA := (320/((9:ℝ)/10)+320)*q^(d+1)/B.card + let MB := (320/c+320)*q^(d+1)/A.card + let firstCap := publicCapLaw (fun b a=>Incident a b) B UB (A∩W) W hW nB q MB + let next := nextCapLaw A UA B UB hB nA q MA MB + have hC : (A∩W).Nonempty := by + apply Finset.card_pos.mp + have ha : (0:ℝ) C a∪C b) (pointStrength S) + (((pointStrength S:ℝ)*2^i)/2) Lines Q + ((Nat.card K:ℝ)^4/S.card^2*Real.exp (P η σ D R/100)/ + (((pointStrength S:ℝ)*2^i)/2)^100)) → + ((∑z : WeightedPrograms.DistinctPairs F,WeightedPrograms.strength (pencilLines x F) + (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) z^200)≤ + dyadFactor (outsideAt x S (C a∪C b)).card (P η σ D R/100)* + (geometryScale (Nat.card K) S.card)^2) → + x∉GlobalRadial.badCenters S (fun _ => C a∪C b) (pointStrength S) + ((1/(100*(momentOrder σ (P η σ D R):ℝ)))/2) Lines Q 1 → + geometryScale (Nat.card K) S.card*Real.exp (-(b₀+8*P η σ D R*τ+Real.log 16))/10≤t → + (scheduleMeasure (fun _ : S => L₀*pointStrength S) R).real + {ω | Unsampled x S ω ∧ t < |pointScore S (C a∪C b) F + (Real.exp (-(L₀:ℝ)*(1-ownFraction S (C a) (C b)))) ω|} ≤ + (Nat.card K:ℝ)^(-(50:ℝ))+ + ∫ω,1-HighMoment.allTrunc R 5000 ω + ∂batchMeasure (fun i : Fin R×RadialLine x => L₀* + radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S) i.2) := by + have hh := eventually_high_geometric_budget hη hη' + have hl := eventually_high_local_budget hη hη' + have ho := eventually_moment_orders hη hη' + have hm := ParameterHierarchy.eventually_score_margins hη hη' Cb hCb + filter_upwards [eventually_ge_atTop (100:ℝ),hh,hl,ho,hm] with σ hσ hh hl ho hm + intro D b₀ τ R L₀ K V _ _ _ _ _ _ _ x _ J _ S C a b c F t hdim hq hr hL hb₀ hbhi hτ hS + ha hb hc hSn hShigh hn hf hF hx Lines Q hLines hxQ hgood hPow hstrong ht + have hsn : (0:ℝ) (hF H hH).1) hb0 heven ht0 hmoment + have hpoly := ScoreScalars.high_tail_polynomial hB + (by exact_mod_cast (Nat.card_pos (α:=K)) : (0:ℝ) L₀*pointStrength S) R) + ?_ (measure_ne_top _ _)).trans (hprob.trans (add_le_add hpoly (le_refl _))) + intro ω hω + exact ⟨hω.1,ht.trans_lt hω.2⟩ + +end + +section +open Filter ParameterHierarchy +open scoped Topology + +theorem eventually_local_trunc_scalar_retained {η : ℝ} (hη : 0<η) (hη' : η<1/10) : + ∀ᶠ σ : ℝ in atTop,∀ D R g : ℝ,Range η σ D R → P η σ D R/20000≤g → + localTruncConstant*σ*(P η σ D R)^5000* + Real.exp (P η σ D R/100-4901*g)≤1 := by + have hab := eventually_power_absorption hη hη' localTruncConstant 5001 (1/10) + localTruncConstant_pos (by norm_num) (by norm_num) + have hs := eventually_hierarchy hη hη' 0 1 0 (by norm_num) (by norm_num) + filter_upwards [eventually_ge_atTop (1:ℝ),hab,hs] with σ hσ hab hs + intro D R g hr hg + have hp := (finite_bounds hη hη' hσ hr).2.2.2.2.2.1 + have hP0 : 0≤P η σ D R := (Real.rpow_nonneg (by linarith) _).trans hp + have hPσ : P η σ D R≤σ := by + have hh := hs D R 0 0 hr (by simp) (Real.rpow_nonneg (by linarith) _) + simpa only [one_mul] using hh.2.1 + have hc : localTruncConstant*σ*(P η σ D R)^5000≤Real.exp (P η σ D R/10) := by + calc + _ ≤ localTruncConstant*σ*σ^5000 := mul_le_mul_of_nonneg_left + (pow_le_pow_left₀ hP0 hPσ _) (mul_nonneg localTruncConstant_pos.le (by linarith)) + _ = localTruncConstant*σ^(5001:ℕ) := by rw [show σ^(5001:ℕ)=σ^5000*σ from pow_succ σ 5000]; ac_rfl + _ ≤ _ := by + have hh := hab D R hr + rw [show σ^(5001:ℝ)=σ^(5001:ℕ) from Real.rpow_natCast σ 5001] at hh + simpa only [one_div,one_mul,div_eq_mul_inv,mul_comm (10⁻¹:ℝ)] using hh + calc + _ ≤ Real.exp (P η σ D R/10)*Real.exp (P η σ D R/100-4901*g) := + mul_le_mul_of_nonneg_right hc (Real.exp_nonneg _) + _ = Real.exp (P η σ D R/10+(P η σ D R/100-4901*g)) := (Real.exp_add ..).symm + _ ≤ 1 := Real.exp_le_one_iff.mpr (by linarith) + +theorem eventually_high_local_budget_retained {η : ℝ} (hη : 0<η) (hη' : η<1/10) : + ∀ᶠ σ : ℝ in atTop,∀ (q m : ℕ) (n D : ℝ) (R : ℕ), + (q:ℝ)=Real.exp σ → 0 C a∪C b) (pointStrength S) + (((pointStrength S:ℝ)*2^i)/2) Lines Q + ((Nat.card K:ℝ)^4/S.card^2*Real.exp (P η σ D R/100)/ + (((pointStrength S:ℝ)*2^i)/2)^100)) → + ((∑z : WeightedPrograms.DistinctPairs F,WeightedPrograms.strength (pencilLines x F) + (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) z^200)≤ + dyadFactor (outsideAt x S (C a∪C b)).card (P η σ D R/100)* + (geometryScale (Nat.card K) S.card)^2) → + x∉GlobalRadial.badCenters S (fun _ => C a∪C b) (pointStrength S) + ((1/(100*(momentOrder σ (P η σ D R):ℝ)))/2) Lines Q 1 → + geometryScale (Nat.card K) S.card*Real.exp (-(b₀+8*P η σ D R*τ+Real.log 16))/10≤t → + (scheduleMeasure (fun _ : S => L₀*pointStrength S) R).real + {ω | Unsampled x S ω ∧ t < |pointScore S (C a∪C b) F + (Real.exp (-(L₀:ℝ)*(1-ownFraction S (C a) (C b)))) ω|} ≤ + (Nat.card K:ℝ)^(-(50:ℝ))+ + ∫ω,1-HighMoment.allTrunc R 5000 ω + ∂batchMeasure (fun i : Fin R×RadialLine x => L₀* + radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S) i.2) := by + have hh := eventually_high_geometric_budget hη hη' + have hl := eventually_high_local_budget_retained hη hη' + have ho := eventually_moment_orders hη hη' + have hm := ParameterHierarchy.eventually_score_margins hη hη' Cb hCb + filter_upwards [eventually_ge_atTop (100:ℝ),hh,hl,ho,hm] with σ hσ hh hl ho hm + intro D b₀ τ R L₀ K V _ _ _ _ _ _ _ x _ J _ S C a b c F t hdim hq hr hL hb₀ hbhi hτ hS + ha hb hc hSn hShigh hn hf hF hx Lines Q hLines hxQ hgood hPow hstrong ht + have hsn : (0:ℝ) (hF H hH).1) hb0 heven ht0 hmoment + have hpoly := ScoreScalars.high_tail_polynomial hB + (by exact_mod_cast (Nat.card_pos (α:=K)) : (0:ℝ) L₀*pointStrength S) R) + ?_ (measure_ne_top _ _)).trans (hprob.trans (add_le_add hpoly (le_refl _))) + intro ω hω + exact ⟨hω.1,ht.trans_lt hω.2⟩ + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Geometry/ValidationOriginalTailWide.lean b/lean/OAI/Combinatorics/RamseyFive/Geometry/ValidationOriginalTailWide.lean new file mode 100644 index 0000000000000000000000000000000000000000..cd41de7110dd477c9175db42f41124f64277bdc9 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Geometry/ValidationOriginalTailWide.lean @@ -0,0 +1,246 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Decoding.SumDiagonal +import OAI.Combinatorics.RamseyFive.Geometry.SampledPoints +import OAI.Combinatorics.RamseyFive.Geometry.MassHyperplane +import OAI.Combinatorics.RamseyFive.Geometry.AbsModifiedPointScore +import OAI.Combinatorics.RamseyFive.Probability.MomentTailRatio +import OAI.Combinatorics.RamseyFive.Entropy.ValidationBudgetWide + +namespace OAI + +noncomputable section +namespace SharpRamseyFive.ScoreGeometry + +section +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory ProbabilityTheory PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + (x : ℙ K V) [Fintype (RadialLine x)] + +theorem validation_original_tail_wide {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + {J : Type} [Fintype J] (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) + (hS : S.Nonempty) (a b c : J) (ha : C a⊆S) (hb : C b⊆S) (hc : C c=C a∩C b) + (F : Finset (ℙ K (Dual K V))) + (hF : ∀ H∈F,Incident x H ∧ H∉exceptional S C) + (hf : ownFraction S (C a) (C b)≤2/25) + (hn : (Nat.card K:ℝ)/S.card ≤1/100) + (L : ℝ≥0) (R : ℕ) (hR : 201≤R) + (hP : 100000≤(L:ℝ)*R) (hL : 1≤(L:ℝ)) + (hRsmall : (R:ℝ)≤((L:ℝ)*R)/100000) + (hLR : 100*(L:ℝ)≤(L:ℝ)*R) + (hlog : (R:ℝ)*Real.log (L:ℝ)≤((L:ℝ)*R)/100) + (hx : x∉irregular (d:=d) S C ((L:ℝ)/100)) + (hcard : (F.card:ℝ)≤400*(scale (K:=K) d S.card)^2) + (htail : ∀ u : ℝ,0 + u ≤ mass (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (pencilLines x F z.val.1∩pencilLines x F z.val.2)).card:ℝ)*u^200 ≤ + (scale (K:=K) d S.card)^2*Real.exp (((L:ℝ)*R)/50)) + {κ t : ℝ} (hκ : κ+Real.log 10≤((L:ℝ)*R)/20) + (ht : scale (K:=K) d S.card*Real.exp (-κ)/10≤t) : + (scheduleMeasure (fun _ : S => L*pointStrength S) R).real + {ω | Unsampled x S ω ∧ t < |pointScore S (C a∪C b) F + (Real.exp (-(L:ℝ)*(1-ownFraction S (C a) (C b)))) ω|} ≤ + Real.exp (-((L:ℝ)*R)/2) := by + let B : ℝ := scale (K:=K) d S.card + let θ := fun H H' : F => mass + (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (pencilLines x F H∩pencilLines x F H') + have hB : 0 mass_nonneg _ _ + have hθ2 : ∀H H',θ H H'≤2 := by + intro H H' + have hm := actual_radial_mass_bounds x S C hS a b c ha hb hc F hF hf hn + have hsub : θ H H' ≤ mass + (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) (pencilLines x F H) := + Finset.sum_le_sum_of_subset_of_nonneg (Finset.inter_subset_left) + (fun _ _ _ => NNReal.coe_nonneg _) + exact hsub.trans (by linarith only [(hm H).2.2]) + have hov := ValidationBounds.overlap_power_sum θ hθ0 hθ2 + (B^2*Real.exp (((L:ℝ)*R)/50)) (400*B^2) (by positivity) + (by simpa only [Fintype.card_coe] using hcard) 200 R hR (by + intro u hu hu2 + convert! htail u hu hu2 using 1 + congr 3 + ext z + simp only [Finset.mem_filter,Finset.mem_univ,true_and] + rfl) + have hs : (∑H:F,∑H'∈Finset.univ.erase H,θ H H'^R)≤∑H:F,∑H':F,θ H H'^R := by + apply Finset.sum_le_sum + intro H _ + exact Finset.sum_le_sum_of_subset_of_nonneg (Finset.erase_subset _ _) + (fun H' _ _ => pow_nonneg (hθ0 H H') R) + have hDS := ValidationBounds.validation_budget_wide hP hRsmall hLR + (40*B*Real.exp ((L:ℝ)/100)) _ (by positivity) + (by nlinarith only [mul_nonneg hB.le (Real.exp_pos ((L:ℝ)/100)).le]) (hs.trans hov) + have hv := actual_original_validation x hdim hd S C hS a b c ha hb hc F hF hf hn hξ hx + L hL R (by omega) + have hbudget := ValidationBounds.final_validation_budget_wide hP hL rfl hRsmall hlog + hcard (Nat.cast_nonneg F.card) hDS + have hm : (∫ω,(modifiedPointScore x S (C a∪C b) F + (Real.exp (-(L:ℝ)*(1-ownFraction S (C a) (C b)))) ω)^2 + ∂scheduleMeasure (fun _ : S => L*pointStrength S) R)≤B^2*Real.exp (-3*((L:ℝ)*R)/5) := + hv.trans hbudget + have hprob := unsampled_moment_tail x S (C a∪C b) (fun _ : S => L*pointStrength S) + F hb0 (show Even 2 by decide) ht0 hm + have herr := ScoreScalars.validation_tail_ratio hB hκ + apply (measureReal_mono (μ:=scheduleMeasure (fun _ : S => L*pointStrength S) R) + ?_ (measure_ne_top _ _)).trans (hprob.trans herr) + intro ω hω + exact ⟨hω.1,ht.trans_lt hω.2⟩ + +end + +open Module ProjectiveIncidence CellVariance ScoreRegularity +open MeasureTheory ProbabilityTheory PoissonScore +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] in +lemma typicalFailures_mono (U S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (E : Finset (ℙ K (Dual K V))) (b : ℙ K V→ℝ) {s t : ℝ} (hst : s≤t) + {R : ℕ} (ω : Fin R→S→ℕ) : typicalFailures U S O E b t ω⊆typicalFailures U S O E b s ω := by + intro x hx + obtain ⟨hx,hu,ht⟩ := Finset.mem_filter.mp hx + exact Finset.mem_filter.mpr ⟨hx,hu,hst.trans_lt ht⟩ + +omit [Finite K] [FiniteDimensional K V] in +lemma integral_typicalFailures_tail (U S : Finset (ℙ K V)) (O : ℙ K V→Finset (ℙ K V)) + (E : Finset (ℙ K (Dual K V))) (b : ℙ K V→ℝ) (t : ℝ) {R : ℕ} (rate : S→ℝ≥0) + {B a : ℝ} (ha : 0 Nat.cast_nonneg (typicalFailures U S O E b t ω).card)) + (by + apply Integrable.of_bound (measurable_of_countable _).aestronglyMeasurable (U.card:ℝ) + exact Filter.Eventually.of_forall fun ω => by + rw [Real.norm_eq_abs,abs_of_nonneg (Nat.cast_nonneg _)] + exact Nat.cast_le.mpr (Finset.card_filter_le _ _)) a).trans hB + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma sampleMean_uniform (S : Finset (ℙ K V)) (hS : S.Nonempty) (L : ℝ≥0) (R : ℕ) : + (R:ℝ)*(∑_i:S,(L*pointStrength S:ℝ≥0):ℝ)=(Nat.card K:ℝ)*((L:ℝ)*R) := by + have hn : (S.card:ℝ)≠0 := (Nat.cast_pos.mpr hS.card_pos).ne' + simp only [NNReal.coe_mul,coe_pointStrength,Finset.sum_const,Finset.card_univ, + Fintype.card_coe,nsmul_eq_mul] + field_simp + +theorem original_score_procedure {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (hq : (10:ℝ)≤Nat.card K) (U S : Finset (ℙ K V)) (hSU : S⊆U) (hS : S.Nonempty) + (O : ℙ K V→Finset (ℙ K V)) (E T : Finset (ℙ K (Dual K V))) + (hT : T.Nonempty) (hTE : T⊆E) (b : ℙ K V→ℝ) (bad : Finset (ℙ K V)) + (L : ℝ≥0) (R : ℕ) (a M : ℝ) + (hsmall : ∀H∈T,cellMass S ((Nat.card K:ℝ)/S.card) H≤a) + (hM : ∑H∈E,cellMass S ((Nat.card K:ℝ)/S.card) H≤M) + (βS βU γS γU : ℝ) (hγS : 0<γS) (hγU : 0<γU) + (hb : ∀x∈U\bad,b x∈Set.Icc 0 1) + (hc : ∀x∈U\bad,(9/10:ℝ)≤(1-b x)^R) + (herr : ∀x∈U\bad,b x*(pencil x∩E).card≤ + ((T.card:ℝ)*Real.exp (-((R:ℝ)*(L:ℝ))*a)/2)/(100*(Nat.card K:ℝ))) + (htrain : (∫ω,((typicalFailures S S O E b + (((T.card:ℝ)*Real.exp (-((R:ℝ)*(L:ℝ))*a)/2)/(10*(Nat.card K:ℝ))) ω).card:ℝ) + ∂scheduleMeasure (fun _ : S => L*pointStrength S) R)≤βS) + (hamb : (∫ω,((typicalFailures U S O E b + (((T.card:ℝ)*Real.exp (-((R:ℝ)*(L:ℝ))*a)/2)/(10*(Nat.card K:ℝ))) ω).card:ℝ) + ∂scheduleMeasure (fun _ : S => L*pointStrength S) R)≤βU) : + let P := (L:ℝ)*R + let zmin := (T.card:ℝ)*Real.exp (-P*a)/2 + Real.exp (-P*a)/2-M*Real.exp (-P/2000)/((1/2000:ℝ)*zmin)-βS/γS-βU/γU- + Real.exp (-((Nat.card K:ℝ)*P)/4) ≤ + (scheduleMeasure (fun _ : S => L*pointStrength S) R).real + {ω | let W := decoded U S O b (emptyTests E (hyperplaneSupport S) ω).card ω + (sampleCount ω:ℝ)≤2*((Nat.card K:ℝ)*P) ∧ + (W.card:ℝ)≤2*((Nat.card K:ℝ)*P)+bad.card+γU+100*(Nat.card K:ℝ)^(d+1)/zmin ∧ + (99/100:ℝ)*S.card-bad.card-γS≤((W∩S).card:ℝ)} := by + dsimp only + let P : ℝ := (L:ℝ)*R + let zmin : ℝ := (T.card:ℝ)*Real.exp (-P*a)/2 + let q : ℝ := Nat.card K + let μ := scheduleMeasure (fun _ : S => L*pointStrength S) R + let Z := fun ω : Fin R→S→ℕ => emptyTests E (hyperplaneSupport S) ω + let t : ℝ := zmin/(10*q) + let A := {ω : Fin R→S→ℕ | zmin≤((Z ω).card:ℝ) ∧ + emptyWeight E (hyperplaneSupport S) (fun H => cellMass S (q/S.card) H) ω≤((Z ω).card:ℝ)/1000} + let B := {ω : Fin R→S→ℕ | γS≤((typicalFailures S S O E b t ω).card:ℝ)} + let C := {ω : Fin R→S→ℕ | γU≤((typicalFailures U S O E b t ω).card:ℝ)} + let D := {ω : Fin R→S→ℕ | 2*(q*P)≤(sampleCount ω:ℝ)} + have hq0 : 0 pointStrength S) (hyperplaneSupport S H)=cellMass S (q/S.card) H := by + rw [mass_hyperplaneSupport,coe_pointStrength] + have hPa : (R:ℝ)*(L:ℝ)=P := by dsimp [P];ring + have hA : Real.exp (-P*a)/2-M*Real.exp (-P/2000)/((1/2000:ℝ)*zmin)≤μ.real A := by + have he := emptyTests_many_small (R:=R) L (fun _ : S => pointStrength S) E T hT hTE + (hyperplaneSupport S) (a:=a) (c:=1/2000) (b:=1/2000) (M:=M) + (by norm_num) (by norm_num) (fun H hH => by rw [hm];exact hsmall H hH) + (by simp_rw [hm];exact hM) + dsimp only at he + rw [hPa] at he + simp_rw [hm] at he + convert! he using 1 <;> dsimp [zmin,μ,A,Z] <;> congr 2 <;> ring_nf + have hB : μ.real B≤βS/γS := integral_typicalFailures_tail S S O E b t _ hγS (by + simpa only [hPa] using htrain) + have hC : μ.real C≤βU/γU := integral_typicalFailures_tail U S O E b t _ hγU (by + simpa only [hPa] using hamb) + have hD : μ.real D≤Real.exp (-(q*P)/4) := by + have he := sampleCount_double_tail (fun _ : S => L*pointStrength S) R + rw [sampleMean_uniform S hS L R] at he + exact he + apply (intersect_three_success μ A B C D hA hB hC hD).trans + apply measureReal_mono _ (measure_ne_top _ _) + intro ω hω + obtain ⟨hAω,hbad⟩ := hω + have hz : zmin≤((Z ω).card:ℝ) := hAω.1 + have hZZ : (Z ω).Nonempty := Finset.card_pos.mp (by exact_mod_cast hz0.trans_le hz) + have hBω : ((typicalFailures S S O E b t ω).card:ℝ)<γS := lt_of_not_ge + (fun h => hbad (Or.inl (Or.inl h))) + have hCω : ((typicalFailures U S O E b t ω).card:ℝ)<γU := lt_of_not_ge + (fun h => hbad (Or.inl (Or.inr h))) + have hDω : (sampleCount ω:ℝ)<2*(q*P) := lt_of_not_ge + (fun h => hbad (Or.inr h)) + have ht : t≤((Z ω).card:ℝ)/(10*q) := div_le_div_of_nonneg_right hz (by positivity) + have hTS : ((typicalFailures S S O E b (((Z ω).card:ℝ)/(10*q)) ω).card:ℝ)≤γS := + (Nat.cast_le.mpr (Finset.card_le_card (typicalFailures_mono S S O E b ht ω))).trans hBω.le + have hTU : ((typicalFailures U S O E b (((Z ω).card:ℝ)/(10*q)) ω).card:ℝ)≤γU := + (Nat.cast_le.mpr (Finset.card_le_card (typicalFailures_mono U S O E b ht ω))).trans hCω.le + have hbound := decoded_bounds hdim hd hq U S hSU hS O E b ω bad hZZ + (by simpa only [emptyWeight_eq_sum] using hAω.2) hb hc (fun x hx => (herr x hx).trans (by + rw [hPa] + exact div_le_div_of_nonneg_right hz (by positivity))) + dsimp only at hbound + have hdiv : 100*q^(d+1)/((Z ω).card:ℝ)≤100*q^(d+1)/zmin := + div_le_div_of_nonneg_left (by positivity) hz0 hz + change (sampleCount ω:ℝ)≤2*(q*P) ∧ _ + refine ⟨hDω.le,?_,?_⟩ + all_goals dsimp only [q,P,zmin,Z] at hDω hTU hTS hdiv + · linarith only [hbound.2,hDω,hTU,hdiv] + · linarith only [hbound.1,hTS] + +end SharpRamseyFive.ScoreGeometry + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Iteration/CellScoreProcedure.lean b/lean/OAI/Combinatorics/RamseyFive/Iteration/CellScoreProcedure.lean new file mode 100644 index 0000000000000000000000000000000000000000..1b385401708502ab72fba02f1858a442b94b0f97 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Iteration/CellScoreProcedure.lean @@ -0,0 +1,298 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.ValidationOriginalTailWide + +namespace OAI + +namespace SharpRamseyFive.ScoreScalars + +lemma exp_sub_le_scaled {a b C : ℝ} (hC : 0 cellMass S ((Nat.card K:ℝ)/S.card) H≤8*τ + (Nat.card K:ℝ)*scale (K:=K) d S.card*Real.exp (-(b+8*P*τ+Real.log 16))≤ + (T₀.card:ℝ)*Real.exp (-P*(8*τ))/2 := by + have hthin := thin_hyperplanes X S hS hS0 hret T hτ hdensity + dsimp only at hthin ⊢ + have hn : (0:ℝ) hh ⟨none,h⟩) + convert! h using 1 + simp only [weightOnPencil,clippedWeight,incidenceEntry] + simp only [mul_ite,mul_one,mul_zero] + rw [←Finset.sum_filter] + simp only [Finset.sum_boole] + congr 2 + ext H + simp only [Finset.mem_inter,Finset.mem_filter,Finset.mem_univ,true_and,pencil] + tauto + +omit [FiniteDimensional K V] in +lemma regular_centering {d : ℕ} {J : Type*} [Fintype J] + (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) (_hS : S.Nonempty) + (x : ℙ K V) {L f κ z : ℝ} {R : ℕ} (hL : 0≤L) (hf : f≤2/25) + (hx : x∉irregular (d:=d) S C (L/100)) + (hR : (R:ℝ)*Real.exp (-(23/25:ℝ)*L)≤1/10) + (hκ : κ+Real.log 100≤(91/100:ℝ)*L) + (hz : (Nat.card K:ℝ)*scale (K:=K) d S.card*Real.exp (-κ)≤z) : + let b := Real.exp (-L*(1-f)) + b∈Set.Icc 0 1 ∧ 9/10≤(1-b)^R ∧ + b*(pencil x∩exceptional S C).card≤z/(100*(Nat.card K:ℝ)) := by + have hq : (0:ℝ) C (ia x)∪C (ib x)) (exceptional S C) + (fun x => Real.exp (-(L:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x))))) + (scale (K:=K) d S.card*Real.exp (-(b+8*((L:ℝ)*R)*τ+Real.log 16))/10) ω).card:ℝ) + ∂scheduleMeasure (fun _ : S => L*pointStrength S) R)≤(S.card:ℝ)*Real.exp (-(L:ℝ)/1000)) + (hamb : (∫ω,((typicalFailures U S (fun x => C (ia x)∪C (ib x)) (exceptional S C) + (fun x => Real.exp (-(L:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x))))) + (scale (K:=K) d S.card*Real.exp (-(b+8*((L:ℝ)*R)*τ+Real.log 16))/10) ω).card:ℝ) + ∂scheduleMeasure (fun _ : S => L*pointStrength S) R)≤(S.card:ℝ)*Real.exp (CP*((L:ℝ)*R))) : + Real.exp (-8*((L:ℝ)*R)*τ)/4≤ + (scheduleMeasure (fun _ : S => L*pointStrength S) R).real + {ω | let W := decoded U S (fun x => C (ia x)∪C (ib x)) (fun x => Real.exp (-(L:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x))))) (emptyTests (exceptional S C) (hyperplaneSupport S) ω).card ω + (sampleCount ω:ℝ)≤2*((Nat.card K:ℝ)*((L:ℝ)*R)) ∧ + (W.card:ℝ)≤(S.card:ℝ)*Real.exp ((CP+2)*((L:ℝ)*R)) ∧ + (9/10:ℝ)*S.card≤((W∩S).card:ℝ)} := by + let q : ℝ := Nat.card K + let n : ℝ := S.card + let P : ℝ := (L:ℝ)*R + let B : ℝ := scale (K:=K) d S.card + let κ : ℝ := b+8*P*τ+Real.log 16 + let T₀ := T.filter fun H => cellMass S (q/S.card) H≤8*τ + let z : ℝ := (T₀.card:ℝ)*Real.exp (-P*(8*τ))/2 + let bad := irregular (d:=d) S C ((L:ℝ)/100) + let O := fun x => C (ia x)∪C (ib x) + let ctr := fun x => Real.exp (-(L:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x)))) + let μ := scheduleMeasure (fun _ : S => L*pointStrength S) R + have hn : 0 by + rw [Real.norm_eq_abs,abs_of_nonneg (Nat.cast_nonneg _)] + exact Nat.cast_le.mpr (Finset.card_filter_le _ _) + · apply Integrable.of_bound (measurable_of_countable _).aestronglyMeasurable (A.card:ℝ) + exact Filter.Eventually.of_forall fun ω => by + rw [Real.norm_eq_abs,abs_of_nonneg (Nat.cast_nonneg _)] + exact Nat.cast_le.mpr (Finset.card_filter_le _ _) + · intro ω + exact Nat.cast_le.mpr (Finset.card_le_card (typicalFailures_mono A S O (exceptional S C) ctr ht ω)) + have hevent := original_score_procedure hdim hd hq U S hSU hS O (exceptional S C) T₀ hT + (thin_subset_exceptional S C hS T hτhi) ctr bad L R (8*τ) (100000*q*B) + (fun H hH => (Finset.mem_filter.mp hH).2) + (exceptional_mass_bound hdim hd S C hS hC) + (n*Real.exp (-(L:ℝ)/1000)) (n*Real.exp (CP*P)) (n/100) (n*Real.exp ((CP+1)*P)) + (by positivity) (by positivity) (fun x hx => (hcenter x hx).1) + (fun x hx => (hcenter x hx).2.1) (fun x hx => by + simpa only [mul_comm (R:ℝ) (L:ℝ)] using (hcenter x hx).2.2) + (by simpa only [mul_comm (R:ℝ) (L:ℝ)] using (hmono S).trans htrain) + (by simpa only [mul_comm (R:ℝ) (L:ℝ)] using (hmono U).trans hamb) + dsimp only at hevent + have hprob := ScoreScalars.procedure_probability (q:=q) (B:=B) (n:=n) (P:=P) + (L:=L) (u:=8*P*τ) (κ:=κ) (z:=z) (M:=100000*q*B) + (βS:=n*Real.exp (-(L:ℝ)/1000)) (βU:=n*Real.exp (CP*P)) (C:=CP) + hq hB hn (by dsimp [P];positivity) hz le_rfl le_rfl le_rfl + (by dsimp [κ];linarith only [he]) hs hu + rw [show -(8*P*τ)=-P*(8*τ) by ring] at hprob + have hh := hprob.trans hevent + have htbound : 100*q^(d+1)/z≤100*n*Real.exp κ := by + apply (div_le_iff₀ hz0).mpr + calc + _ = (100*n*Real.exp κ)*(q*B*Real.exp (-κ)) := by + dsimp [B,scale,n,q] + rw [show (100*(S.card:ℝ)*Real.exp κ)*((Nat.card K:ℝ)* + ((Nat.card K:ℝ)^d/S.card)*Real.exp (-κ))= + 100*((Nat.card K:ℝ)^(d+1))*((S.card:ℝ)/S.card)*(Real.exp κ*Real.exp (-κ)) by + rw [pow_succ];ring] + rw [div_self hn.ne',←Real.exp_add,add_neg_cancel,Real.exp_zero,mul_one,mul_one] + _ ≤ _ := mul_le_mul_of_nonneg_left hz (by positivity) + have hout := ScoreScalars.procedure_output hn.le hP hCP hk hbad + (show 2*(q*P)≤2*n from by linarith only [hnP]) htbound + rw [show -8*((L:ℝ)*R)*τ= -P*(8*τ) by dsimp [P];ring] + apply hh.trans + apply measureReal_mono _ (measure_ne_top _ _) + intro ω hω + refine ⟨hω.1,hω.2.1.trans hout,?_⟩ + change (9/10:ℝ)*n≤_ + have hc := hω.2.2 + change (99/100:ℝ)*n-(bad.card:ℝ)-n/100≤_ at hc + change (bad.card:ℝ)≤n/100 at hbad + linarith only [hc,hbad,hn] + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Iteration/CodedWindowStage.lean b/lean/OAI/Combinatorics/RamseyFive/Iteration/CodedWindowStage.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a0a9f0c8248729cba082c291d4f85216d031863 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Iteration/CodedWindowStage.lean @@ -0,0 +1,58 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Iteration.WindowStage +import OAI.Combinatorics.RamseyFive.Geometry.StreamGeometry + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple +open Module ProjectiveIncidence FiniteEntropy Windows Marking PivotTree MessageWeights ReverseCap ScoreGeometry +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V Ω κ α : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] [Fintype Ω] [Fintype κ] [Fintype α] + {N w n : ℕ} [Nonempty (Fin n)] {admissible : (Fin N→α)→Prop} +local instance cwsBDE : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance cwsTDE : DecidableEq (Fin w×Fin (2*n)) := Classical.decEq _ +local instance cwsIDE : DecidableEq (Slots w n) := Classical.decEq _ +variable (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (w*(4*n)) admissible) + (ctx : Ω→κ) (elig : κ→Fin w×Bool→Finset (Fin n)) (steps : ℕ) + (f : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V→FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (u : WindowHistory κ K V w n steps→Slots w n→ℝ) + (E : WindowHistory κ K V w n steps→Finset (Fin w)) {s : ℝ} + (W : ∀h,∀he : (E h).Nonempty,ReciprocalWindows (windowPosterior (windowFiber S ctx) h) + (u h) h.2 (survivingOriginal (E h) he) s) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (c δ τ P : ℝ) (hδ : 0<δ) +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K (Dual K (Dual K V)))] in +lemma levelWindowStream_geometric {M : ℝ} (hG : Geometric S M) : + Geometric (levelWindowStream S ctx elig steps u E W) M := by + exact ((hG.augment _).reindex (middleEmbedding w n)).augmentSigma _ +theorem actualWindow_coded {l : ℕ} (hl : lmean (allWindowExperiment f r (windowPosterior (windowFiber S ctx) h) + (u h) h.2 (E h) (W h)) (fun z=> + ((allWindowPositions f r (windowPosterior (windowFiber S ctx) h) (u h) h.2 (E h) (W h) + σ hσ hq hd c δ τ P hδ (bad h) z.2.2 (z.1,z.2.1))ᶜ.card:ℝ)))≤ + ((w*(2*n):ℝ)-l)/10) : + Nonempty (CodedStream (K:=K) (V:=V) N l admissible ((10/9)*S.density) + (L+(w+1)*Real.log (l+1)) J M) := by + obtain ⟨t,hE,hden,⟨C⟩⟩:=actualWindow_stage S ctx elig steps f r u E W σ hσ hq hd c δ τ P hδ + hl bad L J hf hr hcost hcap hloss + refine ⟨{ sample:=_ ,stream:=_ ,code:=_ ,description:=C,density_bound:=hden,geometric:=?_ }⟩ + exact ((levelWindowStream_geometric S ctx elig steps u E W hG).restrict _ hE).extract hl.le _ +end +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Iteration/EventuallyRichScale.lean b/lean/OAI/Combinatorics/RamseyFive/Iteration/EventuallyRichScale.lean new file mode 100644 index 0000000000000000000000000000000000000000..326cd99dc9352faf4e4c667f296d45011836d0bc --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Iteration/EventuallyRichScale.lean @@ -0,0 +1,39 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.Beta + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +open scoped BigOperators +open MeasureTheory ProbabilityTheory +open scoped BigOperators ENNReal NNReal +noncomputable section +namespace SharpRamseyFive.RichRegime +open Filter ParameterHierarchy +open scoped Topology + +theorem eventually_rich_scale {η : ℝ} (hη : 0 < η) (hη' : η < 1/10) : + ∀ᶠ σ : ℝ in atTop, 1000 ≤ σ ∧ ∀ D R g : ℝ, + Range η σ D R → P η σ D R / 10000 ≤ g → 100000000 ≤ g := by + have hg := (tendsto_rpow_atTop (mul_pos (by norm_num : (0:ℝ)<10) (beta_pos hη))).eventually + (eventually_ge_atTop (1000000000000:ℝ)) + filter_upwards [eventually_ge_atTop (1000:ℝ),hg] with σ hσ hp + refine ⟨hσ,?_⟩ + intro D R g h hpg + have hh := (finite_bounds hη hη' (by linarith) h).2.2.2.2.2.1 + linarith + +lemma source_size_identity {q : ℝ} (hq : 0 < q) (v : ℝ) : + Real.exp (3*Real.log q/2+(v-1/2)*Real.log q) = q ^ (1+v) := by + rw [Real.rpow_def_of_pos hq] + congr 1 + ring + +end SharpRamseyFive.RichRegime + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Iteration/ForwardPreparedStage.lean b/lean/OAI/Combinatorics/RamseyFive/Iteration/ForwardPreparedStage.lean new file mode 100644 index 0000000000000000000000000000000000000000..07dc9afaeea1ee2628af3639af0385add98b3d3a --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Iteration/ForwardPreparedStage.lean @@ -0,0 +1,113 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.ClassifiedStream +import OAI.Combinatorics.RamseyFive.Marking.ReciprocalSharpRound +import OAI.Combinatorics.RamseyFive.Marking.ReciprocalStageArithmetic +import OAI.Combinatorics.RamseyFive.Entropy.ReciprocalCodeNumerics +import OAI.Combinatorics.RamseyFive.Entropy.ReciprocalLossBudget +import OAI.Combinatorics.RamseyFive.Marking.BandEndpoints + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple +open Module ProjectiveIncidence FiniteEntropy Windows Marking Filter ParameterHierarchy +open scoped Classical BigOperators LinearAlgebra.Projectivization NNReal +noncomputable section + +theorem eventually_forward_prepared_stage {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (c C Cm : ℝ) (hc : 0if h : 0 < map S.law ctx c then + (hcl c h (e (slotEmbedding i))).choose else 0 + have hu : ∀c,0 < map S'.law ctx c→∀i, + σ≤u c i ∧ u c i≤4*σ ∧ ForwardCaps (PS'.domain c (slotEmbedding i)) (u c i) ∧ + BandCondition σ (D*σ^(3*beta η)) (u c i) b := by + intro c hc i + change 0 < map S.law ctx c at hc + have hh:=(hcl c hc (e (slotEmbedding i))).choose_spec + simpa only [u,dite_eq_left hc,hσeq,PS',Prepared.reindex] using hh + have hflag : ∀c,0 < map S'.law ctx c→∀i, + ((PS'.domain c (slotEmbedding i)).card:ℝ)≤153*(Nat.card K:ℝ)^4 := by + intro c hc i + exact card_le_of_log_le (by positivity) (by positivity) (PS'.cap c (slotEmbedding i)) + have hlwn : (l:ℝ)≤(w:ℝ)*n := by nlinarith + have hlmid : l(hu c hc i).2.2.1) hflag + (fun c hc i=>band_endpoints hp.le (by positivity) ⟨(hu c hc i).1,(hu c hc i).2.1⟩ (hu c hc i).2.2.2) + (by simpa only [hσeq] using (fun c hc i=>(hu c hc i).2.2.2)) + (band_lo_le_hi hp.le (by positivity)) (by positivity) (by rw [hσeq,hJ];linarith) + hσ hq hcard hRange rfl hT hr hnr hroom hlmid hM hs + (by simpa only [hσeq] using hsmall) hwide hkb0 hkbhi hwH hHhi hmass + (by simpa only [hσeq] using hcore) (by simpa only [hq] using hε) (by + simpa only [closed,decide_eq_true_eq,Nat.cast_mul,Nat.cast_ofNat,hq,show (4:ℝ)*(w*(4*n))=16*w*n by ring] using hnum) + refine ⟨out.mono le_rfl (hcode (Nat.card K) D R k₀ w H l hq hRange hHpos hHhi hwD hk₀ hll) ?_⟩ + have hh:=reciprocal_domain_slack_bound hη hσ hD + rw [hJ] + linarith +end +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Iteration/HighWindowStage.lean b/lean/OAI/Combinatorics/RamseyFive/Iteration/HighWindowStage.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ba4ba9867cc58bc56cf51293956519f211f1cd9 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Iteration/HighWindowStage.lean @@ -0,0 +1,85 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Trees.HistoryPrivateStream +import OAI.Combinatorics.RamseyFive.Marking.HighFourPreRound +import OAI.Combinatorics.RamseyFive.Streams.HighActualExtraction + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple +open Module ProjectiveIncidence FiniteEntropy Windows Marking HighSamples +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V Ω κ α : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] [Fintype Ω] [Fintype κ] [Fintype α] + {N n : ℕ} [Nonempty (Fin n)] {admissible : (Fin N→α)→Prop} +local instance hwsBDE : DecidableEq (Fin 1×Bool) := Classical.decEq _ +local instance hwsTDE : DecidableEq (Fin 1×Fin (2*n)) := Classical.decEq _ +local instance hwsIDE : DecidableEq (Slots 1 n) := Classical.decEq _ + +def oneMiddleEmbedding (n : ℕ) : Fin (2*n)↪o Fin (1*(4*n)) := + OrderEmbedding.ofStrictMono (fun t=>slotEmbedding (Sum.inr ((0:Fin 1),t))) + (fun _ _ h=>middle_order 0 _ _ h) + +variable (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (1*(4*n)) admissible) + (ctx : Ω→κ) (elig : κ→Fin 1×Bool→Finset (Fin n)) (steps r' : ℕ) (s : ℝ) (h : ℕ) + +def highSampleStream := + ((historyStream S ctx elig steps).reindex (oneMiddleEmbedding n)).augment + (fun z=>highFourSampler (fiber (pair S.law ctx (windowTuple S))) r' s h + (actualWindowHistory ctx steps z)) + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K (Dual K (Dual K V)))] in +lemma highSampleStream_loss_mean : + mean (highSampleStream S ctx elig steps r' s h).law + (fun z=>((coveredPositions ((highSampleStream S ctx elig steps r' s h).tuple z) + (highDomain z.2))ᶜ.card:ℝ))= + mean (adaptiveLaw (preRoundTupleLaw (first (pair S.law ctx (windowTuple S))) + (fiber (pair S.law ctx (windowTuple S))) elig steps) + (fun z=>highFourSampler (fiber (pair S.law ctx (windowTuple S))) r' s h z.1)) + (fun z=>((coveredPositions (fun t=>z.1.2 (Sum.inr (0,t))) (highDomain z.2))ᶜ.card:ℝ)) := by + dsimp only [highSampleStream,SelectedStream.augment,SelectedStream.reindex] + rw [historyStream_law,mean_adaptive] + have he:=originalHistory_mean S.law ctx (windowTuple S) elig steps + (fun z x=>mean (highFourSampler (fiber (pair S.law ctx (windowTuple S))) r' s h z) + (fun v=>((coveredPositions (fun t=>x (Sum.inr (0,t))) (highDomain v))ᶜ.card:ℝ))) + simp only [preRoundTupleLaw,mean_adaptive] + convert he using 1 + apply congrArg (mean _) + funext z + rfl + +omit [Finite K] [Fintype (ℙ K (Dual K (Dual K V)))] in +theorem highSampleStream_extract (hdim : finrank K V=5) {l : ℕ} (hl : l<2*n) + (hloss : mean (adaptiveLaw (preRoundTupleLaw (first (pair S.law ctx (windowTuple S))) + (fiber (pair S.law ctx (windowTuple S))) elig steps) + (fun z=>highFourSampler (fiber (pair S.law ctx (windowTuple S))) r' s h z.1)) + (fun z=>((coveredPositions (fun t=>z.1.2 (Sum.inr (0,t))) (highDomain z.2))ᶜ.card:ℝ))≤ + ((2*n:ℝ)-l)/10) : + ∃ hE : 0l≤(coveredPositions ((highSampleStream S ctx elig steps r' s h).tuple z) + (highDomain z.2)).card), + let S':=((highSampleStream S ctx elig steps r' s h).restrict _ hE).extract hl.le + (fun z=>coveredPositions ((highSampleStream S ctx elig steps r' s h).tuple z) (highDomain z.2)) + S'.density≤(10/9)*S.density ∧ + entropy (map S'.law S'.tuple)≤3*h*Real.log (Fintype.card (FlagPair K V))+ + l*Real.log (Fintype.card (ℙ K (Dual K V))) := by + let T:=highSampleStream S ctx elig steps r' s h + let E:=Finset.univ.filter (fun z=>l≤(coveredPositions (T.tuple z) (highDomain z.2)).card) + have hp : (9:ℝ)/10≤eventMass T.law E := by + apply extraction_probability _ _ hl + convert (highSampleStream_loss_mean S ctx elig steps r' s h).trans_le hloss using 1 + simp only [Nat.cast_mul,Nat.cast_ofNat] + have hE : 0z.2) hE using 1 + congr 1 + exact Subsingleton.elim _ _ +end +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Iteration/InitialPolar.lean b/lean/OAI/Combinatorics/RamseyFive/Iteration/InitialPolar.lean new file mode 100644 index 0000000000000000000000000000000000000000..aeaa2e79326d56b783f5a22ea3027ddd7a6ba4da --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Iteration/InitialPolar.lean @@ -0,0 +1,152 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.FlagGraph + +namespace OAI + +namespace SharpRamseyFive + +namespace FlagConstruction +open Module ProjectiveIncidence FiniteEntropy SelectedTuple CoreGeometry Marking +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K : Type} [Field K] [Finite K] + [Fintype (Point K)] [Fintype (DualPoint K)] + [Fintype (ℙ K (Dual K (Dual K (Space K))))] + [Fintype (Submodule K (Dual K (Space K)))] + [Nonempty (RectangleGeometry.Flag (K:=K) (V:=Space K))] [Nonempty (Point K)] [Nonempty (DualPoint K)] + [Nonempty (ℙ K (Dual K (Dual K (Space K))))] + +omit [Finite K] [Fintype (ℙ K (Dual K (Dual K (Space K))))] + [Fintype (Submodule K (Dual K (Space K)))] + [Nonempty (RectangleGeometry.Flag (K:=K) (V:=Space K))] + [Nonempty (Point K)] [Nonempty (DualPoint K)] + [Nonempty (ℙ K (Dual K (Dual K (Space K))))] in +lemma rectangle_mem_iff (U : Submodule K (Dual K (Space K))) (x : RectangleGeometry.Flag (K:=K) (V:=Space K)) : + x∈RectangleGeometry.rectangle U ↔ InRectangle U x.val.1.rep x.val.2.rep := by + simp [RectangleGeometry.rectangle,InRectangle,rep_mem_iff] + +theorem initial_polar_of_no_graph {N n : ℕ} (hn : n≤N) (σ : ℝ) + (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hq3 : 3≤Nat.card K) + (hN : (N:ℝ)≤(Nat.card K:ℝ)^4*σ) + (hno : ∀s : Fin N→RectangleGeometry.Flag (K:=K) (V:=Space K),¬(graph s)ᶜ.CliqueFree n) : + ∃ adm : (Fin N→RectangleGeometry.Flag (K:=K) (V:=Space K))→Prop, + Nonempty (PolarState K (RectangleGeometry.Flag (K:=K) (V:=Space K)) N n adm 2 0 (10*σ) (40*σ)) := by + let : Nonempty (Flag K) := ‹Nonempty (RectangleGeometry.Flag (K:=K) (V:=Space K))› + have hd : finrank K (Space K)=5 := by simp [Space] + have hs : 0≤σ := by linarith + have hqp : (0:ℝ) + Finset.univ.filter fun x=>40*Real.log (Nat.card K)≤hits (RectangleGeometry.rectangle U) x + let E:=badᶜ + let p:Law (Fin N→RectangleGeometry.Flag (K:=K) (V:=Space K)):=iid (uniform Fintype.card_pos) (Fin N) + have hbad : eventMass p bad≤6/(Nat.card K:ℝ)^7 := by + have hh:=RectangleGeometry.rectangle_occupancy_tail hd N + (by simpa only [hlog] using hN) + convert hh using 1 + congr 1 + ext x + simp [bad] + have htail : 6/(Nat.card K:ℝ)^7≤1/2 := by + have hq' : (3:ℝ)≤Nat.card K := by exact_mod_cast hq3 + have hp := pow_le_pow_left₀ (by norm_num : (0:ℝ)≤3) hq' 7 + rw [div_le_iff₀ (pow_pos hqp 7)] + norm_num at hp ⊢ + linarith + have hmass : 1/2≤eventMass p E := by + have hc : eventMass p E+eventMass p bad=1 := by + convert eventMass_complement p bad using 1 + congr 2 + ext x + simp [E] + have hh:=hbad.trans htail + linarith only [hc,hh] + have hE : 0 ∀U : Submodule K (Dual K (Space K)), + (∑i,if InRectangle U (s i).val.1.rep (s i).val.2.rep then (1:ℝ) else 0)≤40*σ + have hgood : ∀s,s∈E→adm s := by + intro s hs U + have hh : ¬40*σ≤hits (RectangleGeometry.rectangle U) s := by + intro hh + exact Finset.mem_compl.mp hs (Finset.mem_biUnion.mpr ⟨U,Finset.mem_univ _, + Finset.mem_filter.mpr ⟨Finset.mem_univ _,by simpa only [hlog] using hh⟩⟩) + have he : hits (RectangleGeometry.rectangle U) s= + ∑i,if InRectangle U (s i).val.1.rep (s i).val.2.rep then (1:ℝ) else 0 := by + simp only [hits,rectangle_mem_iff] + rw [he] at hh + exact (not_le.mp hh).le + let P:=fun (s : Fin N→RectangleGeometry.Flag (K:=K) (V:=Space K)) (e : Fin n↪o Fin N) => + TupleIncident (fun i=>(s (e i)).val) ∧ TupleConsistent (fun i=>(s (e i)).val) + let choose:=firstWitness hn P + have hchoose : ∀s,P s (choose s) := fun s=>firstWitness_spec hn P s + (independent_selector_of_not_cliqueFree s (hno s)) + let S:=initialSelectedStream adm E hE hgood choose Subtype.val encodeRaw encodeRaw_leftInverse + have hgeom : Geometric S (40*σ) := by + refine ⟨fun z _=>(hchoose z).1,fun z _=>(hchoose z).2,?_⟩ + intro z hz + exact occupancy_reindex (fun i=>(z i).val) (choose z) (choose z).injective (40*σ) + (hgood z (conditionOn_positive p E hE z hz).1) + have hcap : Real.log (Fintype.card (FlagPair K (Space K)))≤ + Real.log (153*(Nat.card K:ℝ)^4)+10*σ := by + have hq1 : (1:ℝ)≤Nat.card K := by exact_mod_cast (by omega : 1≤Nat.card K) + have hj : Real.log 4≤Real.log (153*(Nat.card K:ℝ)^4) := by + apply Real.log_le_log (by norm_num) + have hh : (1:ℝ)≤(Nat.card K:ℝ)^4 := one_le_pow₀ hq1 + nlinarith + have hh:=flagPair_log_card hd σ hs hq + linarith + let C : ContextDescription (κ:=Unit) S.law S.tuple 0 + (Real.log (153*(Nat.card K:ℝ)^4)+10*σ) := + { context:=fun _=>() + domain:=fun _ _=>Finset.univ + entropy_bound:=by simpa using entropy_le_log_card (map S.law (fun _=>())) + contains:=by intros;exact Finset.mem_univ _ + cap:=by intros;simpa only [Finset.card_univ] using hcap } + have hden : S.density≤2 := by + change 1/eventMass p E≤2 + rw [div_le_iff₀ hE] + linarith + exact ⟨adm,⟨PolarState.of hd { + sample:=Fin N→RectangleGeometry.Flag (K:=K) (V:=Space K) + stream:=S + code:=Unit + description:=C + density_bound:=hden + geometric:=hgeom }⟩⟩ +end +end FlagConstruction + +open Filter +open scoped Topology +noncomputable section +lemma initial_floor_scales {η : ℝ} (hη : 0<η) (hη' : η<1/10) : + ∀ᶠ σ : ℝ in atTop, + 1≤σ ∧ 3≤Real.exp σ ∧ + ⌊Real.exp σ*σ^(1+η)⌋₊≤⌊(Real.exp σ)^4*σ⌋₊ ∧ + (1/2:ℝ)*Real.exp σ*σ^(1+η)≤(⌊Real.exp σ*σ^(1+η)⌋₊:ℝ) := by + have hg : Tendsto (fun σ : ℝ=>Real.exp σ) atTop atTop := Real.tendsto_exp_atTop + filter_upwards [eventually_ge_atTop (1:ℝ),hg.eventually_ge_atTop 3] with σ hs hq + have hsp : 0<σ := zero_lt_one.trans_le hs + have hqp : 0 n + | i+1 => iterLength n i/20000 + +theorem eventually_iter_produce {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (m : ℕ) (c d Cm : ℝ) (hc : 0 + filter_upwards [] with σ + intro q₀ K α _ _ _ _ _ N n adm M k₀ S _ _ _ _ _ _ hlen _ _ _ _ _ + simpa only [iterLength,iterA,iterDelta,pow_zero,one_mul,mul_zero,div_one] using + (show Nonempty (PolarState K α N n adm d 0 (10*σ) M) ∧ + c*(Nat.card K:ℝ)*σ^(1+η)≤(n:ℝ) ∧ n≤n from ⟨⟨S⟩,hlen,le_rfl⟩) + | succ m ih => + have hcp : 0hcl c hc (e i)) +end +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Iteration/RestrictionScale.lean b/lean/OAI/Combinatorics/RamseyFive/Iteration/RestrictionScale.lean new file mode 100644 index 0000000000000000000000000000000000000000..0646b67bd89e93eaeff82ff672e213d5081ae8a4 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Iteration/RestrictionScale.lean @@ -0,0 +1,80 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.Beta + +namespace OAI + +namespace SharpRamseyFive.ParameterHierarchy +open Filter Asymptotics +open scoped Topology + +lemma dyadic_levels_le (q r : ℕ) (σ : ℝ) (hσ : 1 ≤ σ) + (hq : (q:ℝ)=Real.exp σ) (hr : r ≤ 5) : + (Nat.log 2 (q^r)+1:ℝ) ≤ (5/Real.log 2+1)*σ := by + have hl : 0 < Real.log 2 := Real.log_pos (by norm_num) + have hs : 0 ≤ σ := le_trans (by norm_num) hσ + have hh := Real.natLog_le_logb (q^r) 2 + norm_num only [Nat.cast_ofNat] at hh + have he : Real.logb (2:ℝ) ((q^r:ℕ):ℝ) = (r:ℝ)*σ/Real.log 2 := by + rw [Real.logb,Nat.cast_pow,hq,Real.log_pow,Real.log_exp] + rw [he] at hh + have hr' : (r:ℝ)≤5 := by exact_mod_cast hr + have hm := div_le_div_of_nonneg_right (mul_le_mul_of_nonneg_right hr' hs) hl.le + calc + _ ≤ (r:ℝ)*σ/Real.log 2+1 := by linarith only [hh] + _ ≤ 5*σ/Real.log 2+σ := add_le_add hm hσ + _ = _ := by ring + +lemma root_density_scale {σ τ β : ℝ} {j d : ℕ} (hσ : 1≤σ) (hτ : 0≤τ) + (hβ : 0≤β) (hj : 2≤j) (hjd : j(Real.log C+Real.log σ)/σ^(7*beta η)) atTop (𝓝 0) := by + have hc : Tendsto (fun σ : ℝ=>Real.log C/σ^(7*beta η)) atTop (𝓝 0) := + tendsto_const_nhds.div_atTop (tendsto_rpow_atTop hb) + have hv := (isLittleO_log_rpow_atTop hb).tendsto_div_nhds_zero + simpa only [add_div,add_zero] using hc.add hv + filter_upwards [eventually_ge_atTop (1:ℝ),hlog.eventually_lt_const (by norm_num : (0:ℝ)<1)] with σ hσ hh + intro D R b Cb q r hr hq hd hbb + have hs : 0<σ := zero_lt_one.trans_le hσ + have hbound : Real.log (400*(Nat.log 2 (q^r)+1:ℝ))≤σ^(7*beta η) := by + have hl := Real.log_le_log (by positivity : (0:ℝ)<400*(Nat.log 2 (q^r)+1:ℝ)) + (mul_le_mul_of_nonneg_left (dyadic_levels_le q r σ hσ hq hd) (by norm_num : (0:ℝ)≤400)) + have he : 400*((5/Real.log 2+1)*σ)=C*σ := by dsimp [C];ring + rw [he,Real.log_mul hC.ne' hs.ne'] at hl + exact hl.trans (by simpa only [one_mul] using (div_le_iff₀ (Real.rpow_pos_of_pos hs _)).mp hh.le) + have hdlo : σ^(7*beta η)≤D*σ^(6*beta η) := by + calc + _ = σ^beta η*σ^(6*beta η) := by rw [←Real.rpow_add hs];congr 1;ring + _ ≤ _ := mul_le_mul_of_nonneg_right hr.dlo (Real.rpow_nonneg hs.le _) + have hp : σ^(7*beta η)≤P η σ D R := + (Real.rpow_le_rpow_of_exponent_le hσ (by have := beta_pos hη;linarith)).trans + (finite_bounds hη hη' hσ hr).2.2.2.2.2.1 + refine ⟨hbound.trans hdlo,hbound.trans hp,?_⟩ + nlinarith only [hbb,hbound,hdlo] + +end SharpRamseyFive.ParameterHierarchy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Iteration/Scale.lean b/lean/OAI/Combinatorics/RamseyFive/Iteration/Scale.lean new file mode 100644 index 0000000000000000000000000000000000000000..35f1b60334fafaa275c9f35d808a757c500853a2 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Iteration/Scale.lean @@ -0,0 +1,128 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Probability.CellMass + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreRegularity +open Module ProjectiveIncidence CellVariance +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def scale (d : ℕ) (n : ℝ) : ℝ := (Nat.card K:ℝ)^d/n + +def familyCell {J : Type*} (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) : + Option J→Finset (ℙ K V) | none => S | some j => C j + +noncomputable def deviation {J : Type*} (S : Finset (ℙ K V)) + (C : J→Finset (ℙ K V)) (j : Option J) (H : ℙ K (Dual K V)) : ℝ := + cellMass (familyCell S C j) ((Nat.card K:ℝ)/S.card) H - + (familyCell S C j).card/(S.card:ℝ) + +noncomputable def threshold {J : Type*} : Option J→ℝ | none => 1/10 | some _ => 1/50 + +noncomputable def exceptional {J : Type*} [Fintype J] (S : Finset (ℙ K V)) + (C : J→Finset (ℙ K V)) : Finset (ℙ K (Dual K V)) := + Finset.univ.filter fun H => ∃ j : Option J,threshold j < |deviation S C j H| + +omit [Field K] [Finite K] in +lemma scale_nonneg (d : ℕ) (n : ℝ) (hn : 0≤n) : 0≤ scale (K:=K) d n := by + unfold scale + positivity + +lemma cell_variance_scale {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (C : Finset (ℙ K V)) {n : ℝ} (hn : 0 cell_variance_scale hdim hd _ hn + _ = 4*(Nat.card K:ℝ)*scale (K:=K) d S.card* + (∑ j : Option J,((familyCell S C j).card:ℝ)/(S.card:ℝ)) := + (Finset.mul_sum ..).symm + _ ≤ 4*(Nat.card K:ℝ)*scale (K:=K) d S.card*4 := + mul_le_mul_of_nonneg_left hsum (mul_nonneg (by positivity) (scale_nonneg _ _ hn.le)) + _ = _ := by ring + +lemma exceptional_card_bound {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + {J : Type*} [Fintype J] (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) + (hS : S.Nonempty) (hC : (∑ j,(C j).card)≤3*S.card) : + ((exceptional S C).card:ℝ)≤40000*(Nat.card K:ℝ)*scale (K:=K) d S.card := by + have hsq (H : ℙ K (Dual K V)) (hH : H∈exceptional S C) : + (1:ℝ)≤2500*∑ j : Option J,(deviation S C j H)^2 := by + obtain ⟨j,hj⟩ := (Finset.mem_filter.mp hH).2 + have ht : (1/50:ℝ)≤threshold j := by cases j <;> norm_num [threshold] + have h := ht.trans hj.le + have he := sq_abs (deviation S C j H) + have ha := abs_nonneg (deviation S C j H) + have hu : (deviation S C j H)^2≤∑ k : Option J,(deviation S C k H)^2 := + Finset.single_le_sum (fun k _ => sq_nonneg (deviation S C k H)) (Finset.mem_univ j) + nlinarith + have hn : 0≤ scale (K:=K) d S.card := scale_nonneg _ _ (Nat.cast_nonneg _) + calc + _ = ∑ H∈exceptional S C,(1:ℝ) := by simp + _ ≤ ∑ H∈exceptional S C,2500*∑ j : Option J,(deviation S C j H)^2 := + Finset.sum_le_sum hsq + _ = 2500*∑ H∈exceptional S C,∑ j : Option J,(deviation S C j H)^2 := + (Finset.mul_sum ..).symm + _ ≤ 2500*∑ H,∑ j : Option J,(deviation S C j H)^2 := + mul_le_mul_of_nonneg_left (Finset.sum_le_sum_of_subset_of_nonneg + (Finset.subset_univ _) (fun _ _ _ => Finset.sum_nonneg fun _ _ => sq_nonneg _)) (by norm_num) + _ = 2500*∑ j : Option J,∑ H,(deviation S C j H)^2 := by rw [Finset.sum_comm] + _ ≤ 2500*(16*(Nat.card K:ℝ)*scale (K:=K) d S.card) := + mul_le_mul_of_nonneg_left (total_deviation_bound hdim hd S C hS hC) (by norm_num) + _ = _ := by ring + +lemma exceptional_mass_bound {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + {J : Type*} [Fintype J] (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) + (hS : S.Nonempty) (hC : (∑ j,(C j).card)≤3*S.card) : + (∑ H∈exceptional S C,cellMass S ((Nat.card K:ℝ)/S.card) H)≤ + 100000*(Nat.card K:ℝ)*scale (K:=K) d S.card := by + have hn : (0:ℝ) sq_nonneg _) + have he := exceptional_card_bound hdim hd S C hS hC + have hB := scale_nonneg (K:=K) d (S.card:ℝ) hn.le + calc + _ ≤ ∑ H∈exceptional S C,(2+(cellMass S ((Nat.card K:ℝ)/S.card) H-1)^2) := by + apply Finset.sum_le_sum + intro H _ + nlinarith [sq_nonneg (cellMass S ((Nat.card K:ℝ)/S.card) H-3/2)] + _ = 2*((exceptional S C).card:ℝ)+ + ∑ H∈exceptional S C,(cellMass S ((Nat.card K:ℝ)/S.card) H-1)^2 := by + simp only [Finset.sum_add_distrib,Finset.sum_const,nsmul_eq_mul]; ring + _ ≤ 100000*(Nat.card K:ℝ)*scale (K:=K) d S.card := by + nlinarith [mul_nonneg (Nat.cast_nonneg (Nat.card K) : (0:ℝ)≤Nat.card K) hB] + +end SharpRamseyFive.ScoreRegularity + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Iteration/ScaleAgainstB.lean b/lean/OAI/Combinatorics/RamseyFive/Iteration/ScaleAgainstB.lean new file mode 100644 index 0000000000000000000000000000000000000000..f486a343ff4da1fef1f3e4b38da37adc65d8236d --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Iteration/ScaleAgainstB.lean @@ -0,0 +1,91 @@ +import Mathlib + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreScalars + +lemma scale_against_B {q n r s : ℝ} (hn : 0c*Real.exp σ) atTop atTop := + Real.tendsto_exp_atTop.const_mul_atTop hc + have hp : Tendsto (fun σ : ℝ=>c*σ^η) atTop atTop := + (tendsto_rpow_atTop hη).const_mul_atTop hc + filter_upwards [eventually_ge_atTop (1:ℝ),ht.eventually_ge_atTop 40000,hp.eventually_ge_atTop 19200] + with σ hσ he hp + intro n hn + have hs : 0<σ := zero_lt_one.trans_le hσ + have hpow : 1≤σ^(1+η) := Real.one_le_rpow hσ (by linarith) + have hm:=mul_le_mul_of_nonneg_left hpow (by positivity : 0≤c*Real.exp σ) + have hnreal : (40000:ℝ)≤n := by nlinarith + have hh:=mul_le_mul_of_nonneg_right hp (by positivity : 0≤Real.exp σ*σ) + have hid : c*Real.exp σ*σ^(1+η)=(c*σ^η)*(Real.exp σ*σ) := by + rw [Real.rpow_add hs,Real.rpow_one];ring + exact ⟨by exact_mod_cast hnreal,by rw [hid] at hn;nlinarith⟩ +end +end SharpRamseyFive.ParameterHierarchy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Iteration/StageState.lean b/lean/OAI/Combinatorics/RamseyFive/Iteration/StageState.lean new file mode 100644 index 0000000000000000000000000000000000000000..27dd71d6aa2d4bd99764f5ae95fdf4543087fdf4 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Iteration/StageState.lean @@ -0,0 +1,151 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.FiniteKernels +import OAI.Combinatorics.RamseyFive.Streams.SelectedExtraction + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple +open scoped Classical BigOperators +open FiniteEntropy +noncomputable section +variable {α β γ Ω κ : Type*} [Fintype α] [Fintype β] [Fintype γ] [Fintype Ω] [Fintype κ] + +def sourceSequence {n : ℕ} (reverse : Bool) (view : β→α) (x : Fin n→β) : Fin n→α := + fun i=>view (x (if reverse then i.rev else i)) + +def reverseEmbedding {n l : ℕ} (e : Fin l↪o Fin n) : Fin l↪o Fin n where + toFun i:=(e i.rev).rev + inj' := Fin.rev_injective.comp (e.injective.comp Fin.rev_injective) + map_rel_iff' := by + intro i j + change (e i.rev).rev≤(e j.rev).rev ↔ i≤j + rw [Fin.rev_le_rev,e.le_iff_le,Fin.rev_le_rev] + +lemma sourceSequence_occurs {n l : ℕ} (reverse : Bool) (view : β→α) + (x : Fin n→β) (y : Fin l→β) (h : x∈occurrences y) : + sourceSequence reverse view x∈occurrences (sourceSequence reverse view y) := by + obtain ⟨e,he⟩:=(mem_occurrences_iff x y).mp h + apply (mem_occurrences_iff _ _).mpr + cases reverse + · exact ⟨e,fun i=>congrArg view (he i)⟩ + · refine ⟨reverseEmbedding e,fun i=>?_⟩ + change view (x ((e i.rev).rev).rev)=view (y i.rev) + rw [Fin.rev_rev,he] + +structure SelectedStream (N n : ℕ) (admissible : (Fin N→α)→Prop) where + law : Law Ω + stream : Ω→Fin N→α + tuple : Ω→Fin n→β + reverse : Bool + view : β→α + selected : ∀ a,0S.stream z.1 + tuple := fun z=>S.tuple z.1 + reverse := S.reverse + view := S.view + selected := by + intro z hz + have hp : 0(S.law.nonneg _).not_gt h.1) |>.1 + exact S.selected _ hp + good := by + intro z hz + have hp : 0(S.law.nonneg _).not_gt h.1) |>.1 + exact S.good _ hp + density := S.density + density_nonneg := S.density_nonneg + density_bound := by intro s; rw [adaptive_stream]; exact S.density_bound s + +def restrict (S : SelectedStream (Ω:=Ω) (β:=β) N n admissible) + (E : Finset Ω) (hE : 0S.selected a (conditionOn_positive S.law E hE a ha).2 + good := fun a ha=>S.good a (conditionOn_positive S.law E hE a ha).2 + density := S.density/eventMass S.law E + density_nonneg := div_nonneg S.density_nonneg hE.le + density_bound := by + intro s + apply (map_conditionOn_le S.law E hE S.stream s).trans + have hh:=div_le_div_of_nonneg_right (S.density_bound s) hE.le + convert hh using 1; ring + +def extract {l : ℕ} (hl : l≤n) (S : SelectedStream (Ω:=Ω) (β:=β) N n admissible) + (positions : Ω→Finset (Fin n)) : SelectedStream (Ω:=Ω) (β:=β) N l admissible where + law := S.law + stream := S.stream + tuple := fun a=>retainedTuple hl (S.tuple a) (positions a) + reverse := S.reverse + view := S.view + selected := by + intro a ha + exact occurrences_trans _ _ _ (S.selected a ha) + (sourceSequence_occurs S.reverse S.view _ _ (retainedTuple_occurs hl _ _)) + good := S.good + density := S.density + density_nonneg := S.density_nonneg + density_bound := S.density_bound + +def changeOrientation (S : SelectedStream (Ω:=Ω) (β:=β) N n admissible) + (swap : β→γ) (back : γ→β) (hinv : Function.LeftInverse back swap) : + SelectedStream (Ω:=Ω) (β:=γ) N n admissible where + law := S.law + stream := S.stream + tuple := fun a i=>swap (S.tuple a i.rev) + reverse := !S.reverse + view := S.view ∘ back + selected := by + intro a ha + have hh : sourceSequence (!S.reverse) (S.view ∘ back) + (fun i=>swap (S.tuple a i.rev))=sourceSequence S.reverse S.view (S.tuple a) := by + funext i + cases h:S.reverse <;> simp only [sourceSequence,Bool.not_false,Bool.not_true, + Bool.false_eq_true,ite_false,ite_true,Fin.rev_rev,Function.comp_apply] <;> + exact congrArg S.view (hinv _) + rw [hh] + exact S.selected a ha + good := S.good + density := S.density + density_nonneg := S.density_nonneg + density_bound := S.density_bound + +theorem entropy_lower [Nonempty α] (hn : n≤N) + (S : SelectedStream (Ω:=Ω) (β:=β) N n admissible) : + -Real.log (2*S.density*(N.choose n:ℝ)/(Fintype.card α:ℝ)^n)≤ + entropy (map S.law S.tuple) := by + have hh:=selected_entropy hn (pair S.law S.stream + (fun a=>sourceSequence S.reverse S.view (S.tuple a))) S.density S.density_nonneg + (by simpa only [first_pair] using S.density_bound) id (by + intro s f hp + obtain ⟨a,ha,he⟩:=map_positive S.law + (fun a=>(S.stream a,sourceSequence S.reverse S.view (S.tuple a))) (s,f) hp + cases he + exact Or.inl (S.selected a ha)) + simp only [second_pair] at hh + have he:=entropy_map_le (map S.law S.tuple) (sourceSequence S.reverse S.view) + rw [map_comp] at he + exact hh.trans he + +end SelectedStream +end +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Iteration/TerminalStream.lean b/lean/OAI/Combinatorics/RamseyFive/Iteration/TerminalStream.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8a5e67c2b745c447c6953d1d02ee83c84fcea21 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Iteration/TerminalStream.lean @@ -0,0 +1,203 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.CompressionStage +import OAI.Combinatorics.RamseyFive.Entropy.FinalMarking + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple + +section +open Module ProjectiveIncidence FiniteEntropy Windows Marking Filter ParameterHierarchy +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +local instance tsFinDE (n : ℕ) : DecidableEq (Fin n) := Classical.decEq _ + +theorem eventually_no_terminal_stream {η : ℝ} (hη : 0<η) (c d : ℝ) (hc : 0 rw [hJ] + have hdiv : (n:ℝ)/c=(n:ℝ)*(1/c) := by ring + rw [hdiv] at hΛhi + have hlow' : (n:ℝ)*(4*σ+Real.log 153+(2+1/c+Real.log 800))≤entropy (map S.stream.law S.stream.tuple) := by + convert hlow using 1; congr 1; exact Subsingleton.elim _ _ + nlinarith only [hlow',hfin,hEC,hΛhi,hn] +end + +noncomputable section +variable (K α : Type) [Field K] [Finite K] [Fintype α] + +structure PolarState (N n : ℕ) (adm : (Fin N→α)→Prop) (d Λ Δ M : ℝ) where + ambient : Type + [group : AddCommGroup ambient] + [module : Module K ambient] + [dimension : FiniteDimensional K ambient] + [points : Fintype (ℙ K ambient)] + [hyperplanes : Fintype (ℙ K (Dual K ambient))] + [bipoints : Fintype (ℙ K (Dual K (Dual K ambient)))] + [pointNonempty : Nonempty (ℙ K ambient)] + [planeNonempty : Nonempty (ℙ K (Dual K ambient))] + [bipointNonempty : Nonempty (ℙ K (Dual K (Dual K ambient)))] + dim : finrank K ambient=5 + coded : CodedStream (K:=K) (V:=ambient) N n adm d Λ (Real.log (153*(Nat.card K:ℝ)^4)+Δ) M +attribute [instance] PolarState.group PolarState.module PolarState.dimension PolarState.points + PolarState.hyperplanes PolarState.bipoints PolarState.pointNonempty PolarState.planeNonempty + PolarState.bipointNonempty +variable {K α} +def PolarState.of {V : Type} [AddCommGroup V] [Module K V] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] [Nonempty (ℙ K (Dual K (Dual K V)))] + {N n : ℕ} {adm : (Fin N→α)→Prop} {d Λ Δ M : ℝ} (hd : finrank K V=5) + (S : CodedStream (K:=K) (V:=V) N n adm d Λ (Real.log (153*(Nat.card K:ℝ)^4)+Δ) M) : + PolarState K α N n adm d Λ Δ M where + ambient:=V + dim:=hd + coded:=S + +theorem eventually_polar_compression {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (c d Cm : ℝ) (hc : 0decode (s (choose s i)) + reverse := false + view := encode + selected := by + intro s hs + apply (mem_occurrences_iff _ _).mpr + refine ⟨choose s,fun i=>?_⟩ + exact (hinv _).symm + good := fun s hs=>hgood s (conditionOn_positive _ E hE s hs).1 + density := 1/eventMass (iid (uniform Fintype.card_pos) (Fin N)) E + density_nonneg := by positivity + density_bound := by + intro s + rw [map_id] + have h:=conditionOn_le (iid (uniform Fintype.card_pos) (Fin N)) E hE s + rw [iid_uniform_mass] at h + convert h using 1; ring + +def firstWitness {N n : ℕ} (hn : n≤N) (P : (Fin N→α)→(Fin n↪o Fin N)→Prop) + (s : Fin N→α) : Fin n↪o Fin N := + if h : ∃ e,P s e then h.choose else + { toFun := fun i=>⟨i.val,lt_of_lt_of_le i.isLt hn⟩ + inj' := by intro i j h; exact Fin.ext (congrArg (fun x : Fin N=>x.val) h) + map_rel_iff' := by intro i j; rfl } + +omit [Fintype α] [Nonempty α] in +lemma firstWitness_spec {N n : ℕ} (hn : n≤N) + (P : (Fin N→α)→(Fin n↪o Fin N)→Prop) (s : Fin N→α) + (h : ∃ e,P s e) : P s (firstWitness hn P s) := by + simp only [firstWitness,dite_eq_left h] + exact h.choose_spec + +omit [Fintype β] in +theorem initial_selected_exists {N n : ℕ} (hn : n≤N) + (admissible : (Fin N→α)→Prop) (consistent : (Fin n→β)→Prop) + (E : Finset (Fin N→α)) + (hE : 0decode (s (e i)))) : + ∃ S : SelectedStream (Ω:=Fin N→α) (β:=β) N n admissible, + S.density=1/eventMass (iid (uniform Fintype.card_pos) (Fin N)) E ∧ + (∀ s,0consistent (fun i=>decode (s (e i))) + let S:=initialSelectedStream admissible E hE hgood (firstWitness hn P) decode encode hinv + refine ⟨S,rfl,?_⟩ + intro s hs + exact firstWitness_spec hn P s (hselect s (conditionOn_positive _ E hE s hs).1) + +end + +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Iteration/WindowStage.lean b/lean/OAI/Combinatorics/RamseyFive/Iteration/WindowStage.lean new file mode 100644 index 0000000000000000000000000000000000000000..e92ca07548524a1d73ed6ee17691b12b3869b6f3 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Iteration/WindowStage.lean @@ -0,0 +1,128 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Trees.HistoryPrivateStream +import OAI.Combinatorics.RamseyFive.Entropy.ContextDescription +import OAI.Combinatorics.RamseyFive.Decoding.FinsetEquivPositions + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple +open Module ProjectiveIncidence FiniteEntropy Windows Marking PivotTree MessageWeights ReverseCap ScoreGeometry +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V Ω κ α : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] [Fintype Ω] [Fintype κ] [Fintype α] + {N w n : ℕ} [Nonempty (Fin n)] {admissible : (Fin N→α)→Prop} +local instance awsBDE : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance awsTDE : DecidableEq (Fin w×Fin (2*n)) := Classical.decEq _ +local instance awsIDE : DecidableEq (Slots w n) := Classical.decEq _ +variable (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (w*(4*n)) admissible) + (ctx : Ω→κ) (elig : κ→Fin w×Bool→Finset (Fin n)) (steps : ℕ) + +abbrev windowFiber := fiber (pair S.law ctx (windowTuple S)) + +def levelWindowStream (u : WindowHistory κ K V w n steps→Slots w n→ℝ) + (E : WindowHistory κ K V w n steps→Finset (Fin w)) {s : ℝ} + (W : ∀h,∀he : (E h).Nonempty,ReciprocalWindows (windowPosterior (windowFiber S ctx) h) + (u h) h.2 (survivingOriginal (E h) he) s) := + historyPrivateStream S ctx elig steps + (fun h=>WindowLevelsData (K:=K) (V:=V) (E h).card) + (fun h=>allWindowLevelLaw (windowPosterior (windowFiber S ctx) h) (u h) h.2 (E h) (W h)) + +variable (f : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V→FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (u : WindowHistory κ K V w n steps→Slots w n→ℝ) + (E : WindowHistory κ K V w n steps→Finset (Fin w)) {s : ℝ} + (W : ∀h,∀he : (E h).Nonempty,ReciprocalWindows (windowPosterior (windowFiber S ctx) h) + (u h) h.2 (survivingOriginal (E h) he) s) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (c δ τ P : ℝ) (hδ : 0<δ) + +abbrev LevelWindowSample := (z : WindowLiftSample Ω K V w n steps)× + WindowLevelsData (K:=K) (V:=V) (E (actualWindowHistory ctx steps z)).card + +def actualWindowEncoded (t : VariableTreeTape f r w) (z : LevelWindowSample ctx steps E) := + let h:=actualWindowHistory ctx steps z.1 + allWindowEncoded f r (windowPosterior (windowFiber S ctx) h) (u h) h.2 (E h) (W h) + σ hσ hq hd c δ τ P hδ t z.2 + +def actualWindowPositions (bad : WindowHistory κ K V w n steps→Slots w n→ℝ) + (t : VariableTreeTape f r w) (z : LevelWindowSample ctx steps E) : Finset (Fin (w*(2*n))) := + let h:=actualWindowHistory ctx steps z.1 + equivPositions finProdFinEquiv + (allWindowPositions f r (windowPosterior (windowFiber S ctx) h) (u h) h.2 (E h) (W h) + σ hσ hq hd c δ τ P hδ (bad h) t (windowTuple S z.1.1,z.2)) + +lemma actualWindow_loss_mean (bad : WindowHistory κ K V w n steps→Slots w n→ℝ) : + mean (adaptiveLaw (levelWindowStream S ctx elig steps u E W).law (fun _=>variableTreeLaw f r w)) + (fun z=>((actualWindowPositions S ctx steps f r u E W σ hσ hq hd c δ τ P hδ bad z.2 z.1)ᶜ.card:ℝ))= + mean (preRoundLaw (first (pair S.law ctx (windowTuple S))) (windowFiber S ctx) elig steps) + (fun h=>mean (allWindowExperiment f r (windowPosterior (windowFiber S ctx) h) + (u h) h.2 (E h) (W h)) (fun z=> + ((allWindowPositions f r (windowPosterior (windowFiber S ctx) h) (u h) h.2 (E h) (W h) + σ hσ hq hd c δ τ P hδ (bad h) z.2.2 (z.1,z.2.1))ᶜ.card:ℝ))) := by + unfold actualWindowPositions + simp only [equivPositions_compl_card] + have h:=historyPrivateStream_mean S ctx elig steps + (fun h=>WindowLevelsData (K:=K) (V:=V) (E h).card) + (fun h=>allWindowLevelLaw (windowPosterior (windowFiber S ctx) h) (u h) h.2 (E h) (W h)) + (variableTreeLaw f r w) + (fun h x v t=>((allWindowPositions f r (windowPosterior (windowFiber S ctx) h) + (u h) h.2 (E h) (W h) σ hσ hq hd c δ τ P hδ (bad h) t (x,v))ᶜ.card:ℝ)) + simpa only [levelWindowStream,allWindowExperiment,mean_adaptive] using h + +theorem actualWindow_stage {l : ℕ} (hl : lmean (allWindowExperiment f r (windowPosterior (windowFiber S ctx) h) + (u h) h.2 (E h) (W h)) (fun z=> + ((allWindowPositions f r (windowPosterior (windowFiber S ctx) h) (u h) h.2 (E h) (W h) + σ hσ hq hd c δ τ P hδ (bad h) z.2.2 (z.1,z.2.1))ᶜ.card:ℝ)))≤ + ((w*(2*n):ℝ)-l)/10) : + ∃ (t : VariableTreeTape f r w) + (hE : 0l≤(actualWindowPositions S ctx steps f r u E W + σ hσ hq hd c δ τ P hδ bad t z).card)), + let S':=((levelWindowStream S ctx elig steps u E W).restrict _ hE).extract hl.le + (actualWindowPositions S ctx steps f r u E W σ hσ hq hd c δ τ P hδ bad t) + S'.density≤(10/9)*S.density ∧ + Nonempty (ContextDescription + (κ:=VariableTreeMessage f r t (Finset.univ,Finset.univ)×RunAssignment l (w+1)) + S'.law S'.tuple (L+(w+1)*Real.log (l+1)) M) := by + obtain ⟨t,hE,_,hden,hdesc⟩:=fixed_table_stage_dependent hl + (levelWindowStream S ctx elig steps u E W) (variableTreeLaw f r w) + (fun t=>VariableTreeMessage f r t (Finset.univ,Finset.univ)) + (actualWindowPositions S ctx steps f r u E W σ hσ hq hd c δ τ P hδ bad) + (actualWindowEncoded S ctx steps f r u E W σ hσ hq hd c δ τ P hδ) + (fun t=>variableTreeDomain f r t (Finset.univ,Finset.univ)) + (fun z i=>survivorRank (E (actualWindowHistory ctx steps z.1)) + (finProdFinEquiv.symm i : Fin w×Fin (2*n)).1) + (fun _=>middleRank_monotone _) + (fun t=>variableTreeCost f r t (Finset.univ,Finset.univ)) L M + (fun t=>variableTree_weight f r t _ hf hr) + (fun t z _=>hcost _ z.2 t) (fun t z _ j=>hcap _ z.2 t j) (by + intro t z _ i hi + rw [actualWindowPositions,mem_equivPositions] at hi + exact (Finset.mem_filter.mp hi).2.2.2) (by + convert (actualWindow_loss_mean S ctx elig steps f r u E W σ hσ hq hd c δ τ P hδ bad).trans_le hloss using 1 + · apply congrArg (mean _) + funext z + congr 2 + ext i + simp only [Finset.mem_compl] + · simp only [Nat.cast_mul,Nat.cast_ofNat]) + refine ⟨t,hE,hden,?_⟩ + simpa only [Nat.cast_add,Nat.cast_one] using hdesc +end +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Main.lean b/lean/OAI/Combinatorics/RamseyFive/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..aa552a79bd96916e70578ef9975665b40045ad2b --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Main.lean @@ -0,0 +1,31 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Bounds.SamplingParameter +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.SharpRamsey.Geometry.Weight +import OAI.Combinatorics.RamseyFive.Entropy.FinalValidationBudget +import OAI.Combinatorics.RamseyFive.Iteration.EventuallyRichScale +import OAI.Combinatorics.RamseyFive.Entropy.RetainedCounters +import OAI.Combinatorics.RamseyFive.Entropy.TreeOmissionBound +import OAI.Combinatorics.RamseyFive.Entropy.RevealMarginalDeficit +import OAI.Combinatorics.RamseyFive.Geometry.LowConflictSubsets +import OAI.Combinatorics.RamseyFive.Bounds.PrimeStream + +namespace OAI + +namespace SharpRamseyFive +open Filter + +theorem sharpBounds : SharpBounds := by + obtain ⟨C, hC, n₀, hupper⟩ := upper_bound_eventually + refine ⟨C, hC, ?_⟩ + intro ε hε + have hlo := lower_arbitrary_slack (fun η hη hη' => primeConstruction hη hη') hε + obtain ⟨m₀, hlower⟩ := eventually_atTop.mp hlo + exact ⟨max n₀ m₀, fun t ht => + ⟨hlower t ((le_max_right _ _).trans ht), hupper t ((le_max_left _ _).trans ht)⟩⟩ + +theorem main : SharpBounds ∧ SharpExponent := + ⟨sharpBounds, sharpExponent_of_sharpBounds sharpBounds⟩ +end SharpRamseyFive + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/AllHistoryWindowLoss.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/AllHistoryWindowLoss.lean new file mode 100644 index 0000000000000000000000000000000000000000..ea52e59f4e9523da535f5e598270bcf3957caa7a --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/AllHistoryWindowLoss.lean @@ -0,0 +1,70 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.WindowDeletionCount + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.FiniteEntropy SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.Windows +open ReverseCap ScoreGeometry BinaryTree TreeCodec PivotTree +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +local instance allHistBDE (w : ℕ) : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance allHistIDE (w n : ℕ) : DecidableEq (Slots w n) := Classical.decEq _ +local instance allHistTDE (w n : ℕ) : DecidableEq (Fin w×Fin (2*n)) := Classical.decEq _ +variable {K V κ : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] [Fintype κ] + {w n steps rem : ℕ} [Nonempty (Fin n)] + +abbrev WindowHistory (κ K V : Type) [Field K] [AddCommGroup V] [Module K V] + (w n steps : ℕ) := + (κ×BlockHistory (Fin w×Bool) (Fin n) (Fin w×Fin (2*n)) (FlagPair K V) steps)× + (Fin w×Bool→Fin n) + +def windowPosterior (p : κ→Law (Slots w n→FlagPair K V)) (z : WindowHistory κ K V w n steps) : + Law (Slots w n→FlagPair K V) := historyPosterior (p z.1.1) z.1.2 + +theorem allHistory_window_loss + (f : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V→FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (μ : Law κ) (p : κ→Law (Slots w n→FlagPair K V)) + (S : κ→(Fin w×Bool)→Finset (Fin n)) (hrem : 0 + mean (allWindowExperiment f r (windowPosterior p h) (u h) h.2 (E h) (W h)) (fun z=> + ((allWindowPositions f r (windowPosterior p h) (u h) h.2 (E h) (W h) + σ hσ hq hd c₀ δ τ P hδ (preRoundBad μ p S steps J d ε c h) + z.2.2 (z.1,z.2.1))ᶜ.card:ℝ)))≤ + 5*mean (preRoundLaw μ p S steps) (fun h=> + ∑i∈blockActive (historyUnused (S h.1.1) h.1.2),preRoundBad μ p S steps J d ε c h i)+ + (2*n:ℝ)*mean (preRoundLaw μ p S steps) (fun h=> + ((goodWindowSet (preRoundBad μ p S steps J d ε c h) h.2).filter fun v=>k + allWindow_loss f r (windowPosterior p h) (u h) h.2 (E h) (W h) + σ hσ hq hd c₀ δ τ P hδ (preRoundBad μ p S steps J d ε c h) (drop h) k B + (hE h hh') hB (hh h hh')) + simp only [mean_add,mean_smul,mean_const] at hb + have hrdy:=preRound_ready_loss μ p S hrem hn hS J d ε c + exact hb.trans (add_le_add (add_le_add hrdy le_rfl) le_rfl) +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/AllWindowBounds.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/AllWindowBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..1725b3cec057924c1b727d6b64dac7f03c241ead --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/AllWindowBounds.lean @@ -0,0 +1,66 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.WindowDeletionCount + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.FiniteEntropy SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.Windows +open ReverseCap ScoreGeometry BinaryTree TreeCodec PivotTree +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +local instance boundsBDE (w : ℕ) : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance boundsIDE (w n : ℕ) : DecidableEq (Slots w n) := Classical.decEq _ +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V))) ] +variable (f : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V→FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + {w n : ℕ} [Nonempty (Fin n)] (p : Law (Slots w n→FlagPair K V)) + (u : Slots w n→ℝ) (sel : Fin w×Bool→Fin n) (E : Finset (Fin w)) + {s : ℝ} (W : ∀hE : E.Nonempty,ReciprocalWindows p u sel (survivingOriginal E hE) s) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) + +omit [Nonempty (Fin n)] in +lemma surviving_domain_card (hE : E.Nonempty) (k c τ P : ℝ) (hc : 0(W hE).firstSupport i (z.1 i)) (fun i=>(W hE).secondSupport i (z.2 i)) + (fun i=>(W hE).first_nonempty i _) (fun i=>(W hE).second_nonempty i _) + c τ P (k+2*s+Real.log 4) hc hc9 hb + (fun i=>(W hE).support_product k + (fun v=>hdrop _ (survivingOriginal_mem E hE v)) i (z.1 i) (z.2 i)) j + +omit [Nonempty (Fin n)] in +theorem allWindow_domain_card (k c τ P : ℝ) (hc : 0 linarith + · exact hu +lemma band_lo_le_hi {σ width : ℝ} {b : Fin 7} (hσ : 0≤σ) (hw : 0≤width) : + bandLo σ width b≤bandHi σ width b := by + unfold bandLo bandHi + split_ifs <;> linarith +lemma band_gap_closed {σ width : ℝ} {b : Fin 7} (hb : b.val%2=0) : + bandHi σ width b-bandLo σ width b=2*width := by simp [bandHi,bandLo,hb];ring +lemma band_gap_open {σ width : ℝ} {b : Fin 7} (hb : b.val%2≠0) : + bandHi σ width b-bandLo σ width b=3*σ := by simp [bandHi,bandLo,hb];ring +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/ChooseLevel.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/ChooseLevel.lean new file mode 100644 index 0000000000000000000000000000000000000000..e9d09e99c757319700918f35a60f4fc2ab1be1bb --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/ChooseLevel.lean @@ -0,0 +1,220 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.State +import OAI.Combinatorics.RamseyFive.Bounds.UpperSet + +namespace OAI + +namespace SharpRamseyFive.Marking + +section +open Module SharpRamseyFive.ProjectiveIncidence +open scoped LinearAlgebra.Projectivization Classical BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Fintype (ℙ K (Dual K V))] + +lemma card_upper (W : ℙ K (Dual K V) → Submodule K (Dual K V)) (r : ℕ) : + (upperSet W r).card=∑ l∈Finset.range (r+1),(levelSet W l).card := by + have hh:=Finset.sum_card_fiberwise_eq_card_filter (Finset.univ : Finset (ℙ K (Dual K V))) + (Finset.range (r+1)) (fun y => finrank K (W y)) + simpa only [levelSet,upperSet,Finset.mem_range,Nat.lt_succ_iff] using hh.symm + +lemma exists_level (W : ℙ K (Dual K V) → Submodule K (Dual K V)) (r : ℕ) : + ∃ l,l≤r ∧ (∀ j,j≤r → (levelSet W j).card≤(levelSet W l).card) ∧ + (upperSet W r).card≤(r+1)*(levelSet W l).card := by + obtain ⟨l,hl,hh⟩:=Finset.exists_max_image (Finset.range (r+1)) + (fun l => (levelSet W l).card) (by simp) + refine ⟨l,Nat.le_of_lt_succ (Finset.mem_range.mp hl),?_,?_⟩ + · intro j hj + exact hh j (Finset.mem_range.mpr (Nat.lt_succ_iff.mpr hj)) + · rw [card_upper] + calc + _ ≤∑ j∈Finset.range (r+1),(levelSet W l).card := Finset.sum_le_sum hh + _ = _ := by simp + +noncomputable def chooseLevel (W : ℙ K (Dual K V) → Submodule K (Dual K V)) (r : ℕ) : ℕ := + (exists_level W r).choose + +lemma chooseLevel_le (W : ℙ K (Dual K V) → Submodule K (Dual K V)) (r : ℕ) : + chooseLevel W r≤r := (exists_level W r).choose_spec.1 + +lemma chooseLevel_large (W : ℙ K (Dual K V) → Submodule K (Dual K V)) (r : ℕ) : + (upperSet W r).card≤(r+1)*(levelSet W (chooseLevel W r)).card := + (exists_level W r).choose_spec.2.2 + +lemma chooseLevel_nonempty (W : ℙ K (Dual K V) → Submodule K (Dual K V)) + (b : ℙ K (Dual K V)) : + (levelSet W (chooseLevel W (finrank K (W b)))).Nonempty := by + have hb : b∈upperSet W (finrank K (W b)) := Finset.mem_filter.mpr ⟨Finset.mem_univ _,le_rfl⟩ + have hc := chooseLevel_large W (finrank K (W b)) + have hn := Finset.card_pos.mpr ⟨b,hb⟩ + apply Finset.card_pos.mp + by_contra h + have hh : (levelSet W (chooseLevel W (finrank K (W b)))).card=0 := by omega + rw [hh,mul_zero] at hc + omega + +lemma chooseLevel_sublevel (W : ℙ K (Dual K V) → Submodule K (Dual K V)) (r : ℕ) + (hr : r≤4) : + (upperSet W (chooseLevel W r)).card≤5*(levelSet W (chooseLevel W r)).card := by + have hm : upperSet W (chooseLevel W r)⊆upperSet W r := by + intro y hy + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,(Finset.mem_filter.mp hy).2.trans (chooseLevel_le W r)⟩ + exact (Finset.card_le_card hm).trans ((chooseLevel_large W r).trans (Nat.mul_le_mul_right _ (by omega))) + +end + +section +open Module SharpRamseyFive.ProjectiveIncidence +open scoped LinearAlgebra.Projectivization Classical BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +omit [Fintype (ℙ K (Dual K V))] in +lemma coannihilator_card_bound (hdim : finrank K V=5) + (W : Submodule K (Dual K V)) (r : ℕ) (hr : finrank K W=r) (hr4 : r≤4) : + ((Finset.univ.filter fun a : ℙ K V => a.submodule≤W.dualCoannihilator).card:ℝ)≤ + 2*(Nat.card K:ℝ)^(4-r) := by + have hd := Subspace.finrank_add_finrank_dualCoannihilator_eq W + rw [hr,hdim] at hd + have hdc : finrank K W.dualCoannihilator=5-r := by omega + have hcard : ((Finset.univ.filter fun a : ℙ K V => a.submodule≤W.dualCoannihilator).card:ℝ)= + ∑ i∈Finset.range (5-r),(Nat.card K:ℝ)^i := by + rw [subspace_finset_card,hdc] + push_cast + rfl + rw [hcard] + have hq : (2:ℝ)≤Nat.card K := by exact_mod_cast Finite.one_lt_card (α := K) + have hh:=q_mul_geometric_bound (Nat.card K:ℝ) hq (5-r) + have he : 5-r=(4-r)+1 := by omega + rw [he,pow_succ] at hh + rw [he] + nlinarith + +theorem popular_joint_count (hdim : finrank K V=5) + (W : ℙ K (Dual K V) → Submodule K (Dual K V)) + (r l : ℕ) (hlr : l≤r) (hr : r≤4) (hZ : (levelSet W l).Nonempty) + (B : Finset (ℙ K (Dual K V))) + (hB : ∀ b∈B,finrank K (W b)=r ∧ + ((levelSet W l).card:ℝ)/(16*Nat.card K)≤ memberships W (levelSet W l) b) : + (((Finset.univ ×ˢ B).filter fun ab : ℙ K V × ℙ K (Dual K V) => + ab.1.submodule≤(W ab.2).dualCoannihilator).card:ℝ)≤64*(Nat.card K:ℝ)^4 := by + have hcard := popular_count W (levelSet W l) hZ l (fun y hy => (Finset.mem_filter.mp hy).2) + have hsub : B⊆Finset.univ.filter fun b : ℙ K (Dual K V) => + ((levelSet W l).card:ℝ)/(16*Nat.card K)≤ memberships W (levelSet W l) b := by + intro b hb + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,(hB b hb).2⟩ + have hq : (1:ℝ)≤Nat.card K := by exact_mod_cast (Finite.one_lt_card (α := K)).le + have hbcard : (B.card:ℝ)≤32*(Nat.card K:ℝ)^r := by + have hb : (B.card:ℝ)≤(Finset.univ.filter fun b : ℙ K (Dual K V) => + ((levelSet W l).card:ℝ)/(16*Nat.card K)≤ memberships W (levelSet W l) b).card := by + exact_mod_cast Finset.card_le_card hsub + exact hb.trans (hcard.trans (mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hq hlr) (by norm_num))) + rw [←Finset.sum_boole,Finset.sum_product,Finset.sum_comm] + calc + _ ≤ ∑ b∈B,2*(Nat.card K:ℝ)^(4-r) := by + apply Finset.sum_le_sum + intro b hb + rw [Finset.sum_boole] + exact coannihilator_card_bound hdim (W b) r (hB b hb).1 hr + _ = (B.card:ℝ)*(2*(Nat.card K:ℝ)^(4-r)) := by simp + _ ≤ (32*(Nat.card K:ℝ)^r)*(2*(Nat.card K:ℝ)^(4-r)) := + mul_le_mul_of_nonneg_right hbcard (by positivity) + _ = _ := by + have hp : (Nat.card K:ℝ)^r*(Nat.card K:ℝ)^(4-r)=(Nat.card K:ℝ)^4 := by + rw [←pow_add,Nat.add_sub_of_le hr] + nlinarith [hp] + +end + +open Module SharpRamseyFive.ProjectiveIncidence +open scoped LinearAlgebra.Projectivization Classical BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Fintype (ℙ K (Dual K V))] + +def Expensive (W : ℙ K (Dual K V) → Submodule K (Dual K V)) + (a : ℙ K V) (b : ℙ K (Dual K V)) (q : ℝ) : Prop := + let Z:=levelSet W (chooseLevel W (finrank K (W b))) + ((Z.filter fun y => b.submodule≤W y).card:ℝ)<(Z.card:ℝ)/(16*q) ∧ + (Z.card:ℝ)/(8*q)<((Z.filter fun y => Incident a y).card:ℝ) + +noncomputable def scanSet (a : ℕ → ℙ K V) (b : ℕ → ℙ K (Dual K V)) (q : ℝ) : ℕ → Finset ℕ + | 0 => ∅ + | n+1 => if Expensive (state a b (scanSet a b q n)) (a n) (b n) q + then insert n (scanSet a b q n) else scanSet a b q n + +noncomputable def scanState (a : ℕ → ℙ K V) (b : ℕ → ℙ K (Dual K V)) + (q : ℝ) (n : ℕ) : ℙ K (Dual K V) → Submodule K (Dual K V) := state a b (scanSet a b q n) + +omit [FiniteDimensional K V] in +lemma scanSet_subset (a : ℕ → ℙ K V) (b : ℕ → ℙ K (Dual K V)) (q : ℝ) (n : ℕ) : + scanSet a b q n⊆Finset.range n := by + induction n with + | zero => simp [scanSet] + | succ n ih => + rw [scanSet] + split_ifs + · intro i hi + rcases Finset.mem_insert.mp hi with rfl|hi + · exact Finset.mem_range.mpr (Nat.lt_succ_self _) + · exact Finset.mem_range.mpr (Nat.lt_succ_of_lt (Finset.mem_range.mp (ih hi))) + · exact Finset.Subset.trans ih (Finset.range_mono (Nat.le_succ n)) + +omit [FiniteDimensional K V] in +lemma scanSet_mono (a : ℕ → ℙ K V) (b : ℕ → ℙ K (Dual K V)) (q : ℝ) (n : ℕ) : + scanSet a b q n⊆scanSet a b q (n+1) := by + rw [scanSet] + split_ifs + · exact Finset.subset_insert _ _ + · exact Finset.Subset.refl _ + +omit [FiniteDimensional K V] in +lemma scanState_mono (a : ℕ → ℙ K V) (b : ℕ → ℙ K (Dual K V)) + (q : ℝ) (n : ℕ) (y : ℙ K (Dual K V)) : + scanState a b q n y≤ scanState a b q (n+1) y := + state_mono a b (scanSet_mono a b q n) y + +omit [FiniteDimensional K V] in +lemma scanState_update (a : ℕ → ℙ K V) (b : ℕ → ℙ K (Dual K V)) + (q : ℝ) (n : ℕ) (he : Expensive (scanState a b q n) (a n) (b n) q) : + scanState a b q (n+1)=nextState (scanState a b q n) (a n) (b n) := by + funext y + change state a b (scanSet a b q (n+1)) y=_ + change Expensive (state a b (scanSet a b q n)) (a n) (b n) q at he + rw [scanSet,ite_eq_left he,state_insert] + unfold nextState + split_ifs + · rfl + · exact bot_sup_eq _ + +lemma scan_rank (hdim : finrank K V=5) (a : ℕ → ℙ K V) (b : ℕ → ℙ K (Dual K V)) + (q : ℝ) (N : ℕ) + (hF : ∀ i j,i + Expensive (state a b (scanSet a b q n)) (a n) (b n) q).card := by + induction N with + | zero => simp [scanSet] + | succ N ih => + have hn : N∉scanSet a b q N := fun h => (Nat.lt_irrefl N) (Finset.mem_range.mp (scanSet_subset a b q N h)) + rw [scanSet,Finset.range_add_one,Finset.filter_insert] + split_ifs with h + · rw [Finset.card_insert_of_notMem hn,Finset.card_insert_of_notMem (by simp),ih] + · exact ih + +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/ClassPrepared.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/ClassPrepared.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc76e6d194de4f783b42b7654fa02f40c7a38779 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/ClassPrepared.lean @@ -0,0 +1,118 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.ClassifiedStream +import OAI.Combinatorics.RamseyFive.Entropy.DescriptionClean + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module ProjectiveIncidence FiniteEntropy SelectedTuple CoreGeometry +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V Ω κ α : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] [Fintype Ω] [Fintype κ] [Fintype α] + {N n l : ℕ} {admissible : (Fin N→α)→Prop} +local instance cpFinDE (n : ℕ) : DecidableEq (Fin n) := Classical.decEq _ + +def classPrepared (hd : finrank K V=5) (width : ℝ) (hw : 0≤width) + (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N n admissible) + (ctx : Ω→κ) (hl : l≤n) (a : SlotClass) + (hE : 0∃u,Real.log (Nat.card K)≤u ∧ u≤4*Real.log (Nat.card K) ∧ + ForwardCaps D u ∧ BandCondition (Real.log (Nat.card K)) width u b + | .inr (.inl b)=>∃u,Real.log (Nat.card K)≤u ∧ u≤4*Real.log (Nat.card K) ∧ + ReverseCaps D u ∧ BandCondition (Real.log (Nat.card K)) width u b + | .inr (.inr (r,s))=>5 P (f x)) := by + have h := sum_map p f (fun z => if P z then (1:ℝ) else 0) + simpa only [eventWeight,mul_ite,mul_one,mul_zero,ite_mul,one_mul,zero_mul] using h +end +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.LowConflict +open Module SharpRamseyFive.FiniteEntropy SharpRamseyFive.CoreGeometry +open scoped BigOperators Classical +noncomputable section +variable {K V α β : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Fintype α] [Fintype β] {n : ℕ} + +def tupleMarginal (p : Law (Fin n → α × β)) (i : Fin n) : Law (α × β) := + map p (fun x => x i) + +def tupleCapture (p : Law (Fin n → α × β)) (v : α → V) + (w : β → Module.Dual K V) (good : Fin n → Fin n → α → β → Prop) + (i j : Fin n) (x : Fin n → α × β) : Prop := + i x i) (a,b) h + simpa only [hxi] using hp x hx i + +theorem tuple_low_conflict (hdim : finrank K V=5) + (p : Law (Fin n → α × β)) (v : α → V) (w : β → Module.Dual K V) + (good : Fin n → Fin n → α → β → Prop) + (hc : ∀ x,0

x i) (fun x => x j)) + tupleCollision p v w good i j) := by + let pp := pair p (fun x => x i) (fun x => x j) + have he : eventWeight pp (fun z => capturedEvent (first pp) (second pp) w v + (good i j) z.1.1 z.1.2 z.2.1 z.2.2) = tupleCollision p v w good i j := by + dsimp only [pp] + rw [first_pair, second_pair, pair, eventWeight_map] + unfold tupleCollision + congr 1 + funext x + simp only [tupleCapture,tupleMarginal,hij,true_and] + have h := low_conflict_bound hdim pp w v (good i j) (by + intro z hz hg + obtain ⟨x,hx,he⟩ := map_positive p (fun x => (x i,x j)) z hz + subst z + exact hc x hx i j hij hg) + rw [he] at h + simpa only [pp,first_pair,second_pair,tupleMarginal,relationMass_crossed] using h + +omit [FiniteDimensional K V] in +lemma tuple_collision_count (p : Law (Fin n → α × β)) (v : α → V) + (w : β → Module.Dual K V) (good : Fin n → Fin n → α → β → Prop) (M : ℝ) + (hc : ∀ x,0

firstCore (tupleMarginal p t) w (x t).1) + (fun t => (secondCore (K := K) (tupleMarginal p t) v (x t).2).dualAnnihilator) + (fun t => (v (x t).1,w (x t).2)) i j) + (hocc : ∀ x,0

firstCore (tupleMarginal p t) w (x t).1) + (fun x t => (secondCore (K := K) (tupleMarginal p t) v (x t).2).dualAnnihilator) + (fun x t => (v (x t).1,w (x t).2)) M hocc) + apply Finset.sum_le_sum + intro i _ + apply Finset.sum_le_sum + intro j _ + apply Finset.sum_le_sum + intro x _ + by_cases hp : p x=0 + · simp [hp] + · have hp' : 0

norm_num) + +theorem closed_tuple_collision_bound (hdim : finrank K V=5) (r : ℕ) (hr : r≤5) + (p : Law (Fin n → α × β)) (v : α → V) (w : β → Module.Dual K V) + (good : Fin n → Fin n → α → β → Prop) (M : ℝ) + (hp : ∀ x,0

(b,c)∈swapDomain D).card= + (Finset.univ.filter fun a=>(a,b)∈D).card := by + apply Eq.symm + apply Finset.card_equiv bidualPoint + intro a + simp only [Finset.mem_filter,Finset.mem_univ,true_and] + exact (mem_swapDomain_iff D (a,b)).symm + +omit [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K (Dual K V)))] in +lemma swapDomain_second_partners (D : Finset (FlagPair K V)) (c : ℙ K (Dual K (Dual K V))) : + (Finset.univ.filter fun b=>(b,c)∈swapDomain D).card= + (Finset.univ.filter fun b=>(bidualPoint.symm c,b)∈D).card := by + congr 1 + ext b + simp only [Finset.mem_filter,Finset.mem_univ,true_and] + have hh:=mem_swapDomain_iff D (bidualPoint.symm c,b) + simpa only [swapFlag_apply,Equiv.apply_symm_apply] using hh + +omit [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] in +lemma ReverseCaps.swap {D : Finset (FlagPair K V)} {u : ℝ} (h : ReverseCaps D u) : + ForwardCaps (swapDomain D) u := by + simpa only [ForwardCaps,ReverseCaps,swapDomain_first_card,swapDomain_second_card] using h + +structure HighCaps (D : Finset (FlagPair K V)) (r r' : ℕ) : Prop where + flag : (D.card:ℝ)≤153*(Nat.card K:ℝ)^4 + first : ((D.image Prod.fst).card:ℝ)≤32*(Nat.card K:ℝ)^r' + second : ((D.image Prod.snd).card:ℝ)≤32*(Nat.card K:ℝ)^r + firstPartners : ∀a,((Finset.univ.filter fun b=>(a,b)∈D).card:ℝ)≤2*(Nat.card K:ℝ)^(4-r') + secondPartners : ∀b,((Finset.univ.filter fun a=>(a,b)∈D).card:ℝ)≤2*(Nat.card K:ℝ)^(4-r) + +lemma HighCaps.swap {D : Finset (FlagPair K V)} {r r' : ℕ} (h : HighCaps D r r') : + HighCaps (swapDomain D) r' r := by + constructor + · simpa only [swapDomain,Finset.card_map] using h.flag + · simpa only [swapDomain_first_card] using h.second + · simpa only [swapDomain_second_card] using h.first + · intro b + simpa only [swapDomain_first_partners] using h.secondPartners b + · intro c + simpa only [swapDomain_second_partners] using h.firstPartners (bidualPoint.symm c) + +variable [Finite K] {N : ℕ} +lemma marking_highCaps (hd : finrank K V=5) + (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) + (hne : (markingDomain m i).Nonempty) + (hp : (m.1 i).1.2.1=true) (hp' : (m.1 i).1.2.2=true) : + HighCaps (markingDomain m i) (m.1 i).1.1.1.val (m.1 i).1.1.2.val := by + have hh:=marking_popular_caps hd m i hne hp hp' + exact ⟨markingDomain_card hd m i,hh.2.2.1,hh.2.2.2, + marking_popular_partners_first hd m i hp',marking_popular_partners_second hd m i hp⟩ +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/GoodWindowVariation.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/GoodWindowVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..e628ecc909fc142abc74971b12868485f42077f5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/GoodWindowVariation.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.WindowLevels +import OAI.Combinatorics.RamseyFive.Entropy.OrderedWindowVariation + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.FiniteEntropy SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.Windows +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + {w r : ℕ} [Nonempty (Fin r)] +local instance goodVarBDE : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance goodVarIDE : DecidableEq (Slots w r) := Classical.decEq _ + +omit [Nonempty (Fin r)] in +theorem reciprocal_large_window_count (hdim : finrank K V=5) + (p : Law (Slots w r→FlagPair K V)) (u : Slots w r→ℝ) + (sel : (Fin w×Bool)→Fin r) (s d ε k lo hi : ℝ) (G : Finset (Fin w)) + (W : ReciprocalWindows p u sel (fun i : G=>i.val) s) + (hcons : ∀x,0

ku (earlySlot sel i)) (fun i=>u (lateSlot sel i)) + lo hi (2*s+Real.log 64) k hc hk hlohi (fun i _=>(hu _).2) (fun i _=>(hu _).1) + · intro i hi + rw [←add_assoc] + apply ordered_good_u_monotone hdim p (slotEquiv w r) u s ε hcons + (earlySlot sel i) (lateSlot sel i) (early_late_le sel i i le_rfl) + (W.early ⟨i,hi⟩) (W.late ⟨i,hi⟩) _ hsmall + exact (good_index_scores _ d ε p _ (fun _ _=>orderedCollision_nonneg ..) + sel _ (hgood i hi).1).2 (i,true) (by simp [OtherBlock,earlySlot]) + · intro i hi j hj hij + rw [←add_assoc] + apply ordered_good_u_monotone hdim p (slotEquiv w r) u s ε hcons + (lateSlot sel i) (earlySlot sel j) (ordered_windows _ _ hij) + (W.late ⟨i,hi⟩) (W.early ⟨j,hj⟩) _ hsmall + exact (good_index_scores _ d ε p _ (fun _ _=>orderedCollision_nonneg ..) + sel _ (hgood i hi).2).2 (j,false) (by simp [OtherBlock,lateSlot]) +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/HighChosenRound.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/HighChosenRound.lean new file mode 100644 index 0000000000000000000000000000000000000000..4427ce23133659527ff64c0b0f3e6254f7bd6b30 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/HighChosenRound.lean @@ -0,0 +1,63 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.PreparedWindows +import OAI.Combinatorics.RamseyFive.Marking.OrderedHighConflict + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module ProjectiveIncidence FiniteEntropy Windows CoreGeometry +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V κ : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype κ] {w n : ℕ} [Nonempty (Fin n)] +local instance hcrBDE : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance hcrTDE : DecidableEq (Fin w×Fin (2*n)) := Classical.decEq _ +local instance hcrIDE : DecidableEq (Slots w n) := Classical.decEq _ +omit [Finite K] [FiniteDimensional K V] [Nonempty (Fin n)] in +lemma orderedHigh_collision_subset (p : Law (Slots w n→FlagPair K V)) (s : ℝ) + (U : Finset (Slots w n)) : + (∑i∈U,∑j∈U,orderedHighCollision p (slotEquiv w n) s i j)≤ + ∑i,∑j,orderedHighCollision p (slotEquiv w n) s i j := by + apply (Finset.sum_le_sum (fun i _=>Finset.sum_le_sum_of_subset_of_nonneg + (Finset.subset_univ U) (fun j _ _=>orderedHighCollision_nonneg p _ s i j))).trans + exact Finset.sum_le_sum_of_subset_of_nonneg (Finset.subset_univ U) + (fun i _ _=>Finset.sum_nonneg (fun j _=>orderedHighCollision_nonneg p _ s i j)) + +theorem exists_high_three_round (hd : finrank K V=5) + (μ : Law κ) (p : κ→Law (Slots w n→FlagPair K V)) + (elig : κ→Fin w×Bool→Finset (Fin n)) (rounds rem : ℕ) + (hrounds : 0activeDeficit (p a) (blockActive (elig a)) J)≤budget) + (hs : 2 ≤ s) (hsmall : Real.log 32+3*s + ∑j∈blockActive (historyUnused (elig z.1.1) z.1.2), + preRoundBad μ p elig i.val J d ε + (fun a h=>orderedHighCollision (historyPosterior (p a) h) (slotEquiv w n) s) z j)≤ + budget/d+(2*budget/rounds+(4*(w*(4*n):ℝ)*M)/rem)/ε := by + apply exists_small_deletion_round μ p elig rounds rem hrounds hrem hS J d ε budget + (4*(w*(4*n):ℝ)*M) hdpos hε D hJ hp hfix hbudget + (fun i a h=>orderedHighCollision (historyPosterior (p a) h) (slotEquiv w n) s) + · intro i a h x y + exact orderedHighCollision_nonneg _ _ _ _ _ + · intro i a ha h hh + apply (orderedHigh_collision_subset _ s _).trans + have hn : ((w*(4*n):ℕ):ℝ)=w*(4*n) := by push_cast;rfl + rw [←hn] + apply orderedHigh_collision_budget hd _ _ s M hs hsmall + · intro x hx j + exact hinc a ha x (history_support (p a) i.val h x hx) j + · intro x hx W + exact hocc a ha x (history_support (p a) i.val h x hx) W +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/HighDomainEndpoints.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/HighDomainEndpoints.lean new file mode 100644 index 0000000000000000000000000000000000000000..6549a5323642dc464cddb34e6e45608f6b8ae6bf --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/HighDomainEndpoints.lean @@ -0,0 +1,148 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.GoodPairScores +import OAI.Combinatorics.RamseyFive.Entropy.WindowReadiness +import OAI.Combinatorics.RamseyFive.Marking.DomainTransport +import OAI.Combinatorics.RamseyFive.Marking.HighLowConflict +import OAI.Combinatorics.RamseyFive.Marking.HighSampleRetention + +namespace OAI + +namespace SharpRamseyFive.Marking + +section +open Module ProjectiveIncidence FiniteEntropy HighSamples +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] +local instance hdePDE : DecidableEq (ℙ K V) := Classical.decEq _ +local instance hdeDDE : DecidableEq (ℙ K (Dual K V)) := Classical.decEq _ + +omit [FiniteDimensional K V] in +lemma HighCaps.endpoint_bad {D : Finset (FlagPair K V)} {r r' : ℕ} + (h : HighCaps D r r') (p : Law (FlagPair K V)) (hD : support p⊆D) + (hr : r≤4) (hr' : r'≤4) (s d : ℝ) (hs : 0eventWeight + (iid (iid (highRepresentative (FiniteEntropy.first p) 4 r' s) (Fin h)) (Fin 3)) + (fun x=>z∉highDomain x))≤ + highBadMass s d 153+64*(Nat.card K:ℝ)^5*(2*Real.exp s/(Nat.card K:ℝ)^r')* + (Real.exp s/(Nat.card K:ℝ)^4)+3*(1-1/(5*(Nat.card K:ℝ)))^h+12*h*ε := by + have hB1:=hcap₁.endpoint_bad (FiniteEntropy.first p) hD1 (by decide) hr' s d hs hent1 + have hB2:=hcap₂.endpoint_bad (FiniteEntropy.second p) hD2 (by decide) hr' s d hs hent2 + have half:=high_pair_half (FiniteEntropy.first p) 4 r' s _ hB1.1 hB1.2 hbad + have hrep:=highRepresentative_bounds (FiniteEntropy.first p) 4 r' s half + have hconf:=highRepresentative_conflict p 4 r' s ε hcons half hI + apply (sampled_target_loss hdim (highRepresentative (FiniteEntropy.first p) 4 r' s) (FiniteEntropy.second p) hflag + (highRight (FiniteEntropy.second p) 4 s) (2*Real.exp s/(Nat.card K:ℝ)^r') + (Real.exp s/(Nat.card K:ℝ)^4) (2*Real.exp s/(Nat.card K:ℝ)^4) + (by positivity) (by positivity) (by positivity) hrep.2.1 + (highRight_cap (FiniteEntropy.second p) 4 s) hrep.2.2 hsmall h).trans + have hmul:=mul_le_mul_of_nonneg_left hconf (show 0≤3*(h:ℝ) by positivity) + linarith [hB2.2] +end +end + +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open SharpRamseyFive.HighSamples SharpRamseyFive.Windows +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] {N w r : ℕ} [Nonempty (Fin r)] +local instance highDomainStageBlockDE : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance highDomainStageIndexDE : DecidableEq (Slots w r) := Classical.decEq _ + +omit [Fintype (ℙ K (Dual K (Dual K V)))] [Nonempty (ℙ K V)] + [Nonempty (ℙ K (Dual K V))] [Nonempty (ℙ K (Dual K (Dual K V)))] + [Nonempty (Fin r)] in +theorem high_domain_good_pair_loss (hdim : finrank K V=5) + (D : Slots w r→Finset (FlagPair K V)) + (p : Law (Slots w r→FlagPair K V)) + (hD : ∀ i,support (map p (fun x=>x i))⊆D i) + (r' : ℕ) (hr' : r'≤4) (hcap : ∀i,HighCaps (D i) 4 r') + (hcons : ∀ x,0

x (Sum.inr (v,t)))) (fun z=>eventWeight + (iid (iid (highRepresentative (map p (fun x=>x (Sum.inl ((v,false),sel (v,false))))) 4 r' s) + (Fin h)) (Fin 3)) (fun x=>z∉highDomain x))≤ + highBadMass s d 153+64*(Nat.card K:ℝ)^5*(2*Real.exp s/(Nat.card K:ℝ)^r')* + (Real.exp s/(Nat.card K:ℝ)^4)+3*(1-1/(5*(Nat.card K:ℝ)))^h+12*h*ε := by + let i : Slots w r:=Sum.inl ((v,false),sel (v,false)) + let j : Slots w r:=Sum.inr (v,t) + let q:=pair p (fun x=>x i) (fun x=>x j) + have hqi : first q=map p (fun x=>x i) := first_pair p _ _ + have hqj : second q=map p (fun x=>x j) := second_pair p _ _ + have hi:=good_index_scores J d ε p c hc sel i (hready.2 false) + have hj:=good_index_scores J d ε p c hc sel j hready.1 + have hI:=good_index_scores_reverse J d ε p c hc hcs sel j hready.1 (v,false) trivial + have hIc : entropy (first q)+entropy (second q)-entropy q≤ε := by + rw [hqi,hqj] + exact le_trans (le_add_of_nonneg_right (hc i j)) hI + have hpc : ∀ z,0(x i,x j)) z hz + cases he + exact hcons x hx i j (representative_early v (sel (v,false)) t) + have hpf : ∀ z,0x j) z hz + cases he + exact hflag x hx j + have H:=high_domain_pair_loss hdim (D i) (D j) r' hr' (hcap i) (hcap j) q + (hqi ▸ hD i) (hqj ▸ hD j) + hpc hpf s d ε hs (by rw [hqi]; linarith [hi.1]) + (by rw [hqj]; linarith [hj.1]) hbad hIc hsmall h + simpa only [hqi,hqj,i,j] using H +end + +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/HighDomainPreRound.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/HighDomainPreRound.lean new file mode 100644 index 0000000000000000000000000000000000000000..e2d847e47114f7932b6b1939c4f2a23cb99bd3fa --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/HighDomainPreRound.lean @@ -0,0 +1,68 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.HighFourPreRound +import OAI.Combinatorics.RamseyFive.Marking.HighDomainEndpoints + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open SharpRamseyFive.HighSamples SharpRamseyFive.Windows +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] {N r : ℕ} [Nonempty (Fin r)] +local instance highDomainPreBlockDE : DecidableEq (Fin 1×Bool) := Classical.decEq _ +local instance highDomainPreIndexDE : DecidableEq (Slots 1 r) := Classical.decEq _ + +omit [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] in +theorem high_domain_preRound_omissions {κ : Type} [Fintype κ] {n rem : ℕ} + (hdim : finrank K V=5) + (μ : Law κ) (p : κ→Law (Slots 1 r→FlagPair K V)) + (D : κ→Slots 1 r→Finset (FlagPair K V)) + (hD : ∀a,0<μ a→InDomains (p a) (D a)) + (r' : ℕ) (hr' : r'≤4) (hcap : ∀a,0<μ a→∀i,HighCaps (D a i) 4 r') + (hcons : ∀ a,0<μ a→∀ x,0

highFourSampler p r' s h z.1)) + (fun z=>((coveredPositions (fun t=>z.1.2 (Sum.inr (0,t))) (highDomain z.2))ᶜ.card:ℝ))≤ + 5*mean (preRoundLaw μ p S n) (fun z=> + ∑ i∈blockActive (historyUnused (S z.1.1) z.1.2),preRoundBad μ p S n J d ε c z i)+ + (2*r:ℝ)*highFourLoss (Nat.card K) r' h s d ε := by + refine preRound_ready_omissions μ p S hrem hr hS J d ε + (highFourLoss (Nat.card K) r' h s d ε) + (highFourLoss_nonneg _ (Nat.one_le_iff_ne_zero.mpr (Nat.ne_of_gt + (Nat.zero_lt_of_lt (Finite.one_lt_card (α:=K))))) r' h s d ε hs hd he) c + (highFourSampler p r' s h) highDomain ?_ + intro z hz t hrdy + have ha:=(preRound_positive μ p S n z hz).1 + change _ ≤ highFourLoss (Nat.card K) r' h s d ε + unfold highFourSampler highFourLoss + apply high_domain_good_pair_loss hdim (D z.1.1) + (historyPosterior (p z.1.1) z.1.2) _ r' hr' (hcap _ ha) _ _ + J d s ε hJ hs hbad hsmall (c z.1.1 z.1.2) (hc _ _) (hcs _ _) + z.2 0 t hrdy h + · intro i + exact marginal_support_subset _ _ (history_in_domains _ _ (hD _ ha) n z.1.2) i + · intro x hx i j hij hi + exact hcons _ ha x (history_support (p z.1.1) n z.1.2 x hx) i j hij hi + · intro x hx i + exact hflag _ ha x (history_support (p z.1.1) n z.1.2 x hx) i +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/HighFourPreRound.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/HighFourPreRound.lean new file mode 100644 index 0000000000000000000000000000000000000000..53f991e031b187b3b44ec461e4b2fa208bdf1c07 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/HighFourPreRound.lean @@ -0,0 +1,92 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.History +import OAI.Combinatorics.RamseyFive.Marking.HighFourStage +import OAI.Combinatorics.RamseyFive.Entropy.ConditionalSampling + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open SharpRamseyFive.HighSamples SharpRamseyFive.Windows +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] {N r : ℕ} [Nonempty (Fin r)] +local instance highFourPreBlockDE : DecidableEq (Fin 1×Bool) := Classical.decEq _ +local instance highFourPreIndexDE : DecidableEq (Slots 1 r) := Classical.decEq _ + +def highFourLoss (q : ℕ) (r' h : ℕ) (s d ε : ℝ) : ℝ := + highBadMass s d 153+64*(q:ℝ)^5*(2*Real.exp s/(q:ℝ)^r')* + (Real.exp s/(q:ℝ)^4)+3*(1-1/(5*(q:ℝ)))^h+12*h*ε + +lemma highFourLoss_nonneg (q : ℕ) (hq : 1≤q) (r' h : ℕ) (s d ε : ℝ) + (hs : 0x (Sum.inl ((0,false),z.2 (0,false))))) 4 r' s) (Fin h)) (Fin 3) + +omit [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] in +theorem high_four_preRound_omissions {κ : Type} [Fintype κ] {n rem : ℕ} + (hdim : finrank K V=5) + (μ : Law κ) (p : κ→Law (Slots 1 r→FlagPair K V)) + (m : κ→UnionTranscript (Fin N) (FlagPair K V)) (ι : κ→Slots 1 r→Fin N) + (hD : ∀ a,0<μ a→InDomains (p a) (fun i=>markingDomain (m a) (ι a i))) + (hpop : ∀ a,0<μ a→∀ i,((m a).1 (ι a i)).1.2.1=true ∧ + ((m a).1 (ι a i)).1.2.2=true) + (r' : ℕ) (hrank : ∀ a,0<μ a→∀ i,((m a).1 (ι a i)).1.1.1.val=4 ∧ + ((m a).1 (ι a i)).1.1.2.val=r') + (hcons : ∀ a,0<μ a→∀ x,0

highFourSampler p r' s h z.1)) + (fun z=>((coveredPositions (fun t=>z.1.2 (Sum.inr (0,t))) (highDomain z.2))ᶜ.card:ℝ))≤ + 5*mean (preRoundLaw μ p S n) (fun z=> + ∑ i∈blockActive (historyUnused (S z.1.1) z.1.2),preRoundBad μ p S n J d ε c z i)+ + (2*r:ℝ)*highFourLoss (Nat.card K) r' h s d ε := by + refine preRound_ready_omissions μ p S hrem hr hS J d ε + (highFourLoss (Nat.card K) r' h s d ε) + (highFourLoss_nonneg _ (Nat.one_le_iff_ne_zero.mpr (Nat.ne_of_gt + (Nat.zero_lt_of_lt (Finite.one_lt_card (α:=K))))) r' h s d ε hs hd he) c + (highFourSampler p r' s h) highDomain ?_ + intro z hz t hrdy + have ha:=(preRound_positive μ p S n z hz).1 + change _ ≤ highFourLoss (Nat.card K) r' h s d ε + unfold highFourSampler highFourLoss + apply high_four_good_pair_loss hdim (m z.1.1) (ι z.1.1) + (historyPosterior (p z.1.1) z.1.2) _ (hpop _ ha) r' (hrank _ ha) _ _ + J d s ε hJ hs hbad hsmall (c z.1.1 z.1.2) (hc _ _) (hcs _ _) + z.2 0 t hrdy h + · intro i + exact marginal_support_subset _ _ (history_in_domains _ _ (hD _ ha) n z.1.2) i + · intro x hx i j hij hi + exact hcons _ ha x (history_support (p z.1.1) n z.1.2 x hx) i j hij hi + · intro x hx i + exact hflag _ ha x (history_support (p z.1.1) n z.1.2 x hx) i +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/HighFourStage.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/HighFourStage.lean new file mode 100644 index 0000000000000000000000000000000000000000..a74d0ca5633086bda6dbe7f73e589688c74f6292 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/HighFourStage.lean @@ -0,0 +1,144 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.GoodPairScores +import OAI.Combinatorics.RamseyFive.Entropy.WindowReadiness +import OAI.Combinatorics.RamseyFive.Marking.HighLowConflict +import OAI.Combinatorics.RamseyFive.Marking.HighSampleRetention + +namespace OAI + +namespace SharpRamseyFive.Marking + +section +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open SharpRamseyFive.HighSamples +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] {N : ℕ} +local instance highFourDE : DecidableEq (ℙ K V) := Classical.decEq _ +local instance highFourDualDE : DecidableEq (ℙ K (Dual K V)) := Classical.decEq _ + +omit [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] in +lemma marking_high_four_bad (hdim : finrank K V=5) + (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) + (p : Law (FlagPair K V)) (hD : support p⊆markingDomain m i) + (hp : (m.1 i).1.2.1=true) (hp' : (m.1 i).1.2.2=true) + (r' : ℕ) (hr : (m.1 i).1.1.1.val=4) (hr' : (m.1 i).1.1.2.val=r') + (s d : ℝ) (hs : 0eventWeight + (iid (iid (highRepresentative (first p) 4 r' s) (Fin h)) (Fin 3)) + (fun x=>z∉highDomain x))≤ + highBadMass s d 153+64*(Nat.card K:ℝ)^5*(2*Real.exp s/(Nat.card K:ℝ)^r')* + (Real.exp s/(Nat.card K:ℝ)^4)+3*(1-1/(5*(Nat.card K:ℝ)))^h+12*h*ε := by + have hB1:=marking_high_four_bad hdim m i (first p) hD1 hpop1.1 hpop1.2 + r' hr1.1 hr1.2 s d hs hent1 + have hB2:=marking_high_four_bad hdim m j (second p) hD2 hpop2.1 hpop2.2 + r' hr2.1 hr2.2 s d hs hent2 + have half:=high_pair_half (first p) 4 r' s _ hB1.1 hB1.2 hbad + have hrep:=highRepresentative_bounds (first p) 4 r' s half + have hconf:=highRepresentative_conflict p 4 r' s ε hcons half hI + apply (sampled_target_loss hdim (highRepresentative (first p) 4 r' s) (second p) hflag + (highRight (second p) 4 s) (2*Real.exp s/(Nat.card K:ℝ)^r') + (Real.exp s/(Nat.card K:ℝ)^4) (2*Real.exp s/(Nat.card K:ℝ)^4) + (by positivity) (by positivity) (by positivity) hrep.2.1 + (highRight_cap (second p) 4 s) hrep.2.2 hsmall h).trans + have hmul:=mul_le_mul_of_nonneg_left hconf (show 0≤3*(h:ℝ) by positivity) + linarith [hB2.2] +end +end + +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open SharpRamseyFive.HighSamples SharpRamseyFive.Windows +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] {N w r : ℕ} [Nonempty (Fin r)] +local instance highFourStageBlockDE : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance highFourStageIndexDE : DecidableEq (Slots w r) := Classical.decEq _ + +omit [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] [Nonempty (Fin r)] in +theorem high_four_good_pair_loss (hdim : finrank K V=5) + (m : UnionTranscript (Fin N) (FlagPair K V)) (ι : Slots w r→Fin N) + (p : Law (Slots w r→FlagPair K V)) + (hD : ∀ i,support (map p (fun x=>x i))⊆markingDomain m (ι i)) + (hpop : ∀ i,(m.1 (ι i)).1.2.1=true ∧ (m.1 (ι i)).1.2.2=true) + (r' : ℕ) (hrank : ∀ i,(m.1 (ι i)).1.1.1.val=4 ∧ (m.1 (ι i)).1.1.2.val=r') + (hcons : ∀ x,0

x (Sum.inr (v,t)))) (fun z=>eventWeight + (iid (iid (highRepresentative (map p (fun x=>x (Sum.inl ((v,false),sel (v,false))))) 4 r' s) + (Fin h)) (Fin 3)) (fun x=>z∉highDomain x))≤ + highBadMass s d 153+64*(Nat.card K:ℝ)^5*(2*Real.exp s/(Nat.card K:ℝ)^r')* + (Real.exp s/(Nat.card K:ℝ)^4)+3*(1-1/(5*(Nat.card K:ℝ)))^h+12*h*ε := by + let i : Slots w r:=Sum.inl ((v,false),sel (v,false)) + let j : Slots w r:=Sum.inr (v,t) + let q:=pair p (fun x=>x i) (fun x=>x j) + have hqi : first q=map p (fun x=>x i) := first_pair p _ _ + have hqj : second q=map p (fun x=>x j) := second_pair p _ _ + have hi:=good_index_scores J d ε p c hc sel i (hready.2 false) + have hj:=good_index_scores J d ε p c hc sel j hready.1 + have hI:=good_index_scores_reverse J d ε p c hc hcs sel j hready.1 (v,false) trivial + have hIc : entropy (first q)+entropy (second q)-entropy q≤ε := by + rw [hqi,hqj] + exact le_trans (le_add_of_nonneg_right (hc i j)) hI + have hpc : ∀ z,0(x i,x j)) z hz + cases he + exact hcons x hx i j (representative_early v (sel (v,false)) t) + have hpf : ∀ z,0x j) z hz + cases he + exact hflag x hx j + have H:=high_four_pair_loss hdim m (ι i) (ι j) q + (hqi ▸ hD i) (hqj ▸ hD j) (hpop i) (hpop j) r' (hrank i) (hrank j) + hpc hpf s d ε hs (by rw [hqi]; linarith [hi.1]) + (by rw [hqj]; linarith [hj.1]) hbad hIc hsmall h + simpa only [hqi,hqj,i,j] using H +end + +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/HighLowConflict.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/HighLowConflict.lean new file mode 100644 index 0000000000000000000000000000000000000000..3663895b24744d4c5c93293ab1c6fc1d1febe178 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/HighLowConflict.lean @@ -0,0 +1,166 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.HighPairVariance +import OAI.Combinatorics.RamseyFive.Marking.MarkingClassDomains +import OAI.Combinatorics.RamseyFive.Entropy.HighEndpointCutoffs + +namespace OAI + +namespace SharpRamseyFive.Marking + +section +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open SharpRamseyFive.CoreGeometry SharpRamseyFive.LowConflict +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + {n : ℕ} + +def highThreeLeft (p : Law (FlagPair K V)) (s : ℝ) : Finset (ℙ K V) := + highGoodFirst p (32*(Nat.card K:ℝ)^3) ((Nat.card K:ℝ)^4) ((Nat.card K:ℝ)^3) s +def highThreeRight (p : Law (FlagPair K V)) (s : ℝ) : Finset (ℙ K (Dual K V)) := + highGoodFirst (swap p) (32*(Nat.card K:ℝ)^3) ((Nat.card K:ℝ)^4) ((Nat.card K:ℝ)^3) s +def highThreeGood (p : Law (Fin n→FlagPair K V)) (s : ℝ) + (i j : Fin n) (a : ℙ K V) (b : ℙ K (Dual K V)) : Prop := + a∈highThreeLeft (tupleMarginal p i) s ∧ b∈highThreeRight (tupleMarginal p j) s ∧ Incident a b + +def highCollision (p : Law (Fin n→FlagPair K V)) (s : ℝ) (i j : Fin n) : ℝ := + tupleCollision p Projectivization.rep Projectivization.rep (highThreeGood p s) i j + +omit [Finite K] [FiniteDimensional K V] in +lemma high_collision_nonneg (p : Law (Fin n→FlagPair K V)) (s : ℝ) (i j : Fin n) : + 0≤highCollision p s i j := tupleCollision_nonneg .. + +lemma high_three_core_slack (s : ℝ) (hsmall : Real.log 32+3*sx i) (fun x=>x j))+highCollision p s i j) := by + apply tuple_low_conflict hdim p Projectivization.rep Projectivization.rep (highThreeGood p s) ?_ i j hij + intro x hx i j hij hg + exact (incident_iff _ _).mp (hcons x hx i j hij hg.2.2) + +theorem high_three_pair_impossible (hdim : finrank K V=5) + (p : Law (Fin n→FlagPair K V)) (s ε : ℝ) + (hcons : ∀ x,0

x i) (fun x=>x j))+highCollision p s i j≤ε) + (hsmall : 80004*ε<1/(8*(Nat.card K:ℝ))) : False := by + have hq : 0<(Nat.card K:ℝ) := by exact_mod_cast Nat.zero_lt_of_lt (Finite.one_lt_card (α:=K)) + have hl:=high_pair_incident_lower hdim (first (tupleMarginal p i)) (second (tupleMarginal p j)) + _ _ (Real.exp s/(Nat.card K:ℝ)^3) (Real.exp s/(Nat.card K:ℝ)^3) (by positivity) (by positivity) + (by + intro a ha + have hh:=(Finset.mem_filter.mp (show a∈highGoodFirst _ _ _ _ _ from ha)).2 + exact (le_div_iff₀ (pow_pos hq 3)).mpr (by simpa only [mul_comm] using hh)) + (by + intro b hb + have hh:=(Finset.mem_filter.mp (show b∈highGoodFirst _ _ _ _ _ from hb)).2 + rw [first_swap] at hh + exact (le_div_iff₀ (pow_pos hq 3)).mpr (by simpa only [mul_comm] using hh)) hA hB hvar + have hu:=high_three_low_conflict hdim p s hcons i j hij + exact (hl.trans (hu.trans (mul_le_mul_of_nonneg_left hgood (by norm_num)))).not_gt hsmall +end +end + +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] {N : ℕ} +local instance highMarkedDE : DecidableEq (ℙ K V) := Classical.decEq _ +local instance highMarkedDualDE : DecidableEq (ℙ K (Dual K V)) := Classical.decEq _ + +omit [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] in +theorem marking_high_endpoint_bad (hdim : finrank K V=5) + (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) + (p : Law (FlagPair K V)) (hD : support p ⊆ markingDomain m i) + (hp : (m.1 i).1.2.1=true) (hp' : (m.1 i).1.2.2=true) + (s d : ℝ) (hs : 0p.nonneg z)).mp hp0 + exact ⟨z,hD ((mem_support p z).mpr hpos)⟩ + have hc:=marking_popular_caps hdim m i hne hp hp' + have hq : 0<(Nat.card K:ℝ) := by exact_mod_cast Nat.zero_lt_of_lt (Finite.one_lt_card (α:=K)) + constructor + · apply high_endpoint_bad_of_domain p (markingDomain m i) hD (Nat.card K) s d 153 + (m.1 i).1.1.2.val hq hs (by have := (m.1 i).1.1.2.isLt; omega) + hc.2.2.1 (markingDomain_card hdim m i) (marking_popular_partners_first hdim m i hp') hent + · apply high_endpoint_bad_second_of_domain p (markingDomain m i) hD (Nat.card K) s d 153 + (m.1 i).1.1.1.val hq hs (by have := (m.1 i).1.1.1.isLt; omega) + hc.2.2.2 (markingDomain_card hdim m i) (marking_popular_partners_second hdim m i hp) hent + +omit [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] in +lemma marking_high_three_mass (hdim : finrank K V=5) + (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) + (p : Law (FlagPair K V)) (hD : support p ⊆ markingDomain m i) + (hp : (m.1 i).1.2.1=true) (hp' : (m.1 i).1.2.2=true) + (hr : (m.1 i).1.1.1.val=3) (hr' : (m.1 i).1.1.2.val=3) + (s d : ℝ) (hs : 0(50*153+Real.log 2+32)/σ^(4*beta η)) atTop (𝓝 0) := + (tendsto_rpow_atTop h4).const_div_atTop _ + have ht4 : Tendsto (fun σ : ℝ=>128*Real.exp (-σ/2)) atTop (𝓝 0) := by + have ht := Real.tendsto_exp_neg_atTop_nhds_zero.comp (tendsto_id.atTop_div_const (by norm_num : (0:ℝ)<2)) + simpa only [Function.comp_apply,id_eq,neg_div,mul_zero] using ht.const_mul 128 + have ht5 : Tendsto (fun σ : ℝ=>3*Real.exp (-(σ^beta η)/5)) atTop (𝓝 0) := by + have ht := Real.tendsto_exp_neg_atTop_nhds_zero.comp (hpow.atTop_div_const (by norm_num : (0:ℝ)<5)) + simpa only [Function.comp_apply,id_eq,neg_div,mul_zero] using ht.const_mul 3 + have ht6 := (tendsto_rpow_neg_atTop (by positivity : 0<1999*beta η)).const_mul 24 + have ht:=((((ht1.add ht2).add ht3).add ht4).add ht5).add ht6 + simp only [Function.comp_apply,mul_zero,add_zero] at ht + have he : 0<η/2-3*beta η := by unfold beta;linarith + have hsmall:=(tendsto_rpow_neg_atTop he).eventually_lt_const (by norm_num : (0:ℝ)<1/4) + filter_upwards [eventually_ge_atTop (1:ℝ),ht.eventually_lt_const hρ,hsmall] with σ hσ hρ' hsmall + intro D q r' h hlo hhi hq heq hr hhlo hhhi + have hs : 0<σ := zero_lt_one.trans_le hσ + have hDsmall : 2*(D*σ^(3*beta η))≤σ/2 := by + have hl : D*σ^(3*beta η)≤σ*σ^(-(η/2-3*beta η)) := by + calc + _ ≤σ^(1-η/2)*σ^(3*beta η) := mul_le_mul_of_nonneg_right hhi (by positivity) + _ =_ := by + rw [←Real.rpow_add hs] + nth_rw 2 [←Real.rpow_one σ] + rw [←Real.rpow_add hs] + congr 1 + ring + nlinarith [mul_lt_mul_of_pos_left hsmall hs] + exact (highFourLoss_bound hσ hb hlo hq heq hr hDsmall hhlo hhhi).trans (by simpa only [neg_mul] using hρ'.le) +end +end + +open Filter Real ParameterHierarchy FiniteEntropy +open scoped Topology +noncomputable section + +lemma eventually_stage_scale {η : ℝ} (_ : 0<η) (a δ : ℝ) + (ha : a*beta η<η/2) (hδ : 0<δ) : + ∀ᶠ σ : ℝ in atTop,∀D : ℝ,D≤σ^(1-η/2)→D*σ^(a*beta η)≤δ*σ := by + have he : 0<η/2-a*beta η := sub_pos.mpr ha + filter_upwards [eventually_ge_atTop (1:ℝ), + (tendsto_rpow_neg_atTop he).eventually_lt_const hδ] with σ hσ ht + intro D hD + have hs : 0<σ := zero_lt_one.trans_le hσ + calc + _ ≤ σ^(1-η/2)*σ^(a*beta η) := mul_le_mul_of_nonneg_right hD (by positivity) + _ = σ^(-(η/2-a*beta η))*σ := by + rw [←Real.rpow_add hs,show 1-η/2+a*beta η= -(η/2-a*beta η)+1 by ring, + Real.rpow_add hs,Real.rpow_one] + _ ≤ _ := mul_le_mul_of_nonneg_right ht.le hs.le + +lemma highBadMass_le_highFourLoss (q r' h : ℕ) (hq : 1≤q) (s d ε : ℝ) (he : 0≤ε) : + highBadMass s d 153≤highFourLoss q r' h s d ε := by + have hq' : (1:ℝ)≤q := by exact_mod_cast hq + have hh : 0<5*(q:ℝ) := by linarith + have hz : 0≤1-1/(5*(q:ℝ)) := sub_nonneg.mpr ((div_le_one hh).mpr (by linarith)) + unfold highFourLoss + have h1 : 0≤64*(q:ℝ)^5*(2*Real.exp s/(q:ℝ)^r')*(Real.exp s/(q:ℝ)^4) := by positivity + have h2 : 0≤3*(1-1/(5*(q:ℝ)))^h := by positivity + have h3 : 0≤12*h*ε := by positivity + linarith + +lemma high_small_geometry {q s ε : ℝ} (hq : 0640032*σ^(-2000*beta η)) atTop (𝓝 0) := by + have hb : 0<2000*beta η := by exact mul_pos (by norm_num) (beta_pos hη) + simpa only [neg_mul,mul_zero] using (tendsto_rpow_neg_atTop hb).const_mul 640032 + filter_upwards [eventually_stage_scale hη 3 (1/4) ha (by norm_num), + eventually_ge_atTop (4*Real.log 256),eventually_ge_atTop (0:ℝ), + ht.eventually_lt_const (by norm_num : (0:ℝ)<1)] with σ hscale hσ hσ0 he + intro D hD + have hs:=hscale D hD + apply high_small_geometry (Real.exp_pos σ) + · calc + _ ≤256*Real.exp (D*σ^(3*beta η)) := mul_le_mul_of_nonneg_right (by norm_num) (Real.exp_nonneg _) + _ =Real.exp (Real.log 256+D*σ^(3*beta η)) := by rw [Real.exp_add,Real.exp_log (by norm_num)] + _ ≤_ := Real.exp_le_exp.mpr (by linarith) + · calc + _ =Real.exp (Real.log 256+2*(D*σ^(3*beta η))) := by rw [Real.exp_add,Real.exp_log (by norm_num)] + _ ≤_ := Real.exp_le_exp.mpr (by linarith) + · simpa only [div_mul_cancel₀ _ (Real.exp_ne_zero σ)] using he +end + +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/HighSampleRetention.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/HighSampleRetention.lean new file mode 100644 index 0000000000000000000000000000000000000000..b1d03a4824619db6d7cf4eba8b519a9d43ee3962 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/HighSampleRetention.lean @@ -0,0 +1,237 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.GoodRepresentative +import OAI.Combinatorics.RamseyFive.Decoding.HighSampleDecoder +import OAI.Combinatorics.RamseyFive.Entropy.IndependentSampling +import OAI.Combinatorics.RamseyFive.Entropy.HighEndpointCutoffs + +namespace OAI + +namespace SharpRamseyFive.HighSamples +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +def SampleConflict (w z : SampleFlag (K:=K) (V:=V)) : Prop := + Incident w.1 z.2 ∧ ¬Incident z.1 w.2 + +theorem fixed_target_loss (p : Law (SampleFlag (K:=K) (V:=V))) + (z : SampleFlag (K:=K) (V:=V)) (hz : Incident z.1 z.2) + (C : ℝ) (hC : 0≤C) (hp : ∀ b,second p b≤C) + (hy : z.2∉lowHits (first p)) + (hsmall : 2*(Nat.card K:ℝ)^2*C≤1/(20*(Nat.card K:ℝ))) (n : ℕ) : + eventWeight (iid (iid p (Fin n)) (Fin 3)) (fun x=>z∉highDomain x)≤ + 3*(1-1/(5*(Nat.card K:ℝ)))^n+3*(n*eventWeight p (fun w=>SampleConflict w z)) := by + have hsub : ∀ x : Fin 3→Fin n→SampleFlag (K:=K) (V:=V),z∉highDomain x → + finrank K (sampleSpan x z.2)<4 ∨ ∃ j i,SampleConflict (x j i) z := by + intro x hx + by_cases hr : finrank K (sampleSpan x z.2)<4 + · exact Or.inl hr + · apply Or.inr + by_contra! hc + apply hx + apply mem_highDomain x z hz (by omega) + intro j i hi + by_contra hn + exact hc j i ⟨hi,hn⟩ + apply (eventWeight_mono _ _ _ hsub).trans + apply (eventWeight_union _ _ _).trans + exact add_le_add (sampled_span_rank_failure p z.2 C hC hp hy hsmall n) + (by simpa using iid_nested_exists_event (I:=Fin n) (J:=Fin 3) p (fun w=>SampleConflict w z)) + +omit [Finite K] [FiniteDimensional K V] in +lemma mean_second (r : Law (SampleFlag (K:=K) (V:=V))) (f : ℙ K (Dual K V)→ℝ) : + mean r (fun z=>f z.2)=mean (second r) f := by + simp only [mean,second,Fintype.sum_prod_type,Finset.sum_mul] + exact Finset.sum_comm + +omit [Finite K] [FiniteDimensional K V] in +lemma mean_sampleConflict (p r : Law (SampleFlag (K:=K) (V:=V))) : + mean r (fun z=>eventWeight p (fun w=>SampleConflict w z))=relationMass SampleConflict p r := by + rw [relationMass_by_target] + simp only [mean,eventWeight,Finset.sum_filter] + +theorem sampled_target_loss (hdim : finrank K V=5) + (p r : Law (SampleFlag (K:=K) (V:=V))) + (hrflag : ∀ z,0eventWeight (iid (iid p (Fin n)) (Fin 3)) (fun x=>z∉highDomain x)) ≤ + eventMass (second r) Gᶜ+64*(Nat.card K:ℝ)^5*A*B+ + 3*(1-1/(5*(Nat.card K:ℝ)))^n+3*n*relationMass SampleConflict p r := by + let E : ℝ:=3*(1-1/(5*(Nat.card K:ℝ)))^n + have hq : 2≤(Nat.card K:ℝ) := by exact_mod_cast Finite.one_lt_card (α:=K) + have hc : 0≤1-1/(5*(Nat.card K:ℝ)) := by + have hh : 1/(5*(Nat.card K:ℝ))≤1 := (div_le_one (by positivity)).mpr (by linarith) + linarith + have hE : 0≤E := mul_nonneg (by norm_num) (pow_nonneg hc _) + have hpoint : mean r (fun z=>eventWeight (iid (iid p (Fin n)) (Fin 3)) (fun x=>z∉highDomain x)) ≤ + mean r (fun z=>(if z.2∈lowHits (first p) then 1 else 0)+E+ + 3*n*eventWeight p (fun w=>SampleConflict w z)) := by + apply Finset.sum_le_sum + intro z _ + by_cases hz : 0SampleConflict w z) := + mul_nonneg (by positivity) (eventWeight_nonneg _ _) + linarith [eventWeight_le_one (iid (iid p (Fin n)) (Fin 3)) (fun x=>z∉highDomain x)] + · rw [ite_eq_right hy,zero_add] + simpa only [mul_assoc] using fixed_target_loss p z (hrflag z hz) C hC hpC hy hsmall n + · have hz' : r z=0 := le_antisymm (le_of_not_gt hz) (r.nonneg z) + simp only [hz',zero_mul,le_refl] + have he : mean r (fun z=>(if z.2∈lowHits (first p) then 1 else 0)+E+ + 3*n*eventWeight p (fun w=>SampleConflict w z))= + eventMass (second r) (lowHits (first p))+E+3*n*relationMass SampleConflict p r := by + rw [mean_add,mean_add,mean_const,mean_smul,mean_sampleConflict] + congr 2 + rw [mean_second r (fun b=>if b∈lowHits (first p) then (1:ℝ) else 0)] + simp only [mean,eventMass,mul_ite,mul_one,mul_zero] + symm + calc + _ = ∑ b∈lowHits (first p),if b∈lowHits (first p) then second r b else 0 := by + apply Finset.sum_congr rfl + intro b hb + rw [ite_eq_left hb] + _ = ∑ b,if b∈lowHits (first p) then second r b else 0 := by + apply Finset.sum_subset (Finset.subset_univ _) + intro b _ hb + rw [ite_eq_right hb] + have hl : eventMass (second r) (lowHits (first p)) ≤ + eventMass (second r) Gᶜ+64*(Nat.card K:ℝ)^5*A*B := by + have hm := lowHits_mass hdim (first p) (second r) G A B hA hB + (fun a=>⟨(first p).nonneg a,hpA a⟩) (by rw [(first p).sum_one];norm_num) + (by rw [(first p).sum_one]) hrB + have hh : eventMass (second r) (lowHits (first p))≤ + eventMass (second r) Gᶜ+eventMass (second r) (G∩lowHits (first p)) := by + have he0 (S : Finset (ℙ K (Dual K V))) : eventMass (second r) S = + eventWeight (second r) (fun b=>b∈S) := by + unfold eventMass eventWeight + calc + _ = ∑ b∈S,if b∈S then second r b else 0 := by + apply Finset.sum_congr rfl + intro b hb + rw [ite_eq_left hb] + _ = ∑ b,if b∈S then second r b else 0 := by + apply Finset.sum_subset (Finset.subset_univ _) + intro b _ hb + rw [ite_eq_right hb] + _ = _ := by + apply Finset.sum_congr rfl + intro b _ + by_cases hb : b∈S <;> simp only [hb,ite_true,ite_false] + simp only [he0,eventWeight,←Finset.sum_add_distrib] + apply Finset.sum_le_sum + intro b _ + by_cases hb : b∈G <;> by_cases hl : b∈lowHits (first p) <;> + simp only [Finset.mem_compl,Finset.mem_inter,hb,hl, + and_true,and_false,not_true_eq_false,not_false_eq_true,ite_true,ite_false, + add_zero,zero_add,le_refl] + exact (second r).nonneg b + exact hh.trans (add_le_add le_rfl hm) + rw [he] at hpoint + exact hpoint.trans (add_le_add (add_le_add hl le_rfl) le_rfl) +end +end SharpRamseyFive.HighSamples + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open SharpRamseyFive.HighSamples +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] +local instance highRepDE : DecidableEq (ℙ K V) := Classical.decEq _ +local instance highRepDualDE : DecidableEq (ℙ K (Dual K V)) := Classical.decEq _ + +def highLeft (p : Law (FlagPair K V)) (r' : ℕ) (s : ℝ) : Finset (ℙ K V) := + highGoodFirst p (32*(Nat.card K:ℝ)^r') ((Nat.card K:ℝ)^4) ((Nat.card K:ℝ)^r') s +def highRight (p : Law (FlagPair K V)) (r : ℕ) (s : ℝ) : Finset (ℙ K (Dual K V)) := + highGoodFirst (swap p) (32*(Nat.card K:ℝ)^r) ((Nat.card K:ℝ)^4) ((Nat.card K:ℝ)^r) s + +def highRepresentative (p : Law (FlagPair K V)) (r r' : ℕ) (s : ℝ) : Law (FlagPair K V) := + if h : 0unspecified c.2) (markedCode hdim width hw) + +def classStream (hdim : finrank K V=5) (width : ℝ) (hw : 0≤width) + (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N n admissible) + (ctx : Ω→κ) (hl : l≤n) (a : SlotClass) + (hE : 0(ctx z,S.tuple z)) (c,x) hx + cases he + exact hcons z hz + obtain ⟨a,ha⟩:=marking_fixed_class hdim (pair S.law ctx S.tuple) hpcons width hw l hsize + refine ⟨a,?_⟩ + rw [markedContext_law,eventMass_map_preimage] at ha + exact ha + +lemma classStream_density (hdim : finrank K V=5) (width : ℝ) (hw : 0≤width) + (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N n admissible) + (ctx : Ω→κ) (hl : l≤n) (a : SlotClass) + (hE : 0retainedTuple hl (S.tuple z) (markedPositions hdim width hw ctx S.tuple a z)) = _ + unfold markedClassLaw + simp only [withMessage_pair] + rw [←conditionContext_pair,selected_pair] + · rfl + · rw [eventMass_map_preimage] + exact hE + +lemma classStream_consistent (hdim : finrank K V=5) (width : ℝ) (hw : 0≤width) + (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N n admissible) + (ctx : Ω→κ) (hl : l≤n) (a : SlotClass) + (hE : 0unspecified c.2) (markedCode hdim width hw) a c i) + +attribute [local irreducible] unspecified classPositions + +omit [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] in +lemma marked_indices_properties (hdim : finrank K V=5) (width : ℝ) (hw : 0≤width) + (hl : l≤n) (a : SlotClass) (c : κ×UnionTranscript (Fin n) (FlagPair K V)) + (hc : c∈markedEvent hdim width hw l a) (i : Fin l) : + selectedClassIndices hl (fun c=>unspecified c.2) (markedCode hdim width hw) a c i∈unspecified c.2 ∧ + markedCode hdim width hw c + (selectedClassIndices hl (fun c=>unspecified c.2) (markedCode hdim width hw) a c i)=a := by + have hc' : c∈selectedClassEvent l (fun c=>unspecified c.2) (markedCode hdim width hw) a := by + simpa only [markedEvent] using hc + exact selectedClassIndices_properties hl (fun c=>unspecified c.2) + (markedCode hdim width hw) a c hc' i + +lemma markedSelected_decodes (hdim : finrank K V=5) (width : ℝ) (hw : 0≤width) + (hl : l≤n) (a : SlotClass) (f : Fin n→FlagPair K V) (ctx : κ) + (hinc : TupleIncident f) (hcons : TupleConsistent f) + (hc : (ctx,markingMessage f)∈markedEvent hdim width hw l a) (i : Fin l) : + let j:=selectedClassIndices hl (fun c=>unspecified c.2) (markedCode hdim width hw) a (ctx,markingMessage f) i + f j∈markingDomain (markingMessage f) j := by + apply marking_decodes hdim f hinc hcons + exact (marked_indices_properties hdim width hw hl a (ctx,markingMessage f) hc i).1 + +lemma markedSelected_valid (hdim : finrank K V=5) (width : ℝ) (hw : 0≤width) + (hl : l≤n) (a : SlotClass) (f : Fin n→FlagPair K V) (ctx : κ) + (hinc : TupleIncident f) (hcons : TupleConsistent f) + (hc : (ctx,markingMessage f)∈markedEvent hdim width hw l a) (i : Fin l) : + classValid width (markingMessage f) + (selectedClassIndices hl (fun c=>unspecified c.2) (markedCode hdim width hw) a (ctx,markingMessage f) i) a := by + have hi:=(marked_indices_properties hdim width hw hl a (ctx,markingMessage f) hc i).2 + have hd:=markedSelected_decodes hdim width hw hl a f ctx hinc hcons hc i + have hv:=markingClass_valid hdim width hw (markingMessage f) _ ⟨_,hd⟩ + simp only [markedCode] at hi + rw [hi] at hv + exact hv + +lemma classStream_tuple (hdim : finrank K V=5) (width : ℝ) (hw : 0≤width) + (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N n admissible) + (ctx : Ω→κ) (hl : l≤n) (a : SlotClass) + (hE : 0unspecified c.2) (markedCode hdim width hw) a + (markedContext ctx S.tuple z) i) := rfl + +lemma classStream_event (hdim : finrank K V=5) (width : ℝ) (hw : 0≤width) + (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N n admissible) + (ctx : Ω→κ) (hl : l≤n) (a : SlotClass) + (hE : 0unspecified c.2) (markedCode hdim width hw) a + (markedContext ctx S.tuple z) i) a := by + intro z hz i + obtain ⟨hc,hp⟩:=classStream_event hdim width hw S ctx hl a hE z hz + exact markedSelected_valid hdim width hw hl a (S.tuple z) (ctx z) (hinc z hp) (hcons z hp) hc i +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/MarkingClassDomains.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/MarkingClassDomains.lean new file mode 100644 index 0000000000000000000000000000000000000000..919a2e5516fe29205b6ff91cf45f49daf919c8df --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/MarkingClassDomains.lean @@ -0,0 +1,193 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.ReciprocalBands + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] {N : ℕ} +local instance classDomainPointDE : DecidableEq (ℙ K V) := Classical.decEq _ +local instance classDomainDualDE : DecidableEq (ℙ K (Dual K V)) := Classical.decEq _ +local instance classDomainDualDualDE : DecidableEq (ℙ K (Dual K (Dual K V))) := Classical.decEq _ + +def reversedMarkingDomain (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) := + (markingDomain m i).map swapFlag.toEmbedding + +omit [Finite K] in +lemma markingDomain_forward (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) : + markingDomain m i ⊆ forwardDomain m i := Finset.inter_subset_left + +omit [Finite K] in +lemma markingDomain_backward (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) : + reversedMarkingDomain m i ⊆ backwardDomain m i := by + intro z hz + obtain ⟨x,hx,rfl⟩:=Finset.mem_map.mp hz + obtain ⟨y,hy,he⟩:=Finset.mem_map.mp (Finset.mem_inter.mp hx).2 + have hh : y=swapFlag x := by + simpa only [Equiv.toEmbedding_apply,Equiv.apply_symm_apply] using congrArg swapFlag he + exact hh ▸ hy + +lemma endpoint_card_mono {A B : Type*} [DecidableEq A] [DecidableEq B] + {S T : Finset (A×B)} (h : S ⊆ T) : + ((S.image Prod.fst).card:ℝ) ≤ (T.image Prod.fst).card ∧ + ((S.image Prod.snd).card:ℝ) ≤ (T.image Prod.snd).card := by + constructor <;> exact_mod_cast Finset.card_le_card (Finset.image_subset_image h) + +omit [Finite K] in +lemma reversedDomain_first_card (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) : + ((reversedMarkingDomain m i).image Prod.fst).card=((markingDomain m i).image Prod.snd).card := by + congr 1 + ext b + simp only [reversedMarkingDomain,Finset.mem_image,Finset.mem_map] + aesop + +omit [Finite K] in +lemma reversedDomain_second_card (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) : + ((reversedMarkingDomain m i).image Prod.snd).card=((markingDomain m i).image Prod.fst).card := by + have he : (reversedMarkingDomain m i).image Prod.snd= + ((markingDomain m i).image Prod.fst).map bidualPoint.toEmbedding := by + ext b + simp only [reversedMarkingDomain,Finset.mem_image,Finset.mem_map] + aesop + rw [he,Finset.card_map] + +def ForwardCaps (D : Finset (FlagPair K V)) (u : ℝ) : Prop := + ((D.image Prod.fst).card:ℝ) ≤ 32*Real.exp (5*Real.log (Nat.card K)-u) ∧ + ((D.image Prod.snd).card:ℝ) ≤ 32*Real.exp u + +def ReverseCaps (D : Finset (FlagPair K V)) (u : ℝ) : Prop := + ((D.image Prod.snd).card:ℝ) ≤ 32*Real.exp (5*Real.log (Nat.card K)-u) ∧ + ((D.image Prod.fst).card:ℝ) ≤ 32*Real.exp u + +lemma marking_poor_forward (hdim : finrank K V=5) + (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) + (hne : (markingDomain m i).Nonempty) (hp : (m.1 i).1.2.1=false) : + ∃ u,Real.log (Nat.card K) ≤ u ∧ u ≤ 4*Real.log (Nat.card K) ∧ + ForwardCaps (markingDomain m i) u := by + let W:=decodeState (finiteDecodeRecord (forwardRecord m)) i.val + let r:=(m.1 i).1.1.1 + have hs : markingDomain m i ⊆ typedDomain W r false := by + simpa only [forwardDomain,finiteTypedDomain,hp] using markingDomain_forward m i + have ht:=(typed_poor_reciprocal hdim W r (hne.mono hs)) + let u:=clampParameter (Nat.card K) (levelSet W (chooseLevel W r.val)).card + have hb:=clampParameter_bounds (M:=(levelSet W (chooseLevel W r.val)).card) + (show (1:ℝ) ≤ Nat.card K by exact_mod_cast (Finite.one_lt_card (α:=K)).le) + exact ⟨u,hb.1,hb.2,(endpoint_card_mono hs).1.trans ht.1, + (endpoint_card_mono hs).2.trans ht.2⟩ + +lemma marking_poor_backward (hdim : finrank K V=5) + (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) + (hne : (markingDomain m i).Nonempty) (hp : (m.1 i).1.2.2=false) : + ∃ u,Real.log (Nat.card K) ≤ u ∧ u ≤ 4*Real.log (Nat.card K) ∧ + ReverseCaps (markingDomain m i) u := by + let W:=decodeState (finiteDecodeRecord (backwardRecord m)) i.rev.val + let r:=(m.1 i).1.1.2 + have hs : reversedMarkingDomain m i ⊆ typedDomain W r false := by + simpa only [backwardDomain,finiteTypedDomain,Fin.rev_rev,hp] using markingDomain_backward m i + have ht:=(typed_poor_reciprocal (K:=K) (V:=Dual K V) (by simpa using hdim) + W r (hne.map.mono hs)) + let u:=clampParameter (Nat.card K) (levelSet W (chooseLevel W r.val)).card + have hb:=clampParameter_bounds (M:=(levelSet W (chooseLevel W r.val)).card) + (show (1:ℝ) ≤ Nat.card K by exact_mod_cast (Finite.one_lt_card (α:=K)).le) + have hc:=endpoint_card_mono hs + rw [reversedDomain_first_card,reversedDomain_second_card] at hc + exact ⟨u,hb.1,hb.2,hc.1.trans ht.1,hc.2.trans ht.2⟩ + +lemma marking_popular_caps (_hdim : finrank K V=5) + (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) + (hne : (markingDomain m i).Nonempty) + (hp : (m.1 i).1.2.1=true) (hp' : (m.1 i).1.2.2=true) : + let r:=(m.1 i).1.1.1 + let s:=(m.1 i).1.1.2 + 1 ≤ r.val ∧ 1 ≤ s.val ∧ + (((markingDomain m i).image Prod.fst).card:ℝ) ≤ 32*(Nat.card K:ℝ)^s.val ∧ + (((markingDomain m i).image Prod.snd).card:ℝ) ≤ 32*(Nat.card K:ℝ)^r.val := by + let W:=decodeState (finiteDecodeRecord (forwardRecord m)) i.val + let W':=decodeState (finiteDecodeRecord (backwardRecord m)) i.rev.val + let r:=(m.1 i).1.1.1 + let s:=(m.1 i).1.1.2 + have hs : markingDomain m i ⊆ typedDomain W r true := by + simpa only [forwardDomain,finiteTypedDomain,hp] using markingDomain_forward m i + have hs' : reversedMarkingDomain m i ⊆ typedDomain W' s true := by + simpa only [backwardDomain,finiteTypedDomain,Fin.rev_rev,hp'] using markingDomain_backward m i + have hc':=(endpoint_card_mono hs').2.trans (typed_popular_second W' s) + rw [reversedDomain_second_card] at hc' + exact ⟨typed_popular_rank_pos W r (hne.mono hs), + typed_popular_rank_pos W' s (hne.map.mono hs'),hc', + (endpoint_card_mono hs).2.trans (typed_popular_second W r)⟩ + +lemma marking_popular_partners_first (hdim : finrank K V=5) + (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) + (hp' : (m.1 i).1.2.2=true) : + ∀ a,((Finset.univ.filter fun b=>(a,b)∈markingDomain m i).card:ℝ) ≤ + 2*(Nat.card K:ℝ)^((4-(m.1 i).1.1.2.val):ℕ) := by + intro a + let W:=decodeState (finiteDecodeRecord (backwardRecord m)) i.rev.val + let r:=(m.1 i).1.1.2 + have hs : reversedMarkingDomain m i ⊆ typedDomain W r true := by + simpa only [backwardDomain,finiteTypedDomain,Fin.rev_rev,hp'] using markingDomain_backward m i + have hc : (Finset.univ.filter fun b=>(a,b)∈markingDomain m i) ⊆ + (Finset.univ.filter fun b=>(b,bidualPoint a)∈typedDomain W r true) := by + intro b hb + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,hs (Finset.mem_map.mpr + ⟨(a,b),(Finset.mem_filter.mp hb).2,rfl⟩)⟩ + have hcard : ((Finset.univ.filter fun b=>(a,b)∈markingDomain m i).card:ℝ) ≤ + (Finset.univ.filter fun b=>(b,bidualPoint a)∈typedDomain W r true).card := + Nat.cast_le.mpr (Finset.card_le_card hc) + have hpart := typed_popular_partner (K:=K) (V:=Dual K V) + (by simpa only [Subspace.dual_finrank_eq] using hdim) W r (bidualPoint a) + apply hcard.trans + simpa only [r] using hpart + +lemma marking_popular_partners_second (hdim : finrank K V=5) + (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) + (hp : (m.1 i).1.2.1=true) : + ∀ b,((Finset.univ.filter fun a=>(a,b)∈markingDomain m i).card:ℝ) ≤ + 2*(Nat.card K:ℝ)^((4-(m.1 i).1.1.1.val):ℕ) := by + intro b + let W:=decodeState (finiteDecodeRecord (forwardRecord m)) i.val + let r:=(m.1 i).1.1.1 + have hs : markingDomain m i ⊆ typedDomain W r true := by + simpa only [forwardDomain,finiteTypedDomain,hp] using markingDomain_forward m i + have hc : (Finset.univ.filter fun a=>(a,b)∈markingDomain m i) ⊆ + (Finset.univ.filter fun a=>(a,b)∈typedDomain W r true) := by + intro a ha + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,hs (Finset.mem_filter.mp ha).2⟩ + have hcard : ((Finset.univ.filter fun a=>(a,b)∈markingDomain m i).card:ℝ) ≤ + (Finset.univ.filter fun a=>(a,b)∈typedDomain W r true).card := + Nat.cast_le.mpr (Finset.card_le_card hc) + have hpart := typed_popular_partner (K:=K) (V:=V) hdim W r b + apply hcard.trans + simpa only [r] using hpart + +theorem marking_domain_dichotomy (hdim : finrank K V=5) + (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) + (hne : (markingDomain m i).Nonempty) : + (∃ u,Real.log (Nat.card K) ≤ u ∧ u ≤ 4*Real.log (Nat.card K) ∧ + ForwardCaps (markingDomain m i) u) ∨ + (∃ u,Real.log (Nat.card K) ≤ u ∧ u ≤ 4*Real.log (Nat.card K) ∧ + ReverseCaps (markingDomain m i) u) ∨ + ((m.1 i).1.2.1=true ∧ (m.1 i).1.2.2=true ∧ + 5 < (m.1 i).1.1.1.val+(m.1 i).1.1.2.val) := by + cases hp:(m.1 i).1.2.1 with + | false=>exact Or.inl (marking_poor_forward hdim m i hne hp) + | true=> + cases hp':(m.1 i).1.2.2 with + | false=>exact Or.inr (Or.inl (marking_poor_backward hdim m i hne hp')) + | true=> + by_cases hh:5 < (m.1 i).1.1.1.val+(m.1 i).1.1.2.val + · exact Or.inr (Or.inr ⟨rfl,rfl,hh⟩) + · have hc:=marking_popular_caps hdim m i hne hp hp' + have hr:=(m.1 i).1.1.1.isLt + have he:=popular_reciprocal_caps + (show (1:ℝ) ≤ Nat.card K by exact_mod_cast (Finite.one_lt_card (α:=K)).le) + hc.1 (by omega) (by omega) hc.2.2.1 hc.2.2.2 + exact Or.inl ⟨_,he.1,he.2.1,he.2.2⟩ +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/MarkingClasses.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/MarkingClasses.lean new file mode 100644 index 0000000000000000000000000000000000000000..d77ad54aa156449d5f9770a562064d3489959a00 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/MarkingClasses.lean @@ -0,0 +1,62 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.MarkingClassDomains + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section + +abbrev SlotClass := Fin 7 ⊕ (Fin 7 ⊕ (Fin 5 × Fin 5)) + +lemma slotClass_card : Fintype.card SlotClass=39 := by decide + +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] {N : ℕ} +local instance slotPointDE : DecidableEq (ℙ K V) := Classical.decEq _ +local instance slotDualDE : DecidableEq (ℙ K (Dual K V)) := Classical.decEq _ +local instance slotDualDualDE : DecidableEq (ℙ K (Dual K (Dual K V))) := Classical.decEq _ + +def classValid (width : ℝ) (m : UnionTranscript (Fin N) (FlagPair K V)) + (i : Fin N) : SlotClass → Prop + | .inl b => ∃ u,Real.log (Nat.card K) ≤ u ∧ u ≤ 4*Real.log (Nat.card K) ∧ + ForwardCaps (markingDomain m i) u ∧ BandCondition (Real.log (Nat.card K)) width u b + | .inr (.inl b) => ∃ u,Real.log (Nat.card K) ≤ u ∧ u ≤ 4*Real.log (Nat.card K) ∧ + ReverseCaps (markingDomain m i) u ∧ BandCondition (Real.log (Nat.card K)) width u b + | .inr (.inr (r,s)) => (m.1 i).1.1.1=r ∧ (m.1 i).1.1.2=s ∧ + (m.1 i).1.2.1=true ∧ (m.1 i).1.2.2=true ∧ 5 < r.val+s.val + +omit [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] + +theorem exists_valid_class (hdim : finrank K V=5) (width : ℝ) (hw : 0 ≤ width) + (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) + (hne : (markingDomain m i).Nonempty) : ∃ c,classValid width m i c := by + rcases marking_domain_dichotomy hdim m i hne with h | h | h + · obtain ⟨u,hu,hu',hc⟩:=h + obtain ⟨b,hb⟩:=exists_reciprocal_band hw hu hu' + exact ⟨.inl b,u,hu,hu',hc,hb⟩ + · obtain ⟨u,hu,hu',hc⟩:=h + obtain ⟨b,hb⟩:=exists_reciprocal_band hw hu hu' + exact ⟨.inr (.inl b),u,hu,hu',hc,hb⟩ + · exact ⟨.inr (.inr ((m.1 i).1.1.1,(m.1 i).1.1.2)),rfl,rfl,h⟩ + +def markingClass (hdim : finrank K V=5) (width : ℝ) (hw : 0 ≤ width) + (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) : SlotClass := + if hne : (markingDomain m i).Nonempty then (exists_valid_class hdim width hw m i hne).choose + else .inl 0 + +lemma markingClass_valid (hdim : finrank K V=5) (width : ℝ) (hw : 0 ≤ width) + (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) + (hne : (markingDomain m i).Nonempty) : classValid width m i (markingClass hdim width hw m i) := by + simp only [markingClass,dite_eq_left hne] + exact (exists_valid_class hdim width hw m i hne).choose_spec + +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/MarkingEndpoints.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/MarkingEndpoints.lean new file mode 100644 index 0000000000000000000000000000000000000000..87b9409bd720d28ad3ab0e88c1a8cf8015b5b6a5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/MarkingEndpoints.lean @@ -0,0 +1,222 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.HighGeometryClosure +import OAI.Combinatorics.RamseyFive.Marking.TwoScan + +namespace OAI + +noncomputable section + +namespace SharpRamseyFive.Marking + +section +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] +local instance markingEndpointsPointDecEq : DecidableEq (ℙ K V) := Classical.decEq _ +local instance markingEndpointsDualDecEq : DecidableEq (ℙ K (Dual K V)) := Classical.decEq _ +local instance markingEndpointsPairDecEq : DecidableEq (FlagPair K V) := Classical.decEq _ + +omit [Finite K] [FiniteDimensional K V] in +lemma mem_popularDomain (W : ℙ K (Dual K V) → Submodule K (Dual K V)) + (r l : ℕ) (z : FlagPair K V) : z∈popularDomain W r l ↔ + finrank K (W z.2)=r ∧ ((levelSet W l).card:ℝ)/(16*Nat.card K)≤ + memberships W (levelSet W l) z.2 ∧ z.1.submodule≤(W z.2).dualCoannihilator := by + simp only [popularDomain,Finset.mem_filter,Finset.mem_product,Finset.mem_univ,true_and] + tauto + +omit [Finite K] [FiniteDimensional K V] in +lemma mem_poorDomain (W : ℙ K (Dual K V) → Submodule K (Dual K V)) + (r l : ℕ) (z : FlagPair K V) : z∈poorDomain W r l ↔ + (((levelSet W l).filter fun y=>Incident z.1 y).card:ℝ)≤ + ((levelSet W l).card:ℝ)/(8*Nat.card K) ∧ finrank K (W z.2)≤r ∧ + Incident z.1 z.2 := by + simp only [poorDomain,Finset.mem_filter,Finset.mem_product,Finset.mem_univ, + true_and,upperSet] + tauto + +omit [FiniteDimensional K V] in +lemma typed_popular_second (W : ℙ K (Dual K V) → Submodule K (Dual K V)) + (r : Fin 5) : + (((typedDomain W r true).image Prod.snd).card:ℝ)≤32*(Nat.card K:ℝ)^r.val := by + unfold typedDomain + simp only [↓reduceIte] + split_ifs with hz + · have hsub : (popularDomain W r.val (chooseLevel W r.val)).image Prod.snd ⊆ + Finset.univ.filter fun b : ℙ K (Dual K V)=> + ((levelSet W (chooseLevel W r.val)).card:ℝ)/(16*Nat.card K)≤ + memberships W (levelSet W (chooseLevel W r.val)) b := by + intro b hb + obtain ⟨z,hz,rfl⟩ := Finset.mem_image.mp hb + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,(mem_popularDomain _ _ _ _).mp hz |>.2.1⟩ + have hc := popular_count W _ hz (chooseLevel W r.val) + (fun y hy=>(Finset.mem_filter.mp hy).2) + have hc' : ((((popularDomain W r.val (chooseLevel W r.val)).image Prod.snd).card):ℝ)≤ + 32*(Nat.card K:ℝ)^(chooseLevel W r.val) := + (show _ ≤ (_:ℝ) from by exact_mod_cast Finset.card_le_card hsub).trans hc + exact hc'.trans (mul_le_mul_of_nonneg_left + (pow_le_pow_right₀ (by exact_mod_cast (Finite.one_lt_card (α:=K)).le) + (chooseLevel_le W r.val)) (by norm_num)) + · simp only [Finset.image_empty,Finset.card_empty,Nat.cast_zero] + positivity + +lemma typed_popular_partner (hdim : finrank K V=5) + (W : ℙ K (Dual K V) → Submodule K (Dual K V)) (r : Fin 5) (b : ℙ K (Dual K V)) : + ((Finset.univ.filter fun a=>(a,b)∈typedDomain W r true).card:ℝ)≤ + 2*(Nat.card K:ℝ)^(4-r.val) := by + unfold typedDomain + simp only [↓reduceIte] + split_ifs with hz + · by_cases hr : finrank K (W b)=r.val + · have hsub : (Finset.univ.filter fun a=>(a,b)∈popularDomain W r.val (chooseLevel W r.val)) ⊆ + Finset.univ.filter fun a : ℙ K V=>a.submodule≤(W b).dualCoannihilator := by + intro a ha + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _, + ((mem_popularDomain _ _ _ _).mp (Finset.mem_filter.mp ha).2).2.2⟩ + have hc : ((Finset.univ.filter fun a=>(a,b)∈popularDomain W r.val (chooseLevel W r.val)).card:ℝ) ≤ + ((Finset.univ.filter fun a : ℙ K V=>a.submodule≤(W b).dualCoannihilator).card:ℝ) := by + exact_mod_cast Finset.card_le_card hsub + exact hc.trans (coannihilator_card_bound hdim _ _ hr (by omega)) + · have he : (Finset.univ.filter fun a=>(a,b)∈popularDomain W r.val (chooseLevel W r.val))=∅ := by + apply Finset.eq_empty_iff_forall_notMem.mpr + intro a ha + exact hr ((mem_popularDomain _ _ _ _).mp (Finset.mem_filter.mp ha).2).1 + rw [he] + simp only [Finset.card_empty,Nat.cast_zero] + positivity + · have he : (Finset.univ.filter fun a : ℙ K V=>(a,b)∈(∅:Finset (FlagPair K V)))=∅ := by + ext a + simp only [Finset.mem_filter,Finset.notMem_empty,and_false] + rw [he] + simp only [Finset.card_empty,Nat.cast_zero] + positivity + +omit [Finite K] [FiniteDimensional K V] in +lemma typed_poor_second (W : ℙ K (Dual K V) → Submodule K (Dual K V)) (r : Fin 5) : + (((typedDomain W r false).image Prod.snd).card:ℝ)≤ + 5*((levelSet W (chooseLevel W r.val)).card:ℝ) := by + unfold typedDomain + simp only [Bool.false_eq_true, ↓reduceIte] + split_ifs with hz + · have hsub : (poorDomain W r.val (chooseLevel W r.val)).image Prod.snd⊆upperSet W r.val := by + intro b hb + obtain ⟨z,hz,rfl⟩ := Finset.mem_image.mp hb + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,((mem_poorDomain _ _ _ _).mp hz).2.1⟩ + have hc : ((upperSet W r.val).card:ℝ)≤5*((levelSet W (chooseLevel W r.val)).card:ℝ) := by + exact_mod_cast (chooseLevel_large W r.val).trans (Nat.mul_le_mul_right _ (by omega)) + exact (show _ ≤ (_:ℝ) from by exact_mod_cast Finset.card_le_card hsub).trans hc + · simp only [Finset.image_empty,Finset.card_empty,Nat.cast_zero] + positivity + +lemma typed_poor_first (hdim : finrank K V=5) + (W : ℙ K (Dual K V) → Submodule K (Dual K V)) (r : Fin 5) : + (((typedDomain W r false).image Prod.fst).card:ℝ)* + ((levelSet W (chooseLevel W r.val)).card:ℝ)≤16*(Nat.card K:ℝ)^5 := by + let A := (typedDomain W r false).image Prod.fst + let Z := levelSet W (chooseLevel W r.val) + apply sparse_rectangle_size (d:=4) hdim (by decide) A Z + rw [incidences_eq_degrees] + have hpoor (a : ℙ K V) (ha : a∈A) : + ((Z.filter fun y=>Incident a y).card:ℝ)≤(Z.card:ℝ)/(8*Nat.card K) := by + obtain ⟨z,hz,rfl⟩ := Finset.mem_image.mp ha + unfold typedDomain at hz + simp only [Bool.false_eq_true, ↓reduceIte] at hz + split_ifs at hz with hn + · have hh : z∈poorDomain W r.val (chooseLevel W r.val) := hz + exact ((mem_poorDomain W r.val (chooseLevel W r.val) z).mp hh).1 + · exact False.elim (Finset.notMem_empty _ hz) + calc + _ ≤ ∑ _a∈A,(Z.card:ℝ)/(8*Nat.card K) := Finset.sum_le_sum hpoor + _ = (A.card:ℝ)*Z.card/(8*Nat.card K) := by simp; ring + _ ≤ _ := div_le_div_of_nonneg_left (by positivity) (by + have hq : 0<(Nat.card K:ℝ) := by exact_mod_cast Nat.zero_lt_of_lt (Finite.one_lt_card (α:=K)) + positivity) (by nlinarith [Nat.cast_nonneg (α:=ℝ) (Nat.card K)]) + +end + +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization BigOperators + +def clampParameter (q M : ℝ) : ℝ := max (Real.log q) (min (4*Real.log q) (Real.log M)) + +lemma exp_clampParameter {q M : ℝ} (hq : 0e.sum_comp (c (e i))) + _ = _ := e.sum_comp (fun i=>∑ j,c i j) + have h2 : (∑ i,∑ j,c (e j) (e i))=∑ i,∑ j,c i j := by + rw [Finset.sum_comm] + exact h1 + simp only [Finset.sum_add_distrib,h1,h2] + ring +end +end SharpRamseyFive.FiniteEntropy +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open SharpRamseyFive.CoreGeometry SharpRamseyFive.LowConflict +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V I : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype I] {n : ℕ} + +def orderedHighCollision (p : Law (I→FlagPair K V)) (e : I≃Fin n) (s : ℝ) (i j : I) : ℝ := + highCollision (orderedLaw p e) s (e i) (e j)+highCollision (orderedLaw p e) s (e j) (e i) +omit [Finite K] [FiniteDimensional K V] in +lemma orderedHighCollision_nonneg (p : Law (I→FlagPair K V)) (e : I≃Fin n) (s : ℝ) (i j : I) : + 0≤orderedHighCollision p e s i j := add_nonneg (high_collision_nonneg ..) (high_collision_nonneg ..) +omit [Finite K] [FiniteDimensional K V] in +lemma orderedHighCollision_symm (p : Law (I→FlagPair K V)) (e : I≃Fin n) (s : ℝ) (i j : I) : + orderedHighCollision p e s i j=orderedHighCollision p e s j i := add_comm _ _ + +omit [Finite K] [FiniteDimensional K V] in +lemma orderedLaw_consistent (p : Law (I→FlagPair K V)) (e : I≃Fin n) + (hcons : ∀ x,0

if InRectangle S (x i).1.rep (x i).2.rep then (1:ℝ) else 0) + rw [←heq] + exact hocc y hy S + have h:=high_three_collisions hdim (orderedLaw p e) s M hs hsmall hi ho + simp only [orderedHighCollision] + rw [sum_symm_reindex] + linarith + +lemma orderedHigh_pair_impossible (hdim : finrank K V=5) + (p : Law (I→FlagPair K V)) (e : I≃Fin n) (s ε : ℝ) + (hcons : ∀ x,0

x i))) (highThreeLeft (map p (fun x=>x i)) s)) + (hB : (3:ℝ)/4≤eventMass (second (map p (fun x=>x j))) (highThreeRight (map p (fun x=>x j)) s)) + (hvar : 64*(Nat.card K:ℝ)^5*(Real.exp s/(Nat.card K:ℝ)^3)*(Real.exp s/(Nat.card K:ℝ)^3)≤(1:ℝ)/4) + (hgood : entropy (map p (fun x=>x i))+entropy (map p (fun x=>x j))- + entropy (pair p (fun x=>x i) (fun x=>x j))+orderedHighCollision p e s i j≤ε) + (hsmall : 80004*ε<1/(8*(Nat.card K:ℝ))) : False := by + apply high_three_pair_impossible hdim (orderedLaw p e) s ε (orderedLaw_consistent p e hcons) + (e i) (e j) hij + · simpa only [tupleMarginal,orderedLaw_marginal] using hA + · simpa only [tupleMarginal,orderedLaw_marginal] using hB + · exact hvar + · simp only [tupleMarginal,orderedLaw_marginal,orderedLaw_pair] + apply le_trans _ hgood + dsimp only [orderedHighCollision] + linarith [high_collision_nonneg (orderedLaw p e) s (e j) (e i)] + · exact hsmall +end +end SharpRamseyFive.Marking + +end + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open SharpRamseyFive.Windows +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] {N w r : ℕ} [Nonempty (Fin r)] +local instance highDomainThreeBlockDE : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance highDomainThreeIndexDE : DecidableEq (Slots w r) := Classical.decEq _ + +omit [Fintype (ℙ K (Dual K (Dual K V)))] [Nonempty (ℙ K V)] + [Nonempty (ℙ K (Dual K V))] [Nonempty (ℙ K (Dual K (Dual K V)))] + [Nonempty (Fin r)] in +theorem high_three_domain_good_pair_impossible (hdim : finrank K V=5) + (D : Slots w r→Finset (FlagPair K V)) + (p : Law (Slots w r→FlagPair K V)) + (hD : ∀i,support (map p (fun x=>x i))⊆D i) + (hcap : ∀i,HighCaps (D i) 3 3) + (hcons : ∀ x,0

x i)) (hD i) s d hs (by linarith [hi.1]) hbad + have hB:=(hcap j).three_mass (map p (fun x=>x j)) (hD j) s d hs (by linarith [hj.1]) hbad + apply orderedHigh_pair_impossible hdim p (slotEquiv w r) s ε hcons i j + (representative_early v (sel (v,false)) t) hA.1 hB.2 hvar ?_ hsmall + exact good_index_scores_reverse J d ε p _ + (orderedHighCollision_nonneg p (slotEquiv w r) s) + (orderedHighCollision_symm p (slotEquiv w r) s) sel j hgoodM (v,false) trivial + +omit [Fintype (ℙ K (Dual K (Dual K V)))] [Nonempty (ℙ K V)] + [Nonempty (ℙ K (Dual K V))] [Nonempty (ℙ K (Dual K (Dual K V)))] in +theorem high_three_domain_preRound_impossible {κ : Type} [Fintype κ] {n rem : ℕ} + (hdim : finrank K V=5) + (μ : Law κ) (p : κ→Law (Slots w r→FlagPair K V)) + (D : κ→Slots w r→Finset (FlagPair K V)) + (hD : ∀a,0<μ a→InDomains (p a) (D a)) + (hcap : ∀a,0<μ a→∀i,HighCaps (D a i) 3 3) + (hcons : ∀ a,0<μ a→∀ x,0

+ ∑ i∈blockActive (historyUnused (S z.1.1) z.1.2), + preRoundBad μ p S n J d ε + (fun a h=>orderedHighCollision (historyPosterior (p a) h) (slotEquiv w r) s) z i)<2*r*w) : + False := by + obtain ⟨z,hz,v,t,hM,hE⟩:=preRound_good_early_middle (n:=n) (rem:=rem) μ p S hrem hr hS J d ε + (fun a h=>orderedHighCollision (historyPosterior (p a) h) (slotEquiv w r) s) hbudget + have ha:=(preRound_positive μ p S n z hz).1 + apply high_three_domain_good_pair_impossible hdim (D z.1.1) + (historyPosterior (p z.1.1) z.1.2) _ (hcap _ ha) _ + J d s ε hJ hs hbad hvar hsmall z.2 v t hE hM + · intro i + exact marginal_support_subset _ _ (history_in_domains _ _ (hD _ ha) n z.1.2) i + · intro x hx i j hij hi + exact hcons _ ha x (history_support (p z.1.1) n z.1.2 x hx) i j hij hi + +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalBands.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalBands.lean new file mode 100644 index 0000000000000000000000000000000000000000..8a2ad9730e0894e42e08ec3118ed4c94c30ea280 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalBands.lean @@ -0,0 +1,177 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.BandCoreRanks +import OAI.Combinatorics.RamseyFive.Marking.MarkingEndpoints + +namespace OAI + +noncomputable section + +namespace SharpRamseyFive.Marking + +section +open Module SharpRamseyFive.ProjectiveIncidence +open scoped Classical LinearAlgebra.Projectivization BigOperators + +def BandCondition (σ K u : ℝ) (i : Fin 7) : Prop := + if i.val%2=0 then |u-((i.val/2+1:ℕ):ℝ)*σ|≤K + else ((i.val/2+1:ℕ):ℝ)*σ+K nlinarith + +lemma open_band_slack {σ width u s : ℝ} {b : Fin 7} + (hband : BandCondition σ width u b) (hodd : b.val%2≠0) + (hwide : Real.log 32+3*s nlinarith + +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +theorem closed_reciprocal_ranks (hdim : finrank K V=5) + (p : Law ((ℙ K V)×(ℙ K (Dual K V)))) (u s width : ℝ) (b : Fin 7) + (hs : 2 ≤ s) (hband : BandCondition (Real.log (Nat.card K)) width u b) + (heven : b.val%2=0) (hsmall : Real.log 32+width+3*sgoodFirst_integer_rank hdim p _ s (by positivity) hs _ ha a h, + fun y h=>goodSecond_integer_rank hdim p _ s (by positivity) hs _ hb y h⟩ + +theorem open_reciprocal_ranks (hdim : finrank K V=5) + (p : Law ((ℙ K V)×(ℙ K (Dual K V)))) (u s width : ℝ) (b : Fin 7) + (hs : 2 ≤ s) (hband : BandCondition (Real.log (Nat.card K)) width u b) + (hodd : b.val%2≠0) (hwide : Real.log 32+3*sgoodFirst_integer_rank hdim p _ s (by positivity) hs _ ha a h, + fun y h=>goodSecond_integer_rank hdim p _ s (by positivity) hs _ hb y h⟩ +end SharpRamseyFive.Marking + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalDomainCaps.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalDomainCaps.lean new file mode 100644 index 0000000000000000000000000000000000000000..7b285a33c48f4139efe2d3686555de2fe2ed4690 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalDomainCaps.lean @@ -0,0 +1,170 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.AllHistoryWindowLoss +import OAI.Combinatorics.RamseyFive.Marking.MarkingClassDomains +import OAI.Combinatorics.RamseyFive.Marking.WindowCaps +import OAI.Combinatorics.RamseyFive.Entropy.History + +namespace OAI + +namespace SharpRamseyFive.Marking + +section +open Module ProjectiveIncidence FiniteEntropy Windows +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V I : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype I] + +omit [Finite K] [FiniteDimensional K V] in +lemma endpoint_support_domains (p : Law (I→FlagPair K V)) (D : I→Finset (FlagPair K V)) + (hp : InDomains p D) (i : I) : + support (FiniteEntropy.first (map p (fun x=>x i)))⊆(D i).image Prod.fst ∧ + support (FiniteEntropy.second (map p (fun x=>x i)))⊆(D i).image Prod.snd := by + constructor + · intro a ha + obtain ⟨z,hz,rfl⟩:=map_positive (map p (fun x=>x i)) Prod.fst a (by simpa only [map_fst] using (mem_support _ _).mp ha) + exact Finset.mem_image.mpr ⟨z,marginal_support_subset p D hp i ((mem_support _ _).mpr hz),rfl⟩ + · intro a ha + obtain ⟨z,hz,rfl⟩:=map_positive (map p (fun x=>x i)) Prod.snd a (by simpa only [map_snd] using (mem_support _ _).mp ha) + exact Finset.mem_image.mpr ⟨z,marginal_support_subset p D hp i ((mem_support _ _).mpr hz),rfl⟩ + +omit [Finite K] [FiniteDimensional K V] in +lemma ReciprocalCaps.of_domains (p : Law (I→FlagPair K V)) (D : I→Finset (FlagPair K V)) + (u : I→ℝ) (C : ℝ) (hp : InDomains p D) + (hinc : ∀x,0

if f y=f x then p y else 0) + (fun y _=>by split_ifs;exact p.nonneg _;rfl) (Finset.mem_univ x) + simpa only [ite_true] using ht + +variable {B A T : Type} [Fintype B] [Fintype A] [Fintype T] [Nonempty A] +local instance reciprocalHistoryDE : DecidableEq ((B×A)⊕T) := Classical.decEq _ + +omit [Finite K] [FiniteDimensional K V] [Nonempty A] in +lemma ReciprocalCaps.history + (p : Law (((B×A)⊕T)→FlagPair K V)) (u : ((B×A)⊕T)→ℝ) (C : ℝ) + (h : ReciprocalCaps (K:=K) (V:=V) p u C) (steps : ℕ) (z : BlockHistory B A T (FlagPair K V) steps) : + ReciprocalCaps (K:=K) (V:=V) (historyPosterior p z) u C := by + have hp : ∀x,0x i)))⊆ + support (FiniteEntropy.first (map p (fun x=>x i))) := by + rw [←map_fst,←map_fst,map_comp,map_comp] + exact support_map_mono p (historyPosterior p z) _ hp + have hsm (i) : support (FiniteEntropy.second (map (historyPosterior p z) (fun x=>x i)))⊆ + support (FiniteEntropy.second (map p (fun x=>x i))) := by + rw [←map_snd,←map_snd,map_comp,map_comp] + exact support_map_mono p (historyPosterior p z) _ hp + refine ⟨fun x hx=>h.incident x (hp x hx),?_,?_,?_⟩ + · intro i + exact (Nat.cast_le.mpr (Finset.card_le_card (hfm i))).trans (h.first i) + · intro i + exact (Nat.cast_le.mpr (Finset.card_le_card (hsm i))).trans (h.second i) + · intro i + exact (Nat.cast_le.mpr (Finset.card_le_card + (support_map_mono p (historyPosterior p z) (fun x=>x i) hp))).trans (h.flag i) +end +end + +open Module ProjectiveIncidence FiniteEntropy Windows +open ReverseCap ScoreGeometry BinaryTree TreeCodec PivotTree +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +local instance histWinBDE (w : ℕ) : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance histWinIDE (w n : ℕ) : DecidableEq (Slots w n) := Classical.decEq _ +variable {K V κ : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] [Fintype κ] + {w n steps : ℕ} [Nonempty (Fin n)] + +def historyCollision (p : κ→Law (Slots w n→FlagPair K V)) (u : κ→Slots w n→ℝ) (s : ℝ) + (a : κ) (h : BlockHistory (Fin w×Bool) (Fin n) (Fin w×Fin (2*n)) (FlagPair K V) steps) := + orderedCollision (historyPosterior (p a) h) (slotEquiv w n) (u a) s + +def actualWindowSet (μ : Law κ) (p : κ→Law (Slots w n→FlagPair K V)) + (u : κ→Slots w n→ℝ) (J d ε s k : ℝ) (z : WindowHistory κ K V w n steps) : Finset (Fin w) := + if 0<μ z.1.1 then survivingWindowSet + (indexBad J d ε (windowPosterior p z) (historyCollision p u s z.1.1 z.1.2) z.2) + z.2 (fun v=>u z.1.1 (earlySlot z.2 v)-u z.1.1 (lateSlot z.2 v)) k else ∅ + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K (Dual K (Dual K V)))] in +lemma actualWindowSet_eq (μ : Law κ) (p : κ→Law (Slots w n→FlagPair K V)) + (S : κ→(Fin w×Bool)→Finset (Fin n)) (u : κ→Slots w n→ℝ) (J d ε s k : ℝ) + (z : WindowHistory κ K V w n steps) (hz : 0u z.1.1 (earlySlot z.2 v)-u z.1.1 (lateSlot z.2 v)) k := by + rw [actualWindowSet,ite_eq_left (preRound_positive μ p S steps z hz).1] + rfl + +def actualWindows (hdim : finrank K V=5) (μ : Law κ) + (p : κ→Law (Slots w n→FlagPair K V)) (u : κ→Slots w n→ℝ) (J d ε s k C : ℝ) + (hcap : ∀a,0<μ a→ReciprocalCaps (p a) (u a) C) + (hs : 0u z.1.1 (earlySlot z.2 v)-u z.1.1 (lateSlot z.2 v)) k := by + rw [←hset,actualWindowSet,ite_eq_left ha] + cases hsame + exact Classical.choice (survivingWindows_exist hdim (windowPosterior p z) (u z.1.1) z.2 + J d ε s C ((hcap z.1.1 ha).history _ _ _ steps z.1.2) hs hJ hmass hsmall k hE) + +omit [Fintype (ℙ K (Dual K (Dual K V)))] in +theorem actualWindows_drop_mean (hdim : finrank K V=5) (μ : Law κ) + (p : κ→Law (Slots w n→FlagPair K V)) (S : κ→(Fin w×Bool)→Finset (Fin n)) + (u : κ→Slots w n→ℝ) (J d ε s k C lo hi : ℝ) + (hcap : ∀a,0<μ a→ReciprocalCaps (p a) (u a) C) + (hs : 0 + (((goodWindowSet (preRoundBad μ p S steps J d ε (historyCollision p u s) z) z.2).filter + fun v=>khcons z.1.1 ha x (history_support (p z.1.1) steps z.1.2 x hx)) + (hu z.1.1 ha) hlohi hc hk hε +end + +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalDropNumerics.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalDropNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3fe811394b3b6e118d0ea4f205039fefcca444e --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalDropNumerics.lean @@ -0,0 +1,199 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.HighNumerics +import OAI.Combinatorics.RamseyFive.Trees.IntegerWindows + +namespace OAI + +namespace SharpRamseyFive.ParameterHierarchy +open Filter Real Marking +open scoped Topology +noncomputable section + +lemma reciprocal_drop_ratio {σ D η w G C : ℝ} (hη : 0<η) (hσ : 1≤σ) + (hD : σ^beta η≤D) (hw : 0≤w) (hC : 0≤C) + (hG : G≤C*w*D*σ^(3*beta η)) : + (G+2*w*(2*(D*σ^(2*beta η))+Real.log 64))/(D*σ^(6*beta η))≤ + w*((C+4+2*Real.log 64)*σ^(-3*beta η)) := by + have hs : 0<σ := zero_lt_one.trans_le hσ + have hb:=beta_pos hη + have hD1 : 1≤D := (Real.one_le_rpow hσ hb.le).trans hD + have hDp : 0(C+4+2*Real.log 64)*σ^(-3*beta η)) atTop (𝓝 0) := by + simpa only [neg_mul,mul_zero] using (tendsto_rpow_neg_atTop hb).const_mul (C+4+2*Real.log 64) + filter_upwards [eventually_ge_atTop (1:ℝ),ht.eventually_lt_const hδ] with σ hσ ht + intro D w G hD hw hG + exact (reciprocal_drop_ratio hη hσ hD hw hC hG).trans (mul_le_mul_of_nonneg_left ht.le hw) + +lemma open_gap_scale {σ D η c w : ℝ} (hη : 0<η) (hσ : 1≤σ) (hc : 0 + obtain ⟨hn,hpack,hlo,hhi⟩:=integral_window_packing m 1 (by norm_num) (by simpa using hm4) + simp only [mul_one] at hn hpack hlo hhi + refine ⟨1,m/4,by norm_num,hn,?_,?_,?_,?_,?_,?_,?_⟩ + · simpa only [Nat.one_mul,Nat.mul_comm] using hpack + · simpa only [Nat.cast_one,one_mul,mul_one] using (show (m:ℝ)≤8*(m/4:ℕ) by linarith) + · simp only [Nat.cast_one,one_mul] + exact hDhi.trans (Real.rpow_le_rpow_of_exponent_le hσ (by linarith)) + · simp only [Nat.cast_one] + nlinarith + · intro _ + nlinarith + · intro hh + contradiction + · have hx:=mul_le_mul_of_nonneg_left (hTclosed D hDhi) hqp.le + have hh:=mul_le_mul_of_nonneg_left hsig (show 0≤c*q/16 by positivity) + nlinarith + | false => + have ha1 : 1≤σ^(η/2) := Real.one_le_rpow hσ (by positivity) + have hx : 2≤q*D*σ^(η/2) := by + have hqd : 2≤q*D := by nlinarith + nlinarith + have hfit' : 8*(q*D*σ^(η/2))≤(m:ℝ) := by + have hd : D*σ^(η/2)≤σ := by + calc + _ ≤σ^(1-η/2)*σ^(η/2) := mul_le_mul_of_nonneg_right hDhi (by positivity) + _ =σ := by rw [powadd];rw [show 1-η/2+η/2=(1:ℝ) by ring,Real.rpow_one] + have hcσ : 8≤c*σ^η := by simpa only [mul_comm] using (div_le_iff₀ hc).mp hfit + have hmlo : 8*q*σ≤c*q*σ^(1+η) := by + rw [Real.rpow_add hp,Real.rpow_one] + nlinarith [mul_le_mul_of_nonneg_right hcσ (show 0≤q*σ by positivity)] + nlinarith [mul_le_mul_of_nonneg_left hd hqp.le] + obtain ⟨hn,hw,hpack,hlo,hwlo,hwhi⟩:=integer_window_length hqp hDp + (Real.rpow_pos_of_pos hp (η/2)) hx m rfl hfit' + let n:=⌊q*D*σ^(η/2)⌋₊ + let w:=m/(4*n) + have hlo' : (c/8)*σ^(1+η/2)≤(w:ℝ)*D := by + apply le_trans _ hwlo + apply (le_div_iff₀ (by positivity : 0<8*q*σ^(η/2))).mpr + have heq : (c/8)*σ^(1+η/2)*(8*q*σ^(η/2))=c*q*σ^(1+η) := by + calc + _ =c*q*(σ^(1+η/2)*σ^(η/2)) := by ring + _ =_ := by rw [powadd];congr 2;ring + rwa [heq] + have hhi' : (w:ℝ)*D≤σ^(1+η/2) := by + apply hwhi.trans + apply (div_le_iff₀ (by positivity : 0<2*q*σ^(η/2))).mpr + have heq : σ^(1+η/2)*(2*q*σ^(η/2))=2*q*σ^(1+η) := by + calc + _ =2*q*(σ^(1+η/2)*σ^(η/2)) := by ring + _ =_ := by rw [powadd];congr 2;ring + rw [heq] + nlinarith + refine ⟨w,n,hw,hn,hpack,by linarith,hhi',?_,?_,fun _=>hlo',?_⟩ + · have hh:(w:ℝ)≤(w:ℝ)*D := le_mul_of_one_le_right (by positivity) hD1 + exact hh.trans (hhi'.trans hwbig) + · intro hh + contradiction + · have hnlo:=(integral_floor_half hx).2.1 + have hexp : σ^(3000*beta η)=σ^(-(η/2-3000*beta η))*σ^(η/2) := by + rw [powadd];congr 1;ring + have ht : 4*σ^(3000*beta η)≤σ^(η/2) := by + rw [hexp] + nlinarith [mul_le_mul_of_nonneg_right hTopen.le (Real.rpow_nonneg hp.le (η/2))] + have hh:=mul_le_mul_of_nonneg_left ht (show 0≤q*D by positivity) + dsimp only [n] + nlinarith + +theorem eventually_reciprocal_packing {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (c : ℝ) (hc : 0a∈A ∧ b∈B ∧ R a b) p q≤ρ) : + relationMass R (conditionOn p A (by linarith)) (conditionOn q B (by linarith))≤4*ρ := by + rw [relationMass_conditioned_good] + have hn:=relationMass_nonneg (fun a b=>a∈A ∧ b∈B ∧ R a b) p q p.nonneg q.nonneg + have hab : (1:ℝ)/4≤eventMass p A*eventMass q B := by + nlinarith [mul_le_mul hA hB (by norm_num : (0:ℝ)≤1/2) (by linarith : 0≤eventMass p A)] + have hp : 0if a∈A then p a else 0) (conditionOn q B hB)= + relationMass (fun a b=>a∈A ∧ b∈B ∧ R a b) p q/eventMass q B := by + simp only [relationMass,Finset.sum_filter,conditionOn_apply] + rw [Finset.sum_div] + apply Finset.sum_congr rfl + intro z _ + by_cases ha : z.1∈A <;> by_cases hb : z.2∈B <;> by_cases hr : R z.1 z.2 <;> + simp only [ha,hb,hr,ite_true,ite_false,true_and,false_and,and_false, + zero_mul,mul_zero,zero_div,mul_div_assoc] + +lemma relationMass_conditionOn_left_restricted (R : α→β→Prop) (p : Law α) (q : Law β) + (A : Finset α) (B : Finset β) (hA : 0if b∈B then q b else 0)= + relationMass (fun a b=>a∈A ∧ b∈B ∧ R a b) p q/eventMass p A := by + simp only [relationMass,Finset.sum_filter,conditionOn_apply] + rw [Finset.sum_div] + apply Finset.sum_congr rfl + intro z _ + by_cases ha : z.1∈A <;> by_cases hb : z.2∈B <;> by_cases hr : R z.1 z.2 <;> + simp only [ha,hb,hr,ite_true,ite_false,true_and,false_and,and_false, + zero_mul,mul_zero,zero_div,div_mul_eq_mul_div] + +lemma div_half_bound (a m ρ : ℝ) (hm : (1:ℝ)/2 ≤ m) (ha : 0≤a) (hρ : a≤ρ) : + a/m≤2*ρ := by + apply (div_le_iff₀ (by linarith : 0 < m)).mpr + have hr : 0≤ρ := ha.trans hρ + nlinarith [mul_le_mul_of_nonneg_left hm hr] +end +end SharpRamseyFive.FiniteEntropy +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.FiniteEntropy SharpRamseyFive.ProjectiveIncidence +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V I : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype I] {n : ℕ} + +def reciprocalGoodA (p : Law (FlagPair K V)) (u s : ℝ) : Finset (ℙ K V) := + goodFirstEndpoints p (32*Real.exp (5*Real.log (Nat.card K)-u)) ((Nat.card K:ℝ)^4) s + +def reciprocalGoodB (p : Law (FlagPair K V)) (u s : ℝ) : Finset (ℙ K (Dual K V)) := + goodFirstEndpoints (swap p) (32*Real.exp u) ((Nat.card K:ℝ)^4) s + +omit [FiniteDimensional K V] in +theorem reciprocal_good_mass (p : Law (FlagPair K V)) (u s d C₀ : ℝ) (hs : 0 linarith + +omit [Finite K] in +theorem ordered_good_reference_sparse (hdim : finrank K V=5) + (p : Law (I→FlagPair K V)) (e : I≃Fin n) (u : I→ℝ) (s ε : ℝ) + (hcons : ∀ x,0

x i))) (reciprocalGoodA (map p (fun x=>x i)) (u i) s)) + (hj : (1:ℝ)/2≤eventMass (second (map p (fun x=>x j))) (reciprocalGoodB (map p (fun x=>x j)) (u j) s)) + (hgood : entropy (map p (fun x=>x i))+entropy (map p (fun x=>x j))- + entropy (pair p (fun x=>x i) (fun x=>x j))+orderedCollision p e u s i j≤ε) : + relationMass Incident + (conditionOn (first (map p (fun x=>x i))) (reciprocalGoodA (map p (fun x=>x i)) (u i) s) (by linarith)) + (conditionOn (second (map p (fun x=>x j))) (reciprocalGoodB (map p (fun x=>x j)) (u j) s) (by linarith))≤ + 320016*ε := by + have hh:=relationMass_conditioned_good_le Incident (first (map p (fun x=>x i))) + (second (map p (fun x=>x j))) _ _ hi hj (80004*ε) + ((ordered_reciprocal_low_conflict hdim p e u s hcons i j hij).trans + (mul_le_mul_of_nonneg_left hgood (by norm_num))) + linarith +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalLevelProducer.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalLevelProducer.lean new file mode 100644 index 0000000000000000000000000000000000000000..a69f9ced6ae7516a77d2a7b02027d8896cfac883 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalLevelProducer.lean @@ -0,0 +1,214 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.ProjectiveExpectedLevelLoss +import OAI.Combinatorics.RamseyFive.Entropy.OrderedReciprocalLaw +import OAI.Combinatorics.RamseyFive.Entropy.ReciprocalSupports + +namespace OAI + +section +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +noncomputable section +variable {α β : Type*} [Fintype α] [Fintype β] +lemma eventMass_complement (p : Law α) (E : Finset α) : + eventMass p Eᶜ+eventMass p E=1 := by + change (∑ a∈Eᶜ,p a)+(∑ a∈E,p a)=1 + rw [Finset.sum_compl_add_sum] + exact p.sum_one +lemma entropy_swap (p : Law (α×β)) : entropy (swap p)=entropy p := by + simp only [entropy,Fintype.sum_prod_type,swap_mass] + rw [Finset.sum_comm] +lemma support_swap_card (p : Law (α×β)) : (support (swap p)).card=(support p).card := by + simp only [support,Finset.card_filter, Fintype.sum_prod_type] + change (∑ b : β,∑ a : α,if 0

a∈GA ∧ b∈GB ∧ R a b) (uniformWeight A) (uniformWeight B)= + relationMass R (uniformWeight A) (uniformWeight B) := by + simp only [relationMass,Finset.sum_filter] + apply Finset.sum_congr rfl + intro z _ + by_cases ha : z.1∈A + · by_cases hb : z.2∈B + · simp only [hA ha,hB hb,true_and] + · simp only [uniformWeight,ite_eq_right hb,mul_zero,ite_self] + · simp only [uniformWeight,ite_eq_right ha,zero_mul,ite_self] +end +end SharpRamseyFive.FiniteEntropy +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.FiniteEntropy SharpRamseyFive.ProjectiveIncidence +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +def reciprocalBadMass (s d C₀ : ℝ) : ℝ := Real.exp (-s)+50*(d+C₀)/s + +omit [FiniteDimensional K V] in +theorem reciprocal_bad_endpoints (p : Law (FlagPair K V)) (u s d C₀ : ℝ) + (hs : 0a∈goodFirstEndpoints p + (32*Real.exp (5*Real.log (Nat.card K)-u)) ((Nat.card K:ℝ)^4) s ∧ + b∈goodFirstEndpoints (swap q) (32*Real.exp v) ((Nat.card K:ℝ)^4) s ∧ Incident a b) + (first p) (second q)≤ρ) : + (∑ A,∑ B,L.firstLaw A*R.secondLaw B* + relationMass Incident (uniformWeight A) (uniformWeight B))≤(4*Real.exp 1)^2*ρ := by + let GA:=goodFirstEndpoints p (32*Real.exp (5*Real.log (Nat.card K)-u)) ((Nat.card K:ℝ)^4) s + let GB:=goodFirstEndpoints (swap q) (32*Real.exp v) ((Nat.card K:ℝ)^4) s + have h:=independent_support_domination (fun a b=>a∈GA ∧ b∈GB ∧ Incident a b) + (first p) (second q) L.firstLaw R.secondLaw id id (4*Real.exp 1) + (by positivity) L.first_dom R.second_dom + have he : (∑ A,∑ B,L.firstLaw A*R.secondLaw B* + relationMass (fun a b=>a∈GA ∧ b∈GB ∧ Incident a b) (uniformWeight A) (uniformWeight B))= + ∑ A,∑ B,L.firstLaw A*R.secondLaw B*relationMass Incident (uniformWeight A) (uniformWeight B) := by + apply Finset.sum_congr rfl + intro A _ + apply Finset.sum_congr rfl + intro B _ + by_cases ha : 0x i)) (u i) s) + (R : ReciprocalLevels (map p (fun x=>x j)) (u j) s) : + (∑ A,∑ B,L.firstLaw A*R.secondLaw B* + relationMass Incident (uniformWeight A) (uniformWeight B))≤ + ((4*Real.exp 1)^2*80004)*(entropy (map p (fun x=>x i))+entropy (map p (fun x=>x j))- + entropy (pair p (fun x=>x i) (fun x=>x j))+orderedCollision p e u s i j) := by + have h:=reciprocal_levels_cross _ _ _ _ s _ L R + (ordered_reciprocal_low_conflict hdim p e u s hcons i j hij) + simpa only [mul_assoc] using h + +theorem ordered_good_u_monotone (hdim : finrank K V=5) + (p : Law (I→FlagPair K V)) (e : I≃Fin n) (u : I→ℝ) (s ε : ℝ) + (hcons : ∀ x,0

x i)) (u i) s) + (R : ReciprocalLevels (map p (fun x=>x j)) (u j) s) + (hgood : entropy (map p (fun x=>x i))+entropy (map p (fun x=>x j))- + entropy (pair p (fun x=>x i) (fun x=>x j))+orderedCollision p e u s i j≤ε) + (hsmall : ((4*Real.exp 1)^2*80004)*ε≤1/(4*(Nat.card K:ℝ))) : + u j≤u i+2*s+Real.log 64 := by + apply reciprocal_u_monotone hdim L.firstLaw R.secondLaw (u i) (u j) s + L.first_size R.second_size + exact (ordered_level_sparsity hdim p e u s hcons i j hij L R).trans + ((mul_le_mul_of_nonneg_left hgood (by positivity)).trans hsmall) +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalLowConflict.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalLowConflict.lean new file mode 100644 index 0000000000000000000000000000000000000000..c234f94fa1671c24c7e6dd409320ec545bc59590 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalLowConflict.lean @@ -0,0 +1,77 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.ReciprocalBands +import OAI.Combinatorics.RamseyFive.Marking.Collisions + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open SharpRamseyFive.CoreGeometry SharpRamseyFive.LowConflict +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + {n : ℕ} + +def reciprocalGood (p : Law (Fin n→FlagPair K V)) (u : Fin n→ℝ) (s : ℝ) + (i j : Fin n) (a : ℙ K V) (b : ℙ K (Dual K V)) : Prop := + a∈goodFirstEndpoints (tupleMarginal p i) (32*Real.exp (5*Real.log (Nat.card K)-u i)) + ((Nat.card K:ℝ)^4) s ∧ + b∈goodFirstEndpoints (swap (tupleMarginal p j)) (32*Real.exp (u j)) + ((Nat.card K:ℝ)^4) s ∧ Incident a b + +omit [Finite K] [FiniteDimensional K V] in +lemma reciprocalGood_positive (p : Law (Fin n→FlagPair K V)) (u : Fin n→ℝ) (s : ℝ) + (i j : Fin n) (a : ℙ K V) (b : ℙ K (Dual K V)) (hg : reciprocalGood p u s i j a b) : + 0x i) (fun x=>x j))+ + tupleCollision p Projectivization.rep Projectivization.rep (reciprocalGood p u s) i j) := by + apply tuple_low_conflict hdim p Projectivization.rep Projectivization.rep (reciprocalGood p u s) ?_ i j hij + intro x hx i j hij hg + exact (incident_iff _ _).mp (hcons x hx i j hij hg.2.2) + +theorem reciprocal_closed_collisions (hdim : finrank K V=5) + (p : Law (Fin n→FlagPair K V)) (u : Fin n→ℝ) (s width M : ℝ) (b : Fin 7) + (hs : 2 ≤ s) (hband : ∀ i,BandCondition (Real.log (Nat.card K)) width (u i) b) + (heven : b.val%2=0) (hsmall : Real.log 32+width+3*sC/σ^(3*b)) atTop (𝓝 0) := + (tendsto_rpow_atTop h3).const_div_atTop C + have he : Tendsto (fun σ : ℝ=>Real.exp (-σ^(3*b))) atTop (𝓝 0) := + Real.tendsto_exp_neg_atTop_nhds_zero.comp (tendsto_rpow_atTop h3) + have hbad : Tendsto (fun σ : ℝ=>Real.exp (-σ^(3*b))+50*(σ^(-b)+C/σ^(3*b))) atTop (𝓝 0) := by + simpa using he.add ((ht.add hc).const_mul 50) + have hc' : Tendsto (fun σ : ℝ=>(Real.log 32+Real.log 33+2*(Real.log 6+1))/σ^(3*b)) + atTop (𝓝 0) := + (tendsto_rpow_atTop h3).const_div_atTop (Real.log 32+Real.log 33+2*(Real.log 6+1)) + have hl := (isLittleO_log_rpow_atTop h3).tendsto_div_nhds_zero + have hcore := (((ht.add hc').add (hl.const_mul 2)).const_mul 2).add (hbad.const_mul (2*Real.exp 1)) + simp only [add_zero,mul_zero] at hcore + filter_upwards [eventually_ge_atTop (1:ℝ),hbad.eventually_lt_const hε, + hcore.eventually_lt_const (by norm_num : (0:ℝ)<1/2)] with σ hσ he hc + intro D hD + exact ⟨(reciprocal_bad_uniform hσ hb hD hC).trans he.le, + (reciprocal_core_uniform hσ hb hD hC).trans hc.le⟩ + +def publicRetentionError (σ b H : ℝ) : ℝ := + let q:=Real.exp σ + let ε:=σ^(-2000*b)/q + H*(20*H*(50*q/(9*((9/100000)*(9/10))))*(4*Real.exp 1)^2*(320016*ε)+ + (q/(σ^(-1000*b)))*(4*Real.exp 1)^2*(320016*ε)+5*Real.exp (-q))+ + (20*H+2)*(50*q/(9*((9/100000)*(9/10))))*(4*Real.exp 1)*(160008*ε) + +def publicRetentionEnvelope (σ b : ℝ) : ℝ := + (20*(50/(9*((9/100000)*(9/10))))*(4*Real.exp 1)^2*320016)*σ^(-1998*b)+ + ((4*Real.exp 1)^2*320016)*σ^(-999*b)+5*(σ^b*Real.exp (-σ))+ + (20*(50/(9*((9/100000)*(9/10))))*(4*Real.exp 1)*160008)*σ^(-1999*b)+ + (2*(50/(9*((9/100000)*(9/10))))*(4*Real.exp 1)*160008)*σ^(-2000*b) + +lemma publicRetentionError_bound {σ b H : ℝ} (hσ : 1≤σ) (hH : 0≤H) (hH' : H≤σ^b) : + publicRetentionError σ b H≤publicRetentionEnvelope σ b := by + have hp : 0<σ := zero_lt_one.trans_le hσ + have hEq : 0publicRetentionEnvelope σ b) atTop (𝓝 0) := by + have h1:=tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<1998) hb) + have h2:=tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<999) hb) + have h3:=tendsto_rpow_mul_exp_neg_mul_atTop_nhds_zero b 1 zero_lt_one + have h4:=tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<1999) hb) + have h5:=tendsto_rpow_neg_atTop (mul_pos (by norm_num : (0:ℝ)<2000) hb) + simpa only [publicRetentionEnvelope,neg_mul,one_mul,neg_one_mul,mul_zero,add_zero] using + ((((h1.const_mul (20*(50/(9*((9/100000)*(9/10))))*(4*Real.exp 1)^2*320016)).add + (h2.const_mul ((4*Real.exp 1)^2*320016))).add (h3.const_mul 5)).add + (h4.const_mul (20*(50/(9*((9/100000)*(9/10))))*(4*Real.exp 1)*160008))).add + (h5.const_mul (2*(50/(9*((9/100000)*(9/10))))*(4*Real.exp 1)*160008)) + +theorem eventually_retention_error {b : ℝ} (hb : 0 simp only [Bool.false_eq_true,ite_false,zero_div];positivity + | true => + simp only [ite_true] + have hlen':=hlen rfl + have hh : (16*w*n*M/rem)/(σ^(-2000*beta η)/q)≤32*w*Cₘ*q*σ/σ^(-2000*beta η) := by + calc + _ ≤(16*w*n*(Cₘ*σ)/(n/2))/(σ^(-2000*beta η)/q) := by gcongr + _ =_ := by field_simp; ring + apply hh.trans + have he : 32*w*Cₘ*q*σ/σ^(-2000*beta η)= + (32*Cₘ/c)*w*(c*q*σ^(1+η))*σ^(2000*beta η-η) := by + rw [mul_assoc ((32*Cₘ/c)*w),mul_assoc (c*q),←Real.rpow_add hs] + have he : 1+η+(2000*beta η-η)=1-(-2000*beta η) := by ring + rw [he,Real.rpow_sub hs,Real.rpow_one] + field_simp + rw [he] + calc + _ ≤(32*Cₘ/c)*w*n*σ^(2000*beta η-η) := by gcongr + _ =_ := by ring + rw [add_div] + nlinarith [hfirst,hsecond,hthird] + +lemma eventually_reciprocal_round_fraction {η : ℝ} (hη : 0<η) + (c C Cₘ δ : ℝ) (hc : 04*C*σ^(-2*beta η)+16*C*σ^(-1001*beta η)+ + (32*Cₘ/c)*σ^(2000*beta η-η)) atTop (𝓝 0) := by + have he : 2000*beta η-η= -(η-2000*beta η) := by ring + simpa only [neg_mul,he,mul_zero,add_zero] using + (((tendsto_rpow_neg_atTop h2).const_mul (4*C)).add + ((tendsto_rpow_neg_atTop h1001).const_mul (16*C))).add + ((tendsto_rpow_neg_atTop h2000).const_mul (32*Cₘ/c)) + filter_upwards [eventually_ge_atTop (1:ℝ),ht.eventually_lt_const hδ] with σ hσ ht + intro q D w n B T rem M hq hD hw hn hB hBhi hT hr hM hMhi closed hlen + exact (reciprocal_round_ratio hη hσ hq hc hC hCm hD hw hn hB hBhi hT hr hM hMhi closed hlen).trans + (mul_le_mul_of_nonneg_left ht.le (mul_nonneg hw hn.le)) +end +end SharpRamseyFive.ParameterHierarchy + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalSharpRound.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalSharpRound.lean new file mode 100644 index 0000000000000000000000000000000000000000..3d5f41d43d0b6b0e90604d5b33d02c850d560109 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalSharpRound.lean @@ -0,0 +1,170 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Iteration.CodedWindowStage +import OAI.Combinatorics.RamseyFive.Entropy.AllWindowCost +import OAI.Combinatorics.RamseyFive.Marking.WindowSmallFailure +import OAI.Combinatorics.RamseyFive.Marking.WindowCodeDomains +import OAI.Combinatorics.RamseyFive.Entropy.PreparedWindows + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple + +section +open Module ProjectiveIncidence FiniteEntropy Windows Marking +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V Ω κ α : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype Ω] [Fintype κ] [Fintype α] + {N w n : ℕ} [Nonempty (Fin n)] {admissible : (Fin N→α)→Prop} +local instance rprBDE : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance rprTDE : DecidableEq (Fin w×Fin (2*n)) := Classical.decEq _ +local instance rprIDE : DecidableEq (Slots w n) := Classical.decEq _ + +theorem reciprocal_prepared_round_sharp (hd : finrank K V=5) + (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (w*(4*n)) admissible) + (ctx : Ω→κ) (J B M : ℝ) (P : Prepared S ctx J B M) + (rounds rem : ℕ) (hrounds : 0Finset.univ) i.val) (fun z=> + ∑j∈blockActive (historyUnused (fun _=>Finset.univ) z.1.2), + preRoundBad (first (pair S.law ctx (windowTuple S))) + (fiber (pair S.law ctx (windowTuple S))) (fun _ _=>Finset.univ) i.val J d ε + (historyCollision (fiber (pair S.law ctx (windowTuple S))) u s) z j)≤ + B/d+(2*B/rounds+(if b.val%2=0 then (4*(w*(4*n):ℝ)*M)/rem else 0))/ε := by + let μ:=first (pair S.law ctx (windowTuple S)) + let p:=fiber (pair S.law ctx (windowTuple S)) + let elig:=fun _ : κ=>fun _ : Fin w×Bool=>(Finset.univ : Finset (Fin n)) + have hS : ∀c,0<μ c→∀b,rem+rounds≤(elig c b).card := by + intro c hc b + simpa only [elig,Finset.card_univ,Fintype.card_fin] using hroom + have hD:=window_posterior_domains S ctx P.domain P.contains + have hdef:=P.window_deficit S ctx J B M + have hfix : ∀c,0<μ c→FixedOutside (p c) (blockActive (elig c)) := by + intro c hc + simpa only [elig,blockActive_univ] using fixedOutside_univ (p c) + have hband' : ∀c,0<μ c→∀i,BandCondition (Real.log (Nat.card K)) width (u c i) b := by + intro c hc i + exact hband c (by simpa only [μ,first_pair] using hc) i + by_cases hb : b.val%2=0 + · simp only [ite_eq_left hb] + exact exists_closed_reciprocal_round hd μ p elig rounds rem hrounds hrem hS J d ε B s width M + hdp he (fun c i=>P.domain c (slotEmbedding i)) (fun c i=>P.cap c (slotEmbedding i)) hD hfix hdef + u b hs hband' hb hsmall (window_posterior_incident S ctx P.incident) + (window_posterior_occupancy S ctx M P.occupancy) + · obtain ⟨i,hi⟩:=exists_open_reciprocal_round hd μ p elig rounds rem hrounds hrem hS J d ε B s width + hdp he (fun c i=>P.domain c (slotEmbedding i)) (fun c i=>P.cap c (slotEmbedding i)) hD hfix hdef + u b hs hband' hb hwide + refine ⟨i,?_⟩ + simpa only [ite_eq_right hb,add_zero] using hi +end +end + +open Module ProjectiveIncidence FiniteEntropy Windows Marking PivotTree MessageWeights ReverseCap ScoreGeometry +open ParameterHierarchy Filter +open scoped Classical BigOperators LinearAlgebra.Projectivization Topology NNReal +noncomputable section +local instance rpsBDE (w : ℕ) : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance rpsTDE (w n : ℕ) : DecidableEq (Fin w×Fin (2*n)) := Classical.decEq _ +local instance rpsIDE (w n : ℕ) : DecidableEq (Slots w n) := Classical.decEq _ + +theorem eventually_reciprocal_coded_stage {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb C₀ ρ : ℝ) (hCb : 0≤Cb) (hC : 0≤C₀) (hρ : 0<ρ) : + ∀ᶠ σ : ℝ in atTop,∀ (D k J lo hi B M width : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q₀ : ℕ) (K V Ω κ α : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q₀] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] [Fintype Ω] [Fintype κ] [Fintype α], + ∀ (_hd : finrank K V=5) (_hq3 : 3≤Nat.card K) (N w n H rounds rem l : ℕ) [Nonempty (Fin n)] + (admissible : (Fin N→α)→Prop) + (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (w*(4*n)) admissible) + (ctx : Ω→κ) (PS : Prepared S ctx J B M) + (u : κ→Slots w n→ℝ) (b : Fin 7) + (_hforward : ∀c,0fourFinitePredictor hd σ C.1 C.2 + (P η σ D R) (σ^(-800*beta η)) R L₀ + let r:=fun C : PivotContext K V=>fourFinitePredictor (K:=K) (V:=Dual K V) + (by simpa using hd) σ C.2 (C.1.map bidualPoint.toEmbedding) + (P η σ D R) (σ^(-800*beta η)) R L₀ + obtain ⟨i,hbad⟩:=reciprocal_prepared_round_sharp hd S ctx J B M PS rounds rem hrounds hrem hroom + (D*σ^beta η) (D*σ^(2*beta η)) (σ^(-2000*beta η)/Real.exp σ) width + (by positivity) hs (by positivity) hM u b hband hsmall hwide + let μ:=first (pair S.law ctx (windowTuple S)) + let p:=fiber (pair S.law ctx (windowTuple S)) + let elig:=fun _ : κ=>fun _ : Fin w×Bool=>(Finset.univ : Finset (Fin n)) + have hh : ∀c,0<μ c→0PS.domain c (slotEmbedding j)) (u c) C₀ + (window_posterior_domains S ctx PS.domain PS.contains c hc) + (window_posterior_incident S ctx PS.incident c hc) (hforward c (hh c hc)) (hflag c (hh c hc)) + have hroom' : ∀c,0<μ c→∀b,rem+i.val≤(elig c b).card := by + intro c hc b + simpa only [elig,Finset.card_univ,Fintype.card_fin] using + (Nat.add_le_add_left (Nat.le_of_lt i.isLt) rem).trans hroom + obtain ⟨W,hW⟩:=hloss D k J lo hi _ R L₀ q₀ K V κ hd hq3 w n H i.val rem μ p elig u hcaps + (window_posterior_consistent S ctx PS.consistent) (fun c hc=>hu c (hh c hc)) + hlohi hk hJ hσ hq hcard hrange hL hb0 hbhi hw hH hmass hend hε hrem hn hroom' hbad + let E:=actualWindowSet μ p u J (D*σ^beta η) (σ^(-2000*beta η)/Real.exp σ) (D*σ^(2*beta η)) k (steps:=i.val) + have hdrop : ∀h,∀v∈E h,u h.1.1 (earlySlot h.2 v)-u h.1.1 (lateSlot h.2 v)≤k := by + intro h v hv + dsimp only [E,actualWindowSet] at hv + split_ifs at hv with hp + · exact (Finset.mem_filter.mp hv).2 + · exact False.elim (Finset.notMem_empty v hv) + apply actualWindow_coded S ctx elig i.val f r (fun h=>u h.1.1) E W σ hσ hq hd.le + (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) hl + (preRoundBad μ p elig i.val J (D*σ^beta η) (σ^(-2000*beta η)/Real.exp σ) + (historyCollision p u (D*σ^(2*beta η)))) + (windowCodeBudget σ (Nat.card K) (P η σ D R) (k+2*(D*σ^(2*beta η))+Real.log 4) w H) + (4*σ+codeDomainSlack k (D*σ^(2*beta η))) M PS.geometric + · intro C + exact fourFinite_weight hd σ C.1 C.2 (P η σ D R) (σ^(-800*beta η)) R L₀ + · intro C + exact fourFinite_weight (K:=K) (V:=Dual K V) (by simpa using hd) σ C.2 (C.1.map bidualPoint.toEmbedding) (P η σ D R) (σ^(-800*beta η)) R L₀ + · intro h v t + exact hcost D k (D*σ^(2*beta η)) R L₀ q₀ K V hd w n H (windowPosterior p h) (u h.1.1) + h.2 (E h) (W h) hσ hq hcard hrange hL hb0 hbhi (hdrop h) hw t v + · intro h v t j + exact allWindow_domain_log f r (windowPosterior p h) (u h.1.1) h.2 (E h) (W h) + σ hσ hq hd k (σ^(-1000*beta η)) (P η σ D R) hb0 (hdrop h) t v j + · exact hW.trans hnum +end + +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalStageArithmetic.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalStageArithmetic.lean new file mode 100644 index 0000000000000000000000000000000000000000..e2b9b15d5275df7760c3b3a379671458b16c9ec4 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/ReciprocalStageArithmetic.lean @@ -0,0 +1,122 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.WindowCodeDomains +import OAI.Combinatorics.RamseyFive.Marking.HighNumerics + +namespace OAI + +namespace SharpRamseyFive.ParameterHierarchy +open Filter Real Marking ProjectiveIncidence SelectedTuple +open scoped Topology NNReal +noncomputable section + +def domainSlackConstant : ℝ := 4+Real.log 4+Real.log (2*(320/(9/100000)+320)^2) + +lemma domainSlackConstant_pos : 04*((4*Real.exp 1)^2*80004)*σ^(-2000*beta η)) atTop (𝓝 0) := by + simpa only [neg_mul,mul_zero] using (tendsto_rpow_neg_atTop he).const_mul (4*((4*Real.exp 1)^2*80004)) + filter_upwards [eventually_ge_atTop (1:ℝ),eventually_ge_atTop (4*Real.log 32+1), + (tendsto_rpow_atTop hb).eventually (eventually_ge_atTop (4+Real.log 32)), + eventually_stage_scale hη 3 (1/16) (by unfold beta;linarith) (by norm_num), + ht.eventually_lt_const (by norm_num : (0:ℝ)<1)] with σ hσ hs hg hscale hε + intro D hD hDhi + have hp : 0<σ := zero_lt_one.trans_le hσ + have hl : 0≤Real.log 32 := Real.log_nonneg (by norm_num) + have hl4 : 0≤Real.log 4 := Real.log_nonneg (by norm_num) + have h1 : 1≤D := (Real.one_le_rpow hσ hb.le).trans hD + have hs1 : 1≤D*σ^(2*beta η) := by + have := Real.one_le_rpow hσ (show 0≤2*beta η by positivity) + nlinarith + have h2 : 2≤D*σ^(2*beta η) := by + have hh : σ^beta η≤σ^(2*beta η) := Real.rpow_le_rpow_of_exponent_le hσ (by linarith) + nlinarith + have h23 : D*σ^(2*beta η)≤D*σ^(3*beta η) := by + apply mul_le_mul_of_nonneg_left (Real.rpow_le_rpow_of_exponent_le hσ (by linarith)) (by linarith) + have h6 : D*σ^(2*beta η)≤D*σ^(6*beta η) := by + apply mul_le_mul_of_nonneg_left (Real.rpow_le_rpow_of_exponent_le hσ (by linarith)) (by linarith) + have hwide : Real.log 32+3*(D*σ^(2*beta η)) simp [mul_comm] + +noncomputable def capturedEvent (p : Law (α × β)) (q : Law (γ × δ)) + (v : β → Module.Dual K V) (w : γ → V) (good : α → δ → Prop) + (a : α) (b : β) (c : γ) (y : δ) : Prop := + good a y ∧ reverseMiss (fiber p a) (fiber (swap q) y) v w≤(1/40000:ℝ) ∧ + v b∈core (K := K) (fiber p a) v (1/200) ∧ + w c∈core (K := K) (fiber (swap q) y) w (1/200) + +omit [FiniteDimensional K V] in +lemma captured_orthogonal (p : Law (α × β)) (q : Law (γ × δ)) + (v : β → Module.Dual K V) (w : γ → V) (good : α → δ → Prop) + (a : α) (b : β) (c : γ) (y : δ) (h : capturedEvent p q v w good a b c y) : + core (K := K) (fiber p a) v (1/200) ≤ + (core (K := K) (fiber (swap q) y) w (1/200)).dualAnnihilator := by + intro f hf + apply (Submodule.mem_dualAnnihilator f).mpr + intro z hz + apply core_orthogonal (fiber p a) v (fiber (swap q) y) w (1/200) (by norm_num) _ f hf z hz + rw [←reverseMiss_eq] + convert h.2.1 using 1; norm_num + +lemma conditional_charge (hdim : finrank K V=5) (p : Law (α × β)) (q : Law (γ × δ)) + (v : β → Module.Dual K V) (w : γ → V) (good : α → δ → Prop) (a : α) (y : δ) : + (19/20:ℝ)*(if good a y then 1 else 0) ≤ + 38000*(if good a y then reverseMiss (fiber p a) (fiber (swap q) y) v w else 0)+ + ∑ b,∑ c,if capturedEvent p q v w good a b c y then + fiber p a b*fiber (swap q) y c else 0 := by + by_cases hg : good a y + · simp only [hg,ite_true] + by_cases hm : reverseMiss (fiber p a) (fiber (swap q) y) v w≤(1/40000:ℝ) + · have hc := source_core_capture hdim (fiber p a) (fiber (swap q) y) v w + have hz := reverseMiss_nonneg (fiber p a) (fiber (swap q) y) v w + simp only [capturedEvent,hg,hm,true_and] + nlinarith + · have hh : (19/20:ℝ)≤38000*reverseMiss (fiber p a) (fiber (swap q) y) v w := by + linarith + simpa only [capturedEvent,hg,hm,true_and,false_and,ite_false,Finset.sum_const_zero,add_zero,mul_one] using hh + · simp only [hg,ite_false,mul_zero,zero_add,capturedEvent,false_and,Finset.sum_const_zero,le_refl] +end SharpRamseyFive.LowConflict + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/ScanChoice.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/ScanChoice.lean new file mode 100644 index 0000000000000000000000000000000000000000..ccdf26d205f707043dddb2702a714f8fa96b1b71 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/ScanChoice.lean @@ -0,0 +1,186 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.IncidencesDegrees +import OAI.Combinatorics.RamseyFive.Entropy.LogContractionDrop +import OAI.Combinatorics.RamseyFive.Marking.ChooseLevel + +namespace OAI + +namespace SharpRamseyFive.Marking + +section +open Module SharpRamseyFive.ProjectiveIncidence +open scoped LinearAlgebra.Projectivization Classical BigOperators +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Fintype (ℙ K (Dual K V))] + +noncomputable def scanChoice (a : ℕ → ℙ K V) (b : ℕ → ℙ K (Dual K V)) + (q : ℝ) (n : ℕ) : Option (Fin 5) := + if Expensive (scanState a b q n) (a n) (b n) q then + if h : chooseLevel (scanState a b q n) (finrank K (scanState a b q n (b n)))<5 + then some ⟨_,h⟩ else none + else none + +lemma scanChoice_isSome (hdim : finrank K V=5) + (a : ℕ → ℙ K V) (b : ℕ → ℙ K (Dual K V)) (q : ℝ) (N : ℕ) + (hF : ∀ i j,i simp_all + +theorem scanSet_card_bound (hdim : finrank K V=5) + (a : ℕ → ℙ K V) (b : ℕ → ℙ K (Dual K V)) (q : ℝ) (hq : 0 upperSet (scanState a b q n) j.val + have hm : ∀ n (scanChoice a b q n).isSome)= + (Finset.range N).filter fun n => Expensive (state a b (scanSet a b q n)) (a n) (b n) q := by + apply Finset.filter_congr + intro n hn + exact scanChoice_isSome hdim a b q N hF (Finset.mem_range.mp hn) + have hzero (j : Fin 5) : S 0 j=Finset.univ := by + apply Finset.eq_univ_iff_forall.mpr + intro y + apply Finset.mem_filter.mpr ⟨Finset.mem_univ _,?_⟩ + change finrank K (state a b ∅ y)≤j.val + rw [state_empty] + simp + rw [hfilter,←scan_count] at hb + simp only [hzero,Finset.card_univ] at hb + have hsum : (∑ j:Fin 5,Real.log (1+(Fintype.card (ℙ K (Dual K V)):ℝ)))= + 5*Real.log (1+(Fintype.card (ℙ K (Dual K V)):ℝ)) := by simp + rw [hsum] at hb + have hid : (1/(80*q))/2=1/(160*q) := by ring + rw [hid] at hb + have hh:=mul_le_mul_of_nonneg_right hb (show 0≤160*q by positivity) + have hz : 160*q≠0 := by positivity + field_simp at hh + nlinarith + +end + +open Module SharpRamseyFive.ProjectiveIncidence +open scoped LinearAlgebra.Projectivization Classical BigOperators +variable {K V ι : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +noncomputable def popularDomain (W : ℙ K (Dual K V) → Submodule K (Dual K V)) + (r l : ℕ) : Finset (ℙ K V × ℙ K (Dual K V)) := + ((Finset.univ : Finset (ℙ K V)) ×ˢ (Finset.univ.filter fun b : ℙ K (Dual K V) => + finrank K (W b)=r ∧ ((levelSet W l).card:ℝ)/(16*Nat.card K)≤ memberships W (levelSet W l) b)).filter + fun ab => ab.1.submodule≤(W ab.2).dualCoannihilator + +noncomputable def poorDomain (W : ℙ K (Dual K V) → Submodule K (Dual K V)) + (r l : ℕ) : Finset (ℙ K V × ℙ K (Dual K V)) := + ((Finset.univ.filter fun a : ℙ K V => + (((levelSet W l).filter fun y => Incident a y).card:ℝ)≤((levelSet W l).card:ℝ)/(8*Nat.card K)) ×ˢ + upperSet W r).filter fun ab => Incident ab.1 ab.2 + +theorem popularDomain_card (hdim : finrank K V=5) + (W : ℙ K (Dual K V) → Submodule K (Dual K V)) (r l : ℕ) (hlr : l≤r) (hr : r≤4) + (hZ : (levelSet W l).Nonempty) : + ((popularDomain W r l).card:ℝ)≤64*(Nat.card K:ℝ)^4 := + popular_joint_count hdim W r l hlr hr hZ _ (fun _ hb => (Finset.mem_filter.mp hb).2) + +theorem poorDomain_card (hdim : finrank K V=5) + (W : ℙ K (Dual K V) → Submodule K (Dual K V)) (r : ℕ) (hr : r≤4) : + ((poorDomain W r (chooseLevel W r)).card:ℝ)≤89*(Nat.card K:ℝ)^4 := by + apply poor_joint_count hdim _ _ _ (fun a ha => (Finset.mem_filter.mp ha).2) + exact (chooseLevel_large W r).trans (Nat.mul_le_mul_right _ (by omega)) + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] in + +lemma scan_annihilator (a : ℕ → ℙ K V) (b : ℕ → ℙ K (Dual K V)) (q : ℝ) (N : ℕ) + (hF : ∀ i j,i fun _ => ⊥ + | n+1 => match record n with + | none => decodeState record n + | some ab => nextState (decodeState record n) ab.1 ab.2 + +omit [FiniteDimensional K V] [Fintype (ℙ K V)] in +lemma decode_scanRecord (a : ℕ → ℙ K V) (b : ℕ → ℙ K (Dual K V)) + (q : ℝ) (n : ℕ) : decodeState (scanRecord a b q) n=scanState a b q n := by + induction n with + | zero => funext y; exact (state_empty a b y).symm + | succ n ih => + rw [decodeState,scanRecord] + split_ifs with he + · simp only [ih] + exact (scanState_update a b q n he).symm + · simp only [ih] + change state a b (scanSet a b q n)=state a b (scanSet a b q (n+1)) + change ¬Expensive (state a b (scanSet a b q n)) (a n) (b n) q at he + rw [scanSet,ite_eq_right he] + +omit [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] in +lemma decodeState_congr_prefix (record record' : ℕ → Option (ℙ K V × ℙ K (Dual K V))) + (n : ℕ) (h : ∀ i rfl + | succ n ih => + rw [decodeState,decodeState,h n (Nat.lt_succ_self n),ih (fun i hi => h i (Nat.lt_succ_of_lt hi))] + +noncomputable def rankMask (a : ℕ → ℙ K V) (b : ℕ → ℙ K (Dual K V)) + (q : ℝ) (n : ℕ) : Fin 5 := ⟨finrank K (scanState a b q n (b n))%5,Nat.mod_lt _ (by decide)⟩ + +omit [Fintype (ℙ K V)] in +lemma rankMask_val (hdim : finrank K V=5) + (a : ℕ → ℙ K V) (b : ℕ → ℙ K (Dual K V)) (q : ℝ) (N : ℕ) + (hF : ∀ i j,i present (scanRecord a b q i)) N,scan_count] + simp only [Finset.card_filter,Nat.cast_sum] + apply Finset.sum_congr rfl + intro i _ + by_cases he : Expensive (scanState a b q i) (a i) (b i) q + · rw [scanRecord,ite_eq_left he] + change Expensive (state a b (scanSet a b q i)) (a i) (b i) q at he + rw [ite_eq_left he] + norm_num [present] + · rw [scanRecord,ite_eq_right he] + change ¬Expensive (state a b (scanSet a b q i)) (a i) (b i) q at he + rw [ite_eq_right he] + norm_num [present] + +omit [FiniteDimensional K V] in + +theorem one_scan_entropy (p : Law (κ × α)) + (a : α → ℕ → ℙ K V) (b : α → ℕ → ℙ K (Dual K V)) (q : ℝ) (N : ℕ) + (S : κ → Fin N → Finset (ℙ K V × ℙ K (Dual K V))) (cap : ℝ) + (hcap : 1≤cap) (hS : ∀ c i,((S c i).card:ℝ)≤cap) + (hsupp : ∀ c z,0

fun i : Fin N => rankMask (a z) (b z) q i.val) + (fun z => fun i : Fin N => scanRecord (a z) (b z) q i.val)))≤ + (N:ℝ)*(Real.log 5+Real.log 2)+ + (∑ z,second p z*(scanSet (a z) (b z) q N).card)*Real.log cap := by + have hh:=conditional_marked_entropy (β := ℙ K V × ℙ K (Dual K V)) + (ι := Fin N) (μ := Fin N → Fin 5) p + (fun z => fun i : Fin N => rankMask (a z) (b z) q i.val) + (fun z => fun i : Fin N => scanRecord (a z) (b z) q i.val) S cap hcap hS (by + intro c z hz i ab he + unfold scanRecord at he + split_ifs at he with he' + · have hval : (a z i.val,b z i.val)=ab := Option.some.inj he + rw [←hval] + exact hsupp c z hz i +) + apply hh.trans_eq + simp only [Fintype.card_fun,Fintype.card_fin,Nat.cast_pow,Nat.cast_ofNat, + Real.log_pow,scanRecord_present] + ring + +end + +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +local instance finiteMarkingDecEq (N : ℕ) : DecidableEq (Fin N) := Classical.decEq _ + +variable {β : Type*} [Nonempty β] {N : ℕ} +def extendTuple (f : Fin N → β) (n : ℕ) : β := + if h:n (finiteRecord f q i).isSome + +omit [FiniteDimensional K V] [Fintype (ℙ K V)] in +lemma finiteRecord_value (f : Fin N → FlagPair K V) (q : ℝ) (i : Fin N) : + finiteRecord f q i = if i∈expensiveSet f q then some (f i) else none := by + simp only [expensiveSet,finiteRecord,scanRecord] + split_ifs with h <;> simp_all [tupleFirst,tupleSecond,extendTuple_at] + +omit [FiniteDimensional K V] [Fintype (ℙ K V)] in +lemma expensiveSet_card (f : Fin N → FlagPair K V) (q : ℝ) : + ((expensiveSet f q).card:ℝ) = + (scanSet (tupleFirst f) (tupleSecond f) q N).card := by + rw [←scanRecord_present] + change _ = ∑ i : Fin N,present (finiteRecord f q i) + simp_rw [finiteRecord_value] + have he (i : Fin N) : present (if i∈expensiveSet f q then some (f i) else none) = + if i∈expensiveSet f q then (1:ℝ) else 0 := by split_ifs <;> rfl + simp_rw [he] + rw [Finset.sum_ite_mem,Finset.univ_inter] + simp + +omit [Fintype (ℙ K V)] in +theorem expensiveSet_bound (hdim : finrank K V=5) (f : Fin N → FlagPair K V) + (hf : TupleConsistent f) (q : ℝ) (hq : 0 hnew (h ▸ le_sup_left)) + +end + +open Module SharpRamseyFive.ProjectiveIncidence +open scoped LinearAlgebra.Projectivization Classical BigOperators +variable {K V Y : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [Fintype (ℙ K V)] + +lemma subspace_finset_card (W : Submodule K V) : + (Finset.univ.filter fun p : ℙ K V => p.submodule≤W).card = + ∑ i∈Finset.range (finrank K W),Nat.card K^i := by + rw [←Fintype.card_subtype,←Nat.card_eq_fintype_card] + exact card_subspacePoints W + +noncomputable def memberships (W : Y → Submodule K V) (Z : Finset Y) (b : ℙ K V) : ℕ := + (Z.filter fun y => b.submodule≤W y).card + +lemma sum_memberships (W : Y → Submodule K V) (Z : Finset Y) (l : ℕ) + (hW : ∀ y∈Z,finrank K (W y)=l) : + (∑ b : ℙ K V,(memberships W Z b:ℝ)) = + (Z.card:ℝ)*(∑ i∈Finset.range l,(Nat.card K:ℝ)^i) := by + simp only [memberships,←Finset.sum_boole] + rw [Finset.sum_comm] + have hh (y : Y) (hy : y∈Z) : + (∑ b : ℙ K V,if b.submodule≤W y then (1:ℝ) else 0)= + ∑ i∈Finset.range l,(Nat.card K:ℝ)^i := by + rw [Finset.sum_boole,subspace_finset_card,hW y hy] + push_cast + rfl + rw [Finset.sum_congr rfl hh,Finset.sum_const,nsmul_eq_mul] + +lemma q_mul_geometric_bound (q : ℝ) (hq : 2≤q) (l : ℕ) : + q*(∑ i∈Finset.range l,q^i)≤2*q^l := by + have hp := pow_nonneg (by linarith : 0≤q) l + have hs := Finset.sum_nonneg (fun i (_ : i∈Finset.range l) => pow_nonneg (by linarith : 0≤q) i) + have he := geom_sum_mul q l + have hn := mul_nonneg hs (by linarith : 0≤q-2) + nlinarith + +theorem popular_count (W : Y → Submodule K V) (Z : Finset Y) (hZ : Z.Nonempty) + (l : ℕ) (hW : ∀ y∈Z,finrank K (W y)=l) : + ((Finset.univ.filter fun b : ℙ K V => + (Z.card:ℝ)/(16*Nat.card K)≤ memberships W Z b).card:ℝ) ≤ + 32*(Nat.card K:ℝ)^l := by + let B := Finset.univ.filter fun b : ℙ K V => + (Z.card:ℝ)/(16*Nat.card K)≤ memberships W Z b + have hq : (2:ℝ)≤Nat.card K := by exact_mod_cast Finite.one_lt_card (α := K) + have hZpos : (0:ℝ) (Finset.mem_filter.mp hb).2 + _ ≤ _ := Finset.sum_le_univ_sum_of_nonneg (fun _ => by positivity) + rw [sum_memberships W Z l hW] at hs + have hm := mul_le_mul_of_nonneg_right hs (show (0:ℝ)≤16*Nat.card K by positivity) + have he : (B.card:ℝ)*((Z.card:ℝ)/(16*Nat.card K))*(16*Nat.card K)=B.card*Z.card := by + have hq0 : (Nat.card K:ℝ)≠0 := by linarith + field_simp + rw [he] at hm + have hgeom := q_mul_geometric_bound (Nat.card K:ℝ) hq l + have hc : (B.card:ℝ)*Z.card ≤ (32*(Nat.card K:ℝ)^l)*Z.card := by + nlinarith [mul_le_mul_of_nonneg_right hgeom (show (0:ℝ)≤16*Z.card by positivity)] + change (B.card:ℝ) ≤ 32*(Nat.card K:ℝ)^l + exact (mul_le_mul_iff_left₀ hZpos).mp (by simpa only [mul_comm] using hc) + +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/SurvivingWindowCode.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/SurvivingWindowCode.lean new file mode 100644 index 0000000000000000000000000000000000000000..f0c461ef0436e226de897735132b4128c94e6b3f --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/SurvivingWindowCode.lean @@ -0,0 +1,67 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Trees.SurvivingWindows +import OAI.Combinatorics.RamseyFive.Marking.WindowLevels +import OAI.Combinatorics.RamseyFive.Entropy.WindowLossAggregation + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.FiniteEntropy SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.Windows +open ReverseCap ScoreGeometry BinaryTree TreeCodec PivotTree +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +local instance swcProp (P : Prop) : Decidable P := Classical.propDecidable P +local instance swcBDE (w : ℕ) : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance swcIDE (w n : ℕ) : DecidableEq (Slots w n) := Classical.decEq _ +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] +variable (f : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V→FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + {w n : ℕ} [Nonempty (Fin n)] (p : Law (Slots w n→FlagPair K V)) + (u : Slots w n→ℝ) (sel : Fin w×Bool→Fin n) (E : Finset (Fin w)) (hE : E.Nonempty) + {s : ℝ} (W : ReciprocalWindows p u sel (survivingOriginal E hE) s) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (c δ τ P : ℝ) (hδ : 0<δ) + +abbrev WindowLevelsData (m : ℕ) := + (Fin (m+1)→Finset (ℙ K V))×(Fin (m+1)→Finset (ℙ K (Dual K V))) + +def survivingLevelLaw : Law (WindowLevelsData (K:=K) (V:=V) E.card) := + originalLevelLaw (fun i=>(W.early i).firstLaw) (fun i=>(W.late i).secondLaw) +def survivingEncoded (t : VariableTreeTape f r w) (z : WindowLevelsData (K:=K) (V:=V) E.card) : + VariableTreeMessage f r t (Finset.univ,Finset.univ) := + variableTreeEncoded f r t (Finset.univ,Finset.univ) + ⟨E.card,Nat.lt_succ_of_le (by simpa using Finset.card_le_univ E)⟩ σ hσ hq hd + (fun i=>W.firstSupport i (z.1 i)) (fun i=>W.secondSupport i (z.2 i)) + (fun i=>W.first_nonempty i _) (fun i=>W.second_nonempty i _) c δ τ P hδ + +def survivingExperiment : Law ((Slots w n→FlagPair K V)× + (WindowLevelsData (K:=K) (V:=V) E.card×VariableTreeTape f r w)) := + adaptiveLaw p (fun _=>adaptiveLaw (survivingLevelLaw p u sel E hE W) (fun _=>variableTreeLaw f r w)) + +def survivingTargetFailure (v : Fin w) (t : Fin (2*n)) : ℝ := + mean (survivingExperiment f r p u sel E hE W) (fun z=> + if z.1 (middleSlot v t)∉variableTreeDomain f r z.2.2 (Finset.univ,Finset.univ) + (survivingEncoded f r p u sel E hE W σ hσ hq hd c δ τ P hδ z.2.2 z.2.1) + (survivorRank E v) then 1 else 0) + +omit [Nonempty (Fin n)] in +lemma survivingTargetFailure_eq + (hinc : ∀x,0

(W.early i).firstLaw) (fun i=>(W.late i).secondLaw) + W.firstSupport W.secondSupport W.first_nonempty W.second_nonempty p + (fun x=>(x (middleSlot v t)).1) (fun x=>(x (middleSlot v t)).2) + c δ τ P hδ (finiteBalanced E.card) + ((finiteRankEquiv E.card).symm ⟨(survivorRank E v).val,survivorRank_mem_lt E v hv⟩) := by + unfold survivingTargetFailure survivingExperiment survivingEncoded survivingLevelLaw + convert original_window_target_failure f r E hE σ hσ hq hd + (fun i=>(W.early i).firstLaw) (fun i=>(W.late i).secondLaw) + W.firstSupport W.secondSupport W.first_nonempty W.second_nonempty p hinc c δ τ P hδ v hv t using 1 +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/TwoScan.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/TwoScan.lean new file mode 100644 index 0000000000000000000000000000000000000000..a671f852d28141b764f761272c85840b0d2f4377 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/TwoScan.lean @@ -0,0 +1,225 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.BaseSmallLaw +import OAI.Combinatorics.RamseyFive.Marking.ScanRecordPresent +import OAI.Combinatorics.RamseyFive.Entropy.SubsetDeficit + +namespace OAI + +noncomputable section + +namespace SharpRamseyFive.Marking + +section +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization BigOperators +local instance twoScanDecEq (N : ℕ) : DecidableEq (Fin N) := Classical.decEq _ +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] {N : ℕ} + +def swapFlag : FlagPair K V ≃ FlagPair K (Dual K V) := + (Equiv.prodComm _ _).trans (Equiv.prodCongr (Equiv.refl _) bidualPoint) + +@[simp] lemma swapFlag_apply (f : FlagPair K V) : swapFlag f=(f.2,bidualPoint f.1) := rfl + +def reverseTuple (f : Fin N → FlagPair K V) (i : Fin N) := swapFlag (f i.rev) + +lemma reverseTuple_consistent {f : Fin N → FlagPair K V} (hf : TupleConsistent f) : + TupleConsistent (reverseTuple f) := by + intro i j hij hh + simp only [reverseTuple,swapFlag_apply,incident_bidual] at hh ⊢ + exact hf j.rev i.rev (by simpa using hij) hh + +lemma reverseTuple_incident {f : Fin N → FlagPair K V} (hf : TupleIncident f) : + TupleIncident (reverseTuple f) := by + intro i + simpa only [reverseTuple,swapFlag_apply,incident_bidual] using hf i.rev + +variable [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] + +def reverseExpensive (f : Fin N → FlagPair K V) (q : ℝ) : Finset (Fin N) := + (expensiveSet (reverseTuple f) q).image Fin.rev + +omit [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] [Nonempty (ℙ K V)] in +@[simp] lemma mem_reverseExpensive (f : Fin N → FlagPair K V) (q : ℝ) (i : Fin N) : + i∈reverseExpensive f q ↔ i.rev∈expensiveSet (reverseTuple f) q := by + simp only [reverseExpensive,Finset.mem_image] + constructor + · rintro ⟨j,hj,rfl⟩ + simpa using hj + · intro hi + exact ⟨i.rev,hi,Fin.rev_rev i⟩ + +omit [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] [Nonempty (ℙ K V)] in +lemma reverseExpensive_card (f : Fin N → FlagPair K V) (q : ℝ) : + (reverseExpensive f q).card=(expensiveSet (reverseTuple f) q).card := by + exact Finset.card_image_of_injective _ (fun _ _ h=>by simpa using congrArg Fin.rev h) + +theorem unionExpensive_bound (hdim : finrank K V=5) (f : Fin N → FlagPair K V) + (hf : TupleConsistent f) (q : ℝ) (hq : 0 simp only [Finset.subset_union_left,Finset.subset_union_right, + Finset.Subset.refl] + +def finiteTypedDomain (record : Fin N → Option (FlagPair K V)) + (r : Fin N → Fin 5) (popular : Fin N → Bool) (i : Fin N) := + typedDomain (decodeState (finiteDecodeRecord record) i.val) (r i) (popular i) + +def finitePopular (f : Fin N → FlagPair K V) (q : ℝ) (i : Fin N) : Bool := + let W:=decodeState (finiteDecodeRecord (finiteRecord f q)) i.val + let r:=finiteRank f q i + decide (f i∈popularDomain W r.val (chooseLevel W r.val)) + +variable [Finite K] +omit [Finite K] in +lemma finite_typed_decoding (hdim : finrank K V=5) (f : Fin N → FlagPair K V) + (hflag : TupleIncident f) (hf : TupleConsistent f) (i : Fin N) + (hi : i∉expensiveSet f (Nat.card K)) : + f i∈finiteTypedDomain (finiteRecord f (Nat.card K)) (finiteRank f (Nat.card K)) + (finitePopular f (Nat.card K)) i := by + have hh := finite_scan_decoding hdim f hflag hf i hi + unfold finiteDomain cheapDomain at hh + unfold finiteTypedDomain typedDomain finitePopular + split_ifs at hh ⊢ with hz hp + · exact (of_decide_eq_true hp) + · exact (Finset.mem_union.mp hh).resolve_left (by simpa using hp) + · exact hh + +omit [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] in +lemma finiteTypedDomain_card (hdim : finrank K V=5) + (record : Fin N → Option (FlagPair K V)) (r : Fin N → Fin 5) + (popular : Fin N → Bool) (i : Fin N) : + ((finiteTypedDomain record r popular i).card:ℝ)≤153*(Nat.card K:ℝ)^4 := by + have h : ((finiteTypedDomain record r popular i).card:ℝ)≤ + ((finiteDomain record r i).card:ℝ) := by + exact_mod_cast Finset.card_le_card (typedDomain_subset _ _ _) + exact h.trans (finiteDomain_card hdim record r i) + +end + +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization BigOperators +local instance concreteMarkingDecEq (N : ℕ) : DecidableEq (Fin N) := Classical.decEq _ +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] {N : ℕ} + +def twoScanTypes (f : Fin N → FlagPair K V) (i : Fin N) : RankTypes := + ((finiteRank f (Nat.card K) i,finiteRank (reverseTuple f) (Nat.card K) i.rev), + finitePopular f (Nat.card K) i,finitePopular (reverseTuple f) (Nat.card K) i.rev) + +def markingMessage (f : Fin N → FlagPair K V) : UnionTranscript (Fin N) (FlagPair K V) := + unionMessage twoScanTypes (fun f=>expensiveSet f (Nat.card K)) + (fun f=>reverseExpensive f (Nat.card K)) f + +def forwardRecord (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) := + if (m.1 i).2.1 then m.2 i else none + +def backwardRecord (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) := + (if (m.1 i.rev).2.2 then m.2 i.rev else none).map swapFlag + +lemma forwardRecord_marking (f : Fin N → FlagPair K V) : + forwardRecord (markingMessage f)=finiteRecord f (Nat.card K) := by + funext i + simp only [forwardRecord,markingMessage,unionMessage,unionMask,decide_eq_true_eq] + rw [unionRecord_decode_left id (fun f=>expensiveSet f (Nat.card K)) + (fun f=>reverseExpensive f (Nat.card K)) f i,finiteRecord_value] + rfl + +lemma backwardRecord_marking (f : Fin N → FlagPair K V) : + backwardRecord (markingMessage f)=finiteRecord (reverseTuple f) (Nat.card K) := by + funext i + simp only [backwardRecord,markingMessage,unionMessage,unionMask,decide_eq_true_eq] + rw [unionRecord_decode_right id (fun f=>expensiveSet f (Nat.card K)) + (fun f=>reverseExpensive f (Nat.card K)) f i.rev,finiteRecord_value] + simp only [mem_reverseExpensive,Fin.rev_rev] + split_ifs <;> rfl + +def forwardDomain (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) := + finiteTypedDomain (forwardRecord m) (fun j=>(m.1 j).1.1.1) (fun j=>(m.1 j).1.2.1) i + +def backwardDomain (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) := + finiteTypedDomain (backwardRecord m) (fun j=>(m.1 j.rev).1.1.2) + (fun j=>(m.1 j.rev).1.2.2) i.rev + +def markingDomain (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) := + forwardDomain m i ∩ (backwardDomain m i).map swapFlag.symm.toEmbedding + +variable [Finite K] +omit [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] in +lemma markingDomain_card (hdim : finrank K V=5) + (m : UnionTranscript (Fin N) (FlagPair K V)) (i : Fin N) : + ((markingDomain m i).card:ℝ)≤153*(Nat.card K:ℝ)^4 := by + have h : ((markingDomain m i).card:ℝ)≤((forwardDomain m i).card:ℝ) := by + exact_mod_cast Finset.card_le_card (Finset.inter_subset_left) + exact h.trans (finiteTypedDomain_card hdim _ _ _ _) + +omit [Finite K] in +theorem marking_decodes (hdim : finrank K V=5) (f : Fin N → FlagPair K V) + (hflag : TupleIncident f) (hf : TupleConsistent f) (i : Fin N) + (hi : i∈unspecified (markingMessage f)) : f i∈markingDomain (markingMessage f) i := by + have hi' : i∉expensiveSet f (Nat.card K) ∪ reverseExpensive f (Nat.card K) := by + simpa only [markingMessage,unspecified_unionMessage,Finset.mem_compl] using hi + have h₁ : i∉expensiveSet f (Nat.card K) := fun h=>hi' (Finset.mem_union_left _ h) + have h₂ : i.rev∉expensiveSet (reverseTuple f) (Nat.card K) := + fun h=>hi' (Finset.mem_union_right _ ((mem_reverseExpensive f _ i).mpr h)) + apply Finset.mem_inter.mpr + constructor + · unfold forwardDomain + rw [forwardRecord_marking] + simpa only [markingMessage,unionMessage,unionMask,twoScanTypes] using + finite_typed_decoding hdim f hflag hf i h₁ + · apply Finset.mem_map.mpr + refine ⟨swapFlag (f i),?_,swapFlag.symm_apply_apply _⟩ + unfold backwardDomain + rw [backwardRecord_marking] + simpa only [markingMessage,unionMessage, + unionMask,twoScanTypes,Fin.rev_rev,reverseTuple] using + finite_typed_decoding (K:=K) (V:=Dual K V) (by simpa using hdim) (reverseTuple f) + (reverseTuple_incident hflag) (reverseTuple_consistent hf) i.rev h₂ + +end SharpRamseyFive.Marking + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/TwoScanContext.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/TwoScanContext.lean new file mode 100644 index 0000000000000000000000000000000000000000..eeed6f2e3eaff86c821170b23065e7201e479595 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/TwoScanContext.lean @@ -0,0 +1,194 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.MarkingClasses +import OAI.Combinatorics.RamseyFive.Entropy.ClassExtraction + +namespace OAI + +noncomputable section + +namespace SharpRamseyFive.Marking + +section +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization BigOperators +local instance scanContextDecEq (N : ℕ) : DecidableEq (Fin N) := Classical.decEq _ +variable {K V κ : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] [Fintype κ] {N : ℕ} + +omit [Finite K] in +theorem marking_posterior_domains (hdim : finrank K V=5) + (p : Law (κ×(Fin N→FlagPair K V))) + (hf : ∀ c x,0

x i))≤ + Real.log (153*(Nat.card K:ℝ)^4) := by + apply entropy_support_cap + have hs : support (map (fiber (withMessage p markingMessage) (c,m)) (fun x=>x i)) ⊆ + markingDomain m i := by + intro z hz + have hzpos : 0 < map (fiber (withMessage p markingMessage) (c,m)) (fun x=>x i) z := + (mem_support _ _).mp hz + obtain ⟨x,hx,rfl⟩:=map_positive (fiber (withMessage p markingMessage) (c,m)) (fun x=>x i) z hzpos + exact marking_posterior_domains hdim p hf hc c m hm x hx i hi + exact (Nat.cast_le.mpr (Finset.card_le_card hs)).trans (markingDomain_card hdim m i) + +lemma marking_deficit_nonneg (hdim : finrank K V=5) + (p : Law (κ×(Fin N→FlagPair K V))) + (hf : ∀ c x,0

expensiveSet x (Nat.card K)) (fun x=>reverseExpensive x (Nat.card K)) c m hm + have hh:=hfix.entropy_le_sum + have hb : (∑ i∈unspecified m,entropy (map (fiber (withMessage p markingMessage) (c,m)) (fun x=>x i)))≤ + ((unspecified m).card:ℝ)*Real.log (153*(Nat.card K:ℝ)^4) := by + calc + _ ≤ ∑ i∈unspecified m,Real.log (153*(Nat.card K:ℝ)^4) := + Finset.sum_le_sum fun i hi=>marking_posterior_cap hdim p hf hc c m hm i hi + _ = _ := by simp + exact sub_nonneg.mpr (hh.trans hb) + +theorem marking_expected_deficit (hdim : finrank K V=5) + (p : Law (κ×(Fin N→FlagPair K V))) + (hc : ∀ c x,0

activeDeficit (fiber (withMessage p markingMessage) z) (unspecified z.2) J)≤ + B+L+(N:ℝ)*Real.log 800+ + (800*(Nat.card K:ℝ)*(Real.log (1+Fintype.card (ℙ K (Dual K V)))+ + Real.log (1+Fintype.card (ℙ K V))))*(Real.log cap-J) := by + have hh:=union_deficit_bound p twoScanTypes (fun x=>expensiveSet x (Nat.card K)) + (fun x=>reverseExpensive x (Nat.card K)) S cap J hcap hS hsupp + have hmean : mean (second p) (fun x=>((expensiveSet x (Nat.card K)∪reverseExpensive x (Nat.card K)).card:ℝ))≤ + 800*(Nat.card K:ℝ)*(Real.log (1+Fintype.card (ℙ K (Dual K V)))+ + Real.log (1+Fintype.card (ℙ K V))) := by + apply (mean_mono_pos (second p) (g:=fun _=>_) _).trans_eq (mean_const _ _) + intro x hx + obtain ⟨c,_,hc'⟩:=Finset.sum_pos_iff_of_nonneg (fun c _=>p.nonneg (c,x)) |>.mp hx + exact unionExpensive_bound hdim x (hc c x hc') _ (by + exact_mod_cast Nat.zero_lt_of_lt (Finite.one_lt_card (α:=K))) + have hm:=mul_le_mul_of_nonneg_right hmean hΔ + simp only [Fintype.card_fin] at hh + exact hh.trans (by linarith) +end + +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V κ : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] [Fintype κ] {N l : ℕ} +local instance markedClassFinDE (n : ℕ) : DecidableEq (Fin n) := Classical.decEq _ +local instance markedClassPointDE : DecidableEq (ℙ K V) := Classical.decEq _ +local instance markedClassDualDE : DecidableEq (ℙ K (Dual K V)) := Classical.decEq _ + +def expensiveBound (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] : ℝ := + 800*(Nat.card K:ℝ)*(Real.log (1+Fintype.card (ℙ K (Dual K V)))+ + Real.log (1+Fintype.card (ℙ K V))) + +omit [Finite K] in +lemma positive_marked_context (p : Law (κ×(Fin N→FlagPair K V))) + (c : κ) (m : UnionTranscript (Fin N) (FlagPair K V)) + (hm : 0(withMessage p markingMessage).nonneg ((c,m),x)) |>.mp hm + exact ⟨x,withMessage_support p markingMessage c m x hx⟩ + +lemma marked_cheap_count (hdim : finrank K V=5) (p : Law (κ×(Fin N→FlagPair K V))) + (hcons : ∀ c x,0

expensiveSet x (Nat.card K)) + (fun x=>reverseExpensive x (Nat.card K)) x + have hex:=unionExpensive_bound hdim x (hcons c x hx) (Nat.card K) + (by exact_mod_cast Nat.zero_lt_of_lt (Finite.one_lt_card (α:=K))) + simp only [Fintype.card_fin] at hcard + unfold markingMessage expensiveBound + linarith + +def markedCode (hdim : finrank K V=5) (width : ℝ) (hw : 0≤width) + (c : κ×UnionTranscript (Fin N) (FlagPair K V)) := markingClass hdim width hw c.2 + +theorem marking_fixed_class (hdim : finrank K V=5) (p : Law (κ×(Fin N→FlagPair K V))) + (hcons : ∀ c x,0

unspecified c.2) (markedCode hdim width hw) a) := by + have hn : Nonempty SlotClass:=⟨.inl 0⟩ + obtain ⟨a,ha⟩:=fixed_large_class (first (withMessage p markingMessage)) + (fun c=>unspecified c.2) (markedCode hdim width hw) l (by + intro c hm + rw [slotClass_card] + have hh:=marked_cheap_count hdim p hcons c.1 c.2 hm + exact_mod_cast (show 39*(l:ℝ)≤(unspecified c.2).card by linarith)) + refine ⟨a,?_⟩ + norm_num only [slotClass_card] at ha + exact ha + +def markedClassLaw (hdim : finrank K V=5) (p : Law (κ×(Fin N→FlagPair K V))) + (hl : l≤N) (width : ℝ) (hw : 0≤width) (a : SlotClass) + (hE : 0unspecified c.2) (markedCode hdim width hw) a)) := + selectByContext + (conditionContext (withMessage p markingMessage) + (selectedClassEvent l (fun c=>unspecified c.2) (markedCode hdim width hw) a) hE) + (fun c=>(selectedClassIndices hl (fun c=>unspecified c.2) (markedCode hdim width hw) a c : Fin l→Fin N)) + +lemma markedClassLaw_deficit (hdim : finrank K V=5) (p : Law (κ×(Fin N→FlagPair K V))) + (hinc : ∀ c x,0

unspecified c.2) (markedCode hdim width hw) a)) : + mean (first (markedClassLaw hdim p hl width hw a hE)) + (fun c=>(l:ℝ)*Real.log (153*(Nat.card K:ℝ)^4)- + entropy (fiber (markedClassLaw hdim p hl width hw a hE) c))≤ + mean (first (withMessage p markingMessage)) + (fun c=>activeDeficit (fiber (withMessage p markingMessage) c) (unspecified c.2) + (Real.log (153*(Nat.card K:ℝ)^4)))/ + eventMass (first (withMessage p markingMessage)) + (selectedClassEvent l (fun c=>unspecified c.2) (markedCode hdim width hw) a) := by + apply selectedClass_deficit hl (withMessage p markingMessage) + · intro c hc + exact marking_deficit_nonneg hdim p hinc hcons c.1 c.2 hc + · intro c hc + exact unionMessage_fixedOutside p twoScanTypes (fun x=>expensiveSet x (Nat.card K)) + (fun x=>reverseExpensive x (Nat.card K)) c.1 c.2 hc + · intro c hc i hi + exact marking_posterior_cap hdim p hinc hcons c.1 c.2 hc i hi +end SharpRamseyFive.Marking + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/WindowCaps.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/WindowCaps.lean new file mode 100644 index 0000000000000000000000000000000000000000..36b9ddffc080f250cb8e661d9c1aa94085fb4dbe --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/WindowCaps.lean @@ -0,0 +1,83 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.WindowDeletionCount +import OAI.Combinatorics.RamseyFive.Marking.GoodWindowVariation +import OAI.Combinatorics.RamseyFive.Entropy.GoodIndexThreshold + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module ProjectiveIncidence FiniteEntropy Windows PivotTree +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V I : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype I] {w n : ℕ} [Nonempty (Fin n)] +local instance wfcIDE : DecidableEq (Slots w n) := Classical.decEq _ +local instance wfcBDE : DecidableEq (Fin w×Bool) := Classical.decEq _ + +structure ReciprocalCaps (p : Law (I→FlagPair K V)) (u : I→ℝ) (C : ℝ) : Prop where + incident : ∀x,0

x i)))).card:ℝ)≤32*Real.exp (5*Real.log (Nat.card K)-u i) + second : ∀i,((support (second (map p (fun x=>x i)))).card:ℝ)≤32*Real.exp (u i) + flag : ∀i,((support (map p (fun x=>x i))).card:ℝ)≤C*(Nat.card K:ℝ)^4 + +omit [Finite K] [FiniteDimensional K V] [Nonempty (Fin n)] in +lemma goodWindow_scores {p : Law (Slots w n→FlagPair K V)} {u : Slots w n→ℝ} + {sel : Fin w×Bool→Fin n} {J d ε s : ℝ} (hJ : 4*Real.log (Nat.card K)≤J) + {v : Fin w} (hv : v∈goodWindowSet + (indexBad J d ε p (orderedCollision p (slotEquiv w n) u s) sel) sel) : + indexBad (4*Real.log (Nat.card K)) d ε p (orderedCollision p (slotEquiv w n) u s) sel + (earlySlot sel v)=0 ∧ + indexBad (4*Real.log (Nat.card K)) d ε p (orderedCollision p (slotEquiv w n) u s) sel + (lateSlot sel v)=0 := by + have hg := (mem_goodWindowSet _ _ _).mp hv + exact ⟨indexBad_of_larger_cap hJ _ _ _ _ (hg false),indexBad_of_larger_cap hJ _ _ _ _ (hg true)⟩ + +variable (hdim : finrank K V=5) (p : Law (Slots w n→FlagPair K V)) + (u : Slots w n→ℝ) (sel : Fin w×Bool→Fin n) (J d ε s C : ℝ) + (hcap : ReciprocalCaps p u C) (hs : 0goodWindow_scores hJ (he i)) hmass hsmall + +omit [Nonempty (Fin n)] in +theorem survivingWindows_exist (k : ℝ) + (hE : (survivingWindowSet (indexBad J d ε p (orderedCollision p (slotEquiv w n) u s) sel) + sel (fun v=>u (earlySlot sel v)-u (lateSlot sel v)) k).Nonempty) : + Nonempty (ReciprocalWindows p u sel + (survivingOriginal (survivingWindowSet (indexBad J d ε p (orderedCollision p (slotEquiv w n) u s) sel) + sel (fun v=>u (earlySlot sel v)-u (lateSlot sel v)) k) hE) s) := by + apply goodWindows_exist hdim p u sel J d ε s C hcap hs hJ hmass hsmall + intro i + have hi:=survivingOriginal_mem _ hE i + exact (Finset.mem_filter.mp hi).1 + +omit [Nonempty (Fin n)] in +theorem goodWindows_drop_bound (k lo hi : ℝ) + (hcons : ∀x,0

ki.val) (fun i=>i.property)) + have h:=reciprocal_large_window_count hdim p u sel s d ε k lo hi G W hcons + (fun _ h=>goodWindow_scores hJ h) hu hlohi hc hk hε + apply h.trans + gcongr + exact_mod_cast (show G.card≤w from (Finset.card_le_univ G).trans_eq (Fintype.card_fin w)) +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/WindowCodeDomains.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/WindowCodeDomains.lean new file mode 100644 index 0000000000000000000000000000000000000000..ce28e49f1bd14b8edf63c70c8321bfff62b2c4c7 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/WindowCodeDomains.lean @@ -0,0 +1,51 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.AllWindowBounds + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module ProjectiveIncidence FiniteEntropy Windows ReverseCap ScoreGeometry PivotTree +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +local instance wcdBDE (w : ℕ) : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance wcdIDE (w n : ℕ) : DecidableEq (Slots w n) := Classical.decEq _ +def codeDomainSlack (k s : ℝ) := k+2*s+Real.log 4+1+Real.log (2*(320/((9:ℝ)/100000)+320)^2) +lemma codeDomain_log {q σ k s : ℝ} (hq : 0∀b : Bool,bad (Sum.inl ((v,b),sel (v,b)))=0) +def survivingWindowSet (bad : Slots w r→ℝ) (sel : Fin w×Bool→Fin r) + (drop : Fin w→ℝ) (k : ℝ) : Finset (Fin w) := + (goodWindowSet bad sel).filter (fun v=>drop v≤k) +lemma mem_goodWindowSet (bad : Slots w r→ℝ) (sel : Fin w×Bool→Fin r) (v : Fin w) : + v∈goodWindowSet bad sel ↔ ∀b : Bool,bad (Sum.inl ((v,b),sel (v,b)))=0 := by + simp only [goodWindowSet,Finset.mem_filter,Finset.mem_univ,true_and] +lemma mem_survivingWindowSet (bad : Slots w r→ℝ) (sel : Fin w×Bool→Fin r) + (drop : Fin w→ℝ) (k : ℝ) (v : Fin w) : + v∈survivingWindowSet bad sel drop k ↔ + (∀b : Bool,bad (Sum.inl ((v,b),sel (v,b)))=0) ∧ drop v≤k := by + simp only [survivingWindowSet,Finset.mem_filter,mem_goodWindowSet] + +theorem ineligible_middle_count (bad : Slots w r→ℝ) (sel : Fin w×Bool→Fin r) + (drop : Fin w→ℝ) (k : ℝ) : + ((Finset.univ.filter fun i : Fin w×Fin (2*r)=> + ¬(i.1∈survivingWindowSet bad sel drop k ∧ bad (Sum.inr i)=0)).card:ℝ)≤ + (∑v,∑t,if windowReady bad sel v t then (0:ℝ) else 1)+ + (2*r:ℝ)*((goodWindowSet bad sel).filter fun v=>k by_cases ht : bad (Sum.inr (v,t))=0 <;> + simp [mem_survivingWindowSet,mem_goodWindowSet,windowReady,hg,hd,ht, + true_and,and_true,and_false,not_true_eq_false, + not_false_eq_true] <;> split_ifs <;> (first | (solve | norm_num) | linarith) + · simp only [mem_survivingWindowSet,mem_goodWindowSet,windowReady,hg, + false_and,and_false,not_false_eq_true,ite_true,ite_false,add_zero,le_refl] + calc + _ ≤ ∑v,∑t,((if windowReady bad sel v t then (0:ℝ) else 1)+ + (if v∈goodWindowSet bad sel ∧ kFinset.sum_le_sum (fun t _=>hp v t)) + _ = _ := by + simp only [Finset.sum_add_distrib,Finset.sum_const,Finset.card_univ, + Fintype.card_fin,nsmul_eq_mul,Nat.cast_mul,Nat.cast_ofNat,←Finset.mul_sum] + congr 1 + congr 1 + rw [Finset.sum_boole] + congr 2 + ext v + simp + +theorem reciprocal_loss_aggregate {Ω : Type*} [Fintype Ω] (p : Law Ω) + (bad : Slots w r→ℝ) (sel : Fin w×Bool→Fin r) (drop : Fin w→ℝ) (k B : ℝ) + (kept : Ω→Fin w×Fin (2*r)→Prop) (hB : 0≤B) + (hkeep : ∀v∈survivingWindowSet bad sel drop k,∀t,bad (Sum.inr (v,t))=0→ + mean p (fun z=>if kept z (v,t) then 0 else 1)≤B) : + mean p (fun z=>((Finset.univ.filter (fun i : Fin w×Fin (2*r)=> + i.1∈survivingWindowSet bad sel drop k ∧ bad (Sum.inr i)=0 ∧ kept z i))ᶜ.card:ℝ))≤ + (∑v,∑t,if windowReady bad sel v t then (0:ℝ) else 1)+ + (2*r:ℝ)*((goodWindowSet bad sel).filter fun v=>ki.1∈survivingWindowSet bad sel drop k ∧ bad (Sum.inr i)=0 + have hh:=retained_filter_loss p eligible kept B hB (fun i hi=>hkeep i.1 hi.1 i.2 hi.2) + have hi:=ineligible_middle_count bad sel drop k + have he : (Fintype.card (Fin w×Fin (2*r)):ℝ)=(w*(2*r):ℝ) := by simp + rw [he] at hh + simp only [eligible,and_assoc] at hh + exact hh.trans (add_le_add hi le_rfl) +end +end SharpRamseyFive.Windows + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.FiniteEntropy SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.Windows +open ReverseCap ScoreGeometry BinaryTree TreeCodec PivotTree +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +local instance allWindowProp (P : Prop) : Decidable P := Classical.propDecidable P +local instance allWindowTDE (w n : ℕ) : DecidableEq (Fin w×Fin (2*n)) := Classical.decEq _ +local instance allWindowBDE (w : ℕ) : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance allWindowIDE (w n : ℕ) : DecidableEq (Slots w n) := Classical.decEq _ +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V))) ] +variable (f : PivotContext K V→FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V→FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + {w n : ℕ} [Nonempty (Fin n)] (p : Law (Slots w n→FlagPair K V)) + (u : Slots w n→ℝ) (sel : Fin w×Bool→Fin n) (E : Finset (Fin w)) + {s : ℝ} (W : ∀hE : E.Nonempty,ReciprocalWindows p u sel (survivingOriginal E hE) s) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V≤5) + (c δ τ P : ℝ) (hδ : 0<δ) + +def allWindowLevelLaw : Law (WindowLevelsData (K:=K) (V:=V) E.card) := + if hE : E.Nonempty then survivingLevelLaw p u sel E hE (W hE) else uniformType _ + +def allWindowEncoded (t : VariableTreeTape f r w) (z : WindowLevelsData (K:=K) (V:=V) E.card) : + VariableTreeMessage f r t (Finset.univ,Finset.univ) := + if hE : E.Nonempty then + survivingEncoded f r p u sel E hE (W hE) σ hσ hq hd c δ τ P hδ t z + else variableTreeEmpty f r t (Finset.univ,Finset.univ) + +def allWindowExperiment : Law ((Slots w n→FlagPair K V)× + (WindowLevelsData (K:=K) (V:=V) E.card×VariableTreeTape f r w)) := + adaptiveLaw p (fun _=>adaptiveLaw (allWindowLevelLaw p u sel E W) (fun _=>variableTreeLaw f r w)) + +def allWindowFailure (v : Fin w) (t : Fin (2*n)) : ℝ := + mean (allWindowExperiment f r p u sel E W) (fun z=> + if z.1 (middleSlot v t)∉variableTreeDomain f r z.2.2 (Finset.univ,Finset.univ) + (allWindowEncoded f r p u sel E W σ hσ hq hd c δ τ P hδ z.2.2 z.2.1) + (survivorRank E v) then 1 else 0) + +omit [Nonempty (Fin n)] in +lemma allWindowFailure_nonempty (hE : E.Nonempty) (v : Fin w) (t : Fin (2*n)) : + allWindowFailure f r p u sel E W σ hσ hq hd c δ τ P hδ v t= + survivingTargetFailure f r p u sel E hE (W hE) σ hσ hq hd c δ τ P hδ v t := by + simp only [allWindowFailure,allWindowExperiment,allWindowLevelLaw,allWindowEncoded, + dite_eq_left hE,survivingTargetFailure,survivingExperiment] + +def allWindowPositions (bad : Slots w n→ℝ) (t : VariableTreeTape f r w) + (z : (Slots w n→FlagPair K V)×WindowLevelsData (K:=K) (V:=V) E.card) : + Finset (Fin w×Fin (2*n)) := + Finset.univ.filter fun i=>i.1∈E ∧ bad (Sum.inr i)=0 ∧ + z.1 (Sum.inr i)∈variableTreeDomain f r t (Finset.univ,Finset.univ) + (allWindowEncoded f r p u sel E W σ hσ hq hd c δ τ P hδ t z.2) (survivorRank E i.1) + +omit [Nonempty (Fin n)] in +theorem allWindow_loss (bad : Slots w n→ℝ) (drop : Fin w→ℝ) (k B : ℝ) + (hE : E=survivingWindowSet bad sel drop k) (hB : 0≤B) + (hh : ∀v∈E,∀t,bad (middleSlot v t)=0→ + allWindowFailure f r p u sel E W σ hσ hq hd c δ τ P hδ v t≤B) : + mean (allWindowExperiment f r p u sel E W) (fun z=> + ((allWindowPositions f r p u sel E W σ hσ hq hd c δ τ P hδ bad z.2.2 (z.1,z.2.1))ᶜ.card:ℝ))≤ + (∑v,∑t,if windowReady bad sel v t then (0:ℝ) else 1)+ + (2*n:ℝ)*((goodWindowSet bad sel).filter fun v=>k + z.1 (Sum.inr i)∈variableTreeDomain f r z.2.2 (Finset.univ,Finset.univ) + (allWindowEncoded f r p u sel E W σ hσ hq hd c δ τ P hδ z.2.2 z.2.1) (survivorRank E i.1) + have hk (v : Fin w) (hv : v∈survivingWindowSet bad sel drop k) (t : Fin (2*n)) + (ht : bad (Sum.inr (v,t))=0) : + mean (allWindowExperiment f r p u sel E W) (fun z=>if kept z (v,t) then 0 else 1)≤B := by + have hv' : v∈E := by rwa [hE] + have hb:=hh v hv' t ht + unfold allWindowFailure at hb + convert hb using 1 + congr 1 + funext z + dsimp only [kept,middleSlot] + split_ifs <;> simp_all + have h:=reciprocal_loss_aggregate (allWindowExperiment f r p u sel E W) bad sel drop k B kept hB (by + intro v hv t ht + convert hk v hv t ht using 1 + congr 1 + funext z + by_cases hb : kept z (v,t) <;> simp only [hb,ite_true,ite_false]) + simpa only [allWindowPositions,hE,kept] using h +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/WindowLevels.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/WindowLevels.lean new file mode 100644 index 0000000000000000000000000000000000000000..4e1232b937a5e7a05a8120d8be6f018aa40e963d --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/WindowLevels.lean @@ -0,0 +1,146 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.Repair +import OAI.Combinatorics.RamseyFive.Marking.WindowReciprocalScores +import OAI.Combinatorics.RamseyFive.Entropy.WindowVariation + +namespace OAI + +namespace SharpRamseyFive.Marking +open Module SharpRamseyFive.FiniteEntropy SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.Windows +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V I : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + {w r : ℕ} [Nonempty (Fin r)] +local instance windowLevelsBlockDE : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance windowLevelsIndexDE : DecidableEq (Slots w r) := Classical.decEq _ + +structure ReciprocalWindows (p : Law (Slots w r→FlagPair K V)) (u : Slots w r→ℝ) + (sel : (Fin w×Bool)→Fin r) (e : I→Fin w) (s : ℝ) where + early : ∀ i,ReciprocalLevels (map p (fun x=>x (earlySlot sel (e i)))) (u (earlySlot sel (e i))) s + late : ∀ i,ReciprocalLevels (map p (fun x=>x (lateSlot sel (e i)))) (u (lateSlot sel (e i))) s + early_half : ∀ i,(1:ℝ)/2 ≤ eventMass (first (map p (fun x=>x (earlySlot sel (e i))))) + (reciprocalGoodA (map p (fun x=>x (earlySlot sel (e i)))) (u (earlySlot sel (e i))) s) + late_half : ∀ i,(1:ℝ)/2 ≤ eventMass (second (map p (fun x=>x (lateSlot sel (e i))))) + (reciprocalGoodB (map p (fun x=>x (lateSlot sel (e i)))) (u (lateSlot sel (e i))) s) + +namespace ReciprocalWindows +variable {p : Law (Slots w r→FlagPair K V)} {u : Slots w r→ℝ} + {sel : (Fin w×Bool)→Fin r} {e : I→Fin w} {s : ℝ} + (W : ReciprocalWindows p u sel e s) + +def firstReference (i : I) : Law (ℙ K V) := + conditionOn (first (map p (fun x=>x (earlySlot sel (e i))))) + (reciprocalGoodA (map p (fun x=>x (earlySlot sel (e i)))) (u (earlySlot sel (e i))) s) + (lt_of_lt_of_le (by norm_num) (W.early_half i)) +def secondReference (i : I) : Law (ℙ K (Dual K V)) := + conditionOn (second (map p (fun x=>x (lateSlot sel (e i))))) + (reciprocalGoodB (map p (fun x=>x (lateSlot sel (e i)))) (u (lateSlot sel (e i))) s) + (lt_of_lt_of_le (by norm_num) (W.late_half i)) +def firstSupport (i : I) (A : Finset (ℙ K V)) : Finset (ℙ K V) := + (W.early i).firstLaw.repair A +def secondSupport (i : I) (B : Finset (ℙ K (Dual K V))) : Finset (ℙ K (Dual K V)) := + (W.late i).secondLaw.repair B + +omit [Finite K] [FiniteDimensional K V] [Nonempty (Fin r)] in +lemma first_nonempty (i : I) (A : Finset (ℙ K V)) : (W.firstSupport i A).Nonempty := + ((W.early i).first_good _ ((W.early i).firstLaw.repair_positive A)).1 +omit [Finite K] [FiniteDimensional K V] [Nonempty (Fin r)] in +lemma second_nonempty (i : I) (B : Finset (ℙ K (Dual K V))) : (W.secondSupport i B).Nonempty := + ((W.late i).second_good _ ((W.late i).secondLaw.repair_positive B)).1 +omit [Finite K] [FiniteDimensional K V] [Nonempty (Fin r)] in +lemma first_domination (i : I) (a : ℙ K V) : + (∑ A,(W.early i).firstLaw A*uniformWeight (W.firstSupport i A) a) ≤ + (4*Real.exp 1)*W.firstReference i a := by + exact repaired_levels_conditioned_domination _ _ _ _ _ (by positivity) + (fun A h=>((W.early i).first_good A h).2.1) (W.early i).first_dom a +omit [Finite K] [FiniteDimensional K V] [Nonempty (Fin r)] in +lemma second_domination (i : I) (b : ℙ K (Dual K V)) : + (∑ B,(W.late i).secondLaw B*uniformWeight (W.secondSupport i B) b) ≤ + (4*Real.exp 1)*W.secondReference i b := by + exact repaired_levels_conditioned_domination _ _ _ _ _ (by positivity) + (fun B h=>((W.late i).second_good B h).2.1) (W.late i).second_dom b + +omit [FiniteDimensional K V] [Nonempty (Fin r)] in +lemma support_product (k : ℝ) (hdrop : ∀ i,u (earlySlot sel (e i))-u (lateSlot sel (e i)) ≤ k) + (i : I) (A : Finset (ℙ K V)) (B : Finset (ℙ K (Dual K V))) : + (Nat.card K:ℝ)^5*Real.exp (-(k+2*s+Real.log 4)) ≤ + ((W.firstSupport i A).card:ℝ)*(W.secondSupport i B).card := by + have hq : 0<(Nat.card K:ℝ) := by exact_mod_cast Nat.zero_lt_of_lt (Finite.one_lt_card (α:=K)) + have hh:=pivot_support_product (Nat.card K) (u (earlySlot sel (e i))) (u (lateSlot sel (e i))) + s k (W.firstSupport i A).card (W.secondSupport i B).card hq (hdrop i) + ((W.early i).first_size _ ((W.early i).firstLaw.repair_positive A)) + ((W.late i).second_size _ ((W.late i).secondLaw.repair_positive B)) + have he : Real.exp (-(k+2*s+Real.log 4))=Real.exp (-k-2*s)/4 := by + rw [show -(k+2*s+Real.log 4)=(-k-2*s)-Real.log 4 by ring, + Real.exp_sub,Real.exp_log (by norm_num : (0:ℝ)<4)] + simpa only [he,mul_div_assoc] using hh + +omit [Finite K] [Nonempty (Fin r)] in +lemma reference_sparse [Preorder I] (hdim : finrank K V=5) (he : Monotone e) + (d ε : ℝ) + (hcons : ∀ x,0

if a∈reciprocalGoodA (map p (fun x=>x (middleSlot (e i) t))) (u (middleSlot (e i) t)) s + then first (map p (fun x=>x (middleSlot (e i) t))) a else 0) + (W.secondReference j) ≤ 160008*ε := + window_target_right_sparse hdim p u sel _ d s ε hcons (e i) (e j) (he hij) t hgood (W.late_half j) + +omit [Finite K] [Nonempty (Fin r)] in +lemma target_left_sparse [Preorder I] (hdim : finrank K V=5) (he : Monotone e) + (d ε : ℝ) + (hcons : ∀ x,0

if b∈reciprocalGoodB (map p (fun x=>x (middleSlot (e j) t))) (u (middleSlot (e j) t)) s + then second (map p (fun x=>x (middleSlot (e j) t))) b else 0) ≤ 160008*ε := + window_target_left_sparse hdim p u sel _ d s ε hcons (e i) (e j) (he hij) t hgood (W.early_half i) +end ReciprocalWindows + +omit [Nonempty (Fin r)] in +theorem reciprocal_windows_exist (hdim : finrank K V=5) + (p : Law (Slots w r→FlagPair K V)) (u : Slots w r→ℝ) + (sel : (Fin w×Bool)→Fin r) (e : I→Fin w) (s d ε C₀ : ℝ) (hs : 0x i)))).card:ℝ) ≤ 32*Real.exp (5*Real.log (Nat.card K)-u i)) + (hB : ∀ i,((support (second (map p (fun x=>x i)))).card:ℝ) ≤ 32*Real.exp (u i)) + (hflag : ∀ i,((support (map p (fun x=>x i))).card:ℝ) ≤ C₀*(Nat.card K:ℝ)^4) + (hgood : ∀ i,indexBad (4*Real.log (Nat.card K)) d ε p (orderedCollision p (slotEquiv w r) u s) sel (earlySlot sel (e i))=0 ∧ + indexBad (4*Real.log (Nat.card K)) d ε p (orderedCollision p (slotEquiv w r) u s) sel (lateSlot sel (e i))=0) + (hmass : reciprocalBadMass s d C₀ ≤ (1:ℝ)/2) + (hsmall : 2*(d+Real.log 32+Real.log 33+2*(Real.log (5*Real.log (Nat.card K)+1)+1))/s+ + 2*Real.exp 1*reciprocalBadMass s d C₀ ≤ (1:ℝ)/2) : + Nonempty (ReciprocalWindows p u sel e s) := by + have hend (i : Slots w r) (h : indexBad (4*Real.log (Nat.card K)) d ε p (orderedCollision p (slotEquiv w r) u s) sel i=0) : + 4*Real.log (Nat.card K)-entropy (map p (fun x=>x i)) ≤ d := + (good_index_scores _ d ε p _ (fun _ _=>orderedCollision_nonneg ..) sel i h).1 + have hi (i : Slots w r) : ∀ z,0 < map p (fun x=>x i) z → Incident z.1 z.2 := by + intro z hz + obtain ⟨x,hx,rfl⟩:=map_positive p (fun x=>x i) z hz + exact hinc x hx i + let L (i : I) := Classical.choice (reciprocal_levels_exist hdim _ _ s d C₀ (hi _) hs + (hA _) (hB _) (hflag _) (hend _ (hgood i).1) hsmall) + let R (i : I) := Classical.choice (reciprocal_levels_exist hdim _ _ s d C₀ (hi _) hs + (hA _) (hB _) (hflag _) (hend _ (hgood i).2) hsmall) + refine ⟨⟨L,R,?_,?_⟩⟩ + · intro i + exact (reciprocal_good_mass _ _ s d C₀ hs (hA _) (hB _) (hflag _) (hend _ (hgood i).1) hmass).1 + · intro i + exact (reciprocal_good_mass _ _ s d C₀ hs (hA _) (hB _) (hflag _) (hend _ (hgood i).2) hmass).2 +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/WindowReciprocalScores.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/WindowReciprocalScores.lean new file mode 100644 index 0000000000000000000000000000000000000000..d5589efe95a87f28350619ba84a7c418bb8cfdaf --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/WindowReciprocalScores.lean @@ -0,0 +1,116 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.GoodPairScores +import OAI.Combinatorics.RamseyFive.Marking.ReciprocalGoodReference + +namespace OAI + +namespace SharpRamseyFive.Windows +open scoped Classical +noncomputable section +variable {w r : ℕ} +def earlySlot (sel : (Fin w×Bool)→Fin r) (v : Fin w) : Slots w r := + Sum.inl ((v,false),sel (v,false)) +def lateSlot (sel : (Fin w×Bool)→Fin r) (v : Fin w) : Slots w r := + Sum.inl ((v,true),sel (v,true)) +def middleSlot (v : Fin w) (t : Fin (2*r)) : Slots w r := Sum.inr (v,t) +lemma early_middle_le (sel : (Fin w×Bool)→Fin r) (i j : Fin w) (hij : i≤j) (t : Fin (2*r)) : + slotEmbedding (earlySlot sel i)x (earlySlot sel i)))) + (reciprocalGoodA (map p (fun x=>x (earlySlot sel i))) (u (earlySlot sel i)) s)) + (hj : (1:ℝ)/2≤eventMass (second (map p (fun x=>x (lateSlot sel j)))) + (reciprocalGoodB (map p (fun x=>x (lateSlot sel j))) (u (lateSlot sel j)) s)) : + relationMass Incident + (conditionOn (first (map p (fun x=>x (earlySlot sel i)))) + (reciprocalGoodA (map p (fun x=>x (earlySlot sel i))) (u (earlySlot sel i)) s) (by linarith)) + (conditionOn (second (map p (fun x=>x (lateSlot sel j)))) + (reciprocalGoodB (map p (fun x=>x (lateSlot sel j))) (u (lateSlot sel j)) s) (by linarith))≤320016*ε := by + apply ordered_good_reference_sparse hdim p (slotEquiv w r) u s ε hcons _ _ + (early_late_le sel i j hij) hi hj + exact (good_index_scores J d ε p _ (fun _ _=>orderedCollision_nonneg ..) sel _ hgood).2 (j,true) + (by simp [OtherBlock,earlySlot]) + +omit [Finite K] [Nonempty (Fin r)] in +theorem window_target_right_sparse (hdim : finrank K V=5) + (p : Law (Slots w r→FlagPair K V)) (u : Slots w r→ℝ) (sel : (Fin w×Bool)→Fin r) + (J d s ε : ℝ) + (hcons : ∀ x,0

x (lateSlot sel j)))) + (reciprocalGoodB (map p (fun x=>x (lateSlot sel j))) (u (lateSlot sel j)) s)) : + relationMass Incident + (fun a=>if a∈reciprocalGoodA (map p (fun x=>x (middleSlot i t))) (u (middleSlot i t)) s + then first (map p (fun x=>x (middleSlot i t))) a else 0) + (conditionOn (second (map p (fun x=>x (lateSlot sel j)))) + (reciprocalGoodB (map p (fun x=>x (lateSlot sel j))) (u (lateSlot sel j)) s) (by linarith))≤160008*ε := by + rw [relationMass_restricted_conditionOn_right] + have hh:=(ordered_reciprocal_low_conflict hdim p (slotEquiv w r) u s hcons + (middleSlot i t) (lateSlot sel j) (middle_late_le sel i j hij t)).trans + (mul_le_mul_of_nonneg_left + ((good_index_scores J d ε p _ (fun _ _=>orderedCollision_nonneg ..) sel _ hgood).2 (j,true) trivial) + (by norm_num : (0:ℝ)≤80004)) + have h:=div_half_bound _ _ _ hj (relationMass_nonneg _ _ _ (Law.nonneg _) (Law.nonneg _)) hh + change _≤2*(80004*ε) at h + simpa only [reciprocalGoodA,reciprocalGoodB,←mul_assoc,show (2:ℝ)*80004=160008 by norm_num] using h + +omit [Finite K] [Nonempty (Fin r)] in +theorem window_target_left_sparse (hdim : finrank K V=5) + (p : Law (Slots w r→FlagPair K V)) (u : Slots w r→ℝ) (sel : (Fin w×Bool)→Fin r) + (J d s ε : ℝ) + (hcons : ∀ x,0

x (earlySlot sel i)))) + (reciprocalGoodA (map p (fun x=>x (earlySlot sel i))) (u (earlySlot sel i)) s)) : + relationMass Incident + (conditionOn (first (map p (fun x=>x (earlySlot sel i)))) + (reciprocalGoodA (map p (fun x=>x (earlySlot sel i))) (u (earlySlot sel i)) s) (by linarith)) + (fun b=>if b∈reciprocalGoodB (map p (fun x=>x (middleSlot j t))) (u (middleSlot j t)) s + then second (map p (fun x=>x (middleSlot j t))) b else 0)≤160008*ε := by + rw [relationMass_conditionOn_left_restricted] + have hh:=(ordered_reciprocal_low_conflict hdim p (slotEquiv w r) u s hcons + (earlySlot sel i) (middleSlot j t) (early_middle_le sel i j hij t)).trans + (mul_le_mul_of_nonneg_left + (good_index_scores_reverse J d ε p _ (fun _ _=>orderedCollision_nonneg ..) (fun _ _=>orderedCollision_symm ..) + sel _ hgood (i,false) trivial) (by norm_num : (0:ℝ)≤80004)) + have h:=div_half_bound _ _ _ hi (relationMass_nonneg _ _ _ (Law.nonneg _) (Law.nonneg _)) hh + change _≤2*(80004*ε) at h + simpa only [reciprocalGoodA,reciprocalGoodB,←mul_assoc,show (2:ℝ)*80004=160008 by norm_num] using h +end +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/WindowSmallFailure.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/WindowSmallFailure.lean new file mode 100644 index 0000000000000000000000000000000000000000..53c23c8a3d44f3a6dbc31a1387ec843df5268961 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/WindowSmallFailure.lean @@ -0,0 +1,181 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.ReciprocalDomainCaps +import OAI.Combinatorics.RamseyFive.Marking.WindowTargetRetention +import OAI.Combinatorics.RamseyFive.Marking.ReciprocalNumerics + +namespace OAI + +namespace SharpRamseyFive.Marking + +section +open Module FiniteEntropy ProjectiveIncidence Windows +open ReverseCap ScoreGeometry BinaryTree TreeCodec PivotTree Filter ParameterHierarchy +open scoped Classical BigOperators LinearAlgebra.Projectivization NNReal Topology +noncomputable section +local instance smallFailureBDE (w : ℕ) : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance smallFailureIDE (w n : ℕ) : DecidableEq (Slots w n) := Classical.decEq _ + +theorem eventually_window_failure_small {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb C₀ ρ : ℝ) (hCb : 0≤Cb) (hC : 0≤C₀) (hρ : 0<ρ) : + ∀ᶠ σ : ℝ in atTop,∀ (D k J : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q₀ : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q₀] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))], + ∀ (hd : finrank K V=5) (hq3 : 3≤Nat.card K) (w n H : ℕ) [Nonempty (Fin n)] + (p : Law (Slots w n→FlagPair K V)) (u : Slots w n→ℝ) + (sel : Fin w×Bool→Fin n) (E : Finset (Fin w)) + (W : ∀hE : E.Nonempty,ReciprocalWindows p u sel (survivingOriginal E hE) (D*σ^(2*beta η))) + (hcons : ∀x,0

x i)))).card:ℝ)≤32*Real.exp (5*Real.log (Nat.card K)-u i)) + (hB : ∀i,((support (second (map p (fun x=>x i)))).card:ℝ)≤32*Real.exp (u i)) + (_hflag : ∀i,((support (map p (fun x=>x i))).card:ℝ)≤C₀*(Nat.card K:ℝ)^4) + (_hJ : 4*Real.log (Nat.card K)≤J) + (_hgood : ∀v∈E,indexBad J (D*σ^beta η) (σ^(-2000*beta η)/Real.exp σ) p + (orderedCollision p (slotEquiv w n) u (D*σ^(2*beta η))) sel (earlySlot sel v)=0) + (_hdrop : ∀v∈E,u (earlySlot sel v)-u (lateSlot sel v)≤k) + (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K), + Nat.card K=q₀→Range η σ D R→(L₀:ℝ)=L η σ D→ + 0≤k+2*(D*σ^(2*beta η))+Real.log 4→ + k+2*(D*σ^(2*beta η))+Real.log 4≤Cb*D*σ^(6*beta η)→ + w<2^H→(H:ℝ)≤σ^beta η→ + let f := fun C : PivotContext K V=>fourFinitePredictor hd σ C.1 C.2 + (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun C : PivotContext K V=>fourFinitePredictor (K:=K) (V:=Dual K V) + (by simpa using hd) σ C.2 (C.1.map bidualPoint.toEmbedding) + (P η σ D R) (σ^(-800*beta η)) R L₀ + ∀ (v : Fin w) (_hv : v∈E) (t : Fin (2*n)), + indexBad J (D*σ^beta η) (σ^(-2000*beta η)/Real.exp σ) p + (orderedCollision p (slotEquiv w n) u (D*σ^(2*beta η))) sel (middleSlot v t)=0→ + allWindowFailure f r p u sel E W σ hσ hq hd.le + (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) v t≤ρ := by + have hb : 0indexBad_of_larger_cap hJ _ _ _ _ (hgood v hv)) hdrop hσ hq hcard hr hL + (by positivity) (by positivity) hb0 hbhi v hv t + (indexBad_of_larger_cap hJ _ _ _ _ ht) + have hheight0 : (finiteBalanced E.card).height≤H := + finiteBalanced_height H E.card (lt_of_le_of_lt (by simpa using Finset.card_le_univ E) hw) + have hheight : ((finiteBalanced E.card).height:ℝ)≤σ^beta η := by + have hh' : ((finiteBalanced E.card).height:ℝ)≤H := by exact_mod_cast hheight0 + exact hh'.trans hH + have hn:=hnum D (finiteBalanced E.card).height hD (by positivity) hheight + apply hh.trans + simpa only [publicRetentionError,hq,add_assoc] using hn +end +end + +open Module ProjectiveIncidence FiniteEntropy Windows +open ReverseCap ScoreGeometry BinaryTree TreeCodec PivotTree Filter ParameterHierarchy +open scoped Classical BigOperators LinearAlgebra.Projectivization NNReal Topology +noncomputable section +local instance arlBDE (w : ℕ) : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance arlTDE (w n : ℕ) : DecidableEq (Fin w×Fin (2*n)) := Classical.decEq _ +local instance arlIDE (w n : ℕ) : DecidableEq (Slots w n) := Classical.decEq _ + +attribute [local irreducible] actualWindows actualWindowSet + +theorem eventually_actual_reciprocal_loss {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb C₀ ρ : ℝ) (hCb : 0≤Cb) (hC : 0≤C₀) (hρ : 0<ρ) : + ∀ᶠ σ : ℝ in atTop,∀ (D k J lo hi B : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q₀ : ℕ) (K V κ : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q₀] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] [Fintype κ], + ∀ (hd : finrank K V=5) (hq3 : 3≤Nat.card K) (w n H steps rem : ℕ) [Nonempty (Fin n)] + (μ : Law κ) (p : κ→Law (Slots w n→FlagPair K V)) + (elig : κ→(Fin w×Bool)→Finset (Fin n)) (u : κ→Slots w n→ℝ) + (hcap : ∀a,0<μ a→ReciprocalCaps (p a) (u a) C₀) + (hcons : ∀a,0<μ a→∀x,0

+ ∑j∈blockActive (historyUnused (elig z.1.1) z.1.2), + preRoundBad μ p elig steps J (D*σ^beta η) (σ^(-2000*beta η)/Real.exp σ) + (historyCollision p u (D*σ^(2*beta η))) z j)≤B), + let s:=D*σ^(2*beta η) + let d:=D*σ^beta η + let ε:=σ^(-2000*beta η)/Real.exp σ + let f := fun C : PivotContext K V=>fourFinitePredictor hd σ C.1 C.2 + (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun C : PivotContext K V=>fourFinitePredictor (K:=K) (V:=Dual K V) + (by simpa using hd) σ C.2 (C.1.map bidualPoint.toEmbedding) + (P η σ D R) (σ^(-800*beta η)) R L₀ + let E:=actualWindowSet μ p u J d ε s k + ∃ W : ∀z,∀hE : (E z).Nonempty, + ReciprocalWindows (windowPosterior p z) (u z.1.1) z.2 (survivingOriginal (E z) hE) s, + mean (preRoundLaw μ p elig steps) (fun h=> + mean (allWindowExperiment f r (windowPosterior p h) (u h.1.1) h.2 (E h) (W h)) (fun z=> + ((allWindowPositions f r (windowPosterior p h) (u h.1.1) h.2 (E h) (W h) + σ hσ hq hd.le (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) + (preRoundBad μ p elig steps J d ε (historyCollision p u s) h) + z.2.2 (z.1,z.2.1))ᶜ.card:ℝ)))≤ + 5*B+(2*n:ℝ)*((hi-lo+2*(w:ℝ)*(2*s+Real.log 64))/k)+(w*(2*n):ℝ)*ρ := by + filter_upwards [eventually_window_failure_small hη hη' Cb C₀ ρ hCb hC hρ] with σ hfail + intro D k J lo hi B R L₀ q₀ K V κ _ _ _ _ _ _ _ _ _ _ hd hq3 w n H steps rem _ + μ p elig u hcap hcons hu hlohi hk hJ hσ hq hcard hrange hL hb0 hbhi hw hH hmass hsmall hε hrem hn hS hbad + dsimp only + have hD : 0u z.1.1) + J (D*σ^beta η) (σ^(-2000*beta η)/Real.exp σ) (D*σ^(2*beta η)) k ρ hρ.le + (historyCollision p u (D*σ^(2*beta η))) + (fun z v=>u z.1.1 (earlySlot z.2 v)-u z.1.1 (lateSlot z.2 v)) E W + (actualWindowSet_eq μ p elig u _ _ _ _ _) + σ hσ hq hd.le (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) ?_).trans + · exact add_le_add (add_le_add (mul_le_mul_of_nonneg_left hbad (by norm_num)) + (mul_le_mul_of_nonneg_left hdrop (by positivity))) le_rfl + · intro z hz v hv t ht + have ha:=(preRound_positive μ p elig steps z hz).1 + have hcp:=(hcap z.1.1 ha).history _ _ _ steps z.1.2 + have he : E z=survivingWindowSet + (preRoundBad μ p elig steps J (D*σ^beta η) (σ^(-2000*beta η)/Real.exp σ) + (historyCollision p u (D*σ^(2*beta η))) z) z.2 + (fun v=>u z.1.1 (earlySlot z.2 v)-u z.1.1 (lateSlot z.2 v)) k := + actualWindowSet_eq μ p elig u _ _ _ _ _ z hz + apply hfail D k J R L₀ q₀ K V hd hq3 w n H (windowPosterior p z) (u z.1.1) z.2 + (E z) (W z) (fun x hx=>hcons z.1.1 ha x (history_support (p z.1.1) steps z.1.2 x hx)) + hcp.incident hcp.first hcp.second hcp.flag hJ ?_ ?_ hσ hq hcard hrange hL hb0 hbhi hw hH v hv t ht + · intro v hv + rw [he] at hv + exact (mem_goodWindowSet _ _ _).mp (Finset.mem_filter.mp hv).1 false + · intro v hv + rw [he] at hv + exact (Finset.mem_filter.mp hv).2 +end + +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Marking/WindowTargetRetention.lean b/lean/OAI/Combinatorics/RamseyFive/Marking/WindowTargetRetention.lean new file mode 100644 index 0000000000000000000000000000000000000000..e7ccd5a38dd68cb0caa7a8cb348a9a08187d6d64 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Marking/WindowTargetRetention.lean @@ -0,0 +1,178 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.SurvivingWindowCode +import OAI.Combinatorics.RamseyFive.Entropy.WindowTargetInputs + +namespace OAI + +namespace SharpRamseyFive.Marking + +section +open Module SharpRamseyFive.FiniteEntropy SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.Windows +open ReverseCap ScoreGeometry BinaryTree TreeCodec Filter ParameterHierarchy +open scoped Classical BigOperators LinearAlgebra.Projectivization NNReal Topology +noncomputable section +local instance (priority := high) winRetPropDE (P : Prop) : Decidable P := Classical.propDecidable P +local instance winRetBDE (w : ℕ) : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance winRetIDE (w n : ℕ) : DecidableEq (Slots w n) := Classical.decEq _ + +lemma double_error_bound (a b c d e : ℝ) (ha : a≤c) (hb : b≤c) : + a+b+d+e≤2*c+d+e := by linarith + +theorem eventually_window_target_retention {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0 ≤ Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D k s d ε C₀ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q₀ : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q₀] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))], + ∀ (hd : finrank K V=5) (hq3 : 3 ≤ Nat.card K) (w n : ℕ) [Nonempty (Fin n)] + (I : Type) [Fintype I] [DecidableEq I] [Preorder I] + (p : Law (Slots w n→FlagPair K V)) (u : Slots w n→ℝ) + (sel : Fin w×Bool→Fin n) (e : I→Fin w) (he : Monotone e) + (W : ReciprocalWindows p u sel e s) + (hcons : ∀ x,0

x i)))).card:ℝ) ≤ + 32*Real.exp (5*Real.log (Nat.card K)-u i)) + (hB : ∀ i,((support (second (map p (fun x=>x i)))).card:ℝ) ≤32*Real.exp (u i)) + (hflag : ∀ i,((support (map p (fun x=>x i))).card:ℝ) ≤C₀*(Nat.card K:ℝ)^4) + (hgood : ∀ i,indexBad (4*Real.log (Nat.card K)) d ε p + (orderedCollision p (slotEquiv w n) u s) sel (earlySlot sel (e i))=0) + (hdrop : ∀ i,u (earlySlot sel (e i))-u (lateSlot sel (e i)) ≤ k) + (hσ : 1 ≤ σ) (hq : Real.exp σ=Nat.card K), + Nat.card K=q₀ → Range η σ D R → (L₀:ℝ)=L η σ D → + 0fourFinitePredictor hd σ C.1 C.2 + (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun C : PivotContext K V=>fourFinitePredictor (K:=K) (V:=Dual K V) + (by simpa using hd) σ C.2 (C.1.map bidualPoint.toEmbedding) + (P η σ D R) (σ^(-800*beta η)) R L₀ + ∀ (tree : BinaryTree I),Ordered tree → ∀ (j : Address tree) (t : Fin (2*n)), + indexBad (4*Real.log (Nat.card K)) d ε p + (orderedCollision p (slotEquiv w n) u s) sel (middleSlot (e (label tree j)) t)=0 → + orientedTargetFailure f r σ hσ hq hd.le + (fun i=>(W.early i).firstLaw) (fun i=>(W.late i).secondLaw) + W.firstSupport W.secondSupport W.first_nonempty W.second_nonempty + p (fun x=>(x (middleSlot (e (label tree j)) t)).1) + (fun x=>(x (middleSlot (e (label tree j)) t)).2) + (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) tree j ≤ + 2*reciprocalBadMass s d C₀+ + tree.height*(20*tree.height*(50*(Nat.card K:ℝ)/(9*((9/100000)*(9/10))))* + (4*Real.exp 1)^2*(320016*ε)+((Nat.card K:ℝ)/(σ^(-1000*beta η)))* + (4*Real.exp 1)^2*(320016*ε)+5*Real.exp (-(Nat.card K:ℝ)))+ + (20*tree.height+2)*(50*(Nat.card K:ℝ)/(9*((9/100000)*(9/10))))* + (4*Real.exp 1)*(160008*ε) := by + filter_upwards [eventually_ordered_target_retention hη hη' Cb hCb] with σ hh + intro D k s d ε C₀ R L₀ q₀ K V _ _ _ _ _ _ _ _ _ hd hq3 w n _ I _ _ _ + p u sel e he W hcons hA hB hflag hgood hdrop hσ hq hcard hr hL hs hε hb hbhi + dsimp only + intro tree hord j t ht + have hbad:=window_bad_target p u sel (e (label tree j)) t s d ε C₀ hs + (hA _) (hB _) (hflag _) ht + have hright (i : I) (hi : label tree j ≤ i) := + W.target_right_sparse hd he d ε hcons (label tree j) i hi t ht + have hleft (i : I) (hi : i ≤ label tree j) := + W.target_left_sparse hd he d ε hcons i (label tree j) hi t ht + simp only [←map_first_value,←map_second_value] at hright hleft + have hh':=hh D (k+2*s+Real.log 4) R L₀ q₀ K V hd hq3 I + (fun _=>Finset (ℙ K V)) (fun _=>Finset (ℙ K (Dual K V))) + (fun i=>(W.early i).firstLaw) (fun i=>(W.late i).secondLaw) + W.firstSupport W.secondSupport W.first_nonempty W.second_nonempty + W.firstReference W.secondReference (4*Real.exp 1) (320016*ε) + (by positivity) (by positivity) W.first_domination W.second_domination + (W.reference_sparse hd he d ε hcons hgood) hσ hq hcard hr hL hb hbhi + (W.support_product k hdrop) tree hord j _ p + (fun x=>(x (middleSlot (e (label tree j)) t)).1) + (fun x=>(x (middleSlot (e (label tree j)) t)).2) + (fun a=>a∈reciprocalGoodA (map p (fun x=>x (middleSlot (e (label tree j)) t))) + (u (middleSlot (e (label tree j)) t)) s) + (fun b=>b∈reciprocalGoodB (map p (fun x=>x (middleSlot (e (label tree j)) t))) + (u (middleSlot (e (label tree j)) t)) s) + (160008*ε) (by positivity) hright hleft + apply hh'.trans + apply double_error_bound + · convert hbad.1 using 1 + congr 2 + · convert hbad.2 using 1 + congr 2 + +end +end + +open Module SharpRamseyFive.FiniteEntropy SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.Windows +open ReverseCap ScoreGeometry BinaryTree TreeCodec PivotTree Filter ParameterHierarchy +open scoped Classical BigOperators LinearAlgebra.Projectivization NNReal Topology +noncomputable section +local instance survRetPropDE (P : Prop) : Decidable P := Classical.propDecidable P +local instance survRetBDE (w : ℕ) : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance survRetIDE (w n : ℕ) : DecidableEq (Slots w n) := Classical.decEq _ + +theorem eventually_surviving_target_retention {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D k s d ε C₀ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q₀ : ℕ) (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [CharP K q₀] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))], + ∀ (hd : finrank K V=5) (hq3 : 3≤Nat.card K) (w n : ℕ) [Nonempty (Fin n)] + (p : Law (Slots w n→FlagPair K V)) (u : Slots w n→ℝ) + (sel : Fin w×Bool→Fin n) (E : Finset (Fin w)) (hE : E.Nonempty) + (W : ReciprocalWindows p u sel (survivingOriginal E hE) s) + (hcons : ∀x,0

x i)))).card:ℝ)≤32*Real.exp (5*Real.log (Nat.card K)-u i)) + (hB : ∀i,((support (second (map p (fun x=>x i)))).card:ℝ)≤32*Real.exp (u i)) + (hflag : ∀i,((support (map p (fun x=>x i))).card:ℝ)≤C₀*(Nat.card K:ℝ)^4) + (hgood : ∀v∈E,indexBad (4*Real.log (Nat.card K)) d ε p + (orderedCollision p (slotEquiv w n) u s) sel (earlySlot sel v)=0) + (hdrop : ∀v∈E,u (earlySlot sel v)-u (lateSlot sel v)≤k) + (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K), + Nat.card K=q₀→Range η σ D R→(L₀:ℝ)=L η σ D→ + 0fourFinitePredictor hd σ C.1 C.2 + (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun C : PivotContext K V=>fourFinitePredictor (K:=K) (V:=Dual K V) + (by simpa using hd) σ C.2 (C.1.map bidualPoint.toEmbedding) + (P η σ D R) (σ^(-800*beta η)) R L₀ + ∀ (v : Fin w) (hv : v∈E) (t : Fin (2*n)), + indexBad (4*Real.log (Nat.card K)) d ε p + (orderedCollision p (slotEquiv w n) u s) sel (middleSlot v t)=0→ + survivingTargetFailure f r p u sel E hE W σ hσ hq hd.le + (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) v t≤ + 2*reciprocalBadMass s d C₀+ + (finiteBalanced E.card).height*(20*(finiteBalanced E.card).height* + (50*(Nat.card K:ℝ)/(9*((9/100000)*(9/10))))* + (4*Real.exp 1)^2*(320016*ε)+((Nat.card K:ℝ)/(σ^(-1000*beta η)))* + (4*Real.exp 1)^2*(320016*ε)+5*Real.exp (-(Nat.card K:ℝ)))+ + (20*(finiteBalanced E.card).height+2)*(50*(Nat.card K:ℝ)/(9*((9/100000)*(9/10))))* + (4*Real.exp 1)*(160008*ε) := by + filter_upwards [eventually_window_target_retention hη hη' Cb hCb] with σ hh + intro D k s d ε C₀ R L₀ q₀ K V _ _ _ _ _ _ _ _ _ hd hq3 w n _ p u sel E hE W + hcons hinc hA hB hflag hgood hdrop hσ hq hcard hr hL hs hε hb hbhi + dsimp only + intro v hv t ht + let f := fun C : PivotContext K V=>fourFinitePredictor hd σ C.1 C.2 + (P η σ D R) (σ^(-800*beta η)) R L₀ + let r := fun C : PivotContext K V=>fourFinitePredictor (K:=K) (V:=Dual K V) + (by simpa using hd) σ C.2 (C.1.map bidualPoint.toEmbedding) + (P η σ D R) (σ^(-800*beta η)) R L₀ + let j : Fin E.card:=⟨(survivorRank E v).val,survivorRank_mem_lt E v hv⟩ + have heq : survivingOriginal E hE (label (finiteBalanced E.card) ((finiteRankEquiv E.card).symm j))=v := by + rw [survivingOriginal_address] + exact survivorRank_original E v hv + rw [survivingTargetFailure_eq f r p u sel E hE W σ hσ hq hd.le + (9/100000) (9/10) (σ^(-1000*beta η)) (P η σ D R) (by norm_num) hinc v hv t] + have hh':=hh D k s d ε C₀ R L₀ q₀ K V hd hq3 w n (Fin (E.card+1)) p u sel + (survivingOriginal E hE) (survivingOriginal_monotone E hE) W hcons hA hB hflag + (fun i=>hgood _ (survivingOriginal_mem E hE i)) + (fun i=>hdrop _ (survivingOriginal_mem E hE i)) hσ hq hcard hr hL hs hε hb hbhi + (finiteBalanced E.card) (finiteBalanced_ordered E.card) ((finiteRankEquiv E.card).symm j) t + simp only [heq] at hh' + exact hh' ht +end + +end SharpRamseyFive.Marking + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Model.lean b/lean/OAI/Combinatorics/RamseyFive/Model.lean new file mode 100644 index 0000000000000000000000000000000000000000..83bc75778eea7d95a92fc538379b534659a4f1d7 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Model.lean @@ -0,0 +1,27 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive + +def RamseyProperty (s t n : ℕ) : Prop := + ∀ G : SimpleGraph (Fin n), + (∃ A : Finset (Fin n), G.IsNClique s A) ∨ + (∃ B : Finset (Fin n), G.IsNIndepSet t B) + +noncomputable def ramsey (s t : ℕ) : ℕ := sInf {n : ℕ | RamseyProperty s t n} + +def SharpBounds : Prop := + ∃ C : ℝ, 0 < C ∧ ∀ ε : ℝ, 0 < ε → ∃ t₀ : ℕ, ∀ t : ℕ, t₀ ≤ t → + (t : ℝ) ^ 4 / Real.rpow (Real.log t) (3 + ε) ≤ (ramsey 5 t : ℝ) ∧ + (ramsey 5 t : ℝ) ≤ C * (t : ℝ) ^ 4 / (Real.log t) ^ 3 + +def SharpExponent : Prop := + Filter.Tendsto + (fun t : ℕ => (4 * Real.log (t : ℝ) - Real.log (ramsey 5 t : ℝ)) / + Real.log (Real.log (t : ℝ))) + Filter.atTop (nhds (3 : ℝ)) + +end SharpRamseyFive + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/AbsScoreTerm.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/AbsScoreTerm.lean new file mode 100644 index 0000000000000000000000000000000000000000..2f4dc51ac3f1e214d2b82d21f219a306c1e75595 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/AbsScoreTerm.lean @@ -0,0 +1,78 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Probability.MeasurePreservingSplitSchedule + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.PoissonScore +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal Classical +variable {ι D H : Type*} [Fintype ι] [DecidableEq ι] + [Fintype D] [DecidableEq D] [Fintype H] + +omit [Fintype ι] [DecidableEq ι] in +lemma abs_scoreTerm_le_one {R : ℕ} (s : Finset ι) {b : ℝ} + (hb : b∈Set.Icc 0 1) (own : Fin R→Bool) (ω : Fin R→ι→ℕ) : + |scoreTerm s b own ω|≤1 := by + unfold scoreTerm + rw [Finset.abs_prod] + apply Finset.prod_le_one₀ (fun _ _ => abs_nonneg _) + intro r _ + split_ifs + · exact abs_centeredFactor_le_one s b hb _ + · simp + +omit [Fintype ι] [DecidableEq ι] [Fintype H] in +lemma abs_typicalScore_le_card {R : ℕ} (F : Finset H) (lines : H→Finset ι) + {b : ℝ} (hb : b∈Set.Icc 0 1) (own : H→Fin R→Bool) (ω : Fin R→ι→ℕ) : + |typicalScore F lines b own ω|≤F.card := by + apply (Finset.abs_sum_le_sum_abs ..).trans + calc + (∑ h∈F,|scoreTerm (lines h) b (own h) ω|)≤∑ _h∈F,(1:ℝ) := + Finset.sum_le_sum fun h _ => abs_scoreTerm_le_one (lines h) hb (own h) ω + _ = _ := by simp + +omit [DecidableEq ι] [DecidableEq D] in +lemma measurePreserving_schedule_reindex (e : ι≃D) (rate : D→ℝ≥0) (R : ℕ) : + MeasurePreserving (fun ω : Fin R→ι→ℕ => fun r d => ω r (e.symm d)) + (scheduleMeasure (fun i => rate (e i)) R) (scheduleMeasure rate R) := by + have h := measurePreserving_pi (fun _ : Fin R => batchMeasure (fun i => rate (e i))) + (fun _ : Fin R => batchMeasure rate) (fun _ => measurePreserving_piCongrLeft + (fun d => poissonMeasure (rate d)) e) + convert h using 1 <;> try rfl + funext ω r d + simp [MeasurableEquiv.coe_piCongrLeft,Equiv.piCongrLeft_apply] + +omit [DecidableEq ι] [DecidableEq D] in +lemma integral_schedule_reindex (e : ι≃D) (rate : D→ℝ≥0) {R : ℕ} + (F : (Fin R→D→ℕ)→ℝ) : + (∫ ω,F (fun r d => ω r (e.symm d)) ∂scheduleMeasure (fun i => rate (e i)) R) = + ∫ ω,F ω ∂scheduleMeasure rate R := + (measurePreserving_schedule_reindex e rate R).hasLaw.integral_comp + (measurable_of_countable F).aestronglyMeasurable + +omit [DecidableEq ι] [DecidableEq D] [Fintype H] in +theorem original_uniform_score_moment (p : ι→Prop) [DecidablePred p] + (e : {i // ¬p i}≃D) (rate : ℝ≥0) {R : ℕ} + (F : Finset H) (lines : H→Finset D) {b : ℝ} (hb : b∈Set.Icc 0 1) + (own : (Fin R→{i // p i}→ℕ)→H→Fin R→Bool) (k : ℕ) (B : ℝ) + (hB : ∀ u,(∫ v,(typicalScore F lines b (own u) v)^k + ∂scheduleMeasure (fun _ : D => rate) R)≤B) : + (∫ ω,(typicalScore F lines b (own (fun r i => ω r i)) + (fun r d => ω r (e.symm d).val))^k ∂scheduleMeasure (fun _ : ι => rate) R)≤B := by + apply integral_split_schedule_le (fun _ : ι => rate) p + (fun u v => (typicalScore F lines b (own u) (fun r d => v r (e.symm d)))^k) + ((F.card:ℝ)^k) B + · intro u v + rw [abs_pow] + exact pow_le_pow_left₀ (abs_nonneg _) (abs_typicalScore_le_card F lines hb (own u) _) k + · intro u + rw [integral_schedule_reindex e (fun _ : D => rate) + (fun v => (typicalScore F lines b (own u) v)^k)] + exact hB u + +end SharpRamseyFive.PoissonScore + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/Aggregate.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/Aggregate.lean new file mode 100644 index 0000000000000000000000000000000000000000..dc4138a1242d499482af07c245dc3284b709bafb --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/Aggregate.lean @@ -0,0 +1,261 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.PoissonScore + +section +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal Classical + +lemma poisson_zero : poissonMeasure 0 = Measure.dirac (0 : ℕ) := by + apply Measure.ext_of_singleton + intro n + rw [poissonMeasure_singleton] + cases n <;> simp + +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +omit [DecidableEq ι] in +lemma hasLaw_coordinate (rate : ι→ℝ≥0) (i : ι) : + HasLaw (fun ω : ι→ℕ => ω i) (poissonMeasure (rate i)) (batchMeasure rate) := + (measurePreserving_eval (fun i => poissonMeasure (rate i)) i).hasLaw + +omit [DecidableEq ι] in +lemma coordinate_independent (rate : ι→ℝ≥0) : + iIndepFun (fun i (ω : ι→ℕ) => ω i) (batchMeasure rate) := by + exact iIndepFun_pi (fun _ => measurable_id.aemeasurable) + +lemma hasLaw_sum (rate : ι→ℝ≥0) (s : Finset ι) : + HasLaw (fun ω : ι→ℕ => ∑ i∈s,ω i) (poissonMeasure (∑ i∈s,rate i)) + (batchMeasure rate) := by + induction s using Finset.induction_on with + | empty => + simp only [Finset.sum_empty,poisson_zero] + exact ⟨measurable_const.aemeasurable,by simp⟩ + | @insert i s hi ih => + have hind := (coordinate_independent rate).indepFun_finsetSum_of_notMem + (fun j => measurable_pi_apply j) hi + have he : (∑ j∈s,fun ω : ι→ℕ => ω j) = (fun ω => ∑ j∈s,ω j) := by + funext ω + simp only [Finset.sum_apply] + rw [he] at hind + have h := hind.symm.hasLaw_add_poissonMeasure (hasLaw_coordinate rate i) ih + change HasLaw (fun ω : ι→ℕ => ω i+∑ j∈s,ω j) _ _ at h + simpa only [Finset.sum_insert hi] using h + +variable {D : Type*} [Fintype D] [DecidableEq D] + +noncomputable def aggregate (label : ι→D) (ω : ι→ℕ) (d : D) : ℕ := + ∑ i : {i // label i=d},ω i + +noncomputable def aggregateRate (label : ι→D) (rate : ι→ℝ≥0) (d : D) : ℝ≥0 := + ∑ i : {i // label i=d},rate i + +theorem measurePreserving_aggregate (label : ι→D) (rate : ι→ℝ≥0) : + MeasurePreserving (aggregate label) (batchMeasure rate) + (batchMeasure (aggregateRate label rate)) := by + have hsum (d : D) : MeasurePreserving + (fun ω : {i // label i=d}→ℕ => ∑ i,ω i) + (batchMeasure (fun i : {i // label i=d} => rate i)) + (poissonMeasure (aggregateRate label rate d)) := by + refine ⟨by fun_prop,?_⟩ + exact (hasLaw_sum (fun i : {i // label i=d} => rate i) Finset.univ).map_eq + exact (measurePreserving_pi _ _ hsum).comp (measurePreserving_partition rate label) + +omit [DecidableEq ι] [Fintype D] in +lemma emptyIndicator_aggregate (label : ι→D) (ω : ι→ℕ) (s : Finset D) : + emptyIndicator s (aggregate label ω) = + emptyIndicator (Finset.univ.filter fun i => label i∈s) ω := by + have he : aggregate label ω∈emptyEvent s ↔ + ω∈emptyEvent (Finset.univ.filter fun i => label i∈s) := by + simp only [emptyEvent,Set.mem_pi,Finset.mem_coe,Set.mem_singleton_iff, + aggregate,Finset.sum_eq_zero_iff,forall_const,Finset.mem_univ, + Finset.mem_filter,true_and] + constructor + · intro h i hi + exact h (label i) hi ⟨i,rfl⟩ + · intro h d hd i + exact h i (by simpa only [i.property] using hd) + unfold emptyIndicator + by_cases h : aggregate label ω∈emptyEvent s + · simp [h,he.mp h] + · simp [h,mt he.mpr h] + +end + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal Classical +variable {ι : Type*} [Fintype ι] [DecidableEq ι] +variable {D : Type*} [Fintype D] [DecidableEq D] + +lemma measurePreserving_schedule_aggregate (label : ι→D) (rate : ι→ℝ≥0) (R : ℕ) : + MeasurePreserving (fun ω : Fin R→ι→ℕ => fun r => aggregate label (ω r)) + (scheduleMeasure rate R) (scheduleMeasure (aggregateRate label rate) R) := + measurePreserving_pi _ _ (fun _ => measurePreserving_aggregate label rate) + +omit [DecidableEq ι] [Fintype D] in +lemma scoreTerm_aggregate (label : ι→D) {R : ℕ} (s : Finset D) (b : ℝ) + (own : Fin R→Bool) (ω : Fin R→ι→ℕ) : + scoreTerm s b own (fun r => aggregate label (ω r)) = + scoreTerm (Finset.univ.filter fun i => label i∈s) b own ω := by + unfold scoreTerm centeredFactor + simp_rw [emptyIndicator_aggregate] + +omit [DecidableEq ι] in +lemma integral_split_counts (rate : ι→ℝ≥0) (p : ι→Prop) [DecidablePred p] + (F : ({i // p i}→ℕ)→({i // ¬p i}→ℕ)→ℝ) + (M : ℝ) (hM : ∀ u v,|F u v|≤M) : + (∫ ω,F (fun i => ω i) (fun i => ω i) ∂batchMeasure rate) = + ∫ u,∫ v,F u v ∂batchMeasure (fun i : {i // ¬p i} => rate i) + ∂batchMeasure (fun i : {i // p i} => rate i) := by + let μ := batchMeasure (fun i : {i // p i} => rate i) + let ν := batchMeasure (fun i : {i // ¬p i} => rate i) + let e := MeasurableEquiv.piEquivPiSubtypeProd (fun _ : ι => ℕ) p + let G : ({i // p i}→ℕ)×({i // ¬p i}→ℕ)→ℝ := fun z => F z.1 z.2 + have hG : Integrable G (μ.prod ν) := by + apply Integrable.of_bound (measurable_of_countable G).aestronglyMeasurable M + exact Filter.Eventually.of_forall fun z => by + simpa only [Real.norm_eq_abs] using hM z.1 z.2 + calc + _ = ∫ z,G z ∂μ.prod ν := + (measurePreserving_piEquivPiSubtypeProd (fun i => poissonMeasure (rate i)) p).integral_comp + e.measurableEmbedding G + _ = _ := integral_prod G hG + +omit [DecidableEq ι] in +lemma integral_split_counts_le (rate : ι→ℝ≥0) (p : ι→Prop) [DecidablePred p] + (F : ({i // p i}→ℕ)→({i // ¬p i}→ℕ)→ℝ) + (M B : ℝ) (hM : ∀ u v,|F u v|≤M) + (hB : ∀ u,(∫ v,F u v ∂batchMeasure (fun i : {i // ¬p i} => rate i))≤B) : + (∫ ω,F (fun i => ω i) (fun i => ω i) ∂batchMeasure rate)≤B := by + rw [integral_split_counts rate p F M hM] + have hG : Integrable (fun z : ({i // p i}→ℕ)×({i // ¬p i}→ℕ) => F z.1 z.2) + ((batchMeasure (fun i : {i // p i} => rate i)).prod + (batchMeasure (fun i : {i // ¬p i} => rate i))) := by + apply Integrable.of_bound (measurable_of_countable _).aestronglyMeasurable M + exact Filter.Eventually.of_forall fun z => by + simpa only [Real.norm_eq_abs] using hM z.1 z.2 + calc + _ ≤ ∫ _u : {i // p i}→ℕ,B ∂batchMeasure (fun i : {i // p i} => rate i) := + integral_mono hG.integral_prod_left (integrable_const B) hB + _ = B := by simp + +end SharpRamseyFive.PoissonScore + +namespace SharpRamseyFive.ValidationMoment +open MeasureTheory ProbabilityTheory PoissonScore +open scoped BigOperators NNReal Classical + +private lemma add_power_bound {a b : ℝ} (ha : 0≤a) (hb : 0≤b) (R : ℕ) : + (a+b)^R≤2^R*(a^R+b^R) := by + apply (add_pow_le ha hb R).trans + exact mul_le_mul_of_nonneg_right + (pow_le_pow_right₀ (by norm_num : (1:ℝ)≤2) (Nat.sub_le R 1)) (by positivity) + +theorem finite_second_sum {H : Type*} [Fintype H] [DecidableEq H] + (M θ : H → H → ℝ) (d : H → ℝ) (a c : ℝ) (_ha : 0≤a) (hc : 0≤c) + (hd : ∀ h,0≤d h ∧ d h≤1) (hθ : ∀ h k,0≤θ h k) + (hdiag : ∀ h,|M h h|≤a) (hoff : ∀ h k,h≠k → |M h k|≤c*(d h*d k+θ h k)) + (R : ℕ) (hR : 2≤R) : + (∑ h,∑ k,|M h k|^R) ≤ (Fintype.card H:ℝ)*a^R+ + (2*c)^R*((∑ h,(d h)^2)^2+∑ h,∑ k∈Finset.univ.erase h,(θ h k)^R) := by + have hp (h k : H) (hne : h≠k) : |M h k|^R ≤ + (2*c)^R*((d h)^2*(d k)^2+(θ h k)^R) := by + calc + _ ≤ (c*(d h*d k+θ h k))^R := pow_le_pow_left₀ (abs_nonneg _) (hoff h k hne) R + _ = c^R*(d h*d k+θ h k)^R := mul_pow _ _ _ + _ ≤ c^R*(2^R*((d h*d k)^R+(θ h k)^R)) := + mul_le_mul_of_nonneg_left (add_power_bound (mul_nonneg (hd h).1 (hd k).1) (hθ h k) R) + (pow_nonneg hc R) + _ = (2*c)^R*((d h)^R*(d k)^R+(θ h k)^R) := by rw [mul_pow,mul_pow];ring + _ ≤ _ := by + apply mul_le_mul_of_nonneg_left _ (by positivity) + apply add_le_add <;> try rfl + exact mul_le_mul (pow_le_pow_of_le_one (hd h).1 (hd h).2 hR) + (pow_le_pow_of_le_one (hd k).1 (hd k).2 hR) (pow_nonneg (hd k).1 R) (sq_nonneg _) + have hs : (∑ h,∑ k,|M h k|^R)= + (∑ h,|M h h|^R)+(∑ h,∑ k∈Finset.univ.erase h,|M h k|^R) := by + rw [←Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro h _ + exact (Finset.add_sum_erase Finset.univ (fun k => |M h k|^R) (Finset.mem_univ h)).symm + rw [hs] + have hdg : (∑ h,|M h h|^R)≤(Fintype.card H:ℝ)*a^R := by + calc + _ ≤ ∑ _h : H,a^R := Finset.sum_le_sum fun h _ => pow_le_pow_left₀ (abs_nonneg _) (hdiag h) R + _ = _ := by simp + apply add_le_add hdg + calc + _ ≤ ∑ h,∑ k∈Finset.univ.erase h,(2*c)^R*((d h)^2*(d k)^2+(θ h k)^R) := by + apply Finset.sum_le_sum + intro h _ + apply Finset.sum_le_sum + intro k hk + exact hp h k (Ne.symm (Finset.mem_erase.mp hk).1) + _ = (2*c)^R*((∑ h,∑ k∈Finset.univ.erase h,(d h)^2*(d k)^2)+ + ∑ h,∑ k∈Finset.univ.erase h,(θ h k)^R) := by + simp only [Finset.mul_sum,Finset.sum_add_distrib,mul_add] + _ ≤ _ := by + apply mul_le_mul_of_nonneg_left _ (by positivity) + apply add_le_add <;> try rfl + calc + _ ≤ ∑ h,∑ k,(d h)^2*(d k)^2 := by + apply Finset.sum_le_sum + intro h _ + exact Finset.sum_le_sum_of_subset_of_nonneg (Finset.erase_subset _ _) + (fun k _ _ => mul_nonneg (sq_nonneg _) (sq_nonneg _)) + _ = _ := by rw [pow_two,Finset.sum_mul];simp only [Finset.mul_sum] + +variable {D H : Type*} [Fintype D] [DecidableEq D] [Fintype H] [DecidableEq H] + +omit [Fintype D] [DecidableEq D] in +lemma mass_scale (a : D → ℝ≥0) (L : ℝ≥0) (S : Finset D) : + mass (fun d => L*a d) S=(L:ℝ)*mass a S := by + simp only [mass,NNReal.coe_mul,Finset.mul_sum] + +lemma diagonal_one_batch (a : D → ℝ≥0) (L : ℝ≥0) (S : Finset D) + (base c : ℝ) (hc : 0≤c) (hm : c≤ mass a S) (hb : c≤base) : + |pairMean (fun d => L*a d) S S (Real.exp (-(L:ℝ)*base))| ≤ + 2*Real.exp (-(L:ℝ)*c) := by + rw [pairMean, ←integral_centeredFactor_mul] + apply (abs_integral_le_integral_abs).trans + apply le_trans _ (integral_abs_centeredFactor_exp_le _ S L.coe_nonneg (mass_scale a L S) hm hb) + apply integral_mono (integrable_centeredFactor_mul _ S S _).abs (integrable_centeredFactor _ S _).abs + intro ω + dsimp only + rw [abs_mul] + have hle := abs_centeredFactor_le_one S (Real.exp (-(L:ℝ)*base)) + ⟨(Real.exp_pos _).le,Real.exp_le_one_iff.mpr (mul_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr L.coe_nonneg) (hc.trans hb))⟩ ω + simpa only [mul_one] using mul_le_mul_of_nonneg_left hle (abs_nonneg (centeredFactor S (Real.exp (-(L:ℝ)*base)) ω)) + +theorem poisson_validation_second (a : D → ℝ≥0) (lines : H → Finset D) + (L : ℝ≥0) (hL : 1≤(L:ℝ)) (base c : ℝ) (hc : 0≤c) (hb : c≤base) + (hm : ∀ h,c≤ mass a (lines h)) (hd : ∀ h,|mass a (lines h)-base|≤1) + (R : ℕ) (hR : 2≤R) (own : H → Fin R → Bool) : + (∫ ω,(typicalScore Finset.univ lines (Real.exp (-(L:ℝ)*base)) own ω)^2 + ∂scheduleMeasure (fun d => L*a d) R) ≤ + (Fintype.card H:ℝ)*(2*Real.exp (-(L:ℝ)*c))^R+ + (2*(L:ℝ)^2*Real.exp (-(L:ℝ)*c))^R* + ((∑ h,|mass a (lines h)-base|^2)^2+ + ∑ h,∑ k∈Finset.univ.erase h,(mass a (lines h ∩ lines k))^R) := by + apply (integral_typicalScore_sq_le (fun d => L*a d) Finset.univ lines _ own).trans + have hh := finite_second_sum + (fun h k => pairMean (fun d => L*a d) (lines h) (lines k) (Real.exp (-(L:ℝ)*base))) + (fun h k => mass a (lines h ∩ lines k)) (fun h => |mass a (lines h)-base|) + (2*Real.exp (-(L:ℝ)*c)) ((L:ℝ)^2*Real.exp (-(L:ℝ)*c)) (by positivity) (by positivity) + (fun h => ⟨abs_nonneg _,hd h⟩) (fun _ _ => mass_nonneg _ _) + (fun h => diagonal_one_batch a L (lines h) base c hc (hm h) hb) (by + intro h k _ + rw [pairMean, ←integral_centeredFactor_mul] + exact abs_integral_centeredFactor_mul_exp_le _ _ _ hL hc + (mass_scale a L (lines h)) (mass_scale a L (lines k)) + (mass_scale a L (lines h ∩ lines k)) (hm h) (hm k) hb) R hR + simpa only [mul_assoc] using hh + +end SharpRamseyFive.ValidationMoment + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/AllEmptyIndicator.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/AllEmptyIndicator.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ba616eab96a26b19b7b2f97a9eaa4ac6f2ac5e0 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/AllEmptyIndicator.lean @@ -0,0 +1,123 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.PoissonScore +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal Classical + +lemma bounded_first_moment_probability {Ω : Type*} [MeasurableSpace Ω] + (μ : Measure Ω) [IsProbabilityMeasure μ] (f : Ω→ℝ) + (hmeas : Measurable f) {C a : ℝ} (hC : 0 by + rw [Real.norm_eq_abs,abs_of_nonneg (hbound ω).1];exact (hbound ω).2) + have he : Integrable (fun ω => C*a/2+C*E.indicator (fun _ => (1:ℝ)) ω) μ := + (integrable_const _).add (((integrable_const (1:ℝ)).indicator hE).const_mul C) + have hb : ∫ ω,f ω ∂μ ≤ C*a/2+C*μ.real E := by + calc + _ ≤ ∫ ω,C*a/2+C*E.indicator (fun _ => (1:ℝ)) ω ∂μ := integral_mono hf he fun ω => by + by_cases h : ω∈E + · simp only [Set.indicator_of_mem h] + linarith [(hbound ω).2,mul_nonneg hC.le ha] + · have hn : f ω norm_num + +lemma integrable_allEmptyIndicator (rate : ι→ℝ≥0) {R : ℕ} (s : Finset ι) : + Integrable (allEmptyIndicator (R:=R) s) (scheduleMeasure rate R) := by + exact Integrable.fintype_prod (fun _ => integrable_emptyIndicator rate s) + +lemma integral_allEmptyIndicator (rate : ι→ℝ≥0) {R : ℕ} (s : Finset ι) : + (∫ ω,allEmptyIndicator s ω ∂scheduleMeasure rate R)=Real.exp (-(R:ℝ)*mass rate s) := by + unfold allEmptyIndicator scheduleMeasure + rw [integral_fintype_prod_eq_prod] + simp only [integral_emptyIndicator,Finset.prod_const,Finset.card_univ,Fintype.card_fin] + rw [←Real.exp_nat_mul] + congr 1 + ring + +noncomputable def emptyTests {R : ℕ} (E : Finset H) (lines : H→Finset ι) + (ω : Fin R→ι→ℕ) : Finset H := E.filter fun h => ∀r,ω r∈emptyEvent (lines h) + +omit [Fintype ι] in +lemma emptyTests_card {R : ℕ} (E : Finset H) (lines : H→Finset ι) (ω : Fin R→ι→ℕ) : + ((emptyTests E lines ω).card:ℝ)=∑h∈E,allEmptyIndicator (lines h) ω := by + simp only [allEmptyIndicator_eq_if,emptyTests,Finset.sum_boole] + +omit [Fintype ι] in +lemma emptyTests_subset {R : ℕ} (E : Finset H) (lines : H→Finset ι) (ω : Fin R→ι→ℕ) : + emptyTests E lines ω⊆E := Finset.filter_subset .. + +lemma integrable_emptyTests_card (rate : ι→ℝ≥0) {R : ℕ} (E : Finset H) (lines : H→Finset ι) : + Integrable (fun ω : Fin R→ι→ℕ => ((emptyTests E lines ω).card:ℝ)) (scheduleMeasure rate R) := by + simp_rw [emptyTests_card] + exact integrable_finsetSum E fun h _ => integrable_allEmptyIndicator rate (lines h) + +lemma integral_emptyTests_card (rate : ι→ℝ≥0) {R : ℕ} (E : Finset H) (lines : H→Finset ι) : + (∫ ω,((emptyTests E lines ω).card:ℝ) ∂scheduleMeasure rate R)= + ∑h∈E,Real.exp (-(R:ℝ)*mass rate (lines h)) := by + simp_rw [emptyTests_card] + rw [integral_finsetSum E (fun h _ => integrable_allEmptyIndicator rate (lines h))] + simp only [integral_allEmptyIndicator] + +theorem emptyTests_probability (rate : ι→ℝ≥0) {R : ℕ} (E T : Finset H) + (hT : T.Nonempty) (hTE : T⊆E) (lines : H→Finset ι) {a : ℝ} + (hm : ∀h∈T,mass rate (lines h)≤a) : + Real.exp (-(R:ℝ)*a)/2≤(scheduleMeasure rate R).real + {ω | (T.card:ℝ)*Real.exp (-(R:ℝ)*a)/2≤((emptyTests E lines ω).card:ℝ)} := by + have hC : (0:ℝ) Real.exp_le_exp.mpr + (mul_le_mul_of_nonpos_left (hm h hh) (neg_nonpos.mpr (Nat.cast_nonneg _))) + have h := bounded_first_moment_probability (scheduleMeasure rate R) + (fun ω => ((emptyTests T lines ω).card:ℝ)) (measurable_of_countable _) hC + (Real.exp_pos _).le + (fun ω => ⟨Nat.cast_nonneg _,Nat.cast_le.mpr (Finset.card_le_card (emptyTests_subset T lines ω))⟩) hmean + apply h.trans + refine measureReal_mono ?_ (measure_ne_top _ _) + intro ω hω + change (T.card:ℝ)*Real.exp (-(R:ℝ)*a)/2≤((emptyTests T lines ω).card:ℝ) at hω + change (T.card:ℝ)*Real.exp (-(R:ℝ)*a)/2≤((emptyTests E lines ω).card:ℝ) + apply hω.trans + exact Nat.cast_le.mpr (Finset.card_le_card (Finset.filter_subset_filter _ hTE)) + +end SharpRamseyFive.PoissonScore + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/AmbientPublicTest.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/AmbientPublicTest.lean new file mode 100644 index 0000000000000000000000000000000000000000..4960ef317916bccc39e230bfbb87d15bb0428a73 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/AmbientPublicTest.lean @@ -0,0 +1,92 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Decoding.ProducedCapExclusion + +namespace OAI + +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical BigOperators +variable {A B : Type*} [Fintype A] [Fintype B] + +noncomputable def ambientCapLaw (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hW : W.Nonempty) (n : ℕ) (q M : ℝ) : Law (Option (Finset A)) := + map (map (iid (iid (uniformOn W hW) (Fin n)) (Fin (uniformCutoff q C W n))) + (firstAccepted (validationRows R S U C n q M))) + (Option.map (cap R Finset.univ q)) + +lemma cap_inter (R : A→B→Prop) (U : Finset A) {n : ℕ} (q : ℝ) (row : Fin n→B) : + U∩cap R Finset.univ q row=cap R U q row := by + ext a + simp [cap] + +lemma ambientCapLaw_restrict (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hW : W.Nonempty) (n : ℕ) (q M : ℝ) : + map (ambientCapLaw R S U C W hW n q M) (Option.map fun Y=>U∩Y)= + publicCapLaw R S U C W hW n q M := by + unfold ambientCapLaw publicCapLaw + rw [map_comp] + congr 1 + funext row + cases row with + | none => rfl + | some row => + change some (U∩cap R Finset.univ q row)=some (cap R U q row) + rw [cap_inter] + +lemma ambientCapLaw_none (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hW : W.Nonempty) (n : ℕ) (q M : ℝ) : + ambientCapLaw R S U C W hW n q M none=publicCapLaw R S U C W hW n q M none := by + simp [ambientCapLaw,publicCapLaw,map,Fintype.sum_option] + +lemma ambientCapLaw_positive (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hW : W.Nonempty) (n : ℕ) (q M : ℝ) + (Y : Finset A) (hY : 0 simp at he + | some row => + have he' : cap R Finset.univ q row=Y := Option.some.inj he + subst Y + rw [cap_inter] + obtain ⟨t,_,ht⟩ := map_positive _ _ _ hr + obtain ⟨i,hi,hm⟩ := firstAccepted_index _ _ ht + exact ⟨cap_subset _ _ _ _,(Finset.mem_filter.mp hm).2.2⟩ + +theorem ambientCapLaw_domination (R : A→B→Prop) (S U : Finset A) + (C X W : Finset B) (hC : C.Nonempty) (hW : W.Nonempty) + (hCW : C⊆W) (hCX : C⊆X) (n : ℕ) (hn : 0R a b) q W hW n (uniformCutoff q C W n) + (validationRows R S U C n q M) a := by + unfold ambientCapLaw freshRejection + rw [eventMass_map_filter] + apply congrArg (eventMass _) + apply Finset.ext + intro row + rw [Finset.mem_filter] + simp only [Finset.mem_univ,true_and,Finset.mem_image] + cases row with + | none => simp only [Option.map_none,Excludes,Option.some_ne_none,and_false,exists_false] + | some row => + simp only [Option.map_some,Excludes,Finset.mem_filter,cap,Finset.mem_univ,true_and, + not_lt,Option.some.injEq,exists_eq_right] + change hits (neighbors R a) row ≥ (n:ℝ)/(5*q) ↔ _ + rw [show (n:ℝ)/(5*q)=(1/(5*q))*n by ring] + rfl + rw [heq] + have h := fresh_test_domination C X W (Finset.univ.filter (R a)) hC hW hCW hCX + q c hq hc hsize n (uniformCutoff q C W n) hn (uniformCutoff_pos q hq C W hC hW n) + (validationRows R S U C n q M) (fun row hr=>(Finset.mem_filter.mp hr).2.1) hE + have he : (Finset.univ.filter (R a))∩X=X.filter (R a) := by ext b;simp [and_comm] + simpa only [freshRejection,he] using h + +end SharpRamseyFive.ReverseCap + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/CapNumerics.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/CapNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..6c8efc5ddadea92b0230b7a535aebdcec8d73f88 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/CapNumerics.lean @@ -0,0 +1,52 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.ReverseCap +lemma ambient_tail (u s q h : ℝ) (hu : 0 < u) (hs : 0 < s) (hq : 0 < q) + (hh : 20*q*Real.log (u/s) ≤ h) : + u*Real.exp (-h/(20*q)) ≤ s := by + have hp : 0 < 20*q := by positivity + have he : -h/(20*q) ≤ -Real.log (u/s) := by + have hh' : Real.log (u/s) ≤ h/(20*q) := (le_div_iff₀ hp).mpr (by simpa only [mul_comm] using hh) + simpa only [neg_div] using neg_le_neg hh' + calc + _ ≤ u*Real.exp (-Real.log (u/s)) := + mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr he) hu.le + _ = s := by rw [Real.exp_neg,Real.exp_log (div_pos hu hs)]; field_simp + +lemma captured_cap_budget (G x c a s u q h : ℝ) + (hG : 0 ≤ G) (hx : 0 < x) (hc : 0 < c) (ha : 0 < a) + (hs : 0 < s) (hu : 0 < u) (hq : 0 < q) + (hcapture : c*x ≤ a) (hproduct : s*x ≤ 16*G) + (hh : 20*q*Real.log (u/s) ≤ h) : + 16*G/a+u*Real.exp (-h/(20*q)) ≤ ((320/c+320)*G/x)/20 := by + have ht := ambient_tail u s q h hu hs hq hh + have hs' : s ≤ 16*G/x := (le_div_iff₀ hx).mpr hproduct + have ha' : 16*G/a ≤ 16*G/(c*x) := + (div_le_div_iff₀ ha (mul_pos hc hx)).mpr + (mul_le_mul_of_nonneg_left hcapture (by positivity)) + calc + _ ≤ 16*G/(c*x)+16*G/x := add_le_add ha' (ht.trans hs') + _ = _ := by field_simp; ring + +lemma rejection_from_capture (e x c a s q : ℝ) (ha : 0 < a) (hs : 0 ≤ s) + (hcapture : c*x ≤ a) (hsparse : 1000*q*e ≤ c*s*x) : + (5*q/a)*e ≤ s/200 := by + have hc := mul_le_mul_of_nonneg_left hcapture hs + have hh : 1000*q*e ≤ s*a := hsparse.trans (by nlinarith) + calc + _ = (5*q*e)/a := by ring + _ ≤ s/200 := (div_le_iff₀ ha).mpr (by nlinarith) + +lemma density_half (e s x c q : ℝ) (he : 0 ≤ e) (hs : 0 ≤ s) (hx : 0 ≤ x) + (hq : 0 < q) (hc : c ≤ 1) (hsparse : 1000*q*e ≤ c*s*x) : + e ≤ s*x/(2*q) := by + have hh := mul_le_mul_of_nonneg_right hc (mul_nonneg hs hx) + have hg : 0 ≤ q*e := mul_nonneg hq.le he + apply (le_div_iff₀ (by positivity : (0:ℝ) < 2*q)).mpr + nlinarith + +end SharpRamseyFive.ReverseCap + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/CellMass.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/CellMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..78a4725acd1146d1a13b5b28e0a133cc1b8af7d9 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/CellMass.lean @@ -0,0 +1,90 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.Q + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.CellVariance +open Module SharpRamseyFive.ProjectiveIncidence +open scoped BigOperators LinearAlgebra.Projectivization Classical + +lemma sum_shift_square {I : Type*} [Fintype I] (f : I → ℝ) (a b : ℝ) : + (∑ i,(f i-b)^2) ≤ 2*(∑ i,(f i-a)^2)+2*Fintype.card I*(a-b)^2 := by + calc + _ ≤ ∑ i,(2*(f i-a)^2+2*(a-b)^2) := Finset.sum_le_sum fun i _ => by + nlinarith [sq_nonneg ((f i-a)-(a-b))] + _ = _ := by simp only [Finset.sum_add_distrib,← Finset.mul_sum, + Finset.sum_const,Finset.card_univ,nsmul_eq_mul]; ring + +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Module.Dual K V))] + +noncomputable def cellMass (C : Finset (ℙ K V)) (δ : ℝ) (b : ℙ K (Module.Dual K V)) : ℝ := + δ*(C.filter fun a => Incident a b).card + +omit [Finite K] [FiniteDimensional K V] [Fintype (ℙ K (Module.Dual K V))] in +lemma weight_indicator (C : Finset (ℙ K V)) (δ : ℝ) (b : ℙ K (Module.Dual K V)) : + weightOnHyperplane (fun a => if a ∈ C then δ else 0) b = cellMass C δ b := by + simp only [weightOnHyperplane,mul_ite,mul_zero,Finset.sum_ite_mem,Finset.univ_inter] + rw [← Finset.sum_mul] + have he : (∑ a ∈ C,incidenceEntry a b) = ((C.filter fun a => Incident a b).card:ℝ) := by + exact Finset.sum_boole _ _ + rw [he,cellMass,mul_comm] + +theorem cell_variance {d : ℕ} (hdim : finrank K V = d+1) (hd : 1 ≤ d) + (C : Finset (ℙ K V)) (δ : ℝ) : + ∑ b,(cellMass C δ b - δ*C.card/(Nat.card K:ℝ))^2 ≤ + 4*δ^2*(Nat.card K:ℝ)^(d-1)*C.card := by + let q : ℝ := Nat.card K + let N : ℝ := Q (Nat.card K) d + let c : ℝ := C.card + let p : ℝ := (Q (Nat.card K) (d-1):ℝ)/N + have hq : 1 ≤ q := by dsimp [q]; exact_mod_cast (Finite.one_lt_card (α:=K)).le + have hN : 0 < N := by dsimp [N]; exact_mod_cast Q_pos (Nat.card K) d + have hc : 0 ≤ c := by dsimp [c]; positivity + have hcN : c ≤ N := by + dsimp [c,N] + exact_mod_cast (C.card_le_univ.trans_eq (card_points hdim)) + have hp : p-1/q = -(1/(q*N)) := by + dsimp [p] + have hr : N = q*(Q (Nat.card K) (d-1):ℝ)+1 := by + dsimp [N,q] + exact_mod_cast Q_recurrence (q:=Nat.card K) hd + field_simp + nlinarith + let w : ℙ K V → ℝ := fun a => if a ∈ C then δ else 0 + have hsum : (∑ a,w a) = δ*c := by simp [w,c,Finset.sum_ite_mem,mul_comm] + have hsq : (∑ a,w a^2) = δ^2*c := by simp [w,c,Finset.sum_ite_mem,mul_comm] + have hv := incidence_variance hdim hd w + rw [hsum,hsq] at hv + simp_rw [show ∀ b,weightOnHyperplane w b = cellMass C δ b from fun b => weight_indicator C δ b] at hv + change (∑ b,(cellMass C δ b-p*(δ*c))^2) ≤ q^(d-1)*(δ^2*c) at hv + have he : p*(δ*c)-δ*c/q = -(δ*c/(q*N)) := by + calc + _ = (p-1/q)*(δ*c) := by ring + _ = _ := by rw [hp]; ring + have hcor : N*(p*(δ*c)-δ*c/q)^2 ≤ δ^2*c := by + rw [he] + have heq : N*(-(δ*c/(q*N)))^2 = δ^2*c^2/(q^2*N) := by + have hq0 : q ≠ 0 := by linarith + field_simp + rw [heq] + apply (div_le_iff₀ (by positivity : 0 < q^2*N)).mpr + have hq2 : 1 ≤ q^2 := by nlinarith + have hbound : c ≤ q^2*N := hcN.trans (by nlinarith) + have hh := mul_le_mul_of_nonneg_left hbound (mul_nonneg (sq_nonneg δ) hc) + nlinarith + have hpow : 1 ≤ q^(d-1) := one_le_pow₀ hq + have hs := sum_shift_square (cellMass C δ) (p*(δ*c)) (δ*c/q) + rw [card_hyperplanes hdim] at hs + change (∑ b,(cellMass C δ b-δ*c/q)^2) ≤ 2*(∑ b,(cellMass C δ b-p*(δ*c))^2)+ + 2*N*(p*(δ*c)-δ*c/q)^2 at hs + change (∑ b,(cellMass C δ b-δ*c/q)^2) ≤ 4*δ^2*q^(d-1)*c + have hh := mul_le_mul_of_nonneg_right hpow (mul_nonneg (sq_nonneg δ) hc) + nlinarith + +end SharpRamseyFive.CellVariance + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/DimensionFourLowIntegrals.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/DimensionFourLowIntegrals.lean new file mode 100644 index 0000000000000000000000000000000000000000..12790bf1837341de8237228af1f9474bf1229b79 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/DimensionFourLowIntegrals.lean @@ -0,0 +1,182 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.PlaneExceptions +import OAI.Combinatorics.RamseyFive.Geometry.DimensionFourLowValidation +import OAI.Combinatorics.RamseyFive.Geometry.DimensionFourLowAmbient + +namespace OAI + +namespace SharpRamseyFive.ScoreScalars +lemma ambient_four_payment {σ : ℝ} (hσ : 100≤σ) : + 2*Real.exp (4*σ)*(Real.exp σ)^(-(50:ℝ))≤1/2 := by + rw [←Real.exp_mul, mul_assoc,←Real.exp_add] + have h := exp_sub_le_scaled (a:=0) (b:=46*σ) (C:=4) (by norm_num) + (by linarith only [Real.log_le_self (by norm_num : (0:ℝ)≤4),hσ]) + simp only [neg_zero,Real.exp_zero] at h + have he : 4*σ+σ*(-50)=-(46*σ) := by ring + rw [he] + linarith only [h] +end SharpRamseyFive.ScoreScalars +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence ProjectiveTraining GreedyTraining GlobalRadial +open CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_four_low_score_integrals {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b₀ τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (q : ℕ) (K I J : Type) [Field K] [Finite K] [CharP K q] [Fintype I] [LinearOrder J] + [Fintype (ℙ K (I→K))] [Fintype (ℙ K (Dual K (I→K)))] + [∀x : ℙ K (I→K),Fintype (RadialLine x)], + ∀ {A : Type} [Fintype A] (g : ℝ) (F : Finset J) (hF : F.Nonempty) + (Flat : J→Submodule K (I→K)) (X U S : Finset (ℙ K (I→K))) + (t₀ : ℝ) (ht₀ : 0 flatPoints (Flat j)) X ⌈t₀⌉₊ (Nat.ceil_pos.mpr ht₀) → + Real.exp (3*σ/2+g)/4≤S.card → (S.card:ℝ)≤10*Real.exp (5*σ/2) → + (S.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp (P η σ D R/10000) → + (∀x,ownCell F hF (fun j => flatPoints (Flat j)) X + (peelLength (P η σ D R/10000 flatPoints (Flat j)) X ⌈t₀⌉₊ (Nat.ceil_pos.mpr ht₀)) x⊆rawOwn x) → + (∀x,S∩rawOwn x=C (ia x)∪C (ib x)) → + (∑j,(C j).card)≤3*S.card → (∀j,C j⊆S) → + (∀x,C (ic x)=C (ia x)∩C (ib x)) → + (Nat.card K:ℝ)/S.card≤1/100 → (∀x,ownFraction S (C (ia x)) (C (ib x))≤2/25) → + let μ := scheduleMeasure (fun _ : S => L₀*pointStrength S) R + let O := fun x => C (ia x)∪C (ib x) + let ctr := fun x => Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x)))) + let t := scale (K:=K) 4 S.card*Real.exp (-(b₀+8*P η σ D R*τ+Real.log 16))/10 + (∫ω,((typicalFailures S S O (exceptional S C) ctr t ω).card:ℝ) ∂μ)≤ + (S.card:ℝ)*Real.exp (-(L₀:ℝ)/1000) ∧ + (∫ω,((typicalFailures U S O (exceptional S C) ctr t ω).card:ℝ) ∂μ)≤ + (S.card:ℝ)*Real.exp (8*P η σ D R) := by + have ht := eventually_four_low_validation_tail hη hη' Cb hCb + have hu := eventually_four_low_ambient_tail hη hη' Cb hCb + have he := eventually_literal_plane_half_exceptions hη hη' + have hm := eventually_score_margins hη hη' Cb hCb + have hl := eventually_hierarchy hη hη' Cb 1 10000000000 hCb (by norm_num) + filter_upwards [eventually_ge_atTop (100:ℝ),ht,hu,he,hm,hl] with σ hσ ht hu he hm hl + intro D b₀ τ R L₀ q K I J _ _ _ _ _ _ _ _ A _ g F hF Flat X U S t₀ ht₀ rawOwn C ia ib ic + hq hcard hσq hI hr hL hb₀ hbhi hτ hg hFlat hcover hX htc hpeel hquarter hn hLow hraw hOwn hC hCS hCc hdiv hf + dsimp only + let μ := scheduleMeasure (fun _ : S => L₀*pointStrength S) R + let O := fun x => C (ia x)∪C (ib x) + let O' := fun x => S∩rawOwn x + let ctr := fun x => Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x)))) + let t := scale (K:=K) 4 S.card*Real.exp (-(b₀+8*P η σ D R*τ+Real.log 16))/10 + let Lines := radialInventory (K:=K) (V:=I→K) + let reg := irregular (d:=4) S C ((L₀:ℝ)/100) + let rad := radialExceptions S O' (pointStrength S) Lines Finset.univ q S.card (P η σ D R/200) + let strong := ambientHalfStrongExceptions σ (P η σ D R) S O' Lines Finset.univ + let bad := reg∪rad + let E : ℙ K (I→K)→Set (Fin R→S→ℕ) := fun x => + {ω | Unsampled x S ω ∧ t < |pointScore S (O x) (pencil x\exceptional S C) (ctr x) ω|} + have hSn0 : (0:ℝ).trans (by norm_cast)).trans (add_le_add hreg hrad) + have hpay : (bad.card:ℝ)+S.card*Real.exp (-P η σ D R/2)≤(S.card:ℝ)*Real.exp (-(L₀:ℝ)/1000) := by + have hh := mul_le_mul_of_nonneg_left (ScoreScalars.regular_training_payment_half hlarge hLP) hSn0.le + nlinarith only [hh,hbad] + have hbelow (x : ℙ K (I→K)) (H : ℙ K (Dual K (I→K))) (hH : H∈pencil x\exceptional S C) : + Incident x H ∧ H∉exceptional S C := by + have hh := Finset.mem_sdiff.mp hH + exact ⟨(Finset.mem_filter.mp hh.1).2,hh.2⟩ + have htraining (x : ℙ K (I→K)) (hx : x∉bad) : μ.real (E x)≤Real.exp (-P η σ D R/2) := by + have hx' : x∉reg ∧ x∉rad := ⟨fun h => hx (Finset.mem_union_left _ h),fun h => hx (Finset.mem_union_right _ h)⟩ + apply ht D b₀ τ R L₀ K (I→K) x S C (ia x) (ib x) (ic x) O' (pencil x\exceptional S C) + Lines Finset.univ t hdim hqσ hr hL hb₀ hbhi hτ hS (hCS _) (hCS _) (hCc x) (hOwn x) hn hLow hdiv (hf x) + (hbelow x) hx'.1 (mem_radialInventory x) (Finset.mem_univ _) _ (le_refl _) + simpa only [hcard] using hx'.2 + have hambient (x : ℙ K (I→K)) (hx : x∉bad∪strong) : μ.real (E x)≤(Nat.card K:ℝ)^(-(50:ℝ)) := by + have hh : x∉bad ∧ x∉strong := ⟨fun h => hx (Finset.mem_union_left _ h),fun h => hx (Finset.mem_union_right _ h)⟩ + have hx' : x∉reg ∧ x∉rad := ⟨fun h => hh.1 (Finset.mem_union_left _ h),fun h => hh.1 (Finset.mem_union_right _ h)⟩ + apply hu D b₀ τ R L₀ K (I→K) x S C (ia x) (ib x) (ic x) O' (pencil x\exceptional S C) + Lines Finset.univ t hdim hqσ hr hL hb₀ hbhi hτ hS (hCS _) (hCS _) (hCc x) (hOwn x) hn hLow hdiv (hf x) + (hbelow x) hx'.1 (mem_radialInventory x) (Finset.mem_univ _) _ + (off_ambientHalfStrongExceptions σ (P η σ D R) S O' Lines Finset.univ x hh.2) (le_refl _) + simpa only [hcard] using hx'.2 + constructor + · have hh := integral_filter_card_le μ S bad E (Real.exp_nonneg _) (fun x hx => htraining x (Finset.mem_sdiff.mp hx).2) + change (∫ω,((S.filter fun x => ω∈E x).card:ℝ) ∂μ)≤_ + refine le_trans ?_ hpay + convert hh using 1; try rfl + apply integral_congr_ae + filter_upwards with ω + congr 2 + ext x + simp only [Finset.mem_filter] + · have hh := integral_filter_card_le μ U (bad∪strong) E (Real.rpow_nonneg (Nat.cast_nonneg _) _) + (fun x hx => hambient x (Finset.mem_sdiff.mp hx).2) + change (∫ω,((U.filter fun x => ω∈E x).card:ℝ) ∂μ)≤_ + refine le_trans (b:=((bad∪strong).card:ℝ)+U.card*(Nat.card K:ℝ)^(-(50:ℝ))) ?_ ?_ + · convert hh using 1; try rfl + apply integral_congr_ae + filter_upwards with ω + congr 2 + ext x + simp only [Finset.mem_filter] + have hq2 : (2:ℝ)≤Nat.card K := by rw [hqσ];linarith only [Real.add_one_le_exp σ,hσ] + have hU : (U.card:ℝ)≤2*Real.exp (4*σ) := by + have hp := Finset.card_le_univ U + rw [←Nat.card_eq_fintype_card,Projectivization.card_of_finrank K (I→K) hdim] at hp + norm_num [Finset.sum_range_succ] at hp + have hh : (U.card:ℝ)≤1+Nat.card K+(Nat.card K:ℝ)^2+(Nat.card K:ℝ)^3+(Nat.card K:ℝ)^4 := by exact_mod_cast hp + have hqpow : (Nat.card K:ℝ)^4=Real.exp (4*σ) := by rw [hqσ,←Real.exp_nat_mul];norm_num + rw [←hqpow] + have hqq : (Nat.card K:ℝ)^2≥2*Nat.card K := by nlinarith only [hq2] + have hqqq : (Nat.card K:ℝ)^3≥2*(Nat.card K:ℝ)^2 := by + nlinarith only [mul_le_mul_of_nonneg_right hq2 (sq_nonneg (Nat.card K:ℝ))] + have hqqqq : (Nat.card K:ℝ)^4≥2*(Nat.card K:ℝ)^3 := by + nlinarith only [mul_le_mul_of_nonneg_right hq2 (pow_nonneg (Nat.cast_nonneg (Nat.card K) : (0:ℝ)≤Nat.card K) 3)] + linarith only [hh,hq2,hqq,hqqq,hqqqq] + have hu : (U.card:ℝ)*(Nat.card K:ℝ)^(-(50:ℝ))≤1/2 := by + rw [hqσ] + exact (mul_le_mul_of_nonneg_right hU (by positivity)).trans (ScoreScalars.ambient_four_payment hσ) + have hbadn : (bad.card:ℝ)≤S.card := by + have hexp : Real.exp (-(L₀:ℝ)/1000)≤1 := Real.exp_le_one_iff.mpr (div_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr L₀.coe_nonneg) (by norm_num)) + have htpos : 0≤(S.card:ℝ)*Real.exp (-P η σ D R/2) := mul_nonneg (Nat.cast_nonneg _) (Real.exp_nonneg _) + have hb : (bad.card:ℝ)≤(S.card:ℝ)*Real.exp (-(L₀:ℝ)/1000) := by linarith only [hpay,htpos] + exact hb.trans (mul_le_of_le_one_right hSn0.le hexp) + have hP0 : 0≤P η σ D R := by linarith only [hLP,hlarge] + have hPexp : (3:ℝ)≤Real.exp (P η σ D R) := by linarith only [Real.add_one_le_exp (P η σ D R),hLP,hlarge] + have hexp7 : (1:ℝ)≤Real.exp (7*P η σ D R) := Real.one_le_exp (mul_nonneg (by norm_num) hP0) + have hbadall : ((bad∪strong).card:ℝ)≤(S.card:ℝ)+(S.card:ℝ)*Real.exp (7*P η σ D R) := by + have hc : ((bad∪strong).card:ℝ)≤(bad.card:ℝ)+strong.card := by exact_mod_cast Finset.card_union_le bad strong + exact hc.trans (add_le_add hbadn hstrong) + calc + _≤(S.card:ℝ)+(S.card:ℝ)*Real.exp (7*P η σ D R)+1/2 := add_le_add hbadall hu + _≤3*(S.card:ℝ)*Real.exp (7*P η σ D R) := by + nlinarith only [mul_le_mul_of_nonneg_left hexp7 hSn0.le,hn1] + _≤Real.exp (P η σ D R)*(S.card:ℝ)*Real.exp (7*P η σ D R) := + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hPexp (Nat.cast_nonneg _)) (Real.exp_nonneg _) + _=_ := by rw [mul_assoc,mul_left_comm (Real.exp _),←Real.exp_add];congr 2;ring + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/DimensionFourStrong.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/DimensionFourStrong.lean new file mode 100644 index 0000000000000000000000000000000000000000..0afc39418483704a644dfee4e50559fd26509b51 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/DimensionFourStrong.lean @@ -0,0 +1,108 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.PlaneExceptionScalars + +namespace OAI + +namespace SharpRamseyFive.ScoreScalars + +lemma four_strong_normalize {N q n a P : ℝ} {k : ℕ} (hq : 0 H≠H' ∧ 1/(100*(momentOrder σ (P η σ D R):ℝ))≤ mass + (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H∩pencilLines x F H')).card:ℝ)≤ + ((Nat.card K:ℝ)^4/S.card)*Real.exp (-3*P η σ D R) := by + have he := eventually_power_absorption hη hη' (40*1000200^2) 2 1 + (by positivity) (by norm_num) (by norm_num) + have hm := eventually_plane_ambient_margins hη hη' + filter_upwards [eventually_ge_atTop (100:ℝ),he,hm] with σ hσ he hm + intro D R K V _ _ _ _ _ x _ S O δ F Lines Q hdim hq hr hS hn hδ hF hmass hLines hxQ hstrong H + have hq0 : (0:ℝ) H≠H' ∧ a≤ mass + (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H∩pencilLines x F H')).card + change N≤_ + rcases hstrong with hstrong|hsmall + · have hh := score_degree_truncated x hdim (outsideAt x S (O x)) δ hδ F hF H a ha.le + (radial_lt_off_exception x S O δ (a/2) Lines hLines Q hxQ hstrong) + have hmsq : (mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H))^2≤4 := by + calc + _≤(2:ℝ)^2 := pow_le_pow_left₀ (mass_nonneg _ _) (hmass H) 2 + _=4 := by norm_num + have hN : N*a^2≤40*(Nat.card K:ℝ)^1 := by + have hh := hh.trans (mul_le_mul_of_nonneg_right (by linarith only [hmsq] : 2*(mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H))^2≤8) (by positivity)) + change N*a^2≤8*((Nat.card K:ℝ)+1) at hh + simp only [pow_one];linarith only [hh,hq1] + exact ScoreScalars.four_strong_normalize hq0 hn0 ha hN hcap (by norm_num) habs + · have hh := score_degree_four x hdim (outsideAt x S (O x)) δ hδ F hF H a ha.le + have hq2 : (Nat.card K:ℝ)≤(Nat.card K:ℝ)^2 := le_self_pow₀ hq1 (by norm_num : (2:ℕ)≠0) + have hq3 : (Nat.card K:ℝ)^2+Nat.card K+1≤3*(Nat.card K:ℝ)^2 := by nlinarith only [hq1,hq2] + have hmsq : (mass (radialWeight x (outsideAt x S (O x)) δ) (pencilLines x F H))^2≤4 := by + calc + _≤(2:ℝ)^2 := pow_le_pow_left₀ (mass_nonneg _ _) (hmass H) 2 + _=4 := by norm_num + have hN : N*a^2≤40*(Nat.card K:ℝ)^2 := by + apply hh.trans + calc + _≤2*2*(3*(Nat.card K:ℝ)^2)*2+2*4*((Nat.card K:ℝ)+1) := by gcongr;exact hmass H + _≤40*(Nat.card K:ℝ)^2 := by nlinarith only [hq1,hq2] + exact ScoreScalars.four_strong_normalize hq0 hn0 ha hN hsmall (by norm_num) habs +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/DimensionThreeSmallAmbient.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/DimensionThreeSmallAmbient.lean new file mode 100644 index 0000000000000000000000000000000000000000..9b098cfa68e5f7d0166045c15bd48fb9403cc491 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/DimensionThreeSmallAmbient.lean @@ -0,0 +1,157 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.DimensionThreeTails + +namespace OAI + +namespace SharpRamseyFive.ScoreScalars +lemma three_ambient_degree_small {N q n a P : ℝ} (hq : 0 L₀*pointStrength S) R).real + {ω | Unsampled x S ω ∧ t < |pointScore S (C a∪C b) F + (Real.exp (-(L₀:ℝ)*(1-ownFraction S (C a) (C b)))) ω|} ≤ (Nat.card K:ℝ)^(-(50:ℝ)) := by + have ht := eventually_low_original_tail hη hη' Cb hCb + have hd := eventually_dyad_power_payment hη hη' + have hc := eventually_power_absorption hη hη' (40*2^200) 0 (1/200) + (by positivity) (by norm_num) (by norm_num) + have h₁₀ := eventually_power_absorption hη hη' 10 0 (1/10000) + (by norm_num) (by norm_num) (by norm_num) + have hsmall := eventually_power_absorption hη hη' 4000800 1 1 + (by norm_num) (by norm_num) (by norm_num) + have hmargin := eventually_score_margins hη hη' Cb hCb + filter_upwards [eventually_ge_atTop (100:ℝ),ht,hd,hc,h₁₀,hsmall,hmargin] with σ hσ ht hd hc h₁₀ hsmall hmargin + intro D b₀ τ R L₀ K V _ _ _ _ _ _ _ x _ J _ S C a b c O F Lines Q t + hdim hq hr hL hb₀ hbhi hτ hS ha hb hC hO hSn hn hf hF hx hLines hxQ hgood hstrong ht₀ + have hS0 : (0:ℝ) (hF H hH).1) S.card (P η σ D R/200) hS0 hl₁ Lines hLines Q hxQ hm hgood 200 (le_refl _) + have hpay := hd D R (P η σ D R/200) (outsideAt x S (O x)).card hr (le_refl _) hcard + have hmoment : (∑z : DistinctPairs F,strength (pencilLines x F) + (radialWeight x (outsideAt x S (O x)) (pointStrength S)) z^200) ≤ + (scale (K:=K) 3 S.card)^2*Real.exp (P η σ D R/50) := by + apply hpair.trans + change 2^200*((Nat.clog 2 (outsideAt x S (O x)).card:ℝ)+1)* + (((Nat.card K:ℝ)^3/S.card)^2*Real.exp (2*(P η σ D R/200))) ≤ _ + calc + _ = ((Nat.card K:ℝ)^3/S.card)^2*(2^200*((Nat.clog 2 (outsideAt x S (O x)).card:ℝ)+1)* + Real.exp (2*(P η σ D R/200))) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left hpay (sq_nonneg _) + apply ht 3 D b₀ τ R L₀ K V x S C a b c F t hdim (by norm_num) (by norm_num) hq hr hL hb₀ hbhi hτ hS + ha hb hC (by convert hSn using 1; norm_num; ring) hSlow hn hf hF hx _ _ _ ht₀ + · intro u hu hu2 + have hh := power_tail_mul (fun z : DistinctPairs F => strength (pencilLines x F) + (radialWeight x (outsideAt x S (O x)) (pointStrength S)) z) (strength_nonneg _ _) 200 u _ hu hmoment + simp only [hO,strength] at hh + convert hh using 1 + congr 2 + · intro H u hu hu2 + have hh := score_degree_three_normalized x hdim (outsideAt x S (O x)) (pointStrength S) hδ F + (fun H hH => (hF H hH).1) H S.card u (P η σ D R/100) hS0 hu hu2 (hm H) hnq hl₂ + simpa only [hO,show 2*(P η σ D R/100)=P η σ D R/50 by ring,scale] using hh + · intro H + rcases hstrong with hstrong|hSnSmall + · have hh := score_degree_three_off_strong_zero x hdim S O (pointStrength S) hδ F + (fun H hH => (hF H hH).1) _ Lines hLines Q hxQ hstrong H + rw [hO] at hh + rw [hh,Nat.cast_zero] + unfold scale;positivity + · have hP1 : 1≤P η σ D R := by linarith only [(hmargin D b₀ τ R hr hb₀ hbhi hτ).2.1] + have hσ1 : 1≤σ := by linarith only [hσ] + have hp := momentOrder_bounds hσ1 hP1 + have hp0 : (0:ℝ)< momentOrder σ (P η σ D R) := Nat.cast_pos.mpr hp.2.1 + let a₀ : ℝ := 1/(100*(momentOrder σ (P η σ D R):ℝ)) + have ha₀ : 0 (hF H hH).1) H a₀ ha₀.le + have hN : ((Finset.univ.filter fun H':F => H≠H' ∧ a₀≤ mass + (radialWeight x (outsideAt x S (O x)) (pointStrength S)) (pencilLines x F H∩pencilLines x F H')).card:ℝ)*a₀≤4*Nat.card K := by + have hh' : _≤(2:ℝ)*((Nat.card K:ℝ)+1) := hh.trans (mul_le_mul_of_nonneg_right (hm H) (by positivity)) + linarith only [hh',hq1] + have habs : 4/a₀≤Real.exp (P η σ D R) := by + have hsc := hsmall D R hr + simp only [Real.rpow_one,one_mul] at hsc + calc + 4/a₀=400*(momentOrder σ (P η σ D R):ℝ) := by dsimp [a₀];field_simp;ring + _≤400*(10002*σ) := mul_le_mul_of_nonneg_left hp.2.2.2.2 (by norm_num) + _=4000800*σ := by ring + _≤_ := hsc + have hs := ScoreScalars.three_ambient_degree_small hq0 hS0 ha₀ hN hSnSmall habs + simpa only [hO,scale] using hs + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/DimensionTwoIntegrals.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/DimensionTwoIntegrals.lean new file mode 100644 index 0000000000000000000000000000000000000000..ba0fdc07e4070ea7f70bfeb4372a157f193db85d --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/DimensionTwoIntegrals.lean @@ -0,0 +1,157 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Iteration.CellScoreProcedure +import OAI.Combinatorics.RamseyFive.Geometry.PlaneStrongExceptions + +namespace OAI + +namespace SharpRamseyFive.PoissonScore +open MeasureTheory ProbabilityTheory +open scoped BigOperators Classical NNReal + +lemma integral_filter_card {Ω A : Type*} [MeasurableSpace Ω] [Countable Ω] + [MeasurableSingletonClass Ω] [DecidableEq A] (μ : Measure Ω) [IsProbabilityMeasure μ] + (U : Finset A) (E : A→Set Ω) : + (∫ω,((U.filter fun x => ω∈E x).card:ℝ) ∂μ)=∑x∈U,μ.real (E x) := by + exact integral_failureCount μ U (fun x ω => ω∈E x) + +lemma integral_filter_card_le {Ω A : Type*} [MeasurableSpace Ω] [Countable Ω] + [MeasurableSingletonClass Ω] [DecidableEq A] (μ : Measure Ω) [IsProbabilityMeasure μ] + (U bad : Finset A) (E : A→Set Ω) {e : ℝ} (he : 0≤e) + (hprob : ∀x∈U\bad,μ.real (E x)≤e) : + (∫ω,((U.filter fun x => ω∈E x).card:ℝ) ∂μ)≤(bad.card:ℝ)+U.card*e := by + have h := expected_failureCount_le μ U bad (fun x ω => ω∈E x) (fun _ => 0) he + (fun _ _ => le_rfl) (fun x hx => by + simpa only [add_zero,Set.ofPred_mem_eq] using + hprob x (by simpa only [Finset.mem_sdiff] using hx)) + simpa only [failureCount,Finset.sum_const_zero,add_zero] using h + +end SharpRamseyFive.PoissonScore +namespace SharpRamseyFive.ScoreScalars + +lemma regular_training_payment {L P : ℝ} (hL : 100000000≤L) (hLP : 100*L≤P) : + 200000*Real.exp (-2*(L/100))+Real.exp (-P/2)≤Real.exp (-L/1000) := by + have h₁ := exp_sub_le_scaled (a:=L/1000) (b:=2*(L/100)) (C:=400000) (by norm_num) + (by linarith only [Real.log_le_self (by norm_num : (0:ℝ)≤400000),hL]) + have h₂ := exp_sub_le_scaled (a:=L/1000) (b:=P/2) (C:=2) (by norm_num) + (by linarith only [Real.log_le_self (by norm_num : (0:ℝ)≤2),hL,hLP]) + simp only [neg_div,neg_mul] at * + linarith only [h₁,h₂] + +lemma ambient_two_payment {σ : ℝ} (hσ : 100≤σ) : + 2*Real.exp (2*σ)*(Real.exp σ)^(-(50:ℝ))≤1/2 := by + rw [←Real.exp_mul, mul_assoc,←Real.exp_add] + have h := exp_sub_le_scaled (a:=0) (b:=48*σ) (C:=4) (by norm_num) + (by linarith only [Real.log_le_self (by norm_num : (0:ℝ)≤4),hσ]) + simp only [neg_zero,Real.exp_zero] at h + have he : 2*σ+σ*(-50)=-(48*σ) := by ring + rw [he] + linarith only [h] + +end SharpRamseyFive.ScoreScalars + +namespace SharpRamseyFive.ScoreGeometry +open Module ProjectiveIncidence CellVariance ScoreRegularity PoissonScore WeightedPrograms MeasureTheory +open Filter ParameterHierarchy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_two_score_integrals {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (D b₀ τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [∀x : ℙ K V,Fintype (RadialLine x)], + ∀ {J : Type} [Fintype J] (U S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) + (ia ib ic : ℙ K V→J), + finrank K V=3 → (Nat.card K:ℝ)=Real.exp σ → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b₀ → b₀≤Cb*D*σ^(6*beta η) → + τ≤σ^(-200*beta η) → S.Nonempty → + (∑j,(C j).card)≤3*S.card → (∀j,C j⊆S) → + (∀x,C (ic x)=C (ia x)∩C (ib x)) → + (S.card:ℝ)≤10*Real.exp (3*σ/2) → + (Nat.card K:ℝ)/S.card≤1/100 → (∀x,ownFraction S (C (ia x)) (C (ib x))≤2/25) → + let μ := scheduleMeasure (fun _ : S => L₀*pointStrength S) R + let O := fun x => C (ia x)∪C (ib x) + let ctr := fun x => Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x)))) + let t := scale (K:=K) 2 S.card*Real.exp (-(b₀+8*P η σ D R*τ+Real.log 16))/10 + (∫ω,((typicalFailures S S O (exceptional S C) ctr t ω).card:ℝ) ∂μ)≤ + (S.card:ℝ)*Real.exp (-(L₀:ℝ)/1000) ∧ + (∫ω,((typicalFailures U S O (exceptional S C) ctr t ω).card:ℝ) ∂μ)≤(S.card:ℝ) := by + have ht := eventually_two_score_tails hη hη' Cb hCb + have hm := eventually_score_margins hη hη' Cb hCb + have hl := eventually_hierarchy hη hη' Cb 1 100000000 hCb (by norm_num) + filter_upwards [eventually_ge_atTop (100:ℝ),ht,hm,hl] with σ hσ ht hm hl + intro D b₀ τ R L₀ K V _ _ _ _ _ _ _ _ J _ U S C ia ib ic hdim hq hr hL hb₀ hbhi hτ + hS hC hCS hCc hSn hn hf + dsimp only + let μ := scheduleMeasure (fun _ : S => L₀*pointStrength S) R + let O := fun x => C (ia x)∪C (ib x) + let ctr := fun x => Real.exp (-(L₀:ℝ)*(1-ownFraction S (C (ia x)) (C (ib x)))) + let t := scale (K:=K) 2 S.card*Real.exp (-(b₀+8*P η σ D R*τ+Real.log 16))/10 + let bad := irregular (d:=2) S C ((L₀:ℝ)/100) + let E : ℙ K V→Set (Fin R→S→ℕ) := fun x => {ω | Unsampled x S ω ∧ t < |pointScore S (O x) (pencil x\exceptional S C) (ctr x) ω|} + have hn1 : (1:ℝ)≤S.card := by exact_mod_cast hS.card_pos + have hlarge : 100000000≤(L₀:ℝ) := by rw [hL];exact (hl D R b₀ τ hr hbhi hτ).1 + have hLP : 100*(L₀:ℝ)≤P η σ D R := by rw [hL];exact (hm D b₀ τ R hr hb₀ hbhi hτ).2.2.2.1 + have hbad := irregular_card_bound (d:=2) hdim (by norm_num) S C hS hC + (ξ:=(L₀:ℝ)/100) (by linarith only [Real.add_one_le_exp ((L₀:ℝ)/100),hlarge]) + have htail (x : ℙ K V) (hx : x∉bad) : + μ.real (E x)≤Real.exp (-P η σ D R/2) ∧ μ.real (E x)≤(Nat.card K:ℝ)^(-(50:ℝ)) := by + apply ht D b₀ τ R L₀ K V x S C (ia x) (ib x) (ic x) (pencil x\exceptional S C) t + hdim hq hr hL hb₀ hbhi hτ hS (hCS _) (hCS _) (hCc x) hSn hn (hf x) _ hx (le_refl _) + intro H hH + have hh := Finset.mem_sdiff.mp hH + exact ⟨(Finset.mem_filter.mp hh.1).2,hh.2⟩ + constructor + · have hh := integral_filter_card_le μ S bad E (Real.exp_nonneg _) + (fun x hx => (htail x (Finset.mem_sdiff.mp hx).2).1) + change (∫ω,((S.filter fun x => ω∈E x).card:ℝ) ∂μ)≤_ + refine le_trans (b:=(bad.card:ℝ)+S.card*Real.exp (-P η σ D R/2)) ?_ ?_ + · convert hh using 1; try rfl + apply integral_congr_ae + filter_upwards with ω + congr 2 + ext x + simp only [Finset.mem_filter] + calc + _ ≤ 200000*(S.card:ℝ)*Real.exp (-2*((L₀:ℝ)/100))+S.card*Real.exp (-P η σ D R/2) := + add_le_add hbad le_rfl + _ = (S.card:ℝ)*(200000*Real.exp (-2*((L₀:ℝ)/100))+Real.exp (-P η σ D R/2)) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left (ScoreScalars.regular_training_payment hlarge hLP) (Nat.cast_nonneg _) + · have hh := integral_filter_card_le μ U bad E (Real.rpow_nonneg (Nat.cast_nonneg _) _) + (fun x hx => (htail x (Finset.mem_sdiff.mp hx).2).2) + change (∫ω,((U.filter fun x => ω∈E x).card:ℝ) ∂μ)≤_ + refine le_trans (b:=(bad.card:ℝ)+U.card*(Nat.card K:ℝ)^(-(50:ℝ))) ?_ ?_ + · convert hh using 1; try rfl + apply integral_congr_ae + filter_upwards with ω + congr 2 + ext x + simp only [Finset.mem_filter] + have hq1 : (1:ℝ)≤Nat.card K := by exact_mod_cast Nat.card_pos (α:=K) + have hq2 : (2:ℝ)≤Nat.card K := by rw [hq];linarith only [Real.add_one_le_exp σ,hσ] + have hU : (U.card:ℝ)≤2*Real.exp (2*σ) := by + have hp := Finset.card_le_univ U + rw [←Nat.card_eq_fintype_card,Projectivization.card_of_finrank K V hdim] at hp + norm_num [Finset.sum_range_succ] at hp + have hh : (U.card:ℝ)≤1+Nat.card K+(Nat.card K:ℝ)^2 := by exact_mod_cast hp + have hqpow : (Nat.card K:ℝ)^2=Real.exp (2*σ) := by rw [hq,←Real.exp_nat_mul];norm_num + rw [←hqpow] + nlinarith only [hh,hq2] + have hpay := ScoreScalars.ambient_two_payment hσ + have hu : (U.card:ℝ)*(Nat.card K:ℝ)^(-(50:ℝ))≤1/2 := by + rw [hq] + exact (mul_le_mul_of_nonneg_right hU (by positivity)).trans hpay + have hrpay := ScoreScalars.exp_sub_le_scaled (a:=0) (b:=2*((L₀:ℝ)/100)) (C:=400000) (by norm_num) + (by linarith only [Real.log_le_self (by norm_num : (0:ℝ)≤400000),hlarge]) + simp only [neg_zero,Real.exp_zero] at hrpay + rw [show -(2*((L₀:ℝ)/100))=(-2)*((L₀:ℝ)/100) by ring] at hrpay + have hb : (bad.card:ℝ)≤(S.card:ℝ)/2 := by + apply hbad.trans + nlinarith only [mul_le_mul_of_nonneg_right hrpay (Nat.cast_nonneg S.card : (0:ℝ)≤S.card)] + linarith only [hb,hu,hn1] + +end SharpRamseyFive.ScoreGeometry + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/EmptyTestsManySmall.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/EmptyTestsManySmall.lean new file mode 100644 index 0000000000000000000000000000000000000000..42b020c5d96f49f3a73711afa69029c7fbe62dc5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/EmptyTestsManySmall.lean @@ -0,0 +1,155 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Entropy.EmptyWeight + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.PoissonScore + +section +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal Classical +variable {ι H : Type*} [Fintype ι] + +theorem emptyTests_many_small (L : ℝ≥0) (weight : ι→ℝ≥0) {R : ℕ} + (E T : Finset H) (hT : T.Nonempty) (hTE : T⊆E) (lines : H→Finset ι) + {a c b M : ℝ} (hc : 0≤c) (hb : 0 L*weight i) R).real + {ω | zmin≤((emptyTests E lines ω).card:ℝ) ∧ + emptyWeight E lines (fun h => mass weight (lines h)) ω≤ + (c+b)*((emptyTests E lines ω).card:ℝ)} := by + dsimp only + let P := (R:ℝ)*(L:ℝ) + let zmin := (T.card:ℝ)*Real.exp (-P*a)/2 + let μ := scheduleMeasure (fun i => L*weight i) R + let z := fun ω : Fin R→ι→ℕ => ((emptyTests E lines ω).card:ℝ) + let w := fun h => mass weight (lines h) + let heavy := emptyWeight (E.filter fun h => c L*weight i) E T hT hTE lines + (a:=(L:ℝ)*a) (fun h hh => by + have hi := mul_le_mul_of_nonneg_left (hsmall h hh) L.coe_nonneg + simpa only [mass,NNReal.coe_mul,Finset.mul_sum] using hi) + have he : -(R:ℝ)*((L:ℝ)*a)=-P*a := by dsimp [P];ring + simpa only [he] using hh + have hbad : μ.real Bad≤M*Real.exp (-P*c)/(b*zmin) := + heavy_empty_probability L weight E lines (mul_pos hb hz0) hM + have hcover : A⊆G∪Bad := by + intro ω hω + by_cases hh : b*zmin≤heavy ω + · exact Or.inr hh + left + refine ⟨hω,?_⟩ + have hd := emptyWeight_light_heavy E lines w hc ω + change emptyWeight E lines w ω≤c*z ω+heavy ω at hd + have hbz := mul_le_mul_of_nonneg_left hω hb.le + have ht := lt_of_not_ge hh + change b*zmin>heavy ω at ht + linarith only [hd,hbz,ht] + have hm : μ.real A≤μ.real G+μ.real Bad := + (measureReal_mono hcover (measure_ne_top _ _)).trans (measureReal_union_le G Bad) + change Real.exp (-P*a)/2-M*Real.exp (-P*c)/(b*zmin)≤μ.real G + linarith only [ha,hbad,hm] + +end + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal Classical + +lemma abs_bool_centered {b : ℝ} (hb : b∈Set.Icc 0 1) (u : Bool) : + |(if u then (1:ℝ) else 0)-b|≤1 := by + cases u <;> simp only [Bool.false_eq_true,ite_false,ite_true,zero_sub] + · simpa only [abs_neg,abs_of_nonneg hb.1] using hb.2 + · rw [abs_of_nonneg (sub_nonneg.mpr hb.2)] + linarith [hb.1] + +lemma bool_product_error {R : ℕ} (u v : Fin R→Bool) {b : ℝ} (hb : b∈Set.Icc 0 1) : + |(∏r,if u r then ((if v r then (1:ℝ) else 0)-b) else 0)- + (if ∀r,u r=true ∧ v r=true then (1-b)^R else 0)|≤b := by + by_cases hall : ∀r,u r=true ∧ v r=true + · rw [ite_eq_left hall] + have he : (∏r,if u r then ((if v r then (1:ℝ) else 0)-b) else 0)=(1-b)^R := by + simp [fun r => (hall r).1,fun r => (hall r).2] + rw [he,sub_self,abs_zero] + exact hb.1 + rw [ite_eq_right hall,sub_zero] + by_cases hu : ∀r,u r=true + · have hv : ∃r,v r≠true := by + by_contra h + push Not at h + exact hall fun r => ⟨hu r,h r⟩ + obtain ⟨r,hr⟩ := hv + simp only [hu,ite_true,Finset.abs_prod] + have hh := Finset.prod_le_prod_of_subset_of_le_one₀ + (s:={r}) (t:=(Finset.univ:Finset (Fin R))) + (f:=fun r => |(if v r then (1:ℝ) else 0)-b|) + (Finset.subset_univ _) (fun _ _ => abs_nonneg _) + (fun s _ _ => abs_bool_centered hb (v s)) + simpa [Finset.prod_singleton,hr,abs_of_nonneg hb.1] using hh + · obtain ⟨r,hr⟩ := not_forall.mp hu + have hz : (∏s,if u s then ((if v s then (1:ℝ) else 0)-b) else 0)=0 := + Finset.prod_eq_zero (Finset.mem_univ r) (ite_eq_right hr) + rw [hz,abs_zero] + exact hb.1 + +variable {ι H : Type*} [DecidableEq ι] + +noncomputable def ownScore {R : ℕ} (s o : Finset ι) (b : ℝ) (ω : Fin R→ι→ℕ) : ℝ := + ∏r,emptyIndicator (s∩o) (ω r)*(emptyIndicator (s\o) (ω r)-b) + +lemma emptyEvent_split (s o : Finset ι) (ω : ι→ℕ) : + ω∈emptyEvent (s∩o) ∧ ω∈emptyEvent (s\o) ↔ ω∈emptyEvent s := by + simp only [emptyEvent,Set.mem_pi,Finset.mem_coe,Set.mem_singleton_iff] + constructor + · intro ⟨h1,h2⟩ i hi + by_cases ho : i∈o + · exact h1 i (Finset.mem_inter.mpr ⟨hi,ho⟩) + · exact h2 i (Finset.mem_sdiff.mpr ⟨hi,ho⟩) + · intro h + exact ⟨fun i hi => h i (Finset.mem_inter.mp hi).1, + fun i hi => h i (Finset.mem_sdiff.mp hi).1⟩ + +lemma ownScore_error {R : ℕ} (s o : Finset ι) {b : ℝ} (hb : b∈Set.Icc 0 1) + (ω : Fin R→ι→ℕ) : + |ownScore s o b ω-(1-b)^R*allEmptyIndicator s ω|≤b := by + have hh := bool_product_error (fun r => decide (ω r∈emptyEvent (s∩o))) + (fun r => decide (ω r∈emptyEvent (s\o))) hb + simp only [decide_eq_true_eq,emptyEvent_split] at hh + convert hh using 1 + congr 2 + · unfold ownScore emptyIndicator + apply Finset.prod_congr rfl + intro r _ + simp only [Set.indicator_apply] + split_ifs <;> ring + · rw [allEmptyIndicator_eq_if] + split_ifs <;> ring + +theorem exceptionalScore_error {R : ℕ} (E : Finset H) (lines : H→Finset ι) + (o : Finset ι) {b : ℝ} (hb : b∈Set.Icc 0 1) (ω : Fin R→ι→ℕ) : + |(∑h∈E,ownScore (lines h) o b ω)- + (1-b)^R*((emptyTests E lines ω).card:ℝ)|≤b*E.card := by + rw [emptyTests_card,Finset.mul_sum,←Finset.sum_sub_distrib] + calc + _ ≤ ∑h∈E,|ownScore (lines h) o b ω-(1-b)^R*allEmptyIndicator (lines h) ω| := + Finset.abs_sum_le_sum_abs .. + _ ≤ ∑_h∈E,b := Finset.sum_le_sum fun h _ => ownScore_error (lines h) o hb ω + _ = _ := by simp [mul_comm] + +end SharpRamseyFive.PoissonScore + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/FailureCount.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/FailureCount.lean new file mode 100644 index 0000000000000000000000000000000000000000..add64c8ee18163f341b0bd77f9e8952c54b74ad4 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/FailureCount.lean @@ -0,0 +1,143 @@ +import Mathlib + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.PoissonScore + +section +open MeasureTheory ProbabilityTheory +open scoped BigOperators Classical +variable {Ω X : Type*} [MeasurableSpace Ω] [Countable Ω] [MeasurableSingletonClass Ω] + +theorem weighted_moment_tail (μ : Measure Ω) [IsProbabilityMeasure μ] + (f g : Ω→ℝ) {M t B : ℝ} (hf : ∀ω,|f ω|≤M) (hg : ∀ω,g ω∈Set.Icc 0 1) + {p : ℕ} (hp : Even p) (ht : 0 g ω*(f ω)^p) μ := by + apply Integrable.of_bound (measurable_of_countable _).aestronglyMeasurable (M^p) + exact Filter.Eventually.of_forall fun ω => by + rw [Real.norm_eq_abs,abs_mul,abs_of_nonneg (hg ω).1,abs_pow] + exact (mul_le_mul (hg ω).2 (pow_le_pow_left₀ (abs_nonneg _) (hf ω) p) + (pow_nonneg (abs_nonneg _) _) (by norm_num)).trans_eq (one_mul _) + have hnn : ∀ω,0≤g ω*(f ω)^p := fun ω => mul_nonneg (hg ω).1 (hp.pow_nonneg _) + have hsub : {ω | g ω=1 ∧ t < |f ω|}⊆{ω | t^p≤g ω*(f ω)^p} := by + intro ω hω + change t^p≤g ω*(f ω)^p + rw [hω.1,one_mul,←hp.pow_abs (f ω)] + exact pow_le_pow_left₀ ht.le hω.2.le p + apply (le_div_iff₀ (pow_pos ht p)).mpr + rw [mul_comm] + exact (mul_le_mul_of_nonneg_left (measureReal_mono hsub (measure_ne_top _ _)) + (pow_nonneg ht.le p)).trans ((mul_meas_ge_le_integral_of_nonneg + (Filter.Eventually.of_forall hnn) hi (t^p)).trans hB) + +noncomputable def failureCount (U : Finset X) (P : X→Ω→Prop) (ω : Ω) : ℝ := + (U.filter fun x => P x ω).card + +omit [MeasurableSpace Ω] [Countable Ω] [MeasurableSingletonClass Ω] in +lemma failureCount_bounds (U : Finset X) (P : X→Ω→Prop) (ω : Ω) : + 0≤failureCount U P ω ∧ failureCount U P ω≤U.card := by + exact ⟨Nat.cast_nonneg _,Nat.cast_le.mpr (Finset.card_filter_le _ _)⟩ + +lemma integrable_failureCount (μ : Measure Ω) [IsFiniteMeasure μ] + (U : Finset X) (P : X→Ω→Prop) : Integrable (failureCount U P) μ := by + apply Integrable.of_bound (measurable_of_countable _).aestronglyMeasurable (U.card:ℝ) + exact Filter.Eventually.of_forall fun ω => by + rw [Real.norm_eq_abs,abs_of_nonneg (failureCount_bounds U P ω).1] + exact (failureCount_bounds U P ω).2 + +lemma integral_failureCount (μ : Measure Ω) [IsFiniteMeasure μ] + (U : Finset X) (P : X→Ω→Prop) : + (∫ω,failureCount U P ω ∂μ)=∑x∈U,μ.real {ω | P x ω} := by + have he : failureCount U P=fun ω =>∑x∈U,({ω | P x ω}).indicator (fun _ => (1:ℝ)) ω := by + funext ω + simp only [failureCount,Set.indicator_apply,Set.mem_ofPred_eq,Finset.sum_boole] + rw [he,integral_finsetSum U (fun x _ => (integrable_const (1:ℝ)).indicator + (Set.to_countable _ |>.measurableSet))] + apply Finset.sum_congr rfl + intro x _ + rw [integral_indicator_const (1:ℝ) (Set.to_countable _ |>.measurableSet)] + simp + +theorem failureCount_tail (μ : Measure Ω) [IsProbabilityMeasure μ] + (U : Finset X) (P : X→Ω→Prop) (a : X→ℝ) {ε : ℝ} (hε : 0<ε) + (ha : ∀x∈U,μ.real {ω | P x ω}≤a x) : + μ.real {ω | ε≤failureCount U P ω}≤(∑x∈U,a x)/ε := by + apply (le_div_iff₀ hε).mpr + rw [mul_comm] + apply (mul_meas_ge_le_integral_of_nonneg (Filter.Eventually.of_forall + (fun ω => (failureCount_bounds U P ω).1)) (integrable_failureCount μ U P) ε).trans + rw [integral_failureCount] + exact Finset.sum_le_sum ha + +theorem expected_failureCount_le (μ : Measure Ω) [IsProbabilityMeasure μ] + (U bad : Finset X) (P : X→Ω→Prop) (a : X→ℝ) {ε : ℝ} + (hε : 0≤ε) (ha : ∀x∈U,0≤a x) + (hprob : ∀x∈U\bad,μ.real {ω | P x ω}≤ε+a x) : + (∫ω,failureCount U P ω ∂μ)≤bad.card+(U.card:ℝ)*ε+∑x∈U,a x := by + rw [integral_failureCount] + calc + _ ≤ ∑x∈U,((if x∈bad then (1:ℝ) else 0)+ε+a x) := by + apply Finset.sum_le_sum + intro x hx + by_cases hb : x∈bad + · simp only [hb,ite_true] + exact measureReal_le_one.trans (by linarith only [hε,ha x hx]) + · simp only [hb,ite_false,zero_add] + exact hprob x (Finset.mem_sdiff.mpr ⟨hx,hb⟩) + _ = ((U.filter fun x => x∈bad).card:ℝ)+(U.card:ℝ)*ε+∑x∈U,a x := by + rw [Finset.sum_add_distrib,Finset.sum_add_distrib] + simp only [Finset.sum_boole,Finset.sum_const,nsmul_eq_mul] + _ ≤ _ := by + have hc : ((U.filter fun x => x∈bad).card:ℝ)≤bad.card := Nat.cast_le.mpr + (Finset.card_le_card (fun x hx => (Finset.mem_filter.mp hx).2)) + linarith only [hc] + +omit [Countable Ω] [MeasurableSingletonClass Ω] in +theorem intersect_three_success (μ : Measure Ω) [IsProbabilityMeasure μ] + (A B C D : Set Ω) {a b c d : ℝ} (hA : a≤μ.real A) + (hB : μ.real B≤b) (hC : μ.real C≤c) (hD : μ.real D≤d) : + a-b-c-d≤μ.real (A\(B∪C∪D)) := by + have hsub : A⊆(A\(B∪C∪D))∪(B∪C∪D) := by + intro ω hω + by_cases h : ω∈B∪C∪D + · exact Or.inr h + · exact Or.inl ⟨hω,h⟩ + have hh := (measureReal_mono hsub (measure_ne_top _ _)).trans (measureReal_union_le (μ:=μ) _ _) + have hbc := measureReal_union_le (μ:=μ) B C + have hbcd := measureReal_union_le (μ:=μ) (B∪C) D + linarith only [hA,hB,hC,hD,hh,hbc,hbcd] + +end + +open MeasureTheory ProbabilityTheory +open scoped BigOperators Classical +variable {Ω : Type*} [MeasurableSpace Ω] [Countable Ω] [MeasurableSingletonClass Ω] + +theorem truncated_moment_tail (μ : Measure Ω) [IsProbabilityMeasure μ] + (f g : Ω→ℝ) {M t B : ℝ} (hf : ∀ω,|f ω|≤M) (hg : ∀ω,g ω=0 ∨ g ω=1) + {p : ℕ} (hp : Even p) (ht : 0 by rcases hg ω with h|h <;> simp [h] + have h1 := weighted_moment_tail μ f g hf hgr hp ht hB + have hi : (∫ω,1-g ω ∂μ)=μ.real {ω | g ω=0} := by + have he : (fun ω => 1-g ω)=({ω | g ω=0}).indicator (fun _ => (1:ℝ)) := by + funext ω + rcases hg ω with h|h <;> simp [h] + rw [he,integral_indicator_const (1:ℝ) (Set.to_countable _ |>.measurableSet)] + simp + have hs : {ω | t < |f ω|}⊆{ω | g ω=1 ∧ t < |f ω|}∪{ω | g ω=0} := by + intro ω hω + rcases hg ω with h|h + · exact Or.inr h + · exact Or.inl ⟨h,hω⟩ + exact ((measureReal_mono hs (measure_ne_top _ _)).trans (measureReal_union_le _ _)).trans + (by rw [hi];exact add_le_add h1 (le_refl _)) + +end SharpRamseyFive.PoissonScore + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/HighOrSmall.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/HighOrSmall.lean new file mode 100644 index 0000000000000000000000000000000000000000..a693f2b235070d770f68b21265b009e397d2e38d --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/HighOrSmall.lean @@ -0,0 +1,30 @@ +import Mathlib + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreScalars + +theorem high_or_small {q n a : ℝ} (_hq : 0 ≤ q) (_hn : 0 < n) (ha : 0 ≤ a) + (hhigh : 8388608*q^2 ≤ n) : + 2097152*q^2 ≤ n*a^2 ∨ n*a^99 ≤ q^2 := by + by_cases h : 2097152*q^2 ≤ n*a^2 + · exact Or.inl h + right + have hlt : n*a^2 < 2097152*q^2 := lt_of_not_ge h + have ha2 : a^2 < (1/2:ℝ)^2 := by + have := mul_le_mul_of_nonneg_right hhigh (sq_nonneg a) + nlinarith + have ha' : a ≤ 1/2 := by nlinarith + have hp := pow_le_pow_left₀ ha ha' 97 + calc + n*a^99 = (n*a^2)*a^97 := by ring + _ ≤ (2097152*q^2)*(1/2:ℝ)^97 := mul_le_mul hlt.le hp (pow_nonneg ha 97) (by positivity) + _ ≤ q^2 := by + have hc : (2097152:ℝ)*(1/2:ℝ)^97 ≤ 1 := by norm_num + nlinarith [mul_le_mul_of_nonneg_right hc (sq_nonneg q)] + +end SharpRamseyFive.ScoreScalars + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/IntegralForcedHits.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/IntegralForcedHits.lean new file mode 100644 index 0000000000000000000000000000000000000000..1522d633d0c1ded9c93c507ad0d8b4f5431dd9b4 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/IntegralForcedHits.lean @@ -0,0 +1,108 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.PoissonScore +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal Classical +variable {D : Type} [Fintype D] [DecidableEq D] + +omit [DecidableEq D] in +lemma integral_forcedHits_le (rate : D→ℝ≥0) {R : ℕ} (d : D) (T : Finset (Fin R)) : + (∫ ω,forcedHits d T ω ∂scheduleMeasure rate R) ≤ (rate d:ℝ)^T.card := by + have he (ω : Fin R→D→ℕ) : forcedHits d T ω = + ∏ r : Fin R,if r∈T then hitIndicator d (ω r) else 1 := by + simp only [Finset.prod_ite_mem,Finset.univ_inter,forcedHits] + simp_rw [he] + unfold scheduleMeasure + rw [integral_fintype_prod_eq_prod (f := fun r ω => if r∈T then hitIndicator d ω else 1)] + have he' (r : Fin R) : (∫ ω : D→ℕ,(if r∈T then hitIndicator d ω else 1) ∂batchMeasure rate) = + if r∈T then 1-Real.exp (-(rate d:ℝ)) else 1 := by + split_ifs <;> simp [integral_hitIndicator] + simp_rw [he'] + simp only [Finset.prod_ite_mem,Finset.univ_inter,Finset.prod_const] + exact pow_le_pow_left₀ (by have := Real.exp_le_one_iff.mpr (neg_nonpos.mpr (rate d).coe_nonneg); linarith) + (one_sub_exp_neg_le (rate d:ℝ)) _ + +omit [DecidableEq D] in +theorem overload_probability (rate : D→ℝ≥0) {R : ℕ} (s : Finset D) (J : ℕ) : + (scheduleMeasure rate R).real (overloaded s J) ≤ ∑ d∈s,((R:ℝ)*(rate d:ℝ))^J := by + have hint := integrable_schedule_of_abs_le (R := R) rate + ((overloaded s J).indicator (fun _ => (1:ℝ))) 1 (by + intro ω; by_cases he : ω∈overloaded s J <;> simp [he]) + have hf (d : D) (T : Finset (Fin R)) : Integrable (forcedHits d T) (scheduleMeasure rate R) := + integrable_schedule_of_abs_le rate _ 1 (fun ω => by + rw [abs_of_nonneg (forcedHits_nonneg d T ω)]; exact forcedHits_le_one d T ω) + have hset : MeasurableSet (overloaded s J : Set (Fin R→D→ℕ)) := Set.to_countable _ |>.measurableSet + have heq := integral_indicator_const (μ := scheduleMeasure rate R) (1:ℝ) hset + simp only [smul_eq_mul,mul_one] at heq + rw [←heq] + calc + _ ≤ ∫ ω,∑ d∈s,∑ T∈(Finset.univ : Finset (Fin R)).powersetCard J,forcedHits d T ω + ∂scheduleMeasure rate R := integral_mono hint + (integrable_finsetSum _ (fun d _ => integrable_finsetSum _ (fun T _ => hf d T))) + (overload_indicator_le_certificates s J) + _ = ∑ d∈s,∑ T∈(Finset.univ : Finset (Fin R)).powersetCard J, + ∫ ω,forcedHits d T ω ∂scheduleMeasure rate R := by + rw [integral_finsetSum _ (fun d _ => integrable_finsetSum _ (fun T _ => hf d T))] + apply Finset.sum_congr rfl + intro d hd + rw [integral_finsetSum _ (fun T _ => hf d T)] + _ ≤ ∑ d∈s,((R:ℝ)*(rate d:ℝ))^J := by + apply Finset.sum_le_sum + intro d hd + calc + _ ≤ ∑ _T∈(Finset.univ : Finset (Fin R)).powersetCard J,(rate d:ℝ)^J := + Finset.sum_le_sum fun T hT => by + simpa only [(Finset.mem_powersetCard.mp hT).2] using integral_forcedHits_le rate d T + _ = (R.choose J:ℝ)*(rate d:ℝ)^J := by simp + _ ≤ _ := by + rw [mul_pow] + apply mul_le_mul_of_nonneg_right _ (pow_nonneg (rate d).coe_nonneg _) + exact_mod_cast Nat.choose_le_pow R J + +end SharpRamseyFive.PoissonScore + +namespace SharpRamseyFive.HighMoment +open MeasureTheory ProbabilityTheory PoissonScore TupleComponents +open scoped BigOperators NNReal Classical +variable {D : Type} [Fintype D] [DecidableEq D] + +omit [DecidableEq D] in +lemma allTrunc_indicator (R J : ℕ) (ω : Fin R→D→ℕ) : + 1-allTrunc R J (Function.uncurry ω) = + (overloaded Finset.univ J).indicator (fun _ => (1:ℝ)) ω := by + by_cases he : ω∈(overloaded Finset.univ J : Set (Fin R→D→ℕ)) + · rw [Set.indicator_of_mem he] + obtain ⟨d,_,hd⟩ := he + have hz : allTrunc R J (Function.uncurry ω)=0 := by + apply Finset.prod_eq_zero (Finset.mem_univ d) + exact ite_eq_right (by exact not_lt.mpr hd) + rw [hz,sub_zero] + · rw [Set.indicator_of_notMem he] + have ho : allTrunc R J (Function.uncurry ω)=1 := by + apply Finset.prod_eq_one + intro d _ + apply ite_eq_left + by_contra hn + exact he ⟨d,Finset.mem_univ _,le_of_not_gt hn⟩ + rw [ho,sub_self] + +omit [DecidableEq D] in +theorem allTrunc_failure (rate : D→ℝ≥0) (R J : ℕ) : + (∫ ω,1-allTrunc R J ω ∂batchMeasure (fun p : Fin R×D => rate p.2)) ≤ + ∑ d : D,((R:ℝ)*(rate d:ℝ))^J := by + rw [←(measurePreserving_uncurry_schedule rate R).integral_comp' (fun ω => 1-allTrunc R J ω)] + change (∫ ω,1-allTrunc R J (Function.uncurry ω) ∂scheduleMeasure rate R) ≤ _ + simp_rw [allTrunc_indicator] + have hset : MeasurableSet (overloaded Finset.univ J : Set (Fin R→D→ℕ)) := Set.to_countable _ |>.measurableSet + rw [integral_indicator_const (1:ℝ) hset] + simp only [smul_eq_mul,mul_one] + exact overload_probability rate Finset.univ J + +end SharpRamseyFive.HighMoment + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/MeasurePreservingSplitSchedule.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/MeasurePreservingSplitSchedule.lean new file mode 100644 index 0000000000000000000000000000000000000000..243a54d6f93c061b6a7c99b781a759a87f2d6805 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/MeasurePreservingSplitSchedule.lean @@ -0,0 +1,224 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.PoissonScore +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal Classical +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +omit [DecidableEq ι] in +lemma measurePreserving_split_schedule (rate : ι→ℝ≥0) (p : ι→Prop) [DecidablePred p] + (R : ℕ) : + MeasurePreserving (fun ω : Fin R→ι→ℕ => + ((fun r (i : {i // p i}) => ω r i),(fun r (i : {i // ¬p i}) => ω r i))) + (scheduleMeasure rate R) + ((scheduleMeasure (fun i : {i // p i} => rate i) R).prod + (scheduleMeasure (fun i : {i // ¬p i} => rate i) R)) := by + have h1 := measurePreserving_pi (fun _ : Fin R => batchMeasure rate) + (fun _ : Fin R => (batchMeasure (fun i : {i // p i} => rate i)).prod + (batchMeasure (fun i : {i // ¬p i} => rate i))) + (fun _ => measurePreserving_piEquivPiSubtypeProd (fun i => poissonMeasure (rate i)) p) + exact (measurePreserving_arrowProdEquivProdArrow ({i // p i}→ℕ) ({i // ¬p i}→ℕ) + (Fin R) (fun _ => batchMeasure (fun i : {i // p i} => rate i)) + (fun _ => batchMeasure (fun i : {i // ¬p i} => rate i))).comp h1 + +omit [DecidableEq ι] in +lemma integral_split_schedule (rate : ι→ℝ≥0) (p : ι→Prop) [DecidablePred p] + {R : ℕ} (F : (Fin R→{i // p i}→ℕ)→(Fin R→{i // ¬p i}→ℕ)→ℝ) + (M : ℝ) (hM : ∀ u v,|F u v|≤M) : + (∫ ω,F (fun r i => ω r i) (fun r i => ω r i) ∂scheduleMeasure rate R) = + ∫ u,∫ v,F u v ∂scheduleMeasure (fun i : {i // ¬p i} => rate i) R + ∂scheduleMeasure (fun i : {i // p i} => rate i) R := by + let μ := scheduleMeasure (fun i : {i // p i} => rate i) R + let ν := scheduleMeasure (fun i : {i // ¬p i} => rate i) R + let G : (Fin R→{i // p i}→ℕ)×(Fin R→{i // ¬p i}→ℕ)→ℝ := fun z => F z.1 z.2 + have hG : Integrable G (μ.prod ν) := by + apply Integrable.of_bound (measurable_of_countable G).aestronglyMeasurable M + exact Filter.Eventually.of_forall fun z => by + simpa only [Real.norm_eq_abs] using hM z.1 z.2 + calc + _ = ∫ z,G z ∂μ.prod ν := + (measurePreserving_split_schedule rate p R).hasLaw.integral_comp + (measurable_of_countable G).aestronglyMeasurable + _ = _ := integral_prod G hG + +omit [DecidableEq ι] in +lemma integral_split_schedule_le (rate : ι→ℝ≥0) (p : ι→Prop) [DecidablePred p] + {R : ℕ} (F : (Fin R→{i // p i}→ℕ)→(Fin R→{i // ¬p i}→ℕ)→ℝ) + (M B : ℝ) (hM : ∀ u v,|F u v|≤M) + (hB : ∀ u,(∫ v,F u v ∂scheduleMeasure (fun i : {i // ¬p i} => rate i) R)≤B) : + (∫ ω,F (fun r i => ω r i) (fun r i => ω r i) ∂scheduleMeasure rate R)≤B := by + rw [integral_split_schedule rate p F M hM] + have hG : Integrable (fun z : (Fin R→{i // p i}→ℕ)×(Fin R→{i // ¬p i}→ℕ) => F z.1 z.2) + ((scheduleMeasure (fun i : {i // p i} => rate i) R).prod + (scheduleMeasure (fun i : {i // ¬p i} => rate i) R)) := by + apply Integrable.of_bound (measurable_of_countable _).aestronglyMeasurable M + exact Filter.Eventually.of_forall fun z => by + simpa only [Real.norm_eq_abs] using hM z.1 z.2 + calc + _ ≤ ∫ _u : Fin R→{i // p i}→ℕ,B ∂scheduleMeasure (fun i : {i // p i} => rate i) R := + integral_mono hG.integral_prod_left (integrable_const B) hB + _ = B := by simp + +end SharpRamseyFive.PoissonScore + +namespace SharpRamseyFive.ScoreAcceptance +open scoped BigOperators Classical +variable {V H : Type*} [DecidableEq V] [DecidableEq H] + +noncomputable def empty (s : Finset V) (ω : V → ℕ) : Bool := + decide (∀ x∈s,ω x=0) + +lemma empty_union (s t : Finset V) (ω : V → ℕ) : + empty (s ∪ t) ω = (empty s ω && empty t ω) := by + simp [empty,or_imp,forall_and] + +noncomputable def factor (own outside : Bool) (b : ℝ) : ℝ := + (if own then 1 else 0)*((if outside then 1 else 0)-b) + +lemma abs_factor_le_one (a c : Bool) (b : ℝ) (hb : b∈Set.Icc (0:ℝ) 1) : + |factor a c b| ≤ 1 := by + rcases hb with ⟨hb0,hb1⟩ + cases a <;> cases c <;> simp [factor,abs_of_nonneg,sub_nonneg.mpr hb1,hb0,hb1] + +lemma abs_factor_of_nonempty (a c : Bool) (b : ℝ) (hb : 0≤b) + (h : (a && c)=false) : |factor a c b| ≤ b := by + cases a <;> cases c <;> simp_all [factor,abs_of_nonneg] + +noncomputable def term {R : ℕ} (S O A : Finset V) (b : ℝ) (ω : Fin R → V → ℕ) : ℝ := + ∏ r,factor (empty (O ∩ A) (ω r)) (empty ((S \ O) ∩ A) (ω r)) b + +noncomputable def allEmpty {R : ℕ} (S A : Finset V) (ω : Fin R → V → ℕ) : Prop := + ∀ r,empty (S ∩ A) (ω r)=true + +lemma own_split (S O A : Finset V) (hO : O⊆S) : + (O ∩ A) ∪ ((S \ O) ∩ A) = S ∩ A := by + ext x + simp only [Finset.mem_union,Finset.mem_inter,Finset.mem_sdiff] + constructor + · rintro (h|h) + · exact ⟨hO h.1,h.2⟩ + · exact ⟨h.1.1,h.2⟩ + · rintro ⟨hs,ha⟩ + by_cases hx : x∈O + · exact Or.inl ⟨hx,ha⟩ + · exact Or.inr ⟨⟨hs,hx⟩,ha⟩ + +lemma term_empty {R : ℕ} (S O A : Finset V) (hO : O⊆S) (b : ℝ) + (ω : Fin R → V → ℕ) (h : allEmpty S A ω) : term S O A b ω=(1-b)^R := by + have hf (r : Fin R) : factor (empty (O ∩ A) (ω r)) + (empty ((S \ O) ∩ A) (ω r)) b=1-b := by + have hr := h r + rw [←own_split S O A hO,empty_union] at hr + have hh : empty (O ∩ A) (ω r)=true ∧ empty ((S \ O) ∩ A) (ω r)=true := by + simpa using hr + obtain ⟨h1,h2⟩ := hh + simp [factor,h1,h2] + simp only [term,hf,Finset.prod_const,Finset.card_univ,Fintype.card_fin] + +lemma term_nonempty {R : ℕ} (S O A : Finset V) (hO : O⊆S) (b : ℝ) + (hb : b∈Set.Icc (0:ℝ) 1) (ω : Fin R → V → ℕ) (h : ¬allEmpty S A ω) : + |term S O A b ω| ≤ b := by + obtain ⟨r,hr⟩ : ∃ r,empty (S ∩ A) (ω r)≠true := not_forall.mp h + have hr' : (empty (O ∩ A) (ω r) && empty ((S \ O) ∩ A) (ω r))=false := by + rw [←empty_union,own_split S O A hO] + exact Bool.eq_false_iff.mpr hr + unfold term + rw [Finset.abs_prod] + calc + _ ≤ ∏ s : Fin R,if s=r then b else 1 := by + apply Finset.prod_le_prod₀ (fun _ _ => abs_nonneg _) + intro s _ + by_cases hs : s=r + · subst s + simp only [ite_true] + exact abs_factor_of_nonempty _ _ b hb.1 hr' + · simp only [ite_eq_right hs] + exact abs_factor_le_one _ _ b hb + _ = b := by simp + +noncomputable def emptyFamily {R : ℕ} (E : Finset H) (planes : H → Finset V) + (S : Finset V) (ω : Fin R → V → ℕ) : Finset H := + E.filter fun h => allEmpty S (planes h) ω + +omit [DecidableEq H] in + +theorem exceptional_error {R : ℕ} (E : Finset H) (planes : H → Finset V) + (S O : Finset V) (hO : O⊆S) (b : ℝ) (hb : b∈Set.Icc (0:ℝ) 1) + (ω : Fin R → V → ℕ) : + |(∑ h∈E,term S O (planes h) b ω)- + (1-b)^R*(emptyFamily E planes S ω).card| ≤ b*E.card := by + have he : (1-b)^R*(emptyFamily E planes S ω).card = + ∑ h∈E,if allEmpty S (planes h) ω then (1-b)^R else 0 := by + rw [←Finset.sum_filter] + simp [emptyFamily,mul_comm] + rw [he,←Finset.sum_sub_distrib] + calc + _ ≤ ∑ h∈E,|term S O (planes h) b ω- + (if allEmpty S (planes h) ω then (1-b)^R else 0)| := Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ _h∈E,b := by + apply Finset.sum_le_sum + intro h _ + by_cases hz : allEmpty S (planes h) ω + · simp only [ite_eq_left hz,term_empty S O (planes h) hO b ω hz,sub_self,abs_zero] + exact hb.1 + · simp only [ite_eq_right hz,sub_zero] + exact term_nonempty S O (planes h) hO b hb ω hz + _ = _ := by simp [mul_comm] + +lemma training_separation (zq c zx err typ : ℝ) (hz : 0 x∈sampled ∨ A x hn (Finset.mem_union_left _ h) + have hb : x∉bad := fun h => hn (Finset.mem_union_right _ h) + exact (not_lt_of_ge (hgood x (Finset.mem_sdiff.mpr ⟨hxU,hb⟩) hs)) hA + +end SharpRamseyFive.ScoreAcceptance + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/MeasurePublicTable.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/MeasurePublicTable.lean new file mode 100644 index 0000000000000000000000000000000000000000..0a876fae5f4978ad2df20b9a017279db891f893b --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/MeasurePublicTable.lean @@ -0,0 +1,81 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.MeasurePublicTable +open MeasureTheory ProbabilityTheory +open scoped BigOperators Classical +variable {α : Type*} + +noncomputable def firstIndex (E : Set α) {N : ℕ} (t : Fin N→α) : Option (Fin N) := + if h : (Finset.univ.filter (fun i=>t i∈E)).Nonempty then + some ((Finset.univ.filter (fun i=>t i∈E)).min' h) else none + +lemma firstIndex_none_iff (E : Set α) {N : ℕ} (t : Fin N→α) : + firstIndex E t=none ↔ ∀i,t i∉E := by + unfold firstIndex + split_ifs with h + · simp only [false_iff] + simpa only [Finset.nonempty_def,Finset.mem_filter,Finset.mem_univ,true_and,not_forall,not_not] using h + · simp only [true_iff] + simpa only [Finset.not_nonempty_iff_eq_empty,Finset.filter_eq_empty_iff,Finset.mem_univ,true_implies] using h + +lemma firstIndex_some_mem (E : Set α) {N : ℕ} (t : Fin N→α) {i : Fin N} + (hi : firstIndex E t=some i) : t i∈E := by + unfold firstIndex at hi + split_ifs at hi with h + · have he := Option.some.inj hi + have hm := Finset.min'_mem (Finset.univ.filter (fun i=>t i∈E)) h + rw [he] at hm + exact (Finset.mem_filter.mp hm).2 + +lemma firstIndex_minimal (E : Set α) {N : ℕ} (t : Fin N→α) {i : Fin N} + (hi : firstIndex E t=some i) : ∀ j, j < i → t j∉E := by + unfold firstIndex at hi + split_ifs at hi with h + · have he := Option.some.inj hi + intro j hj hE + have hh := Finset.min'_le (Finset.univ.filter (fun i=>t i∈E)) j (Finset.mem_filter.mpr ⟨Finset.mem_univ _,hE⟩) + rw [he] at hh + exact (not_le_of_gt hj) hh + +variable [MeasurableSpace α] + +lemma firstIndex_failure_mass (μ : Measure α) [IsProbabilityMeasure μ] + (E : Set α) (hE : MeasurableSet E) (N : ℕ) : + (Measure.pi (fun _ : Fin N=>μ)).real {t | firstIndex E t=none}=(1-μ.real E)^N := by + have he : {t : Fin N→α | firstIndex E t=none}=Set.univ.pi (fun _=>Eᶜ) := by + ext t + simp only [Set.mem_ofPred_eq,firstIndex_none_iff,Set.mem_univ_pi,Set.mem_compl_iff] + rw [he,measureReal_def,Measure.pi_pi,ENNReal.toReal_prod] + simp only [Finset.prod_const,Finset.card_univ,Fintype.card_fin] + rw [←measureReal_def,measureReal_compl hE] + simp + +lemma firstIndex_failure_le (μ : Measure α) [IsProbabilityMeasure μ] + (E : Set α) (hE : MeasurableSet E) (N : ℕ) {p : ℝ} (hp : p≤μ.real E) : + (Measure.pi (fun _ : Fin N=>μ)).real {t | firstIndex E t=none}≤Real.exp (-p*N) := by + rw [firstIndex_failure_mass μ E hE N] + have hbase : 1-μ.real E≤Real.exp (-p) := by + have hh := Real.add_one_le_exp (-p) + linarith + calc + _ ≤ (Real.exp (-p))^N := pow_le_pow_left₀ (sub_nonneg.mpr (measureReal_le_one)) hbase N + _ = _ := by rw [←Real.exp_nat_mul];congr 1;ring + +theorem finite_cutoff_failure (μ : Measure α) [IsProbabilityMeasure μ] + (E : Set α) (hE : MeasurableSet E) {A q : ℝ} (_hq : 0≤q) (N : ℕ) + (hp : Real.exp (-A)≤μ.real E) (hN : q*Real.exp A≤N) : + (Measure.pi (fun _ : Fin N=>μ)).real {t | firstIndex E t=none}≤Real.exp (-q) := by + apply (firstIndex_failure_le μ E hE N hp).trans + apply Real.exp_le_exp.mpr + have hh := mul_le_mul_of_nonneg_left hN (Real.exp_nonneg (-A)) + have he : Real.exp (-A)*(q*Real.exp A)=q := by + rw [mul_left_comm,←Real.exp_add] + simp + rw [he] at hh + linarith + +end SharpRamseyFive.MeasurePublicTable + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/MomentTailRatio.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/MomentTailRatio.lean new file mode 100644 index 0000000000000000000000000000000000000000..a93d13f9cdbb3e56b1db59c6803932a5cccc55a2 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/MomentTailRatio.lean @@ -0,0 +1,72 @@ +import Mathlib + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreScalars + +lemma moment_tail_ratio {B κ α P : ℝ} (hB : 0 Incident y H) (B.filter fun y => Incident y H) + have he' : (((A∪B).filter fun y => Incident y H).card:ℝ)+ + ((A∩B).filter fun y => Incident y H).card = + (A.filter fun y => Incident y H).card+(B.filter fun y => Incident y H).card := by + rw [Finset.filter_union,Finset.filter_inter_distrib] + exact_mod_cast he + unfold cellMass + linear_combination δ*he' + +lemma filter_sdiff_eq {α : Type*} [DecidableEq α] (S O : Finset α) + (p : α→Prop) [DecidablePred p] : (S\O).filter p = S.filter p\O.filter p := by + ext y + simp only [Finset.mem_filter,Finset.mem_sdiff] + tauto + +lemma cellMass_sdiff {S O : Finset (ℙ K V)} (hOS : O ⊆ S) (δ : ℝ) + (H : ℙ K (Dual K V)) : cellMass (S\O) δ H = cellMass S δ H-cellMass O δ H := by + have he := Finset.card_sdiff_add_card_eq_card (Finset.filter_subset_filter (fun y => Incident y H) hOS) + have he' : (((S\O).filter fun y => Incident y H).card:ℝ)+ + (O.filter fun y => Incident y H).card = (S.filter fun y => Incident y H).card := by + rw [filter_sdiff_eq] + exact_mod_cast he + unfold cellMass + linear_combination δ*he' + +lemma cellMass_erase (S : Finset (ℙ K V)) (x : ℙ K V) {δ : ℝ} (hδ : 0 ≤ δ) + (H : ℙ K (Dual K V)) : + 0 ≤ cellMass S δ H-cellMass (S\{x}) δ H ∧ + cellMass S δ H-cellMass (S\{x}) δ H ≤ δ := by + have hl := cellMass_mono (Finset.sdiff_subset : S\{x} ⊆ S) hδ H + have hc : (S.filter fun y => Incident y H).card ≤ + ((S\{x}).filter fun y => Incident y H).card+1 := by + rw [filter_sdiff_eq] + have h := Finset.card_le_card_sdiff_add_card (s:=S.filter fun y => Incident y H) + (t:=({x}:Finset (ℙ K V)).filter fun y => Incident y H) + have h1 : (({x}:Finset (ℙ K V)).filter fun y => Incident y H).card ≤ 1 := + (Finset.card_filter_le ..).trans_eq (Finset.card_singleton x) + omega + have hc' : ((S.filter fun y => Incident y H).card:ℝ) ≤ + ((S\{x}).filter fun y => Incident y H).card+1 := by exact_mod_cast hc + constructor + · exact sub_nonneg.mpr hl + · have hm := mul_le_mul_of_nonneg_left hc' hδ + unfold cellMass + nlinarith only [hm] + +variable [Finite K] [Fintype (ℙ K (Dual K V))] + +omit [Finite K] in +lemma typical_deviation {J : Type*} [Fintype J] (S : Finset (ℙ K V)) + (C : J→Finset (ℙ K V)) {H : ℙ K (Dual K V)} (hH : H∉exceptional S C) + (j : Option J) : |deviation S C j H| ≤ threshold j := by + by_contra hn + exact hH (Finset.mem_filter.mpr ⟨Finset.mem_univ _,j,lt_of_not_ge hn⟩) + +noncomputable def ownFraction (S A B : Finset (ℙ K V)) : ℝ := + ((A∪B).card:ℝ)/(S.card:ℝ) + +noncomputable def outsideMass (S O : Finset (ℙ K V)) (x : ℙ K V) (H : ℙ K (Dual K V)) : ℝ := + cellMass (S\(O∪{x})) ((Nat.card K:ℝ)/S.card) H + +noncomputable def queryLoss (S O : Finset (ℙ K V)) (x : ℙ K V) (H : ℙ K (Dual K V)) : ℝ := + cellMass (S\O) ((Nat.card K:ℝ)/S.card) H-outsideMass S O x H + +omit [Finite K] [Fintype (ℙ K (Dual K V))] in +lemma queryLoss_bounds (S O : Finset (ℙ K V)) (x : ℙ K V) (H : ℙ K (Dual K V)) : + 0 ≤ queryLoss S O x H ∧ queryLoss S O x H ≤ (Nat.card K:ℝ)/S.card := by + have h := cellMass_erase (S\O) x (show 0 ≤ (Nat.card K:ℝ)/S.card by positivity) H + have he : (S\O)\{x}=S\(O∪{x}) := by + ext y + simp only [Finset.mem_sdiff,Finset.mem_union] + tauto + simpa only [queryLoss,outsideMass,he] using h + +omit [Finite K] [Fintype (ℙ K (Dual K V))] in +lemma outsideMass_deviation {J : Type*} [Fintype J] (S : Finset (ℙ K V)) + (C : J→Finset (ℙ K V)) (hS : S.Nonempty) (a b c : J) + (ha : C a ⊆ S) (hb : C b ⊆ S) (hc : C c=C a∩C b) + (x : ℙ K V) (H : ℙ K (Dual K V)) : + outsideMass S (C a∪C b) x H-(1-ownFraction S (C a) (C b)) = + deviation S C none H-deviation S C (some a) H-deviation S C (some b) H+ + deviation S C (some c) H-queryLoss S (C a∪C b) x H := by + have hn : (S.card:ℝ)≠0 := by exact_mod_cast hS.card_pos.ne' + have hmass := cellMass_sdiff (Finset.union_subset ha hb) ((Nat.card K:ℝ)/S.card) H + rw [cellMass_union] at hmass + have hcard : ((C a∪C b).card:ℝ)+((C a∩C b).card:ℝ)=(C a).card+(C b).card := by + exact_mod_cast Finset.card_union_add_card_inter (C a) (C b) + simp only [deviation,familyCell,queryLoss,ownFraction,div_self hn,hc] + rw [hmass] + have hs := congrArg (fun z : ℝ => z/(S.card:ℝ)) hcard + simp only [add_div] at hs + linarith only [hs] + +omit [Finite K] in + +theorem typical_mass_bounds {J : Type*} [Fintype J] (S : Finset (ℙ K V)) + (C : J→Finset (ℙ K V)) (hS : S.Nonempty) (a b c : J) + (ha : C a ⊆ S) (hb : C b ⊆ S) (hc : C c=C a∩C b) + (x : ℙ K V) {H : ℙ K (Dual K V)} (hH : H∉exceptional S C) + (hf : ownFraction S (C a) (C b) ≤ 2/25) + (hn : (Nat.card K:ℝ)/S.card ≤ 1/100) : + 3/4 ≤ outsideMass S (C a∪C b) x H ∧ + |outsideMass S (C a∪C b) x H-(1-ownFraction S (C a) (C b))| ≤ 17/100 ∧ + outsideMass S (C a∪C b) x H ≤ 11/10 := by + have h0 := typical_deviation S C hH none + have h1 := typical_deviation S C hH (some a) + have h2 := typical_deviation S C hH (some b) + have h3 := typical_deviation S C hH (some c) + simp only [threshold,abs_le] at h0 h1 h2 h3 + have hl := queryLoss_bounds S (C a∪C b) x H + have he := outsideMass_deviation S C hS a b c ha hb hc x H + have hmass : outsideMass S (C a∪C b) x H ≤ cellMass S ((Nat.card K:ℝ)/S.card) H := + cellMass_mono Finset.sdiff_subset (by positivity) H + have hbase : deviation S C none H=cellMass S ((Nat.card K:ℝ)/S.card) H-1 := by + simp only [deviation,familyCell,div_self (show (S.card:ℝ)≠0 by exact_mod_cast hS.card_pos.ne')] + rw [hbase] at h0 + refine ⟨?_,⟨?_,?_⟩⟩ + · linarith + · rw [abs_le]; constructor <;> linarith + · linarith + +end + +open Module ProjectiveIncidence CellVariance PencilRegularity +open scoped BigOperators LinearAlgebra.Projectivization Classical +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +omit [Finite K] [FiniteDimensional K V] in +lemma typical_variance_component {d : ℕ} {J : Type*} [Fintype J] + (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) (x : ℙ K V) + (F : Finset (ℙ K (Dual K V))) + (hF : ∀ H∈F,Incident x H ∧ H∉exceptional S C) {ξ : ℝ} + (hx : x∉irregular (d:=d) S C ξ) (j : Option J) : + (∑ H : F,(deviation S C j H.val)^2) ≤ scale (K:=K) d S.card*Real.exp ξ := by + have hr : weightOnPencil (clippedWeight S C (some j)) x ≤ scale (K:=K) d S.card*Real.exp ξ := by + by_contra hn + exact hx (Finset.mem_filter.mpr ⟨Finset.mem_univ _,some j,lt_of_not_ge hn⟩) + have he : (∑ H : F,(deviation S C j H.val)^2)= + ∑ H∈F,incidenceEntry x H*clippedWeight S C (some j) H := by + rw [Finset.sum_coe_sort F (fun H => (deviation S C j H)^2)] + apply Finset.sum_congr rfl + intro H hH + have hd := typical_deviation S C (hF H hH).2 j + have ht : threshold j ≤ 1 := by cases j <;> norm_num [threshold] + have hs : (deviation S C j H)^2 ≤ 1 := by + have ha := abs_nonneg (deviation S C j H) + have hb := hd.trans ht + nlinarith [sq_abs (deviation S C j H)] + simp only [incidenceEntry,ite_eq_left (hF H hH).1,clippedWeight,min_eq_right hs,one_mul] + rw [he] + apply le_trans _ hr + apply Finset.sum_le_sum_of_subset_of_nonneg (Finset.subset_univ _) + intro H _ _ + have hw := (clippedWeight_bounds S C (some j) H).1 + by_cases h : Incident x H <;> simp [incidenceEntry,h,hw] + +lemma Q_le_two_pow (q k : ℕ) (hq : 2≤q) : (Q q k:ℝ) ≤ 2*(q:ℝ)^k-1 := by + induction k with + | zero => norm_num [Q] + | succ k ih => + have he : (Q q (k+1):ℝ)=(Q q k:ℝ)+(q:ℝ)^(k+1) := by + unfold Q + rw [Finset.sum_range_succ,Nat.cast_add,Nat.cast_pow] + rw [he,pow_succ] + have hq' : (2:ℝ)≤q := by exact_mod_cast hq + have hp := pow_nonneg (Nat.cast_nonneg q : (0:ℝ)≤q) k + nlinarith [mul_nonneg hp (sub_nonneg.mpr hq')] + +omit [Fintype (ℙ K V)] in +lemma typical_pencil_card {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (x : ℙ K V) (F : Finset (ℙ K (Dual K V))) + (hF : ∀ H∈F,Incident x H) : (F.card:ℝ) ≤ 2*(Nat.card K:ℝ)^(d-1) := by + have hf : F ⊆ Finset.univ.filter (Incident x) := fun H hH => + Finset.mem_filter.mpr ⟨Finset.mem_univ _,hF H hH⟩ + have he : (Finset.univ.filter (Incident x)).card=Q (Nat.card K) (d-1) := by + rw [←Fintype.card_subtype,←Nat.card_eq_fintype_card,card_hyperplanes_through_point,hdim] + unfold Q + congr 1 + congr 1 + omega + have hc : (F.card:ℝ)≤Q (Nat.card K) (d-1) := by exact_mod_cast (Finset.card_le_card hf).trans_eq he + have hq : 2≤Nat.card K := Finite.one_lt_card (α:=K) + linarith [Q_le_two_pow (Nat.card K) (d-1) hq] + +omit [Fintype (ℙ K V)] in +lemma queryLoss_square_sum {d : ℕ} (hdim : finrank K V=d+1) (hd : 1≤d) + (S O : Finset (ℙ K V)) (hS : S.Nonempty) (x : ℙ K V) + (F : Finset (ℙ K (Dual K V))) (hF : ∀ H∈F,Incident x H) + (hn : (Nat.card K:ℝ)/S.card ≤ 1) : + (∑ H : F,(queryLoss S O x H.val)^2) ≤ 2*scale (K:=K) d S.card := by + have hn0 : (0:ℝ) (hF H hH).1) hn + have hB := scale_nonneg (K:=K) d (S.card:ℝ) (Nat.cast_nonneg _) + have he : 1≤Real.exp ξ := Real.one_le_exp_iff.mpr hξ + have hs : (∑ H : F,(outsideMass S (C a∪C b) x H.val-(1-ownFraction S (C a) (C b)))^2) ≤ + 8*((∑ H : F,(deviation S C none H.val)^2)+ + (∑ H : F,(deviation S C (some a) H.val)^2)+ + (∑ H : F,(deviation S C (some b) H.val)^2)+ + (∑ H : F,(deviation S C (some c) H.val)^2))+ + 2*∑ H : F,(queryLoss S (C a∪C b) x H.val)^2 := by + simp only [Finset.mul_sum,←Finset.sum_add_distrib] + apply Finset.sum_le_sum + intro H _ + rw [outsideMass_deviation S C hS a b c ha hb hc x H.val] + have h4 := four_sq (deviation S C none H.val) (deviation S C (some a) H.val) + (deviation S C (some b) H.val) (deviation S C (some c) H.val) + nlinarith [sq_nonneg (deviation S C none H.val-deviation S C (some a) H.val- + deviation S C (some b) H.val+deviation S C (some c) H.val+ + queryLoss S (C a∪C b) x H.val)] + have hb' := mul_le_mul_of_nonneg_left he hB + nlinarith only [hs,hv none,hv (some a),hv (some b),hv (some c),hl,hb',hB] + +end SharpRamseyFive.ScoreRegularity + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/PencilFactor.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/PencilFactor.lean new file mode 100644 index 0000000000000000000000000000000000000000..0abcccd2dd504459a8f0d550c91e6c04fcfbbf33 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/PencilFactor.lean @@ -0,0 +1,77 @@ +import Mathlib + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.ScoreScalars + +lemma pencil_factor {q : ℝ} (hq : 1 ≤ q) : + (q^2+q+1)^2 ≤ 9*q^4 ∧ (q+1)^2 ≤ 4*q^2 := by + have hq0 : 0 ≤ q := le_trans (by norm_num) hq + have hq2 : q ≤ q^2 := by nlinarith + have hp : q^2+q+1 ≤ 3*q^2 := by nlinarith + have hs := pow_le_pow_left₀ (by positivity : (0:ℝ) ≤ q^2+q+1) hp 2 + have ht := pow_le_pow_left₀ (by positivity : (0:ℝ) ≤ q+1) (by linarith : q+1 ≤ 2*q) 2 + constructor <;> nlinarith + +theorem pair_power_two_hundred {q n δ N a χ E : ℝ} + (hq : 1 ≤ q) (hn : 0 pow_nonneg (by positivity) _) + (fun i _ => pow_le_pow_left₀ (by positivity) (hD i) _) + have hn : (0:ℝ)<∏i,((ω i).factorial:ℝ) := Finset.prod_pos fun _ _ => Nat.cast_pos.mpr (Nat.factorial_pos _) + calc + _ = (Real.exp (-(∑i,(trueRate i:ℝ)))* + (Real.exp (-D*(∑i,ω i))*(∏i,(trueRate i:ℝ)^(ω i))))/(∏i,(ω i).factorial:ℝ) := by ring + _ ≤ _ := div_le_div_of_nonneg_right (mul_le_mul_of_nonneg_left hp (Real.exp_nonneg _)) hn.le + +lemma real_event_domination {α : Type*} [MeasurableSpace α] [Countable α] + [MeasurableSingletonClass α] (μ ν : Measure α) [IsFiniteMeasure μ] [IsFiniteMeasure ν] + (E : Set α) (hE : MeasurableSet E) {a : ℝ} (ha : 0≤a) + (h : ∀x∈E,a*μ.real {x}≤ν.real {x}) : a*μ.real E≤ν.real E := by + have hh (x : α) : ENNReal.ofReal a*E.indicator (fun y => μ {y}) x≤ + E.indicator (fun y => ν {y}) x := by + by_cases hx : x∈E + · simp only [Set.indicator_of_mem hx] + have he := ENNReal.ofReal_le_ofReal (h x hx) + simpa only [ENNReal.ofReal_mul ha,ofReal_measureReal (measure_ne_top μ {x}),ofReal_measureReal (measure_ne_top ν {x})] using he + · simp [Set.indicator_of_notMem hx] + have ht := ENNReal.tsum_le_tsum hh + rw [ENNReal.tsum_mul_left,Measure.tsum_indicator_apply_singleton μ E hE, + Measure.tsum_indicator_apply_singleton ν E hE] at ht + have hr := ENNReal.toReal_mono (measure_ne_top ν E) ht + simpa only [ENNReal.toReal_mul,ENNReal.toReal_ofReal ha,measureReal_def] using hr + +omit [DecidableEq ι] in +theorem batch_event_likelihood (proposal trueRate : ι→ℝ≥0) + (htotal : (∑i,(proposal i:ℝ))=∑i,(trueRate i:ℝ)) + {D K : ℝ} (hD : 0≤D) (hrate : ∀i,Real.exp (-D)*(trueRate i:ℝ)≤proposal i) + (E : Set (ι→ℕ)) (hsize : ∀ω∈E,(∑i,ω i:ℕ)≤K) : + Real.exp (-D*K)*(batchMeasure trueRate).real E≤(batchMeasure proposal).real E := by + apply real_event_domination _ _ E (by exact Set.to_countable E |>.measurableSet) (Real.exp_nonneg _) + intro ω hω + apply le_trans _ (batch_singleton_likelihood proposal trueRate htotal hrate ω) + apply mul_le_mul_of_nonneg_right _ measureReal_nonneg + exact Real.exp_le_exp.mpr (by nlinarith only [hsize ω hω,hD]) + +end SharpRamseyFive.PoissonScore + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/PoissonProposal.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/PoissonProposal.lean new file mode 100644 index 0000000000000000000000000000000000000000..03247c4d760a464dd943e806c541f2b14e0fad5b --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/PoissonProposal.lean @@ -0,0 +1,164 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Probability.MeasurePreservingSplitSchedule +import OAI.Combinatorics.RamseyFive.Probability.SumPoissonPow +import OAI.Combinatorics.RamseyFive.Probability.PoissonLikelihood + +namespace OAI + +namespace SharpRamseyFive.PoissonScore + +section +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal Classical +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +omit [DecidableEq ι] in +lemma schedule_event_likelihood (proposal trueRate : ι→ℝ≥0) + (htotal : (∑i,(proposal i:ℝ))=∑i,(trueRate i:ℝ)) + {D K : ℝ} (hD : 0≤D) (hrate : ∀i,Real.exp (-D)*(trueRate i:ℝ)≤proposal i) + (R : ℕ) (E : Set (Fin R→ι→ℕ)) (hsize : ∀ω∈E,(sampleCount ω:ℝ)≤K) : + Real.exp (-D*K)*(scheduleMeasure trueRate R).real E≤(scheduleMeasure proposal R).real E := by + have hh := batch_event_likelihood (fun p : Fin R×ι=>proposal p.2) (fun p : Fin R×ι=>trueRate p.2) + (by simp only [Fintype.sum_prod_type,Finset.sum_const,Finset.card_univ,Fintype.card_fin,nsmul_eq_mul];rw [htotal]) + hD (fun p=>hrate p.2) {ω | Function.curry ω∈E} (by + intro ω hω + simpa only [sampleCount,Fintype.sum_prod_type,Function.curry] using hsize (Function.curry ω) hω) + have ht := (measurePreserving_uncurry_schedule trueRate R).hasLaw.measureReal_eq + (p:=fun ω=>Function.curry ω∈E) (Set.to_countable _ |>.measurableSet) + have hp := (measurePreserving_uncurry_schedule proposal R).hasLaw.measureReal_eq + (p:=fun ω=>Function.curry ω∈E) (Set.to_countable _ |>.measurableSet) + simpa only [Function.curry_uncurry] using (ht▸hp▸hh) + +theorem uniform_schedule_likelihood (H : Finset ι) (hH : H.Nonempty) + (rho : ℝ≥0) (R : ℕ) (K : ℝ) (E : Set (Fin R→ι→ℕ)) + (hsize : ∀ω∈E,(sampleCount ω:ℝ)≤K) : + Real.exp (-Real.log ((Fintype.card ι:ℝ)/H.card)*K)* + (scheduleMeasure (fun i=>if i∈H then rho/(H.card:ℝ≥0) else 0) R).real E≤ + (scheduleMeasure (fun _ : ι=>rho/(Fintype.card ι:ℝ≥0)) R).real E := by + have hH0 : (0:ℝ)ω r i)∈E} + +lemma measurePreserving_restrict_schedule (H : Finset ι) (rho : ℝ≥0) (R : ℕ) : + MeasurePreserving (fun ω : Fin R→ι→ℕ=>fun r (i : H)=>ω r i) + (scheduleMeasure (fun i=>if i∈H then rho else 0) R) + (scheduleMeasure (fun _ : H=>rho) R) := by + have h := measurePreserving_fst.comp + (measurePreserving_split_schedule (fun i=>if i∈H then rho else 0) (fun i=>i∈H) R) + convert h using 1 <;> try rfl + congr 1 + · exact Subsingleton.elim _ _ + · funext i + exact (ite_eq_left i.prop).symm + +lemma ae_zero_outside_schedule (H : Finset ι) (rho : ℝ≥0) (R : ℕ) : + ∀ᵐω∂scheduleMeasure (fun i=>if i∈H then rho else 0) R,∀r i,i∉H → ω r i=0 := by + apply ae_all_iff.mpr + intro r + apply ae_all_iff.mpr + intro i + by_cases hi : i∈H + · exact Filter.Eventually.of_forall fun _ h=>False.elim (h hi) + · have h := (hasLaw_coordinate (fun i=>if i∈H then rho else 0) i).comp + (measurePreserving_eval (fun _ : Fin R=>batchMeasure (fun i=>if i∈H then rho else 0)) r).hasLaw + simp only [ite_eq_right hi,poisson_zero] at h + filter_upwards [h.ae_eq_of_dirac] with ω hω + exact fun _=>hω + +lemma ambientSuccess_true_mass (H : Finset ι) (rho : ℝ≥0) (R : ℕ) + (E : Set (Fin R→H→ℕ)) : + (scheduleMeasure (fun i=>if i∈H then rho else 0) R).real (ambientSuccess H E)= + (scheduleMeasure (fun _ : H=>rho) R).real E := by + have h := (measurePreserving_restrict_schedule H rho R).hasLaw.measureReal_eq + (p:=fun ω=>ω∈E) (Set.to_countable _ |>.measurableSet) + apply Eq.trans _ h + apply measureReal_congr + filter_upwards [ae_zero_outside_schedule H rho R] with ω hω + change (((∀r i,i∉H → ω r i=0) ∧ (fun r (i : H)=>ω r i)∈E) = ((fun r (i : H)=>ω r i)∈E)) + exact propext ⟨And.right,fun hh=>⟨hω,hh⟩⟩ + +omit [DecidableEq ι] in +lemma sampleCount_restrict (H : Finset ι) {R : ℕ} (ω : Fin R→ι→ℕ) + (hω : ∀r i,i∉H → ω r i=0) : sampleCount ω=sampleCount (fun r (i : H)=>ω r i) := by + unfold sampleCount + apply Finset.sum_congr rfl + intro r _ + rw [Finset.sum_coe_sort] + apply (Finset.sum_subset (Finset.subset_univ H) (fun i _ hi=>hω r i hi)).symm + +theorem uniform_hidden_event_likelihood (H : Finset ι) (hH : H.Nonempty) + (rho : ℝ≥0) (R : ℕ) (K : ℝ) (E : Set (Fin R→H→ℕ)) + (hsize : ∀ω∈E,(sampleCount ω:ℝ)≤K) : + Real.exp (-Real.log ((Fintype.card ι:ℝ)/H.card)*K)* + (scheduleMeasure (fun _ : H=>rho/(H.card:ℝ≥0)) R).real E≤ + (scheduleMeasure (fun _ : ι=>rho/(Fintype.card ι:ℝ≥0)) R).real (ambientSuccess H E) := by + have hh := uniform_schedule_likelihood H hH rho R K (ambientSuccess H E) (by + intro ω hω + rw [sampleCount_restrict H ω hω.1] + exact hsize _ hω.2) + rwa [ambientSuccess_true_mass] at hh + +end + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal Classical +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +lemma sum_set_rate (H : Finset ι) (hH : H.Nonempty) (rho : ℝ≥0) : + (∑i,((if i∈H then rho/(H.card:ℝ≥0) else 0):ℝ≥0):ℝ)=rho := by + have hH0 : (0:ℝ)rho/(S.card:ℝ≥0)) R).real E≤ + (scheduleMeasure (fun i=>if i∈U then rho/(U.card:ℝ≥0) else 0) R).real (ambientSuccess S E) := by + have hU : U.Nonempty := hS.mono hSU + have hS0 : (0:ℝ)if i∈U then rho/(U.card:ℝ≥0) else 0) + (fun i=>if i∈S then rho/(S.card:ℝ≥0) else 0) + (by rw [sum_set_rate U hU rho,sum_set_rate S hS rho]) + (Real.log_nonneg ((one_le_div hS0).mpr hSUc)) hr R (ambientSuccess S E) (K:=K) (by + intro ω hω + rw [sampleCount_restrict S ω hω.1] + exact hsize _ hω.2) + rwa [ambientSuccess_true_mass] at hh + +end SharpRamseyFive.PoissonScore + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/PositiveTailMoment.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/PositiveTailMoment.lean new file mode 100644 index 0000000000000000000000000000000000000000..9e90115be4b68d8eb45a32bdfe25616eff2d6685 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/PositiveTailMoment.lean @@ -0,0 +1,94 @@ +import Mathlib + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.TailMoment +open scoped BigOperators Classical + +theorem positive_tail_moment {I : Type*} [Fintype I] (f : I → ℝ) + (hf0 : ∀ i,0 < f i) (hf2 : ∀ i,f i ≤ 2) (A : ℝ) (hA : 0 ≤ A) + (K R : ℕ) (hR : K+1 ≤ R) + (htail : ∀ a : ℝ,0 < a → a ≤ 2 → + ((Finset.univ.filter fun i => a ≤ f i).card:ℝ)*a^K ≤ A) : + ∑ i,f i^R ≤ 2*A*2^R := by + have hnear (i : I) : ∃ n : ℕ,(1/2:ℝ)^(n+1) < f i/2 ∧ f i/2 ≤ (1/2:ℝ)^n := + exists_nat_pow_near_of_lt_one (div_pos (hf0 i) (by norm_num)) (by linarith [hf2 i]) + (by norm_num) (by norm_num) + let index : I → ℕ := fun i => (hnear i).choose + have hind (i : I) := (hnear i).choose_spec + let N := Finset.univ.sup index+1 + have hidx (i : I) (_ : i ∈ Finset.univ) : index i ∈ Finset.range N := by + apply Finset.mem_range.mpr + exact Nat.lt_succ_of_le (Finset.le_sup (Finset.mem_univ i)) + rw [←Finset.sum_fiberwise_of_maps_to hidx (fun i => f i^R)] + have hlevel (n : ℕ) : + (∑ i ∈ Finset.univ.filter fun i => index i=n,f i^R) ≤ A*2^R*(1/2:ℝ)^n := by + let E := Finset.univ.filter fun i => index i=n + let a : ℝ := (1/2:ℝ)^n + have ha : 0 < a := by dsimp [a]; positivity + have ha1 : a ≤ 1 := pow_le_one₀ (by norm_num) (by norm_num) + have hsub : E ⊆ Finset.univ.filter fun i => a ≤ f i := by + intro i hi + have he := (Finset.mem_filter.mp hi).2 + apply Finset.mem_filter.mpr ⟨Finset.mem_univ i,?_⟩ + have hlo := (hind i).1 + change (1/2:ℝ)^(index i+1) < f i/2 at hlo + rw [he,pow_succ] at hlo + dsimp [a] + linarith + have hc : (E.card:ℝ)*a^K ≤ A := + (mul_le_mul_of_nonneg_right (by exact_mod_cast Finset.card_le_card hsub) + (pow_nonneg ha.le _)).trans (htail a ha (ha1.trans (by norm_num))) + calc + _ ≤ ∑ i ∈ E,(2*a)^R := Finset.sum_le_sum fun i hi => by + have he := (Finset.mem_filter.mp hi).2 + have hup := (hind i).2 + change f i/2 ≤ (1/2:ℝ)^(index i) at hup + rw [he] at hup + exact pow_le_pow_left₀ (hf0 i).le (by dsimp [a]; linarith) R + _ = (E.card:ℝ)*2^R*a^R := by rw [Finset.sum_const,nsmul_eq_mul,mul_pow]; ring + _ ≤ (E.card:ℝ)*2^R*a^(K+1) := mul_le_mul_of_nonneg_left + (pow_le_pow_of_le_one ha.le ha1 hR) (by positivity) + _ = ((E.card:ℝ)*a^K)*(2^R*a) := by rw [pow_succ]; ring + _ ≤ A*(2^R*a) := mul_le_mul_of_nonneg_right hc (by positivity) + _ = _ := by ring + calc + _ ≤ ∑ n ∈ Finset.range N,A*2^R*(1/2:ℝ)^n := Finset.sum_le_sum fun n _ => hlevel n + _ = A*2^R*∑ n ∈ Finset.range N,(1/2:ℝ)^n := (Finset.mul_sum ..).symm + _ ≤ A*2^R*2 := mul_le_mul_of_nonneg_left (sum_geometric_two_le N) (by positivity) + _ = _ := by ring + +theorem tail_moment {I : Type*} [Fintype I] (f : I → ℝ) + (hf0 : ∀ i,0 ≤ f i) (hf2 : ∀ i,f i ≤ 2) (A : ℝ) (hA : 0 ≤ A) + (K R : ℕ) (hR : K+1 ≤ R) + (htail : ∀ a : ℝ,0 < a → a ≤ 2 → + ((Finset.univ.filter fun i => a ≤ f i).card:ℝ)*a^K ≤ A) : + ∑ i,f i^R ≤ 2*A*2^R := by + let S := Finset.univ.filter fun i => 0 < f i + have hs : (∑ i,f i^R) = ∑ i ∈ S,f i^R := by + apply (Finset.sum_subset (Finset.subset_univ _) _).symm + intro i _ hi + have hzero : f i = 0 := by + have := not_lt.mp (show ¬0 < f i by simpa [S] using hi) + linarith [hf0 i] + simp [hzero,show R ≠ 0 by omega] + rw [hs] + rw [Finset.sum_subtype S (p := fun i => 0 < f i) (by intro i; simp [S])] + apply positive_tail_moment (fun i : {i : I // 0 < f i} => f i.val) + (fun i => i.property) (fun i => hf2 i.val) A hA K R hR + intro a ha ha2 + have hc : (Finset.univ.filter fun i : {i : I // 0 < f i} => a ≤ f i.val).card ≤ + (Finset.univ.filter fun i => a ≤ f i).card := by + apply Finset.card_le_card_of_injOn (fun i => i.val) + · intro i hi + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,(Finset.mem_filter.mp hi).2⟩ + · intro i _ j _ hij + exact Subtype.ext hij + exact (mul_le_mul_of_nonneg_right (by exact_mod_cast hc) (pow_nonneg ha.le _)).trans + (htail a ha ha2) + +end SharpRamseyFive.TailMoment + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/PublicCapLaw.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/PublicCapLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..b7858de042b8819e007accf4a30ebe703edbe435 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/PublicCapLaw.lean @@ -0,0 +1,65 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.UniformCutoff +import OAI.Combinatorics.RamseyFive.Entropy.CapDecoder +import OAI.Combinatorics.RamseyFive.Entropy.SequentialLaw + +namespace OAI + +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical BigOperators +variable {A B : Type*} [Fintype A] [Fintype B] + +noncomputable def publicCapLaw (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hW : W.Nonempty) (n : ℕ) (q M : ℝ) : Law (Option (Finset A)) := + map (map (iid (iid (uniformOn W hW) (Fin n)) (Fin (uniformCutoff q C W n))) + (firstAccepted (validationRows R S U C n q M))) + (Option.map (cap R U q)) + +def ValidCap (S U : Finset A) (M : ℝ) (Y : Finset A) : Prop := + Y⊆U ∧ (Y.card:ℝ)≤M ∧ (9:ℝ)/10*S.card≤(S∩Y).card + +lemma publicCapLaw_none (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hW : W.Nonempty) (n : ℕ) (q M : ℝ) : + publicCapLaw R S U C W hW n q M none= + map (iid (iid (uniformOn W hW) (Fin n)) (Fin (uniformCutoff q C W n))) + (firstAccepted (validationRows R S U C n q M)) none := by + classical + simp [publicCapLaw,map,Fintype.sum_option] + +lemma publicCapLaw_positive (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hW : W.Nonempty) (n : ℕ) (q M : ℝ) + (Y : Finset A) (hY : 0 simp at he + | some row => + have he' : cap R U q row=Y := Option.some.inj he + subst Y + obtain ⟨t,_,ht⟩ := map_positive _ _ _ hr + obtain ⟨i,hi,hm⟩ := firstAccepted_index _ _ ht + exact ⟨cap_subset _ _ _ _,(Finset.mem_filter.mp hm).2.2⟩ + +lemma publicCapLaw_failure (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hC : C.Nonempty) (hW : W.Nonempty) (hCW : C⊆W) + (n : ℕ) (q M : ℝ) + (hE : (9:ℝ)/10≤eventMass (iid (uniformOn C hC) (Fin n)) + (validationRows R S U C n q M)) : + publicCapLaw R S U C W hW n q M none≤Real.exp (-q) := by + rw [publicCapLaw_none] + exact uniform_cutoff_failure q C W hC hW hCW n _ + (fun row hr=>(Finset.mem_filter.mp hr).2.1) hE + +omit [Fintype A] in +lemma ValidCap.source_nonempty {S U Y : Finset A} {M : ℝ} + (h : ValidCap S U M Y) (hS : S.Nonempty) : (S∩Y).Nonempty := by + apply Finset.card_pos.mp + have hs : (0:ℝ) (Real.exp (-(r:ℝ))*(r:ℝ)^n/(n.factorial:ℝ))*c^n) + (Real.exp ((r:ℝ)*(c-1))) := by + convert! (NormedSpace.expSeries_div_hasSum_exp ((r:ℝ)*c)).mul_left + (Real.exp (-(r:ℝ))) using 1 + · ext n + rw [mul_pow] + ring + · rw [←Real.exp_eq_exp_ℝ,←Real.exp_add] + congr 1 + ring + +lemma integrable_poisson_pow (r : ℝ≥0) (c : ℝ) (hc : 0≤c) : + Integrable (fun n : ℕ => c^n) (poissonMeasure r) := by + apply integrable_poissonMeasure_iff.mpr + simpa only [Real.norm_eq_abs,abs_of_nonneg (pow_nonneg hc _)] using + (hasSum_poisson_pow r c).summable + +lemma integral_poisson_pow (r : ℝ≥0) (c : ℝ) : + (∫ n : ℕ,c^n ∂poissonMeasure r)=Real.exp ((r:ℝ)*(c-1)) := by + rw [integral_poissonMeasure] + simpa only [smul_eq_mul] using (hasSum_poisson_pow r c).tsum_eq + +theorem poisson_double_tail (r : ℝ≥0) : + (poissonMeasure r).real {n : ℕ | 2*(r:ℝ)≤n}≤Real.exp (-(r:ℝ)/4) := by + let t := Real.exp (2*(r:ℝ)*Real.log 2) + have ht : 0 (2:ℝ)^n) + (Filter.Eventually.of_forall fun n => by positivity) + (integrable_poisson_pow r 2 (by norm_num)) t + rw [integral_poisson_pow] at h + have he : (poissonMeasure r).real {n : ℕ | t≤(2:ℝ)^n}≤Real.exp (r:ℝ)/t := by + apply (le_div_iff₀ ht).mpr + simpa only [sub_self,show (2:ℝ)-1=1 by norm_num,mul_one,mul_comm t] using h + calc + _ ≤ _ := measureReal_mono hsub (measure_ne_top _ _) + _ ≤ Real.exp (r:ℝ)/t := he + _ = Real.exp ((r:ℝ)*(1-2*Real.log 2)) := by + dsimp [t] + rw [←Real.exp_sub] + congr 1 + ring + _ ≤ _ := Real.exp_le_exp.mpr (by nlinarith [Real.log_two_gt_d9,r.coe_nonneg]) + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal Classical +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +noncomputable def sampleCount {R : ℕ} (ω : Fin R→ι→ℕ) : ℕ := ∑r,∑i,ω r i + +lemma hasLaw_sampleCount (rate : ι→ℝ≥0) (R : ℕ) : + HasLaw (sampleCount (R:=R)) (poissonMeasure ((R:ℝ≥0)*∑i,rate i)) + (scheduleMeasure rate R) := by + have hf := hasLaw_sum (fun p : Fin R×ι => rate p.2) Finset.univ + have hh := hf.comp (measurePreserving_uncurry_schedule rate R).hasLaw + convert! hh using 1 + · funext ω + simp [sampleCount,Fintype.sum_prod_type] + · congr 1 + simp [Fintype.sum_prod_type] + +theorem sampleCount_double_tail (rate : ι→ℝ≥0) (R : ℕ) : + (scheduleMeasure rate R).real + {ω | 2*((R:ℝ)*∑i,(rate i:ℝ))≤(sampleCount ω:ℝ)}≤ + Real.exp (-((R:ℝ)*∑i,(rate i:ℝ))/4) := by + have hh := (hasLaw_sampleCount rate R).measureReal_eq + (p:=fun n : ℕ => 2*(((R:ℝ≥0)*∑i,rate i):ℝ)≤(n:ℝ)) (by measurability) + simpa only [NNReal.coe_mul,NNReal.coe_natCast,NNReal.coe_sum] using + hh.trans_le (poisson_double_tail ((R:ℝ≥0)*∑i,rate i)) + +end SharpRamseyFive.PoissonScore + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/TypicalScoreAggregate.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/TypicalScoreAggregate.lean new file mode 100644 index 0000000000000000000000000000000000000000..f79115fb3f9fe0a241f67b4e645400a557709b16 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/TypicalScoreAggregate.lean @@ -0,0 +1,36 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Probability.Aggregate + +namespace OAI + +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal +namespace SharpRamseyFive.PoissonScore +open MeasureTheory ProbabilityTheory +open scoped BigOperators NNReal Classical +variable {ι D H : Type*} [Fintype ι] [DecidableEq ι] + [Fintype D] [DecidableEq D] [Fintype H] + +omit [DecidableEq ι] [Fintype D] [Fintype H] in +lemma typicalScore_aggregate (label : ι→D) {R : ℕ} (s : Finset H) + (lines : H→Finset D) (b : ℝ) (own : H→Fin R→Bool) (ω : Fin R→ι→ℕ) : + typicalScore s lines b own (fun r => aggregate label (ω r)) = + typicalScore s (fun h => Finset.univ.filter fun i => label i∈lines h) b own ω := by + unfold typicalScore + simp_rw [scoreTerm_aggregate] + +omit [Fintype H] in +lemma integral_original_score_pow (label : ι→D) (rate : ι→ℝ≥0) + {R : ℕ} (s : Finset H) (lines : H→Finset D) (b : ℝ) + (own : H→Fin R→Bool) (p : ℕ) : + (∫ ω,(typicalScore s (fun h => Finset.univ.filter fun i => label i∈lines h) b own ω)^p + ∂scheduleMeasure rate R) = + ∫ ω,(typicalScore s lines b own ω)^p ∂scheduleMeasure (aggregateRate label rate) R := by + simp_rw [←typicalScore_aggregate label s lines b own] + exact (measurePreserving_schedule_aggregate label rate R).hasLaw.integral_comp + (measurable_of_countable (fun ω : Fin R→D→ℕ => (typicalScore s lines b own ω)^p)).aestronglyMeasurable + +end SharpRamseyFive.PoissonScore + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Probability/UniformTails.lean b/lean/OAI/Combinatorics/RamseyFive/Probability/UniformTails.lean new file mode 100644 index 0000000000000000000000000000000000000000..fc59a77b549a01d9c1150aa540e84b7d4182e6a9 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Probability/UniformTails.lean @@ -0,0 +1,342 @@ +import Mathlib +import OAI.Combinatorics.SharpRamsey.Entropy.LargeCard +import OAI.Combinatorics.RamseyFive.Geometry.DimensionalScale +import OAI.Combinatorics.RamseyFive.Geometry.RowPowerTail +import OAI.Combinatorics.RamseyFive.Geometry.PlaneAnchor +import OAI.Combinatorics.RamseyFive.Geometry.ValidationOriginalTailWide + +namespace OAI + +namespace SharpRamseyFive.ParameterHierarchy +open Filter Asymptotics +open scoped Topology + +theorem eventually_score_slack {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb A k c : ℝ) (hCb : 0≤Cb) (hk : 1≤k) (hc : 0 + u ≤ mass (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (pencilLines x F z.val.1∩pencilLines x F z.val.2)).card:ℝ)*u^200≤ + (scale (K:=K) d S.card)^2*Real.exp (P η σ D R/50)) → + scale (K:=K) d S.card*Real.exp (-(b₀+8*P η σ D R*τ+Real.log 16))/10≤t → + (scheduleMeasure (fun _ : S => L₀*pointStrength S) R).real + {ω | Unsampled x S ω ∧ t < |pointScore S (C a∪C b) F + (Real.exp (-(L₀:ℝ)*(1-ownFraction S (C a) (C b)))) ω|} ≤ + Real.exp (-P η σ D R/2) := by + have hm := ParameterHierarchy.eventually_score_margins hη hη' Cb hCb + have ho := eventually_moment_orders hη hη' + filter_upwards [eventually_ge_atTop (20:ℝ),hm,ho] with σ hσ hm ho + intro d D b₀ τ R L₀ K V _ _ _ _ _ _ _ x _ J _ S C a b c F t hdim hd hd' hq hr hL hb₀ hbhi hτ hS + ha hb hc hSn hn hf hF hx hpairs ht + have hsn : (0:ℝ) (hF H hH).1) + rw [hdim,show d+1-1=d by omega] at hp + have hc : (F.card:ℝ)≤(pencilAlphabet (Nat.card K) d:ℝ) := by exact_mod_cast hp + have hB : 0 + u ≤ mass (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (pencilLines x F z.1∩pencilLines x F z.2.val)).card:ℝ)*u^200≤ + (scale (K:=K) d S.card)^2*Real.exp (((L:ℝ)*R)/50)) + (hrows : ∀H:F,∀u:ℝ,0 H≠H' ∧ u ≤ mass + (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (pencilLines x F H∩pencilLines x F H')).card:ℝ)*u^200≤ + scale (K:=K) d S.card*Real.exp (((L:ℝ)*R)/50)) + (hdegree : ∀H:F, + ((Finset.univ.filter fun H':F => H≠H' ∧ 1/(100*(p:ℝ)) ≤ mass + (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (pencilLines x F H∩pencilLines x F H')).card:ℝ)≤ + scale (K:=K) d S.card*Real.exp (-3*((L:ℝ)*R))) + (hdegreeScalar : 2+scale (K:=K) d S.card*Real.exp (-3*((L:ℝ)*R))≤ + scale (K:=K) d S.card*Real.exp (-((L:ℝ)*R))) + (hp2 : (p:ℝ)^2≤Real.exp (((L:ℝ)*R)/10)) + (hpairScalar : (pencilAlphabet (Nat.card K) d:ℝ)+ + (dyadFactor (outsideAt x S (C a∪C b)).card (((L:ℝ)*R)/100)* + (scale (K:=K) d S.card)^2)/(1/(100*(p:ℝ)))^200≤ + (scale (K:=K) d S.card)^2*Real.exp (((L:ℝ)*R)/10)) + (hcost : 40*scale (K:=K) d S.card*Real.exp ((L:ℝ)/100)+ + 2*((p+1:ℝ)*lowMomentBudget (pencilAlphabet (Nat.card K) d) + (dyadFactor (outsideAt x S (C a∪C b)).card (((L:ℝ)*R)/100)*(scale (K:=K) d S.card)^2) + (dyadFactor (outsideAt x S (C a∪C b)).card (((L:ℝ)*R)/100)*scale (K:=K) d S.card) + (scale (K:=K) d S.card) cut L p R + (pencilAlphabet (Nat.card K) (d-1)) (pencilAlphabet (Nat.card K) (d-2)))≤ + scale (K:=K) d S.card*Real.exp (((L:ℝ)*R)/5)) + {κ t : ℝ} (hκ : κ+Real.log 10≤((L:ℝ)*R)/20) + (hpP : 1000*Real.log (Nat.card K)≤(p:ℝ)*((L:ℝ)*R)) + (ht : scale (K:=K) d S.card*Real.exp (-κ)/10≤t) : + (scheduleMeasure (fun _ : S => L*pointStrength S) R).real + {ω | Unsampled x S ω ∧ t < |pointScore S (C a∪C b) F + (Real.exp (-(L:ℝ)*(1-ownFraction S (C a) (C b)))) ω|} ≤ + (Nat.card K:ℝ)^(-(50:ℝ)) := by + have hB : 0 (hF H hH).1) hb0 heven ht0 hm + have herr := ScoreScalars.high_tail_polynomial hB + (by exact_mod_cast (Nat.card_pos (α:=K)) : (0:ℝ) L*pointStrength S) R) + ?_ (measure_ne_top _ _)).trans (hprob.trans herr) + intro ω hω + exact ⟨hω.1,ht.trans_lt hω.2⟩ + +end + +open Module ProjectiveIncidence CellVariance ScoreRegularity PoissonScore MeasureTheory +open Filter ParameterHierarchy +open scoped BigOperators LinearAlgebra.Projectivization Classical NNReal Topology + +theorem eventually_low_original_tail {η : ℝ} (hη : 0<η) (hη' : η<1/10) + (Cb : ℝ) (hCb : 0≤Cb) : + ∀ᶠ σ : ℝ in atTop,∀ (d : ℕ) (D b₀ τ : ℝ) (R : ℕ) (L₀ : ℝ≥0), + ∀ (K V : Type) [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))], + ∀ (x : ℙ K V) [Fintype (RadialLine x)], + ∀ {J : Type} [Fintype J] (S : Finset (ℙ K V)) (C : J→Finset (ℙ K V)) (a b c : J) + (F : Finset (ℙ K (Dual K V))) (t : ℝ), + finrank K V=d+1 → 2≤d → d≤4 → (Nat.card K:ℝ)=Real.exp σ → + Range η σ D R → (L₀:ℝ)=L η σ D → 0≤b₀ → b₀≤Cb*D*σ^(6*beta η) → + τ≤σ^(-200*beta η) → S.Nonempty → C a⊆S → C b⊆S → C c=C a∩C b → + (S.card:ℝ)≤10*Real.exp (((d:ℝ)+1)*σ/2) → + (S.card:ℝ)≤(Nat.card K:ℝ)^2*Real.exp (P η σ D R/10000) → + (Nat.card K:ℝ)/S.card≤1/100 → ownFraction S (C a) (C b)≤2/25 → + (∀H∈F,Incident x H ∧ H∉exceptional S C) → + x∉irregular (d:=d) S C ((L₀:ℝ)/100) → + (∀u:ℝ,0 + u ≤ mass (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (pencilLines x F z.1∩pencilLines x F z.2.val)).card:ℝ)*u^200≤ + (scale (K:=K) d S.card)^2*Real.exp (P η σ D R/50)) → + (∀H:F,∀u:ℝ,0 H≠H' ∧ u ≤ mass + (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (pencilLines x F H∩pencilLines x F H')).card:ℝ)*u^200≤ + scale (K:=K) d S.card*Real.exp (P η σ D R/50)) → + (∀H:F, + ((Finset.univ.filter fun H':F => H≠H' ∧ 1/(100*(momentOrder σ (P η σ D R):ℝ)) ≤ mass + (radialWeight x (outsideAt x S (C a∪C b)) (pointStrength S)) + (pencilLines x F H∩pencilLines x F H')).card:ℝ)≤ + scale (K:=K) d S.card*Real.exp (-3*P η σ D R)) → + scale (K:=K) d S.card*Real.exp (-(b₀+8*P η σ D R*τ+Real.log 16))/10≤t → + (scheduleMeasure (fun _ : S => L₀*pointStrength S) R).real + {ω | Unsampled x S ω ∧ t < |pointScore S (C a∪C b) F + (Real.exp (-(L₀:ℝ)*(1-ownFraction S (C a) (C b)))) ω|} ≤ + (Nat.card K:ℝ)^(-(50:ℝ)) := by + have hh := eventually_low_geometric_budget hη hη' + have ho := eventually_moment_orders hη hη' + have hm := ParameterHierarchy.eventually_score_margins hη hη' Cb hCb + filter_upwards [eventually_ge_atTop (100:ℝ),hh,ho,hm] with σ hσ hh ho hm + intro d D b₀ τ R L₀ K V _ _ _ _ _ _ _ x _ J _ S C a b c F t hdim hd hd' hq hr hL hb₀ hbhi hτ hS + ha hb hc hSn hSlow hn hf hF hx hpairs hrows hdegree ht + have hsn : (0:ℝ)(p.nonneg _).not_gt h.1) +lemma map_sigma_first (p : Law A) (q : ∀a,Law (B a)) : + map (sigmaLaw p q) Sigma.fst=p := by + apply Law.ext_mean + intro f + rw [mean_map,mean_sigma] + simp only [mean_const] +lemma sigma_stream {Γ : Type*} [Fintype Γ] (p : Law A) (q : ∀a,Law (B a)) (s : A→Γ) : + map (sigmaLaw p q) (fun z=>s z.1)=map p s := by + change map (sigmaLaw p q) (s ∘ Sigma.fst)=map p s + rw [←map_comp,map_sigma_first] +end SharpRamseyFive.FiniteEntropy +namespace SharpRamseyFive.SelectedTuple.SelectedStream +open FiniteEntropy +open scoped Classical +variable {Ω β α : Type*} [Fintype Ω] [Fintype β] [Fintype α] + {Γ : Ω→Type*} [∀a,Fintype (Γ a)] {N n : ℕ} {admissible : (Fin N→α)→Prop} + +def augmentSigma (S : SelectedStream (Ω:=Ω) (β:=β) N n admissible) (q : ∀a,Law (Γ a)) : + SelectedStream (Ω:=Sigma Γ) (β:=β) N n admissible where + law:=sigmaLaw S.law q + stream:=fun z=>S.stream z.1 + tuple:=fun z=>S.tuple z.1 + reverse:=S.reverse + view:=S.view + selected:=fun z hz=>S.selected z.1 (sigmaLaw_positive S.law q z hz).1 + good:=fun z hz=>S.good z.1 (sigmaLaw_positive S.law q z hz).1 + density:=S.density + density_nonneg:=S.density_nonneg + density_bound:=by intro s;rw [sigma_stream];exact S.density_bound s +end SharpRamseyFive.SelectedTuple.SelectedStream + +end + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Streams/HighActualExtraction.lean b/lean/OAI/Combinatorics/RamseyFive/Streams/HighActualExtraction.lean new file mode 100644 index 0000000000000000000000000000000000000000..35d10c49c0bb62a36753497c49afbcc38f8078ae --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Streams/HighActualExtraction.lean @@ -0,0 +1,106 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.HighSampleRetention +import OAI.Combinatorics.RamseyFive.Entropy.ConditionalSampling + +namespace OAI + +namespace SharpRamseyFive.HighSamples +open Module SharpRamseyFive.ProjectiveIncidence SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V Ω κ : Type*} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype Ω] [Fintype κ] + +def highLossBound {m : ℕ} (p : Law (SampleFlag (K:=K) (V:=V))) + (targets : Fin m→Law (SampleFlag (K:=K) (V:=V))) + (G : Fin m→Finset (ℙ K (Dual K V))) (A : ℝ) (_ : ℝ) (B : Fin m→ℝ) (h : ℕ) : ℝ := + ∑ i,(eventMass (second (targets i)) (G i)ᶜ+64*(Nat.card K:ℝ)^5*A*(B i)+ + 3*(1-1/(5*(Nat.card K:ℝ)))^h+3*h*relationMass SampleConflict p (targets i)) + +theorem high_conditional_omissions (hdim : finrank K V=5) {m : ℕ} + (p : Law Ω) (ctx : Ω→κ) (x : Ω→Fin m→SampleFlag (K:=K) (V:=V)) + (rep : κ→Law (SampleFlag (K:=K) (V:=V))) + (G : κ→Fin m→Finset (ℙ K (Dual K V))) (A C : κ→ℝ) (B : κ→Fin m→ℝ) + (hflag : ∀ c,0y i) z→Incident z.1 z.2) + (hA : ∀ c,0≤A c) (hB : ∀ c i,0≤B c i) (hC : ∀ c,0≤C c) + (hpA : ∀ c a,first (rep c) a≤A c) + (hrB : ∀ c i b,b∈G c i→second (map (fiber (pair p ctx x) c) (fun y=>y i)) b≤B c i) + (hpC : ∀ c b,second (rep c) b≤C c) + (hsmall : ∀ c,2*(Nat.card K:ℝ)^2*C c≤1/(20*(Nat.card K:ℝ))) (h : ℕ) : + mean (adaptiveLaw p (fun a=>iid (iid (rep (ctx a)) (Fin h)) (Fin 3))) + (fun z=>((coveredPositions (x z.1) (highDomain z.2))ᶜ.card:ℝ)) ≤ + mean (first (pair p ctx x)) (fun c=>highLossBound (rep c) + (fun i=>map (fiber (pair p ctx x) c) (fun y=>y i)) (G c) (A c) (C c) (B c) h) := by + rw [conditional_omissions p ctx x (fun c=>iid (iid (rep c) (Fin h)) (Fin 3)) highDomain] + apply mean_mono_pos + intro c hc + apply Finset.sum_le_sum + intro i _ + exact sampled_target_loss hdim (rep c) _ (hflag c hc i) (G c i) + (A c) (B c i) (C c) (hA c) (hB c i) (hC c) + (hpA c) (hrB c i) (hpC c) (hsmall c) h + +theorem high_conditional_partial (hdim : finrank K V=5) {m : ℕ} + (p : Law Ω) (ctx : Ω→κ) (x : Ω→Fin m→SampleFlag (K:=K) (V:=V)) + (rep : κ→Law (SampleFlag (K:=K) (V:=V))) + (ready : κ→Fin m→Prop) + (G : κ→Fin m→Finset (ℙ K (Dual K V))) (A C : κ→ℝ) (B : κ→Fin m→ℝ) + (hflag : ∀ c,0y i) z→Incident z.1 z.2) + (hA : ∀ c,0≤A c) (hB : ∀ c i,0≤B c i) (hC : ∀ c,0≤C c) + (hpA : ∀ c,0y i)) b≤B c i) + (hpC : ∀ c,0iid (iid (rep (ctx a)) (Fin h)) (Fin 3))) + (fun z=>((coveredPositions (x z.1) (highDomain z.2))ᶜ.card:ℝ)) ≤ + mean (first (pair p ctx x)) (fun c=>∑ i,if ready c i then + eventMass (second (map (fiber (pair p ctx x) c) (fun y=>y i))) (G c i)ᶜ+ + 64*(Nat.card K:ℝ)^5*A c*(B c i)+3*(1-1/(5*(Nat.card K:ℝ)))^h+ + 3*h*relationMass SampleConflict (rep c) (map (fiber (pair p ctx x) c) (fun y=>y i)) + else 1) := by + rw [conditional_omissions p ctx x (fun c=>iid (iid (rep c) (Fin h)) (Fin 3)) highDomain] + apply mean_mono_pos + intro c hc + apply Finset.sum_le_sum + intro i _ + by_cases hr : ready c i + · rw [ite_eq_left hr] + exact sampled_target_loss hdim (rep c) _ (hflag c hc i) (G c i) + (A c) (B c i) (C c) (hA c) (hB c i) (hC c) + (hpA c hc i hr) (hrB c hc i hr) (hpC c hc i hr) (hsmall c hc i hr) h + · rw [ite_eq_right hr] + apply (mean_mono _ (fun z=>eventWeight_le_one _ _)).trans_eq + exact mean_const _ 1 + +local instance highExtractionFinDecEq (n : ℕ) : DecidableEq (Fin n) := Classical.decEq _ + +omit [Finite K] in +theorem high_extracted_entropy (hdim : finrank K V=5) {m l h : ℕ} (hl : l ≤ m) + (p : Law Ω) (x : Ω→Fin m→SampleFlag (K:=K) (V:=V)) + (samples : Ω→Fin 3→Fin h→SampleFlag (K:=K) (V:=V)) + (hE : 0l≤(coveredPositions (x a) (highDomain (samples a))).card)) : + entropy (map (conditionOn p _ hE) (fun a=>retainedTuple hl (x a) + (coveredPositions (x a) (highDomain (samples a)))))≤ + 3*h*Real.log (Fintype.card (SampleFlag (K:=K) (V:=V)))+ + l*Real.log (Fintype.card (ℙ K (Dual K V))) := by + have hd : 0coveredPositions (x a) (highDomain (samples a))) samples highDomain + (fun a _ i hi=>(mem_coveredPositions _ _ _).mp hi) hE + · have hc:=entropy_le_log_card (map (conditionOn p _ hE) samples) + simpa only [Fintype.card_fun,Fintype.card_fin,Nat.cast_pow,Nat.cast_ofNat,Real.log_pow, + mul_assoc,mul_left_comm,mul_comm] using hc + · intro t + exact log_card_le hQ _ (highDomain_card hdim t) + +end +end SharpRamseyFive.HighSamples + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Streams/HighSampleContradiction.lean b/lean/OAI/Combinatorics/RamseyFive/Streams/HighSampleContradiction.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ef09e698b8e10d620cd8bf31eac079d227ee36d --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Streams/HighSampleContradiction.lean @@ -0,0 +1,125 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.PreparedWindows +import OAI.Combinatorics.RamseyFive.Marking.HighDomainPreRound +import OAI.Combinatorics.RamseyFive.Iteration.HighWindowStage +import OAI.Combinatorics.RamseyFive.Entropy.HighEntropyNumerics +import OAI.Combinatorics.RamseyFive.Entropy.FlagAlphabetLogs + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple + +section +open Module ProjectiveIncidence FiniteEntropy Windows Marking HighSamples Filter ParameterHierarchy +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +local instance hscBDE : DecidableEq (Fin 1×Bool) := Classical.decEq _ +local instance hscTDE (n : ℕ) : DecidableEq (Fin 1×Fin (2*n)) := Classical.decEq _ +local instance hscIDE (n : ℕ) : DecidableEq (Slots 1 n) := Classical.decEq _ + +theorem eventually_high_sample_impossible {η : ℝ} (hη : 0<η) (c C : ℝ) (hc : 0highFourSampler (fiber (pair S.law ctx (windowTuple S))) r' s h z.1)) + (fun z=>((coveredPositions (fun t=>z.1.2 (Sum.inr (0,t))) (highDomain z.2))ᶜ.card:ℝ))≤ + ((2*n:ℝ)-l)/10→False := by + filter_upwards [eventually_high_entropy_contradiction hη c ((10/9)*C) hc] with σ hnum + intro K V Ω κ α _ _ _ _ _ _ _ _ _ _ _ _ N n l steps r' h _ admissible S ctx elig s + hd hσ hq hα hN hlN hl hlen hC hh hloss + obtain ⟨hE,hden,hent⟩:=highSampleStream_extract S ctx elig steps r' s h hd hl hloss + let T:=highSampleStream S ctx elig steps r' s h + let S':=(T.restrict _ hE).extract hl.le + (fun z=>coveredPositions (T.tuple z) (highDomain z.2)) + have hlenpos : 0<(l:ℝ) := (by positivity : 0Finset.univ) i.val) + (fun z=>highFourSampler (fiber (pair S.law ctx (windowTuple S))) r' s h z.1)) + (fun z=>((coveredPositions (fun t=>z.1.2 (Sum.inr (0,t))) (highDomain z.2))ᶜ.card:ℝ))≤ + 5*(B/d+(2*B/rounds)/(ε))+(2*n:ℝ)*highFourLoss (Nat.card K) r' h s d ε := by + let μ:=first (pair S.law ctx (windowTuple S)) + let p:=fiber (pair S.law ctx (windowTuple S)) + let elig:=fun _ : κ=>fun _ : Fin 1×Bool=>(Finset.univ : Finset (Fin n)) + have hS : ∀c,0<μ c→∀b,rem+rounds≤(elig c b).card := by + intro c hc b + simpa only [elig,Finset.card_univ,Fintype.card_fin] using hroom + have hD:=window_posterior_domains S ctx P.domain P.contains + have hbudget : mean μ (fun c=>activeDeficit (p c) (blockActive (elig c)) J)≤B := by + dsimp only [μ,p,elig] + rw [window_posterior_deficit] + have h:=P.deficit + simp only [Nat.cast_mul,Nat.cast_ofNat] at h + have he : psFinDE (1*(4*n)) = (inferInstance : DecidableEq (Fin (1*(4*n)))) := Subsingleton.elim _ _ + rw [he] at h + exact h + obtain ⟨i,hi⟩:=exists_small_deletion_round μ p elig rounds rem hrounds hrem hS + J d ε B 0 hdp he (fun c i=>P.domain c (slotEmbedding i)) + (fun c i=>P.cap c (slotEmbedding i)) hD + (fun c _=>by simpa only [elig,blockActive_univ] using fixedOutside_univ (p c)) hbudget + (fun _ _ _ _ _=>0) (by intros;exact le_rfl) + (by intros;simp) + refine ⟨i,?_⟩ + have hp:=high_domain_preRound_omissions (n:=i.val) (rem:=rem) hd μ p (fun c i=>P.domain c (slotEmbedding i)) + hD r' hr' (fun c hc i=>hcap c (by simpa only [μ,first_pair] using hc) (slotEmbedding i)) + (window_posterior_consistent S ctx P.consistent) (window_posterior_incident S ctx P.incident) + elig hrem hn (fun c hc b=>by have:=hS c hc b;have:=i.isLt;omega) + J d s ε hJ hs hdp.le he.le hbad hsmall + (fun _ _ _ _=>0) (by intros;exact le_rfl) (by intros;rfl) h + apply hp.trans + exact add_le_add (mul_le_mul_of_nonneg_left + (by simpa only [zero_div,add_zero] using hi) (by norm_num)) le_rfl +end + +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Streams/HighThreePrepared.lean b/lean/OAI/Combinatorics/RamseyFive/Streams/HighThreePrepared.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a7978df2b5e3480a24e5ca948bc84a4fe774be9 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Streams/HighThreePrepared.lean @@ -0,0 +1,177 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.ClassifiedStream +import OAI.Combinatorics.RamseyFive.Streams.SelectedLength +import OAI.Combinatorics.RamseyFive.Marking.HighChosenRound + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple + +section +open Module ProjectiveIncidence FiniteEntropy Windows Marking HighSamples +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V Ω κ α : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + [Nonempty (ℙ K V)] [Nonempty (ℙ K (Dual K V))] + [Nonempty (ℙ K (Dual K (Dual K V)))] [Fintype Ω] [Fintype κ] [Fintype α] + {N n : ℕ} [Nonempty (Fin n)] {admissible : (Fin N→α)→Prop} +local instance htpBDE : DecidableEq (Fin 1×Bool) := Classical.decEq _ +local instance htpTDE : DecidableEq (Fin 1×Fin (2*n)) := Classical.decEq _ +local instance htpIDE : DecidableEq (Slots 1 n) := Classical.decEq _ + +omit [Fintype (ℙ K (Dual K (Dual K V)))] [Nonempty (ℙ K V)] + [Nonempty (ℙ K (Dual K V))] [Nonempty (ℙ K (Dual K (Dual K V)))] in +theorem high_three_prepared_impossible (hd : finrank K V=5) + (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (1*(4*n)) admissible) + (ctx : Ω→κ) (J B M : ℝ) (P : Prepared S ctx J B M) + (hcap : ∀c,0 < map S.law ctx c→∀i,HighCaps (P.domain c i) 3 3) + (rounds rem : ℕ) (hrounds : 0fun _ : Fin 1×Bool=>(Finset.univ : Finset (Fin n)) + have hS : ∀c,0<μ c→∀b,rem+rounds≤(elig c b).card := by + intro c hc b + simpa only [elig,Finset.card_univ,Fintype.card_fin] using hroom + have hD:=window_posterior_domains S ctx P.domain P.contains + have hdef : mean μ (fun c=>activeDeficit (p c) (blockActive (elig c)) J)≤B := by + dsimp only [μ,p,elig] + rw [window_posterior_deficit] + have h:=P.deficit + simp only [Nat.cast_mul,Nat.cast_ofNat] at h + have he : psFinDE (1*(4*n)) = (inferInstance : DecidableEq (Fin (1*(4*n)))) := Subsingleton.elim _ _ + rw [he] at h + exact h + obtain ⟨i,hi⟩:=exists_high_three_round hd μ p elig rounds rem hrounds hrem hS J d ε B s M + hdp he (fun c i=>P.domain c (slotEmbedding i)) (fun c i=>P.cap c (slotEmbedding i)) hD + (fun c _=>by simpa only [elig,blockActive_univ] using fixedOutside_univ (p c)) hdef hs hlog + (window_posterior_incident S ctx P.incident) (window_posterior_occupancy S ctx M P.occupancy) + apply high_three_domain_preRound_impossible (n:=i.val) (rem:=rem) hd μ p + (fun c i=>P.domain c (slotEmbedding i)) hD + (fun c hc i=>hcap c (by simpa only [μ,first_pair] using hc) (slotEmbedding i)) + (window_posterior_consistent S ctx P.consistent) elig hrem hn + (fun c hc b=>by have:=hS c hc b;have:=i.isLt;omega) + J d s ε hJ (by linarith) hbad hvar hsmall + have hh:=mul_le_mul_of_nonneg_left hi (by norm_num : (0:ℝ)≤5) + simp only [Nat.cast_one,one_mul,mul_one] at hh ⊢ + have heq : 4*(4*(n:ℝ))*M=16*n*M := by ring + rw [heq] at hh + exact hh.trans_lt hbudget +end +end + +open Module ProjectiveIncidence FiniteEntropy Windows Marking Filter ParameterHierarchy +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section + +theorem eventually_high_three_prepared_impossible {η : ℝ} (hη : 0<η) (c Cb Cm : ℝ) + (hc : 0(hcl a ha i).2 + obtain ⟨a,hap⟩:=(map S.law ctx).exists_positive + have hn : 0S.tuple a (e i) + reverse:=S.reverse + view:=S.view + selected:=by + intro a ha + apply occurrences_trans _ _ _ (S.selected a ha) + apply sourceSequence_occurs + exact (mem_occurrences_iff _ _).mpr ⟨e,fun _=>rfl⟩ + good:=S.good + density:=S.density + density_nonneg:=S.density_nonneg + density_bound:=S.density_bound +end SharpRamseyFive.SelectedTuple.SelectedStream +namespace SharpRamseyFive.Windows +open scoped Classical + +def middleEmbedding (w r : ℕ) : Fin (w*(2*r))↪o Fin (w*(4*r)) := + OrderEmbedding.ofStrictMono + (fun i=>slotEmbedding (Sum.inr (finProdFinEquiv.symm i))) (by + intro i j hij + let a := finProdFinEquiv.symm i + let b := finProdFinEquiv.symm j + have hi : i.val=a.1.val*(2*r)+a.2.val := by + calc + _ = (finProdFinEquiv a).val := congrArg Fin.val (finProdFinEquiv.apply_symm_apply i).symm + _ = _ := by change a.2.val+(2*r)*a.1.val=_;ring + have hj : j.val=b.1.val*(2*r)+b.2.val := by + calc + _ = (finProdFinEquiv b).val := congrArg Fin.val (finProdFinEquiv.apply_symm_apply j).symm + _ = _ := by change b.2.val+(2*r)*b.1.val=_;ring + by_cases hab : a.1 z ∉ S) _ hx] + change e (e.symm (p.val x)) = p.val x + simp + · rw [Equiv.Perm.ofSubtype_apply_of_not_mem (p := fun z => z ∉ S) _ hx] + exact (p.property x (not_not.mp hx)).symm + right_inv r := by + apply Equiv.ext + intro x + apply Subtype.ext + change e.symm (e (Equiv.Perm.ofSubtype r x.val)) = (r x).val + simp only [Equiv.symm_apply_apply, Equiv.Perm.ofSubtype_apply_coe] + +theorem card_cylinder (S : Finset α) (e : Equiv.Perm α) : + Fintype.card (Cylinder S e) = (Fintype.card α - S.card).factorial := by + rw [Fintype.card_congr (remainingEquiv S e), Fintype.card_perm, + Fintype.card_subtype_compl, Fintype.card_coe] + +noncomputable def nextReference (e : Equiv.Perm α) (x y : α) : Equiv.Perm α := + e.trans (Equiv.swap (e x) y) + +omit [Fintype α] in +lemma nextReference_at (e : Equiv.Perm α) (x y : α) : nextReference e x y x = y := by + simp [nextReference] + +omit [Fintype α] in +lemma nextReference_old (S : Finset α) (e : Equiv.Perm α) {x y : α} + (hx : x ∉ S) (hy : y ∉ S.map e.toEmbedding) {z : α} (hz : z ∈ S) : + nextReference e x y z = e z := by + have hzx : e z ≠ e x := fun h => hx (e.injective h ▸ hz) + have hzy : e z ≠ y := by + intro h; apply hy; exact Finset.mem_map.mpr ⟨z,hz,h⟩ + simp [nextReference, Equiv.swap_apply_of_ne_of_ne hzx hzy] + +noncomputable def stepEquiv (S : Finset α) (e : Equiv.Perm α) {x y : α} + (hx : x ∉ S) (hy : y ∉ S.map e.toEmbedding) : + {p : Cylinder S e // p.val x = y} ≃ Cylinder (insert x S) (nextReference e x y) where + toFun p := ⟨p.val.val, by + intro z hz + rcases Finset.mem_insert.mp hz with h | h + · subst z; rw [p.property, nextReference_at] + · rw [p.val.property z h, nextReference_old S e hx hy h]⟩ + invFun p := ⟨⟨p.val, by + intro z hz + rw [p.property z (Finset.mem_insert_of_mem hz), nextReference_old S e hx hy hz]⟩, by + rw [p.property x (Finset.mem_insert_self x S), nextReference_at]⟩ + left_inv p := rfl + right_inv p := rfl + +theorem card_next (S : Finset α) (e : Equiv.Perm α) {x y : α} + (hx : x ∉ S) (hy : y ∉ S.map e.toEmbedding) : + Fintype.card {p : Cylinder S e // p.val x = y} = + (Fintype.card α - S.card - 1).factorial := by + rw [Fintype.card_congr (stepEquiv S e hx hy), card_cylinder, + Finset.card_insert_of_notMem hx, Nat.sub_add_eq] + +theorem next_probability (S : Finset α) (e : Equiv.Perm α) {x y : α} + (hx : x ∉ S) (hy : y ∉ S.map e.toEmbedding) : + (Fintype.card {p : Cylinder S e // p.val x = y} : ℝ) / + Fintype.card (Cylinder S e) = 1 / (Fintype.card α - S.card : ℕ) := by + have hs : S.card < Fintype.card α := by + have hs' := Finset.card_lt_card (Finset.ssubset_iff_subset_ne.mpr + ⟨S.subset_univ, fun he => hx (he ▸ Finset.mem_univ x)⟩) + simpa using hs' + have hn : 0 < Fintype.card α - S.card := Nat.sub_pos_of_lt hs + have he : Fintype.card α - S.card = (Fintype.card α - S.card - 1) + 1 := by omega + rw [card_next S e hx hy, card_cylinder] + conv_rhs => rw [he] + rw [he, Nat.factorial_succ] + have hf : ((Fintype.card α - S.card - 1).factorial : ℝ) ≠ 0 := by positivity + push_cast + field_simp + +end SharpRamseyFive.PermutationCylinder + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Streams/PreparedStream.lean b/lean/OAI/Combinatorics/RamseyFive/Streams/PreparedStream.lean new file mode 100644 index 0000000000000000000000000000000000000000..53bdcb5e060e6b023bca51ed5cec972b703a78eb --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Streams/PreparedStream.lean @@ -0,0 +1,55 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.DomainTransport +import OAI.Combinatorics.RamseyFive.Entropy.SelectedRestriction + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple +open Module ProjectiveIncidence FiniteEntropy Windows Marking CoreGeometry +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section +variable {K V Ω κ α : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] [Fintype Ω] [Fintype κ] [Fintype α] + {N n l : ℕ} {admissible : (Fin N→α)→Prop} +local instance psFinDE (n : ℕ) : DecidableEq (Fin n) := Classical.decEq _ + +structure Prepared (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N n admissible) + (ctx : Ω→κ) (J B M : ℝ) where + domain : κ→Fin n→Finset (FlagPair K V) + contains : ∀z,0(n:ℝ)*J-entropy (fiber (pair S.law ctx S.tuple) c))≤B + incident : ∀z,0h.cap c)).trans h.deficit + incident z hz i:=h.incident z hz (e i) + consistent z hz i j hij:=h.consistent z hz (e i) (e j) (e.strictMono hij) + occupancy z hz:=occupancy_reindex _ e e.injective M (h.occupancy z hz) + +def swap (h : Prepared S ctx J B M) : + Prepared (S.changeOrientation swapFlag swapFlag.symm swapFlag.symm_apply_apply) ctx J B M where + domain c i:=swapDomain (h.domain c i.rev) + contains z hz i:=(mem_swapDomain_iff _ _).mpr (h.contains z hz i.rev) + cap c i:=by simpa only [swapDomain,Finset.card_map] using h.cap c i.rev + deficit:=by rw [changeOrientation_deficit];exact h.deficit + incident z hz:=reverseTuple_incident (h.incident z hz) + consistent z hz:=reverseTuple_consistent (h.consistent z hz) + occupancy z hz:=occupancy_reverse _ M (h.occupancy z hz) +end Prepared +end +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Streams/SelectedExtraction.lean b/lean/OAI/Combinatorics/RamseyFive/Streams/SelectedExtraction.lean new file mode 100644 index 0000000000000000000000000000000000000000..05cf8789759a9c50bd8d7e020afc3d5db78d5471 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Streams/SelectedExtraction.lean @@ -0,0 +1,54 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.OrderedExtraction + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple +open scoped Classical BigOperators +open FiniteEntropy +noncomputable section +variable {α Ω : Type*} [Fintype α] [Fintype Ω] + +lemma mem_occurrences_iff {n l : ℕ} (s : Fin n→α) (f : Fin l→α) : + s∈occurrences f ↔ ∃ e:Fin l ↪o Fin n,∀ i,s (e i)=f i := by + constructor + · intro h + obtain ⟨I,_,hI⟩:=Finset.mem_biUnion.mp h + exact ⟨I.val.orderEmbOfFin I.property,(Finset.mem_filter.mp hI).2⟩ + · rintro ⟨e,he⟩ + let I : Finset (Fin n) := Finset.univ.map e.toEmbedding + have hI : I.card=l := by simp [I] + have hei : I.orderEmbOfFin hI=e := by + symm + apply Finset.orderEmbOfFin_unique' hI + intro j + simp [I] + apply Finset.mem_biUnion.mpr + refine ⟨⟨I,hI⟩,Finset.mem_univ _,?_⟩ + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,fun j=>by rw [hei];exact he j⟩ + +lemma occurrences_trans {n m l : ℕ} (s : Fin n→α) (f : Fin m→α) (g : Fin l→α) + (hf : s∈occurrences f) (hg : f∈occurrences g) : s∈occurrences g := by + obtain ⟨e,he⟩:=(mem_occurrences_iff s f).mp hf + obtain ⟨d,hd⟩:=(mem_occurrences_iff f g).mp hg + apply (mem_occurrences_iff s g).mpr + exact ⟨d.trans e,fun i=>(he (d i)).trans (hd i)⟩ + +theorem retained_entropy [Nonempty α] {N n l : ℕ} (hn : n≤N) (hl : l≤n) + (p : Law Ω) (stream : Ω→Fin N→α) (x : Ω→Fin n→α) (S : Ω→Finset (Fin n)) + (hselect : ∀ a,0

retainedTuple hl (x a) (S a))) := by + have hh := selected_entropy (hl.trans hn) + (pair p stream (fun a=>retainedTuple hl (x a) (S a))) C hC + (by simpa only [first_pair] using hdens) id (by + intro s f hp + obtain ⟨a,ha,he⟩:=map_positive p (fun a=>(stream a,retainedTuple hl (x a) (S a))) (s,f) hp + cases he + exact Or.inl (occurrences_trans _ _ _ (hselect a ha) (retainedTuple_occurs hl _ _))) + simpa only [second_pair] using hh +end +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Streams/SelectedLength.lean b/lean/OAI/Combinatorics/RamseyFive/Streams/SelectedLength.lean new file mode 100644 index 0000000000000000000000000000000000000000..8590f757e9ae599556185786f79e5ab67c874a5a --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Streams/SelectedLength.lean @@ -0,0 +1,86 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Marking.HighNumerics +import OAI.Combinatorics.RamseyFive.Decoding.HighRoundNumbers +import OAI.Combinatorics.RamseyFive.Streams.HighSampleContradiction +import OAI.Combinatorics.RamseyFive.Entropy.DeletionNumerics + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple + +section +open FiniteEntropy +noncomputable section +variable {Ω α β : Type} [Fintype Ω] [Fintype α] [Fintype β] + {N n : ℕ} {admissible : (Fin N→α)→Prop} +omit [Fintype β] in +lemma SelectedStream.length_le_source (S : SelectedStream (Ω:=Ω) (β:=β) N n admissible) : n≤N := by + obtain ⟨z,hz⟩:=S.law.exists_positive + obtain ⟨e,he⟩:=(mem_occurrences_iff _ _).mp (S.selected z hz) + have h:=Fintype.card_le_of_injective e e.injective + simpa only [Fintype.card_fin] using h +end +end + +open Module ProjectiveIncidence FiniteEntropy Windows Marking HighSamples Filter ParameterHierarchy +open scoped Classical BigOperators LinearAlgebra.Projectivization +noncomputable section + +theorem eventually_high_prepared_impossible {η : ℝ} (hη : 0<η) (c C Cb : ℝ) + (hc : 0Finset.univ) + (D*σ^(3*beta η)) hd hσ hq hα hN hlN (by omega) hlen hC + (by simpa only [hq] using hhhi) + apply hi.trans + have hm:=mul_le_mul_of_nonneg_left hfour' (by positivity : (0:ℝ)≤2*n) + have hd':=mul_le_mul_of_nonneg_left hbudget (by norm_num : (0:ℝ)≤5) + norm_num only [Nat.cast_mul,Nat.cast_ofNat] at * + nlinarith [(Nat.cast_nonneg n : (0:ℝ)≤n)] +end + +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Streams/SelectedTuple.lean b/lean/OAI/Combinatorics/RamseyFive/Streams/SelectedTuple.lean new file mode 100644 index 0000000000000000000000000000000000000000..e40b8cc2f700f90c2c9f28d9b3e646e140477d7a --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Streams/SelectedTuple.lean @@ -0,0 +1,134 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.Law + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple +open scoped BigOperators Classical +open FiniteEntropy +variable {α ι : Type*} [Fintype α] [Fintype ι] + +noncomputable def completionEquiv (I : Finset ι) (v : I → α) : + {s : ι → α // ∀ i : I,s i.val = v i} ≃ ({i : ι // i ∉ I} → α) where + toFun s i := s.val i.val + invFun w := ⟨fun i => if h : i ∈ I then v ⟨i,h⟩ else w ⟨i,h⟩,by + intro i + simp only [i.property, dite_true]⟩ + left_inv s := by + apply Subtype.ext + funext i + by_cases hi : i ∈ I + · simp only [hi,dite_true] + exact (s.property ⟨i,hi⟩).symm + · simp only [hi,dite_false] + right_inv w := by + funext i + simp only [i.property,dite_false] + +lemma completion_count (I : Finset ι) (v : I → α) : + (Finset.univ.filter fun s : ι → α => ∀ i : I,s i.val = v i).card = + Fintype.card α ^ (Fintype.card ι-I.card) := by + classical + have he := Fintype.card_congr (completionEquiv I v) + rw [Fintype.card_fun,Fintype.card_subtype_compl,Fintype.card_coe] at he + simpa only [Fintype.card_subtype] using he + +variable {N l : ℕ} + +noncomputable def matching (I : {I : Finset (Fin N) // I.card=l}) + (f : Fin l → α) : Finset (Fin N → α) := + Finset.univ.filter fun s => ∀ j,s (I.val.orderEmbOfFin I.property j) = f j + +lemma matching_count (I : {I : Finset (Fin N) // I.card=l}) (f : Fin l → α) : + (matching I f).card = Fintype.card α ^ (N-l) := by + let e := I.val.orderIsoOfFin I.property + have he : matching I f = Finset.univ.filter fun s : Fin N → α => + ∀ i : I.val,s i.val = f (e.symm i) := by + ext s + simp only [matching,Finset.mem_filter,Finset.mem_univ,true_and] + constructor + · intro hs i + have h := hs (e.symm i) + have hi : I.val.orderEmbOfFin I.property (e.symm i) = i.val := + congrArg Subtype.val (e.apply_symm_apply i) + rwa [hi] at h + · intro hs j + have h := hs (e j) + change s (I.val.orderEmbOfFin I.property j) = f (e.symm (e j)) at h + simpa only [e.symm_apply_apply] using h + rw [he] + convert (completion_count I.val (fun i => f (e.symm i))) using 1 + · congr + exact Subsingleton.elim _ _ + · simp only [Fintype.card_fin,I.property] + +noncomputable def occurrences (f : Fin l → α) : Finset (Fin N → α) := + Finset.univ.biUnion fun I : {I : Finset (Fin N) // I.card=l} => matching I f + +lemma position_set_count : Fintype.card {I : Finset (Fin N) // I.card=l} = N.choose l := by + classical + have he : (Finset.univ.filter fun I : Finset (Fin N) => I.card=l) = + Finset.univ.powersetCard l := by ext I; simp + rw [Fintype.card_subtype,he,Finset.card_powersetCard,Finset.card_univ,Fintype.card_fin] + +theorem occurrence_count (f : Fin l → α) : + (occurrences (N := N) f).card ≤ N.choose l * Fintype.card α^(N-l) := by + calc + _ ≤ ∑ I : {I : Finset (Fin N) // I.card=l},(matching I f).card := + Finset.card_biUnion_le + _ = _ := by simp only [matching_count,Finset.sum_const,Finset.card_univ, + nsmul_eq_mul,position_set_count,Nat.cast_id] + +theorem selected_atom [Nonempty α] (hl : l ≤ N) + (p : Law ((Fin N → α) × (Fin l → α))) (C : ℝ) (hC : 0 ≤ C) + (hstream : ∀ s,first p s ≤ C/(Fintype.card α:ℝ)^N) + (rev : (Fin l → α) → (Fin l → α)) + (hselect : ∀ s f,0 < p (s,f) → + s ∈ occurrences f ∨ s ∈ occurrences (rev f)) (f : Fin l → α) : + second p f ≤ 2*C*(N.choose l:ℝ)/(Fintype.card α:ℝ)^l := by + classical + let E := occurrences (N := N) f ∪ occurrences (N := N) (rev f) + have hm : 0 < (Fintype.card α:ℝ) := by exact_mod_cast Fintype.card_pos + have hmass : second p f ≤ ∑ s∈E,first p s := by + change (∑ s,p (s,f)) ≤ _ + calc + _ ≤ ∑ s,if s∈E then first p s else 0 := by + apply Finset.sum_le_sum + intro s _ + by_cases hs : s ∈ E + · simp only [hs,ite_true] + exact le_first p s f + · simp only [hs,ite_false] + apply le_of_not_gt + intro hp + exact hs (Finset.mem_union.mpr (hselect s f hp)) + _ = _ := by rw [←Finset.sum_filter,Finset.filter_univ_mem] + have hc : E.card ≤ 2*(N.choose l*Fintype.card α^(N-l)) := by + exact (Finset.card_union_le _ _).trans ((add_le_add (occurrence_count f) + (occurrence_count (rev f))).trans_eq (by ring)) + have hc' : (E.card:ℝ) ≤ 2*((N.choose l:ℝ)*(Fintype.card α:ℝ)^(N-l)) := by + exact_mod_cast hc + calc + second p f ≤ ∑ s∈E,first p s := hmass + _ ≤ ∑ _s∈E,C/(Fintype.card α:ℝ)^N := Finset.sum_le_sum fun s _ => hstream s + _ = (E.card:ℝ)*(C/(Fintype.card α:ℝ)^N) := by simp + _ ≤ 2*((N.choose l:ℝ)*(Fintype.card α:ℝ)^(N-l))*(C/(Fintype.card α:ℝ)^N) := + mul_le_mul_of_nonneg_right hc' (div_nonneg hC (pow_nonneg hm.le _)) + _ = _ := by + have he : (Fintype.card α:ℝ)^N = (Fintype.card α:ℝ)^(N-l)*(Fintype.card α:ℝ)^l := by + rw [←pow_add,Nat.sub_add_cancel hl] + rw [he] + field_simp + +theorem selected_entropy [Nonempty α] (hl : l ≤ N) + (p : Law ((Fin N → α) × (Fin l → α))) (C : ℝ) (hC : 0 ≤ C) + (hstream : ∀ s,first p s ≤ C/(Fintype.card α:ℝ)^N) + (rev : (Fin l → α) → (Fin l → α)) + (hselect : ∀ s f,0 < p (s,f) → + s ∈ occurrences f ∨ s ∈ occurrences (rev f)) : + -Real.log (2*C*(N.choose l:ℝ)/(Fintype.card α:ℝ)^l) ≤ entropy (second p) := + atom_bound_entropy (second p) _ (selected_atom hl p C hC hstream rev hselect) + +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Trees/AmbientEviction.lean b/lean/OAI/Combinatorics/RamseyFive/Trees/AmbientEviction.lean new file mode 100644 index 0000000000000000000000000000000000000000..f4c20d527e21075b603205d2505ec4565d20cabb --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Trees/AmbientEviction.lean @@ -0,0 +1,56 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.GuardedNodeOriginal + +namespace OAI + +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical BigOperators +variable {A Ω : Type*} [Fintype A] [Fintype Ω] + +noncomputable def ambientTest : Option (Finset A)→Finset A + | none => Finset.univ + | some Y => Y + +lemma not_mem_ambientTest (a : A) (Y : Option (Finset A)) : + a∉ambientTest Y ↔ Excludes a Y := by cases Y <;> simp [ambientTest,Excludes] + +lemma evictionFraction_ambient (X : Finset A) (Y : Option (Finset A)) : + evictionFraction X (ambientTest Y)=∑a,uniformWeight X a*(if Excludes a Y then (1:ℝ) else 0) := by + have hs : X\ambientTest Y=(Finset.univ.filter fun a=>Excludes a Y)∩X := by + ext a + simp only [Finset.mem_sdiff,Finset.mem_inter,Finset.mem_filter,Finset.mem_univ, + true_and,not_mem_ambientTest,and_comm] + unfold evictionFraction + rw [hs,←sum_uniformWeight] + simp only [Finset.sum_filter,mul_ite,mul_one,mul_zero] + +lemma expected_ambient_eviction (p : Law Ω) (X : Finset A) (C : Ω→Option (Finset A)) : + (∑ω,p ω*evictionFraction X (ambientTest (C ω)))= + ∑a,uniformWeight X a*eventMass p (Finset.univ.filter fun ω=>Excludes a (C ω)) := by + simp_rw [evictionFraction_ambient] + simp only [eventMass,Finset.sum_filter,Finset.mul_sum] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro a _ + apply Finset.sum_congr rfl + intro ω _ + split_ifs <;> ring + +theorem adaptive_ambient_eviction {B ι κ Θ Ξ : Type*} + [Fintype B] [Fintype ι] [Fintype κ] [Fintype Θ] [Fintype Ξ] + (R : A→B→Prop) (p : Law A) (r : Law B) + (μ : Law ι) (ν : Law κ) (X : ι→Finset A) (Y : κ→Finset B) + (prior : ι→κ→Law Θ) (tests : ι→κ→Θ→Law Ξ) (cap : Ξ→Option (Finset B)) + (B₀ L : ℝ) (hB₀ : 0≤B₀) (hL : 0≤L) + (hX : ∀a,(∑i,μ i*uniformWeight (X i) a)≤L*p a) + (hY : ∀b,(∑j,ν j*uniformWeight (Y j) b)≤L*r b) + (hlocal : ∀i j θ b,eventMass (tests i j θ) (Finset.univ.filter fun ξ=>Excludes b (cap ξ))≤ + B₀*((((Finset.univ.filter fun a=>R a b)∩X i).card:ℝ)/(X i).card)) : + (∑i,∑j,μ i*ν j*(∑θ,prior i j θ*(∑ξ,tests i j θ ξ* + evictionFraction (Y j) (ambientTest (cap ξ)))))≤B₀*L^2*relationMass R p r := by + simp_rw [expected_ambient_eviction] + exact adaptive_rejection_average R p r μ ν X Y prior _ B₀ L hB₀ hL hX hY hlocal +end SharpRamseyFive.ReverseCap + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Trees/EncodedTreePotential.lean b/lean/OAI/Combinatorics/RamseyFive/Trees/EncodedTreePotential.lean new file mode 100644 index 0000000000000000000000000000000000000000..f29220fe4fda6f926ae86e623b43f46d02057f60 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Trees/EncodedTreePotential.lean @@ -0,0 +1,76 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Trees.PivotTree + +namespace OAI + +namespace SharpRamseyFive.TreeCodec +open BinaryTree +open scoped Classical +universe u v w z +variable {A : Type u} {C : Type v} [Fintype C] + (Ω : A→C→Type w) (M : ∀a c,Ω a c→Type z) + (left right : ∀a c t,M a c t→C) + (enc : ∀a c t,Option (M a c t)) + +omit [Fintype C] in +theorem encoded_potential_le (φ : C→ℝ) (B : ℝ) (hφ : ∀c,0≤φ c) (hB : 0≤B) + (hsplit : ∀a c t m,enc a c t=some m→φ (left a c t m)+φ (right a c t m)≤φ c+B) + (b : BinaryTree A) (ω : Tape Ω b) (c : C) : + cost Ω M left right (fun _ c _ _=>φ c) b ω c (encoded Ω M left right enc b ω c)≤ + b.height*(φ c+B*b.numNodes) := by + induction b generalizing c with + | nil => simp [cost] + | node a l r ihl ihr => + cases he : enc a c (ω.1 c) with + | none => + simp only [encoded,he,Option.map_none,cost] + exact mul_nonneg (Nat.cast_nonneg _) (add_nonneg (hφ c) (mul_nonneg hB (Nat.cast_nonneg _))) + | some m => + have hl := ihl ω.2.1 (left a c (ω.1 c) m) + have hr := ihr ω.2.2 (right a c (ω.1 c) m) + have hL : (l.height:ℝ)≤ max l.height r.height := by exact_mod_cast le_max_left l.height r.height + have hR : (r.height:ℝ)≤ max l.height r.height := by exact_mod_cast le_max_right l.height r.height + have hl' := hl.trans (mul_le_mul_of_nonneg_right hL + (add_nonneg (hφ _) (mul_nonneg hB (Nat.cast_nonneg l.numNodes)))) + have hr' := hr.trans (mul_le_mul_of_nonneg_right hR + (add_nonneg (hφ _) (mul_nonneg hB (Nat.cast_nonneg r.numNodes)))) + have hs := mul_le_mul_of_nonneg_left (hsplit a c (ω.1 c) m he) (Nat.cast_nonneg (max l.height r.height)) + simp only [encoded,he,Option.map_some,cost,BinaryTree.height,BinaryTree.numNodes, + Nat.cast_add,Nat.cast_one] + nlinarith only [hl',hr',hs,mul_nonneg hB (Nat.cast_nonneg l.numNodes), + mul_nonneg hB (Nat.cast_nonneg r.numNodes),hB] + +omit [Fintype C] in +theorem encoded_cost_linear (φ : C→ℝ) (lc : ∀a c t,M a c t→ℝ) + (X D : ℝ) (hD : 0≤D) + (hlc : ∀a c t m,enc a c t=some m→lc a c t m≤X*φ c+D) + (b : BinaryTree A) (ω : Tape Ω b) (c : C) : + cost Ω M left right lc b ω c (encoded Ω M left right enc b ω c)≤ + X*cost Ω M left right (fun _ c _ _=>φ c) b ω c (encoded Ω M left right enc b ω c)+D*b.numNodes := by + induction b generalizing c with + | nil => simp [cost] + | node a l r ihl ihr => + cases he : enc a c (ω.1 c) with + | none => simp only [encoded,he,Option.map_none,cost,mul_zero,zero_add];positivity + | some m => + have hl := ihl ω.2.1 (left a c (ω.1 c) m) + have hr := ihr ω.2.2 (right a c (ω.1 c) m) + have hs := hlc a c (ω.1 c) m he + simp only [encoded,he,Option.map_some,cost,BinaryTree.numNodes,Nat.cast_add,Nat.cast_one] + linarith only [hl,hr,hs] + +omit [Fintype C] in +theorem encoded_cost_le (φ : C→ℝ) (lc : ∀a c t,M a c t→ℝ) + (B X D : ℝ) (hφ : ∀c,0≤φ c) (hB : 0≤B) (hX : 0≤X) (hD : 0≤D) + (hsplit : ∀a c t m,enc a c t=some m→φ (left a c t m)+φ (right a c t m)≤φ c+B) + (hlc : ∀a c t m,enc a c t=some m→lc a c t m≤X*φ c+D) + (b : BinaryTree A) (ω : Tape Ω b) (c : C) : + cost Ω M left right lc b ω c (encoded Ω M left right enc b ω c)≤ + X*b.height*(φ c+B*b.numNodes)+D*b.numNodes := by + have hc := encoded_cost_linear Ω M left right enc φ lc X D hD hlc b ω c + have hp := mul_le_mul_of_nonneg_left + (encoded_potential_le Ω M left right enc φ B hφ hB hsplit b ω c) hX + nlinarith only [hc,hp] +end SharpRamseyFive.TreeCodec + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Trees/FiniteNodeSent.lean b/lean/OAI/Combinatorics/RamseyFive/Trees/FiniteNodeSent.lean new file mode 100644 index 0000000000000000000000000000000000000000..f80f3e1da1890dead24e4084ce80a4ef5ae8990b --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Trees/FiniteNodeSent.lean @@ -0,0 +1,54 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.FourFinitePredictor + +namespace OAI + +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical +variable {A B : Type*} [Fintype A] [Fintype B] +lemma freshEncoded_valid (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hCW : C⊆W) (n : ℕ) (q M : ℝ) (t : FreshTape W n q) + (m : FreshMessage W n q) (hm : freshEncoded R S U C W hCW n q M t=some m) : + ValidCap S U M (U∩freshDecoded R W n q t m) := by + have hh := freshEncoded_decoded R S U C W hCW n q M t + rw [hm,Option.map_some] at hh + obtain ⟨row,hr,he⟩ := Option.map_eq_some_iff.mp hh.symm + have hi := (firstAccepted_index _ _ hr).choose_spec.2 + rw [←he,cap_inter] + exact ⟨cap_subset _ _ _ _,(Finset.mem_filter.mp hi).2.2⟩ + +lemma universalFreshEncoded_valid (R : A→B→Prop) (S U : Finset A) + (C W : Finset B) (hCW : C⊆W) (H : ℕ) (n : Fin (H+1)) (q M : ℝ) + (t : UniversalFresh B H q) (m : UniversalFreshMessage W H q) + (hm : universalFreshEncoded R S U C W hCW H n q M t=some m) : + ValidCap S U M (U∩universalFreshDecoded R W H q t m) := by + unfold universalFreshEncoded at hm + split_ifs at hm with hW + obtain ⟨f,hf,he⟩ := Option.map_eq_some_iff.mp hm + subst m + simp only [universalFreshDecoded,dite_eq_left hW] + exact freshEncoded_valid R S U C W hCW n q M _ f hf +end SharpRamseyFive.ReverseCap + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry +open scoped Classical LinearAlgebra.Projectivization +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + +omit [Finite K] [FiniteDimensional K V] in +lemma finiteNode_sent_valid (pred : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (A UA : Finset (ℙ K V)) (B UB : Finset (ℙ K (Dual K V))) + (H : ℕ) (nA nB : Fin (H+1)) (q MA MB c M : ℝ) + (t : FiniteNodeTape pred H q) (m : FiniteNodeMessage pred UB H q t) + (hm : finiteNodeEncoded pred A UA B UB H nA nB q MA MB c M t=some m) : + ValidCap B UB MB (UB∩(finiteNodeDecoded pred UB H q t m).1) ∧ + ValidCap A UA MA (UA∩(finiteNodeDecoded pred UB H q t m).2) := by + have hp := (finiteNode_prefixes pred A UA B UB H nA nB q MA MB c M t m hm).2.2 + have hh := ambientPair_prefixes A UA B UB (pred.decoded t.1 m.1) H nA nB q MA MB t.2 m.2 hp + exact ⟨hh.2.1,universalFreshEncoded_valid _ _ _ _ _ _ _ _ _ _ _ _ hh.2.2⟩ +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Trees/HistoryPrivateStream.lean b/lean/OAI/Combinatorics/RamseyFive/Trees/HistoryPrivateStream.lean new file mode 100644 index 0000000000000000000000000000000000000000..b848a4b0486c88b4141cd26bca31fcd168e415d8 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Trees/HistoryPrivateStream.lean @@ -0,0 +1,82 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.OriginalHistoryPrivate +import OAI.Combinatorics.RamseyFive.Streams.DependentPrivateStream +import OAI.Combinatorics.RamseyFive.Streams.MiddleStream +import OAI.Combinatorics.RamseyFive.Marking.AllHistoryWindowLoss + +namespace OAI + +namespace SharpRamseyFive.SelectedTuple +open Module ProjectiveIncidence FiniteEntropy Windows Marking +open scoped Classical LinearAlgebra.Projectivization +noncomputable section +variable {K V Ω κ α : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype Ω] [Fintype κ] [Fintype α] + {N w n : ℕ} [Nonempty (Fin n)] {admissible : (Fin N→α)→Prop} +local instance hpsBDE : DecidableEq (Fin w×Bool) := Classical.decEq _ +local instance hpsTDE : DecidableEq (Fin w×Fin (2*n)) := Classical.decEq _ +local instance hpsIDE : DecidableEq (Slots w n) := Classical.decEq _ + +abbrev WindowLiftSample (Ω K V : Type) [Field K] [AddCommGroup V] [Module K V] + (w n steps : ℕ) := Ω×(BlockHistory (Fin w×Bool) (Fin n) (Fin w×Fin (2*n)) (FlagPair K V) steps× + (Fin w×Bool→Fin n)) + +def windowTuple (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (w*(4*n)) admissible) + (a : Ω) : Slots w n→FlagPair K V := fun i=>S.tuple a (slotEmbedding i) + +def actualWindowHistory (ctx : Ω→κ) (steps : ℕ) (z : WindowLiftSample Ω K V w n steps) : + WindowHistory κ K V w n steps := ((ctx z.1,z.2.1),z.2.2) + +def historyStream (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (w*(4*n)) admissible) + (ctx : Ω→κ) (elig : κ→Fin w×Bool→Finset (Fin n)) (steps : ℕ) : + SelectedStream (Ω:=WindowLiftSample Ω K V w n steps) (β:=FlagPair K V) N (w*(4*n)) admissible := + S.augment (fun a=>fiber (historyObservationLaw (first (pair S.law ctx (windowTuple S))) + (fiber (pair S.law ctx (windowTuple S))) elig steps) (ctx a,windowTuple S a)) + +omit [Finite K] [FiniteDimensional K V] in +lemma historyStream_law (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (w*(4*n)) admissible) + (ctx : Ω→κ) (elig : κ→Fin w×Bool→Finset (Fin n)) (steps : ℕ) : + (historyStream S ctx elig steps).law=originalHistoryLaw S.law ctx (windowTuple S) elig steps := rfl + +def historyPrivateStream (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (w*(4*n)) admissible) + (ctx : Ω→κ) (elig : κ→Fin w×Bool→Finset (Fin n)) (steps : ℕ) + (Γ : WindowHistory κ K V w n steps→Type) [∀h,Fintype (Γ h)] + (q : ∀h,Law (Γ h)) : + SelectedStream (Ω:=Σz : WindowLiftSample Ω K V w n steps,Γ (actualWindowHistory ctx steps z)) + (β:=FlagPair K V) N (w*(2*n)) admissible := + ((historyStream S ctx elig steps).reindex (middleEmbedding w n)).augmentSigma + (fun z=>q (actualWindowHistory ctx steps z)) + +omit [Finite K] [FiniteDimensional K V] in +lemma historyPrivateStream_density (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (w*(4*n)) admissible) + (ctx : Ω→κ) (elig : κ→Fin w×Bool→Finset (Fin n)) (steps : ℕ) + (Γ : WindowHistory κ K V w n steps→Type) [∀h,Fintype (Γ h)] (q : ∀h,Law (Γ h)) : + (historyPrivateStream S ctx elig steps Γ q).density=S.density := rfl + +omit [Finite K] [FiniteDimensional K V] in +lemma historyPrivateStream_tuple (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (w*(4*n)) admissible) + (ctx : Ω→κ) (elig : κ→Fin w×Bool→Finset (Fin n)) (steps : ℕ) + (Γ : WindowHistory κ K V w n steps→Type) [∀h,Fintype (Γ h)] (q : ∀h,Law (Γ h)) + (z : Σz : WindowLiftSample Ω K V w n steps,Γ (actualWindowHistory ctx steps z)) + (i : Fin (w*(2*n))) : + (historyPrivateStream S ctx elig steps Γ q).tuple z i= + windowTuple S z.1.1 (Sum.inr (finProdFinEquiv.symm i)) := rfl + +omit [Finite K] [FiniteDimensional K V] in +lemma historyPrivateStream_mean {Θ : Type} [Fintype Θ] + (S : SelectedStream (Ω:=Ω) (β:=FlagPair K V) N (w*(4*n)) admissible) + (ctx : Ω→κ) (elig : κ→Fin w×Bool→Finset (Fin n)) (steps : ℕ) + (Γ : WindowHistory κ K V w n steps→Type) [∀h,Fintype (Γ h)] (q : ∀h,Law (Γ h)) + (tables : Law Θ) + (F : (h : WindowHistory κ K V w n steps)→(Slots w n→FlagPair K V)→Γ h→Θ→ℝ) : + mean (adaptiveLaw (historyPrivateStream S ctx elig steps Γ q).law (fun _=>tables)) + (fun z=>F (actualWindowHistory ctx steps z.1.1) (windowTuple S z.1.1.1) z.1.2 z.2)= + mean (preRoundLaw (first (pair S.law ctx (windowTuple S))) (fiber (pair S.law ctx (windowTuple S))) elig steps) + (fun h=>mean (windowPosterior (fiber (pair S.law ctx (windowTuple S))) h) + (fun x=>mean (q h) (fun v=>mean tables (F h x v)))) := by + exact originalHistory_private_mean S.law ctx (windowTuple S) elig steps Γ q tables F +end +end SharpRamseyFive.SelectedTuple + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Trees/IntegerWindows.lean b/lean/OAI/Combinatorics/RamseyFive/Trees/IntegerWindows.lean new file mode 100644 index 0000000000000000000000000000000000000000..95ba2fd2662f6cf073d5beb6176552dcaae21dc3 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Trees/IntegerWindows.lean @@ -0,0 +1,60 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.ParameterHierarchy +open Filter Real +open scoped Topology +noncomputable section +lemma integral_floor_half {x : ℝ} (hx : 2≤x) : + 0<⌊x⌋₊ ∧ x/2≤(⌊x⌋₊:ℝ) ∧ (⌊x⌋₊:ℝ)≤x := by + have hh:=Nat.lt_floor_add_one x + exact ⟨Nat.floor_pos.mpr (by linarith),by linarith,Nat.floor_le (by linarith)⟩ +lemma integral_window_packing (m n : ℕ) (hn : 0 nlinarith +lemma integral_round_packing {x : ℝ} (hx : 2≤x) (n : ℕ) (hxhi : 2*x≤n) : + let T:=⌊x⌋₊ + let rem:=n-T + 0 .nil + | n+1 => .node (lo+n/2) (balanced lo (n/2)) + (balanced (lo+n/2+1) (n-n/2)) +termination_by n => n + +def inorder {α : Type*} : BinaryTree α → List α + | .nil => [] + | .node a l r => inorder l ++ a :: inorder r + +lemma balanced_nodes (lo n : ℕ) : (balanced lo n).numNodes=n := by + induction n using Nat.strong_induction_on generalizing lo with + | h n ih => + cases n with + | zero => simp [balanced] + | succ n => + rw [balanced,BinaryTree.numNodes,ih (n/2) (by omega),ih (n-n/2) (by omega)] + omega + +lemma balanced_height (H lo n : ℕ) (hn : n<2^H) : + (balanced lo n).height≤H := by + induction H generalizing lo n with + | zero => + have : n=0 := by simpa using hn + subst n + simp [balanced] + | succ H ih => + cases n with + | zero => simp [balanced] + | succ n => + rw [pow_succ] at hn + have hl : n/2<2^H := by omega + have hr : n-n/2<2^H := by omega + simp only [balanced,BinaryTree.height] + exact Nat.succ_le_succ (max_le (ih lo (n/2) hl) (ih _ _ hr)) + +lemma balanced_inorder (lo n : ℕ) : inorder (balanced lo n)=List.range' lo n := by + induction n using Nat.strong_induction_on generalizing lo with + | h n ih => + cases n with + | zero => simp [balanced,inorder] + | succ n => + rw [balanced,inorder,ih (n/2) (by omega),ih (n-n/2) (by omega)] + rw [←List.range'_succ] + have he : lo+n/2=lo+1*(n/2) := by omega + rw [he,List.range'_append] + have he' : n/2+(n-n/2+1)=n+1 := by omega + rw [he'] + +def rootValue {α : Type*} (f : α→ℝ) : BinaryTree α→ℝ + | .nil => 0 + | .node a _ _ => f a + +def total {α : Type*} (f : α→ℝ) : BinaryTree α→ℝ + | .nil => 0 + | .node a l r => f a+total f l+total f r + +def Controls {α : Type*} (f : α→ℝ) (B : ℝ) : BinaryTree α→Prop + | .nil => True + | .node a l r => 0≤f a ∧ rootValue f l+rootValue f r≤f a+B ∧ + Controls f B l ∧ Controls f B r + +lemma root_nonneg {α : Type*} {f : α→ℝ} {B : ℝ} {t : BinaryTree α} + (h : Controls f B t) : 0≤rootValue f t := by + cases t with + | nil => rfl + | node a l r => exact h.1 + +theorem total_le_height {α : Type*} (f : α→ℝ) {B : ℝ} (hB : 0≤B) + (t : BinaryTree α) (ht : Controls f B t) : + total f t ≤ t.height*(rootValue f t+B*t.numNodes) := by + induction t with + | nil => simp [total,rootValue] + | node a l r ihl ihr => + obtain ⟨ha,hc,hl,hr⟩ := ht + have hln := root_nonneg hl + have hrn := root_nonneg hr + have hle : (l.height:ℝ)≤ max l.height r.height := by exact_mod_cast le_max_left l.height r.height + have hre : (r.height:ℝ)≤ max l.height r.height := by exact_mod_cast le_max_right l.height r.height + have h₁ := (ihl hl).trans (mul_le_mul_of_nonneg_right hle (add_nonneg hln (mul_nonneg hB (Nat.cast_nonneg _)))) + have h₂ := (ihr hr).trans (mul_le_mul_of_nonneg_right hre (add_nonneg hrn (mul_nonneg hB (Nat.cast_nonneg _)))) + have h₃ := mul_le_mul_of_nonneg_left hc (Nat.cast_nonneg (max l.height r.height)) + simp only [total,BinaryTree.height,BinaryTree.numNodes,rootValue,Nat.cast_add,Nat.cast_one] + nlinarith [mul_nonneg hB (Nat.cast_nonneg l.numNodes),mul_nonneg hB (Nat.cast_nonneg r.numNodes)] + +def prune {α : Type*} (keep : α→Bool) : BinaryTree α→BinaryTree α + | .nil => .nil + | .node a l r => if keep a then .node a (prune keep l) (prune keep r) else .nil + +lemma prune_height {α : Type*} (keep : α→Bool) (t : BinaryTree α) : + (prune keep t).height≤t.height := by + induction t with + | nil => rfl + | node a l r hl hr => + simp only [prune] + split + · exact Nat.succ_le_succ (max_le_max hl hr) + · exact Nat.zero_le _ + +lemma prune_nodes {α : Type*} (keep : α→Bool) (t : BinaryTree α) : + (prune keep t).numNodes≤t.numNodes := by + induction t with + | nil => rfl + | node a l r hl hr => + simp only [prune] + split + · simp only [BinaryTree.numNodes];omega + · exact Nat.zero_le _ + +end SharpRamseyFive.PivotTree + +namespace SharpRamseyFive.TreeCodec +open FiniteEntropy BinaryTree +open scoped Classical +universe u v w z +variable {A : Type u} {C : Type v} [Fintype C] + (Ω : A→C→Type w) (M : ∀a c,Ω a c→Type z) + +def Tape : BinaryTree A→Type (max v w) + | .nil => PUnit + | .node a l r => (∀c,Ω a c) × Tape l × Tape r + +noncomputable instance tapeFintype [∀a c,Fintype (Ω a c)] (t : BinaryTree A) : Fintype (Tape Ω t) := by + induction t with + | nil => exact inferInstanceAs (Fintype PUnit) + | node a l r hl hr => + letI := hl + letI := hr + exact inferInstanceAs (Fintype ((∀c,Ω a c)×Tape Ω l×Tape Ω r)) + +variable (left right : ∀a c t,M a c t→C) + +def Message : (b : BinaryTree A)→Tape Ω b→C→Type (max z v w) + | .nil,_,_ => PUnit + | .node a l r,ω,c => Option ((m : M a c (ω.1 c)) × + Message l ω.2.1 (left a c (ω.1 c) m) × Message r ω.2.2 (right a c (ω.1 c) m)) + +noncomputable instance messageFintype [∀a c t,Fintype (M a c t)] + (b : BinaryTree A) (ω : Tape Ω b) (c : C) : Fintype (Message Ω M left right b ω c) := by + induction b generalizing c with + | nil => exact inferInstanceAs (Fintype PUnit) + | node a l r hl hr => + letI (m : M a c (ω.1 c)) := hl ω.2.1 (left a c (ω.1 c) m) + letI (m : M a c (ω.1 c)) := hr ω.2.2 (right a c (ω.1 c) m) + exact inferInstanceAs (Fintype (Option ((m : M a c (ω.1 c))× + Message Ω M left right l ω.2.1 (left a c (ω.1 c) m)× + Message Ω M left right r ω.2.2 (right a c (ω.1 c) m)))) + +noncomputable def encoded (enc : ∀a c t,Option (M a c t)) : + (b : BinaryTree A)→(ω : Tape Ω b)→(c : C)→Message Ω M left right b ω c + | .nil,_,_ => PUnit.unit + | .node a l r,ω,c => (enc a c (ω.1 c)).map fun m=>⟨m, + encoded enc l ω.2.1 (left a c (ω.1 c) m), + encoded enc r ω.2.2 (right a c (ω.1 c) m)⟩ + +def retained : (b : BinaryTree A)→(ω : Tape Ω b)→(c : C)→ + Message Ω M left right b ω c→BinaryTree A + | .nil,_,_,_ => .nil + | .node _ _ _,_,_,none => .nil + | .node a l r,ω,c,some ⟨m,ml,mr⟩ => .node a + (retained l ω.2.1 (left a c (ω.1 c) m) ml) + (retained r ω.2.2 (right a c (ω.1 c) m) mr) + +omit [Fintype C] in +lemma retained_nodes_le (b : BinaryTree A) (ω : Tape Ω b) (c : C) + (m : Message Ω M left right b ω c) : + (retained Ω M left right b ω c m).numNodes≤b.numNodes := by + induction b generalizing c with + | nil => simp only [retained,BinaryTree.numNodes,le_refl] + | node a l r hl hr => + cases m with + | none => exact Nat.zero_le _ + | some m => + exact Nat.add_le_add (Nat.add_le_add (hl _ _ m.2.1) (hr _ _ m.2.2)) le_rfl + +noncomputable def cost (localCost : ∀a c t,M a c t→ℝ) : + (b : BinaryTree A)→(ω : Tape Ω b)→(c : C)→Message Ω M left right b ω c→ℝ + | .nil,_,_,_ => 0 + | .node _ _ _,_,_,none => 0 + | .node a l r,ω,c,some ⟨m,ml,mr⟩ => localCost a c (ω.1 c) m+ + cost localCost l ω.2.1 (left a c (ω.1 c) m) ml+ + cost localCost r ω.2.2 (right a c (ω.1 c) m) mr + +noncomputable def tapeLaw [∀a c,Fintype (Ω a c)] (p : ∀a c,Law (Ω a c)) : + (b : BinaryTree A)→Law (Tape Ω b) + | .nil => pureLaw PUnit.unit + | .node a l r => adaptiveLaw (piLaw (p a)) (fun _=> + adaptiveLaw (tapeLaw p l) (fun _=>tapeLaw p r)) +end SharpRamseyFive.TreeCodec + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Trees/ReachedFailure.lean b/lean/OAI/Combinatorics/RamseyFive/Trees/ReachedFailure.lean new file mode 100644 index 0000000000000000000000000000000000000000..749fe981ad9a788e6923cc4f4ba6c168a5c29264 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Trees/ReachedFailure.lean @@ -0,0 +1,145 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Trees.TreeOriginalTrims + +namespace OAI + +namespace SharpRamseyFive.TreeCodec +open FiniteEntropy BinaryTree +open scoped Classical BigOperators +noncomputable section +local instance (priority := high) allPropDecidable (P : Prop) : Decidable P := Classical.propDecidable P +universe u v w z +variable {I : Type u} {C : Type v} [Fintype C] + (Ω : I → C → Type w) [∀ i c, Fintype (Ω i c)] + (M : ∀ i c, Ω i c → Type z) (left right : ∀ i c t, M i c t → C) + (enc : ∀ i c t, Option (M i c t)) + +noncomputable def flagTest (P : ∀ i c, Ω i c → Prop) := + fun i c t => if P i c t then some () else none + +noncomputable def flagAt (P : ∀ i c, Ω i c → Prop) + (b : BinaryTree I) (ω : Tape Ω b) (c : C) (j : Address b) : Option Unit := + probe Ω M left right enc (flagTest Ω P) b ω c j + +omit [Fintype C] [∀ index context, Fintype (Ω index context)] in +lemma flagAt_mono (P Q : ∀ i c, Ω i c → Prop) + (h : ∀ i c t, P i c t → Q i c t) (b : BinaryTree I) (ω : Tape Ω b) (c : C) (j : Address b) : + flagAt Ω M left right enc P b ω c j = some () → + flagAt Ω M left right enc Q b ω c j = some () := by + induction b generalizing c with + | nil => exact nomatch j + | node i l r ihl ihr => + rcases j with j | (j | j) + · by_cases hp : P i c (ω.1 c) <;> by_cases hq : Q i c (ω.1 c) <;> simp_all [flagAt, flagTest, probe] + · cases he : enc i c (ω.1 c) with + | none => simp [flagAt, probe, he] + | some m => simpa only [flagAt, probe, he, Option.map_some, Option.elim_some] using ihl ω.2.1 (left i c (ω.1 c) m) j + · cases he : enc i c (ω.1 c) with + | none => simp [flagAt, probe, he] + | some m => simpa only [flagAt, probe, he, Option.map_some, Option.elim_some] using ihr ω.2.2 (right i c (ω.1 c) m) j + +omit [Fintype C] [∀ index context, Fintype (Ω index context)] in +lemma flagAt_or (P Q : ∀ i c, Ω i c → Prop) + (b : BinaryTree I) (ω : Tape Ω b) (c : C) (j : Address b) : + flagAt Ω M left right enc (fun i c t => P i c t ∨ Q i c t) b ω c j = some () ↔ + flagAt Ω M left right enc P b ω c j = some () ∨ + flagAt Ω M left right enc Q b ω c j = some () := by + induction b generalizing c with + | nil => exact nomatch j + | node i l r ihl ihr => + rcases j with j | (j | j) + · by_cases hp : P i c (ω.1 c) <;> by_cases hq : Q i c (ω.1 c) <;> simp [flagAt, flagTest, probe, hp, hq] + · cases he : enc i c (ω.1 c) with + | none => simp [flagAt, probe, he] + | some m => simpa only [flagAt, probe, he, Option.map_some, Option.elim_some] using ihl ω.2.1 (left i c (ω.1 c) m) j + · cases he : enc i c (ω.1 c) with + | none => simp [flagAt, probe, he] + | some m => simpa only [flagAt, probe, he, Option.map_some, Option.elim_some] using ihr ω.2.2 (right i c (ω.1 c) m) j + +omit [Fintype C] [∀ index context, Fintype (Ω index context)] in +lemma flagAt_context (P : I → C → Prop) + (b : BinaryTree I) (ω : Tape Ω b) (c : C) (j : Address b) : + flagAt Ω M left right enc (fun i c _ => P i c) b ω c j = some () ↔ + ∃ c', contextAt Ω M left right enc b ω c j = some c' ∧ P (label b j) c' := by + induction b generalizing c with + | nil => exact nomatch j + | node i l r ihl ihr => + rcases j with j | (j | j) + · simp [flagAt, flagTest, contextAt, probe, label] + · cases he : enc i c (ω.1 c) with + | none => simp [flagAt, contextAt, probe, he] + | some m => simpa only [flagAt, contextAt, probe, he, Option.map_some, Option.elim_some, label] using ihl ω.2.1 (left i c (ω.1 c) m) j + · cases he : enc i c (ω.1 c) with + | none => simp [flagAt, contextAt, probe, he] + | some m => simpa only [flagAt, contextAt, probe, he, Option.map_some, Option.elim_some, label] using ihr ω.2.2 (right i c (ω.1 c) m) j + +omit [Fintype C] [∀ index context, Fintype (Ω index context)] in +lemma flagAt_abort (b : BinaryTree I) (ω : Tape Ω b) (c : C) (j : Address b) : + flagAt Ω M left right enc (fun i c t => enc i c t = none) b ω c j = some () ↔ + abortAt Ω M left right enc b ω c j = some true := by + induction b generalizing c with + | nil => exact nomatch j + | node i l r ihl ihr => + rcases j with j | (j | j) + · cases he : enc i c (ω.1 c) <;> simp [flagAt, flagTest, abortAt, probe, he] + · cases he : enc i c (ω.1 c) with + | none => simp [flagAt, abortAt, probe, he] + | some m => simpa only [flagAt, abortAt, probe, he, Option.map_some, Option.elim_some] using ihl ω.2.1 (left i c (ω.1 c) m) j + · cases he : enc i c (ω.1 c) with + | none => simp [flagAt, abortAt, probe, he] + | some m => simpa only [flagAt, abortAt, probe, he, Option.map_some, Option.elim_some] using ihr ω.2.2 (right i c (ω.1 c) m) j + +lemma flagAt_bound (p : ∀ i c, Law (Ω i c)) (P : ∀ i c, Ω i c → Prop) + (ε : I → ℝ) (hε : ∀ i, 0≤ε i) + (hlocal : ∀ i c, eventMass (p i c) (Finset.univ.filter (P i c)) ≤ ε i) + (b : BinaryTree I) (c : C) (j : Address b) : + eventMass (tapeLaw Ω p b) (Finset.univ.filter (fun ω => + flagAt Ω M left right enc P b ω c j = some ())) ≤ ε (label b j) := by + have h := probe_event_bound Ω M left right p enc (flagTest Ω P) (fun x => x = some ()) + (by simp) ε hε ?_ b c j + · rw [eventMass_map_filter] at h + convert h using 1; congr 2 + · intro i c + rw [eventMass_map_filter] + simpa [flagTest] using hlocal i c + +theorem reached_abort_bound (p : ∀ i c, Law (Ω i c)) (ready : I → C → Prop) + (ε : I → ℝ) (hε : ∀ i, 0≤ε i) + (hlocal : ∀ i c, ready i c → + eventMass (p i c) (Finset.univ.filter (fun t => enc i c t = none)) ≤ ε i) + (b : BinaryTree I) (c : C) (j : Address b) : + eventMass (tapeLaw Ω p b) (Finset.univ.filter (fun ω => + abortAt Ω M left right enc b ω c j = some true)) ≤ + eventMass (tapeLaw Ω p b) (Finset.univ.filter (fun ω => ∃ c', + contextAt Ω M left right enc b ω c j = some c' ∧ ¬ready (label b j) c')) + ε (label b j) := by + let P := fun i c (_ : Ω i c) => ¬ ready i c + let Q := fun i c (t : Ω i c) => ready i c ∧ enc i c t = none + have hs (ω : Tape Ω b) : abortAt Ω M left right enc b ω c j = some true → + (∃ c', contextAt Ω M left right enc b ω c j = some c' ∧ ¬ ready (label b j) c') ∨ + flagAt Ω M left right enc Q b ω c j = some () := by + intro hh + have h := (flagAt_abort Ω M left right enc b ω c j).mpr hh + have h' := flagAt_mono Ω M left right enc _ (fun i c t => P i c t ∨ Q i c t) + (fun i c t ht => by by_cases hr : ready i c; exact Or.inr ⟨hr, ht⟩; exact Or.inl hr) b ω c j h + rw [flagAt_or] at h' + exact h'.imp (fun ha => (flagAt_context Ω M left right enc (fun i c => ¬ready i c) b ω c j).mp ha) id + have hg : eventMass (tapeLaw Ω p b) (Finset.univ.filter (fun ω => + flagAt Ω M left right enc Q b ω c j = some ())) ≤ ε (label b j) := by + apply flagAt_bound Ω M left right enc p Q ε hε + intro i c + by_cases hr : ready i c + · simpa [Q, hr] using hlocal i c hr + · simpa [Q, hr, eventMass] using hε i + calc + _ ≤ eventMass (tapeLaw Ω p b) (Finset.univ.filter (fun ω => + (∃ c', contextAt Ω M left right enc b ω c j = some c' ∧ ¬ready (label b j) c') ∨ + flagAt Ω M left right enc Q b ω c j = some ())) := eventMass_filter_mono _ _ _ hs + _ ≤ _ := by + have hu := eventMass_filter_union (tapeLaw Ω p b) + (fun ω => ∃ c', contextAt Ω M left right enc b ω c j = some c' ∧ ¬ready (label b j) c') + (fun ω => flagAt Ω M left right enc Q b ω c j = some ()) + convert hu.trans (add_le_add le_rfl hg) using 1; congr +end +end SharpRamseyFive.TreeCodec + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Trees/SurvivingWindows.lean b/lean/OAI/Combinatorics/RamseyFive/Trees/SurvivingWindows.lean new file mode 100644 index 0000000000000000000000000000000000000000..773169786404bc1c404a3977c2b0ac03c9d44bb8 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Trees/SurvivingWindows.lean @@ -0,0 +1,40 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.TreeShape + +namespace OAI + +namespace SharpRamseyFive.PivotTree +open TreeCodec +open scoped Classical +noncomputable section +variable {w : ℕ} + +def survivingOriginal (E : Finset (Fin w)) (hE : E.Nonempty) : Fin (E.card+1)→Fin w := + fun i=>E.orderEmbOfFin rfl ⟨min i.val (E.card-1),by + have h:=Finset.card_pos.mpr hE + omega⟩ + +lemma survivingOriginal_mem (E : Finset (Fin w)) (hE : E.Nonempty) (i : Fin (E.card+1)) : + survivingOriginal E hE i∈E := Finset.orderEmbOfFin_mem .. + +lemma survivingOriginal_monotone (E : Finset (Fin w)) (hE : E.Nonempty) : + Monotone (survivingOriginal E hE) := by + intro i j hij + apply (E.orderEmbOfFin rfl).monotone + change min i.val (E.card-1) ≤ min j.val (E.card-1) + exact min_le_min_right _ hij + +lemma survivingOriginal_address (E : Finset (Fin w)) (hE : E.Nonempty) + (j : Fin E.card) : + survivingOriginal E hE (label (finiteBalanced E.card) ((finiteRankEquiv E.card).symm j))= + E.orderEmbOfFin rfl j := by + unfold survivingOriginal + congr 1 + apply Fin.ext + change min (label (finiteBalanced E.card) ((finiteRankEquiv E.card).symm j)).val (E.card-1)=j.val + rw [finiteRankEquiv_label] + exact min_eq_left (by omega) +end +end SharpRamseyFive.PivotTree + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Trees/TargetTrims.lean b/lean/OAI/Combinatorics/RamseyFive/Trees/TargetTrims.lean new file mode 100644 index 0000000000000000000000000000000000000000..023f1f8bea2f6bf3a1c9f9b080bc34d6f4e38088 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Trees/TargetTrims.lean @@ -0,0 +1,61 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Geometry.TreeTrims + +namespace OAI + +namespace SharpRamseyFive.ReverseCap +open scoped Classical +variable {α : Type*} +lemma singleton_trim_iff (a : α) (U : Finset α) : + (({a} ∩ U).card:ℝ) < (9/10:ℝ)*({a}:Finset α).card ↔ a∉U := by + by_cases h : a∈U + · simp [Finset.singleton_inter_of_mem h, h] + norm_num + · simp [Finset.singleton_inter_of_notMem h, h] +end SharpRamseyFive.ReverseCap +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec +open scoped Classical LinearAlgebra.Projectivization BigOperators +noncomputable section +local instance (priority := high) actualTargetTrimsPropDecidable (P : Prop) : Decidable P := Classical.propDecidable P +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] +variable (f : PivotContext K V → FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : PivotContext K V → FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) +variable {I : Type} + {A B : I → Type} [∀ i, Fintype (A i)] [∀ i, Fintype (B i)] + +theorem oriented_original_point_target + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (A₀ : I → Finset (ℙ K V)) (B₀ : I → Finset (ℙ K (Dual K V))) + (hA₀ : ∀ i, (A₀ i).Nonempty) (hB₀ : ∀ i, (B₀ i).Nonempty) + (c δ τ P : ℝ) (hc : 0 ∃ C, + orientedPivotContextAt f r σ hσ hq hd.le A₀ B₀ hA₀ hB₀ c δ τ P hδ tree ω + (Finset.univ,Finset.univ) j = some C ∧ a∉C.1)) ≤ + 10 * pathBudget (fun i => (50*(Nat.card K:ℝ)/(9*(c*δ))) * + relationMass (fun b a => Incident a b) (uniformWeight (B₀ i)) (uniformWeight {a})) + (fun _ => 0) tree j := by + have h := oriented_original_point_trim f r σ hσ hq hd hq3 A₀ B₀ hA₀ hB₀ c δ τ P hc hc9 hδ hτ {a} tree j + simpa only [singleton_trim_iff] using h + +theorem oriented_original_dual_target + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (A₀ : I → Finset (ℙ K V)) (B₀ : I → Finset (ℙ K (Dual K V))) + (hA₀ : ∀ i, (A₀ i).Nonempty) (hB₀ : ∀ i, (B₀ i).Nonempty) + (c δ τ P : ℝ) (hc : 0 ∃ C, + orientedPivotContextAt f r σ hσ hq hd.le A₀ B₀ hA₀ hB₀ c δ τ P hδ tree ω + (Finset.univ,Finset.univ) j = some C ∧ b∉C.2)) ≤ + 10 * pathBudget (fun _ => 0) (fun i => (50*(Nat.card K:ℝ)/(9*(c*δ))) * + relationMass Incident (uniformWeight (A₀ i)) (uniformWeight {b})) tree j := by + have h := oriented_original_dual_trim f r σ hσ hq hd hq3 A₀ B₀ hA₀ hB₀ c δ τ P hc hc9 hδ hτ {b} tree j + simpa only [singleton_trim_iff] using h +end +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Trees/TreeDecoder.lean b/lean/OAI/Combinatorics/RamseyFive/Trees/TreeDecoder.lean new file mode 100644 index 0000000000000000000000000000000000000000..667a4367c7e4c84bcc572d06039d570b8514537c --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Trees/TreeDecoder.lean @@ -0,0 +1,157 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Trees.AmbientEviction +import OAI.Combinatorics.RamseyFive.Geometry.GuardedNode +import OAI.Combinatorics.RamseyFive.Trees.TreeExposure + +namespace OAI + +namespace SharpRamseyFive.TreeCodec +open FiniteEntropy BinaryTree +open scoped Classical +universe u v w z s +variable {A : Type u} {C : Type v} [Fintype C] + (Ω : A→C→Type w) [∀ a c,Fintype (Ω a c)] + (M : ∀ a c,Ω a c→Type z) (left right : ∀ a c t,M a c t→C) + {D : Type s} + +def decodedAt (out : ∀ a c t,M a c t→D) : + (b : BinaryTree A)→(ω : Tape Ω b)→(c : C)→ + Message Ω M left right b ω c→Address b→Option D + | .nil,_,_,_,j => nomatch j + | .node _ _ _,_,_,none,_ => none + | .node a _ _,ω,c,some ⟨m,_,_⟩,.inl _ => some (out a c (ω.1 c) m) + | .node a l _,ω,c,some ⟨m,ml,_⟩,.inr (.inl j) => + decodedAt out l ω.2.1 (left a c (ω.1 c) m) ml j + | .node a _ r,ω,c,some ⟨m,_,mr⟩,.inr (.inr j) => + decodedAt out r ω.2.2 (right a c (ω.1 c) m) mr j + +omit [Fintype C] [∀ a c, Fintype (Ω a c)] in +theorem decodedAt_encoded (enc : ∀ a c t,Option (M a c t)) + (out : ∀ a c t,M a c t→D) (b : BinaryTree A) (ω : Tape Ω b) (c : C) + (j : Address b) : + decodedAt Ω M left right out b ω c (encoded Ω M left right enc b ω c) j = + observe Ω M left right enc out b ω c j := by + induction b generalizing c with + | nil => exact nomatch j + | node a l r ihl ihr => + rcases j with j | (j | j) + · cases he:enc a c (ω.1 c) <;> simp [decodedAt,encoded,observe,probe,he] + · cases he:enc a c (ω.1 c) <;> simp [decodedAt,encoded,observe,probe,he,ihl] + · cases he:enc a c (ω.1 c) <;> simp [decodedAt,encoded,observe,probe,he,ihr] + +omit [Fintype C] [∀ a c, Fintype (Ω a c)] in +theorem observe_invariant (enc : ∀ a c t,Option (M a c t)) + (out : ∀ a c t,M a c t→D) (Valid : C→Prop) (P : A→D→Prop) + (hl : ∀ a c t m,Valid c→enc a c t=some m→Valid (left a c t m)) + (hr : ∀ a c t m,Valid c→enc a c t=some m→Valid (right a c t m)) + (ho : ∀ a c t m,Valid c→enc a c t=some m→P a (out a c t m)) + (b : BinaryTree A) (ω : Tape Ω b) (c : C) (hc : Valid c) + (j : Address b) (d : D) (h : observe Ω M left right enc out b ω c j=some d) : + P (label b j) d := by + induction b generalizing c with + | nil => exact nomatch j + | node a l r ihl ihr => + cases he:enc a c (ω.1 c) with + | none => + rcases j with j | (j | j) <;> simp [observe,probe,he] at h + | some m => + rcases j with j | (j | j) + · simp only [observe,probe,he,Option.map_some,Option.some.injEq] at h + subst d + exact ho a c (ω.1 c) m hc he + · exact ihl _ (left a c (ω.1 c) m) (hl a c (ω.1 c) m hc he) j + (by simpa [observe,probe,he] using h) + · exact ihr _ (right a c (ω.1 c) m) (hr a c (ω.1 c) m hc he) j + (by simpa [observe,probe,he] using h) +end SharpRamseyFive.TreeCodec + +namespace SharpRamseyFive.ReverseCap +open FiniteEntropy +open scoped Classical BigOperators +variable {A B Ω : Type*} [Fintype A] [Fintype B] [Fintype Ω] + +lemma cap_eviction_from_domination (p : Law Ω) (R : A → B → Prop) + (X : Finset A) (Y : Finset B) (cap : Ω → Option (Finset B)) (C : ℝ) + (hlocal : ∀ b, eventMass p (Finset.univ.filter (fun ω => Excludes b (cap ω))) ≤ + C * ((((Finset.univ.filter (fun a => R a b)) ∩ X).card : ℝ) / X.card)) : + (∑ ω, p ω * evictionFraction Y (ambientTest (cap ω))) ≤ + C * relationMass R (uniformWeight X) (uniformWeight Y) := by + rw [expected_ambient_eviction, relationMass_by_target, Finset.mul_sum] + apply Finset.sum_le_sum + intro b hb + rw [sum_uniformWeight] + have hg : 0 ≤ uniformWeight Y b := by unfold uniformWeight; positivity + have h := mul_le_mul_of_nonneg_left (hlocal b) hg + nlinarith only [h] + +end SharpRamseyFive.ReverseCap + +namespace SharpRamseyFive.ProjectiveIncidence +open Module FiniteEntropy ReverseCap ScoreGeometry BinaryTree TreeCodec +open scoped Classical LinearAlgebra.Projectivization BigOperators +variable {K V : Type} [Field K] [AddCommGroup V] [Module K V] + [Finite K] [FiniteDimensional K V] + [Fintype (ℙ K V)] [Fintype (ℙ K (Dual K V))] + [Fintype (ℙ K (Dual K (Dual K V)))] + +theorem oriented_point_cap_eviction + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) (c δ τ P : ℝ) + (hc : 0 (orientedNodeDecoded f r UA UB (1000*(Nat.card K)^2) (Nat.card K) t m).2)))) ≤ + (50*(Nat.card K:ℝ)/(9*(c*δ))) * + relationMass (fun b a => Incident a b) (uniformWeight B₀) (uniformWeight X) := by + let enc := orientedGuardedNodeEncoded f r σ hσ hq hd.le A₀ UA B₀ UB hA₀ hB₀ c δ τ P hδ + let dec := orientedNodeDecoded f r UA UB (1000*(Nat.card K)^2) (Nat.card K) + let p := orientedNodeTapeLaw f r (1000*(Nat.card K)^2) (Nat.card K) + have h := (orientedGuardedNode_original f r σ hσ hq hd hq3 A₀ UA B₀ UB + hA₀ hB₀ c δ τ P hc hc9 hδ hτ).2 + have hh := cap_eviction_from_domination (map p (fun t => (enc t).map (dec t))) + (fun b a => Incident a b) B₀ X (fun out => out.map Prod.snd) + (50*(Nat.card K:ℝ)/(9*(c*δ))) (by + intro a + have he : (Finset.univ.filter (Incident a)) ∩ B₀ = B₀.filter (Incident a) := by + ext b; simp [and_comm] + simpa only [he] using h a) + rw [sum_map] at hh + simpa only [Option.map_map, Function.comp_def, enc, dec, p] using hh + +theorem oriented_dual_cap_eviction + (f : FinitePredictor (ℙ K V) (ℙ K (Dual K V))) + (r : FinitePredictor (ℙ K (Dual K V)) (ℙ K (Dual K (Dual K V)))) + (σ : ℝ) (hσ : 1≤σ) (hq : Real.exp σ=Nat.card K) (hd : finrank K V=5) (hq3 : 3≤Nat.card K) + (A₀ UA : Finset (ℙ K V)) (B₀ UB : Finset (ℙ K (Dual K V))) + (hA₀ : A₀.Nonempty) (hB₀ : B₀.Nonempty) (c δ τ P : ℝ) + (hc : 0 (orientedNodeDecoded f r UA UB (1000*(Nat.card K)^2) (Nat.card K) t m).1)))) ≤ + (50*(Nat.card K:ℝ)/(9*(c*δ))) * + relationMass Incident (uniformWeight A₀) (uniformWeight X) := by + let enc := orientedGuardedNodeEncoded f r σ hσ hq hd.le A₀ UA B₀ UB hA₀ hB₀ c δ τ P hδ + let dec := orientedNodeDecoded f r UA UB (1000*(Nat.card K)^2) (Nat.card K) + let p := orientedNodeTapeLaw f r (1000*(Nat.card K)^2) (Nat.card K) + have h := (orientedGuardedNode_original f r σ hσ hq hd hq3 A₀ UA B₀ UB + hA₀ hB₀ c δ τ P hc hc9 hδ hτ).1 + have hh := cap_eviction_from_domination (map p (fun t => (enc t).map (dec t))) + Incident A₀ X (fun out => out.map Prod.fst) + (50*(Nat.card K:ℝ)/(9*(c*δ))) (by + intro b + have he : (Finset.univ.filter (fun a => Incident a b)) ∩ A₀ = A₀.filter (fun a => Incident a b) := by + ext a; simp [and_comm] + simpa only [he] using h b) + rw [sum_map] at hh + simpa only [Option.map_map, Function.comp_def, enc, dec, p] using hh + +end SharpRamseyFive.ProjectiveIncidence + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Trees/TreeExposure.lean b/lean/OAI/Combinatorics/RamseyFive/Trees/TreeExposure.lean new file mode 100644 index 0000000000000000000000000000000000000000..fb6c22dbe02da29e6742734adbbefc63a4dd4ed6 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Trees/TreeExposure.lean @@ -0,0 +1,218 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.ChronologicalCapDomination +import OAI.Combinatorics.RamseyFive.Trees.TreeLaw + +namespace OAI + +namespace SharpRamseyFive.TreeCodec +open FiniteEntropy BinaryTree +open scoped Classical BigOperators +universe u v w z s +variable {A : Type u} {C : Type v} [Fintype C] + (Ω : A → C → Type w) [∀ a c, Fintype (Ω a c)] + (M : ∀ a c, Ω a c → Type z) + (left right : ∀ a c t, M a c t → C) + +def Address : BinaryTree A → Type + | .nil => Empty + | .node _ l r => Unit ⊕ Address l ⊕ Address r + +noncomputable instance addressFintype (b : BinaryTree A) : Fintype (Address b) := by + induction b with + | nil => exact inferInstanceAs (Fintype Empty) + | node a l r ihl ihr => + letI := ihl + letI := ihr + exact inferInstanceAs (Fintype (Unit ⊕ Address l ⊕ Address r)) + +def label : (b : BinaryTree A) → Address b → A + | .nil, j => nomatch j + | .node a _ _, .inl _ => a + | .node _ l _, .inr (.inl j) => label l j + | .node _ _ r, .inr (.inr j) => label r j + +variable {D : Type s} + +noncomputable def probe (enc : ∀ a c t, Option (M a c t)) + (test : ∀ a c, Ω a c → Option D) : + (b : BinaryTree A) → Tape Ω b → C → Address b → Option D + | .nil, _, _, j => nomatch j + | .node a _ _, ω, c, .inl _ => test a c (ω.1 c) + | .node a l _, ω, c, .inr (.inl j) => + ((enc a c (ω.1 c)).map (left a c (ω.1 c))).elim none + (fun c' => probe enc test l ω.2.1 c' j) + | .node a _ r, ω, c, .inr (.inr j) => + ((enc a c (ω.1 c)).map (right a c (ω.1 c))).elim none + (fun c' => probe enc test r ω.2.2 c' j) + +theorem probe_event_bound [Fintype D] (p : ∀ a c, Law (Ω a c)) + (enc : ∀ a c t, Option (M a c t)) (test : ∀ a c, Ω a c → Option D) + (P : Option D → Prop) (hP : ¬ P none) (B : A → ℝ) (hB : ∀ a, 0 ≤ B a) + (hlocal : ∀ a c, eventMass (map (p a c) + (fun t => test a c t)) (Finset.univ.filter P) ≤ B a) + (b : BinaryTree A) (c : C) (j : Address b) : + eventMass (map (tapeLaw Ω p b) (fun ω => probe Ω M left right enc test b ω c j)) + (Finset.univ.filter P) ≤ B (label b j) := by + induction b generalizing c with + | nil => exact nomatch j + | node a l r ihl ihr => + rcases j with j | (j | j) + · change eventMass (map (tapeLaw Ω p (.node a l r)) + (fun ω => test a c (ω.1 c))) _ ≤ B a + rw [root_output_law Ω p a l r c (fun t => test a c t)] + exact hlocal a c + · let next : Ω a c → Option C := fun t => (enc a c t).map (left a c t) + let f : Option C → Tape Ω l → Option D := fun x ω => + x.elim none (fun c' => probe Ω M left right enc test l ω c' j) + change eventMass (map (tapeLaw Ω p (.node a l r)) + (fun ω => f (next (ω.1 c)) ω.2.1)) _ ≤ _ + rw [left_continuation_law Ω p a l r c next f, eventMass_map_filter] + apply adaptive_event_second_le + intro x + cases x with + | none => + rw [eventMass_map_filter] + simp only [f, Option.elim_none] + simp [hP, eventMass, hB] + | some c' => exact ihl c' j + · let next : Ω a c → Option C := fun t => (enc a c t).map (right a c t) + let f : Option C → Tape Ω r → Option D := fun x ω => + x.elim none (fun c' => probe Ω M left right enc test r ω c' j) + change eventMass (map (tapeLaw Ω p (.node a l r)) + (fun ω => f (next (ω.1 c)) ω.2.2)) _ ≤ _ + rw [right_continuation_law Ω p a l r c next f, eventMass_map_filter] + apply adaptive_event_second_le + intro x + cases x with + | none => + rw [eventMass_map_filter] + simp only [f, Option.elim_none] + simp [hP, eventMass, hB] + | some c' => exact ihr c' j + +noncomputable def observe (enc : ∀ a c t, Option (M a c t)) + (out : ∀ a c t, M a c t → D) : + (b : BinaryTree A) → Tape Ω b → C → Address b → Option D := + probe Ω M left right enc (fun a c t => (enc a c t).map (out a c t)) + +theorem observe_event_bound [Fintype D] (p : ∀ a c, Law (Ω a c)) + (enc : ∀ a c t, Option (M a c t)) (out : ∀ a c t, M a c t → D) + (P : Option D → Prop) (hP : ¬ P none) (B : A → ℝ) (hB : ∀ a, 0 ≤ B a) + (hlocal : ∀ a c, eventMass (map (p a c) + (fun t => (enc a c t).map (out a c t))) (Finset.univ.filter P) ≤ B a) + (b : BinaryTree A) (c : C) (j : Address b) : + eventMass (map (tapeLaw Ω p b) (fun ω => observe Ω M left right enc out b ω c j)) + (Finset.univ.filter P) ≤ B (label b j) := + probe_event_bound Ω M left right p enc _ P hP B hB hlocal b c j + +end SharpRamseyFive.TreeCodec + +namespace SharpRamseyFive.FiniteEntropy +open scoped Classical BigOperators +variable {α β : Type*} [Fintype α] [Fintype β] +lemma sum_adaptive (p : Law α) (q : α → Law β) (f : α × β → ℝ) : + (∑ z, adaptiveLaw p q z * f z) = ∑ a, p a * (∑ b, q a b * f (a,b)) := by + simp only [adaptiveLaw, Fintype.sum_prod_type, Finset.mul_sum, mul_assoc] +end SharpRamseyFive.FiniteEntropy + +namespace SharpRamseyFive.TreeCodec +open FiniteEntropy BinaryTree +open scoped Classical BigOperators +universe u v w z s +variable {A : Type u} {C : Type v} [Fintype C] + (Ω : A → C → Type w) [∀ a c, Fintype (Ω a c)] + (p : ∀ a c, Law (Ω a c)) + +lemma left_continuation_mean {D : Type s} [Fintype D] + (a : A) (l r : BinaryTree A) (c : C) + (next : Ω a c → Option C) (out : Option C → Tape Ω l → D) (f : D → ℝ) : + (∑ ω, tapeLaw Ω p (.node a l r) ω * f (out (next (ω.1 c)) ω.2.1)) = + ∑ t, p a c t * (∑ ω, tapeLaw Ω p l ω * f (out (next t) ω)) := by + have h := congrArg (fun q : Law D => ∑ x, q x * f x) + (left_continuation_law Ω p a l r c next out) + simpa only [sum_map, sum_adaptive, Prod.snd] using h + +lemma right_continuation_mean {D : Type s} [Fintype D] + (a : A) (l r : BinaryTree A) (c : C) + (next : Ω a c → Option C) (out : Option C → Tape Ω r → D) (f : D → ℝ) : + (∑ ω, tapeLaw Ω p (.node a l r) ω * f (out (next (ω.1 c)) ω.2.2)) = + ∑ t, p a c t * (∑ ω, tapeLaw Ω p r ω * f (out (next t) ω)) := by + have h := congrArg (fun q : Law D => ∑ x, q x * f x) + (right_continuation_law Ω p a l r c next out) + simpa only [sum_map, sum_adaptive, Prod.snd] using h + +variable (M : ∀ a c, Ω a c → Type z) + (left right : ∀ a c t, M a c t → C) + +noncomputable def contextAt (enc : ∀ a c t, Option (M a c t)) : + (b : BinaryTree A) → Tape Ω b → C → Address b → Option C := + probe Ω M left right enc (fun _ c _ => some c) + +def pathBudget (ρL ρR : A → ℝ) : (b : BinaryTree A) → Address b → ℝ + | .nil, j => nomatch j + | .node _ _ _, .inl _ => 0 + | .node a l _, .inr (.inl j) => ρL a + pathBudget ρL ρR l j + | .node a _ r, .inr (.inr j) => ρR a + pathBudget ρL ρR r j + +lemma pathBudget_nonneg (ρL ρR : A → ℝ) (hL : ∀ a, 0 ≤ ρL a) (hR : ∀ a, 0 ≤ ρR a) + (b : BinaryTree A) (j : Address b) : 0 ≤ pathBudget ρL ρR b j := by + induction b with + | nil => exact nomatch j + | node a l r ihl ihr => + rcases j with j | (j | j) + · exact le_rfl + · exact add_nonneg (hL a) (ihl j) + · exact add_nonneg (hR a) (ihr j) + +theorem context_cost_bound (enc : ∀ a c t, Option (M a c t)) (cost : C → ℝ) + (_hcost : ∀ c, 0 ≤ cost c) (ρL ρR : A → ℝ) + (hL : ∀ a, 0 ≤ ρL a) (hR : ∀ a, 0 ≤ ρR a) + (hleft : ∀ a c, (∑ t, p a c t * ((enc a c t).map (left a c t)).elim 0 cost) ≤ cost c + ρL a) + (hright : ∀ a c, (∑ t, p a c t * ((enc a c t).map (right a c t)).elim 0 cost) ≤ cost c + ρR a) + (b : BinaryTree A) (c : C) (j : Address b) : + (∑ ω, tapeLaw Ω p b ω * (contextAt Ω M left right enc b ω c j).elim 0 cost) ≤ + cost c + pathBudget ρL ρR b j := by + induction b generalizing c with + | nil => exact nomatch j + | node a l r ihl ihr => + rcases j with j | (j | j) + · simp only [contextAt, probe, Option.elim_some, pathBudget, ← Finset.sum_mul, + (tapeLaw Ω p (.node a l r)).sum_one, one_mul, add_zero, le_refl] + · let next : Ω a c → Option C := fun t => (enc a c t).map (left a c t) + let out : Option C → Tape Ω l → Option C := fun x ω => + x.elim none (fun c' => contextAt Ω M left right enc l ω c' j) + change (∑ ω, tapeLaw Ω p (.node a l r) ω * + (out (next (ω.1 c)) ω.2.1).elim 0 cost) ≤ cost c + (ρL a + pathBudget ρL ρR l j) + rw [left_continuation_mean Ω p a l r c next out (fun x => x.elim 0 cost)] + have ht (t : Ω a c) : (∑ ω, tapeLaw Ω p l ω * (out (next t) ω).elim 0 cost) ≤ + (next t).elim 0 cost + pathBudget ρL ρR l j := by + cases hx : next t with + | none => simpa [hx, out] using pathBudget_nonneg ρL ρR hL hR l j + | some c' => simpa [hx, out] using ihl c' j + calc + _ ≤ ∑ t, p a c t * ((next t).elim 0 cost + pathBudget ρL ρR l j) := + Finset.sum_le_sum fun t _ => mul_le_mul_of_nonneg_left (ht t) ((p a c).nonneg t) + _ = (∑ t, p a c t * (next t).elim 0 cost) + pathBudget ρL ρR l j := by + simp only [mul_add, Finset.sum_add_distrib, ← Finset.sum_mul, (p a c).sum_one, one_mul] + _ ≤ _ := by have h := hleft a c; dsimp only [next]; linarith only [h] + · let next : Ω a c → Option C := fun t => (enc a c t).map (right a c t) + let out : Option C → Tape Ω r → Option C := fun x ω => + x.elim none (fun c' => contextAt Ω M left right enc r ω c' j) + change (∑ ω, tapeLaw Ω p (.node a l r) ω * + (out (next (ω.1 c)) ω.2.2).elim 0 cost) ≤ cost c + (ρR a + pathBudget ρL ρR r j) + rw [right_continuation_mean Ω p a l r c next out (fun x => x.elim 0 cost)] + have ht (t : Ω a c) : (∑ ω, tapeLaw Ω p r ω * (out (next t) ω).elim 0 cost) ≤ + (next t).elim 0 cost + pathBudget ρL ρR r j := by + cases hx : next t with + | none => simpa [hx, out] using pathBudget_nonneg ρL ρR hL hR r j + | some c' => simpa [hx, out] using ihr c' j + calc + _ ≤ ∑ t, p a c t * ((next t).elim 0 cost + pathBudget ρL ρR r j) := + Finset.sum_le_sum fun t _ => mul_le_mul_of_nonneg_left (ht t) ((p a c).nonneg t) + _ = (∑ t, p a c t * (next t).elim 0 cost) + pathBudget ρL ρR r j := by + simp only [mul_add, Finset.sum_add_distrib, ← Finset.sum_mul, (p a c).sum_one, one_mul] + _ ≤ _ := by have h := hright a c; dsimp only [next]; linarith only [h] + +end SharpRamseyFive.TreeCodec + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Trees/TreeLaw.lean b/lean/OAI/Combinatorics/RamseyFive/Trees/TreeLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..4c2376552edbdee32fb55506c98116519d1164b5 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Trees/TreeLaw.lean @@ -0,0 +1,64 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Entropy.PublicComposition +import OAI.Combinatorics.RamseyFive.Entropy.IndependentLaw +import OAI.Combinatorics.RamseyFive.Trees.PivotTree + +namespace OAI + +namespace SharpRamseyFive.TreeCodec +open FiniteEntropy BinaryTree +open scoped Classical +universe u v w z +variable {A : Type u} {C : Type v} [Fintype C] + (Ω : A→C→Type w) [∀a c,Fintype (Ω a c)] + (p : ∀a c,Law (Ω a c)) + +lemma root_tape_law (a : A) (l r : BinaryTree A) (c : C) : + map (tapeLaw Ω p (.node a l r)) (fun ω=>ω.1 c)=p a c := by + exact (map_independent_left (piLaw (p a)) + (adaptiveLaw (tapeLaw Ω p l) (fun _=>tapeLaw Ω p r)) (fun ω=>ω c)).trans (piLaw_eval (p a) c) + +lemma root_output_law {D : Type z} [Fintype D] + (a : A) (l r : BinaryTree A) (c : C) (out : Ω a c→D) : + map (tapeLaw Ω p (.node a l r)) (fun ω=>out (ω.1 c))=map (p a c) out := by + have h := congrArg (fun q=>map q out) (root_tape_law Ω p a l r c) + simpa only [map_comp,Function.comp_def] using h + +lemma left_continuation_law {D : Type z} [Fintype D] + (a : A) (l r : BinaryTree A) (c : C) + (nextContext : Ω a c→Option C) (out : Option C→Tape Ω l→D) : + map (tapeLaw Ω p (.node a l r)) (fun ω=>out (nextContext (ω.1 c)) ω.2.1)= + map (adaptiveLaw (map (p a c) nextContext) + (fun C=>map (tapeLaw Ω p l) (out C))) Prod.snd := by + rw [tapeLaw] + have h := public_composition (piLaw (p a)) + (adaptiveLaw (tapeLaw Ω p l) (fun _=>tapeLaw Ω p r)) + (fun ω=>nextContext (ω c)) (fun C ω=>out C ω.1) + (fun C=>map (tapeLaw Ω p l) (out C)) + (fun C=>map_independent_left _ _ (out C)) + have hc : map (piLaw (p a)) (fun ω=>nextContext (ω c))=map (p a c) nextContext := by + have ht := congrArg (fun q=>map q nextContext) (piLaw_eval (p a) c) + simpa only [map_comp,Function.comp_def] using ht + rw [hc] at h + exact h + +lemma right_continuation_law {D : Type z} [Fintype D] + (a : A) (l r : BinaryTree A) (c : C) + (nextContext : Ω a c→Option C) (out : Option C→Tape Ω r→D) : + map (tapeLaw Ω p (.node a l r)) (fun ω=>out (nextContext (ω.1 c)) ω.2.2)= + map (adaptiveLaw (map (p a c) nextContext) + (fun C=>map (tapeLaw Ω p r) (out C))) Prod.snd := by + rw [tapeLaw] + have h := public_composition (piLaw (p a)) + (adaptiveLaw (tapeLaw Ω p l) (fun _=>tapeLaw Ω p r)) + (fun ω=>nextContext (ω c)) (fun C ω=>out C ω.2) + (fun C=>map (tapeLaw Ω p r) (out C)) + (fun C=>map_independent_right _ _ (out C)) + have hc : map (piLaw (p a)) (fun ω=>nextContext (ω c))=map (p a c) nextContext := by + have ht := congrArg (fun q=>map q nextContext) (piLaw_eval (p a) c) + simpa only [map_comp,Function.comp_def] using ht + rw [hc] at h + exact h +end SharpRamseyFive.TreeCodec + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Trees/TreeObservationRelations.lean b/lean/OAI/Combinatorics/RamseyFive/Trees/TreeObservationRelations.lean new file mode 100644 index 0000000000000000000000000000000000000000..7546ea6d59d385184e24bda6d67deb7cf8d39e14 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Trees/TreeObservationRelations.lean @@ -0,0 +1,57 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Trees.TreeOriginalTrims + +namespace OAI + +namespace SharpRamseyFive.TreeCodec +open FiniteEntropy BinaryTree +open scoped Classical +universe u v w z s +variable {I : Type u} {C : Type v} + (Ω : I → C → Type w) + (M : ∀ i c, Ω i c → Type z) (left right : ∀ i c t, M i c t → C) + (enc : ∀ i c t, Option (M i c t)) + {D : Type s} (out : ∀ i c t, M i c t → D) + +lemma observe_none_iff_success (b : BinaryTree I) (ω : Tape Ω b) (c : C) (j : Address b) : + observe Ω M left right enc out b ω c j = none ↔ successAt Ω M left right enc b ω c j = none := by + induction b generalizing c with + | nil => exact nomatch j + | node i l r ihl ihr => + rcases j with j | (j | j) + · simp only [successAt, observe, probe, Option.map_eq_none_iff] + · cases he : enc i c (ω.1 c) with + | none => simp only [successAt, observe, probe, he, Option.map_none, Option.elim_none] + | some m => + simpa only [successAt, observe, probe, he, Option.map_some, Option.elim_some] using + ihl ω.2.1 (left i c (ω.1 c) m) j + · cases he : enc i c (ω.1 c) with + | none => simp only [successAt, observe, probe, he, Option.map_none, Option.elim_none] + | some m => + simpa only [successAt, observe, probe, he, Option.map_some, Option.elim_some] using + ihr ω.2.2 (right i c (ω.1 c) m) j + +lemma context_none_observe (b : BinaryTree I) (ω : Tape Ω b) (c : C) (j : Address b) : + contextAt Ω M left right enc b ω c j = none → observe Ω M left right enc out b ω c j = none := by + induction b generalizing c with + | nil => exact nomatch j + | node i l r ihl ihr => + rcases j with j | (j | j) + · simp only [contextAt, probe, Option.some_ne_none, false_implies] + · cases he : enc i c (ω.1 c) with + | none => simp only [contextAt, observe, probe, he, Option.map_none, Option.elim_none, implies_true] + | some m => + simpa only [contextAt, observe, probe, he, Option.map_some, Option.elim_some] using + ihl ω.2.1 (left i c (ω.1 c) m) j + · cases he : enc i c (ω.1 c) with + | none => simp only [contextAt, observe, probe, he, Option.map_none, Option.elim_none, implies_true] + | some m => + simpa only [contextAt, observe, probe, he, Option.map_some, Option.elim_some] using + ihr ω.2.2 (right i c (ω.1 c) m) j + +lemma observe_context_coherent (b : BinaryTree I) (ω : Tape Ω b) (c : C) (j : Address b) : + observe Ω M left right enc out b ω c j ≠ none → contextAt Ω M left right enc b ω c j ≠ none := + mt (context_none_observe Ω M left right enc out b ω c j) +end SharpRamseyFive.TreeCodec + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Trees/TreeOmissionLaw.lean b/lean/OAI/Combinatorics/RamseyFive/Trees/TreeOmissionLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..241b1179b5044d898f45be5e768ed4f859a3bf0f --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Trees/TreeOmissionLaw.lean @@ -0,0 +1,55 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Trees.PivotTree + +namespace OAI + +namespace SharpRamseyFive.TreeCodec +open BinaryTree FiniteEntropy +open scoped Classical BigOperators +universe u v w z +variable {A : Type u} {C : Type v} [Fintype C] + (Ω : A→C→Type w) [∀a c,Fintype (Ω a c)] + (M : ∀a c,Ω a c→Type z) (left right : ∀a c t,M a c t→C) + (enc : ∀a c t,Option (M a c t)) (p : ∀a c,Law (Ω a c)) + +noncomputable def expectedOmission (b : BinaryTree A) (c : C) : ℝ := + ∑ω,tapeLaw Ω p b ω*((b.numNodes:ℝ)- + (retained Ω M left right b ω c (encoded Ω M left right enc b ω c)).numNodes) + +lemma expectedOmission_nonneg (b : BinaryTree A) (c : C) : + 0≤expectedOmission Ω M left right enc p b c := by + apply Finset.sum_nonneg + intro ω _ + apply mul_nonneg ((tapeLaw Ω p b).nonneg ω) + apply sub_nonneg.mpr + exact_mod_cast retained_nodes_le Ω M left right b ω c _ + +lemma expectedOmission_node (a : A) (l r : BinaryTree A) (c : C) : + expectedOmission Ω M left right enc p (.node a l r) c = + ∑t,p a c t*((enc a c t).elim ((BinaryTree.node a l r).numNodes:ℝ) + (fun m=>expectedOmission Ω M left right enc p l (left a c t m)+ + expectedOmission Ω M left right enc p r (right a c t m))) := by + rw [←piLaw_eval_expectation (p a) c] + unfold expectedOmission + simp only [tapeLaw,adaptiveLaw] + change (∑ω : (∀c,Ω a c) × Tape Ω l × Tape Ω r, _) = _ + simp only [Fintype.sum_prod_type] + apply Finset.sum_congr rfl + intro t _ + simp only [mul_assoc,←Finset.mul_sum] + congr 1 + cases he : enc a c (t c) with + | none => + simp only [encoded,he,Option.map_none,retained,Option.elim_none,BinaryTree.numNodes, + Nat.cast_zero,sub_zero] + simp only [(tapeLaw Ω p r).sum_one, + ←Finset.sum_mul,(tapeLaw Ω p l).sum_one,one_mul] + | some m => + simp only [encoded,he,Option.map_some,retained,Option.elim_some,BinaryTree.numNodes, + Nat.cast_add,Nat.cast_one] + have hsub (x y u v : ℝ) : x+y+1-(u+v+1)=(x-u)+(y-v) := by ring + simp only [hsub,mul_add,Finset.sum_add_distrib,←Finset.sum_mul, + (tapeLaw Ω p l).sum_one,(tapeLaw Ω p r).sum_one,one_mul] +end SharpRamseyFive.TreeCodec + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Trees/TreeOrder.lean b/lean/OAI/Combinatorics/RamseyFive/Trees/TreeOrder.lean new file mode 100644 index 0000000000000000000000000000000000000000..2ccad0f10234e03a6c85fdb6468850539a955269 --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Trees/TreeOrder.lean @@ -0,0 +1,158 @@ +import Mathlib +import OAI.Combinatorics.RamseyFive.Trees.TreeExposure + +namespace OAI + +namespace SharpRamseyFive.TreeCodec +open BinaryTree +open scoped Classical BigOperators +variable {I J : Type*} [Preorder I] [Preorder J] + +def Ordered : BinaryTree I→Prop + | .nil=>True + | .node a l r=>(∀ j:Address l,label l j≤a) ∧ + (∀ j:Address r,a≤label r j) ∧ Ordered l ∧ Ordered r + +omit [Preorder I] in +lemma label_mem_inorder (b : BinaryTree I) (j : Address b) : label b j∈PivotTree.inorder b := by + induction b with + | nil=>exact nomatch j + | node a l r ihl ihr=> + rcases j with j | (j | j) + · simp [label,PivotTree.inorder] + · exact List.mem_append_left _ (ihl j) + · exact List.mem_append_right _ (List.mem_cons_of_mem a (ihr j)) + +omit [Preorder I] in +lemma exists_address_of_mem (b : BinaryTree I) (a : I) (ha : a∈PivotTree.inorder b) : + ∃ j:Address b,label b j=a := by + induction b with + | nil=>simp [PivotTree.inorder] at ha + | node v l r ihl ihr=> + rcases List.mem_append.mp ha with h | h + · obtain ⟨j,hj⟩:=ihl h + exact ⟨.inr (.inl j),hj⟩ + · rcases List.mem_cons.mp h with h | h + · exact ⟨.inl (),h.symm⟩ + · obtain ⟨j,hj⟩:=ihr h + exact ⟨.inr (.inr j),hj⟩ + +lemma ordered_pathBudget_bound (b : BinaryTree I) (hb : Ordered b) (j : Address b) + (f g : I→ℝ) (ε : ℝ) (hε : 0≤ε) + (hf : ∀ a,label b j≤a→f a≤ε) (hg : ∀ a,a≤label b j → g a≤ε) : + pathBudget f g b j≤b.height*ε := by + induction b with + | nil=>exact nomatch j + | node a l r ihl ihr=> + obtain ⟨hleft,hright,hl,hr⟩:=hb + have hL : (l.height:ℝ)+1≤(BinaryTree.node a l r).height := by + simp only [BinaryTree.height,Nat.cast_add,Nat.cast_one] + exact_mod_cast Nat.add_le_add_right (le_max_left _ _) 1 + have hR : (r.height:ℝ)+1≤(BinaryTree.node a l r).height := by + simp only [BinaryTree.height,Nat.cast_add,Nat.cast_one] + exact_mod_cast Nat.add_le_add_right (le_max_right _ _) 1 + rcases j with j | (j | j) + · exact mul_nonneg (Nat.cast_nonneg _) hε + · have h1:=ihl hl j hf hg + have h2:=hf a (hleft j) + have h3:=mul_le_mul_of_nonneg_right hL hε + change f a+pathBudget f g l j≤_ + linarith + · have h1:=ihr hr j hf hg + have h2:=hg a (hright j) + have h3:=mul_le_mul_of_nonneg_right hR hε + change g a+pathBudget f g r j≤_ + linarith + +omit [Preorder I] [Preorder J] in +lemma label_map_mem (g : I→J) (b : BinaryTree I) (j : Address (b.map g)) : + ∃ k:Address b,label (b.map g) j=g (label b k) := by + induction b with + | nil=>exact nomatch j + | node a l r ihl ihr=> + rcases j with j | (j | j) + · exact ⟨.inl (),rfl⟩ + · obtain ⟨k,hk⟩:=ihl j + exact ⟨.inr (.inl k),hk⟩ + · obtain ⟨k,hk⟩:=ihr j + exact ⟨.inr (.inr k),hk⟩ + +lemma ordered_map (g : I→J) (hg : Monotone g) (b : BinaryTree I) (hb : Ordered b) : + Ordered (b.map g) := by + induction b with + | nil=>trivial + | node a l r ihl ihr=> + refine ⟨?_,?_,ihl hb.2.2.1,ihr hb.2.2.2⟩ + · intro j + obtain ⟨k,hk⟩:=label_map_mem g l j + rw [hk] + exact hg (hb.1 k) + · intro j + obtain ⟨k,hk⟩:=label_map_mem g r j + rw [hk] + exact hg (hb.2.1 k) + +omit [Preorder I] [Preorder J] in +lemma map_height (g : I→J) (b : BinaryTree I) : (b.map g).height=b.height := by + induction b with + | nil=>rfl + | node a l r ihl ihr=>simp only [BinaryTree.map,BinaryTree.height,ihl,ihr] + +omit [Preorder I] [Preorder J] in +lemma map_nodes (g : I→J) (b : BinaryTree I) : (b.map g).numNodes=b.numNodes := by + induction b with + | nil=>rfl + | node a l r ihl ihr=>simp only [BinaryTree.map,BinaryTree.numNodes,ihl,ihr] +end SharpRamseyFive.TreeCodec + +namespace SharpRamseyFive.PivotTree +open BinaryTree TreeCodec +lemma balanced_label_bounds (lo n : ℕ) (j : Address (balanced lo n)) : + lo≤label (balanced lo n) j ∧ label (balanced lo n) j omega + +lemma balanced_ordered (lo n : ℕ) : Ordered (balanced lo n) := by + induction n using Nat.strong_induction_on generalizing lo with + | h n ih=> + cases n with + | zero=>simp [balanced,Ordered] + | succ n=> + rw [balanced,Ordered] + refine ⟨?_,?_,ih _ (by omega) _,ih _ (by omega) _⟩ + · intro j + have h:=(balanced_label_bounds lo (n/2) j).2 + omega + · intro j + have h:=(balanced_label_bounds (lo+n/2+1) (n-n/2) j).1 + omega + +def finiteBalanced (n : ℕ) : BinaryTree (Fin (n+1)) := + (balanced 0 n).map (fun i=>⟨min i n,Nat.lt_succ_of_le (min_le_right _ _)⟩) + +lemma finiteBalanced_ordered (n : ℕ) : Ordered (finiteBalanced n) := by + apply ordered_map _ _ _ (balanced_ordered _ _) + intro i j h + exact min_le_min_right _ h + +lemma finiteBalanced_height (H n : ℕ) (hn : n<2^H) : (finiteBalanced n).height≤H := by + rw [finiteBalanced,map_height] + exact balanced_height H 0 n hn + +lemma finiteBalanced_nodes (n : ℕ) : (finiteBalanced n).numNodes=n := by + rw [finiteBalanced,map_nodes,balanced_nodes] + +lemma finiteBalanced_label_lt (n : ℕ) (j : Address (finiteBalanced n)) : + (label (finiteBalanced n) j).val⟨min i n,Nat.lt_succ_of_le (min_le_right _ _)⟩ : ℕ→Fin (n+1)) + (balanced 0 n) j + change (label ((balanced 0 n).map _) j).val (out i c t m).1)))) ≤ ρ i) + (b : BinaryTree I) (c : Finset A × Finset B) (j : Address b) : + (∑ ω, tapeLaw Ω p b ω * + (contextAt Ω M (capLeft Ω M out) (capRight Ω M out) enc b ω c j).elim 0 + (fun C => evictionFraction X C.1)) ≤ + evictionFraction X c.1 + pathBudget ρ (fun _ => 0) b j := by + apply context_cost_bound Ω p M (capLeft Ω M out) (capRight Ω M out) enc + (fun C => evictionFraction X C.1) (fun _ => evictionFraction_nonneg _ _) ρ (fun _ => 0) + hρ (fun _ => le_rfl) + · intro i c + convert optional_inter_drift (p i c) X c.1 + (fun t => (enc i c t).map (fun m => (out i c t m).1)) (ρ i) (hcap i c) using 1 + apply Finset.sum_congr rfl + intro t ht + cases enc i c t <;> rfl + · intro i c + simpa only [add_zero] using (show + (∑ t, p i c t * ((enc i c t).map (capRight Ω M out i c t)).elim 0 + (fun C => evictionFraction X C.1)) ≤ evictionFraction X c.1 from by + convert optional_constant_drift (p i c) (enc i c) (evictionFraction X c.1) + (evictionFraction_nonneg _ _) using 1 + apply Finset.sum_congr rfl + intro t ht + cases enc i c t <;> rfl) + +theorem second_context_eviction (enc : ∀ i c t, Option (M i c t)) + (X : Finset B) (ρ : I → ℝ) (hρ : ∀ i, 0 ≤ ρ i) + (hcap : ∀ i c, (∑ t, p i c t * evictionFraction X + (ambientTest ((enc i c t).map (fun m => (out i c t m).2)))) ≤ ρ i) + (b : BinaryTree I) (c : Finset A × Finset B) (j : Address b) : + (∑ ω, tapeLaw Ω p b ω * + (contextAt Ω M (capLeft Ω M out) (capRight Ω M out) enc b ω c j).elim 0 + (fun C => evictionFraction X C.2)) ≤ + evictionFraction X c.2 + pathBudget (fun _ => 0) ρ b j := by + apply context_cost_bound Ω p M (capLeft Ω M out) (capRight Ω M out) enc + (fun C => evictionFraction X C.2) (fun _ => evictionFraction_nonneg _ _) (fun _ => 0) ρ + (fun _ => le_rfl) hρ + · intro i c + simpa only [add_zero] using (show + (∑ t, p i c t * ((enc i c t).map (capLeft Ω M out i c t)).elim 0 + (fun C => evictionFraction X C.2)) ≤ evictionFraction X c.2 from by + convert optional_constant_drift (p i c) (enc i c) (evictionFraction X c.2) + (evictionFraction_nonneg _ _) using 1 + apply Finset.sum_congr rfl + intro t ht + cases enc i c t <;> rfl) + · intro i c + convert optional_inter_drift (p i c) X c.2 + (fun t => (enc i c t).map (fun m => (out i c t m).2)) (ρ i) (hcap i c) using 1 + apply Finset.sum_congr rfl + intro t ht + cases enc i c t <;> rfl + +theorem first_original_trim (enc : ∀ i c t, Option (M i c t)) + (X : Finset A) (ρ : I → ℝ) (hρ : ∀ i, 0 ≤ ρ i) + (hcap : ∀ i c, (∑ t, p i c t * evictionFraction X + (ambientTest ((enc i c t).map (fun m => (out i c t m).1)))) ≤ ρ i) + (b : BinaryTree I) (j : Address b) : + eventMass (tapeLaw Ω p b) (Finset.univ.filter (fun ω => ∃ C, + contextAt Ω M (capLeft Ω M out) (capRight Ω M out) enc b ω (Finset.univ,Finset.univ) j = some C ∧ + ((X ∩ C.1).card : ℝ) < (9/10:ℝ)*X.card)) ≤ + 10 * pathBudget ρ (fun _ => 0) b j := by + apply reached_trim_mass _ _ Prod.fst X _ + simpa only [evictionFraction_univ, zero_add] using + first_context_eviction Ω p M out enc X ρ hρ hcap b (Finset.univ,Finset.univ) j + +theorem second_original_trim (enc : ∀ i c t, Option (M i c t)) + (X : Finset B) (ρ : I → ℝ) (hρ : ∀ i, 0 ≤ ρ i) + (hcap : ∀ i c, (∑ t, p i c t * evictionFraction X + (ambientTest ((enc i c t).map (fun m => (out i c t m).2)))) ≤ ρ i) + (b : BinaryTree I) (j : Address b) : + eventMass (tapeLaw Ω p b) (Finset.univ.filter (fun ω => ∃ C, + contextAt Ω M (capLeft Ω M out) (capRight Ω M out) enc b ω (Finset.univ,Finset.univ) j = some C ∧ + ((X ∩ C.2).card : ℝ) < (9/10:ℝ)*X.card)) ≤ + 10 * pathBudget (fun _ => 0) ρ b j := by + apply reached_trim_mass _ _ Prod.snd X _ + simpa only [evictionFraction_univ, zero_add] using + second_context_eviction Ω p M out enc X ρ hρ hcap b (Finset.univ,Finset.univ) j + +end + +open FiniteEntropy BinaryTree +open scoped Classical BigOperators +universe u v w z +variable {I : Type u} + +def pathSum : (b : BinaryTree I) → (Address b → ℝ) → Address b → ℝ + | .nil, _, j => nomatch j + | .node _ _ _, f, .inl _ => f (.inl ()) + | .node _ l _, f, .inr (.inl j) => f (.inl ()) + pathSum l (fun k => f (.inr (.inl k))) j + | .node _ _ r, f, .inr (.inr j) => f (.inl ()) + pathSum r (fun k => f (.inr (.inr k))) j + +lemma pathSum_zero (b : BinaryTree I) (j : Address b) : pathSum b (fun _ => 0) j = 0 := by + induction b with + | nil => exact nomatch j + | node i l r ihl ihr => + rcases j with j | (j | j) + · rfl + · simp only [pathSum, ihl, add_zero] + · simp only [pathSum, ihr, add_zero] + +lemma pathSum_mono (b : BinaryTree I) (f g : Address b → ℝ) (h : ∀ k, f k ≤ g k) + (j : Address b) : pathSum b f j ≤ pathSum b g j := by + induction b with + | nil => exact nomatch j + | node i l r ihl ihr => + rcases j with j | (j | j) + · exact h _ + · exact add_le_add (h _) (ihl _ _ (fun k => h _) j) + · exact add_le_add (h _) (ihr _ _ (fun k => h _) j) + +lemma pathSum_const_le_height (b : BinaryTree I) (j : Address b) (a : ℝ) (ha : 0 ≤ a) : + pathSum b (fun _ => a) j ≤ b.height * a := by + induction b with + | nil => exact nomatch j + | node i l r ihl ihr => + have hL : (l.height:ℝ)+1 ≤ (BinaryTree.node i l r).height := by + simp only [BinaryTree.height, Nat.cast_add, Nat.cast_one] + exact_mod_cast Nat.add_le_add_right (le_max_left _ _) 1 + have hR : (r.height:ℝ)+1 ≤ (BinaryTree.node i l r).height := by + simp only [BinaryTree.height, Nat.cast_add, Nat.cast_one] + exact_mod_cast Nat.add_le_add_right (le_max_right _ _) 1 + rcases j with j | (j | j) + · have hz : (0:ℝ) ≤ l.height := Nat.cast_nonneg _ + have h := mul_le_mul_of_nonneg_right hL ha + simpa only [pathSum] using (show a ≤ (BinaryTree.node i l r).height*a by nlinarith only [h, hz, ha]) + · have h := mul_le_mul_of_nonneg_right hL ha + simpa only [pathSum] using (show a+pathSum l (fun _ => a) j ≤ (BinaryTree.node i l r).height*a by linarith only [h, ihl j]) + · have h := mul_le_mul_of_nonneg_right hR ha + simpa only [pathSum] using (show a+pathSum r (fun _ => a) j ≤ (BinaryTree.node i l r).height*a by linarith only [h, ihr j]) + +lemma mean_pathSum {W : Type*} [Fintype W] (p : W → ℝ) + (b : BinaryTree I) (f : W → Address b → ℝ) (j : Address b) : + (∑ ω, p ω * pathSum b (f ω) j) = pathSum b (fun k => ∑ ω, p ω * f ω k) j := by + induction b with + | nil => exact nomatch j + | node i l r ihl ihr => + rcases j with j | (j | j) + · rfl + · simp only [pathSum, mul_add, Finset.sum_add_distrib, ihl] + · simp only [pathSum, mul_add, Finset.sum_add_distrib, ihr] + +variable {C : Type v} [Fintype C] + (Ω : I → C → Type w) [∀ i c, Fintype (Ω i c)] + (M : ∀ i c, Ω i c → Type z) (left right : ∀ i c t, M i c t → C) + (enc : ∀ i c t, Option (M i c t)) + +noncomputable def abortAt (b : BinaryTree I) (ω : Tape Ω b) (c : C) (j : Address b) : Option Bool := + probe Ω M left right enc (fun i c t => some (enc i c t).isNone) b ω c j +noncomputable def successAt (b : BinaryTree I) (ω : Tape Ω b) (c : C) (j : Address b) : Option Unit := + observe Ω M left right enc (fun _ _ _ _ => ()) b ω c j + +omit [Fintype C] [∀ index context, Fintype (Ω index context)] in +theorem missing_path_eq (b : BinaryTree I) (ω : Tape Ω b) (c : C) (j : Address b) : + (if successAt Ω M left right enc b ω c j = none then (1:ℝ) else 0) = + pathSum b (fun k => if abortAt Ω M left right enc b ω c k = some true then 1 else 0) j := by + induction b generalizing c with + | nil => exact nomatch j + | node i l r ihl ihr => + rcases j with j | (j | j) + · cases he : enc i c (ω.1 c) <;> + simp [successAt, abortAt, observe, probe, pathSum, he] + · cases he : enc i c (ω.1 c) with + | none => simp [successAt, abortAt, observe, probe, pathSum, he, pathSum_zero] + | some m => + convert ihl ω.2.1 (left i c (ω.1 c) m) j using 1 <;> + simp [successAt, abortAt, observe, probe, pathSum, he] + all_goals rfl + · cases he : enc i c (ω.1 c) with + | none => simp [successAt, abortAt, observe, probe, pathSum, he, pathSum_zero] + | some m => + convert ihr ω.2.2 (right i c (ω.1 c) m) j using 1 <;> + simp [successAt, abortAt, observe, probe, pathSum, he] + all_goals rfl + +lemma missing_mass_path (b : BinaryTree I) (p : Law (Tape Ω b)) (c : C) (j : Address b) : + eventMass p (Finset.univ.filter (fun ω => successAt Ω M left right enc b ω c j = none)) = + pathSum b (fun k => eventMass p (Finset.univ.filter + (fun ω => abortAt Ω M left right enc b ω c k = some true))) j := by + have h := mean_pathSum p b + (fun ω k => if abortAt Ω M left right enc b ω c k = some true then (1:ℝ) else 0) j + simp_rw [← missing_path_eq Ω M left right enc b _ c j] at h + simpa only [eventMass, Finset.sum_filter, mul_ite, mul_one, mul_zero] using h + +theorem missing_mass_le (b : BinaryTree I) (p : Law (Tape Ω b)) (c : C) + (ε : Address b → ℝ) + (hε : ∀ j, eventMass p (Finset.univ.filter + (fun ω => abortAt Ω M left right enc b ω c j = some true)) ≤ ε j) + (j : Address b) : + eventMass p (Finset.univ.filter (fun ω => successAt Ω M left right enc b ω c j = none)) ≤ + pathSum b ε j := by + rw [missing_mass_path] + exact pathSum_mono b _ _ hε j + +end SharpRamseyFive.TreeCodec + +end OAI diff --git a/lean/OAI/Combinatorics/RamseyFive/Trees/Windows.lean b/lean/OAI/Combinatorics/RamseyFive/Trees/Windows.lean new file mode 100644 index 0000000000000000000000000000000000000000..65899115f4165e82225747b6fcd8fd6a72c76dfa --- /dev/null +++ b/lean/OAI/Combinatorics/RamseyFive/Trees/Windows.lean @@ -0,0 +1,88 @@ +import Mathlib + +namespace OAI + +namespace SharpRamseyFive.Windows +open scoped Classical BigOperators +noncomputable section + +abbrev Slots (w r : ℕ) := (((Fin w×Bool)×Fin r)⊕(Fin w×Fin (2*r))) + +def windowCoordinates {w r : ℕ} : Slots w r→Fin w×Fin (4*r) + | Sum.inl ((v,false),a) => (v,⟨a.val,by omega⟩) + | Sum.inl ((v,true),a) => (v,⟨3*r+a.val,by omega⟩) + | Sum.inr (v,t) => (v,⟨r+t.val,by omega⟩) + +lemma windowCoordinates_injective {w r : ℕ} : Function.Injective (@windowCoordinates w r) := by + intro x y he + have hw := congrArg (fun z=>z.1) he + have hp := congrArg (fun z=>z.2.val) he + rcases x with ⟨⟨v,b⟩,a⟩|⟨v,t⟩ <;> rcases y with ⟨⟨u,c⟩,d⟩|⟨u,s⟩ + · cases b <;> cases c + all_goals simp only [windowCoordinates] at hw hp + · subst u + have : a=d := Fin.ext (by omega) + subst d + rfl + · omega + · omega + · subst u + have : a=d := Fin.ext (by omega) + subst d + rfl + · cases b <;> simp only [windowCoordinates] at hw hp <;> omega + · cases c <;> simp only [windowCoordinates] at hw hp <;> omega + · simp only [windowCoordinates] at hw hp + subst u + have : t=s := Fin.ext (by omega) + subst s + rfl + +def slotEmbedding {w r : ℕ} : Slots w r↪Fin (w*(4*r)) := + ⟨fun i=>finProdFinEquiv (windowCoordinates i), + finProdFinEquiv.injective.comp windowCoordinates_injective⟩ + +lemma slotEmbedding_val {w r : ℕ} (i : Slots w r) : + (slotEmbedding i).val=(windowCoordinates i).1.val*(4*r)+(windowCoordinates i).2.val := by + change (windowCoordinates i).2.val+(4*r)*(windowCoordinates i).1.val=_ + ring + +lemma representative_early {w r : ℕ} (v : Fin w) (a : Fin r) (t : Fin (2*r)) : + slotEmbedding (Sum.inl ((v,false),a)) + choiceFin ((Fintype.equivFin (ConfigurationGroup σ)) i) + let b : ConfigurationGroup σ → Point F := fun i => pool i (choice i) + let X := ambientSelectedSurvivors σ u v huv a K pool choice + let data := ambientSelectedConfiguration σ u v huv a K pool choice + let δ := ambientDeletionDelta (Fintype.card k) K + have hshift : selectedShifts σ (ambientFlatPoolEquiv σ K pool) choiceFin = b := by + funext i + change pool ((Fintype.equivFin (ConfigurationGroup σ)).symm + ((Fintype.equivFin (ConfigurationGroup σ)) i)) + (choiceFin ((Fintype.equivFin (ConfigurationGroup σ)) i)) = + pool i (choiceFin ((Fintype.equivFin (ConfigurationGroup σ)) i)) + rw [Equiv.symm_apply_apply] + have hsep : DeletionSeparated σ (groupPlacement σ u v huv) b a := by + have h := selectedShifts_deletionSeparated σ u v huv + (ambientFlatPoolEquiv σ K pool) choiceFin hchoice a + rw [hshift] at h + exact h + obtain ⟨hline, hnear⟩ := ambientPool_goodLineCover_selected + σ u v huv a ha.1 K pool choice δ (δ / 10) hrigid + have hnear' : ∀ L : Finset (AffineLine F), L.card ≤ Fintype.card F → + (∀ x ∈ X, ∃ ell ∈ L, Incidence x ell) → + ∃ p : ProjectivePoint F, + (1 - δ / 10) * Fintype.card F ≤ ((L ∩ affinePencil p).card : ℝ) := by + intro L hL hcover + have hsub : X ⊆ L.biUnion linePoints := by + intro x hx + obtain ⟨ell, hell, hxell⟩ := hcover x hx + exact Finset.mem_biUnion.mpr ⟨ell, hell, (mem_linePoints x ell).mpr hxell⟩ + obtain ⟨p, hp⟩ := hnear L hL hsub + refine ⟨p, ?_⟩ + have heq : LineCover.coverPencil L p = L ∩ affinePencil p := by + ext ell + simp only [LineCover.mem_coverPencil, Finset.mem_inter, mem_affinePencil] + rw [heq] at hp + exact hp + have hthin' : ∀ p : Point F, OffPencilThin data p := fun p => + offPencilThin_of_groupPoolThin σ u v huv pool choice (retainedPoints a) X hthin p + have hne : (hypergraph data).Nonempty := + ambientSelectedHypergraph_nonempty σ u v huv a K pool choice ha + have hI : Intersecting (hypergraph data) := + ambientSelectedHypergraph_intersecting σ u v huv a K pool choice hcop hsep + have hpart : RPartiteUniform (Fintype.card F + 1) (hypergraph data) := + ambientSelectedHypergraph_rPartiteUniform σ u v huv a K pool choice + apply counterexampleRank_of_no_small_cover (Nat.zero_lt_succ _) hne hpart hI + intro C hCcard + have hCq : C.card ≤ Fintype.card F := by omega + have hnot := not_isCover_actual_group_configuration σ u v huv a b X hu hv hcop ha + δ (ambientDeletionDelta_pos _ _) hgap hsep hthin' hline hnear' C hCq + have hdec : instDecidableEqConfigurationGroup σ = + (inferInstance : DecidableEq (ConfigurationGroup σ)) := Subsingleton.elim _ _ + rw [hdec] at hnot + exact hnot + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionGeometry.lean b/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..78a9715e6c032f4f1cd813cf12d8d1ef1e5ec5aa --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionGeometry.lean @@ -0,0 +1,234 @@ +import OAI.Combinatorics.Ryser.Construction.DeletionLines +import OAI.Combinatorics.Ryser.Geometry.Cardinality +import OAI.Combinatorics.Ryser.Selection.Forbidden + +namespace OAI + +open scoped BigOperators +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {F : Type*} [Field F] + +def shiftAffineLine (b : Point F) (l : AffineLine F) : AffineLine F := + (l.1, l.2 + projection l.1 b) + +@[simp] theorem shiftAffineLine_direction (b : Point F) (l : AffineLine F) : + (shiftAffineLine b l).1 = l.1 := rfl + +@[simp] theorem shiftAffineLine_offset (b : Point F) (l : AffineLine F) : + (shiftAffineLine b l).2 = l.2 + projection l.1 b := rfl + +@[simp] theorem shiftAffineLine_zero (l : AffineLine F) : shiftAffineLine 0 l = l := by + obtain ⟨d, c⟩ := l + cases d <;> simp [shiftAffineLine, projection] + +theorem shiftAffineLine_injective (b : Point F) : Function.Injective (shiftAffineLine b) := by + intro l m h + have hdir := congrArg Prod.fst h + change l.1 = m.1 at hdir + apply Prod.ext hdir + have hoff := congrArg Prod.snd h + change l.2 + projection l.1 b = m.2 + projection m.1 b at hoff + rw [hdir] at hoff + exact add_right_cancel hoff + +theorem incidence_shiftAffineLine_iff (b x : Point F) (l : AffineLine F) : + Incidence x (shiftAffineLine b l) ↔ Incidence (x - b) l := by + change projection l.1 x = l.2 + projection l.1 b ↔ projection l.1 (x - b) = l.2 + have hproj : projection l.1 (x - b) = projection l.1 x - projection l.1 b := + projection_sub l.1 x b + rw [hproj, sub_eq_iff_eq_add] + +section Finite + +variable [Fintype F] [DecidableEq F] + +def ambientLineUnion (B : Finset (AffineLine F)) : Finset (Point F) := + B.biUnion linePoints + +@[simp] theorem mem_ambientLineUnion (B : Finset (AffineLine F)) (x : Point F) : + x ∈ ambientLineUnion B ↔ ∃ l ∈ B, Incidence x l := by + simp only [ambientLineUnion, Finset.mem_biUnion, mem_linePoints] + +theorem mem_ambientLineUnion_shift (B : Finset (AffineLine F)) (b x : Point F) : + x ∈ ambientLineUnion (B.image (shiftAffineLine b)) ↔ x - b ∈ ambientLineUnion B := by + rw [mem_ambientLineUnion, mem_ambientLineUnion] + constructor + · rintro ⟨l, hl, hxl⟩ + obtain ⟨m, hm, rfl⟩ := Finset.mem_image.mp hl + exact ⟨m, hm, (incidence_shiftAffineLine_iff b x m).mp hxl⟩ + · rintro ⟨l, hl, hxl⟩ + exact ⟨shiftAffineLine b l, Finset.mem_image.mpr ⟨l, hl, rfl⟩, + (incidence_shiftAffineLine_iff b x l).mpr hxl⟩ + +theorem card_ambientLineUnion_le (B : Finset (AffineLine F)) : + (ambientLineUnion B).card ≤ B.card * Fintype.card F := + Finset.card_biUnion_le_card_mul B linePoints (Fintype.card F) + (fun l _ => (card_linePoints l).le) + +theorem uniform_prob_mem_ambientLineUnion_shift (B : Finset (AffineLine F)) (x : Point F) : + (FiniteLaw.uniform (Point F)).prob + (fun b => x ∈ ambientLineUnion (B.image (shiftAffineLine b))) = + ((ambientLineUnion B).card : ℝ) / (Fintype.card F : ℝ) ^ 2 := by + classical + have hinj : Function.Injective (fun y : Point F => x - y) := by + intro y z hyz + have h := congrArg (fun w : Point F => x - w) hyz + simpa only [sub_sub_cancel] using h + rw [FiniteLaw.uniform_prob] + calc + _ = (((ambientLineUnion B).image (fun y => x - y)).card : ℝ) / + (Fintype.card (Point F) : ℝ) := by + apply congrArg (fun T : Finset (Point F) => + (T.card : ℝ) / (Fintype.card (Point F) : ℝ)) + ext b + simp only [Finset.mem_filter, Finset.mem_univ, true_and, mem_ambientLineUnion_shift] + constructor + · intro hb + exact Finset.mem_image.mpr ⟨x - b, hb, sub_sub_cancel x b⟩ + · intro hb + obtain ⟨y, hy, hyb⟩ := Finset.mem_image.mp hb + rw [← hyb, sub_sub_cancel] + exact hy + _ = _ := by + rw [Finset.card_image_of_injective _ hinj, card_point, Nat.cast_pow] + +theorem uniform_prob_mem_ambientLineUnion_shift_le (B : Finset (AffineLine F)) + (x : Point F) : + (FiniteLaw.uniform (Point F)).prob + (fun b => x ∈ ambientLineUnion (B.image (shiftAffineLine b))) ≤ + (B.card : ℝ) / (Fintype.card F : ℝ) := by + rw [uniform_prob_mem_ambientLineUnion_shift] + have hcard : ((ambientLineUnion B).card : ℝ) ≤ + (B.card : ℝ) * (Fintype.card F : ℝ) := by + exact_mod_cast card_ambientLineUnion_le B + have hq : (Fintype.card F : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr Fintype.card_ne_zero + calc + ((ambientLineUnion B).card : ℝ) / (Fintype.card F : ℝ) ^ 2 ≤ + ((B.card : ℝ) * (Fintype.card F : ℝ)) / (Fintype.card F : ℝ) ^ 2 := + div_le_div_of_nonneg_right hcard (sq_nonneg _) + _ = (B.card : ℝ) / (Fintype.card F : ℝ) := by + field_simp [hq] + +theorem uniform_prob_mem_image_shiftAffineLine_le (B : Finset (AffineLine F)) + (l : AffineLine F) : + (FiniteLaw.uniform (Point F)).prob (fun b => l ∈ B.image (shiftAffineLine b)) ≤ + ((B.filter (fun e => e.1 = l.1)).card : ℝ) / (Fintype.card F : ℝ) := by + classical + let T := B.filter (fun e => e.1 = l.1) + have hP : (fun b => l ∈ B.image (shiftAffineLine b)) = + (fun b => ∃ e : ↥T, projection l.1 b = l.2 - e.val.2) := by + funext b + apply propext + constructor + · intro hb + obtain ⟨e, heB, heq⟩ := Finset.mem_image.mp hb + have hdir := congrArg Prod.fst heq + change e.1 = l.1 at hdir + have hoff := congrArg Prod.snd heq + change e.2 + projection e.1 b = l.2 at hoff + have hproj : projection l.1 b = l.2 - e.2 := by + rw [← hdir] + apply (eq_sub_iff_add_eq).2 + exact (add_comm _ _).trans hoff + exact ⟨⟨e, Finset.mem_filter.mpr ⟨heB, hdir⟩⟩, hproj⟩ + · rintro ⟨e, heq⟩ + have hdir : e.val.1 = l.1 := (Finset.mem_filter.mp e.property).2 + refine Finset.mem_image.mpr ⟨e.val, (Finset.mem_filter.mp e.property).1, ?_⟩ + apply Prod.ext + · exact hdir + · change e.val.2 + projection e.val.1 b = l.2 + rw [hdir, heq] + ring + rw [hP] + calc + _ ≤ ∑ e : ↥T, (FiniteLaw.uniform (Point F)).prob + (fun b => projection l.1 b = l.2 - e.val.2) := FiniteLaw.prob_exists_le _ _ + _ = ∑ _e : ↥T, 1 / (Fintype.card F : ℝ) := by + apply Finset.sum_congr rfl + intro e _ + exact Selection.uniform_prob_projection l.1 (l.2 - e.val.2) + _ = ((B.filter (fun e => e.1 = l.1)).card : ℝ) / (Fintype.card F : ℝ) := by + simp [T, div_eq_mul_inv] + +end Finite + +section Placed + +variable {k : Type*} [Field k] [instFintypek : Fintype k] [instDecidableEqk : DecidableEq k] +variable [instFintypeF : Fintype F] [instDecidableEqF : DecidableEq F] + +theorem placedPoint_sub_shift (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) (y : Point k) : + placedPoint σ M b y - b = placedPoint σ M 0 y := let _ := instFintypek; let _ := instDecidableEqk; let _ := instFintypeF; let _ := instDecidableEqF; by + simp only [placedPoint, add_sub_cancel_left, zero_add] + +theorem mem_deletedLines_shift (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) (a : GadgetOutcome k) (l : AffineLine F) : + shiftAffineLine b l ∈ deletedLines σ M b a ↔ l ∈ deletedLines σ M 0 a := by + simp only [mem_deletedLines, shiftAffineLine_direction, incidence_shiftAffineLine_iff, + placedPoint_sub_shift] + +theorem deletedLines_eq_image_shiftAffineLine (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) (a : GadgetOutcome k) : + deletedLines σ M b a = (deletedLines σ M 0 a).image (shiftAffineLine b) := by + ext l + constructor + · intro hl + let m : AffineLine F := (l.1, l.2 - projection l.1 b) + have hm : shiftAffineLine b m = l := by + apply Prod.ext + · rfl + · exact sub_add_cancel _ _ + refine Finset.mem_image.mpr ⟨m, ?_, hm⟩ + apply (mem_deletedLines_shift σ M b a m).mp + rw [hm] + exact hl + · intro hl + obtain ⟨m, hm, hml⟩ := Finset.mem_image.mp hl + rw [← hml] + exact (mem_deletedLines_shift σ M b a m).mpr hm + +theorem uniform_prob_mem_deletedLines_union (σ : k →+* F) (M : PlaneLinearMap F) + (a : GadgetOutcome k) (x : Point F) : + (FiniteLaw.uniform (Point F)).prob (fun b => x ∈ ambientLineUnion (deletedLines σ M b a)) = + ((ambientLineUnion (deletedLines σ M 0 a)).card : ℝ) / (Fintype.card F : ℝ) ^ 2 := by + have hP : (fun b => x ∈ ambientLineUnion (deletedLines σ M b a)) = + (fun b => x ∈ ambientLineUnion ((deletedLines σ M 0 a).image (shiftAffineLine b))) := by + funext b + rw [deletedLines_eq_image_shiftAffineLine σ M b a] + rw [hP] + exact uniform_prob_mem_ambientLineUnion_shift (deletedLines σ M 0 a) x + +theorem uniform_prob_mem_deletedLines_union_le (σ : k →+* F) (M : PlaneLinearMap F) + (a : GadgetOutcome k) (x : Point F) : + (FiniteLaw.uniform (Point F)).prob (fun b => x ∈ ambientLineUnion (deletedLines σ M b a)) ≤ + ((deletedLines σ M 0 a).card : ℝ) / (Fintype.card F : ℝ) := by + have hP : (fun b => x ∈ ambientLineUnion (deletedLines σ M b a)) = + (fun b => x ∈ ambientLineUnion ((deletedLines σ M 0 a).image (shiftAffineLine b))) := by + funext b + rw [deletedLines_eq_image_shiftAffineLine σ M b a] + rw [hP] + exact uniform_prob_mem_ambientLineUnion_shift_le (deletedLines σ M 0 a) x + +theorem uniform_prob_mem_deletedLines_le (σ : k →+* F) (M : PlaneLinearMap F) + (a : GadgetOutcome k) (l : AffineLine F) : + (FiniteLaw.uniform (Point F)).prob (fun b => l ∈ deletedLines σ M b a) ≤ + (((deletedLines σ M 0 a).filter (fun e => e.1 = l.1)).card : ℝ) / + (Fintype.card F : ℝ) := by + have hP : (fun b => l ∈ deletedLines σ M b a) = + (fun b => l ∈ (deletedLines σ M 0 a).image (shiftAffineLine b)) := by + funext b + rw [deletedLines_eq_image_shiftAffineLine σ M b a] + rw [hP] + exact uniform_prob_mem_image_shiftAffineLine_le (deletedLines σ M 0 a) l + +end Placed + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionNumerics.lean b/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3bbdc9b6596cd2e4edd2cf795c9e49b58365b5f --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionNumerics.lean @@ -0,0 +1,118 @@ +import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Algebra.Order.BigOperators.GroupWithZero.Finset +import Mathlib.Data.Fintype.Card +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Ring + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Construction + +noncomputable def ambientDeletionDelta (s K : ℕ) : ℝ := + Real.exp (-4 * (K : ℝ) * ((s - 1 : ℕ) : ℝ)) + +theorem ambientDeletionDelta_pos (s K : ℕ) : 0 < ambientDeletionDelta s K := + Real.exp_pos _ + +theorem ambientDeletionDelta_lt_one (s K : ℕ) (hs : 2 ≤ s) (hK : 0 < K) : + ambientDeletionDelta s K < 1 := by + have hK' : (0 : ℝ) < (K : ℝ) := by exact_mod_cast hK + have hm : (0 : ℝ) < ((s - 1 : ℕ) : ℝ) := by + exact_mod_cast Nat.sub_pos_of_lt (lt_of_lt_of_le (by decide : 1 < 2) hs) + unfold ambientDeletionDelta + apply Real.exp_lt_one_iff.mpr + have hpos : (0 : ℝ) < 4 * (K : ℝ) * ((s - 1 : ℕ) : ℝ) := + mul_pos (mul_pos (by norm_num) hK') hm + nlinarith only [hpos] + +theorem neg_two_mul_le_log_one_sub {t : ℝ} (ht0 : 0 ≤ t) (ht : t ≤ 1 / 2) : + -2 * t ≤ Real.log (1 - t) := by + have hb : 0 < 1 - t := by linarith + have hratio : t / (1 - t) ≤ 2 * t := by + apply (div_le_iff₀ hb).2 + have hmul := mul_nonneg ht0 (show 0 ≤ 1 - 2 * t by linarith) + nlinarith only [hmul] + have hid : 1 - (1 - t)⁻¹ = -(t / (1 - t)) := by + field_simp [hb.ne'] + ring + calc + -2 * t ≤ -(t / (1 - t)) := by linarith only [hratio] + _ = 1 - (1 - t)⁻¹ := hid.symm + _ ≤ Real.log (1 - t) := Real.one_sub_inv_le_log_of_pos hb + +theorem exp_neg_two_mul_le_one_sub_pow (N : ℕ) {t : ℝ} + (ht0 : 0 ≤ t) (ht : t ≤ 1 / 2) : + Real.exp (-2 * (N : ℝ) * t) ≤ (1 - t) ^ N := by + have hb : 0 < 1 - t := by linarith + apply (Real.le_log_iff_exp_le (pow_pos hb N)).mp + rw [Real.log_pow] + have hlog := mul_le_mul_of_nonneg_left (neg_two_mul_le_log_one_sub ht0 ht) + (Nat.cast_nonneg N : (0 : ℝ) ≤ (N : ℝ)) + nlinarith only [hlog] + +theorem ambientDeletionDelta_le_pow (s K q N : ℕ) (hs : 2 ≤ s) (hq : 0 < q) + (hsmall : 2 * (s - 1) ^ 2 ≤ q) (hcount : N * (s - 1) ≤ 2 * K * q) : + ambientDeletionDelta s K ≤ (1 - ((s - 1 : ℕ) : ℝ) ^ 2 / (q : ℝ)) ^ N := by + have hq' : (0 : ℝ) < (q : ℝ) := by exact_mod_cast hq + have hm : (0 : ℝ) < ((s - 1 : ℕ) : ℝ) := by + exact_mod_cast Nat.sub_pos_of_lt (lt_of_lt_of_le (by decide : 1 < 2) hs) + have hsmall' : (2 : ℝ) * ((s - 1 : ℕ) : ℝ) ^ 2 ≤ (q : ℝ) := by + exact_mod_cast hsmall + have hcount' : (N : ℝ) * ((s - 1 : ℕ) : ℝ) ≤ 2 * (K : ℝ) * (q : ℝ) := by + exact_mod_cast hcount + let t : ℝ := ((s - 1 : ℕ) : ℝ) ^ 2 / (q : ℝ) + have ht0 : 0 ≤ t := div_nonneg (sq_nonneg _) hq'.le + have ht : t ≤ 1 / 2 := by + apply (div_le_iff₀ hq').2 + nlinarith only [hsmall'] + have htotal : (N : ℝ) * t ≤ 2 * (K : ℝ) * ((s - 1 : ℕ) : ℝ) := by + dsimp only [t] + rw [← mul_div_assoc] + apply (div_le_iff₀ hq').2 + have hmul := mul_le_mul_of_nonneg_right hcount' hm.le + nlinarith only [hmul] + have hexponent : -4 * (K : ℝ) * ((s - 1 : ℕ) : ℝ) ≤ -2 * (N : ℝ) * t := by + nlinarith only [htotal] + unfold ambientDeletionDelta + exact (Real.exp_le_exp.mpr hexponent).trans + (exp_neg_two_mul_le_one_sub_pow N ht0 ht) + +theorem ambientDeletionDelta_le_finset_prod {ι : Type*} (I : Finset ι) + (s K q : ℕ) (hs : 2 ≤ s) (hq : 0 < q) (hsmall : 2 * (s - 1) ^ 2 ≤ q) + (hcount : I.card * (s - 1) ≤ 2 * K * q) (p : ι → ℝ) + (hp : ∀ i ∈ I, p i ≤ ((s - 1 : ℕ) : ℝ) ^ 2 / (q : ℝ)) : + ambientDeletionDelta s K ≤ ∏ i ∈ I, (1 - p i) := by + have hq' : (0 : ℝ) < (q : ℝ) := by exact_mod_cast hq + have hsmall' : (2 : ℝ) * ((s - 1 : ℕ) : ℝ) ^ 2 ≤ (q : ℝ) := by + exact_mod_cast hsmall + have hhalf : ((s - 1 : ℕ) : ℝ) ^ 2 / (q : ℝ) ≤ 1 / 2 := by + apply (div_le_iff₀ hq').2 + nlinarith only [hsmall'] + have hbase : 0 ≤ 1 - ((s - 1 : ℕ) : ℝ) ^ 2 / (q : ℝ) := by linarith + apply (ambientDeletionDelta_le_pow s K q I.card hs hq hsmall hcount).trans + calc + (1 - ((s - 1 : ℕ) : ℝ) ^ 2 / (q : ℝ)) ^ I.card = + ∏ _i ∈ I, (1 - ((s - 1 : ℕ) : ℝ) ^ 2 / (q : ℝ)) := by + rw [Finset.prod_const] + _ ≤ ∏ i ∈ I, (1 - p i) := + Finset.prod_le_prod₀ (fun _ _ => hbase) + (fun i hi => sub_le_sub_left (hp i hi) 1) + +theorem ambientDeletionDelta_le_prod {ι : Type*} [Fintype ι] + (s K q : ℕ) (hs : 2 ≤ s) (hq : 0 < q) (hsmall : 2 * (s - 1) ^ 2 ≤ q) + (hcount : Fintype.card ι * (s - 1) ≤ 2 * K * q) (p : ι → ℝ) + (hp : ∀ i, p i ≤ ((s - 1 : ℕ) : ℝ) ^ 2 / (q : ℝ)) : + ambientDeletionDelta s K ≤ ∏ i, (1 - p i) := by + classical + apply ambientDeletionDelta_le_finset_prod Finset.univ s K q hs hq hsmall ?_ p ?_ + · simpa only [Finset.card_univ] using hcount + · intro i _ + exact hp i + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionPoolLaw.lean b/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionPoolLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..f1b0f8ddb92a7487d1f832693fca49cbcb9fd57c --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionPoolLaw.lean @@ -0,0 +1,89 @@ +import OAI.Combinatorics.Ryser.Construction.AmbientDeletionProcess +import OAI.Combinatorics.Ryser.Construction.PoolThinProbability +import OAI.Combinatorics.Ryser.Selection.PoolLaw + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] [instFintypeK : Fintype k] [Fintype F] + [instDecidableEqK : DecidableEq k] [DecidableEq F] + +abbrev AmbientPool (σ : k →+* F) (K : ℕ) := ConfigurationGroup σ → Fin K → Point F + +def ambientPoolTrialEquiv (σ : k →+* F) (K : ℕ) : + AmbientPool σ K ≃ (Fin (ambientTrialCount σ K) → Point F) where + toFun b t := b (ambientPosition σ K t).1 (ambientPosition σ K t).2 + invFun b i j := b ((Fintype.equivFin (AmbientPosition σ K)) (i, j)) + left_inv b := by + funext i j + simp only [ambientPosition, Equiv.symm_apply_apply] + right_inv b := by + funext t + change b ((Fintype.equivFin (AmbientPosition σ K)) + ((Fintype.equivFin (AmbientPosition σ K)).symm t)) = b t + exact congrArg b ((Fintype.equivFin (AmbientPosition σ K)).apply_symm_apply t) + +def ambientFlatPoolEquiv (σ : k →+* F) (K : ℕ) : + AmbientPool σ K ≃ Selection.Pool F (Fintype.card (ConfigurationGroup σ)) K where + toFun b p := b ((Fintype.equivFin (ConfigurationGroup σ)).symm p.1) p.2 + invFun b i j := b ((Fintype.equivFin (ConfigurationGroup σ)) i, j) + left_inv b := by + funext i j + simp only [Equiv.symm_apply_apply] + right_inv b := by + funext p + simp only [Equiv.apply_symm_apply, Prod.mk.eta] + +theorem poolThinLaw_map_ambientFlatPoolEquiv (σ : k →+* F) (K : ℕ) : + (poolThinLaw (F := F) (ConfigurationGroup σ) K).map (ambientFlatPoolEquiv σ K) = + Selection.poolLaw F (Fintype.card (ConfigurationGroup σ)) K := + let _ := instFintypeK; let _ := instDecidableEqK; by + rw [poolThinLaw, FiniteLaw.pi_uniform, FiniteLaw.map_uniform_equiv, + Selection.poolLaw_eq_uniform] + +def ambientPoolConfig (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) (b : AmbientPool σ K) : + Fin (ambientTrialCount σ K) → + LineCover.Outcome (ambientShapes F) (ambientDeletionConstant (Fintype.card k) K) := + fun t => ambientTrialOutcome σ + (groupPlacement σ u v huv (ambientPosition σ K t).1) a ha K + (b (ambientPosition σ K t).1 (ambientPosition σ K t).2) + +@[simp] theorem ambientPoolConfig_at (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) (b : AmbientPool σ K) + (i : ConfigurationGroup σ) (j : Fin K) : + ambientPoolConfig σ u v huv a ha K b + ((Fintype.equivFin (AmbientPosition σ K)) (i, j)) = + ambientTrialOutcome σ (groupPlacement σ u v huv i) a ha K (b i j) := by + simp only [ambientPoolConfig, ambientPosition, Equiv.symm_apply_apply] + +theorem poolThinLaw_map_ambientPoolConfig (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) : + (poolThinLaw (F := F) (ConfigurationGroup σ) K).map + (ambientPoolConfig σ u v huv a ha K) = + FiniteLaw.pi (ambientTrials σ u v huv a ha K) := by + let f : (Fin (ambientTrialCount σ K) → Point F) → + (Fin (ambientTrialCount σ K) → + LineCover.Outcome (ambientShapes F) (ambientDeletionConstant (Fintype.card k) K)) := + fun b t => ambientTrialOutcome σ + (groupPlacement σ u v huv (ambientPosition σ K t).1) a ha K (b t) + have hconfig : ambientPoolConfig σ u v huv a ha K = f ∘ ambientPoolTrialEquiv σ K := rfl + rw [hconfig, ← FiniteLaw.map_map] + have hreindex : (poolThinLaw (F := F) (ConfigurationGroup σ) K).map + (ambientPoolTrialEquiv σ K) = + FiniteLaw.pi (fun _ : Fin (ambientTrialCount σ K) => FiniteLaw.uniform (Point F)) := by + rw [poolThinLaw, FiniteLaw.pi_uniform, FiniteLaw.map_uniform_equiv, FiniteLaw.pi_uniform] + rw [hreindex] + exact FiniteLaw.map_pi (fun _ => FiniteLaw.uniform (Point F)) + (fun t => ambientTrialOutcome σ + (groupPlacement σ u v huv (ambientPosition σ K t).1) a ha K) + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionProcess.lean b/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionProcess.lean new file mode 100644 index 0000000000000000000000000000000000000000..b014ffba811d58c53a7096964396e7c212750459 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionProcess.lean @@ -0,0 +1,74 @@ +import OAI.Combinatorics.Ryser.Construction.AmbientDeletionTrials +import OAI.Combinatorics.Ryser.Construction.AmbientDeletionNumerics + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] [Fintype k] [Fintype F] + [DecidableEq k] [DecidableEq F] + +def ambientSurvival (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (K : ℕ) : ℝ := + ∏ t : Fin (ambientTrialCount σ K), + (1 - ambientPointRate σ (groupPlacement σ u v huv (ambientPosition σ K t).1) a) + +theorem ambientTrials_uniformSurvival (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) (x : Point F) : + (FiniteLaw.pi (ambientTrials σ u v huv a ha K)).prob + (fun ω => x ∈ LineCover.survivors ∅ ω) = ambientSurvival σ u v huv a K := by + simp only [LineCover.mem_survivors] + rw [FiniteLaw.prob_pi (ambientTrials σ u v huv a ha K) + (fun _ A => x ∉ LineCover.deleted ∅ A)] + simp_rw [FiniteLaw.prob_compl] + simp only [ambientTrials, ambientTrialLaw_point_probability, ambientSurvival] + +theorem ambientSurvival_lower (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) + (hs : 2 ≤ Fintype.card k) + (hsmall : 2 * (Fintype.card k - 1) ^ 2 ≤ Fintype.card F) : + ambientDeletionDelta (Fintype.card k) K ≤ ambientSurvival σ u v huv a K := by + apply ambientDeletionDelta_le_prod (Fintype.card k) K (Fintype.card F) hs + Fintype.card_pos hsmall ?_ _ ?_ + · simpa only [Fintype.card_fin] using ambientTrialCount_mul_sub_one_le σ K + · intro t + exact ambientPointRate_le σ (groupPlacement σ u v huv (ambientPosition σ K t).1) a ha + +def ambientDeletionProcess (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) + (hs : 2 ≤ Fintype.card k) + (hsmall : 2 * (Fintype.card k - 1) ^ 2 ≤ Fintype.card F) : + LineCover.DeletionProcess F (ambientDeletionConstant (Fintype.card k) K) + (ambientDeletionDelta (Fintype.card k) K) where + shapes := ambientShapes F + shapeCount := ambientShapes_count_le (ambientDeletionConstant_two_le _ _) + shapeSize := ambientShapes_size_le (le_trans (by decide) (ambientDeletionConstant_two_le _ _)) + sparse := ambientShapes_sparse (le_trans (by decide) (ambientDeletionConstant_two_le _ _)) + trialsCount := ambientTrialCount σ K + trials := ambientTrials σ u v huv a ha K + trialsCount_le := ambientTrialCount_le σ K hs + pointCap := by + intro t x + rw [ambientTrials, ambientTrialLaw_point_probability] + apply (ambientPointRate_le σ + (groupPlacement σ u v huv (ambientPosition σ K t).1) a ha).trans + apply div_le_div_of_nonneg_right _ (Nat.cast_nonneg _) + exact_mod_cast ambientDeletionConstant_lines_le (Fintype.card k) K + survival := ambientSurvival σ u v huv a K + survivalLower := ambientSurvival_lower σ u v huv a ha K hs hsmall + uniformSurvival := ambientTrials_uniformSurvival σ u v huv a ha K + lineCap := by + intro l + apply (ambientTrials_line_probability_sum_le σ u v huv a ha K l).trans + apply div_le_div_of_nonneg_right _ (Nat.cast_nonneg _) + exact_mod_cast ambientDeletionConstant_lineRate_le (Fintype.card k) K + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionShapes.lean b/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionShapes.lean new file mode 100644 index 0000000000000000000000000000000000000000..2fe530b5ee799cc6d37ebd55ce62ee651579707b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionShapes.lean @@ -0,0 +1,121 @@ +import OAI.Combinatorics.Ryser.Construction.CoverPencil +import OAI.Combinatorics.Ryser.Geometry.Cardinality +import OAI.Combinatorics.Ryser.LineCover.Process +import Mathlib.Data.Fintype.EquivFin +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Linarith +import Lean.Elab.Tactic.Omega + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.Construction + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + +def ambientShapes (F : Type*) [Field F] [Fintype F] [DecidableEq F] : + Finset (Finset (Point F)) := Finset.univ.image linePoints + +theorem linePoints_mem_ambientShapes (l : AffineLine F) : + linePoints l ∈ ambientShapes F := Finset.mem_image_of_mem _ (Finset.mem_univ l) + +theorem ambient_linePoints_injective : Function.Injective (linePoints (F := F)) := by + intro l m h + by_contra hlm + have hbound := card_linePoints_inter_le_one hlm + rw [h, Finset.inter_self, card_linePoints] at hbound + exact (Fintype.one_lt_card : 1 < Fintype.card F).not_ge hbound + +theorem ambientShapes_count_le {D : ℕ} (hD : 2 ≤ D) : + (ambientShapes F).card ≤ D * Fintype.card F ^ D := by + have hq : 1 ≤ Fintype.card F := Nat.succ_le_of_lt Fintype.card_pos + have hpow : Fintype.card F ^ 2 ≤ Fintype.card F ^ D := + pow_le_pow_right₀ hq hD + calc + (ambientShapes F).card ≤ Fintype.card (AffineLine F) := + (Finset.card_image_le).trans_eq (Finset.card_univ) + _ = Fintype.card F * (Fintype.card F + 1) := card_affineLine + _ ≤ 2 * Fintype.card F ^ 2 := by nlinarith + _ ≤ D * Fintype.card F ^ D := Nat.mul_le_mul hD hpow + +theorem ambientShapes_size_le {D : ℕ} (hD : 1 ≤ D) + (S : Finset (Point F)) (hS : S ∈ ambientShapes F) : + S.card ≤ D * Fintype.card F := by + obtain ⟨l, _, rfl⟩ := Finset.mem_image.mp hS + rw [card_linePoints] + simpa only [one_mul] using Nat.mul_le_mul_right (Fintype.card F) hD + +theorem ambientShapes_sparse {D : ℕ} (hD : 1 ≤ D) : + LineCover.SparseShapes (ambientShapes F) D := by + intro S hS l hne + obtain ⟨m, _, rfl⟩ := Finset.mem_image.mp hS + have hml : m ≠ l := fun h => hne (congrArg linePoints h) + exact (card_linePoints_inter_le_one hml).trans hD + +def ambientLineOutcome {D : ℕ} (B : Finset (AffineLine F)) (hB : B.card ≤ D) : + LineCover.Outcome (ambientShapes F) D := + ⟨B.image (fun l => (⟨linePoints l, linePoints_mem_ambientShapes l⟩ : + ↥(ambientShapes F))), Finset.card_image_le.trans hB⟩ + +theorem mem_deleted_ambientLineOutcome {D : ℕ} (B : Finset (AffineLine F)) + (hB : B.card ≤ D) (ignore : Finset (Finset (Point F))) (x : Point F) : + x ∈ LineCover.deleted ignore (ambientLineOutcome B hB) ↔ + ∃ l ∈ B, linePoints l ∉ ignore ∧ Incidence x l := by + rw [LineCover.mem_deleted] + constructor + · rintro ⟨S, hS, hignore, hx⟩ + obtain ⟨l, hl, rfl⟩ := Finset.mem_image.mp hS + exact ⟨l, hl, hignore, (mem_linePoints x l).mp hx⟩ + · rintro ⟨l, hl, hignore, hx⟩ + exact ⟨⟨linePoints l, linePoints_mem_ambientShapes l⟩, + Finset.mem_image_of_mem _ hl, hignore, (mem_linePoints x l).mpr hx⟩ + +theorem ambientLineOutcome_lists_line {D : ℕ} (B : Finset (AffineLine F)) + (hB : B.card ≤ D) (l : AffineLine F) : + (∃ S ∈ (ambientLineOutcome B hB).val, S.val = linePoints l) ↔ l ∈ B := by + constructor + · rintro ⟨S, hS, heq⟩ + obtain ⟨m, hm, rfl⟩ := Finset.mem_image.mp hS + exact ambient_linePoints_injective heq ▸ hm + · intro hl + exact ⟨⟨linePoints l, linePoints_mem_ambientShapes l⟩, + Finset.mem_image_of_mem _ hl, rfl⟩ + +theorem deleted_empty_ambientLineOutcome {D : ℕ} (B : Finset (AffineLine F)) + (hB : B.card ≤ D) : + LineCover.deleted ∅ (ambientLineOutcome B hB) = B.biUnion linePoints := by + ext x + simp only [mem_deleted_ambientLineOutcome, Finset.notMem_empty, not_false_eq_true, true_and, + Finset.mem_biUnion, mem_linePoints] + +def ambientDeletionConstant (s K : ℕ) : ℕ := + 2 + (s - 1) ^ 2 + 2 * K + 2 * K * (s - 1) + +theorem ambientDeletionConstant_two_le (s K : ℕ) : + 2 ≤ ambientDeletionConstant s K := by + unfold ambientDeletionConstant + omega + +theorem ambientDeletionConstant_lines_le (s K : ℕ) : + (s - 1) ^ 2 ≤ ambientDeletionConstant s K := by + unfold ambientDeletionConstant + omega + +theorem ambientDeletionConstant_trials_le (s K : ℕ) : + 2 * K ≤ ambientDeletionConstant s K := by + unfold ambientDeletionConstant + omega + +theorem ambientDeletionConstant_lineRate_le (s K : ℕ) : + 2 * K * (s - 1) ≤ ambientDeletionConstant s K := by + unfold ambientDeletionConstant + omega + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionSurvivors.lean b/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionSurvivors.lean new file mode 100644 index 0000000000000000000000000000000000000000..89a206929a9991e705484ef6088cc663244bbfe6 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionSurvivors.lean @@ -0,0 +1,166 @@ +import OAI.Combinatorics.Ryser.Construction.AmbientDeletionPoolLaw +import OAI.Combinatorics.Ryser.Construction.DeletionUnionBasic + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] [Fintype k] [Fintype F] + [DecidableEq k] [DecidableEq F] + +def ambientPoolDeletedLines (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (K : ℕ) (b : AmbientPool σ K) : Finset (AffineLine F) := + Finset.univ.biUnion (fun i => Finset.univ.biUnion + (fun j => deletedLines σ (groupPlacement σ u v huv i) (b i j) a)) + +@[simp] theorem mem_ambientPoolDeletedLines (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (K : ℕ) (b : AmbientPool σ K) (l : AffineLine F) : + l ∈ ambientPoolDeletedLines σ u v huv a K b ↔ + ∃ i j, l ∈ deletedLines σ (groupPlacement σ u v huv i) (b i j) a := by + simp only [ambientPoolDeletedLines, Finset.mem_biUnion, Finset.mem_univ, true_and] + +def ambientPoolSurvivors (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (K : ℕ) (b : AmbientPool σ K) : Finset (Point F) := + Finset.univ \ (ambientPoolDeletedLines σ u v huv a K b).biUnion linePoints + +def ambientSelectedLines (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (K : ℕ) (b : AmbientPool σ K) + (choice : ConfigurationGroup σ → Fin K) : Finset (AffineLine F) := + allDeletedLines σ (groupPlacement σ u v huv) (fun i => b i (choice i)) a + +@[simp] theorem mem_ambientSelectedLines (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (K : ℕ) (b : AmbientPool σ K) + (choice : ConfigurationGroup σ → Fin K) (l : AffineLine F) : + l ∈ ambientSelectedLines σ u v huv a K b choice ↔ + ∃ i, l ∈ deletedLines σ (groupPlacement σ u v huv i) (b i (choice i)) a := + mem_allDeletedLines σ (groupPlacement σ u v huv) (fun i => b i (choice i)) a l + +def ambientSelectedSurvivors (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (K : ℕ) (b : AmbientPool σ K) + (choice : ConfigurationGroup σ → Fin K) : Finset (Point F) := + Finset.univ \ (ambientSelectedLines σ u v huv a K b choice).biUnion linePoints + +theorem mem_ambientSelectedSurvivors (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (K : ℕ) (b : AmbientPool σ K) + (choice : ConfigurationGroup σ → Fin K) (x : Point F) : + x ∈ ambientSelectedSurvivors σ u v huv a K b choice ↔ + ∀ l ∈ ambientSelectedLines σ u v huv a K b choice, ¬Incidence x l := by + constructor + · intro hx l hl hxl + exact (Finset.mem_sdiff.mp hx).2 (Finset.mem_biUnion.mpr + ⟨l, hl, (mem_linePoints x l).mpr hxl⟩) + · intro hx + refine Finset.mem_sdiff.mpr ⟨Finset.mem_univ _, ?_⟩ + intro h + obtain ⟨l, hl, hxl⟩ := Finset.mem_biUnion.mp h + exact hx l hl ((mem_linePoints x l).mp hxl) + +theorem mem_survivors_ambientPoolConfig (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) (b : AmbientPool σ K) + (ignore : Finset (Finset (Point F))) (x : Point F) : + x ∈ LineCover.survivors ignore (ambientPoolConfig σ u v huv a ha K b) ↔ + ∀ i j l, l ∈ deletedLines σ (groupPlacement σ u v huv i) (b i j) a → + linePoints l ∉ ignore → ¬Incidence x l := by + constructor + · intro hx i j l hl hi hxl + have ht := LineCover.mem_survivors.mp hx + ((Fintype.equivFin (AmbientPosition σ K)) (i, j)) + rw [ambientPoolConfig_at] at ht + apply ht + exact (mem_deleted_ambientLineOutcome _ _ ignore x).mpr ⟨l, hl, hi, hxl⟩ + · intro h + apply LineCover.mem_survivors.mpr + intro t hx + change x ∈ LineCover.deleted ignore + (ambientTrialOutcome σ (groupPlacement σ u v huv (ambientPosition σ K t).1) + a ha K (b (ambientPosition σ K t).1 (ambientPosition σ K t).2)) at hx + rw [ambientTrialOutcome, mem_deleted_ambientLineOutcome] at hx + obtain ⟨l, hl, hi, hxl⟩ := hx + exact h (ambientPosition σ K t).1 (ambientPosition σ K t).2 l hl hi hxl + +theorem ambientPoolConfig_survivors (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) (b : AmbientPool σ K) : + LineCover.survivors ∅ (ambientPoolConfig σ u v huv a ha K b) = + ambientPoolSurvivors σ u v huv a K b := by + ext x + rw [mem_survivors_ambientPoolConfig] + constructor + · intro h + apply Finset.mem_sdiff.mpr + refine ⟨Finset.mem_univ _, ?_⟩ + intro hx + obtain ⟨l, hl, hxl⟩ := Finset.mem_biUnion.mp hx + obtain ⟨i, j, hij⟩ := (mem_ambientPoolDeletedLines σ u v huv a K b l).mp hl + exact h i j l hij (by simp) ((mem_linePoints x l).mp hxl) + · intro hx i j l hl _ hxl + exact (Finset.mem_sdiff.mp hx).2 (Finset.mem_biUnion.mpr + ⟨l, (mem_ambientPoolDeletedLines σ u v huv a K b l).mpr ⟨i, j, hl⟩, + (mem_linePoints x l).mpr hxl⟩) + +theorem ambientSelectedLines_subset_pool (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (K : ℕ) (b : AmbientPool σ K) + (choice : ConfigurationGroup σ → Fin K) : + ambientSelectedLines σ u v huv a K b choice ⊆ ambientPoolDeletedLines σ u v huv a K b := by + intro l hl + obtain ⟨i, hi⟩ := (mem_ambientSelectedLines σ u v huv a K b choice l).mp hl + exact (mem_ambientPoolDeletedLines σ u v huv a K b l).mpr ⟨i, choice i, hi⟩ + +theorem ambientPool_survivors_subset_selected (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) (b : AmbientPool σ K) + (choice : ConfigurationGroup σ → Fin K) : + LineCover.survivors ∅ (ambientPoolConfig σ u v huv a ha K b) ⊆ + ambientSelectedSurvivors σ u v huv a K b choice := by + intro x hx + apply (mem_ambientSelectedSurvivors σ u v huv a K b choice x).mpr + intro l hl + obtain ⟨i, hi⟩ := (mem_ambientSelectedLines σ u v huv a K b choice l).mp hl + exact (mem_survivors_ambientPoolConfig σ u v huv a ha K b ∅ x).mp hx + i (choice i) l hi (by simp) + +theorem ambientPool_ignored_survivors_subset_selected (σ : k →+* F) + (u v : k) (huv : u ≠ v) (a : GadgetOutcome k) (ha : OriginalLineDensity a) + (K : ℕ) (b : AmbientPool σ K) (choice : ConfigurationGroup σ → Fin K) + (ell : AffineLine F) (hell : ell ∉ ambientSelectedLines σ u v huv a K b choice) : + LineCover.survivors {linePoints ell} (ambientPoolConfig σ u v huv a ha K b) ⊆ + ambientSelectedSurvivors σ u v huv a K b choice := by + intro x hx + apply (mem_ambientSelectedSurvivors σ u v huv a K b choice x).mpr + intro l hl + obtain ⟨i, hi⟩ := (mem_ambientSelectedLines σ u v huv a K b choice l).mp hl + apply (mem_survivors_ambientPoolConfig σ u v huv a ha K b {linePoints ell} x).mp hx + i (choice i) l hi + intro hignore + have heq : l = ell := ambient_linePoints_injective (Finset.mem_singleton.mp hignore) + exact hell (heq ▸ hl) + +theorem ambientPool_goodLineCover_selected (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) (b : AmbientPool σ K) + (choice : ConfigurationGroup σ → Fin K) (δ ρ : ℝ) + (hgood : LineCover.GoodLineCover δ ρ (ambientPoolConfig σ u v huv a ha K b)) : + (∀ ell, ell ∉ ambientSelectedLines σ u v huv a K b choice → + δ * Fintype.card F / 2 ≤ + ((ambientSelectedSurvivors σ u v huv a K b choice ∩ linePoints ell).card : ℝ)) ∧ + (∀ L : Finset (AffineLine F), L.card ≤ Fintype.card F → + ambientSelectedSurvivors σ u v huv a K b choice ⊆ L.biUnion linePoints → + ∃ p : ProjectivePoint F, + (1 - ρ) * Fintype.card F ≤ ((LineCover.coverPencil L p).card : ℝ)) := by + constructor + · intro ell hell + apply (hgood.1 ell).trans + exact_mod_cast Finset.card_le_card (Finset.inter_subset_inter + (ambientPool_ignored_survivors_subset_selected σ u v huv a ha K b choice ell hell) + (Finset.Subset.refl _)) + · intro L hL hcover + apply hgood.2 L hL + have hsub := (ambientPool_survivors_subset_selected σ u v huv a ha K b choice).trans hcover + rw [Finset.sdiff_eq_empty_iff_subset.mpr hsub, Finset.card_empty] + exact Nat.zero_le _ + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionTrials.lean b/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionTrials.lean new file mode 100644 index 0000000000000000000000000000000000000000..f12b2665c86c5539a9ab0cad915dbdc421e4f157 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/AmbientDeletionTrials.lean @@ -0,0 +1,148 @@ +import OAI.Combinatorics.Ryser.Construction.AmbientDeletionShapes +import OAI.Combinatorics.Ryser.Construction.AmbientDeletionGeometry +import OAI.Combinatorics.Ryser.Construction.GroupBounds +import OAI.Combinatorics.Ryser.Probability.ProductMap +import Mathlib.Tactic.Ring +import Mathlib.Tactic.Positivity + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] [Fintype k] [Fintype F] + [DecidableEq k] [DecidableEq F] + +def ambientTrialOutcome (σ : k →+* F) (M : PlaneLinearMap F) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) (b : Point F) : + LineCover.Outcome (ambientShapes F) (ambientDeletionConstant (Fintype.card k) K) := + ambientLineOutcome (deletedLines σ M b a) (by + rw [card_deletedLines σ M b a ha] + exact ambientDeletionConstant_lines_le _ _) + +def ambientTrialLaw (σ : k →+* F) (M : PlaneLinearMap F) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) : + FiniteLaw (LineCover.Outcome (ambientShapes F) + (ambientDeletionConstant (Fintype.card k) K)) := + (FiniteLaw.uniform (Point F)).map (ambientTrialOutcome σ M a ha K) + +def ambientPointRate (σ : k →+* F) (M : PlaneLinearMap F) (a : GadgetOutcome k) : ℝ := + ((ambientLineUnion (deletedLines σ M 0 a)).card : ℝ) / (Fintype.card F : ℝ) ^ 2 + +theorem ambientTrialLaw_point_probability (σ : k →+* F) (M : PlaneLinearMap F) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) (x : Point F) : + (ambientTrialLaw σ M a ha K).prob (fun A => x ∈ LineCover.deleted ∅ A) = + ambientPointRate σ M a := by + rw [ambientTrialLaw, FiniteLaw.prob_map] + simp only [ambientTrialOutcome, deleted_empty_ambientLineOutcome] + exact uniform_prob_mem_deletedLines_union σ M a x + +theorem ambientPointRate_le (σ : k →+* F) (M : PlaneLinearMap F) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) : + ambientPointRate σ M a ≤ ((Fintype.card k - 1 : ℕ) : ℝ) ^ 2 / Fintype.card F := by + have h := uniform_prob_mem_deletedLines_union_le σ M a (0 : Point F) + rw [uniform_prob_mem_deletedLines_union, card_deletedLines σ M 0 a ha, + Nat.cast_pow] at h + exact h + +theorem ambientTrialLaw_line_probability_le (σ : k →+* F) (M : PlaneLinearMap F) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) (l : AffineLine F) : + (ambientTrialLaw σ M a ha K).prob (fun A => ∃ S ∈ A.val, S.val = linePoints l) ≤ + if l.1 ∈ alteredDirections σ M then + ((Fintype.card k - 1 : ℕ) : ℝ) / Fintype.card F else 0 := by + rw [ambientTrialLaw, FiniteLaw.prob_map] + simp only [ambientTrialOutcome, ambientLineOutcome_lists_line] + have h := uniform_prob_mem_deletedLines_le σ M a l + by_cases hd : l.1 ∈ alteredDirections σ M + · rw [ite_eq_left hd] + rw [card_deletedLines_of_mem_alteredDirections σ M 0 a ha l.1 hd] at h + exact h + · rw [ite_eq_right hd] + have hempty : ((deletedLines σ M 0 a).filter (fun e => e.1 = l.1)) = ∅ := by + apply Finset.eq_empty_iff_forall_notMem.mpr + intro e he + obtain ⟨he, hdir⟩ := Finset.mem_filter.mp he + have hedir := ((mem_deletedLines σ M 0 a e).mp he).1 + exact hd (hdir ▸ hedir) + simpa only [hempty, Finset.card_empty, Nat.cast_zero, zero_div] using h + +abbrev AmbientPosition (σ : k →+* F) (K : ℕ) := ConfigurationGroup σ × Fin K + +def ambientTrialCount (σ : k →+* F) (K : ℕ) : ℕ := Fintype.card (AmbientPosition σ K) + +def ambientPosition (σ : k →+* F) (K : ℕ) (t : Fin (ambientTrialCount σ K)) : + AmbientPosition σ K := (Fintype.equivFin (AmbientPosition σ K)).symm t + +def ambientTrials (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) + (t : Fin (ambientTrialCount σ K)) : + FiniteLaw (LineCover.Outcome (ambientShapes F) + (ambientDeletionConstant (Fintype.card k) K)) := + ambientTrialLaw σ (groupPlacement σ u v huv (ambientPosition σ K t).1) a ha K + +theorem ambientTrialCount_mul_sub_one_le (σ : k →+* F) (K : ℕ) : + ambientTrialCount σ K * (Fintype.card k - 1) ≤ 2 * K * Fintype.card F := by + unfold ambientTrialCount AmbientPosition + rw [Fintype.card_prod, Fintype.card_fin] + calc + Fintype.card (ConfigurationGroup σ) * K * (Fintype.card k - 1) = + K * (Fintype.card (ConfigurationGroup σ) * (Fintype.card k - 1)) := by ring + _ ≤ K * (2 * Fintype.card F) := + Nat.mul_le_mul_left K (card_groups_mul_sub_one_le σ) + _ = 2 * K * Fintype.card F := by ring + +theorem ambientTrialCount_le (σ : k →+* F) (K : ℕ) (hs : 2 ≤ Fintype.card k) : + ambientTrialCount σ K ≤ ambientDeletionConstant (Fintype.card k) K * Fintype.card F := by + have hs' : 1 ≤ Fintype.card k - 1 := by omega + calc + ambientTrialCount σ K = ambientTrialCount σ K * 1 := by rw [Nat.mul_one] + _ ≤ ambientTrialCount σ K * (Fintype.card k - 1) := Nat.mul_le_mul_left _ hs' + _ ≤ 2 * K * Fintype.card F := ambientTrialCount_mul_sub_one_le σ K + _ ≤ ambientDeletionConstant (Fintype.card k) K * Fintype.card F := + Nat.mul_le_mul_right _ (ambientDeletionConstant_trials_le _ _) + +theorem ambientTrials_line_probability_sum_le (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) (l : AffineLine F) : + (∑ t, (ambientTrials σ u v huv a ha K t).prob + (fun A => ∃ S ∈ A.val, S.val = linePoints l)) ≤ + (2 : ℝ) * K * ((Fintype.card k - 1 : ℕ) : ℝ) / Fintype.card F := by + let rate : ℝ := ((Fintype.card k - 1 : ℕ) : ℝ) / Fintype.card F + have hrate : 0 ≤ rate := div_nonneg (Nat.cast_nonneg _) (Nat.cast_nonneg _) + have hsum : (∑ i : ConfigurationGroup σ, + if l.1 ∈ groupAltered σ u v huv i then rate else 0) ≤ 2 * rate := by + rw [← Finset.sum_filter] + simp only [Finset.sum_const, nsmul_eq_mul] + have hmult : ((Finset.univ.filter + (fun i => l.1 ∈ groupAltered σ u v huv i)).card : ℝ) ≤ 2 := by + exact_mod_cast groupAltered_multiplicity_le_two σ u v huv l.1 + exact mul_le_mul_of_nonneg_right hmult hrate + calc + _ = ∑ p : AmbientPosition σ K, + (ambientTrialLaw σ (groupPlacement σ u v huv p.1) a ha K).prob + (fun A => ∃ S ∈ A.val, S.val = linePoints l) := + Equiv.sum_comp (Fintype.equivFin (AmbientPosition σ K)).symm _ + _ ≤ ∑ i : ConfigurationGroup σ, ∑ _j : Fin K, + if l.1 ∈ groupAltered σ u v huv i then rate else 0 := by + rw [Fintype.sum_prod_type] + apply Finset.sum_le_sum + intro i _ + apply Finset.sum_le_sum + intro j _ + exact ambientTrialLaw_line_probability_le σ (groupPlacement σ u v huv i) a ha K l + _ = (K : ℝ) * ∑ i : ConfigurationGroup σ, + if l.1 ∈ groupAltered σ u v huv i then rate else 0 := by + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] + rw [Finset.mul_sum] + _ ≤ (K : ℝ) * (2 * rate) := mul_le_mul_of_nonneg_left hsum (Nat.cast_nonneg _) + _ = (2 : ℝ) * K * ((Fintype.card k - 1 : ℕ) : ℝ) / Fintype.card F := by + dsimp only [rate] + ring + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/AmbientPoolExistence.lean b/lean/OAI/Combinatorics/Ryser/Construction/AmbientPoolExistence.lean new file mode 100644 index 0000000000000000000000000000000000000000..c384ae402ec2f30b795d8daa493951f9f99ffb7c --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/AmbientPoolExistence.lean @@ -0,0 +1,116 @@ +import OAI.Combinatorics.Ryser.Construction.AmbientDeletionPoolLaw +import OAI.Combinatorics.Ryser.Construction.GroupSelection +import OAI.Combinatorics.Ryser.Construction.PoolThinAsymptotic +import OAI.Combinatorics.Ryser.LineCover.Main +import OAI.Combinatorics.Ryser.Selection.Main + +namespace OAI + +noncomputable section +open scoped Classical + +namespace RyserCoveringCounterexample.Construction + +universe uk uf + +variable {k : Type uk} [Field k] [Fintype k] [DecidableEq k] + +def GoodAmbientPool {F : Type uf} [Field F] [Fintype F] [DecidableEq F] + (σ : k →+* F) (u v : k) (huv : u ≠ v) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (K : ℕ) + (pool : AmbientPool σ K) : Prop := + Selection.HasCompatibleChoice (groupSelectionData σ u v huv) + (ambientFlatPoolEquiv σ K pool) ∧ + LineCover.GoodLineCover (ambientDeletionDelta (Fintype.card k) K) + (ambientDeletionDelta (Fintype.card k) K / 10) + (ambientPoolConfig σ u v huv a ha K pool) ∧ + PoolThin (groupPoints σ u v huv) (groupAltered σ u v huv) pool + +theorem exists_goodAmbientPool_uniform + (u v : k) (huv : u ≠ v) (a : GadgetOutcome k) (ha : OriginalLineDensity a) + (hs : 2 ≤ Fintype.card k) : + ∃ K Q : ℕ, 6 ≤ K ∧ + ∀ (F : Type uf) [Field F] [Fintype F] [DecidableEq F] (σ : k →+* F), + Q ≤ Fintype.card F → Incidence.SmallProperSubfields F → + (1 + ambientDeletionDelta (Fintype.card k) K / 10 * Fintype.card F < + ambientDeletionDelta (Fintype.card k) K * Fintype.card F / 2) ∧ + ∃ pool : AmbientPool σ K, GoodAmbientPool σ u v huv a ha K pool := by + classical + let s := Fintype.card k + let D := groupSelectionConstant s + have hD : 1 ≤ D := by dsimp [D, groupSelectionConstant]; omega + obtain ⟨K, hK, hselection⟩ := Selection.compatible_selection_uniform.{uf} D hD + obtain ⟨QS, hQS⟩ := hselection (1 / 4) (by norm_num) + let δ := ambientDeletionDelta s K + let ρ := δ / 10 + let DA := ambientDeletionConstant s K + have hδ : 0 < δ := ambientDeletionDelta_pos s K + have hρ : 0 < ρ := div_pos hδ (by norm_num) + have hDA : 0 < DA := lt_of_lt_of_le (by decide : 0 < 2) + (ambientDeletionConstant_two_le s K) + obtain ⟨QL, hQL⟩ := LineCover.uniform_linecover_probability.{uf} + DA δ ρ hDA hδ hρ (1 / 4) (by norm_num) + obtain ⟨QT, hQT⟩ := exists_thinFailure_cutoff s K (η := 1 / 4) (by norm_num) + let QF : ℕ := ⌈10 / δ⌉₊ + 1 + refine ⟨K, QS + QL + QT + 2 * (s - 1) ^ 2 + QF, hK, ?_⟩ + intro F instField instFintype instDecidable σ hq hsub + have hqS : QS ≤ Fintype.card F := by omega + have hqL : QL ≤ Fintype.card F := by omega + have hqT : QT ≤ Fintype.card F := by omega + have hsmall : 2 * (Fintype.card k - 1) ^ 2 ≤ Fintype.card F := by + change 2 * (s - 1) ^ 2 ≤ Fintype.card F + omega + have hqF : QF ≤ Fintype.card F := by omega + have hqFreal : (QF : ℝ) ≤ Fintype.card F := by exact_mod_cast hqF + have hforce : 1 + ρ * Fintype.card F < δ * Fintype.card F / 2 := by + have hceil : 10 / δ ≤ (⌈10 / δ⌉₊ : ℝ) := Nat.le_ceil _ + have hlarge : 10 / δ < (Fintype.card F : ℝ) := by + dsimp [QF] at hqFreal + push_cast at hqFreal + linarith + have hproduct : 10 < (Fintype.card F : ℝ) * δ := (div_lt_iff₀ hδ).mp hlarge + dsimp [ρ] + nlinarith + refine ⟨hforce, ?_⟩ + let μ := poolThinLaw (F := F) (ConfigurationGroup σ) K + let Selected : AmbientPool σ K → Prop := fun pool => + Selection.HasCompatibleChoice (groupSelectionData σ u v huv) + (ambientFlatPoolEquiv σ K pool) + let Rigid : AmbientPool σ K → Prop := fun pool => + LineCover.GoodLineCover δ ρ (ambientPoolConfig σ u v huv a ha K pool) + let Thin : AmbientPool σ K → Prop := + PoolThin (groupPoints σ u v huv) (groupAltered σ u v huv) + have hselect : 1 - (1 / 4 : ℝ) ≤ μ.prob Selected := by + have h := hQS F (Fintype.card (ConfigurationGroup σ)) (groupSelectionData σ u v huv) + (groupSelectionData_bounded σ u v huv hs) hqS + rw [← poolThinLaw_map_ambientFlatPoolEquiv σ K, FiniteLaw.prob_map] at h + exact h + have hrigid : 1 - (1 / 4 : ℝ) ≤ μ.prob Rigid := by + have h := hQL F hqL hsub (ambientDeletionProcess σ u v huv a ha K hs hsmall) + change 1 - (1 / 4 : ℝ) ≤ (FiniteLaw.pi (ambientTrials σ u v huv a ha K)).prob + (LineCover.GoodLineCover δ ρ) at h + rw [← poolThinLaw_map_ambientPoolConfig σ u v huv a ha K, FiniteLaw.prob_map] at h + exact h + have hthin : 1 - (1 / 4 : ℝ) ≤ μ.prob Thin := by + have h := prob_groupPoolThin_ge σ u v huv K + have htail := hQT (Fintype.card F) hqT + exact (sub_le_sub_left htail 1).trans h + have hex : ∃ pool : AmbientPool σ K, Selected pool ∧ Rigid pool ∧ Thin pool := by + by_contra hnot + have himp : ∀ pool, Selected pool → ¬ Rigid pool ∨ ¬ Thin pool := by + intro pool hselected + by_cases hr : Rigid pool + · exact Or.inr (fun ht => hnot ⟨pool, hselected, hr, ht⟩) + · exact Or.inl hr + have hmono := (μ.prob_mono himp).trans (μ.prob_union_le (fun pool => ¬ Rigid pool) + (fun pool => ¬ Thin pool)) + rw [μ.prob_compl, μ.prob_compl] at hmono + linarith + obtain ⟨pool, hselected, hrigid', hthin'⟩ := hex + exact ⟨pool, hselected, hrigid', hthin'⟩ + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/CoordinateCompatibility.lean b/lean/OAI/Combinatorics/Ryser/Construction/CoordinateCompatibility.lean new file mode 100644 index 0000000000000000000000000000000000000000..875e617a7cd2733903b9842068e9da725fd345bf --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/CoordinateCompatibility.lean @@ -0,0 +1,147 @@ +import OAI.Combinatorics.Ryser.Construction.DirectionSets +import OAI.Combinatorics.Ryser.Construction.GadgetAlgebra +import OAI.Combinatorics.Ryser.Construction.Intersection + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {k F G : Type*} [Field k] [Field F] +variable [instFintypek : Fintype k] [instDecidableEqk : DecidableEq k] [DecidableEq F] [DecidableEq G] + +theorem projection_cubeMap_axis_eq_iff + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (d : Direction k) (hd : d = none ∨ d = some 0) (p q : Point k) : + projection d (cubeMap p) = projection d (cubeMap q) ↔ + projection d p = projection d q := let _ := instDecidableEqk; by + rcases hd with rfl | rfl + · change p.1 ^ 3 = q.1 ^ 3 ↔ p.1 = q.1 + exact (cube_bijective hcop).injective.eq_iff + · simp only [projection_some_zero, cubeMap] + +theorem projection_placedPoint_cubeMap_axis_eq_iff + (σ : k →+* F) (M : PlaneLinearMap F) (b : Point F) + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (d : Direction k) (hd : d = none ∨ d = some 0) (p q : Point k) : + projection (placedDirection σ M d) (placedPoint σ M b p) = + projection (placedDirection σ M d) (placedPoint σ M b q) ↔ + projection d (cubeMap p) = projection d (cubeMap q) := + (projection_placedPoint_eq_iff σ M b d p q).trans + (projection_cubeMap_axis_eq_iff hcop d hd p q).symm + +theorem cubeMap_incidence_axis_of_placed_incidence + (σ : k →+* F) (M : PlaneLinearMap F) (b : Point F) + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (d : Direction k) (hd : d = none ∨ d = some 0) + (ell : AffineLine F) (hell : ell.1 = placedDirection σ M d) + (p q : Point k) (hp : Incidence (placedPoint σ M b p) ell) + (hq : Incidence (placedPoint σ M b q) ell) : + Incidence (cubeMap p) (lineThrough d (cubeMap q)) := by + have hproj : projection ell.1 (placedPoint σ M b p) = + projection ell.1 (placedPoint σ M b q) := hp.trans hq.symm + rw [hell] at hproj + exact (projection_placedPoint_cubeMap_axis_eq_iff σ M b hcop d hd p q).1 hproj + +theorem placedPoint_eq_of_incidence_of_direction_outside + (σ : k →+* F) (M : PlaneLinearMap F) (b : Point F) + (ell : AffineLine F) + (houtside : ∀ d : Direction k, ell.1 ≠ placedDirection σ M d) + (p q : Point k) (hp : Incidence (placedPoint σ M b p) ell) + (hq : Incidence (placedPoint σ M b q) ell) : p = q := let _ := instFintypek; by + let d := (joinLine p q).1 + have hsmall : projection d p = projection d q := + (incidence_joinLine_left p q).trans (incidence_joinLine_right p q).symm + have hplaced := (projection_placedPoint_eq_iff σ M b d p q).2 hsmall + have hell : projection ell.1 (placedPoint σ M b p) = + projection ell.1 (placedPoint σ M b q) := hp.trans hq.symm + apply placedPoint_injective σ M b + exact point_eq_of_projection_eq_of_ne_direction (houtside d) hell hplaced + +theorem placedPoint_eq_of_incidence_outside_altered_axis + (σ : k →+* F) (M : PlaneLinearMap F) (b : Point F) + (ell : AffineLine F) + (houtside : ell.1 ∉ alteredDirections σ M ∪ axisDirections σ M) + (p q : Point k) (hp : Incidence (placedPoint σ M b p) ell) + (hq : Incidence (placedPoint σ M b q) ell) : p = q := by + apply placedPoint_eq_of_incidence_of_direction_outside σ M b ell ?_ p q hp hq + intro d hd + apply houtside + rw [hd] + exact placedDirection_mem_altered_or_axis σ M d + +def placedConfiguration (σ : k →+* F) (M : G → PlaneLinearMap F) + (b : G → Point F) (Y : Finset (Point k)) (X : Finset (Point F)) : + ConfigurationData k F G where + altered i := alteredDirections σ (M i) + inverseSlope i := alteredInverseSlope σ (M i) + base i := placedPoint σ (M i) (b i) + transform := cubeMap + retained := Y + ordinaryPoints := X + +variable [Fintype F] + +theorem placedExceptionalEdge_inter_sameGroup + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (Y : Finset (Point k)) (X : Finset (Point F)) + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (i : G) (p q : Point k) : + (exceptionalEdge (placedConfiguration σ M b Y X) i p ∩ + exceptionalEdge (placedConfiguration σ M b Y X) i q).Nonempty := by + exact exceptionalEdge_inter_sameGroup (placedConfiguration σ M b Y X) i + (placedDirection σ (M i)) + (placedDirection_mem_alteredDirections σ (M i)) + (inverseSlope_placedDirection σ (M i)) + (placedDirection_axis_notMem_alteredDirections σ (M i)) + (fun d hd w z hproj => + (projection_placedPoint_cubeMap_axis_eq_iff σ (M i) (b i) + hcop d hd w z).2 hproj) p q + +theorem placedExceptionalEdge_injective + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (Y : Finset (Point k)) (X : Finset (Point F)) + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (i : G) + (a c : k) (ha : a ≠ 0) (hc : c ≠ 0) (hac : a ≠ c) : + Function.Injective (exceptionalEdge (placedConfiguration σ M b Y X) i) := by + have hinverse : alteredInverseSlope σ (M i) + ⟨placedDirection σ (M i) (some a), placedDirection_mem_alteredDirections σ (M i) a ha⟩ ≠ + alteredInverseSlope σ (M i) + ⟨placedDirection σ (M i) (some c), placedDirection_mem_alteredDirections σ (M i) c hc⟩ := by + rw [inverseSlope_placedDirection σ (M i) a ha, + inverseSlope_placedDirection σ (M i) c hc] + exact hac + exact exceptionalEdge_injective (placedConfiguration σ M b Y X) i + (cubeMap_bijective hcop).injective + ⟨placedDirection σ (M i) (some a), placedDirection_mem_alteredDirections σ (M i) a ha⟩ + ⟨placedDirection σ (M i) (some c), placedDirection_mem_alteredDirections σ (M i) c hc⟩ + hinverse + +variable [Fintype G] + +theorem placedHypergraph_intersecting + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (Y : Finset (Point k)) (X : Finset (Point F)) + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (havoid : ∀ x ∈ X, ∀ i, ∀ w ∈ Y, ∀ d ∈ alteredDirections σ (M i), + projection d x ≠ projection d (placedPoint σ (M i) (b i) w)) + (hseparate : ∀ i j : G, i ≠ j → ∀ w ∈ Y, ∀ z ∈ Y, + ∀ d ∈ alteredDirections σ (M i), + projection d (placedPoint σ (M i) (b i) w) ≠ + projection d (placedPoint σ (M j) (b j) z)) : + Intersecting (hypergraph (placedConfiguration σ M b Y X)) := by + exact hypergraph_intersecting_of_geometric_data (placedConfiguration σ M b Y X) + (fun i => placedDirection σ (M i)) + (fun i => placedDirection_mem_alteredDirections σ (M i)) + (fun i => inverseSlope_placedDirection σ (M i)) + (fun i => placedDirection_axis_notMem_alteredDirections σ (M i)) + (fun i d hd p q hproj => + (projection_placedPoint_cubeMap_axis_eq_iff σ (M i) (b i) + hcop d hd p q).2 hproj) + havoid hseparate + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/CosetDirections.lean b/lean/OAI/Combinatorics/Ryser/Construction/CosetDirections.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a07ed3b91d61071659c86c0fc0924aa52bdc2c4 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/CosetDirections.lean @@ -0,0 +1,113 @@ +import OAI.Combinatorics.Ryser.Construction.CosetIndex +import OAI.Combinatorics.Ryser.Construction.DirectionSets + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] +variable [instDecidableEqk : DecidableEq k] [instDecidableEqF : DecidableEq F] [instFintypek : Fintype k] + +def cosetPlacement (σ : k →+* F) (c : CosetIndex σ) : PlaneLinearMap F := + PlaneLinearMap.diagonal (cosetRepresentative σ c : F) + (cosetRepresentative σ c).ne_zero + +@[simp] theorem placedDirection_coset_none (σ : k →+* F) (c : CosetIndex σ) : + placedDirection σ (cosetPlacement σ c) none = none := let _ := instDecidableEqk; let _ := instFintypek; by + simp [placedDirection, mapDirection, cosetPlacement] + +@[simp] theorem placedDirection_coset_some (σ : k →+* F) (c : CosetIndex σ) + (t : k) : + placedDirection σ (cosetPlacement σ c) (some t) = + some ((cosetRepresentative σ c : F) * σ t) := let _ := instDecidableEqk; let _ := instFintypek; by + simp [placedDirection, mapDirection, cosetPlacement] + +theorem coset_axisDirections (σ : k →+* F) (c : CosetIndex σ) : + axisDirections σ (cosetPlacement σ c) = {none, some 0} := by + ext d + simp [mem_axisDirections_iff] + +theorem mem_coset_altered_iff (σ : k →+* F) (c : CosetIndex σ) + (d : Direction F) : + d ∈ alteredDirections σ (cosetPlacement σ c) ↔ + ∃ t : k, t ≠ 0 ∧ d = some ((cosetRepresentative σ c : F) * σ t) := by + rw [mem_alteredDirections_iff] + simp only [placedDirection_coset_some, eq_comm] + +@[simp] theorem none_notMem_coset_altered (σ : k →+* F) (c : CosetIndex σ) : + none ∉ alteredDirections σ (cosetPlacement σ c) := by + simp [mem_coset_altered_iff] + +@[simp] theorem zero_notMem_coset_altered (σ : k →+* F) (c : CosetIndex σ) : + some 0 ∉ alteredDirections σ (cosetPlacement σ c) := by + rintro hd + obtain ⟨t, ht, heq⟩ := (mem_coset_altered_iff σ c _).mp hd + have hz := Option.some.inj heq + exact mul_ne_zero (cosetRepresentative σ c).ne_zero + (fun hz' => ht (σ.injective (hz'.trans (map_zero σ).symm))) hz.symm + +theorem unitCoset_mul_embedded (σ : k →+* F) (a : Fˣ) (u : kˣ) : + unitCoset σ (a * embeddedUnits σ u) = unitCoset σ a := let _ := instDecidableEqk; let _ := instDecidableEqF; let _ := instFintypek; by + apply (unitCoset_eq_iff σ _ _).mpr + refine ⟨u, ?_⟩ + simp only [mul_div_cancel_left] + +theorem some_unit_mem_coset_altered_iff (σ : k →+* F) (c : CosetIndex σ) + (a : Fˣ) : + some (a : F) ∈ alteredDirections σ (cosetPlacement σ c) ↔ + unitCoset σ a = c := by + constructor + · intro ha + obtain ⟨t, ht, heq⟩ := (mem_coset_altered_iff σ c _).mp ha + have hu : a = cosetRepresentative σ c * embeddedUnits σ (Units.mk0 t ht) := by + apply Units.ext + simpa [embeddedUnits] using Option.some.inj heq + rw [hu, unitCoset_mul_embedded, unitCoset_representative] + · intro ha + obtain ⟨u, hu⟩ := exists_embeddedUnit_mul_representative σ a + apply (mem_coset_altered_iff σ c _).mpr + refine ⟨(u : k), u.ne_zero, ?_⟩ + apply congrArg Option.some + have hv := congrArg (fun z : Fˣ => (z : F)) hu + simpa [embeddedUnits, ha, mul_comm] using hv + +theorem existsUnique_coset_altered (σ : k →+* F) (a : F) (ha : a ≠ 0) : + ∃! c : CosetIndex σ, some a ∈ alteredDirections σ (cosetPlacement σ c) := by + refine ⟨unitCoset σ (Units.mk0 a ha), ?_, ?_⟩ + · exact (some_unit_mem_coset_altered_iff σ _ (Units.mk0 a ha)).mpr rfl + · intro c hc + exact ((some_unit_mem_coset_altered_iff σ c (Units.mk0 a ha)).mp hc).symm + +theorem coset_altered_index_eq (σ : k →+* F) {c e : CosetIndex σ} + {d : Direction F} + (hc : d ∈ alteredDirections σ (cosetPlacement σ c)) + (he : d ∈ alteredDirections σ (cosetPlacement σ e)) : c = e := by + obtain ⟨t, ht, rfl⟩ := (mem_coset_altered_iff σ c d).mp hc + let a : Fˣ := cosetRepresentative σ c * embeddedUnits σ (Units.mk0 t ht) + have hc' : unitCoset σ a = c := by + simp only [a, unitCoset_mul_embedded, unitCoset_representative] + have he' : unitCoset σ a = e := by + apply (some_unit_mem_coset_altered_iff σ e a).mp + simpa [a, embeddedUnits] using he + exact hc'.symm.trans he' + +theorem disjoint_coset_altered (σ : k →+* F) {c e : CosetIndex σ} + (hce : c ≠ e) : + Disjoint (alteredDirections σ (cosetPlacement σ c)) + (alteredDirections σ (cosetPlacement σ e)) := by + apply Finset.disjoint_left.mpr + intro d hc he + exact hce (coset_altered_index_eq σ hc he) + +theorem identity_coset_altered (σ : k →+* F) : + alteredDirections σ (cosetPlacement σ 1) = + (Finset.univ.erase (0 : k)).image (fun t => some (σ t)) := by + simp [alteredDirections, placedDirection_coset_some] + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/CosetIndex.lean b/lean/OAI/Combinatorics/Ryser/Construction/CosetIndex.lean new file mode 100644 index 0000000000000000000000000000000000000000..52d9d3595566f7e2a15819f1c60e348721dad16d --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/CosetIndex.lean @@ -0,0 +1,109 @@ +import OAI.Combinatorics.Ryser.Construction.LinearPlacement +import Mathlib.Algebra.GroupWithZero.Units.Fintype +import Mathlib.GroupTheory.QuotientGroup.Basic +import Mathlib.GroupTheory.Coset.Card + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] + +def embeddedUnits (σ : k →+* F) : kˣ →* Fˣ := Units.map σ.toMonoidHom + +theorem embeddedUnits_injective (σ : k →+* F) : Function.Injective (embeddedUnits σ) := + Units.map_injective σ.injective + +def smallUnitSubgroup (σ : k →+* F) : Subgroup Fˣ := (embeddedUnits σ).range + +abbrev CosetIndex (σ : k →+* F) := Fˣ ⧸ smallUnitSubgroup σ + +def unitCoset (σ : k →+* F) (a : Fˣ) : CosetIndex σ := QuotientGroup.mk a + +def cosetRepresentative (σ : k →+* F) (c : CosetIndex σ) : Fˣ := by + classical + exact if c = 1 then 1 else c.out + +@[simp] theorem cosetRepresentative_one (σ : k →+* F) : + cosetRepresentative σ 1 = 1 := by + classical + simp [cosetRepresentative] + +@[simp] theorem unitCoset_representative (σ : k →+* F) (c : CosetIndex σ) : + unitCoset σ (cosetRepresentative σ c) = c := by + classical + by_cases hc : c = 1 + · subst c + simp [cosetRepresentative, unitCoset] + · simp only [cosetRepresentative, ite_eq_right hc, unitCoset] + exact Quotient.out_eq' c + +theorem cosetRepresentative_injective (σ : k →+* F) : + Function.Injective (cosetRepresentative σ) := by + intro c d hcd + have h := congrArg (unitCoset σ) hcd + simpa only [unitCoset_representative] using h + +theorem unitCoset_eq_iff (σ : k →+* F) (a b : Fˣ) : + unitCoset σ a = unitCoset σ b ↔ + ∃ u : kˣ, embeddedUnits σ u = a / b := by + change (a : Fˣ ⧸ smallUnitSubgroup σ) = b ↔ _ + rw [QuotientGroup.eq_iff_div_mem] + rfl + +theorem unitCoset_eq_one_iff (σ : k →+* F) (a : Fˣ) : + unitCoset σ a = 1 ↔ ∃ u : kˣ, embeddedUnits σ u = a := by + change (a : Fˣ ⧸ smallUnitSubgroup σ) = 1 ↔ _ + rw [QuotientGroup.eq_one_iff] + rfl + +theorem exists_embeddedUnit_mul_representative (σ : k →+* F) (a : Fˣ) : + ∃ u : kˣ, a = embeddedUnits σ u * cosetRepresentative σ (unitCoset σ a) := by + have hc : unitCoset σ a = + unitCoset σ (cosetRepresentative σ (unitCoset σ a)) := by simp + obtain ⟨u, hu⟩ := (unitCoset_eq_iff σ _ _).mp hc + refine ⟨u, ?_⟩ + rw [hu, div_mul_cancel] + +abbrev ConfigurationGroup (σ : k →+* F) := Option (CosetIndex σ) + +def identityGroup (σ : k →+* F) : ConfigurationGroup σ := some 1 + +def extraGroup (σ : k →+* F) : ConfigurationGroup σ := none + +theorem natCard_smallUnitSubgroup (σ : k →+* F) : + Nat.card (smallUnitSubgroup σ) = Nat.card k - 1 := by + calc + Nat.card (smallUnitSubgroup σ) = Nat.card kˣ := + (Nat.card_congr (MonoidHom.ofInjective (embeddedUnits_injective σ)).toEquiv).symm + _ = Nat.card k - 1 := Nat.card_units k + +theorem natCard_cosetIndex_mul (σ : k →+* F) : + Nat.card (CosetIndex σ) * (Nat.card k - 1) = Nat.card F - 1 := by + have h := Subgroup.card_eq_card_quotient_mul_card_subgroup (smallUnitSubgroup σ) + rw [Nat.card_units, natCard_smallUnitSubgroup] at h + exact h.symm + +section Finite + +variable [instFintypek : Fintype k] [Fintype F] + +instance (σ : k →+* F) : Fintype (CosetIndex σ) := Fintype.ofFinite _ + +theorem card_cosetIndex_mul (σ : k →+* F) : + Fintype.card (CosetIndex σ) * (Fintype.card k - 1) = Fintype.card F - 1 := by + simpa only [Nat.card_eq_fintype_card] using natCard_cosetIndex_mul σ + +theorem card_configurationGroup (σ : k →+* F) : + Fintype.card (ConfigurationGroup σ) = Fintype.card (CosetIndex σ) + 1 := let _ := instFintypek; + Fintype.card_option + +end Finite + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/CoverBudget.lean b/lean/OAI/Combinatorics/Ryser/Construction/CoverBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..abc9fd518cb76dcbac5cacbc69e6b413390aa224 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/CoverBudget.lean @@ -0,0 +1,110 @@ +import OAI.Combinatorics.Ryser.Construction.OrdinaryCover +import OAI.Combinatorics.Ryser.Geometry.Cardinality +import Lean.Elab.Tactic.Omega + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +variable {k F G : Type*} [instFieldk : Field k] [Field F] +variable [DecidableEq k] [DecidableEq F] [DecidableEq G] [Fintype F] + +theorem card_forcedPencilVertices_add_card_deletedPencil + (data : ConfigurationData k F G) (B : Finset (AffineLine F)) + (p : ProjectivePoint F) : + (forcedPencilVertices data B p).card + (B ∩ affinePencil p).card = + (affinePencil p).card := by + rw [card_forcedPencilVertices] + simpa only [Finset.inter_comm] using + Finset.card_sdiff_add_card_inter (affinePencil p) B + +theorem card_forcedPencilVertices_finite (data : ConfigurationData k F G) + (B : Finset (AffineLine F)) (p : Point F) : + (forcedPencilVertices data B (Sum.inl p)).card = + Fintype.card F + 1 - (B ∩ affinePencil (Sum.inl p)).card := by + rw [card_forcedPencilVertices, Finset.card_sdiff, card_affinePencil_finite] + +theorem card_forcedPencilVertices_infinite (data : ConfigurationData k F G) + (B : Finset (AffineLine F)) (d : Direction F) : + (forcedPencilVertices data B (Sum.inr d)).card = + Fintype.card F - (B ∩ affinePencil (Sum.inr d)).card := by + rw [card_forcedPencilVertices, Finset.card_sdiff, card_affinePencil_infinite] + +theorem card_additionalPencilVertices_eq (data : ConfigurationData k F G) + (B : Finset (AffineLine F)) (p : ProjectivePoint F) + (C : Finset (Vertex (k := let _ := instFieldk; k) data.altered)) + (hforced : forcedPencilVertices data B p ⊆ C) : + (C \ forcedPencilVertices data B p).card = + C.card - (forcedPencilVertices data B p).card := + Finset.card_sdiff_of_subset hforced + +theorem forced_additional_card_eq (data : ConfigurationData k F G) + (B : Finset (AffineLine F)) (p : ProjectivePoint F) + (C : Finset (Vertex (k := let _ := instFieldk; k) data.altered)) + (hforced : forcedPencilVertices data B p ⊆ C) : + (forcedPencilVertices data B p).card + + (C \ forcedPencilVertices data B p).card = C.card := by + simpa only [Nat.add_comm] using Finset.card_sdiff_add_card_eq_card hforced + +theorem forced_additional_card_le (data : ConfigurationData k F G) + (B : Finset (AffineLine F)) (p : ProjectivePoint F) + (C : Finset (Vertex (k := k) data.altered)) + (hforced : forcedPencilVertices data B p ⊆ C) (hC : C.card ≤ Fintype.card F) : + (forcedPencilVertices data B p).card + + (C \ forcedPencilVertices data B p).card ≤ Fintype.card F := + (forced_additional_card_eq data B p C hforced).trans_le hC + +theorem pencil_additional_card_le (data : ConfigurationData k F G) + (B : Finset (AffineLine F)) (p : ProjectivePoint F) + (C : Finset (Vertex (k := k) data.altered)) + (hforced : forcedPencilVertices data B p ⊆ C) (hC : C.card ≤ Fintype.card F) : + (affinePencil p).card + (C \ forcedPencilVertices data B p).card ≤ + Fintype.card F + (B ∩ affinePencil p).card := by + have hsplit := card_forcedPencilVertices_add_card_deletedPencil data B p + have hbudget := forced_additional_card_le data B p C hforced hC + omega + +theorem finite_deletedPencil_card_pos (data : ConfigurationData k F G) + (B : Finset (AffineLine F)) (p : Point F) + (C : Finset (Vertex (k := k) data.altered)) + (hforced : forcedPencilVertices data B (Sum.inl p) ⊆ C) + (hC : C.card ≤ Fintype.card F) : + 0 < (B ∩ affinePencil (Sum.inl p)).card := by + have hbudget := pencil_additional_card_le data B (Sum.inl p) C hforced hC + rw [card_affinePencil_finite] at hbudget + omega + +theorem finite_additional_card_le (data : ConfigurationData k F G) + (B : Finset (AffineLine F)) (p : Point F) + (C : Finset (Vertex (k := k) data.altered)) + (hforced : forcedPencilVertices data B (Sum.inl p) ⊆ C) + (hC : C.card ≤ Fintype.card F) : + (C \ forcedPencilVertices data B (Sum.inl p)).card ≤ + (B ∩ affinePencil (Sum.inl p)).card - 1 := by + have hbudget := pencil_additional_card_le data B (Sum.inl p) C hforced hC + rw [card_affinePencil_finite] at hbudget + omega + +theorem infinite_additional_card_le (data : ConfigurationData k F G) + (B : Finset (AffineLine F)) (d : Direction F) + (C : Finset (Vertex (k := k) data.altered)) + (hforced : forcedPencilVertices data B (Sum.inr d) ⊆ C) + (hC : C.card ≤ Fintype.card F) : + (C \ forcedPencilVertices data B (Sum.inr d)).card ≤ + (B ∩ affinePencil (Sum.inr d)).card := by + have hbudget := pencil_additional_card_le data B (Sum.inr d) C hforced hC + rw [card_affinePencil_infinite] at hbudget + omega + +theorem infinite_additional_card_le_of_deleted_le (data : ConfigurationData k F G) + (B : Finset (AffineLine F)) (d : Direction F) + (C : Finset (Vertex (k := k) data.altered)) + (hforced : forcedPencilVertices data B (Sum.inr d) ⊆ C) + (hC : C.card ≤ Fintype.card F) (N : ℕ) + (hdeleted : (B ∩ affinePencil (Sum.inr d)).card ≤ N) : + (C \ forcedPencilVertices data B (Sum.inr d)).card ≤ N := + (infinite_additional_card_le data B d C hforced hC).trans hdeleted + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/CoverCounting.lean b/lean/OAI/Combinatorics/Ryser/Construction/CoverCounting.lean new file mode 100644 index 0000000000000000000000000000000000000000..bbf0bbacc8265ff2ad6f320a045c78fcf6291bda --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/CoverCounting.lean @@ -0,0 +1,45 @@ +import Mathlib.Algebra.BigOperators.Group.Finset.Basic +import Mathlib.Algebra.Order.BigOperators.Group.Finset + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +open scoped BigOperators + +theorem card_le_sum_capacity + {ι V : Type*} (E : Finset ι) (C : Finset V) + (R : V → ι → Prop) [∀ v, DecidablePred (R v)] + (capacity : V → ℕ) + (hcover : ∀ e ∈ E, ∃ v ∈ C, R v e) + (hcapacity : ∀ v ∈ C, (E.filter (R v)).card ≤ capacity v) : + E.card ≤ ∑ v ∈ C, capacity v := by + classical + calc + E.card ≤ (C.biUnion fun v => E.filter (R v)).card := by + apply Finset.card_le_card + intro e he + obtain ⟨v, hv, hve⟩ := hcover e he + exact Finset.mem_biUnion.mpr + ⟨v, hv, Finset.mem_filter.mpr ⟨he, hve⟩⟩ + _ ≤ ∑ v ∈ C, (E.filter (R v)).card := Finset.card_biUnion_le + _ ≤ ∑ v ∈ C, capacity v := Finset.sum_le_sum hcapacity + +theorem card_le_mul_resource_card + {ι V : Type*} (E : Finset ι) (C : Finset V) + (R : V → ι → Prop) [∀ v, DecidablePred (R v)] + (b : ℕ) + (hcover : ∀ e ∈ E, ∃ v ∈ C, R v e) + (hcapacity : ∀ v ∈ C, (E.filter (R v)).card ≤ b) : + E.card ≤ b * C.card := by + calc + E.card ≤ ∑ _v ∈ C, b := + card_le_sum_capacity E C R (fun _ => b) hcover hcapacity + _ = C.card * b := + Finset.sum_const_nat (s := C) (m := b) (f := fun _ : V => b) + (fun _ _ => rfl) + _ = b * C.card := Nat.mul_comm _ _ + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/CoverPencil.lean b/lean/OAI/Combinatorics/Ryser/Construction/CoverPencil.lean new file mode 100644 index 0000000000000000000000000000000000000000..39a9c1a5ad5061232c19b36b58318fbb8d3f9786 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/CoverPencil.lean @@ -0,0 +1,86 @@ +import OAI.Combinatorics.Ryser.Geometry.ProjectiveJoins +import Mathlib.Algebra.Order.BigOperators.Group.Finset + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +open scoped BigOperators + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + +theorem card_linePoints_inter_le_one {l m : AffineLine F} (hlm : l ≠ m) : + (linePoints l ∩ linePoints m).card ≤ 1 := by + apply Finset.card_le_one.mpr + intro x hx y hy + exact eq_of_common_incidence_of_ne_lines hlm + ((mem_linePoints _ _).mp (Finset.mem_inter.mp hx).1) + ((mem_linePoints _ _).mp (Finset.mem_inter.mp hx).2) + ((mem_linePoints _ _).mp (Finset.mem_inter.mp hy).1) + ((mem_linePoints _ _).mp (Finset.mem_inter.mp hy).2) + +theorem covered_points_on_missing_pencil_line + (X : Finset (Point F)) (L : Finset (AffineLine F)) + (p : ProjectivePoint F) (ell : AffineLine F) + (hcover : ∀ x ∈ X, ∃ l ∈ L, Incidence x l) + (hpell : ProjectiveIncidence p (some ell)) (hell : ell ∉ L) : + (X ∩ linePoints ell).card ≤ 1 + (L \ affinePencil p).card := by + classical + let T := X ∩ linePoints ell + let A := T.filter fun x => Sum.inl x = p + let R := L \ affinePencil p + have hA : A.card ≤ 1 := by + apply Finset.card_le_one.mpr + intro x hx y hy + exact Sum.inl.inj ((Finset.mem_filter.mp hx).2.trans + (Finset.mem_filter.mp hy).2.symm) + have hintersection : ∀ m ∈ R, (T ∩ linePoints m).card ≤ 1 := by + intro m hm + have hmL : m ∈ L := (Finset.mem_sdiff.mp hm).1 + have hne : ell ≠ m := fun heq => hell (heq.symm ▸ hmL) + apply le_trans (Finset.card_le_card ?_) (card_linePoints_inter_le_one hne) + intro x hx + exact Finset.mem_inter.mpr + ⟨(Finset.mem_inter.mp (Finset.mem_inter.mp hx).1).2, + (Finset.mem_inter.mp hx).2⟩ + have hsub : T ⊆ A ∪ R.biUnion (fun m => T ∩ linePoints m) := by + intro x hx + have hxX : x ∈ X := (Finset.mem_inter.mp hx).1 + have hxell : Incidence x ell := + (mem_linePoints _ _).mp (Finset.mem_inter.mp hx).2 + obtain ⟨m, hmL, hxm⟩ := hcover x hxX + by_cases hmp : m ∈ affinePencil p + · have hxp : Sum.inl x = p := by + by_contra hne + have heq : ell = m := eq_affineLine_of_common_projective_incidence + hne hxell hpell hxm ((mem_affinePencil _ _).mp hmp) + exact hell (heq.symm ▸ hmL) + exact Finset.mem_union_left _ (Finset.mem_filter.mpr ⟨hx, hxp⟩) + · apply Finset.mem_union_right + exact Finset.mem_biUnion.mpr + ⟨m, Finset.mem_sdiff.mpr ⟨hmL, hmp⟩, + Finset.mem_inter.mpr ⟨hx, (mem_linePoints _ _).mpr hxm⟩⟩ + calc + (X ∩ linePoints ell).card = T.card := rfl + _ ≤ (A ∪ R.biUnion (fun m => T ∩ linePoints m)).card := + Finset.card_le_card hsub + _ ≤ A.card + (R.biUnion (fun m => T ∩ linePoints m)).card := Finset.card_union_le _ _ + _ ≤ 1 + ∑ m ∈ R, (T ∩ linePoints m).card := + Nat.add_le_add hA Finset.card_biUnion_le + _ ≤ 1 + ∑ _m ∈ R, 1 := Nat.add_le_add_left (Finset.sum_le_sum hintersection) 1 + _ = 1 + (L \ affinePencil p).card := by simp [R] + +theorem mem_cover_of_pencil_survivors + (X : Finset (Point F)) (L : Finset (AffineLine F)) + (p : ProjectivePoint F) (ell : AffineLine F) + (hcover : ∀ x ∈ X, ∃ l ∈ L, Incidence x l) + (hpell : ProjectiveIncidence p (some ell)) + (hmany : 1 + (L \ affinePencil p).card < (X ∩ linePoints ell).card) : + ell ∈ L := by + by_contra hell + exact (not_le_of_gt hmany) + (covered_points_on_missing_pencil_line X L p ell hcover hpell hell) + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/DeletionIntersection.lean b/lean/OAI/Combinatorics/Ryser/Construction/DeletionIntersection.lean new file mode 100644 index 0000000000000000000000000000000000000000..4a364e39bc2440b76929ac2b37fafb636f0492a5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/DeletionIntersection.lean @@ -0,0 +1,66 @@ +import OAI.Combinatorics.Ryser.Construction.DeletionLines +import OAI.Combinatorics.Ryser.Construction.PlacementIntersection + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] +variable [Fintype k] [instFintypeF : Fintype F] [instDecidableEqk : DecidableEq k] [DecidableEq F] + +def placedSubplane (σ : k →+* F) (M : PlaneLinearMap F) (b : Point F) : + Finset (Point F) := Finset.univ.image (placedPoint σ M b) + +@[simp] theorem mem_placedSubplane_iff (σ : k →+* F) (M : PlaneLinearMap F) + (b p : Point F) : p ∈ placedSubplane σ M b ↔ p ∈ Set.range (placedPoint σ M b) := let _ := instFintypeF; let _ := instDecidableEqk; by + simp only [placedSubplane, Finset.mem_image, Finset.mem_univ, true_and, Set.mem_range] + +theorem card_placedSubplane (σ : k →+* F) (M : PlaneLinearMap F) (b : Point F) : + (placedSubplane σ M b).card = Fintype.card k ^ 2 := let _ := instFintypeF; let _ := instDecidableEqk; by + unfold placedSubplane + rw [Finset.card_image_of_injective _ (placedPoint_injective σ M b), Finset.card_univ] + change Fintype.card (k × k) = Fintype.card k ^ 2 + rw [Fintype.card_prod, pow_two] + +theorem exists_placedLine_of_mem_deletedLines (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) (a : GadgetOutcome k) {ell : AffineLine F} + (hell : ell ∈ deletedLines σ M b a) : + ∃ l : AffineLine k, placedLine σ M b l = ell := by + have hmem : ell.1 ∈ alteredDirections σ M ∧ + ∃ y ∈ retainedPoints a, Incidence (placedPoint σ M b y) ell := by + simpa only [deletedLines, Finset.mem_filter, Finset.mem_univ, true_and] using hell + obtain ⟨t, _, ht⟩ := (mem_alteredDirections_iff σ M ell.1).mp hmem.1 + obtain ⟨y, _, hy⟩ := hmem.2 + refine ⟨(some t, projection (some t) y), ?_⟩ + exact (eq_placedLine_of_direction_of_incidence σ M b y (some t) ell ht.symm hy).symm + +theorem eq_deletedLine_of_incident_of_notMem_placedSubplane + (σ : k →+* F) (M : PlaneLinearMap F) (b : Point F) (a : GadgetOutcome k) + {p : Point F} {ell m : AffineLine F} + (houtside : p ∉ placedSubplane σ M b) + (hell : ell ∈ deletedLines σ M b a) (hm : m ∈ deletedLines σ M b a) + (hpell : Incidence p ell) (hpm : Incidence p m) : ell = m := by + have hout : p ∉ Set.range (placedPoint σ M b) := by + simpa only [mem_placedSubplane_iff] using houtside + obtain ⟨l, rfl⟩ := exists_placedLine_of_mem_deletedLines σ M b a hell + obtain ⟨l', rfl⟩ := exists_placedLine_of_mem_deletedLines σ M b a hm + exact eq_placedLine_of_incident_of_notMem_range σ M b hout hpell hpm + +theorem card_deletedLines_through_le_one (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) (a : GadgetOutcome k) (p : Point F) + (houtside : p ∉ placedSubplane σ M b) : + ((deletedLines σ M b a).filter (fun ell => Incidence p ell)).card ≤ 1 := by + apply Finset.card_le_one.mpr + intro ell hell m hm + obtain ⟨helld, hpell⟩ := Finset.mem_filter.mp hell + obtain ⟨hmd, hpm⟩ := Finset.mem_filter.mp hm + exact eq_deletedLine_of_incident_of_notMem_placedSubplane + σ M b a houtside helld hmd hpell hpm + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/DeletionLines.lean b/lean/OAI/Combinatorics/Ryser/Construction/DeletionLines.lean new file mode 100644 index 0000000000000000000000000000000000000000..17b9d02d3b931919d29063ac1a1341237e49a207 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/DeletionLines.lean @@ -0,0 +1,141 @@ +import OAI.Combinatorics.Ryser.Construction.PlacedLines +import OAI.Combinatorics.Ryser.Construction.DirectionSets +import OAI.Combinatorics.Ryser.Construction.GadgetDefinitions +import Mathlib.Algebra.BigOperators.Group.Finset.Basic + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +open scoped BigOperators + +variable {k F : Type*} [Field k] [Field F] +variable [Fintype k] [instFintypeF : Fintype F] [DecidableEq k] [DecidableEq F] + +def OriginalLineDensity (a : GadgetOutcome k) : Prop := + ∀ t : NonzeroSlope k, ∀ c : k, c ≠ a t → + 5 ≤ ((retainedPoints a).filter (fun p => Incidence p (some t.val, c))).card + +def deletedLines (σ : k →+* F) (M : PlaneLinearMap F) (b : Point F) + (a : GadgetOutcome k) : Finset (AffineLine F) := + Finset.univ.filter (fun ell => ell.1 ∈ alteredDirections σ M ∧ + ∃ y ∈ retainedPoints a, Incidence (placedPoint σ M b y) ell) + +@[simp] theorem mem_deletedLines (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) (a : GadgetOutcome k) (ell : AffineLine F) : + ell ∈ deletedLines σ M b a ↔ ell.1 ∈ alteredDirections σ M ∧ + ∃ y ∈ retainedPoints a, Incidence (placedPoint σ M b y) ell := by + simp only [deletedLines, Finset.mem_filter, Finset.mem_univ, true_and] + +theorem intercept_ne_omitted_of_mem_retained (a : GadgetOutcome k) + (t : NonzeroSlope k) {p : Point k} {c : k} + (hp : p ∈ retainedPoints a) (hpc : Incidence p (some t.val, c)) : + c ≠ a t := by + intro hc + apply not_incidence_omittedLine a hp t + simpa only [omittedLine, hc] using hpc + +theorem deletedLines_direction_eq_image (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) (a : GadgetOutcome k) (ha : OriginalLineDensity a) + (t : NonzeroSlope k) : + (deletedLines σ M b a).filter + (fun ell => ell.1 = placedDirection σ M (some t.val)) = + (Finset.univ.erase (a t)).image + (fun c : k => placedLine σ M b (some t.val, c)) := by + ext ell + constructor + · intro hell + obtain ⟨hdel, hdir⟩ := Finset.mem_filter.mp hell + obtain ⟨y, hy, hyell⟩ := ((mem_deletedLines σ M b a ell).mp hdel).2 + have hline : ell = placedLine σ M b + (some t.val, projection (some t.val) y) := + eq_placedLine_of_direction_of_incidence σ M b y (some t.val) ell hdir hyell + have hc : projection (some t.val) y ≠ a t := + intercept_ne_omitted_of_mem_retained a t hy rfl + exact Finset.mem_image.mpr + ⟨projection (some t.val) y, Finset.mem_erase.mpr ⟨hc, Finset.mem_univ _⟩, + hline.symm⟩ + · intro hell + obtain ⟨c, hc, rfl⟩ := Finset.mem_image.mp hell + have hpos : 0 < ((retainedPoints a).filter + (fun p => Incidence p (some t.val, c))).card := + lt_of_lt_of_le (by decide : 0 < 5) (ha t c (Finset.mem_erase.mp hc).1) + obtain ⟨y, hy⟩ := Finset.card_pos.mp hpos + obtain ⟨hyret, hyline⟩ := Finset.mem_filter.mp hy + apply Finset.mem_filter.mpr + refine ⟨(mem_deletedLines σ M b a _).mpr ?_, rfl⟩ + exact ⟨placedDirection_mem_alteredDirections σ M t.val t.property, + y, hyret, (incidence_placedLine_iff σ M b y _).mpr hyline⟩ + +theorem card_deletedLines_direction (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) (a : GadgetOutcome k) (ha : OriginalLineDensity a) + (t : NonzeroSlope k) : + ((deletedLines σ M b a).filter + (fun ell => ell.1 = placedDirection σ M (some t.val))).card = + Fintype.card k - 1 := by + have hinj : Function.Injective + (fun c : k => placedLine σ M b (some t.val, c)) := by + intro c c' h + exact congrArg Prod.snd (placedLine_injective σ M b h) + rw [deletedLines_direction_eq_image σ M b a ha t, + Finset.card_image_of_injective _ hinj, + Finset.card_erase_of_mem (Finset.mem_univ (a t)), Finset.card_univ] + +theorem card_deletedLines_of_mem_alteredDirections (σ : k →+* F) + (M : PlaneLinearMap F) (b : Point F) (a : GadgetOutcome k) + (ha : OriginalLineDensity a) (d : Direction F) + (hd : d ∈ alteredDirections σ M) : + ((deletedLines σ M b a).filter (fun ell => ell.1 = d)).card = + Fintype.card k - 1 := by + obtain ⟨t, ht, rfl⟩ := (mem_alteredDirections_iff σ M d).mp hd + exact card_deletedLines_direction σ M b a ha ⟨t, ht⟩ + +theorem card_deletedLines (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) (a : GadgetOutcome k) (ha : OriginalLineDensity a) : + (deletedLines σ M b a).card = (Fintype.card k - 1) ^ 2 := by + calc + (deletedLines σ M b a).card = + ∑ d ∈ alteredDirections σ M, + ((deletedLines σ M b a).filter (fun ell => ell.1 = d)).card := + Finset.card_eq_sum_card_fiberwise + (fun ell hell => ((mem_deletedLines σ M b a ell).mp hell).1) + _ = (alteredDirections σ M).card * (Fintype.card k - 1) := + Finset.sum_const_nat (fun d hd => + card_deletedLines_of_mem_alteredDirections σ M b a ha d hd) + _ = (Fintype.card k - 1) ^ 2 := by rw [card_alteredDirections, pow_two] + +theorem card_placedRetained_incident_placedLine (σ : k →+* F) + (M : PlaneLinearMap F) (b : Point F) (a : GadgetOutcome k) + (l : AffineLine k) : + (((retainedPoints a).image (placedPoint σ M b)).filter + (fun p => Incidence p (placedLine σ M b l))).card = + ((retainedPoints a).filter (fun p => Incidence p l)).card := let _ := instFintypeF; by + rw [Finset.filter_image, + Finset.card_image_of_injective _ (placedPoint_injective σ M b)] + congr 1 + ext p + simp only [Finset.mem_filter, incidence_placedLine_iff] + +theorem deletedLine_many_placedRetainedPoints (σ : k →+* F) + (M : PlaneLinearMap F) (b : Point F) (a : GadgetOutcome k) + (ha : OriginalLineDensity a) {ell : AffineLine F} + (hell : ell ∈ deletedLines σ M b a) : + 5 ≤ (((retainedPoints a).image (placedPoint σ M b)).filter + (fun p => Incidence p ell)).card := by + obtain ⟨t, ht, htd⟩ := (mem_alteredDirections_iff σ M ell.1).mp + ((mem_deletedLines σ M b a ell).mp hell).1 + have hfiber : ell ∈ (deletedLines σ M b a).filter + (fun ell => ell.1 = placedDirection σ M (some t)) := + Finset.mem_filter.mpr ⟨hell, htd.symm⟩ + rw [deletedLines_direction_eq_image σ M b a ha ⟨t, ht⟩] at hfiber + obtain ⟨c, hc, rfl⟩ := Finset.mem_image.mp hfiber + rw [card_placedRetained_incident_placedLine] + exact ha ⟨t, ht⟩ c (Finset.mem_erase.mp hc).1 + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/DeletionParallel.lean b/lean/OAI/Combinatorics/Ryser/Construction/DeletionParallel.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8246e665c2b346a5290560f74bf418c6785b582 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/DeletionParallel.lean @@ -0,0 +1,89 @@ +import OAI.Combinatorics.Ryser.Construction.DeletionUnionBasic +import OAI.Combinatorics.Ryser.Construction.GroupPlacement + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +open scoped BigOperators + +variable {G k F : Type*} [Field k] [Field F] +variable [Fintype G] [Fintype k] [Fintype F] +variable [DecidableEq G] [DecidableEq k] [DecidableEq F] + +theorem deletedLines_inter_affinePencil_infinite_eq_filter + (σ : k →+* F) (M : PlaneLinearMap F) (b : Point F) + (a : GadgetOutcome k) (d : Direction F) : + deletedLines σ M b a ∩ affinePencil (Sum.inr d) = + (deletedLines σ M b a).filter (fun ell => ell.1 = d) := by + ext ell + simp only [Finset.mem_inter, Finset.mem_filter, mem_affinePencil, + projectiveIncidence_infinite_affine] + constructor <;> rintro ⟨hmem, hdir⟩ <;> exact ⟨hmem, hdir.symm⟩ + +theorem card_deletedLines_inter_affinePencil_infinite + (σ : k →+* F) (M : PlaneLinearMap F) (b : Point F) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (d : Direction F) + (hd : d ∈ alteredDirections σ M) : + (deletedLines σ M b a ∩ affinePencil (Sum.inr d)).card = + Fintype.card k - 1 := by + rw [deletedLines_inter_affinePencil_infinite_eq_filter] + exact card_deletedLines_of_mem_alteredDirections σ M b a ha d hd + +theorem allDeletedLines_inter_affinePencil_infinite_eq_biUnion + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (a : GadgetOutcome k) (d : Direction F) : + allDeletedLines σ M b a ∩ affinePencil (Sum.inr d) = + (Finset.univ.filter (fun i => d ∈ alteredDirections σ (M i))).biUnion + (fun i => deletedLines σ (M i) (b i) a ∩ affinePencil (Sum.inr d)) := by + ext ell + constructor + · intro hell + obtain ⟨hglobal, hpencil⟩ := Finset.mem_inter.mp hell + obtain ⟨i, hi⟩ := (mem_allDeletedLines σ M b a ell).mp hglobal + have hdell : d = ell.1 := (mem_affinePencil (Sum.inr d) ell).mp hpencil + refine Finset.mem_biUnion.mpr ⟨i, Finset.mem_filter.mpr + ⟨Finset.mem_univ _, ?_⟩, Finset.mem_inter.mpr ⟨hi, hpencil⟩⟩ + rw [hdell] + exact ((mem_deletedLines σ (M i) (b i) a ell).mp hi).1 + · intro hell + obtain ⟨i, _, hi⟩ := Finset.mem_biUnion.mp hell + obtain ⟨hlocal, hpencil⟩ := Finset.mem_inter.mp hi + exact Finset.mem_inter.mpr + ⟨(mem_allDeletedLines σ M b a ell).mpr ⟨i, hlocal⟩, hpencil⟩ + +theorem card_allDeletedLines_inter_affinePencil_infinite_le + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) (d : Direction F) : + (allDeletedLines σ M b a ∩ affinePencil (Sum.inr d)).card ≤ + (Finset.univ.filter (fun i => d ∈ alteredDirections σ (M i))).card * + (Fintype.card k - 1) := by + rw [allDeletedLines_inter_affinePencil_infinite_eq_biUnion] + refine Finset.card_biUnion_le.trans (le_of_eq ?_) + exact Finset.sum_const_nat (fun i hi => + card_deletedLines_inter_affinePencil_infinite σ (M i) (b i) a ha d + (Finset.mem_filter.mp hi).2) + +theorem card_groupDeletedLines_inter_affinePencil_infinite_le_two + (σ : k →+* F) (u v : k) (huv : u ≠ v) + (b : ConfigurationGroup σ → Point F) (a : GadgetOutcome k) + (ha : OriginalLineDensity a) (d : Direction F) : + (allDeletedLines σ (groupPlacement σ u v huv) b a ∩ + affinePencil (Sum.inr d)).card ≤ 2 * (Fintype.card k - 1) := by + classical + have hmult : (Finset.univ.filter (fun i => + d ∈ alteredDirections σ (groupPlacement σ u v huv i))).card ≤ 2 := by + apply (Finset.card_le_card ?_).trans (groupAltered_multiplicity_le_two σ u v huv d) + intro i hi + exact Finset.mem_filter.mpr ⟨Finset.mem_univ i, (Finset.mem_filter.mp hi).2⟩ + exact (card_allDeletedLines_inter_affinePencil_infinite_le + σ (groupPlacement σ u v huv) b a ha d).trans + (Nat.mul_le_mul_right _ hmult) + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/DeletionUnionBasic.lean b/lean/OAI/Combinatorics/Ryser/Construction/DeletionUnionBasic.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e4161db33e97f4edcc53a52ec241c07f3c64c6e --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/DeletionUnionBasic.lean @@ -0,0 +1,78 @@ +import OAI.Combinatorics.Ryser.Construction.DeletionIntersection + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {G k F : Type*} [Field k] [Field F] +variable [instFintypeG : Fintype G] [Fintype k] [Fintype F] +variable [instDecidableEqG : DecidableEq G] [DecidableEq k] [DecidableEq F] + +def DeletionSeparated (σ : k →+* F) (M : G → PlaneLinearMap F) + (b : G → Point F) (a : GadgetOutcome k) : Prop := + ∀ i j : G, i ≠ j → ∀ p ∈ placedSubplane σ (M i) (b i), + ∀ y ∈ (retainedPoints a).image (placedPoint σ (M j) (b j)), + ∀ d ∈ alteredDirections σ (M j), projection d p ≠ projection d y + +def allDeletedLines (σ : k →+* F) (M : G → PlaneLinearMap F) + (b : G → Point F) (a : GadgetOutcome k) : Finset (AffineLine F) := + Finset.univ.biUnion (fun i => deletedLines σ (M i) (b i) a) + +def deletedPencil (σ : k →+* F) (M : G → PlaneLinearMap F) + (b : G → Point F) (a : GadgetOutcome k) (p : Point F) : Finset (AffineLine F) := + (allDeletedLines σ M b a).filter (fun ell => Incidence p ell) + +def activeDeletionGroups (σ : k →+* F) (M : G → PlaneLinearMap F) + (b : G → Point F) (a : GadgetOutcome k) (p : Point F) : Finset G := + Finset.univ.filter (fun i => ∃ ell ∈ deletedLines σ (M i) (b i) a, Incidence p ell) + +@[simp] theorem mem_allDeletedLines (σ : k →+* F) (M : G → PlaneLinearMap F) + (b : G → Point F) (a : GadgetOutcome k) (ell : AffineLine F) : + ell ∈ allDeletedLines σ M b a ↔ ∃ i, ell ∈ deletedLines σ (M i) (b i) a := let _ := instDecidableEqG; by + simp only [allDeletedLines, Finset.mem_biUnion, Finset.mem_univ, true_and] + +@[simp] theorem mem_deletedPencil (σ : k →+* F) (M : G → PlaneLinearMap F) + (b : G → Point F) (a : GadgetOutcome k) (p : Point F) (ell : AffineLine F) : + ell ∈ deletedPencil σ M b a p ↔ + ell ∈ allDeletedLines σ M b a ∧ Incidence p ell := let _ := instDecidableEqG; by + simp only [deletedPencil, Finset.mem_filter] + +@[simp] theorem mem_activeDeletionGroups (σ : k →+* F) (M : G → PlaneLinearMap F) + (b : G → Point F) (a : GadgetOutcome k) (p : Point F) (i : G) : + i ∈ activeDeletionGroups σ M b a p ↔ + ∃ ell ∈ deletedLines σ (M i) (b i) a, Incidence p ell := let _ := instDecidableEqG; by + simp only [activeDeletionGroups, Finset.mem_filter, Finset.mem_univ, true_and] + +theorem not_incidence_deletedLines_of_mem_other_subplane + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) (a : GadgetOutcome k) + (hsep : DeletionSeparated σ M b a) {i j : G} (hij : i ≠ j) + {p : Point F} (hp : p ∈ placedSubplane σ (M i) (b i)) + {ell : AffineLine F} (hell : ell ∈ deletedLines σ (M j) (b j) a) : + ¬Incidence p ell := let _ := instFintypeG; let _ := instDecidableEqG; by + obtain ⟨hdir, y, hy, hyell⟩ := (mem_deletedLines σ (M j) (b j) a ell).mp hell + have hyplaced : placedPoint σ (M j) (b j) y ∈ + (retainedPoints a).image (placedPoint σ (M j) (b j)) := + Finset.mem_image.mpr ⟨y, hy, rfl⟩ + intro hpell + exact hsep i j hij p hp (placedPoint σ (M j) (b j) y) hyplaced ell.1 hdir + (hpell.trans hyell.symm) + +theorem disjoint_deletedLines_of_separated + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) (a : GadgetOutcome k) + (hsep : DeletionSeparated σ M b a) {i j : G} (hij : i ≠ j) : + Disjoint (deletedLines σ (M i) (b i) a) (deletedLines σ (M j) (b j) a) := by + apply Finset.disjoint_left.mpr + intro ell helli hellj + obtain ⟨y, _, hyell⟩ := ((mem_deletedLines σ (M i) (b i) a ell).mp helli).2 + have hyplane : placedPoint σ (M i) (b i) y ∈ placedSubplane σ (M i) (b i) := + (mem_placedSubplane_iff σ (M i) (b i) _).mpr ⟨y, rfl⟩ + exact not_incidence_deletedLines_of_mem_other_subplane + σ M b a hsep hij hyplane hellj hyell + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/DeletionUnionInside.lean b/lean/OAI/Combinatorics/Ryser/Construction/DeletionUnionInside.lean new file mode 100644 index 0000000000000000000000000000000000000000..4c86a6072f8ee9d2e7cfa029c9b5af453190c286 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/DeletionUnionInside.lean @@ -0,0 +1,62 @@ +import OAI.Combinatorics.Ryser.Construction.DeletionUnionBasic + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] +variable [Fintype k] [Fintype F] [DecidableEq k] [DecidableEq F] + +theorem card_deletedLines_through_le (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) (a : GadgetOutcome k) (p : Point F) : + ((deletedLines σ M b a).filter (fun ell => Incidence p ell)).card ≤ + Fintype.card k - 1 := by + calc + ((deletedLines σ M b a).filter (fun ell => Incidence p ell)).card ≤ + (alteredDirections σ M).card := by + apply Finset.card_le_card_of_injOn (fun ell : AffineLine F => ell.1) + · intro ell hell + exact ((mem_deletedLines σ M b a ell).mp (Finset.mem_filter.mp hell).1).1 + · intro ell hell m hm hdir + exact line_eq_of_direction_eq_of_incidence hdir + (Finset.mem_filter.mp hell).2 (Finset.mem_filter.mp hm).2 + _ = Fintype.card k - 1 := card_alteredDirections σ M + +variable {G : Type*} [Fintype G] [DecidableEq G] + +theorem deletedPencil_eq_filter_of_mem_placedSubplane + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (a : GadgetOutcome k) (hsep : DeletionSeparated σ M b a) + (i : G) (p : Point F) (hp : p ∈ placedSubplane σ (M i) (b i)) : + deletedPencil σ M b a p = + (deletedLines σ (M i) (b i) a).filter (fun ell => Incidence p ell) := by + ext ell + constructor + · intro hell + obtain ⟨hglobal, hinc⟩ := (mem_deletedPencil σ M b a p ell).mp hell + obtain ⟨j, hj⟩ := (mem_allDeletedLines σ M b a ell).mp hglobal + by_cases hij : i = j + · subst j + exact Finset.mem_filter.mpr ⟨hj, hinc⟩ + · exact (not_incidence_deletedLines_of_mem_other_subplane + σ M b a hsep hij hp hj hinc).elim + · intro hell + obtain ⟨hlocal, hinc⟩ := Finset.mem_filter.mp hell + exact (mem_deletedPencil σ M b a p ell).mpr + ⟨(mem_allDeletedLines σ M b a ell).mpr ⟨i, hlocal⟩, hinc⟩ + +theorem card_deletedPencil_le_of_mem_placedSubplane + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (a : GadgetOutcome k) (hsep : DeletionSeparated σ M b a) + (i : G) (p : Point F) (hp : p ∈ placedSubplane σ (M i) (b i)) : + (deletedPencil σ M b a p).card ≤ Fintype.card k - 1 := by + rw [deletedPencil_eq_filter_of_mem_placedSubplane σ M b a hsep i p hp] + exact card_deletedLines_through_le σ (M i) (b i) a p + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/DeletionUnionOutside.lean b/lean/OAI/Combinatorics/Ryser/Construction/DeletionUnionOutside.lean new file mode 100644 index 0000000000000000000000000000000000000000..4e840069a87512cb898175c8eeea00875f7e7913 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/DeletionUnionOutside.lean @@ -0,0 +1,137 @@ +import OAI.Combinatorics.Ryser.Construction.DeletionUnionBasic + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {G k F : Type*} [Field k] [Field F] +variable [Fintype G] [Fintype k] [Fintype F] +variable [DecidableEq G] [DecidableEq k] [DecidableEq F] + +def activeDeletionLine (σ : k →+* F) (M : G → PlaneLinearMap F) + (b : G → Point F) (a : GadgetOutcome k) (p : Point F) + (i : {i // i ∈ activeDeletionGroups σ M b a p}) : AffineLine F := + Classical.choose ((mem_activeDeletionGroups σ M b a p i.val).mp i.property) + +theorem activeDeletionLine_spec (σ : k →+* F) (M : G → PlaneLinearMap F) + (b : G → Point F) (a : GadgetOutcome k) (p : Point F) + (i : {i // i ∈ activeDeletionGroups σ M b a p}) : + activeDeletionLine σ M b a p i ∈ deletedLines σ (M i.val) (b i.val) a ∧ + Incidence p (activeDeletionLine σ M b a p i) := + Classical.choose_spec ((mem_activeDeletionGroups σ M b a p i.val).mp i.property) + +theorem activeDeletionLine_mem (σ : k →+* F) (M : G → PlaneLinearMap F) + (b : G → Point F) (a : GadgetOutcome k) (p : Point F) + (i : {i // i ∈ activeDeletionGroups σ M b a p}) : + activeDeletionLine σ M b a p i ∈ deletedLines σ (M i.val) (b i.val) a := + (activeDeletionLine_spec σ M b a p i).1 + +theorem incidence_activeDeletionLine (σ : k →+* F) (M : G → PlaneLinearMap F) + (b : G → Point F) (a : GadgetOutcome k) (p : Point F) + (i : {i // i ∈ activeDeletionGroups σ M b a p}) : + Incidence p (activeDeletionLine σ M b a p i) := + (activeDeletionLine_spec σ M b a p i).2 + +theorem activeDeletionLine_injective (σ : k →+* F) (M : G → PlaneLinearMap F) + (b : G → Point F) (a : GadgetOutcome k) (p : Point F) + (hsep : DeletionSeparated σ M b a) : + Function.Injective (activeDeletionLine σ M b a p) := by + intro i j hij + apply Subtype.ext + by_contra hne + have hdisj := disjoint_deletedLines_of_separated σ M b a hsep hne + have hmemj : activeDeletionLine σ M b a p i ∈ + deletedLines σ (M j.val) (b j.val) a := by + rw [hij] + exact activeDeletionLine_mem σ M b a p j + exact (Finset.disjoint_left.mp hdisj) + (activeDeletionLine_mem σ M b a p i) hmemj + +def activeDeletionLineInPencil (σ : k →+* F) (M : G → PlaneLinearMap F) + (b : G → Point F) (a : GadgetOutcome k) (p : Point F) + (i : {i // i ∈ activeDeletionGroups σ M b a p}) : + {ell // ell ∈ deletedPencil σ M b a p} := + ⟨activeDeletionLine σ M b a p i, + (mem_deletedPencil σ M b a p _).mpr + ⟨(mem_allDeletedLines σ M b a _).mpr + ⟨i.val, activeDeletionLine_mem σ M b a p i⟩, + incidence_activeDeletionLine σ M b a p i⟩⟩ + +theorem activeDeletionLineInPencil_surjective + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (a : GadgetOutcome k) (p : Point F) + (hout : ∀ i, p ∉ placedSubplane σ (M i) (b i)) : + Function.Surjective (activeDeletionLineInPencil σ M b a p) := by + intro ell + obtain ⟨hell, hpell⟩ := (mem_deletedPencil σ M b a p ell.val).mp ell.property + obtain ⟨i, hi⟩ := (mem_allDeletedLines σ M b a ell.val).mp hell + have hactive : i ∈ activeDeletionGroups σ M b a p := + (mem_activeDeletionGroups σ M b a p i).mpr ⟨ell.val, hi, hpell⟩ + refine ⟨⟨i, hactive⟩, ?_⟩ + apply Subtype.ext + change activeDeletionLine σ M b a p ⟨i, hactive⟩ = ell.val + exact eq_deletedLine_of_incident_of_notMem_placedSubplane + σ (M i) (b i) a (hout i) + (activeDeletionLine_mem σ M b a p ⟨i, hactive⟩) hi + (incidence_activeDeletionLine σ M b a p ⟨i, hactive⟩) hpell + +theorem activeDeletionLineInPencil_bijective + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (a : GadgetOutcome k) (p : Point F) (hsep : DeletionSeparated σ M b a) + (hout : ∀ i, p ∉ placedSubplane σ (M i) (b i)) : + Function.Bijective (activeDeletionLineInPencil σ M b a p) := by + constructor + · intro i j hij + exact activeDeletionLine_injective σ M b a p hsep (congrArg Subtype.val hij) + · exact activeDeletionLineInPencil_surjective σ M b a p hout + +def activeDeletionGroupEquivDeletedPencil + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (a : GadgetOutcome k) (p : Point F) (hsep : DeletionSeparated σ M b a) + (hout : ∀ i, p ∉ placedSubplane σ (M i) (b i)) : + {i // i ∈ activeDeletionGroups σ M b a p} ≃ + {ell // ell ∈ deletedPencil σ M b a p} := + Equiv.ofBijective (activeDeletionLineInPencil σ M b a p) + (activeDeletionLineInPencil_bijective σ M b a p hsep hout) + +theorem card_deletedPencil_eq_card_activeDeletionGroups + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (a : GadgetOutcome k) (p : Point F) (hsep : DeletionSeparated σ M b a) + (hout : ∀ i, p ∉ placedSubplane σ (M i) (b i)) : + (deletedPencil σ M b a p).card = (activeDeletionGroups σ M b a p).card := by + simpa only [Fintype.card_coe] using + (Fintype.card_congr (activeDeletionGroupEquivDeletedPencil σ M b a p hsep hout)).symm + +theorem deletedPencil_eq_inter_affinePencil + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (a : GadgetOutcome k) (p : Point F) : + deletedPencil σ M b a p = allDeletedLines σ M b a ∩ affinePencil (Sum.inl p) := by + ext ell + simp only [mem_deletedPencil, Finset.mem_inter, mem_affinePencil, + projectiveIncidence_finite_affine] + +theorem card_allDeletedLines_inter_affinePencil_eq_card_activeDeletionGroups + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (a : GadgetOutcome k) (p : Point F) (hsep : DeletionSeparated σ M b a) + (hout : ∀ i, p ∉ placedSubplane σ (M i) (b i)) : + (allDeletedLines σ M b a ∩ affinePencil (Sum.inl p)).card = + (activeDeletionGroups σ M b a p).card := by + rw [← deletedPencil_eq_inter_affinePencil σ M b a p] + exact card_deletedPencil_eq_card_activeDeletionGroups σ M b a p hsep hout + +theorem activeDeletionLine_many_placedRetainedPoints + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (a : GadgetOutcome k) (p : Point F) (ha : OriginalLineDensity a) + (i : {i // i ∈ activeDeletionGroups σ M b a p}) : + 5 ≤ (((retainedPoints a).image (placedPoint σ (M i.val) (b i.val))).filter + (fun q => Incidence q (activeDeletionLine σ M b a p i))).card := + deletedLine_many_placedRetainedPoints σ (M i.val) (b i.val) a ha + (activeDeletionLine_mem σ M b a p i) + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/DeterministicCover.lean b/lean/OAI/Combinatorics/Ryser/Construction/DeterministicCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..328d89a965665cd24e7977c1ec396c6c674ebd2b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/DeterministicCover.lean @@ -0,0 +1,146 @@ +import OAI.Combinatorics.Ryser.Construction.InfiniteCover +import OAI.Combinatorics.Ryser.Construction.FiniteInsideCover +import OAI.Combinatorics.Ryser.Construction.FiniteOutsideCover +import OAI.Combinatorics.Ryser.Construction.DeletionUnionInside +import OAI.Combinatorics.Ryser.Construction.DeletionParallel +import OAI.Combinatorics.Ryser.Construction.GroupBounds +import OAI.Combinatorics.Ryser.Construction.GadgetGood +import Mathlib.Tactic.Linarith + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +section Forcing + +variable {k F G : Type*} [Field k] [Field F] +variable [DecidableEq k] [DecidableEq F] [DecidableEq G] [Fintype F] [Fintype G] + +theorem forcedPencilVertices_subset_of_near_pencil + (data : ConfigurationData k F G) + (C : Finset (Vertex (k := k) data.altered)) + (hC : IsCover (hypergraph data) C) (hCcard : C.card ≤ Fintype.card F) + (B : Finset (AffineLine F)) (p : ProjectivePoint F) (δ ρ : ℝ) + (hgap : 1 + ρ * Fintype.card F < δ * Fintype.card F / 2) + (hline : ∀ ell ∉ B, + δ * Fintype.card F / 2 ≤ ((data.ordinaryPoints ∩ linePoints ell).card : ℝ)) + (hnear : (1 - ρ) * Fintype.card F ≤ + ((ordinaryLines data C ∩ affinePencil p).card : ℝ)) : + forcedPencilVertices data B p ⊆ C := by + have hbudget := (ordinaryLines_offPencil_add_onPencil_le data C p).trans hCcard + have hbudgetReal : ((ordinaryLines data C \ affinePencil p).card : ℝ) + + ((ordinaryLines data C ∩ affinePencil p).card : ℝ) ≤ Fintype.card F := by + exact_mod_cast hbudget + have hoff : ((ordinaryLines data C \ affinePencil p).card : ℝ) ≤ + ρ * Fintype.card F := by nlinarith + apply forcedPencilVertices_subset_cover data C hC B p + intro ell _ hell + have hdensity := hline ell hell + have hstrict : (1 : ℝ) + ((ordinaryLines data C \ affinePencil p).card : ℝ) < + ((data.ordinaryPoints ∩ linePoints ell).card : ℝ) := by linarith + exact_mod_cast hstrict + +end Forcing + +variable {k F : Type*} [Field k] [Field F] +variable [DecidableEq k] [DecidableEq F] [Fintype k] [Fintype F] +variable (σ : k →+* F) (u v : k) (huv : u ≠ v) +variable (a : GadgetOutcome k) (b : ConfigurationGroup σ → Point F) +variable (X : Finset (Point F)) + +local instance : DecidableEq (ConfigurationGroup σ) := Classical.decEq _ + +local notation "M" => groupPlacement σ u v huv +local notation "data" => placedConfiguration σ M b (retainedPoints a) X + +theorem not_isCover_actual_group_configuration + (hu : u ≠ 0) (hv : v ≠ 0) + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (ha : GoodGadget a) + (δ : ℝ) (hδ : 0 < δ) + (hgap : 1 + (δ / 10) * Fintype.card F < δ * Fintype.card F / 2) + (hsep : DeletionSeparated σ M b a) + (hthin : ∀ p : Point F, OffPencilThin data p) + (hline : ∀ ell ∉ allDeletedLines σ M b a, + δ * Fintype.card F / 2 ≤ ((X ∩ linePoints ell).card : ℝ)) + (hnear : ∀ L : Finset (AffineLine F), L.card ≤ Fintype.card F → + (∀ x ∈ X, ∃ ell ∈ L, Incidence x ell) → + ∃ p : ProjectivePoint F, + (1 - δ / 10) * Fintype.card F ≤ ((L ∩ affinePencil p).card : ℝ)) + (C : Finset (Vertex (k := k) (data).altered)) + (hCcard : C.card ≤ Fintype.card F) : ¬ IsCover (hypergraph data) C := by + let _ := hδ + classical + intro hC + let B := allDeletedLines σ M b a + have hY : GadgetCoverProperty ((retainedPoints a).image cubeMap) := ha.2.2 + have hordinary := ordinaryLines_cover_ordinaryPoints data C hC + obtain ⟨p, hp⟩ := hnear (ordinaryLines data C) + ((ordinaryLines_card_le data C).trans hCcard) hordinary + have hforced : forcedPencilVertices data B p ⊆ C := + forcedPencilVertices_subset_of_near_pencil data C hC hCcard B p δ (δ / 10) + hgap hline hp + cases p with + | inr d => + let I : Finset (ConfigurationGroup σ) := + Finset.univ.filter (fun i => d ∈ groupAltered σ u v huv i) + have hIle : I.card ≤ 2 := groupAltered_multiplicity_le_two σ u v huv d + have hdeleted : (B ∩ affinePencil (Sum.inr d)).card ≤ + I.card * (Fintype.card k - 1) := + card_allDeletedLines_inter_affinePencil_infinite_le σ M b a ha.1 d + obtain ⟨i, hi⟩ := exists_groupAltered σ u v huv hu hv d + have hiI : i ∈ I := Finset.mem_filter.mpr ⟨Finset.mem_univ i, hi⟩ + by_cases hother : ∃ j ∈ I, j ≠ i + · obtain ⟨j, hjI, hji⟩ := hother + have hij : i ≠ j := hji.symm + have hj : d ∈ groupAltered σ u v huv j := (Finset.mem_filter.mp hjI).2 + have hItwo : I.card = 2 := by + have hgt : 1 < I.card := Finset.one_lt_card.mpr ⟨i, hiI, j, hjI, hij⟩ + omega + rw [hItwo] at hdeleted + exact double_infinite_center_impossible σ M b (retainedPoints a) X hcop hY + C hC hCcard B d i j hij hi hj + (shared_groupAltered_axes_subset σ u v huv hu hv hij hi hj) + (shared_groupAltered_axes_subset σ u v huv hu hv hji hj hi) + hforced hdeleted + · have hIone : I.card = 1 := by + have hsub : I ⊆ {i} := by + intro j hj + have hji : j = i := by + by_contra hji + exact hother ⟨j, hj, hji⟩ + exact Finset.mem_singleton.mpr hji + have hle : I.card ≤ 1 := by + simpa only [Finset.card_singleton] using (Finset.card_le_card hsub) + have hpos : 0 < I.card := Finset.card_pos.mpr ⟨i, hiI⟩ + omega + rw [hIone, one_mul] at hdeleted + exact single_infinite_center_impossible σ M b (retainedPoints a) X hcop hY + C hC hCcard B d i hi hforced hdeleted + | inl p => + by_cases hinside : ∃ i : ConfigurationGroup σ, + p ∈ placedSubplane σ (M i) (b i) + · obtain ⟨i, hpi⟩ := hinside + have hdeleted := card_deletedPencil_le_of_mem_placedSubplane + σ M b a hsep i p hpi + have hpencil : deletedPencil σ M b a p = B ∩ affinePencil (Sum.inl p) := by + ext ell + simp only [mem_deletedPencil, Finset.mem_inter, mem_affinePencil, + projectiveIncidence_finite_affine, B] + rw [hpencil] at hdeleted + obtain ⟨wp, rfl⟩ := (mem_placedSubplane_iff σ (M i) (b i) p).1 hpi + exact finite_inside_center_impossible σ M b (retainedPoints a) X hcop hY + i wp C hC hCcard B hforced hdeleted + · have hout : ∀ i : ConfigurationGroup σ, + p ∉ placedSubplane σ (M i) (b i) := by + intro i hi + exact hinside ⟨i, hi⟩ + exact not_isCover_of_finite_outside_placedSubplanes σ M b a ha.1 hsep data + (fun _ => rfl) (fun _ => rfl) rfl p hout (hthin p) C hforced hCcard hC + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/DirectionPlacement.lean b/lean/OAI/Combinatorics/Ryser/Construction/DirectionPlacement.lean new file mode 100644 index 0000000000000000000000000000000000000000..064fad21dea16392e095d44be645d8546c047ff5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/DirectionPlacement.lean @@ -0,0 +1,182 @@ +import OAI.Combinatorics.Ryser.Construction.LinearPlacement +import OAI.Combinatorics.Ryser.Geometry.AffineJoins + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +variable {F : Type*} [Field F] [instDecidableEqF : DecidableEq F] + +def directionVector : Direction F → Point F + | none => (0, 1) + | some a => (1, a) + +theorem directionVector_kernel_iff (d e : Direction F) : + projection d (directionVector e) = 0 ↔ d = e := let _ := instDecidableEqF; by + cases d <;> cases e <;> simp [directionVector, projection, sub_eq_zero, eq_comm] + +namespace PlaneLinearMap + +def directionMap (M : PlaneLinearMap F) : Direction F → Direction F + | none => if M.xy = 0 then none else some (M.yy / M.xy) + | some a => if M.xx + M.xy * a = 0 then none + else some ((M.yx + M.yy * a) / (M.xx + M.xy * a)) + +def projectionScale (M : PlaneLinearMap F) : Direction F → F + | none => if M.xy = 0 then M.xx else -M.determinant / M.xy + | some a => if M.xx + M.xy * a = 0 then M.xy + else M.determinant / (M.xx + M.xy * a) + +theorem projectionScale_ne_zero (M : PlaneLinearMap F) (d : Direction F) : + M.projectionScale d ≠ 0 := by + cases d with + | none => + by_cases hxy : M.xy = 0 + · simp only [projectionScale, ite_eq_left hxy] + intro hxx + exact M.determinant_ne_zero (by simp [hxy, hxx]) + · simp only [projectionScale, ite_eq_right hxy] + exact div_ne_zero (neg_ne_zero.mpr M.determinant_ne_zero) hxy + | some a => + by_cases hA : M.xx + M.xy * a = 0 + · simp only [projectionScale, ite_eq_left hA] + intro hxy + have hxx : M.xx = 0 := by simpa only [hxy, zero_mul, add_zero] using hA + exact M.determinant_ne_zero (by simp [hxy, hxx]) + · simp only [projectionScale, ite_eq_right hA] + exact div_ne_zero M.determinant_ne_zero hA + +theorem projection_directionMap_apply (M : PlaneLinearMap F) + (d : Direction F) (p : Point F) : + projection (M.directionMap d) (M.apply p) = + M.projectionScale d * projection d p := by + cases d with + | none => + by_cases hxy : M.xy = 0 + · simp [directionMap, projectionScale, hxy, projection, apply] + · simp only [directionMap, projectionScale, ite_eq_right hxy, projection, apply] + field_simp [hxy] + simp only [determinant] + ring + | some a => + by_cases hA : M.xx + M.xy * a = 0 + · have hxx : M.xx = -(M.xy * a) := eq_neg_of_add_eq_zero_left hA + simp only [directionMap, projectionScale, ite_eq_left hA, projection, apply] + rw [hxx] + ring + · simp only [directionMap, projectionScale, ite_eq_right hA, projection, apply] + apply mul_right_cancel₀ hA + calc + (M.yx * p.1 + M.yy * p.2 - + (M.yx + M.yy * a) / (M.xx + M.xy * a) * + (M.xx * p.1 + M.xy * p.2)) * (M.xx + M.xy * a) = + (M.yx * p.1 + M.yy * p.2) * (M.xx + M.xy * a) - + ((M.yx + M.yy * a) / (M.xx + M.xy * a) * (M.xx + M.xy * a)) * + (M.xx * p.1 + M.xy * p.2) := by ring + _ = (M.yx * p.1 + M.yy * p.2) * (M.xx + M.xy * a) - + (M.yx + M.yy * a) * (M.xx * p.1 + M.xy * p.2) := by + rw [div_mul_cancel₀ _ hA] + _ = M.determinant * (p.2 - a * p.1) := by + simp only [determinant] + ring + _ = (M.determinant / (M.xx + M.xy * a) * (M.xx + M.xy * a)) * + (p.2 - a * p.1) := by rw [div_mul_cancel₀ _ hA] + _ = (M.determinant / (M.xx + M.xy * a) * (p.2 - a * p.1)) * + (M.xx + M.xy * a) := by ring + +theorem projection_directionMap_apply_eq_iff (M : PlaneLinearMap F) + (d : Direction F) (p q : Point F) : + projection (M.directionMap d) (M.apply p) = + projection (M.directionMap d) (M.apply q) ↔ + projection d p = projection d q := by + rw [M.projection_directionMap_apply, M.projection_directionMap_apply] + exact ⟨mul_left_cancel₀ (M.projectionScale_ne_zero d), + congrArg (fun x => M.projectionScale d * x)⟩ + +theorem directionMap_injective (M : PlaneLinearMap F) : + Function.Injective M.directionMap := by + intro d e hde + have hd : projection d (directionVector d) = 0 := + (directionVector_kernel_iff d d).2 rfl + have hz : projection (M.directionMap e) (M.apply (directionVector d)) = 0 := by + rw [← hde, M.projection_directionMap_apply, hd, mul_zero] + rw [M.projection_directionMap_apply] at hz + have he : projection e (directionVector d) = 0 := + (mul_eq_zero.mp hz).resolve_left (M.projectionScale_ne_zero e) + exact ((directionVector_kernel_iff e d).1 he).symm + +theorem projection_directionMap_placed_eq_iff (M : PlaneLinearMap F) + (b : Point F) (d : Direction F) (p q : Point F) : + projection (M.directionMap d) (b + M.apply p) = + projection (M.directionMap d) (b + M.apply q) ↔ + projection d p = projection d q := by + change projection (M.directionMap d) + (b.1 + (M.apply p).1, b.2 + (M.apply p).2) = + projection (M.directionMap d) + (b.1 + (M.apply q).1, b.2 + (M.apply q).2) ↔ _ + rw [projection_add, projection_add, add_left_cancel_iff] + exact M.projection_directionMap_apply_eq_iff d p q + +@[simp] theorem diagonal_directionMap_none (a : F) (ha : a ≠ 0) : + (diagonal a ha).directionMap none = none := by + simp [directionMap, diagonal] + +@[simp] theorem diagonal_directionMap_some (a : F) (ha : a ≠ 0) (t : F) : + (diagonal a ha).directionMap (some t) = some (a * t) := by + simp [directionMap, diagonal] + +@[simp] theorem extra_directionMap_none (u v : F) (huv : u ≠ v) : + (extra u v huv).directionMap none = some v := by + simp [directionMap, extra] + +@[simp] theorem extra_directionMap_zero (u v : F) (huv : u ≠ v) : + (extra u v huv).directionMap (some 0) = some u := by + simp [directionMap, extra] + +end PlaneLinearMap + +section Subfield + +variable {k : Type*} [Field k] [instDecidableEqk : DecidableEq k] + +def mapDirection (σ : k →+* F) : Direction k → Direction F := Option.map σ + +theorem mapDirection_injective (σ : k →+* F) : Function.Injective (mapDirection σ) := let _ := instDecidableEqF; let _ := instDecidableEqk; by + intro d e hde + cases d with + | none => + cases e with + | none => rfl + | some b => cases hde + | some a => + cases e with + | none => cases hde + | some b => exact congrArg Option.some (σ.injective (Option.some.inj hde)) + +theorem projection_mapDirection_mapPoint (σ : k →+* F) (d : Direction k) + (p : Point k) : + projection (mapDirection σ d) (mapPoint σ p) = σ (projection d p) := let _ := instDecidableEqF; let _ := instDecidableEqk; by + cases d <;> simp [mapDirection, mapPoint, projection, map_sub, map_mul] + +def placedDirection (σ : k →+* F) (M : PlaneLinearMap F) : + Direction k → Direction F := fun d => M.directionMap (mapDirection σ d) + +theorem placedDirection_injective (σ : k →+* F) (M : PlaneLinearMap F) : + Function.Injective (placedDirection σ M) := + M.directionMap_injective.comp (mapDirection_injective σ) + +theorem projection_placedPoint_eq_iff (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) (d : Direction k) (p q : Point k) : + projection (placedDirection σ M d) (placedPoint σ M b p) = + projection (placedDirection σ M d) (placedPoint σ M b q) ↔ + projection d p = projection d q := by + unfold placedDirection placedPoint + rw [M.projection_directionMap_placed_eq_iff, + projection_mapDirection_mapPoint, projection_mapDirection_mapPoint] + exact σ.injective.eq_iff + +end Subfield + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/DirectionSets.lean b/lean/OAI/Combinatorics/Ryser/Construction/DirectionSets.lean new file mode 100644 index 0000000000000000000000000000000000000000..f2528b85abe11011f3b12bce9713c9ad03821d93 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/DirectionSets.lean @@ -0,0 +1,127 @@ +import OAI.Combinatorics.Ryser.Construction.DirectionPlacement +import Mathlib.Data.Fintype.Card + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] +variable [DecidableEq k] [DecidableEq F] [instFintypek : Fintype k] + +def alteredDirections (σ : k →+* F) (M : PlaneLinearMap F) : Finset (Direction F) := + (Finset.univ.erase 0).image (fun t : k => placedDirection σ M (some t)) + +def axisDirections (σ : k →+* F) (M : PlaneLinearMap F) : Finset (Direction F) := + ({none, some 0} : Finset (Direction k)).image (placedDirection σ M) + +theorem mem_alteredDirections_iff (σ : k →+* F) (M : PlaneLinearMap F) + (d : Direction F) : + d ∈ alteredDirections σ M ↔ + ∃ t : k, t ≠ 0 ∧ placedDirection σ M (some t) = d := by + simp only [alteredDirections, Finset.mem_image, Finset.mem_erase, + Finset.mem_univ, and_true] + +theorem mem_axisDirections_iff (σ : k →+* F) (M : PlaneLinearMap F) + (d : Direction F) : + d ∈ axisDirections σ M ↔ + d = placedDirection σ M none ∨ d = placedDirection σ M (some 0) := let _ := instFintypek; by + simp [axisDirections] + +theorem placedDirection_mem_alteredDirections (σ : k →+* F) (M : PlaneLinearMap F) + (t : k) (ht : t ≠ 0) : + placedDirection σ M (some t) ∈ alteredDirections σ M := + (mem_alteredDirections_iff σ M _).mpr ⟨t, ht, rfl⟩ + +theorem alteredDirections_nonempty (σ : k →+* F) (M : PlaneLinearMap F) : + (alteredDirections σ M).Nonempty := + ⟨placedDirection σ M (some 1), + placedDirection_mem_alteredDirections σ M 1 one_ne_zero⟩ + +theorem disjoint_alteredDirections_axisDirections (σ : k →+* F) + (M : PlaneLinearMap F) : Disjoint (alteredDirections σ M) (axisDirections σ M) := by + apply Finset.disjoint_left.mpr + intro d hd ha + obtain ⟨t, ht, rfl⟩ := (mem_alteredDirections_iff σ M d).mp hd + rcases (mem_axisDirections_iff σ M _).mp ha with hnone | hzero + · have h := placedDirection_injective σ M hnone + cases h + · exact ht (Option.some.inj (placedDirection_injective σ M hzero)) + +theorem placedDirection_axis_notMem_alteredDirections (σ : k →+* F) + (M : PlaneLinearMap F) (d : Direction k) (haxis : d = none ∨ d = some 0) : + placedDirection σ M d ∉ alteredDirections σ M := by + have ha : placedDirection σ M d ∈ axisDirections σ M := by + apply (mem_axisDirections_iff σ M _).mpr + rcases haxis with rfl | rfl + · exact Or.inl rfl + · exact Or.inr rfl + intro hd + exact Finset.disjoint_left.mp (disjoint_alteredDirections_axisDirections σ M) hd ha + +theorem placedDirection_mem_altered_or_axis (σ : k →+* F) (M : PlaneLinearMap F) + (d : Direction k) : + placedDirection σ M d ∈ alteredDirections σ M ∪ axisDirections σ M := by + cases d with + | none => + exact Finset.mem_union_right _ ((mem_axisDirections_iff σ M _).mpr (Or.inl rfl)) + | some t => + by_cases ht : t = 0 + · subst t + exact Finset.mem_union_right _ ((mem_axisDirections_iff σ M _).mpr (Or.inr rfl)) + · exact Finset.mem_union_left _ (placedDirection_mem_alteredDirections σ M t ht) + +theorem card_alteredDirections (σ : k →+* F) (M : PlaneLinearMap F) : + (alteredDirections σ M).card = Fintype.card k - 1 := by + have hinj : Function.Injective (fun t : k => placedDirection σ M (some t)) := by + intro t u h + exact Option.some.inj (placedDirection_injective σ M h) + unfold alteredDirections + rw [Finset.card_image_of_injective _ hinj, + Finset.card_erase_of_mem (Finset.mem_univ 0), Finset.card_univ] + +theorem card_axisDirections (σ : k →+* F) (M : PlaneLinearMap F) : + (axisDirections σ M).card = 2 := let _ := instFintypek; by + unfold axisDirections + rw [Finset.card_image_of_injective _ (placedDirection_injective σ M)] + simp + +theorem existsUnique_alteredSlope (σ : k →+* F) (M : PlaneLinearMap F) + (d : {d : Direction F // d ∈ alteredDirections σ M}) : + ∃! t : k, t ≠ 0 ∧ placedDirection σ M (some t) = d.val := by + obtain ⟨t, ht, htd⟩ := (mem_alteredDirections_iff σ M d.val).mp d.property + refine ⟨t, ⟨ht, htd⟩, ?_⟩ + intro u hu + exact Option.some.inj (placedDirection_injective σ M (hu.2.trans htd.symm)) + +noncomputable def alteredInverseSlope (σ : k →+* F) (M : PlaneLinearMap F) + (d : {d : Direction F // d ∈ alteredDirections σ M}) : k := + Classical.choose (existsUnique_alteredSlope σ M d).exists + +theorem alteredInverseSlope_spec (σ : k →+* F) (M : PlaneLinearMap F) + (d : {d : Direction F // d ∈ alteredDirections σ M}) : + alteredInverseSlope σ M d ≠ 0 ∧ + placedDirection σ M (some (alteredInverseSlope σ M d)) = d.val := + Classical.choose_spec (existsUnique_alteredSlope σ M d).exists + +theorem alteredInverseSlope_ne_zero (σ : k →+* F) (M : PlaneLinearMap F) + (d : {d : Direction F // d ∈ alteredDirections σ M}) : + alteredInverseSlope σ M d ≠ 0 := + (alteredInverseSlope_spec σ M d).1 + +theorem placedDirection_inverseSlope (σ : k →+* F) (M : PlaneLinearMap F) + (d : {d : Direction F // d ∈ alteredDirections σ M}) : + placedDirection σ M (some (alteredInverseSlope σ M d)) = d.val := + (alteredInverseSlope_spec σ M d).2 + +theorem inverseSlope_placedDirection (σ : k →+* F) (M : PlaneLinearMap F) + (t : k) (ht : t ≠ 0) : + alteredInverseSlope σ M + ⟨placedDirection σ M (some t), placedDirection_mem_alteredDirections σ M t ht⟩ = t := by + apply Option.some.inj + apply placedDirection_injective σ M + exact placedDirection_inverseSlope σ M + ⟨placedDirection σ M (some t), placedDirection_mem_alteredDirections σ M t ht⟩ + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/ExceptionalBudget.lean b/lean/OAI/Combinatorics/Ryser/Construction/ExceptionalBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..8a6147547a8da68d5f3ec26ac22eae5b318d0a7d --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/ExceptionalBudget.lean @@ -0,0 +1,57 @@ +import Mathlib.Data.Finset.Card +import Lean.Elab.Tactic.Omega + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +variable {V : Type*} [DecidableEq V] + +theorem two_group_resource_card_le (C Ai Bi Aj Bj : Finset V) + (hAi : Ai ⊆ C) (hBi : Bi ⊆ C) (hAj : Aj ⊆ C) (hBj : Bj ⊆ C) + (hAiBi : Disjoint Ai Bi) (hAjBj : Disjoint Aj Bj) + (hAiOther : Disjoint Ai (Aj ∪ Bj)) + (hAjOther : Disjoint Aj (Ai ∪ Bi)) : + 2 * Ai.card + Bi.card + 2 * Aj.card + Bj.card ≤ 2 * C.card := by + have hAiAj : Disjoint Ai Aj := (Finset.disjoint_union_right.mp hAiOther).1 + have hAiBj : Disjoint Ai Bj := (Finset.disjoint_union_right.mp hAiOther).2 + have hAjBi : Disjoint Aj Bi := (Finset.disjoint_union_right.mp hAjOther).2 + have hlineBi : Disjoint (Ai ∪ Aj) Bi := + Finset.disjoint_union_left.mpr ⟨hAiBi, hAjBi⟩ + have hlineBj : Disjoint (Ai ∪ Aj) Bj := + Finset.disjoint_union_left.mpr ⟨hAiBj, hAjBj⟩ + have hleft : Ai.card + Aj.card + Bi.card ≤ C.card := by + have h := Finset.card_le_card (Finset.union_subset (Finset.union_subset hAi hAj) hBi) + rw [Finset.card_union_of_disjoint hlineBi, Finset.card_union_of_disjoint hAiAj] at h + exact h + have hright : Ai.card + Aj.card + Bj.card ≤ C.card := by + have h := Finset.card_le_card (Finset.union_subset (Finset.union_subset hAi hAj) hBj) + rw [Finset.card_union_of_disjoint hlineBj, Finset.card_union_of_disjoint hAiAj] at h + exact h + omega + +theorem two_group_weighted_budget_impossible (s ai bi aj bj n : ℕ) + (hs : 0 < s) + (hi : 2 * s ≤ 2 * ai + bi) (hj : 2 * s ≤ 2 * aj + bj) + (haccount : 2 * ai + bi + 2 * aj + bj ≤ 2 * n) + (hbudget : n ≤ 2 * (s - 1)) : False := by + omega + +theorem two_group_resource_budget_impossible (C Ai Bi Aj Bj : Finset V) + (s : ℕ) (hs : 0 < s) + (hAi : Ai ⊆ C) (hBi : Bi ⊆ C) (hAj : Aj ⊆ C) (hBj : Bj ⊆ C) + (hAiBi : Disjoint Ai Bi) (hAjBj : Disjoint Aj Bj) + (hAiOther : Disjoint Ai (Aj ∪ Bj)) + (hAjOther : Disjoint Aj (Ai ∪ Bi)) + (hi : 2 * s ≤ 2 * Ai.card + Bi.card) + (hj : 2 * s ≤ 2 * Aj.card + Bj.card) + (hbudget : C.card ≤ 2 * (s - 1)) : False := + two_group_weighted_budget_impossible s Ai.card Bi.card Aj.card Bj.card C.card + hs hi hj + (two_group_resource_card_le C Ai Bi Aj Bj hAi hBi hAj hBj + hAiBi hAjBj hAiOther hAjOther) + hbudget + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/ExceptionalCover.lean b/lean/OAI/Combinatorics/Ryser/Construction/ExceptionalCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..e2ee6b8a8f72535464d476c2ff3905bb3ad33df1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/ExceptionalCover.lean @@ -0,0 +1,304 @@ +import OAI.Combinatorics.Ryser.Construction.CoordinateCompatibility +import OAI.Combinatorics.Ryser.Construction.OrdinaryCover + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {k F G : Type*} [Field k] [Field F] +variable [DecidableEq k] [DecidableEq F] [DecidableEq G] [Fintype F] + +def ActiveExceptional (data : ConfigurationData k F G) (i : G) + (v : Vertex (k := k) data.altered) : Prop := + ∃ w ∈ data.retained, v ∈ exceptionalEdge data i w + +def LineCapable (data : ConfigurationData k F G) + (axes : G → Finset (Direction F)) (i : G) : + Vertex (k := k) data.altered → Prop + | Sum.inl ell => ell.1 ∈ axes i + | Sum.inr tag => tag.1 = i + +def lineResources (data : ConfigurationData k F G) + (axes : G → Finset (Direction F)) + (C : Finset (Vertex (k := k) data.altered)) (i : G) : + Finset (Vertex (k := k) data.altered) := by + classical + exact C.filter fun v => LineCapable data axes i v ∧ ActiveExceptional data i v + +def pointResources (data : ConfigurationData k F G) + (axes : G → Finset (Direction F)) + (C : Finset (Vertex (k := k) data.altered)) (i : G) : + Finset (Vertex (k := k) data.altered) := by + classical + exact C.filter fun v => ¬ LineCapable data axes i v ∧ ActiveExceptional data i v + +@[simp] theorem mem_lineResources (data : ConfigurationData k F G) + (axes : G → Finset (Direction F)) + (C : Finset (Vertex (k := k) data.altered)) (i : G) + (v : Vertex (k := k) data.altered) : + v ∈ lineResources data axes C i ↔ + v ∈ C ∧ LineCapable data axes i v ∧ ActiveExceptional data i v := by + classical + simp only [lineResources, Finset.mem_filter] + +@[simp] theorem mem_pointResources (data : ConfigurationData k F G) + (axes : G → Finset (Direction F)) + (C : Finset (Vertex (k := k) data.altered)) (i : G) + (v : Vertex (k := k) data.altered) : + v ∈ pointResources data axes C i ↔ + v ∈ C ∧ ¬ LineCapable data axes i v ∧ ActiveExceptional data i v := by + classical + simp only [pointResources, Finset.mem_filter] + +theorem lineResources_subset (data : ConfigurationData k F G) + (axes : G → Finset (Direction F)) + (C : Finset (Vertex (k := k) data.altered)) (i : G) : + lineResources data axes C i ⊆ C := by + intro v hv + exact ((mem_lineResources data axes C i v).1 hv).1 + +theorem pointResources_subset (data : ConfigurationData k F G) + (axes : G → Finset (Direction F)) + (C : Finset (Vertex (k := k) data.altered)) (i : G) : + pointResources data axes C i ⊆ C := by + intro v hv + exact ((mem_pointResources data axes C i v).1 hv).1 + +theorem lineResources_disjoint_pointResources (data : ConfigurationData k F G) + (axes : G → Finset (Direction F)) + (C : Finset (Vertex (k := k) data.altered)) (i : G) : + Disjoint (lineResources data axes C i) (pointResources data axes C i) := by + apply Finset.disjoint_left.mpr + intro v hl hp + exact ((mem_pointResources data axes C i v).1 hp).2.1 + ((mem_lineResources data axes C i v).1 hl).2.1 + +theorem lineResources_disjoint_other_of_axis_subset + (data : ConfigurationData k F G) (axes : G → Finset (Direction F)) + (C : Finset (Vertex (k := k) data.altered)) (i j : G) (hij : i ≠ j) + (haxis : axes i ⊆ data.altered j) : + Disjoint (lineResources data axes C i) + (lineResources data axes C j ∪ pointResources data axes C j) := by + apply Finset.disjoint_left.mpr + intro v hi hj + have hline := ((mem_lineResources data axes C i v).1 hi).2.1 + have hactive : ActiveExceptional data j v := by + rcases Finset.mem_union.mp hj with hj | hj + · exact ((mem_lineResources data axes C j v).1 hj).2.2 + · exact ((mem_pointResources data axes C j v).1 hj).2.2 + obtain ⟨w, _, hw⟩ := hactive + cases v with + | inl ell => + have hinc := (ordinaryVertex_mem_exceptionalEdge_iff data j w ell).1 hw + exact hinc.1 (haxis hline) + | inr tag => + rcases tag with ⟨a, d, c⟩ + have hai : a = i := hline + subst a + exact specialVertex_notMem_exceptionalEdge_of_ne data i j hij w d c hw + +theorem forcedPencilVertices_no_action_of_altered + (data : ConfigurationData k F G) (B : Finset (AffineLine F)) + (d : Direction F) (i : G) (hd : d ∈ data.altered i) + (v : Vertex (k := k) data.altered) + (hv : v ∈ forcedPencilVertices data B (Sum.inr d)) (w : Point k) : + v ∉ exceptionalEdge data i w := by + obtain ⟨ell, hell, rfl⟩ := Finset.mem_image.mp hv + have hpencil := (mem_affinePencil (Sum.inr d) ell).1 + (Finset.mem_sdiff.mp hell).1 + have hdir : d = ell.1 := hpencil + intro hmem + have hnot := ((ordinaryVertex_mem_exceptionalEdge_iff data i w ell).1 hmem).1 + exact hnot (hdir ▸ hd) + +section CoveredEdges + +variable [Fintype G] + +theorem exceptional_cover_of_vertex_cover (data : ConfigurationData k F G) + (C : Finset (Vertex (k := k) data.altered)) + (hC : IsCover (hypergraph data) C) (i : G) : + ∀ w ∈ data.retained, ∃ v ∈ C, v ∈ exceptionalEdge data i w := by + intro w hw + exact hC _ ((mem_hypergraph data _).2 (Or.inr ⟨i, w, hw, rfl⟩)) + +theorem exceptional_cover_sdiff_of_no_action (data : ConfigurationData k F G) + (C P : Finset (Vertex (k := k) data.altered)) + (hC : IsCover (hypergraph data) C) (i : G) + (hP : ∀ v ∈ P, ∀ w ∈ data.retained, v ∉ exceptionalEdge data i w) : + ∀ w ∈ data.retained, ∃ v ∈ C \ P, v ∈ exceptionalEdge data i w := by + intro w hw + obtain ⟨v, hvC, hve⟩ := exceptional_cover_of_vertex_cover data C hC i w hw + refine ⟨v, Finset.mem_sdiff.mpr ⟨hvC, ?_⟩, hve⟩ + intro hvP + exact hP v hvP w hw hve + +theorem exceptional_cover_additional_of_altered + (data : ConfigurationData k F G) + (C : Finset (Vertex (k := k) data.altered)) + (hC : IsCover (hypergraph data) C) (B : Finset (AffineLine F)) + (d : Direction F) (i : G) (hd : d ∈ data.altered i) : + ∀ w ∈ data.retained, + ∃ v ∈ C \ forcedPencilVertices data B (Sum.inr d), + v ∈ exceptionalEdge data i w := by + apply exceptional_cover_sdiff_of_no_action data C _ hC i + intro v hv w _ + exact forcedPencilVertices_no_action_of_altered data B d i hd v hv w + +end CoveredEdges + +variable [Fintype k] +variable (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) +variable (Y : Finset (Point k)) (X : Finset (Point F)) + +local notation "cfg" => placedConfiguration σ M b Y X +local notation "axes" => (fun i => axisDirections σ (M i)) + +theorem lineCapable_has_line + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (i : G) + (v : Vertex (k := k) (cfg).altered) (hv : LineCapable cfg axes i v) : + ∃ ell : AffineLine k, ∀ w ∈ Y, + v ∈ exceptionalEdge cfg i w → Incidence (cubeMap w) ell := by + classical + cases v with + | inl ell => + have ha : ell.1 ∈ axisDirections σ (M i) := hv + have hex : ∃ d : Direction k, (d = none ∨ d = some 0) ∧ + ell.1 = placedDirection σ (M i) d := by + rcases (mem_axisDirections_iff σ (M i) ell.1).1 ha with h | h + · exact ⟨none, Or.inl rfl, h⟩ + · exact ⟨some 0, Or.inr rfl, h⟩ + obtain ⟨d, hd, hdir⟩ := hex + by_cases hactive : ∃ q ∈ Y, ordinaryVertex cfg ell ∈ exceptionalEdge cfg i q + · obtain ⟨q, _, hq⟩ := hactive + refine ⟨lineThrough d (cubeMap q), ?_⟩ + intro w _ hw + exact cubeMap_incidence_axis_of_placed_incidence σ (M i) (b i) hcop + d hd ell hdir w q + ((ordinaryVertex_mem_exceptionalEdge_iff cfg i w ell).1 hw).2 + ((ordinaryVertex_mem_exceptionalEdge_iff cfg i q ell).1 hq).2 + · refine ⟨(none, 0), ?_⟩ + intro w hw hmem + exact (hactive ⟨w, hw, hmem⟩).elim + | inr tag => + rcases tag with ⟨j, d, c⟩ + have hji : j = i := hv + subst j + refine ⟨(some ((cfg).inverseSlope i d), c), ?_⟩ + intro w _ hw + exact (specialVertex_mem_exceptionalEdge_iff cfg i w d c).1 hw + +theorem not_lineCapable_unique (i : G) + (v : Vertex (k := k) (cfg).altered) (hv : ¬ LineCapable cfg axes i v) + (p q : Point k) (hp : v ∈ exceptionalEdge cfg i p) + (hq : v ∈ exceptionalEdge cfg i q) : cubeMap p = cubeMap q := by + cases v with + | inl ell => + have hp' := (ordinaryVertex_mem_exceptionalEdge_iff cfg i p ell).1 hp + have hq' := (ordinaryVertex_mem_exceptionalEdge_iff cfg i q ell).1 hq + have hout : ell.1 ∉ alteredDirections σ (M i) ∪ axisDirections σ (M i) := by + intro h + rcases Finset.mem_union.mp h with h | h + · exact hp'.1 h + · exact hv h + exact congrArg cubeMap + (placedPoint_eq_of_incidence_outside_altered_axis σ (M i) (b i) + ell hout p q hp'.2 hq'.2) + | inr tag => + rcases tag with ⟨j, d, c⟩ + have hji : j ≠ i := hv + exact (specialVertex_notMem_exceptionalEdge_of_ne cfg j i hji p d c hp).elim + +theorem not_lineCapable_has_point (i : G) + (v : Vertex (k := k) (cfg).altered) (hv : ¬ LineCapable cfg axes i v) : + ∃ p : Point k, ∀ w ∈ Y, v ∈ exceptionalEdge cfg i w → cubeMap w = p := by + classical + by_cases ha : ActiveExceptional cfg i v + · obtain ⟨q, _, hq⟩ := ha + refine ⟨cubeMap q, ?_⟩ + intro w _ hw + exact not_lineCapable_unique σ M b Y X i v hv w q hw hq + · refine ⟨(0, 0), ?_⟩ + intro w hw hmem + exact (ha ⟨w, hw, hmem⟩).elim + +theorem exceptional_resource_has_line + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (i : G) + (v : Vertex (k := k) (cfg).altered) : + ∃ ell : AffineLine k, ∀ w ∈ Y, + v ∈ exceptionalEdge cfg i w → Incidence (cubeMap w) ell := by + classical + by_cases hv : LineCapable cfg axes i v + · exact lineCapable_has_line σ M b Y X hcop i v hv + · obtain ⟨p, hp⟩ := not_lineCapable_has_point σ M b Y X i v hv + refine ⟨lineThrough none p, ?_⟩ + intro w hw hmem + rw [hp w hw hmem] + exact incidence_lineThrough none p + +theorem exists_line_cover_of_exceptional_cover + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (i : G) + (C : Finset (Vertex (k := k) (cfg).altered)) + (hcover : ∀ w ∈ Y, ∃ v ∈ C, v ∈ exceptionalEdge cfg i w) : + ∃ L : Finset (AffineLine k), L.card ≤ C.card ∧ + ∀ y ∈ Y.image cubeMap, ∃ ell ∈ L, Incidence y ell := by + classical + let f : Vertex (k := k) (cfg).altered → AffineLine k := + fun v => Classical.choose (exceptional_resource_has_line σ M b Y X hcop i v) + refine ⟨C.image f, Finset.card_image_le, ?_⟩ + intro y hy + obtain ⟨w, hw, rfl⟩ := Finset.mem_image.mp hy + obtain ⟨v, hv, hve⟩ := hcover w hw + exact ⟨f v, Finset.mem_image_of_mem _ hv, + Classical.choose_spec (exceptional_resource_has_line σ M b Y X hcop i v) w hw hve⟩ + +theorem exists_mixed_cover_of_exceptional_cover + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (i : G) + (C : Finset (Vertex (k := k) (cfg).altered)) + (hcover : ∀ w ∈ Y, ∃ v ∈ C, v ∈ exceptionalEdge cfg i w) : + ∃ (L : Finset (AffineLine k)) (B : Finset (Point k)), + L.card ≤ (lineResources cfg axes C i).card ∧ + B.card ≤ (pointResources cfg axes C i).card ∧ + ∀ y ∈ Y.image cubeMap, y ∈ B ∨ ∃ ell ∈ L, Incidence y ell := by + classical + have hlines : ∀ v : Vertex (k := k) (cfg).altered, + ∃ ell : AffineLine k, LineCapable cfg axes i v → + ∀ w ∈ Y, v ∈ exceptionalEdge cfg i w → Incidence (cubeMap w) ell := by + intro v + by_cases hv : LineCapable cfg axes i v + · obtain ⟨ell, hell⟩ := lineCapable_has_line σ M b Y X hcop i v hv + exact ⟨ell, fun _ => hell⟩ + · exact ⟨(none, 0), fun h => (hv h).elim⟩ + have hpoints : ∀ v : Vertex (k := k) (cfg).altered, + ∃ p : Point k, ¬ LineCapable cfg axes i v → + ∀ w ∈ Y, v ∈ exceptionalEdge cfg i w → cubeMap w = p := by + intro v + by_cases hv : LineCapable cfg axes i v + · exact ⟨(0, 0), fun h => (h hv).elim⟩ + · obtain ⟨p, hp⟩ := not_lineCapable_has_point σ M b Y X i v hv + exact ⟨p, fun _ => hp⟩ + let f := fun v => Classical.choose (hlines v) + let g := fun v => Classical.choose (hpoints v) + refine ⟨(lineResources cfg axes C i).image f, + (pointResources cfg axes C i).image g, Finset.card_image_le, + Finset.card_image_le, ?_⟩ + intro y hy + obtain ⟨w, hw, rfl⟩ := Finset.mem_image.mp hy + obtain ⟨v, hvC, hve⟩ := hcover w hw + have hactive : ActiveExceptional cfg i v := ⟨w, hw, hve⟩ + by_cases hv : LineCapable cfg axes i v + · exact Or.inr ⟨f v, Finset.mem_image_of_mem _ + ((mem_lineResources cfg axes C i v).2 ⟨hvC, hv, hactive⟩), + Classical.choose_spec (hlines v) hv w hw hve⟩ + · apply Or.inl + rw [Classical.choose_spec (hpoints v) hv w hw hve] + exact Finset.mem_image_of_mem _ + ((mem_pointResources cfg axes C i v).2 ⟨hvC, hv, hactive⟩) + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/ExtraDirections.lean b/lean/OAI/Combinatorics/Ryser/Construction/ExtraDirections.lean new file mode 100644 index 0000000000000000000000000000000000000000..a5b9a8ca822774e719b6b04b5fee1fade26013af --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/ExtraDirections.lean @@ -0,0 +1,150 @@ +import OAI.Combinatorics.Ryser.Construction.DirectionSets +import OAI.Combinatorics.Ryser.Construction.LinearPlacement + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] [DecidableEq k] [DecidableEq F] + +namespace PlaneLinearMap + +theorem directionMap_bijective [Fintype F] (M : PlaneLinearMap F) : + Function.Bijective M.directionMap := + M.directionMap_injective.bijective_of_finite + +end PlaneLinearMap + +theorem extra_placedDirection (σ : k →+* F) (u v : k) (huv : u ≠ v) + (d : Direction k) : + placedDirection σ (PlaneLinearMap.extra (σ u) (σ v) (σ.injective.ne huv)) d = + mapDirection σ ((PlaneLinearMap.extra u v huv).directionMap d) := by + cases d with + | none => + simp [placedDirection, mapDirection] + | some t => + have hzero : 1 + σ t = 0 ↔ 1 + t = 0 := by + constructor + · intro h + apply σ.injective + simpa only [map_add, map_one, map_zero] using h + · intro h + simpa only [map_add, map_one, map_zero] using congrArg σ h + by_cases ht : 1 + t = 0 + · have hF := hzero.mpr ht + simp [placedDirection, mapDirection, PlaneLinearMap.directionMap, + PlaneLinearMap.extra, ht, hF] + · have hF : 1 + σ t ≠ 0 := fun h => ht (hzero.mp h) + simp [placedDirection, mapDirection, PlaneLinearMap.directionMap, + PlaneLinearMap.extra, ht, hF, map_div₀, map_add, map_mul] + +variable [instFintypek : Fintype k] + +theorem extra_allDirections_image (σ : k →+* F) (u v : k) (huv : u ≠ v) : + (Finset.univ.image + (placedDirection σ (PlaneLinearMap.extra (σ u) (σ v) (σ.injective.ne huv)))) = + Finset.univ.image (mapDirection σ) := by + ext d + constructor + · intro hd + obtain ⟨e, _, rfl⟩ := Finset.mem_image.mp hd + exact Finset.mem_image.mpr + ⟨(PlaneLinearMap.extra u v huv).directionMap e, Finset.mem_univ _, + (extra_placedDirection σ u v huv e).symm⟩ + · intro hd + obtain ⟨e, _, rfl⟩ := Finset.mem_image.mp hd + obtain ⟨a, ha⟩ := (PlaneLinearMap.extra u v huv).directionMap_bijective.surjective e + refine Finset.mem_image.mpr ⟨a, Finset.mem_univ _, ?_⟩ + rw [extra_placedDirection σ u v huv a, ha] + +theorem extra_axisDirections (σ : k →+* F) (u v : k) (huv : u ≠ v) : + axisDirections σ (PlaneLinearMap.extra (σ u) (σ v) (σ.injective.ne huv)) = + {some (σ u), some (σ v)} := let _ := instFintypek; by + simp [axisDirections, placedDirection, mapDirection, Finset.pair_comm] + +theorem alteredDirections_eq_allDirections_sdiff_axisDirections + (σ : k →+* F) (M : PlaneLinearMap F) : + alteredDirections σ M = + (Finset.univ.image (placedDirection σ M)) \ axisDirections σ M := by + ext d + constructor + · intro hd + refine Finset.mem_sdiff.mpr ⟨?_, ?_⟩ + · obtain ⟨t, _, rfl⟩ := (mem_alteredDirections_iff σ M d).mp hd + exact Finset.mem_image.mpr ⟨some t, Finset.mem_univ _, rfl⟩ + · intro ha + exact Finset.disjoint_left.mp (disjoint_alteredDirections_axisDirections σ M) hd ha + · intro hd + obtain ⟨hf, hn⟩ := Finset.mem_sdiff.mp hd + obtain ⟨a, _, rfl⟩ := Finset.mem_image.mp hf + rcases Finset.mem_union.mp (placedDirection_mem_altered_or_axis σ M a) with ha | ha + · exact ha + · exact False.elim (hn ha) + +theorem extra_alteredDirections (σ : k →+* F) (u v : k) (huv : u ≠ v) : + alteredDirections σ (PlaneLinearMap.extra (σ u) (σ v) (σ.injective.ne huv)) = + (Finset.univ.image (mapDirection σ)) \ {some (σ u), some (σ v)} := by + rw [alteredDirections_eq_allDirections_sdiff_axisDirections, + extra_allDirections_image σ u v huv, extra_axisDirections σ u v huv] + +theorem none_mem_extra_alteredDirections (σ : k →+* F) (u v : k) (huv : u ≠ v) : + none ∈ alteredDirections σ + (PlaneLinearMap.extra (σ u) (σ v) (σ.injective.ne huv)) := by + rw [extra_alteredDirections σ u v huv] + refine Finset.mem_sdiff.mpr ⟨?_, ?_⟩ + · exact Finset.mem_image.mpr ⟨none, Finset.mem_univ _, rfl⟩ + · simp + +theorem zero_mem_extra_alteredDirections (σ : k →+* F) (u v : k) (huv : u ≠ v) + (hu : u ≠ 0) (hv : v ≠ 0) : + some 0 ∈ alteredDirections σ + (PlaneLinearMap.extra (σ u) (σ v) (σ.injective.ne huv)) := by + have hσu : σ u ≠ 0 := by + intro h + apply hu + apply σ.injective + simpa only [map_zero] using h + have hσv : σ v ≠ 0 := by + intro h + apply hv + apply σ.injective + simpa only [map_zero] using h + rw [extra_alteredDirections σ u v huv] + refine Finset.mem_sdiff.mpr ⟨?_, ?_⟩ + · exact Finset.mem_image.mpr ⟨some 0, Finset.mem_univ _, by simp [mapDirection]⟩ + · simp [Ne.symm hσu, Ne.symm hσv] + +theorem diagonal_one_axisDirections_subset_extra_alteredDirections + (σ : k →+* F) (u v : k) (huv : u ≠ v) (hu : u ≠ 0) (hv : v ≠ 0) : + axisDirections σ (PlaneLinearMap.diagonal (1 : F) one_ne_zero) ⊆ + alteredDirections σ (PlaneLinearMap.extra (σ u) (σ v) (σ.injective.ne huv)) := by + intro d hd + rcases (mem_axisDirections_iff σ (PlaneLinearMap.diagonal (1 : F) one_ne_zero) d).mp hd + with h | h + · have hd' : d = none := by simpa [placedDirection, mapDirection] using h + subst d + simpa [placedDirection, mapDirection] using none_mem_extra_alteredDirections σ u v huv + · have hd' : d = some 0 := by simpa [placedDirection, mapDirection] using h + subst d + simpa [placedDirection, mapDirection] using zero_mem_extra_alteredDirections σ u v huv hu hv + +theorem extra_axisDirections_subset_diagonal_one_alteredDirections + (σ : k →+* F) (u v : k) (huv : u ≠ v) (hu : u ≠ 0) (hv : v ≠ 0) : + axisDirections σ (PlaneLinearMap.extra (σ u) (σ v) (σ.injective.ne huv)) ⊆ + alteredDirections σ (PlaneLinearMap.diagonal (1 : F) one_ne_zero) := by + intro d hd + rw [extra_axisDirections σ u v huv] at hd + rcases Finset.mem_insert.mp hd with hd | hd + · subst d + simpa [placedDirection, mapDirection] using + placedDirection_mem_alteredDirections σ + (PlaneLinearMap.diagonal (1 : F) one_ne_zero) u hu + · have hd' : d = some (σ v) := Finset.mem_singleton.mp hd + subst d + simpa [placedDirection, mapDirection] using + placedDirection_mem_alteredDirections σ + (PlaneLinearMap.diagonal (1 : F) one_ne_zero) v hv + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/FiniteInsideCover.lean b/lean/OAI/Combinatorics/Ryser/Construction/FiniteInsideCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..597becc21560975a17171022f947c6a33ab687fc --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/FiniteInsideCover.lean @@ -0,0 +1,115 @@ +import OAI.Combinatorics.Ryser.Construction.ExceptionalCover +import OAI.Combinatorics.Ryser.Construction.CoverBudget +import OAI.Combinatorics.Ryser.Construction.GadgetConsequences + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +variable {k F G : Type*} [Field k] [Field F] +variable [DecidableEq k] [DecidableEq F] [DecidableEq G] +variable [Fintype k] [Fintype F] +variable (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) +variable (Y : Finset (Point k)) (X : Finset (Point F)) + +local notation "cfg" => placedConfiguration σ M b Y X + +theorem forced_vertex_inside_axes + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (i : G) (wp : Point k) + (B : Finset (AffineLine F)) (v : Vertex (k := k) (cfg).altered) + (hv : v ∈ forcedPencilVertices cfg B + (Sum.inl (placedPoint σ (M i) (b i) wp))) + (w : Point k) (hve : v ∈ exceptionalEdge cfg i w) : + Incidence (cubeMap w) (lineThrough none (cubeMap wp)) ∨ + Incidence (cubeMap w) (lineThrough (some 0) (cubeMap wp)) := by + obtain ⟨ell, hell, rfl⟩ := Finset.mem_image.mp hv + have hwp : Incidence (placedPoint σ (M i) (b i) wp) ell := + (mem_affinePencil _ ell).1 (Finset.mem_sdiff.mp hell).1 + have hw := (ordinaryVertex_mem_exceptionalEdge_iff cfg i w ell).1 hve + by_cases haxis : ell.1 ∈ axisDirections σ (M i) + · rcases (mem_axisDirections_iff σ (M i) ell.1).1 haxis with hd | hd + · exact Or.inl (cubeMap_incidence_axis_of_placed_incidence σ (M i) (b i) + hcop none (Or.inl rfl) ell hd w wp hw.2 hwp) + · exact Or.inr (cubeMap_incidence_axis_of_placed_incidence σ (M i) (b i) + hcop (some 0) (Or.inr rfl) ell hd w wp hw.2 hwp) + · have hout : ell.1 ∉ alteredDirections σ (M i) ∪ axisDirections σ (M i) := by + intro h + rcases Finset.mem_union.mp h with h | h + · exact hw.1 h + · exact haxis h + have hsame : w = wp := + placedPoint_eq_of_incidence_outside_altered_axis σ (M i) (b i) + ell hout w wp hw.2 hwp + subst w + exact Or.inl (incidence_lineThrough none (cubeMap wp)) + +variable [Fintype G] + +theorem exists_inside_axis_line_cover + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (i : G) (wp : Point k) + (C : Finset (Vertex (k := k) (cfg).altered)) + (hC : IsCover (hypergraph cfg) C) (B : Finset (AffineLine F)) : + ∃ L : Finset (AffineLine k), + L.card ≤ (C \ forcedPencilVertices cfg B + (Sum.inl (placedPoint σ (M i) (b i) wp))).card + 2 ∧ + lineThrough none (cubeMap wp) ∈ L ∧ + lineThrough (some 0) (cubeMap wp) ∈ L ∧ + ∀ y ∈ Y.image cubeMap, ∃ ell ∈ L, Incidence y ell := by + classical + let P := forcedPencilVertices cfg B (Sum.inl (placedPoint σ (M i) (b i) wp)) + let A := C \ P + let f : Vertex (k := k) (cfg).altered → AffineLine k := + fun v => Classical.choose (exceptional_resource_has_line σ M b Y X hcop i v) + let vertical := lineThrough none (cubeMap wp) + let horizontal := lineThrough (some 0) (cubeMap wp) + let L := insert vertical (insert horizontal (A.image f)) + have hvertical : vertical ∈ L := Finset.mem_insert_self _ _ + have hhorizontal : horizontal ∈ L := + Finset.mem_insert_of_mem (Finset.mem_insert_self _ _) + have hcard : L.card ≤ A.card + 2 := by + have houter := Finset.card_insert_le vertical (insert horizontal (A.image f)) + have hinner := Finset.card_insert_le horizontal (A.image f) + have himage : (A.image f).card ≤ A.card := Finset.card_image_le + change (insert vertical (insert horizontal (A.image f))).card ≤ A.card + 2 + omega + refine ⟨L, hcard, hvertical, hhorizontal, ?_⟩ + intro y hy + obtain ⟨w, hw, rfl⟩ := Finset.mem_image.mp hy + obtain ⟨v, hvC, hve⟩ := exceptional_cover_of_vertex_cover cfg C hC i w hw + by_cases hvP : v ∈ P + · rcases forced_vertex_inside_axes σ M b Y X hcop i wp B v hvP w hve with hv | hh + · exact ⟨vertical, hvertical, hv⟩ + · exact ⟨horizontal, hhorizontal, hh⟩ + · have hvA : v ∈ A := Finset.mem_sdiff.mpr ⟨hvC, hvP⟩ + refine ⟨f v, Finset.mem_insert_of_mem + (Finset.mem_insert_of_mem (Finset.mem_image_of_mem f hvA)), ?_⟩ + exact Classical.choose_spec + (exceptional_resource_has_line σ M b Y X hcop i v) w hw hve + +theorem finite_inside_center_impossible + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (hY : GadgetCoverProperty (Y.image cubeMap)) (i : G) (wp : Point k) + (C : Finset (Vertex (k := k) (cfg).altered)) + (hC : IsCover (hypergraph cfg) C) (hCcard : C.card ≤ Fintype.card F) + (B : Finset (AffineLine F)) + (hforced : forcedPencilVertices cfg B + (Sum.inl (placedPoint σ (M i) (b i) wp)) ⊆ C) + (hdeleted : (B ∩ affinePencil + (Sum.inl (placedPoint σ (M i) (b i) wp))).card ≤ Fintype.card k - 1) : + False := by + obtain ⟨L, hLcard, hvertical, hhorizontal, hcover⟩ := + exists_inside_axis_line_cover σ M b Y X hcop i wp C hC B + have hpositive := finite_deletedPencil_card_pos cfg B + (placedPoint σ (M i) (b i) wp) C hforced hCcard + have hremaining := finite_additional_card_le cfg B + (placedPoint σ (M i) (b i) wp) C hforced hCcard + have hsmall : L.card ≤ Fintype.card k := by omega + have hdirections : (lineThrough none (cubeMap wp)).1 ≠ + (lineThrough (some 0) (cubeMap wp)).1 := by + simp only [lineThrough_direction, ne_eq, reduceCtorEq, not_false_eq_true] + exact hY.not_line_cover_of_distinct_directions L hsmall + hvertical hhorizontal hdirections hcover + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/FiniteOutsideAction.lean b/lean/OAI/Combinatorics/Ryser/Construction/FiniteOutsideAction.lean new file mode 100644 index 0000000000000000000000000000000000000000..9fd701824e20cff6d9227b03e9e0755dc1062c72 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/FiniteOutsideAction.lean @@ -0,0 +1,145 @@ +import OAI.Combinatorics.Ryser.Construction.LabelAction +import OAI.Combinatorics.Ryser.Construction.FiniteSelectionCounting +import OAI.Combinatorics.Ryser.Geometry.AffineJoins + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {k F G : Type*} [instFieldk : Field k] [Field F] +variable [instDecidableEqk : DecidableEq k] [DecidableEq F] [instDecidableEqG : DecidableEq G] +variable [instFintypeF : Fintype F] [instFintypeG : Fintype G] + +def offPencilGroups (data : ConfigurationData k F G) (p : Point F) + (ell : AffineLine F) : Finset G := by + classical + exact Finset.univ.filter (fun i => ∃ w ∈ data.retained, + Incidence (data.base i w) ell ∧ + joinDirection p (data.base i w) ∈ data.altered i) + +@[simp] theorem mem_offPencilGroups (data : ConfigurationData k F G) + (p : Point F) (ell : AffineLine F) (i : G) : + i ∈ offPencilGroups data p ell ↔ ∃ w ∈ data.retained, + Incidence (data.base i w) ell ∧ + joinDirection p (data.base i w) ∈ data.altered i := let _ := instFieldk; let _ := instDecidableEqk; let _ := instDecidableEqG; let _ := instFintypeF; by + classical + simp only [offPencilGroups, Finset.mem_filter, Finset.mem_univ, true_and] + +def OffPencilThin (data : ConfigurationData k F G) (p : Point F) : Prop := + ∀ ell : AffineLine F, ¬ Incidence p ell → + (offPencilGroups data p ell).card ≤ 5 + +theorem joinDirection_mem_altered_of_incident_line + (data : ConfigurationData k F G) (i : G) (p : Point F) (w : Point k) + (ell : AffineLine F) (hne : p ≠ data.base i w) + (hp : Incidence p ell) (hw : Incidence (data.base i w) ell) + (hd : ell.1 ∈ data.altered i) : + joinDirection p (data.base i w) ∈ data.altered i := let _ := instFieldk; let _ := instDecidableEqk; let _ := instDecidableEqG; let _ := instFintypeF; let _ := instFintypeG; by + have hdir := congrArg Prod.fst (eq_joinLine_of_incidence hne hp hw) + change ell.1 = joinDirection p (data.base i w) at hdir + rw [← hdir] + exact hd + +theorem ordinaryVertex_notMem_exceptionalEdge_of_altered_join + (data : ConfigurationData k F G) (p : Point F) (i : G) (w : Point k) + (hne : p ≠ data.base i w) + (hjoin : joinDirection p (data.base i w) ∈ data.altered i) + (ell : AffineLine F) (hp : Incidence p ell) : + ordinaryVertex data ell ∉ exceptionalEdge data i w := let _ := instFintypeG; by + intro hhit + obtain ⟨hunaltered, hw⟩ := + (ordinaryVertex_mem_exceptionalEdge_iff data i w ell).mp hhit + have hdir := congrArg Prod.fst (eq_joinLine_of_incidence hne hp hw) + change ell.1 = joinDirection p (data.base i w) at hdir + apply hunaltered + rw [hdir] + exact hjoin + +open scoped Classical + +theorem selectedPositions_hit_card_le_five + (data : ConfigurationData k F G) (p : Point F) + (I : Finset G) (lines : G → AffineLine F) (S : G → Finset (Point k)) + (hbase : ∀ i, Function.Injective (data.base i)) + (hretained : ∀ i ∈ I, S i ⊆ data.retained) + (houtside : ∀ i ∈ I, ∀ w ∈ S i, p ≠ data.base i w) + (hthrough : ∀ i ∈ I, Incidence p (lines i)) + (haltered : ∀ i ∈ I, (lines i).1 ∈ data.altered i) + (honlines : ∀ i ∈ I, ∀ w ∈ S i, Incidence (data.base i w) (lines i)) + (hsize : ∀ i, (S i).card ≤ 5) (hthin : OffPencilThin data p) + (v : Vertex (k := k) data.altered) : + ((selectedPositions I S).filter + (fun x : G × Point k => v ∈ exceptionalEdge data x.1 x.2)).card ≤ 5 := by + classical + cases v with + | inl ell => + change ((selectedPositions I S).filter + (fun x : G × Point k => ordinaryVertex data ell ∈ exceptionalEdge data x.1 x.2)).card ≤ 5 + let E := (selectedPositions I S).filter + (fun x : G × Point k => ordinaryVertex data ell ∈ exceptionalEdge data x.1 x.2) + change E.card ≤ 5 + by_cases hp : Incidence p ell + · have hempty : E = ∅ := by + apply Finset.eq_empty_iff_forall_notMem.mpr + intro x hx + obtain ⟨hxS, hxhit⟩ := Finset.mem_filter.mp hx + obtain ⟨hi, hw⟩ := mem_selectedPositions.mp hxS + have hjoin := joinDirection_mem_altered_of_incident_line data x.1 p x.2 + (lines x.1) (houtside x.1 hi x.2 hw) (hthrough x.1 hi) + (honlines x.1 hi x.2 hw) (haltered x.1 hi) + exact ordinaryVertex_notMem_exceptionalEdge_of_altered_join data p x.1 x.2 + (houtside x.1 hi x.2 hw) hjoin ell hp hxhit + simp only [hempty, Finset.card_empty, Nat.zero_le] + · have hone : ∀ (i : G) (w z : Point k), + (i, w) ∈ E → (i, z) ∈ E → w = z := by + intro i w z hw hz + obtain ⟨hwS, hwhit⟩ := Finset.mem_filter.mp hw + obtain ⟨hzS, hzhit⟩ := Finset.mem_filter.mp hz + obtain ⟨hi, hwsel⟩ := mem_selectedPositions.mp hwS + have hzsel := (mem_selectedPositions.mp hzS).2 + have hne : ell ≠ lines i := by + intro heq + apply hp + rw [heq] + exact hthrough i hi + apply hbase i + exact eq_of_common_incidence_of_ne_lines hne + ((ordinaryVertex_mem_exceptionalEdge_iff data i w ell).mp hwhit).2 + (honlines i hi w hwsel) + ((ordinaryVertex_mem_exceptionalEdge_iff data i z ell).mp hzhit).2 + (honlines i hi z hzsel) + have hgroups : E.image Prod.fst ⊆ offPencilGroups data p ell := by + intro i hi + obtain ⟨x, hx, rfl⟩ := Finset.mem_image.mp hi + obtain ⟨hxS, hxhit⟩ := Finset.mem_filter.mp hx + obtain ⟨hi, hw⟩ := mem_selectedPositions.mp hxS + apply (mem_offPencilGroups data p ell x.1).mpr + refine ⟨x.2, hretained x.1 hi hw, + ((ordinaryVertex_mem_exceptionalEdge_iff data x.1 x.2 ell).mp hxhit).2, ?_⟩ + exact joinDirection_mem_altered_of_incident_line data x.1 p x.2 + (lines x.1) (houtside x.1 hi x.2 hw) (hthrough x.1 hi) + (honlines x.1 hi x.2 hw) (haltered x.1 hi) + calc + E.card = (E.image Prod.fst).card := + card_eq_card_image_fst_of_one_per_group E hone + _ ≤ (offPencilGroups data p ell).card := Finset.card_le_card hgroups + _ ≤ 5 := hthin ell hp + | inr label => + rcases label with ⟨i, d, c⟩ + change ((selectedPositions I S).filter + (fun x : G × Point k => specialVertex data i d c ∈ exceptionalEdge data x.1 x.2)).card ≤ 5 + apply card_le_five_of_subset_selectedPositions_one_group I S _ i + · exact Finset.filter_subset _ _ + · intro x hx + by_contra hxi + exact specialVertex_notMem_exceptionalEdge_of_ne data i x.1 (Ne.symm hxi) + x.2 d c (Finset.mem_filter.mp hx).2 + · exact hsize i + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/FiniteOutsideCover.lean b/lean/OAI/Combinatorics/Ryser/Construction/FiniteOutsideCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..904e6442e34cf41f3fca4db680bd678dd4496b7e --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/FiniteOutsideCover.lean @@ -0,0 +1,145 @@ +import OAI.Combinatorics.Ryser.Construction.FiniteOutsideAction +import OAI.Combinatorics.Ryser.Construction.CoverCounting +import OAI.Combinatorics.Ryser.Construction.CoverBudget +import OAI.Combinatorics.Ryser.Construction.DeletionUnionOutside + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {k F G : Type*} [Field k] [Field F] +variable [DecidableEq k] [DecidableEq F] [DecidableEq G] +variable [Fintype F] [Fintype G] + +theorem not_isCover_of_finite_outside_lines + (data : ConfigurationData k F G) (B : Finset (AffineLine F)) + (p : Point F) (I : Finset G) (lines : G → AffineLine F) + (hbase : ∀ i, Function.Injective (data.base i)) + (houtside : ∀ i w, p ≠ data.base i w) + (hthrough : ∀ i ∈ I, Incidence p (lines i)) + (haltered : ∀ i ∈ I, (lines i).1 ∈ data.altered i) + (hdensity : ∀ i ∈ I, + 5 ≤ (data.retained.filter (fun w => Incidence (data.base i w) (lines i))).card) + (hIcard : I.card = (B ∩ affinePencil (Sum.inl p)).card) + (hthin : OffPencilThin data p) + (C : Finset (Vertex (k := k) data.altered)) + (hforced : forcedPencilVertices data B (Sum.inl p) ⊆ C) + (hCcard : C.card ≤ Fintype.card F) : + ¬ IsCover (hypergraph data) C := by + classical + intro hC + obtain ⟨S, hS, hSout⟩ := exists_five_selection I + (fun i => data.retained.filter (fun w => Incidence (data.base i w) (lines i))) + hdensity + have hretained : ∀ i ∈ I, S i ⊆ data.retained := by + intro i hi w hw + exact (Finset.mem_filter.mp ((hS i hi).1 hw)).1 + have honlines : ∀ i ∈ I, ∀ w ∈ S i, Incidence (data.base i w) (lines i) := by + intro i hi w hw + exact (Finset.mem_filter.mp ((hS i hi).1 hw)).2 + have hselectedOutside : ∀ i ∈ I, ∀ w ∈ S i, p ≠ data.base i w := by + intro i _ w _ + exact houtside i w + have hsize : ∀ i, (S i).card ≤ 5 := by + intro i + by_cases hi : i ∈ I + · exact (hS i hi).2.le + · rw [hSout i hi, Finset.card_empty] + exact Nat.zero_le _ + let E := selectedPositions I S + let R := C \ forcedPencilVertices data B (Sum.inl p) + have hnotForced : ∀ x ∈ E, ∀ v ∈ exceptionalEdge data x.1 x.2, + v ∉ forcedPencilVertices data B (Sum.inl p) := by + intro x hx v hv hvforced + obtain ⟨hi, hw⟩ := mem_selectedPositions.mp hx + obtain ⟨ell, hell, rfl⟩ := Finset.mem_image.mp hvforced + have hpell : Incidence p ell := + (mem_affinePencil (Sum.inl p) ell).mp (Finset.mem_sdiff.mp hell).1 + have hjoin := joinDirection_mem_altered_of_incident_line data x.1 p x.2 + (lines x.1) (houtside x.1 x.2) (hthrough x.1 hi) + (honlines x.1 hi x.2 hw) (haltered x.1 hi) + exact ordinaryVertex_notMem_exceptionalEdge_of_altered_join data p x.1 x.2 + (houtside x.1 x.2) hjoin ell hpell hv + have hcover : ∀ x ∈ E, ∃ v ∈ R, v ∈ exceptionalEdge data x.1 x.2 := by + intro x hx + obtain ⟨hi, hw⟩ := mem_selectedPositions.mp hx + have hedge : exceptionalEdge data x.1 x.2 ∈ hypergraph data := + (mem_hypergraph data _).mpr (Or.inr ⟨x.1, x.2, hretained x.1 hi hw, rfl⟩) + obtain ⟨v, hvC, hv⟩ := hC _ hedge + exact ⟨v, Finset.mem_sdiff.mpr ⟨hvC, hnotForced x hx v hv⟩, hv⟩ + have hcapacity : ∀ v ∈ R, + (E.filter (fun x => v ∈ exceptionalEdge data x.1 x.2)).card ≤ 5 := by + intro v _ + exact selectedPositions_hit_card_le_five data p I lines S hbase hretained + hselectedOutside hthrough haltered honlines hsize hthin v + have hcount : E.card ≤ 5 * R.card := + card_le_mul_resource_card E R + (fun v x => v ∈ exceptionalEdge data x.1 x.2) 5 hcover hcapacity + have hEcard : E.card = 5 * I.card := + card_selectedPositions I S 5 (fun i hi => (hS i hi).2) + have hpositive : 0 < I.card := by + rw [hIcard] + exact finite_deletedPencil_card_pos data B p C hforced hCcard + have hbudget : R.card ≤ I.card - 1 := by + rw [hIcard] + exact finite_additional_card_le data B p C hforced hCcard + omega + +variable [Fintype k] + +theorem not_isCover_of_finite_outside_placedSubplanes + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (a : GadgetOutcome k) (ha : OriginalLineDensity a) + (hsep : DeletionSeparated σ M b a) + (data : ConfigurationData k F G) + (hdataBase : ∀ i, data.base i = placedPoint σ (M i) (b i)) + (hdataAltered : ∀ i, data.altered i = alteredDirections σ (M i)) + (hdataRetained : data.retained = retainedPoints a) + (p : Point F) (hout : ∀ i, p ∉ placedSubplane σ (M i) (b i)) + (hthin : OffPencilThin data p) + (C : Finset (Vertex (k := k) data.altered)) + (hforced : forcedPencilVertices data (allDeletedLines σ M b a) (Sum.inl p) ⊆ C) + (hCcard : C.card ≤ Fintype.card F) : + ¬ IsCover (hypergraph data) C := by + classical + let I := activeDeletionGroups σ M b a p + let lines : G → AffineLine F := fun i => + if hi : i ∈ I then activeDeletionLine σ M b a p ⟨i, hi⟩ else (none, 0) + have hline (i : G) (hi : i ∈ I) : + lines i = activeDeletionLine σ M b a p ⟨i, hi⟩ := by + simp only [lines, dite_eq_left hi] + apply not_isCover_of_finite_outside_lines data (allDeletedLines σ M b a) + p I lines + · intro i + rw [hdataBase i] + exact placedPoint_injective σ (M i) (b i) + · intro i w + rw [hdataBase i] + intro hpw + exact hout i ((mem_placedSubplane_iff σ (M i) (b i) p).mpr ⟨w, hpw.symm⟩) + · intro i hi + rw [hline i hi] + exact incidence_activeDeletionLine σ M b a p ⟨i, hi⟩ + · intro i hi + rw [hline i hi, hdataAltered i] + exact ((mem_deletedLines σ (M i) (b i) a _).mp + (activeDeletionLine_mem σ M b a p ⟨i, hi⟩)).1 + · intro i hi + rw [hdataRetained, hdataBase i, hline i hi] + have hd := activeDeletionLine_many_placedRetainedPoints σ M b a p ha ⟨i, hi⟩ + rw [Finset.filter_image, + Finset.card_image_of_injective _ (placedPoint_injective σ (M i) (b i))] at hd + exact hd + · exact (card_allDeletedLines_inter_affinePencil_eq_card_activeDeletionGroups + σ M b a p hsep hout).symm + · exact hthin + · exact hforced + · exact hCcard + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/FiniteSelectionCounting.lean b/lean/OAI/Combinatorics/Ryser/Construction/FiniteSelectionCounting.lean new file mode 100644 index 0000000000000000000000000000000000000000..77e387265507f8e0101deff61bd3b293c294a738 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/FiniteSelectionCounting.lean @@ -0,0 +1,120 @@ +import Mathlib.Algebra.BigOperators.Group.Finset.Basic + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +open scoped BigOperators + +variable {G P : Type*} + +theorem exists_selection_card_eq + (I : Finset G) (W : G → Finset P) (n : ℕ) + (hW : ∀ i ∈ I, n ≤ (W i).card) : + ∃ S : G → Finset P, + (∀ i ∈ I, S i ⊆ W i ∧ (S i).card = n) ∧ + (∀ i ∉ I, S i = ∅) := by + classical + have hchoose (i : G) (hi : i ∈ I) : + ∃ T : Finset P, T ⊆ W i ∧ T.card = n := + Finset.exists_subset_card_eq (hW i hi) + let S : G → Finset P := fun i => + if hi : i ∈ I then Classical.choose (hchoose i hi) else ∅ + refine ⟨S, ?_, ?_⟩ + · intro i hi + simpa only [S, dite_eq_left hi] using Classical.choose_spec (hchoose i hi) + · intro i hi + simp only [S, dite_eq_right hi] + +theorem exists_five_selection + (I : Finset G) (W : G → Finset P) + (hW : ∀ i ∈ I, 5 ≤ (W i).card) : + ∃ S : G → Finset P, + (∀ i ∈ I, S i ⊆ W i ∧ (S i).card = 5) ∧ + (∀ i ∉ I, S i = ∅) := + exists_selection_card_eq I W 5 hW + +variable [DecidableEq G] [instDecidableEqP : DecidableEq P] + +def selectedPositions (I : Finset G) (S : G → Finset P) : Finset (G × P) := + I.biUnion (fun i => (S i).image (fun w => (i, w))) + +@[simp] theorem mem_selectedPositions + {I : Finset G} {S : G → Finset P} {x : G × P} : + x ∈ selectedPositions I S ↔ x.1 ∈ I ∧ x.2 ∈ S x.1 := by + rcases x with ⟨i, w⟩ + simp [selectedPositions] + +theorem card_selectedPositions_eq_sum (I : Finset G) (S : G → Finset P) : + (selectedPositions I S).card = ∑ i ∈ I, (S i).card := by + have hdisjoint : (I : Set G).PairwiseDisjoint + (fun i => (S i).image (fun w => (i, w))) := by + intro i hi j hj hij + apply Finset.disjoint_left.mpr + intro x hx hy + obtain ⟨w, _, hx⟩ := Finset.mem_image.mp hx + obtain ⟨z, _, hy⟩ := Finset.mem_image.mp hy + exact hij ((congrArg Prod.fst hx).trans (congrArg Prod.fst hy).symm) + calc + (selectedPositions I S).card = + ∑ i ∈ I, ((S i).image (fun w => (i, w))).card := + Finset.card_biUnion hdisjoint + _ = ∑ i ∈ I, (S i).card := by + apply Finset.sum_congr rfl + intro i hi + exact Finset.card_image_of_injective _ + (fun w z hwz => congrArg Prod.snd hwz) + +theorem card_selectedPositions (I : Finset G) (S : G → Finset P) (n : ℕ) + (hS : ∀ i ∈ I, (S i).card = n) : + (selectedPositions I S).card = n * I.card := by + calc + (selectedPositions I S).card = ∑ i ∈ I, (S i).card := + card_selectedPositions_eq_sum I S + _ = I.card * n := Finset.sum_const_nat hS + _ = n * I.card := Nat.mul_comm _ _ + +theorem card_eq_card_image_fst_of_one_per_group + (E : Finset (G × P)) + (hE : ∀ (i : G) (w z : P), (i, w) ∈ E → (i, z) ∈ E → w = z) : + E.card = (E.image Prod.fst).card := let _ := instDecidableEqP; by + symm + apply Finset.card_image_of_injOn + intro x hx y hy hxy + rcases x with ⟨i, w⟩ + rcases y with ⟨j, z⟩ + change i = j at hxy + subst j + exact congrArg (fun p : P => (i, p)) (hE i w z hx hy) + +theorem card_le_card_image_fst_of_one_per_group + (E : Finset (G × P)) + (hE : ∀ (i : G) (w z : P), (i, w) ∈ E → (i, z) ∈ E → w = z) : + E.card ≤ (E.image Prod.fst).card := + (card_eq_card_image_fst_of_one_per_group E hE).le + +theorem card_le_selected_group_of_subset + (I : Finset G) (S : G → Finset P) (E : Finset (G × P)) (i : G) + (hE : E ⊆ selectedPositions I S) + (hgroup : ∀ x ∈ E, x.1 = i) : + E.card ≤ (S i).card := by + apply Finset.card_le_card_of_injOn Prod.snd + · intro x hx + change x.2 ∈ S i + have hs : x.2 ∈ S x.1 := (mem_selectedPositions.mp (hE hx)).2 + rw [hgroup x hx] at hs + exact hs + · intro x hx y hy hxy + exact Prod.ext ((hgroup x hx).trans (hgroup y hy).symm) hxy + +theorem card_le_five_of_subset_selectedPositions_one_group + (I : Finset G) (S : G → Finset P) (E : Finset (G × P)) (i : G) + (hE : E ⊆ selectedPositions I S) + (hgroup : ∀ x ∈ E, x.1 = i) + (hS : (S i).card ≤ 5) : + E.card ≤ 5 := + (card_le_selected_group_of_subset I S E i hE hgroup).trans hS + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/GadgetAlgebra.lean b/lean/OAI/Combinatorics/Ryser/Construction/GadgetAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..44452cd647ff3740272adf782caf79c4f7d243fa --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/GadgetAlgebra.lean @@ -0,0 +1,275 @@ +import OAI.Combinatorics.Ryser.Geometry.Basic +import Mathlib.Algebra.Field.ZMod +import Mathlib.Algebra.GroupWithZero.Units.Fintype +import Mathlib.Algebra.Polynomial.Roots +import Mathlib.GroupTheory.OrderOfElement +import Mathlib.Tactic.Ring +import Lean.Elab.Tactic.Omega + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {F : Type*} [Field F] + +def cubeMap (p : Point F) : Point F := (p.1 ^ 3, p.2) + +def cubicPoint (d z x : F) : Point F := (x ^ 3, d * x + z) + +theorem cubicPoint_injective (d z : F) (hd : d ≠ 0) : + Function.Injective (cubicPoint d z) := by + intro x y h + exact mul_left_cancel₀ hd (add_right_cancel (congrArg Prod.snd h)) + +variable [instFintypeF : Fintype F] + +theorem cube_bijective (h : Nat.Coprime 3 (Fintype.card F - 1)) : + Function.Bijective (fun x : F => x ^ 3) := by + classical + have hU : (Nat.card Fˣ).Coprime 3 := by + rw [Nat.card_units, Nat.card_eq_fintype_card] + exact h.symm + have hpow : Function.Bijective (fun u : Fˣ => u ^ 3) := + Nat.Coprime.pow_left_bijective hU + apply Function.Surjective.bijective_of_finite + intro y + by_cases hy : y = 0 + · subst y + exact ⟨0, by simp⟩ + · obtain ⟨u, hu⟩ := hpow.surjective (Units.mk0 y hy) + refine ⟨(u : F), ?_⟩ + simpa only [Units.val_pow_eq_pow_val, Units.val_mk0] using + congrArg (fun v : Fˣ => (v : F)) hu + +theorem cubeMap_bijective (h : Nat.Coprime 3 (Fintype.card F - 1)) : + Function.Bijective (cubeMap : Point F → Point F) := by + have hc := cube_bijective h + constructor + · intro p q hpq + have hx := congrArg (fun r : Point F => r.1) hpq + have hy := congrArg (fun r : Point F => r.2) hpq + exact Prod.ext (hc.injective hx) hy + · rintro ⟨x, y⟩ + obtain ⟨z, hz⟩ := hc.surjective x + exact ⟨(z, y), Prod.ext hz rfl⟩ + +theorem cubeMap_vertical_iff (h : Nat.Coprime 3 (Fintype.card F - 1)) + (p : Point F) (b : F) : + Incidence (cubeMap p) (none, b ^ 3) ↔ Incidence p (none, b) := by + change p.1 ^ 3 = b ^ 3 ↔ p.1 = b + constructor + · intro hp + exact (cube_bijective h).injective hp + · intro hp + rw [hp] + +theorem cubeMap_horizontal_iff (p : Point F) (b : F) : + Incidence (cubeMap p) (some 0, b) ↔ Incidence p (some 0, b) := let _ := instFintypeF; by + change p.2 - 0 * p.1 ^ 3 = b ↔ p.2 - 0 * p.1 = b + simp + +variable [instDecidableEqF : DecidableEq F] + +def cubicShape (d z : F) : Finset (Point F) := + Finset.univ.image (cubicPoint d z) + +@[simp] theorem mem_cubicShape {d z : F} {p : Point F} : + p ∈ cubicShape d z ↔ ∃ x, cubicPoint d z x = p := by + simp [cubicShape] + +theorem cubicShape_card (d z : F) (hd : d ≠ 0) : + (cubicShape d z).card = Fintype.card F := by + rw [cubicShape, Finset.card_image_of_injective _ (cubicPoint_injective d z hd), + Finset.card_univ] + +theorem cubicShape_eq_image_linePoints (d z : F) : + cubicShape d z = (linePoints (some d, z)).image cubeMap := by + ext p + constructor + · intro hp + obtain ⟨x, rfl⟩ := mem_cubicShape.mp hp + refine Finset.mem_image.mpr ⟨(x, d * x + z), ?_, rfl⟩ + apply (mem_linePoints _ _).mpr + change d * x + z - d * x = z + ring + · intro hp + obtain ⟨q, hq, rfl⟩ := Finset.mem_image.mp hp + refine mem_cubicShape.mpr ⟨q.1, ?_⟩ + apply Prod.ext + · rfl + · have hq' : q.2 - d * q.1 = z := (mem_linePoints _ _).mp hq + change d * q.1 + z = q.2 + simpa [add_comm] using (sub_eq_iff_eq_add.mp hq').symm + +theorem cubeMap_image_vertical (h : Nat.Coprime 3 (Fintype.card F - 1)) (b : F) : + (linePoints (none, b)).image cubeMap = linePoints (none, b ^ 3) := by + ext p + constructor + · intro hp + obtain ⟨q, hq, rfl⟩ := Finset.mem_image.mp hp + exact (mem_linePoints _ _).mpr ((cubeMap_vertical_iff h q b).2 + ((mem_linePoints _ _).mp hq)) + · intro hp + obtain ⟨q, rfl⟩ := (cubeMap_bijective h).surjective p + exact Finset.mem_image.mpr + ⟨q, (mem_linePoints _ _).mpr ((cubeMap_vertical_iff h q b).1 + ((mem_linePoints _ _).mp hp)), rfl⟩ + +theorem cubeMap_image_horizontal (h : Nat.Coprime 3 (Fintype.card F - 1)) (b : F) : + (linePoints (some 0, b)).image cubeMap = linePoints (some 0, b) := by + ext p + constructor + · intro hp + obtain ⟨q, hq, rfl⟩ := Finset.mem_image.mp hp + exact (mem_linePoints _ _).mpr ((cubeMap_horizontal_iff q b).2 + ((mem_linePoints _ _).mp hq)) + · intro hp + obtain ⟨q, rfl⟩ := (cubeMap_bijective h).surjective p + exact Finset.mem_image.mpr + ⟨q, (mem_linePoints _ _).mpr ((cubeMap_horizontal_iff q b).1 + ((mem_linePoints _ _).mp hp)), rfl⟩ + +open Polynomial + +def cubicLinePolynomial (d z : F) : AffineLine F → F[X] + | (none, b) => X ^ 3 - C b + | (some m, b) => C d * X + C z - C m * X ^ 3 - C b + +theorem eval_cubicLinePolynomial_eq_zero_iff (d z : F) (l : AffineLine F) (x : F) : + (cubicLinePolynomial d z l).eval x = 0 ↔ Incidence (cubicPoint d z x) l := let _ := instFintypeF; let _ := instDecidableEqF; by + obtain ⟨a, b⟩ := l + cases a <;> + simp [cubicLinePolynomial, cubicPoint, Incidence, projection, sub_eq_zero] + +theorem cubicLinePolynomial_ne_zero (d z : F) (hd : d ≠ 0) (l : AffineLine F) : + cubicLinePolynomial d z l ≠ 0 := let _ := instFintypeF; let _ := instDecidableEqF; by + obtain ⟨a, b⟩ := l + cases a with + | none => + intro hp + have hc := congrArg (fun p : F[X] => p.coeff 3) hp + exact (one_ne_zero : (1 : F) ≠ 0) + (by simp [cubicLinePolynomial, coeff_X_pow] at hc) + | some m => + intro hp + have hc := congrArg (fun p : F[X] => p.coeff 1) hp + exact hd (by simpa [cubicLinePolynomial, coeff_X_pow] using hc) + +theorem cubicLinePolynomial_natDegree_le (d z : F) (l : AffineLine F) : + (cubicLinePolynomial d z l).natDegree ≤ 3 := let _ := instFintypeF; let _ := instDecidableEqF; by + apply Polynomial.natDegree_le_iff_coeff_eq_zero.mpr + intro n hn + have hn0 : n ≠ 0 := by omega + have hn1 : n ≠ 1 := by omega + have hn3 : n ≠ 3 := by omega + obtain ⟨a, b⟩ := l + cases a <;> + simp [cubicLinePolynomial, coeff_X_pow, coeff_C, coeff_X, + hn0, Ne.symm hn1, hn3] + +theorem cubicShape_filter_incidence_card_le (d z : F) (hd : d ≠ 0) + (l : AffineLine F) : + ((cubicShape d z).filter (fun p => Incidence p l)).card ≤ 3 := by + have hcount : + (Finset.univ.filter (fun x => Incidence (cubicPoint d z x) l)).card ≤ + (cubicLinePolynomial d z l).natDegree := by + apply Polynomial.card_le_degree_of_subset_roots + intro x hx + exact (Polynomial.mem_roots (cubicLinePolynomial_ne_zero d z hd l)).2 + ((eval_cubicLinePolynomial_eq_zero_iff d z l x).2 (Finset.mem_filter.mp hx).2) + rw [cubicShape, Finset.filter_image] + exact (Finset.card_image_le.trans hcount).trans (cubicLinePolynomial_natDegree_le d z l) + +theorem cubicShape_inter_linePoints_card_le (d z : F) (hd : d ≠ 0) + (l : AffineLine F) : + (cubicShape d z ∩ linePoints l).card ≤ 3 := by + have heq : cubicShape d z ∩ linePoints l = + (cubicShape d z).filter (fun p => Incidence p l) := by + ext p + simp + rw [heq] + exact cubicShape_filter_incidence_card_le d z hd l + +theorem cubicShape_ne_linePoints (d z : F) (hd : d ≠ 0) + (hcard : 3 < Fintype.card F) (l : AffineLine F) : + cubicShape d z ≠ linePoints l := by + intro heq + have hall : (cubicShape d z).filter (fun p => Incidence p l) = cubicShape d z := by + apply Finset.filter_eq_self.mpr + intro p hp + exact (mem_linePoints _ _).mp (heq ▸ hp) + have hle := cubicShape_filter_incidence_card_le d z hd l + rw [hall, cubicShape_card d z hd] at hle + exact (not_le_of_gt hcard) hle + +theorem cubicShape_injective (h : Nat.Coprime 3 (Fintype.card F - 1)) : + Function.Injective (fun dz : F × F => cubicShape dz.1 dz.2) := by + intro a b hab + change cubicShape a.1 a.2 = cubicShape b.1 b.2 at hab + have heval : ∀ x, a.1 * x + a.2 = b.1 * x + b.2 := by + intro x + have hm : cubicPoint a.1 a.2 x ∈ cubicShape b.1 b.2 := by + rw [← hab] + exact mem_cubicShape.mpr ⟨x, rfl⟩ + obtain ⟨y, hy⟩ := mem_cubicShape.mp hm + have hyx : y = x := (cube_bijective h).injective (congrArg Prod.fst hy) + subst y + exact (congrArg Prod.snd hy).symm + have hz : a.2 = b.2 := by simpa using heval 0 + have hd : a.1 = b.1 := by + have h1 := heval 1 + simp only [mul_one] at h1 + rw [hz] at h1 + exact add_right_cancel h1 + exact Prod.ext hd hz + +theorem cubicShape_intercept_unique (h : Nat.Coprime 3 (Fintype.card F - 1)) + (d : F) (p : Point F) : ∃! z, p ∈ cubicShape d z := by + obtain ⟨x, hx⟩ := (cube_bijective h).surjective p.1 + refine ⟨p.2 - d * x, ?_, ?_⟩ + · refine mem_cubicShape.mpr ⟨x, ?_⟩ + apply Prod.ext + · exact hx + · change d * x + (p.2 - d * x) = p.2 + ring + · intro z hz + obtain ⟨y, hy⟩ := mem_cubicShape.mp hz + have hyx : y = x := + (cube_bijective h).injective ((congrArg Prod.fst hy).trans hx.symm) + subst y + apply eq_sub_iff_add_eq.mpr + simpa [cubicPoint, add_comm] using congrArg Prod.snd hy + +theorem cubicShape_intercept_card (h : Nat.Coprime 3 (Fintype.card F - 1)) + (d : F) (p : Point F) : + (Finset.univ.filter (fun z => p ∈ cubicShape d z)).card = 1 := by + obtain ⟨z, hz, hu⟩ := cubicShape_intercept_unique h d p + apply Finset.card_eq_one.mpr + refine ⟨z, ?_⟩ + ext w + simp only [Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_singleton] + exact ⟨hu w, fun hw => hw ▸ hz⟩ + +theorem coprime_three_zmod_card_sub_one {p : ℕ} [Fact p.Prime] (hpmod : p % 3 = 2) : + Nat.Coprime 3 (Fintype.card (ZMod p) - 1) := by + rw [ZMod.card] + apply Nat.prime_three.coprime_iff_not_dvd.mpr + intro hd + have hz := Nat.mod_eq_zero_of_dvd hd + omega + +theorem cube_bijective_zmod {p : ℕ} [Fact p.Prime] (hpmod : p % 3 = 2) : + Function.Bijective (fun x : ZMod p => x ^ 3) := + cube_bijective (coprime_three_zmod_card_sub_one hpmod) + +theorem cubeMap_bijective_zmod {p : ℕ} [Fact p.Prime] (hpmod : p % 3 = 2) : + Function.Bijective (cubeMap : Point (ZMod p) → Point (ZMod p)) := + cubeMap_bijective (coprime_three_zmod_card_sub_one hpmod) + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/GadgetConcentration.lean b/lean/OAI/Combinatorics/Ryser/Construction/GadgetConcentration.lean new file mode 100644 index 0000000000000000000000000000000000000000..02a6c59561911323c312a91b025acceac8dd96a6 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/GadgetConcentration.lean @@ -0,0 +1,91 @@ +import OAI.Combinatorics.Ryser.Probability.Concentration +import OAI.Combinatorics.Ryser.Probability.Product +import Mathlib.Data.Fintype.EquivFin + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +open scoped BigOperators + +variable (I Ω : Type*) [Fintype I] + +def finCoordinateEquiv : (Fin (Fintype.card I) → Ω) ≃ (I → Ω) where + toFun w i := w (Fintype.equivFin I i) + invFun a j := a ((Fintype.equivFin I).symm j) + left_inv w := by + funext j + simp + right_inv a := by + funext i + simp + +theorem finCoordinateEquiv_update [DecidableEq I] + (w : Fin (Fintype.card I) → Ω) (j : Fin (Fintype.card I)) (x : Ω) : + finCoordinateEquiv I Ω (Function.update w j x) = + Function.update (finCoordinateEquiv I Ω w) ((Fintype.equivFin I).symm j) x := by + funext i + change Function.update w j x (Fintype.equivFin I i) = + Function.update (fun i => w (Fintype.equivFin I i)) ((Fintype.equivFin I).symm j) x i + by_cases hi : i = (Fintype.equivFin I).symm j + · subst i + simp + · have hij : Fintype.equivFin I i ≠ j := by + intro h + apply hi + have h' := congrArg (Fintype.equivFin I).symm h + simpa only [Equiv.symm_apply_apply] using h' + simp [Function.update, hi, hij] + +variable {I Ω} [DecidableEq I] [Fintype Ω] [Nonempty Ω] + +theorem uniform_coordinate_concentration + (f : (I → Ω) → ℝ) (c M V u : ℝ) + (hM : 0 < M) (hV : 0 < V) (hu : 0 < u) + (hcoord : ∀ i w x, |f (Function.update w i x) - f w| ≤ c) + (hcM : c ≤ M) (hcV : (Fintype.card I : ℝ) * c ^ 2 ≤ V) : + (FiniteLaw.uniform (I → Ω)).prob + (fun w => u ≤ |f w - (FiniteLaw.uniform (I → Ω)).expectation f|) ≤ + 2 * Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := by + have hcoord' : ∀ (j : Fin (Fintype.card I)) (w : Fin (Fintype.card I) → Ω) x, + |f (finCoordinateEquiv I Ω (Function.update w j x)) - + f (finCoordinateEquiv I Ω w)| ≤ c := by + intro j w x + rw [finCoordinateEquiv_update] + exact hcoord _ _ _ + have h := Concentration.coordinate_concentration (Fintype.card I) + (fun _ => FiniteLaw.uniform Ω) (fun w => f (finCoordinateEquiv I Ω w)) + (fun _ => c) M V u hM hV hu hcoord' (fun _ => hcM) (by simpa using hcV) + have hmean : + (FiniteLaw.pi (fun _ : Fin (Fintype.card I) => FiniteLaw.uniform Ω)).expectation + (fun w => f (finCoordinateEquiv I Ω w)) = + (FiniteLaw.uniform (I → Ω)).expectation f := by + rw [FiniteLaw.pi_uniform] + calc + _ = ((FiniteLaw.uniform (Fin (Fintype.card I) → Ω)).map + (finCoordinateEquiv I Ω)).expectation f := + (FiniteLaw.expectation_map _ _ _).symm + _ = _ := by rw [FiniteLaw.map_uniform_equiv] + rw [hmean, FiniteLaw.pi_uniform] at h + have hprob : + (FiniteLaw.uniform (Fin (Fintype.card I) → Ω)).prob + (fun w => u ≤ |f (finCoordinateEquiv I Ω w) - + (FiniteLaw.uniform (I → Ω)).expectation f|) = + (FiniteLaw.uniform (I → Ω)).prob + (fun w => u ≤ |f w - (FiniteLaw.uniform (I → Ω)).expectation f|) := by + calc + _ = ((FiniteLaw.uniform (Fin (Fintype.card I) → Ω)).map + (finCoordinateEquiv I Ω)).prob + (fun w => u ≤ |f w - (FiniteLaw.uniform (I → Ω)).expectation f|) := + (FiniteLaw.prob_map _ _ _).symm + _ = _ := by rw [FiniteLaw.map_uniform_equiv] + rw [hprob] at h + exact h + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/GadgetConsequences.lean b/lean/OAI/Combinatorics/Ryser/Construction/GadgetConsequences.lean new file mode 100644 index 0000000000000000000000000000000000000000..89485229902704381bc8a44fcecbafb17d58b87d --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/GadgetConsequences.lean @@ -0,0 +1,98 @@ +import OAI.Combinatorics.Ryser.Construction.GadgetCover + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + +def GadgetCoverProperty (Y : Finset (Point F)) : Prop := + ∀ (B : Finset (Point F)) (L : Finset (AffineLine F)), + (∀ y ∈ Y, y ∈ B ∨ ∃ ell ∈ L, Incidence y ell) → + 2 * L.card + B.card ≤ 2 * Fintype.card F → + ∃ d : Direction F, L = affinePencil (Sum.inr d) ∧ B = ∅ + +theorem gadgetCoverProperty_of_near_pencils + (Y : Finset (Point F)) + (hlarge : 200 < 19 * Fintype.card F) + (hlines : ∀ ell : AffineLine F, + Fintype.card F ≤ 8 * (Y ∩ linePoints ell).card) + (hnear : ∀ (B : Finset (Point F)) (L : Finset (AffineLine F)), + (∀ y ∈ Y, y ∈ B ∨ ∃ ell ∈ L, Incidence y ell) → + 2 * L.card + B.card ≤ 2 * Fintype.card F → + ∃ p : ProjectivePoint F, + 99 * Fintype.card F ≤ 100 * (L ∩ affinePencil p).card) : + GadgetCoverProperty Y := by + intro B L hcover hbudget + exact mixed_cover_eq_parallel_of_near_pencil Y B L hlarge hlines + hcover hbudget (hnear B L hcover hbudget) + +theorem GadgetCoverProperty.weighted_card_lower_bound + {Y : Finset (Point F)} (hY : GadgetCoverProperty Y) + (B : Finset (Point F)) (L : Finset (AffineLine F)) + (hcover : ∀ y ∈ Y, y ∈ B ∨ ∃ ell ∈ L, Incidence y ell) : + 2 * Fintype.card F ≤ 2 * L.card + B.card := by + by_cases hbudget : 2 * L.card + B.card ≤ 2 * Fintype.card F + · obtain ⟨d, hL, hB⟩ := hY B L hcover hbudget + have hcard : L.card = Fintype.card F := by + rw [hL, card_affinePencil_infinite] + have hBcard : B.card = 0 := by rw [hB, Finset.card_empty] + omega + · omega + +theorem GadgetCoverProperty.not_line_cover_of_distinct_directions + {Y : Finset (Point F)} (hY : GadgetCoverProperty Y) + (L : Finset (AffineLine F)) (hcard : L.card ≤ Fintype.card F) + {ell m : AffineLine F} (hell : ell ∈ L) (hm : m ∈ L) + (hdirections : ell.1 ≠ m.1) : + ¬ (∀ y ∈ Y, ∃ l ∈ L, Incidence y l) := by + intro hcover + have hmixed : ∀ y ∈ Y, + y ∈ (∅ : Finset (Point F)) ∨ ∃ l ∈ L, Incidence y l := by + intro y hy + exact Or.inr (hcover y hy) + have hbudget : 2 * L.card + (∅ : Finset (Point F)).card ≤ + 2 * Fintype.card F := by + simpa only [Finset.card_empty, Nat.add_zero] using Nat.mul_le_mul_left 2 hcard + obtain ⟨d, hL, _⟩ := hY ∅ L hmixed hbudget + rw [hL] at hell hm + have hdell : d = ell.1 := (mem_affinePencil (Sum.inr d) ell).mp hell + have hdm : d = m.1 := (mem_affinePencil (Sum.inr d) m).mp hm + exact hdirections (hdell.symm.trans hdm) + +theorem mixed_cover_weighted_card_lower_bound_of_near_pencils + (Y B : Finset (Point F)) (L : Finset (AffineLine F)) + (hlarge : 200 < 19 * Fintype.card F) + (hlines : ∀ ell : AffineLine F, + Fintype.card F ≤ 8 * (Y ∩ linePoints ell).card) + (hnear : ∀ (B : Finset (Point F)) (L : Finset (AffineLine F)), + (∀ y ∈ Y, y ∈ B ∨ ∃ ell ∈ L, Incidence y ell) → + 2 * L.card + B.card ≤ 2 * Fintype.card F → + ∃ p : ProjectivePoint F, + 99 * Fintype.card F ≤ 100 * (L ∩ affinePencil p).card) + (hcover : ∀ y ∈ Y, y ∈ B ∨ ∃ ell ∈ L, Incidence y ell) : + 2 * Fintype.card F ≤ 2 * L.card + B.card := + (gadgetCoverProperty_of_near_pencils Y hlarge hlines hnear).weighted_card_lower_bound + B L hcover + +theorem not_line_cover_of_distinct_directions_of_near_pencils + (Y : Finset (Point F)) (L : Finset (AffineLine F)) + (hlarge : 200 < 19 * Fintype.card F) + (hlines : ∀ ell : AffineLine F, + Fintype.card F ≤ 8 * (Y ∩ linePoints ell).card) + (hnear : ∀ (B : Finset (Point F)) (L : Finset (AffineLine F)), + (∀ y ∈ Y, y ∈ B ∨ ∃ ell ∈ L, Incidence y ell) → + 2 * L.card + B.card ≤ 2 * Fintype.card F → + ∃ p : ProjectivePoint F, + 99 * Fintype.card F ≤ 100 * (L ∩ affinePencil p).card) + (hcard : L.card ≤ Fintype.card F) + {ell m : AffineLine F} (hell : ell ∈ L) (hm : m ∈ L) + (hdirections : ell.1 ≠ m.1) : + ¬ (∀ y ∈ Y, ∃ l ∈ L, Incidence y l) := + GadgetCoverProperty.not_line_cover_of_distinct_directions + (gadgetCoverProperty_of_near_pencils Y hlarge hlines hnear) + L hcard hell hm hdirections + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/GadgetCover.lean b/lean/OAI/Combinatorics/Ryser/Construction/GadgetCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..2eaac119fe0556380b8f9949b78da1d62be877bf --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/GadgetCover.lean @@ -0,0 +1,83 @@ +import OAI.Combinatorics.Ryser.Construction.CoverPencil +import OAI.Combinatorics.Ryser.Geometry.Cardinality +import Lean.Elab.Tactic.Omega + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + +theorem mixed_covered_points_on_missing_pencil_line + (X B : Finset (Point F)) (L : Finset (AffineLine F)) + (p : ProjectivePoint F) (ell : AffineLine F) + (hcover : ∀ x ∈ X, x ∈ B ∨ ∃ l ∈ L, Incidence x l) + (hpell : ProjectiveIncidence p (some ell)) (hell : ell ∉ L) : + (X ∩ linePoints ell).card ≤ 1 + (L \ affinePencil p).card + B.card := by + have hlinecover : ∀ x ∈ X \ B, ∃ l ∈ L, Incidence x l := by + intro x hx + rcases hcover x (Finset.mem_sdiff.mp hx).1 with hxB | hxL + · exact ((Finset.mem_sdiff.mp hx).2 hxB).elim + · exact hxL + have hbound := covered_points_on_missing_pencil_line (X \ B) L p ell + hlinecover hpell hell + have hsub : X ∩ linePoints ell ⊆ ((X \ B) ∩ linePoints ell) ∪ B := by + intro x hx + by_cases hxB : x ∈ B + · exact Finset.mem_union_right _ hxB + · exact Finset.mem_union_left _ (Finset.mem_inter.mpr + ⟨Finset.mem_sdiff.mpr ⟨(Finset.mem_inter.mp hx).1, hxB⟩, + (Finset.mem_inter.mp hx).2⟩) + calc + (X ∩ linePoints ell).card ≤ (((X \ B) ∩ linePoints ell) ∪ B).card := + Finset.card_le_card hsub + _ ≤ ((X \ B) ∩ linePoints ell).card + B.card := Finset.card_union_le _ _ + _ ≤ 1 + (L \ affinePencil p).card + B.card := Nat.add_le_add_right hbound _ + +theorem mixed_cover_eq_parallel_of_near_pencil + (Y B : Finset (Point F)) (L : Finset (AffineLine F)) + (hlarge : 200 < 19 * Fintype.card F) + (hlines : ∀ ell : AffineLine F, + Fintype.card F ≤ 8 * (Y ∩ linePoints ell).card) + (hcover : ∀ y ∈ Y, y ∈ B ∨ ∃ ell ∈ L, Incidence y ell) + (hbudget : 2 * L.card + B.card ≤ 2 * Fintype.card F) + (hnear : ∃ p : ProjectivePoint F, + 99 * Fintype.card F ≤ 100 * (L ∩ affinePencil p).card) : + ∃ d : Direction F, L = affinePencil (Sum.inr d) ∧ B = ∅ := by + obtain ⟨p, hp⟩ := hnear + have hLcard : L.card ≤ Fintype.card F := by omega + have hdecomp := Finset.card_sdiff_add_card_inter L (affinePencil p) + have hforced : affinePencil p ⊆ L := by + intro ell hell + by_contra hmissing + have hpell : ProjectiveIncidence p (some ell) := + (mem_affinePencil _ _).mp hell + have hcount := mixed_covered_points_on_missing_pencil_line Y B L p ell + hcover hpell hmissing + have hlower := hlines ell + omega + cases p with + | inl p => + have hcard := Finset.card_le_card hforced + rw [card_affinePencil_finite] at hcard + omega + | inr d => + have heq : affinePencil (Sum.inr d) = L := + Finset.eq_of_subset_of_card_le hforced (by simpa using hLcard) + have hL : L.card = Fintype.card F := by rw [← heq, card_affinePencil_infinite] + have hB : B.card = 0 := by omega + exact ⟨d, heq.symm, Finset.card_eq_zero.mp hB⟩ + +theorem missed_points_subset_of_mixed_cover + (Y B : Finset (Point F)) (L : Finset (AffineLine F)) + (hcover : ∀ y ∈ Y, y ∈ B ∨ ∃ ell ∈ L, Incidence y ell) : + Y \ L.biUnion linePoints ⊆ B := by + intro y hy + rcases hcover y (Finset.mem_sdiff.mp hy).1 with hyB | ⟨ell, hell, hyell⟩ + · exact hyB + · exact ((Finset.mem_sdiff.mp hy).2 + (Finset.mem_biUnion.mpr ⟨ell, hell, (mem_linePoints _ _).mpr hyell⟩)).elim + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/GadgetDefinitions.lean b/lean/OAI/Combinatorics/Ryser/Construction/GadgetDefinitions.lean new file mode 100644 index 0000000000000000000000000000000000000000..3972b8f20282038d6cf549aab5ee7e8c161cafd6 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/GadgetDefinitions.lean @@ -0,0 +1,84 @@ +import OAI.Combinatorics.Ryser.Construction.GadgetAlgebra + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {k : Type*} [Field k] [Fintype k] [DecidableEq k] + +abbrev NonzeroSlope (k : Type*) [Zero k] := {d : k // d ≠ 0} + +abbrev GadgetOutcome (k : Type*) [Zero k] := NonzeroSlope k → k + +def omittedLine (a : GadgetOutcome k) (d : NonzeroSlope k) : AffineLine k := + (some d.val, a d) + +def retainedPoints (a : GadgetOutcome k) : Finset (Point k) := + Finset.univ \ Finset.univ.biUnion (fun d => linePoints (omittedLine a d)) + +def transformedRetained (a : GadgetOutcome k) : Finset (Point k) := + (retainedPoints a).image cubeMap + +def cubicDeletionUnion (a : GadgetOutcome k) : Finset (Point k) := + Finset.univ.biUnion fun d : NonzeroSlope k => cubicShape d.val (a d) + +@[simp] theorem mem_retainedPoints (a : GadgetOutcome k) (w : Point k) : + w ∈ retainedPoints a ↔ ∀ d, ¬Incidence w (omittedLine a d) := by + simp [retainedPoints] + +theorem not_incidence_omittedLine (a : GadgetOutcome k) {w : Point k} + (hw : w ∈ retainedPoints a) (d : NonzeroSlope k) : + ¬Incidence w (omittedLine a d) := (mem_retainedPoints a w).mp hw d + +theorem cubeMap_mem_cubicShape_iff + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (w : Point k) (d z : k) : + cubeMap w ∈ cubicShape d z ↔ Incidence w (some d, z) := by + rw [cubicShape_eq_image_linePoints] + constructor + · intro hw + obtain ⟨v, hv, hvw⟩ := Finset.mem_image.mp hw + have hsame : v = w := (cubeMap_bijective hcop).injective hvw + subst v + exact (mem_linePoints _ _).mp hv + · intro hw + exact Finset.mem_image.mpr ⟨w, (mem_linePoints _ _).mpr hw, rfl⟩ + +theorem cubeMap_mem_transformedRetained_iff + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (a : GadgetOutcome k) (w : Point k) : + cubeMap w ∈ transformedRetained a ↔ w ∈ retainedPoints a := by + constructor + · intro hw + obtain ⟨v, hv, hvw⟩ := Finset.mem_image.mp hw + exact (cubeMap_bijective hcop).injective hvw ▸ hv + · intro hw + exact Finset.mem_image.mpr ⟨w, hw, rfl⟩ + +theorem transformedRetained_eq_survivors + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (a : GadgetOutcome k) : + transformedRetained a = Finset.univ \ cubicDeletionUnion a := by + ext p + obtain ⟨w, rfl⟩ := (cubeMap_bijective hcop).surjective p + rw [cubeMap_mem_transformedRetained_iff hcop] + simp [mem_retainedPoints, cubicDeletionUnion, cubeMap_mem_cubicShape_iff hcop, + omittedLine] + +theorem transformedRetained_card + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (a : GadgetOutcome k) : + (transformedRetained a).card = (retainedPoints a).card := by + exact Finset.card_image_of_injective _ (cubeMap_bijective hcop).injective + +theorem omitted_line_disjoint_retained (a : GadgetOutcome k) (d : NonzeroSlope k) : + Disjoint (linePoints (omittedLine a d)) (retainedPoints a) := by + apply Finset.disjoint_left.mpr + intro w hwline hwretained + exact not_incidence_omittedLine a hwretained d ((mem_linePoints _ _).mp hwline) + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/GadgetExistence.lean b/lean/OAI/Combinatorics/Ryser/Construction/GadgetExistence.lean new file mode 100644 index 0000000000000000000000000000000000000000..a0de726cbe999a6a60b8fc22be8c21d16fcc27ec --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/GadgetExistence.lean @@ -0,0 +1,80 @@ +import OAI.Combinatorics.Ryser.Construction.GadgetGood +import OAI.Combinatorics.Ryser.Construction.GadgetOriginalDensity +import OAI.Combinatorics.Ryser.Construction.SmallPrimes +import OAI.Combinatorics.Ryser.Field.ExtensionSubfields +import OAI.Combinatorics.Ryser.LineCover.Main + +namespace OAI + +open Filter Topology +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +theorem exists_prime_goodGadget_above (B : ℕ) : + ∃ (p : ℕ) (hp : p.Prime), B < p ∧ 5 < p ∧ p % 3 = 2 ∧ + letI : Fact p.Prime := ⟨hp⟩ + ∃ a : GadgetOutcome (ZMod p), GoodGadget a := by + classical + obtain ⟨Q, hQ⟩ := LineCover.uniform_linecover_probability + 3 (1 / 4) (1 / 100) (by norm_num) (by norm_num) (by norm_num) + (1 / 4) (by norm_num) + have hsmall : ∀ᶠ q : ℕ in atTop, + (q : ℝ) ^ 2 * Real.exp (-(q : ℝ) / 2048) < 1 / 4 := + (tendsto_order.mp tendsto_originalDensity_failure_atTop).2 _ (by norm_num) + obtain ⟨N, hN⟩ := Filter.eventually_atTop.mp hsmall + obtain ⟨p, hpbound, hp, hpmod⟩ := + exists_prime_gt_mod_three_eq_two (B + Q + N + 2048) + have hpB : B < p := by omega + have hp5 : 5 < p := by omega + have hpQ : Q ≤ p := by omega + have hpN : N ≤ p := by omega + have hp2048 : 2048 ≤ p := by omega + refine ⟨p, hp, hpB, hp5, hpmod, ?_⟩ + let : Fact p.Prime := ⟨hp⟩ + have hcard : 3 < Fintype.card (ZMod p) := by simpa using (show 3 < p by omega) + have hcop : Nat.Coprime 3 (Fintype.card (ZMod p) - 1) := + coprime_three_zmod_card_sub_one hpmod + have hsub : Incidence.SmallProperSubfields (ZMod p) := by + intro M hM + exact (hM (primeField_subfield_eq_top p M)).elim + have hline := hQ (ZMod p) (by simpa using hpQ) hsub + (cubicDeletionProcess hcop hcard) + change 1 - (1 / 4 : ℝ) ≤ + (FiniteLaw.pi (gadgetTrials (k := ZMod p))).prob + (LineCover.GoodLineCover (1 / 4) (1 / 100)) at hline + rw [← gadgetLaw_map_config, FiniteLaw.prob_map] at hline + have horiginal := prob_originalLineDensity_ge (k := ZMod p) + (by simpa using hp2048) + change 1 - (Fintype.card (ZMod p) : ℝ) ^ 2 * + Real.exp (-(Fintype.card (ZMod p) : ℝ) / 2048) ≤ + (gadgetLaw (ZMod p)).prob OriginalLineDensity at horiginal + have hfailure : (Fintype.card (ZMod p) : ℝ) ^ 2 * + Real.exp (-(Fintype.card (ZMod p) : ℝ) / 2048) < 1 / 4 := by + simpa using hN p hpN + have hex : ∃ a : GadgetOutcome (ZMod p), OriginalLineDensity a ∧ + LineCover.GoodLineCover (1 / 4) (1 / 100) (gadgetConfig a) := by + by_contra hnot + have himp : ∀ a : GadgetOutcome (ZMod p), OriginalLineDensity a → + ¬ LineCover.GoodLineCover (1 / 4) (1 / 100) (gadgetConfig a) := by + intro a ha hgood + exact hnot ⟨a, ha, hgood⟩ + have hmono := (gadgetLaw (ZMod p)).prob_mono himp + rw [FiniteLaw.prob_compl] at hmono + linarith + obtain ⟨a, ha, hgood⟩ := hex + refine ⟨a, goodGadget_of_events hcop hcard ?_ a ha hgood⟩ + simpa using (show 200 < 19 * p by omega) + +theorem exists_prime_goodGadget : + ∃ (p : ℕ) (hp : p.Prime), 5 < p ∧ p % 3 = 2 ∧ + letI : Fact p.Prime := ⟨hp⟩ + ∃ a : GadgetOutcome (ZMod p), GoodGadget a := by + obtain ⟨p, hp, _, hp5, hpmod, ha⟩ := exists_prime_goodGadget_above 0 + exact ⟨p, hp, hp5, hpmod, ha⟩ + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/GadgetGood.lean b/lean/OAI/Combinatorics/Ryser/Construction/GadgetGood.lean new file mode 100644 index 0000000000000000000000000000000000000000..5b97e13b71539358ff251d293e86f9f89b182ce0 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/GadgetGood.lean @@ -0,0 +1,93 @@ +import OAI.Combinatorics.Ryser.Construction.GadgetProcess +import OAI.Combinatorics.Ryser.Construction.GadgetConsequences +import OAI.Combinatorics.Ryser.Construction.DeletionLines + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {k : Type*} [Field k] [Fintype k] [DecidableEq k] + +def GoodGadget (a : GadgetOutcome k) : Prop := + OriginalLineDensity a ∧ + (∀ ell : AffineLine k, + Fintype.card k ≤ 8 * (transformedRetained a ∩ linePoints ell).card) ∧ + GadgetCoverProperty (transformedRetained a) + +theorem gadgetConfig_survivors_ignoring_line + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (hcard : 3 < Fintype.card k) + (a : GadgetOutcome k) (ell : AffineLine k) : + LineCover.survivors {linePoints ell} (gadgetConfig a) = transformedRetained a := by + have hnot : linePoints ell ∉ LineCover.selected (gadgetConfig a) := by + intro hmem + exact selected_cubicShapes_ne_linePoints (gadgetConfig a) hcard hmem ell rfl + calc + _ = LineCover.survivors ∅ (gadgetConfig a) := + LineCover.survivors_insert_eq_of_not_selected hnot + _ = transformedRetained a := gadgetConfig_survivors hcop a + +theorem gadget_line_density_of_goodLineCover + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (hcard : 3 < Fintype.card k) + (a : GadgetOutcome k) + (hgood : LineCover.GoodLineCover (1 / 4) (1 / 100) (gadgetConfig a)) + (ell : AffineLine k) : + Fintype.card k ≤ 8 * (transformedRetained a ∩ linePoints ell).card := by + have h := hgood.1 ell + rw [gadgetConfig_survivors_ignoring_line hcop hcard a ell] at h + have hreal : (Fintype.card k : ℝ) ≤ + 8 * ((transformedRetained a ∩ linePoints ell).card : ℝ) := by linarith + exact_mod_cast hreal + +theorem gadget_near_pencil_of_goodLineCover + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (a : GadgetOutcome k) + (hgood : LineCover.GoodLineCover (1 / 4) (1 / 100) (gadgetConfig a)) + (B : Finset (Point k)) (L : Finset (AffineLine k)) + (hcover : ∀ y ∈ transformedRetained a, y ∈ B ∨ ∃ ell ∈ L, Incidence y ell) + (hbudget : 2 * L.card + B.card ≤ 2 * Fintype.card k) : + ∃ p : ProjectivePoint k, + 99 * Fintype.card k ≤ 100 * (L ∩ affinePencil p).card := by + have hL : L.card ≤ Fintype.card k := by omega + have hB : B.card ≤ 2 * Fintype.card k := by omega + have hmiss : (LineCover.survivors ∅ (gadgetConfig a) \ L.biUnion linePoints).card ≤ + 2 * Fintype.card k := by + rw [gadgetConfig_survivors hcop a] + exact (Finset.card_le_card (missed_points_subset_of_mixed_cover + (transformedRetained a) B L hcover)).trans hB + obtain ⟨p, hp⟩ := hgood.2 L hL hmiss + have heq : LineCover.coverPencil L p = L ∩ affinePencil p := by + ext ell + simp only [LineCover.mem_coverPencil, Finset.mem_inter, mem_affinePencil] + rw [heq] at hp + refine ⟨p, ?_⟩ + have hreal : (99 : ℝ) * Fintype.card k ≤ + 100 * ((L ∩ affinePencil p).card : ℝ) := by linarith + exact_mod_cast hreal + +theorem goodGadget_of_events + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (hcard : 3 < Fintype.card k) + (hlarge : 200 < 19 * Fintype.card k) (a : GadgetOutcome k) + (horiginal : OriginalLineDensity a) + (hgood : LineCover.GoodLineCover (1 / 4) (1 / 100) (gadgetConfig a)) : + GoodGadget a := by + have hlines := gadget_line_density_of_goodLineCover hcop hcard a hgood + refine ⟨horiginal, hlines, ?_⟩ + exact gadgetCoverProperty_of_near_pencils (transformedRetained a) hlarge hlines + (gadget_near_pencil_of_goodLineCover hcop a hgood) + +theorem GoodGadget.retained_nonempty {a : GadgetOutcome k} (ha : GoodGadget a) : + (retainedPoints a).Nonempty := by + by_contra hn + have hY : retainedPoints a = ∅ := Finset.not_nonempty_iff_eq_empty.mp hn + have hT : transformedRetained a = ∅ := by simp [transformedRetained, hY] + have hline := ha.2.1 (none, 0) + rw [hT, Finset.empty_inter, Finset.card_empty, Nat.mul_zero] at hline + exact (Nat.not_le_of_gt Fintype.card_pos) hline + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/GadgetOriginalCounts.lean b/lean/OAI/Combinatorics/Ryser/Construction/GadgetOriginalCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..d950b4405fffa35f79b0b867d007f79925cf5986 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/GadgetOriginalCounts.lean @@ -0,0 +1,150 @@ +import OAI.Combinatorics.Ryser.Construction.GadgetDefinitions +import OAI.Combinatorics.Ryser.Geometry.AffineJoins +import Mathlib.Data.Finset.Card +import Mathlib.Basic.Real.Basic +import Mathlib.Tactic.Linarith + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {k : Type*} [Field k] [Fintype k] [DecidableEq k] + +def originalLineSurvivors (a : GadgetOutcome k) (d : NonzeroSlope k) (z : k) : + Finset (Point k) := + (linePoints (some d.val, z)).filter + (fun p => ∀ e : NonzeroSlope k, e ≠ d → ¬ Incidence p (omittedLine a e)) + +def originalLineCount (a : GadgetOutcome k) (d : NonzeroSlope k) (z : k) : ℝ := + (originalLineSurvivors a d z).card + +@[simp] theorem mem_originalLineSurvivors (a : GadgetOutcome k) + (d : NonzeroSlope k) (z : k) (p : Point k) : + p ∈ originalLineSurvivors a d z ↔ + Incidence p (some d.val, z) ∧ + ∀ e : NonzeroSlope k, e ≠ d → ¬ Incidence p (omittedLine a e) := by + simp only [originalLineSurvivors, Finset.mem_filter, mem_linePoints] + +theorem originalLineSurvivors_eq_retained_filter (a : GadgetOutcome k) + (d : NonzeroSlope k) (z : k) (hz : z ≠ a d) : + originalLineSurvivors a d z = + (retainedPoints a).filter (fun p => Incidence p (some d.val, z)) := by + ext p + simp only [mem_originalLineSurvivors, Finset.mem_filter, mem_retainedPoints] + constructor + · rintro ⟨hp, havoid⟩ + refine ⟨?_, hp⟩ + intro e + by_cases hed : e = d + · subst e + intro he + change projection (some d.val) p = z at hp + change projection (some d.val) p = a d at he + exact hz (hp.symm.trans he) + · exact havoid e hed + · rintro ⟨havoid, hp⟩ + exact ⟨hp, fun e _ => havoid e⟩ + +theorem originalLineCount_eq_retained_filter_card (a : GadgetOutcome k) + (d : NonzeroSlope k) (z : k) (hz : z ≠ a d) : + originalLineCount a d z = + ((retainedPoints a).filter (fun p => Incidence p (some d.val, z))).card := by + rw [originalLineCount, originalLineSurvivors_eq_retained_filter a d z hz] + +theorem originalLineSurvivors_update_same (a : GadgetOutcome k) + (d : NonzeroSlope k) (z x : k) : + originalLineSurvivors (Function.update a d x) d z = originalLineSurvivors a d z := by + ext p + simp only [mem_originalLineSurvivors] + constructor + · rintro ⟨hp, havoid⟩ + refine ⟨hp, ?_⟩ + intro e hed + simpa only [omittedLine, Function.update_of_ne hed] using havoid e hed + · rintro ⟨hp, havoid⟩ + refine ⟨hp, ?_⟩ + intro e hed + simpa only [omittedLine, Function.update_of_ne hed] using havoid e hed + +private theorem originalLineSurvivors_card_le_add_one_of_agree_off + (a b : GadgetOutcome k) (d : NonzeroSlope k) (z : k) (i : NonzeroSlope k) + (hid : i ≠ d) (hagree : ∀ e, e ≠ i → a e = b e) : + (originalLineSurvivors a d z).card ≤ (originalLineSurvivors b d z).card + 1 := by + have hlines : (some d.val, z) ≠ omittedLine b i := by + intro h + apply hid + apply Subtype.ext + exact (Option.some.inj (congrArg Prod.fst h)).symm + have hinter : + (linePoints (some d.val, z) ∩ linePoints (omittedLine b i)).card ≤ 1 := by + apply Finset.card_le_one.mpr + intro p hp q hq + obtain ⟨hp₁, hp₂⟩ := Finset.mem_inter.mp hp + obtain ⟨hq₁, hq₂⟩ := Finset.mem_inter.mp hq + exact eq_of_common_incidence_of_ne_lines hlines + ((mem_linePoints _ _).mp hp₁) ((mem_linePoints _ _).mp hp₂) + ((mem_linePoints _ _).mp hq₁) ((mem_linePoints _ _).mp hq₂) + have hsub : originalLineSurvivors a d z ⊆ + originalLineSurvivors b d z ∪ + (linePoints (some d.val, z) ∩ linePoints (omittedLine b i)) := by + intro p hp + by_cases hb : p ∈ originalLineSurvivors b d z + · exact Finset.mem_union_left _ hb + · apply Finset.mem_union_right + have hp' := (mem_originalLineSurvivors a d z p).mp hp + refine Finset.mem_inter.mpr ⟨(mem_linePoints _ _).mpr hp'.1, ?_⟩ + apply (mem_linePoints _ _).mpr + by_contra hnot + apply hb + apply (mem_originalLineSurvivors b d z p).mpr + refine ⟨hp'.1, ?_⟩ + intro e hed + by_cases hei : e = i + · subst e + exact hnot + · change ¬ Incidence p (some e.val, b e) + rw [← hagree e hei] + exact hp'.2 e hed + calc + (originalLineSurvivors a d z).card ≤ + (originalLineSurvivors b d z ∪ + (linePoints (some d.val, z) ∩ linePoints (omittedLine b i))).card := + Finset.card_le_card hsub + _ ≤ (originalLineSurvivors b d z).card + + (linePoints (some d.val, z) ∩ linePoints (omittedLine b i)).card := + Finset.card_union_le _ _ + _ ≤ (originalLineSurvivors b d z).card + 1 := Nat.add_le_add_left hinter _ + +theorem originalLineCount_update_abs_le (a : GadgetOutcome k) + (d : NonzeroSlope k) (z : k) (i : NonzeroSlope k) (x : k) : + |originalLineCount (Function.update a i x) d z - originalLineCount a d z| ≤ 2 := by + by_cases hid : i = d + · subst i + simp only [originalLineCount, originalLineSurvivors_update_same, sub_self, abs_zero] + norm_num + · have hforward := originalLineSurvivors_card_le_add_one_of_agree_off + (Function.update a i x) a d z i hid (by + intro e hei + exact Function.update_of_ne hei x a) + have hreverse := originalLineSurvivors_card_le_add_one_of_agree_off + a (Function.update a i x) d z i hid (by + intro e hei + exact (Function.update_of_ne hei x a).symm) + have hforwardR : originalLineCount (Function.update a i x) d z ≤ + originalLineCount a d z + 1 := by + unfold originalLineCount + exact_mod_cast hforward + have hreverseR : originalLineCount a d z ≤ + originalLineCount (Function.update a i x) d z + 1 := by + unfold originalLineCount + exact_mod_cast hreverse + apply abs_le.mpr + constructor <;> linarith + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/GadgetOriginalDensity.lean b/lean/OAI/Combinatorics/Ryser/Construction/GadgetOriginalDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..35877802bc7e3e43cf501a490a2d2a40af52e2e2 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/GadgetOriginalDensity.lean @@ -0,0 +1,167 @@ +import OAI.Combinatorics.Ryser.Construction.GadgetConcentration +import OAI.Combinatorics.Ryser.Construction.GadgetOriginalExpectation +import OAI.Combinatorics.Ryser.Construction.DeletionLines +import OAI.Combinatorics.Ryser.LineCover.SurvivalNumerics +import OAI.Combinatorics.Ryser.LineCover.TailNumerics +import Mathlib.Order.Filter.AtTopBot.Archimedean +import Lean.Elab.Tactic.Omega + +namespace OAI + +open scoped BigOperators +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +open Filter Topology + +variable {k : Type*} [Field k] [Fintype k] [DecidableEq k] + +theorem prob_originalLineCount_lt_five (hq : 2048 ≤ Fintype.card k) + (d : NonzeroSlope k) (z : k) : + (FiniteLaw.pi (fun _ : NonzeroSlope k => FiniteLaw.uniform k)).prob + (fun a => originalLineCount a d z < 5) ≤ + Real.exp (-(Fintype.card k : ℝ) / 2048) := by + classical + let q : ℝ := Fintype.card k + have hqR : 2048 ≤ q := by + dsimp only [q] + exact_mod_cast hq + have hq0 : 0 < q := by linarith + have hcoordinates : (Fintype.card (NonzeroSlope k) : ℝ) ≤ q := by + dsimp only [q] + exact_mod_cast Fintype.card_le_of_injective + (fun d : NonzeroSlope k => d.val) Subtype.val_injective + have hmean : q / 4 ≤ + (FiniteLaw.uniform (GadgetOutcome k)).expectation (fun a => originalLineCount a d z) := by + have hm := LineCover.quarter_mul_le_survival_mean (Fintype.card k) (by omega) + rw [← expectation_originalLineCount d z, FiniteLaw.pi_uniform] at hm + exact hm + have htail := uniform_coordinate_concentration + (fun a : GadgetOutcome k => originalLineCount a d z) + 2 2 (4 * q) (q / 8) (by norm_num) (by positivity) (by positivity) + (fun i a x => originalLineCount_update_abs_le a d z i x) + (by norm_num) (by nlinarith) + have hratio : (q / 8) ^ 2 / (4 * q) = q / 256 := by + field_simp [hq0.ne']; ring + have hmin : min ((q / 8) ^ 2 / (4 * q)) ((q / 8) / 2) = q / 256 := by + rw [hratio] + apply min_eq_left + linarith + rw [hmin] at htail + have hexponent : -(1 / 4 : ℝ) * (q / 256) = -q / 1024 := by ring + rw [hexponent] at htail + have hbad : + (FiniteLaw.uniform (GadgetOutcome k)).prob (fun a => originalLineCount a d z < 5) ≤ + (FiniteLaw.uniform (GadgetOutcome k)).prob + (fun a => q / 8 ≤ |originalLineCount a d z - + (FiniteLaw.uniform (GadgetOutcome k)).expectation + (fun a => originalLineCount a d z)|) := by + apply FiniteLaw.prob_mono + intro a ha + have habs := neg_le_abs (originalLineCount a d z - + (FiniteLaw.uniform (GadgetOutcome k)).expectation (fun a => originalLineCount a d z)) + linarith + have htwo : (2 : ℝ) ≤ Real.exp (q / 2048) := by + have he := Real.add_one_le_exp (q / 2048) + linarith + rw [FiniteLaw.pi_uniform] + change _ ≤ Real.exp (-q / 2048) + calc + _ ≤ 2 * Real.exp (-q / 1024) := hbad.trans htail + _ ≤ Real.exp (q / 2048) * Real.exp (-q / 1024) := + mul_le_mul_of_nonneg_right htwo (Real.exp_pos _).le + _ = Real.exp (-q / 2048) := by + rw [← Real.exp_add] + congr 1 + ring + +theorem not_originalLineDensity_imp_exists_small_count (a : GadgetOutcome k) + (ha : ¬ OriginalLineDensity a) : + ∃ j : NonzeroSlope k × k, originalLineCount a j.1 j.2 < 5 := by + classical + simp only [OriginalLineDensity, not_forall, not_le] at ha + obtain ⟨d, z, hz, hcard⟩ := ha + refine ⟨(d, z), ?_⟩ + rw [originalLineCount_eq_retained_filter_card a d z hz] + exact_mod_cast hcard + +theorem prob_not_originalLineDensity_le (hq : 2048 ≤ Fintype.card k) : + (FiniteLaw.pi (fun _ : NonzeroSlope k => FiniteLaw.uniform k)).prob + (fun a => ¬ OriginalLineDensity a) ≤ + (Fintype.card k : ℝ) ^ 2 * Real.exp (-(Fintype.card k : ℝ) / 2048) := by + classical + let μ := FiniteLaw.pi (fun _ : NonzeroSlope k => FiniteLaw.uniform k) + have htests : (Fintype.card (NonzeroSlope k × k) : ℝ) ≤ (Fintype.card k : ℝ) ^ 2 := by + rw [Fintype.card_prod, Nat.cast_mul] + have hc : (Fintype.card (NonzeroSlope k) : ℝ) ≤ (Fintype.card k : ℝ) := by + exact_mod_cast Fintype.card_le_of_injective + (fun d : NonzeroSlope k => d.val) Subtype.val_injective + simpa only [pow_two] using + mul_le_mul_of_nonneg_right hc (Nat.cast_nonneg (Fintype.card k)) + calc + _ ≤ μ.prob (fun a => ∃ j : NonzeroSlope k × k, originalLineCount a j.1 j.2 < 5) := + μ.prob_mono not_originalLineDensity_imp_exists_small_count + _ ≤ ∑ j : NonzeroSlope k × k, + μ.prob (fun a => originalLineCount a j.1 j.2 < 5) := + μ.prob_exists_le _ + _ ≤ ∑ _j : NonzeroSlope k × k, Real.exp (-(Fintype.card k : ℝ) / 2048) := by + apply Finset.sum_le_sum + intro j _ + exact prob_originalLineCount_lt_five hq j.1 j.2 + _ = (Fintype.card (NonzeroSlope k × k) : ℝ) * + Real.exp (-(Fintype.card k : ℝ) / 2048) := by simp + _ ≤ _ := mul_le_mul_of_nonneg_right htests (Real.exp_pos _).le + +theorem prob_originalLineDensity_ge (hq : 2048 ≤ Fintype.card k) : + 1 - (Fintype.card k : ℝ) ^ 2 * Real.exp (-(Fintype.card k : ℝ) / 2048) ≤ + (FiniteLaw.pi (fun _ : NonzeroSlope k => FiniteLaw.uniform k)).prob + OriginalLineDensity := by + have h := prob_not_originalLineDensity_le (k := k) hq + rw [FiniteLaw.prob_compl] at h + linarith + +theorem tendsto_originalDensity_failure_atTop : + Tendsto (fun q : ℕ => (q : ℝ) ^ 2 * Real.exp (-(q : ℝ) / 2048)) + atTop (𝓝 0) := by + have h : Tendsto (fun q : ℝ => q ^ 2 * Real.exp (-q / 2048)) atTop (𝓝 0) := by + have h' := LineCover.tendsto_rpow_mul_exp_neg_rpow_atTop + (2 : ℝ) (a := 1) (c := 1 / 2048) (by norm_num) (by norm_num) + simpa [Real.rpow_natCast, div_eq_mul_inv, mul_comm, mul_left_comm, mul_assoc] using h' + exact h.comp tendsto_natCast_atTop_atTop + +def originalDensityProbability (k : Type*) [Field k] [Fintype k] [DecidableEq k] : ℝ := + (FiniteLaw.pi (fun _ : NonzeroSlope k => FiniteLaw.uniform k)).prob OriginalLineDensity + +theorem tendsto_originalDensityProbability + {ι : Type*} {l : Filter ι} (K : ι → Type*) + [∀ i, Field (K i)] [∀ i, Fintype (K i)] [∀ i, DecidableEq (K i)] + (hcard : Tendsto (fun i => Fintype.card (K i)) l atTop) : + Tendsto (fun i => originalDensityProbability (K i)) l (𝓝 1) := by + let μ (i : ι) := FiniteLaw.pi (fun _ : NonzeroSlope (K i) => FiniteLaw.uniform (K i)) + have hfailure : Tendsto + (fun i => (Fintype.card (K i) : ℝ) ^ 2 * + Real.exp (-(Fintype.card (K i) : ℝ) / 2048)) l (𝓝 0) := + tendsto_originalDensity_failure_atTop.comp hcard + have hbad : Tendsto (fun i => (μ i).prob (fun a => ¬ OriginalLineDensity a)) l (𝓝 0) := by + apply squeeze_zero' ?_ ?_ hfailure + · exact Filter.Eventually.of_forall fun i => (μ i).prob_nonneg _ + · filter_upwards [hcard.eventually (eventually_ge_atTop 2048)] with i hi + exact prob_not_originalLineDensity_le hi + have hgood : Tendsto + (fun i => 1 - (μ i).prob (fun a => ¬ OriginalLineDensity a)) l (𝓝 (1 - 0 : ℝ)) := + tendsto_const_nhds.sub hbad + have heq : (fun i => 1 - (μ i).prob (fun a => ¬ OriginalLineDensity a)) = + (fun i => originalDensityProbability (K i)) := by + funext i + rw [FiniteLaw.prob_compl] + change 1 - (1 - originalDensityProbability (K i)) = originalDensityProbability (K i) + ring + rw [heq] at hgood + simpa only [sub_zero] using hgood + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/GadgetOriginalExpectation.lean b/lean/OAI/Combinatorics/Ryser/Construction/GadgetOriginalExpectation.lean new file mode 100644 index 0000000000000000000000000000000000000000..b9dcf283f93cb7e58dd4dc075a471d679aea0ee6 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/GadgetOriginalExpectation.lean @@ -0,0 +1,118 @@ +import OAI.Combinatorics.Ryser.Construction.GadgetOriginalCounts +import OAI.Combinatorics.Ryser.Geometry.Cardinality +import OAI.Combinatorics.Ryser.Probability.Product + +namespace OAI + +open scoped BigOperators +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {k : Type*} [Field k] [Fintype k] [DecidableEq k] + +private theorem expectation_finset_sum + {Ω ι : Type*} [Fintype Ω] + (μ : FiniteLaw Ω) (s : Finset ι) (f : ι → Ω → ℝ) : + μ.expectation (fun a => ∑ i ∈ s, f i a) = + ∑ i ∈ s, μ.expectation (f i) := by + classical + induction s using Finset.induction_on with + | empty => + simp only [Finset.sum_empty, FiniteLaw.expectation_const] + | @insert i s hi ih => + simp only [Finset.sum_insert hi, FiniteLaw.expectation_add, ih] + +theorem card_nonzeroSlope : + Fintype.card (NonzeroSlope k) = Fintype.card k - 1 := by + change Fintype.card {e : k // ¬e = 0} = _ + rw [Fintype.card_subtype_compl, Fintype.card_subtype_eq] + +theorem prob_originalPoint_survival (d : NonzeroSlope k) (w : Point k) : + (FiniteLaw.pi (fun _ : NonzeroSlope k => FiniteLaw.uniform k)).prob + (fun a => ∀ e, e ≠ d → ¬Incidence w (omittedLine a e)) = + (1 - 1 / (Fintype.card k : ℝ)) ^ (Fintype.card k - 2) := by + classical + have hsingle (e : NonzeroSlope k) : + (FiniteLaw.uniform k).prob + (fun z : k => Incidence w (some e.val, z)) = + 1 / (Fintype.card k : ℝ) := by + rw [FiniteLaw.prob] + rw [Finset.sum_eq_single_of_mem + (projection (some e.val) w) (Finset.mem_univ _)] + · simp [Incidence, FiniteLaw.uniform, one_div] + · intro b _ hb + apply ite_eq_right + intro h + exact hb (show projection (some e.val) w = b from h).symm + have hcoord (e : NonzeroSlope k) : + (FiniteLaw.uniform k).prob + (fun z : k => e ≠ d → ¬Incidence w (some e.val, z)) = + if e = d then 1 else 1 - 1 / (Fintype.card k : ℝ) := by + by_cases he : e = d + · simp [he] + · simp only [ne_eq, he, not_false_eq_true, true_implies, ite_false] + rw [FiniteLaw.prob_compl, hsingle e] + change + (FiniteLaw.pi (fun _ : NonzeroSlope k => FiniteLaw.uniform k)).prob + (fun a => ∀ e, e ≠ d → ¬Incidence w (some e.val, a e)) = _ + rw [FiniteLaw.prob_pi + (A := fun _ : NonzeroSlope k => k) + (fun _ : NonzeroSlope k => FiniteLaw.uniform k) + (fun (e : NonzeroSlope k) (b : k) => + e ≠ d → ¬Incidence w (some e.val, b))] + simp_rw [hcoord] + rw [Finset.prod_ite] + simp only [Finset.prod_const_one, one_mul, Finset.prod_const] + rw [Finset.filter_ne', + Finset.card_erase_of_mem (Finset.mem_univ d), Finset.card_univ, + card_nonzeroSlope] + simp only [Nat.sub_sub] + +theorem expectation_originalLineCount (d : NonzeroSlope k) (z : k) : + (FiniteLaw.pi (fun _ : NonzeroSlope k => FiniteLaw.uniform k)).expectation + (fun a => originalLineCount a d z) = + (Fintype.card k : ℝ) * + (1 - 1 / (Fintype.card k : ℝ)) ^ (Fintype.card k - 2) := by + classical + have hcount (a : GadgetOutcome k) : + originalLineCount a d z = + ∑ w ∈ linePoints (some d.val, z), + if ∀ e : NonzeroSlope k, e ≠ d → ¬Incidence w (omittedLine a e) + then (1 : ℝ) else 0 := by + simp only [originalLineCount, originalLineSurvivors, Finset.sum_boole] + calc + _ = ∑ w ∈ linePoints (some d.val, z), + (FiniteLaw.pi (fun _ : NonzeroSlope k => FiniteLaw.uniform k)).expectation + (fun a => if ∀ e : NonzeroSlope k, + e ≠ d → ¬Incidence w (omittedLine a e) + then (1 : ℝ) else 0) := by + simpa only [← hcount] using + (expectation_finset_sum + (FiniteLaw.pi (fun _ : NonzeroSlope k => FiniteLaw.uniform k)) + (linePoints (some d.val, z)) + (fun (w : Point k) (a : GadgetOutcome k) => + if ∀ e : NonzeroSlope k, e ≠ d → ¬Incidence w (omittedLine a e) + then (1 : ℝ) else 0)) + _ = ∑ w ∈ linePoints (some d.val, z), + (FiniteLaw.pi (fun _ : NonzeroSlope k => FiniteLaw.uniform k)).prob + (fun a => ∀ e, e ≠ d → ¬Incidence w (omittedLine a e)) := by + apply Finset.sum_congr rfl + intro w _ + rw [FiniteLaw.prob_eq_expectation] + apply congrArg (FiniteLaw.expectation + (FiniteLaw.pi (fun _ : NonzeroSlope k => FiniteLaw.uniform k))) + funext a + by_cases h : ∀ e : NonzeroSlope k, + e ≠ d → ¬Incidence w (omittedLine a e) + · simp + · simp + _ = _ := by + simp only [prob_originalPoint_survival, Finset.sum_const, + nsmul_eq_mul, card_linePoints] + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/GadgetProcess.lean b/lean/OAI/Combinatorics/Ryser/Construction/GadgetProcess.lean new file mode 100644 index 0000000000000000000000000000000000000000..0f3e9b065cbc9a37b6a62b0b26ed34f7136cdedd --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/GadgetProcess.lean @@ -0,0 +1,189 @@ +import OAI.Combinatorics.Ryser.Construction.GadgetShapes +import OAI.Combinatorics.Ryser.LineCover.Process +import OAI.Combinatorics.Ryser.LineCover.SurvivalNumerics +import OAI.Combinatorics.Ryser.Probability.ProductMap +import Mathlib.Data.Fintype.EquivFin +import Mathlib.Tactic.Positivity +import Lean.Elab.Tactic.Omega + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.Construction + +variable {k : Type*} [Field k] [Fintype k] [DecidableEq k] + +theorem nonzeroSlope_card (k : Type*) [Field k] [Fintype k] [DecidableEq k] : + Fintype.card (NonzeroSlope k) = Fintype.card k - 1 := by + change Fintype.card {d : k // ¬d = 0} = _ + rw [Fintype.card_subtype_compl, Fintype.card_subtype_eq] + +def cubicTrialLaw (d : NonzeroSlope k) : + FiniteLaw (LineCover.Outcome (cubicShapes k) 3) := + (FiniteLaw.uniform k).map (cubicTrialOutcome d) + +theorem cubicTrialLaw_point_probability + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (d : NonzeroSlope k) (x : Point k) : + (cubicTrialLaw d).prob (fun a => x ∈ LineCover.deleted ∅ a) = + 1 / (Fintype.card k : ℝ) := by + rw [cubicTrialLaw, FiniteLaw.prob_map] + simp only [deleted_empty_cubicTrialOutcome] + rw [FiniteLaw.uniform_prob] + have hfilter : @Finset.filter _ (fun z => x ∈ cubicShape d.val z) + (fun z => Classical.propDecidable (x ∈ cubicShape d.val z)) Finset.univ = + Finset.univ.filter (fun z => x ∈ cubicShape d.val z) := + Finset.filter_congr_decidable _ _ _ + rw [hfilter, cubicShape_intercept_card hcop] + simp + +theorem cubicTrialLaw_point_probability_le + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (d : NonzeroSlope k) (x : Point k) : + (cubicTrialLaw d).prob (fun a => x ∈ LineCover.deleted ∅ a) ≤ + (3 : ℝ) / Fintype.card k := by + rw [cubicTrialLaw_point_probability hcop] + exact div_le_div_of_nonneg_right (by norm_num) (by positivity) + +theorem cubicTrialLaw_line_probability_zero + (hcard : 3 < Fintype.card k) (d : NonzeroSlope k) (l : AffineLine k) : + (cubicTrialLaw d).prob (fun a => ∃ S ∈ a.val, S.val = linePoints l) = 0 := by + rw [cubicTrialLaw, FiniteLaw.prob_map] + have hevent : (fun z : k => ∃ S ∈ (cubicTrialOutcome d z).val, + S.val = linePoints l) = (fun _ : k => False) := by + funext z + exact propext (iff_false_intro (cubicTrialOutcome_no_line d z hcard l)) + rw [hevent, FiniteLaw.prob_false] + +def gadgetSlope (i : Fin (Fintype.card (NonzeroSlope k))) : NonzeroSlope k := + (Fintype.equivFin (NonzeroSlope k)).symm i + +def gadgetTrials (i : Fin (Fintype.card (NonzeroSlope k))) : + FiniteLaw (LineCover.Outcome (cubicShapes k) 3) := + cubicTrialLaw (gadgetSlope i) + +def gadgetSurvival (k : Type*) [Field k] [Fintype k] : ℝ := + (1 - 1 / (Fintype.card k : ℝ)) ^ (Fintype.card k - 1) + +theorem gadgetTrials_uniformSurvival + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (x : Point k) : + (FiniteLaw.pi (gadgetTrials (k := k))).prob + (fun a => x ∈ LineCover.survivors ∅ a) = gadgetSurvival k := by + simp only [LineCover.mem_survivors] + rw [FiniteLaw.prob_pi (gadgetTrials (k := k)) + (fun _ a => x ∉ LineCover.deleted ∅ a)] + simp_rw [FiniteLaw.prob_compl] + simp only [gadgetTrials, cubicTrialLaw_point_probability hcop] + simp only [Finset.prod_const, Finset.card_univ, Fintype.card_fin, + nonzeroSlope_card, gadgetSurvival] + +def gadgetDeletionProcess + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (hcard : 3 < Fintype.card k) (δ : ℝ) + (hδ : δ ≤ gadgetSurvival k) : LineCover.DeletionProcess k 3 δ where + shapes := cubicShapes k + shapeCount := cubicShapes_card_le k + shapeSize := by + intro S hS + exact cubicShapes_member_card_le hS + sparse := cubicShapes_sparse k + trialsCount := Fintype.card (NonzeroSlope k) + trials := gadgetTrials + trialsCount_le := by rw [nonzeroSlope_card]; omega + pointCap := fun i x => cubicTrialLaw_point_probability_le hcop (gadgetSlope i) x + survival := gadgetSurvival k + survivalLower := hδ + uniformSurvival := gadgetTrials_uniformSurvival hcop + lineCap := by + intro l + have hzero : ∀ i : Fin (Fintype.card (NonzeroSlope k)), + (gadgetTrials i).prob (fun a => ∃ S ∈ a.val, S.val = linePoints l) = 0 := + fun i => cubicTrialLaw_line_probability_zero hcard (gadgetSlope i) l + simp only [hzero, Finset.sum_const_zero] + positivity + +theorem gadgetDeletionProcess_trialsCount + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (hcard : 3 < Fintype.card k) (δ : ℝ) (hδ : δ ≤ gadgetSurvival k) : + (gadgetDeletionProcess hcop hcard δ hδ).trialsCount = Fintype.card k - 1 := + nonzeroSlope_card k + +def cubicDeletionProcess + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (hcard : 3 < Fintype.card k) : LineCover.DeletionProcess k 3 (1 / 4 : ℝ) := + gadgetDeletionProcess hcop hcard (1 / 4) + (LineCover.one_quarter_le_survival_pow_pred (Fintype.card k) (by omega)) + +def primeCubicDeletionProcess (p : ℕ) [Fact p.Prime] + (hpmod : p % 3 = 2) (hp : 3 < p) : + LineCover.DeletionProcess (ZMod p) 3 (1 / 4 : ℝ) := + cubicDeletionProcess (coprime_three_zmod_card_sub_one hpmod) + (by simpa only [ZMod.card] using hp) + +def gadgetLaw (k : Type*) [Field k] [Fintype k] [DecidableEq k] : + FiniteLaw (GadgetOutcome k) := + FiniteLaw.pi (fun _ : NonzeroSlope k => FiniteLaw.uniform k) + +def gadgetInterceptEquiv : GadgetOutcome k ≃ + (Fin (Fintype.card (NonzeroSlope k)) → k) where + toFun a i := a (gadgetSlope i) + invFun b d := b ((Fintype.equivFin (NonzeroSlope k)) d) + left_inv a := by + funext d + simp only [gadgetSlope, Equiv.symm_apply_apply] + right_inv b := by + funext i + simp only [gadgetSlope, Equiv.apply_symm_apply] + +def gadgetConfig (a : GadgetOutcome k) : + Fin (Fintype.card (NonzeroSlope k)) → LineCover.Outcome (cubicShapes k) 3 := + fun i => cubicTrialOutcome (gadgetSlope i) (a (gadgetSlope i)) + +theorem gadgetLaw_map_config : + (gadgetLaw k).map gadgetConfig = FiniteLaw.pi (gadgetTrials (k := k)) := by + let f : (Fin (Fintype.card (NonzeroSlope k)) → k) → + (Fin (Fintype.card (NonzeroSlope k)) → LineCover.Outcome (cubicShapes k) 3) := + fun a i => cubicTrialOutcome (gadgetSlope i) (a i) + have hconfig : gadgetConfig (k := k) = f ∘ gadgetInterceptEquiv := rfl + rw [hconfig, ← FiniteLaw.map_map] + have hreindex : (gadgetLaw k).map gadgetInterceptEquiv = + FiniteLaw.pi (fun _ : Fin (Fintype.card (NonzeroSlope k)) => + FiniteLaw.uniform k) := by + rw [gadgetLaw, FiniteLaw.pi_uniform, FiniteLaw.map_uniform_equiv, + FiniteLaw.pi_uniform] + rw [hreindex] + exact FiniteLaw.map_pi (fun _ => FiniteLaw.uniform k) + (fun i => cubicTrialOutcome (gadgetSlope i)) + +theorem gadgetConfig_survivors + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (a : GadgetOutcome k) : + LineCover.survivors ∅ (gadgetConfig a) = transformedRetained a := by + rw [transformedRetained_eq_survivors hcop] + ext x + have hright : x ∈ Finset.univ \ cubicDeletionUnion a ↔ + ∀ d : NonzeroSlope k, x ∉ cubicShape d.val (a d) := by + simp [cubicDeletionUnion] + rw [hright, LineCover.mem_survivors] + simp only [gadgetConfig, deleted_empty_cubicTrialOutcome] + constructor + · intro h d + simpa only [gadgetSlope, Equiv.symm_apply_apply] using + h ((Fintype.equivFin (NonzeroSlope k)) d) + · intro h i + exact h (gadgetSlope i) + +theorem gadgetLaw_transformedRetained_probability + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (x : Point k) : + (gadgetLaw k).prob (fun a => x ∈ transformedRetained a) = gadgetSurvival k := by + have h := gadgetTrials_uniformSurvival hcop x + rw [← gadgetLaw_map_config, FiniteLaw.prob_map] at h + simpa only [gadgetConfig_survivors hcop] using h + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/GadgetShapes.lean b/lean/OAI/Combinatorics/Ryser/Construction/GadgetShapes.lean new file mode 100644 index 0000000000000000000000000000000000000000..d07d5f30dffbd9b385a984609d08a9b7de9bb7ee --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/GadgetShapes.lean @@ -0,0 +1,128 @@ +import OAI.Combinatorics.Ryser.Construction.GadgetDefinitions +import OAI.Combinatorics.Ryser.LineCover.DeletionDefinitions +import OAI.Combinatorics.Ryser.LineCover.Definitions + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable (k : Type*) [Field k] [Fintype k] [DecidableEq k] + +def cubicShapes : Finset (Finset (Point k)) := + Finset.univ.image fun dz : NonzeroSlope k × k => cubicShape dz.1.val dz.2 + +theorem cubicShapes_card_le_square : (cubicShapes k).card ≤ Fintype.card k ^ 2 := by + calc + (cubicShapes k).card ≤ + (Finset.univ : Finset (NonzeroSlope k × k)).card := + Finset.card_image_le + _ = Fintype.card (NonzeroSlope k) * Fintype.card k := by + rw [Finset.card_univ, Fintype.card_prod] + _ ≤ Fintype.card k * Fintype.card k := + Nat.mul_le_mul_right _ + (Fintype.card_subtype_le (fun d : k => d ≠ 0)) + _ = Fintype.card k ^ 2 := (pow_two _).symm + +theorem cubicShapes_card_le : (cubicShapes k).card ≤ 3 * Fintype.card k ^ 3 := by + have hq : 1 ≤ Fintype.card k := Nat.succ_le_of_lt Fintype.card_pos + have hstep : Fintype.card k ^ 2 ≤ Fintype.card k ^ 3 := by + rw [pow_succ (Fintype.card k) 2] + simpa only [Nat.mul_one] using + (Nat.mul_le_mul_left (Fintype.card k ^ 2) hq) + exact (cubicShapes_card_le_square k).trans (hstep.trans (by omega)) + +variable {k} + +@[simp] theorem mem_cubicShapes {S : Finset (Point k)} : + S ∈ cubicShapes k ↔ ∃ d : NonzeroSlope k, ∃ z : k, cubicShape d.val z = S := by + simp only [cubicShapes, Finset.mem_image, Finset.mem_univ, true_and, Prod.exists] + +theorem cubicShape_mem_cubicShapes (d : NonzeroSlope k) (z : k) : + cubicShape d.val z ∈ cubicShapes k := + Finset.mem_image.mpr ⟨(d, z), Finset.mem_univ _, rfl⟩ + +theorem cubicShapes_member_card {S : Finset (Point k)} (hS : S ∈ cubicShapes k) : + S.card = Fintype.card k := by + obtain ⟨d, z, rfl⟩ := mem_cubicShapes.mp hS + exact cubicShape_card d.val z d.property + +theorem cubicShapes_member_card_le {S : Finset (Point k)} (hS : S ∈ cubicShapes k) : + S.card ≤ 3 * Fintype.card k := by + rw [cubicShapes_member_card hS] + omega + +variable (k) in +theorem cubicShapes_sparse : LineCover.SparseShapes (cubicShapes k) 3 := by + intro S hS ell _ + obtain ⟨d, z, rfl⟩ := mem_cubicShapes.mp hS + exact cubicShape_inter_linePoints_card_le d.val z d.property ell + +theorem cubicShapes_member_ne_linePoints (hcard : 3 < Fintype.card k) + {S : Finset (Point k)} (hS : S ∈ cubicShapes k) (ell : AffineLine k) : + S ≠ linePoints ell := by + obtain ⟨d, z, rfl⟩ := mem_cubicShapes.mp hS + exact cubicShape_ne_linePoints d.val z d.property hcard ell + +def cubicTrialOutcome (d : NonzeroSlope k) (z : k) : + LineCover.Outcome (cubicShapes k) 3 := + ⟨{⟨cubicShape d.val z, cubicShape_mem_cubicShapes d z⟩}, by simp⟩ + +@[simp] theorem cubicTrialOutcome_val (d : NonzeroSlope k) (z : k) : + (cubicTrialOutcome d z).val = + {⟨cubicShape d.val z, cubicShape_mem_cubicShapes d z⟩} := rfl + +@[simp] theorem mem_deleted_cubicTrialOutcome (ignore : Finset (Finset (Point k))) + (d : NonzeroSlope k) (z : k) (x : Point k) : + x ∈ LineCover.deleted ignore (cubicTrialOutcome d z) ↔ + cubicShape d.val z ∉ ignore ∧ x ∈ cubicShape d.val z := by + simp [LineCover.mem_deleted, cubicTrialOutcome] + +@[simp] theorem deleted_empty_cubicTrialOutcome (d : NonzeroSlope k) (z : k) : + LineCover.deleted ∅ (cubicTrialOutcome d z) = cubicShape d.val z := by + ext x + simp only [mem_deleted_cubicTrialOutcome, Finset.notMem_empty, not_false_eq_true, true_and] + +@[simp] theorem mem_deleted_empty_cubicTrialOutcome + (d : NonzeroSlope k) (z : k) (x : Point k) : + x ∈ LineCover.deleted ∅ (cubicTrialOutcome d z) ↔ x ∈ cubicShape d.val z := by + rw [deleted_empty_cubicTrialOutcome] + +theorem cubicTrialOutcome_no_line (d : NonzeroSlope k) (z : k) + (hcard : 3 < Fintype.card k) (ell : AffineLine k) : + ¬ ∃ S ∈ (cubicTrialOutcome d z).val, S.val = linePoints ell := by + rintro ⟨S, _, hline⟩ + exact cubicShapes_member_ne_linePoints hcard S.property ell hline + +theorem selected_cubicShapes_ne_linePoints {n : ℕ} + (ω : Fin n → LineCover.Outcome (cubicShapes k) 3) + (hcard : 3 < Fintype.card k) {S : Finset (Point k)} + (hS : S ∈ LineCover.selected ω) (ell : AffineLine k) : S ≠ linePoints ell := by + obtain ⟨i, T, _, rfl⟩ := LineCover.mem_selected.mp hS + exact cubicShapes_member_ne_linePoints hcard T.property ell + +@[simp] theorem mem_selected_cubicTrials {n : ℕ} + (d : Fin n → NonzeroSlope k) (z : Fin n → k) (S : Finset (Point k)) : + S ∈ LineCover.selected (fun i => cubicTrialOutcome (d i) (z i)) ↔ + ∃ i, cubicShape (d i).val (z i) = S := by + simp [LineCover.mem_selected, cubicTrialOutcome] + +@[simp] theorem mem_survivors_cubicTrials {n : ℕ} + (ignore : Finset (Finset (Point k))) + (d : Fin n → NonzeroSlope k) (z : Fin n → k) (x : Point k) : + x ∈ LineCover.survivors ignore (fun i => cubicTrialOutcome (d i) (z i)) ↔ + ∀ i, cubicShape (d i).val (z i) ∉ ignore → x ∉ cubicShape (d i).val (z i) := by + simp only [LineCover.mem_survivors, mem_deleted_cubicTrialOutcome, not_and] + +theorem survivors_cubicTrials_eq {n : ℕ} + (d : Fin n → NonzeroSlope k) (z : Fin n → k) : + LineCover.survivors ∅ (fun i => cubicTrialOutcome (d i) (z i)) = + Finset.univ \ Finset.univ.biUnion (fun i => cubicShape (d i).val (z i)) := by + simp only [LineCover.survivors, deleted_empty_cubicTrialOutcome] + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/GroupBounds.lean b/lean/OAI/Combinatorics/Ryser/Construction/GroupBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..2577a7513a1ed1a5b15e52805dee1c562e1aa6c7 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/GroupBounds.lean @@ -0,0 +1,97 @@ +import OAI.Combinatorics.Ryser.Construction.GroupPlacement +import OAI.Combinatorics.Ryser.Geometry.Cardinality +import Lean.Elab.Tactic.Omega + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] +variable [instDecidableEqk : DecidableEq k] [instDecidableEqF : DecidableEq F] [Fintype k] + +theorem exists_distinct_nonzero (hcard : 2 < Fintype.card k) : + ∃ u v : k, u ≠ 0 ∧ v ≠ 0 ∧ u ≠ v := by + classical + have hex : ∃ v : k, v ≠ 0 ∧ v ≠ 1 := by + by_contra h + push Not at h + have hsub : (Finset.univ : Finset k) ⊆ {0, 1} := by + intro x _ + by_cases hx : x = 0 + · simp [hx] + · simp [h x hx] + have hc := (Finset.card_le_card hsub).trans Finset.card_le_two + rw [Finset.card_univ] at hc + omega + obtain ⟨v, hv0, hv1⟩ := hex + exact ⟨1, v, one_ne_zero, hv0, hv1.symm⟩ + +theorem groupAxes_some_one_subset_none (σ : k →+* F) (u v : k) (huv : u ≠ v) + (hu : u ≠ 0) (hv : v ≠ 0) : + groupAxes σ u v huv (some 1) ⊆ groupAltered σ u v huv none := by + simpa [groupAxes, groupAltered, groupPlacement, cosetPlacement] using + diagonal_one_axisDirections_subset_extra_alteredDirections σ u v huv hu hv + +theorem groupAxes_none_subset_some_one (σ : k →+* F) (u v : k) (huv : u ≠ v) + (hu : u ≠ 0) (hv : v ≠ 0) : + groupAxes σ u v huv none ⊆ groupAltered σ u v huv (some 1) := by + simpa [groupAxes, groupAltered, groupPlacement, cosetPlacement] using + extra_axisDirections_subset_diagonal_one_alteredDirections σ u v huv hu hv + +theorem shared_groupAltered_axes_subset (σ : k →+* F) (u v : k) (huv : u ≠ v) + (hu : u ≠ 0) (hv : v ≠ 0) {i j : ConfigurationGroup σ} {d : Direction F} + (hij : i ≠ j) (hi : d ∈ groupAltered σ u v huv i) + (hj : d ∈ groupAltered σ u v huv j) : + groupAxes σ u v huv i ⊆ groupAltered σ u v huv j := by + rcases shared_groupAltered σ u v huv hij hi hj with h | h + · rcases h with ⟨rfl, rfl⟩ + exact groupAxes_none_subset_some_one σ u v huv hu hv + · rcases h with ⟨rfl, rfl⟩ + exact groupAxes_some_one_subset_none σ u v huv hu hv + +theorem groupConflict_card_le (σ : k →+* F) (u v : k) (huv : u ≠ v) + (i : ConfigurationGroup σ) : + (groupConflict σ u v huv i).card ≤ Fintype.card k + 1 := by + classical + cases i with + | none => exact le_of_eq (embeddedDirections_card σ) + | some c => + by_cases hc : c = 1 + · simpa [groupConflict, hc] using le_of_eq (embeddedDirections_card σ) + · simp only [groupConflict, ite_eq_right hc, groupAltered_card] + omega + +def groupPoints (σ : k →+* F) (u v : k) (huv : u ≠ v) + (i : ConfigurationGroup σ) : Finset (Point F) := + Finset.univ.image (fun w : Point k => (groupPlacement σ u v huv i).apply (mapPoint σ w)) + +theorem groupPoints_card (σ : k →+* F) (u v : k) (huv : u ≠ v) + (i : ConfigurationGroup σ) : + (groupPoints σ u v huv i).card = Fintype.card k ^ 2 := by + have hinj : Function.Injective + (fun w : Point k => (groupPlacement σ u v huv i).apply (mapPoint σ w)) := + (groupPlacement σ u v huv i).apply_injective.comp (mapPoint_injective σ) + rw [groupPoints, Finset.card_image_of_injective _ hinj, Finset.card_univ] + exact card_point + +section FiniteAmbient + +variable [Fintype F] + +theorem card_groups_mul_sub_one_le (σ : k →+* F) : + Fintype.card (ConfigurationGroup σ) * (Fintype.card k - 1) ≤ + 2 * Fintype.card F := let _ := instDecidableEqk; let _ := instDecidableEqF; by + have hcard : Fintype.card k ≤ Fintype.card F := + Fintype.card_le_of_injective σ σ.injective + rw [card_configurationGroup, Nat.add_mul, card_cosetIndex_mul, one_mul] + omega + +end FiniteAmbient + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/GroupPlacement.lean b/lean/OAI/Combinatorics/Ryser/Construction/GroupPlacement.lean new file mode 100644 index 0000000000000000000000000000000000000000..b14a67d2169908941b9847a0ed9ae2d49516d20d --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/GroupPlacement.lean @@ -0,0 +1,205 @@ +import OAI.Combinatorics.Ryser.Construction.CosetDirections +import OAI.Combinatorics.Ryser.Construction.ExtraDirections + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] +variable [DecidableEq k] [DecidableEq F] [Fintype k] + +def embeddedDirections (σ : k →+* F) : Finset (Direction F) := + Finset.univ.image (mapDirection σ) + +def groupPlacement (σ : k →+* F) (u v : k) (huv : u ≠ v) : + ConfigurationGroup σ → PlaneLinearMap F + | none => PlaneLinearMap.extra (σ u) (σ v) (σ.injective.ne huv) + | some c => cosetPlacement σ c + +def groupAltered (σ : k →+* F) (u v : k) (huv : u ≠ v) + (i : ConfigurationGroup σ) : Finset (Direction F) := + alteredDirections σ (groupPlacement σ u v huv i) + +def groupAxes (σ : k →+* F) (u v : k) (huv : u ≠ v) + (i : ConfigurationGroup σ) : Finset (Direction F) := + axisDirections σ (groupPlacement σ u v huv i) + +def groupConflict (σ : k →+* F) (u v : k) (huv : u ≠ v) + (i : ConfigurationGroup σ) : Finset (Direction F) := by + classical + exact match i with + | none => embeddedDirections σ + | some c => if c = 1 then embeddedDirections σ else groupAltered σ u v huv (some c) + +theorem groupAltered_card (σ : k →+* F) (u v : k) (huv : u ≠ v) + (i : ConfigurationGroup σ) : + (groupAltered σ u v huv i).card = Fintype.card k - 1 := + card_alteredDirections σ _ + +theorem groupAxes_card (σ : k →+* F) (u v : k) (huv : u ≠ v) + (i : ConfigurationGroup σ) : (groupAxes σ u v huv i).card = 2 := + card_axisDirections σ _ + +theorem embeddedDirections_card (σ : k →+* F) : + (embeddedDirections σ).card = Fintype.card k + 1 := by + rw [embeddedDirections, Finset.card_image_of_injective _ (mapDirection_injective σ), + Finset.card_univ, Fintype.card_option] + +theorem coset_altered_embedded_index (σ : k →+* F) {c : CosetIndex σ} + {d : Direction F} (hc : d ∈ alteredDirections σ (cosetPlacement σ c)) + (hd : d ∈ embeddedDirections σ) : c = 1 := by + obtain ⟨e, _, he⟩ := Finset.mem_image.mp hd + cases e with + | none => + have he' : d = none := he.symm + subst d + exact (none_notMem_coset_altered σ c hc).elim + | some t => + have he' : d = some (σ t) := he.symm + subst d + have ht : t ≠ 0 := by + intro ht + subst t + exact zero_notMem_coset_altered σ c (by simp [mapDirection] at hc) + have h1 : some (σ t) ∈ alteredDirections σ (cosetPlacement σ 1) := by + apply (mem_coset_altered_iff σ 1 _).mpr + exact ⟨t, ht, by simp⟩ + exact coset_altered_index_eq σ hc h1 + +theorem identity_altered_subset_embedded (σ : k →+* F) : + alteredDirections σ (cosetPlacement σ 1) ⊆ embeddedDirections σ := by + intro d hd + obtain ⟨t, ht, rfl⟩ := (mem_coset_altered_iff σ 1 d).mp hd + apply Finset.mem_image.mpr + exact ⟨some t, Finset.mem_univ _, by simp [mapDirection]⟩ + +theorem groupAltered_subset_conflict (σ : k →+* F) (u v : k) (huv : u ≠ v) + (i : ConfigurationGroup σ) : groupAltered σ u v huv i ⊆ groupConflict σ u v huv i := by + classical + cases i with + | none => + intro d hd + change d ∈ embeddedDirections σ + change d ∈ alteredDirections σ + (PlaneLinearMap.extra (σ u) (σ v) (σ.injective.ne huv)) at hd + rw [extra_alteredDirections σ u v huv] at hd + exact (Finset.mem_sdiff.mp hd).1 + | some c => + by_cases hc : c = 1 + · subst c + simpa [groupConflict, groupAltered, groupPlacement] using + identity_altered_subset_embedded σ + · simp only [groupConflict, ite_eq_right hc] + exact Finset.Subset.refl _ + +theorem exists_groupAltered (σ : k →+* F) (u v : k) (huv : u ≠ v) + (hu : u ≠ 0) (hv : v ≠ 0) (d : Direction F) : + ∃ i : ConfigurationGroup σ, d ∈ groupAltered σ u v huv i := by + cases d with + | none => exact ⟨none, none_mem_extra_alteredDirections σ u v huv⟩ + | some a => + by_cases ha : a = 0 + · subst a + exact ⟨none, zero_mem_extra_alteredDirections σ u v huv hu hv⟩ + · obtain ⟨c, hc, _⟩ := existsUnique_coset_altered σ a ha + exact ⟨some c, hc⟩ + +theorem shared_groupConflict (σ : k →+* F) (u v : k) (huv : u ≠ v) + {i j : ConfigurationGroup σ} {d : Direction F} (hij : i ≠ j) + (hi : d ∈ groupConflict σ u v huv i) + (hj : d ∈ groupConflict σ u v huv j) : + (i = none ∧ j = some 1) ∨ (i = some 1 ∧ j = none) := by + classical + cases i with + | none => + cases j with + | none => exact (hij rfl).elim + | some c => + have hc : c = 1 := by + by_contra hc + have hj' : d ∈ alteredDirections σ (cosetPlacement σ c) := by + simpa [groupConflict, hc, groupAltered, groupPlacement] using hj + exact hc (coset_altered_embedded_index σ hj' hi) + exact Or.inl ⟨rfl, congrArg some hc⟩ + | some c => + cases j with + | none => + have hc : c = 1 := by + by_contra hc + have hi' : d ∈ alteredDirections σ (cosetPlacement σ c) := by + simpa [groupConflict, hc, groupAltered, groupPlacement] using hi + exact hc (coset_altered_embedded_index σ hi' hj) + exact Or.inr ⟨congrArg some hc, rfl⟩ + | some e => + have hce : c ≠ e := fun h => hij (congrArg some h) + by_cases hc : c = 1 + · subst c + have he : e ≠ 1 := Ne.symm hce + have hj' : d ∈ alteredDirections σ (cosetPlacement σ e) := by + simpa [groupConflict, he, groupAltered, groupPlacement] using hj + have hi' : d ∈ embeddedDirections σ := by simpa [groupConflict] using hi + exact (he (coset_altered_embedded_index σ hj' hi')).elim + · have hi' : d ∈ alteredDirections σ (cosetPlacement σ c) := by + simpa [groupConflict, hc, groupAltered, groupPlacement] using hi + by_cases he : e = 1 + · subst e + have hj' : d ∈ embeddedDirections σ := by simpa [groupConflict] using hj + exact (hc (coset_altered_embedded_index σ hi' hj')).elim + · have hj' : d ∈ alteredDirections σ (cosetPlacement σ e) := by + simpa [groupConflict, he, groupAltered, groupPlacement] using hj + exact (hce (coset_altered_index_eq σ hi' hj')).elim + +theorem shared_groupAltered (σ : k →+* F) (u v : k) (huv : u ≠ v) + {i j : ConfigurationGroup σ} {d : Direction F} (hij : i ≠ j) + (hi : d ∈ groupAltered σ u v huv i) + (hj : d ∈ groupAltered σ u v huv j) : + (i = none ∧ j = some 1) ∨ (i = some 1 ∧ j = none) := + shared_groupConflict σ u v huv hij + (groupAltered_subset_conflict σ u v huv i hi) + (groupAltered_subset_conflict σ u v huv j hj) + +section FiniteAmbient + +variable [Fintype F] + +theorem groupConflict_multiplicity_le_two (σ : k →+* F) (u v : k) (huv : u ≠ v) + (d : Direction F) : + (Finset.univ.filter (fun i => d ∈ groupConflict σ u v huv i)).card ≤ 2 := by + classical + let I := Finset.univ.filter (fun i => d ∈ groupConflict σ u v huv i) + by_cases hsingle : ∀ i ∈ I, ∀ j ∈ I, i = j + · have hcard : I.card ≤ 1 := Finset.card_le_one.mpr hsingle + exact hcard.trans (by decide) + · push Not at hsingle + obtain ⟨i, hi, j, hj, hij⟩ := hsingle + have hsub : I ⊆ ({none, some 1} : Finset (ConfigurationGroup σ)) := by + intro a ha + by_cases hai : a = i + · subst a + rcases shared_groupConflict σ u v huv hij (Finset.mem_filter.mp hi).2 + (Finset.mem_filter.mp hj).2 with h | h + · simp [h.1] + · simp [h.1] + · rcases shared_groupConflict σ u v huv hai (Finset.mem_filter.mp ha).2 + (Finset.mem_filter.mp hi).2 with h | h + · simp [h.1] + · simp [h.1] + exact (Finset.card_le_card hsub).trans Finset.card_le_two + +theorem groupAltered_multiplicity_le_two (σ : k →+* F) (u v : k) (huv : u ≠ v) + (d : Direction F) : + (Finset.univ.filter (fun i => d ∈ groupAltered σ u v huv i)).card ≤ 2 := by + apply (Finset.card_le_card ?_).trans (groupConflict_multiplicity_le_two σ u v huv d) + intro i hi + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _, + groupAltered_subset_conflict σ u v huv i (Finset.mem_filter.mp hi).2⟩ + +end FiniteAmbient + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/GroupSelection.lean b/lean/OAI/Combinatorics/Ryser/Construction/GroupSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..9007000ac7eb341b37925e27fb07bd2957686881 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/GroupSelection.lean @@ -0,0 +1,159 @@ +import OAI.Combinatorics.Ryser.Construction.GroupBounds +import OAI.Combinatorics.Ryser.Construction.DeletionUnionBasic +import OAI.Combinatorics.Ryser.Selection.Definitions + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] +variable [DecidableEq k] [DecidableEq F] [Fintype k] [Fintype F] + +def groupSelectionData (σ : k →+* F) (u v : k) (huv : u ≠ v) : + Selection.Data F (Fintype.card (ConfigurationGroup σ)) where + W i := groupPoints σ u v huv ((Fintype.equivFin (ConfigurationGroup σ)).symm i) + dirs i := groupConflict σ u v huv ((Fintype.equivFin (ConfigurationGroup σ)).symm i) + +@[simp] theorem groupSelectionData_W_equivFin (σ : k →+* F) + (u v : k) (huv : u ≠ v) (i : ConfigurationGroup σ) : + (groupSelectionData σ u v huv).W ((Fintype.equivFin (ConfigurationGroup σ)) i) = + groupPoints σ u v huv i := by + simp only [groupSelectionData, Equiv.symm_apply_apply] + +@[simp] theorem groupSelectionData_dirs_equivFin (σ : k →+* F) + (u v : k) (huv : u ≠ v) (i : ConfigurationGroup σ) : + (groupSelectionData σ u v huv).dirs ((Fintype.equivFin (ConfigurationGroup σ)) i) = + groupConflict σ u v huv i := by + simp only [groupSelectionData, Equiv.symm_apply_apply] + +def groupSelectionConstant (s : ℕ) : ℕ := s ^ 2 + s + 2 + +theorem card_groups_le_two_mul_card (σ : k →+* F) + (hs : 2 ≤ Fintype.card k) : + Fintype.card (ConfigurationGroup σ) ≤ 2 * Fintype.card F := by + have hfactor : 1 ≤ Fintype.card k - 1 := by omega + have hle : Fintype.card (ConfigurationGroup σ) ≤ + Fintype.card (ConfigurationGroup σ) * (Fintype.card k - 1) := by + simpa only [Nat.mul_one] using + Nat.mul_le_mul_left (Fintype.card (ConfigurationGroup σ)) hfactor + exact hle.trans (card_groups_mul_sub_one_le σ) + +theorem groupSelectionData_direction_multiplicity_le_two + (σ : k →+* F) (u v : k) (huv : u ≠ v) (d : Direction F) : + (Finset.univ.filter (fun i => d ∈ (groupSelectionData σ u v huv).dirs i)).card ≤ 2 := by + classical + let e := Fintype.equivFin (ConfigurationGroup σ) + let I := Finset.univ.filter (fun i => d ∈ (groupSelectionData σ u v huv).dirs i) + let J := Finset.univ.filter (fun i => d ∈ groupConflict σ u v huv i) + have hsub : I.image e.symm ⊆ J := by + intro i hi + obtain ⟨j, hj, rfl⟩ := Finset.mem_image.mp hi + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _, (Finset.mem_filter.mp hj).2⟩ + have hc := Finset.card_le_card hsub + rw [Finset.card_image_of_injective _ e.symm.injective] at hc + exact hc.trans (groupConflict_multiplicity_le_two σ u v huv d) + +theorem groupSelectionData_bounded (σ : k →+* F) (u v : k) (huv : u ≠ v) + (hs : 2 ≤ Fintype.card k) : + Selection.Bounded (groupSelectionConstant (Fintype.card k)) + (groupSelectionData σ u v huv) := by + classical + have htwo : 2 ≤ groupSelectionConstant (Fintype.card k) := by + unfold groupSelectionConstant + omega + refine ⟨?_, ?_, ?_, ?_⟩ + · exact (card_groups_le_two_mul_card σ hs).trans + (Nat.mul_le_mul_right (Fintype.card F) htwo) + · intro i + change (groupPoints σ u v huv + ((Fintype.equivFin (ConfigurationGroup σ)).symm i)).card ≤ _ + rw [groupPoints_card] + unfold groupSelectionConstant + omega + · intro i + have hc := groupConflict_card_le σ u v huv + ((Fintype.equivFin (ConfigurationGroup σ)).symm i) + change (groupConflict σ u v huv + ((Fintype.equivFin (ConfigurationGroup σ)).symm i)).card ≤ _ + unfold groupSelectionConstant + omega + · intro d + exact (groupSelectionData_direction_multiplicity_le_two σ u v huv d).trans htwo + +def selectedShifts (σ : k →+* F) {K : ℕ} + (pool : Selection.Pool F (Fintype.card (ConfigurationGroup σ)) K) + (choice : Fin (Fintype.card (ConfigurationGroup σ)) → Fin K) + (i : ConfigurationGroup σ) : Point F := + pool ((Fintype.equivFin (ConfigurationGroup σ)) i, + choice ((Fintype.equivFin (ConfigurationGroup σ)) i)) + +theorem selectedShifts_projection_ne + (σ : k →+* F) (u v : k) (huv : u ≠ v) {K : ℕ} + (pool : Selection.Pool F (Fintype.card (ConfigurationGroup σ)) K) + (choice : Fin (Fintype.card (ConfigurationGroup σ)) → Fin K) + (hchoice : ∀ i j, i ≠ j → + ¬ Selection.Conflict (groupSelectionData σ u v huv) i j + (pool (i, choice i)) (pool (j, choice j))) + (i j : ConfigurationGroup σ) (hij : i ≠ j) + (x y : Point k) (d : Direction F) + (hd : d ∈ groupConflict σ u v huv i ∪ groupConflict σ u v huv j) : + projection d (placedPoint σ (groupPlacement σ u v huv i) + (selectedShifts σ pool choice i) x) ≠ + projection d (placedPoint σ (groupPlacement σ u v huv j) + (selectedShifts σ pool choice j) y) := by + classical + let e := Fintype.equivFin (ConfigurationGroup σ) + intro heq + apply hchoice (e i) (e j) (fun h => hij (e.injective h)) + refine ⟨(groupPlacement σ u v huv i).apply (mapPoint σ x), ?_, + (groupPlacement σ u v huv j).apply (mapPoint σ y), ?_, d, ?_, ?_⟩ + · change (groupPlacement σ u v huv i).apply (mapPoint σ x) ∈ + groupPoints σ u v huv (e.symm (e i)) + rw [e.symm_apply_apply] + exact Finset.mem_image.mpr ⟨x, Finset.mem_univ _, rfl⟩ + · change (groupPlacement σ u v huv j).apply (mapPoint σ y) ∈ + groupPoints σ u v huv (e.symm (e j)) + rw [e.symm_apply_apply] + exact Finset.mem_image.mpr ⟨y, Finset.mem_univ _, rfl⟩ + · change d ∈ groupConflict σ u v huv (e.symm (e i)) ∪ + groupConflict σ u v huv (e.symm (e j)) + simpa only [e.symm_apply_apply] using hd + · rw [Selection.projection_sub_eq] + exact sub_eq_zero.mpr (by + simpa only [placedPoint, selectedShifts, e] using heq) + +theorem selectedShifts_deletionSeparated + (σ : k →+* F) (u v : k) (huv : u ≠ v) {K : ℕ} + (pool : Selection.Pool F (Fintype.card (ConfigurationGroup σ)) K) + (choice : Fin (Fintype.card (ConfigurationGroup σ)) → Fin K) + (hchoice : ∀ i j, i ≠ j → + ¬ Selection.Conflict (groupSelectionData σ u v huv) i j + (pool (i, choice i)) (pool (j, choice j))) + (a : GadgetOutcome k) : + DeletionSeparated σ (groupPlacement σ u v huv) (selectedShifts σ pool choice) a := by + classical + intro i j hij p hp q hq d hd + obtain ⟨x, rfl⟩ := + (mem_placedSubplane_iff σ (groupPlacement σ u v huv i) + (selectedShifts σ pool choice i) p).mp hp + obtain ⟨y, _, rfl⟩ := Finset.mem_image.mp hq + apply selectedShifts_projection_ne σ u v huv pool choice hchoice i j hij x y d + exact Finset.mem_union_right _ (groupAltered_subset_conflict σ u v huv j hd) + +theorem exists_selectedShifts_deletionSeparated + (σ : k →+* F) (u v : k) (huv : u ≠ v) {K : ℕ} + (pool : Selection.Pool F (Fintype.card (ConfigurationGroup σ)) K) + (hcompatible : Selection.HasCompatibleChoice (groupSelectionData σ u v huv) pool) : + ∃ choice : Fin (Fintype.card (ConfigurationGroup σ)) → Fin K, + ∀ a : GadgetOutcome k, + DeletionSeparated σ (groupPlacement σ u v huv) (selectedShifts σ pool choice) a := by + obtain ⟨choice, hchoice⟩ := hcompatible + exact ⟨choice, fun a => selectedShifts_deletionSeparated σ u v huv pool choice hchoice a⟩ + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/Hypergraph.lean b/lean/OAI/Combinatorics/Ryser/Construction/Hypergraph.lean new file mode 100644 index 0000000000000000000000000000000000000000..8be1298898cbf27797aa16d05d397c3de8ca3025 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/Hypergraph.lean @@ -0,0 +1,176 @@ +import OAI.Combinatorics.Ryser.Geometry.Basic +import OAI.Combinatorics.Ryser.Hypergraph.Partite +import Mathlib.Data.Fintype.Sigma +import Mathlib.Data.Fintype.Option + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +structure ConfigurationData (k F G : Type*) [DecidableEq F] where + altered : G → Finset (Direction F) + inverseSlope : ∀ i, {d : Direction F // d ∈ altered i} → k + base : G → Point k → Point F + transform : Point k → Point k + retained : Finset (Point k) + ordinaryPoints : Finset (Point F) + +abbrev Vertex {k F G : Type*} [DecidableEq F] + (altered : G → Finset (Direction F)) := + AffineLine F ⊕ (Σ i : G, {d : Direction F // d ∈ altered i} × k) + +variable {k F G : Type*} [instFieldk : Field k] [instFieldF : Field F] +variable [instDecidableEqk : DecidableEq k] [DecidableEq F] [instDecidableEqG : DecidableEq G] + +def ordinaryVertex (data : ConfigurationData k F G) (ell : AffineLine F) : + Vertex (k := k) data.altered := Sum.inl ell + +def specialVertex (data : ConfigurationData k F G) (i : G) + (d : {d : Direction F // d ∈ data.altered i}) (c : k) : + Vertex (k := k) data.altered := Sum.inr ⟨i, (d, c)⟩ + +def vertexPart (data : ConfigurationData k F G) : + Vertex (k := k) data.altered → Direction F + | Sum.inl ell => ell.1 + | Sum.inr v => v.2.1.val + +@[simp] theorem vertexPart_ordinaryVertex (data : ConfigurationData k F G) + (ell : AffineLine F) : vertexPart data (ordinaryVertex data ell) = ell.1 := let _ := instFieldk; let _ := instFieldF; let _ := instDecidableEqk; let _ := instDecidableEqG; rfl + +@[simp] theorem vertexPart_specialVertex (data : ConfigurationData k F G) (i : G) + (d : {d : Direction F // d ∈ data.altered i}) (c : k) : + vertexPart data (specialVertex data i d c) = d.val := let _ := instFieldk; let _ := instFieldF; let _ := instDecidableEqk; let _ := instDecidableEqG; rfl + +def exceptionalVertex (data : ConfigurationData k F G) (i : G) (w : Point k) + (d : Direction F) : Vertex (k := k) data.altered := + if h : d ∈ data.altered i then + specialVertex data i ⟨d, h⟩ + (projection (some (data.inverseSlope i ⟨d, h⟩)) (data.transform w)) + else ordinaryVertex data (lineThrough d (data.base i w)) + +theorem exceptionalVertex_of_mem (data : ConfigurationData k F G) (i : G) + (w : Point k) (d : Direction F) (hd : d ∈ data.altered i) : + exceptionalVertex data i w d = specialVertex data i ⟨d, hd⟩ + (projection (some (data.inverseSlope i ⟨d, hd⟩)) (data.transform w)) := let _ := instDecidableEqk; let _ := instDecidableEqG; by + simp only [exceptionalVertex, dite_eq_left hd] + +theorem exceptionalVertex_of_notMem (data : ConfigurationData k F G) (i : G) + (w : Point k) (d : Direction F) (hd : d ∉ data.altered i) : + exceptionalVertex data i w d = ordinaryVertex data (lineThrough d (data.base i w)) := let _ := instDecidableEqk; let _ := instDecidableEqG; by + simp only [exceptionalVertex, dite_eq_right hd] + +@[simp] theorem vertexPart_exceptionalVertex (data : ConfigurationData k F G) + (i : G) (w : Point k) (d : Direction F) : + vertexPart data (exceptionalVertex data i w d) = d := by + by_cases hd : d ∈ data.altered i + · rw [exceptionalVertex_of_mem data i w d hd] + rfl + · rw [exceptionalVertex_of_notMem data i w d hd] + rfl + +variable [Fintype F] + +def ordinaryEdge (data : ConfigurationData k F G) (x : Point F) : + Finset (Vertex (k := k) data.altered) := + Finset.univ.image (fun d => ordinaryVertex data (lineThrough d x)) + +def exceptionalEdge (data : ConfigurationData k F G) (i : G) (w : Point k) : + Finset (Vertex (k := k) data.altered) := + Finset.univ.image (exceptionalVertex data i w) + +theorem ordinaryVertex_mem_ordinaryEdge (data : ConfigurationData k F G) + (x : Point F) (d : Direction F) : + ordinaryVertex data (lineThrough d x) ∈ ordinaryEdge data x := let _ := instFieldk; + Finset.mem_image_of_mem _ (Finset.mem_univ d) + +theorem exceptionalVertex_mem_exceptionalEdge (data : ConfigurationData k F G) + (i : G) (w : Point k) (d : Direction F) : + exceptionalVertex data i w d ∈ exceptionalEdge data i w := + Finset.mem_image_of_mem _ (Finset.mem_univ d) + +theorem selector_edge_partite {I V : Type*} [Fintype I] [DecidableEq I] + [DecidableEq V] (part : V → I) (selector : I → V) + (hpart : ∀ i, part (selector i) = i) : + ∀ i, ∃! v, v ∈ Finset.univ.image selector ∧ part v = i := by + intro i + refine ⟨selector i, ⟨Finset.mem_image_of_mem _ (Finset.mem_univ i), hpart i⟩, ?_⟩ + rintro v ⟨hv, hvi⟩ + obtain ⟨j, _, rfl⟩ := Finset.mem_image.mp hv + rw [hpart j] at hvi + exact congrArg selector hvi + +theorem mem_selector_edge_iff {I V : Type*} [Fintype I] [DecidableEq I] + [DecidableEq V] (part : V → I) (selector : I → V) + (hpart : ∀ i, part (selector i) = i) (v : V) : + v ∈ Finset.univ.image selector ↔ v = selector (part v) := by + constructor + · intro hv + obtain ⟨i, _, rfl⟩ := Finset.mem_image.mp hv + rw [hpart i] + · intro hv + rw [hv] + exact Finset.mem_image_of_mem _ (Finset.mem_univ _) + +theorem ordinaryEdge_partite (data : ConfigurationData k F G) (x : Point F) : + ∀ d, ∃! v, v ∈ ordinaryEdge data x ∧ vertexPart data v = d := let _ := instFieldk; + selector_edge_partite (vertexPart data) + (fun d => ordinaryVertex data (lineThrough d x)) (fun _ => rfl) + +theorem exceptionalEdge_partite (data : ConfigurationData k F G) (i : G) + (w : Point k) : + ∀ d, ∃! v, v ∈ exceptionalEdge data i w ∧ vertexPart data v = d := + selector_edge_partite (vertexPart data) (exceptionalVertex data i w) + (vertexPart_exceptionalVertex data i w) + +theorem mem_exceptionalEdge_iff (data : ConfigurationData k F G) (i : G) + (w : Point k) (v : Vertex (k := k) data.altered) : + v ∈ exceptionalEdge data i w ↔ + v = exceptionalVertex data i w (vertexPart data v) := + mem_selector_edge_iff (vertexPart data) (exceptionalVertex data i w) + (vertexPart_exceptionalVertex data i w) v + +variable [Fintype G] + +def hypergraph (data : ConfigurationData k F G) : + Hypergraph (Vertex (k := k) data.altered) := by + classical + exact data.ordinaryPoints.image (ordinaryEdge data) ∪ + Finset.univ.biUnion (fun i => data.retained.image (exceptionalEdge data i)) + +@[simp] theorem mem_hypergraph (data : ConfigurationData k F G) + (e : Finset (Vertex (k := k) data.altered)) : + e ∈ hypergraph data ↔ + (∃ x ∈ data.ordinaryPoints, ordinaryEdge data x = e) ∨ + (∃ i, ∃ w ∈ data.retained, exceptionalEdge data i w = e) := by + classical + simp only [hypergraph, Finset.mem_union, Finset.mem_image, Finset.mem_biUnion, + Finset.mem_univ, true_and] + +theorem hypergraph_partite (data : ConfigurationData k F G) : + PartiteUniform (vertexPart data) (hypergraph data) := by + intro e he + rcases (mem_hypergraph data e).mp he with ⟨x, _, rfl⟩ | ⟨i, w, _, rfl⟩ + · exact ordinaryEdge_partite data x + · exact exceptionalEdge_partite data i w + +theorem hypergraph_uniform (data : ConfigurationData k F G) : + Uniform (Fintype.card F + 1) (hypergraph data) := by + simpa only [Fintype.card_option] using (hypergraph_partite data).uniform + +theorem hypergraph_rPartiteUniform (data : ConfigurationData k F G) : + RPartiteUniform (Fintype.card F + 1) (hypergraph data) := by + simpa only [Fintype.card_option] using (hypergraph_partite data).rPartiteUniform + +theorem hypergraph_nonempty (data : ConfigurationData k F G) (i : G) + (hY : data.retained.Nonempty) : (hypergraph data).Nonempty := by + obtain ⟨w, hw⟩ := hY + refine ⟨exceptionalEdge data i w, (mem_hypergraph data _).mpr ?_⟩ + exact Or.inr ⟨i, w, hw, rfl⟩ + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/InfiniteCover.lean b/lean/OAI/Combinatorics/Ryser/Construction/InfiniteCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..9d10f69d58e83afe7f2311a02e396f13f2ceb8d5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/InfiniteCover.lean @@ -0,0 +1,102 @@ +import OAI.Combinatorics.Ryser.Construction.ExceptionalCover +import OAI.Combinatorics.Ryser.Construction.ExceptionalBudget +import OAI.Combinatorics.Ryser.Construction.CoverBudget +import OAI.Combinatorics.Ryser.Construction.GadgetConsequences + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +variable {k F G : Type*} [Field k] [Field F] +variable [DecidableEq k] [DecidableEq F] [DecidableEq G] +variable [Fintype k] [Fintype F] +variable (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) +variable (Y : Finset (Point k)) (X : Finset (Point F)) + +local notation "cfg" => placedConfiguration σ M b Y X +local notation "axes" => (fun i => axisDirections σ (M i)) + +theorem exceptional_cover_card_lower_bound + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (hY : GadgetCoverProperty (Y.image cubeMap)) (i : G) + (C : Finset (Vertex (k := k) (cfg).altered)) + (hcover : ∀ w ∈ Y, ∃ v ∈ C, v ∈ exceptionalEdge cfg i w) : + Fintype.card k ≤ C.card := by + obtain ⟨L, hLC, hLcover⟩ := + exists_line_cover_of_exceptional_cover σ M b Y X hcop i C hcover + have hweight := hY.weighted_card_lower_bound ∅ L (by + intro y hy + exact Or.inr (hLcover y hy)) + simp only [Finset.card_empty, Nat.add_zero] at hweight + omega + +theorem exceptional_resource_weight_lower_bound + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (hY : GadgetCoverProperty (Y.image cubeMap)) (i : G) + (C : Finset (Vertex (k := k) (cfg).altered)) + (hcover : ∀ w ∈ Y, ∃ v ∈ C, v ∈ exceptionalEdge cfg i w) : + 2 * Fintype.card k ≤ + 2 * (lineResources cfg axes C i).card + (pointResources cfg axes C i).card := by + obtain ⟨L, B, hL, hB, hcover'⟩ := + exists_mixed_cover_of_exceptional_cover σ M b Y X hcop i C hcover + have hweight := hY.weighted_card_lower_bound B L hcover' + omega + +variable [Fintype G] + +theorem single_infinite_center_impossible + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (hY : GadgetCoverProperty (Y.image cubeMap)) + (C : Finset (Vertex (k := k) (cfg).altered)) + (hC : IsCover (hypergraph cfg) C) (hCcard : C.card ≤ Fintype.card F) + (B : Finset (AffineLine F)) (d : Direction F) (i : G) + (hd : d ∈ alteredDirections σ (M i)) + (hforced : forcedPencilVertices cfg B (Sum.inr d) ⊆ C) + (hdeleted : (B ∩ affinePencil (Sum.inr d)).card ≤ Fintype.card k - 1) : + False := by + have hcover := exceptional_cover_additional_of_altered cfg C hC B d i hd + have hlower := exceptional_cover_card_lower_bound σ M b Y X hcop hY i + (C \ forcedPencilVertices cfg B (Sum.inr d)) hcover + have hupper := infinite_additional_card_le_of_deleted_le cfg B d C hforced hCcard + (Fintype.card k - 1) hdeleted + have hs : 0 < Fintype.card k := Fintype.card_pos + omega + +theorem double_infinite_center_impossible + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (hY : GadgetCoverProperty (Y.image cubeMap)) + (C : Finset (Vertex (k := k) (cfg).altered)) + (hC : IsCover (hypergraph cfg) C) (hCcard : C.card ≤ Fintype.card F) + (B : Finset (AffineLine F)) (d : Direction F) (i j : G) (hij : i ≠ j) + (hdi : d ∈ alteredDirections σ (M i)) + (hdj : d ∈ alteredDirections σ (M j)) + (haxesij : axisDirections σ (M i) ⊆ alteredDirections σ (M j)) + (haxesji : axisDirections σ (M j) ⊆ alteredDirections σ (M i)) + (hforced : forcedPencilVertices cfg B (Sum.inr d) ⊆ C) + (hdeleted : (B ∩ affinePencil (Sum.inr d)).card ≤ 2 * (Fintype.card k - 1)) : + False := by + let A := C \ forcedPencilVertices cfg B (Sum.inr d) + have hcoveri : ∀ w ∈ Y, ∃ v ∈ A, v ∈ exceptionalEdge cfg i w := + exceptional_cover_additional_of_altered cfg C hC B d i hdi + have hcoverj : ∀ w ∈ Y, ∃ v ∈ A, v ∈ exceptionalEdge cfg j w := + exceptional_cover_additional_of_altered cfg C hC B d j hdj + have hi := exceptional_resource_weight_lower_bound σ M b Y X hcop hY i A hcoveri + have hj := exceptional_resource_weight_lower_bound σ M b Y X hcop hY j A hcoverj + have hbudget : A.card ≤ 2 * (Fintype.card k - 1) := + infinite_additional_card_le_of_deleted_le cfg B d C hforced hCcard + (2 * (Fintype.card k - 1)) hdeleted + exact two_group_resource_budget_impossible A + (lineResources cfg axes A i) (pointResources cfg axes A i) + (lineResources cfg axes A j) (pointResources cfg axes A j) + (Fintype.card k) Fintype.card_pos + (lineResources_subset cfg axes A i) (pointResources_subset cfg axes A i) + (lineResources_subset cfg axes A j) (pointResources_subset cfg axes A j) + (lineResources_disjoint_pointResources cfg axes A i) + (lineResources_disjoint_pointResources cfg axes A j) + (lineResources_disjoint_other_of_axis_subset cfg axes A i j hij haxesij) + (lineResources_disjoint_other_of_axis_subset cfg axes A j i hij.symm haxesji) + hi hj hbudget + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/Intersection.lean b/lean/OAI/Combinatorics/Ryser/Construction/Intersection.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc68f33747543294326e2ce801d08894c89b502b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/Intersection.lean @@ -0,0 +1,186 @@ +import OAI.Combinatorics.Ryser.Construction.LabelAction +import OAI.Combinatorics.Ryser.Geometry.AffineJoins + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +variable {k F G : Type*} [Field k] [Field F] +variable [DecidableEq k] [DecidableEq F] [DecidableEq G] [Fintype F] + +private theorem exists_equal_projection {K : Type*} [Field K] [DecidableEq K] + (p q : Point K) : ∃ d : Direction K, projection d p = projection d q := by + refine ⟨(joinLine p q).1, ?_⟩ + have hp : projection (joinLine p q).1 p = (joinLine p q).2 := + incidence_joinLine_left p q + have hq : projection (joinLine p q).1 q = (joinLine p q).2 := + incidence_joinLine_right p q + exact hp.trans hq.symm + +theorem ordinaryEdge_inter_ordinaryEdge (data : ConfigurationData k F G) + (x y : Point F) : (ordinaryEdge data x ∩ ordinaryEdge data y).Nonempty := by + refine ⟨ordinaryVertex data (joinLine x y), Finset.mem_inter.mpr ⟨?_, ?_⟩⟩ + · exact (ordinaryVertex_mem_ordinaryEdge_iff data x _).2 + (incidence_joinLine_left x y) + · exact (ordinaryVertex_mem_ordinaryEdge_iff data y _).2 + (incidence_joinLine_right x y) + +theorem exceptionalEdge_inter_of_projection_eq (data : ConfigurationData k F G) + (i j : G) (w z : Point k) (d : Direction F) + (hi : d ∉ data.altered i) (hj : d ∉ data.altered j) + (heq : projection d (data.base i w) = projection d (data.base j z)) : + (exceptionalEdge data i w ∩ exceptionalEdge data j z).Nonempty := by + refine ⟨ordinaryVertex data (lineThrough d (data.base i w)), + Finset.mem_inter.mpr ⟨?_, ?_⟩⟩ + · exact (ordinaryVertex_mem_exceptionalEdge_iff data i w _).2 ⟨hi, rfl⟩ + · exact (ordinaryVertex_mem_exceptionalEdge_iff data j z _).2 ⟨hj, heq.symm⟩ + +theorem ordinaryEdge_inter_exceptionalEdge (data : ConfigurationData k F G) + (x : Point F) (i : G) (w : Point k) + (havoid : ∀ d ∈ data.altered i, + projection d x ≠ projection d (data.base i w)) : + (ordinaryEdge data x ∩ exceptionalEdge data i w).Nonempty := by + obtain ⟨d, hd⟩ := exists_equal_projection x (data.base i w) + have hnot : d ∉ data.altered i := fun hm => havoid d hm hd + refine ⟨ordinaryVertex data (lineThrough d x), Finset.mem_inter.mpr ⟨?_, ?_⟩⟩ + · exact ordinaryVertex_mem_ordinaryEdge data x d + · exact (ordinaryVertex_mem_exceptionalEdge_iff data i w _).2 ⟨hnot, hd.symm⟩ + +theorem exceptionalEdge_inter_of_separated (data : ConfigurationData k F G) + (i j : G) (w z : Point k) + (hi : ∀ d ∈ data.altered i, + projection d (data.base i w) ≠ projection d (data.base j z)) + (hj : ∀ d ∈ data.altered j, + projection d (data.base j z) ≠ projection d (data.base i w)) : + (exceptionalEdge data i w ∩ exceptionalEdge data j z).Nonempty := by + obtain ⟨d, hd⟩ := exists_equal_projection (data.base i w) (data.base j z) + exact exceptionalEdge_inter_of_projection_eq data i j w z d + (fun hm => hi d hm hd) (fun hm => hj d hm hd.symm) hd + +theorem exceptionalEdge_inter_sameGroup (data : ConfigurationData k F G) (i : G) + (directions : Direction k → Direction F) + (hmem : ∀ t : k, t ≠ 0 → directions (some t) ∈ data.altered i) + (hinverse : ∀ (t : k) (ht : t ≠ 0), + data.inverseSlope i ⟨directions (some t), hmem t ht⟩ = t) + (haxisOutside : ∀ a : Direction k, a = none ∨ a = some 0 → + directions a ∉ data.altered i) + (haxisTransport : ∀ a : Direction k, a = none ∨ a = some 0 → + ∀ p q : Point k, + projection a (data.transform p) = projection a (data.transform q) → + projection (directions a) (data.base i p) = + projection (directions a) (data.base i q)) + (w z : Point k) : + (exceptionalEdge data i w ∩ exceptionalEdge data i z).Nonempty := by + obtain ⟨a, ha⟩ := exists_equal_projection (data.transform w) (data.transform z) + cases a with + | none => + exact exceptionalEdge_inter_of_projection_eq data i i w z (directions none) + (haxisOutside none (Or.inl rfl)) (haxisOutside none (Or.inl rfl)) + (haxisTransport none (Or.inl rfl) w z ha) + | some t => + by_cases ht : t = 0 + · subst t + exact exceptionalEdge_inter_of_projection_eq data i i w z (directions (some 0)) + (haxisOutside (some 0) (Or.inr rfl)) + (haxisOutside (some 0) (Or.inr rfl)) + (haxisTransport (some 0) (Or.inr rfl) w z ha) + · let d : {d : Direction F // d ∈ data.altered i} := + ⟨directions (some t), hmem t ht⟩ + have hinv : data.inverseSlope i d = t := hinverse t ht + let c := projection (some (data.inverseSlope i d)) (data.transform w) + refine ⟨specialVertex data i d c, Finset.mem_inter.mpr ⟨?_, ?_⟩⟩ + · exact (specialVertex_mem_exceptionalEdge_iff data i w d c).2 rfl + · apply (specialVertex_mem_exceptionalEdge_iff data i z d c).2 + change projection (some (data.inverseSlope i d)) (data.transform z) = + projection (some (data.inverseSlope i d)) (data.transform w) + rw [hinv] + exact ha.symm + +theorem ordinaryEdge_injective (data : ConfigurationData k F G) : + Function.Injective (ordinaryEdge data) := by + intro x y hxy + have hproj (d : Direction F) : projection d x = projection d y := by + have hv : ordinaryVertex data (lineThrough d x) ∈ ordinaryEdge data y := by + rw [← hxy] + exact ordinaryVertex_mem_ordinaryEdge data x d + exact ((ordinaryVertex_mem_ordinaryEdge_iff data y _).1 hv).symm + exact point_eq_of_projection_axes (hproj none) (hproj (some 0)) + +theorem exceptionalEdge_injective (data : ConfigurationData k F G) (i : G) + (htransform : Function.Injective data.transform) + (d e : {d : Direction F // d ∈ data.altered i}) + (hde : data.inverseSlope i d ≠ data.inverseSlope i e) : + Function.Injective (exceptionalEdge data i) := by + intro w z hwz + have hproj (a : {d : Direction F // d ∈ data.altered i}) : + projection (some (data.inverseSlope i a)) (data.transform w) = + projection (some (data.inverseSlope i a)) (data.transform z) := by + let c := projection (some (data.inverseSlope i a)) (data.transform w) + have hv : specialVertex data i a c ∈ exceptionalEdge data i z := by + rw [← hwz] + exact (specialVertex_mem_exceptionalEdge_iff data i w a c).2 rfl + exact ((specialVertex_mem_exceptionalEdge_iff data i z a c).1 hv).symm + apply htransform + exact point_eq_of_projection_eq_of_ne_direction + (fun h => hde (Option.some.inj h)) (hproj d) (hproj e) + +theorem ordinaryEdge_ne_exceptionalEdge (data : ConfigurationData k F G) + (x : Point F) (i : G) (w : Point k) (hi : (data.altered i).Nonempty) : + ordinaryEdge data x ≠ exceptionalEdge data i w := by + obtain ⟨d, hd⟩ := hi + let a : {d : Direction F // d ∈ data.altered i} := ⟨d, hd⟩ + let c := projection (some (data.inverseSlope i a)) (data.transform w) + intro heq + apply specialVertex_notMem_ordinaryEdge data i a c x + rw [heq] + exact (specialVertex_mem_exceptionalEdge_iff data i w a c).2 rfl + +theorem exceptionalEdge_ne_of_group_ne (data : ConfigurationData k F G) + (i j : G) (hij : i ≠ j) (w z : Point k) (hi : (data.altered i).Nonempty) : + exceptionalEdge data i w ≠ exceptionalEdge data j z := by + obtain ⟨d, hd⟩ := hi + let a : {d : Direction F // d ∈ data.altered i} := ⟨d, hd⟩ + let c := projection (some (data.inverseSlope i a)) (data.transform w) + intro heq + apply specialVertex_notMem_exceptionalEdge_of_ne data i j hij z a c + rw [← heq] + exact (specialVertex_mem_exceptionalEdge_iff data i w a c).2 rfl + +variable [Fintype G] + +theorem hypergraph_intersecting_of_geometric_data (data : ConfigurationData k F G) + (directions : G → Direction k → Direction F) + (hmem : ∀ (i : G) (t : k), t ≠ 0 → directions i (some t) ∈ data.altered i) + (hinverse : ∀ (i : G) (t : k) (ht : t ≠ 0), + data.inverseSlope i ⟨directions i (some t), hmem i t ht⟩ = t) + (haxisOutside : ∀ (i : G) (a : Direction k), a = none ∨ a = some 0 → + directions i a ∉ data.altered i) + (haxisTransport : ∀ (i : G) (a : Direction k), a = none ∨ a = some 0 → + ∀ p q : Point k, + projection a (data.transform p) = projection a (data.transform q) → + projection (directions i a) (data.base i p) = + projection (directions i a) (data.base i q)) + (havoid : ∀ x ∈ data.ordinaryPoints, ∀ i, ∀ w ∈ data.retained, + ∀ d ∈ data.altered i, projection d x ≠ projection d (data.base i w)) + (hseparate : ∀ i j : G, i ≠ j → ∀ w ∈ data.retained, ∀ z ∈ data.retained, + ∀ d ∈ data.altered i, + projection d (data.base i w) ≠ projection d (data.base j z)) : + Intersecting (hypergraph data) := by + intro e he f hf _ + rcases (mem_hypergraph data e).mp he with ⟨x, hx, rfl⟩ | ⟨i, w, hw, rfl⟩ + · rcases (mem_hypergraph data f).mp hf with ⟨y, _, rfl⟩ | ⟨j, z, hz, rfl⟩ + · exact ordinaryEdge_inter_ordinaryEdge data x y + · exact ordinaryEdge_inter_exceptionalEdge data x j z (havoid x hx j z hz) + · rcases (mem_hypergraph data f).mp hf with ⟨y, hy, rfl⟩ | ⟨j, z, hz, rfl⟩ + · simpa only [Finset.inter_comm] using + ordinaryEdge_inter_exceptionalEdge data y i w (havoid y hy i w hw) + · by_cases hij : i = j + · subst j + exact exceptionalEdge_inter_sameGroup data i (directions i) (hmem i) + (hinverse i) (haxisOutside i) (haxisTransport i) w z + · exact exceptionalEdge_inter_of_separated data i j w z + (hseparate i j hij w hw z hz) (hseparate j i (fun h => hij h.symm) z hz w hw) + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/LabelAction.lean b/lean/OAI/Combinatorics/Ryser/Construction/LabelAction.lean new file mode 100644 index 0000000000000000000000000000000000000000..aff127f6a52e00a70b950750a4b5f942088aa9fa --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/LabelAction.lean @@ -0,0 +1,87 @@ +import OAI.Combinatorics.Ryser.Construction.Hypergraph + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +variable {k F G : Type*} [instFieldk : Field k] [Field F] +variable [DecidableEq k] [DecidableEq F] [DecidableEq G] [Fintype F] + +theorem ordinaryVertex_mem_ordinaryEdge_iff (data : ConfigurationData k F G) + (x : Point F) (ell : AffineLine F) : + ordinaryVertex data ell ∈ ordinaryEdge data x ↔ Incidence x ell := by + constructor + · intro hv + obtain ⟨d, _, hd⟩ := Finset.mem_image.mp hv + have hline : lineThrough d x = ell := Sum.inl.inj hd + rw [← hline] + exact incidence_lineThrough d x + · intro hinc + rw [eq_lineThrough_of_incidence hinc] + exact ordinaryVertex_mem_ordinaryEdge data x ell.1 + +theorem ordinaryVertex_mem_exceptionalEdge_iff (data : ConfigurationData k F G) + (i : G) (w : Point k) (ell : AffineLine F) : + ordinaryVertex data ell ∈ exceptionalEdge data i w ↔ + ell.1 ∉ data.altered i ∧ Incidence (data.base i w) ell := by + rw [mem_exceptionalEdge_iff data i w, vertexPart_ordinaryVertex] + by_cases hd : ell.1 ∈ data.altered i + · rw [exceptionalVertex_of_mem data i w ell.1 hd] + constructor + · intro hlabel + simp [ordinaryVertex, specialVertex] at hlabel + · intro h + exact False.elim (h.1 hd) + · rw [exceptionalVertex_of_notMem data i w ell.1 hd] + constructor + · intro hlabel + have hline : ell = lineThrough ell.1 (data.base i w) := Sum.inl.inj hlabel + exact ⟨hd, (congrArg Prod.snd hline).symm⟩ + · rintro ⟨_, hinc⟩ + exact congrArg (ordinaryVertex data) (eq_lineThrough_of_incidence hinc) + +theorem specialVertex_mem_exceptionalEdge_iff (data : ConfigurationData k F G) + (i : G) (w : Point k) + (d : {d : Direction F // d ∈ data.altered i}) (c : k) : + specialVertex data i d c ∈ exceptionalEdge data i w ↔ + Incidence (data.transform w) (some (data.inverseSlope i d), c) := by + rw [mem_exceptionalEdge_iff data i w, vertexPart_specialVertex, + exceptionalVertex_of_mem data i w d.val d.property] + change specialVertex data i d c = + specialVertex data i d + (projection (some (data.inverseSlope i d)) (data.transform w)) ↔ + Incidence (data.transform w) (some (data.inverseSlope i d), c) + constructor + · intro hlabel + have hc : c = projection (some (data.inverseSlope i d)) (data.transform w) := + congrArg + (fun v : Σ j : G, {e : Direction F // e ∈ data.altered j} × k => v.2.2) + (Sum.inr.inj hlabel) + exact hc.symm + · intro hinc + change projection (some (data.inverseSlope i d)) (data.transform w) = c at hinc + rw [hinc] + +theorem specialVertex_notMem_exceptionalEdge_of_ne (data : ConfigurationData k F G) + (i j : G) (hij : i ≠ j) (w : Point k) + (d : {d : Direction F // d ∈ data.altered i}) (c : k) : + specialVertex data i d c ∉ exceptionalEdge data j w := by + intro hv + have hlabel := (mem_exceptionalEdge_iff data j w _).mp hv + rw [vertexPart_specialVertex] at hlabel + by_cases hd : d.val ∈ data.altered j + · rw [exceptionalVertex_of_mem data j w d.val hd] at hlabel + exact hij (congrArg Sigma.fst (Sum.inr.inj hlabel)) + · rw [exceptionalVertex_of_notMem data j w d.val hd] at hlabel + simp [ordinaryVertex, specialVertex] at hlabel + +theorem specialVertex_notMem_ordinaryEdge (data : ConfigurationData k F G) + (i : G) (d : {d : Direction F // d ∈ data.altered i}) (c : k) (x : Point F) : + specialVertex data i d c ∉ ordinaryEdge data x := let _ := instFieldk; by + intro hv + obtain ⟨d', _, hlabel⟩ := Finset.mem_image.mp hv + simp [ordinaryVertex, specialVertex] at hlabel + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/LinearPlacement.lean b/lean/OAI/Combinatorics/Ryser/Construction/LinearPlacement.lean new file mode 100644 index 0000000000000000000000000000000000000000..79083f456466b2646cfc9829707cf7706a2e61c5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/LinearPlacement.lean @@ -0,0 +1,135 @@ +import OAI.Combinatorics.Ryser.Geometry.Basic +import Mathlib.Algebra.Group.Prod +import Mathlib.RingTheory.SimpleRing.Basic +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +variable {F : Type*} [Field F] + +structure PlaneLinearMap (F : Type*) [Field F] where + xx : F + xy : F + yx : F + yy : F + determinant_ne_zero : xx * yy - xy * yx ≠ 0 + +namespace PlaneLinearMap + +def determinant (M : PlaneLinearMap F) : F := M.xx * M.yy - M.xy * M.yx + +def apply (M : PlaneLinearMap F) (p : Point F) : Point F := + (M.xx * p.1 + M.xy * p.2, M.yx * p.1 + M.yy * p.2) + +def inverse (M : PlaneLinearMap F) (p : Point F) : Point F := + ((M.yy * p.1 - M.xy * p.2) / M.determinant, + (M.xx * p.2 - M.yx * p.1) / M.determinant) + +@[simp] theorem inverse_apply (M : PlaneLinearMap F) (p : Point F) : + M.inverse (M.apply p) = p := by + have hd : M.determinant ≠ 0 := M.determinant_ne_zero + apply Prod.ext <;> dsimp [inverse, apply] + · field_simp [hd] + simp only [determinant] + ring + · field_simp [hd] + simp only [determinant] + ring + +@[simp] theorem apply_inverse (M : PlaneLinearMap F) (p : Point F) : + M.apply (M.inverse p) = p := by + have hd : M.determinant ≠ 0 := M.determinant_ne_zero + apply Prod.ext <;> dsimp [inverse, apply] + · field_simp [hd] + simp only [determinant] + ring + · field_simp [hd] + simp only [determinant] + ring + +def toEquiv (M : PlaneLinearMap F) : Point F ≃ Point F where + toFun := M.apply + invFun := M.inverse + left_inv := M.inverse_apply + right_inv := M.apply_inverse + +theorem apply_injective (M : PlaneLinearMap F) : Function.Injective M.apply := + M.toEquiv.injective + +theorem apply_surjective (M : PlaneLinearMap F) : Function.Surjective M.apply := + M.toEquiv.surjective + +@[simp] theorem apply_zero (M : PlaneLinearMap F) : M.apply (0, 0) = (0, 0) := by + simp [apply] + +theorem apply_sub (M : PlaneLinearMap F) (p q : Point F) : + M.apply (p - q) = M.apply p - M.apply q := by + apply Prod.ext <;> simp only [apply, Prod.fst_sub, Prod.snd_sub] <;> ring + +theorem apply_smul (M : PlaneLinearMap F) (a : F) (p : Point F) : + M.apply (a * p.1, a * p.2) = + (a * (M.apply p).1, a * (M.apply p).2) := by + apply Prod.ext <;> dsimp [apply] <;> ring + +def diagonal (a : F) (ha : a ≠ 0) : PlaneLinearMap F where + xx := 1 + xy := 0 + yx := 0 + yy := a + determinant_ne_zero := by simpa using ha + +@[simp] theorem diagonal_apply (a : F) (ha : a ≠ 0) (p : Point F) : + (diagonal a ha).apply p = (p.1, a * p.2) := by + simp [diagonal, apply] + +def extra (u v : F) (huv : u ≠ v) : PlaneLinearMap F where + xx := 1 + xy := 1 + yx := u + yy := v + determinant_ne_zero := by + simpa only [one_mul] using sub_ne_zero.mpr huv.symm + +@[simp] theorem extra_apply (u v : F) (huv : u ≠ v) (p : Point F) : + (extra u v huv).apply p = (p.1 + p.2, u * p.1 + v * p.2) := by + simp [extra, apply] + +end PlaneLinearMap + +section Subfield + +variable {k : Type*} [Field k] + +def mapPoint (σ : k →+* F) (p : Point k) : Point F := (σ p.1, σ p.2) + +theorem mapPoint_injective (σ : k →+* F) : Function.Injective (mapPoint σ) := by + intro p q hpq + apply Prod.ext + · exact σ.injective (congrArg Prod.fst hpq) + · exact σ.injective (congrArg Prod.snd hpq) + +def placedPoint (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) (w : Point k) : Point F := b + M.apply (mapPoint σ w) + +theorem placedPoint_injective (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) : Function.Injective (placedPoint σ M b) := by + intro p q hpq + apply mapPoint_injective σ + apply M.apply_injective + exact add_left_cancel hpq + +theorem placedPoint_sub (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) (p q : Point k) : + placedPoint σ M b p - placedPoint σ M b q = + M.apply (mapPoint σ p - mapPoint σ q) := by + rw [M.apply_sub] + simp only [placedPoint, add_sub_add_left_eq_sub] + +end Subfield + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/Main.lean b/lean/OAI/Combinatorics/Ryser/Construction/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..20f5b060cf3cec3ffcd2086395ded1abcc5303be --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/Main.lean @@ -0,0 +1,57 @@ +import OAI.Combinatorics.Ryser.Construction.ActualHypergraph +import OAI.Combinatorics.Ryser.Construction.GadgetExistence +import OAI.Combinatorics.Ryser.Field.ExtensionSubfields +import OAI.Combinatorics.Ryser.Hypergraph.Infinitude + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample + +open Construction + +theorem exists_prime_eventually_counterexampleRank : + ∃ p : ℕ, p.Prime ∧ 5 < p ∧ p % 3 = 2 ∧ + ∃ N : ℕ, ∀ n : ℕ, N ≤ n → n.Prime → 2 < n → + CounterexampleRank (p ^ n + 1) := by + classical + obtain ⟨p, hp, hp5, hpmod, hgadget⟩ := exists_prime_goodGadget + let : Fact p.Prime := ⟨hp⟩ + obtain ⟨a, ha⟩ := hgadget + have hs : 2 ≤ Fintype.card (ZMod p) := by + rw [ZMod.card] + omega + obtain ⟨u, v, hu, hv, huv⟩ := exists_distinct_nonzero (k := ZMod p) (by + rw [ZMod.card] + omega) + have hcop : Nat.Coprime 3 (Fintype.card (ZMod p) - 1) := + coprime_three_zmod_card_sub_one hpmod + obtain ⟨K, Q, _hK, hpool⟩ := + exists_goodAmbientPool_uniform.{0, 0} u v huv a ha.1 hs + refine ⟨p, hp, hp5, hpmod, Q, ?_⟩ + intro n hQn hn hn3 + have hsize : Q ≤ Fintype.card (ExtensionField p n) := by + rw [extensionField_card p n hn.ne_zero] + have hnpow : n < p ^ n := Nat.lt_pow_self (by omega : 1 < p) + exact hQn.trans hnpow.le + have hsub : Incidence.SmallProperSubfields (ExtensionField p n) := by + intro S hS + exact extensionField_properSubfield_cube_le p n hn hn3 S hS + obtain ⟨hgap, pool, hgood⟩ := + hpool (ExtensionField p n) (primeEmbedding p n) hsize hsub + have hr := counterexampleRank_of_goodAmbientPool + (primeEmbedding p n) u v huv hu hv a ha hcop K pool hgood hgap + simpa only [extensionField_card p n hn.ne_zero] using hr + +theorem infinite_counterexampleRanks : Set.Infinite {r : ℕ | CounterexampleRank r} := by + obtain ⟨p, _hp, hp5, _hpmod, N, hexamples⟩ := + exists_prime_eventually_counterexampleRank + exact infinite_counterexampleRanks_of_eventually_prime_powers + p N (by omega) hexamples + +end RyserCoveringCounterexample + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/OddGadgets.lean b/lean/OAI/Combinatorics/Ryser/Construction/OddGadgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..6adc3c3eb6e7235c15fa7e1a8110cff66b49399b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/OddGadgets.lean @@ -0,0 +1,79 @@ +import OAI.Combinatorics.Ryser.Construction.GadgetExistence + +namespace OAI + +/-! +# Good gadgets over every sufficiently large eligible prime + +The two probability thresholds are uniform before the prime is chosen. +This extraction retains the actual sample space and both proved events; +it does not use a gadget-existence assumption or prime subsequence. +-/ + +open Filter Topology +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +/-- Every sufficiently large prime congruent to two modulo three supports +an actual good gadget. The threshold is chosen before the prime. -/ +theorem exists_threshold_goodGadget : + ∃ P : ℕ, ∀ p : ℕ, P ≤ p → ∀ hp : p.Prime, p % 3 = 2 → + 5 < p ∧ + (letI : Fact p.Prime := ⟨hp⟩ + ∃ a : GadgetOutcome (ZMod p), GoodGadget a) := by + classical + obtain ⟨Q, hQ⟩ := LineCover.uniform_linecover_probability + 3 (1 / 4) (1 / 100) (by norm_num) (by norm_num) (by norm_num) + (1 / 4) (by norm_num) + have hsmall : ∀ᶠ q : ℕ in atTop, + (q : ℝ) ^ 2 * Real.exp (-(q : ℝ) / 2048) < 1 / 4 := + (tendsto_order.mp tendsto_originalDensity_failure_atTop).2 _ (by norm_num) + obtain ⟨N, hN⟩ := Filter.eventually_atTop.mp hsmall + refine ⟨Q + N + 2048, ?_⟩ + intro p hpbound hp hpmod + have hp5 : 5 < p := by omega + have hpQ : Q ≤ p := by omega + have hpN : N ≤ p := by omega + have hp2048 : 2048 ≤ p := by omega + refine ⟨hp5, ?_⟩ + let : Fact p.Prime := ⟨hp⟩ + have hcard : 3 < Fintype.card (ZMod p) := by simpa using (show 3 < p by omega) + have hcop : Nat.Coprime 3 (Fintype.card (ZMod p) - 1) := + coprime_three_zmod_card_sub_one hpmod + have hsub : Incidence.SmallProperSubfields (ZMod p) := by + intro M hM + exact (hM (primeField_subfield_eq_top p M)).elim + have hline := hQ (ZMod p) (by simpa using hpQ) hsub + (cubicDeletionProcess hcop hcard) + change 1 - (1 / 4 : ℝ) ≤ + (FiniteLaw.pi (gadgetTrials (k := ZMod p))).prob + (LineCover.GoodLineCover (1 / 4) (1 / 100)) at hline + rw [← gadgetLaw_map_config, FiniteLaw.prob_map] at hline + have horiginal := prob_originalLineDensity_ge (k := ZMod p) + (by simpa using hp2048) + change 1 - (Fintype.card (ZMod p) : ℝ) ^ 2 * + Real.exp (-(Fintype.card (ZMod p) : ℝ) / 2048) ≤ + (gadgetLaw (ZMod p)).prob OriginalLineDensity at horiginal + have hfailure : (Fintype.card (ZMod p) : ℝ) ^ 2 * + Real.exp (-(Fintype.card (ZMod p) : ℝ) / 2048) < 1 / 4 := by + simpa using hN p hpN + have hex : ∃ a : GadgetOutcome (ZMod p), OriginalLineDensity a ∧ + LineCover.GoodLineCover (1 / 4) (1 / 100) (gadgetConfig a) := by + by_contra hnot + have himp : ∀ a : GadgetOutcome (ZMod p), OriginalLineDensity a → + ¬ LineCover.GoodLineCover (1 / 4) (1 / 100) (gadgetConfig a) := by + intro a ha hgood + exact hnot ⟨a, ha, hgood⟩ + have hmono := (gadgetLaw (ZMod p)).prob_mono himp + rw [FiniteLaw.prob_compl] at hmono + linarith + obtain ⟨a, ha, hgood⟩ := hex + refine ⟨a, goodGadget_of_events hcop hcard ?_ a ha hgood⟩ + simpa using (show 200 < 19 * p by omega) + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/OrdinaryCover.lean b/lean/OAI/Combinatorics/Ryser/Construction/OrdinaryCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..37e8c335148827897b66304a4db2621a9cc03813 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/OrdinaryCover.lean @@ -0,0 +1,107 @@ +import OAI.Combinatorics.Ryser.Construction.LabelAction +import OAI.Combinatorics.Ryser.Construction.CoverPencil +import Mathlib.Data.Finset.Sum + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +variable {k F G : Type*} [instFieldk : Field k] [instFieldF : Field F] +variable [instDecidableEqk : DecidableEq k] [DecidableEq F] [instDecidableEqG : DecidableEq G] + +def ordinaryLines (data : ConfigurationData k F G) + (C : Finset (Vertex (k := k) data.altered)) : Finset (AffineLine F) := C.toLeft + +@[simp] theorem mem_ordinaryLines (data : ConfigurationData k F G) + (C : Finset (Vertex (k := let _ := instFieldk; let _ := instFieldF; let _ := instDecidableEqk; let _ := instDecidableEqG; k) data.altered)) (ell : AffineLine F) : + ell ∈ ordinaryLines data C ↔ ordinaryVertex data ell ∈ C := + Finset.mem_toLeft + +theorem ordinaryVertex_injective (data : ConfigurationData k F G) : + Function.Injective (ordinaryVertex data) := let _ := instFieldk; let _ := instFieldF; let _ := instDecidableEqk; let _ := instDecidableEqG; by + intro l m hlm + exact Sum.inl.inj hlm + +theorem ordinaryLines_card_le (data : ConfigurationData k F G) + (C : Finset (Vertex (k := let _ := instFieldk; let _ := instFieldF; let _ := instDecidableEqk; let _ := instDecidableEqG; k) data.altered)) : + (ordinaryLines data C).card ≤ C.card := Finset.card_toLeft_le + +variable [Fintype F] + +def forcedPencilVertices (data : ConfigurationData k F G) + (B : Finset (AffineLine F)) (p : ProjectivePoint F) : + Finset (Vertex (k := k) data.altered) := + (affinePencil p \ B).image (ordinaryVertex data) + +theorem card_forcedPencilVertices (data : ConfigurationData k F G) + (B : Finset (AffineLine F)) (p : ProjectivePoint F) : + (forcedPencilVertices data B p).card = (affinePencil p \ B).card := + Finset.card_image_of_injective _ (ordinaryVertex_injective data) + +@[simp] theorem ordinaryVertex_mem_forcedPencilVertices_iff + (data : ConfigurationData k F G) (B : Finset (AffineLine F)) + (p : ProjectivePoint F) (ell : AffineLine F) : + ordinaryVertex data ell ∈ forcedPencilVertices data B p ↔ + ell ∈ affinePencil p ∧ ell ∉ B := by + constructor + · intro h + obtain ⟨l, hl, heq⟩ := Finset.mem_image.mp h + have hlell : l = ell := ordinaryVertex_injective data heq + subst l + exact Finset.mem_sdiff.mp hl + · intro h + exact Finset.mem_image_of_mem _ (Finset.mem_sdiff.mpr h) + +theorem ordinaryLines_offPencil_add_onPencil_le + (data : ConfigurationData k F G) + (C : Finset (Vertex (k := k) data.altered)) (p : ProjectivePoint F) : + (ordinaryLines data C \ affinePencil p).card + + (ordinaryLines data C ∩ affinePencil p).card ≤ C.card := by + rw [Finset.card_sdiff_add_card_inter] + exact ordinaryLines_card_le data C + +variable [Fintype G] + +theorem ordinaryLines_cover_ordinaryPoints (data : ConfigurationData k F G) + (C : Finset (Vertex (k := k) data.altered)) + (hC : IsCover (hypergraph data) C) : + ∀ x ∈ data.ordinaryPoints, ∃ ell ∈ ordinaryLines data C, Incidence x ell := by + intro x hx + have he : ordinaryEdge data x ∈ hypergraph data := + (mem_hypergraph data _).2 (Or.inl ⟨x, hx, rfl⟩) + obtain ⟨v, hvC, hve⟩ := hC (ordinaryEdge data x) he + obtain ⟨d, _, rfl⟩ := Finset.mem_image.mp hve + exact ⟨lineThrough d x, (mem_ordinaryLines data C _).2 hvC, + incidence_lineThrough d x⟩ + +theorem ordinaryVertex_mem_cover_of_pencil_survivors + (data : ConfigurationData k F G) + (C : Finset (Vertex (k := k) data.altered)) + (hC : IsCover (hypergraph data) C) + (p : ProjectivePoint F) (ell : AffineLine F) + (hpell : ProjectiveIncidence p (some ell)) + (hmany : 1 + (ordinaryLines data C \ affinePencil p).card < + (data.ordinaryPoints ∩ linePoints ell).card) : + ordinaryVertex data ell ∈ C := by + apply (mem_ordinaryLines data C ell).1 + exact mem_cover_of_pencil_survivors data.ordinaryPoints (ordinaryLines data C) + p ell (ordinaryLines_cover_ordinaryPoints data C hC) hpell hmany + +theorem forcedPencilVertices_subset_cover + (data : ConfigurationData k F G) + (C : Finset (Vertex (k := k) data.altered)) + (hC : IsCover (hypergraph data) C) + (B : Finset (AffineLine F)) (p : ProjectivePoint F) + (hmany : ∀ ell ∈ affinePencil p, ell ∉ B → + 1 + (ordinaryLines data C \ affinePencil p).card < + (data.ordinaryPoints ∩ linePoints ell).card) : + forcedPencilVertices data B p ⊆ C := by + intro v hv + obtain ⟨ell, hell, rfl⟩ := Finset.mem_image.mp hv + obtain ⟨hpell, hnot⟩ := Finset.mem_sdiff.mp hell + exact ordinaryVertex_mem_cover_of_pencil_survivors data C hC p ell + ((mem_affinePencil _ _).1 hpell) (hmany ell hpell hnot) + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/PlacedLines.lean b/lean/OAI/Combinatorics/Ryser/Construction/PlacedLines.lean new file mode 100644 index 0000000000000000000000000000000000000000..289f4a4f685a16973bca7af301fdf29939bee419 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/PlacedLines.lean @@ -0,0 +1,66 @@ +import OAI.Combinatorics.Ryser.Construction.DirectionPlacement + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +variable {k : Type*} [Field k] + +def lineAnchor (l : AffineLine k) : Point k := + match l.1 with + | none => (l.2, 0) + | some _ => (0, l.2) + +@[simp] theorem projection_lineAnchor (l : AffineLine k) : + projection l.1 (lineAnchor l) = l.2 := by + obtain ⟨d, c⟩ := l + cases d <;> simp [lineAnchor, projection] + +@[simp] theorem incidence_lineAnchor (l : AffineLine k) : + Incidence (lineAnchor l) l := + projection_lineAnchor l + +variable {F : Type*} [Field F] [DecidableEq F] [instDecidableEqk : DecidableEq k] + +def placedLine (σ : k →+* F) (M : PlaneLinearMap F) (b : Point F) + (l : AffineLine k) : AffineLine F := + lineThrough (placedDirection σ M l.1) (placedPoint σ M b (lineAnchor l)) + +@[simp] theorem placedLine_direction (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) (l : AffineLine k) : + (placedLine σ M b l).1 = placedDirection σ M l.1 := let _ := instDecidableEqk; rfl + +theorem incidence_placedLine_iff (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) (p : Point k) (l : AffineLine k) : + Incidence (placedPoint σ M b p) (placedLine σ M b l) ↔ Incidence p l := by + change projection (placedDirection σ M l.1) (placedPoint σ M b p) = + projection (placedDirection σ M l.1) (placedPoint σ M b (lineAnchor l)) ↔ + projection l.1 p = l.2 + rw [projection_placedPoint_eq_iff, projection_lineAnchor] + +theorem placedLine_injective (σ : k →+* F) (M : PlaneLinearMap F) + (b : Point F) : Function.Injective (placedLine σ M b) := by + intro l m hlm + have hdir : l.1 = m.1 := + placedDirection_injective σ M (congrArg Prod.fst hlm) + have hinc : Incidence (lineAnchor l) m := by + apply (incidence_placedLine_iff σ M b (lineAnchor l) m).mp + rw [← hlm] + exact (incidence_placedLine_iff σ M b (lineAnchor l) l).mpr + (incidence_lineAnchor l) + exact line_eq_of_direction_eq_of_incidence hdir (incidence_lineAnchor l) hinc + +theorem eq_placedLine_of_direction_of_incidence + (σ : k →+* F) (M : PlaneLinearMap F) (b : Point F) + (p : Point k) (d : Direction k) (ell : AffineLine F) + (hdir : ell.1 = placedDirection σ M d) + (hinc : Incidence (placedPoint σ M b p) ell) : + ell = placedLine σ M b (d, projection d p) := by + apply line_eq_of_direction_eq_of_incidence + · exact hdir + · exact hinc + · exact (incidence_placedLine_iff σ M b p (d, projection d p)).mpr rfl + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/PlacementIntersection.lean b/lean/OAI/Combinatorics/Ryser/Construction/PlacementIntersection.lean new file mode 100644 index 0000000000000000000000000000000000000000..27a7de921f69616ed38a520f3ea6574d6c106d72 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/PlacementIntersection.lean @@ -0,0 +1,53 @@ +import OAI.Combinatorics.Ryser.Construction.PlacedLines + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] [DecidableEq k] [DecidableEq F] + +theorem mem_range_placedPoint_of_incident_of_ne_placedLines + (σ : k →+* F) (M : PlaneLinearMap F) (b : Point F) + {p : Point F} {l m : AffineLine k} + (hlm : placedLine σ M b l ≠ placedLine σ M b m) + (hpl : Incidence p (placedLine σ M b l)) + (hpm : Incidence p (placedLine σ M b m)) : + p ∈ Set.range (placedPoint σ M b) := by + have hdir : l.1 ≠ m.1 := by + intro hsame + have hplaced : (placedLine σ M b l).1 = (placedLine σ M b m).1 := by + simpa only [placedLine_direction] using congrArg (placedDirection σ M) hsame + exact hlm (line_eq_of_direction_eq_of_incidence + (l := placedLine σ M b l) (m := placedLine σ M b m) (p := p) + hplaced hpl hpm) + obtain ⟨q, hq, _⟩ := existsUnique_incident_of_ne_direction l m hdir + have hql : Incidence (placedPoint σ M b q) (placedLine σ M b l) := + (incidence_placedLine_iff σ M b q l).2 hq.1 + have hqm : Incidence (placedPoint σ M b q) (placedLine σ M b m) := + (incidence_placedLine_iff σ M b q m).2 hq.2 + have hpq : p = placedPoint σ M b q := + eq_of_common_incidence_of_ne_lines hlm hpl hpm hql hqm + exact ⟨q, hpq.symm⟩ + +theorem eq_placedLine_of_incident_of_notMem_range + (σ : k →+* F) (M : PlaneLinearMap F) (b : Point F) + {p : Point F} {l m : AffineLine k} + (houtside : p ∉ Set.range (placedPoint σ M b)) + (hpl : Incidence p (placedLine σ M b l)) + (hpm : Incidence p (placedLine σ M b m)) : + placedLine σ M b l = placedLine σ M b m := by + by_contra hlm + exact houtside (mem_range_placedPoint_of_incident_of_ne_placedLines σ M b hlm hpl hpm) + +theorem eq_smallLine_of_incident_of_notMem_range + (σ : k →+* F) (M : PlaneLinearMap F) (b : Point F) + {p : Point F} {l m : AffineLine k} + (houtside : p ∉ Set.range (placedPoint σ M b)) + (hpl : Incidence p (placedLine σ M b l)) + (hpm : Incidence p (placedLine σ M b m)) : l = m := + placedLine_injective σ M b + (eq_placedLine_of_incident_of_notMem_range σ M b houtside hpl hpm) + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/PoolThinAsymptotic.lean b/lean/OAI/Combinatorics/Ryser/Construction/PoolThinAsymptotic.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc687094931f7ee55ce8323c856b95d9896c51e3 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/PoolThinAsymptotic.lean @@ -0,0 +1,91 @@ +import OAI.Combinatorics.Ryser.Construction.PoolThinProbability +import OAI.Combinatorics.Ryser.Construction.GroupBounds +import Mathlib.Topology.Algebra.Order.Field +import Mathlib.Analysis.SpecificLimits.Basic +import Mathlib.Tactic.FieldSimp + +namespace OAI + +open Filter Topology +open scoped Classical +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +def thinFailureConstant (s K : ℕ) : ℝ := 128 * (K : ℝ) ^ 6 * (s : ℝ) ^ 12 + +theorem thinFailureBound_le (s K N : ℕ) {q : ℝ} (hq : 1 ≤ q) + (hN : (N : ℝ) * (s - 1 : ℕ) ≤ 2 * q) : + q ^ 3 * (q + 1) * (N : ℝ) ^ 6 * + ((K : ℝ) * (s ^ 2 : ℕ) * (s - 1 : ℕ) / q ^ 2) ^ 6 ≤ + thinFailureConstant s K / q ^ 2 := by + have hqpos : 0 < q := by linarith + have hqne : q ≠ 0 := hqpos.ne' + have hbase : (N : ℝ) * ((K : ℝ) * (s ^ 2 : ℕ) * (s - 1 : ℕ) / q ^ 2) ≤ + 2 * (K : ℝ) * (s : ℝ) ^ 2 / q := by + calc + _ = (K : ℝ) * (s : ℝ) ^ 2 * ((N : ℝ) * (s - 1 : ℕ)) / q ^ 2 := by + push_cast + ring + _ ≤ (K : ℝ) * (s : ℝ) ^ 2 * (2 * q) / q ^ 2 := by + apply div_le_div_of_nonneg_right + · exact mul_le_mul_of_nonneg_left hN (by positivity) + · positivity + _ = 2 * (K : ℝ) * (s : ℝ) ^ 2 / q := by + field_simp [hqne] + have hfactor : q ^ 3 * (q + 1) ≤ 2 * q ^ 4 := by + calc + _ ≤ q ^ 3 * (2 * q) := + mul_le_mul_of_nonneg_left (by linarith) (by positivity) + _ = 2 * q ^ 4 := by ring + calc + _ = q ^ 3 * (q + 1) * + ((N : ℝ) * ((K : ℝ) * (s ^ 2 : ℕ) * (s - 1 : ℕ) / q ^ 2)) ^ 6 := by + rw [mul_pow] + ring + _ ≤ q ^ 3 * (q + 1) * (2 * (K : ℝ) * (s : ℝ) ^ 2 / q) ^ 6 := + mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (by positivity) hbase 6) (by positivity) + _ ≤ 2 * q ^ 4 * (2 * (K : ℝ) * (s : ℝ) ^ 2 / q) ^ 6 := + mul_le_mul_of_nonneg_right hfactor (by positivity) + _ = thinFailureConstant s K / q ^ 2 := by + unfold thinFailureConstant + field_simp [hqne] + ring + +theorem tendsto_thinFailureBound (s K : ℕ) : + Tendsto (fun q : ℕ => thinFailureConstant s K / (q : ℝ) ^ 2) atTop (𝓝 0) := by + have h : Tendsto (fun q : ℝ => thinFailureConstant s K / q ^ 2) atTop (𝓝 0) := + tendsto_const_nhds.div_atTop (tendsto_pow_atTop (by decide : (2 : ℕ) ≠ 0)) + exact h.comp tendsto_natCast_atTop_atTop + +theorem exists_thinFailure_cutoff (s K : ℕ) {η : ℝ} (hη : 0 < η) : + ∃ Q : ℕ, ∀ q : ℕ, Q ≤ q → thinFailureConstant s K / (q : ℝ) ^ 2 ≤ η := by + exact Filter.eventually_atTop.mp ((tendsto_thinFailureBound s K).eventually_le_const hη) + +variable {k F : Type*} [Field k] [Field F] [Fintype k] [Fintype F] +variable [DecidableEq k] [DecidableEq F] + +theorem prob_groupPoolThin_ge (σ : k →+* F) (u v : k) (huv : u ≠ v) (K : ℕ) : + 1 - thinFailureConstant (Fintype.card k) K / (Fintype.card F : ℝ) ^ 2 ≤ + (poolThinLaw (F := F) (ConfigurationGroup σ) K).prob + (PoolThin (groupPoints σ u v huv) (groupAltered σ u v huv)) := by + have hraw := prob_not_poolThin_le (K := K) + (groupPoints σ u v huv) (groupAltered σ u v huv) + (Fintype.card k ^ 2) (Fintype.card k - 1) + (fun i => le_of_eq (groupPoints_card σ u v huv i)) + (fun i => le_of_eq (groupAltered_card σ u v huv i)) + have hq : (1 : ℝ) ≤ Fintype.card F := by + exact_mod_cast (Nat.succ_le_of_lt (Fintype.card_pos (α := F))) + have hN : (Fintype.card (ConfigurationGroup σ) : ℝ) * (Fintype.card k - 1 : ℕ) ≤ + 2 * (Fintype.card F : ℝ) := by + exact_mod_cast card_groups_mul_sub_one_le σ + have hbound := hraw.trans + (thinFailureBound_le (Fintype.card k) K (Fintype.card (ConfigurationGroup σ)) hq hN) + rw [FiniteLaw.prob_compl] at hbound + linarith + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/PoolThinGeometry.lean b/lean/OAI/Combinatorics/Ryser/Construction/PoolThinGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..a7b5363977713acdb14a9f993845580167144581 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/PoolThinGeometry.lean @@ -0,0 +1,98 @@ +import OAI.Combinatorics.Ryser.Construction.CoverPencil +import OAI.Combinatorics.Ryser.Geometry.Cardinality +import OAI.Combinatorics.Ryser.Probability.Finite +import Mathlib.Algebra.Group.Prod + +namespace OAI + +open scoped BigOperators +noncomputable section + +namespace RyserCoveringCounterexample.Construction + +variable {F : Type*} [Field F] [Fintype F] [instDecidableEqF : DecidableEq F] + +def ShiftHits (W : Finset (Point F)) (S : Finset (Direction F)) + (p : Point F) (ell : AffineLine F) (b : Point F) : Prop := + ∃ w ∈ W, ∃ d ∈ S, Incidence (b + w) ell ∧ + projection d (b + w) = projection d p + +def badShifts (W : Finset (Point F)) (S : Finset (Direction F)) + (p : Point F) (ell : AffineLine F) : Finset (Point F) := by + classical + exact Finset.univ.filter (ShiftHits W S p ell) + +@[simp] theorem mem_badShifts (W : Finset (Point F)) (S : Finset (Direction F)) + (p : Point F) (ell : AffineLine F) (b : Point F) : + b ∈ badShifts W S p ell ↔ ShiftHits W S p ell b := let _ := instDecidableEqF; by + classical + simp only [badShifts, Finset.mem_filter, Finset.mem_univ, true_and] + +theorem badShifts_eq_biUnion (W : Finset (Point F)) (S : Finset (Direction F)) + (p : Point F) (ell : AffineLine F) : + badShifts W S p ell = W.biUnion (fun w => S.biUnion (fun d => + (linePoints ell ∩ linePoints (lineThrough d p)).image (fun y => y - w))) := by + ext b + constructor + · intro hb + obtain ⟨w, hw, d, hd, hbell, hbd⟩ := (mem_badShifts W S p ell b).mp hb + apply Finset.mem_biUnion.mpr + refine ⟨w, hw, Finset.mem_biUnion.mpr ⟨d, hd, ?_⟩⟩ + apply Finset.mem_image.mpr + refine ⟨b + w, Finset.mem_inter.mpr ⟨?_, ?_⟩, by simp⟩ + · exact (mem_linePoints _ _).mpr hbell + · exact (mem_linePoints _ _).mpr hbd + · intro hb + obtain ⟨w, hw, hb⟩ := Finset.mem_biUnion.mp hb + obtain ⟨d, hd, hb⟩ := Finset.mem_biUnion.mp hb + obtain ⟨y, hy, hyb⟩ := Finset.mem_image.mp hb + apply (mem_badShifts W S p ell b).mpr + have hby : b + w = y := by rw [← hyb]; simp + refine ⟨w, hw, d, hd, ?_, ?_⟩ + · rw [hby] + exact (mem_linePoints _ _).mp (Finset.mem_inter.mp hy).1 + · rw [hby] + exact (mem_linePoints _ _).mp (Finset.mem_inter.mp hy).2 + +theorem badShifts_card_le (W : Finset (Point F)) (S : Finset (Direction F)) + (p : Point F) (ell : AffineLine F) (hp : ¬ Incidence p ell) : + (badShifts W S p ell).card ≤ W.card * S.card := by + have hpoint (d : Direction F) : + (linePoints ell ∩ linePoints (lineThrough d p)).card ≤ 1 := by + apply card_linePoints_inter_le_one + intro heq + exact hp (heq.symm ▸ incidence_lineThrough d p) + rw [badShifts_eq_biUnion] + calc + _ ≤ ∑ w ∈ W, (S.biUnion (fun d => + (linePoints ell ∩ linePoints (lineThrough d p)).image (fun y => y - w))).card := + Finset.card_biUnion_le + _ ≤ ∑ _w ∈ W, S.card := by + apply Finset.sum_le_sum + intro w hw + calc + _ ≤ ∑ d ∈ S, + ((linePoints ell ∩ linePoints (lineThrough d p)).image (fun y => y - w)).card := + Finset.card_biUnion_le + _ ≤ ∑ _d ∈ S, 1 := Finset.sum_le_sum fun d _ => + Finset.card_image_le.trans (hpoint d) + _ = S.card := by simp + _ = W.card * S.card := by simp + +theorem uniform_prob_shiftHits_le (W : Finset (Point F)) (S : Finset (Direction F)) + (p : Point F) (ell : AffineLine F) (hp : ¬ Incidence p ell) : + (FiniteLaw.uniform (Point F)).prob (ShiftHits W S p ell) ≤ + (W.card : ℝ) * S.card / (Fintype.card F : ℝ) ^ 2 := by + classical + rw [FiniteLaw.uniform_prob] + change ((badShifts W S p ell).card : ℝ) / Fintype.card (Point F) ≤ _ + rw [card_point, Nat.cast_pow] + apply div_le_div_of_nonneg_right + · exact_mod_cast badShifts_card_le W S p ell hp + · positivity + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/PoolThinProbability.lean b/lean/OAI/Combinatorics/Ryser/Construction/PoolThinProbability.lean new file mode 100644 index 0000000000000000000000000000000000000000..44c8415c90f109c94ce76180137af101a8510e0f --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/PoolThinProbability.lean @@ -0,0 +1,184 @@ +import OAI.Combinatorics.Ryser.Construction.PoolThinGeometry +import OAI.Combinatorics.Ryser.Probability.Product +import Mathlib.Data.Finset.Powerset +import Mathlib.Data.Nat.Choose.Bounds +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring +import Lean.Elab.Tactic.Omega + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.Construction + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + +def poolThinLaw (G : Type*) [Fintype G] [DecidableEq G] (K : ℕ) : + FiniteLaw (G → Fin K → Point F) := + FiniteLaw.pi (fun _ : G => FiniteLaw.uniform (Fin K → Point F)) + +def poolGroupBad {K : ℕ} (W : Finset (Point F)) (S : Finset (Direction F)) + (p : Point F) (ell : AffineLine F) (a : Fin K → Point F) : Prop := + ∃ j, ShiftHits W S p ell (a j) + +variable {G : Type*} [Fintype G] [DecidableEq G] {K : ℕ} + +def poolBadGroups (W : G → Finset (Point F)) (S : G → Finset (Direction F)) + (p : Point F) (ell : AffineLine F) (ω : G → Fin K → Point F) : Finset G := + Finset.univ.filter (fun i => poolGroupBad (W i) (S i) p ell (ω i)) + +def PoolThin (W : G → Finset (Point F)) (S : G → Finset (Direction F)) + (ω : G → Fin K → Point F) : Prop := + ∀ p ell, ¬ Incidence p ell → (poolBadGroups W S p ell ω).card ≤ 5 + +theorem uniform_prob_poolGroupBad_le + (W : Finset (Point F)) (S : Finset (Direction F)) + (p : Point F) (ell : AffineLine F) (hp : ¬ Incidence p ell) : + (FiniteLaw.uniform (Fin K → Point F)).prob (poolGroupBad W S p ell) ≤ + (K : ℝ) * W.card * S.card / (Fintype.card F : ℝ) ^ 2 := by + calc + _ ≤ ∑ j : Fin K, (FiniteLaw.uniform (Fin K → Point F)).prob + (fun a => ShiftHits W S p ell (a j)) := + FiniteLaw.prob_exists_le _ _ + _ = ∑ _j : Fin K, (FiniteLaw.uniform (Point F)).prob + (ShiftHits W S p ell) := by + apply Finset.sum_congr rfl + intro j _ + rw [← FiniteLaw.pi_uniform] + exact FiniteLaw.prob_pi_coordinate + (fun _ : Fin K => FiniteLaw.uniform (Point F)) j (ShiftHits W S p ell) + _ ≤ ∑ _j : Fin K, + (W.card : ℝ) * S.card / (Fintype.card F : ℝ) ^ 2 := + Finset.sum_le_sum (fun _ _ => uniform_prob_shiftHits_le W S p ell hp) + _ = _ := by + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] + ring + +theorem uniform_prob_poolGroupBad_le_of_card + (W : Finset (Point F)) (S : Finset (Direction F)) + (w s : ℕ) (hW : W.card ≤ w) (hS : S.card ≤ s) + (p : Point F) (ell : AffineLine F) (hp : ¬ Incidence p ell) : + (FiniteLaw.uniform (Fin K → Point F)).prob (poolGroupBad W S p ell) ≤ + (K : ℝ) * w * s / (Fintype.card F : ℝ) ^ 2 := by + refine (uniform_prob_poolGroupBad_le W S p ell hp).trans ?_ + apply div_le_div_of_nonneg_right _ (sq_nonneg _) + exact_mod_cast Nat.mul_le_mul (Nat.mul_le_mul_left K hW) hS + +theorem poolThinLaw_prob_all_bad_le + (W : G → Finset (Point F)) (S : G → Finset (Direction F)) + (w s : ℕ) (hW : ∀ i, (W i).card ≤ w) (hS : ∀ i, (S i).card ≤ s) + (p : Point F) (ell : AffineLine F) (hp : ¬ Incidence p ell) (T : Finset G) : + (poolThinLaw (F := F) G K).prob + (fun ω => ∀ i ∈ T, poolGroupBad (W i) (S i) p ell (ω i)) ≤ + ((K : ℝ) * w * s / (Fintype.card F : ℝ) ^ 2) ^ T.card := by + let b : ℝ := (K : ℝ) * w * s / (Fintype.card F : ℝ) ^ 2 + change (FiniteLaw.pi (fun _ : G => FiniteLaw.uniform (Fin K → Point F))).prob + (fun ω => ∀ i, i ∈ T → poolGroupBad (W i) (S i) p ell (ω i)) ≤ b ^ T.card + rw [FiniteLaw.prob_pi (fun _ : G => FiniteLaw.uniform (Fin K → Point F)) + (fun i a => i ∈ T → poolGroupBad (W i) (S i) p ell a)] + calc + _ ≤ ∏ i : G, if i ∈ T then b else 1 := by + apply Finset.prod_le_prod₀ + · intro i _ + exact FiniteLaw.prob_nonneg _ _ + · intro i _ + by_cases hi : i ∈ T + · simpa [hi] using + uniform_prob_poolGroupBad_le_of_card (K := K) + (W i) (S i) w s (hW i) (hS i) p ell hp + · simp [hi] + _ = b ^ T.card := by + rw [Finset.prod_ite_mem_eq] + exact Finset.prod_const b + +theorem poolThinLaw_prob_six_bad_le + (W : G → Finset (Point F)) (S : G → Finset (Direction F)) + (w s : ℕ) (hW : ∀ i, (W i).card ≤ w) (hS : ∀ i, (S i).card ≤ s) + (p : Point F) (ell : AffineLine F) (hp : ¬ Incidence p ell) : + (poolThinLaw (F := F) G K).prob + (fun ω => 6 ≤ (poolBadGroups W S p ell ω).card) ≤ + (Fintype.card G : ℝ) ^ 6 * + ((K : ℝ) * w * s / (Fintype.card F : ℝ) ^ 2) ^ 6 := by + let b : ℝ := (K : ℝ) * w * s / (Fintype.card F : ℝ) ^ 2 + have hb : 0 ≤ b := by dsimp [b]; positivity + let C : Finset (Finset G) := (Finset.univ : Finset G).powersetCard 6 + change (poolThinLaw (F := F) G K).prob + (fun ω => 6 ≤ (poolBadGroups W S p ell ω).card) ≤ + (Fintype.card G : ℝ) ^ 6 * b ^ 6 + calc + _ ≤ (poolThinLaw (F := F) G K).prob + (fun ω => ∃ T : ↥C, ∀ i ∈ T.val, poolGroupBad (W i) (S i) p ell (ω i)) := by + apply FiniteLaw.prob_mono + intro ω hω + obtain ⟨T, hT, hcard⟩ := Finset.exists_subset_card_eq hω + refine ⟨⟨T, Finset.mem_powersetCard.mpr ⟨Finset.subset_univ _, hcard⟩⟩, ?_⟩ + intro i hi + exact (Finset.mem_filter.mp (hT hi)).2 + _ ≤ ∑ T : ↥C, (poolThinLaw (F := F) G K).prob + (fun ω => ∀ i ∈ T.val, poolGroupBad (W i) (S i) p ell (ω i)) := + FiniteLaw.prob_exists_le _ _ + _ ≤ ∑ _T : ↥C, b ^ 6 := by + apply Finset.sum_le_sum + intro T _ + have hT := poolThinLaw_prob_all_bad_le (K := K) W S w s hW hS p ell hp T.val + have hcard : T.val.card = 6 := (Finset.mem_powersetCard.mp T.property).2 + simpa only [hcard] using hT + _ = ((Fintype.card G).choose 6 : ℝ) * b ^ 6 := by + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_coe, + C, Finset.card_powersetCard, nsmul_eq_mul] + _ ≤ (Fintype.card G : ℝ) ^ 6 * b ^ 6 := by + apply mul_le_mul_of_nonneg_right _ (pow_nonneg hb _) + exact_mod_cast Nat.choose_le_pow (Fintype.card G) 6 + +theorem prob_not_poolThin_le + (W : G → Finset (Point F)) (S : G → Finset (Direction F)) + (w s : ℕ) (hW : ∀ i, (W i).card ≤ w) (hS : ∀ i, (S i).card ≤ s) : + (poolThinLaw (F := F) G K).prob (fun ω => ¬ PoolThin W S ω) ≤ + (Fintype.card F : ℝ) ^ 3 * ((Fintype.card F : ℝ) + 1) * + (Fintype.card G : ℝ) ^ 6 * + ((K : ℝ) * w * s / (Fintype.card F : ℝ) ^ 2) ^ 6 := by + let b : ℝ := (K : ℝ) * w * s / (Fintype.card F : ℝ) ^ 2 + have hb : 0 ≤ b := by dsimp [b]; positivity + have hB : 0 ≤ (Fintype.card G : ℝ) ^ 6 * b ^ 6 := by positivity + change (poolThinLaw (F := F) G K).prob (fun ω => ¬ PoolThin W S ω) ≤ + (Fintype.card F : ℝ) ^ 3 * ((Fintype.card F : ℝ) + 1) * + (Fintype.card G : ℝ) ^ 6 * b ^ 6 + calc + _ ≤ (poolThinLaw (F := F) G K).prob + (fun ω => ∃ z : Point F × AffineLine F, + ¬ Incidence z.1 z.2 ∧ 6 ≤ (poolBadGroups W S z.1 z.2 ω).card) := by + apply FiniteLaw.prob_mono + intro ω hω + by_contra hn + apply hω + intro p ell hp + by_contra hcard + apply hn + refine ⟨(p, ell), hp, ?_⟩ + change 6 ≤ (poolBadGroups W S p ell ω).card + omega + _ ≤ ∑ z : Point F × AffineLine F, (poolThinLaw (F := F) G K).prob + (fun ω => ¬ Incidence z.1 z.2 ∧ + 6 ≤ (poolBadGroups W S z.1 z.2 ω).card) := + FiniteLaw.prob_exists_le _ _ + _ ≤ ∑ _z : Point F × AffineLine F, (Fintype.card G : ℝ) ^ 6 * b ^ 6 := by + apply Finset.sum_le_sum + intro z _ + by_cases hp : Incidence z.1 z.2 + · simpa [hp] using hB + · simpa [hp] using + poolThinLaw_prob_six_bad_le (K := K) W S w s hW hS z.1 z.2 hp + _ = _ := by + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_prod, + card_direction, Nat.cast_mul, + Nat.cast_add, Nat.cast_one, nsmul_eq_mul] + ring + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/PoolThinSelection.lean b/lean/OAI/Combinatorics/Ryser/Construction/PoolThinSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..770470245591fd145df8eafa5b8dab2ce44d539f --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/PoolThinSelection.lean @@ -0,0 +1,44 @@ +import OAI.Combinatorics.Ryser.Construction.PoolThinProbability +import OAI.Combinatorics.Ryser.Construction.GroupBounds +import OAI.Combinatorics.Ryser.Construction.FiniteOutsideAction +import OAI.Combinatorics.Ryser.Construction.CoordinateCompatibility + +namespace OAI + +noncomputable section +open scoped Classical + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] [Fintype k] [Fintype F] +variable [DecidableEq k] [DecidableEq F] {K : ℕ} + +theorem offPencilThin_of_groupPoolThin + (σ : k →+* F) (u v : k) (huv : u ≠ v) + (pool : ConfigurationGroup σ → Fin K → Point F) + (choice : ConfigurationGroup σ → Fin K) + (Y : Finset (Point k)) (X : Finset (Point F)) + (hthin : PoolThin (groupPoints σ u v huv) (groupAltered σ u v huv) pool) + (p : Point F) : + OffPencilThin + (placedConfiguration σ (groupPlacement σ u v huv) + (fun i => pool i (choice i)) Y X) p := by + classical + let data := placedConfiguration σ (groupPlacement σ u v huv) + (fun i => pool i (choice i)) Y X + intro ell hp + apply (Finset.card_le_card ?_).trans (hthin p ell hp) + intro i hi + obtain ⟨w, hw, hinc, hdir⟩ := (mem_offPencilGroups data p ell i).mp hi + apply Finset.mem_filter.mpr + refine ⟨Finset.mem_univ _, choice i, ?_⟩ + refine ⟨(groupPlacement σ u v huv i).apply (mapPoint σ w), ?_, + joinDirection p (data.base i w), hdir, hinc, ?_⟩ + · exact Finset.mem_image.mpr ⟨w, Finset.mem_univ _, rfl⟩ + · exact incidence_joinLine_right p (data.base i w) + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/SelectedHypergraph.lean b/lean/OAI/Combinatorics/Ryser/Construction/SelectedHypergraph.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a422b0c19fed462d9807212a7451f578121f991 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/SelectedHypergraph.lean @@ -0,0 +1,119 @@ +import OAI.Combinatorics.Ryser.Construction.AmbientDeletionSurvivors +import OAI.Combinatorics.Ryser.Construction.CoordinateCompatibility +import OAI.Combinatorics.Ryser.Construction.GadgetGood + +namespace OAI + +noncomputable section + +open scoped Classical + +namespace RyserCoveringCounterexample.Construction + +variable {k F : Type*} [Field k] [Field F] [Fintype k] [Fintype F] + [DecidableEq k] [DecidableEq F] + +theorem ambientSelectedSurvivors_projection_ne + (σ : k →+* F) (u v : k) (huv : u ≠ v) (a : GadgetOutcome k) + (K : ℕ) (b : AmbientPool σ K) (choice : ConfigurationGroup σ → Fin K) + (x : Point F) (hx : x ∈ ambientSelectedSurvivors σ u v huv a K b choice) + (i : ConfigurationGroup σ) (w : Point k) (hw : w ∈ retainedPoints a) + (d : Direction F) (hd : d ∈ alteredDirections σ (groupPlacement σ u v huv i)) : + projection d x ≠ + projection d (placedPoint σ (groupPlacement σ u v huv i) (b i (choice i)) w) := by + intro hproj + let ell := lineThrough d + (placedPoint σ (groupPlacement σ u v huv i) (b i (choice i)) w) + have hell : ell ∈ ambientSelectedLines σ u v huv a K b choice := by + apply (mem_ambientSelectedLines σ u v huv a K b choice ell).mpr + refine ⟨i, ?_⟩ + apply (mem_deletedLines σ (groupPlacement σ u v huv i) (b i (choice i)) a ell).mpr + exact ⟨hd, w, hw, rfl⟩ + exact (mem_ambientSelectedSurvivors σ u v huv a K b choice x).mp hx ell hell hproj + +theorem DeletionSeparated.retained_projection_ne + {G : Type*} [Fintype G] [DecidableEq G] + (σ : k →+* F) (M : G → PlaneLinearMap F) (b : G → Point F) + (a : GadgetOutcome k) (hsep : DeletionSeparated σ M b a) + (i j : G) (hij : i ≠ j) (w : Point k) (hw : w ∈ retainedPoints a) + (z : Point k) (d : Direction F) (hd : d ∈ alteredDirections σ (M i)) : + projection d (placedPoint σ (M i) (b i) w) ≠ + projection d (placedPoint σ (M j) (b j) z) := by + have hz : placedPoint σ (M j) (b j) z ∈ placedSubplane σ (M j) (b j) := + (mem_placedSubplane_iff σ (M j) (b j) _).mpr ⟨z, rfl⟩ + have hw' : placedPoint σ (M i) (b i) w ∈ + (retainedPoints a).image (placedPoint σ (M i) (b i)) := + Finset.mem_image.mpr ⟨w, hw, rfl⟩ + exact (hsep j i (Ne.symm hij) _ hz _ hw' d hd).symm + +def ambientSelectedConfiguration + (σ : k →+* F) (u v : k) (huv : u ≠ v) (a : GadgetOutcome k) + (K : ℕ) (b : AmbientPool σ K) (choice : ConfigurationGroup σ → Fin K) : + ConfigurationData k F (ConfigurationGroup σ) := + placedConfiguration σ (groupPlacement σ u v huv) (fun i => b i (choice i)) + (retainedPoints a) (ambientSelectedSurvivors σ u v huv a K b choice) + +theorem ambientSelectedHypergraph_intersecting + (σ : k →+* F) (u v : k) (huv : u ≠ v) (a : GadgetOutcome k) + (K : ℕ) (b : AmbientPool σ K) (choice : ConfigurationGroup σ → Fin K) + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) + (hsep : DeletionSeparated σ (groupPlacement σ u v huv) + (fun i => b i (choice i)) a) : + Intersecting (hypergraph (ambientSelectedConfiguration σ u v huv a K b choice)) := by + apply placedHypergraph_intersecting σ (groupPlacement σ u v huv) + (fun i => b i (choice i)) (retainedPoints a) + (ambientSelectedSurvivors σ u v huv a K b choice) hcop + · intro x hx i w hw d hd + exact ambientSelectedSurvivors_projection_ne σ u v huv a K b choice x hx i w hw d hd + · intro i j hij w hw z _ d hd + exact DeletionSeparated.retained_projection_ne σ (groupPlacement σ u v huv) + (fun i => b i (choice i)) a hsep i j hij w hw z d hd + +theorem ambientSelectedHypergraph_nonempty + (σ : k →+* F) (u v : k) (huv : u ≠ v) (a : GadgetOutcome k) + (K : ℕ) (b : AmbientPool σ K) (choice : ConfigurationGroup σ → Fin K) + (ha : GoodGadget a) : + (hypergraph (ambientSelectedConfiguration σ u v huv a K b choice)).Nonempty := by + exact hypergraph_nonempty (ambientSelectedConfiguration σ u v huv a K b choice) + none ha.retained_nonempty + +theorem ambientSelectedHypergraph_partite + (σ : k →+* F) (u v : k) (huv : u ≠ v) (a : GadgetOutcome k) + (K : ℕ) (b : AmbientPool σ K) (choice : ConfigurationGroup σ → Fin K) : + PartiteUniform (vertexPart (ambientSelectedConfiguration σ u v huv a K b choice)) + (hypergraph (ambientSelectedConfiguration σ u v huv a K b choice)) := + hypergraph_partite (ambientSelectedConfiguration σ u v huv a K b choice) + +theorem ambientSelectedHypergraph_uniform + (σ : k →+* F) (u v : k) (huv : u ≠ v) (a : GadgetOutcome k) + (K : ℕ) (b : AmbientPool σ K) (choice : ConfigurationGroup σ → Fin K) : + Uniform (Fintype.card F + 1) + (hypergraph (ambientSelectedConfiguration σ u v huv a K b choice)) := + hypergraph_uniform (ambientSelectedConfiguration σ u v huv a K b choice) + +theorem ambientSelectedHypergraph_rPartiteUniform + (σ : k →+* F) (u v : k) (huv : u ≠ v) (a : GadgetOutcome k) + (K : ℕ) (b : AmbientPool σ K) (choice : ConfigurationGroup σ → Fin K) : + RPartiteUniform (Fintype.card F + 1) + (hypergraph (ambientSelectedConfiguration σ u v huv a K b choice)) := + hypergraph_rPartiteUniform (ambientSelectedConfiguration σ u v huv a K b choice) + +theorem ambientSelectedHypergraph_properties + (σ : k →+* F) (u v : k) (huv : u ≠ v) (a : GadgetOutcome k) + (K : ℕ) (b : AmbientPool σ K) (choice : ConfigurationGroup σ → Fin K) + (hcop : Nat.Coprime 3 (Fintype.card k - 1)) (ha : GoodGadget a) + (hsep : DeletionSeparated σ (groupPlacement σ u v huv) + (fun i => b i (choice i)) a) : + (hypergraph (ambientSelectedConfiguration σ u v huv a K b choice)).Nonempty ∧ + Intersecting (hypergraph (ambientSelectedConfiguration σ u v huv a K b choice)) ∧ + RPartiteUniform (Fintype.card F + 1) + (hypergraph (ambientSelectedConfiguration σ u v huv a K b choice)) := + ⟨ambientSelectedHypergraph_nonempty σ u v huv a K b choice ha, + ambientSelectedHypergraph_intersecting σ u v huv a K b choice hcop hsep, + ambientSelectedHypergraph_rPartiteUniform σ u v huv a K b choice⟩ + +end RyserCoveringCounterexample.Construction + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Construction/SmallPrimes.lean b/lean/OAI/Combinatorics/Ryser/Construction/SmallPrimes.lean new file mode 100644 index 0000000000000000000000000000000000000000..04743981f1dae96985d23a13e0f25727b38430e0 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Construction/SmallPrimes.lean @@ -0,0 +1,61 @@ +import Mathlib.Data.Nat.Factors +import Mathlib.Data.Nat.Factorial.Basic +import Lean.Elab.Tactic.Omega + +namespace OAI + +namespace RyserCoveringCounterexample.Construction + +private theorem exists_mem_mod_three_eq_two_of_prod + (L : List ℕ) (hL : L.prod % 3 = 2) : + ∃ p ∈ L, p % 3 = 2 := by + induction L with + | nil => simp at hL + | cons a L ih => + by_cases ha : a % 3 = 2 + · exact ⟨a, List.mem_cons_self, ha⟩ + · have hmod : a % 3 = 0 ∨ a % 3 = 1 := by + have := Nat.mod_lt a (by decide : 0 < 3) + omega + rcases hmod with ha0 | ha1 + · simp only [List.prod_cons, Nat.mul_mod, ha0, zero_mul, Nat.zero_mod] at hL + contradiction + · have htail : L.prod % 3 = 2 := by + simpa only [List.prod_cons, Nat.mul_mod, ha1, one_mul, Nat.mod_mod] using hL + obtain ⟨p, hp, hpmod⟩ := ih htail + exact ⟨p, List.mem_cons_of_mem a hp, hpmod⟩ + +theorem exists_prime_dvd_mod_three_eq_two {n : ℕ} (hn : n % 3 = 2) : + ∃ p : ℕ, p.Prime ∧ p ∣ n ∧ p % 3 = 2 := by + have hn0 : n ≠ 0 := by omega + obtain ⟨p, hp, hpmod⟩ := + exists_mem_mod_three_eq_two_of_prod n.primeFactorsList + (by simpa only [Nat.prod_primeFactorsList hn0] using hn) + exact ⟨p, Nat.prime_of_mem_primeFactorsList hp, + Nat.dvd_of_mem_primeFactorsList hp, hpmod⟩ + +theorem exists_prime_gt_mod_three_eq_two (B : ℕ) : + ∃ p : ℕ, B < p ∧ p.Prime ∧ p % 3 = 2 := by + let N := 3 * B.factorial - 1 + have hfacpos := Nat.factorial_pos B + have hsucc : N + 1 = 3 * B.factorial := by + dsimp [N] + exact Nat.sub_add_cancel (by omega) + have hNmod : N % 3 = 2 := by omega + obtain ⟨p, hp, hpN, hpmod⟩ := exists_prime_dvd_mod_three_eq_two hNmod + refine ⟨p, ?_, hp, hpmod⟩ + by_contra hnot + have hpB : p ≤ B := Nat.le_of_not_gt hnot + have hpfac : p ∣ B.factorial := Nat.dvd_factorial hp.pos hpB + have hpprod : p ∣ 3 * B.factorial := dvd_mul_of_dvd_right hpfac 3 + have hsub : 3 * B.factorial - N = 1 := by omega + have hpone : p ∣ 1 := by + have h := Nat.dvd_sub hpprod hpN + simpa only [hsub] using h + have hple := Nat.le_of_dvd (by decide : 0 < 1) hpone + have hptwo := hp.two_le + omega + +end RyserCoveringCounterexample.Construction + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Domination/Append.lean b/lean/OAI/Combinatorics/Ryser/Domination/Append.lean new file mode 100644 index 0000000000000000000000000000000000000000..8f5138dc2a78cff5313580c838ec4343aa9c06d9 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Domination/Append.lean @@ -0,0 +1,104 @@ +import OAI.Combinatorics.Ryser.Domination.TraceDefinitions + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +variable {V ι : Type*} [instDecidableEqV : DecidableEq V] [DecidableEq ι] + +namespace DominationTrace + +variable {G : Graph V} {pool : V → ι} {J : Finset ι} {root : ι} {k : ℕ} + +theorem append_exists (t : DominationTrace G pool J root k) (v : V) (Y : Finset V) + (hne : Y.Nonempty) + (hdis : ∀ a, a < k → Disjoint Y (t.y a)) + (hreal : ∃ U, IsTransversalOn G pool J U ∧ + (∀ a, a < k → neighborsIn G (t.x a) U = t.y a) ∧ neighborsIn G v U = Y) + (hmin : ∀ U, IsTransversalOn G pool J U → + (∀ a, a < k → neighborsIn G (t.x a) U = t.y a) → + Y.card ≤ (neighborsIn G v U).card) + (horigin : pool v = root ∨ ∃ b, b < k ∧ ∃ w ∈ t.y b, pool v = pool w) : + Nonempty (DominationTrace G pool J root (k + 1)) := let _ := instDecidableEqV; by + classical + let X : ℕ → V := fun a => if a = k then v else t.x a + let Z : ℕ → Finset V := fun a => if a = k then Y else t.y a + have hXnew : X k = v := by simp [X] + have hZnew : Z k = Y := by simp [Z] + have hXold (a : ℕ) (ha : a < k) : X a = t.x a := by + simp only [X, ite_eq_right (Nat.ne_of_lt ha)] + have hZold (a : ℕ) (ha : a < k) : Z a = t.y a := by + simp only [Z, ite_eq_right (Nat.ne_of_lt ha)] + refine ⟨⟨X, Z, ?_, ?_, ?_, ?_, ?_⟩⟩ + · intro a ha + by_cases hak : a = k + · subst a + rw [hZnew] + exact hne + · have ha' : a < k := by omega + rw [hZold a ha'] + exact t.nonempty a ha' + · intro a ha b hb hab + by_cases hak : a = k + · subst a + have hb' : b < k := by omega + rw [hZnew, hZold b hb'] + exact hdis b hb' + · have ha' : a < k := by omega + by_cases hbk : b = k + · subst b + rw [hZold a ha', hZnew] + exact (hdis a ha').symm + · have hb' : b < k := by omega + rw [hZold a ha', hZold b hb'] + exact t.disjoint a ha' b hb' hab + · obtain ⟨U, hU, hprev, hnew⟩ := hreal + refine ⟨U, hU, ?_⟩ + intro a ha + by_cases hak : a = k + · subst a + rw [hXnew, hZnew] + exact hnew + · have ha' : a < k := by omega + rw [hXold a ha', hZold a ha'] + exact hprev a ha' + · intro a ha U hU hearlier + by_cases hak : a = k + · subst a + rw [hXnew, hZnew] + apply hmin U hU + intro b hb + have heq := hearlier b hb + rw [hXold b hb, hZold b hb] at heq + exact heq + · have ha' : a < k := by omega + rw [hXold a ha', hZold a ha'] + apply t.minimal a ha' U hU + intro b hb + have hbk : b < k := lt_trans hb ha' + have heq := hearlier b hb + rw [hXold b hbk, hZold b hbk] at heq + exact heq + · intro a ha + by_cases hak : a = k + · subst a + rw [hXnew] + rcases horigin with hr | ⟨b, hb, w, hw, hp⟩ + · exact Or.inl hr + · apply Or.inr + refine ⟨b, hb, w, ?_, hp⟩ + rw [hZold b hb] + exact hw + · have ha' : a < k := by omega + rw [hXold a ha'] + rcases t.origin a ha' with hr | ⟨b, hb, w, hw, hp⟩ + · exact Or.inl hr + · apply Or.inr + refine ⟨b, hb, w, ?_, hp⟩ + rw [hZold b (lt_trans hb ha')] + exact hw + +end DominationTrace +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Domination/Basic.lean b/lean/OAI/Combinatorics/Ryser/Domination/Basic.lean new file mode 100644 index 0000000000000000000000000000000000000000..fec247b461e26249e33b373e78fcd57300bbd591 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Domination/Basic.lean @@ -0,0 +1,71 @@ +import Mathlib.Data.Fintype.Powerset +import Mathlib.Data.Finset.Max +import Mathlib.Data.Finset.Union +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Lean.Elab.Tactic.Omega +import Mathlib.Tactic.Push + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +structure Graph (V : Type*) where + Adj : V → V → Prop + symm : Std.Symm Adj + loopless : Std.Irrefl Adj + +namespace Graph + +protected theorem irrefl {V : Type*} {G : Graph V} {v : V} : ¬ G.Adj v v := + G.loopless.irrefl v + +theorem Adj.symm {V : Type*} {G : Graph V} {v w : V} + (h : G.Adj v w) : G.Adj w v := + G.symm.symm v w h + +end Graph + +variable {V ι : Type*} [instDecidableEqV : DecidableEq V] [DecidableEq ι] + +def IsTransversalOn (G : Graph V) (pool : V → ι) + (J : Finset ι) (U : Finset V) : Prop := + (∀ x ∈ U, ∀ y ∈ U, ¬ G.Adj x y) ∧ + Set.InjOn pool (U : Set V) ∧ U.image pool = J + +noncomputable def neighborsIn (G : Graph V) (x : V) (U : Finset V) : Finset V := by + classical + exact U.filter (G.Adj x) + +@[simp] theorem mem_neighborsIn {G : Graph V} {x y : V} {U : Finset V} : + y ∈ neighborsIn G x U ↔ y ∈ U ∧ G.Adj x y := let _ := instDecidableEqV; by + classical + simp [neighborsIn] + +theorem neighborsIn_subset (G : Graph V) (x : V) (U : Finset V) : + neighborsIn G x U ⊆ U := by + intro y hy + exact (mem_neighborsIn.mp hy).1 + +theorem neighborsIn_eq_empty_iff {G : Graph V} {x : V} {U : Finset V} : + neighborsIn G x U = ∅ ↔ ∀ y ∈ U, ¬ G.Adj x y := by + constructor + · intro h y hy hxy + have hm : y ∈ neighborsIn G x U := mem_neighborsIn.mpr ⟨hy, hxy⟩ + simp [h] at hm + · intro h + apply Finset.eq_empty_iff_forall_notMem.mpr + intro y hy + exact h y (mem_neighborsIn.mp hy).1 (mem_neighborsIn.mp hy).2 + +def DominatesOn (G : Graph V) (pool : V → ι) + (I : Finset ι) (T : Finset V) : Prop := + ∀ x, pool x ∈ I → x ∉ T → ∃ y ∈ T, G.Adj x y + +def DominationCertificate (G : Graph V) (pool : V → ι) : Prop := + ∃ I : Finset ι, ∃ T : Finset V, + I.Nonempty ∧ (∀ x ∈ T, pool x ∈ I) ∧ + T.card ≤ 2 * (I.card - 1) ∧ DominatesOn G pool I T + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Domination/Counting.lean b/lean/OAI/Combinatorics/Ryser/Domination/Counting.lean new file mode 100644 index 0000000000000000000000000000000000000000..e72ad79b392ba3781b90f07fcd7e4bfa04671448 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Domination/Counting.lean @@ -0,0 +1,117 @@ +import OAI.Combinatorics.Ryser.Domination.TraceDefinitions + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +variable {V ι : Type*} [DecidableEq V] [DecidableEq ι] + +namespace DominationTrace + +variable {G : Graph V} {pool : V → ι} {J : Finset ι} {root : ι} {k : ℕ} + +theorem verticesY_subset_of_realized (t : DominationTrace G pool J root k) + {U : Finset V} + (hreal : ∀ a, a < k → neighborsIn G (t.x a) U = t.y a) : + t.verticesY ⊆ U := by + intro v hv + obtain ⟨a, ha, hva⟩ := mem_verticesY.mp hv + have hvn : v ∈ neighborsIn G (t.x a) U := by + rw [hreal a ha] + exact hva + exact neighborsIn_subset G (t.x a) U hvn + +theorem pool_injOn_verticesY (t : DominationTrace G pool J root k) : + Set.InjOn pool (t.verticesY : Set V) := by + obtain ⟨U, hU, hreal⟩ := t.realized + intro x hx y hy hxy + exact hU.2.1 (t.verticesY_subset_of_realized hreal hx) + (t.verticesY_subset_of_realized hreal hy) hxy + +theorem image_verticesY_subset (t : DominationTrace G pool J root k) : + t.verticesY.image pool ⊆ J := by + obtain ⟨U, hU, hreal⟩ := t.realized + intro i hi + obtain ⟨x, hx, rfl⟩ := Finset.mem_image.mp hi + rw [← hU.2.2] + exact Finset.mem_image.mpr ⟨x, t.verticesY_subset_of_realized hreal hx, rfl⟩ + +theorem length_le_card_verticesY (t : DominationTrace G pool J root k) : + k ≤ t.verticesY.card := by + have hdisj : + ((Finset.range k : Finset ℕ) : Set ℕ).PairwiseDisjoint t.y := by + intro a ha b hb hab + exact t.disjoint a (Finset.mem_range.mp ha) + b (Finset.mem_range.mp hb) hab + simpa only [verticesY, Finset.card_range] using + (Finset.card_le_card_biUnion hdisj + (fun a ha => t.nonempty a (Finset.mem_range.mp ha))) + +theorem length_le_card (t : DominationTrace G pool J root k) [Fintype V] : + k ≤ Fintype.card V := + t.length_le_card_verticesY.trans (Finset.card_le_univ t.verticesY) + +theorem indices_nonempty (t : DominationTrace G pool J root k) : + t.indices.Nonempty := by + exact ⟨root, Finset.mem_insert_self root (t.verticesY.image pool)⟩ + +theorem mem_indices_iff (t : DominationTrace G pool J root k) {i : ι} : + i ∈ t.indices ↔ + i = root ∨ ∃ b, b < k ∧ ∃ y ∈ t.y b, i = pool y := by + unfold indices + constructor + · intro hi + rcases Finset.mem_insert.mp hi with hi | hi + · exact Or.inl hi + · obtain ⟨y, hy, hpool⟩ := Finset.mem_image.mp hi + obtain ⟨b, hb, hyb⟩ := mem_verticesY.mp hy + exact Or.inr ⟨b, hb, y, hyb, hpool.symm⟩ + · intro hi + apply Finset.mem_insert.mpr + rcases hi with hi | ⟨b, hb, y, hy, hpool⟩ + · exact Or.inl hi + · exact Or.inr (Finset.mem_image.mpr + ⟨y, mem_verticesY.mpr ⟨b, hb, hy⟩, hpool.symm⟩) + +theorem vertices_pool_mem (t : DominationTrace G pool J root k) : + ∀ x ∈ t.vertices, pool x ∈ t.indices := by + intro x hx + change x ∈ t.verticesX ∪ t.verticesY at hx + rcases Finset.mem_union.mp hx with hx | hx + · obtain ⟨a, ha, rfl⟩ := mem_verticesX.mp hx + apply (mem_indices_iff t).mpr + rcases t.origin a ha with hpool | ⟨b, hb, y, hy, hpool⟩ + · exact Or.inl hpool + · exact Or.inr ⟨b, Nat.lt_trans hb ha, y, hy, hpool⟩ + · change pool x ∈ insert root (t.verticesY.image pool) + exact Finset.mem_insert_of_mem (Finset.mem_image.mpr ⟨x, hx, rfl⟩) + +theorem card_verticesX_le (t : DominationTrace G pool J root k) : + t.verticesX.card ≤ k := by + simpa only [verticesX, Finset.card_range] using + (Finset.card_image_le (s := Finset.range k) (f := t.x)) + +theorem card_indices (t : DominationTrace G pool J root k) (hroot : root ∉ J) : + t.indices.card = t.verticesY.card + 1 := by + have hnot : root ∉ t.verticesY.image pool := by + intro hmem + exact hroot (t.image_verticesY_subset hmem) + rw [indices, Finset.card_insert_of_notMem hnot, + Finset.card_image_of_injOn t.pool_injOn_verticesY] + +theorem card_vertices_le (t : DominationTrace G pool J root k) + (hroot : root ∉ J) : + t.vertices.card ≤ 2 * (t.indices.card - 1) := by + calc + t.vertices.card ≤ t.verticesX.card + t.verticesY.card := + Finset.card_union_le t.verticesX t.verticesY + _ ≤ t.verticesY.card + t.verticesY.card := + Nat.add_le_add_right (t.card_verticesX_le.trans t.length_le_card_verticesY) _ + _ = 2 * (t.indices.card - 1) := by + rw [t.card_indices hroot] + omega + +end DominationTrace +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Domination/Exchange.lean b/lean/OAI/Combinatorics/Ryser/Domination/Exchange.lean new file mode 100644 index 0000000000000000000000000000000000000000..98cbfc0d1e9fbca4f2868d5fa076edb380543c56 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Domination/Exchange.lean @@ -0,0 +1,89 @@ +import OAI.Combinatorics.Ryser.Domination.Basic + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +variable {V ι : Type*} [DecidableEq V] [DecidableEq ι] + +theorem transversal_exchange {G : Graph V} {pool : V → ι} + {J : Finset ι} {U : Finset V} {x y : V} + (hU : IsTransversalOn G pool J U) (hy : y ∈ U) + (hpool : pool x = pool y) (hfree : ∀ z ∈ U, ¬ G.Adj x z) : + IsTransversalOn G pool J (insert x (U.erase y)) := by + rcases hU with ⟨hind, hinj, himage⟩ + refine ⟨?_, ?_, ?_⟩ + · intro a ha b hb + rcases Finset.mem_insert.mp ha with hax | haErase + · rcases Finset.mem_insert.mp hb with hbx | hbErase + · rw [hax, hbx] + exact G.irrefl + · rw [hax] + exact hfree b (Finset.mem_of_mem_erase hbErase) + · rcases Finset.mem_insert.mp hb with hbx | hbErase + · rw [hbx] + intro hab + exact hfree a (Finset.mem_of_mem_erase haErase) hab.symm + · exact hind a (Finset.mem_of_mem_erase haErase) + b (Finset.mem_of_mem_erase hbErase) + · intro a ha b hb hab + rcases Finset.mem_insert.mp ha with hax | haErase + · rcases Finset.mem_insert.mp hb with hbx | hbErase + · exact hax.trans hbx.symm + · have hby : b = y := + hinj (Finset.mem_of_mem_erase hbErase) hy + (hab.symm.trans ((congrArg pool hax).trans hpool)) + exact False.elim ((Finset.mem_erase.mp hbErase).1 hby) + · rcases Finset.mem_insert.mp hb with hbx | hbErase + · have hay : a = y := + hinj (Finset.mem_of_mem_erase haErase) hy + (hab.trans ((congrArg pool hbx).trans hpool)) + exact False.elim ((Finset.mem_erase.mp haErase).1 hay) + · exact hinj (Finset.mem_of_mem_erase haErase) + (Finset.mem_of_mem_erase hbErase) hab + · rw [← himage] + ext i + constructor + · intro hi + rcases Finset.mem_image.mp hi with ⟨z, hz, hzi⟩ + rcases Finset.mem_insert.mp hz with rfl | hz + · exact Finset.mem_image.mpr ⟨y, hy, hpool.symm.trans hzi⟩ + · exact Finset.mem_image.mpr ⟨z, Finset.mem_of_mem_erase hz, hzi⟩ + · intro hi + rcases Finset.mem_image.mp hi with ⟨z, hz, hzi⟩ + by_cases hzy : z = y + · subst z + exact Finset.mem_image.mpr + ⟨x, Finset.mem_insert_self x _, hpool.trans hzi⟩ + · exact Finset.mem_image.mpr + ⟨z, Finset.mem_insert_of_mem (Finset.mem_erase.mpr ⟨hzy, hz⟩), hzi⟩ + +theorem neighborsIn_exchange (G : Graph V) (a x y : V) (U : Finset V) + (hax : ¬ G.Adj a x) : + neighborsIn G a (insert x (U.erase y)) = (neighborsIn G a U).erase y := by + ext z + simp only [mem_neighborsIn, Finset.mem_insert, Finset.mem_erase] + constructor + · rintro ⟨hz, haz⟩ + rcases hz with rfl | hz + · exact (hax haz).elim + · exact ⟨hz.1, hz.2, haz⟩ + · intro hz + exact ⟨Or.inr ⟨hz.1, hz.2.1⟩, hz.2.2⟩ + +theorem neighborsIn_exchange_eq_of_not_mem (G : Graph V) + (a x y : V) (U : Finset V) (hax : ¬ G.Adj a x) + (hy : y ∉ neighborsIn G a U) : + neighborsIn G a (insert x (U.erase y)) = neighborsIn G a U := by + rw [neighborsIn_exchange G a x y U hax, Finset.erase_eq_of_notMem hy] + +theorem card_neighborsIn_exchange_lt (G : Graph V) + (a x y : V) (U : Finset V) (hax : ¬ G.Adj a x) + (hy : y ∈ neighborsIn G a U) : + (neighborsIn G a (insert x (U.erase y))).card < (neighborsIn G a U).card := by + rw [neighborsIn_exchange G a x y U hax] + exact Finset.card_erase_lt_of_mem hy + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Domination/Extension.lean b/lean/OAI/Combinatorics/Ryser/Domination/Extension.lean new file mode 100644 index 0000000000000000000000000000000000000000..7408d7ac76770c7e3d95cf99bafd1fe8b1d8cae5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Domination/Extension.lean @@ -0,0 +1,54 @@ +import OAI.Combinatorics.Ryser.Domination.Append +import OAI.Combinatorics.Ryser.Domination.Nonempty +import OAI.Combinatorics.Ryser.Domination.Counting + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +variable {V ι : Type*} [DecidableEq V] [DecidableEq ι] + +namespace DominationTrace + +variable {G : Graph V} {pool : V → ι} {J : Finset ι} {root : ι} {k : ℕ} + +theorem extend [Fintype V] (t : DominationTrace G pool J root k) + (hroot : root ∉ J) + (hno : ¬ ∃ U', IsTransversalOn G pool (insert root J) U') + (hnocert : ¬ DominationCertificate G pool) : + Nonempty (DominationTrace G pool J root (k + 1)) := by + classical + have hnotdom : ¬ DominatesOn G pool t.indices t.vertices := by + intro hd + exact hnocert ⟨t.indices, t.vertices, t.indices_nonempty, + t.vertices_pool_mem, t.card_vertices_le hroot, hd⟩ + unfold DominatesOn at hnotdom + push Not at hnotdom + obtain ⟨v, hvpool, hvout, hvfree⟩ := hnotdom + let candidates : Finset (Finset V) := Finset.univ.filter + (fun U => IsTransversalOn G pool J U ∧ + ∀ a, a < k → neighborsIn G (t.x a) U = t.y a) + have hcandidates : candidates.Nonempty := by + obtain ⟨U, hU, hreal⟩ := t.realized + exact ⟨U, Finset.mem_filter.mpr ⟨Finset.mem_univ _, hU, hreal⟩⟩ + obtain ⟨U, hUc, hmin⟩ := Finset.exists_min_image candidates + (fun U => (neighborsIn G v U).card) hcandidates + have hU := (Finset.mem_filter.mp hUc).2 + have hne := t.neighbors_nonempty hroot hno hU.1 hU.2 hvpool hvfree + apply t.append_exists v (neighborsIn G v U) hne + · intro a ha + apply Finset.disjoint_left.mpr + intro z hznew hzold + have hzt : z ∈ t.vertices := by + change z ∈ t.verticesX ∪ t.verticesY + exact Finset.mem_union_right _ (mem_verticesY.mpr ⟨a, ha, hzold⟩) + exact hvfree z hzt (mem_neighborsIn.mp hznew).2 + · exact ⟨U, hU.1, hU.2, rfl⟩ + · intro U' hU' hreal' + exact hmin U' (Finset.mem_filter.mpr ⟨Finset.mem_univ _, hU', hreal'⟩) + · exact (t.mem_indices_iff).mp hvpool + +end DominationTrace +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Domination/Main.lean b/lean/OAI/Combinatorics/Ryser/Domination/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..2dd123e8b9155f336ea55698d6c0995db1afbbd1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Domination/Main.lean @@ -0,0 +1,42 @@ +import OAI.Combinatorics.Ryser.Domination.Extension +import OAI.Combinatorics.Ryser.Domination.Seed + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +variable {V ι : Type*} [DecidableEq V] [DecidableEq ι] + +theorem domination_certificate_of_no_transversal [Fintype V] [Fintype ι] + (G : Graph V) (pool : V → ι) (hpool : Function.Surjective pool) + (hno : ¬ ∃ U, IsTransversalOn G pool Finset.univ U) : + DominationCertificate G pool := by + classical + by_contra hnocert + obtain ⟨root, J, U, hroot, hU, hnoJ⟩ := exists_unextendable_transversal hno + obtain ⟨v, hv⟩ := hpool root + have htraces : ∀ k, Nonempty (DominationTrace G pool J root k) := by + intro k + induction k with + | zero => exact ⟨DominationTrace.empty v hU⟩ + | succ k ih => + obtain ⟨t⟩ := ih + exact t.extend hroot hnoJ hnocert + obtain ⟨t⟩ := htraces (Fintype.card V + 1) + exact Nat.not_succ_le_self (Fintype.card V) t.length_le_card + +theorem domination_of_no_transversal [Fintype V] [Fintype ι] + (G : Graph V) (pool : V → ι) (hpool : Function.Surjective pool) + (hno : ¬ ∃ U, IsTransversalOn G pool Finset.univ U) : + ∃ I : Finset ι, ∃ T : Finset V, I.Nonempty ∧ + T ⊆ Finset.univ.filter (fun x => pool x ∈ I) ∧ + T.card ≤ 2 * (I.card - 1) ∧ DominatesOn G pool I T := by + obtain ⟨I, T, hI, hT, hcard, hdom⟩ := + domination_certificate_of_no_transversal G pool hpool hno + refine ⟨I, T, hI, ?_, hcard, hdom⟩ + intro x hx + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _, hT x hx⟩ + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Domination/Nonempty.lean b/lean/OAI/Combinatorics/Ryser/Domination/Nonempty.lean new file mode 100644 index 0000000000000000000000000000000000000000..1f819c79e486cce22ea8fad97c12931b4f821927 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Domination/Nonempty.lean @@ -0,0 +1,62 @@ +import OAI.Combinatorics.Ryser.Domination.TraceDefinitions +import OAI.Combinatorics.Ryser.Domination.Exchange +import OAI.Combinatorics.Ryser.Domination.Seed + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +variable {V ι : Type*} [DecidableEq V] [DecidableEq ι] + +namespace DominationTrace + +variable {G : Graph V} {pool : V → ι} {J : Finset ι} + {root : ι} {k : ℕ} + +theorem neighbors_nonempty (t : DominationTrace G pool J root k) + (hroot : root ∉ J) + (hno : ¬ ∃ U', IsTransversalOn G pool (insert root J) U') + {v : V} {U : Finset V} (hU : IsTransversalOn G pool J U) + (hreal : ∀ a, a < k → neighborsIn G (t.x a) U = t.y a) + (hvpool : pool v ∈ t.indices) + (hvfree : ∀ z ∈ t.vertices, ¬ G.Adj v z) : + (neighborsIn G v U).Nonempty := by + apply Finset.nonempty_iff_ne_empty.mpr + intro hempty + have hfreeU := neighborsIn_eq_empty_iff.mp hempty + have hax (a : ℕ) (ha : a < k) : ¬ G.Adj (t.x a) v := by + have hmem : t.x a ∈ t.vertices := by + change t.x a ∈ t.verticesX ∪ t.verticesY + exact Finset.mem_union_left _ (mem_verticesX.mpr ⟨a, ha, rfl⟩) + intro hav + exact hvfree (t.x a) hmem hav.symm + change pool v ∈ insert root (t.verticesY.image pool) at hvpool + rcases Finset.mem_insert.mp hvpool with hvroot | hvimage + · exact hno ⟨insert v U, transversal_insert_new hU hroot hvroot hfreeU⟩ + · obtain ⟨y, hy, hypool⟩ := Finset.mem_image.mp hvimage + obtain ⟨b, hb, hyb⟩ := mem_verticesY.mp hy + have hyn : y ∈ neighborsIn G (t.x b) U := by + rw [hreal b hb] + exact hyb + have hyU : y ∈ U := (mem_neighborsIn.mp hyn).1 + have hU' := transversal_exchange hU hyU hypool.symm hfreeU + have hearlier : ∀ a, a < b → + neighborsIn G (t.x a) (insert v (U.erase y)) = t.y a := by + intro a ha + have hak : a < k := lt_trans ha hb + have hyold : y ∉ neighborsIn G (t.x a) U := by + rw [hreal a hak] + intro hya + exact Finset.disjoint_left.mp + (t.disjoint a hak b hb (Nat.ne_of_lt ha)) hya hyb + exact (neighborsIn_exchange_eq_of_not_mem G (t.x a) v y U + (hax a hak) hyold).trans (hreal a hak) + have hmin := t.minimal b hb (insert v (U.erase y)) hU' hearlier + have hstrict := card_neighborsIn_exchange_lt G (t.x b) v y U (hax b hb) hyn + rw [hreal b hb] at hstrict + exact Nat.not_lt_of_ge hmin hstrict + +end DominationTrace +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Domination/Seed.lean b/lean/OAI/Combinatorics/Ryser/Domination/Seed.lean new file mode 100644 index 0000000000000000000000000000000000000000..f5bd53baf7b74dea27798c5a9fe7081de945f88b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Domination/Seed.lean @@ -0,0 +1,77 @@ +import OAI.Combinatorics.Ryser.Domination.Basic + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +variable {V ι : Type*} [instDecidableEqV : DecidableEq V] [DecidableEq ι] +variable {G : Graph V} {pool : V → ι} + +theorem transversal_insert_new {J : Finset ι} {U : Finset V} {root : ι} {x : V} + (hU : IsTransversalOn G pool J U) (hroot : root ∉ J) + (hpool : pool x = root) (hfree : ∀ y ∈ U, ¬ G.Adj x y) : + IsTransversalOn G pool (insert root J) (insert x U) := by + have hpool_ne (y : V) (hy : y ∈ U) : pool y ≠ root := by + intro heq + apply hroot + rw [← hU.2.2] + exact Finset.mem_image.mpr ⟨y, hy, heq⟩ + refine ⟨?_, ?_, ?_⟩ + · intro a ha b hb + rcases Finset.mem_insert.mp ha with rfl | haU + · rcases Finset.mem_insert.mp hb with rfl | hbU + · exact G.irrefl + · exact hfree b hbU + · rcases Finset.mem_insert.mp hb with rfl | hbU + · intro hab + exact hfree a haU hab.symm + · exact hU.1 a haU b hbU + · intro a ha b hb hab + change a ∈ insert x U at ha + change b ∈ insert x U at hb + rcases Finset.mem_insert.mp ha with rfl | haU + · rcases Finset.mem_insert.mp hb with rfl | hbU + · rfl + · exact (hpool_ne b hbU (hab.symm.trans hpool)).elim + · rcases Finset.mem_insert.mp hb with rfl | hbU + · exact (hpool_ne a haU (hab.trans hpool)).elim + · exact hU.2.1 haU hbU hab + · rw [Finset.image_insert, hU.2.2, hpool] + +theorem exists_unextendable_transversal [Fintype ι] + (hfull : ¬ ∃ U : Finset V, IsTransversalOn G pool Finset.univ U) : + ∃ root : ι, ∃ J : Finset ι, ∃ U : Finset V, + root ∉ J ∧ IsTransversalOn G pool J U ∧ + ¬ ∃ U' : Finset V, IsTransversalOn G pool (insert root J) U' := let _ := instDecidableEqV; by + classical + let candidates : Finset (Finset ι) := + Finset.univ.filter (fun J => ∃ U : Finset V, IsTransversalOn G pool J U) + have hempty : (∅ : Finset ι) ∈ candidates := by + apply Finset.mem_filter.mpr + refine ⟨Finset.mem_univ _, ∅, ?_⟩ + simp [IsTransversalOn, Set.InjOn] + obtain ⟨J, hJ, hmax⟩ := Finset.exists_max_image candidates + (fun J : Finset ι => J.card) ⟨∅, hempty⟩ + obtain ⟨U, hU⟩ := (Finset.mem_filter.mp hJ).2 + have hJne : J ≠ Finset.univ := by + intro heq + apply hfull + exact ⟨U, heq ▸ hU⟩ + obtain ⟨root, hroot⟩ : ∃ root : ι, root ∉ J := by + by_contra hnone + apply hJne + apply Finset.eq_univ_iff_forall.mpr + intro i + by_contra hi + exact hnone ⟨i, hi⟩ + refine ⟨root, J, U, hroot, hU, ?_⟩ + intro hExt + have hmem : insert root J ∈ candidates := + Finset.mem_filter.mpr ⟨Finset.mem_univ _, hExt⟩ + have hle := hmax (insert root J) hmem + rw [Finset.card_insert_of_notMem hroot] at hle + exact Nat.not_succ_le_self J.card hle + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Domination/TraceDefinitions.lean b/lean/OAI/Combinatorics/Ryser/Domination/TraceDefinitions.lean new file mode 100644 index 0000000000000000000000000000000000000000..79e08de5e22752ceb329f2e1c523427c21275193 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Domination/TraceDefinitions.lean @@ -0,0 +1,60 @@ +import OAI.Combinatorics.Ryser.Domination.Basic + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +variable {V ι : Type*} [DecidableEq V] [DecidableEq ι] + +structure DominationTrace (G : Graph V) (pool : V → ι) + (J : Finset ι) (root : ι) (k : ℕ) where + x : ℕ → V + y : ℕ → Finset V + nonempty : ∀ a, a < k → (y a).Nonempty + disjoint : ∀ a, a < k → ∀ b, b < k → a ≠ b → Disjoint (y a) (y b) + realized : ∃ U, IsTransversalOn G pool J U ∧ + ∀ a, a < k → neighborsIn G (x a) U = y a + minimal : ∀ a, a < k → ∀ U, IsTransversalOn G pool J U → + (∀ b, b < a → neighborsIn G (x b) U = y b) → + (y a).card ≤ (neighborsIn G (x a) U).card + origin : ∀ a, a < k → pool (x a) = root ∨ + ∃ b, b < a ∧ ∃ v ∈ y b, pool (x a) = pool v + +namespace DominationTrace + +variable {G : Graph V} {pool : V → ι} {J : Finset ι} {root : ι} {k : ℕ} + +def verticesX (t : DominationTrace G pool J root k) : Finset V := + (Finset.range k).image t.x + +def verticesY (t : DominationTrace G pool J root k) : Finset V := + (Finset.range k).biUnion t.y + +def indices (t : DominationTrace G pool J root k) : Finset ι := + insert root (t.verticesY.image pool) + +def vertices (t : DominationTrace G pool J root k) : Finset V := + t.verticesX ∪ t.verticesY + +@[simp] theorem mem_verticesY {t : DominationTrace G pool J root k} {v : V} : + v ∈ t.verticesY ↔ ∃ a, a < k ∧ v ∈ t.y a := by + simp [verticesY] + +@[simp] theorem mem_verticesX {t : DominationTrace G pool J root k} {v : V} : + v ∈ t.verticesX ↔ ∃ a, a < k ∧ t.x a = v := by + simp [verticesX] + +def empty (v : V) {U : Finset V} (hU : IsTransversalOn G pool J U) : + DominationTrace G pool J root 0 where + x := fun _ => v + y := fun _ => ∅ + nonempty := by simp + disjoint := by simp + realized := ⟨U, hU, by simp⟩ + minimal := by simp + origin := by simp + +end DominationTrace +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Field/Extension.lean b/lean/OAI/Combinatorics/Ryser/Field/Extension.lean new file mode 100644 index 0000000000000000000000000000000000000000..ce3b5c602fec1093b681923800502d980cbb59ef --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Field/Extension.lean @@ -0,0 +1,36 @@ +import Mathlib.FieldTheory.Finite.GaloisField + +namespace OAI + +namespace RyserCoveringCounterexample + +abbrev ExtensionField (p n : ℕ) [Fact p.Prime] := GaloisField p n + +noncomputable instance extensionFieldFintype (p n : ℕ) [Fact p.Prime] : + Fintype (ExtensionField p n) := Fintype.ofFinite _ + +theorem extensionField_card (p n : ℕ) [Fact p.Prime] (hn : n ≠ 0) : + Fintype.card (ExtensionField p n) = p ^ n := by + simpa only [Nat.card_eq_fintype_card] using GaloisField.card p n hn + +theorem extensionField_finrank (p n : ℕ) [Fact p.Prime] (hn : n ≠ 0) : + Module.finrank (ZMod p) (ExtensionField p n) = n := + GaloisField.finrank p hn + +noncomputable def primeEmbedding (p n : ℕ) [Fact p.Prime] : + ZMod p →+* ExtensionField p n := algebraMap _ _ + +theorem primeEmbedding_injective (p n : ℕ) [Fact p.Prime] : + Function.Injective (primeEmbedding p n) := + (primeEmbedding p n).injective + +@[simp] theorem primeEmbedding_eq_iff (p n : ℕ) [Fact p.Prime] (a b : ZMod p) : + primeEmbedding p n a = primeEmbedding p n b ↔ a = b := + (primeEmbedding_injective p n).eq_iff + +noncomputable def extensionFieldDegreeOneEquiv (p : ℕ) [Fact p.Prime] : + ExtensionField p 1 ≃ₐ[ZMod p] ZMod p := GaloisField.equivZmodP p + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Field/ExtensionSubfields.lean b/lean/OAI/Combinatorics/Ryser/Field/ExtensionSubfields.lean new file mode 100644 index 0000000000000000000000000000000000000000..a1a12c6792f3f0ead3980c74339687804306367a --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Field/ExtensionSubfields.lean @@ -0,0 +1,37 @@ +import OAI.Combinatorics.Ryser.Field.Extension +import OAI.Combinatorics.Ryser.Field.SubfieldBound + +namespace OAI + +namespace RyserCoveringCounterexample + +theorem extensionField_properSubfield_card (p n : ℕ) [Fact p.Prime] + (hn : n.Prime) (S : Subfield (ExtensionField p n)) (hS : S ≠ ⊤) : + Nat.card S = p := + subfield_natCard_eq_char_of_prime_degree (Fact.out : p.Prime) hn + (extensionField_card p n hn.ne_zero) S hS + +theorem extensionField_properSubfield_cube_le (p n : ℕ) [Fact p.Prime] + (hn : n.Prime) (hn3 : 2 < n) (S : Subfield (ExtensionField p n)) (hS : S ≠ ⊤) : + Nat.card S ^ 3 ≤ Fintype.card (ExtensionField p n) := + subfield_natCard_cube_le_of_prime_degree (Fact.out : p.Prime) hn + (extensionField_card p n hn.ne_zero) hn3 S hS + +theorem extensionField_properSubfield_cube_le_pow (p n : ℕ) [Fact p.Prime] + (hn : n.Prime) (hn3 : 2 < n) (S : Subfield (ExtensionField p n)) (hS : S ≠ ⊤) : + Nat.card S ^ 3 ≤ p ^ n := by + rw [← extensionField_card p n hn.ne_zero] + exact extensionField_properSubfield_cube_le p n hn hn3 S hS + +theorem primeField_subfield_eq_top (p : ℕ) [Fact p.Prime] + (S : Subfield (ZMod p)) : S = ⊤ := + subfield_eq_top_of_card_eq_char (Fact.out : p.Prime) (ZMod.card p) S + +theorem extensionField_degree_one_subfield_eq_top (p : ℕ) [Fact p.Prime] + (S : Subfield (ExtensionField p 1)) : S = ⊤ := by + apply subfield_eq_top_of_card_eq_char (Fact.out : p.Prime) (S := S) + simpa only [pow_one] using extensionField_card p 1 one_ne_zero + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Field/OddSubfields.lean b/lean/OAI/Combinatorics/Ryser/Field/OddSubfields.lean new file mode 100644 index 0000000000000000000000000000000000000000..4111e0c6b3598820cfed329fb1f3b13d77dde4e0 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Field/OddSubfields.lean @@ -0,0 +1,101 @@ +import OAI.Combinatorics.Ryser.Field.ExtensionSubfields +import Mathlib.Algebra.Ring.Parity +import Lean.Elab.Tactic.Omega + +namespace OAI + +/-! +Proper subfields in every odd extension degree. The degree divisor and its +properness are derived from actual finite-field cardinalities, not assumed of +the splitting field chosen by the construction. +-/ +namespace RyserCoveringCounterexample + +/-- A proper divisor of a positive odd number has index at least three. -/ +theorem three_mul_le_of_dvd_odd {d n : ℕ} (hn : Odd n) (hd : d ∣ n) + (hne : d ≠ n) : 3 * d ≤ n := by + obtain ⟨a, ha⟩ := hn + obtain ⟨q, hq⟩ := hd + have hq3 : 3 ≤ q := by + by_contra h + have hc : q = 0 ∨ q = 1 ∨ q = 2 := by omega + rcases hc with h0 | h1 | h2 + · subst q + simp only [Nat.mul_zero] at hq + omega + · subst q + simp only [Nat.mul_one] at hq + omega + · subst q + simp only [Nat.mul_two] at hq + omega + calc + 3 * d = d * 3 := Nat.mul_comm _ _ + _ ≤ d * q := Nat.mul_le_mul_left d hq3 + _ = n := hq.symm + +variable {F : Type*} [Field F] [Fintype F] +variable {p n : ℕ} [CharP F p] + +/-- The actual degree of a proper subfield divides the odd ambient degree and +is at most one third of it. No primality assumption on the degree is used. -/ +theorem subfield_degree_data_of_odd (hp : p.Prime) (hn : Odd n) + (hcard : Fintype.card F = p ^ n) (S : Subfield F) [Fintype S] + (hS : S ≠ ⊤) : + ∃ d : ℕ, 0 < d ∧ d ∣ n ∧ 3 * d ≤ n ∧ Fintype.card S = p ^ d := by + obtain ⟨m, _, hm⟩ := FiniteField.card S p + have hpow : p ^ n = p ^ ((m : ℕ) * Module.finrank S F) := by + calc + p ^ n = Fintype.card F := hcard.symm + _ = Fintype.card S ^ Module.finrank S F := + Module.card_eq_pow_finrank (K := S) (V := F) + _ = (p ^ (m : ℕ)) ^ Module.finrank S F := by rw [hm] + _ = p ^ ((m : ℕ) * Module.finrank S F) := + (pow_mul p (m : ℕ) (Module.finrank S F)).symm + have hdegree : n = (m : ℕ) * Module.finrank S F := + Nat.pow_right_injective hp.one_lt hpow + have hdiv : (m : ℕ) ∣ n := ⟨Module.finrank S F, hdegree⟩ + have hne : (m : ℕ) ≠ n := by + intro he + have hlt := subfield_card_lt_of_ne_top S hS + have hsame : Fintype.card S = Fintype.card F := by rw [hm, he, hcard] + exact (ne_of_lt hlt) hsame + exact ⟨m, m.property, hdiv, three_mul_le_of_dvd_odd hn hdiv hne, hm⟩ + +/-- Cube bound for proper subfields in arbitrary odd degree, including composite degree. -/ +theorem subfield_card_cube_le_of_odd_degree (hp : p.Prime) (hn : Odd n) + (hcard : Fintype.card F = p ^ n) (S : Subfield F) [Fintype S] + (hS : S ≠ ⊤) : Fintype.card S ^ 3 ≤ Fintype.card F := by + obtain ⟨d, _, _, hd, hSd⟩ := subfield_degree_data_of_odd hp hn hcard S hS + rw [hSd, hcard, ← pow_mul] + exact Nat.pow_le_pow_right hp.pos (by simpa only [Nat.mul_comm] using hd) + +/-- Choice-free cardinal version of the arbitrary odd-degree cube bound. -/ +theorem subfield_natCard_cube_le_of_odd_degree (hp : p.Prime) (hn : Odd n) + (hcard : Fintype.card F = p ^ n) (S : Subfield F) (hS : S ≠ ⊤) : + Nat.card S ^ 3 ≤ Fintype.card F := by + classical + let : Fintype S := Fintype.ofFinite S + simpa only [Nat.card_eq_fintype_card] using + subfield_card_cube_le_of_odd_degree hp hn hcard S hS + +/-- The constructed splitting field satisfies the required cube bound for every +odd degree above two, with no hypothesis on its proper subfields. -/ +theorem extensionField_properSubfield_cube_le_of_odd (p n : ℕ) [Fact p.Prime] + (hn : Odd n) (_hn3 : 2 < n) (S : Subfield (ExtensionField p n)) (hS : S ≠ ⊤) : + Nat.card S ^ 3 ≤ Fintype.card (ExtensionField p n) := by + have hn0 : n ≠ 0 := by obtain ⟨a, ha⟩ := hn; omega + exact subfield_natCard_cube_le_of_odd_degree (Fact.out : p.Prime) hn + (extensionField_card p n hn0) S hS + +/-- Same bound with the actual ambient cardinality written as its prime power. -/ +theorem extensionField_properSubfield_cube_le_pow_of_odd (p n : ℕ) [Fact p.Prime] + (hn : Odd n) (hn3 : 2 < n) (S : Subfield (ExtensionField p n)) (hS : S ≠ ⊤) : + Nat.card S ^ 3 ≤ p ^ n := by + have hn0 : n ≠ 0 := by omega + rw [← extensionField_card p n hn0] + exact extensionField_properSubfield_cube_le_of_odd p n hn hn3 S hS + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Field/SubfieldBound.lean b/lean/OAI/Combinatorics/Ryser/Field/SubfieldBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..79865884b73732a754284e95551383ae8a52a974 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Field/SubfieldBound.lean @@ -0,0 +1,87 @@ +import Mathlib.Algebra.Field.Subfield.Basic +import Mathlib.FieldTheory.Finite.Basic + +namespace OAI + +namespace RyserCoveringCounterexample + +variable {F : Type*} [Field F] [Fintype F] + +theorem subfield_card_lt_of_ne_top (S : Subfield F) [Fintype S] + (hS : S ≠ ⊤) : Fintype.card S < Fintype.card F := by + apply Fintype.card_lt_of_injective_not_surjective + (fun x : S => (x : F)) Subtype.val_injective + intro hsurj + apply hS + apply top_unique + intro x _ + obtain ⟨y, hy⟩ := hsurj x + exact hy ▸ y.property + +theorem subfield_natCard_lt_of_ne_top (S : Subfield F) + (hS : S ≠ ⊤) : Nat.card S < Fintype.card F := by + classical + let : Fintype S := Fintype.ofFinite S + simpa only [Nat.card_eq_fintype_card] using subfield_card_lt_of_ne_top S hS + +variable {p n : ℕ} [CharP F p] + +theorem subfield_card_eq_char_of_prime_degree (hp : p.Prime) (hn : n.Prime) + (hcard : Fintype.card F = p ^ n) (S : Subfield F) [Fintype S] + (hS : S ≠ ⊤) : Fintype.card S = p := by + obtain ⟨m, _, hm⟩ := FiniteField.card S p + have hpow : p ^ n = p ^ ((m : ℕ) * Module.finrank S F) := by + calc + p ^ n = Fintype.card F := hcard.symm + _ = Fintype.card S ^ Module.finrank S F := + Module.card_eq_pow_finrank (K := S) (V := F) + _ = (p ^ (m : ℕ)) ^ Module.finrank S F := by rw [hm] + _ = p ^ ((m : ℕ) * Module.finrank S F) := + (pow_mul p (m : ℕ) (Module.finrank S F)).symm + have hnmd : n = (m : ℕ) * Module.finrank S F := + Nat.pow_right_injective hp.one_lt hpow + have hmdiv : (m : ℕ) ∣ n := ⟨Module.finrank S F, hnmd⟩ + rcases hn.eq_one_or_self_of_dvd (m : ℕ) hmdiv with hmone | hmn + · simpa only [hmone, pow_one] using hm + · have hlt := subfield_card_lt_of_ne_top S hS + have heq : Fintype.card S = Fintype.card F := by rw [hm, hmn, hcard] + exact ((ne_of_lt hlt) heq).elim + +theorem subfield_natCard_eq_char_of_prime_degree (hp : p.Prime) (hn : n.Prime) + (hcard : Fintype.card F = p ^ n) (S : Subfield F) + (hS : S ≠ ⊤) : Nat.card S = p := by + classical + let : Fintype S := Fintype.ofFinite S + simpa only [Nat.card_eq_fintype_card] using + subfield_card_eq_char_of_prime_degree hp hn hcard S hS + +theorem subfield_card_cube_le_of_prime_degree (hp : p.Prime) (hn : n.Prime) + (hcard : Fintype.card F = p ^ n) (hn3 : 2 < n) + (S : Subfield F) [Fintype S] (hS : S ≠ ⊤) : + Fintype.card S ^ 3 ≤ Fintype.card F := by + rw [subfield_card_eq_char_of_prime_degree hp hn hcard S hS, hcard] + exact Nat.pow_le_pow_right hp.pos (Nat.succ_le_of_lt hn3) + +theorem subfield_natCard_cube_le_of_prime_degree (hp : p.Prime) (hn : n.Prime) + (hcard : Fintype.card F = p ^ n) (hn3 : 2 < n) + (S : Subfield F) (hS : S ≠ ⊤) : Nat.card S ^ 3 ≤ Fintype.card F := by + rw [subfield_natCard_eq_char_of_prime_degree hp hn hcard S hS, hcard] + exact Nat.pow_le_pow_right hp.pos (Nat.succ_le_of_lt hn3) + +theorem subfield_eq_top_of_card_eq_char (hp : p.Prime) + (hcard : Fintype.card F = p) (S : Subfield F) : S = ⊤ := by + classical + let : Fintype S := Fintype.ofFinite S + by_contra hS + obtain ⟨m, _, hm⟩ := FiniteField.card S p + have hpS : p ≤ Fintype.card S := by + rw [hm] + simpa only [pow_one] using + (Nat.pow_le_pow_right hp.pos m.property : p ^ 1 ≤ p ^ (m : ℕ)) + have hlt := subfield_card_lt_of_ne_top S hS + rw [hcard] at hlt + exact (not_lt_of_ge hpS) hlt + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Geometry/AffineJoins.lean b/lean/OAI/Combinatorics/Ryser/Geometry/AffineJoins.lean new file mode 100644 index 0000000000000000000000000000000000000000..0583b5cf5e4bd4ba98d1e2bfec75546f2417b94e --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Geometry/AffineJoins.lean @@ -0,0 +1,216 @@ +import OAI.Combinatorics.Ryser.Geometry.Basic +import Mathlib.Tactic.Ring + +namespace OAI + +namespace RyserCoveringCounterexample + +variable {F : Type*} [Field F] + +theorem point_eq_of_projection_eq_of_ne_direction + {d e : Direction F} {p q : Point F} (hde : d ≠ e) + (hd : projection d p = projection d q) + (he : projection e p = projection e q) : p = q := by + rcases p with ⟨x, y⟩ + rcases q with ⟨z, w⟩ + cases d with + | none => + cases e with + | none => exact (hde rfl).elim + | some b => + change x = z at hd + change y - b * x = w - b * z at he + apply Prod.ext hd + calc + y = (y - b * x) + b * x := by ring + _ = (w - b * z) + b * z := by rw [he, hd] + _ = w := by ring + | some a => + cases e with + | none => + change y - a * x = w - a * z at hd + change x = z at he + apply Prod.ext he + calc + y = (y - a * x) + a * x := by ring + _ = (w - a * z) + a * z := by rw [hd, he] + _ = w := by ring + | some b => + have hab : a ≠ b := fun h => hde (congrArg Option.some h) + change y - a * x = w - a * z at hd + change y - b * x = w - b * z at he + have hmul : (a - b) * x = (a - b) * z := by + calc + (a - b) * x = (y - b * x) - (y - a * x) := by ring + _ = (w - b * z) - (w - a * z) := by rw [he, hd] + _ = (a - b) * z := by ring + have hx : x = z := mul_left_cancel₀ (sub_ne_zero.mpr hab) hmul + apply Prod.ext hx + calc + y = (y - a * x) + a * x := by ring + _ = (w - a * z) + a * z := by rw [hd, hx] + _ = w := by ring + +theorem line_eq_of_direction_eq_of_incidence + {l m : AffineLine F} {p : Point F} (hdl : l.1 = m.1) + (hpl : Incidence p l) (hpm : Incidence p m) : l = m := by + change projection l.1 p = l.2 at hpl + change projection m.1 p = m.2 at hpm + apply Prod.ext hdl + exact hpl.symm.trans ((congrArg (fun d => projection d p) hdl).trans hpm) + +theorem not_incidence_of_same_direction_of_ne + {l m : AffineLine F} {p : Point F} (hdl : l.1 = m.1) + (hlm : l ≠ m) (hpl : Incidence p l) : ¬Incidence p m := + fun hpm => hlm (line_eq_of_direction_eq_of_incidence hdl hpl hpm) + +theorem line_eq_of_two_incident_points + {p q : Point F} {l m : AffineLine F} (hpq : p ≠ q) + (hpl : Incidence p l) (hql : Incidence q l) + (hpm : Incidence p m) (hqm : Incidence q m) : l = m := by + by_cases hdir : l.1 = m.1 + · exact line_eq_of_direction_eq_of_incidence hdir hpl hpm + · change projection l.1 p = l.2 at hpl + change projection l.1 q = l.2 at hql + change projection m.1 p = m.2 at hpm + change projection m.1 q = m.2 at hqm + exact (hpq (point_eq_of_projection_eq_of_ne_direction hdir + (hpl.trans hql.symm) (hpm.trans hqm.symm))).elim + +theorem eq_of_common_incidence_of_ne_lines + {l m : AffineLine F} {p q : Point F} (hlm : l ≠ m) + (hpl : Incidence p l) (hpm : Incidence p m) + (hql : Incidence q l) (hqm : Incidence q m) : p = q := by + by_contra hpq + exact hlm (line_eq_of_two_incident_points hpq hpl hql hpm hqm) + +theorem existsUnique_incident_of_ne_direction (l m : AffineLine F) + (hdir : l.1 ≠ m.1) : + ∃! p : Point F, Incidence p l ∧ Incidence p m := by + have hex : ∃ p : Point F, Incidence p l ∧ Incidence p m := by + rcases l with ⟨d, b⟩ + rcases m with ⟨e, c⟩ + change d ≠ e at hdir + cases d with + | none => + cases e with + | none => exact (hdir rfl).elim + | some a => + refine ⟨(b, c + a * b), ?_⟩ + change b = b ∧ (c + a * b) - a * b = c + exact ⟨rfl, by ring⟩ + | some a => + cases e with + | none => + refine ⟨(c, b + a * c), ?_⟩ + change (b + a * c) - a * c = b ∧ c = c + exact ⟨by ring, rfl⟩ + | some a' => + have haa : a ≠ a' := fun h => hdir (congrArg Option.some h) + have hne : a - a' ≠ 0 := sub_ne_zero.mpr haa + let x : F := (c - b) / (a - a') + have hx : x * (a - a') = c - b := by + change (c - b) / (a - a') * (a - a') = c - b + exact div_mul_cancel₀ (c - b) hne + refine ⟨(x, b + a * x), ?_⟩ + change (b + a * x) - a * x = b ∧ (b + a * x) - a' * x = c + constructor + · ring + · calc + (b + a * x) - a' * x = b + x * (a - a') := by ring + _ = b + (c - b) := by rw [hx] + _ = c := by ring + obtain ⟨p, hp⟩ := hex + refine ⟨p, hp, ?_⟩ + intro q hq + change projection l.1 p = l.2 ∧ projection m.1 p = m.2 at hp + change projection l.1 q = l.2 ∧ projection m.1 q = m.2 at hq + exact point_eq_of_projection_eq_of_ne_direction hdir + (hq.1.trans hp.1.symm) (hq.2.trans hp.2.symm) + +section Join + +variable [DecidableEq F] + +def joinDirection (p q : Point F) : Direction F := + if p.1 = q.1 then none else some ((q.2 - p.2) / (q.1 - p.1)) + +def joinLine (p q : Point F) : AffineLine F := + lineThrough (joinDirection p q) p + +@[simp] theorem incidence_joinLine_left (p q : Point F) : + Incidence p (joinLine p q) := rfl + +@[simp] theorem incidence_joinLine_right (p q : Point F) : + Incidence q (joinLine p q) := by + change projection (joinDirection p q) q = projection (joinDirection p q) p + by_cases hx : p.1 = q.1 + · have hd : joinDirection p q = none := by + unfold joinDirection + exact ite_eq_left hx + simpa only [hd, projection] using hx.symm + · let a : F := (q.2 - p.2) / (q.1 - p.1) + have hd : joinDirection p q = some a := by + unfold joinDirection + exact ite_eq_right hx + have hden : q.1 - p.1 ≠ 0 := sub_ne_zero.mpr (Ne.symm hx) + have hs : a * (q.1 - p.1) = q.2 - p.2 := by + change (q.2 - p.2) / (q.1 - p.1) * (q.1 - p.1) = q.2 - p.2 + exact div_mul_cancel₀ (q.2 - p.2) hden + simp only [hd, projection] + calc + q.2 - a * q.1 = p.2 - a * p.1 + + ((q.2 - p.2) - a * (q.1 - p.1)) := by ring + _ = p.2 - a * p.1 := by rw [hs]; ring + +theorem lineThrough_joinDirection_eq (p q : Point F) : + lineThrough (joinDirection p q) q = joinLine p q := by + apply line_eq_of_direction_eq_of_incidence + (l := lineThrough (joinDirection p q) q) (m := joinLine p q) (p := q) rfl + · rfl + · exact incidence_joinLine_right p q + +theorem eq_joinLine_of_incidence {p q : Point F} {l : AffineLine F} + (hpq : p ≠ q) (hpl : Incidence p l) (hql : Incidence q l) : + l = joinLine p q := + line_eq_of_two_incident_points hpq hpl hql + (incidence_joinLine_left p q) (incidence_joinLine_right p q) + +theorem existsUnique_lineThrough_pair {p q : Point F} (hpq : p ≠ q) : + ∃! l : AffineLine F, Incidence p l ∧ Incidence q l := by + refine ⟨joinLine p q, ⟨incidence_joinLine_left p q, + incidence_joinLine_right p q⟩, ?_⟩ + intro l hl + exact eq_joinLine_of_incidence hpq hl.1 hl.2 + +theorem projection_eq_iff_eq_joinDirection {p q : Point F} (hpq : p ≠ q) + (d : Direction F) : + projection d p = projection d q ↔ d = joinDirection p q := by + constructor + · intro hd + have hpl : Incidence p (lineThrough d p) := rfl + have hql : Incidence q (lineThrough d p) := by + change projection d q = projection d p + exact hd.symm + have hl := eq_joinLine_of_incidence hpq hpl hql + have hf := congrArg Prod.fst hl + change d = joinDirection p q at hf + exact hf + · intro hd + subst d + have hq := incidence_joinLine_right p q + change projection (joinDirection p q) q = projection (joinDirection p q) p at hq + exact hq.symm + +theorem existsUnique_direction_of_ne {p q : Point F} (hpq : p ≠ q) : + ∃! d : Direction F, projection d p = projection d q := by + refine ⟨joinDirection p q, + (projection_eq_iff_eq_joinDirection hpq _).mpr rfl, ?_⟩ + intro d hd + exact (projection_eq_iff_eq_joinDirection hpq d).mp hd + +end Join + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Geometry/Basic.lean b/lean/OAI/Combinatorics/Ryser/Geometry/Basic.lean new file mode 100644 index 0000000000000000000000000000000000000000..3008d145b817f9b7eafefb0b26c1edc95bccf3f1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Geometry/Basic.lean @@ -0,0 +1,140 @@ +import Mathlib.Algebra.Field.Basic +import Mathlib.Data.Fintype.Option +import Mathlib.Data.Fintype.Prod +import Mathlib.Data.Fintype.Sum +import Mathlib.Data.Finset.Filter +import Mathlib.Tactic.Ring + +namespace OAI + +namespace RyserCoveringCounterexample + +abbrev Point (F : Type*) := F × F +abbrev Direction (F : Type*) := Option F +abbrev AffineLine (F : Type*) := Direction F × F +abbrev ProjectivePoint (F : Type*) := Point F ⊕ Direction F +abbrev ProjectiveLine (F : Type*) := Option (AffineLine F) + +variable {F : Type*} [Field F] + +def projection : Direction F → Point F → F + | none, p => p.1 + | some a, p => p.2 - a * p.1 + +def Incidence (p : Point F) (l : AffineLine F) : Prop := + projection l.1 p = l.2 + +instance [DecidableEq F] (p : Point F) (l : AffineLine F) : + Decidable (Incidence p l) := + inferInstanceAs (Decidable (projection l.1 p = l.2)) + +def lineThrough (d : Direction F) (p : Point F) : AffineLine F := + (d, projection d p) + +@[simp] theorem projection_none (p : Point F) : projection none p = p.1 := rfl +@[simp] theorem projection_some (a : F) (p : Point F) : + projection (some a) p = p.2 - a * p.1 := rfl +@[simp] theorem projection_some_zero (p : Point F) : + projection (some 0) p = p.2 := by simp [projection] + +@[simp] theorem incidence_mk (p : Point F) (d : Direction F) (b : F) : + Incidence p (d, b) ↔ projection d p = b := Iff.rfl + +@[simp] theorem lineThrough_direction (d : Direction F) (p : Point F) : + (lineThrough d p).1 = d := rfl +@[simp] theorem lineThrough_offset (d : Direction F) (p : Point F) : + (lineThrough d p).2 = projection d p := rfl +@[simp] theorem incidence_lineThrough (d : Direction F) (p : Point F) : + Incidence p (lineThrough d p) := rfl + +@[simp] theorem incidence_lineThrough_iff (d : Direction F) (p q : Point F) : + Incidence p (lineThrough d q) ↔ projection d p = projection d q := Iff.rfl + +theorem lineThrough_eq_iff (d : Direction F) (p q : Point F) : + lineThrough d p = lineThrough d q ↔ projection d p = projection d q := by + simp only [lineThrough, Prod.mk.injEq, true_and] + +theorem eq_lineThrough_of_incidence {p : Point F} {l : AffineLine F} + (h : Incidence p l) : l = lineThrough l.1 p := by + apply Prod.ext + · rfl + · exact h.symm + +theorem point_eq_of_projection_axes {p q : Point F} + (hx : projection none p = projection none q) + (hy : projection (some 0) p = projection (some 0) q) : p = q := by + apply Prod.ext hx + simpa only [projection_some_zero] using hy + +theorem projection_add (d : Direction F) (p q : Point F) : + projection d (p.1 + q.1, p.2 + q.2) = projection d p + projection d q := by + cases d with + | none => rfl + | some slope => simp only [projection]; ring + +theorem projection_sub (d : Direction F) (p q : Point F) : + projection d (p.1 - q.1, p.2 - q.2) = projection d p - projection d q := by + cases d with + | none => rfl + | some slope => simp only [projection]; ring + +theorem projection_mul (d : Direction F) (c : F) (p : Point F) : + projection d (c * p.1, c * p.2) = c * projection d p := by + cases d with + | none => rfl + | some slope => simp only [projection]; ring + +def ProjectiveIncidence : ProjectivePoint F → ProjectiveLine F → Prop + | Sum.inl p, some l => Incidence p l + | Sum.inr d, some l => d = l.1 + | Sum.inl _, none => False + | Sum.inr _, none => True + +instance [DecidableEq F] (p : ProjectivePoint F) (l : ProjectiveLine F) : + Decidable (ProjectiveIncidence p l) := by + cases p <;> cases l <;> simp only [ProjectiveIncidence] <;> infer_instance + +@[simp] theorem projectiveIncidence_finite_affine (p : Point F) (l : AffineLine F) : + ProjectiveIncidence (Sum.inl p) (some l) ↔ Incidence p l := Iff.rfl +@[simp] theorem projectiveIncidence_infinite_affine (d : Direction F) (l : AffineLine F) : + ProjectiveIncidence (Sum.inr d) (some l) ↔ d = l.1 := Iff.rfl +@[simp] theorem projectiveIncidence_finite_infinity (p : Point F) : + ¬ ProjectiveIncidence (Sum.inl p) (none : ProjectiveLine F) := not_false +@[simp] theorem projectiveIncidence_infinite_infinity (d : Direction F) : + ProjectiveIncidence (Sum.inr d) (none : ProjectiveLine F) := trivial + +section Finite +variable [Fintype F] [DecidableEq F] + +def linePoints (l : AffineLine F) : Finset (Point F) := + Finset.univ.filter fun p => Incidence p l + +def affinePencil (p : ProjectivePoint F) : Finset (AffineLine F) := + Finset.univ.filter fun l => ProjectiveIncidence p (some l) + +def projectiveLinePoints (l : ProjectiveLine F) : Finset (ProjectivePoint F) := + Finset.univ.filter fun p => ProjectiveIncidence p l + +def projectivePencil (p : ProjectivePoint F) : Finset (ProjectiveLine F) := + Finset.univ.filter fun l => ProjectiveIncidence p l + +@[simp] theorem mem_linePoints (p : Point F) (l : AffineLine F) : + p ∈ linePoints l ↔ Incidence p l := by simp only [linePoints, Finset.mem_filter, + Finset.mem_univ, true_and] + +@[simp] theorem mem_affinePencil (p : ProjectivePoint F) (l : AffineLine F) : + l ∈ affinePencil p ↔ ProjectiveIncidence p (some l) := by + simp only [affinePencil, Finset.mem_filter, Finset.mem_univ, true_and] + +@[simp] theorem mem_projectiveLinePoints (p : ProjectivePoint F) (l : ProjectiveLine F) : + p ∈ projectiveLinePoints l ↔ ProjectiveIncidence p l := by + simp only [projectiveLinePoints, Finset.mem_filter, Finset.mem_univ, true_and] + +@[simp] theorem mem_projectivePencil (p : ProjectivePoint F) (l : ProjectiveLine F) : + l ∈ projectivePencil p ↔ ProjectiveIncidence p l := by + simp only [projectivePencil, Finset.mem_filter, Finset.mem_univ, true_and] + +end Finite +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Geometry/Cardinality.lean b/lean/OAI/Combinatorics/Ryser/Geometry/Cardinality.lean new file mode 100644 index 0000000000000000000000000000000000000000..d9f5d879a5755eb42c7038d89c8c823f8f83832b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Geometry/Cardinality.lean @@ -0,0 +1,157 @@ +import OAI.Combinatorics.Ryser.Geometry.Basic +import Mathlib.Data.Finset.Option +import Mathlib.Data.Finset.Sum +import Mathlib.Data.Fintype.Card + +namespace OAI + +namespace RyserCoveringCounterexample + +variable {F : Type*} [instFieldF : Field F] [Fintype F] [instDecidableEqF : DecidableEq F] + +@[simp] theorem card_point : + Fintype.card (Point F) = Fintype.card F ^ 2 := let _ := instFieldF; let _ := instDecidableEqF; by + simp only [Point, Fintype.card_prod, pow_two] + +@[simp] theorem card_direction : + Fintype.card (Direction F) = Fintype.card F + 1 := let _ := instFieldF; let _ := instDecidableEqF; by + exact Fintype.card_option + +@[simp] theorem card_affineLine : + Fintype.card (AffineLine F) = Fintype.card F * (Fintype.card F + 1) := by + simp only [AffineLine, Fintype.card_prod, card_direction, Nat.mul_comm] + +@[simp] theorem card_projectivePoint : + Fintype.card (ProjectivePoint F) = + Fintype.card F ^ 2 + Fintype.card F + 1 := by + simp only [ProjectivePoint, Fintype.card_sum, card_point, card_direction, Nat.add_assoc] + +@[simp] theorem card_projectiveLine : + Fintype.card (ProjectiveLine F) = + Fintype.card F ^ 2 + Fintype.card F + 1 := by + simp only [ProjectiveLine, Fintype.card_option, card_affineLine, + Nat.mul_add, Nat.mul_one, pow_two] + +def linePointEquiv (l : AffineLine F) : F ≃ ↥(linePoints l) := by + rcases l with ⟨d, b⟩ + cases d with + | none => + refine + { toFun := fun t => ⟨(b, t), by simp [Incidence, projection]⟩ + invFun := fun p => p.val.2 + left_inv := fun _ => rfl + right_inv := ?_ } + intro p + apply Subtype.ext + apply Prod.ext + · have hp := (mem_linePoints p.val (none, b)).mp p.property + change p.val.1 = b at hp + exact hp.symm + · rfl + | some a => + refine + { toFun := fun t => ⟨(t, b + a * t), by simp [Incidence, projection]⟩ + invFun := fun p => p.val.1 + left_inv := fun _ => rfl + right_inv := ?_ } + intro p + apply Subtype.ext + apply Prod.ext + · rfl + · have hp := (mem_linePoints p.val (some a, b)).mp p.property + change p.val.2 - a * p.val.1 = b at hp + simpa only [sub_add_cancel] using + (congrArg (fun u : F => u + a * p.val.1) hp).symm + +@[simp] theorem card_linePoints (l : AffineLine F) : + (linePoints l).card = Fintype.card F := by + simpa only [Fintype.card_coe] using (Fintype.card_congr (linePointEquiv l)).symm + +theorem card_projection_fiber (d : Direction F) (b : F) : + (Finset.univ.filter (fun p : Point F => projection d p = b)).card = + Fintype.card F := + card_linePoints (d, b) + +def affinePencilFiniteEquiv (p : Point F) : + Direction F ≃ ↥(affinePencil (Sum.inl p)) where + toFun d := ⟨lineThrough d p, by simp⟩ + invFun l := l.val.1 + left_inv _ := rfl + right_inv l := by + apply Subtype.ext + have hl : Incidence p l.val := + (mem_affinePencil (Sum.inl p) l.val).mp l.property + exact (eq_lineThrough_of_incidence hl).symm + +def affinePencilInfiniteEquiv (d : Direction F) : + F ≃ ↥(affinePencil (Sum.inr d)) where + toFun b := ⟨(d, b), by simp⟩ + invFun l := l.val.2 + left_inv _ := rfl + right_inv l := by + apply Subtype.ext + apply Prod.ext + · exact (mem_affinePencil (Sum.inr d) l.val).mp l.property + · rfl + +@[simp] theorem card_affinePencil_finite (p : Point F) : + (affinePencil (Sum.inl p)).card = Fintype.card F + 1 := by + simpa only [Fintype.card_coe, card_direction] using + (Fintype.card_congr (affinePencilFiniteEquiv p)).symm + +@[simp] theorem card_affinePencil_infinite (d : Direction F) : + (affinePencil (Sum.inr d)).card = Fintype.card F := by + simpa only [Fintype.card_coe] using + (Fintype.card_congr (affinePencilInfiniteEquiv d)).symm + +theorem projectiveLinePoints_some (l : AffineLine F) : + projectiveLinePoints (some l) = (linePoints l).disjSum {l.1} := by + ext p + cases p with + | inl p => simp + | inr d => simp + +theorem projectiveLinePoints_none : + projectiveLinePoints (none : ProjectiveLine F) = + (∅ : Finset (Point F)).disjSum (Finset.univ : Finset (Direction F)) := by + ext p + cases p with + | inl p => simp + | inr d => simp + +theorem projectivePencil_finite (p : Point F) : + projectivePencil (Sum.inl p) = + (affinePencil (Sum.inl p)).map Function.Embedding.some := by + ext l + cases l with + | none => simp [Finset.mem_map] + | some l => simp [Finset.mem_map] + +theorem projectivePencil_infinite (d : Direction F) : + projectivePencil (Sum.inr d) = (affinePencil (Sum.inr d)).insertNone := by + ext l + cases l with + | none => simp + | some l => simp + +@[simp] theorem card_projectiveLinePoints (l : ProjectiveLine F) : + (projectiveLinePoints l).card = Fintype.card F + 1 := by + cases l with + | none => + rw [projectiveLinePoints_none, Finset.card_disjSum, Finset.card_empty, + Finset.card_univ, card_direction, Nat.zero_add] + | some l => + rw [projectiveLinePoints_some, Finset.card_disjSum, card_linePoints, + Finset.card_singleton] + +@[simp] theorem card_projectivePencil (p : ProjectivePoint F) : + (projectivePencil p).card = Fintype.card F + 1 := by + cases p with + | inl p => + rw [projectivePencil_finite, Finset.card_map, card_affinePencil_finite] + | inr d => + rw [projectivePencil_infinite, Finset.card_insertNone, card_affinePencil_infinite] + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Geometry/Normalization.lean b/lean/OAI/Combinatorics/Ryser/Geometry/Normalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..e70c6d39f6ac15e8e881e4bfc0795c6c04e94e6f --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Geometry/Normalization.lean @@ -0,0 +1,162 @@ +import OAI.Combinatorics.Ryser.Geometry.ProjectiveTransformAffine +import OAI.Combinatorics.Ryser.Geometry.ProjectiveTransformXY +import OAI.Combinatorics.Ryser.Geometry.ProjectiveTransformXZ + +namespace OAI + +namespace RyserCoveringCounterexample + +variable {F : Type*} [Field F] + +theorem exists_direction_of_incidence_infinity {p : ProjectivePoint F} + (h : ProjectiveIncidence p none) : ∃ d, p = Sum.inr d := by + cases p with + | inl p => exact h.elim + | inr d => exact ⟨d, rfl⟩ + +theorem exists_affine_of_not_incidence_infinity {p : ProjectivePoint F} + (h : ¬ ProjectiveIncidence p none) : ∃ x, p = Sum.inl x := by + cases p with + | inl x => exact ⟨x, rfl⟩ + | inr d => exact (h trivial).elim + +theorem exists_slope_of_incidence_infinity_of_ne_vertical {p : ProjectivePoint F} + (h : ProjectiveIncidence p none) (hne : p ≠ Sum.inr none) : + ∃ a, p = Sum.inr (some a) := by + obtain ⟨d, rfl⟩ := exists_direction_of_incidence_infinity h + cases d with + | none => exact (hne rfl).elim + | some a => exact ⟨a, rfl⟩ + +theorem exists_projectiveTransform_line_to_infinity (l : ProjectiveLine F) : + ∃ T : ProjectiveTransform F, T.lines l = none := by + cases l with + | none => exact ⟨ProjectiveTransform.refl F, rfl⟩ + | some l => + rcases l with ⟨d, b⟩ + cases d with + | none => + refine ⟨(translate (-b) 0).trans (swapXZ F), ?_⟩ + simp + | some a => + refine ⟨(((shear (-a)).trans (swapXY F)).trans + (translate (-b) 0)).trans (swapXZ F), ?_⟩ + simp only [ProjectiveTransform.trans_lines, shear_lines_slope, add_neg_cancel, + swapXY_lines_slope_zero, translate_lines_vertical, swapXZ_lines_vertical_zero] + +theorem exists_projectiveTransform_direction_to_vertical (d : Direction F) : + ∃ T : ProjectiveTransform F, + T.points (Sum.inr d) = Sum.inr none ∧ + T.points (Sum.inl (0, 0)) = Sum.inl (0, 0) ∧ + T.lines none = none := by + cases d with + | none => exact ⟨ProjectiveTransform.refl F, rfl, rfl, rfl⟩ + | some a => + refine ⟨(shear (-a)).trans (swapXY F), ?_, ?_, ?_⟩ <;> simp + +theorem exists_projectiveTransform_direction_frame + (d1 d2 d3 : Direction F) (h12 : d1 ≠ d2) (h13 : d1 ≠ d3) + (h23 : d2 ≠ d3) : + ∃ T : ProjectiveTransform F, + T.points (Sum.inr d1) = Sum.inr (some 0) ∧ + T.points (Sum.inr d2) = Sum.inr none ∧ + T.points (Sum.inr d3) = Sum.inr (some 1) ∧ + T.points (Sum.inl (0, 0)) = Sum.inl (0, 0) := by + obtain ⟨S, hsecond, horigin, hline⟩ := + exists_projectiveTransform_direction_to_vertical d2 + have hinf (d : Direction F) : ProjectiveIncidence (S.points (Sum.inr d)) none := by + rw [← hline] + exact (S.incidence (Sum.inr d) none).mpr trivial + have hfirst : S.points (Sum.inr d1) ≠ Sum.inr none := by + intro h + exact h12 (Sum.inr.inj (S.points.injective (h.trans hsecond.symm))) + have hthird : S.points (Sum.inr d3) ≠ Sum.inr none := by + intro h + exact h23 (Sum.inr.inj (S.points.injective (hsecond.trans h.symm))) + obtain ⟨a, ha⟩ := exists_slope_of_incidence_infinity_of_ne_vertical (hinf d1) hfirst + obtain ⟨c, hc⟩ := exists_slope_of_incidence_infinity_of_ne_vertical (hinf d3) hthird + have hac : a ≠ c := by + intro h + apply h13 + apply Sum.inr.inj + apply S.points.injective + rw [ha, hc, h] + have hca : c - a ≠ 0 := sub_ne_zero.mpr (Ne.symm hac) + refine ⟨S.trans ((shear (-a)).trans (scaleY (c - a)⁻¹ (inv_ne_zero hca))), + ?_, ?_, ?_, ?_⟩ + · simp [ha] + · simp [hsecond] + · simp only [ProjectiveTransform.trans_points, hc, shear_points_infinite_slope, + scaleY_points_infinite_slope, ← sub_eq_add_neg] + simp [hca] + · simp [horigin] + +theorem exists_projectiveTransform_normalization + {p1 p2 p3 p4 : ProjectivePoint F} {l : ProjectiveLine F} + (h12 : p1 ≠ p2) (h13 : p1 ≠ p3) (h23 : p2 ≠ p3) + (h1 : ProjectiveIncidence p1 l) (h2 : ProjectiveIncidence p2 l) + (h3 : ProjectiveIncidence p3 l) (h4 : ¬ ProjectiveIncidence p4 l) : + ∃ T : ProjectiveTransform F, + T.points p1 = Sum.inr (some 0) ∧ + T.points p2 = Sum.inr none ∧ + T.points p3 = Sum.inr (some 1) ∧ + T.points p4 = Sum.inl (0, 0) := by + obtain ⟨S, hline⟩ := exists_projectiveTransform_line_to_infinity l + have hfirst : ProjectiveIncidence (S.points p1) none := by + rw [← hline] + exact (S.incidence p1 l).mpr h1 + have hsecond : ProjectiveIncidence (S.points p2) none := by + rw [← hline] + exact (S.incidence p2 l).mpr h2 + have hthird : ProjectiveIncidence (S.points p3) none := by + rw [← hline] + exact (S.incidence p3 l).mpr h3 + have hfourth : ¬ ProjectiveIncidence (S.points p4) none := by + rw [← hline] + exact fun h => h4 ((S.incidence p4 l).mp h) + obtain ⟨d1, hd1⟩ := exists_direction_of_incidence_infinity hfirst + obtain ⟨d2, hd2⟩ := exists_direction_of_incidence_infinity hsecond + obtain ⟨d3, hd3⟩ := exists_direction_of_incidence_infinity hthird + obtain ⟨x, hx⟩ := exists_affine_of_not_incidence_infinity hfourth + have hd12 : d1 ≠ d2 := by + intro h + apply h12 + apply S.points.injective + rw [hd1, hd2, h] + have hd13 : d1 ≠ d3 := by + intro h + apply h13 + apply S.points.injective + rw [hd1, hd3, h] + have hd23 : d2 ≠ d3 := by + intro h + apply h23 + apply S.points.injective + rw [hd2, hd3, h] + obtain ⟨U, hu1, hu2, hu3, hu4⟩ := + exists_projectiveTransform_direction_frame d1 d2 d3 hd12 hd13 hd23 + refine ⟨(S.trans (translate (-x.1) (-x.2))).trans U, ?_, ?_, ?_, ?_⟩ + · simpa only [ProjectiveTransform.trans_points, hd1, translate_points_infinite] using hu1 + · simpa only [ProjectiveTransform.trans_points, hd2, translate_points_infinite] using hu2 + · simpa only [ProjectiveTransform.trans_points, hd3, translate_points_infinite] using hu3 + · simpa only [ProjectiveTransform.trans_points, hx, translate_points_finite, + add_neg_cancel] using hu4 + +theorem exists_projective_normalization + {p1 p2 p3 p4 : ProjectivePoint F} {l : ProjectiveLine F} + (h12 : p1 ≠ p2) (h13 : p1 ≠ p3) (h23 : p2 ≠ p3) + (h1 : ProjectiveIncidence p1 l) (h2 : ProjectiveIncidence p2 l) + (h3 : ProjectiveIncidence p3 l) (h4 : ¬ ProjectiveIncidence p4 l) : + ∃ ep : ProjectivePoint F ≃ ProjectivePoint F, + ∃ el : ProjectiveLine F ≃ ProjectiveLine F, + (∀ p m, ProjectiveIncidence (ep p) (el m) ↔ ProjectiveIncidence p m) ∧ + ep p1 = Sum.inr (some 0) ∧ + ep p2 = Sum.inr none ∧ + ep p3 = Sum.inr (some 1) ∧ + ep p4 = Sum.inl (0, 0) := by + obtain ⟨T, hT⟩ := exists_projectiveTransform_normalization h12 h13 h23 h1 h2 h3 h4 + exact ⟨T.points, T.lines, T.incidence, hT⟩ + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Geometry/ProjectionMoments.lean b/lean/OAI/Combinatorics/Ryser/Geometry/ProjectionMoments.lean new file mode 100644 index 0000000000000000000000000000000000000000..89e04a3cc5571d9d92afbd800cdc34e192ecd377 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Geometry/ProjectionMoments.lean @@ -0,0 +1,96 @@ +import OAI.Combinatorics.Ryser.Geometry.ProjectionPair +import OAI.Combinatorics.Ryser.Geometry.SliceEnergy +import OAI.Combinatorics.Ryser.Probability.Product +import OAI.Combinatorics.Ryser.Probability.Variance +import Mathlib.Algebra.Group.Units.Equiv + +namespace OAI + +open scoped BigOperators +noncomputable section + +namespace RyserCoveringCounterexample + +variable {F : Type*} [Field F] [Fintype F] + +theorem expectation_uniform_projection_pair (d e : Direction F) (hne : d ≠ e) + (f g : F → ℝ) : + (FiniteLaw.uniform (Point F)).expectation + (fun p => f (projection d p) * g (projection e p)) = + (FiniteLaw.uniform F).expectation f * (FiniteLaw.uniform F).expectation g := by + calc + _ = ((FiniteLaw.uniform (Point F)).map (projectionPairEquiv d e hne)).expectation + (fun z : F × F => f z.1 * g z.2) := by + rw [FiniteLaw.expectation_map]; rfl + _ = ((FiniteLaw.uniform F).prod (FiniteLaw.uniform F)).expectation + (fun z : F × F => f z.1 * g z.2) := by + rw [FiniteLaw.map_uniform_equiv, FiniteLaw.uniform_prod] + _ = (FiniteLaw.uniform F).expectation + (fun t => f t * (FiniteLaw.uniform F).expectation g) := by + rw [FiniteLaw.expectation_prod] + simp only [FiniteLaw.expectation_smul] + _ = _ := by + simp only [FiniteLaw.expectation, ← mul_assoc, Finset.sum_mul] + +theorem expectation_uniform_projection (d : Direction F) (f : F → ℝ) : + (FiniteLaw.uniform (Point F)).expectation (fun p => f (projection d p)) = + (FiniteLaw.uniform F).expectation f := by + cases d with + | none => + simpa only [FiniteLaw.expectation_const, mul_one] using + expectation_uniform_projection_pair (F := F) none (some 0) (by simp) + f (fun _ => 1) + | some a => + simpa only [FiniteLaw.expectation_const, mul_one] using + expectation_uniform_projection_pair (F := F) (some a) none (by simp) + f (fun _ => 1) + +theorem covariance_uniform_projection (d e : Direction F) (hne : d ≠ e) + (f g : F → ℝ) : + (FiniteLaw.uniform (Point F)).covariance + (fun p => f (projection d p)) (fun p => g (projection e p)) = 0 := by + rw [FiniteLaw.covariance_eq_expectation_mul_sub_mul, + expectation_uniform_projection_pair d e hne f g, + expectation_uniform_projection d f, expectation_uniform_projection e g, + sub_self] + +theorem expectation_uniform_projection_add (d : Direction F) (c : F) (f : F → ℝ) : + (FiniteLaw.uniform (Point F)).expectation (fun p => f (projection d p + c)) = + (FiniteLaw.uniform F).expectation f := by + rw [expectation_uniform_projection d (fun t => f (t + c)), + FiniteLaw.uniform_expectation, FiniteLaw.uniform_expectation] + apply congrArg (fun s : ℝ => s / (Fintype.card F : ℝ)) + simpa only [Equiv.coe_addRight] using Equiv.sum_comp (Equiv.addRight c) f + +variable [DecidableEq F] + +theorem expectation_uniform_shifted_slice (U : Finset (Point F)) + (d : Direction F) (c : F) : + (FiniteLaw.uniform (Point F)).expectation + (fun p => (sliceCount U d (projection d p + c) : ℝ)) = + (U.card : ℝ) / (Fintype.card F : ℝ) := by + calc + _ = (FiniteLaw.uniform F).expectation (fun t => (sliceCount U d t : ℝ)) := + expectation_uniform_projection_add d c _ + _ = _ := by rw [FiniteLaw.uniform_expectation, sum_sliceCount] + +theorem variance_uniform_shifted_slice (U : Finset (Point F)) + (d : Direction F) (c : F) : + (FiniteLaw.uniform (Point F)).variance + (fun p => (sliceCount U d (projection d p + c) : ℝ)) = + sliceEnergy U d := by + unfold FiniteLaw.variance + rw [expectation_uniform_shifted_slice] + calc + _ = (FiniteLaw.uniform F).expectation + (fun t => ((sliceCount U d t : ℝ) - + (U.card : ℝ) / (Fintype.card F : ℝ)) ^ 2) := + expectation_uniform_projection_add d c _ + _ = sliceEnergy U d := by + rw [FiniteLaw.uniform_expectation]; rfl + +end RyserCoveringCounterexample + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Geometry/ProjectionPair.lean b/lean/OAI/Combinatorics/Ryser/Geometry/ProjectionPair.lean new file mode 100644 index 0000000000000000000000000000000000000000..cbc7c65d553ae2b1498df011ff89705be08487a7 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Geometry/ProjectionPair.lean @@ -0,0 +1,53 @@ +import OAI.Combinatorics.Ryser.Geometry.AffineJoins +import OAI.Combinatorics.Ryser.Geometry.Cardinality +import Mathlib.Algebra.BigOperators.Group.Finset.Piecewise +import Mathlib.Basic.Real.Basic + +namespace OAI + +namespace RyserCoveringCounterexample + +open scoped BigOperators + +variable {F : Type*} [Field F] + +theorem projectionPair_bijective (d e : Direction F) (hne : d ≠ e) : + Function.Bijective (fun p : Point F => (projection d p, projection e p)) := by + constructor + · intro p q hpq + exact point_eq_of_projection_eq_of_ne_direction hne + (congrArg Prod.fst hpq) (congrArg Prod.snd hpq) + · intro z + obtain ⟨p, hp, _⟩ := + existsUnique_incident_of_ne_direction (d, z.1) (e, z.2) hne + exact ⟨p, Prod.ext hp.1 hp.2⟩ + +noncomputable def projectionPairEquiv (d e : Direction F) (hne : d ≠ e) : + Point F ≃ F × F := + Equiv.ofBijective (fun p : Point F => (projection d p, projection e p)) + (projectionPair_bijective d e hne) + +@[simp] theorem projectionPairEquiv_apply (d e : Direction F) (hne : d ≠ e) + (p : Point F) : + projectionPairEquiv d e hne p = (projection d p, projection e p) := rfl + +theorem sum_projection_eq_indicator [Fintype F] [DecidableEq F] + (p q : Point F) : + (∑ d : Direction F, if projection d p = projection d q then (1 : ℝ) else 0) = + if p = q then (Fintype.card F : ℝ) + 1 else 1 := by + classical + by_cases hpq : p = q + · subst q + simp [Nat.cast_add] + · rw [ite_eq_right hpq] + calc + (∑ d : Direction F, if projection d p = projection d q then (1 : ℝ) else 0) = + ∑ d : Direction F, if d = joinDirection p q then (1 : ℝ) else 0 := by + apply Finset.sum_congr rfl + intro d _ + simp only [projection_eq_iff_eq_joinDirection hpq d] + _ = 1 := Fintype.sum_ite_eq' _ _ + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Geometry/ProjectiveJoins.lean b/lean/OAI/Combinatorics/Ryser/Geometry/ProjectiveJoins.lean new file mode 100644 index 0000000000000000000000000000000000000000..76ebc6e9d5f9c439a19beea7c83e44759008094d --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Geometry/ProjectiveJoins.lean @@ -0,0 +1,143 @@ +import OAI.Combinatorics.Ryser.Geometry.AffineJoins + +namespace OAI + +namespace RyserCoveringCounterexample + +variable {F : Type*} [Field F] + +theorem existsUnique_projectiveLine_of_ne {p q : ProjectivePoint F} + (hpq : p ≠ q) : + ∃! l : ProjectiveLine F, ProjectiveIncidence p l ∧ ProjectiveIncidence q l := by + classical + cases p with + | inl p => + cases q with + | inl q => + have hpq' : p ≠ q := fun h => hpq (congrArg Sum.inl h) + obtain ⟨l, hl, huniq⟩ := existsUnique_lineThrough_pair hpq' + refine ⟨some l, hl, ?_⟩ + intro m hm + cases m with + | none => exact hm.1.elim + | some m => exact congrArg some (huniq m hm) + | inr d => + refine ⟨some (lineThrough d p), ⟨rfl, rfl⟩, ?_⟩ + intro m hm + cases m with + | none => exact hm.1.elim + | some m => + apply congrArg some + exact line_eq_of_direction_eq_of_incidence hm.2.symm hm.1 rfl + | inr d => + cases q with + | inl q => + refine ⟨some (lineThrough d q), ⟨rfl, rfl⟩, ?_⟩ + intro m hm + cases m with + | none => exact hm.2.elim + | some m => + apply congrArg some + exact line_eq_of_direction_eq_of_incidence hm.1.symm hm.2 rfl + | inr e => + refine ⟨none, ⟨trivial, trivial⟩, ?_⟩ + intro m hm + cases m with + | none => rfl + | some m => + have hde : d = e := hm.1.trans hm.2.symm + exact (hpq (congrArg Sum.inr hde)).elim + +theorem existsUnique_projectivePoint_of_ne {l m : ProjectiveLine F} + (hlm : l ≠ m) : + ∃! p : ProjectivePoint F, ProjectiveIncidence p l ∧ ProjectiveIncidence p m := by + classical + cases l with + | none => + cases m with + | none => exact (hlm rfl).elim + | some m => + refine ⟨Sum.inr m.1, ⟨trivial, rfl⟩, ?_⟩ + intro p hp + cases p with + | inl p => exact hp.1.elim + | inr d => exact congrArg Sum.inr hp.2 + | some l => + cases m with + | none => + refine ⟨Sum.inr l.1, ⟨rfl, trivial⟩, ?_⟩ + intro p hp + cases p with + | inl p => exact hp.2.elim + | inr d => exact congrArg Sum.inr hp.1 + | some m => + by_cases hdir : l.1 = m.1 + · refine ⟨Sum.inr l.1, ⟨rfl, hdir⟩, ?_⟩ + intro p hp + cases p with + | inl p => + have heq : l = m := line_eq_of_direction_eq_of_incidence hdir hp.1 hp.2 + exact (hlm (congrArg some heq)).elim + | inr d => exact congrArg Sum.inr hp.1 + · obtain ⟨p, hp, huniq⟩ := existsUnique_incident_of_ne_direction l m hdir + refine ⟨Sum.inl p, hp, ?_⟩ + intro q hq + cases q with + | inl q => exact congrArg Sum.inl (huniq q hq) + | inr d => exact (hdir (hq.1.symm.trans hq.2)).elim + +theorem eq_projectiveLine_of_common_incidence + {p q : ProjectivePoint F} {l m : ProjectiveLine F} + (hpq : p ≠ q) + (hpl : ProjectiveIncidence p l) (hql : ProjectiveIncidence q l) + (hpm : ProjectiveIncidence p m) (hqm : ProjectiveIncidence q m) : l = m := by + obtain ⟨k, _, huniq⟩ := existsUnique_projectiveLine_of_ne hpq + exact (huniq l ⟨hpl, hql⟩).trans (huniq m ⟨hpm, hqm⟩).symm + +theorem eq_projectivePoint_of_common_incidence + {l m : ProjectiveLine F} {p q : ProjectivePoint F} + (hlm : l ≠ m) + (hpl : ProjectiveIncidence p l) (hpm : ProjectiveIncidence p m) + (hql : ProjectiveIncidence q l) (hqm : ProjectiveIncidence q m) : p = q := by + obtain ⟨x, _, huniq⟩ := existsUnique_projectivePoint_of_ne hlm + exact (huniq p ⟨hpl, hpm⟩).trans (huniq q ⟨hql, hqm⟩).symm + +theorem existsUnique_projective_incident_of_ne_lines {l m : AffineLine F} + (hlm : l ≠ m) : + ∃! p : ProjectivePoint F, + ProjectiveIncidence p (some l) ∧ ProjectiveIncidence p (some m) := by + apply existsUnique_projectivePoint_of_ne + intro h + exact hlm (Option.some.inj h) + +theorem existsUnique_projectivePoint_of_ne_affineLines {l m : AffineLine F} + (hlm : l ≠ m) : + ∃! p : ProjectivePoint F, + ProjectiveIncidence p (some l) ∧ ProjectiveIncidence p (some m) := + existsUnique_projective_incident_of_ne_lines hlm + +theorem eq_affineLine_of_common_projective_incidence + {p q : ProjectivePoint F} {l m : AffineLine F} + (hpq : p ≠ q) + (hpl : ProjectiveIncidence p (some l)) + (hql : ProjectiveIncidence q (some l)) + (hpm : ProjectiveIncidence p (some m)) + (hqm : ProjectiveIncidence q (some m)) : l = m := + Option.some.inj (eq_projectiveLine_of_common_incidence hpq hpl hql hpm hqm) + +theorem not_projectiveIncidence_infty_of_ne_direction + {d e : Direction F} (hde : d ≠ e) {l : AffineLine F} : + ¬ (ProjectiveIncidence (Sum.inr d) (some l) ∧ + ProjectiveIncidence (Sum.inr e) (some l)) := by + intro h + exact hde (h.1.trans h.2.symm) + +theorem ne_of_projectiveIncidence_of_not_projectiveIncidence + {p q : ProjectivePoint F} {l : ProjectiveLine F} + (hpl : ProjectiveIncidence p l) (hql : ¬ ProjectiveIncidence q l) : p ≠ q := by + intro hpq + exact hql (hpq ▸ hpl) + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Geometry/ProjectiveTransformAffine.lean b/lean/OAI/Combinatorics/Ryser/Geometry/ProjectiveTransformAffine.lean new file mode 100644 index 0000000000000000000000000000000000000000..2aafaaf24e43333626ba6373f67be53b6c08f409 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Geometry/ProjectiveTransformAffine.lean @@ -0,0 +1,260 @@ +import OAI.Combinatorics.Ryser.Geometry.ProjectiveTransformBasic + +namespace OAI + +namespace RyserCoveringCounterexample + +variable {F : Type*} [Field F] + +private def translatePointMap (u v : F) : ProjectivePoint F → ProjectivePoint F + | Sum.inl p => Sum.inl (p.1 + u, p.2 + v) + | Sum.inr d => Sum.inr d + +private def translateLineMap (u v : F) : ProjectiveLine F → ProjectiveLine F + | none => none + | some (none, b) => some (none, b + u) + | some (some a, b) => some (some a, b + v - a * u) + +private theorem translatePointMap_left_inv (u v : F) : + Function.LeftInverse (translatePointMap (-u) (-v)) (translatePointMap u v) := by + rintro (⟨x, y⟩ | d) <;> simp [translatePointMap] + +private theorem translateLineMap_left_inv (u v : F) : + Function.LeftInverse (translateLineMap (-u) (-v)) (translateLineMap u v) := by + intro l + cases l with + | none => rfl + | some l => + rcases l with ⟨d, b⟩ + cases d with + | none => simp [translateLineMap] + | some slope => simp [translateLineMap]; ring + +def translate (u v : F) : ProjectiveTransform F where + points := + { toFun := translatePointMap u v + invFun := translatePointMap (-u) (-v) + left_inv := translatePointMap_left_inv u v + right_inv := by + intro p + simpa only [neg_neg] using translatePointMap_left_inv (-u) (-v) p } + lines := + { toFun := translateLineMap u v + invFun := translateLineMap (-u) (-v) + left_inv := translateLineMap_left_inv u v + right_inv := by + intro l + simpa only [neg_neg] using translateLineMap_left_inv (-u) (-v) l } + incidence := by + intro p l + change ProjectiveIncidence (translatePointMap u v p) (translateLineMap u v l) ↔ + ProjectiveIncidence p l + cases p with + | inl p => + rcases p with ⟨x, y⟩ + cases l with + | none => rfl + | some l => + rcases l with ⟨d, b⟩ + cases d with + | none => simp [translatePointMap, translateLineMap, ProjectiveIncidence, + Incidence, projection] + | some a => + change y + v - a * (x + u) = b + v - a * u ↔ y - a * x = b + have hleft : y + v - a * (x + u) = (y - a * x) + (v - a * u) := by ring + have hright : b + v - a * u = b + (v - a * u) := by ring + rw [hleft, hright] + exact add_right_cancel_iff + | inr d => + cases l with + | none => rfl + | some l => + rcases l with ⟨e, b⟩ + cases e <;> rfl + +@[simp] theorem translate_points_finite (u v : F) (p : Point F) : + (translate u v).points (Sum.inl p) = Sum.inl (p.1 + u, p.2 + v) := rfl + +@[simp] theorem translate_points_infinite (u v : F) (d : Direction F) : + (translate u v).points (Sum.inr d) = Sum.inr d := rfl + +@[simp] theorem translate_lines_infinity (u v : F) : + (translate u v).lines none = none := rfl + +@[simp] theorem translate_lines_vertical (u v b : F) : + (translate u v).lines (some (none, b)) = some (none, b + u) := rfl + +@[simp] theorem translate_lines_slope (u v a b : F) : + (translate u v).lines (some (some a, b)) = some (some a, b + v - a * u) := rfl + +private def shearPointMap (r : F) : ProjectivePoint F → ProjectivePoint F + | Sum.inl p => Sum.inl (p.1, p.2 + r * p.1) + | Sum.inr none => Sum.inr none + | Sum.inr (some a) => Sum.inr (some (a + r)) + +private def shearLineMap (r : F) : ProjectiveLine F → ProjectiveLine F + | none => none + | some (none, b) => some (none, b) + | some (some a, b) => some (some (a + r), b) + +private theorem shearPointMap_left_inv (r : F) : + Function.LeftInverse (shearPointMap (-r)) (shearPointMap r) := by + intro p + cases p with + | inl p => rcases p with ⟨x, y⟩; simp [shearPointMap] + | inr d => cases d <;> simp [shearPointMap] + +private theorem shearLineMap_left_inv (r : F) : + Function.LeftInverse (shearLineMap (-r)) (shearLineMap r) := by + intro l + cases l with + | none => rfl + | some l => + rcases l with ⟨d, b⟩ + cases d <;> simp [shearLineMap] + +def shear (r : F) : ProjectiveTransform F where + points := + { toFun := shearPointMap r + invFun := shearPointMap (-r) + left_inv := shearPointMap_left_inv r + right_inv := by + intro p + simpa only [neg_neg] using shearPointMap_left_inv (-r) p } + lines := + { toFun := shearLineMap r + invFun := shearLineMap (-r) + left_inv := shearLineMap_left_inv r + right_inv := by + intro l + simpa only [neg_neg] using shearLineMap_left_inv (-r) l } + incidence := by + intro p l + change ProjectiveIncidence (shearPointMap r p) (shearLineMap r l) ↔ + ProjectiveIncidence p l + cases p with + | inl p => + rcases p with ⟨x, y⟩ + cases l with + | none => rfl + | some l => + rcases l with ⟨d, b⟩ + cases d with + | none => rfl + | some a => + change y + r * x - (a + r) * x = b ↔ y - a * x = b + have h : y + r * x - (a + r) * x = y - a * x := by ring + rw [h] + | inr d => + cases l with + | none => cases d <;> rfl + | some l => + rcases l with ⟨e, b⟩ + cases d <;> cases e <;> simp [shearPointMap, shearLineMap, ProjectiveIncidence] + +@[simp] theorem shear_points_finite (r : F) (p : Point F) : + (shear r).points (Sum.inl p) = Sum.inl (p.1, p.2 + r * p.1) := rfl + +@[simp] theorem shear_points_infinite_vertical (r : F) : + (shear r).points (Sum.inr none) = Sum.inr none := rfl + +@[simp] theorem shear_points_infinite_slope (r a : F) : + (shear r).points (Sum.inr (some a)) = Sum.inr (some (a + r)) := rfl + +@[simp] theorem shear_lines_infinity (r : F) : + (shear r).lines none = none := rfl + +@[simp] theorem shear_lines_vertical (r b : F) : + (shear r).lines (some (none, b)) = some (none, b) := rfl + +@[simp] theorem shear_lines_slope (r a b : F) : + (shear r).lines (some (some a, b)) = some (some (a + r), b) := rfl + +private def scaleYPointMap (c : F) : ProjectivePoint F → ProjectivePoint F + | Sum.inl p => Sum.inl (p.1, c * p.2) + | Sum.inr none => Sum.inr none + | Sum.inr (some a) => Sum.inr (some (c * a)) + +private def scaleYLineMap (c : F) : ProjectiveLine F → ProjectiveLine F + | none => none + | some (none, b) => some (none, b) + | some (some a, b) => some (some (c * a), c * b) + +private theorem scaleYPointMap_left_inv (c : F) (hc : c ≠ 0) : + Function.LeftInverse (scaleYPointMap c⁻¹) (scaleYPointMap c) := by + intro p + cases p with + | inl p => rcases p with ⟨x, y⟩; simp [scaleYPointMap, hc] + | inr d => cases d <;> simp [scaleYPointMap, hc] + +private theorem scaleYLineMap_left_inv (c : F) (hc : c ≠ 0) : + Function.LeftInverse (scaleYLineMap c⁻¹) (scaleYLineMap c) := by + intro l + cases l with + | none => rfl + | some l => + rcases l with ⟨d, b⟩ + cases d <;> simp [scaleYLineMap, hc] + +def scaleY (c : F) (hc : c ≠ 0) : ProjectiveTransform F where + points := + { toFun := scaleYPointMap c + invFun := scaleYPointMap c⁻¹ + left_inv := scaleYPointMap_left_inv c hc + right_inv := by + intro p + simpa only [inv_inv] using scaleYPointMap_left_inv c⁻¹ (inv_ne_zero hc) p } + lines := + { toFun := scaleYLineMap c + invFun := scaleYLineMap c⁻¹ + left_inv := scaleYLineMap_left_inv c hc + right_inv := by + intro l + simpa only [inv_inv] using scaleYLineMap_left_inv c⁻¹ (inv_ne_zero hc) l } + incidence := by + intro p l + change ProjectiveIncidence (scaleYPointMap c p) (scaleYLineMap c l) ↔ + ProjectiveIncidence p l + cases p with + | inl p => + rcases p with ⟨x, y⟩ + cases l with + | none => rfl + | some l => + rcases l with ⟨d, b⟩ + cases d with + | none => rfl + | some a => + change c * y - (c * a) * x = c * b ↔ y - a * x = b + have h : c * y - (c * a) * x = c * (y - a * x) := by ring + rw [h] + exact mul_right_inj' hc + | inr d => + cases l with + | none => cases d <;> rfl + | some l => + rcases l with ⟨e, b⟩ + cases d <;> cases e <;> + simp [scaleYPointMap, scaleYLineMap, ProjectiveIncidence, mul_right_inj' hc] + +@[simp] theorem scaleY_points_finite (c : F) (hc : c ≠ 0) (p : Point F) : + (scaleY c hc).points (Sum.inl p) = Sum.inl (p.1, c * p.2) := rfl + +@[simp] theorem scaleY_points_infinite_vertical (c : F) (hc : c ≠ 0) : + (scaleY c hc).points (Sum.inr none) = Sum.inr none := rfl + +@[simp] theorem scaleY_points_infinite_slope (c : F) (hc : c ≠ 0) (a : F) : + (scaleY c hc).points (Sum.inr (some a)) = Sum.inr (some (c * a)) := rfl + +@[simp] theorem scaleY_lines_infinity (c : F) (hc : c ≠ 0) : + (scaleY c hc).lines none = none := rfl + +@[simp] theorem scaleY_lines_vertical (c : F) (hc : c ≠ 0) (b : F) : + (scaleY c hc).lines (some (none, b)) = some (none, b) := rfl + +@[simp] theorem scaleY_lines_slope (c : F) (hc : c ≠ 0) (a b : F) : + (scaleY c hc).lines (some (some a, b)) = some (some (c * a), c * b) := rfl + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Geometry/ProjectiveTransformBasic.lean b/lean/OAI/Combinatorics/Ryser/Geometry/ProjectiveTransformBasic.lean new file mode 100644 index 0000000000000000000000000000000000000000..5f720c95dde695a9a18d9ea71ba7f543935a0c4e --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Geometry/ProjectiveTransformBasic.lean @@ -0,0 +1,46 @@ +import OAI.Combinatorics.Ryser.Geometry.Basic + +namespace OAI + +namespace RyserCoveringCounterexample + +structure ProjectiveTransform (F : Type*) [Field F] where + points : ProjectivePoint F ≃ ProjectivePoint F + lines : ProjectiveLine F ≃ ProjectiveLine F + incidence : ∀ p l, ProjectiveIncidence (points p) (lines l) ↔ ProjectiveIncidence p l + +namespace ProjectiveTransform + +variable {F : Type*} [Field F] + +def refl (F : Type*) [Field F] : ProjectiveTransform F where + points := Equiv.refl _ + lines := Equiv.refl _ + incidence _ _ := Iff.rfl + +def trans (T U : ProjectiveTransform F) : ProjectiveTransform F where + points := T.points.trans U.points + lines := T.lines.trans U.lines + incidence p l := (U.incidence (T.points p) (T.lines l)).trans (T.incidence p l) + +@[simp] theorem refl_points (p : ProjectivePoint F) : (refl F).points p = p := rfl + +@[simp] theorem refl_lines (l : ProjectiveLine F) : (refl F).lines l = l := rfl + +@[simp] theorem trans_points (T U : ProjectiveTransform F) (p : ProjectivePoint F) : + (T.trans U).points p = U.points (T.points p) := rfl + +@[simp] theorem trans_lines (T U : ProjectiveTransform F) (l : ProjectiveLine F) : + (T.trans U).lines l = U.lines (T.lines l) := rfl + +def symm (T : ProjectiveTransform F) : ProjectiveTransform F where + points := T.points.symm + lines := T.lines.symm + incidence p l := by + simpa using (T.incidence (T.points.symm p) (T.lines.symm l)).symm + +end ProjectiveTransform + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Geometry/ProjectiveTransformXY.lean b/lean/OAI/Combinatorics/Ryser/Geometry/ProjectiveTransformXY.lean new file mode 100644 index 0000000000000000000000000000000000000000..dd70a5956b675899480662210ccb5ea1159ca37f --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Geometry/ProjectiveTransformXY.lean @@ -0,0 +1,164 @@ +import OAI.Combinatorics.Ryser.Geometry.ProjectiveTransformBasic +import Mathlib.Tactic.FieldSimp + +namespace OAI + +namespace RyserCoveringCounterexample + +variable {F : Type*} [Field F] + +noncomputable def swapXYDirection (d : Direction F) : Direction F := by + classical + exact match d with + | none => some 0 + | some a => if a = 0 then none else some a⁻¹ + +@[simp] theorem swapXYDirection_none : + swapXYDirection (none : Direction F) = some 0 := rfl + +@[simp] theorem swapXYDirection_zero : + swapXYDirection (some (0 : F)) = none := by simp [swapXYDirection] + +@[simp] theorem swapXYDirection_nonzero (a : F) (ha : a ≠ 0) : + swapXYDirection (some a) = some a⁻¹ := by simp [swapXYDirection, ha] + +theorem swapXYDirection_involutive : + Function.Involutive (swapXYDirection (F := F)) := by + classical + intro d + cases d with + | none => simp [swapXYDirection] + | some a => + by_cases ha : a = 0 + · simp [swapXYDirection, ha] + · simp [swapXYDirection, ha] + +noncomputable def swapXYPoint : ProjectivePoint F → ProjectivePoint F + | Sum.inl p => Sum.inl (p.2, p.1) + | Sum.inr d => Sum.inr (swapXYDirection d) + +theorem swapXYPoint_involutive : + Function.Involutive (swapXYPoint (F := F)) := by + intro p + cases p with + | inl p => rfl + | inr d => + change Sum.inr (swapXYDirection (swapXYDirection d)) = Sum.inr d + rw [swapXYDirection_involutive] + +noncomputable def swapXYAffineLine (l : AffineLine F) : AffineLine F := by + classical + exact match l with + | (none, b) => (some 0, b) + | (some a, b) => if a = 0 then (none, b) else (some a⁻¹, -b / a) + +@[simp] theorem swapXYAffineLine_direction (l : AffineLine F) : + (swapXYAffineLine l).1 = swapXYDirection l.1 := by + classical + rcases l with ⟨d, b⟩ + cases d with + | none => rfl + | some a => + by_cases ha : a = 0 <;> simp [swapXYAffineLine, swapXYDirection, ha] + +theorem swapXYAffineLine_involutive : + Function.Involutive (swapXYAffineLine (F := F)) := by + classical + rintro ⟨d, b⟩ + cases d with + | none => simp [swapXYAffineLine] + | some a => + by_cases ha : a = 0 + · simp [swapXYAffineLine, ha] + · simp [swapXYAffineLine, ha, div_eq_mul_inv] + +noncomputable def swapXYLine : ProjectiveLine F → ProjectiveLine F + | none => none + | some l => some (swapXYAffineLine l) + +theorem swapXYLine_involutive : + Function.Involutive (swapXYLine (F := F)) := by + intro l + cases l with + | none => rfl + | some l => + change some (swapXYAffineLine (swapXYAffineLine l)) = some l + rw [swapXYAffineLine_involutive] + +private theorem swapXY_projection_equation (a b x y : F) (ha : a ≠ 0) : + (x - a⁻¹ * y = -b / a) ↔ (y - a * x = b) := by + have hrewrite : x - a⁻¹ * y = -(y - a * x) / a := by + field_simp [ha]; ring + rw [hrewrite, div_left_inj' ha] + exact neg_inj + +theorem swapXY_affine_incidence (p : Point F) (l : AffineLine F) : + Incidence (p.2, p.1) (swapXYAffineLine l) ↔ Incidence p l := by + classical + rcases p with ⟨x, y⟩ + rcases l with ⟨d, b⟩ + cases d with + | none => simp [swapXYAffineLine, Incidence, projection] + | some a => + by_cases ha : a = 0 + · simp [swapXYAffineLine, Incidence, projection, ha] + · simpa only [swapXYAffineLine, ite_eq_right ha, Incidence, projection] using + swapXY_projection_equation a b x y ha + +theorem swapXY_incidence (p : ProjectivePoint F) (l : ProjectiveLine F) : + ProjectiveIncidence (swapXYPoint p) (swapXYLine l) ↔ + ProjectiveIncidence p l := by + cases p with + | inl p => + cases l with + | none => rfl + | some l => exact swapXY_affine_incidence p l + | inr d => + cases l with + | none => rfl + | some l => + change swapXYDirection d = (swapXYAffineLine l).1 ↔ d = l.1 + rw [swapXYAffineLine_direction] + exact swapXYDirection_involutive.injective.eq_iff + +noncomputable def swapXY (F : Type*) [Field F] : ProjectiveTransform F where + points := + { toFun := swapXYPoint + invFun := swapXYPoint + left_inv := swapXYPoint_involutive + right_inv := swapXYPoint_involutive } + lines := + { toFun := swapXYLine + invFun := swapXYLine + left_inv := swapXYLine_involutive + right_inv := swapXYLine_involutive } + incidence := swapXY_incidence + +@[simp] theorem swapXY_points_finite (p : Point F) : + (swapXY F).points (Sum.inl p) = Sum.inl (p.2, p.1) := rfl + +@[simp] theorem swapXY_points_infinite (d : Direction F) : + (swapXY F).points (Sum.inr d) = Sum.inr (swapXYDirection d) := rfl + +@[simp] theorem swapXY_lines_infinity : + (swapXY F).lines none = none := rfl + +@[simp] theorem swapXY_lines_affine (l : AffineLine F) : + (swapXY F).lines (some l) = some (swapXYAffineLine l) := rfl + +@[simp] theorem swapXY_lines_vertical (b : F) : + (swapXY F).lines (some (none, b)) = some (some 0, b) := rfl + +@[simp] theorem swapXY_lines_slope_zero (b : F) : + (swapXY F).lines (some (some 0, b)) = some (none, b) := by + rw [swapXY_lines_affine] + simp [swapXYAffineLine] + +@[simp] theorem swapXY_lines_slope_nonzero (a b : F) (ha : a ≠ 0) : + (swapXY F).lines (some (some a, b)) = some (some a⁻¹, -b / a) := by + rw [swapXY_lines_affine] + simp [swapXYAffineLine, ha] + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Geometry/ProjectiveTransformXZ.lean b/lean/OAI/Combinatorics/Ryser/Geometry/ProjectiveTransformXZ.lean new file mode 100644 index 0000000000000000000000000000000000000000..5752fa330ac3fb6169f47497f7b104b631fe2a78 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Geometry/ProjectiveTransformXZ.lean @@ -0,0 +1,198 @@ +import OAI.Combinatorics.Ryser.Geometry.ProjectiveTransformBasic + +namespace OAI + +namespace RyserCoveringCounterexample + +variable {F : Type*} [Field F] + +noncomputable def swapXZPoint : ProjectivePoint F → ProjectivePoint F := by + classical + exact fun p => match p with + | Sum.inl (x, y) => + if x = 0 then Sum.inr (some y) else Sum.inl (1 / x, y / x) + | Sum.inr none => Sum.inr none + | Sum.inr (some a) => Sum.inl (0, a) + +noncomputable def swapXZLine : ProjectiveLine F → ProjectiveLine F := by + classical + exact fun l => match l with + | none => some (none, 0) + | some (none, c) => if c = 0 then none else some (none, 1 / c) + | some (some a, b) => some (some b, a) + +@[simp] theorem swapXZPoint_finite_zero (y : F) : + swapXZPoint (Sum.inl (0, y)) = Sum.inr (some y) := by + classical + simp [swapXZPoint] + +theorem swapXZPoint_finite_of_ne_zero (x y : F) (hx : x ≠ 0) : + swapXZPoint (Sum.inl (x, y)) = Sum.inl (1 / x, y / x) := by + classical + simp [swapXZPoint, hx] + +@[simp] theorem swapXZPoint_infinite_slope (a : F) : + swapXZPoint (Sum.inr (some a)) = Sum.inl (0, a) := rfl + +@[simp] theorem swapXZPoint_infinite_vertical : + swapXZPoint (Sum.inr (none : Direction F)) = Sum.inr none := rfl + +@[simp] theorem swapXZLine_infinity : + swapXZLine (none : ProjectiveLine F) = some (none, 0) := rfl + +@[simp] theorem swapXZLine_vertical_zero : + swapXZLine (some (none, (0 : F))) = none := by + classical + simp [swapXZLine] + +theorem swapXZLine_vertical_of_ne_zero (c : F) (hc : c ≠ 0) : + swapXZLine (some (none, c)) = some (none, 1 / c) := by + classical + simp [swapXZLine, hc] + +@[simp] theorem swapXZLine_sloped (a b : F) : + swapXZLine (some (some a, b)) = some (some b, a) := rfl + +theorem swapXZPoint_involutive : Function.Involutive (swapXZPoint (F := F)) := by + classical + intro p + cases p with + | inl p => + rcases p with ⟨x, y⟩ + by_cases hx : x = 0 + · subst x + simp [swapXZPoint] + · have hy : y / x / (1 / x) = y := by + simpa only [div_one] using div_div_div_cancel_right₀ hx y (1 : F) + simp [swapXZPoint, hx] + | inr d => + cases d <;> simp [swapXZPoint] + +theorem swapXZLine_involutive : Function.Involutive (swapXZLine (F := F)) := by + classical + intro l + cases l with + | none => simp [swapXZLine] + | some l => + rcases l with ⟨d, c⟩ + cases d with + | none => + by_cases hc : c = 0 + · subst c + simp [swapXZLine] + · simp [swapXZLine, hc] + | some a => rfl + +theorem swapXZ_incidence (p : ProjectivePoint F) (l : ProjectiveLine F) : + ProjectiveIncidence (swapXZPoint p) (swapXZLine l) ↔ + ProjectiveIncidence p l := by + classical + cases p with + | inl p => + rcases p with ⟨x, y⟩ + cases l with + | none => + by_cases hx : x = 0 + · simp [swapXZPoint, swapXZLine, ProjectiveIncidence, hx] + · simp [swapXZPoint, swapXZLine, ProjectiveIncidence, Incidence, projection, + hx] + | some l => + rcases l with ⟨d, b⟩ + cases d with + | none => + by_cases hx : x = 0 + · by_cases hb : b = 0 + · simp [swapXZPoint, swapXZLine, ProjectiveIncidence, Incidence, projection, + hx, hb] + · simp [swapXZPoint, swapXZLine, ProjectiveIncidence, Incidence, projection, + hx, hb, Ne.symm hb] + · by_cases hb : b = 0 + · simp [swapXZPoint, swapXZLine, ProjectiveIncidence, Incidence, projection, + hx, hb] + · simp only [swapXZPoint, ite_eq_right hx, swapXZLine, ite_eq_right hb, + ProjectiveIncidence, Incidence, projection] + exact ⟨eq_of_one_div_eq_one_div, + fun h => congrArg (fun c : F => 1 / c) h⟩ + | some a => + by_cases hx : x = 0 + · simp [swapXZPoint, swapXZLine, ProjectiveIncidence, Incidence, projection, hx] + · simp only [swapXZPoint, ite_eq_right hx, swapXZLine, + ProjectiveIncidence, Incidence, projection] + rw [mul_one_div, ← sub_div, div_eq_iff hx, + sub_eq_iff_eq_add, sub_eq_iff_eq_add, add_comm (a * x) b] + | inr d => + cases d with + | none => + cases l with + | none => simp [swapXZPoint, swapXZLine, ProjectiveIncidence] + | some l => + rcases l with ⟨d, c⟩ + cases d with + | none => + by_cases hc : c = 0 <;> + simp [swapXZPoint, swapXZLine, ProjectiveIncidence, hc] + | some a => simp [swapXZPoint, swapXZLine, ProjectiveIncidence] + | some a => + cases l with + | none => simp [swapXZPoint, swapXZLine, ProjectiveIncidence, Incidence, projection] + | some l => + rcases l with ⟨d, c⟩ + cases d with + | none => + by_cases hc : c = 0 + · simp [swapXZPoint, swapXZLine, ProjectiveIncidence, hc] + · simp [swapXZPoint, swapXZLine, ProjectiveIncidence, Incidence, projection, + hc, Ne.symm hc] + | some b => + simp [swapXZPoint, swapXZLine, ProjectiveIncidence, Incidence, projection] + +noncomputable def swapXZ (F : Type*) [Field F] : ProjectiveTransform F where + points := + { toFun := swapXZPoint + invFun := swapXZPoint + left_inv := swapXZPoint_involutive + right_inv := swapXZPoint_involutive } + lines := + { toFun := swapXZLine + invFun := swapXZLine + left_inv := swapXZLine_involutive + right_inv := swapXZLine_involutive } + incidence := swapXZ_incidence + +@[simp] theorem swapXZ_points (p : ProjectivePoint F) : + (swapXZ F).points p = swapXZPoint p := rfl + +@[simp] theorem swapXZ_lines (l : ProjectiveLine F) : + (swapXZ F).lines l = swapXZLine l := rfl + +@[simp] theorem swapXZ_points_finite_zero (y : F) : + (swapXZ F).points (Sum.inl (0, y)) = Sum.inr (some y) := + swapXZPoint_finite_zero y + +theorem swapXZ_points_finite_of_ne_zero (x y : F) (hx : x ≠ 0) : + (swapXZ F).points (Sum.inl (x, y)) = Sum.inl (1 / x, y / x) := + swapXZPoint_finite_of_ne_zero x y hx + +@[simp] theorem swapXZ_points_infinite_slope (a : F) : + (swapXZ F).points (Sum.inr (some a)) = Sum.inl (0, a) := rfl + +@[simp] theorem swapXZ_points_infinite_vertical : + (swapXZ F).points (Sum.inr none) = Sum.inr none := rfl + +@[simp] theorem swapXZ_lines_infinity : + (swapXZ F).lines none = some (none, 0) := rfl + +@[simp] theorem swapXZ_lines_vertical_zero : + (swapXZ F).lines (some (none, 0)) = none := + swapXZLine_vertical_zero + +theorem swapXZ_lines_vertical_of_ne_zero (c : F) (hc : c ≠ 0) : + (swapXZ F).lines (some (none, c)) = some (none, 1 / c) := + swapXZLine_vertical_of_ne_zero c hc + +@[simp] theorem swapXZ_lines_sloped (a b : F) : + (swapXZ F).lines (some (some a, b)) = some (some b, a) := rfl + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Geometry/SliceEnergy.lean b/lean/OAI/Combinatorics/Ryser/Geometry/SliceEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..747f9ce6b8bef363d728ed19a11b960456e62e29 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Geometry/SliceEnergy.lean @@ -0,0 +1,160 @@ +import OAI.Combinatorics.Ryser.Geometry.ProjectionPair +import Mathlib.Algebra.BigOperators.Field +import Mathlib.Algebra.BigOperators.Ring.Finset +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +namespace OAI + +namespace RyserCoveringCounterexample + +open scoped BigOperators + +variable {F : Type*} [Field F] [instFintypeF : Fintype F] [DecidableEq F] + +def sliceCount (U : Finset (Point F)) (d : Direction F) (t : F) : ℕ := + (U.filter (fun p => projection d p = t)).card + +noncomputable def sliceEnergy (U : Finset (Point F)) (d : Direction F) : ℝ := + (∑ t : F, ((sliceCount U d t : ℝ) - + (U.card : ℝ) / (Fintype.card F : ℝ)) ^ 2) / (Fintype.card F : ℝ) + +theorem sliceCount_le_card_field (U : Finset (Point F)) (d : Direction F) (t : F) : + sliceCount U d t ≤ Fintype.card F := by + rw [← card_projection_fiber d t] + apply Finset.card_le_card + intro p hp + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _, (Finset.mem_filter.mp hp).2⟩ + +theorem sliceCount_eq_sum_indicator (U : Finset (Point F)) (d : Direction F) (t : F) : + (sliceCount U d t : ℝ) = + ∑ p ∈ U, if projection d p = t then (1 : ℝ) else 0 := let _ := instFintypeF; by + exact Finset.natCast_card_filter _ _ + +theorem sum_sliceCount (U : Finset (Point F)) (d : Direction F) : + (∑ t : F, (sliceCount U d t : ℝ)) = (U.card : ℝ) := by + classical + simp_rw [sliceCount_eq_sum_indicator] + rw [Finset.sum_comm] + simp + +private theorem sum_projection_indicator_mul (d : Direction F) (p p' : Point F) : + (∑ t : F, (if projection d p = t then (1 : ℝ) else 0) * + (if projection d p' = t then (1 : ℝ) else 0)) = + if projection d p = projection d p' then (1 : ℝ) else 0 := by + classical + calc + _ = (if projection d p = projection d p then (1 : ℝ) else 0) * + (if projection d p' = projection d p then (1 : ℝ) else 0) := by + apply Finset.sum_eq_single (projection d p) + · intro t _ ht + simp [Ne.symm ht] + · simp + _ = _ := by simp [eq_comm] + +theorem sum_sliceCount_sq (U : Finset (Point F)) (d : Direction F) : + (∑ t : F, (sliceCount U d t : ℝ) ^ 2) = + ∑ p ∈ U, ∑ p' ∈ U, + if projection d p = projection d p' then (1 : ℝ) else 0 := by + classical + simp_rw [sliceCount_eq_sum_indicator, pow_two, Finset.sum_mul_sum] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro p hp + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro p' hp' + exact sum_projection_indicator_mul d p p' + +theorem sum_all_sliceCount_sq (U : Finset (Point F)) : + (∑ d : Direction F, ∑ t : F, (sliceCount U d t : ℝ) ^ 2) = + (U.card : ℝ) ^ 2 + (Fintype.card F : ℝ) * (U.card : ℝ) := by + classical + simp_rw [sum_sliceCount_sq] + rw [Finset.sum_comm] + calc + (∑ p ∈ U, ∑ d : Direction F, ∑ p' ∈ U, + if projection d p = projection d p' then (1 : ℝ) else 0) = + ∑ p ∈ U, ∑ p' ∈ U, + if p = p' then (Fintype.card F : ℝ) + 1 else 1 := by + apply Finset.sum_congr rfl + intro p hp + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro p' hp' + exact sum_projection_eq_indicator p p' + _ = ∑ p ∈ U, ((Fintype.card F : ℝ) + (U.card : ℝ)) := by + apply Finset.sum_congr rfl + intro p hp + calc + _ = ∑ p' ∈ U, ((if p' = p then (Fintype.card F : ℝ) else 0) + 1) := by + apply Finset.sum_congr rfl + intro p' hp' + by_cases h : p' = p + · subst p' + simp + · simp [h, Ne.symm h] + _ = _ := by simp [Finset.sum_add_distrib, hp] + _ = _ := by simp only [Finset.sum_const, nsmul_eq_mul]; ring + +theorem sliceEnergy_nonneg (U : Finset (Point F)) (d : Direction F) : + 0 ≤ sliceEnergy U d := by + unfold sliceEnergy + positivity + +theorem sliceEnergy_eq (U : Finset (Point F)) (d : Direction F) : + sliceEnergy U d = + (∑ t : F, (sliceCount U d t : ℝ) ^ 2) / (Fintype.card F : ℝ) - + (U.card : ℝ) ^ 2 / (Fintype.card F : ℝ) ^ 2 := by + have hq : (Fintype.card F : ℝ) ≠ 0 := + ne_of_gt (Nat.cast_pos.mpr Fintype.card_pos) + have hcenter : + (∑ t : F, ((sliceCount U d t : ℝ) - + (U.card : ℝ) / (Fintype.card F : ℝ)) ^ 2) = + (∑ t : F, (sliceCount U d t : ℝ) ^ 2) - + (2 * ((U.card : ℝ) / (Fintype.card F : ℝ))) * (U.card : ℝ) + + (Fintype.card F : ℝ) * ((U.card : ℝ) / (Fintype.card F : ℝ)) ^ 2 := by + calc + _ = ∑ t : F, ((sliceCount U d t : ℝ) ^ 2 - + (2 * ((U.card : ℝ) / (Fintype.card F : ℝ))) * (sliceCount U d t : ℝ) + + ((U.card : ℝ) / (Fintype.card F : ℝ)) ^ 2) := by + apply Finset.sum_congr rfl + intro t ht + ring + _ = _ := by + simp only [Finset.sum_add_distrib, Finset.sum_sub_distrib, + ← Finset.mul_sum, sum_sliceCount, Finset.sum_const, Finset.card_univ, + nsmul_eq_mul] + unfold sliceEnergy + rw [hcenter] + field_simp + ring + +theorem sum_sliceEnergy (U : Finset (Point F)) : + (∑ d : Direction F, sliceEnergy U d) = + (U.card : ℝ) - (U.card : ℝ) ^ 2 / (Fintype.card F : ℝ) ^ 2 := by + have hq : (Fintype.card F : ℝ) ≠ 0 := + ne_of_gt (Nat.cast_pos.mpr Fintype.card_pos) + simp_rw [sliceEnergy_eq] + rw [Finset.sum_sub_distrib, ← Finset.sum_div, sum_all_sliceCount_sq] + simp only [Finset.sum_const, Finset.card_univ, nsmul_eq_mul, + card_direction, Nat.cast_add, Nat.cast_one] + field_simp + ring + +theorem sum_sliceEnergy_le_card (U : Finset (Point F)) : + (∑ d : Direction F, sliceEnergy U d) ≤ (U.card : ℝ) := by + rw [sum_sliceEnergy] + exact sub_le_self _ (div_nonneg (sq_nonneg _) (sq_nonneg _)) + +theorem sum_sliceEnergy_le_sq_card (U : Finset (Point F)) : + (∑ d : Direction F, sliceEnergy U d) ≤ (Fintype.card F : ℝ) ^ 2 := by + apply (sum_sliceEnergy_le_card U).trans + have h := U.card_le_univ + rw [card_point] at h + exact_mod_cast h + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Hypergraph/Cover.lean b/lean/OAI/Combinatorics/Ryser/Hypergraph/Cover.lean new file mode 100644 index 0000000000000000000000000000000000000000..37815a6bd5215eb25decff36c0fcbb8c086ed6d1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Hypergraph/Cover.lean @@ -0,0 +1,138 @@ +import OAI.Combinatorics.Ryser.Hypergraph.Definitions +import Mathlib.Data.Finset.Union + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample + +variable {V : Type*} [instDecidableEqV : DecidableEq V] {H : Hypergraph V} + +theorem IsCover.mono {C D : Finset V} (hC : IsCover H C) (hCD : C ⊆ D) : + IsCover H D := let _ := instDecidableEqV; by + intro e he + obtain ⟨v, hvC, hve⟩ := hC e he + exact ⟨v, hCD hvC, hve⟩ + +theorem IsCover.nonemptyEdges {C : Finset V} (hC : IsCover H C) : + NonemptyEdges H := let _ := instDecidableEqV; by + intro e he + obtain ⟨v, _, hve⟩ := hC e he + exact ⟨v, hve⟩ + +theorem NonemptyEdges.isCover_biUnion (hH : NonemptyEdges H) : + IsCover H (H.biUnion id) := by + intro e he + obtain ⟨v, hve⟩ := hH e he + exact ⟨v, Finset.mem_biUnion.mpr ⟨e, he, hve⟩, hve⟩ + +theorem NonemptyEdges.exists_cover (hH : NonemptyEdges H) : + ∃ C : Finset V, IsCover H C := + ⟨H.biUnion id, hH.isCover_biUnion⟩ + +theorem exists_cover_iff_nonemptyEdges : + (∃ C : Finset V, IsCover H C) ↔ NonemptyEdges H := + ⟨fun ⟨_, hC⟩ => hC.nonemptyEdges, NonemptyEdges.exists_cover⟩ + +theorem nonemptyEdges_iff_empty_not_mem : NonemptyEdges H ↔ ∅ ∉ H := let _ := instDecidableEqV; by + constructor + · intro hH he + obtain ⟨v, hv⟩ := hH ∅ he + exact Finset.notMem_empty v hv + · intro hH e he + apply Finset.nonempty_iff_ne_empty.mpr + intro heq + apply hH + simpa only [heq] using he + +theorem IsCover.coverNumber_le {C : Finset V} (hC : IsCover H C) : + coverNumber H ≤ C.card := let _ := instDecidableEqV; + Nat.sInf_le ⟨C, hC, rfl⟩ + +theorem exists_minimum_cover_of_exists (hH : ∃ C : Finset V, IsCover H C) : + ∃ C : Finset V, IsCover H C ∧ C.card = coverNumber H := let _ := instDecidableEqV; by + apply Nat.sInf_mem (s := coverCardinalities H) + obtain ⟨C, hC⟩ := hH + exact ⟨C.card, C, hC, rfl⟩ + +theorem exists_minimum_cover (hH : NonemptyEdges H) : + ∃ C : Finset V, IsCover H C ∧ C.card = coverNumber H := + exists_minimum_cover_of_exists hH.exists_cover + +theorem le_coverNumber_of_exists (hH : ∃ C : Finset V, IsCover H C) (k : ℕ) + (hk : ∀ C : Finset V, IsCover H C → k ≤ C.card) : k ≤ coverNumber H := by + obtain ⟨C, hC, hcard⟩ := exists_minimum_cover_of_exists hH + rw [← hcard] + exact hk C hC + +theorem le_coverNumber (hH : NonemptyEdges H) (k : ℕ) + (hk : ∀ C : Finset V, IsCover H C → k ≤ C.card) : k ≤ coverNumber H := + le_coverNumber_of_exists hH.exists_cover k hk + +theorem coverNumber_le_iff (hH : NonemptyEdges H) (k : ℕ) : + coverNumber H ≤ k ↔ ∃ C : Finset V, IsCover H C ∧ C.card ≤ k := by + constructor + · intro hk + obtain ⟨C, hC, hcard⟩ := exists_minimum_cover hH + exact ⟨C, hC, hcard.le.trans hk⟩ + · rintro ⟨C, hC, hcard⟩ + exact hC.coverNumber_le.trans hcard + +theorem coverNumber_eq_zero_of_empty_mem (he : ∅ ∈ H) : coverNumber H = 0 := let _ := instDecidableEqV; by + have hempty : coverCardinalities H = ∅ := by + apply Set.eq_empty_iff_forall_notMem.mpr + rintro k ⟨C, hC, _⟩ + obtain ⟨v, _, hv⟩ := hC ∅ he + exact Finset.notMem_empty v hv + rw [coverNumber, hempty, Nat.sInf_empty] + +@[simp] theorem coverNumber_empty : coverNumber (∅ : Hypergraph V) = 0 := by + apply Nat.eq_zero_of_le_zero + exact (show IsCover (∅ : Hypergraph V) ∅ from by simp [IsCover]).coverNumber_le + +theorem coverNumber_pos (hH : NonemptyEdges H) (hne : H.Nonempty) : + 0 < coverNumber H := by + apply Nat.lt_of_lt_of_le Nat.zero_lt_one + apply le_coverNumber hH 1 + intro C hC + obtain ⟨e, he⟩ := hne + obtain ⟨v, hv, _⟩ := hC e he + exact Finset.card_pos.mpr ⟨v, hv⟩ + +theorem Intersecting.isCover_edge (hI : Intersecting H) (hH : NonemptyEdges H) + {e : Finset V} (he : e ∈ H) : IsCover H e := by + intro f hf + by_cases hef : e = f + · subst f + obtain ⟨v, hv⟩ := hH e he + exact ⟨v, hv, hv⟩ + · obtain ⟨v, hv⟩ := hI e he f hf hef + exact ⟨v, (Finset.mem_inter.mp hv).1, (Finset.mem_inter.mp hv).2⟩ + +theorem coverNumber_le_edge_card (hI : Intersecting H) (hH : NonemptyEdges H) + {e : Finset V} (he : e ∈ H) : coverNumber H ≤ e.card := + (hI.isCover_edge hH he).coverNumber_le + +theorem coverNumber_eq_rank_of_no_small_cover {r : ℕ} (hr : 0 < r) + (hU : Uniform r H) (hne : H.Nonempty) (hI : Intersecting H) + (hsmall : ∀ C : Finset V, C.card ≤ r - 1 → ¬ IsCover H C) : + coverNumber H = r := by + have hH : NonemptyEdges H := by + intro e he + apply Finset.card_pos.mp + rw [hU e he] + exact hr + apply le_antisymm + · obtain ⟨e, he⟩ := hne + exact (coverNumber_le_edge_card hI hH he).trans_eq (hU e he) + · apply le_coverNumber hH r + intro C hC + by_contra hlt + exact hsmall C (Nat.le_sub_one_of_lt (lt_of_not_ge hlt)) hC + +end RyserCoveringCounterexample + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Hypergraph/Definitions.lean b/lean/OAI/Combinatorics/Ryser/Hypergraph/Definitions.lean new file mode 100644 index 0000000000000000000000000000000000000000..c7c4621035cef663167d57755a7d3eee9deb5430 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Hypergraph/Definitions.lean @@ -0,0 +1,48 @@ +import Mathlib.Data.Finset.Powerset +import Mathlib.Order.Lattice.Nat + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample + +abbrev Hypergraph (V : Type*) := Finset (Finset V) + +variable {V : Type*} [DecidableEq V] + +def IsCover (H : Hypergraph V) (C : Finset V) : Prop := + ∀ e ∈ H, ∃ v ∈ C, v ∈ e + +def NonemptyEdges (H : Hypergraph V) : Prop := ∀ e ∈ H, e.Nonempty + +def Intersecting (H : Hypergraph V) : Prop := + ∀ e ∈ H, ∀ f ∈ H, e ≠ f → (e ∩ f).Nonempty + +def IsMatching (H M : Hypergraph V) : Prop := + M ⊆ H ∧ (M : Set (Finset V)).Pairwise Disjoint + +def matchings (H : Hypergraph V) : Finset (Hypergraph V) := by + classical + exact H.powerset.filter fun M => (M : Set (Finset V)).Pairwise Disjoint + +def matchingNumber (H : Hypergraph V) : ℕ := (matchings H).sup Finset.card + +def coverCardinalities (H : Hypergraph V) : Set ℕ := + {n | ∃ C : Finset V, IsCover H C ∧ C.card = n} + +def coverNumber (H : Hypergraph V) : ℕ := sInf (coverCardinalities H) + +def Uniform (r : ℕ) (H : Hypergraph V) : Prop := ∀ e ∈ H, e.card = r + +def PartiteUniform {I : Type*} (part : V → I) (H : Hypergraph V) : Prop := + ∀ e ∈ H, ∀ i : I, ∃! v : V, v ∈ e ∧ part v = i + +def RPartiteUniform (r : ℕ) (H : Hypergraph V) : Prop := + ∃ part : V → Fin r, PartiteUniform part H + +end RyserCoveringCounterexample + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Hypergraph/Infinitude.lean b/lean/OAI/Combinatorics/Ryser/Hypergraph/Infinitude.lean new file mode 100644 index 0000000000000000000000000000000000000000..fcfd1cb1a2341edc323f48c82f8a8eb72d7b7fee --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Hypergraph/Infinitude.lean @@ -0,0 +1,59 @@ +import OAI.Combinatorics.Ryser.Hypergraph.Cover +import OAI.Combinatorics.Ryser.Hypergraph.Matching +import OAI.Combinatorics.Ryser.Hypergraph.Partite +import Mathlib.Data.Nat.Prime.Infinite + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample + +def CounterexampleRank (r : ℕ) : Prop := + ∃ (V : Type) (fin : Fintype V) (dec : DecidableEq V), + letI : Fintype V := fin + letI : DecidableEq V := dec + ∃ H : Hypergraph V, + 0 < r ∧ H.Nonempty ∧ RPartiteUniform r H ∧ Intersecting H ∧ + (∃ C : Finset V, IsCover H C) ∧ matchingNumber H = 1 ∧ coverNumber H = r + +theorem counterexampleRank_of_no_small_cover {V : Type} [Fintype V] [DecidableEq V] + {r : ℕ} {H : Hypergraph V} (hr : 0 < r) (hne : H.Nonempty) + (hpart : RPartiteUniform r H) (hI : Intersecting H) + (hsmall : ∀ C : Finset V, C.card ≤ r - 1 → ¬ IsCover H C) : + CounterexampleRank r := by + refine ⟨V, inferInstance, inferInstance, H, hr, hne, hpart, hI, ?_, ?_, ?_⟩ + · exact (hpart.nonemptyEdges hr).exists_cover + · exact matchingNumber_eq_one_of_nonempty_intersecting hne hI + · exact coverNumber_eq_rank_of_no_small_cover hr hpart.uniform hne hI hsmall + +theorem infinite_counterexampleRanks_of_unbounded + (h : ∀ b : ℕ, ∃ r : ℕ, b < r ∧ CounterexampleRank r) : + Set.Infinite {r : ℕ | CounterexampleRank r} := by + apply Set.infinite_of_not_bddAbove + rintro ⟨b, hb⟩ + obtain ⟨r, hbr, hr⟩ := h b + exact (not_le_of_gt hbr) (hb hr) + +theorem infinite_counterexampleRanks_of_eventually_prime_powers + (s N : ℕ) (hs : 1 < s) + (hexamples : ∀ n : ℕ, N ≤ n → Nat.Prime n → 2 < n → + CounterexampleRank (s ^ n + 1)) : + Set.Infinite {r : ℕ | CounterexampleRank r} := by + apply infinite_counterexampleRanks_of_unbounded + intro b + obtain ⟨n, hn, hnprime⟩ := Nat.exists_infinite_primes (max N (max 3 (b + 1))) + have hN : N ≤ n := (le_max_left N (max 3 (b + 1))).trans hn + have hthree : 3 ≤ n := + ((le_max_left 3 (b + 1)).trans (le_max_right N (max 3 (b + 1)))).trans hn + have hbn : b < n := Nat.lt_of_succ_le + (((le_max_right 3 (b + 1)).trans (le_max_right N (max 3 (b + 1)))).trans hn) + have hnpow : n < s ^ n := Nat.lt_pow_self hs + refine ⟨s ^ n + 1, ?_, hexamples n hN hnprime (Nat.lt_of_succ_le hthree)⟩ + exact (hbn.trans hnpow).trans (Nat.lt_succ_self (s ^ n)) + +end RyserCoveringCounterexample + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Hypergraph/Matching.lean b/lean/OAI/Combinatorics/Ryser/Hypergraph/Matching.lean new file mode 100644 index 0000000000000000000000000000000000000000..7da600880f629697ffbebb40ca1955240082b6ef --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Hypergraph/Matching.lean @@ -0,0 +1,86 @@ +import OAI.Combinatorics.Ryser.Hypergraph.Definitions + +namespace OAI + +namespace RyserCoveringCounterexample + +variable {V : Type*} [instDecidableEqV : DecidableEq V] + +@[simp] theorem mem_matchings {H M : Hypergraph V} : + M ∈ matchings H ↔ IsMatching H M := let _ := instDecidableEqV; by + classical + simp only [matchings, Finset.mem_filter, Finset.mem_powerset, IsMatching] + +theorem isMatching_empty (H : Hypergraph V) : IsMatching H ∅ := let _ := instDecidableEqV; by + constructor + · exact Finset.empty_subset H + · simp + +theorem isMatching_singleton {H : Hypergraph V} {e : Finset V} (he : e ∈ H) : + IsMatching H {e} := let _ := instDecidableEqV; by + constructor + · exact Finset.singleton_subset_iff.mpr he + · simp + +theorem matchings_nonempty (H : Hypergraph V) : (matchings H).Nonempty := + ⟨∅, mem_matchings.mpr (isMatching_empty H)⟩ + +theorem IsMatching.card_le_matchingNumber {H M : Hypergraph V} + (hM : IsMatching H M) : M.card ≤ matchingNumber H := by + exact Finset.le_sup (mem_matchings.mpr hM) + +theorem matchingNumber_le_iff {H : Hypergraph V} (n : ℕ) : + matchingNumber H ≤ n ↔ ∀ M, IsMatching H M → M.card ≤ n := by + change (matchings H).sup Finset.card ≤ n ↔ _ + rw [Finset.sup_le_iff] + constructor + · intro h M hM + exact h M (mem_matchings.mpr hM) + · intro h M hM + exact h M (mem_matchings.mp hM) + +theorem matchingNumber_le {H : Hypergraph V} {n : ℕ} + (h : ∀ M, IsMatching H M → M.card ≤ n) : matchingNumber H ≤ n := + (matchingNumber_le_iff n).mpr h + +theorem exists_isMatching_card_eq_matchingNumber (H : Hypergraph V) : + ∃ M, IsMatching H M ∧ M.card = matchingNumber H := by + obtain ⟨M, hM, hcard⟩ := + Finset.exists_mem_eq_sup (matchings H) (matchings_nonempty H) Finset.card + exact ⟨M, mem_matchings.mp hM, hcard.symm⟩ + +theorem matchingNumber_le_card (H : Hypergraph V) : matchingNumber H ≤ H.card := by + apply matchingNumber_le + intro M hM + exact Finset.card_le_card hM.1 + +@[simp] theorem matchingNumber_empty : matchingNumber (∅ : Hypergraph V) = 0 := by + apply Nat.eq_zero_of_le_zero + simpa only [Finset.card_empty] using matchingNumber_le_card (∅ : Hypergraph V) + +theorem one_le_matchingNumber_of_nonempty {H : Hypergraph V} (hH : H.Nonempty) : + 1 ≤ matchingNumber H := by + obtain ⟨e, he⟩ := hH + simpa only [Finset.card_singleton] using + (isMatching_singleton he).card_le_matchingNumber + +theorem IsMatching.card_le_one_of_intersecting {H M : Hypergraph V} + (hM : IsMatching H M) (hH : Intersecting H) : M.card ≤ 1 := by + apply Finset.card_le_one.mpr + intro e he f hf + by_contra hne + obtain ⟨v, hv⟩ := hH e (hM.1 he) f (hM.1 hf) hne + exact (Finset.disjoint_left.mp (hM.2 he hf hne)) + (Finset.mem_inter.mp hv).1 (Finset.mem_inter.mp hv).2 + +theorem matchingNumber_eq_one_of_nonempty_intersecting {H : Hypergraph V} + (hH : H.Nonempty) (hI : Intersecting H) : matchingNumber H = 1 := by + apply le_antisymm + · apply matchingNumber_le + intro M hM + exact hM.card_le_one_of_intersecting hI + · exact one_le_matchingNumber_of_nonempty hH + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Hypergraph/Partite.lean b/lean/OAI/Combinatorics/Ryser/Hypergraph/Partite.lean new file mode 100644 index 0000000000000000000000000000000000000000..52726a74465a12dad2568f8501c26be0fad4c62e --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Hypergraph/Partite.lean @@ -0,0 +1,72 @@ +import OAI.Combinatorics.Ryser.Hypergraph.Definitions +import Mathlib.Data.Fintype.Card +import Mathlib.Data.Fintype.EquivFin + +namespace OAI + +namespace RyserCoveringCounterexample + +variable {V I J : Type*} [instDecidableEqV : DecidableEq V] + +theorem PartiteUniform.edgePart_bijective {part : V → I} {H : Hypergraph V} + (hpart : PartiteUniform part H) {e : Finset V} (he : e ∈ H) : + Function.Bijective (fun v : ↥e => part v.val) := let _ := instDecidableEqV; by + constructor + · intro v w hvw + apply Subtype.ext + exact (hpart e he (part v.val)).unique + ⟨v.property, rfl⟩ ⟨w.property, hvw.symm⟩ + · intro i + obtain ⟨v, hve, hvi⟩ := (hpart e he i).exists + exact ⟨⟨v, hve⟩, hvi⟩ + +theorem PartiteUniform.edge_card [Fintype I] {part : V → I} {H : Hypergraph V} + (hpart : PartiteUniform part H) {e : Finset V} (he : e ∈ H) : + e.card = Fintype.card I := by + exact (Fintype.card_coe e).symm.trans + (Fintype.card_of_bijective (hpart.edgePart_bijective he)) + +theorem PartiteUniform.uniform [Fintype I] {part : V → I} {H : Hypergraph V} + (hpart : PartiteUniform part H) : Uniform (Fintype.card I) H := by + intro e he + exact hpart.edge_card he + +theorem RPartiteUniform.uniform {r : ℕ} {H : Hypergraph V} + (hpart : RPartiteUniform r H) : Uniform r H := by + obtain ⟨part, hpart⟩ := hpart + intro e he + simpa only [Fintype.card_fin] using hpart.edge_card he + +theorem Uniform.nonemptyEdges {r : ℕ} {H : Hypergraph V} + (huniform : Uniform r H) (hr : 0 < r) : NonemptyEdges H := let _ := instDecidableEqV; by + intro e he + apply Finset.card_pos.mp + rw [huniform e he] + exact hr + +theorem RPartiteUniform.nonemptyEdges {r : ℕ} {H : Hypergraph V} + (hpart : RPartiteUniform r H) (hr : 0 < r) : NonemptyEdges H := + hpart.uniform.nonemptyEdges hr + +theorem PartiteUniform.relabel {part : V → I} {H : Hypergraph V} + (hpart : PartiteUniform part H) (f : I ≃ J) : + PartiteUniform (f ∘ part) H := let _ := instDecidableEqV; by + intro e he j + obtain ⟨v, hv, huniq⟩ := hpart e he (f.symm j) + refine ⟨v, ⟨hv.1, ?_⟩, ?_⟩ + · change f (part v) = j + rw [hv.2, f.apply_symm_apply] + · intro w hw + apply huniq w + refine ⟨hw.1, ?_⟩ + exact f.injective (hw.2.trans (f.apply_symm_apply j).symm) + +theorem PartiteUniform.rPartiteUniform [Fintype I] {part : V → I} + {H : Hypergraph V} (hpart : PartiteUniform part H) : + RPartiteUniform (Fintype.card I) H := by + refine ⟨(Fintype.equivFin I) ∘ part, ?_⟩ + exact hpart.relabel (Fintype.equivFin I) + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/AllLineCap.lean b/lean/OAI/Combinatorics/Ryser/Incidence/AllLineCap.lean new file mode 100644 index 0000000000000000000000000000000000000000..7d214f8cfa581ea2d0e5623221990ad54856521c --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/AllLineCap.lean @@ -0,0 +1,90 @@ +import OAI.Combinatorics.Ryser.Incidence.PruningCore +import OAI.Combinatorics.Ryser.Geometry.ProjectiveJoins + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.Incidence + +variable {Pt Ln : Type*} [instDecidableEqPt : DecidableEq Pt] [DecidableEq Ln] + +theorem leftDegree_le_erase_add_one (R : Pt → Ln → Prop) (L : Finset Ln) + (p : Pt) (l : Ln) : leftDegree R L p ≤ leftDegree R (L.erase l) p + 1 := let _ := instDecidableEqPt; by + classical + apply (Finset.card_le_card (show L.filter (R p) ⊆ + insert l ((L.erase l).filter (R p)) from ?_)).trans (Finset.card_insert_le _ _) + intro m hm + obtain ⟨hmL, hpm⟩ := Finset.mem_filter.mp hm + apply Finset.mem_insert.mpr + by_cases he : m = l + · exact Or.inl he + · exact Or.inr (Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨he, hmL⟩, hpm⟩) + +theorem rightDegree_mul_sub_one_le (R : Pt → Ln → Prop) (P : Finset Pt) + (L : Finset Ln) {d : ℝ} + (hmin : ∀ p ∈ P, d ≤ (leftDegree R L p : ℝ)) + (huniq : ∀ l m : Ln, l ≠ m → ∀ p q : Pt, + R p l → R p m → R q l → R q m → p = q) (l : Ln) : + (rightDegree R P l : ℝ) * (d - 1) ≤ (L.card : ℝ) := by + classical + let Q := P.filter (fun p => R p l) + have hupper : incidenceCount R Q (L.erase l) ≤ L.card := by + calc + incidenceCount R Q (L.erase l) = + incidenceCount (fun l p => R p l) (L.erase l) Q := incidenceCount_swap R Q _ + _ ≤ ∑ m ∈ L.erase l, 1 := by + apply Finset.sum_le_sum + intro m hm + change (Q.filter (fun p => R p m)).card ≤ 1 + apply Finset.card_le_one.mpr + intro p hp q hq + obtain ⟨hpQ, hpm⟩ := Finset.mem_filter.mp hp + obtain ⟨hqQ, hqm⟩ := Finset.mem_filter.mp hq + exact huniq m l (Finset.mem_erase.mp hm).1 p q hpm + (Finset.mem_filter.mp hpQ).2 hqm (Finset.mem_filter.mp hqQ).2 + _ = (L.erase l).card := by simp + _ ≤ L.card := Finset.card_erase_le + have hlower : (Q.card : ℝ) * (d - 1) ≤ (incidenceCount R Q (L.erase l) : ℝ) := by + calc + (Q.card : ℝ) * (d - 1) = ∑ p ∈ Q, (d - 1) := by simp [mul_sub] + _ ≤ ∑ p ∈ Q, (leftDegree R (L.erase l) p : ℝ) := by + apply Finset.sum_le_sum + intro p hp + have hdegree := hmin p (Finset.mem_filter.mp hp).1 + have hdelete : (leftDegree R L p : ℝ) ≤ + (leftDegree R (L.erase l) p : ℝ) + 1 := by + exact_mod_cast leftDegree_le_erase_add_one R L p l + linarith + _ = (incidenceCount R Q (L.erase l) : ℝ) := by + simp only [incidenceCount, Nat.cast_sum] + have hupper' : (incidenceCount R Q (L.erase l) : ℝ) ≤ (L.card : ℝ) := by + exact_mod_cast hupper + exact hlower.trans hupper' + +theorem rightDegree_le_div_sub_one (R : Pt → Ln → Prop) (P : Finset Pt) + (L : Finset Ln) {d : ℝ} (hd : 1 < d) + (hmin : ∀ p ∈ P, d ≤ (leftDegree R L p : ℝ)) + (huniq : ∀ l m : Ln, l ≠ m → ∀ p q : Pt, + R p l → R p m → R q l → R q m → p = q) (l : Ln) : + (rightDegree R P l : ℝ) ≤ (L.card : ℝ) / (d - 1) := + (le_div_iff₀ (sub_pos.mpr hd)).2 (rightDegree_mul_sub_one_le R P L hmin huniq l) + +variable {F : Type*} [Field F] [DecidableEq F] + +theorem projective_all_line_cap (P : Finset (ProjectivePoint F)) + (L : Finset (ProjectiveLine F)) {d : ℝ} (hd : 1 < d) + (hmin : ∀ p ∈ P, d ≤ (leftDegree ProjectiveIncidence L p : ℝ)) + (l : ProjectiveLine F) : + (rightDegree ProjectiveIncidence P l : ℝ) ≤ (L.card : ℝ) / (d - 1) := by + apply rightDegree_le_div_sub_one ProjectiveIncidence P L hd hmin + intro l m hlm p q hpl hpm hql hqm + exact eq_projectivePoint_of_common_incidence hlm hpl hpm hql hqm + +end RyserCoveringCounterexample.Incidence + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/CoordinateTransfer.lean b/lean/OAI/Combinatorics/Ryser/Incidence/CoordinateTransfer.lean new file mode 100644 index 0000000000000000000000000000000000000000..fc41f3d876fa289796518718bbfb3e6a77697b4c --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/CoordinateTransfer.lean @@ -0,0 +1,128 @@ +import OAI.Combinatorics.Ryser.Incidence.Pencils +import OAI.Combinatorics.Ryser.Incidence.CoordinateTransferSet + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence + +noncomputable section + +variable {F : Type*} [Field F] [DecidableEq F] + +theorem pencilSlice_image_transform (T : ProjectiveTransform F) + (L : Finset (ProjectiveLine F)) (p : ProjectivePoint F) : + pencilSlice (L.image T.lines) (T.points p) = (pencilSlice L p).image T.lines := by + ext l + constructor + · intro hl + obtain ⟨hl, hp⟩ := Finset.mem_filter.mp hl + obtain ⟨m, hm, rfl⟩ := Finset.mem_image.mp hl + exact Finset.mem_image.mpr ⟨m, + Finset.mem_filter.mpr ⟨hm, (T.incidence p m).mp hp⟩, rfl⟩ + · intro hl + obtain ⟨m, hm, rfl⟩ := Finset.mem_image.mp hl + obtain ⟨hm, hp⟩ := Finset.mem_filter.mp hm + exact Finset.mem_filter.mpr ⟨Finset.mem_image_of_mem T.lines hm, + (T.incidence p m).mpr hp⟩ + +theorem card_pencilSlice_image_transform (T : ProjectiveTransform F) + (L : Finset (ProjectiveLine F)) (p : ProjectivePoint F) : + (pencilSlice (L.image T.lines) (T.points p)).card = (pencilSlice L p).card := by + rw [pencilSlice_image_transform] + exact Finset.card_image_of_injective _ T.lines.injective + +theorem hasJoin_image_transform (T : ProjectiveTransform F) + (L : Finset (ProjectiveLine F)) (p w : ProjectivePoint F) (z : Point F) + (hw : T.points w = Sum.inl z) + (hjoin : ∃ l ∈ L, ProjectiveIncidence p l ∧ ProjectiveIncidence w l) : + HasJoin (L.image T.lines) (T.points p) z := by + obtain ⟨l, hl, hp, hwl⟩ := hjoin + refine ⟨T.lines l, Finset.mem_image_of_mem T.lines hl, (T.incidence p l).mpr hp, ?_⟩ + rw [← hw] + exact (T.incidence w l).mpr hwl + +theorem coordinateGraph_hasJoin (T : ProjectiveTransform F) + (W : Finset (ProjectivePoint F)) (L : Finset (ProjectiveLine F)) + (p : ProjectivePoint F) + (hjoin : ∀ w ∈ W, ∃ l ∈ L, + ProjectiveIncidence p l ∧ ProjectiveIncidence w l) + (z : Point F) (hz : z ∈ coordinateGraph T W) : + HasJoin (L.image T.lines) (T.points p) z := by + obtain ⟨w, hw, hTw⟩ := (mem_coordinateGraph_iff T W z).mp hz + exact hasJoin_image_transform T L p w z hTw + (hjoin w (goodW_subset T W hw)) + +theorem coordinate_transfer + (P W : Finset (ProjectivePoint F)) (L : Finset (ProjectiveLine F)) + (T : ProjectiveTransform F) (p1 p2 p3 p4 : ProjectivePoint F) (H : ℝ) + (hWP : W ⊆ P) + (hcap : ∀ l : ProjectiveLine F, + ((P.filter (fun p => ProjectiveIncidence p l)).card : ℝ) ≤ H) + (hdegree : ∀ p ∈ P, ((pencilSlice L p).card : ℝ) ≤ H) + (hp1 : p1 ∈ P) (hp2 : p2 ∈ P) (hp3 : p3 ∈ P) (hp4 : p4 ∈ P) + (hT1 : T.points p1 = Sum.inr (some 0)) + (hT2 : T.points p2 = Sum.inr none) + (hT3 : T.points p3 = Sum.inr (some 1)) + (hT4 : T.points p4 = Sum.inl (0, 0)) + (hjoins : ∀ w ∈ W, + (∃ l ∈ L, ProjectiveIncidence p1 l ∧ ProjectiveIncidence w l) ∧ + (∃ l ∈ L, ProjectiveIncidence p2 l ∧ ProjectiveIncidence w l) ∧ + (∃ l ∈ L, ProjectiveIncidence p3 l ∧ ProjectiveIncidence w l) ∧ + (∃ l ∈ L, ProjectiveIncidence p4 l ∧ ProjectiveIncidence w l)) : + (W.card : ℝ) - 3 * H ≤ (coordinateGraph T W).card ∧ + (∀ z ∈ coordinateGraph T W, z.1 ≠ 0 ∧ z.2 ≠ 0) ∧ + (((coordinateGraph T W).image Prod.fst).card : ℝ) ≤ H ∧ + (((coordinateGraph T W).image Prod.snd).card : ℝ) ≤ H ∧ + (((coordinateGraph T W).image (fun z => z.1 - z.2)).card : ℝ) ≤ H ∧ + (((coordinateGraph T W).image (fun z => z.1 / z.2)).card : ℝ) ≤ H := by + have hj1 (z : Point F) (hz : z ∈ coordinateGraph T W) : + HasJoin (L.image T.lines) (Sum.inr (some 0)) z := by + simpa only [hT1] using coordinateGraph_hasJoin T W L p1 + (fun w hw => (hjoins w hw).1) z hz + have hj2 (z : Point F) (hz : z ∈ coordinateGraph T W) : + HasJoin (L.image T.lines) (Sum.inr none) z := by + simpa only [hT2] using coordinateGraph_hasJoin T W L p2 + (fun w hw => (hjoins w hw).2.1) z hz + have hj3 (z : Point F) (hz : z ∈ coordinateGraph T W) : + HasJoin (L.image T.lines) (Sum.inr (some 1)) z := by + simpa only [hT3] using coordinateGraph_hasJoin T W L p3 + (fun w hw => (hjoins w hw).2.2.1) z hz + have hj4 (z : Point F) (hz : z ∈ coordinateGraph T W) : + HasJoin (L.image T.lines) (Sum.inl (0, 0)) z := by + simpa only [hT4] using coordinateGraph_hasJoin T W L p4 + (fun w hw => (hjoins w hw).2.2.2) z hz + have hb := normalized_coordinate_card_bounds (coordinateGraph T W) (L.image T.lines) + (fun z hz => coordinateGraph_nonzero T W hz) + (fun z hz => ⟨hj2 z hz, hj1 z hz, hj3 z hz, hj4 z hz⟩) + have hd1 : ((pencilSlice (L.image T.lines) (Sum.inr (some 0))).card : ℝ) ≤ H := by + rw [← hT1, card_pencilSlice_image_transform] + exact hdegree p1 hp1 + have hd2 : ((pencilSlice (L.image T.lines) (Sum.inr none)).card : ℝ) ≤ H := by + rw [← hT2, card_pencilSlice_image_transform] + exact hdegree p2 hp2 + have hd3 : ((pencilSlice (L.image T.lines) (Sum.inr (some 1))).card : ℝ) ≤ H := by + rw [← hT3, card_pencilSlice_image_transform] + exact hdegree p3 hp3 + have hd4 : ((pencilSlice (L.image T.lines) (Sum.inl (0, 0))).card : ℝ) ≤ H := by + rw [← hT4, card_pencilSlice_image_transform] + exact hdegree p4 hp4 + refine ⟨coordinateGraph_card_lower P W T H hWP hcap, + (fun z hz => coordinateGraph_nonzero T W hz), ?_, ?_, ?_, ?_⟩ + · exact (show (((coordinateGraph T W).image Prod.fst).card : ℝ) ≤ + ((pencilSlice (L.image T.lines) (Sum.inr none)).card : ℝ) by + exact_mod_cast hb.1).trans hd2 + · exact (show (((coordinateGraph T W).image Prod.snd).card : ℝ) ≤ + ((pencilSlice (L.image T.lines) (Sum.inr (some 0))).card : ℝ) by + exact_mod_cast hb.2.1).trans hd1 + · exact (show (((coordinateGraph T W).image (fun z => z.1 - z.2)).card : ℝ) ≤ + ((pencilSlice (L.image T.lines) (Sum.inr (some 1))).card : ℝ) by + exact_mod_cast hb.2.2.1).trans hd3 + · exact (show (((coordinateGraph T W).image (fun z => z.1 / z.2)).card : ℝ) ≤ + ((pencilSlice (L.image T.lines) (Sum.inl (0, 0))).card : ℝ) by + exact_mod_cast hb.2.2.2).trans hd4 + +end + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/CoordinateTransferSet.lean b/lean/OAI/Combinatorics/Ryser/Incidence/CoordinateTransferSet.lean new file mode 100644 index 0000000000000000000000000000000000000000..8dc66ae40651c5ebe184a6b26a7793d21a3f3538 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/CoordinateTransferSet.lean @@ -0,0 +1,137 @@ +import OAI.Combinatorics.Ryser.Geometry.ProjectiveTransformBasic +import Mathlib.Data.Finset.Card +import Mathlib.Data.Finset.Image +import Mathlib.Basic.Real.Basic +import Mathlib.Tactic.Linarith + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence + +variable {F : Type*} [Field F] [instDecidableEqF : DecidableEq F] + +def goodW (T : ProjectiveTransform F) (W : Finset (ProjectivePoint F)) : + Finset (ProjectivePoint F) := + W.filter fun w => + ¬ ProjectiveIncidence w (T.lines.symm none) ∧ + ¬ ProjectiveIncidence w (T.lines.symm (some (some 0, 0))) ∧ + ¬ ProjectiveIncidence w (T.lines.symm (some (none, 0))) + +def affinePart : ProjectivePoint F → Point F + | Sum.inl z => z + | Sum.inr _ => (0, 0) + +@[simp] theorem affinePart_inl (z : Point F) : + affinePart (Sum.inl z : ProjectivePoint F) = z := let _ := instDecidableEqF; rfl + +@[simp] theorem affinePart_inr (d : Direction F) : + affinePart (Sum.inr d : ProjectivePoint F) = (0, 0) := let _ := instDecidableEqF; rfl + +def coordinateGraph (T : ProjectiveTransform F) (W : Finset (ProjectivePoint F)) : + Finset (Point F) := + (goodW T W).image fun w => affinePart (T.points w) + +@[simp] theorem mem_goodW (T : ProjectiveTransform F) + (W : Finset (ProjectivePoint F)) (w : ProjectivePoint F) : + w ∈ goodW T W ↔ w ∈ W ∧ + ¬ ProjectiveIncidence w (T.lines.symm none) ∧ + ¬ ProjectiveIncidence w (T.lines.symm (some (some 0, 0))) ∧ + ¬ ProjectiveIncidence w (T.lines.symm (some (none, 0))) := by + exact Finset.mem_filter + +theorem goodW_subset (T : ProjectiveTransform F) + (W : Finset (ProjectivePoint F)) : goodW T W ⊆ W := + Finset.filter_subset _ _ + +theorem transformed_goodW_affine (T : ProjectiveTransform F) + (W : Finset (ProjectivePoint F)) {w : ProjectivePoint F} + (hw : w ∈ goodW T W) : + T.points w = Sum.inl (affinePart (T.points w)) := by + have hn : ¬ ProjectiveIncidence (T.points w) none := by + intro h + apply ((mem_goodW T W w).mp hw).2.1 + apply (T.incidence w (T.lines.symm none)).mp + simpa only [Equiv.apply_symm_apply] using h + cases htw : T.points w with + | inl z => rfl + | inr d => + exact (hn (by simp only [htw, ProjectiveIncidence])).elim + +theorem mem_coordinateGraph_iff (T : ProjectiveTransform F) + (W : Finset (ProjectivePoint F)) (z : Point F) : + z ∈ coordinateGraph T W ↔ + ∃ w ∈ goodW T W, T.points w = Sum.inl z := by + constructor + · intro hz + obtain ⟨w, hw, heq⟩ := Finset.mem_image.mp hz + refine ⟨w, hw, ?_⟩ + simpa only [heq] using transformed_goodW_affine T W hw + · rintro ⟨w, hw, heq⟩ + apply Finset.mem_image.mpr + refine ⟨w, hw, ?_⟩ + rw [heq] + rfl + +theorem coordinateGraph_nonzero (T : ProjectiveTransform F) + (W : Finset (ProjectivePoint F)) {z : Point F} + (hz : z ∈ coordinateGraph T W) : z.1 ≠ 0 ∧ z.2 ≠ 0 := by + obtain ⟨w, hw, heq⟩ := (mem_coordinateGraph_iff T W z).mp hz + have hw' := (mem_goodW T W w).mp hw + constructor + · intro hx + apply hw'.2.2.2 + apply (T.incidence w (T.lines.symm (some (none, 0)))).mp + simpa [heq, ProjectiveIncidence, Incidence, projection] using hx + · intro hy + apply hw'.2.2.1 + apply (T.incidence w (T.lines.symm (some (some 0, 0)))).mp + simpa [heq, ProjectiveIncidence, Incidence, projection] using hy + +theorem card_coordinateGraph_eq_goodW (T : ProjectiveTransform F) + (W : Finset (ProjectivePoint F)) : + (coordinateGraph T W).card = (goodW T W).card := by + apply Finset.card_image_of_injOn + intro w hw v hv h + change affinePart (T.points w) = affinePart (T.points v) at h + apply T.points.injective + rw [transformed_goodW_affine T W hw, transformed_goodW_affine T W hv] + exact congrArg (fun z : Point F => (Sum.inl z : ProjectivePoint F)) h + +theorem coordinateGraph_card_lower + (P W : Finset (ProjectivePoint F)) (T : ProjectiveTransform F) (H : ℝ) + (hWP : W ⊆ P) + (hcap : ∀ l : ProjectiveLine F, + ((P.filter fun p => ProjectiveIncidence p l).card : ℝ) ≤ H) : + (W.card : ℝ) - 3 * H ≤ (coordinateGraph T W).card := by + let A := P.filter fun p => ProjectiveIncidence p (T.lines.symm none) + let B := P.filter fun p => ProjectiveIncidence p (T.lines.symm (some (some 0, 0))) + let C := P.filter fun p => ProjectiveIncidence p (T.lines.symm (some (none, 0))) + have hcover : W ⊆ ((goodW T W ∪ A) ∪ B) ∪ C := by + intro w hw + simp only [Finset.mem_union] + by_cases hA : ProjectiveIncidence w (T.lines.symm none) + · exact Or.inl (Or.inl (Or.inr (Finset.mem_filter.mpr ⟨hWP hw, hA⟩))) + by_cases hB : ProjectiveIncidence w (T.lines.symm (some (some 0, 0))) + · exact Or.inl (Or.inr (Finset.mem_filter.mpr ⟨hWP hw, hB⟩)) + by_cases hC : ProjectiveIncidence w (T.lines.symm (some (none, 0))) + · exact Or.inr (Finset.mem_filter.mpr ⟨hWP hw, hC⟩) + exact Or.inl (Or.inl (Or.inl ((mem_goodW T W w).mpr ⟨hw, hA, hB, hC⟩))) + have hnat : W.card ≤ (goodW T W).card + A.card + B.card + C.card := by + calc + W.card ≤ (((goodW T W ∪ A) ∪ B) ∪ C).card := Finset.card_le_card hcover + _ ≤ ((goodW T W ∪ A) ∪ B).card + C.card := Finset.card_union_le _ _ + _ ≤ ((goodW T W ∪ A).card + B.card) + C.card := + Nat.add_le_add_right (Finset.card_union_le _ _) _ + _ ≤ (((goodW T W).card + A.card) + B.card) + C.card := + Nat.add_le_add_right (Nat.add_le_add_right (Finset.card_union_le _ _) _) _ + have hreal := (Nat.cast_le (α := ℝ)).mpr hnat + simp only [Nat.cast_add] at hreal + have hA : (A.card : ℝ) ≤ H := hcap (T.lines.symm none) + have hB : (B.card : ℝ) ≤ H := hcap (T.lines.symm (some (some 0, 0))) + have hC : (C.card : ℝ) ≤ H := hcap (T.lines.symm (some (none, 0))) + rw [card_coordinateGraph_eq_goodW T W] + linarith + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/DegreeSquares.lean b/lean/OAI/Combinatorics/Ryser/Incidence/DegreeSquares.lean new file mode 100644 index 0000000000000000000000000000000000000000..aee38e8422d13b95927bb282339656958fca9e40 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/DegreeSquares.lean @@ -0,0 +1,117 @@ +import OAI.Combinatorics.Ryser.Incidence.PruningCore +import OAI.Combinatorics.Ryser.Geometry.ProjectiveJoins + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.Incidence + +variable {Pt Ln : Type*} [DecidableEq Pt] [DecidableEq Ln] + +private theorem rightDegree_sq_eq_sum (R : Pt → Ln → Prop) (P : Finset Pt) (l : Ln) : + rightDegree R P l ^ 2 = + ∑ p ∈ P, ∑ q ∈ P, if R p l ∧ R q l then 1 else 0 := by + classical + rw [rightDegree, leftDegree_eq_sum, pow_two, Finset.sum_mul_sum] + apply Finset.sum_congr rfl + intro p hp + apply Finset.sum_congr rfl + intro q hq + by_cases hpl : R p l <;> by_cases hql : R q l <;> simp [hpl, hql] + +theorem sum_rightDegree_sq_eq_commonCount (R : Pt → Ln → Prop) + (P : Finset Pt) (L : Finset Ln) : + (∑ l ∈ L, rightDegree R P l ^ 2) = + ∑ p ∈ P, ∑ q ∈ P, (L.filter fun l => R p l ∧ R q l).card := by + classical + simp_rw [rightDegree_sq_eq_sum] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro p hp + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro q hq + exact Finset.sum_boole (R := ℕ) (fun l => R p l ∧ R q l) L + +theorem sum_rightDegree_sq_le_nat (R : Pt → Ln → Prop) + (P : Finset Pt) (L : Finset Ln) + (huniq : ∀ p ∈ P, ∀ q ∈ P, p ≠ q → ∀ l ∈ L, ∀ m ∈ L, + R p l → R q l → R p m → R q m → l = m) : + (∑ l ∈ L, rightDegree R P l ^ 2) ≤ incidenceCount R P L + P.card ^ 2 := by + classical + have hpair (p : Pt) (hp : p ∈ P) (q : Pt) (hq : q ∈ P) : + (L.filter fun l => R p l ∧ R q l).card ≤ + (if p = q then leftDegree R L p else 0) + 1 := by + by_cases hpq : p = q + · subst q + simp only [and_self] + change leftDegree R L p ≤ leftDegree R L p + 1 + exact Nat.le_succ _ + · rw [ite_eq_right hpq, zero_add] + apply Finset.card_le_one.mpr + intro l hl m hm + obtain ⟨hlL, hpl, hql⟩ := Finset.mem_filter.mp hl + obtain ⟨hmL, hpm, hqm⟩ := Finset.mem_filter.mp hm + exact huniq p hp q hq hpq l hlL m hmL hpl hql hpm hqm + have hrow (p : Pt) (hp : p ∈ P) : + (∑ q ∈ P, (L.filter fun l => R p l ∧ R q l).card) ≤ + leftDegree R L p + P.card := by + calc + (∑ q ∈ P, (L.filter fun l => R p l ∧ R q l).card) ≤ + ∑ q ∈ P, ((if p = q then leftDegree R L p else 0) + 1) := + Finset.sum_le_sum fun q hq => hpair p hp q hq + _ = leftDegree R L p + P.card := by + simp [Finset.sum_add_distrib, hp] + calc + (∑ l ∈ L, rightDegree R P l ^ 2) = + ∑ p ∈ P, ∑ q ∈ P, (L.filter fun l => R p l ∧ R q l).card := + sum_rightDegree_sq_eq_commonCount R P L + _ ≤ ∑ p ∈ P, (leftDegree R L p + P.card) := + Finset.sum_le_sum fun p hp => hrow p hp + _ = incidenceCount R P L + P.card ^ 2 := by + simp [incidenceCount, Finset.sum_add_distrib, pow_two] + +theorem sum_rightDegree_sq_le (R : Pt → Ln → Prop) + (P : Finset Pt) (L : Finset Ln) + (huniq : ∀ p ∈ P, ∀ q ∈ P, p ≠ q → ∀ l ∈ L, ∀ m ∈ L, + R p l → R q l → R p m → R q m → l = m) : + (∑ l ∈ L, (rightDegree R P l : ℝ) ^ 2) ≤ + (incidenceCount R P L : ℝ) + (P.card : ℝ) ^ 2 := by + exact_mod_cast sum_rightDegree_sq_le_nat R P L huniq + +theorem sum_leftDegree_sq_le (R : Pt → Ln → Prop) + (P : Finset Pt) (L : Finset Ln) + (huniq : ∀ l ∈ L, ∀ m ∈ L, l ≠ m → ∀ p ∈ P, ∀ q ∈ P, + R p l → R p m → R q l → R q m → p = q) : + (∑ p ∈ P, (leftDegree R L p : ℝ) ^ 2) ≤ + (incidenceCount R P L : ℝ) + (L.card : ℝ) ^ 2 := by + have h := sum_rightDegree_sq_le (fun l p => R p l) L P huniq + rw [← incidenceCount_swap R P L] at h + exact h + +variable {F : Type*} [Field F] [DecidableEq F] + +theorem sum_projective_rightDegree_sq_le + (P : Finset (ProjectivePoint F)) (L : Finset (ProjectiveLine F)) : + (∑ l ∈ L, (rightDegree ProjectiveIncidence P l : ℝ) ^ 2) ≤ + (incidenceCount ProjectiveIncidence P L : ℝ) + (P.card : ℝ) ^ 2 := by + apply sum_rightDegree_sq_le + intro p hp q hq hpq l hl m hm hpl hql hpm hqm + exact eq_projectiveLine_of_common_incidence hpq hpl hql hpm hqm + +theorem sum_projective_leftDegree_sq_le + (P : Finset (ProjectivePoint F)) (L : Finset (ProjectiveLine F)) : + (∑ p ∈ P, (leftDegree ProjectiveIncidence L p : ℝ) ^ 2) ≤ + (incidenceCount ProjectiveIncidence P L : ℝ) + (L.card : ℝ) ^ 2 := by + apply sum_leftDegree_sq_le + intro l hl m hm hlm p hp q hq hpl hpm hql hqm + exact eq_projectivePoint_of_common_incidence hlm hpl hpm hql hqm + +end RyserCoveringCounterexample.Incidence + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/DenseNeighborhood.lean b/lean/OAI/Combinatorics/Ryser/Incidence/DenseNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..3e95a50f8d480789ae622d733cd1f9d6f29eac84 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/DenseNeighborhood.lean @@ -0,0 +1,135 @@ +import OAI.Combinatorics.Ryser.Incidence.WalkCounts +import Mathlib.Algebra.BigOperators.Ring.Finset +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Incidence + +variable {α β : Type*} [DecidableEq α] [DecidableEq β] + +theorem exists_dense_neighborhood + (A : Finset α) (B : Finset β) (G : Finset (α × β)) + (hG : G ⊆ A ×ˢ B) {n V : ℝ} (hn : 0 < n) (hV : 2 ≤ V) + (hA : (A.card : ℝ) ≤ V * n) (hB : (B.card : ℝ) ≤ V * n) + (hE : n ^ 2 / V ≤ (G.card : ℝ)) : + ∃ b ∈ B, + n / (2 * V ^ 2) ≤ ((neighbors A G b).card : ℝ) ∧ + ((badPairs (neighbors A G b) B G (n / (512 * V ^ 8))).card : ℝ) ≤ + ((neighbors A G b).card : ℝ) ^ 2 / 16 := by + classical + have hVpos : 0 < V := by linarith + have hVne : V ≠ 0 := ne_of_gt hVpos + have hVn : 0 < V * n := mul_pos hVpos hn + let c : ℝ := n / (2 * V ^ 2) + let t : ℝ := n / (512 * V ^ 8) + let U : ℝ := n ^ 2 / (256 * V ^ 4) + let d : β → ℝ := fun b => ((neighbors A G b).card : ℝ) + let H : Finset β := B.filter fun b => c ≤ d b + let L : Finset β := B.filter fun b => ¬c ≤ d b + have hc : 0 < c := by + dsimp [c] + positivity + have ht : 0 ≤ t := by + dsimp [t] + positivity + have hU : 0 ≤ U := by + dsimp [U] + positivity + have htwice : n ^ 2 / V = 2 * ((V * n) * c) := by + dsimp [c] + field_simp [hVne] + have havg : (V * n) ^ 2 * t = c * U := by + dsimp [c, t, U] + field_simp [hVne]; ring + have hscale : 64 * U = c ^ 2 := by + dsimp [c, U] + field_simp [hVne]; ring + have hdeg (b : β) : d b ≤ V * n := by + exact (show ((neighbors A G b).card : ℝ) ≤ (A.card : ℝ) from + Nat.cast_le.mpr (Finset.card_le_card (neighbors_subset A G b))).trans hA + have hsum_edges : (G.card : ℝ) = ∑ b ∈ B, d b := by + simpa only [d, Nat.cast_sum] using + congrArg (fun k : ℕ => (k : ℝ)) (card_edges_eq_sum_neighbors A B G hG) + have hsplit : (∑ b ∈ H, d b) + (∑ b ∈ L, d b) = ∑ b ∈ B, d b := by + exact Finset.sum_filter_add_sum_filter_not B (fun b => c ≤ d b) d + have hhigh : (∑ b ∈ H, d b) ≤ (H.card : ℝ) * (V * n) := by + simpa only [nsmul_eq_mul] using + Finset.sum_le_card_nsmul H d (V * n) (fun b _ => hdeg b) + have hlow : (∑ b ∈ L, d b) ≤ (V * n) * c := by + calc + (∑ b ∈ L, d b) ≤ (L.card : ℝ) * c := by + simpa only [nsmul_eq_mul] using + Finset.sum_le_card_nsmul L d c (fun b hb => + (lt_of_not_ge (Finset.mem_filter.mp hb).2).le) + _ ≤ (B.card : ℝ) * c := + mul_le_mul_of_nonneg_right + (Nat.cast_le.mpr (Finset.card_le_card (Finset.filter_subset _ _))) hc.le + _ ≤ (V * n) * c := mul_le_mul_of_nonneg_right hB hc.le + have htotal : n ^ 2 / V ≤ (H.card : ℝ) * (V * n) + (V * n) * c := by + calc + n ^ 2 / V ≤ (G.card : ℝ) := hE + _ = (∑ b ∈ H, d b) + (∑ b ∈ L, d b) := hsum_edges.trans hsplit.symm + _ ≤ (H.card : ℝ) * (V * n) + (V * n) * c := add_le_add hhigh hlow + have hHcard : c ≤ (H.card : ℝ) := by + apply (mul_le_mul_iff_left₀ hVn).mp + nlinarith only [htotal, htwice] + have hH : H.Nonempty := + Finset.card_pos.mp (Nat.cast_pos.mp (hc.trans_le hHcard)) + have hbadcard : ((badPairs A B G t).card : ℝ) ≤ (A.card : ℝ) ^ 2 := by + have hnat : (badPairs A B G t).card ≤ A.card * A.card := by + calc + (badPairs A B G t).card ≤ (A ×ˢ A).card := + Finset.card_le_card (Finset.filter_subset _ _) + _ = A.card * A.card := Finset.card_product A A + exact_mod_cast (show (badPairs A B G t).card ≤ A.card ^ 2 by + simpa only [pow_two] using hnat) + have hcount : + (∑ b ∈ B, ((localBad A B G t b).card : ℝ)) = + ∑ p ∈ badPairs A B G t, ((commonNeighbors B G p.1 p.2).card : ℝ) := by + simpa only [Nat.cast_sum] using + congrArg (fun k : ℕ => (k : ℝ)) (sum_localBad_card_eq_sum_common A B G t) + have hbad : (∑ b ∈ B, ((localBad A B G t b).card : ℝ)) ≤ c * U := by + calc + (∑ b ∈ B, ((localBad A B G t b).card : ℝ)) = + ∑ p ∈ badPairs A B G t, ((commonNeighbors B G p.1 p.2).card : ℝ) := hcount + _ ≤ ((badPairs A B G t).card : ℝ) * t := by + simpa only [nsmul_eq_mul] using + Finset.sum_le_card_nsmul (badPairs A B G t) + (fun p => ((commonNeighbors B G p.1 p.2).card : ℝ)) t + (fun p hp => (Finset.mem_filter.mp hp).2.le) + _ ≤ (A.card : ℝ) ^ 2 * t := mul_le_mul_of_nonneg_right hbadcard ht + _ ≤ (V * n) ^ 2 * t := mul_le_mul_of_nonneg_right + (pow_le_pow_left₀ (Nat.cast_nonneg _) hA 2) ht + _ = c * U := havg + have hsmall : (∑ b ∈ H, ((localBad A B G t b).card : ℝ)) ≤ (H.card : ℝ) * U := by + calc + (∑ b ∈ H, ((localBad A B G t b).card : ℝ)) ≤ + ∑ b ∈ B, ((localBad A B G t b).card : ℝ) := + Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) + (fun b _ _ => Nat.cast_nonneg _) + _ ≤ c * U := hbad + _ ≤ (H.card : ℝ) * U := mul_le_mul_of_nonneg_right hHcard hU + obtain ⟨b, hb, hlocal⟩ := Finset.exists_le_of_sum_le + (s := H) (f := fun b => ((localBad A B G t b).card : ℝ)) + (g := fun _ => U) hH + (by simpa only [Finset.sum_const, nsmul_eq_mul] using hsmall) + have hbB : b ∈ B := (Finset.mem_filter.mp hb).1 + have hcb : c ≤ d b := (Finset.mem_filter.mp hb).2 + have hsquare : c ^ 2 ≤ (d b) ^ 2 := pow_le_pow_left₀ hc.le hcb 2 + have hbound : U ≤ (d b) ^ 2 / 16 := by + nlinarith only [hscale, hsquare, sq_nonneg (d b)] + refine ⟨b, hbB, hcb, ?_⟩ + change ((badPairs (neighbors A G b) B G t).card : ℝ) ≤ (d b) ^ 2 / 16 + rw [← localBad_eq_badPairs_neighbors A B G t b] + exact hlocal.trans hbound + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/ExtractedContradiction.lean b/lean/OAI/Combinatorics/Ryser/Incidence/ExtractedContradiction.lean new file mode 100644 index 0000000000000000000000000000000000000000..a54cddc48af78b32134ff83612196e6e0668da2b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/ExtractedContradiction.lean @@ -0,0 +1,76 @@ +import OAI.Combinatorics.Ryser.Incidence.NoApproximateSubfield +import Mathlib.Tactic.Ring +import Mathlib.Tactic.Positivity + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence + +theorem extracted_card_constraints + (q r V K s : ℝ) (hq : 0 < q) (hr : 0 < r) (hrq : r ^ 2 = q) + (hV : 0 < V) (hK : 0 ≤ K) + (hlo : 3 * r / (8 * V ^ 2) ≤ s) (hhi : s ≤ V * r) + (hfirst : 32 * V ^ 2 * K ^ 127942 < 3 * r) + (hsecond : 4096 * V ^ 6 * K ^ 3 < 27 * r) + (hthird : 2 * K ^ 527 * V ≤ r) : + 4 * K ^ 127942 < s ∧ 8 * K ^ 3 * q < s ^ 3 ∧ + 2 * K ^ 527 * s ≤ q := by + let _ := hq + have hden : 0 < 8 * V ^ 2 := by positivity + have hlo' : 3 * r ≤ s * (8 * V ^ 2) := (div_le_iff₀ hden).mp hlo + have hlarge : 4 * K ^ 127942 < s := by + apply lt_of_lt_of_le _ hlo + apply (lt_div_iff₀ hden).mpr + have heq : 4 * K ^ 127942 * (8 * V ^ 2) = 32 * V ^ 2 * K ^ 127942 := by ring + rw [heq] + exact hfirst + have hfactor : 0 < 512 * V ^ 6 := by positivity + have hcubic : 8 * K ^ 3 * q < s ^ 3 := by + apply (mul_lt_mul_iff_left₀ hfactor).mp + calc + (8 * K ^ 3 * q) * (512 * V ^ 6) < 27 * r ^ 3 := by + rw [← hrq] + calc + (8 * K ^ 3 * r ^ 2) * (512 * V ^ 6) = + (4096 * V ^ 6 * K ^ 3) * r ^ 2 := by ring + _ < (27 * r) * r ^ 2 := mul_lt_mul_of_pos_right hsecond (pow_pos hr 2) + _ = 27 * r ^ 3 := by ring + _ = (3 * r) ^ 3 := by ring + _ ≤ (s * (8 * V ^ 2)) ^ 3 := + pow_le_pow_left₀ (by positivity : (0 : ℝ) ≤ 3 * r) hlo' 3 + _ = s ^ 3 * (512 * V ^ 6) := by ring + refine ⟨hlarge, hcubic, ?_⟩ + calc + 2 * K ^ 527 * s ≤ 2 * K ^ 527 * (V * r) := + mul_le_mul_of_nonneg_left hhi (by positivity) + _ = (2 * K ^ 527 * V) * r := by ring + _ ≤ r * r := mul_le_mul_of_nonneg_right hthird hr.le + _ = q := by rw [← pow_two, hrq] + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] +open scoped Pointwise + +theorem extracted_set_contradiction + (S : Finset F) (r V K : ℝ) (hzero : (0 : F) ∉ S) + (hK : 2 ≤ K) (hV : 0 < V) (hr : 0 < r) + (hrq : r ^ 2 = (Fintype.card F : ℝ)) + (hsub : ((S - S).card : ℝ) ≤ K * S.card) + (hdiv : ((S / S).card : ℝ) ≤ K * S.card) + (hproper : ∀ L : Subfield F, L ≠ ⊤ → + (Nat.card L : ℝ) ^ 3 ≤ (Fintype.card F : ℝ)) + (hlo : 3 * r / (8 * V ^ 2) ≤ (S.card : ℝ)) + (hhi : (S.card : ℝ) ≤ V * r) + (hfirst : 32 * V ^ 2 * K ^ 127942 < 3 * r) + (hsecond : 4096 * V ^ 6 * K ^ 3 < 27 * r) + (hthird : 2 * K ^ 527 * V ≤ r) : False := by + have hq : (0 : ℝ) < Fintype.card F := Nat.cast_pos.mpr Fintype.card_pos + have hK0 : 0 ≤ K := le_trans (by norm_num) hK + obtain ⟨hlarge, hcubic, hupper⟩ := extracted_card_constraints + (Fintype.card F) r V K S.card hq hr hrq hV hK0 hlo hhi hfirst hsecond hthird + rcases no_approximate_subfield_finite S K hzero hK hsub hdiv hproper hlarge with h | h + · exact (not_le_of_gt hcubic) h + · exact (not_lt_of_ge hupper) h + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/FiniteSetCovering.lean b/lean/OAI/Combinatorics/Ryser/Incidence/FiniteSetCovering.lean new file mode 100644 index 0000000000000000000000000000000000000000..e6cf5695411ed353ded4086a1bc1268ecf5af71d --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/FiniteSetCovering.lean @@ -0,0 +1,25 @@ +import Mathlib.Combinatorics.Additive.RuzsaCovering + +import Mathlib.Algebra.Group.Pointwise.Finset.Basic +import Mathlib.Basic.Real.Basic +import Mathlib.Data.Finset.Powerset +import Mathlib.Order.Preorder.Finite +import Mathlib.Data.Set.Pairwise.Basic +import Mathlib.Tactic.NormNum + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence.FiniteSetEstimates + +open scoped Pointwise + +variable {F : Type*} [AddCommGroup F] [DecidableEq F] + +theorem covering_add (A B : Finset F) (hB : B.Nonempty) {K : ℝ} + (hK : ((A + B).card : ℝ) ≤ K * (B.card : ℝ)) : + ∃ T ⊆ A, (T.card : ℝ) ≤ K ∧ A ⊆ T + (B - B) := by + exact Finset.ruzsa_covering_add hB hK + +end RyserCoveringCounterexample.Incidence.FiniteSetEstimates + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/FiniteSetEstimates.lean b/lean/OAI/Combinatorics/Ryser/Incidence/FiniteSetEstimates.lean new file mode 100644 index 0000000000000000000000000000000000000000..b4e7579703a7fcce9db868c43002ddb3b9a88559 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/FiniteSetEstimates.lean @@ -0,0 +1,73 @@ +module +public import Mathlib.Combinatorics.Additive.PluenneckeRuzsa + +public import Mathlib.Algebra.Order.Field.Rat +public import Mathlib.Combinatorics.Enumerative.DoubleCounting +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring +public import Mathlib.Algebra.Group.Pointwise.Finset.Basic +import all Mathlib.Combinatorics.Additive.PluenneckeRuzsa + +namespace OAI + +public section + +namespace RyserCoveringCounterexample.Incidence.FiniteSetEstimates + +open Finset Nat +open scoped Pointwise + +variable {G : Type*} [DecidableEq G] + +section Group +variable [Group G] {A B C : Finset G} + +@[to_additive ] +theorem ruzsa_triangle_inequality_div_div_div (A B C : Finset G) : + #(A / C) * #B ≤ #(A / B) * #(C / B) := by + exact Finset.ruzsa_triangle_inequality_div_div_div A B C + +@[to_additive ] +theorem ruzsa_triangle_inequality_div_mul_mul (A B C : Finset G) : + #(A / C) * #B ≤ #(A * B) * #(C * B) := by + exact Finset.ruzsa_triangle_inequality_div_mul_mul A B C + +@[to_additive] +theorem pluennecke_petridis_inequality_mul (C : Finset G) + (hA : ∀ A' ⊆ A, #(A * B) * #A' ≤ #(A' * B) * #A) : + #(C * A * B) * #A ≤ #(A * B) * #(C * A) := by + exact Finset.pluennecke_petridis_inequality_mul C hA + +end Group + +variable [CommGroup G] {A B C : Finset G} + +@[to_additive] +private theorem mul_aux (hA : A.Nonempty) (hAB : A ⊆ B) + (h : ∀ A' ∈ B.powerset.erase ∅, (#(A * C) : ℚ≥0) / #A ≤ #(A' * C) / #A') : + ∀ A' ⊆ A, #(A * C) * #A' ≤ #(A' * C) * #A := by + exact Finset.mul_aux hA hAB h + +@[to_additive] +private lemma card_mul_pow_le (hAB : ∀ A' ⊆ A, #(A * B) * #A' ≤ #(A' * B) * #A) (n : ℕ) : + #(A * B ^ n) ≤ (#(A * B) / #A : ℚ≥0) ^ n * #A := by + exact Finset.card_mul_pow_le hAB n + +@[to_additive + ] +theorem pluennecke_ruzsa_inequality_pow_div_pow_mul (hA : A.Nonempty) (B : Finset G) (m n : ℕ) : + #(B ^ m / B ^ n) ≤ (#(A * B) / #A : ℚ≥0) ^ (m + n) * #A := by + exact Finset.pluennecke_ruzsa_inequality_pow_div_pow_mul hA B m n + +@[to_additive ] +theorem pluennecke_ruzsa_inequality_pow_div_pow_div (hA : A.Nonempty) (B : Finset G) (m n : ℕ) : + #(B ^ m / B ^ n) ≤ (#(A / B) / #A : ℚ≥0) ^ (m + n) * #A := by + exact Finset.pluennecke_ruzsa_inequality_pow_div_pow_div hA B m n + +end RyserCoveringCounterexample.Incidence.FiniteSetEstimates + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/FiniteSets.lean b/lean/OAI/Combinatorics/Ryser/Incidence/FiniteSets.lean new file mode 100644 index 0000000000000000000000000000000000000000..5c889536675650b6db88d79649bae06deeedd2b9 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/FiniteSets.lean @@ -0,0 +1,52 @@ +import OAI.Combinatorics.Ryser.Incidence.FiniteSetCovering +import OAI.Combinatorics.Ryser.Incidence.FiniteSetEstimates +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Data.Rat.Cast.Lemmas + +namespace OAI + +open scoped Pointwise + +namespace RyserCoveringCounterexample.Incidence + +variable {F : Type*} [AddCommGroup F] [DecidableEq F] + +theorem card_sub_swap (X Y : Finset F) : (X - Y).card = (Y - X).card := by + calc + (X - Y).card = (-(X - Y)).card := (Finset.card_neg _).symm + _ = (Y - X).card := by rw [neg_sub] + +theorem triangle_card_le (X Y Z : Finset F) : + (X - Y).card * Z.card ≤ (X - Z).card * (Z - Y).card := by + simpa only [card_sub_swap Y Z] using + FiniteSetEstimates.ruzsa_triangle_inequality_sub_sub_sub X Z Y + +theorem covering_sub (X Y : Finset F) (hY : Y.Nonempty) {M : ℝ} + (hM : ((X - Y).card : ℝ) ≤ M * Y.card) : + ∃ T ⊆ X, (T.card : ℝ) ≤ M ∧ X ⊆ T + (Y - Y) := by + obtain ⟨T, hTX, hT, hcover⟩ := + FiniteSetEstimates.covering_add X (-Y) hY.neg + (by simpa only [Finset.card_neg, sub_eq_add_neg] using hM) + exact ⟨T, hTX, hT, by simpa only [neg_sub_neg] using hcover⟩ + +theorem multiple_sum_sub_card_le (Y : Finset F) (hY : Y.Nonempty) {M : ℝ} + (hM : ((Y - Y).card : ℝ) ≤ M * Y.card) (u v : ℕ) : + ((u • Y - v • Y).card : ℝ) ≤ M ^ (u + v) * Y.card := by + have hNN := FiniteSetEstimates.pluennecke_ruzsa_inequality_nsmul_sub_nsmul_sub + (A := Y) hY Y u v + have hRat : ((u • Y - v • Y).card : ℚ) ≤ + (((Y - Y).card : ℚ) / Y.card) ^ (u + v) * Y.card := by + exact_mod_cast hNN + have hReal : ((u • Y - v • Y).card : ℝ) ≤ + (((Y - Y).card : ℝ) / Y.card) ^ (u + v) * Y.card := by + have hcast := (Rat.cast_le (K := ℝ)).2 hRat + simpa only [Rat.cast_natCast, Rat.cast_mul, Rat.cast_pow, Rat.cast_div] using hcast + have hy : (0 : ℝ) < Y.card := Nat.cast_pos.mpr hY.card_pos + have hr : ((Y - Y).card : ℝ) / Y.card ≤ M := (div_le_iff₀ hy).2 hM + exact hReal.trans (mul_le_mul_of_nonneg_right + (pow_le_pow_left₀ (div_nonneg (Nat.cast_nonneg _) hy.le) hr (u + v)) + (Nat.cast_nonneg _)) + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/FourAnchors.lean b/lean/OAI/Combinatorics/Ryser/Incidence/FourAnchors.lean new file mode 100644 index 0000000000000000000000000000000000000000..9948af19feda6611a1486bfa9ba98f36322d662b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/FourAnchors.lean @@ -0,0 +1,175 @@ +import OAI.Combinatorics.Ryser.Incidence.FourAnchorsGeometry +import OAI.Combinatorics.Ryser.Incidence.FourAnchorsLocal +import OAI.Combinatorics.Ryser.Incidence.FourAnchorsNumerics +import Mathlib.Data.Finset.Max +import Mathlib.Analysis.Real.Sqrt + +namespace OAI + +noncomputable section + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Incidence + +attribute [local instance] Classical.propDecidable + +variable {F : Type*} [Field F] [DecidableEq F] + +theorem fourAnchors_of_pruned_r + (P : Finset (ProjectivePoint F)) (L : Finset (ProjectiveLine F)) + {r U : ℝ} (hr : 0 < r) (hU : 2 ≤ U) (hrlarge : 4096 * U ^ 7 ≤ r) + (hPlo : r ^ 2 / (32 * U ^ 4) ≤ (P.card : ℝ)) + (hPup : (P.card : ℝ) ≤ U * r ^ 2) + (hLup : (L.card : ℝ) ≤ U * r ^ 2) + (hpoints : ∀ p ∈ P, r / (8 * U ^ 2) ≤ + ((L.filter fun l => ProjectiveIncidence p l).card : ℝ)) + (hlines : ∀ l ∈ L, r / (8 * U ^ 2) ≤ + ((P.filter fun p => ProjectiveIncidence p l).card : ℝ)) + (hcap : ∀ l ∈ L, ((P.filter fun p => ProjectiveIncidence p l).card : ℝ) ≤ + 16 * U ^ 3 * r) : + ∃ c ∈ anchorConfigurations ProjectiveIncidence P L, + r ^ 2 / (9 * 2 ^ 57 * U ^ 39) ≤ + ((anchorWitnesses ProjectiveIncidence P L c).card : ℝ) := by + classical + have hUpos : 0 < U := by linarith + let d : ℝ := r / (8 * U ^ 2) + let extra : ℝ := r ^ 2 / (256 * U ^ 4) + let T0 : ℝ := r ^ 5 / (9 * 2 ^ 32 * U ^ 20) + have hd : 1 ≤ d := by + have := fourAnchors_degree_lower hr hU hrlarge + dsimp [d] + linarith + have hextra : 0 ≤ extra := by dsimp [extra]; positivity + have hlocal (x : ProjectivePoint F) (hx : x ∈ P) : + extra * T0 ≤ + ((anchorConfigurations ProjectiveIncidence + (joinedNeighbors ProjectiveIncidence P L x) L).card : ℝ) := by + let N := joinedNeighbors ProjectiveIncidence P L x + have hNP : N ⊆ P := by + intro p hp + simp only [N, joinedNeighbors, Finset.mem_filter] at hp + exact hp.1 + have hN : r ^ 2 / (128 * U ^ 4) ≤ (N.card : ℝ) := + (fourAnchors_pair_lower hr hU hrlarge).trans + (projective_joinedNeighbors_card_lower P L x hx hd (hpoints x hx) hlines) + have hdegree : ∀ p ∈ N, d ≤ + ((L.filter fun l => ProjectiveIncidence p l).card : ℝ) := + fun p hp => hpoints p (hNP hp) + have hsurplus : 0 ≤ d * (N.card : ℝ) - 2 * (U * r ^ 2) := by + have h := fourAnchors_surplus_lower hr hU hrlarge hN + have hnon : 0 ≤ r ^ 3 / (2048 * U ^ 6) := by positivity + exact hnon.trans h + have hbase : 0 ≤ d * (N.card : ℝ) - 2 * (L.card : ℝ) := by + linarith + have htriples : (2 / 9 : ℝ) * (d * (N.card : ℝ) - 2 * (L.card : ℝ)) ^ 3 ≤ + (L.card : ℝ) ^ 2 * + ∑ l ∈ L, ((orderedTriples (N.filter fun p => ProjectiveIncidence p l)).card : ℝ) := by + convert triple_sum_lower_bound ProjectiveIncidence N L d + (by + intro p hp + convert hdegree p hp using 1; congr) hbase using 1; congr; funext l; congr + have hcomparison : d * (N.card : ℝ) - 2 * (U * r ^ 2) ≤ + d * (N.card : ℝ) - 2 * (L.card : ℝ) := by linarith + have hcount : (2 / 9 : ℝ) * (d * (N.card : ℝ) - 2 * (U * r ^ 2)) ^ 3 ≤ + (L.card : ℝ) ^ 2 * + ∑ l ∈ L, ((orderedTriples (N.filter fun p => ProjectiveIncidence p l)).card : ℝ) := by + exact (mul_le_mul_of_nonneg_left + (pow_le_pow_left₀ hsurplus hcomparison 3) (by norm_num)).trans htriples + have hT : T0 ≤ + ∑ l ∈ L, ((orderedTriples (N.filter fun p => ProjectiveIncidence p l)).card : ℝ) := + fourAnchors_count_lower hr hU hrlarge hN (Nat.cast_nonneg _) hLup + (Finset.sum_nonneg fun _ _ => Nat.cast_nonneg _) hcount + have hoff : ∀ l ∈ L, + extra ≤ ((N.filter fun p => ¬ ProjectiveIncidence p l).card : ℝ) := by + intro l hl + have htrace : ((N.filter fun p => ProjectiveIncidence p l).card : ℝ) ≤ + 16 * U ^ 3 * r := by + apply le_trans _ (hcap l hl) + exact_mod_cast Finset.card_le_card (Finset.filter_subset_filter (fun p => ProjectiveIncidence p l) hNP) + have hpartition := Finset.card_filter_add_card_filter_not + (s := N) (fun p => ProjectiveIncidence p l) + have hpartition' : ((N.filter fun p => ProjectiveIncidence p l).card : ℝ) + + ((N.filter fun p => ¬ ProjectiveIncidence p l).card : ℝ) = (N.card : ℝ) := by + exact_mod_cast hpartition + have hmargin := fourAnchors_margin_lower hr hU hrlarge + dsimp [extra] + linarith + have hConfig : extra * + (∑ l ∈ L, ((orderedTriples (N.filter fun p => ProjectiveIncidence p l)).card : ℝ)) ≤ + ((anchorConfigurations ProjectiveIncidence N L).card : ℝ) := by + convert anchorConfigurations_card_lower ProjectiveIncidence N L extra hextra + (by + intro l hl + convert hoff l hl using 1; congr) using 1; congr; funext l; congr + exact (mul_le_mul_of_nonneg_left hT hextra).trans hConfig + let total : ℝ := ∑ x ∈ P, + ((anchorConfigurations ProjectiveIncidence + (joinedNeighbors ProjectiveIncidence P L x) L).card : ℝ) + have hTotal : r ^ 9 / (9 * 2 ^ 45 * U ^ 28) ≤ total := by + apply fourAnchors_total_lower hr hU hPlo (le_refl extra) (le_refl T0) + calc + (P.card : ℝ) * extra * T0 = ∑ _x ∈ P, (extra * T0) := by + simp only [Finset.sum_const, nsmul_eq_mul] + ring + _ ≤ total := Finset.sum_le_sum hlocal + let C := anchorConfigurations ProjectiveIncidence P L + have hExchange : total = + ∑ c ∈ C, ((anchorWitnesses ProjectiveIncidence P L c).card : ℝ) := by + dsimp [total, C] + exact_mod_cast sum_card_anchorConfigurations_neighbors ProjectiveIncidence P L + have hC : C.Nonempty := by + by_contra h + have hEmpty : C = ∅ := Finset.not_nonempty_iff_eq_empty.mp h + rw [hEmpty] at hExchange + simp only [Finset.sum_empty] at hExchange + have hpos : 0 < r ^ 9 / (9 * 2 ^ 45 * U ^ 28) := by positivity + linarith + obtain ⟨c, hc, hmax⟩ := Finset.exists_max_image C + (fun c => ((anchorWitnesses ProjectiveIncidence P L c).card : ℝ)) hC + refine ⟨c, hc, ?_⟩ + apply fourAnchors_average_lower hr hU hTotal + · exact (anchorConfigurations_card_upper ProjectiveIncidence P L + (16 * U ^ 3 * r) (by positivity) + (by + intro l hl + convert hcap l hl using 1; congr)).trans + (fourAnchors_candidate_upper hr hU (Nat.cast_nonneg _) hLup + (Nat.cast_nonneg _) hPup) + · exact Nat.cast_nonneg _ + · rw [hExchange] + calc + (∑ c' ∈ C, ((anchorWitnesses ProjectiveIncidence P L c').card : ℝ)) ≤ + ∑ _c' ∈ C, ((anchorWitnesses ProjectiveIncidence P L c).card : ℝ) := + Finset.sum_le_sum fun c' hc' => hmax c' hc' + _ = (C.card : ℝ) * ((anchorWitnesses ProjectiveIncidence P L c).card : ℝ) := by + simp only [Finset.sum_const, nsmul_eq_mul] + +theorem fourAnchors_of_pruned + (P : Finset (ProjectivePoint F)) (L : Finset (ProjectiveLine F)) + {q U : ℝ} (hq : 0 < q) (hU : 2 ≤ U) + (hlarge : 4096 * U ^ 7 ≤ Real.sqrt q) + (hPlo : q / (32 * U ^ 4) ≤ (P.card : ℝ)) + (hPup : (P.card : ℝ) ≤ U * q) + (hLup : (L.card : ℝ) ≤ U * q) + (hpoints : ∀ p ∈ P, Real.sqrt q / (8 * U ^ 2) ≤ + ((L.filter fun l => ProjectiveIncidence p l).card : ℝ)) + (hlines : ∀ l ∈ L, Real.sqrt q / (8 * U ^ 2) ≤ + ((P.filter fun p => ProjectiveIncidence p l).card : ℝ)) + (hcap : ∀ l ∈ L, ((P.filter fun p => ProjectiveIncidence p l).card : ℝ) ≤ + 16 * U ^ 3 * Real.sqrt q) : + ∃ c ∈ anchorConfigurations ProjectiveIncidence P L, + q / (9 * 2 ^ 57 * U ^ 39) ≤ + ((anchorWitnesses ProjectiveIncidence P L c).card : ℝ) := by + have hsqrt : (Real.sqrt q) ^ 2 = q := Real.sq_sqrt hq.le + simpa only [hsqrt] using fourAnchors_of_pruned_r P L + (Real.sqrt_pos.2 hq) hU hlarge + (by simpa only [hsqrt] using hPlo) + (by simpa only [hsqrt] using hPup) + (by simpa only [hsqrt] using hLup) hpoints hlines hcap + +end RyserCoveringCounterexample.Incidence + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/FourAnchorsCounting.lean b/lean/OAI/Combinatorics/Ryser/Incidence/FourAnchorsCounting.lean new file mode 100644 index 0000000000000000000000000000000000000000..65673c2a08873788884160a37afc69caa9217d4b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/FourAnchorsCounting.lean @@ -0,0 +1,193 @@ +import Mathlib.Algebra.BigOperators.Group.Finset.Sigma +import Mathlib.Algebra.BigOperators.Ring.Finset +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Data.Finset.Prod +import Mathlib.Data.Finset.Sigma +import Mathlib.Basic.Real.Basic +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring +import Lean.Elab.Tactic.Omega + +namespace OAI + +noncomputable section + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Incidence +attribute [local instance] Classical.propDecidable + +variable {Pt Ln : Type*} [DecidableEq Pt] [instDecidableEqLn : DecidableEq Ln] + +def orderedTriples (P : Finset Pt) : Finset (Σ _ : Pt, Σ _ : Pt, Pt) := + P.sigma fun a => (P.erase a).sigma fun b => (P.erase a).erase b + +@[simp] theorem mem_orderedTriples {P : Finset Pt} {t : Σ _ : Pt, Σ _ : Pt, Pt} : + t ∈ orderedTriples P ↔ t.1 ∈ P ∧ t.2.1 ∈ P ∧ t.2.2 ∈ P ∧ + t.2.1 ≠ t.1 ∧ t.2.2 ≠ t.1 ∧ t.2.2 ≠ t.2.1 := by + simp only [orderedTriples, Finset.mem_sigma, Finset.mem_erase] + simp only [and_assoc, and_left_comm, and_comm] + +theorem orderedTriples_mono {P Q : Finset Pt} (hPQ : P ⊆ Q) : + orderedTriples P ⊆ orderedTriples Q := by + intro t ht + obtain ⟨ha, hb, hc, hab, hac, hbc⟩ := mem_orderedTriples.mp ht + exact mem_orderedTriples.mpr ⟨hPQ ha, hPQ hb, hPQ hc, hab, hac, hbc⟩ + +theorem card_orderedTriples (P : Finset Pt) : + (orderedTriples P).card = P.card * (P.card - 1) * (P.card - 2) := by + simp only [orderedTriples, Finset.card_sigma] + calc + (∑ a ∈ P, ∑ b ∈ P.erase a, ((P.erase a).erase b).card) = + ∑ a ∈ P, ((P.card - 1) * (P.card - 2)) := by + apply Finset.sum_congr rfl + intro a ha + have hca := Finset.card_erase_of_mem ha + calc + (∑ b ∈ P.erase a, ((P.erase a).erase b).card) = + ∑ b ∈ P.erase a, (P.card - 2) := by + apply Finset.sum_congr rfl + intro b hb + rw [Finset.card_erase_of_mem hb, hca] + omega + _ = (P.card - 1) * (P.card - 2) := by + simp only [Finset.sum_const, Nat.nsmul_eq_mul, hca] + _ = P.card * (P.card - 1) * (P.card - 2) := by + simp only [Finset.sum_const, Nat.nsmul_eq_mul] + ring + +theorem card_orderedTriples_real (P : Finset Pt) : + ((orderedTriples P).card : ℝ) = + (P.card : ℝ) * ((P.card : ℝ) - 1) * ((P.card : ℝ) - 2) := by + rw [card_orderedTriples] + by_cases h : 2 ≤ P.card + · rw [Nat.cast_mul, Nat.cast_mul, + Nat.cast_sub (by omega : 1 ≤ P.card), Nat.cast_sub h] + norm_num + · have hcases : P.card = 0 ∨ P.card = 1 := by omega + rcases hcases with h | h <;> simp [h] + +theorem two_ninths_cube_le_orderedTriples (P : Finset Pt) (h : 3 ≤ P.card) : + (2 / 9 : ℝ) * (P.card : ℝ) ^ 3 ≤ ((orderedTriples P).card : ℝ) := by + rw [card_orderedTriples_real] + have ht : (3 : ℝ) ≤ P.card := by exact_mod_cast h + have hprod := mul_nonneg + (mul_nonneg (sub_nonneg.mpr ht) (by linarith : 0 ≤ 7 * (P.card : ℝ) - 6)) + (Nat.cast_nonneg (α := ℝ) P.card) + nlinarith + +theorem sum_cube_card_sq (I : Finset Ln) (f : Ln → ℝ) + (hf : ∀ i ∈ I, 0 ≤ f i) : + (∑ i ∈ I, f i) ^ 3 ≤ (I.card : ℝ) ^ 2 * ∑ i ∈ I, f i ^ 3 := let _ := instDecidableEqLn; by + by_cases hI : I.Nonempty + · let m : ℝ := I.card + let a : ℝ := (∑ i ∈ I, f i) / m + have hm : 0 < m := by + dsimp [m] + exact_mod_cast hI.card_pos + have ha : 0 ≤ a := div_nonneg (Finset.sum_nonneg hf) hm.le + have heq : m * a = ∑ i ∈ I, f i := by + dsimp [a] + exact mul_div_cancel₀ _ (ne_of_gt hm) + have hnon : 0 ≤ ∑ i ∈ I, (f i - a) ^ 2 * (f i + 2 * a) := + Finset.sum_nonneg fun i hi => mul_nonneg (sq_nonneg _) (by linarith [hf i hi]) + have hexpand : (∑ i ∈ I, (f i - a) ^ 2 * (f i + 2 * a)) = + (∑ i ∈ I, f i ^ 3) - 3 * a ^ 2 * (∑ i ∈ I, f i) + 2 * m * a ^ 3 := by + calc + _ = ∑ i ∈ I, (f i ^ 3 - 3 * a ^ 2 * f i + 2 * a ^ 3) := by + apply Finset.sum_congr rfl + intro i hi + ring + _ = _ := by + simp only [Finset.sum_add_distrib, Finset.sum_sub_distrib, + Finset.mul_sum, Finset.sum_const, nsmul_eq_mul] + dsimp [m] + ring + rw [hexpand] at hnon + have hc : m * a ^ 3 ≤ ∑ i ∈ I, f i ^ 3 := by + nlinarith [congrArg (fun z : ℝ => z * a ^ 2) heq] + have hmul := mul_le_mul_of_nonneg_left hc (sq_nonneg m) + have hcube := congrArg (fun z : ℝ => z ^ 3) heq + change (∑ i ∈ I, f i) ^ 3 ≤ m ^ 2 * ∑ i ∈ I, f i ^ 3 + nlinarith + · have : I = ∅ := Finset.not_nonempty_iff_eq_empty.mp hI + simp [this] + +def joinedNeighbors (R : Pt → Ln → Prop) (P : Finset Pt) (L : Finset Ln) + (x : Pt) : Finset Pt := by + classical + exact P.filter fun p => x ≠ p ∧ ∃ l ∈ L, R x l ∧ R p l + +def anchorConfigurations (R : Pt → Ln → Prop) (P : Finset Pt) (L : Finset Ln) : + Finset (Σ _ : Ln, (Σ _ : Pt, Σ _ : Pt, Pt) × Pt) := by + classical + exact L.sigma fun l => + orderedTriples (P.filter fun p => R p l) ×ˢ (P.filter fun p => ¬ R p l) + +def anchorWitnesses (R : Pt → Ln → Prop) (P : Finset Pt) (L : Finset Ln) + (c : Σ _ : Ln, (Σ _ : Pt, Σ _ : Pt, Pt) × Pt) : Finset Pt := by + classical + exact P.filter fun x => + c.2.1.1 ∈ joinedNeighbors R P L x ∧ + c.2.1.2.1 ∈ joinedNeighbors R P L x ∧ + c.2.1.2.2 ∈ joinedNeighbors R P L x ∧ + c.2.2 ∈ joinedNeighbors R P L x + +@[simp] theorem mem_anchorConfigurations (R : Pt → Ln → Prop) + (P : Finset Pt) (L : Finset Ln) + (c : Σ _ : Ln, (Σ _ : Pt, Σ _ : Pt, Pt) × Pt) : + c ∈ anchorConfigurations R P L ↔ c.1 ∈ L ∧ + c.2.1.1 ∈ P ∧ c.2.1.2.1 ∈ P ∧ c.2.1.2.2 ∈ P ∧ c.2.2 ∈ P ∧ + R c.2.1.1 c.1 ∧ R c.2.1.2.1 c.1 ∧ R c.2.1.2.2 c.1 ∧ ¬ R c.2.2 c.1 ∧ + c.2.1.2.1 ≠ c.2.1.1 ∧ c.2.1.2.2 ≠ c.2.1.1 ∧ + c.2.1.2.2 ≠ c.2.1.2.1 := let _ := instDecidableEqLn; by + classical + simp only [anchorConfigurations, Finset.mem_sigma, Finset.mem_product, + mem_orderedTriples, Finset.mem_filter] + simp only [and_assoc, and_left_comm, and_comm] + +theorem anchorConfigurations_mono (R : Pt → Ln → Prop) {P Q : Finset Pt} + (hPQ : P ⊆ Q) (L : Finset Ln) : + anchorConfigurations R P L ⊆ anchorConfigurations R Q L := by + intro c hc + obtain ⟨hl, h1, h2, h3, h4, hrest⟩ := (mem_anchorConfigurations R P L c).mp hc + exact (mem_anchorConfigurations R Q L c).mpr + ⟨hl, hPQ h1, hPQ h2, hPQ h3, hPQ h4, hrest⟩ + +theorem card_anchorConfigurations (R : Pt → Ln → Prop) (P : Finset Pt) + (L : Finset Ln) : + (anchorConfigurations R P L).card = + ∑ l ∈ L, (orderedTriples (P.filter fun p => R p l)).card * + (P.filter fun p => ¬ R p l).card := let _ := instDecidableEqLn; by + classical + simp only [anchorConfigurations, Finset.card_sigma, Finset.card_product] + +theorem sum_card_anchorConfigurations_neighbors (R : Pt → Ln → Prop) + (P : Finset Pt) (L : Finset Ln) : + (∑ x ∈ P, (anchorConfigurations R (joinedNeighbors R P L x) L).card) = + ∑ c ∈ anchorConfigurations R P L, (anchorWitnesses R P L c).card := by + classical + have heq (x : Pt) : anchorConfigurations R (joinedNeighbors R P L x) L = + (anchorConfigurations R P L).filter (fun c => + c.2.1.1 ∈ joinedNeighbors R P L x ∧ + c.2.1.2.1 ∈ joinedNeighbors R P L x ∧ + c.2.1.2.2 ∈ joinedNeighbors R P L x ∧ + c.2.2 ∈ joinedNeighbors R P L x) := by + ext c + have hsub : joinedNeighbors R P L x ⊆ P := Finset.filter_subset _ _ + simp only [mem_anchorConfigurations, Finset.mem_filter] + constructor + · rintro ⟨hl, h1, h2, h3, h4, hrest⟩ + exact ⟨⟨hl, hsub h1, hsub h2, hsub h3, hsub h4, hrest⟩, h1, h2, h3, h4⟩ + · rintro ⟨⟨hl, _, _, _, _, hrest⟩, h1, h2, h3, h4⟩ + exact ⟨hl, h1, h2, h3, h4, hrest⟩ + simp_rw [heq, anchorWitnesses, Finset.card_filter] + exact Finset.sum_comm + +end RyserCoveringCounterexample.Incidence + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/FourAnchorsGeometry.lean b/lean/OAI/Combinatorics/Ryser/Incidence/FourAnchorsGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..296b3f01dfbb0e1f25f580cbb8ea1e6adfb8fadb --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/FourAnchorsGeometry.lean @@ -0,0 +1,91 @@ +import OAI.Combinatorics.Ryser.Incidence.FourAnchorsCounting +import OAI.Combinatorics.Ryser.Geometry.ProjectiveJoins + +namespace OAI + +noncomputable section + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Incidence + +attribute [local instance] Classical.propDecidable + +variable {Pt Ln : Type*} [DecidableEq Pt] [instDecidableEqLn : DecidableEq Ln] + +theorem joinedNeighbors_card_lower (R : Pt → Ln → Prop) + (hunique : ∀ {x y : Pt} {l m : Ln}, x ≠ y → + R x l → R y l → R x m → R y m → l = m) + (P : Finset Pt) (L : Finset Ln) (x : Pt) (hx : x ∈ P) + {d : ℝ} (hd : 1 ≤ d) + (hpoint : d ≤ ((L.filter fun l => R x l).card : ℝ)) + (hlines : ∀ l ∈ L, d ≤ ((P.filter fun p => R p l).card : ℝ)) : + d * (d - 1) ≤ ((joinedNeighbors R P L x).card : ℝ) := let _ := instDecidableEqLn; by + classical + let I := L.filter fun l => R x l + let S := I.sigma fun l => (P.filter fun p => R p l).erase x + have hcard : S.card ≤ (joinedNeighbors R P L x).card := by + apply Finset.card_le_card_of_injOn (fun w : Σ _ : Ln, Pt => w.2) + · intro w hw + obtain ⟨hl, hp⟩ := Finset.mem_sigma.mp hw + obtain ⟨hyx, hy⟩ := Finset.mem_erase.mp hp + obtain ⟨hyP, hyl⟩ := Finset.mem_filter.mp hy + obtain ⟨hlL, hxl⟩ := Finset.mem_filter.mp hl + exact Finset.mem_filter.mpr ⟨hyP, Ne.symm hyx, w.1, hlL, hxl, hyl⟩ + · intro w hw v hv heq + obtain ⟨hl, hp⟩ := Finset.mem_sigma.mp hw + obtain ⟨hm, hq⟩ := Finset.mem_sigma.mp hv + obtain ⟨hyx, hy⟩ := Finset.mem_erase.mp hp + obtain ⟨_, hz⟩ := Finset.mem_erase.mp hq + have hlm : w.1 = v.1 := hunique (Ne.symm hyx) + (Finset.mem_filter.mp hl).2 (Finset.mem_filter.mp hy).2 + (Finset.mem_filter.mp hm).2 (by simpa only [heq] using (Finset.mem_filter.mp hz).2) + rcases w with ⟨l, y⟩ + rcases v with ⟨m, z⟩ + dsimp at hlm heq + subst m + subst z + rfl + have hS : (S.card : ℝ) = + ∑ l ∈ I, (((P.filter fun p => R p l).card : ℝ) - 1) := by + dsimp [S] + rw [Finset.card_sigma, Nat.cast_sum] + apply Finset.sum_congr rfl + intro l hl + have hxtrace : x ∈ P.filter fun p => R p l := + Finset.mem_filter.mpr ⟨hx, (Finset.mem_filter.mp hl).2⟩ + rw [Finset.card_erase_of_mem hxtrace, Nat.cast_sub + (Finset.one_le_card.mpr ⟨x, hxtrace⟩)] + norm_num + calc + d * (d - 1) ≤ (I.card : ℝ) * (d - 1) := + mul_le_mul_of_nonneg_right hpoint (by linarith) + _ = ∑ _l ∈ I, (d - 1) := by simp only [Finset.sum_const, nsmul_eq_mul] + _ ≤ ∑ l ∈ I, (((P.filter fun p => R p l).card : ℝ) - 1) := by + apply Finset.sum_le_sum + intro l hl + exact sub_le_sub_right (hlines l (Finset.mem_filter.mp hl).1) 1 + _ = (S.card : ℝ) := hS.symm + _ ≤ ((joinedNeighbors R P L x).card : ℝ) := by exact_mod_cast hcard + +theorem projective_joinedNeighbors_card_lower {F : Type*} [Field F] [DecidableEq F] + (P : Finset (ProjectivePoint F)) (L : Finset (ProjectiveLine F)) + (x : ProjectivePoint F) (hx : x ∈ P) + {d : ℝ} (hd : 1 ≤ d) + (hpoint : d ≤ ((L.filter fun l => ProjectiveIncidence x l).card : ℝ)) + (hlines : ∀ l ∈ L, + d ≤ ((P.filter fun p => ProjectiveIncidence p l).card : ℝ)) : + d * (d - 1) ≤ ((joinedNeighbors ProjectiveIncidence P L x).card : ℝ) := + joinedNeighbors_card_lower ProjectiveIncidence + (fun hxy hxl hyl hxm hym => eq_projectiveLine_of_common_incidence hxy hxl hyl hxm hym) + P L x hx hd + (by convert hpoint using 1; congr) + (by + intro l hl + convert hlines l hl using 1; congr) + +end RyserCoveringCounterexample.Incidence + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/FourAnchorsLocal.lean b/lean/OAI/Combinatorics/Ryser/Incidence/FourAnchorsLocal.lean new file mode 100644 index 0000000000000000000000000000000000000000..67fbb20c0c159798abf3321593f994c8db8afbf0 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/FourAnchorsLocal.lean @@ -0,0 +1,159 @@ +import OAI.Combinatorics.Ryser.Incidence.FourAnchorsCounting +import Mathlib.Algebra.BigOperators.Group.Finset.Piecewise +import Mathlib.Algebra.BigOperators.Ring.Finset + +namespace OAI + +noncomputable section + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Incidence + +attribute [local instance] Classical.propDecidable + +variable {Pt Ln : Type*} [instDecidableEqPt : DecidableEq Pt] [instDecidableEqLn : DecidableEq Ln] + +theorem sum_trace_card_eq_sum_selected_degree (R : Pt → Ln → Prop) + (N : Finset Pt) (L : Finset Ln) : + (∑ l ∈ L, ((N.filter fun p => R p l).card : ℝ)) = + ∑ p ∈ N, ((L.filter fun l => R p l).card : ℝ) := let _ := instDecidableEqPt; let _ := instDecidableEqLn; by + have h : (∑ l ∈ L, (N.filter fun p => R p l).card) = + ∑ p ∈ N, (L.filter fun l => R p l).card := by + simp only [Finset.card_filter] + exact Finset.sum_comm + exact_mod_cast h + +theorem sum_trace_card_ge_min_degree (R : Pt → Ln → Prop) + (N : Finset Pt) (L : Finset Ln) (d : ℝ) + (hdegree : ∀ p ∈ N, d ≤ ((L.filter fun l => R p l).card : ℝ)) : + d * (N.card : ℝ) ≤ ∑ l ∈ L, ((N.filter fun p => R p l).card : ℝ) := by + rw [sum_trace_card_eq_sum_selected_degree] + calc + d * (N.card : ℝ) = ∑ _p ∈ N, d := by + simp only [Finset.sum_const, nsmul_eq_mul] + ring + _ ≤ _ := Finset.sum_le_sum hdegree + +theorem sum_high_trace_ge_min_degree (R : Pt → Ln → Prop) + (N : Finset Pt) (L : Finset Ln) (d : ℝ) + (hdegree : ∀ p ∈ N, d ≤ ((L.filter fun l => R p l).card : ℝ)) : + d * (N.card : ℝ) - 2 * (L.card : ℝ) ≤ + ∑ l ∈ L, if 3 ≤ (N.filter fun p => R p l).card then + ((N.filter fun p => R p l).card : ℝ) else 0 := by + let f : Ln → ℝ := fun l => + if 3 ≤ (N.filter fun p => R p l).card then + ((N.filter fun p => R p l).card : ℝ) else 0 + have hpoint (l : Ln) : ((N.filter fun p => R p l).card : ℝ) ≤ f l + 2 := by + dsimp only [f] + split_ifs with h + · linarith + · have hsmall : (N.filter fun p => R p l).card ≤ 2 := by omega + have hsmall' : ((N.filter fun p => R p l).card : ℝ) ≤ 2 := by + exact_mod_cast hsmall + simpa only [zero_add] using hsmall' + have hsum := (sum_trace_card_ge_min_degree R N L d hdegree).trans + (Finset.sum_le_sum fun l _ => hpoint l) + have hadd : (∑ l ∈ L, (f l + 2)) = + (∑ l ∈ L, f l) + 2 * (L.card : ℝ) := by + simp only [Finset.sum_add_distrib, Finset.sum_const, nsmul_eq_mul] + ring + rw [hadd] at hsum + change d * (N.card : ℝ) - 2 * (L.card : ℝ) ≤ ∑ l ∈ L, f l + linarith + +theorem triple_sum_lower_bound (R : Pt → Ln → Prop) + (N : Finset Pt) (L : Finset Ln) (d : ℝ) + (hdegree : ∀ p ∈ N, d ≤ ((L.filter fun l => R p l).card : ℝ)) + (hbase : 0 ≤ d * (N.card : ℝ) - 2 * (L.card : ℝ)) : + (2 / 9 : ℝ) * (d * (N.card : ℝ) - 2 * (L.card : ℝ)) ^ 3 ≤ + (L.card : ℝ) ^ 2 * + ∑ l ∈ L, ((orderedTriples (N.filter fun p => R p l)).card : ℝ) := by + let f : Ln → ℝ := fun l => + if 3 ≤ (N.filter fun p => R p l).card then + ((N.filter fun p => R p l).card : ℝ) else 0 + have hf : ∀ l ∈ L, 0 ≤ f l := by + intro l _ + dsimp only [f] + split_ifs <;> positivity + have hhigh : d * (N.card : ℝ) - 2 * (L.card : ℝ) ≤ ∑ l ∈ L, f l := + sum_high_trace_ge_min_degree R N L d hdegree + have hcube := pow_le_pow_left₀ hbase hhigh 3 + have hmean := sum_cube_card_sq L f hf + have hpoint : ∀ l ∈ L, + (2 / 9 : ℝ) * f l ^ 3 ≤ + ((orderedTriples (N.filter fun p => R p l)).card : ℝ) := by + intro l _ + dsimp only [f] + split_ifs with h + · exact two_ninths_cube_le_orderedTriples _ h + · simp only [zero_pow (by decide : 3 ≠ 0), mul_zero] + exact Nat.cast_nonneg _ + have hsum : (2 / 9 : ℝ) * (∑ l ∈ L, f l ^ 3) ≤ + ∑ l ∈ L, ((orderedTriples (N.filter fun p => R p l)).card : ℝ) := by + rw [Finset.mul_sum] + exact Finset.sum_le_sum hpoint + calc + (2 / 9 : ℝ) * (d * (N.card : ℝ) - 2 * (L.card : ℝ)) ^ 3 ≤ + (2 / 9 : ℝ) * (∑ l ∈ L, f l) ^ 3 := + mul_le_mul_of_nonneg_left hcube (by norm_num) + _ ≤ (2 / 9 : ℝ) * ((L.card : ℝ) ^ 2 * ∑ l ∈ L, f l ^ 3) := + mul_le_mul_of_nonneg_left hmean (by norm_num) + _ = (L.card : ℝ) ^ 2 * ((2 / 9 : ℝ) * ∑ l ∈ L, f l ^ 3) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left hsum (sq_nonneg _) + +theorem anchorConfigurations_card_lower (R : Pt → Ln → Prop) + (N : Finset Pt) (L : Finset Ln) (extra : ℝ) (hextra : 0 ≤ extra) + (hoff : ∀ l ∈ L, extra ≤ ((N.filter fun p => ¬ R p l).card : ℝ)) : + extra * (∑ l ∈ L, ((orderedTriples (N.filter fun p => R p l)).card : ℝ)) ≤ + ((anchorConfigurations R N L).card : ℝ) := by + let _ := hextra + simp only [card_anchorConfigurations, Nat.cast_sum, Nat.cast_mul] + rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro l hl + calc + extra * ((orderedTriples (N.filter fun p => R p l)).card : ℝ) = + ((orderedTriples (N.filter fun p => R p l)).card : ℝ) * extra := mul_comm _ _ + _ ≤ _ := mul_le_mul_of_nonneg_left (hoff l hl) (Nat.cast_nonneg _) + +private theorem card_orderedTriples_le_card_cube (P : Finset Pt) : + (orderedTriples P).card ≤ P.card ^ 3 := by + rw [card_orderedTriples] + calc + P.card * (P.card - 1) * (P.card - 2) ≤ P.card * P.card * P.card := + Nat.mul_le_mul (Nat.mul_le_mul_left P.card (Nat.sub_le P.card 1)) + (Nat.sub_le P.card 2) + _ = P.card ^ 3 := by ring + +theorem anchorConfigurations_card_upper (R : Pt → Ln → Prop) + (P : Finset Pt) (L : Finset Ln) (H : ℝ) (hH : 0 ≤ H) + (hcap : ∀ l ∈ L, ((P.filter fun p => R p l).card : ℝ) ≤ H) : + ((anchorConfigurations R P L).card : ℝ) ≤ + (L.card : ℝ) * H ^ 3 * (P.card : ℝ) := by + have hterm (l : Ln) (hl : l ∈ L) : + ((orderedTriples (P.filter fun p => R p l)).card : ℝ) * + ((P.filter fun p => ¬ R p l).card : ℝ) ≤ H ^ 3 * (P.card : ℝ) := by + have ht : ((orderedTriples (P.filter fun p => R p l)).card : ℝ) ≤ + ((P.filter fun p => R p l).card : ℝ) ^ 3 := by + exact_mod_cast card_orderedTriples_le_card_cube (P.filter fun p => R p l) + have htH : ((orderedTriples (P.filter fun p => R p l)).card : ℝ) ≤ H ^ 3 := + ht.trans (pow_le_pow_left₀ (Nat.cast_nonneg _) (hcap l hl) 3) + have hoff : ((P.filter fun p => ¬ R p l).card : ℝ) ≤ (P.card : ℝ) := by + exact_mod_cast Finset.card_le_card (Finset.filter_subset (fun p => ¬ R p l) P) + exact mul_le_mul htH hoff (Nat.cast_nonneg _) (pow_nonneg hH 3) + calc + ((anchorConfigurations R P L).card : ℝ) = + ∑ l ∈ L, ((orderedTriples (P.filter fun p => R p l)).card : ℝ) * + ((P.filter fun p => ¬ R p l).card : ℝ) := by + simp only [card_anchorConfigurations, Nat.cast_sum, Nat.cast_mul] + _ ≤ ∑ _l ∈ L, H ^ 3 * (P.card : ℝ) := Finset.sum_le_sum hterm + _ = (L.card : ℝ) * H ^ 3 * (P.card : ℝ) := by + simp only [Finset.sum_const, nsmul_eq_mul] + ring + +end RyserCoveringCounterexample.Incidence + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/FourAnchorsNumerics.lean b/lean/OAI/Combinatorics/Ryser/Incidence/FourAnchorsNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..5315ac379835280a386f6a58ecb63630efd97f87 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/FourAnchorsNumerics.lean @@ -0,0 +1,170 @@ +import Mathlib.Basic.Real.Basic +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence + +theorem fourAnchors_degree_lower {r U : ℝ} (hr : 0 < r) (hU : 2 ≤ U) + (hrlarge : 4096 * U ^ 7 ≤ r) : + 2 ≤ r / (8 * U ^ 2) := by + let _ := hr + have hUpos : 0 < U := by linarith + have hUone : 1 ≤ U := by linarith + have hpow : U ^ 2 ≤ U ^ 7 := pow_le_pow_right₀ hUone (by norm_num) + apply (le_div_iff₀ (show 0 < 8 * U ^ 2 by positivity)).mpr + nlinarith only [hrlarge, hpow, sq_nonneg U] + +theorem fourAnchors_pair_lower {r U : ℝ} (hr : 0 < r) (hU : 2 ≤ U) + (hrlarge : 4096 * U ^ 7 ≤ r) : + r ^ 2 / (128 * U ^ 4) ≤ + (r / (8 * U ^ 2)) * (r / (8 * U ^ 2) - 1) := by + have hUpos : 0 < U := by linarith + have hUne : U ≠ 0 := ne_of_gt hUpos + let d : ℝ := r / (8 * U ^ 2) + have hd : 2 ≤ d := fourAnchors_degree_lower hr hU hrlarge + have hd0 : 0 ≤ d := by linarith + have hd2 : 0 ≤ d - 2 := by linarith + have hid : r ^ 2 / (128 * U ^ 4) = d ^ 2 / 2 := by + dsimp [d] + field_simp [hUne]; ring + change r ^ 2 / (128 * U ^ 4) ≤ d * (d - 1) + rw [hid] + nlinarith only [mul_nonneg hd0 hd2] + +theorem fourAnchors_surplus_lower {r U : ℝ} (hr : 0 < r) (hU : 2 ≤ U) + (hrlarge : 4096 * U ^ 7 ≤ r) {N : ℝ} + (hN : r ^ 2 / (128 * U ^ 4) ≤ N) : + r ^ 3 / (2048 * U ^ 6) ≤ + (r / (8 * U ^ 2)) * N - 2 * (U * r ^ 2) := by + have hUpos : 0 < U := by linarith + have hUne : U ≠ 0 := ne_of_gt hUpos + have hcost : 2 * (U * r ^ 2) ≤ r ^ 3 / (2048 * U ^ 6) := by + apply (le_div_iff₀ (show 0 < 2048 * U ^ 6 by positivity)).mpr + calc + 2 * (U * r ^ 2) * (2048 * U ^ 6) = (4096 * U ^ 7) * r ^ 2 := by ring + _ ≤ r * r ^ 2 := mul_le_mul_of_nonneg_right hrlarge (sq_nonneg r) + _ = r ^ 3 := by ring + have hmain : (r / (8 * U ^ 2)) * (r ^ 2 / (128 * U ^ 4)) ≤ + (r / (8 * U ^ 2)) * N := + mul_le_mul_of_nonneg_left hN (by positivity) + have hid : (r / (8 * U ^ 2)) * (r ^ 2 / (128 * U ^ 4)) = + 2 * (r ^ 3 / (2048 * U ^ 6)) := by + field_simp [hUne]; ring + nlinarith only [hcost, hmain, hid] + +theorem fourAnchors_margin_lower {r U : ℝ} (hr : 0 < r) (hU : 2 ≤ U) + (hrlarge : 4096 * U ^ 7 ≤ r) : + r ^ 2 / (256 * U ^ 4) ≤ + r ^ 2 / (128 * U ^ 4) - 16 * U ^ 3 * r := by + have hUpos : 0 < U := by linarith + have hUne : U ≠ 0 := ne_of_gt hUpos + have hcost : 16 * U ^ 3 * r ≤ r ^ 2 / (256 * U ^ 4) := by + apply (le_div_iff₀ (show 0 < 256 * U ^ 4 by positivity)).mpr + calc + (16 * U ^ 3 * r) * (256 * U ^ 4) = (4096 * U ^ 7) * r := by ring + _ ≤ r * r := mul_le_mul_of_nonneg_right hrlarge hr.le + _ = r ^ 2 := by ring + have hid : r ^ 2 / (128 * U ^ 4) = 2 * (r ^ 2 / (256 * U ^ 4)) := by + field_simp [hUne]; ring + linarith only [hcost, hid] + +theorem fourAnchors_count_lower {r U : ℝ} (hr : 0 < r) (hU : 2 ≤ U) + (hrlarge : 4096 * U ^ 7 ≤ r) {N L T : ℝ} + (hN : r ^ 2 / (128 * U ^ 4) ≤ N) + (hL0 : 0 ≤ L) (hL : L ≤ U * r ^ 2) (hT0 : 0 ≤ T) + (hcount : (2 / 9 : ℝ) * + ((r / (8 * U ^ 2)) * N - 2 * (U * r ^ 2)) ^ 3 ≤ L ^ 2 * T) : + r ^ 5 / (9 * 2 ^ 32 * U ^ 20) ≤ T := by + have hUpos : 0 < U := by linarith + have hUne : U ≠ 0 := ne_of_gt hUpos + let a : ℝ := r ^ 3 / (2048 * U ^ 6) + let k : ℝ := r ^ 5 / (9 * 2 ^ 32 * U ^ 20) + have ha0 : 0 ≤ a := by + dsimp [a] + positivity + have hsurplus : a ≤ (r / (8 * U ^ 2)) * N - 2 * (U * r ^ 2) := + fourAnchors_surplus_lower hr hU hrlarge hN + have hcube := pow_le_pow_left₀ ha0 hsurplus 3 + have hLsq : L ^ 2 ≤ (U * r ^ 2) ^ 2 := pow_le_pow_left₀ hL0 hL 2 + have hbound : (2 / 9 : ℝ) * a ^ 3 ≤ (U * r ^ 2) ^ 2 * T := by + calc + (2 / 9 : ℝ) * a ^ 3 ≤ (2 / 9 : ℝ) * + ((r / (8 * U ^ 2)) * N - 2 * (U * r ^ 2)) ^ 3 := + mul_le_mul_of_nonneg_left hcube (by norm_num) + _ ≤ L ^ 2 * T := hcount + _ ≤ (U * r ^ 2) ^ 2 * T := mul_le_mul_of_nonneg_right hLsq hT0 + have hid : (U * r ^ 2) ^ 2 * k = (2 / 9 : ℝ) * a ^ 3 := by + dsimp [k, a] + field_simp [hUne]; ring + change k ≤ T + apply (mul_le_mul_iff_right₀ (show 0 < (U * r ^ 2) ^ 2 by positivity)).mp + rw [hid] + exact hbound + +theorem fourAnchors_total_lower {r U : ℝ} (hr : 0 < r) (hU : 2 ≤ U) + {P extra T total : ℝ} + (hP : r ^ 2 / (32 * U ^ 4) ≤ P) + (hExtra : r ^ 2 / (256 * U ^ 4) ≤ extra) + (hT : r ^ 5 / (9 * 2 ^ 32 * U ^ 20) ≤ T) + (hTotal : P * extra * T ≤ total) : + r ^ 9 / (9 * 2 ^ 45 * U ^ 28) ≤ total := by + have hUpos : 0 < U := by linarith + have hUne : U ≠ 0 := ne_of_gt hUpos + have hp0 : 0 ≤ r ^ 2 / (32 * U ^ 4) := by positivity + have he0 : 0 ≤ r ^ 2 / (256 * U ^ 4) := by positivity + have ht0 : 0 ≤ r ^ 5 / (9 * 2 ^ 32 * U ^ 20) := by positivity + have hP0 : 0 ≤ P := hp0.trans hP + have hExtra0 : 0 ≤ extra := he0.trans hExtra + have hproduct : + (r ^ 2 / (32 * U ^ 4)) * (r ^ 2 / (256 * U ^ 4)) * + (r ^ 5 / (9 * 2 ^ 32 * U ^ 20)) ≤ P * extra * T := + mul_le_mul (mul_le_mul hP hExtra he0 hP0) hT ht0 (mul_nonneg hP0 hExtra0) + calc + r ^ 9 / (9 * 2 ^ 45 * U ^ 28) = + (r ^ 2 / (32 * U ^ 4)) * (r ^ 2 / (256 * U ^ 4)) * + (r ^ 5 / (9 * 2 ^ 32 * U ^ 20)) := by + field_simp [hUne]; ring + _ ≤ P * extra * T := hproduct + _ ≤ total := hTotal + +theorem fourAnchors_candidate_upper {r U : ℝ} (hr : 0 < r) (hU : 2 ≤ U) + {L P : ℝ} (_hL0 : 0 ≤ L) (hL : L ≤ U * r ^ 2) + (hP0 : 0 ≤ P) (hP : P ≤ U * r ^ 2) : + L * (16 * U ^ 3 * r) ^ 3 * P ≤ 2 ^ 12 * U ^ 11 * r ^ 7 := by + have hUpos : 0 < U := by linarith + have hcap0 : 0 ≤ (16 * U ^ 3 * r) ^ 3 := by positivity + have hM0 : 0 ≤ U * r ^ 2 := by positivity + calc + L * (16 * U ^ 3 * r) ^ 3 * P ≤ + (U * r ^ 2) * (16 * U ^ 3 * r) ^ 3 * P := + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hL hcap0) hP0 + _ ≤ (U * r ^ 2) * (16 * U ^ 3 * r) ^ 3 * (U * r ^ 2) := + mul_le_mul_of_nonneg_left hP (mul_nonneg hM0 hcap0) + _ = 2 ^ 12 * U ^ 11 * r ^ 7 := by ring + +theorem fourAnchors_average_lower {r U : ℝ} (hr : 0 < r) (hU : 2 ≤ U) + {total candidate W : ℝ} + (hTotal : r ^ 9 / (9 * 2 ^ 45 * U ^ 28) ≤ total) + (hCandidate : candidate ≤ 2 ^ 12 * U ^ 11 * r ^ 7) + (hW : 0 ≤ W) (hLink : total ≤ candidate * W) : + r ^ 2 / (9 * 2 ^ 57 * U ^ 39) ≤ W := by + have hUpos : 0 < U := by linarith + have hUne : U ≠ 0 := ne_of_gt hUpos + have hcap : 0 < 2 ^ 12 * U ^ 11 * r ^ 7 := by positivity + apply (mul_le_mul_iff_right₀ hcap).mp + calc + (2 ^ 12 * U ^ 11 * r ^ 7) * (r ^ 2 / (9 * 2 ^ 57 * U ^ 39)) = + r ^ 9 / (9 * 2 ^ 45 * U ^ 28) := by + field_simp [hUne] + _ ≤ total := hTotal + _ ≤ candidate * W := hLink + _ ≤ (2 ^ 12 * U ^ 11 * r ^ 7) * W := mul_le_mul_of_nonneg_right hCandidate hW + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/GraphParameters.lean b/lean/OAI/Combinatorics/Ryser/Incidence/GraphParameters.lean new file mode 100644 index 0000000000000000000000000000000000000000..dd0559198ca6b9acc237d1ec3e0bbd8f7272418c --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/GraphParameters.lean @@ -0,0 +1,76 @@ +import OAI.Combinatorics.Ryser.Incidence.Parameters +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Positivity + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence + +theorem graphScale_bounds {U : ℝ} (hU : 2 ≤ U) : + 2 ≤ graphScale U ∧ 16 * U ^ 3 ≤ graphScale U := by + have hU1 : 1 ≤ U := le_trans (by norm_num) hU + have hU0 : 0 ≤ U := le_trans (by norm_num) hU + have hC : 16 ≤ graphScaleConstant := by norm_num [graphScaleConstant] + have hpow : 1 ≤ U ^ 39 := one_le_pow₀ hU1 + constructor + · calc + 2 ≤ graphScaleConstant := le_trans (by norm_num) hC + _ ≤ graphScaleConstant * U ^ 39 := + le_mul_of_one_le_right graphScaleConstant_pos.le hpow + _ = graphScale U := rfl + · calc + 16 * U ^ 3 ≤ graphScaleConstant * U ^ 3 := + mul_le_mul_of_nonneg_right hC (pow_nonneg hU0 _) + _ ≤ graphScaleConstant * U ^ 39 := + mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hU1 (by decide)) + graphScaleConstant_pos.le + _ = graphScale U := rfl + +theorem two_le_expansionScale {V : ℝ} (hV : 2 ≤ V) : 2 ≤ expansionScale V := by + have hV1 : 1 ≤ V := le_trans (by norm_num) hV + calc + 2 ≤ (2 : ℝ) ^ 23 := by norm_num + _ ≤ 2 ^ 23 * V ^ 24 := + le_mul_of_one_le_right (by norm_num) (one_le_pow₀ hV1) + _ = expansionScale V := rfl + +theorem retained_witness_lower (r U w g : ℝ) (hr : 0 < r) (hU : 2 ≤ U) + (hW : r ^ 2 / (9 * 2 ^ 57 * U ^ 39) ≤ w) + (hG : w - 3 * (16 * U ^ 3 * r) ≤ g) + (hremove : (96 / witnessConstant) * U ^ 42 ≤ r) : + r ^ 2 / graphScale U ≤ g := by + have hUpos : 0 < U := lt_of_lt_of_le (by norm_num) hU + have hVpos := graphScale_pos hUpos + have hloss : 3 * (16 * U ^ 3 * r) ≤ r ^ 2 / graphScale U := by + apply (le_div_iff₀ hVpos).mpr + calc + 3 * (16 * U ^ 3 * r) * graphScale U = + ((96 / witnessConstant) * U ^ 42) * r := by + norm_num [graphScale, graphScaleConstant, witnessConstant] + ring + _ ≤ r * r := mul_le_mul_of_nonneg_right hremove hr.le + _ = r ^ 2 := (pow_two r).symm + have htwice : 2 * (r ^ 2 / graphScale U) ≤ w := by + convert hW using 1 + dsimp [graphScale, graphScaleConstant] + field_simp [ne_of_gt hUpos] + + linarith + +theorem extraction_expansion_le (r V s : ℝ) (hr : 0 ≤ r) (hV : 0 < V) + (hlo : 3 * r / (8 * V ^ 2) ≤ s) : + 2 ^ 20 * V ^ 22 * r ≤ expansionScale V * s := by + have hB : 0 ≤ (2 : ℝ) ^ 20 * V ^ 22 * r := by positivity + calc + 2 ^ 20 * V ^ 22 * r ≤ 3 * (2 ^ 20 * V ^ 22 * r) := by linarith + _ = expansionScale V * (3 * r / (8 * V ^ 2)) := by + dsimp [expansionScale] + field_simp [ne_of_gt hV] + norm_num + ring + _ ≤ expansionScale V * s := + mul_le_mul_of_nonneg_left hlo (expansionScale_pos hV).le + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/NoApproximateSubfield.lean b/lean/OAI/Combinatorics/Ryser/Incidence/NoApproximateSubfield.lean new file mode 100644 index 0000000000000000000000000000000000000000..cbd1b861bf0859fd5fdedcd58893b1313e9ba7dc --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/NoApproximateSubfield.lean @@ -0,0 +1,114 @@ +import OAI.Combinatorics.Ryser.Incidence.PopularScalars +import OAI.Combinatorics.Ryser.Incidence.ScalarCoverExpressions +import OAI.Combinatorics.Ryser.Incidence.RatioSet +import OAI.Combinatorics.Ryser.Incidence.ScalarCollisions +import OAI.Combinatorics.Ryser.Incidence.NoApproximateSubfieldNumerics +import Mathlib.SetTheory.Cardinal.Finite + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence + +noncomputable section +open scoped Pointwise + +variable {F : Type*} [Field F] [DecidableEq F] + +theorem scalarExpression_of_mem_ratioSet {E : Finset F} {c : F} + (hc : c ∈ ratioSet E) : ScalarExpression E c 4 := by + obtain ⟨x, hx, x', hx', y, hy, y', hy', hyy', hquot⟩ := mem_ratioSet.mp hc + rw [← hquot] + exact scalarExpression_ratio hx hx' hy hy' hyy' + +theorem no_approximate_subfield_finite [Fintype F] + (S : Finset F) (K : ℝ) (hzero : (0 : F) ∉ S) (hK : 2 ≤ K) + (hsub : ((S - S).card : ℝ) ≤ K * (S.card : ℝ)) + (hdiv : ((S / S).card : ℝ) ≤ K * (S.card : ℝ)) + (properSubfields : ∀ L : Subfield F, L ≠ ⊤ → + (Nat.card L : ℝ) ^ 3 ≤ (Fintype.card F : ℝ)) + (hlarge : 4 * K ^ 127942 < (S.card : ℝ)) : + (S.card : ℝ) ^ 3 ≤ 8 * K ^ 3 * (Fintype.card F : ℝ) ∨ + (Fintype.card F : ℝ) < 2 * K ^ 527 * (S.card : ℝ) := by + classical + by_cases hfirst : (S.card : ℝ) ^ 3 ≤ 8 * K ^ 3 * (Fintype.card F : ℝ) + · exact Or.inl hfirst + apply Or.inr + have hKpos : 0 < K := lt_of_lt_of_le (by norm_num) hK + have hspos : 0 < (S.card : ℝ) := + lt_trans (mul_pos (by norm_num) (pow_pos hKpos _)) hlarge + have hS : S.Nonempty := Finset.card_pos.mp (Nat.cast_pos.mp hspos) + obtain ⟨B, E, hEB, hBcard, hpopular, hD, hCost⟩ := + exists_popular_scalars S K hS hzero hK hsub hdiv + have hB : B.Nonempty := by + apply Finset.card_pos.mp + rw [hBcard] + exact hS.card_pos + have hnum := noapprox_threshold_numerics K (S.card : ℝ) (E.card : ℝ) + hK hpopular hlarge + have hE : 2 ≤ E.card := by exact_mod_cast hnum.2.1.le + have hC4 : scalarCoverExponent 4 + 3 = 527 := by decide + have hC9 : scalarCoverExponent 9 + 3 = 127940 := by decide + have hratio (r : F) (hr : r ∈ ratioSet E) : ScalarExpression E r 4 := + scalarExpression_of_mem_ratioSet hr + have hsmall (c : F) (hc : ScalarExpression E c 9) : + (dilateSum E c).card < E.card ^ 2 := by + have hgrowth := ScalarExpression.card_add_subset_of_le hB hK hD hCost hEB + hc (show 9 ≤ 9 from le_rfl) + have hbound : ((dilateSum E c).card : ℝ) ≤ K ^ 127940 * (S.card : ℝ) := by + rw [dilateSum_eq_add_smul] + simpa only [hC9, hBcard] using hgrowth + exact_mod_cast hbound.trans_lt hnum.2.2.1 + have hadd : ∀ r ∈ ratioSet E, ∀ r' ∈ ratioSet E, + (dilateSum E (r + r')).card < E.card ^ 2 := by + intro r hr r' hr' + exact hsmall (r + r') (ScalarExpression.add (hratio r hr) (hratio r' hr')) + have hmul : ∀ r ∈ ratioSet E, ∀ r' ∈ ratioSet E, + (dilateSum E (r * r')).card < E.card ^ 2 := by + intro r hr r' hr' + exact hsmall (r * r') (ScalarExpression.mul (hratio r hr) (hratio r' hr')) + let L : Subfield F := ratioSubfield E hE hadd hmul + have hLcard : Nat.card L = (ratioSet E).card := by + change Nat.card (ratioSet E) = (ratioSet E).card + exact Nat.card_eq_finsetCard _ + have hEcard : (E.card : ℝ) ≤ (Nat.card L : ℝ) := by + rw [hLcard] + exact_mod_cast card_le_card_ratioSet hE + have hfieldlt : (Fintype.card F : ℝ) < (E.card : ℝ) ^ 3 := + cube_lt_of_popular_lower K (S.card : ℝ) (E.card : ℝ) (Fintype.card F : ℝ) + hKpos hspos.le hpopular (lt_of_not_ge hfirst) + have hLtop : L = ⊤ := by + by_contra hproper + have hcube : (E.card : ℝ) ^ 3 ≤ (Nat.card L : ℝ) ^ 3 := + pow_le_pow_left₀ (Nat.cast_nonneg _) hEcard 3 + exact (not_lt_of_ge (hcube.trans (properSubfields L hproper))) hfieldlt + have hallratio (c : F) : c ∈ ratioSet E := by + have hc : c ∈ L := by rw [hLtop]; exact Subfield.mem_top _ + exact hc + have hallgrowth (c : F) : + ((dilateSum E c).card : ℝ) ≤ K ^ 527 * (S.card : ℝ) := by + have hgrowth := ScalarExpression.card_add_subset_of_le hB hK hD hCost hEB + (hratio c (hallratio c)) (show 4 ≤ 4 from le_rfl) + rw [dilateSum_eq_add_smul] + simpa only [hC4, hBcard] using hgrowth + have hcollision := card_field_lt_twice_of_dilateSum_card_le_real E + (K ^ 527 * (S.card : ℝ)) + (mul_nonneg (pow_nonneg hKpos.le _) (Nat.cast_nonneg _)) + hallgrowth hnum.2.2.2 + simpa only [mul_assoc] using hcollision + +theorem no_approximate_subfield_finite_of_nat [Fintype F] + (S : Finset F) (K : ℝ) (hzero : (0 : F) ∉ S) (hK : 2 ≤ K) + (hsub : ((S - S).card : ℝ) ≤ K * (S.card : ℝ)) + (hdiv : ((S / S).card : ℝ) ≤ K * (S.card : ℝ)) + (properSubfields : ∀ L : Subfield F, L ≠ ⊤ → + Nat.card L ^ 3 ≤ Fintype.card F) + (hlarge : 4 * K ^ 127942 < (S.card : ℝ)) : + (S.card : ℝ) ^ 3 ≤ 8 * K ^ 3 * (Fintype.card F : ℝ) ∨ + (Fintype.card F : ℝ) < 2 * K ^ 527 * (S.card : ℝ) := by + exact no_approximate_subfield_finite S K hzero hK hsub hdiv + (fun L hL => by exact_mod_cast properSubfields L hL) hlarge + +end +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/NoApproximateSubfieldNumerics.lean b/lean/OAI/Combinatorics/Ryser/Incidence/NoApproximateSubfieldNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..5a9ca5ee1e7cc6ad65c39fb8cc1c8a4e9a00cd63 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/NoApproximateSubfieldNumerics.lean @@ -0,0 +1,73 @@ +import Mathlib.Basic.Real.Basic +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence + +theorem pow_mul_lt_sq_of_popular_lower + (K s t : ℝ) (j : ℕ) (hK : 0 < K) (hs : 0 < s) + (ht : s / (2 * K) ≤ t) (hlarge : 4 * K ^ (j + 2) < s) : + K ^ j * s < t ^ 2 := by + have hden : 0 < 2 * K := mul_pos (by norm_num) hK + have hst : s ≤ 2 * K * t := by + simpa only [mul_comm t] using (div_le_iff₀ hden).mp ht + have hsq : s ^ 2 ≤ (2 * K * t) ^ 2 := pow_le_pow_left₀ hs.le hst 2 + apply (mul_lt_mul_iff_left₀ (pow_pos hden 2)).mp + calc + (K ^ j * s) * (2 * K) ^ 2 = 4 * K ^ (j + 2) * s := by + rw [pow_add] + ring + _ < s ^ 2 := by nlinarith [mul_lt_mul_of_pos_right hlarge hs] + _ ≤ t ^ 2 * (2 * K) ^ 2 := by nlinarith only [hsq] + +theorem noapprox_threshold_numerics + (K s t : ℝ) (hK : 2 ≤ K) (ht : s / (2 * K) ≤ t) + (hlarge : 4 * K ^ 127942 < s) : + 0 < s ∧ 2 < t ∧ K ^ 127940 * s < t ^ 2 ∧ + 2 * (K ^ 527 * s) < t ^ 2 := by + have hKpos : 0 < K := lt_of_lt_of_le (by norm_num) hK + have hKone : 1 ≤ K := le_trans (by norm_num) hK + have hs : 0 < s := lt_trans (mul_pos (by norm_num) (pow_pos hKpos _)) hlarge + have hden : 0 < 2 * K := mul_pos (by norm_num) hKpos + have hst : s ≤ 2 * K * t := by + simpa only [mul_comm t] using (div_le_iff₀ hden).mp ht + have hKpow : K ≤ K ^ 127942 := le_self_pow₀ hKone (by norm_num) + have htlarge : 2 < t := by + apply (mul_lt_mul_iff_right₀ hden).mp + nlinarith only [hlarge, hKpow, hst] + have hlong : K ^ 127940 * s < t ^ 2 := + pow_mul_lt_sq_of_popular_lower K s t 127940 hKpos hs ht hlarge + have hpow : 2 * K ^ 527 ≤ K ^ 127940 := by + calc + 2 * K ^ 527 ≤ K * K ^ 527 := + mul_le_mul_of_nonneg_right hK (pow_nonneg hKpos.le _) + _ = K ^ 528 := (pow_succ' K 527).symm + _ ≤ K ^ 127940 := pow_le_pow_right₀ hKone (by norm_num) + refine ⟨hs, htlarge, hlong, ?_⟩ + calc + 2 * (K ^ 527 * s) = (2 * K ^ 527) * s := by ring + _ ≤ K ^ 127940 * s := mul_le_mul_of_nonneg_right hpow hs.le + _ < t ^ 2 := hlong + +theorem cube_lt_of_popular_lower + (K s t q : ℝ) (hK : 0 < K) (hs : 0 ≤ s) + (ht : s / (2 * K) ≤ t) (hlarge : 8 * K ^ 3 * q < s ^ 3) : + q < t ^ 3 := by + have hden : 0 < 2 * K := mul_pos (by norm_num) hK + have hst : s ≤ 2 * K * t := by + simpa only [mul_comm t] using (div_le_iff₀ hden).mp ht + have hcube : s ^ 3 ≤ (2 * K * t) ^ 3 := pow_le_pow_left₀ hs hst 3 + apply (mul_lt_mul_iff_right₀ (mul_pos (by norm_num : (0 : ℝ) < 8) + (pow_pos hK 3))).mp + calc + 8 * K ^ 3 * q < s ^ 3 := hlarge + _ ≤ (2 * K * t) ^ 3 := hcube + _ = 8 * K ^ 3 * t ^ 3 := by ring + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/Parameters.lean b/lean/OAI/Combinatorics/Ryser/Incidence/Parameters.lean new file mode 100644 index 0000000000000000000000000000000000000000..141e782fd1c966dfd824a45e5c4bfc148d2e969b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/Parameters.lean @@ -0,0 +1,121 @@ +import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics +import Mathlib.Analysis.SpecificLimits.Basic +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Ring + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence +noncomputable section +open Filter Topology + +def savingExponent : ℝ := 1 / 10000000000 +def witnessConstant : ℝ := 1 / (9 * 2 ^ 57) +def graphScaleConstant : ℝ := 9 * 2 ^ 58 +def densityScale (q : ℝ) : ℝ := q ^ savingExponent +def graphScale (U : ℝ) : ℝ := graphScaleConstant * U ^ 39 +def expansionScale (V : ℝ) : ℝ := 2 ^ 23 * V ^ 24 + +@[simp] theorem savingExponent_pos : 0 < savingExponent := by + norm_num [savingExponent] +theorem savingExponent_lt_tenth : savingExponent < 1 / 10 := by + norm_num [savingExponent] +theorem witnessConstant_pos : 0 < witnessConstant := by + norm_num [witnessConstant] +theorem graphScaleConstant_pos : 0 < graphScaleConstant := by + norm_num [graphScaleConstant] +theorem graphScaleConstant_eq : graphScaleConstant = 2 / witnessConstant := by + norm_num [graphScaleConstant, witnessConstant] + +theorem graphScale_pos {U : ℝ} (hU : 0 < U) : 0 < graphScale U := + mul_pos graphScaleConstant_pos (pow_pos hU _) +theorem expansionScale_pos {V : ℝ} (hV : 0 < V) : 0 < expansionScale V := + mul_pos (by norm_num) (pow_pos hV _) + +theorem scaled_power_identity (A U : ℝ) (a b c : ℕ) : + A * U ^ a * (graphScale U) ^ b * (expansionScale (graphScale U)) ^ c = + (A * graphScaleConstant ^ b * (2 ^ 23 * graphScaleConstant ^ 24) ^ c) * + U ^ (a + 39 * b + 936 * c) := by + simp only [graphScale, expansionScale, mul_pow, pow_add, pow_mul] + rw [show (936 : ℕ) = 39 * 24 from rfl, pow_mul] + ring + +theorem eventually_coefficient_density_power_lt_sqrt + (A : ℝ) (m : ℕ) (hm : savingExponent * m < 1 / 2) : + ∀ᶠ q : ℝ in atTop, A * densityScale q ^ m < Real.sqrt q := by + have hgap : 0 < (1 / 2 : ℝ) - savingExponent * m := sub_pos.mpr hm + have hgrow := (tendsto_rpow_atTop hgap).eventually_gt_atTop A + filter_upwards [eventually_gt_atTop (0 : ℝ), hgrow] with q hq hbound + have hpow : 0 < q ^ (savingExponent * m) := Real.rpow_pos_of_pos hq _ + have hmul := mul_lt_mul_of_pos_right hbound hpow + have hid : q ^ ((1 / 2 : ℝ) - savingExponent * m) * + q ^ (savingExponent * m) = Real.sqrt q := by + rw [← Real.rpow_add hq, sub_add_cancel, Real.sqrt_eq_rpow] + rw [hid] at hmul + simpa only [densityScale, Real.rpow_mul_natCast hq.le] using hmul + +theorem eventually_scaled_powers_lt_sqrt (A : ℝ) (a b c : ℕ) + (hExp : savingExponent * (a + 39 * b + 936 * c : ℕ) < 1 / 2) : + ∀ᶠ q : ℝ in atTop, + A * densityScale q ^ a * (graphScale (densityScale q)) ^ b * + (expansionScale (graphScale (densityScale q))) ^ c < Real.sqrt q := by + have h := eventually_coefficient_density_power_lt_sqrt + (A * graphScaleConstant ^ b * (2 ^ 23 * graphScaleConstant ^ 24) ^ c) + (a + 39 * b + 936 * c) hExp + filter_upwards [h] with q hq + simpa only [scaled_power_identity] using hq + +def LargeEnough (q : ℝ) : Prop := + let U := densityScale q + let V := graphScale U + let K := expansionScale V + 0 < q ∧ 2 ≤ U ∧ + 16 * U ^ 2 ≤ Real.sqrt q ∧ + 4096 * U ^ 7 ≤ Real.sqrt q ∧ + (96 / witnessConstant) * U ^ 42 ≤ Real.sqrt q ∧ + 32 * V ^ 2 * K ^ 127942 < 3 * Real.sqrt q ∧ + 4096 * V ^ 6 * K ^ 3 < 27 * Real.sqrt q ∧ + 2 * K ^ 527 * V ≤ Real.sqrt q + +theorem eventually_largeEnough : ∀ᶠ q : ℝ in atTop, LargeEnough q := by + have hU := (tendsto_rpow_atTop savingExponent_pos).eventually_ge_atTop 2 + have h2 := eventually_scaled_powers_lt_sqrt 16 2 0 0 (by norm_num [savingExponent]) + have h7 := eventually_scaled_powers_lt_sqrt 4096 7 0 0 (by norm_num [savingExponent]) + have h42 := eventually_scaled_powers_lt_sqrt (96 / witnessConstant) 42 0 0 + (by norm_num [savingExponent]) + have hfirst := eventually_scaled_powers_lt_sqrt (32 / 3) 0 2 127942 + (by norm_num [savingExponent]) + have hsecond := eventually_scaled_powers_lt_sqrt (4096 / 27) 0 6 3 + (by norm_num [savingExponent]) + have hthird := eventually_scaled_powers_lt_sqrt 2 0 1 527 + (by norm_num [savingExponent]) + filter_upwards [eventually_gt_atTop (0 : ℝ), hU, h2, h7, h42, + hfirst, hsecond, hthird] with q hq hu h2q h7q h42q hf hs ht + simp only [pow_zero, pow_one, mul_one] at h2q h7q h42q hf hs ht + refine ⟨hq, hu, h2q.le, h7q.le, h42q.le, ?_, ?_, ?_⟩ + · nlinarith only [hf] + · nlinarith only [hs] + · have heq : 2 * expansionScale (graphScale (densityScale q)) ^ 527 * + graphScale (densityScale q) = + 2 * graphScale (densityScale q) * expansionScale (graphScale (densityScale q)) ^ 527 := by + ring + rw [heq] + exact ht.le + +theorem exists_threshold_largeEnough : + ∃ Q : ℕ, ∀ q : ℕ, Q ≤ q → LargeEnough (q : ℝ) := by + have h : ∀ᶠ q : ℕ in atTop, LargeEnough (q : ℝ) := + (tendsto_natCast_atTop_atTop (R := ℝ)).eventually eventually_largeEnough + exact eventually_atTop.mp h + +def incidenceThreshold : ℕ := Classical.choose exists_threshold_largeEnough + +theorem largeEnough_of_threshold {q : ℕ} (hq : incidenceThreshold ≤ q) : + LargeEnough (q : ℝ) := + Classical.choose_spec exists_threshold_largeEnough q hq + +end +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/Pencils.lean b/lean/OAI/Combinatorics/Ryser/Incidence/Pencils.lean new file mode 100644 index 0000000000000000000000000000000000000000..ed88371bb558e14e0a3ad69b8242a38c4e13f617 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/Pencils.lean @@ -0,0 +1,122 @@ +import OAI.Combinatorics.Ryser.Geometry.ProjectiveJoins +import Mathlib.Data.Finset.Card +import Mathlib.Data.Finset.Image + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence +noncomputable section +variable {F : Type*} [Field F] [instDecidableEqF : DecidableEq F] + +def HasJoin (L : Finset (ProjectiveLine F)) (p : ProjectivePoint F) (z : Point F) : Prop := + ∃ l ∈ L, ProjectiveIncidence p l ∧ ProjectiveIncidence (Sum.inl z) l + +def pencilSlice (L : Finset (ProjectiveLine F)) (p : ProjectivePoint F) : + Finset (ProjectiveLine F) := + L.filter fun l => ProjectiveIncidence p l + +private theorem line_mem_of_hasJoin {L : Finset (ProjectiveLine F)} + {p : ProjectivePoint F} {z : Point F} {l : ProjectiveLine F} + (hne : p ≠ Sum.inl z) (h : HasJoin L p z) + (hp : ProjectiveIncidence p l) (hz : ProjectiveIncidence (Sum.inl z) l) : + l ∈ L := let _ := instDecidableEqF; by + obtain ⟨m, hm, hpm, hzm⟩ := h + have heq : l = m := eq_projectiveLine_of_common_incidence hne hp hz hpm hzm + rw [heq] + exact hm + +theorem normalized_witness_lines {L : Finset (ProjectiveLine F)} {z : Point F} + (hz : z.1 ≠ 0) + (hV : HasJoin L (Sum.inr none) z) + (hH : HasJoin L (Sum.inr (some 0)) z) + (hD : HasJoin L (Sum.inr (some 1)) z) + (hO : HasJoin L (Sum.inl (0, 0)) z) : + some (none, z.1) ∈ L ∧ some (some 0, z.2) ∈ L ∧ + some (some 1, -(z.1 - z.2)) ∈ L ∧ + some (some (z.1 / z.2)⁻¹, 0) ∈ L := by + have hfinite (d : Direction F) : Sum.inr d ≠ (Sum.inl z : ProjectivePoint F) := by + intro h + cases h + have horigin : (Sum.inl (0, 0) : ProjectivePoint F) ≠ Sum.inl z := by + intro h + exact hz (congrArg Prod.fst (Sum.inl.inj h)).symm + refine ⟨line_mem_of_hasJoin (hfinite none) hV rfl rfl, ?_, ?_, ?_⟩ + · apply line_mem_of_hasJoin (l := some (some 0, z.2)) (hfinite (some 0)) hH rfl + simp only [ProjectiveIncidence, Incidence, projection, zero_mul, sub_zero] + · apply line_mem_of_hasJoin (l := some (some 1, -(z.1 - z.2))) (hfinite (some 1)) hD rfl + simp only [ProjectiveIncidence, Incidence, projection, one_mul, neg_sub] + · apply line_mem_of_hasJoin horigin hO + · simp only [ProjectiveIncidence, Incidence, projection, mul_zero, sub_self] + · change z.2 - (z.1 / z.2)⁻¹ * z.1 = 0 + rw [inv_div, div_mul_cancel₀ _ hz, sub_self] + +private theorem card_image_le_pencilSlice + (G : Finset (Point F)) (L : Finset (ProjectiveLine F)) + (p : ProjectivePoint F) (f : Point F → F) (ell : F → ProjectiveLine F) + (hinj : Function.Injective ell) + (hline : ∀ z ∈ G, ell (f z) ∈ L) + (hp : ∀ a, ProjectiveIncidence p (ell a)) : + (G.image f).card ≤ (pencilSlice L p).card := by + apply Finset.card_le_card_of_injOn ell + · intro a ha + obtain ⟨z, hz, rfl⟩ := Finset.mem_image.mp ha + exact Finset.mem_filter.mpr ⟨hline z hz, hp (f z)⟩ + · exact fun _ _ _ _ h => hinj h + +theorem normalized_coordinate_card_bounds + (G : Finset (Point F)) (L : Finset (ProjectiveLine F)) + (hnonzero : ∀ z ∈ G, z.1 ≠ 0 ∧ z.2 ≠ 0) + (hjoins : ∀ z ∈ G, + HasJoin L (Sum.inr none) z ∧ HasJoin L (Sum.inr (some 0)) z ∧ + HasJoin L (Sum.inr (some 1)) z ∧ HasJoin L (Sum.inl (0, 0)) z) : + (G.image Prod.fst).card ≤ (pencilSlice L (Sum.inr none)).card ∧ + (G.image Prod.snd).card ≤ (pencilSlice L (Sum.inr (some 0))).card ∧ + (G.image (fun z => z.1 - z.2)).card ≤ + (pencilSlice L (Sum.inr (some 1))).card ∧ + (G.image (fun z => z.1 / z.2)).card ≤ + (pencilSlice L (Sum.inl (0, 0))).card := by + have hlines (z : Point F) (hz : z ∈ G) := normalized_witness_lines + (hnonzero z hz).1 (hjoins z hz).1 (hjoins z hz).2.1 + (hjoins z hz).2.2.1 (hjoins z hz).2.2.2 + refine ⟨?_, ?_, ?_, ?_⟩ + · apply card_image_le_pencilSlice G L (Sum.inr none) Prod.fst + (fun a => some (none, a)) + · intro a b h + exact congrArg Prod.snd (Option.some.inj h) + · exact fun z hz => (hlines z hz).1 + · exact fun _ => rfl + · apply card_image_le_pencilSlice G L (Sum.inr (some 0)) Prod.snd + (fun a => some (some 0, a)) + · intro a b h + exact congrArg Prod.snd (Option.some.inj h) + · exact fun z hz => (hlines z hz).2.1 + · exact fun _ => rfl + · apply card_image_le_pencilSlice G L (Sum.inr (some 1)) (fun z => z.1 - z.2) + (fun a => some (some 1, -a)) + · intro a b h + exact neg_injective (congrArg Prod.snd (Option.some.inj h)) + · exact fun z hz => (hlines z hz).2.2.1 + · exact fun _ => rfl + · apply card_image_le_pencilSlice G L (Sum.inl (0, 0)) (fun z => z.1 / z.2) + (fun a => some (some a⁻¹, 0)) + · intro a b h + exact inv_injective (Option.some.inj (congrArg Prod.fst (Option.some.inj h))) + · exact fun z hz => (hlines z hz).2.2.2 + · intro a + simp only [ProjectiveIncidence, Incidence, projection, mul_zero, sub_self] + +theorem zero_not_mem_coordinate_images {G : Finset (Point F)} + (hnonzero : ∀ z ∈ G, z.1 ≠ 0 ∧ z.2 ≠ 0) : + (0 : F) ∉ G.image Prod.fst ∧ (0 : F) ∉ G.image Prod.snd := by + constructor + · intro h + obtain ⟨z, hz, heq⟩ := Finset.mem_image.mp h + exact (hnonzero z hz).1 heq + · intro h + obtain ⟨z, hz, heq⟩ := Finset.mem_image.mp h + exact (hnonzero z hz).2 heq + +end +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/PopularOverlap.lean b/lean/OAI/Combinatorics/Ryser/Incidence/PopularOverlap.lean new file mode 100644 index 0000000000000000000000000000000000000000..f69a17d4624c6bbd9d20c8e33a8eea02e19705d1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/PopularOverlap.lean @@ -0,0 +1,181 @@ +import Mathlib.Algebra.BigOperators.Group.Finset.Sigma +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.Data.Finset.Lattice.Basic +import Mathlib.Basic.Real.Basic +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence + +open scoped BigOperators + +variable {ι α : Type*} [instDecidableEqι : DecidableEq ι] [DecidableEq α] + +private theorem sum_membership_indicator + (A U : Finset α) (hAU : A ⊆ U) : + (∑ x ∈ U, if x ∈ A then (1 : ℝ) else 0) = (A.card : ℝ) := by + have hfilter : U.filter (fun x => x ∈ A) = A := by + apply Finset.ext + intro x + simp only [Finset.mem_filter] + exact ⟨fun hx => hx.2, fun hx => ⟨hAU hx, hx⟩⟩ + rw [Finset.sum_boole, hfilter] + +private theorem sum_overlap_multiplicity + (I : Finset ι) (T : ι → Finset α) (U : Finset α) + (hTU : ∀ i ∈ I, T i ⊆ U) : + (∑ x ∈ U, ∑ i ∈ I, if x ∈ T i then (1 : ℝ) else 0) = + ∑ i ∈ I, ((T i).card : ℝ) := let _ := instDecidableEqι; by + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro i hi + exact sum_membership_indicator (T i) U (hTU i hi) + +private theorem sum_sq_overlap_multiplicity + (I : Finset ι) (T : ι → Finset α) (U : Finset α) + (hTU : ∀ i ∈ I, T i ⊆ U) : + (∑ x ∈ U, (∑ i ∈ I, if x ∈ T i then (1 : ℝ) else 0) ^ 2) = + ∑ i ∈ I, ∑ j ∈ I, ((T i ∩ T j).card : ℝ) := let _ := instDecidableEqι; by + calc + (∑ x ∈ U, (∑ i ∈ I, if x ∈ T i then (1 : ℝ) else 0) ^ 2) = + ∑ x ∈ U, ∑ i ∈ I, ∑ j ∈ I, + (if x ∈ T i then (1 : ℝ) else 0) * + (if x ∈ T j then (1 : ℝ) else 0) := by + apply Finset.sum_congr rfl + intro x hx + rw [pow_two, Finset.sum_mul_sum] + _ = ∑ i ∈ I, ∑ j ∈ I, ∑ x ∈ U, + (if x ∈ T i then (1 : ℝ) else 0) * + (if x ∈ T j then (1 : ℝ) else 0) := by + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro i hi + exact Finset.sum_comm + _ = ∑ i ∈ I, ∑ j ∈ I, ((T i ∩ T j).card : ℝ) := by + apply Finset.sum_congr rfl + intro i hi + apply Finset.sum_congr rfl + intro j hj + calc + (∑ x ∈ U, + (if x ∈ T i then (1 : ℝ) else 0) * + (if x ∈ T j then (1 : ℝ) else 0)) = + ∑ x ∈ U, if x ∈ T i ∩ T j then (1 : ℝ) else 0 := by + apply Finset.sum_congr rfl + intro x hx + by_cases hxi : x ∈ T i <;> by_cases hxj : x ∈ T j <;> + simp [Finset.mem_inter, hxi, hxj] + _ = ((T i ∩ T j).card : ℝ) := by + apply sum_membership_indicator + intro x hx + exact hTU i hi (Finset.mem_inter.mp hx).1 + +private theorem overlap_energy_lower {β : Type*} (U : Finset β) + (r : β → ℝ) (s K R : ℝ) (hs : 0 < s) (hK : 0 < K) + (hmass : (∑ x ∈ U, r x) = s ^ 2) + (henergy : (∑ x ∈ U, r x ^ 2) = R) + (hU : (U.card : ℝ) ≤ K * s) : s ^ 3 / K ≤ R := by + have hR : 0 ≤ R := by + rw [← henergy] + exact Finset.sum_nonneg (fun x _ => sq_nonneg (r x)) + have hcs : (s ^ 2) ^ 2 ≤ (U.card : ℝ) * R := by + have h := Finset.sum_mul_sq_le_sq_mul_sq U (fun _ => (1 : ℝ)) r + simpa only [one_mul, one_pow, Finset.sum_const, nsmul_eq_mul, + mul_one, hmass, henergy] using h + have hscaled : (s ^ 2) ^ 2 ≤ (K * s) * R := + hcs.trans (mul_le_mul_of_nonneg_right hU hR) + apply (div_le_iff₀ hK).2 + refine le_of_mul_le_mul_left (a := s) ?_ hs + calc + s * s ^ 3 = (s ^ 2) ^ 2 := by ring + _ ≤ (K * s) * R := hscaled + _ = s * (R * K) := by ring + +private theorem popular_card_lower (I : Finset ι) (f : ι → ℝ) + (n a : ℝ) (hn : 0 < n) (ha : 0 ≤ a) + (hcard : (I.card : ℝ) = n) + (hupper : ∀ i ∈ I, f i ≤ n) + (hsum : 2 * n * a ≤ ∑ i ∈ I, f i) : + a ≤ ((I.filter fun i => a ≤ f i).card : ℝ) := let _ := instDecidableEqι; by + classical + have hbound : (∑ i ∈ I, f i) ≤ + ((I.filter fun i => a ≤ f i).card : ℝ) * n + n * a := by + calc + (∑ i ∈ I, f i) ≤ ∑ i ∈ I, ((if a ≤ f i then n else 0) + a) := by + apply Finset.sum_le_sum + intro i hi + by_cases h : a ≤ f i + · rw [ite_eq_left h] + exact (hupper i hi).trans (le_add_of_nonneg_right ha) + · rw [ite_eq_right h, zero_add] + exact (lt_of_not_ge h).le + _ = ((I.filter fun i => a ≤ f i).card : ℝ) * n + n * a := by + simp only [Finset.sum_add_distrib, ← Finset.sum_filter, + Finset.sum_const, nsmul_eq_mul, hcard] + refine le_of_mul_le_mul_left (a := n) ?_ hn + nlinarith only [hsum, hbound] + +theorem exists_popular_intersections + (I : Finset ι) (T : ι → Finset α) (U : Finset α) (s : ℕ) (K : ℝ) + (hI : I.card = s) (hne : I.Nonempty) + (hT : ∀ i ∈ I, (T i).card = s) + (hTU : ∀ i ∈ I, T i ⊆ U) + (hU : (U.card : ℝ) ≤ K * s) (hK : 2 ≤ K) : + ∃ b ∈ I, ∃ A : Finset ι, A ⊆ I ∧ (s : ℝ) / (2 * K) ≤ A.card ∧ + ∀ a ∈ A, (s : ℝ) / (2 * K) ≤ (T a ∩ T b).card := by + classical + have hsNat : 0 < s := by simpa only [hI] using Finset.card_pos.mpr hne + have hs : (0 : ℝ) < s := Nat.cast_pos.mpr hsNat + have hKpos : 0 < K := lt_of_lt_of_le zero_lt_two hK + let r (x : α) : ℝ := ∑ i ∈ I, if x ∈ T i then 1 else 0 + let R : ℝ := ∑ i ∈ I, ∑ j ∈ I, ((T i ∩ T j).card : ℝ) + let row (b : ι) : ℝ := ∑ a ∈ I, ((T a ∩ T b).card : ℝ) + have hmass : (∑ x ∈ U, r x) = (s : ℝ) ^ 2 := by + calc + (∑ x ∈ U, r x) = ∑ i ∈ I, ((T i).card : ℝ) := + sum_overlap_multiplicity I T U hTU + _ = ∑ _i ∈ I, (s : ℝ) := by + apply Finset.sum_congr rfl + intro i hi + exact congrArg (fun n : ℕ => (n : ℝ)) (hT i hi) + _ = (s : ℝ) ^ 2 := by + simp only [Finset.sum_const, nsmul_eq_mul, hI, pow_two] + have henergy : (∑ x ∈ U, r x ^ 2) = R := + sum_sq_overlap_multiplicity I T U hTU + have hlower : (s : ℝ) ^ 3 / K ≤ R := + overlap_energy_lower U r s K R hs hKpos hmass henergy hU + have hrows : (∑ b ∈ I, row b) = R := by + dsimp only [row, R] + exact Finset.sum_comm + have hmean : (∑ _b ∈ I, (s : ℝ) ^ 2 / K) ≤ ∑ b ∈ I, row b := by + calc + (∑ _b ∈ I, (s : ℝ) ^ 2 / K) = (s : ℝ) ^ 3 / K := by + rw [Finset.sum_const, nsmul_eq_mul, hI] + ring + _ ≤ R := hlower + _ = ∑ b ∈ I, row b := hrows.symm + obtain ⟨b, hb, hrow⟩ := Finset.exists_le_of_sum_le + (s := I) (f := fun _ => (s : ℝ) ^ 2 / K) (g := row) hne hmean + let A := I.filter (fun a => (s : ℝ) / (2 * K) ≤ (T a ∩ T b).card) + refine ⟨b, hb, A, ?_, ?_, ?_⟩ + · intro a ha + exact (Finset.mem_filter.mp ha).1 + · apply popular_card_lower I (fun a => ((T a ∩ T b).card : ℝ)) + (s : ℝ) ((s : ℝ) / (2 * K)) hs + · exact div_nonneg hs.le (mul_nonneg zero_le_two hKpos.le) + · exact congrArg (fun n : ℕ => (n : ℝ)) hI + · intro a ha + apply Nat.cast_le.mpr + exact (Finset.card_le_card Finset.inter_subset_left).trans_eq (hT a ha) + · calc + 2 * (s : ℝ) * ((s : ℝ) / (2 * K)) = (s : ℝ) ^ 2 / K := by + field_simp [ne_of_gt hKpos] + _ ≤ ∑ a ∈ I, ((T a ∩ T b).card : ℝ) := hrow + · intro a ha + exact (Finset.mem_filter.mp ha).2 + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/PopularScalars.lean b/lean/OAI/Combinatorics/Ryser/Incidence/PopularScalars.lean new file mode 100644 index 0000000000000000000000000000000000000000..78b7f3b971dbc11c45861699b2da0548823fed4d --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/PopularScalars.lean @@ -0,0 +1,163 @@ +import OAI.Combinatorics.Ryser.Incidence.FiniteSets +import OAI.Combinatorics.Ryser.Incidence.PopularOverlap +import Mathlib.Algebra.Group.Pointwise.Finset.Scalar +import Mathlib.Algebra.Field.Basic +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +namespace OAI + +open scoped Pointwise + +namespace RyserCoveringCounterexample.Incidence + +variable {F : Type*} [Field F] [DecidableEq F] + +private theorem card_field_smul (c : F) (hc : c ≠ 0) (X : Finset F) : + (c • X).card = X.card := by + change (X.image (fun x : F => c * x)).card = X.card + apply Finset.card_image_of_injective + intro x y h + exact mul_left_cancel₀ hc h + +private theorem field_smul_smul (c d : F) (X : Finset F) : + c • (d • X) = (c * d) • X := by + change (X.image (fun x : F => d * x)).image (fun y : F => c * y) = + X.image (fun x : F => (c * d) * x) + rw [Finset.image_image] + apply Finset.image_congr + intro x hx + exact (mul_assoc c d x).symm + +private theorem field_one_smul (X : Finset F) : (1 : F) • X = X := by + change X.image (fun x : F => 1 * x) = X + simp only [one_mul, Finset.image_id'] + +private theorem field_smul_sub (c : F) (X Y : Finset F) : + c • (X - Y) = c • X - c • Y := by + ext z + constructor + · intro hz + obtain ⟨w, hw, rfl⟩ := Finset.mem_smul_finset.mp hz + obtain ⟨x, hx, y, hy, rfl⟩ := Finset.mem_sub.mp hw + change c * (x - y) ∈ c • X - c • Y + rw [mul_sub] + exact Finset.sub_mem_sub (Finset.smul_mem_smul_finset hx) + (Finset.smul_mem_smul_finset hy) + · intro hz + obtain ⟨x, hx, y, hy, rfl⟩ := Finset.mem_sub.mp hz + obtain ⟨u, hu, rfl⟩ := Finset.mem_smul_finset.mp hx + obtain ⟨v, hv, rfl⟩ := Finset.mem_smul_finset.mp hy + refine Finset.mem_smul_finset.mpr ⟨u - v, Finset.sub_mem_sub hu hv, ?_⟩ + change c * (u - v) = c * u - c * v + exact mul_sub c u v + +private theorem field_smul_inter (c : F) (hc : c ≠ 0) (X Y : Finset F) : + c • (X ∩ Y) = c • X ∩ c • Y := by + change (X ∩ Y).image (fun x : F => c * x) = + X.image (fun x : F => c * x) ∩ Y.image (fun x : F => c * x) + apply Finset.image_inter + intro x y h + exact mul_left_cancel₀ hc h + +private theorem quotient_overlap_card (S : Finset F) (a b : F) (ha : a ≠ 0) : + ((a⁻¹ • S) ∩ (b⁻¹ • S)).card = (S ∩ (b⁻¹ * a) • S).card := by + calc + ((a⁻¹ • S) ∩ (b⁻¹ • S)).card = + (a • ((a⁻¹ • S) ∩ (b⁻¹ • S))).card := + (card_field_smul a ha _).symm + _ = (S ∩ (b⁻¹ * a) • S).card := by + rw [field_smul_inter a ha, field_smul_smul, field_smul_smul, + mul_inv_cancel₀ ha, field_one_smul, mul_comm a b⁻¹] + +private theorem popular_difference_bound (S : Finset F) (c : F) (hc : c ≠ 0) + (K : ℝ) (hS : S.Nonempty) (hK : 0 < K) + (hsub : ((S - S).card : ℝ) ≤ K * S.card) + (hoverlap : (S.card : ℝ) / (2 * K) ≤ (S ∩ c • S).card) : + ((S - c • S).card : ℝ) ≤ 2 * K ^ 3 * S.card := by + let Z := S ∩ c • S + have hspos : 0 < (S.card : ℝ) := by exact_mod_cast hS.card_pos + have hleftNat : (S - Z).card ≤ (S - S).card := + Finset.card_le_card (Finset.sub_subset_sub (fun _ h => h) Finset.inter_subset_left) + have hrightNat : (Z - c • S).card ≤ (c • S - c • S).card := + Finset.card_le_card (Finset.sub_subset_sub Finset.inter_subset_right (fun _ h => h)) + rw [← field_smul_sub c S S, card_field_smul c hc (S - S)] at hrightNat + have hleft : ((S - Z).card : ℝ) ≤ K * S.card := + (show ((S - Z).card : ℝ) ≤ (S - S).card by exact_mod_cast hleftNat).trans hsub + have hright : ((Z - c • S).card : ℝ) ≤ K * S.card := + (show ((Z - c • S).card : ℝ) ≤ (S - S).card by exact_mod_cast hrightNat).trans hsub + have htriangle : ((S - c • S).card : ℝ) * Z.card ≤ + ((S - Z).card : ℝ) * (Z - c • S).card := by + exact_mod_cast triangle_card_le S (c • S) Z + have hproduct : ((S - c • S).card : ℝ) * Z.card ≤ + (K * S.card) * (K * S.card) := + htriangle.trans (mul_le_mul hleft hright (Nat.cast_nonneg _) + (mul_nonneg hK.le (Nat.cast_nonneg _))) + have hpopular : (S.card : ℝ) ≤ (Z.card : ℝ) * (2 * K) := + (div_le_iff₀ (by positivity : 0 < 2 * K)).mp hoverlap + have hfinal : ((S - c • S).card : ℝ) * S.card ≤ + (2 * K ^ 3 * S.card) * S.card := calc + ((S - c • S).card : ℝ) * S.card ≤ + ((S - c • S).card : ℝ) * ((Z.card : ℝ) * (2 * K)) := + mul_le_mul_of_nonneg_left hpopular (Nat.cast_nonneg _) + _ = (2 * K) * (((S - c • S).card : ℝ) * Z.card) := by ring + _ ≤ (2 * K) * ((K * S.card) * (K * S.card)) := + mul_le_mul_of_nonneg_left hproduct (by positivity) + _ = (2 * K ^ 3 * S.card) * S.card := by ring + exact le_of_mul_le_mul_right hfinal hspos + +theorem exists_popular_scalars (S : Finset F) (K : ℝ) (hS : S.Nonempty) + (hzero : (0 : F) ∉ S) (hK : 2 ≤ K) + (hsub : ((S - S).card : ℝ) ≤ K * S.card) + (hdiv : ((S / S).card : ℝ) ≤ K * S.card) : + ∃ B E : Finset F, E ⊆ B ∧ B.card = S.card ∧ + (S.card : ℝ) / (2 * K) ≤ E.card ∧ + ((B - B).card : ℝ) ≤ K * B.card ∧ + ∀ e ∈ E, ((B - e • B).card : ℝ) ≤ 2 * K ^ 3 * B.card := by + classical + have hnonzero : ∀ a ∈ S, a ≠ (0 : F) := by + rintro a ha rfl + exact hzero ha + have hKpos : 0 < K := lt_of_lt_of_le (by norm_num) hK + have hquotient : ∀ a ∈ S, a⁻¹ • S ⊆ S / S := by + intro a ha z hz + obtain ⟨x, hx, rfl⟩ := Finset.mem_smul_finset.mp hz + refine Finset.mem_div.mpr ⟨x, hx, a, ha, ?_⟩ + change x / a = a⁻¹ * x + rw [div_eq_mul_inv, mul_comm] + obtain ⟨b, hb, A, hAS, hAcard, hpopular⟩ := + exists_popular_intersections S (fun a : F => a⁻¹ • S) (S / S) S.card K + rfl hS (fun a ha => card_field_smul a⁻¹ (inv_ne_zero (hnonzero a ha)) S) + hquotient hdiv hK + have hb0 : b ≠ 0 := hnonzero b hb + have hBcard : (b⁻¹ • S).card = S.card := + card_field_smul b⁻¹ (inv_ne_zero hb0) S + have hEcard : (b⁻¹ • A).card = A.card := + card_field_smul b⁻¹ (inv_ne_zero hb0) A + refine ⟨b⁻¹ • S, b⁻¹ • A, Finset.smul_finset_subset_smul_finset hAS, + hBcard, ?_, ?_, ?_⟩ + · simpa only [hEcard] using hAcard + · rw [← field_smul_sub b⁻¹ S S, + card_field_smul b⁻¹ (inv_ne_zero hb0) (S - S), hBcard] + exact hsub + · intro e he + obtain ⟨a, ha, hae⟩ := Finset.mem_smul_finset.mp he + change b⁻¹ * a = e at hae + subst e + have ha0 : a ≠ 0 := hnonzero a (hAS ha) + have he0 : b⁻¹ * a ≠ 0 := mul_ne_zero (inv_ne_zero hb0) ha0 + have hoverlap : (S.card : ℝ) / (2 * K) ≤ (S ∩ (b⁻¹ * a) • S).card := by + rw [← quotient_overlap_card S a b ha0] + exact hpopular a ha + have hbound := popular_difference_bound S (b⁻¹ * a) he0 K hS hKpos hsub hoverlap + have hscale : b⁻¹ • S - (b⁻¹ * a) • (b⁻¹ • S) = + b⁻¹ • (S - (b⁻¹ * a) • S) := by + rw [field_smul_sub] + congr 1 + rw [field_smul_smul, field_smul_smul, mul_comm (b⁻¹ * a) b⁻¹] + rw [hscale, card_field_smul b⁻¹ (inv_ne_zero hb0) (S - (b⁻¹ * a) • S), hBcard] + exact hbound + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/PrunedContradiction.lean b/lean/OAI/Combinatorics/Ryser/Incidence/PrunedContradiction.lean new file mode 100644 index 0000000000000000000000000000000000000000..3a037d9c9523668c88036d04878282e958412fe1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/PrunedContradiction.lean @@ -0,0 +1,105 @@ +import OAI.Combinatorics.Ryser.Incidence.FourAnchors +import OAI.Combinatorics.Ryser.Incidence.CoordinateTransfer +import OAI.Combinatorics.Ryser.Geometry.Normalization +import OAI.Combinatorics.Ryser.Incidence.WalkQuotients +import OAI.Combinatorics.Ryser.Incidence.GraphParameters +import OAI.Combinatorics.Ryser.Incidence.ExtractedContradiction + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence +noncomputable section +open scoped Pointwise +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + +theorem pruned_incidence_impossible + (P : Finset (ProjectivePoint F)) (L : Finset (ProjectiveLine F)) + (r U : ℝ) (hr : 0 < r) (hrq : r ^ 2 = (Fintype.card F : ℝ)) + (hU : 2 ≤ U) (hlarge : 4096 * U ^ 7 ≤ r) + (hremove : (96 / witnessConstant) * U ^ 42 ≤ r) + (hfirst : 32 * (graphScale U) ^ 2 * (expansionScale (graphScale U)) ^ 127942 < 3 * r) + (hsecond : 4096 * (graphScale U) ^ 6 * (expansionScale (graphScale U)) ^ 3 < 27 * r) + (hthird : 2 * (expansionScale (graphScale U)) ^ 527 * graphScale U ≤ r) + (hproper : ∀ M : Subfield F, M ≠ ⊤ → + (Nat.card M : ℝ) ^ 3 ≤ (Fintype.card F : ℝ)) + (hPlo : r ^ 2 / (32 * U ^ 4) ≤ (P.card : ℝ)) + (hPup : (P.card : ℝ) ≤ U * r ^ 2) + (hLup : (L.card : ℝ) ≤ U * r ^ 2) + (hpoints : ∀ p ∈ P, r / (8 * U ^ 2) ≤ + ((L.filter fun l => ProjectiveIncidence p l).card : ℝ)) + (hlines : ∀ l ∈ L, r / (8 * U ^ 2) ≤ + ((P.filter fun p => ProjectiveIncidence p l).card : ℝ)) + (hmax : ∀ p ∈ P, ((L.filter fun l => ProjectiveIncidence p l).card : ℝ) ≤ + 16 * U ^ 3 * r) + (hcap : ∀ l, ((P.filter fun p => ProjectiveIncidence p l).card : ℝ) ≤ + 16 * U ^ 3 * r) : False := by + classical + obtain ⟨c, hc, hwitnesses⟩ := fourAnchors_of_pruned_r P L hr hU hlarge + hPlo hPup hLup hpoints hlines (fun l _ => hcap l) + rcases c with ⟨ell, triple, p4⟩ + rcases triple with ⟨p1, p2, p3⟩ + obtain ⟨hell, hp1, hp2, hp3, hp4, hi1, hi2, hi3, hnot4, h21, h31, h32⟩ := + (mem_anchorConfigurations ProjectiveIncidence P L + ⟨ell, (⟨p1, p2, p3⟩, p4)⟩).mp hc + obtain ⟨T, hT1, hT2, hT3, hT4⟩ := + exists_projectiveTransform_normalization h21.symm h31.symm h32.symm hi1 hi2 hi3 hnot4 + let W := anchorWitnesses ProjectiveIncidence P L ⟨ell, (⟨p1, p2, p3⟩, p4)⟩ + have hWP : W ⊆ P := by + intro w hw + exact (Finset.mem_filter.mp hw).1 + have hj {w p : ProjectivePoint F} + (h : p ∈ joinedNeighbors ProjectiveIncidence P L w) : + ∃ l ∈ L, ProjectiveIncidence p l ∧ ProjectiveIncidence w l := by + simp only [joinedNeighbors, Finset.mem_filter] at h + obtain ⟨_, _, l, hl, hwl, hpl⟩ := h + exact ⟨l, hl, hpl, hwl⟩ + have hjoins (w : ProjectivePoint F) (hw : w ∈ W) : + (∃ l ∈ L, ProjectiveIncidence p1 l ∧ ProjectiveIncidence w l) ∧ + (∃ l ∈ L, ProjectiveIncidence p2 l ∧ ProjectiveIncidence w l) ∧ + (∃ l ∈ L, ProjectiveIncidence p3 l ∧ ProjectiveIncidence w l) ∧ + (∃ l ∈ L, ProjectiveIncidence p4 l ∧ ProjectiveIncidence w l) := by + have hh := (Finset.mem_filter.mp hw).2 + exact ⟨hj hh.1, hj hh.2.1, hj hh.2.2.1, hj hh.2.2.2⟩ + obtain ⟨hretained, hnonzero, hleft, hright, hdiff, hquot⟩ := + coordinate_transfer P W L T p1 p2 p3 p4 (16 * U ^ 3 * r) hWP hcap + (fun p hp => hmax p hp) hp1 hp2 hp3 hp4 hT1 hT2 hT3 hT4 hjoins + let G := coordinateGraph T W + let A := G.image Prod.fst + let B := G.image Prod.snd + let V := graphScale U + let K := expansionScale V + have hUpos : 0 < U := lt_of_lt_of_le (by norm_num) hU + have hVpos : 0 < V := graphScale_pos hUpos + have hV : 2 ≤ V := (graphScale_bounds hU).1 + have hK : 2 ≤ K := two_le_expansionScale hV + have hdegree : 16 * U ^ 3 * r ≤ V * r := + mul_le_mul_of_nonneg_right (graphScale_bounds hU).2 hr.le + have hGcard : r ^ 2 / V ≤ (G.card : ℝ) := + retained_witness_lower r U W.card G.card hr hU hwitnesses hretained hremove + have hG : G ⊆ A ×ˢ B := by + intro z hz + exact Finset.mem_product.mpr + ⟨Finset.mem_image_of_mem Prod.fst hz, Finset.mem_image_of_mem Prod.snd hz⟩ + have hA0 (a : F) (ha : a ∈ A) : a ≠ 0 := by + obtain ⟨z, hz, rfl⟩ := Finset.mem_image.mp ha + exact (hnonzero z hz).1 + have hB0 (b : F) (hb : b ∈ B) : b ≠ 0 := by + obtain ⟨z, hz, rfl⟩ := Finset.mem_image.mp hb + exact (hnonzero z hz).2 + obtain ⟨S, hSA, hSlo, hShi, hSdiff, hSquot⟩ := + exists_simultaneous_small_difference_quotient A B G hG hA0 hB0 hr hV + (hleft.trans hdegree) (hright.trans hdegree) hGcard + (hdiff.trans hdegree) (hquot.trans hdegree) + have hS0 : (0 : F) ∉ S := by + intro h + exact hA0 0 (hSA h) rfl + have hexpand : 2 ^ 20 * V ^ 22 * r ≤ K * (S.card : ℝ) := + extraction_expansion_le r V S.card hr.le hVpos hSlo + exact extracted_set_contradiction S r V K hS0 hK hVpos hr hrq + (hSdiff.trans hexpand) (hSquot.trans hexpand) hproper hSlo hShi + hfirst hsecond hthird + +end +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/Pruning.lean b/lean/OAI/Combinatorics/Ryser/Incidence/Pruning.lean new file mode 100644 index 0000000000000000000000000000000000000000..481eca9df66984bfec720fe5fab38edfd5d8cc8a --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/Pruning.lean @@ -0,0 +1,141 @@ +import OAI.Combinatorics.Ryser.Incidence.PruningHigh +import OAI.Combinatorics.Ryser.Incidence.DegreeSquares +import OAI.Combinatorics.Ryser.Incidence.AllLineCap +import OAI.Combinatorics.Ryser.Incidence.PruningNumerics + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.Incidence + +variable {Pt Ln : Type*} [instDecidableEqPt : DecidableEq Pt] [instDecidableEqLn : DecidableEq Ln] + +theorem incidenceCount_le_card_mul (R : Pt → Ln → Prop) (P : Finset Pt) + (L : Finset Ln) : incidenceCount R P L ≤ P.card * L.card := let _ := instDecidableEqPt; let _ := instDecidableEqLn; by + calc + incidenceCount R P L ≤ ∑ p ∈ P, L.card := by + apply Finset.sum_le_sum + intro p _ + exact Finset.card_le_card (Finset.filter_subset _ _) + _ = P.card * L.card := by simp + +theorem incidenceCount_le_card_mul_max (R : Pt → Ln → Prop) (P : Finset Pt) + (L : Finset Ln) {H : ℝ} (hmax : ∀ p ∈ P, (leftDegree R L p : ℝ) ≤ H) : + (incidenceCount R P L : ℝ) ≤ (P.card : ℝ) * H := let _ := instDecidableEqPt; let _ := instDecidableEqLn; by + calc + (incidenceCount R P L : ℝ) = ∑ p ∈ P, (leftDegree R L p : ℝ) := by + simp only [incidenceCount, Nat.cast_sum] + _ ≤ ∑ p ∈ P, H := Finset.sum_le_sum hmax + _ = (P.card : ℝ) * H := by simp + +variable {F : Type*} [Field F] [DecidableEq F] + +theorem exists_projective_pruning_sqrt (P : Finset (ProjectivePoint F)) + (L : Finset (ProjectiveLine F)) {U q : ℝ} (hU : 2 ≤ U) (hq : 0 < q) + (hd : 2 ≤ lowerDegreeCutoff U q) + (hP : (P.card : ℝ) ≤ U * q) (hL : (L.card : ℝ) ≤ U * q) + (hI : q * Real.sqrt q / U ≤ (incidenceCount ProjectiveIncidence P L : ℝ)) : + ∃ P' : Finset (ProjectivePoint F), P' ⊆ P ∧ + ∃ L' : Finset (ProjectiveLine F), L' ⊆ L ∧ + q * Real.sqrt q / (2 * U) ≤ (incidenceCount ProjectiveIncidence P' L' : ℝ) ∧ + q / (32 * U ^ 4) ≤ (P'.card : ℝ) ∧ + q / (32 * U ^ 4) ≤ (L'.card : ℝ) ∧ + (P'.card : ℝ) ≤ U * q ∧ (L'.card : ℝ) ≤ U * q ∧ + MinimumDegrees ProjectiveIncidence (lowerDegreeCutoff U q) P' L' ∧ + (∀ p ∈ P', (leftDegree ProjectiveIncidence L' p : ℝ) ≤ upperDegreeCutoff U q) ∧ + (∀ l ∈ L', (rightDegree ProjectiveIncidence P' l : ℝ) ≤ upperDegreeCutoff U q) ∧ + (∀ l : ProjectiveLine F, + (rightDegree ProjectiveIncidence P' l : ℝ) ≤ upperDegreeCutoff U q) := by + classical + have hUpos : 0 < U := lt_of_lt_of_le (by norm_num) hU + have hUq : 0 ≤ U * q := mul_nonneg hUpos.le hq.le + have hIcard : (incidenceCount ProjectiveIncidence P L : ℝ) ≤ + (P.card : ℝ) * (L.card : ℝ) := by + exact_mod_cast incidenceCount_le_card_mul ProjectiveIncidence P L + have hprod : (P.card : ℝ) * (L.card : ℝ) ≤ (U * q) ^ 2 := by + simpa only [pow_two] using mul_le_mul hP hL (Nat.cast_nonneg _) hUq + have hPsq : (P.card : ℝ) ^ 2 ≤ (U * q) ^ 2 := + (sq_le_sq₀ (Nat.cast_nonneg _) hUq).2 hP + have hLsq : (L.card : ℝ) ^ 2 ≤ (U * q) ^ 2 := + (sq_le_sq₀ (Nat.cast_nonneg _) hUq).2 hL + have hBP : (∑ p ∈ P, (leftDegree ProjectiveIncidence L p : ℝ) ^ 2) ≤ + 2 * U ^ 2 * q ^ 2 := by + have hs := sum_projective_leftDegree_sq_le P L + nlinarith + have hBL : (∑ l ∈ L, (rightDegree ProjectiveIncidence P l : ℝ) ^ 2) ≤ + 2 * U ^ 2 * q ^ 2 := by + have hs := sum_projective_rightDegree_sq_le P L + nlinarith + have hHpos := upperDegreeCutoff_pos hUpos hq + have hdpos := lowerDegreeCutoff_pos hUpos hq + obtain ⟨P', hP', L', hL', hmin, hmaxP, hmaxL, hloss⟩ := + exists_pruned_core ProjectiveIncidence P L hdpos.le hHpos hBP hBL + have hPbound : (P'.card : ℝ) ≤ U * q := by + have hsub : (P'.card : ℝ) ≤ (P.card : ℝ) := by + exact_mod_cast Finset.card_le_card hP' + exact hsub.trans hP + have hLbound : (L'.card : ℝ) ≤ U * q := by + have hsub : (L'.card : ℝ) ≤ (L.card : ℝ) := by + exact_mod_cast Finset.card_le_card hL' + exact hsub.trans hL + have hIbound : q * Real.sqrt q / (2 * U) ≤ + (incidenceCount ProjectiveIncidence P' L' : ℝ) := by + have hcharge := mul_le_mul_of_nonneg_left (add_le_add hP hL) hdpos.le + have hbudget := pruning_budget_exact hUpos hq + linarith + have hPcard : q / (32 * U ^ 4) ≤ (P'.card : ℝ) := by + rw [← pruned_card_ratio hUpos hq] + apply (div_le_iff₀ hHpos).2 + exact hIbound.trans (incidenceCount_le_card_mul_max ProjectiveIncidence P' L' hmaxP) + have hLcard : q / (32 * U ^ 4) ≤ (L'.card : ℝ) := by + rw [← pruned_card_ratio hUpos hq] + apply (div_le_iff₀ hHpos).2 + have hswap : (incidenceCount ProjectiveIncidence P' L' : ℝ) = + (incidenceCount (fun l p => ProjectiveIncidence p l) L' P' : ℝ) := by + rw [incidenceCount_swap] + rw [hswap] at hIbound + exact hIbound.trans (incidenceCount_le_card_mul_max + (fun l p => ProjectiveIncidence p l) L' P' hmaxL) + refine ⟨P', hP', L', hL', hIbound, hPcard, hLcard, hPbound, hLbound, + hmin, hmaxP, hmaxL, ?_⟩ + intro l + exact (projective_all_line_cap P' L' (by linarith) hmin.1 l).trans + (all_line_cap_numeric hUpos hq hd hLbound) + +theorem exists_projective_pruning (P : Finset (ProjectivePoint F)) + (L : Finset (ProjectiveLine F)) {U q r : ℝ} (hU : 2 ≤ U) (hq : 0 < q) + (hsq : r ^ 2 = q) (hr : 16 * U ^ 2 ≤ r) + (hP : (P.card : ℝ) ≤ U * q) (hL : (L.card : ℝ) ≤ U * q) + (hI : q * r / U ≤ (incidenceCount ProjectiveIncidence P L : ℝ)) : + ∃ P' : Finset (ProjectivePoint F), P' ⊆ P ∧ + ∃ L' : Finset (ProjectiveLine F), L' ⊆ L ∧ + q * r / (2 * U) ≤ (incidenceCount ProjectiveIncidence P' L' : ℝ) ∧ + q / (32 * U ^ 4) ≤ (P'.card : ℝ) ∧ + q / (32 * U ^ 4) ≤ (L'.card : ℝ) ∧ + (P'.card : ℝ) ≤ U * q ∧ (L'.card : ℝ) ≤ U * q ∧ + MinimumDegrees ProjectiveIncidence (r / (8 * U ^ 2)) P' L' ∧ + (∀ p ∈ P', (leftDegree ProjectiveIncidence L' p : ℝ) ≤ 16 * U ^ 3 * r) ∧ + (∀ l ∈ L', (rightDegree ProjectiveIncidence P' l : ℝ) ≤ 16 * U ^ 3 * r) ∧ + (∀ l : ProjectiveLine F, (rightDegree ProjectiveIncidence P' l : ℝ) ≤ + 16 * U ^ 3 * r) := by + have hUpos : 0 < U := lt_of_lt_of_le (by norm_num) hU + have hrnonneg : 0 ≤ r := (mul_nonneg (by norm_num) (sq_nonneg U)).trans hr + have hsqrt : Real.sqrt q = r := (Real.sqrt_eq_iff_eq_sq hq.le hrnonneg).2 hsq.symm + have hd : 2 ≤ lowerDegreeCutoff U q := by + unfold lowerDegreeCutoff + rw [hsqrt] + apply (le_div_iff₀ (mul_pos (by norm_num) (pow_pos hUpos 2))).2 + nlinarith + have hI' : q * Real.sqrt q / U ≤ (incidenceCount ProjectiveIncidence P L : ℝ) := by + simpa only [hsqrt] using hI + simpa only [lowerDegreeCutoff, upperDegreeCutoff, hsqrt] using + exists_projective_pruning_sqrt P L hU hq hd hP hL hI' + +end RyserCoveringCounterexample.Incidence + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/PruningCore.lean b/lean/OAI/Combinatorics/Ryser/Incidence/PruningCore.lean new file mode 100644 index 0000000000000000000000000000000000000000..a57384cdcaeb5c7758ce15b8e977b8639282eaf0 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/PruningCore.lean @@ -0,0 +1,150 @@ +import Mathlib.Basic.Real.Basic +import Mathlib.Algebra.BigOperators.Ring.Finset +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.Incidence + +variable {Pt Ln : Type*} [instDecidableEqPt : DecidableEq Pt] [instDecidableEqLn : DecidableEq Ln] + +def leftDegree (R : Pt → Ln → Prop) (L : Finset Ln) (p : Pt) : ℕ := by + classical + exact (L.filter (R p)).card + +def rightDegree (R : Pt → Ln → Prop) (P : Finset Pt) (l : Ln) : ℕ := + leftDegree (fun l p => R p l) P l + +def incidenceCount (R : Pt → Ln → Prop) (P : Finset Pt) (L : Finset Ln) : ℕ := + ∑ p ∈ P, leftDegree R L p + +theorem leftDegree_eq_sum (R : Pt → Ln → Prop) (L : Finset Ln) (p : Pt) : + leftDegree R L p = ∑ l ∈ L, if R p l then 1 else 0 := let _ := instDecidableEqPt; let _ := instDecidableEqLn; by + classical + exact (Finset.sum_boole (R := ℕ) (R p) L).symm + +theorem incidenceCount_swap (R : Pt → Ln → Prop) (P : Finset Pt) (L : Finset Ln) : + incidenceCount R P L = incidenceCount (fun l p => R p l) L P := by + classical + simp only [incidenceCount, leftDegree_eq_sum] + exact Finset.sum_comm + +theorem leftDegree_mono (R : Pt → Ln → Prop) {L L' : Finset Ln} + (hL : L ⊆ L') (p : Pt) : leftDegree R L p ≤ leftDegree R L' p := let _ := instDecidableEqPt; let _ := instDecidableEqLn; by + classical + exact Finset.card_le_card (Finset.filter_subset_filter (R p) hL) + +theorem rightDegree_mono (R : Pt → Ln → Prop) {P P' : Finset Pt} + (hP : P ⊆ P') (l : Ln) : rightDegree R P l ≤ rightDegree R P' l := + leftDegree_mono (fun l p => R p l) hP l + +theorem incidenceCount_erase_left (R : Pt → Ln → Prop) (P : Finset Pt) + (L : Finset Ln) {p : Pt} (hp : p ∈ P) : + incidenceCount R (P.erase p) L + leftDegree R L p = incidenceCount R P L := let _ := instDecidableEqLn; + Finset.sum_erase_add P (leftDegree R L) hp + +theorem incidenceCount_erase_right (R : Pt → Ln → Prop) (P : Finset Pt) + (L : Finset Ln) {l : Ln} (hl : l ∈ L) : + incidenceCount R P (L.erase l) + rightDegree R P l = incidenceCount R P L := by + rw [incidenceCount_swap R P (L.erase l), incidenceCount_swap R P L] + exact incidenceCount_erase_left (fun l p => R p l) L P hl + +def pruningPotential (R : Pt → Ln → Prop) (d : ℝ) (P : Finset Pt) (L : Finset Ln) : ℝ := + (incidenceCount R P L : ℝ) - d * ((P.card : ℝ) + (L.card : ℝ)) + +theorem pruningPotential_le_erase_left (R : Pt → Ln → Prop) (d : ℝ) + (P : Finset Pt) (L : Finset Ln) {p : Pt} (hp : p ∈ P) + (hdeg : (leftDegree R L p : ℝ) ≤ d) : + pruningPotential R d P L ≤ pruningPotential R d (P.erase p) L := by + have hcount : (incidenceCount R (P.erase p) L : ℝ) + (leftDegree R L p : ℝ) = + (incidenceCount R P L : ℝ) := by + exact_mod_cast incidenceCount_erase_left R P L hp + have hcard : ((P.erase p).card : ℝ) + 1 = (P.card : ℝ) := by + exact_mod_cast Finset.card_erase_add_one hp + unfold pruningPotential + rw [← hcount, ← hcard] + nlinarith + +theorem pruningPotential_le_erase_right (R : Pt → Ln → Prop) (d : ℝ) + (P : Finset Pt) (L : Finset Ln) {l : Ln} (hl : l ∈ L) + (hdeg : (rightDegree R P l : ℝ) ≤ d) : + pruningPotential R d P L ≤ pruningPotential R d P (L.erase l) := by + have hcount : (incidenceCount R P (L.erase l) : ℝ) + (rightDegree R P l : ℝ) = + (incidenceCount R P L : ℝ) := by + exact_mod_cast incidenceCount_erase_right R P L hl + have hcard : ((L.erase l).card : ℝ) + 1 = (L.card : ℝ) := by + exact_mod_cast Finset.card_erase_add_one hl + unfold pruningPotential + rw [← hcount, ← hcard] + nlinarith + +def MinimumDegrees (R : Pt → Ln → Prop) (d : ℝ) (P : Finset Pt) (L : Finset Ln) : Prop := + (∀ p ∈ P, d ≤ (leftDegree R L p : ℝ)) ∧ + (∀ l ∈ L, d ≤ (rightDegree R P l : ℝ)) + +private theorem exists_degree_core_aux (R : Pt → Ln → Prop) (d : ℝ) (n : ℕ) : + ∀ (P : Finset Pt) (L : Finset Ln), P.card + L.card = n → + ∃ P' : Finset Pt, P' ⊆ P ∧ ∃ L' : Finset Ln, L' ⊆ L ∧ + MinimumDegrees R d P' L' ∧ pruningPotential R d P L ≤ pruningPotential R d P' L' := by + classical + induction n using Nat.strong_induction_on with + | h n ih => + intro P L hsize + by_cases hpmin : ∀ p ∈ P, d ≤ (leftDegree R L p : ℝ) + · by_cases hlmin : ∀ l ∈ L, d ≤ (rightDegree R P l : ℝ) + · exact ⟨P, Finset.Subset.refl _, L, Finset.Subset.refl _, ⟨hpmin, hlmin⟩, le_rfl⟩ + · have hex : ∃ l ∈ L, (rightDegree R P l : ℝ) < d := by + by_contra hnone + apply hlmin + intro l hl + apply le_of_not_gt + intro hdeg + exact hnone ⟨l, hl, hdeg⟩ + obtain ⟨l, hl, hdeg⟩ := hex + have hlt : P.card + (L.erase l).card < n := by + rw [← hsize] + exact Nat.add_lt_add_left (Finset.card_erase_lt_of_mem hl) _ + obtain ⟨P', hP', L', hL', hmin, hpot⟩ := ih _ hlt P (L.erase l) rfl + exact ⟨P', hP', L', hL'.trans (Finset.erase_subset _ _), hmin, + (pruningPotential_le_erase_right R d P L hl hdeg.le).trans hpot⟩ + · have hex : ∃ p ∈ P, (leftDegree R L p : ℝ) < d := by + by_contra hnone + apply hpmin + intro p hp + apply le_of_not_gt + intro hdeg + exact hnone ⟨p, hp, hdeg⟩ + obtain ⟨p, hp, hdeg⟩ := hex + have hlt : (P.erase p).card + L.card < n := by + rw [← hsize] + exact Nat.add_lt_add_right (Finset.card_erase_lt_of_mem hp) _ + obtain ⟨P', hP', L', hL', hmin, hpot⟩ := ih _ hlt (P.erase p) L rfl + exact ⟨P', hP'.trans (Finset.erase_subset _ _), L', hL', hmin, + (pruningPotential_le_erase_left R d P L hp hdeg.le).trans hpot⟩ + +theorem exists_degree_core (R : Pt → Ln → Prop) (d : ℝ) (P : Finset Pt) (L : Finset Ln) : + ∃ P' : Finset Pt, P' ⊆ P ∧ ∃ L' : Finset Ln, L' ⊆ L ∧ + MinimumDegrees R d P' L' ∧ pruningPotential R d P L ≤ pruningPotential R d P' L' := + exists_degree_core_aux R d (P.card + L.card) P L rfl + +theorem degree_core_incidence_lower_bound (R : Pt → Ln → Prop) {d : ℝ} (hd : 0 ≤ d) + (P P' : Finset Pt) (L L' : Finset Ln) + (hpot : pruningPotential R d P L ≤ pruningPotential R d P' L') : + (incidenceCount R P L : ℝ) - d * ((P.card : ℝ) + (L.card : ℝ)) ≤ + (incidenceCount R P' L' : ℝ) := let _ := instDecidableEqPt; let _ := instDecidableEqLn; by + have hnonneg : 0 ≤ d * ((P'.card : ℝ) + (L'.card : ℝ)) := + mul_nonneg hd (add_nonneg (Nat.cast_nonneg _) (Nat.cast_nonneg _)) + unfold pruningPotential at hpot + linarith + +end RyserCoveringCounterexample.Incidence + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/PruningHigh.lean b/lean/OAI/Combinatorics/Ryser/Incidence/PruningHigh.lean new file mode 100644 index 0000000000000000000000000000000000000000..8c7982c5bf4b83e5544b268e758483317ceac0af --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/PruningHigh.lean @@ -0,0 +1,124 @@ +import OAI.Combinatorics.Ryser.Incidence.PruningCore + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.Incidence + +variable {Pt Ln : Type*} [instDecidableEqPt : DecidableEq Pt] [instDecidableEqLn : DecidableEq Ln] + +theorem high_degree_sum_le {A : Type*} (S : Finset A) (deg : A → ℕ) + {H B : ℝ} (hH : 0 < H) (hB : (∑ a ∈ S, (deg a : ℝ) ^ 2) ≤ B) : + (∑ a ∈ S.filter (fun a => ¬ (deg a : ℝ) ≤ H), (deg a : ℝ)) ≤ B / H := by + classical + apply (le_div_iff₀ hH).2 + rw [Finset.sum_mul] + calc + (∑ a ∈ S.filter (fun a => ¬ (deg a : ℝ) ≤ H), (deg a : ℝ) * H) ≤ + ∑ a ∈ S.filter (fun a => ¬ (deg a : ℝ) ≤ H), (deg a : ℝ) ^ 2 := by + apply Finset.sum_le_sum + intro a ha + have hlarge := (Finset.mem_filter.mp ha).2 + have hnonneg : 0 ≤ (deg a : ℝ) := Nat.cast_nonneg _ + nlinarith [lt_of_not_ge hlarge] + _ ≤ ∑ a ∈ S, (deg a : ℝ) ^ 2 := + Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) (by + intro a _ _ + exact sq_nonneg _) + _ ≤ B := hB + +theorem incidenceCount_mono_left (R : Pt → Ln → Prop) {P P' : Finset Pt} + (hP : P ⊆ P') (L : Finset Ln) : incidenceCount R P L ≤ incidenceCount R P' L := let _ := instDecidableEqPt; let _ := instDecidableEqLn; by + apply Finset.sum_le_sum_of_subset_of_nonneg hP + intro p _ _ + exact Nat.zero_le _ + +theorem incidenceCount_mono_right (R : Pt → Ln → Prop) (P : Finset Pt) + {L L' : Finset Ln} (hL : L ⊆ L') : incidenceCount R P L ≤ incidenceCount R P L' := by + apply Finset.sum_le_sum + intro p _ + exact leftDegree_mono R hL p + +theorem high_degree_truncation (R : Pt → Ln → Prop) (P : Finset Pt) (L : Finset Ln) + {H BP BL : ℝ} (hH : 0 < H) + (hBP : (∑ p ∈ P, (leftDegree R L p : ℝ) ^ 2) ≤ BP) + (hBL : (∑ l ∈ L, (rightDegree R P l : ℝ) ^ 2) ≤ BL) : + let P₀ := P.filter (fun p => (leftDegree R L p : ℝ) ≤ H) + let L₀ := L.filter (fun l => (rightDegree R P l : ℝ) ≤ H) + (incidenceCount R P L : ℝ) - BP / H - BL / H ≤ (incidenceCount R P₀ L₀ : ℝ) := by + classical + dsimp only + let P₀ := P.filter (fun p => (leftDegree R L p : ℝ) ≤ H) + let L₀ := L.filter (fun l => (rightDegree R P l : ℝ) ≤ H) + let Pbad := P.filter (fun p => ¬ (leftDegree R L p : ℝ) ≤ H) + let Lbad := L.filter (fun l => ¬ (rightDegree R P l : ℝ) ≤ H) + have hleft : (incidenceCount R P₀ L : ℝ) + + (∑ p ∈ Pbad, (leftDegree R L p : ℝ)) = (incidenceCount R P L : ℝ) := by + simpa only [P₀, Pbad, incidenceCount, Nat.cast_sum] using + Finset.sum_filter_add_sum_filter_not P + (fun p => (leftDegree R L p : ℝ) ≤ H) (fun p => (leftDegree R L p : ℝ)) + have hright : (incidenceCount R P₀ L₀ : ℝ) + + (∑ l ∈ Lbad, (rightDegree R P₀ l : ℝ)) = (incidenceCount R P₀ L : ℝ) := by + rw [incidenceCount_swap R P₀ L₀, incidenceCount_swap R P₀ L] + simpa only [L₀, Lbad, incidenceCount, rightDegree, Nat.cast_sum] using + Finset.sum_filter_add_sum_filter_not L + (fun l => (rightDegree R P l : ℝ) ≤ H) (fun l => (rightDegree R P₀ l : ℝ)) + have hbadP : (∑ p ∈ Pbad, (leftDegree R L p : ℝ)) ≤ BP / H := + high_degree_sum_le P (leftDegree R L) hH hBP + have hbadL : (∑ l ∈ Lbad, (rightDegree R P₀ l : ℝ)) ≤ BL / H := by + calc + _ ≤ ∑ l ∈ Lbad, (rightDegree R P l : ℝ) := by + apply Finset.sum_le_sum + intro l _ + exact_mod_cast rightDegree_mono R (Finset.filter_subset _ _) l + _ ≤ BL / H := high_degree_sum_le L (rightDegree R P) hH hBL + change (incidenceCount R P L : ℝ) - BP / H - BL / H ≤ + (incidenceCount R P₀ L₀ : ℝ) + linarith + +theorem exists_pruned_core (R : Pt → Ln → Prop) (P : Finset Pt) (L : Finset Ln) + {d H BP BL : ℝ} (hd : 0 ≤ d) (hH : 0 < H) + (hBP : (∑ p ∈ P, (leftDegree R L p : ℝ) ^ 2) ≤ BP) + (hBL : (∑ l ∈ L, (rightDegree R P l : ℝ) ^ 2) ≤ BL) : + ∃ P' : Finset Pt, P' ⊆ P ∧ ∃ L' : Finset Ln, L' ⊆ L ∧ + MinimumDegrees R d P' L' ∧ + (∀ p ∈ P', (leftDegree R L' p : ℝ) ≤ H) ∧ + (∀ l ∈ L', (rightDegree R P' l : ℝ) ≤ H) ∧ + (incidenceCount R P L : ℝ) - BP / H - BL / H - + d * ((P.card : ℝ) + (L.card : ℝ)) ≤ (incidenceCount R P' L' : ℝ) := by + classical + let P₀ := P.filter (fun p => (leftDegree R L p : ℝ) ≤ H) + let L₀ := L.filter (fun l => (rightDegree R P l : ℝ) ≤ H) + have hP₀ : P₀ ⊆ P := Finset.filter_subset _ _ + have hL₀ : L₀ ⊆ L := Finset.filter_subset _ _ + obtain ⟨P', hP', L', hL', hmin, hpot⟩ := exists_degree_core R d P₀ L₀ + refine ⟨P', hP'.trans hP₀, L', hL'.trans hL₀, hmin, ?_, ?_, ?_⟩ + · intro p hp + have hdeg := (Finset.mem_filter.mp (hP' hp)).2 + have hmono : (leftDegree R L' p : ℝ) ≤ (leftDegree R L p : ℝ) := by + exact_mod_cast leftDegree_mono R (hL'.trans hL₀) p + exact hmono.trans hdeg + · intro l hl + have hdeg := (Finset.mem_filter.mp (hL' hl)).2 + have hmono : (rightDegree R P' l : ℝ) ≤ (rightDegree R P l : ℝ) := by + exact_mod_cast rightDegree_mono R (hP'.trans hP₀) l + exact hmono.trans hdeg + · have hhigh := high_degree_truncation R P L hH hBP hBL + change (incidenceCount R P L : ℝ) - BP / H - BL / H ≤ + (incidenceCount R P₀ L₀ : ℝ) at hhigh + have hlow := degree_core_incidence_lower_bound R hd P₀ P' L₀ L' hpot + have hcardP : (P₀.card : ℝ) ≤ (P.card : ℝ) := by + exact_mod_cast Finset.card_le_card hP₀ + have hcardL : (L₀.card : ℝ) ≤ (L.card : ℝ) := by + exact_mod_cast Finset.card_le_card hL₀ + have hcharge := mul_le_mul_of_nonneg_left (add_le_add hcardP hcardL) hd + linarith + +end RyserCoveringCounterexample.Incidence + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/PruningNumerics.lean b/lean/OAI/Combinatorics/Ryser/Incidence/PruningNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..5198ec74291a9528db24195599d0e70e84206456 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/PruningNumerics.lean @@ -0,0 +1,68 @@ +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring +import Mathlib.Tactic.Linarith + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence + +noncomputable def upperDegreeCutoff (U q : ℝ) : ℝ := 16 * U ^ 3 * Real.sqrt q + +noncomputable def lowerDegreeCutoff (U q : ℝ) : ℝ := Real.sqrt q / (8 * U ^ 2) + +theorem upperDegreeCutoff_pos {U q : ℝ} (hU : 0 < U) (hq : 0 < q) : + 0 < upperDegreeCutoff U q := + mul_pos (mul_pos (by norm_num) (pow_pos hU _)) (Real.sqrt_pos.mpr hq) + +theorem lowerDegreeCutoff_pos {U q : ℝ} (hU : 0 < U) (hq : 0 < q) : + 0 < lowerDegreeCutoff U q := + div_pos (Real.sqrt_pos.mpr hq) (mul_pos (by norm_num) (pow_pos hU _)) + +private theorem pruning_budget_identity (U q t : ℝ) (hU : U ≠ 0) (ht : t ≠ 0) + (hsq : t ^ 2 = q) : + q * t / U - (2 * U ^ 2 * q ^ 2) / (16 * U ^ 3 * t) - + (2 * U ^ 2 * q ^ 2) / (16 * U ^ 3 * t) - + (t / (8 * U ^ 2)) * (2 * U * q) = q * t / (2 * U) := by + rw [← hsq] + field_simp [hU, ht] + ring + +theorem pruning_budget_exact {U q : ℝ} (hU : 0 < U) (hq : 0 < q) : + q * Real.sqrt q / U - (2 * U ^ 2 * q ^ 2) / upperDegreeCutoff U q - + (2 * U ^ 2 * q ^ 2) / upperDegreeCutoff U q - + lowerDegreeCutoff U q * (2 * U * q) = q * Real.sqrt q / (2 * U) := by + exact pruning_budget_identity U q (Real.sqrt q) hU.ne' + (Real.sqrt_pos.mpr hq).ne' (Real.sq_sqrt hq.le) + +theorem pruned_card_ratio {U q : ℝ} (hU : 0 < U) (hq : 0 < q) : + (q * Real.sqrt q / (2 * U)) / upperDegreeCutoff U q = q / (32 * U ^ 4) := by + have ht := (Real.sqrt_pos.mpr hq).ne' + have hU' := hU.ne' + unfold upperDegreeCutoff + field_simp [hU', ht] + ring + +theorem cutoff_product {U q : ℝ} (hU : 0 < U) (hq : 0 ≤ q) : + upperDegreeCutoff U q * lowerDegreeCutoff U q = 2 * U * q := by + have hU' := hU.ne' + unfold upperDegreeCutoff lowerDegreeCutoff + calc + 16 * U ^ 3 * Real.sqrt q * (Real.sqrt q / (8 * U ^ 2)) = + 2 * U * (Real.sqrt q) ^ 2 := by + field_simp [hU'] + ring + _ = 2 * U * q := by rw [Real.sq_sqrt hq] + +theorem all_line_cap_numeric {U q n : ℝ} (hU : 0 < U) (hq : 0 < q) + (hd : 2 ≤ lowerDegreeCutoff U q) (hn : n ≤ U * q) : + n / (lowerDegreeCutoff U q - 1) ≤ upperDegreeCutoff U q := by + have hH := upperDegreeCutoff_pos hU hq + have hproduct := cutoff_product hU hq.le + have hhalf : upperDegreeCutoff U q ≤ U * q := by nlinarith + apply (div_le_iff₀ (show 0 < lowerDegreeCutoff U q - 1 by linarith)).2 + nlinarith + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/RatioSet.lean b/lean/OAI/Combinatorics/Ryser/Incidence/RatioSet.lean new file mode 100644 index 0000000000000000000000000000000000000000..f42f6c0382c0c7e370e1bc446e61053281c33f54 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/RatioSet.lean @@ -0,0 +1,147 @@ +import Mathlib.Algebra.Group.Pointwise.Finset.Basic +import Mathlib.Algebra.Field.Subfield.Basic +import Mathlib.Data.Finset.Card +import Mathlib.Tactic.Ring + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence +noncomputable section +open scoped Pointwise +variable {F : Type*} [Field F] [DecidableEq F] + +def ratioSet (E : Finset F) : Finset F := + ((E - E) ×ˢ ((E - E).erase 0)).image (fun z => z.1 / z.2) + +def dilateSum (E : Finset F) (c : F) : Finset F := + E + E.image (fun x => c * x) + +theorem mem_dilateSum {E : Finset F} {c z : F} : + z ∈ dilateSum E c ↔ ∃ x ∈ E, ∃ y ∈ E, x + c * y = z := by + constructor + · intro hz + obtain ⟨x, hx, w, hw, hzw⟩ := Finset.mem_add.mp hz + obtain ⟨y, hy, rfl⟩ := Finset.mem_image.mp hw + exact ⟨x, hx, y, hy, hzw⟩ + · rintro ⟨x, hx, y, hy, rfl⟩ + exact Finset.mem_add.mpr ⟨x, hx, c * y, Finset.mem_image.mpr ⟨y, hy, rfl⟩, rfl⟩ + +theorem mem_ratioSet {E : Finset F} {c : F} : + c ∈ ratioSet E ↔ ∃ x ∈ E, ∃ x' ∈ E, ∃ y ∈ E, ∃ y' ∈ E, + y ≠ y' ∧ (x - x') / (y - y') = c := by + constructor + · intro hc + obtain ⟨⟨u, v⟩, huv, huv_eq⟩ := Finset.mem_image.mp hc + obtain ⟨hu, hv⟩ := Finset.mem_product.mp huv + obtain ⟨hv0, hv⟩ := Finset.mem_erase.mp hv + obtain ⟨x, hx, x', hx', rfl⟩ := Finset.mem_sub.mp hu + obtain ⟨y, hy, y', hy', rfl⟩ := Finset.mem_sub.mp hv + exact ⟨x, hx, x', hx', y, hy, y', hy', sub_ne_zero.mp hv0, huv_eq⟩ + · rintro ⟨x, hx, x', hx', y, hy, y', hy', hyy', hquot⟩ + apply Finset.mem_image.mpr + refine ⟨(x - x', y - y'), Finset.mem_product.mpr ⟨?_, ?_⟩, hquot⟩ + · exact Finset.mem_sub.mpr ⟨x, hx, x', hx', rfl⟩ + · exact Finset.mem_erase.mpr ⟨sub_ne_zero.mpr hyy', + Finset.mem_sub.mpr ⟨y, hy, y', hy', rfl⟩⟩ + +theorem mem_ratioSet_of_collision {E : Finset F} {c : F} + {x y x' y' : F} (hx : x ∈ E) (hy : y ∈ E) + (hx' : x' ∈ E) (hy' : y' ∈ E) + (hne : (x, y) ≠ (x', y')) (heq : x + c * y = x' + c * y') : + c ∈ ratioSet E := by + have hyy' : y ≠ y' := by + intro h + apply hne + apply Prod.ext + · exact add_right_cancel (by simpa only [h] using heq) + · exact h + apply mem_ratioSet.mpr + refine ⟨x', hx', x, hx, y, hy, y', hy', hyy', ?_⟩ + apply (div_eq_iff (sub_ne_zero.mpr hyy')).mpr + calc + x' - x = (x' + c * y') - (x + c * y') := by ring + _ = (x + c * y) - (x + c * y') := by rw [heq] + _ = c * (y - y') := by ring + +theorem mem_ratioSet_of_dilateSum_card_lt {E : Finset F} {c : F} + (hcard : (dilateSum E c).card < E.card ^ 2) : c ∈ ratioSet E := by + have hcard' : (dilateSum E c).card < (E ×ˢ E).card := by + simpa only [Finset.card_product, pow_two] using hcard + obtain ⟨z, hz, z', hz', hne, heq⟩ := + Finset.exists_ne_map_eq_of_card_lt_of_maps_to hcard' + (f := fun z : F × F => z.1 + c * z.2) (by + intro z hz + have hzE := Finset.mem_product.mp hz + exact mem_dilateSum.mpr ⟨z.1, hzE.1, z.2, hzE.2, rfl⟩) + have hzE := Finset.mem_product.mp hz + have hzE' := Finset.mem_product.mp hz' + exact mem_ratioSet_of_collision hzE.1 hzE.2 hzE'.1 hzE'.2 hne heq + +theorem zero_mem_ratioSet {E : Finset F} (hE : 2 ≤ E.card) : + (0 : F) ∈ ratioSet E := by + obtain ⟨x, hx, y, hy, hxy⟩ := Finset.one_lt_card.mp hE + exact mem_ratioSet.mpr ⟨x, hx, x, hx, x, hx, y, hy, hxy, by simp⟩ + +theorem one_mem_ratioSet {E : Finset F} (hE : 2 ≤ E.card) : + (1 : F) ∈ ratioSet E := by + obtain ⟨x, hx, y, hy, hxy⟩ := Finset.one_lt_card.mp hE + exact mem_ratioSet.mpr ⟨x, hx, y, hy, x, hx, y, hy, hxy, + div_self (sub_ne_zero.mpr hxy)⟩ + +theorem neg_mem_ratioSet {E : Finset F} {c : F} (hc : c ∈ ratioSet E) : + -c ∈ ratioSet E := by + obtain ⟨x, hx, x', hx', y, hy, y', hy', hyy', hquot⟩ := mem_ratioSet.mp hc + apply mem_ratioSet.mpr + refine ⟨x', hx', x, hx, y, hy, y', hy', hyy', ?_⟩ + rw [← neg_sub x x', neg_div, hquot] + +theorem inv_mem_ratioSet {E : Finset F} {c : F} + (hE : 2 ≤ E.card) (hc : c ∈ ratioSet E) : c⁻¹ ∈ ratioSet E := by + by_cases hc0 : c = 0 + · simpa only [hc0, inv_zero] using zero_mem_ratioSet hE + obtain ⟨x, hx, x', hx', y, hy, y', hy', hyy', hquot⟩ := mem_ratioSet.mp hc + have hxx' : x ≠ x' := by + intro h + apply hc0 + simpa only [h, sub_self, zero_div] using hquot.symm + exact mem_ratioSet.mpr ⟨y, hy, y', hy', x, hx, x', hx', hxx', + by simpa only [inv_div] using congrArg Inv.inv hquot⟩ + +def ratioSubfield (E : Finset F) (hE : 2 ≤ E.card) + (hadd : ∀ r ∈ ratioSet E, ∀ r' ∈ ratioSet E, + (dilateSum E (r + r')).card < E.card ^ 2) + (hmul : ∀ r ∈ ratioSet E, ∀ r' ∈ ratioSet E, + (dilateSum E (r * r')).card < E.card ^ 2) : Subfield F where + carrier := (ratioSet E : Set F) + zero_mem' := zero_mem_ratioSet hE + one_mem' := one_mem_ratioSet hE + add_mem' := fun hr hr' => mem_ratioSet_of_dilateSum_card_lt (hadd _ hr _ hr') + mul_mem' := fun hr hr' => mem_ratioSet_of_dilateSum_card_lt (hmul _ hr _ hr') + neg_mem' := fun hc => neg_mem_ratioSet hc + inv_mem' := fun _ hc => inv_mem_ratioSet hE hc + +@[simp] theorem mem_ratioSubfield (E : Finset F) (hE : 2 ≤ E.card) + (hadd : ∀ r ∈ ratioSet E, ∀ r' ∈ ratioSet E, + (dilateSum E (r + r')).card < E.card ^ 2) + (hmul : ∀ r ∈ ratioSet E, ∀ r' ∈ ratioSet E, + (dilateSum E (r * r')).card < E.card ^ 2) (x : F) : + x ∈ ratioSubfield E hE hadd hmul ↔ x ∈ ratioSet E := Iff.rfl + +theorem card_le_card_ratioSet {E : Finset F} (hE : 2 ≤ E.card) : + E.card ≤ (ratioSet E).card := by + obtain ⟨x₀, hx₀, x₁, hx₁, hne⟩ := Finset.one_lt_card.mp hE + have hden : x₁ - x₀ ≠ 0 := sub_ne_zero.mpr hne.symm + apply Finset.card_le_card_of_injOn (fun x => (x - x₀) / (x₁ - x₀)) + · intro x hx + exact mem_ratioSet.mpr ⟨x, hx, x₀, hx₀, x₁, hx₁, x₀, hx₀, hne.symm, rfl⟩ + · intro x hx y hy heq + have hd : x - x₀ = y - x₀ := (div_left_inj' hden).mp heq + calc + x = (x - x₀) + x₀ := (sub_add_cancel x x₀).symm + _ = (y - x₀) + x₀ := by rw [hd] + _ = y := sub_add_cancel y x₀ + +end +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/ScalarCollisionCount.lean b/lean/OAI/Combinatorics/Ryser/Incidence/ScalarCollisionCount.lean new file mode 100644 index 0000000000000000000000000000000000000000..94d51aa4ad1938c8016e471ba8a298986fc493cd --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/ScalarCollisionCount.lean @@ -0,0 +1,121 @@ +import Mathlib.Algebra.BigOperators.Group.Finset.Sigma +import Mathlib.Algebra.BigOperators.Ring.Finset +import Mathlib.Algebra.Field.Basic +import Mathlib.Tactic.Ring + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence + +open scoped BigOperators + +variable {F : Type*} [Field F] [instDecidableEqF : DecidableEq F] + +def scalarCollisionCount (E : Finset F) (a : F) : ℕ := + (((E.product E).product (E.product E)).filter + (fun p => p.1.1 + a * p.1.2 = p.2.1 + a * p.2.2)).card + +theorem scalarCollisionCount_eq_sum (E : Finset F) (a : F) : + scalarCollisionCount E a = + ∑ x ∈ E, ∑ y ∈ E, ∑ x' ∈ E, ∑ y' ∈ E, + if x + a * y = x' + a * y' then 1 else 0 := by + simp only [scalarCollisionCount, Finset.card_eq_sum_ones, Finset.sum_filter, + Finset.product_eq_sprod, Finset.sum_product] + +theorem scalarCollision_iff_eq_div (x y x' y' : F) (hy : y ≠ y') (a : F) : + x + a * y = x' + a * y' ↔ a = (x' - x) / (y - y') := let _ := instDecidableEqF; by + have hlinear : x + a * y = x' + a * y' ↔ a * (y - y') = x' - x := by + constructor + · intro h + calc + a * (y - y') = (x + a * y) - (x' + a * y') + (x' - x) := by ring + _ = x' - x := by rw [h]; ring + · intro h + calc + x + a * y = (a * (y - y') - (x' - x)) + (x' + a * y') := by ring + _ = x' + a * y' := by rw [h]; ring + exact hlinear.trans (eq_div_iff (sub_ne_zero.mpr hy)).symm + +variable [Fintype F] + +private theorem sum_scalarCollision_indicator (x y x' y' : F) : + (∑ a : F, if x + a * y = x' + a * y' then (1 : ℕ) else 0) + + (if y = y' then 1 else 0) = + (if x = x' ∧ y = y' then Fintype.card F else 0) + 1 := by + by_cases hy : y = y' + · subst y' + by_cases hx : x = x' + · subst x' + simp + · simp [hx] + · simp_rw [scalarCollision_iff_eq_div x y x' y' hy] + simp [hy] + +theorem sum_scalarCollisionCount (E : Finset F) : + (∑ a : F, scalarCollisionCount E a) + E.card ^ 3 = + Fintype.card F * E.card ^ 2 + E.card ^ 4 := by + let Q := (E.product E).product (E.product E) + have hcount : + (∑ a : F, scalarCollisionCount E a) = + ∑ p ∈ Q, ∑ a : F, + if p.1.1 + a * p.1.2 = p.2.1 + a * p.2.2 then (1 : ℕ) else 0 := by + simp only [scalarCollisionCount, Finset.card_eq_sum_ones, Finset.sum_filter] + exact Finset.sum_comm + have hsecond : + (∑ p ∈ Q, if p.1.2 = p.2.2 then (1 : ℕ) else 0) = E.card ^ 3 := by + dsimp [Q] + simp only [Finset.sum_product] + calc + (∑ x ∈ E, ∑ y ∈ E, ∑ x' ∈ E, ∑ y' ∈ E, + if y = y' then (1 : ℕ) else 0) = ∑ x ∈ E, ∑ y ∈ E, E.card := by + apply Finset.sum_congr rfl + intro x hx + apply Finset.sum_congr rfl + intro y hy + simp [hy] + _ = E.card ^ 3 := by simp; ring + have hdiagonal : + (∑ p ∈ Q, if p.1.1 = p.2.1 ∧ p.1.2 = p.2.2 + then Fintype.card F else 0) = Fintype.card F * E.card ^ 2 := by + dsimp [Q] + simp only [Finset.sum_product] + calc + (∑ x ∈ E, ∑ y ∈ E, ∑ x' ∈ E, ∑ y' ∈ E, + if x = x' ∧ y = y' then Fintype.card F else 0) = + ∑ x ∈ E, ∑ y ∈ E, Fintype.card F := by + apply Finset.sum_congr rfl + intro x hx + apply Finset.sum_congr rfl + intro y hy + calc + (∑ x' ∈ E, ∑ y' ∈ E, + if x = x' ∧ y = y' then Fintype.card F else 0) = + ∑ x' ∈ E, if x = x' then Fintype.card F else 0 := by + apply Finset.sum_congr rfl + intro x' hx' + by_cases hxx : x = x' + · simp [hxx, hy] + · simp [hxx] + _ = Fintype.card F := by simp [hx] + _ = Fintype.card F * E.card ^ 2 := by simp; ring + have hquadruples : (∑ p ∈ Q, (1 : ℕ)) = E.card ^ 4 := by + simp only [Finset.sum_const, nsmul_eq_mul, mul_one] + dsimp [Q] + rw [Finset.card_product, Finset.card_product] + ring + have hsum : + (∑ p ∈ Q, + ((∑ a : F, if p.1.1 + a * p.1.2 = p.2.1 + a * p.2.2 + then (1 : ℕ) else 0) + (if p.1.2 = p.2.2 then 1 else 0))) = + ∑ p ∈ Q, + ((if p.1.1 = p.2.1 ∧ p.1.2 = p.2.2 then Fintype.card F else 0) + 1) := by + apply Finset.sum_congr rfl + intro p hp + exact sum_scalarCollision_indicator p.1.1 p.1.2 p.2.1 p.2.2 + simp only [Finset.sum_add_distrib] at hsum + rw [← hcount, hsecond, hdiagonal, hquadruples] at hsum + exact hsum + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/ScalarCollisions.lean b/lean/OAI/Combinatorics/Ryser/Incidence/ScalarCollisions.lean new file mode 100644 index 0000000000000000000000000000000000000000..ad896c2db7cbe5a6a06a3dee9bf03338bc410d09 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/ScalarCollisions.lean @@ -0,0 +1,134 @@ +import OAI.Combinatorics.Ryser.Incidence.RatioSet +import OAI.Combinatorics.Ryser.Incidence.ScalarCollisionCount +import Mathlib.Algebra.Group.Pointwise.Finset.Scalar +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.Basic.Real.Basic +import Mathlib.Tactic.Linarith + +namespace OAI + +open scoped BigOperators Pointwise + +namespace RyserCoveringCounterexample.Incidence + +section Fibers + +variable {α β : Type*} [instDecidableEqα : DecidableEq α] [DecidableEq β] + +theorem card_collisionPairs_eq_sum_sq (s : Finset α) (f : α → β) : + ((s.product s).filter (fun p => f p.1 = f p.2)).card = + ∑ b ∈ s.image f, (s.filter (fun a => f a = b)).card ^ 2 := let _ := instDecidableEqα; by + classical + let fibers (b : β) := s.filter (fun a => f a = b) + have hdisj : (s.image f : Set β).PairwiseDisjoint + (fun b => (fibers b).product (fibers b)) := by + intro b hb c hc hbc + apply Finset.disjoint_left.mpr + intro p hp hpc + have hpb : f p.1 = b := + (Finset.mem_filter.mp (Finset.mem_product.mp hp).1).2 + have hpc' : f p.1 = c := + (Finset.mem_filter.mp (Finset.mem_product.mp hpc).1).2 + exact hbc (hpb.symm.trans hpc') + have hpartition : + (s.product s).filter (fun p => f p.1 = f p.2) = + (s.image f).disjiUnion (fun b => (fibers b).product (fibers b)) hdisj := by + ext p + simp only [Finset.product_eq_sprod, Finset.mem_filter, Finset.mem_product, + Finset.mem_disjiUnion, fibers] + constructor + · rintro ⟨⟨hp1, hp2⟩, hf⟩ + exact ⟨f p.1, Finset.mem_image_of_mem f hp1, ⟨⟨hp1, rfl⟩, ⟨hp2, hf.symm⟩⟩⟩ + · rintro ⟨b, hb, ⟨⟨hp1, hf1⟩, ⟨hp2, hf2⟩⟩⟩ + exact ⟨⟨hp1, hp2⟩, hf1.trans hf2.symm⟩ + rw [hpartition, Finset.card_disjiUnion] + simp only [Finset.product_eq_sprod, Finset.card_product, fibers, pow_two] + +theorem card_sq_le_card_image_mul_collisionPairs (s : Finset α) (f : α → β) : + s.card ^ 2 ≤ (s.image f).card * + ((s.product s).filter (fun p => f p.1 = f p.2)).card := by + calc + s.card ^ 2 = (∑ b ∈ s.image f, (s.filter (fun a => f a = b)).card) ^ 2 := by + rw [← Finset.card_eq_sum_card_image f s] + _ ≤ (s.image f).card * + ∑ b ∈ s.image f, (s.filter (fun a => f a = b)).card ^ 2 := by + simpa using Finset.sum_mul_sq_le_sq_mul_sq (R := ℕ) (s.image f) + (fun _ => 1) (fun b => (s.filter (fun a => f a = b)).card) + _ = _ := by rw [← card_collisionPairs_eq_sum_sq s f] + +end Fibers + +variable {F : Type*} [Field F] [DecidableEq F] + +theorem image_scalar_add (E : Finset F) (c : F) : + (E.product E).image (fun p : F × F => p.1 + c * p.2) = dilateSum E c := by + ext z + simp only [dilateSum, Finset.product_eq_sprod, Finset.mem_image, Finset.mem_product, + Finset.mem_add] + constructor + · rintro ⟨⟨x, y⟩, ⟨hx, hy⟩, hxy⟩ + exact ⟨x, hx, c * y, ⟨y, hy, rfl⟩, hxy⟩ + · rintro ⟨x, hx, z, ⟨y, hy, rfl⟩, hxy⟩ + exact ⟨(x, y), ⟨hx, hy⟩, hxy⟩ + +theorem dilateSum_eq_add_smul (E : Finset F) (c : F) : + dilateSum E c = E + c • E := rfl + +theorem card_dilateSum_mul_scalarCollisionCount (E : Finset F) (c : F) : + E.card ^ 4 ≤ (dilateSum E c).card * scalarCollisionCount E c := by + have h := card_sq_le_card_image_mul_collisionPairs (E.product E) + (fun p : F × F => p.1 + c * p.2) + rw [image_scalar_add E c] at h + simp only [Finset.product_eq_sprod, Finset.card_product] at h + simpa only [scalarCollisionCount, Finset.product_eq_sprod, pow_two, pow_succ, pow_zero, + mul_one, mul_assoc] using h + +variable [Fintype F] + +theorem card_field_lt_twice_of_dilateSum_card_le_real (E : Finset F) (U : ℝ) + (hU0 : 0 ≤ U) (hU : ∀ c : F, ((dilateSum E c).card : ℝ) ≤ U) + (hsmall : 2 * U < (E.card : ℝ) ^ 2) : (Fintype.card F : ℝ) < 2 * U := by + have hcauchy (c : F) : (E.card : ℝ) ^ 4 ≤ + ((dilateSum E c).card : ℝ) * (scalarCollisionCount E c : ℝ) := by + exact_mod_cast card_dilateSum_mul_scalarCollisionCount E c + have hsum : (Fintype.card F : ℝ) * (E.card : ℝ) ^ 4 ≤ + U * ∑ c : F, (scalarCollisionCount E c : ℝ) := by + calc + _ = ∑ _c : F, (E.card : ℝ) ^ 4 := by simp + _ ≤ ∑ c : F, U * (scalarCollisionCount E c : ℝ) := by + apply Finset.sum_le_sum + intro c hc + exact (hcauchy c).trans + (mul_le_mul_of_nonneg_right (hU c) (Nat.cast_nonneg _)) + _ = _ := (Finset.mul_sum _ _ _).symm + have htotal : (∑ c : F, (scalarCollisionCount E c : ℝ)) + (E.card : ℝ) ^ 3 = + (Fintype.card F : ℝ) * (E.card : ℝ) ^ 2 + (E.card : ℝ) ^ 4 := by + exact_mod_cast sum_scalarCollisionCount E + have htotal_le : (∑ c : F, (scalarCollisionCount E c : ℝ)) ≤ + (Fintype.card F : ℝ) * (E.card : ℝ) ^ 2 + (E.card : ℝ) ^ 4 := by + have hcube : 0 ≤ (E.card : ℝ) ^ 3 := pow_nonneg (Nat.cast_nonneg _) _ + linarith + have hupper := mul_le_mul_of_nonneg_left htotal_le hU0 + have hqpos : 0 < (Fintype.card F : ℝ) := by + exact_mod_cast (Fintype.card_pos : 0 < Fintype.card F) + have hEpos : 0 < (E.card : ℝ) ^ 2 := + lt_of_le_of_lt (mul_nonneg (by norm_num) hU0) hsmall + by_contra hnot + have hq : 2 * U ≤ (Fintype.card F : ℝ) := le_of_not_gt hnot + have h₁ := mul_le_mul_of_nonneg_right hq (sq_nonneg (E.card : ℝ)) + have h₂ := mul_lt_mul_of_pos_right hsmall hqpos + have hgap : U * (Fintype.card F : ℝ) + U * (E.card : ℝ) ^ 2 < + (Fintype.card F : ℝ) * (E.card : ℝ) ^ 2 := by nlinarith + have hstrict := mul_lt_mul_of_pos_right hgap hEpos + nlinarith + +theorem card_field_lt_twice_of_dilateSum_card_le (E : Finset F) (U : ℕ) + (hU : ∀ c : F, (dilateSum E c).card ≤ U) (hsmall : 2 * U < E.card ^ 2) : + Fintype.card F < 2 * U := by + have h := card_field_lt_twice_of_dilateSum_card_le_real E (U : ℝ) + (Nat.cast_nonneg _) (fun c => by exact_mod_cast hU c) (by exact_mod_cast hsmall) + exact_mod_cast h + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/ScalarCover.lean b/lean/OAI/Combinatorics/Ryser/Incidence/ScalarCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..2dcd1af9290a3df087ccc7057a62e73f02d8b56f --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/ScalarCover.lean @@ -0,0 +1,234 @@ +import OAI.Combinatorics.Ryser.Incidence.FiniteSets +import OAI.Combinatorics.Ryser.Incidence.ScalarCoverGeometry +import Mathlib.Algebra.Group.Pointwise.Finset.Scalar +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Ring + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Incidence + +open scoped Pointwise + +variable {F : Type*} [Field F] [DecidableEq F] + +private theorem scalar_card_image_le (c : F) (T : Finset F) : + (c • T).card ≤ T.card := by + change (T.image (fun x : F => c * x)).card ≤ T.card + exact Finset.card_image_le + +private theorem scalar_card_image_eq (c : F) (hc : c ≠ 0) (T : Finset F) : + (c • T).card = T.card := by + change (T.image (fun x : F => c * x)).card = T.card + apply Finset.card_image_of_injective + intro x y h + exact mul_left_cancel₀ hc h + +private theorem scalar_zero_image (T : Finset F) (hT : T.Nonempty) : + (0 : F) • T = (0 : Finset F) := by + change T.image (fun x : F => 0 * x) = ({0} : Finset F) + simpa only [zero_mul] using Finset.image_const hT (0 : F) + +private theorem scalar_one_image (T : Finset F) : (1 : F) • T = T := by + change T.image (fun x : F => 1 * x) = T + simp only [one_mul, Finset.image_id'] + +def ScalarCovered (B : Finset F) (K : ℝ) (c : F) (a : ℕ) : Prop := + ∃ T : Finset F, (T.card : ℝ) ≤ K ^ a ∧ c • B ⊆ T + (B - B) + +private theorem scalar_card_add_le_bounds + {T U : Finset F} {p q : ℝ} + (hT : (T.card : ℝ) ≤ p) (hU : (U.card : ℝ) ≤ q) : + ((T + U).card : ℝ) ≤ p * q := by + have hcard : ((T + U).card : ℝ) ≤ (T.card : ℝ) * U.card := by + exact_mod_cast (Finset.card_add_le (s := T) (t := U)) + exact hcard.trans (mul_le_mul hT hU (Nat.cast_nonneg _) + ((Nat.cast_nonneg _).trans hT)) + +private theorem scalar_card_sub_le_bounds + {T U : Finset F} {p q : ℝ} + (hT : (T.card : ℝ) ≤ p) (hU : (U.card : ℝ) ≤ q) : + ((T - U).card : ℝ) ≤ p * q := by + have hcard : ((T - U).card : ℝ) ≤ (T.card : ℝ) * U.card := by + exact_mod_cast (Finset.card_sub_le (s := T) (t := U)) + exact hcard.trans (mul_le_mul hT hU (Nat.cast_nonneg _) + ((Nat.cast_nonneg _).trans hT)) + +variable {B E : Finset F} {K : ℝ} {c d : F} {a b : ℕ} + +theorem scalarCovered_mono (hK : 1 ≤ K) + (h : ScalarCovered B K c a) (hab : a ≤ b) : + ScalarCovered B K c b := by + rcases h with ⟨T, hT, hcover⟩ + exact ⟨T, hT.trans (pow_le_pow_right₀ hK hab), hcover⟩ + +theorem scalarCovered_of_sub_card (hB : B.Nonempty) + (h : ((c • B - B).card : ℝ) ≤ K ^ a * B.card) : + ScalarCovered B K c a := by + obtain ⟨T, _, hT, hcover⟩ := covering_sub (c • B) B hB h + exact ⟨T, hT, hcover⟩ + +theorem scalarCover_double_cover (hB : B.Nonempty) + (hD : ((B - B).card : ℝ) ≤ K * B.card) : + ∃ V : Finset F, (V.card : ℝ) ≤ K ^ 5 ∧ + (B - B) + (B - B) ⊆ V + (B - B) := by + have heq : (B - B) + (B - B) - B = + (2 : ℕ) • B - (3 : ℕ) • B := by + rw [show (3 : ℕ) = 2 + 1 from rfl, add_nsmul] + simp only [two_nsmul, one_nsmul, sub_eq_add_neg, neg_add] + ac_rfl + have hsmall : (((B - B) + (B - B) - B).card : ℝ) ≤ + K ^ 5 * B.card := by + rw [heq] + simpa using multiple_sum_sub_card_le B hB hD 2 3 + obtain ⟨V, _, hV, hcover⟩ := + covering_sub ((B - B) + (B - B)) B hB hsmall + exact ⟨V, hV, hcover⟩ + +private theorem scalarCover_difference_cost (hB : B.Nonempty) + (hD : ((B - B).card : ℝ) ≤ K * B.card) : + (((B - B) - B).card : ℝ) ≤ K ^ 3 * B.card := by + simpa only [one_nsmul, two_nsmul, sub_eq_add_neg, neg_add, add_assoc] + using multiple_sum_sub_card_le B hB hD 1 2 + +private theorem scalarCover_sum_cost (hB : B.Nonempty) + (hD : ((B - B).card : ℝ) ≤ K * B.card) : + ((B + (B - B)).card : ℝ) ≤ K ^ 3 * B.card := by + simpa only [one_nsmul, two_nsmul, sub_eq_add_neg, add_assoc] + using multiple_sum_sub_card_le B hB hD 2 1 + +theorem scalarCovered_seed (hB : B.Nonempty) (hK : 2 ≤ K) + (hD : ((B - B).card : ℝ) ≤ K * B.card) + (hEB : ∀ e ∈ E, ((B - e • B).card : ℝ) ≤ 2 * K ^ 3 * B.card) + (hc : c ∈ E ∨ c = 0 ∨ c = 1) : + ScalarCovered B K c 4 := by + have hK0 : 0 ≤ K := (by norm_num : (0 : ℝ) ≤ 2).trans hK + have hK1 : 1 ≤ K := one_le_two.trans hK + rcases hc with hc | rfl | rfl + · apply scalarCovered_of_sub_card hB + have hswap : (c • B - B).card = (B - c • B).card := by + simpa only [neg_sub] using Finset.card_neg (B - c • B) + have hpow : 2 * K ^ 3 ≤ K ^ 4 := by + calc + 2 * K ^ 3 ≤ K * K ^ 3 := + mul_le_mul_of_nonneg_right hK (pow_nonneg hK0 3) + _ = K ^ 4 := by ring + rw [hswap] + exact (hEB c hc).trans + (mul_le_mul_of_nonneg_right hpow (Nat.cast_nonneg _)) + · have hzero : ScalarCovered B K (0 : F) 0 := by + apply scalarCovered_of_sub_card hB + simp only [scalar_zero_image B hB, zero_sub, Finset.card_neg, + pow_zero, one_mul, le_refl] + exact scalarCovered_mono hK1 hzero (by decide) + · have hone : ScalarCovered B K (1 : F) 1 := by + apply scalarCovered_of_sub_card hB + simpa only [scalar_one_image, pow_one] using hD + exact scalarCovered_mono hK1 hone (by decide) + +theorem scalarCovered_neg (h : ScalarCovered B K c a) : + ScalarCovered B K (-c) a := by + rcases h with ⟨T, hT, hcover⟩ + refine ⟨-T, ?_, scalar_cover_neg_subset hcover⟩ + simpa only [Finset.card_neg] using hT + +theorem scalarCovered_add (hB : B.Nonempty) (hK : 2 ≤ K) + (hD : ((B - B).card : ℝ) ≤ K * B.card) + (hc : ScalarCovered B K c a) (hd : ScalarCovered B K d b) : + ScalarCovered B K (c + d) (a + b + 5) := by + let _ := hK + rcases hc with ⟨T, hT, hTc⟩ + rcases hd with ⟨U, hU, hUd⟩ + obtain ⟨V, hV, hVcover⟩ := scalarCover_double_cover hB hD + refine ⟨T + U + V, ?_, scalar_cover_add_subset hTc hUd hVcover⟩ + calc + ((T + U + V).card : ℝ) ≤ (K ^ a * K ^ b) * K ^ 5 := + scalar_card_add_le_bounds (scalar_card_add_le_bounds hT hU) hV + _ = K ^ (a + b + 5) := by simp only [pow_add] + +theorem scalarCovered_sub (hB : B.Nonempty) (hK : 2 ≤ K) + (hD : ((B - B).card : ℝ) ≤ K * B.card) + (hc : ScalarCovered B K c a) (hd : ScalarCovered B K d b) : + ScalarCovered B K (c - d) (a + b + 5) := by + let _ := hK + rcases hc with ⟨T, hT, hTc⟩ + rcases hd with ⟨U, hU, hUd⟩ + obtain ⟨V, hV, hVcover⟩ := scalarCover_double_cover hB hD + refine ⟨T - U + V, ?_, scalar_cover_sub_subset hTc hUd hVcover⟩ + calc + ((T - U + V).card : ℝ) ≤ (K ^ a * K ^ b) * K ^ 5 := + scalar_card_add_le_bounds (scalar_card_sub_le_bounds hT hU) hV + _ = K ^ (a + b + 5) := by simp only [pow_add] + +theorem scalarCovered_mul (hB : B.Nonempty) (hK : 2 ≤ K) + (hD : ((B - B).card : ℝ) ≤ K * B.card) + (hc : ScalarCovered B K c a) (hd : ScalarCovered B K d b) : + ScalarCovered B K (c * d) (b + 2 * a + 5) := by + let _ := hK + rcases hc with ⟨T, hT, hTc⟩ + rcases hd with ⟨U, hU, hUd⟩ + obtain ⟨V, hV, hVcover⟩ := scalarCover_double_cover hB hD + have hCU : ((c • U).card : ℝ) ≤ K ^ b := + (Nat.cast_le.mpr (scalar_card_image_le c U)).trans hU + refine ⟨c • U + T - T + V, ?_, + scalar_cover_mul_subset hTc hUd hVcover⟩ + calc + ((c • U + T - T + V).card : ℝ) ≤ + ((K ^ b * K ^ a) * K ^ a) * K ^ 5 := + scalar_card_add_le_bounds + (scalar_card_sub_le_bounds (scalar_card_add_le_bounds hCU hT) hT) hV + _ = K ^ (b + 2 * a + 5) := by + simp only [two_mul, pow_add] + ring + +theorem scalarCovered_card_sub (hB : B.Nonempty) (hK : 2 ≤ K) + (hD : ((B - B).card : ℝ) ≤ K * B.card) + (hc : ScalarCovered B K c a) : + ((c • B - B).card : ℝ) ≤ K ^ (a + 3) * B.card := by + let _ := hK + rcases hc with ⟨T, hT, hcover⟩ + have hsub : c • B - B ⊆ T + ((B - B) - B) := by + simpa only [add_sub_assoc] using Finset.sub_subset_sub_right hcover + calc + ((c • B - B).card : ℝ) ≤ ((T + ((B - B) - B)).card : ℝ) := + Nat.cast_le.mpr (Finset.card_le_card hsub) + _ ≤ K ^ a * (K ^ 3 * B.card) := + scalar_card_add_le_bounds hT (scalarCover_difference_cost hB hD) + _ = K ^ (a + 3) * B.card := by rw [pow_add]; ring + +theorem scalarCovered_inv (hB : B.Nonempty) (hK : 2 ≤ K) + (hD : ((B - B).card : ℝ) ≤ K * B.card) + (hc : ScalarCovered B K c a) (hc0 : c ≠ 0) : + ScalarCovered B K c⁻¹ (a + 3) := by + have hcard : (c⁻¹ • B - B).card = (c • B - B).card := by + rw [← scalar_cover_inv_sub_identity B hc0] + exact scalar_card_image_eq (-c⁻¹) (neg_ne_zero.mpr (inv_ne_zero hc0)) _ + apply scalarCovered_of_sub_card hB + rw [hcard] + exact scalarCovered_card_sub hB hK hD hc + +theorem scalarCovered_card_add (hB : B.Nonempty) (hK : 2 ≤ K) + (hD : ((B - B).card : ℝ) ≤ K * B.card) + (hc : ScalarCovered B K c a) : + ((B + c • B).card : ℝ) ≤ K ^ (a + 3) * B.card := by + let _ := hK + rcases hc with ⟨T, hT, hcover⟩ + have hsub : B + c • B ⊆ T + (B + (B - B)) := by + calc + B + c • B ⊆ B + (T + (B - B)) := + Finset.add_subset_add_left hcover + _ = T + (B + (B - B)) := by ac_rfl + calc + ((B + c • B).card : ℝ) ≤ ((T + (B + (B - B))).card : ℝ) := + Nat.cast_le.mpr (Finset.card_le_card hsub) + _ ≤ K ^ a * (K ^ 3 * B.card) := + scalar_card_add_le_bounds hT (scalarCover_sum_cost hB hD) + _ = K ^ (a + 3) * B.card := by rw [pow_add]; ring + +end RyserCoveringCounterexample.Incidence + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/ScalarCoverExpressions.lean b/lean/OAI/Combinatorics/Ryser/Incidence/ScalarCoverExpressions.lean new file mode 100644 index 0000000000000000000000000000000000000000..22fa4362ae1c9c5a948e9ffcee261ed9cb7f5f52 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/ScalarCoverExpressions.lean @@ -0,0 +1,191 @@ +import OAI.Combinatorics.Ryser.Incidence.ScalarCover +import Mathlib.Algebra.Group.Pointwise.Finset.Scalar +import Mathlib.Order.Monotone.Basic +import Lean.Elab.Tactic.Omega + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence + +open scoped Pointwise + +variable {F : Type*} [Field F] [instDecidableEqF : DecidableEq F] + +inductive ScalarExpression (E : Finset F) : F → ℕ → Prop + | seed {c : F} (hc : c ∈ E ∨ c = 0 ∨ c = 1) : + ScalarExpression E c 0 + | neg {c : F} {m : ℕ} (h : ScalarExpression E c m) : + ScalarExpression E (-c) (m + 1) + | add {c d : F} {m n : ℕ} + (hc : ScalarExpression E c m) (hd : ScalarExpression E d n) : + ScalarExpression E (c + d) (m + n + 1) + | sub {c d : F} {m n : ℕ} + (hc : ScalarExpression E c m) (hd : ScalarExpression E d n) : + ScalarExpression E (c - d) (m + n + 1) + | mul {c d : F} {m n : ℕ} + (hc : ScalarExpression E c m) (hd : ScalarExpression E d n) : + ScalarExpression E (c * d) (m + n + 1) + | inv {c : F} {m : ℕ} + (h : ScalarExpression E c m) (hc : c ≠ 0) : + ScalarExpression E c⁻¹ (m + 1) + +def scalarCoverExponent : ℕ → ℕ + | 0 => 4 + | m + 1 => 3 * scalarCoverExponent m + 5 + +@[simp] theorem scalarCoverExponent_zero : + scalarCoverExponent 0 = 4 := rfl + +@[simp] theorem scalarCoverExponent_succ (m : ℕ) : + scalarCoverExponent (m + 1) = + 3 * scalarCoverExponent m + 5 := rfl + +theorem scalarCoverExponent_le_succ (m : ℕ) : + scalarCoverExponent m ≤ scalarCoverExponent (m + 1) := by + rw [scalarCoverExponent_succ] + omega + +theorem scalarCoverExponent_monotone : + Monotone scalarCoverExponent := + monotone_nat_of_le_succ scalarCoverExponent_le_succ + +theorem scalarCoverExponent_ge_four (m : ℕ) : + 4 ≤ scalarCoverExponent m := + scalarCoverExponent_monotone (Nat.zero_le m) + +theorem scalarCoverExponent_twice_add (m : ℕ) : + 2 * scalarCoverExponent m + 5 = 13 * 3 ^ m := by + induction m with + | zero => rfl + | succ m ih => + rw [scalarCoverExponent_succ, pow_succ] + omega + +theorem scalarCoverExponent_closed_form (m : ℕ) : + scalarCoverExponent m = (13 * 3 ^ m - 5) / 2 := by + have h := scalarCoverExponent_twice_add m + omega + +private theorem scalarCoverExponent_inv_bound (m : ℕ) : + scalarCoverExponent m + 3 ≤ scalarCoverExponent (m + 1) := by + rw [scalarCoverExponent_succ] + omega + +private theorem scalarCoverExponent_add_bound (m n : ℕ) : + scalarCoverExponent m + scalarCoverExponent n + 5 ≤ + scalarCoverExponent (m + n + 1) := by + have hm := scalarCoverExponent_monotone + (show m ≤ m + n by omega) + have hn := scalarCoverExponent_monotone + (show n ≤ m + n by omega) + rw [scalarCoverExponent_succ] + omega + +private theorem scalarCoverExponent_mul_bound (m n : ℕ) : + scalarCoverExponent n + 2 * scalarCoverExponent m + 5 ≤ + scalarCoverExponent (m + n + 1) := by + have hm := scalarCoverExponent_monotone + (show m ≤ m + n by omega) + have hn := scalarCoverExponent_monotone + (show n ≤ m + n by omega) + rw [scalarCoverExponent_succ] + omega + +variable {B E : Finset F} {K : ℝ} + +theorem ScalarExpression.scalarCovered + (hB : B.Nonempty) (hK : 2 ≤ K) + (hD : ((B - B).card : ℝ) ≤ K * (B.card : ℝ)) + (hEB : ∀ e ∈ E, + ((B - e • B).card : ℝ) ≤ 2 * K ^ 3 * (B.card : ℝ)) + {c : F} {n : ℕ} (h : ScalarExpression E c n) : + ScalarCovered B K c (scalarCoverExponent n) := by + have hK1 : 1 ≤ K := one_le_two.trans hK + induction h with + | seed hc => + exact scalarCovered_seed hB hK hD hEB hc + | neg h ih => + exact scalarCovered_mono hK1 (scalarCovered_neg ih) + (scalarCoverExponent_le_succ _) + | add hc hd ihc ihd => + exact scalarCovered_mono hK1 + (scalarCovered_add hB hK hD ihc ihd) + (scalarCoverExponent_add_bound _ _) + | sub hc hd ihc ihd => + exact scalarCovered_mono hK1 + (scalarCovered_sub hB hK hD ihc ihd) + (scalarCoverExponent_add_bound _ _) + | mul hc hd ihc ihd => + exact scalarCovered_mono hK1 + (scalarCovered_mul hB hK hD ihc ihd) + (scalarCoverExponent_mul_bound _ _) + | inv h hc ih => + exact scalarCovered_mono hK1 + (scalarCovered_inv hB hK hD ih hc) + (scalarCoverExponent_inv_bound _) + +theorem ScalarExpression.scalarCovered_of_le + (hB : B.Nonempty) (hK : 2 ≤ K) + (hD : ((B - B).card : ℝ) ≤ K * (B.card : ℝ)) + (hEB : ∀ e ∈ E, + ((B - e • B).card : ℝ) ≤ 2 * K ^ 3 * (B.card : ℝ)) + {c : F} {n m : ℕ} + (h : ScalarExpression E c n) (hnm : n ≤ m) : + ScalarCovered B K c (scalarCoverExponent m) := + scalarCovered_mono (one_le_two.trans hK) + (ScalarExpression.scalarCovered hB hK hD hEB h) + (scalarCoverExponent_monotone hnm) + +theorem ScalarExpression.card_add_of_le + (hB : B.Nonempty) (hK : 2 ≤ K) + (hD : ((B - B).card : ℝ) ≤ K * (B.card : ℝ)) + (hEB : ∀ e ∈ E, + ((B - e • B).card : ℝ) ≤ 2 * K ^ 3 * (B.card : ℝ)) + {c : F} {n m : ℕ} + (h : ScalarExpression E c n) (hnm : n ≤ m) : + ((B + c • B).card : ℝ) ≤ + K ^ (scalarCoverExponent m + 3) * (B.card : ℝ) := + scalarCovered_card_add hB hK hD + (ScalarExpression.scalarCovered_of_le hB hK hD hEB h hnm) + +theorem ScalarExpression.card_add_subset_of_le + (hB : B.Nonempty) (hK : 2 ≤ K) + (hD : ((B - B).card : ℝ) ≤ K * (B.card : ℝ)) + (hCost : ∀ e ∈ E, + ((B - e • B).card : ℝ) ≤ 2 * K ^ 3 * (B.card : ℝ)) + (hEB : E ⊆ B) + {c : F} {n m : ℕ} + (h : ScalarExpression E c n) (hnm : n ≤ m) : + ((E + c • E).card : ℝ) ≤ + K ^ (scalarCoverExponent m + 3) * (B.card : ℝ) := by + have hsub : E + c • E ⊆ B + c • B := + Finset.add_subset_add hEB + (Finset.smul_finset_subset_smul_finset hEB) + have hcard : + ((E + c • E).card : ℝ) ≤ ((B + c • B).card : ℝ) := + Nat.cast_le.mpr (Finset.card_le_card hsub) + exact hcard.trans + (ScalarExpression.card_add_of_le hB hK hD hCost h hnm) + +theorem scalarExpression_ratio + {x x' y y' : F} + (hx : x ∈ E) (hx' : x' ∈ E) + (hy : y ∈ E) (hy' : y' ∈ E) + (hyy' : y ≠ y') : + ScalarExpression E ((x - x') / (y - y')) 4 := let _ := instDecidableEqF; by + have hnum : ScalarExpression E (x - x') 1 := + ScalarExpression.sub + (ScalarExpression.seed (Or.inl hx)) + (ScalarExpression.seed (Or.inl hx')) + have hden : ScalarExpression E (y - y') 1 := + ScalarExpression.sub + (ScalarExpression.seed (Or.inl hy)) + (ScalarExpression.seed (Or.inl hy')) + have hinv : ScalarExpression E (y - y')⁻¹ 2 := + ScalarExpression.inv hden (sub_ne_zero.mpr hyy') + simpa only [div_eq_mul_inv] using + (ScalarExpression.mul hnum hinv) + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/ScalarCoverGeometry.lean b/lean/OAI/Combinatorics/Ryser/Incidence/ScalarCoverGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..2e5c3717633810751a9b1000a8877083b559d1bc --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/ScalarCoverGeometry.lean @@ -0,0 +1,157 @@ +import Mathlib.Algebra.Field.Defs +import Mathlib.Algebra.Group.Pointwise.Finset.Basic +import Mathlib.Algebra.Group.Pointwise.Finset.Scalar +import Mathlib.Tactic.Ring + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence + +open scoped Pointwise + +variable {F : Type*} [Field F] [DecidableEq F] + +private lemma scalar_cover_neg_mem_diff + {B : Finset F} {x : F} (hx : x ∈ B - B) : + -x ∈ B - B := by + rcases Finset.mem_sub.mp hx with ⟨u, hu, v, hv, rfl⟩ + exact Finset.mem_sub.mpr ⟨v, hv, u, hu, by ring⟩ + +theorem scalar_cover_add_subset + {B T U V : Finset F} {a b : F} + (ha : a • B ⊆ T + (B - B)) + (hb : b • B ⊆ U + (B - B)) + (hH : (B - B) + (B - B) ⊆ V + (B - B)) : + (a + b) • B ⊆ (T + U + V) + (B - B) := by + intro z hz + rcases Finset.mem_smul_finset.mp hz with ⟨x, hx, rfl⟩ + rcases Finset.mem_add.mp (ha (Finset.smul_mem_smul_finset hx)) with + ⟨t, ht, h, hh, eth⟩ + rcases Finset.mem_add.mp (hb (Finset.smul_mem_smul_finset hx)) with + ⟨u, hu, k, hk, euk⟩ + change t + h = a * x at eth + change u + k = b * x at euk + rcases Finset.mem_add.mp (hH (Finset.add_mem_add hh hk)) with + ⟨v, hv, d, hd, evd⟩ + refine Finset.mem_add.mpr + ⟨t + u + v, Finset.add_mem_add (Finset.add_mem_add ht hu) hv, + d, hd, ?_⟩ + change t + u + v + d = (a + b) * x + calc + t + u + v + d = t + u + (v + d) := by ring + _ = t + u + (h + k) := by rw [evd] + _ = (t + h) + (u + k) := by ring + _ = (a + b) * x := by rw [eth, euk]; ring + +theorem scalar_cover_sub_subset + {B T U V : Finset F} {a b : F} + (ha : a • B ⊆ T + (B - B)) + (hb : b • B ⊆ U + (B - B)) + (hH : (B - B) + (B - B) ⊆ V + (B - B)) : + (a - b) • B ⊆ (T - U + V) + (B - B) := by + intro z hz + rcases Finset.mem_smul_finset.mp hz with ⟨x, hx, rfl⟩ + rcases Finset.mem_add.mp (ha (Finset.smul_mem_smul_finset hx)) with + ⟨t, ht, h, hh, eth⟩ + rcases Finset.mem_add.mp (hb (Finset.smul_mem_smul_finset hx)) with + ⟨u, hu, k, hk, euk⟩ + change t + h = a * x at eth + change u + k = b * x at euk + rcases Finset.mem_add.mp + (hH (Finset.add_mem_add hh (scalar_cover_neg_mem_diff hk))) with + ⟨v, hv, d, hd, evd⟩ + refine Finset.mem_add.mpr + ⟨t - u + v, Finset.add_mem_add (Finset.sub_mem_sub ht hu) hv, + d, hd, ?_⟩ + change t - u + v + d = (a - b) * x + calc + t - u + v + d = t - u + (v + d) := by ring + _ = t - u + (h + -k) := by rw [evd] + _ = (t + h) - (u + k) := by ring + _ = (a - b) * x := by rw [eth, euk]; ring + +theorem scalar_cover_neg_subset + {B T : Finset F} {a : F} + (ha : a • B ⊆ T + (B - B)) : + (-a) • B ⊆ (-T) + (B - B) := by + intro z hz + rcases Finset.mem_smul_finset.mp hz with ⟨x, hx, rfl⟩ + rcases Finset.mem_add.mp (ha (Finset.smul_mem_smul_finset hx)) with + ⟨t, ht, h, hh, eth⟩ + change t + h = a * x at eth + refine Finset.mem_add.mpr + ⟨-t, Finset.neg_mem_neg ht, + -h, scalar_cover_neg_mem_diff hh, ?_⟩ + change -t + -h = (-a) * x + calc + -t + -h = -(t + h) := by ring + _ = -(a * x) := by rw [eth] + _ = (-a) * x := by ring + +theorem scalar_cover_mul_subset + {B T U V : Finset F} {a b : F} + (ha : a • B ⊆ T + (B - B)) + (hb : b • B ⊆ U + (B - B)) + (hH : (B - B) + (B - B) ⊆ V + (B - B)) : + (a * b) • B ⊆ (a • U + T - T + V) + (B - B) := by + intro z hz + rcases Finset.mem_smul_finset.mp hz with ⟨x, hx, rfl⟩ + rcases Finset.mem_add.mp (hb (Finset.smul_mem_smul_finset hx)) with + ⟨u, hu, h, hh, euh⟩ + rcases Finset.mem_sub.mp hh with ⟨y, hy, w, hw, rfl⟩ + change u + (y - w) = b * x at euh + rcases Finset.mem_add.mp (ha (Finset.smul_mem_smul_finset hy)) with + ⟨t₁, ht₁, h₁, hh₁, e₁⟩ + rcases Finset.mem_add.mp (ha (Finset.smul_mem_smul_finset hw)) with + ⟨t₂, ht₂, h₂, hh₂, e₂⟩ + change t₁ + h₁ = a * y at e₁ + change t₂ + h₂ = a * w at e₂ + rcases Finset.mem_add.mp + (hH (Finset.add_mem_add hh₁ (scalar_cover_neg_mem_diff hh₂))) with + ⟨v, hv, d, hd, evd⟩ + have hau : a * u ∈ a • U := + Finset.mem_smul_finset.mpr ⟨u, hu, rfl⟩ + refine Finset.mem_add.mpr ⟨a * u + t₁ - t₂ + v, ?_, d, hd, ?_⟩ + · exact Finset.add_mem_add + (Finset.sub_mem_sub (Finset.add_mem_add hau ht₁) ht₂) hv + · change a * u + t₁ - t₂ + v + d = (a * b) * x + calc + a * u + t₁ - t₂ + v + d = + a * u + (t₁ - t₂) + (v + d) := by ring + _ = a * u + (t₁ - t₂) + (h₁ + -h₂) := by rw [evd] + _ = a * u + ((t₁ + h₁) - (t₂ + h₂)) := by ring + _ = a * u + (a * y - a * w) := by rw [e₁, e₂] + _ = a * (u + (y - w)) := by ring + _ = (a * b) * x := by rw [euh]; ring + +theorem scalar_cover_inv_sub_identity + (B : Finset F) {a : F} (ha : a ≠ 0) : + (-a⁻¹) • (a • B - B) = a⁻¹ • B - B := by + have hscalar (u v : F) : + (-a⁻¹) • (a • u - v) = a⁻¹ • v - u := by + change (-a⁻¹) * (a * u - v) = a⁻¹ * v - u + calc + (-a⁻¹) * (a * u - v) = + a⁻¹ * v - (a⁻¹ * a) * u := by ring + _ = a⁻¹ * v - u := by rw [inv_mul_cancel₀ ha, one_mul] + ext z + constructor + · intro hz + rcases Finset.mem_smul_finset.mp hz with ⟨w, hw, rfl⟩ + rcases Finset.mem_sub.mp hw with ⟨u, hu, v, hv, rfl⟩ + rcases Finset.mem_smul_finset.mp hu with ⟨x, hx, rfl⟩ + exact Finset.mem_sub.mpr + ⟨a⁻¹ • v, Finset.mem_smul_finset.mpr ⟨v, hv, rfl⟩, + x, hx, (hscalar x v).symm⟩ + · intro hz + rcases Finset.mem_sub.mp hz with ⟨u, hu, v, hv, rfl⟩ + rcases Finset.mem_smul_finset.mp hu with ⟨x, hx, rfl⟩ + refine Finset.mem_smul_finset.mpr + ⟨a • v - x, ?_, hscalar v x⟩ + exact Finset.mem_sub.mpr + ⟨a • v, Finset.mem_smul_finset.mpr ⟨v, hv, rfl⟩, + x, hx, rfl⟩ + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/Uniform.lean b/lean/OAI/Combinatorics/Ryser/Incidence/Uniform.lean new file mode 100644 index 0000000000000000000000000000000000000000..ea4c2767c77b12b3445f00655ea2dc2019cc1f01 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/Uniform.lean @@ -0,0 +1,83 @@ +import OAI.Combinatorics.Ryser.Incidence.Pruning +import OAI.Combinatorics.Ryser.Incidence.PrunedContradiction + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence +noncomputable section + +def SmallProperSubfields (F : Type*) [Field F] [Fintype F] : Prop := + ∀ M : Subfield F, M ≠ ⊤ → Nat.card M ^ 3 ≤ Fintype.card F + +theorem cardinality_scale_eq {q : ℝ} (hq : 0 < q) : + q ^ (1 + savingExponent) = densityScale q * q := by + rw [Real.rpow_add hq, Real.rpow_one] + exact mul_comm _ _ + +theorem incidence_scale_eq {q : ℝ} (hq : 0 < q) : + q ^ ((3 : ℝ) / 2 - savingExponent) = q * Real.sqrt q / densityScale q := by + rw [Real.rpow_sub hq] + congr 1 + rw [show (3 : ℝ) / 2 = 1 + 1 / 2 by norm_num, Real.rpow_add hq, + Real.rpow_one, Real.sqrt_eq_rpow] + +theorem uniform_incidence_bound (F : Type*) [Field F] [Fintype F] [DecidableEq F] + (hq : incidenceThreshold ≤ Fintype.card F) (hsub : SmallProperSubfields F) + (P : Finset (ProjectivePoint F)) (L : Finset (ProjectiveLine F)) + (hP : (P.card : ℝ) ≤ (Fintype.card F : ℝ) ^ (1 + savingExponent)) + (hL : (L.card : ℝ) ≤ (Fintype.card F : ℝ) ^ (1 + savingExponent)) : + (incidenceCount ProjectiveIncidence P L : ℝ) ≤ + (Fintype.card F : ℝ) ^ ((3 : ℝ) / 2 - savingExponent) := by + classical + let q : ℝ := Fintype.card F + let U := densityScale q + let r := Real.sqrt q + obtain ⟨hqpos, hU, hdegree, hlarge, hremove, hfirst, hsecond, hthird⟩ := + largeEnough_of_threshold hq + have hr : 0 < r := Real.sqrt_pos.2 hqpos + have hrq : r ^ 2 = q := Real.sq_sqrt hqpos.le + have hP' : (P.card : ℝ) ≤ U * q := by + simpa only [cardinality_scale_eq hqpos] using hP + have hL' : (L.card : ℝ) ≤ U * q := by + simpa only [cardinality_scale_eq hqpos] using hL + by_contra hnot + have hI : q * r / U ≤ (incidenceCount ProjectiveIncidence P L : ℝ) := by + have hstrict := lt_of_not_ge hnot + rw [incidence_scale_eq hqpos] at hstrict + exact hstrict.le + obtain ⟨P', _, L', _, _, hPlo, _, hPup, hLup, hmin, hmax, _, hcap⟩ := + exists_projective_pruning P L hU hqpos hrq hdegree hP' hL' hI + have hproper : ∀ M : Subfield F, M ≠ ⊤ → + (Nat.card M : ℝ) ^ 3 ≤ (Fintype.card F : ℝ) := by + intro M hM + exact_mod_cast hsub M hM + have hleft (p : ProjectivePoint F) : leftDegree ProjectiveIncidence L' p = + (L'.filter fun l => ProjectiveIncidence p l).card := by + unfold leftDegree + apply congrArg Finset.card + ext l + simp only [Finset.mem_filter] + have hright (l : ProjectiveLine F) : rightDegree ProjectiveIncidence P' l = + (P'.filter fun p => ProjectiveIncidence p l).card := by + unfold rightDegree leftDegree + apply congrArg Finset.card + ext p + simp only [Finset.mem_filter] + apply pruned_incidence_impossible P' L' r U hr hrq hU hlarge hremove + hfirst hsecond hthird hproper + · simpa only [hrq] using hPlo + · simpa only [hrq] using hPup + · simpa only [hrq] using hLup + · intro p hp + simpa only [hleft] using hmin.1 p hp + · intro l hl + simpa only [hright] using hmin.2 l hl + · intro p hp + simpa only [hleft] using hmax p hp + · intro l + simpa only [hright] using hcap l + +end +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/WalkCounts.lean b/lean/OAI/Combinatorics/Ryser/Incidence/WalkCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..f46661455428810593bd5ea3bc161ffbb7e409d5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/WalkCounts.lean @@ -0,0 +1,127 @@ +import Mathlib.Algebra.BigOperators.Group.Finset.Sigma +import Mathlib.Algebra.BigOperators.Group.Finset.Piecewise +import Mathlib.Data.Finset.Prod +import Mathlib.Data.Finset.Sigma +import Mathlib.Basic.Real.Basic + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Incidence + +variable {α β : Type*} [DecidableEq α] [DecidableEq β] + +def neighbors (A : Finset α) (G : Finset (α × β)) (b : β) : Finset α := + A.filter fun a => (a, b) ∈ G + +def commonNeighbors (B : Finset β) (G : Finset (α × β)) (a a' : α) : Finset β := + B.filter fun b => (a, b) ∈ G ∧ (a', b) ∈ G + +def fourWalks (A : Finset α) (B : Finset β) (G : Finset (α × β)) (a a' : α) : + Finset (Σ _ : α, β × β) := + A.sigma fun a₂ => commonNeighbors B G a a₂ ×ˢ commonNeighbors B G a₂ a' + +@[simp] theorem mem_neighbors (A : Finset α) (G : Finset (α × β)) (a : α) (b : β) : + a ∈ neighbors A G b ↔ a ∈ A ∧ (a, b) ∈ G := by + simp only [neighbors, Finset.mem_filter] + +@[simp] theorem mem_commonNeighbors (B : Finset β) (G : Finset (α × β)) + (a a' : α) (b : β) : + b ∈ commonNeighbors B G a a' ↔ b ∈ B ∧ (a, b) ∈ G ∧ (a', b) ∈ G := by + simp only [commonNeighbors, Finset.mem_filter] + +@[simp] theorem mem_fourWalks (A : Finset α) (B : Finset β) (G : Finset (α × β)) + (a a' : α) (w : Σ _ : α, β × β) : + w ∈ fourWalks A B G a a' ↔ + w.1 ∈ A ∧ w.2.1 ∈ commonNeighbors B G a w.1 ∧ + w.2.2 ∈ commonNeighbors B G w.1 a' := by + simp only [fourWalks, Finset.mem_sigma, Finset.mem_product] + +theorem neighbors_subset (A : Finset α) (G : Finset (α × β)) (b : β) : + neighbors A G b ⊆ A := Finset.filter_subset _ _ + +theorem commonNeighbors_comm (B : Finset β) (G : Finset (α × β)) (a a' : α) : + commonNeighbors B G a a' = commonNeighbors B G a' a := by + ext b + simp only [mem_commonNeighbors, and_comm] + +theorem fourWalks_mono {A₀ A : Finset α} (hA : A₀ ⊆ A) (B : Finset β) + (G : Finset (α × β)) (a a' : α) : + fourWalks A₀ B G a a' ⊆ fourWalks A B G a a' := + Finset.sigma_mono hA (fun _ _ hw => hw) + +theorem card_fourWalks (A : Finset α) (B : Finset β) (G : Finset (α × β)) + (a a' : α) : + (fourWalks A B G a a').card = + ∑ a₂ ∈ A, (commonNeighbors B G a a₂).card * (commonNeighbors B G a₂ a').card := by + simp only [fourWalks, Finset.card_sigma, Finset.card_product] + +theorem card_edges_eq_sum_neighbors (A : Finset α) (B : Finset β) + (G : Finset (α × β)) (hG : G ⊆ A ×ˢ B) : + G.card = ∑ b ∈ B, (neighbors A G b).card := by + have hfilter : (A ×ˢ B).filter (fun e => e ∈ G) = G := by + ext e + simp only [Finset.mem_filter] + exact ⟨fun h => h.2, fun h => ⟨hG h, h⟩⟩ + calc + G.card = ((A ×ˢ B).filter (fun e => e ∈ G)).card := + congrArg Finset.card hfilter.symm + _ = ∑ b ∈ B, (neighbors A G b).card := by + simp only [neighbors, Finset.card_filter, Finset.sum_product_right] + +noncomputable section +attribute [local instance] Classical.propDecidable + +def badPairs (A : Finset α) (B : Finset β) (G : Finset (α × β)) (t : ℝ) : + Finset (α × α) := + (A ×ˢ A).filter fun p => ((commonNeighbors B G p.1 p.2).card : ℝ) < t + +def badPartners (A : Finset α) (B : Finset β) (G : Finset (α × β)) + (t : ℝ) (a : α) : Finset α := + A.filter fun a' => ((commonNeighbors B G a a').card : ℝ) < t + +def localBad (A : Finset α) (B : Finset β) (G : Finset (α × β)) + (t : ℝ) (b : β) : Finset (α × α) := + (badPairs A B G t).filter fun p => (p.1, b) ∈ G ∧ (p.2, b) ∈ G + +@[simp] theorem mem_badPairs (A : Finset α) (B : Finset β) (G : Finset (α × β)) + (t : ℝ) (p : α × α) : + p ∈ badPairs A B G t ↔ + (p.1 ∈ A ∧ p.2 ∈ A) ∧ ((commonNeighbors B G p.1 p.2).card : ℝ) < t := by + simp only [badPairs, Finset.mem_filter, Finset.mem_product] + +@[simp] theorem mem_badPartners (A : Finset α) (B : Finset β) + (G : Finset (α × β)) (t : ℝ) (a a' : α) : + a' ∈ badPartners A B G t a ↔ + a' ∈ A ∧ ((commonNeighbors B G a a').card : ℝ) < t := by + simp only [badPartners, Finset.mem_filter] + +theorem badPartners_subset (A : Finset α) (B : Finset β) + (G : Finset (α × β)) (t : ℝ) (a : α) : + badPartners A B G t a ⊆ A := Finset.filter_subset _ _ + +theorem card_badPairs_eq_sum_badPartners (A : Finset α) (B : Finset β) + (G : Finset (α × β)) (t : ℝ) : + (badPairs A B G t).card = ∑ a ∈ A, (badPartners A B G t a).card := by + simp only [badPairs, badPartners, Finset.card_filter, Finset.sum_product] + +theorem sum_localBad_card_eq_sum_common (A : Finset α) (B : Finset β) + (G : Finset (α × β)) (t : ℝ) : + (∑ b ∈ B, (localBad A B G t b).card) = + ∑ p ∈ badPairs A B G t, (commonNeighbors B G p.1 p.2).card := by + simp only [localBad, commonNeighbors, Finset.card_filter] + exact Finset.sum_comm + +theorem localBad_eq_badPairs_neighbors (A : Finset α) (B : Finset β) + (G : Finset (α × β)) (t : ℝ) (b : β) : + localBad A B G t b = badPairs (neighbors A G b) B G t := by + ext p + simp only [localBad, badPairs, neighbors, Finset.mem_filter, Finset.mem_product] + simp only [and_assoc, and_left_comm, and_comm] + +end + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/WalkExpansion.lean b/lean/OAI/Combinatorics/Ryser/Incidence/WalkExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..9075bad394253f6f431786350cc1c56dfe52d1e0 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/WalkExpansion.lean @@ -0,0 +1,136 @@ +import OAI.Combinatorics.Ryser.Incidence.WalkCounts +import Mathlib.Algebra.Group.Pointwise.Finset.Basic +import Mathlib.Combinatorics.Enumerative.DoubleCounting +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.LinearCombination +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Incidence + +open scoped Pointwise + +theorem walkCard_mul_le_labelCard_pow_four {α β : Type*} + [DecidableEq α] [DecidableEq β] + (T : Finset α) (D : Finset β) (eval : (β × β) × (β × β) → α) (L : ℝ) + (hf : ∀ t ∈ T, + L ≤ ((((D ×ˢ D) ×ˢ (D ×ˢ D)).filter fun q => eval q = t).card : ℝ)) : + (T.card : ℝ) * L ≤ (D.card : ℝ) ^ 4 := by + classical + have hcount := Finset.card_nsmul_le_card_nsmul (R := ℝ) + (s := T) (t := (D ×ˢ D) ×ˢ (D ×ˢ D)) (m := L) (n := 1) + (fun t q => eval q = t) hf (by + intro q _ + have hcard : (T.bipartiteBelow (fun t q => eval q = t) q).card ≤ 1 := by + apply Finset.card_le_one_iff.mpr + intro x y hx hy + exact (Finset.mem_filter.mp hx).2.symm.trans (Finset.mem_filter.mp hy).2 + exact_mod_cast hcard) + calc + (T.card : ℝ) * L ≤ (((D ×ˢ D) ×ˢ (D ×ˢ D)).card : ℝ) := by + simpa only [nsmul_eq_mul, mul_one] using hcount + _ = (D.card : ℝ) ^ 4 := by + simp only [Finset.card_product, Nat.cast_mul] + ring + +theorem expansion_bound_of_card_mul_le {c d n V : ℝ} + (hc : 0 ≤ c) (hd : 0 ≤ d) (hn : 0 < n) (hV : 2 ≤ V) + (hdV : d ≤ V * n) + (h : c * (n ^ 3 / (2 ^ 20 * V ^ 18)) ≤ d ^ 4) : + c ≤ 2 ^ 20 * V ^ 22 * n := by + let _ := hc + have hVpos : 0 < V := lt_of_lt_of_le (by norm_num) hV + have hLpos : 0 < n ^ 3 / (2 ^ 20 * V ^ 18) := by positivity + apply (mul_le_mul_iff_left₀ hLpos).mp + calc + c * (n ^ 3 / (2 ^ 20 * V ^ 18)) ≤ d ^ 4 := h + _ ≤ (V * n) ^ 4 := pow_le_pow_left₀ hd hdV 4 + _ = (2 ^ 20 * V ^ 22 * n) * (n ^ 3 / (2 ^ 20 * V ^ 18)) := by + field_simp [ne_of_gt hVpos] + +theorem fourWalks_mem_data {F : Type*} [DecidableEq F] + {A B : Finset F} {G : Finset (F × F)} {a a' : F} + {w : Σ _ : F, F × F} (hw : w ∈ fourWalks A B G a a') : + w.1 ∈ A ∧ w.2.1 ∈ B ∧ w.2.2 ∈ B ∧ + (a, w.2.1) ∈ G ∧ (w.1, w.2.1) ∈ G ∧ + (w.1, w.2.2) ∈ G ∧ (a', w.2.2) ∈ G := by + have h := Finset.mem_sigma.mp hw + have hp := Finset.mem_product.mp h.2 + have hleft := Finset.mem_filter.mp hp.1 + have hright := Finset.mem_filter.mp hp.2 + exact ⟨h.1, hleft.1, hright.1, hleft.2.1, hleft.2.2, + hright.2.1, hright.2.2⟩ + +variable {F : Type*} [Field F] [instDecidableEqF : DecidableEq F] + +def edgeDifferences (G : Finset (F × F)) : Finset F := + G.image fun e => e.1 - e.2 + +private def differenceWalkLabels (a a' : F) (w : Σ _ : F, F × F) : + (F × F) × (F × F) := + ((a - w.2.1, w.1 - w.2.1), (w.1 - w.2.2, a' - w.2.2)) + +private theorem differenceWalkLabels_injective (a a' : F) : + Function.Injective (differenceWalkLabels a a') := let _ := instDecidableEqF; by + intro w v h + rcases w with ⟨m, b₁, b₂⟩ + rcases v with ⟨m', c₁, c₂⟩ + have h₁ := congrArg (fun q : (F × F) × (F × F) => q.1.1) h + have h₂ := congrArg (fun q : (F × F) × (F × F) => q.1.2) h + have h₃ := congrArg (fun q : (F × F) × (F × F) => q.2.1) h + change a - b₁ = a - c₁ at h₁ + change m - b₁ = m' - c₁ at h₂ + change m - b₂ = m' - c₂ at h₃ + have hb₁ : b₁ = c₁ := by linear_combination -h₁ + subst c₁ + have hm : m = m' := by linear_combination h₂ + subst m' + have hb₂ : b₂ = c₂ := by linear_combination -h₃ + subst c₂ + rfl + +theorem difference_bound_of_many_fourWalks + (A B : Finset F) (G : Finset (F × F)) (S : Finset F) + {n V : ℝ} (hn : 0 < n) (hV : 2 ≤ V) + (hD : ((edgeDifferences G).card : ℝ) ≤ V * n) + (hw : ∀ a ∈ S, ∀ a' ∈ S, + n ^ 3 / (2 ^ 20 * V ^ 18) ≤ ((fourWalks A B G a a').card : ℝ)) : + ((S - S).card : ℝ) ≤ 2 ^ 20 * V ^ 22 * n := by + classical + apply expansion_bound_of_card_mul_le (Nat.cast_nonneg _) (Nat.cast_nonneg _) + hn hV hD + apply walkCard_mul_le_labelCard_pow_four (S - S) (edgeDifferences G) + (fun q => q.1.1 - q.1.2 + q.2.1 - q.2.2) + intro d hd + obtain ⟨a, ha, a', ha', rfl⟩ := Finset.mem_sub.mp hd + have hcard : (fourWalks A B G a a').card ≤ + ((((edgeDifferences G ×ˢ edgeDifferences G) ×ˢ + (edgeDifferences G ×ˢ edgeDifferences G)).filter + fun q => q.1.1 - q.1.2 + q.2.1 - q.2.2 = a - a').card) := by + apply Finset.card_le_card_of_injOn (differenceWalkLabels a a') + · intro w hwmem + obtain ⟨_, _, _, h₁, h₂, h₃, h₄⟩ := fourWalks_mem_data hwmem + apply Finset.mem_filter.mpr + constructor + · apply Finset.mem_product.mpr + constructor + · apply Finset.mem_product.mpr + exact ⟨Finset.mem_image.mpr ⟨(a, w.2.1), h₁, rfl⟩, + Finset.mem_image.mpr ⟨(w.1, w.2.1), h₂, rfl⟩⟩ + · apply Finset.mem_product.mpr + exact ⟨Finset.mem_image.mpr ⟨(w.1, w.2.2), h₃, rfl⟩, + Finset.mem_image.mpr ⟨(a', w.2.2), h₄, rfl⟩⟩ + · dsimp [differenceWalkLabels] + ring + · exact (differenceWalkLabels_injective a a').injOn + exact (hw a ha a' ha').trans (by exact_mod_cast hcard) + +end RyserCoveringCounterexample.Incidence + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/WalkExtraction.lean b/lean/OAI/Combinatorics/Ryser/Incidence/WalkExtraction.lean new file mode 100644 index 0000000000000000000000000000000000000000..26186ab1d1043043203b8d63206c340e6fdb8646 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/WalkExtraction.lean @@ -0,0 +1,53 @@ +import OAI.Combinatorics.Ryser.Incidence.DenseNeighborhood +import OAI.Combinatorics.Ryser.Incidence.WalkTrimming +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Incidence + +variable {α β : Type*} [DecidableEq α] [DecidableEq β] + +theorem exists_many_fourWalks + (A : Finset α) (B : Finset β) (G : Finset (α × β)) + (hG : G ⊆ A ×ˢ B) {n V : ℝ} (hn : 0 < n) (hV : 2 ≤ V) + (hA : (A.card : ℝ) ≤ V * n) (hB : (B.card : ℝ) ≤ V * n) + (hE : n ^ 2 / V ≤ (G.card : ℝ)) : + ∃ S : Finset α, S ⊆ A ∧ + 3 * n / (8 * V ^ 2) ≤ (S.card : ℝ) ∧ + ∀ a ∈ S, ∀ a' ∈ S, + n ^ 3 / (2 ^ 20 * V ^ 18) ≤ ((fourWalks A B G a a').card : ℝ) := by + classical + have hVpos : 0 < V := by linarith + have hVne : V ≠ 0 := ne_of_gt hVpos + obtain ⟨b, _hb, hsize, hbad⟩ := + exists_dense_neighborhood A B G hG hn hV hA hB hE + have hc : 0 < n / (2 * V ^ 2) := by positivity + have hm : 0 < ((neighbors A G b).card : ℝ) := hc.trans_le hsize + have ht : 0 ≤ n / (512 * V ^ 8) := by positivity + obtain ⟨S, hSsub, hScard, hwalks⟩ := + exists_trimmed_many_fourWalks (neighbors A G b) A B G + (neighbors_subset A G b) (n / (512 * V ^ 8)) ht hm hbad + refine ⟨S, hSsub.trans (neighbors_subset A G b), ?_, ?_⟩ + · calc + 3 * n / (8 * V ^ 2) = 3 * (n / (2 * V ^ 2)) / 4 := by + field_simp [hVne]; ring + _ ≤ 3 * ((neighbors A G b).card : ℝ) / 4 := by linarith + _ ≤ (S.card : ℝ) := hScard + · intro a ha a' ha' + calc + n ^ 3 / (2 ^ 20 * V ^ 18) = + (n / (2 * V ^ 2)) / 2 * (n / (512 * V ^ 8)) ^ 2 := by + field_simp [hVne]; ring + _ ≤ ((neighbors A G b).card : ℝ) / 2 * (n / (512 * V ^ 8)) ^ 2 := + mul_le_mul_of_nonneg_right (by linarith) (sq_nonneg _) + _ ≤ ((fourWalks A B G a a').card : ℝ) := hwalks a ha a' ha' + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/WalkQuotients.lean b/lean/OAI/Combinatorics/Ryser/Incidence/WalkQuotients.lean new file mode 100644 index 0000000000000000000000000000000000000000..fda3dc822c6c7955861275b11942474d72e9ea86 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/WalkQuotients.lean @@ -0,0 +1,129 @@ +import OAI.Combinatorics.Ryser.Incidence.WalkExpansion +import OAI.Combinatorics.Ryser.Incidence.WalkExtraction +import Mathlib.Algebra.Field.Basic +import Mathlib.Algebra.GroupWithZero.Units.Basic + +namespace OAI + +namespace RyserCoveringCounterexample.Incidence + +open scoped Pointwise + +variable {F : Type*} [Field F] [instDecidableEqF : DecidableEq F] + +def edgeQuotients (G : Finset (F × F)) : Finset F := + G.image (fun e => e.1 / e.2) + +theorem div_mem_edgeQuotients {G : Finset (F × F)} {a b : F} + (h : (a, b) ∈ G) : a / b ∈ edgeQuotients G := + Finset.mem_image.mpr ⟨(a, b), h, rfl⟩ + +def walkQuotientLabels (a a' : F) (w : Σ _ : F, F × F) : + (F × F) × (F × F) := + ((a / w.2.1, w.1 / w.2.1), (w.1 / w.2.2, a' / w.2.2)) + +def quotientWalkEval (q : (F × F) × (F × F)) : F := + q.1.1 * q.2.1 / (q.1.2 * q.2.2) + +theorem walkQuotientLabels_injective_at {a a' : F} + {w v : Σ _ : F, F × F} + (ha : a ≠ 0) (hm : w.1 ≠ 0) (hb : w.2.1 ≠ 0) + (h : walkQuotientLabels a a' w = walkQuotientLabels a a' v) : + w = v := let _ := instDecidableEqF; by + rcases w with ⟨m, b₁, b₂⟩ + rcases v with ⟨n, c₁, c₂⟩ + have h₁ : a / b₁ = a / c₁ := + congrArg (fun q : (F × F) × (F × F) => q.1.1) h + have hb₁ : b₁ = c₁ := by + simpa only [div_eq_mul_inv, mul_right_inj' ha, inv_inj] using h₁ + have h₂ : m / b₁ = n / c₁ := + congrArg (fun q : (F × F) × (F × F) => q.1.2) h + rw [← hb₁] at h₂ + have hmn : m = n := (div_left_inj' hb).mp h₂ + have h₃ : m / b₂ = n / c₂ := + congrArg (fun q : (F × F) × (F × F) => q.2.1) h + rw [← hmn] at h₃ + have hb₂ : b₂ = c₂ := by + simpa only [div_eq_mul_inv, mul_right_inj' hm, inv_inj] using h₃ + cases hmn + cases hb₁ + cases hb₂ + rfl + +theorem quotientWalkEval_labels {a a' : F} {w : Σ _ : F, F × F} + (hm : w.1 ≠ 0) (hb₁ : w.2.1 ≠ 0) (hb₂ : w.2.2 ≠ 0) : + quotientWalkEval (walkQuotientLabels a a' w) = a / a' := let _ := instDecidableEqF; by + unfold quotientWalkEval walkQuotientLabels + rw [mul_div_mul_comm, div_div_div_cancel_right₀ hb₁, + div_div_div_cancel_right₀ hb₂, div_mul_div_cancel₀ hm] + +theorem walkQuotientLabels_mem {A B : Finset F} {G : Finset (F × F)} + {a a' : F} {w : Σ _ : F, F × F} + (hw : w ∈ fourWalks A B G a a') : + walkQuotientLabels a a' w ∈ + (edgeQuotients G ×ˢ edgeQuotients G) ×ˢ + (edgeQuotients G ×ˢ edgeQuotients G) := by + obtain ⟨_, _, _, h₁, h₂, h₃, h₄⟩ := fourWalks_mem_data hw + exact Finset.mem_product.mpr + ⟨Finset.mem_product.mpr + ⟨div_mem_edgeQuotients h₁, div_mem_edgeQuotients h₂⟩, + Finset.mem_product.mpr + ⟨div_mem_edgeQuotients h₃, div_mem_edgeQuotients h₄⟩⟩ + +theorem quotient_bound_of_many_fourWalks + (A B : Finset F) (G : Finset (F × F)) (S : Finset F) + (hS : S ⊆ A) (hA0 : ∀ a ∈ A, a ≠ 0) (hB0 : ∀ b ∈ B, b ≠ 0) + {n V : ℝ} (hn : 0 < n) (hV : 2 ≤ V) + (hD : ((edgeQuotients G).card : ℝ) ≤ V * n) + (hw : ∀ a ∈ S, ∀ a' ∈ S, + n ^ 3 / (2 ^ 20 * V ^ 18) ≤ ((fourWalks A B G a a').card : ℝ)) : + ((S / S).card : ℝ) ≤ 2 ^ 20 * V ^ 22 * n := by + have hcount : ((S / S).card : ℝ) * (n ^ 3 / (2 ^ 20 * V ^ 18)) ≤ + ((edgeQuotients G).card : ℝ) ^ 4 := by + apply walkCard_mul_le_labelCard_pow_four + (S / S) (edgeQuotients G) quotientWalkEval + (n ^ 3 / (2 ^ 20 * V ^ 18)) + intro t ht + obtain ⟨a, ha, a', ha', rfl⟩ := Finset.mem_div.mp ht + have hc : (fourWalks A B G a a').card ≤ + (((edgeQuotients G ×ˢ edgeQuotients G) ×ˢ + (edgeQuotients G ×ˢ edgeQuotients G)).filter + (fun q => quotientWalkEval q = a / a')).card := by + refine Finset.card_le_card_of_injOn (walkQuotientLabels a a') ?_ ?_ + · intro w hw' + have hwdata := fourWalks_mem_data hw' + exact Finset.mem_filter.mpr + ⟨walkQuotientLabels_mem hw', + quotientWalkEval_labels (hA0 _ hwdata.1) + (hB0 _ hwdata.2.1) (hB0 _ hwdata.2.2.1)⟩ + · intro w hw' v _ heq + have hwdata := fourWalks_mem_data hw' + exact walkQuotientLabels_injective_at + (hA0 _ (hS ha)) (hA0 _ hwdata.1) (hB0 _ hwdata.2.1) heq + exact (hw a ha a' ha').trans (Nat.cast_le.mpr hc) + exact expansion_bound_of_card_mul_le + (Nat.cast_nonneg _) (Nat.cast_nonneg _) hn hV hD hcount + +theorem exists_simultaneous_small_difference_quotient + (A B : Finset F) (G : Finset (F × F)) (hG : G ⊆ A ×ˢ B) + (hA0 : ∀ a ∈ A, a ≠ 0) (hB0 : ∀ b ∈ B, b ≠ 0) + {n V : ℝ} (hn : 0 < n) (hV : 2 ≤ V) + (hA : (A.card : ℝ) ≤ V * n) (hB : (B.card : ℝ) ≤ V * n) + (hE : n ^ 2 / V ≤ (G.card : ℝ)) + (hD : ((edgeDifferences G).card : ℝ) ≤ V * n) + (hQ : ((edgeQuotients G).card : ℝ) ≤ V * n) : + ∃ S : Finset F, S ⊆ A ∧ + 3 * n / (8 * V ^ 2) ≤ (S.card : ℝ) ∧ + (S.card : ℝ) ≤ V * n ∧ + ((S - S).card : ℝ) ≤ 2 ^ 20 * V ^ 22 * n ∧ + ((S / S).card : ℝ) ≤ 2 ^ 20 * V ^ 22 * n := by + obtain ⟨S, hS, hScard, hw⟩ := + exists_many_fourWalks A B G hG hn hV hA hB hE + exact ⟨S, hS, hScard, + (Nat.cast_le.mpr (Finset.card_le_card hS)).trans hA, + difference_bound_of_many_fourWalks A B G S hn hV hD hw, + quotient_bound_of_many_fourWalks A B G S hS hA0 hB0 hn hV hQ hw⟩ + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Incidence/WalkTrimming.lean b/lean/OAI/Combinatorics/Ryser/Incidence/WalkTrimming.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3f362fdc7bcad19600825436d1754d48b6a0ee1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Incidence/WalkTrimming.lean @@ -0,0 +1,133 @@ +import OAI.Combinatorics.Ryser.Incidence.WalkCounts +import Mathlib.Algebra.BigOperators.Ring.Finset +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Incidence + +variable {α β : Type*} [DecidableEq α] [DecidableEq β] + +theorem exists_trimmed_many_fourWalks + (A₀ A : Finset α) (B : Finset β) (G : Finset (α × β)) + (hA₀ : A₀ ⊆ A) (t : ℝ) (ht : 0 ≤ t) + (hm : 0 < (A₀.card : ℝ)) + (hbad : ((badPairs A₀ B G t).card : ℝ) ≤ (A₀.card : ℝ) ^ 2 / 16) : + ∃ S : Finset α, S ⊆ A₀ ∧ + 3 * (A₀.card : ℝ) / 4 ≤ (S.card : ℝ) ∧ + ∀ a ∈ S, ∀ a' ∈ S, + (A₀.card : ℝ) / 2 * t ^ 2 ≤ ((fourWalks A B G a a').card : ℝ) := by + classical + let m : ℝ := A₀.card + let R : Finset α := A₀.filter fun a => + m / 4 < ((badPartners A₀ B G t a).card : ℝ) + let S : Finset α := A₀ \ R + have hRsub : R ⊆ A₀ := Finset.filter_subset _ _ + have htotal : (∑ a ∈ A₀, ((badPartners A₀ B G t a).card : ℝ)) = + ((badPairs A₀ B G t).card : ℝ) := by + rw [← Nat.cast_sum, ← card_badPairs_eq_sum_badPartners] + have hRlower : (R.card : ℝ) * (m / 4) ≤ + ∑ a ∈ R, ((badPartners A₀ B G t a).card : ℝ) := by + simpa only [nsmul_eq_mul] using + (Finset.card_nsmul_le_sum R + (fun a => ((badPartners A₀ B G t a).card : ℝ)) (m / 4) + (fun a ha => le_of_lt (Finset.mem_filter.mp ha).2)) + have hRupper : (∑ a ∈ R, ((badPartners A₀ B G t a).card : ℝ)) ≤ + ((badPairs A₀ B G t).card : ℝ) := by + calc + _ ≤ ∑ a ∈ A₀, ((badPartners A₀ B G t a).card : ℝ) := + Finset.sum_le_sum_of_subset_of_nonneg hRsub + (fun a _ _ => Nat.cast_nonneg _) + _ = _ := htotal + have hmpos : 0 < m := hm + have hRcard : (R.card : ℝ) ≤ m / 4 := by + have hquarter : 0 < m / 4 := by positivity + apply (mul_le_mul_iff_left₀ hquarter).mp + have hbound := hRlower.trans (hRupper.trans hbad) + change (R.card : ℝ) * (m / 4) ≤ m ^ 2 / 16 at hbound + nlinarith + have hsplitNat : S.card + R.card = A₀.card := + Finset.card_sdiff_add_card_eq_card hRsub + have hsplit : (S.card : ℝ) + (R.card : ℝ) = m := by + simpa only [Nat.cast_add] using + congrArg (fun n : ℕ => (n : ℝ)) hsplitNat + have hScard : 3 * m / 4 ≤ (S.card : ℝ) := by linarith + have hkeep (a : α) (ha : a ∈ S) : + ((badPartners A₀ B G t a).card : ℝ) ≤ m / 4 := by + apply le_of_not_gt + intro hgt + exact (Finset.mem_sdiff.mp ha).2 + (Finset.mem_filter.mpr ⟨(Finset.mem_sdiff.mp ha).1, hgt⟩) + refine ⟨S, Finset.sdiff_subset, hScard, ?_⟩ + intro a ha a' ha' + let U : Finset α := badPartners A₀ B G t a ∪ badPartners A₀ B G t a' + let C : Finset α := A₀ \ U + have hUsub : U ⊆ A₀ := by + intro x hx + rcases Finset.mem_union.mp hx with hx | hx + · exact (Finset.mem_filter.mp hx).1 + · exact (Finset.mem_filter.mp hx).1 + have hUcard : (U.card : ℝ) ≤ m / 2 := by + have hu : (U.card : ℝ) ≤ + ((badPartners A₀ B G t a).card : ℝ) + + ((badPartners A₀ B G t a').card : ℝ) := by + simpa only [Nat.cast_add] using + (Nat.cast_le.mpr (Finset.card_union_le + (badPartners A₀ B G t a) (badPartners A₀ B G t a')) : + (((badPartners A₀ B G t a ∪ badPartners A₀ B G t a').card : ℕ) : ℝ) ≤ + (((badPartners A₀ B G t a).card + + (badPartners A₀ B G t a').card : ℕ) : ℝ)) + linarith [hkeep a ha, hkeep a' ha'] + have hCsplitNat : C.card + U.card = A₀.card := + Finset.card_sdiff_add_card_eq_card hUsub + have hCsplit : (C.card : ℝ) + (U.card : ℝ) = m := by + simpa only [Nat.cast_add] using + congrArg (fun n : ℕ => (n : ℝ)) hCsplitNat + have hCcard : m / 2 ≤ (C.card : ℝ) := by linarith + have hCsub : C ⊆ A := Finset.Subset.trans Finset.sdiff_subset hA₀ + have hgood (x : α) (hx : x ∈ C) : + t ≤ ((commonNeighbors B G a x).card : ℝ) ∧ + t ≤ ((commonNeighbors B G x a').card : ℝ) := by + have hxA : x ∈ A₀ := (Finset.mem_sdiff.mp hx).1 + have hxU : x ∉ U := (Finset.mem_sdiff.mp hx).2 + constructor + · apply le_of_not_gt + intro hlt + exact hxU (Finset.mem_union.mpr (Or.inl + (Finset.mem_filter.mpr ⟨hxA, hlt⟩))) + · have hright : t ≤ ((commonNeighbors B G a' x).card : ℝ) := by + apply le_of_not_gt + intro hlt + exact hxU (Finset.mem_union.mpr (Or.inr + (Finset.mem_filter.mpr ⟨hxA, hlt⟩))) + simpa only [commonNeighbors_comm B G x a'] using hright + have hwalks : ((fourWalks A B G a a').card : ℝ) = + ∑ x ∈ A, ((commonNeighbors B G a x).card : ℝ) * + ((commonNeighbors B G x a').card : ℝ) := by + rw [card_fourWalks] + simp only [Nat.cast_sum, Nat.cast_mul] + calc + m / 2 * t ^ 2 ≤ (C.card : ℝ) * t ^ 2 := + mul_le_mul_of_nonneg_right hCcard (sq_nonneg t) + _ ≤ ∑ x ∈ C, ((commonNeighbors B G a x).card : ℝ) * + ((commonNeighbors B G x a').card : ℝ) := by + simpa only [nsmul_eq_mul] using + (Finset.card_nsmul_le_sum C + (fun x => ((commonNeighbors B G a x).card : ℝ) * + ((commonNeighbors B G x a').card : ℝ)) (t ^ 2) (by + intro x hx + rw [pow_two] + exact mul_le_mul (hgood x hx).1 (hgood x hx).2 ht (Nat.cast_nonneg _))) + _ ≤ ∑ x ∈ A, ((commonNeighbors B G a x).card : ℝ) * + ((commonNeighbors B G x a').card : ℝ) := + Finset.sum_le_sum_of_subset_of_nonneg hCsub + (fun x _ _ => mul_nonneg (Nat.cast_nonneg _) (Nat.cast_nonneg _)) + _ = ((fourWalks A B G a a').card : ℝ) := hwalks.symm + +end RyserCoveringCounterexample.Incidence + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/CleanCover.lean b/lean/OAI/Combinatorics/Ryser/LineCover/CleanCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..a8490ed3f4628c241f68fc1847d985c19df54487 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/CleanCover.lean @@ -0,0 +1,116 @@ +import OAI.Combinatorics.Ryser.LineCover.Process +import OAI.Combinatorics.Ryser.LineCover.Overlap + +namespace OAI + +open scoped Classical +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + {shapes : Finset (Finset (Point F))} {D n : ℕ} + +def cleanLines (ω : Fin n → Outcome shapes D) (L : Finset (AffineLine F)) : + Finset (AffineLine F) := L.filter fun l => linePoints l ∉ selected ω + +theorem cleanLines_subset (ω : Fin n → Outcome shapes D) (L : Finset (AffineLine F)) : + cleanLines ω L ⊆ L := Finset.filter_subset _ _ + +theorem cleanLines_not_selected {ω : Fin n → Outcome shapes D} + {L : Finset (AffineLine F)} {l : AffineLine F} (hl : l ∈ cleanLines ω L) : + linePoints l ∉ selected ω := (Finset.mem_filter.mp hl).2 + +theorem survivor_incidence_not_selected {ω : Fin n → Outcome shapes D} + {x : Point F} {l : AffineLine F} (hx : x ∈ survivors ∅ ω) + (hl : Incidence x l) : linePoints l ∉ selected ω := by + intro hs + have hactive : linePoints l ∈ selected ω \ ∅ := by simpa using hs + exact mem_survivors_active.mp hx (linePoints l) hactive ((mem_linePoints x l).mpr hl) + +theorem survivors_inter_cleanLines (ω : Fin n → Outcome shapes D) + (L : Finset (AffineLine F)) : + survivors ∅ ω ∩ L.biUnion linePoints = + survivors ∅ ω ∩ (cleanLines ω L).biUnion linePoints := by + ext x + constructor + · intro hx + obtain ⟨hs, hc⟩ := Finset.mem_inter.mp hx + obtain ⟨l, hl, hxl⟩ := Finset.mem_biUnion.mp hc + exact Finset.mem_inter.mpr ⟨hs, Finset.mem_biUnion.mpr + ⟨l, Finset.mem_filter.mpr ⟨hl, survivor_incidence_not_selected hs + ((mem_linePoints x l).mp hxl)⟩, hxl⟩⟩ + · intro hx + obtain ⟨hs, hc⟩ := Finset.mem_inter.mp hx + obtain ⟨l, hl, hxl⟩ := Finset.mem_biUnion.mp hc + exact Finset.mem_inter.mpr ⟨hs, + Finset.mem_biUnion.mpr ⟨l, cleanLines_subset ω L hl, hxl⟩⟩ + +theorem survivors_sdiff_cleanLines (ω : Fin n → Outcome shapes D) + (L : Finset (AffineLine F)) : + survivors ∅ ω \ L.biUnion linePoints = + survivors ∅ ω \ (cleanLines ω L).biUnion linePoints := by + ext x + constructor + · intro hx + obtain ⟨hs, hc⟩ := Finset.mem_sdiff.mp hx + refine Finset.mem_sdiff.mpr ⟨hs, ?_⟩ + intro hclean + obtain ⟨l, hl, hxl⟩ := Finset.mem_biUnion.mp hclean + exact hc (Finset.mem_biUnion.mpr ⟨l, cleanLines_subset ω L hl, hxl⟩) + · intro hx + obtain ⟨hs, hc⟩ := Finset.mem_sdiff.mp hx + refine Finset.mem_sdiff.mpr ⟨hs, ?_⟩ + intro horig + have hboth := Finset.mem_inter.mpr ⟨hs, horig⟩ + rw [survivors_inter_cleanLines] at hboth + exact hc (Finset.mem_inter.mp hboth).2 + +theorem coverPencil_mono {L K : Finset (AffineLine F)} (h : L ⊆ K) + (p : ProjectivePoint F) : coverPencil L p ⊆ coverPencil K p := by + intro l hl + obtain ⟨hL, hi⟩ := (mem_coverPencil L p l).mp hl + exact (mem_coverPencil K p l).mpr ⟨h hL, hi⟩ + +theorem coveredPoints_eq_inter_biUnion (X : Finset (Point F)) + (L : Finset (AffineLine F)) : + coveredPoints Incidence X L = X ∩ L.biUnion linePoints := by + ext x + change x ∈ X.filter (fun x => 0 < multiplicity Incidence L x) ↔ _ + rw [Finset.mem_filter, Finset.mem_inter] + unfold multiplicity + have hfilter : + @Finset.filter _ (Incidence x) (fun l => Classical.propDecidable (Incidence x l)) L = + L.filter (Incidence x) := Finset.filter_congr_decidable _ _ _ + rw [hfilter] + constructor + · rintro ⟨hx, hn⟩ + obtain ⟨l, hl⟩ := Finset.card_pos.mp hn + obtain ⟨hL, hi⟩ := Finset.mem_filter.mp hl + exact ⟨hx, Finset.mem_biUnion.mpr ⟨l, hL, (mem_linePoints x l).mpr hi⟩⟩ + · rintro ⟨hx, hl⟩ + obtain ⟨l, hL, hi⟩ := Finset.mem_biUnion.mp hl + exact ⟨hx, Finset.card_pos.mpr ⟨l, + Finset.mem_filter.mpr ⟨hL, (mem_linePoints x l).mp hi⟩⟩⟩ + +theorem survivors_ignore_tuple_eq {t : ℕ} (ω : Fin n → Outcome shapes D) + (a : LineTuple F t) (ha : ∀ i, linePoints (a i) ∉ selected ω) : + survivors (tupleShapes a) ω = survivors ∅ ω := by + have hd : selected ω \ tupleShapes a = selected ω := by + ext S + simp only [Finset.mem_sdiff] + constructor + · exact And.left + · intro hs + refine ⟨hs, ?_⟩ + intro ht + obtain ⟨i, rfl⟩ := (mem_tupleShapes a S).mp ht + exact ha i hs + ext x + rw [mem_survivors_active, mem_survivors_active, hd, Finset.sdiff_empty] + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/CountConcentration.lean b/lean/OAI/Combinatorics/Ryser/LineCover/CountConcentration.lean new file mode 100644 index 0000000000000000000000000000000000000000..baedac574e4d196550be78da00bf5c102b508e7d --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/CountConcentration.lean @@ -0,0 +1,142 @@ +import OAI.Combinatorics.Ryser.LineCover.Deletion +import OAI.Combinatorics.Ryser.Probability.Concentration + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.LineCover + +variable {P : Type*} [Fintype P] [DecidableEq P] + {shapes : Finset (Finset P)} {D n : ℕ} + +theorem prob_rare_le_of_pointwise (μ : FiniteLaw (Outcome shapes D)) + (ignore : Finset (Finset P)) (test : Finset P) (p₀ : ℝ) + (hpoint : ∀ x ∈ test, μ.prob (fun a => x ∈ deleted ignore a) ≤ p₀) : + μ.prob (rare ignore test) ≤ (test.card : ℝ) * p₀ := by + calc + _ ≤ ∑ x ∈ test, μ.prob (fun a => x ∈ deleted ignore a) := + prob_rare_le μ ignore test + _ ≤ ∑ _x ∈ test, p₀ := Finset.sum_le_sum fun x hx => hpoint x hx + _ = (test.card : ℝ) * p₀ := by simp + +theorem retainedCount_coordinate_concentration + (μ : Fin n → FiniteLaw (Outcome shapes D)) + (ignore : Finset (Finset P)) (test : Finset P) (H : ℕ) + (hshape : ∀ L ∈ shapes, L ∉ ignore → (L ∩ test).card ≤ H) + (M V u : ℝ) (hM : 0 < M) (hV : 0 < V) (hu : 0 < u) + (hCM : 2 * (D : ℝ) * (H : ℝ) ≤ M) + (hCV : (n : ℝ) * (2 * (D : ℝ) * (H : ℝ)) ^ 2 ≤ V) : + (FiniteLaw.pi μ).prob (fun ω => u ≤ + |retainedCount ignore test ω - + (FiniteLaw.pi μ).expectation (retainedCount ignore test)|) ≤ + 2 * Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := by + apply Concentration.coordinate_concentration n μ (retainedCount ignore test) + (fun _ => 2 * (D : ℝ) * (H : ℝ)) M V u hM hV hu + · intro i ω a + have hold : ((contribution ignore test (ω i)).card : ℝ) ≤ + (D : ℝ) * (H : ℝ) := by + exact_mod_cast contribution_card_le ignore test (ω i) H hshape + have hnew : ((contribution ignore test a).card : ℝ) ≤ + (D : ℝ) * (H : ℝ) := by + exact_mod_cast contribution_card_le ignore test a H hshape + apply (retainedCount_update_abs_le ignore test ω i a).trans + linarith + · intro i + exact hCM + · simpa using hCV + +theorem retainedCount_rare_concentration + (μ : Fin n → FiniteLaw (Outcome shapes D)) + (ignore : Finset (Finset P)) (test : Finset P) (H : ℕ) + (hshape : ∀ L ∈ shapes, L ∉ ignore → (L ∩ test).card ≤ H) + (p₀ : ℝ) + (hpoint : ∀ i x, x ∈ test → (μ i).prob (fun a => x ∈ deleted ignore a) ≤ p₀) + (M V u : ℝ) (hM : 0 < M) (hV : 0 < V) (hu : 0 < u) + (hCM : 2 * (D : ℝ) * (H : ℝ) ≤ M) + (hCV : (n : ℝ) * ((D : ℝ) * (H : ℝ)) ^ 2 * + ((test.card : ℝ) * p₀) ≤ V) : + (FiniteLaw.pi μ).prob (fun ω => u ≤ + |retainedCount ignore test ω - + (FiniteLaw.pi μ).expectation (retainedCount ignore test)|) ≤ + 2 * Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := by + apply Concentration.rare_anchor_concentration n μ (retainedCount ignore test) + (emptyOutcome shapes D) (fun _ => (D : ℝ) * (H : ℝ)) + (fun _ => (test.card : ℝ) * p₀) (fun _ => rare ignore test) + M V u hM hV hu + · intro i ω + exact retainedCount_empty_abs_le_mul ignore test H hshape ω i + · intro i ω h + exact not_rare_retainedCount_eq ignore test ω i h + · intro i + exact prob_rare_le_of_pointwise (μ i) ignore test p₀ (hpoint i) + · intro i + simpa only [mul_assoc] using hCM + · simpa [mul_assoc] using hCV + +theorem prob_lt_le_prob_centered {Ω : Type*} [Fintype Ω] + (ν : FiniteLaw Ω) (f : Ω → ℝ) (u : ℝ) + (hmean : 2 * u ≤ ν.expectation f) : + ν.prob (fun ω => f ω < u) ≤ + ν.prob (fun ω => u ≤ |f ω - ν.expectation f|) := by + apply ν.prob_mono + intro ω hω + have hneg := neg_le_abs (f ω - ν.expectation f) + linarith + +theorem retainedCount_coordinate_lower_tail + (μ : Fin n → FiniteLaw (Outcome shapes D)) + (ignore : Finset (Finset P)) (test : Finset P) (H : ℕ) + (hshape : ∀ L ∈ shapes, L ∉ ignore → (L ∩ test).card ≤ H) + (M V u : ℝ) (hM : 0 < M) (hV : 0 < V) (hu : 0 < u) + (hCM : 2 * (D : ℝ) * (H : ℝ) ≤ M) + (hCV : (n : ℝ) * (2 * (D : ℝ) * (H : ℝ)) ^ 2 ≤ V) + (hmean : 2 * u ≤ (FiniteLaw.pi μ).expectation (retainedCount ignore test)) : + (FiniteLaw.pi μ).prob (fun ω => retainedCount ignore test ω < u) ≤ + 2 * Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := + (prob_lt_le_prob_centered (FiniteLaw.pi μ) (retainedCount ignore test) u hmean).trans + (retainedCount_coordinate_concentration μ ignore test H hshape M V u + hM hV hu hCM hCV) + +theorem retainedCount_rare_lower_tail + (μ : Fin n → FiniteLaw (Outcome shapes D)) + (ignore : Finset (Finset P)) (test : Finset P) (H : ℕ) + (hshape : ∀ L ∈ shapes, L ∉ ignore → (L ∩ test).card ≤ H) + (p₀ : ℝ) + (hpoint : ∀ i x, x ∈ test → (μ i).prob (fun a => x ∈ deleted ignore a) ≤ p₀) + (M V u : ℝ) (hM : 0 < M) (hV : 0 < V) (hu : 0 < u) + (hCM : 2 * (D : ℝ) * (H : ℝ) ≤ M) + (hCV : (n : ℝ) * ((D : ℝ) * (H : ℝ)) ^ 2 * + ((test.card : ℝ) * p₀) ≤ V) + (hmean : 2 * u ≤ (FiniteLaw.pi μ).expectation (retainedCount ignore test)) : + (FiniteLaw.pi μ).prob (fun ω => retainedCount ignore test ω < u) ≤ + 2 * Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := + (prob_lt_le_prob_centered (FiniteLaw.pi μ) (retainedCount ignore test) u hmean).trans + (retainedCount_rare_concentration μ ignore test H hshape p₀ hpoint M V u + hM hV hu hCM hCV) + +theorem expectation_retainedCount_ge_of_base_survival + (μ : Fin n → FiniteLaw (Outcome shapes D)) + (ignore : Finset (Finset P)) (test : Finset P) (δ : ℝ) + (hbase : ∀ x ∈ test, + δ ≤ (FiniteLaw.pi μ).prob (fun ω => x ∈ survivors ∅ ω)) : + δ * (test.card : ℝ) ≤ + (FiniteLaw.pi μ).expectation (retainedCount ignore test) := by + rw [expectation_retainedCount] + calc + δ * (test.card : ℝ) = ∑ _x ∈ test, δ := by simp [mul_comm] + _ ≤ ∑ x ∈ test, (FiniteLaw.pi μ).prob (fun ω => x ∈ survivors ignore ω) := by + apply Finset.sum_le_sum + intro x hx + apply (hbase x hx).trans + apply (FiniteLaw.pi μ).prob_mono + intro ω hω + exact survivors_mono_ignore (Finset.empty_subset ignore) ω hω + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/CountEvents.lean b/lean/OAI/Combinatorics/Ryser/LineCover/CountEvents.lean new file mode 100644 index 0000000000000000000000000000000000000000..b6be2788bf1504cba54d010a7bf82bcd9b2e947c --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/CountEvents.lean @@ -0,0 +1,108 @@ +import OAI.Combinatorics.Ryser.LineCover.MeanCounts +import OAI.Combinatorics.Ryser.LineCover.CountConcentration +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.LineCover.DeletionProcess + +variable {F : Type*} [Field F] [Fintype F] [instDecidableEqF : DecidableEq F] + {D : ℕ} {δ : ℝ} (process : DeletionProcess F D δ) + +private theorem fieldCard_pos_real : 0 < (Fintype.card F : ℝ) := let _ := instDecidableEqF; by + exact_mod_cast Fintype.card_pos (α := F) + +theorem total_count_concentration (hD : 0 < D) (u : ℝ) (hu : 0 < u) : + process.law.prob (fun ω => u ≤ + |retainedCount ∅ Finset.univ ω - + process.survival * (Fintype.card F : ℝ) ^ 2|) ≤ + 2 * Real.exp (-(1 / 4 : ℝ) * + min (u ^ 2 / (4 * (D : ℝ) ^ 5 * (Fintype.card F : ℝ) ^ 3)) + (u / (2 * (D : ℝ) ^ 2 * (Fintype.card F : ℝ)))) := by + have hDr : 0 < (D : ℝ) := by exact_mod_cast hD + have hq := fieldCard_pos_real (F := F) + have hn : (process.trialsCount : ℝ) ≤ (D : ℝ) * (Fintype.card F : ℝ) := by + exact_mod_cast process.trialsCount_le + have hC : 2 * (D : ℝ) * ((D * Fintype.card F : ℕ) : ℝ) = + 2 * (D : ℝ) ^ 2 * (Fintype.card F : ℝ) := by + rw [Nat.cast_mul] + ring + have hV : (process.trialsCount : ℝ) * + (2 * (D : ℝ) * ((D * Fintype.card F : ℕ) : ℝ)) ^ 2 ≤ + 4 * (D : ℝ) ^ 5 * (Fintype.card F : ℝ) ^ 3 := by + rw [hC] + calc + _ ≤ ((D : ℝ) * (Fintype.card F : ℝ)) * + (2 * (D : ℝ) ^ 2 * (Fintype.card F : ℝ)) ^ 2 := + mul_le_mul_of_nonneg_right hn (sq_nonneg _) + _ = _ := by ring + have h := retainedCount_coordinate_concentration process.trials ∅ Finset.univ + (D * Fintype.card F) + (fun S hS _ => by simpa using process.shapeSize S hS) + (2 * (D : ℝ) ^ 2 * (Fintype.card F : ℝ)) + (4 * (D : ℝ) ^ 5 * (Fintype.card F : ℝ) ^ 3) u + (by positivity) (by positivity) hu hC.le hV + change process.law.prob (fun ω => u ≤ + |retainedCount ∅ Finset.univ ω - + process.law.expectation (retainedCount ∅ Finset.univ)|) ≤ _ at h + rw [process.expectation_totalCount] at h + exact h + +theorem ignored_line_count_concentration (hD : 0 < D) (l : AffineLine F) + (u : ℝ) (hu : 0 < u) : + process.law.prob (fun ω => u ≤ + |retainedCount {linePoints l} (linePoints l) ω - + process.law.expectation (retainedCount {linePoints l} (linePoints l))|) ≤ + 2 * Real.exp (-(1 / 4 : ℝ) * + min (u ^ 2 / (4 * (D : ℝ) ^ 5 * (Fintype.card F : ℝ))) + (u / (2 * (D : ℝ) ^ 2))) := by + have hDr : 0 < (D : ℝ) := by exact_mod_cast hD + have hq := fieldCard_pos_real (F := F) + have hn : (process.trialsCount : ℝ) ≤ (D : ℝ) * (Fintype.card F : ℝ) := by + exact_mod_cast process.trialsCount_le + have hC : 2 * (D : ℝ) * (D : ℝ) = 2 * (D : ℝ) ^ 2 := by ring + have hV : (process.trialsCount : ℝ) * (2 * (D : ℝ) * (D : ℝ)) ^ 2 ≤ + 4 * (D : ℝ) ^ 5 * (Fintype.card F : ℝ) := by + calc + _ ≤ ((D : ℝ) * (Fintype.card F : ℝ)) * + (2 * (D : ℝ) * (D : ℝ)) ^ 2 := + mul_le_mul_of_nonneg_right hn (sq_nonneg _) + _ = _ := by ring + exact retainedCount_coordinate_concentration process.trials {linePoints l} + (linePoints l) D + (fun S hS hnot => process.sparse S hS l (by simpa using hnot)) + (2 * (D : ℝ) ^ 2) (4 * (D : ℝ) ^ 5 * (Fintype.card F : ℝ)) u + (by positivity) (by positivity) hu hC.le hV + +theorem ignored_line_lower_tail (hD : 0 < D) (hδ : 0 < δ) (l : AffineLine F) : + process.law.prob (fun ω => + retainedCount {linePoints l} (linePoints l) ω < + δ * (Fintype.card F : ℝ) / 2) ≤ + 2 * Real.exp (-(1 / 4 : ℝ) * + min ((δ * (Fintype.card F : ℝ) / 2) ^ 2 / + (4 * (D : ℝ) ^ 5 * (Fintype.card F : ℝ))) + ((δ * (Fintype.card F : ℝ) / 2) / (2 * (D : ℝ) ^ 2))) := by + have hq := fieldCard_pos_real (F := F) + have hδq : δ * (Fintype.card F : ℝ) ≤ + process.survival * (Fintype.card F : ℝ) := + mul_le_mul_of_nonneg_right process.survivalLower hq.le + have hmean : 2 * (δ * (Fintype.card F : ℝ) / 2) ≤ + process.law.expectation (retainedCount {linePoints l} (linePoints l)) := by + have hlo := (process.expectation_ignored_lineCount_bounds l).1 + linarith + exact (prob_lt_le_prob_centered process.law + (retainedCount {linePoints l} (linePoints l)) + (δ * (Fintype.card F : ℝ) / 2) hmean).trans + (process.ignored_line_count_concentration hD l + (δ * (Fintype.card F : ℝ) / 2) (by positivity)) + +end RyserCoveringCounterexample.LineCover.DeletionProcess + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/CountTailNumerics.lean b/lean/OAI/Combinatorics/Ryser/LineCover/CountTailNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..b9fc7d8022e8c1ad201ba24e7a94ca6fd2e5dc86 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/CountTailNumerics.lean @@ -0,0 +1,88 @@ +import OAI.Combinatorics.Ryser.LineCover.TailNumerics +import Mathlib.Tactic.FieldSimp + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +theorem count_variance_ratio {q D ε k : ℝ} (hq : 0 < q) (hD : D ≠ 0) : + (q ^ (k + 1 / 2 + ε)) ^ 2 / (4 * D ^ 5 * q ^ (2 * k + 1)) = + q ^ (2 * ε) / (4 * D ^ 5) := by + have hp : (q ^ (k + 1 / 2 + ε)) ^ 2 = + q ^ (2 * ε) * q ^ (2 * k + 1) := by + calc + _ = q ^ ((k + 1 / 2 + ε) * (2 : ℝ)) := by + rw [Real.rpow_mul hq.le, Real.rpow_two] + _ = q ^ (2 * ε + (2 * k + 1)) := by congr 1; ring + _ = _ := Real.rpow_add hq _ _ + rw [hp] + have hpow : q ^ (2 * k + 1) ≠ 0 := (Real.rpow_pos_of_pos hq _).ne' + field_simp [hD, hpow] + +theorem count_coordinate_ratio {q D ε k : ℝ} (hq : 0 < q) (hD : D ≠ 0) : + q ^ (k + 1 / 2 + ε) / (2 * D ^ 2 * q ^ k) = + q ^ (1 / 2 + ε) / (2 * D ^ 2) := by + rw [show k + 1 / 2 + ε = (1 / 2 + ε) + k by ring, Real.rpow_add hq] + have hpow : q ^ k ≠ 0 := (Real.rpow_pos_of_pos hq _).ne' + field_simp [hD, hpow] + +theorem count_variance_ratio_le_coordinate {q D ε : ℝ} + (hq : 1 ≤ q) (hD : 1 ≤ D) (hε : ε ≤ 1 / 2) : + q ^ (2 * ε) / (4 * D ^ 5) ≤ q ^ (1 / 2 + ε) / (2 * D ^ 2) := by + have hD0 : 0 < D := lt_of_lt_of_le (by norm_num) hD + have hq0 : 0 ≤ q := le_trans (by norm_num) hq + have hp : q ^ (2 * ε) ≤ q ^ (1 / 2 + ε) := + Real.rpow_le_rpow_of_exponent_le hq (by linarith) + have hDpow : D ^ 2 ≤ D ^ 5 := by + calc + D ^ 2 = D ^ 2 * 1 := by ring + _ ≤ D ^ 2 * D ^ 3 := mul_le_mul_of_nonneg_left (one_le_pow₀ hD) (sq_nonneg D) + _ = D ^ 5 := by ring + have hden : 2 * D ^ 2 ≤ 4 * D ^ 5 := by nlinarith [sq_nonneg D] + exact div_le_div₀ (Real.rpow_nonneg hq0 _) hp (by positivity) hden + +theorem count_tail_le_stretched_exp {q D ε k : ℝ} + (hq : 1 ≤ q) (hD : 1 ≤ D) (hε : ε ≤ 1 / 2) : + 2 * Real.exp (-(1 / 4 : ℝ) * + min ((q ^ (k + 1 / 2 + ε)) ^ 2 / (4 * D ^ 5 * q ^ (2 * k + 1))) + (q ^ (k + 1 / 2 + ε) / (2 * D ^ 2 * q ^ k))) ≤ + 2 * Real.exp (-q ^ (2 * ε) / (16 * D ^ 5)) := by + have hq0 : 0 < q := lt_of_lt_of_le (by norm_num) hq + have hD0 : D ≠ 0 := ne_of_gt (lt_of_lt_of_le (by norm_num) hD) + rw [count_variance_ratio hq0 hD0, count_coordinate_ratio hq0 hD0, + min_eq_left (count_variance_ratio_le_coordinate hq hD hε)] + have hexponent : -(1 / 4 : ℝ) * (q ^ (2 * ε) / (4 * D ^ 5)) = + -q ^ (2 * ε) / (16 * D ^ 5) := by + field_simp [hD0] + ring + rw [hexponent] + +theorem total_count_tail_le_stretched_exp {q ε : ℝ} {D : ℕ} + (hq : 1 ≤ q) (hD : 1 ≤ D) (hε : ε ≤ 1 / 2) : + 2 * Real.exp (-(1 / 4 : ℝ) * + min ((q ^ (3 / 2 + ε)) ^ 2 / (4 * (D : ℝ) ^ 5 * q ^ 3)) + (q ^ (3 / 2 + ε) / (2 * (D : ℝ) ^ 2 * q))) ≤ + 2 * Real.exp (-q ^ (2 * ε) / (16 * (D : ℝ) ^ 5)) := by + have hDr : 1 ≤ (D : ℝ) := by exact_mod_cast hD + simpa only [one_add_one_eq_two, mul_one, Real.rpow_one, + show (1 : ℝ) + 1 / 2 = 3 / 2 by norm_num, + show (2 : ℝ) + 1 = (3 : ℕ) by norm_num, Real.rpow_natCast] using + (count_tail_le_stretched_exp (q := q) (D := (D : ℝ)) (ε := ε) (k := 1) hq hDr hε) + +theorem line_count_tail_le_stretched_exp {q ε : ℝ} {D : ℕ} + (hq : 1 ≤ q) (hD : 1 ≤ D) (hε : ε ≤ 1 / 2) : + 2 * Real.exp (-(1 / 4 : ℝ) * + min ((q ^ (1 / 2 + ε)) ^ 2 / (4 * (D : ℝ) ^ 5 * q)) + (q ^ (1 / 2 + ε) / (2 * (D : ℝ) ^ 2))) ≤ + 2 * Real.exp (-q ^ (2 * ε) / (16 * (D : ℝ) ^ 5)) := by + have hDr : 1 ≤ (D : ℝ) := by exact_mod_cast hD + simpa only [mul_zero, zero_add, Real.rpow_zero, Real.rpow_one, mul_one] using + (count_tail_le_stretched_exp (q := q) (D := (D : ℝ)) (ε := ε) (k := 0) hq hDr hε) + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/CoverEstimates.lean b/lean/OAI/Combinatorics/Ryser/LineCover/CoverEstimates.lean new file mode 100644 index 0000000000000000000000000000000000000000..5b1512623e6da33b7a3352443f4bbe5ac48134da --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/CoverEstimates.lean @@ -0,0 +1,69 @@ +import OAI.Combinatorics.Ryser.LineCover.CleanCover + +namespace OAI + +open scoped BigOperators Classical +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + {shapes : Finset (Finset (Point F))} {D n : ℕ} + +theorem filter_incidence_eq_inter (X : Finset (Point F)) (l : AffineLine F) : + (X.filter fun x => Incidence x l) = X ∩ linePoints l := by + ext x + simp only [Finset.mem_filter, Finset.mem_inter, mem_linePoints] + +theorem sdiff_coveredPoints_eq (X : Finset (Point F)) (L : Finset (AffineLine F)) : + X \ coveredPoints Incidence X L = X \ L.biUnion linePoints := by + rw [coveredPoints_eq_inter_biUnion] + ext x + simp only [Finset.mem_sdiff, Finset.mem_inter] + constructor + · rintro ⟨hx, hn⟩ + exact ⟨hx, fun h => hn ⟨hx, h⟩⟩ + · rintro ⟨hx, hn⟩ + exact ⟨hx, fun h => hn h.2⟩ + +theorem survivors_ignore_clean_line_eq (ω : Fin n → Outcome shapes D) + (L : Finset (AffineLine F)) {l : AffineLine F} (hl : l ∈ cleanLines ω L) : + survivors {linePoints l} ω = survivors ∅ ω := by + simpa only [Finset.insert_empty] using + (survivors_insert_eq_of_not_selected (ignore := ∅) + (cleanLines_not_selected hl)) + +theorem clean_cover_count_bounds (ω : Fin n → Outcome shapes D) + (L : Finset (AffineLine F)) (τ δ e0 e1 b : ℝ) + (hδ : 0 < δ) (hτ : δ ≤ τ) (he1 : 0 ≤ e1) + (htotal : τ * (Fintype.card F : ℝ) ^ 2 - e0 ≤ (survivors ∅ ω).card) + (hlines : ∀ l : AffineLine F, + ((survivors {linePoints l} ω ∩ linePoints l).card : ℝ) ≤ + τ * (Fintype.card F : ℝ) + e1) + (hmiss : ((survivors ∅ ω \ L.biUnion linePoints).card : ℝ) ≤ b) + (hcard : L.card ≤ Fintype.card F) : + (overlapExcess Incidence (survivors ∅ ω) (cleanLines ω L) : ℝ) ≤ + e0 + (Fintype.card F : ℝ) * e1 + b ∧ + (Fintype.card F : ℝ) - (cleanLines ω L).card ≤ + (e0 + (Fintype.card F : ℝ) * e1 + b) / (δ * Fintype.card F) := by + have hq : 0 < (Fintype.card F : ℝ) := by + exact_mod_cast Fintype.card_pos (α := F) + apply cover_count_bounds Incidence (survivors ∅ ω) (cleanLines ω L) + τ (Fintype.card F) e0 e1 b δ hδ hτ hq he1 htotal + · intro l hl + have hfilter : + @Finset.filter _ (fun x => Incidence x l) + (fun x => Classical.propDecidable (Incidence x l)) (survivors ∅ ω) = + (survivors ∅ ω).filter (fun x => Incidence x l) := + Finset.filter_congr_decidable _ _ _ + rw [hfilter, filter_incidence_eq_inter, ← survivors_ignore_clean_line_eq ω L hl] + exact hlines l + · rw [sdiff_coveredPoints_eq, ← survivors_sdiff_cleanLines] + exact hmiss + · exact_mod_cast (Finset.card_le_card (cleanLines_subset ω L)).trans hcard + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/Definitions.lean b/lean/OAI/Combinatorics/Ryser/LineCover/Definitions.lean new file mode 100644 index 0000000000000000000000000000000000000000..0990c6bb66b2a8964a96c933abf5f8e82d1f0071 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/Definitions.lean @@ -0,0 +1,68 @@ +import OAI.Combinatorics.Ryser.Geometry.Basic +import Mathlib.Data.Fintype.Sum +import Mathlib.Data.Fintype.CardEmbedding +import Mathlib.Data.Finset.Card + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +open scoped Classical + +variable {F : Type*} [instFieldF : Field F] [instFintypeF : Fintype F] [instDecidableEqF : DecidableEq F] + +abbrev LineTuple (F : Type*) (t : ℕ) := (Fin t ⊕ Fin t) ↪ AffineLine F + +def crossPoints {t : ℕ} (a : LineTuple F t) : Finset (Point F) := + Finset.univ.filter fun x => + ∃ i j, Incidence x (a (Sum.inl i)) ∧ Incidence x (a (Sum.inr j)) + +def FiniteCrossings {t : ℕ} (a : LineTuple F t) : Prop := + ∀ i j, ∃ x, Incidence x (a (Sum.inl i)) ∧ Incidence x (a (Sum.inr j)) + +def tupleShapes {t : ℕ} (a : LineTuple F t) : Finset (Finset (Point F)) := + Finset.univ.image fun i => linePoints (a i) + +def AdmissibleTuple (shapes : Finset (Finset (Point F))) (D h : ℕ) + {t : ℕ} (a : LineTuple F t) : Prop := + FiniteCrossings a ∧ (crossPoints a).card = t * t ∧ + ∀ S ∈ shapes, S ∉ tupleShapes a → (S ∩ crossPoints a).card ≤ 2 * D * h + +def SparseShapes (shapes : Finset (Finset (Point F))) (D : ℕ) : Prop := + ∀ S ∈ shapes, ∀ l : AffineLine F, S ≠ linePoints l → + (S ∩ linePoints l).card ≤ D + +def coverPencil (L : Finset (AffineLine F)) (p : ProjectivePoint F) : + Finset (AffineLine F) := + L.filter fun l => ProjectiveIncidence p (some l) + +@[simp] theorem mem_crossPoints {t : ℕ} (a : LineTuple F t) (x : Point F) : + x ∈ crossPoints a ↔ + ∃ i j, Incidence x (a (Sum.inl i)) ∧ Incidence x (a (Sum.inr j)) := by + simp only [crossPoints, Finset.mem_filter, Finset.mem_univ, true_and] + +@[simp] theorem mem_tupleShapes {t : ℕ} (a : LineTuple F t) + (S : Finset (Point F)) : + S ∈ tupleShapes a ↔ ∃ i, linePoints (a i) = S := by + simp only [tupleShapes, Finset.mem_image, Finset.mem_univ, true_and] + +@[simp] theorem mem_coverPencil (L : Finset (AffineLine F)) + (p : ProjectivePoint F) (l : AffineLine F) : + l ∈ coverPencil L p ↔ l ∈ L ∧ ProjectiveIncidence p (some l) := let _ := instFintypeF; by + simp only [coverPencil, Finset.mem_filter] + +theorem coverPencil_subset (L : Finset (AffineLine F)) (p : ProjectivePoint F) : + coverPencil L p ⊆ L := let _ := instFintypeF; Finset.filter_subset _ _ + +theorem left_ne_right {t : ℕ} (a : LineTuple F t) (i j : Fin t) : + a (Sum.inl i) ≠ a (Sum.inr j) := let _ := instFieldF; let _ := instFintypeF; let _ := instDecidableEqF; by + intro h + cases a.injective h + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/Deletion.lean b/lean/OAI/Combinatorics/Ryser/LineCover/Deletion.lean new file mode 100644 index 0000000000000000000000000000000000000000..2c0ba5af41ee643e4ee265b1c919c53e81fc99ae --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/Deletion.lean @@ -0,0 +1,248 @@ +import OAI.Combinatorics.Ryser.LineCover.DeletionDefinitions +import OAI.Combinatorics.Ryser.Probability.Product +import Mathlib.Algebra.BigOperators.Group.Finset.Basic +import Mathlib.Tactic.NormNum + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.LineCover + +variable {P : Type*} [DecidableEq P] + {shapes : Finset (Finset P)} {D n : ℕ} + +def contribution (ignore : Finset (Finset P)) (test : Finset P) + (a : Outcome shapes D) : Finset P := deleted ignore a ∩ test + +def rare (ignore : Finset (Finset P)) (test : Finset P) + (a : Outcome shapes D) : Prop := (contribution ignore test a).Nonempty + +@[simp] theorem contribution_emptyOutcome (ignore : Finset (Finset P)) + (test : Finset P) : contribution ignore test (emptyOutcome shapes D) = ∅ := by + simp [contribution] + +theorem rare_iff_exists (ignore : Finset (Finset P)) (test : Finset P) + (a : Outcome shapes D) : + rare ignore test a ↔ ∃ x ∈ test, x ∈ deleted ignore a := by + constructor + · rintro ⟨x, hx⟩ + exact ⟨x, (Finset.mem_inter.mp hx).2, (Finset.mem_inter.mp hx).1⟩ + · rintro ⟨x, hx, hd⟩ + exact ⟨x, Finset.mem_inter.mpr ⟨hd, hx⟩⟩ + +theorem contribution_card_le (ignore : Finset (Finset P)) (test : Finset P) + (a : Outcome shapes D) (H : ℕ) + (hshape : ∀ L ∈ shapes, L ∉ ignore → (L ∩ test).card ≤ H) : + (contribution ignore test a).card ≤ D * H := by + let A := a.val.filter (fun L => L.val ∉ ignore) + change (A.biUnion Subtype.val ∩ test).card ≤ D * H + rw [Finset.biUnion_inter] + calc + _ ≤ ∑ L ∈ A, (L.val ∩ test).card := Finset.card_biUnion_le + _ ≤ ∑ _L ∈ A, H := Finset.sum_le_sum fun L hL => + hshape L.val L.property (Finset.mem_filter.mp hL).2 + _ = A.card * H := by simp + _ ≤ D * H := Nat.mul_le_mul_right H + ((Finset.card_filter_le a.val _).trans a.property) + +private theorem card_sub_card_le_card_of_sdiff_subset + {A B K : Finset P} (h : A \ B ⊆ K) : + (A.card : ℝ) - (B.card : ℝ) ≤ (K.card : ℝ) := by + have hc : A.card ≤ K.card + B.card := + (Finset.card_le_card_sdiff_add_card (s := A) (t := B)).trans + (Nat.add_le_add_right (Finset.card_le_card h) B.card) + have hr : (A.card : ℝ) ≤ (K.card : ℝ) + (B.card : ℝ) := by + exact_mod_cast hc + linarith + +variable [instFintypeP : Fintype P] + +def retainedCount (ignore : Finset (Finset P)) (test : Finset P) + (ω : Fin n → Outcome shapes D) : ℝ := + ((survivors ignore ω ∩ test).card : ℝ) + +theorem survivors_update_sdiff_subset (ignore : Finset (Finset P)) + (test : Finset P) (ω : Fin n → Outcome shapes D) (i : Fin n) + (a : Outcome shapes D) : + (survivors ignore (Function.update ω i a) ∩ test) \ + (survivors ignore ω ∩ test) ⊆ contribution ignore test (ω i) := by + intro x hx + rcases Finset.mem_sdiff.mp hx with ⟨hxnew, hxold⟩ + rcases Finset.mem_inter.mp hxnew with ⟨hxs, hxP⟩ + refine Finset.mem_inter.mpr ⟨?_, hxP⟩ + by_contra hxi + apply hxold + refine Finset.mem_inter.mpr ⟨mem_survivors.mpr ?_, hxP⟩ + intro j + by_cases hji : j = i + · subst j + exact hxi + · have hj := mem_survivors.mp hxs j + simpa only [Function.update_of_ne hji] using hj + +theorem survivors_sdiff_update_subset (ignore : Finset (Finset P)) + (test : Finset P) (ω : Fin n → Outcome shapes D) (i : Fin n) + (a : Outcome shapes D) : + (survivors ignore ω ∩ test) \ + (survivors ignore (Function.update ω i a) ∩ test) ⊆ + contribution ignore test a := by + intro x hx + rcases Finset.mem_sdiff.mp hx with ⟨hxold, hxnew⟩ + rcases Finset.mem_inter.mp hxold with ⟨hxs, hxP⟩ + refine Finset.mem_inter.mpr ⟨?_, hxP⟩ + by_contra hxa + apply hxnew + refine Finset.mem_inter.mpr ⟨mem_survivors.mpr ?_, hxP⟩ + intro j + by_cases hji : j = i + · subst j + simpa only [Function.update_self] using hxa + · have hj := mem_survivors.mp hxs j + simpa only [Function.update_of_ne hji] using hj + +theorem retainedCount_update_bounds (ignore : Finset (Finset P)) + (test : Finset P) (ω : Fin n → Outcome shapes D) (i : Fin n) + (a : Outcome shapes D) : + -((contribution ignore test a).card : ℝ) ≤ + retainedCount ignore test (Function.update ω i a) - retainedCount ignore test ω ∧ + retainedCount ignore test (Function.update ω i a) - retainedCount ignore test ω ≤ + ((contribution ignore test (ω i)).card : ℝ) := by + have hup := card_sub_card_le_card_of_sdiff_subset + (survivors_update_sdiff_subset ignore test ω i a) + have hdown := card_sub_card_le_card_of_sdiff_subset + (survivors_sdiff_update_subset ignore test ω i a) + change -((contribution ignore test a).card : ℝ) ≤ + ((survivors ignore (Function.update ω i a) ∩ test).card : ℝ) - + ((survivors ignore ω ∩ test).card : ℝ) ∧ _ + exact ⟨by linarith, hup⟩ + +theorem retainedCount_update_abs_le (ignore : Finset (Finset P)) + (test : Finset P) (ω : Fin n → Outcome shapes D) (i : Fin n) + (a : Outcome shapes D) : + |retainedCount ignore test (Function.update ω i a) - retainedCount ignore test ω| ≤ + ((contribution ignore test (ω i)).card : ℝ) + + ((contribution ignore test a).card : ℝ) := by + obtain ⟨hlo, hhi⟩ := retainedCount_update_bounds ignore test ω i a + have ho : 0 ≤ ((contribution ignore test (ω i)).card : ℝ) := Nat.cast_nonneg _ + have hn : 0 ≤ ((contribution ignore test a).card : ℝ) := Nat.cast_nonneg _ + exact abs_le.mpr ⟨by linarith, by linarith⟩ + +theorem retainedCount_empty_bounds (ignore : Finset (Finset P)) + (test : Finset P) (ω : Fin n → Outcome shapes D) (i : Fin n) : + 0 ≤ retainedCount ignore test (Function.update ω i (emptyOutcome shapes D)) - + retainedCount ignore test ω ∧ + retainedCount ignore test (Function.update ω i (emptyOutcome shapes D)) - + retainedCount ignore test ω ≤ ((contribution ignore test (ω i)).card : ℝ) := by + simpa only [contribution_emptyOutcome, Finset.card_empty, Nat.cast_zero, neg_zero] + using retainedCount_update_bounds ignore test ω i (emptyOutcome shapes D) + +theorem retainedCount_empty_abs_le (ignore : Finset (Finset P)) + (test : Finset P) (ω : Fin n → Outcome shapes D) (i : Fin n) : + |retainedCount ignore test ω - + retainedCount ignore test (Function.update ω i (emptyOutcome shapes D))| ≤ + ((contribution ignore test (ω i)).card : ℝ) := by + obtain ⟨hlo, hhi⟩ := retainedCount_empty_bounds ignore test ω i + rw [abs_sub_comm, abs_of_nonneg hlo] + exact hhi + +theorem not_rare_retainedCount_eq (ignore : Finset (Finset P)) + (test : Finset P) (ω : Fin n → Outcome shapes D) (i : Fin n) + (h : ¬ rare ignore test (ω i)) : + retainedCount ignore test ω = + retainedCount ignore test (Function.update ω i (emptyOutcome shapes D)) := by + have he : contribution ignore test (ω i) = ∅ := + Finset.not_nonempty_iff_eq_empty.mp h + obtain ⟨hlo, hhi⟩ := retainedCount_empty_bounds ignore test ω i + rw [he, Finset.card_empty, Nat.cast_zero] at hhi + linarith + +theorem retainedCount_empty_abs_le_mul (ignore : Finset (Finset P)) + (test : Finset P) (H : ℕ) + (hshape : ∀ L ∈ shapes, L ∉ ignore → (L ∩ test).card ≤ H) + (ω : Fin n → Outcome shapes D) (i : Fin n) : + |retainedCount ignore test ω - + retainedCount ignore test (Function.update ω i (emptyOutcome shapes D))| ≤ + (D : ℝ) * (H : ℝ) := by + apply (retainedCount_empty_abs_le ignore test ω i).trans + exact_mod_cast contribution_card_le ignore test (ω i) H hshape + +section FiniteExpectations + +variable {Ω : Type*} [Fintype Ω] + +theorem expectation_card_inter (μ : FiniteLaw Ω) (S : Ω → Finset P) + (test : Finset P) : + μ.expectation (fun ω => ((S ω ∩ test).card : ℝ)) = + ∑ x ∈ test, μ.prob (fun ω => x ∈ S ω) := let _ := instFintypeP; by + have hc (ω : Ω) : ((S ω ∩ test).card : ℝ) = + ∑ x ∈ test, if x ∈ S ω then (1 : ℝ) else 0 := by + simp only [Finset.sum_boole, Finset.filter_mem_eq_inter, Finset.inter_comm] + simp only [FiniteLaw.expectation, hc, Finset.mul_sum, + FiniteLaw.prob, mul_ite, mul_one, mul_zero] + calc + _ = ∑ x ∈ test, ∑ ω, if x ∈ S ω then μ.weight ω else (0 : ℝ) := + Finset.sum_comm (s := Finset.univ) (t := test) + (f := fun (ω : Ω) (x : P) => if x ∈ S ω then μ.weight ω else (0 : ℝ)) + _ = _ := by + apply Finset.sum_congr rfl + intro x _ + apply Finset.sum_congr rfl + intro ω _ + by_cases hx : x ∈ S ω <;> simp only [hx, ite_true, ite_false] + +theorem prob_nonempty_inter_le (μ : FiniteLaw Ω) (S : Ω → Finset P) + (test : Finset P) : + μ.prob (fun ω => (S ω ∩ test).Nonempty) ≤ + ∑ x ∈ test, μ.prob (fun ω => x ∈ S ω) := by + rw [← expectation_card_inter μ S test] + apply μ.prob_le_expectation + · intro ω + exact Nat.cast_nonneg _ + · intro ω hω + exact Nat.one_le_cast.mpr (Finset.one_le_card.mpr hω) + +end FiniteExpectations + +theorem prob_rare_le (μ : FiniteLaw (Outcome shapes D)) + (ignore : Finset (Finset P)) (test : Finset P) : + μ.prob (rare ignore test) ≤ + ∑ x ∈ test, μ.prob (fun a => x ∈ deleted ignore a) := + prob_nonempty_inter_le μ (deleted ignore) test + +theorem expectation_retainedCount (μ : Fin n → FiniteLaw (Outcome shapes D)) + (ignore : Finset (Finset P)) (test : Finset P) : + (FiniteLaw.pi μ).expectation (retainedCount ignore test) = + ∑ x ∈ test, (FiniteLaw.pi μ).prob (fun ω => x ∈ survivors ignore ω) := + expectation_card_inter (FiniteLaw.pi μ) (survivors ignore) test + +theorem prob_mem_survivors (μ : Fin n → FiniteLaw (Outcome shapes D)) + (ignore : Finset (Finset P)) (x : P) : + (FiniteLaw.pi μ).prob (fun ω => x ∈ survivors ignore ω) = + ∏ i, (1 - (μ i).prob (fun a => x ∈ deleted ignore a)) := by + calc + _ = (FiniteLaw.pi μ).prob (fun ω => ∀ i, x ∉ deleted ignore (ω i)) := by + congr 1 + funext ω + exact propext mem_survivors + _ = ∏ i, (μ i).prob (fun a => x ∉ deleted ignore a) := + FiniteLaw.prob_pi μ (fun _ a => x ∉ deleted ignore a) + _ = _ := by simp_rw [FiniteLaw.prob_compl] + +theorem expectation_retainedCount_product + (μ : Fin n → FiniteLaw (Outcome shapes D)) + (ignore : Finset (Finset P)) (test : Finset P) : + (FiniteLaw.pi μ).expectation (retainedCount ignore test) = + ∑ x ∈ test, ∏ i, (1 - (μ i).prob (fun a => x ∈ deleted ignore a)) := by + rw [expectation_retainedCount] + apply Finset.sum_congr rfl + intro x _ + exact prob_mem_survivors μ ignore x + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/DeletionDefinitions.lean b/lean/OAI/Combinatorics/Ryser/LineCover/DeletionDefinitions.lean new file mode 100644 index 0000000000000000000000000000000000000000..57ec7963ff3389aae9026a53936c24bdd9ee4a8a --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/DeletionDefinitions.lean @@ -0,0 +1,140 @@ +import Mathlib.Data.Fintype.Powerset +import Mathlib.Data.Finset.Union + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.LineCover + +variable {P : Type*} [DecidableEq P] + +abbrev Outcome (shapes : Finset (Finset P)) (D : ℕ) := + {A : Finset ↥shapes // A.card ≤ D} + +def emptyOutcome (shapes : Finset (Finset P)) (D : ℕ) : Outcome shapes D := + ⟨∅, by simp⟩ + +variable {shapes : Finset (Finset P)} {D n : ℕ} + +def deleted (ignore : Finset (Finset P)) (a : Outcome shapes D) : Finset P := + (a.val.filter (fun L => L.val ∉ ignore)).biUnion Subtype.val + +@[simp] theorem mem_deleted {ignore : Finset (Finset P)} + {a : Outcome shapes D} {x : P} : + x ∈ deleted ignore a ↔ ∃ L ∈ a.val, L.val ∉ ignore ∧ x ∈ L.val := by + simp [deleted, Finset.mem_biUnion, and_assoc] + +@[simp] theorem deleted_emptyOutcome (ignore : Finset (Finset P)) : + deleted ignore (emptyOutcome shapes D) = ∅ := by + simp [deleted, emptyOutcome] + +def selected (ω : Fin n → Outcome shapes D) : Finset (Finset P) := + Finset.univ.biUnion (fun i => (ω i).val.image Subtype.val) + +@[simp] theorem mem_selected {ω : Fin n → Outcome shapes D} {L : Finset P} : + L ∈ selected ω ↔ ∃ i, ∃ s ∈ (ω i).val, s.val = L := by + simp [selected, Finset.mem_biUnion, Finset.mem_image] + +variable [instFintypeP : Fintype P] + +def survivors (ignore : Finset (Finset P)) + (ω : Fin n → Outcome shapes D) : Finset P := + Finset.univ \ Finset.univ.biUnion (fun i => deleted ignore (ω i)) + +@[simp] theorem mem_survivors {ignore : Finset (Finset P)} + {ω : Fin n → Outcome shapes D} {x : P} : + x ∈ survivors ignore ω ↔ ∀ i, x ∉ deleted ignore (ω i) := by + simp [survivors, Finset.mem_biUnion] + +theorem mem_survivors_active {ignore : Finset (Finset P)} + {ω : Fin n → Outcome shapes D} {x : P} : + x ∈ survivors ignore ω ↔ ∀ L ∈ selected ω \ ignore, x ∉ L := by + rw [mem_survivors] + constructor + · intro h L hL hxL + rcases Finset.mem_sdiff.mp hL with ⟨hsel, hI⟩ + rcases mem_selected.mp hsel with ⟨i, s, hs, rfl⟩ + exact h i (mem_deleted.mpr ⟨s, hs, hI, hxL⟩) + · intro h i hx + rcases mem_deleted.mp hx with ⟨s, hs, hI, hxs⟩ + exact h s.val (Finset.mem_sdiff.mpr + ⟨mem_selected.mpr ⟨i, s, hs, rfl⟩, hI⟩) hxs + +theorem survivors_mono_ignore {ignore larger : Finset (Finset P)} + (h : ignore ⊆ larger) (ω : Fin n → Outcome shapes D) : + survivors ignore ω ⊆ survivors larger ω := by + intro x hx + apply mem_survivors.mpr + intro i hxi + rcases mem_deleted.mp hxi with ⟨s, hs, hnot, hxs⟩ + exact mem_survivors.mp hx i + (mem_deleted.mpr ⟨s, hs, fun hI => hnot (h hI), hxs⟩) + +theorem survivors_insert_eq_of_not_selected + {ignore : Finset (Finset P)} {ω : Fin n → Outcome shapes D} + {L : Finset P} (hL : L ∉ selected ω) : + survivors (insert L ignore) ω = survivors ignore ω := by + ext x + rw [mem_survivors_active, mem_survivors_active, + Finset.sdiff_insert_of_notMem hL ignore] + +theorem selected_of_survivors_insert_ne + {ignore : Finset (Finset P)} {ω : Fin n → Outcome shapes D} + {L : Finset P} (changed : survivors (insert L ignore) ω ≠ survivors ignore ω) : + L ∈ selected ω := by + by_contra hL + exact changed (survivors_insert_eq_of_not_selected hL) + +theorem not_ignored_of_survivors_insert_ne + {ignore : Finset (Finset P)} {ω : Fin n → Outcome shapes D} + {L : Finset P} (changed : survivors (insert L ignore) ω ≠ survivors ignore ω) : + L ∉ ignore := by + intro hL + exact changed (by rw [Finset.insert_eq_of_mem hL]) + +def cleanCover (ignore : Finset (Finset P)) (ω : Fin n → Outcome shapes D) + (cover : Finset (Finset P)) : Finset (Finset P) := + cover \ (selected ω \ ignore) + +theorem survivors_inter_cleanCover (ignore : Finset (Finset P)) + (ω : Fin n → Outcome shapes D) (cover : Finset (Finset P)) : + survivors ignore ω ∩ cover.biUnion id = + survivors ignore ω ∩ (cleanCover ignore ω cover).biUnion id := by + ext x + constructor + · intro hx + rcases Finset.mem_inter.mp hx with ⟨hs, hc⟩ + rcases Finset.mem_biUnion.mp hc with ⟨L, hLc, hxL⟩ + refine Finset.mem_inter.mpr ⟨hs, + Finset.mem_biUnion.mpr ⟨L, ?_, hxL⟩⟩ + change L ∈ cover \ (selected ω \ ignore) + exact Finset.mem_sdiff.mpr ⟨hLc, + fun hL => mem_survivors_active.mp hs L hL hxL⟩ + · intro hx + rcases Finset.mem_inter.mp hx with ⟨hs, hc⟩ + rcases Finset.mem_biUnion.mp hc with ⟨L, hLc, hxL⟩ + change L ∈ cover \ (selected ω \ ignore) at hLc + exact Finset.mem_inter.mpr ⟨hs, + Finset.mem_biUnion.mpr ⟨L, (Finset.mem_sdiff.mp hLc).1, hxL⟩⟩ + +theorem cleanCover_covers {ignore : Finset (Finset P)} + {ω : Fin n → Outcome shapes D} {cover : Finset (Finset P)} + (h : survivors ignore ω ⊆ cover.biUnion id) : + survivors ignore ω ⊆ (cleanCover ignore ω cover).biUnion id := by + intro x hx + have hh := Finset.mem_inter.mpr ⟨hx, h hx⟩ + rw [survivors_inter_cleanCover] at hh + exact (Finset.mem_inter.mp hh).2 + +theorem cleanCover_card_le (ignore : Finset (Finset P)) + (ω : Fin n → Outcome shapes D) (cover : Finset (Finset P)) : + (cleanCover ignore ω cover).card ≤ cover.card := let _ := instFintypeP; + Finset.card_le_card Finset.sdiff_subset + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/DisjointPairs.lean b/lean/OAI/Combinatorics/Ryser/LineCover/DisjointPairs.lean new file mode 100644 index 0000000000000000000000000000000000000000..8780158f644da2944e73b3946feb3c06bcbeaa3f --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/DisjointPairs.lean @@ -0,0 +1,114 @@ +import Mathlib.Data.Finset.Card +import Mathlib.Data.Set.Function +import Mathlib.Data.Fintype.EquivFin + +namespace OAI + +namespace RyserCoveringCounterexample + +theorem exists_subset_card_slot_injective + {P I J : Type*} [DecidableEq P] [DecidableEq I] [DecidableEq J] + (left : P → I) (right : P → J) (D h : ℕ) (S : Finset P) + (hleft : ∀ i, (S.filter fun x => left x = i).card ≤ D) + (hright : ∀ j, (S.filter fun x => right x = j).card ≤ D) + (hlarge : 2 * D * h < S.card) : + ∃ T : Finset P, T ⊆ S ∧ T.card = h ∧ + Set.InjOn left (T : Set P) ∧ Set.InjOn right (T : Set P) := by + classical + induction h generalizing S with + | zero => + refine ⟨∅, Finset.empty_subset S, by simp, ?_, ?_⟩ + · simpa only [Finset.coe_empty] using Set.injOn_empty left + · simpa only [Finset.coe_empty] using Set.injOn_empty right + | succ h ih => + obtain ⟨x, hx⟩ := Finset.card_pos.mp + (lt_of_le_of_lt (Nat.zero_le _) hlarge) + let B := (S.filter fun y => left y = left x) ∪ + (S.filter fun y => right y = right x) + let U := S \ B + have hUS : U ⊆ S := Finset.sdiff_subset + have hB : B.card ≤ 2 * D := by + calc + B.card ≤ (S.filter fun y => left y = left x).card + + (S.filter fun y => right y = right x).card := + Finset.card_union_le _ _ + _ ≤ D + D := Nat.add_le_add (hleft (left x)) (hright (right x)) + _ = 2 * D := (Nat.two_mul D).symm + have hUlarge : 2 * D * h < U.card := by + have hcount : S.card ≤ U.card + B.card := + Finset.card_le_card_sdiff_add_card + have hexpand : 2 * D * h + 2 * D < S.card := by + simpa only [Nat.mul_succ] using hlarge + have hsum : 2 * D * h + 2 * D < U.card + 2 * D := + hexpand.trans_le (hcount.trans (Nat.add_le_add_left hB U.card)) + exact Nat.add_lt_add_iff_right.mp hsum + have hUleft : ∀ i, (U.filter fun y => left y = i).card ≤ D := by + intro i + exact (Finset.card_le_card + (Finset.filter_subset_filter (fun y => left y = i) hUS)).trans (hleft i) + have hUright : ∀ j, (U.filter fun y => right y = j).card ≤ D := by + intro j + exact (Finset.card_le_card + (Finset.filter_subset_filter (fun y => right y = j) hUS)).trans (hright j) + obtain ⟨T, hTU, hcard, hTL, hTR⟩ := ih U hUleft hUright hUlarge + have havoid (y : P) (hy : y ∈ T) : + left y ≠ left x ∧ right y ≠ right x := by + have hyU := Finset.mem_sdiff.mp (hTU hy) + constructor + · intro heq + exact hyU.2 (Finset.mem_union.mpr + (Or.inl (Finset.mem_filter.mpr ⟨hyU.1, heq⟩))) + · intro heq + exact hyU.2 (Finset.mem_union.mpr + (Or.inr (Finset.mem_filter.mpr ⟨hyU.1, heq⟩))) + have hxT : x ∉ T := fun hxT => (havoid x hxT).1 rfl + refine ⟨insert x T, ?_, ?_, ?_, ?_⟩ + · intro y hy + rcases Finset.mem_insert.mp hy with rfl | hy + · exact hx + · exact hUS (hTU hy) + · rw [Finset.card_insert_of_notMem hxT, hcard] + · rw [Finset.coe_insert] + refine (Set.injOn_insert hxT).2 ⟨hTL, ?_⟩ + rintro ⟨y, hy, heq⟩ + exact (havoid y hy).1 heq + · rw [Finset.coe_insert] + refine (Set.injOn_insert hxT).2 ⟨hTR, ?_⟩ + rintro ⟨y, hy, heq⟩ + exact (havoid y hy).2 heq + +theorem exists_disjoint_coordinate_sample + {P I J : Type*} [DecidableEq P] [DecidableEq I] [DecidableEq J] + (S : Finset P) (left : P → I) (right : P → J) (D h : ℕ) + (hleft : ∀ i, (S.filter fun x => left x = i).card ≤ D) + (hright : ∀ j, (S.filter fun x => right x = j).card ≤ D) + (hlarge : 2 * D * h < S.card) : + ∃ e : Fin h ↪ ↥S, + Function.Injective (fun k => left (e k).val) ∧ + Function.Injective (fun k => right (e k).val) := by + classical + obtain ⟨T, hTS, hcard, hTL, hTR⟩ := + exists_subset_card_slot_injective left right D h S hleft hright hlarge + let q : Fin h ≃ ↥T := (Finset.equivFinOfCardEq (s := T) hcard).symm + let e : Fin h ↪ ↥S := + { toFun := fun k => ⟨(q k).val, hTS (q k).property⟩ + inj' := by + intro i j hij + apply q.injective + apply Subtype.ext + exact congrArg (fun x : ↥S => x.val) hij } + refine ⟨e, ?_, ?_⟩ + · intro i j hij + apply q.injective + apply Subtype.ext + change left (q i).val = left (q j).val at hij + exact hTL (q i).property (q j).property hij + · intro i j hij + apply q.injective + apply Subtype.ext + change right (q i).val = right (q j).val at hij + exact hTR (q i).property (q j).property hij + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/FailureNumerics.lean b/lean/OAI/Combinatorics/Ryser/LineCover/FailureNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac0b01766455081a7bf2162251b06bccae8762c2 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/FailureNumerics.lean @@ -0,0 +1,336 @@ +import OAI.Combinatorics.Ryser.LineCover.TailNumerics +import OAI.Combinatorics.Ryser.LineCover.SamplingNumerics +import OAI.Combinatorics.Ryser.LineCover.FiniteFailureNumerics + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +open Filter Topology + +def lowFailureEnvelope (D : ℕ) (δ A κ q : ℝ) : ℝ := + let h := 10 * (D + 1) + let t := (logarithmicSampleSize A q : ℝ) + (16 / δ) * (((D : ℝ) + 4) * q ^ (-(7 * κ / 30)) + q ^ (-(3 * κ / 4))) + + (16 * (t ^ 2 * q ^ (-(1 / 2 - κ / 4))) + + 32 * (t ^ 3 * q ^ (-(1 / 2 - κ / 4)))) + + ((D : ℝ) * (8 * (D : ℝ)) ^ h) * + (t ^ (2 * h) * q ^ (-((h : ℝ) * (1 / 2 - κ / 4) - D))) + +def highFailureEnvelope (D : ℕ) (δ ρ A κ q : ℝ) : ℝ := + let h := 10 * (D + 1) + let t := (logarithmicSampleSize A q : ℝ) + (4 * ((D : ℝ) + 4) / (δ * ρ)) * q ^ (-(3 * κ / 20)) + + (t ^ 2 * q ^ (-(1 / 2 + κ / 4)) + + t ^ 3 * q ^ (-(1 / 2 + κ / 4))) + + ((D : ℝ) * (4 * (D : ℝ)) ^ h) * + (t ^ (2 * h) * q ^ (-((h : ℝ) * (1 / 2 + κ / 4) - D))) + +theorem low_occupancy_decay_pos (D : ℕ) {κ : ℝ} (hκ : κ ≤ 1) : + 0 < ((10 * (D + 1) : ℕ) : ℝ) * (1 / 2 - κ / 4) - D := by + have hD : (0 : ℝ) ≤ D := Nat.cast_nonneg _ + have hmul := mul_nonneg (by positivity : 0 ≤ (D : ℝ) + 1) + (sub_nonneg.mpr hκ) + simp only [Nat.cast_mul, Nat.cast_ofNat, Nat.cast_add, Nat.cast_one] + nlinarith + +theorem high_occupancy_decay_pos (D : ℕ) {κ : ℝ} (hκ : 0 < κ) : + 0 < ((10 * (D + 1) : ℕ) : ℝ) * (1 / 2 + κ / 4) - D := by + have hD : (0 : ℝ) ≤ D := Nat.cast_nonneg _ + have hmul := mul_pos (by positivity : 0 < (D : ℝ) + 1) hκ + simp only [Nat.cast_mul, Nat.cast_ofNat, Nat.cast_add, Nat.cast_one] + nlinarith + +theorem tendsto_lowFailureEnvelope_atTop (D : ℕ) (δ : ℝ) {A κ : ℝ} + (hA : 0 < A) (hκ : 0 < κ) (hκone : κ ≤ 1) : + Tendsto (lowFailureEnvelope D δ A κ) atTop (𝓝 0) := by + have hfirst := (tendsto_rpow_neg_atTop + (by positivity : 0 < 7 * κ / 30)).const_mul ((D : ℝ) + 4) + have hsecond := tendsto_rpow_neg_atTop (by positivity : 0 < 3 * κ / 4) + have hsurvivors := (hfirst.add hsecond).const_mul (16 / δ) + have hdecay : 0 < (1 / 2 : ℝ) - κ / 4 := by linarith + have hparallel := (tendsto_sampleSize_pow_mul_rpow_neg_atTop 2 hA hdecay).const_mul + (16 : ℝ) + have hconcurrent := (tendsto_sampleSize_pow_mul_rpow_neg_atTop 3 hA hdecay).const_mul + (32 : ℝ) + have hoccupancy := (tendsto_sampleSize_pow_mul_rpow_neg_atTop + (2 * (10 * (D + 1))) hA (low_occupancy_decay_pos D hκone)).const_mul + ((D : ℝ) * (8 * (D : ℝ)) ^ (10 * (D + 1))) + unfold lowFailureEnvelope + simpa only [mul_zero, add_zero] using + (hsurvivors.add (hparallel.add hconcurrent)).add hoccupancy + +theorem tendsto_highFailureEnvelope_atTop (D : ℕ) (δ ρ : ℝ) {A κ : ℝ} + (hA : 0 < A) (hκ : 0 < κ) : + Tendsto (highFailureEnvelope D δ ρ A κ) atTop (𝓝 0) := by + have hsurvivors := (tendsto_rpow_neg_atTop + (by positivity : 0 < 3 * κ / 20)).const_mul (4 * ((D : ℝ) + 4) / (δ * ρ)) + have hdecay : 0 < (1 / 2 : ℝ) + κ / 4 := by positivity + have hgeometry := (tendsto_sampleSize_pow_mul_rpow_neg_atTop 2 hA hdecay).add + (tendsto_sampleSize_pow_mul_rpow_neg_atTop 3 hA hdecay) + have hoccupancy := (tendsto_sampleSize_pow_mul_rpow_neg_atTop + (2 * (10 * (D + 1))) hA (high_occupancy_decay_pos D hκ)).const_mul + ((D : ℝ) * (4 * (D : ℝ)) ^ (10 * (D + 1))) + unfold highFailureEnvelope + simpa only [mul_zero, add_zero] using + (hsurvivors.add hgeometry).add hoccupancy + +theorem eventually_lowFailureEnvelope_lt_one (D : ℕ) (δ : ℝ) {A κ : ℝ} + (hA : 0 < A) (hκ : 0 < κ) (hκone : κ ≤ 1) : + ∀ᶠ q : ℝ in atTop, lowFailureEnvelope D δ A κ q < 1 := + (tendsto_order.mp (tendsto_lowFailureEnvelope_atTop D δ hA hκ hκone)).2 1 + (by norm_num) + +theorem eventually_highFailureEnvelope_lt_one (D : ℕ) (δ ρ : ℝ) {A κ : ℝ} + (hA : 0 < A) (hκ : 0 < κ) : + ∀ᶠ q : ℝ in atTop, highFailureEnvelope D δ ρ A κ q < 1 := + (tendsto_order.mp (tendsto_highFailureEnvelope_atTop D δ ρ hA hκ)).2 1 + (by norm_num) + +theorem low_concurrency_ratio_le {q m R κ : ℝ} (hq : 0 < q) + (hm : q / 2 ≤ m) (hR : R ≤ q ^ (1 / 2 + κ / 4)) : + R / m ≤ 2 * q ^ (-(1 / 2 - κ / 4)) := by + calc + R / m ≤ q ^ (1 / 2 + κ / 4) / (q / 2) := + div_le_div₀ (Real.rpow_nonneg hq.le _) hR (by positivity) hm + _ = 2 * (q ^ (1 / 2 + κ / 4) / q) := by + field_simp [hq.ne'] + + _ = 2 * q ^ (-(1 / 2 - κ / 4)) := by + rw [← Real.rpow_sub_one hq.ne'] + congr 2 + ring + +theorem high_concurrency_inverse_le {q R κ : ℝ} (hq : 0 < q) + (hR : q ^ (1 / 2 + κ / 4) ≤ R) : + 1 / R ≤ q ^ (-(1 / 2 + κ / 4)) := by + calc + 1 / R ≤ 1 / q ^ (1 / 2 + κ / 4) := + one_div_le_one_div_of_le (Real.rpow_pos_of_pos hq _) hR + _ = q ^ (-(1 / 2 + κ / 4)) := by rw [Real.rpow_neg hq.le, one_div] + +theorem sampling_occupancy_le_power (D h t : ℕ) {q K B C β : ℝ} + (hq : 0 < q) (hK0 : 0 ≤ K) (hB : 0 ≤ B) (hC : 0 ≤ C) + (hK : K ≤ (D : ℝ) * q ^ (D : ℝ)) + (hbase : B ≤ C * (t : ℝ) ^ 2 * q ^ (-β)) : + K * B ^ h ≤ ((D : ℝ) * C ^ h) * + ((t : ℝ) ^ (2 * h) * q ^ (-((h : ℝ) * β - D))) := by + let _ := hK0 + let _ := hC + have hp := pow_le_pow_left₀ hB hbase h + have hjoin : q ^ (D : ℝ) * (q ^ (-β)) ^ h = + q ^ (-((h : ℝ) * β - D)) := by + rw [← Real.rpow_mul_natCast hq.le, ← Real.rpow_add hq] + congr 1 + ring + calc + K * B ^ h ≤ ((D : ℝ) * q ^ (D : ℝ)) * + (C * (t : ℝ) ^ 2 * q ^ (-β)) ^ h := + mul_le_mul hK hp (pow_nonneg hB _) (by positivity) + _ = ((D : ℝ) * C ^ h) * (t : ℝ) ^ (2 * h) * + (q ^ (D : ℝ) * (q ^ (-β)) ^ h) := by + simp only [mul_pow, pow_mul] + ring + _ = _ := by rw [hjoin]; ring + +theorem high_survivor_term_le {q E R N δ ρ κ : ℝ} (D : ℕ) + (hq : 0 < q) (hδ : 0 < δ) (hρ : 0 < ρ) (hE0 : 0 ≤ E) + (hE : E ≤ ((D : ℝ) + 4) * q ^ (3 / 2 + κ / 10)) + (hR : q ^ (1 / 2 + κ / 4) ≤ R) (hN : ρ * q / 2 ≤ N) : + 2 * E / (δ * R * N) ≤ + (4 * ((D : ℝ) + 4) / (δ * ρ)) * q ^ (-(3 * κ / 20)) := by + let _ := hE0 + have hR0 : 0 < R := lt_of_lt_of_le (Real.rpow_pos_of_pos hq _) hR + have hN0 : 0 < N := lt_of_lt_of_le (by positivity) hN + have hden : δ * q ^ (1 / 2 + κ / 4) * (ρ * q / 2) ≤ δ * R * N := + mul_le_mul (mul_le_mul_of_nonneg_left hR hδ.le) hN (by positivity) + (mul_nonneg hδ.le hR0.le) + have hratio : q ^ (3 / 2 + κ / 10) / + (q ^ (1 / 2 + κ / 4) * q) = q ^ (-(3 * κ / 20)) := by + rw [← Real.rpow_add_one hq.ne', ← Real.rpow_sub hq] + congr 1 + ring + calc + 2 * E / (δ * R * N) ≤ + (2 * (((D : ℝ) + 4) * q ^ (3 / 2 + κ / 10))) / + (δ * q ^ (1 / 2 + κ / 4) * (ρ * q / 2)) := + div_le_div₀ (by positivity) (by linarith) (by positivity) hden + _ = (4 * ((D : ℝ) + 4) / (δ * ρ)) * + (q ^ (3 / 2 + κ / 10) / (q ^ (1 / 2 + κ / 4) * q)) := by + field_simp + ring + _ = _ := by rw [hratio] + +theorem low_coarse_failure_le_envelope (D m R K : ℕ) {δ A κ q P : ℝ} + (hq : 0 < q) (hδ : 0 < δ) (hm : q / 2 ≤ (m : ℝ)) + (hR : (R : ℝ) ≤ q ^ (1 / 2 + κ / 4)) + (hK : (K : ℝ) ≤ (D : ℝ) * q ^ (D : ℝ)) + (hP : P / (m : ℝ) ^ 2 ≤ + 4 * (((D : ℝ) + 4) * q ^ (-(7 * κ / 30)) + q ^ (-(3 * κ / 4)))) : + let t := (logarithmicSampleSize A q : ℝ) + let h := 10 * (D + 1) + 4 * P / (δ * (m : ℝ) ^ 2) + 8 * t ^ 2 * R / m + + 16 * t ^ 3 * R / m + (K : ℝ) * (4 * (D : ℝ) * t ^ 2 * R / m) ^ h ≤ + lowFailureEnvelope D δ A κ q := by + let t := logarithmicSampleSize A q + let h := 10 * (D + 1) + have hm0 : (0 : ℝ) < m := lt_of_lt_of_le (by positivity) hm + have hratio := low_concurrency_ratio_le hq hm hR + have hpair : 4 * P / (δ * (m : ℝ) ^ 2) ≤ + (16 / δ) * (((D : ℝ) + 4) * q ^ (-(7 * κ / 30)) + q ^ (-(3 * κ / 4))) := by + have hh := mul_le_mul_of_nonneg_left hP (by positivity : 0 ≤ 4 / δ) + calc + _ = (4 / δ) * (P / (m : ℝ) ^ 2) := by + field_simp [hδ.ne', hm0.ne'] + + _ ≤ (4 / δ) * + (4 * (((D : ℝ) + 4) * q ^ (-(7 * κ / 30)) + q ^ (-(3 * κ / 4)))) := hh + _ = _ := by ring + have hparallel : 8 * (t : ℝ) ^ 2 * R / m ≤ + 16 * ((t : ℝ) ^ 2 * q ^ (-(1 / 2 - κ / 4))) := by + have hh := mul_le_mul_of_nonneg_left hratio (by positivity : 0 ≤ 8 * (t : ℝ) ^ 2) + calc + _ = (8 * (t : ℝ) ^ 2) * ((R : ℝ) / m) := by ring + _ ≤ (8 * (t : ℝ) ^ 2) * (2 * q ^ (-(1 / 2 - κ / 4))) := hh + _ = _ := by ring + have hconcurrent : 16 * (t : ℝ) ^ 3 * R / m ≤ + 32 * ((t : ℝ) ^ 3 * q ^ (-(1 / 2 - κ / 4))) := by + have hh := mul_le_mul_of_nonneg_left hratio (by positivity : 0 ≤ 16 * (t : ℝ) ^ 3) + calc + _ = (16 * (t : ℝ) ^ 3) * ((R : ℝ) / m) := by ring + _ ≤ (16 * (t : ℝ) ^ 3) * (2 * q ^ (-(1 / 2 - κ / 4))) := hh + _ = _ := by ring + have hbase : 4 * (D : ℝ) * (t : ℝ) ^ 2 * R / m ≤ + (8 * (D : ℝ)) * (t : ℝ) ^ 2 * q ^ (-(1 / 2 - κ / 4)) := by + have hh := mul_le_mul_of_nonneg_left hratio + (by positivity : 0 ≤ 4 * (D : ℝ) * (t : ℝ) ^ 2) + calc + _ = (4 * (D : ℝ) * (t : ℝ) ^ 2) * ((R : ℝ) / m) := by ring + _ ≤ (4 * (D : ℝ) * (t : ℝ) ^ 2) * (2 * q ^ (-(1 / 2 - κ / 4))) := hh + _ = _ := by ring + have hoccupancy := sampling_occupancy_le_power D h t hq (Nat.cast_nonneg K) + (by positivity : 0 ≤ 4 * (D : ℝ) * (t : ℝ) ^ 2 * R / m) + (by positivity : 0 ≤ 8 * (D : ℝ)) hK hbase + dsimp only [lowFailureEnvelope] + dsimp only [t, h] at hparallel hconcurrent hoccupancy + linarith + +theorem high_coarse_failure_le_envelope (D R N K : ℕ) {δ ρ A κ q E : ℝ} + (hq : 0 < q) (hδ : 0 < δ) (hρ : 0 < ρ) (hE0 : 0 ≤ E) + (hE : E ≤ ((D : ℝ) + 4) * q ^ (3 / 2 + κ / 10)) + (hR : q ^ (1 / 2 + κ / 4) ≤ (R : ℝ)) (hN : ρ * q / 2 ≤ (N : ℝ)) + (hK : (K : ℝ) ≤ (D : ℝ) * q ^ (D : ℝ)) : + let t := (logarithmicSampleSize A q : ℝ) + let h := 10 * (D + 1) + 2 * E / (δ * R * N) + (t ^ 2 + t ^ 3) / R + + (K : ℝ) * (4 * (D : ℝ) * t ^ 2 / R) ^ h ≤ + highFailureEnvelope D δ ρ A κ q := by + let t := logarithmicSampleSize A q + let h := 10 * (D + 1) + have hR0 : (0 : ℝ) < R := lt_of_lt_of_le (Real.rpow_pos_of_pos hq _) hR + have hsurvivors := high_survivor_term_le D hq hδ hρ hE0 hE hR hN + have hinverse := high_concurrency_inverse_le hq hR + have hgeometry : ((t : ℝ) ^ 2 + (t : ℝ) ^ 3) / R ≤ + (t : ℝ) ^ 2 * q ^ (-(1 / 2 + κ / 4)) + + (t : ℝ) ^ 3 * q ^ (-(1 / 2 + κ / 4)) := by + have hh := mul_le_mul_of_nonneg_left hinverse + (by positivity : 0 ≤ (t : ℝ) ^ 2 + (t : ℝ) ^ 3) + calc + _ = ((t : ℝ) ^ 2 + (t : ℝ) ^ 3) * (1 / (R : ℝ)) := by ring + _ ≤ ((t : ℝ) ^ 2 + (t : ℝ) ^ 3) * q ^ (-(1 / 2 + κ / 4)) := hh + _ = _ := by ring + have hbase : 4 * (D : ℝ) * (t : ℝ) ^ 2 / R ≤ + (4 * (D : ℝ)) * (t : ℝ) ^ 2 * q ^ (-(1 / 2 + κ / 4)) := by + have hh := mul_le_mul_of_nonneg_left hinverse + (by positivity : 0 ≤ 4 * (D : ℝ) * (t : ℝ) ^ 2) + calc + _ = (4 * (D : ℝ) * (t : ℝ) ^ 2) * (1 / (R : ℝ)) := by ring + _ ≤ (4 * (D : ℝ) * (t : ℝ) ^ 2) * q ^ (-(1 / 2 + κ / 4)) := hh + _ = _ := by ring + have hoccupancy := sampling_occupancy_le_power D h t hq (Nat.cast_nonneg K) + (by positivity : 0 ≤ 4 * (D : ℝ) * (t : ℝ) ^ 2 / R) + (by positivity : 0 ≤ 4 * (D : ℝ)) hK hbase + dsimp only [highFailureEnvelope] + dsimp only [t, h] at hgeometry hoccupancy + linarith + +theorem low_sampling_failure_le_envelope (D m R K : ℕ) {δ A κ q P : ℝ} + (hq : 0 < q) (hδ : 0 < δ) (hm : q / 2 ≤ (m : ℝ)) + (hm4 : 4 ≤ m) (hlarge : 4 * (10 * (D + 1)) ≤ m) (hP0 : 0 ≤ P) + (hR : (R : ℝ) ≤ q ^ (1 / 2 + κ / 4)) + (hK : (K : ℝ) ≤ (D : ℝ) * q ^ (D : ℝ)) + (hP : P / (m : ℝ) ^ 2 ≤ + 4 * (((D : ℝ) + 4) * q ^ (-(7 * κ / 30)) + q ^ (-(3 * κ / 4)))) : + let t := logarithmicSampleSize A q + let h := 10 * (D + 1) + 2 * P / (δ * (m.descFactorial 2 : ℝ)) + + ((2 * t).descFactorial 2 : ℝ) * R / ((m - 1 : ℕ) : ℝ) + + ((2 * t).descFactorial 3 : ℝ) * R / ((m - 2 : ℕ) : ℝ) + + (K : ℝ) * (t : ℝ) ^ (2 * h) * ((m * D * R : ℕ) : ℝ) ^ h / + (m.descFactorial (2 * h) : ℝ) ≤ lowFailureEnvelope D δ A κ q := + (low_sampling_failure_le_coarse m D R (logarithmicSampleSize A q) + (10 * (D + 1)) K P δ hm4 hδ hlarge hP0).trans + (low_coarse_failure_le_envelope D m R K hq hδ hm hR hK hP) + +theorem high_sampling_failure_le_envelope (D R N K : ℕ) {δ ρ A κ q E : ℝ} + (hq : 0 < q) (hδ : 0 < δ) (hρ : 0 < ρ) (hE0 : 0 ≤ E) + (hE : E ≤ ((D : ℝ) + 4) * q ^ (3 / 2 + κ / 10)) + (hR : q ^ (1 / 2 + κ / 4) ≤ (R : ℝ)) (hN : ρ * q / 2 ≤ (N : ℝ)) + (hRlarge : 2 * (10 * (D + 1)) ≤ R) (hNlarge : 2 * (10 * (D + 1)) ≤ N) + (hK : (K : ℝ) ≤ (D : ℝ) * q ^ (D : ℝ)) : + let t := logarithmicSampleSize A q + let h := 10 * (D + 1) + 2 * E / (δ * R * N) + ((t : ℝ) ^ 2 + (t : ℝ) ^ 3) / R + + (K : ℝ) * (t.descFactorial h : ℝ) ^ 2 * ((D * N : ℕ) : ℝ) ^ h / + ((R.descFactorial h : ℝ) * (N.descFactorial h : ℝ)) ≤ + highFailureEnvelope D δ ρ A κ q := by + have hR0 : 0 < R := by + exact_mod_cast lt_of_lt_of_le (Real.rpow_pos_of_pos hq _) hR + have hN0 : 0 < N := by + have hNreal : (0 : ℝ) < N := lt_of_lt_of_le (by positivity) hN + exact_mod_cast hNreal + exact (add_le_add (le_refl _) + (high_occupancy_term_le_coarse R N D (logarithmicSampleSize A q) + (10 * (D + 1)) K hR0 hN0 hRlarge hNlarge)).trans + (high_coarse_failure_le_envelope (A := A) D R N K hq hδ hρ hE0 hE hR hN hK) + +theorem eventually_sampleSize_le_mul_rpow {A a c : ℝ} + (hA : 0 < A) (ha : 0 < a) (hc : 0 < c) : + ∀ᶠ q : ℝ in atTop, (logarithmicSampleSize A q : ℝ) ≤ c * q ^ a := by + have hlim := tendsto_sampleSize_pow_mul_rpow_neg_atTop 1 hA ha + filter_upwards [(tendsto_order.mp hlim).2 c hc, + eventually_gt_atTop (0 : ℝ)] with q hsmall hq + rw [pow_one, Real.rpow_neg hq.le, ← div_eq_mul_inv] at hsmall + exact ((div_lt_iff₀ (Real.rpow_pos_of_pos hq _)).mp hsmall).le + +theorem eventually_sampling_size_bounds (D : ℕ) {A ρ κ : ℝ} + (hA : 0 < A) (hρ : 0 < ρ) (hκ : 0 < κ) : + ∀ᶠ q : ℝ in atTop, + 8 ≤ q ∧ + 10 * (D + 1) ≤ logarithmicSampleSize A q ∧ + (4 * (10 * (D + 1)) : ℝ) ≤ q / 2 ∧ + 2 * (logarithmicSampleSize A q : ℝ) ≤ q / 2 ∧ + 2 * (logarithmicSampleSize A q : ℝ) ≤ q ^ (1 / 2 + κ / 4) ∧ + 2 * (logarithmicSampleSize A q : ℝ) ≤ ρ * q / 2 := by + have hlog := (tendsto_logarithmicSampleSize_atTop hA).eventually_ge_atTop + (((10 * (D + 1) : ℕ) : ℝ)) + have hlinear := eventually_sampleSize_le_mul_rpow hA (by norm_num : (0 : ℝ) < 1) + (by norm_num : (0 : ℝ) < 1 / 4) + have hpencil := eventually_sampleSize_le_mul_rpow hA + (by positivity : 0 < (1 / 2 : ℝ) + κ / 4) (by norm_num : (0 : ℝ) < 1 / 2) + have hcomplement := eventually_sampleSize_le_mul_rpow hA (by norm_num : (0 : ℝ) < 1) + (by positivity : 0 < ρ / 4) + filter_upwards [eventually_ge_atTop (8 : ℝ), hlog, hlinear, hpencil, hcomplement, + eventually_ge_atTop (8 * (10 * ((D : ℝ) + 1)))] with + q hq ht hlo hhi hco hlarge + have htNat : 10 * (D + 1) ≤ logarithmicSampleSize A q := by exact_mod_cast ht + rw [Real.rpow_one] at hlo hco + refine ⟨hq, htNat, ?_, ?_, ?_, ?_⟩ <;> nlinarith + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/FiniteFailureNumerics.lean b/lean/OAI/Combinatorics/Ryser/LineCover/FiniteFailureNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..53f2b919b3c530247a8f44f8a392f9c186ff4d2c --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/FiniteFailureNumerics.lean @@ -0,0 +1,119 @@ +import OAI.Combinatorics.Ryser.LineCover.SamplingNumerics + +namespace OAI + +namespace RyserCoveringCounterexample.LineCover + +private theorem half_sq_le_descFactorial_two (m : ℕ) (hm : 2 ≤ m) : + (m : ℝ) ^ 2 / 2 ≤ (m.descFactorial 2 : ℝ) := by + have hm1 : 1 ≤ m := (by decide : 1 ≤ 2).trans hm + have hmR : (2 : ℝ) ≤ m := by exact_mod_cast hm + have hhalf : (m : ℝ) / 2 ≤ (m : ℝ) - 1 := by linarith + have hmul := mul_le_mul_of_nonneg_right hhalf (Nat.cast_nonneg m) + have hfactor : m.descFactorial 2 = (m - 1) * m := by + simpa only [Nat.descFactorial_one] using Nat.descFactorial_succ m 1 + rw [hfactor, Nat.cast_mul, Nat.cast_sub hm1, Nat.cast_one] + nlinarith only [hmul] + +private theorem half_le_nat_sub_cast (m j : ℕ) (h : 2 * j ≤ m) : + (m : ℝ) / 2 ≤ ((m - j : ℕ) : ℝ) := by + have hjm : j ≤ m := (Nat.le_mul_of_pos_left j (by decide : 0 < 2)).trans h + have hR : (2 : ℝ) * j ≤ m := by exact_mod_cast h + rw [Nat.cast_sub hjm] + linarith + +theorem low_sampling_failure_le_coarse (m D R t h K : ℕ) (P δ : ℝ) + (hm : 4 ≤ m) (hδ : 0 < δ) (hlarge : 4 * h ≤ m) (hP : 0 ≤ P) : + 2 * P / (δ * (m.descFactorial 2 : ℝ)) + + ((2 * t).descFactorial 2 : ℝ) * R / ((m - 1 : ℕ) : ℝ) + + ((2 * t).descFactorial 3 : ℝ) * R / ((m - 2 : ℕ) : ℝ) + + (K : ℝ) * (t : ℝ) ^ (2 * h) * ((m * D * R : ℕ) : ℝ) ^ h / + (m.descFactorial (2 * h) : ℝ) ≤ + 4 * P / (δ * (m : ℝ) ^ 2) + + 8 * (t : ℝ) ^ 2 * R / m + + 16 * (t : ℝ) ^ 3 * R / m + + (K : ℝ) * (4 * (D : ℝ) * (t : ℝ) ^ 2 * R / m) ^ h := by + have hmpos : 0 < m := lt_of_lt_of_le (by decide : 0 < 4) hm + have hmR : (0 : ℝ) < m := by exact_mod_cast hmpos + have hpairden : δ * ((m : ℝ) ^ 2 / 2) ≤ δ * (m.descFactorial 2 : ℝ) := + mul_le_mul_of_nonneg_left + (half_sq_le_descFactorial_two m ((by decide : 2 ≤ 4).trans hm)) hδ.le + have hpair : 2 * P / (δ * (m.descFactorial 2 : ℝ)) ≤ + 4 * P / (δ * (m : ℝ) ^ 2) := by + calc + _ ≤ 2 * P / (δ * ((m : ℝ) ^ 2 / 2)) := + div_le_div_of_nonneg_left (by positivity) (by positivity) hpairden + _ = _ := by + field_simp [hδ.ne', hmR.ne'] + ring + have htwo : ((2 * t).descFactorial 2 : ℝ) ≤ 4 * (t : ℝ) ^ 2 := by + calc + _ ≤ ((2 * t : ℕ) : ℝ) ^ 2 := by + exact_mod_cast Nat.descFactorial_le_pow (2 * t) 2 + _ = _ := by + rw [Nat.cast_mul, Nat.cast_ofNat] + ring + have hthree : ((2 * t).descFactorial 3 : ℝ) ≤ 8 * (t : ℝ) ^ 3 := by + calc + _ ≤ ((2 * t : ℕ) : ℝ) ^ 3 := by + exact_mod_cast Nat.descFactorial_le_pow (2 * t) 3 + _ = _ := by + rw [Nat.cast_mul, Nat.cast_ofNat] + ring + have hsub1 : (m : ℝ) / 2 ≤ ((m - 1 : ℕ) : ℝ) := + half_le_nat_sub_cast m 1 ((by decide : 2 * 1 ≤ 4).trans hm) + have hsub2 : (m : ℝ) / 2 ≤ ((m - 2 : ℕ) : ℝ) := + half_le_nat_sub_cast m 2 hm + have hparallel : ((2 * t).descFactorial 2 : ℝ) * R / + ((m - 1 : ℕ) : ℝ) ≤ 8 * (t : ℝ) ^ 2 * R / m := by + calc + _ ≤ (4 * (t : ℝ) ^ 2 * R) / ((m : ℝ) / 2) := + div_le_div₀ (by positivity) + (mul_le_mul_of_nonneg_right htwo (Nat.cast_nonneg R)) (by positivity) hsub1 + _ = _ := by + field_simp [hmR.ne'] + ring + have hconcurrent : ((2 * t).descFactorial 3 : ℝ) * R / + ((m - 2 : ℕ) : ℝ) ≤ 16 * (t : ℝ) ^ 3 * R / m := by + calc + _ ≤ (8 * (t : ℝ) ^ 3 * R) / ((m : ℝ) / 2) := + div_le_div₀ (by positivity) + (mul_le_mul_of_nonneg_right hthree (Nat.cast_nonneg R)) (by positivity) hsub2 + _ = _ := by + field_simp [hmR.ne'] + ring + have hoccupancy : + (K : ℝ) * (t : ℝ) ^ (2 * h) * ((m * D * R : ℕ) : ℝ) ^ h / + (m.descFactorial (2 * h) : ℝ) ≤ + (K : ℝ) * (4 * (D : ℝ) * (t : ℝ) ^ 2 * R / m) ^ h := by + simpa only [Nat.cast_mul, mul_assoc, mul_div_assoc] using + mul_le_mul_of_nonneg_left (low_occupancy_quotient_le m D R t h hmpos hlarge) + (Nat.cast_nonneg K) + exact add_le_add (add_le_add (add_le_add hpair hparallel) hconcurrent) hoccupancy + +theorem high_occupancy_term_le_coarse (R N D t h K : ℕ) + (hR : 0 < R) (hN : 0 < N) (hRlarge : 2 * h ≤ R) (hNlarge : 2 * h ≤ N) : + (K : ℝ) * (t.descFactorial h : ℝ) ^ 2 * ((D * N : ℕ) : ℝ) ^ h / + ((R.descFactorial h : ℝ) * (N.descFactorial h : ℝ)) ≤ + (K : ℝ) * (4 * (D : ℝ) * (t : ℝ) ^ 2 / R) ^ h := by + have hfall : (t.descFactorial h : ℝ) ≤ (t : ℝ) ^ h := by + exact_mod_cast Nat.descFactorial_le_pow t h + have hfall2 : (t.descFactorial h : ℝ) ^ 2 ≤ (t : ℝ) ^ (2 * h) := + (pow_le_pow_left₀ (Nat.cast_nonneg _) hfall 2).trans_eq + (pow_mul' (t : ℝ) 2 h).symm + have hnum : (t.descFactorial h : ℝ) ^ 2 * ((D : ℝ) * N) ^ h ≤ + (t : ℝ) ^ (2 * h) * ((D : ℝ) * N) ^ h := + mul_le_mul_of_nonneg_right hfall2 (by positivity) + have hratio : + (t.descFactorial h : ℝ) ^ 2 * ((D : ℝ) * N) ^ h / + ((R.descFactorial h : ℝ) * (N.descFactorial h : ℝ)) ≤ + (4 * (D : ℝ) * (t : ℝ) ^ 2 / R) ^ h := + (div_le_div_of_nonneg_right hnum + (mul_nonneg (Nat.cast_nonneg _) (Nat.cast_nonneg _))).trans + (high_occupancy_quotient_le R N D t h hR hN hRlarge hNlarge) + simpa only [Nat.cast_mul, mul_assoc, mul_div_assoc] using + mul_le_mul_of_nonneg_left hratio (Nat.cast_nonneg K) + +end RyserCoveringCounterexample.LineCover + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/GoodCounts.lean b/lean/OAI/Combinatorics/Ryser/LineCover/GoodCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3383ac172e0690d454b9ff5934348c386e896f5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/GoodCounts.lean @@ -0,0 +1,141 @@ +import OAI.Combinatorics.Ryser.LineCover.CountEvents +import OAI.Combinatorics.Ryser.LineCover.CountTailNumerics + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + {D : ℕ} {δ : ℝ} + +def GoodCounts (process : DeletionProcess F D δ) (ε : ℝ) + (ω : process.Config) : Prop := + |((survivors ∅ ω).card : ℝ) - process.survival * (Fintype.card F : ℝ) ^ 2| ≤ + (Fintype.card F : ℝ) ^ ((3 : ℝ) / 2 + ε) ∧ + ∀ l : AffineLine F, + process.survival * (Fintype.card F : ℝ) - + (Fintype.card F : ℝ) ^ ((1 : ℝ) / 2 + ε) ≤ + retainedCount {linePoints l} (linePoints l) ω ∧ + retainedCount {linePoints l} (linePoints l) ω ≤ + process.survival * (Fintype.card F : ℝ) + (D : ℝ) + + (Fintype.card F : ℝ) ^ ((1 : ℝ) / 2 + ε) + +namespace GoodCounts + +variable {process : DeletionProcess F D δ} {ε : ℝ} {ω : process.Config} + +theorem total_lower (h : GoodCounts process ε ω) : + process.survival * (Fintype.card F : ℝ) ^ 2 - + (Fintype.card F : ℝ) ^ ((3 : ℝ) / 2 + ε) ≤ + ((survivors ∅ ω).card : ℝ) := by + have hlo := (abs_le.mp h.1).1 + linarith + +theorem total_upper (h : GoodCounts process ε ω) : + ((survivors ∅ ω).card : ℝ) ≤ + process.survival * (Fintype.card F : ℝ) ^ 2 + + (Fintype.card F : ℝ) ^ ((3 : ℝ) / 2 + ε) := by + have hhi := (abs_le.mp h.1).2 + linarith + +theorem line_lower (h : GoodCounts process ε ω) (l : AffineLine F) : + process.survival * (Fintype.card F : ℝ) - + (Fintype.card F : ℝ) ^ ((1 : ℝ) / 2 + ε) ≤ + retainedCount {linePoints l} (linePoints l) ω := (h.2 l).1 + +theorem line_upper (h : GoodCounts process ε ω) (l : AffineLine F) : + retainedCount {linePoints l} (linePoints l) ω ≤ + process.survival * (Fintype.card F : ℝ) + (D : ℝ) + + (Fintype.card F : ℝ) ^ ((1 : ℝ) / 2 + ε) := (h.2 l).2 + +theorem line_ge_half (h : GoodCounts process ε ω) + (herror : (Fintype.card F : ℝ) ^ ((1 : ℝ) / 2 + ε) ≤ + δ * (Fintype.card F : ℝ) / 2) (l : AffineLine F) : + δ * (Fintype.card F : ℝ) / 2 ≤ + retainedCount {linePoints l} (linePoints l) ω := by + have hbase := mul_le_mul_of_nonneg_right process.survivalLower + (Nat.cast_nonneg (Fintype.card F) : (0 : ℝ) ≤ (Fintype.card F : ℝ)) + have hlo := h.line_lower l + linarith + +end GoodCounts + +namespace DeletionProcess + +variable (process : DeletionProcess F D δ) + +theorem prob_not_goodCounts (ε : ℝ) (hD : 1 ≤ D) + (_hε : 0 < ε) (hεhalf : ε ≤ 1 / 2) : + process.law.prob (fun ω => ¬ GoodCounts process ε ω) ≤ + 2 * (1 + (Fintype.card F : ℝ) * ((Fintype.card F : ℝ) + 1)) * + Real.exp (-(Fintype.card F : ℝ) ^ (2 * ε) / (16 * (D : ℝ) ^ 5)) := by + have hqNat : 1 ≤ Fintype.card F := + Nat.succ_le_iff.mpr (Fintype.card_pos (α := F)) + have hq : 1 ≤ (Fintype.card F : ℝ) := by exact_mod_cast hqNat + have hq0 : 0 < (Fintype.card F : ℝ) := lt_of_lt_of_le zero_lt_one hq + have hD0 : 0 < D := lt_of_lt_of_le Nat.zero_lt_one hD + let T : process.Config → Prop := fun ω => + (Fintype.card F : ℝ) ^ ((3 : ℝ) / 2 + ε) ≤ + |((survivors ∅ ω).card : ℝ) - process.survival * (Fintype.card F : ℝ) ^ 2| + let L : AffineLine F → process.Config → Prop := fun l ω => + (Fintype.card F : ℝ) ^ ((1 : ℝ) / 2 + ε) ≤ + |retainedCount {linePoints l} (linePoints l) ω - + process.law.expectation (retainedCount {linePoints l} (linePoints l))| + let B : ℝ := 2 * Real.exp + (-(Fintype.card F : ℝ) ^ (2 * ε) / (16 * (D : ℝ) ^ 5)) + have htotal : process.law.prob T ≤ B := by + have h := (process.total_count_concentration hD0 + ((Fintype.card F : ℝ) ^ ((3 : ℝ) / 2 + ε)) + (Real.rpow_pos_of_pos hq0 _)).trans + (total_count_tail_le_stretched_exp hq hD hεhalf) + simpa only [T, B, retainedCount, Finset.inter_univ] using h + have hline (l : AffineLine F) : process.law.prob (L l) ≤ B := by + exact (process.ignored_line_count_concentration hD0 l + ((Fintype.card F : ℝ) ^ ((1 : ℝ) / 2 + ε)) + (Real.rpow_pos_of_pos hq0 _)).trans + (line_count_tail_le_stretched_exp hq hD hεhalf) + have hcover : ∀ ω, ¬ GoodCounts process ε ω → T ω ∨ ∃ l, L l ω := by + intro ω hbad + by_cases ht : T ω + · exact Or.inl ht + · right + by_contra hlines + apply hbad + refine ⟨?_, ?_⟩ + · exact (lt_of_not_ge ht).le + · intro l + have hl : ¬ L l ω := fun h => hlines ⟨l, h⟩ + have habs : + |retainedCount {linePoints l} (linePoints l) ω - + process.law.expectation (retainedCount {linePoints l} (linePoints l))| ≤ + (Fintype.card F : ℝ) ^ ((1 : ℝ) / 2 + ε) := (lt_of_not_ge hl).le + obtain ⟨hlo, hhi⟩ := abs_le.mp habs + obtain ⟨hmlo, hmhi⟩ := process.expectation_ignored_lineCount_bounds l + constructor <;> linarith + calc + _ ≤ process.law.prob (fun ω => T ω ∨ ∃ l, L l ω) := + process.law.prob_mono hcover + _ ≤ process.law.prob T + process.law.prob (fun ω => ∃ l, L l ω) := + process.law.prob_union_le T (fun ω => ∃ l, L l ω) + _ ≤ B + ∑ l, process.law.prob (L l) := + add_le_add htotal (FiniteLaw.prob_exists_le process.law L) + _ ≤ B + ∑ _l : AffineLine F, B := + add_le_add le_rfl (Finset.sum_le_sum fun l _ => hline l) + _ = (1 + (Fintype.card (AffineLine F) : ℝ)) * B := by + simp only [Finset.sum_const, Finset.card_univ, nsmul_eq_mul] + ring + _ = _ := by + simp only [card_affineLine, Nat.cast_mul, Nat.cast_add, Nat.cast_one] + dsimp only [B] + ring + +end DeletionProcess +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/GoodTuples.lean b/lean/OAI/Combinatorics/Ryser/LineCover/GoodTuples.lean new file mode 100644 index 0000000000000000000000000000000000000000..4e506f4875675694c469e49e1d13ca4d3e302b1f --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/GoodTuples.lean @@ -0,0 +1,92 @@ +import OAI.Combinatorics.Ryser.LineCover.CleanCover +import OAI.Combinatorics.Ryser.LineCover.TupleConcentration + +namespace OAI + +open scoped Classical +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + {D : ℕ} {δ : ℝ} + +def GoodTuples (process : DeletionProcess F D δ) (h t : ℕ) + (ω : process.Config) : Prop := + ∀ a : LineTuple F t, AdmissibleTuple process.shapes D h a → + δ * (t : ℝ) ^ 2 / 2 ≤ retainedCount (tupleShapes a) (crossPoints a) ω + +theorem not_goodTuples_iff (process : DeletionProcess F D δ) (h t : ℕ) + (ω : process.Config) : + ¬ GoodTuples process h t ω ↔ + ∃ a : LineTuple F t, AdmissibleTuple process.shapes D h a ∧ + retainedCount (tupleShapes a) (crossPoints a) ω < δ * (t : ℝ) ^ 2 / 2 := by + classical + simp only [GoodTuples, not_forall, not_le, exists_prop] + +theorem prob_not_goodTuples_le_tuple_card (process : DeletionProcess F D δ) + (h t : ℕ) (hD : 0 < D) (hh : 0 < h) (ht : 0 < t) (hδ : 0 < δ) : + process.law.prob (fun ω => ¬ GoodTuples process h t ω) ≤ + 2 * (Fintype.card (LineTuple F t) : ℝ) * + Real.exp (-(tupleTailConstant D h δ) * (t : ℝ) ^ 2) := by + calc + _ ≤ process.law.prob (fun ω => ∃ a : LineTuple F t, + AdmissibleTuple process.shapes D h a ∧ + retainedCount (tupleShapes a) (crossPoints a) ω < δ * (t : ℝ) ^ 2 / 2) := by + apply process.law.prob_mono + intro ω hω + exact (not_goodTuples_iff process h t ω).mp hω + _ ≤ _ := prob_exists_admissibleTuple_bad_le process.trials δ hD hh ht hδ + process.trialsCount_le process.pointCap (fun x => process.point_survival_ge x) + +theorem DeletionProcess.prob_not_goodTuples (process : DeletionProcess F D δ) + (h t : ℕ) (hD : 0 < D) (hh : 0 < h) (ht : 0 < t) (hδ : 0 < δ) : + process.law.prob (fun ω => ¬ GoodTuples process h t ω) ≤ + 2 * ((Fintype.card F : ℝ) * ((Fintype.card F : ℝ) + 1)) ^ (2 * t) * + Real.exp (-(tupleTailConstant D h δ) * (t : ℝ) ^ 2) := by + calc + _ ≤ process.law.prob (fun ω => ∃ a : LineTuple F t, + AdmissibleTuple process.shapes D h a ∧ + retainedCount (tupleShapes a) (crossPoints a) ω < δ * (t : ℝ) ^ 2 / 2) := by + apply process.law.prob_mono + intro ω hω + exact (not_goodTuples_iff process h t ω).mp hω + _ ≤ _ := prob_exists_admissibleTuple_bad_le_card_bound process.trials δ + hD hh ht hδ process.trialsCount_le process.pointCap + (fun x => process.point_survival_ge x) + +namespace GoodTuples + +variable {process : DeletionProcess F D δ} {h t : ℕ} {ω : process.Config} + +theorem clean_crosscard_ge (hgood : GoodTuples process h t ω) + (L : Finset (AffineLine F)) (a : LineTuple F t) + (ha : AdmissibleTuple process.shapes D h a) + (hclean : ∀ i, a i ∈ cleanLines ω L) : + δ * (t : ℝ) ^ 2 / 2 ≤ + ((process.survivorSet ω ∩ crossPoints a).card : ℝ) := by + have heq := survivors_ignore_tuple_eq ω a + (fun i => cleanLines_not_selected (hclean i)) + have hbound := hgood a ha + change δ * (t : ℝ) ^ 2 / 2 ≤ + ((survivors (tupleShapes a) ω ∩ crossPoints a).card : ℝ) at hbound + change δ * (t : ℝ) ^ 2 / 2 ≤ + ((survivors ∅ ω ∩ crossPoints a).card : ℝ) + rw [heq] at hbound + exact hbound + +theorem no_sparse_clean_tuple (hgood : GoodTuples process h t ω) + (L : Finset (AffineLine F)) (a : LineTuple F t) + (ha : AdmissibleTuple process.shapes D h a) + (hclean : ∀ i, a i ∈ cleanLines ω L) + (hsmall : ((process.survivorSet ω ∩ crossPoints a).card : ℝ) < + δ * (t : ℝ) ^ 2 / 2) : False := + (not_lt_of_ge (hgood.clean_crosscard_ge L a ha hclean)) hsmall + +end GoodTuples + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/HeavyIncidence.lean b/lean/OAI/Combinatorics/Ryser/LineCover/HeavyIncidence.lean new file mode 100644 index 0000000000000000000000000000000000000000..a018684d0606e9d1d8eeec5feba26da38874dbe0 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/HeavyIncidence.lean @@ -0,0 +1,72 @@ +import OAI.Combinatorics.Ryser.LineCover.Definitions +import OAI.Combinatorics.Ryser.LineCover.ProjectiveLift +import OAI.Combinatorics.Ryser.Incidence.Uniform + +namespace OAI + +open scoped BigOperators Classical +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [instFintypeF : Fintype F] [DecidableEq F] + +theorem heavy_incidence_sum_le + (hq : Incidence.incidenceThreshold ≤ Fintype.card F) + (hsub : Incidence.SmallProperSubfields F) + (X : Finset (Point F)) (L : Finset (AffineLine F)) (T : ℝ) + (hheavy : ((heavyPoints Incidence X L T).card : ℝ) ≤ + (Fintype.card F : ℝ) ^ (1 + Incidence.savingExponent)) + (hL : L.card ≤ Fintype.card F) : + (∑ x ∈ heavyPoints Incidence X L T, (multiplicity Incidence L x : ℝ)) ≤ + (Fintype.card F : ℝ) ^ ((3 : ℝ) / 2 - Incidence.savingExponent) := by + have hqone : 1 ≤ (Fintype.card F : ℝ) := by + exact_mod_cast (Nat.succ_le_of_lt (Fintype.card_pos (α := F))) + have hqpow : (Fintype.card F : ℝ) ≤ + (Fintype.card F : ℝ) ^ (1 + Incidence.savingExponent) := by + simpa only [Real.rpow_one] using + (Real.rpow_le_rpow_of_exponent_le hqone + (show (1 : ℝ) ≤ 1 + Incidence.savingExponent by + linarith [Incidence.savingExponent_pos])) + have hbound := Incidence.uniform_incidence_bound F hq hsub + (projectivePointsOf (heavyPoints Incidence X L T)) (projectiveLinesOf L) + (by simpa only [card_projectivePointsOf] using hheavy) + (by + rw [card_projectiveLinesOf] + exact (show (L.card : ℝ) ≤ (Fintype.card F : ℝ) by + exact_mod_cast hL).trans hqpow) + rw [incidenceCount_projective_lifts, Nat.cast_sum] at hbound + exact hbound + +theorem orderedPairMass_le_of_uniform_incidence + (hq : Incidence.incidenceThreshold ≤ Fintype.card F) + (hsub : Incidence.SmallProperSubfields F) + (X : Finset (Point F)) (L : Finset (AffineLine F)) (T R : ℝ) + (hT : 0 ≤ T) (hR : 0 ≤ R) + (hheavy : ((heavyPoints Incidence X L T).card : ℝ) ≤ + (Fintype.card F : ℝ) ^ (1 + Incidence.savingExponent)) + (hL : L.card ≤ Fintype.card F) + (hpencil : ∀ p : ProjectivePoint F, ((coverPencil L p).card : ℝ) ≤ R) : + (orderedPairMass Incidence X L : ℝ) ≤ + T * (overlapExcess Incidence X L : ℝ) + + R * (Fintype.card F : ℝ) ^ ((3 : ℝ) / 2 - Incidence.savingExponent) := by + have hpoint : ∀ x ∈ X, (multiplicity Incidence L x : ℝ) ≤ R := by + intro x _ + rw [multiplicity_eq_finite_pencil] + simpa only [coverPencil] using hpencil (Sum.inl x) + exact (orderedPairMass_le_light_add_heavy Incidence X L T R hT hpoint).trans + (add_le_add le_rfl (mul_le_mul_of_nonneg_left + (heavy_incidence_sum_le hq hsub X L T hheavy hL) hR)) + +theorem heavyPoints_card_le_of_excess + (X : Finset (Point F)) (L : Finset (AffineLine F)) (T B : ℝ) + (hT : 1 < T) (hE : (overlapExcess Incidence X L : ℝ) ≤ B) : + ((heavyPoints Incidence X L T).card : ℝ) ≤ B / (T - 1) := let _ := instFintypeF; by + apply (le_div_iff₀ (sub_pos.mpr hT)).2 + exact (heavyPoints_card_mul_le_excess Incidence X L T hT).trans hE + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/HighConcurrency.lean b/lean/OAI/Combinatorics/Ryser/LineCover/HighConcurrency.lean new file mode 100644 index 0000000000000000000000000000000000000000..de2eae02ab36fffd4aa2b492caa9d4e40c69d4c8 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/HighConcurrency.lean @@ -0,0 +1,95 @@ +import OAI.Combinatorics.Ryser.LineCover.HighProbability + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + +theorem highConcurrency_exists_admissible + (X : Finset (Point F)) (L : Finset (AffineLine F)) (p : ProjectivePoint F) + (shapes : Finset (Finset (Point F))) (D h t : ℕ) (δ : ℝ) + (hsparse : SparseShapes shapes D) (hδ : 0 < δ) + (hh : 1 ≤ h) (hht : h ≤ t) + (htR : t ≤ (coverPencil L p).card) + (htN : t ≤ (L \ coverPencil L p).card) + (hfailure : highFailureBound X L p shapes D h t δ < 1) : + ∃ a : LineTuple F t, (∀ k, a k ∈ L) ∧ + AdmissibleTuple shapes D h a ∧ + ((X ∩ crossPoints a).card : ℝ) < δ * (t : ℝ) ^ 2 / 2 := by + have htpos : 0 < t := lt_of_lt_of_le Nat.zero_lt_one (hh.trans hht) + let : Nonempty (PencilPopulation L p) := Fintype.card_pos_iff.mp + (by simpa only [Fintype.card_coe] using (lt_of_lt_of_le htpos htR)) + let : Nonempty (ComplementPopulation L p) := Fintype.card_pos_iff.mp + (by simpa only [Fintype.card_coe] using (lt_of_lt_of_le htpos htN)) + let : Nonempty (Fin t ↪ PencilPopulation L p) := + InjectionSampling.sample_nonempty (Fin t) (PencilPopulation L p) + (by simpa only [Nat.card_eq_fintype_card, Fintype.card_fin, Fintype.card_coe] using htR) + let : Nonempty (Fin t ↪ ComplementPopulation L p) := + InjectionSampling.sample_nonempty (Fin t) (ComplementPopulation L p) + (by simpa only [Nat.card_eq_fintype_card, Fintype.card_fin, Fintype.card_coe] using htN) + let : Nonempty (Fin h ↪ PencilPopulation L p) := + InjectionSampling.sample_nonempty (Fin h) (PencilPopulation L p) + (by simpa only [Nat.card_eq_fintype_card, Fintype.card_fin, Fintype.card_coe] + using hht.trans htR) + let : Nonempty (Fin h ↪ ComplementPopulation L p) := + InjectionSampling.sample_nonempty (Fin h) (ComplementPopulation L p) + (by simpa only [Nat.card_eq_fintype_card, Fintype.card_fin, Fintype.card_coe] + using hht.trans htN) + let mu := highUniformLaw L p t + let BadSurvivors : HighSample L p t → Prop := + fun s => δ * (t : ℝ) ^ 2 / 2 ≤ (highSurvivorPairCount X L p s : ℝ) + let BadGeometry : HighSample L p t → Prop := + fun s => ∃ i, s.1 i ∈ highBadLines L p s.2 + let BadOccupancy : HighSample L p t → Prop := fun s => ∃ S ∈ shapes, + S ∉ tupleShapes (highTuple L p s) ∧ + 2 * D * h < (S ∩ crossPoints (highTuple L p s)).card + have hsurvivors := high_probability_large_survivorPairs X L p δ hδ htpos + have hgeometry := high_probability_badLines L p (t := t) + have hoccupancy := high_probability_occupancy L p shapes D h (t := t) hsparse + have hbound : mu.prob (fun s => BadSurvivors s ∨ BadGeometry s ∨ BadOccupancy s) ≤ + highFailureBound X L p shapes D h t δ := by + have hu := (mu.prob_union_le BadSurvivors (fun s => BadGeometry s ∨ BadOccupancy s)).trans + (add_le_add hsurvivors + ((mu.prob_union_le BadGeometry BadOccupancy).trans + (add_le_add hgeometry hoccupancy))) + simpa only [highFailureBound, add_assoc] using hu + have hsmall := hbound.trans_lt hfailure + have hex : ∃ s : HighSample L p t, + ¬ (BadSurvivors s ∨ BadGeometry s ∨ BadOccupancy s) := by + by_contra hn + have hall (s : HighSample L p t) : + BadSurvivors s ∨ BadGeometry s ∨ BadOccupancy s := + not_not.mp (fun hs => hn ⟨s, hs⟩) + have heq : mu.prob (fun s => BadSurvivors s ∨ BadGeometry s ∨ BadOccupancy s) = 1 := by + calc + _ = mu.prob (fun _ => True) := by + congr 1 + funext s + exact propext ⟨fun _ => trivial, fun _ => hall s⟩ + _ = 1 := mu.prob_true + rw [heq] at hsmall + exact (lt_irrefl (1 : ℝ)) hsmall + obtain ⟨s, hs⟩ := hex + have havoid (i : Fin t) : s.1 i ∉ highBadLines L p s.2 := by + intro hi + exact hs (Or.inr (Or.inl ⟨i, hi⟩)) + have hgrid := highTuple_grid_of_avoids L p s havoid + have hocc : ∀ S ∈ shapes, S ∉ tupleShapes (highTuple L p s) → + (S ∩ crossPoints (highTuple L p s)).card ≤ 2 * D * h := by + intro S hS hnot + by_contra hlarge + exact hs (Or.inr (Or.inr ⟨S, hS, hnot, lt_of_not_ge hlarge⟩)) + have hpair : (highSurvivorPairCount X L p s : ℝ) < δ * (t : ℝ) ^ 2 / 2 := + lt_of_not_ge (fun he => hs (Or.inl he)) + refine ⟨highTuple L p s, highTuple_mem L p s, ⟨hgrid.1, hgrid.2, hocc⟩, ?_⟩ + exact (Nat.cast_le.mpr (highSurvivorPoints_card_le X L p s)).trans_lt hpair + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/HighDegeneracy.lean b/lean/OAI/Combinatorics/Ryser/LineCover/HighDegeneracy.lean new file mode 100644 index 0000000000000000000000000000000000000000..b891cdc34dcd5bda3abd93bbafd9422b2baf7190 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/HighDegeneracy.lean @@ -0,0 +1,181 @@ +import OAI.Combinatorics.Ryser.LineCover.HighSamples +import Mathlib.Algebra.BigOperators.Group.Finset.Basic +import Mathlib.Algebra.Order.BigOperators.Group.Finset + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable +open scoped BigOperators + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [instFintypeF : Fintype F] [DecidableEq F] + +def highParallelLines (L : Finset (AffineLine F)) (p : ProjectivePoint F) {t : ℕ} + (b : Fin t ↪ ComplementPopulation L p) : Finset (PencilPopulation L p) := + Finset.univ.biUnion fun j => Finset.univ.filter fun k => k.val.1 = (b j).val.1 + +def highCollisionLines (L : Finset (AffineLine F)) (p : ProjectivePoint F) {t : ℕ} + (b : Fin t ↪ ComplementPopulation L p) : Finset (PencilPopulation L p) := + Finset.univ.biUnion fun ij : Fin t × Fin t => Finset.univ.filter fun k => + ij.1 ≠ ij.2 ∧ ∃ x : ProjectivePoint F, + ProjectiveIncidence x (some k.val) ∧ + ProjectiveIncidence x (some (b ij.1).val) ∧ + ProjectiveIncidence x (some (b ij.2).val) + +def highBadLines (L : Finset (AffineLine F)) (p : ProjectivePoint F) {t : ℕ} + (b : Fin t ↪ ComplementPopulation L p) : Finset (PencilPopulation L p) := + highParallelLines L p b ∪ highCollisionLines L p b + +@[simp] theorem mem_highParallelLines (L : Finset (AffineLine F)) + (p : ProjectivePoint F) {t : ℕ} (b : Fin t ↪ ComplementPopulation L p) + (k : PencilPopulation L p) : + k ∈ highParallelLines L p b ↔ ∃ j, k.val.1 = (b j).val.1 := let _ := instFintypeF; by + simp only [highParallelLines, Finset.mem_biUnion, Finset.mem_univ, + Finset.mem_filter, true_and] + +@[simp] theorem mem_highCollisionLines (L : Finset (AffineLine F)) + (p : ProjectivePoint F) {t : ℕ} (b : Fin t ↪ ComplementPopulation L p) + (k : PencilPopulation L p) : + k ∈ highCollisionLines L p b ↔ ∃ i j, i ≠ j ∧ + ∃ x : ProjectivePoint F, ProjectiveIncidence x (some k.val) ∧ + ProjectiveIncidence x (some (b i).val) ∧ + ProjectiveIncidence x (some (b j).val) := by + simp only [highCollisionLines, Finset.mem_biUnion, Finset.mem_univ, + Finset.mem_filter, true_and, Prod.exists] + +theorem highParallelLines_card_le (L : Finset (AffineLine F)) + (p : ProjectivePoint F) {t : ℕ} (b : Fin t ↪ ComplementPopulation L p) : + (highParallelLines L p b).card ≤ t := by + have hone (j : Fin t) : + (Finset.univ.filter fun k : PencilPopulation L p => k.val.1 = (b j).val.1).card ≤ 1 := by + apply Finset.card_le_one.mpr + intro k hk k' hk' + have hd := (Finset.mem_filter.mp hk).2 + have hd' := (Finset.mem_filter.mp hk').2 + cases p with + | inl x => + apply Subtype.ext + exact line_eq_of_direction_eq_of_incidence (hd.trans hd'.symm) + (pencilPopulation_incident L (Sum.inl x) k) + (pencilPopulation_incident L (Sum.inl x) k') + | inr d => + have hkdir : d = k.val.1 := pencilPopulation_incident L (Sum.inr d) k + exact (complementPopulation_not_incident L (Sum.inr d) (b j) + (hkdir.trans hd)).elim + calc + _ ≤ ∑ j : Fin t, + (Finset.univ.filter fun k : PencilPopulation L p => k.val.1 = (b j).val.1).card := + Finset.card_biUnion_le + _ ≤ ∑ _j : Fin t, 1 := Finset.sum_le_sum (fun j _ => hone j) + _ = t := by simp + +theorem highParallelLines_infinite_empty (L : Finset (AffineLine F)) + (d : Direction F) {t : ℕ} (b : Fin t ↪ ComplementPopulation L (Sum.inr d)) : + highParallelLines L (Sum.inr d) b = ∅ := by + apply Finset.eq_empty_iff_forall_notMem.mpr + intro k hk + obtain ⟨j, hj⟩ := (mem_highParallelLines L (Sum.inr d) b k).mp hk + have hkdir : d = k.val.1 := pencilPopulation_incident L (Sum.inr d) k + exact complementPopulation_not_incident L (Sum.inr d) (b j) (hkdir.trans hj) + +theorem highCollisionLines_card_le (L : Finset (AffineLine F)) + (p : ProjectivePoint F) {t : ℕ} (b : Fin t ↪ ComplementPopulation L p) : + (highCollisionLines L p b).card ≤ t * t := by + have hone (ij : Fin t × Fin t) : + (Finset.univ.filter fun k : PencilPopulation L p => ij.1 ≠ ij.2 ∧ + ∃ x : ProjectivePoint F, ProjectiveIncidence x (some k.val) ∧ + ProjectiveIncidence x (some (b ij.1).val) ∧ + ProjectiveIncidence x (some (b ij.2).val)).card ≤ 1 := by + apply Finset.card_le_one.mpr + intro k hk k' hk' + obtain ⟨hij, x, hxk, hxc, hxc'⟩ := (Finset.mem_filter.mp hk).2 + obtain ⟨_, y, hyk, hyc, hyc'⟩ := (Finset.mem_filter.mp hk').2 + have hlines : (b ij.1).val ≠ (b ij.2).val := by + intro he + exact hij (b.injective (Subtype.ext he)) + have hxy : x = y := eq_projectivePoint_of_common_incidence + (fun he => hlines (Option.some.inj he)) hxc hxc' hyc hyc' + subst y + have hxp : x ≠ p := ne_of_projectiveIncidence_of_not_projectiveIncidence + hxc (complementPopulation_not_incident L p (b ij.1)) + apply Subtype.ext + exact eq_affineLine_of_common_projective_incidence hxp.symm + (pencilPopulation_incident L p k) hxk + (pencilPopulation_incident L p k') hyk + calc + _ ≤ ∑ ij : Fin t × Fin t, + (Finset.univ.filter fun k : PencilPopulation L p => ij.1 ≠ ij.2 ∧ + ∃ x : ProjectivePoint F, ProjectiveIncidence x (some k.val) ∧ + ProjectiveIncidence x (some (b ij.1).val) ∧ + ProjectiveIncidence x (some (b ij.2).val)).card := + Finset.card_biUnion_le + _ ≤ ∑ _ij : Fin t × Fin t, 1 := Finset.sum_le_sum (fun ij _ => hone ij) + _ = t * t := by simp + +theorem highBadLines_card_le (L : Finset (AffineLine F)) (p : ProjectivePoint F) + {t : ℕ} (b : Fin t ↪ ComplementPopulation L p) : + (highBadLines L p b).card ≤ t + t * t := + (Finset.card_union_le (highParallelLines L p b) (highCollisionLines L p b)).trans (Nat.add_le_add + (highParallelLines_card_le L p b) (highCollisionLines_card_le L p b)) + +theorem highTuple_grid_of_avoids (L : Finset (AffineLine F)) (p : ProjectivePoint F) + {t : ℕ} (s : HighSample L p t) + (havoid : ∀ i, s.1 i ∉ highBadLines L p s.2) : + FiniteCrossings (highTuple L p s) ∧ (crossPoints (highTuple L p s)).card = t * t := by + have hfinite (i j : Fin t) : + ∃ x, Incidence x (s.1 i).val ∧ Incidence x (s.2 j).val := by + have hdir : (s.1 i).val.1 ≠ (s.2 j).val.1 := by + intro he + apply havoid i + exact Finset.mem_union_left _ + ((mem_highParallelLines L p s.2 (s.1 i)).mpr ⟨j, he⟩) + exact (existsUnique_incident_of_ne_direction _ _ hdir).exists + let f : Fin t × Fin t → Point F := fun ij => Classical.choose (hfinite ij.1 ij.2) + have hf (ij : Fin t × Fin t) : + Incidence (f ij) (s.1 ij.1).val ∧ Incidence (f ij) (s.2 ij.2).val := + Classical.choose_spec (hfinite ij.1 ij.2) + have hinj : Function.Injective f := by + intro ij kl he + have hkl := hf kl + rw [← he] at hkl + have hxp : (Sum.inl (f ij) : ProjectivePoint F) ≠ p := + ne_of_projectiveIncidence_of_not_projectiveIncidence + (l := some (s.2 ij.2).val) + (hf ij).2 (complementPopulation_not_incident L p (s.2 ij.2)) + have hfirst : ij.1 = kl.1 := by + apply s.1.injective + apply Subtype.ext + exact eq_affineLine_of_common_projective_incidence hxp.symm + (pencilPopulation_incident L p (s.1 ij.1)) (hf ij).1 + (pencilPopulation_incident L p (s.1 kl.1)) hkl.1 + have hsecond : ij.2 = kl.2 := by + by_contra hne + apply havoid ij.1 + apply Finset.mem_union_right + apply (mem_highCollisionLines L p s.2 (s.1 ij.1)).mpr + exact ⟨ij.2, kl.2, hne, Sum.inl (f ij), (hf ij).1, (hf ij).2, hkl.2⟩ + exact Prod.ext hfirst hsecond + have hset : crossPoints (highTuple L p s) = Finset.univ.image f := by + ext x + constructor + · intro hx + obtain ⟨i, j, hi, hj⟩ := (mem_crossPoints (highTuple L p s) x).mp hx + have he : f (i, j) = x := eq_of_common_incidence_of_ne_lines + (pencil_ne_complement L p (s.1 i) (s.2 j)) + (hf (i, j)).1 (hf (i, j)).2 hi hj + exact Finset.mem_image.mpr ⟨(i, j), Finset.mem_univ _, he⟩ + · intro hx + obtain ⟨ij, _, rfl⟩ := Finset.mem_image.mp hx + exact (mem_crossPoints (highTuple L p s) (f ij)).mpr + ⟨ij.1, ij.2, (hf ij).1, (hf ij).2⟩ + refine ⟨hfinite, ?_⟩ + rw [hset, Finset.card_image_of_injective _ hinj] + simp + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/HighIncidence.lean b/lean/OAI/Combinatorics/Ryser/LineCover/HighIncidence.lean new file mode 100644 index 0000000000000000000000000000000000000000..b0725ca449c224c2400d698900d176ce9dca3f36 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/HighIncidence.lean @@ -0,0 +1,147 @@ +import OAI.Combinatorics.Ryser.LineCover.HighSamples +import OAI.Combinatorics.Ryser.LineCover.Overlap +import Mathlib.Algebra.BigOperators.Group.Finset.Basic + +namespace OAI + +noncomputable section +open scoped BigOperators Classical + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + +private theorem pencil_eq_at_complement + (x : Point F) (L : Finset (AffineLine F)) (p : ProjectivePoint F) + (c : ComplementPopulation L p) (k l : PencilPopulation L p) + (hxc : Incidence x c.val) (hxk : Incidence x k.val) (hxl : Incidence x l.val) : + k = l := by + apply Subtype.ext + exact eq_affineLine_of_common_projective_incidence + (ne_of_projectiveIncidence_of_not_projectiveIncidence + ((projectiveIncidence_finite_affine x c.val).mpr hxc) + (complementPopulation_not_incident L p c)) + ((projectiveIncidence_finite_affine x k.val).mpr hxk) + (pencilPopulation_incident L p k) + ((projectiveIncidence_finite_affine x l.val).mpr hxl) + (pencilPopulation_incident L p l) + +private theorem pointCrossPairs_card_le + (x : Point F) (L : Finset (AffineLine F)) (p : ProjectivePoint F) : + (Finset.univ.filter fun kc : PencilPopulation L p × ComplementPopulation L p => + Incidence x kc.1.val ∧ Incidence x kc.2.val).card ≤ + multiplicity Incidence L x - 1 := by + let B := Finset.univ.filter fun kc : PencilPopulation L p × ComplementPopulation L p => + Incidence x kc.1.val ∧ Incidence x kc.2.val + change B.card ≤ multiplicity Incidence L x - 1 + by_cases hB : B.Nonempty + · obtain ⟨kc, hkc⟩ := hB + have hxkc := (Finset.mem_filter.mp hkc).2 + let C := (L.filter (Incidence x)).erase kc.1.val + have hk : kc.1.val ∈ L.filter (Incidence x) := + Finset.mem_filter.mpr ⟨coverPencil_subset L p kc.1.property, hxkc.1⟩ + let f : ↥B → ↥C := fun q => + ⟨q.val.2.val, Finset.mem_erase.mpr + ⟨(pencil_ne_complement L p kc.1 q.val.2).symm, + Finset.mem_filter.mpr ⟨complementPopulation_mem L p q.val.2, + (Finset.mem_filter.mp q.property).2.2⟩⟩⟩ + have hf : Function.Injective f := by + intro a b hab + apply Subtype.ext + apply Prod.ext + · exact pencil_eq_at_complement x L p a.val.2 a.val.1 b.val.1 + (Finset.mem_filter.mp a.property).2.2 + (Finset.mem_filter.mp a.property).2.1 + (Finset.mem_filter.mp b.property).2.1 + · exact Subtype.ext (congrArg (fun z : ↥C => z.val) hab) + calc + B.card ≤ C.card := Finset.card_le_card_of_injective hf + _ = multiplicity Incidence L x - 1 := by + have hfilter : + @Finset.filter _ (Incidence x) + (fun l => Classical.propDecidable (Incidence x l)) L = + L.filter (Incidence x) := Finset.filter_congr_decidable _ _ _ + unfold multiplicity + rw [hfilter] + exact Finset.card_erase_of_mem hk + · rw [Finset.not_nonempty_iff_eq_empty.mp hB, Finset.card_empty] + exact Nat.zero_le _ + +theorem highCrossPairs_card_le + (X : Finset (Point F)) (L : Finset (AffineLine F)) (p : ProjectivePoint F) : + (highCrossPairs X L p).card ≤ overlapExcess Incidence X L := by + let B (x : Point F) := + Finset.univ.filter fun kc : PencilPopulation L p × ComplementPopulation L p => + Incidence x kc.1.val ∧ Incidence x kc.2.val + have hcover : highCrossPairs X L p = X.biUnion B := by + ext kc + simp only [mem_highCrossPairs, Finset.mem_biUnion, B, + Finset.mem_filter, Finset.mem_univ, true_and] + calc + (highCrossPairs X L p).card = (X.biUnion B).card := congrArg Finset.card hcover + _ ≤ ∑ x ∈ X, (B x).card := Finset.card_biUnion_le + _ ≤ ∑ x ∈ X, (multiplicity Incidence L x - 1) := + Finset.sum_le_sum fun x _ => pointCrossPairs_card_le x L p + _ = overlapExcess Incidence X L := rfl + +theorem highShapePairs_card_le + (S : Finset (Point F)) (L : Finset (AffineLine F)) (p : ProjectivePoint F) (D : ℕ) + (hsparse : ∀ l, S ≠ linePoints l → (S ∩ linePoints l).card ≤ D) : + (highShapePairs S L p).card ≤ D * (L \ coverPencil L p).card := by + let B := highShapePairs S L p + have hfiber (c : ComplementPopulation L p) : + (B.filter fun kc => kc.2 = c).card ≤ D := by + by_cases heq : S = linePoints c.val + · have hempty : (B.filter fun kc => kc.2 = c) = ∅ := by + apply Finset.not_nonempty_iff_eq_empty.mp + rintro ⟨kc, hkc⟩ + have hm := (mem_highShapePairs S L p kc).mp (Finset.mem_filter.mp hkc).1 + have hc : kc.2 = c := (Finset.mem_filter.mp hkc).2 + exact hm.2.2 (heq.trans + (congrArg (fun a : ComplementPopulation L p => linePoints a.val) hc.symm)) + rw [hempty, Finset.card_empty] + exact Nat.zero_le _ + · let T := B.filter fun kc => kc.2 = c + let xof (q : ↥T) : Point F := + Classical.choose ((mem_highShapePairs S L p q.val).mp + (Finset.mem_filter.mp q.property).1).1 + have hxof (q : ↥T) : xof q ∈ S ∧ + Incidence (xof q) q.val.1.val ∧ Incidence (xof q) q.val.2.val := + Classical.choose_spec ((mem_highShapePairs S L p q.val).mp + (Finset.mem_filter.mp q.property).1).1 + have hxc (q : ↥T) : Incidence (xof q) c.val := by + have hq := (hxof q).2.2 + rw [(Finset.mem_filter.mp q.property).2] at hq + exact hq + let f : ↥T → ↥(S ∩ linePoints c.val) := fun q => + ⟨xof q, Finset.mem_inter.mpr + ⟨(hxof q).1, (mem_linePoints (xof q) c.val).mpr (hxc q)⟩⟩ + have hf : Function.Injective f := by + intro a b hab + have hxy : xof a = xof b := + congrArg (fun z : ↥(S ∩ linePoints c.val) => z.val) hab + apply Subtype.ext + apply Prod.ext + · apply pencil_eq_at_complement (xof a) L p c a.val.1 b.val.1 + · exact hxc a + · exact (hxof a).2.1 + · rw [hxy] + exact (hxof b).2.1 + · exact (Finset.mem_filter.mp a.property).2.trans + (Finset.mem_filter.mp b.property).2.symm + exact (Finset.card_le_card_of_injective hf).trans (hsparse c.val heq) + have hsplit : B.card = ∑ c : ComplementPopulation L p, + (B.filter fun kc => kc.2 = c).card := + Finset.card_eq_sum_card_fiberwise (f := Prod.snd) + (t := Finset.univ) (fun _ _ => Finset.mem_univ _) + calc + (highShapePairs S L p).card = ∑ c : ComplementPopulation L p, + (B.filter fun kc => kc.2 = c).card := hsplit + _ ≤ ∑ _c : ComplementPopulation L p, D := Finset.sum_le_sum fun c _ => hfiber c + _ = D * (L \ coverPencil L p).card := by simp [ComplementPopulation, Nat.mul_comm] + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/HighOccupancy.lean b/lean/OAI/Combinatorics/Ryser/LineCover/HighOccupancy.lean new file mode 100644 index 0000000000000000000000000000000000000000..363d509f7c3a47bbeddf5dab503148bf8fe33040 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/HighOccupancy.lean @@ -0,0 +1,109 @@ +import OAI.Combinatorics.Ryser.LineCover.HighSamples +import OAI.Combinatorics.Ryser.LineCover.DisjointPairs + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + +theorem highShapePairs_matching_of_large + (S : Finset (Point F)) (L : Finset (AffineLine F)) (p : ProjectivePoint F) + (D h : ℕ) {t : ℕ} (s : HighSample L p t) + (hsparse : ∀ l : AffineLine F, S ≠ linePoints l → (S ∩ linePoints l).card ≤ D) + (hnot : S ∉ tupleShapes (highTuple L p s)) + (hlarge : 2 * D * h < (S ∩ crossPoints (highTuple L p s)).card) : + ∃ i j : Fin h ↪ Fin t, ∀ k, + (s.1 (i k), s.2 (j k)) ∈ highShapePairs S L p := by + let P := S ∩ crossPoints (highTuple L p s) + have hex (x : ↥P) : ∃ ij : Fin t × Fin t, + Incidence x.val (s.1 ij.1).val ∧ Incidence x.val (s.2 ij.2).val := by + obtain ⟨i, j, hi, hj⟩ := + (mem_crossPoints (highTuple L p s) x.val).mp (Finset.mem_inter.mp x.property).2 + exact ⟨(i, j), hi, hj⟩ + let rep : ↥P → Fin t × Fin t := fun x => Classical.choose (hex x) + have hrep (x : ↥P) : + Incidence x.val (s.1 (rep x).1).val ∧ Incidence x.val (s.2 (rep x).2).val := + Classical.choose_spec (hex x) + have hnotleft (i : Fin t) : S ≠ linePoints (s.1 i).val := by + intro he + exact hnot ((mem_tupleShapes (highTuple L p s) S).mpr ⟨Sum.inl i, he.symm⟩) + have hnotright (j : Fin t) : S ≠ linePoints (s.2 j).val := by + intro he + exact hnot ((mem_tupleShapes (highTuple L p s) S).mpr ⟨Sum.inr j, he.symm⟩) + have hleft (i : Fin t) : + (Finset.univ.filter fun x : ↥P => (rep x).1 = i).card ≤ D := by + calc + _ ≤ (S ∩ linePoints (s.1 i).val).card := by + apply Finset.card_le_card_of_injOn (fun x : ↥P => x.val) + · intro x hx + have hxi := (Finset.mem_filter.mp hx).2 + refine Finset.mem_inter.mpr ⟨(Finset.mem_inter.mp x.property).1, ?_⟩ + apply (mem_linePoints x.val (s.1 i).val).mpr + simpa only [hxi] using (hrep x).1 + · intro x _ y _ hxy + exact Subtype.ext hxy + _ ≤ D := hsparse _ (hnotleft i) + have hright (j : Fin t) : + (Finset.univ.filter fun x : ↥P => (rep x).2 = j).card ≤ D := by + calc + _ ≤ (S ∩ linePoints (s.2 j).val).card := by + apply Finset.card_le_card_of_injOn (fun x : ↥P => x.val) + · intro x hx + have hxj := (Finset.mem_filter.mp hx).2 + refine Finset.mem_inter.mpr ⟨(Finset.mem_inter.mp x.property).1, ?_⟩ + apply (mem_linePoints x.val (s.2 j).val).mpr + simpa only [hxj] using (hrep x).2 + · intro x _ y _ hxy + exact Subtype.ext hxy + _ ≤ D := hsparse _ (hnotright j) + obtain ⟨e, hei, hej⟩ := exists_disjoint_coordinate_sample + (Finset.univ : Finset ↥P) (fun x => (rep x).1) (fun x => (rep x).2) + D h hleft hright (by simpa only [Finset.card_univ, Fintype.card_coe] using hlarge) + let i : Fin h ↪ Fin t := ⟨fun k => (rep (e k).val).1, hei⟩ + let j : Fin h ↪ Fin t := ⟨fun k => (rep (e k).val).2, hej⟩ + refine ⟨i, j, ?_⟩ + intro k + apply (mem_highShapePairs S L p (s.1 (i k), s.2 (j k))).mpr + refine ⟨?_, hnotleft (i k), hnotright (j k)⟩ + exact ⟨(e k).val.val, (Finset.mem_inter.mp (e k).val.property).1, + (hrep (e k).val).1, (hrep (e k).val).2⟩ + +theorem highSurvivorPoints_card_le + (X : Finset (Point F)) (L : Finset (AffineLine F)) (p : ProjectivePoint F) + {t : ℕ} (s : HighSample L p t) : + (X ∩ crossPoints (highTuple L p s)).card ≤ highSurvivorPairCount X L p s := by + let P := X ∩ crossPoints (highTuple L p s) + let Q := Finset.univ.filter fun ij : Fin t × Fin t => + (s.1 ij.1, s.2 ij.2) ∈ highCrossPairs X L p + have hex (x : ↥P) : ∃ ij : Fin t × Fin t, + Incidence x.val (s.1 ij.1).val ∧ Incidence x.val (s.2 ij.2).val := by + obtain ⟨i, j, hi, hj⟩ := + (mem_crossPoints (highTuple L p s) x.val).mp (Finset.mem_inter.mp x.property).2 + exact ⟨(i, j), hi, hj⟩ + let rep : ↥P → Fin t × Fin t := fun x => Classical.choose (hex x) + have hrep (x : ↥P) : + Incidence x.val (s.1 (rep x).1).val ∧ Incidence x.val (s.2 (rep x).2).val := + Classical.choose_spec (hex x) + let enc : ↥P → ↥Q := fun x => ⟨rep x, Finset.mem_filter.mpr + ⟨Finset.mem_univ _, (mem_highCrossPairs X L p _).mpr + ⟨x.val, (Finset.mem_inter.mp x.property).1, (hrep x).1, (hrep x).2⟩⟩⟩ + have hinj : Function.Injective enc := by + intro x y hxy + have he : rep x = rep y := congrArg Subtype.val hxy + have hy := hrep y + rw [← he] at hy + apply Subtype.ext + exact eq_of_common_incidence_of_ne_lines + (pencil_ne_complement L p (s.1 (rep x).1) (s.2 (rep x).2)) + (hrep x).1 (hrep x).2 hy.1 hy.2 + exact Finset.card_le_card_of_injective hinj + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/HighProbability.lean b/lean/OAI/Combinatorics/Ryser/LineCover/HighProbability.lean new file mode 100644 index 0000000000000000000000000000000000000000..a9b5818126f7c1706d16a8f9def31201c59c7de9 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/HighProbability.lean @@ -0,0 +1,174 @@ +import OAI.Combinatorics.Ryser.LineCover.HighIncidence +import OAI.Combinatorics.Ryser.LineCover.HighDegeneracy +import OAI.Combinatorics.Ryser.LineCover.HighOccupancy +import OAI.Combinatorics.Ryser.LineCover.TwoPopulationMoments +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.NormNum + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable +open scoped BigOperators + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + +def highUniformLaw (L : Finset (AffineLine F)) (p : ProjectivePoint F) (t : ℕ) + [Nonempty (Fin t ↪ PencilPopulation L p)] + [Nonempty (Fin t ↪ ComplementPopulation L p)] : FiniteLaw (HighSample L p t) := + (FiniteLaw.uniform (Fin t ↪ PencilPopulation L p)).prod + (FiniteLaw.uniform (Fin t ↪ ComplementPopulation L p)) + +def highFailureBound (X : Finset (Point F)) (L : Finset (AffineLine F)) + (p : ProjectivePoint F) (shapes : Finset (Finset (Point F))) + (D h t : ℕ) (δ : ℝ) : ℝ := + let R := (coverPencil L p).card + let N := (L \ coverPencil L p).card + 2 * (overlapExcess Incidence X L : ℝ) / (δ * R * N) + + ((t : ℝ) ^ 2 + (t : ℝ) ^ 3) / R + + (shapes.card : ℝ) * (t.descFactorial h : ℝ) ^ 2 * ((D * N : ℕ) : ℝ) ^ h / + ((R.descFactorial h : ℝ) * (N.descFactorial h : ℝ)) + +theorem high_probability_large_survivorPairs + (X : Finset (Point F)) (L : Finset (AffineLine F)) (p : ProjectivePoint F) + {t : ℕ} [Nonempty (PencilPopulation L p)] [Nonempty (ComplementPopulation L p)] + [Nonempty (Fin t ↪ PencilPopulation L p)] + [Nonempty (Fin t ↪ ComplementPopulation L p)] + (δ : ℝ) (hδ : 0 < δ) (ht : 0 < t) : + (highUniformLaw L p t).prob + (fun s => δ * (t : ℝ) ^ 2 / 2 ≤ (highSurvivorPairCount X L p s : ℝ)) ≤ + 2 * (overlapExcess Incidence X L : ℝ) / + (δ * (coverPencil L p).card * (L \ coverPencil L p).card) := by + have ht' : 0 < (t : ℝ) := Nat.cast_pos.mpr ht + have hR : 0 < ((coverPencil L p).card : ℝ) := by + simpa only [Fintype.card_coe] using + (Nat.cast_pos.mpr (Fintype.card_pos (α := PencilPopulation L p)) : + (0 : ℝ) < Fintype.card (PencilPopulation L p)) + have hN : 0 < ((L \ coverPencil L p).card : ℝ) := by + simpa only [Fintype.card_coe] using + (Nat.cast_pos.mpr (Fintype.card_pos (α := ComplementPopulation L p)) : + (0 : ℝ) < Fintype.card (ComplementPopulation L p)) + have hthreshold : 0 < δ * (t : ℝ) ^ 2 / 2 := + div_pos (mul_pos hδ (pow_pos ht' 2)) (by norm_num) + have hmean : (highUniformLaw L p t).expectation + (fun s => (highSurvivorPairCount X L p s : ℝ)) = + (t : ℝ) ^ 2 * (highCrossPairs X L p).card / + ((coverPencil L p).card * (L \ coverPencil L p).card : ℝ) := by + have hcount (s : HighSample L p t) : + highSurvivorPairCount X L p s = + InjectionSampling.relationCount (highCrossPairs X L p) s := by + unfold highSurvivorPairCount InjectionSampling.relationCount + apply congrArg Finset.card + ext ij + simp only [Finset.mem_filter, Finset.mem_univ, true_and] + simp only [hcount] + simpa only [highUniformLaw, Fintype.card_coe] using + (InjectionSampling.expectation_relationCount (highCrossPairs X L p) (t := t)) + have hcard : ((highCrossPairs X L p).card : ℝ) ≤ + (overlapExcess Incidence X L : ℝ) := + Nat.cast_le.mpr (highCrossPairs_card_le X L p) + calc + _ ≤ (highUniformLaw L p t).expectation + (fun s => (highSurvivorPairCount X L p s : ℝ)) / (δ * (t : ℝ) ^ 2 / 2) := + (highUniformLaw L p t).prob_ge_le_expectation_div _ + (fun s => Nat.cast_nonneg _) hthreshold + _ = 2 * (highCrossPairs X L p).card / + (δ * (coverPencil L p).card * (L \ coverPencil L p).card) := by + rw [hmean] + field_simp [ne_of_gt hδ, ne_of_gt hR, ne_of_gt hN, ne_of_gt ht'] + + _ ≤ _ := div_le_div_of_nonneg_right + (mul_le_mul_of_nonneg_left hcard (by norm_num)) + (mul_nonneg (mul_nonneg hδ.le hR.le) hN.le) + +theorem high_probability_badLines + (L : Finset (AffineLine F)) (p : ProjectivePoint F) {t : ℕ} + [Nonempty (PencilPopulation L p)] + [Nonempty (Fin t ↪ PencilPopulation L p)] + [Nonempty (Fin t ↪ ComplementPopulation L p)] : + (highUniformLaw L p t).prob (fun s => ∃ i, s.1 i ∈ highBadLines L p s.2) ≤ + ((t : ℝ) ^ 2 + (t : ℝ) ^ 3) / (coverPencil L p).card := by + rw [highUniformLaw, InjectionSampling.prob_product_average_right] + calc + _ ≤ (FiniteLaw.uniform (Fin t ↪ ComplementPopulation L p)).expectation + (fun _ => (t : ℝ) * ((t : ℝ) + (t : ℝ) * t) / (coverPencil L p).card) := by + apply FiniteLaw.expectation_mono + intro b + have hcard : ((highBadLines L p b).card : ℝ) ≤ ((t + t * t : ℕ) : ℝ) := + Nat.cast_le.mpr (highBadLines_card_le L p b) + rw [Nat.cast_add, Nat.cast_mul] at hcard + calc + _ ≤ (t : ℝ) * (highBadLines L p b).card / (coverPencil L p).card := by + simpa only [Fintype.card_coe] using + InjectionSampling.prob_hits_finset_le (highBadLines L p b) + _ ≤ _ := div_le_div_of_nonneg_right + (mul_le_mul_of_nonneg_left hcard (Nat.cast_nonneg _)) (Nat.cast_nonneg _) + _ = _ := by + rw [FiniteLaw.expectation_const] + ring + +theorem high_probability_occupancy + (L : Finset (AffineLine F)) (p : ProjectivePoint F) + (shapes : Finset (Finset (Point F))) (D h : ℕ) {t : ℕ} + [Nonempty (Fin t ↪ PencilPopulation L p)] + [Nonempty (Fin t ↪ ComplementPopulation L p)] + [Nonempty (Fin h ↪ PencilPopulation L p)] + [Nonempty (Fin h ↪ ComplementPopulation L p)] + (hsparse : SparseShapes shapes D) : + (highUniformLaw L p t).prob (fun s => ∃ S ∈ shapes, + S ∉ tupleShapes (highTuple L p s) ∧ + 2 * D * h < (S ∩ crossPoints (highTuple L p s)).card) ≤ + (shapes.card : ℝ) * (t.descFactorial h : ℝ) ^ 2 * + ((D * (L \ coverPencil L p).card : ℕ) : ℝ) ^ h / + (((coverPencil L p).card.descFactorial h : ℝ) * + ((L \ coverPencil L p).card.descFactorial h : ℝ)) := by + let mu := highUniformLaw L p t + have hone (S : ↥shapes) : + mu.prob (fun s => ∃ i j : Fin h ↪ Fin t, + ∀ k, (s.1 (i k), s.2 (j k)) ∈ highShapePairs S.val L p) ≤ + (t.descFactorial h : ℝ) ^ 2 * + ((D * (L \ coverPencil L p).card : ℕ) : ℝ) ^ h / + (((coverPencil L p).card.descFactorial h : ℝ) * + ((L \ coverPencil L p).card.descFactorial h : ℝ)) := by + have hcard : ((highShapePairs S.val L p).card : ℝ) ≤ + ((D * (L \ coverPencil L p).card : ℕ) : ℝ) := + Nat.cast_le.mpr (highShapePairs_card_le S.val L p D (hsparse S.val S.property)) + calc + _ ≤ (t.descFactorial h : ℝ) ^ 2 * (highShapePairs S.val L p).card ^ h / + (((coverPencil L p).card.descFactorial h : ℝ) * + ((L \ coverPencil L p).card.descFactorial h : ℝ)) := by + simpa only [mu, highUniformLaw, Fintype.card_coe] using + (InjectionSampling.prob_relation_matching_le + (highShapePairs S.val L p) (h := h) (t := t)) + _ ≤ _ := div_le_div_of_nonneg_right + (mul_le_mul_of_nonneg_left + (pow_le_pow_left₀ (Nat.cast_nonneg _) hcard h) (sq_nonneg _)) + (mul_nonneg (Nat.cast_nonneg _) (Nat.cast_nonneg _)) + calc + _ ≤ mu.prob (fun s => ∃ S : ↥shapes, ∃ i j : Fin h ↪ Fin t, + ∀ k, (s.1 (i k), s.2 (j k)) ∈ highShapePairs S.val L p) := by + apply mu.prob_mono + intro s hs + obtain ⟨S, hS, hnot, hlarge⟩ := hs + exact ⟨⟨S, hS⟩, highShapePairs_matching_of_large + S L p D h s (hsparse S hS) hnot hlarge⟩ + _ ≤ ∑ S : ↥shapes, mu.prob (fun s => ∃ i j : Fin h ↪ Fin t, + ∀ k, (s.1 (i k), s.2 (j k)) ∈ highShapePairs S.val L p) := + mu.prob_exists_le _ + _ ≤ ∑ _S : ↥shapes, + (t.descFactorial h : ℝ) ^ 2 * + ((D * (L \ coverPencil L p).card : ℕ) : ℝ) ^ h / + (((coverPencil L p).card.descFactorial h : ℝ) * + ((L \ coverPencil L p).card.descFactorial h : ℝ)) := + Finset.sum_le_sum (fun S _ => hone S) + _ = _ := by + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_coe, nsmul_eq_mul] + ring + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/HighSamples.lean b/lean/OAI/Combinatorics/Ryser/LineCover/HighSamples.lean new file mode 100644 index 0000000000000000000000000000000000000000..fa873c888e479965b1f037af1faedd5d046fb1fb --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/HighSamples.lean @@ -0,0 +1,106 @@ +import OAI.Combinatorics.Ryser.LineCover.Definitions +import OAI.Combinatorics.Ryser.Geometry.ProjectiveJoins +import Mathlib.Data.Fintype.CardEmbedding + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [instFintypeF : Fintype F] [DecidableEq F] + +abbrev PencilPopulation (L : Finset (AffineLine F)) (p : ProjectivePoint F) := + ↥(coverPencil L p) + +abbrev ComplementPopulation (L : Finset (AffineLine F)) (p : ProjectivePoint F) := + ↥(L \ coverPencil L p) + +abbrev HighSample (L : Finset (AffineLine F)) (p : ProjectivePoint F) (t : ℕ) := + (Fin t ↪ PencilPopulation L p) × (Fin t ↪ ComplementPopulation L p) + +theorem pencilPopulation_incident (L : Finset (AffineLine F)) (p : ProjectivePoint F) + (k : PencilPopulation L p) : ProjectiveIncidence p (some k.val) := + (mem_coverPencil L p k.val).mp k.property |>.2 + +theorem complementPopulation_mem (L : Finset (AffineLine F)) (p : ProjectivePoint F) + (c : ComplementPopulation L p) : c.val ∈ L := let _ := instFintypeF; + (Finset.mem_sdiff.mp c.property).1 + +theorem complementPopulation_not_incident (L : Finset (AffineLine F)) + (p : ProjectivePoint F) (c : ComplementPopulation L p) : + ¬ ProjectiveIncidence p (some c.val) := by + intro hc + exact (Finset.mem_sdiff.mp c.property).2 + ((mem_coverPencil L p c.val).mpr ⟨complementPopulation_mem L p c, hc⟩) + +theorem pencil_ne_complement (L : Finset (AffineLine F)) (p : ProjectivePoint F) + (k : PencilPopulation L p) (c : ComplementPopulation L p) : k.val ≠ c.val := by + intro h + apply complementPopulation_not_incident L p c + rw [← h] + exact pencilPopulation_incident L p k + +def highTuple (L : Finset (AffineLine F)) (p : ProjectivePoint F) {t : ℕ} + (s : HighSample L p t) : LineTuple F t where + toFun := Sum.elim (fun i => (s.1 i).val) (fun j => (s.2 j).val) + inj' := by + intro a b hab + cases a with + | inl i => + cases b with + | inl j => exact congrArg Sum.inl (s.1.injective (Subtype.ext hab)) + | inr j => exact (pencil_ne_complement L p (s.1 i) (s.2 j) hab).elim + | inr i => + cases b with + | inl j => exact (pencil_ne_complement L p (s.1 j) (s.2 i) hab.symm).elim + | inr j => exact congrArg Sum.inr (s.2.injective (Subtype.ext hab)) + +@[simp] theorem highTuple_left (L : Finset (AffineLine F)) (p : ProjectivePoint F) + {t : ℕ} (s : HighSample L p t) (i : Fin t) : + highTuple L p s (Sum.inl i) = (s.1 i).val := rfl + +@[simp] theorem highTuple_right (L : Finset (AffineLine F)) (p : ProjectivePoint F) + {t : ℕ} (s : HighSample L p t) (i : Fin t) : + highTuple L p s (Sum.inr i) = (s.2 i).val := rfl + +theorem highTuple_mem (L : Finset (AffineLine F)) (p : ProjectivePoint F) + {t : ℕ} (s : HighSample L p t) (i : Fin t ⊕ Fin t) : highTuple L p s i ∈ L := by + cases i with + | inl i => exact coverPencil_subset L p (s.1 i).property + | inr i => exact complementPopulation_mem L p (s.2 i) + +def highCrossPairs (X : Finset (Point F)) (L : Finset (AffineLine F)) + (p : ProjectivePoint F) : Finset (PencilPopulation L p × ComplementPopulation L p) := + Finset.univ.filter fun kc => + ∃ x ∈ X, Incidence x kc.1.val ∧ Incidence x kc.2.val + +@[simp] theorem mem_highCrossPairs (X : Finset (Point F)) (L : Finset (AffineLine F)) + (p : ProjectivePoint F) (kc : PencilPopulation L p × ComplementPopulation L p) : + kc ∈ highCrossPairs X L p ↔ + ∃ x ∈ X, Incidence x kc.1.val ∧ Incidence x kc.2.val := let _ := instFintypeF; by + simp only [highCrossPairs, Finset.mem_filter, Finset.mem_univ, true_and] + +def highShapePairs (S : Finset (Point F)) (L : Finset (AffineLine F)) + (p : ProjectivePoint F) : Finset (PencilPopulation L p × ComplementPopulation L p) := + (highCrossPairs S L p).filter fun kc => + S ≠ linePoints kc.1.val ∧ S ≠ linePoints kc.2.val + +@[simp] theorem mem_highShapePairs (S : Finset (Point F)) (L : Finset (AffineLine F)) + (p : ProjectivePoint F) (kc : PencilPopulation L p × ComplementPopulation L p) : + kc ∈ highShapePairs S L p ↔ + (∃ x ∈ S, Incidence x kc.1.val ∧ Incidence x kc.2.val) ∧ + S ≠ linePoints kc.1.val ∧ S ≠ linePoints kc.2.val := by + simp only [highShapePairs, Finset.mem_filter, mem_highCrossPairs] + +def highSurvivorPairCount (X : Finset (Point F)) (L : Finset (AffineLine F)) + (p : ProjectivePoint F) {t : ℕ} (s : HighSample L p t) : ℕ := + (Finset.univ.filter fun ij : Fin t × Fin t => + (s.1 ij.1, s.2 ij.2) ∈ highCrossPairs X L p).card + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/InjectionSampling.lean b/lean/OAI/Combinatorics/Ryser/LineCover/InjectionSampling.lean new file mode 100644 index 0000000000000000000000000000000000000000..444713f494b0cc6e3fa864261ea01c4e38c153f3 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/InjectionSampling.lean @@ -0,0 +1,248 @@ +import OAI.Combinatorics.Ryser.Probability.Product +import Mathlib.Logic.Equiv.Fintype +import Mathlib.Data.Fintype.Pi +import Mathlib.Data.Fintype.CardEmbedding +import Mathlib.SetTheory.Cardinal.Finite + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample.InjectionSampling + +universe u v w + +def restrict {I : Type u} {J : Type v} {Ω : Type w} + (j : I ↪ J) (sample : J ↪ Ω) : I ↪ Ω := + j.trans sample + +@[simp] theorem restrict_apply {I : Type u} {J : Type v} {Ω : Type w} + (j : I ↪ J) (sample : J ↪ Ω) (i : I) : + restrict j sample i = sample (j i) := rfl + +theorem restriction_fiber_natCard_eq + {I : Type u} {J : Type v} {Ω : Type w} [Finite I] + (j : I ↪ J) (v₀ v₁ : I ↪ Ω) : + Nat.card {sample : J ↪ Ω // restrict j sample = v₀} = + Nat.card {sample : J ↪ Ω // restrict j sample = v₁} := by + classical + obtain ⟨σ, hσ⟩ := Equiv.Perm.exists_extending_pair + v₀ v₁ v₀.injective v₁.injective + let E : (J ↪ Ω) ≃ (J ↪ Ω) := + Equiv.embeddingCongr (Equiv.refl J) σ + refine Nat.card_congr + (E.subtypeEquiv + (p := fun sample => restrict j sample = v₀) + (q := fun sample => restrict j sample = v₁) ?_) + intro sample + constructor + · intro hu + apply Function.Embedding.ext + intro i + change σ (sample (j i)) = v₁ i + have hi := congrArg (fun b : I ↪ Ω => b i) hu + change sample (j i) = v₀ i at hi + exact (congrArg σ hi).trans (hσ i) + · intro hu + apply Function.Embedding.ext + intro i + change sample (j i) = v₀ i + apply σ.injective + have hi := congrArg (fun b : I ↪ Ω => b i) hu + change σ (sample (j i)) = v₁ i at hi + exact hi.trans (hσ i).symm + +theorem natCard_embeddings + {A : Type u} {B : Type v} [Finite A] [Finite B] : + Nat.card (A ↪ B) = + (Nat.card B).descFactorial (Nat.card A) := by + classical + let : Fintype A := Fintype.ofFinite A + let : Fintype B := Fintype.ofFinite B + simpa only [Nat.card_eq_fintype_card] using + (Fintype.card_embedding_eq (α := A) (β := B)) + +theorem restriction_fiber_natCard + {I : Type u} {J : Type v} {Ω : Type w} + [Finite I] [Finite J] [Finite Ω] + (j : I ↪ J) (v₀ : I ↪ Ω) : + Nat.card {sample : J ↪ Ω // restrict j sample = v₀} = + (Nat.card Ω - Nat.card I).descFactorial + (Nat.card J - Nat.card I) := by + classical + let : Fintype I := Fintype.ofFinite I + let : Fintype J := Fintype.ofFinite J + let : Fintype Ω := Fintype.ofFinite Ω + have hfactor : + Nat.card (J ↪ Ω) = + Nat.card (I ↪ Ω) * + Nat.card {sample : J ↪ Ω // restrict j sample = v₀} := by + calc + Nat.card (J ↪ Ω) = + ∑ v₁ : I ↪ Ω, + Nat.card {sample : J ↪ Ω // restrict j sample = v₁} := by + rw [← Nat.card_congr + (Equiv.sigmaFiberEquiv (fun sample : J ↪ Ω => restrict j sample))] + exact Nat.card_sigma + _ = ∑ _v₁ : I ↪ Ω, + Nat.card {sample : J ↪ Ω // restrict j sample = v₀} := by + apply Finset.sum_congr rfl + intro v₁ _ + exact restriction_fiber_natCard_eq j v₁ v₀ + _ = _ := by + simp only [Finset.sum_const, Finset.card_univ, + Nat.nsmul_eq_mul, Nat.card_eq_fintype_card] + rw [natCard_embeddings (A := J) (B := Ω), + natCard_embeddings (A := I) (B := Ω)] at hfactor + have hIJ : Nat.card I ≤ Nat.card J := + Nat.card_le_card_of_injective j j.injective + have hIΩ : Nat.card I ≤ Nat.card Ω := + Nat.card_le_card_of_injective v₀ v₀.injective + have hpos : 0 < (Nat.card Ω).descFactorial (Nat.card I) := + Nat.descFactorial_pos.mpr hIΩ + apply Nat.mul_left_cancel hpos + calc + (Nat.card Ω).descFactorial (Nat.card I) * + Nat.card {sample : J ↪ Ω // restrict j sample = v₀} = + (Nat.card Ω).descFactorial (Nat.card J) := hfactor.symm + _ = (Nat.card Ω - Nat.card I).descFactorial + (Nat.card J - Nat.card I) * + (Nat.card Ω).descFactorial (Nat.card I) := + (Nat.descFactorial_mul_descFactorial + (n := Nat.card Ω) hIJ).symm + _ = _ := Nat.mul_comm _ _ + +section Laws + +variable {I : Type u} {J : Type v} {Ω : Type w} + [Fintype I] [Fintype J] [Fintype Ω] + +theorem map_uniform_restrict [Nonempty (J ↪ Ω)] [Nonempty (I ↪ Ω)] + (j : I ↪ J) : + (FiniteLaw.uniform (J ↪ Ω)).map (restrict j) = + FiniteLaw.uniform (I ↪ Ω) := + FiniteLaw.map_uniform_of_fiber_card_eq (restrict j) + (restriction_fiber_natCard_eq j) + +theorem prob_restrict [Nonempty (J ↪ Ω)] [Nonempty (I ↪ Ω)] + (j : I ↪ J) (P : (I ↪ Ω) → Prop) : + (FiniteLaw.uniform (J ↪ Ω)).prob (fun sample => P (restrict j sample)) = + (FiniteLaw.uniform (I ↪ Ω)).prob P := by + calc + _ = ((FiniteLaw.uniform (J ↪ Ω)).map (restrict j)).prob P := + (FiniteLaw.prob_map _ _ _).symm + _ = _ := by rw [map_uniform_restrict j] + +theorem expectation_restrict [Nonempty (J ↪ Ω)] [Nonempty (I ↪ Ω)] + (j : I ↪ J) (f : (I ↪ Ω) → ℝ) : + (FiniteLaw.uniform (J ↪ Ω)).expectation (fun sample => f (restrict j sample)) = + (FiniteLaw.uniform (I ↪ Ω)).expectation f := by + calc + _ = ((FiniteLaw.uniform (J ↪ Ω)).map (restrict j)).expectation f := + (FiniteLaw.expectation_map _ _ _).symm + _ = _ := by rw [map_uniform_restrict j] + +theorem map_uniform_coordinate [Nonempty (I ↪ Ω)] [Nonempty Ω] (i : I) : + (FiniteLaw.uniform (I ↪ Ω)).map (fun sample => sample i) = + FiniteLaw.uniform Ω := by + classical + apply FiniteLaw.map_uniform_of_fiber_card_eq + intro a b + let E : (I ↪ Ω) ≃ (I ↪ Ω) := + Equiv.embeddingCongr (Equiv.refl I) (Equiv.swap a b) + refine Nat.card_congr + (E.subtypeEquiv + (p := fun sample => sample i = a) + (q := fun sample => sample i = b) ?_) + intro sample + change sample i = a ↔ Equiv.swap a b (sample i) = b + constructor + · intro hu + rw [hu, Equiv.swap_apply_left] + · intro hu + apply (Equiv.swap a b).injective + simpa only [Equiv.swap_apply_left] using hu + +theorem prob_coordinate [Nonempty (I ↪ Ω)] [Nonempty Ω] + (i : I) (P : Ω → Prop) : + (FiniteLaw.uniform (I ↪ Ω)).prob (fun sample => P (sample i)) = + (FiniteLaw.uniform Ω).prob P := by + calc + _ = ((FiniteLaw.uniform (I ↪ Ω)).map (fun sample => sample i)).prob P := + (FiniteLaw.prob_map _ _ _).symm + _ = _ := by rw [map_uniform_coordinate i] + +theorem expectation_coordinate [Nonempty (I ↪ Ω)] [Nonempty Ω] + (i : I) (f : Ω → ℝ) : + (FiniteLaw.uniform (I ↪ Ω)).expectation (fun sample => f (sample i)) = + (FiniteLaw.uniform Ω).expectation f := by + calc + _ = ((FiniteLaw.uniform (I ↪ Ω)).map (fun sample => sample i)).expectation f := + (FiniteLaw.expectation_map _ _ _).symm + _ = _ := by rw [map_uniform_coordinate i] + +end Laws + +theorem sample_nonempty (I : Type u) (Ω : Type v) [Fintype I] [Fintype Ω] + (hle : Nat.card I ≤ Nat.card Ω) : Nonempty (I ↪ Ω) := + Function.Embedding.nonempty_of_card_le + (by simpa only [Nat.card_eq_fintype_card] using hle) + +noncomputable def law (I : Type u) (Ω : Type v) [Fintype I] [Fintype Ω] + (hle : Nat.card I ≤ Nat.card Ω) : FiniteLaw (I ↪ Ω) := by + letI : Nonempty (I ↪ Ω) := sample_nonempty I Ω hle + exact FiniteLaw.uniform (I ↪ Ω) + +theorem law_eq_uniform (I : Type u) (Ω : Type v) [Fintype I] [Fintype Ω] + [Nonempty (I ↪ Ω)] (hle : Nat.card I ≤ Nat.card Ω) : + law I Ω hle = FiniteLaw.uniform (I ↪ Ω) := rfl + +theorem law_weight (I : Type u) (Ω : Type v) [Fintype I] [Fintype Ω] + (hle : Nat.card I ≤ Nat.card Ω) (sample : I ↪ Ω) : + (law I Ω hle).weight sample = + ((Nat.card Ω).descFactorial (Nat.card I) : ℝ)⁻¹ := by + change (Fintype.card (I ↪ Ω) : ℝ)⁻¹ = _ + rw [← Nat.card_eq_fintype_card (α := I ↪ Ω), natCard_embeddings] + +theorem law_prob (I : Type u) (Ω : Type v) [Fintype I] [Fintype Ω] + (hle : Nat.card I ≤ Nat.card Ω) (P : (I ↪ Ω) → Prop) : + (law I Ω hle).prob P = + (Nat.card {sample : I ↪ Ω // P sample} : ℝ) / + ((Nat.card Ω).descFactorial (Nat.card I) : ℝ) := by + classical + let : Nonempty (I ↪ Ω) := sample_nonempty I Ω hle + simpa only [law_eq_uniform, Nat.card_eq_fintype_card, + Fintype.card_subtype, Fintype.card_embedding_eq] using + (FiniteLaw.uniform_prob (I ↪ Ω) P) + +variable {I : Type u} {J : Type v} {Ω : Type w} + [Fintype I] [Fintype J] [Fintype Ω] + +theorem map_law_restrict (j : I ↪ J) + (hJ : Nat.card J ≤ Nat.card Ω) (hI : Nat.card I ≤ Nat.card Ω) : + (law J Ω hJ).map (restrict j) = law I Ω hI := by + let : Nonempty (J ↪ Ω) := sample_nonempty J Ω hJ + let : Nonempty (I ↪ Ω) := sample_nonempty I Ω hI + simpa only [law_eq_uniform] using (map_uniform_restrict (Ω := Ω) j) + +theorem prob_law_restrict (j : I ↪ J) + (hJ : Nat.card J ≤ Nat.card Ω) (hI : Nat.card I ≤ Nat.card Ω) + (P : (I ↪ Ω) → Prop) : + (law J Ω hJ).prob (fun sample => P (restrict j sample)) = + (law I Ω hI).prob P := by + let : Nonempty (J ↪ Ω) := sample_nonempty J Ω hJ + let : Nonempty (I ↪ Ω) := sample_nonempty I Ω hI + simpa only [law_eq_uniform] using (prob_restrict j P) + +theorem expectation_law_restrict (j : I ↪ J) + (hJ : Nat.card J ≤ Nat.card Ω) (hI : Nat.card I ≤ Nat.card Ω) + (f : (I ↪ Ω) → ℝ) : + (law J Ω hJ).expectation (fun sample => f (restrict j sample)) = + (law I Ω hI).expectation f := by + let : Nonempty (J ↪ Ω) := sample_nonempty J Ω hJ + let : Nonempty (I ↪ Ω) := sample_nonempty I Ω hI + simpa only [law_eq_uniform] using (expectation_restrict j f) + +end RyserCoveringCounterexample.InjectionSampling + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/LowConcurrency.lean b/lean/OAI/Combinatorics/Ryser/LineCover/LowConcurrency.lean new file mode 100644 index 0000000000000000000000000000000000000000..32101ca100d01d3c3b95e9d66bddc6fe111174a3 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/LowConcurrency.lean @@ -0,0 +1,150 @@ +import OAI.Combinatorics.Ryser.LineCover.SurvivorSampling +import OAI.Combinatorics.Ryser.LineCover.LowDegeneracy +import OAI.Combinatorics.Ryser.LineCover.LowOccupancy +import OAI.Combinatorics.Ryser.LineCover.TupleGeometry + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [instFintypeF : Fintype F] [DecidableEq F] + +def lowFailureBound (X : Finset (Point F)) (L : Finset (AffineLine F)) + (shapes : Finset (Finset (Point F))) (D R h t : ℕ) (δ : ℝ) : ℝ := + 2 * (orderedPairMass Incidence X L : ℝ) / + (δ * (L.card.descFactorial 2 : ℝ)) + + ((2 * t).descFactorial 2 : ℝ) * R / ((L.card - 1 : ℕ) : ℝ) + + ((2 * t).descFactorial 3 : ℝ) * R / ((L.card - 2 : ℕ) : ℝ) + + (shapes.card : ℝ) * (t : ℝ) ^ (2 * h) * ((L.card * D * R : ℕ) : ℝ) ^ h / + (L.card.descFactorial (2 * h) : ℝ) + +def LowBad (X : Finset (Point F)) (L : Finset (AffineLine F)) + (shapes : Finset (Finset (Point F))) (D h t : ℕ) (δ : ℝ) + (u : CoverSample L t) : Prop := + δ * (t : ℝ) ^ 2 / 2 ≤ ((X ∩ crossPoints (liftSample L u)).card : ℝ) ∨ + LowDegeneracy.AnyParallel u ∨ LowDegeneracy.AnyConcurrent u ∨ + ∃ S ∈ shapes, S ∉ tupleShapes (liftSample L u) ∧ + 2 * D * h < (S ∩ crossPoints (liftSample L u)).card + +theorem direction_card_le_of_coverPencil + (L : Finset (AffineLine F)) {R : ℕ} + (hR : ∀ p : ProjectivePoint F, (coverPencil L p).card ≤ R) + (d : Direction F) : (L.filter fun l => l.1 = d).card ≤ R := let _ := instFintypeF; by + simpa only [coverPencil, ProjectiveIncidence, eq_comm] using hR (Sum.inr d) + +private theorem prob_four_union_le {Ω : Type*} [Fintype Ω] + (μ : FiniteLaw Ω) (P Q R S : Ω → Prop) : + μ.prob (fun u => P u ∨ Q u ∨ R u ∨ S u) ≤ + μ.prob P + μ.prob Q + μ.prob R + μ.prob S := by + calc + _ ≤ μ.prob P + μ.prob (fun u => Q u ∨ R u ∨ S u) := + μ.prob_union_le _ _ + _ ≤ μ.prob P + (μ.prob Q + μ.prob (fun u => R u ∨ S u)) := + add_le_add (le_refl (μ.prob P)) (μ.prob_union_le Q (fun u => R u ∨ S u)) + _ ≤ μ.prob P + (μ.prob Q + (μ.prob R + μ.prob S)) := + add_le_add (le_refl (μ.prob P)) + (add_le_add (le_refl (μ.prob Q)) (μ.prob_union_le R S)) + _ = _ := by simp only [add_assoc] + +private theorem prob_uniform_parallel_le (L : Finset (AffineLine F)) (t R : ℕ) + [Nonempty (CoverSample L t)] (hsize : 2 * t ≤ L.card) (hL : 3 ≤ L.card) + (hR : ∀ p : ProjectivePoint F, (coverPencil L p).card ≤ R) : + (FiniteLaw.uniform (CoverSample L t)).prob LowDegeneracy.AnyParallel ≤ + ((2 * t).descFactorial 2 : ℝ) * R / ((L.card - 1 : ℕ) : ℝ) := by + have hbound := LowDegeneracy.prob_tuple_parallel_le L t R hsize + ((by decide : 2 ≤ 3).trans hL) (direction_card_le_of_coverPencil L hR) + rw [InjectionSampling.law_eq_uniform] at hbound + exact hbound + +private theorem prob_uniform_concurrent_le (L : Finset (AffineLine F)) (t R : ℕ) + [Nonempty (CoverSample L t)] (hsize : 2 * t ≤ L.card) (hL : 3 ≤ L.card) + (hR : ∀ p : ProjectivePoint F, (coverPencil L p).card ≤ R) : + (FiniteLaw.uniform (CoverSample L t)).prob LowDegeneracy.AnyConcurrent ≤ + ((2 * t).descFactorial 3 : ℝ) * R / ((L.card - 2 : ℕ) : ℝ) := let _ := instFintypeF; by + have hbound := LowDegeneracy.prob_tuple_concurrent_le L t R hsize hL hR + rw [InjectionSampling.law_eq_uniform] at hbound + exact hbound + +theorem prob_lowBad_le + (X : Finset (Point F)) (L : Finset (AffineLine F)) + (shapes : Finset (Finset (Point F))) (D R h t : ℕ) (δ : ℝ) + [Nonempty (CoverSample L t)] + (hδ : 0 < δ) (ht : 0 < t) (hsize : 2 * t ≤ L.card) (hL : 3 ≤ L.card) + (hSparse : SparseShapes shapes D) + (hR : ∀ p : ProjectivePoint F, (coverPencil L p).card ≤ R) : + (FiniteLaw.uniform (CoverSample L t)).prob (LowBad X L shapes D h t δ) ≤ + lowFailureBound X L shapes D R h t δ := by + unfold LowBad lowFailureBound + apply (prob_four_union_le (FiniteLaw.uniform (CoverSample L t)) _ _ _ _).trans + exact add_le_add + (add_le_add + (add_le_add (prob_many_cross_survivors_le X L hδ ht) + (prob_uniform_parallel_le L t R hsize hL hR)) + (prob_uniform_concurrent_le L t R hsize hL hR)) + (prob_bad_occupancy_le (h := h) (t := t) shapes L hSparse hR) + +theorem admissible_of_not_lowBad + (X : Finset (Point F)) (L : Finset (AffineLine F)) + (shapes : Finset (Finset (Point F))) (D h t : ℕ) (δ : ℝ) + (u : CoverSample L t) (hu : ¬ LowBad X L shapes D h t δ u) : + AdmissibleTuple shapes D h (liftSample L u) ∧ + ((X ∩ crossPoints (liftSample L u)).card : ℝ) < δ * (t : ℝ) ^ 2 / 2 := by + have hmany : ¬ δ * (t : ℝ) ^ 2 / 2 ≤ + ((X ∩ crossPoints (liftSample L u)).card : ℝ) := + fun he => hu (Or.inl he) + have hparallel : ¬ LowDegeneracy.AnyParallel u := + fun he => hu (Or.inr (Or.inl he)) + have hconcurrent : ¬ LowDegeneracy.AnyConcurrent u := + fun he => hu (Or.inr (Or.inr (Or.inl he))) + have hoccupied : ¬ ∃ S ∈ shapes, S ∉ tupleShapes (liftSample L u) ∧ + 2 * D * h < (S ∩ crossPoints (liftSample L u)).card := + fun he => hu (Or.inr (Or.inr (Or.inr he))) + have hp : NoParallel (liftSample L u) := by + intro i j hij hdir + exact hparallel ((LowDegeneracy.anyParallel_iff u).mpr ⟨i, j, hij, hdir⟩) + have hc : NoConcurrentTriple (liftSample L u) := by + intro p i j k hij hik hjk hi hj hk + exact hconcurrent ((LowDegeneracy.anyConcurrent_iff u).mpr + ⟨i, j, k, hij, hik, hjk, p, hi, hj, hk⟩) + obtain ⟨hfinite, hcard⟩ := + finiteCrossings_card_of_no_parallel_no_concurrentTriple (liftSample L u) hp hc + refine ⟨⟨hfinite, hcard, ?_⟩, lt_of_not_ge hmany⟩ + intro S hS hnot + exact Nat.le_of_not_gt (fun hlarge => hoccupied ⟨S, hS, hnot, hlarge⟩) + +theorem exists_low_sample_of_failureBound_lt_one + (X : Finset (Point F)) (L : Finset (AffineLine F)) + (shapes : Finset (Finset (Point F))) (D R h t : ℕ) (δ : ℝ) + (hδ : 0 < δ) (ht : 0 < t) (hsize : 2 * t ≤ L.card) (hL : 3 ≤ L.card) + (hSparse : SparseShapes shapes D) + (hR : ∀ p : ProjectivePoint F, (coverPencil L p).card ≤ R) + (hbudget : lowFailureBound X L shapes D R h t δ < 1) : + ∃ a : LineTuple F t, (∀ i, a i ∈ L) ∧ AdmissibleTuple shapes D h a ∧ + ((X ∩ crossPoints a).card : ℝ) < δ * (t : ℝ) ^ 2 / 2 := by + classical + let : Nonempty (CoverSample L t) := InjectionSampling.sample_nonempty + (Fin t ⊕ Fin t) ↥L (by simpa [Nat.card_sum, two_mul] using hsize) + let μ := FiniteLaw.uniform (CoverSample L t) + have hprob := prob_lowBad_le X L shapes D R h t δ hδ ht hsize hL hSparse hR + have hex : ∃ u : CoverSample L t, ¬ LowBad X L shapes D h t δ u := by + by_contra hnone + have hall (u : CoverSample L t) : LowBad X L shapes D h t δ u := by + by_contra hu + exact hnone ⟨u, hu⟩ + have hone : 1 ≤ μ.prob (LowBad X L shapes D h t δ) := by + simpa only [FiniteLaw.prob_true] using + (μ.prob_mono (P := fun _ => True) (Q := LowBad X L shapes D h t δ) + (fun u _ => hall u)) + exact (not_le_of_gt (hprob.trans_lt hbudget)) hone + obtain ⟨u, hu⟩ := hex + exact ⟨liftSample L u, liftSample_mem L u, + admissible_of_not_lowBad X L shapes D h t δ u hu⟩ + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/LowDegeneracy.lean b/lean/OAI/Combinatorics/Ryser/LineCover/LowDegeneracy.lean new file mode 100644 index 0000000000000000000000000000000000000000..51539c0187b149cf7179b92f3a7e8e9bbe672eae --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/LowDegeneracy.lean @@ -0,0 +1,310 @@ +import OAI.Combinatorics.Ryser.Geometry.ProjectiveJoins +import OAI.Combinatorics.Ryser.LineCover.InjectionSampling +import Mathlib.Data.Fin.Embedding +import Mathlib.Data.Fin.VecNotation +import Mathlib.Tactic.FinCases + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.LineCover.LowDegeneracy + +open InjectionSampling + +private theorem natCard_le_mul_of_fibers + {A B : Type*} [Fintype A] [Fintype B] + (f : A → B) (R : ℕ) + (h : ∀ b, Nat.card {a : A // f a = b} ≤ R) : + Nat.card A ≤ Nat.card B * R := by + classical + calc + Nat.card A = ∑ b : B, Nat.card {a : A // f a = b} := by + rw [← Nat.card_congr (Equiv.sigmaFiberEquiv f)] + exact Nat.card_sigma + _ ≤ ∑ _b : B, R := Finset.sum_le_sum (fun b _ => h b) + _ = Nat.card B * R := by + simp only [Finset.sum_const, Finset.card_univ, Nat.nsmul_eq_mul, + Nat.card_eq_fintype_card] + +variable {F : Type*} [instFieldF : Field F] [instDecidableEqF : DecidableEq F] + +def SameDirection {L : Finset (AffineLine F)} (u : Fin 2 ↪ ↥L) : Prop := + (u 0).val.1 = (u 1).val.1 + +def Concurrent {L : Finset (AffineLine F)} (u : Fin 3 ↪ ↥L) : Prop := + ∃ p : ProjectivePoint F, ∀ i, ProjectiveIncidence p (some (u i).val) + +def firstPair {L : Finset (AffineLine F)} (u : Fin 3 ↪ ↥L) : Fin 2 ↪ ↥L := + (Fin.castLEEmb (by decide : 2 ≤ 3)).trans u + +@[simp] theorem firstPair_zero {L : Finset (AffineLine F)} (u : Fin 3 ↪ ↥L) : + firstPair u 0 = u 0 := let _ := instFieldF; let _ := instDecidableEqF; rfl + +@[simp] theorem firstPair_one {L : Finset (AffineLine F)} (u : Fin 3 ↪ ↥L) : + firstPair u 1 = u 1 := let _ := instFieldF; let _ := instDecidableEqF; rfl + +private theorem pair_lines_ne {L : Finset (AffineLine F)} (u : Fin 2 ↪ ↥L) : + (u 0).val ≠ (u 1).val := let _ := instFieldF; let _ := instDecidableEqF; by + intro h + have h01 : (0 : Fin 2) = 1 := u.injective (Subtype.ext h) + exact (by decide : (0 : Fin 2) ≠ 1) h01 + +def pairMeet {L : Finset (AffineLine F)} (u : Fin 2 ↪ ↥L) : ProjectivePoint F := + Classical.choose (existsUnique_projective_incident_of_ne_lines (pair_lines_ne u)) + +theorem pairMeet_incident {L : Finset (AffineLine F)} (u : Fin 2 ↪ ↥L) : + ProjectiveIncidence (pairMeet u) (some (u 0).val) ∧ + ProjectiveIncidence (pairMeet u) (some (u 1).val) := + (Classical.choose_spec + (existsUnique_projective_incident_of_ne_lines (pair_lines_ne u))).1 + +theorem eq_pairMeet {L : Finset (AffineLine F)} (u : Fin 2 ↪ ↥L) + {p : ProjectivePoint F} + (h0 : ProjectiveIncidence p (some (u 0).val)) + (h1 : ProjectiveIncidence p (some (u 1).val)) : p = pairMeet u := + (Classical.choose_spec + (existsUnique_projective_incident_of_ne_lines (pair_lines_ne u))).2 p ⟨h0, h1⟩ + +theorem card_sameDirection_le (L : Finset (AffineLine F)) (R : ℕ) + (hR : ∀ d : Direction F, (L.filter fun l => l.1 = d).card ≤ R) : + Nat.card {u : Fin 2 ↪ ↥L // SameDirection u} ≤ L.card * R := let _ := instFieldF; by + classical + let A := {u : Fin 2 ↪ ↥L // SameDirection u} + let f : A → ↥L := fun u => u.val 0 + have hf : ∀ l, Nat.card {u : A // f u = l} ≤ R := by + intro l + let g : {u : A // f u = l} → ↥(L.filter fun k => k.1 = l.val.1) := + fun u => ⟨(u.val.val 1).val, Finset.mem_filter.mpr + ⟨(u.val.val 1).property, + u.val.property.symm.trans + (congrArg (fun k : ↥L => k.val.1) u.property)⟩⟩ + have hg : Function.Injective g := by + intro u v huv + apply Subtype.ext + apply Subtype.ext + apply Function.Embedding.ext + intro i + fin_cases i + · exact u.property.trans v.property.symm + · apply Subtype.ext + exact congrArg (fun z : ↥(L.filter fun k => k.1 = l.val.1) => z.val) huv + exact (Nat.card_le_card_of_injective g hg).trans + (by simpa only [Nat.card_eq_finsetCard] using hR l.val.1) + simpa only [Nat.card_eq_finsetCard] using natCard_le_mul_of_fibers f R hf + +theorem card_concurrent_le (L : Finset (AffineLine F)) (R : ℕ) + (hR : ∀ p : ProjectivePoint F, + (L.filter fun l => ProjectiveIncidence p (some l)).card ≤ R) : + Nat.card {u : Fin 3 ↪ ↥L // Concurrent u} ≤ + L.card.descFactorial 2 * R := by + classical + let A := {u : Fin 3 ↪ ↥L // Concurrent u} + let f : A → (Fin 2 ↪ ↥L) := fun u => firstPair u.val + have hf : ∀ e, Nat.card {u : A // f u = e} ≤ R := by + intro e + let g : {u : A // f u = e} → + ↥(L.filter fun l => ProjectiveIncidence (pairMeet e) (some l)) := + fun u => ⟨(u.val.val 2).val, by + refine Finset.mem_filter.mpr ⟨(u.val.val 2).property, ?_⟩ + obtain ⟨p, hp⟩ := u.val.property + have h0 : u.val.val 0 = e 0 := + congrArg (fun b : Fin 2 ↪ ↥L => b 0) u.property + have h1 : u.val.val 1 = e 1 := + congrArg (fun b : Fin 2 ↪ ↥L => b 1) u.property + have heq : p = pairMeet e := eq_pairMeet e + (by rw [← h0]; exact hp 0) (by rw [← h1]; exact hp 1) + exact heq ▸ hp 2⟩ + have hg : Function.Injective g := by + intro u v huv + have he : firstPair u.val.val = firstPair v.val.val := + u.property.trans v.property.symm + apply Subtype.ext + apply Subtype.ext + apply Function.Embedding.ext + intro i + fin_cases i + · exact congrArg (fun b : Fin 2 ↪ ↥L => b 0) he + · exact congrArg (fun b : Fin 2 ↪ ↥L => b 1) he + · apply Subtype.ext + exact congrArg (fun z : + ↥(L.filter fun l => ProjectiveIncidence (pairMeet e) (some l)) => z.val) huv + exact (Nat.card_le_card_of_injective g hg).trans + (by simpa only [Nat.card_eq_finsetCard] using hR (pairMeet e)) + simpa only [natCard_embeddings, Nat.card_fin, Nat.card_eq_finsetCard] using + natCard_le_mul_of_fibers f R hf + +private theorem prob_le_of_card + {Ω : Type*} [Fintype Ω] (k R : ℕ) + (hle : Nat.card (Fin (k + 1)) ≤ Nat.card Ω) + (P : (Fin (k + 1) ↪ Ω) → Prop) + (hcard : Nat.card {u : Fin (k + 1) ↪ Ω // P u} ≤ + (Nat.card Ω).descFactorial k * R) : + (law (Fin (k + 1)) Ω hle).prob P ≤ + (R : ℝ) / ((Nat.card Ω - k : ℕ) : ℝ) := by + have hk : k ≤ Nat.card Ω := by + have h := hle + rw [Nat.card_fin] at h + omega + have hn : ((Nat.card Ω).descFactorial k : ℝ) ≠ 0 := + Nat.cast_ne_zero.mpr (Nat.descFactorial_pos.mpr hk).ne' + rw [law_prob, Nat.card_fin] + calc + _ ≤ (((Nat.card Ω).descFactorial k * R : ℕ) : ℝ) / + ((Nat.card Ω).descFactorial (k + 1) : ℝ) := + div_le_div_of_nonneg_right (by exact_mod_cast hcard) (Nat.cast_nonneg _) + _ = (R : ℝ) / ((Nat.card Ω - k : ℕ) : ℝ) := by + rw [Nat.descFactorial_succ, Nat.cast_mul, Nat.cast_mul] + rw [mul_comm (((Nat.card Ω - k : ℕ) : ℝ)) + (((Nat.card Ω).descFactorial k : ℝ))] + exact mul_div_mul_left _ _ hn + +theorem prob_sameDirection_le (L : Finset (AffineLine F)) (R : ℕ) + (hL : 2 ≤ L.card) + (hR : ∀ d : Direction F, (L.filter fun l => l.1 = d).card ≤ R) : + (law (Fin 2) ↥L (by simpa using hL)).prob SameDirection ≤ + (R : ℝ) / ((L.card - 1 : ℕ) : ℝ) := by + have hcard : Nat.card {u : Fin 2 ↪ ↥L // SameDirection u} ≤ + (Nat.card ↥L).descFactorial 1 * R := by + simpa only [Nat.card_eq_finsetCard, Nat.descFactorial_one] using + card_sameDirection_le L R hR + simpa only [Nat.card_eq_finsetCard] using + prob_le_of_card (Ω := ↥L) 1 R (by simpa using hL) SameDirection hcard + +theorem prob_concurrent_le (L : Finset (AffineLine F)) (R : ℕ) + (hL : 3 ≤ L.card) + (hR : ∀ p : ProjectivePoint F, + (L.filter fun l => ProjectiveIncidence p (some l)).card ≤ R) : + (law (Fin 3) ↥L (by simpa using hL)).prob Concurrent ≤ + (R : ℝ) / ((L.card - 2 : ℕ) : ℝ) := by + have hcard : Nat.card {u : Fin 3 ↪ ↥L // Concurrent u} ≤ + (Nat.card ↥L).descFactorial 2 * R := by + simpa only [Nat.card_eq_finsetCard] using card_concurrent_le L R hR + simpa only [Nat.card_eq_finsetCard] using + prob_le_of_card (Ω := ↥L) 2 R (by simpa using hL) Concurrent hcard + +theorem prob_exists_restrict_le + {I Ω : Type*} [Fintype I] [Fintype Ω] (k : ℕ) + (hI : Nat.card I ≤ Nat.card Ω) (hk : Nat.card (Fin k) ≤ Nat.card Ω) + (P : (Fin k ↪ Ω) → Prop) (B : ℝ) + (hP : (law (Fin k) Ω hk).prob P ≤ B) : + (law I Ω hI).prob (fun u => ∃ j : Fin k ↪ I, P (restrict j u)) ≤ + ((Nat.card I).descFactorial k : ℝ) * B := by + classical + calc + _ ≤ ∑ j : Fin k ↪ I, (law I Ω hI).prob (fun u => P (restrict j u)) := + FiniteLaw.prob_exists_le _ _ + _ = ∑ _j : Fin k ↪ I, (law (Fin k) Ω hk).prob P := by + apply Finset.sum_congr rfl + intro j _ + exact prob_law_restrict j hI hk P + _ ≤ ∑ _j : Fin k ↪ I, B := Finset.sum_le_sum (fun _ _ => hP) + _ = ((Nat.card I).descFactorial k : ℝ) * B := by + simp only [Finset.sum_const, Finset.card_univ, nsmul_eq_mul, + Fintype.card_embedding_eq, Fintype.card_fin, Nat.card_eq_fintype_card] + +def AnyParallel {I : Type*} {L : Finset (AffineLine F)} (u : I ↪ ↥L) : Prop := + ∃ j : Fin 2 ↪ I, SameDirection (restrict j u) + +def AnyConcurrent {I : Type*} {L : Finset (AffineLine F)} (u : I ↪ ↥L) : Prop := + ∃ j : Fin 3 ↪ I, Concurrent (restrict j u) + +theorem anyParallel_iff {I : Type*} {L : Finset (AffineLine F)} (u : I ↪ ↥L) : + AnyParallel u ↔ ∃ i j, i ≠ j ∧ (u i).val.1 = (u j).val.1 := let _ := instFieldF; let _ := instDecidableEqF; by + classical + constructor + · rintro ⟨j, hj⟩ + exact ⟨j 0, j 1, fun h => (by decide : (0 : Fin 2) ≠ 1) (j.injective h), hj⟩ + · rintro ⟨i, j, hij, hdir⟩ + let e : Fin 2 ↪ I := + { toFun := ![i, j] + inj' := by + intro a b hab + fin_cases a <;> fin_cases b <;> simp_all } + exact ⟨e, hdir⟩ + +theorem anyConcurrent_iff {I : Type*} {L : Finset (AffineLine F)} (u : I ↪ ↥L) : + AnyConcurrent u ↔ ∃ i j k, i ≠ j ∧ i ≠ k ∧ j ≠ k ∧ + ∃ p : ProjectivePoint F, + ProjectiveIncidence p (some (u i).val) ∧ + ProjectiveIncidence p (some (u j).val) ∧ + ProjectiveIncidence p (some (u k).val) := let _ := instDecidableEqF; by + classical + constructor + · rintro ⟨j, p, hp⟩ + refine ⟨j 0, j 1, j 2, ?_, ?_, ?_, p, hp 0, hp 1, hp 2⟩ + · exact fun h => (by decide : (0 : Fin 3) ≠ 1) (j.injective h) + · exact fun h => (by decide : (0 : Fin 3) ≠ 2) (j.injective h) + · exact fun h => (by decide : (1 : Fin 3) ≠ 2) (j.injective h) + · rintro ⟨i, j, k, hij, hik, hjk, p, hi, hj, hk⟩ + let e : Fin 3 ↪ I := + { toFun := ![i, j, k] + inj' := by + intro a b hab + fin_cases a <;> fin_cases b <;> simp_all } + refine ⟨e, p, ?_⟩ + intro a + fin_cases a + · exact hi + · exact hj + · exact hk + +theorem prob_anyParallel_le {I : Type*} [Fintype I] + (L : Finset (AffineLine F)) (R : ℕ) + (hI : Nat.card I ≤ Nat.card ↥L) (hL : 2 ≤ L.card) + (hR : ∀ d : Direction F, (L.filter fun l => l.1 = d).card ≤ R) : + (law I ↥L hI).prob AnyParallel ≤ + ((Nat.card I).descFactorial 2 : ℝ) * R / ((L.card - 1 : ℕ) : ℝ) := by + have hevent : (AnyParallel : (I ↪ ↥L) → Prop) = + (fun u => ∃ j : Fin 2 ↪ I, SameDirection (restrict j u)) := by + funext u + rfl + rw [hevent] + simpa only [mul_div_assoc] using + prob_exists_restrict_le 2 hI (by simpa using hL) SameDirection + ((R : ℝ) / ((L.card - 1 : ℕ) : ℝ)) (prob_sameDirection_le L R hL hR) + +theorem prob_anyConcurrent_le {I : Type*} [Fintype I] + (L : Finset (AffineLine F)) (R : ℕ) + (hI : Nat.card I ≤ Nat.card ↥L) (hL : 3 ≤ L.card) + (hR : ∀ p : ProjectivePoint F, + (L.filter fun l => ProjectiveIncidence p (some l)).card ≤ R) : + (law I ↥L hI).prob AnyConcurrent ≤ + ((Nat.card I).descFactorial 3 : ℝ) * R / ((L.card - 2 : ℕ) : ℝ) := by + have hevent : (AnyConcurrent : (I ↪ ↥L) → Prop) = + (fun u => ∃ j : Fin 3 ↪ I, Concurrent (restrict j u)) := by + funext u + rfl + rw [hevent] + simpa only [mul_div_assoc] using + prob_exists_restrict_le 3 hI (by simpa using hL) Concurrent + ((R : ℝ) / ((L.card - 2 : ℕ) : ℝ)) (prob_concurrent_le L R hL hR) + +theorem prob_tuple_parallel_le (L : Finset (AffineLine F)) (t R : ℕ) + (ht : 2 * t ≤ L.card) (hL : 2 ≤ L.card) + (hR : ∀ d : Direction F, (L.filter fun l => l.1 = d).card ≤ R) : + (law (Fin t ⊕ Fin t) ↥L (by simpa [Nat.card_sum, two_mul] using ht)).prob + AnyParallel ≤ + ((2 * t).descFactorial 2 : ℝ) * R / ((L.card - 1 : ℕ) : ℝ) := by + simpa only [Nat.card_sum, Nat.card_fin, ← two_mul] using + prob_anyParallel_le (I := Fin t ⊕ Fin t) L R + (by simpa [Nat.card_sum, two_mul] using ht) hL hR + +theorem prob_tuple_concurrent_le (L : Finset (AffineLine F)) (t R : ℕ) + (ht : 2 * t ≤ L.card) (hL : 3 ≤ L.card) + (hR : ∀ p : ProjectivePoint F, + (L.filter fun l => ProjectiveIncidence p (some l)).card ≤ R) : + (law (Fin t ⊕ Fin t) ↥L (by simpa [Nat.card_sum, two_mul] using ht)).prob + AnyConcurrent ≤ + ((2 * t).descFactorial 3 : ℝ) * R / ((L.card - 2 : ℕ) : ℝ) := by + simpa only [Nat.card_sum, Nat.card_fin, ← two_mul] using + prob_anyConcurrent_le (I := Fin t ⊕ Fin t) L R + (by simpa [Nat.card_sum, two_mul] using ht) hL hR + +end RyserCoveringCounterexample.LineCover.LowDegeneracy + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/LowOccupancy.lean b/lean/OAI/Combinatorics/Ryser/LineCover/LowOccupancy.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc1f970a8007fb23d6c0f54fffb335faa78e0908 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/LowOccupancy.lean @@ -0,0 +1,218 @@ +import OAI.Combinatorics.Ryser.LineCover.PairSampling +import OAI.Combinatorics.Ryser.LineCover.SamplingDefinitions +import OAI.Combinatorics.Ryser.LineCover.DisjointPairs +import OAI.Combinatorics.Ryser.Geometry.ProjectiveJoins +import Mathlib.Algebra.BigOperators.Group.Finset.Basic + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable +open scoped BigOperators + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + +def shapePairs (L : Finset (AffineLine F)) (S : Finset (Point F)) : + Finset (↥L × ↥L) := + Finset.univ.filter fun p => + p.1 ≠ p.2 ∧ S ≠ linePoints p.1.val ∧ S ≠ linePoints p.2.val ∧ + ∃ x ∈ S, Incidence x p.1.val ∧ Incidence x p.2.val + +@[simp] theorem mem_shapePairs (L : Finset (AffineLine F)) + (S : Finset (Point F)) (p : ↥L × ↥L) : + p ∈ shapePairs L S ↔ + p.1 ≠ p.2 ∧ S ≠ linePoints p.1.val ∧ S ≠ linePoints p.2.val ∧ + ∃ x ∈ S, Incidence x p.1.val ∧ Incidence x p.2.val := by + simp only [shapePairs, Finset.mem_filter, Finset.mem_univ, true_and] + +theorem card_shapePairs_le + (shapes : Finset (Finset (Point F))) (L : Finset (AffineLine F)) + {D R : ℕ} (hSparse : SparseShapes shapes D) + (hR : ∀ p : ProjectivePoint F, (coverPencil L p).card ≤ R) + {S : Finset (Point F)} (hS : S ∈ shapes) : + (shapePairs L S).card ≤ L.card * D * R := by + classical + have hfiber (a : ↥L) : + ((shapePairs L S).filter fun p => p.1 = a).card ≤ D * R := by + by_cases ha : S = linePoints a.val + · have hempty : (shapePairs L S).filter (fun p => p.1 = a) = ∅ := by + apply Finset.filter_eq_empty_iff.mpr + intro p hp hpa + have hne := ((mem_shapePairs L S p).mp hp).2.1 + apply hne + simpa only [hpa] using ha + simp only [hempty, Finset.card_empty, Nat.zero_le] + · let C := S ∩ linePoints a.val + let pool := C.biUnion fun x => coverPencil L (Sum.inl x) + calc + ((shapePairs L S).filter fun p => p.1 = a).card ≤ pool.card := by + apply Finset.card_le_card_of_injOn (fun p : ↥L × ↥L => p.2.val) + · intro p hp + have hpa := (Finset.mem_filter.mp hp).2 + obtain ⟨_, _, _, x, hx, hfirst, hsecond⟩ := + (mem_shapePairs L S p).mp (Finset.mem_filter.mp hp).1 + apply Finset.mem_biUnion.mpr + refine ⟨x, Finset.mem_inter.mpr ⟨hx, ?_⟩, ?_⟩ + · apply (mem_linePoints x a.val).mpr + simpa only [hpa] using hfirst + · exact (mem_coverPencil L (Sum.inl x) p.2.val).mpr + ⟨p.2.property, hsecond⟩ + · intro p hp q hq hpq + apply Prod.ext + · exact (Finset.mem_filter.mp hp).2.trans + (Finset.mem_filter.mp hq).2.symm + · exact Subtype.ext hpq + _ ≤ ∑ x ∈ C, (coverPencil L (Sum.inl x)).card := + Finset.card_biUnion_le + _ ≤ ∑ _x ∈ C, R := Finset.sum_le_sum fun x _ => hR (Sum.inl x) + _ = C.card * R := by simp only [Finset.sum_const, Nat.nsmul_eq_mul] + _ ≤ D * R := Nat.mul_le_mul_right R (hSparse S hS a.val ha) + calc + (shapePairs L S).card = + ∑ a : ↥L, ((shapePairs L S).filter fun p => p.1 = a).card := + Finset.card_eq_sum_card_fiberwise + (s := shapePairs L S) (t := Finset.univ) (f := Prod.fst) + (fun _ _ => Finset.mem_univ _) + _ ≤ ∑ _a : ↥L, D * R := Finset.sum_le_sum fun a _ => hfiber a + _ = L.card * D * R := by + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_coe, + Nat.nsmul_eq_mul, Nat.mul_assoc] + +theorem shape_ne_linePoints_of_not_mem_tupleShapes + {t : ℕ} (a : LineTuple F t) {S : Finset (Point F)} + (hS : S ∉ tupleShapes a) (slot : Fin t ⊕ Fin t) : + S ≠ linePoints (a slot) := by + intro heq + exact hS ((mem_tupleShapes a S).mpr ⟨slot, heq.symm⟩) + +theorem exists_disjoint_shapePairs_of_occupancy + (shapes : Finset (Finset (Point F))) (L : Finset (AffineLine F)) + {D h t : ℕ} (hSparse : SparseShapes shapes D) + {S : Finset (Point F)} (hS : S ∈ shapes) (u : CoverSample L t) + (hnot : S ∉ tupleShapes (liftSample L u)) + (hlarge : 2 * D * h < (S ∩ crossPoints (liftSample L u)).card) : + ∃ left right : Fin h ↪ Fin t, ∀ k, + (u (Sum.inl (left k)), u (Sum.inr (right k))) ∈ shapePairs L S := by + classical + let a := liftSample L u + let C := S ∩ crossPoints a + have hrepr (x : ↥C) : ∃ i j : Fin t, + Incidence x.val (a (Sum.inl i)) ∧ Incidence x.val (a (Sum.inr j)) := + (mem_crossPoints a x.val).mp (Finset.mem_inter.mp x.property).2 + let left : ↥C → Fin t := fun x => Classical.choose (hrepr x) + let right : ↥C → Fin t := + fun x => Classical.choose (Classical.choose_spec (hrepr x)) + have hinc (x : ↥C) : + Incidence x.val (a (Sum.inl (left x))) ∧ + Incidence x.val (a (Sum.inr (right x))) := + Classical.choose_spec (Classical.choose_spec (hrepr x)) + have hne (slot : Fin t ⊕ Fin t) : S ≠ linePoints (a slot) := + shape_ne_linePoints_of_not_mem_tupleShapes a hnot slot + have hfiber (coord : ↥C → Fin t) (side : Fin t → Fin t ⊕ Fin t) + (hcoord : ∀ x : ↥C, Incidence x.val (a (side (coord x)))) (i : Fin t) : + ((Finset.univ : Finset ↥C).filter fun x => coord x = i).card ≤ D := by + calc + _ ≤ (S ∩ linePoints (a (side i))).card := by + apply Finset.card_le_card_of_injOn (fun x : ↥C => x.val) + · intro x hx + refine Finset.mem_inter.mpr ⟨(Finset.mem_inter.mp x.property).1, ?_⟩ + apply (mem_linePoints x.val (a (side i))).mpr + simpa only [(Finset.mem_filter.mp hx).2] using hcoord x + · intro x _ y _ hxy + exact Subtype.ext hxy + _ ≤ D := hSparse S hS (a (side i)) (hne (side i)) + have hlarge' : 2 * D * h < (Finset.univ : Finset ↥C).card := by + simpa only [Finset.card_univ, Fintype.card_coe] using hlarge + obtain ⟨e, hleft, hright⟩ := exists_disjoint_coordinate_sample + (Finset.univ : Finset ↥C) left right D h + (hfiber left Sum.inl (fun x => (hinc x).1)) + (hfiber right Sum.inr (fun x => (hinc x).2)) hlarge' + let i : Fin h ↪ Fin t := ⟨fun k => left (e k).val, hleft⟩ + let j : Fin h ↪ Fin t := ⟨fun k => right (e k).val, hright⟩ + refine ⟨i, j, ?_⟩ + intro k + let x : ↥C := (e k).val + apply (mem_shapePairs L S _).mpr + refine ⟨?_, hne (Sum.inl (i k)), hne (Sum.inr (j k)), + x.val, (Finset.mem_inter.mp x.property).1, (hinc x).1, (hinc x).2⟩ + intro heq + have hslots := u.injective heq + cases hslots + +theorem prob_shape_occupancy_le + (shapes : Finset (Finset (Point F))) (L : Finset (AffineLine F)) + {D R h t : ℕ} [Nonempty (CoverSample L t)] + (hSparse : SparseShapes shapes D) + (hR : ∀ p : ProjectivePoint F, (coverPencil L p).card ≤ R) + {S : Finset (Point F)} (hS : S ∈ shapes) : + (FiniteLaw.uniform (CoverSample L t)).prob (fun u => + S ∉ tupleShapes (liftSample L u) ∧ + 2 * D * h < (S ∩ crossPoints (liftSample L u)).card) ≤ + (t : ℝ) ^ (2 * h) * ((L.card * D * R : ℕ) : ℝ) ^ h / + (L.card.descFactorial (2 * h) : ℝ) := by + classical + let μ := FiniteLaw.uniform (CoverSample L t) + have hcard : ((shapePairs L S).card : ℝ) ≤ ((L.card * D * R : ℕ) : ℝ) := + Nat.cast_le.mpr (card_shapePairs_le shapes L hSparse hR hS) + calc + _ ≤ μ.prob (fun u => ∃ left right : Fin h ↪ Fin t, ∀ k, + (u (Sum.inl (left k)), u (Sum.inr (right k))) ∈ shapePairs L S) := by + apply μ.prob_mono + intro u hu + exact exists_disjoint_shapePairs_of_occupancy shapes L hSparse hS u hu.1 hu.2 + _ ≤ (t : ℝ) ^ (2 * h) * ((shapePairs L S).card : ℝ) ^ h / + (L.card.descFactorial (2 * h) : ℝ) := by + simpa only [Fintype.card_coe] using + (InjectionSampling.prob_exists_disjoint_pairs_le + (h := h) (t := t) (shapePairs L S)) + _ ≤ _ := by + apply div_le_div_of_nonneg_right _ (Nat.cast_nonneg _) + exact mul_le_mul_of_nonneg_left + (pow_le_pow_left₀ (Nat.cast_nonneg _) hcard h) + (pow_nonneg (Nat.cast_nonneg _) (2 * h)) + +theorem prob_bad_occupancy_le + (shapes : Finset (Finset (Point F))) (L : Finset (AffineLine F)) + {D R h t : ℕ} [Nonempty (CoverSample L t)] + (hSparse : SparseShapes shapes D) + (hR : ∀ p : ProjectivePoint F, (coverPencil L p).card ≤ R) : + (FiniteLaw.uniform (CoverSample L t)).prob (fun u => + ∃ S ∈ shapes, S ∉ tupleShapes (liftSample L u) ∧ + 2 * D * h < (S ∩ crossPoints (liftSample L u)).card) ≤ + (shapes.card : ℝ) * (t : ℝ) ^ (2 * h) * ((L.card * D * R : ℕ) : ℝ) ^ h / + (L.card.descFactorial (2 * h) : ℝ) := by + classical + let μ := FiniteLaw.uniform (CoverSample L t) + calc + _ = μ.prob (fun u => ∃ S : ↥shapes, + S.val ∉ tupleShapes (liftSample L u) ∧ + 2 * D * h < (S.val ∩ crossPoints (liftSample L u)).card) := by + congr 1 + funext u + apply propext + constructor + · rintro ⟨S, hS, hbad⟩ + exact ⟨⟨S, hS⟩, hbad⟩ + · rintro ⟨S, hbad⟩ + exact ⟨S.val, S.property, hbad⟩ + _ ≤ ∑ S : ↥shapes, μ.prob (fun u => + S.val ∉ tupleShapes (liftSample L u) ∧ + 2 * D * h < (S.val ∩ crossPoints (liftSample L u)).card) := + μ.prob_exists_le _ + _ ≤ ∑ _S : ↥shapes, + (t : ℝ) ^ (2 * h) * ((L.card * D * R : ℕ) : ℝ) ^ h / + (L.card.descFactorial (2 * h) : ℝ) := by + apply Finset.sum_le_sum + intro S _ + exact prob_shape_occupancy_le shapes L hSparse hR S.property + _ = _ := by + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_coe, nsmul_eq_mul] + ring + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/Main.lean b/lean/OAI/Combinatorics/Ryser/LineCover/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..1baa87f7a56b4638d5dffeed08c6df82f7bb4af9 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/Main.lean @@ -0,0 +1,100 @@ +import OAI.Combinatorics.Ryser.LineCover.Rigidity + +namespace OAI + +open Filter Topology +open scoped Classical +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +universe u + +def linecoverFailureBound (D : ℕ) (δ A q : ℝ) : ℝ := + 2 * (1 + q * (q + 1)) * + Real.exp (-q ^ (2 * (Incidence.savingExponent / 10)) / (16 * (D : ℝ) ^ 5)) + + 2 * (q * (q + 1)) ^ (2 * logarithmicSampleSize A q) * + Real.exp (-tupleTailConstant D (10 * (D + 1)) δ * + (logarithmicSampleSize A q : ℝ) ^ 2) + +theorem prob_not_goodLineCover_le + {F : Type*} [Field F] [Fintype F] [DecidableEq F] + {D : ℕ} {δ ρ A : ℝ} (process : DeletionProcess F D δ) + (hD : 0 < D) (hδ : 0 < δ) (hρ : 0 < ρ) + (hq : Incidence.incidenceThreshold ≤ Fintype.card F) + (hsub : Incidence.SmallProperSubfields F) + (params : RigidityParameters D δ ρ A Incidence.savingExponent (Fintype.card F)) : + process.law.prob (fun ω => ¬ GoodLineCover δ ρ ω) ≤ + linecoverFailureBound D δ A (Fintype.card F) := by + let h := 10 * (D + 1) + let t := logarithmicSampleSize A (Fintype.card F) + have hh : 0 < h := by dsimp [h]; omega + have ht : 0 < t := lt_of_lt_of_le hh params.h_t + have hε : 0 < Incidence.savingExponent / 10 := by + exact div_pos Incidence.savingExponent_pos (by norm_num) + have hεhalf : Incidence.savingExponent / 10 ≤ 1 / 2 := by + linarith [Incidence.savingExponent_lt_tenth] + have hcounts := process.prob_not_goodCounts (Incidence.savingExponent / 10) + (by omega : 1 ≤ D) hε hεhalf + have htuples := process.prob_not_goodTuples h t hD hh ht hδ + have hbad : process.law.prob (fun ω => ¬ GoodLineCover δ ρ ω) ≤ + process.law.prob (fun ω => + ¬ GoodCounts process (Incidence.savingExponent / 10) ω ∨ + ¬ GoodTuples process h t ω) := by + apply process.law.prob_mono + intro ω hnot + by_cases hc : GoodCounts process (Incidence.savingExponent / 10) ω + · right + intro htup + exact hnot (goodLineCover_of_goodCounts_goodTuples process hδ hρ hq hsub + params ω hc htup) + · exact Or.inl hc + exact hbad.trans ((process.law.prob_union_le _ _).trans (add_le_add hcounts htuples)) + +theorem tendsto_linecoverFailureBound (D : ℕ) {δ A : ℝ} + (hD : 0 < D) (hδ : 0 < δ) + (hA : 5 / tupleTailConstant D (10 * (D + 1)) δ < A) : + Tendsto (linecoverFailureBound D δ A) atTop (𝓝 0) := by + have hDr : 0 < (D : ℝ) := by exact_mod_cast hD + have hc0 := tupleTailConstant_pos hD + (show 0 < 10 * (D + 1) by omega) hδ + have hc := tendsto_count_failure_atTop hDr + (show 0 < Incidence.savingExponent / 10 from + div_pos Incidence.savingExponent_pos (by norm_num)) + have ht := tendsto_tuple_failure_atTop hc0 hA + unfold linecoverFailureBound + simpa only [add_zero] using hc.add ht + +theorem uniform_linecover_probability (D : ℕ) (δ ρ : ℝ) + (hD : 0 < D) (hδ : 0 < δ) (hρ : 0 < ρ) (η : ℝ) (hη : 0 < η) : + ∃ Q : ℕ, ∀ (F : Type u) [Field F] [Fintype F] [DecidableEq F], + Q ≤ Fintype.card F → Incidence.SmallProperSubfields F → + ∀ process : DeletionProcess F D δ, + 1 - η ≤ process.law.prob (GoodLineCover δ ρ) := by + let c0 := tupleTailConstant D (10 * (D + 1)) δ + have hc0 : 0 < c0 := tupleTailConstant_pos hD (by omega) hδ + let A := 6 / c0 + have hA : 0 < A := div_pos (by norm_num) hc0 + have hA5 : 5 / c0 < A := div_lt_div_of_pos_right (by norm_num) hc0 + have hnumeric := eventually_rigidityParameters D hδ hρ hA + Incidence.savingExponent_pos Incidence.savingExponent_lt_tenth.le + have hfailure : ∀ᶠ q : ℝ in atTop, linecoverFailureBound D δ A q ≤ η := + (tendsto_linecoverFailureBound D hD hδ hA5).eventually_le_const hη + obtain ⟨R, hR⟩ := Filter.eventually_atTop.mp (hnumeric.and hfailure) + refine ⟨max ⌈R⌉₊ Incidence.incidenceThreshold, ?_⟩ + intro F instField instFintype instDecidable hQ hsub process + have hRcard : R ≤ (Fintype.card F : ℝ) := + (Nat.le_ceil R).trans (by + exact_mod_cast (le_max_left ⌈R⌉₊ Incidence.incidenceThreshold).trans hQ) + have hq : Incidence.incidenceThreshold ≤ Fintype.card F := + (le_max_right ⌈R⌉₊ Incidence.incidenceThreshold).trans hQ + obtain ⟨params, hbound⟩ := hR (Fintype.card F) hRcard + have hprob := (prob_not_goodLineCover_le process hD hδ hρ hq hsub params).trans hbound + rw [process.law.prob_compl] at hprob + linarith + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/MaxConcurrency.lean b/lean/OAI/Combinatorics/Ryser/LineCover/MaxConcurrency.lean new file mode 100644 index 0000000000000000000000000000000000000000..8edbe2313033f8c3cad94e15915ad309e8230e02 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/MaxConcurrency.lean @@ -0,0 +1,87 @@ +import OAI.Combinatorics.Ryser.LineCover.Definitions +import Mathlib.Data.Finset.Max +import Mathlib.Basic.Real.Basic +import Mathlib.Tactic.Linarith + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + +theorem exists_max_coverPencil (L : Finset (AffineLine F)) : + ∃ p : ProjectivePoint F, ∀ r : ProjectivePoint F, + (coverPencil L r).card ≤ (coverPencil L p).card := by + obtain ⟨p, _, hp⟩ := Finset.exists_max_image + (Finset.univ : Finset (ProjectivePoint F)) + (fun p => (coverPencil L p).card) + ⟨Sum.inr none, Finset.mem_univ _⟩ + exact ⟨p, fun r => hp r (Finset.mem_univ r)⟩ + +def maxCenter (L : Finset (AffineLine F)) : ProjectivePoint F := + Classical.choose (exists_max_coverPencil L) + +def maxConcurrency (L : Finset (AffineLine F)) : ℕ := + (coverPencil L (maxCenter L)).card + +theorem coverPencil_card_le_maxConcurrency (L : Finset (AffineLine F)) + (p : ProjectivePoint F) : (coverPencil L p).card ≤ maxConcurrency L := + Classical.choose_spec (exists_max_coverPencil L) p + +theorem maxConcurrency_le_card (L : Finset (AffineLine F)) : + maxConcurrency L ≤ L.card := + Finset.card_le_card (coverPencil_subset L (maxCenter L)) + +theorem maxConcurrency_le_iff (L : Finset (AffineLine F)) (R : ℕ) : + maxConcurrency L ≤ R ↔ + ∀ p : ProjectivePoint F, (coverPencil L p).card ≤ R := by + constructor + · intro h p + exact (coverPencil_card_le_maxConcurrency L p).trans h + · intro h + exact h (maxCenter L) + +theorem maxConcurrency_dichotomy (L : Finset (AffineLine F)) (T : ℝ) : + (∀ p : ProjectivePoint F, ((coverPencil L p).card : ℝ) ≤ T) ∨ + ∃ p : ProjectivePoint F, + (∀ r : ProjectivePoint F, (coverPencil L r).card ≤ (coverPencil L p).card) ∧ + T < ((coverPencil L p).card : ℝ) := by + by_cases h : (maxConcurrency L : ℝ) ≤ T + · exact Or.inl fun p => + (Nat.cast_le.mpr (coverPencil_card_le_maxConcurrency L p)).trans h + · exact Or.inr ⟨maxCenter L, coverPencil_card_le_maxConcurrency L, lt_of_not_ge h⟩ + +theorem card_complement_add_card_coverPencil (L : Finset (AffineLine F)) + (p : ProjectivePoint F) : + (L \ coverPencil L p).card + (coverPencil L p).card = L.card := + Finset.card_sdiff_add_card_eq_card (coverPencil_subset L p) + +theorem complement_card_ge_half_of_count_bounds + (L : Finset (AffineLine F)) (p : ProjectivePoint F) (q ρ b δ : ℝ) + (hcount : q - b / (δ * q) ≤ (L.card : ℝ)) + (herror : b / (δ * q) ≤ ρ * q / 2) + (hp : ((coverPencil L p).card : ℝ) < (1 - ρ) * q) : + ρ * q / 2 ≤ ((L \ coverPencil L p).card : ℝ) := by + have hsum : ((L \ coverPencil L p).card : ℝ) + + ((coverPencil L p).card : ℝ) = (L.card : ℝ) := by + exact_mod_cast card_complement_add_card_coverPencil L p + nlinarith + +theorem complement_card_ge_half_of_no_large_pencil + (L : Finset (AffineLine F)) (q ρ b δ : ℝ) + (hcount : q - b / (δ * q) ≤ (L.card : ℝ)) + (herror : b / (δ * q) ≤ ρ * q / 2) + (hsmall : ∀ p : ProjectivePoint F, + ((coverPencil L p).card : ℝ) < (1 - ρ) * q) + (p : ProjectivePoint F) : + ρ * q / 2 ≤ ((L \ coverPencil L p).card : ℝ) := + complement_card_ge_half_of_count_bounds L p q ρ b δ hcount herror (hsmall p) + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/MeanCounts.lean b/lean/OAI/Combinatorics/Ryser/LineCover/MeanCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e7acf3edd21368dd62c105c279c262a2bf889b5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/MeanCounts.lean @@ -0,0 +1,132 @@ +import OAI.Combinatorics.Ryser.LineCover.Process +import OAI.Combinatorics.Ryser.LineCover.Deletion +import OAI.Combinatorics.Ryser.Geometry.Cardinality + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.LineCover.DeletionProcess + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + {D : ℕ} {δ : ℝ} (process : DeletionProcess F D δ) + +theorem expectation_base_count (test : Finset (Point F)) : + process.law.expectation (retainedCount ∅ test) = + process.survival * (test.card : ℝ) := by + change (FiniteLaw.pi process.trials).expectation (retainedCount ∅ test) = _ + rw [expectation_retainedCount] + simp_rw [process.uniformSurvival] + simp [mul_comm] + +theorem expectation_totalCount : + process.law.expectation + (retainedCount ∅ (Finset.univ : Finset (Point F))) = + process.survival * (Fintype.card F : ℝ) ^ 2 := by + rw [process.expectation_base_count] + simp only [Finset.card_univ, card_point, Nat.cast_pow] + +theorem expectation_survivorSet_card : + process.law.expectation (fun ω => ((process.survivorSet ω).card : ℝ)) = + process.survival * (Fintype.card F : ℝ) ^ 2 := by + have hcount : (fun ω : process.Config => ((process.survivorSet ω).card : ℝ)) = + (retainedCount ∅ Finset.univ : process.Config → ℝ) := by + funext ω + simp only [retainedCount, survivorSet, Finset.inter_univ] + rw [hcount] + exact process.expectation_totalCount + +theorem expectation_base_lineCount (l : AffineLine F) : + process.law.expectation (retainedCount ∅ (linePoints l)) = + process.survival * (Fintype.card F : ℝ) := by + simpa only [card_linePoints] using process.expectation_base_count (linePoints l) + +theorem prob_selected_line_le (l : AffineLine F) : + process.law.prob (fun ω => linePoints l ∈ selected ω) ≤ + (D : ℝ) / (Fintype.card F : ℝ) := by + change (FiniteLaw.pi process.trials).prob + (fun ω => linePoints l ∈ selected ω) ≤ _ + calc + _ = (FiniteLaw.pi process.trials).prob + (fun ω => ∃ i, ∃ S ∈ (ω i).val, S.val = linePoints l) := by + congr 1 + funext ω + exact propext mem_selected + _ ≤ ∑ i, (FiniteLaw.pi process.trials).prob + (fun ω => ∃ S ∈ (ω i).val, S.val = linePoints l) := + FiniteLaw.prob_exists_le (FiniteLaw.pi process.trials) + (fun i ω => ∃ S ∈ (ω i).val, S.val = linePoints l) + _ = ∑ i, (process.trials i).prob + (fun a => ∃ S ∈ a.val, S.val = linePoints l) := by + apply Finset.sum_congr rfl + intro i _ + exact FiniteLaw.prob_pi_coordinate process.trials i + (fun a => ∃ S ∈ a.val, S.val = linePoints l) + _ ≤ (D : ℝ) / (Fintype.card F : ℝ) := process.lineCap l + +theorem mem_ignored_line_survivors_imp (l : AffineLine F) + (ω : process.Config) (x : Point F) + (hx : x ∈ survivors {linePoints l} ω) : + x ∈ survivors ∅ ω ∨ linePoints l ∈ selected ω := by + by_cases hselected : linePoints l ∈ selected ω + · exact Or.inr hselected + · left + have heq := survivors_insert_eq_of_not_selected + (ignore := ∅) (ω := ω) hselected + simp only [Finset.insert_empty] at heq + exact heq ▸ hx + +theorem prob_mem_ignored_line_le (l : AffineLine F) (x : Point F) : + process.law.prob (fun ω => x ∈ survivors {linePoints l} ω) ≤ + process.survival + (D : ℝ) / (Fintype.card F : ℝ) := by + calc + _ ≤ process.law.prob + (fun ω => x ∈ survivors ∅ ω ∨ linePoints l ∈ selected ω) := + process.law.prob_mono + (fun ω hx => process.mem_ignored_line_survivors_imp l ω x hx) + _ ≤ process.law.prob (fun ω => x ∈ survivors ∅ ω) + + process.law.prob (fun ω => linePoints l ∈ selected ω) := + process.law.prob_union_le _ _ + _ ≤ process.survival + (D : ℝ) / (Fintype.card F : ℝ) := + add_le_add (process.uniformSurvival x).le (process.prob_selected_line_le l) + +theorem expectation_ignored_lineCount_bounds (l : AffineLine F) : + process.survival * (Fintype.card F : ℝ) ≤ + process.law.expectation (retainedCount {linePoints l} (linePoints l)) ∧ + process.law.expectation (retainedCount {linePoints l} (linePoints l)) ≤ + process.survival * (Fintype.card F : ℝ) + (D : ℝ) := by + constructor + · rw [← process.expectation_base_lineCount l] + apply process.law.expectation_mono + intro ω + change ((survivors ∅ ω ∩ linePoints l).card : ℝ) ≤ + ((survivors {linePoints l} ω ∩ linePoints l).card : ℝ) + apply Nat.cast_le.mpr + apply Finset.card_le_card + intro x hx + rcases Finset.mem_inter.mp hx with ⟨hs, hl⟩ + exact Finset.mem_inter.mpr + ⟨survivors_mono_ignore (Finset.empty_subset {linePoints l}) ω hs, hl⟩ + · change (FiniteLaw.pi process.trials).expectation + (retainedCount {linePoints l} (linePoints l)) ≤ _ + rw [expectation_retainedCount] + calc + _ ≤ ∑ _x ∈ linePoints l, + (process.survival + (D : ℝ) / (Fintype.card F : ℝ)) := + Finset.sum_le_sum fun x _ => process.prob_mem_ignored_line_le l x + _ = (Fintype.card F : ℝ) * + (process.survival + (D : ℝ) / (Fintype.card F : ℝ)) := by + simp only [Finset.sum_const, nsmul_eq_mul, card_linePoints] + _ = process.survival * (Fintype.card F : ℝ) + (D : ℝ) := by + have hq : (Fintype.card F : ℝ) ≠ 0 := by + exact_mod_cast (Fintype.card_ne_zero (α := F)) + rw [mul_add, mul_div_cancel₀ (D : ℝ) hq, + mul_comm (Fintype.card F : ℝ) process.survival] + +end RyserCoveringCounterexample.LineCover.DeletionProcess + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/Overlap.lean b/lean/OAI/Combinatorics/Ryser/LineCover/Overlap.lean new file mode 100644 index 0000000000000000000000000000000000000000..43662cff5c3da55bb13a8101ef717dc728554694 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/Overlap.lean @@ -0,0 +1,158 @@ +import Mathlib.Basic.Real.Basic +import Mathlib.Data.Finset.Card +import Mathlib.Algebra.BigOperators.Ring.Finset +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Tactic.Linarith + +namespace OAI + +open scoped BigOperators Classical +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +variable {P Λ : Type*} [instDecidableEqP : DecidableEq P] [instDecidableEqΛ : DecidableEq Λ] + +def multiplicity (I : P → Λ → Prop) (L : Finset Λ) (x : P) : ℕ := + (L.filter (I x)).card + +def coveredPoints (I : P → Λ → Prop) (X : Finset P) (L : Finset Λ) : Finset P := + X.filter fun x => 0 < multiplicity I L x + +def overlapExcess (I : P → Λ → Prop) (X : Finset P) (L : Finset Λ) : ℕ := + ∑ x ∈ X, (multiplicity I L x - 1) + +def orderedPairMass (I : P → Λ → Prop) (X : Finset P) (L : Finset Λ) : ℕ := + ∑ x ∈ X, multiplicity I L x * (multiplicity I L x - 1) + +def heavyPoints (I : P → Λ → Prop) (X : Finset P) (L : Finset Λ) (T : ℝ) : + Finset P := X.filter fun x => T ≤ (multiplicity I L x : ℝ) + +theorem incidence_double_count (I : P → Λ → Prop) (X : Finset P) (L : Finset Λ) : + (∑ l ∈ L, (X.filter fun x => I x l).card) = + ∑ x ∈ X, multiplicity I L x := let _ := instDecidableEqP; let _ := instDecidableEqΛ; by + simp only [multiplicity, Finset.card_eq_sum_ones, Finset.sum_filter] + exact Finset.sum_comm + +theorem sum_multiplicity_eq_covered_add_excess + (I : P → Λ → Prop) (X : Finset P) (L : Finset Λ) : + (∑ x ∈ X, multiplicity I L x) = + (coveredPoints I X L).card + overlapExcess I X L := let _ := instDecidableEqP; let _ := instDecidableEqΛ; by + calc + _ = ∑ x ∈ X, ((if 0 < multiplicity I L x then 1 else 0) + + (multiplicity I L x - 1)) := by + apply Finset.sum_congr rfl + intro x hx + cases h : multiplicity I L x with + | zero => simp + | succ n => simp [Nat.add_comm] + _ = _ := by + rw [Finset.sum_add_distrib, Finset.sum_boole] + rfl + +theorem incidence_eq_covered_add_excess + (I : P → Λ → Prop) (X : Finset P) (L : Finset Λ) : + (∑ l ∈ L, (X.filter fun x => I x l).card) = + (coveredPoints I X L).card + overlapExcess I X L := by + rw [incidence_double_count, sum_multiplicity_eq_covered_add_excess] + +theorem covered_add_uncovered_card + (I : P → Λ → Prop) (X : Finset P) (L : Finset Λ) : + (coveredPoints I X L).card + (X \ coveredPoints I X L).card = X.card := let _ := instDecidableEqΛ; by + rw [Nat.add_comm] + exact Finset.card_sdiff_add_card_eq_card (Finset.filter_subset _ _) + +theorem cover_count_bounds + (I : P → Λ → Prop) (X : Finset P) (L : Finset Λ) + (d q e0 e1 b δ : ℝ) + (hδ : 0 < δ) (hd : δ ≤ d) (hq : 0 < q) (he1 : 0 ≤ e1) + (hsize : d * q ^ 2 - e0 ≤ (X.card : ℝ)) + (hline : ∀ l ∈ L, ((X.filter fun x => I x l).card : ℝ) ≤ d * q + e1) + (huncovered : ((X \ coveredPoints I X L).card : ℝ) ≤ b) + (hcard : (L.card : ℝ) ≤ q) : + (overlapExcess I X L : ℝ) ≤ e0 + q * e1 + b ∧ + q - (L.card : ℝ) ≤ (e0 + q * e1 + b) / (δ * q) := by + let N : ℝ := X.card + let M : ℝ := L.card + let C : ℝ := (coveredPoints I X L).card + let U : ℝ := (X \ coveredPoints I X L).card + let E : ℝ := overlapExcess I X L + let J : ℝ := ∑ l ∈ L, ((X.filter fun x => I x l).card : ℝ) + have hcount : J = C + E := by + dsimp [J, C, E] + exact_mod_cast incidence_eq_covered_add_excess I X L + have hpartition : C + U = N := by + dsimp [C, U, N] + exact_mod_cast covered_add_uncovered_card I X L + have hupper : J ≤ M * (d * q + e1) := by + calc + J ≤ ∑ _l ∈ L, (d * q + e1) := Finset.sum_le_sum hline + _ = _ := by simp [M] + have hcap : 0 ≤ d * q + e1 := + add_nonneg (mul_nonneg (hδ.le.trans hd) hq.le) he1 + have hupperQ := hupper.trans (mul_le_mul_of_nonneg_right hcard hcap) + have hE0 : 0 ≤ E := Nat.cast_nonneg _ + have hmerr : M * e1 ≤ q * e1 := mul_le_mul_of_nonneg_right hcard he1 + have hN : d * q ^ 2 - e0 ≤ N := hsize + have hU : U ≤ b := huncovered + have hM : M ≤ q := hcard + have hEbound : E ≤ e0 + q * e1 + b := by + nlinarith [hupperQ, hcount, hpartition, hN, hU] + have hgap : d * q * (q - M) ≤ e0 + q * e1 + b := by + nlinarith [hupper, hcount, hpartition, hN, hU, hE0, hmerr] + have hscale : δ * q * (q - M) ≤ d * q * (q - M) := + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hd hq.le) + (sub_nonneg.mpr hM) + refine ⟨hEbound, ?_⟩ + apply (le_div_iff₀ (mul_pos hδ hq)).2 + simpa only [mul_comm] using hscale.trans hgap + +theorem heavyPoints_card_mul_le_excess + (I : P → Λ → Prop) (X : Finset P) (L : Finset Λ) (T : ℝ) (hT : 1 < T) : + ((heavyPoints I X L T).card : ℝ) * (T - 1) ≤ (overlapExcess I X L : ℝ) := let _ := instDecidableEqP; let _ := instDecidableEqΛ; by + have hsum : (∑ x ∈ X, ((multiplicity I L x - 1 : ℕ) : ℝ)) = + (overlapExcess I X L : ℝ) := by simp only [overlapExcess, Nat.cast_sum] + rw [← hsum] + calc + _ = ∑ _x ∈ heavyPoints I X L T, (T - 1) := by + simp only [Finset.sum_const, nsmul_eq_mul] + _ ≤ ∑ x ∈ heavyPoints I X L T, ((multiplicity I L x - 1 : ℕ) : ℝ) := by + apply Finset.sum_le_sum + intro x hx + have hxT : T ≤ (multiplicity I L x : ℝ) := (Finset.mem_filter.mp hx).2 + have hnR : (1 : ℝ) ≤ multiplicity I L x := hT.le.trans hxT + have hn : 1 ≤ multiplicity I L x := by exact_mod_cast hnR + rw [Nat.cast_sub hn, Nat.cast_one] + exact sub_le_sub_right hxT 1 + _ ≤ _ := Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) + (by intro x hx hxnot; exact Nat.cast_nonneg _) + +theorem orderedPairMass_le_light_add_heavy + (I : P → Λ → Prop) (X : Finset P) (L : Finset Λ) (T R : ℝ) + (hT : 0 ≤ T) (hR : ∀ x ∈ X, (multiplicity I L x : ℝ) ≤ R) : + (orderedPairMass I X L : ℝ) ≤ T * (overlapExcess I X L : ℝ) + + R * ∑ x ∈ heavyPoints I X L T, (multiplicity I L x : ℝ) := let _ := instDecidableEqP; let _ := instDecidableEqΛ; by + have hpoint (x : P) (hx : x ∈ X) : + (multiplicity I L x : ℝ) * ((multiplicity I L x - 1 : ℕ) : ℝ) ≤ + T * ((multiplicity I L x - 1 : ℕ) : ℝ) + + if T ≤ (multiplicity I L x : ℝ) then R * (multiplicity I L x : ℝ) else 0 := by + have ha0 : 0 ≤ ((multiplicity I L x - 1 : ℕ) : ℝ) := Nat.cast_nonneg _ + have hn0 : 0 ≤ (multiplicity I L x : ℝ) := Nat.cast_nonneg _ + have haN : ((multiplicity I L x - 1 : ℕ) : ℝ) ≤ (multiplicity I L x : ℝ) := by + exact_mod_cast Nat.sub_le (multiplicity I L x) 1 + by_cases hh : T ≤ (multiplicity I L x : ℝ) + · simp only [ite_eq_left hh] + have hp := mul_le_mul_of_nonneg_left (haN.trans (hR x hx)) hn0 + nlinarith [mul_nonneg hT ha0] + · simpa only [ite_eq_right hh, add_zero] using + mul_le_mul_of_nonneg_right (le_of_lt (lt_of_not_ge hh)) ha0 + have hsum := Finset.sum_le_sum hpoint + simpa only [orderedPairMass, overlapExcess, heavyPoints, Nat.cast_sum, + Nat.cast_mul, Finset.sum_add_distrib, Finset.mul_sum, Finset.sum_filter, + mul_ite, mul_zero] using hsum + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/PairCounting.lean b/lean/OAI/Combinatorics/Ryser/LineCover/PairCounting.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ed782b51aced5d4076e693dedebe9b667b3df70 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/PairCounting.lean @@ -0,0 +1,103 @@ +import OAI.Combinatorics.Ryser.Geometry.AffineJoins +import OAI.Combinatorics.Ryser.LineCover.Overlap +import Mathlib.Data.Finset.Prod +import Mathlib.Algebra.BigOperators.Group.Finset.Basic + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable +open scoped BigOperators + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] + +def survivorPairs (X : Finset (Point F)) (L : Finset (AffineLine F)) : + Finset (AffineLine F × AffineLine F) := + X.biUnion fun x => (L.filter (Incidence x)).offDiag + +theorem mem_survivorPairs (X : Finset (Point F)) (L : Finset (AffineLine F)) + (a b : AffineLine F) : + (a, b) ∈ survivorPairs X L ↔ + a ∈ L ∧ b ∈ L ∧ a ≠ b ∧ ∃ x ∈ X, Incidence x a ∧ Incidence x b := by + simp only [survivorPairs, Finset.mem_biUnion, Finset.mem_offDiag, + Finset.mem_filter] + constructor + · rintro ⟨x, hx, ⟨ha, hxa⟩, ⟨hb, hxb⟩, hab⟩ + exact ⟨ha, hb, hab, x, hx, hxa, hxb⟩ + · rintro ⟨ha, hb, hab, x, hx, hxa, hxb⟩ + exact ⟨x, hx, ⟨ha, hxa⟩, ⟨hb, hxb⟩, hab⟩ + +theorem survivorPairs_fibers_disjoint + (X : Finset (Point F)) (L : Finset (AffineLine F)) : + (X : Set (Point F)).PairwiseDisjoint + (fun x => (L.filter (Incidence x)).offDiag) := by + intro x _ y _ hxy + apply Finset.disjoint_left.mpr + intro p hx hy + obtain ⟨hxa, hxb, hab⟩ := Finset.mem_offDiag.mp hx + obtain ⟨hya, hyb, _⟩ := Finset.mem_offDiag.mp hy + apply hxy + exact eq_of_common_incidence_of_ne_lines hab + (Finset.mem_filter.mp hxa).2 (Finset.mem_filter.mp hxb).2 + (Finset.mem_filter.mp hya).2 (Finset.mem_filter.mp hyb).2 + +theorem card_survivorPairs (X : Finset (Point F)) (L : Finset (AffineLine F)) : + (survivorPairs X L).card = + ∑ x ∈ X, (L.filter (Incidence x)).card * + ((L.filter (Incidence x)).card - 1) := by + rw [survivorPairs, Finset.card_biUnion (survivorPairs_fibers_disjoint X L)] + apply Finset.sum_congr rfl + intro x _ + simp only [Finset.offDiag_card, Nat.mul_sub_left_distrib, Nat.mul_one] + +theorem card_survivorPairs_eq_orderedPairMass + (X : Finset (Point F)) (L : Finset (AffineLine F)) : + (survivorPairs X L).card = orderedPairMass Incidence X L := by + rw [card_survivorPairs] + unfold orderedPairMass multiplicity + apply Finset.sum_congr rfl + intro x _ + apply congrArg (fun n : ℕ => n * (n - 1)) + apply congrArg Finset.card + ext l + simp only [Finset.mem_filter] + +def populationSurvivorPairs (X : Finset (Point F)) (L : Finset (AffineLine F)) : + Finset (↥L × ↥L) := + Finset.univ.filter fun p => (p.1.val, p.2.val) ∈ survivorPairs X L + +theorem mem_populationSurvivorPairs + (X : Finset (Point F)) (L : Finset (AffineLine F)) (p : ↥L × ↥L) : + p ∈ populationSurvivorPairs X L ↔ + p.1 ≠ p.2 ∧ ∃ x ∈ X, Incidence x p.1.val ∧ Incidence x p.2.val := by + simp only [populationSurvivorPairs, Finset.mem_filter, Finset.mem_univ, + true_and, mem_survivorPairs, p.1.property, p.2.property] + exact and_congr (not_congr Subtype.val_inj) Iff.rfl + +theorem card_populationSurvivorPairs + (X : Finset (Point F)) (L : Finset (AffineLine F)) : + (populationSurvivorPairs X L).card = (survivorPairs X L).card := by + apply Finset.card_bij (fun p _ => (p.1.val, p.2.val)) + · intro p hp + exact (Finset.mem_filter.mp hp).2 + · intro p _ q _ hpq + apply Prod.ext + · exact Subtype.ext (congrArg Prod.fst hpq) + · exact Subtype.ext (congrArg Prod.snd hpq) + · intro p hp + have hm := (mem_survivorPairs X L p.1 p.2).mp hp + refine ⟨(⟨p.1, hm.1⟩, ⟨p.2, hm.2.1⟩), ?_, rfl⟩ + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _, hp⟩ + +theorem card_populationSurvivorPairs_eq_orderedPairMass + (X : Finset (Point F)) (L : Finset (AffineLine F)) : + (populationSurvivorPairs X L).card = orderedPairMass Incidence X L := by + rw [card_populationSurvivorPairs, card_survivorPairs_eq_orderedPairMass] + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/PairSampling.lean b/lean/OAI/Combinatorics/Ryser/LineCover/PairSampling.lean new file mode 100644 index 0000000000000000000000000000000000000000..612531d6bc3c5ce59ac81636ed64242d322ea8ed --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/PairSampling.lean @@ -0,0 +1,128 @@ +import OAI.Combinatorics.Ryser.LineCover.InjectionSampling +import Mathlib.Data.Fintype.CardEmbedding +import Mathlib.Data.Fintype.BigOperators +import Mathlib.Data.Fintype.Sum +import Mathlib.Tactic.Ring + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable + +open scoped BigOperators + +namespace RyserCoveringCounterexample.InjectionSampling + +theorem card_disjoint_pair_assignments_le + {Ω : Type*} [Fintype Ω] (B : Finset (Ω × Ω)) (h : ℕ) : + Fintype.card {u : (Fin h ⊕ Fin h) ↪ Ω // + ∀ k, (u (Sum.inl k), u (Sum.inr k)) ∈ B} ≤ B.card ^ h := by + classical + let encode : {u : (Fin h ⊕ Fin h) ↪ Ω // + ∀ k, (u (Sum.inl k), u (Sum.inr k)) ∈ B} → (Fin h → ↥B) := + fun u k => ⟨(u.val (Sum.inl k), u.val (Sum.inr k)), u.property k⟩ + have hencode : Function.Injective encode := by + intro u v huv + apply Subtype.ext + apply Function.Embedding.ext + intro slot + cases slot with + | inl k => exact congrArg (fun f : Fin h → ↥B => (f k).val.1) huv + | inr k => exact congrArg (fun f : Fin h → ↥B => (f k).val.2) huv + simpa only [Fintype.card_fun, Fintype.card_coe, Fintype.card_fin] using + Fintype.card_le_of_injective encode hencode + +theorem prob_disjoint_pairs_le + {I Ω : Type*} [Fintype I] [Fintype Ω] [Nonempty (I ↪ Ω)] + {h : ℕ} (j : (Fin h ⊕ Fin h) ↪ I) (B : Finset (Ω × Ω)) : + (FiniteLaw.uniform (I ↪ Ω)).prob + (fun u => ∀ k, (u (j (Sum.inl k)), u (j (Sum.inr k))) ∈ B) ≤ + (B.card : ℝ) ^ h / + ((Fintype.card Ω).descFactorial (2 * h) : ℝ) := by + classical + let : Nonempty ((Fin h ⊕ Fin h) ↪ Ω) := + ⟨j.trans (Classical.choice (inferInstance : Nonempty (I ↪ Ω)))⟩ + let P : ((Fin h ⊕ Fin h) ↪ Ω) → Prop := + fun u => ∀ k, (u (Sum.inl k), u (Sum.inr k)) ∈ B + change (FiniteLaw.uniform (I ↪ Ω)).prob (fun u => P (restrict j u)) ≤ _ + rw [prob_restrict j P, FiniteLaw.uniform_prob] + have hfilter : + @Finset.filter _ P (fun sample => Classical.propDecidable (P sample)) + Finset.univ = Finset.univ.filter P := + Finset.filter_congr_decidable _ _ _ + rw [hfilter] + have hnat : (Finset.univ.filter P).card ≤ B.card ^ h := by + simpa only [Fintype.card_subtype] using card_disjoint_pair_assignments_le B h + have hreal : ((Finset.univ.filter P).card : ℝ) ≤ ((B.card ^ h : ℕ) : ℝ) := + Nat.cast_le.mpr hnat + rw [Nat.cast_pow] at hreal + calc + _ ≤ (B.card : ℝ) ^ h / Fintype.card ((Fin h ⊕ Fin h) ↪ Ω) := + div_le_div_of_nonneg_right hreal (Nat.cast_nonneg _) + _ = _ := by + simp only [Fintype.card_embedding_eq, Fintype.card_sum, Fintype.card_fin, + ← Nat.two_mul] + +theorem prob_exists_disjoint_pairs_descFactorial_le + {Ω : Type*} [Fintype Ω] {h t : ℕ} + [Nonempty ((Fin t ⊕ Fin t) ↪ Ω)] (B : Finset (Ω × Ω)) : + (FiniteLaw.uniform ((Fin t ⊕ Fin t) ↪ Ω)).prob + (fun u => ∃ left right : Fin h ↪ Fin t, + ∀ k, (u (Sum.inl (left k)), u (Sum.inr (right k))) ∈ B) ≤ + (t.descFactorial h : ℝ) ^ 2 * (B.card : ℝ) ^ h / + ((Fintype.card Ω).descFactorial (2 * h) : ℝ) := by + classical + let μ := FiniteLaw.uniform ((Fin t ⊕ Fin t) ↪ Ω) + calc + _ ≤ ∑ left : Fin h ↪ Fin t, + μ.prob (fun u => ∃ right : Fin h ↪ Fin t, + ∀ k, (u (Sum.inl (left k)), u (Sum.inr (right k))) ∈ B) := + μ.prob_exists_le _ + _ ≤ ∑ left : Fin h ↪ Fin t, ∑ right : Fin h ↪ Fin t, + μ.prob (fun u => + ∀ k, (u (Sum.inl (left k)), u (Sum.inr (right k))) ∈ B) := by + apply Finset.sum_le_sum + intro left _ + exact μ.prob_exists_le _ + _ ≤ ∑ _left : Fin h ↪ Fin t, ∑ _right : Fin h ↪ Fin t, + (B.card : ℝ) ^ h / + ((Fintype.card Ω).descFactorial (2 * h) : ℝ) := by + apply Finset.sum_le_sum + intro left _ + apply Finset.sum_le_sum + intro right _ + exact prob_disjoint_pairs_le (Function.Embedding.sumMap left right) B + _ = _ := by + simp only [Finset.sum_const, Finset.card_univ, nsmul_eq_mul, + Fintype.card_embedding_eq, Fintype.card_fin] + ring + +theorem prob_exists_disjoint_pairs_le + {Ω : Type*} [Fintype Ω] {h t : ℕ} + [Nonempty ((Fin t ⊕ Fin t) ↪ Ω)] (B : Finset (Ω × Ω)) : + (FiniteLaw.uniform ((Fin t ⊕ Fin t) ↪ Ω)).prob + (fun u => ∃ left right : Fin h ↪ Fin t, + ∀ k, (u (Sum.inl (left k)), u (Sum.inr (right k))) ∈ B) ≤ + (t : ℝ) ^ (2 * h) * (B.card : ℝ) ^ h / + ((Fintype.card Ω).descFactorial (2 * h) : ℝ) := by + have hslots : (t.descFactorial h : ℝ) ≤ (t : ℝ) ^ h := by + have hcast : (t.descFactorial h : ℝ) ≤ ((t ^ h : ℕ) : ℝ) := + Nat.cast_le.mpr (Nat.descFactorial_le_pow t h) + simpa only [Nat.cast_pow] using hcast + calc + _ ≤ (t.descFactorial h : ℝ) ^ 2 * (B.card : ℝ) ^ h / + ((Fintype.card Ω).descFactorial (2 * h) : ℝ) := + prob_exists_disjoint_pairs_descFactorial_le B + _ ≤ ((t : ℝ) ^ h) ^ 2 * (B.card : ℝ) ^ h / + ((Fintype.card Ω).descFactorial (2 * h) : ℝ) := by + apply div_le_div_of_nonneg_right _ (Nat.cast_nonneg _) + exact mul_le_mul_of_nonneg_right + (pow_le_pow_left₀ (Nat.cast_nonneg _) hslots 2) + (pow_nonneg (Nat.cast_nonneg _) h) + _ = _ := by rw [← pow_mul, Nat.mul_comm h 2] + +end RyserCoveringCounterexample.InjectionSampling + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/Process.lean b/lean/OAI/Combinatorics/Ryser/LineCover/Process.lean new file mode 100644 index 0000000000000000000000000000000000000000..c41b40e976a3c9549bd8ed285282d41e03f0dea1 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/Process.lean @@ -0,0 +1,64 @@ +import OAI.Combinatorics.Ryser.LineCover.Definitions +import OAI.Combinatorics.Ryser.LineCover.DeletionDefinitions +import OAI.Combinatorics.Ryser.Probability.Product + +namespace OAI + +open scoped BigOperators Classical +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +structure DeletionProcess (F : Type*) [Field F] [Fintype F] [DecidableEq F] + (D : ℕ) (δ : ℝ) where + shapes : Finset (Finset (Point F)) + shapeCount : shapes.card ≤ D * Fintype.card F ^ D + shapeSize : ∀ S ∈ shapes, S.card ≤ D * Fintype.card F + sparse : SparseShapes shapes D + trialsCount : ℕ + trials : Fin trialsCount → FiniteLaw (Outcome shapes D) + trialsCount_le : trialsCount ≤ D * Fintype.card F + pointCap : ∀ i x, + (trials i).prob (fun a => x ∈ deleted ∅ a) ≤ (D : ℝ) / Fintype.card F + survival : ℝ + survivalLower : δ ≤ survival + uniformSurvival : ∀ x, + (FiniteLaw.pi trials).prob (fun ω => x ∈ survivors ∅ ω) = survival + lineCap : ∀ l : AffineLine F, + (∑ i, (trials i).prob (fun a => ∃ S ∈ a.val, S.val = linePoints l)) ≤ + (D : ℝ) / Fintype.card F + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + {shapes : Finset (Finset (Point F))} {D n : ℕ} + +def GoodLineCover (δ ρ : ℝ) (ω : Fin n → Outcome shapes D) : Prop := + (∀ l : AffineLine F, + δ * Fintype.card F / 2 ≤ + ((survivors {linePoints l} ω ∩ linePoints l).card : ℝ)) ∧ + (∀ L : Finset (AffineLine F), L.card ≤ Fintype.card F → + (survivors ∅ ω \ L.biUnion linePoints).card ≤ 2 * Fintype.card F → + ∃ p : ProjectivePoint F, + (1 - ρ) * Fintype.card F ≤ ((coverPencil L p).card : ℝ)) + +namespace DeletionProcess + +variable {δ : ℝ} (process : DeletionProcess F D δ) + +abbrev Config := Fin process.trialsCount → Outcome process.shapes D + +def law : FiniteLaw process.Config := FiniteLaw.pi process.trials + +def survivorSet (ω : process.Config) : Finset (Point F) := survivors ∅ ω + +theorem point_survival_ge (x : Point F) : + δ ≤ process.law.prob (fun ω => x ∈ process.survivorSet ω) := by + change δ ≤ (FiniteLaw.pi process.trials).prob (fun ω => x ∈ survivors ∅ ω) + rw [process.uniformSurvival] + exact process.survivalLower + +end DeletionProcess +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/ProjectiveLift.lean b/lean/OAI/Combinatorics/Ryser/LineCover/ProjectiveLift.lean new file mode 100644 index 0000000000000000000000000000000000000000..beca60e7a58cc10c4c555a802f5f306aa7301c8e --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/ProjectiveLift.lean @@ -0,0 +1,67 @@ +import OAI.Combinatorics.Ryser.LineCover.Overlap +import OAI.Combinatorics.Ryser.Geometry.Basic +import OAI.Combinatorics.Ryser.Incidence.PruningCore + +namespace OAI + +open scoped BigOperators Classical +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [instFieldF : Field F] [instFintypeF : Fintype F] [DecidableEq F] + +def projectivePointsOf (X : Finset (Point F)) : Finset (ProjectivePoint F) := + X.image Sum.inl + +def projectiveLinesOf (L : Finset (AffineLine F)) : Finset (ProjectiveLine F) := + L.image some + +@[simp] theorem card_projectivePointsOf (X : Finset (Point F)) : + (projectivePointsOf X).card = X.card := let _ := instFieldF; let _ := instFintypeF; + Finset.card_image_of_injective X Sum.inl_injective + +@[simp] theorem card_projectiveLinesOf (L : Finset (AffineLine F)) : + (projectiveLinesOf L).card = L.card := let _ := instFieldF; let _ := instFintypeF; + Finset.card_image_of_injective L (Option.some_injective _) + +theorem leftDegree_projectiveLinesOf (L : Finset (AffineLine F)) (x : Point F) : + Incidence.leftDegree ProjectiveIncidence (projectiveLinesOf L) (Sum.inl x) = + multiplicity Incidence L x := let _ := instFintypeF; by + unfold Incidence.leftDegree projectiveLinesOf multiplicity + have houter : + @Finset.filter _ (ProjectiveIncidence (Sum.inl x)) + (fun l => Classical.propDecidable (ProjectiveIncidence (Sum.inl x) l)) + (L.image some) = (L.image some).filter (ProjectiveIncidence (Sum.inl x)) := + Finset.filter_congr_decidable _ _ _ + have hinner : + @Finset.filter _ (Incidence x) (fun l => Classical.propDecidable (Incidence x l)) L = + L.filter (Incidence x) := Finset.filter_congr_decidable _ _ _ + rw [houter, hinner, Finset.filter_image, Finset.card_image_of_injective _ (Option.some_injective _)] + congr 1 + +theorem incidenceCount_projective_lifts (X : Finset (Point F)) + (L : Finset (AffineLine F)) : + Incidence.incidenceCount ProjectiveIncidence (projectivePointsOf X) + (projectiveLinesOf L) = ∑ x ∈ X, multiplicity Incidence L x := by + unfold Incidence.incidenceCount projectivePointsOf + rw [Finset.sum_image] + · exact Finset.sum_congr rfl (fun x _ => leftDegree_projectiveLinesOf L x) + · intro x hx y hy hxy + exact Sum.inl.inj hxy + +theorem multiplicity_eq_finite_pencil (L : Finset (AffineLine F)) (x : Point F) : + multiplicity Incidence L x = + (L.filter fun l => ProjectiveIncidence (Sum.inl x) (some l)).card := let _ := instFintypeF; by + unfold multiplicity + have hfilter : + @Finset.filter _ (Incidence x) (fun l => Classical.propDecidable (Incidence x l)) L = + L.filter (Incidence x) := Finset.filter_congr_decidable _ _ _ + rw [hfilter] + congr 1 + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/Rigidity.lean b/lean/OAI/Combinatorics/Ryser/LineCover/Rigidity.lean new file mode 100644 index 0000000000000000000000000000000000000000..01bab2fb0536e15430bf3a15c16b9b45340ac0e6 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/Rigidity.lean @@ -0,0 +1,76 @@ +import OAI.Combinatorics.Ryser.LineCover.GoodCounts +import OAI.Combinatorics.Ryser.LineCover.GoodTuples +import OAI.Combinatorics.Ryser.LineCover.CoverEstimates +import OAI.Combinatorics.Ryser.LineCover.RigiditySampling + +namespace OAI + +open scoped Classical +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + {D : ℕ} {δ ρ A : ℝ} + +theorem goodLineCover_of_goodCounts_goodTuples + (process : DeletionProcess F D δ) (hδ : 0 < δ) (hρ : 0 < ρ) + (hq : Incidence.incidenceThreshold ≤ Fintype.card F) + (hsub : Incidence.SmallProperSubfields F) + (params : RigidityParameters D δ ρ A Incidence.savingExponent (Fintype.card F)) + (ω : process.Config) + (hcounts : GoodCounts process (Incidence.savingExponent / 10) ω) + (htuples : GoodTuples process (10 * (D + 1)) + (logarithmicSampleSize A (Fintype.card F)) ω) : + GoodLineCover δ ρ ω := by + let q : ℝ := Fintype.card F + let κ : ℝ := Incidence.savingExponent + have hqpos : 0 < q := lt_of_lt_of_le zero_lt_one params.q_one + have hτ : δ * q ≤ process.survival * q := + mul_le_mul_of_nonneg_right process.survivalLower hqpos.le + refine ⟨?_, ?_⟩ + · intro l + have hl := (hcounts.2 l).1 + have herr := params.lineerror + change δ * q / 2 ≤ retainedCount {linePoints l} (linePoints l) ω + linarith + · intro L hL hmiss + by_contra hnone + have hsmall (p : ProjectivePoint F) : + ((coverPencil L p).card : ℝ) < (1 - ρ) * q := + lt_of_not_ge (fun hp => hnone ⟨p, hp⟩) + let K := cleanLines ω L + have hK : K.card ≤ Fintype.card F := + (Finset.card_le_card (cleanLines_subset ω L)).trans hL + have hsmallK (p : ProjectivePoint F) : + ((coverPencil K p).card : ℝ) < (1 - ρ) * q := + (Nat.cast_le.mpr (Finset.card_le_card + (coverPencil_mono (cleanLines_subset ω L) p))).trans_lt (hsmall p) + have htotal : process.survival * q ^ 2 - q ^ (3 / 2 + κ / 10) ≤ + ((survivors ∅ ω).card : ℝ) := by + have h := (abs_le.mp hcounts.1).1 + linarith + have hlines (l : AffineLine F) : + ((survivors {linePoints l} ω ∩ linePoints l).card : ℝ) ≤ + process.survival * q + ((D : ℝ) + q ^ (1 / 2 + κ / 10)) := by + have h := (hcounts.2 l).2 + change retainedCount {linePoints l} (linePoints l) ω ≤ _ + linarith + have hmissR : ((survivors ∅ ω \ L.biUnion linePoints).card : ℝ) ≤ 2 * q := by + dsimp only [q] + exact_mod_cast hmiss + have hb := clean_cover_count_bounds ω L process.survival δ + (q ^ (3 / 2 + κ / 10)) ((D : ℝ) + q ^ (1 / 2 + κ / 10)) (2 * q) + hδ process.survivalLower (by positivity) htotal hlines hmissR hL + have hbudget := rigidityBudget_eq_errors D (κ := κ) hqpos + rw [← hbudget] at hb + obtain ⟨a, haK, ha, hfew⟩ := exists_admissible_of_no_large_pencil + (survivors ∅ ω) K process.shapes D δ ρ A hδ hρ hq hsub params + process.sparse process.shapeCount hK hb.1 hb.2 hsmallK + exact htuples.no_sparse_clean_tuple L a ha haK hfew + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/RigidityNumerics.lean b/lean/OAI/Combinatorics/Ryser/LineCover/RigidityNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..3d372c3445f21ac484dbe4fb0290c36bbd45e1b5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/RigidityNumerics.lean @@ -0,0 +1,169 @@ +import OAI.Combinatorics.Ryser.LineCover.TailNumerics +import Mathlib.Tactic.FieldSimp + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +open Filter Topology + +def rigidityBudget (D : ℕ) (κ q : ℝ) : ℝ := + 2 * q ^ (3 / 2 + κ / 10) + ((D : ℝ) + 2) * q + +theorem rigidityBudget_eq_errors (D : ℕ) {κ q : ℝ} (hq : 0 < q) : + rigidityBudget D κ q = + q ^ (3 / 2 + κ / 10) + q * ((D : ℝ) + q ^ (1 / 2 + κ / 10)) + 2 * q := by + have hmul : q * q ^ (1 / 2 + κ / 10) = q ^ (3 / 2 + κ / 10) := by + calc + _ = q ^ (1 : ℝ) * q ^ (1 / 2 + κ / 10) := by rw [Real.rpow_one] + _ = q ^ ((1 : ℝ) + (1 / 2 + κ / 10)) := (Real.rpow_add hq _ _).symm + _ = _ := by congr 1; ring + unfold rigidityBudget + rw [mul_add, hmul] + ring + +theorem rigidityBudget_nonneg (D : ℕ) (κ : ℝ) {q : ℝ} (hq : 0 ≤ q) : + 0 ≤ rigidityBudget D κ q := by + unfold rigidityBudget + positivity + +theorem rigidityBudget_le (D : ℕ) {κ q : ℝ} (hκ : 0 ≤ κ) (hq : 1 ≤ q) : + rigidityBudget D κ q ≤ ((D : ℝ) + 4) * q ^ (3 / 2 + κ / 10) := by + have hpow : q ≤ q ^ (3 / 2 + κ / 10) := by + calc + q = q ^ (1 : ℝ) := (Real.rpow_one q).symm + _ ≤ _ := Real.rpow_le_rpow_of_exponent_le hq (by linarith) + have hmul := mul_le_mul_of_nonneg_left hpow + (show 0 ≤ (D : ℝ) + 2 by positivity) + unfold rigidityBudget + nlinarith only [hmul] + +private theorem eventually_mul_rpow_le_mul (C c a b : ℝ) + (hc : 0 < c) (hab : a < b) : + ∀ᶠ q : ℝ in atTop, C * q ^ a ≤ c * q ^ b := by + have hgap : 0 < b - a := sub_pos.mpr hab + filter_upwards [eventually_ge_atTop (1 : ℝ), + (tendsto_rpow_atTop hgap).eventually_ge_atTop (C / c)] with q hq hlarge + have hqpos : 0 < q := lt_of_lt_of_le zero_lt_one hq + have hC : C ≤ q ^ (b - a) * c := (div_le_iff₀ hc).mp hlarge + calc + C * q ^ a ≤ (q ^ (b - a) * c) * q ^ a := + mul_le_mul_of_nonneg_right hC (Real.rpow_nonneg hqpos.le _) + _ = c * q ^ b := by + rw [mul_comm (q ^ (b - a)) c, mul_assoc, ← Real.rpow_add hqpos] + rw [show b - a + a = b by ring] + +private theorem eventually_rigidityBudget_div_le (D : ℕ) {δ c κ : ℝ} + (hδ : 0 < δ) (hc : 0 < c) (hκ : 0 ≤ κ) (hκmax : κ ≤ 1 / 10) : + ∀ᶠ q : ℝ in atTop, rigidityBudget D κ q / (δ * q) ≤ c * q / 2 := by + have hsmall := eventually_mul_rpow_le_mul ((D : ℝ) + 4) (δ * c / 2) + (3 / 2 + κ / 10) 2 (by positivity) (by linarith) + filter_upwards [eventually_ge_atTop (1 : ℝ), hsmall] with q hq hsmallq + have hqpos : 0 < q := lt_of_lt_of_le zero_lt_one hq + apply (div_le_iff₀ (mul_pos hδ hqpos)).2 + calc + rigidityBudget D κ q ≤ ((D : ℝ) + 4) * q ^ (3 / 2 + κ / 10) := + rigidityBudget_le D hκ hq + _ ≤ (δ * c / 2) * q ^ (2 : ℝ) := hsmallq + _ = (c * q / 2) * (δ * q) := by rw [Real.rpow_two]; ring + +theorem eventually_rigidityBudget_div_le_min (D : ℕ) {δ ρ κ : ℝ} + (hδ : 0 < δ) (hρ : 0 < ρ) (hκ : 0 < κ) (hκmax : κ ≤ 1 / 10) : + ∀ᶠ q : ℝ in atTop, + rigidityBudget D κ q / (δ * q) ≤ min (q / 2) (ρ * q / 2) := by + filter_upwards [eventually_rigidityBudget_div_le D hδ zero_lt_one hκ.le hκmax, + eventually_rigidityBudget_div_le D hδ hρ hκ.le hκmax] with q hleft hright + exact le_min (by simpa only [one_mul] using hleft) hright + +theorem eventually_rigidity_heavy_bounds (D : ℕ) {κ : ℝ} + (hκ : 0 < κ) (hκmax : κ ≤ 1 / 10) : + ∀ᶠ q : ℝ in atTop, + 1 < q ^ (1 / 2 - κ / 3) ∧ + rigidityBudget D κ q / (q ^ (1 / 2 - κ / 3) - 1) ≤ q ^ (1 + κ) := by + have hd : 0 < (1 / 2 : ℝ) - κ / 3 := by linarith + have hgap : (3 / 2 : ℝ) + κ / 10 < (1 + κ) + (1 / 2 - κ / 3) := by + linarith + have hsmall := eventually_mul_rpow_le_mul (2 * ((D : ℝ) + 4)) 1 + (3 / 2 + κ / 10) ((1 + κ) + (1 / 2 - κ / 3)) zero_lt_one hgap + filter_upwards [eventually_ge_atTop (1 : ℝ), + (tendsto_rpow_atTop hd).eventually_ge_atTop 2, hsmall] + with q hq hT hsmallq + have hqpos : 0 < q := lt_of_lt_of_le zero_lt_one hq + rw [one_mul, Real.rpow_add hqpos (1 + κ) (1 / 2 - κ / 3)] at hsmallq + have hscaled := mul_le_mul_of_nonneg_left hT + (Real.rpow_nonneg hqpos.le (1 + κ)) + constructor + · linarith + · apply (div_le_iff₀ (by linarith : 0 < q ^ (1 / 2 - κ / 3) - 1)).2 + calc + rigidityBudget D κ q ≤ ((D : ℝ) + 4) * q ^ (3 / 2 + κ / 10) := + rigidityBudget_le D hκ.le hq + _ ≤ q ^ (1 + κ) * (q ^ (1 / 2 - κ / 3) - 1) := by + nlinarith only [hsmallq, hscaled] + +theorem eventually_line_error_le_half {δ κ : ℝ} + (hδ : 0 < δ) (hκmax : κ ≤ 1 / 10) : + ∀ᶠ q : ℝ in atTop, q ^ (1 / 2 + κ / 10) ≤ δ * q / 2 := by + have hsmall := eventually_mul_rpow_le_mul 1 (δ / 2) (1 / 2 + κ / 10) 1 + (by positivity) (by linarith) + filter_upwards [hsmall] with q hsmallq + calc + q ^ (1 / 2 + κ / 10) ≤ (δ / 2) * q ^ (1 : ℝ) := by + simpa only [one_mul] using hsmallq + _ = δ * q / 2 := by rw [Real.rpow_one]; ring + +theorem pair_mass_ratio_le_coarse (D : ℕ) {q κ m B R P : ℝ} + (hq : 1 ≤ q) + (hB : B ≤ ((D : ℝ) + 4) * q ^ (3 / 2 + κ / 10)) + (hR : R ≤ q ^ (1 / 2 + κ / 4)) (hm : q / 2 ≤ m) + (hP : P ≤ q ^ (1 / 2 - κ / 3) * B + R * q ^ (3 / 2 - κ)) : + P / m ^ 2 ≤ + 4 * (((D : ℝ) + 4) * q ^ (-(7 * κ / 30)) + q ^ (-(3 * κ / 4))) := by + have hqpos : 0 < q := lt_of_lt_of_le zero_lt_one hq + have he₁ : (1 / 2 - κ / 3) + (3 / 2 + κ / 10) = 2 - 7 * κ / 30 := by ring + have he₂ : (1 / 2 + κ / 4) + (3 / 2 - κ) = 2 - 3 * κ / 4 := by ring + have hnum : P ≤ ((D : ℝ) + 4) * q ^ (2 - 7 * κ / 30) + + q ^ (2 - 3 * κ / 4) := by + calc + P ≤ q ^ (1 / 2 - κ / 3) * B + R * q ^ (3 / 2 - κ) := hP + _ ≤ q ^ (1 / 2 - κ / 3) * (((D : ℝ) + 4) * q ^ (3 / 2 + κ / 10)) + + q ^ (1 / 2 + κ / 4) * q ^ (3 / 2 - κ) := + add_le_add + (mul_le_mul_of_nonneg_left hB (Real.rpow_nonneg hqpos.le _)) + (mul_le_mul_of_nonneg_right hR (Real.rpow_nonneg hqpos.le _)) + _ = _ := by + rw [mul_left_comm (q ^ (1 / 2 - κ / 3)) ((D : ℝ) + 4) + (q ^ (3 / 2 + κ / 10))] + simp only [← Real.rpow_add hqpos, he₁, he₂] + have hden : (q / 2) ^ 2 ≤ m ^ 2 := pow_le_pow_left₀ (by positivity) hm 2 + have hdiv (a : ℝ) : q ^ a / q ^ 2 = q ^ (a - 2) := + (Real.rpow_sub_natCast hqpos.ne' a 2).symm + calc + P / m ^ 2 ≤ + (((D : ℝ) + 4) * q ^ (2 - 7 * κ / 30) + q ^ (2 - 3 * κ / 4)) / + (q / 2) ^ 2 := + div_le_div₀ (by positivity) hnum (by positivity) hden + _ = 4 * (((D : ℝ) + 4) * (q ^ (2 - 7 * κ / 30) / q ^ 2) + + q ^ (2 - 3 * κ / 4) / q ^ 2) := by + field_simp [hqpos.ne'] + ring + _ = _ := by + rw [hdiv (2 - 7 * κ / 30), hdiv (2 - 3 * κ / 4), + show (2 - 7 * κ / 30) - 2 = -(7 * κ / 30) by ring, + show (2 - 3 * κ / 4) - 2 = -(3 * κ / 4) by ring] + +theorem rigidity_pair_ratio_le (D : ℕ) {q κ m E R P : ℝ} + (hq : 1 ≤ q) (hκ : 0 ≤ κ) (hm : q / 2 ≤ m) + (hR : R ≤ q ^ (1 / 2 + κ / 4)) (hE : E ≤ rigidityBudget D κ q) + (hpair : P ≤ q ^ (1 / 2 - κ / 3) * E + R * q ^ (3 / 2 - κ)) : + P / m ^ 2 ≤ + 4 * (((D : ℝ) + 4) * q ^ (-(7 * κ / 30)) + q ^ (-(3 * κ / 4))) := + pair_mass_ratio_le_coarse D hq (hE.trans (rigidityBudget_le D hκ hq)) hR hm hpair + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/RigidityParameters.lean b/lean/OAI/Combinatorics/Ryser/LineCover/RigidityParameters.lean new file mode 100644 index 0000000000000000000000000000000000000000..d95371c6847b21e6be549f054ad1682f1628410c --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/RigidityParameters.lean @@ -0,0 +1,77 @@ +import OAI.Combinatorics.Ryser.LineCover.FailureNumerics +import OAI.Combinatorics.Ryser.LineCover.RigidityNumerics + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +open Filter Topology + +structure RigidityParameters (D : ℕ) (δ ρ A κ q : ℝ) : Prop where + q_one : 1 ≤ q + m_four : 4 ≤ q / 2 + m_h : 4 * ((10 * (D + 1) : ℕ) : ℝ) ≤ q / 2 + m_t : 2 * (logarithmicSampleSize A q : ℝ) ≤ q / 2 + h_t : 10 * (D + 1) ≤ logarithmicSampleSize A q + r_t : (logarithmicSampleSize A q : ℝ) ≤ q ^ (1 / 2 + κ / 4) + r_h : 2 * ((10 * (D + 1) : ℕ) : ℝ) ≤ q ^ (1 / 2 + κ / 4) + n_t : (logarithmicSampleSize A q : ℝ) ≤ ρ * q / 2 + n_h : 2 * ((10 * (D + 1) : ℕ) : ℝ) ≤ ρ * q / 2 + T_one : 1 < q ^ (1 / 2 - κ / 3) + gap_half : rigidityBudget D κ q / (δ * q) ≤ q / 2 + gap_rho : rigidityBudget D κ q / (δ * q) ≤ ρ * q / 2 + heavy : rigidityBudget D κ q / (q ^ (1 / 2 - κ / 3) - 1) ≤ q ^ (1 + κ) + low : lowFailureEnvelope D δ A κ q < 1 + high : highFailureEnvelope D δ ρ A κ q < 1 + lineerror : q ^ (1 / 2 + κ / 10) ≤ δ * q / 2 + +theorem eventually_rigidityParameters (D : ℕ) {δ ρ A κ : ℝ} + (hδ : 0 < δ) (hρ : 0 < ρ) (hA : 0 < A) (hκ : 0 < κ) + (hκsmall : κ ≤ 1 / 10) : + ∀ᶠ q : ℝ in atTop, RigidityParameters D δ ρ A κ q := by + have hsizes := eventually_sampling_size_bounds D hA hρ hκ + have hgaps := eventually_rigidityBudget_div_le_min D hδ hρ hκ hκsmall + have hheavy := eventually_rigidity_heavy_bounds D hκ hκsmall + have hlow := eventually_lowFailureEnvelope_lt_one D δ hA hκ + (show κ ≤ 1 by linarith) + have hhigh := eventually_highFailureEnvelope_lt_one D δ ρ hA hκ + have hline := eventually_line_error_le_half hδ hκsmall + filter_upwards [hsizes, hgaps, hheavy, hlow, hhigh, hline] with + q hsize hgap hheavyq hlo hhi hlin + rcases hsize with ⟨hq, hht, hmh, hmt, hrt, hnt⟩ + have hhtR : ((10 * (D + 1) : ℕ) : ℝ) ≤ (logarithmicSampleSize A q : ℝ) := by + exact_mod_cast hht + have ht0 : (0 : ℝ) ≤ logarithmicSampleSize A q := Nat.cast_nonneg _ + refine { + q_one := by linarith + m_four := by linarith + m_h := ?_ + m_t := hmt + h_t := hht + r_t := by linarith + r_h := by linarith + n_t := by linarith + n_h := by linarith + T_one := hheavyq.1 + gap_half := hgap.trans (min_le_left _ _) + gap_rho := hgap.trans (min_le_right _ _) + heavy := hheavyq.2 + low := hlo + high := hhi + lineerror := hlin } + simpa only [Nat.cast_mul, Nat.cast_ofNat, Nat.cast_add, Nat.cast_one] using hmh + +theorem exists_rigidityThreshold (D : ℕ) {δ ρ A κ : ℝ} + (hδ : 0 < δ) (hρ : 0 < ρ) (hA : 0 < A) (hκ : 0 < κ) + (hκsmall : κ ≤ 1 / 10) : + ∃ Q : ℝ, ∀ q : ℝ, Q ≤ q → RigidityParameters D δ ρ A κ q := by + exact Filter.eventually_atTop.mp + (eventually_rigidityParameters D hδ hρ hA hκ hκsmall) + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/RigiditySampling.lean b/lean/OAI/Combinatorics/Ryser/LineCover/RigiditySampling.lean new file mode 100644 index 0000000000000000000000000000000000000000..466e3976ed269f0b92fe8127753e5e70fc27f27f --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/RigiditySampling.lean @@ -0,0 +1,99 @@ +import OAI.Combinatorics.Ryser.LineCover.HeavyIncidence +import OAI.Combinatorics.Ryser.LineCover.MaxConcurrency +import OAI.Combinatorics.Ryser.LineCover.LowConcurrency +import OAI.Combinatorics.Ryser.LineCover.HighConcurrency +import OAI.Combinatorics.Ryser.LineCover.RigidityParameters + +namespace OAI + +open scoped BigOperators Classical +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + +theorem exists_admissible_of_no_large_pencil + (X : Finset (Point F)) (L : Finset (AffineLine F)) + (shapes : Finset (Finset (Point F))) (D : ℕ) (δ ρ A : ℝ) + (hδ : 0 < δ) (hρ : 0 < ρ) + (hq : Incidence.incidenceThreshold ≤ Fintype.card F) + (hsub : Incidence.SmallProperSubfields F) + (params : RigidityParameters D δ ρ A Incidence.savingExponent (Fintype.card F)) + (hsparse : SparseShapes shapes D) + (hshapes : shapes.card ≤ D * Fintype.card F ^ D) + (hL : L.card ≤ Fintype.card F) + (hE : (overlapExcess Incidence X L : ℝ) ≤ + rigidityBudget D Incidence.savingExponent (Fintype.card F)) + (hgap : (Fintype.card F : ℝ) - L.card ≤ + rigidityBudget D Incidence.savingExponent (Fintype.card F) / + (δ * Fintype.card F)) + (hsmall : ∀ p : ProjectivePoint F, + ((coverPencil L p).card : ℝ) < (1 - ρ) * Fintype.card F) : + ∃ a : LineTuple F (logarithmicSampleSize A (Fintype.card F)), + (∀ i, a i ∈ L) ∧ AdmissibleTuple shapes D (10 * (D + 1)) a ∧ + ((X ∩ crossPoints a).card : ℝ) < + δ * (logarithmicSampleSize A (Fintype.card F) : ℝ) ^ 2 / 2 := by + let q : ℝ := Fintype.card F + let κ : ℝ := Incidence.savingExponent + let t := logarithmicSampleSize A q + let h := 10 * (D + 1) + have hqpos : 0 < q := lt_of_lt_of_le zero_lt_one params.q_one + have hκ : 0 ≤ κ := Incidence.savingExponent_pos.le + have hm : q / 2 ≤ (L.card : ℝ) := by + have hg := params.gap_half + linarith + have hcount : q - rigidityBudget D κ q / (δ * q) ≤ (L.card : ℝ) := by + linarith + have hh : 1 ≤ h := by dsimp [h]; omega + have ht : 0 < t := lt_of_lt_of_le Nat.zero_lt_one (hh.trans params.h_t) + have hK : (shapes.card : ℝ) ≤ (D : ℝ) * q ^ (D : ℝ) := by + have hhcast : (shapes.card : ℝ) ≤ (D : ℝ) * (Fintype.card F : ℝ) ^ D := by + exact_mod_cast hshapes + simpa only [Real.rpow_natCast] using hhcast + by_cases hlow : (maxConcurrency L : ℝ) ≤ q ^ (1 / 2 + κ / 4) + · have hheavy : ((heavyPoints Incidence X L (q ^ (1 / 2 - κ / 3))).card : ℝ) ≤ + q ^ (1 + κ) := + (heavyPoints_card_le_of_excess X L _ _ params.T_one hE).trans params.heavy + have hpair := orderedPairMass_le_of_uniform_incidence hq hsub X L + (q ^ (1 / 2 - κ / 3)) (maxConcurrency L) + (Real.rpow_nonneg hqpos.le _) (Nat.cast_nonneg _) hheavy hL + (fun p => Nat.cast_le.mpr (coverPencil_card_le_maxConcurrency L p)) + have hratio := rigidity_pair_ratio_le D params.q_one hκ hm hlow hE hpair + have hm4 : 4 ≤ L.card := by exact_mod_cast params.m_four.trans hm + have hmH : 4 * h ≤ L.card := by exact_mod_cast params.m_h.trans hm + have hmT : 2 * t ≤ L.card := by exact_mod_cast params.m_t.trans hm + have hfailure : lowFailureBound X L shapes D (maxConcurrency L) h t δ < 1 := by + have hbound := low_sampling_failure_le_envelope (A := A) D L.card (maxConcurrency L) + shapes.card hqpos hδ hm hm4 hmH + (Nat.cast_nonneg (orderedPairMass Incidence X L)) hlow hK hratio + exact (show lowFailureBound X L shapes D (maxConcurrency L) h t δ ≤ + lowFailureEnvelope D δ A κ q from hbound).trans_lt params.low + exact exists_low_sample_of_failureBound_lt_one X L shapes D (maxConcurrency L) + h t δ hδ ht hmT (by omega) hsparse + (coverPencil_card_le_maxConcurrency L) hfailure + · let p := maxCenter L + have hR : q ^ (1 / 2 + κ / 4) ≤ ((coverPencil L p).card : ℝ) := + (lt_of_not_ge hlow).le + have hN : ρ * q / 2 ≤ ((L \ coverPencil L p).card : ℝ) := + complement_card_ge_half_of_no_large_pencil L q ρ + (rigidityBudget D κ q) δ hcount params.gap_rho hsmall p + have htR : t ≤ (coverPencil L p).card := by exact_mod_cast params.r_t.trans hR + have htN : t ≤ (L \ coverPencil L p).card := by exact_mod_cast params.n_t.trans hN + have hhR : 2 * h ≤ (coverPencil L p).card := by exact_mod_cast params.r_h.trans hR + have hhN : 2 * h ≤ (L \ coverPencil L p).card := by exact_mod_cast params.n_h.trans hN + have hfailure : highFailureBound X L p shapes D h t δ < 1 := by + have hbound := high_sampling_failure_le_envelope (A := A) D (coverPencil L p).card + (L \ coverPencil L p).card shapes.card hqpos hδ hρ + (Nat.cast_nonneg (overlapExcess Incidence X L)) + (hE.trans (rigidityBudget_le D hκ params.q_one)) hR hN hhR hhN hK + exact (show highFailureBound X L p shapes D h t δ ≤ + highFailureEnvelope D δ ρ A κ q from hbound).trans_lt params.high + exact highConcurrency_exists_admissible X L p shapes D h t δ hsparse hδ + hh params.h_t htR htN hfailure + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/SamplingDefinitions.lean b/lean/OAI/Combinatorics/Ryser/LineCover/SamplingDefinitions.lean new file mode 100644 index 0000000000000000000000000000000000000000..5848ebeb6f199efcce8ddfed96c0bac29af1b08b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/SamplingDefinitions.lean @@ -0,0 +1,38 @@ +import OAI.Combinatorics.Ryser.LineCover.Definitions + +namespace OAI + +noncomputable section +open scoped Classical + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [instFieldF : Field F] [instFintypeF : Fintype F] [instDecidableEqF : DecidableEq F] + +abbrev CoverSample (L : Finset (AffineLine F)) (t : ℕ) := + (Fin t ⊕ Fin t) ↪ ↥L + +def liftSample (L : Finset (AffineLine F)) {t : ℕ} (u : CoverSample L t) : + LineTuple F t := + u.trans ⟨Subtype.val, Subtype.val_injective⟩ + +@[simp] theorem liftSample_apply (L : Finset (AffineLine F)) {t : ℕ} + (u : CoverSample L t) (i : Fin t ⊕ Fin t) : + liftSample L u i = (u i).val := let _ := instFieldF; let _ := instFintypeF; let _ := instDecidableEqF; rfl + +theorem liftSample_mem (L : Finset (AffineLine F)) {t : ℕ} + (u : CoverSample L t) (i : Fin t ⊕ Fin t) : liftSample L u i ∈ L := let _ := instFieldF; let _ := instFintypeF; let _ := instDecidableEqF; + (u i).property + +def CrossHit (X : Finset (Point F)) {t : ℕ} (a : LineTuple F t) + (p : Fin t × Fin t) : Prop := + ∃ x ∈ X, Incidence x (a (Sum.inl p.1)) ∧ Incidence x (a (Sum.inr p.2)) + +def crossHitCount (X : Finset (Point F)) {t : ℕ} (a : LineTuple F t) : ℕ := + (Finset.univ.filter (CrossHit X a)).card + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/SamplingNumerics.lean b/lean/OAI/Combinatorics/Ryser/LineCover/SamplingNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..6e4734b002ae3a3c98a20292b71ec9e0894aa64c --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/SamplingNumerics.lean @@ -0,0 +1,88 @@ +import Mathlib.Basic.Real.Basic +import Mathlib.Data.Nat.Factorial.Basic +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring +import Mathlib.Tactic.FieldSimp + +namespace OAI + +namespace RyserCoveringCounterexample.LineCover + +theorem half_pow_le_descFactorial (n k : ℕ) (h : 2 * k ≤ n) : + ((n : ℝ) / 2) ^ k ≤ (n.descFactorial k : ℝ) := by + have hk : k ≤ n := (Nat.le_mul_of_pos_left k (by decide : 0 < 2)).trans h + have hkn : k ≤ n + 1 := hk.trans (Nat.le_succ n) + have hr : (2 : ℝ) * k ≤ n := by exact_mod_cast h + have hbase : (n : ℝ) / 2 ≤ ((n + 1 - k : ℕ) : ℝ) := by + rw [Nat.cast_sub hkn, Nat.cast_add, Nat.cast_one] + linarith + calc + ((n : ℝ) / 2) ^ k ≤ (((n + 1 - k : ℕ) : ℝ)) ^ k := + pow_le_pow_left₀ (by positivity) hbase k + _ ≤ (n.descFactorial k : ℝ) := by + exact_mod_cast Nat.pow_sub_le_descFactorial n k + +theorem descFactorial_cast_pos (n k : ℕ) (h : k ≤ n) : + 0 < (n.descFactorial k : ℝ) := by + exact_mod_cast (Nat.descFactorial_pos.mpr h) + +theorem low_occupancy_quotient_le (m D R t h : ℕ) + (hm : 0 < m) (hlarge : 4 * h ≤ m) : + (t : ℝ) ^ (2 * h) * ((m : ℝ) * D * R) ^ h / + (m.descFactorial (2 * h) : ℝ) ≤ + (4 * (D : ℝ) * (t : ℝ) ^ 2 * R / m) ^ h := by + have hmR : (0 : ℝ) < m := by exact_mod_cast hm + have hden : ((m : ℝ) / 2) ^ (2 * h) ≤ (m.descFactorial (2 * h) : ℝ) := + half_pow_le_descFactorial m (2 * h) (by simpa only [← Nat.mul_assoc] using hlarge) + have hpos : 0 < ((m : ℝ) / 2) ^ (2 * h) := by positivity + calc + _ ≤ (t : ℝ) ^ (2 * h) * ((m : ℝ) * D * R) ^ h / + (((m : ℝ) / 2) ^ (2 * h)) := + div_le_div_of_nonneg_left (by positivity) hpos hden + _ = ((t : ℝ) ^ 2 * ((m : ℝ) * D * R) / ((m : ℝ) / 2) ^ 2) ^ h := by + simp only [div_pow, mul_pow, pow_mul] + _ = _ := by + congr 1 + field_simp + ring + +theorem high_occupancy_quotient_le (R N D t h : ℕ) + (hR : 0 < R) (hN : 0 < N) (hRlarge : 2 * h ≤ R) (hNlarge : 2 * h ≤ N) : + (t : ℝ) ^ (2 * h) * ((D : ℝ) * N) ^ h / + ((R.descFactorial h : ℝ) * (N.descFactorial h : ℝ)) ≤ + (4 * (D : ℝ) * (t : ℝ) ^ 2 / R) ^ h := by + have hRR : (0 : ℝ) < R := by exact_mod_cast hR + have hNR : (0 : ℝ) < N := by exact_mod_cast hN + have hden : ((R : ℝ) / 2) ^ h * ((N : ℝ) / 2) ^ h ≤ + (R.descFactorial h : ℝ) * (N.descFactorial h : ℝ) := + mul_le_mul (half_pow_le_descFactorial R h hRlarge) + (half_pow_le_descFactorial N h hNlarge) (by positivity) (by positivity) + have hpos : 0 < ((R : ℝ) / 2) ^ h * ((N : ℝ) / 2) ^ h := by positivity + calc + _ ≤ (t : ℝ) ^ (2 * h) * ((D : ℝ) * N) ^ h / + (((R : ℝ) / 2) ^ h * ((N : ℝ) / 2) ^ h) := + div_le_div_of_nonneg_left (by positivity) hpos hden + _ = ((t : ℝ) ^ 2 * ((D : ℝ) * N) / (((R : ℝ) / 2) * ((N : ℝ) / 2))) ^ h := by + simp only [div_pow, mul_pow, pow_mul] + _ = _ := by + congr 1 + field_simp + ring + +theorem low_occupancy_exponent_neg (D : ℕ) (κ : ℝ) (hκ : κ < 1 / 10) : + (D : ℝ) - 10 * ((D : ℝ) + 1) * (1 / 2 - κ / 4) < 0 := by + have hD : (0 : ℝ) ≤ D := Nat.cast_nonneg _ + have hmul := mul_pos (by linarith : 0 < (D : ℝ) + 1) + (sub_pos.mpr hκ) + nlinarith + +theorem high_occupancy_exponent_neg (D : ℕ) (κ : ℝ) (hκ : 0 < κ) : + (D : ℝ) - 10 * ((D : ℝ) + 1) * (1 / 2 + κ / 4) < 0 := by + have hD : (0 : ℝ) ≤ D := Nat.cast_nonneg _ + have hmul := mul_pos (by linarith : 0 < (D : ℝ) + 1) hκ + nlinarith + +end RyserCoveringCounterexample.LineCover + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/SurvivalNumerics.lean b/lean/OAI/Combinatorics/Ryser/LineCover/SurvivalNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..c1e8e18757eab29e1dfb9ca8ae1e078e1f7c3f9b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/SurvivalNumerics.lean @@ -0,0 +1,66 @@ +import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Ring + +namespace OAI + +namespace RyserCoveringCounterexample.LineCover + +private theorem log_one_quarter_le_neg_one : Real.log (1 / 4 : ℝ) ≤ -1 := by + have hlog4 : (1 : ℝ) ≤ Real.log 4 := by + have h := Real.le_log_one_add_of_nonneg (x := 3) (by norm_num) + norm_num at h + linarith + rw [one_div, Real.log_inv] + linarith + +theorem one_quarter_le_survival_pow_pred (q : ℕ) (hq : 2 ≤ q) : + (1 / 4 : ℝ) ≤ (1 - 1 / (q : ℝ)) ^ (q - 1) := by + have hq1 : 1 ≤ q := le_trans (by decide : 1 ≤ 2) hq + have hqR : (2 : ℝ) ≤ q := by exact_mod_cast hq + have hq0 : (0 : ℝ) < q := by linarith + have hqm : (0 : ℝ) < (q : ℝ) - 1 := by linarith + have hbase : 1 - 1 / (q : ℝ) = ((q : ℝ) - 1) / (q : ℝ) := by + field_simp [hq0.ne'] + have hb : (0 : ℝ) < 1 - 1 / (q : ℝ) := by + rw [hbase] + exact div_pos hqm hq0 + have hunit : ((q - 1 : ℕ) : ℝ) * (1 - (1 - 1 / (q : ℝ))⁻¹) = -1 := by + rw [Nat.cast_sub hq1, Nat.cast_one, hbase, inv_div] + field_simp [hqm.ne']; ring + have hlog := mul_le_mul_of_nonneg_left + (Real.one_sub_inv_le_log_of_pos hb) + (Nat.cast_nonneg (q - 1) : (0 : ℝ) ≤ ((q - 1 : ℕ) : ℝ)) + rw [hunit] at hlog + apply (Real.log_le_log_iff (by norm_num : (0 : ℝ) < 1 / 4) + (pow_pos hb (q - 1))).mp + rw [Real.log_pow] + exact log_one_quarter_le_neg_one.trans hlog + +theorem one_quarter_le_survival_pow (q n : ℕ) (hq : 2 ≤ q) (hn : n ≤ q - 1) : + (1 / 4 : ℝ) ≤ (1 - 1 / (q : ℝ)) ^ n := by + have hqR : (2 : ℝ) ≤ q := by exact_mod_cast hq + have hq0 : (0 : ℝ) < q := by linarith + have hinv : 1 / (q : ℝ) ≤ 1 := (div_le_one hq0).2 (by linarith) + have hb0 : (0 : ℝ) ≤ 1 - 1 / (q : ℝ) := sub_nonneg.mpr hinv + have hb1 : 1 - 1 / (q : ℝ) ≤ 1 := by + have hnonneg : (0 : ℝ) ≤ 1 / (q : ℝ) := div_nonneg (by norm_num) hq0.le + linarith + exact (one_quarter_le_survival_pow_pred q hq).trans + (pow_le_pow_of_le_one hb0 hb1 hn) + +theorem one_quarter_le_survival_pow_sub_two (q : ℕ) (hq : 2 ≤ q) : + (1 / 4 : ℝ) ≤ (1 - 1 / (q : ℝ)) ^ (q - 2) := + one_quarter_le_survival_pow q (q - 2) hq (Nat.sub_le_sub_left (by decide : 1 ≤ 2) q) + +theorem quarter_mul_le_survival_mean (q : ℕ) (hq : 2 ≤ q) : + (q : ℝ) / 4 ≤ (q : ℝ) * (1 - 1 / (q : ℝ)) ^ (q - 2) := by + have h := mul_le_mul_of_nonneg_left (one_quarter_le_survival_pow_sub_two q hq) + (Nat.cast_nonneg q : (0 : ℝ) ≤ q) + simpa only [mul_one_div] using h + +end RyserCoveringCounterexample.LineCover + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/SurvivorSampling.lean b/lean/OAI/Combinatorics/Ryser/LineCover/SurvivorSampling.lean new file mode 100644 index 0000000000000000000000000000000000000000..2e96c6480e4a0e3e187b0876aedcc62cfe06c3be --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/SurvivorSampling.lean @@ -0,0 +1,154 @@ +import OAI.Combinatorics.Ryser.LineCover.SamplingDefinitions +import OAI.Combinatorics.Ryser.LineCover.PairCounting +import OAI.Combinatorics.Ryser.LineCover.PairSampling +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Positivity + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable +open scoped BigOperators + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [instFintypeF : Fintype F] [instDecidableEqF : DecidableEq F] + +theorem card_cross_survivors_le_hitCount (X : Finset (Point F)) + {t : ℕ} (a : LineTuple F t) : + (X ∩ crossPoints a).card ≤ crossHitCount X a := by + classical + let S := X ∩ crossPoints a + have hex (x : ↥S) : ∃ p : Fin t × Fin t, + Incidence x.val (a (Sum.inl p.1)) ∧ Incidence x.val (a (Sum.inr p.2)) := by + obtain ⟨i, j, hi, hj⟩ := + (mem_crossPoints a x.val).mp (Finset.mem_inter.mp x.property).2 + exact ⟨(i, j), hi, hj⟩ + let rep (x : ↥S) : Fin t × Fin t := Classical.choose (hex x) + have hrep (x : ↥S) : + Incidence x.val (a (Sum.inl (rep x).1)) ∧ + Incidence x.val (a (Sum.inr (rep x).2)) := Classical.choose_spec (hex x) + let encode : ↥S → {p : Fin t × Fin t // CrossHit X a p} := fun x => + ⟨rep x, x.val, (Finset.mem_inter.mp x.property).1, (hrep x).1, (hrep x).2⟩ + have hinj : Function.Injective encode := by + intro x y hxy + have hp : rep x = rep y := congrArg Subtype.val hxy + apply Subtype.ext + exact eq_of_common_incidence_of_ne_lines (left_ne_right a (rep x).1 (rep x).2) + (hrep x).1 (hrep x).2 + (by simpa only [hp] using (hrep y).1) + (by simpa only [hp] using (hrep y).2) + calc + (X ∩ crossPoints a).card = Fintype.card ↥S := (Fintype.card_coe S).symm + _ ≤ Fintype.card {p : Fin t × Fin t // CrossHit X a p} := + Fintype.card_le_of_injective encode hinj + _ = crossHitCount X a := by + rw [Fintype.card_subtype] + unfold crossHitCount + apply congrArg Finset.card + ext p + simp only [Finset.mem_filter] + +theorem crossHitCount_eq_sum (X : Finset (Point F)) {t : ℕ} + (a : LineTuple F t) : + (crossHitCount X a : ℝ) = + ∑ p : Fin t × Fin t, if CrossHit X a p then (1 : ℝ) else 0 := let _ := instFintypeF; let _ := instDecidableEqF; by + exact Finset.natCast_card_filter (CrossHit X a) Finset.univ + +theorem prob_crossHit_le (X : Finset (Point F)) (L : Finset (AffineLine F)) + {t : ℕ} [Nonempty (CoverSample L t)] (p : Fin t × Fin t) : + (FiniteLaw.uniform (CoverSample L t)).prob + (fun u => CrossHit X (liftSample L u) p) ≤ + (orderedPairMass Incidence X L : ℝ) / (L.card.descFactorial 2 : ℝ) := let _ := instFintypeF; let _ := instDecidableEqF; by + classical + let left : Fin 1 ↪ Fin t := ⟨fun _ => p.1, fun _ _ _ => Subsingleton.elim _ _⟩ + let right : Fin 1 ↪ Fin t := ⟨fun _ => p.2, fun _ _ _ => Subsingleton.elim _ _⟩ + have h := InjectionSampling.prob_disjoint_pairs_le + (Function.Embedding.sumMap left right) (populationSurvivorPairs X L) + have hevent : + (fun u : CoverSample L t => ∀ k : Fin 1, + (u (Sum.inl (left k)), u (Sum.inr (right k))) ∈ populationSurvivorPairs X L) = + (fun u => CrossHit X (liftSample L u) p) := by + funext u + apply propext + have hne : u (Sum.inl p.1) ≠ u (Sum.inr p.2) := by + intro heq + exact Sum.inl_ne_inr (u.injective heq) + change (∀ _k : Fin 1, + (u (Sum.inl p.1), u (Sum.inr p.2)) ∈ populationSurvivorPairs X L) ↔ _ + constructor + · intro hu + exact ((mem_populationSurvivorPairs X L _).mp (hu 0)).2 + · intro hu _k + exact (mem_populationSurvivorPairs X L _).mpr ⟨hne, hu⟩ + change (FiniteLaw.uniform (CoverSample L t)).prob + (fun u => ∀ k : Fin 1, + (u (Sum.inl (left k)), u (Sum.inr (right k))) ∈ populationSurvivorPairs X L) ≤ _ at h + rw [hevent] at h + simpa only [pow_one, Nat.mul_one, Fintype.card_coe, + card_populationSurvivorPairs_eq_orderedPairMass] using h + +theorem expectation_crossHitCount_le + (X : Finset (Point F)) (L : Finset (AffineLine F)) + {t : ℕ} [Nonempty (CoverSample L t)] : + (FiniteLaw.uniform (CoverSample L t)).expectation + (fun u => (crossHitCount X (liftSample L u) : ℝ)) ≤ + (t : ℝ) ^ 2 * (orderedPairMass Incidence X L : ℝ) / + (L.card.descFactorial 2 : ℝ) := by + let μ := FiniteLaw.uniform (CoverSample L t) + calc + _ = μ.expectation (fun u => ∑ p : Fin t × Fin t, + if CrossHit X (liftSample L u) p then (1 : ℝ) else 0) := by + congr 1 + funext u + exact crossHitCount_eq_sum X (liftSample L u) + _ = ∑ p : Fin t × Fin t, μ.expectation + (fun u => if CrossHit X (liftSample L u) p then (1 : ℝ) else 0) := + μ.expectation_sum _ + _ = ∑ p : Fin t × Fin t, μ.prob (fun u => CrossHit X (liftSample L u) p) := by + apply Finset.sum_congr rfl + intro p _ + exact (μ.prob_eq_expectation _).symm + _ ≤ ∑ _p : Fin t × Fin t, + (orderedPairMass Incidence X L : ℝ) / (L.card.descFactorial 2 : ℝ) := by + apply Finset.sum_le_sum + intro p _ + exact prob_crossHit_le X L p + _ = _ := by + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_prod, + Fintype.card_fin, nsmul_eq_mul, Nat.cast_mul] + ring + +theorem prob_many_cross_survivors_le + (X : Finset (Point F)) (L : Finset (AffineLine F)) + {t : ℕ} [Nonempty (CoverSample L t)] {δ : ℝ} (hδ : 0 < δ) (ht : 0 < t) : + (FiniteLaw.uniform (CoverSample L t)).prob + (fun u => δ * (t : ℝ) ^ 2 / 2 ≤ + ((X ∩ crossPoints (liftSample L u)).card : ℝ)) ≤ + 2 * (orderedPairMass Incidence X L : ℝ) / + (δ * (L.card.descFactorial 2 : ℝ)) := by + let μ := FiniteLaw.uniform (CoverSample L t) + have htR : 0 < (t : ℝ) := Nat.cast_pos.mpr ht + have hthreshold : 0 < δ * (t : ℝ) ^ 2 / 2 := by positivity + calc + _ ≤ μ.prob (fun u => δ * (t : ℝ) ^ 2 / 2 ≤ + (crossHitCount X (liftSample L u) : ℝ)) := by + apply μ.prob_mono + intro u hu + exact hu.trans (Nat.cast_le.mpr (card_cross_survivors_le_hitCount X _)) + _ ≤ μ.expectation (fun u => (crossHitCount X (liftSample L u) : ℝ)) / + (δ * (t : ℝ) ^ 2 / 2) := + μ.prob_ge_le_expectation_div _ (fun _ => Nat.cast_nonneg _) hthreshold + _ ≤ ((t : ℝ) ^ 2 * (orderedPairMass Incidence X L : ℝ) / + (L.card.descFactorial 2 : ℝ)) / (δ * (t : ℝ) ^ 2 / 2) := + div_le_div_of_nonneg_right (expectation_crossHitCount_le X L) hthreshold.le + _ = _ := by + by_cases hden : (L.card.descFactorial 2 : ℝ) = 0 + · simp only [hden, div_zero, mul_zero, zero_div] + · field_simp [hδ.ne', htR.ne', hden] + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/TailNumerics.lean b/lean/OAI/Combinatorics/Ryser/LineCover/TailNumerics.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8802200c78fbffa5cfd8ff62f6e2722f17565ec --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/TailNumerics.lean @@ -0,0 +1,162 @@ +import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics +import Mathlib.Algebra.Polynomial.Eval.Defs +import Mathlib.Algebra.Order.Floor.Semiring +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +open Filter Topology + +theorem tendsto_log_pow_mul_rpow_neg_atTop (k : ℕ) {a : ℝ} (ha : 0 < a) : + Tendsto (fun q : ℝ => (Real.log q) ^ k * q ^ (-a)) atTop (𝓝 0) := by + have hdiv : Tendsto (fun q : ℝ => (Real.log q) ^ k / q ^ a) atTop (𝓝 0) := by + simpa only [Real.rpow_natCast] using + (isLittleO_log_rpow_rpow_atTop (s := a) (k : ℝ) ha).tendsto_div_nhds_zero + refine hdiv.congr' ?_ + filter_upwards [eventually_ge_atTop (0 : ℝ)] with q hq + simp only [Real.rpow_neg hq, div_eq_mul_inv] + +theorem tendsto_rpow_mul_exp_neg_rpow_atTop (r : ℝ) {a c : ℝ} + (ha : 0 < a) (hc : 0 < c) : + Tendsto (fun q : ℝ => q ^ r * Real.exp (-c * q ^ a)) atTop (𝓝 0) := by + refine ((tendsto_rpow_mul_exp_neg_mul_atTop_nhds_zero + (r / a) c hc).comp (tendsto_rpow_atTop ha)).congr' ?_ + filter_upwards [eventually_ge_atTop (0 : ℝ)] with q hq + dsimp only [Function.comp_apply] + rw [← Real.rpow_mul hq, mul_div_cancel₀ r ha.ne'] + +theorem tendsto_polynomial_mul_exp_neg_rpow_atTop (p : Polynomial ℝ) {a c : ℝ} + (ha : 0 < a) (hc : 0 < c) : + Tendsto (fun q : ℝ => p.eval q * Real.exp (-c * q ^ a)) atTop (𝓝 0) := by + induction p using Polynomial.induction_on' with + | add p r hp hr => + simpa only [Polynomial.eval_add, add_mul, add_zero] using hp.add hr + | monomial k b => + simpa only [Polynomial.eval_monomial, Real.rpow_natCast, mul_assoc, mul_zero] using + (tendsto_rpow_mul_exp_neg_rpow_atTop (k : ℝ) ha hc).const_mul b + +theorem tendsto_count_failure_atTop {D ε : ℝ} (hD : 0 < D) (hε : 0 < ε) : + Tendsto (fun q : ℝ => + 2 * (1 + q * (q + 1)) * Real.exp (-q ^ (2 * ε) / (16 * D ^ 5))) + atTop (𝓝 0) := by + have hc : 0 < (16 * D ^ 5)⁻¹ := by positivity + have ha : 0 < 2 * ε := by positivity + have h := tendsto_polynomial_mul_exp_neg_rpow_atTop + (2 * (1 + Polynomial.X * (Polynomial.X + 1)) : Polynomial ℝ) ha hc + simpa [div_eq_mul_inv, mul_comm, mul_left_comm, mul_assoc] using h + +def logarithmicSampleSize (A q : ℝ) : ℕ := ⌈A * Real.log q⌉₊ + +theorem tendsto_logarithmicSampleSize_atTop {A : ℝ} (hA : 0 < A) : + Tendsto (fun q : ℝ => (logarithmicSampleSize A q : ℝ)) atTop atTop := by + apply tendsto_atTop_mono (fun q => Nat.le_ceil (A * Real.log q)) + exact Real.tendsto_log_atTop.const_mul_atTop hA + +theorem tendsto_sampleSize_pow_mul_rpow_neg_atTop (k : ℕ) {A a : ℝ} + (hA : 0 < A) (ha : 0 < a) : + Tendsto (fun q : ℝ => (logarithmicSampleSize A q : ℝ) ^ k * q ^ (-a)) + atTop (𝓝 0) := by + have hbound : Tendsto + (fun q : ℝ => (A + 1) ^ k * ((Real.log q) ^ k * q ^ (-a))) + atTop (𝓝 0) := by + simpa only [mul_zero] using (tendsto_log_pow_mul_rpow_neg_atTop k ha).const_mul + ((A + 1) ^ k) + apply squeeze_zero' ?_ ?_ hbound + · filter_upwards [eventually_ge_atTop (0 : ℝ)] with q hq + exact mul_nonneg (pow_nonneg (Nat.cast_nonneg _) _) (Real.rpow_nonneg hq _) + · filter_upwards [eventually_ge_atTop (0 : ℝ), + Real.tendsto_log_atTop.eventually_ge_atTop 1] with q hq hlog + have harg : 0 ≤ A * Real.log q := mul_nonneg hA.le (by linarith) + have hceil : (logarithmicSampleSize A q : ℝ) ≤ A * Real.log q + 1 := + (Nat.ceil_lt_add_one harg).le + have hs : (logarithmicSampleSize A q : ℝ) ≤ (A + 1) * Real.log q := by + nlinarith + have hp := pow_le_pow_left₀ (Nat.cast_nonneg (logarithmicSampleSize A q)) hs k + simpa only [mul_pow, mul_assoc] using + mul_le_mul_of_nonneg_right hp (Real.rpow_nonneg hq (-a)) + +theorem log_affine_line_count_le {q : ℝ} (hq : 4 ≤ q) : + Real.log (q * (q + 1)) ≤ (5 / 2 : ℝ) * Real.log q := by + have hq0 : 0 < q := by linarith + have hq1 : 0 < q + 1 := by linarith + have hsmall := Real.log_le_log hq1 (show q + 1 ≤ 2 * q by linarith) + rw [Real.log_mul (by norm_num : (2 : ℝ) ≠ 0) hq0.ne'] at hsmall + have hlarge := Real.log_le_log + (show 0 < (2 : ℝ) ^ 2 by norm_num) (show (2 : ℝ) ^ 2 ≤ q by nlinarith) + rw [Real.log_pow] at hlarge + norm_num only [Nat.cast_ofNat] at hlarge + rw [Real.log_mul hq0.ne' hq1.ne'] + nlinarith + +theorem tuple_failure_le_envelope {q A c0 : ℝ} (t : ℕ) (hq : 4 ≤ q) + (hA : 0 < A) (ht : A * Real.log q ≤ (t : ℝ)) : + 2 * (q * (q + 1)) ^ (2 * t) * Real.exp (-c0 * (t : ℝ) ^ 2) ≤ + 2 * Real.exp (-(c0 - 5 / A) * (t : ℝ) ^ 2) := by + have hq0 : 0 < q := by linarith + have hb : 0 < q * (q + 1) := mul_pos hq0 (by linarith) + have hlog := log_affine_line_count_le hq + have hcount : (q * (q + 1)) ^ (2 * t) ≤ + Real.exp (5 * (t : ℝ) * Real.log q) := by + rw [← Real.exp_log (pow_pos hb (2 * t))] + apply Real.exp_le_exp.mpr + rw [Real.log_pow] + simp only [Nat.cast_mul, Nat.cast_ofNat] + nlinarith [mul_le_mul_of_nonneg_left hlog (Nat.cast_nonneg t)] + have hlogDiv : Real.log q ≤ (t : ℝ) / A := + (le_div_iff₀ hA).2 (by nlinarith [ht]) + have hexponent : 5 * (t : ℝ) * Real.log q - c0 * (t : ℝ) ^ 2 ≤ + -(c0 - 5 / A) * (t : ℝ) ^ 2 := by + have hmul := mul_le_mul_of_nonneg_left hlogDiv + (show 0 ≤ 5 * (t : ℝ) by positivity) + simp only [div_eq_mul_inv] at hmul ⊢ + nlinarith + calc + 2 * (q * (q + 1)) ^ (2 * t) * Real.exp (-c0 * (t : ℝ) ^ 2) ≤ + 2 * Real.exp (5 * (t : ℝ) * Real.log q) * + Real.exp (-c0 * (t : ℝ) ^ 2) := + mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hcount (by norm_num)) (Real.exp_pos _).le + _ = 2 * Real.exp (5 * (t : ℝ) * Real.log q - c0 * (t : ℝ) ^ 2) := by + rw [mul_assoc, ← Real.exp_add, sub_eq_add_neg, neg_mul] + _ ≤ 2 * Real.exp (-(c0 - 5 / A) * (t : ℝ) ^ 2) := + mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr hexponent) (by norm_num) + +theorem tendsto_tuple_failure_atTop {A c0 : ℝ} (hc0 : 0 < c0) (hA : 5 / c0 < A) : + Tendsto (fun q : ℝ => + 2 * (q * (q + 1)) ^ (2 * logarithmicSampleSize A q) * + Real.exp (-c0 * (logarithmicSampleSize A q : ℝ) ^ 2)) atTop (𝓝 0) := by + have hA0 : 0 < A := lt_trans (div_pos (by norm_num) hc0) hA + have hfive : 5 < A * c0 := (div_lt_iff₀ hc0).mp hA + have hcoefficient : 0 < c0 - 5 / A := by + have hdiv : 5 / A < c0 := (div_lt_iff₀ hA0).2 (by nlinarith) + linarith + have hsquare : Tendsto + (fun q : ℝ => (logarithmicSampleSize A q : ℝ) ^ 2) atTop atTop := + (tendsto_pow_atTop (by decide : (2 : ℕ) ≠ 0)).comp + (tendsto_logarithmicSampleSize_atTop hA0) + have henvelope : Tendsto + (fun q : ℝ => 2 * Real.exp (-(c0 - 5 / A) * + (logarithmicSampleSize A q : ℝ) ^ 2)) atTop (𝓝 0) := by + simpa only [Function.comp_apply, Real.rpow_zero, one_mul, mul_zero] using + ((tendsto_rpow_mul_exp_neg_mul_atTop_nhds_zero + 0 (c0 - 5 / A) hcoefficient).comp hsquare).const_mul (2 : ℝ) + apply squeeze_zero' ?_ ?_ henvelope + · filter_upwards [eventually_ge_atTop (4 : ℝ)] with q hq + have hq0 : 0 ≤ q := by linarith + positivity + · filter_upwards [eventually_ge_atTop (4 : ℝ)] with q hq + exact tuple_failure_le_envelope (logarithmicSampleSize A q) hq hA0 + (Nat.le_ceil (A * Real.log q)) + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/TupleConcentration.lean b/lean/OAI/Combinatorics/Ryser/LineCover/TupleConcentration.lean new file mode 100644 index 0000000000000000000000000000000000000000..b7ceba86589f6c58d70bd64726f8b0c9b4fe0851 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/TupleConcentration.lean @@ -0,0 +1,243 @@ +import OAI.Combinatorics.Ryser.LineCover.Definitions +import OAI.Combinatorics.Ryser.LineCover.CountConcentration +import Mathlib.Tactic.Positivity + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.LineCover + +def countTailConstant (D H : ℕ) (δ : ℝ) : ℝ := + min (δ ^ 2 / (16 * (D : ℝ) ^ 2 * ((D : ℝ) * (H : ℝ)) ^ 2)) + (δ / (16 * ((D : ℝ) * (H : ℝ)))) + +def tupleTailConstant (D h : ℕ) (δ : ℝ) : ℝ := + countTailConstant D (2 * D * h) δ + +theorem countTailConstant_pos {D H : ℕ} {δ : ℝ} + (hD : 0 < D) (hH : 0 < H) (hδ : 0 < δ) : + 0 < countTailConstant D H δ := by + have hDr : 0 < (D : ℝ) := by exact_mod_cast hD + have hHr : 0 < (H : ℝ) := by exact_mod_cast hH + unfold countTailConstant + apply lt_min <;> positivity + +theorem tupleTailConstant_pos {D h : ℕ} {δ : ℝ} + (hD : 0 < D) (hh : 0 < h) (hδ : 0 < δ) : + 0 < tupleTailConstant D h δ := + countTailConstant_pos hD + (Nat.mul_pos (Nat.mul_pos (by decide) hD) hh) hδ + +private theorem variance_budget_real (n D q C t : ℝ) + (hD : 0 ≤ D) (hq : 0 < q) (hn : n ≤ D * q) : + n * C ^ 2 * (t ^ 2 * (D / q)) ≤ D ^ 2 * C ^ 2 * t ^ 2 := by + have hq0 : q ≠ 0 := ne_of_gt hq + have hscale : 0 ≤ C ^ 2 * (t ^ 2 * (D / q)) := + mul_nonneg (sq_nonneg C) + (mul_nonneg (sq_nonneg t) (div_nonneg hD (le_of_lt hq))) + calc + n * C ^ 2 * (t ^ 2 * (D / q)) = + n * (C ^ 2 * (t ^ 2 * (D / q))) := by ring + _ ≤ (D * q) * (C ^ 2 * (t ^ 2 * (D / q))) := + mul_le_mul_of_nonneg_right hn hscale + _ = D ^ 2 * C ^ 2 * t ^ 2 := by + field_simp [hq0] + +private theorem tail_exponent_identity (D C T δ : ℝ) + (hD : 0 < D) (hC : 0 < C) (hT : 0 < T) : + -(1 / 4 : ℝ) * + min (((δ * T ^ 2 / 2) ^ 2) / (D ^ 2 * C ^ 2 * T ^ 2)) + ((δ * T ^ 2 / 2) / (2 * C)) = + -(min (δ ^ 2 / (16 * D ^ 2 * C ^ 2)) + (δ / (16 * C))) * T ^ 2 := by + let a : ℝ := δ ^ 2 / (16 * D ^ 2 * C ^ 2) + let b : ℝ := δ / (16 * C) + have hA : + ((δ * T ^ 2 / 2) ^ 2) / (D ^ 2 * C ^ 2 * T ^ 2) = + 4 * a * T ^ 2 := by + dsimp [a] + field_simp [ne_of_gt hD, ne_of_gt hC, ne_of_gt hT]; ring + have hB : (δ * T ^ 2 / 2) / (2 * C) = 4 * b * T ^ 2 := by + dsimp [b] + field_simp [ne_of_gt hC]; ring + change -(1 / 4 : ℝ) * min _ _ = -(min a b) * T ^ 2 + rw [hA, hB] + rcases le_total a b with h | h + · have hs : 4 * a * T ^ 2 ≤ 4 * b * T ^ 2 := + mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left h (by norm_num : (0 : ℝ) ≤ 4)) + (sq_nonneg T) + rw [min_eq_left hs, min_eq_left h] + ring + · have hs : 4 * b * T ^ 2 ≤ 4 * a * T ^ 2 := + mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left h (by norm_num : (0 : ℝ) ≤ 4)) + (sq_nonneg T) + rw [min_eq_right hs, min_eq_right h] + ring + +section General + +variable {P : Type*} [Fintype P] [DecidableEq P] + {shapes : Finset (Finset P)} {D n : ℕ} + +theorem retainedCount_square_lower_tail + (μ : Fin n → FiniteLaw (Outcome shapes D)) + (ignore : Finset (Finset P)) (test : Finset P) (H q t : ℕ) (δ : ℝ) + (hD : 0 < D) (hH : 0 < H) (hq : 0 < q) (ht : 0 < t) (hδ : 0 < δ) + (hn : n ≤ D * q) (hcard : test.card = t * t) + (hshape : ∀ L ∈ shapes, L ∉ ignore → (L ∩ test).card ≤ H) + (hpoint : ∀ i x, x ∈ test → + (μ i).prob (fun a => x ∈ deleted ∅ a) ≤ (D : ℝ) / (q : ℝ)) + (hbase : ∀ x ∈ test, + δ ≤ (FiniteLaw.pi μ).prob (fun ω => x ∈ survivors ∅ ω)) : + (FiniteLaw.pi μ).prob + (fun ω => retainedCount ignore test ω < δ * (t : ℝ) ^ 2 / 2) ≤ + 2 * Real.exp (-(countTailConstant D H δ) * (t : ℝ) ^ 2) := by + let C : ℝ := (D : ℝ) * (H : ℝ) + have hDr : 0 < (D : ℝ) := by exact_mod_cast hD + have hHr : 0 < (H : ℝ) := by exact_mod_cast hH + have hqr : 0 < (q : ℝ) := by exact_mod_cast hq + have htr : 0 < (t : ℝ) := by exact_mod_cast ht + have hC : 0 < C := mul_pos hDr hHr + have hnr : (n : ℝ) ≤ (D : ℝ) * (q : ℝ) := by exact_mod_cast hn + have hcardReal : (test.card : ℝ) = (t : ℝ) ^ 2 := by + rw [hcard, Nat.cast_mul, pow_two] + have hpointIgnore : ∀ i x, x ∈ test → + (μ i).prob (fun a => x ∈ deleted ignore a) ≤ (D : ℝ) / (q : ℝ) := by + intro i x hx + calc + _ ≤ (μ i).prob (fun a => x ∈ deleted ∅ a) := by + apply (μ i).prob_mono + intro a hxa + rcases mem_deleted.mp hxa with ⟨L, hL, hnot, hxL⟩ + exact mem_deleted.mpr ⟨L, hL, by simp, hxL⟩ + _ ≤ _ := hpoint i x hx + have hCV : (n : ℝ) * C ^ 2 * ((test.card : ℝ) * ((D : ℝ) / (q : ℝ))) ≤ + (D : ℝ) ^ 2 * C ^ 2 * (t : ℝ) ^ 2 := by + rw [hcardReal] + exact variance_budget_real (n : ℝ) (D : ℝ) (q : ℝ) C (t : ℝ) + hDr.le hqr hnr + have hmean0 := expectation_retainedCount_ge_of_base_survival μ ignore test δ hbase + rw [hcardReal] at hmean0 + have hmean : 2 * (δ * (t : ℝ) ^ 2 / 2) ≤ + (FiniteLaw.pi μ).expectation (retainedCount ignore test) := by + calc + _ = δ * (t : ℝ) ^ 2 := by ring + _ ≤ _ := hmean0 + have htail := retainedCount_rare_lower_tail μ ignore test H hshape + ((D : ℝ) / (q : ℝ)) hpointIgnore + (2 * C) ((D : ℝ) ^ 2 * C ^ 2 * (t : ℝ) ^ 2) + (δ * (t : ℝ) ^ 2 / 2) + (by positivity) (by positivity) (by positivity) + (le_of_eq (by dsimp [C]; ring)) hCV hmean + apply htail.trans_eq + apply congrArg (fun z : ℝ => 2 * Real.exp z) + simpa only [countTailConstant, C] using + tail_exponent_identity (D : ℝ) C (t : ℝ) δ hDr hC htr + +end General + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] + {shapes : Finset (Finset (Point F))} {D n h t : ℕ} + +theorem admissibleTuple_lower_tail + (μ : Fin n → FiniteLaw (Outcome shapes D)) + (a : LineTuple F t) (ha : AdmissibleTuple shapes D h a) + (δ : ℝ) (hD : 0 < D) (hh : 0 < h) (ht : 0 < t) (hδ : 0 < δ) + (hn : n ≤ D * Fintype.card F) + (hpoint : ∀ i x, + (μ i).prob (fun b => x ∈ deleted ∅ b) ≤ (D : ℝ) / (Fintype.card F : ℝ)) + (hbase : ∀ x, + δ ≤ (FiniteLaw.pi μ).prob (fun ω => x ∈ survivors ∅ ω)) : + (FiniteLaw.pi μ).prob (fun ω => + retainedCount (tupleShapes a) (crossPoints a) ω < δ * (t : ℝ) ^ 2 / 2) ≤ + 2 * Real.exp (-(tupleTailConstant D h δ) * (t : ℝ) ^ 2) := by + have hH : 0 < 2 * D * h := Nat.mul_pos (Nat.mul_pos (by decide) hD) hh + have hq : 0 < Fintype.card F := Fintype.card_pos_iff.mpr ⟨0⟩ + simpa only [tupleTailConstant] using retainedCount_square_lower_tail + μ (tupleShapes a) (crossPoints a) (2 * D * h) (Fintype.card F) t δ + hD hH hq ht hδ hn ha.2.1 ha.2.2 + (fun i x _ => hpoint i x) (fun x _ => hbase x) + +theorem prob_exists_admissibleTuple_bad_le + (μ : Fin n → FiniteLaw (Outcome shapes D)) + (δ : ℝ) (hD : 0 < D) (hh : 0 < h) (ht : 0 < t) (hδ : 0 < δ) + (hn : n ≤ D * Fintype.card F) + (hpoint : ∀ i x, + (μ i).prob (fun b => x ∈ deleted ∅ b) ≤ (D : ℝ) / (Fintype.card F : ℝ)) + (hbase : ∀ x, + δ ≤ (FiniteLaw.pi μ).prob (fun ω => x ∈ survivors ∅ ω)) : + (FiniteLaw.pi μ).prob (fun ω => ∃ a : LineTuple F t, + AdmissibleTuple shapes D h a ∧ + retainedCount (tupleShapes a) (crossPoints a) ω < δ * (t : ℝ) ^ 2 / 2) ≤ + 2 * (Fintype.card (LineTuple F t) : ℝ) * + Real.exp (-(tupleTailConstant D h δ) * (t : ℝ) ^ 2) := by + classical + calc + _ ≤ ∑ a : LineTuple F t, (FiniteLaw.pi μ).prob (fun ω => + AdmissibleTuple shapes D h a ∧ + retainedCount (tupleShapes a) (crossPoints a) ω < δ * (t : ℝ) ^ 2 / 2) := + (FiniteLaw.pi μ).prob_exists_le _ + _ ≤ ∑ _a : LineTuple F t, + 2 * Real.exp (-(tupleTailConstant D h δ) * (t : ℝ) ^ 2) := by + apply Finset.sum_le_sum + intro a _ + by_cases ha : AdmissibleTuple shapes D h a + · calc + _ ≤ (FiniteLaw.pi μ).prob (fun ω => + retainedCount (tupleShapes a) (crossPoints a) ω < + δ * (t : ℝ) ^ 2 / 2) := by + apply (FiniteLaw.pi μ).prob_mono + intro ω hω + exact hω.2 + _ ≤ _ := admissibleTuple_lower_tail μ a ha δ hD hh ht hδ hn hpoint hbase + · simp only [ha, false_and, FiniteLaw.prob_false] + positivity + _ = _ := by simp [mul_assoc, mul_comm] + +theorem card_lineTuple_le (F : Type*) [Field F] [Fintype F] + [DecidableEq F] (t : ℕ) : + Fintype.card (LineTuple F t) ≤ + (Fintype.card F * (Fintype.card F + 1)) ^ (2 * t) := by + classical + calc + Fintype.card (LineTuple F t) ≤ + Fintype.card ((Fin t ⊕ Fin t) → AffineLine F) := + Fintype.card_le_of_injective + (fun a : LineTuple F t => + (a : (Fin t ⊕ Fin t) → AffineLine F)) + Function.Embedding.coe_injective + _ = _ := by + rw [Fintype.card_fun] + simp [AffineLine, Direction, two_mul, Nat.mul_comm] + +theorem prob_exists_admissibleTuple_bad_le_card_bound + (μ : Fin n → FiniteLaw (Outcome shapes D)) + (δ : ℝ) (hD : 0 < D) (hh : 0 < h) (ht : 0 < t) (hδ : 0 < δ) + (hn : n ≤ D * Fintype.card F) + (hpoint : ∀ i x, + (μ i).prob (fun b => x ∈ deleted ∅ b) ≤ (D : ℝ) / (Fintype.card F : ℝ)) + (hbase : ∀ x, + δ ≤ (FiniteLaw.pi μ).prob (fun ω => x ∈ survivors ∅ ω)) : + (FiniteLaw.pi μ).prob (fun ω => ∃ a : LineTuple F t, + AdmissibleTuple shapes D h a ∧ + retainedCount (tupleShapes a) (crossPoints a) ω < δ * (t : ℝ) ^ 2 / 2) ≤ + 2 * ((Fintype.card F : ℝ) * ((Fintype.card F : ℝ) + 1)) ^ (2 * t) * + Real.exp (-(tupleTailConstant D h δ) * (t : ℝ) ^ 2) := by + have hcard : (Fintype.card (LineTuple F t) : ℝ) ≤ + ((Fintype.card F : ℝ) * ((Fintype.card F : ℝ) + 1)) ^ (2 * t) := by + exact_mod_cast card_lineTuple_le F t + apply (prob_exists_admissibleTuple_bad_le μ δ hD hh ht hδ hn hpoint hbase).trans + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hcard (by norm_num : (0 : ℝ) ≤ 2)) + (Real.exp_pos _).le + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/TupleGeometry.lean b/lean/OAI/Combinatorics/Ryser/LineCover/TupleGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..e8764c32e112c2f84612ee9c4fc64b4b529cad79 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/TupleGeometry.lean @@ -0,0 +1,94 @@ +import OAI.Combinatorics.Ryser.LineCover.Definitions +import OAI.Combinatorics.Ryser.Geometry.AffineJoins + +namespace OAI + +open scoped Classical +noncomputable section + +namespace RyserCoveringCounterexample.LineCover + +variable {F : Type*} [Field F] [instFintypeF : Fintype F] [instDecidableEqF : DecidableEq F] {t : ℕ} + +def NoParallel (a : LineTuple F t) : Prop := + ∀ i j, i ≠ j → (a i).1 ≠ (a j).1 + +def NoConcurrentTriple (a : LineTuple F t) : Prop := + ∀ p : ProjectivePoint F, ∀ i j k, i ≠ j → i ≠ k → j ≠ k → + ProjectiveIncidence p (some (a i)) → + ProjectiveIncidence p (some (a j)) → + ProjectiveIncidence p (some (a k)) → False + +theorem finiteCrossings_of_no_parallel (a : LineTuple F t) (h : NoParallel a) : + FiniteCrossings a := let _ := instFintypeF; let _ := instDecidableEqF; by + intro i j + exact (existsUnique_incident_of_ne_direction (a (Sum.inl i)) (a (Sum.inr j)) + (h _ _ (by intro he; cases he))).exists + +theorem crossPoints_eq_image_grid (a : LineTuple F t) + (g : Fin t × Fin t → Point F) + (hg : ∀ ij, Incidence (g ij) (a (Sum.inl ij.1)) ∧ + Incidence (g ij) (a (Sum.inr ij.2))) : + crossPoints a = Finset.univ.image g := by + ext x + constructor + · intro hx + obtain ⟨i, j, hi, hj⟩ := (mem_crossPoints a x).mp hx + apply Finset.mem_image.mpr + refine ⟨(i, j), Finset.mem_univ _, ?_⟩ + exact eq_of_common_incidence_of_ne_lines (left_ne_right a i j) + (hg (i, j)).1 (hg (i, j)).2 hi hj + · intro hx + obtain ⟨ij, _, rfl⟩ := Finset.mem_image.mp hx + exact (mem_crossPoints a (g ij)).mpr ⟨ij.1, ij.2, (hg ij).1, (hg ij).2⟩ + +theorem crossPoints_card_of_grid (a : LineTuple F t) + (g : Fin t × Fin t → Point F) + (hg : ∀ ij, Incidence (g ij) (a (Sum.inl ij.1)) ∧ + Incidence (g ij) (a (Sum.inr ij.2))) + (hinj : Function.Injective g) : (crossPoints a).card = t * t := by + rw [crossPoints_eq_image_grid a g hg, Finset.card_image_of_injective _ hinj] + simp only [Finset.card_univ, Fintype.card_prod, Fintype.card_fin] + +theorem grid_injective_of_no_concurrentTriple (a : LineTuple F t) + (g : Fin t × Fin t → Point F) + (hg : ∀ ij, Incidence (g ij) (a (Sum.inl ij.1)) ∧ + Incidence (g ij) (a (Sum.inr ij.2))) + (h : NoConcurrentTriple a) : Function.Injective g := let _ := instFintypeF; let _ := instDecidableEqF; by + rintro ⟨i, j⟩ ⟨k, l⟩ he + have hleft : Incidence (g (i, j)) (a (Sum.inl k)) := by + rw [he] + exact (hg (k, l)).1 + have hright : Incidence (g (i, j)) (a (Sum.inr l)) := by + rw [he] + exact (hg (k, l)).2 + have hik : i = k := by + by_contra hik + exact h (Sum.inl (g (i, j))) (Sum.inl i) (Sum.inl k) (Sum.inr j) + (fun hi => hik (Sum.inl.inj hi)) + (by intro hi; cases hi) (by intro hi; cases hi) + (hg (i, j)).1 hleft (hg (i, j)).2 + have hjl : j = l := by + by_contra hjl + exact h (Sum.inl (g (i, j))) (Sum.inl i) (Sum.inr j) (Sum.inr l) + (by intro hi; cases hi) (by intro hi; cases hi) + (fun hi => hjl (Sum.inr.inj hi)) + (hg (i, j)).1 (hg (i, j)).2 hright + exact Prod.ext hik hjl + +theorem finiteCrossings_card_of_no_parallel_no_concurrentTriple + (a : LineTuple F t) (hp : NoParallel a) (hc : NoConcurrentTriple a) : + FiniteCrossings a ∧ (crossPoints a).card = t * t := by + have hfinite := finiteCrossings_of_no_parallel a hp + choose g hg using hfinite + let grid : Fin t × Fin t → Point F := fun ij => g ij.1 ij.2 + have hgrid : ∀ ij, Incidence (grid ij) (a (Sum.inl ij.1)) ∧ + Incidence (grid ij) (a (Sum.inr ij.2)) := fun ij => hg ij.1 ij.2 + exact ⟨finiteCrossings_of_no_parallel a hp, crossPoints_card_of_grid a grid hgrid + (grid_injective_of_no_concurrentTriple a grid hgrid hc)⟩ + +end RyserCoveringCounterexample.LineCover + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/TwoPopulationMoments.lean b/lean/OAI/Combinatorics/Ryser/LineCover/TwoPopulationMoments.lean new file mode 100644 index 0000000000000000000000000000000000000000..da61111342f0a3a4793f9d3e60b7ab4bb659c61f --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/TwoPopulationMoments.lean @@ -0,0 +1,123 @@ +import OAI.Combinatorics.Ryser.LineCover.TwoPopulationSampling + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable +open scoped BigOperators + +namespace RyserCoveringCounterexample.InjectionSampling + +theorem prob_product_average_right + {A B : Type*} [Fintype A] [Fintype B] + (mu : FiniteLaw A) (nu : FiniteLaw B) (P : A × B → Prop) : + (mu.prod nu).prob P = nu.expectation (fun b => mu.prob (fun a => P (a, b))) := by + rw [FiniteLaw.prob_prod_average] + unfold FiniteLaw.expectation FiniteLaw.prob + simp_rw [Finset.mul_sum] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro b _ + apply Finset.sum_congr rfl + intro a _ + by_cases hp : P (a, b) <;> simp [hp, mul_comm] + +theorem prob_coordinate_product + {A B I J : Type*} [Fintype A] [Fintype B] [Fintype I] [Fintype J] + [Nonempty A] [Nonempty B] [Nonempty (I ↪ A)] [Nonempty (J ↪ B)] + (i : I) (j : J) (P : A × B → Prop) : + ((FiniteLaw.uniform (I ↪ A)).prod (FiniteLaw.uniform (J ↪ B))).prob + (fun z => P (z.1 i, z.2 j)) = + ((FiniteLaw.uniform A).prod (FiniteLaw.uniform B)).prob P := by + rw [FiniteLaw.prob_prod_average, FiniteLaw.prob_prod_average] + calc + _ = (FiniteLaw.uniform (I ↪ A)).expectation + (fun a => (FiniteLaw.uniform B).prob (fun b => P (a i, b))) := by + congr 1 + funext a + exact prob_coordinate j (fun b => P (a i, b)) + _ = _ := expectation_coordinate i + (fun a => (FiniteLaw.uniform B).prob (fun b => P (a, b))) + +theorem prob_coordinate_pair_mem + {A B I J : Type*} [Fintype A] [Fintype B] [Fintype I] [Fintype J] + [Nonempty A] [Nonempty B] [Nonempty (I ↪ A)] [Nonempty (J ↪ B)] + (S : Finset (A × B)) (i : I) (j : J) : + ((FiniteLaw.uniform (I ↪ A)).prod (FiniteLaw.uniform (J ↪ B))).prob + (fun z => (z.1 i, z.2 j) ∈ S) = + (S.card : ℝ) / ((Fintype.card A : ℝ) * Fintype.card B) := by + rw [prob_coordinate_product, ← FiniteLaw.uniform_prod, FiniteLaw.uniform_prob] + have hfilter : @Finset.filter _ (fun z => z ∈ S) + (fun z => Classical.propDecidable (z ∈ S)) Finset.univ = S := by + ext z + simp only [Finset.mem_filter, Finset.mem_univ, true_and] + rw [hfilter, Fintype.card_prod, Nat.cast_mul] + +def relationCount {A B : Type*} [Fintype A] [Fintype B] {t : ℕ} + (S : Finset (A × B)) (z : (Fin t ↪ A) × (Fin t ↪ B)) : ℕ := + (Finset.univ.filter fun ij : Fin t × Fin t => (z.1 ij.1, z.2 ij.2) ∈ S).card + +theorem expectation_relationCount + {A B : Type*} [Fintype A] [Fintype B] [Nonempty A] [Nonempty B] + {t : ℕ} [Nonempty (Fin t ↪ A)] [Nonempty (Fin t ↪ B)] + (S : Finset (A × B)) : + ((FiniteLaw.uniform (Fin t ↪ A)).prod (FiniteLaw.uniform (Fin t ↪ B))).expectation + (fun z => (relationCount S z : ℝ)) = + (t : ℝ) ^ 2 * S.card / ((Fintype.card A : ℝ) * Fintype.card B) := by + let mu := (FiniteLaw.uniform (Fin t ↪ A)).prod (FiniteLaw.uniform (Fin t ↪ B)) + have hcount (z : (Fin t ↪ A) × (Fin t ↪ B)) : + (relationCount S z : ℝ) = + ∑ ij : Fin t × Fin t, if (z.1 ij.1, z.2 ij.2) ∈ S then 1 else 0 := + Finset.natCast_card_filter _ _ + calc + _ = mu.expectation (fun z => + ∑ ij : Fin t × Fin t, if (z.1 ij.1, z.2 ij.2) ∈ S then 1 else 0) := by + congr 1 + funext z + exact hcount z + _ = ∑ ij : Fin t × Fin t, + mu.expectation (fun z => if (z.1 ij.1, z.2 ij.2) ∈ S then 1 else 0) := + mu.expectation_sum _ + _ = ∑ ij : Fin t × Fin t, + mu.prob (fun z => (z.1 ij.1, z.2 ij.2) ∈ S) := by + apply Finset.sum_congr rfl + intro ij _ + rw [FiniteLaw.prob_eq_expectation] + congr 1 + funext z + by_cases hz : (z.1 ij.1, z.2 ij.2) ∈ S <;> simp [hz] + _ = ∑ _ij : Fin t × Fin t, + (S.card : ℝ) / ((Fintype.card A : ℝ) * Fintype.card B) := by + apply Finset.sum_congr rfl + intro ij _ + exact prob_coordinate_pair_mem S ij.1 ij.2 + _ = _ := by + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_prod, + Fintype.card_fin, nsmul_eq_mul, Nat.cast_mul] + ring + +theorem prob_hits_finset_le + {A : Type*} [Fintype A] [Nonempty A] {t : ℕ} [Nonempty (Fin t ↪ A)] + (S : Finset A) : + (FiniteLaw.uniform (Fin t ↪ A)).prob (fun z => ∃ i, z i ∈ S) ≤ + (t : ℝ) * S.card / Fintype.card A := by + have hfilter : @Finset.filter _ (fun a => a ∈ S) + (fun a => Classical.propDecidable (a ∈ S)) Finset.univ = S := by + ext a + simp only [Finset.mem_filter, Finset.mem_univ, true_and] + calc + _ ≤ ∑ i : Fin t, (FiniteLaw.uniform (Fin t ↪ A)).prob (fun z => z i ∈ S) := + (FiniteLaw.uniform (Fin t ↪ A)).prob_exists_le _ + _ = ∑ _i : Fin t, (S.card : ℝ) / Fintype.card A := by + apply Finset.sum_congr rfl + intro i _ + rw [prob_coordinate i, FiniteLaw.uniform_prob, hfilter] + _ = _ := by + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] + ring + +end RyserCoveringCounterexample.InjectionSampling + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/LineCover/TwoPopulationSampling.lean b/lean/OAI/Combinatorics/Ryser/LineCover/TwoPopulationSampling.lean new file mode 100644 index 0000000000000000000000000000000000000000..9dd6f65a2cf8a3a8e035c5bca4fa544766ede8cb --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/LineCover/TwoPopulationSampling.lean @@ -0,0 +1,152 @@ +import OAI.Combinatorics.Ryser.LineCover.InjectionSampling +import OAI.Combinatorics.Ryser.Probability.Product +import Mathlib.Data.Fintype.CardEmbedding +import Mathlib.Data.Fintype.BigOperators +import Mathlib.Tactic.Ring + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable + +open scoped BigOperators + +namespace RyserCoveringCounterexample + +namespace InjectionSampling + +theorem card_pairSample_relation_le + {A B : Type*} [Fintype A] [Fintype B] + (S : Finset (A × B)) (h : ℕ) : + Fintype.card {z : (Fin h ↪ A) × (Fin h ↪ B) // + ∀ i, (z.1 i, z.2 i) ∈ S} ≤ S.card ^ h := by + classical + let enc : {z : (Fin h ↪ A) × (Fin h ↪ B) // + ∀ i, (z.1 i, z.2 i) ∈ S} → (Fin h → ↥S) := + fun z i => ⟨(z.val.1 i, z.val.2 i), z.property i⟩ + have hinj : Function.Injective enc := by + intro z w hzw + apply Subtype.ext + apply Prod.ext + · apply Function.Embedding.ext + intro i + exact congrArg (fun f : Fin h → ↥S => (f i).val.1) hzw + · apply Function.Embedding.ext + intro i + exact congrArg (fun f : Fin h → ↥S => (f i).val.2) hzw + simpa only [Fintype.card_fun, Fintype.card_coe, Fintype.card_fin] using + Fintype.card_le_of_injective enc hinj + +theorem prob_restrict_product + {A B I J K L : Type*} + [Fintype A] [Fintype B] [Fintype I] [Fintype J] [Fintype K] [Fintype L] + [Nonempty (J ↪ A)] [Nonempty (I ↪ A)] + [Nonempty (L ↪ B)] [Nonempty (K ↪ B)] + (i : I ↪ J) (j : K ↪ L) (P : (I ↪ A) × (K ↪ B) → Prop) : + ((FiniteLaw.uniform (J ↪ A)).prod (FiniteLaw.uniform (L ↪ B))).prob + (fun z => P (restrict i z.1, restrict j z.2)) = + ((FiniteLaw.uniform (I ↪ A)).prod (FiniteLaw.uniform (K ↪ B))).prob P := by + rw [FiniteLaw.prob_prod_average, FiniteLaw.prob_prod_average] + calc + _ = (FiniteLaw.uniform (J ↪ A)).expectation + (fun a => (FiniteLaw.uniform (K ↪ B)).prob + (fun b => P (restrict i a, b))) := by + congr 1 + funext a + exact prob_restrict j (fun b => P (restrict i a, b)) + _ = _ := by + simpa only [FiniteLaw.expectation_map] using + congrArg + (fun mu : FiniteLaw (I ↪ A) => mu.expectation + (fun a => (FiniteLaw.uniform (K ↪ B)).prob (fun b => P (a, b)))) + (map_uniform_restrict (Ω := A) i) + +theorem prob_pairSample_relation_le + {A B : Type*} [Fintype A] [Fintype B] + (S : Finset (A × B)) (h : ℕ) + [Nonempty (Fin h ↪ A)] [Nonempty (Fin h ↪ B)] : + ((FiniteLaw.uniform (Fin h ↪ A)).prod (FiniteLaw.uniform (Fin h ↪ B))).prob + (fun z => ∀ i, (z.1 i, z.2 i) ∈ S) ≤ + (S.card : ℝ) ^ h / + ((Fintype.card A).descFactorial h * (Fintype.card B).descFactorial h : ℝ) := by + classical + rw [← FiniteLaw.uniform_prod, FiniteLaw.uniform_prob] + have hfilter : + @Finset.filter _ (fun z : (Fin h ↪ A) × (Fin h ↪ B) => + ∀ i, (z.1 i, z.2 i) ∈ S) + (fun z => Classical.propDecidable (∀ i, (z.1 i, z.2 i) ∈ S)) Finset.univ = + Finset.univ.filter (fun z : (Fin h ↪ A) × (Fin h ↪ B) => + ∀ i, (z.1 i, z.2 i) ∈ S) := + Finset.filter_congr_decidable _ _ _ + rw [hfilter] + have hnat : (Finset.univ.filter (fun z : (Fin h ↪ A) × (Fin h ↪ B) => + ∀ i, (z.1 i, z.2 i) ∈ S)).card ≤ S.card ^ h := by + simpa only [Fintype.card_subtype] using card_pairSample_relation_le S h + have hreal : ((Finset.univ.filter (fun z : (Fin h ↪ A) × (Fin h ↪ B) => + ∀ i, (z.1 i, z.2 i) ∈ S)).card : ℝ) ≤ ((S.card ^ h : ℕ) : ℝ) := + Nat.cast_le.mpr hnat + rw [Nat.cast_pow] at hreal + simpa only [Fintype.card_prod, Fintype.card_embedding_eq, Fintype.card_fin, + Nat.cast_mul] using + (div_le_div_of_nonneg_right hreal + (Nat.cast_nonneg (Fintype.card ((Fin h ↪ A) × (Fin h ↪ B))) : + (0 : ℝ) ≤ (Fintype.card ((Fin h ↪ A) × (Fin h ↪ B)) : ℝ))) + +theorem prob_restricted_relation_le + {A B : Type*} [Fintype A] [Fintype B] {h t : ℕ} + [Nonempty (Fin t ↪ A)] [Nonempty (Fin h ↪ A)] + [Nonempty (Fin t ↪ B)] [Nonempty (Fin h ↪ B)] + (S : Finset (A × B)) (i j : Fin h ↪ Fin t) : + ((FiniteLaw.uniform (Fin t ↪ A)).prod (FiniteLaw.uniform (Fin t ↪ B))).prob + (fun z => ∀ k, (z.1 (i k), z.2 (j k)) ∈ S) ≤ + (S.card : ℝ) ^ h / + ((Fintype.card A).descFactorial h * (Fintype.card B).descFactorial h : ℝ) := by + change ((FiniteLaw.uniform (Fin t ↪ A)).prod + (FiniteLaw.uniform (Fin t ↪ B))).prob + (fun z => (fun w : (Fin h ↪ A) × (Fin h ↪ B) => + ∀ k, (w.1 k, w.2 k) ∈ S) (restrict i z.1, restrict j z.2)) ≤ _ + rw [prob_restrict_product i j (fun w : (Fin h ↪ A) × (Fin h ↪ B) => + ∀ k, (w.1 k, w.2 k) ∈ S)] + exact prob_pairSample_relation_le S h + +theorem prob_relation_matching_le + {A B : Type*} [Fintype A] [Fintype B] {h t : ℕ} + [Nonempty (Fin t ↪ A)] [Nonempty (Fin h ↪ A)] + [Nonempty (Fin t ↪ B)] [Nonempty (Fin h ↪ B)] + (S : Finset (A × B)) : + ((FiniteLaw.uniform (Fin t ↪ A)).prod (FiniteLaw.uniform (Fin t ↪ B))).prob + (fun z => ∃ i j : Fin h ↪ Fin t, ∀ k, (z.1 (i k), z.2 (j k)) ∈ S) ≤ + (t.descFactorial h : ℝ) ^ 2 * (S.card : ℝ) ^ h / + ((Fintype.card A).descFactorial h * (Fintype.card B).descFactorial h : ℝ) := by + classical + let mu := (FiniteLaw.uniform (Fin t ↪ A)).prod (FiniteLaw.uniform (Fin t ↪ B)) + calc + _ ≤ ∑ i : Fin h ↪ Fin t, + mu.prob (fun z => ∃ j : Fin h ↪ Fin t, + ∀ k, (z.1 (i k), z.2 (j k)) ∈ S) := + mu.prob_exists_le _ + _ ≤ ∑ i : Fin h ↪ Fin t, ∑ j : Fin h ↪ Fin t, + mu.prob (fun z => ∀ k, (z.1 (i k), z.2 (j k)) ∈ S) := by + apply Finset.sum_le_sum + intro i _ + exact mu.prob_exists_le _ + _ ≤ ∑ _i : Fin h ↪ Fin t, ∑ _j : Fin h ↪ Fin t, + (S.card : ℝ) ^ h / + ((Fintype.card A).descFactorial h * (Fintype.card B).descFactorial h : ℝ) := by + apply Finset.sum_le_sum + intro i _ + apply Finset.sum_le_sum + intro j _ + exact prob_restricted_relation_le S i j + _ = _ := by + simp only [Finset.sum_const, Finset.card_univ, nsmul_eq_mul, + Fintype.card_embedding_eq, Fintype.card_fin] + ring + +end InjectionSampling + +end RyserCoveringCounterexample + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Main.lean b/lean/OAI/Combinatorics/Ryser/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..20d0a95915b0031d9dfc48a78dd50450c06e83a4 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Main.lean @@ -0,0 +1 @@ +import OAI.Combinatorics.Ryser.Construction.Main diff --git a/lean/OAI/Combinatorics/Ryser/OddExtensions.lean b/lean/OAI/Combinatorics/Ryser/OddExtensions.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ab8a3a9bc6270a76acd4c4edf9af8a98ef5d00d --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/OddExtensions.lean @@ -0,0 +1,153 @@ +import OAI.Combinatorics.Ryser.Construction.OddGadgets +import OAI.Combinatorics.Ryser.Field.OddSubfields +import OAI.Combinatorics.Ryser.Hypergraph.Infinitude +import OAI.Combinatorics.Ryser.Construction.ActualHypergraph + +namespace OAI + +/-! +# Ryser counterexamples in all sufficiently large odd extension degrees + +For every sufficiently large prime congruent to two modulo three, every +sufficiently large odd extension degree yields an intersecting partite uniform +hypergraph whose covering number equals its rank. The degree threshold may +depend on the prime. Infinitely many ranks occur; part sizes need not be equal. +-/ + +noncomputable section + +namespace RyserOdd.Specification + +open RyserCoveringCounterexample + +/-- The base-prime threshold is uniform; the odd-degree threshold may depend +on the base prime. Every sufficiently large odd degree is included. -/ +def EventualOddRanks : Prop := + ∃ P : ℕ, ∀ p : ℕ, P ≤ p → p.Prime → p % 3 = 2 → + ∃ N : ℕ, 3 ≤ N ∧ ∀ n : ℕ, N ≤ n → Odd n → + CounterexampleRank (p ^ n + 1) + +/-- Infinitude refers to ranks of actual finite hypergraphs. -/ +def InfiniteRanks : Prop := + Set.Infinite {r : ℕ | CounterexampleRank r} + +/-- An actual finite partite uniform hypergraph witnessing strict failure +of Ryser's inequality. -/ +def ExplicitFailureAt (r : ℕ) : Prop := + ∃ (V : Type) (fin : Fintype V) (dec : DecidableEq V), + letI : Fintype V := fin + letI : DecidableEq V := dec + ∃ H : Hypergraph V, + 0 < r ∧ H.Nonempty ∧ RPartiteUniform r H ∧ Uniform r H ∧ + Intersecting H ∧ (∃ C : Finset V, IsCover H C) ∧ + matchingNumber H = 1 ∧ coverNumber H = r ∧ + (r - 1) * matchingNumber H < coverNumber H + +/-- A counterexample rank yields a uniform hypergraph that strictly violates +Ryser's inequality. -/ +theorem explicitFailureAt_of_counterexampleRank {r : ℕ} + (hr : CounterexampleRank r) : ExplicitFailureAt r := by + rcases hr with ⟨V, fin, dec, H, hpos, hne, hpart, hI, hcover, hmatch, hcard⟩ + let : Fintype V := fin + let : DecidableEq V := dec + refine ⟨V, fin, dec, H, hpos, hne, hpart, hpart.uniform, hI, + hcover, hmatch, hcard, ?_⟩ + rw [hmatch, hcard, Nat.mul_one] + exact Nat.sub_lt hpos (by decide) + +/-- Eventual odd-degree counterexamples and infinitely many counterexample ranks, +without any requirement that the parts have equal size. -/ +def WholeUnbalancedPaper : Prop := EventualOddRanks ∧ InfiniteRanks + +end RyserOdd.Specification + +namespace RyserOdd + +open RyserCoveringCounterexample RyserCoveringCounterexample.Construction + +theorem eventualOddRanks : Specification.EventualOddRanks := by + classical + obtain ⟨P, hP⟩ := exists_threshold_goodGadget + refine ⟨P, ?_⟩ + intro p hpP hp hpmod + obtain ⟨hp5, hgadget⟩ := hP p hpP hp hpmod + let : Fact p.Prime := ⟨hp⟩ + obtain ⟨a, ha⟩ := hgadget + have hs : 2 ≤ Fintype.card (ZMod p) := by + rw [ZMod.card] + omega + obtain ⟨u, v, hu, hv, huv⟩ := exists_distinct_nonzero (k := ZMod p) (by + rw [ZMod.card] + omega) + have hcop : Nat.Coprime 3 (Fintype.card (ZMod p) - 1) := + coprime_three_zmod_card_sub_one hpmod + obtain ⟨K, Q, _hK, hpool⟩ := + exists_goodAmbientPool_uniform.{0, 0} u v huv a ha.1 hs + refine ⟨max 3 Q, le_max_left _ _, ?_⟩ + intro n hn hnOdd + have hn3 : 2 < n := lt_of_lt_of_le (by decide : 2 < 3) + ((le_max_left 3 Q).trans hn) + have hn0 : n ≠ 0 := by omega + have hQn : Q ≤ n := (le_max_right 3 Q).trans hn + have hsize : Q ≤ Fintype.card (ExtensionField p n) := by + rw [extensionField_card p n hn0] + have hnpow : n < p ^ n := Nat.lt_pow_self hp.one_lt + exact hQn.trans hnpow.le + have hsub : Incidence.SmallProperSubfields (ExtensionField p n) := by + intro S hS + exact extensionField_properSubfield_cube_le_of_odd p n hnOdd hn3 S hS + obtain ⟨hgap, pool, hgood⟩ := + hpool (ExtensionField p n) (primeEmbedding p n) hsize hsub + have hr := counterexampleRank_of_goodAmbientPool + (primeEmbedding p n) u v huv hu hv a ha hcop K pool hgood hgap + simpa only [extensionField_card p n hn0] using hr + +theorem infiniteRanks : Specification.InfiniteRanks := by + obtain ⟨P, hP⟩ := eventualOddRanks + obtain ⟨p, hpP, hp, hpmod⟩ := exists_prime_gt_mod_three_eq_two P + obtain ⟨N, _hN, hNall⟩ := hP p hpP.le hp hpmod + apply infinite_counterexampleRanks_of_unbounded + intro b + let n := 2 * (N + b) + 1 + have hn : N ≤ n := by dsimp [n]; omega + have hbn : b < n := by dsimp [n]; omega + have hodd : Odd n := ⟨N + b, by dsimp [n]⟩ + have hnpow : n < p ^ n := Nat.lt_pow_self hp.one_lt + exact ⟨p ^ n + 1, (hbn.trans hnpow).trans (Nat.lt_succ_self _), hNall n hn hodd⟩ + +theorem eventualExplicitFailures : + ∃ P : ℕ, ∀ p : ℕ, P ≤ p → p.Prime → p % 3 = 2 → + ∃ N : ℕ, 3 ≤ N ∧ ∀ n : ℕ, N ≤ n → Odd n → + Specification.ExplicitFailureAt (p ^ n + 1) := by + obtain ⟨P, hP⟩ := eventualOddRanks + refine ⟨P, ?_⟩ + intro p hpP hp hpmod + obtain ⟨N, hN, hall⟩ := hP p hpP hp hpmod + exact ⟨N, hN, fun n hn hnOdd => + Specification.explicitFailureAt_of_counterexampleRank (hall n hn hnOdd)⟩ + +theorem full_main : Specification.WholeUnbalancedPaper := + ⟨eventualOddRanks, infiniteRanks⟩ + +theorem eventualOddFailures_and_infinite : + (∃ primeThreshold : ℕ, ∀ prime : ℕ, primeThreshold ≤ prime → + prime.Prime → prime % 3 = 2 → + ∃ degreeThreshold : ℕ, 3 ≤ degreeThreshold ∧ + ∀ degree : ℕ, degreeThreshold ≤ degree → Odd degree → + Specification.ExplicitFailureAt (prime ^ degree + 1)) ∧ + Set.Infinite {rank : ℕ | Specification.ExplicitFailureAt rank} := by + refine ⟨eventualExplicitFailures, ?_⟩ + exact infiniteRanks.mono fun _rank => Specification.explicitFailureAt_of_counterexampleRank + +end RyserOdd + +namespace RyserOddReference + +theorem challenge : RyserOdd.Specification.WholeUnbalancedPaper := + RyserOdd.full_main + +end RyserOddReference + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Probability/Concentration.lean b/lean/OAI/Combinatorics/Ryser/Probability/Concentration.lean new file mode 100644 index 0000000000000000000000000000000000000000..2901ffc4e8fa480f123d55753b8f18e981a96188 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Probability/Concentration.lean @@ -0,0 +1,109 @@ +import OAI.Combinatorics.Ryser.Probability.Exposure +import OAI.Combinatorics.Ryser.Probability.Exponential + +namespace OAI + +namespace RyserCoveringCounterexample.Concentration + +open scoped BigOperators +open Exposure + +variable {Omega : Type*} [Fintype Omega] + +theorem exposure_mgf (M : ℝ) (n : Nat) + (mu : Fin n → FiniteLaw Omega) (f : (Fin n → Omega) → ℝ) + (v : Fin n → ℝ) (theta : ℝ) + (hb : ExposureBounds M n mu f v) (htheta : |theta| * M ≤ 1) : + (FiniteLaw.pi mu).expectation + (fun w => Real.exp (theta * (f w - (FiniteLaw.pi mu).expectation f))) + ≤ Real.exp (theta ^ 2 * ∑ i, v i) := by + classical + induction n with + | zero => + have hf : f = fun _ => f (fun i => Fin.elim0 i) := by + funext w + apply congrArg f + funext i + exact Fin.elim0 i + rw [hf] + simp [FiniteLaw.expectation_const] + | succ n ih => + rcases hb with ⟨hbound, hsecond, hrec⟩ + have hzero : (mu 0).expectation + (fun x => headMean mu f x - (mu 0).expectation (headMean mu f)) = 0 := by + rw [FiniteLaw.expectation_sub, FiniteLaw.expectation_const, sub_self] + have hhead := FiniteLaw.expectation_exp_le_of_mean_zero (mu 0) + (fun x => headMean mu f x - (mu 0).expectation (headMean mu f)) + M (v 0) theta hzero hbound hsecond htheta + have htail (x : Omega) : + (FiniteLaw.pi (fun i : Fin n => mu i.succ)).expectation + (fun w => Real.exp (theta * (f (Fin.cons x w) - headMean mu f x))) + ≤ Real.exp (theta ^ 2 * ∑ i : Fin n, v i.succ) := by + exact ih (fun i => mu i.succ) (fun w => f (Fin.cons x w)) + (fun i => v i.succ) (hrec x) + calc + _ = (mu 0).expectation (fun x => + (FiniteLaw.pi (fun i : Fin n => mu i.succ)).expectation + (fun w => Real.exp (theta * + (f (Fin.cons x w) - (FiniteLaw.pi mu).expectation f)))) := + expectation_pi_succ (n := n) mu + (fun w : Fin (n + 1) → Omega => + Real.exp (theta * (f w - (FiniteLaw.pi mu).expectation f))) + _ = (mu 0).expectation (fun x => + (FiniteLaw.pi (fun i : Fin n => mu i.succ)).expectation + (fun w => Real.exp (theta * + (f (Fin.cons x w) - (mu 0).expectation (headMean mu f))))) := by + rw [expectation_pi_succ mu f] + _ ≤ Real.exp (theta ^ 2 * (v 0 + ∑ i : Fin n, v i.succ)) := + FiniteLaw.iterated_centered_mgf_le (mu 0) + (fun _ => FiniteLaw.pi (fun i : Fin n => mu i.succ)) + (fun x w => f (Fin.cons x w)) (headMean mu f) + ((mu 0).expectation (headMean mu f)) theta (v 0) + (∑ i : Fin n, v i.succ) hhead htail + _ = _ := by rw [Fin.sum_univ_succ] + +theorem concentration (n : Nat) + (mu : Fin n → FiniteLaw Omega) (f : (Fin n → Omega) → ℝ) + (v : Fin n → ℝ) (M V u : ℝ) + (hM : 0 < M) (hV : 0 < V) (hu : 0 < u) + (hb : ExposureBounds M n mu f v) (hv : (∑ i, v i) ≤ V) : + (FiniteLaw.pi mu).prob + (fun w => u ≤ |f w - (FiniteLaw.pi mu).expectation f|) ≤ + 2 * Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := by + apply FiniteLaw.bernstein_abs_tail_of_mgf (FiniteLaw.pi mu) + (fun w => f w - (FiniteLaw.pi mu).expectation f) M V u hM hV hu + intro theta htheta + exact (exposure_mgf M n mu f v theta hb htheta).trans + (Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left hv (sq_nonneg theta))) + +theorem coordinate_concentration (n : Nat) + (mu : Fin n → FiniteLaw Omega) (f : (Fin n → Omega) → ℝ) + (c : Fin n → ℝ) (M V u : ℝ) + (hM : 0 < M) (hV : 0 < V) (hu : 0 < u) + (hcoord : ∀ i w x, |f (Function.update w i x) - f w| ≤ c i) + (hcM : ∀ i, c i ≤ M) (hcV : (∑ i, (c i) ^ 2) ≤ V) : + (FiniteLaw.pi mu).prob + (fun w => u ≤ |f w - (FiniteLaw.pi mu).expectation f|) ≤ + 2 * Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := by + exact concentration n mu f (fun i => (c i) ^ 2) M V u hM hV hu + (exposureBounds_of_coordinateBound M n mu f c hcoord hcM) hcV + +theorem rare_anchor_concentration (n : Nat) + (mu : Fin n → FiniteLaw Omega) (f : (Fin n → Omega) → ℝ) + (e : Omega) (C r : Fin n → ℝ) (rare : Fin n → Omega → Prop) + (M V u : ℝ) (hM : 0 < M) (hV : 0 < V) (hu : 0 < u) + (hanchor : ∀ i w, |f w - f (Function.update w i e)| ≤ C i) + (houtside : ∀ i w, ¬ rare i (w i) → f w = f (Function.update w i e)) + (hrare : ∀ i, (mu i).prob (rare i) ≤ r i) + (hCM : ∀ i, 2 * C i ≤ M) + (hCV : (∑ i, (C i) ^ 2 * r i) ≤ V) : + (FiniteLaw.pi mu).prob + (fun w => u ≤ |f w - (FiniteLaw.pi mu).expectation f|) ≤ + 2 * Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := by + exact concentration n mu f (fun i => (C i) ^ 2 * r i) M V u hM hV hu + (exposureBounds_of_rareAnchor M n mu f e C r rare hanchor houtside hrare hCM) + hCV + +end RyserCoveringCounterexample.Concentration + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Probability/Exponential.lean b/lean/OAI/Combinatorics/Ryser/Probability/Exponential.lean new file mode 100644 index 0000000000000000000000000000000000000000..395f3da1de86c0bd357f683708623813143e9af4 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Probability/Exponential.lean @@ -0,0 +1,271 @@ +import OAI.Combinatorics.Ryser.Probability.Finite +import Mathlib.Analysis.Complex.Exponential +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Ring +import Mathlib.Tactic.SplitIfs + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample.FiniteLaw + +lemma expectation_mul_left_real {Ω : Type*} [Fintype Ω] + (p : FiniteLaw Ω) (c : ℝ) (f : Ω → ℝ) : + p.expectation (fun a => c * f a) = c * p.expectation f := by + classical + unfold expectation + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro a ha + ring + +lemma exp_le_one_add_add_sq {x : ℝ} (hx : |x| ≤ 1) : + Real.exp x ≤ 1 + x + x ^ 2 := by + have h := (le_abs_self (Real.exp x - 1 - x)).trans + (Real.abs_exp_sub_one_sub_id_le hx) + linarith + +lemma expectation_exp_le_of_mean_zero {Ω : Type*} [Fintype Ω] + (p : FiniteLaw Ω) (z : Ω → ℝ) (M v θ : ℝ) + (hz : p.expectation z = 0) + (hbound : ∀ a, |z a| ≤ M) + (hsecond : p.expectation (fun a => (z a) ^ 2) ≤ v) + (hθ : |θ| * M ≤ 1) : + p.expectation (fun a => Real.exp (θ * z a)) ≤ + Real.exp (θ ^ 2 * v) := by + classical + have hpoint (a : Ω) : + Real.exp (θ * z a) ≤ 1 + θ * z a + θ ^ 2 * (z a) ^ 2 := by + have habs : |θ * z a| ≤ 1 := calc + |θ * z a| = |θ| * |z a| := abs_mul _ _ + _ ≤ |θ| * M := mul_le_mul_of_nonneg_left (hbound a) (abs_nonneg θ) + _ ≤ 1 := hθ + have he := exp_le_one_add_add_sq habs + nlinarith [he] + have hlin : + (∑ a, p.weight a * (θ * z a)) = θ * p.expectation z := by + exact expectation_mul_left_real p θ z + have hquad : + (∑ a, p.weight a * (θ ^ 2 * (z a) ^ 2)) = + θ ^ 2 * p.expectation (fun a => (z a) ^ 2) := by + exact expectation_mul_left_real p (θ ^ 2) (fun a => (z a) ^ 2) + calc + p.expectation (fun a => Real.exp (θ * z a)) ≤ + p.expectation (fun a => 1 + θ * z a + θ ^ 2 * (z a) ^ 2) := by + unfold expectation + exact Finset.sum_le_sum fun a _ => + mul_le_mul_of_nonneg_left (hpoint a) (p.nonneg a) + _ = 1 + θ * p.expectation z + + θ ^ 2 * p.expectation (fun a => (z a) ^ 2) := by + change (∑ a, p.weight a * (1 + θ * z a + θ ^ 2 * (z a) ^ 2)) = _ + simp only [mul_add, mul_one, Finset.sum_add_distrib] + rw [p.total, hlin, hquad] + _ = 1 + θ ^ 2 * p.expectation (fun a => (z a) ^ 2) := by + rw [hz] + ring + _ ≤ 1 + θ ^ 2 * v := + add_le_add le_rfl (mul_le_mul_of_nonneg_left hsecond (sq_nonneg θ)) + _ ≤ Real.exp (θ ^ 2 * v) := by + simpa only [add_comm] using Real.add_one_le_exp (θ ^ 2 * v) + +lemma iterated_centered_mgf_le + {A B : Type*} [Fintype A] [Fintype B] + (p : FiniteLaw A) (q : A → FiniteLaw B) + (f : A → B → ℝ) (head : A → ℝ) + (center θ v V : ℝ) + (hhead : p.expectation (fun a => Real.exp (θ * (head a - center))) ≤ + Real.exp (θ ^ 2 * v)) + (htail : ∀ a, (q a).expectation + (fun b => Real.exp (θ * (f a b - head a))) ≤ Real.exp (θ ^ 2 * V)) : + p.expectation (fun a => (q a).expectation + (fun b => Real.exp (θ * (f a b - center)))) ≤ + Real.exp (θ ^ 2 * (v + V)) := by + classical + have hsplit (a : A) : + (q a).expectation (fun b => Real.exp (θ * (f a b - center))) = + Real.exp (θ * (head a - center)) * + (q a).expectation (fun b => Real.exp (θ * (f a b - head a))) := by + rw [← expectation_mul_left_real] + congr 1 + funext b + rw [← Real.exp_add] + congr 1 + ring + have hinner (a : A) : + (q a).expectation (fun b => Real.exp (θ * (f a b - center))) ≤ + Real.exp (θ ^ 2 * V) * Real.exp (θ * (head a - center)) := by + rw [hsplit] + have h := mul_le_mul_of_nonneg_left (htail a) + (Real.exp_pos (θ * (head a - center))).le + simpa only [mul_comm] using h + calc + p.expectation (fun a => (q a).expectation + (fun b => Real.exp (θ * (f a b - center)))) ≤ + p.expectation (fun a => + Real.exp (θ ^ 2 * V) * Real.exp (θ * (head a - center))) := by + unfold expectation + exact Finset.sum_le_sum fun a _ => + mul_le_mul_of_nonneg_left (hinner a) (p.nonneg a) + _ = Real.exp (θ ^ 2 * V) * + p.expectation (fun a => Real.exp (θ * (head a - center))) := + expectation_mul_left_real p _ _ + _ ≤ Real.exp (θ ^ 2 * V) * Real.exp (θ ^ 2 * v) := + mul_le_mul_of_nonneg_left hhead (Real.exp_pos _).le + _ = Real.exp (θ ^ 2 * (v + V)) := by + rw [← Real.exp_add] + congr 1 + ring + +lemma chernoff_upper {Ω : Type*} [Fintype Ω] + (p : FiniteLaw Ω) (f : Ω → ℝ) (u θ : ℝ) (hθ : 0 ≤ θ) : + p.prob (fun a => u ≤ f a) ≤ + Real.exp (-θ * u) * p.expectation (fun a => Real.exp (θ * f a)) := by + classical + unfold prob expectation + rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro a ha + by_cases huf : u ≤ f a + · simp only [ite_eq_left huf] + have he : 1 ≤ Real.exp (-θ * u) * Real.exp (θ * f a) := calc + 1 = Real.exp 0 := (Real.exp_zero).symm + _ ≤ Real.exp (-θ * u + θ * f a) := by + apply Real.exp_le_exp.mpr + nlinarith [mul_nonneg hθ (sub_nonneg.mpr huf)] + _ = Real.exp (-θ * u) * Real.exp (θ * f a) := Real.exp_add _ _ + calc + p.weight a = p.weight a * 1 := by ring + _ ≤ p.weight a * (Real.exp (-θ * u) * Real.exp (θ * f a)) := + mul_le_mul_of_nonneg_left he (p.nonneg a) + _ = Real.exp (-θ * u) * (p.weight a * Real.exp (θ * f a)) := by ring + · simp only [ite_eq_right huf] + exact mul_nonneg (Real.exp_pos _).le + (mul_nonneg (p.nonneg a) (Real.exp_pos _).le) + +lemma chernoff_upper_of_mgf {Ω : Type*} [Fintype Ω] + (p : FiniteLaw Ω) (f : Ω → ℝ) (u θ V : ℝ) + (hθ : 0 ≤ θ) + (hmgf : p.expectation (fun a => Real.exp (θ * f a)) ≤ + Real.exp (θ ^ 2 * V)) : + p.prob (fun a => u ≤ f a) ≤ Real.exp (θ ^ 2 * V - θ * u) := by + calc + p.prob (fun a => u ≤ f a) ≤ + Real.exp (-θ * u) * p.expectation (fun a => Real.exp (θ * f a)) := + chernoff_upper p f u θ hθ + _ ≤ Real.exp (-θ * u) * Real.exp (θ ^ 2 * V) := + mul_le_mul_of_nonneg_left hmgf (Real.exp_pos _).le + _ = Real.exp (θ ^ 2 * V - θ * u) := by + rw [← Real.exp_add] + congr 1 + ring + +lemma bernstein_scalar_optimization + (M V u P : ℝ) + (hM : 0 < M) (hV : 0 < V) (hu : 0 < u) + (h : ∀ t : ℝ, 0 < t → t ≤ 1 / M → + P ≤ Real.exp (t ^ 2 * V - t * u)) : + P ≤ Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := by + by_cases hcut : u / (2 * V) ≤ 1 / M + · have ht : 0 < u / (2 * V) := + div_pos hu (mul_pos (by norm_num) hV) + have hexp : + (u / (2 * V)) ^ 2 * V - (u / (2 * V)) * u = + -(1 / 4 : ℝ) * (u ^ 2 / V) := by + field_simp [ne_of_gt hV]; ring + calc + P ≤ Real.exp ((u / (2 * V)) ^ 2 * V - (u / (2 * V)) * u) := + h _ ht hcut + _ ≤ Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := by + apply Real.exp_le_exp.mpr + rw [hexp] + nlinarith [min_le_left (u ^ 2 / V) (u / M)] + · have hcross : 2 * V < u * M := by + have ht : 1 / M < u / (2 * V) := lt_of_not_ge hcut + have ht' := + (div_lt_div_iff₀ hM (mul_pos (by norm_num) hV)).mp ht + simpa using ht' + have hnum : V - u * M ≤ -(u * M) / 4 := by + nlinarith [mul_pos hu hM] + have hexp : + (1 / M) ^ 2 * V - (1 / M) * u ≤ + -(1 / 4 : ℝ) * (u / M) := by + calc + (1 / M) ^ 2 * V - (1 / M) * u = + (V - u * M) / M ^ 2 := by + field_simp [ne_of_gt hM] + _ ≤ (-(u * M) / 4) / M ^ 2 := + div_le_div_of_nonneg_right hnum (sq_nonneg M) + _ = -(1 / 4 : ℝ) * (u / M) := by + field_simp [ne_of_gt hM] + calc + P ≤ Real.exp ((1 / M) ^ 2 * V - (1 / M) * u) := + h _ (div_pos (by norm_num) hM) le_rfl + _ ≤ Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := by + apply Real.exp_le_exp.mpr + have hmin : + -(1 / 4 : ℝ) * (u / M) ≤ + -(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M) := by + nlinarith [min_le_right (u ^ 2 / V) (u / M)] + exact hexp.trans hmin + +lemma prob_abs_ge_le_add {Ω : Type*} [Fintype Ω] + (p : FiniteLaw Ω) (f : Ω → ℝ) (u : ℝ) : + p.prob (fun a => u ≤ |f a|) ≤ + p.prob (fun a => u ≤ f a) + p.prob (fun a => u ≤ -f a) := by + classical + unfold prob + rw [← Finset.sum_add_distrib] + apply Finset.sum_le_sum + intro a ha + change (if u ≤ |f a| then p.weight a else 0) ≤ + (if u ≤ f a then p.weight a else 0) + (if u ≤ -f a then p.weight a else 0) + by_cases hs : 0 ≤ f a + · rw [abs_of_nonneg hs] + split_ifs <;> linarith [p.nonneg a] + · rw [abs_of_nonpos (le_of_not_ge hs)] + split_ifs <;> linarith [p.nonneg a] + +lemma bernstein_abs_tail_of_mgf {Ω : Type*} [Fintype Ω] + (p : FiniteLaw Ω) (f : Ω → ℝ) (M V u : ℝ) + (hM : 0 < M) (hV : 0 < V) (hu : 0 < u) + (hmgf : ∀ θ : ℝ, |θ| * M ≤ 1 → + p.expectation (fun a => Real.exp (θ * f a)) ≤ + Real.exp (θ ^ 2 * V)) : + p.prob (fun a => u ≤ |f a|) ≤ + 2 * Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := by + have upper : p.prob (fun a => u ≤ f a) ≤ + Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := by + apply bernstein_scalar_optimization M V u _ hM hV hu + intro θ hθ hθM + have hadm : |θ| * M ≤ 1 := by + rw [abs_of_pos hθ] + exact (le_div_iff₀ hM).mp hθM + exact chernoff_upper_of_mgf p f u θ V hθ.le (hmgf θ hadm) + have lower : p.prob (fun a => u ≤ -f a) ≤ + Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := by + apply bernstein_scalar_optimization M V u _ hM hV hu + intro θ hθ hθM + have hadm : |θ| * M ≤ 1 := by + rw [abs_of_pos hθ] + exact (le_div_iff₀ hM).mp hθM + have hadmneg : |-θ| * M ≤ 1 := by + simpa only [abs_neg] using hadm + have hneg : p.expectation (fun a => Real.exp (θ * (-f a))) ≤ + Real.exp (θ ^ 2 * V) := by + simpa only [neg_mul, mul_neg, neg_sq] using hmgf (-θ) hadmneg + exact chernoff_upper_of_mgf p (fun a => -f a) u θ V hθ.le hneg + calc + p.prob (fun a => u ≤ |f a|) ≤ + p.prob (fun a => u ≤ f a) + p.prob (fun a => u ≤ -f a) := + prob_abs_ge_le_add p f u + _ ≤ Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) + + Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := + add_le_add upper lower + _ = 2 * Real.exp (-(1 / 4 : ℝ) * min (u ^ 2 / V) (u / M)) := by ring + +end RyserCoveringCounterexample.FiniteLaw + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Probability/Exposure.lean b/lean/OAI/Combinatorics/Ryser/Probability/Exposure.lean new file mode 100644 index 0000000000000000000000000000000000000000..58e9b0b633af8ae6074ba4413592c4298a6b5df5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Probability/Exposure.lean @@ -0,0 +1,186 @@ +import OAI.Combinatorics.Ryser.Probability.Product +import OAI.Combinatorics.Ryser.Probability.RareAnchor +import Mathlib.Algebra.BigOperators.Fin + +namespace OAI + +namespace RyserCoveringCounterexample.Exposure + +open scoped BigOperators + +variable {Omega : Type*} [instFintypeOmega : Fintype Omega] + +def splitConfig (n : Nat) : + (Fin (n + 1) → Omega) ≃ Omega × (Fin n → Omega) where + toFun w := (w 0, fun i => w i.succ) + invFun p := Fin.cons p.1 p.2 + left_inv w := by + funext i + refine Fin.cases ?_ (fun j => ?_) i <;> rfl + right_inv p := by + rcases p with ⟨x, tail⟩ + rfl + +theorem cons_head_tail {n : Nat} (w : Fin (n + 1) → Omega) : + Fin.cons (w 0) (fun i => w i.succ) = w := let _ := instFintypeOmega; + (splitConfig n).left_inv w + +def headMean {n : Nat} (mu : Fin (n + 1) → FiniteLaw Omega) + (f : (Fin (n + 1) → Omega) → ℝ) (x : Omega) : ℝ := + (FiniteLaw.pi (fun i : Fin n => mu i.succ)).expectation + (fun tail => f (Fin.cons x tail)) + +theorem expectation_pi_succ {n : Nat} + (mu : Fin (n + 1) → FiniteLaw Omega) + (f : (Fin (n + 1) → Omega) → ℝ) : + (FiniteLaw.pi mu).expectation f = + (mu 0).expectation (headMean mu f) := by + classical + change (∑ w, (∏ i, (mu i).weight (w i)) * f w) = + ∑ x, (mu 0).weight x * + (∑ tail : Fin n → Omega, + (∏ i, (mu i.succ).weight (tail i)) * f (Fin.cons x tail)) + calc + _ = ∑ p : Omega × (Fin n → Omega), + ((mu 0).weight p.1 * ∏ i, (mu i.succ).weight (p.2 i)) * + f (Fin.cons p.1 p.2) := by + refine Fintype.sum_equiv (splitConfig n) _ _ ?_ + intro w + change (∏ i, (mu i).weight (w i)) * f w = + ((mu 0).weight (w 0) * ∏ i : Fin n, (mu i.succ).weight (w i.succ)) * + f (Fin.cons (w 0) (fun i => w i.succ)) + rw [cons_head_tail, Fin.prod_univ_succ] + _ = _ := by + rw [Fintype.sum_prod_type] + apply Finset.sum_congr rfl + intro x _ + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro tail _ + ring + +def ExposureBounds (M : ℝ) : (n : Nat) → + (Fin n → FiniteLaw Omega) → ((Fin n → Omega) → ℝ) → + (Fin n → ℝ) → Prop + | 0, _, _, _ => True + | n + 1, mu, f, v => + (∀ x, |headMean mu f x - (mu 0).expectation (headMean mu f)| ≤ M) ∧ + (mu 0).expectation + (fun x => (headMean mu f x - (mu 0).expectation (headMean mu f)) ^ 2) + ≤ v 0 ∧ + ∀ x, ExposureBounds M n (fun i => mu i.succ) + (fun tail => f (Fin.cons x tail)) (fun i => v i.succ) + +theorem mean_difference_bound {A : Type*} [Fintype A] + (p : FiniteLaw A) (f g : A → ℝ) (C : ℝ) + (h : ∀ a, |f a - g a| ≤ C) : + |p.expectation f - p.expectation g| ≤ C := by + have hlo : p.expectation (fun a => g a - C) ≤ p.expectation f := by + apply p.expectation_mono + intro a + have hh := (abs_le.mp (h a)).1 + linarith + have hhi : p.expectation f ≤ p.expectation (fun a => g a + C) := by + apply p.expectation_mono + intro a + have hh := (abs_le.mp (h a)).2 + linarith + rw [FiniteLaw.expectation_sub, FiniteLaw.expectation_const] at hlo + rw [FiniteLaw.expectation_add, FiniteLaw.expectation_const] at hhi + exact abs_le.mpr ⟨by linarith, by linarith⟩ + +theorem second_moment_le {A : Type*} [Fintype A] + (p : FiniteLaw A) (f : A → ℝ) (C : ℝ) + (h : ∀ a, |f a| ≤ C) : + p.expectation (fun a => (f a) ^ 2) ≤ C ^ 2 := by + calc + _ ≤ p.expectation (fun _ => C ^ 2) := by + apply p.expectation_mono + intro a + rcases abs_le.mp (h a) with ⟨hl, hu⟩ + have hp : 0 ≤ (C - f a) * (C + f a) := + mul_nonneg (by linarith) (by linarith) + nlinarith + _ = C ^ 2 := p.expectation_const _ + +theorem update_cons_zero {n : Nat} (x y : Omega) (tail : Fin n → Omega) : + Function.update + (Fin.cons (n := let _ := instFintypeOmega; n) (α := fun _ : Fin (n + 1) => Omega) x tail) 0 y = + Fin.cons (n := n) (α := fun _ : Fin (n + 1) => Omega) y tail := + Fin.update_cons_zero (n := n) (α := fun _ : Fin (n + 1) => Omega) x tail y + +theorem cons_update {n : Nat} (x y : Omega) (tail : Fin n → Omega) (i : Fin n) : + Fin.cons (n := let _ := instFintypeOmega; n) (α := fun _ : Fin (n + 1) => Omega) x + (Function.update tail i y) = + Function.update + (Fin.cons (n := n) (α := fun _ : Fin (n + 1) => Omega) x tail) i.succ y := + Fin.cons_update (n := n) (α := fun _ : Fin (n + 1) => Omega) x tail i y + +theorem exposureBounds_of_coordinateBound (M : ℝ) (n : Nat) + (mu : Fin n → FiniteLaw Omega) (f : (Fin n → Omega) → ℝ) + (c : Fin n → ℝ) + (hcoord : ∀ i w x, |f (Function.update w i x) - f w| ≤ c i) + (hM : ∀ i, c i ≤ M) : + ExposureBounds M n mu f (fun i => (c i) ^ 2) := by + classical + induction n with + | zero => trivial + | succ n ih => + have hdiam (x y : Omega) : + |headMean mu f x - headMean mu f y| ≤ c 0 := by + apply mean_difference_bound + intro tail + simpa only [update_cons_zero] using hcoord 0 (Fin.cons y tail) x + have hcenter (x : Omega) : + |headMean mu f x - (mu 0).expectation (headMean mu f)| ≤ c 0 := by + have hh := mean_difference_bound (mu 0) (fun _ => headMean mu f x) + (headMean mu f) (c 0) (hdiam x) + simpa only [FiniteLaw.expectation_const] using hh + refine ⟨fun x => (hcenter x).trans (hM 0), ?_, ?_⟩ + · exact second_moment_le (mu 0) + (fun x => headMean mu f x - (mu 0).expectation (headMean mu f)) + (c 0) hcenter + · intro x + refine ih (fun i => mu i.succ) (fun tail => f (Fin.cons x tail)) + (fun i => c i.succ) ?_ (fun i => hM i.succ) + intro i tail y + simpa only [cons_update] using hcoord i.succ (Fin.cons x tail) y + +theorem exposureBounds_of_rareAnchor (M : ℝ) (n : Nat) + (mu : Fin n → FiniteLaw Omega) (f : (Fin n → Omega) → ℝ) + (e : Omega) (C r : Fin n → ℝ) (rare : Fin n → Omega → Prop) + (hanchor : ∀ i w, |f w - f (Function.update w i e)| ≤ C i) + (houtside : ∀ i w, ¬ rare i (w i) → f w = f (Function.update w i e)) + (hrare : ∀ i, (mu i).prob (rare i) ≤ r i) + (hM : ∀ i, 2 * C i ≤ M) : + ExposureBounds M n mu f (fun i => (C i) ^ 2 * r i) := by + classical + induction n with + | zero => trivial + | succ n ih => + have hhead (x : Omega) : + |headMean mu f x - headMean mu f e| ≤ C 0 := by + apply mean_difference_bound + intro tail + simpa only [update_cons_zero] using hanchor 0 (Fin.cons x tail) + have hheadoutside (x : Omega) (hx : ¬ rare 0 x) : + headMean mu f x = headMean mu f e := by + apply congrArg ((FiniteLaw.pi (fun i : Fin n => mu i.succ)).expectation) + funext tail + simpa only [update_cons_zero] using houtside 0 (Fin.cons x tail) hx + rcases FiniteLaw.rareAnchor_centering (mu 0) (headMean mu f) + (headMean mu f e) (C 0) (r 0) (rare 0) hhead hheadoutside (hrare 0) + with ⟨hzero, hcenter, hsecond⟩ + refine ⟨fun x => (hcenter x).trans (hM 0), hsecond, ?_⟩ + intro x + refine ih (fun i => mu i.succ) (fun tail => f (Fin.cons x tail)) + (fun i => C i.succ) (fun i => r i.succ) (fun i => rare i.succ) + ?_ ?_ (fun i => hrare i.succ) (fun i => hM i.succ) + · intro i tail + simpa only [cons_update] using hanchor i.succ (Fin.cons x tail) + · intro i tail hnot + simpa only [cons_update] using houtside i.succ (Fin.cons x tail) hnot + +end RyserCoveringCounterexample.Exposure + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Probability/Finite.lean b/lean/OAI/Combinatorics/Ryser/Probability/Finite.lean new file mode 100644 index 0000000000000000000000000000000000000000..a1cb85f7734b534359edcfe4fe34189838809c16 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Probability/Finite.lean @@ -0,0 +1,236 @@ +import Mathlib.Basic.Real.Basic +import Mathlib.Algebra.BigOperators.Ring.Finset +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Algebra.Order.BigOperators.GroupWithZero.Finset +import Mathlib.Data.Fintype.BigOperators +import Mathlib.Data.Fintype.Pi +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.SplitIfs + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample + +structure FiniteLaw (Ω : Type*) [Fintype Ω] where + weight : Ω → ℝ + nonneg : ∀ ω, 0 ≤ weight ω + total : ∑ ω, weight ω = 1 + +namespace FiniteLaw + +def expectation {Ω : Type*} [Fintype Ω] (μ : FiniteLaw Ω) (f : Ω → ℝ) : ℝ := + ∑ ω, μ.weight ω * f ω + +def prob {Ω : Type*} [Fintype Ω] (μ : FiniteLaw Ω) (P : Ω → Prop) : ℝ := by + classical + exact ∑ ω, if P ω then μ.weight ω else 0 + +def IsPositive {Ω : Type*} [Fintype Ω] (μ : FiniteLaw Ω) : Prop := + ∀ ω, 0 < μ.weight ω + +variable {Ω Γ : Type*} [Fintype Ω] [Fintype Γ] + +@[simp] theorem expectation_const (μ : FiniteLaw Ω) (c : ℝ) : + μ.expectation (fun _ => c) = c := by + rw [expectation, ← Finset.sum_mul, μ.total, one_mul] + +theorem expectation_add (μ : FiniteLaw Ω) (f g : Ω → ℝ) : + μ.expectation (fun ω => f ω + g ω) = μ.expectation f + μ.expectation g := by + simp [expectation, mul_add, Finset.sum_add_distrib] + +theorem expectation_sub (μ : FiniteLaw Ω) (f g : Ω → ℝ) : + μ.expectation (fun ω => f ω - g ω) = μ.expectation f - μ.expectation g := by + simp [expectation, mul_sub, Finset.sum_sub_distrib] + +theorem expectation_smul (μ : FiniteLaw Ω) (c : ℝ) (f : Ω → ℝ) : + μ.expectation (fun ω => c * f ω) = c * μ.expectation f := by + simp [expectation, Finset.mul_sum, mul_left_comm] + +theorem expectation_sum {ι : Type*} [Fintype ι] (μ : FiniteLaw Ω) (f : ι → Ω → ℝ) : + μ.expectation (fun ω => ∑ i, f i ω) = ∑ i, μ.expectation (f i) := by + simp only [expectation, Finset.mul_sum] + exact Finset.sum_comm + +theorem expectation_nonneg (μ : FiniteLaw Ω) {f : Ω → ℝ} (hf : ∀ ω, 0 ≤ f ω) : + 0 ≤ μ.expectation f := + Finset.sum_nonneg fun ω _ => mul_nonneg (μ.nonneg ω) (hf ω) + +theorem expectation_mono (μ : FiniteLaw Ω) {f g : Ω → ℝ} (hfg : ∀ ω, f ω ≤ g ω) : + μ.expectation f ≤ μ.expectation g := + Finset.sum_le_sum fun ω _ => mul_le_mul_of_nonneg_left (hfg ω) (μ.nonneg ω) + +theorem prob_eq_expectation (μ : FiniteLaw Ω) (P : Ω → Prop) : + μ.prob P = μ.expectation (fun ω => if P ω then 1 else 0) := by + classical + simp [prob, expectation, mul_ite] + +@[simp] theorem prob_true (μ : FiniteLaw Ω) : μ.prob (fun _ => True) = 1 := by + simp [prob, μ.total] + +@[simp] theorem prob_false (μ : FiniteLaw Ω) : μ.prob (fun _ => False) = 0 := by + simp [prob] + +theorem prob_nonneg (μ : FiniteLaw Ω) (P : Ω → Prop) : 0 ≤ μ.prob P := by + classical + exact Finset.sum_nonneg fun ω _ => by split_ifs <;> simp [μ.nonneg] + +theorem prob_mono (μ : FiniteLaw Ω) {P Q : Ω → Prop} (hPQ : ∀ ω, P ω → Q ω) : + μ.prob P ≤ μ.prob Q := by + classical + apply Finset.sum_le_sum + intro ω _ + by_cases hp : P ω + · simp [hp, hPQ ω hp] + · by_cases hq : Q ω <;> simp [hp, hq, μ.nonneg ω] + +theorem prob_le_one (μ : FiniteLaw Ω) (P : Ω → Prop) : μ.prob P ≤ 1 := by + simpa using μ.prob_mono (Q := fun _ => True) (fun _ _ => trivial) + +theorem prob_compl (μ : FiniteLaw Ω) (P : Ω → Prop) : + μ.prob (fun ω => ¬ P ω) = 1 - μ.prob P := by + classical + have h : μ.prob P + μ.prob (fun ω => ¬ P ω) = 1 := by + rw [prob, prob, ← Finset.sum_add_distrib, ← μ.total] + apply Finset.sum_congr rfl + intro ω _ + by_cases hp : P ω <;> simp [hp] + linarith + +theorem prob_union_le (μ : FiniteLaw Ω) (P Q : Ω → Prop) : + μ.prob (fun ω => P ω ∨ Q ω) ≤ μ.prob P + μ.prob Q := by + classical + rw [prob, prob, prob, ← Finset.sum_add_distrib] + apply Finset.sum_le_sum + intro ω _ + by_cases hp : P ω <;> by_cases hq : Q ω <;> simp [hp, hq, μ.nonneg] + +theorem prob_le_expectation (μ : FiniteLaw Ω) (P : Ω → Prop) (f : Ω → ℝ) + (hf : ∀ ω, 0 ≤ f ω) (hP : ∀ ω, P ω → 1 ≤ f ω) : μ.prob P ≤ μ.expectation f := by + classical + rw [prob_eq_expectation] + apply μ.expectation_mono + intro ω + by_cases hp : P ω + · simpa [hp] using hP ω hp + · simpa [hp] using hf ω + +theorem prob_ge_le_expectation_div (μ : FiniteLaw Ω) (f : Ω → ℝ) + (hf : ∀ ω, 0 ≤ f ω) {t : ℝ} (ht : 0 < t) : + μ.prob (fun ω => t ≤ f ω) ≤ μ.expectation f / t := by + have h := μ.prob_le_expectation (fun ω => t ≤ f ω) (fun ω => t⁻¹ * f ω) + (fun ω => mul_nonneg (inv_nonneg.mpr ht.le) (hf ω)) + (fun ω hω => by simpa [ht.ne'] using mul_le_mul_of_nonneg_left hω (inv_nonneg.mpr ht.le)) + rw [expectation_smul] at h + simpa [div_eq_mul_inv, mul_comm] using h + +def prod (μ : FiniteLaw Ω) (ν : FiniteLaw Γ) : FiniteLaw (Ω × Γ) where + weight ω := μ.weight ω.1 * ν.weight ω.2 + nonneg ω := mul_nonneg (μ.nonneg _) (ν.nonneg _) + total := by + simp only [Fintype.sum_prod_type, ← Finset.mul_sum, ν.total, mul_one, μ.total] + +@[simp] theorem prod_weight (μ : FiniteLaw Ω) (ν : FiniteLaw Γ) (ω : Ω) (γ : Γ) : + (μ.prod ν).weight (ω, γ) = μ.weight ω * ν.weight γ := rfl + +theorem expectation_prod (μ : FiniteLaw Ω) (ν : FiniteLaw Γ) (f : Ω × Γ → ℝ) : + (μ.prod ν).expectation f = μ.expectation (fun ω => ν.expectation (fun γ => f (ω, γ))) := by + simp [expectation, prod, Fintype.sum_prod_type, Finset.mul_sum, mul_assoc] + +theorem prod_isPositive (μ : FiniteLaw Ω) (ν : FiniteLaw Γ) + (hμ : μ.IsPositive) (hν : ν.IsPositive) : (μ.prod ν).IsPositive := + fun _ω => mul_pos (hμ _) (hν _) + +def pi {ι : Type*} [Fintype ι] [DecidableEq ι] {A : ι → Type*} [∀ i, Fintype (A i)] + (μ : ∀ i, FiniteLaw (A i)) : FiniteLaw (∀ i, A i) := by + classical + exact { + weight := fun ω => ∏ i, (μ i).weight (ω i) + nonneg := fun ω => Finset.prod_nonneg fun i _ => (μ i).nonneg (ω i) + total := by + rw [← Fintype.prod_sum (fun i a => (μ i).weight a)] + simp_rw [(μ _).total] + simp } + +@[simp] theorem pi_weight {ι : Type*} [Fintype ι] [DecidableEq ι] {A : ι → Type*} [∀ i, Fintype (A i)] + (μ : ∀ i, FiniteLaw (A i)) (ω : ∀ i, A i) : + (pi μ).weight ω = ∏ i, (μ i).weight (ω i) := rfl + +def iid (μ : FiniteLaw Ω) (n : ℕ) : FiniteLaw (Fin n → Ω) := pi (fun _ : Fin n => μ) + +@[simp] theorem iid_weight (μ : FiniteLaw Ω) (n : ℕ) (ω : Fin n → Ω) : + (iid μ n).weight ω = ∏ i, μ.weight (ω i) := rfl + +def uniform (Ω : Type*) [Fintype Ω] [Nonempty Ω] : FiniteLaw Ω where + weight _ := (Fintype.card Ω : ℝ)⁻¹ + nonneg _ := inv_nonneg.mpr (Nat.cast_nonneg _) + total := by + have hN : (Fintype.card Ω : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr Fintype.card_ne_zero + simp [hN] + +theorem uniform_isPositive (Ω : Type*) [Fintype Ω] [Nonempty Ω] : + (uniform Ω).IsPositive := fun _ => inv_pos.mpr (Nat.cast_pos.mpr Fintype.card_pos) + +theorem uniform_prob (Ω : Type*) [Fintype Ω] [Nonempty Ω] (P : Ω → Prop) : + (uniform Ω).prob P = ((Finset.univ.filter P).card : ℝ) / Fintype.card Ω := by + simp [prob, uniform, ← Finset.sum_filter, div_eq_mul_inv] + +@[ext] theorem ext_weight {mu nu : FiniteLaw Ω} (h : mu.weight = nu.weight) : + mu = nu := by + cases mu + cases nu + cases h + rfl + +theorem eq_uniform_of_weight_eq [Nonempty Ω] (mu : FiniteLaw Ω) + (h : ∀ x y, mu.weight x = mu.weight y) : mu = uniform Ω := by + apply ext_weight + funext x + change mu.weight x = (Fintype.card Ω : ℝ)⁻¹ + have hN : (Fintype.card Ω : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr Fintype.card_ne_zero + have hsum : (Fintype.card Ω : ℝ) * mu.weight x = 1 := by + calc + _ = ∑ y : Ω, mu.weight x := by simp + _ = ∑ y : Ω, mu.weight y := + Finset.sum_congr rfl (fun y _ => (h y x).symm) + _ = 1 := mu.total + calc + mu.weight x = (Fintype.card Ω : ℝ)⁻¹ * + ((Fintype.card Ω : ℝ) * mu.weight x) := by + rw [← mul_assoc, inv_mul_cancel₀ hN, one_mul] + _ = (Fintype.card Ω : ℝ)⁻¹ := by rw [hsum, mul_one] + +theorem uniform_expectation (Ω : Type*) [Fintype Ω] [Nonempty Ω] (f : Ω → ℝ) : + (uniform Ω).expectation f = (∑ x, f x) / Fintype.card Ω := by + change (∑ x, (Fintype.card Ω : ℝ)⁻¹ * f x) = _ + rw [← Finset.mul_sum, div_eq_mul_inv, mul_comm] + +theorem prob_exists_le {ι : Type*} [Fintype ι] (mu : FiniteLaw Ω) + (P : ι → Ω → Prop) : + mu.prob (fun x => ∃ i, P i x) ≤ ∑ i, mu.prob (P i) := by + classical + have hn (i : ι) (x : Ω) : 0 ≤ (if P i x then (1 : ℝ) else 0) := by + by_cases hix : P i x <;> simp [hix] + calc + _ ≤ mu.expectation (fun x => ∑ i, if P i x then (1 : ℝ) else 0) := by + apply mu.prob_le_expectation + · exact fun x => Finset.sum_nonneg (fun i _ => hn i x) + · rintro x ⟨i, hi⟩ + calc + 1 = (if P i x then (1 : ℝ) else 0) := by rw [ite_eq_left hi] + _ ≤ ∑ j, if P j x then (1 : ℝ) else 0 := + Finset.single_le_sum (fun j _ => hn j x) (Finset.mem_univ i) + _ = ∑ i, mu.prob (P i) := by + rw [expectation_sum] + simp_rw [← prob_eq_expectation] + +end FiniteLaw + +end RyserCoveringCounterexample + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Probability/Product.lean b/lean/OAI/Combinatorics/Ryser/Probability/Product.lean new file mode 100644 index 0000000000000000000000000000000000000000..994d74b8ef68d5623021a07cc9e502f485805c5e --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Probability/Product.lean @@ -0,0 +1,243 @@ +import OAI.Combinatorics.Ryser.Probability.Finite +import Mathlib.Algebra.BigOperators.Group.Finset.Piecewise +import Mathlib.Algebra.BigOperators.GroupWithZero.Finset +import Mathlib.Data.Fintype.Card +import Mathlib.SetTheory.Cardinal.Finite +import Mathlib.Logic.Equiv.Prod + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.FiniteLaw + +section ProductCoordinates + +variable {I : Type*} [Fintype I] [DecidableEq I] + {A : I → Type*} [∀ i, Fintype (A i)] + +theorem expectation_pi_product (μ : ∀ i, FiniteLaw (A i)) + (f : ∀ i, A i → ℝ) : + (pi μ).expectation (fun ω => ∏ i, f i (ω i)) = + ∏ i, (μ i).expectation (f i) := by + classical + simp only [expectation, pi_weight] + simp_rw [← Finset.prod_mul_distrib] + exact (Fintype.prod_sum (fun i a => (μ i).weight a * f i a)).symm + +theorem expectation_pi_coordinate (μ : ∀ i, FiniteLaw (A i)) + (i : I) (f : A i → ℝ) : + (pi μ).expectation (fun ω => f (ω i)) = (μ i).expectation f := by + classical + let g : ∀ j, A j → ℝ := fun j a => if h : j = i then f (h ▸ a) else 1 + have hg (ω : ∀ j, A j) : (∏ j, g j (ω j)) = f (ω i) := by + dsimp only [g] + simp only [Fintype.prod_dite_eq'] + have he (j : I) : (μ j).expectation (g j) = + if h : j = i then (μ i).expectation f else 1 := by + by_cases h : j = i + · subst j + simp [g] + · simp [g, h, expectation_const] + calc + _ = (pi μ).expectation (fun ω => ∏ j, g j (ω j)) := by + congr 1 + funext ω + exact (hg ω).symm + _ = ∏ j, (μ j).expectation (g j) := expectation_pi_product μ g + _ = _ := by simp_rw [he]; simp + +theorem prob_pi_coordinate (μ : ∀ i, FiniteLaw (A i)) + (i : I) (P : A i → Prop) : + (pi μ).prob (fun ω => P (ω i)) = (μ i).prob P := by + classical + rw [prob_eq_expectation, prob_eq_expectation] + exact expectation_pi_coordinate μ i (fun a => if P a then 1 else 0) + +theorem prob_pi (μ : ∀ i, FiniteLaw (A i)) (P : ∀ i, A i → Prop) : + (pi μ).prob (fun ω => ∀ i, P i (ω i)) = ∏ i, (μ i).prob (P i) := by + classical + rw [prob_eq_expectation] + calc + _ = (pi μ).expectation (fun ω => ∏ i, if P i (ω i) then 1 else 0) := by + congr 1 + funext ω + symm + by_cases h : ∀ i, P i (ω i) + · simpa only [ite_eq_left h] using + (Fintype.prod_boole (p := fun i => P i (ω i)) (M₀ := ℝ)) + · simpa only [ite_eq_right h] using + (Fintype.prod_boole (p := fun i => P i (ω i)) (M₀ := ℝ)) + _ = ∏ i, (μ i).expectation (fun a => if P i a then 1 else 0) := + expectation_pi_product μ (fun i a => if P i a then 1 else 0) + _ = _ := by simp_rw [prob_eq_expectation] + +end ProductCoordinates + +variable {Ω Γ : Type*} [Fintype Ω] [Fintype Γ] + +theorem prob_prod (μ : FiniteLaw Ω) (ν : FiniteLaw Γ) + (P : Ω → Prop) (Q : Γ → Prop) : + (μ.prod ν).prob (fun z => P z.1 ∧ Q z.2) = μ.prob P * ν.prob Q := by + classical + simp only [prob, prod, Fintype.sum_prod_type] + calc + _ = ∑ ω, ∑ γ, + (if P ω then μ.weight ω else 0) * (if Q γ then ν.weight γ else 0) := by + apply Finset.sum_congr rfl + intro ω _ + apply Finset.sum_congr rfl + intro γ _ + by_cases hp : P ω <;> by_cases hq : Q γ <;> simp [hp, hq] + _ = _ := by + simp_rw [← Finset.mul_sum] + rw [← Finset.sum_mul] + +def map (μ : FiniteLaw Ω) (f : Ω → Γ) : FiniteLaw Γ where + weight γ := ∑ ω, if f ω = γ then μ.weight ω else 0 + nonneg γ := Finset.sum_nonneg fun ω _ => by + split_ifs + · exact μ.nonneg ω + · exact le_rfl + total := by + rw [Finset.sum_comm] + simpa using μ.total + +@[simp] theorem map_weight (μ : FiniteLaw Ω) (f : Ω → Γ) (γ : Γ) : + (map μ f).weight γ = ∑ ω, if f ω = γ then μ.weight ω else 0 := rfl + +theorem map_weight_eq_prob (μ : FiniteLaw Ω) (f : Ω → Γ) (γ : Γ) : + (map μ f).weight γ = μ.prob (fun ω => f ω = γ) := rfl + +theorem expectation_map (μ : FiniteLaw Ω) (f : Ω → Γ) (g : Γ → ℝ) : + (map μ f).expectation g = μ.expectation (fun ω => g (f ω)) := by + unfold expectation + simp only [map_weight, Finset.sum_mul] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro ω _ + simp [ite_mul] + +theorem prob_map (μ : FiniteLaw Ω) (f : Ω → Γ) (P : Γ → Prop) : + (map μ f).prob P = μ.prob (fun ω => P (f ω)) := by + rw [prob_eq_expectation, expectation_map, prob_eq_expectation] + +theorem map_uniform_of_fiber_card_eq [Nonempty Ω] [Nonempty Γ] (f : Ω → Γ) + (hfiber : ∀ y z : Γ, + Nat.card {x : Ω // f x = y} = Nat.card {x : Ω // f x = z}) : + (uniform Ω).map f = uniform Γ := by + classical + apply eq_uniform_of_weight_eq + intro y z + rw [map_weight_eq_prob, map_weight_eq_prob, uniform_prob, uniform_prob] + have hc : (Finset.univ.filter (fun x : Ω => f x = y)).card = + (Finset.univ.filter (fun x : Ω => f x = z)).card := by + simpa only [Nat.card_eq_fintype_card, Fintype.card_subtype] using hfiber y z + rw [hc] + +theorem map_uniform_equiv [Nonempty Ω] [Nonempty Γ] (e : Ω ≃ Γ) : + (uniform Ω).map e = uniform Γ := by + classical + apply ext_weight + funext y + simp [map, uniform, ← e.eq_symm_apply, Fintype.card_congr e] + +theorem uniform_prod (Ω Γ : Type*) [Fintype Ω] [Fintype Γ] + [Nonempty Ω] [Nonempty Γ] : + uniform (Ω × Γ) = (uniform Ω).prod (uniform Γ) := + (eq_uniform_of_weight_eq ((uniform Ω).prod (uniform Γ)) (fun _ _ => rfl)).symm + +theorem pi_uniform {I : Type*} [Fintype I] [DecidableEq I] {A : I → Type*} + [∀ i, Fintype (A i)] [∀ i, Nonempty (A i)] : + pi (fun i => uniform (A i)) = uniform (∀ i, A i) := + eq_uniform_of_weight_eq (pi (fun i => uniform (A i))) (fun _ _ => rfl) + +theorem prob_prod_average (mu : FiniteLaw Ω) (nu : FiniteLaw Γ) + (P : Ω × Γ → Prop) : + (mu.prod nu).prob P = mu.expectation (fun x => nu.prob (fun y => P (x, y))) := by + simp only [prob_eq_expectation] + exact expectation_prod mu nu (fun z => if P z then 1 else 0) + +theorem prob_prod_le_bad_add (mu : FiniteLaw Ω) (nu : FiniteLaw Γ) + (P : Ω × Γ → Prop) (Bad : Ω → Prop) (b : ℝ) (hb : 0 ≤ b) + (hgood : ∀ x, ¬Bad x → nu.prob (fun y => P (x, y)) ≤ b) : + (mu.prod nu).prob P ≤ mu.prob Bad + b := by + classical + rw [prob_prod_average] + calc + _ ≤ mu.expectation (fun x => (if Bad x then (1 : ℝ) else 0) + b) := by + apply expectation_mono + intro x + by_cases hx : Bad x + · simp only [ite_eq_left hx] + exact (nu.prob_le_one _).trans (le_add_of_nonneg_right hb) + · simpa only [ite_eq_right hx, zero_add] using hgood x hx + _ = mu.prob Bad + b := by + rw [expectation_add, expectation_const, ← prob_eq_expectation] + +theorem prob_uniform_prod_equiv {X Y Z : Type*} + [Fintype X] [Fintype Y] [Fintype Z] + [Nonempty X] [Nonempty Y] [Nonempty Z] + (e : X ≃ Y × Z) (P : X → Prop) : + (uniform X).prob P = (uniform Y).expectation + (fun x => (uniform Z).prob (fun y => P (e.symm (x, y)))) := by + calc + _ = ((uniform X).map e).prob (fun z => P (e.symm z)) := by + rw [prob_map] + simp only [Equiv.symm_apply_apply] + _ = _ := by rw [map_uniform_equiv, uniform_prod, prob_prod_average] + +section UniformSplit + +variable {I : Type*} [Fintype I] [DecidableEq I] [Nonempty Ω] + +theorem map_pi_uniform_split (p : I → Prop) [DecidablePred p] : + (pi (fun _ : I => uniform Ω)).map + (Equiv.piEquivPiSubtypeProd p (fun _ => Ω)) = + (uniform ({i : I // p i} → Ω)).prod (uniform ({i : I // ¬p i} → Ω)) := by + rw [pi_uniform, map_uniform_equiv, uniform_prod] + +theorem prob_pi_uniform_split (p : I → Prop) [DecidablePred p] + (P : (I → Ω) → Prop) : + (pi (fun _ : I => uniform Ω)).prob P = + (uniform ({i : I // p i} → Ω)).expectation (fun x => + (uniform ({i : I // ¬p i} → Ω)).prob (fun y => + P ((Equiv.piEquivPiSubtypeProd p (fun _ => Ω)).symm (x, y)))) := by + rw [pi_uniform] + exact prob_uniform_prod_equiv (Equiv.piEquivPiSubtypeProd p (fun _ => Ω)) P + +theorem prob_pi_uniform_split_le (p : I → Prop) [DecidablePred p] + (P : (I → Ω) → Prop) (b : ℝ) + (h : ∀ x : {i : I // p i} → Ω, + (uniform ({i : I // ¬p i} → Ω)).prob (fun y => + P ((Equiv.piEquivPiSubtypeProd p (fun _ => Ω)).symm (x, y))) ≤ b) : + (pi (fun _ : I => uniform Ω)).prob P ≤ b := by + rw [prob_pi_uniform_split p P] + calc + _ ≤ (uniform ({i : I // p i} → Ω)).expectation (fun _ => b) := + expectation_mono _ h + _ = b := expectation_const _ b + +theorem prob_pi_uniform_split_le_bad (p : I → Prop) [DecidablePred p] + (P : (I → Ω) → Prop) (Bad : ({i : I // p i} → Ω) → Prop) + (b : ℝ) (hb : 0 ≤ b) + (hgood : ∀ x : {i : I // p i} → Ω, ¬Bad x → + (uniform ({i : I // ¬p i} → Ω)).prob (fun y => + P ((Equiv.piEquivPiSubtypeProd p (fun _ => Ω)).symm (x, y))) ≤ b) : + (pi (fun _ : I => uniform Ω)).prob P ≤ + (uniform ({i : I // p i} → Ω)).prob Bad + b := by + rw [prob_pi_uniform_split p P] + simpa only [prob_prod_average] using + prob_prod_le_bad_add (uniform ({i : I // p i} → Ω)) + (uniform ({i : I // ¬p i} → Ω)) + (fun z => P ((Equiv.piEquivPiSubtypeProd p (fun _ => Ω)).symm z)) Bad b hb hgood + +end UniformSplit + +end RyserCoveringCounterexample.FiniteLaw + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Probability/ProductMap.lean b/lean/OAI/Combinatorics/Ryser/Probability/ProductMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..a597bcaa1c2d7a9d51451fe288331128f14d693b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Probability/ProductMap.lean @@ -0,0 +1,40 @@ +import OAI.Combinatorics.Ryser.Probability.Product + +namespace OAI + +noncomputable section +attribute [local instance] Classical.propDecidable +open scoped BigOperators + +namespace RyserCoveringCounterexample.FiniteLaw + +theorem map_map {Ω Γ Λ : Type*} [Fintype Ω] [Fintype Γ] [Fintype Λ] + (mu : FiniteLaw Ω) (f : Ω → Γ) (g : Γ → Λ) : + (mu.map f).map g = mu.map (g ∘ f) := by + apply ext_weight + funext z + simp only [map_weight_eq_prob, prob_map, Function.comp_apply] + +theorem map_pi {I : Type*} [Fintype I] [DecidableEq I] + {A B : I → Type*} [∀ i, Fintype (A i)] [∀ i, Fintype (B i)] + (mu : ∀ i, FiniteLaw (A i)) (f : ∀ i, A i → B i) : + (pi mu).map (fun a i => f i (a i)) = pi (fun i => (mu i).map (f i)) := by + apply ext_weight + funext b + rw [map_weight_eq_prob] + calc + (pi mu).prob (fun a => (fun i => f i (a i)) = b) = + (pi mu).prob (fun a => ∀ i, f i (a i) = b i) := by + congr 1 + funext a + exact propext ⟨fun h i => congrFun h i, fun h => funext h⟩ + _ = ∏ i, (mu i).prob (fun a => f i a = b i) := + prob_pi mu (fun i a => f i a = b i) + _ = (pi (fun i => (mu i).map (f i))).weight b := by + simp only [pi_weight, map_weight_eq_prob] + +end RyserCoveringCounterexample.FiniteLaw + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Probability/RareAnchor.lean b/lean/OAI/Combinatorics/Ryser/Probability/RareAnchor.lean new file mode 100644 index 0000000000000000000000000000000000000000..9343be04bfc96cfc9d8c477a3edb45242d5c0d34 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Probability/RareAnchor.lean @@ -0,0 +1,142 @@ +import Mathlib.Tactic.Ring +import OAI.Combinatorics.Ryser.Probability.Finite + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample + +lemma rareAnchor_centering_raw + {Ω : Type*} [Fintype Ω] + (w : Ω → ℝ) + (hw : ∀ ω, 0 ≤ w ω) + (htotal : (∑ ω, w ω) = 1) + (g : Ω → ℝ) (b C r : ℝ) + (E : Ω → Prop) [DecidablePred E] + (hbound : ∀ ω, |g ω - b| ≤ C) + (houtside : ∀ ω, ¬ E ω → g ω = b) + (hrare : (∑ ω, if E ω then w ω else 0) ≤ r) : + let m := ∑ ω, w ω * g ω + (∑ ω, w ω * (g ω - m)) = 0 ∧ + (∀ ω, |g ω - m| ≤ 2 * C) ∧ + (∑ ω, w ω * (g ω - m) ^ 2) ≤ C ^ 2 * r := by + classical + let m : ℝ := ∑ ω, w ω * g ω + change + (∑ ω, w ω * (g ω - m)) = 0 ∧ + (∀ ω, |g ω - m| ≤ 2 * C) ∧ + (∑ ω, w ω * (g ω - m) ^ 2) ≤ C ^ 2 * r + + have hconst (a : ℝ) : (∑ ω, w ω * a) = a := by + rw [← Finset.sum_mul, htotal, one_mul] + + have hmlo : b - C ≤ m := by + calc + b - C = ∑ ω, w ω * (b - C) := (hconst _).symm + _ ≤ ∑ ω, w ω * g ω := by + apply Finset.sum_le_sum + intro ω _ + apply mul_le_mul_of_nonneg_left _ (hw ω) + have hlo := (abs_le.mp (hbound ω)).1 + linarith + _ = m := rfl + + have hmhi : m ≤ b + C := by + calc + m = ∑ ω, w ω * g ω := rfl + _ ≤ ∑ ω, w ω * (b + C) := by + apply Finset.sum_le_sum + intro ω _ + apply mul_le_mul_of_nonneg_left _ (hw ω) + have hhi := (abs_le.mp (hbound ω)).2 + linarith + _ = b + C := hconst _ + + have hmean0 : (∑ ω, w ω * (g ω - m)) = 0 := by + calc + (∑ ω, w ω * (g ω - m)) = + (∑ ω, w ω * g ω) - (∑ ω, w ω * m) := by + simp only [mul_sub, Finset.sum_sub_distrib] + _ = m - m := by + change m - (∑ ω, w ω * m) = m - m + rw [hconst m] + _ = 0 := sub_self m + + have hcenterBound : ∀ ω, |g ω - m| ≤ 2 * C := by + intro ω + rcases abs_le.mp (hbound ω) with ⟨hlo, hhi⟩ + apply abs_le.mpr + constructor <;> linarith + + have hsqBound : ∀ ω, (g ω - b) ^ 2 ≤ C ^ 2 := by + intro ω + rcases abs_le.mp (hbound ω) with ⟨hlo, hhi⟩ + have hminus : 0 ≤ C - (g ω - b) := by + linarith + have hplus : 0 ≤ C + (g ω - b) := by + linarith + have hprod := mul_nonneg hminus hplus + nlinarith + + have hanchor : + (∑ ω, w ω * (g ω - b) ^ 2) ≤ C ^ 2 * r := by + calc + (∑ ω, w ω * (g ω - b) ^ 2) ≤ + ∑ ω, (if E ω then w ω else 0) * C ^ 2 := by + apply Finset.sum_le_sum + intro ω _ + by_cases hE : E ω + · simp only [ite_eq_left hE] + exact mul_le_mul_of_nonneg_left (hsqBound ω) (hw ω) + · simp [hE, houtside ω hE] + _ = (∑ ω, if E ω then w ω else 0) * C ^ 2 := by + rw [Finset.sum_mul] + _ ≤ r * C ^ 2 := + mul_le_mul_of_nonneg_right hrare (sq_nonneg C) + _ = C ^ 2 * r := mul_comm _ _ + + have hvariance : + (∑ ω, w ω * (g ω - b) ^ 2) = + (∑ ω, w ω * (g ω - m) ^ 2) + (m - b) ^ 2 := by + calc + (∑ ω, w ω * (g ω - b) ^ 2) = + ∑ ω, + (w ω * (g ω - m) ^ 2 + + (w ω * (g ω - m)) * (2 * (m - b)) + + w ω * (m - b) ^ 2) := by + apply Finset.sum_congr rfl + intro ω _ + ring + _ = (∑ ω, w ω * (g ω - m) ^ 2) + + (∑ ω, w ω * (g ω - m)) * (2 * (m - b)) + + (∑ ω, w ω) * (m - b) ^ 2 := by + rw [Finset.sum_add_distrib, Finset.sum_add_distrib, + ← Finset.sum_mul, ← Finset.sum_mul] + _ = (∑ ω, w ω * (g ω - m) ^ 2) + (m - b) ^ 2 := by + simp only [hmean0, htotal, zero_mul, one_mul, add_zero] + + refine ⟨hmean0, hcenterBound, ?_⟩ + have hshiftNonneg := sq_nonneg (m - b) + linarith [hvariance, hanchor] + +lemma FiniteLaw.rareAnchor_centering + {Ω : Type*} [Fintype Ω] + (μ : FiniteLaw Ω) + (g : Ω → ℝ) (b C r : ℝ) + (E : Ω → Prop) [DecidablePred E] + (hbound : ∀ ω, |g ω - b| ≤ C) + (houtside : ∀ ω, ¬ E ω → g ω = b) + (hrare : μ.prob E ≤ r) : + μ.expectation (fun ω => g ω - μ.expectation g) = 0 ∧ + (∀ ω, |g ω - μ.expectation g| ≤ 2 * C) ∧ + μ.expectation (fun ω => (g ω - μ.expectation g) ^ 2) + ≤ C ^ 2 * r := by + exact @rareAnchor_centering_raw Ω _ + μ.weight μ.nonneg μ.total g b C r E + (fun ω => Classical.propDecidable (E ω)) + hbound houtside hrare + +end RyserCoveringCounterexample + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Probability/Variance.lean b/lean/OAI/Combinatorics/Ryser/Probability/Variance.lean new file mode 100644 index 0000000000000000000000000000000000000000..c42b56c4079eabe29e5bc082750523f0ef5397b4 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Probability/Variance.lean @@ -0,0 +1,264 @@ +import OAI.Combinatorics.Ryser.Probability.Finite +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.Tactic.Ring + +namespace OAI + +open scoped BigOperators +noncomputable section + +namespace RyserCoveringCounterexample +namespace FiniteLaw + +variable {Ω I : Type*} [Fintype Ω] + +def variance (μ : FiniteLaw Ω) (f : Ω → ℝ) : ℝ := + μ.expectation (fun ω => (f ω - μ.expectation f) ^ 2) + +def covariance (μ : FiniteLaw Ω) (f g : Ω → ℝ) : ℝ := + μ.expectation (fun ω => + (f ω - μ.expectation f) * (g ω - μ.expectation g)) + +theorem variance_nonneg (μ : FiniteLaw Ω) (f : Ω → ℝ) : + 0 ≤ μ.variance f := + μ.expectation_nonneg (fun ω => sq_nonneg (f ω - μ.expectation f)) + +theorem covariance_self (μ : FiniteLaw Ω) (f : Ω → ℝ) : + μ.covariance f f = μ.variance f := by + simp only [covariance, variance, pow_two] + +theorem variance_add_sq_mean_sub_eq (μ : FiniteLaw Ω) + (f : Ω → ℝ) (b : ℝ) : + μ.variance f + (μ.expectation f - b) ^ 2 = + μ.expectation (fun ω => (f ω - b) ^ 2) := by + calc + μ.variance f + (μ.expectation f - b) ^ 2 = + μ.expectation (fun ω => + (f ω - μ.expectation f) ^ 2 + + (2 * (μ.expectation f - b)) * (f ω - μ.expectation f) + + (μ.expectation f - b) ^ 2) := by + rw [expectation_add, expectation_add, expectation_smul, + expectation_sub, expectation_const, expectation_const] + simp [variance] + _ = μ.expectation (fun ω => (f ω - b) ^ 2) := by + congr 1 + funext ω + ring + +theorem variance_eq_expectation_sq_sub_sq (μ : FiniteLaw Ω) (f : Ω → ℝ) : + μ.variance f = μ.expectation (fun ω => (f ω) ^ 2) - + (μ.expectation f) ^ 2 := by + apply (eq_sub_iff_add_eq).2 + simpa only [sub_zero] using μ.variance_add_sq_mean_sub_eq f 0 + +theorem variance_le_expectation_sub_const_sq (μ : FiniteLaw Ω) + (f : Ω → ℝ) (b : ℝ) : + μ.variance f ≤ μ.expectation (fun ω => (f ω - b) ^ 2) := by + have h := μ.variance_add_sq_mean_sub_eq f b + nlinarith [sq_nonneg (μ.expectation f - b)] + +theorem variance_le_expectation_sq (μ : FiniteLaw Ω) (f : Ω → ℝ) : + μ.variance f ≤ μ.expectation (fun ω => (f ω) ^ 2) := by + simpa only [sub_zero] using μ.variance_le_expectation_sub_const_sq f 0 + +theorem covariance_eq_expectation_mul_sub_mul (μ : FiniteLaw Ω) + (f g : Ω → ℝ) : + μ.covariance f g = μ.expectation (fun ω => f ω * g ω) - + μ.expectation f * μ.expectation g := by + calc + μ.covariance f g = μ.expectation (fun ω => + f ω * g ω - μ.expectation g * f ω - μ.expectation f * g ω + + μ.expectation f * μ.expectation g) := by + unfold covariance + congr 1 + funext ω + ring + _ = μ.expectation (fun ω => f ω * g ω) - + μ.expectation f * μ.expectation g := by + rw [expectation_add, expectation_sub, expectation_sub, + expectation_smul, expectation_smul, expectation_const] + ring + +theorem variance_add (μ : FiniteLaw Ω) (f g : Ω → ℝ) : + μ.variance (fun ω => f ω + g ω) = + μ.variance f + μ.variance g + 2 * μ.covariance f g := by + calc + μ.variance (fun ω => f ω + g ω) = μ.expectation (fun ω => + (f ω - μ.expectation f) ^ 2 + (g ω - μ.expectation g) ^ 2 + + 2 * ((f ω - μ.expectation f) * (g ω - μ.expectation g))) := by + unfold variance + rw [expectation_add] + congr 1 + funext ω + ring + _ = μ.variance f + μ.variance g + 2 * μ.covariance f g := by + rw [expectation_add, expectation_add, expectation_smul] + rfl + +theorem variance_add_of_covariance_zero (μ : FiniteLaw Ω) (f g : Ω → ℝ) + (hcov : μ.covariance f g = 0) : + μ.variance (fun ω => f ω + g ω) = μ.variance f + μ.variance g := by + rw [variance_add, hcov] + ring + +theorem variance_add_le (μ : FiniteLaw Ω) (f g : Ω → ℝ) : + μ.variance (fun ω => f ω + g ω) ≤ + 2 * μ.variance f + 2 * μ.variance g := by + calc + μ.variance (fun ω => f ω + g ω) = μ.expectation (fun ω => + ((f ω - μ.expectation f) + (g ω - μ.expectation g)) ^ 2) := by + unfold variance + rw [expectation_add] + congr 1 + funext ω + ring + _ ≤ μ.expectation (fun ω => + 2 * (f ω - μ.expectation f) ^ 2 + + 2 * (g ω - μ.expectation g) ^ 2) := by + apply μ.expectation_mono + intro ω + nlinarith [sq_nonneg ((f ω - μ.expectation f) - + (g ω - μ.expectation g))] + _ = 2 * μ.variance f + 2 * μ.variance g := by + rw [expectation_add, expectation_smul, expectation_smul] + rfl + +theorem expectation_finset_sum (μ : FiniteLaw Ω) (S : Finset I) + (f : I → Ω → ℝ) : + μ.expectation (fun ω => ∑ i ∈ S, f i ω) = + ∑ i ∈ S, μ.expectation (f i) := by + simp only [expectation, Finset.mul_sum] + exact Finset.sum_comm + +theorem covariance_finset_sum_left (μ : FiniteLaw Ω) (S : Finset I) + (f : I → Ω → ℝ) (g : Ω → ℝ) : + μ.covariance (fun ω => ∑ i ∈ S, f i ω) g = + ∑ i ∈ S, μ.covariance (f i) g := by + unfold covariance + rw [expectation_finset_sum μ S f] + simp_rw [← Finset.sum_sub_distrib, Finset.sum_mul] + exact expectation_finset_sum μ S + (fun i ω => (f i ω - μ.expectation (f i)) * (g ω - μ.expectation g)) + +theorem covariance_finset_sum_right (μ : FiniteLaw Ω) (S : Finset I) + (g : Ω → ℝ) (f : I → Ω → ℝ) : + μ.covariance g (fun ω => ∑ i ∈ S, f i ω) = + ∑ i ∈ S, μ.covariance g (f i) := by + unfold covariance + rw [expectation_finset_sum μ S f] + simp_rw [← Finset.sum_sub_distrib, Finset.mul_sum] + exact expectation_finset_sum μ S + (fun i ω => (g ω - μ.expectation g) * (f i ω - μ.expectation (f i))) + +theorem variance_sum_le (μ : FiniteLaw Ω) (S : Finset I) (f : I → Ω → ℝ) : + μ.variance (fun ω => ∑ i ∈ S, f i ω) ≤ + (S.card : ℝ) * ∑ i ∈ S, μ.variance (f i) := by + classical + calc + μ.variance (fun ω => ∑ i ∈ S, f i ω) = + μ.expectation (fun ω => + (∑ i ∈ S, (f i ω - μ.expectation (f i))) ^ 2) := by + simp only [variance, expectation_finset_sum, Finset.sum_sub_distrib] + _ ≤ μ.expectation (fun ω => + (S.card : ℝ) * ∑ i ∈ S, (f i ω - μ.expectation (f i)) ^ 2) := by + apply μ.expectation_mono + intro ω + simpa only [one_mul, one_pow, Finset.sum_const, nsmul_eq_mul, mul_one] using + (Finset.sum_mul_sq_le_sq_mul_sq S (fun _ : I => (1 : ℝ)) + (fun i => f i ω - μ.expectation (f i))) + _ = (S.card : ℝ) * ∑ i ∈ S, μ.variance (f i) := by + simp only [expectation_smul, expectation_finset_sum, variance] + +theorem variance_sum_of_pairwise_covariance_zero + (μ : FiniteLaw Ω) (S : Finset I) (f : I → Ω → ℝ) + (hcov : ∀ i ∈ S, ∀ j ∈ S, i ≠ j → μ.covariance (f i) (f j) = 0) : + μ.variance (fun ω => ∑ i ∈ S, f i ω) = + ∑ i ∈ S, μ.variance (f i) := by + classical + rw [← covariance_self μ (fun ω => ∑ i ∈ S, f i ω), covariance_finset_sum_left] + apply Finset.sum_congr rfl + intro i hi + rw [covariance_finset_sum_right] + calc + (∑ j ∈ S, μ.covariance (f i) (f j)) = μ.covariance (f i) (f i) := by + apply Finset.sum_eq_single i + · intro j hj hji + exact hcov i hi j hj (Ne.symm hji) + · intro hnot + exact (hnot hi).elim + _ = μ.variance (f i) := covariance_self μ (f i) + +theorem variance_sum_of_pairwise_expectation_mul + (μ : FiniteLaw Ω) (S : Finset I) (f : I → Ω → ℝ) + (hpair : ∀ i ∈ S, ∀ j ∈ S, i ≠ j → + μ.expectation (fun ω => f i ω * f j ω) = + μ.expectation (f i) * μ.expectation (f j)) : + μ.variance (fun ω => ∑ i ∈ S, f i ω) = + ∑ i ∈ S, μ.variance (f i) := by + apply μ.variance_sum_of_pairwise_covariance_zero S f + intro i hi j hj hij + rw [covariance_eq_expectation_mul_sub_mul, hpair i hi j hj hij, sub_self] + +theorem variance_le_sq_of_bounds (μ : FiniteLaw Ω) (f : Ω → ℝ) {L : ℝ} + (hf0 : ∀ ω, 0 ≤ f ω) (hfL : ∀ ω, f ω ≤ L) : + μ.variance f ≤ L ^ 2 := by + calc + μ.variance f ≤ μ.expectation (fun ω => (f ω) ^ 2) := + μ.variance_le_expectation_sq f + _ ≤ μ.expectation (fun _ => L ^ 2) := + μ.expectation_mono (fun ω => pow_le_pow_left₀ (hf0 ω) (hfL ω) 2) + _ = L ^ 2 := μ.expectation_const (L ^ 2) + +theorem chebyshev (μ : FiniteLaw Ω) (f : Ω → ℝ) {t : ℝ} (ht : 0 < t) : + μ.prob (fun ω => t ≤ |f ω - μ.expectation f|) ≤ μ.variance f / t ^ 2 := by + calc + μ.prob (fun ω => t ≤ |f ω - μ.expectation f|) ≤ + μ.prob (fun ω => t ^ 2 ≤ (f ω - μ.expectation f) ^ 2) := by + apply μ.prob_mono + intro ω hω + simpa only [sq_abs] using pow_le_pow_left₀ ht.le hω 2 + _ ≤ μ.variance f / t ^ 2 := + μ.prob_ge_le_expectation_div + (fun ω => (f ω - μ.expectation f) ^ 2) + (fun ω => sq_nonneg (f ω - μ.expectation f)) (pow_pos ht 2) + +theorem prob_gt_mean_bound_add_le (μ : FiniteLaw Ω) (f : Ω → ℝ) + (m t : ℝ) (hm : μ.expectation f ≤ m) (ht : 0 < t) : + μ.prob (fun ω => m + t < f ω) ≤ μ.variance f / t ^ 2 := by + calc + μ.prob (fun ω => m + t < f ω) ≤ + μ.prob (fun ω => t ≤ |f ω - μ.expectation f|) := by + apply μ.prob_mono + intro ω hω + calc + t ≤ f ω - μ.expectation f := by linarith + _ ≤ |f ω - μ.expectation f| := le_abs_self _ + _ ≤ μ.variance f / t ^ 2 := μ.chebyshev f ht + +theorem variance_le_sq_mul_prob_of_anchor (μ : FiniteLaw Ω) + (f : Ω → ℝ) (P : Ω → Prop) (b L : ℝ) + (hoff : ∀ ω, ¬ P ω → f ω = b) + (hbound : ∀ ω, P ω → |f ω - b| ≤ L) : + μ.variance f ≤ L ^ 2 * μ.prob P := by + classical + calc + μ.variance f ≤ μ.expectation (fun ω => (f ω - b) ^ 2) := + μ.variance_le_expectation_sub_const_sq f b + _ ≤ μ.expectation (fun ω => L ^ 2 * (if P ω then 1 else 0)) := by + apply μ.expectation_mono + intro ω + by_cases hp : P ω + · have hsq : (f ω - b) ^ 2 ≤ L ^ 2 := by + simpa only [sq_abs] using + pow_le_pow_left₀ (abs_nonneg (f ω - b)) (hbound ω hp) 2 + simpa [hp] using hsq + · simp [hp, hoff ω hp] + _ = L ^ 2 * μ.prob P := by + rw [expectation_smul, ← μ.prob_eq_expectation P] + +end FiniteLaw +end RyserCoveringCounterexample + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/AnalyticalLimits.lean b/lean/OAI/Combinatorics/Ryser/Selection/AnalyticalLimits.lean new file mode 100644 index 0000000000000000000000000000000000000000..65ffe543543ce24cd16c4236a240b8544c933e2f --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/AnalyticalLimits.lean @@ -0,0 +1,54 @@ +import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics +import Mathlib.Analysis.SpecificLimits.Basic +import Mathlib.Topology.MetricSpace.Pseudo.Lemmas +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring + +namespace OAI + +open Filter Topology + +namespace RyserCoveringCounterexample.Selection + +theorem tendsto_nat_pow_mul_exp_neg_mul (m : ℕ) {δ : ℝ} (hδ : 0 < δ) : + Tendsto (fun K : ℕ => (K : ℝ) ^ m * Real.exp (-δ * (K : ℝ))) + atTop (𝓝 0) := by + simpa only [Function.comp_def, Real.rpow_natCast] using + (tendsto_rpow_mul_exp_neg_mul_atTop_nhds_zero (m : ℝ) δ hδ).comp + (tendsto_natCast_atTop_atTop (R := ℝ)) + +theorem tendsto_nat_mul_exp_linear_sub_mul_log {a : ℝ} (ha : 0 < a) (b : ℝ) : + Tendsto + (fun q : ℕ => (q : ℝ) * + Real.exp (b * (q : ℝ) - a * (q : ℝ) * Real.log (q : ℝ))) + atTop (𝓝 0) := by + have hlog : Tendsto (fun q : ℕ => a * Real.log (q : ℝ)) atTop atTop := by + simpa only [Function.comp_def] using + (Real.tendsto_log_atTop.comp + (tendsto_natCast_atTop_atTop (R := ℝ))).const_mul_atTop ha + have hdom : Tendsto (fun q : ℕ => (q : ℝ) * Real.exp (-(q : ℝ))) + atTop (𝓝 0) := by + simpa only [Function.comp_def, pow_one] using + (Real.tendsto_pow_mul_exp_neg_atTop_nhds_zero 1).comp + (tendsto_natCast_atTop_atTop (R := ℝ)) + refine squeeze_zero' ?_ ?_ hdom + · exact Filter.Eventually.of_forall fun q : ℕ => + mul_nonneg (Nat.cast_nonneg q) (Real.exp_pos _).le + · filter_upwards [hlog.eventually_ge_atTop (b + 1)] with q hq + have hexp : b * (q : ℝ) - a * (q : ℝ) * Real.log (q : ℝ) ≤ -(q : ℝ) := by + calc + b * (q : ℝ) - a * (q : ℝ) * Real.log (q : ℝ) + = (b - a * Real.log (q : ℝ)) * (q : ℝ) := by ring + _ ≤ (-1) * (q : ℝ) := + mul_le_mul_of_nonneg_right (by linarith) (Nat.cast_nonneg q) + _ = -(q : ℝ) := by ring + exact mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr hexp) (Nat.cast_nonneg q) + +theorem tendsto_geometric_tail {r : ℝ} (hr0 : 0 ≤ r) (hr1 : r < 1) : + Tendsto (fun N : ℕ => r ^ N / (1 - r)) atTop (𝓝 0) := by + simpa only [zero_div] using + (tendsto_pow_atTop_nhds_zero_of_lt_one hr0 hr1).div_const (1 - r) + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/CertificateBounds.lean b/lean/OAI/Combinatorics/Ryser/Selection/CertificateBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..95da26c3ae5a60e96201e4c363a0da55a83985c0 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/CertificateBounds.lean @@ -0,0 +1,88 @@ +import OAI.Combinatorics.Ryser.Selection.Parameters +import OAI.Combinatorics.Ryser.Selection.SmallRange +import OAI.Combinatorics.Ryser.Selection.LargeCertificates +import OAI.Combinatorics.Ryser.Selection.UniformDensity + +namespace OAI + +universe u +noncomputable section +namespace RyserCoveringCounterexample.Selection + +def smallCertificateBase (D q m : ℕ) : ℝ := + (2 * (m : ℝ)) * ((2 * (D : ℝ) ^ 3) / (q : ℝ)) + +def densityFailureBound (D q : ℕ) : ℝ := + (densityChunkCount D : ℝ) * Real.exp (-densityRate D * (q : ℝ) * Real.log (q : ℝ)) + +def certificateEventBound (D K q m : ℕ) : ℝ := + if (m : ℝ) ≤ selectionCutoff D * (q : ℝ) then + smallCertificateBase D q m ^ ((K - 2) * m) + else densityFailureBound D q + Real.exp (-(((K : ℝ) * densityDelta D - 2) * (m : ℝ))) + +theorem certificateEventBound_nonneg (D K q m : ℕ) : + 0 ≤ certificateEventBound D K q m := by + unfold certificateEventBound smallCertificateBase densityFailureBound + split_ifs <;> positivity + +theorem smallCertificateBase_eq (D q m : ℕ) : + smallCertificateBase D q m = 2 * equationBound D * (m : ℝ) / (q : ℝ) := by + unfold smallCertificateBase equationBound + ring + +theorem smallCertificateBase_le_half (D q m : ℕ) (hD : 1 ≤ D) (hq : 0 < q) + (hsmall : (m : ℝ) ≤ selectionCutoff D * (q : ℝ)) : + smallCertificateBase D q m ≤ 1 / 2 := by + have hC := equationBound_pos D hD + have hqr : (0 : ℝ) < q := Nat.cast_pos.mpr hq + have hfactor : 0 ≤ 2 * equationBound D / (q : ℝ) := + div_nonneg (mul_nonneg (by norm_num) hC.le) hqr.le + have hscaled := mul_le_mul_of_nonneg_left hsmall hfactor + have hhalf : (2 * equationBound D / (q : ℝ)) * + (selectionCutoff D * (q : ℝ)) = 1 / 2 := by + unfold selectionCutoff + field_simp [hC.ne', hqr.ne']; ring + rw [hhalf] at hscaled + rw [smallCertificateBase_eq] + calc + _ = (2 * equationBound D / (q : ℝ)) * (m : ℝ) := by ring + _ ≤ 1 / 2 := hscaled + +theorem exists_threshold_certificate_event_bound (D : ℕ) (hD : 1 ≤ D) (K : ℕ) : + ∃ Q : ℕ, ∀ (F : Type u) [Field F] [Fintype F] [DecidableEq F] + (n : ℕ) (data : Data F n), Bounded D data → Q ≤ Fintype.card F → + ∀ (I : Finset (Fin n)) (T : Finset (Position n K)), + T ⊆ targetPositions I K → T.card ≤ 2 * I.card → + (poolLaw F n K).prob (NoFeasibleOutside data I T) ≤ + certificateEventBound D K (Fintype.card F) I.card := by + obtain ⟨Q, hQ⟩ := prob_feasibleMass_lt_densityDelta_le.{u} D hD K + refine ⟨Q, ?_⟩ + intro F _ _ _ n data hdata hq I T hT hcard + unfold certificateEventBound + by_cases hsmall : (I.card : ℝ) ≤ selectionCutoff D * (Fintype.card F : ℝ) + · rw [ite_eq_left hsmall] + have hbase := smallCertificateBase_le_half D (Fintype.card F) I.card hD + Fintype.card_pos hsmall + exact prob_noFeasibleOutside_small_le data hdata I T hT hcard + (hbase.trans (by norm_num)) + · rw [ite_eq_right hsmall] + have hlarge : (Fintype.card F : ℝ) / (4 * equationBound D) < I.card := by + calc + _ = selectionCutoff D * (Fintype.card F : ℝ) := by + unfold selectionCutoff + ring + _ < I.card := lt_of_not_ge hsmall + have hdensity := hQ F n data hdata hq I T hlarge hcard + have hdensity' : + (poolLaw F n K).prob (fun pool => (feasibleMass data I T pool : ℝ) < + densityDelta D * (I.card : ℝ) * (Fintype.card F : ℝ) ^ 2) ≤ + densityFailureBound D (Fintype.card F) := by + simpa only [densityFailureBound, mul_assoc] using hdensity + exact (prob_noFeasibleOutside_le_density_bad_add_exp data I T (densityDelta D) + hT hcard).trans (add_le_add hdensity' le_rfl) + +end RyserCoveringCounterexample.Selection + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/CertificateCount.lean b/lean/OAI/Combinatorics/Ryser/Selection/CertificateCount.lean new file mode 100644 index 0000000000000000000000000000000000000000..a581a446f65fc5072a48a584847448ef395eb7b9 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/CertificateCount.lean @@ -0,0 +1,139 @@ +import Mathlib.Algebra.BigOperators.Ring.Finset +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Analysis.Complex.Exponential +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +open scoped BigOperators + +variable {α : Type*} [instDecidableEqα : DecidableEq α] + +theorem sum_powerset_pow_card_le_exp (S : Finset α) (x : ℝ) (hx : 0 ≤ x) : + (∑ T ∈ S.powerset, x ^ T.card) ≤ Real.exp ((S.card : ℝ) * x) := let _ := instDecidableEqα; by + calc + (∑ T ∈ S.powerset, x ^ T.card) = ∏ _a ∈ S, (1 + x) := by + simpa only [Finset.prod_const] using + (Finset.prod_one_add (f := fun _ : α => x) S).symm + _ ≤ Real.exp (∑ _a ∈ S, x) := + Real.prod_one_add_le_exp_sum S (fun _ => hx) + _ = Real.exp ((S.card : ℝ) * x) := by simp + +theorem card_small_subsets_mul_pow_le_exp (S : Finset α) (r : ℕ) + (x : ℝ) (hx : 0 ≤ x) (hx_one : x ≤ 1) : + (((S.powerset.filter (fun T => T.card ≤ r)).card : ℝ) * x ^ r) ≤ + Real.exp ((S.card : ℝ) * x) := by + calc + (((S.powerset.filter (fun T => T.card ≤ r)).card : ℝ) * x ^ r) = + ∑ _T ∈ S.powerset.filter (fun T => T.card ≤ r), x ^ r := by simp + _ ≤ ∑ T ∈ S.powerset.filter (fun T => T.card ≤ r), x ^ T.card := by + apply Finset.sum_le_sum + intro T hT + exact pow_le_pow_of_le_one hx hx_one (Finset.mem_filter.mp hT).2 + _ ≤ ∑ T ∈ S.powerset, x ^ T.card := + Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) + (fun T _ _ => pow_nonneg hx T.card) + _ ≤ Real.exp ((S.card : ℝ) * x) := sum_powerset_pow_card_le_exp S x hx + +theorem card_fixed_subsets_mul_pow_le_exp (S : Finset α) (m : ℕ) + (x : ℝ) (hx : 0 ≤ x) : + (((S.powerset.filter (fun T => T.card = m)).card : ℝ) * x ^ m) ≤ + Real.exp ((S.card : ℝ) * x) := by + calc + (((S.powerset.filter (fun T => T.card = m)).card : ℝ) * x ^ m) = + ∑ _T ∈ S.powerset.filter (fun T => T.card = m), x ^ m := by simp + _ = ∑ T ∈ S.powerset.filter (fun T => T.card = m), x ^ T.card := by + apply Finset.sum_congr rfl + intro T hT + rw [(Finset.mem_filter.mp hT).2] + _ ≤ ∑ T ∈ S.powerset, x ^ T.card := + Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) + (fun T _ _ => pow_nonneg hx T.card) + _ ≤ Real.exp ((S.card : ℝ) * x) := sum_powerset_pow_card_le_exp S x hx + +theorem card_small_subsets_le (S : Finset α) (K m : ℕ) + (hK : 1 ≤ K) (hcard : S.card = K * m) : + ((S.powerset.filter (fun T => T.card ≤ 2 * m)).card : ℝ) ≤ + (3 * (K : ℝ) ^ 2) ^ m := by + have hKr : (1 : ℝ) ≤ (K : ℝ) := by exact Nat.one_le_cast.mpr hK + have hKpos : (0 : ℝ) < (K : ℝ) := lt_of_lt_of_le zero_lt_one hKr + have hKne : (K : ℝ) ≠ 0 := ne_of_gt hKpos + have he_three : Real.exp 1 ≤ (3 : ℝ) := by + have h := Real.exp_le_two_add_div_two_sub (x := (1 : ℝ)) zero_le_one one_lt_two + norm_num at h + exact h + have hweight := card_small_subsets_mul_pow_le_exp S (2 * m) (K : ℝ)⁻¹ + (inv_nonneg.mpr hKpos.le) (inv_le_one_of_one_le₀ hKr) + have hexponent : (S.card : ℝ) * (K : ℝ)⁻¹ = (m : ℝ) := by + rw [hcard, Nat.cast_mul] + field_simp [hKne] + have hexp : Real.exp (m : ℝ) = Real.exp 1 ^ m := by + simpa only [mul_one] using Real.exp_nat_mul (1 : ℝ) m + have hcancel : + (3 * (K : ℝ) ^ 2) ^ m * ((K : ℝ)⁻¹) ^ (2 * m) = (3 : ℝ) ^ m := by + rw [pow_mul, ← mul_pow] + congr 1 + rw [mul_assoc, ← mul_pow, mul_inv_cancel₀ hKne, one_pow, mul_one] + apply (mul_le_mul_iff_left₀ (pow_pos (inv_pos.mpr hKpos) (2 * m))).mp + calc + ((S.powerset.filter (fun T => T.card ≤ 2 * m)).card : ℝ) * + ((K : ℝ)⁻¹) ^ (2 * m) ≤ Real.exp (m : ℝ) := by + simpa only [hexponent] using hweight + _ = Real.exp 1 ^ m := hexp + _ ≤ (3 : ℝ) ^ m := + pow_le_pow_left₀ (Real.exp_pos 1).le he_three m + _ = (3 * (K : ℝ) ^ 2) ^ m * ((K : ℝ)⁻¹) ^ (2 * m) := hcancel.symm + +theorem card_fixed_subsets_le (S : Finset α) (m : ℕ) : + ((S.powerset.filter (fun T => T.card = m)).card : ℝ) ≤ + (Real.exp 1 * (S.card : ℝ) / (m : ℝ)) ^ m := by + by_cases hm : m = 0 + · subst m + have hempty : S.powerset.filter (fun T => T.card = 0) = {∅} := by + ext T + simp only [Finset.mem_filter, Finset.mem_powerset, Finset.card_eq_zero, + Finset.mem_singleton] + constructor + · exact And.right + · intro hT + subst T + exact ⟨Finset.empty_subset S, rfl⟩ + rw [hempty] + simp + by_cases hS : S.card = 0 + · have hSempty : S = ∅ := Finset.card_eq_zero.mp hS + subst S + simp [hm, Ne.symm hm] + have hmpos : (0 : ℝ) < (m : ℝ) := by exact Nat.cast_pos.mpr (Nat.pos_of_ne_zero hm) + have hSpos : (0 : ℝ) < (S.card : ℝ) := by exact Nat.cast_pos.mpr (Nat.pos_of_ne_zero hS) + have hmne : (m : ℝ) ≠ 0 := ne_of_gt hmpos + have hSne : (S.card : ℝ) ≠ 0 := ne_of_gt hSpos + have hxpos : (0 : ℝ) < (m : ℝ) / (S.card : ℝ) := div_pos hmpos hSpos + have hweight := card_fixed_subsets_mul_pow_le_exp S m + ((m : ℝ) / (S.card : ℝ)) hxpos.le + have hexponent : + (S.card : ℝ) * ((m : ℝ) / (S.card : ℝ)) = (m : ℝ) := by + field_simp [hmne, hSne] + have hexp : Real.exp (m : ℝ) = Real.exp 1 ^ m := by + simpa only [mul_one] using Real.exp_nat_mul (1 : ℝ) m + have hcancel : + (Real.exp 1 * (S.card : ℝ) / (m : ℝ)) ^ m * + ((m : ℝ) / (S.card : ℝ)) ^ m = Real.exp 1 ^ m := by + rw [← mul_pow] + congr 1 + field_simp [hmne, hSne] + apply (mul_le_mul_iff_left₀ (pow_pos hxpos m)).mp + calc + ((S.powerset.filter (fun T => T.card = m)).card : ℝ) * + ((m : ℝ) / (S.card : ℝ)) ^ m ≤ Real.exp (m : ℝ) := by + simpa only [hexponent] using hweight + _ = Real.exp 1 ^ m := hexp + _ = (Real.exp 1 * (S.card : ℝ) / (m : ℝ)) ^ m * + ((m : ℝ) / (S.card : ℝ)) ^ m := hcancel.symm + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/CertificateUnion.lean b/lean/OAI/Combinatorics/Ryser/Selection/CertificateUnion.lean new file mode 100644 index 0000000000000000000000000000000000000000..5b2344dd409e64b39f4d19a1081138b7df3ad358 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/CertificateUnion.lean @@ -0,0 +1,186 @@ +import OAI.Combinatorics.Ryser.Selection.PoolGraph +import OAI.Combinatorics.Ryser.Selection.PoolCounts +import OAI.Combinatorics.Ryser.Selection.SmallCertificates +import OAI.Combinatorics.Ryser.Selection.CertificateCount +import OAI.Combinatorics.Ryser.Selection.IndependentTail + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Selection + +variable {F : Type*} [Field F] [instFintypeF : Fintype F] [DecidableEq F] {n K : ℕ} + +theorem not_hasCompatibleChoice_mem_certificate_union (data : Data F n) + (pool : Pool F n K) (hK : 0 < K) (hbad : ¬HasCompatibleChoice data pool) : + ∃ I ∈ (Finset.univ : Finset (Fin n)).powerset.filter Finset.Nonempty, + ∃ T ∈ (targetPositions I K).powerset.filter (fun T => T.card ≤ 2 * I.card), + NoFeasibleOutside data I T pool := let _ := instFintypeF; by + classical + obtain ⟨I, T, hI, hT, hcard, hnone⟩ := + not_hasCompatibleChoice_obstruction data pool hK hbad + have hTtarget : T ⊆ targetPositions I K := by + simpa only [targetPositions_eq_filter] using hT + refine ⟨I, Finset.mem_filter.mpr ⟨?_, hI⟩, T, ?_, hnone⟩ + · exact Finset.mem_powerset.mpr (Finset.subset_univ I) + · exact Finset.mem_filter.mpr ⟨Finset.mem_powerset.mpr hTtarget, hcard⟩ + +theorem prob_not_hasCompatibleChoice_le_certificate_sum + (data : Data F n) (hK : 0 < K) : + (poolLaw F n K).prob (fun pool => ¬HasCompatibleChoice data pool) ≤ + ∑ I ∈ (Finset.univ : Finset (Fin n)).powerset.filter Finset.Nonempty, + ∑ T ∈ (targetPositions I K).powerset.filter (fun T => T.card ≤ 2 * I.card), + (poolLaw F n K).prob (NoFeasibleOutside data I T) := by + classical + calc + _ ≤ (poolLaw F n K).prob (fun pool => + ∃ I ∈ (Finset.univ : Finset (Fin n)).powerset.filter Finset.Nonempty, + ∃ T ∈ (targetPositions I K).powerset.filter (fun T => T.card ≤ 2 * I.card), + NoFeasibleOutside data I T pool) := + (poolLaw F n K).prob_mono + (fun pool hbad => not_hasCompatibleChoice_mem_certificate_union data pool hK hbad) + _ ≤ ∑ I ∈ (Finset.univ : Finset (Fin n)).powerset.filter Finset.Nonempty, + (poolLaw F n K).prob (fun pool => + ∃ T ∈ (targetPositions I K).powerset.filter (fun T => T.card ≤ 2 * I.card), + NoFeasibleOutside data I T pool) := prob_exists_mem_le _ _ _ + _ ≤ ∑ I ∈ (Finset.univ : Finset (Fin n)).powerset.filter Finset.Nonempty, + ∑ T ∈ (targetPositions I K).powerset.filter (fun T => T.card ≤ 2 * I.card), + (poolLaw F n K).prob (NoFeasibleOutside data I T) := by + apply Finset.sum_le_sum + intro I _ + exact prob_exists_mem_le _ _ _ + +theorem sum_certificate_probs_le (data : Data F n) (I : Finset (Fin n)) + (hK : 1 ≤ K) (b : ℝ) (hb : 0 ≤ b) + (hbound : ∀ T : Finset (Position n K), T ⊆ targetPositions I K → + T.card ≤ 2 * I.card → (poolLaw F n K).prob (NoFeasibleOutside data I T) ≤ b) : + (∑ T ∈ (targetPositions I K).powerset.filter (fun T => T.card ≤ 2 * I.card), + (poolLaw F n K).prob (NoFeasibleOutside data I T)) ≤ + (3 * (K : ℝ) ^ 2) ^ I.card * b := by + classical + calc + _ ≤ ∑ _T ∈ (targetPositions I K).powerset.filter (fun T => T.card ≤ 2 * I.card), + b := by + apply Finset.sum_le_sum + intro T hT + exact hbound T (Finset.mem_powerset.mp (Finset.mem_filter.mp hT).1) + (Finset.mem_filter.mp hT).2 + _ = (((targetPositions I K).powerset.filter + (fun T => T.card ≤ 2 * I.card)).card : ℝ) * b := by simp + _ ≤ (3 * (K : ℝ) ^ 2) ^ I.card * b := by + apply mul_le_mul_of_nonneg_right _ hb + apply card_small_subsets_le (targetPositions I K) K I.card hK + simp [Nat.mul_comm, card_targetPositions I K] + +theorem sum_certificate_probs_card_eq_le (data : Data F n) (m : ℕ) + (hK : 1 ≤ K) (b : ℝ) (hb : 0 ≤ b) + (hbound : ∀ I : Finset (Fin n), I.card = m → + ∀ T : Finset (Position n K), T ⊆ targetPositions I K → + T.card ≤ 2 * I.card → + (poolLaw F n K).prob (NoFeasibleOutside data I T) ≤ b) : + (∑ I ∈ (Finset.univ : Finset (Fin n)).powerset.filter (fun I => I.card = m), + ∑ T ∈ (targetPositions I K).powerset.filter (fun T => T.card ≤ 2 * I.card), + (poolLaw F n K).prob (NoFeasibleOutside data I T)) ≤ + ((Real.exp 1 * (n : ℝ) / (m : ℝ)) ^ m * (3 * (K : ℝ) ^ 2) ^ m) * b := by + classical + have hcount : + (((Finset.univ : Finset (Fin n)).powerset.filter + (fun I => I.card = m)).card : ℝ) ≤ + (Real.exp 1 * (n : ℝ) / (m : ℝ)) ^ m := by + simpa using card_fixed_subsets_le (Finset.univ : Finset (Fin n)) m + have hfactor : 0 ≤ (3 * (K : ℝ) ^ 2) ^ m * b := + mul_nonneg (pow_nonneg (mul_nonneg (by norm_num) (sq_nonneg (K : ℝ))) m) hb + calc + _ ≤ ∑ _I ∈ (Finset.univ : Finset (Fin n)).powerset.filter (fun I => I.card = m), + (3 * (K : ℝ) ^ 2) ^ m * b := by + apply Finset.sum_le_sum + intro I hI + have hcard := (Finset.mem_filter.mp hI).2 + simpa only [hcard] using sum_certificate_probs_le data I hK b hb (hbound I hcard) + _ = (((Finset.univ : Finset (Fin n)).powerset.filter + (fun I => I.card = m)).card : ℝ) * ((3 * (K : ℝ) ^ 2) ^ m * b) := by simp + _ ≤ (Real.exp 1 * (n : ℝ) / (m : ℝ)) ^ m * + ((3 * (K : ℝ) ^ 2) ^ m * b) := mul_le_mul_of_nonneg_right hcount hfactor + _ = ((Real.exp 1 * (n : ℝ) / (m : ℝ)) ^ m * + (3 * (K : ℝ) ^ 2) ^ m) * b := (mul_assoc _ _ _).symm + +theorem not_hasCompatibleChoice_mem_size_union (data : Data F n) + (pool : Pool F n K) (hK : 0 < K) (hbad : ¬HasCompatibleChoice data pool) : + ∃ m ∈ (Finset.range (n + 1)).filter (fun m => 0 < m), + ∃ I ∈ (Finset.univ : Finset (Fin n)).powerset.filter (fun I => I.card = m), + ∃ T ∈ (targetPositions I K).powerset.filter (fun T => T.card ≤ 2 * I.card), + NoFeasibleOutside data I T pool := by + classical + obtain ⟨I, hI, T, hT, hnone⟩ := + not_hasCompatibleChoice_mem_certificate_union data pool hK hbad + have hpos : 0 < I.card := Finset.card_pos.mpr (Finset.mem_filter.mp hI).2 + have hcard : I.card ≤ n := by + simpa using Finset.card_le_card (Finset.subset_univ I) + refine ⟨I.card, ?_, I, ?_, T, hT, hnone⟩ + · exact Finset.mem_filter.mpr + ⟨Finset.mem_range.mpr (Nat.lt_succ_iff.mpr hcard), hpos⟩ + · exact Finset.mem_filter.mpr ⟨(Finset.mem_filter.mp hI).1, rfl⟩ + +theorem prob_not_hasCompatibleChoice_le_grouped_certificate_sum + (data : Data F n) (hK : 0 < K) : + (poolLaw F n K).prob (fun pool => ¬HasCompatibleChoice data pool) ≤ + ∑ m ∈ (Finset.range (n + 1)).filter (fun m => 0 < m), + ∑ I ∈ (Finset.univ : Finset (Fin n)).powerset.filter (fun I => I.card = m), + ∑ T ∈ (targetPositions I K).powerset.filter (fun T => T.card ≤ 2 * I.card), + (poolLaw F n K).prob (NoFeasibleOutside data I T) := by + classical + calc + _ ≤ (poolLaw F n K).prob (fun pool => + ∃ m ∈ (Finset.range (n + 1)).filter (fun m => 0 < m), + ∃ I ∈ (Finset.univ : Finset (Fin n)).powerset.filter (fun I => I.card = m), + ∃ T ∈ (targetPositions I K).powerset.filter (fun T => T.card ≤ 2 * I.card), + NoFeasibleOutside data I T pool) := + (poolLaw F n K).prob_mono + (fun pool hbad => not_hasCompatibleChoice_mem_size_union data pool hK hbad) + _ ≤ ∑ m ∈ (Finset.range (n + 1)).filter (fun m => 0 < m), + (poolLaw F n K).prob (fun pool => + ∃ I ∈ (Finset.univ : Finset (Fin n)).powerset.filter (fun I => I.card = m), + ∃ T ∈ (targetPositions I K).powerset.filter (fun T => T.card ≤ 2 * I.card), + NoFeasibleOutside data I T pool) := prob_exists_mem_le _ _ _ + _ ≤ ∑ m ∈ (Finset.range (n + 1)).filter (fun m => 0 < m), + ∑ I ∈ (Finset.univ : Finset (Fin n)).powerset.filter (fun I => I.card = m), + (poolLaw F n K).prob (fun pool => + ∃ T ∈ (targetPositions I K).powerset.filter (fun T => T.card ≤ 2 * I.card), + NoFeasibleOutside data I T pool) := by + apply Finset.sum_le_sum + intro m _ + exact prob_exists_mem_le _ _ _ + _ ≤ ∑ m ∈ (Finset.range (n + 1)).filter (fun m => 0 < m), + ∑ I ∈ (Finset.univ : Finset (Fin n)).powerset.filter (fun I => I.card = m), + ∑ T ∈ (targetPositions I K).powerset.filter (fun T => T.card ≤ 2 * I.card), + (poolLaw F n K).prob (NoFeasibleOutside data I T) := by + apply Finset.sum_le_sum + intro m _ + apply Finset.sum_le_sum + intro I _ + exact prob_exists_mem_le _ _ _ + +theorem prob_not_hasCompatibleChoice_le_size_sum + (data : Data F n) (hK : 0 < K) (b : ℕ → ℝ) (hb : ∀ m, 0 ≤ b m) + (hbound : ∀ I : Finset (Fin n), I.Nonempty → + ∀ T : Finset (Position n K), T ⊆ targetPositions I K → + T.card ≤ 2 * I.card → + (poolLaw F n K).prob (NoFeasibleOutside data I T) ≤ b I.card) : + (poolLaw F n K).prob (fun pool => ¬HasCompatibleChoice data pool) ≤ + ∑ m ∈ (Finset.range (n + 1)).filter (fun m => 0 < m), + ((Real.exp 1 * (n : ℝ) / (m : ℝ)) ^ m * (3 * (K : ℝ) ^ 2) ^ m) * b m := by + classical + refine (prob_not_hasCompatibleChoice_le_grouped_certificate_sum data hK).trans ?_ + apply Finset.sum_le_sum + intro m hm + apply sum_certificate_probs_card_eq_le data m (Nat.succ_le_of_lt hK) (b m) (hb m) + intro I hI T hT hcard + have hnonempty : I.Nonempty := Finset.card_pos.mp (by + rw [hI] + exact (Finset.mem_filter.mp hm).2) + simpa only [hI] using hbound I hnonempty T hT hcard + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/Chunk.lean b/lean/OAI/Combinatorics/Ryser/Selection/Chunk.lean new file mode 100644 index 0000000000000000000000000000000000000000..6569ea1f6846b134239ce68b67a807102a1eec43 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/Chunk.lean @@ -0,0 +1,340 @@ +import OAI.Combinatorics.Ryser.Selection.Definitions +import OAI.Combinatorics.Ryser.Geometry.ProjectionMoments +import OAI.Combinatorics.Ryser.Probability.Variance +import Mathlib.Tactic.GCongr +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +namespace OAI + +open scoped BigOperators +noncomputable section + +namespace RyserCoveringCounterexample.Selection + +variable {F : Type*} [Field F] [instFintypeF : Fintype F] [DecidableEq F] {n : ℕ} + +def equationLoss (U : Finset (Point F)) (d : Direction F) (c : F) + (x : Point F) : ℝ := (sliceCount U d (projection d x + c) : ℝ) + +def lossByDirections (data : Data F n) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (j : Fin n) + (dirs : Fin n → Finset (Direction F)) (x : Point F) : ℝ := + ∑ i ∈ I, ∑ d ∈ dirs i, ∑ u ∈ data.W i, ∑ v ∈ data.W j, + equationLoss (U i) d (projection d (v - u)) x + +def targetLoss (data : Data F n) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (j : Fin n) : Point F → ℝ := + lossByDirections data I U j data.dirs + +def sourceLoss (data : Data F n) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (j : Fin n) : Point F → ℝ := + lossByDirections data I U j (fun _ => data.dirs j) + +def entryLoss (data : Data F n) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (j : Fin n) (x : Point F) : ℝ := + targetLoss data I U j x + sourceLoss data I U j x + +def frozenMass (I : Finset (Fin n)) (U : Fin n → Finset (Point F)) : ℝ := + ∑ i ∈ I, (U i).card + +def sourceEnergy (data : Data F n) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (j : Fin n) : ℝ := + ∑ i ∈ I, ∑ d ∈ data.dirs j, sliceEnergy (U i) d + +theorem equationLoss_nonneg (U : Finset (Point F)) (d : Direction F) + (c : F) (x : Point F) : 0 ≤ equationLoss U d c x := let _ := instFintypeF; by + exact Nat.cast_nonneg _ + +theorem equationLoss_le (U : Finset (Point F)) (d : Direction F) + (c : F) (x : Point F) : equationLoss U d c x ≤ Fintype.card F := by + change (sliceCount U d (projection d x + c) : ℝ) ≤ (Fintype.card F : ℝ) + exact_mod_cast sliceCount_le_card_field U d (projection d x + c) + +theorem expectation_equationLoss (U : Finset (Point F)) (d : Direction F) + (c : F) : + (FiniteLaw.uniform (Point F)).expectation (equationLoss U d c) = + (U.card : ℝ) / Fintype.card F := by + exact expectation_uniform_shifted_slice U d c + +theorem variance_equationLoss (U : Finset (Point F)) (d : Direction F) + (c : F) : + (FiniteLaw.uniform (Point F)).variance (equationLoss U d c) = + sliceEnergy U d := by + exact variance_uniform_shifted_slice U d c + +private theorem sum_le_of_card_le {A : Type*} (s : Finset A) (N : ℕ) + (f : A → ℝ) (b : ℝ) (hcard : s.card ≤ N) (hb : 0 ≤ b) + (hf : ∀ a ∈ s, f a ≤ b) : (∑ a ∈ s, f a) ≤ N * b := by + calc + (∑ a ∈ s, f a) ≤ ∑ _a ∈ s, b := Finset.sum_le_sum hf + _ = (s.card : ℝ) * b := by simp + _ ≤ (N : ℝ) * b := mul_le_mul_of_nonneg_right (by exact_mod_cast hcard) hb + +private theorem triple_sum_le {A B C : Type*} (s : Finset A) + (t : Finset B) (u : Finset C) (N : ℕ) (f : A → B → C → ℝ) + (b : ℝ) (hs : s.card ≤ N) (ht : t.card ≤ N) (hu : u.card ≤ N) + (hb : 0 ≤ b) (hf : ∀ a ∈ s, ∀ c ∈ t, ∀ e ∈ u, f a c e ≤ b) : + (∑ a ∈ s, ∑ c ∈ t, ∑ e ∈ u, f a c e) ≤ (N : ℝ) ^ 3 * b := by + calc + _ ≤ (N : ℝ) * ((N : ℝ) * ((N : ℝ) * b)) := by + apply sum_le_of_card_le s N _ _ hs (by positivity) + intro a ha + apply sum_le_of_card_le t N _ _ ht (by positivity) + intro c hc + exact sum_le_of_card_le u N _ b hu hb (hf a ha c hc) + _ = _ := by ring + +private theorem variance_sum_le_of_card_le {A Ω : Type*} [Fintype Ω] + (mu : FiniteLaw Ω) (s : Finset A) (N : ℕ) (f : A → Ω → ℝ) + (hs : s.card ≤ N) : + mu.variance (fun x => ∑ a ∈ s, f a x) ≤ + (N : ℝ) * ∑ a ∈ s, mu.variance (f a) := by + refine (mu.variance_sum_le s f).trans ?_ + apply mul_le_mul_of_nonneg_right (by exact_mod_cast hs) + exact Finset.sum_nonneg (fun a _ => mu.variance_nonneg (f a)) + +private theorem variance_triple_sum_le {A B C Ω : Type*} [Fintype Ω] + (mu : FiniteLaw Ω) (s : Finset A) (t : Finset B) (u : Finset C) + (N : ℕ) (f : A → B → C → Ω → ℝ) + (hs : s.card ≤ N) (ht : t.card ≤ N) (hu : u.card ≤ N) : + mu.variance (fun x => ∑ a ∈ s, ∑ b ∈ t, ∑ c ∈ u, f a b c x) ≤ + (N : ℝ) ^ 3 * ∑ a ∈ s, ∑ b ∈ t, ∑ c ∈ u, mu.variance (f a b c) := by + calc + _ ≤ (N : ℝ) * ∑ a ∈ s, + mu.variance (fun x => ∑ b ∈ t, ∑ c ∈ u, f a b c x) := + variance_sum_le_of_card_le mu s N _ hs + _ ≤ (N : ℝ) * ∑ a ∈ s, (N : ℝ) * ∑ b ∈ t, + (N : ℝ) * ∑ c ∈ u, mu.variance (f a b c) := by + apply mul_le_mul_of_nonneg_left _ (Nat.cast_nonneg N) + apply Finset.sum_le_sum + intro a ha + refine (variance_sum_le_of_card_le mu t N _ ht).trans ?_ + apply mul_le_mul_of_nonneg_left _ (Nat.cast_nonneg N) + apply Finset.sum_le_sum + intro b hb + exact variance_sum_le_of_card_le mu u N _ hu + _ = _ := by simp only [← Finset.mul_sum]; ring + +theorem lossByDirections_nonneg (data : Data F n) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (j : Fin n) + (dirs : Fin n → Finset (Direction F)) (x : Point F) : + 0 ≤ lossByDirections data I U j dirs x := by + exact Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun d _ => + Finset.sum_nonneg (fun u _ => Finset.sum_nonneg (fun v _ => + equationLoss_nonneg (U i) d (projection d (v - u)) x)))) + +theorem lossByDirections_le (D : ℕ) (data : Data F n) + (I : Finset (Fin n)) (U : Fin n → Finset (Point F)) (j : Fin n) + (dirs : Fin n → Finset (Direction F)) + (hW : ∀ i, (data.W i).card ≤ D) (hdirs : ∀ i, (dirs i).card ≤ D) + (x : Point F) : + lossByDirections data I U j dirs x ≤ + (D : ℝ) ^ 3 * I.card * Fintype.card F := by + calc + _ ≤ ∑ _i ∈ I, (D : ℝ) ^ 3 * Fintype.card F := by + apply Finset.sum_le_sum + intro i hi + exact triple_sum_le (dirs i) (data.W i) (data.W j) D _ _ + (hdirs i) (hW i) (hW j) (Nat.cast_nonneg _) (fun d _ u _ v _ => + equationLoss_le (U i) d (projection d (v - u)) x) + _ = _ := by simp; ring + +theorem expectation_lossByDirections_le (D : ℕ) (data : Data F n) + (I : Finset (Fin n)) (U : Fin n → Finset (Point F)) (j : Fin n) + (dirs : Fin n → Finset (Direction F)) + (hW : ∀ i, (data.W i).card ≤ D) (hdirs : ∀ i, (dirs i).card ≤ D) : + (FiniteLaw.uniform (Point F)).expectation (lossByDirections data I U j dirs) ≤ + (D : ℝ) ^ 3 * frozenMass I U / Fintype.card F := by + calc + _ = ∑ i ∈ I, ∑ d ∈ dirs i, ∑ u ∈ data.W i, ∑ v ∈ data.W j, + (U i).card / (Fintype.card F : ℝ) := by + unfold lossByDirections + simp_rw [FiniteLaw.expectation_finset_sum] + simp_rw [expectation_equationLoss] + _ ≤ ∑ i ∈ I, (D : ℝ) ^ 3 * ((U i).card / (Fintype.card F : ℝ)) := by + apply Finset.sum_le_sum + intro i hi + exact triple_sum_le (dirs i) (data.W i) (data.W j) D _ _ + (hdirs i) (hW i) (hW j) (by positivity) (fun _ _ _ _ _ _ => le_rfl) + _ = _ := by simp only [frozenMass, ← Finset.mul_sum, ← Finset.sum_div]; ring + +theorem entryLoss_nonneg (data : Data F n) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (j : Fin n) (x : Point F) : + 0 ≤ entryLoss data I U j x := + add_nonneg (lossByDirections_nonneg data I U j data.dirs x) + (lossByDirections_nonneg data I U j (fun _ => data.dirs j) x) + +theorem entryLoss_le (D : ℕ) (data : Data F n) (hdata : Bounded D data) + (I : Finset (Fin n)) (U : Fin n → Finset (Point F)) (j : Fin n) + (x : Point F) : + entryLoss data I U j x ≤ 2 * (D : ℝ) ^ 3 * I.card * Fintype.card F := by + have ht := lossByDirections_le D data I U j data.dirs hdata.2.1 hdata.2.2.1 x + have hs := lossByDirections_le D data I U j (fun _ => data.dirs j) + hdata.2.1 (fun _ => hdata.2.2.1 j) x + unfold entryLoss targetLoss sourceLoss + linarith + +theorem expectation_entryLoss_le (D : ℕ) (data : Data F n) (hdata : Bounded D data) + (I : Finset (Fin n)) (U : Fin n → Finset (Point F)) (j : Fin n) : + (FiniteLaw.uniform (Point F)).expectation (entryLoss data I U j) ≤ + 2 * (D : ℝ) ^ 3 * frozenMass I U / Fintype.card F := by + have ht := expectation_lossByDirections_le D data I U j data.dirs + hdata.2.1 hdata.2.2.1 + have hs := expectation_lossByDirections_le D data I U j (fun _ => data.dirs j) + hdata.2.1 (fun _ => hdata.2.2.1 j) + unfold entryLoss + rw [FiniteLaw.expectation_add] + change (FiniteLaw.uniform (Point F)).expectation (lossByDirections data I U j data.dirs) + + (FiniteLaw.uniform (Point F)).expectation (lossByDirections data I U j + (fun _ => data.dirs j)) ≤ _ + calc + _ ≤ (D : ℝ) ^ 3 * frozenMass I U / Fintype.card F + + (D : ℝ) ^ 3 * frozenMass I U / Fintype.card F := add_le_add ht hs + _ = _ := by ring + +theorem sourceEnergy_nonneg (data : Data F n) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (j : Fin n) : + 0 ≤ sourceEnergy data I U j := by + exact Finset.sum_nonneg (fun i _ => Finset.sum_nonneg + (fun d _ => sliceEnergy_nonneg (U i) d)) + +theorem variance_sourceLoss_le (D : ℕ) (data : Data F n) (hdata : Bounded D data) + (I : Finset (Fin n)) (U : Fin n → Finset (Point F)) (j : Fin n) : + (FiniteLaw.uniform (Point F)).variance (sourceLoss data I U j) ≤ + (D : ℝ) ^ 5 * I.card * sourceEnergy data I U j := by + let mu := FiniteLaw.uniform (Point F) + have htarget (i : Fin n) : + mu.variance (fun x => ∑ d ∈ data.dirs j, ∑ u ∈ data.W i, ∑ v ∈ data.W j, + equationLoss (U i) d (projection d (v - u)) x) ≤ + (D : ℝ) ^ 5 * ∑ d ∈ data.dirs j, sliceEnergy (U i) d := by + calc + _ ≤ (D : ℝ) ^ 3 * ∑ d ∈ data.dirs j, ∑ u ∈ data.W i, ∑ v ∈ data.W j, + mu.variance (equationLoss (U i) d (projection d (v - u))) := + variance_triple_sum_le mu (data.dirs j) (data.W i) (data.W j) D _ + (hdata.2.2.1 j) (hdata.2.1 i) (hdata.2.1 j) + _ = (D : ℝ) ^ 3 * ∑ d ∈ data.dirs j, ∑ _u ∈ data.W i, ∑ _v ∈ data.W j, + sliceEnergy (U i) d := by simp only [mu, variance_equationLoss] + _ ≤ (D : ℝ) ^ 3 * ∑ d ∈ data.dirs j, + (D : ℝ) * ((D : ℝ) * sliceEnergy (U i) d) := by + apply mul_le_mul_of_nonneg_left _ (by positivity) + apply Finset.sum_le_sum + intro d hd + apply sum_le_of_card_le (data.W i) D _ _ (hdata.2.1 i) (mul_nonneg (Nat.cast_nonneg D) (sliceEnergy_nonneg (U i) d)) + intro u hu + exact sum_le_of_card_le (data.W j) D _ _ (hdata.2.1 j) + (sliceEnergy_nonneg (U i) d) (fun _ _ => le_rfl) + _ = _ := by simp only [← Finset.mul_sum]; ring + calc + _ ≤ (I.card : ℝ) * ∑ i ∈ I, mu.variance (fun x => + ∑ d ∈ data.dirs j, ∑ u ∈ data.W i, ∑ v ∈ data.W j, + equationLoss (U i) d (projection d (v - u)) x) := + mu.variance_sum_le I _ + _ ≤ (I.card : ℝ) * ∑ i ∈ I, (D : ℝ) ^ 5 * + ∑ d ∈ data.dirs j, sliceEnergy (U i) d := + mul_le_mul_of_nonneg_left (Finset.sum_le_sum (fun i _ => htarget i)) + (Nat.cast_nonneg _) + _ = _ := by simp only [sourceEnergy, ← Finset.mul_sum]; ring + +def targetDirectionGroup (data : Data F n) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (j : Fin n) (d : Direction F) (t : F) : ℝ := + ∑ i ∈ I.filter (fun i => d ∈ data.dirs i), ∑ u ∈ data.W i, ∑ v ∈ data.W j, + (sliceCount (U i) d (t + projection d (v - u)) : ℝ) + +theorem targetDirectionGroup_nonneg (data : Data F n) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (j : Fin n) (d : Direction F) (t : F) : + 0 ≤ targetDirectionGroup data I U j d t := let _ := instFintypeF; by + exact Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun u _ => + Finset.sum_nonneg (fun v _ => Nat.cast_nonneg _))) + +theorem targetDirectionGroup_le (D : ℕ) (data : Data F n) (hdata : Bounded D data) + (I : Finset (Fin n)) (U : Fin n → Finset (Point F)) (j : Fin n) + (d : Direction F) (t : F) : + targetDirectionGroup data I U j d t ≤ (D : ℝ) ^ 3 * Fintype.card F := by + have hcount : (I.filter (fun i => d ∈ data.dirs i)).card ≤ D := by + refine (Finset.card_le_card ?_).trans (hdata.2.2.2 d) + intro i hi + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _, (Finset.mem_filter.mp hi).2⟩ + calc + _ ≤ (D : ℝ) * ((D : ℝ) * ((D : ℝ) * Fintype.card F)) := by + apply sum_le_of_card_le _ D _ _ hcount (by positivity) + intro i hi + apply sum_le_of_card_le _ D _ _ (hdata.2.1 i) (by positivity) + intro u hu + apply sum_le_of_card_le _ D _ _ (hdata.2.1 j) (Nat.cast_nonneg _) + intro v hv + exact_mod_cast sliceCount_le_card_field (U i) d (t + projection d (v - u)) + _ = _ := by ring + +theorem targetLoss_eq_sum_groups (data : Data F n) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (j : Fin n) (x : Point F) : + targetLoss data I U j x = + ∑ d ∈ I.biUnion data.dirs, targetDirectionGroup data I U j d (projection d x) := let _ := instFintypeF; by + classical + symm + unfold targetDirectionGroup + simp only [Finset.sum_filter] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro i hi + have hfilter : (I.biUnion data.dirs).filter (fun d => d ∈ data.dirs i) = + data.dirs i := by + ext d + simp only [Finset.mem_filter] + exact ⟨fun h => h.2, fun hd => ⟨Finset.mem_biUnion.mpr ⟨i, hi, hd⟩, hd⟩⟩ + rw [← Finset.sum_filter, hfilter] + rfl + +theorem variance_targetLoss_le (D : ℕ) (data : Data F n) (hdata : Bounded D data) + (I : Finset (Fin n)) (U : Fin n → Finset (Point F)) (j : Fin n) : + (FiniteLaw.uniform (Point F)).variance (targetLoss data I U j) ≤ + (D : ℝ) ^ 7 * I.card * (Fintype.card F : ℝ) ^ 2 := by + let mu := FiniteLaw.uniform (Point F) + let S := I.biUnion data.dirs + have hS : S.card ≤ I.card * D := by + refine Finset.card_biUnion_le.trans ?_ + calc + (∑ i ∈ I, (data.dirs i).card) ≤ ∑ _i ∈ I, D := + Finset.sum_le_sum (fun i _ => hdata.2.2.1 i) + _ = I.card * D := by simp + have heq : targetLoss data I U j = fun x => + ∑ d ∈ S, targetDirectionGroup data I U j d (projection d x) := by + funext x + exact targetLoss_eq_sum_groups data I U j x + rw [heq] + calc + _ = ∑ d ∈ S, mu.variance (fun x => + targetDirectionGroup data I U j d (projection d x)) := by + apply mu.variance_sum_of_pairwise_covariance_zero + intro d hd e he hde + exact covariance_uniform_projection d e hde + (targetDirectionGroup data I U j d) (targetDirectionGroup data I U j e) + _ ≤ ∑ _d ∈ S, ((D : ℝ) ^ 3 * Fintype.card F) ^ 2 := by + apply Finset.sum_le_sum + intro d hd + exact mu.variance_le_sq_of_bounds _ + (fun x => targetDirectionGroup_nonneg data I U j d (projection d x)) + (fun x => targetDirectionGroup_le D data hdata I U j d (projection d x)) + _ = (S.card : ℝ) * ((D : ℝ) ^ 3 * Fintype.card F) ^ 2 := by simp + _ ≤ ((I.card * D : ℕ) : ℝ) * ((D : ℝ) ^ 3 * Fintype.card F) ^ 2 := + mul_le_mul_of_nonneg_right (by exact_mod_cast hS) (sq_nonneg _) + _ = _ := by simp only [Nat.cast_mul]; ring + +theorem variance_entryLoss_le (D : ℕ) (data : Data F n) (hdata : Bounded D data) + (I : Finset (Fin n)) (U : Fin n → Finset (Point F)) (j : Fin n) : + (FiniteLaw.uniform (Point F)).variance (entryLoss data I U j) ≤ + 2 * (D : ℝ) ^ 7 * I.card * (Fintype.card F : ℝ) ^ 2 + + 2 * (D : ℝ) ^ 5 * I.card * sourceEnergy data I U j := by + have ht := variance_targetLoss_le D data hdata I U j + have hs := variance_sourceLoss_le D data hdata I U j + have hsum := (FiniteLaw.uniform (Point F)).variance_add_le + (targetLoss data I U j) (sourceLoss data I U j) + change (FiniteLaw.uniform (Point F)).variance + (fun x => targetLoss data I U j x + sourceLoss data I U j x) ≤ _ + linarith + +end RyserCoveringCounterexample.Selection + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/ChunkConditioning.lean b/lean/OAI/Combinatorics/Ryser/Selection/ChunkConditioning.lean new file mode 100644 index 0000000000000000000000000000000000000000..f2c340d0878378a2aab12a15b4df19aef9947c36 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/ChunkConditioning.lean @@ -0,0 +1,83 @@ +import OAI.Combinatorics.Ryser.Selection.PoolLaw + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Selection + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] {n K : ℕ} + +theorem joinAssignments_restrict_exposed (T : Finset (Position n K)) + (x : ExposedAssignment (F := F) T) (y : FreshAssignment (F := F) T) : + (fun e : {e : Position n K // e ∈ T} => joinAssignments T x y e.val) = x := by + funext e + exact joinAssignments_exposed T x y e + +theorem feasibleSet_frozenPool_restrict (data : Data F n) + (T : Finset (Position n K)) (pool : Pool F n K) : + feasibleSet data T + (frozenPool T (fun e : {e : Position n K // e ∈ T} => pool e.val)) = + feasibleSet data T pool := by + funext i + apply Finset.ext + intro b + rw [mem_feasibleSet, mem_feasibleSet] + apply feasible_congr + intro e he + exact joinAssignments_exposed T (fun e => pool e.val) (fun _ => 0) ⟨e, he⟩ + +theorem prob_joinAssignments_eq_of_dependsOn_compl (T : Finset (Position n K)) + (Q : Pool F n K → Prop) + (hQ : ∀ pool pool' : Pool F n K, + (∀ e, e ∉ T → pool e = pool' e) → (Q pool ↔ Q pool')) + (x : ExposedAssignment (F := F) T) : + (FiniteLaw.uniform (FreshAssignment (F := F) T)).prob + (fun y => Q (joinAssignments T x y)) = + (poolLaw F n K).prob Q := by + symm + rw [poolLaw_prob_split T Q] + calc + _ = (FiniteLaw.uniform (ExposedAssignment (F := F) T)).expectation + (fun _ => (FiniteLaw.uniform (FreshAssignment (F := F) T)).prob + (fun y => Q (joinAssignments T x y))) := by + apply congrArg (FiniteLaw.expectation + (FiniteLaw.uniform (ExposedAssignment (F := F) T))) + funext x' + apply congrArg (FiniteLaw.prob + (FiniteLaw.uniform (FreshAssignment (F := F) T))) + funext y + apply propext + apply hQ + intro e he + exact (joinAssignments_fresh T x' y ⟨e, he⟩).trans + (joinAssignments_fresh T x y ⟨e, he⟩).symm + _ = _ := FiniteLaw.expectation_const _ _ + +theorem poolLaw_prob_adaptive_le (T : Finset (Position n K)) + (H : ExposedAssignment (F := F) T → Pool F n K → Prop) (b : ℝ) + (hcongr : ∀ x : ExposedAssignment (F := F) T, + ∀ pool pool' : Pool F n K, + (∀ e, e ∉ T → pool e = pool' e) → (H x pool ↔ H x pool')) + (hbound : ∀ x : ExposedAssignment (F := F) T, + (poolLaw F n K).prob (H x) ≤ b) : + (poolLaw F n K).prob + (fun pool => H (fun e : {e : Position n K // e ∈ T} => pool e.val) pool) ≤ b := by + apply poolLaw_prob_split_le T + intro x + calc + _ = (FiniteLaw.uniform (FreshAssignment (F := F) T)).prob + (fun y => H x (joinAssignments T x y)) := by + apply congrArg (FiniteLaw.prob + (FiniteLaw.uniform (FreshAssignment (F := F) T))) + funext y + rw [joinAssignments_restrict_exposed] + _ = (poolLaw F n K).prob (H x) := + prob_joinAssignments_eq_of_dependsOn_compl T (H x) (hcongr x) x + _ ≤ b := hbound x + +end RyserCoveringCounterexample.Selection + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/ChunkDensity.lean b/lean/OAI/Combinatorics/Ryser/Selection/ChunkDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..227e1f4e4857b17f9412ca7cf9e00e29b4634775 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/ChunkDensity.lean @@ -0,0 +1,168 @@ +import OAI.Combinatorics.Ryser.Selection.ChunkTail +import OAI.Combinatorics.Ryser.Selection.ChunkConditioning +import OAI.Combinatorics.Ryser.Selection.ChunkPartition + +namespace OAI + +open scoped BigOperators +noncomputable section + +namespace RyserCoveringCounterexample.Selection + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] {n K : ℕ} + +theorem chunkFeasibleSet_congr (data : Data F n) + (U : Fin n → Finset (Point F)) (E : Finset (Position n K)) + (pool pool' : Pool F n K) (h : ∀ e ∈ E, pool e = pool' e) : + chunkFeasibleSet data U E pool = chunkFeasibleSet data U E pool' := by + funext i + ext b + simp only [mem_chunkFeasibleSet] + exact and_congr Iff.rfl (feasible_congr data E pool pool' h i b) + +theorem frozenMass_feasibleSet_eq (data : Data F n) (I : Finset (Fin n)) + (T : Finset (Position n K)) (pool : Pool F n K) : + frozenMass I (feasibleSet data T pool) = (feasibleMass data I T pool : ℝ) := by + simp only [frozenMass, feasibleMass, Nat.cast_sum] + +theorem prob_adaptive_chunk_recurrence_failure_le + (D : ℕ) (hD : 1 ≤ D) (data : Data F n) (hdata : Bounded D data) + (I : Finset (Fin n)) (P E : Finset (Position n K)) (hPE : Disjoint P E) + (α γ : ℝ) (hm : 0 < (I.card : ℝ)) (hγ : 0 < γ) + (hlarge : (Fintype.card F : ℝ) / (4 * equationBound D) < I.card) + (hhalf : equationBound D * α = 1 / 2) + (hsize : (E.card : ℝ) ≤ α * Fintype.card F) + (hcutoff : (K : ℝ) * D * Real.sqrt (Fintype.card F) ≤ γ * Fintype.card F) : + (poolLaw F n K).prob (fun pool => + frozenMass I (feasibleSet data (P ∪ E) pool) < + frozenMass I (feasibleSet data P pool) / 2 - + (α + 2 * equationBound D) * γ * + ((I.card : ℝ) * (Fintype.card F : ℝ) ^ 2)) ≤ + (2 : ℝ) ^ E.card * + (regularTailConstant D γ / Real.sqrt (Fintype.card F)) ^ + Nat.ceil (γ * Fintype.card F) := by + classical + let U : ExposedAssignment (F := F) P → Fin n → Finset (Point F) := + fun x => feasibleSet data P (frozenPool P x) + let H : ExposedAssignment (F := F) P → Pool F n K → Prop := fun x pool => + frozenMass I (chunkFeasibleSet data (U x) E pool) < frozenMass I (U x) / 2 - + (α + 2 * equationBound D) * γ * ((I.card : ℝ) * (Fintype.card F : ℝ) ^ 2) + let b : ℝ := (2 : ℝ) ^ E.card * + (regularTailConstant D γ / Real.sqrt (Fintype.card F)) ^ + Nat.ceil (γ * Fintype.card F) + have hcongr : ∀ x : ExposedAssignment (F := F) P, + ∀ pool pool' : Pool F n K, + (∀ e, e ∉ P → pool e = pool' e) → (H x pool ↔ H x pool') := by + intro x pool pool' hpool + have heq : chunkFeasibleSet data (U x) E pool = + chunkFeasibleSet data (U x) E pool' := by + apply chunkFeasibleSet_congr + intro e he + exact hpool e (fun heP => Finset.disjoint_left.mp hPE heP he) + dsimp only [H] + rw [heq] + have hbound : ∀ x : ExposedAssignment (F := F) P, + (poolLaw F n K).prob (H x) ≤ b := by + intro x + exact prob_chunk_recurrence_failure_le D hD data hdata I (U x) E α γ + hm hγ hlarge hhalf hsize hcutoff + refine (FiniteLaw.prob_mono (poolLaw F n K) ?_).trans + (poolLaw_prob_adaptive_le P H b hcongr hbound) + intro pool hfailure + dsimp only [H, U] + rw [feasibleSet_frozenPool_restrict] + have hsets : chunkFeasibleSet data (feasibleSet data P pool) E pool = + feasibleSet data (P ∪ E) pool := by + funext i + exact chunkFeasibleSet_feasibleSet data P E pool i + rw [hsets] + exact hfailure + +theorem prob_feasibleMass_lt_density_le + (D : ℕ) (hD : 1 ≤ D) (data : Data F n) (hdata : Bounded D data) + (I : Finset (Fin n)) (T : Finset (Position n K)) (L J0 : ℕ) (α γ : ℝ) + (hm : 0 < (I.card : ℝ)) (hγ : 0 < γ) + (hlarge : (Fintype.card F : ℝ) / (4 * equationBound D) < I.card) + (hhalf : equationBound D * α = 1 / 2) + (hL : 0 < L) (hLsize : (L : ℝ) ≤ α * Fintype.card F) + (hcutoff : (K : ℝ) * D * Real.sqrt (Fintype.card F) ≤ γ * Fintype.card F) + (hJ : chunkCount T L ≤ J0) + (hbudget : 2 * ((α + 2 * equationBound D) * γ) ≤ (1 / 2 : ℝ) ^ (J0 + 1)) : + (poolLaw F n K).prob (fun pool => + (feasibleMass data I T pool : ℝ) < + (1 / 2 : ℝ) ^ (J0 + 1) * ((I.card : ℝ) * (Fintype.card F : ℝ) ^ 2)) ≤ + (chunkCount T L : ℝ) * (2 : ℝ) ^ L * + (regularTailConstant D γ / Real.sqrt (Fintype.card F)) ^ + Nat.ceil (γ * Fintype.card F) := by + classical + let J := chunkCount T L + let scale : ℝ := (I.card : ℝ) * (Fintype.card F : ℝ) ^ 2 + let err : ℝ := (α + 2 * equationBound D) * γ + let mass : Pool F n K → ℕ → ℝ := + fun pool j => frozenMass I (feasibleSet data (chunkPrefix T L j) pool) + let b : ℝ := (2 : ℝ) ^ L * + (regularTailConstant D γ / Real.sqrt (Fintype.card F)) ^ + Nat.ceil (γ * Fintype.card F) + have hscale : 0 ≤ scale := by dsimp only [scale]; positivity + have hC : 0 ≤ equationBound D := by unfold equationBound; positivity + have hα : 0 ≤ α := by + by_contra hnot + have hmul := mul_nonpos_of_nonneg_of_nonpos hC (le_of_lt (lt_of_not_ge hnot)) + rw [hhalf] at hmul + norm_num at hmul + have herr : 0 ≤ err := + mul_nonneg (add_nonneg hα (mul_nonneg (by norm_num) hC)) hγ.le + have htail : 0 ≤ (regularTailConstant D γ / Real.sqrt (Fintype.card F)) ^ + Nat.ceil (γ * Fintype.card F) := + pow_nonneg (div_nonneg (regularTailConstant_nonneg D γ) (Real.sqrt_nonneg _)) _ + have hone (j : ℕ) : + (poolLaw F n K).prob (fun pool => + mass pool (j + 1) < mass pool j / 2 - err * scale) ≤ b := by + have hcard : (candidateChunk T L j).card ≤ L := + candidateChunk_card_le T L j hL + have hsize : ((candidateChunk T L j).card : ℝ) ≤ α * Fintype.card F := + (Nat.cast_le.mpr hcard).trans hLsize + have hchunk := prob_adaptive_chunk_recurrence_failure_le D hD data hdata I + (chunkPrefix T L j) (candidateChunk T L j) + (disjoint_chunkPrefix_candidateChunk T L j) α γ hm hγ hlarge hhalf hsize hcutoff + have hbound : (2 : ℝ) ^ (candidateChunk T L j).card * + (regularTailConstant D γ / Real.sqrt (Fintype.card F)) ^ + Nat.ceil (γ * Fintype.card F) ≤ b := by + exact mul_le_mul_of_nonneg_right (pow_le_pow_right₀ (by norm_num) hcard) htail + simpa only [mass, err, scale, chunkPrefix_succ] using hchunk.trans hbound + have hstart (pool : Pool F n K) : scale ≤ mass pool 0 := by + dsimp only [mass, scale] + rw [chunkPrefix_zero] + simp only [feasibleSet_empty, frozenMass, Finset.card_univ, + card_point, Nat.cast_pow, Finset.sum_const, nsmul_eq_mul]; exact le_rfl + have hterminal (pool : Pool F n K) : + mass pool J = (feasibleMass data I T pool : ℝ) := by + dsimp only [mass, J] + rw [chunkPrefix_count, frozenMass_feasibleSet_eq] + have hsubset (pool : Pool F n K) + (hfailure : (feasibleMass data I T pool : ℝ) < (1 / 2 : ℝ) ^ (J0 + 1) * scale) : + ∃ j ∈ Finset.range J, mass pool (j + 1) < mass pool j / 2 - err * scale := by + by_contra hnone + have hstep : ∀ j < J, mass pool j / 2 - err * scale ≤ mass pool (j + 1) := by + intro j hj + by_contra hbad + exact hnone ⟨j, Finset.mem_range.mpr hj, lt_of_not_ge hbad⟩ + have hdensity := mass_after_chunks_ge_density (mass pool) scale err J J0 + hscale herr (hstart pool) hstep hJ hbudget + rw [hterminal pool] at hdensity + exact (not_lt_of_ge hdensity) hfailure + calc + _ ≤ (poolLaw F n K).prob (fun pool => + ∃ j ∈ Finset.range J, mass pool (j + 1) < mass pool j / 2 - err * scale) := + (poolLaw F n K).prob_mono hsubset + _ ≤ ∑ j ∈ Finset.range J, (poolLaw F n K).prob + (fun pool => mass pool (j + 1) < mass pool j / 2 - err * scale) := + prob_exists_mem_le _ _ _ + _ ≤ ∑ _j ∈ Finset.range J, b := Finset.sum_le_sum (fun j _ => hone j) + _ = _ := by simp only [Finset.sum_const, Finset.card_range, nsmul_eq_mul, J, b]; ring + +end RyserCoveringCounterexample.Selection + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/ChunkEnergy.lean b/lean/OAI/Combinatorics/Ryser/Selection/ChunkEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..094cd9ea5bf59ac16d18e99553d35d4531fd5c3c --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/ChunkEnergy.lean @@ -0,0 +1,82 @@ +import OAI.Combinatorics.Ryser.Selection.Chunk +import Mathlib.Data.Finset.Prod + +namespace OAI + +open scoped BigOperators +noncomputable section + +namespace RyserCoveringCounterexample.Selection + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] {n K : ℕ} + +theorem card_entries_with_direction_le (D : ℕ) (data : Data F n) + (hdata : Bounded D data) (E : Finset (Position n K)) (d : Direction F) : + (E.filter (fun e => d ∈ data.dirs e.1)).card ≤ K * D := by + have hsub : E.filter (fun e => d ∈ data.dirs e.1) ⊆ + (Finset.univ.filter (fun i => d ∈ data.dirs i)) ×ˢ + (Finset.univ : Finset (Fin K)) := by + intro e he + apply Finset.mem_product.mpr + exact ⟨Finset.mem_filter.mpr + ⟨Finset.mem_univ _, (Finset.mem_filter.mp he).2⟩, Finset.mem_univ _⟩ + calc + _ ≤ ((Finset.univ.filter (fun i => d ∈ data.dirs i)) ×ˢ + (Finset.univ : Finset (Fin K))).card := Finset.card_le_card hsub + _ = (Finset.univ.filter (fun i => d ∈ data.dirs i)).card * K := by simp + _ ≤ D * K := Nat.mul_le_mul_right K (hdata.2.2.2 d) + _ = K * D := Nat.mul_comm _ _ + +theorem sum_sourceEnergy_eq (data : Data F n) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (E : Finset (Position n K)) : + (∑ e ∈ E, sourceEnergy data I U e.1) = + ∑ i ∈ I, ∑ d : Direction F, + ((E.filter (fun e => d ∈ data.dirs e.1)).card : ℝ) * sliceEnergy (U i) d := by + classical + unfold sourceEnergy + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro i hi + calc + _ = ∑ e ∈ E, ∑ d : Direction F, + if d ∈ data.dirs e.1 then sliceEnergy (U i) d else 0 := by + apply Finset.sum_congr rfl + intro e he + rw [← Finset.sum_filter] + simp + _ = ∑ d : Direction F, ∑ e ∈ E, + if d ∈ data.dirs e.1 then sliceEnergy (U i) d else 0 := Finset.sum_comm + _ = _ := by + apply Finset.sum_congr rfl + intro d hd + rw [← Finset.sum_filter] + simp + +theorem sum_sourceEnergy_le (D : ℕ) (data : Data F n) (hdata : Bounded D data) + (I : Finset (Fin n)) (U : Fin n → Finset (Point F)) + (E : Finset (Position n K)) : + (∑ e ∈ E, sourceEnergy data I U e.1) ≤ + (K : ℝ) * D * I.card * (Fintype.card F : ℝ) ^ 2 := by + rw [sum_sourceEnergy_eq] + calc + _ ≤ ∑ i ∈ I, ∑ d : Direction F, ((K : ℝ) * D) * sliceEnergy (U i) d := by + apply Finset.sum_le_sum + intro i hi + apply Finset.sum_le_sum + intro d hd + exact mul_le_mul_of_nonneg_right + (by exact_mod_cast card_entries_with_direction_le D data hdata E d) + (sliceEnergy_nonneg (U i) d) + _ = ∑ i ∈ I, ((K : ℝ) * D) * ∑ d : Direction F, sliceEnergy (U i) d := by + simp only [Finset.mul_sum] + _ ≤ ∑ _i ∈ I, ((K : ℝ) * D) * (Fintype.card F : ℝ) ^ 2 := by + apply Finset.sum_le_sum + intro i hi + exact mul_le_mul_of_nonneg_left (sum_sliceEnergy_le_sq_card (U i)) (by positivity) + _ = _ := by simp; ring + +end RyserCoveringCounterexample.Selection + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/ChunkLoss.lean b/lean/OAI/Combinatorics/Ryser/Selection/ChunkLoss.lean new file mode 100644 index 0000000000000000000000000000000000000000..006e2588c2c337290e20e8374d4dab077ed2177c --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/ChunkLoss.lean @@ -0,0 +1,224 @@ +import OAI.Combinatorics.Ryser.Selection.Chunk +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Data.Finset.Card +import Mathlib.Data.Finset.Union +import Mathlib.Basic.Real.Basic +import Mathlib.Tactic.Linarith +import Lean.Elab.Tactic.Omega + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Selection + +section FiniteSets + +variable {ι ε β : Type*} [DecidableEq β] + +theorem card_le_card_sdiff_biUnion_add_sum_card_inter + (U : Finset β) (E : Finset ε) (L : ε → Finset β) : + U.card ≤ (U \ E.biUnion L).card + ∑ e ∈ E, (U ∩ L e).card := by + have hpartition := Finset.card_sdiff_add_card_inter U (E.biUnion L) + have hcover : (U ∩ E.biUnion L).card ≤ ∑ e ∈ E, (U ∩ L e).card := by + rw [Finset.inter_biUnion] + exact Finset.card_biUnion_le + omega + +theorem sum_card_le_sum_card_sdiff_biUnion_add_sum_card_inter + (I : Finset ι) (U : ι → Finset β) (E : Finset ε) + (L : ε → ι → Finset β) : + (∑ i ∈ I, (U i).card) ≤ + (∑ i ∈ I, (U i \ E.biUnion (fun e => L e i)).card) + + ∑ e ∈ E, ∑ i ∈ I, (U i ∩ L e i).card := by + calc + (∑ i ∈ I, (U i).card) ≤ + ∑ i ∈ I, ((U i \ E.biUnion (fun e => L e i)).card + + ∑ e ∈ E, (U i ∩ L e i).card) := by + exact Finset.sum_le_sum fun i _ => + card_le_card_sdiff_biUnion_add_sum_card_inter (U i) E (fun e => L e i) + _ = _ := by rw [Finset.sum_add_distrib, Finset.sum_comm] + +theorem sum_card_sub_sum_card_sdiff_biUnion_le_nat + (I : Finset ι) (U : ι → Finset β) (E : Finset ε) + (L : ε → ι → Finset β) : + (∑ i ∈ I, (U i).card) - + (∑ i ∈ I, (U i \ E.biUnion (fun e => L e i)).card) ≤ + ∑ e ∈ E, ∑ i ∈ I, (U i ∩ L e i).card := by + have h := sum_card_le_sum_card_sdiff_biUnion_add_sum_card_inter I U E L + omega + +theorem sum_card_sub_sum_card_sdiff_biUnion_le + (I : Finset ι) (U : ι → Finset β) (E : Finset ε) + (L : ε → ι → Finset β) : + (∑ i ∈ I, ((U i).card : ℝ)) - + (∑ i ∈ I, ((U i \ E.biUnion (fun e => L e i)).card : ℝ)) ≤ + ∑ e ∈ E, ∑ i ∈ I, ((U i ∩ L e i).card : ℝ) := by + have hnat := sum_card_le_sum_card_sdiff_biUnion_add_sum_card_inter I U E L + have hreal := (Nat.cast_le (α := ℝ)).mpr hnat + simp only [Nat.cast_add, Nat.cast_sum] at hreal + linarith + +end FiniteSets + +section Configurations + +variable {F : Type*} [Field F] [instFintypeF : Fintype F] [DecidableEq F] {n K : ℕ} + +noncomputable def chunkFeasibleSet (data : Data F n) (U : Fin n → Finset (Point F)) + (E : Finset (Position n K)) (pool : Pool F n K) (i : Fin n) : + Finset (Point F) := by + classical + exact (U i).filter (Feasible data E pool i) + +@[simp] theorem mem_chunkFeasibleSet (data : Data F n) + (U : Fin n → Finset (Point F)) (E : Finset (Position n K)) + (pool : Pool F n K) (i : Fin n) (b : Point F) : + b ∈ chunkFeasibleSet data U E pool i ↔ b ∈ U i ∧ Feasible data E pool i b := let _ := instFintypeF; by + classical + simp only [chunkFeasibleSet, Finset.mem_filter] + +noncomputable def conflictingPoints (data : Data F n) (U : Finset (Point F)) + (i j : Fin n) (x : Point F) : Finset (Point F) := by + classical + exact U.filter fun b => Conflict data i j b x + +@[simp] theorem mem_conflictingPoints (data : Data F n) (U : Finset (Point F)) + (i j : Fin n) (x b : Point F) : + b ∈ conflictingPoints data U i j x ↔ b ∈ U ∧ Conflict data i j b x := let _ := instFintypeF; by + classical + simp only [conflictingPoints, Finset.mem_filter] + +theorem chunkFeasibleSet_eq_sdiff_biUnion (data : Data F n) + (U : Fin n → Finset (Point F)) (E : Finset (Position n K)) + (pool : Pool F n K) (i : Fin n) : + chunkFeasibleSet data U E pool i = + U i \ E.biUnion (fun e => conflictingPoints data (U i) i e.1 (pool e)) := by + classical + ext b + simp only [mem_chunkFeasibleSet, Finset.mem_sdiff, Finset.mem_biUnion, + mem_conflictingPoints, Feasible] + constructor + · rintro ⟨hb, hfeasible⟩ + refine ⟨hb, ?_⟩ + rintro ⟨e, he, _, hconflict⟩ + exact hfeasible e he hconflict + · rintro ⟨hb, havoid⟩ + refine ⟨hb, ?_⟩ + intro e he hconflict + exact havoid ⟨e, he, hb, hconflict⟩ + +theorem chunkFeasibleSet_feasibleSet (data : Data F n) + (P E : Finset (Position n K)) (pool : Pool F n K) (i : Fin n) : + chunkFeasibleSet data (feasibleSet data P pool) E pool i = + feasibleSet data (P ∪ E) pool i := by + classical + ext b + simp only [mem_chunkFeasibleSet, mem_feasibleSet, Feasible, Finset.mem_union] + constructor + · rintro ⟨hP, hE⟩ e (he | he) + · exact hP e he + · exact hE e he + · intro h + exact ⟨fun e he => h e (Or.inl he), fun e he => h e (Or.inr he)⟩ + +theorem sum_card_sub_sum_card_chunkFeasibleSet_le_conflictingPoints + (data : Data F n) (I : Finset (Fin n)) (U : Fin n → Finset (Point F)) + (E : Finset (Position n K)) (pool : Pool F n K) : + (∑ i ∈ I, ((U i).card : ℝ)) - + (∑ i ∈ I, ((chunkFeasibleSet data U E pool i).card : ℝ)) ≤ + ∑ e ∈ E, ∑ i ∈ I, ((conflictingPoints data (U i) i e.1 (pool e)).card : ℝ) := by + classical + have h := sum_card_sub_sum_card_sdiff_biUnion_le I U E + (fun e i => conflictingPoints data (U i) i e.1 (pool e)) + simpa only [chunkFeasibleSet_eq_sdiff_biUnion, conflictingPoints, + Finset.inter_filter, Finset.inter_self] using h + +end Configurations + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] {n K : ℕ} + +theorem card_conflictingPoints_le_equationLoss (data : Data F n) + (U : Finset (Point F)) (i j : Fin n) (x : Point F) : + ((conflictingPoints data U i j x).card : ℝ) ≤ + (∑ d ∈ data.dirs i, ∑ u ∈ data.W i, ∑ v ∈ data.W j, + equationLoss U d (projection d (v - u)) x) + + (∑ d ∈ data.dirs j, ∑ u ∈ data.W i, ∑ v ∈ data.W j, + equationLoss U d (projection d (v - u)) x) := by + classical + let slices : Direction F → Point F → Point F → Finset (Point F) := + fun d u v => U.filter fun b => + projection d b = projection d x + projection d (v - u) + let covered : Finset (Direction F) → Finset (Point F) := fun ds => + ds.biUnion fun d => (data.W i).biUnion fun u => + (data.W j).biUnion fun v => slices d u v + have hcover : conflictingPoints data U i j x ⊆ + covered (data.dirs i) ∪ covered (data.dirs j) := by + intro b hb + obtain ⟨hbU, hconflict⟩ := (mem_conflictingPoints data U i j x b).mp hb + obtain ⟨u, hu, v, hv, d, hd, heq⟩ := + (conflict_iff_forbidden data i j b x).mp hconflict + have hmem (ds : Finset (Direction F)) (hd' : d ∈ ds) : b ∈ covered ds := by + change b ∈ ds.biUnion (fun d => (data.W i).biUnion (fun u => + (data.W j).biUnion (fun v => slices d u v))) + apply Finset.mem_biUnion.mpr + refine ⟨d, hd', Finset.mem_biUnion.mpr ?_⟩ + refine ⟨u, hu, Finset.mem_biUnion.mpr ?_⟩ + refine ⟨v, hv, ?_⟩ + exact Finset.mem_filter.mpr ⟨hbU, heq⟩ + rcases Finset.mem_union.mp hd with hdi | hdj + · exact Finset.mem_union.mpr (Or.inl (hmem _ hdi)) + · exact Finset.mem_union.mpr (Or.inr (hmem _ hdj)) + have hcount (ds : Finset (Direction F)) : + (covered ds).card ≤ + ∑ d ∈ ds, ∑ u ∈ data.W i, ∑ v ∈ data.W j, (slices d u v).card := by + dsimp only [covered] + refine Finset.card_biUnion_le.trans (Finset.sum_le_sum ?_) + intro d hd + refine Finset.card_biUnion_le.trans (Finset.sum_le_sum ?_) + intro u hu + exact Finset.card_biUnion_le + have hnat : (conflictingPoints data U i j x).card ≤ + (∑ d ∈ data.dirs i, ∑ u ∈ data.W i, ∑ v ∈ data.W j, (slices d u v).card) + + (∑ d ∈ data.dirs j, ∑ u ∈ data.W i, ∑ v ∈ data.W j, (slices d u v).card) := + (Finset.card_le_card hcover).trans + ((Finset.card_union_le _ _).trans + (Nat.add_le_add (hcount (data.dirs i)) (hcount (data.dirs j)))) + have hreal := (Nat.cast_le (α := ℝ)).mpr hnat + simpa only [Nat.cast_add, Nat.cast_sum, slices, equationLoss, sliceCount] using hreal + +theorem sum_card_conflictingPoints_le_entryLoss (data : Data F n) + (I : Finset (Fin n)) (U : Fin n → Finset (Point F)) (j : Fin n) (x : Point F) : + (∑ i ∈ I, ((conflictingPoints data (U i) i j x).card : ℝ)) ≤ + entryLoss data I U j x := by + calc + _ ≤ ∑ i ∈ I, + ((∑ d ∈ data.dirs i, ∑ u ∈ data.W i, ∑ v ∈ data.W j, + equationLoss (U i) d (projection d (v - u)) x) + + (∑ d ∈ data.dirs j, ∑ u ∈ data.W i, ∑ v ∈ data.W j, + equationLoss (U i) d (projection d (v - u)) x)) := + Finset.sum_le_sum fun i _ => card_conflictingPoints_le_equationLoss data (U i) i j x + _ = entryLoss data I U j x := by + rw [Finset.sum_add_distrib] + rfl + +theorem chunk_mass_loss_le_entryLoss (data : Data F n) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (E : Finset (Position n K)) + (pool : Pool F n K) : + frozenMass I U - frozenMass I (chunkFeasibleSet data U E pool) ≤ + ∑ e ∈ E, entryLoss data I U e.1 (pool e) := by + refine (sum_card_sub_sum_card_chunkFeasibleSet_le_conflictingPoints + data I U E pool).trans ?_ + exact Finset.sum_le_sum fun e _ => + sum_card_conflictingPoints_le_entryLoss data I U e.1 (pool e) + +theorem feasibleMass_sub_le_entryLoss (data : Data F n) (I : Finset (Fin n)) + (P E : Finset (Position n K)) (pool : Pool F n K) : + (feasibleMass data I P pool : ℝ) - (feasibleMass data I (P ∪ E) pool : ℝ) ≤ + ∑ e ∈ E, entryLoss data I (feasibleSet data P pool) e.1 (pool e) := by + have h := chunk_mass_loss_le_entryLoss data I (feasibleSet data P pool) E pool + simpa only [frozenMass, chunkFeasibleSet_feasibleSet, feasibleMass, Nat.cast_sum] using h + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/ChunkPartition.lean b/lean/OAI/Combinatorics/Ryser/Selection/ChunkPartition.lean new file mode 100644 index 0000000000000000000000000000000000000000..1d4ebb520936c8af456e666460c307c9e50731ab --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/ChunkPartition.lean @@ -0,0 +1,144 @@ +import Mathlib.Data.Fintype.EquivFin +import Mathlib.Data.Finset.Union +import Mathlib.Data.Nat.Basic + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +variable {E : Type*} [DecidableEq E] + +noncomputable def chunkRank (T : Finset E) (e : E) : ℕ := + if h : e ∈ T then (T.equivFin ⟨e, h⟩).val else 0 + +def chunkCount (T : Finset E) (L : ℕ) : ℕ := T.card / L + 1 + +noncomputable def candidateChunk (T : Finset E) (L j : ℕ) : Finset E := + T.filter (fun e => chunkRank T e / L = j) + +noncomputable def chunkPrefix (T : Finset E) (L j : ℕ) : Finset E := + T.filter (fun e => chunkRank T e / L < j) + +@[simp] theorem chunkRank_of_mem (T : Finset E) (e : E) (he : e ∈ T) : + chunkRank T e = (T.equivFin ⟨e, he⟩).val := by + simp only [chunkRank, dite_eq_left he] + +theorem chunkRank_lt_card (T : Finset E) (e : E) (he : e ∈ T) : + chunkRank T e < T.card := by + rw [chunkRank_of_mem T e he] + exact (T.equivFin ⟨e, he⟩).isLt + +theorem chunkRank_injOn (T : Finset E) : Set.InjOn (chunkRank T) (T : Set E) := by + intro a ha b hb hab + have hval : (T.equivFin ⟨a, ha⟩).val = (T.equivFin ⟨b, hb⟩).val := by + simpa only [chunkRank_of_mem T a ha, chunkRank_of_mem T b hb] using hab + exact congrArg Subtype.val ((T.equivFin).injective (Fin.ext hval)) + +@[simp] theorem mem_candidateChunk (T : Finset E) (L j : ℕ) (e : E) : + e ∈ candidateChunk T L j ↔ e ∈ T ∧ chunkRank T e / L = j := + Finset.mem_filter + +@[simp] theorem mem_chunkPrefix (T : Finset E) (L j : ℕ) (e : E) : + e ∈ chunkPrefix T L j ↔ e ∈ T ∧ chunkRank T e / L < j := + Finset.mem_filter + +theorem candidateChunk_subset (T : Finset E) (L j : ℕ) : + candidateChunk T L j ⊆ T := + Finset.filter_subset _ _ + +theorem chunkPrefix_subset (T : Finset E) (L j : ℕ) : + chunkPrefix T L j ⊆ T := + Finset.filter_subset _ _ + +theorem candidateChunk_disjoint (T : Finset E) (L : ℕ) {i j : ℕ} (hij : i ≠ j) : + Disjoint (candidateChunk T L i) (candidateChunk T L j) := by + apply Finset.disjoint_left.mpr + intro e hei hej + have hi := (mem_candidateChunk T L i e).mp hei + have hj := (mem_candidateChunk T L j e).mp hej + exact hij (hi.2.symm.trans hj.2) + +theorem candidateChunk_pairwise_disjoint (T : Finset E) (L : ℕ) : + Pairwise (fun i j : ℕ => Disjoint (candidateChunk T L i) (candidateChunk T L j)) := by + intro i j hij + exact candidateChunk_disjoint T L hij + +theorem candidateChunk_card_le (T : Finset E) (L j : ℕ) (hL : 0 < L) : + (candidateChunk T L j).card ≤ L := by + calc + (candidateChunk T L j).card ≤ (Finset.range L).card := by + apply Finset.card_le_card_of_injOn (fun e => chunkRank T e % L) + · intro e _ + exact Finset.mem_range.mpr (Nat.mod_lt _ hL) + · intro a ha b hb hab + change chunkRank T a % L = chunkRank T b % L at hab + obtain ⟨haT, haq⟩ := (mem_candidateChunk T L j a).mp ha + obtain ⟨hbT, hbq⟩ := (mem_candidateChunk T L j b).mp hb + apply chunkRank_injOn T haT hbT + calc + chunkRank T a = chunkRank T a % L + L * (chunkRank T a / L) := + (Nat.mod_add_div (chunkRank T a) L).symm + _ = chunkRank T b % L + L * (chunkRank T b / L) := by + rw [hab, haq, hbq] + _ = chunkRank T b := Nat.mod_add_div (chunkRank T b) L + _ = L := Finset.card_range L + +@[simp] theorem chunkPrefix_zero (T : Finset E) (L : ℕ) : + chunkPrefix T L 0 = ∅ := by + ext e + simp only [mem_chunkPrefix, Nat.not_lt_zero, and_false, Finset.notMem_empty] + +theorem chunkPrefix_succ (T : Finset E) (L j : ℕ) : + chunkPrefix T L (j + 1) = chunkPrefix T L j ∪ candidateChunk T L j := by + ext e + constructor + · intro he + obtain ⟨heT, hj⟩ := (mem_chunkPrefix T L (j + 1) e).mp he + rcases Nat.lt_succ_iff_lt_or_eq.mp hj with hlt | heq + · exact Finset.mem_union.mpr (Or.inl ((mem_chunkPrefix T L j e).mpr ⟨heT, hlt⟩)) + · exact Finset.mem_union.mpr (Or.inr ((mem_candidateChunk T L j e).mpr ⟨heT, heq⟩)) + · intro he + rcases Finset.mem_union.mp he with hp | hc + · obtain ⟨heT, hlt⟩ := (mem_chunkPrefix T L j e).mp hp + exact (mem_chunkPrefix T L (j + 1) e).mpr ⟨heT, Nat.lt_succ_of_lt hlt⟩ + · obtain ⟨heT, heq⟩ := (mem_candidateChunk T L j e).mp hc + exact (mem_chunkPrefix T L (j + 1) e).mpr + ⟨heT, Nat.lt_succ_iff_lt_or_eq.mpr (Or.inr heq)⟩ + +theorem disjoint_chunkPrefix_candidateChunk (T : Finset E) (L j : ℕ) : + Disjoint (chunkPrefix T L j) (candidateChunk T L j) := by + apply Finset.disjoint_left.mpr + intro e hp hc + have hlt := ((mem_chunkPrefix T L j e).mp hp).2 + have heq := ((mem_candidateChunk T L j e).mp hc).2 + exact (Nat.ne_of_lt hlt) heq + +theorem chunkIndex_lt_count (T : Finset E) (L : ℕ) (e : E) (he : e ∈ T) : + chunkRank T e / L < chunkCount T L := by + exact Nat.lt_succ_of_le + (Nat.div_le_div_right (Nat.le_of_lt (chunkRank_lt_card T e he))) + +@[simp] theorem chunkPrefix_count (T : Finset E) (L : ℕ) : + chunkPrefix T L (chunkCount T L) = T := by + ext e + constructor + · exact fun he => ((mem_chunkPrefix T L (chunkCount T L) e).mp he).1 + · intro he + exact (mem_chunkPrefix T L (chunkCount T L) e).mpr + ⟨he, chunkIndex_lt_count T L e he⟩ + +theorem biUnion_candidateChunk (T : Finset E) (L : ℕ) : + (Finset.range (chunkCount T L)).biUnion (candidateChunk T L) = T := by + ext e + constructor + · intro he + obtain ⟨j, _, hj⟩ := Finset.mem_biUnion.mp he + exact candidateChunk_subset T L j hj + · intro he + refine Finset.mem_biUnion.mpr ⟨chunkRank T e / L, ?_, ?_⟩ + · exact Finset.mem_range.mpr (chunkIndex_lt_count T L e he) + · exact (mem_candidateChunk T L (chunkRank T e / L) e).mpr ⟨he, rfl⟩ + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/ChunkPartitionBounds.lean b/lean/OAI/Combinatorics/Ryser/Selection/ChunkPartitionBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..7f69d24d832b94357ace9c1eb173a176730b439b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/ChunkPartitionBounds.lean @@ -0,0 +1,68 @@ +import OAI.Combinatorics.Ryser.Selection.ChunkPartition +import Mathlib.Algebra.Order.Archimedean.Real.Basic +import Mathlib.Algebra.Order.Floor.Semiring +import Mathlib.Data.Nat.Cast.Order.Field +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +theorem floor_chunkSize_pos (α q : ℝ) (hlarge : 2 ≤ α * q) : + 0 < Nat.floor (α * q) := by + apply Nat.floor_pos.mpr + linarith + +theorem floor_chunkSize_le (α q : ℝ) (hα : 0 < α) (hq : 0 < q) : + (Nat.floor (α * q) : ℝ) ≤ α * q := + Nat.floor_le (mul_pos hα hq).le + +theorem floor_chunkSize_ge_half (α q : ℝ) (hlarge : 2 ≤ α * q) : + α * q / 2 ≤ (Nat.floor (α * q) : ℝ) := by + have hfloor := Nat.lt_floor_add_one (α * q) + linarith + +variable {E : Type*} [instDecidableEqE : DecidableEq E] + +theorem chunkCount_floor_le (T : Finset E) (α q D : ℝ) + (hα : 0 < α) (hq : 0 < q) (hlarge : 2 ≤ α * q) + (hT : (T.card : ℝ) ≤ 2 * D * q) (hD : 0 ≤ D) : + (chunkCount T (Nat.floor (α * q)) : ℝ) ≤ 4 * D / α + 1 := let _ := instDecidableEqE; by + have hfloorpos : 0 < (Nat.floor (α * q) : ℝ) := + Nat.cast_pos.mpr (floor_chunkSize_pos α q hlarge) + have hhalfpos : 0 < α * q / 2 := div_pos (mul_pos hα hq) zero_lt_two + have hnum : 0 ≤ 2 * D * q := + mul_nonneg (mul_nonneg (le_of_lt (zero_lt_two : (0 : ℝ) < 2)) hD) hq.le + have hratio : (2 * D * q) / (α * q / 2) = 4 * D / α := by + field_simp [ne_of_gt hα, ne_of_gt hq] + ring + calc + (chunkCount T (Nat.floor (α * q)) : ℝ) = + ((T.card / Nat.floor (α * q) : ℕ) : ℝ) + 1 := by + simp only [chunkCount, Nat.cast_add, Nat.cast_one] + _ ≤ (T.card : ℝ) / (Nat.floor (α * q) : ℝ) + 1 := by + simpa only [add_comm] using + (add_le_add_right + (Nat.cast_div_le (α := ℝ) (m := T.card) (n := Nat.floor (α * q))) (1 : ℝ)) + _ ≤ (2 * D * q) / (Nat.floor (α * q) : ℝ) + 1 := by + simpa only [add_comm] using + (add_le_add_right (div_le_div_of_nonneg_right hT hfloorpos.le) (1 : ℝ)) + _ ≤ (2 * D * q) / (α * q / 2) + 1 := by + simpa only [add_comm] using + (add_le_add_right + (div_le_div_of_nonneg_left hnum hhalfpos + (floor_chunkSize_ge_half α q hlarge)) (1 : ℝ)) + _ = 4 * D / α + 1 := by rw [hratio] + +theorem chunkCount_floor_le_nat (T : Finset E) (α q D : ℝ) + (hα : 0 < α) (hq : 0 < q) (hlarge : 2 ≤ α * q) + (hT : (T.card : ℝ) ≤ 2 * D * q) (hD : 0 ≤ D) + (J : ℕ) (hJ : 4 * D / α + 1 ≤ (J : ℝ)) : + chunkCount T (Nat.floor (α * q)) ≤ J := by + exact Nat.cast_le.mp ((chunkCount_floor_le T α q D hα hq hlarge hT hD).trans hJ) + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/ChunkTail.lean b/lean/OAI/Combinatorics/Ryser/Selection/ChunkTail.lean new file mode 100644 index 0000000000000000000000000000000000000000..5669f1c9c2c297cc97029d4db2fcdfff2decbbc7 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/ChunkTail.lean @@ -0,0 +1,200 @@ +import OAI.Combinatorics.Ryser.Selection.ChunkEnergy +import OAI.Combinatorics.Ryser.Selection.ChunkLoss +import OAI.Combinatorics.Ryser.Selection.IndependentTail +import OAI.Combinatorics.Ryser.Selection.RegularTail +import OAI.Combinatorics.Ryser.Selection.Estimates +import Mathlib.Algebra.Order.Floor.Semiring + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.Selection + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] {n K : ℕ} + +def equationBound (D : ℕ) : ℝ := 2 * (D : ℝ) ^ 3 + +def regularTailConstant (D : ℕ) (γ : ℝ) : ℝ := + (8 * equationBound D * (D : ℝ) ^ 7 + 2 * (D : ℝ) ^ 5) / γ ^ 2 + +def RegularEntry (data : Data F n) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (j : Fin n) : Prop := + sourceEnergy data I U j ≤ (I.card : ℝ) * Fintype.card F * + Real.sqrt (Fintype.card F) + +noncomputable def regularEntries (data : Data F n) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (E : Finset (Position n K)) : + Finset (Position n K) := by + classical + exact E.filter (fun e => RegularEntry data I U e.1) + +theorem regularTailConstant_nonneg (D : ℕ) (γ : ℝ) : + 0 ≤ regularTailConstant D γ := by + unfold regularTailConstant equationBound + positivity + +theorem prob_regular_entry_gt_le (D : ℕ) (hD : 1 ≤ D) (data : Data F n) + (hdata : Bounded D data) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (j : Fin n) (γ : ℝ) + (hm : 0 < (I.card : ℝ)) (hγ : 0 < γ) + (hlarge : (Fintype.card F : ℝ) / (4 * equationBound D) < I.card) + (hregular : RegularEntry data I U j) : + (FiniteLaw.uniform (Point F)).prob (fun x => + equationBound D * frozenMass I U / Fintype.card F + + γ * I.card * Fintype.card F < entryLoss data I U j x) ≤ + regularTailConstant D γ / Real.sqrt (Fintype.card F) := by + have hq : (1 : ℝ) ≤ Fintype.card F := by + exact_mod_cast Nat.one_le_iff_ne_zero.mpr Fintype.card_ne_zero + have hC : 0 < equationBound D := by + have hDr : (0 : ℝ) < D := by exact_mod_cast (lt_of_lt_of_le Nat.zero_lt_one hD) + unfold equationBound + positivity + have hmean : (FiniteLaw.uniform (Point F)).expectation (entryLoss data I U j) ≤ + equationBound D * frozenMass I U / Fintype.card F := by + simpa only [equationBound] using expectation_entryLoss_le D data hdata I U j + have hvar : (FiniteLaw.uniform (Point F)).variance (entryLoss data I U j) ≤ + 2 * (D : ℝ) ^ 7 * I.card * (Fintype.card F : ℝ) ^ 2 + + 2 * (D : ℝ) ^ 5 * (I.card : ℝ) ^ 2 * Fintype.card F * + Real.sqrt (Fintype.card F) := by + have hactual := variance_entryLoss_le D data hdata I U j + have hmul := mul_le_mul_of_nonneg_left hregular + (by positivity : 0 ≤ 2 * (D : ℝ) ^ 5 * I.card) + unfold RegularEntry at hregular + change 2 * (D : ℝ) ^ 5 * I.card * sourceEnergy data I U j ≤ + 2 * (D : ℝ) ^ 5 * I.card * + ((I.card : ℝ) * Fintype.card F * Real.sqrt (Fintype.card F)) at hmul + nlinarith + exact prob_regular_target_gt_le_sqrt (FiniteLaw.uniform (Point F)) + (entryLoss data I U j) D I.card (Fintype.card F) γ (equationBound D) + (frozenMass I U) (Nat.cast_nonneg D) hm hq hγ hC hlarge hmean hvar + +theorem card_irregularEntries_le (D : ℕ) (data : Data F n) (hdata : Bounded D data) + (I : Finset (Fin n)) (U : Fin n → Finset (Point F)) + (E : Finset (Position n K)) (hm : 0 < (I.card : ℝ)) : + ((E.filter (fun e : Position n K => ¬ RegularEntry data I U e.1)).card : ℝ) ≤ + (K : ℝ) * D * Real.sqrt (Fintype.card F) := by + classical + have hq : (0 : ℝ) < Fintype.card F := by exact_mod_cast Fintype.card_pos + simpa only [RegularEntry, not_le] using card_irregular_le E + (fun e => sourceEnergy data I U e.1) K D I.card (Fintype.card F) hm hq + (fun e _ => sourceEnergy_nonneg data I U e.1) + (sum_sourceEnergy_le D data hdata I U E) + +theorem prob_many_regular_exceedances_le (D : ℕ) (hD : 1 ≤ D) (data : Data F n) + (hdata : Bounded D data) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (E : Finset (Position n K)) (γ : ℝ) + (hm : 0 < (I.card : ℝ)) (hγ : 0 < γ) + (hlarge : (Fintype.card F : ℝ) / (4 * equationBound D) < I.card) : + (FiniteLaw.pi (fun _ : Position n K => FiniteLaw.uniform (Point F))).prob + (fun pool => Nat.ceil (γ * Fintype.card F) ≤ + ((regularEntries data I U E).filter (fun e => + equationBound D * frozenMass I U / Fintype.card F + + γ * I.card * Fintype.card F < entryLoss data I U e.1 (pool e))).card) ≤ + (2 : ℝ) ^ E.card * + (regularTailConstant D γ / Real.sqrt (Fintype.card F)) ^ + Nat.ceil (γ * Fintype.card F) := by + classical + have hp : 0 ≤ regularTailConstant D γ / Real.sqrt (Fintype.card F) := + div_nonneg (regularTailConstant_nonneg D γ) (Real.sqrt_nonneg _) + have htail := prob_many_coordinate_events_le + (fun _ : Position n K => FiniteLaw.uniform (Point F)) + (regularEntries data I U E) + (fun e x => equationBound D * frozenMass I U / Fintype.card F + + γ * I.card * Fintype.card F < entryLoss data I U e.1 x) + (Nat.ceil (γ * Fintype.card F)) + (regularTailConstant D γ / Real.sqrt (Fintype.card F)) hp + (fun e he => prob_regular_entry_gt_le D hD data hdata I U e.1 γ hm hγ hlarge + (Finset.mem_filter.mp he).2) + refine htail.trans ?_ + apply mul_le_mul_of_nonneg_right _ (pow_nonneg hp _) + exact pow_le_pow_right₀ (by norm_num) (Finset.card_filter_le _ _) + +theorem chunk_recurrence_of_few_regular_exceedances (D : ℕ) (data : Data F n) + (hdata : Bounded D data) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (E : Finset (Position n K)) + (pool : Pool F n K) (α γ : ℝ) (hm : 0 < (I.card : ℝ)) (hγ : 0 ≤ γ) + (hhalf : equationBound D * α = 1 / 2) + (hsize : (E.card : ℝ) ≤ α * Fintype.card F) + (hcutoff : (K : ℝ) * D * Real.sqrt (Fintype.card F) ≤ γ * Fintype.card F) + (hfew : ((regularEntries data I U E).filter (fun e => + equationBound D * frozenMass I U / Fintype.card F + + γ * I.card * Fintype.card F < entryLoss data I U e.1 (pool e))).card < + Nat.ceil (γ * Fintype.card F)) : + frozenMass I U / 2 - (α + 2 * equationBound D) * γ * + ((I.card : ℝ) * (Fintype.card F : ℝ) ^ 2) ≤ + frozenMass I (chunkFeasibleSet data U E pool) := by + classical + let threshold := equationBound D * frozenMass I U / Fintype.card F + + γ * I.card * Fintype.card F + let bad : Position n K → Prop := fun e => + ¬ RegularEntry data I U e.1 ∨ threshold < entryLoss data I U e.1 (pool e) + let irregular := E.filter (fun e : Position n K => ¬ RegularEntry data I U e.1) + let exceeds := (regularEntries data I U E).filter (fun e => + threshold < entryLoss data I U e.1 (pool e)) + have hbadsub : E.filter bad ⊆ irregular ∪ exceeds := by + intro e he + obtain ⟨heE, heBad⟩ := Finset.mem_filter.mp he + by_cases hregular : RegularEntry data I U e.1 + · apply Finset.mem_union.mpr + right + apply Finset.mem_filter.mpr + refine ⟨Finset.mem_filter.mpr ⟨heE, hregular⟩, ?_⟩ + exact heBad.resolve_left (not_not.mpr hregular) + · exact Finset.mem_union.mpr (Or.inl (Finset.mem_filter.mpr ⟨heE, hregular⟩)) + have hbadnat : (E.filter bad).card ≤ irregular.card + exceeds.card := + (Finset.card_le_card hbadsub).trans (Finset.card_union_le _ _) + have hirregular : (irregular.card : ℝ) ≤ γ * Fintype.card F := + (card_irregularEntries_le D data hdata I U E hm).trans hcutoff + have hexceeds : (exceeds.card : ℝ) < γ * Fintype.card F := Nat.lt_ceil.mp hfew + have hbad : ((E.filter bad).card : ℝ) ≤ 2 * γ * Fintype.card F := by + have hbadreal : ((E.filter bad).card : ℝ) ≤ + (irregular.card : ℝ) + exceeds.card := by exact_mod_cast hbadnat + linarith + have hloss := chunk_mass_loss_le_entryLoss data I U E pool + refine mass_after_chunk_ge E bad (fun e => entryLoss data I U e.1 (pool e)) + (frozenMass I U) (frozenMass I (chunkFeasibleSet data U E pool)) + I.card (Fintype.card F) (equationBound D) α γ ?_ hm.le ?_ ?_ hγ + hhalf hsize hbad ?_ ?_ ?_ + · exact Finset.sum_nonneg (fun i _ => Nat.cast_nonneg _) + · exact_mod_cast Fintype.card_pos + · unfold equationBound + positivity + · intro e he hgood + exact le_of_not_gt (fun hgt => hgood (Or.inr hgt)) + · intro e he hbad + exact entryLoss_le D data hdata I U e.1 (pool e) + · linarith + +theorem prob_chunk_recurrence_failure_le (D : ℕ) (hD : 1 ≤ D) (data : Data F n) + (hdata : Bounded D data) (I : Finset (Fin n)) + (U : Fin n → Finset (Point F)) (E : Finset (Position n K)) (α γ : ℝ) + (hm : 0 < (I.card : ℝ)) (hγ : 0 < γ) + (hlarge : (Fintype.card F : ℝ) / (4 * equationBound D) < I.card) + (hhalf : equationBound D * α = 1 / 2) + (hsize : (E.card : ℝ) ≤ α * Fintype.card F) + (hcutoff : (K : ℝ) * D * Real.sqrt (Fintype.card F) ≤ γ * Fintype.card F) : + (FiniteLaw.pi (fun _ : Position n K => FiniteLaw.uniform (Point F))).prob + (fun pool => frozenMass I (chunkFeasibleSet data U E pool) < + frozenMass I U / 2 - (α + 2 * equationBound D) * γ * + ((I.card : ℝ) * (Fintype.card F : ℝ) ^ 2)) ≤ + (2 : ℝ) ^ E.card * + (regularTailConstant D γ / Real.sqrt (Fintype.card F)) ^ + Nat.ceil (γ * Fintype.card F) := by + classical + refine (FiniteLaw.prob_mono _ ?_).trans + (prob_many_regular_exceedances_le D hD data hdata I U E γ hm hγ hlarge) + intro pool hfailure + by_contra hnot + have hfew := Nat.lt_of_not_ge hnot + have hgood := chunk_recurrence_of_few_regular_exceedances D data hdata I U E pool + α γ hm hγ.le hhalf hsize hcutoff hfew + exact (not_lt_of_ge hgood) hfailure + +end RyserCoveringCounterexample.Selection + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/ChunkTailAsymptotics.lean b/lean/OAI/Combinatorics/Ryser/Selection/ChunkTailAsymptotics.lean new file mode 100644 index 0000000000000000000000000000000000000000..ad7b53b551157b2a32590c7cba5a4d6ea80094f9 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/ChunkTailAsymptotics.lean @@ -0,0 +1,134 @@ +import OAI.Combinatorics.Ryser.Selection.AnalyticalLimits +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Tactic.NormNum + +namespace OAI + +open Filter Topology + +namespace RyserCoveringCounterexample.Selection + +theorem chunk_tail_le_exp_of_log_bounds (α γ B q : ℝ) + (hα : 0 ≤ α) (hB : 0 < B) (hq : 1 ≤ q) + (hbase : Real.log B ≤ Real.log q / 2) + (hbudget : (α + 1) * Real.log 2 + γ * Real.log B ≤ (γ / 4) * Real.log q) : + (2 : ℝ) ^ Nat.ceil (α * q) * (B / Real.sqrt q) ^ Nat.ceil (γ * q) ≤ + Real.exp (-(γ / 4) * q * Real.log q) := by + have hqpos : 0 < q := lt_of_lt_of_le zero_lt_one hq + have hspos : 0 < Real.sqrt q := Real.sqrt_pos.mpr hqpos + have hratio : 0 < B / Real.sqrt q := div_pos hB hspos + have hlogratio : Real.log (B / Real.sqrt q) = Real.log B - Real.log q / 2 := by + rw [Real.log_div hB.ne' hspos.ne', Real.log_sqrt hqpos.le] + have hlognonpos : Real.log (B / Real.sqrt q) ≤ 0 := by + rw [hlogratio] + linarith + have hceilα : (Nat.ceil (α * q) : ℝ) ≤ (α + 1) * q := by + calc + (Nat.ceil (α * q) : ℝ) ≤ α * q + 1 := + (Nat.ceil_lt_add_one (mul_nonneg hα hqpos.le)).le + _ ≤ (α + 1) * q := by nlinarith + have hfirst : (Nat.ceil (α * q) : ℝ) * Real.log 2 ≤ + (α + 1) * q * Real.log 2 := + mul_le_mul_of_nonneg_right hceilα (Real.log_nonneg (by norm_num)) + have hsecond : (Nat.ceil (γ * q) : ℝ) * Real.log (B / Real.sqrt q) ≤ + γ * q * Real.log (B / Real.sqrt q) := + mul_le_mul_of_nonpos_right (Nat.le_ceil (γ * q)) hlognonpos + have htwo : (2 : ℝ) ^ Nat.ceil (α * q) = + Real.exp ((Nat.ceil (α * q) : ℝ) * Real.log 2) := by + rw [Real.exp_nat_mul, Real.exp_log (by norm_num : (0 : ℝ) < 2)] + have hpower : (B / Real.sqrt q) ^ Nat.ceil (γ * q) = + Real.exp ((Nat.ceil (γ * q) : ℝ) * Real.log (B / Real.sqrt q)) := by + rw [Real.exp_nat_mul, Real.exp_log hratio] + rw [htwo, hpower, ← Real.exp_add] + apply Real.exp_le_exp.mpr + calc + (Nat.ceil (α * q) : ℝ) * Real.log 2 + + (Nat.ceil (γ * q) : ℝ) * Real.log (B / Real.sqrt q) ≤ + (α + 1) * q * Real.log 2 + γ * q * Real.log (B / Real.sqrt q) := + add_le_add hfirst hsecond + _ = q * ((α + 1) * Real.log 2 + γ * Real.log B - (γ / 2) * Real.log q) := by + rw [hlogratio] + ring + _ ≤ q * ((γ / 4) * Real.log q - (γ / 2) * Real.log q) := + mul_le_mul_of_nonneg_left (sub_le_sub_right hbudget _) hqpos.le + _ = -(γ / 4) * q * Real.log q := by ring + +theorem exists_threshold_chunk_tail (α γ B : ℝ) + (hα : 0 ≤ α) (hγ : 0 < γ) (hB : 0 < B) : + ∃ Q : ℕ, ∀ q : ℕ, Q ≤ q → + (2 : ℝ) ^ Nat.ceil (α * (q : ℝ)) * + (B / Real.sqrt (q : ℝ)) ^ Nat.ceil (γ * (q : ℝ)) ≤ + Real.exp (-(γ / 4) * (q : ℝ) * Real.log (q : ℝ)) := by + have hlog : Tendsto (fun q : ℕ => Real.log (q : ℝ)) atTop atTop := by + simpa only [Function.comp_def] using + Real.tendsto_log_atTop.comp (tendsto_natCast_atTop_atTop (R := ℝ)) + have hhalf : Tendsto (fun q : ℕ => (1 / 2 : ℝ) * Real.log (q : ℝ)) atTop atTop := + hlog.const_mul_atTop (by norm_num) + have hquarter : Tendsto (fun q : ℕ => (γ / 4) * Real.log (q : ℝ)) atTop atTop := + hlog.const_mul_atTop (div_pos hγ (by norm_num)) + have hev : ∀ᶠ q : ℕ in atTop, + (2 : ℝ) ^ Nat.ceil (α * (q : ℝ)) * + (B / Real.sqrt (q : ℝ)) ^ Nat.ceil (γ * (q : ℝ)) ≤ + Real.exp (-(γ / 4) * (q : ℝ) * Real.log (q : ℝ)) := by + filter_upwards [eventually_ge_atTop (1 : ℕ), + hhalf.eventually_ge_atTop (Real.log B), + hquarter.eventually_ge_atTop ((α + 1) * Real.log 2 + γ * Real.log B)] + with q hq hbase hbudget + have hqreal : (1 : ℝ) ≤ (q : ℝ) := by + simpa only [Nat.cast_one] using (Nat.cast_le (α := ℝ)).mpr hq + exact chunk_tail_le_exp_of_log_bounds α γ B (q : ℝ) hα hB hqreal + (by linarith) hbudget + exact eventually_atTop.1 hev + +theorem exists_threshold_pool_budget (K D γ : ℝ) (hγ : 0 < γ) : + ∃ Q : ℕ, ∀ q : ℕ, Q ≤ q → + K * D * Real.sqrt (q : ℝ) ≤ γ * (q : ℝ) := by + have hs : Tendsto (fun q : ℕ => Real.sqrt (q : ℝ)) atTop atTop := by + simpa only [Function.comp_def] using + Real.tendsto_sqrt_atTop.comp (tendsto_natCast_atTop_atTop (R := ℝ)) + have hr : Tendsto (fun q : ℕ => K * D / Real.sqrt (q : ℝ)) atTop (𝓝 0) := + hs.const_div_atTop (K * D) + have hev : ∀ᶠ q : ℕ in atTop, + K * D * Real.sqrt (q : ℝ) ≤ γ * (q : ℝ) := by + filter_upwards [hr.eventually (gt_mem_nhds hγ), hs.eventually_ge_atTop 1] + with q hq hs1 + have hspos : 0 < Real.sqrt (q : ℝ) := lt_of_lt_of_le zero_lt_one hs1 + have hKD : K * D ≤ γ * Real.sqrt (q : ℝ) := + (div_le_iff₀ hspos).mp hq.le + calc + K * D * Real.sqrt (q : ℝ) ≤ + (γ * Real.sqrt (q : ℝ)) * Real.sqrt (q : ℝ) := + mul_le_mul_of_nonneg_right hKD (Real.sqrt_nonneg _) + _ = γ * (q : ℝ) := by + rw [mul_assoc, Real.mul_self_sqrt (Nat.cast_nonneg q)] + exact eventually_atTop.1 hev + +theorem exists_threshold_chunk_tail_and_pool_budget (α γ B K D : ℝ) + (hα : 0 ≤ α) (hγ : 0 < γ) (hB : 0 < B) : + ∃ Q : ℕ, ∀ q : ℕ, Q ≤ q → + ((2 : ℝ) ^ Nat.ceil (α * (q : ℝ)) * + (B / Real.sqrt (q : ℝ)) ^ Nat.ceil (γ * (q : ℝ)) ≤ + Real.exp (-(γ / 4) * (q : ℝ) * Real.log (q : ℝ))) ∧ + K * D * Real.sqrt (q : ℝ) ≤ γ * (q : ℝ) := by + obtain ⟨Q₁, hQ₁⟩ := exists_threshold_chunk_tail α γ B hα hγ hB + obtain ⟨Q₂, hQ₂⟩ := exists_threshold_pool_budget K D γ hγ + refine ⟨max Q₁ Q₂, ?_⟩ + intro q hq + exact ⟨hQ₁ q ((le_max_left _ _).trans hq), hQ₂ q ((le_max_right _ _).trans hq)⟩ + +theorem chunk_tail_le_exp_of_length_le (α γ B q : ℝ) (N : ℕ) + (hB : 0 ≤ B) (hN : (N : ℝ) ≤ α * q) + (hceil : (2 : ℝ) ^ Nat.ceil (α * q) * + (B / Real.sqrt q) ^ Nat.ceil (γ * q) ≤ Real.exp (-(γ / 4) * q * Real.log q)) : + (2 : ℝ) ^ N * (B / Real.sqrt q) ^ Nat.ceil (γ * q) ≤ + Real.exp (-(γ / 4) * q * Real.log q) := by + have hN' : N ≤ Nat.ceil (α * q) := + (Nat.cast_le (α := ℝ)).mp (hN.trans (Nat.le_ceil (α * q))) + have hpow : (2 : ℝ) ^ N ≤ (2 : ℝ) ^ Nat.ceil (α * q) := + pow_le_pow_right₀ (by norm_num) hN' + exact (mul_le_mul_of_nonneg_right hpow + (pow_nonneg (div_nonneg hB (Real.sqrt_nonneg q)) _)).trans hceil + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/Definitions.lean b/lean/OAI/Combinatorics/Ryser/Selection/Definitions.lean new file mode 100644 index 0000000000000000000000000000000000000000..f52af650855045672c62c6910a428db911d8f5ba --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/Definitions.lean @@ -0,0 +1,131 @@ +import OAI.Combinatorics.Ryser.Geometry.Basic +import Mathlib.Algebra.Group.Prod +import Mathlib.Data.Fintype.Pi +import Mathlib.Algebra.BigOperators.Group.Finset.Basic + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Selection + +structure Data (F : Type*) [Field F] (n : ℕ) where + W : Fin n → Finset (Point F) + dirs : Fin n → Finset (Direction F) + +abbrev Position (n K : ℕ) := Fin n × Fin K +abbrev Pool (F : Type*) (n K : ℕ) := Position n K → Point F + +variable {F : Type*} [Field F] [instDecidableEqF : DecidableEq F] {n K : ℕ} + +def Conflict (data : Data F n) (i j : Fin n) (b b' : Point F) : Prop := + ∃ u ∈ data.W i, ∃ v ∈ data.W j, ∃ d ∈ data.dirs i ∪ data.dirs j, + projection d ((b + u) - (b' + v)) = 0 + +theorem projection_sub_eq (d : Direction F) (p q : Point F) : + projection d (p - q) = projection d p - projection d q := let _ := instDecidableEqF; by + exact RyserCoveringCounterexample.projection_sub d p q + +theorem projection_add_eq (d : Direction F) (p q : Point F) : + projection d (p + q) = projection d p + projection d q := let _ := instDecidableEqF; by + exact RyserCoveringCounterexample.projection_add d p q + +theorem conflict_iff_forbidden (data : Data F n) (i j : Fin n) (b b' : Point F) : + Conflict data i j b b' ↔ + ∃ u ∈ data.W i, ∃ v ∈ data.W j, ∃ d ∈ data.dirs i ∪ data.dirs j, + projection d b = projection d b' + projection d (v - u) := by + unfold Conflict + constructor + · rintro ⟨u, hu, v, hv, d, hd, h⟩ + refine ⟨u, hu, v, hv, d, hd, ?_⟩ + rw [projection_sub_eq, projection_add_eq, projection_add_eq] at h + rw [projection_sub_eq, ← add_sub_assoc] + exact eq_sub_iff_add_eq.mpr (sub_eq_zero.mp h) + · rintro ⟨u, hu, v, hv, d, hd, h⟩ + refine ⟨u, hu, v, hv, d, hd, ?_⟩ + rw [projection_sub_eq, ← add_sub_assoc] at h + rw [projection_sub_eq, projection_add_eq, projection_add_eq] + exact sub_eq_zero.mpr (eq_sub_iff_add_eq.mp h) + +theorem Conflict.symm {data : Data F n} {i j : Fin n} {b b' : Point F} + (h : Conflict data i j b b') : Conflict data j i b' b := by + rcases h with ⟨u, hu, v, hv, d, hd, heq⟩ + refine ⟨v, hv, u, hu, d, ?_, ?_⟩ + · simpa only [Finset.union_comm] using hd + · rw [projection_sub_eq] at heq ⊢ + exact sub_eq_zero.mpr (sub_eq_zero.mp heq).symm + +theorem conflict_comm (data : Data F n) (i j : Fin n) (b b' : Point F) : + Conflict data i j b b' ↔ Conflict data j i b' b := + ⟨Conflict.symm, Conflict.symm⟩ + +def HasCompatibleChoice (data : Data F n) (pool : Pool F n K) : Prop := + ∃ choice : Fin n → Fin K, ∀ i j, i ≠ j → + ¬ Conflict data i j (pool (i, choice i)) (pool (j, choice j)) + +def Feasible (data : Data F n) (T : Finset (Position n K)) + (pool : Pool F n K) (i : Fin n) (b : Point F) : Prop := + ∀ e ∈ T, ¬ Conflict data i e.1 b (pool e) + +@[simp] theorem feasible_empty (data : Data F n) (pool : Pool F n K) + (i : Fin n) (b : Point F) : Feasible data ∅ pool i b := by + simp [Feasible] + +theorem feasible_mono (data : Data F n) {S T : Finset (Position n K)} + (hST : S ⊆ T) (pool : Pool F n K) (i : Fin n) (b : Point F) + (h : Feasible data T pool i b) : Feasible data S pool i b := + fun e he => h e (hST he) + +theorem feasible_congr (data : Data F n) (T : Finset (Position n K)) + (pool pool' : Pool F n K) (h : ∀ e ∈ T, pool e = pool' e) + (i : Fin n) (b : Point F) : + Feasible data T pool i b ↔ Feasible data T pool' i b := by + unfold Feasible + constructor <;> intro hb e he + · simpa only [h e he] using hb e he + · simpa only [h e he] using hb e he + +section Finite +variable [Fintype F] + +def Bounded (D : ℕ) (data : Data F n) : Prop := + n ≤ D * Fintype.card F ∧ + (∀ i, (data.W i).card ≤ D) ∧ + (∀ i, (data.dirs i).card ≤ D) ∧ + ∀ d, (Finset.univ.filter fun i => d ∈ data.dirs i).card ≤ D + +noncomputable def feasibleSet (data : Data F n) (T : Finset (Position n K)) + (pool : Pool F n K) (i : Fin n) : Finset (Point F) := by + classical + exact Finset.univ.filter (Feasible data T pool i) + +@[simp] theorem mem_feasibleSet (data : Data F n) (T : Finset (Position n K)) + (pool : Pool F n K) (i : Fin n) (b : Point F) : + b ∈ feasibleSet data T pool i ↔ Feasible data T pool i b := by + classical + simp only [feasibleSet, Finset.mem_filter, Finset.mem_univ, true_and] + +@[simp] theorem feasibleSet_empty (data : Data F n) (pool : Pool F n K) + (i : Fin n) : feasibleSet data ∅ pool i = Finset.univ := by + classical + ext b + simp + +theorem feasibleSet_mono (data : Data F n) {S T : Finset (Position n K)} + (hST : S ⊆ T) (pool : Pool F n K) (i : Fin n) : + feasibleSet data T pool i ⊆ feasibleSet data S pool i := by + intro b hb + exact (mem_feasibleSet _ _ _ _ _).mpr + (feasible_mono data hST pool i b ((mem_feasibleSet _ _ _ _ _).mp hb)) + +noncomputable def feasibleMass (data : Data F n) (I : Finset (Fin n)) + (T : Finset (Position n K)) (pool : Pool F n K) : ℕ := + ∑ i ∈ I, (feasibleSet data T pool i).card + +def exposedCount (T : Finset (Position n K)) (i : Fin n) : ℕ := + (T.filter fun e => e.1 = i).card + +end Finite +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/DensityConstants.lean b/lean/OAI/Combinatorics/Ryser/Selection/DensityConstants.lean new file mode 100644 index 0000000000000000000000000000000000000000..f439a45191557fa0bce7411033f396fac164fc29 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/DensityConstants.lean @@ -0,0 +1,78 @@ +import OAI.Combinatorics.Ryser.Selection.ChunkTail +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +namespace OAI + +noncomputable section + +namespace RyserCoveringCounterexample.Selection + +def densityChunkCount (D : ℕ) : ℕ := 16 * D ^ 4 + 1 + +def densityAlpha (D : ℕ) : ℝ := 1 / (4 * (D : ℝ) ^ 3) + +def densityDelta (D : ℕ) : ℝ := (1 / 2 : ℝ) ^ (densityChunkCount D + 1) + +def densityGamma (D : ℕ) : ℝ := + densityDelta D / (2 * (densityAlpha D + 4 * (D : ℝ) ^ 3)) + +def densityRate (D : ℕ) : ℝ := densityGamma D / 4 + +theorem densityAlpha_pos (D : ℕ) (hD : 1 ≤ D) : 0 < densityAlpha D := by + have hDr : (0 : ℝ) < D := by + exact_mod_cast (lt_of_lt_of_le Nat.zero_lt_one hD) + unfold densityAlpha + positivity + +theorem densityDelta_pos (D : ℕ) : 0 < densityDelta D := by + unfold densityDelta + exact pow_pos (by norm_num) _ + +theorem densityGamma_pos (D : ℕ) (hD : 1 ≤ D) : 0 < densityGamma D := by + have hα := densityAlpha_pos D hD + have hδ := densityDelta_pos D + unfold densityGamma + positivity + +theorem densityRate_pos (D : ℕ) (hD : 1 ≤ D) : 0 < densityRate D := by + unfold densityRate + exact div_pos (densityGamma_pos D hD) (by norm_num) + +theorem equationBound_mul_densityAlpha (D : ℕ) (hD : 1 ≤ D) : + equationBound D * densityAlpha D = 1 / 2 := by + have hDr : (0 : ℝ) < D := by + exact_mod_cast (lt_of_lt_of_le Nat.zero_lt_one hD) + unfold equationBound densityAlpha + field_simp [hDr.ne']; ring + +theorem density_error_budget (D : ℕ) (hD : 1 ≤ D) : + 2 * ((densityAlpha D + 2 * equationBound D) * densityGamma D) = + densityDelta D := by + have hα := densityAlpha_pos D hD + have hden : densityAlpha D + 4 * (D : ℝ) ^ 3 ≠ 0 := by + have hpos : 0 < densityAlpha D + 4 * (D : ℝ) ^ 3 := by positivity + exact hpos.ne' + unfold densityGamma equationBound + field_simp [hden]; ring + +theorem density_chunkCount_identity (D : ℕ) : + (densityChunkCount D : ℝ) = 4 * (D : ℝ) / densityAlpha D + 1 := by + simp only [densityChunkCount, densityAlpha, Nat.cast_add, Nat.cast_mul, + Nat.cast_pow, Nat.cast_ofNat, one_div, div_inv_eq_mul] + ring + +theorem regularTailConstant_pos (D : ℕ) (hD : 1 ≤ D) (γ : ℝ) (hγ : 0 < γ) : + 0 < regularTailConstant D γ := by + have hDr : (0 : ℝ) < D := by + exact_mod_cast (lt_of_lt_of_le Nat.zero_lt_one hD) + unfold regularTailConstant equationBound + positivity + +end RyserCoveringCounterexample.Selection + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/Estimates.lean b/lean/OAI/Combinatorics/Ryser/Selection/Estimates.lean new file mode 100644 index 0000000000000000000000000000000000000000..2a7188f2f18dd0b75de1f8c31944fa44ccd2db8b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/Estimates.lean @@ -0,0 +1,150 @@ +import Mathlib.Analysis.Complex.Exponential +import Mathlib.Algebra.Order.BigOperators.GroupWithZero.Finset +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Ring + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Selection + +theorem sum_le_card_mul_add_bad_card_mul {ι : Type*} (T : Finset ι) + (bad : ι → Prop) [DecidablePred bad] (z : ι → ℝ) (threshold cap : ℝ) + (hthreshold : 0 ≤ threshold) + (hregular : ∀ e ∈ T, ¬bad e → z e ≤ threshold) + (hexception : ∀ e ∈ T, bad e → z e ≤ cap) : + (∑ e ∈ T, z e) ≤ (T.card : ℝ) * threshold + ((T.filter bad).card : ℝ) * cap := by + calc + (∑ e ∈ T, z e) ≤ ∑ e ∈ T, (threshold + if bad e then cap else 0) := by + apply Finset.sum_le_sum + intro e he + by_cases hb : bad e + · simp only [ite_eq_left hb] + linarith [hexception e he hb] + · simpa only [ite_eq_right hb, add_zero] using hregular e he hb + _ = _ := by + rw [Finset.sum_add_distrib, ← Finset.sum_filter] + simp only [Finset.sum_const, nsmul_eq_mul] + +theorem mass_after_chunk_ge {ι : Type*} (T : Finset ι) + (bad : ι → Prop) [DecidablePred bad] (z : ι → ℝ) + (M M' m q C α γ : ℝ) + (hM : 0 ≤ M) (hm : 0 ≤ m) (hq : 0 < q) (hC : 0 ≤ C) (hγ : 0 ≤ γ) + (hhalf : C * α = 1 / 2) + (hsize : (T.card : ℝ) ≤ α * q) + (hbad : ((T.filter bad).card : ℝ) ≤ 2 * γ * q) + (hregular : ∀ e ∈ T, ¬bad e → z e ≤ C * M / q + γ * m * q) + (hexception : ∀ e ∈ T, bad e → z e ≤ C * m * q) + (hloss : M - (∑ e ∈ T, z e) ≤ M') : + M / 2 - (α + 2 * C) * γ * (m * q ^ 2) ≤ M' := by + have hthreshold : 0 ≤ C * M / q + γ * m * q := + add_nonneg (div_nonneg (mul_nonneg hC hM) hq.le) + (mul_nonneg (mul_nonneg hγ hm) hq.le) + have hcap : 0 ≤ C * m * q := mul_nonneg (mul_nonneg hC hm) hq.le + have hsum := sum_le_card_mul_add_bad_card_mul T bad z + (C * M / q + γ * m * q) (C * m * q) hthreshold hregular hexception + have htotal : (∑ e ∈ T, z e) ≤ + (α * q) * (C * M / q + γ * m * q) + (2 * γ * q) * (C * m * q) := + hsum.trans (add_le_add (mul_le_mul_of_nonneg_right hsize hthreshold) + (mul_le_mul_of_nonneg_right hbad hcap)) + have heq : (α * q) * (C * M / q + γ * m * q) + + (2 * γ * q) * (C * m * q) = + (C * α) * M + (α + 2 * C) * γ * (m * q ^ 2) := by + field_simp [hq.ne'] + ring + rw [heq, hhalf] at htotal + linarith + +theorem mass_ge_geometric_sub_error (mass : ℕ → ℝ) (scale err : ℝ) (J : ℕ) + (hscale : 0 ≤ scale) (herr : 0 ≤ err) (hstart : scale ≤ mass 0) + (hstep : ∀ j < J, mass j / 2 - err * scale ≤ mass (j + 1)) : + scale * (1 / 2 : ℝ) ^ J - 2 * err * scale ≤ mass J := by + have hall : ∀ j ≤ J, scale * (1 / 2 : ℝ) ^ j - 2 * err * scale ≤ mass j := by + intro j + induction j with + | zero => + intro _ + simp only [pow_zero, mul_one] + nlinarith [mul_nonneg herr hscale] + | succ j ih => + intro hj + have hprev := ih (Nat.le_trans (Nat.le_succ j) hj) + have hnext := hstep j (Nat.lt_of_lt_of_le (Nat.lt_succ_self j) hj) + rw [pow_succ] + nlinarith + exact hall J le_rfl + +theorem mass_after_chunks_ge_density (mass : ℕ → ℝ) (scale err : ℝ) (J J0 : ℕ) + (hscale : 0 ≤ scale) (herr : 0 ≤ err) (hstart : scale ≤ mass 0) + (hstep : ∀ j < J, mass j / 2 - err * scale ≤ mass (j + 1)) + (hJ : J ≤ J0) (hbudget : 2 * err ≤ (1 / 2 : ℝ) ^ (J0 + 1)) : + (1 / 2 : ℝ) ^ (J0 + 1) * scale ≤ mass J := by + have hbase := mass_ge_geometric_sub_error mass scale err J hscale herr hstart hstep + have hpow : (1 / 2 : ℝ) ^ J0 ≤ (1 / 2 : ℝ) ^ J := + pow_le_pow_of_le_one (by norm_num) (by norm_num) hJ + have hpowmul := mul_le_mul_of_nonneg_left hpow hscale + have hbudgetmul := mul_le_mul_of_nonneg_right hbudget hscale + calc + (1 / 2 : ℝ) ^ (J0 + 1) * scale = + scale * (1 / 2 : ℝ) ^ J0 - (1 / 2 : ℝ) ^ (J0 + 1) * scale := by + rw [pow_succ] + ring + _ ≤ scale * (1 / 2 : ℝ) ^ J0 - 2 * err * scale := by linarith + _ ≤ scale * (1 / 2 : ℝ) ^ J - 2 * err * scale := + sub_le_sub_right hpowmul _ + _ ≤ mass J := hbase + +theorem unused_weight_ge {ι : Type*} (I : Finset ι) (p : ι → ℝ) + (t : ι → ℕ) (K : ℕ) (δ m : ℝ) + (hp : ∀ i ∈ I, p i ≤ 1) (ht : ∀ i ∈ I, t i ≤ K) + (hdensity : δ * m ≤ ∑ i ∈ I, p i) + (hcount : (∑ i ∈ I, (t i : ℝ)) ≤ 2 * m) : + ((K : ℝ) * δ - 2) * m ≤ ∑ i ∈ I, ((K - t i : ℕ) : ℝ) * p i := by + have hexposed : (∑ i ∈ I, (t i : ℝ) * p i) ≤ ∑ i ∈ I, (t i : ℝ) := by + apply Finset.sum_le_sum + intro i hi + simpa only [mul_one] using mul_le_mul_of_nonneg_left (hp i hi) (Nat.cast_nonneg (t i)) + have hdense := mul_le_mul_of_nonneg_left hdensity (Nat.cast_nonneg K : (0 : ℝ) ≤ K) + have hidentity : (∑ i ∈ I, ((K - t i : ℕ) : ℝ) * p i) = + (K : ℝ) * (∑ i ∈ I, p i) - ∑ i ∈ I, (t i : ℝ) * p i := by + calc + _ = ∑ i ∈ I, ((K : ℝ) * p i - (t i : ℝ) * p i) := by + apply Finset.sum_congr rfl + intro i hi + rw [Nat.cast_sub (ht i hi), sub_mul] + _ = _ := by rw [Finset.sum_sub_distrib, Finset.mul_sum] + rw [hidentity] + nlinarith + +theorem prod_one_sub_pow_le_exp_neg_sum {ι : Type*} (I : Finset ι) + (p : ι → ℝ) (k : ι → ℕ) (hp : ∀ i ∈ I, p i ≤ 1) : + (∏ i ∈ I, (1 - p i) ^ k i) ≤ Real.exp (-(∑ i ∈ I, (k i : ℝ) * p i)) := by + calc + (∏ i ∈ I, (1 - p i) ^ k i) ≤ ∏ i ∈ I, Real.exp (-p i) ^ k i := by + apply Finset.prod_le_prod₀ + · intro i hi + exact pow_nonneg (sub_nonneg.mpr (hp i hi)) _ + · intro i hi + exact pow_le_pow_left₀ (sub_nonneg.mpr (hp i hi)) (Real.one_sub_le_exp_neg (p i)) _ + _ = ∏ i ∈ I, Real.exp (-((k i : ℝ) * p i)) := by + apply Finset.prod_congr rfl + intro i _ + rw [← Real.exp_nat_mul, mul_neg] + _ = Real.exp (∑ i ∈ I, -((k i : ℝ) * p i)) := (Real.exp_sum I _).symm + _ = Real.exp (-(∑ i ∈ I, (k i : ℝ) * p i)) := by rw [Finset.sum_neg_distrib] + +theorem unused_failure_product_le {ι : Type*} (I : Finset ι) (p : ι → ℝ) + (t : ι → ℕ) (K : ℕ) (δ m : ℝ) + (hp : ∀ i ∈ I, p i ≤ 1) (ht : ∀ i ∈ I, t i ≤ K) + (hdensity : δ * m ≤ ∑ i ∈ I, p i) + (hcount : (∑ i ∈ I, (t i : ℝ)) ≤ 2 * m) : + (∏ i ∈ I, (1 - p i) ^ (K - t i)) ≤ Real.exp (-(((K : ℝ) * δ - 2) * m)) := by + refine (prod_one_sub_pow_le_exp_neg_sum I p (fun i => K - t i) hp).trans ?_ + exact Real.exp_le_exp.mpr (neg_le_neg (unused_weight_ge I p t K δ m hp ht hdensity hcount)) + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/FeasibleDensity.lean b/lean/OAI/Combinatorics/Ryser/Selection/FeasibleDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..e0d4d8a8d8e768ca5458b42e0f1e3a24e7099c5c --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/FeasibleDensity.lean @@ -0,0 +1,78 @@ +import OAI.Combinatorics.Ryser.Selection.PoolLaw +import OAI.Combinatorics.Ryser.Geometry.Cardinality + +namespace OAI + +open scoped BigOperators +namespace RyserCoveringCounterexample.Selection + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] {n K : ℕ} + +noncomputable def feasibleDensity (data : Data F n) (T : Finset (Position n K)) + (pool : Pool F n K) (i : Fin n) : ℝ := + (FiniteLaw.uniform (Point F)).prob (Feasible data T pool i) + +theorem feasibleDensity_nonneg (data : Data F n) (T : Finset (Position n K)) + (pool : Pool F n K) (i : Fin n) : 0 ≤ feasibleDensity data T pool i := + (FiniteLaw.uniform (Point F)).prob_nonneg _ + +theorem feasibleDensity_le_one (data : Data F n) (T : Finset (Position n K)) + (pool : Pool F n K) (i : Fin n) : feasibleDensity data T pool i ≤ 1 := + (FiniteLaw.uniform (Point F)).prob_le_one _ + +theorem feasibleDensity_eq_card (data : Data F n) (T : Finset (Position n K)) + (pool : Pool F n K) (i : Fin n) : + feasibleDensity data T pool i = + ((feasibleSet data T pool i).card : ℝ) / (Fintype.card F : ℝ) ^ 2 := by + classical + rw [feasibleDensity, FiniteLaw.uniform_prob, card_point, Nat.cast_pow] + rfl + +theorem prob_not_feasible_eq (data : Data F n) (T : Finset (Position n K)) + (pool : Pool F n K) (i : Fin n) : + (FiniteLaw.uniform (Point F)).prob (fun b => ¬Feasible data T pool i b) = + 1 - feasibleDensity data T pool i := + (FiniteLaw.uniform (Point F)).prob_compl _ + +theorem sum_feasibleDensity (data : Data F n) (I : Finset (Fin n)) + (T : Finset (Position n K)) (pool : Pool F n K) : + (∑ i ∈ I, feasibleDensity data T pool i) = + (feasibleMass data I T pool : ℝ) / (Fintype.card F : ℝ) ^ 2 := by + classical + simp only [feasibleDensity_eq_card, feasibleMass, Nat.cast_sum, + div_eq_mul_inv, Finset.sum_mul] + +theorem feasibleSet_join_eq (data : Data F n) (T : Finset (Position n K)) + (x : ExposedAssignment (F := F) T) (y : FreshAssignment (F := F) T) + (i : Fin n) : + feasibleSet data T (joinAssignments T x y) i = + feasibleSet data T (frozenPool T x) i := by + ext b + simp only [mem_feasibleSet, feasible_join_iff] + +theorem feasibleMass_join_eq (data : Data F n) (I : Finset (Fin n)) + (T : Finset (Position n K)) (x : ExposedAssignment (F := F) T) + (y : FreshAssignment (F := F) T) : + feasibleMass data I T (joinAssignments T x y) = + feasibleMass data I T (frozenPool T x) := by + simp only [feasibleMass, feasibleSet_join_eq] + +theorem prob_feasibleMass_lt_eq_exposed (data : Data F n) (I : Finset (Fin n)) + (T : Finset (Position n K)) (a : ℝ) : + (poolLaw F n K).prob (fun pool => (feasibleMass data I T pool : ℝ) < a) = + (FiniteLaw.uniform (ExposedAssignment (F := F) T)).prob + (fun x => (feasibleMass data I T (frozenPool T x) : ℝ) < a) := by + classical + rw [poolLaw_prob_split T] + simp only [feasibleMass_join_eq] + have hc (x : ExposedAssignment (F := F) T) : + (FiniteLaw.uniform (FreshAssignment (F := F) T)).prob + (fun _ => (feasibleMass data I T (frozenPool T x) : ℝ) < a) = + if (feasibleMass data I T (frozenPool T x) : ℝ) < a then 1 else 0 := by + split_ifs with hx <;> simp [hx] + simp_rw [hc] + exact ((FiniteLaw.uniform (ExposedAssignment (F := F) T)).prob_eq_expectation _).symm + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/Forbidden.lean b/lean/OAI/Combinatorics/Ryser/Selection/Forbidden.lean new file mode 100644 index 0000000000000000000000000000000000000000..93eae09e03779805ee890ad7834bd2ed4ef858bd --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/Forbidden.lean @@ -0,0 +1,105 @@ +import OAI.Combinatorics.Ryser.Selection.Definitions +import OAI.Combinatorics.Ryser.Geometry.Cardinality +import OAI.Combinatorics.Ryser.Probability.Finite +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +namespace OAI + +open scoped BigOperators +namespace RyserCoveringCounterexample.Selection + +variable {F : Type*} [Field F] [instFintypeF : Fintype F] [DecidableEq F] {n K : ℕ} + +theorem uniform_prob_projection (d : Direction F) (c : F) : + (FiniteLaw.uniform (Point F)).prob (fun b => projection d b = c) = + 1 / (Fintype.card F : ℝ) := by + classical + rw [FiniteLaw.uniform_prob] + calc + _ = ((linePoints (d, c)).card : ℝ) / (Fintype.card (Point F) : ℝ) := by + apply congrArg (fun T : Finset (Point F) => + (T.card : ℝ) / (Fintype.card (Point F) : ℝ)) + ext b + simp only [Finset.mem_filter, Finset.mem_univ, true_and, mem_linePoints, Incidence] + _ = _ := by + rw [card_linePoints, card_point, Nat.cast_pow] + have hq : (Fintype.card F : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr Fintype.card_ne_zero + field_simp + +abbrev EquationIndex (data : Data F n) (i j : Fin n) := + ↥(data.W i) × ↥(data.W j) × ↥(data.dirs i ∪ data.dirs j) + +def equationEvent (data : Data F n) (i j : Fin n) (b' : Point F) + (e : EquationIndex data i j) (b : Point F) : Prop := + projection e.2.2.val b = projection e.2.2.val b' + + projection e.2.2.val (e.2.1.val - e.1.val) + +theorem conflict_iff_equation (data : Data F n) (i j : Fin n) (b b' : Point F) : + Conflict data i j b b' ↔ ∃ e : EquationIndex data i j, equationEvent data i j b' e b := let _ := instFintypeF; by + rw [conflict_iff_forbidden] + constructor + · rintro ⟨u, hu, v, hv, d, hd, h⟩ + exact ⟨(⟨u, hu⟩, ⟨v, hv⟩, ⟨d, hd⟩), h⟩ + · rintro ⟨⟨u, v, d⟩, h⟩ + exact ⟨u.val, u.property, v.val, v.property, d.val, d.property, h⟩ + +theorem card_equationIndex_le {D : ℕ} (data : Data F n) (hdata : Bounded D data) + (i j : Fin n) : Fintype.card (EquationIndex data i j) ≤ 2 * D ^ 3 := by + have hdirs : (data.dirs i ∪ data.dirs j).card ≤ D + D := + (Finset.card_union_le _ _).trans (Nat.add_le_add (hdata.2.2.1 i) (hdata.2.2.1 j)) + calc + Fintype.card (EquationIndex data i j) = + (data.W i).card * ((data.W j).card * (data.dirs i ∪ data.dirs j).card) := by + simp only [EquationIndex, Fintype.card_prod, Fintype.card_coe] + _ ≤ D * (D * (D + D)) := + Nat.mul_le_mul (hdata.2.1 i) (Nat.mul_le_mul (hdata.2.1 j) hdirs) + _ = 2 * D ^ 3 := by ring + +theorem prob_conflict_le {D : ℕ} (data : Data F n) (hdata : Bounded D data) + (i j : Fin n) (b' : Point F) : + (FiniteLaw.uniform (Point F)).prob (fun b => Conflict data i j b b') ≤ + (2 * (D : ℝ) ^ 3) / (Fintype.card F : ℝ) := by + classical + have hP : (fun b => Conflict data i j b b') = + (fun b => ∃ e : EquationIndex data i j, equationEvent data i j b' e b) := by + funext b + exact propext (conflict_iff_equation data i j b b') + rw [hP] + calc + _ ≤ ∑ e : EquationIndex data i j, + (FiniteLaw.uniform (Point F)).prob (equationEvent data i j b' e) := + FiniteLaw.prob_exists_le _ _ + _ = (Fintype.card (EquationIndex data i j) : ℝ) / (Fintype.card F : ℝ) := by + calc + _ = ∑ _e : EquationIndex data i j, 1 / (Fintype.card F : ℝ) := by + apply Finset.sum_congr rfl + intro e _ + exact uniform_prob_projection e.2.2.val + (projection e.2.2.val b' + projection e.2.2.val (e.2.1.val - e.1.val)) + _ = _ := by simp [div_eq_mul_inv] + _ ≤ (2 * (D : ℝ) ^ 3) / (Fintype.card F : ℝ) := by + apply div_le_div_of_nonneg_right _ (Nat.cast_nonneg _) + exact_mod_cast card_equationIndex_le data hdata i j + +theorem prob_not_feasible_le {D : ℕ} (data : Data F n) (hdata : Bounded D data) + (T : Finset (Position n K)) (pool : Pool F n K) (i : Fin n) : + (FiniteLaw.uniform (Point F)).prob (fun b => ¬Feasible data T pool i b) ≤ + (T.card : ℝ) * ((2 * (D : ℝ) ^ 3) / (Fintype.card F : ℝ)) := by + classical + have hP : (fun b => ¬Feasible data T pool i b) = + (fun b => ∃ e : ↥T, Conflict data i e.val.1 b (pool e.val)) := by + funext b + simp [Feasible] + rw [hP] + calc + _ ≤ ∑ e : ↥T, (FiniteLaw.uniform (Point F)).prob + (fun b => Conflict data i e.val.1 b (pool e.val)) := + FiniteLaw.prob_exists_le _ _ + _ ≤ ∑ _e : ↥T, ((2 * (D : ℝ) ^ 3) / (Fintype.card F : ℝ)) := + Finset.sum_le_sum (fun e _ => prob_conflict_le data hdata i e.val.1 (pool e.val)) + _ = _ := by simp + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/IndependentTail.lean b/lean/OAI/Combinatorics/Ryser/Selection/IndependentTail.lean new file mode 100644 index 0000000000000000000000000000000000000000..d13278a887782197d9a789ac0ba6f8ea4e50d3b8 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/IndependentTail.lean @@ -0,0 +1,94 @@ +import OAI.Combinatorics.Ryser.Probability.Product +import OAI.Combinatorics.Ryser.Probability.Variance +import Mathlib.Data.Finset.Powerset +import Mathlib.Algebra.Order.BigOperators.GroupWithZero.Finset + +namespace OAI + +open scoped BigOperators +noncomputable section +attribute [local instance] Classical.propDecidable + +namespace RyserCoveringCounterexample.Selection + +variable {Ω A : Type*} [Fintype Ω] + +theorem prob_exists_mem_le (mu : FiniteLaw Ω) (S : Finset A) + (P : A → Ω → Prop) : + mu.prob (fun x => ∃ a ∈ S, P a x) ≤ ∑ a ∈ S, mu.prob (P a) := by + classical + calc + _ ≤ mu.expectation (fun x => ∑ a ∈ S, if P a x then (1 : ℝ) else 0) := by + apply mu.prob_le_expectation + · intro x + exact Finset.sum_nonneg (fun a _ => by by_cases h : P a x <;> simp [h]) + · rintro x ⟨a, ha, hax⟩ + calc + 1 = (if P a x then (1 : ℝ) else 0) := by rw [ite_eq_left hax] + _ ≤ ∑ b ∈ S, if P b x then (1 : ℝ) else 0 := + Finset.single_le_sum (f := fun b => if P b x then (1 : ℝ) else 0) (fun b _ => by by_cases h : P b x <;> simp [h]) ha + _ = ∑ a ∈ S, mu.prob (P a) := by + rw [FiniteLaw.expectation_finset_sum] + simp_rw [← FiniteLaw.prob_eq_expectation] + +variable {E : Type*} [Fintype E] [DecidableEq E] + {X : E → Type*} [∀ e, Fintype (X e)] + +theorem prob_pi_forall_mem (mu : ∀ e, FiniteLaw (X e)) + (S : Finset E) (P : ∀ e, X e → Prop) : + (FiniteLaw.pi mu).prob (fun x => ∀ e ∈ S, P e (x e)) = + ∏ e ∈ S, (mu e).prob (P e) := by + classical + rw [FiniteLaw.prob_pi mu (fun e x => e ∈ S → P e x)] + have hterm (e : E) : (mu e).prob (fun x => e ∈ S → P e x) = + if e ∈ S then (mu e).prob (P e) else 1 := by + by_cases he : e ∈ S <;> simp [he] + simp_rw [hterm] + rw [← Finset.prod_filter] + simp + +theorem prob_many_coordinate_events_le (mu : ∀ e, FiniteLaw (X e)) + (S : Finset E) (P : ∀ e, X e → Prop) (r : ℕ) (p : ℝ) + (hp : 0 ≤ p) (hP : ∀ e ∈ S, (mu e).prob (P e) ≤ p) : + (FiniteLaw.pi mu).prob (fun x => r ≤ (S.filter (fun e => P e (x e))).card) ≤ + (2 : ℝ) ^ S.card * p ^ r := by + classical + have hsubset (x : ∀ e, X e) + (hx : r ≤ (S.filter (fun e => P e (x e))).card) : + ∃ T ∈ S.powersetCard r, ∀ e ∈ T, P e (x e) := by + obtain ⟨T, hT, hcard⟩ := Finset.exists_subset_card_eq hx + refine ⟨T, Finset.mem_powersetCard.mpr ⟨?_, hcard⟩, ?_⟩ + · exact fun e he => (Finset.mem_filter.mp (hT he)).1 + · exact fun e he => (Finset.mem_filter.mp (hT he)).2 + have hproduct (T : Finset E) (hT : T ∈ S.powersetCard r) : + (FiniteLaw.pi mu).prob (fun x => ∀ e ∈ T, P e (x e)) ≤ p ^ r := by + rcases Finset.mem_powersetCard.mp hT with ⟨hTS, hcard⟩ + rw [prob_pi_forall_mem] + calc + (∏ e ∈ T, (mu e).prob (P e)) ≤ ∏ _e ∈ T, p := by + apply Finset.prod_le_prod₀ + · exact fun e _ => (mu e).prob_nonneg (P e) + · exact fun e he => hP e (hTS he) + _ = p ^ r := by simp [hcard] + have hcount : (S.powersetCard r).card ≤ 2 ^ S.card := by + rw [← Finset.card_powerset] + apply Finset.card_le_card + intro T hT + exact Finset.mem_powerset.mpr (Finset.mem_powersetCard.mp hT).1 + calc + _ ≤ (FiniteLaw.pi mu).prob + (fun x => ∃ T ∈ S.powersetCard r, ∀ e ∈ T, P e (x e)) := + (FiniteLaw.pi mu).prob_mono hsubset + _ ≤ ∑ T ∈ S.powersetCard r, + (FiniteLaw.pi mu).prob (fun x => ∀ e ∈ T, P e (x e)) := + prob_exists_mem_le _ _ _ + _ ≤ ∑ _T ∈ S.powersetCard r, p ^ r := Finset.sum_le_sum hproduct + _ = ((S.powersetCard r).card : ℝ) * p ^ r := by simp + _ ≤ (2 : ℝ) ^ S.card * p ^ r := + mul_le_mul_of_nonneg_right (by exact_mod_cast hcount) (pow_nonneg hp _) + +end RyserCoveringCounterexample.Selection + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/KChoice.lean b/lean/OAI/Combinatorics/Ryser/Selection/KChoice.lean new file mode 100644 index 0000000000000000000000000000000000000000..f9d2d3264982ffaefd0e039dd4df9e7033f36372 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/KChoice.lean @@ -0,0 +1,68 @@ +import OAI.Combinatorics.Ryser.Selection.AnalyticalLimits +import Mathlib.Analysis.SpecificLimits.Normed +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Ring + +namespace OAI + +open Filter Topology + +namespace RyserCoveringCounterexample.Selection + +theorem tendsto_small_certificate_coefficient (A : ℝ) : + Tendsto (fun K : ℕ => A * (K : ℝ) ^ 2 * (1 / 2 : ℝ) ^ (K - 3)) + atTop (𝓝 0) := by + have hbase : Tendsto + (fun K : ℕ => (8 * A) * ((K : ℝ) ^ 2 * (1 / 2 : ℝ) ^ K)) + atTop (𝓝 0) := by + simpa only [mul_zero] using + (tendsto_pow_const_mul_const_pow_of_lt_one 2 + (by norm_num : (0 : ℝ) ≤ 1 / 2) (by norm_num : (1 / 2 : ℝ) < 1)).const_mul + (8 * A) + refine hbase.congr' ?_ + filter_upwards [eventually_ge_atTop (3 : ℕ)] with K hK + have hpow : (1 / 2 : ℝ) ^ (K - 3) = 8 * (1 / 2 : ℝ) ^ K := by + rw [pow_sub₀ (1 / 2 : ℝ) (by norm_num) hK] + norm_num + ring + rw [hpow] + ring + +theorem tendsto_large_certificate_coefficient (B : ℝ) {δ : ℝ} (hδ : 0 < δ) : + Tendsto (fun K : ℕ => B * (K : ℝ) ^ 2 * Real.exp (2 - (K : ℝ) * δ)) + atTop (𝓝 0) := by + have hbase : Tendsto + (fun K : ℕ => (B * Real.exp 2) * + ((K : ℝ) ^ 2 * Real.exp (-δ * (K : ℝ)))) + atTop (𝓝 0) := by + simpa only [mul_zero] using + (tendsto_nat_pow_mul_exp_neg_mul 2 hδ).const_mul (B * Real.exp 2) + refine hbase.congr' (Eventually.of_forall fun K : ℕ => ?_) + change (B * Real.exp 2) * ((K : ℝ) ^ 2 * Real.exp (-δ * (K : ℝ))) = + B * (K : ℝ) ^ 2 * Real.exp (2 - (K : ℝ) * δ) + have hexponent : 2 - (K : ℝ) * δ = 2 + (-δ * (K : ℝ)) := by ring + rw [hexponent, Real.exp_add] + ring + +theorem exists_pool_size (A B : ℝ) {δ : ℝ} (hδ : 0 < δ) : + ∃ K : ℕ, 6 ≤ K ∧ + A * (K : ℝ) ^ 2 * (1 / 2 : ℝ) ^ (K - 3) ≤ 1 / 2 ∧ + B * (K : ℝ) ^ 2 * Real.exp (2 - (K : ℝ) * δ) < 1 / 2 := by + have hsmall : ∀ᶠ K : ℕ in atTop, + A * (K : ℝ) ^ 2 * (1 / 2 : ℝ) ^ (K - 3) < 1 / 2 := + (tendsto_small_certificate_coefficient A).eventually + (eventually_lt_nhds (by norm_num : (0 : ℝ) < 1 / 2)) + have hlarge : ∀ᶠ K : ℕ in atTop, + B * (K : ℝ) ^ 2 * Real.exp (2 - (K : ℝ) * δ) < 1 / 2 := + (tendsto_large_certificate_coefficient B hδ).eventually + (eventually_lt_nhds (by norm_num : (0 : ℝ) < 1 / 2)) + have hboth : ∀ᶠ K : ℕ in atTop, 6 ≤ K ∧ + A * (K : ℝ) ^ 2 * (1 / 2 : ℝ) ^ (K - 3) ≤ 1 / 2 ∧ + B * (K : ℝ) ^ 2 * Real.exp (2 - (K : ℝ) * δ) < 1 / 2 := by + filter_upwards [eventually_ge_atTop (6 : ℕ), hsmall, hlarge] with K hK hs hl + exact ⟨hK, hs.le, hl⟩ + exact hboth.exists + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/LargeCertificates.lean b/lean/OAI/Combinatorics/Ryser/Selection/LargeCertificates.lean new file mode 100644 index 0000000000000000000000000000000000000000..bb3ff92554faf4ef5aa7dfc7a2057422f4c0848e --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/LargeCertificates.lean @@ -0,0 +1,71 @@ +import OAI.Combinatorics.Ryser.Selection.FeasibleDensity +import OAI.Combinatorics.Ryser.Selection.PoolCounts +import OAI.Combinatorics.Ryser.Selection.UnusedProduct + +namespace OAI + +open scoped BigOperators +noncomputable section + +namespace RyserCoveringCounterexample.Selection + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] {n K : ℕ} + +theorem sum_fresh_feasibleDensity_ge (data : Data F n) (I : Finset (Fin n)) + (T : Finset (Position n K)) (pool : Pool F n K) (δ : ℝ) + (hT : T ⊆ targetPositions I K) (hcard : T.card ≤ 2 * I.card) + (hdensity : δ * (I.card : ℝ) * (Fintype.card F : ℝ) ^ 2 ≤ + (feasibleMass data I T pool : ℝ)) : + ((K : ℝ) * δ - 2) * I.card ≤ + ∑ e ∈ freshTargets I T, feasibleDensity data T pool e.val.1 := by + have hq : (0 : ℝ) < Fintype.card F := by exact_mod_cast Fintype.card_pos + have hmass : δ * (I.card : ℝ) ≤ ∑ i ∈ I, feasibleDensity data T pool i := by + rw [sum_feasibleDensity] + exact (le_div_iff₀ (pow_pos hq 2)).mpr hdensity + have hcount : (∑ i ∈ I, (exposedCount T i : ℝ)) ≤ 2 * (I.card : ℝ) := by + have hnat : (∑ i ∈ I, exposedCount T i) ≤ 2 * I.card := by + rw [sum_exposedCount hT] + exact hcard + exact_mod_cast hnat + rw [sum_freshTargets] + exact unused_weight_ge I (feasibleDensity data T pool) (exposedCount T) K δ I.card + (fun i _ => feasibleDensity_le_one data T pool i) + (fun i _ => exposedCount_le T i) hmass hcount + +theorem prob_noFeasibleOutside_join_le_of_density (data : Data F n) + (I : Finset (Fin n)) (T : Finset (Position n K)) + (x : ExposedAssignment (F := F) T) (δ : ℝ) + (hT : T ⊆ targetPositions I K) (hcard : T.card ≤ 2 * I.card) + (hdensity : δ * (I.card : ℝ) * (Fintype.card F : ℝ) ^ 2 ≤ + (feasibleMass data I T (frozenPool T x) : ℝ)) : + (FiniteLaw.uniform (FreshAssignment (F := F) T)).prob + (fun y => NoFeasibleOutside data I T (joinAssignments T x y)) ≤ + Real.exp (-(((K : ℝ) * δ - 2) * I.card)) := by + have hsum := sum_fresh_feasibleDensity_ge data I T (frozenPool T x) δ + hT hcard hdensity + refine (prob_noFeasibleOutside_join_le_exp_neg_sum data I T x).trans ?_ + exact Real.exp_le_exp.mpr (neg_le_neg hsum) + +theorem prob_noFeasibleOutside_le_density_bad_add_exp (data : Data F n) + (I : Finset (Fin n)) (T : Finset (Position n K)) (δ : ℝ) + (hT : T ⊆ targetPositions I K) (hcard : T.card ≤ 2 * I.card) : + (poolLaw F n K).prob (NoFeasibleOutside data I T) ≤ + (poolLaw F n K).prob (fun pool => + (feasibleMass data I T pool : ℝ) < + δ * (I.card : ℝ) * (Fintype.card F : ℝ) ^ 2) + + Real.exp (-(((K : ℝ) * δ - 2) * I.card)) := by + have hsplit := poolLaw_prob_split_le_bad T (NoFeasibleOutside data I T) + (fun x => (feasibleMass data I T (frozenPool T x) : ℝ) < + δ * (I.card : ℝ) * (Fintype.card F : ℝ) ^ 2) + (Real.exp (-(((K : ℝ) * δ - 2) * I.card))) (Real.exp_pos _).le + (fun x hx => prob_noFeasibleOutside_join_le_of_density data I T x δ hT hcard + (le_of_not_gt hx)) + rw [← prob_feasibleMass_lt_eq_exposed data I T + (δ * (I.card : ℝ) * (Fintype.card F : ℝ) ^ 2)] at hsplit + exact hsplit + +end RyserCoveringCounterexample.Selection + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/LayerBounds.lean b/lean/OAI/Combinatorics/Ryser/Selection/LayerBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..3fb2f237edbb517948335f7963c63eb4b0a1d740 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/LayerBounds.lean @@ -0,0 +1,91 @@ +import OAI.Combinatorics.Ryser.Selection.SmallSum +import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Algebra.Order.Floor.Semiring + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Selection + +theorem sum_powers_le_positive_index_bound (T : Finset ℕ) (N : ℕ) (B : ℝ) + (hB : 0 ≤ B) (hpositive : ∀ m ∈ T, 1 ≤ m) + (hsize : ∀ m ∈ T, m ≤ N) : + (∑ m ∈ T, B ^ m) ≤ (N : ℝ) * (max 1 B) ^ N := by + have hsub : T ⊆ Finset.Icc 1 N := by + intro m hm + exact Finset.mem_Icc.mpr ⟨hpositive m hm, hsize m hm⟩ + have hcard : T.card ≤ N := by + simpa only [Nat.card_Icc, Nat.add_sub_cancel] using Finset.card_le_card hsub + have hmax0 : (0 : ℝ) ≤ max 1 B := (by norm_num : (0 : ℝ) ≤ 1).trans (le_max_left _ _) + calc + (∑ m ∈ T, B ^ m) ≤ ∑ _m ∈ T, (max 1 B) ^ N := by + apply Finset.sum_le_sum + intro m hm + exact (pow_le_pow_left₀ hB (le_max_right 1 B) m).trans + (pow_le_pow_right₀ (le_max_left 1 B) (hsize m hm)) + _ = (T.card : ℝ) * (max 1 B) ^ N := by + simp only [Finset.sum_const, nsmul_eq_mul] + _ ≤ (N : ℝ) * (max 1 B) ^ N := + mul_le_mul_of_nonneg_right (Nat.cast_le.mpr hcard) (pow_nonneg hmax0 N) + +theorem weighted_unused_error_eq_power (B δ : ℝ) (K m : ℕ) : + B ^ m * Real.exp (-(((K : ℝ) * δ - 2) * (m : ℝ))) = + (B * Real.exp (2 - (K : ℝ) * δ)) ^ m := by + have hexponent : -(((K : ℝ) * δ - 2) * (m : ℝ)) = + (m : ℝ) * (2 - (K : ℝ) * δ) := by ring + rw [hexponent, Real.exp_nat_mul, mul_pow] + +theorem large_layer_sum_le (T : Finset ℕ) (D K q : ℕ) (B J c c1 δ : ℝ) + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hc1 : 0 < c1) + (hpositive : ∀ m ∈ T, 1 ≤ m) + (hsize : ∀ m ∈ T, m ≤ D * q) + (hlarge : ∀ m ∈ T, c1 * (q : ℝ) < (m : ℝ)) + (hratio : B * Real.exp (2 - (K : ℝ) * δ) ≤ 1 / 2) : + (∑ m ∈ T, B ^ m * + (J * Real.exp (-c * (q : ℝ) * Real.log (q : ℝ)) + + Real.exp (-(((K : ℝ) * δ - 2) * (m : ℝ))))) ≤ + J * ((D : ℝ) * (q : ℝ)) * (max 1 B) ^ (D * q) * + Real.exp (-c * (q : ℝ) * Real.log (q : ℝ)) + + (1 / 2 : ℝ) ^ Nat.floor (c1 * (q : ℝ)) := by + have hdensity : + (∑ m ∈ T, B ^ m * (J * Real.exp (-c * (q : ℝ) * Real.log (q : ℝ)))) ≤ + J * ((D : ℝ) * (q : ℝ)) * (max 1 B) ^ (D * q) * + Real.exp (-c * (q : ℝ) * Real.log (q : ℝ)) := by + calc + _ = (∑ m ∈ T, B ^ m) * + (J * Real.exp (-c * (q : ℝ) * Real.log (q : ℝ))) := by + rw [Finset.sum_mul] + _ ≤ ((D * q : ℕ) : ℝ) * (max 1 B) ^ (D * q) * + (J * Real.exp (-c * (q : ℝ) * Real.log (q : ℝ))) := + mul_le_mul_of_nonneg_right + (sum_powers_le_positive_index_bound T (D * q) B hB hpositive hsize) + (mul_nonneg hJ (Real.exp_pos _).le) + _ = _ := by + rw [Nat.cast_mul] + ring + have hratio0 : 0 ≤ B * Real.exp (2 - (K : ℝ) * δ) := + mul_nonneg hB (Real.exp_pos _).le + have hunused : + (∑ m ∈ T, B ^ m * Real.exp (-(((K : ℝ) * δ - 2) * (m : ℝ)))) ≤ + (1 / 2 : ℝ) ^ Nat.floor (c1 * (q : ℝ)) := by + calc + _ = ∑ m ∈ T, (B * Real.exp (2 - (K : ℝ) * δ)) ^ m := by + apply Finset.sum_congr rfl + intro m _ + exact weighted_unused_error_eq_power B δ K m + _ ≤ ∑ m ∈ T, (1 / 2 : ℝ) ^ m := + Finset.sum_le_sum (fun m _ => pow_le_pow_left₀ hratio0 hratio m) + _ ≤ (1 / 2 : ℝ) ^ Nat.floor (c1 * (q : ℝ)) := by + apply sum_half_pow_le_cutoff + intro m hm + exact (Nat.floor_lt (mul_nonneg hc1.le (Nat.cast_nonneg q))).mpr (hlarge m hm) + calc + _ = (∑ m ∈ T, B ^ m * (J * Real.exp (-c * (q : ℝ) * Real.log (q : ℝ)))) + + ∑ m ∈ T, B ^ m * Real.exp (-(((K : ℝ) * δ - 2) * (m : ℝ))) := by + simp only [mul_add, Finset.sum_add_distrib] + _ ≤ _ := add_le_add hdensity hunused + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/LayerNormalization.lean b/lean/OAI/Combinatorics/Ryser/Selection/LayerNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..b77da6d91dbd560f4e5c306b9919ccffcbb0c225 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/LayerNormalization.lean @@ -0,0 +1,76 @@ +import Mathlib.Analysis.Complex.Exponential +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Ring +import Lean.Elab.Tactic.Omega + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +theorem small_layer_coefficient_identity (m K : ℕ) (C D q : ℝ) + (hm : 0 < m) (hK : 3 ≤ K) (hq : 0 < q) : + (((Real.exp 1 * D * q / (m : ℝ)) ^ m * (3 * (K : ℝ) ^ 2) ^ m) * + (2 * C * (m : ℝ) / q) ^ ((K - 2) * m)) = + ((6 * C * Real.exp 1 * D * (K : ℝ) ^ 2) * + (2 * C * (m : ℝ) / q) ^ (K - 3)) ^ m := by + have hmreal : (0 : ℝ) < (m : ℝ) := Nat.cast_pos.mpr hm + have hshift : K - 2 = (K - 3) + 1 := by omega + have hcancel : + ((Real.exp 1 * D * q / (m : ℝ)) * (3 * (K : ℝ) ^ 2)) * + (2 * C * (m : ℝ) / q) = + 6 * C * Real.exp 1 * D * (K : ℝ) ^ 2 := by + field_simp [hmreal.ne', hq.ne'] + ring + have hbase : + ((Real.exp 1 * D * q / (m : ℝ)) * (3 * (K : ℝ) ^ 2)) * + (2 * C * (m : ℝ) / q) ^ (K - 2) = + (6 * C * Real.exp 1 * D * (K : ℝ) ^ 2) * + (2 * C * (m : ℝ) / q) ^ (K - 3) := by + rw [hshift, pow_succ (2 * C * (m : ℝ) / q) (K - 3)] + calc + _ = (((Real.exp 1 * D * q / (m : ℝ)) * (3 * (K : ℝ) ^ 2)) * + (2 * C * (m : ℝ) / q)) * + (2 * C * (m : ℝ) / q) ^ (K - 3) := by ring + _ = _ := by rw [hcancel] + calc + _ = (((Real.exp 1 * D * q / (m : ℝ)) * (3 * (K : ℝ) ^ 2)) * + (2 * C * (m : ℝ) / q) ^ (K - 2)) ^ m := by + simp only [mul_pow, pow_mul] + _ = _ := by rw [hbase] + +theorem large_layer_count_le (m K : ℕ) (D q c1 : ℝ) + (hm : 0 < m) (hD : 0 ≤ D) (hq : 0 < q) (hc1 : 0 < c1) + (hlarge : c1 * q < (m : ℝ)) : + (Real.exp 1 * D * q / (m : ℝ)) ^ m * (3 * (K : ℝ) ^ 2) ^ m ≤ + ((Real.exp 1 * D / c1) * 3 * (K : ℝ) ^ 2) ^ m := by + have hmreal : (0 : ℝ) < (m : ℝ) := Nat.cast_pos.mpr hm + have hDexp : 0 ≤ Real.exp 1 * D := mul_nonneg (Real.exp_pos 1).le hD + have hratio0 : 0 ≤ Real.exp 1 * D * q / (m : ℝ) := + div_nonneg (mul_nonneg hDexp hq.le) hmreal.le + have hcutoff0 : 0 ≤ Real.exp 1 * D / c1 := div_nonneg hDexp hc1.le + have hratio : Real.exp 1 * D * q / (m : ℝ) ≤ Real.exp 1 * D / c1 := by + apply (div_le_iff₀ hmreal).mpr + calc + Real.exp 1 * D * q = (Real.exp 1 * D / c1) * (c1 * q) := by + field_simp [hc1.ne'] + + _ ≤ (Real.exp 1 * D / c1) * (m : ℝ) := + mul_le_mul_of_nonneg_left hlarge.le hcutoff0 + have hpool0 : 0 ≤ 3 * (K : ℝ) ^ 2 := + mul_nonneg (by norm_num) (sq_nonneg _) + have hcoefficient : + (Real.exp 1 * D * q / (m : ℝ)) * (3 * (K : ℝ) ^ 2) ≤ + (Real.exp 1 * D / c1) * (3 * (K : ℝ) ^ 2) := + mul_le_mul_of_nonneg_right hratio hpool0 + calc + _ = ((Real.exp 1 * D * q / (m : ℝ)) * (3 * (K : ℝ) ^ 2)) ^ m := + (mul_pow _ _ m).symm + _ ≤ ((Real.exp 1 * D / c1) * (3 * (K : ℝ) ^ 2)) ^ m := + pow_le_pow_left₀ (mul_nonneg hratio0 hpool0) hcoefficient m + _ = _ := by rw [mul_assoc] + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/Main.lean b/lean/OAI/Combinatorics/Ryser/Selection/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..5304efab8ef9e5ef29afb190f6dd9b12d1b59056 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/Main.lean @@ -0,0 +1,51 @@ +import OAI.Combinatorics.Ryser.Selection.Quantitative +import OAI.Combinatorics.Ryser.Selection.Parameters +import OAI.Combinatorics.Ryser.Selection.NumericLimits +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum + +namespace OAI + +universe u + +namespace RyserCoveringCounterexample.Selection + +theorem compatible_selection_uniform (D : ℕ) (hD : 1 ≤ D) : + ∃ K : ℕ, 6 ≤ K ∧ + ∀ ε : ℝ, 0 < ε → ∃ Q : ℕ, + ∀ (F : Type u) [Field F] [Fintype F] [DecidableEq F] + (n : ℕ) (data : Data F n), + Bounded D data → Q ≤ Fintype.card F → + 1 - ε ≤ (poolLaw F n K).prob + (fun pool => HasCompatibleChoice data pool) := by + classical + obtain ⟨K, hK, hsmall, hlarge⟩ := exists_selection_pool_size D + refine ⟨K, hK, ?_⟩ + intro ε hε + obtain ⟨Q0, hQ0⟩ := + exists_threshold_selection_failure_bound.{u} D hD K hK hsmall hlarge.le + have hK3 : 3 < K := lt_of_lt_of_le (by norm_num : 3 < 6) hK + have hB : (0 : ℝ) < max 1 (selectionLargeCoefficient D K) := + lt_of_lt_of_le zero_lt_one (le_max_left _ _) + obtain ⟨R, _hR, Q1, hQ1⟩ := + exists_cutoff_threshold_selectionFailureBound D K + (selectionSmallCoefficient D K) + (max 1 (selectionLargeCoefficient D K)) + (equationBound D) + (densityChunkCount D : ℝ) + (densityRate D) + (selectionCutoff D) + hK3 hB (densityRate_pos D hD) (selectionCutoff_pos D hD) hε + refine ⟨max Q0 Q1, ?_⟩ + intro F _ _ _ n data hdata hq + have hq0 : Q0 ≤ Fintype.card F := (le_max_left _ _).trans hq + have hq1 : Q1 ≤ Fintype.card F := (le_max_right _ _).trans hq + have hfailure : + (poolLaw F n K).prob (fun pool => ¬HasCompatibleChoice data pool) < ε := + (hQ0 F n data hdata hq0 R).trans_lt (hQ1 (Fintype.card F) hq1) + rw [(poolLaw F n K).prob_compl (fun pool => HasCompatibleChoice data pool)] at hfailure + linarith + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/NumericLimits.lean b/lean/OAI/Combinatorics/Ryser/Selection/NumericLimits.lean new file mode 100644 index 0000000000000000000000000000000000000000..0327fced5288d82ca3155b375cbf090448fb13e4 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/NumericLimits.lean @@ -0,0 +1,88 @@ +import OAI.Combinatorics.Ryser.Selection.AnalyticalLimits +import Mathlib.Tactic.NormNum + +namespace OAI + +open Filter Topology + +namespace RyserCoveringCounterexample.Selection + +theorem tendsto_small_selection_term (K R : ℕ) (A C : ℝ) (hK : 3 < K) : + Tendsto (fun q : ℕ => (R : ℝ) * A * + (2 * C * (R : ℝ) / (q : ℝ)) ^ (K - 3)) atTop (𝓝 0) := by + have hm : K - 3 ≠ 0 := (Nat.sub_pos_of_lt hK).ne' + have hratio : Tendsto (fun q : ℕ => 2 * C * (R : ℝ) / (q : ℝ)) + atTop (𝓝 0) := + (tendsto_natCast_atTop_atTop (R := ℝ)).const_div_atTop (2 * C * (R : ℝ)) + simpa only [zero_pow hm, mul_zero] using + (hratio.pow (K - 3)).const_mul ((R : ℝ) * A) + +theorem tendsto_density_selection_term (D : ℕ) (J B c : ℝ) + (hB : 0 < B) (hc : 0 < c) : + Tendsto (fun q : ℕ => J * ((D : ℝ) * (q : ℝ)) * B ^ (D * q) * + Real.exp (-c * (q : ℝ) * Real.log (q : ℝ))) atTop (𝓝 0) := by + have hlimit : Tendsto (fun q : ℕ => (J * (D : ℝ)) * ((q : ℝ) * + Real.exp (((D : ℝ) * Real.log B) * (q : ℝ) - + c * (q : ℝ) * Real.log (q : ℝ)))) atTop (𝓝 0) := by + simpa only [mul_zero] using + (tendsto_nat_mul_exp_linear_sub_mul_log hc ((D : ℝ) * Real.log B)).const_mul + (J * (D : ℝ)) + apply hlimit.congr + intro q + have hpow : B ^ (D * q) = Real.exp ((D : ℝ) * (q : ℝ) * Real.log B) := by + rw [← Nat.cast_mul, Real.exp_nat_mul, Real.exp_log hB] + have harg : ((D : ℝ) * Real.log B) * (q : ℝ) - c * (q : ℝ) * Real.log (q : ℝ) = + (D : ℝ) * (q : ℝ) * Real.log B + (-c * (q : ℝ) * Real.log (q : ℝ)) := by ring + rw [hpow, harg, Real.exp_add] + ring + +theorem tendsto_half_pow_nat_floor_mul {c1 : ℝ} (hc1 : 0 < c1) : + Tendsto (fun q : ℕ => (1 / 2 : ℝ) ^ Nat.floor (c1 * (q : ℝ))) + atTop (𝓝 0) := by + have hpow : Tendsto (fun N : ℕ => (1 / 2 : ℝ) ^ N) atTop (𝓝 0) := + tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num) (by norm_num) + simpa only [Function.comp_def] using + hpow.comp (tendsto_nat_floor_mul_atTop c1 hc1) + +noncomputable def selectionFailureBound (D K R : ℕ) (A B C J c c1 : ℝ) (q : ℕ) : ℝ := + (R : ℝ) * A * (2 * C * (R : ℝ) / (q : ℝ)) ^ (K - 3) + (1 / 2 : ℝ) ^ R + + J * ((D : ℝ) * (q : ℝ)) * B ^ (D * q) * + Real.exp (-c * (q : ℝ) * Real.log (q : ℝ)) + + (1 / 2 : ℝ) ^ Nat.floor (c1 * (q : ℝ)) + +theorem tendsto_selectionFailureBound (D K R : ℕ) (A B C J c c1 : ℝ) + (hK : 3 < K) (hB : 0 < B) (hc : 0 < c) (hc1 : 0 < c1) : + Tendsto (selectionFailureBound D K R A B C J c c1) atTop + (𝓝 ((1 / 2 : ℝ) ^ R)) := by + change Tendsto + (fun q : ℕ => + (R : ℝ) * A * (2 * C * (R : ℝ) / (q : ℝ)) ^ (K - 3) + (1 / 2 : ℝ) ^ R + + J * ((D : ℝ) * (q : ℝ)) * B ^ (D * q) * + Real.exp (-c * (q : ℝ) * Real.log (q : ℝ)) + + (1 / 2 : ℝ) ^ Nat.floor (c1 * (q : ℝ))) + atTop (𝓝 ((1 / 2 : ℝ) ^ R)) + simpa only [zero_add, add_zero] using + (((tendsto_small_selection_term K R A C hK).add_const ((1 / 2 : ℝ) ^ R)).add + (tendsto_density_selection_term D J B c hB hc)).add + (tendsto_half_pow_nat_floor_mul hc1) + +theorem exists_cutoff_threshold_selectionFailureBound (D K : ℕ) (A B C J c c1 : ℝ) + (hK : 3 < K) (hB : 0 < B) (hc : 0 < c) (hc1 : 0 < c1) + {ε : ℝ} (hε : 0 < ε) : + ∃ R : ℕ, 1 ≤ R ∧ ∃ Q : ℕ, ∀ q : ℕ, Q ≤ q → + selectionFailureBound D K R A B C J c c1 q < ε := by + have hpow : Tendsto (fun R : ℕ => (1 / 2 : ℝ) ^ R) atTop (𝓝 0) := + tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num) (by norm_num) + have hsmall : ∀ᶠ R : ℕ in atTop, (1 / 2 : ℝ) ^ R < ε := + hpow.eventually (gt_mem_nhds hε) + obtain ⟨R, hRge, hRsmall⟩ := ((eventually_ge_atTop (1 : ℕ)).and hsmall).exists + have hbound : ∀ᶠ q : ℕ in atTop, + selectionFailureBound D K R A B C J c c1 q < ε := + (tendsto_selectionFailureBound D K R A B C J c c1 hK hB hc hc1).eventually + (gt_mem_nhds hRsmall) + obtain ⟨Q, hQ⟩ := eventually_atTop.1 hbound + exact ⟨R, hRge, Q, hQ⟩ + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/Parameters.lean b/lean/OAI/Combinatorics/Ryser/Selection/Parameters.lean new file mode 100644 index 0000000000000000000000000000000000000000..18d3028b140a007e1903052e603a1ab435393027 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/Parameters.lean @@ -0,0 +1,56 @@ +import OAI.Combinatorics.Ryser.Selection.DensityConstants +import OAI.Combinatorics.Ryser.Selection.KChoice + +namespace OAI + +noncomputable section +namespace RyserCoveringCounterexample.Selection + +def selectionCutoff (D : ℕ) : ℝ := 1 / (4 * equationBound D) +def selectionSmallFactor (D : ℕ) : ℝ := 6 * equationBound D * Real.exp 1 * (D : ℝ) +def selectionLargeFactor (D : ℕ) : ℝ := (Real.exp 1 * (D : ℝ) / selectionCutoff D) * 3 +def selectionSmallCoefficient (D K : ℕ) : ℝ := selectionSmallFactor D * (K : ℝ) ^ 2 +def selectionLargeCoefficient (D K : ℕ) : ℝ := selectionLargeFactor D * (K : ℝ) ^ 2 + +theorem equationBound_pos (D : ℕ) (hD : 1 ≤ D) : 0 < equationBound D := by + have hDr : (0 : ℝ) < D := Nat.cast_pos.mpr (lt_of_lt_of_le Nat.zero_lt_one hD) + unfold equationBound + positivity + +theorem selectionCutoff_pos (D : ℕ) (hD : 1 ≤ D) : 0 < selectionCutoff D := by + unfold selectionCutoff + exact div_pos zero_lt_one (mul_pos (by norm_num) (equationBound_pos D hD)) + +theorem selectionSmallFactor_pos (D : ℕ) (hD : 1 ≤ D) : + 0 < selectionSmallFactor D := by + have hC := equationBound_pos D hD + have hDr : (0 : ℝ) < D := Nat.cast_pos.mpr (lt_of_lt_of_le Nat.zero_lt_one hD) + unfold selectionSmallFactor + positivity + +theorem selectionLargeFactor_pos (D : ℕ) (hD : 1 ≤ D) : + 0 < selectionLargeFactor D := by + have hc := selectionCutoff_pos D hD + have hDr : (0 : ℝ) < D := Nat.cast_pos.mpr (lt_of_lt_of_le Nat.zero_lt_one hD) + unfold selectionLargeFactor + positivity + +theorem selectionSmallCoefficient_nonneg (D K : ℕ) (hD : 1 ≤ D) : + 0 ≤ selectionSmallCoefficient D K := + mul_nonneg (selectionSmallFactor_pos D hD).le (sq_nonneg _) + +theorem selectionLargeCoefficient_nonneg (D K : ℕ) (hD : 1 ≤ D) : + 0 ≤ selectionLargeCoefficient D K := + mul_nonneg (selectionLargeFactor_pos D hD).le (sq_nonneg _) + +theorem exists_selection_pool_size (D : ℕ) : + ∃ K : ℕ, 6 ≤ K ∧ + selectionSmallCoefficient D K * (1 / 2 : ℝ) ^ (K - 3) ≤ 1 / 2 ∧ + selectionLargeCoefficient D K * Real.exp (2 - (K : ℝ) * densityDelta D) < 1 / 2 := + exists_pool_size (selectionSmallFactor D) (selectionLargeFactor D) (densityDelta_pos D) + +end RyserCoveringCounterexample.Selection + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/PoolCounts.lean b/lean/OAI/Combinatorics/Ryser/Selection/PoolCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..be0993264537816ee7474447cb793793d0469a48 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/PoolCounts.lean @@ -0,0 +1,166 @@ +import OAI.Combinatorics.Ryser.Selection.SmallCertificates +import Mathlib.Data.Finset.Prod + +namespace OAI + +open scoped BigOperators +namespace RyserCoveringCounterexample.Selection + +variable {n K : ℕ} + +def targetPositions (I : Finset (Fin n)) (K : ℕ) : Finset (Position n K) := + I.product Finset.univ + +@[simp] theorem mem_targetPositions {I : Finset (Fin n)} {e : Position n K} : + e ∈ targetPositions I K ↔ e.1 ∈ I := by + simp only [targetPositions, Finset.product_eq_sprod, Finset.mem_product, + Finset.mem_univ, and_true] + +@[simp] theorem card_targetPositions (I : Finset (Fin n)) (K : ℕ) : + (targetPositions I K).card = I.card * K := by + simp only [targetPositions, Finset.product_eq_sprod, Finset.card_product, + Finset.card_univ, Fintype.card_fin] + +theorem image_freshTargets_val (I : Finset (Fin n)) (T : Finset (Position n K)) : + (freshTargets I T).image (fun e => e.val) = targetPositions I K \ T := by + ext e + constructor + · intro he + obtain ⟨z, hz, rfl⟩ := Finset.mem_image.mp he + exact Finset.mem_sdiff.mpr + ⟨mem_targetPositions.mpr (Finset.mem_filter.mp hz).2, z.property⟩ + · intro he + obtain ⟨hi, hn⟩ := Finset.mem_sdiff.mp he + refine Finset.mem_image.mpr ⟨⟨e, hn⟩, ?_, rfl⟩ + simp only [freshTargets, Finset.mem_filter, Finset.mem_univ, true_and] + exact mem_targetPositions.mp hi + +theorem card_freshTargets_eq_sdiff (I : Finset (Fin n)) (T : Finset (Position n K)) : + (freshTargets I T).card = (targetPositions I K \ T).card := by + calc + (freshTargets I T).card = ((freshTargets I T).image (fun e => e.val)).card := + (Finset.card_image_of_injective _ Subtype.val_injective).symm + _ = (targetPositions I K \ T).card := congrArg Finset.card (image_freshTargets_val I T) + +theorem card_freshTargets {I : Finset (Fin n)} {T : Finset (Position n K)} + (hT : T ⊆ targetPositions I K) : + (freshTargets I T).card = I.card * K - T.card := by + rw [card_freshTargets_eq_sdiff, Finset.card_sdiff_of_subset hT, card_targetPositions] + +theorem card_freshTargets_add_card {I : Finset (Fin n)} {T : Finset (Position n K)} + (hT : T ⊆ targetPositions I K) : + (freshTargets I T).card + T.card = I.card * K := by + rw [card_freshTargets_eq_sdiff, Finset.card_sdiff_add_card_eq_card hT, + card_targetPositions] + +theorem freshTargets_card_lower {I : Finset (Fin n)} {T : Finset (Position n K)} + (hT : T ⊆ targetPositions I K) (hcard : T.card ≤ 2 * I.card) : + (K - 2) * I.card ≤ (freshTargets I T).card := by + rw [card_freshTargets hT, Nat.sub_mul, Nat.mul_comm K I.card] + exact Nat.sub_le_sub_left hcard (I.card * K) + +theorem sum_exposedCount {I : Finset (Fin n)} {T : Finset (Position n K)} + (hT : T ⊆ targetPositions I K) : + (∑ i ∈ I, exposedCount T i) = T.card := by + have hmap : (T : Set (Position n K)).MapsTo Prod.fst I := by + intro e he + exact mem_targetPositions.mp (hT he) + simpa only [exposedCount] using (Finset.card_eq_sum_card_fiberwise hmap).symm + +theorem targetPositions_eq_filter (I : Finset (Fin n)) (K : ℕ) : + targetPositions I K = Finset.univ.filter (fun e : Position n K => e.1 ∈ I) := by + ext e + simp only [mem_targetPositions, Finset.mem_filter, Finset.mem_univ, true_and] + +theorem exposedCount_le (T : Finset (Position n K)) (i : Fin n) : + exposedCount T i ≤ K := by + classical + unfold exposedCount + calc + (T.filter (fun e => e.1 = i)).card ≤ + (Finset.univ : Finset (Fin K)).card := by + refine Finset.card_le_card_of_injOn + (fun e : Position n K => e.2) ?_ ?_ + · intro e _ + exact Finset.mem_univ _ + · intro e he f hf hef + exact Prod.ext + ((Finset.mem_filter.mp he).2.trans (Finset.mem_filter.mp hf).2.symm) + hef + _ = K := by simp + +theorem card_freshTargets_fiber (I : Finset (Fin n)) + (T : Finset (Position n K)) (i : Fin n) (hi : i ∈ I) : + ((freshTargets I T).filter (fun e => e.val.1 = i)).card = + K - exposedCount T i := by + classical + let used : Finset (Fin K) := Finset.univ.filter (fun j => (i, j) ∈ T) + let unused : Finset (Fin K) := Finset.univ.filter (fun j => (i, j) ∉ T) + have hused : exposedCount T i = used.card := by + unfold exposedCount + refine Finset.card_bij (fun (e : Position n K) _ => e.2) ?_ ?_ ?_ + · intro e he + have hepair : e = (i, e.2) := + Prod.ext (Finset.mem_filter.mp he).2 rfl + have hmem : (i, e.2) ∈ T := by + rw [← hepair] + exact (Finset.mem_filter.mp he).1 + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _, hmem⟩ + · intro e he f hf hef + exact Prod.ext + ((Finset.mem_filter.mp he).2.trans (Finset.mem_filter.mp hf).2.symm) + hef + · intro j hj + refine ⟨(i, j), ?_, rfl⟩ + exact Finset.mem_filter.mpr ⟨(Finset.mem_filter.mp hj).2, rfl⟩ + have hfresh : + ((freshTargets I T).filter (fun e => e.val.1 = i)).card = unused.card := by + refine Finset.card_bij + (fun (e : {e : Position n K // e ∉ T}) _ => e.val.2) ?_ ?_ ?_ + · intro e he + have hepair : e.val = (i, e.val.2) := + Prod.ext (Finset.mem_filter.mp he).2 rfl + have hnot : (i, e.val.2) ∉ T := by + rw [← hepair] + exact e.property + exact Finset.mem_filter.mpr ⟨Finset.mem_univ _, hnot⟩ + · intro e he f hf hef + apply Subtype.ext + exact Prod.ext + ((Finset.mem_filter.mp he).2.trans (Finset.mem_filter.mp hf).2.symm) + hef + · intro j hj + have hjT : (i, j) ∉ T := (Finset.mem_filter.mp hj).2 + refine ⟨⟨(i, j), hjT⟩, ?_, rfl⟩ + refine Finset.mem_filter.mpr ⟨?_, rfl⟩ + simpa only [freshTargets, Finset.mem_filter, Finset.mem_univ, true_and] using hi + have hsplit : used.card + unused.card = K := by + simpa only [used, unused, Finset.card_univ, Fintype.card_fin] using + (Finset.card_filter_add_card_filter_not + (s := (Finset.univ : Finset (Fin K))) + (fun j : Fin K => (i, j) ∈ T)) + rw [hfresh, hused] + exact Nat.eq_sub_of_add_eq' hsplit + +theorem sum_freshTargets (I : Finset (Fin n)) + (T : Finset (Position n K)) (f : Fin n → ℝ) : + (∑ e ∈ freshTargets I T, f e.val.1) = + ∑ i ∈ I, ((K - exposedCount T i : ℕ) : ℝ) * f i := by + classical + have hmaps : ∀ e ∈ freshTargets I T, e.val.1 ∈ I := by + intro e he + exact (Finset.mem_filter.mp he).2 + calc + (∑ e ∈ freshTargets I T, f e.val.1) = + ∑ i ∈ I, ∑ e ∈ (freshTargets I T).filter (fun e => e.val.1 = i), f i := + (Finset.sum_fiberwise_of_maps_to' + (s := freshTargets I T) (t := I) + (g := fun e : {e : Position n K // e ∉ T} => e.val.1) hmaps f).symm + _ = ∑ i ∈ I, ((K - exposedCount T i : ℕ) : ℝ) * f i := by + apply Finset.sum_congr rfl + intro i hi + rw [Finset.sum_const, nsmul_eq_mul, card_freshTargets_fiber I T i hi] + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/PoolGraph.lean b/lean/OAI/Combinatorics/Ryser/Selection/PoolGraph.lean new file mode 100644 index 0000000000000000000000000000000000000000..a4f2576eb2a469936cbf71b7ff5cf964822b9170 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/PoolGraph.lean @@ -0,0 +1,112 @@ +import OAI.Combinatorics.Ryser.Selection.Definitions +import OAI.Combinatorics.Ryser.Domination.Main + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +variable {F : Type*} [Field F] [DecidableEq F] {n K : ℕ} + +def candidateGraph (data : Data F n) (pool : Pool F n K) : + Graph (Position n K) where + Adj e f := e.1 ≠ f.1 ∧ Conflict data e.1 f.1 (pool e) (pool f) + symm := ⟨fun _ _ h => ⟨Ne.symm h.1, h.2.symm⟩⟩ + loopless := ⟨fun _ h => h.1 rfl⟩ + +@[simp] theorem candidateGraph_adj (data : Data F n) (pool : Pool F n K) + (e f : Position n K) : + (candidateGraph data pool).Adj e f ↔ + e.1 ≠ f.1 ∧ Conflict data e.1 f.1 (pool e) (pool f) := Iff.rfl + +theorem compatibleChoice_of_transversal (data : Data F n) (pool : Pool F n K) + {U : Finset (Position n K)} + (hU : IsTransversalOn (candidateGraph data pool) Prod.fst Finset.univ U) : + HasCompatibleChoice data pool := by + classical + have hex (i : Fin n) : ∃ k : Fin K, (i, k) ∈ U := by + have hi : i ∈ U.image Prod.fst := by + rw [hU.2.2] + exact Finset.mem_univ i + obtain ⟨⟨j, k⟩, hjk, hji⟩ := Finset.mem_image.mp hi + change j = i at hji + subst j + exact ⟨k, hjk⟩ + let choice : Fin n → Fin K := fun i => Classical.choose (hex i) + have hchoice (i : Fin n) : (i, choice i) ∈ U := Classical.choose_spec (hex i) + refine ⟨choice, ?_⟩ + intro i j hij hconflict + exact hU.1 (i, choice i) (hchoice i) (j, choice j) (hchoice j) + ⟨hij, hconflict⟩ + +theorem transversal_of_compatibleChoice (data : Data F n) (pool : Pool F n K) + (h : HasCompatibleChoice data pool) : + ∃ U : Finset (Position n K), + IsTransversalOn (candidateGraph data pool) Prod.fst Finset.univ U := by + classical + obtain ⟨choice, hchoice⟩ := h + refine ⟨Finset.univ.image (fun i : Fin n => (i, choice i)), ?_, ?_, ?_⟩ + · intro e he f hf hadj + obtain ⟨i, _, rfl⟩ := Finset.mem_image.mp he + obtain ⟨j, _, rfl⟩ := Finset.mem_image.mp hf + exact hchoice i j hadj.1 hadj.2 + · intro e he f hf hfst + obtain ⟨i, _, rfl⟩ := Finset.mem_image.mp he + obtain ⟨j, _, rfl⟩ := Finset.mem_image.mp hf + change i = j at hfst + subst j + rfl + · apply Finset.eq_univ_iff_forall.mpr + intro i + exact Finset.mem_image.mpr ⟨(i, choice i), + Finset.mem_image.mpr ⟨i, Finset.mem_univ i, rfl⟩, rfl⟩ + +theorem transversal_iff_hasCompatibleChoice (data : Data F n) (pool : Pool F n K) : + (∃ U : Finset (Position n K), + IsTransversalOn (candidateGraph data pool) Prod.fst Finset.univ U) ↔ + HasCompatibleChoice data pool := by + constructor + · rintro ⟨U, hU⟩ + exact compatibleChoice_of_transversal data pool hU + · exact transversal_of_compatibleChoice data pool + +theorem position_fst_surjective (hK : 0 < K) : + Function.Surjective (Prod.fst : Position n K → Fin n) := + fun i => ⟨(i, ⟨0, hK⟩), rfl⟩ + +theorem not_hasCompatibleChoice_domination (data : Data F n) (pool : Pool F n K) + (hK : 0 < K) (hbad : ¬ HasCompatibleChoice data pool) : + ∃ I : Finset (Fin n), ∃ T : Finset (Position n K), I.Nonempty ∧ + T ⊆ Finset.univ.filter (fun e => e.1 ∈ I) ∧ + T.card ≤ 2 * (I.card - 1) ∧ + DominatesOn (candidateGraph data pool) Prod.fst I T := by + apply domination_of_no_transversal (candidateGraph data pool) Prod.fst + (position_fst_surjective hK) + intro htransversal + exact hbad ((transversal_iff_hasCompatibleChoice data pool).mp htransversal) + +theorem not_feasible_of_dominates (data : Data F n) (pool : Pool F n K) + {I : Finset (Fin n)} {T : Finset (Position n K)} + (hdom : DominatesOn (candidateGraph data pool) Prod.fst I T) + {e : Position n K} (he : e.1 ∈ I) (heT : e ∉ T) : + ¬ Feasible data T pool e.1 (pool e) := by + intro hfeasible + obtain ⟨f, hf, hadj⟩ := hdom e he heT + exact hfeasible f hf hadj.2 + +theorem not_hasCompatibleChoice_obstruction (data : Data F n) (pool : Pool F n K) + (hK : 0 < K) (hbad : ¬ HasCompatibleChoice data pool) : + ∃ I : Finset (Fin n), ∃ T : Finset (Position n K), I.Nonempty ∧ + T ⊆ Finset.univ.filter (fun e => e.1 ∈ I) ∧ + T.card ≤ 2 * I.card ∧ + ∀ e : Position n K, e.1 ∈ I → e ∉ T → + ¬ Feasible data T pool e.1 (pool e) := by + obtain ⟨I, T, hI, hT, hcard, hdom⟩ := + not_hasCompatibleChoice_domination data pool hK hbad + refine ⟨I, T, hI, hT, ?_, ?_⟩ + · exact hcard.trans (Nat.mul_le_mul_left 2 (Nat.sub_le I.card 1)) + · intro e he heT + exact not_feasible_of_dominates data pool hdom he heT + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/PoolLaw.lean b/lean/OAI/Combinatorics/Ryser/Selection/PoolLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..e7d5edcda167aec55c0c34445496bac342f44bf5 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/PoolLaw.lean @@ -0,0 +1,93 @@ +import OAI.Combinatorics.Ryser.Selection.Definitions +import OAI.Combinatorics.Ryser.Probability.Product + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +variable (F : Type*) [instFieldF : Field F] [instFintypeF : Fintype F] [instDecidableEqF : DecidableEq F] (n K : ℕ) + +noncomputable def poolLaw : FiniteLaw (Pool F n K) := + FiniteLaw.pi (fun _ : Position n K => FiniteLaw.uniform (Point F)) + +theorem poolLaw_eq_uniform : poolLaw F n K = FiniteLaw.uniform (Pool F n K) := let _ := instDecidableEqF; + FiniteLaw.pi_uniform + +variable {F n K} + +abbrev ExposedAssignment (T : Finset (Position n K)) := + {e : Position n K // e ∈ T} → Point F + +abbrev FreshAssignment (T : Finset (Position n K)) := + {e : Position n K // e ∉ T} → Point F + +def joinAssignments (T : Finset (Position n K)) + (x : ExposedAssignment (F := F) T) (y : FreshAssignment (F := F) T) : + Pool F n K := + (Equiv.piEquivPiSubtypeProd (fun e : Position n K => e ∈ T) + (fun _ => Point F)).symm (x, y) + +@[simp] theorem joinAssignments_exposed (T : Finset (Position n K)) + (x : ExposedAssignment (F := let _ := instFieldF; let _ := instFintypeF; let _ := instDecidableEqF; F) T) (y : FreshAssignment (F := F) T) + (e : {e : Position n K // e ∈ T}) : joinAssignments T x y e.val = x e := by + simp [joinAssignments, Equiv.piEquivPiSubtypeProd, e.property] + +@[simp] theorem joinAssignments_fresh (T : Finset (Position n K)) + (x : ExposedAssignment (F := let _ := instFieldF; let _ := instFintypeF; let _ := instDecidableEqF; F) T) (y : FreshAssignment (F := F) T) + (e : {e : Position n K // e ∉ T}) : joinAssignments T x y e.val = y e := by + simp [joinAssignments, Equiv.piEquivPiSubtypeProd, e.property] + +def frozenPool (T : Finset (Position n K)) (x : ExposedAssignment (F := F) T) : + Pool F n K := joinAssignments T x (fun _ => 0) + +theorem feasible_join_iff (data : Data F n) (T : Finset (Position n K)) + (x : ExposedAssignment (F := F) T) (y : FreshAssignment (F := F) T) + (i : Fin n) (b : Point F) : + Feasible data T (joinAssignments T x y) i b ↔ + Feasible data T (frozenPool T x) i b := by + apply feasible_congr + intro e he + change joinAssignments T x y (⟨e, he⟩ : {e // e ∈ T}).val = + joinAssignments T x (fun _ => 0) (⟨e, he⟩ : {e // e ∈ T}).val + rw [joinAssignments_exposed, joinAssignments_exposed] + +theorem poolLaw_prob_split (T : Finset (Position n K)) (P : Pool F n K → Prop) : + (poolLaw F n K).prob P = + (FiniteLaw.uniform (ExposedAssignment (F := F) T)).expectation (fun x => + (FiniteLaw.uniform (FreshAssignment (F := F) T)).prob + (fun y => P (joinAssignments T x y))) := + by + rw [poolLaw_eq_uniform] + exact FiniteLaw.prob_uniform_prod_equiv + (X := Pool F n K) (Y := ExposedAssignment (F := F) T) + (Z := FreshAssignment (F := F) T) + (Equiv.piEquivPiSubtypeProd (fun e : Position n K => e ∈ T) + (fun _ => Point F)) P + +theorem poolLaw_prob_split_le (T : Finset (Position n K)) + (P : Pool F n K → Prop) (b : ℝ) + (h : ∀ x : ExposedAssignment (F := let _ := instDecidableEqF; F) T, + (FiniteLaw.uniform (FreshAssignment (F := F) T)).prob + (fun y => P (joinAssignments T x y)) ≤ b) : + (poolLaw F n K).prob P ≤ b := + FiniteLaw.prob_pi_uniform_split_le (fun e : Position n K => e ∈ T) P b h + +theorem poolLaw_prob_split_le_bad (T : Finset (Position n K)) + (P : Pool F n K → Prop) (Bad : ExposedAssignment (F := F) T → Prop) + (b : ℝ) (hb : 0 ≤ b) + (h : ∀ x : ExposedAssignment (F := F) T, ¬Bad x → + (FiniteLaw.uniform (FreshAssignment (F := F) T)).prob + (fun y => P (joinAssignments T x y)) ≤ b) : + (poolLaw F n K).prob P ≤ + (FiniteLaw.uniform (ExposedAssignment (F := F) T)).prob Bad + b := + by + rw [poolLaw_prob_split T P] + simpa only [FiniteLaw.prob_prod_average] using + FiniteLaw.prob_prod_le_bad_add + (FiniteLaw.uniform (ExposedAssignment (F := F) T)) + (FiniteLaw.uniform (FreshAssignment (F := F) T)) + (fun z => P (joinAssignments T z.1 z.2)) Bad b hb h + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/Quantitative.lean b/lean/OAI/Combinatorics/Ryser/Selection/Quantitative.lean new file mode 100644 index 0000000000000000000000000000000000000000..c7f9f8e64e94f57c0d4877422e338a340c0f7a14 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/Quantitative.lean @@ -0,0 +1,139 @@ +import OAI.Combinatorics.Ryser.Selection.CertificateBounds +import OAI.Combinatorics.Ryser.Selection.CertificateUnion +import OAI.Combinatorics.Ryser.Selection.LayerNormalization +import OAI.Combinatorics.Ryser.Selection.LayerBounds +import OAI.Combinatorics.Ryser.Selection.NumericLimits + +namespace OAI + +universe u +noncomputable section +open scoped BigOperators + +namespace RyserCoveringCounterexample.Selection + +theorem layer_count_le_bounded (D n K q m : ℕ) (hn : n ≤ D * q) : + (Real.exp 1 * (n : ℝ) / (m : ℝ)) ^ m * (3 * (K : ℝ) ^ 2) ^ m ≤ + (Real.exp 1 * (D : ℝ) * (q : ℝ) / (m : ℝ)) ^ m * + (3 * (K : ℝ) ^ 2) ^ m := by + have hnreal : (n : ℝ) ≤ (D : ℝ) * (q : ℝ) := by exact_mod_cast hn + have hbase : Real.exp 1 * (n : ℝ) / (m : ℝ) ≤ + Real.exp 1 * (D : ℝ) * (q : ℝ) / (m : ℝ) := by + simpa only [mul_assoc] using div_le_div_of_nonneg_right + (mul_le_mul_of_nonneg_left hnreal (Real.exp_pos 1).le) (Nat.cast_nonneg m) + exact mul_le_mul_of_nonneg_right + (pow_le_pow_left₀ (by positivity) hbase m) (by positivity) + +theorem exists_threshold_selection_failure_bound (D : ℕ) (hD : 1 ≤ D) + (K : ℕ) (hK : 6 ≤ K) + (hsmall : selectionSmallCoefficient D K * (1 / 2 : ℝ) ^ (K - 3) ≤ 1 / 2) + (hlarge : selectionLargeCoefficient D K * + Real.exp (2 - (K : ℝ) * densityDelta D) ≤ 1 / 2) : + ∃ Q : ℕ, ∀ (F : Type u) [Field F] [Fintype F] [DecidableEq F] + (n : ℕ) (data : Data F n), Bounded D data → Q ≤ Fintype.card F → ∀ R : ℕ, + (poolLaw F n K).prob (fun pool => ¬HasCompatibleChoice data pool) ≤ + selectionFailureBound D K R (selectionSmallCoefficient D K) + (max 1 (selectionLargeCoefficient D K)) (equationBound D) + (densityChunkCount D : ℝ) (densityRate D) (selectionCutoff D) + (Fintype.card F) := by + classical + obtain ⟨Q, hQ⟩ := exists_threshold_certificate_event_bound.{u} D hD K + refine ⟨Q, ?_⟩ + intro F _ _ _ n data hdata hq R + let q := Fintype.card F + let S := (Finset.range (n + 1)).filter (fun m => 0 < m) + let A := selectionSmallCoefficient D K + let B := selectionLargeCoefficient D K + let C := equationBound D + let c1 := selectionCutoff D + let J := (densityChunkCount D : ℝ) + let c := densityRate D + let delta := densityDelta D + have hqpos : 0 < q := Fintype.card_pos + have hqr : (0 : ℝ) < q := Nat.cast_pos.mpr hqpos + have hA : 0 ≤ A := selectionSmallCoefficient_nonneg D K hD + have hB : 0 ≤ B := selectionLargeCoefficient_nonneg D K hD + have hC : 0 < C := equationBound_pos D hD + have hc1 : 0 < c1 := selectionCutoff_pos D hD + have hpos (m : ℕ) (hm : m ∈ S) : 0 < m := (Finset.mem_filter.mp hm).2 + have hsize (m : ℕ) (hm : m ∈ S) : m ≤ D * q := by + have hmle : m ≤ n := Nat.lt_succ_iff.mp + (Finset.mem_range.mp (Finset.mem_filter.mp hm).1) + exact hmle.trans hdata.1 + have hprob := prob_not_hasCompatibleChoice_le_size_sum data (by omega : 0 < K) + (certificateEventBound D K q) (certificateEventBound_nonneg D K q) + (fun I _ T hT hcard => hQ F n data hdata hq I T hT hcard) + have hpointwise (m : ℕ) (hm : m ∈ S) : + ((Real.exp 1 * (n : ℝ) / (m : ℝ)) ^ m * (3 * (K : ℝ) ^ 2) ^ m) * + certificateEventBound D K q m ≤ + if (m : ℝ) ≤ c1 * (q : ℝ) then + (A * (2 * C * (m : ℝ) / (q : ℝ)) ^ (K - 3)) ^ m + else B ^ m * (J * Real.exp (-c * (q : ℝ) * Real.log (q : ℝ)) + + Real.exp (-(((K : ℝ) * delta - 2) * (m : ℝ)))) := by + have hcount := mul_le_mul_of_nonneg_right + (layer_count_le_bounded D n K q m hdata.1) + (certificateEventBound_nonneg D K q m) + refine hcount.trans ?_ + by_cases hmrange : (m : ℝ) ≤ c1 * (q : ℝ) + · rw [ite_eq_left hmrange] + have hevent : certificateEventBound D K q m = + (2 * C * (m : ℝ) / (q : ℝ)) ^ ((K - 2) * m) := by + rw [certificateEventBound, ite_eq_left hmrange, smallCertificateBase_eq] + rw [hevent] + exact le_of_eq (by + simpa only [A, selectionSmallCoefficient, selectionSmallFactor, C] using + small_layer_coefficient_identity m K C (D : ℝ) (q : ℝ) + (hpos m hm) (by omega) hqr) + · rw [ite_eq_right hmrange] + have hevent : certificateEventBound D K q m = + J * Real.exp (-c * (q : ℝ) * Real.log (q : ℝ)) + + Real.exp (-(((K : ℝ) * delta - 2) * (m : ℝ))) := by + rw [certificateEventBound, ite_eq_right hmrange] + rfl + rw [hevent] + apply mul_le_mul_of_nonneg_right + · simpa only [B, selectionLargeCoefficient, selectionLargeFactor, c1] using + large_layer_count_le m K (D : ℝ) (q : ℝ) c1 (hpos m hm) + (Nat.cast_nonneg D) hqr hc1 (lt_of_not_ge hmrange) + · exact le_trans (certificateEventBound_nonneg D K q m) (le_of_eq hevent) + have hsmallSum := small_certificate_sum_le + (S.filter (fun m => (m : ℝ) ≤ c1 * (q : ℝ))) K R A C (q : ℝ) + hA hC.le hqr + (fun m hm => Nat.succ_le_of_lt (hpos m (Finset.mem_filter.mp hm).1)) + (fun m hm => by + simpa only [smallCertificateBase_eq] using + smallCertificateBase_le_half D q m hD hqpos (Finset.mem_filter.mp hm).2) + hsmall + have hlargeSum := large_layer_sum_le + (S.filter (fun m => ¬(m : ℝ) ≤ c1 * (q : ℝ))) D K q B J c c1 delta + hB (Nat.cast_nonneg _) hc1 + (fun m hm => Nat.succ_le_of_lt (hpos m (Finset.mem_filter.mp hm).1)) + (fun m hm => hsize m (Finset.mem_filter.mp hm).1) + (fun m hm => lt_of_not_ge (Finset.mem_filter.mp hm).2) hlarge + calc + _ ≤ ∑ m ∈ S, + ((Real.exp 1 * (n : ℝ) / (m : ℝ)) ^ m * (3 * (K : ℝ) ^ 2) ^ m) * + certificateEventBound D K q m := hprob + _ ≤ ∑ m ∈ S, if (m : ℝ) ≤ c1 * (q : ℝ) then + (A * (2 * C * (m : ℝ) / (q : ℝ)) ^ (K - 3)) ^ m + else B ^ m * (J * Real.exp (-c * (q : ℝ) * Real.log (q : ℝ)) + + Real.exp (-(((K : ℝ) * delta - 2) * (m : ℝ)))) := + Finset.sum_le_sum hpointwise + _ = (∑ m ∈ S.filter (fun m : ℕ => (m : ℝ) ≤ c1 * (q : ℝ)), + (A * (2 * C * (m : ℝ) / (q : ℝ)) ^ (K - 3)) ^ m) + + ∑ m ∈ S.filter (fun m : ℕ => ¬(m : ℝ) ≤ c1 * (q : ℝ)), + B ^ m * (J * Real.exp (-c * (q : ℝ) * Real.log (q : ℝ)) + + Real.exp (-(((K : ℝ) * delta - 2) * (m : ℝ)))) := + Finset.sum_ite _ _ + _ ≤ ((R : ℝ) * A * (2 * C * (R : ℝ) / (q : ℝ)) ^ (K - 3) + + (1 / 2 : ℝ) ^ R) + + (J * ((D : ℝ) * (q : ℝ)) * (max 1 B) ^ (D * q) * + Real.exp (-c * (q : ℝ) * Real.log (q : ℝ)) + + (1 / 2 : ℝ) ^ Nat.floor (c1 * (q : ℝ))) := add_le_add hsmallSum hlargeSum + _ = _ := by simp only [selectionFailureBound, A, B, C, J, c, c1, q]; ring + +end RyserCoveringCounterexample.Selection + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/RegularTail.lean b/lean/OAI/Combinatorics/Ryser/Selection/RegularTail.lean new file mode 100644 index 0000000000000000000000000000000000000000..106f83b537a05721bfde690c194368ffe8fe3a4b --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/RegularTail.lean @@ -0,0 +1,109 @@ +import OAI.Combinatorics.Ryser.Probability.Variance +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.NormNum + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Selection + +theorem prob_regular_target_gt_le {Ω : Type*} [Fintype Ω] + (μ : FiniteLaw Ω) (Z : Ω → ℝ) (D m q γ C M : ℝ) + (hm : 0 < m) (hq : 0 < q) (hγ : 0 < γ) + (hmean : μ.expectation Z ≤ C * M / q) + (hvar : μ.variance Z ≤ 2 * D ^ 7 * m * q ^ 2 + + 2 * D ^ 5 * m ^ 2 * q * Real.sqrt q) : + μ.prob (fun x => C * M / q + γ * m * q < Z x) ≤ + 2 * D ^ 7 / (γ ^ 2 * m) + 2 * D ^ 5 / (γ ^ 2 * Real.sqrt q) := by + have ht : 0 < γ * m * q := mul_pos (mul_pos hγ hm) hq + have hs : 0 < Real.sqrt q := Real.sqrt_pos.mpr hq + calc + μ.prob (fun x => C * M / q + γ * m * q < Z x) ≤ + μ.variance Z / (γ * m * q) ^ 2 := + μ.prob_gt_mean_bound_add_le Z (C * M / q) (γ * m * q) hmean ht + _ ≤ (2 * D ^ 7 * m * q ^ 2 + 2 * D ^ 5 * m ^ 2 * q * Real.sqrt q) / + (γ * m * q) ^ 2 := + div_le_div_of_nonneg_right hvar (sq_nonneg _) + _ = 2 * D ^ 7 / (γ ^ 2 * m) + (2 * D ^ 5 / γ ^ 2) * (Real.sqrt q / q) := by + field_simp [hγ.ne', hm.ne', hq.ne'] + _ = 2 * D ^ 7 / (γ ^ 2 * m) + (2 * D ^ 5 / γ ^ 2) * (1 / Real.sqrt q) := by + rw [Real.sqrt_div_self'] + _ = 2 * D ^ 7 / (γ ^ 2 * m) + 2 * D ^ 5 / (γ ^ 2 * Real.sqrt q) := by + field_simp [hγ.ne', hm.ne', hs.ne'] + +theorem regular_tail_bound_le_sqrt (D m q C γ : ℝ) + (hD : 0 ≤ D) (hm : 0 < m) (hq : 1 ≤ q) + (hC : 0 < C) (hγ : 0 < γ) (hlarge : q / (4 * C) < m) : + 2 * D ^ 7 / (γ ^ 2 * m) + 2 * D ^ 5 / (γ ^ 2 * Real.sqrt q) ≤ + ((8 * C * D ^ 7 + 2 * D ^ 5) / γ ^ 2) / Real.sqrt q := by + have hs : 0 < Real.sqrt q := + Real.sqrt_pos.mpr (lt_of_lt_of_le zero_lt_one hq) + have hsle : Real.sqrt q ≤ q := Real.sqrt_le_self_iff.mpr (Or.inr hq) + have hg2 : 0 < γ ^ 2 := pow_pos hγ 2 + have h4C : 0 < 4 * C := mul_pos (by norm_num) hC + have hsm : Real.sqrt q ≤ (4 * C) * m := by + calc + Real.sqrt q ≤ q := hsle + _ ≤ m * (4 * C) := ((div_lt_iff₀ h4C).mp hlarge).le + _ = (4 * C) * m := mul_comm _ _ + have hcoef : 0 ≤ 2 * D ^ 7 * γ ^ 2 := + mul_nonneg (mul_nonneg (by norm_num) (pow_nonneg hD 7)) hg2.le + have hfirst : 2 * D ^ 7 / (γ ^ 2 * m) ≤ + 8 * C * D ^ 7 / (γ ^ 2 * Real.sqrt q) := by + apply (div_le_div_iff₀ (mul_pos hg2 hm) (mul_pos hg2 hs)).mpr + calc + (2 * D ^ 7) * (γ ^ 2 * Real.sqrt q) = + (2 * D ^ 7 * γ ^ 2) * Real.sqrt q := by ring + _ ≤ (2 * D ^ 7 * γ ^ 2) * ((4 * C) * m) := + mul_le_mul_of_nonneg_left hsm hcoef + _ = (8 * C * D ^ 7) * (γ ^ 2 * m) := by ring + calc + 2 * D ^ 7 / (γ ^ 2 * m) + 2 * D ^ 5 / (γ ^ 2 * Real.sqrt q) ≤ + 8 * C * D ^ 7 / (γ ^ 2 * Real.sqrt q) + + 2 * D ^ 5 / (γ ^ 2 * Real.sqrt q) := add_le_add hfirst le_rfl + _ = ((8 * C * D ^ 7 + 2 * D ^ 5) / γ ^ 2) / Real.sqrt q := by + rw [← add_div, div_div] + +theorem prob_regular_target_gt_le_sqrt {Ω : Type*} [Fintype Ω] + (μ : FiniteLaw Ω) (Z : Ω → ℝ) (D m q γ C M : ℝ) + (hD : 0 ≤ D) (hm : 0 < m) (hq : 1 ≤ q) (hγ : 0 < γ) (hC : 0 < C) + (hlarge : q / (4 * C) < m) + (hmean : μ.expectation Z ≤ C * M / q) + (hvar : μ.variance Z ≤ 2 * D ^ 7 * m * q ^ 2 + + 2 * D ^ 5 * m ^ 2 * q * Real.sqrt q) : + μ.prob (fun x => C * M / q + γ * m * q < Z x) ≤ + ((8 * C * D ^ 7 + 2 * D ^ 5) / γ ^ 2) / Real.sqrt q := by + exact (prob_regular_target_gt_le μ Z D m q γ C M hm + (lt_of_lt_of_le zero_lt_one hq) hγ hmean hvar).trans + (regular_tail_bound_le_sqrt D m q C γ hD hm hq hC hγ hlarge) + +theorem card_irregular_le {ι : Type*} (S : Finset ι) (A : ι → ℝ) (K D m q : ℝ) + (hm : 0 < m) (hq : 0 < q) (hA : ∀ i ∈ S, 0 ≤ A i) + (hsum : (∑ i ∈ S, A i) ≤ K * D * m * q ^ 2) : + ((S.filter (fun i => m * q * Real.sqrt q < A i)).card : ℝ) ≤ + K * D * Real.sqrt q := by + classical + let T := S.filter (fun i => m * q * Real.sqrt q < A i) + change (T.card : ℝ) ≤ K * D * Real.sqrt q + have hs : 0 < Real.sqrt q := Real.sqrt_pos.mpr hq + have ht : 0 < m * q * Real.sqrt q := mul_pos (mul_pos hm hq) hs + have hcount : (T.card : ℝ) * (m * q * Real.sqrt q) ≤ ∑ i ∈ T, A i := by + simpa only [nsmul_eq_mul] using + (Finset.card_nsmul_le_sum T A (m * q * Real.sqrt q) + (fun i hi => (Finset.mem_filter.mp hi).2.le)) + have hsub : (∑ i ∈ T, A i) ≤ ∑ i ∈ S, A i := + Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) + (fun i hi _ => hA i hi) + have hquot : (T.card : ℝ) ≤ (K * D * m * q ^ 2) / (m * q * Real.sqrt q) := + (le_div_iff₀ ht).mpr (hcount.trans (hsub.trans hsum)) + calc + (T.card : ℝ) ≤ (K * D * m * q ^ 2) / (m * q * Real.sqrt q) := hquot + _ = K * D * (q / Real.sqrt q) := by + field_simp [hm.ne', hq.ne', hs.ne'] + _ = K * D * Real.sqrt q := by rw [Real.div_sqrt] + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/SmallCertificates.lean b/lean/OAI/Combinatorics/Ryser/Selection/SmallCertificates.lean new file mode 100644 index 0000000000000000000000000000000000000000..d644061c925937cd7c95b0041a2dd991d89406cd --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/SmallCertificates.lean @@ -0,0 +1,78 @@ +import OAI.Combinatorics.Ryser.Selection.PoolLaw +import OAI.Combinatorics.Ryser.Selection.Forbidden +import OAI.Combinatorics.Ryser.Selection.IndependentTail + +namespace OAI + +open scoped BigOperators +namespace RyserCoveringCounterexample.Selection + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] {n K : ℕ} + +def NoFeasibleOutside (data : Data F n) (I : Finset (Fin n)) + (T : Finset (Position n K)) (pool : Pool F n K) : Prop := + ∀ e : Position n K, e.1 ∈ I → e ∉ T → ¬Feasible data T pool e.1 (pool e) + +def freshTargets (I : Finset (Fin n)) (T : Finset (Position n K)) : + Finset {e : Position n K // e ∉ T} := + Finset.univ.filter fun e => e.val.1 ∈ I + +theorem noFeasibleOutside_join_iff (data : Data F n) (I : Finset (Fin n)) + (T : Finset (Position n K)) (x : ExposedAssignment (F := F) T) + (y : FreshAssignment (F := F) T) : + NoFeasibleOutside data I T (joinAssignments T x y) ↔ + ∀ e ∈ freshTargets I T, ¬Feasible data T (frozenPool T x) e.val.1 (y e) := by + constructor + · intro h e he + have hi := (Finset.mem_filter.mp he).2 + have hh := h e.val hi e.property + simpa only [joinAssignments_fresh, feasible_join_iff] using hh + · intro h e hi he + have hmem : (⟨e, he⟩ : {e : Position n K // e ∉ T}) ∈ freshTargets I T := by + simp only [freshTargets, Finset.mem_filter, Finset.mem_univ, true_and] + exact hi + have hh := h ⟨e, he⟩ hmem + have hj : joinAssignments T x y e = y ⟨e, he⟩ := + joinAssignments_fresh T x y ⟨e, he⟩ + rw [hj, feasible_join_iff] + exact hh + +theorem prob_noFeasibleOutside_le {D : ℕ} (data : Data F n) (hdata : Bounded D data) + (I : Finset (Fin n)) (T : Finset (Position n K)) : + (poolLaw F n K).prob (NoFeasibleOutside data I T) ≤ + ((T.card : ℝ) * ((2 * (D : ℝ) ^ 3) / (Fintype.card F : ℝ))) ^ + (freshTargets I T).card := by + classical + refine poolLaw_prob_split_le T (NoFeasibleOutside data I T) + (((T.card : ℝ) * ((2 * (D : ℝ) ^ 3) / (Fintype.card F : ℝ))) ^ + (freshTargets I T).card) ?_ + intro x + have hP : + (fun y : FreshAssignment (F := F) T => + NoFeasibleOutside data I T (joinAssignments T x y)) = + (fun y => ∀ e ∈ freshTargets I T, + ¬Feasible data T (frozenPool T x) e.val.1 (y e)) := by + funext y + exact propext (noFeasibleOutside_join_iff data I T x y) + rw [hP] + calc + _ = (FiniteLaw.pi (fun _ : {e : Position n K // e ∉ T} => + FiniteLaw.uniform (Point F))).prob + (fun y => ∀ e ∈ freshTargets I T, + ¬Feasible data T (frozenPool T x) e.val.1 (y e)) := by + rw [FiniteLaw.pi_uniform] + _ = ∏ e ∈ freshTargets I T, (FiniteLaw.uniform (Point F)).prob + (fun b => ¬Feasible data T (frozenPool T x) e.val.1 b) := + prob_pi_forall_mem + (fun _ : {e : Position n K // e ∉ T} => FiniteLaw.uniform (Point F)) + (freshTargets I T) (fun e b => ¬Feasible data T (frozenPool T x) e.val.1 b) + _ ≤ ∏ _e ∈ freshTargets I T, + ((T.card : ℝ) * ((2 * (D : ℝ) ^ 3) / (Fintype.card F : ℝ))) := by + apply Finset.prod_le_prod₀ + · exact fun e _ => (FiniteLaw.uniform (Point F)).prob_nonneg _ + · exact fun e _ => prob_not_feasible_le data hdata T (frozenPool T x) e.val.1 + _ = _ := by simp + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/SmallRange.lean b/lean/OAI/Combinatorics/Ryser/Selection/SmallRange.lean new file mode 100644 index 0000000000000000000000000000000000000000..942b0fe1bdca16946cb08e02e8888b63b4b5c3e6 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/SmallRange.lean @@ -0,0 +1,37 @@ +import OAI.Combinatorics.Ryser.Selection.PoolCounts + +namespace OAI + +namespace RyserCoveringCounterexample.Selection + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] {n K : ℕ} + +theorem prob_noFeasibleOutside_small_le {D : ℕ} (data : Data F n) + (hdata : Bounded D data) (I : Finset (Fin n)) (T : Finset (Position n K)) + (hT : T ⊆ targetPositions I K) (hcard : T.card ≤ 2 * I.card) + (hsmall : (2 * (I.card : ℝ)) * ((2 * (D : ℝ) ^ 3) / (Fintype.card F : ℝ)) ≤ 1) : + (poolLaw F n K).prob (NoFeasibleOutside data I T) ≤ + ((2 * (I.card : ℝ)) * ((2 * (D : ℝ) ^ 3) / (Fintype.card F : ℝ))) ^ + ((K - 2) * I.card) := by + have hnonneg : 0 ≤ (2 * (D : ℝ) ^ 3) / (Fintype.card F : ℝ) := + div_nonneg (mul_nonneg (by norm_num) (pow_nonneg (Nat.cast_nonneg D) _)) + (Nat.cast_nonneg _) + have hbase : (T.card : ℝ) * ((2 * (D : ℝ) ^ 3) / (Fintype.card F : ℝ)) ≤ + (2 * (I.card : ℝ)) * ((2 * (D : ℝ) ^ 3) / (Fintype.card F : ℝ)) := by + apply mul_le_mul_of_nonneg_right _ hnonneg + exact_mod_cast hcard + have htarget_nonneg : 0 ≤ + (2 * (I.card : ℝ)) * ((2 * (D : ℝ) ^ 3) / (Fintype.card F : ℝ)) := + mul_nonneg (mul_nonneg (by norm_num) (Nat.cast_nonneg _)) hnonneg + calc + _ ≤ ((T.card : ℝ) * ((2 * (D : ℝ) ^ 3) / (Fintype.card F : ℝ))) ^ + (freshTargets I T).card := prob_noFeasibleOutside_le data hdata I T + _ ≤ ((2 * (I.card : ℝ)) * ((2 * (D : ℝ) ^ 3) / (Fintype.card F : ℝ))) ^ + (freshTargets I T).card := + pow_le_pow_left₀ (mul_nonneg (Nat.cast_nonneg _) hnonneg) hbase _ + _ ≤ _ := pow_le_pow_of_le_one htarget_nonneg hsmall + (freshTargets_card_lower hT hcard) + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/SmallSum.lean b/lean/OAI/Combinatorics/Ryser/Selection/SmallSum.lean new file mode 100644 index 0000000000000000000000000000000000000000..c1432ecbe5ffa72211d5b9e8f101acbad560f92d --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/SmallSum.lean @@ -0,0 +1,127 @@ +import Mathlib.Basic.Real.Basic +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Data.Finset.Lattice.Fold +import Mathlib.Order.Interval.Finset.Nat +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Ring + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Selection + +theorem sum_half_pow_Ico_eq (a b : ℕ) (hab : a ≤ b) : + (∑ m ∈ Finset.Ico a b, (1 / 2 : ℝ) ^ m) = + 2 * ((1 / 2 : ℝ) ^ a - (1 / 2 : ℝ) ^ b) := by + obtain ⟨n, rfl⟩ := Nat.exists_eq_add_of_le hab + clear hab + induction n with + | zero => simp + | succ n ih => + rw [Nat.add_succ, + Nat.Ico_succ_right_eq_insert_Ico (Nat.le_add_right a n), + Finset.sum_insert (by simp), ih, pow_succ] + ring + +theorem sum_half_pow_Ico_le (a b : ℕ) : + (∑ m ∈ Finset.Ico a b, (1 / 2 : ℝ) ^ m) ≤ 2 * (1 / 2 : ℝ) ^ a := by + by_cases hab : a ≤ b + · rw [sum_half_pow_Ico_eq a b hab] + have hnonneg : 0 ≤ (1 / 2 : ℝ) ^ b := pow_nonneg (by norm_num) b + exact mul_le_mul_of_nonneg_left (sub_le_self _ hnonneg) (by norm_num) + · rw [Finset.Ico_eq_empty_of_le (Nat.le_of_lt (Nat.lt_of_not_ge hab)), Finset.sum_empty] + exact mul_nonneg (by norm_num) (pow_nonneg (by norm_num) a) + +theorem sum_half_pow_le_cutoff (T : Finset ℕ) (R : ℕ) + (hT : ∀ m ∈ T, R < m) : + (∑ m ∈ T, (1 / 2 : ℝ) ^ m) ≤ (1 / 2 : ℝ) ^ R := by + have hsub : T ⊆ Finset.Ico (R + 1) (T.sup id + 1) := by + intro m hm + exact Finset.mem_Ico.mpr ⟨Nat.succ_le_of_lt (hT m hm), + Nat.lt_succ_of_le (show m ≤ T.sup id from Finset.le_sup (f := id) hm)⟩ + calc + (∑ m ∈ T, (1 / 2 : ℝ) ^ m) ≤ + ∑ m ∈ Finset.Ico (R + 1) (T.sup id + 1), (1 / 2 : ℝ) ^ m := + Finset.sum_le_sum_of_subset_of_nonneg hsub + (fun m _ _ => pow_nonneg (by norm_num) m) + _ ≤ 2 * (1 / 2 : ℝ) ^ (R + 1) := sum_half_pow_Ico_le _ _ + _ = (1 / 2 : ℝ) ^ R := by + rw [pow_succ] + ring + +theorem sum_indexed_powers_le_cutoff (T : Finset ℕ) (R : ℕ) + (f : ℕ → ℝ) (u : ℝ) (hu : 0 ≤ u) + (hpositive : ∀ m ∈ T, 1 ≤ m) + (hf0 : ∀ m ∈ T, 0 ≤ f m) + (hfhalf : ∀ m ∈ T, f m ≤ 1 / 2) + (hcutoff : ∀ m ∈ T, m ≤ R → f m ≤ u) : + (∑ m ∈ T, (f m) ^ m) ≤ (R : ℝ) * u + (1 / 2 : ℝ) ^ R := by + have hsub : T.filter (fun m => m ≤ R) ⊆ Finset.Icc 1 R := by + intro m hm + obtain ⟨hmT, hmR⟩ := Finset.mem_filter.mp hm + exact Finset.mem_Icc.mpr ⟨hpositive m hmT, hmR⟩ + have hcard : (T.filter (fun m => m ≤ R)).card ≤ R := by + simpa only [Nat.card_Icc, Nat.add_sub_cancel] using Finset.card_le_card hsub + have hinitial : (∑ m ∈ T.filter (fun m => m ≤ R), (f m) ^ m) ≤ (R : ℝ) * u := by + calc + _ ≤ ∑ m ∈ T.filter (fun m => m ≤ R), u := by + apply Finset.sum_le_sum + intro m hm + obtain ⟨hmT, hmR⟩ := Finset.mem_filter.mp hm + have hmpos : 0 < m := lt_of_lt_of_le Nat.zero_lt_one (hpositive m hmT) + have hfone : f m ≤ 1 := (hfhalf m hmT).trans (by norm_num) + exact (pow_le_of_le_one (hf0 m hmT) hfone hmpos.ne').trans + (hcutoff m hmT hmR) + _ = ((T.filter (fun m => m ≤ R)).card : ℝ) * u := by + simp only [Finset.sum_const, nsmul_eq_mul] + _ ≤ (R : ℝ) * u := mul_le_mul_of_nonneg_right (Nat.cast_le.mpr hcard) hu + have htail : (∑ m ∈ T.filter (fun m => ¬m ≤ R), (f m) ^ m) ≤ + (1 / 2 : ℝ) ^ R := by + calc + _ ≤ ∑ m ∈ T.filter (fun m => ¬m ≤ R), (1 / 2 : ℝ) ^ m := by + apply Finset.sum_le_sum + intro m hm + have hmT := (Finset.mem_filter.mp hm).1 + exact pow_le_pow_left₀ (hf0 m hmT) (hfhalf m hmT) m + _ ≤ (1 / 2 : ℝ) ^ R := + sum_half_pow_le_cutoff _ R (fun m hm => + Nat.lt_of_not_ge (Finset.mem_filter.mp hm).2) + calc + (∑ m ∈ T, (f m) ^ m) = + (∑ m ∈ T.filter (fun m => m ≤ R), (f m) ^ m) + + ∑ m ∈ T.filter (fun m => ¬m ≤ R), (f m) ^ m := + (Finset.sum_filter_add_sum_filter_not T (fun m => m ≤ R) (fun m => (f m) ^ m)).symm + _ ≤ (R : ℝ) * u + (1 / 2 : ℝ) ^ R := add_le_add hinitial htail + +theorem small_certificate_sum_le (T : Finset ℕ) (K R : ℕ) (A C q : ℝ) + (hA : 0 ≤ A) (hC : 0 ≤ C) (hq : 0 < q) + (hpositive : ∀ m ∈ T, 1 ≤ m) + (hrange : ∀ m ∈ T, 2 * C * (m : ℝ) / q ≤ 1 / 2) + (hsmall : A * (1 / 2 : ℝ) ^ (K - 3) ≤ 1 / 2) : + (∑ m ∈ T, (A * (2 * C * (m : ℝ) / q) ^ (K - 3)) ^ m) ≤ + (R : ℝ) * A * (2 * C * (R : ℝ) / q) ^ (K - 3) + (1 / 2 : ℝ) ^ R := by + have hbase0 (m : ℕ) : 0 ≤ 2 * C * (m : ℝ) / q := + div_nonneg (mul_nonneg (mul_nonneg (by norm_num) hC) (Nat.cast_nonneg m)) hq.le + have hnonneg (m : ℕ) : 0 ≤ A * (2 * C * (m : ℝ) / q) ^ (K - 3) := + mul_nonneg hA (pow_nonneg (hbase0 m) _) + have hhalf (m : ℕ) (hm : m ∈ T) : + A * (2 * C * (m : ℝ) / q) ^ (K - 3) ≤ 1 / 2 := + (mul_le_mul_of_nonneg_left + (pow_le_pow_left₀ (hbase0 m) (hrange m hm) (K - 3)) hA).trans hsmall + have hcutoff (m : ℕ) (_hm : m ∈ T) (hmR : m ≤ R) : + A * (2 * C * (m : ℝ) / q) ^ (K - 3) ≤ + A * (2 * C * (R : ℝ) / q) ^ (K - 3) := by + apply mul_le_mul_of_nonneg_left _ hA + apply pow_le_pow_left₀ (hbase0 m) _ (K - 3) + exact div_le_div_of_nonneg_right + (mul_le_mul_of_nonneg_left (Nat.cast_le.mpr hmR) (mul_nonneg (by norm_num) hC)) hq.le + simpa only [mul_assoc] using + sum_indexed_powers_le_cutoff T R + (fun m : ℕ => A * (2 * C * (m : ℝ) / q) ^ (K - 3)) + (A * (2 * C * (R : ℝ) / q) ^ (K - 3)) + (hnonneg R) hpositive (fun m _ => hnonneg m) hhalf hcutoff + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/UniformDensity.lean b/lean/OAI/Combinatorics/Ryser/Selection/UniformDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..7237665bb5827a4b830a3cb113f083d11d1e5331 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/UniformDensity.lean @@ -0,0 +1,99 @@ +import OAI.Combinatorics.Ryser.Selection.ChunkDensity +import OAI.Combinatorics.Ryser.Selection.DensityConstants +import OAI.Combinatorics.Ryser.Selection.ChunkPartitionBounds +import OAI.Combinatorics.Ryser.Selection.ChunkTailAsymptotics + +namespace OAI + +universe u + +namespace RyserCoveringCounterexample.Selection + +theorem prob_feasibleMass_lt_densityDelta_le (D : ℕ) (hD : 1 ≤ D) (K : ℕ) : + ∃ Q : ℕ, ∀ (F : Type u) [Field F] [Fintype F] [DecidableEq F] + (n : ℕ) (data : Data F n), Bounded D data → Q ≤ Fintype.card F → + ∀ (I : Finset (Fin n)) (T : Finset (Position n K)), + (Fintype.card F : ℝ) / (4 * equationBound D) < I.card → + T.card ≤ 2 * I.card → + (poolLaw F n K).prob (fun pool => + (feasibleMass data I T pool : ℝ) < + densityDelta D * ((I.card : ℝ) * (Fintype.card F : ℝ) ^ 2)) ≤ + (densityChunkCount D : ℝ) * + Real.exp (-densityRate D * (Fintype.card F : ℝ) * + Real.log (Fintype.card F : ℝ)) := by + have hα := densityAlpha_pos D hD + have hγ := densityGamma_pos D hD + have hB := regularTailConstant_pos D hD (densityGamma D) hγ + obtain ⟨Q₀, hQ₀⟩ := exists_threshold_chunk_tail_and_pool_budget + (densityAlpha D) (densityGamma D) (regularTailConstant D (densityGamma D)) + (K : ℝ) (D : ℝ) hα.le hγ hB + refine ⟨max Q₀ (Nat.ceil (2 / densityAlpha D)), ?_⟩ + intro F _ _ _ n data hdata hq I T hlarge hT + have hqpos : (0 : ℝ) < Fintype.card F := Nat.cast_pos.mpr Fintype.card_pos + have hqtail : Q₀ ≤ Fintype.card F := (le_max_left _ _).trans hq + obtain ⟨htail, hpool⟩ := hQ₀ (Fintype.card F) hqtail + have hqfloor : Nat.ceil (2 / densityAlpha D) ≤ Fintype.card F := + (le_max_right _ _).trans hq + have hratio : 2 / densityAlpha D ≤ (Fintype.card F : ℝ) := + (Nat.le_ceil (2 / densityAlpha D)).trans (Nat.cast_le.mpr hqfloor) + have hfloorlarge : 2 ≤ densityAlpha D * (Fintype.card F : ℝ) := by + simpa only [mul_comm] using (div_le_iff₀ hα).mp hratio + have hLpos : 0 < Nat.floor (densityAlpha D * (Fintype.card F : ℝ)) := + floor_chunkSize_pos (densityAlpha D) (Fintype.card F : ℝ) hfloorlarge + have hLle : (Nat.floor (densityAlpha D * (Fintype.card F : ℝ)) : ℝ) ≤ + densityAlpha D * (Fintype.card F : ℝ) := + floor_chunkSize_le (densityAlpha D) (Fintype.card F : ℝ) hα hqpos + have hIcard : I.card ≤ D * Fintype.card F := by + have hIn : I.card ≤ n := by simpa only [Fintype.card_fin] using I.card_le_univ + exact hIn.trans hdata.1 + have hTcard : T.card ≤ 2 * D * Fintype.card F := by + calc + T.card ≤ 2 * I.card := hT + _ ≤ 2 * (D * Fintype.card F) := Nat.mul_le_mul_left 2 hIcard + _ = _ := by ring + have hTreal : (T.card : ℝ) ≤ 2 * (D : ℝ) * (Fintype.card F : ℝ) := by + exact_mod_cast hTcard + have hJreal := chunkCount_floor_le T (densityAlpha D) (Fintype.card F : ℝ) + (D : ℝ) hα hqpos hfloorlarge hTreal (Nat.cast_nonneg D) + rw [← density_chunkCount_identity D] at hJreal + have hJ : chunkCount T (Nat.floor (densityAlpha D * (Fintype.card F : ℝ))) ≤ + densityChunkCount D := by exact_mod_cast hJreal + have hC : 0 < equationBound D := by + have hDr : (0 : ℝ) < D := by exact_mod_cast (lt_of_lt_of_le Nat.zero_lt_one hD) + unfold equationBound + positivity + have hm : 0 < (I.card : ℝ) := + (div_pos hqpos (mul_pos (by norm_num) hC)).trans hlarge + have hfinite := prob_feasibleMass_lt_density_le D hD data hdata I T + (Nat.floor (densityAlpha D * (Fintype.card F : ℝ))) (densityChunkCount D) + (densityAlpha D) (densityGamma D) hm hγ hlarge + (equationBound_mul_densityAlpha D hD) hLpos hLle hpool hJ + (density_error_budget D hD).le + have hsmall := chunk_tail_le_exp_of_length_le + (densityAlpha D) (densityGamma D) (regularTailConstant D (densityGamma D)) + (Fintype.card F : ℝ) (Nat.floor (densityAlpha D * (Fintype.card F : ℝ))) + hB.le hLle htail + have hcombined : + (poolLaw F n K).prob (fun pool => + (feasibleMass data I T pool : ℝ) < + densityDelta D * ((I.card : ℝ) * (Fintype.card F : ℝ) ^ 2)) ≤ + (chunkCount T (Nat.floor (densityAlpha D * (Fintype.card F : ℝ))) : ℝ) * + Real.exp (-(densityGamma D / 4) * (Fintype.card F : ℝ) * + Real.log (Fintype.card F : ℝ)) := by + have hmul := mul_le_mul_of_nonneg_left hsmall + (Nat.cast_nonneg (chunkCount T (Nat.floor (densityAlpha D * (Fintype.card F : ℝ))))) + simpa only [densityDelta] using + hfinite.trans (by simpa only [mul_assoc] using hmul) + calc + _ ≤ (chunkCount T (Nat.floor (densityAlpha D * (Fintype.card F : ℝ))) : ℝ) * + Real.exp (-(densityGamma D / 4) * (Fintype.card F : ℝ) * + Real.log (Fintype.card F : ℝ)) := hcombined + _ ≤ (densityChunkCount D : ℝ) * + Real.exp (-(densityGamma D / 4) * (Fintype.card F : ℝ) * + Real.log (Fintype.card F : ℝ)) := + mul_le_mul_of_nonneg_right (by exact_mod_cast hJ) (Real.exp_pos _).le + _ = _ := rfl + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/Ryser/Selection/UnusedProduct.lean b/lean/OAI/Combinatorics/Ryser/Selection/UnusedProduct.lean new file mode 100644 index 0000000000000000000000000000000000000000..68fbe36fc867595475dca6fb89f80971173384d3 --- /dev/null +++ b/lean/OAI/Combinatorics/Ryser/Selection/UnusedProduct.lean @@ -0,0 +1,63 @@ +import OAI.Combinatorics.Ryser.Selection.SmallCertificates +import OAI.Combinatorics.Ryser.Selection.Estimates + +namespace OAI + +open scoped BigOperators + +namespace RyserCoveringCounterexample.Selection + +variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] {n K : ℕ} + +theorem prob_noFeasibleOutside_join_eq_prod (data : Data F n) + (I : Finset (Fin n)) (T : Finset (Position n K)) + (x : ExposedAssignment (F := F) T) : + (FiniteLaw.uniform (FreshAssignment (F := F) T)).prob + (fun y => NoFeasibleOutside data I T (joinAssignments T x y)) = + ∏ e ∈ freshTargets I T, + (1 - (FiniteLaw.uniform (Point F)).prob + (Feasible data T (frozenPool T x) e.val.1)) := by + classical + have hP : + (fun y : FreshAssignment (F := F) T => + NoFeasibleOutside data I T (joinAssignments T x y)) = + (fun y => ∀ e ∈ freshTargets I T, + ¬Feasible data T (frozenPool T x) e.val.1 (y e)) := by + funext y + exact propext (noFeasibleOutside_join_iff data I T x y) + rw [hP] + calc + _ = (FiniteLaw.pi (fun _ : {e : Position n K // e ∉ T} => + FiniteLaw.uniform (Point F))).prob + (fun y => ∀ e ∈ freshTargets I T, + ¬Feasible data T (frozenPool T x) e.val.1 (y e)) := by + rw [FiniteLaw.pi_uniform] + _ = ∏ e ∈ freshTargets I T, (FiniteLaw.uniform (Point F)).prob + (fun b => ¬Feasible data T (frozenPool T x) e.val.1 b) := + prob_pi_forall_mem + (fun _ : {e : Position n K // e ∉ T} => FiniteLaw.uniform (Point F)) + (freshTargets I T) + (fun e b => ¬Feasible data T (frozenPool T x) e.val.1 b) + _ = _ := by + apply Finset.prod_congr rfl + intro e he + exact (FiniteLaw.uniform (Point F)).prob_compl + (Feasible data T (frozenPool T x) e.val.1) + +theorem prob_noFeasibleOutside_join_le_exp_neg_sum (data : Data F n) + (I : Finset (Fin n)) (T : Finset (Position n K)) + (x : ExposedAssignment (F := F) T) : + (FiniteLaw.uniform (FreshAssignment (F := F) T)).prob + (fun y => NoFeasibleOutside data I T (joinAssignments T x y)) ≤ + Real.exp (-(∑ e ∈ freshTargets I T, (FiniteLaw.uniform (Point F)).prob + (Feasible data T (frozenPool T x) e.val.1))) := by + rw [prob_noFeasibleOutside_join_eq_prod] + simpa only [pow_one, Nat.cast_one, one_mul] using + prod_one_sub_pow_le_exp_neg_sum (freshTargets I T) + (fun e => (FiniteLaw.uniform (Point F)).prob + (Feasible data T (frozenPool T x) e.val.1)) + (fun _ => 1) (fun e _ => (FiniteLaw.uniform (Point F)).prob_le_one _) + +end RyserCoveringCounterexample.Selection + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/AugmentedGraph.lean b/lean/OAI/Combinatorics/SecondNeighborhood/AugmentedGraph.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef277e6943f11b822fe56a5c0d59a4a23afe513d --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/AugmentedGraph.lean @@ -0,0 +1,291 @@ +import OAI.Combinatorics.SecondNeighborhood.PruningDefinitions +import OAI.Combinatorics.SecondNeighborhood.Matching +import Mathlib.Data.Fintype.Sum + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +open Bipartite + +variable {V : Type*} [Fintype V] [DecidableEq V] + +abbrev LeftVertex (r : V → V → Prop) (R C : Finset (V × V)) := + ↥R ⊕ ↥(Z r R C) + +abbrev RightVertex (r : V → V → Prop) (R C : Finset (V × V)) := + ↥C ⊕ ↥(Z r R C) + +def AugmentedEdge (r : V → V → Prop) (R C : Finset (V × V)) : + LeftVertex r R C → RightVertex r R C → Prop + | Sum.inl a, Sum.inl b => Conflict r a.val b.val + | Sum.inl a, Sum.inr z => LeftCovers r a.val z.val + | Sum.inr z, Sum.inl b => RightCovers r b.val z.val + | Sum.inr _, Sum.inr _ => False + +def OriginalRelation (r : V → V → Prop) (R C : Finset (V × V)) + (a : R) (b : C) : Prop := Conflict r a.val b.val + +def AlphaRelation (r : V → V → Prop) (R C : Finset (V × V)) + (z : Z r R C) (a : R) : Prop := LeftCovers r a.val z.val + +def BetaRelation (r : V → V → Prop) (R C : Finset (V × V)) + (z : Z r R C) (b : C) : Prop := RightCovers r b.val z.val + +variable {r : V → V → Prop} {R C : Finset (V × V)} + +def originalLift (e : ↥R × ↥C) : LeftVertex r R C × RightVertex r R C := + (Sum.inl e.1, Sum.inl e.2) + +def alphaLift (e : ↥(Z r R C) × ↥R) : + LeftVertex r R C × RightVertex r R C := + (Sum.inl e.2, Sum.inr e.1) + +def betaLift (e : ↥(Z r R C) × ↥C) : + LeftVertex r R C × RightVertex r R C := + (Sum.inr e.1, Sum.inl e.2) + +theorem originalLift_injective : + Function.Injective (originalLift (r := r) (R := R) (C := C)) := by + intro e f h + exact Prod.ext (Sum.inl.inj (congrArg Prod.fst h)) + (Sum.inl.inj (congrArg Prod.snd h)) + +theorem alphaLift_injective : + Function.Injective (alphaLift (r := r) (R := R) (C := C)) := by + intro e f h + exact Prod.ext (Sum.inr.inj (congrArg Prod.snd h)) + (Sum.inl.inj (congrArg Prod.fst h)) + +theorem betaLift_injective : + Function.Injective (betaLift (r := r) (R := R) (C := C)) := by + intro e f h + exact Prod.ext (Sum.inr.inj (congrArg Prod.fst h)) + (Sum.inl.inj (congrArg Prod.snd h)) + +noncomputable def originalEdges + (M : Finset (LeftVertex r R C × RightVertex r R C)) : Finset (↥R × ↥C) := by + classical + exact Finset.univ.filter (fun e => originalLift e ∈ M) + +noncomputable def alphaEdges + (M : Finset (LeftVertex r R C × RightVertex r R C)) : + Finset (↥(Z r R C) × ↥R) := by + classical + exact Finset.univ.filter (fun e => alphaLift e ∈ M) + +noncomputable def betaEdges + (M : Finset (LeftVertex r R C × RightVertex r R C)) : + Finset (↥(Z r R C) × ↥C) := by + classical + exact Finset.univ.filter (fun e => betaLift e ∈ M) + +@[simp] theorem mem_originalEdges + {M : Finset (LeftVertex r R C × RightVertex r R C)} {e : ↥R × ↥C} : + e ∈ originalEdges M ↔ originalLift e ∈ M := by + classical + simp [originalEdges] + +@[simp] theorem mem_alphaEdges + {M : Finset (LeftVertex r R C × RightVertex r R C)} + {e : ↥(Z r R C) × ↥R} : e ∈ alphaEdges M ↔ alphaLift e ∈ M := by + classical + simp [alphaEdges] + +@[simp] theorem mem_betaEdges + {M : Finset (LeftVertex r R C × RightVertex r R C)} + {e : ↥(Z r R C) × ↥C} : e ∈ betaEdges M ↔ betaLift e ∈ M := by + classical + simp [betaEdges] + +theorem originalEdges_isMatching + {M : Finset (LeftVertex r R C × RightVertex r R C)} + (hM : IsMatching (AugmentedEdge r R C) M) : + IsMatching (OriginalRelation r R C) (originalEdges M) := by + refine ⟨?_, ?_, ?_⟩ + · intro e he + exact hM.1 (originalLift e) (mem_originalEdges.mp he) + · intro e he f hf h + apply originalLift_injective + exact hM.2.1 (mem_originalEdges.mp he) (mem_originalEdges.mp hf) + (congrArg Sum.inl h) + · intro e he f hf h + apply originalLift_injective + exact hM.2.2 (mem_originalEdges.mp he) (mem_originalEdges.mp hf) + (congrArg Sum.inl h) + +theorem alphaEdges_isMatching + {M : Finset (LeftVertex r R C × RightVertex r R C)} + (hM : IsMatching (AugmentedEdge r R C) M) : + IsMatching (AlphaRelation r R C) (alphaEdges M) := by + refine ⟨?_, ?_, ?_⟩ + · intro e he + exact hM.1 (alphaLift e) (mem_alphaEdges.mp he) + · intro e he f hf h + apply alphaLift_injective + exact hM.2.2 (mem_alphaEdges.mp he) (mem_alphaEdges.mp hf) + (congrArg Sum.inr h) + · intro e he f hf h + apply alphaLift_injective + exact hM.2.1 (mem_alphaEdges.mp he) (mem_alphaEdges.mp hf) + (congrArg Sum.inl h) + +theorem betaEdges_isMatching + {M : Finset (LeftVertex r R C × RightVertex r R C)} + (hM : IsMatching (AugmentedEdge r R C) M) : + IsMatching (BetaRelation r R C) (betaEdges M) := by + refine ⟨?_, ?_, ?_⟩ + · intro e he + exact hM.1 (betaLift e) (mem_betaEdges.mp he) + · intro e he f hf h + apply betaLift_injective + exact hM.2.1 (mem_betaEdges.mp he) (mem_betaEdges.mp hf) + (congrArg Sum.inr h) + · intro e he f hf h + apply betaLift_injective + exact hM.2.2 (mem_betaEdges.mp he) (mem_betaEdges.mp hf) + (congrArg Sum.inl h) + +theorem original_alpha_left_ne + {M : Finset (LeftVertex r R C × RightVertex r R C)} + (hM : IsMatching (AugmentedEdge r R C) M) + {e : ↥R × ↥C} (he : e ∈ originalEdges M) + {a : ↥(Z r R C) × ↥R} (ha : a ∈ alphaEdges M) : e.1 ≠ a.2 := by + intro h + have heq := hM.2.1 (mem_originalEdges.mp he) (mem_alphaEdges.mp ha) + (congrArg Sum.inl h) + have hright := congrArg Prod.snd heq + cases hright + +theorem original_beta_right_ne + {M : Finset (LeftVertex r R C × RightVertex r R C)} + (hM : IsMatching (AugmentedEdge r R C) M) + {e : ↥R × ↥C} (he : e ∈ originalEdges M) + {b : ↥(Z r R C) × ↥C} (hb : b ∈ betaEdges M) : e.2 ≠ b.2 := by + intro h + have heq := hM.2.2 (mem_originalEdges.mp he) (mem_betaEdges.mp hb) + (congrArg Sum.inl h) + have hleft := congrArg Prod.fst heq + cases hleft + +theorem alphaEdges_image + {M : Finset (LeftVertex r R C × RightVertex r R C)} + (hM : IsMatching (AugmentedEdge r R C) M) : + (alphaEdges M).image alphaLift = M.filter (fun e => e.2.isRight) := by + classical + ext e + constructor + · intro he + obtain ⟨⟨z, a⟩, ha, rfl⟩ := Finset.mem_image.mp he + exact Finset.mem_filter.mpr ⟨mem_alphaEdges.mp ha, rfl⟩ + · intro he + obtain ⟨he, hright⟩ := Finset.mem_filter.mp he + obtain ⟨l, b⟩ := e + cases l with + | inl a => + cases b with + | inl b => simp at hright + | inr z => exact Finset.mem_image.mpr ⟨(z, a), mem_alphaEdges.mpr he, rfl⟩ + | inr z => + cases b with + | inl b => simp at hright + | inr w => exact False.elim (hM.1 _ he) + +theorem betaEdges_image + {M : Finset (LeftVertex r R C × RightVertex r R C)} + (hM : IsMatching (AugmentedEdge r R C) M) : + (betaEdges M).image betaLift = M.filter (fun e => e.1.isRight) := by + classical + ext e + constructor + · intro he + obtain ⟨⟨z, b⟩, hb, rfl⟩ := Finset.mem_image.mp he + exact Finset.mem_filter.mpr ⟨mem_betaEdges.mp hb, rfl⟩ + · intro he + obtain ⟨he, hleft⟩ := Finset.mem_filter.mp he + obtain ⟨l, b⟩ := e + cases l with + | inl a => simp at hleft + | inr z => + cases b with + | inl b => exact Finset.mem_image.mpr ⟨(z, b), mem_betaEdges.mpr he, rfl⟩ + | inr w => exact False.elim (hM.1 _ he) + +theorem augmented_matching_eq_three_images + {M : Finset (LeftVertex r R C × RightVertex r R C)} + (hM : IsMatching (AugmentedEdge r R C) M) : + M = (originalEdges M).image originalLift ∪ + (alphaEdges M).image alphaLift ∪ (betaEdges M).image betaLift := by + classical + ext e + constructor + · intro he + obtain ⟨l, b⟩ := e + cases l with + | inl a => + cases b with + | inl b => + exact Finset.mem_union_left _ (Finset.mem_union_left _ + (Finset.mem_image.mpr ⟨(a, b), mem_originalEdges.mpr he, rfl⟩)) + | inr z => + exact Finset.mem_union_left _ (Finset.mem_union_right _ + (Finset.mem_image.mpr ⟨(z, a), mem_alphaEdges.mpr he, rfl⟩)) + | inr z => + cases b with + | inl b => + exact Finset.mem_union_right _ + (Finset.mem_image.mpr ⟨(z, b), mem_betaEdges.mpr he, rfl⟩) + | inr w => exact False.elim (hM.1 _ he) + · intro he + rcases Finset.mem_union.mp he with he | he + · rcases Finset.mem_union.mp he with he | he + · obtain ⟨a, ha, rfl⟩ := Finset.mem_image.mp he + exact mem_originalEdges.mp ha + · obtain ⟨a, ha, rfl⟩ := Finset.mem_image.mp he + exact mem_alphaEdges.mp ha + · obtain ⟨a, ha, rfl⟩ := Finset.mem_image.mp he + exact mem_betaEdges.mp ha + +theorem augmented_matching_card + {M : Finset (LeftVertex r R C × RightVertex r R C)} + (hM : IsMatching (AugmentedEdge r R C) M) : + M.card = (originalEdges M).card + (alphaEdges M).card + (betaEdges M).card := by + classical + have hOA : Disjoint ((originalEdges M).image originalLift) + ((alphaEdges M).image alphaLift) := by + apply Finset.disjoint_left.mpr + intro e he hf + obtain ⟨o, _, rfl⟩ := Finset.mem_image.mp he + obtain ⟨a, _, h⟩ := Finset.mem_image.mp hf + have hright := congrArg Prod.snd h + cases hright + have hOB : Disjoint ((originalEdges M).image originalLift) + ((betaEdges M).image betaLift) := by + apply Finset.disjoint_left.mpr + intro e he hf + obtain ⟨o, _, rfl⟩ := Finset.mem_image.mp he + obtain ⟨b, _, h⟩ := Finset.mem_image.mp hf + have hleft := congrArg Prod.fst h + cases hleft + have hAB : Disjoint ((alphaEdges M).image alphaLift) + ((betaEdges M).image betaLift) := by + apply Finset.disjoint_left.mpr + intro e he hf + obtain ⟨a, _, rfl⟩ := Finset.mem_image.mp he + obtain ⟨b, _, h⟩ := Finset.mem_image.mp hf + have hleft := congrArg Prod.fst h + cases hleft + calc + M.card = (((originalEdges M).image originalLift ∪ + (alphaEdges M).image alphaLift) ∪ (betaEdges M).image betaLift).card := + congrArg Finset.card (augmented_matching_eq_three_images hM) + _ = _ := by + rw [Finset.card_union_of_disjoint (Finset.disjoint_union_left.mpr ⟨hOB, hAB⟩), + Finset.card_union_of_disjoint hOA, + Finset.card_image_of_injective _ originalLift_injective, + Finset.card_image_of_injective _ alphaLift_injective, + Finset.card_image_of_injective _ betaLift_injective] + +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/AugmentedMatching.lean b/lean/OAI/Combinatorics/SecondNeighborhood/AugmentedMatching.lean new file mode 100644 index 0000000000000000000000000000000000000000..77cc84940f7a24d0ffc8a94db62fcf55fb0d9a73 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/AugmentedMatching.lean @@ -0,0 +1,106 @@ +import OAI.Combinatorics.SecondNeighborhood.AugmentedGraph +import OAI.Combinatorics.SecondNeighborhood.MatchingAugmented + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +open Bipartite + +variable {V : Type*} [Fintype V] [DecidableEq V] + {r : V → V → Prop} {R C : Finset (V × V)} + +private theorem alphaLift_image_isMatching + {N : Finset (↥(Z r R C) × ↥R)} + (hN : IsMatching (AlphaRelation r R C) N) : + IsMatching (fun a b => AugmentedEdge r R C a b ∧ b.isRight) + (N.image (alphaLift (r := r) (R := R) (C := C))) := by + classical + refine ⟨?_, ?_, ?_⟩ + · intro e he + obtain ⟨f, hf, rfl⟩ := Finset.mem_image.mp he + exact ⟨hN.1 f hf, by simp [alphaLift]⟩ + · intro e he f hf hef + obtain ⟨e', he', rfl⟩ := Finset.mem_image.mp he + obtain ⟨f', hf', rfl⟩ := Finset.mem_image.mp hf + exact congrArg alphaLift (hN.2.2 he' hf' (Sum.inl.inj hef)) + · intro e he f hf hef + obtain ⟨e', he', rfl⟩ := Finset.mem_image.mp he + obtain ⟨f', hf', rfl⟩ := Finset.mem_image.mp hf + exact congrArg alphaLift (hN.2.1 he' hf' (Sum.inr.inj hef)) + +private theorem betaLift_image_isMatching + {N : Finset (↥(Z r R C) × ↥C)} + (hN : IsMatching (BetaRelation r R C) N) : + IsMatching (fun a b => AugmentedEdge r R C a b ∧ ¬a.isLeft) + (N.image (betaLift (r := r) (R := R) (C := C))) := by + classical + refine ⟨?_, ?_, ?_⟩ + · intro e he + obtain ⟨f, hf, rfl⟩ := Finset.mem_image.mp he + exact ⟨hN.1 f hf, by simp [betaLift]⟩ + · intro e he f hf hef + obtain ⟨e', he', rfl⟩ := Finset.mem_image.mp he + obtain ⟨f', hf', rfl⟩ := Finset.mem_image.mp hf + exact congrArg betaLift (hN.2.1 he' hf' (Sum.inr.inj hef)) + · intro e he f hf hef + obtain ⟨e', he', rfl⟩ := Finset.mem_image.mp he + obtain ⟨f', hf', rfl⟩ := Finset.mem_image.mp hf + exact congrArg betaLift (hN.2.2 he' hf' (Sum.inl.inj hef)) + +theorem alphaEdges_isMaximumMatching + {M : Finset (LeftVertex r R C × RightVertex r R C)} + (hM : IsMatching (AugmentedEdge r R C) M) + (hα : IsMaximumMatching + (fun a b => AugmentedEdge r R C a b ∧ b.isRight) + (M.filter (fun e => e.2.isRight))) : + IsMaximumMatching (AlphaRelation r R C) (alphaEdges M) := by + classical + refine ⟨alphaEdges_isMatching hM, ?_⟩ + intro N hN + have h := hα.2 (N.image alphaLift) (alphaLift_image_isMatching hN) + rw [Finset.card_image_of_injective _ alphaLift_injective] at h + have hcard : (M.filter (fun e => e.2.isRight)).card = (alphaEdges M).card := by + rw [← alphaEdges_image hM, Finset.card_image_of_injective _ alphaLift_injective] + simpa only [hcard] using h + +theorem betaEdges_isMaximumMatching + {M : Finset (LeftVertex r R C × RightVertex r R C)} + (hM : IsMatching (AugmentedEdge r R C) M) + (hβ : IsMaximumMatching + (fun a b => AugmentedEdge r R C a b ∧ ¬a.isLeft) + (M.filter (fun e => ¬e.1.isLeft))) : + IsMaximumMatching (BetaRelation r R C) (betaEdges M) := by + classical + refine ⟨betaEdges_isMatching hM, ?_⟩ + intro N hN + have h := hβ.2 (N.image betaLift) (betaLift_image_isMatching hN) + rw [Finset.card_image_of_injective _ betaLift_injective] at h + have hfilter : M.filter (fun e => ¬e.1.isLeft) = + M.filter (fun e => e.1.isRight) := by + ext ⟨a, b⟩ + cases a <;> simp + have hcard : (M.filter (fun e => ¬e.1.isLeft)).card = (betaEdges M).card := by + rw [hfilter, ← betaEdges_image hM, + Finset.card_image_of_injective _ betaLift_injective] + simpa only [hcard] using h + +theorem exists_augmented_maximum_matching (r : V → V → Prop) + (R C : Finset (V × V)) : + ∃ M : Finset (LeftVertex r R C × RightVertex r R C), + IsMaximumMatching (AugmentedEdge r R C) M ∧ + IsMaximumMatching (AlphaRelation r R C) (alphaEdges M) ∧ + IsMaximumMatching (BetaRelation r R C) (betaEdges M) := by + classical + have hblock : ∀ a b, AugmentedEdge r R C a b → b.isRight → a.isLeft := by + intro a b hab hb + cases a <;> cases b <;> simp_all [AugmentedEdge] + obtain ⟨M, hM, hα, hβ⟩ := exists_maximum_matching_with_maximum_blocks + (fun a : LeftVertex r R C => a.isLeft) + (fun b : RightVertex r R C => b.isRight) hblock + exact ⟨M, hM, alphaEdges_isMaximumMatching hM.1 hα, + betaEdges_isMaximumMatching hM.1 hβ⟩ + +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/AugmentedRankBound.lean b/lean/OAI/Combinatorics/SecondNeighborhood/AugmentedRankBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..362a0f597a4dde207839c7d88021d0318a71211d --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/AugmentedRankBound.lean @@ -0,0 +1,53 @@ +import OAI.Combinatorics.SecondNeighborhood.AugmentedMatching +import OAI.Combinatorics.SecondNeighborhood.RankBoundFromMinors + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +open Bipartite + +variable {X : Type*} [Fintype X] [DecidableEq X] + +theorem augmented_matching_card_le_corners + (r : X → X → Prop) (R C : Finset (X × X)) + (M : Finset (LeftVertex r R C × RightVertex r R C)) + (hM : IsMatching (AugmentedEdge r R C) M) + (hα : IsMaximumMatching (AlphaRelation r R C) (alphaEdges M)) + (hβ : IsMaximumMatching (BetaRelation r R C) (betaEdges M)) : + M.card ≤ (Z r R C).card + (H r R C).card := by + classical + have hαrelation : matrixLSupport r R C = AlphaRelation r R C := by + funext z a + exact propext (matrixLSupport_iff_leftCovers r R C z a) + have hβrelation : matrixNTransposeSupport r R C = BetaRelation r R C := by + funext z b + exact propext (matrixNTransposeSupport_iff_rightCovers r R C z b) + have hα' : IsMaximumMatching (matrixLSupport r R C) (alphaEdges M) := by + rw [hαrelation] + exact hα + have hβ' : IsMaximumMatching (matrixNTransposeSupport r R C) (betaEdges M) := by + rw [hβrelation] + exact hβ + have hOriginal := originalEdges_isMatching hM + have hleft : Function.Injective (fun e : ↥(originalEdges M) => e.val.1) := by + intro e f hef + apply Subtype.ext + exact hOriginal.2.1 e.property f.property hef + have hright : Function.Injective (fun e : ↥(originalEdges M) => e.val.2) := by + intro e f hef + apply Subtype.ext + exact hOriginal.2.2 e.property f.property hef + have hbound := original_add_auxiliary_card_le_corners + r R C (alphaEdges M) (betaEdges M) hα' hβ' + (fun e : ↥(originalEdges M) => e.val.1) + (fun e : ↥(originalEdges M) => e.val.2) hleft hright + (fun e f => original_alpha_left_ne hM e.property f.property) + (fun e f => original_beta_right_ne hM e.property f.property) + (fun e => hOriginal.1 e.val e.property) + rw [augmented_matching_card hM] + simpa only [Fintype.card_coe] using hbound + +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/Basic.lean b/lean/OAI/Combinatorics/SecondNeighborhood/Basic.lean new file mode 100644 index 0000000000000000000000000000000000000000..f5e0bf54eff5215a9e8e0a219036a9e5b604451d --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/Basic.lean @@ -0,0 +1,188 @@ +import OAI.Combinatorics.SecondNeighborhood.Model + +namespace OAI + +namespace SeymourSecondNeighborhood + +variable {V : Type*} + +theorem IsOriented.of_asymmetric {r : V → V → Prop} + (h : ∀ {u v}, r u v → ¬ r v u) : IsOriented r where + loopless _ hv := h hv hv + asymmetric := h + +theorem IsOriented.mono {r s : V → V → Prop} + (hr : IsOriented r) (h : ∀ u v, s u v → r u v) : IsOriented s where + loopless v hv := hr.loopless v (h v v hv) + asymmetric huv hvu := hr.asymmetric (h _ _ huv) (h _ _ hvu) + +variable [Fintype V] [DecidableEq V] + +noncomputable section + +def image (r : V → V → Prop) (S : Finset V) : Finset V := by + classical + exact Finset.univ.filter (fun y => ∃ x ∈ S, r x y) + +def SecondNeighborhoodConjecture (r : V → V → Prop) : Prop := + ∃ v, GoodVertex r v + +omit [DecidableEq V] in +@[simp] theorem mem_image {r : V → V → Prop} {S : Finset V} {y : V} : + y ∈ image r S ↔ ∃ x ∈ S, r x y := by + classical + simp [image] + +omit [DecidableEq V] in +@[simp] theorem mem_firstNeighbors {r : V → V → Prop} {v w : V} : + w ∈ firstNeighbors r v ↔ r v w := by + classical + simp [firstNeighbors] + +@[simp] theorem mem_secondNeighbors {r : V → V → Prop} {v w : V} : + w ∈ secondNeighbors r v ↔ w ≠ v ∧ ¬ r v w ∧ ∃ u, r v u ∧ r u w := by + classical + simp [secondNeighbors] + +omit [DecidableEq V] in +@[simp] theorem image_empty (r : V → V → Prop) : image r ∅ = ∅ := by + classical + ext y + simp + +omit [DecidableEq V] in +@[simp] theorem image_singleton (r : V → V → Prop) (v : V) : + image r {v} = firstNeighbors r v := by + classical + ext y + simp + +omit [DecidableEq V] in +theorem image_mono (r : V → V → Prop) {S T : Finset V} (h : S ⊆ T) : + image r S ⊆ image r T := by + intro y hy + obtain ⟨x, hx, hxy⟩ := mem_image.mp hy + exact mem_image.mpr ⟨x, h hx, hxy⟩ + +omit [DecidableEq V] in +theorem image_relation_mono {r s : V → V → Prop} + (h : ∀ x y, r x y → s x y) (S : Finset V) : image r S ⊆ image s S := by + intro y hy + obtain ⟨x, hx, hxy⟩ := mem_image.mp hy + exact mem_image.mpr ⟨x, hx, h x y hxy⟩ + +@[simp] theorem image_union (r : V → V → Prop) (S T : Finset V) : + image r (S ∪ T) = image r S ∪ image r T := by + classical + ext y + constructor + · intro hy + obtain ⟨x, hx, hxy⟩ := mem_image.mp hy + rcases Finset.mem_union.mp hx with hx | hx + · exact Finset.mem_union.mpr (Or.inl (mem_image.mpr ⟨x, hx, hxy⟩)) + · exact Finset.mem_union.mpr (Or.inr (mem_image.mpr ⟨x, hx, hxy⟩)) + · intro hy + rcases Finset.mem_union.mp hy with hy | hy + · obtain ⟨x, hx, hxy⟩ := mem_image.mp hy + exact mem_image.mpr ⟨x, Finset.mem_union.mpr (Or.inl hx), hxy⟩ + · obtain ⟨x, hx, hxy⟩ := mem_image.mp hy + exact mem_image.mpr ⟨x, Finset.mem_union.mpr (Or.inr hx), hxy⟩ + +omit [DecidableEq V] in +theorem image_univ_eq_univ (r : V → V → Prop) (h : ∀ v, ∃ u, r u v) : + image r Finset.univ = Finset.univ := by + classical + ext y + constructor + · intro _ + exact Finset.mem_univ y + · intro _ + obtain ⟨x, hxy⟩ := h y + exact mem_image.mpr ⟨x, Finset.mem_univ x, hxy⟩ + +omit [DecidableEq V] in +theorem firstNeighbors_subset_image {r : V → V → Prop} {S : Finset V} + {v : V} (hv : v ∈ S) : firstNeighbors r v ⊆ image r S := by + intro w hw + exact mem_image.mpr ⟨v, hv, mem_firstNeighbors.mp hw⟩ + +omit [DecidableEq V] in +@[simp] theorem self_not_mem_firstNeighbors {r : V → V → Prop} + (hr : IsOriented r) (v : V) : v ∉ firstNeighbors r v := by + intro hv + exact hr.loopless v (mem_firstNeighbors.mp hv) + +@[simp] theorem self_not_mem_secondNeighbors (r : V → V → Prop) (v : V) : + v ∉ secondNeighbors r v := by + intro hv + exact (mem_secondNeighbors.mp hv).1 rfl + +theorem first_second_disjoint (r : V → V → Prop) (v : V) : + Disjoint (firstNeighbors r v) (secondNeighbors r v) := by + apply Finset.disjoint_left.mpr + intro w hfirst hsecond + exact (mem_secondNeighbors.mp hsecond).2.1 (mem_firstNeighbors.mp hfirst) + +omit [Fintype V] [DecidableEq V] in +theorem no_two_step_self {r : V → V → Prop} (hr : IsOriented r) (v : V) : + ¬ ∃ u, r v u ∧ r u v := by + rintro ⟨u, hvu, huv⟩ + exact hr.asymmetric hvu huv + +omit [DecidableEq V] in +theorem mem_image_image_singleton {r : V → V → Prop} {v w : V} : + w ∈ image r (image r {v}) ↔ ∃ u, r v u ∧ r u w := by + classical + simp + +theorem secondNeighbors_eq_image_sdiff {r : V → V → Prop} + (hr : IsOriented r) (v : V) : + secondNeighbors r v = image r (image r {v}) \ image r {v} := by + classical + ext w + constructor + · intro hw + obtain ⟨_, hnot, hpath⟩ := mem_secondNeighbors.mp hw + apply Finset.mem_sdiff.mpr + refine ⟨mem_image_image_singleton.mpr hpath, ?_⟩ + simpa using hnot + · intro hw + obtain ⟨hpath, hnot⟩ := Finset.mem_sdiff.mp hw + have hpath' := mem_image_image_singleton.mp hpath + apply mem_secondNeighbors.mpr + refine ⟨?_, ?_, hpath'⟩ + · intro heq + subst w + exact no_two_step_self hr v hpath' + · simpa using hnot + +omit [DecidableEq V] in +theorem sink_firstNeighbors_eq_empty {r : V → V → Prop} {v : V} + (hsink : ∀ w, ¬ r v w) : firstNeighbors r v = ∅ := by + classical + ext w + simp [hsink w] + +theorem sink_secondNeighbors_eq_empty {r : V → V → Prop} {v : V} + (hsink : ∀ w, ¬ r v w) : secondNeighbors r v = ∅ := by + classical + apply Finset.eq_empty_iff_forall_notMem.mpr + intro w hw + obtain ⟨_, _, u, hvu, _⟩ := mem_secondNeighbors.mp hw + exact hsink u hvu + +theorem sink_goodVertex {r : V → V → Prop} {v : V} + (hsink : ∀ w, ¬ r v w) : GoodVertex r v := by + unfold GoodVertex + rw [sink_firstNeighbors_eq_empty hsink, Finset.card_empty] + exact Nat.zero_le _ + +theorem exists_sink_implies_conjecture {r : V → V → Prop} + (hsink : ∃ v, ∀ w, ¬ r v w) : SecondNeighborhoodConjecture r := by + obtain ⟨v, hv⟩ := hsink + exact ⟨v, sink_goodVertex hv⟩ + +end +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/CompositeRankBound.lean b/lean/OAI/Combinatorics/SecondNeighborhood/CompositeRankBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..f29c622d75534e6ffde5f94a8e487ae4af248216 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/CompositeRankBound.lean @@ -0,0 +1,93 @@ +import OAI.Combinatorics.SecondNeighborhood.KernelIndependence +import Mathlib.LinearAlgebra.Dimension.Finrank +import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +open Matrix +open scoped Classical + +noncomputable section + +theorem matrix_rank_add_rank_le_rank_mul_add_card + {I J K : Type*} [Fintype I] [Fintype J] [Fintype K] + (L : Matrix J I ℝ) (N : Matrix K J ℝ) : + L.rank + N.rank ≤ (N * L).rank + Fintype.card J := by + let S : Submodule ℝ (J → ℝ) := LinearMap.range L.mulVecLin + let restricted : S →ₗ[ℝ] (K → ℝ) := N.mulVecLin.domRestrict S + have hrange : LinearMap.range restricted = LinearMap.range (N * L).mulVecLin := by + dsimp only [restricted] + rw [LinearMap.range_domRestrict, Matrix.mulVecLin_mul, LinearMap.range_comp] + have hkernel : Module.finrank ℝ (LinearMap.ker restricted) ≤ + Module.finrank ℝ (LinearMap.ker N.mulVecLin) := by + rw [← Submodule.finrank_map_subtype_eq S (LinearMap.ker restricted)] + change Module.finrank ℝ + ((LinearMap.ker (N.mulVecLin.domRestrict S)).map S.subtype) ≤ _ + rw [LinearMap.ker_domRestrict, Submodule.map_comap_subtype] + exact Submodule.finrank_mono inf_le_right + have hrestricted : (N * L).rank + + Module.finrank ℝ (LinearMap.ker restricted) = L.rank := by + change Module.finrank ℝ (LinearMap.range (N * L).mulVecLin) + + Module.finrank ℝ (LinearMap.ker restricted) = Module.finrank ℝ S + rw [← hrange] + exact LinearMap.finrank_range_add_finrank_ker restricted + have hfull : N.rank + Module.finrank ℝ (LinearMap.ker N.mulVecLin) = + Fintype.card J := by + simpa only [Matrix.rank, Module.finrank_pi] using + LinearMap.finrank_range_add_finrank_ker N.mulVecLin + calc + L.rank + N.rank = + ((N * L).rank + Module.finrank ℝ (LinearMap.ker restricted)) + N.rank := by + rw [hrestricted] + _ ≤ ((N * L).rank + Module.finrank ℝ (LinearMap.ker N.mulVecLin)) + N.rank := + Nat.add_le_add_right (Nat.add_le_add_left hkernel _) _ + _ = (N * L).rank + + (Module.finrank ℝ (LinearMap.ker N.mulVecLin) + N.rank) := Nat.add_assoc _ _ _ + _ = (N * L).rank + Fintype.card J := by + rw [Nat.add_comm (Module.finrank ℝ (LinearMap.ker N.mulVecLin)) N.rank, hfull] + +variable {X : Type*} [Fintype X] [DecidableEq X] + +theorem matrixL_rank_add_matrixN_rank_le_rank_composite_add_card_Z + (r : X → X → Prop) (R C : Finset (X × X)) (a b : X → X → ℝ) : + (matrixL r R C a).rank + (matrixN r R C b).rank ≤ + (matrixN r R C b * matrixL r R C a).rank + (Z r R C).card := by + simpa only [Fintype.card_coe] using + matrix_rank_add_rank_le_rank_mul_add_card (matrixL r R C a) (matrixN r R C b) + +theorem card_add_rank_matrixL_add_rank_matrixN_le_card_Z_add_card_H_of_lifts + {E : Type*} [Fintype E] + (r : X → X → Prop) (R C : Finset (X × X)) (a b : X → X → ℝ) + (ha : SupportedCoefficients r a) (hb : SupportedCoefficients r b) + (hmax : LocalMaximalRanks r R C b) + (left : E → ↥R) (right : E → ↥C) + (U : E → (↥R → ℝ)) (W : E → (↥C → ℝ)) + (hU : ∀ e, matrixL r R C a *ᵥ U e = 0) + (hW : ∀ e, (matrixN r R C b)ᵀ *ᵥ W e = 0) + (hWcoordinate : ∀ e, W e (right e) = 1) + (hUcoordinate : ∀ e f, U e (left f) = if e = f then 1 else 0) + (hconflict : ∀ e, Conflict r (left e).val (right e).val) : + Fintype.card E + (matrixL r R C a).rank + (matrixN r R C b).rank ≤ + (Z r R C).card + (H r R C).card := by + have hcomposite := matrixL_rank_add_matrixN_rank_le_rank_composite_add_card_Z + r R C a b + have hkernel := card_add_rank_matrixN_mul_matrixL_le_card_H_of_lifts + r R C a b ha hb hmax left right U W hU hW hWcoordinate hUcoordinate hconflict + calc + Fintype.card E + (matrixL r R C a).rank + (matrixN r R C b).rank = + Fintype.card E + ((matrixL r R C a).rank + (matrixN r R C b).rank) := + Nat.add_assoc _ _ _ + _ ≤ Fintype.card E + + ((matrixN r R C b * matrixL r R C a).rank + (Z r R C).card) := + Nat.add_le_add_left hcomposite _ + _ = (Fintype.card E + (matrixN r R C b * matrixL r R C a).rank) + + (Z r R C).card := (Nat.add_assoc _ _ _).symm + _ ≤ (H r R C).card + (Z r R C).card := Nat.add_le_add_right hkernel _ + _ = (Z r R C).card + (H r R C).card := Nat.add_comm _ _ + +end +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/CoverPruning.lean b/lean/OAI/Combinatorics/SecondNeighborhood/CoverPruning.lean new file mode 100644 index 0000000000000000000000000000000000000000..66dda0094ea10d9ca5de92dffb31b36c3ecc38f0 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/CoverPruning.lean @@ -0,0 +1,142 @@ +import OAI.Combinatorics.SecondNeighborhood.AugmentedGraph +import OAI.Combinatorics.SecondNeighborhood.MatchingCover +import Mathlib.Data.Finset.Sum + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +open Bipartite + +variable {V : Type*} [Fintype V] [DecidableEq V] + +private theorem exists_pruning_of_augmented_cover + (r : V → V → Prop) (R C : Finset (V × V)) + (A : Finset (LeftVertex r R C)) (B : Finset (RightVertex r R C)) + (hcover : IsVertexCover (AugmentedEdge r R C) A B) + (hA : ∀ a ∈ A, ∃ b, AugmentedEdge r R C a b) + (hB : ∀ b ∈ B, ∃ a, AugmentedEdge r R C a b) + (hbound : A.card + B.card ≤ (H r R C).card + (Z r R C).card) : + ∃ R' C', PruningResult r R C R' C' := by + classical + let DR : Finset (V × V) := A.toLeft.image (fun a : R => (a : V × V)) + let DC : Finset (V × V) := B.toLeft.image (fun b : C => (b : V × V)) + let R' : Finset (V × V) := R \ DR + let C' : Finset (V × V) := C \ DC + have hDR : DR ⊆ R := by + intro a ha + obtain ⟨a', _, rfl⟩ := Finset.mem_image.mp ha + exact a'.property + have hDC : DC ⊆ C := by + intro b hb + obtain ⟨b', _, rfl⟩ := Finset.mem_image.mp hb + exact b'.property + have hR' : R' ⊆ R := Finset.sdiff_subset + have hC' : C' ⊆ C := Finset.sdiff_subset + have hsurvL (a : R) (ha : (a : V × V) ∈ R') : Sum.inl a ∉ A := by + intro haA + exact (Finset.mem_sdiff.mp ha).2 + (Finset.mem_image_of_mem _ (Finset.mem_toLeft.mpr haA)) + have hsurvR (b : C) (hb : (b : V × V) ∈ C') : Sum.inl b ∉ B := by + intro hbB + exact (Finset.mem_sdiff.mp hb).2 + (Finset.mem_image_of_mem _ (Finset.mem_toLeft.mpr hbB)) + have hconflictFree : ConflictFree r R' C' := by + intro a ha b hb hab + let a' : R := ⟨a, hR' ha⟩ + let b' : C := ⟨b, hC' hb⟩ + rcases hcover (Sum.inl a') (Sum.inl b') hab with haA | hbB + · exact hsurvL a' ha haA + · exact hsurvR b' hb hbB + have hretainL : ∀ a ∈ R, (∀ b ∈ C, ¬ Conflict r a b) → a ∈ R' := by + intro a ha hfree + apply Finset.mem_sdiff.mpr + refine ⟨ha, ?_⟩ + intro haDR + obtain ⟨a', haA, hval⟩ := Finset.mem_image.mp haDR + obtain ⟨b, hab⟩ := hA (Sum.inl a') (Finset.mem_toLeft.mp haA) + cases b with + | inl b => + change Conflict r (a' : V × V) (b : V × V) at hab + apply hfree b b.property + simpa only [hval] using hab + | inr z => + change LeftCovers r (a' : V × V) (z : V × V) at hab + apply conflictFree_left_not_covers_Z hfree z.property + simpa only [hval] using hab + have hretainR : ∀ b ∈ C, (∀ a ∈ R, ¬ Conflict r a b) → b ∈ C' := by + intro b hb hfree + apply Finset.mem_sdiff.mpr + refine ⟨hb, ?_⟩ + intro hbDC + obtain ⟨b', hbB, hval⟩ := Finset.mem_image.mp hbDC + obtain ⟨a, hab⟩ := hB (Sum.inl b') (Finset.mem_toLeft.mp hbB) + cases a with + | inl a => + change Conflict r (a : V × V) (b' : V × V) at hab + apply hfree a a.property + simpa only [hval] using hab + | inr z => + change RightCovers r (b' : V × V) (z : V × V) at hab + apply conflictFree_right_not_covers_Z hfree z.property + simpa only [hval] using hab + let T : Finset (V × V) := (Z r R C).filter (Covered r R' C') + have hcharged : T ⊆ (A.toRight ∪ B.toRight).image + (fun z : Z r R C => (z : V × V)) := by + intro z hz + obtain ⟨hzZ, hzcovered⟩ := Finset.mem_filter.mp hz + let z' : Z r R C := ⟨z, hzZ⟩ + apply Finset.mem_image.mpr + refine ⟨z', ?_, rfl⟩ + rcases hzcovered with hzL | hzR + · obtain ⟨a, ha, haz⟩ := exists_leftCovers_iff.mpr hzL + let a' : R := ⟨a, hR' ha⟩ + have hzB : Sum.inr z' ∈ B := + (hcover (Sum.inl a') (Sum.inr z') haz).resolve_left (hsurvL a' ha) + exact Finset.mem_union_right _ (Finset.mem_toRight.mpr hzB) + · obtain ⟨b, hb, hbz⟩ := exists_rightCovers_iff.mpr hzR + let b' : C := ⟨b, hC' hb⟩ + have hzA : Sum.inr z' ∈ A := + (hcover (Sum.inr z') (Sum.inl b') hbz).resolve_right (hsurvR b' hb) + exact Finset.mem_union_left _ (Finset.mem_toRight.mpr hzA) + have hTcard : T.card ≤ A.toRight.card + B.toRight.card := by + calc + T.card ≤ ((A.toRight ∪ B.toRight).image + (fun z : Z r R C => (z : V × V))).card := Finset.card_le_card hcharged + _ = (A.toRight ∪ B.toRight).card := + Finset.card_image_of_injective _ Subtype.val_injective + _ ≤ A.toRight.card + B.toRight.card := Finset.card_union_le _ _ + have hpartition : T.card + (uncoveredZ r R C R' C').card = (Z r R C).card := by + exact Finset.card_filter_add_card_filter_not + (s := Z r R C) (Covered r R' C') + have hdelL : (R \ R').card = A.toLeft.card := by + change (R \ (R \ DR)).card = A.toLeft.card + rw [Finset.sdiff_sdiff_eq_self hDR] + exact Finset.card_image_of_injective _ Subtype.val_injective + have hdelR : (C \ C').card = B.toLeft.card := by + change (C \ (C \ DC)).card = B.toLeft.card + rw [Finset.sdiff_sdiff_eq_self hDC] + exact Finset.card_image_of_injective _ Subtype.val_injective + have hAsplit : A.toLeft.card + A.toRight.card = A.card := + Finset.card_toLeft_add_card_toRight + have hBsplit : B.toLeft.card + B.toRight.card = B.card := + Finset.card_toLeft_add_card_toRight + refine ⟨R', C', hR', hC', hconflictFree, hretainL, hretainR, ?_⟩ + rw [hdelL, hdelR] + omega + +theorem exists_pruning_of_augmented_matching_bound + (r : V → V → Prop) (R C : Finset (V × V)) + (M : Finset (LeftVertex r R C × RightVertex r R C)) + (hM : IsMaximumMatching (AugmentedEdge r R C) M) + (hbound : M.card ≤ (H r R C).card + (Z r R C).card) : + ∃ R' C', PruningResult r R C R' C' := by + classical + obtain ⟨A, B, hcover, hcard, hA, hB⟩ := + exists_vertexCover_card_eq_of_isMaximumMatching hM + exact exists_pruning_of_augmented_cover r R C A B hcover hA hB + (hcard.trans_le hbound) + +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/Deletion.lean b/lean/OAI/Combinatorics/SecondNeighborhood/Deletion.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e3e35e5fc3059e39961d964d88637403149b845 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/Deletion.lean @@ -0,0 +1,259 @@ +import OAI.Combinatorics.SecondNeighborhood.ReductionCore +import Mathlib.Tactic.Tauto +import Lean.Elab.Tactic.Omega + +namespace OAI + +namespace SeymourSecondNeighborhood + +variable {V : Type*} [Fintype V] [DecidableEq V] + +noncomputable def deficitPotential (r : V → V → Prop) (S T : Finset V) : ℕ := + (image r T \ ((image r S ∩ S) ∪ T)).card + +@[simp] theorem deficitPotential_empty (r : V → V → Prop) (S : Finset V) : + deficitPotential r S ∅ = 0 := by + classical + simp [deficitPotential] + +omit [Fintype V] in + +private theorem card_add_loss_le_card_add_gain + (old new loss gain : Finset V) (hloss : loss ⊆ old) + (hdisjoint : Disjoint loss new) (hgain : new \ old ⊆ gain) : + new.card + loss.card ≤ old.card + gain.card := by + classical + have hsubset : new ⊆ (old \ loss) ∪ gain := by + intro x hx + by_cases hxo : x ∈ old + · apply Finset.mem_union.mpr + left + apply Finset.mem_sdiff.mpr + refine ⟨hxo, ?_⟩ + intro hxl + exact Finset.disjoint_left.mp hdisjoint hxl hx + · exact Finset.mem_union.mpr (Or.inr (hgain (Finset.mem_sdiff.mpr ⟨hx, hxo⟩))) + have hcard := (Finset.card_le_card hsubset).trans + (Finset.card_union_le (old \ loss) gain) + have hpartition := Finset.card_sdiff_add_card_eq_card hloss + omega + +private theorem image_sdiff_union_card_balance (r : V → V → Prop) + (I T Q : Finset V) (hdisjoint : Disjoint Q (I ∪ T)) : + (image r (T ∪ Q) \ (I ∪ (T ∪ Q))).card + (Q ∩ image r T).card = + (image r T \ (I ∪ T)).card + + (image r Q \ (I ∪ T ∪ Q ∪ image r T)).card := by + classical + let A := image r T \ (I ∪ T) + let C := image r Q \ (I ∪ T ∪ Q ∪ image r T) + have hsplit : image r (T ∪ Q) \ (I ∪ (T ∪ Q)) = (A \ Q) ∪ C := by + ext x + simp only [A, C, image_union, Finset.mem_sdiff, Finset.mem_union] + tauto + have hpieces : Disjoint (A \ Q) C := by + apply Finset.disjoint_left.mpr + intro x hx hy + simp only [A, C, Finset.mem_sdiff, Finset.mem_union] at hx hy + tauto + have hinter : A ∩ Q = Q ∩ image r T := by + ext x + constructor + · intro hx + obtain ⟨hxA, hxQ⟩ := Finset.mem_inter.mp hx + exact Finset.mem_inter.mpr ⟨hxQ, (Finset.mem_sdiff.mp hxA).1⟩ + · intro hx + obtain ⟨hxQ, hximage⟩ := Finset.mem_inter.mp hx + apply Finset.mem_inter.mpr + refine ⟨Finset.mem_sdiff.mpr ⟨hximage, ?_⟩, hxQ⟩ + exact Finset.disjoint_left.mp hdisjoint hxQ + have hpartition := Finset.card_sdiff_add_card_inter A Q + rw [hinter] at hpartition + rw [hsplit, Finset.card_union_of_disjoint hpieces] + change (A \ Q).card + C.card + (Q ∩ image r T).card = A.card + C.card + omega + +theorem deficitPotential_step (r : V → V → Prop) (hr : IsOriented r) + (hcounter : Counterexample r) (hminimal : ArcMinimal r) + (S T : Finset V) (hT : T ⊆ image r S \ S) + (hproper : T ≠ image r S \ S) : + ∃ Q : Finset V, Q.Nonempty ∧ Q ⊆ (image r S \ S) \ T ∧ + deficitPotential r S (T ∪ Q) < deficitPotential r S T + Q.card := by + classical + let I := image r S ∩ S + let E := image r S \ S + let s : V → V → Prop := fun x y => r x y ∧ ¬ (x ∈ S ∧ y ∈ E \ T) + have hs : IsOriented s := hr.mono (fun _ _ h => h.1) + have hremain : (E \ T).Nonempty := by + by_contra hn + have hET : E ⊆ T := by + intro y hy + by_contra hyT + exact hn ⟨y, Finset.mem_sdiff.mpr ⟨hy, hyT⟩⟩ + exact hproper (Finset.Subset.antisymm hT hET) + obtain ⟨b, hb⟩ := hremain + have hbE := (Finset.mem_sdiff.mp hb).1 + have hbimage := (Finset.mem_sdiff.mp hbE).1 + obtain ⟨a, haS, hab⟩ := mem_image.mp hbimage + have harcSubset : arcSet s ⊆ arcSet r := by + apply arcSet_mono + intro x y hxy + exact hxy.1 + have harcStrict : (arcSet s).card < (arcSet r).card := by + apply Finset.card_lt_card + refine ⟨harcSubset, ?_⟩ + intro hreverse + have habmem : (a, b) ∈ arcSet r := mem_arcSet.mpr hab + have hsab : s a b := mem_arcSet.mp (hreverse habmem) + exact hsab.2 ⟨haS, hb⟩ + have hnotCounter : ¬ Counterexample s := by + intro hc + exact (Nat.not_le_of_lt harcStrict) (hminimal s hs hc) + have hgood : ∃ v, (firstNeighbors s v).card ≤ (secondNeighbors s v).card := by + by_contra hn + apply hnotCounter + intro v + exact Nat.lt_of_not_ge (fun hv => hn ⟨v, hv⟩) + obtain ⟨v, hvGood⟩ := hgood + have hlost : ∃ q, r v q ∧ ¬ s v q := by + by_contra hn + have hkeep : ∀ q, r v q → s v q := by + intro q hvq + by_contra hsfalse + exact hn ⟨q, hvq, hsfalse⟩ + have hfirst : firstNeighbors r v ⊆ firstNeighbors s v := by + intro q hq + exact mem_firstNeighbors.mpr (hkeep q (mem_firstNeighbors.mp hq)) + have hsecond : secondNeighbors s v ⊆ secondNeighbors r v := by + intro w hw + obtain ⟨hwv, hnsvw, u, hsvu, hsuw⟩ := mem_secondNeighbors.mp hw + apply mem_secondNeighbors.mpr + exact ⟨hwv, (fun hvw => hnsvw (hkeep w hvw)), u, hsvu.1, hsuw.1⟩ + have hfirstCard := Finset.card_le_card hfirst + have hsecondCard := Finset.card_le_card hsecond + have hvBad := hcounter v + omega + obtain ⟨q, hvq, hnsvq⟩ := hlost + have hcut : v ∈ S ∧ q ∈ E \ T := by + by_contra hn + exact hnsvq ⟨hvq, hn⟩ + have hvS := hcut.1 + let Q := firstNeighbors r v ∩ (E \ T) + have hQnonempty : Q.Nonempty := + ⟨q, Finset.mem_inter.mpr ⟨mem_firstNeighbors.mpr hvq, hcut.2⟩⟩ + have hQsubset : Q ⊆ E \ T := by + intro x hx + exact (Finset.mem_inter.mp hx).2 + have hQfirst : Q ⊆ firstNeighbors r v := by + intro x hx + exact (Finset.mem_inter.mp hx).1 + have hQdisjoint : Disjoint Q (I ∪ T) := by + apply Finset.disjoint_left.mpr + intro x hxQ hxIT + obtain ⟨hxE, hxnotT⟩ := Finset.mem_sdiff.mp (hQsubset hxQ) + have hxnotS := (Finset.mem_sdiff.mp hxE).2 + rcases Finset.mem_union.mp hxIT with hxI | hxT + · exact hxnotS (Finset.mem_inter.mp hxI).2 + · exact hxnotT hxT + have hfirstEq : firstNeighbors s v = firstNeighbors r v \ Q := by + ext x + constructor + · intro hx + have hsx := mem_firstNeighbors.mp hx + apply Finset.mem_sdiff.mpr + refine ⟨mem_firstNeighbors.mpr hsx.1, ?_⟩ + intro hxQ + exact hsx.2 ⟨hvS, hQsubset hxQ⟩ + · intro hx + obtain ⟨hxr, hxnotQ⟩ := Finset.mem_sdiff.mp hx + apply mem_firstNeighbors.mpr + refine ⟨mem_firstNeighbors.mp hxr, ?_⟩ + rintro ⟨_, hxET⟩ + exact hxnotQ (Finset.mem_inter.mpr ⟨hxr, hxET⟩) + have hfirstCard : (firstNeighbors s v).card + Q.card = (firstNeighbors r v).card := by + rw [hfirstEq] + exact Finset.card_sdiff_add_card_eq_card hQfirst + have hfirstCover : firstNeighbors r v ⊆ (I ∪ T) ∪ Q := by + intro x hx + have hximage := firstNeighbors_subset_image hvS hx + by_cases hxS : x ∈ S + · exact Finset.mem_union.mpr (Or.inl (Finset.mem_union.mpr + (Or.inl (Finset.mem_inter.mpr ⟨hximage, hxS⟩)))) + · by_cases hxT : x ∈ T + · exact Finset.mem_union.mpr (Or.inl (Finset.mem_union.mpr (Or.inr hxT))) + · exact Finset.mem_union.mpr (Or.inr (Finset.mem_inter.mpr + ⟨hx, Finset.mem_sdiff.mpr ⟨Finset.mem_sdiff.mpr ⟨hximage, hxS⟩, hxT⟩⟩)) + have hfirstNewCover : firstNeighbors s v ⊆ I ∪ T := by + intro x hx + rw [hfirstEq] at hx + obtain ⟨hxr, hxnotQ⟩ := Finset.mem_sdiff.mp hx + rcases Finset.mem_union.mp (hfirstCover hxr) with hxIT | hxQ + · exact hxIT + · exact False.elim (hxnotQ hxQ) + have hsourceCover : ∀ u ∈ S, ∀ x, s u x → x ∈ I ∪ T := by + intro u huS x hsux + have hximage : x ∈ image r S := mem_image.mpr ⟨u, huS, hsux.1⟩ + by_cases hxS : x ∈ S + · exact Finset.mem_union.mpr (Or.inl (Finset.mem_inter.mpr ⟨hximage, hxS⟩)) + · by_cases hxT : x ∈ T + · exact Finset.mem_union.mpr (Or.inr hxT) + · exact False.elim (hsux.2 ⟨huS, + Finset.mem_sdiff.mpr ⟨Finset.mem_sdiff.mpr ⟨hximage, hxS⟩, hxT⟩⟩) + have hpathCover : ∀ x, (∃ u, s v u ∧ s u x) → x ∈ (I ∪ T) ∪ image r T := by + intro x hx + obtain ⟨u, hsvu, hsux⟩ := hx + rcases Finset.mem_union.mp (hfirstNewCover (mem_firstNeighbors.mpr hsvu)) with huI | huT + · exact Finset.mem_union.mpr + (Or.inl (hsourceCover u (Finset.mem_inter.mp huI).2 x hsux)) + · exact Finset.mem_union.mpr (Or.inr (mem_image.mpr ⟨u, huT, hsux.1⟩)) + let B := Q ∩ image r T + let C := image r Q \ (I ∪ T ∪ Q ∪ image r T) + have hgain : secondNeighbors s v \ secondNeighbors r v ⊆ B := by + intro x hx + obtain ⟨hxnew, hxnotOld⟩ := Finset.mem_sdiff.mp hx + obtain ⟨hxv, hnsvx, u, hsvu, hsux⟩ := mem_secondNeighbors.mp hxnew + have hrvx : r v x := by + by_contra hn + exact hxnotOld (mem_secondNeighbors.mpr ⟨hxv, hn, u, hsvu.1, hsux.1⟩) + have hxcut : v ∈ S ∧ x ∈ E \ T := by + by_contra hn + exact hnsvx ⟨hrvx, hn⟩ + have hxQ : x ∈ Q := Finset.mem_inter.mpr ⟨mem_firstNeighbors.mpr hrvx, hxcut.2⟩ + apply Finset.mem_inter.mpr + refine ⟨hxQ, ?_⟩ + rcases Finset.mem_union.mp (hpathCover x ⟨u, hsvu, hsux⟩) with hxIT | hximage + · exact False.elim (Finset.disjoint_left.mp hQdisjoint hxQ hxIT) + · exact hximage + have hloss : C ⊆ secondNeighbors r v := by + intro x hx + obtain ⟨hximage, hxnot⟩ := Finset.mem_sdiff.mp hx + obtain ⟨u, huQ, hrux⟩ := mem_image.mp hximage + have hrvu := mem_firstNeighbors.mp (hQfirst huQ) + apply mem_secondNeighbors.mpr + refine ⟨?_, ?_, u, hrvu, hrux⟩ + · intro hxv + subst x + exact hr.asymmetric hrvu hrux + · intro hrvx + exact hxnot (Finset.mem_union.mpr + (Or.inl (hfirstCover (mem_firstNeighbors.mpr hrvx)))) + have hlossDisjoint : Disjoint C (secondNeighbors s v) := by + apply Finset.disjoint_left.mpr + intro x hxC hxnew + have hxnot := (Finset.mem_sdiff.mp hxC).2 + have hxcover := hpathCover x (mem_secondNeighbors.mp hxnew).2.2 + apply hxnot + rcases Finset.mem_union.mp hxcover with hxIT | hximage + · exact Finset.mem_union.mpr (Or.inl (Finset.mem_union.mpr (Or.inl hxIT))) + · exact Finset.mem_union.mpr (Or.inr hximage) + have hsecondCard := card_add_loss_le_card_add_gain + (secondNeighbors r v) (secondNeighbors s v) C B hloss hlossDisjoint hgain + have hbalance : deficitPotential r S (T ∪ Q) + B.card = + deficitPotential r S T + C.card := by + exact image_sdiff_union_card_balance r I T Q hQdisjoint + have hvBad := hcounter v + refine ⟨Q, hQnonempty, hQsubset, ?_⟩ + omega + +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/ExtremalCompatibility.lean b/lean/OAI/Combinatorics/SecondNeighborhood/ExtremalCompatibility.lean new file mode 100644 index 0000000000000000000000000000000000000000..db381a97323a51034c8c9af91e4c26f538e71973 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/ExtremalCompatibility.lean @@ -0,0 +1,207 @@ +import OAI.Combinatorics.SecondNeighborhood.ExtremalImages + +namespace OAI + +namespace SeymourSecondNeighborhood.Extremal + +open Pruning + +variable {V : Type*} [Fintype V] [DecidableEq V] + +noncomputable section + +abbrev Compatible (r : V → V → Prop) (P Q : Finset (V × V)) : Prop := + ConflictFree r P Q + +structure Admissible (r : V → V → Prop) (P Q : Finset (V × V)) : Prop where + compatible : Compatible r P Q + diagonal_left : diagonal ⊆ P + diagonal_right : diagonal ⊆ Q + +def leftCandidate (r : V → V → Prop) (Q : Finset (V × V)) : Finset (V × V) := + Finset.univ \ rightImage r (rightImage r Q) + +def rightCandidate (r : V → V → Prop) (P : Finset (V × V)) : Finset (V × V) := + Finset.univ \ leftImage r (leftImage r P) + +def uncovered (r : V → V → Prop) (P Q : Finset (V × V)) : Finset (V × V) := + Finset.univ \ (leftImage r P ∪ rightImage r Q) + +@[simp] theorem mem_leftCandidate {r : V → V → Prop} {Q : Finset (V × V)} + {z : V × V} : z ∈ leftCandidate r Q ↔ z ∉ rightImage r (rightImage r Q) := by + classical + simp [leftCandidate] + +@[simp] theorem mem_rightCandidate {r : V → V → Prop} {P : Finset (V × V)} + {z : V × V} : z ∈ rightCandidate r P ↔ z ∉ leftImage r (leftImage r P) := by + classical + simp [rightCandidate] + +@[simp] theorem mem_uncovered {r : V → V → Prop} {P Q : Finset (V × V)} + {z : V × V} : z ∈ uncovered r P Q ↔ ¬ Covered r P Q z := by + classical + simp [uncovered, Covered] + +theorem diagonal_compatible {r : V → V → Prop} (hr : IsOriented r) : + Compatible r (diagonal : Finset (V × V)) diagonal := by + intro a ha b hb hc + have ha' := mem_diagonal.mp ha + have hb' := mem_diagonal.mp hb + have hreverse : r b.1 a.1 := by + simpa only [← ha', ← hb'] using hc.2 + exact hr.asymmetric hc.1 hreverse + +theorem diagonal_admissible {r : V → V → Prop} (hr : IsOriented r) : + Admissible r (diagonal : Finset (V × V)) diagonal where + compatible := diagonal_compatible hr + diagonal_left := fun _ h => h + diagonal_right := fun _ h => h + +theorem column_nonempty_of_diagonal {P : Finset (V × V)} + (hP : diagonal ⊆ P) (j : V) : (column P j).Nonempty := by + refine ⟨j, mem_column.mpr ?_⟩ + exact hP (diagonal_mem j) + +theorem row_nonempty_of_diagonal {Q : Finset (V × V)} + (hQ : diagonal ⊆ Q) (i : V) : (row Q i).Nonempty := by + refine ⟨i, mem_row.mpr ?_⟩ + exact hQ (diagonal_mem i) + +theorem column_ne_univ_of_compatible {r : V → V → Prop} {P Q : Finset (V × V)} + (hc : Compatible r P Q) (hQ : diagonal ⊆ Q) + (hpos : PositiveIndegree r) (j : V) : column P j ≠ Finset.univ := by + intro hfull + obtain ⟨w, hwj⟩ := hpos j + obtain ⟨p, hpw⟩ := hpos w + have hp : (p, j) ∈ P := by + apply mem_column.mp + rw [hfull] + exact Finset.mem_univ p + exact hc (p, j) hp (w, w) (hQ (diagonal_mem w)) ⟨hpw, hwj⟩ + +theorem row_ne_univ_of_compatible {r : V → V → Prop} {P Q : Finset (V × V)} + (hc : Compatible r P Q) (hP : diagonal ⊆ P) + (hpos : PositiveIndegree r) (i : V) : row Q i ≠ Finset.univ := by + intro hfull + obtain ⟨w, hwi⟩ := hpos i + obtain ⟨s, hsw⟩ := hpos w + have hs : (i, s) ∈ Q := by + apply mem_row.mp + rw [hfull] + exact Finset.mem_univ s + exact hc (w, w) (hP (diagonal_mem w)) (i, s) hs ⟨hwi, hsw⟩ + +theorem Admissible.strict_leftImage_growth [Nonempty V] + {r : V → V → Prop} {P Q : Finset (V × V)} (h : Admissible r P Q) + (hpos : PositiveIndegree r) (hgrowth : StrictSubsetGrowth r) : + P.card + (leftImage r (leftImage r P)).card < 2 * (leftImage r P).card := + Extremal.strict_leftImage_growth r P hgrowth + (column_nonempty_of_diagonal h.diagonal_left) + (column_ne_univ_of_compatible h.compatible h.diagonal_right hpos) + +theorem Admissible.strict_rightImage_growth [Nonempty V] + {r : V → V → Prop} {P Q : Finset (V × V)} (h : Admissible r P Q) + (hpos : PositiveIndegree r) (hgrowth : StrictSubsetGrowth r) : + Q.card + (rightImage r (rightImage r Q)).card < 2 * (rightImage r Q).card := + Extremal.strict_rightImage_growth r Q hgrowth + (row_nonempty_of_diagonal h.diagonal_right) + (row_ne_univ_of_compatible h.compatible h.diagonal_left hpos) + +theorem diagonal_subset_leftCandidate {r : V → V → Prop} + {P Q : Finset (V × V)} (hc : Compatible r P Q) (hP : diagonal ⊆ P) : + diagonal ⊆ leftCandidate r Q := by + intro z hz + rcases z with ⟨v, w⟩ + have heq : v = w := mem_diagonal.mp hz + subst w + apply mem_leftCandidate.mpr + intro hsecond + obtain ⟨s, hvs, hsv⟩ := mem_rightImage.mp hsecond + have hleft : (v, s) ∈ leftImage r P := + mem_leftImage.mpr ⟨s, hP (diagonal_mem s), hsv⟩ + exact Finset.disjoint_left.mp (conflictFree_iff_disjoint.mp hc) hleft hvs + +theorem diagonal_subset_rightCandidate {r : V → V → Prop} + {P Q : Finset (V × V)} (hc : Compatible r P Q) (hQ : diagonal ⊆ Q) : + diagonal ⊆ rightCandidate r P := by + intro z hz + rcases z with ⟨v, w⟩ + have heq : v = w := mem_diagonal.mp hz + subst w + apply mem_rightCandidate.mpr + intro hsecond + obtain ⟨p, hpv, hpvArc⟩ := mem_leftImage.mp hsecond + have hright : (p, v) ∈ rightImage r Q := + mem_rightImage.mpr ⟨p, hQ (diagonal_mem p), hpvArc⟩ + exact Finset.disjoint_left.mp (conflictFree_iff_disjoint.mp hc) hpv hright + +theorem diagonal_left_conflictFree {r : V → V → Prop} {P : Finset (V × V)} + (hP : diagonal ⊆ P) {a : V × V} (ha : a ∈ diagonal) : + ∀ b ∈ rightCandidate r P, ¬ Conflict r a b := by + rcases a with ⟨v, w⟩ + have heq : v = w := mem_diagonal.mp ha + subst w + intro b hb hc + apply mem_rightCandidate.mp hb + apply mem_leftImage.mpr + refine ⟨v, ?_, hc.1⟩ + exact mem_leftImage.mpr ⟨b.2, hP (diagonal_mem b.2), hc.2⟩ + +theorem diagonal_right_conflictFree {r : V → V → Prop} {Q : Finset (V × V)} + (hQ : diagonal ⊆ Q) {b : V × V} (hb : b ∈ diagonal) : + ∀ a ∈ leftCandidate r Q, ¬ Conflict r a b := by + rcases b with ⟨v, w⟩ + have heq : v = w := mem_diagonal.mp hb + subst w + intro a ha hc + apply mem_leftCandidate.mp ha + apply mem_rightImage.mpr + refine ⟨v, ?_, hc.2⟩ + exact mem_rightImage.mpr ⟨a.1, hQ (diagonal_mem a.1), hc.1⟩ + +theorem H_candidates_subset_uncovered (r : V → V → Prop) (P Q : Finset (V × V)) : + H r (leftCandidate r Q) (rightCandidate r P) ⊆ uncovered r P Q := by + intro z hz + obtain ⟨i, j, hleft, hright, hpi, hsj⟩ := mem_H.mp hz + apply mem_uncovered.mpr + intro hcovered + rcases hcovered with hcovered | hcovered + · apply mem_rightCandidate.mp hright + exact mem_leftImage.mpr ⟨z.1, hcovered, hpi⟩ + · apply mem_leftCandidate.mp hleft + exact mem_rightImage.mpr ⟨z.2, hcovered, hsj⟩ + +theorem H_candidates_card_le_uncovered (r : V → V → Prop) (P Q : Finset (V × V)) : + (H r (leftCandidate r Q) (rightCandidate r P)).card ≤ (uncovered r P Q).card := + Finset.card_le_card (H_candidates_subset_uncovered r P Q) + +theorem uncoveredZ_subset_uncovered (r : V → V → Prop) + (R C P' Q' : Finset (V × V)) : uncoveredZ r R C P' Q' ⊆ uncovered r P' Q' := by + intro z hz + exact mem_uncovered.mpr (mem_uncoveredZ.mp hz).2 + +theorem uncoveredZ_card_le_uncovered (r : V → V → Prop) + (R C P' Q' : Finset (V × V)) : + (uncoveredZ r R C P' Q').card ≤ (uncovered r P' Q').card := + Finset.card_le_card (uncoveredZ_subset_uncovered r R C P' Q') + +theorem pruning_preserves_diagonal {r : V → V → Prop} + {P Q P' Q' : Finset (V × V)} (h : Admissible r P Q) + (hp : PruningResult r (leftCandidate r Q) (rightCandidate r P) P' Q') : + Admissible r P' Q' where + compatible := hp.no_conflicts + diagonal_left := by + intro a ha + exact hp.retain_left a + (diagonal_subset_leftCandidate h.compatible h.diagonal_left ha) + (diagonal_left_conflictFree h.diagonal_left ha) + diagonal_right := by + intro b hb + exact hp.retain_right b + (diagonal_subset_rightCandidate h.compatible h.diagonal_right hb) + (diagonal_right_conflictFree h.diagonal_right hb) + +end +end SeymourSecondNeighborhood.Extremal + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/ExtremalContradiction.lean b/lean/OAI/Combinatorics/SecondNeighborhood/ExtremalContradiction.lean new file mode 100644 index 0000000000000000000000000000000000000000..2fdc9ab29ac4d6d3ea74b63143b13af9ef8e5a31 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/ExtremalContradiction.lean @@ -0,0 +1,46 @@ +import OAI.Combinatorics.SecondNeighborhood.ExtremalCompatibility +import OAI.Combinatorics.SecondNeighborhood.ExtremalCounting + +namespace OAI + +namespace SeymourSecondNeighborhood.Extremal + +open Pruning + +variable {V : Type*} [Fintype V] [DecidableEq V] [Nonempty V] + +theorem complement_gain {r : V → V → Prop} {P Q : Finset (V × V)} + (h : Admissible r P Q) (hpos : PositiveIndegree r) + (hgrowth : StrictSubsetGrowth r) : + P.card + Q.card + 2 * uncoveredCount r P Q < + (leftCandidate r Q).card + (rightCandidate r P).card := by + classical + have hleft := h.strict_leftImage_growth hpos hgrowth + have hright := h.strict_rightImage_growth hpos hgrowth + have huncovered := uncoveredCount_add_images h.compatible + have hR : (leftCandidate r Q).card + + (rightImage r (rightImage r Q)).card = (Finset.univ : Finset (V × V)).card := + Finset.card_sdiff_add_card_eq_card (Finset.subset_univ _) + have hC : (rightCandidate r P).card + + (leftImage r (leftImage r P)).card = (Finset.univ : Finset (V × V)).card := + Finset.card_sdiff_add_card_eq_card (Finset.subset_univ _) + omega + +theorem no_strictSubsetGrowth_of_pruning {r : V → V → Prop} + (hr : IsOriented r) (hpos : PositiveIndegree r) + (hprune : PruningStatement r) : ¬ StrictSubsetGrowth r := by + classical + intro hgrowth + obtain ⟨P, Q, h, hmax⟩ := exists_maximizing_pair r (Admissible r) + ⟨diagonal, diagonal, diagonal_admissible hr⟩ + obtain ⟨P', Q', hp⟩ := hprune (leftCandidate r Q) (rightCandidate r P) + have hnext : Admissible r P' Q' := pruning_preserves_diagonal h hp + have hH : (H r (leftCandidate r Q) (rightCandidate r P)).card ≤ + uncoveredCount r P Q := by + exact H_candidates_card_le_uncovered r P Q + have hbetter := objective_lt_of_pruning hp hH (complement_gain h hpos hgrowth) + exact (not_lt_of_ge (hmax P' Q' hnext)) hbetter + +end SeymourSecondNeighborhood.Extremal + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/ExtremalCounting.lean b/lean/OAI/Combinatorics/SecondNeighborhood/ExtremalCounting.lean new file mode 100644 index 0000000000000000000000000000000000000000..3e893da6886327523008f2638d2f06d3ed261fd4 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/ExtremalCounting.lean @@ -0,0 +1,74 @@ +import OAI.Combinatorics.SecondNeighborhood.PruningDefinitions +import Mathlib.Data.Finset.Max +import Mathlib.Data.Fintype.Powerset + +namespace OAI + +namespace SeymourSecondNeighborhood.Extremal + +open Pruning + +variable {V : Type*} [Fintype V] [DecidableEq V] + +noncomputable section + +def uncoveredCount (r : V → V → Prop) (P Q : Finset (V × V)) : ℕ := + (Finset.univ \ (leftImage r P ∪ rightImage r Q)).card + +def objective (r : V → V → Prop) (P Q : Finset (V × V)) : ℕ := + P.card + Q.card + uncoveredCount r P Q + +theorem uncoveredCount_add_images {r : V → V → Prop} {P Q : Finset (V × V)} + (h : ConflictFree r P Q) : + uncoveredCount r P Q + (leftImage r P).card + (rightImage r Q).card = + (Finset.univ : Finset (V × V)).card := by + classical + have hc := Finset.card_sdiff_add_card_eq_card + (Finset.subset_univ (leftImage r P ∪ rightImage r Q)) + rw [Finset.card_union_of_disjoint (conflictFree_iff_disjoint.mp h)] at hc + simpa only [uncoveredCount, Nat.add_assoc] using hc + +theorem uncoveredZ_card_le (r : V → V → Prop) (R C P Q : Finset (V × V)) : + (uncoveredZ r R C P Q).card ≤ uncoveredCount r P Q := by + classical + apply Finset.card_le_card + intro z hz + obtain ⟨_, hn⟩ := mem_uncoveredZ.mp hz + exact Finset.mem_sdiff.mpr ⟨Finset.mem_univ z, fun h => + hn (Finset.mem_union.mp h)⟩ + +theorem objective_lt_of_pruning {r : V → V → Prop} + {P Q R C P' Q' : Finset (V × V)} + (hpr : PruningResult r R C P' Q') + (hH : (H r R C).card ≤ uncoveredCount r P Q) + (hgain : P.card + Q.card + 2 * uncoveredCount r P Q < R.card + C.card) : + objective r P Q < objective r P' Q' := by + have hZ := uncoveredZ_card_le r R C P' Q' + have hR := Finset.card_sdiff_add_card_eq_card hpr.subset_left + have hC := Finset.card_sdiff_add_card_eq_card hpr.subset_right + have hdel := hpr.deletion_bound + unfold objective + omega + +theorem exists_maximizing_pair (r : V → V → Prop) + (admissible : Finset (V × V) → Finset (V × V) → Prop) + (hex : ∃ P Q, admissible P Q) : + ∃ P Q, admissible P Q ∧ ∀ P' Q', admissible P' Q' → + objective r P' Q' ≤ objective r P Q := by + classical + let candidates : Finset (Finset (V × V) × Finset (V × V)) := + Finset.univ.filter fun p => admissible p.1 p.2 + have hne : candidates.Nonempty := by + obtain ⟨P, Q, h⟩ := hex + exact ⟨(P, Q), Finset.mem_filter.mpr ⟨Finset.mem_univ _, h⟩⟩ + obtain ⟨p, hp, hmax⟩ := candidates.exists_max_image + (fun p => objective r p.1 p.2) hne + refine ⟨p.1, p.2, (Finset.mem_filter.mp hp).2, ?_⟩ + intro P Q h + exact hmax (P, Q) (Finset.mem_filter.mpr ⟨Finset.mem_univ _, h⟩) + +end + +end SeymourSecondNeighborhood.Extremal + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/ExtremalImages.lean b/lean/OAI/Combinatorics/SecondNeighborhood/ExtremalImages.lean new file mode 100644 index 0000000000000000000000000000000000000000..e9d5fd7541e8470757c892d69043fb14b3c9b5d2 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/ExtremalImages.lean @@ -0,0 +1,99 @@ +import OAI.Combinatorics.SecondNeighborhood.PruningDefinitions +import OAI.Combinatorics.SecondNeighborhood.ReductionCore +import Mathlib.Algebra.Order.BigOperators.Group.Finset + +namespace OAI + +namespace SeymourSecondNeighborhood.Extremal + +open Pruning +open scoped BigOperators + +variable {V : Type*} [Fintype V] [DecidableEq V] + +noncomputable section + +def diagonal : Finset (V × V) := + Finset.univ.filter (fun z => z.1 = z.2) + +def column (P : Finset (V × V)) (j : V) : Finset V := + Finset.univ.filter (fun p => (p, j) ∈ P) + +def row (Q : Finset (V × V)) (i : V) : Finset V := + Finset.univ.filter (fun s => (i, s) ∈ Q) + +@[simp] theorem mem_diagonal {z : V × V} : + z ∈ diagonal ↔ z.1 = z.2 := by + simp [diagonal] + +@[simp] theorem diagonal_mem (v : V) : (v, v) ∈ (diagonal : Finset (V × V)) := by + exact mem_diagonal.mpr rfl + +@[simp] theorem mem_column {P : Finset (V × V)} {j p : V} : + p ∈ column P j ↔ (p, j) ∈ P := by + simp [column] + +@[simp] theorem mem_row {Q : Finset (V × V)} {i s : V} : + s ∈ row Q i ↔ (i, s) ∈ Q := by + simp [row] + +@[simp] theorem column_leftImage (r : V → V → Prop) (P : Finset (V × V)) (j : V) : + column (leftImage r P) j = image r (column P j) := by + classical + ext i + simp + +@[simp] theorem row_rightImage (r : V → V → Prop) (Q : Finset (V × V)) (i : V) : + row (rightImage r Q) i = image r (row Q i) := by + classical + ext j + simp + +theorem card_eq_sum_card_column (P : Finset (V × V)) : + P.card = ∑ j : V, (column P j).card := by + classical + simpa only [← Finset.card_eq_sum_ones] using + (Finset.sum_finset_product_right P Finset.univ (column P) + (by intro z; simp) (f := fun _ => (1 : ℕ))) + +theorem card_eq_sum_card_row (Q : Finset (V × V)) : + Q.card = ∑ i : V, (row Q i).card := by + classical + simpa only [← Finset.card_eq_sum_ones] using + (Finset.sum_finset_product Q Finset.univ (row Q) + (by intro z; simp) (f := fun _ => (1 : ℕ))) + +theorem strict_leftImage_growth [Nonempty V] + (r : V → V → Prop) (P : Finset (V × V)) (hgrowth : StrictSubsetGrowth r) + (hnonempty : ∀ j, (column P j).Nonempty) + (hproper : ∀ j, column P j ≠ Finset.univ) : + P.card + (leftImage r (leftImage r P)).card < 2 * (leftImage r P).card := by + classical + have hsum : + (∑ j : V, ((column P j).card + (column (leftImage r (leftImage r P)) j).card)) < + ∑ j : V, 2 * (column (leftImage r P) j).card := by + apply Finset.sum_lt_sum_of_nonempty Finset.univ_nonempty + intro j _ + simpa only [column_leftImage] using + hgrowth (column P j) (hnonempty j) (hproper j) + simpa only [Nat.two_mul, Finset.sum_add_distrib, ← card_eq_sum_card_column] using hsum + +theorem strict_rightImage_growth [Nonempty V] + (r : V → V → Prop) (Q : Finset (V × V)) (hgrowth : StrictSubsetGrowth r) + (hnonempty : ∀ i, (row Q i).Nonempty) + (hproper : ∀ i, row Q i ≠ Finset.univ) : + Q.card + (rightImage r (rightImage r Q)).card < 2 * (rightImage r Q).card := by + classical + have hsum : + (∑ i : V, ((row Q i).card + (row (rightImage r (rightImage r Q)) i).card)) < + ∑ i : V, 2 * (row (rightImage r Q) i).card := by + apply Finset.sum_lt_sum_of_nonempty Finset.univ_nonempty + intro i _ + simpa only [row_rightImage] using + hgrowth (row Q i) (hnonempty i) (hproper i) + simpa only [Nat.two_mul, Finset.sum_add_distrib, ← card_eq_sum_card_row] using hsum + +end +end SeymourSecondNeighborhood.Extremal + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/GenericRank.lean b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRank.lean new file mode 100644 index 0000000000000000000000000000000000000000..acb457e7d4e48f30a31f4b459cd402f589922bc0 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRank.lean @@ -0,0 +1,137 @@ +import Mathlib.Algebra.MvPolynomial.Funext +import Mathlib.LinearAlgebra.Matrix.Rank + +namespace OAI + +namespace SeymourSecondNeighborhood + +open scoped BigOperators + +section Evaluation + +variable {σ ι K : Type*} [CommRing K] [IsDomain K] [Infinite K] + +theorem exists_eval_ne_zero {p : MvPolynomial σ K} (hp : p ≠ 0) : + ∃ a : σ → K, MvPolynomial.eval a p ≠ 0 := by + classical + by_contra h + apply hp + apply MvPolynomial.funext + intro a + have ha : MvPolynomial.eval a p = 0 := by + by_contra ha + exact h ⟨a, ha⟩ + simpa only [map_zero] using ha + +theorem exists_eval_finset_ne_zero (s : Finset ι) (p : ι → MvPolynomial σ K) + (hp : ∀ i ∈ s, p i ≠ 0) : + ∃ a : σ → K, ∀ i ∈ s, MvPolynomial.eval a (p i) ≠ 0 := by + classical + have hprod : (∏ i ∈ s, p i) ≠ 0 := Finset.prod_ne_zero_iff.mpr hp + obtain ⟨a, ha⟩ := exists_eval_ne_zero hprod + refine ⟨a, ?_⟩ + have heval : (∏ i ∈ s, MvPolynomial.eval a (p i)) ≠ 0 := by + simpa only [map_prod] using ha + exact Finset.prod_ne_zero_iff.mp heval + +theorem exists_eval_family_ne_zero [Fintype ι] (p : ι → MvPolynomial σ K) + (hp : ∀ i, p i ≠ 0) : + ∃ a : σ → K, ∀ i, MvPolynomial.eval a (p i) ≠ 0 := by + classical + obtain ⟨a, ha⟩ := exists_eval_finset_ne_zero Finset.univ p (fun i _ => hp i) + exact ⟨a, fun i => ha i (Finset.mem_univ i)⟩ + +end Evaluation + +section Matrices + +variable {σ K I J : Type*} [CommRing K] + +noncomputable def evalPolynomialMatrix (a : σ → K) (M : Matrix I J (MvPolynomial σ K)) : + Matrix I J K := + M.map (MvPolynomial.eval a) + +@[simp] theorem evalPolynomialMatrix_apply (a : σ → K) + (M : Matrix I J (MvPolynomial σ K)) (i : I) (j : J) : + evalPolynomialMatrix a M i j = MvPolynomial.eval a (M i j) := rfl + +@[simp] theorem evalPolynomialMatrix_submatrix {I' J' : Type*} (a : σ → K) + (M : Matrix I J (MvPolynomial σ K)) (r : I' → I) (c : J' → J) : + evalPolynomialMatrix a (M.submatrix r c) = + (evalPolynomialMatrix a M).submatrix r c := rfl + +@[simp] theorem det_evalPolynomialMatrix [Fintype I] [DecidableEq I] + (a : σ → K) (M : Matrix I I (MvPolynomial σ K)) : + (evalPolynomialMatrix a M).det = MvPolynomial.eval a M.det := + ((MvPolynomial.eval a).map_det M).symm + +theorem det_ne_zero_of_evalPolynomialMatrix [Fintype I] [DecidableEq I] + (a : σ → K) (M : Matrix I I (MvPolynomial σ K)) + (h : (evalPolynomialMatrix a M).det ≠ 0) : M.det ≠ 0 := by + intro hz + apply h + simp only [det_evalPolynomialMatrix, hz, map_zero] + +end Matrices + +section SimultaneousDeterminants + +variable {σ κ K : Type*} [CommRing K] [IsDomain K] [Infinite K] [Fintype κ] +variable {I : κ → Type*} [∀ k, Fintype (I k)] [∀ k, DecidableEq (I k)] + +theorem exists_simultaneous_det_ne_zero + (M : ∀ k, Matrix (I k) (I k) (MvPolynomial σ K)) + (hM : ∀ k, (M k).det ≠ 0) : + ∃ a : σ → K, ∀ k, (evalPolynomialMatrix a (M k)).det ≠ 0 := by + obtain ⟨a, ha⟩ := exists_eval_family_ne_zero (fun k => (M k).det) hM + exact ⟨a, fun k => by simpa only [det_evalPolynomialMatrix] using ha k⟩ + +theorem exists_simultaneous_det_ne_zero_of_witness + (M : ∀ k, Matrix (I k) (I k) (MvPolynomial σ K)) + (hM : ∀ k, ∃ a : σ → K, (evalPolynomialMatrix a (M k)).det ≠ 0) : + ∃ a : σ → K, ∀ k, (evalPolynomialMatrix a (M k)).det ≠ 0 := by + apply exists_simultaneous_det_ne_zero M + intro k + obtain ⟨a, ha⟩ := hM k + exact det_ne_zero_of_evalPolynomialMatrix a (M k) ha + +end SimultaneousDeterminants + +section SimultaneousRanks + +variable {σ κ K : Type*} [Field K] [Infinite K] [Fintype κ] +variable {I J : κ → Type*} [∀ k, Fintype (I k)] [∀ k, Fintype (J k)] + +omit [(k : κ) → Fintype (I k)] in +theorem exists_simultaneous_rank_ge + (M : ∀ k, Matrix (I k) (J k) (MvPolynomial σ K)) (n : κ → ℕ) + (r : ∀ k, Fin (n k) → I k) (c : ∀ k, Fin (n k) → J k) + (hminor : ∀ k, ((M k).submatrix (r k) (c k)).det ≠ 0) : + ∃ a : σ → K, ∀ k, n k ≤ (evalPolynomialMatrix a (M k)).rank := by + classical + obtain ⟨a, ha⟩ := exists_simultaneous_det_ne_zero + (fun k => (M k).submatrix (r k) (c k)) hminor + refine ⟨a, fun k => ?_⟩ + have hdet : ((evalPolynomialMatrix a (M k)).submatrix (r k) (c k)).det ≠ 0 := by + simpa only [evalPolynomialMatrix_submatrix] using ha k + calc + n k = ((evalPolynomialMatrix a (M k)).submatrix (r k) (c k)).rank := by + simpa only [Fintype.card_fin] using (Matrix.rank_of_det_ne_zero hdet).symm + _ ≤ (evalPolynomialMatrix a (M k)).rank := + Matrix.rank_submatrix_le _ (r k) (c k) + +omit [(k : κ) → Fintype (I k)] in +theorem exists_simultaneous_rank_eq + (M : ∀ k, Matrix (I k) (J k) (MvPolynomial σ K)) (n : κ → ℕ) + (r : ∀ k, Fin (n k) → I k) (c : ∀ k, Fin (n k) → J k) + (hminor : ∀ k, ((M k).submatrix (r k) (c k)).det ≠ 0) + (hupper : ∀ a : σ → K, ∀ k, (evalPolynomialMatrix a (M k)).rank ≤ n k) : + ∃ a : σ → K, ∀ k, (evalPolynomialMatrix a (M k)).rank = n k := by + obtain ⟨a, ha⟩ := exists_simultaneous_rank_ge M n r c hminor + exact ⟨a, fun k => le_antisymm (hupper a k) (ha k)⟩ + +end SimultaneousRanks + +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankCoefficients.lean b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..c27592983827ec4bf23c12917488dae433613d6b --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankCoefficients.lean @@ -0,0 +1,77 @@ +import OAI.Combinatorics.SecondNeighborhood.GenericRankFamily +import OAI.Combinatorics.SecondNeighborhood.KernelConflict + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +variable {X τ : Type*} [Fintype X] [DecidableEq X] [Fintype τ] + +abbrev CoefficientVariables (X : Type*) := Sum (X × X) (X × X) + +noncomputable def selectedA (r : X → X → Prop) + (v : CoefficientVariables X → ℝ) (x y : X) : ℝ := by + classical + exact if r x y then v (Sum.inl (x, y)) else 0 + +noncomputable def selectedB (r : X → X → Prop) + (v : CoefficientVariables X → ℝ) (x y : X) : ℝ := by + classical + exact if r x y then v (Sum.inr (x, y)) else 0 + +omit [Fintype X] [DecidableEq X] in +theorem selectedA_supported (r : X → X → Prop) (v : CoefficientVariables X → ℝ) : + SupportedCoefficients r (selectedA r v) := by + classical + intro x y h + simp [selectedA, h] + +omit [Fintype X] [DecidableEq X] in +theorem selectedB_supported (r : X → X → Prop) (v : CoefficientVariables X → ℝ) : + SupportedCoefficients r (selectedB r v) := by + classical + intro x y h + simp [selectedB, h] + +omit [Fintype X] [DecidableEq X] in +theorem matrixD_eq_eval_supported (r : X → X → Prop) (R C : Finset (X × X)) + (v : CoefficientVariables X → ℝ) (p i : X) : + matrixD R C (selectedB r v) p i = evalPolynomialMatrix v + (supportedVariableMatrix (R := ℝ) + (fun s : PairFiber C i => fun j : PairFiber R p => r s.1 j.1) + (fun s j => Sum.inr (s.1, j.1))) := by + classical + ext s j + by_cases h : r s.1 j.1 <;> + simp [matrixD, selectedB, evalPolynomialMatrix, supportedVariableMatrix, h] + +theorem exists_coefficients_localMaximalRanks + (r : X → X → Prop) (R C : Finset (X × X)) + (extra : τ → MvPolynomial (CoefficientVariables X) ℝ) + (hextra : ∀ t, extra t ≠ 0) : + ∃ v : CoefficientVariables X → ℝ, + (∀ t, MvPolynomial.eval v (extra t) ≠ 0) ∧ + SupportedCoefficients r (selectedA r v) ∧ + SupportedCoefficients r (selectedB r v) ∧ + LocalMaximalRanks r R C (selectedB r v) := by + classical + let support (q : X × X) (s : PairFiber C q.2) (j : PairFiber R q.1) := r s.1 j.1 + let label (q : X × X) (s : PairFiber C q.2) (j : PairFiber R q.1) : + CoefficientVariables X := Sum.inr (s.1, j.1) + have hlabel : ∀ q s j s' j', support q s j → support q s' j' → + label q s j = label q s' j' → s = s' ∧ j = j' := by + intro q s j s' j' _ _ h + have hp : (s.1, j.1) = (s'.1, j'.1) := Sum.inr.inj h + exact ⟨Subtype.ext (congrArg Prod.fst hp), Subtype.ext (congrArg Prod.snd hp)⟩ + obtain ⟨v, hv, hmax⟩ := + exists_eval_maximal_support_rank support label hlabel extra hextra + refine ⟨v, hv, selectedA_supported r v, selectedB_supported r v, ?_⟩ + intro p i _ D hD + rw [matrixD_eq_eval_supported] + apply hmax (p, i) D + intro s j h + exact hD s j h + +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankColumns.lean b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankColumns.lean new file mode 100644 index 0000000000000000000000000000000000000000..7df479bd4461622a0fad5be98b5496df2a6e620a --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankColumns.lean @@ -0,0 +1,57 @@ +import Mathlib.LinearAlgebra.Matrix.Rank + +namespace OAI + +namespace SeymourSecondNeighborhood + +open scoped Matrix + +variable {I J K κ : Type*} [Fintype I] [Fintype J] [Field K] +variable [Fintype κ] [DecidableEq κ] + +omit [Fintype I] [Fintype J] in +theorem selectedColumns_linearIndependent_of_det_ne_zero + (M : Matrix I J K) (r : κ → I) (c : κ → J) + (hdet : (M.submatrix r c).det ≠ 0) : + LinearIndependent K (M.submatrix id c).col := by + apply LinearIndependent.of_comp (LinearMap.funLeft K K r) + change LinearIndependent K (M.submatrix r c).col + exact Matrix.linearIndependent_cols_of_det_ne_zero hdet + +theorem selectedColumns_span_eq_of_det_ne_zero + (M : Matrix I J K) (r : κ → I) (c : κ → J) + (hdet : (M.submatrix r c).det ≠ 0) (hrank : M.rank ≤ Fintype.card κ) : + Submodule.span K (Set.range (M.submatrix id c).col) = + Submodule.span K (Set.range M.col) := by + apply Submodule.eq_of_le_of_finrank_le + · apply Submodule.span_mono + rintro _ ⟨j, rfl⟩ + exact ⟨c j, rfl⟩ + · calc + Module.finrank K (Submodule.span K (Set.range M.col)) = M.rank := + (Matrix.rank_eq_finrank_span_cols M).symm + _ ≤ Fintype.card κ := hrank + _ = Module.finrank K (Submodule.span K (Set.range (M.submatrix id c).col)) := + (finrank_span_eq_card + (selectedColumns_linearIndependent_of_det_ne_zero M r c hdet)).symm + +theorem selectedColumns_range_eq_of_det_ne_zero + (M : Matrix I J K) (r : κ → I) (c : κ → J) + (hdet : (M.submatrix r c).det ≠ 0) (hrank : M.rank ≤ Fintype.card κ) : + LinearMap.range (M.submatrix id c).mulVecLin = LinearMap.range M.mulVecLin := by + rw [Matrix.range_mulVecLin, Matrix.range_mulVecLin] + exact selectedColumns_span_eq_of_det_ne_zero M r c hdet hrank + +theorem exists_selectedColumns_mulVec + (M : Matrix I J K) (r : κ → I) (c : κ → J) + (hdet : (M.submatrix r c).det ≠ 0) (hrank : M.rank ≤ Fintype.card κ) + (x : J → K) : + ∃ y : κ → K, M *ᵥ x = (M.submatrix id c) *ᵥ y := by + have hx : M *ᵥ x ∈ LinearMap.range M.mulVecLin := ⟨x, rfl⟩ + rw [← selectedColumns_range_eq_of_det_ne_zero M r c hdet hrank] at hx + obtain ⟨y, hy⟩ := hx + exact ⟨y, hy.symm⟩ + +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankFamily.lean b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..83c2d1cbab60426b4301c893c483a45a3001e6ee --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankFamily.lean @@ -0,0 +1,97 @@ +import OAI.Combinatorics.SecondNeighborhood.GenericRank +import OAI.Combinatorics.SecondNeighborhood.GenericRankMatching +import OAI.Combinatorics.SecondNeighborhood.GenericRankSupport +import OAI.Combinatorics.SecondNeighborhood.MatchingCover + +namespace OAI + +namespace SeymourSecondNeighborhood + +open Bipartite + +theorem rank_le_card_of_maximum_matching + {I J K : Type*} [Fintype I] [Fintype J] [Field K] + {support : I → J → Prop} {matching : Finset (I × J)} + (hmatching : IsMaximumMatching support matching) (D : Matrix I J K) + (hD : ∀ i j, ¬ support i j → D i j = 0) : D.rank ≤ matching.card := by + classical + obtain ⟨rows, cols, hcover, hcard, _, _⟩ := + exists_vertexCover_card_eq_of_isMaximumMatching hmatching + rw [← hcard] + apply rank_le_vertexCover_card + intro i j hij + apply hcover i j + by_contra hs + exact hij (hD i j hs) + +theorem rank_eq_card_of_maximum_matching_minor + {I J K : Type*} [Fintype I] [Fintype J] [Field K] + {support : I → J → Prop} {matching : Finset (I × J)} + [DecidableEq ↥matching] + (hmatching : IsMaximumMatching support matching) (D : Matrix I J K) + (hD : ∀ i j, ¬ support i j → D i j = 0) + (hdet : (D.submatrix (fun e : ↥matching => e.1.1) + (fun e : ↥matching => e.1.2)).det ≠ 0) : D.rank = matching.card := by + apply le_antisymm (rank_le_card_of_maximum_matching hmatching D hD) + calc + matching.card = (D.submatrix (fun e : ↥matching => e.1.1) + (fun e : ↥matching => e.1.2)).rank := by + simpa only [Fintype.card_coe] using (Matrix.rank_of_det_ne_zero hdet).symm + _ ≤ D.rank := Matrix.rank_submatrix_le _ _ _ + +variable {σ κ τ K : Type*} [Field K] [Infinite K] [Fintype κ] [Fintype τ] +variable {I J : κ → Type*} [∀ k, Fintype (I k)] [∀ k, Fintype (J k)] + +theorem exists_eval_maximal_support_rank + (support : ∀ k, I k → J k → Prop) (label : ∀ k, I k → J k → σ) + (hlabel : ∀ k i j i' j', support k i j → support k i' j' → + label k i j = label k i' j' → i = i' ∧ j = j') + (extra : τ → MvPolynomial σ K) (hextra : ∀ t, extra t ≠ 0) : + ∃ a : σ → K, (∀ t, MvPolynomial.eval a (extra t) ≠ 0) ∧ + ∀ k (D : Matrix (I k) (J k) K), + (∀ i j, ¬ support k i j → D i j = 0) → + D.rank ≤ (evalPolynomialMatrix a + (supportedVariableMatrix (R := K) (support k) (label k))).rank := by + classical + choose matching hmatching using fun k => exists_maximum_matching (support k) + let row (k : κ) : ↥(matching k) → I k := fun e => e.1.1 + let col (k : κ) : ↥(matching k) → J k := fun e => e.1.2 + let matrix (k : κ) := supportedVariableMatrix (R := K) (support k) (label k) + let minor (k : κ) := (matrix k).submatrix (row k) (col k) + have hminor : ∀ k, (minor k).det ≠ 0 := by + intro k + apply det_matchingMinor_ne_zero + · intro e + exact (hmatching k).1.1 e.1 e.2 + · intro e f g h hef hgh heq + obtain ⟨heg, hfh⟩ := hlabel k _ _ _ _ hef hgh heq + exact ⟨Subtype.ext ((hmatching k).1.2.1 e.2 g.2 heg), + Subtype.ext ((hmatching k).1.2.2 f.2 h.2 hfh)⟩ + let polynomials : Sum κ τ → MvPolynomial σ K := + Sum.elim (fun k => (minor k).det) extra + have hpolynomials : ∀ t, polynomials t ≠ 0 := by + intro t + cases t with + | inl k => exact hminor k + | inr t => exact hextra t + obtain ⟨a, ha⟩ := exists_eval_family_ne_zero polynomials hpolynomials + refine ⟨a, fun t => ha (Sum.inr t), ?_⟩ + intro k D hD + have hupper : D.rank ≤ (matching k).card := + rank_le_card_of_maximum_matching (hmatching k) D hD + have hdet : ((evalPolynomialMatrix a (matrix k)).submatrix (row k) (col k)).det + ≠ 0 := by + rw [← evalPolynomialMatrix_submatrix, det_evalPolynomialMatrix] + exact ha (Sum.inl k) + have hlower : (matching k).card ≤ (evalPolynomialMatrix a (matrix k)).rank := by + calc + (matching k).card = + ((evalPolynomialMatrix a (matrix k)).submatrix (row k) (col k)).rank := by + simpa only [Fintype.card_coe] using (Matrix.rank_of_det_ne_zero hdet).symm + _ ≤ (evalPolynomialMatrix a (matrix k)).rank := + Matrix.rank_submatrix_le _ (row k) (col k) + exact hupper.trans hlower + +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankGlobalMinors.lean b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankGlobalMinors.lean new file mode 100644 index 0000000000000000000000000000000000000000..9f22821ac1337ff0bc7ac2a56f63e87c5ac7e840 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankGlobalMinors.lean @@ -0,0 +1,127 @@ +import OAI.Combinatorics.SecondNeighborhood.GenericRankMatching +import OAI.Combinatorics.SecondNeighborhood.MatrixMapsPolynomial +import OAI.Combinatorics.SecondNeighborhood.Matching +import Mathlib.Data.Fintype.EquivFin + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +open scoped Matrix + +variable {X : Type*} [Fintype X] [DecidableEq X] + +def matrixLSupport (r : X → X → Prop) (R C : Finset (X × X)) + (z : ↥(Z r R C)) (left : ↥R) : Prop := + z.val.2 = left.val.2 ∧ r left.val.1 z.val.1 + +def matrixNTransposeSupport (r : X → X → Prop) (R C : Finset (X × X)) + (z : ↥(Z r R C)) (right : ↥C) : Prop := + right.val.1 = z.val.1 ∧ r right.val.2 z.val.2 + +@[simp] theorem matrixLSupport_iff_leftCovers (r : X → X → Prop) + (R C : Finset (X × X)) (z : ↥(Z r R C)) (left : ↥R) : + matrixLSupport r R C z left ↔ LeftCovers r left.val z.val := by + constructor + · rintro ⟨hcoord, harrow⟩ + exact ⟨hcoord.symm, harrow⟩ + · rintro ⟨hcoord, harrow⟩ + exact ⟨hcoord.symm, harrow⟩ + +@[simp] theorem matrixNTransposeSupport_iff_rightCovers (r : X → X → Prop) + (R C : Finset (X × X)) (z : ↥(Z r R C)) (right : ↥C) : + matrixNTransposeSupport r R C z right ↔ RightCovers r right.val z.val := + Iff.rfl + +noncomputable def matrixLMatchingMinor (r : X → X → Prop) (R C : Finset (X × X)) + (M : Finset (↥(Z r R C) × ↥R)) : + Matrix ↥M ↥M (MvPolynomial (CoefficientVariables X) ℝ) := + (matrixLPolynomial r R C).submatrix (fun e : ↥M => e.val.1) (fun e => e.val.2) + +noncomputable def matrixNTransposeMatchingMinor (r : X → X → Prop) + (R C : Finset (X × X)) (M : Finset (↥(Z r R C) × ↥C)) : + Matrix ↥M ↥M (MvPolynomial (CoefficientVariables X) ℝ) := + (matrixNPolynomial r R C)ᵀ.submatrix (fun e : ↥M => e.val.1) (fun e => e.val.2) + +@[simp] theorem eval_matrixLMatchingMinor (r : X → X → Prop) + (R C : Finset (X × X)) (M : Finset (↥(Z r R C) × ↥R)) + (v : CoefficientVariables X → ℝ) : + evalPolynomialMatrix v (matrixLMatchingMinor r R C M) = + (matrixL r R C (selectedA r v)).submatrix + (fun e : ↥M => e.val.1) (fun e => e.val.2) := by + rw [matrixLMatchingMinor, evalPolynomialMatrix_submatrix, eval_matrixLPolynomial] + +@[simp] theorem eval_matrixNTransposeMatchingMinor (r : X → X → Prop) + (R C : Finset (X × X)) (M : Finset (↥(Z r R C) × ↥C)) + (v : CoefficientVariables X → ℝ) : + evalPolynomialMatrix v (matrixNTransposeMatchingMinor r R C M) = + (matrixN r R C (selectedB r v))ᵀ.submatrix + (fun e : ↥M => e.val.1) (fun e => e.val.2) := by + rw [matrixNTransposeMatchingMinor, evalPolynomialMatrix_submatrix, + eval_matrixNPolynomial_transpose] + +theorem det_matrixLMatchingMinor_ne_zero (r : X → X → Prop) + (R C : Finset (X × X)) (M : Finset (↥(Z r R C) × ↥R)) + (hM : Bipartite.IsMatching (matrixLSupport r R C) M) : + (matrixLMatchingMinor r R C M).det ≠ 0 := by + classical + have hdiag : ∀ e : ↥M, matrixLSupport r R C e.val.1 e.val.2 := + fun e => hM.1 e.val e.property + change (supportedVariableMatrix (R := ℝ) + (fun e f : ↥M => matrixLSupport r R C e.val.1 f.val.2) + (fun e f : ↥M => + (Sum.inl (f.val.2.val.1, e.val.1.val.1) : CoefficientVariables X))).det ≠ 0 + apply det_blockSupportedVariables_ne_zero _ _ + (fun e : ↥M => (Fintype.equivFin X) e.val.1.val.2) + · exact hdiag + · intro i j hij + exact congrArg (Fintype.equivFin X) (hij.1.trans (hdiag j).1.symm) + · intro i j k l hij hkl hblock hlabel + have hsecond : i.val.1.val.2 = k.val.1.val.2 := + (Fintype.equivFin X).injective hblock + have hp : (j.val.2.val.1, i.val.1.val.1) = + (l.val.2.val.1, k.val.1.val.1) := Sum.inl.inj hlabel + have hlabelFirst := congrArg (fun p : X × X => p.1) hp + have hlabelSecond := congrArg (fun p : X × X => p.2) hp + have hrow : i.val.1 = k.val.1 := + Subtype.ext (Prod.ext hlabelSecond hsecond) + have hcolSecond := hij.1.symm.trans (hsecond.trans hkl.1) + have hcol : j.val.2 = l.val.2 := + Subtype.ext (Prod.ext hlabelFirst hcolSecond) + exact ⟨Subtype.ext (hM.2.1 i.property k.property hrow), + Subtype.ext (hM.2.2 j.property l.property hcol)⟩ + +theorem det_matrixNTransposeMatchingMinor_ne_zero (r : X → X → Prop) + (R C : Finset (X × X)) (M : Finset (↥(Z r R C) × ↥C)) + (hM : Bipartite.IsMatching (matrixNTransposeSupport r R C) M) : + (matrixNTransposeMatchingMinor r R C M).det ≠ 0 := by + classical + have hdiag : ∀ e : ↥M, matrixNTransposeSupport r R C e.val.1 e.val.2 := + fun e => hM.1 e.val e.property + change (supportedVariableMatrix (R := ℝ) + (fun e f : ↥M => matrixNTransposeSupport r R C e.val.1 f.val.2) + (fun e f : ↥M => + (Sum.inr (f.val.2.val.2, e.val.1.val.2) : CoefficientVariables X))).det ≠ 0 + apply det_blockSupportedVariables_ne_zero _ _ + (fun e : ↥M => (Fintype.equivFin X) e.val.1.val.1) + · exact hdiag + · intro i j hij + exact congrArg (Fintype.equivFin X) (hij.1.symm.trans (hdiag j).1) + · intro i j k l hij hkl hblock hlabel + have hfirst : i.val.1.val.1 = k.val.1.val.1 := + (Fintype.equivFin X).injective hblock + have hp : (j.val.2.val.2, i.val.1.val.2) = + (l.val.2.val.2, k.val.1.val.2) := Sum.inr.inj hlabel + have hlabelFirst := congrArg (fun p : X × X => p.1) hp + have hlabelSecond := congrArg (fun p : X × X => p.2) hp + have hrow : i.val.1 = k.val.1 := + Subtype.ext (Prod.ext hfirst hlabelSecond) + have hcolFirst := hij.1.trans (hfirst.trans hkl.1.symm) + have hcol : j.val.2 = l.val.2 := + Subtype.ext (Prod.ext hcolFirst hlabelFirst) + exact ⟨Subtype.ext (hM.2.1 i.property k.property hrow), + Subtype.ext (hM.2.2 j.property l.property hcol)⟩ + +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankMatching.lean b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankMatching.lean new file mode 100644 index 0000000000000000000000000000000000000000..8334a7e161f7741d778f53322da06a6e6fd88528 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankMatching.lean @@ -0,0 +1,113 @@ +import Mathlib.LinearAlgebra.Matrix.MvPolynomial +import Mathlib.LinearAlgebra.Matrix.Rank + +namespace OAI + +namespace SeymourSecondNeighborhood + +open MvPolynomial + +variable {R σ m n κ β : Type*} + +noncomputable def supportedVariableMatrix [CommSemiring R] + (support : m → n → Prop) (label : m → n → σ) : + Matrix m n (MvPolynomial σ R) := by + classical + exact fun i j => if support i j then X (label i j) else 0 + +theorem supportedVariableMatrix_submatrix [CommSemiring R] + (support : m → n → Prop) (label : m → n → σ) + (row : κ → m) (col : κ → n) : + (supportedVariableMatrix (R := R) support label).submatrix row col = + supportedVariableMatrix (R := R) (fun i j => support (row i) (col j)) + (fun i j => label (row i) (col j)) := by + classical + rfl + +theorem exists_eval_supportedVariables_eq_one + [Fintype κ] [DecidableEq κ] [CommSemiring R] + (support : κ → κ → Prop) (label : κ → κ → σ) + (hdiag : ∀ i, support i i) + (hlabel : ∀ i j k l, support i j → support k l → + label i j = label k l → i = k ∧ j = l) : + ∃ v : σ → R, (MvPolynomial.eval v).mapMatrix + (supportedVariableMatrix (R := R) support label) = 1 := by + classical + let v : σ → R := fun s => if ∃ k, label k k = s then 1 else 0 + refine ⟨v, ?_⟩ + ext i j + change MvPolynomial.eval v + (if support i j then X (label i j) else 0) = (1 : Matrix κ κ R) i j + rw [Matrix.one_apply] + by_cases hij : i = j + · subst j + have hw : ∃ k, label k k = label i i := ⟨i, rfl⟩ + simp [hdiag i, v, hw] + · by_cases hs : support i j + · have hw : ¬ ∃ k, label k k = label i j := by + rintro ⟨k, hk⟩ + obtain ⟨hki, hkj⟩ := hlabel k k i j (hdiag k) hs hk + exact hij (hki.symm.trans hkj) + simp [hs, hij, v, hw] + · simp [hs, hij] + +theorem det_supportedVariables_ne_zero + [Fintype κ] [DecidableEq κ] [CommRing R] [Nontrivial R] + (support : κ → κ → Prop) (label : κ → κ → σ) + (hdiag : ∀ i, support i i) + (hlabel : ∀ i j k l, support i j → support k l → + label i j = label k l → i = k ∧ j = l) : + (supportedVariableMatrix (R := R) support label).det ≠ 0 := by + obtain ⟨v, hv⟩ := exists_eval_supportedVariables_eq_one + (R := R) support label hdiag hlabel + intro hzero + have h := congrArg Matrix.det hv + rw [Matrix.det_one, ← RingHom.map_det, hzero, map_zero] at h + exact zero_ne_one h + +theorem det_matchingMinor_ne_zero + [Fintype κ] [DecidableEq κ] [CommRing R] [Nontrivial R] + (support : m → n → Prop) (label : m → n → σ) + (row : κ → m) (col : κ → n) + (hmatched : ∀ i, support (row i) (col i)) + (hlabel : ∀ i j k l, support (row i) (col j) → support (row k) (col l) → + label (row i) (col j) = label (row k) (col l) → i = k ∧ j = l) : + ((supportedVariableMatrix (R := R) support label).submatrix row col).det ≠ 0 := by + rw [supportedVariableMatrix_submatrix] + exact det_supportedVariables_ne_zero _ _ hmatched hlabel + +theorem det_blockSupportedVariables_ne_zero + [Fintype κ] [DecidableEq κ] [Fintype β] [LinearOrder β] + [CommRing R] [IsDomain R] + (support : κ → κ → Prop) (label : κ → κ → σ) (block : κ → β) + (hdiag : ∀ i, support i i) + (hblock : ∀ i j, support i j → block i = block j) + (hlabel : ∀ i j k l, support i j → support k l → block i = block k → + label i j = label k l → i = k ∧ j = l) : + (supportedVariableMatrix (R := R) support label).det ≠ 0 := by + classical + let M := supportedVariableMatrix (R := R) support label + have htri : M.BlockTriangular block := by + intro i j hji + have hs : ¬ support i j := by + intro hs + exact (ne_of_lt hji) (hblock i j hs).symm + simp [M, supportedVariableMatrix, hs] + change M.det ≠ 0 + rw [htri.det_fintype] + apply Finset.prod_ne_zero_iff.mpr + intro b _ + change (supportedVariableMatrix (R := R) + (fun i j : { a // block a = b } => support i.val j.val) + (fun i j : { a // block a = b } => label i.val j.val)).det ≠ 0 + apply det_supportedVariables_ne_zero + · intro i + exact hdiag i.val + · intro i j k l hij hkl heq + obtain ⟨hik, hjl⟩ := hlabel i.val j.val k.val l.val hij hkl + (i.property.trans k.property.symm) heq + exact ⟨Subtype.ext hik, Subtype.ext hjl⟩ + +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankSelection.lean b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..79f576ea7ac937ef7ff5ea95a5cf91b6f279df81 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankSelection.lean @@ -0,0 +1,79 @@ +import OAI.Combinatorics.SecondNeighborhood.GenericRankGlobalMinors +import OAI.Combinatorics.SecondNeighborhood.GenericRankColumns + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +open Bipartite +open scoped Matrix + +variable {X : Type*} [Fintype X] [DecidableEq X] + +theorem matrixL_supported_on_matchingSupport (r : X → X → Prop) + (R C : Finset (X × X)) (v : CoefficientVariables X → ℝ) : + ∀ z left, ¬ matrixLSupport r R C z left → + matrixL r R C (selectedA r v) z left = 0 := by + classical + intro z left hs + by_cases hc : z.1.2 = left.1.2 + · have hr : ¬ r left.1.1 z.1.1 := fun hr => hs ⟨hc, hr⟩ + simp [matrixL, selectedA, hc, hr] + · simp [matrixL, hc] + +theorem matrixNTranspose_supported_on_matchingSupport (r : X → X → Prop) + (R C : Finset (X × X)) (v : CoefficientVariables X → ℝ) : + ∀ z right, ¬ matrixNTransposeSupport r R C z right → + (matrixN r R C (selectedB r v))ᵀ z right = 0 := by + classical + intro z right hs + by_cases hc : right.1.1 = z.1.1 + · have hr : ¬ r right.1.2 z.1.2 := fun hr => hs ⟨hc, hr⟩ + simp [Matrix.transpose_apply, matrixN, selectedB, hc, hr] + · simp [Matrix.transpose_apply, matrixN, hc] + +theorem exists_pruning_rank_coefficients + (r : X → X → Prop) (R C : Finset (X × X)) + (α : Finset (↥(Z r R C) × ↥R)) (β : Finset (↥(Z r R C) × ↥C)) + (hα : IsMaximumMatching (matrixLSupport r R C) α) + (hβ : IsMaximumMatching (matrixNTransposeSupport r R C) β) : + ∃ v : CoefficientVariables X → ℝ, + SupportedCoefficients r (selectedA r v) ∧ + SupportedCoefficients r (selectedB r v) ∧ + LocalMaximalRanks r R C (selectedB r v) ∧ + ((matrixL r R C (selectedA r v)).submatrix + (fun e : ↥α => e.1.1) (fun e : ↥α => e.1.2)).det ≠ 0 ∧ + (((matrixN r R C (selectedB r v))ᵀ).submatrix + (fun e : ↥β => e.1.1) (fun e : ↥β => e.1.2)).det ≠ 0 ∧ + (matrixL r R C (selectedA r v)).rank = α.card ∧ + ((matrixN r R C (selectedB r v))ᵀ).rank = β.card := by + classical + let extra : Bool → MvPolynomial (CoefficientVariables X) ℝ := fun t => + if t then (matrixLMatchingMinor r R C α).det + else (matrixNTransposeMatchingMinor r R C β).det + have hextra : ∀ t, extra t ≠ 0 := by + intro t + cases t with + | false => exact det_matrixNTransposeMatchingMinor_ne_zero r R C β hβ.1 + | true => exact det_matrixLMatchingMinor_ne_zero r R C α hα.1 + obtain ⟨v, hv, ha, hb, hlocal⟩ := + exists_coefficients_localMaximalRanks r R C extra hextra + have hdetL : ((matrixL r R C (selectedA r v)).submatrix + (fun e : ↥α => e.1.1) (fun e : ↥α => e.1.2)).det ≠ 0 := by + have h := hv true + change MvPolynomial.eval v (matrixLMatchingMinor r R C α).det ≠ 0 at h + simpa only [← det_evalPolynomialMatrix, eval_matrixLMatchingMinor] using h + have hdetN : (((matrixN r R C (selectedB r v))ᵀ).submatrix + (fun e : ↥β => e.1.1) (fun e : ↥β => e.1.2)).det ≠ 0 := by + have h := hv false + change MvPolynomial.eval v (matrixNTransposeMatchingMinor r R C β).det ≠ 0 at h + simpa only [← det_evalPolynomialMatrix, eval_matrixNTransposeMatchingMinor] using h + refine ⟨v, ha, hb, hlocal, hdetL, hdetN, ?_, ?_⟩ + · exact rank_eq_card_of_maximum_matching_minor hα _ + (matrixL_supported_on_matchingSupport r R C v) hdetL + · exact rank_eq_card_of_maximum_matching_minor hβ _ + (matrixNTranspose_supported_on_matchingSupport r R C v) hdetN + +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankSupport.lean b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..a495e102323ab08516c23ce538bfd81722d411f5 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/GenericRankSupport.lean @@ -0,0 +1,60 @@ +import Mathlib.LinearAlgebra.Matrix.Rank + +namespace OAI + +namespace SeymourSecondNeighborhood + +variable {I J K : Type*} [Fintype I] [Fintype J] [Field K] + +omit [Fintype I] in +private theorem matrix_rank_add_le (B C : Matrix I J K) : + (B + C).rank ≤ B.rank + C.rank := by + have hadd : (B + C).mulVecLin = B.mulVecLin + C.mulVecLin := + LinearMap.ext fun x => Matrix.add_mulVec B C x + change Module.finrank K (LinearMap.range (B + C).mulVecLin) ≤ + Module.finrank K (LinearMap.range B.mulVecLin) + + Module.finrank K (LinearMap.range C.mulVecLin) + rw [hadd] + exact (Submodule.finrank_mono + (LinearMap.range_add_le B.mulVecLin C.mulVecLin)).trans + (Submodule.finrank_add_le_finrank_add_finrank _ _) + +theorem rank_le_vertexCover_card (A : Matrix I J K) (s : Finset I) (t : Finset J) + (hcover : ∀ i j, A i j ≠ 0 → i ∈ s ∨ j ∈ t) : + A.rank ≤ s.card + t.card := by + classical + let B : Matrix I J K := fun i j => if i ∈ s then A i j else 0 + let C : Matrix I J K := fun i j => if i ∈ s then 0 else A i j + have hsum : A = B + C := by + ext i j + change A i j = B i j + C i j + by_cases hi : i ∈ s <;> simp [B, C, hi] + have hB : B.rank ≤ s.card := by + apply Matrix.rank_le_card_of_support_subset B s + rw [Function.support_subset_iff'] + intro i hi + change i ∉ s at hi + funext j + change (if i ∈ s then A i j else 0) = 0 + simp [hi] + have hC : C.transpose.rank ≤ t.card := by + apply Matrix.rank_le_card_of_support_subset C.transpose t + rw [Function.support_subset_iff'] + intro j hj + change j ∉ t at hj + funext i + change (if i ∈ s then 0 else A i j) = 0 + by_cases hi : i ∈ s + · simp [hi] + · have hA : A i j = 0 := by + by_contra h + exact (hcover i j h).elim hi hj + simp [hi, hA] + calc + A.rank = (B + C).rank := congrArg Matrix.rank hsum + _ ≤ B.rank + C.rank := matrix_rank_add_le B C + _ ≤ s.card + t.card := add_le_add hB (by simpa only [Matrix.rank_transpose] using hC) + +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/KernelBasisLifts.lean b/lean/OAI/Combinatorics/SecondNeighborhood/KernelBasisLifts.lean new file mode 100644 index 0000000000000000000000000000000000000000..f4f369f78481bbc7559f109b4483d8e524c32b18 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/KernelBasisLifts.lean @@ -0,0 +1,121 @@ +import OAI.Combinatorics.SecondNeighborhood.GenericRankColumns + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +open scoped BigOperators Matrix + +variable {I J F κ E : Type*} +variable [Fintype J] [Fintype κ] [DecidableEq J] [Field F] + +def extendSelected (col : κ → J) (y : κ → F) : J → F := + ∑ k, Pi.single (col k) (y k) + +omit [Fintype J] in +theorem extendSelected_apply_of_ne (col : κ → J) (y : κ → F) (j : J) + (hj : ∀ k, j ≠ col k) : extendSelected col y j = 0 := by + simp only [extendSelected, Finset.sum_apply] + exact Finset.sum_eq_zero fun k _ => + Pi.single_eq_of_ne (M := fun _ : J => F) (hj k) (y k) + +omit [Fintype J] in +theorem extendSelected_apply_selected (col : κ → J) (hcol : Function.Injective col) + (y : κ → F) (k : κ) : extendSelected col y (col k) = y k := by + classical + simp only [extendSelected, Finset.sum_apply] + rw [Finset.sum_eq_single k] + · simp + · intro k' _ hk' + exact Pi.single_eq_of_ne (M := fun _ : J => F) (fun h => hk' (hcol h).symm) (y k') + · simp + +theorem mulVec_extendSelected (M : Matrix I J F) (col : κ → J) (y : κ → F) : + M *ᵥ extendSelected col y = (M.submatrix id col) *ᵥ y := by + funext i + change (M i) ⬝ᵥ (∑ k, Pi.single (col k) (y k)) = + ∑ k, M i (col k) * y k + simp only [dotProduct_sum, dotProduct_single] + +noncomputable def liftCoefficients (M : Matrix I J F) (col : κ → J) + (cover : ∀ x : J → F, ∃ y : κ → F, + M *ᵥ x = (M.submatrix id col) *ᵥ y) (j : J) : κ → F := + Classical.choose (cover (Pi.single j 1)) + +theorem liftCoefficients_spec (M : Matrix I J F) (col : κ → J) + (cover : ∀ x : J → F, ∃ y : κ → F, + M *ᵥ x = (M.submatrix id col) *ᵥ y) (j : J) : + M *ᵥ Pi.single j 1 = (M.submatrix id col) *ᵥ liftCoefficients M col cover j := + Classical.choose_spec (cover (Pi.single j 1)) + +noncomputable def kernelLift (M : Matrix I J F) (col : κ → J) + (cover : ∀ x : J → F, ∃ y : κ → F, + M *ᵥ x = (M.submatrix id col) *ᵥ y) (j : J) : J → F := + Pi.single j 1 - extendSelected col (liftCoefficients M col cover j) + +theorem kernelLift_eq (M : Matrix I J F) (col : κ → J) + (cover : ∀ x : J → F, ∃ y : κ → F, + M *ᵥ x = (M.submatrix id col) *ᵥ y) (j : J) : + kernelLift M col cover j = + Pi.single j 1 - ∑ k, Pi.single (col k) (liftCoefficients M col cover j k) := + rfl + +theorem mulVec_kernelLift (M : Matrix I J F) (col : κ → J) + (cover : ∀ x : J → F, ∃ y : κ → F, + M *ᵥ x = (M.submatrix id col) *ᵥ y) (j : J) : + M *ᵥ kernelLift M col cover j = 0 := by + rw [kernelLift, Matrix.mulVec_sub, mulVec_extendSelected, + liftCoefficients_spec M col cover j, sub_self] + +theorem kernelLift_apply_of_ne (M : Matrix I J F) (col : κ → J) + (cover : ∀ x : J → F, ∃ y : κ → F, + M *ᵥ x = (M.submatrix id col) *ᵥ y) (j j' : J) + (hj' : ∀ k, j' ≠ col k) : + kernelLift M col cover j j' = (Pi.single j 1 : J → F) j' := by + change (Pi.single j 1 : J → F) j' - + extendSelected col (liftCoefficients M col cover j) j' = _ + rw [extendSelected_apply_of_ne col _ j' hj', sub_zero] + +theorem kernelLift_normalized [DecidableEq E] + (M : Matrix I J F) (col : κ → J) + (cover : ∀ x : J → F, ∃ y : κ → F, + M *ᵥ x = (M.submatrix id col) *ᵥ y) + (left : E → J) (hleft : Function.Injective left) + (hdisjoint : ∀ e k, left e ≠ col k) (e f : E) : + kernelLift M col cover (left e) (left f) = if e = f then 1 else 0 := by + rw [kernelLift_apply_of_ne M col cover (left e) (left f) (hdisjoint f)] + by_cases h : e = f + · subst f + simp + · have hcoord : left f ≠ left e := fun hcoord => h (hleft hcoord).symm + rw [Pi.single_eq_of_ne hcoord, ite_eq_right h] + +theorem exists_normalized_kernelLifts [DecidableEq E] + (M : Matrix I J F) (col : κ → J) + (cover : ∀ x : J → F, ∃ y : κ → F, + M *ᵥ x = (M.submatrix id col) *ᵥ y) + (left : E → J) (hleft : Function.Injective left) + (hdisjoint : ∀ e k, left e ≠ col k) : + ∃ U : E → J → F, (∀ e, M *ᵥ U e = 0) ∧ + (∀ e f, U e (left f) = if e = f then 1 else 0) := by + refine ⟨fun e => kernelLift M col cover (left e), ?_, ?_⟩ + · intro e + exact mulVec_kernelLift M col cover (left e) + · intro e f + exact kernelLift_normalized M col cover left hleft hdisjoint e f + +theorem exists_normalized_kernelLifts_of_det_ne_zero + [Fintype I] [DecidableEq κ] [DecidableEq E] + (M : Matrix I J F) (row : κ → I) (col : κ → J) + (hdet : (M.submatrix row col).det ≠ 0) (hrank : M.rank ≤ Fintype.card κ) + (left : E → J) (hleft : Function.Injective left) + (hdisjoint : ∀ e k, left e ≠ col k) : + ∃ U : E → J → F, (∀ e, M *ᵥ U e = 0) ∧ + (∀ e f, U e (left f) = if e = f then 1 else 0) := by + exact exists_normalized_kernelLifts M col + (fun x => exists_selectedColumns_mulVec M row col hdet hrank x) + left hleft hdisjoint + +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/KernelConflict.lean b/lean/OAI/Combinatorics/SecondNeighborhood/KernelConflict.lean new file mode 100644 index 0000000000000000000000000000000000000000..cb4e4f95aff510e35c5767b1703c3a19b9bd4185 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/KernelConflict.lean @@ -0,0 +1,44 @@ +import OAI.Combinatorics.SecondNeighborhood.KernelRestriction +import OAI.Combinatorics.SecondNeighborhood.MaxSupportKernel + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +open Matrix +open SeymourSecondNeighborhood.LinearAlgebra.MaxSupportKernel + +variable {X : Type*} [Fintype X] [DecidableEq X] + +omit [Fintype X] [DecidableEq X] in +theorem matrixD_supported (r : X → X → Prop) (R C : Finset (X × X)) + (b : X → X → ℝ) (hb : SupportedCoefficients r b) (p i : X) : + SupportedOn (localSupport r R C p i) (matrixD R C b p i) := by + intro s j h + exact hb s.1 j.1 h + +def LocalMaximalRanks (r : X → X → Prop) (R C : Finset (X × X)) + (b : X → X → ℝ) : Prop := + ∀ p i, r p i → ∀ D : Matrix (PairFiber C i) (PairFiber R p) ℝ, + SupportedOn (localSupport r R C p i) D → D.rank ≤ (matrixD R C b p i).rank + +theorem conflict_kernel_product_eq_zero (r : X → X → Prop) + (R C : Finset (X × X)) (b : X → X → ℝ) (hb : SupportedCoefficients r b) + (hmax : LocalMaximalRanks r R C b) + (u : ↥R → ℝ) (hu : matrixB r R C b *ᵥ u = 0) + (v : ↥C → ℝ) (hv : (matrixN r R C b)ᵀ *ᵥ v = 0) + (left : ↥R) (right : ↥C) (hc : Conflict r left.1 right.1) : + u left * v right = 0 := by + let j : PairFiber R left.1.1 := ⟨left.1.2, left.2⟩ + let s : PairFiber C right.1.1 := ⟨right.1.2, right.2⟩ + have hx := restrictFiber_mem_kernelD r R C b hb left.1.1 right.1.1 hc.1 u hu + have hy := restrictFiber_mem_kernelD_transpose r R C b hb + left.1.1 right.1.1 hc.1 v hv + have h := kernel_support_of_max_rank + (matrixD_supported r R C b hb left.1.1 right.1.1) + (hmax left.1.1 right.1.1 hc.1) hx hy (s := s) (j := j) hc.2 + simpa [restrictFiber, fiberIndex, j, s] using h + +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/KernelIndependence.lean b/lean/OAI/Combinatorics/SecondNeighborhood/KernelIndependence.lean new file mode 100644 index 0000000000000000000000000000000000000000..f570023ae4ef3b7f0f274bc4282a2f83ad594a9e --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/KernelIndependence.lean @@ -0,0 +1,118 @@ +import OAI.Combinatorics.SecondNeighborhood.KernelConflict +import OAI.Combinatorics.SecondNeighborhood.MatrixMapsCommute +import Mathlib.LinearAlgebra.Dimension.Finite +import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +open Matrix +open scoped BigOperators Classical + +variable {X : Type*} [Fintype X] [DecidableEq X] + +noncomputable section + +theorem kernelB_vanishes_at_matched_left + (r : X → X → Prop) (R C : Finset (X × X)) (b : X → X → ℝ) + (hb : SupportedCoefficients r b) (hmax : LocalMaximalRanks r R C b) + (left : ↥R) (right : ↥C) (hc : Conflict r left.val right.val) + (v : ↥C → ℝ) (hv : (matrixN r R C b)ᵀ *ᵥ v = 0) + (hcoordinate : v right = 1) + (u : ↥R → ℝ) (hu : matrixB r R C b *ᵥ u = 0) : u left = 0 := by + have h := conflict_kernel_product_eq_zero r R C b hb hmax + u hu v hv left right hc + simpa only [hcoordinate, mul_one] using h + +theorem matrixB_lifts_linearIndependent + {E : Type*} [Fintype E] + (r : X → X → Prop) (R C : Finset (X × X)) (b : X → X → ℝ) + (hb : SupportedCoefficients r b) (hmax : LocalMaximalRanks r R C b) + (left : E → ↥R) (right : E → ↥C) + (U : E → (↥R → ℝ)) (W : E → (↥C → ℝ)) + (hW : ∀ e, (matrixN r R C b)ᵀ *ᵥ W e = 0) + (hWcoordinate : ∀ e, W e (right e) = 1) + (hUcoordinate : ∀ e f, U e (left f) = if e = f then 1 else 0) + (hconflict : ∀ e, Conflict r (left e).val (right e).val) : + LinearIndependent ℝ (fun e => matrixB r R C b *ᵥ U e) := by + apply Fintype.linearIndependent_iff.mpr + intro coefficients hrelation e + let u : ↥R → ℝ := ∑ f, coefficients f • U f + have hu : matrixB r R C b *ᵥ u = 0 := by + change (matrixB r R C b).mulVecLin (∑ f, coefficients f • U f) = 0 + simpa only [map_sum, map_smul, Matrix.mulVecLin_apply] using hrelation + have hzero : u (left e) = 0 := + kernelB_vanishes_at_matched_left r R C b hb hmax + (left e) (right e) (hconflict e) (W e) (hW e) (hWcoordinate e) u hu + have hcoordinate : u (left e) = coefficients e := by + simp [u, Finset.sum_apply, Pi.smul_apply, hUcoordinate, smul_eq_mul, mul_ite] + exact hcoordinate.symm.trans hzero + +theorem matrixB_lift_mem_ker_matrixA + (r : X → X → Prop) (R C : Finset (X × X)) (a b : X → X → ℝ) + (ha : SupportedCoefficients r a) (hb : SupportedCoefficients r b) + (u : ↥R → ℝ) (hu : matrixL r R C a *ᵥ u = 0) : + matrixB r R C b *ᵥ u ∈ LinearMap.ker (matrixA r R C a).mulVecLin := by + rw [LinearMap.mem_ker] + change matrixA r R C a *ᵥ (matrixB r R C b *ᵥ u) = 0 + rw [Matrix.mulVec_mulVec, + ← matrixN_mul_matrixL_eq_matrixA_mul_matrixB r R C a b ha hb, + ← Matrix.mulVec_mulVec, hu, Matrix.mulVec_zero] + +theorem card_le_finrank_ker_matrixA_of_lifts + {E : Type*} [Fintype E] + (r : X → X → Prop) (R C : Finset (X × X)) (a b : X → X → ℝ) + (ha : SupportedCoefficients r a) (hb : SupportedCoefficients r b) + (hmax : LocalMaximalRanks r R C b) + (left : E → ↥R) (right : E → ↥C) + (U : E → (↥R → ℝ)) (W : E → (↥C → ℝ)) + (hU : ∀ e, matrixL r R C a *ᵥ U e = 0) + (hW : ∀ e, (matrixN r R C b)ᵀ *ᵥ W e = 0) + (hWcoordinate : ∀ e, W e (right e) = 1) + (hUcoordinate : ∀ e f, U e (left f) = if e = f then 1 else 0) + (hconflict : ∀ e, Conflict r (left e).val (right e).val) : + Fintype.card E ≤ Module.finrank ℝ (LinearMap.ker (matrixA r R C a).mulVecLin) := by + let images : E → LinearMap.ker (matrixA r R C a).mulVecLin := fun e => + ⟨matrixB r R C b *ᵥ U e, + matrixB_lift_mem_ker_matrixA r R C a b ha hb (U e) (hU e)⟩ + have hindependent : LinearIndependent ℝ images := by + apply LinearIndependent.of_comp (LinearMap.ker (matrixA r R C a).mulVecLin).subtype + change LinearIndependent ℝ (fun e => matrixB r R C b *ᵥ U e) + exact matrixB_lifts_linearIndependent r R C b hb hmax left right U W + hW hWcoordinate hUcoordinate hconflict + exact hindependent.fintype_card_le_finrank + +theorem card_add_rank_matrixN_mul_matrixL_le_card_H_of_lifts + {E : Type*} [Fintype E] + (r : X → X → Prop) (R C : Finset (X × X)) (a b : X → X → ℝ) + (ha : SupportedCoefficients r a) (hb : SupportedCoefficients r b) + (hmax : LocalMaximalRanks r R C b) + (left : E → ↥R) (right : E → ↥C) + (U : E → (↥R → ℝ)) (W : E → (↥C → ℝ)) + (hU : ∀ e, matrixL r R C a *ᵥ U e = 0) + (hW : ∀ e, (matrixN r R C b)ᵀ *ᵥ W e = 0) + (hWcoordinate : ∀ e, W e (right e) = 1) + (hUcoordinate : ∀ e f, U e (left f) = if e = f then 1 else 0) + (hconflict : ∀ e, Conflict r (left e).val (right e).val) : + Fintype.card E + (matrixN r R C b * matrixL r R C a).rank ≤ (H r R C).card := by + have hcard := card_le_finrank_ker_matrixA_of_lifts r R C a b ha hb hmax + left right U W hU hW hWcoordinate hUcoordinate hconflict + have hnull : (matrixA r R C a).rank + + Module.finrank ℝ (LinearMap.ker (matrixA r R C a).mulVecLin) = (H r R C).card := by + simpa only [Matrix.rank, Module.finrank_pi, Fintype.card_coe] using + LinearMap.finrank_range_add_finrank_ker (matrixA r R C a).mulVecLin + rw [matrixN_mul_matrixL_eq_matrixA_mul_matrixB r R C a b ha hb] + calc + Fintype.card E + (matrixA r R C a * matrixB r R C b).rank ≤ + Module.finrank ℝ (LinearMap.ker (matrixA r R C a).mulVecLin) + + (matrixA r R C a).rank := + Nat.add_le_add hcard (Matrix.rank_mul_le_left _ _) + _ = (matrixA r R C a).rank + + Module.finrank ℝ (LinearMap.ker (matrixA r R C a).mulVecLin) := Nat.add_comm _ _ + _ = (H r R C).card := hnull + +end +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/KernelRestriction.lean b/lean/OAI/Combinatorics/SecondNeighborhood/KernelRestriction.lean new file mode 100644 index 0000000000000000000000000000000000000000..3642c9c3725f8d7c52c40fcd9cc4b09698055617 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/KernelRestriction.lean @@ -0,0 +1,123 @@ +import OAI.Combinatorics.SecondNeighborhood.MatrixMaps + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +open Matrix +open scoped BigOperators + +variable {X : Type*} [Fintype X] [DecidableEq X] + +abbrev PairFiber (P : Finset (X × X)) (p : X) := {j : X // (p, j) ∈ P} + +def fiberIndex (P : Finset (X × X)) (p : X) (j : PairFiber P p) : ↥P := + ⟨(p, j.1), j.2⟩ + +omit [Fintype X] [DecidableEq X] in +theorem fiberIndex_injective (P : Finset (X × X)) (p : X) : + Function.Injective (fiberIndex P p) := by + intro j k h + apply Subtype.ext + exact congrArg (fun q : ↥P => q.1.2) h + +omit [Fintype X] [DecidableEq X] in +theorem mem_range_fiberIndex (P : Finset (X × X)) (p : X) (q : ↥P) : + q ∈ Set.range (fiberIndex P p) ↔ q.1.1 = p := by + constructor + · rintro ⟨j, rfl⟩ + rfl + · rcases q with ⟨⟨q₁, q₂⟩, hq⟩ + intro h + change q₁ = p at h + subst q₁ + exact ⟨⟨q₂, hq⟩, rfl⟩ + +def restrictFiber (P : Finset (X × X)) (p : X) (u : ↥P → ℝ) : + PairFiber P p → ℝ := + fun j => u (fiberIndex P p j) + +def matrixD (R C : Finset (X × X)) (b : X → X → ℝ) (p i : X) : + Matrix (PairFiber C i) (PairFiber R p) ℝ := + fun s j => b s.1 j.1 + +def localSupport (r : X → X → Prop) (R C : Finset (X × X)) (p i : X) : + Set (PairFiber C i × PairFiber R p) := + {q | r q.1.1 q.2.1} + +theorem matrixB_mulVec_fiber (r : X → X → Prop) (R C : Finset (X × X)) + (b : X → X → ℝ) (u : ↥R → ℝ) (p s : X) + (hps : (p, s) ∈ H r R C) : + (matrixB r R C b *ᵥ u) ⟨(p, s), hps⟩ = + ∑ j : PairFiber R p, b s j.1 * u (fiberIndex R p j) := by + classical + change (∑ q : ↥R, matrixB r R C b ⟨(p, s), hps⟩ q * u q) = _ + symm + apply Fintype.sum_of_injective (fiberIndex R p) (fiberIndex_injective R p) + · intro q hq + have hfirst : p ≠ q.1.1 := by + intro heq + exact hq ((mem_range_fiberIndex R p q).mpr heq.symm) + simp [matrixB, hfirst] + · intro j + simp [matrixB, fiberIndex] + +theorem matrixN_transpose_mulVec_fiber (r : X → X → Prop) + (R C : Finset (X × X)) (b : X → X → ℝ) (v : ↥C → ℝ) (i j : X) + (hij : (i, j) ∈ Z r R C) : + ((matrixN r R C b)ᵀ *ᵥ v) ⟨(i, j), hij⟩ = + ∑ s : PairFiber C i, b s.1 j * v (fiberIndex C i s) := by + classical + change (∑ q : ↥C, matrixN r R C b q ⟨(i, j), hij⟩ * v q) = _ + symm + apply Fintype.sum_of_injective (fiberIndex C i) (fiberIndex_injective C i) + · intro q hq + have hfirst : q.1.1 ≠ i := by + intro heq + exact hq ((mem_range_fiberIndex C i q).mpr heq) + simp [matrixN, hfirst] + · intro s + simp [matrixN, fiberIndex] + +theorem restrictFiber_mem_kernelD (r : X → X → Prop) (R C : Finset (X × X)) + (b : X → X → ℝ) (hb : SupportedCoefficients r b) (p i : X) + (hpi : r p i) (u : ↥R → ℝ) (hu : matrixB r R C b *ᵥ u = 0) : + matrixD R C b p i *ᵥ restrictFiber R p u = 0 := by + classical + funext s + change (∑ j : PairFiber R p, b s.1 j.1 * u (fiberIndex R p j)) = 0 + by_cases hrow : ∃ j : PairFiber R p, r s.1 j.1 + · obtain ⟨j, hj⟩ := hrow + have hps : (p, s.1) ∈ H r R C := by + apply mem_H.mpr + exact ⟨i, j.1, j.2, s.2, hpi, hj⟩ + rw [← matrixB_mulVec_fiber r R C b u p s.1 hps] + exact congrFun hu ⟨(p, s.1), hps⟩ + · apply Finset.sum_eq_zero + intro j _ + have hzero : b s.1 j.1 = 0 := hb s.1 j.1 (fun h => hrow ⟨j, h⟩) + rw [hzero, zero_mul] + +theorem restrictFiber_mem_kernelD_transpose (r : X → X → Prop) + (R C : Finset (X × X)) (b : X → X → ℝ) (hb : SupportedCoefficients r b) + (p i : X) (hpi : r p i) (v : ↥C → ℝ) + (hv : (matrixN r R C b)ᵀ *ᵥ v = 0) : + (matrixD R C b p i)ᵀ *ᵥ restrictFiber C i v = 0 := by + classical + funext j + change (∑ s : PairFiber C i, b s.1 j.1 * v (fiberIndex C i s)) = 0 + by_cases hcol : ∃ s : PairFiber C i, r s.1 j.1 + · obtain ⟨s, hs⟩ := hcol + have hij : (i, j.1) ∈ Z r R C := by + apply mem_Z.mpr + exact ⟨p, s.1, j.2, s.2, hpi, hs⟩ + rw [← matrixN_transpose_mulVec_fiber r R C b v i j.1 hij] + exact congrFun hv ⟨(i, j.1), hij⟩ + · apply Finset.sum_eq_zero + intro s _ + have hzero : b s.1 j.1 = 0 := hb s.1 j.1 (fun h => hcol ⟨s, h⟩) + rw [hzero, zero_mul] + +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/Main.lean b/lean/OAI/Combinatorics/SecondNeighborhood/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..97116f86ece4eb7e64bc818f9781456c74d3cccd --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/Main.lean @@ -0,0 +1,22 @@ +import OAI.Combinatorics.SecondNeighborhood.Reduction +import OAI.Combinatorics.SecondNeighborhood.Pruning +import OAI.Combinatorics.SecondNeighborhood.ExtremalContradiction + +namespace OAI + +namespace SeymourSecondNeighborhood + +variable {V : Type*} [Fintype V] [DecidableEq V] [Nonempty V] + +theorem exists_goodVertex (r : V → V → Prop) (hr : IsOriented r) : + ∃ v, GoodVertex r v := by + classical + by_contra h + have hcounter : Counterexample r := (counterexample_iff_not_conjecture r).mpr h + obtain ⟨n, hn, g, hg, hpos, hgrowth⟩ := counterexample_reduction hr hcounter + let : Nonempty (Fin n) := ⟨⟨0, hn⟩⟩ + exact Extremal.no_strictSubsetGrowth_of_pruning hg hpos (Pruning.pruning g) hgrowth + +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/Matching.lean b/lean/OAI/Combinatorics/SecondNeighborhood/Matching.lean new file mode 100644 index 0000000000000000000000000000000000000000..a30f32560d00a6adda7a58bbc84f92970c135b87 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/Matching.lean @@ -0,0 +1,157 @@ +import Mathlib.Data.Finset.Card +import Mathlib.Data.Finset.Max +import Mathlib.Data.Fintype.Powerset +import Mathlib.Data.Fintype.Prod + +namespace OAI + +namespace SeymourSecondNeighborhood.Bipartite + +variable {L R : Type*} + +def IsMatching (E : L → R → Prop) (M : Finset (L × R)) : Prop := + (∀ e ∈ M, E e.1 e.2) ∧ + Set.InjOn Prod.fst (M : Set (L × R)) ∧ + Set.InjOn Prod.snd (M : Set (L × R)) + +def IsMaximumMatching (E : L → R → Prop) (M : Finset (L × R)) : Prop := + IsMatching E M ∧ ∀ N, IsMatching E N → N.card ≤ M.card + +def IsVertexCover (E : L → R → Prop) (A : Finset L) (B : Finset R) : Prop := + ∀ l r, E l r → l ∈ A ∨ r ∈ B + +@[simp] theorem isMatching_empty (E : L → R → Prop) : + IsMatching E ∅ := by + simp [IsMatching, Set.InjOn] + +theorem IsMatching.submatching {E : L → R → Prop} {M N : Finset (L × R)} + (hM : IsMatching E M) (hNM : N ⊆ M) : IsMatching E N := by + refine ⟨fun e he => hM.1 e (hNM he), ?_, ?_⟩ + · intro e he f hf hef + exact hM.2.1 (hNM he) (hNM hf) hef + · intro e he f hf hef + exact hM.2.2 (hNM he) (hNM hf) hef + +theorem IsMatching.mono_relation {E F : L → R → Prop} {M : Finset (L × R)} + (hM : IsMatching E M) (hEF : ∀ l r, E l r → F l r) : IsMatching F M := + ⟨fun e he => hEF e.1 e.2 (hM.1 e he), hM.2⟩ + +theorem IsMatching.left_unique {E : L → R → Prop} {M : Finset (L × R)} + (hM : IsMatching E M) {l : L} {r s : R} + (hr : (l, r) ∈ M) (hs : (l, s) ∈ M) : r = s := by + exact congrArg Prod.snd (hM.2.1 hr hs rfl) + +theorem IsMatching.right_unique {E : L → R → Prop} {M : Finset (L × R)} + (hM : IsMatching E M) {l k : L} {r : R} + (hl : (l, r) ∈ M) (hk : (k, r) ∈ M) : l = k := by + exact congrArg Prod.fst (hM.2.2 hl hk rfl) + +section DecidableEq + +variable [DecidableEq L] [DecidableEq R] + +def leftVertices (M : Finset (L × R)) : Finset L := M.image Prod.fst + +def rightVertices (M : Finset (L × R)) : Finset R := M.image Prod.snd + +omit [DecidableEq R] in +@[simp] theorem mem_leftVertices {M : Finset (L × R)} {l : L} : + l ∈ leftVertices M ↔ ∃ r, (l, r) ∈ M := by + simp only [leftVertices, Finset.mem_image] + constructor + · rintro ⟨⟨k, r⟩, hkr, hkl⟩ + cases hkl + exact ⟨r, hkr⟩ + · rintro ⟨r, hr⟩ + exact ⟨(l, r), hr, rfl⟩ + +omit [DecidableEq L] in +@[simp] theorem mem_rightVertices {M : Finset (L × R)} {r : R} : + r ∈ rightVertices M ↔ ∃ l, (l, r) ∈ M := by + simp only [rightVertices, Finset.mem_image] + constructor + · rintro ⟨⟨l, s⟩, hls, hsr⟩ + cases hsr + exact ⟨l, hls⟩ + · rintro ⟨l, hl⟩ + exact ⟨(l, r), hl, rfl⟩ + +omit [DecidableEq R] in +theorem matching_card_leftVertices {E : L → R → Prop} {M : Finset (L × R)} + (hM : IsMatching E M) : (leftVertices M).card = M.card := + Finset.card_image_iff.mpr hM.2.1 + +omit [DecidableEq L] in +theorem matching_card_rightVertices {E : L → R → Prop} {M : Finset (L × R)} + (hM : IsMatching E M) : (rightVertices M).card = M.card := + Finset.card_image_iff.mpr hM.2.2 + +omit [DecidableEq R] in +theorem matching_card_le_cover_card {E : L → R → Prop} + {M : Finset (L × R)} {A : Finset L} {B : Finset R} + (hM : IsMatching E M) (hC : IsVertexCover E A B) : + M.card ≤ A.card + B.card := by + classical + let ML := M.filter fun e => e.1 ∈ A + let MR := M.filter fun e => e.1 ∉ A + have hL : ML.card ≤ A.card := by + apply Finset.card_le_card_of_injOn Prod.fst + · intro e he + exact (Finset.mem_filter.mp he).2 + · intro e he f hf hef + exact hM.2.1 (Finset.mem_filter.mp he).1 (Finset.mem_filter.mp hf).1 hef + have hR : MR.card ≤ B.card := by + apply Finset.card_le_card_of_injOn Prod.snd + · intro e he + rcases Finset.mem_filter.mp he with ⟨heM, heA⟩ + exact (hC e.1 e.2 (hM.1 e heM)).resolve_left heA + · intro e he f hf hef + exact hM.2.2 (Finset.mem_filter.mp he).1 (Finset.mem_filter.mp hf).1 hef + calc + M.card = ML.card + MR.card := + (Finset.card_filter_add_card_filter_not (s := M) (fun e => e.1 ∈ A)).symm + _ ≤ A.card + B.card := Nat.add_le_add hL hR + +end DecidableEq + +section Finite + +variable [Fintype L] [Fintype R] + +theorem exists_maximum_matching (E : L → R → Prop) : + ∃ M, IsMaximumMatching E M := by + classical + let candidates : Finset (Finset (L × R)) := Finset.univ.filter (IsMatching E) + have hne : candidates.Nonempty := by + refine ⟨∅, ?_⟩ + simp [candidates] + obtain ⟨M, hM, hmax⟩ := candidates.exists_max_image Finset.card hne + refine ⟨M, (Finset.mem_filter.mp hM).2, ?_⟩ + intro N hN + exact hmax N (by simp [candidates, hN]) + +theorem exists_maximum_matching_min_cost (E : L → R → Prop) + (cost : Finset (L × R) → ℕ) : + ∃ M, IsMaximumMatching E M ∧ + ∀ N, IsMatching E N → N.card = M.card → cost M ≤ cost N := by + classical + obtain ⟨M₀, hM₀, hmax₀⟩ := exists_maximum_matching E + let candidates : Finset (Finset (L × R)) := + Finset.univ.filter fun N => IsMatching E N ∧ N.card = M₀.card + have hne : candidates.Nonempty := by + refine ⟨M₀, ?_⟩ + simp [candidates, hM₀] + obtain ⟨M, hM, hmin⟩ := candidates.exists_min_image cost hne + have hM' : IsMatching E M ∧ M.card = M₀.card := (Finset.mem_filter.mp hM).2 + refine ⟨M, ⟨hM'.1, ?_⟩, ?_⟩ + · intro N hN + rw [hM'.2] + exact hmax₀ N hN + · intro N hN hcard + exact hmin N (by simp [candidates, hN, hcard, hM'.2]) + +end Finite + +end SeymourSecondNeighborhood.Bipartite + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/MatchingAugmented.lean b/lean/OAI/Combinatorics/SecondNeighborhood/MatchingAugmented.lean new file mode 100644 index 0000000000000000000000000000000000000000..7271d0565abc56cd159514d7d70b102e6ef5b853 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/MatchingAugmented.lean @@ -0,0 +1,268 @@ +import OAI.Combinatorics.SecondNeighborhood.MatchingExchange + +namespace OAI + +namespace SeymourSecondNeighborhood.Bipartite + +variable {L R : Type*} [Fintype L] [Fintype R] + [DecidableEq L] [DecidableEq R] + {E : L → R → Prop} + +omit [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R] in +private theorem augmented_matching_subset {M N : Finset (L × R)} + (hM : IsMatching E M) (hNM : N ⊆ M) : IsMatching E N := by + exact ⟨fun e he => hM.1 e (hNM he), + fun _ he _ hf h => hM.2.1 (hNM he) (hNM hf) h, + fun _ he _ hf h => hM.2.2 (hNM he) (hNM hf) h⟩ + +theorem isMaximumMatching_rightBlock_of_minimum_crossing + (P : L → Prop) (Q : R → Prop) [DecidablePred P] [DecidablePred Q] + (hblock : ∀ a b, E a b → Q b → P a) + {M : Finset (L × R)} (hM : IsMaximumMatching E M) + (hmin : ∀ N : Finset (L × R), IsMaximumMatching E N → + (M.filter (fun e => P e.1 ∧ ¬Q e.2)).card ≤ + (N.filter (fun e => P e.1 ∧ ¬Q e.2)).card) : + IsMaximumMatching (fun a b => E a b ∧ Q b) + (M.filter (fun e => Q e.2)) := by + classical + let α := M.filter (fun e => Q e.2) + let T := M \ α + have hαM : α ⊆ M := Finset.filter_subset _ _ + have hα : IsMatching (fun a b => E a b ∧ Q b) α := by + refine ⟨?_, (augmented_matching_subset hM.1 hαM).2⟩ + intro e he + exact ⟨hM.1.1 e (hαM he), (Finset.mem_filter.mp he).2⟩ + refine ⟨hα, ?_⟩ + intro N hN + by_contra hlarge + have hlarge' : α.card < N.card := Nat.lt_of_not_ge hlarge + obtain ⟨B, hB, hBcard, hBleft⟩ := + exists_matching_one_larger_saturating_left hα hN hlarge' + have hBE : IsMatching E B := + ⟨fun e he => (hB.1 e he).1, hB.2⟩ + have hT : IsMatching E T := + augmented_matching_subset hM.1 Finset.sdiff_subset + have hTnotQ : ∀ e ∈ T, ¬Q e.2 := by + intro e he hQ + exact (Finset.mem_sdiff.mp he).2 + (Finset.mem_filter.mpr ⟨(Finset.mem_sdiff.mp he).1, hQ⟩) + let D := T.filter (fun e => e.1 ∈ B.image Prod.fst) + let U := T \ D + let M' := U ∪ B + have hDT : D ⊆ T := Finset.filter_subset _ _ + have hUM : U ⊆ M := fun e he => + (Finset.mem_sdiff.mp (Finset.mem_sdiff.mp he).1).1 + have hDcross : ∀ e ∈ D, P e.1 ∧ ¬Q e.2 := by + intro e he + have heT := hDT he + obtain ⟨b, hbB, hb⟩ := Finset.mem_image.mp (Finset.mem_filter.mp he).2 + refine ⟨?_, hTnotQ e heT⟩ + have hbP := hblock b.1 b.2 (hB.1 b hbB).1 (hB.1 b hbB).2 + simpa only [hb] using hbP + have hDleft : D.image Prod.fst ⊆ B.image Prod.fst \ α.image Prod.fst := by + intro a ha + obtain ⟨e, heD, rfl⟩ := Finset.mem_image.mp ha + refine Finset.mem_sdiff.mpr ⟨(Finset.mem_filter.mp heD).2, ?_⟩ + intro heα + obtain ⟨f, hfα, hfe⟩ := Finset.mem_image.mp heα + have heM : e ∈ M := (Finset.mem_sdiff.mp (hDT heD)).1 + have hfe' : f = e := hM.1.2.1 (hαM hfα) heM hfe + exact (Finset.mem_sdiff.mp (hDT heD)).2 (hfe' ▸ hfα) + have hDcard : D.card ≤ 1 := by + have hDinj : Set.InjOn Prod.fst (↑D : Set (L × R)) := + fun _ he _ hf h => hT.2.1 (hDT he) (hDT hf) h + have hc := Finset.card_le_card hDleft + rw [Finset.card_image_of_injOn hDinj, + Finset.card_sdiff_of_subset hBleft, + Finset.card_image_of_injOn hB.2.1, + Finset.card_image_of_injOn hα.2.1] at hc + omega + have hUBleft : ∀ u ∈ U, ∀ b ∈ B, u.1 ≠ b.1 := by + intro u hu b hb hub + have huT : u ∈ T := (Finset.mem_sdiff.mp hu).1 + have huD : u ∈ D := Finset.mem_filter.mpr + ⟨huT, Finset.mem_image.mpr ⟨b, hb, hub.symm⟩⟩ + exact (Finset.mem_sdiff.mp hu).2 huD + have hUBright : ∀ u ∈ U, ∀ b ∈ B, u.2 ≠ b.2 := by + intro u hu b hb hub + apply hTnotQ u (Finset.mem_sdiff.mp hu).1 + rw [hub] + exact (hB.1 b hb).2 + have hU : IsMatching E U := augmented_matching_subset hM.1 hUM + have hM'match : IsMatching E M' := by + refine ⟨?_, ?_, ?_⟩ + · intro e he + rcases Finset.mem_union.mp he with he | he + · exact hU.1 e he + · exact hBE.1 e he + · intro e he f hf hef + rcases Finset.mem_union.mp he with he | he + · rcases Finset.mem_union.mp hf with hf | hf + · exact hU.2.1 he hf hef + · exact False.elim (hUBleft e he f hf hef) + · rcases Finset.mem_union.mp hf with hf | hf + · exact False.elim (hUBleft f hf e he hef.symm) + · exact hBE.2.1 he hf hef + · intro e he f hf hef + rcases Finset.mem_union.mp he with he | he + · rcases Finset.mem_union.mp hf with hf | hf + · exact hU.2.2 he hf hef + · exact False.elim (hUBright e he f hf hef) + · rcases Finset.mem_union.mp hf with hf | hf + · exact False.elim (hUBright f hf e he hef.symm) + · exact hBE.2.2 he hf hef + have hUBdisjoint : Disjoint U B := by + apply Finset.disjoint_left.mpr + intro e heU heB + exact hUBleft e heU e heB rfl + have hM'card : M'.card + D.card = M.card + 1 := by + have hpart := Finset.card_sdiff_add_card_eq_card hαM + have hpart' := Finset.card_sdiff_add_card_eq_card hDT + have hunion := Finset.card_union_of_disjoint hUBdisjoint + change M'.card = U.card + B.card at hunion + change T.card + α.card = M.card at hpart + change U.card + D.card = T.card at hpart' + omega + have hM'le : M'.card ≤ M.card := hM.2 M' hM'match + have hDeq : D.card = 1 := by omega + have hM'eq : M'.card = M.card := by omega + have hM'max : IsMaximumMatching E M' := by + refine ⟨hM'match, ?_⟩ + intro N' hN' + rw [hM'eq] + exact hM.2 N' hN' + let C := M.filter (fun e => P e.1 ∧ ¬Q e.2) + have hDC : D ⊆ C := by + intro e he + exact Finset.mem_filter.mpr + ⟨(Finset.mem_sdiff.mp (hDT he)).1, hDcross e he⟩ + have hcost : M'.filter (fun e => P e.1 ∧ ¬Q e.2) = C \ D := by + ext e + constructor + · intro he + obtain ⟨he, hPe, hnQe⟩ := Finset.mem_filter.mp he + rcases Finset.mem_union.mp he with heU | heB + · exact Finset.mem_sdiff.mpr + ⟨Finset.mem_filter.mpr ⟨hUM heU, hPe, hnQe⟩, + (Finset.mem_sdiff.mp heU).2⟩ + · exact False.elim (hnQe (hB.1 e heB).2) + · intro he + obtain ⟨heC, heD⟩ := Finset.mem_sdiff.mp he + obtain ⟨heM, hPe, hnQe⟩ := Finset.mem_filter.mp heC + have heT : e ∈ T := Finset.mem_sdiff.mpr + ⟨heM, fun heα => hnQe (Finset.mem_filter.mp heα).2⟩ + exact Finset.mem_filter.mpr + ⟨Finset.mem_union.mpr (Or.inl (Finset.mem_sdiff.mpr ⟨heT, heD⟩)), hPe, hnQe⟩ + have hmin' := hmin M' hM'max + rw [hcost] at hmin' + have hpart := Finset.card_sdiff_add_card_eq_card hDC + change C.card ≤ (C \ D).card at hmin' + omega + +def swapMatching (M : Finset (L × R)) : Finset (R × L) := M.image Prod.swap + +omit [Fintype L] [Fintype R] in +@[simp] theorem mem_swapMatching {M : Finset (L × R)} {e : R × L} : + e ∈ swapMatching M ↔ e.swap ∈ M := by + constructor + · intro he + obtain ⟨f, hf, rfl⟩ := Finset.mem_image.mp he + simpa using hf + · intro he + exact Finset.mem_image.mpr ⟨e.swap, he, Prod.swap_swap e⟩ + +omit [Fintype L] [Fintype R] in +@[simp] theorem card_swapMatching (M : Finset (L × R)) : + (swapMatching M).card = M.card := by + exact Finset.card_image_of_injective _ Prod.swap_injective + +omit [Fintype L] [Fintype R] in +@[simp] theorem swapMatching_swapMatching (M : Finset (L × R)) : + swapMatching (swapMatching M) = M := by + ext e + simp + +omit [Fintype L] [Fintype R] in +theorem filter_swapMatching (M : Finset (L × R)) + (p : R × L → Prop) [DecidablePred p] : + (swapMatching M).filter p = swapMatching (M.filter (fun e => p e.swap)) := by + ext e + simp + +omit [Fintype L] [Fintype R] in +@[simp] theorem card_filter_swapMatching (M : Finset (L × R)) + (p : R × L → Prop) [DecidablePred p] : + ((swapMatching M).filter p).card = (M.filter (fun e => p e.swap)).card := by + rw [filter_swapMatching, card_swapMatching] + +omit [Fintype L] [Fintype R] in +theorem IsMatching.swap {M : Finset (L × R)} (hM : IsMatching E M) : + IsMatching (fun b a => E a b) (swapMatching M) := by + refine ⟨?_, ?_, ?_⟩ + · intro e he + exact hM.1 e.swap (mem_swapMatching.mp he) + · intro e he f hf hef + apply Prod.swap_injective + exact hM.2.2 (mem_swapMatching.mp he) (mem_swapMatching.mp hf) hef + · intro e he f hf hef + apply Prod.swap_injective + exact hM.2.1 (mem_swapMatching.mp he) (mem_swapMatching.mp hf) hef + +omit [Fintype L] [Fintype R] in +theorem IsMaximumMatching.swap {M : Finset (L × R)} + (hM : IsMaximumMatching E M) : + IsMaximumMatching (fun b a => E a b) (swapMatching M) := by + refine ⟨hM.1.swap, ?_⟩ + intro N hN + have hcard := hM.2 (swapMatching N) hN.swap + simpa using hcard + +theorem isMaximumMatching_leftBlock_of_minimum_crossing + (P : L → Prop) (Q : R → Prop) [DecidablePred P] [DecidablePred Q] + (hblock : ∀ a b, E a b → Q b → P a) + {M : Finset (L × R)} (hM : IsMaximumMatching E M) + (hmin : ∀ N : Finset (L × R), IsMaximumMatching E N → + (M.filter (fun e => P e.1 ∧ ¬Q e.2)).card ≤ + (N.filter (fun e => P e.1 ∧ ¬Q e.2)).card) : + IsMaximumMatching (fun a b => E a b ∧ ¬P a) + (M.filter (fun e => ¬P e.1)) := by + classical + have hblock' : ∀ b a, E a b → ¬P a → ¬Q b := by + intro b a he hnP hQ + exact hnP (hblock a b he hQ) + have hmin' : ∀ N : Finset (R × L), + IsMaximumMatching (fun b a => E a b) N → + ((swapMatching M).filter (fun e => ¬Q e.1 ∧ ¬¬P e.2)).card ≤ + (N.filter (fun e => ¬Q e.1 ∧ ¬¬P e.2)).card := by + intro N hN + have h := hmin (swapMatching N) hN.swap + simpa [and_comm] using h + have hright := isMaximumMatching_rightBlock_of_minimum_crossing + (fun b => ¬Q b) (fun a => ¬P a) hblock' hM.swap hmin' + have hleft := hright.swap + simpa only [filter_swapMatching, swapMatching_swapMatching, + Prod.snd_swap] using hleft + +theorem exists_maximum_matching_with_maximum_blocks + (P : L → Prop) (Q : R → Prop) [DecidablePred P] [DecidablePred Q] + (hblock : ∀ a b, E a b → Q b → P a) : + ∃ M : Finset (L × R), IsMaximumMatching E M ∧ + IsMaximumMatching (fun a b => E a b ∧ Q b) + (M.filter (fun e => Q e.2)) ∧ + IsMaximumMatching (fun a b => E a b ∧ ¬P a) + (M.filter (fun e => ¬P e.1)) := by + classical + obtain ⟨M, hM, hmin⟩ := exists_maximum_matching_min_cost E + (fun N => (N.filter (fun e => P e.1 ∧ ¬Q e.2)).card) + have hmin' : ∀ N : Finset (L × R), IsMaximumMatching E N → + (M.filter (fun e => P e.1 ∧ ¬Q e.2)).card ≤ + (N.filter (fun e => P e.1 ∧ ¬Q e.2)).card := by + intro N hN + exact hmin N hN.1 (Nat.le_antisymm (hM.2 N hN.1) (hN.2 M hM.1)) + exact ⟨M, hM, + isMaximumMatching_rightBlock_of_minimum_crossing P Q hblock hM hmin', + isMaximumMatching_leftBlock_of_minimum_crossing P Q hblock hM hmin'⟩ + +end SeymourSecondNeighborhood.Bipartite + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/MatchingCover.lean b/lean/OAI/Combinatorics/SecondNeighborhood/MatchingCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..14c5938c642f99be3301a57706f514764bc89d58 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/MatchingCover.lean @@ -0,0 +1,226 @@ +import OAI.Combinatorics.SecondNeighborhood.Matching +import Mathlib.Combinatorics.Hall.Finite + +namespace OAI + +namespace SeymourSecondNeighborhood.Bipartite + +variable {L R : Type*} [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R] +variable {E : L → R → Prop} + +omit [DecidableEq L] [DecidableEq R] in +private theorem exists_minimum_vertexCover (E : L → R → Prop) : + ∃ A : Finset L, ∃ B : Finset R, IsVertexCover E A B ∧ + ∀ A' B', IsVertexCover E A' B' → A.card + B.card ≤ A'.card + B'.card := by + classical + let covers : Finset (Finset L × Finset R) := + Finset.univ.filter (fun p => IsVertexCover E p.1 p.2) + have hnonempty : covers.Nonempty := by + refine ⟨(Finset.univ, ∅), ?_⟩ + exact Finset.mem_filter.mpr + ⟨Finset.mem_univ _, fun l _ _ => Or.inl (Finset.mem_univ l)⟩ + obtain ⟨p, hp, hleast⟩ := + covers.exists_min_image (fun p => p.1.card + p.2.card) hnonempty + refine ⟨p.1, p.2, (Finset.mem_filter.mp hp).2, ?_⟩ + intro A' B' hC + exact hleast (A', B') (Finset.mem_filter.mpr ⟨Finset.mem_univ _, hC⟩) + +private theorem minimum_cover_left_hall {A : Finset L} {B : Finset R} + (hC : IsVertexCover E A B) + (hmin : ∀ A' B', IsVertexCover E A' B' → + A.card + B.card ≤ A'.card + B'.card) : + ∃ f : A → R, Function.Injective f ∧ ∀ a : A, E (a : L) (f a) ∧ f a ∉ B := by + classical + let t : A → Finset R := fun a => Finset.univ.filter (fun r => E a r ∧ r ∉ B) + have hhall : ∀ s : Finset A, s.card ≤ (s.biUnion t).card := by + intro s + let S : Finset L := s.image (fun a : A => (a : L)) + let T : Finset R := s.biUnion t + have hSA : S ⊆ A := by + intro l hl + obtain ⟨a, _, rfl⟩ := Finset.mem_image.mp hl + exact a.property + have hScard : S.card = s.card := + Finset.card_image_of_injective s Subtype.val_injective + have hdisjoint : Disjoint B T := by + apply Finset.disjoint_left.mpr + intro r hrB hrT + obtain ⟨a, _, hra⟩ := Finset.mem_biUnion.mp hrT + exact (Finset.mem_filter.mp hra).2.2 hrB + have hreplace : IsVertexCover E (A \ S) (B ∪ T) := by + intro l r hlr + by_cases hlS : l ∈ S + · by_cases hrB : r ∈ B + · exact Or.inr (Finset.mem_union_left _ hrB) + · right + apply Finset.mem_union_right + obtain ⟨a, has, hal⟩ := Finset.mem_image.mp hlS + apply Finset.mem_biUnion.mpr + refine ⟨a, has, Finset.mem_filter.mpr ⟨Finset.mem_univ _, ?_, hrB⟩⟩ + rw [hal] + exact hlr + · rcases hC l r hlr with hlA | hrB + · exact Or.inl (Finset.mem_sdiff.mpr ⟨hlA, hlS⟩) + · exact Or.inr (Finset.mem_union_left _ hrB) + have hbound := hmin (A \ S) (B ∪ T) hreplace + rw [Finset.card_union_of_disjoint hdisjoint] at hbound + have hsplit := Finset.card_sdiff_add_card_eq_card hSA + rw [hScard] at hsplit + change s.card ≤ T.card + omega + obtain ⟨f, hfinj, hf⟩ := + (Finset.all_card_le_biUnion_card_iff_existsInjective' t).mp hhall + exact ⟨f, hfinj, fun a => (Finset.mem_filter.mp (hf a)).2⟩ + +private theorem minimum_cover_has_equal_matching {A : Finset L} {B : Finset R} + (hC : IsVertexCover E A B) + (hmin : ∀ A' B', IsVertexCover E A' B' → + A.card + B.card ≤ A'.card + B'.card) : + ∃ N : Finset (L × R), IsMatching E N ∧ N.card = A.card + B.card := by + classical + obtain ⟨f, hfinj, hf⟩ := minimum_cover_left_hall hC hmin + have hCsym : IsVertexCover (fun r l => E l r) B A := by + intro r l hlr + exact (hC l r hlr).symm + have hminsym : ∀ B' A', IsVertexCover (fun r l => E l r) B' A' → + B.card + A.card ≤ B'.card + A'.card := by + intro B' A' hC' + have h := hmin A' B' (fun l r hlr => (hC' r l hlr).symm) + omega + obtain ⟨g, hginj, hg⟩ := minimum_cover_left_hall hCsym hminsym + let P : Finset (L × R) := Finset.univ.image (fun a : A => ((a : L), f a)) + let Q : Finset (L × R) := Finset.univ.image (fun b : B => (g b, (b : R))) + have hP : IsMatching E P := by + refine ⟨?_, ?_, ?_⟩ + · intro e he + obtain ⟨a, _, rfl⟩ := Finset.mem_image.mp he + exact (hf a).1 + · intro e he e' he' heq + obtain ⟨a, _, rfl⟩ := Finset.mem_image.mp he + obtain ⟨a', _, rfl⟩ := Finset.mem_image.mp he' + have haa : a = a' := Subtype.ext heq + subst a' + rfl + · intro e he e' he' heq + obtain ⟨a, _, rfl⟩ := Finset.mem_image.mp he + obtain ⟨a', _, rfl⟩ := Finset.mem_image.mp he' + have haa : a = a' := hfinj heq + subst a' + rfl + have hQ : IsMatching E Q := by + refine ⟨?_, ?_, ?_⟩ + · intro e he + obtain ⟨b, _, rfl⟩ := Finset.mem_image.mp he + exact (hg b).1 + · intro e he e' he' heq + obtain ⟨b, _, rfl⟩ := Finset.mem_image.mp he + obtain ⟨b', _, rfl⟩ := Finset.mem_image.mp he' + have hbb : b = b' := hginj heq + subst b' + rfl + · intro e he e' he' heq + obtain ⟨b, _, rfl⟩ := Finset.mem_image.mp he + obtain ⟨b', _, rfl⟩ := Finset.mem_image.mp he' + have hbb : b = b' := Subtype.ext heq + subst b' + rfl + have hcrossL : ∀ e ∈ P, ∀ e' ∈ Q, e.1 ≠ e'.1 := by + intro e he e' he' heq + obtain ⟨a, _, rfl⟩ := Finset.mem_image.mp he + obtain ⟨b, _, rfl⟩ := Finset.mem_image.mp he' + change (a : L) = g b at heq + apply (hg b).2 + rw [← heq] + exact a.property + have hcrossR : ∀ e ∈ P, ∀ e' ∈ Q, e.2 ≠ e'.2 := by + intro e he e' he' heq + obtain ⟨a, _, rfl⟩ := Finset.mem_image.mp he + obtain ⟨b, _, rfl⟩ := Finset.mem_image.mp he' + change f a = (b : R) at heq + apply (hf a).2 + rw [heq] + exact b.property + have hmatch : IsMatching E (P ∪ Q) := by + refine ⟨?_, ?_, ?_⟩ + · intro e he + rcases Finset.mem_union.mp he with he | he + · exact hP.1 e he + · exact hQ.1 e he + · intro e he e' he' heq + rcases Finset.mem_union.mp he with he | he <;> + rcases Finset.mem_union.mp he' with he' | he' + · exact hP.2.1 he he' heq + · exact False.elim (hcrossL e he e' he' heq) + · exact False.elim (hcrossL e' he' e he heq.symm) + · exact hQ.2.1 he he' heq + · intro e he e' he' heq + rcases Finset.mem_union.mp he with he | he <;> + rcases Finset.mem_union.mp he' with he' | he' + · exact hP.2.2 he he' heq + · exact False.elim (hcrossR e he e' he' heq) + · exact False.elim (hcrossR e' he' e he heq.symm) + · exact hQ.2.2 he he' heq + have hdisjoint : Disjoint P Q := + Finset.disjoint_left.mpr (fun e he he' => hcrossL e he e he' rfl) + have hPinj : Function.Injective (fun a : A => ((a : L), f a)) := by + intro a a' h + exact Subtype.ext (congrArg Prod.fst h) + have hQinj : Function.Injective (fun b : B => (g b, (b : R))) := by + intro b b' h + exact Subtype.ext (congrArg Prod.snd h) + have hPcard : P.card = A.card := by + dsimp [P] + rw [Finset.card_image_of_injective _ hPinj] + simp + have hQcard : Q.card = B.card := by + dsimp [Q] + rw [Finset.card_image_of_injective _ hQinj] + simp + exact ⟨P ∪ Q, hmatch, by rw [Finset.card_union_of_disjoint hdisjoint, hPcard, hQcard]⟩ + +theorem exists_vertexCover_card_eq_of_isMaximumMatching {M : Finset (L × R)} + (hM : IsMaximumMatching E M) : + ∃ A : Finset L, ∃ B : Finset R, + IsVertexCover E A B ∧ A.card + B.card = M.card ∧ + (∀ l ∈ A, ∃ r, E l r) ∧ (∀ r ∈ B, ∃ l, E l r) := by + classical + obtain ⟨A, B, hC, hmin⟩ := exists_minimum_vertexCover E + obtain ⟨N, hN, hNcard⟩ := minimum_cover_has_equal_matching hC hmin + have hupper : A.card + B.card ≤ M.card := by + rw [← hNcard] + exact hM.2 N hN + have hcard : A.card + B.card = M.card := + Nat.le_antisymm hupper (matching_card_le_cover_card hM.1 hC) + refine ⟨A, B, hC, hcard, ?_, ?_⟩ + · intro l hl + by_contra h + have hreplace : IsVertexCover E (A.erase l) B := by + intro x r hxr + rcases hC x r hxr with hx | hr + · left + refine Finset.mem_erase.mpr ⟨?_, hx⟩ + intro hxl + subst x + exact h ⟨r, hxr⟩ + · exact Or.inr hr + have hbound := hmin (A.erase l) B hreplace + have herase := Finset.card_erase_add_one hl + omega + · intro r hr + by_contra h + have hreplace : IsVertexCover E A (B.erase r) := by + intro l y hly + rcases hC l y hly with hl | hy + · exact Or.inl hl + · right + refine Finset.mem_erase.mpr ⟨?_, hy⟩ + intro hyr + subst y + exact h ⟨l, hly⟩ + have hbound := hmin A (B.erase r) hreplace + have herase := Finset.card_erase_add_one hr + omega + +end SeymourSecondNeighborhood.Bipartite + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/MatchingExchange.lean b/lean/OAI/Combinatorics/SecondNeighborhood/MatchingExchange.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd33f12f432869fd4d2c266bec37484d85d7b97e --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/MatchingExchange.lean @@ -0,0 +1,131 @@ +import OAI.Combinatorics.SecondNeighborhood.Matching +import Mathlib.Data.Finset.Max +import Mathlib.Data.Finset.Powerset + +namespace OAI + +namespace SeymourSecondNeighborhood.Bipartite + +variable {L R : Type*} {E : L → R → Prop} + +private theorem exchange_matching_subset {M N : Finset (L × R)} + (hM : IsMatching E M) (hNM : N ⊆ M) : IsMatching E N := by + exact ⟨fun e he => hM.1 e (hNM he), + fun _ he _ hf h => hM.2.1 (hNM he) (hNM hf) h, + fun _ he _ hf h => hM.2.2 (hNM he) (hNM hf) h⟩ + +private theorem exchange_matching_insert [DecidableEq L] [DecidableEq R] + {M : Finset (L × R)} (hM : IsMatching E M) {a : L} {b : R} + (hab : E a b) (ha : ∀ e ∈ M, e.1 ≠ a) (hb : ∀ e ∈ M, e.2 ≠ b) : + IsMatching E (insert (a, b) M) := by + refine ⟨?_, ?_, ?_⟩ + · intro e he + rcases Finset.mem_insert.mp he with rfl | he + · exact hab + · exact hM.1 e he + · intro e he f hf hef + rcases Finset.mem_insert.mp he with rfl | he + · rcases Finset.mem_insert.mp hf with rfl | hf + · rfl + · exact False.elim (ha f hf hef.symm) + · rcases Finset.mem_insert.mp hf with rfl | hf + · exact False.elim (ha e he hef) + · exact hM.2.1 he hf hef + · intro e he f hf hef + rcases Finset.mem_insert.mp he with rfl | he + · rcases Finset.mem_insert.mp hf with rfl | hf + · rfl + · exact False.elim (hb f hf hef.symm) + · rcases Finset.mem_insert.mp hf with rfl | hf + · exact False.elim (hb e he hef) + · exact hM.2.2 he hf hef + +theorem exists_matching_saturating_left_of_card_lt [Fintype L] [Fintype R] + [DecidableEq L] [DecidableEq R] + {M N : Finset (L × R)} (hM : IsMatching E M) (hN : IsMatching E N) + (hcard : M.card < N.card) : + ∃ Q : Finset (L × R), IsMatching E Q ∧ Q.card = N.card ∧ + M.image Prod.fst ⊆ Q.image Prod.fst := by + classical + let family : Finset (Finset (L × R)) := + Finset.univ.filter (fun Q => IsMatching E Q ∧ Q.card = N.card) + have hNfamily : N ∈ family := by simp [family, hN] + obtain ⟨Q, hQfamily, hQmax⟩ := + family.exists_max_image (fun Q => (Q ∩ M).card) ⟨N, hNfamily⟩ + have hQ : IsMatching E Q ∧ Q.card = N.card := + (Finset.mem_filter.mp hQfamily).2 + refine ⟨Q, hQ.1, hQ.2, ?_⟩ + intro a ha + by_contra haQ + obtain ⟨m, hmM, rfl⟩ := Finset.mem_image.mp ha + have hfree : ∀ e ∈ Q, e.1 ≠ m.1 := by + intro e he heq + exact haQ (Finset.mem_image.mpr ⟨e, he, heq⟩) + have hmQ : m ∉ Q := fun hm => hfree m hm rfl + have hexternal : ∃ e ∈ Q, e ∉ M := by + by_contra h + have hQM : Q ⊆ M := by + intro e he + by_contra heM + exact h ⟨e, he, heM⟩ + have := Finset.card_le_card hQM + omega + have hremove : ∃ e ∈ Q, e ∉ M ∧ ∀ f ∈ Q, f.2 = m.2 → f = e := by + by_cases hright : ∃ e ∈ Q, e.2 = m.2 + · obtain ⟨e, heQ, he⟩ := hright + have heM : e ∉ M := by + intro heM + have hem : e = m := hM.2.2 heM hmM he + exact hmQ (hem ▸ heQ) + exact ⟨e, heQ, heM, fun f hf hfm => hQ.1.2.2 hf heQ (hfm.trans he.symm)⟩ + · obtain ⟨e, heQ, heM⟩ := hexternal + exact ⟨e, heQ, heM, fun f hf hfm => False.elim (hright ⟨f, hf, hfm⟩)⟩ + obtain ⟨e, heQ, heM, he_unique⟩ := hremove + let Q' := insert m (Q.erase e) + have hQ'match : IsMatching E Q' := by + apply exchange_matching_insert + (exchange_matching_subset hQ.1 (Finset.erase_subset e Q)) (hM.1 m hmM) + · intro f hf + exact hfree f (Finset.mem_of_mem_erase hf) + · intro f hf hfm + exact (Finset.mem_erase.mp hf).1 (he_unique f (Finset.mem_of_mem_erase hf) hfm) + have hmQerase : m ∉ Q.erase e := fun hm => hmQ (Finset.mem_of_mem_erase hm) + have hQ'card : Q'.card = N.card := by + dsimp [Q'] + rw [Finset.card_insert_of_notMem hmQerase, Finset.card_erase_of_mem heQ] + have : 0 < Q.card := Finset.card_pos.mpr ⟨e, heQ⟩ + omega + have hQ'family : Q' ∈ family := by simp [family, hQ'match, hQ'card] + have hinter : Q' ∩ M = insert m (Q ∩ M) := by + ext f + simp only [Q', Finset.mem_inter, Finset.mem_insert, Finset.mem_erase] + constructor + · rintro ⟨rfl | ⟨hne, hfQ⟩, hfM⟩ + · exact Or.inl rfl + · exact Or.inr ⟨hfQ, hfM⟩ + · rintro (rfl | ⟨hfQ, hfM⟩) + · exact ⟨Or.inl rfl, hmM⟩ + · exact ⟨Or.inr ⟨fun hfe => heM (hfe ▸ hfM), hfQ⟩, hfM⟩ + have hmInter : m ∉ Q ∩ M := fun hm => hmQ (Finset.mem_inter.mp hm).1 + have hstrict : (Q ∩ M).card < (Q' ∩ M).card := by + rw [hinter, Finset.card_insert_of_notMem hmInter] + omega + exact (not_lt_of_ge (hQmax Q' hQ'family)) hstrict + +theorem exists_matching_one_larger_saturating_left [Fintype L] [Fintype R] + [DecidableEq L] [DecidableEq R] + {M N : Finset (L × R)} (hM : IsMatching E M) (hN : IsMatching E N) + (hcard : M.card < N.card) : + ∃ Q : Finset (L × R), IsMatching E Q ∧ Q.card = M.card + 1 ∧ + M.image Prod.fst ⊆ Q.image Prod.fst := by + classical + obtain ⟨N', hN'N, hN'card⟩ := + Finset.exists_subset_card_eq (show M.card + 1 ≤ N.card by omega) + obtain ⟨Q, hQ, hQcard, hQM⟩ := + exists_matching_saturating_left_of_card_lt hM + (exchange_matching_subset hN hN'N) (by omega) + exact ⟨Q, hQ, hQcard.trans hN'card, hQM⟩ + +end SeymourSecondNeighborhood.Bipartite + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/MatrixMaps.lean b/lean/OAI/Combinatorics/SecondNeighborhood/MatrixMaps.lean new file mode 100644 index 0000000000000000000000000000000000000000..7c772f198f425890c1d4d58bf0c79a8f616c706b --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/MatrixMaps.lean @@ -0,0 +1,63 @@ +import OAI.Combinatorics.SecondNeighborhood.PruningDefinitions +import Mathlib.Data.Matrix.Mul +import Mathlib.Basic.Real.Basic + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +variable {V : Type*} + +def SupportedCoefficients (r : V → V → Prop) (a : V → V → ℝ) : Prop := + ∀ x y, ¬ r x y → a x y = 0 + +theorem SupportedCoefficients.of_ne_zero {r : V → V → Prop} + {a : V → V → ℝ} (ha : SupportedCoefficients r a) {x y : V} + (hxy : a x y ≠ 0) : r x y := by + by_contra h + exact hxy (ha x y h) + +variable [Fintype V] [DecidableEq V] + +noncomputable section + +def matrixL (r : V → V → Prop) (R C : Finset (V × V)) (a : V → V → ℝ) : + Matrix ↥(Z r R C) ↥R ℝ := + Matrix.of fun z left => if z.val.2 = left.val.2 then a left.val.1 z.val.1 else 0 + +def matrixN (r : V → V → Prop) (R C : Finset (V × V)) (b : V → V → ℝ) : + Matrix ↥C ↥(Z r R C) ℝ := + Matrix.of fun right z => if right.val.1 = z.val.1 then b right.val.2 z.val.2 else 0 + +def matrixB (r : V → V → Prop) (R C : Finset (V × V)) (b : V → V → ℝ) : + Matrix ↥(H r R C) ↥R ℝ := + Matrix.of fun h left => if h.val.1 = left.val.1 then b h.val.2 left.val.2 else 0 + +def matrixA (r : V → V → Prop) (R C : Finset (V × V)) (a : V → V → ℝ) : + Matrix ↥C ↥(H r R C) ℝ := + Matrix.of fun right h => if right.val.2 = h.val.2 then a h.val.1 right.val.1 else 0 + +@[simp] theorem matrixL_apply (r : V → V → Prop) (R C : Finset (V × V)) + (a : V → V → ℝ) (z : ↥(Z r R C)) (left : ↥R) : + matrixL r R C a z left = + if z.val.2 = left.val.2 then a left.val.1 z.val.1 else 0 := rfl + +@[simp] theorem matrixN_apply (r : V → V → Prop) (R C : Finset (V × V)) + (b : V → V → ℝ) (right : ↥C) (z : ↥(Z r R C)) : + matrixN r R C b right z = + if right.val.1 = z.val.1 then b right.val.2 z.val.2 else 0 := rfl + +@[simp] theorem matrixB_apply (r : V → V → Prop) (R C : Finset (V × V)) + (b : V → V → ℝ) (h : ↥(H r R C)) (left : ↥R) : + matrixB r R C b h left = + if h.val.1 = left.val.1 then b h.val.2 left.val.2 else 0 := rfl + +@[simp] theorem matrixA_apply (r : V → V → Prop) (R C : Finset (V × V)) + (a : V → V → ℝ) (right : ↥C) (h : ↥(H r R C)) : + matrixA r R C a right h = + if right.val.2 = h.val.2 then a h.val.1 right.val.1 else 0 := rfl + +end +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/MatrixMapsCommute.lean b/lean/OAI/Combinatorics/SecondNeighborhood/MatrixMapsCommute.lean new file mode 100644 index 0000000000000000000000000000000000000000..2cb00547ad339052a24b4c7175ddd964fc2aa503 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/MatrixMapsCommute.lean @@ -0,0 +1,115 @@ +import OAI.Combinatorics.SecondNeighborhood.MatrixMaps + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +variable {X : Type*} [Fintype X] [DecidableEq X] + +noncomputable section + +omit [Fintype X] [DecidableEq X] in +private theorem conflict_of_product_ne_zero + (r : X → X → Prop) (a b : X → X → ℝ) + (ha : SupportedCoefficients r a) (hb : SupportedCoefficients r b) + (left right : X × X) + (h : a left.1 right.1 * b right.2 left.2 ≠ 0) : + Conflict r left right := by + constructor + · by_contra hn + exact h (by rw [ha _ _ hn, zero_mul]) + · by_contra hn + exact h (by rw [hb _ _ hn, mul_zero]) + +theorem matrixN_mul_matrixL_apply + (r : X → X → Prop) (R C : Finset (X × X)) (a b : X → X → ℝ) + (ha : SupportedCoefficients r a) (hb : SupportedCoefficients r b) + (right : {right : X × X // right ∈ C}) + (left : {left : X × X // left ∈ R}) : + (matrixN r R C b * matrixL r R C a) right left = + a left.val.1 right.val.1 * b right.val.2 left.val.2 := by + classical + by_cases hprod : a left.val.1 right.val.1 * b right.val.2 left.val.2 = 0 + · rw [hprod, Matrix.mul_apply] + apply Finset.sum_eq_zero + intro z _ + by_cases hi : right.val.1 = z.val.1 + · by_cases hj : z.val.2 = left.val.2 + · rw [matrixN_apply, matrixL_apply, ite_eq_left hi, ite_eq_left hj, ← hi, hj, mul_comm] + exact hprod + · simp only [matrixL_apply, ite_eq_right hj, mul_zero] + · simp only [matrixN_apply, ite_eq_right hi, zero_mul] + · have hc : Conflict r left.val right.val := + conflict_of_product_ne_zero r a b ha hb left.val right.val hprod + let z0 : {z : X × X // z ∈ Z r R C} := + ⟨(right.val.1, left.val.2), + conflict_corner_mem_Z left.property right.property hc⟩ + calc + (matrixN r R C b * matrixL r R C a) right left = + matrixN r R C b right z0 * matrixL r R C a z0 left := by + rw [Matrix.mul_apply] + refine Finset.sum_eq_single_of_mem z0 (Finset.mem_univ _) ?_ + intro z _ hne + by_cases hi : right.val.1 = z.val.1 + · by_cases hj : z.val.2 = left.val.2 + · have heq : z = z0 := by + apply Subtype.ext + exact Prod.ext hi.symm hj + exact (hne heq).elim + · simp only [matrixL_apply, ite_eq_right hj, mul_zero] + · simp only [matrixN_apply, ite_eq_right hi, zero_mul] + _ = a left.val.1 right.val.1 * b right.val.2 left.val.2 := by + simp [matrixN_apply, matrixL_apply, z0, mul_comm] + +theorem matrixA_mul_matrixB_apply + (r : X → X → Prop) (R C : Finset (X × X)) (a b : X → X → ℝ) + (ha : SupportedCoefficients r a) (hb : SupportedCoefficients r b) + (right : {right : X × X // right ∈ C}) + (left : {left : X × X // left ∈ R}) : + (matrixA r R C a * matrixB r R C b) right left = + a left.val.1 right.val.1 * b right.val.2 left.val.2 := by + classical + by_cases hprod : a left.val.1 right.val.1 * b right.val.2 left.val.2 = 0 + · rw [hprod, Matrix.mul_apply] + apply Finset.sum_eq_zero + intro h _ + by_cases hs : right.val.2 = h.val.2 + · by_cases hp : h.val.1 = left.val.1 + · rw [matrixA_apply, matrixB_apply, ite_eq_left hs, ite_eq_left hp, ← hs, hp] + exact hprod + · simp only [matrixB_apply, ite_eq_right hp, mul_zero] + · simp only [matrixA_apply, ite_eq_right hs, zero_mul] + · have hc : Conflict r left.val right.val := + conflict_of_product_ne_zero r a b ha hb left.val right.val hprod + let h0 : {h : X × X // h ∈ H r R C} := + ⟨(left.val.1, right.val.2), + conflict_corner_mem_H left.property right.property hc⟩ + calc + (matrixA r R C a * matrixB r R C b) right left = + matrixA r R C a right h0 * matrixB r R C b h0 left := by + rw [Matrix.mul_apply] + refine Finset.sum_eq_single_of_mem h0 (Finset.mem_univ _) ?_ + intro h _ hne + by_cases hs : right.val.2 = h.val.2 + · by_cases hp : h.val.1 = left.val.1 + · have heq : h = h0 := by + apply Subtype.ext + exact Prod.ext hp hs.symm + exact (hne heq).elim + · simp only [matrixB_apply, ite_eq_right hp, mul_zero] + · simp only [matrixA_apply, ite_eq_right hs, zero_mul] + _ = a left.val.1 right.val.1 * b right.val.2 left.val.2 := by + simp [matrixA_apply, matrixB_apply, h0] + +theorem matrixN_mul_matrixL_eq_matrixA_mul_matrixB + (r : X → X → Prop) (R C : Finset (X × X)) (a b : X → X → ℝ) + (ha : SupportedCoefficients r a) (hb : SupportedCoefficients r b) : + matrixN r R C b * matrixL r R C a = matrixA r R C a * matrixB r R C b := by + ext right left + rw [matrixN_mul_matrixL_apply r R C a b ha hb, + matrixA_mul_matrixB_apply r R C a b ha hb] + +end +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/MatrixMapsPolynomial.lean b/lean/OAI/Combinatorics/SecondNeighborhood/MatrixMapsPolynomial.lean new file mode 100644 index 0000000000000000000000000000000000000000..eafc6d8482e574aef94e153208139bbc024afdce --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/MatrixMapsPolynomial.lean @@ -0,0 +1,74 @@ +import OAI.Combinatorics.SecondNeighborhood.GenericRankCoefficients +import OAI.Combinatorics.SecondNeighborhood.MatrixMaps + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +open scoped Classical Matrix + +variable {X : Type*} [Fintype X] [DecidableEq X] + +noncomputable def matrixLPolynomial (r : X → X → Prop) (R C : Finset (X × X)) : + Matrix ↥(Z r R C) ↥R (MvPolynomial (CoefficientVariables X) ℝ) := + supportedVariableMatrix + (fun z left => z.1.2 = left.1.2 ∧ r left.1.1 z.1.1) + (fun z left => Sum.inl (left.1.1, z.1.1)) + +noncomputable def matrixNPolynomial (r : X → X → Prop) (R C : Finset (X × X)) : + Matrix ↥C ↥(Z r R C) (MvPolynomial (CoefficientVariables X) ℝ) := + supportedVariableMatrix + (fun right z => right.1.1 = z.1.1 ∧ r right.1.2 z.1.2) + (fun right z => Sum.inr (right.1.2, z.1.2)) + +@[simp] theorem matrixLPolynomial_apply (r : X → X → Prop) + (R C : Finset (X × X)) (z : ↥(Z r R C)) (left : ↥R) : + matrixLPolynomial r R C z left = + if z.1.2 = left.1.2 ∧ r left.1.1 z.1.1 + then MvPolynomial.X (Sum.inl (left.1.1, z.1.1)) else 0 := by + classical + by_cases h : z.1.2 = left.1.2 ∧ r left.1.1 z.1.1 <;> + simp [matrixLPolynomial, supportedVariableMatrix, h] + +@[simp] theorem matrixNPolynomial_apply (r : X → X → Prop) + (R C : Finset (X × X)) (right : ↥C) (z : ↥(Z r R C)) : + matrixNPolynomial r R C right z = + if right.1.1 = z.1.1 ∧ r right.1.2 z.1.2 + then MvPolynomial.X (Sum.inr (right.1.2, z.1.2)) else 0 := by + classical + by_cases h : right.1.1 = z.1.1 ∧ r right.1.2 z.1.2 <;> + simp [matrixNPolynomial, supportedVariableMatrix, h] + +@[simp] theorem eval_matrixLPolynomial (r : X → X → Prop) + (R C : Finset (X × X)) (v : CoefficientVariables X → ℝ) : + evalPolynomialMatrix v (matrixLPolynomial r R C) = + matrixL r R C (selectedA r v) := by + classical + ext z left + by_cases hcoord : z.1.2 = left.1.2 <;> + by_cases harrow : r left.1.1 z.1.1 <;> + simp [evalPolynomialMatrix_apply, matrixLPolynomial_apply, matrixL_apply, + selectedA, hcoord, harrow] + +@[simp] theorem eval_matrixNPolynomial (r : X → X → Prop) + (R C : Finset (X × X)) (v : CoefficientVariables X → ℝ) : + evalPolynomialMatrix v (matrixNPolynomial r R C) = + matrixN r R C (selectedB r v) := by + classical + ext right z + by_cases hcoord : right.1.1 = z.1.1 <;> + by_cases harrow : r right.1.2 z.1.2 <;> + simp [evalPolynomialMatrix_apply, matrixNPolynomial_apply, matrixN_apply, + selectedB, hcoord, harrow] + +@[simp] theorem eval_matrixNPolynomial_transpose (r : X → X → Prop) + (R C : Finset (X × X)) (v : CoefficientVariables X → ℝ) : + evalPolynomialMatrix v (matrixNPolynomial r R C)ᵀ = + (matrixN r R C (selectedB r v))ᵀ := by + have h := eval_matrixNPolynomial r R C v + ext z right + exact congrFun (congrFun h right) z + +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/MaxSupportKernel.lean b/lean/OAI/Combinatorics/SecondNeighborhood/MaxSupportKernel.lean new file mode 100644 index 0000000000000000000000000000000000000000..20c5f7015a1b0739d8eb7087768fd8faf8daf740 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/MaxSupportKernel.lean @@ -0,0 +1,99 @@ +import Mathlib.LinearAlgebra.Matrix.Rank +import Mathlib.Basic.Real.Basic + +namespace OAI + +namespace SeymourSecondNeighborhood.LinearAlgebra.MaxSupportKernel + +open Matrix + +variable {I J : Type*} [Fintype I] [Fintype J] + +def SupportedOn (T : Set (I × J)) (D : Matrix I J ℝ) : Prop := + ∀ s j, (s, j) ∉ T → D s j = 0 + +theorem range_lt_range_add_single [DecidableEq I] [DecidableEq J] + (D : Matrix I J ℝ) {x : J → ℝ} {y : I → ℝ} + (hx : D *ᵥ x = 0) (hy : Dᵀ *ᵥ y = 0) + (s : I) (j : J) (hxj : x j ≠ 0) (hys : y s ≠ 0) : + LinearMap.range D.mulVecLin < + LinearMap.range (D + Matrix.single s j (1 : ℝ)).mulVecLin := by + let E : Matrix I J ℝ := D + Matrix.single s j 1 + let e : I → ℝ := Pi.single s 1 + change LinearMap.range D.mulVecLin < LinearMap.range E.mulVecLin + have hsingle (w : J → ℝ) : + Matrix.single s j (1 : ℝ) *ᵥ w = w j • e := by + ext i + simp [Matrix.single_mulVec, Function.update_apply, Pi.single_apply, e] + have hEw (w : J → ℝ) : + E.mulVecLin w = D.mulVecLin w + w j • e := by + change (D + Matrix.single s j (1 : ℝ)) *ᵥ w = D *ᵥ w + w j • e + rw [Matrix.add_mulVec, hsingle] + have hEx : E.mulVecLin x = x j • e := by + rw [hEw] + change D *ᵥ x + x j • e = x j • e + rw [hx, zero_add] + have he : e ∈ LinearMap.range E.mulVecLin := by + have hm : x j • e ∈ LinearMap.range E.mulVecLin := ⟨x, hEx⟩ + have hs := (LinearMap.range E.mulVecLin).smul_mem (x j)⁻¹ hm + simpa only [smul_smul, inv_mul_cancel₀ hxj, one_smul] using hs + have hle : LinearMap.range D.mulVecLin ≤ LinearMap.range E.mulVecLin := by + intro z hz + rcases hz with ⟨w, rfl⟩ + have hm : E.mulVecLin w ∈ LinearMap.range E.mulVecLin := ⟨w, rfl⟩ + have hs := (LinearMap.range E.mulVecLin).sub_mem hm + ((LinearMap.range E.mulVecLin).smul_mem (w j) he) + rw [hEw] at hs + simpa only [add_sub_cancel_right] using hs + have hnot : e ∉ LinearMap.range D.mulVecLin := by + rintro ⟨w, hw⟩ + have ha : dotProduct y (D.mulVecLin w) = 0 := by + change dotProduct y (D *ᵥ w) = 0 + rw [← Matrix.dotProduct_transpose_mulVec D w y, hy, dotProduct_zero] + rw [hw] at ha + exact hys (by simpa [e] using ha) + exact lt_iff_le_not_ge.mpr ⟨hle, fun hge => hnot (hge he)⟩ + +theorem kernel_support_of_max_rank {T : Set (I × J)} {D : Matrix I J ℝ} + (hD : SupportedOn T D) + (hmax : ∀ A : Matrix I J ℝ, SupportedOn T A → A.rank ≤ D.rank) + {x : J → ℝ} {y : I → ℝ} + (hx : D *ᵥ x = 0) (hy : Dᵀ *ᵥ y = 0) + {s : I} {j : J} (hsj : (s, j) ∈ T) : + x j * y s = 0 := by + classical + by_contra hxy + have hxj : x j ≠ 0 := by + intro h + exact hxy (by rw [h, zero_mul]) + have hys : y s ≠ 0 := by + intro h + exact hxy (by rw [h, mul_zero]) + have hsupport : SupportedOn T (D + Matrix.single s j (1 : ℝ)) := by + intro i k hik + have hne : ¬(s = i ∧ j = k) := by + rintro ⟨rfl, rfl⟩ + exact hik hsj + change D i k + Matrix.single s j (1 : ℝ) i k = 0 + rw [hD i k hik, Matrix.single_apply_of_ne s j (1 : ℝ) i k hne, zero_add] + have hlt : D.rank < (D + Matrix.single s j (1 : ℝ)).rank := by + change Module.finrank ℝ (LinearMap.range D.mulVecLin) < + Module.finrank ℝ (LinearMap.range (D + Matrix.single s j (1 : ℝ)).mulVecLin) + exact Submodule.finrank_lt_finrank_of_lt + (range_lt_range_add_single D hx hy s j hxj hys) + exact (not_lt_of_ge (hmax _ hsupport)) hlt + +theorem kernel_support {T : Set (I × J)} {D : Matrix I J ℝ} + (hD : SupportedOn T D) + (hmax : ∀ A : Matrix I J ℝ, SupportedOn T A → A.rank ≤ D.rank) + {x : J → ℝ} {y : I → ℝ} + (hx : x ∈ LinearMap.ker D.mulVecLin) + (hy : y ∈ LinearMap.ker Dᵀ.mulVecLin) + {s : I} {j : J} (hsj : (s, j) ∈ T) : + x j * y s = 0 := by + exact kernel_support_of_max_rank hD hmax + (LinearMap.mem_ker.mp hx) (LinearMap.mem_ker.mp hy) hsj + +end SeymourSecondNeighborhood.LinearAlgebra.MaxSupportKernel + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/MinimalCounterexample.lean b/lean/OAI/Combinatorics/SecondNeighborhood/MinimalCounterexample.lean new file mode 100644 index 0000000000000000000000000000000000000000..47307722619f48838dd2548001cbc071215ed604 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/MinimalCounterexample.lean @@ -0,0 +1,164 @@ +import OAI.Combinatorics.SecondNeighborhood.Reindex +import Mathlib.Data.Nat.Find + +namespace OAI + +namespace SeymourSecondNeighborhood + +variable {V : Type*} [Fintype V] [DecidableEq V] + +def induced (r : V → V → Prop) (S : Finset V) : S → S → Prop := + fun x y => r x.val y.val + +omit [Fintype V] [DecidableEq V] in +theorem isOriented_induced {r : V → V → Prop} (hr : IsOriented r) + (S : Finset V) : IsOriented (induced r S) where + loopless x := hr.loopless x.val + asymmetric hxy hyx := hr.asymmetric hxy hyx + +omit [DecidableEq V] in +theorem firstNeighbors_induced_map {r : V → V → Prop} {S : Finset V} + (hclosed : image r S ⊆ S) (v : S) : + (firstNeighbors (induced r S) v).map + (⟨Subtype.val, Subtype.val_injective⟩ : S ↪ V) = firstNeighbors r v.val := by + classical + ext w + constructor + · intro hw + obtain ⟨z, hz, hzw⟩ := Finset.mem_map.mp hw + change z.val = w at hzw + subst w + have hz' : induced r S v z := mem_firstNeighbors.mp hz + exact mem_firstNeighbors.mpr hz' + · intro hw + have hvw := mem_firstNeighbors.mp hw + have hwS : w ∈ S := hclosed (mem_image.mpr ⟨v.val, v.property, hvw⟩) + exact Finset.mem_map.mpr ⟨⟨w, hwS⟩, mem_firstNeighbors.mpr hvw, rfl⟩ + +theorem secondNeighbors_induced_map {r : V → V → Prop} {S : Finset V} + (hclosed : image r S ⊆ S) (v : S) : + (secondNeighbors (induced r S) v).map + (⟨Subtype.val, Subtype.val_injective⟩ : S ↪ V) = secondNeighbors r v.val := by + classical + ext w + constructor + · intro hw + obtain ⟨z, hz, hzw⟩ := Finset.mem_map.mp hw + change z.val = w at hzw + subst w + obtain ⟨hne, hnr, u, hvu, huz⟩ := mem_secondNeighbors.mp hz + apply mem_secondNeighbors.mpr + refine ⟨?_, hnr, ⟨u.val, hvu, huz⟩⟩ + intro heq + exact hne (Subtype.ext heq) + · intro hw + obtain ⟨hne, hnr, u, hvu, huw⟩ := mem_secondNeighbors.mp hw + have huS : u ∈ S := hclosed (mem_image.mpr ⟨v.val, v.property, hvu⟩) + have hwS : w ∈ S := hclosed (mem_image.mpr ⟨u, huS, huw⟩) + apply Finset.mem_map.mpr + refine ⟨⟨w, hwS⟩, mem_secondNeighbors.mpr ?_, rfl⟩ + refine ⟨?_, hnr, ⟨⟨u, huS⟩, hvu, huw⟩⟩ + intro heq + exact hne (congrArg Subtype.val heq) + +omit [DecidableEq V] in +theorem card_firstNeighbors_induced {r : V → V → Prop} {S : Finset V} + (hclosed : image r S ⊆ S) (v : S) : + (firstNeighbors (induced r S) v).card = (firstNeighbors r v.val).card := by + rw [← firstNeighbors_induced_map hclosed v, Finset.card_map] + +theorem card_secondNeighbors_induced {r : V → V → Prop} {S : Finset V} + (hclosed : image r S ⊆ S) (v : S) : + (secondNeighbors (induced r S) v).card = (secondNeighbors r v.val).card := by + rw [← secondNeighbors_induced_map hclosed v, Finset.card_map] + +theorem counterexample_induced {r : V → V → Prop} (hbad : Counterexample r) + {S : Finset V} (hclosed : image r S ⊆ S) : Counterexample (induced r S) := by + intro v + rw [card_secondNeighbors_induced hclosed v, card_firstNeighbors_induced hclosed v] + exact hbad v.val + +def OrderMinimal (_r : V → V → Prop) : Prop := + ∀ n : ℕ, 0 < n → ∀ s : Fin n → Fin n → Prop, + IsOriented s → Counterexample s → Fintype.card V ≤ n + +theorem OrderMinimal.nonemptyBoundary {r : V → V → Prop} + (hmin : OrderMinimal r) (hr : IsOriented r) (hbad : Counterexample r) : + NonemptyBoundary r := by + classical + intro S hS hproper + by_contra hboundary + have hclosed : image r S ⊆ S := by + intro w hw + by_contra hwS + exact hboundary ⟨w, Finset.mem_sdiff.mpr ⟨hw, hwS⟩⟩ + let e : S ≃ Fin (Fintype.card S) := Fintype.equivFin S + have hpos : 0 < Fintype.card S := by + rw [Fintype.card_coe] + exact Finset.card_pos.mpr hS + have hle := hmin (Fintype.card S) hpos (reindex e (induced r S)) + (isOriented_reindex e (isOriented_induced hr S)) + (counterexample_reindex e (counterexample_induced hbad hclosed)) + have hlt : Fintype.card S < Fintype.card V := by + rw [Fintype.card_coe] + exact (Finset.card_lt_iff_ne_univ S).mpr hproper + exact (not_le_of_gt hlt) hle + +theorem NonemptyBoundary.positiveIndegree {r : V → V → Prop} + (hboundary : NonemptyBoundary r) (hr : IsOriented r) + (hbad : Counterexample r) : PositiveIndegree r := by + classical + intro v + obtain ⟨w, hvw⟩ := hbad.first_nonempty v + have hvw' := mem_firstNeighbors.mp hvw + have hwv : w ≠ v := by + intro heq + subst w + exact hr.loopless v hvw' + have hnonempty : (Finset.univ.erase v : Finset V).Nonempty := + ⟨w, Finset.mem_erase.mpr ⟨hwv, Finset.mem_univ w⟩⟩ + have hproper : (Finset.univ.erase v : Finset V) ≠ Finset.univ := by + intro heq + have hv : v ∈ (Finset.univ.erase v : Finset V) := heq.symm ▸ Finset.mem_univ v + exact Finset.notMem_erase v Finset.univ hv + obtain ⟨x, hx⟩ := hboundary (Finset.univ.erase v) hnonempty hproper + obtain ⟨hximage, hxnot⟩ := Finset.mem_sdiff.mp hx + have hxv : x = v := by + by_contra hne + exact hxnot (Finset.mem_erase.mpr ⟨hne, Finset.mem_univ x⟩) + obtain ⟨u, _, hux⟩ := mem_image.mp hximage + exact ⟨u, hxv ▸ hux⟩ + +theorem exists_minimal_counterexample [Nonempty V] {r : V → V → Prop} + (hr : IsOriented r) (hbad : Counterexample r) : + ∃ n : ℕ, 0 < n ∧ ∃ s : Fin n → Fin n → Prop, + IsOriented s ∧ Counterexample s ∧ ArcMinimal s ∧ + NonemptyBoundary s ∧ PositiveIndegree s := by + classical + let P : ℕ → Prop := fun n => 0 < n ∧ ∃ s : Fin n → Fin n → Prop, + IsOriented s ∧ Counterexample s + have hex : ∃ n, P n := by + refine ⟨Fintype.card V, Fintype.card_pos_iff.mpr inferInstance, + reindex (Fintype.equivFin V) r, ?_, ?_⟩ + · exact isOriented_reindex (Fintype.equivFin V) hr + · exact counterexample_reindex (Fintype.equivFin V) hbad + let n := Nat.find hex + obtain ⟨hn, t, ht, htb⟩ := Nat.find_spec hex + have harcs : ∃ a : ℕ, ∃ s : Fin n → Fin n → Prop, + IsOriented s ∧ Counterexample s ∧ (arcSet s).card = a := + ⟨(arcSet t).card, t, ht, htb, rfl⟩ + obtain ⟨s, hs, hsb, hscard⟩ := Nat.find_spec harcs + have hsmin : ArcMinimal s := by + intro u hu hub + rw [hscard] + exact Nat.find_min' harcs ⟨u, hu, hub, rfl⟩ + have hsorder : OrderMinimal s := by + intro k hk u hu hub + simpa only [Fintype.card_fin] using (Nat.find_min' hex ⟨hk, u, hu, hub⟩) + have hboundary := hsorder.nonemptyBoundary hs hsb + exact ⟨n, hn, s, hs, hsb, hsmin, hboundary, + hboundary.positiveIndegree hs hsb⟩ + +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/Model.lean b/lean/OAI/Combinatorics/SecondNeighborhood/Model.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8fde77e3625a4c68562423444365e9fb05c22a0 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/Model.lean @@ -0,0 +1,34 @@ +import Mathlib.Data.Fintype.Card +import Mathlib.Data.Finset.Union + +namespace OAI + +namespace SeymourSecondNeighborhood + +variable {V : Type*} + +structure IsOriented (r : V → V → Prop) : Prop where + loopless : ∀ v, ¬ r v v + asymmetric : ∀ {u v}, r u v → ¬ r v u + +variable [Fintype V] [DecidableEq V] + +noncomputable section + +def firstNeighbors (r : V → V → Prop) (v : V) : Finset V := by + classical + exact Finset.univ.filter (r v) + +def secondNeighbors (r : V → V → Prop) (v : V) : Finset V := by + classical + exact Finset.univ.filter (fun w => + w ≠ v ∧ ¬ r v w ∧ ∃ u, r v u ∧ r u w) + +def GoodVertex (r : V → V → Prop) (v : V) : Prop := + (firstNeighbors r v).card ≤ (secondNeighbors r v).card + +end + +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/Pruning.lean b/lean/OAI/Combinatorics/SecondNeighborhood/Pruning.lean new file mode 100644 index 0000000000000000000000000000000000000000..38d232c111c15ed57effd3c8b23a261751ba65f1 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/Pruning.lean @@ -0,0 +1,19 @@ +import OAI.Combinatorics.SecondNeighborhood.AugmentedRankBound +import OAI.Combinatorics.SecondNeighborhood.CoverPruning + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +variable {X : Type*} [Fintype X] [DecidableEq X] + +theorem pruning (r : X → X → Prop) : PruningStatement r := by + intro R C + obtain ⟨M, hM, hα, hβ⟩ := exists_augmented_maximum_matching r R C + apply exists_pruning_of_augmented_matching_bound r R C M hM + simpa only [Nat.add_comm] using + augmented_matching_card_le_corners r R C M hM.1 hα hβ + +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/PruningDefinitions.lean b/lean/OAI/Combinatorics/SecondNeighborhood/PruningDefinitions.lean new file mode 100644 index 0000000000000000000000000000000000000000..00ec501766153a3567877d9a66cf3c37705583a7 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/PruningDefinitions.lean @@ -0,0 +1,250 @@ +import OAI.Combinatorics.SecondNeighborhood.Basic +import Mathlib.Data.Finset.Prod +import Mathlib.Data.Fintype.Prod + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +variable {V : Type*} + +def Conflict (r : V → V → Prop) (a b : V × V) : Prop := + r a.1 b.1 ∧ r b.2 a.2 + +def LeftCovers (r : V → V → Prop) (a z : V × V) : Prop := + a.2 = z.2 ∧ r a.1 z.1 + +def RightCovers (r : V → V → Prop) (b z : V × V) : Prop := + b.1 = z.1 ∧ r b.2 z.2 + +variable [Fintype V] [DecidableEq V] + +noncomputable section + +def leftImage (r : V → V → Prop) (R : Finset (V × V)) : Finset (V × V) := by + classical + exact Finset.univ.filter (fun z => ∃ p, (p, z.2) ∈ R ∧ r p z.1) + +def rightImage (r : V → V → Prop) (C : Finset (V × V)) : Finset (V × V) := by + classical + exact Finset.univ.filter (fun z => ∃ s, (z.1, s) ∈ C ∧ r s z.2) + +def Covered (r : V → V → Prop) (R C : Finset (V × V)) (z : V × V) : Prop := + z ∈ leftImage r R ∨ z ∈ rightImage r C + +def Z (r : V → V → Prop) (R C : Finset (V × V)) : Finset (V × V) := by + classical + exact Finset.univ.filter (fun z => + ∃ p s, (p, z.2) ∈ R ∧ (z.1, s) ∈ C ∧ r p z.1 ∧ r s z.2) + +def H (r : V → V → Prop) (R C : Finset (V × V)) : Finset (V × V) := by + classical + exact Finset.univ.filter (fun h => + ∃ i j, (h.1, j) ∈ R ∧ (i, h.2) ∈ C ∧ r h.1 i ∧ r h.2 j) + +def ConflictFree (r : V → V → Prop) (R C : Finset (V × V)) : Prop := + ∀ a ∈ R, ∀ b ∈ C, ¬ Conflict r a b + +def uncoveredZ (r : V → V → Prop) (R C R' C' : Finset (V × V)) : + Finset (V × V) := by + classical + exact (Z r R C).filter (fun z => ¬ Covered r R' C' z) + +structure PruningResult (r : V → V → Prop) (R C R' C' : Finset (V × V)) : Prop where + subset_left : R' ⊆ R + subset_right : C' ⊆ C + no_conflicts : ConflictFree r R' C' + retain_left : ∀ a ∈ R, (∀ b ∈ C, ¬ Conflict r a b) → a ∈ R' + retain_right : ∀ b ∈ C, (∀ a ∈ R, ¬ Conflict r a b) → b ∈ C' + deletion_bound : (R \ R').card + (C \ C').card ≤ + (H r R C).card + (uncoveredZ r R C R' C').card + +def PruningStatement (r : V → V → Prop) : Prop := + ∀ R C : Finset (V × V), ∃ R' C', PruningResult r R C R' C' + +@[simp] theorem mem_leftImage {r : V → V → Prop} {R : Finset (V × V)} + {z : V × V} : z ∈ leftImage r R ↔ ∃ p, (p, z.2) ∈ R ∧ r p z.1 := by + classical + simp [leftImage] + +@[simp] theorem mem_rightImage {r : V → V → Prop} {C : Finset (V × V)} + {z : V × V} : z ∈ rightImage r C ↔ ∃ s, (z.1, s) ∈ C ∧ r s z.2 := by + classical + simp [rightImage] + +@[simp] theorem mem_Z {r : V → V → Prop} {R C : Finset (V × V)} {z : V × V} : + z ∈ Z r R C ↔ + ∃ p s, (p, z.2) ∈ R ∧ (z.1, s) ∈ C ∧ r p z.1 ∧ r s z.2 := by + classical + simp [Z] + +@[simp] theorem mem_H {r : V → V → Prop} {R C : Finset (V × V)} {h : V × V} : + h ∈ H r R C ↔ + ∃ i j, (h.1, j) ∈ R ∧ (i, h.2) ∈ C ∧ r h.1 i ∧ r h.2 j := by + classical + simp [H] + +@[simp] theorem mem_uncoveredZ {r : V → V → Prop} + {R C R' C' : Finset (V × V)} {z : V × V} : + z ∈ uncoveredZ r R C R' C' ↔ z ∈ Z r R C ∧ ¬ Covered r R' C' z := by + classical + simp only [uncoveredZ, Finset.mem_filter] + +theorem exists_leftCovers_iff {r : V → V → Prop} {R : Finset (V × V)} + {z : V × V} : (∃ a ∈ R, LeftCovers r a z) ↔ z ∈ leftImage r R := by + constructor + · rintro ⟨⟨p, j⟩, ha, hj, hpi⟩ + apply mem_leftImage.mpr + refine ⟨p, ?_, hpi⟩ + change j = z.2 at hj + simpa only [hj] using ha + · intro hz + obtain ⟨p, hp, hpi⟩ := mem_leftImage.mp hz + exact ⟨(p, z.2), hp, rfl, hpi⟩ + +theorem exists_rightCovers_iff {r : V → V → Prop} {C : Finset (V × V)} + {z : V × V} : (∃ b ∈ C, RightCovers r b z) ↔ z ∈ rightImage r C := by + constructor + · rintro ⟨⟨i, s⟩, hb, hi, hsj⟩ + apply mem_rightImage.mpr + refine ⟨s, ?_, hsj⟩ + change i = z.1 at hi + simpa only [hi] using hb + · intro hz + obtain ⟨s, hs, hsj⟩ := mem_rightImage.mp hz + exact ⟨(z.1, s), hs, rfl, hsj⟩ + +@[simp] theorem leftImage_empty (r : V → V → Prop) : leftImage r ∅ = ∅ := by + classical + ext z + simp + +@[simp] theorem rightImage_empty (r : V → V → Prop) : rightImage r ∅ = ∅ := by + classical + ext z + simp + +theorem leftImage_mono (r : V → V → Prop) {R R' : Finset (V × V)} + (h : R ⊆ R') : leftImage r R ⊆ leftImage r R' := by + intro z hz + obtain ⟨p, hp, hpz⟩ := mem_leftImage.mp hz + exact mem_leftImage.mpr ⟨p, h hp, hpz⟩ + +theorem rightImage_mono (r : V → V → Prop) {C C' : Finset (V × V)} + (h : C ⊆ C') : rightImage r C ⊆ rightImage r C' := by + intro z hz + obtain ⟨s, hs, hsz⟩ := mem_rightImage.mp hz + exact mem_rightImage.mpr ⟨s, h hs, hsz⟩ + +theorem Covered.mono {r : V → V → Prop} {R C R' C' : Finset (V × V)} + (hR : R ⊆ R') (hC : C ⊆ C') {z : V × V} + (h : Covered r R C z) : Covered r R' C' z := by + rcases h with h | h + · exact Or.inl (leftImage_mono r hR h) + · exact Or.inr (rightImage_mono r hC h) + +theorem Z_eq_inter (r : V → V → Prop) (R C : Finset (V × V)) : + Z r R C = leftImage r R ∩ rightImage r C := by + classical + ext z + constructor + · intro hz + obtain ⟨p, s, hp, hs, hpi, hsj⟩ := mem_Z.mp hz + exact Finset.mem_inter.mpr + ⟨mem_leftImage.mpr ⟨p, hp, hpi⟩, mem_rightImage.mpr ⟨s, hs, hsj⟩⟩ + · intro hz + obtain ⟨hl, hr⟩ := Finset.mem_inter.mp hz + obtain ⟨p, hp, hpi⟩ := mem_leftImage.mp hl + obtain ⟨s, hs, hsj⟩ := mem_rightImage.mp hr + exact mem_Z.mpr ⟨p, s, hp, hs, hpi, hsj⟩ + +theorem conflict_corner_mem_Z {r : V → V → Prop} {R C : Finset (V × V)} + {a b : V × V} (ha : a ∈ R) (hb : b ∈ C) (hc : Conflict r a b) : + (b.1, a.2) ∈ Z r R C := by + exact mem_Z.mpr ⟨a.1, b.2, by simpa using ha, by simpa using hb, hc.1, hc.2⟩ + +theorem conflict_corner_mem_H {r : V → V → Prop} {R C : Finset (V × V)} + {a b : V × V} (ha : a ∈ R) (hb : b ∈ C) (hc : Conflict r a b) : + (a.1, b.2) ∈ H r R C := by + exact mem_H.mpr ⟨b.1, a.2, by simpa using ha, by simpa using hb, hc.1, hc.2⟩ + +theorem conflictFree_iff_disjoint {r : V → V → Prop} {R C : Finset (V × V)} : + ConflictFree r R C ↔ Disjoint (leftImage r R) (rightImage r C) := by + constructor + · intro h + apply Finset.disjoint_left.mpr + intro z hl hr + obtain ⟨p, hp, hpi⟩ := mem_leftImage.mp hl + obtain ⟨s, hs, hsj⟩ := mem_rightImage.mp hr + exact h (p, z.2) hp (z.1, s) hs ⟨hpi, hsj⟩ + · intro h a ha b hb hc + have hl : (b.1, a.2) ∈ leftImage r R := + mem_leftImage.mpr ⟨a.1, by simpa using ha, hc.1⟩ + have hr : (b.1, a.2) ∈ rightImage r C := + mem_rightImage.mpr ⟨b.2, by simpa using hb, hc.2⟩ + exact Finset.disjoint_left.mp h hl hr + +omit [Fintype V] [DecidableEq V] in +theorem ConflictFree.mono {r : V → V → Prop} {R C R' C' : Finset (V × V)} + (h : ConflictFree r R C) (hR : R' ⊆ R) (hC : C' ⊆ C) : + ConflictFree r R' C' := by + intro a ha b hb + exact h a (hR ha) b (hC hb) + +theorem Z_eq_empty_of_conflictFree {r : V → V → Prop} {R C : Finset (V × V)} + (h : ConflictFree r R C) : Z r R C = ∅ := by + apply Finset.eq_empty_iff_forall_notMem.mpr + intro z hz + obtain ⟨p, s, hp, hs, hpi, hsj⟩ := mem_Z.mp hz + exact h (p, z.2) hp (z.1, s) hs ⟨hpi, hsj⟩ + +theorem H_eq_empty_of_conflictFree {r : V → V → Prop} {R C : Finset (V × V)} + (h : ConflictFree r R C) : H r R C = ∅ := by + apply Finset.eq_empty_iff_forall_notMem.mpr + intro z hz + obtain ⟨i, j, hp, hs, hpi, hsj⟩ := mem_H.mp hz + exact h (z.1, j) hp (i, z.2) hs ⟨hpi, hsj⟩ + +theorem conflictFree_left_not_covers_Z {r : V → V → Prop} + {R C : Finset (V × V)} {a z : V × V} + (ha : ∀ b ∈ C, ¬ Conflict r a b) (hz : z ∈ Z r R C) : + ¬ LeftCovers r a z := by + intro hc + obtain ⟨p, s, _, hs, _, hsj⟩ := mem_Z.mp hz + apply ha (z.1, s) hs + refine ⟨hc.2, ?_⟩ + simpa only [hc.1] using hsj + +theorem conflictFree_right_not_covers_Z {r : V → V → Prop} + {R C : Finset (V × V)} {b z : V × V} + (hb : ∀ a ∈ R, ¬ Conflict r a b) (hz : z ∈ Z r R C) : + ¬ RightCovers r b z := by + intro hc + obtain ⟨p, s, hp, _, hpi, _⟩ := mem_Z.mp hz + apply hb (p, z.2) hp + refine ⟨?_, hc.2⟩ + simpa only [hc.1] using hpi + +theorem uncoveredZ_eq_sdiff (r : V → V → Prop) (R C R' C' : Finset (V × V)) : + uncoveredZ r R C R' C' = Z r R C \ (leftImage r R' ∪ rightImage r C') := by + classical + ext z + simp only [mem_uncoveredZ, Finset.mem_sdiff, Finset.mem_union, Covered] + +theorem pruningResult_self {r : V → V → Prop} {R C : Finset (V × V)} + (h : ConflictFree r R C) : PruningResult r R C R C where + subset_left := fun _ ha => ha + subset_right := fun _ hb => hb + no_conflicts := h + retain_left := fun _ ha _ => ha + retain_right := fun _ hb _ => hb + deletion_bound := by simp + +theorem exists_pruning_of_conflictFree {r : V → V → Prop} {R C : Finset (V × V)} + (h : ConflictFree r R C) : ∃ R' C', PruningResult r R C R' C' := + ⟨R, C, pruningResult_self h⟩ + +end +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/RankBoundFromMinors.lean b/lean/OAI/Combinatorics/SecondNeighborhood/RankBoundFromMinors.lean new file mode 100644 index 0000000000000000000000000000000000000000..5df9e8fac00cd844312294b26ac41790da5e5fd1 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/RankBoundFromMinors.lean @@ -0,0 +1,46 @@ +import OAI.Combinatorics.SecondNeighborhood.GenericRankSelection +import OAI.Combinatorics.SecondNeighborhood.KernelBasisLifts +import OAI.Combinatorics.SecondNeighborhood.CompositeRankBound + +namespace OAI + +namespace SeymourSecondNeighborhood.Pruning + +open scoped Matrix + +variable {X E : Type*} [Fintype X] [DecidableEq X] [Fintype E] + +theorem original_add_auxiliary_card_le_corners + (r : X → X → Prop) (R C : Finset (X × X)) + (α : Finset (↥(Z r R C) × ↥R)) (β : Finset (↥(Z r R C) × ↥C)) + (hα : Bipartite.IsMaximumMatching (matrixLSupport r R C) α) + (hβ : Bipartite.IsMaximumMatching (matrixNTransposeSupport r R C) β) + (left : E → ↥R) (right : E → ↥C) + (hleft : Function.Injective left) (hright : Function.Injective right) + (hleft_disjoint : ∀ e (f : ↥α), left e ≠ f.1.2) + (hright_disjoint : ∀ e (f : ↥β), right e ≠ f.1.2) + (hconflict : ∀ e, Conflict r (left e).1 (right e).1) : + Fintype.card E + α.card + β.card ≤ (Z r R C).card + (H r R C).card := by + classical + obtain ⟨v, ha, hb, hmax, hdetL, hdetN, hrankL, hrankN⟩ := + exists_pruning_rank_coefficients r R C α β hα hβ + have hupperL : (matrixL r R C (selectedA r v)).rank ≤ Fintype.card ↥α := by + simpa only [Fintype.card_coe] using hrankL.le + have hupperN : ((matrixN r R C (selectedB r v))ᵀ).rank ≤ Fintype.card ↥β := by + simpa only [Fintype.card_coe] using hrankN.le + obtain ⟨U, hU, hUcoordinate⟩ := exists_normalized_kernelLifts_of_det_ne_zero + (matrixL r R C (selectedA r v)) (fun f : ↥α => f.1.1) + (fun f : ↥α => f.1.2) hdetL hupperL left hleft hleft_disjoint + obtain ⟨W, hW, hWcoordinate⟩ := exists_normalized_kernelLifts_of_det_ne_zero + (matrixN r R C (selectedB r v))ᵀ (fun f : ↥β => f.1.1) + (fun f : ↥β => f.1.2) hdetN hupperN right hright hright_disjoint + have hbound := card_add_rank_matrixL_add_rank_matrixN_le_card_Z_add_card_H_of_lifts + r R C (selectedA r v) (selectedB r v) ha hb hmax left right U W + hU hW (fun e => by simpa using hWcoordinate e e) hUcoordinate hconflict + have hrankN' : (matrixN r R C (selectedB r v)).rank = β.card := by + simpa only [Matrix.rank_transpose] using hrankN + simpa only [hrankL, hrankN'] using hbound + +end SeymourSecondNeighborhood.Pruning + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/Reduction.lean b/lean/OAI/Combinatorics/SecondNeighborhood/Reduction.lean new file mode 100644 index 0000000000000000000000000000000000000000..5c0afefe17033f74685a5a082d1222a3ff94f1d7 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/Reduction.lean @@ -0,0 +1,27 @@ +import OAI.Combinatorics.SecondNeighborhood.MinimalCounterexample +import OAI.Combinatorics.SecondNeighborhood.SubsetDeficit +import OAI.Combinatorics.SecondNeighborhood.TransitiveBlowup + +namespace OAI + +namespace SeymourSecondNeighborhood + +variable {V : Type*} [Fintype V] [DecidableEq V] [Nonempty V] + +theorem counterexample_reduction {r : V → V → Prop} + (hr : IsOriented r) (hcounter : Counterexample r) : + ∃ n : ℕ, 0 < n ∧ + ∃ g : (Fin n × Fin (n + 1)) → (Fin n × Fin (n + 1)) → Prop, + IsOriented g ∧ PositiveIndegree g ∧ StrictSubsetGrowth g := by + classical + obtain ⟨n, hn, s, hs, hbad, hminimal, hboundary, hindegree⟩ := + exists_minimal_counterexample hr hcounter + refine ⟨n, hn, blowup s (n + 1), blowup_isOriented hs (n + 1), + blowup_positiveIndegree hindegree (n + 1), ?_⟩ + apply blowup_strictSubsetGrowth hs hindegree + (subsetDeficit_of_minimal hs hbad hminimal hboundary) + simpa only [Fintype.card_fin] using Nat.lt_succ_self n + +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/ReductionCore.lean b/lean/OAI/Combinatorics/SecondNeighborhood/ReductionCore.lean new file mode 100644 index 0000000000000000000000000000000000000000..77028f71ff0ff4a5ee24005a19ceafc024e3c5bd --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/ReductionCore.lean @@ -0,0 +1,61 @@ +import OAI.Combinatorics.SecondNeighborhood.Basic +import Mathlib.Data.Fintype.Prod + +namespace OAI + +namespace SeymourSecondNeighborhood + +variable {V : Type*} [Fintype V] [DecidableEq V] + +def Counterexample (r : V → V → Prop) : Prop := + ∀ v, (secondNeighbors r v).card < (firstNeighbors r v).card + +noncomputable def arcSet (r : V → V → Prop) : Finset (V × V) := by + classical + exact Finset.univ.filter fun p => r p.1 p.2 + +def ArcMinimal (r : V → V → Prop) : Prop := + ∀ s : V → V → Prop, IsOriented s → Counterexample s → + (arcSet r).card ≤ (arcSet s).card + +def NonemptyBoundary (r : V → V → Prop) : Prop := + ∀ S : Finset V, S.Nonempty → S ≠ Finset.univ → + (image r S \ S).Nonempty + +def SubsetDeficit (r : V → V → Prop) : Prop := + ∀ S : Finset V, S.Nonempty → S ≠ Finset.univ → + (image r (image r S) \ image r S).card < (image r S \ S).card + +def PositiveIndegree (r : V → V → Prop) : Prop := + ∀ v, ∃ u, r u v + +def StrictSubsetGrowth (r : V → V → Prop) : Prop := + ∀ S : Finset V, S.Nonempty → S ≠ Finset.univ → + S.card + (image r (image r S)).card < 2 * (image r S).card + +omit [DecidableEq V] in +@[simp] theorem mem_arcSet {r : V → V → Prop} {p : V × V} : + p ∈ arcSet r ↔ r p.1 p.2 := by + classical + simp [arcSet] + +omit [DecidableEq V] in +theorem arcSet_mono {r s : V → V → Prop} + (h : ∀ ⦃u v⦄, r u v → s u v) : arcSet r ⊆ arcSet s := by + intro p hp + exact mem_arcSet.mpr (h (mem_arcSet.mp hp)) + +theorem counterexample_iff_not_conjecture (r : V → V → Prop) : + Counterexample r ↔ ¬ SecondNeighborhoodConjecture r := by + classical + simp only [Counterexample, SecondNeighborhoodConjecture, GoodVertex, + not_exists, not_le] + +theorem Counterexample.first_nonempty {r : V → V → Prop} + (h : Counterexample r) (v : V) : (firstNeighbors r v).Nonempty := by + apply Finset.card_pos.mp + exact lt_of_le_of_lt (Nat.zero_le _) (h v) + +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/Reindex.lean b/lean/OAI/Combinatorics/SecondNeighborhood/Reindex.lean new file mode 100644 index 0000000000000000000000000000000000000000..af14772b7663fc1bc0115694f16bb30d0871c46a --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/Reindex.lean @@ -0,0 +1,91 @@ +import OAI.Combinatorics.SecondNeighborhood.ReductionCore +import Mathlib.Data.Fintype.EquivFin + +namespace OAI + +namespace SeymourSecondNeighborhood + +variable {V W : Type*} + +def reindex (e : V ≃ W) (r : V → V → Prop) : W → W → Prop := + fun x y => r (e.symm x) (e.symm y) + +theorem isOriented_reindex (e : V ≃ W) {r : V → V → Prop} + (hr : IsOriented r) : IsOriented (reindex e r) where + loopless w := hr.loopless (e.symm w) + asymmetric hxy hyx := hr.asymmetric hxy hyx + +variable [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W] + +omit [DecidableEq V] [DecidableEq W] in +@[simp] theorem mem_firstNeighbors_reindex (e : V ≃ W) + (r : V → V → Prop) (v w : W) : + w ∈ firstNeighbors (reindex e r) v ↔ + e.symm w ∈ firstNeighbors r (e.symm v) := by + simp only [mem_firstNeighbors, reindex] + +@[simp] theorem mem_secondNeighbors_reindex (e : V ≃ W) + (r : V → V → Prop) (v w : W) : + w ∈ secondNeighbors (reindex e r) v ↔ + e.symm w ∈ secondNeighbors r (e.symm v) := by + simp only [mem_secondNeighbors, reindex] + constructor + · rintro ⟨hneq, hnot, u, hvu, huw⟩ + exact ⟨fun heq => hneq (e.symm.injective heq), hnot, e.symm u, hvu, huw⟩ + · rintro ⟨hneq, hnot, u, hvu, huw⟩ + refine ⟨fun heq => hneq (congrArg e.symm heq), hnot, e u, ?_, ?_⟩ + · simpa only [Equiv.symm_apply_apply] using hvu + · simpa only [Equiv.symm_apply_apply] using huw + +omit [DecidableEq V] [DecidableEq W] in +theorem firstNeighbors_reindex (e : V ≃ W) (r : V → V → Prop) (w : W) : + firstNeighbors (reindex e r) w = + (firstNeighbors r (e.symm w)).map e.toEmbedding := by + ext v + simp only [Finset.mem_map_equiv, mem_firstNeighbors_reindex] + +theorem secondNeighbors_reindex (e : V ≃ W) (r : V → V → Prop) (w : W) : + secondNeighbors (reindex e r) w = + (secondNeighbors r (e.symm w)).map e.toEmbedding := by + ext v + simp only [Finset.mem_map_equiv, mem_secondNeighbors_reindex] + +omit [DecidableEq V] [DecidableEq W] in +@[simp] theorem card_firstNeighbors_reindex (e : V ≃ W) + (r : V → V → Prop) (w : W) : + (firstNeighbors (reindex e r) w).card = + (firstNeighbors r (e.symm w)).card := by + rw [firstNeighbors_reindex, Finset.card_map] + +@[simp] theorem card_secondNeighbors_reindex (e : V ≃ W) + (r : V → V → Prop) (w : W) : + (secondNeighbors (reindex e r) w).card = + (secondNeighbors r (e.symm w)).card := by + rw [secondNeighbors_reindex, Finset.card_map] + +theorem counterexample_reindex (e : V ≃ W) {r : V → V → Prop} + (h : Counterexample r) : Counterexample (reindex e r) := by + intro w + rw [card_secondNeighbors_reindex, card_firstNeighbors_reindex] + exact h (e.symm w) + +theorem counterexample_reindex_iff (e : V ≃ W) (r : V → V → Prop) : + Counterexample (reindex e r) ↔ Counterexample r := by + constructor + · intro h v + have hv := h (e v) + simpa only [card_secondNeighbors_reindex, card_firstNeighbors_reindex, + Equiv.symm_apply_apply] using hv + · exact counterexample_reindex e + +theorem exists_counterexample_fin {r : V → V → Prop} + (hr : IsOriented r) (h : Counterexample r) : + ∃ s : Fin (Fintype.card V) → Fin (Fintype.card V) → Prop, + IsOriented s ∧ Counterexample s := by + exact ⟨reindex (Fintype.equivFin V) r, + isOriented_reindex (Fintype.equivFin V) hr, + counterexample_reindex (Fintype.equivFin V) h⟩ + +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/SubsetAugmentation.lean b/lean/OAI/Combinatorics/SecondNeighborhood/SubsetAugmentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..6142823f0b5274d65efe5afaf42c880ece8214df --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/SubsetAugmentation.lean @@ -0,0 +1,60 @@ +import Mathlib.Data.Finset.Max +import Mathlib.Data.Finset.Powerset +import Lean.Elab.Tactic.Omega + +namespace OAI + +namespace SeymourSecondNeighborhood + +variable {V : Type*} [DecidableEq V] + +theorem strict_deficit_of_augmentation (E : Finset V) (hE : E.Nonempty) + (g : Finset V → ℕ) (hempty : g ∅ = 0) + (step : ∀ T : Finset V, T ⊆ E → T ≠ E → + ∃ Q : Finset V, Q.Nonempty ∧ Q ⊆ E \ T ∧ + g (T ∪ Q) < g T + Q.card) : + g E < E.card := by + classical + let feasible := E.powerset.filter fun T => T = ∅ ∨ g T < T.card + have hfeasible : feasible.Nonempty := by + refine ⟨∅, ?_⟩ + simp [feasible] + obtain ⟨T, hT, hmax⟩ := Finset.exists_max_image feasible Finset.card hfeasible + have hTE : T ⊆ E := Finset.mem_powerset.mp (Finset.mem_filter.mp hT).1 + have hinvariant : T = ∅ ∨ g T < T.card := (Finset.mem_filter.mp hT).2 + have hgle : g T ≤ T.card := by + rcases hinvariant with ht | ht + · subst T + simp [hempty] + · exact Nat.le_of_lt ht + have heq : T = E := by + by_contra hne + obtain ⟨Q, hQnonempty, hQ, hstep⟩ := step T hTE hne + have hdisjoint : Disjoint T Q := by + apply Finset.disjoint_left.mpr + intro v hvT hvQ + exact (Finset.mem_sdiff.mp (hQ hvQ)).2 hvT + have hcard : (T ∪ Q).card = T.card + Q.card := + Finset.card_union_of_disjoint hdisjoint + have hunion : T ∪ Q ⊆ E := by + intro v hv + rcases Finset.mem_union.mp hv with hv | hv + · exact hTE hv + · exact (Finset.mem_sdiff.mp (hQ hv)).1 + have hstrict : g (T ∪ Q) < (T ∪ Q).card := by + rw [hcard] + omega + have hnew : T ∪ Q ∈ feasible := by + apply Finset.mem_filter.mpr + exact ⟨Finset.mem_powerset.mpr hunion, Or.inr hstrict⟩ + have hmax' := hmax (T ∪ Q) hnew + have hpos : 0 < Q.card := Finset.card_pos.mpr hQnonempty + omega + rcases hinvariant with hempty' | hstrict + · have : E = ∅ := heq.symm.trans hempty' + exact (hE.ne_empty this).elim + · simpa only [heq] using hstrict + +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/SubsetDeficit.lean b/lean/OAI/Combinatorics/SecondNeighborhood/SubsetDeficit.lean new file mode 100644 index 0000000000000000000000000000000000000000..d6750cbba00dcadb2b066d7fe953ab9518ddec06 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/SubsetDeficit.lean @@ -0,0 +1,62 @@ +import OAI.Combinatorics.SecondNeighborhood.SubsetAugmentation +import OAI.Combinatorics.SecondNeighborhood.Deletion + +namespace OAI + +namespace SeymourSecondNeighborhood + +variable {V : Type*} [Fintype V] [DecidableEq V] + +theorem deficitPotential_terminal (r : V → V → Prop) (S : Finset V) : + deficitPotential r S (image r S \ S) = + (image r (image r S) \ image r S).card := by + classical + have hsplit : (image r S ∩ S) ∪ (image r S \ S) = image r S := by + ext v + constructor + · intro hv + rcases Finset.mem_union.mp hv with hv | hv + · exact (Finset.mem_inter.mp hv).1 + · exact (Finset.mem_sdiff.mp hv).1 + · intro hv + by_cases hs : v ∈ S + · exact Finset.mem_union.mpr (Or.inl (Finset.mem_inter.mpr ⟨hv, hs⟩)) + · exact Finset.mem_union.mpr (Or.inr (Finset.mem_sdiff.mpr ⟨hv, hs⟩)) + unfold deficitPotential + rw [hsplit] + congr 1 + ext v + constructor + · intro hv + obtain ⟨hpath, hnot⟩ := Finset.mem_sdiff.mp hv + obtain ⟨u, hu, huv⟩ := mem_image.mp hpath + exact Finset.mem_sdiff.mpr + ⟨mem_image.mpr ⟨u, (Finset.mem_sdiff.mp hu).1, huv⟩, hnot⟩ + · intro hv + obtain ⟨hpath, hnot⟩ := Finset.mem_sdiff.mp hv + obtain ⟨u, hu, huv⟩ := mem_image.mp hpath + have huS : u ∉ S := by + intro huS + exact hnot (mem_image.mpr ⟨u, huS, huv⟩) + exact Finset.mem_sdiff.mpr + ⟨mem_image.mpr ⟨u, Finset.mem_sdiff.mpr ⟨hu, huS⟩, huv⟩, hnot⟩ + +theorem subsetDeficit_of_minimal {r : V → V → Prop} + (hr : IsOriented r) (hcounter : Counterexample r) + (hminimal : ArcMinimal r) (hboundary : NonemptyBoundary r) : + SubsetDeficit r := by + classical + intro S hS hproper + have hE := hboundary S hS hproper + have hg : deficitPotential r S (image r S \ S) < (image r S \ S).card := by + apply strict_deficit_of_augmentation (image r S \ S) hE + (deficitPotential r S) + · simp [deficitPotential] + · intro T hT hTproper + exact deficitPotential_step r hr hcounter hminimal S T hT hTproper + rw [deficitPotential_terminal] at hg + exact hg + +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/SecondNeighborhood/TransitiveBlowup.lean b/lean/OAI/Combinatorics/SecondNeighborhood/TransitiveBlowup.lean new file mode 100644 index 0000000000000000000000000000000000000000..5dd75513da8580d41a31e51b88bdef69c0aff608 --- /dev/null +++ b/lean/OAI/Combinatorics/SecondNeighborhood/TransitiveBlowup.lean @@ -0,0 +1,181 @@ +import OAI.Combinatorics.SecondNeighborhood.ReductionCore +import Mathlib.Data.Finset.Prod + +namespace OAI + +namespace SeymourSecondNeighborhood + +variable {V : Type*} + +def blowup (r : V → V → Prop) (m : ℕ) : (V × Fin m) → (V × Fin m) → Prop := + fun p q => r p.1 q.1 ∨ (p.1 = q.1 ∧ p.2 < q.2) + +theorem blowup_isOriented {r : V → V → Prop} (hr : IsOriented r) (m : ℕ) : + IsOriented (blowup r m) := by + constructor + · intro p hp + rcases hp with hp | ⟨_, hp⟩ + · exact hr.loopless p.1 hp + · exact (lt_irrefl p.2) hp + · intro p q hpq hqp + rcases hpq with hpq | ⟨heq, hlt⟩ + · rcases hqp with hqp | ⟨heq, _⟩ + · exact hr.asymmetric hpq hqp + · apply hr.loopless p.1 + simpa only [heq] using hpq + · rcases hqp with hqp | ⟨_, hgt⟩ + · apply hr.loopless q.1 + simpa only [heq] using hqp + · exact (not_lt_of_gt hlt) hgt + +theorem blowup_positiveIndegree {r : V → V → Prop} + (hi : PositiveIndegree r) (m : ℕ) : PositiveIndegree (blowup r m) := by + intro p + obtain ⟨v, hv⟩ := hi p.1 + exact ⟨(v, p.2), Or.inl hv⟩ + +variable [Fintype V] [DecidableEq V] + +theorem blowup_mem_image_of_mem_base_image {r : V → V → Prop} {m : ℕ} + (U : Finset (V × Fin m)) {p : V × Fin m} + (hp : p.1 ∈ image r (U.image Prod.fst)) : p ∈ image (blowup r m) U := by + classical + obtain ⟨v, hv, hvp⟩ := mem_image.mp hp + obtain ⟨q, hq, hqv⟩ := Finset.mem_image.mp hv + apply mem_image.mpr + refine ⟨q, hq, Or.inl ?_⟩ + simpa only [hqv] using hvp + +theorem blowup_boundary_product_subset {r : V → V → Prop} {m : ℕ} + (U : Finset (V × Fin m)) : + (image r (U.image Prod.fst) \ U.image Prod.fst).product Finset.univ ⊆ + image (blowup r m) U \ U := by + classical + intro p hp + obtain ⟨hpA, hpS⟩ := Finset.mem_sdiff.mp (Finset.mem_product.mp hp).1 + refine Finset.mem_sdiff.mpr ⟨blowup_mem_image_of_mem_base_image U hpA, ?_⟩ + intro hpU + exact hpS (Finset.mem_image.mpr ⟨p, hpU, rfl⟩) + +theorem blowup_second_sdiff_subset {r : V → V → Prop} {m : ℕ} + (U : Finset (V × Fin m)) : + image (blowup r m) (image (blowup r m) U) \ image (blowup r m) U ⊆ + (image r (image r (U.image Prod.fst)) \ image r (U.image Prod.fst)).product + Finset.univ := by + classical + intro z hz + obtain ⟨hzY, hzX⟩ := Finset.mem_sdiff.mp hz + obtain ⟨y, hyX, hyz⟩ := mem_image.mp hzY + obtain ⟨x, hxU, hxy⟩ := mem_image.mp hyX + have hxS : x.1 ∈ U.image Prod.fst := Finset.mem_image.mpr ⟨x, hxU, rfl⟩ + have hzA : z.1 ∉ image r (U.image Prod.fst) := by + intro hzA + exact hzX (blowup_mem_image_of_mem_base_image U hzA) + apply Finset.mem_product.mpr + refine ⟨Finset.mem_sdiff.mpr ⟨?_, hzA⟩, Finset.mem_univ _⟩ + rcases hxy with hxy | ⟨hxy, hxylt⟩ + · rcases hyz with hyz | ⟨hyz, _⟩ + · exact mem_image.mpr ⟨y.1, mem_image.mpr ⟨x.1, hxS, hxy⟩, hyz⟩ + · exact False.elim (hzA (mem_image.mpr ⟨x.1, hxS, by + simpa only [hyz] using hxy⟩)) + · rcases hyz with hyz | ⟨hyz, hyzlt⟩ + · exact False.elim (hzA (mem_image.mpr ⟨x.1, hxS, by + simpa only [hxy] using hyz⟩)) + · apply False.elim + apply hzX + exact mem_image.mpr ⟨x, hxU, Or.inr ⟨hxy.trans hyz, lt_trans hxylt hyzlt⟩⟩ + +theorem blowup_fst_injOn_sdiff {r : V → V → Prop} {m : ℕ} + (U : Finset (V × Fin m)) : + Set.InjOn Prod.fst (↑(U \ image (blowup r m) U) : Set (V × Fin m)) := by + classical + intro p hp q hq hpq + apply Prod.ext hpq + by_contra hij + rcases lt_or_gt_of_ne hij with hij | hij + · apply (Finset.mem_sdiff.mp hq).2 + exact mem_image.mpr ⟨p, (Finset.mem_sdiff.mp hp).1, Or.inr ⟨hpq, hij⟩⟩ + · apply (Finset.mem_sdiff.mp hp).2 + exact mem_image.mpr ⟨q, (Finset.mem_sdiff.mp hq).1, Or.inr ⟨hpq.symm, hij⟩⟩ + +theorem blowup_source_sdiff_card_le {r : V → V → Prop} {m : ℕ} + (U : Finset (V × Fin m)) : + (U \ image (blowup r m) U).card ≤ Fintype.card V := by + classical + have hcard : (U \ image (blowup r m) U).card ≤ (Finset.univ : Finset V).card := by + apply Finset.card_le_card_of_injOn Prod.fst + · intro p hp + exact Finset.mem_univ _ + · exact blowup_fst_injOn_sdiff U + simpa only [Finset.card_univ] using hcard + +theorem card_add_card_lt_twice_of_sdiff {α : Type*} [DecidableEq α] + (U X Y : Finset α) + (h : (U \ X).card + (Y \ X).card < (X \ U).card) : + U.card + Y.card < 2 * X.card := by + have hUX := Finset.card_sdiff_add_card U X + have hXU := Finset.card_sdiff_add_card X U + rw [Finset.union_comm X U] at hXU + have hY : Y.card ≤ (Y \ X).card + X.card := + Finset.card_le_card_sdiff_add_card + omega + +theorem blowup_image_eq_univ_of_full_support {r : V → V → Prop} {m : ℕ} + (hi : PositiveIndegree r) (U : Finset (V × Fin m)) + (hS : U.image Prod.fst = Finset.univ) : image (blowup r m) U = Finset.univ := by + classical + apply Finset.eq_univ_of_forall + intro p + apply blowup_mem_image_of_mem_base_image U + obtain ⟨v, hv⟩ := hi p.1 + apply mem_image.mpr + refine ⟨v, ?_, hv⟩ + rw [hS] + exact Finset.mem_univ _ + +theorem blowup_strictSubsetGrowth {r : V → V → Prop} {m : ℕ} + (_hr : IsOriented r) (hi : PositiveIndegree r) (hd : SubsetDeficit r) + (hm : Fintype.card V < m) : StrictSubsetGrowth (blowup r m) := by + classical + intro U hU hUproper + by_cases hS : U.image Prod.fst = Finset.univ + · have hX := blowup_image_eq_univ_of_full_support hi U hS + have hUcard : U.card < (Finset.univ : Finset (V × Fin m)).card := by + apply Finset.card_lt_card + exact Finset.ssubset_iff_subset_ne.mpr ⟨Finset.subset_univ _, hUproper⟩ + have hYcard : (image (blowup r m) (image (blowup r m) U)).card ≤ + (Finset.univ : Finset (V × Fin m)).card := + Finset.card_le_card (Finset.subset_univ _) + simp only [hX] at hYcard ⊢ + omega + · have hSne : (U.image Prod.fst).Nonempty := by + obtain ⟨p, hp⟩ := hU + exact ⟨p.1, Finset.mem_image.mpr ⟨p, hp, rfl⟩⟩ + have hdef := hd (U.image Prod.fst) hSne hS + have hgain : + (image (blowup r m) (image (blowup r m) U) \ image (blowup r m) U).card ≤ + (image r (image r (U.image Prod.fst)) \ image r (U.image Prod.fst)).card * m := by + simpa only [Finset.product_eq_sprod, Finset.card_product, Finset.card_univ, + Fintype.card_fin] using + (Finset.card_le_card (blowup_second_sdiff_subset (r := r) U)) + have hloss : + (image r (U.image Prod.fst) \ U.image Prod.fst).card * m ≤ + (image (blowup r m) U \ U).card := by + simpa only [Finset.product_eq_sprod, Finset.card_product, Finset.card_univ, + Fintype.card_fin] using + (Finset.card_le_card (blowup_boundary_product_subset (r := r) U)) + have hsource := blowup_source_sdiff_card_le (r := r) U + have hamp : + (image r (image r (U.image Prod.fst)) \ image r (U.image Prod.fst)).card * m + m ≤ + (image r (U.image Prod.fst) \ U.image Prod.fst).card * m := by + have hstep : + ((image r (image r (U.image Prod.fst)) \ image r (U.image Prod.fst)).card + 1) * m ≤ + (image r (U.image Prod.fst) \ U.image Prod.fst).card * m := + Nat.mul_le_mul_right m (Nat.succ_le_of_lt hdef) + simpa only [Nat.add_mul, Nat.one_mul] using hstep + apply card_add_card_lt_twice_of_sdiff + omega + +end SeymourSecondNeighborhood + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/Basic.lean b/lean/OAI/Combinatorics/Sensitivity/Basic.lean new file mode 100644 index 0000000000000000000000000000000000000000..d0f3ef3b55bd724a14c6fb613f06f7fcfc932ffe --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/Basic.lean @@ -0,0 +1,183 @@ +import OAI.Combinatorics.Sensitivity.Model + +namespace OAI + +/-! Finite Boolean flips and the exact maximum/witness interfaces for sensitivity. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +variable {I J K : Type} + +@[simp] theorem flip_empty (x : I → Bool) : flip x ∅ = x := by + funext i + simp [flip] + +@[simp] theorem flip_singleton_self (x : I → Bool) (i : I) : + flip x {i} i = !(x i) := by + simp [flip] + +theorem flip_singleton_other (x : I → Bool) {i j : I} (h : j ≠ i) : + flip x {i} j = x j := by + simp [flip, h] + +@[simp] theorem flip_flip (x : I → Bool) (B : Finset I) : flip (flip x B) B = x := by + funext i + by_cases h : i ∈ B <;> simp [flip, h] + +theorem flip_insert (x : I → Bool) (i : I) (B : Finset I) (hi : i ∉ B) : + flip x (insert i B) = flip (flip x B) {i} := by + funext j + by_cases hji : j = i + · subst j + simp [flip, hi] + · simp [flip, hji] + +theorem flip_prod_same (x : J × I → Bool) (j : J) (i : I) : + (fun a => flip x {(j, i)} (j, a)) = flip (fun a => x (j, a)) {i} := by + funext a + simp [flip] + +theorem flip_prod_other (x : J × I → Bool) {j k : J} (i : I) (hk : k ≠ j) : + (fun a => flip x {(j, i)} (k, a)) = fun a => x (k, a) := by + funext a + simp [flip, hk] + +@[simp] theorem flip_false (B : Finset I) (i : I) : + flip (fun _ => false) B i = decide (i ∈ B) := by + by_cases h : i ∈ B <;> simp [flip, h] + +section Finite + +variable [Fintype I] + +theorem flip_differences (x y : I → Bool) : + flip x (Finset.univ.filter fun i => x i ≠ y i) = y := by + funext i + cases hx : x i <;> cases hy : y i <;> simp [flip, hx, hy] + +theorem sensitivityAt_le_card (f : (I → Bool) → Bool) (x : I → Bool) : + sensitivityAt f x ≤ Fintype.card I := + Finset.card_le_card (Finset.filter_subset _ _) + +theorem sensitivityAt_le_sensitivity (f : (I → Bool) → Bool) (x : I → Bool) : + sensitivityAt f x ≤ sensitivity f := + Finset.le_sup (Finset.mem_univ x) + +theorem sensitivity_le (f : (I → Bool) → Bool) {n : ℕ} + (h : ∀ x, sensitivityAt f x ≤ n) : sensitivity f ≤ n := + Finset.sup_le fun x _ => h x + +theorem sensitivityAt_eq_zero_iff (f : (I → Bool) → Bool) (x : I → Bool) : + sensitivityAt f x = 0 ↔ ∀ i, f (flip x {i}) = f x := by + simp [sensitivityAt, Finset.card_eq_zero, Finset.filter_eq_empty_iff] + +theorem sensitivityAt_pos (f : (I → Bool) → Bool) (x : I → Bool) (i : I) + (hi : f (flip x {i}) ≠ f x) : 0 < sensitivityAt f x := + Finset.card_pos.mpr ⟨i, Finset.mem_filter.mpr ⟨Finset.mem_univ _, hi⟩⟩ + +theorem exists_sensitivityAt_eq (f : (I → Bool) → Bool) : + ∃ x, sensitivityAt f x = sensitivity f := by + obtain ⟨x, _, hx⟩ := Finset.exists_mem_eq_sup + (Finset.univ : Finset (I → Bool)) (by simp) (sensitivityAt f) + exact ⟨x, hx.symm⟩ + +theorem blockSensitivityAt_le_blockSensitivity (f : (I → Bool) → Bool) (x : I → Bool) : + blockSensitivityAt f x ≤ blockSensitivity f := + Finset.le_sup (Finset.mem_univ x) + +theorem blockSensitivity_le (f : (I → Bool) → Bool) {n : ℕ} + (h : ∀ x, blockSensitivityAt f x ≤ n) : blockSensitivity f ≤ n := + Finset.sup_le fun x _ => h x + +theorem le_blockSensitivityAt (f : (I → Bool) → Bool) (x : I → Bool) + (blocks : Finset (Finset I)) + (hd : ∀ A ∈ blocks, ∀ B ∈ blocks, A ≠ B → Disjoint A B) + (hb : ∀ B ∈ blocks, B.Nonempty ∧ f (flip x B) ≠ f x) : + blocks.card ≤ blockSensitivityAt f x := by + have h := Finset.le_sup (s := (Finset.univ : Finset (Finset (Finset I)))) + (f := fun blocks => + if (∀ A ∈ blocks, ∀ B ∈ blocks, A ≠ B → Disjoint A B) ∧ + (∀ B ∈ blocks, B.Nonempty ∧ f (flip x B) ≠ f x) + then blocks.card else 0) (Finset.mem_univ blocks) + have hv : (∀ A ∈ blocks, ∀ B ∈ blocks, A ≠ B → Disjoint A B) ∧ + (∀ B ∈ blocks, B.Nonempty ∧ f (flip x B) ≠ f x) := ⟨hd, hb⟩ + simpa only [blockSensitivityAt, ite_eq_left hv] using h + +theorem blockSensitivityAt_le (f : (I → Bool) → Bool) (x : I → Bool) {n : ℕ} + (h : ∀ blocks : Finset (Finset I), + (∀ A ∈ blocks, ∀ B ∈ blocks, A ≠ B → Disjoint A B) → + (∀ B ∈ blocks, B.Nonempty ∧ f (flip x B) ≠ f x) → blocks.card ≤ n) : + blockSensitivityAt f x ≤ n := by + apply Finset.sup_le + intro blocks _ + split_ifs with hb + · exact h blocks hb.1 hb.2 + · exact Nat.zero_le _ + +theorem exists_blockSensitivityAt_family (f : (I → Bool) → Bool) (x : I → Bool) : + ∃ blocks : Finset (Finset I), blocks.card = blockSensitivityAt f x ∧ + (∀ A ∈ blocks, ∀ B ∈ blocks, A ≠ B → Disjoint A B) ∧ + (∀ B ∈ blocks, B.Nonempty ∧ f (flip x B) ≠ f x) := by + obtain ⟨blocks, _, hb⟩ := Finset.exists_mem_eq_sup + (Finset.univ : Finset (Finset (Finset I))) (by simp) + (fun blocks => + if (∀ A ∈ blocks, ∀ B ∈ blocks, A ≠ B → Disjoint A B) ∧ + (∀ B ∈ blocks, B.Nonempty ∧ f (flip x B) ≠ f x) + then blocks.card else 0) + by_cases hv : (∀ A ∈ blocks, ∀ B ∈ blocks, A ≠ B → Disjoint A B) ∧ + (∀ B ∈ blocks, B.Nonempty ∧ f (flip x B) ≠ f x) + · exact ⟨blocks, by simpa only [blockSensitivityAt, ite_eq_left hv] using hb.symm, hv⟩ + · have hz : blockSensitivityAt f x = 0 := by + simpa only [blockSensitivityAt, ite_eq_right hv] using hb + exact ⟨∅, by simp [hz], by simp, by simp⟩ + +theorem le_blockSensitivityAt_of_family [Fintype K] + (f : (I → Bool) → Bool) (x : I → Bool) (blocks : K → Finset I) + (hne : ∀ k, (blocks k).Nonempty) + (hd : Pairwise fun k l => Disjoint (blocks k) (blocks l)) + (hb : ∀ k, f (flip x (blocks k)) ≠ f x) : + Fintype.card K ≤ blockSensitivityAt f x := by + have hinj : Function.Injective blocks := by + intro k l hkl + by_contra hnekl + obtain ⟨i, hi⟩ := hne k + exact Finset.disjoint_left.mp (hd hnekl) hi (by simpa [← hkl] using hi) + have hcard := le_blockSensitivityAt f x (Finset.univ.image blocks) + (by + intro A hA B hB hAB + obtain ⟨k, _, rfl⟩ := Finset.mem_image.mp hA + obtain ⟨l, _, rfl⟩ := Finset.mem_image.mp hB + exact hd (fun h => hAB (congrArg blocks h))) + (by + intro B hB + obtain ⟨k, _, rfl⟩ := Finset.mem_image.mp hB + exact ⟨hne k, hb k⟩) + simpa only [Finset.card_image_of_injective _ hinj, Finset.card_univ] using hcard + +theorem eq_of_singleton_invariant (f : (I → Bool) → Bool) + (h : ∀ x i, f (flip x {i}) = f x) (x y : I → Bool) : f x = f y := by + have hflip (B : Finset I) : f (flip x B) = f x := by + induction B using Finset.induction with + | empty => simp + | @insert i B hi ih => rw [flip_insert x i B hi, h, ih] + rw [← flip_differences x y, hflip] + +theorem sensitivity_pos_of_nonconstant (f : (I → Bool) → Bool) + (h : ∃ x y, f x ≠ f y) : 0 < sensitivity f := by + by_contra hn + have hz : sensitivity f = 0 := Nat.eq_zero_of_not_pos hn + have hi (x : I → Bool) (i : I) : f (flip x {i}) = f x := by + apply (sensitivityAt_eq_zero_iff f x).mp _ i + exact Nat.eq_zero_of_le_zero ((sensitivityAt_le_sensitivity f x).trans_eq hz) + obtain ⟨x, y, hxy⟩ := h + exact hxy (eq_of_singleton_invariant f hi x y) + +end Finite +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/ComparisonSequences.lean b/lean/OAI/Combinatorics/Sensitivity/ComparisonSequences.lean new file mode 100644 index 0000000000000000000000000000000000000000..49d6c99c7ee4b9123da8dcc0f45e78cd38943445 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/ComparisonSequences.lean @@ -0,0 +1,136 @@ +import OAI.Combinatorics.Sensitivity.ScalarBounds + +namespace OAI + +/-! Comparison sequences, a telescoping sum, and geometric estimates. -/ + +noncomputable section +open scoped BigOperators + +namespace Paper320 + +def comparisonPair (ε L : ℝ) : ℕ → ℝ × ℝ + | 0 => (L, 0) + | n + 1 => + let p := comparisonPair ε L n + ((1 + ε) * p.1 + 3 * p.2, ε * p.1 + 3 * p.2) + +def comparisonU (ε L : ℝ) (n : ℕ) : ℝ := (comparisonPair ε L n).1 +def comparisonV (ε L : ℝ) (n : ℕ) : ℝ := (comparisonPair ε L n).2 + +@[simp] theorem comparisonU_zero (ε L : ℝ) : comparisonU ε L 0 = L := rfl +@[simp] theorem comparisonV_zero (ε L : ℝ) : comparisonV ε L 0 = 0 := rfl +theorem comparisonU_succ (ε L : ℝ) (n : ℕ) : + comparisonU ε L (n + 1) = (1 + ε) * comparisonU ε L n + 3 * comparisonV ε L n := rfl +theorem comparisonV_succ (ε L : ℝ) (n : ℕ) : + comparisonV ε L (n + 1) = ε * comparisonU ε L n + 3 * comparisonV ε L n := rfl + +theorem comparison_nonneg {ε L : ℝ} (hε : 0 ≤ ε) (hL : 0 ≤ L) (n : ℕ) : + 0 ≤ comparisonU ε L n ∧ 0 ≤ comparisonV ε L n := by + induction n with + | zero => simpa using hL + | succ n ih => + obtain ⟨hu, hv⟩ := ih + rw [comparisonU_succ, comparisonV_succ] + constructor <;> positivity + +theorem profiles_le_comparison (d : ℕ) (u v : ℕ → ℝ) (ε L : ℝ) (hε : 0 ≤ ε) + (hu0 : u 0 ≤ L) (hv0 : v 0 ≤ 0) + (hu : ∀ n < d, u (n + 1) ≤ (1 + ε) * u n + 3 * v n) + (hv : ∀ n < d, v (n + 1) ≤ ε * u n + 3 * v n) : + ∀ n ≤ d, u n ≤ comparisonU ε L n ∧ v n ≤ comparisonV ε L n := by + intro n + induction n with + | zero => intro _; exact ⟨hu0, hv0⟩ + | succ n ih => + intro hn + obtain ⟨hun, hvn⟩ := ih (by omega) + rw [comparisonU_succ, comparisonV_succ] + constructor + · exact (hu n (by omega)).trans + (add_le_add (mul_le_mul_of_nonneg_left hun (by linarith)) + (mul_le_mul_of_nonneg_left hvn (by norm_num))) + · exact (hv n (by omega)).trans + (add_le_add (mul_le_mul_of_nonneg_left hun hε) + (mul_le_mul_of_nonneg_left hvn (by norm_num))) + +theorem comparison_bounds (d : ℕ) (ε L : ℝ) + (hε : 0 ≤ ε) (hL : 0 ≤ L) (hbudget : ε * 3 ^ (d + 1) ≤ 2) : + ∀ n ≤ d, comparisonU ε L n ≤ 2 * L ∧ + comparisonV ε L n ≤ ε * L * (3 ^ n - 1) := by + apply coupled_profiles_bound d (comparisonU ε L) (comparisonV ε L) ε L hε hL hbudget + · exact le_rfl + · exact le_rfl + · intro n _; exact le_rfl + · intro n _; exact le_rfl + +theorem comparisonU_sum (ε L : ℝ) (n : ℕ) : + comparisonU ε L n = L + ∑ j ∈ Finset.range n, + (ε * comparisonU ε L j + 3 * comparisonV ε L j) := by + induction n with + | zero => simp + | succ n ih => + rw [comparisonU_succ, Finset.sum_range_succ] + linarith + +theorem geometric_sum_sub_one (n : ℕ) : + (∑ j ∈ Finset.range n, ((3 : ℝ) ^ j - 1)) = (3 ^ n - 1) / 2 - n := by + induction n with + | zero => norm_num + | succ n ih => + rw [Finset.sum_range_succ, ih, pow_succ] + push_cast + ring + +theorem comparisonU_sum_bound {d n : ℕ} (hn : n ≤ d) {ε L : ℝ} + (hε : 0 ≤ ε) (hL : 0 ≤ L) (hbudget : ε * 3 ^ (d + 1) ≤ 2) : + comparisonU ε L n ≤ L + 2 * ε * L * n + + 3 * ε * L * ∑ j ∈ Finset.range n, ((3 : ℝ) ^ j - 1) := by + rw [comparisonU_sum] + have hs : (∑ j ∈ Finset.range n, + (ε * comparisonU ε L j + 3 * comparisonV ε L j)) ≤ + ∑ j ∈ Finset.range n, (2 * ε * L + 3 * ε * L * (3 ^ j - 1)) := by + apply Finset.sum_le_sum + intro j hj + obtain ⟨hu, hv⟩ := comparison_bounds d ε L hε hL hbudget j + (Nat.le_of_lt (lt_of_lt_of_le (Finset.mem_range.mp hj) hn)) + nlinarith [mul_le_mul_of_nonneg_left hu hε] + calc + _ ≤ L + ∑ j ∈ Finset.range n, (2 * ε * L + 3 * ε * L * (3 ^ j - 1)) := by linarith + _ = _ := by + rw [Finset.sum_add_distrib] + simp only [Finset.sum_const, Finset.card_range, nsmul_eq_mul] + rw [← Finset.mul_sum] + ring + +theorem comparisonU_refined {d n : ℕ} (hn : n ≤ d) {ε L : ℝ} + (hε : 0 ≤ ε) (hL : 0 ≤ L) (hbudget : ε * 3 ^ (d + 1) ≤ 2) : + comparisonU ε L n ≤ L + ε * L * ((3 / 2 : ℝ) * (3 ^ n - 1) - n) := by + have h := comparisonU_sum_bound hn hε hL hbudget + rw [geometric_sum_sub_one] at h + nlinarith + +theorem refined_error_lt_one {d n : ℕ} (hn : n ≤ d) {ε : ℝ} + (hε : 0 ≤ ε) (hbudget : ε * 3 ^ (d + 1) ≤ 2) : + ε * ((3 / 2 : ℝ) * (3 ^ n - 1) - n) < 1 := by + have hp : (3 : ℝ) ^ (n + 1) ≤ 3 ^ (d + 1) := + pow_le_pow_right₀ (by norm_num) (Nat.succ_le_succ hn) + have hb := (mul_le_mul_of_nonneg_left hp hε).trans hbudget + rw [pow_succ] at hb + rcases eq_or_lt_of_le hε with he | he + · rw [← he]; norm_num + · have hnn : 0 ≤ (n : ℝ) := Nat.cast_nonneg n + nlinarith [mul_nonneg hε hnn] + +theorem comparisonU_lt_two {d n : ℕ} (hn : n ≤ d) {ε L : ℝ} + (hε : 0 ≤ ε) (hL : 0 < L) (hbudget : ε * 3 ^ (d + 1) ≤ 2) : + comparisonU ε L n < 2 * L := by + have h := comparisonU_refined hn hε hL.le hbudget + have he := mul_lt_mul_of_pos_right (refined_error_lt_one hn hε hbudget) hL + nlinarith + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/Composition.lean b/lean/OAI/Combinatorics/Sensitivity/Composition.lean new file mode 100644 index 0000000000000000000000000000000000000000..8e3c4d691b2798053708cf2d7a7e51eaf3b7e6ed --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/Composition.lean @@ -0,0 +1,144 @@ +import OAI.Combinatorics.Sensitivity.Basic + +namespace OAI + +/-! Disjoint Boolean composition, with each child retaining its own raw coordinates. -/ + +noncomputable section +open scoped Classical BigOperators + +namespace Paper320 + +variable {I J : Type} + +def compose (f : (I → Bool) → Bool) (g : (J → Bool) → Bool) : + (I × J → Bool) → Bool := + fun x => f (fun i => g (fun j => x (i, j))) + +theorem compose_flip_sensitive_iff (f : (I → Bool) → Bool) (g : (J → Bool) → Bool) + (x : I × J → Bool) (i : I) (j : J) : + compose f g (flip x {(i, j)}) ≠ compose f g x ↔ + g (flip (fun a => x (i, a)) {j}) ≠ g (fun a => x (i, a)) ∧ + f (flip (fun k => g (fun a => x (k, a))) {i}) ≠ + f (fun k => g (fun a => x (k, a))) := by + by_cases hg : g (flip (fun a => x (i, a)) {j}) = g (fun a => x (i, a)) + · have he : (fun k => g (fun a => flip x {(i, j)} (k, a))) = + fun k => g (fun a => x (k, a)) := by + funext k + by_cases hk : k = i + · subst k + rw [flip_prod_same, hg] + · rw [flip_prod_other x j hk] + simp only [compose, he, ne_eq, not_true_eq_false, hg, false_and] + · have hn : g (flip (fun a => x (i, a)) {j}) = !(g (fun a => x (i, a))) := by + cases h₁ : g (flip (fun a => x (i, a)) {j}) <;> + cases h₂ : g (fun a => x (i, a)) <;> simp_all + have he : (fun k => g (fun a => flip x {(i, j)} (k, a))) = + flip (fun k => g (fun a => x (k, a))) {i} := by + funext k + by_cases hk : k = i + · subst k + rw [flip_prod_same, flip_singleton_self, hn] + · rw [flip_prod_other x j hk, flip_singleton_other _ hk] + simp only [compose, he, ne_eq, hg, not_false_eq_true, true_and] + +theorem compose_zero (f : (I → Bool) → Bool) (g : (J → Bool) → Bool) + (hg : g (fun _ => false) = false) : + compose f g (fun _ => false) = f (fun _ => false) := by + simp [compose, hg] + +theorem compose_flip_product_zero (f : (I → Bool) → Bool) (g : (J → Bool) → Bool) + (C : Finset I) (D : Finset J) (hg : g (fun _ => false) = false) + (hD : g (flip (fun _ => false) D) ≠ g (fun _ => false)) : + compose f g (flip (fun _ => false) (C ×ˢ D)) = f (flip (fun _ => false) C) := by + have hD' : g (flip (fun _ => false) D) = true := by + cases he : g (flip (fun _ => false) D) <;> simp_all + apply congrArg f + funext i + by_cases hi : i ∈ C + · have he : (fun j => flip (fun _ => false) (C ×ˢ D) (i, j)) = + flip (fun _ => false) D := by + funext j + simp [flip, hi] + rw [he, hD'] + simp [flip, hi] + · have he : (fun j => flip (fun _ => false) (C ×ˢ D) (i, j)) = + fun _ => false := by + funext j + simp [flip, hi] + rw [he, hg] + simp [flip, hi] + +section Finite +variable [Fintype I] [Fintype J] + +theorem sensitivityAt_compose (f : (I → Bool) → Bool) (g : (J → Bool) → Bool) + (x : I × J → Bool) : + sensitivityAt (compose f g) x = + ∑ i ∈ Finset.univ.filter (fun i => + f (flip (fun k => g (fun a => x (k, a))) {i}) ≠ + f (fun k => g (fun a => x (k, a)))), + sensitivityAt g (fun a => x (i, a)) := by + simp only [sensitivityAt, Finset.card_eq_sum_ones, Finset.sum_filter, + compose_flip_sensitive_iff, Fintype.sum_prod_type] + apply Finset.sum_congr rfl + intro i _ + by_cases hi : f (flip (fun k => g (fun a => x (k, a))) {i}) ≠ + f (fun k => g (fun a => x (k, a))) + · simp [hi] + · simp [hi] + +theorem sensitivity_compose_le (f : (I → Bool) → Bool) (g : (J → Bool) → Bool) : + sensitivity (compose f g) ≤ sensitivity f * sensitivity g := by + apply sensitivity_le + intro x + rw [sensitivityAt_compose] + calc + _ ≤ ∑ i ∈ Finset.univ.filter (fun i => + f (flip (fun k => g (fun a => x (k, a))) {i}) ≠ + f (fun k => g (fun a => x (k, a)))), sensitivity g := + Finset.sum_le_sum fun i _ => sensitivityAt_le_sensitivity g _ + _ = sensitivityAt f (fun k => g (fun a => x (k, a))) * sensitivity g := by + simp [sensitivityAt] + _ ≤ sensitivity f * sensitivity g := + Nat.mul_le_mul_right _ (sensitivityAt_le_sensitivity f _) + +theorem blockSensitivityAt_compose_zero_le (f : (I → Bool) → Bool) + (g : (J → Bool) → Bool) (hg : g (fun _ => false) = false) : + blockSensitivityAt f (fun _ => false) * blockSensitivityAt g (fun _ => false) ≤ + blockSensitivityAt (compose f g) (fun _ => false) := by + obtain ⟨S, hS, hdS, hbS⟩ := exists_blockSensitivityAt_family f (fun _ => false) + obtain ⟨T, hT, hdT, hbT⟩ := exists_blockSensitivityAt_family g (fun _ => false) + have h := le_blockSensitivityAt_of_family (compose f g) (fun _ => false) + (fun p : S × T => p.1.val ×ˢ p.2.val) + (by + intro p + obtain ⟨i, hi⟩ := (hbS p.1.val p.1.property).1 + obtain ⟨j, hj⟩ := (hbT p.2.val p.2.property).1 + exact ⟨(i, j), Finset.mem_product.mpr ⟨hi, hj⟩⟩) + (by + intro p q hpq + apply Finset.disjoint_left.mpr + intro a ha hq + obtain ⟨ha₁, ha₂⟩ := Finset.mem_product.mp ha + obtain ⟨hq₁, hq₂⟩ := Finset.mem_product.mp hq + by_cases hs : p.1 = q.1 + · have ht : p.2.val ≠ q.2.val := by + intro h + exact hpq (Prod.ext hs (Subtype.ext h)) + exact Finset.disjoint_left.mp (hdT _ p.2.property _ q.2.property ht) ha₂ hq₂ + · have hs' : p.1.val ≠ q.1.val := fun h => hs (Subtype.ext h) + exact Finset.disjoint_left.mp (hdS _ p.1.property _ q.1.property hs') ha₁ hq₁) + (by + intro p + rw [compose_flip_product_zero f g _ _ hg (hbT p.2.val p.2.property).2, + compose_zero f g hg] + exact (hbS p.1.val p.1.property).2) + simpa only [Fintype.card_prod, Fintype.card_coe, hS, hT] using h + +end Finite +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/CompositionFamilies.lean b/lean/OAI/Combinatorics/Sensitivity/CompositionFamilies.lean new file mode 100644 index 0000000000000000000000000000000000000000..829e035e729ebb46041cd6bb063d0ef0b7e2d3af --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/CompositionFamilies.lean @@ -0,0 +1,58 @@ +import OAI.Combinatorics.Sensitivity.Composition + +namespace OAI + +/-! The Cartesian block construction works for arbitrary sensitive families. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +variable {I J K L : Type} + +theorem compose_block_family (f : (I → Bool) → Bool) (g : (J → Bool) → Bool) + (hg : g (fun _ => false) = false) (C : K → Finset I) (D : L → Finset J) + (hC : ∀ k, (C k).Nonempty) (hD : ∀ l, (D l).Nonempty) + (hdC : Pairwise fun k k' => Disjoint (C k) (C k')) + (hdD : Pairwise fun l l' => Disjoint (D l) (D l')) + (hfC : ∀ k, f (flip (fun _ => false) (C k)) ≠ f (fun _ => false)) + (hgD : ∀ l, g (flip (fun _ => false) (D l)) ≠ g (fun _ => false)) : + (∀ p : K × L, (C p.1 ×ˢ D p.2).Nonempty) ∧ + (Pairwise fun p q : K × L => Disjoint (C p.1 ×ˢ D p.2) (C q.1 ×ˢ D q.2)) ∧ + (∀ p : K × L, + compose f g (flip (fun _ => false) (C p.1 ×ˢ D p.2)) ≠ + compose f g (fun _ => false)) := by + refine ⟨?_, ?_, ?_⟩ + · intro p + obtain ⟨i, hi⟩ := hC p.1 + obtain ⟨j, hj⟩ := hD p.2 + exact ⟨(i, j), Finset.mem_product.mpr ⟨hi, hj⟩⟩ + · intro p q hpq + apply Finset.disjoint_product.mpr + by_cases h : p.1 = q.1 + · exact Or.inr (hdD (fun h' => hpq (Prod.ext h h'))) + · exact Or.inl (hdC h) + · intro p + rw [compose_flip_product_zero f g _ _ hg (hgD p.2), compose_zero f g hg] + exact hfC p.1 + +theorem compose_block_family_card [Fintype I] [Fintype J] [Fintype K] [Fintype L] + (f : (I → Bool) → Bool) (g : (J → Bool) → Bool) + (hg : g (fun _ => false) = false) (C : K → Finset I) (D : L → Finset J) + (hC : ∀ k, (C k).Nonempty) (hD : ∀ l, (D l).Nonempty) + (hdC : Pairwise fun k k' => Disjoint (C k) (C k')) + (hdD : Pairwise fun l l' => Disjoint (D l) (D l')) + (hfC : ∀ k, f (flip (fun _ => false) (C k)) ≠ f (fun _ => false)) + (hgD : ∀ l, g (flip (fun _ => false) (D l)) ≠ g (fun _ => false)) : + Fintype.card K * Fintype.card L ≤ blockSensitivityAt (compose f g) (fun _ => false) := by + obtain ⟨hne, hd, hb⟩ := compose_block_family f g hg C D hC hD hdC hdD hfC hgD + simpa only [Fintype.card_prod] using + le_blockSensitivityAt_of_family (compose f g) (fun _ => false) + (fun p : K × L => C p.1 ×ˢ D p.2) hne hd hb + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/ConstructedSeed.lean b/lean/OAI/Combinatorics/Sensitivity/ConstructedSeed.lean new file mode 100644 index 0000000000000000000000000000000000000000..2f3a45da8bf2f87633e7938f4b46a13006446f0f --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/ConstructedSeed.lean @@ -0,0 +1,47 @@ +import OAI.Combinatorics.Sensitivity.Construction +import OAI.Combinatorics.Sensitivity.Labeling +import OAI.Combinatorics.Sensitivity.ParameterBounds +import OAI.Combinatorics.Sensitivity.Iterates + +namespace OAI + +/-! All construction parameters and labels are supplied unconditionally. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +theorem construction_label_count_pos {M : ℕ} (hM : 0 < M) : + 0 < Nat.ceil (Real.sqrt (M : ℝ)) := by + have h := le_ceil_sqrt_sq M + by_contra hn + have he : Nat.ceil (Real.sqrt (M : ℝ)) = 0 := by omega + rw [he] at h + norm_num at h + omega + +theorem exists_constructed_seed (d M : ℕ) (hd : 1 ≤ d) (hM : 9 ^ (d + 1) ≤ M) : + ∃ f : (Fin (constructionDimension d M (Nat.ceil (Real.sqrt (M : ℝ)))) → Bool) → Bool, + 0 < constructionDimension d M (Nat.ceil (Real.sqrt (M : ℝ))) ∧ + f (fun _ => false) = false ∧ (∃ x y, f x ≠ f y) ∧ + sensitivity f ≤ 2 * (d + 2) * M ^ (d + 1) ∧ + M ^ 2 * (2 * M ^ 2 + 1) ^ d ≤ blockSensitivityAt f (fun _ => false) := by + have h81 := parameter_ge_eighty_one hd hM + have hMp : 0 < M := by omega + have hr := construction_label_count_pos hMp + obtain ⟨A⟩ := regular_goodLabeling_exists (show 3 ≤ M by omega) + let f := finalWitness d (regularCyclicTournament M) A + have hs := finalWitness_sensitivity d (regularCyclicTournament M) A hMp hr + (parameter_epsilon_budget hd hM) + have hb := finalWitness_blockSensitivity d (regularCyclicTournament M) A hr + have hbp : 0 < M ^ 2 * (2 * M ^ 2 + 1) ^ d := by positivity + have hnc := nonconstant_of_blockSensitivityAt_pos f (fun _ => false) (hbp.trans_le hb) + exact ⟨f, constructionDimension_pos hMp hr, + finalWitness_zero d (regularCyclicTournament M) A hr, hnc, hs, hb⟩ + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/Construction.lean b/lean/OAI/Combinatorics/Sensitivity/Construction.lean new file mode 100644 index 0000000000000000000000000000000000000000..7cb1662306d4d0561cb42bf8c92cde9c4321f845 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/Construction.lean @@ -0,0 +1,172 @@ +import OAI.Combinatorics.Sensitivity.InitialPredicates +import OAI.Combinatorics.Sensitivity.TowerProfiles +import OAI.Combinatorics.Sensitivity.QuantitativeProfiles +import OAI.Combinatorics.Sensitivity.Or +import OAI.Combinatorics.Sensitivity.Reindex + +namespace OAI + +/-! The initial family, recursively constructed predicates, and final OR. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +def constructionBase (d M : ℕ) := baseExtension (d + 1) (initialFamily d M) + +abbrev ConstructionCoordinates (d M r n : ℕ) := + TowerCoordinates (2 * M ^ 2 + 1) r (Fin M × Fin (d + 2)) n + +def terminalPredicate {M r : ℕ} (d : ℕ) (T : RegularTournament M) + (A : GoodLabeling T.toTournament r) : (ConstructionCoordinates d M r d → Bool) → Bool := + towerFamily T.toTournament A.label (constructionBase d M) d 1 0 + +theorem construction_base_nested (d M : ℕ) : + NestedFamily (constructionBase d M (d + 1)) := by + simpa only [constructionBase, baseExtension_same] using initialFamily_nested d M + +theorem construction_base_zero (d M : ℕ) : + ∀ q, constructionBase d M (1 + d) q (fun _ => false) = false := by + rw [Nat.add_comm 1 d] + simpa only [constructionBase, baseExtension_same] using initialFamily_zero d M + +theorem construction_base_blocks (d M : ℕ) : + ∀ b q, constructionBase d M (1 + d) q + (flip (fun _ => false) (baseBlock b)) = true := by + rw [Nat.add_comm 1 d] + intro b q + simpa only [constructionBase, baseExtension_same] using initialFamily_baseBlock d M q b + +theorem terminalPredicate_zero {M r : ℕ} (d : ℕ) (T : RegularTournament M) + (A : GoodLabeling T.toTournament r) (hr : 0 < r) : + terminalPredicate d T A (fun _ => false) = false := + towerFamily_zero T.toTournament A.label (constructionBase d M) hr d 1 + (construction_base_zero d M) 0 + +theorem terminalPredicate_blocks {M r : ℕ} (d : ℕ) (T : RegularTournament M) + (A : GoodLabeling T.toTournament r) (hr : 0 < r) + (b : TowerBlockIndex (2 * M ^ 2 + 1) (Fin M) d) : + terminalPredicate d T A (flip (fun _ => false) + (towerBlocks (r := r) (baseBlock (L := d + 2)) d b)) = true := + towerFamily_blocks T.toTournament A.label (constructionBase d M) + (baseBlock (L := d + 2)) hr d 1 (construction_base_zero d M) + (construction_base_blocks d M) b 0 + +theorem terminalPredicate_blockSensitivity {M r : ℕ} (d : ℕ) + (T : RegularTournament M) (A : GoodLabeling T.toTournament r) (hr : 0 < r) : + M * (2 * M ^ 2 + 1) ^ d ≤ blockSensitivityAt (terminalPredicate d T A) (fun _ => false) := by + have h := le_blockSensitivityAt_of_family (terminalPredicate d T A) (fun _ => false) + (towerBlocks (r := r) (baseBlock (L := d + 2)) d) + (towerBlocks_nonempty (baseBlock (L := d + 2)) hr + (baseBlock_nonempty (by omega)) d) + (towerBlocks_pairwise (baseBlock (L := d + 2)) baseBlock_disjoint d) + (fun b => by rw [terminalPredicate_blocks d T A hr, terminalPredicate_zero d T A hr]; decide) + simpa only [tower_block_index_card, Fintype.card_fin, Nat.mul_comm] using h + +theorem construction_profiles {M r : ℕ} (d : ℕ) (T : RegularTournament M) + (A : GoodLabeling T.toTournament r) (hM : 0 < M) (hr : 0 < r) + (hbudget : ((max r 16 : ℕ) : ℝ) / M * 3 ^ (d + 1) ≤ 2) : + ∀ n ≤ d, + towerSide T.toTournament A.label (constructionBase d M) (d + 1) n false ≤ + 2 * (d + 2) * M ^ n ∧ + towerSide T.toTournament A.label (constructionBase d M) (d + 1) n true ≤ + 2 * (d + 2) * M ^ (n + 1) := by + have hstep (n : ℕ) (hn : n < d) := tower_four_recurrences T A (constructionBase d M) + (d + 1) n (by omega) hr (construction_base_nested d M) + apply quantitative_profile_bounds d (d + 2) M r hM hbudget + (towerSide T.toTournament A.label (constructionBase d M) (d + 1)) + (towerJoint T.toTournament A.label (constructionBase d M) (d + 1)) + · simpa only [towerSide_zero, constructionBase, baseExtension_same] using initialFamily_side_zero d M + · simpa only [towerSide_zero, constructionBase, baseExtension_same] using initialFamily_side_one d M + · simpa only [towerJoint_zero, constructionBase, baseExtension_same] using initialFamily_joint d M false + · simpa only [towerJoint_zero, constructionBase, baseExtension_same] using initialFamily_joint d M true + · exact fun n hn => (hstep n hn).2.2.1 + · exact fun n hn => (hstep n hn).1 + · exact fun n hn => (hstep n hn).2.2.2 + · exact fun n hn => (hstep n hn).2.1 + +theorem terminalPredicate_sensitivityAt {M r : ℕ} (d : ℕ) (T : RegularTournament M) + (A : GoodLabeling T.toTournament r) (hM : 0 < M) (hr : 0 < r) + (hbudget : ((max r 16 : ℕ) : ℝ) / M * 3 ^ (d + 1) ≤ 2) : + (∀ x, terminalPredicate d T A x = false → + sensitivityAt (terminalPredicate d T A) x ≤ 2 * (d + 2) * M ^ d) ∧ + (∀ x, terminalPredicate d T A x = true → + sensitivityAt (terminalPredicate d T A) x ≤ 2 * (d + 2) * M ^ (d + 1)) := by + have hs := construction_profiles d T A hM hr hbudget d (le_refl d) + have he : d + 1 - d = 1 := by omega + simp only [towerSide] at hs + rw [he] at hs + exact ⟨fun x hx => (sensitivityAt_le_sideSensitivity _ false 0 x hx).trans hs.1, + fun x hx => (sensitivityAt_le_sideSensitivity _ true 0 x hx).trans hs.2⟩ + +def finalBoolean {M r : ℕ} (d : ℕ) (T : RegularTournament M) + (A : GoodLabeling T.toTournament r) : (Fin M × ConstructionCoordinates d M r d → Bool) → Bool := + orCopies (K := Fin M) (terminalPredicate d T A) + +theorem finalBoolean_zero {M r : ℕ} (d : ℕ) (T : RegularTournament M) + (A : GoodLabeling T.toTournament r) (hr : 0 < r) : + finalBoolean d T A (fun _ => false) = false := + orCopies_zero _ (terminalPredicate_zero d T A hr) + +theorem finalBoolean_sensitivity {M r : ℕ} (d : ℕ) (T : RegularTournament M) + (A : GoodLabeling T.toTournament r) (hM : 0 < M) (hr : 0 < r) + (hbudget : ((max r 16 : ℕ) : ℝ) / M * 3 ^ (d + 1) ≤ 2) : + sensitivity (finalBoolean d T A) ≤ 2 * (d + 2) * M ^ (d + 1) := by + obtain ⟨h₀, h₁⟩ := terminalPredicate_sensitivityAt d T A hM hr hbudget + have h := sensitivity_orCopies_le (K := Fin M) (terminalPredicate d T A) _ _ h₀ h₁ + have he : M * (2 * (d + 2) * M ^ d) = 2 * (d + 2) * M ^ (d + 1) := by ring + simpa only [finalBoolean, Fintype.card_fin, he, max_self] using h + +theorem finalBoolean_blockSensitivity {M r : ℕ} (d : ℕ) (T : RegularTournament M) + (A : GoodLabeling T.toTournament r) (hr : 0 < r) : + M ^ 2 * (2 * M ^ 2 + 1) ^ d ≤ blockSensitivityAt (finalBoolean d T A) (fun _ => false) := by + have h := (Nat.mul_le_mul_left M (terminalPredicate_blockSensitivity d T A hr)).trans + (by simpa only [Fintype.card_fin] using + blockSensitivityAt_orCopies_zero (K := Fin M) _ (terminalPredicate_zero d T A hr)) + change M ^ 2 * (2 * M ^ 2 + 1) ^ d ≤ blockSensitivityAt + (orCopies (K := Fin M) (terminalPredicate d T A)) (fun _ => false) + calc + _ = M * (M * (2 * M ^ 2 + 1) ^ d) := by ring + _ ≤ _ := h + +def constructionDimension (d M r : ℕ) : ℕ := + (d + 2) * M ^ 2 * ((2 * M ^ 2 + 1) * r) ^ d + +theorem final_coordinates_card (d M r : ℕ) : + Fintype.card (Fin M × ConstructionCoordinates d M r d) = constructionDimension d M r := by + rw [Fintype.card_prod, tower_coordinates_card] + simp only [Fintype.card_prod, Fintype.card_fin, constructionDimension] + ring + +def finalWitness {M r : ℕ} (d : ℕ) (T : RegularTournament M) + (A : GoodLabeling T.toTournament r) : (Fin (constructionDimension d M r) → Bool) → Bool := + reindex (Fintype.equivFinOfCardEq (final_coordinates_card d M r)) (finalBoolean d T A) + +theorem finalWitness_zero {M r : ℕ} (d : ℕ) (T : RegularTournament M) + (A : GoodLabeling T.toTournament r) (hr : 0 < r) : + finalWitness d T A (fun _ => false) = false := finalBoolean_zero d T A hr + +theorem finalWitness_sensitivity {M r : ℕ} (d : ℕ) (T : RegularTournament M) + (A : GoodLabeling T.toTournament r) (hM : 0 < M) (hr : 0 < r) + (hbudget : ((max r 16 : ℕ) : ℝ) / M * 3 ^ (d + 1) ≤ 2) : + sensitivity (finalWitness d T A) ≤ 2 * (d + 2) * M ^ (d + 1) := by + rw [finalWitness, sensitivity_reindex] + exact finalBoolean_sensitivity d T A hM hr hbudget + +theorem finalWitness_blockSensitivity {M r : ℕ} (d : ℕ) (T : RegularTournament M) + (A : GoodLabeling T.toTournament r) (hr : 0 < r) : + M ^ 2 * (2 * M ^ 2 + 1) ^ d ≤ blockSensitivityAt (finalWitness d T A) (fun _ => false) := by + rw [finalWitness, blockSensitivityAt_reindex] + exact finalBoolean_blockSensitivity d T A hr + +theorem constructionDimension_pos {d M r : ℕ} (hM : 0 < M) (hr : 0 < r) : + 0 < constructionDimension d M r := by + unfold constructionDimension + positivity + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/DividedProfiles.lean b/lean/OAI/Combinatorics/Sensitivity/DividedProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..72d5edd1ecabd0a580164a03b0db055edd47d7c6 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/DividedProfiles.lean @@ -0,0 +1,62 @@ +import OAI.Combinatorics.Sensitivity.ProfileArithmetic + +namespace OAI + +/-! The four individual inequalities before taking the normalized maxima. -/ + +namespace Paper320 + +theorem divided_profiles_step {M r : ℝ} {n : ℕ} + (hM : 0 < M) (hr : 0 ≤ r) + {s₀ s₁ j₀ j₁ s₀' s₁' j₀' j₁' : ℝ} + (hS₀ : s₀' ≤ 16 * s₀ + s₁ + 3 * j₁) + (hS₁ : s₁' ≤ M ^ 2 * s₀ + r * s₁) + (hJ₀ : j₀' ≤ 16 * s₀ + 3 * j₁) + (hJ₁ : j₁' ≤ M ^ 2 * j₀ + r * s₁) : + s₁' / M ^ (n + 2) ≤ (1 + r / M) * normalizedMax M n s₀ s₁ ∧ + s₀' / M ^ (n + 1) ≤ + (1 + 16 / M) * normalizedMax M n s₀ s₁ + 3 * normalizedMax M n j₀ j₁ ∧ + j₁' / M ^ (n + 2) ≤ + r / M * normalizedMax M n s₀ s₁ + normalizedMax M n j₀ j₁ ∧ + j₀' / M ^ (n + 1) ≤ + 16 / M * normalizedMax M n s₀ s₁ + 3 * normalizedMax M n j₀ j₁ := by + let u := normalizedMax M n s₀ s₁ + let v := normalizedMax M n j₀ j₁ + have hs₀ : s₀ ≤ u * M ^ n := le_normalizedMax_zero hM + have hs₁ : s₁ ≤ u * (M ^ n * M) := by + simpa only [pow_succ] using (le_normalizedMax_one (s₀ := s₀) (s₁ := s₁) (n := n) hM) + have hj₀ : j₀ ≤ v * M ^ n := le_normalizedMax_zero hM + have hj₁ : j₁ ≤ v * (M ^ n * M) := by + simpa only [pow_succ] using (le_normalizedMax_one (s₀ := j₀) (s₁ := j₁) (n := n) hM) + have a₀ := mul_le_mul_of_nonneg_left hs₀ (show (0 : ℝ) ≤ 16 by norm_num) + have a₁ := mul_le_mul_of_nonneg_left hs₀ (sq_nonneg M) + have b₀ := mul_le_mul_of_nonneg_left hj₀ (sq_nonneg M) + have b₁ := mul_le_mul_of_nonneg_left hj₁ (show (0 : ℝ) ≤ 3 by norm_num) + have c₁ := mul_le_mul_of_nonneg_left hs₁ hr + have hrM : r / M * M = r := div_mul_cancel₀ _ hM.ne' + have htM : (16 : ℝ) / M * M = 16 := div_mul_cancel₀ _ hM.ne' + have hrMu := congrArg (fun z : ℝ => z * u * M ^ n * M) hrM + have htMu := congrArg (fun z : ℝ => z * u * M ^ n) htM + change s₁' / M ^ (n + 2) ≤ (1 + r / M) * u ∧ + s₀' / M ^ (n + 1) ≤ (1 + 16 / M) * u + 3 * v ∧ + j₁' / M ^ (n + 2) ≤ r / M * u + v ∧ + j₀' / M ^ (n + 1) ≤ 16 / M * u + 3 * v + constructor + · apply (div_le_iff₀ (pow_pos hM _)).mpr + rw [show n + 2 = (n + 1) + 1 by omega, pow_succ, pow_succ] + nlinarith + constructor + · apply (div_le_iff₀ (pow_pos hM _)).mpr + rw [pow_succ] + nlinarith + constructor + · apply (div_le_iff₀ (pow_pos hM _)).mpr + rw [show n + 2 = (n + 1) + 1 by omega, pow_succ, pow_succ] + nlinarith + · apply (div_le_iff₀ (pow_pos hM _)).mpr + rw [pow_succ] + nlinarith + +end Paper320 + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/FiniteDepthError.lean b/lean/OAI/Combinatorics/Sensitivity/FiniteDepthError.lean new file mode 100644 index 0000000000000000000000000000000000000000..baceb702e9d20146bc2f70a2a727dcbc95a30fcb --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/FiniteDepthError.lean @@ -0,0 +1,49 @@ +import OAI.Combinatorics.Sensitivity.ComparisonSequences + +namespace OAI + +/-! The explicit finite-depth error fraction. -/ + +namespace Paper320 + +theorem three_pow_linear_lower (n : ℕ) : 2 * (n : ℝ) + 1 ≤ (3 : ℝ) ^ n := by + induction n with + | zero => norm_num + | succ n ih => + rw [pow_succ] + push_cast + nlinarith [show (0 : ℝ) ≤ n from Nat.cast_nonneg n] + +theorem finite_depth_error_fraction {d n : ℕ} (hn : n ≤ d) {ε : ℝ} + (hbudget : ε * 3 ^ (d + 1) ≤ 2) : + ε * ((3 / 2 : ℝ) * (3 ^ n - 1) - n) ≤ + (3 ^ (n + 1) - 3 - 2 * n) / 3 ^ (d + 1) ∧ + (3 ^ (n + 1) - 3 - 2 * (n : ℝ)) / 3 ^ (d + 1) < 1 := by + have hD : (0 : ℝ) < 3 ^ (d + 1) := by positivity + have hε : ε ≤ 2 / 3 ^ (d + 1) := (le_div_iff₀ hD).mpr hbudget + have ha : 0 ≤ (3 / 2 : ℝ) * (3 ^ n - 1) - n := by + nlinarith [three_pow_linear_lower n, show (0 : ℝ) ≤ n from Nat.cast_nonneg n] + constructor + · calc + _ ≤ (2 / 3 ^ (d + 1)) * ((3 / 2 : ℝ) * (3 ^ n - 1) - n) := + mul_le_mul_of_nonneg_right hε ha + _ = _ := by rw [pow_succ (3 : ℝ) n]; ring + · apply (div_lt_one hD).mpr + have hp : (3 : ℝ) ^ (n + 1) ≤ 3 ^ (d + 1) := + pow_le_pow_right₀ (by norm_num) (Nat.succ_le_succ hn) + linarith [show (0 : ℝ) ≤ n from Nat.cast_nonneg n] + +theorem comparisonV_step_bound {d n : ℕ} (hn : n ≤ d) {ε L : ℝ} + (hε : 0 ≤ ε) (hL : 0 ≤ L) (hbudget : ε * 3 ^ (d + 1) ≤ 2) : + comparisonV ε L (n + 1) ≤ 2 * ε * L + 3 * ε * L * (3 ^ n - 1) ∧ + 2 * ε * L + 3 * ε * L * (3 ^ n - 1) = ε * L * (3 ^ (n + 1) - 1) := by + obtain ⟨hu, hv⟩ := comparison_bounds d ε L hε hL hbudget n hn + constructor + · rw [comparisonV_succ] + nlinarith [mul_le_mul_of_nonneg_left hu hε] + · rw [pow_succ] + ring + +end Paper320 + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/FixedCoordinates.lean b/lean/OAI/Combinatorics/Sensitivity/FixedCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..3fe5853e0611670c9f0cad8298893758f528c1bb --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/FixedCoordinates.lean @@ -0,0 +1,43 @@ +import Mathlib.Data.Fintype.BigOperators + +namespace OAI + +/-! Exact finite counting when a specified set of coordinates is fixed. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +variable {α β : Type} [Fintype α] [Fintype β] [DecidableEq α] + +def fixedCoordinatesEquiv (s : Finset α) (v : α → β) : + {f : α → β // ∀ i ∈ s, f i = v i} ≃ ({i : α // i ∉ s} → β) where + toFun f i := f.val i.val + invFun f := ⟨fun i => if h : i ∈ s then v i else f ⟨i,h⟩, by + intro i hi + simp only [dite_eq_left hi]⟩ + left_inv f := by + apply Subtype.ext + funext i + by_cases hi : i ∈ s + · simp only [dite_eq_left hi] + exact (f.property i hi).symm + · simp only [dite_eq_right hi] + right_inv f := by + funext i + simp only [dite_eq_right i.property] + +theorem card_fixedCoordinates (s : Finset α) (v : α → β) + [DecidablePred (fun f : α → β => ∀ i ∈ s, f i = v i)] : + (Finset.univ.filter fun f : α → β => ∀ i ∈ s, f i = v i).card = + Fintype.card β ^ (Fintype.card α - s.card) := by + rw [← Fintype.card_subtype] + rw [Fintype.card_congr (fixedCoordinatesEquiv s v), Fintype.card_fun, + Fintype.card_subtype_compl, Fintype.card_coe] + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/HammingBase.lean b/lean/OAI/Combinatorics/Sensitivity/HammingBase.lean new file mode 100644 index 0000000000000000000000000000000000000000..711c6b1123cd9c15d78143602fea90f619e37a33 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/HammingBase.lean @@ -0,0 +1,158 @@ +import OAI.Combinatorics.Sensitivity.Model + +namespace OAI + +/-! Hamming balls used by the initial nested predicates. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +variable {I C : Type} [Fintype I] + +theorem hammingDist_flip_self (x : I → Bool) (i : I) : + hammingDist x (flip x {i}) = 1 := by + have h : (Finset.univ.filter fun j => x j ≠ flip x {i} j) = {i} := by + ext j + by_cases hj : j = i + · subst j + cases x i <;> simp [flip] + · simp [flip, hj] + rw [hammingDist, h] + simp + +theorem hammingDist_le_flip_add_one (x z : I → Bool) (i : I) : + hammingDist x z ≤ hammingDist (flip x {i}) z + 1 := by + have h := hammingDist_triangle x (flip x {i}) z + rw [hammingDist_flip_self] at h + omega + +theorem hammingDist_flip_le_add_one (x z : I → Bool) (i : I) : + hammingDist (flip x {i}) z ≤ hammingDist x z + 1 := by + have h := hammingDist_triangle (flip x {i}) x z + rw [hammingDist_comm (flip x {i}) x, hammingDist_flip_self] at h + omega + +theorem hammingDist_flip_eq_add_one (x z : I → Bool) (i : I) (hi : x i = z i) : + hammingDist (flip x {i}) z = hammingDist x z + 1 := by + have h : (Finset.univ.filter fun j => flip x {i} j ≠ z j) = + insert i (Finset.univ.filter fun j => x j ≠ z j) := by + ext j + by_cases hj : j = i + · subst j + cases hx : x i <;> simp_all [flip] + · simp [flip, hj] + rw [hammingDist, h, Finset.card_insert_of_notMem] + · rfl + · simp [hi] + +/-- The union of equal-radius Hamming balls. -/ +def ballPredicate [Fintype C] (centers : C → I → Bool) (R : ℕ) + (x : I → Bool) : Bool := + decide (∃ c, hammingDist x (centers c) ≤ R) + +theorem ballPredicate_eq_true [Fintype C] (centers : C → I → Bool) (R : ℕ) + (x : I → Bool) : + ballPredicate centers R x = true ↔ ∃ c, hammingDist x (centers c) ≤ R := by + simp [ballPredicate] + +theorem ballPredicate_nested [Fintype C] (centers : C → I → Bool) + {R S : ℕ} (hRS : R ≤ S) (x : I → Bool) + (h : ballPredicate centers R x = true) : ballPredicate centers S x = true := by + rcases (ballPredicate_eq_true centers R x).1 h with ⟨c, hc⟩ + exact (ballPredicate_eq_true centers S x).2 ⟨c, hc.trans hRS⟩ + +theorem ballPredicate_zero_flip [Fintype C] (centers : C → I → Bool) (R : ℕ) + (x : I → Bool) (i : I) (hx : ballPredicate centers R x = false) + (hi : ballPredicate centers R (flip x {i}) = true) : + ∃ c, hammingDist x (centers c) = R + 1 ∧ x i ≠ centers c i := by + rcases (ballPredicate_eq_true centers R (flip x {i})).1 hi with ⟨c, hc⟩ + have hn : ¬ hammingDist x (centers c) ≤ R := by + intro h + have := (ballPredicate_eq_true centers R x).2 ⟨c, h⟩ + simp_all + have hd := hammingDist_le_flip_add_one x (centers c) i + refine ⟨c, by omega, ?_⟩ + intro heq + rw [hammingDist_flip_eq_add_one x (centers c) i heq] at hc + omega + +theorem near_center_unique (centers : C → I → Bool) (R : ℕ) + (hsep : ∀ a b, a ≠ b → 2 * (R + 1) < hammingDist (centers a) (centers b)) + (x : I → Bool) {a b : C} (ha : hammingDist x (centers a) ≤ R + 1) + (hb : hammingDist x (centers b) ≤ R + 1) : a = b := by + by_contra h + have hs := hsep a b h + have ht := hammingDist_triangle (centers a) x (centers b) + rw [hammingDist_comm (centers a) x] at ht + omega + +theorem ballPredicate_sensitivityAt_zero_le [Fintype C] + (centers : C → I → Bool) (R : ℕ) + (hsep : ∀ a b, a ≠ b → 2 * (R + 1) < hammingDist (centers a) (centers b)) + (x : I → Bool) (hx : ballPredicate centers R x = false) : + sensitivityAt (ballPredicate centers R) x ≤ R + 1 := by + let A := Finset.univ.filter fun i => + ballPredicate centers R (flip x {i}) ≠ ballPredicate centers R x + change A.card ≤ R + 1 + by_cases hA : A.Nonempty + · obtain ⟨i, hi⟩ := hA + have hi' : ballPredicate centers R (flip x {i}) = true := by + simpa [A, hx] using hi + obtain ⟨c, hc, _⟩ := ballPredicate_zero_flip centers R x i hx hi' + have hsub : A ⊆ Finset.univ.filter fun j => x j ≠ centers c j := by + intro j hj + have hj' : ballPredicate centers R (flip x {j}) = true := by + simpa [A, hx] using hj + obtain ⟨c', hc', hjc⟩ := ballPredicate_zero_flip centers R x j hx hj' + have heq : c' = c := near_center_unique centers R hsep x (by omega) (by omega) + simpa [heq] using hjc + exact (Finset.card_le_card hsub).trans_eq hc + · rw [Finset.not_nonempty_iff_eq_empty.mp hA] + simp + +theorem ballPredicate_no_joint_zero [Fintype C] (centers : C → I → Bool) + {R S : ℕ} (hRS : R < S) (x : I → Bool) (i : I) + (hS : ballPredicate centers S x = false) + (hR : ballPredicate centers R (flip x {i}) = true) : False := by + obtain ⟨c, hc⟩ := (ballPredicate_eq_true centers R (flip x {i})).1 hR + have hd := hammingDist_le_flip_add_one x (centers c) i + have ht := (ballPredicate_eq_true centers S x).2 ⟨c, by omega⟩ + simp_all + +theorem ballPredicate_no_joint_one [Fintype C] (centers : C → I → Bool) + {R S : ℕ} (hRS : R < S) (x : I → Bool) (i : I) + (hR : ballPredicate centers R x = true) + (hS : ballPredicate centers S (flip x {i}) = false) : False := by + obtain ⟨c, hc⟩ := (ballPredicate_eq_true centers R x).1 hR + have hd := hammingDist_flip_le_add_one x (centers c) i + have ht := (ballPredicate_eq_true centers S (flip x {i})).2 ⟨c, by omega⟩ + simp_all + +/-- Minimum distance to the finite nonempty family of centers. -/ +def nearestDistance [Fintype C] [Nonempty C] (centers : C → I → Bool) + (x : I → Bool) : ℕ := + Finset.univ.inf' Finset.univ_nonempty (fun c => hammingDist x (centers c)) + +theorem ballPredicate_eq_nearestDistance [Fintype C] [Nonempty C] + (centers : C → I → Bool) (R : ℕ) (x : I → Bool) : + ballPredicate centers R x = decide (nearestDistance centers x ≤ R) := by + simp [ballPredicate, nearestDistance, Finset.inf'_le_iff] + +theorem nearestDistance_le_flip_add_one [Fintype C] [Nonempty C] + (centers : C → I → Bool) (x : I → Bool) (i : I) : + nearestDistance centers x ≤ nearestDistance centers (flip x {i}) + 1 := by + obtain ⟨c, _, hc⟩ := Finset.exists_mem_eq_inf' Finset.univ_nonempty + (fun c => hammingDist (flip x {i}) (centers c)) + apply (Finset.inf'_le _ (Finset.mem_univ c)).trans + change hammingDist x (centers c) ≤ + (Finset.univ.inf' Finset.univ_nonempty fun c => hammingDist (flip x {i}) (centers c)) + 1 + rw [hc] + exact hammingDist_le_flip_add_one x (centers c) i + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/HammingSource.lean b/lean/OAI/Combinatorics/Sensitivity/HammingSource.lean new file mode 100644 index 0000000000000000000000000000000000000000..9bfa620635051598ca5394d0931cf38a434ad46f --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/HammingSource.lean @@ -0,0 +1,30 @@ +import OAI.Combinatorics.Sensitivity.HammingBase +import OAI.Combinatorics.Sensitivity.Basic + +namespace OAI + +/-! The two-sided distance change under one raw-bit flip. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +theorem nearestDistance_flip_le_add_one {I C : Type} [Fintype I] [Fintype C] [Nonempty C] + (centers : C → I → Bool) (x : I → Bool) (i : I) : + nearestDistance centers (flip x {i}) ≤ nearestDistance centers x + 1 := by + simpa only [flip_flip] using nearestDistance_le_flip_add_one centers (flip x {i}) i + +theorem nearestDistance_flip_abs_le_one {I C : Type} [Fintype I] [Fintype C] [Nonempty C] + (centers : C → I → Bool) (x : I → Bool) (i : I) : + |(nearestDistance centers x : ℤ) - nearestDistance centers (flip x {i})| ≤ 1 := by + have h₁ := nearestDistance_le_flip_add_one centers x i + have h₂ := nearestDistance_flip_le_add_one centers x i + rw [abs_le] + constructor <;> omega + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/InitialPredicates.lean b/lean/OAI/Combinatorics/Sensitivity/InitialPredicates.lean new file mode 100644 index 0000000000000000000000000000000000000000..84a9a52e337e2def00fdfd15e5d06cf3dceec9b3 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/InitialPredicates.lean @@ -0,0 +1,146 @@ +import OAI.Combinatorics.Sensitivity.HammingBase +import OAI.Combinatorics.Sensitivity.RecursiveProfiles +import OAI.Combinatorics.Sensitivity.Basic + +namespace OAI + +/-! The separated Hamming-ball predicates and their explicit sensitive blocks. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +def blockCenter {M L : ℕ} (j : Fin M) : Fin M × Fin L → Bool := + fun p => decide (p.1 = j) + +def baseBlock {M L : ℕ} (j : Fin M) : Finset (Fin M × Fin L) := + Finset.univ.filter fun p => p.1 = j + +@[simp] theorem mem_baseBlock {M L : ℕ} (j : Fin M) (p : Fin M × Fin L) : + p ∈ baseBlock j ↔ p.1 = j := by + simp [baseBlock] + +theorem baseBlock_card {M L : ℕ} (j : Fin M) : (baseBlock (L := L) j).card = L := by + have h : (baseBlock (L := L) j).card = (Finset.univ : Finset (Fin L)).card := by + apply Finset.card_bij (fun p _ => p.2) + · intro p _ + exact Finset.mem_univ _ + · intro p hp q hq hpq + exact Prod.ext (((mem_baseBlock j p).mp hp).trans ((mem_baseBlock j q).mp hq).symm) hpq + · intro b _ + exact ⟨(j, b), (mem_baseBlock j (j, b)).mpr rfl, rfl⟩ + simpa using h + +theorem baseBlock_nonempty {M L : ℕ} (hL : 0 < L) (j : Fin M) : + (baseBlock (L := L) j).Nonempty := by + rw [← Finset.card_pos, baseBlock_card] + exact hL + +theorem baseBlock_disjoint {M L : ℕ} : + Pairwise fun i j : Fin M => Disjoint (baseBlock (L := L) i) (baseBlock j) := by + intro i j hij + apply Finset.disjoint_left.mpr + rintro ⟨a, b⟩ hi hj + simp only [mem_baseBlock] at hi hj + exact hij (hi.symm.trans hj) + +theorem flip_zero_baseBlock {M L : ℕ} (j : Fin M) : + flip (fun _ : Fin M × Fin L => false) (baseBlock j) = blockCenter j := by + ext p + simp [flip, blockCenter] + +theorem hammingDist_zero_blockCenter {M L : ℕ} (j : Fin M) : + hammingDist (fun _ : Fin M × Fin L => false) (blockCenter j) = L := by + have hs : (Finset.univ.filter fun p : Fin M × Fin L => false ≠ blockCenter j p) = + baseBlock j := by + ext p + simp [blockCenter] + rw [hammingDist, hs, baseBlock_card] + +theorem hammingDist_blockCenter {M L : ℕ} (i j : Fin M) (hij : i ≠ j) : + hammingDist (blockCenter (L := L) i) (blockCenter j) = 2 * L := by + have hs : (Finset.univ.filter fun p : Fin M × Fin L => + blockCenter i p ≠ blockCenter j p) = + baseBlock i ∪ baseBlock j := by + ext ⟨a, b⟩ + by_cases ha : a = i <;> by_cases hb : a = j <;> simp_all [blockCenter] + rw [hammingDist, hs] + rw [Finset.card_union_of_disjoint (baseBlock_disjoint hij), baseBlock_card, baseBlock_card] + omega + +def initialFamily (d M : ℕ) : Fin (d + 1) → (Fin M × Fin (d + 2) → Bool) → Bool := + fun q => ballPredicate blockCenter (d - q.val) + +theorem initialFamily_nested (d M : ℕ) : NestedFamily (initialFamily d M) := by + constructor + intro q q' x hqq hx + exact ballPredicate_nested blockCenter (by omega) x hx + +theorem initialFamily_zero (d M : ℕ) (q : Fin (d + 1)) : + initialFamily d M q (fun _ => false) = false := by + have hn : ¬ ∃ c : Fin M, + hammingDist (fun _ : Fin M × Fin (d + 2) => false) (blockCenter c) ≤ d - q.val := by + rintro ⟨c, hc⟩ + rw [hammingDist_zero_blockCenter] at hc + omega + simp [initialFamily, ballPredicate, hn] + +theorem initialFamily_baseBlock (d M : ℕ) (q : Fin (d + 1)) (j : Fin M) : + initialFamily d M q (flip (fun _ => false) (baseBlock j)) = true := by + rw [flip_zero_baseBlock] + apply (ballPredicate_eq_true blockCenter (d - q.val) (blockCenter j)).2 + exact ⟨j, by simp⟩ + +theorem initialFamily_side_zero (d M : ℕ) : + sideSensitivity (initialFamily d M) false ≤ d + 2 := by + apply sideSensitivity_le + intro q x hx + have hs : ∀ a b : Fin M, a ≠ b → + 2 * ((d - q.val) + 1) < hammingDist (blockCenter (L := d + 2) a) (blockCenter b) := by + intro a b hab + rw [hammingDist_blockCenter a b hab] + omega + exact (ballPredicate_sensitivityAt_zero_le blockCenter (d - q.val) hs x hx).trans + (by omega) + +theorem initialFamily_side_one (d M : ℕ) : + sideSensitivity (initialFamily d M) true ≤ (d + 2) * M := by + apply sideSensitivity_le + intro q x _ + simpa [Nat.mul_comm] using sensitivityAt_le_card (initialFamily d M q) x + +theorem initialFamily_joint (d M : ℕ) (b : Bool) : + jointSensitivity (initialFamily d M) b = 0 := by + apply Nat.eq_zero_of_le_zero + apply jointSensitivity_le + intro q q' x hqq hx hx' + have hrad : d - q'.val < d - q.val := by omega + unfold jointSensitivityAt + have he : (Finset.univ.filter fun i => + initialFamily d M q (flip x {i}) ≠ initialFamily d M q x ∧ + initialFamily d M q' (flip x {i}) ≠ initialFamily d M q' x) = ∅ := by + apply Finset.filter_eq_empty_iff.mpr + intro i _ hi + obtain ⟨hi, hi'⟩ := hi + cases b with + | false => + have hflip : initialFamily d M q' (flip x {i}) = true := by + simpa [hx'] using hi' + exact ballPredicate_no_joint_zero blockCenter hrad x i hx hflip + | true => + have hflip : initialFamily d M q (flip x {i}) = false := by + simpa [hx] using hi + exact ballPredicate_no_joint_one blockCenter hrad x i hx' hflip + rw [he] + simp + +theorem nearestDistance_blockCenter_zero (M L : ℕ) [NeZero M] : + nearestDistance (blockCenter (M := M) (L := L)) (fun _ => false) = L := by + simp [nearestDistance, hammingDist_zero_blockCenter] + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/Iterates.lean b/lean/OAI/Combinatorics/Sensitivity/Iterates.lean new file mode 100644 index 0000000000000000000000000000000000000000..5dacf499f0fe4dd6a6596c3aad92a7884a20f2e3 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/Iterates.lean @@ -0,0 +1,130 @@ +import OAI.Combinatorics.Sensitivity.Composition +import OAI.Combinatorics.Sensitivity.Reindex + +namespace OAI + +/-! Repeated disjoint composition with explicit finite raw-coordinate types. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +abbrev IterateCoord (I : Type) : ℕ → Type + | 0 => Unit + | m + 1 => I × IterateCoord I m + +instance iterateCoordFintype {I : Type} [Fintype I] : + (m : ℕ) → Fintype (IterateCoord I m) + | 0 => inferInstanceAs (Fintype Unit) + | m + 1 => + letI : Fintype (IterateCoord I m) := iterateCoordFintype (I := I) m + inferInstanceAs (Fintype (I × IterateCoord I m)) + +def iterateCompose {I : Type} (f : (I → Bool) → Bool) : + (m : ℕ) → (IterateCoord I m → Bool) → Bool + | 0 => fun x => x () + | m + 1 => compose f (iterateCompose f m) + +theorem iterateCompose_one {I : Type} (f : (I → Bool) → Bool) + (x : IterateCoord I 1 → Bool) : + iterateCompose f 1 x = f (fun i => x (i, ())) := rfl + +theorem iterateCompose_zero {I : Type} (f : (I → Bool) → Bool) + (hf : f (fun _ => false) = false) (m : ℕ) : + iterateCompose f m (fun _ => false) = false := by + induction m with + | zero => rfl + | succ m ih => exact (compose_zero f (iterateCompose f m) ih).trans hf + +variable {I : Type} [Fintype I] + +theorem iterateCoord_card (m : ℕ) : + Fintype.card (IterateCoord I m) = Fintype.card I ^ m := by + induction m with + | zero => exact Fintype.card_unique + | succ m ih => + change Fintype.card (I × IterateCoord I m) = _ + rw [Fintype.card_prod, ih, pow_succ, Nat.mul_comm] + +theorem sensitivity_iterateCompose_le (f : (I → Bool) → Bool) (m : ℕ) : + sensitivity (iterateCompose f m) ≤ sensitivity f ^ m := by + induction m with + | zero => + apply sensitivity_le + intro x + exact (sensitivityAt_le_card (iterateCompose f 0) x).trans_eq (iterateCoord_card 0) + | succ m ih => + change sensitivity (compose f (iterateCompose f m)) ≤ _ + calc + _ ≤ sensitivity f * sensitivity (iterateCompose f m) := sensitivity_compose_le _ _ + _ ≤ sensitivity f * sensitivity f ^ m := Nat.mul_le_mul_left _ ih + _ = sensitivity f ^ (m + 1) := by rw [pow_succ, Nat.mul_comm] + +theorem blockSensitivityAt_iterateCompose_zero (f : (I → Bool) → Bool) + (hf : f (fun _ => false) = false) (m : ℕ) : + blockSensitivityAt f (fun _ => false) ^ m ≤ + blockSensitivityAt (iterateCompose f m) (fun _ => false) := by + induction m with + | zero => + have h := le_blockSensitivityAt (iterateCompose f 0) (fun _ => false) + ({{()}} : Finset (Finset Unit)) + (by + intro A hA B hB hne + exact (hne ((Finset.mem_singleton.mp hA).trans (Finset.mem_singleton.mp hB).symm)).elim) + (by + intro B hB + have hB' : B = {()} := Finset.mem_singleton.mp hB + subst B + exact ⟨Finset.singleton_nonempty _, by simp [iterateCompose, flip]⟩) + simpa only [Finset.card_singleton, pow_zero] using h + | succ m ih => + change _ ≤ blockSensitivityAt (compose f (iterateCompose f m)) (fun _ => false) + calc + _ = blockSensitivityAt f (fun _ => false) * + blockSensitivityAt f (fun _ => false) ^ m := by rw [pow_succ, Nat.mul_comm] + _ ≤ blockSensitivityAt f (fun _ => false) * + blockSensitivityAt (iterateCompose f m) (fun _ => false) := Nat.mul_le_mul_left _ ih + _ ≤ _ := blockSensitivityAt_compose_zero_le f (iterateCompose f m) + (iterateCompose_zero f hf m) + +def iterateFin (f : (I → Bool) → Bool) (m : ℕ) : + (Fin (Fintype.card I ^ m) → Bool) → Bool := + reindex (Fintype.equivFinOfCardEq (iterateCoord_card (I := I) m)) (iterateCompose f m) + +theorem iterateFin_zero (f : (I → Bool) → Bool) + (hf : f (fun _ => false) = false) (m : ℕ) : + iterateFin f m (fun _ => false) = false := + iterateCompose_zero f hf m + +theorem sensitivity_iterateFin_le (f : (I → Bool) → Bool) (m : ℕ) : + sensitivity (iterateFin f m) ≤ sensitivity f ^ m := by + rw [iterateFin, sensitivity_reindex] + exact sensitivity_iterateCompose_le f m + +theorem blockSensitivityAt_iterateFin_zero (f : (I → Bool) → Bool) + (hf : f (fun _ => false) = false) (m : ℕ) : + blockSensitivityAt f (fun _ => false) ^ m ≤ + blockSensitivityAt (iterateFin f m) (fun _ => false) := by + rw [iterateFin, blockSensitivityAt_reindex] + exact blockSensitivityAt_iterateCompose_zero f hf m + +theorem nonconstant_of_blockSensitivityAt_pos (f : (I → Bool) → Bool) (x : I → Bool) + (h : 0 < blockSensitivityAt f x) : ∃ y z, f y ≠ f z := by + obtain ⟨blocks, hc, _, hb⟩ := exists_blockSensitivityAt_family f x + have hn : blocks.Nonempty := Finset.card_pos.mp (hc.symm ▸ h) + obtain ⟨B, hB⟩ := hn + exact ⟨flip x B, x, (hb B hB).2⟩ + +theorem iterateFin_nonconstant (f : (I → Bool) → Bool) + (hf : f (fun _ => false) = false) + (h : 0 < blockSensitivityAt f (fun _ => false)) (m : ℕ) : + ∃ x y, iterateFin f m x ≠ iterateFin f m y := by + exact nonconstant_of_blockSensitivityAt_pos _ _ + ((pow_pos h m).trans_le (blockSensitivityAt_iterateFin_zero f hf m)) + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/Labeling.lean b/lean/OAI/Combinatorics/Sensitivity/Labeling.lean new file mode 100644 index 0000000000000000000000000000000000000000..8fb3be048600cb50181d51e8867d579e48618e3b --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/Labeling.lean @@ -0,0 +1,76 @@ +import OAI.Combinatorics.Sensitivity.LabelingEvents +import OAI.Combinatorics.Sensitivity.LabelingEstimate +import OAI.Combinatorics.Sensitivity.TournamentCyclic + +namespace OAI + +/-! A finite union bound supplies a good edge labeling. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +namespace Tournament +variable {k r : ℕ} (T : Tournament k) + +theorem goodLabeling_exists_of_power_bound (hr : 0 < r) (hN : 120 ≤ k*k) + (hkr : k^16 < r^104) : Nonempty (GoodLabeling T r) := by + have htotal : k^16*r^16*r^(k*k-120) < r^(k*k) := by + calc + k^16*r^16*r^(k*k-120) < r^104*r^16*r^(k*k-120) := + Nat.mul_lt_mul_of_pos_right + (Nat.mul_lt_mul_of_pos_right hkr (pow_pos hr 16)) (pow_pos hr _) + _ = r^(104+16+(k*k-120)) := by rw [pow_add, pow_add] + _ = r^(k*k) := congrArg (fun e : ℕ => r^e) (by omega) + have hc : (T.badLabelings 16 r).card < + (Finset.univ : Finset ((Fin k × Fin k) → Fin r)).card := by + simpa only [Finset.card_univ, Fintype.card_fun, Fintype.card_prod, Fintype.card_fin] + using (T.card_badLabelings_le (r := r) (n := 16)).trans_lt htotal + obtain ⟨A,_,hA⟩ := Finset.exists_mem_notMem_of_card_lt_card hc + refine ⟨⟨fun i j => A (i,j), ?_⟩⟩ + intro I hI m + by_contra hn + let e : Fin 16 ≃ I := (Finset.equivFinOfCardEq hI).symm + let v : Fin 16 → Fin k := fun i => (e i).val + have hv : Function.Injective v := Subtype.val_injective.comp e.injective + have hevent : A ∈ T.labelingEvent v (fun i => m (v i)) := by + apply T.mem_labelingEvent_iff hv |>.mpr + intro i j ha + by_contra h + exact hn ⟨v i,(e i).property,v j,(e j).property,ha,h⟩ + apply hA + exact T.labelingEvent_subset_bad hevent + +end Tournament + +theorem goodLabeling_exists {M r : ℕ} (hM : 3 ≤ M) (hMr : M ≤ r^2) + (T : Tournament (2*M^2+1)) : Nonempty (GoodLabeling T r) := by + have hr : 0 < r := (Nat.pow_pos_iff.mp + (lt_of_lt_of_le (show 0 < M by omega) hMr)).resolve_right (by omega) + exact T.goodLabeling_exists_of_power_bound hr (labeling_space_large hM) + (labeling_power_bound hM hMr) + +theorem regular_goodLabeling_exists {M : ℕ} (hM : 3 ≤ M) : + Nonempty (GoodLabeling (regularCyclicTournament M).toTournament + (Nat.ceil (Real.sqrt M))) := + goodLabeling_exists hM (le_ceil_sqrt_sq M) _ + +namespace GoodLabeling + +theorem good_on_subset {k r : ℕ} {T : Tournament k} (A : GoodLabeling T r) + (I : Finset (Fin k)) (hI : I.card = 16) (m : I → Fin r) : + ∃ i ∈ I, ∃ j, ∃ hj : j ∈ I, + T.Adj i j ∧ A.label i j ≠ m ⟨j,hj⟩ := by + obtain ⟨j,hj⟩ := Finset.card_pos.mp (show 0 < I.card by omega) + let m' : Fin k → Fin r := fun i => if hi : i ∈ I then m ⟨i,hi⟩ else m ⟨j,hj⟩ + obtain ⟨a,ha,b,hb,hab,hne⟩ := A.good I hI m' + refine ⟨a,ha,b,hb,hab,?_⟩ + simpa only [m', dite_eq_left hb] using hne + +end GoodLabeling +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/LabelingBounds.lean b/lean/OAI/Combinatorics/Sensitivity/LabelingBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..fde0b77e590dd7dd720e7334c0d751955654a1d5 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/LabelingBounds.lean @@ -0,0 +1,25 @@ +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Algebra.Order.Floor.Ring +import Mathlib.Tactic.Linarith + +namespace OAI + +/-! Symbolic estimates for the sixteen-vertex labeling union bound. -/ + +namespace Paper320 + +theorem le_ceil_sqrt_sq (M : ℕ) : M ≤ (Nat.ceil (Real.sqrt M))^2 := by + have hs := Nat.le_ceil (Real.sqrt (M : ℝ)) + have hr := Real.sqrt_nonneg (M : ℝ) + have he := Real.sq_sqrt (Nat.cast_nonneg M : (0 : ℝ) ≤ M) + have hh : (M : ℝ) ≤ (Nat.ceil (Real.sqrt M) : ℝ)^2 := by nlinarith + exact_mod_cast hh + +theorem labeling_space_large {M : ℕ} (hM : 3 ≤ M) : + 120 ≤ (2*M^2+1)*(2*M^2+1) := by + have : 19 ≤ 2*M^2+1 := by nlinarith + nlinarith + +end Paper320 + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/LabelingConstraints.lean b/lean/OAI/Combinatorics/Sensitivity/LabelingConstraints.lean new file mode 100644 index 0000000000000000000000000000000000000000..e4485ba9f8e9621377a0929ae612bd17fea7cda5 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/LabelingConstraints.lean @@ -0,0 +1,41 @@ +import OAI.Combinatorics.Sensitivity.TournamentCounts + +namespace OAI + +/-! The labeling constraints are exactly fixed values on the internal edges. -/ + +noncomputable section +open scoped Classical + +namespace Paper320.Tournament +variable {k : ℕ} (T : Tournament k) + +theorem mem_internalEdges {I : Finset (Fin k)} {p : Fin k × Fin k} : + p ∈ T.internalEdges I ↔ (p.1 ∈ I ∧ p.2 ∈ I) ∧ T.Adj p.1 p.2 := by + simp only [internalEdges, Finset.mem_filter, Finset.mem_product] + +theorem labelingConstraint_iff {α β : Type} [Nonempty α] + (s : Finset α) (v : α → Fin k) (m : α → β) (hv : Function.Injective v) + (A : (Fin k × Fin k) → β) : + (∀ i ∈ s, ∀ j ∈ s, T.Adj (v i) (v j) → A (v i,v j) = m j) ↔ + ∀ p ∈ T.internalEdges (s.image v), A p = m (Function.invFun v p.2) := by + constructor + · intro h p hp + obtain ⟨⟨hp₁,hp₂⟩,ha⟩ := T.mem_internalEdges.mp hp + obtain ⟨i,hi,hvi⟩ := Finset.mem_image.mp hp₁ + obtain ⟨j,hj,hvj⟩ := Finset.mem_image.mp hp₂ + have he : p = (v i,v j) := Prod.ext hvi.symm hvj.symm + subst p + rw [Function.leftInverse_invFun hv j] + exact h i hi j hj ha + · intro h i hi j hj ha + have hp : (v i,v j) ∈ T.internalEdges (s.image v) := + T.mem_internalEdges.mpr ⟨⟨Finset.mem_image.mpr ⟨i,hi,rfl⟩, + Finset.mem_image.mpr ⟨j,hj,rfl⟩⟩,ha⟩ + simpa only [Function.leftInverse_invFun hv j] using h (v i,v j) hp + +end Paper320.Tournament + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/LabelingEstimate.lean b/lean/OAI/Combinatorics/Sensitivity/LabelingEstimate.lean new file mode 100644 index 0000000000000000000000000000000000000000..bef95974165deeee06cd6c460663ac39dd1b3216 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/LabelingEstimate.lean @@ -0,0 +1,72 @@ +import OAI.Combinatorics.Sensitivity.LabelingBounds + +namespace OAI + +/-! An explicit numerical union-bound estimate. -/ + +namespace Paper320 + +theorem labeling_union_bound_numerator {M r : ℕ} (hM : 3 ≤ M) (hMr : M ≤ r^2) : + (2*M^2+1)^16 * M^20 ≤ 3^16 * r^104 := by + have hk : 2*M^2+1 ≤ 3*M^2 := by nlinarith + have hp : M^52 ≤ r^104 := by + calc + M^52 ≤ (r^2)^52 := Nat.pow_le_pow_left hMr 52 + _ = r^104 := by rw [← pow_mul] + calc + (2*M^2+1)^16 * M^20 ≤ (3*M^2)^16 * M^20 := + Nat.mul_le_mul_right _ (Nat.pow_le_pow_left hk 16) + _ = 3^16 * M^52 := by rw [mul_pow, ← pow_mul, mul_assoc, ← pow_add] + _ ≤ 3^16 * r^104 := Nat.mul_le_mul_left _ hp + +theorem labeling_union_bound_constant {M : ℕ} (hM : 3 ≤ M) : + 3^16 < M^20 := by + calc + 3^16 ≤ M^16 := Nat.pow_le_pow_left hM 16 + _ < M^20 := Nat.pow_lt_pow_right (by omega) (by omega) + +theorem labeling_power_bound {M r : ℕ} (hM : 3 ≤ M) (hMr : M ≤ r^2) : + (2*M^2+1)^16 < r^104 := by + have hr : 0 < r := (Nat.pow_pos_iff.mp + (lt_of_lt_of_le (show 0 < M by omega) hMr)).resolve_right (by omega) + apply Nat.lt_of_mul_lt_mul_right (a := M^20) + calc + (2*M^2+1)^16 * M^20 ≤ 3^16*r^104 := labeling_union_bound_numerator hM hMr + _ < M^20*r^104 := Nat.mul_lt_mul_of_pos_right (labeling_union_bound_constant hM) + (pow_pos hr 104) + _ = r^104*M^20 := Nat.mul_comm _ _ + +theorem labeling_union_bound_real {M r : ℕ} (hM : 3 ≤ M) (hMr : M ≤ r^2) : + (((2*M^2+1)^16 : ℕ) : ℝ) / (r : ℝ)^104 ≤ 3^16 / (M : ℝ)^20 ∧ + 3^16 / (M : ℝ)^20 < 1 := by + have hMp : (0 : ℝ) < M := by exact_mod_cast (show 0 < M by omega) + have hrp : (0 : ℝ) < r := by + have hr : 0 < r := (Nat.pow_pos_iff.mp + (lt_of_lt_of_le (show 0 < M by omega) hMr)).resolve_right (by omega) + exact_mod_cast hr + constructor + · apply (div_le_div_iff₀ (pow_pos hrp 104) (pow_pos hMp 20)).mpr + exact_mod_cast labeling_union_bound_numerator hM hMr + · apply (div_lt_one (pow_pos hMp 20)).mpr + exact_mod_cast labeling_union_bound_constant hM + +theorem labeling_sqrt_expression {M : ℕ} (hM : 0 < M) : + (3*(M : ℝ)^2)^16 / (Real.sqrt M)^104 = 3^16 / (M : ℝ)^20 := by + have hp : (0 : ℝ) < M := by exact_mod_cast hM + have hd : (Real.sqrt M)^104 = (M : ℝ)^52 := by + rw [show 104 = 2*52 from rfl, pow_mul, Real.sq_sqrt hp.le] + rw [hd, div_eq_div_iff (pow_ne_zero _ hp.ne') (pow_ne_zero _ hp.ne'), + mul_pow, ← pow_mul, mul_assoc, ← pow_add] + +theorem labeling_source_estimate {M : ℕ} (hM : 3 ≤ M) : + (((2*M^2+1)^16 : ℕ) : ℝ) / (Nat.ceil (Real.sqrt M) : ℝ)^104 ≤ + (3*(M : ℝ)^2)^16 / (Real.sqrt M)^104 ∧ + (3*(M : ℝ)^2)^16 / (Real.sqrt M)^104 = 3^16 / (M : ℝ)^20 ∧ + 3^16 / (M : ℝ)^20 < 1 := by + have h := labeling_union_bound_real hM (le_ceil_sqrt_sq M) + have he := labeling_sqrt_expression (show 0 < M by omega) + exact ⟨he.symm ▸ h.1, he, h.2⟩ + +end Paper320 + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/LabelingEvents.lean b/lean/OAI/Combinatorics/Sensitivity/LabelingEvents.lean new file mode 100644 index 0000000000000000000000000000000000000000..fb7561ebb34d009813b5fdd356d71aa30d60b067 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/LabelingEvents.lean @@ -0,0 +1,83 @@ +import OAI.Combinatorics.Sensitivity.LabelingConstraints +import OAI.Combinatorics.Sensitivity.FixedCoordinates +import Mathlib.Data.Fintype.EquivFin + +namespace OAI + +/-! Exact counts of target-constant label constraints on sixteen vertices. -/ + +noncomputable section +open scoped Classical BigOperators + +namespace Paper320.Tournament +variable {k r n : ℕ} (T : Tournament k) + +def labelingEvent (v : Fin n → Fin k) (m : Fin n → Fin r) : + Finset ((Fin k × Fin k) → Fin r) := + if Function.Injective v then + Finset.univ.filter fun A => ∀ i j, T.Adj (v i) (v j) → A (v i, v j) = m j + else ∅ + +theorem mem_labelingEvent_iff {v : Fin n → Fin k} {m : Fin n → Fin r} + {A : (Fin k × Fin k) → Fin r} (hv : Function.Injective v) : + A ∈ T.labelingEvent v m ↔ ∀ i j, T.Adj (v i) (v j) → A (v i,v j) = m j := by + simp only [labelingEvent, ite_eq_left hv, Finset.mem_filter, Finset.mem_univ, true_and] + +theorem labelingEvent_eq [NeZero n] (v : Fin n → Fin k) (m : Fin n → Fin r) + (hv : Function.Injective v) : + T.labelingEvent v m = Finset.univ.filter fun A => + ∀ p ∈ T.internalEdges (Finset.univ.image v), A p = m (Function.invFun v p.2) := by + rw [labelingEvent, ite_eq_left hv] + apply Finset.filter_congr + intro A _ + simpa only [Finset.mem_univ, forall_const] using + T.labelingConstraint_iff Finset.univ v m hv A + +theorem card_labelingEvent [NeZero n] (v : Fin n → Fin k) (m : Fin n → Fin r) + (hv : Function.Injective v) : + (T.labelingEvent v m).card = r ^ (k*k-n.choose 2) := by + rw [T.labelingEvent_eq v m hv] + have hc := card_fixedCoordinates (T.internalEdges (Finset.univ.image v)) + (fun p => m (Function.invFun v p.2)) + rw [T.card_internalEdges] at hc + have hi : (Finset.univ.image v).card = n := by + rw [Finset.card_image_of_injective _ hv] + exact Fintype.card_fin n + rw [hi] at hc + simpa only [Fintype.card_fin, Fintype.card_prod] using hc + +theorem card_labelingEvent_le [NeZero n] (v : Fin n → Fin k) (m : Fin n → Fin r) : + (T.labelingEvent v m).card ≤ r ^ (k*k-n.choose 2) := by + by_cases hv : Function.Injective v + · exact (T.card_labelingEvent v m hv).le + · simp only [labelingEvent, ite_eq_right hv, Finset.card_empty, Nat.zero_le] + +def badLabelings (n r : ℕ) : Finset ((Fin k × Fin k) → Fin r) := + Finset.univ.biUnion fun v : Fin n → Fin k => + Finset.univ.biUnion fun m : Fin n → Fin r => T.labelingEvent v m + +theorem labelingEvent_subset_bad {v : Fin n → Fin k} {m : Fin n → Fin r} : + T.labelingEvent v m ⊆ T.badLabelings n r := by + intro A hA + exact Finset.mem_biUnion.mpr ⟨v,Finset.mem_univ _, + Finset.mem_biUnion.mpr ⟨m,Finset.mem_univ _,hA⟩⟩ + +theorem card_badLabelings_le [NeZero n] : + (T.badLabelings n r).card ≤ k^n * r^n * r^(k*k-n.choose 2) := by + calc + (T.badLabelings n r).card ≤ ∑ v : Fin n → Fin k, + (Finset.univ.biUnion fun m : Fin n → Fin r => T.labelingEvent v m).card := + Finset.card_biUnion_le + _ ≤ ∑ _v : Fin n → Fin k, ∑ _m : Fin n → Fin r, r^(k*k-n.choose 2) := by + apply Finset.sum_le_sum + intro v _ + exact Finset.card_biUnion_le.trans (Finset.sum_le_sum fun m _ => + T.card_labelingEvent_le v m) + _ = k^n * r^n * r^(k*k-n.choose 2) := by + simp [Nat.mul_assoc] + +end Paper320.Tournament + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/LabelingProbability.lean b/lean/OAI/Combinatorics/Sensitivity/LabelingProbability.lean new file mode 100644 index 0000000000000000000000000000000000000000..748efffe0a156aaf3c2a3465e2c78672dc63c173 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/LabelingProbability.lean @@ -0,0 +1,73 @@ +import OAI.Combinatorics.Sensitivity.LabelingEvents +import OAI.Combinatorics.Sensitivity.UniformCoordinates +import OAI.Combinatorics.Sensitivity.LabelingEstimate + +namespace OAI + +/-! The uniform-label probability calculation and the numerical union bound. -/ + +noncomputable section +open scoped Classical + +namespace Paper320.Tournament +variable {k r n : ℕ} [NeZero r] [NeZero n] (T : Tournament k) + +theorem labelingEvent_probability (v : Fin n → Fin k) (m : Fin n → Fin r) + (hv : Function.Injective v) : + ((PMF.uniformOfFintype ((Fin k × Fin k) → Fin r)).toOuterMeasure + (T.labelingEvent v m)).toReal = 1 / (r : ℝ)^(n.choose 2) := by + have hs : (T.labelingEvent v m : Set ((Fin k × Fin k) → Fin r)) = + {A | ∀ p ∈ T.internalEdges (Finset.univ.image v), + A p = m (Function.invFun v p.2)} := by + ext A + change A ∈ T.labelingEvent v m ↔ _ + apply (T.mem_labelingEvent_iff hv).trans + simpa only [Finset.mem_univ, forall_const, Set.mem_ofPred_eq] using + T.labelingConstraint_iff Finset.univ v m hv A + rw [hs, uniform_fixedCoordinates_probability, T.card_internalEdges, + Finset.card_image_of_injective _ hv] + simp only [Finset.card_univ, Fintype.card_fin] + +theorem badLabelings_probability_le (hN : n.choose 2 ≤ k*k) : + ((PMF.uniformOfFintype ((Fin k × Fin k) → Fin r)).toOuterMeasure + (T.badLabelings n r)).toReal ≤ (k : ℝ)^n * (r : ℝ)^n / (r : ℝ)^(n.choose 2) := by + have hset : Fintype.card (T.badLabelings n r : Set ((Fin k × Fin k) → Fin r)) = + (T.badLabelings n r).card := Fintype.card_coe _ + have htotal : Fintype.card ((Fin k × Fin k) → Fin r) = r^(k*k) := by + simp only [Fintype.card_fun, Fintype.card_prod, Fintype.card_fin] + rw [PMF.toOuterMeasure_uniformOfFintype_apply, hset, htotal] + simp only [ENNReal.toReal_div, ENNReal.toReal_natCast, Nat.cast_pow] + have hr : (0 : ℝ) < r := by exact_mod_cast Nat.pos_of_ne_zero (NeZero.ne r) + have hc : ((T.badLabelings n r).card : ℝ) ≤ + (k : ℝ)^n * (r : ℝ)^n * (r : ℝ)^(k*k-n.choose 2) := by + exact_mod_cast T.card_badLabelings_le (n := n) (r := r) + calc + ((T.badLabelings n r).card : ℝ) / (r : ℝ)^(k*k) ≤ + (k : ℝ)^n * (r : ℝ)^n * (r : ℝ)^(k*k-n.choose 2) / (r : ℝ)^(k*k) := + div_le_div_of_nonneg_right hc (pow_nonneg hr.le _) + _ = (k : ℝ)^n * (r : ℝ)^n / (r : ℝ)^(n.choose 2) := by + rw [div_eq_div_iff (pow_ne_zero _ hr.ne') (pow_ne_zero _ hr.ne'), + mul_assoc, ← pow_add, Nat.sub_add_cancel hN] + +theorem bad_sixteen_probability_le (hN : 120 ≤ k*k) : + ((PMF.uniformOfFintype ((Fin k × Fin k) → Fin r)).toOuterMeasure + (T.badLabelings 16 r)).toReal ≤ (k : ℝ)^16 / (r : ℝ)^104 := by + have hr : (0 : ℝ) < r := by exact_mod_cast Nat.pos_of_ne_zero (NeZero.ne r) + apply (T.badLabelings_probability_le (n := 16) hN).trans_eq + rw [div_eq_div_iff (pow_ne_zero _ hr.ne') (pow_ne_zero _ hr.ne'), + mul_assoc, ← pow_add] + rfl + +theorem bad_source_probability_lt_one {M : ℕ} (hM : 3 ≤ M) (hMr : M ≤ r^2) + (S : Tournament (2*M^2+1)) : + ((PMF.uniformOfFintype ((Fin (2*M^2+1) × Fin (2*M^2+1)) → Fin r)).toOuterMeasure + (S.badLabelings 16 r)).toReal < 1 := by + have h := Paper320.labeling_union_bound_real hM hMr + apply (S.bad_sixteen_probability_le (Paper320.labeling_space_large hM)).trans_lt + simpa only [Nat.cast_pow] using h.1.trans_lt h.2 + +end Paper320.Tournament + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/Main.lean b/lean/OAI/Combinatorics/Sensitivity/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..39636afa7df0a8d12022357c0f8aa14a4912a90e --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/Main.lean @@ -0,0 +1,50 @@ +import OAI.Combinatorics.Sensitivity.Basic +import OAI.Combinatorics.Sensitivity.ComparisonSequences +import OAI.Combinatorics.Sensitivity.Composition +import OAI.Combinatorics.Sensitivity.CompositionFamilies +import OAI.Combinatorics.Sensitivity.ConstructedSeed +import OAI.Combinatorics.Sensitivity.Construction +import OAI.Combinatorics.Sensitivity.Model +import OAI.Combinatorics.Sensitivity.DividedProfiles +import OAI.Combinatorics.Sensitivity.FiniteDepthError +import OAI.Combinatorics.Sensitivity.FixedCoordinates +import OAI.Combinatorics.Sensitivity.HammingBase +import OAI.Combinatorics.Sensitivity.HammingSource +import OAI.Combinatorics.Sensitivity.InitialPredicates +import OAI.Combinatorics.Sensitivity.Iterates +import OAI.Combinatorics.Sensitivity.Labeling +import OAI.Combinatorics.Sensitivity.LabelingBounds +import OAI.Combinatorics.Sensitivity.LabelingConstraints +import OAI.Combinatorics.Sensitivity.LabelingEstimate +import OAI.Combinatorics.Sensitivity.LabelingEvents +import OAI.Combinatorics.Sensitivity.LabelingProbability +import OAI.Combinatorics.Sensitivity.Separation +import OAI.Combinatorics.Sensitivity.Or +import OAI.Combinatorics.Sensitivity.OrSource +import OAI.Combinatorics.Sensitivity.ParameterBounds +import OAI.Combinatorics.Sensitivity.PowerAmplification +import OAI.Combinatorics.Sensitivity.ProfileArithmetic +import OAI.Combinatorics.Sensitivity.QuantitativeProfiles +import OAI.Combinatorics.Sensitivity.Recursive +import OAI.Combinatorics.Sensitivity.RecursiveBlocks +import OAI.Combinatorics.Sensitivity.RecursiveCandidates +import OAI.Combinatorics.Sensitivity.RecursiveChildren +import OAI.Combinatorics.Sensitivity.RecursiveDefinitions +import OAI.Combinatorics.Sensitivity.RecursiveFailures +import OAI.Combinatorics.Sensitivity.RecursiveFlips +import OAI.Combinatorics.Sensitivity.RecursiveJointZero +import OAI.Combinatorics.Sensitivity.RecursiveOne +import OAI.Combinatorics.Sensitivity.RecursiveProfiles +import OAI.Combinatorics.Sensitivity.RecursiveRepair +import OAI.Combinatorics.Sensitivity.RecursiveSets +import OAI.Combinatorics.Sensitivity.RecursiveZero +import OAI.Combinatorics.Sensitivity.Reindex +import OAI.Combinatorics.Sensitivity.ScalarBounds +import OAI.Combinatorics.Sensitivity.SeedAmplification +import OAI.Combinatorics.Sensitivity.SeparationArithmetic +import OAI.Combinatorics.Sensitivity.Tournament +import OAI.Combinatorics.Sensitivity.TournamentCounts +import OAI.Combinatorics.Sensitivity.TournamentCyclic +import OAI.Combinatorics.Sensitivity.Tower +import OAI.Combinatorics.Sensitivity.TowerProfiles +import OAI.Combinatorics.Sensitivity.UniformCoordinates diff --git a/lean/OAI/Combinatorics/Sensitivity/Model.lean b/lean/OAI/Combinatorics/Sensitivity/Model.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8d9d22c45c2b9ca98a95fd61545325e5a37d0b2 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/Model.lean @@ -0,0 +1,43 @@ +import Mathlib + +namespace OAI + +/-! Literal Boolean flips and ordinary sensitivity measures. +All maxima range over the actual finite input or block-family space. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +/-- Flip exactly the coordinates belonging to the specified block. -/ +def flip {I : Type} (x : I → Bool) (B : Finset I) : I → Bool := + fun i => if i ∈ B then !(x i) else x i + +/-- The ordinary number of sensitive individual input coordinates. -/ +def sensitivityAt {I : Type} [Fintype I] + (f : (I → Bool) → Bool) (x : I → Bool) : ℕ := + (Finset.univ.filter fun i => f (flip x {i}) ≠ f x).card + +/-- Maximum ordinary sensitivity over all Boolean inputs. -/ +def sensitivity {I : Type} [Fintype I] (f : (I → Bool) → Bool) : ℕ := + Finset.univ.sup (sensitivityAt f) + +/-- Maximum size of a family of disjoint nonempty sensitive blocks at an input. +The empty family is allowed and contributes zero. Invalid families contribute zero. -/ +def blockSensitivityAt {I : Type} [Fintype I] + (f : (I → Bool) → Bool) (x : I → Bool) : ℕ := + Finset.univ.sup fun blocks : Finset (Finset I) => + if (∀ A ∈ blocks, ∀ B ∈ blocks, A ≠ B → Disjoint A B) ∧ + (∀ B ∈ blocks, B.Nonempty ∧ f (flip x B) ≠ f x) + then blocks.card else 0 + +/-- Maximum block sensitivity over all Boolean inputs. -/ +def blockSensitivity {I : Type} [Fintype I] (f : (I → Bool) → Bool) : ℕ := + Finset.univ.sup (blockSensitivityAt f) + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/Or.lean b/lean/OAI/Combinatorics/Sensitivity/Or.lean new file mode 100644 index 0000000000000000000000000000000000000000..92388437aa0b1bdc2d31b85863b99c7dd207f889 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/Or.lean @@ -0,0 +1,96 @@ +import OAI.Combinatorics.Sensitivity.Composition + +namespace OAI + +/-! Balancing the zero and one sensitivities by an OR of disjoint copies. -/ + +noncomputable section +open scoped Classical BigOperators + +namespace Paper320 + +variable {I K : Type} [Fintype K] + +def orBits (x : K → Bool) : Bool := decide (∃ k, x k = true) + +@[simp] theorem orBits_eq_true (x : K → Bool) : orBits x = true ↔ ∃ k, x k = true := by + simp [orBits] + +@[simp] theorem orBits_eq_false (x : K → Bool) : orBits x = false ↔ ∀ k, x k = false := by + simp [orBits] + +@[simp] theorem orBits_zero : orBits (fun _ : K => false) = false := by + simp [orBits] + +theorem orBits_flip_of_witness (x : K → Bool) {i j : K} + (hji : j ≠ i) (hj : x j = true) : orBits (flip x {i}) = orBits x := by + have h₁ : orBits x = true := (orBits_eq_true x).mpr ⟨j, hj⟩ + have h₂ : orBits (flip x {i}) = true := + (orBits_eq_true _).mpr ⟨j, by rw [flip_singleton_other x hji, hj]⟩ + exact h₂.trans h₁.symm + +def orCopies (f : (I → Bool) → Bool) : (K × I → Bool) → Bool := compose orBits f + +theorem orCopies_zero (f : (I → Bool) → Bool) (hf : f (fun _ => false) = false) : + orCopies (K := K) f (fun _ => false) = false := by + rw [orCopies, compose_zero _ _ hf, orBits_zero] + +variable [Fintype I] + +theorem sensitivity_orCopies_le (f : (I → Bool) → Bool) (S₀ S₁ : ℕ) + (h₀ : ∀ x, f x = false → sensitivityAt f x ≤ S₀) + (h₁ : ∀ x, f x = true → sensitivityAt f x ≤ S₁) : + sensitivity (orCopies (K := K) f) ≤ max (Fintype.card K * S₀) S₁ := by + apply sensitivity_le + intro x + change sensitivityAt (compose orBits f) x ≤ _ + rw [sensitivityAt_compose] + let y : K → Bool := fun k => f (fun a => x (k, a)) + let s : Finset K := Finset.univ.filter fun i => orBits (flip y {i}) ≠ orBits y + change (∑ i ∈ s, sensitivityAt f (fun a => x (i, a))) ≤ _ + by_cases hy : orBits y = false + · have hall := (orBits_eq_false y).mp hy + calc + _ ≤ ∑ _i ∈ s, S₀ := Finset.sum_le_sum fun i _ => h₀ _ (hall i) + _ = s.card * S₀ := by simp + _ ≤ Fintype.card K * S₀ := Nat.mul_le_mul_right _ (Finset.card_le_univ _) + _ ≤ max (Fintype.card K * S₀) S₁ := le_max_left _ _ + · have htrue : orBits y = true := by cases h : orBits y <;> simp_all + obtain ⟨i, hi⟩ := (orBits_eq_true y).mp htrue + have hs : s ⊆ {i} := by + intro j hj + have hc := (Finset.mem_filter.mp hj).2 + by_contra hji + have hij : i ≠ j := Ne.symm (by simpa only [Finset.mem_singleton] using hji) + exact hc (orBits_flip_of_witness y hij hi) + calc + _ ≤ ∑ j ∈ ({i} : Finset K), sensitivityAt f (fun a => x (j, a)) := + Finset.sum_le_sum_of_subset_of_nonneg hs (by intros; exact Nat.zero_le _) + _ = sensitivityAt f (fun a => x (i, a)) := by simp + _ ≤ S₁ := h₁ _ hi + _ ≤ max (Fintype.card K * S₀) S₁ := le_max_right _ _ + +theorem card_le_blockSensitivityAt_orBits_zero : + Fintype.card K ≤ blockSensitivityAt (orBits (K := K)) (fun _ => false) := by + apply le_blockSensitivityAt_of_family orBits (fun _ => false) (fun k : K => {k}) + · intro k + simp + · intro k l hkl + simpa using hkl + · intro k + have h : orBits (flip (fun _ : K => false) {k}) = true := + (orBits_eq_true _).mpr ⟨k, by simp⟩ + simp [h] + +theorem blockSensitivityAt_orCopies_zero (f : (I → Bool) → Bool) + (hf : f (fun _ => false) = false) : + Fintype.card K * blockSensitivityAt f (fun _ => false) ≤ + blockSensitivityAt (orCopies (K := K) f) (fun _ => false) := by + exact (Nat.mul_le_mul_right _ card_le_blockSensitivityAt_orBits_zero).trans + (blockSensitivityAt_compose_zero_le orBits f hf) + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/OrSource.lean b/lean/OAI/Combinatorics/Sensitivity/OrSource.lean new file mode 100644 index 0000000000000000000000000000000000000000..8686972e50a81871f995880f703ba0d01c63956a --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/OrSource.lean @@ -0,0 +1,62 @@ +import OAI.Combinatorics.Sensitivity.Or + +namespace OAI + +/-! The two explicit accepting-input cases for an OR of disjoint copies. -/ + +noncomputable section +open scoped Classical BigOperators + +namespace Paper320 + +variable {I K : Type} [Fintype I] [Fintype K] + +theorem sensitivityAt_orCopies_eq_zero_of_two (f : (I → Bool) → Bool) + (x : K × I → Bool) {i j : K} (hij : i ≠ j) + (hi : f (fun a => x (i, a)) = true) (hj : f (fun a => x (j, a)) = true) : + sensitivityAt (orCopies f) x = 0 := by + apply (sensitivityAt_eq_zero_iff _ _).mpr + rintro ⟨k, a⟩ + by_contra h + have ho := ((compose_flip_sensitive_iff orBits f x k a).mp h).2 + by_cases hk : k = i + · subst k + exact ho (orBits_flip_of_witness _ (Ne.symm hij) hj) + · exact ho (orBits_flip_of_witness _ (Ne.symm hk) hi) + +theorem sensitivityAt_orCopies_eq_of_unique (f : (I → Bool) → Bool) + (x : K × I → Bool) (i : K) (hi : f (fun a => x (i, a)) = true) + (hother : ∀ j, j ≠ i → f (fun a => x (j, a)) = false) : + sensitivityAt (orCopies f) x = sensitivityAt f (fun a => x (i, a)) := by + let y : K → Bool := fun k => f (fun a => x (k, a)) + have hy : orBits y = true := (orBits_eq_true _).mpr ⟨i, hi⟩ + have hf : orBits (flip y {i}) = false := by + apply (orBits_eq_false _).mpr + intro j + by_cases hji : j = i + · subst j + simp [y, hi] + · rw [flip_singleton_other y hji] + exact hother j hji + have hs : (Finset.univ.filter fun k => orBits (flip y {k}) ≠ orBits y) = {i} := by + ext k + simp only [Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_singleton] + constructor + · intro hk + by_contra hki + exact hk (orBits_flip_of_witness y (Ne.symm hki) hi) + · rintro rfl + rw [hf, hy] + decide + change sensitivityAt (compose orBits f) x = _ + rw [sensitivityAt_compose] + change (∑ k ∈ Finset.univ.filter (fun k => orBits (flip y {k}) ≠ orBits y), + sensitivityAt f (fun a => x (k, a))) = _ + rw [hs] + simp + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/ParameterBounds.lean b/lean/OAI/Combinatorics/Sensitivity/ParameterBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a4804f0376a58876fd5ed6898237fe873c9662c --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/ParameterBounds.lean @@ -0,0 +1,69 @@ +import Mathlib + +namespace OAI + +/-! Uniform numerical estimates for the size parameter. -/ + +namespace Paper320 + +theorem parameter_ge_eighty_one {d M : ℕ} (hd : 1 ≤ d) (hM : 9 ^ (d + 1) ≤ M) : + 81 ≤ M := by + have hp : (9 : ℕ) ^ 2 ≤ 9 ^ (d + 1) := Nat.pow_le_pow_right (by norm_num) (by omega) + norm_num at hp + exact hp.trans hM + +theorem ceil_sqrt_max_le_two_sqrt {M : ℕ} (hM : 81 ≤ M) : + (max (Nat.ceil (Real.sqrt (M : ℝ))) 16 : ℕ) ≤ 2 * Real.sqrt (M : ℝ) := by + have hs : (9 : ℝ) ≤ Real.sqrt (M : ℝ) := by + apply Real.le_sqrt_of_sq_le + norm_num + exact_mod_cast hM + have hc := Nat.ceil_lt_add_one (Real.sqrt_nonneg (M : ℝ)) + push_cast + exact max_le (by linarith) (by linarith) + +theorem parameter_sqrt_lower {d M : ℕ} (hM : 9 ^ (d + 1) ≤ M) : + (3 : ℝ) ^ (d + 1) ≤ Real.sqrt (M : ℝ) := by + apply Real.le_sqrt_of_sq_le + calc + ((3 : ℝ) ^ (d + 1)) ^ 2 = ((3 : ℝ) ^ 2) ^ (d + 1) := by + simp only [← pow_mul, Nat.mul_comm] + _ = (9 : ℝ) ^ (d + 1) := by norm_num + _ ≤ M := by exact_mod_cast hM + +theorem parameter_epsilon_budget {d M : ℕ} (hd : 1 ≤ d) (hM : 9 ^ (d + 1) ≤ M) : + ((max (Nat.ceil (Real.sqrt (M : ℝ))) 16 : ℕ) : ℝ) / M * 3 ^ (d + 1) ≤ 2 := by + have h81 := parameter_ge_eighty_one hd hM + have hpos : (0 : ℝ) < M := by exact_mod_cast (show 0 < M by omega) + have hm := ceil_sqrt_max_le_two_sqrt h81 + have hp := parameter_sqrt_lower hM + calc + _ ≤ (2 * Real.sqrt (M : ℝ)) / M * Real.sqrt (M : ℝ) := + mul_le_mul (div_le_div_of_nonneg_right hm hpos.le) hp (by positivity) (by positivity) + _ = 2 := by + field_simp + nlinarith [Real.sq_sqrt hpos.le] + +theorem parameter_epsilon_le {d M : ℕ} (hd : 1 ≤ d) (hM : 9 ^ (d + 1) ≤ M) : + ((max (Nat.ceil (Real.sqrt (M : ℝ))) 16 : ℕ) : ℝ) / M ≤ 2 / 3 ^ (d + 1) := by + exact (le_div_iff₀ (by positivity)).2 (parameter_epsilon_budget hd hM) + +theorem parameter_epsilon_sqrt {d M : ℕ} (hd : 1 ≤ d) (hM : 9 ^ (d + 1) ≤ M) : + ((max (Nat.ceil (Real.sqrt (M : ℝ))) 16 : ℕ) : ℝ) / M ≤ + 2 / Real.sqrt (M : ℝ) ∧ + 2 / Real.sqrt (M : ℝ) ≤ 2 / (3 : ℝ) ^ (d + 1) := by + have h81 := parameter_ge_eighty_one hd hM + have hpos : (0 : ℝ) < M := by exact_mod_cast (show 0 < M by omega) + have hspos := Real.sqrt_pos.mpr hpos + constructor + · calc + _ ≤ (2 * Real.sqrt (M : ℝ)) / M := + div_le_div_of_nonneg_right (ceil_sqrt_max_le_two_sqrt h81) hpos.le + _ = 2 / Real.sqrt (M : ℝ) := by + field_simp + nlinarith [Real.sq_sqrt hpos.le] + · exact div_le_div_of_nonneg_left (by norm_num) (by positivity) (parameter_sqrt_lower hM) + +end Paper320 + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/PowerAmplification.lean b/lean/OAI/Combinatorics/Sensitivity/PowerAmplification.lean new file mode 100644 index 0000000000000000000000000000000000000000..e0c7c5467de94a6cfefd6cd879ddecdabd88d811 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/PowerAmplification.lean @@ -0,0 +1,98 @@ +import OAI.Combinatorics.Sensitivity.Iterates + +namespace OAI + +/-! A fixed seed with a strict quadratic gap gives a fixed power separation. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +theorem log_exponent_gt_two {A B : ℝ} (hA : 1 < A) (hB : A ^ 2 < B) : + 2 < Real.log B / Real.log A := by + apply (lt_div_iff₀ (Real.log_pos hA)).mpr + calc + 2 * Real.log A = Real.log (A ^ 2) := by rw [Real.log_pow]; norm_num + _ < Real.log B := Real.log_lt_log (pow_pos (by linarith) _) hB + +theorem rpow_log_exponent {A B : ℝ} (hA : 1 < A) (hB : 0 < B) : + A ^ (Real.log B / Real.log A) = B := by + apply (Real.mul_log_eq_log_iff (by linarith) hB).mp + exact div_mul_cancel₀ _ (ne_of_gt (Real.log_pos hA)) + +theorem power_amplification {I : Type} [Fintype I] + (f : (I → Bool) → Bool) (hf : f (fun _ => false) = false) + (A B : ℕ) (hs : sensitivity f ≤ A) + (hb : B ≤ blockSensitivityAt f (fun _ => false)) + (hA : 1 < A) (hB : A ^ 2 < B) : + let α := Real.log (B : ℝ) / Real.log (A : ℝ) + 2 < α ∧ + (∀ m : ℕ, + 0 < Fintype.card I ^ m ∧ + iterateFin f m (fun _ => false) = false ∧ + (∃ x y, iterateFin f m x ≠ iterateFin f m y) ∧ + (sensitivity (iterateFin f m) : ℝ) ^ α ≤ + (blockSensitivityAt (iterateFin f m) (fun _ => false) : ℝ) ∧ + ((B : ℝ) / (A : ℝ) ^ 2) ^ m ≤ + (blockSensitivity (iterateFin f m) : ℝ) / + (sensitivity (iterateFin f m) : ℝ) ^ 2) ∧ + Filter.Tendsto + (fun m : ℕ => (blockSensitivityAt (iterateFin f m) (fun _ => false) : ℝ)) + Filter.atTop Filter.atTop := by + have hAr : 1 < (A : ℝ) := by exact_mod_cast hA + have hBr : (A : ℝ) ^ 2 < (B : ℝ) := by exact_mod_cast hB + have hAp : 0 < (A : ℝ) := by linarith + have hB1 : 1 < (B : ℝ) := by nlinarith + have hBp : 0 < (B : ℝ) := by linarith + have hBn : 0 < B := by exact_mod_cast hBp + have hbf : 0 < blockSensitivityAt f (fun _ => false) := lt_of_lt_of_le hBn hb + have hcard : 0 < Fintype.card I := by + by_contra h + have : IsEmpty I := Fintype.card_eq_zero_iff.mp (Nat.eq_zero_of_not_pos h) + obtain ⟨x, y, hxy⟩ := nonconstant_of_blockSensitivityAt_pos f (fun _ => false) hbf + exact hxy (congrArg f (funext fun i => isEmptyElim i)) + have hα := log_exponent_gt_two hAr hBr + have hpow := rpow_log_exponent hAr hBp + have hs' (m : ℕ) : (sensitivity (iterateFin f m) : ℝ) ≤ (A : ℝ) ^ m := by + have hp : sensitivity f ^ m ≤ A ^ m := by gcongr + exact_mod_cast (sensitivity_iterateFin_le f m).trans hp + have hb' (m : ℕ) : (B : ℝ) ^ m ≤ + (blockSensitivityAt (iterateFin f m) (fun _ => false) : ℝ) := by + have hp : B ^ m ≤ blockSensitivityAt f (fun _ => false) ^ m := by gcongr + exact_mod_cast hp.trans (blockSensitivityAt_iterateFin_zero f hf m) + refine ⟨hα, ?_, Filter.tendsto_atTop_mono hb' (tendsto_pow_atTop_atTop_of_one_lt hB1)⟩ + intro m + have hnc := iterateFin_nonconstant f hf hbf m + have hspos : 0 < (sensitivity (iterateFin f m) : ℝ) := by + exact_mod_cast sensitivity_pos_of_nonconstant (iterateFin f m) hnc + refine ⟨pow_pos hcard m, iterateFin_zero f hf m, hnc, ?_, ?_⟩ + · calc + _ ≤ ((A : ℝ) ^ m) ^ (Real.log (B : ℝ) / Real.log (A : ℝ)) := + Real.rpow_le_rpow (le_of_lt hspos) (hs' m) (by linarith) + _ = ((A : ℝ) ^ (Real.log (B : ℝ) / Real.log (A : ℝ))) ^ m := by + rw [← Real.rpow_natCast_mul hAp.le, + mul_comm (m : ℝ), Real.rpow_mul_natCast hAp.le] + _ = (B : ℝ) ^ m := by rw [hpow] + _ ≤ _ := hb' m + · apply (le_div_iff₀ (pow_pos hspos 2)).mpr + have hsq : (sensitivity (iterateFin f m) : ℝ) ^ 2 ≤ ((A : ℝ) ^ m) ^ 2 := by + gcongr + exact hs' m + have hden : ((A : ℝ) ^ 2) ^ m = ((A : ℝ) ^ m) ^ 2 := by + rw [← pow_mul, ← pow_mul, Nat.mul_comm 2 m] + calc + _ ≤ ((B : ℝ) / (A : ℝ) ^ 2) ^ m * ((A : ℝ) ^ m) ^ 2 := + mul_le_mul_of_nonneg_left hsq (by positivity) + _ = (B : ℝ) ^ m := by + rw [div_pow, hden] + exact div_mul_cancel₀ _ (ne_of_gt (pow_pos (pow_pos hAp m) 2)) + _ ≤ (blockSensitivityAt (iterateFin f m) (fun _ => false) : ℝ) := hb' m + _ ≤ (blockSensitivity (iterateFin f m) : ℝ) := by + exact_mod_cast blockSensitivityAt_le_blockSensitivity (iterateFin f m) (fun _ => false) + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/ProfileArithmetic.lean b/lean/OAI/Combinatorics/Sensitivity/ProfileArithmetic.lean new file mode 100644 index 0000000000000000000000000000000000000000..fb6b9592f0fef4d63ce81195b1424e48fdb7eaf1 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/ProfileArithmetic.lean @@ -0,0 +1,89 @@ +import Mathlib + +namespace OAI + +/-! The four raw recurrences imply the two normalized scalar recurrences. -/ + +noncomputable section + +namespace Paper320 + +def normalizedMax (M : ℝ) (n : ℕ) (s₀ s₁ : ℝ) : ℝ := + max (s₀ / M ^ n) (s₁ / M ^ (n + 1)) + +theorem normalizedMax_nonneg {M s₀ s₁ : ℝ} {n : ℕ} + (hM : 0 < M) (hs₀ : 0 ≤ s₀) : 0 ≤ normalizedMax M n s₀ s₁ := + (div_nonneg hs₀ (pow_pos hM n).le).trans (le_max_left _ _) + +theorem le_normalizedMax_zero {M s₀ s₁ : ℝ} {n : ℕ} (hM : 0 < M) : + s₀ ≤ normalizedMax M n s₀ s₁ * M ^ n := + (div_le_iff₀ (pow_pos hM n)).mp (le_max_left _ _) + +theorem le_normalizedMax_one {M s₀ s₁ : ℝ} {n : ℕ} (hM : 0 < M) : + s₁ ≤ normalizedMax M n s₀ s₁ * M ^ (n + 1) := + (div_le_iff₀ (pow_pos hM (n + 1))).mp (le_max_right _ _) + +theorem normalizedMax_le {M s₀ s₁ u : ℝ} {n : ℕ} (hM : 0 < M) + (h₀ : s₀ ≤ u * M ^ n) (h₁ : s₁ ≤ u * M ^ (n + 1)) : + normalizedMax M n s₀ s₁ ≤ u := + max_le ((div_le_iff₀ (pow_pos hM n)).mpr h₀) + ((div_le_iff₀ (pow_pos hM (n + 1))).mpr h₁) + +theorem raw_profiles_step {M r ε u v p : ℝ} + (hM : 0 < M) (hp : 0 ≤ p) (hu : 0 ≤ u) (hv : 0 ≤ v) + (hr : 0 ≤ r) (hεr : r ≤ ε * M) (hεt : 16 ≤ ε * M) + {s₀ s₁ j₀ j₁ s₀' s₁' j₀' j₁' : ℝ} + (hs₀ : s₀ ≤ u * p) (hs₁ : s₁ ≤ u * (p * M)) + (hj₀ : j₀ ≤ v * p) (hj₁ : j₁ ≤ v * (p * M)) + (hS₀ : s₀' ≤ 16 * s₀ + s₁ + 3 * j₁) + (hS₁ : s₁' ≤ M ^ 2 * s₀ + r * s₁) + (hJ₀ : j₀' ≤ 16 * s₀ + 3 * j₁) + (hJ₁ : j₁' ≤ M ^ 2 * j₀ + r * s₁) : + s₀' ≤ ((1 + ε) * u + 3 * v) * (p * M) ∧ + s₁' ≤ ((1 + ε) * u + 3 * v) * (p * M * M) ∧ + j₀' ≤ (ε * u + 3 * v) * (p * M) ∧ + j₁' ≤ (ε * u + 3 * v) * (p * M * M) := by + have hup : 0 ≤ u * p := mul_nonneg hu hp + have hupM : 0 ≤ u * (p * M) := mul_nonneg hu (mul_nonneg hp hM.le) + have hvpMM : 0 ≤ v * (p * M * M) := by positivity + have ht := mul_le_mul_of_nonneg_right hεt hup + have hr' := mul_le_mul_of_nonneg_right hεr hupM + have a₀ := mul_le_mul_of_nonneg_left hs₀ (show (0 : ℝ) ≤ 16 by norm_num) + have a₁ := mul_le_mul_of_nonneg_left hs₀ (sq_nonneg M) + have b₀ := mul_le_mul_of_nonneg_left hj₀ (sq_nonneg M) + have b₁ := mul_le_mul_of_nonneg_left hj₁ (show (0 : ℝ) ≤ 3 by norm_num) + have c₁ := mul_le_mul_of_nonneg_left hs₁ hr + constructor + · nlinarith + constructor + · nlinarith + constructor <;> nlinarith + +theorem normalized_profiles_step {M r ε : ℝ} {n : ℕ} + (hM : 0 < M) (hr : 0 ≤ r) (hεr : r / M ≤ ε) (hεt : 16 / M ≤ ε) + {s₀ s₁ j₀ j₁ s₀' s₁' j₀' j₁' : ℝ} (hs₀ : 0 ≤ s₀) (hj₀ : 0 ≤ j₀) + (hS₀ : s₀' ≤ 16 * s₀ + s₁ + 3 * j₁) + (hS₁ : s₁' ≤ M ^ 2 * s₀ + r * s₁) + (hJ₀ : j₀' ≤ 16 * s₀ + 3 * j₁) + (hJ₁ : j₁' ≤ M ^ 2 * j₀ + r * s₁) : + normalizedMax M (n + 1) s₀' s₁' ≤ + (1 + ε) * normalizedMax M n s₀ s₁ + 3 * normalizedMax M n j₀ j₁ ∧ + normalizedMax M (n + 1) j₀' j₁' ≤ + ε * normalizedMax M n s₀ s₁ + 3 * normalizedMax M n j₀ j₁ := by + have hs₁b := le_normalizedMax_one (s₀ := s₀) (s₁ := s₁) (n := n) hM + have hj₁b := le_normalizedMax_one (s₀ := j₀) (s₁ := j₁) (n := n) hM + rw [pow_succ] at hs₁b hj₁b + obtain ⟨a, b, c, d⟩ := raw_profiles_step hM (pow_pos hM n).le + (normalizedMax_nonneg hM hs₀) (normalizedMax_nonneg hM hj₀) hr + ((div_le_iff₀ hM).mp hεr) ((div_le_iff₀ hM).mp hεt) + (le_normalizedMax_zero hM) hs₁b (le_normalizedMax_zero hM) hj₁b + hS₀ hS₁ hJ₀ hJ₁ + constructor + · apply normalizedMax_le hM <;> simpa only [pow_succ] using (by assumption) + · apply normalizedMax_le hM <;> simpa only [pow_succ] using (by assumption) + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/QuantitativeProfiles.lean b/lean/OAI/Combinatorics/Sensitivity/QuantitativeProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..c7372e1817ef814921c15af7c54197ff7cdc60ee --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/QuantitativeProfiles.lean @@ -0,0 +1,62 @@ +import OAI.Combinatorics.Sensitivity.ProfileArithmetic +import OAI.Combinatorics.Sensitivity.ScalarBounds + +namespace OAI + +/-! Quantitative bounds for any literal profiles satisfying the four recurrences. -/ + +noncomputable section + +namespace Paper320 + +theorem quantitative_profile_bounds (d L M r : ℕ) (hM : 0 < M) + (hbudget : ((max r 16 : ℕ) : ℝ) / M * 3 ^ (d + 1) ≤ 2) + (S J : ℕ → Bool → ℕ) + (hS₀ : S 0 false ≤ L) (hS₁ : S 0 true ≤ L * M) + (hJ₀ : J 0 false = 0) (hJ₁ : J 0 true = 0) + (hstepS₀ : ∀ n < d, S (n + 1) false ≤ 16 * S n false + S n true + 3 * J n true) + (hstepS₁ : ∀ n < d, S (n + 1) true ≤ M ^ 2 * S n false + r * S n true) + (hstepJ₀ : ∀ n < d, J (n + 1) false ≤ 16 * S n false + 3 * J n true) + (hstepJ₁ : ∀ n < d, J (n + 1) true ≤ M ^ 2 * J n false + r * S n true) : + ∀ n ≤ d, S n false ≤ 2 * L * M ^ n ∧ S n true ≤ 2 * L * M ^ (n + 1) := by + let ε : ℝ := ((max r 16 : ℕ) : ℝ) / M + let u : ℕ → ℝ := fun n => normalizedMax M n (S n false) (S n true) + let v : ℕ → ℝ := fun n => normalizedMax M n (J n false) (J n true) + have hMr : (0 : ℝ) < M := by exact_mod_cast hM + have hε : 0 ≤ ε := by positivity + have hεr : (r : ℝ) / M ≤ ε := by + apply div_le_div_of_nonneg_right _ hMr.le + exact_mod_cast le_max_left r 16 + have hεt : (16 : ℝ) / M ≤ ε := by + apply div_le_div_of_nonneg_right _ hMr.le + exact_mod_cast le_max_right r 16 + have hu0 : u 0 ≤ L := by + apply normalizedMax_le hMr + · simpa using (show (S 0 false : ℝ) ≤ L by exact_mod_cast hS₀) + · simpa using (show (S 0 true : ℝ) ≤ (L : ℝ) * M by exact_mod_cast hS₁) + have hv0 : v 0 ≤ 0 := by simp [v, normalizedMax, hJ₀, hJ₁] + have hstep (n : ℕ) (hn : n < d) : + u (n + 1) ≤ (1 + ε) * u n + 3 * v n ∧ + v (n + 1) ≤ ε * u n + 3 * v n := by + apply normalized_profiles_step hMr (by positivity) hεr hεt (by positivity) (by positivity) + · exact_mod_cast hstepS₀ n hn + · exact_mod_cast hstepS₁ n hn + · exact_mod_cast hstepJ₀ n hn + · exact_mod_cast hstepJ₁ n hn + have hb := coupled_profiles_bound d u v ε L hε (by positivity) hbudget hu0 hv0 + (fun n hn => (hstep n hn).1) (fun n hn => (hstep n hn).2) + intro n hn + have hu := (hb n hn).1 + have hzero : (S n false : ℝ) ≤ 2 * (L : ℝ) * (M : ℝ) ^ n := by + exact (le_normalizedMax_zero hMr).trans + (mul_le_mul_of_nonneg_right hu (by positivity)) + have hone : (S n true : ℝ) ≤ 2 * (L : ℝ) * (M : ℝ) ^ (n + 1) := by + exact (le_normalizedMax_one hMr).trans + (mul_le_mul_of_nonneg_right hu (by positivity)) + exact ⟨by exact_mod_cast hzero, by exact_mod_cast hone⟩ + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/Recursive.lean b/lean/OAI/Combinatorics/Sensitivity/Recursive.lean new file mode 100644 index 0000000000000000000000000000000000000000..5c84f1f6e042d910fd23624481583de44cc57d5e --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/Recursive.lean @@ -0,0 +1,33 @@ +import OAI.Combinatorics.Sensitivity.RecursiveBlocks +import OAI.Combinatorics.Sensitivity.RecursiveOne +import OAI.Combinatorics.Sensitivity.RecursiveZero +import OAI.Combinatorics.Sensitivity.RecursiveJointZero + +namespace OAI + +/-! Four sensitivity recurrences for a regular tournament and a good labeling. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +theorem recursive_four_recurrences {M r h : ℕ} {I : Type} [Fintype I] + (T : RegularTournament M) (A : GoodLabeling T.toTournament r) + (F : Fin (h + 1) → (I → Bool) → Bool) (hF : NestedFamily F) (hr : 0 < r) : + let P := recursiveFamily T.toTournament A.label F + (sideSensitivity P true ≤ M ^ 2 * sideSensitivity F false + r * sideSensitivity F true) ∧ + (jointSensitivity P true ≤ M ^ 2 * jointSensitivity F false + r * sideSensitivity F true) ∧ + (sideSensitivity P false ≤ 16 * sideSensitivity F false + sideSensitivity F true + + 3 * jointSensitivity F true) ∧ + (jointSensitivity P false ≤ 16 * sideSensitivity F false + 3 * jointSensitivity F true) := by + exact ⟨recursive_side_one T.toTournament A.label F (M ^ 2) T.outdegree, + recursive_joint_one T.toTournament A.label F hF (M ^ 2) T.outdegree, + recursive_side_zero T.toTournament A F hF hr, + recursive_joint_zero T.toTournament A F hF hr⟩ + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/RecursiveBlocks.lean b/lean/OAI/Combinatorics/Sensitivity/RecursiveBlocks.lean new file mode 100644 index 0000000000000000000000000000000000000000..d68d0ca6623ac3746e8c8bebb7a642fce50a2d94 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/RecursiveBlocks.lean @@ -0,0 +1,98 @@ +import OAI.Combinatorics.Sensitivity.RecursiveDefinitions + +namespace OAI + +/-! Disjoint zero-input blocks lift to every column of a chosen row. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +def rowLift {k r : ℕ} {I : Type} (i : Fin k) (B : Finset I) : + Finset ((Fin k × Fin r) × I) := + (Finset.univ.product B).map + ⟨fun p : Fin r × I => ((i, p.1), p.2), by + intro p q hpq + exact Prod.ext (congrArg (fun z => z.1.2) hpq) (congrArg (fun z : (Fin k × Fin r) × I => z.2) hpq)⟩ + +@[simp] theorem mem_rowLift {k r : ℕ} {I : Type} (i : Fin k) (B : Finset I) + (p : (Fin k × Fin r) × I) : p ∈ rowLift (r := r) i B ↔ p.1.1 = i ∧ p.2 ∈ B := by + rcases p with ⟨⟨j, c⟩, a⟩ + unfold rowLift + rw [Finset.mem_map] + constructor + · rintro ⟨⟨c', b⟩, hb, hp⟩ + change ((i, c'), b) = ((j, c), a) at hp + cases hp + exact ⟨rfl, (Finset.mem_product.mp hb).2⟩ + · rintro ⟨rfl, ha⟩ + exact ⟨(c, a), Finset.mem_product.mpr ⟨Finset.mem_univ _, ha⟩, rfl⟩ + +theorem rowLift_card {k r : ℕ} {I : Type} (i : Fin k) (B : Finset I) : + (rowLift (r := r) i B).card = r * B.card := by + simp [rowLift] + +theorem rowLift_nonempty {k r : ℕ} {I : Type} (i : Fin k) (B : Finset I) + (hr : 0 < r) (hB : B.Nonempty) : (rowLift (r := r) i B).Nonempty := by + obtain ⟨a, ha⟩ := hB + exact ⟨((i, ⟨0, hr⟩), a), (mem_rowLift i B _).mpr ⟨rfl, ha⟩⟩ + +theorem rowLift_disjoint_of_ne {k r : ℕ} {I : Type} (i j : Fin k) + (B C : Finset I) (hij : i ≠ j) : Disjoint (rowLift (r := r) i B) (rowLift j C) := by + apply Finset.disjoint_left.mpr + intro p hp hq + exact hij (((mem_rowLift i B p).mp hp).1.symm.trans ((mem_rowLift j C p).mp hq).1) + +theorem rowLift_disjoint {k r : ℕ} {I : Type} (i j : Fin k) (B C : Finset I) + (hBC : Disjoint B C) : Disjoint (rowLift (r := r) i B) (rowLift j C) := by + apply Finset.disjoint_left.mpr + intro p hp hq + exact Finset.disjoint_left.mp hBC ((mem_rowLift i B p).mp hp).2 + ((mem_rowLift j C p).mp hq).2 + +theorem rowLift_family_disjoint {k r : ℕ} {I K : Type} (blocks : K → Finset I) + (hB : Pairwise fun a b => Disjoint (blocks a) (blocks b)) : + Pairwise fun a b : Fin k × K => + Disjoint (rowLift (r := r) a.1 (blocks a.2)) (rowLift b.1 (blocks b.2)) := by + intro a b hab + by_cases hrow : a.1 = b.1 + · apply rowLift_disjoint + apply hB + intro hcol + exact hab (Prod.ext hrow hcol) + · exact rowLift_disjoint_of_ne _ _ _ _ hrow + +theorem recursiveChild_rowLift_same {k r : ℕ} {I : Type} + (i : Fin k) (B : Finset I) (c : Fin r) : + recursiveChild (flip (fun _ => false) (rowLift (r := r) i B)) i c = + flip (fun _ => false) B := by + funext a + simp [recursiveChild, flip] + +theorem recursiveChild_rowLift_other {k r : ℕ} {I : Type} + (i j : Fin k) (B : Finset I) (c : Fin r) (hji : j ≠ i) : + recursiveChild (flip (fun _ => false) (rowLift (r := r) i B)) j c = + fun _ => false := by + funext a + simp [recursiveChild, flip, hji] + +theorem recursiveFamily_rowLift {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (hzero : ∀ q, F q (fun _ => false) = false) (B : Finset I) + (hB : ∀ q, F q (flip (fun _ => false) B) = true) (i : Fin k) (q : Fin h) : + recursiveFamily T label F q (flip (fun _ => false) (rowLift i B)) = true := by + apply (recursiveFamily_eq_true_iff _ _ _ _ _).mpr + refine ⟨i, (rowClause_eq_true_iff _ _ _ _ _ _).mpr ⟨?_, ?_⟩⟩ + · intro c + rw [recursiveChild_rowLift_same] + exact hB _ + · intro j hij + rw [recursiveChild_rowLift_other _ _ _ _ (T.ne_of_adj hij).symm] + exact hzero _ + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/RecursiveCandidates.lean b/lean/OAI/Combinatorics/Sensitivity/RecursiveCandidates.lean new file mode 100644 index 0000000000000000000000000000000000000000..d940fa6687f7caebd2d12246715bd7b9c4314ea4 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/RecursiveCandidates.lean @@ -0,0 +1,86 @@ +import OAI.Combinatorics.Sensitivity.RecursiveRepair + +namespace OAI + +/-! Unique failed children and the unique possible sink of the gate-clause list. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +theorem targetWitness_false {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) (hr : 0 < r) (i : Fin k) + (hi : i ∈ targetCandidates T label F q x) : + F (Fin.last h) (recursiveChild x i (targetWitness F x hr i)) = false := by + have hm : targetWitness F x hr i ∈ targetFailures F x i := by + rw [targetFailures_singleton T label F q x hr i hi] + exact Finset.mem_singleton_self _ + exact (Finset.mem_filter.mp hm).2 + +theorem targetWitness_unique {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) (hr : 0 < r) (i : Fin k) + (hi : i ∈ targetCandidates T label F q x) (c : Fin r) + (hc : F (Fin.last h) (recursiveChild x i c) = false) : c = targetWitness F x hr i := by + have hm : c ∈ targetFailures F x i := Finset.mem_filter.mpr ⟨Finset.mem_univ _, hc⟩ + rwa [targetFailures_singleton T label F q x hr i hi, Finset.mem_singleton] at hm + +theorem gateWitness_spec {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) (i : Fin k) + (hi : i ∈ gateCandidates T label F q x) : + T.Adj i (gateWitness T label F q x i) ∧ + F (gateIndex q) (recursiveChild x (gateWitness T label F q x i) + (label i (gateWitness T label F q x i))) = true := by + have hm : gateWitness T label F q x i ∈ gateFailures T label F q x i := by + rw [gateFailures_singleton T label F q x i hi] + exact Finset.mem_singleton_self _ + exact (Finset.mem_filter.mp hm).2 + +theorem gateWitness_unique {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) (i : Fin k) + (hi : i ∈ gateCandidates T label F q x) (j : Fin k) (hij : T.Adj i j) + (hj : F (gateIndex q) (recursiveChild x j (label i j)) = true) : + j = gateWitness T label F q x i := by + have hm : j ∈ gateFailures T label F q x i := Finset.mem_filter.mpr ⟨Finset.mem_univ _, hij, hj⟩ + rwa [gateFailures_singleton T label F q x i hi, Finset.mem_singleton] at hm + +def gateSinks {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) : Finset (Fin k) := + (gateCandidates T label F q x).filter fun i => + ∀ j ∈ gateCandidates T label F q x, ¬ T.Adj i j + +theorem gateSinks_card {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) : + (gateSinks T label F q x).card ≤ 1 := by + apply Finset.card_le_one.mpr + intro i hi j hj + exact T.internal_sink_unique (Finset.mem_filter.mp hi).1 (Finset.mem_filter.mp hj).1 + (Finset.mem_filter.mp hi).2 (Finset.mem_filter.mp hj).2 + +theorem nonsink_gateWitness_mem {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (hF : NestedFamily F) (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) + (i : Fin k) (hi : i ∈ gateCandidates T label F q x) + (hs : i ∉ gateSinks T label F q x) : + gateWitness T label F q x i ∈ gateCandidates T label F q x := by + have he : ∃ j ∈ gateCandidates T label F q x, T.Adj i j := by + by_contra hn + apply hs + apply Finset.mem_filter.mpr + refine ⟨hi, ?_⟩ + intro j hj hij + exact hn ⟨j, hj, hij⟩ + obtain ⟨j, hj, hij⟩ := he + rwa [← gateCandidates_neighbor T label F hF q x i j hi hj hij] + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/RecursiveChildren.lean b/lean/OAI/Combinatorics/Sensitivity/RecursiveChildren.lean new file mode 100644 index 0000000000000000000000000000000000000000..48294a87f91a30cfea762dde6235e4a0b661bce8 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/RecursiveChildren.lean @@ -0,0 +1,46 @@ +import OAI.Combinatorics.Sensitivity.RecursiveDefinitions + +namespace OAI + +/-! Each row clause uses exactly the stated number of distinct child blocks. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +def rowChildren {k r : ℕ} (T : Tournament k) (label : Fin k → Fin k → Fin r) + (i : Fin k) : Finset (Fin k × Fin r) := + Finset.univ.image (fun c => (i, c)) ∪ + (Finset.univ.filter (T.Adj i)).image (fun j => (j, label i j)) + +theorem rowChildren_disjoint {k r : ℕ} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (i : Fin k) : + Disjoint (Finset.univ.image fun c => (i, c)) + ((Finset.univ.filter (T.Adj i)).image fun j => (j, label i j)) := by + apply Finset.disjoint_left.mpr + intro p hp hq + obtain ⟨c, _, rfl⟩ := Finset.mem_image.mp hp + obtain ⟨j, hj, he⟩ := Finset.mem_image.mp hq + have hji : j = i := congrArg Prod.fst he + exact T.loopless i (hji ▸ (Finset.mem_filter.mp hj).2) + +theorem rowChildren_card {k r : ℕ} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (i : Fin k) : + (rowChildren T label i).card = r + (Finset.univ.filter (T.Adj i)).card := by + rw [rowChildren, Finset.card_union_of_disjoint (rowChildren_disjoint T label i)] + rw [Finset.card_image_of_injective _ (fun _ _ h => congrArg Prod.snd h)] + rw [Finset.card_image_of_injective _ (fun _ _ h => congrArg Prod.fst h)] + simp + +theorem regular_rowChildren_card {M r : ℕ} (T : RegularTournament M) + (label : Fin (2 * M ^ 2 + 1) → Fin (2 * M ^ 2 + 1) → Fin r) + (i : Fin (2 * M ^ 2 + 1)) : + (rowChildren T.toTournament label i).card = r + M ^ 2 := by + rw [rowChildren_card, T.outdegree] + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/RecursiveDefinitions.lean b/lean/OAI/Combinatorics/Sensitivity/RecursiveDefinitions.lean new file mode 100644 index 0000000000000000000000000000000000000000..a1fed004ef7bce947b1ea8ac301bb9aa1843907a --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/RecursiveDefinitions.lean @@ -0,0 +1,103 @@ +import OAI.Combinatorics.Sensitivity.RecursiveProfiles +import OAI.Combinatorics.Sensitivity.Tournament + +namespace OAI + +/-! The literal target-row and labeled-gate construction. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +def recursiveChild {k r : ℕ} {I : Type} + (x : ((Fin k × Fin r) × I) → Bool) (j : Fin k) (c : Fin r) : I → Bool := + fun a => x ((j, c), a) + +def gateIndex {h : ℕ} (q : Fin h) : Fin (h + 1) := (Fin.rev q).castSucc + +theorem gateIndex_lt_last {h : ℕ} (q : Fin h) : gateIndex q < Fin.last h := + Fin.castSucc_lt_last _ + +theorem gateIndex_antitone {h : ℕ} {q q' : Fin h} (hqq : q ≤ q') : + gateIndex q' ≤ gateIndex q := by + exact Fin.rev_le_rev.mpr hqq + +theorem gateIndex_strictAnti {h : ℕ} {q q' : Fin h} (hqq : q < q') : + gateIndex q' < gateIndex q := by + exact Fin.rev_lt_rev.mpr hqq + +/-- A clause uses every target in its own row and one labeled gate per outgoing edge. -/ +def rowClause {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) (i : Fin k) : Bool := + decide ((∀ c, F (Fin.last h) (recursiveChild x i c) = true) ∧ + ∀ j, T.Adj i j → F (gateIndex q) (recursiveChild x j (label i j)) = false) + +/-- The next-level predicate is the disjunction of the literal row clauses. -/ +def recursiveFamily {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) : Bool := + decide (∃ i, rowClause T label F q x i = true) + +theorem rowClause_eq_true_iff {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) (i : Fin k) : + rowClause T label F q x i = true ↔ + (∀ c, F (Fin.last h) (recursiveChild x i c) = true) ∧ + ∀ j, T.Adj i j → F (gateIndex q) (recursiveChild x j (label i j)) = false := by + simp only [rowClause, decide_eq_true_eq] + +theorem recursiveFamily_eq_true_iff {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) : + recursiveFamily T label F q x = true ↔ ∃ i, rowClause T label F q x i = true := by + simp only [recursiveFamily, decide_eq_true_eq] + +theorem recursiveFamily_eq_false_iff {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) : + recursiveFamily T label F q x = false ↔ ∀ i, rowClause T label F q x i = false := by + simp [recursiveFamily] + +theorem rowClause_nested {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (hF : NestedFamily F) {q q' : Fin h} (hqq : q ≤ q') + (x : ((Fin k × Fin r) × I) → Bool) (i : Fin k) + (hi : rowClause T label F q' x i = true) : rowClause T label F q x i = true := by + rw [rowClause_eq_true_iff] at hi ⊢ + refine ⟨hi.1, fun j hij => ?_⟩ + exact hF.rejects_of_le (gateIndex_antitone hqq) (hi.2 j hij) + +theorem recursiveFamily_nested {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (hF : NestedFamily F) : NestedFamily (recursiveFamily T label F) := by + constructor + intro q q' x hqq hx + obtain ⟨i, hi⟩ := (recursiveFamily_eq_true_iff T label F q' x).mp hx + exact (recursiveFamily_eq_true_iff T label F q x).mpr + ⟨i, rowClause_nested T label F hF hqq x i hi⟩ + +theorem recursiveFamily_zero {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (hr : 0 < r) (hzero : ∀ q, F q (fun _ => false) = false) (q : Fin h) : + recursiveFamily T label F q (fun _ => false) = false := by + rw [recursiveFamily_eq_false_iff] + intro i + cases hi : rowClause T label F q (fun _ => false) i + · rfl + · have ht := ((rowClause_eq_true_iff T label F q (fun _ => false) i).mp hi).1 + (⟨0, hr⟩ : Fin r) + have hz := hzero (Fin.last h) + change F (Fin.last h) (fun _ => false) = true at ht + simp [hz] at ht + +theorem recursive_coordinates_card {k r : ℕ} {I : Type} [Fintype I] : + Fintype.card ((Fin k × Fin r) × I) = k * r * Fintype.card I := by + simp + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/RecursiveFailures.lean b/lean/OAI/Combinatorics/Sensitivity/RecursiveFailures.lean new file mode 100644 index 0000000000000000000000000000000000000000..a0d98c94f0c32cd375b4aa20e05bccfad72325e1 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/RecursiveFailures.lean @@ -0,0 +1,124 @@ +import OAI.Combinatorics.Sensitivity.RecursiveSets +import OAI.Combinatorics.Sensitivity.TournamentCounts + +namespace OAI + +/-! Fixed initial-input lists of clauses with exactly one failed condition. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +def targetFailures {k r h : ℕ} {I : Type} + (F : Fin (h + 1) → (I → Bool) → Bool) + (x : ((Fin k × Fin r) × I) → Bool) (i : Fin k) : Finset (Fin r) := + Finset.univ.filter fun c => F (Fin.last h) (recursiveChild x i c) = false + +def gateFailures {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) (i : Fin k) : Finset (Fin k) := + Finset.univ.filter fun j => T.Adj i j ∧ + F (gateIndex q) (recursiveChild x j (label i j)) = true + +def targetCandidates {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) : Finset (Fin k) := + Finset.univ.filter fun i => (targetFailures F x i).card = 1 ∧ gateFailures T label F q x i = ∅ + +def gateCandidates {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) : Finset (Fin k) := + Finset.univ.filter fun i => targetFailures F x i = ∅ ∧ (gateFailures T label F q x i).card = 1 + +def targetWitness {k r h : ℕ} {I : Type} + (F : Fin (h + 1) → (I → Bool) → Bool) + (x : ((Fin k × Fin r) × I) → Bool) (hr : 0 < r) (i : Fin k) : Fin r := + if hi : (targetFailures F x i).Nonempty then hi.choose else ⟨0, hr⟩ + +def gateWitness {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) (i : Fin k) : Fin k := + if hi : (gateFailures T label F q x i).Nonempty then hi.choose else i + +theorem targetFailures_empty_iff {k r h : ℕ} {I : Type} + (F : Fin (h + 1) → (I → Bool) → Bool) + (x : ((Fin k × Fin r) × I) → Bool) (i : Fin k) : + targetFailures F x i = ∅ ↔ ∀ c, F (Fin.last h) (recursiveChild x i c) = true := by + simp [targetFailures, Finset.filter_eq_empty_iff] + +theorem gateFailures_empty_iff {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) (i : Fin k) : + gateFailures T label F q x i = ∅ ↔ + ∀ j, T.Adj i j → F (gateIndex q) (recursiveChild x j (label i j)) = false := by + simp [gateFailures, Finset.filter_eq_empty_iff] + +theorem targetFailures_singleton {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) (hr : 0 < r) (i : Fin k) + (hi : i ∈ targetCandidates T label F q x) : + targetFailures F x i = {targetWitness F x hr i} := by + have hc := (Finset.mem_filter.mp hi).2.1 + obtain ⟨c, hc'⟩ := Finset.card_eq_one.mp hc + have hne : (targetFailures F x i).Nonempty := hc' ▸ Finset.singleton_nonempty c + have hm : targetWitness F x hr i ∈ targetFailures F x i := by + simp only [targetWitness, dite_eq_left hne] + exact hne.choose_spec + rw [hc', Finset.mem_singleton] at hm + simpa [hm] using hc' + +theorem gateFailures_singleton {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) (i : Fin k) + (hi : i ∈ gateCandidates T label F q x) : + gateFailures T label F q x i = {gateWitness T label F q x i} := by + have hc := (Finset.mem_filter.mp hi).2.2 + obtain ⟨j, hc'⟩ := Finset.card_eq_one.mp hc + have hne : (gateFailures T label F q x i).Nonempty := hc' ▸ Finset.singleton_nonempty j + have hm : gateWitness T label F q x i ∈ gateFailures T label F q x i := by + simp only [gateWitness, dite_eq_left hne] + exact hne.choose_spec + rw [hc', Finset.mem_singleton] at hm + simpa [hm] using hc' + +theorem targetCandidates_card {k r h : ℕ} {I : Type} (T : Tournament k) + (A : GoodLabeling T r) (F : Fin (h + 1) → (I → Bool) → Bool) (hF : NestedFamily F) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) (hr : 0 < r) : + (targetCandidates T A.label F q x).card < 16 := by + apply A.good_implies_card_lt_sixteen _ (targetWitness F x hr) + intro i hi j hj hij + have hgate := (gateFailures_empty_iff T A.label F q x i).mp (Finset.mem_filter.mp hi).2.2 + have hz := hF.rejects_of_le (gateIndex_lt_last q).le (hgate j hij) + have hm : A.label i j ∈ targetFailures F x j := Finset.mem_filter.mpr ⟨Finset.mem_univ _, hz⟩ + rw [targetFailures_singleton T A.label F q x hr j hj, Finset.mem_singleton] at hm + exact hm + +theorem gateCandidates_neighbor {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (hF : NestedFamily F) (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) + (i j : Fin k) (hi : i ∈ gateCandidates T label F q x) + (hj : j ∈ gateCandidates T label F q x) (hij : T.Adj i j) : + j = gateWitness T label F q x i := by + have ht := (targetFailures_empty_iff F x j).mp (Finset.mem_filter.mp hj).2.1 + have hon := hF.accepts_of_le (gateIndex_lt_last q).le (ht (label i j)) + have hm : j ∈ gateFailures T label F q x i := Finset.mem_filter.mpr ⟨Finset.mem_univ _, hij, hon⟩ + rwa [gateFailures_singleton T label F q x i hi, Finset.mem_singleton] at hm + +theorem gateCandidates_card {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (hF : NestedFamily F) (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) : + (gateCandidates T label F q x).card ≤ 3 := by + apply T.card_le_three_of_outdegree_le_one + intro i hi + apply le_trans (Finset.card_le_card (t := {gateWitness T label F q x i}) ?_) + (by simp) + intro j hj + have h := Finset.mem_filter.mp hj + exact Finset.mem_singleton.mpr (gateCandidates_neighbor T label F hF q x i j hi h.1 h.2) + +end Paper320 + +end + +end OAI diff --git a/lean/OAI/Combinatorics/Sensitivity/RecursiveFlips.lean b/lean/OAI/Combinatorics/Sensitivity/RecursiveFlips.lean new file mode 100644 index 0000000000000000000000000000000000000000..fcc57072402e22176efbf42d5859342a6b1a8877 --- /dev/null +++ b/lean/OAI/Combinatorics/Sensitivity/RecursiveFlips.lean @@ -0,0 +1,88 @@ +import OAI.Combinatorics.Sensitivity.RecursiveDefinitions +import OAI.Combinatorics.Sensitivity.Basic + +namespace OAI + +/-! A raw bit belongs to one child and changes at most one condition of a clause. -/ + +noncomputable section +open scoped Classical + +namespace Paper320 + +theorem recursiveChild_flip_same {k r : ℕ} {I : Type} + (x : ((Fin k × Fin r) × I) → Bool) (j : Fin k) (c : Fin r) (a : I) : + recursiveChild (flip x {((j, c), a)}) j c = flip (recursiveChild x j c) {a} := + flip_prod_same x (j, c) a + +theorem recursiveChild_flip_other {k r : ℕ} {I : Type} + (x : ((Fin k × Fin r) × I) → Bool) (j j' : Fin k) (c c' : Fin r) (a : I) + (h : (j', c') ≠ (j, c)) : + recursiveChild (flip x {((j, c), a)}) j' c' = recursiveChild x j' c' := + flip_prod_other x a h + +theorem rowClause_eq_of_conditions {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x y : ((Fin k × Fin r) × I) → Bool) (i : Fin k) + (ht : ∀ c, F (Fin.last h) (recursiveChild x i c) = + F (Fin.last h) (recursiveChild y i c)) + (hg : ∀ j, T.Adj i j → F (gateIndex q) (recursiveChild x j (label i j)) = + F (gateIndex q) (recursiveChild y j (label i j))) : + rowClause T label F q x i = rowClause T label F q y i := by + apply Bool.eq_iff_iff.mpr + rw [rowClause_eq_true_iff, rowClause_eq_true_iff] + constructor + · rintro ⟨hxt, hxg⟩ + exact ⟨fun c => (ht c).symm.trans (hxt c), + fun j hij => (hg j hij).symm.trans (hxg j hij)⟩ + · rintro ⟨hyt, hyg⟩ + exact ⟨fun c => (ht c).trans (hyt c), + fun j hij => (hg j hij).trans (hyg j hij)⟩ + +theorem rowClause_flip_eq {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) (i j : Fin k) (c : Fin r) (a : I) + (ht : j = i → F (Fin.last h) (flip (recursiveChild x j c) {a}) = + F (Fin.last h) (recursiveChild x j c)) + (hg : T.Adj i j → c = label i j → + F (gateIndex q) (flip (recursiveChild x j c) {a}) = + F (gateIndex q) (recursiveChild x j c)) : + rowClause T label F q (flip x {((j, c), a)}) i = rowClause T label F q x i := by + apply rowClause_eq_of_conditions + · intro c' + by_cases heq : (i, c') = (j, c) + · obtain ⟨rfl, rfl⟩ := Prod.mk.inj heq + rw [recursiveChild_flip_same] + exact ht rfl + · rw [recursiveChild_flip_other x j i c c' a heq] + · intro j' hij' + by_cases heq : (j', label i j') = (j, c) + · obtain ⟨rfl, rfl⟩ := Prod.mk.inj heq + rw [recursiveChild_flip_same] + exact hg hij' rfl + · rw [recursiveChild_flip_other x j j' c (label i j') a heq] + +theorem rowClause_flip_change {k r h : ℕ} {I : Type} (T : Tournament k) + (label : Fin k → Fin k → Fin r) (F : Fin (h + 1) → (I → Bool) → Bool) + (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) (i j : Fin k) (c : Fin r) (a : I) + (hc : rowClause T label F q (flip x {((j, c), a)}) i ≠ rowClause T label F q x i) : + (j = i ∧ F (Fin.last h) (flip (recursiveChild x j c) {a}) ≠ + F (Fin.last h) (recursiveChild x j c)) ∨ + (T.Adj i j ∧ c = label i j ∧ + F (gateIndex q) (flip (recursiveChild x j c) {a}) ≠ + F (gateIndex q) (recursiveChild x j c)) := by + by_contra hn + apply hc + apply rowClause_flip_eq + · intro hji + by_contra hne + exact hn (Or.inl ⟨hji, hne⟩) + · intro hij hcl + by_contra hne + exact hn (Or.inr ⟨hij, hcl, hne⟩) + +end Paper320 + +end + +end OAI